commit 05205f009ec56916b0f0aa8e5fae490cb4d02f58 Author: MikeyIsBaeYT Date: Tue Oct 26 12:45:26 2021 -0400 Terraria 1.4.0.5 Source Code diff --git a/Achievements/Achievement.cs b/Achievements/Achievement.cs new file mode 100644 index 0000000..1ad1e7b --- /dev/null +++ b/Achievements/Achievement.cs @@ -0,0 +1,138 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Achievements.Achievement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System.Collections.Generic; +using Terraria.Localization; +using Terraria.Social; + +namespace Terraria.Achievements +{ + [JsonObject] + public class Achievement + { + private static int _totalAchievements; + public readonly string Name; + public readonly LocalizedText FriendlyName; + public readonly LocalizedText Description; + public readonly int Id = Achievement._totalAchievements++; + private AchievementCategory _category; + private IAchievementTracker _tracker; + [JsonProperty("Conditions")] + private Dictionary _conditions = new Dictionary(); + private int _completedCount; + + public AchievementCategory Category => this._category; + + public event Achievement.AchievementCompleted OnCompleted; + + public bool HasTracker => this._tracker != null; + + public IAchievementTracker GetTracker() => this._tracker; + + public bool IsCompleted => this._completedCount == this._conditions.Count; + + public Achievement(string name) + { + this.Name = name; + this.FriendlyName = Language.GetText("Achievements." + name + "_Name"); + this.Description = Language.GetText("Achievements." + name + "_Description"); + } + + public void ClearProgress() + { + this._completedCount = 0; + foreach (KeyValuePair condition in this._conditions) + condition.Value.Clear(); + if (this._tracker == null) + return; + this._tracker.Clear(); + } + + public void Load(Dictionary conditions) + { + foreach (KeyValuePair condition in conditions) + { + AchievementCondition achievementCondition; + if (this._conditions.TryGetValue(condition.Key, out achievementCondition)) + { + achievementCondition.Load(condition.Value); + if (achievementCondition.IsCompleted) + ++this._completedCount; + } + } + if (this._tracker == null) + return; + this._tracker.Load(); + } + + public void AddCondition(AchievementCondition condition) + { + this._conditions[condition.Name] = condition; + condition.OnComplete += new AchievementCondition.AchievementUpdate(this.OnConditionComplete); + } + + private void OnConditionComplete(AchievementCondition condition) + { + ++this._completedCount; + if (this._completedCount != this._conditions.Count) + return; + if (this._tracker == null && SocialAPI.Achievements != null) + SocialAPI.Achievements.CompleteAchievement(this.Name); + if (this.OnCompleted == null) + return; + this.OnCompleted(this); + } + + private void UseTracker(IAchievementTracker tracker) + { + tracker.ReportAs("STAT_" + this.Name); + this._tracker = tracker; + } + + public void UseTrackerFromCondition(string conditionName) => this.UseTracker(this.GetConditionTracker(conditionName)); + + public void UseConditionsCompletedTracker() + { + ConditionsCompletedTracker completedTracker = new ConditionsCompletedTracker(); + foreach (KeyValuePair condition in this._conditions) + completedTracker.AddCondition(condition.Value); + this.UseTracker((IAchievementTracker) completedTracker); + } + + public void UseConditionsCompletedTracker(params string[] conditions) + { + ConditionsCompletedTracker completedTracker = new ConditionsCompletedTracker(); + for (int index = 0; index < conditions.Length; ++index) + { + string condition = conditions[index]; + completedTracker.AddCondition(this._conditions[condition]); + } + this.UseTracker((IAchievementTracker) completedTracker); + } + + public void ClearTracker() => this._tracker = (IAchievementTracker) null; + + private IAchievementTracker GetConditionTracker(string name) => this._conditions[name].GetAchievementTracker(); + + public void AddConditions(params AchievementCondition[] conditions) + { + for (int index = 0; index < conditions.Length; ++index) + this.AddCondition(conditions[index]); + } + + public AchievementCondition GetCondition(string conditionName) + { + AchievementCondition achievementCondition; + return this._conditions.TryGetValue(conditionName, out achievementCondition) ? achievementCondition : (AchievementCondition) null; + } + + public void SetCategory(AchievementCategory category) => this._category = category; + + public delegate void AchievementCompleted(Achievement achievement); + } +} diff --git a/Achievements/AchievementCategory.cs b/Achievements/AchievementCategory.cs new file mode 100644 index 0000000..d0c301d --- /dev/null +++ b/Achievements/AchievementCategory.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Achievements.AchievementCategory +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Achievements +{ + public enum AchievementCategory + { + None = -1, // 0xFFFFFFFF + Slayer = 0, + Collector = 1, + Explorer = 2, + Challenger = 3, + } +} diff --git a/Achievements/AchievementCondition.cs b/Achievements/AchievementCondition.cs new file mode 100644 index 0000000..cb21725 --- /dev/null +++ b/Achievements/AchievementCondition.cs @@ -0,0 +1,51 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Achievements.AchievementCondition +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +namespace Terraria.Achievements +{ + [JsonObject] + public abstract class AchievementCondition + { + public readonly string Name; + protected IAchievementTracker _tracker; + [JsonProperty("Completed")] + private bool _isCompleted; + + public event AchievementCondition.AchievementUpdate OnComplete; + + public bool IsCompleted => this._isCompleted; + + protected AchievementCondition(string name) => this.Name = name; + + public virtual void Load(JObject state) => this._isCompleted = JToken.op_Explicit(state["Completed"]); + + public virtual void Clear() => this._isCompleted = false; + + public virtual void Complete() + { + if (this._isCompleted) + return; + this._isCompleted = true; + if (this.OnComplete == null) + return; + this.OnComplete(this); + } + + protected virtual IAchievementTracker CreateAchievementTracker() => (IAchievementTracker) null; + + public IAchievementTracker GetAchievementTracker() + { + if (this._tracker == null) + this._tracker = this.CreateAchievementTracker(); + return this._tracker; + } + + public delegate void AchievementUpdate(AchievementCondition condition); + } +} diff --git a/Achievements/AchievementManager.cs b/Achievements/AchievementManager.cs new file mode 100644 index 0000000..9156d2e --- /dev/null +++ b/Achievements/AchievementManager.cs @@ -0,0 +1,190 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Achievements.AchievementManager +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Newtonsoft.Json; +using Newtonsoft.Json.Bson; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using Terraria.Social; +using Terraria.UI; +using Terraria.Utilities; + +namespace Terraria.Achievements +{ + public class AchievementManager + { + private string _savePath; + private bool _isCloudSave; + private Dictionary _achievements = new Dictionary(); + private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings(); + private byte[] _cryptoKey; + private Dictionary _achievementIconIndexes = new Dictionary(); + private static object _ioLock = new object(); + + public event Achievement.AchievementCompleted OnAchievementCompleted; + + public AchievementManager() + { + if (SocialAPI.Achievements != null) + { + this._savePath = SocialAPI.Achievements.GetSavePath(); + this._isCloudSave = true; + this._cryptoKey = SocialAPI.Achievements.GetEncryptionKey(); + } + else + { + this._savePath = Main.SavePath + Path.DirectorySeparatorChar.ToString() + "achievements.dat"; + this._isCloudSave = false; + this._cryptoKey = Encoding.ASCII.GetBytes("RELOGIC-TERRARIA"); + } + } + + public void Save() => FileUtilities.ProtectedInvoke((Action) (() => this.Save(this._savePath, this._isCloudSave))); + + private void Save(string path, bool cloud) + { + lock (AchievementManager._ioLock) + { + if (SocialAPI.Achievements != null) + SocialAPI.Achievements.StoreStats(); + try + { + using (MemoryStream memoryStream = new MemoryStream()) + { + using (CryptoStream cryptoStream = new CryptoStream((Stream) memoryStream, new RijndaelManaged().CreateEncryptor(this._cryptoKey, this._cryptoKey), CryptoStreamMode.Write)) + { + using (BsonWriter bsonWriter = new BsonWriter((Stream) cryptoStream)) + { + JsonSerializer.Create(this._serializerSettings).Serialize((JsonWriter) bsonWriter, (object) this._achievements); + ((JsonWriter) bsonWriter).Flush(); + cryptoStream.FlushFinalBlock(); + FileUtilities.WriteAllBytes(path, memoryStream.ToArray(), cloud); + } + } + } + } + catch (Exception ex) + { + string savePath = this._savePath; + FancyErrorPrinter.ShowFileSavingFailError(ex, savePath); + } + } + } + + public List CreateAchievementsList() => this._achievements.Values.ToList(); + + public void Load() => this.Load(this._savePath, this._isCloudSave); + + private void Load(string path, bool cloud) + { + bool flag = false; + lock (AchievementManager._ioLock) + { + if (!FileUtilities.Exists(path, cloud)) + return; + byte[] buffer = FileUtilities.ReadAllBytes(path, cloud); + Dictionary dictionary = (Dictionary) null; + try + { + using (MemoryStream memoryStream = new MemoryStream(buffer)) + { + using (CryptoStream cryptoStream = new CryptoStream((Stream) memoryStream, new RijndaelManaged().CreateDecryptor(this._cryptoKey, this._cryptoKey), CryptoStreamMode.Read)) + { + using (BsonReader bsonReader = new BsonReader((Stream) cryptoStream)) + dictionary = JsonSerializer.Create(this._serializerSettings).Deserialize>((JsonReader) bsonReader); + } + } + } + catch (Exception ex) + { + FileUtilities.Delete(path, cloud); + return; + } + if (dictionary == null) + return; + foreach (KeyValuePair keyValuePair in dictionary) + { + if (this._achievements.ContainsKey(keyValuePair.Key)) + this._achievements[keyValuePair.Key].Load(keyValuePair.Value.Conditions); + } + if (SocialAPI.Achievements != null) + { + foreach (KeyValuePair achievement in this._achievements) + { + if (achievement.Value.IsCompleted && !SocialAPI.Achievements.IsAchievementCompleted(achievement.Key)) + { + flag = true; + achievement.Value.ClearProgress(); + } + } + } + } + if (!flag) + return; + this.Save(); + } + + public void ClearAll() + { + if (SocialAPI.Achievements != null) + return; + foreach (KeyValuePair achievement in this._achievements) + achievement.Value.ClearProgress(); + this.Save(); + } + + private void AchievementCompleted(Achievement achievement) + { + this.Save(); + if (this.OnAchievementCompleted == null) + return; + this.OnAchievementCompleted(achievement); + } + + public void Register(Achievement achievement) + { + this._achievements.Add(achievement.Name, achievement); + achievement.OnCompleted += new Achievement.AchievementCompleted(this.AchievementCompleted); + } + + public void RegisterIconIndex(string achievementName, int iconIndex) => this._achievementIconIndexes.Add(achievementName, iconIndex); + + public void RegisterAchievementCategory(string achievementName, AchievementCategory category) => this._achievements[achievementName].SetCategory(category); + + public Achievement GetAchievement(string achievementName) + { + Achievement achievement; + return this._achievements.TryGetValue(achievementName, out achievement) ? achievement : (Achievement) null; + } + + public T GetCondition(string achievementName, string conditionName) where T : AchievementCondition => this.GetCondition(achievementName, conditionName) as T; + + public AchievementCondition GetCondition( + string achievementName, + string conditionName) + { + Achievement achievement; + return this._achievements.TryGetValue(achievementName, out achievement) ? achievement.GetCondition(conditionName) : (AchievementCondition) null; + } + + public int GetIconIndex(string achievementName) + { + int num; + return this._achievementIconIndexes.TryGetValue(achievementName, out num) ? num : 0; + } + + private class StoredAchievement + { + [JsonProperty] + public Dictionary Conditions; + } + } +} diff --git a/Achievements/AchievementTracker`1.cs b/Achievements/AchievementTracker`1.cs new file mode 100644 index 0000000..590bd5e --- /dev/null +++ b/Achievements/AchievementTracker`1.cs @@ -0,0 +1,56 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Achievements.AchievementTracker`1 +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.Social; + +namespace Terraria.Achievements +{ + public abstract class AchievementTracker : IAchievementTracker + { + protected T _value; + protected T _maxValue; + protected string _name; + private TrackerType _type; + + public T Value => this._value; + + public T MaxValue => this._maxValue; + + protected AchievementTracker(TrackerType type) => this._type = type; + + void IAchievementTracker.ReportAs(string name) => this._name = name; + + TrackerType IAchievementTracker.GetTrackerType() => this._type; + + void IAchievementTracker.Clear() => this.SetValue(default (T)); + + public void SetValue(T newValue, bool reportUpdate = true) + { + if (newValue.Equals((object) this._value)) + return; + this._value = newValue; + if (!reportUpdate) + return; + this.ReportUpdate(); + if (!this._value.Equals((object) this._maxValue)) + return; + this.OnComplete(); + } + + public abstract void ReportUpdate(); + + protected abstract void Load(); + + void IAchievementTracker.Load() => this.Load(); + + protected void OnComplete() + { + if (SocialAPI.Achievements == null) + return; + SocialAPI.Achievements.StoreStats(); + } + } +} diff --git a/Achievements/ConditionFloatTracker.cs b/Achievements/ConditionFloatTracker.cs new file mode 100644 index 0000000..cf69890 --- /dev/null +++ b/Achievements/ConditionFloatTracker.cs @@ -0,0 +1,35 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Achievements.ConditionFloatTracker +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.Social; + +namespace Terraria.Achievements +{ + public class ConditionFloatTracker : AchievementTracker + { + public ConditionFloatTracker(float maxValue) + : base(TrackerType.Float) + { + this._maxValue = maxValue; + } + + public ConditionFloatTracker() + : base(TrackerType.Float) + { + } + + public override void ReportUpdate() + { + if (SocialAPI.Achievements == null || this._name == null) + return; + SocialAPI.Achievements.UpdateFloatStat(this._name, this._value); + } + + protected override void Load() + { + } + } +} diff --git a/Achievements/ConditionIntTracker.cs b/Achievements/ConditionIntTracker.cs new file mode 100644 index 0000000..da43bc2 --- /dev/null +++ b/Achievements/ConditionIntTracker.cs @@ -0,0 +1,35 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Achievements.ConditionIntTracker +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.Social; + +namespace Terraria.Achievements +{ + public class ConditionIntTracker : AchievementTracker + { + public ConditionIntTracker() + : base(TrackerType.Int) + { + } + + public ConditionIntTracker(int maxValue) + : base(TrackerType.Int) + { + this._maxValue = maxValue; + } + + public override void ReportUpdate() + { + if (SocialAPI.Achievements == null || this._name == null) + return; + SocialAPI.Achievements.UpdateIntStat(this._name, this._value); + } + + protected override void Load() + { + } + } +} diff --git a/Achievements/ConditionsCompletedTracker.cs b/Achievements/ConditionsCompletedTracker.cs new file mode 100644 index 0000000..5175e49 --- /dev/null +++ b/Achievements/ConditionsCompletedTracker.cs @@ -0,0 +1,34 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Achievements.ConditionsCompletedTracker +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; + +namespace Terraria.Achievements +{ + public class ConditionsCompletedTracker : ConditionIntTracker + { + private List _conditions = new List(); + + public void AddCondition(AchievementCondition condition) + { + ++this._maxValue; + condition.OnComplete += new AchievementCondition.AchievementUpdate(this.OnConditionCompleted); + this._conditions.Add(condition); + } + + private void OnConditionCompleted(AchievementCondition condition) => this.SetValue(Math.Min(this._value + 1, this._maxValue)); + + protected override void Load() + { + for (int index = 0; index < this._conditions.Count; ++index) + { + if (this._conditions[index].IsCompleted) + ++this._value; + } + } + } +} diff --git a/Achievements/IAchievementTracker.cs b/Achievements/IAchievementTracker.cs new file mode 100644 index 0000000..aa70c06 --- /dev/null +++ b/Achievements/IAchievementTracker.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Achievements.IAchievementTracker +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Achievements +{ + public interface IAchievementTracker + { + void ReportAs(string name); + + TrackerType GetTrackerType(); + + void Load(); + + void Clear(); + } +} diff --git a/Achievements/TrackerType.cs b/Achievements/TrackerType.cs new file mode 100644 index 0000000..23b10b7 --- /dev/null +++ b/Achievements/TrackerType.cs @@ -0,0 +1,14 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Achievements.TrackerType +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Achievements +{ + public enum TrackerType + { + Float, + Int, + } +} diff --git a/Animation.cs b/Animation.cs new file mode 100644 index 0000000..82c4281 --- /dev/null +++ b/Animation.cs @@ -0,0 +1,164 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Animation +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using Terraria.DataStructures; + +namespace Terraria +{ + public class Animation + { + private static List _animations; + private static Dictionary _temporaryAnimations; + private static List _awaitingRemoval; + private static List _awaitingAddition; + private bool _temporary; + private Point16 _coordinates; + private ushort _tileType; + private int _frame; + private int _frameMax; + private int _frameCounter; + private int _frameCounterMax; + private int[] _frameData; + + public static void Initialize() + { + Animation._animations = new List(); + Animation._temporaryAnimations = new Dictionary(); + Animation._awaitingRemoval = new List(); + Animation._awaitingAddition = new List(); + } + + private void SetDefaults(int type) + { + this._tileType = (ushort) 0; + this._frame = 0; + this._frameMax = 0; + this._frameCounter = 0; + this._frameCounterMax = 0; + this._temporary = false; + switch (type) + { + case 0: + this._frameMax = 5; + this._frameCounterMax = 12; + this._frameData = new int[this._frameMax]; + for (int index = 0; index < this._frameMax; ++index) + this._frameData[index] = index + 1; + break; + case 1: + this._frameMax = 5; + this._frameCounterMax = 12; + this._frameData = new int[this._frameMax]; + for (int index = 0; index < this._frameMax; ++index) + this._frameData[index] = 5 - index; + break; + case 2: + this._frameCounterMax = 6; + this._frameData = new int[5]{ 1, 2, 2, 2, 1 }; + this._frameMax = this._frameData.Length; + break; + case 3: + this._frameMax = 5; + this._frameCounterMax = 5; + this._frameData = new int[this._frameMax]; + for (int index = 0; index < this._frameMax; ++index) + this._frameData[index] = index; + break; + case 4: + this._frameMax = 3; + this._frameCounterMax = 5; + this._frameData = new int[this._frameMax]; + for (int index = 0; index < this._frameMax; ++index) + this._frameData[index] = 9 + index; + break; + } + } + + public static void NewTemporaryAnimation(int type, ushort tileType, int x, int y) + { + Point16 point16 = new Point16(x, y); + if (x < 0 || x >= Main.maxTilesX || y < 0 || y >= Main.maxTilesY) + return; + Animation animation = new Animation(); + animation.SetDefaults(type); + animation._tileType = tileType; + animation._coordinates = point16; + animation._temporary = true; + Animation._awaitingAddition.Add(animation); + if (Main.netMode != 2) + return; + NetMessage.SendTemporaryAnimation(-1, type, (int) tileType, x, y); + } + + private static void RemoveTemporaryAnimation(short x, short y) + { + Point16 key = new Point16(x, y); + if (!Animation._temporaryAnimations.ContainsKey(key)) + return; + Animation._awaitingRemoval.Add(key); + } + + public static void UpdateAll() + { + for (int index = 0; index < Animation._animations.Count; ++index) + Animation._animations[index].Update(); + if (Animation._awaitingAddition.Count > 0) + { + for (int index = 0; index < Animation._awaitingAddition.Count; ++index) + { + Animation animation = Animation._awaitingAddition[index]; + Animation._temporaryAnimations[animation._coordinates] = animation; + } + Animation._awaitingAddition.Clear(); + } + foreach (KeyValuePair temporaryAnimation in Animation._temporaryAnimations) + temporaryAnimation.Value.Update(); + if (Animation._awaitingRemoval.Count <= 0) + return; + for (int index = 0; index < Animation._awaitingRemoval.Count; ++index) + Animation._temporaryAnimations.Remove(Animation._awaitingRemoval[index]); + Animation._awaitingRemoval.Clear(); + } + + public void Update() + { + if (this._temporary) + { + Tile tile = Main.tile[(int) this._coordinates.X, (int) this._coordinates.Y]; + if (tile != null && (int) tile.type != (int) this._tileType) + { + Animation.RemoveTemporaryAnimation(this._coordinates.X, this._coordinates.Y); + return; + } + } + ++this._frameCounter; + if (this._frameCounter < this._frameCounterMax) + return; + this._frameCounter = 0; + ++this._frame; + if (this._frame < this._frameMax) + return; + this._frame = 0; + if (!this._temporary) + return; + Animation.RemoveTemporaryAnimation(this._coordinates.X, this._coordinates.Y); + } + + public static bool GetTemporaryFrame(int x, int y, out int frameData) + { + Point16 key = new Point16(x, y); + Animation animation; + if (!Animation._temporaryAnimations.TryGetValue(key, out animation)) + { + frameData = 0; + return false; + } + frameData = animation._frameData[animation._frame]; + return true; + } + } +} diff --git a/AssemblyInfo.cs b/AssemblyInfo.cs new file mode 100644 index 0000000..221eda4 --- /dev/null +++ b/AssemblyInfo.cs @@ -0,0 +1,17 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Security.Permissions; + +[assembly: Extension] +[assembly: AssemblyTitle("Terraria")] +[assembly: AssemblyProduct("Terraria")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyCompany("Re-Logic")] +[assembly: AssemblyCopyright("Copyright © 2020 Re-Logic")] +[assembly: AssemblyTrademark("")] +[assembly: ComVisible(false)] +[assembly: Guid("f571b16a-2c9b-44ab-b115-7c762c9e4e7e")] +[assembly: AssemblyFileVersion("1.4.0.5")] +[assembly: AssemblyVersion("1.4.0.5")] +[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] diff --git a/Audio/ActiveSound.cs b/Audio/ActiveSound.cs new file mode 100644 index 0000000..4dacab7 --- /dev/null +++ b/Audio/ActiveSound.cs @@ -0,0 +1,100 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Audio.ActiveSound +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Audio; + +namespace Terraria.Audio +{ + public class ActiveSound + { + public readonly bool IsGlobal; + public Vector2 Position; + public float Volume; + + public SoundEffectInstance Sound { get; private set; } + + public SoundStyle Style { get; private set; } + + public bool IsPlaying => this.Sound.State == SoundState.Playing; + + public ActiveSound(SoundStyle style, Vector2 position) + { + this.Position = position; + this.Volume = 1f; + this.IsGlobal = false; + this.Style = style; + this.Play(); + } + + public ActiveSound(SoundStyle style) + { + this.Position = Vector2.Zero; + this.Volume = 1f; + this.IsGlobal = true; + this.Style = style; + this.Play(); + } + + private void Play() + { + SoundEffectInstance instance = this.Style.GetRandomSound().CreateInstance(); + instance.Pitch += this.Style.GetRandomPitch(); + instance.Play(); + SoundInstanceGarbageCollector.Track(instance); + this.Sound = instance; + this.Update(); + } + + public void Stop() + { + if (this.Sound == null) + return; + this.Sound.Stop(); + } + + public void Pause() + { + if (this.Sound == null || this.Sound.State != SoundState.Playing) + return; + this.Sound.Pause(); + } + + public void Resume() + { + if (this.Sound == null || this.Sound.State != SoundState.Paused) + return; + this.Sound.Resume(); + } + + public void Update() + { + if (this.Sound == null) + return; + Vector2 vector2 = Main.screenPosition + new Vector2((float) (Main.screenWidth / 2), (float) (Main.screenHeight / 2)); + float num1 = 1f; + if (!this.IsGlobal) + { + this.Sound.Pan = MathHelper.Clamp((float) (((double) this.Position.X - (double) vector2.X) / ((double) Main.screenWidth * 0.5)), -1f, 1f); + num1 = (float) (1.0 - (double) Vector2.Distance(this.Position, vector2) / ((double) Main.screenWidth * 1.5)); + } + float num2 = num1 * (this.Style.Volume * this.Volume); + switch (this.Style.Type) + { + case SoundType.Sound: + num2 *= Main.soundVolume; + break; + case SoundType.Ambient: + num2 *= Main.ambientVolume; + break; + case SoundType.Music: + num2 *= Main.musicVolume; + break; + } + this.Sound.Volume = MathHelper.Clamp(num2, 0.0f, 1f); + } + } +} diff --git a/Audio/CustomSoundStyle.cs b/Audio/CustomSoundStyle.cs new file mode 100644 index 0000000..fec2035 --- /dev/null +++ b/Audio/CustomSoundStyle.cs @@ -0,0 +1,41 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Audio.CustomSoundStyle +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Audio; +using Terraria.Utilities; + +namespace Terraria.Audio +{ + public class CustomSoundStyle : SoundStyle + { + private static readonly UnifiedRandom Random = new UnifiedRandom(); + private readonly SoundEffect[] _soundEffects; + + public override bool IsTrackable => true; + + public CustomSoundStyle( + SoundEffect soundEffect, + SoundType type = SoundType.Sound, + float volume = 1f, + float pitchVariance = 0.0f) + : base(volume, pitchVariance, type) + { + this._soundEffects = new SoundEffect[1]{ soundEffect }; + } + + public CustomSoundStyle( + SoundEffect[] soundEffects, + SoundType type = SoundType.Sound, + float volume = 1f, + float pitchVariance = 0.0f) + : base(volume, pitchVariance, type) + { + this._soundEffects = soundEffects; + } + + public override SoundEffect GetRandomSound() => this._soundEffects[CustomSoundStyle.Random.Next(this._soundEffects.Length)]; + } +} diff --git a/Audio/LegacySoundPlayer.cs b/Audio/LegacySoundPlayer.cs new file mode 100644 index 0000000..e1175d9 --- /dev/null +++ b/Audio/LegacySoundPlayer.cs @@ -0,0 +1,996 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Audio.LegacySoundPlayer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Audio; +using ReLogic.Content; +using ReLogic.Utilities; +using System; +using System.IO; +using Terraria.ID; + +namespace Terraria.Audio +{ + public class LegacySoundPlayer + { + private Asset[] _soundDrip = new Asset[3]; + private SoundEffectInstance[] _soundInstanceDrip = new SoundEffectInstance[3]; + private Asset[] _soundLiquid = new Asset[2]; + private SoundEffectInstance[] _soundInstanceLiquid = new SoundEffectInstance[2]; + private Asset[] _soundMech = new Asset[1]; + private SoundEffectInstance[] _soundInstanceMech = new SoundEffectInstance[1]; + private Asset[] _soundDig = new Asset[3]; + private SoundEffectInstance[] _soundInstanceDig = new SoundEffectInstance[3]; + private Asset[] _soundThunder = new Asset[7]; + private SoundEffectInstance[] _soundInstanceThunder = new SoundEffectInstance[7]; + private Asset[] _soundResearch = new Asset[4]; + private SoundEffectInstance[] _soundInstanceResearch = new SoundEffectInstance[4]; + private Asset[] _soundTink = new Asset[3]; + private SoundEffectInstance[] _soundInstanceTink = new SoundEffectInstance[3]; + private Asset[] _soundCoin = new Asset[5]; + private SoundEffectInstance[] _soundInstanceCoin = new SoundEffectInstance[5]; + private Asset[] _soundPlayerHit = new Asset[3]; + private SoundEffectInstance[] _soundInstancePlayerHit = new SoundEffectInstance[3]; + private Asset[] _soundFemaleHit = new Asset[3]; + private SoundEffectInstance[] _soundInstanceFemaleHit = new SoundEffectInstance[3]; + private Asset _soundPlayerKilled; + private SoundEffectInstance _soundInstancePlayerKilled; + private Asset _soundGrass; + private SoundEffectInstance _soundInstanceGrass; + private Asset _soundGrab; + private SoundEffectInstance _soundInstanceGrab; + private Asset _soundPixie; + private SoundEffectInstance _soundInstancePixie; + private Asset[] _soundItem = new Asset[(int) SoundID.ItemSoundCount]; + private SoundEffectInstance[] _soundInstanceItem = new SoundEffectInstance[(int) SoundID.ItemSoundCount]; + private Asset[] _soundNpcHit = new Asset[58]; + private SoundEffectInstance[] _soundInstanceNpcHit = new SoundEffectInstance[58]; + private Asset[] _soundNpcKilled = new Asset[(int) SoundID.NPCDeathCount]; + private SoundEffectInstance[] _soundInstanceNpcKilled = new SoundEffectInstance[(int) SoundID.NPCDeathCount]; + private SoundEffectInstance _soundInstanceMoonlordCry; + private Asset _soundDoorOpen; + private SoundEffectInstance _soundInstanceDoorOpen; + private Asset _soundDoorClosed; + private SoundEffectInstance _soundInstanceDoorClosed; + private Asset _soundMenuOpen; + private SoundEffectInstance _soundInstanceMenuOpen; + private Asset _soundMenuClose; + private SoundEffectInstance _soundInstanceMenuClose; + private Asset _soundMenuTick; + private SoundEffectInstance _soundInstanceMenuTick; + private Asset _soundShatter; + private SoundEffectInstance _soundInstanceShatter; + private Asset _soundCamera; + private SoundEffectInstance _soundInstanceCamera; + private Asset[] _soundZombie = new Asset[118]; + private SoundEffectInstance[] _soundInstanceZombie = new SoundEffectInstance[118]; + private Asset[] _soundRoar = new Asset[3]; + private SoundEffectInstance[] _soundInstanceRoar = new SoundEffectInstance[3]; + private Asset[] _soundSplash = new Asset[2]; + private SoundEffectInstance[] _soundInstanceSplash = new SoundEffectInstance[2]; + private Asset _soundDoubleJump; + private SoundEffectInstance _soundInstanceDoubleJump; + private Asset _soundRun; + private SoundEffectInstance _soundInstanceRun; + private Asset _soundCoins; + private SoundEffectInstance _soundInstanceCoins; + private Asset _soundUnlock; + private SoundEffectInstance _soundInstanceUnlock; + private Asset _soundChat; + private SoundEffectInstance _soundInstanceChat; + private Asset _soundMaxMana; + private SoundEffectInstance _soundInstanceMaxMana; + private Asset _soundDrown; + private SoundEffectInstance _soundInstanceDrown; + private Asset[] _trackableSounds; + private SoundEffectInstance[] _trackableSoundInstances; + private readonly IServiceProvider _services; + + public LegacySoundPlayer(IServiceProvider services) + { + this._services = services; + this.LoadAll(); + } + + private void LoadAll() + { + this._soundMech[0] = this.Load("Sounds/Mech_0"); + this._soundGrab = this.Load("Sounds/Grab"); + this._soundPixie = this.Load("Sounds/Pixie"); + this._soundDig[0] = this.Load("Sounds/Dig_0"); + this._soundDig[1] = this.Load("Sounds/Dig_1"); + this._soundDig[2] = this.Load("Sounds/Dig_2"); + this._soundThunder[0] = this.Load("Sounds/Thunder_0"); + this._soundThunder[1] = this.Load("Sounds/Thunder_1"); + this._soundThunder[2] = this.Load("Sounds/Thunder_2"); + this._soundThunder[3] = this.Load("Sounds/Thunder_3"); + this._soundThunder[4] = this.Load("Sounds/Thunder_4"); + this._soundThunder[5] = this.Load("Sounds/Thunder_5"); + this._soundThunder[6] = this.Load("Sounds/Thunder_6"); + this._soundResearch[0] = this.Load("Sounds/Research_0"); + this._soundResearch[1] = this.Load("Sounds/Research_1"); + this._soundResearch[2] = this.Load("Sounds/Research_2"); + this._soundResearch[3] = this.Load("Sounds/Research_3"); + this._soundTink[0] = this.Load("Sounds/Tink_0"); + this._soundTink[1] = this.Load("Sounds/Tink_1"); + this._soundTink[2] = this.Load("Sounds/Tink_2"); + this._soundPlayerHit[0] = this.Load("Sounds/Player_Hit_0"); + this._soundPlayerHit[1] = this.Load("Sounds/Player_Hit_1"); + this._soundPlayerHit[2] = this.Load("Sounds/Player_Hit_2"); + this._soundFemaleHit[0] = this.Load("Sounds/Female_Hit_0"); + this._soundFemaleHit[1] = this.Load("Sounds/Female_Hit_1"); + this._soundFemaleHit[2] = this.Load("Sounds/Female_Hit_2"); + this._soundPlayerKilled = this.Load("Sounds/Player_Killed"); + this._soundChat = this.Load("Sounds/Chat"); + this._soundGrass = this.Load("Sounds/Grass"); + this._soundDoorOpen = this.Load("Sounds/Door_Opened"); + this._soundDoorClosed = this.Load("Sounds/Door_Closed"); + this._soundMenuTick = this.Load("Sounds/Menu_Tick"); + this._soundMenuOpen = this.Load("Sounds/Menu_Open"); + this._soundMenuClose = this.Load("Sounds/Menu_Close"); + this._soundShatter = this.Load("Sounds/Shatter"); + this._soundCamera = this.Load("Sounds/Camera"); + for (int index = 0; index < this._soundCoin.Length; ++index) + this._soundCoin[index] = this.Load("Sounds/Coin_" + (object) index); + for (int index = 0; index < this._soundDrip.Length; ++index) + this._soundDrip[index] = this.Load("Sounds/Drip_" + (object) index); + for (int index = 0; index < this._soundZombie.Length; ++index) + this._soundZombie[index] = this.Load("Sounds/Zombie_" + (object) index); + for (int index = 0; index < this._soundLiquid.Length; ++index) + this._soundLiquid[index] = this.Load("Sounds/Liquid_" + (object) index); + for (int index = 0; index < this._soundRoar.Length; ++index) + this._soundRoar[index] = this.Load("Sounds/Roar_" + (object) index); + this._soundSplash[0] = this.Load("Sounds/Splash_0"); + this._soundSplash[1] = this.Load("Sounds/Splash_1"); + this._soundDoubleJump = this.Load("Sounds/Double_Jump"); + this._soundRun = this.Load("Sounds/Run"); + this._soundCoins = this.Load("Sounds/Coins"); + this._soundUnlock = this.Load("Sounds/Unlock"); + this._soundMaxMana = this.Load("Sounds/MaxMana"); + this._soundDrown = this.Load("Sounds/Drown"); + for (int index = 1; index < this._soundItem.Length; ++index) + this._soundItem[index] = this.Load("Sounds/Item_" + (object) index); + for (int index = 1; index < this._soundNpcHit.Length; ++index) + this._soundNpcHit[index] = this.Load("Sounds/NPC_Hit_" + (object) index); + for (int index = 1; index < this._soundNpcKilled.Length; ++index) + this._soundNpcKilled[index] = this.Load("Sounds/NPC_Killed_" + (object) index); + this._trackableSounds = new Asset[SoundID.TrackableLegacySoundCount]; + this._trackableSoundInstances = new SoundEffectInstance[this._trackableSounds.Length]; + for (int id = 0; id < this._trackableSounds.Length; ++id) + this._trackableSounds[id] = this.Load("Sounds/Custom" + Path.DirectorySeparatorChar.ToString() + SoundID.GetTrackableLegacySoundPath(id)); + } + + public void CreateAllSoundInstances() + { + this._soundInstanceMech[0] = this._soundMech[0].Value.CreateInstance(); + this._soundInstanceGrab = this._soundGrab.Value.CreateInstance(); + this._soundInstancePixie = this._soundGrab.Value.CreateInstance(); + this._soundInstanceDig[0] = this._soundDig[0].Value.CreateInstance(); + this._soundInstanceDig[1] = this._soundDig[1].Value.CreateInstance(); + this._soundInstanceDig[2] = this._soundDig[2].Value.CreateInstance(); + this._soundInstanceTink[0] = this._soundTink[0].Value.CreateInstance(); + this._soundInstanceTink[1] = this._soundTink[1].Value.CreateInstance(); + this._soundInstanceTink[2] = this._soundTink[2].Value.CreateInstance(); + this._soundInstancePlayerHit[0] = this._soundPlayerHit[0].Value.CreateInstance(); + this._soundInstancePlayerHit[1] = this._soundPlayerHit[1].Value.CreateInstance(); + this._soundInstancePlayerHit[2] = this._soundPlayerHit[2].Value.CreateInstance(); + this._soundInstanceFemaleHit[0] = this._soundFemaleHit[0].Value.CreateInstance(); + this._soundInstanceFemaleHit[1] = this._soundFemaleHit[1].Value.CreateInstance(); + this._soundInstanceFemaleHit[2] = this._soundFemaleHit[2].Value.CreateInstance(); + this._soundInstancePlayerKilled = this._soundPlayerKilled.Value.CreateInstance(); + this._soundInstanceChat = this._soundChat.Value.CreateInstance(); + this._soundInstanceGrass = this._soundGrass.Value.CreateInstance(); + this._soundInstanceDoorOpen = this._soundDoorOpen.Value.CreateInstance(); + this._soundInstanceDoorClosed = this._soundDoorClosed.Value.CreateInstance(); + this._soundInstanceMenuTick = this._soundMenuTick.Value.CreateInstance(); + this._soundInstanceMenuOpen = this._soundMenuOpen.Value.CreateInstance(); + this._soundInstanceMenuClose = this._soundMenuClose.Value.CreateInstance(); + this._soundInstanceShatter = this._soundShatter.Value.CreateInstance(); + this._soundInstanceCamera = this._soundCamera.Value.CreateInstance(); + for (int index = 0; index < this._soundThunder.Length; ++index) + this._soundInstanceThunder[index] = this._soundThunder[index].Value.CreateInstance(); + for (int index = 0; index < this._soundResearch.Length; ++index) + this._soundInstanceResearch[index] = this._soundResearch[index].Value.CreateInstance(); + for (int index = 0; index < this._soundCoin.Length; ++index) + this._soundInstanceCoin[index] = this._soundCoin[index].Value.CreateInstance(); + for (int index = 0; index < this._soundDrip.Length; ++index) + this._soundInstanceDrip[index] = this._soundDrip[index].Value.CreateInstance(); + for (int index = 0; index < this._soundZombie.Length; ++index) + this._soundInstanceZombie[index] = this._soundZombie[index].Value.CreateInstance(); + for (int index = 0; index < this._soundLiquid.Length; ++index) + this._soundInstanceLiquid[index] = this._soundLiquid[index].Value.CreateInstance(); + for (int index = 0; index < this._soundRoar.Length; ++index) + this._soundInstanceRoar[index] = this._soundRoar[index].Value.CreateInstance(); + this._soundInstanceSplash[0] = this._soundRoar[0].Value.CreateInstance(); + this._soundInstanceSplash[1] = this._soundSplash[1].Value.CreateInstance(); + this._soundInstanceDoubleJump = this._soundRoar[0].Value.CreateInstance(); + this._soundInstanceRun = this._soundRun.Value.CreateInstance(); + this._soundInstanceCoins = this._soundCoins.Value.CreateInstance(); + this._soundInstanceUnlock = this._soundUnlock.Value.CreateInstance(); + this._soundInstanceMaxMana = this._soundMaxMana.Value.CreateInstance(); + this._soundInstanceDrown = this._soundDrown.Value.CreateInstance(); + for (int index = 1; index < this._soundItem.Length; ++index) + this._soundInstanceItem[index] = this._soundItem[index].Value.CreateInstance(); + for (int index = 1; index < this._soundNpcHit.Length; ++index) + this._soundInstanceNpcHit[index] = this._soundNpcHit[index].Value.CreateInstance(); + for (int index = 1; index < this._soundNpcKilled.Length; ++index) + this._soundInstanceNpcKilled[index] = this._soundNpcKilled[index].Value.CreateInstance(); + for (int index = 0; index < this._trackableSounds.Length; ++index) + this._trackableSoundInstances[index] = this._trackableSounds[index].Value.CreateInstance(); + this._soundInstanceMoonlordCry = this._soundNpcKilled[10].Value.CreateInstance(); + } + + private Asset Load(string assetName) => XnaExtensions.Get(this._services).Request(assetName, (AssetRequestMode) 2); + + public SoundEffectInstance PlaySound( + int type, + int x = -1, + int y = -1, + int Style = 1, + float volumeScale = 1f, + float pitchOffset = 0.0f) + { + int index1 = Style; + try + { + if (Main.dedServ || (double) Main.soundVolume == 0.0 && (type < 30 || type > 35)) + return (SoundEffectInstance) null; + bool flag = false; + float num1 = 1f; + float num2 = 0.0f; + if (x == -1 || y == -1) + { + flag = true; + } + else + { + if (WorldGen.gen || Main.netMode == 2) + return (SoundEffectInstance) null; + Vector2 vector2 = new Vector2(Main.screenPosition.X + (float) Main.screenWidth * 0.5f, Main.screenPosition.Y + (float) Main.screenHeight * 0.5f); + double num3 = (double) Math.Abs((float) x - vector2.X); + float num4 = Math.Abs((float) y - vector2.Y); + float num5 = (float) Math.Sqrt(num3 * num3 + (double) num4 * (double) num4); + int num6 = 2500; + if ((double) num5 < (double) num6) + { + flag = true; + num2 = type != 43 ? (float) (((double) x - (double) vector2.X) / ((double) Main.screenWidth * 0.5)) : (float) (((double) x - (double) vector2.X) / 900.0); + num1 = (float) (1.0 - (double) num5 / (double) num6); + } + } + if ((double) num2 < -1.0) + num2 = -1f; + if ((double) num2 > 1.0) + num2 = 1f; + if ((double) num1 > 1.0) + num1 = 1f; + if ((double) num1 <= 0.0 && (type < 34 || type > 35 || type > 39)) + return (SoundEffectInstance) null; + if (flag) + { + float num7; + if (type >= 30 && type <= 35 || type == 39) + { + num7 = num1 * (Main.ambientVolume * (Main.gameInactive ? 0.0f : 1f)); + if (Main.gameMenu) + num7 = 0.0f; + } + else + num7 = num1 * Main.soundVolume; + if ((double) num7 > 1.0) + num7 = 1f; + if ((double) num7 <= 0.0 && (type < 30 || type > 35) && type != 39) + return (SoundEffectInstance) null; + SoundEffectInstance sound = (SoundEffectInstance) null; + if (type == 0) + { + int index2 = Main.rand.Next(3); + if (this._soundInstanceDig[index2] != null) + this._soundInstanceDig[index2].Stop(); + this._soundInstanceDig[index2] = this._soundDig[index2].Value.CreateInstance(); + this._soundInstanceDig[index2].Volume = num7; + this._soundInstanceDig[index2].Pan = num2; + this._soundInstanceDig[index2].Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = this._soundInstanceDig[index2]; + } + else if (type == 43) + { + int index3 = Main.rand.Next(this._soundThunder.Length); + for (int index4 = 0; index4 < this._soundThunder.Length && this._soundInstanceThunder[index3] != null && this._soundInstanceThunder[index3].State == SoundState.Playing; ++index4) + index3 = Main.rand.Next(this._soundThunder.Length); + if (this._soundInstanceThunder[index3] != null) + this._soundInstanceThunder[index3].Stop(); + this._soundInstanceThunder[index3] = this._soundThunder[index3].Value.CreateInstance(); + this._soundInstanceThunder[index3].Volume = num7; + this._soundInstanceThunder[index3].Pan = num2; + this._soundInstanceThunder[index3].Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = this._soundInstanceThunder[index3]; + } + else if (type == 63) + { + int index5 = Main.rand.Next(1, 4); + if (this._soundInstanceResearch[index5] != null) + this._soundInstanceResearch[index5].Stop(); + this._soundInstanceResearch[index5] = this._soundResearch[index5].Value.CreateInstance(); + this._soundInstanceResearch[index5].Volume = num7; + this._soundInstanceResearch[index5].Pan = num2; + sound = this._soundInstanceResearch[index5]; + } + else if (type == 64) + { + if (this._soundInstanceResearch[0] != null) + this._soundInstanceResearch[0].Stop(); + this._soundInstanceResearch[0] = this._soundResearch[0].Value.CreateInstance(); + this._soundInstanceResearch[0].Volume = num7; + this._soundInstanceResearch[0].Pan = num2; + sound = this._soundInstanceResearch[0]; + } + else if (type == 1) + { + int index6 = Main.rand.Next(3); + if (this._soundInstancePlayerHit[index6] != null) + this._soundInstancePlayerHit[index6].Stop(); + this._soundInstancePlayerHit[index6] = this._soundPlayerHit[index6].Value.CreateInstance(); + this._soundInstancePlayerHit[index6].Volume = num7; + this._soundInstancePlayerHit[index6].Pan = num2; + sound = this._soundInstancePlayerHit[index6]; + } + else if (type == 2) + { + if (index1 == 129) + num7 *= 0.6f; + if (index1 == 123) + num7 *= 0.5f; + if (index1 == 124 || index1 == 125) + num7 *= 0.65f; + if (index1 == 116) + num7 *= 0.5f; + if (index1 == 1) + { + int num8 = Main.rand.Next(3); + if (num8 == 1) + index1 = 18; + if (num8 == 2) + index1 = 19; + } + else if (index1 == 55 || index1 == 53) + { + num7 *= 0.75f; + if (index1 == 55) + num7 *= 0.75f; + if (this._soundInstanceItem[index1] != null && this._soundInstanceItem[index1].State == SoundState.Playing) + return (SoundEffectInstance) null; + } + else if (index1 == 37) + num7 *= 0.5f; + else if (index1 == 52) + num7 *= 0.35f; + else if (index1 == 157) + num7 *= 0.7f; + else if (index1 == 158) + num7 *= 0.8f; + if (index1 == 159) + { + if (this._soundInstanceItem[index1] != null && this._soundInstanceItem[index1].State == SoundState.Playing) + return (SoundEffectInstance) null; + num7 *= 0.75f; + } + else if (index1 != 9 && index1 != 10 && index1 != 24 && index1 != 26 && index1 != 34 && index1 != 43 && index1 != 103 && index1 != 156 && index1 != 162 && this._soundInstanceItem[index1] != null) + this._soundInstanceItem[index1].Stop(); + this._soundInstanceItem[index1] = this._soundItem[index1].Value.CreateInstance(); + this._soundInstanceItem[index1].Volume = num7; + this._soundInstanceItem[index1].Pan = num2; + switch (index1) + { + case 53: + this._soundInstanceItem[index1].Pitch = (float) Main.rand.Next(-20, -11) * 0.02f; + break; + case 55: + this._soundInstanceItem[index1].Pitch = (float) -Main.rand.Next(-20, -11) * 0.02f; + break; + case 132: + this._soundInstanceItem[index1].Pitch = (float) Main.rand.Next(-20, 21) * (1f / 1000f); + break; + case 153: + this._soundInstanceItem[index1].Pitch = (float) Main.rand.Next(-50, 51) * (3f / 1000f); + break; + case 156: + this._soundInstanceItem[index1].Pitch = (float) Main.rand.Next(-50, 51) * (1f / 500f); + this._soundInstanceItem[index1].Volume *= 0.6f; + break; + default: + this._soundInstanceItem[index1].Pitch = (float) Main.rand.Next(-6, 7) * 0.01f; + break; + } + if (index1 == 26 || index1 == 35 || index1 == 47) + { + this._soundInstanceItem[index1].Volume = num7 * 0.75f; + this._soundInstanceItem[index1].Pitch = Main.musicPitch; + } + if (index1 == 169) + this._soundInstanceItem[index1].Pitch -= 0.8f; + sound = this._soundInstanceItem[index1]; + } + else if (type == 3) + { + if (index1 >= 20 && index1 <= 54) + num7 *= 0.5f; + if (index1 == 57 && this._soundInstanceNpcHit[index1] != null && this._soundInstanceNpcHit[index1].State == SoundState.Playing) + return (SoundEffectInstance) null; + if (index1 == 57) + num7 *= 0.6f; + if (index1 == 55 || index1 == 56) + num7 *= 0.5f; + if (this._soundInstanceNpcHit[index1] != null) + this._soundInstanceNpcHit[index1].Stop(); + this._soundInstanceNpcHit[index1] = this._soundNpcHit[index1].Value.CreateInstance(); + this._soundInstanceNpcHit[index1].Volume = num7; + this._soundInstanceNpcHit[index1].Pan = num2; + this._soundInstanceNpcHit[index1].Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = this._soundInstanceNpcHit[index1]; + } + else if (type == 4) + { + if (index1 >= 23 && index1 <= 57) + num7 *= 0.5f; + if (index1 == 61) + num7 *= 0.6f; + if (index1 == 62) + num7 *= 0.6f; + if (index1 == 10 && this._soundInstanceNpcKilled[index1] != null && this._soundInstanceNpcKilled[index1].State == SoundState.Playing) + return (SoundEffectInstance) null; + this._soundInstanceNpcKilled[index1] = this._soundNpcKilled[index1].Value.CreateInstance(); + this._soundInstanceNpcKilled[index1].Volume = num7; + this._soundInstanceNpcKilled[index1].Pan = num2; + this._soundInstanceNpcKilled[index1].Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = this._soundInstanceNpcKilled[index1]; + } + else if (type == 5) + { + if (this._soundInstancePlayerKilled != null) + this._soundInstancePlayerKilled.Stop(); + this._soundInstancePlayerKilled = this._soundPlayerKilled.Value.CreateInstance(); + this._soundInstancePlayerKilled.Volume = num7; + this._soundInstancePlayerKilled.Pan = num2; + sound = this._soundInstancePlayerKilled; + } + else if (type == 6) + { + if (this._soundInstanceGrass != null) + this._soundInstanceGrass.Stop(); + this._soundInstanceGrass = this._soundGrass.Value.CreateInstance(); + this._soundInstanceGrass.Volume = num7; + this._soundInstanceGrass.Pan = num2; + this._soundInstanceGrass.Pitch = (float) Main.rand.Next(-30, 31) * 0.01f; + sound = this._soundInstanceGrass; + } + else if (type == 7) + { + if (this._soundInstanceGrab != null) + this._soundInstanceGrab.Stop(); + this._soundInstanceGrab = this._soundGrab.Value.CreateInstance(); + this._soundInstanceGrab.Volume = num7; + this._soundInstanceGrab.Pan = num2; + this._soundInstanceGrab.Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = this._soundInstanceGrab; + } + else if (type == 8) + { + if (this._soundInstanceDoorOpen != null) + this._soundInstanceDoorOpen.Stop(); + this._soundInstanceDoorOpen = this._soundDoorOpen.Value.CreateInstance(); + this._soundInstanceDoorOpen.Volume = num7; + this._soundInstanceDoorOpen.Pan = num2; + this._soundInstanceDoorOpen.Pitch = (float) Main.rand.Next(-20, 21) * 0.01f; + sound = this._soundInstanceDoorOpen; + } + else if (type == 9) + { + if (this._soundInstanceDoorClosed != null) + this._soundInstanceDoorClosed.Stop(); + this._soundInstanceDoorClosed = this._soundDoorClosed.Value.CreateInstance(); + this._soundInstanceDoorClosed.Volume = num7; + this._soundInstanceDoorClosed.Pan = num2; + this._soundInstanceDoorClosed.Pitch = (float) Main.rand.Next(-20, 21) * 0.01f; + sound = this._soundInstanceDoorClosed; + } + else if (type == 10) + { + if (this._soundInstanceMenuOpen != null) + this._soundInstanceMenuOpen.Stop(); + this._soundInstanceMenuOpen = this._soundMenuOpen.Value.CreateInstance(); + this._soundInstanceMenuOpen.Volume = num7; + this._soundInstanceMenuOpen.Pan = num2; + sound = this._soundInstanceMenuOpen; + } + else if (type == 11) + { + if (this._soundInstanceMenuClose != null) + this._soundInstanceMenuClose.Stop(); + this._soundInstanceMenuClose = this._soundMenuClose.Value.CreateInstance(); + this._soundInstanceMenuClose.Volume = num7; + this._soundInstanceMenuClose.Pan = num2; + sound = this._soundInstanceMenuClose; + } + else if (type == 12) + { + if (Main.hasFocus) + { + if (this._soundInstanceMenuTick != null) + this._soundInstanceMenuTick.Stop(); + this._soundInstanceMenuTick = this._soundMenuTick.Value.CreateInstance(); + this._soundInstanceMenuTick.Volume = num7; + this._soundInstanceMenuTick.Pan = num2; + sound = this._soundInstanceMenuTick; + } + } + else if (type == 13) + { + if (this._soundInstanceShatter != null) + this._soundInstanceShatter.Stop(); + this._soundInstanceShatter = this._soundShatter.Value.CreateInstance(); + this._soundInstanceShatter.Volume = num7; + this._soundInstanceShatter.Pan = num2; + sound = this._soundInstanceShatter; + } + else if (type == 14) + { + switch (Style) + { + case 489: + case 586: + int index7 = Main.rand.Next(21, 24); + this._soundInstanceZombie[index7] = this._soundZombie[index7].Value.CreateInstance(); + this._soundInstanceZombie[index7].Volume = num7 * 0.4f; + this._soundInstanceZombie[index7].Pan = num2; + sound = this._soundInstanceZombie[index7]; + break; + case 542: + int index8 = 7; + this._soundInstanceZombie[index8] = this._soundZombie[index8].Value.CreateInstance(); + this._soundInstanceZombie[index8].Volume = num7 * 0.4f; + this._soundInstanceZombie[index8].Pan = num2; + sound = this._soundInstanceZombie[index8]; + break; + default: + int index9 = Main.rand.Next(3); + this._soundInstanceZombie[index9] = this._soundZombie[index9].Value.CreateInstance(); + this._soundInstanceZombie[index9].Volume = num7 * 0.4f; + this._soundInstanceZombie[index9].Pan = num2; + sound = this._soundInstanceZombie[index9]; + break; + } + } + else if (type == 15) + { + float num9 = 1f; + if (index1 == 4) + { + index1 = 1; + num9 = 0.25f; + } + if (this._soundInstanceRoar[index1] == null || this._soundInstanceRoar[index1].State == SoundState.Stopped) + { + this._soundInstanceRoar[index1] = this._soundRoar[index1].Value.CreateInstance(); + this._soundInstanceRoar[index1].Volume = num7 * num9; + this._soundInstanceRoar[index1].Pan = num2; + sound = this._soundInstanceRoar[index1]; + } + } + else if (type == 16) + { + if (this._soundInstanceDoubleJump != null) + this._soundInstanceDoubleJump.Stop(); + this._soundInstanceDoubleJump = this._soundDoubleJump.Value.CreateInstance(); + this._soundInstanceDoubleJump.Volume = num7; + this._soundInstanceDoubleJump.Pan = num2; + this._soundInstanceDoubleJump.Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = this._soundInstanceDoubleJump; + } + else if (type == 17) + { + if (this._soundInstanceRun != null) + this._soundInstanceRun.Stop(); + this._soundInstanceRun = this._soundRun.Value.CreateInstance(); + this._soundInstanceRun.Volume = num7; + this._soundInstanceRun.Pan = num2; + this._soundInstanceRun.Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = this._soundInstanceRun; + } + else if (type == 18) + { + this._soundInstanceCoins = this._soundCoins.Value.CreateInstance(); + this._soundInstanceCoins.Volume = num7; + this._soundInstanceCoins.Pan = num2; + sound = this._soundInstanceCoins; + } + else if (type == 19) + { + if (this._soundInstanceSplash[index1] == null || this._soundInstanceSplash[index1].State == SoundState.Stopped) + { + this._soundInstanceSplash[index1] = this._soundSplash[index1].Value.CreateInstance(); + this._soundInstanceSplash[index1].Volume = num7; + this._soundInstanceSplash[index1].Pan = num2; + this._soundInstanceSplash[index1].Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = this._soundInstanceSplash[index1]; + } + } + else if (type == 20) + { + int index10 = Main.rand.Next(3); + if (this._soundInstanceFemaleHit[index10] != null) + this._soundInstanceFemaleHit[index10].Stop(); + this._soundInstanceFemaleHit[index10] = this._soundFemaleHit[index10].Value.CreateInstance(); + this._soundInstanceFemaleHit[index10].Volume = num7; + this._soundInstanceFemaleHit[index10].Pan = num2; + sound = this._soundInstanceFemaleHit[index10]; + } + else if (type == 21) + { + int index11 = Main.rand.Next(3); + if (this._soundInstanceTink[index11] != null) + this._soundInstanceTink[index11].Stop(); + this._soundInstanceTink[index11] = this._soundTink[index11].Value.CreateInstance(); + this._soundInstanceTink[index11].Volume = num7; + this._soundInstanceTink[index11].Pan = num2; + sound = this._soundInstanceTink[index11]; + } + else if (type == 22) + { + if (this._soundInstanceUnlock != null) + this._soundInstanceUnlock.Stop(); + this._soundInstanceUnlock = this._soundUnlock.Value.CreateInstance(); + this._soundInstanceUnlock.Volume = num7; + this._soundInstanceUnlock.Pan = num2; + sound = this._soundInstanceUnlock; + } + else if (type == 23) + { + if (this._soundInstanceDrown != null) + this._soundInstanceDrown.Stop(); + this._soundInstanceDrown = this._soundDrown.Value.CreateInstance(); + this._soundInstanceDrown.Volume = num7; + this._soundInstanceDrown.Pan = num2; + sound = this._soundInstanceDrown; + } + else if (type == 24) + { + this._soundInstanceChat = this._soundChat.Value.CreateInstance(); + this._soundInstanceChat.Volume = num7; + this._soundInstanceChat.Pan = num2; + sound = this._soundInstanceChat; + } + else if (type == 25) + { + this._soundInstanceMaxMana = this._soundMaxMana.Value.CreateInstance(); + this._soundInstanceMaxMana.Volume = num7; + this._soundInstanceMaxMana.Pan = num2; + sound = this._soundInstanceMaxMana; + } + else if (type == 26) + { + int index12 = Main.rand.Next(3, 5); + this._soundInstanceZombie[index12] = this._soundZombie[index12].Value.CreateInstance(); + this._soundInstanceZombie[index12].Volume = num7 * 0.9f; + this._soundInstanceZombie[index12].Pan = num2; + this._soundInstanceZombie[index12].Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = this._soundInstanceZombie[index12]; + } + else if (type == 27) + { + if (this._soundInstancePixie != null && this._soundInstancePixie.State == SoundState.Playing) + { + this._soundInstancePixie.Volume = num7; + this._soundInstancePixie.Pan = num2; + this._soundInstancePixie.Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + return (SoundEffectInstance) null; + } + if (this._soundInstancePixie != null) + this._soundInstancePixie.Stop(); + this._soundInstancePixie = this._soundPixie.Value.CreateInstance(); + this._soundInstancePixie.Volume = num7; + this._soundInstancePixie.Pan = num2; + this._soundInstancePixie.Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = this._soundInstancePixie; + } + else if (type == 28) + { + if (this._soundInstanceMech[index1] != null && this._soundInstanceMech[index1].State == SoundState.Playing) + return (SoundEffectInstance) null; + this._soundInstanceMech[index1] = this._soundMech[index1].Value.CreateInstance(); + this._soundInstanceMech[index1].Volume = num7; + this._soundInstanceMech[index1].Pan = num2; + this._soundInstanceMech[index1].Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = this._soundInstanceMech[index1]; + } + else if (type == 29) + { + if (index1 >= 24 && index1 <= 87) + num7 *= 0.5f; + if (index1 >= 88 && index1 <= 91) + num7 *= 0.7f; + if (index1 >= 93 && index1 <= 99) + num7 *= 0.4f; + if (index1 == 92) + num7 *= 0.5f; + if (index1 == 103) + num7 *= 0.4f; + if (index1 == 104) + num7 *= 0.55f; + if (index1 == 100 || index1 == 101) + num7 *= 0.25f; + if (index1 == 102) + num7 *= 0.4f; + if (this._soundInstanceZombie[index1] != null && this._soundInstanceZombie[index1].State == SoundState.Playing) + return (SoundEffectInstance) null; + this._soundInstanceZombie[index1] = this._soundZombie[index1].Value.CreateInstance(); + this._soundInstanceZombie[index1].Volume = num7; + this._soundInstanceZombie[index1].Pan = num2; + this._soundInstanceZombie[index1].Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = this._soundInstanceZombie[index1]; + } + else if (type == 44) + { + int index13 = Main.rand.Next(106, 109); + this._soundInstanceZombie[index13] = this._soundZombie[index13].Value.CreateInstance(); + this._soundInstanceZombie[index13].Volume = num7 * 0.2f; + this._soundInstanceZombie[index13].Pan = num2; + this._soundInstanceZombie[index13].Pitch = (float) Main.rand.Next(-70, 1) * 0.01f; + sound = this._soundInstanceZombie[index13]; + } + else if (type == 45) + { + int index14 = 109; + if (this._soundInstanceZombie[index14] != null && this._soundInstanceZombie[index14].State == SoundState.Playing) + return (SoundEffectInstance) null; + this._soundInstanceZombie[index14] = this._soundZombie[index14].Value.CreateInstance(); + this._soundInstanceZombie[index14].Volume = num7 * 0.3f; + this._soundInstanceZombie[index14].Pan = num2; + this._soundInstanceZombie[index14].Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = this._soundInstanceZombie[index14]; + } + else if (type == 46) + { + if (this._soundInstanceZombie[110] != null && this._soundInstanceZombie[110].State == SoundState.Playing || this._soundInstanceZombie[111] != null && this._soundInstanceZombie[111].State == SoundState.Playing) + return (SoundEffectInstance) null; + int index15 = Main.rand.Next(110, 112); + if (Main.rand.Next(300) == 0) + index15 = Main.rand.Next(3) != 0 ? (Main.rand.Next(2) != 0 ? 112 : 113) : 114; + this._soundInstanceZombie[index15] = this._soundZombie[index15].Value.CreateInstance(); + this._soundInstanceZombie[index15].Volume = num7 * 0.9f; + this._soundInstanceZombie[index15].Pan = num2; + this._soundInstanceZombie[index15].Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = this._soundInstanceZombie[index15]; + } + else if (type == 45) + { + int index16 = 109; + this._soundInstanceZombie[index16] = this._soundZombie[index16].Value.CreateInstance(); + this._soundInstanceZombie[index16].Volume = num7 * 0.2f; + this._soundInstanceZombie[index16].Pan = num2; + this._soundInstanceZombie[index16].Pitch = (float) Main.rand.Next(-70, 1) * 0.01f; + sound = this._soundInstanceZombie[index16]; + } + else if (type == 30) + { + int index17 = Main.rand.Next(10, 12); + if (Main.rand.Next(300) == 0) + { + index17 = 12; + if (this._soundInstanceZombie[index17] != null && this._soundInstanceZombie[index17].State == SoundState.Playing) + return (SoundEffectInstance) null; + } + this._soundInstanceZombie[index17] = this._soundZombie[index17].Value.CreateInstance(); + this._soundInstanceZombie[index17].Volume = num7 * 0.75f; + this._soundInstanceZombie[index17].Pan = num2; + this._soundInstanceZombie[index17].Pitch = index17 == 12 ? (float) Main.rand.Next(-40, 21) * 0.01f : (float) Main.rand.Next(-70, 1) * 0.01f; + sound = this._soundInstanceZombie[index17]; + } + else if (type == 31) + { + int index18 = 13; + this._soundInstanceZombie[index18] = this._soundZombie[index18].Value.CreateInstance(); + this._soundInstanceZombie[index18].Volume = num7 * 0.35f; + this._soundInstanceZombie[index18].Pan = num2; + this._soundInstanceZombie[index18].Pitch = (float) Main.rand.Next(-40, 21) * 0.01f; + sound = this._soundInstanceZombie[index18]; + } + else if (type == 32) + { + if (this._soundInstanceZombie[index1] != null && this._soundInstanceZombie[index1].State == SoundState.Playing) + return (SoundEffectInstance) null; + this._soundInstanceZombie[index1] = this._soundZombie[index1].Value.CreateInstance(); + this._soundInstanceZombie[index1].Volume = num7 * 0.15f; + this._soundInstanceZombie[index1].Pan = num2; + this._soundInstanceZombie[index1].Pitch = (float) Main.rand.Next(-70, 26) * 0.01f; + sound = this._soundInstanceZombie[index1]; + } + else if (type == 33) + { + int index19 = 15; + if (this._soundInstanceZombie[index19] != null && this._soundInstanceZombie[index19].State == SoundState.Playing) + return (SoundEffectInstance) null; + this._soundInstanceZombie[index19] = this._soundZombie[index19].Value.CreateInstance(); + this._soundInstanceZombie[index19].Volume = num7 * 0.2f; + this._soundInstanceZombie[index19].Pan = num2; + this._soundInstanceZombie[index19].Pitch = (float) Main.rand.Next(-10, 31) * 0.01f; + sound = this._soundInstanceZombie[index19]; + } + else if (type >= 47 && type <= 52) + { + int index20 = 133 + type - 47; + for (int index21 = 133; index21 <= 138; ++index21) + { + if (this._soundInstanceItem[index21] != null && this._soundInstanceItem[index21].State == SoundState.Playing) + this._soundInstanceItem[index21].Stop(); + } + this._soundInstanceItem[index20] = this._soundItem[index20].Value.CreateInstance(); + this._soundInstanceItem[index20].Volume = num7 * 0.45f; + this._soundInstanceItem[index20].Pan = num2; + sound = this._soundInstanceItem[index20]; + } + else if (type >= 53 && type <= 62) + { + int index22 = 139 + type - 53; + if (this._soundInstanceItem[index22] != null && this._soundInstanceItem[index22].State == SoundState.Playing) + this._soundInstanceItem[index22].Stop(); + this._soundInstanceItem[index22] = this._soundItem[index22].Value.CreateInstance(); + this._soundInstanceItem[index22].Volume = num7 * 0.7f; + this._soundInstanceItem[index22].Pan = num2; + sound = this._soundInstanceItem[index22]; + } + else + { + switch (type) + { + case 34: + float num10 = (float) index1 / 50f; + if ((double) num10 > 1.0) + num10 = 1f; + float num11 = num7 * num10 * 0.2f; + if ((double) num11 <= 0.0 || x == -1 || y == -1) + { + if (this._soundInstanceLiquid[0] != null && this._soundInstanceLiquid[0].State == SoundState.Playing) + { + this._soundInstanceLiquid[0].Stop(); + break; + } + break; + } + if (this._soundInstanceLiquid[0] != null && this._soundInstanceLiquid[0].State == SoundState.Playing) + { + this._soundInstanceLiquid[0].Volume = num11; + this._soundInstanceLiquid[0].Pan = num2; + this._soundInstanceLiquid[0].Pitch = -0.2f; + break; + } + this._soundInstanceLiquid[0] = this._soundLiquid[0].Value.CreateInstance(); + this._soundInstanceLiquid[0].Volume = num11; + this._soundInstanceLiquid[0].Pan = num2; + sound = this._soundInstanceLiquid[0]; + break; + case 35: + float num12 = (float) index1 / 50f; + if ((double) num12 > 1.0) + num12 = 1f; + float num13 = num7 * num12 * 0.65f; + if ((double) num13 <= 0.0 || x == -1 || y == -1) + { + if (this._soundInstanceLiquid[1] != null && this._soundInstanceLiquid[1].State == SoundState.Playing) + { + this._soundInstanceLiquid[1].Stop(); + break; + } + break; + } + if (this._soundInstanceLiquid[1] != null && this._soundInstanceLiquid[1].State == SoundState.Playing) + { + this._soundInstanceLiquid[1].Volume = num13; + this._soundInstanceLiquid[1].Pan = num2; + this._soundInstanceLiquid[1].Pitch = -0.0f; + break; + } + this._soundInstanceLiquid[1] = this._soundLiquid[1].Value.CreateInstance(); + this._soundInstanceLiquid[1].Volume = num13; + this._soundInstanceLiquid[1].Pan = num2; + sound = this._soundInstanceLiquid[1]; + break; + case 36: + int index23 = Style; + if (Style == -1) + index23 = 0; + this._soundInstanceRoar[index23] = this._soundRoar[index23].Value.CreateInstance(); + this._soundInstanceRoar[index23].Volume = num7; + this._soundInstanceRoar[index23].Pan = num2; + if (Style == -1) + this._soundInstanceRoar[index23].Pitch += 0.6f; + sound = this._soundInstanceRoar[index23]; + break; + case 37: + int index24 = Main.rand.Next(57, 59); + float num14 = num7 * ((float) Style * 0.05f); + this._soundInstanceItem[index24] = this._soundItem[index24].Value.CreateInstance(); + this._soundInstanceItem[index24].Volume = num14; + this._soundInstanceItem[index24].Pan = num2; + this._soundInstanceItem[index24].Pitch = (float) Main.rand.Next(-40, 41) * 0.01f; + sound = this._soundInstanceItem[index24]; + break; + case 38: + int index25 = Main.rand.Next(5); + this._soundInstanceCoin[index25] = this._soundCoin[index25].Value.CreateInstance(); + this._soundInstanceCoin[index25].Volume = num7; + this._soundInstanceCoin[index25].Pan = num2; + this._soundInstanceCoin[index25].Pitch = (float) Main.rand.Next(-40, 41) * (1f / 500f); + sound = this._soundInstanceCoin[index25]; + break; + case 39: + int index26 = Style; + this._soundInstanceDrip[index26] = this._soundDrip[index26].Value.CreateInstance(); + this._soundInstanceDrip[index26].Volume = num7 * 0.5f; + this._soundInstanceDrip[index26].Pan = num2; + this._soundInstanceDrip[index26].Pitch = (float) Main.rand.Next(-30, 31) * 0.01f; + sound = this._soundInstanceDrip[index26]; + break; + case 40: + if (this._soundInstanceCamera != null) + this._soundInstanceCamera.Stop(); + this._soundInstanceCamera = this._soundCamera.Value.CreateInstance(); + this._soundInstanceCamera.Volume = num7; + this._soundInstanceCamera.Pan = num2; + sound = this._soundInstanceCamera; + break; + case 41: + this._soundInstanceMoonlordCry = this._soundNpcKilled[10].Value.CreateInstance(); + this._soundInstanceMoonlordCry.Volume = (float) (1.0 / (1.0 + (double) (new Vector2((float) x, (float) y) - Main.player[Main.myPlayer].position).Length())); + this._soundInstanceMoonlordCry.Pan = num2; + this._soundInstanceMoonlordCry.Pitch = (float) Main.rand.Next(-10, 11) * 0.01f; + sound = this._soundInstanceMoonlordCry; + break; + case 42: + sound = this._trackableSounds[index1].Value.CreateInstance(); + sound.Volume = num7; + sound.Pan = num2; + this._trackableSoundInstances[index1] = sound; + break; + case 65: + if (this._soundInstanceZombie[115] != null && this._soundInstanceZombie[115].State == SoundState.Playing || this._soundInstanceZombie[116] != null && this._soundInstanceZombie[116].State == SoundState.Playing || this._soundInstanceZombie[117] != null && this._soundInstanceZombie[117].State == SoundState.Playing) + return (SoundEffectInstance) null; + int index27 = Main.rand.Next(115, 118); + this._soundInstanceZombie[index27] = this._soundZombie[index27].Value.CreateInstance(); + this._soundInstanceZombie[index27].Volume = num7 * 0.5f; + this._soundInstanceZombie[index27].Pan = num2; + sound = this._soundInstanceZombie[index27]; + break; + } + } + if (sound != null) + { + sound.Pitch += pitchOffset; + sound.Volume *= volumeScale; + sound.Play(); + SoundInstanceGarbageCollector.Track(sound); + } + return sound; + } + } + catch + { + } + return (SoundEffectInstance) null; + } + + public SoundEffect GetTrackableSoundByStyleId(int id) => this._trackableSounds[id].Value; + + public void StopAmbientSounds() + { + for (int index = 0; index < this._soundInstanceLiquid.Length; ++index) + { + if (this._soundInstanceLiquid[index] != null) + this._soundInstanceLiquid[index].Stop(); + } + } + } +} diff --git a/Audio/LegacySoundStyle.cs b/Audio/LegacySoundStyle.cs new file mode 100644 index 0000000..e304625 --- /dev/null +++ b/Audio/LegacySoundStyle.cs @@ -0,0 +1,67 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Audio.LegacySoundStyle +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Audio; +using Terraria.Utilities; + +namespace Terraria.Audio +{ + public class LegacySoundStyle : SoundStyle + { + private static readonly UnifiedRandom Random = new UnifiedRandom(); + private readonly int _style; + public readonly int Variations; + public readonly int SoundId; + + public int Style => this.Variations != 1 ? LegacySoundStyle.Random.Next(this._style, this._style + this.Variations) : this._style; + + public override bool IsTrackable => this.SoundId == 42; + + public LegacySoundStyle(int soundId, int style, SoundType type = SoundType.Sound) + : base(type) + { + this._style = style; + this.Variations = 1; + this.SoundId = soundId; + } + + public LegacySoundStyle(int soundId, int style, int variations, SoundType type = SoundType.Sound) + : base(type) + { + this._style = style; + this.Variations = variations; + this.SoundId = soundId; + } + + private LegacySoundStyle( + int soundId, + int style, + int variations, + SoundType type, + float volume, + float pitchVariance) + : base(volume, pitchVariance, type) + { + this._style = style; + this.Variations = variations; + this.SoundId = soundId; + } + + public LegacySoundStyle WithVolume(float volume) => new LegacySoundStyle(this.SoundId, this._style, this.Variations, this.Type, volume, this.PitchVariance); + + public LegacySoundStyle WithPitchVariance(float pitchVariance) => new LegacySoundStyle(this.SoundId, this._style, this.Variations, this.Type, this.Volume, pitchVariance); + + public LegacySoundStyle AsMusic() => new LegacySoundStyle(this.SoundId, this._style, this.Variations, SoundType.Music, this.Volume, this.PitchVariance); + + public LegacySoundStyle AsAmbient() => new LegacySoundStyle(this.SoundId, this._style, this.Variations, SoundType.Ambient, this.Volume, this.PitchVariance); + + public LegacySoundStyle AsSound() => new LegacySoundStyle(this.SoundId, this._style, this.Variations, SoundType.Sound, this.Volume, this.PitchVariance); + + public bool Includes(int soundId, int style) => this.SoundId == soundId && style >= this._style && style < this._style + this.Variations; + + public override SoundEffect GetRandomSound() => this.IsTrackable ? SoundEngine.GetTrackableSoundByStyleId(this.Style) : (SoundEffect) null; + } +} diff --git a/Audio/SoundEngine.cs b/Audio/SoundEngine.cs new file mode 100644 index 0000000..77c0e8b --- /dev/null +++ b/Audio/SoundEngine.cs @@ -0,0 +1,287 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Audio.SoundEngine +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Audio; +using ReLogic.Utilities; +using System; +using System.IO; + +namespace Terraria.Audio +{ + public static class SoundEngine + { + private static LegacySoundPlayer _legacyPlayer; + private static SoundPlayer _player; + private static bool _areSoundsPaused; + + public static bool IsAudioSupported { get; private set; } + + public static void Initialize() => SoundEngine.IsAudioSupported = SoundEngine.TestAudioSupport(); + + public static void Load(IServiceProvider services) + { + if (!SoundEngine.IsAudioSupported) + return; + SoundEngine._legacyPlayer = new LegacySoundPlayer(services); + SoundEngine._player = new SoundPlayer(); + } + + public static void Update() + { + if (!SoundEngine.IsAudioSupported) + return; + SoundInstanceGarbageCollector.Update(); + bool flag = (!Main.hasFocus || Main.gamePaused) && Main.netMode == 0; + if (!SoundEngine._areSoundsPaused & flag) + SoundEngine._player.PauseAll(); + else if (SoundEngine._areSoundsPaused && !flag) + SoundEngine._player.ResumeAll(); + SoundEngine._areSoundsPaused = flag; + SoundEngine._player.Update(); + } + + public static void PlaySound(int type, Vector2 position, int style = 1) => SoundEngine.PlaySound(type, (int) position.X, (int) position.Y, style); + + public static SoundEffectInstance PlaySound( + LegacySoundStyle type, + Vector2 position) + { + return SoundEngine.PlaySound(type, (int) position.X, (int) position.Y); + } + + public static SoundEffectInstance PlaySound( + LegacySoundStyle type, + int x = -1, + int y = -1) + { + return type == null ? (SoundEffectInstance) null : SoundEngine.PlaySound(type.SoundId, x, y, type.Style, type.Volume, type.GetRandomPitch()); + } + + public static SoundEffectInstance PlaySound( + int type, + int x = -1, + int y = -1, + int Style = 1, + float volumeScale = 1f, + float pitchOffset = 0.0f) + { + return !SoundEngine.IsAudioSupported ? (SoundEffectInstance) null : SoundEngine._legacyPlayer.PlaySound(type, x, y, Style, volumeScale, pitchOffset); + } + + public static ActiveSound GetActiveSound(SlotId id) => !SoundEngine.IsAudioSupported ? (ActiveSound) null : SoundEngine._player.GetActiveSound(id); + + public static SlotId PlayTrackedSound(SoundStyle style, Vector2 position) => !SoundEngine.IsAudioSupported ? (SlotId) SlotId.Invalid : SoundEngine._player.Play(style, position); + + public static SlotId PlayTrackedSound(SoundStyle style) => !SoundEngine.IsAudioSupported ? (SlotId) SlotId.Invalid : SoundEngine._player.Play(style); + + public static void StopTrackedSounds() + { + if (!SoundEngine.IsAudioSupported) + return; + SoundEngine._player.StopAll(); + } + + public static SoundEffect GetTrackableSoundByStyleId(int id) => !SoundEngine.IsAudioSupported ? (SoundEffect) null : SoundEngine._legacyPlayer.GetTrackableSoundByStyleId(id); + + public static void StopAmbientSounds() + { + if (!SoundEngine.IsAudioSupported || SoundEngine._legacyPlayer == null) + return; + SoundEngine._legacyPlayer.StopAmbientSounds(); + } + + public static ActiveSound FindActiveSound(SoundStyle style) => !SoundEngine.IsAudioSupported ? (ActiveSound) null : SoundEngine._player.FindActiveSound(style); + + private static bool TestAudioSupport() + { + byte[] buffer = new byte[166] + { + (byte) 82, + (byte) 73, + (byte) 70, + (byte) 70, + (byte) 158, + (byte) 0, + (byte) 0, + (byte) 0, + (byte) 87, + (byte) 65, + (byte) 86, + (byte) 69, + (byte) 102, + (byte) 109, + (byte) 116, + (byte) 32, + (byte) 16, + (byte) 0, + (byte) 0, + (byte) 0, + (byte) 1, + (byte) 0, + (byte) 1, + (byte) 0, + (byte) 68, + (byte) 172, + (byte) 0, + (byte) 0, + (byte) 136, + (byte) 88, + (byte) 1, + (byte) 0, + (byte) 2, + (byte) 0, + (byte) 16, + (byte) 0, + (byte) 76, + (byte) 73, + (byte) 83, + (byte) 84, + (byte) 26, + (byte) 0, + (byte) 0, + (byte) 0, + (byte) 73, + (byte) 78, + (byte) 70, + (byte) 79, + (byte) 73, + (byte) 83, + (byte) 70, + (byte) 84, + (byte) 14, + (byte) 0, + (byte) 0, + (byte) 0, + (byte) 76, + (byte) 97, + (byte) 118, + (byte) 102, + (byte) 53, + (byte) 54, + (byte) 46, + (byte) 52, + (byte) 48, + (byte) 46, + (byte) 49, + (byte) 48, + (byte) 49, + (byte) 0, + (byte) 100, + (byte) 97, + (byte) 116, + (byte) 97, + (byte) 88, + (byte) 0, + (byte) 0, + (byte) 0, + (byte) 0, + (byte) 0, + (byte) 126, + (byte) 4, + (byte) 240, + (byte) 8, + (byte) 64, + (byte) 13, + (byte) 95, + (byte) 17, + (byte) 67, + (byte) 21, + (byte) 217, + (byte) 24, + (byte) 23, + (byte) 28, + (byte) 240, + (byte) 30, + (byte) 94, + (byte) 33, + (byte) 84, + (byte) 35, + (byte) 208, + (byte) 36, + (byte) 204, + (byte) 37, + (byte) 71, + (byte) 38, + (byte) 64, + (byte) 38, + (byte) 183, + (byte) 37, + (byte) 180, + (byte) 36, + (byte) 58, + (byte) 35, + (byte) 79, + (byte) 33, + (byte) 1, + (byte) 31, + (byte) 86, + (byte) 28, + (byte) 92, + (byte) 25, + (byte) 37, + (byte) 22, + (byte) 185, + (byte) 18, + (byte) 42, + (byte) 15, + (byte) 134, + (byte) 11, + (byte) 222, + (byte) 7, + (byte) 68, + (byte) 4, + (byte) 196, + (byte) 0, + (byte) 112, + (byte) 253, + (byte) 86, + (byte) 250, + (byte) 132, + (byte) 247, + (byte) 6, + (byte) 245, + (byte) 230, + (byte) 242, + (byte) 47, + (byte) 241, + (byte) 232, + (byte) 239, + (byte) 25, + (byte) 239, + (byte) 194, + (byte) 238, + (byte) 231, + (byte) 238, + (byte) 139, + (byte) 239, + (byte) 169, + (byte) 240, + (byte) 61, + (byte) 242, + (byte) 67, + (byte) 244, + (byte) 180, + (byte) 246 + }; + try + { + using (MemoryStream memoryStream = new MemoryStream(buffer)) + SoundEffect.FromStream((Stream) memoryStream); + } + catch (NoAudioHardwareException ex) + { + Console.WriteLine("No audio hardware found. Disabling all audio."); + return false; + } + catch + { + return false; + } + return true; + } + } +} diff --git a/Audio/SoundInstanceGarbageCollector.cs b/Audio/SoundInstanceGarbageCollector.cs new file mode 100644 index 0000000..92d0efe --- /dev/null +++ b/Audio/SoundInstanceGarbageCollector.cs @@ -0,0 +1,38 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Audio.SoundInstanceGarbageCollector +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Audio; +using System.Collections.Generic; + +namespace Terraria.Audio +{ + public static class SoundInstanceGarbageCollector + { + private static readonly List _activeSounds = new List(128); + + public static void Track(SoundEffectInstance sound) + { + } + + public static void Update() + { + for (int index = 0; index < SoundInstanceGarbageCollector._activeSounds.Count; ++index) + { + if (SoundInstanceGarbageCollector._activeSounds[index] == null) + { + SoundInstanceGarbageCollector._activeSounds.RemoveAt(index); + --index; + } + else if (SoundInstanceGarbageCollector._activeSounds[index].State == SoundState.Stopped) + { + SoundInstanceGarbageCollector._activeSounds[index].Dispose(); + SoundInstanceGarbageCollector._activeSounds.RemoveAt(index); + --index; + } + } + } + } +} diff --git a/Audio/SoundPlayer.cs b/Audio/SoundPlayer.cs new file mode 100644 index 0000000..0e79417 --- /dev/null +++ b/Audio/SoundPlayer.cs @@ -0,0 +1,74 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Audio.SoundPlayer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Utilities; +using System.Collections.Generic; + +namespace Terraria.Audio +{ + public class SoundPlayer + { + private readonly SlotVector _trackedSounds = new SlotVector(4096); + + public SlotId Play(SoundStyle style, Vector2 position) + { + if (Main.dedServ || style == null || !style.IsTrackable) + return (SlotId) SlotId.Invalid; + return (double) Vector2.DistanceSquared(Main.screenPosition + new Vector2((float) (Main.screenWidth / 2), (float) (Main.screenHeight / 2)), position) > 100000000.0 ? (SlotId) SlotId.Invalid : this._trackedSounds.Add(new ActiveSound(style, position)); + } + + public SlotId Play(SoundStyle style) => Main.dedServ || style == null || !style.IsTrackable ? (SlotId) SlotId.Invalid : this._trackedSounds.Add(new ActiveSound(style)); + + public ActiveSound GetActiveSound(SlotId id) => !this._trackedSounds.Has(id) ? (ActiveSound) null : this._trackedSounds[id]; + + public void PauseAll() + { + foreach (SlotVector.ItemPair trackedSound in (IEnumerable.ItemPair>) this._trackedSounds) + ((ActiveSound) trackedSound.Value).Pause(); + } + + public void ResumeAll() + { + foreach (SlotVector.ItemPair trackedSound in (IEnumerable.ItemPair>) this._trackedSounds) + ((ActiveSound) trackedSound.Value).Resume(); + } + + public void StopAll() + { + foreach (SlotVector.ItemPair trackedSound in (IEnumerable.ItemPair>) this._trackedSounds) + ((ActiveSound) trackedSound.Value).Stop(); + this._trackedSounds.Clear(); + } + + public void Update() + { + foreach (SlotVector.ItemPair trackedSound in (IEnumerable.ItemPair>) this._trackedSounds) + { + try + { + ((ActiveSound) trackedSound.Value).Update(); + if (!((ActiveSound) trackedSound.Value).IsPlaying) + this._trackedSounds.Remove((SlotId) trackedSound.Id); + } + catch + { + this._trackedSounds.Remove((SlotId) trackedSound.Id); + } + } + } + + public ActiveSound FindActiveSound(SoundStyle style) + { + foreach (SlotVector.ItemPair trackedSound in (IEnumerable.ItemPair>) this._trackedSounds) + { + if (((ActiveSound) trackedSound.Value).Style == style) + return (ActiveSound) trackedSound.Value; + } + return (ActiveSound) null; + } + } +} diff --git a/Audio/SoundStyle.cs b/Audio/SoundStyle.cs new file mode 100644 index 0000000..06e08ac --- /dev/null +++ b/Audio/SoundStyle.cs @@ -0,0 +1,45 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Audio.SoundStyle +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Audio; +using Terraria.Utilities; + +namespace Terraria.Audio +{ + public abstract class SoundStyle + { + private static UnifiedRandom _random = new UnifiedRandom(); + private float _volume; + private float _pitchVariance; + private SoundType _type; + + public float Volume => this._volume; + + public float PitchVariance => this._pitchVariance; + + public SoundType Type => this._type; + + public abstract bool IsTrackable { get; } + + public SoundStyle(float volume, float pitchVariance, SoundType type = SoundType.Sound) + { + this._volume = volume; + this._pitchVariance = pitchVariance; + this._type = type; + } + + public SoundStyle(SoundType type = SoundType.Sound) + { + this._volume = 1f; + this._pitchVariance = 0.0f; + this._type = type; + } + + public float GetRandomPitch() => (float) ((double) SoundStyle._random.NextFloat() * (double) this.PitchVariance - (double) this.PitchVariance * 0.5); + + public abstract SoundEffect GetRandomSound(); + } +} diff --git a/Audio/SoundType.cs b/Audio/SoundType.cs new file mode 100644 index 0000000..3b1107f --- /dev/null +++ b/Audio/SoundType.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Audio.SoundType +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Audio +{ + public enum SoundType + { + Sound, + Ambient, + Music, + } +} diff --git a/BitsByte.cs b/BitsByte.cs new file mode 100644 index 0000000..9d0b125 --- /dev/null +++ b/BitsByte.cs @@ -0,0 +1,150 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.BitsByte +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using System.IO; + +namespace Terraria +{ + public struct BitsByte + { + private static bool Null; + private byte value; + + public BitsByte(bool b1 = false, bool b2 = false, bool b3 = false, bool b4 = false, bool b5 = false, bool b6 = false, bool b7 = false, bool b8 = false) + { + this.value = (byte) 0; + this[0] = b1; + this[1] = b2; + this[2] = b3; + this[3] = b4; + this[4] = b5; + this[5] = b6; + this[6] = b7; + this[7] = b8; + } + + public void ClearAll() => this.value = (byte) 0; + + public void SetAll() => this.value = byte.MaxValue; + + public bool this[int key] + { + get => ((uint) this.value & (uint) (1 << key)) > 0U; + set + { + if (value) + this.value |= (byte) (1 << key); + else + this.value &= (byte) ~(1 << key); + } + } + + public void Retrieve(ref bool b0) => this.Retrieve(ref b0, ref BitsByte.Null, ref BitsByte.Null, ref BitsByte.Null, ref BitsByte.Null, ref BitsByte.Null, ref BitsByte.Null, ref BitsByte.Null); + + public void Retrieve(ref bool b0, ref bool b1) => this.Retrieve(ref b0, ref b1, ref BitsByte.Null, ref BitsByte.Null, ref BitsByte.Null, ref BitsByte.Null, ref BitsByte.Null, ref BitsByte.Null); + + public void Retrieve(ref bool b0, ref bool b1, ref bool b2) => this.Retrieve(ref b0, ref b1, ref b2, ref BitsByte.Null, ref BitsByte.Null, ref BitsByte.Null, ref BitsByte.Null, ref BitsByte.Null); + + public void Retrieve(ref bool b0, ref bool b1, ref bool b2, ref bool b3) => this.Retrieve(ref b0, ref b1, ref b2, ref b3, ref BitsByte.Null, ref BitsByte.Null, ref BitsByte.Null, ref BitsByte.Null); + + public void Retrieve(ref bool b0, ref bool b1, ref bool b2, ref bool b3, ref bool b4) => this.Retrieve(ref b0, ref b1, ref b2, ref b3, ref b4, ref BitsByte.Null, ref BitsByte.Null, ref BitsByte.Null); + + public void Retrieve( + ref bool b0, + ref bool b1, + ref bool b2, + ref bool b3, + ref bool b4, + ref bool b5) + { + this.Retrieve(ref b0, ref b1, ref b2, ref b3, ref b4, ref b5, ref BitsByte.Null, ref BitsByte.Null); + } + + public void Retrieve( + ref bool b0, + ref bool b1, + ref bool b2, + ref bool b3, + ref bool b4, + ref bool b5, + ref bool b6) + { + this.Retrieve(ref b0, ref b1, ref b2, ref b3, ref b4, ref b5, ref b6, ref BitsByte.Null); + } + + public void Retrieve( + ref bool b0, + ref bool b1, + ref bool b2, + ref bool b3, + ref bool b4, + ref bool b5, + ref bool b6, + ref bool b7) + { + b0 = this[0]; + b1 = this[1]; + b2 = this[2]; + b3 = this[3]; + b4 = this[4]; + b5 = this[5]; + b6 = this[6]; + b7 = this[7]; + } + + public static implicit operator byte(BitsByte bb) => bb.value; + + public static implicit operator BitsByte(byte b) => new BitsByte() + { + value = b + }; + + public static BitsByte[] ComposeBitsBytesChain(bool optimizeLength, params bool[] flags) + { + int length1 = flags.Length; + int length2 = 0; + for (; length1 > 0; length1 -= 7) + ++length2; + BitsByte[] array = new BitsByte[length2]; + int key = 0; + int index1 = 0; + for (int index2 = 0; index2 < flags.Length; ++index2) + { + array[index1][key] = flags[index2]; + ++key; + if (key == 7 && index1 < length2 - 1) + { + array[index1][key] = true; + key = 0; + ++index1; + } + } + if (optimizeLength) + { + int index3; + for (index3 = array.Length - 1; (byte) array[index3] == (byte) 0 && index3 > 0; --index3) + array[index3 - 1][7] = false; + Array.Resize(ref array, index3 + 1); + } + return array; + } + + public static BitsByte[] DecomposeBitsBytesChain(BinaryReader reader) + { + List bitsByteList = new List(); + BitsByte bitsByte; + do + { + bitsByte = (BitsByte) reader.ReadByte(); + bitsByteList.Add(bitsByte); + } + while (bitsByte[7]); + return bitsByteList.ToArray(); + } + } +} diff --git a/Chat/ChatCommandId.cs b/Chat/ChatCommandId.cs new file mode 100644 index 0000000..1cd4486 --- /dev/null +++ b/Chat/ChatCommandId.cs @@ -0,0 +1,32 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.ChatCommandId +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using ReLogic.Utilities; +using System.IO; +using System.Text; +using Terraria.Chat.Commands; + +namespace Terraria.Chat +{ + public struct ChatCommandId + { + private readonly string _name; + + private ChatCommandId(string name) => this._name = name; + + public static ChatCommandId FromType() where T : IChatCommand + { + ChatCommandAttribute cacheableAttribute = AttributeUtilities.GetCacheableAttribute(); + return cacheableAttribute != null ? new ChatCommandId(cacheableAttribute.Name) : new ChatCommandId((string) null); + } + + public void Serialize(BinaryWriter writer) => writer.Write(this._name ?? ""); + + public static ChatCommandId Deserialize(BinaryReader reader) => new ChatCommandId(reader.ReadString()); + + public int GetMaxSerializedSize() => 4 + Encoding.UTF8.GetByteCount(this._name ?? ""); + } +} diff --git a/Chat/ChatCommandProcessor.cs b/Chat/ChatCommandProcessor.cs new file mode 100644 index 0000000..049e881 --- /dev/null +++ b/Chat/ChatCommandProcessor.cs @@ -0,0 +1,107 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.ChatCommandProcessor +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using ReLogic.Utilities; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.Chat.Commands; +using Terraria.Localization; + +namespace Terraria.Chat +{ + public class ChatCommandProcessor : IChatProcessor + { + private readonly Dictionary _localizedCommands = new Dictionary(); + private readonly Dictionary _commands = new Dictionary(); + private readonly Dictionary _aliases = new Dictionary(); + private IChatCommand _defaultCommand; + + public ChatCommandProcessor AddCommand() where T : IChatCommand, new() + { + string commandKey = "ChatCommand." + AttributeUtilities.GetCacheableAttribute().Name; + ChatCommandId key1 = ChatCommandId.FromType(); + this._commands[key1] = (IChatCommand) new T(); + if (Language.Exists(commandKey)) + { + this._localizedCommands.Add(Language.GetText(commandKey), key1); + } + else + { + commandKey += "_"; + foreach (LocalizedText key2 in Language.FindAll((LanguageSearchFilter) ((key, text) => key.StartsWith(commandKey)))) + this._localizedCommands.Add(key2, key1); + } + return this; + } + + public void AddAlias(LocalizedText text, NetworkText result) => this._aliases[text] = result; + + public ChatCommandProcessor AddDefaultCommand() where T : IChatCommand, new() + { + this.AddCommand(); + this._defaultCommand = this._commands[ChatCommandId.FromType()]; + return this; + } + + private static bool HasLocalizedCommand(ChatMessage message, LocalizedText command) + { + string lower = message.Text.ToLower(); + string str = command.Value; + if (!lower.StartsWith(str)) + return false; + return lower.Length == str.Length || lower[str.Length] == ' '; + } + + private static string RemoveCommandPrefix(string messageText, LocalizedText command) + { + string str = command.Value; + return !messageText.StartsWith(str) || messageText.Length == str.Length || messageText[str.Length] != ' ' ? "" : messageText.Substring(str.Length + 1); + } + + public ChatMessage CreateOutgoingMessage(string text) + { + ChatMessage message = new ChatMessage(text); + KeyValuePair keyValuePair1 = this._localizedCommands.FirstOrDefault>((Func, bool>) (pair => ChatCommandProcessor.HasLocalizedCommand(message, pair.Key))); + ChatCommandId chatCommandId = keyValuePair1.Value; + if (keyValuePair1.Key != null) + { + message.SetCommand(chatCommandId); + message.Text = ChatCommandProcessor.RemoveCommandPrefix(message.Text, keyValuePair1.Key); + this._commands[chatCommandId].ProcessOutgoingMessage(message); + } + else + { + bool flag = false; + for (KeyValuePair keyValuePair2 = this._aliases.FirstOrDefault>((Func, bool>) (pair => ChatCommandProcessor.HasLocalizedCommand(message, pair.Key))); keyValuePair2.Key != null; keyValuePair2 = this._aliases.FirstOrDefault>((Func, bool>) (pair => ChatCommandProcessor.HasLocalizedCommand(message, pair.Key)))) + { + flag = true; + message = new ChatMessage(keyValuePair2.Value.ToString()); + } + if (flag) + return this.CreateOutgoingMessage(message.Text); + } + return message; + } + + public void ProcessIncomingMessage(ChatMessage message, int clientId) + { + IChatCommand chatCommand; + if (this._commands.TryGetValue(message.CommandId, out chatCommand)) + { + chatCommand.ProcessIncomingMessage(message.Text, (byte) clientId); + message.Consume(); + } + else + { + if (this._defaultCommand == null) + return; + this._defaultCommand.ProcessIncomingMessage(message.Text, (byte) clientId); + message.Consume(); + } + } + } +} diff --git a/Chat/ChatHelper.cs b/Chat/ChatHelper.cs new file mode 100644 index 0000000..736010a --- /dev/null +++ b/Chat/ChatHelper.cs @@ -0,0 +1,89 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.ChatHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.GameContent.NetModules; +using Terraria.GameContent.UI.Chat; +using Terraria.Localization; +using Terraria.Net; + +namespace Terraria.Chat +{ + public static class ChatHelper + { + private static List> _cachedMessages = new List>(); + + public static void DisplayMessageOnClient(NetworkText text, Color color, int playerId) => ChatHelper.DisplayMessage(text, color, byte.MaxValue); + + public static void SendChatMessageToClient(NetworkText text, Color color, int playerId) => ChatHelper.SendChatMessageToClientAs(byte.MaxValue, text, color, playerId); + + public static void SendChatMessageToClientAs( + byte messageAuthor, + NetworkText text, + Color color, + int playerId) + { + if (playerId != Main.myPlayer) + return; + ChatHelper.DisplayMessage(text, color, messageAuthor); + } + + public static void BroadcastChatMessage(NetworkText text, Color color, int excludedPlayer = -1) => ChatHelper.BroadcastChatMessageAs(byte.MaxValue, text, color, excludedPlayer); + + public static void BroadcastChatMessageAs( + byte messageAuthor, + NetworkText text, + Color color, + int excludedPlayer = -1) + { + if (excludedPlayer == Main.myPlayer) + return; + ChatHelper.DisplayMessage(text, color, messageAuthor); + } + + public static bool OnlySendToPlayersWhoAreLoggedIn(int clientIndex) => Netplay.Clients[clientIndex].State == 10; + + public static void SendChatMessageFromClient(ChatMessage message) + { + if (message.IsConsumed) + return; + NetPacket packet = NetTextModule.SerializeClientMessage(message); + NetManager.Instance.SendToServer(packet); + } + + public static void DisplayMessage(NetworkText text, Color color, byte messageAuthor) + { + string str = text.ToString(); + if (messageAuthor < byte.MaxValue) + { + Main.player[(int) messageAuthor].chatOverhead.NewMessage(str, Main.PlayerOverheadChatMessageDisplayTime); + Main.player[(int) messageAuthor].chatOverhead.color = color; + str = NameTagHandler.GenerateTag(Main.player[(int) messageAuthor].name) + " " + str; + } + if (ChatHelper.ShouldCacheMessage()) + ChatHelper.CacheMessage(str, color); + else + Main.NewTextMultiline(str, c: color); + } + + private static void CacheMessage(string message, Color color) => ChatHelper._cachedMessages.Add(new Tuple(message, color)); + + public static void ShowCachedMessages() + { + lock (ChatHelper._cachedMessages) + { + foreach (Tuple cachedMessage in ChatHelper._cachedMessages) + Main.NewTextMultiline(cachedMessage.Item1, c: cachedMessage.Item2); + } + } + + public static void ClearDelayedMessagesCache() => ChatHelper._cachedMessages.Clear(); + + private static bool ShouldCacheMessage() => Main.netMode == 1 && Main.gameMenu; + } +} diff --git a/Chat/ChatMessage.cs b/Chat/ChatMessage.cs new file mode 100644 index 0000000..4749f1f --- /dev/null +++ b/Chat/ChatMessage.cs @@ -0,0 +1,72 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.ChatMessage +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.IO; +using System.Text; +using Terraria.Chat.Commands; + +namespace Terraria.Chat +{ + public sealed class ChatMessage + { + public ChatCommandId CommandId { get; private set; } + + public string Text { get; set; } + + public bool IsConsumed { get; private set; } + + public ChatMessage(string message) + { + this.CommandId = ChatCommandId.FromType(); + this.Text = message; + this.IsConsumed = false; + } + + private ChatMessage(string message, ChatCommandId commandId) + { + this.CommandId = commandId; + this.Text = message; + } + + public void Serialize(BinaryWriter writer) + { + if (this.IsConsumed) + throw new InvalidOperationException("Message has already been consumed."); + this.CommandId.Serialize(writer); + writer.Write(this.Text); + } + + public int GetMaxSerializedSize() + { + if (this.IsConsumed) + throw new InvalidOperationException("Message has already been consumed."); + return 0 + this.CommandId.GetMaxSerializedSize() + (4 + Encoding.UTF8.GetByteCount(this.Text)); + } + + public static ChatMessage Deserialize(BinaryReader reader) + { + ChatCommandId commandId = ChatCommandId.Deserialize(reader); + return new ChatMessage(reader.ReadString(), commandId); + } + + public void SetCommand(ChatCommandId commandId) + { + if (this.IsConsumed) + throw new InvalidOperationException("Message has already been consumed."); + this.CommandId = commandId; + } + + public void SetCommand() where T : IChatCommand + { + if (this.IsConsumed) + throw new InvalidOperationException("Message has already been consumed."); + this.CommandId = ChatCommandId.FromType(); + } + + public void Consume() => this.IsConsumed = true; + } +} diff --git a/Chat/Commands/ChatCommandAttribute.cs b/Chat/Commands/ChatCommandAttribute.cs new file mode 100644 index 0000000..8836631 --- /dev/null +++ b/Chat/Commands/ChatCommandAttribute.cs @@ -0,0 +1,18 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.Commands.ChatCommandAttribute +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Terraria.Chat.Commands +{ + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, Inherited = false)] + public sealed class ChatCommandAttribute : Attribute + { + public readonly string Name; + + public ChatCommandAttribute(string name) => this.Name = name; + } +} diff --git a/Chat/Commands/EmojiCommand.cs b/Chat/Commands/EmojiCommand.cs new file mode 100644 index 0000000..c0f2aeb --- /dev/null +++ b/Chat/Commands/EmojiCommand.cs @@ -0,0 +1,73 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.Commands.EmojiCommand +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using Terraria.GameContent.UI; +using Terraria.Localization; + +namespace Terraria.Chat.Commands +{ + [ChatCommand("Emoji")] + public class EmojiCommand : IChatCommand + { + public const int PlayerEmojiDuration = 360; + private readonly Dictionary _byName = new Dictionary(); + + public EmojiCommand() => this.Initialize(); + + public void Initialize() + { + this._byName.Clear(); + for (int id = 0; id < 145; ++id) + { + LocalizedText emojiName = Lang.GetEmojiName(id); + if (emojiName != LocalizedText.Empty) + this._byName[emojiName] = id; + } + } + + public void ProcessIncomingMessage(string text, byte clientId) + { + } + + public void ProcessOutgoingMessage(ChatMessage message) + { + int result = -1; + if (int.TryParse(message.Text, out result)) + { + if (result < 0 || result >= 145) + return; + } + else + result = -1; + if (result == -1) + { + foreach (LocalizedText key in this._byName.Keys) + { + if (message.Text == key.Value) + { + result = this._byName[key]; + break; + } + } + } + if (result != -1) + { + if (Main.netMode == 0) + { + EmoteBubble.NewBubble(result, new WorldUIAnchor((Entity) Main.LocalPlayer), 360); + EmoteBubble.CheckForNPCsToReactToEmoteBubble(result, Main.LocalPlayer); + } + else + NetMessage.SendData(120, number: Main.myPlayer, number2: ((float) result)); + } + message.Consume(); + } + + public void PrintWarning(string text) => throw new Exception("This needs localized text!"); + } +} diff --git a/Chat/Commands/EmoteCommand.cs b/Chat/Commands/EmoteCommand.cs new file mode 100644 index 0000000..7cba4c1 --- /dev/null +++ b/Chat/Commands/EmoteCommand.cs @@ -0,0 +1,29 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.Commands.EmoteCommand +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.Localization; + +namespace Terraria.Chat.Commands +{ + [ChatCommand("Emote")] + public class EmoteCommand : IChatCommand + { + private static readonly Color RESPONSE_COLOR = new Color(200, 100, 0); + + public void ProcessIncomingMessage(string text, byte clientId) + { + if (!(text != "")) + return; + text = string.Format("*{0} {1}", (object) Main.player[(int) clientId].name, (object) text); + ChatHelper.BroadcastChatMessage(NetworkText.FromLiteral(text), EmoteCommand.RESPONSE_COLOR); + } + + public void ProcessOutgoingMessage(ChatMessage message) + { + } + } +} diff --git a/Chat/Commands/HelpCommand.cs b/Chat/Commands/HelpCommand.cs new file mode 100644 index 0000000..5677bc5 --- /dev/null +++ b/Chat/Commands/HelpCommand.cs @@ -0,0 +1,57 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.Commands.HelpCommand +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria.Localization; + +namespace Terraria.Chat.Commands +{ + [ChatCommand("Help")] + public class HelpCommand : IChatCommand + { + private static readonly Color RESPONSE_COLOR = new Color((int) byte.MaxValue, 240, 20); + + public void ProcessIncomingMessage(string text, byte clientId) => ChatHelper.SendChatMessageToClient(HelpCommand.ComposeMessage(HelpCommand.GetCommandAliasesByID()), HelpCommand.RESPONSE_COLOR, (int) clientId); + + private static Dictionary> GetCommandAliasesByID() + { + LocalizedText[] all = Language.FindAll(Lang.CreateDialogFilter("ChatCommand.", Lang.CreateDialogSubstitutionObject())); + Dictionary> dictionary = new Dictionary>(); + foreach (LocalizedText localizedText in all) + { + string key = localizedText.Key.Replace("ChatCommand.", ""); + int length = key.IndexOf('_'); + if (length != -1) + key = key.Substring(0, length); + List localizedTextList; + if (!dictionary.TryGetValue(key, out localizedTextList)) + { + localizedTextList = new List(); + dictionary[key] = localizedTextList; + } + localizedTextList.Add(localizedText); + } + return dictionary; + } + + private static NetworkText ComposeMessage( + Dictionary> aliases) + { + string text = ""; + for (int index = 0; index < aliases.Count; ++index) + text = text + "{" + (object) index + "}\n"; + List networkTextList = new List(); + foreach (KeyValuePair> alias in aliases) + networkTextList.Add(Language.GetText("ChatCommandDescription." + alias.Key).ToNetworkText()); + return NetworkText.FromFormattable(text, (object[]) networkTextList.ToArray()); + } + + public void ProcessOutgoingMessage(ChatMessage message) + { + } + } +} diff --git a/Chat/Commands/IChatCommand.cs b/Chat/Commands/IChatCommand.cs new file mode 100644 index 0000000..d0ee042 --- /dev/null +++ b/Chat/Commands/IChatCommand.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.Commands.IChatCommand +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Chat.Commands +{ + public interface IChatCommand + { + void ProcessIncomingMessage(string text, byte clientId); + + void ProcessOutgoingMessage(ChatMessage message); + } +} diff --git a/Chat/Commands/ListPlayersCommand.cs b/Chat/Commands/ListPlayersCommand.cs new file mode 100644 index 0000000..f792211 --- /dev/null +++ b/Chat/Commands/ListPlayersCommand.cs @@ -0,0 +1,26 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.Commands.ListPlayersCommand +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.Localization; + +namespace Terraria.Chat.Commands +{ + [ChatCommand("Playing")] + public class ListPlayersCommand : IChatCommand + { + private static readonly Color RESPONSE_COLOR = new Color((int) byte.MaxValue, 240, 20); + + public void ProcessIncomingMessage(string text, byte clientId) => ChatHelper.SendChatMessageToClient(NetworkText.FromLiteral(string.Join(", ", ((IEnumerable) Main.player).Where((Func) (player => player.active)).Select((Func) (player => player.name)))), ListPlayersCommand.RESPONSE_COLOR, (int) clientId); + + public void ProcessOutgoingMessage(ChatMessage message) + { + } + } +} diff --git a/Chat/Commands/PartyChatCommand.cs b/Chat/Commands/PartyChatCommand.cs new file mode 100644 index 0000000..b91b5e9 --- /dev/null +++ b/Chat/Commands/PartyChatCommand.cs @@ -0,0 +1,43 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.Commands.PartyChatCommand +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.Localization; + +namespace Terraria.Chat.Commands +{ + [ChatCommand("Party")] + public class PartyChatCommand : IChatCommand + { + private static readonly Color ERROR_COLOR = new Color((int) byte.MaxValue, 240, 20); + + public void ProcessIncomingMessage(string text, byte clientId) + { + int team = Main.player[(int) clientId].team; + Color color = Main.teamColor[team]; + if (team == 0) + { + this.SendNoTeamError(clientId); + } + else + { + if (text == "") + return; + for (int playerId = 0; playerId < (int) byte.MaxValue; ++playerId) + { + if (Main.player[playerId].team == team) + ChatHelper.SendChatMessageToClientAs(clientId, NetworkText.FromLiteral(text), color, playerId); + } + } + } + + public void ProcessOutgoingMessage(ChatMessage message) + { + } + + private void SendNoTeamError(byte clientId) => ChatHelper.SendChatMessageToClient(Lang.mp[10].ToNetworkText(), PartyChatCommand.ERROR_COLOR, (int) clientId); + } +} diff --git a/Chat/Commands/RockPaperScissorsCommand.cs b/Chat/Commands/RockPaperScissorsCommand.cs new file mode 100644 index 0000000..60037c6 --- /dev/null +++ b/Chat/Commands/RockPaperScissorsCommand.cs @@ -0,0 +1,31 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.Commands.RockPaperScissorsCommand +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.GameContent.UI; + +namespace Terraria.Chat.Commands +{ + [ChatCommand("RPS")] + public class RockPaperScissorsCommand : IChatCommand + { + public void ProcessIncomingMessage(string text, byte clientId) + { + } + + public void ProcessOutgoingMessage(ChatMessage message) + { + int num = Main.rand.NextFromList(37, 38, 36); + if (Main.netMode == 0) + { + EmoteBubble.NewBubble(num, new WorldUIAnchor((Entity) Main.LocalPlayer), 360); + EmoteBubble.CheckForNPCsToReactToEmoteBubble(num, Main.LocalPlayer); + } + else + NetMessage.SendData(120, number: Main.myPlayer, number2: ((float) num)); + message.Consume(); + } + } +} diff --git a/Chat/Commands/RollCommand.cs b/Chat/Commands/RollCommand.cs new file mode 100644 index 0000000..6194b60 --- /dev/null +++ b/Chat/Commands/RollCommand.cs @@ -0,0 +1,27 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.Commands.RollCommand +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.Localization; + +namespace Terraria.Chat.Commands +{ + [ChatCommand("Roll")] + public class RollCommand : IChatCommand + { + private static readonly Color RESPONSE_COLOR = new Color((int) byte.MaxValue, 240, 20); + + public void ProcessIncomingMessage(string text, byte clientId) + { + int num = Main.rand.Next(1, 101); + ChatHelper.BroadcastChatMessage(NetworkText.FromFormattable("*{0} {1} {2}", (object) Main.player[(int) clientId].name, (object) Lang.mp[9].ToNetworkText(), (object) num), RollCommand.RESPONSE_COLOR); + } + + public void ProcessOutgoingMessage(ChatMessage message) + { + } + } +} diff --git a/Chat/Commands/SayChatCommand.cs b/Chat/Commands/SayChatCommand.cs new file mode 100644 index 0000000..d3045b5 --- /dev/null +++ b/Chat/Commands/SayChatCommand.cs @@ -0,0 +1,20 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.Commands.SayChatCommand +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.Localization; + +namespace Terraria.Chat.Commands +{ + [ChatCommand("Say")] + public class SayChatCommand : IChatCommand + { + public void ProcessIncomingMessage(string text, byte clientId) => ChatHelper.BroadcastChatMessageAs(clientId, NetworkText.FromLiteral(text), Main.player[(int) clientId].ChatColor()); + + public void ProcessOutgoingMessage(ChatMessage message) + { + } + } +} diff --git a/Chat/IChatProcessor.cs b/Chat/IChatProcessor.cs new file mode 100644 index 0000000..bf57a92 --- /dev/null +++ b/Chat/IChatProcessor.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chat.IChatProcessor +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Chat +{ + public interface IChatProcessor + { + void ProcessIncomingMessage(ChatMessage message, int clientId); + + ChatMessage CreateOutgoingMessage(string text); + } +} diff --git a/Chest.cs b/Chest.cs new file mode 100644 index 0000000..4fbe190 --- /dev/null +++ b/Chest.cs @@ -0,0 +1,3033 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Chest +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.GameContent.Achievements; +using Terraria.GameContent.Bestiary; +using Terraria.GameContent.Events; +using Terraria.ID; +using Terraria.ObjectData; + +namespace Terraria +{ + public class Chest + { + public const float chestStackRange = 250f; + public const int maxChestTypes = 52; + public static int[] chestTypeToIcon = new int[52]; + public static int[] chestItemSpawn = new int[52]; + public const int maxChestTypes2 = 14; + public static int[] chestTypeToIcon2 = new int[14]; + public static int[] chestItemSpawn2 = new int[14]; + public const int maxDresserTypes = 40; + public static int[] dresserTypeToIcon = new int[40]; + public static int[] dresserItemSpawn = new int[40]; + public const int maxItems = 40; + public const int MaxNameLength = 20; + public Item[] item; + public int x; + public int y; + public bool bankChest; + public string name; + public int frameCounter; + public int frame; + private static HashSet _chestInUse = new HashSet(); + + public Chest(bool bank = false) + { + this.item = new Item[40]; + this.bankChest = bank; + this.name = string.Empty; + } + + public override string ToString() + { + int num = 0; + for (int index = 0; index < this.item.Length; ++index) + { + if (this.item[index].stack > 0) + ++num; + } + return string.Format("{{X: {0}, Y: {1}, Count: {2}}}", (object) this.x, (object) this.y, (object) num); + } + + public static void Initialize() + { + int[] chestItemSpawn = Chest.chestItemSpawn; + int[] chestTypeToIcon = Chest.chestTypeToIcon; + chestTypeToIcon[0] = chestItemSpawn[0] = 48; + chestTypeToIcon[1] = chestItemSpawn[1] = 306; + chestTypeToIcon[2] = 327; + chestItemSpawn[2] = 306; + chestTypeToIcon[3] = chestItemSpawn[3] = 328; + chestTypeToIcon[4] = 329; + chestItemSpawn[4] = 328; + chestTypeToIcon[5] = chestItemSpawn[5] = 343; + chestTypeToIcon[6] = chestItemSpawn[6] = 348; + chestTypeToIcon[7] = chestItemSpawn[7] = 625; + chestTypeToIcon[8] = chestItemSpawn[8] = 626; + chestTypeToIcon[9] = chestItemSpawn[9] = 627; + chestTypeToIcon[10] = chestItemSpawn[10] = 680; + chestTypeToIcon[11] = chestItemSpawn[11] = 681; + chestTypeToIcon[12] = chestItemSpawn[12] = 831; + chestTypeToIcon[13] = chestItemSpawn[13] = 838; + chestTypeToIcon[14] = chestItemSpawn[14] = 914; + chestTypeToIcon[15] = chestItemSpawn[15] = 952; + chestTypeToIcon[16] = chestItemSpawn[16] = 1142; + chestTypeToIcon[17] = chestItemSpawn[17] = 1298; + chestTypeToIcon[18] = chestItemSpawn[18] = 1528; + chestTypeToIcon[19] = chestItemSpawn[19] = 1529; + chestTypeToIcon[20] = chestItemSpawn[20] = 1530; + chestTypeToIcon[21] = chestItemSpawn[21] = 1531; + chestTypeToIcon[22] = chestItemSpawn[22] = 1532; + chestTypeToIcon[23] = 1533; + chestItemSpawn[23] = 1528; + chestTypeToIcon[24] = 1534; + chestItemSpawn[24] = 1529; + chestTypeToIcon[25] = 1535; + chestItemSpawn[25] = 1530; + chestTypeToIcon[26] = 1536; + chestItemSpawn[26] = 1531; + chestTypeToIcon[27] = 1537; + chestItemSpawn[27] = 1532; + chestTypeToIcon[28] = chestItemSpawn[28] = 2230; + chestTypeToIcon[29] = chestItemSpawn[29] = 2249; + chestTypeToIcon[30] = chestItemSpawn[30] = 2250; + chestTypeToIcon[31] = chestItemSpawn[31] = 2526; + chestTypeToIcon[32] = chestItemSpawn[32] = 2544; + chestTypeToIcon[33] = chestItemSpawn[33] = 2559; + chestTypeToIcon[34] = chestItemSpawn[34] = 2574; + chestTypeToIcon[35] = chestItemSpawn[35] = 2612; + chestTypeToIcon[36] = 327; + chestItemSpawn[36] = 2612; + chestTypeToIcon[37] = chestItemSpawn[37] = 2613; + chestTypeToIcon[38] = 327; + chestItemSpawn[38] = 2613; + chestTypeToIcon[39] = chestItemSpawn[39] = 2614; + chestTypeToIcon[40] = 327; + chestItemSpawn[40] = 2614; + chestTypeToIcon[41] = chestItemSpawn[41] = 2615; + chestTypeToIcon[42] = chestItemSpawn[42] = 2616; + chestTypeToIcon[43] = chestItemSpawn[43] = 2617; + chestTypeToIcon[44] = chestItemSpawn[44] = 2618; + chestTypeToIcon[45] = chestItemSpawn[45] = 2619; + chestTypeToIcon[46] = chestItemSpawn[46] = 2620; + chestTypeToIcon[47] = chestItemSpawn[47] = 2748; + chestTypeToIcon[48] = chestItemSpawn[48] = 2814; + chestTypeToIcon[49] = chestItemSpawn[49] = 3180; + chestTypeToIcon[50] = chestItemSpawn[50] = 3125; + chestTypeToIcon[51] = chestItemSpawn[51] = 3181; + int[] chestItemSpawn2 = Chest.chestItemSpawn2; + int[] chestTypeToIcon2 = Chest.chestTypeToIcon2; + chestTypeToIcon2[0] = chestItemSpawn2[0] = 3884; + chestTypeToIcon2[1] = chestItemSpawn2[1] = 3885; + chestTypeToIcon2[2] = chestItemSpawn2[2] = 3939; + chestTypeToIcon2[3] = chestItemSpawn2[3] = 3965; + chestTypeToIcon2[4] = chestItemSpawn2[4] = 3988; + chestTypeToIcon2[5] = chestItemSpawn2[5] = 4153; + chestTypeToIcon2[6] = chestItemSpawn2[6] = 4174; + chestTypeToIcon2[7] = chestItemSpawn2[7] = 4195; + chestTypeToIcon2[8] = chestItemSpawn2[8] = 4216; + chestTypeToIcon2[9] = chestItemSpawn2[9] = 4265; + chestTypeToIcon2[10] = chestItemSpawn2[10] = 4267; + chestTypeToIcon2[11] = chestItemSpawn2[11] = 4574; + chestTypeToIcon2[12] = chestItemSpawn2[12] = 4712; + chestTypeToIcon2[13] = 4714; + chestItemSpawn2[13] = 4712; + Chest.dresserTypeToIcon[0] = Chest.dresserItemSpawn[0] = 334; + Chest.dresserTypeToIcon[1] = Chest.dresserItemSpawn[1] = 647; + Chest.dresserTypeToIcon[2] = Chest.dresserItemSpawn[2] = 648; + Chest.dresserTypeToIcon[3] = Chest.dresserItemSpawn[3] = 649; + Chest.dresserTypeToIcon[4] = Chest.dresserItemSpawn[4] = 918; + Chest.dresserTypeToIcon[5] = Chest.dresserItemSpawn[5] = 2386; + Chest.dresserTypeToIcon[6] = Chest.dresserItemSpawn[6] = 2387; + Chest.dresserTypeToIcon[7] = Chest.dresserItemSpawn[7] = 2388; + Chest.dresserTypeToIcon[8] = Chest.dresserItemSpawn[8] = 2389; + Chest.dresserTypeToIcon[9] = Chest.dresserItemSpawn[9] = 2390; + Chest.dresserTypeToIcon[10] = Chest.dresserItemSpawn[10] = 2391; + Chest.dresserTypeToIcon[11] = Chest.dresserItemSpawn[11] = 2392; + Chest.dresserTypeToIcon[12] = Chest.dresserItemSpawn[12] = 2393; + Chest.dresserTypeToIcon[13] = Chest.dresserItemSpawn[13] = 2394; + Chest.dresserTypeToIcon[14] = Chest.dresserItemSpawn[14] = 2395; + Chest.dresserTypeToIcon[15] = Chest.dresserItemSpawn[15] = 2396; + Chest.dresserTypeToIcon[16] = Chest.dresserItemSpawn[16] = 2529; + Chest.dresserTypeToIcon[17] = Chest.dresserItemSpawn[17] = 2545; + Chest.dresserTypeToIcon[18] = Chest.dresserItemSpawn[18] = 2562; + Chest.dresserTypeToIcon[19] = Chest.dresserItemSpawn[19] = 2577; + Chest.dresserTypeToIcon[20] = Chest.dresserItemSpawn[20] = 2637; + Chest.dresserTypeToIcon[21] = Chest.dresserItemSpawn[21] = 2638; + Chest.dresserTypeToIcon[22] = Chest.dresserItemSpawn[22] = 2639; + Chest.dresserTypeToIcon[23] = Chest.dresserItemSpawn[23] = 2640; + Chest.dresserTypeToIcon[24] = Chest.dresserItemSpawn[24] = 2816; + Chest.dresserTypeToIcon[25] = Chest.dresserItemSpawn[25] = 3132; + Chest.dresserTypeToIcon[26] = Chest.dresserItemSpawn[26] = 3134; + Chest.dresserTypeToIcon[27] = Chest.dresserItemSpawn[27] = 3133; + Chest.dresserTypeToIcon[28] = Chest.dresserItemSpawn[28] = 3911; + Chest.dresserTypeToIcon[29] = Chest.dresserItemSpawn[29] = 3912; + Chest.dresserTypeToIcon[30] = Chest.dresserItemSpawn[30] = 3913; + Chest.dresserTypeToIcon[31] = Chest.dresserItemSpawn[31] = 3914; + Chest.dresserTypeToIcon[32] = Chest.dresserItemSpawn[32] = 3934; + Chest.dresserTypeToIcon[33] = Chest.dresserItemSpawn[33] = 3968; + Chest.dresserTypeToIcon[34] = Chest.dresserItemSpawn[34] = 4148; + Chest.dresserTypeToIcon[35] = Chest.dresserItemSpawn[35] = 4169; + Chest.dresserTypeToIcon[36] = Chest.dresserItemSpawn[36] = 4190; + Chest.dresserTypeToIcon[37] = Chest.dresserItemSpawn[37] = 4211; + Chest.dresserTypeToIcon[38] = Chest.dresserItemSpawn[38] = 4301; + Chest.dresserTypeToIcon[39] = Chest.dresserItemSpawn[39] = 4569; + } + + private static bool IsPlayerInChest(int i) + { + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].chest == i) + return true; + } + return false; + } + + public static List GetCurrentlyOpenChests() + { + List intList = new List(); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].chest > -1) + intList.Add(Main.player[index].chest); + } + return intList; + } + + public static bool IsLocked(int x, int y) => Chest.IsLocked(Main.tile[x, y]); + + public static bool IsLocked(Tile t) + { + if (t == null || t.type == (ushort) 21 && (t.frameX >= (short) 72 && t.frameX <= (short) 106 || t.frameX >= (short) 144 && t.frameX <= (short) 178 || t.frameX >= (short) 828 && t.frameX <= (short) 1006 || t.frameX >= (short) 1296 && t.frameX <= (short) 1330 || t.frameX >= (short) 1368 && t.frameX <= (short) 1402 || t.frameX >= (short) 1440 && t.frameX <= (short) 1474)) + return true; + return t.type == (ushort) 467 && (int) t.frameX / 36 == 13; + } + + public static void ServerPlaceItem(int plr, int slot) + { + Main.player[plr].inventory[slot] = Chest.PutItemInNearbyChest(Main.player[plr].inventory[slot], Main.player[plr].Center); + NetMessage.SendData(5, number: plr, number2: ((float) slot), number3: ((float) Main.player[plr].inventory[slot].prefix)); + } + + public static Item PutItemInNearbyChest(Item item, Vector2 position) + { + if (Main.netMode == 1) + return item; + for (int i = 0; i < 8000; ++i) + { + bool flag1 = false; + bool flag2 = false; + if (Main.chest[i] != null && !Chest.IsPlayerInChest(i) && !Chest.IsLocked(Main.chest[i].x, Main.chest[i].y) && (double) (new Vector2((float) (Main.chest[i].x * 16 + 16), (float) (Main.chest[i].y * 16 + 16)) - position).Length() < 250.0) + { + for (int index = 0; index < Main.chest[i].item.Length; ++index) + { + if (Main.chest[i].item[index].type > 0 && Main.chest[i].item[index].stack > 0) + { + if (item.IsTheSameAs(Main.chest[i].item[index])) + { + flag1 = true; + int num = Main.chest[i].item[index].maxStack - Main.chest[i].item[index].stack; + if (num > 0) + { + if (num > item.stack) + num = item.stack; + item.stack -= num; + Main.chest[i].item[index].stack += num; + if (item.stack <= 0) + { + item.SetDefaults(); + return item; + } + } + } + } + else + flag2 = true; + } + if (flag1 & flag2 && item.stack > 0) + { + for (int index = 0; index < Main.chest[i].item.Length; ++index) + { + if (Main.chest[i].item[index].type == 0 || Main.chest[i].item[index].stack == 0) + { + Main.chest[i].item[index] = item.Clone(); + item.SetDefaults(); + return item; + } + } + } + } + } + return item; + } + + public object Clone() => this.MemberwiseClone(); + + public static bool Unlock(int X, int Y) + { + if (Main.tile[X, Y] == null || Main.tile[X + 1, Y] == null || Main.tile[X, Y + 1] == null || Main.tile[X + 1, Y + 1] == null) + return false; + short num1 = 0; + int Type = 0; + Tile tileSafely1 = Framing.GetTileSafely(X, Y); + int type = (int) tileSafely1.type; + int num2 = (int) tileSafely1.frameX / 36; + switch (type) + { + case 21: + switch (num2) + { + case 2: + num1 = (short) 36; + Type = 11; + AchievementsHelper.NotifyProgressionEvent(19); + break; + case 4: + num1 = (short) 36; + Type = 11; + break; + case 23: + case 24: + case 25: + case 26: + case 27: + if (!NPC.downedPlantBoss) + return false; + num1 = (short) 180; + Type = 11; + AchievementsHelper.NotifyProgressionEvent(20); + break; + case 36: + case 38: + case 40: + num1 = (short) 36; + Type = 11; + break; + default: + return false; + } + break; + case 467: + if (num2 != 13 || !NPC.downedPlantBoss) + return false; + num1 = (short) 36; + Type = 11; + AchievementsHelper.NotifyProgressionEvent(20); + break; + } + SoundEngine.PlaySound(22, X * 16, Y * 16); + for (int i = X; i <= X + 1; ++i) + { + for (int j = Y; j <= Y + 1; ++j) + { + Tile tileSafely2 = Framing.GetTileSafely(i, j); + if ((int) tileSafely2.type == type) + { + tileSafely2.frameX -= num1; + Main.tile[i, j] = tileSafely2; + for (int index = 0; index < 4; ++index) + Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, Type); + } + } + } + return true; + } + + public static int UsingChest(int i) + { + if (Main.chest[i] != null) + { + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && Main.player[index].chest == i) + return index; + } + } + return -1; + } + + public static int FindChest(int X, int Y) + { + for (int index = 0; index < 8000; ++index) + { + if (Main.chest[index] != null && Main.chest[index].x == X && Main.chest[index].y == Y) + return index; + } + return -1; + } + + public static int FindChestByGuessing(int X, int Y) + { + for (int index = 0; index < 8000; ++index) + { + if (Main.chest[index] != null && Main.chest[index].x >= X && Main.chest[index].x < X + 2 && Main.chest[index].y >= Y && Main.chest[index].y < Y + 2) + return index; + } + return -1; + } + + public static int FindEmptyChest( + int x, + int y, + int type = 21, + int style = 0, + int direction = 1, + int alternate = 0) + { + int num = -1; + for (int index = 0; index < 8000; ++index) + { + Chest chest = Main.chest[index]; + if (chest != null) + { + if (chest.x == x && chest.y == y) + return -1; + } + else if (num == -1) + num = index; + } + return num; + } + + public static bool NearOtherChests(int x, int y) + { + for (int i = x - 25; i < x + 25; ++i) + { + for (int j = y - 8; j < y + 8; ++j) + { + Tile tileSafely = Framing.GetTileSafely(i, j); + if (tileSafely.active() && TileID.Sets.BasicChest[(int) tileSafely.type]) + return true; + } + } + return false; + } + + public static int AfterPlacement_Hook( + int x, + int y, + int type = 21, + int style = 0, + int direction = 1, + int alternate = 0) + { + Point16 baseCoords = new Point16(x, y); + TileObjectData.OriginToTopLeft(type, style, ref baseCoords); + int emptyChest = Chest.FindEmptyChest((int) baseCoords.X, (int) baseCoords.Y); + if (emptyChest == -1) + return -1; + if (Main.netMode != 1) + { + Chest chest = new Chest(); + chest.x = (int) baseCoords.X; + chest.y = (int) baseCoords.Y; + for (int index = 0; index < 40; ++index) + chest.item[index] = new Item(); + Main.chest[emptyChest] = chest; + } + else + { + switch (type) + { + case 21: + NetMessage.SendData(34, number2: ((float) x), number3: ((float) y), number4: ((float) style)); + break; + case 467: + NetMessage.SendData(34, number: 4, number2: ((float) x), number3: ((float) y), number4: ((float) style)); + break; + default: + NetMessage.SendData(34, number: 2, number2: ((float) x), number3: ((float) y), number4: ((float) style)); + break; + } + } + return emptyChest; + } + + public static int CreateChest(int X, int Y, int id = -1) + { + int index1 = id; + if (index1 == -1) + { + index1 = Chest.FindEmptyChest(X, Y); + if (index1 == -1) + return -1; + if (Main.netMode == 1) + return index1; + } + Main.chest[index1] = new Chest(); + Main.chest[index1].x = X; + Main.chest[index1].y = Y; + for (int index2 = 0; index2 < 40; ++index2) + Main.chest[index1].item[index2] = new Item(); + return index1; + } + + public static bool CanDestroyChest(int X, int Y) + { + for (int index1 = 0; index1 < 8000; ++index1) + { + Chest chest = Main.chest[index1]; + if (chest != null && chest.x == X && chest.y == Y) + { + for (int index2 = 0; index2 < 40; ++index2) + { + if (chest.item[index2] != null && chest.item[index2].type > 0 && chest.item[index2].stack > 0) + return false; + } + return true; + } + } + return true; + } + + public static bool DestroyChest(int X, int Y) + { + for (int index1 = 0; index1 < 8000; ++index1) + { + Chest chest = Main.chest[index1]; + if (chest != null && chest.x == X && chest.y == Y) + { + for (int index2 = 0; index2 < 40; ++index2) + { + if (chest.item[index2] != null && chest.item[index2].type > 0 && chest.item[index2].stack > 0) + return false; + } + Main.chest[index1] = (Chest) null; + if (Main.player[Main.myPlayer].chest == index1) + Main.player[Main.myPlayer].chest = -1; + Recipe.FindRecipes(); + return true; + } + } + return true; + } + + public static void DestroyChestDirect(int X, int Y, int id) + { + if (id < 0) + return; + if (id >= Main.chest.Length) + return; + try + { + Chest chest = Main.chest[id]; + if (chest == null || chest.x != X || chest.y != Y) + return; + Main.chest[id] = (Chest) null; + if (Main.player[Main.myPlayer].chest == id) + Main.player[Main.myPlayer].chest = -1; + Recipe.FindRecipes(); + } + catch + { + } + } + + public void AddItemToShop(Item newItem) + { + int num1 = Main.shopSellbackHelper.Remove(newItem); + if (num1 >= newItem.stack) + return; + for (int index = 0; index < 39; ++index) + { + if (this.item[index] == null || this.item[index].type == 0) + { + this.item[index] = newItem.Clone(); + this.item[index].favorited = false; + this.item[index].buyOnce = true; + this.item[index].stack -= num1; + int num2 = this.item[index].value; + break; + } + } + } + + public static void SetupTravelShop() + { + for (int index = 0; index < 40; ++index) + Main.travelShop[index] = 0; + Player player1 = (Player) null; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + Player player2 = Main.player[index]; + if (player2.active && (player1 == null || (double) player1.luck < (double) player2.luck)) + player1 = player2; + } + if (player1 == null) + player1 = new Player(); + int num1 = Main.rand.Next(4, 7); + if (player1.RollLuck(4) == 0) + ++num1; + if (player1.RollLuck(8) == 0) + ++num1; + if (player1.RollLuck(16) == 0) + ++num1; + if (player1.RollLuck(32) == 0) + ++num1; + if (Main.expertMode && player1.RollLuck(2) == 0) + ++num1; + int index1 = 0; + int num2 = 0; + int[] numArray = new int[6] + { + 100, + 200, + 300, + 400, + 500, + 600 + }; + while (num2 < num1) + { + int num3 = 0; + if (player1.RollLuck(numArray[4]) == 0) + num3 = 3309; + if (player1.RollLuck(numArray[3]) == 0) + num3 = 3314; + if (player1.RollLuck(numArray[5]) == 0) + num3 = 1987; + if (player1.RollLuck(numArray[4]) == 0 && Main.hardMode) + num3 = 2270; + if (player1.RollLuck(numArray[4]) == 0 && Main.hardMode) + num3 = 4760; + if (player1.RollLuck(numArray[4]) == 0) + num3 = 2278; + if (player1.RollLuck(numArray[4]) == 0) + num3 = 2271; + if (player1.RollLuck(numArray[4]) == 0 && Main.hardMode && NPC.downedMechBossAny) + num3 = 4060; + if (player1.RollLuck(numArray[4]) == 0 && (NPC.downedBoss1 || NPC.downedBoss2 || NPC.downedBoss3 || NPC.downedQueenBee || Main.hardMode)) + { + num3 = 4347; + if (Main.hardMode) + num3 = 4348; + } + if (player1.RollLuck(numArray[3]) == 0 && Main.hardMode && NPC.downedPlantBoss) + num3 = 2223; + if (player1.RollLuck(numArray[3]) == 0) + num3 = 2272; + if (player1.RollLuck(numArray[3]) == 0) + num3 = 2219; + if (player1.RollLuck(numArray[3]) == 0) + num3 = 2276; + if (player1.RollLuck(numArray[3]) == 0) + num3 = 2284; + if (player1.RollLuck(numArray[3]) == 0) + num3 = 2285; + if (player1.RollLuck(numArray[3]) == 0) + num3 = 2286; + if (player1.RollLuck(numArray[3]) == 0) + num3 = 2287; + if (player1.RollLuck(numArray[3]) == 0) + num3 = 4744; + if (player1.RollLuck(numArray[3]) == 0) + num3 = 2296; + if (player1.RollLuck(numArray[3]) == 0) + num3 = 3628; + if (player1.RollLuck(numArray[3]) == 0 && Main.hardMode) + num3 = 4091; + if (player1.RollLuck(numArray[3]) == 0) + num3 = 4603; + if (player1.RollLuck(numArray[3]) == 0) + num3 = 4604; + if (player1.RollLuck(numArray[3]) == 0) + num3 = 4605; + if (player1.RollLuck(numArray[3]) == 0) + num3 = 4550; + if (player1.RollLuck(numArray[2]) == 0 && WorldGen.shadowOrbSmashed) + num3 = 2269; + if (player1.RollLuck(numArray[2]) == 0) + num3 = 2177; + if (player1.RollLuck(numArray[2]) == 0) + num3 = 1988; + if (player1.RollLuck(numArray[2]) == 0) + num3 = 2275; + if (player1.RollLuck(numArray[2]) == 0) + num3 = 2279; + if (player1.RollLuck(numArray[2]) == 0) + num3 = 2277; + if (player1.RollLuck(numArray[2]) == 0) + num3 = 4555; + if (player1.RollLuck(numArray[2]) == 0) + num3 = 4321; + if (player1.RollLuck(numArray[2]) == 0) + num3 = 4323; + if (player1.RollLuck(numArray[2]) == 0) + num3 = 4549; + if (player1.RollLuck(numArray[2]) == 0) + num3 = 4561; + if (player1.RollLuck(numArray[2]) == 0) + num3 = 4774; + if (player1.RollLuck(numArray[2]) == 0) + num3 = 4562; + if (player1.RollLuck(numArray[2]) == 0) + num3 = 4558; + if (player1.RollLuck(numArray[2]) == 0) + num3 = 4559; + if (player1.RollLuck(numArray[2]) == 0) + num3 = 4563; + if (player1.RollLuck(numArray[2]) == 0) + num3 = 4666; + if (player1.RollLuck(numArray[2]) == 0 && NPC.downedBoss1) + num3 = 3262; + if (player1.RollLuck(numArray[2]) == 0 && NPC.downedMechBossAny) + num3 = 3284; + if (player1.RollLuck(numArray[2]) == 0 && Main.hardMode && NPC.downedMoonlord) + num3 = 3596; + if (player1.RollLuck(numArray[2]) == 0 && Main.hardMode && NPC.downedMartians) + num3 = 2865; + if (player1.RollLuck(numArray[2]) == 0 && Main.hardMode && NPC.downedMartians) + num3 = 2866; + if (player1.RollLuck(numArray[2]) == 0 && Main.hardMode && NPC.downedMartians) + num3 = 2867; + if (player1.RollLuck(numArray[2]) == 0 && Main.xMas) + num3 = 3055; + if (player1.RollLuck(numArray[2]) == 0 && Main.xMas) + num3 = 3056; + if (player1.RollLuck(numArray[2]) == 0 && Main.xMas) + num3 = 3057; + if (player1.RollLuck(numArray[2]) == 0 && Main.xMas) + num3 = 3058; + if (player1.RollLuck(numArray[2]) == 0 && Main.xMas) + num3 = 3059; + if (player1.RollLuck(numArray[1]) == 0) + num3 = 2214; + if (player1.RollLuck(numArray[1]) == 0) + num3 = 2215; + if (player1.RollLuck(numArray[1]) == 0) + num3 = 2216; + if (player1.RollLuck(numArray[1]) == 0) + num3 = 2217; + if (player1.RollLuck(numArray[1]) == 0) + num3 = 3624; + if (player1.RollLuck(numArray[1]) == 0) + num3 = 2273; + if (player1.RollLuck(numArray[1]) == 0) + num3 = 2274; + if (player1.RollLuck(numArray[0]) == 0) + num3 = 2266; + if (player1.RollLuck(numArray[0]) == 0) + num3 = 2267; + if (player1.RollLuck(numArray[0]) == 0) + num3 = 2268; + if (player1.RollLuck(numArray[0]) == 0) + num3 = 2281 + Main.rand.Next(3); + if (player1.RollLuck(numArray[0]) == 0) + num3 = 2258; + if (player1.RollLuck(numArray[0]) == 0) + num3 = 2242; + if (player1.RollLuck(numArray[0]) == 0) + num3 = 2260; + if (player1.RollLuck(numArray[0]) == 0) + num3 = 3637; + if (player1.RollLuck(numArray[0]) == 0) + num3 = 4420; + if (player1.RollLuck(numArray[0]) == 0) + num3 = 3119; + if (player1.RollLuck(numArray[0]) == 0) + num3 = 3118; + if (player1.RollLuck(numArray[0]) == 0) + num3 = 3099; + if (num3 != 0) + { + for (int index2 = 0; index2 < 40; ++index2) + { + if (Main.travelShop[index2] == num3) + { + num3 = 0; + break; + } + if (num3 == 3637) + { + switch (Main.travelShop[index2]) + { + case 3621: + case 3622: + case 3633: + case 3634: + case 3635: + case 3636: + case 3637: + case 3638: + case 3639: + case 3640: + case 3641: + case 3642: + num3 = 0; + break; + } + if (num3 == 0) + break; + } + } + } + if (num3 != 0) + { + ++num2; + Main.travelShop[index1] = num3; + ++index1; + if (num3 == 2260) + { + Main.travelShop[index1] = 2261; + int index3 = index1 + 1; + Main.travelShop[index3] = 2262; + index1 = index3 + 1; + } + if (num3 == 4555) + { + Main.travelShop[index1] = 4556; + int index4 = index1 + 1; + Main.travelShop[index4] = 4557; + index1 = index4 + 1; + } + if (num3 == 4321) + { + Main.travelShop[index1] = 4322; + ++index1; + } + if (num3 == 4323) + { + Main.travelShop[index1] = 4324; + int index5 = index1 + 1; + Main.travelShop[index5] = 4365; + index1 = index5 + 1; + } + if (num3 == 4666) + { + Main.travelShop[index1] = 4664; + int index6 = index1 + 1; + Main.travelShop[index6] = 4665; + index1 = index6 + 1; + } + if (num3 == 3637) + { + --index1; + switch (Main.rand.Next(6)) + { + case 0: + int[] travelShop1 = Main.travelShop; + int index7 = index1; + int num4 = index7 + 1; + travelShop1[index7] = 3637; + int[] travelShop2 = Main.travelShop; + int index8 = num4; + index1 = index8 + 1; + travelShop2[index8] = 3642; + continue; + case 1: + int[] travelShop3 = Main.travelShop; + int index9 = index1; + int num5 = index9 + 1; + travelShop3[index9] = 3621; + int[] travelShop4 = Main.travelShop; + int index10 = num5; + index1 = index10 + 1; + travelShop4[index10] = 3622; + continue; + case 2: + int[] travelShop5 = Main.travelShop; + int index11 = index1; + int num6 = index11 + 1; + travelShop5[index11] = 3634; + int[] travelShop6 = Main.travelShop; + int index12 = num6; + index1 = index12 + 1; + travelShop6[index12] = 3639; + continue; + case 3: + int[] travelShop7 = Main.travelShop; + int index13 = index1; + int num7 = index13 + 1; + travelShop7[index13] = 3633; + int[] travelShop8 = Main.travelShop; + int index14 = num7; + index1 = index14 + 1; + travelShop8[index14] = 3638; + continue; + case 4: + int[] travelShop9 = Main.travelShop; + int index15 = index1; + int num8 = index15 + 1; + travelShop9[index15] = 3635; + int[] travelShop10 = Main.travelShop; + int index16 = num8; + index1 = index16 + 1; + travelShop10[index16] = 3640; + continue; + case 5: + int[] travelShop11 = Main.travelShop; + int index17 = index1; + int num9 = index17 + 1; + travelShop11[index17] = 3636; + int[] travelShop12 = Main.travelShop; + int index18 = num9; + index1 = index18 + 1; + travelShop12[index18] = 3641; + continue; + default: + continue; + } + } + } + } + } + + public void SetupShop(int type) + { + bool flag1 = Main.LocalPlayer.currentShoppingSettings.PriceAdjustment <= 0.850000023841858; + Item[] objArray1 = this.item; + for (int index = 0; index < 40; ++index) + objArray1[index] = new Item(); + int index1 = 0; + switch (type) + { + case 1: + objArray1[index1].SetDefaults(88); + int index2 = index1 + 1; + objArray1[index2].SetDefaults(87); + int index3 = index2 + 1; + objArray1[index3].SetDefaults(35); + int index4 = index3 + 1; + objArray1[index4].SetDefaults(1991); + int index5 = index4 + 1; + objArray1[index5].SetDefaults(3509); + int index6 = index5 + 1; + objArray1[index6].SetDefaults(3506); + int index7 = index6 + 1; + objArray1[index7].SetDefaults(8); + int index8 = index7 + 1; + objArray1[index8].SetDefaults(28); + int index9 = index8 + 1; + objArray1[index9].SetDefaults(110); + int index10 = index9 + 1; + objArray1[index10].SetDefaults(40); + int index11 = index10 + 1; + objArray1[index11].SetDefaults(42); + int index12 = index11 + 1; + objArray1[index12].SetDefaults(965); + int index13 = index12 + 1; + if (Main.player[Main.myPlayer].ZoneSnow) + { + objArray1[index13].SetDefaults(967); + ++index13; + } + if (Main.player[Main.myPlayer].ZoneJungle) + { + objArray1[index13].SetDefaults(33); + ++index13; + } + if (Main.dayTime && Main.IsItAHappyWindyDay) + objArray1[index13++].SetDefaults(4074); + if (Main.bloodMoon) + { + objArray1[index13].SetDefaults(279); + ++index13; + } + if (!Main.dayTime) + { + objArray1[index13].SetDefaults(282); + ++index13; + } + if (NPC.downedBoss3) + { + objArray1[index13].SetDefaults(346); + ++index13; + } + if (Main.hardMode) + { + objArray1[index13].SetDefaults(488); + ++index13; + } + for (int index14 = 0; index14 < 58; ++index14) + { + if (Main.player[Main.myPlayer].inventory[index14].type == 930) + { + objArray1[index13].SetDefaults(931); + int index15 = index13 + 1; + objArray1[index15].SetDefaults(1614); + index13 = index15 + 1; + break; + } + } + objArray1[index13].SetDefaults(1786); + index1 = index13 + 1; + if (Main.hardMode) + { + objArray1[index1].SetDefaults(1348); + ++index1; + } + if (NPC.downedBoss2 || NPC.downedBoss3 || Main.hardMode) + { + Item[] objArray2 = objArray1; + int index16 = index1; + int num = index16 + 1; + objArray2[index16].SetDefaults(4063); + Item[] objArray3 = objArray1; + int index17 = num; + index1 = index17 + 1; + objArray3[index17].SetDefaults(4673); + } + if (Main.player[Main.myPlayer].HasItem(3107)) + { + objArray1[index1].SetDefaults(3108); + ++index1; + break; + } + break; + case 2: + objArray1[index1].SetDefaults(97); + int index18 = index1 + 1; + if (Main.bloodMoon || Main.hardMode) + { + if (WorldGen.SavedOreTiers.Silver == 168) + { + objArray1[index18].SetDefaults(4915); + ++index18; + } + else + { + objArray1[index18].SetDefaults(278); + ++index18; + } + } + if (NPC.downedBoss2 && !Main.dayTime || Main.hardMode) + { + objArray1[index18].SetDefaults(47); + ++index18; + } + objArray1[index18].SetDefaults(95); + int index19 = index18 + 1; + objArray1[index19].SetDefaults(98); + index1 = index19 + 1; + if (Main.player[Main.myPlayer].ZoneGraveyard) + objArray1[index1++].SetDefaults(4703); + if (!Main.dayTime) + { + objArray1[index1].SetDefaults(324); + ++index1; + } + if (Main.hardMode) + { + objArray1[index1].SetDefaults(534); + ++index1; + } + if (Main.hardMode) + { + objArray1[index1].SetDefaults(1432); + ++index1; + } + if (Main.player[Main.myPlayer].HasItem(1258)) + { + objArray1[index1].SetDefaults(1261); + ++index1; + } + if (Main.player[Main.myPlayer].HasItem(1835)) + { + objArray1[index1].SetDefaults(1836); + ++index1; + } + if (Main.player[Main.myPlayer].HasItem(3107)) + { + objArray1[index1].SetDefaults(3108); + ++index1; + } + if (Main.player[Main.myPlayer].HasItem(1782)) + { + objArray1[index1].SetDefaults(1783); + ++index1; + } + if (Main.player[Main.myPlayer].HasItem(1784)) + { + objArray1[index1].SetDefaults(1785); + ++index1; + } + if (Main.halloween) + { + objArray1[index1].SetDefaults(1736); + int index20 = index1 + 1; + objArray1[index20].SetDefaults(1737); + int index21 = index20 + 1; + objArray1[index21].SetDefaults(1738); + index1 = index21 + 1; + break; + } + break; + case 3: + int index22; + if (Main.bloodMoon) + { + if (WorldGen.crimson) + { + objArray1[index1].SetDefaults(2886); + int index23 = index1 + 1; + objArray1[index23].SetDefaults(2171); + int index24 = index23 + 1; + objArray1[index24].SetDefaults(4508); + index22 = index24 + 1; + } + else + { + objArray1[index1].SetDefaults(67); + int index25 = index1 + 1; + objArray1[index25].SetDefaults(59); + int index26 = index25 + 1; + objArray1[index26].SetDefaults(4504); + index22 = index26 + 1; + } + } + else + { + objArray1[index1].SetDefaults(66); + int index27 = index1 + 1; + objArray1[index27].SetDefaults(62); + int index28 = index27 + 1; + objArray1[index28].SetDefaults(63); + int index29 = index28 + 1; + objArray1[index29].SetDefaults(745); + index22 = index29 + 1; + } + if (Main.hardMode && Main.player[Main.myPlayer].ZoneGraveyard) + { + if (WorldGen.crimson) + objArray1[index22].SetDefaults(59); + else + objArray1[index22].SetDefaults(2171); + ++index22; + } + objArray1[index22].SetDefaults(27); + int index30 = index22 + 1; + objArray1[index30].SetDefaults(114); + int index31 = index30 + 1; + objArray1[index31].SetDefaults(1828); + int index32 = index31 + 1; + objArray1[index32].SetDefaults(747); + int index33 = index32 + 1; + if (Main.hardMode) + { + objArray1[index33].SetDefaults(746); + ++index33; + } + if (Main.hardMode) + { + objArray1[index33].SetDefaults(369); + ++index33; + } + if (Main.hardMode) + { + objArray1[index33].SetDefaults(4505); + ++index33; + } + if (Main.player[Main.myPlayer].ZoneGlowshroom) + { + objArray1[index33].SetDefaults(194); + ++index33; + } + if (Main.halloween) + { + objArray1[index33].SetDefaults(1853); + int index34 = index33 + 1; + objArray1[index34].SetDefaults(1854); + index33 = index34 + 1; + } + if (NPC.downedSlimeKing) + { + objArray1[index33].SetDefaults(3215); + ++index33; + } + if (NPC.downedQueenBee) + { + objArray1[index33].SetDefaults(3216); + ++index33; + } + if (NPC.downedBoss1) + { + objArray1[index33].SetDefaults(3219); + ++index33; + } + if (NPC.downedBoss2) + { + if (WorldGen.crimson) + { + objArray1[index33].SetDefaults(3218); + ++index33; + } + else + { + objArray1[index33].SetDefaults(3217); + ++index33; + } + } + if (NPC.downedBoss3) + { + objArray1[index33].SetDefaults(3220); + int index35 = index33 + 1; + objArray1[index35].SetDefaults(3221); + index33 = index35 + 1; + } + if (Main.hardMode) + { + objArray1[index33].SetDefaults(3222); + ++index33; + } + Item[] objArray4 = objArray1; + int index36 = index33; + int num1 = index36 + 1; + objArray4[index36].SetDefaults(4047); + Item[] objArray5 = objArray1; + int index37 = num1; + int num2 = index37 + 1; + objArray5[index37].SetDefaults(4045); + Item[] objArray6 = objArray1; + int index38 = num2; + int num3 = index38 + 1; + objArray6[index38].SetDefaults(4044); + Item[] objArray7 = objArray1; + int index39 = num3; + int num4 = index39 + 1; + objArray7[index39].SetDefaults(4043); + Item[] objArray8 = objArray1; + int index40 = num4; + int num5 = index40 + 1; + objArray8[index40].SetDefaults(4042); + Item[] objArray9 = objArray1; + int index41 = num5; + int num6 = index41 + 1; + objArray9[index41].SetDefaults(4046); + Item[] objArray10 = objArray1; + int index42 = num6; + int num7 = index42 + 1; + objArray10[index42].SetDefaults(4041); + Item[] objArray11 = objArray1; + int index43 = num7; + int num8 = index43 + 1; + objArray11[index43].SetDefaults(4241); + Item[] objArray12 = objArray1; + int index44 = num8; + index1 = index44 + 1; + objArray12[index44].SetDefaults(4048); + if (Main.hardMode) + { + switch (Main.moonPhase / 2) + { + case 0: + Item[] objArray13 = objArray1; + int index45 = index1; + int num9 = index45 + 1; + objArray13[index45].SetDefaults(4430); + Item[] objArray14 = objArray1; + int index46 = num9; + int num10 = index46 + 1; + objArray14[index46].SetDefaults(4431); + Item[] objArray15 = objArray1; + int index47 = num10; + index1 = index47 + 1; + objArray15[index47].SetDefaults(4432); + break; + case 1: + Item[] objArray16 = objArray1; + int index48 = index1; + int num11 = index48 + 1; + objArray16[index48].SetDefaults(4433); + Item[] objArray17 = objArray1; + int index49 = num11; + int num12 = index49 + 1; + objArray17[index49].SetDefaults(4434); + Item[] objArray18 = objArray1; + int index50 = num12; + index1 = index50 + 1; + objArray18[index50].SetDefaults(4435); + break; + case 2: + Item[] objArray19 = objArray1; + int index51 = index1; + int num13 = index51 + 1; + objArray19[index51].SetDefaults(4436); + Item[] objArray20 = objArray1; + int index52 = num13; + int num14 = index52 + 1; + objArray20[index52].SetDefaults(4437); + Item[] objArray21 = objArray1; + int index53 = num14; + index1 = index53 + 1; + objArray21[index53].SetDefaults(4438); + break; + default: + Item[] objArray22 = objArray1; + int index54 = index1; + int num15 = index54 + 1; + objArray22[index54].SetDefaults(4439); + Item[] objArray23 = objArray1; + int index55 = num15; + int num16 = index55 + 1; + objArray23[index55].SetDefaults(4440); + Item[] objArray24 = objArray1; + int index56 = num16; + index1 = index56 + 1; + objArray24[index56].SetDefaults(4441); + break; + } + } + else + break; + break; + case 4: + objArray1[index1].SetDefaults(168); + int index57 = index1 + 1; + objArray1[index57].SetDefaults(166); + int index58 = index57 + 1; + objArray1[index58].SetDefaults(167); + index1 = index58 + 1; + if (Main.hardMode) + { + objArray1[index1].SetDefaults(265); + ++index1; + } + if (Main.hardMode && NPC.downedPlantBoss && NPC.downedPirates) + { + objArray1[index1].SetDefaults(937); + ++index1; + } + if (Main.hardMode) + { + objArray1[index1].SetDefaults(1347); + ++index1; + } + for (int index59 = 0; index59 < 58; ++index59) + { + if (Main.player[Main.myPlayer].inventory[index59].type == 4827) + { + objArray1[index1].SetDefaults(4827); + ++index1; + break; + } + } + for (int index60 = 0; index60 < 58; ++index60) + { + if (Main.player[Main.myPlayer].inventory[index60].type == 4824) + { + objArray1[index1].SetDefaults(4824); + ++index1; + break; + } + } + for (int index61 = 0; index61 < 58; ++index61) + { + if (Main.player[Main.myPlayer].inventory[index61].type == 4825) + { + objArray1[index1].SetDefaults(4825); + ++index1; + break; + } + } + for (int index62 = 0; index62 < 58; ++index62) + { + if (Main.player[Main.myPlayer].inventory[index62].type == 4826) + { + objArray1[index1].SetDefaults(4826); + ++index1; + break; + } + } + break; + case 5: + objArray1[index1].SetDefaults(254); + int index63 = index1 + 1; + objArray1[index63].SetDefaults(981); + int index64 = index63 + 1; + if (Main.dayTime) + { + objArray1[index64].SetDefaults(242); + ++index64; + } + switch (Main.moonPhase) + { + case 0: + objArray1[index64].SetDefaults(245); + int index65 = index64 + 1; + objArray1[index65].SetDefaults(246); + index64 = index65 + 1; + if (!Main.dayTime) + { + Item[] objArray25 = objArray1; + int index66 = index64; + int num17 = index66 + 1; + objArray25[index66].SetDefaults(1288); + Item[] objArray26 = objArray1; + int index67 = num17; + index64 = index67 + 1; + objArray26[index67].SetDefaults(1289); + break; + } + break; + case 1: + objArray1[index64].SetDefaults(325); + int index68 = index64 + 1; + objArray1[index68].SetDefaults(326); + index64 = index68 + 1; + break; + } + objArray1[index64].SetDefaults(269); + int index69 = index64 + 1; + objArray1[index69].SetDefaults(270); + int index70 = index69 + 1; + objArray1[index70].SetDefaults(271); + index1 = index70 + 1; + if (NPC.downedClown) + { + objArray1[index1].SetDefaults(503); + int index71 = index1 + 1; + objArray1[index71].SetDefaults(504); + int index72 = index71 + 1; + objArray1[index72].SetDefaults(505); + index1 = index72 + 1; + } + if (Main.bloodMoon) + { + objArray1[index1].SetDefaults(322); + ++index1; + if (!Main.dayTime) + { + Item[] objArray27 = objArray1; + int index73 = index1; + int num18 = index73 + 1; + objArray27[index73].SetDefaults(3362); + Item[] objArray28 = objArray1; + int index74 = num18; + index1 = index74 + 1; + objArray28[index74].SetDefaults(3363); + } + } + if (NPC.downedAncientCultist) + { + if (Main.dayTime) + { + Item[] objArray29 = objArray1; + int index75 = index1; + int num19 = index75 + 1; + objArray29[index75].SetDefaults(2856); + Item[] objArray30 = objArray1; + int index76 = num19; + index1 = index76 + 1; + objArray30[index76].SetDefaults(2858); + } + else + { + Item[] objArray31 = objArray1; + int index77 = index1; + int num20 = index77 + 1; + objArray31[index77].SetDefaults(2857); + Item[] objArray32 = objArray1; + int index78 = num20; + index1 = index78 + 1; + objArray32[index78].SetDefaults(2859); + } + } + if (NPC.AnyNPCs(441)) + { + Item[] objArray33 = objArray1; + int index79 = index1; + int num21 = index79 + 1; + objArray33[index79].SetDefaults(3242); + Item[] objArray34 = objArray1; + int index80 = num21; + int num22 = index80 + 1; + objArray34[index80].SetDefaults(3243); + Item[] objArray35 = objArray1; + int index81 = num22; + index1 = index81 + 1; + objArray35[index81].SetDefaults(3244); + } + if (Main.player[Main.myPlayer].ZoneGraveyard) + { + Item[] objArray36 = objArray1; + int index82 = index1; + int num23 = index82 + 1; + objArray36[index82].SetDefaults(4685); + Item[] objArray37 = objArray1; + int index83 = num23; + int num24 = index83 + 1; + objArray37[index83].SetDefaults(4686); + Item[] objArray38 = objArray1; + int index84 = num24; + int num25 = index84 + 1; + objArray38[index84].SetDefaults(4704); + Item[] objArray39 = objArray1; + int index85 = num25; + int num26 = index85 + 1; + objArray39[index85].SetDefaults(4705); + Item[] objArray40 = objArray1; + int index86 = num26; + int num27 = index86 + 1; + objArray40[index86].SetDefaults(4706); + Item[] objArray41 = objArray1; + int index87 = num27; + int num28 = index87 + 1; + objArray41[index87].SetDefaults(4707); + Item[] objArray42 = objArray1; + int index88 = num28; + int num29 = index88 + 1; + objArray42[index88].SetDefaults(4708); + Item[] objArray43 = objArray1; + int index89 = num29; + index1 = index89 + 1; + objArray43[index89].SetDefaults(4709); + } + if (Main.player[Main.myPlayer].ZoneSnow) + { + objArray1[index1].SetDefaults(1429); + ++index1; + } + if (Main.halloween) + { + objArray1[index1].SetDefaults(1740); + ++index1; + } + if (Main.hardMode) + { + if (Main.moonPhase == 2) + { + objArray1[index1].SetDefaults(869); + ++index1; + } + if (Main.moonPhase == 3) + { + objArray1[index1].SetDefaults(4994); + int index90 = index1 + 1; + objArray1[index90].SetDefaults(4997); + index1 = index90 + 1; + } + if (Main.moonPhase == 4) + { + objArray1[index1].SetDefaults(864); + int index91 = index1 + 1; + objArray1[index91].SetDefaults(865); + index1 = index91 + 1; + } + if (Main.moonPhase == 5) + { + objArray1[index1].SetDefaults(4995); + int index92 = index1 + 1; + objArray1[index92].SetDefaults(4998); + index1 = index92 + 1; + } + if (Main.moonPhase == 6) + { + objArray1[index1].SetDefaults(873); + int index93 = index1 + 1; + objArray1[index93].SetDefaults(874); + int index94 = index93 + 1; + objArray1[index94].SetDefaults(875); + index1 = index94 + 1; + } + if (Main.moonPhase == 7) + { + objArray1[index1].SetDefaults(4996); + int index95 = index1 + 1; + objArray1[index95].SetDefaults(4999); + index1 = index95 + 1; + } + } + if (NPC.downedFrost) + { + objArray1[index1].SetDefaults(1275); + int index96 = index1 + 1; + objArray1[index96].SetDefaults(1276); + index1 = index96 + 1; + } + if (Main.halloween) + { + Item[] objArray44 = objArray1; + int index97 = index1; + int num30 = index97 + 1; + objArray44[index97].SetDefaults(3246); + Item[] objArray45 = objArray1; + int index98 = num30; + index1 = index98 + 1; + objArray45[index98].SetDefaults(3247); + } + if (BirthdayParty.PartyIsUp) + { + Item[] objArray46 = objArray1; + int index99 = index1; + int num31 = index99 + 1; + objArray46[index99].SetDefaults(3730); + Item[] objArray47 = objArray1; + int index100 = num31; + int num32 = index100 + 1; + objArray47[index100].SetDefaults(3731); + Item[] objArray48 = objArray1; + int index101 = num32; + int num33 = index101 + 1; + objArray48[index101].SetDefaults(3733); + Item[] objArray49 = objArray1; + int index102 = num33; + int num34 = index102 + 1; + objArray49[index102].SetDefaults(3734); + Item[] objArray50 = objArray1; + int index103 = num34; + index1 = index103 + 1; + objArray50[index103].SetDefaults(3735); + } + int scoreAccumulated1 = Main.LocalPlayer.golferScoreAccumulated; + if (index1 < 38 && scoreAccumulated1 >= 2000) + { + objArray1[index1].SetDefaults(4744); + ++index1; + break; + } + break; + case 6: + objArray1[index1].SetDefaults(128); + int index104 = index1 + 1; + objArray1[index104].SetDefaults(486); + int index105 = index104 + 1; + objArray1[index105].SetDefaults(398); + int index106 = index105 + 1; + objArray1[index106].SetDefaults(84); + int index107 = index106 + 1; + objArray1[index107].SetDefaults(407); + int index108 = index107 + 1; + objArray1[index108].SetDefaults(161); + index1 = index108 + 1; + break; + case 7: + objArray1[index1].SetDefaults(487); + int index109 = index1 + 1; + objArray1[index109].SetDefaults(496); + int index110 = index109 + 1; + objArray1[index110].SetDefaults(500); + int index111 = index110 + 1; + objArray1[index111].SetDefaults(507); + int index112 = index111 + 1; + objArray1[index112].SetDefaults(508); + int index113 = index112 + 1; + objArray1[index113].SetDefaults(531); + int index114 = index113 + 1; + objArray1[index114].SetDefaults(576); + int index115 = index114 + 1; + objArray1[index115].SetDefaults(3186); + index1 = index115 + 1; + if (Main.halloween) + { + objArray1[index1].SetDefaults(1739); + ++index1; + break; + } + break; + case 8: + objArray1[index1].SetDefaults(509); + int index116 = index1 + 1; + objArray1[index116].SetDefaults(850); + int index117 = index116 + 1; + objArray1[index117].SetDefaults(851); + int index118 = index117 + 1; + objArray1[index118].SetDefaults(3612); + int index119 = index118 + 1; + objArray1[index119].SetDefaults(510); + int index120 = index119 + 1; + objArray1[index120].SetDefaults(530); + int index121 = index120 + 1; + objArray1[index121].SetDefaults(513); + int index122 = index121 + 1; + objArray1[index122].SetDefaults(538); + int index123 = index122 + 1; + objArray1[index123].SetDefaults(529); + int index124 = index123 + 1; + objArray1[index124].SetDefaults(541); + int index125 = index124 + 1; + objArray1[index125].SetDefaults(542); + int index126 = index125 + 1; + objArray1[index126].SetDefaults(543); + int index127 = index126 + 1; + objArray1[index127].SetDefaults(852); + int index128 = index127 + 1; + objArray1[index128].SetDefaults(853); + int num35 = index128 + 1; + Item[] objArray51 = objArray1; + int index129 = num35; + int num36 = index129 + 1; + objArray51[index129].SetDefaults(4261); + Item[] objArray52 = objArray1; + int index130 = num36; + int index131 = index130 + 1; + objArray52[index130].SetDefaults(3707); + objArray1[index131].SetDefaults(2739); + int index132 = index131 + 1; + objArray1[index132].SetDefaults(849); + int num37 = index132 + 1; + Item[] objArray53 = objArray1; + int index133 = num37; + int num38 = index133 + 1; + objArray53[index133].SetDefaults(3616); + Item[] objArray54 = objArray1; + int index134 = num38; + int num39 = index134 + 1; + objArray54[index134].SetDefaults(2799); + Item[] objArray55 = objArray1; + int index135 = num39; + int num40 = index135 + 1; + objArray55[index135].SetDefaults(3619); + Item[] objArray56 = objArray1; + int index136 = num40; + int num41 = index136 + 1; + objArray56[index136].SetDefaults(3627); + Item[] objArray57 = objArray1; + int index137 = num41; + int num42 = index137 + 1; + objArray57[index137].SetDefaults(3629); + Item[] objArray58 = objArray1; + int index138 = num42; + int num43 = index138 + 1; + objArray58[index138].SetDefaults(4484); + Item[] objArray59 = objArray1; + int index139 = num43; + index1 = index139 + 1; + objArray59[index139].SetDefaults(4485); + if (NPC.AnyNPCs(369) && Main.hardMode && Main.moonPhase == 3) + { + objArray1[index1].SetDefaults(2295); + ++index1; + break; + } + break; + case 9: + objArray1[index1].SetDefaults(588); + int index140 = index1 + 1; + objArray1[index140].SetDefaults(589); + int index141 = index140 + 1; + objArray1[index141].SetDefaults(590); + int index142 = index141 + 1; + objArray1[index142].SetDefaults(597); + int index143 = index142 + 1; + objArray1[index143].SetDefaults(598); + int index144 = index143 + 1; + objArray1[index144].SetDefaults(596); + index1 = index144 + 1; + for (int Type = 1873; Type < 1906; ++Type) + { + objArray1[index1].SetDefaults(Type); + ++index1; + } + break; + case 10: + if (NPC.downedMechBossAny) + { + objArray1[index1].SetDefaults(756); + int index145 = index1 + 1; + objArray1[index145].SetDefaults(787); + index1 = index145 + 1; + } + objArray1[index1].SetDefaults(868); + int index146 = index1 + 1; + if (NPC.downedPlantBoss) + { + objArray1[index146].SetDefaults(1551); + ++index146; + } + objArray1[index146].SetDefaults(1181); + int index147 = index146 + 1; + objArray1[index147].SetDefaults(783); + index1 = index147 + 1; + break; + case 11: + objArray1[index1].SetDefaults(779); + int index148 = index1 + 1; + int index149; + if (Main.moonPhase >= 4) + { + objArray1[index148].SetDefaults(748); + index149 = index148 + 1; + } + else + { + objArray1[index148].SetDefaults(839); + int index150 = index148 + 1; + objArray1[index150].SetDefaults(840); + int index151 = index150 + 1; + objArray1[index151].SetDefaults(841); + index149 = index151 + 1; + } + if (NPC.downedGolemBoss) + { + objArray1[index149].SetDefaults(948); + ++index149; + } + Item[] objArray60 = objArray1; + int index152 = index149; + int num44 = index152 + 1; + objArray60[index152].SetDefaults(3623); + Item[] objArray61 = objArray1; + int index153 = num44; + int num45 = index153 + 1; + objArray61[index153].SetDefaults(3603); + Item[] objArray62 = objArray1; + int index154 = num45; + int num46 = index154 + 1; + objArray62[index154].SetDefaults(3604); + Item[] objArray63 = objArray1; + int index155 = num46; + int num47 = index155 + 1; + objArray63[index155].SetDefaults(3607); + Item[] objArray64 = objArray1; + int index156 = num47; + int num48 = index156 + 1; + objArray64[index156].SetDefaults(3605); + Item[] objArray65 = objArray1; + int index157 = num48; + int num49 = index157 + 1; + objArray65[index157].SetDefaults(3606); + Item[] objArray66 = objArray1; + int index158 = num49; + int num50 = index158 + 1; + objArray66[index158].SetDefaults(3608); + Item[] objArray67 = objArray1; + int index159 = num50; + int num51 = index159 + 1; + objArray67[index159].SetDefaults(3618); + Item[] objArray68 = objArray1; + int index160 = num51; + int num52 = index160 + 1; + objArray68[index160].SetDefaults(3602); + Item[] objArray69 = objArray1; + int index161 = num52; + int num53 = index161 + 1; + objArray69[index161].SetDefaults(3663); + Item[] objArray70 = objArray1; + int index162 = num53; + int num54 = index162 + 1; + objArray70[index162].SetDefaults(3609); + Item[] objArray71 = objArray1; + int index163 = num54; + int index164 = index163 + 1; + objArray71[index163].SetDefaults(3610); + objArray1[index164].SetDefaults(995); + int index165 = index164 + 1; + if (NPC.downedBoss1 && NPC.downedBoss2 && NPC.downedBoss3) + { + objArray1[index165].SetDefaults(2203); + ++index165; + } + if (WorldGen.crimson) + { + objArray1[index165].SetDefaults(2193); + ++index165; + } + if (!WorldGen.crimson) + { + objArray1[index165].SetDefaults(4142); + ++index165; + } + objArray1[index165].SetDefaults(1263); + int index166 = index165 + 1; + if (Main.eclipse || Main.bloodMoon) + { + if (WorldGen.crimson) + { + objArray1[index166].SetDefaults(784); + index1 = index166 + 1; + } + else + { + objArray1[index166].SetDefaults(782); + index1 = index166 + 1; + } + } + else if (Main.player[Main.myPlayer].ZoneHallow) + { + objArray1[index166].SetDefaults(781); + index1 = index166 + 1; + } + else + { + objArray1[index166].SetDefaults(780); + index1 = index166 + 1; + } + if (Main.hardMode) + { + objArray1[index1].SetDefaults(1344); + int index167 = index1 + 1; + objArray1[index167].SetDefaults(4472); + index1 = index167 + 1; + } + if (Main.halloween) + { + objArray1[index1].SetDefaults(1742); + ++index1; + break; + } + break; + case 12: + objArray1[index1].SetDefaults(1037); + int index168 = index1 + 1; + objArray1[index168].SetDefaults(2874); + int index169 = index168 + 1; + objArray1[index169].SetDefaults(1120); + index1 = index169 + 1; + if (Main.netMode == 1) + { + objArray1[index1].SetDefaults(1969); + ++index1; + } + if (Main.halloween) + { + objArray1[index1].SetDefaults(3248); + int index170 = index1 + 1; + objArray1[index170].SetDefaults(1741); + index1 = index170 + 1; + } + if (Main.moonPhase == 0) + { + objArray1[index1].SetDefaults(2871); + int index171 = index1 + 1; + objArray1[index171].SetDefaults(2872); + index1 = index171 + 1; + } + if (!Main.dayTime && Main.bloodMoon) + { + objArray1[index1].SetDefaults(4663); + ++index1; + } + if (Main.player[Main.myPlayer].ZoneGraveyard) + { + objArray1[index1].SetDefaults(4662); + ++index1; + break; + } + break; + case 13: + objArray1[index1].SetDefaults(859); + int index172 = index1 + 1; + if (Main.LocalPlayer.golferScoreAccumulated > 500) + objArray1[index172++].SetDefaults(4743); + objArray1[index172].SetDefaults(1000); + int index173 = index172 + 1; + objArray1[index173].SetDefaults(1168); + int index174 = index173 + 1; + int index175; + if (Main.dayTime) + { + objArray1[index174].SetDefaults(1449); + index175 = index174 + 1; + } + else + { + objArray1[index174].SetDefaults(4552); + index175 = index174 + 1; + } + objArray1[index175].SetDefaults(1345); + int index176 = index175 + 1; + objArray1[index176].SetDefaults(1450); + int num55 = index176 + 1; + Item[] objArray72 = objArray1; + int index177 = num55; + int num56 = index177 + 1; + objArray72[index177].SetDefaults(3253); + Item[] objArray73 = objArray1; + int index178 = num56; + int num57 = index178 + 1; + objArray73[index178].SetDefaults(4553); + Item[] objArray74 = objArray1; + int index179 = num57; + int num58 = index179 + 1; + objArray74[index179].SetDefaults(2700); + Item[] objArray75 = objArray1; + int index180 = num58; + int num59 = index180 + 1; + objArray75[index180].SetDefaults(2738); + Item[] objArray76 = objArray1; + int index181 = num59; + int num60 = index181 + 1; + objArray76[index181].SetDefaults(4470); + Item[] objArray77 = objArray1; + int index182 = num60; + int index183 = index182 + 1; + objArray77[index182].SetDefaults(4681); + if (Main.player[Main.myPlayer].ZoneGraveyard) + objArray1[index183++].SetDefaults(4682); + if (LanternNight.LanternsUp) + objArray1[index183++].SetDefaults(4702); + if (Main.player[Main.myPlayer].HasItem(3548)) + { + objArray1[index183].SetDefaults(3548); + ++index183; + } + if (NPC.AnyNPCs(229)) + objArray1[index183++].SetDefaults(3369); + if (NPC.downedGolemBoss) + objArray1[index183++].SetDefaults(3546); + if (Main.hardMode) + { + objArray1[index183].SetDefaults(3214); + int index184 = index183 + 1; + objArray1[index184].SetDefaults(2868); + int index185 = index184 + 1; + objArray1[index185].SetDefaults(970); + int index186 = index185 + 1; + objArray1[index186].SetDefaults(971); + int index187 = index186 + 1; + objArray1[index187].SetDefaults(972); + int index188 = index187 + 1; + objArray1[index188].SetDefaults(973); + index183 = index188 + 1; + } + Item[] objArray78 = objArray1; + int index189 = index183; + int num61 = index189 + 1; + objArray78[index189].SetDefaults(4791); + Item[] objArray79 = objArray1; + int index190 = num61; + int num62 = index190 + 1; + objArray79[index190].SetDefaults(3747); + Item[] objArray80 = objArray1; + int index191 = num62; + int num63 = index191 + 1; + objArray80[index191].SetDefaults(3732); + Item[] objArray81 = objArray1; + int index192 = num63; + index1 = index192 + 1; + objArray81[index192].SetDefaults(3742); + if (BirthdayParty.PartyIsUp) + { + Item[] objArray82 = objArray1; + int index193 = index1; + int num64 = index193 + 1; + objArray82[index193].SetDefaults(3749); + Item[] objArray83 = objArray1; + int index194 = num64; + int num65 = index194 + 1; + objArray83[index194].SetDefaults(3746); + Item[] objArray84 = objArray1; + int index195 = num65; + int num66 = index195 + 1; + objArray84[index195].SetDefaults(3739); + Item[] objArray85 = objArray1; + int index196 = num66; + int num67 = index196 + 1; + objArray85[index196].SetDefaults(3740); + Item[] objArray86 = objArray1; + int index197 = num67; + int num68 = index197 + 1; + objArray86[index197].SetDefaults(3741); + Item[] objArray87 = objArray1; + int index198 = num68; + int num69 = index198 + 1; + objArray87[index198].SetDefaults(3737); + Item[] objArray88 = objArray1; + int index199 = num69; + int num70 = index199 + 1; + objArray88[index199].SetDefaults(3738); + Item[] objArray89 = objArray1; + int index200 = num70; + int num71 = index200 + 1; + objArray89[index200].SetDefaults(3736); + Item[] objArray90 = objArray1; + int index201 = num71; + int num72 = index201 + 1; + objArray90[index201].SetDefaults(3745); + Item[] objArray91 = objArray1; + int index202 = num72; + int num73 = index202 + 1; + objArray91[index202].SetDefaults(3744); + Item[] objArray92 = objArray1; + int index203 = num73; + index1 = index203 + 1; + objArray92[index203].SetDefaults(3743); + break; + } + break; + case 14: + objArray1[index1].SetDefaults(771); + ++index1; + if (Main.bloodMoon) + { + objArray1[index1].SetDefaults(772); + ++index1; + } + if (!Main.dayTime || Main.eclipse) + { + objArray1[index1].SetDefaults(773); + ++index1; + } + if (Main.eclipse) + { + objArray1[index1].SetDefaults(774); + ++index1; + } + if (NPC.downedMartians) + { + objArray1[index1++].SetDefaults(4445); + if (Main.bloodMoon || Main.eclipse) + objArray1[index1++].SetDefaults(4446); + } + if (Main.hardMode) + { + objArray1[index1].SetDefaults(4459); + ++index1; + } + if (Main.hardMode) + { + objArray1[index1].SetDefaults(760); + ++index1; + } + if (Main.hardMode) + { + objArray1[index1].SetDefaults(1346); + ++index1; + } + if (Main.player[Main.myPlayer].ZoneGraveyard) + { + objArray1[index1].SetDefaults(4409); + ++index1; + } + if (Main.player[Main.myPlayer].ZoneGraveyard) + { + objArray1[index1].SetDefaults(4392); + ++index1; + } + if (Main.halloween) + { + objArray1[index1].SetDefaults(1743); + int index204 = index1 + 1; + objArray1[index204].SetDefaults(1744); + int index205 = index204 + 1; + objArray1[index205].SetDefaults(1745); + index1 = index205 + 1; + } + if (NPC.downedMartians) + { + Item[] objArray93 = objArray1; + int index206 = index1; + int num74 = index206 + 1; + objArray93[index206].SetDefaults(2862); + Item[] objArray94 = objArray1; + int index207 = num74; + index1 = index207 + 1; + objArray94[index207].SetDefaults(3109); + } + if (Main.player[Main.myPlayer].HasItem(3384) || Main.player[Main.myPlayer].HasItem(3664)) + { + objArray1[index1].SetDefaults(3664); + ++index1; + break; + } + break; + case 15: + objArray1[index1].SetDefaults(1071); + int index208 = index1 + 1; + objArray1[index208].SetDefaults(1072); + int index209 = index208 + 1; + objArray1[index209].SetDefaults(1100); + int index210 = index209 + 1; + for (int Type = 1073; Type <= 1084; ++Type) + { + objArray1[index210].SetDefaults(Type); + ++index210; + } + objArray1[index210].SetDefaults(1097); + int index211 = index210 + 1; + objArray1[index211].SetDefaults(1099); + int index212 = index211 + 1; + objArray1[index212].SetDefaults(1098); + int index213 = index212 + 1; + objArray1[index213].SetDefaults(1966); + index1 = index213 + 1; + if (Main.player[Main.myPlayer].ZoneGraveyard) + { + objArray1[index1].SetDefaults(4668); + ++index1; + } + if (Main.hardMode) + { + objArray1[index1].SetDefaults(1967); + int index214 = index1 + 1; + objArray1[index214].SetDefaults(1968); + index1 = index214 + 1; + } + if (!Main.player[Main.myPlayer].ZoneGraveyard) + { + objArray1[index1].SetDefaults(1490); + int index215 = index1 + 1; + if (Main.moonPhase <= 1) + { + objArray1[index215].SetDefaults(1481); + index1 = index215 + 1; + } + else if (Main.moonPhase <= 3) + { + objArray1[index215].SetDefaults(1482); + index1 = index215 + 1; + } + else if (Main.moonPhase <= 5) + { + objArray1[index215].SetDefaults(1483); + index1 = index215 + 1; + } + else + { + objArray1[index215].SetDefaults(1484); + index1 = index215 + 1; + } + } + if (Main.player[Main.myPlayer].ZoneCrimson) + { + objArray1[index1].SetDefaults(1492); + ++index1; + } + if (Main.player[Main.myPlayer].ZoneCorrupt) + { + objArray1[index1].SetDefaults(1488); + ++index1; + } + if (Main.player[Main.myPlayer].ZoneHallow) + { + objArray1[index1].SetDefaults(1489); + ++index1; + } + if (Main.player[Main.myPlayer].ZoneJungle) + { + objArray1[index1].SetDefaults(1486); + ++index1; + } + if (Main.player[Main.myPlayer].ZoneSnow) + { + objArray1[index1].SetDefaults(1487); + ++index1; + } + if (Main.player[Main.myPlayer].ZoneDesert) + { + objArray1[index1].SetDefaults(1491); + ++index1; + } + if (Main.bloodMoon) + { + objArray1[index1].SetDefaults(1493); + ++index1; + } + if (!Main.player[Main.myPlayer].ZoneGraveyard) + { + if ((double) Main.player[Main.myPlayer].position.Y / 16.0 < Main.worldSurface * 0.349999994039536) + { + objArray1[index1].SetDefaults(1485); + ++index1; + } + if ((double) Main.player[Main.myPlayer].position.Y / 16.0 < Main.worldSurface * 0.349999994039536 && Main.hardMode) + { + objArray1[index1].SetDefaults(1494); + ++index1; + } + } + if (Main.player[Main.myPlayer].ZoneGraveyard) + { + objArray1[index1].SetDefaults(4723); + int index216 = index1 + 1; + objArray1[index216].SetDefaults(4724); + int index217 = index216 + 1; + objArray1[index217].SetDefaults(4725); + int index218 = index217 + 1; + objArray1[index218].SetDefaults(4726); + int index219 = index218 + 1; + objArray1[index219].SetDefaults(4727); + int index220 = index219 + 1; + objArray1[index220].SetDefaults(4728); + int index221 = index220 + 1; + objArray1[index221].SetDefaults(4729); + index1 = index221 + 1; + } + if (Main.xMas) + { + for (int Type = 1948; Type <= 1957; ++Type) + { + objArray1[index1].SetDefaults(Type); + ++index1; + } + } + for (int Type = 2158; Type <= 2160; ++Type) + { + if (index1 < 39) + objArray1[index1].SetDefaults(Type); + ++index1; + } + for (int Type = 2008; Type <= 2014; ++Type) + { + if (index1 < 39) + objArray1[index1].SetDefaults(Type); + ++index1; + } + break; + case 16: + Item[] objArray95 = objArray1; + int index222 = index1; + int num75 = index222 + 1; + objArray95[index222].SetDefaults(1430); + Item[] objArray96 = objArray1; + int index223 = num75; + int num76 = index223 + 1; + objArray96[index223].SetDefaults(986); + if (NPC.AnyNPCs(108)) + objArray1[num76++].SetDefaults(2999); + if (Main.hardMode && NPC.downedPlantBoss) + { + Item[] objArray97 = objArray1; + int index224 = num76; + int num77 = index224 + 1; + objArray97[index224].SetDefaults(1159); + Item[] objArray98 = objArray1; + int index225 = num77; + int num78 = index225 + 1; + objArray98[index225].SetDefaults(1160); + Item[] objArray99 = objArray1; + int index226 = num78; + int num79 = index226 + 1; + objArray99[index226].SetDefaults(1161); + if (!Main.dayTime) + objArray1[num79++].SetDefaults(1158); + if (Main.player[Main.myPlayer].ZoneJungle) + objArray1[num79++].SetDefaults(1167); + Item[] objArray100 = objArray1; + int index227 = num79; + num76 = index227 + 1; + objArray100[index227].SetDefaults(1339); + } + if (Main.hardMode && Main.player[Main.myPlayer].ZoneJungle) + { + objArray1[num76++].SetDefaults(1171); + if (!Main.dayTime) + objArray1[num76++].SetDefaults(1162); + } + Item[] objArray101 = objArray1; + int index228 = num76; + int num80 = index228 + 1; + objArray101[index228].SetDefaults(909); + Item[] objArray102 = objArray1; + int index229 = num80; + int num81 = index229 + 1; + objArray102[index229].SetDefaults(910); + Item[] objArray103 = objArray1; + int index230 = num81; + int num82 = index230 + 1; + objArray103[index230].SetDefaults(940); + Item[] objArray104 = objArray1; + int index231 = num82; + int num83 = index231 + 1; + objArray104[index231].SetDefaults(941); + Item[] objArray105 = objArray1; + int index232 = num83; + int num84 = index232 + 1; + objArray105[index232].SetDefaults(942); + Item[] objArray106 = objArray1; + int index233 = num84; + int num85 = index233 + 1; + objArray106[index233].SetDefaults(943); + Item[] objArray107 = objArray1; + int index234 = num85; + int num86 = index234 + 1; + objArray107[index234].SetDefaults(944); + Item[] objArray108 = objArray1; + int index235 = num86; + int num87 = index235 + 1; + objArray108[index235].SetDefaults(945); + Item[] objArray109 = objArray1; + int index236 = num87; + int num88 = index236 + 1; + objArray109[index236].SetDefaults(4922); + Item[] objArray110 = objArray1; + int index237 = num88; + index1 = index237 + 1; + objArray110[index237].SetDefaults(4417); + if (Main.player[Main.myPlayer].HasItem(1835)) + objArray1[index1++].SetDefaults(1836); + if (Main.player[Main.myPlayer].HasItem(1258)) + objArray1[index1++].SetDefaults(1261); + if (Main.halloween) + { + objArray1[index1++].SetDefaults(1791); + break; + } + break; + case 17: + objArray1[index1].SetDefaults(928); + int index238 = index1 + 1; + objArray1[index238].SetDefaults(929); + int index239 = index238 + 1; + objArray1[index239].SetDefaults(876); + int index240 = index239 + 1; + objArray1[index240].SetDefaults(877); + int index241 = index240 + 1; + objArray1[index241].SetDefaults(878); + int index242 = index241 + 1; + objArray1[index242].SetDefaults(2434); + index1 = index242 + 1; + int num89 = (int) (((double) Main.screenPosition.X + (double) (Main.screenWidth / 2)) / 16.0); + if ((double) Main.screenPosition.Y / 16.0 < Main.worldSurface + 10.0 && (num89 < 380 || num89 > Main.maxTilesX - 380)) + { + objArray1[index1].SetDefaults(1180); + ++index1; + } + if (Main.hardMode && NPC.downedMechBossAny && NPC.AnyNPCs(208)) + { + objArray1[index1].SetDefaults(1337); + ++index1; + break; + } + break; + case 18: + objArray1[index1].SetDefaults(1990); + int index243 = index1 + 1; + objArray1[index243].SetDefaults(1979); + index1 = index243 + 1; + if (Main.player[Main.myPlayer].statLifeMax >= 400) + { + objArray1[index1].SetDefaults(1977); + ++index1; + } + if (Main.player[Main.myPlayer].statManaMax >= 200) + { + objArray1[index1].SetDefaults(1978); + ++index1; + } + long num90 = 0; + for (int index244 = 0; index244 < 54; ++index244) + { + if (Main.player[Main.myPlayer].inventory[index244].type == 71) + num90 += (long) Main.player[Main.myPlayer].inventory[index244].stack; + if (Main.player[Main.myPlayer].inventory[index244].type == 72) + num90 += (long) (Main.player[Main.myPlayer].inventory[index244].stack * 100); + if (Main.player[Main.myPlayer].inventory[index244].type == 73) + num90 += (long) (Main.player[Main.myPlayer].inventory[index244].stack * 10000); + if (Main.player[Main.myPlayer].inventory[index244].type == 74) + num90 += (long) (Main.player[Main.myPlayer].inventory[index244].stack * 1000000); + } + if (num90 >= 1000000L) + { + objArray1[index1].SetDefaults(1980); + ++index1; + } + if (Main.moonPhase % 2 == 0 && Main.dayTime || Main.moonPhase % 2 == 1 && !Main.dayTime) + { + objArray1[index1].SetDefaults(1981); + ++index1; + } + if (Main.player[Main.myPlayer].team != 0) + { + objArray1[index1].SetDefaults(1982); + ++index1; + } + if (Main.hardMode) + { + objArray1[index1].SetDefaults(1983); + ++index1; + } + if (NPC.AnyNPCs(208)) + { + objArray1[index1].SetDefaults(1984); + ++index1; + } + if (Main.hardMode && NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3) + { + objArray1[index1].SetDefaults(1985); + ++index1; + } + if (Main.hardMode && NPC.downedMechBossAny) + { + objArray1[index1].SetDefaults(1986); + ++index1; + } + if (Main.hardMode && NPC.downedMartians) + { + objArray1[index1].SetDefaults(2863); + int index245 = index1 + 1; + objArray1[index245].SetDefaults(3259); + index1 = index245 + 1; + break; + } + break; + case 19: + for (int index246 = 0; index246 < 40; ++index246) + { + if (Main.travelShop[index246] != 0) + { + objArray1[index1].netDefaults(Main.travelShop[index246]); + ++index1; + } + } + break; + case 20: + if (Main.moonPhase % 2 == 0) + objArray1[index1].SetDefaults(3001); + else + objArray1[index1].SetDefaults(28); + int index247 = index1 + 1; + if (!Main.dayTime || Main.moonPhase == 0) + objArray1[index247].SetDefaults(3002); + else + objArray1[index247].SetDefaults(282); + int index248 = index247 + 1; + if (Main.time % 60.0 * 60.0 * 6.0 <= 10800.0) + objArray1[index248].SetDefaults(3004); + else + objArray1[index248].SetDefaults(8); + int index249 = index248 + 1; + if (Main.moonPhase == 0 || Main.moonPhase == 1 || Main.moonPhase == 4 || Main.moonPhase == 5) + objArray1[index249].SetDefaults(3003); + else + objArray1[index249].SetDefaults(40); + int index250 = index249 + 1; + if (Main.moonPhase % 4 == 0) + objArray1[index250].SetDefaults(3310); + else if (Main.moonPhase % 4 == 1) + objArray1[index250].SetDefaults(3313); + else if (Main.moonPhase % 4 == 2) + objArray1[index250].SetDefaults(3312); + else + objArray1[index250].SetDefaults(3311); + int index251 = index250 + 1; + objArray1[index251].SetDefaults(166); + int index252 = index251 + 1; + objArray1[index252].SetDefaults(965); + index1 = index252 + 1; + if (Main.hardMode) + { + if (Main.moonPhase < 4) + objArray1[index1].SetDefaults(3316); + else + objArray1[index1].SetDefaults(3315); + int index253 = index1 + 1; + objArray1[index253].SetDefaults(3334); + index1 = index253 + 1; + if (Main.bloodMoon) + { + objArray1[index1].SetDefaults(3258); + ++index1; + } + } + if (Main.moonPhase == 0 && !Main.dayTime) + { + objArray1[index1].SetDefaults(3043); + ++index1; + break; + } + break; + case 21: + bool flag2 = Main.hardMode && NPC.downedMechBossAny; + int num91 = !Main.hardMode ? 0 : (NPC.downedGolemBoss ? 1 : 0); + objArray1[index1].SetDefaults(353); + int index254 = index1 + 1; + objArray1[index254].SetDefaults(3828); + objArray1[index254].shopCustomPrice = num91 == 0 ? (!flag2 ? new int?(Item.buyPrice(silver: 25)) : new int?(Item.buyPrice(gold: 1))) : new int?(Item.buyPrice(gold: 4)); + int index255 = index254 + 1; + objArray1[index255].SetDefaults(3816); + int index256 = index255 + 1; + objArray1[index256].SetDefaults(3813); + objArray1[index256].shopCustomPrice = new int?(75); + objArray1[index256].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int num92 = index256 + 1; + int index257 = 10; + objArray1[index257].SetDefaults(3818); + objArray1[index257].shopCustomPrice = new int?(5); + objArray1[index257].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index258 = index257 + 1; + objArray1[index258].SetDefaults(3824); + objArray1[index258].shopCustomPrice = new int?(5); + objArray1[index258].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index259 = index258 + 1; + objArray1[index259].SetDefaults(3832); + objArray1[index259].shopCustomPrice = new int?(5); + objArray1[index259].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index260 = index259 + 1; + objArray1[index260].SetDefaults(3829); + objArray1[index260].shopCustomPrice = new int?(5); + objArray1[index260].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + if (flag2) + { + int index261 = 20; + objArray1[index261].SetDefaults(3819); + objArray1[index261].shopCustomPrice = new int?(25); + objArray1[index261].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index262 = index261 + 1; + objArray1[index262].SetDefaults(3825); + objArray1[index262].shopCustomPrice = new int?(25); + objArray1[index262].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index263 = index262 + 1; + objArray1[index263].SetDefaults(3833); + objArray1[index263].shopCustomPrice = new int?(25); + objArray1[index263].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index264 = index263 + 1; + objArray1[index264].SetDefaults(3830); + objArray1[index264].shopCustomPrice = new int?(25); + objArray1[index264].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + } + if (num91 != 0) + { + int index265 = 30; + objArray1[index265].SetDefaults(3820); + objArray1[index265].shopCustomPrice = new int?(100); + objArray1[index265].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index266 = index265 + 1; + objArray1[index266].SetDefaults(3826); + objArray1[index266].shopCustomPrice = new int?(100); + objArray1[index266].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index267 = index266 + 1; + objArray1[index267].SetDefaults(3834); + objArray1[index267].shopCustomPrice = new int?(100); + objArray1[index267].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index268 = index267 + 1; + objArray1[index268].SetDefaults(3831); + objArray1[index268].shopCustomPrice = new int?(100); + objArray1[index268].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + } + if (flag2) + { + int index269 = 4; + objArray1[index269].SetDefaults(3800); + objArray1[index269].shopCustomPrice = new int?(25); + objArray1[index269].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index270 = index269 + 1; + objArray1[index270].SetDefaults(3801); + objArray1[index270].shopCustomPrice = new int?(25); + objArray1[index270].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index271 = index270 + 1; + objArray1[index271].SetDefaults(3802); + objArray1[index271].shopCustomPrice = new int?(25); + objArray1[index271].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + num92 = index271 + 1; + int index272 = 14; + objArray1[index272].SetDefaults(3797); + objArray1[index272].shopCustomPrice = new int?(25); + objArray1[index272].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index273 = index272 + 1; + objArray1[index273].SetDefaults(3798); + objArray1[index273].shopCustomPrice = new int?(25); + objArray1[index273].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index274 = index273 + 1; + objArray1[index274].SetDefaults(3799); + objArray1[index274].shopCustomPrice = new int?(25); + objArray1[index274].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + num92 = index274 + 1; + int index275 = 24; + objArray1[index275].SetDefaults(3803); + objArray1[index275].shopCustomPrice = new int?(25); + objArray1[index275].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index276 = index275 + 1; + objArray1[index276].SetDefaults(3804); + objArray1[index276].shopCustomPrice = new int?(25); + objArray1[index276].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index277 = index276 + 1; + objArray1[index277].SetDefaults(3805); + objArray1[index277].shopCustomPrice = new int?(25); + objArray1[index277].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + num92 = index277 + 1; + int index278 = 34; + objArray1[index278].SetDefaults(3806); + objArray1[index278].shopCustomPrice = new int?(25); + objArray1[index278].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index279 = index278 + 1; + objArray1[index279].SetDefaults(3807); + objArray1[index279].shopCustomPrice = new int?(25); + objArray1[index279].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index280 = index279 + 1; + objArray1[index280].SetDefaults(3808); + objArray1[index280].shopCustomPrice = new int?(25); + objArray1[index280].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + num92 = index280 + 1; + } + if (num91 != 0) + { + int index281 = 7; + objArray1[index281].SetDefaults(3871); + objArray1[index281].shopCustomPrice = new int?(75); + objArray1[index281].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index282 = index281 + 1; + objArray1[index282].SetDefaults(3872); + objArray1[index282].shopCustomPrice = new int?(75); + objArray1[index282].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index283 = index282 + 1; + objArray1[index283].SetDefaults(3873); + objArray1[index283].shopCustomPrice = new int?(75); + objArray1[index283].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + num92 = index283 + 1; + int index284 = 17; + objArray1[index284].SetDefaults(3874); + objArray1[index284].shopCustomPrice = new int?(75); + objArray1[index284].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index285 = index284 + 1; + objArray1[index285].SetDefaults(3875); + objArray1[index285].shopCustomPrice = new int?(75); + objArray1[index285].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index286 = index285 + 1; + objArray1[index286].SetDefaults(3876); + objArray1[index286].shopCustomPrice = new int?(75); + objArray1[index286].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + num92 = index286 + 1; + int index287 = 27; + objArray1[index287].SetDefaults(3877); + objArray1[index287].shopCustomPrice = new int?(75); + objArray1[index287].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index288 = index287 + 1; + objArray1[index288].SetDefaults(3878); + objArray1[index288].shopCustomPrice = new int?(75); + objArray1[index288].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index289 = index288 + 1; + objArray1[index289].SetDefaults(3879); + objArray1[index289].shopCustomPrice = new int?(75); + objArray1[index289].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + num92 = index289 + 1; + int index290 = 37; + objArray1[index290].SetDefaults(3880); + objArray1[index290].shopCustomPrice = new int?(75); + objArray1[index290].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index291 = index290 + 1; + objArray1[index291].SetDefaults(3881); + objArray1[index291].shopCustomPrice = new int?(75); + objArray1[index291].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + int index292 = index291 + 1; + objArray1[index292].SetDefaults(3882); + objArray1[index292].shopCustomPrice = new int?(75); + objArray1[index292].shopSpecialCurrency = CustomCurrencyID.DefenderMedals; + num92 = index292 + 1; + } + index1 = num91 == 0 ? (!flag2 ? 4 : 30) : 39; + break; + case 22: + Item[] objArray111 = objArray1; + int index293 = index1; + int num93 = index293 + 1; + objArray111[index293].SetDefaults(4587); + Item[] objArray112 = objArray1; + int index294 = num93; + int num94 = index294 + 1; + objArray112[index294].SetDefaults(4590); + Item[] objArray113 = objArray1; + int index295 = num94; + int num95 = index295 + 1; + objArray113[index295].SetDefaults(4589); + Item[] objArray114 = objArray1; + int index296 = num95; + int num96 = index296 + 1; + objArray114[index296].SetDefaults(4588); + Item[] objArray115 = objArray1; + int index297 = num96; + int num97 = index297 + 1; + objArray115[index297].SetDefaults(4083); + Item[] objArray116 = objArray1; + int index298 = num97; + int num98 = index298 + 1; + objArray116[index298].SetDefaults(4084); + Item[] objArray117 = objArray1; + int index299 = num98; + int num99 = index299 + 1; + objArray117[index299].SetDefaults(4085); + Item[] objArray118 = objArray1; + int index300 = num99; + int num100 = index300 + 1; + objArray118[index300].SetDefaults(4086); + Item[] objArray119 = objArray1; + int index301 = num100; + int num101 = index301 + 1; + objArray119[index301].SetDefaults(4087); + Item[] objArray120 = objArray1; + int index302 = num101; + int index303 = index302 + 1; + objArray120[index302].SetDefaults(4088); + int scoreAccumulated2 = Main.LocalPlayer.golferScoreAccumulated; + if (scoreAccumulated2 > 500) + { + objArray1[index303].SetDefaults(4039); + int index304 = index303 + 1; + objArray1[index304].SetDefaults(4094); + int index305 = index304 + 1; + objArray1[index305].SetDefaults(4093); + int index306 = index305 + 1; + objArray1[index306].SetDefaults(4092); + index303 = index306 + 1; + } + Item[] objArray121 = objArray1; + int index307 = index303; + int num102 = index307 + 1; + objArray121[index307].SetDefaults(4089); + Item[] objArray122 = objArray1; + int index308 = num102; + int num103 = index308 + 1; + objArray122[index308].SetDefaults(3989); + Item[] objArray123 = objArray1; + int index309 = num103; + int num104 = index309 + 1; + objArray123[index309].SetDefaults(4095); + Item[] objArray124 = objArray1; + int index310 = num104; + int num105 = index310 + 1; + objArray124[index310].SetDefaults(4040); + Item[] objArray125 = objArray1; + int index311 = num105; + int num106 = index311 + 1; + objArray125[index311].SetDefaults(4319); + Item[] objArray126 = objArray1; + int index312 = num106; + int index313 = index312 + 1; + objArray126[index312].SetDefaults(4320); + if (scoreAccumulated2 > 1000) + { + objArray1[index313].SetDefaults(4591); + int index314 = index313 + 1; + objArray1[index314].SetDefaults(4594); + int index315 = index314 + 1; + objArray1[index315].SetDefaults(4593); + int index316 = index315 + 1; + objArray1[index316].SetDefaults(4592); + index313 = index316 + 1; + } + Item[] objArray127 = objArray1; + int index317 = index313; + int num107 = index317 + 1; + objArray127[index317].SetDefaults(4135); + Item[] objArray128 = objArray1; + int index318 = num107; + int num108 = index318 + 1; + objArray128[index318].SetDefaults(4138); + Item[] objArray129 = objArray1; + int index319 = num108; + int num109 = index319 + 1; + objArray129[index319].SetDefaults(4136); + Item[] objArray130 = objArray1; + int index320 = num109; + int num110 = index320 + 1; + objArray130[index320].SetDefaults(4137); + Item[] objArray131 = objArray1; + int index321 = num110; + index1 = index321 + 1; + objArray131[index321].SetDefaults(4049); + if (scoreAccumulated2 > 500) + { + objArray1[index1].SetDefaults(4265); + ++index1; + } + if (scoreAccumulated2 > 2000) + { + objArray1[index1].SetDefaults(4595); + int index322 = index1 + 1; + objArray1[index322].SetDefaults(4598); + int index323 = index322 + 1; + objArray1[index323].SetDefaults(4597); + int index324 = index323 + 1; + objArray1[index324].SetDefaults(4596); + index1 = index324 + 1; + if (NPC.downedBoss3) + { + objArray1[index1].SetDefaults(4264); + ++index1; + } + } + if (scoreAccumulated2 > 500) + { + objArray1[index1].SetDefaults(4599); + ++index1; + } + if (scoreAccumulated2 >= 1000) + { + objArray1[index1].SetDefaults(4600); + ++index1; + } + if (scoreAccumulated2 >= 2000) + { + objArray1[index1].SetDefaults(4601); + ++index1; + } + if (scoreAccumulated2 >= 2000) + { + switch (Main.moonPhase) + { + case 0: + case 1: + objArray1[index1].SetDefaults(4658); + ++index1; + break; + case 2: + case 3: + objArray1[index1].SetDefaults(4659); + ++index1; + break; + case 4: + case 5: + objArray1[index1].SetDefaults(4660); + ++index1; + break; + case 6: + case 7: + objArray1[index1].SetDefaults(4661); + ++index1; + break; + } + } + else + break; + break; + case 23: + BestiaryUnlockProgressReport bestiaryProgressReport = Main.GetBestiaryProgressReport(); + if (Chest.BestiaryGirl_IsFairyTorchAvailable()) + objArray1[index1++].SetDefaults(4776); + Item[] objArray132 = objArray1; + int index325 = index1; + int num111 = index325 + 1; + objArray132[index325].SetDefaults(4767); + Item[] objArray133 = objArray1; + int index326 = num111; + index1 = index326 + 1; + objArray133[index326].SetDefaults(4759); + if ((double) bestiaryProgressReport.CompletionPercent >= 0.150000005960464) + objArray1[index1++].SetDefaults(4672); + if (!NPC.boughtCat) + objArray1[index1++].SetDefaults(4829); + if (!NPC.boughtDog && (double) bestiaryProgressReport.CompletionPercent >= 0.25) + objArray1[index1++].SetDefaults(4830); + if (!NPC.boughtBunny && (double) bestiaryProgressReport.CompletionPercent >= 0.449999988079071) + objArray1[index1++].SetDefaults(4910); + if ((double) bestiaryProgressReport.CompletionPercent >= 0.300000011920929) + objArray1[index1++].SetDefaults(4871); + if ((double) bestiaryProgressReport.CompletionPercent >= 0.300000011920929) + objArray1[index1++].SetDefaults(4907); + if (NPC.downedTowerSolar) + objArray1[index1++].SetDefaults(4677); + if ((double) bestiaryProgressReport.CompletionPercent >= 0.100000001490116) + objArray1[index1++].SetDefaults(4676); + if ((double) bestiaryProgressReport.CompletionPercent >= 0.300000011920929) + objArray1[index1++].SetDefaults(4762); + if ((double) bestiaryProgressReport.CompletionPercent >= 0.25) + objArray1[index1++].SetDefaults(4716); + if ((double) bestiaryProgressReport.CompletionPercent >= 0.300000011920929) + objArray1[index1++].SetDefaults(4785); + if ((double) bestiaryProgressReport.CompletionPercent >= 0.300000011920929) + objArray1[index1++].SetDefaults(4786); + if ((double) bestiaryProgressReport.CompletionPercent >= 0.300000011920929) + objArray1[index1++].SetDefaults(4787); + if ((double) bestiaryProgressReport.CompletionPercent >= 0.300000011920929 && Main.hardMode) + objArray1[index1++].SetDefaults(4788); + if ((double) bestiaryProgressReport.CompletionPercent >= 0.400000005960464) + objArray1[index1++].SetDefaults(4955); + if (Main.hardMode && Main.bloodMoon) + objArray1[index1++].SetDefaults(4736); + if (NPC.downedPlantBoss) + objArray1[index1++].SetDefaults(4701); + if ((double) bestiaryProgressReport.CompletionPercent >= 0.5) + objArray1[index1++].SetDefaults(4765); + if ((double) bestiaryProgressReport.CompletionPercent >= 0.5) + objArray1[index1++].SetDefaults(4766); + if ((double) bestiaryProgressReport.CompletionPercent >= 0.5) + objArray1[index1++].SetDefaults(4777); + if ((double) bestiaryProgressReport.CompletionPercent >= 0.600000023841858) + objArray1[index1++].SetDefaults(4763); + if ((double) bestiaryProgressReport.CompletionPercent >= 0.699999988079071) + objArray1[index1++].SetDefaults(4735); + if ((double) bestiaryProgressReport.CompletionPercent >= 1.0) + objArray1[index1++].SetDefaults(4951); + switch (Main.moonPhase) + { + case 0: + case 1: + Item[] objArray134 = objArray1; + int index327 = index1; + int num112 = index327 + 1; + objArray134[index327].SetDefaults(4768); + Item[] objArray135 = objArray1; + int index328 = num112; + index1 = index328 + 1; + objArray135[index328].SetDefaults(4769); + break; + case 2: + case 3: + Item[] objArray136 = objArray1; + int index329 = index1; + int num113 = index329 + 1; + objArray136[index329].SetDefaults(4770); + Item[] objArray137 = objArray1; + int index330 = num113; + index1 = index330 + 1; + objArray137[index330].SetDefaults(4771); + break; + case 4: + case 5: + Item[] objArray138 = objArray1; + int index331 = index1; + int num114 = index331 + 1; + objArray138[index331].SetDefaults(4772); + Item[] objArray139 = objArray1; + int index332 = num114; + index1 = index332 + 1; + objArray139[index332].SetDefaults(4773); + break; + case 6: + case 7: + Item[] objArray140 = objArray1; + int index333 = index1; + int num115 = index333 + 1; + objArray140[index333].SetDefaults(4560); + Item[] objArray141 = objArray1; + int index334 = num115; + index1 = index334 + 1; + objArray141[index334].SetDefaults(4775); + break; + } + break; + } + if (((type == 19 ? 0 : (type != 20 ? 1 : 0)) & (flag1 ? 1 : 0)) != 0 && !Main.player[Main.myPlayer].ZoneCorrupt && !Main.player[Main.myPlayer].ZoneCrimson) + { + if (!Main.player[Main.myPlayer].ZoneSnow && !Main.player[Main.myPlayer].ZoneDesert && !Main.player[Main.myPlayer].ZoneBeach && !Main.player[Main.myPlayer].ZoneJungle && !Main.player[Main.myPlayer].ZoneHallow && !Main.player[Main.myPlayer].ZoneGlowshroom && (double) Main.player[Main.myPlayer].Center.Y / 16.0 < Main.worldSurface && index1 < 39) + objArray1[index1++].SetDefaults(4876); + if (Main.player[Main.myPlayer].ZoneSnow && index1 < 39) + objArray1[index1++].SetDefaults(4920); + if (Main.player[Main.myPlayer].ZoneDesert && index1 < 39) + objArray1[index1++].SetDefaults(4919); + if (!Main.player[Main.myPlayer].ZoneSnow && !Main.player[Main.myPlayer].ZoneDesert && !Main.player[Main.myPlayer].ZoneBeach && !Main.player[Main.myPlayer].ZoneJungle && !Main.player[Main.myPlayer].ZoneHallow && !Main.player[Main.myPlayer].ZoneGlowshroom && (double) Main.player[Main.myPlayer].Center.Y / 16.0 >= Main.worldSurface && index1 < 39) + objArray1[index1++].SetDefaults(4917); + if (Main.player[Main.myPlayer].ZoneBeach && (double) Main.player[Main.myPlayer].position.Y < Main.worldSurface * 16.0 && index1 < 39) + objArray1[index1++].SetDefaults(4918); + if (Main.player[Main.myPlayer].ZoneJungle && index1 < 39) + objArray1[index1++].SetDefaults(4875); + if (Main.player[Main.myPlayer].ZoneHallow && index1 < 39) + objArray1[index1++].SetDefaults(4916); + if (Main.player[Main.myPlayer].ZoneGlowshroom && index1 < 39) + objArray1[index1++].SetDefaults(4921); + } + for (int index335 = 0; index335 < index1; ++index335) + objArray1[index335].isAShopItem = true; + } + + private static bool BestiaryGirl_IsFairyTorchAvailable() => Chest.DidDiscoverBestiaryEntry(585) && Chest.DidDiscoverBestiaryEntry(584) && Chest.DidDiscoverBestiaryEntry(583); + + private static bool DidDiscoverBestiaryEntry(int npcId) => Main.BestiaryDB.FindEntryByNPCID(npcId).UIInfoProvider.GetEntryUICollectionInfo().UnlockState > BestiaryEntryUnlockState.NotKnownAtAll_0; + + public static void UpdateChestFrames() + { + int num = 8000; + Chest._chestInUse.Clear(); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && Main.player[index].chest >= 0 && Main.player[index].chest < num) + Chest._chestInUse.Add(Main.player[index].chest); + } + for (int index = 0; index < num; ++index) + { + Chest chest = Main.chest[index]; + if (chest != null) + { + if (Chest._chestInUse.Contains(index)) + ++chest.frameCounter; + else + --chest.frameCounter; + if (chest.frameCounter < 0) + chest.frameCounter = 0; + if (chest.frameCounter > 10) + chest.frameCounter = 10; + chest.frame = chest.frameCounter != 0 ? (chest.frameCounter != 10 ? 1 : 2) : 0; + } + } + } + } +} diff --git a/Cinematics/CinematicManager.cs b/Cinematics/CinematicManager.cs new file mode 100644 index 0000000..0b3726d --- /dev/null +++ b/Cinematics/CinematicManager.cs @@ -0,0 +1,35 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Cinematics.CinematicManager +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; + +namespace Terraria.Cinematics +{ + public class CinematicManager + { + public static CinematicManager Instance = new CinematicManager(); + private List _films = new List(); + + public void Update(GameTime gameTime) + { + if (this._films.Count <= 0) + return; + if (!this._films[0].IsActive) + this._films[0].OnBegin(); + if (!Main.hasFocus || Main.gamePaused || this._films[0].OnUpdate(gameTime)) + return; + this._films[0].OnEnd(); + this._films.RemoveAt(0); + } + + public void PlayFilm(Film film) => this._films.Add(film); + + public void StopAll() + { + } + } +} diff --git a/Cinematics/DD2Film.cs b/Cinematics/DD2Film.cs new file mode 100644 index 0000000..3434807 --- /dev/null +++ b/Cinematics/DD2Film.cs @@ -0,0 +1,360 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Cinematics.DD2Film +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.Audio; +using Terraria.GameContent.UI; +using Terraria.ID; + +namespace Terraria.Cinematics +{ + public class DD2Film : Film + { + private NPC _dryad; + private NPC _ogre; + private NPC _portal; + private List _army = new List(); + private List _critters = new List(); + private Vector2 _startPoint; + + public DD2Film() + { + this.AppendKeyFrames(new FrameEvent(this.CreateDryad), new FrameEvent(this.CreateCritters)); + this.AppendSequences(120, new FrameEvent(this.DryadStand), new FrameEvent(this.DryadLookRight)); + this.AppendSequences(100, new FrameEvent(this.DryadLookRight), new FrameEvent(this.DryadInteract)); + this.AddKeyFrame(this.AppendPoint - 20, new FrameEvent(this.CreatePortal)); + this.AppendSequences(30, new FrameEvent(this.DryadLookLeft), new FrameEvent(this.DryadStand)); + this.AppendSequences(40, new FrameEvent(this.DryadConfusedEmote), new FrameEvent(this.DryadStand), new FrameEvent(this.DryadLookLeft)); + this.AppendKeyFrame(new FrameEvent(this.CreateOgre)); + this.AddKeyFrame(this.AppendPoint + 60, new FrameEvent(this.SpawnJavalinThrower)); + this.AddKeyFrame(this.AppendPoint + 120, new FrameEvent(this.SpawnGoblin)); + this.AddKeyFrame(this.AppendPoint + 180, new FrameEvent(this.SpawnGoblin)); + this.AddKeyFrame(this.AppendPoint + 240, new FrameEvent(this.SpawnWitherBeast)); + this.AppendSequences(30, new FrameEvent(this.DryadStand), new FrameEvent(this.DryadLookLeft)); + this.AppendSequences(30, new FrameEvent(this.DryadLookRight), new FrameEvent(this.DryadWalk)); + this.AppendSequences(300, new FrameEvent(this.DryadAttack), new FrameEvent(this.DryadLookLeft)); + this.AppendKeyFrame(new FrameEvent(this.RemoveEnemyDamage)); + this.AppendSequences(60, new FrameEvent(this.DryadLookRight), new FrameEvent(this.DryadStand), new FrameEvent(this.DryadAlertEmote)); + this.AddSequences(this.AppendPoint - 90, 60, new FrameEvent(this.OgreLookLeft), new FrameEvent(this.OgreStand)); + this.AddKeyFrame(this.AppendPoint - 12, new FrameEvent(this.OgreSwingSound)); + this.AddSequences(this.AppendPoint - 30, 50, new FrameEvent(this.DryadPortalKnock), new FrameEvent(this.DryadStand)); + this.AppendKeyFrame(new FrameEvent(this.RestoreEnemyDamage)); + this.AppendSequences(40, new FrameEvent(this.DryadPortalFade), new FrameEvent(this.DryadStand)); + this.AppendSequence(180, new FrameEvent(this.DryadStand)); + this.AddSequence(0, this.AppendPoint, new FrameEvent(this.PerFrameSettings)); + } + + private void PerFrameSettings(FrameEventData evt) => CombatText.clearAll(); + + private void CreateDryad(FrameEventData evt) + { + this._dryad = this.PlaceNPCOnGround(20, this._startPoint); + this._dryad.knockBackResist = 0.0f; + this._dryad.immortal = true; + this._dryad.dontTakeDamage = true; + this._dryad.takenDamageMultiplier = 0.0f; + this._dryad.immune[(int) byte.MaxValue] = 100000; + } + + private void DryadInteract(FrameEventData evt) + { + if (this._dryad == null) + return; + this._dryad.ai[0] = 9f; + if (evt.IsFirstFrame) + this._dryad.ai[1] = (float) evt.Duration; + this._dryad.localAI[0] = 0.0f; + } + + private void SpawnWitherBeast(FrameEventData evt) + { + int index = NPC.NewNPC((int) this._portal.Center.X, (int) this._portal.Bottom.Y, 568); + NPC npc = Main.npc[index]; + npc.knockBackResist = 0.0f; + npc.immortal = true; + npc.dontTakeDamage = true; + npc.takenDamageMultiplier = 0.0f; + npc.immune[(int) byte.MaxValue] = 100000; + npc.friendly = this._ogre.friendly; + this._army.Add(npc); + } + + private void SpawnJavalinThrower(FrameEventData evt) + { + int index = NPC.NewNPC((int) this._portal.Center.X, (int) this._portal.Bottom.Y, 561); + NPC npc = Main.npc[index]; + npc.knockBackResist = 0.0f; + npc.immortal = true; + npc.dontTakeDamage = true; + npc.takenDamageMultiplier = 0.0f; + npc.immune[(int) byte.MaxValue] = 100000; + npc.friendly = this._ogre.friendly; + this._army.Add(npc); + } + + private void SpawnGoblin(FrameEventData evt) + { + int index = NPC.NewNPC((int) this._portal.Center.X, (int) this._portal.Bottom.Y, 552); + NPC npc = Main.npc[index]; + npc.knockBackResist = 0.0f; + npc.immortal = true; + npc.dontTakeDamage = true; + npc.takenDamageMultiplier = 0.0f; + npc.immune[(int) byte.MaxValue] = 100000; + npc.friendly = this._ogre.friendly; + this._army.Add(npc); + } + + private void CreateCritters(FrameEventData evt) + { + for (int index = 0; index < 5; ++index) + { + float num = (float) index / 5f; + NPC npc = this.PlaceNPCOnGround((int) Utils.SelectRandom(Main.rand, (short) 46, (short) 46, (short) 299, (short) 538), this._startPoint + new Vector2((float) (((double) num - 0.25) * 400.0 + (double) Main.rand.NextFloat() * 50.0 - 25.0), 0.0f)); + npc.ai[0] = 0.0f; + npc.ai[1] = 600f; + this._critters.Add(npc); + } + if (this._dryad == null) + return; + for (int index1 = 0; index1 < 10; ++index1) + { + double num = (double) index1 / 10.0; + int index2 = NPC.NewNPC((int) this._dryad.position.X + Main.rand.Next(-1000, 800), (int) this._dryad.position.Y - Main.rand.Next(-50, 300), 356); + NPC npc = Main.npc[index2]; + npc.ai[0] = (float) ((double) Main.rand.NextFloat() * 4.0 - 2.0); + npc.ai[1] = (float) ((double) Main.rand.NextFloat() * 4.0 - 2.0); + npc.velocity.X = (float) ((double) Main.rand.NextFloat() * 4.0 - 2.0); + this._critters.Add(npc); + } + } + + private void OgreSwingSound(FrameEventData evt) => SoundEngine.PlaySound(SoundID.DD2_OgreAttack, this._ogre.Center); + + private void DryadPortalKnock(FrameEventData evt) + { + if (this._dryad != null) + { + if (evt.Frame == 20) + { + this._dryad.velocity.Y -= 7f; + this._dryad.velocity.X -= 8f; + SoundEngine.PlaySound(3, (int) this._dryad.Center.X, (int) this._dryad.Center.Y); + } + if (evt.Frame >= 20) + { + this._dryad.ai[0] = 1f; + this._dryad.ai[1] = (float) evt.Remaining; + this._dryad.rotation += 0.05f; + } + } + if (this._ogre == null) + return; + if (evt.Frame > 40) + { + this._ogre.target = Main.myPlayer; + this._ogre.direction = 1; + } + else + { + this._ogre.direction = -1; + this._ogre.ai[1] = 0.0f; + this._ogre.ai[0] = Math.Min(40f, this._ogre.ai[0]); + this._ogre.target = 300 + this._dryad.whoAmI; + } + } + + private void RemoveEnemyDamage(FrameEventData evt) + { + this._ogre.friendly = true; + foreach (NPC npc in this._army) + npc.friendly = true; + } + + private void RestoreEnemyDamage(FrameEventData evt) + { + this._ogre.friendly = false; + foreach (NPC npc in this._army) + npc.friendly = false; + } + + private void DryadPortalFade(FrameEventData evt) + { + if (this._dryad == null || this._portal == null) + return; + if (evt.IsFirstFrame) + SoundEngine.PlaySound(SoundID.DD2_EtherianPortalDryadTouch, this._dryad.Center); + float amount = Math.Max(0.0f, (float) (evt.Frame - 7) / (float) (evt.Duration - 7)); + this._dryad.color = new Color(Vector3.Lerp(Vector3.One, new Vector3(0.5f, 0.0f, 0.8f), amount)); + this._dryad.Opacity = 1f - amount; + this._dryad.rotation += (float) (0.0500000007450581 * ((double) amount * 4.0 + 1.0)); + this._dryad.scale = 1f - amount; + if ((double) this._dryad.position.X < (double) this._portal.Right.X) + { + this._dryad.velocity.X *= 0.95f; + this._dryad.velocity.Y *= 0.55f; + } + int num1 = (int) (6.0 * (double) amount); + float num2 = this._dryad.Size.Length() / 2f / 20f; + for (int index = 0; index < num1; ++index) + { + if (Main.rand.Next(5) == 0) + { + Dust dust = Dust.NewDustDirect(this._dryad.position, this._dryad.width, this._dryad.height, 27, this._dryad.velocity.X * 1f, Alpha: 100); + dust.scale = 0.55f; + dust.fadeIn = 0.7f; + dust.velocity *= 0.1f * num2; + dust.velocity += this._dryad.velocity; + } + } + } + + private void CreatePortal(FrameEventData evt) + { + this._portal = this.PlaceNPCOnGround(549, this._startPoint + new Vector2(-240f, 0.0f)); + this._portal.immortal = true; + } + + private void DryadStand(FrameEventData evt) + { + if (this._dryad == null) + return; + this._dryad.ai[0] = 0.0f; + this._dryad.ai[1] = (float) evt.Remaining; + } + + private void DryadLookRight(FrameEventData evt) + { + if (this._dryad == null) + return; + this._dryad.direction = 1; + this._dryad.spriteDirection = 1; + } + + private void DryadLookLeft(FrameEventData evt) + { + if (this._dryad == null) + return; + this._dryad.direction = -1; + this._dryad.spriteDirection = -1; + } + + private void DryadWalk(FrameEventData evt) + { + this._dryad.ai[0] = 1f; + this._dryad.ai[1] = 2f; + } + + private void DryadConfusedEmote(FrameEventData evt) + { + if (this._dryad == null || !evt.IsFirstFrame) + return; + EmoteBubble.NewBubble(87, new WorldUIAnchor((Entity) this._dryad), evt.Duration); + } + + private void DryadAlertEmote(FrameEventData evt) + { + if (this._dryad == null || !evt.IsFirstFrame) + return; + EmoteBubble.NewBubble(3, new WorldUIAnchor((Entity) this._dryad), evt.Duration); + } + + private void CreateOgre(FrameEventData evt) + { + int index = NPC.NewNPC((int) this._portal.Center.X, (int) this._portal.Bottom.Y, 576); + this._ogre = Main.npc[index]; + this._ogre.knockBackResist = 0.0f; + this._ogre.immortal = true; + this._ogre.dontTakeDamage = true; + this._ogre.takenDamageMultiplier = 0.0f; + this._ogre.immune[(int) byte.MaxValue] = 100000; + } + + private void OgreStand(FrameEventData evt) + { + if (this._ogre == null) + return; + this._ogre.ai[0] = 0.0f; + this._ogre.ai[1] = 0.0f; + this._ogre.velocity = Vector2.Zero; + } + + private void DryadAttack(FrameEventData evt) + { + if (this._dryad == null) + return; + this._dryad.ai[0] = 14f; + this._dryad.ai[1] = (float) evt.Remaining; + this._dryad.dryadWard = false; + } + + private void OgreLookRight(FrameEventData evt) + { + if (this._ogre == null) + return; + this._ogre.direction = 1; + this._ogre.spriteDirection = 1; + } + + private void OgreLookLeft(FrameEventData evt) + { + if (this._ogre == null) + return; + this._ogre.direction = -1; + this._ogre.spriteDirection = -1; + } + + public override void OnBegin() + { + Main.NewText("DD2Film: Begin"); + Main.dayTime = true; + Main.time = 27000.0; + this._startPoint = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY - 32f); + base.OnBegin(); + } + + private NPC PlaceNPCOnGround(int type, Vector2 position) + { + int x = (int) position.X; + int y = (int) position.Y; + int i = x / 16; + int j = y / 16; + while (!WorldGen.SolidTile(i, j)) + ++j; + int Y = j * 16; + int Start = 100; + switch (type) + { + case 20: + Start = 1; + break; + case 576: + Start = 50; + break; + } + int index = NPC.NewNPC(x, Y, type, Start); + return Main.npc[index]; + } + + public override void OnEnd() + { + if (this._dryad != null) + this._dryad.active = false; + if (this._portal != null) + this._portal.active = false; + if (this._ogre != null) + this._ogre.active = false; + foreach (Entity critter in this._critters) + critter.active = false; + foreach (Entity entity in this._army) + entity.active = false; + Main.NewText("DD2Film: End"); + base.OnEnd(); + } + } +} diff --git a/Cinematics/Film.cs b/Cinematics/Film.cs new file mode 100644 index 0000000..1e5a6b0 --- /dev/null +++ b/Cinematics/Film.cs @@ -0,0 +1,120 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Cinematics.Film +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; + +namespace Terraria.Cinematics +{ + public class Film + { + private int _frame; + private int _frameCount; + private int _nextSequenceAppendTime; + private bool _isActive; + private List _sequences = new List(); + + public int Frame => this._frame; + + public int FrameCount => this._frameCount; + + public int AppendPoint => this._nextSequenceAppendTime; + + public bool IsActive => this._isActive; + + public void AddSequence(int start, int duration, FrameEvent frameEvent) + { + this._sequences.Add(new Film.Sequence(frameEvent, start, duration)); + this._nextSequenceAppendTime = Math.Max(this._nextSequenceAppendTime, start + duration); + this._frameCount = Math.Max(this._frameCount, start + duration); + } + + public void AppendSequence(int duration, FrameEvent frameEvent) => this.AddSequence(this._nextSequenceAppendTime, duration, frameEvent); + + public void AddSequences(int start, int duration, params FrameEvent[] frameEvents) + { + foreach (FrameEvent frameEvent in frameEvents) + this.AddSequence(start, duration, frameEvent); + } + + public void AppendSequences(int duration, params FrameEvent[] frameEvents) + { + int sequenceAppendTime = this._nextSequenceAppendTime; + foreach (FrameEvent frameEvent in frameEvents) + { + this._sequences.Add(new Film.Sequence(frameEvent, sequenceAppendTime, duration)); + this._nextSequenceAppendTime = Math.Max(this._nextSequenceAppendTime, sequenceAppendTime + duration); + this._frameCount = Math.Max(this._frameCount, sequenceAppendTime + duration); + } + } + + public void AppendEmptySequence(int duration) => this.AddSequence(this._nextSequenceAppendTime, duration, new FrameEvent(Film.EmptyFrameEvent)); + + public void AppendKeyFrame(FrameEvent frameEvent) => this.AddKeyFrame(this._nextSequenceAppendTime, frameEvent); + + public void AppendKeyFrames(params FrameEvent[] frameEvents) + { + int sequenceAppendTime = this._nextSequenceAppendTime; + foreach (FrameEvent frameEvent in frameEvents) + this._sequences.Add(new Film.Sequence(frameEvent, sequenceAppendTime, 1)); + this._frameCount = Math.Max(this._frameCount, sequenceAppendTime + 1); + } + + public void AddKeyFrame(int frame, FrameEvent frameEvent) + { + this._sequences.Add(new Film.Sequence(frameEvent, frame, 1)); + this._frameCount = Math.Max(this._frameCount, frame + 1); + } + + public void AddKeyFrames(int frame, params FrameEvent[] frameEvents) + { + foreach (FrameEvent frameEvent in frameEvents) + this.AddKeyFrame(frame, frameEvent); + } + + public bool OnUpdate(GameTime gameTime) + { + if (this._sequences.Count == 0) + return false; + foreach (Film.Sequence sequence in this._sequences) + { + int num = this._frame - sequence.Start; + if (num >= 0 && num < sequence.Duration) + sequence.Event(new FrameEventData(this._frame, sequence.Start, sequence.Duration)); + } + return ++this._frame != this._frameCount; + } + + public virtual void OnBegin() => this._isActive = true; + + public virtual void OnEnd() => this._isActive = false; + + private static void EmptyFrameEvent(FrameEventData evt) + { + } + + private class Sequence + { + private FrameEvent _frameEvent; + private int _duration; + private int _start; + + public FrameEvent Event => this._frameEvent; + + public int Duration => this._duration; + + public int Start => this._start; + + public Sequence(FrameEvent frameEvent, int start, int duration) + { + this._frameEvent = frameEvent; + this._start = start; + this._duration = duration; + } + } + } +} diff --git a/Cinematics/FrameEvent.cs b/Cinematics/FrameEvent.cs new file mode 100644 index 0000000..7ba22b2 --- /dev/null +++ b/Cinematics/FrameEvent.cs @@ -0,0 +1,10 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Cinematics.FrameEvent +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Cinematics +{ + public delegate void FrameEvent(FrameEventData evt); +} diff --git a/Cinematics/FrameEventData.cs b/Cinematics/FrameEventData.cs new file mode 100644 index 0000000..e025bf2 --- /dev/null +++ b/Cinematics/FrameEventData.cs @@ -0,0 +1,36 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Cinematics.FrameEventData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Cinematics +{ + public struct FrameEventData + { + private int _absoluteFrame; + private int _start; + private int _duration; + + public int AbsoluteFrame => this._absoluteFrame; + + public int Start => this._start; + + public int Duration => this._duration; + + public int Frame => this._absoluteFrame - this._start; + + public bool IsFirstFrame => this._start == this._absoluteFrame; + + public bool IsLastFrame => this.Remaining == 0; + + public int Remaining => this._start + this._duration - this._absoluteFrame - 1; + + public FrameEventData(int absoluteFrame, int start, int duration) + { + this._absoluteFrame = absoluteFrame; + this._start = start; + this._duration = duration; + } + } +} diff --git a/Cloud.cs b/Cloud.cs new file mode 100644 index 0000000..6438a13 --- /dev/null +++ b/Cloud.cs @@ -0,0 +1,295 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Cloud +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.GameContent; +using Terraria.Utilities; + +namespace Terraria +{ + public class Cloud + { + public Vector2 position; + public float scale; + public float rotation; + public float rSpeed; + public float sSpeed; + public bool active; + public SpriteEffects spriteDir; + public int type; + public int width; + public int height; + public float Alpha; + public bool kill; + private static UnifiedRandom rand = new UnifiedRandom(); + + public static void resetClouds() + { + if (Main.dedServ) + return; + Main.windSpeedCurrent = Main.windSpeedTarget; + for (int index = 0; index < 200; ++index) + Main.cloud[index].active = false; + for (int index = 0; index < Main.numClouds; ++index) + { + Cloud.addCloud(); + Main.cloud[index].Alpha = 1f; + } + for (int index = 0; index < 200; ++index) + Main.cloud[index].Alpha = 1f; + } + + public static void addCloud() + { + if (Main.netMode == 2) + return; + int index1 = -1; + for (int index2 = 0; index2 < 200; ++index2) + { + if (!Main.cloud[index2].active) + { + index1 = index2; + break; + } + } + if (index1 < 0) + return; + Main.cloud[index1].kill = false; + Main.cloud[index1].rSpeed = 0.0f; + Main.cloud[index1].sSpeed = 0.0f; + Main.cloud[index1].scale = (float) Cloud.rand.Next(70, 131) * 0.01f; + Main.cloud[index1].rotation = (float) Cloud.rand.Next(-10, 11) * 0.01f; + Main.cloud[index1].width = (int) ((double) TextureAssets.Cloud[Main.cloud[index1].type].Width() * (double) Main.cloud[index1].scale); + Main.cloud[index1].height = (int) ((double) TextureAssets.Cloud[Main.cloud[index1].type].Height() * (double) Main.cloud[index1].scale); + Main.cloud[index1].Alpha = 0.0f; + Main.cloud[index1].spriteDir = SpriteEffects.None; + if (Cloud.rand.Next(2) == 0) + Main.cloud[index1].spriteDir = SpriteEffects.FlipHorizontally; + float num1 = Main.windSpeedCurrent; + if (!Main.gameMenu) + num1 = Main.windSpeedCurrent - Main.player[Main.myPlayer].velocity.X * 0.1f; + int num2 = 0; + int num3 = 0; + if ((double) num1 > 0.0) + num2 -= 200; + if ((double) num1 < 0.0) + num3 += 200; + int num4 = 300; + float num5 = (float) WorldGen.genRand.Next(num2 - num4, Main.screenWidth + num3 + num4); + Main.cloud[index1].Alpha = 0.0f; + Main.cloud[index1].position.Y = (float) Cloud.rand.Next((int) ((double) -Main.screenHeight * 0.25), (int) ((double) Main.screenHeight * 0.150000005960464)); + if (Main.rand.Next(3) == 0) + Main.cloud[index1].position.Y -= (float) Cloud.rand.Next((int) ((double) Main.screenHeight * 0.100000001490116)); + Main.cloud[index1].type = Cloud.rand.Next(4); + if ((double) Main.cloudAlpha > 0.0 && Cloud.rand.Next(4) != 0 || (double) Main.cloudBGActive >= 1.0 && Cloud.rand.Next(2) == 0) + { + Main.cloud[index1].type = Cloud.rand.Next(18, 22); + if ((double) Main.cloud[index1].scale >= 1.15) + Main.cloud[index1].position.Y -= 150f; + if ((double) Main.cloud[index1].scale >= 1.0) + Main.cloud[index1].position.Y -= 150f; + } + else if ((double) Main.cloudBGActive <= 0.0 && (double) Main.cloudAlpha == 0.0 && (double) Main.cloud[index1].scale < 1.0 && (double) Main.cloud[index1].position.Y < (double) -Main.screenHeight * 0.150000005960464 && (double) Main.numClouds <= 80.0) + Main.cloud[index1].type = Cloud.rand.Next(9, 14); + else if (((double) Main.cloud[index1].scale < 1.15 && (double) Main.cloud[index1].position.Y < (double) -Main.screenHeight * 0.300000011920929 || (double) Main.cloud[index1].scale < 0.85 && (double) Main.cloud[index1].position.Y < (double) Main.screenHeight * 0.150000005960464) && ((double) Main.numClouds > 70.0 || (double) Main.cloudBGActive >= 1.0)) + Main.cloud[index1].type = Cloud.rand.Next(4, 9); + else if ((double) Main.cloud[index1].position.Y > (double) -Main.screenHeight * 0.150000005960464 && Cloud.rand.Next(2) == 0 && (double) Main.numClouds > 20.0) + Main.cloud[index1].type = Cloud.rand.Next(14, 18); + if (Cloud.rand.Next(150) == 0) + Main.cloud[index1].type = Cloud.RollRareCloud(); + if ((double) Main.cloud[index1].scale > 1.2) + Main.cloud[index1].position.Y += 100f; + if ((double) Main.cloud[index1].scale > 1.3) + Main.cloud[index1].scale = 1.3f; + if ((double) Main.cloud[index1].scale < 0.7) + Main.cloud[index1].scale = 0.7f; + Main.cloud[index1].active = true; + Main.cloud[index1].position.X = num5; + if ((double) Main.cloud[index1].position.X > (double) (Main.screenWidth + 400)) + Main.cloud[index1].Alpha = 1f; + if ((double) Main.cloud[index1].position.X + (double) TextureAssets.Cloud[Main.cloud[index1].type].Width() * (double) Main.cloud[index1].scale < -400.0) + Main.cloud[index1].Alpha = 1f; + Rectangle rectangle1 = new Rectangle((int) Main.cloud[index1].position.X, (int) Main.cloud[index1].position.Y, Main.cloud[index1].width, Main.cloud[index1].height); + for (int index3 = 0; index3 < 200; ++index3) + { + if (index1 != index3 && Main.cloud[index3].active) + { + Rectangle rectangle2 = new Rectangle((int) Main.cloud[index3].position.X, (int) Main.cloud[index3].position.Y, Main.cloud[index3].width, Main.cloud[index3].height); + if (rectangle1.Intersects(rectangle2)) + Main.cloud[index1].active = false; + } + } + } + + private static int RollRareCloud() + { + int num = -1; + bool flag = false; + while (!flag) + { + num = Cloud.rand.Next(22, 37); + switch (num) + { + case 25: + case 26: + flag = NPC.downedBoss1; + continue; + case 28: + if (Main.rand.Next(10) == 0) + { + flag = true; + continue; + } + continue; + case 30: + case 35: + flag = Main.hardMode; + continue; + case 31: + flag = NPC.downedBoss3; + continue; + case 36: + flag = NPC.downedBoss2 && WorldGen.crimson; + continue; + default: + flag = true; + continue; + } + } + return num; + } + + public Color cloudColor(Color bgColor) + { + float num = this.scale * this.Alpha; + if ((double) num > 1.0) + num = 1f; + return new Color((int) (byte) (float) (int) ((double) bgColor.R * (double) num), (int) (byte) (float) (int) ((double) bgColor.G * (double) num), (int) (byte) (float) (int) ((double) bgColor.B * (double) num), (int) (byte) (float) (int) ((double) bgColor.A * (double) num)); + } + + public object Clone() => this.MemberwiseClone(); + + public static void UpdateClouds() + { + if (Main.netMode == 2) + return; + int maxValue = 0; + for (int index = 0; index < 200; ++index) + { + if (Main.cloud[index].active) + { + Main.cloud[index].Update(); + if (!Main.cloud[index].kill) + ++maxValue; + } + } + for (int index = 0; index < 200; ++index) + { + if (Main.cloud[index].active) + { + if (index > 1 && (!Main.cloud[index - 1].active || (double) Main.cloud[index - 1].scale > (double) Main.cloud[index].scale + 0.02)) + { + Cloud cloud = (Cloud) Main.cloud[index - 1].Clone(); + Main.cloud[index - 1] = (Cloud) Main.cloud[index].Clone(); + Main.cloud[index] = cloud; + } + if (index < 199 && (!Main.cloud[index].active || (double) Main.cloud[index + 1].scale < (double) Main.cloud[index].scale - 0.02)) + { + Cloud cloud = (Cloud) Main.cloud[index + 1].Clone(); + Main.cloud[index + 1] = (Cloud) Main.cloud[index].Clone(); + Main.cloud[index] = cloud; + } + } + } + if (maxValue < Main.numClouds) + { + Cloud.addCloud(); + } + else + { + if (maxValue <= Main.numClouds) + return; + int index1 = Cloud.rand.Next(maxValue); + for (int index2 = 0; Main.cloud[index1].kill && index2 < 100; index1 = Cloud.rand.Next(maxValue)) + ++index2; + Main.cloud[index1].kill = true; + } + } + + public void Update() + { + if (WorldGen.drunkWorldGenText && Main.gameMenu) + this.type = 28; + if ((double) this.scale == 1.0) + this.scale -= 0.0001f; + if ((double) this.scale == 1.15) + this.scale -= 0.0001f; + float num1; + if ((double) this.scale < 1.0) + { + float num2 = 0.07f; + float num3 = (float) (((double) (this.scale + 0.15f) + 1.0) / 2.0); + float num4 = num3 * num3; + num1 = num2 * num4; + } + else if ((double) this.scale <= 1.15) + { + float num5 = 0.19f; + float num6 = this.scale - 0.075f; + float num7 = num6 * num6; + num1 = num5 * num7; + } + else + { + float num8 = 0.23f; + float num9 = (float) ((double) this.scale - 0.150000005960464 - 0.0750000029802322); + float num10 = num9 * num9; + num1 = num8 * num10; + } + this.position.X += Main.windSpeedCurrent * 9f * num1 * (float) Main.dayRate; + this.position.X -= (Main.screenPosition.X - Main.screenLastPosition.X) * num1; + float num11 = 600f; + if ((double) Main.bgAlphaFrontLayer[4] == 1.0 && (double) this.position.Y > 200.0) + { + this.kill = true; + this.Alpha -= 0.005f * (float) Main.dayRate; + } + if (!this.kill) + { + if ((double) this.Alpha < 1.0) + { + this.Alpha += 1f / 1000f * (float) Main.dayRate; + if ((double) this.Alpha > 1.0) + this.Alpha = 1f; + } + } + else + { + this.Alpha -= 1f / 1000f * (float) Main.dayRate; + if ((double) this.Alpha <= 0.0) + this.active = false; + } + if ((double) this.position.X + (double) TextureAssets.Cloud[this.type].Width() * (double) this.scale < -(double) num11 || (double) this.position.X > (double) Main.screenWidth + (double) num11) + this.active = false; + this.rSpeed += (float) Cloud.rand.Next(-10, 11) * 2E-05f; + if ((double) this.rSpeed > 0.0002) + this.rSpeed = 0.0002f; + if ((double) this.rSpeed < -0.0002) + this.rSpeed = -0.0002f; + if ((double) this.rotation > 0.02) + this.rotation = 0.02f; + if ((double) this.rotation < -0.02) + this.rotation = -0.02f; + this.rotation += this.rSpeed; + this.width = (int) ((double) TextureAssets.Cloud[this.type].Width() * (double) this.scale); + this.height = (int) ((double) TextureAssets.Cloud[this.type].Height() * (double) this.scale); + if (this.type < 9 || this.type > 13 || (double) Main.cloudAlpha <= 0.0 && (double) Main.cloudBGActive < 1.0) + return; + this.kill = true; + } + } +} diff --git a/Collision.cs b/Collision.cs new file mode 100644 index 0000000..55a3c1c --- /dev/null +++ b/Collision.cs @@ -0,0 +1,2977 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Collision +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.DataStructures; +using Terraria.ID; + +namespace Terraria +{ + public class Collision + { + public static bool stair; + public static bool stairFall; + public static bool honey; + public static bool sloping; + public static bool landMine = false; + public static bool up; + public static bool down; + public static float Epsilon = 2.718282f; + + public static Vector2[] CheckLinevLine(Vector2 a1, Vector2 a2, Vector2 b1, Vector2 b2) + { + if (a1.Equals(a2) && b1.Equals(b2)) + { + if (!a1.Equals(b1)) + return new Vector2[0]; + return new Vector2[1]{ a1 }; + } + if (b1.Equals(b2)) + { + if (!Collision.PointOnLine(b1, a1, a2)) + return new Vector2[0]; + return new Vector2[1]{ b1 }; + } + if (a1.Equals(a2)) + { + if (!Collision.PointOnLine(a1, b1, b2)) + return new Vector2[0]; + return new Vector2[1]{ a1 }; + } + float num1 = (float) (((double) b2.X - (double) b1.X) * ((double) a1.Y - (double) b1.Y) - ((double) b2.Y - (double) b1.Y) * ((double) a1.X - (double) b1.X)); + float num2 = (float) (((double) a2.X - (double) a1.X) * ((double) a1.Y - (double) b1.Y) - ((double) a2.Y - (double) a1.Y) * ((double) a1.X - (double) b1.X)); + float num3 = (float) (((double) b2.Y - (double) b1.Y) * ((double) a2.X - (double) a1.X) - ((double) b2.X - (double) b1.X) * ((double) a2.Y - (double) a1.Y)); + if (-(double) Collision.Epsilon >= (double) num3 || (double) num3 >= (double) Collision.Epsilon) + { + float num4 = num1 / num3; + float num5 = num2 / num3; + if (0.0 > (double) num4 || (double) num4 > 1.0 || 0.0 > (double) num5 || (double) num5 > 1.0) + return new Vector2[0]; + return new Vector2[1] + { + new Vector2(a1.X + num4 * (a2.X - a1.X), a1.Y + num4 * (a2.Y - a1.Y)) + }; + } + if ((-(double) Collision.Epsilon >= (double) num1 || (double) num1 >= (double) Collision.Epsilon) && (-(double) Collision.Epsilon >= (double) num2 || (double) num2 >= (double) Collision.Epsilon)) + return new Vector2[0]; + return a1.Equals(a2) ? Collision.OneDimensionalIntersection(b1, b2, a1, a2) : Collision.OneDimensionalIntersection(a1, a2, b1, b2); + } + + private static double DistFromSeg( + Vector2 p, + Vector2 q0, + Vector2 q1, + double radius, + ref float u) + { + double num1 = (double) q1.X - (double) q0.X; + double num2 = (double) q1.Y - (double) q0.Y; + double num3 = (double) q0.X - (double) p.X; + double num4 = (double) q0.Y - (double) p.Y; + double num5 = Math.Sqrt(num1 * num1 + num2 * num2); + if (num5 < (double) Collision.Epsilon) + throw new Exception("Expected line segment, not point."); + return Math.Abs(num1 * num4 - num3 * num2) / num5; + } + + private static bool PointOnLine(Vector2 p, Vector2 a1, Vector2 a2) + { + float u = 0.0f; + return Collision.DistFromSeg(p, a1, a2, (double) Collision.Epsilon, ref u) < (double) Collision.Epsilon; + } + + private static Vector2[] OneDimensionalIntersection( + Vector2 a1, + Vector2 a2, + Vector2 b1, + Vector2 b2) + { + float num1 = a2.X - a1.X; + float num2 = a2.Y - a1.Y; + float relativePoint1; + float relativePoint2; + if ((double) Math.Abs(num1) > (double) Math.Abs(num2)) + { + relativePoint1 = (b1.X - a1.X) / num1; + relativePoint2 = (b2.X - a1.X) / num1; + } + else + { + relativePoint1 = (b1.Y - a1.Y) / num2; + relativePoint2 = (b2.Y - a1.Y) / num2; + } + List vector2List = new List(); + foreach (float overlapPoint in Collision.FindOverlapPoints(relativePoint1, relativePoint2)) + { + float x = (float) ((double) a2.X * (double) overlapPoint + (double) a1.X * (1.0 - (double) overlapPoint)); + float y = (float) ((double) a2.Y * (double) overlapPoint + (double) a1.Y * (1.0 - (double) overlapPoint)); + vector2List.Add(new Vector2(x, y)); + } + return vector2List.ToArray(); + } + + private static float[] FindOverlapPoints(float relativePoint1, float relativePoint2) + { + float val2_1 = Math.Min(relativePoint1, relativePoint2); + float val2_2 = Math.Max(relativePoint1, relativePoint2); + float num1 = Math.Max(0.0f, val2_1); + float num2 = Math.Min(1f, val2_2); + if ((double) num1 > (double) num2) + return new float[0]; + return (double) num1 == (double) num2 ? new float[1] + { + num1 + } : new float[2]{ num1, num2 }; + } + + public static bool CheckAABBvAABBCollision( + Vector2 position1, + Vector2 dimensions1, + Vector2 position2, + Vector2 dimensions2) + { + return (double) position1.X < (double) position2.X + (double) dimensions2.X && (double) position1.Y < (double) position2.Y + (double) dimensions2.Y && (double) position1.X + (double) dimensions1.X > (double) position2.X && (double) position1.Y + (double) dimensions1.Y > (double) position2.Y; + } + + private static int collisionOutcode( + Vector2 aabbPosition, + Vector2 aabbDimensions, + Vector2 point) + { + float num1 = aabbPosition.X + aabbDimensions.X; + float num2 = aabbPosition.Y + aabbDimensions.Y; + int num3 = 0; + if ((double) aabbDimensions.X <= 0.0) + num3 |= 5; + else if ((double) point.X < (double) aabbPosition.X) + num3 |= 1; + else if ((double) point.X - (double) num1 > 0.0) + num3 |= 4; + if ((double) aabbDimensions.Y <= 0.0) + num3 |= 10; + else if ((double) point.Y < (double) aabbPosition.Y) + num3 |= 2; + else if ((double) point.Y - (double) num2 > 0.0) + num3 |= 8; + return num3; + } + + public static bool CheckAABBvLineCollision( + Vector2 aabbPosition, + Vector2 aabbDimensions, + Vector2 lineStart, + Vector2 lineEnd) + { + int num1; + if ((num1 = Collision.collisionOutcode(aabbPosition, aabbDimensions, lineEnd)) == 0) + return true; + int num2; + while ((num2 = Collision.collisionOutcode(aabbPosition, aabbDimensions, lineStart)) != 0) + { + if ((num2 & num1) != 0) + return false; + if ((num2 & 5) != 0) + { + float x = aabbPosition.X; + if ((num2 & 4) != 0) + x += aabbDimensions.X; + lineStart.Y += (float) (((double) x - (double) lineStart.X) * ((double) lineEnd.Y - (double) lineStart.Y) / ((double) lineEnd.X - (double) lineStart.X)); + lineStart.X = x; + } + else + { + float y = aabbPosition.Y; + if ((num2 & 8) != 0) + y += aabbDimensions.Y; + lineStart.X += (float) (((double) y - (double) lineStart.Y) * ((double) lineEnd.X - (double) lineStart.X) / ((double) lineEnd.Y - (double) lineStart.Y)); + lineStart.Y = y; + } + } + return true; + } + + public static bool CheckAABBvLineCollision2( + Vector2 aabbPosition, + Vector2 aabbDimensions, + Vector2 lineStart, + Vector2 lineEnd) + { + float collisionPoint = 0.0f; + return Utils.RectangleLineCollision(aabbPosition, aabbPosition + aabbDimensions, lineStart, lineEnd) || Collision.CheckAABBvLineCollision(aabbPosition, aabbDimensions, lineStart, lineEnd, 0.0001f, ref collisionPoint); + } + + public static bool CheckAABBvLineCollision( + Vector2 objectPosition, + Vector2 objectDimensions, + Vector2 lineStart, + Vector2 lineEnd, + float lineWidth, + ref float collisionPoint) + { + float y = lineWidth * 0.5f; + Vector2 position2 = lineStart; + Vector2 dimensions2 = lineEnd - lineStart; + if ((double) dimensions2.X > 0.0) + { + dimensions2.X += lineWidth; + position2.X -= y; + } + else + { + position2.X += dimensions2.X - y; + dimensions2.X = -dimensions2.X + lineWidth; + } + if ((double) dimensions2.Y > 0.0) + { + dimensions2.Y += lineWidth; + position2.Y -= y; + } + else + { + position2.Y += dimensions2.Y - y; + dimensions2.Y = -dimensions2.Y + lineWidth; + } + if (!Collision.CheckAABBvAABBCollision(objectPosition, objectDimensions, position2, dimensions2)) + return false; + Vector2 spinningpoint1 = objectPosition - lineStart; + Vector2 spinningpoint2 = spinningpoint1 + objectDimensions; + Vector2 spinningpoint3 = new Vector2(spinningpoint1.X, spinningpoint2.Y); + Vector2 spinningpoint4 = new Vector2(spinningpoint2.X, spinningpoint1.Y); + Vector2 vector2_1 = lineEnd - lineStart; + float x = vector2_1.Length(); + float num1 = (float) Math.Atan2((double) vector2_1.Y, (double) vector2_1.X); + Vector2[] vector2Array = new Vector2[4] + { + spinningpoint1.RotatedBy(-(double) num1), + spinningpoint4.RotatedBy(-(double) num1), + spinningpoint2.RotatedBy(-(double) num1), + spinningpoint3.RotatedBy(-(double) num1) + }; + collisionPoint = x; + bool flag = false; + for (int index = 0; index < vector2Array.Length; ++index) + { + if ((double) Math.Abs(vector2Array[index].Y) < (double) y && (double) vector2Array[index].X < (double) collisionPoint && (double) vector2Array[index].X >= 0.0) + { + collisionPoint = vector2Array[index].X; + flag = true; + } + } + Vector2 vector2_2 = new Vector2(0.0f, y); + Vector2 vector2_3 = new Vector2(x, y); + Vector2 vector2_4 = new Vector2(0.0f, -y); + Vector2 vector2_5 = new Vector2(x, -y); + for (int index1 = 0; index1 < vector2Array.Length; ++index1) + { + int index2 = (index1 + 1) % vector2Array.Length; + Vector2 vector2_6 = vector2_3 - vector2_2; + Vector2 vector2_7 = vector2Array[index2] - vector2Array[index1]; + float num2 = (float) ((double) vector2_6.X * (double) vector2_7.Y - (double) vector2_6.Y * (double) vector2_7.X); + if ((double) num2 != 0.0) + { + Vector2 vector2_8 = vector2Array[index1] - vector2_2; + float num3 = (float) ((double) vector2_8.X * (double) vector2_7.Y - (double) vector2_8.Y * (double) vector2_7.X) / num2; + if ((double) num3 >= 0.0 && (double) num3 <= 1.0) + { + float num4 = (float) ((double) vector2_8.X * (double) vector2_6.Y - (double) vector2_8.Y * (double) vector2_6.X) / num2; + if ((double) num4 >= 0.0 && (double) num4 <= 1.0) + { + flag = true; + collisionPoint = Math.Min(collisionPoint, vector2_2.X + num3 * vector2_6.X); + } + } + } + Vector2 vector2_9 = vector2_5 - vector2_4; + float num5 = (float) ((double) vector2_9.X * (double) vector2_7.Y - (double) vector2_9.Y * (double) vector2_7.X); + if ((double) num5 != 0.0) + { + Vector2 vector2_10 = vector2Array[index1] - vector2_4; + float num6 = (float) ((double) vector2_10.X * (double) vector2_7.Y - (double) vector2_10.Y * (double) vector2_7.X) / num5; + if ((double) num6 >= 0.0 && (double) num6 <= 1.0) + { + float num7 = (float) ((double) vector2_10.X * (double) vector2_9.Y - (double) vector2_10.Y * (double) vector2_9.X) / num5; + if ((double) num7 >= 0.0 && (double) num7 <= 1.0) + { + flag = true; + collisionPoint = Math.Min(collisionPoint, vector2_4.X + num6 * vector2_9.X); + } + } + } + } + return flag; + } + + public static bool CanHit(Entity source, Entity target) => Collision.CanHit(source.position, source.width, source.height, target.position, target.width, target.height); + + public static bool CanHit(Entity source, NPCAimedTarget target) => Collision.CanHit(source.position, source.width, source.height, target.Position, target.Width, target.Height); + + public static bool CanHit( + Vector2 Position1, + int Width1, + int Height1, + Vector2 Position2, + int Width2, + int Height2) + { + int index1 = (int) (((double) Position1.X + (double) (Width1 / 2)) / 16.0); + int index2 = (int) (((double) Position1.Y + (double) (Height1 / 2)) / 16.0); + int num1 = (int) (((double) Position2.X + (double) (Width2 / 2)) / 16.0); + int num2 = (int) (((double) Position2.Y + (double) (Height2 / 2)) / 16.0); + if (index1 <= 1) + index1 = 1; + if (index1 >= Main.maxTilesX) + index1 = Main.maxTilesX - 1; + if (num1 <= 1) + num1 = 1; + if (num1 >= Main.maxTilesX) + num1 = Main.maxTilesX - 1; + if (index2 <= 1) + index2 = 1; + if (index2 >= Main.maxTilesY) + index2 = Main.maxTilesY - 1; + if (num2 <= 1) + num2 = 1; + if (num2 >= Main.maxTilesY) + num2 = Main.maxTilesY - 1; + try + { + do + { + int num3 = Math.Abs(index1 - num1); + int num4 = Math.Abs(index2 - num2); + if (index1 == num1 && index2 == num2) + return true; + if (num3 > num4) + { + if (index1 < num1) + ++index1; + else + --index1; + if (Main.tile[index1, index2 - 1] == null || Main.tile[index1, index2 + 1] == null || !Main.tile[index1, index2 - 1].inActive() && Main.tile[index1, index2 - 1].active() && Main.tileSolid[(int) Main.tile[index1, index2 - 1].type] && !Main.tileSolidTop[(int) Main.tile[index1, index2 - 1].type] && Main.tile[index1, index2 - 1].slope() == (byte) 0 && !Main.tile[index1, index2 - 1].halfBrick() && !Main.tile[index1, index2 + 1].inActive() && Main.tile[index1, index2 + 1].active() && Main.tileSolid[(int) Main.tile[index1, index2 + 1].type] && !Main.tileSolidTop[(int) Main.tile[index1, index2 + 1].type] && Main.tile[index1, index2 + 1].slope() == (byte) 0 && !Main.tile[index1, index2 + 1].halfBrick()) + return false; + } + else + { + if (index2 < num2) + ++index2; + else + --index2; + if (Main.tile[index1 - 1, index2] == null || Main.tile[index1 + 1, index2] == null || !Main.tile[index1 - 1, index2].inActive() && Main.tile[index1 - 1, index2].active() && Main.tileSolid[(int) Main.tile[index1 - 1, index2].type] && !Main.tileSolidTop[(int) Main.tile[index1 - 1, index2].type] && Main.tile[index1 - 1, index2].slope() == (byte) 0 && !Main.tile[index1 - 1, index2].halfBrick() && !Main.tile[index1 + 1, index2].inActive() && Main.tile[index1 + 1, index2].active() && Main.tileSolid[(int) Main.tile[index1 + 1, index2].type] && !Main.tileSolidTop[(int) Main.tile[index1 + 1, index2].type] && Main.tile[index1 + 1, index2].slope() == (byte) 0 && !Main.tile[index1 + 1, index2].halfBrick()) + return false; + } + } + while (Main.tile[index1, index2] != null && (Main.tile[index1, index2].inActive() || !Main.tile[index1, index2].active() || !Main.tileSolid[(int) Main.tile[index1, index2].type] || Main.tileSolidTop[(int) Main.tile[index1, index2].type])); + return false; + } + catch + { + return false; + } + } + + public static bool CanHitWithCheck( + Vector2 Position1, + int Width1, + int Height1, + Vector2 Position2, + int Width2, + int Height2, + Utils.TileActionAttempt check) + { + int x = (int) (((double) Position1.X + (double) (Width1 / 2)) / 16.0); + int y = (int) (((double) Position1.Y + (double) (Height1 / 2)) / 16.0); + int num1 = (int) (((double) Position2.X + (double) (Width2 / 2)) / 16.0); + int num2 = (int) (((double) Position2.Y + (double) (Height2 / 2)) / 16.0); + if (x <= 1) + x = 1; + if (x >= Main.maxTilesX) + x = Main.maxTilesX - 1; + if (num1 <= 1) + num1 = 1; + if (num1 >= Main.maxTilesX) + num1 = Main.maxTilesX - 1; + if (y <= 1) + y = 1; + if (y >= Main.maxTilesY) + y = Main.maxTilesY - 1; + if (num2 <= 1) + num2 = 1; + if (num2 >= Main.maxTilesY) + num2 = Main.maxTilesY - 1; + try + { + do + { + int num3 = Math.Abs(x - num1); + int num4 = Math.Abs(y - num2); + if (x == num1 && y == num2) + return true; + if (num3 > num4) + { + if (x < num1) + ++x; + else + --x; + if (Main.tile[x, y - 1] == null || Main.tile[x, y + 1] == null || !Main.tile[x, y - 1].inActive() && Main.tile[x, y - 1].active() && Main.tileSolid[(int) Main.tile[x, y - 1].type] && !Main.tileSolidTop[(int) Main.tile[x, y - 1].type] && Main.tile[x, y - 1].slope() == (byte) 0 && !Main.tile[x, y - 1].halfBrick() && !Main.tile[x, y + 1].inActive() && Main.tile[x, y + 1].active() && Main.tileSolid[(int) Main.tile[x, y + 1].type] && !Main.tileSolidTop[(int) Main.tile[x, y + 1].type] && Main.tile[x, y + 1].slope() == (byte) 0 && !Main.tile[x, y + 1].halfBrick()) + return false; + } + else + { + if (y < num2) + ++y; + else + --y; + if (Main.tile[x - 1, y] == null || Main.tile[x + 1, y] == null || !Main.tile[x - 1, y].inActive() && Main.tile[x - 1, y].active() && Main.tileSolid[(int) Main.tile[x - 1, y].type] && !Main.tileSolidTop[(int) Main.tile[x - 1, y].type] && Main.tile[x - 1, y].slope() == (byte) 0 && !Main.tile[x - 1, y].halfBrick() && !Main.tile[x + 1, y].inActive() && Main.tile[x + 1, y].active() && Main.tileSolid[(int) Main.tile[x + 1, y].type] && !Main.tileSolidTop[(int) Main.tile[x + 1, y].type] && Main.tile[x + 1, y].slope() == (byte) 0 && !Main.tile[x + 1, y].halfBrick()) + return false; + } + } + while (Main.tile[x, y] != null && (Main.tile[x, y].inActive() || !Main.tile[x, y].active() || !Main.tileSolid[(int) Main.tile[x, y].type] || Main.tileSolidTop[(int) Main.tile[x, y].type]) && check(x, y)); + return false; + } + catch + { + return false; + } + } + + public static bool CanHitLine( + Vector2 Position1, + int Width1, + int Height1, + Vector2 Position2, + int Width2, + int Height2) + { + int index1 = (int) (((double) Position1.X + (double) (Width1 / 2)) / 16.0); + int index2 = (int) (((double) Position1.Y + (double) (Height1 / 2)) / 16.0); + int num1 = (int) (((double) Position2.X + (double) (Width2 / 2)) / 16.0); + int num2 = (int) (((double) Position2.Y + (double) (Height2 / 2)) / 16.0); + if (index1 <= 1) + index1 = 1; + if (index1 >= Main.maxTilesX) + index1 = Main.maxTilesX - 1; + if (num1 <= 1) + num1 = 1; + if (num1 >= Main.maxTilesX) + num1 = Main.maxTilesX - 1; + if (index2 <= 1) + index2 = 1; + if (index2 >= Main.maxTilesY) + index2 = Main.maxTilesY - 1; + if (num2 <= 1) + num2 = 1; + if (num2 >= Main.maxTilesY) + num2 = Main.maxTilesY - 1; + float num3 = (float) Math.Abs(index1 - num1); + float num4 = (float) Math.Abs(index2 - num2); + if ((double) num3 == 0.0 && (double) num4 == 0.0) + return true; + float num5 = 1f; + float num6 = 1f; + if ((double) num3 == 0.0 || (double) num4 == 0.0) + { + if ((double) num3 == 0.0) + num5 = 0.0f; + if ((double) num4 == 0.0) + num6 = 0.0f; + } + else if ((double) num3 > (double) num4) + num5 = num3 / num4; + else + num6 = num4 / num3; + float num7 = 0.0f; + float num8 = 0.0f; + int num9 = 1; + if (index2 < num2) + num9 = 2; + int num10 = (int) num3; + int num11 = (int) num4; + int num12 = Math.Sign(num1 - index1); + int num13 = Math.Sign(num2 - index2); + bool flag1 = false; + bool flag2 = false; + try + { + do + { + switch (num9) + { + case 1: + float num14 = num8 + num6; + int num15 = (int) num14; + num8 = num14 % 1f; + for (int index3 = 0; index3 < num15; ++index3) + { + if (Main.tile[index1 - 1, index2] == null || Main.tile[index1, index2] == null || Main.tile[index1 + 1, index2] == null) + return false; + Tile tile1 = Main.tile[index1 - 1, index2]; + Tile tile2 = Main.tile[index1 + 1, index2]; + Tile tile3 = Main.tile[index1, index2]; + if (!tile1.inActive() && tile1.active() && Main.tileSolid[(int) tile1.type] && !Main.tileSolidTop[(int) tile1.type] || !tile2.inActive() && tile2.active() && Main.tileSolid[(int) tile2.type] && !Main.tileSolidTop[(int) tile2.type] || !tile3.inActive() && tile3.active() && Main.tileSolid[(int) tile3.type] && !Main.tileSolidTop[(int) tile3.type]) + return false; + if (num10 == 0 && num11 == 0) + { + flag1 = true; + break; + } + index2 += num13; + --num11; + if (num10 == 0 && num11 == 0 && num15 == 1) + flag2 = true; + } + if (num10 != 0) + { + num9 = 2; + break; + } + break; + case 2: + float num16 = num7 + num5; + int num17 = (int) num16; + num7 = num16 % 1f; + for (int index4 = 0; index4 < num17; ++index4) + { + if (Main.tile[index1, index2 - 1] == null || Main.tile[index1, index2] == null || Main.tile[index1, index2 + 1] == null) + return false; + Tile tile4 = Main.tile[index1, index2 - 1]; + Tile tile5 = Main.tile[index1, index2 + 1]; + Tile tile6 = Main.tile[index1, index2]; + if (!tile4.inActive() && tile4.active() && Main.tileSolid[(int) tile4.type] && !Main.tileSolidTop[(int) tile4.type] || !tile5.inActive() && tile5.active() && Main.tileSolid[(int) tile5.type] && !Main.tileSolidTop[(int) tile5.type] || !tile6.inActive() && tile6.active() && Main.tileSolid[(int) tile6.type] && !Main.tileSolidTop[(int) tile6.type]) + return false; + if (num10 == 0 && num11 == 0) + { + flag1 = true; + break; + } + index1 += num12; + --num10; + if (num10 == 0 && num11 == 0 && num17 == 1) + flag2 = true; + } + if (num11 != 0) + { + num9 = 1; + break; + } + break; + } + if (Main.tile[index1, index2] == null) + return false; + Tile tile = Main.tile[index1, index2]; + if (!tile.inActive() && tile.active() && Main.tileSolid[(int) tile.type] && !Main.tileSolidTop[(int) tile.type]) + return false; + } + while (!(flag1 | flag2)); + return true; + } + catch + { + return false; + } + } + + public static bool TupleHitLine( + int x1, + int y1, + int x2, + int y2, + int ignoreX, + int ignoreY, + List> ignoreTargets, + out Tuple col) + { + int num1 = x1; + int num2 = y1; + int num3 = x2; + int num4 = y2; + int index1 = Utils.Clamp(num1, 1, Main.maxTilesX - 1); + int num5 = Utils.Clamp(num3, 1, Main.maxTilesX - 1); + int index2 = Utils.Clamp(num2, 1, Main.maxTilesY - 1); + int num6 = Utils.Clamp(num4, 1, Main.maxTilesY - 1); + float num7 = (float) Math.Abs(index1 - num5); + float num8 = (float) Math.Abs(index2 - num6); + if ((double) num7 == 0.0 && (double) num8 == 0.0) + { + col = new Tuple(index1, index2); + return true; + } + float num9 = 1f; + float num10 = 1f; + if ((double) num7 == 0.0 || (double) num8 == 0.0) + { + if ((double) num7 == 0.0) + num9 = 0.0f; + if ((double) num8 == 0.0) + num10 = 0.0f; + } + else if ((double) num7 > (double) num8) + num9 = num7 / num8; + else + num10 = num8 / num7; + float num11 = 0.0f; + float num12 = 0.0f; + int num13 = 1; + if (index2 < num6) + num13 = 2; + int num14 = (int) num7; + int num15 = (int) num8; + int num16 = Math.Sign(num5 - index1); + int num17 = Math.Sign(num6 - index2); + bool flag1 = false; + bool flag2 = false; + try + { + do + { + switch (num13) + { + case 1: + float num18 = num12 + num10; + int num19 = (int) num18; + num12 = num18 % 1f; + for (int index3 = 0; index3 < num19; ++index3) + { + if (Main.tile[index1 - 1, index2] == null) + { + col = new Tuple(index1 - 1, index2); + return false; + } + if (Main.tile[index1 + 1, index2] == null) + { + col = new Tuple(index1 + 1, index2); + return false; + } + Tile tile1 = Main.tile[index1 - 1, index2]; + Tile tile2 = Main.tile[index1 + 1, index2]; + Tile tile3 = Main.tile[index1, index2]; + if (!ignoreTargets.Contains(new Tuple(index1, index2)) && !ignoreTargets.Contains(new Tuple(index1 - 1, index2)) && !ignoreTargets.Contains(new Tuple(index1 + 1, index2))) + { + if (ignoreX != -1 && num16 < 0 && !tile1.inActive() && tile1.active() && Main.tileSolid[(int) tile1.type] && !Main.tileSolidTop[(int) tile1.type]) + { + col = new Tuple(index1 - 1, index2); + return true; + } + if (ignoreX != 1 && num16 > 0 && !tile2.inActive() && tile2.active() && Main.tileSolid[(int) tile2.type] && !Main.tileSolidTop[(int) tile2.type]) + { + col = new Tuple(index1 + 1, index2); + return true; + } + if (!tile3.inActive() && tile3.active() && Main.tileSolid[(int) tile3.type] && !Main.tileSolidTop[(int) tile3.type]) + { + col = new Tuple(index1, index2); + return true; + } + } + if (num14 == 0 && num15 == 0) + { + flag1 = true; + break; + } + index2 += num17; + --num15; + if (num14 == 0 && num15 == 0 && num19 == 1) + flag2 = true; + } + if (num14 != 0) + { + num13 = 2; + break; + } + break; + case 2: + float num20 = num11 + num9; + int num21 = (int) num20; + num11 = num20 % 1f; + for (int index4 = 0; index4 < num21; ++index4) + { + if (Main.tile[index1, index2 - 1] == null) + { + col = new Tuple(index1, index2 - 1); + return false; + } + if (Main.tile[index1, index2 + 1] == null) + { + col = new Tuple(index1, index2 + 1); + return false; + } + Tile tile4 = Main.tile[index1, index2 - 1]; + Tile tile5 = Main.tile[index1, index2 + 1]; + Tile tile6 = Main.tile[index1, index2]; + if (!ignoreTargets.Contains(new Tuple(index1, index2)) && !ignoreTargets.Contains(new Tuple(index1, index2 - 1)) && !ignoreTargets.Contains(new Tuple(index1, index2 + 1))) + { + if (ignoreY != -1 && num17 < 0 && !tile4.inActive() && tile4.active() && Main.tileSolid[(int) tile4.type] && !Main.tileSolidTop[(int) tile4.type]) + { + col = new Tuple(index1, index2 - 1); + return true; + } + if (ignoreY != 1 && num17 > 0 && !tile5.inActive() && tile5.active() && Main.tileSolid[(int) tile5.type] && !Main.tileSolidTop[(int) tile5.type]) + { + col = new Tuple(index1, index2 + 1); + return true; + } + if (!tile6.inActive() && tile6.active() && Main.tileSolid[(int) tile6.type] && !Main.tileSolidTop[(int) tile6.type]) + { + col = new Tuple(index1, index2); + return true; + } + } + if (num14 == 0 && num15 == 0) + { + flag1 = true; + break; + } + index1 += num16; + --num14; + if (num14 == 0 && num15 == 0 && num21 == 1) + flag2 = true; + } + if (num15 != 0) + { + num13 = 1; + break; + } + break; + } + if (Main.tile[index1, index2] == null) + { + col = new Tuple(index1, index2); + return false; + } + Tile tile = Main.tile[index1, index2]; + if (!ignoreTargets.Contains(new Tuple(index1, index2)) && !tile.inActive() && tile.active() && Main.tileSolid[(int) tile.type] && !Main.tileSolidTop[(int) tile.type]) + { + col = new Tuple(index1, index2); + return true; + } + } + while (!(flag1 | flag2)); + col = new Tuple(index1, index2); + return true; + } + catch + { + col = new Tuple(x1, y1); + return false; + } + } + + public static Tuple TupleHitLineWall(int x1, int y1, int x2, int y2) + { + int x = x1; + int y = y1; + int num1 = x2; + int num2 = y2; + if (x <= 1) + x = 1; + if (x >= Main.maxTilesX) + x = Main.maxTilesX - 1; + if (num1 <= 1) + num1 = 1; + if (num1 >= Main.maxTilesX) + num1 = Main.maxTilesX - 1; + if (y <= 1) + y = 1; + if (y >= Main.maxTilesY) + y = Main.maxTilesY - 1; + if (num2 <= 1) + num2 = 1; + if (num2 >= Main.maxTilesY) + num2 = Main.maxTilesY - 1; + float num3 = (float) Math.Abs(x - num1); + float num4 = (float) Math.Abs(y - num2); + if ((double) num3 == 0.0 && (double) num4 == 0.0) + return new Tuple(x, y); + float num5 = 1f; + float num6 = 1f; + if ((double) num3 == 0.0 || (double) num4 == 0.0) + { + if ((double) num3 == 0.0) + num5 = 0.0f; + if ((double) num4 == 0.0) + num6 = 0.0f; + } + else if ((double) num3 > (double) num4) + num5 = num3 / num4; + else + num6 = num4 / num3; + float num7 = 0.0f; + float num8 = 0.0f; + int num9 = 1; + if (y < num2) + num9 = 2; + int num10 = (int) num3; + int num11 = (int) num4; + int num12 = Math.Sign(num1 - x); + int num13 = Math.Sign(num2 - y); + bool flag1 = false; + bool flag2 = false; + try + { + do + { + switch (num9) + { + case 1: + float num14 = num8 + num6; + int num15 = (int) num14; + num8 = num14 % 1f; + for (int index = 0; index < num15; ++index) + { + Tile tile = Main.tile[x, y]; + if (Collision.HitWallSubstep(x, y)) + return new Tuple(x, y); + if (num10 == 0 && num11 == 0) + { + flag1 = true; + break; + } + y += num13; + --num11; + if (num10 == 0 && num11 == 0 && num15 == 1) + flag2 = true; + } + if (num10 != 0) + { + num9 = 2; + break; + } + break; + case 2: + float num16 = num7 + num5; + int num17 = (int) num16; + num7 = num16 % 1f; + for (int index = 0; index < num17; ++index) + { + Tile tile = Main.tile[x, y]; + if (Collision.HitWallSubstep(x, y)) + return new Tuple(x, y); + if (num10 == 0 && num11 == 0) + { + flag1 = true; + break; + } + x += num12; + --num10; + if (num10 == 0 && num11 == 0 && num17 == 1) + flag2 = true; + } + if (num11 != 0) + { + num9 = 1; + break; + } + break; + } + if (Main.tile[x, y] == null) + return new Tuple(-1, -1); + Tile tile1 = Main.tile[x, y]; + if (Collision.HitWallSubstep(x, y)) + return new Tuple(x, y); + } + while (!(flag1 | flag2)); + return new Tuple(x, y); + } + catch + { + return new Tuple(-1, -1); + } + } + + public static bool HitWallSubstep(int x, int y) + { + if (Main.tile[x, y].wall == (ushort) 0) + return false; + bool flag1 = false; + if (Main.wallHouse[(int) Main.tile[x, y].wall]) + flag1 = true; + if (!flag1) + { + for (int index1 = -1; index1 < 2; ++index1) + { + for (int index2 = -1; index2 < 2; ++index2) + { + if ((index1 != 0 || index2 != 0) && Main.tile[x + index1, y + index2].wall == (ushort) 0) + flag1 = true; + } + } + } + if (Main.tile[x, y].active() & flag1) + { + bool flag2 = true; + for (int index3 = -1; index3 < 2; ++index3) + { + for (int index4 = -1; index4 < 2; ++index4) + { + if (index3 != 0 || index4 != 0) + { + Tile tile = Main.tile[x + index3, y + index4]; + if (!tile.active() || !Main.tileSolid[(int) tile.type] || Main.tileSolidTop[(int) tile.type]) + flag2 = false; + } + } + } + if (flag2) + flag1 = false; + } + return flag1; + } + + public static bool EmptyTile(int i, int j, bool ignoreTiles = false) + { + Rectangle rectangle = new Rectangle(i * 16, j * 16, 16, 16); + if (Main.tile[i, j].active() && !ignoreTiles) + return false; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && rectangle.Intersects(new Rectangle((int) Main.player[index].position.X, (int) Main.player[index].position.Y, Main.player[index].width, Main.player[index].height))) + return false; + } + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && rectangle.Intersects(new Rectangle((int) Main.npc[index].position.X, (int) Main.npc[index].position.Y, Main.npc[index].width, Main.npc[index].height))) + return false; + } + return true; + } + + public static bool DrownCollision( + Vector2 Position, + int Width, + int Height, + float gravDir = -1f, + bool includeSlopes = false) + { + Vector2 vector2_1 = new Vector2(Position.X + (float) (Width / 2), Position.Y + (float) (Height / 2)); + int num1 = 10; + int num2 = 12; + if (num1 > Width) + num1 = Width; + if (num2 > Height) + num2 = Height; + vector2_1 = new Vector2(vector2_1.X - (float) (num1 / 2), Position.Y - 2f); + if ((double) gravDir == -1.0) + vector2_1.Y += (float) (Height / 2 - 6); + int num3 = (int) ((double) Position.X / 16.0) - 1; + int num4 = (int) (((double) Position.X + (double) Width) / 16.0) + 2; + int num5 = (int) ((double) Position.Y / 16.0) - 1; + int num6 = (int) (((double) Position.Y + (double) Height) / 16.0) + 2; + int max = Main.maxTilesX - 1; + int num7 = Utils.Clamp(num3, 0, max); + int num8 = Utils.Clamp(num4, 0, Main.maxTilesX - 1); + int num9 = Utils.Clamp(num5, 0, Main.maxTilesY - 1); + int num10 = Utils.Clamp(num6, 0, Main.maxTilesY - 1); + int num11 = (double) gravDir == 1.0 ? num9 : num10 - 1; + for (int index1 = num7; index1 < num8; ++index1) + { + for (int index2 = num9; index2 < num10; ++index2) + { + Tile tile = Main.tile[index1, index2]; + if (tile != null && tile.liquid > (byte) 0 && !tile.lava() && (index2 != num11 || !tile.active() || !Main.tileSolid[(int) tile.type] || Main.tileSolidTop[(int) tile.type] || includeSlopes && tile.blockType() != 0)) + { + Vector2 vector2_2; + vector2_2.X = (float) (index1 * 16); + vector2_2.Y = (float) (index2 * 16); + int num12 = 16; + float num13 = (float) (256 - (int) Main.tile[index1, index2].liquid) / 32f; + vector2_2.Y += num13 * 2f; + int num14 = num12 - (int) ((double) num13 * 2.0); + if ((double) vector2_1.X + (double) num1 > (double) vector2_2.X && (double) vector2_1.X < (double) vector2_2.X + 16.0 && (double) vector2_1.Y + (double) num2 > (double) vector2_2.Y && (double) vector2_1.Y < (double) vector2_2.Y + (double) num14) + return true; + } + } + } + return false; + } + + public static bool IsWorldPointSolid(Vector2 pos) + { + Point tileCoordinates = pos.ToTileCoordinates(); + if (!WorldGen.InWorld(tileCoordinates.X, tileCoordinates.Y, 1)) + return false; + Tile tile = Main.tile[tileCoordinates.X, tileCoordinates.Y]; + if (tile == null || !tile.active() || tile.inActive() || !Main.tileSolid[(int) tile.type]) + return false; + int num1 = tile.blockType(); + switch (num1) + { + case 0: + return (double) pos.X >= (double) (tileCoordinates.X * 16) && (double) pos.X <= (double) (tileCoordinates.X * 16 + 16) && (double) pos.Y >= (double) (tileCoordinates.Y * 16) && (double) pos.Y <= (double) (tileCoordinates.Y * 16 + 16); + case 1: + return (double) pos.X >= (double) (tileCoordinates.X * 16) && (double) pos.X <= (double) (tileCoordinates.X * 16 + 16) && (double) pos.Y >= (double) (tileCoordinates.Y * 16 + 8) && (double) pos.Y <= (double) (tileCoordinates.Y * 16 + 16); + case 2: + case 3: + case 4: + case 5: + if ((double) pos.X < (double) (tileCoordinates.X * 16) && (double) pos.X > (double) (tileCoordinates.X * 16 + 16) && (double) pos.Y < (double) (tileCoordinates.Y * 16) && (double) pos.Y > (double) (tileCoordinates.Y * 16 + 16)) + return false; + float num2 = pos.X % 16f; + float num3 = pos.Y % 16f; + switch (num1) + { + case 2: + return (double) num3 >= (double) num2; + case 3: + return (double) num2 + (double) num3 >= 16.0; + case 4: + return (double) num2 + (double) num3 <= 16.0; + case 5: + return (double) num3 <= (double) num2; + } + break; + } + return false; + } + + public static bool GetWaterLine(Point pt, out float waterLineHeight) => Collision.GetWaterLine(pt.X, pt.Y, out waterLineHeight); + + public static bool GetWaterLine(int X, int Y, out float waterLineHeight) + { + waterLineHeight = 0.0f; + if (Main.tile[X, Y - 2] == null) + Main.tile[X, Y - 2] = new Tile(); + if (Main.tile[X, Y - 1] == null) + Main.tile[X, Y - 1] = new Tile(); + if (Main.tile[X, Y] == null) + Main.tile[X, Y] = new Tile(); + if (Main.tile[X, Y + 1] == null) + Main.tile[X, Y + 1] = new Tile(); + if (Main.tile[X, Y - 2].liquid > (byte) 0) + return false; + if (Main.tile[X, Y - 1].liquid > (byte) 0) + { + waterLineHeight = (float) (Y * 16); + waterLineHeight -= (float) ((int) Main.tile[X, Y - 1].liquid / 16); + return true; + } + if (Main.tile[X, Y].liquid > (byte) 0) + { + waterLineHeight = (float) ((Y + 1) * 16); + waterLineHeight -= (float) ((int) Main.tile[X, Y].liquid / 16); + return true; + } + if (Main.tile[X, Y + 1].liquid <= (byte) 0) + return false; + waterLineHeight = (float) ((Y + 2) * 16); + waterLineHeight -= (float) ((int) Main.tile[X, Y + 1].liquid / 16); + return true; + } + + public static bool GetWaterLineIterate(Point pt, out float waterLineHeight) => Collision.GetWaterLineIterate(pt.X, pt.Y, out waterLineHeight); + + public static bool GetWaterLineIterate(int X, int Y, out float waterLineHeight) + { + waterLineHeight = 0.0f; + while (Y > 0 && Framing.GetTileSafely(X, Y).liquid > (byte) 0) + --Y; + ++Y; + if (Main.tile[X, Y] == null) + Main.tile[X, Y] = new Tile(); + if (Main.tile[X, Y].liquid <= (byte) 0) + return false; + waterLineHeight = (float) (Y * 16); + waterLineHeight -= (float) ((int) Main.tile[X, Y - 1].liquid / 16); + return true; + } + + public static bool WetCollision(Vector2 Position, int Width, int Height) + { + Collision.honey = false; + Vector2 vector2_1 = new Vector2(Position.X + (float) (Width / 2), Position.Y + (float) (Height / 2)); + int num1 = 10; + int num2 = Height / 2; + if (num1 > Width) + num1 = Width; + if (num2 > Height) + num2 = Height; + vector2_1 = new Vector2(vector2_1.X - (float) (num1 / 2), vector2_1.Y - (float) (num2 / 2)); + int num3 = (int) ((double) Position.X / 16.0) - 1; + int num4 = (int) (((double) Position.X + (double) Width) / 16.0) + 2; + int num5 = (int) ((double) Position.Y / 16.0) - 1; + int num6 = (int) (((double) Position.Y + (double) Height) / 16.0) + 2; + int max = Main.maxTilesX - 1; + int num7 = Utils.Clamp(num3, 0, max); + int num8 = Utils.Clamp(num4, 0, Main.maxTilesX - 1); + int num9 = Utils.Clamp(num5, 0, Main.maxTilesY - 1); + int num10 = Utils.Clamp(num6, 0, Main.maxTilesY - 1); + Vector2 vector2_2; + for (int index1 = num7; index1 < num8; ++index1) + { + for (int index2 = num9; index2 < num10; ++index2) + { + if (Main.tile[index1, index2] != null) + { + if (Main.tile[index1, index2].liquid > (byte) 0) + { + vector2_2.X = (float) (index1 * 16); + vector2_2.Y = (float) (index2 * 16); + int num11 = 16; + float num12 = (float) (256 - (int) Main.tile[index1, index2].liquid) / 32f; + vector2_2.Y += num12 * 2f; + int num13 = num11 - (int) ((double) num12 * 2.0); + if ((double) vector2_1.X + (double) num1 > (double) vector2_2.X && (double) vector2_1.X < (double) vector2_2.X + 16.0 && (double) vector2_1.Y + (double) num2 > (double) vector2_2.Y && (double) vector2_1.Y < (double) vector2_2.Y + (double) num13) + { + if (Main.tile[index1, index2].honey()) + Collision.honey = true; + return true; + } + } + else if (Main.tile[index1, index2].active() && Main.tile[index1, index2].slope() != (byte) 0 && index2 > 0 && Main.tile[index1, index2 - 1] != null && Main.tile[index1, index2 - 1].liquid > (byte) 0) + { + vector2_2.X = (float) (index1 * 16); + vector2_2.Y = (float) (index2 * 16); + int num14 = 16; + if ((double) vector2_1.X + (double) num1 > (double) vector2_2.X && (double) vector2_1.X < (double) vector2_2.X + 16.0 && (double) vector2_1.Y + (double) num2 > (double) vector2_2.Y && (double) vector2_1.Y < (double) vector2_2.Y + (double) num14) + { + if (Main.tile[index1, index2 - 1].honey()) + Collision.honey = true; + return true; + } + } + } + } + } + return false; + } + + public static bool LavaCollision(Vector2 Position, int Width, int Height) + { + int num1 = Height; + int num2 = (int) ((double) Position.X / 16.0) - 1; + int num3 = (int) (((double) Position.X + (double) Width) / 16.0) + 2; + int num4 = (int) ((double) Position.Y / 16.0) - 1; + int num5 = (int) (((double) Position.Y + (double) Height) / 16.0) + 2; + int max = Main.maxTilesX - 1; + int num6 = Utils.Clamp(num2, 0, max); + int num7 = Utils.Clamp(num3, 0, Main.maxTilesX - 1); + int num8 = Utils.Clamp(num4, 0, Main.maxTilesY - 1); + int num9 = Utils.Clamp(num5, 0, Main.maxTilesY - 1); + for (int index1 = num6; index1 < num7; ++index1) + { + for (int index2 = num8; index2 < num9; ++index2) + { + if (Main.tile[index1, index2] != null && Main.tile[index1, index2].liquid > (byte) 0 && Main.tile[index1, index2].lava()) + { + Vector2 vector2; + vector2.X = (float) (index1 * 16); + vector2.Y = (float) (index2 * 16); + int num10 = 16; + float num11 = (float) (256 - (int) Main.tile[index1, index2].liquid) / 32f; + vector2.Y += num11 * 2f; + int num12 = num10 - (int) ((double) num11 * 2.0); + if ((double) Position.X + (double) Width > (double) vector2.X && (double) Position.X < (double) vector2.X + 16.0 && (double) Position.Y + (double) num1 > (double) vector2.Y && (double) Position.Y < (double) vector2.Y + (double) num12) + return true; + } + } + } + return false; + } + + public static Vector4 WalkDownSlope( + Vector2 Position, + Vector2 Velocity, + int Width, + int Height, + float gravity = 0.0f) + { + if ((double) Velocity.Y != (double) gravity) + return new Vector4(Position, Velocity.X, Velocity.Y); + Vector2 vector2_1 = Position; + int num1 = (int) ((double) vector2_1.X / 16.0); + int num2 = (int) (((double) vector2_1.X + (double) Width) / 16.0); + int num3 = (int) (((double) Position.Y + (double) Height + 4.0) / 16.0); + int num4 = Utils.Clamp(num1, 0, Main.maxTilesX - 1); + int num5 = Utils.Clamp(num2, 0, Main.maxTilesX - 1); + int num6 = Utils.Clamp(num3, 0, Main.maxTilesY - 3); + float num7 = (float) ((num6 + 3) * 16); + int index1 = -1; + int index2 = -1; + int num8 = 1; + if ((double) Velocity.X < 0.0) + num8 = 2; + for (int index3 = num4; index3 <= num5; ++index3) + { + for (int index4 = num6; index4 <= num6 + 1; ++index4) + { + if (Main.tile[index3, index4] == null) + Main.tile[index3, index4] = new Tile(); + if (Main.tile[index3, index4].nactive() && (Main.tileSolid[(int) Main.tile[index3, index4].type] || Main.tileSolidTop[(int) Main.tile[index3, index4].type])) + { + int num9 = index4 * 16; + if (Main.tile[index3, index4].halfBrick()) + num9 += 8; + if (new Rectangle(index3 * 16, index4 * 16 - 17, 16, 16).Intersects(new Rectangle((int) Position.X, (int) Position.Y, Width, Height)) && (double) num9 <= (double) num7) + { + if ((double) num7 == (double) num9) + { + if (Main.tile[index3, index4].slope() != (byte) 0) + { + if (index1 != -1 && index2 != -1 && Main.tile[index1, index2] != null && Main.tile[index1, index2].slope() != (byte) 0) + { + if ((int) Main.tile[index3, index4].slope() == num8) + { + num7 = (float) num9; + index1 = index3; + index2 = index4; + } + } + else + { + num7 = (float) num9; + index1 = index3; + index2 = index4; + } + } + } + else + { + num7 = (float) num9; + index1 = index3; + index2 = index4; + } + } + } + } + } + int index5 = index1; + int index6 = index2; + if (index1 != -1 && index2 != -1 && Main.tile[index5, index6] != null && Main.tile[index5, index6].slope() > (byte) 0) + { + int num10 = (int) Main.tile[index5, index6].slope(); + Vector2 vector2_2; + vector2_2.X = (float) (index5 * 16); + vector2_2.Y = (float) (index6 * 16); + switch (num10) + { + case 1: + float num11 = Position.X - vector2_2.X; + if ((double) Position.Y + (double) Height >= (double) vector2_2.Y + (double) num11 && (double) Velocity.X > 0.0) + { + Velocity.Y += Math.Abs(Velocity.X); + break; + } + break; + case 2: + float num12 = (float) ((double) vector2_2.X + 16.0 - ((double) Position.X + (double) Width)); + if ((double) Position.Y + (double) Height >= (double) vector2_2.Y + (double) num12 && (double) Velocity.X < 0.0) + { + Velocity.Y += Math.Abs(Velocity.X); + break; + } + break; + } + } + return new Vector4(Position, Velocity.X, Velocity.Y); + } + + public static Vector4 SlopeCollision( + Vector2 Position, + Vector2 Velocity, + int Width, + int Height, + float gravity = 0.0f, + bool fall = false) + { + Collision.stair = false; + Collision.stairFall = false; + bool[] flagArray = new bool[5]; + float y1 = Position.Y; + float y2 = Position.Y; + Collision.sloping = false; + Vector2 vector2_1 = Position; + Vector2 vector2_2 = Position; + Vector2 vector2_3 = Velocity; + int num1 = (int) ((double) Position.X / 16.0) - 1; + int num2 = (int) (((double) Position.X + (double) Width) / 16.0) + 2; + int num3 = (int) ((double) Position.Y / 16.0) - 1; + int num4 = (int) (((double) Position.Y + (double) Height) / 16.0) + 2; + int max = Main.maxTilesX - 1; + int num5 = Utils.Clamp(num1, 0, max); + int num6 = Utils.Clamp(num2, 0, Main.maxTilesX - 1); + int num7 = Utils.Clamp(num3, 0, Main.maxTilesY - 1); + int num8 = Utils.Clamp(num4, 0, Main.maxTilesY - 1); + for (int index1 = num5; index1 < num6; ++index1) + { + for (int index2 = num7; index2 < num8; ++index2) + { + if (Main.tile[index1, index2] != null && Main.tile[index1, index2].active() && !Main.tile[index1, index2].inActive() && (Main.tileSolid[(int) Main.tile[index1, index2].type] || Main.tileSolidTop[(int) Main.tile[index1, index2].type] && Main.tile[index1, index2].frameY == (short) 0)) + { + Vector2 vector2_4; + vector2_4.X = (float) (index1 * 16); + vector2_4.Y = (float) (index2 * 16); + int num9 = 16; + if (Main.tile[index1, index2].halfBrick()) + { + vector2_4.Y += 8f; + num9 -= 8; + } + if ((double) Position.X + (double) Width > (double) vector2_4.X && (double) Position.X < (double) vector2_4.X + 16.0 && (double) Position.Y + (double) Height > (double) vector2_4.Y && (double) Position.Y < (double) vector2_4.Y + (double) num9) + { + bool flag1 = true; + if (TileID.Sets.Platforms[(int) Main.tile[index1, index2].type]) + { + if ((double) Velocity.Y < 0.0) + flag1 = false; + if ((double) Position.Y + (double) Height < (double) (index2 * 16) || (double) Position.Y + (double) Height - (1.0 + (double) Math.Abs(Velocity.X)) > (double) (index2 * 16 + 16)) + flag1 = false; + if ((Main.tile[index1, index2].slope() == (byte) 1 && (double) Velocity.X >= 0.0 || Main.tile[index1, index2].slope() == (byte) 2 && (double) Velocity.X <= 0.0) && ((double) Position.Y + (double) Height) / 16.0 - 1.0 == (double) index2) + flag1 = false; + } + if (flag1) + { + bool flag2 = false; + if (fall && TileID.Sets.Platforms[(int) Main.tile[index1, index2].type]) + flag2 = true; + int index3 = (int) Main.tile[index1, index2].slope(); + vector2_4.X = (float) (index1 * 16); + vector2_4.Y = (float) (index2 * 16); + if ((double) Position.X + (double) Width > (double) vector2_4.X && (double) Position.X < (double) vector2_4.X + 16.0 && (double) Position.Y + (double) Height > (double) vector2_4.Y && (double) Position.Y < (double) vector2_4.Y + 16.0) + { + float num10 = 0.0f; + if (index3 == 3 || index3 == 4) + { + if (index3 == 3) + num10 = Position.X - vector2_4.X; + if (index3 == 4) + num10 = (float) ((double) vector2_4.X + 16.0 - ((double) Position.X + (double) Width)); + if ((double) num10 >= 0.0) + { + if ((double) Position.Y <= (double) vector2_4.Y + 16.0 - (double) num10) + { + float num11 = vector2_4.Y + 16f - vector2_1.Y - num10; + if ((double) Position.Y + (double) num11 > (double) y2) + { + vector2_2.Y = Position.Y + num11; + y2 = vector2_2.Y; + if ((double) vector2_3.Y < 0.0100999996066093) + vector2_3.Y = 0.0101f; + flagArray[index3] = true; + } + } + } + else if ((double) Position.Y > (double) vector2_4.Y) + { + float num12 = vector2_4.Y + 16f; + if ((double) vector2_2.Y < (double) num12) + { + vector2_2.Y = num12; + if ((double) vector2_3.Y < 0.0100999996066093) + vector2_3.Y = 0.0101f; + } + } + } + if (index3 == 1 || index3 == 2) + { + if (index3 == 1) + num10 = Position.X - vector2_4.X; + if (index3 == 2) + num10 = (float) ((double) vector2_4.X + 16.0 - ((double) Position.X + (double) Width)); + if ((double) num10 >= 0.0) + { + if ((double) Position.Y + (double) Height >= (double) vector2_4.Y + (double) num10) + { + float num13 = vector2_4.Y - (vector2_1.Y + (float) Height) + num10; + if ((double) Position.Y + (double) num13 < (double) y1) + { + if (flag2) + { + Collision.stairFall = true; + } + else + { + Collision.stair = TileID.Sets.Platforms[(int) Main.tile[index1, index2].type]; + vector2_2.Y = Position.Y + num13; + y1 = vector2_2.Y; + if ((double) vector2_3.Y > 0.0) + vector2_3.Y = 0.0f; + flagArray[index3] = true; + } + } + } + } + else if (TileID.Sets.Platforms[(int) Main.tile[index1, index2].type] && (double) Position.Y + (double) Height - 4.0 - (double) Math.Abs(Velocity.X) > (double) vector2_4.Y) + { + if (flag2) + Collision.stairFall = true; + } + else + { + float num14 = vector2_4.Y - (float) Height; + if ((double) vector2_2.Y > (double) num14) + { + if (flag2) + { + Collision.stairFall = true; + } + else + { + Collision.stair = TileID.Sets.Platforms[(int) Main.tile[index1, index2].type]; + vector2_2.Y = num14; + if ((double) vector2_3.Y > 0.0) + vector2_3.Y = 0.0f; + } + } + } + } + } + } + } + } + } + } + Vector2 Position1 = Position; + Vector2 vector2_5 = vector2_2 - Position; + Vector2 Velocity1 = vector2_5; + int Width1 = Width; + int Height1 = Height; + Vector2 vector2_6 = Collision.TileCollision(Position1, Velocity1, Width1, Height1); + if ((double) vector2_6.Y > (double) vector2_5.Y) + { + float num15 = vector2_5.Y - vector2_6.Y; + vector2_2.Y = Position.Y + vector2_6.Y; + if (flagArray[1]) + vector2_2.X = Position.X - num15; + if (flagArray[2]) + vector2_2.X = Position.X + num15; + vector2_3.X = 0.0f; + vector2_3.Y = 0.0f; + Collision.up = false; + } + else if ((double) vector2_6.Y < (double) vector2_5.Y) + { + float num16 = vector2_6.Y - vector2_5.Y; + vector2_2.Y = Position.Y + vector2_6.Y; + if (flagArray[3]) + vector2_2.X = Position.X - num16; + if (flagArray[4]) + vector2_2.X = Position.X + num16; + vector2_3.X = 0.0f; + vector2_3.Y = 0.0f; + } + return new Vector4(vector2_2, vector2_3.X, vector2_3.Y); + } + + public static Vector2 noSlopeCollision( + Vector2 Position, + Vector2 Velocity, + int Width, + int Height, + bool fallThrough = false, + bool fall2 = false) + { + Collision.up = false; + Collision.down = false; + Vector2 vector2_1 = Velocity; + Vector2 vector2_2 = Velocity; + Vector2 vector2_3 = Position + Velocity; + Vector2 vector2_4 = Position; + int num1 = (int) ((double) Position.X / 16.0) - 1; + int num2 = (int) (((double) Position.X + (double) Width) / 16.0) + 2; + int num3 = (int) ((double) Position.Y / 16.0) - 1; + int num4 = (int) (((double) Position.Y + (double) Height) / 16.0) + 2; + int num5 = -1; + int num6 = -1; + int num7 = -1; + int num8 = -1; + int max = Main.maxTilesX - 1; + int num9 = Utils.Clamp(num1, 0, max); + int num10 = Utils.Clamp(num2, 0, Main.maxTilesX - 1); + int num11 = Utils.Clamp(num3, 0, Main.maxTilesY - 1); + int num12 = Utils.Clamp(num4, 0, Main.maxTilesY - 1); + float num13 = (float) ((num12 + 3) * 16); + for (int index1 = num9; index1 < num10; ++index1) + { + for (int index2 = num11; index2 < num12; ++index2) + { + if (Main.tile[index1, index2] != null && Main.tile[index1, index2].active() && (Main.tileSolid[(int) Main.tile[index1, index2].type] || Main.tileSolidTop[(int) Main.tile[index1, index2].type] && Main.tile[index1, index2].frameY == (short) 0)) + { + Vector2 vector2_5; + vector2_5.X = (float) (index1 * 16); + vector2_5.Y = (float) (index2 * 16); + int num14 = 16; + if (Main.tile[index1, index2].halfBrick()) + { + vector2_5.Y += 8f; + num14 -= 8; + } + if ((double) vector2_3.X + (double) Width > (double) vector2_5.X && (double) vector2_3.X < (double) vector2_5.X + 16.0 && (double) vector2_3.Y + (double) Height > (double) vector2_5.Y && (double) vector2_3.Y < (double) vector2_5.Y + (double) num14) + { + if ((double) vector2_4.Y + (double) Height <= (double) vector2_5.Y) + { + Collision.down = true; + if ((!(Main.tileSolidTop[(int) Main.tile[index1, index2].type] & fallThrough) || !((double) Velocity.Y <= 1.0 | fall2)) && (double) num13 > (double) vector2_5.Y) + { + num7 = index1; + num8 = index2; + if (num14 < 16) + ++num8; + if (num7 != num5) + { + vector2_1.Y = vector2_5.Y - (vector2_4.Y + (float) Height); + num13 = vector2_5.Y; + } + } + } + else if ((double) vector2_4.X + (double) Width <= (double) vector2_5.X && !Main.tileSolidTop[(int) Main.tile[index1, index2].type]) + { + num5 = index1; + num6 = index2; + if (num6 != num8) + vector2_1.X = vector2_5.X - (vector2_4.X + (float) Width); + if (num7 == num5) + vector2_1.Y = vector2_2.Y; + } + else if ((double) vector2_4.X >= (double) vector2_5.X + 16.0 && !Main.tileSolidTop[(int) Main.tile[index1, index2].type]) + { + num5 = index1; + num6 = index2; + if (num6 != num8) + vector2_1.X = vector2_5.X + 16f - vector2_4.X; + if (num7 == num5) + vector2_1.Y = vector2_2.Y; + } + else if ((double) vector2_4.Y >= (double) vector2_5.Y + (double) num14 && !Main.tileSolidTop[(int) Main.tile[index1, index2].type]) + { + Collision.up = true; + num7 = index1; + num8 = index2; + vector2_1.Y = (float) ((double) vector2_5.Y + (double) num14 - (double) vector2_4.Y + 0.00999999977648258); + if (num8 == num6) + vector2_1.X = vector2_2.X; + } + } + } + } + } + return vector2_1; + } + + public static Vector2 TileCollision( + Vector2 Position, + Vector2 Velocity, + int Width, + int Height, + bool fallThrough = false, + bool fall2 = false, + int gravDir = 1) + { + Collision.up = false; + Collision.down = false; + Vector2 vector2_1 = Velocity; + Vector2 vector2_2 = Velocity; + Vector2 vector2_3 = Position + Velocity; + Vector2 vector2_4 = Position; + int num1 = (int) ((double) Position.X / 16.0) - 1; + int num2 = (int) (((double) Position.X + (double) Width) / 16.0) + 2; + int num3 = (int) ((double) Position.Y / 16.0) - 1; + int num4 = (int) (((double) Position.Y + (double) Height) / 16.0) + 2; + int num5 = -1; + int num6 = -1; + int num7 = -1; + int num8 = -1; + int max = Main.maxTilesX - 1; + int num9 = Utils.Clamp(num1, 0, max); + int num10 = Utils.Clamp(num2, 0, Main.maxTilesX - 1); + int num11 = Utils.Clamp(num3, 0, Main.maxTilesY - 1); + int num12 = Utils.Clamp(num4, 0, Main.maxTilesY - 1); + float num13 = (float) ((num12 + 3) * 16); + for (int index1 = num9; index1 < num10; ++index1) + { + for (int index2 = num11; index2 < num12; ++index2) + { + if (Main.tile[index1, index2] != null && Main.tile[index1, index2].active() && !Main.tile[index1, index2].inActive() && (Main.tileSolid[(int) Main.tile[index1, index2].type] || Main.tileSolidTop[(int) Main.tile[index1, index2].type] && Main.tile[index1, index2].frameY == (short) 0)) + { + Vector2 vector2_5; + vector2_5.X = (float) (index1 * 16); + vector2_5.Y = (float) (index2 * 16); + int num14 = 16; + if (Main.tile[index1, index2].halfBrick()) + { + vector2_5.Y += 8f; + num14 -= 8; + } + if ((double) vector2_3.X + (double) Width > (double) vector2_5.X && (double) vector2_3.X < (double) vector2_5.X + 16.0 && (double) vector2_3.Y + (double) Height > (double) vector2_5.Y && (double) vector2_3.Y < (double) vector2_5.Y + (double) num14) + { + bool flag1 = false; + bool flag2 = false; + if (Main.tile[index1, index2].slope() > (byte) 2) + { + if (Main.tile[index1, index2].slope() == (byte) 3 && (double) vector2_4.Y + (double) Math.Abs(Velocity.X) >= (double) vector2_5.Y && (double) vector2_4.X >= (double) vector2_5.X) + flag2 = true; + if (Main.tile[index1, index2].slope() == (byte) 4 && (double) vector2_4.Y + (double) Math.Abs(Velocity.X) >= (double) vector2_5.Y && (double) vector2_4.X + (double) Width <= (double) vector2_5.X + 16.0) + flag2 = true; + } + else if (Main.tile[index1, index2].slope() > (byte) 0) + { + flag1 = true; + if (Main.tile[index1, index2].slope() == (byte) 1 && (double) vector2_4.Y + (double) Height - (double) Math.Abs(Velocity.X) <= (double) vector2_5.Y + (double) num14 && (double) vector2_4.X >= (double) vector2_5.X) + flag2 = true; + if (Main.tile[index1, index2].slope() == (byte) 2 && (double) vector2_4.Y + (double) Height - (double) Math.Abs(Velocity.X) <= (double) vector2_5.Y + (double) num14 && (double) vector2_4.X + (double) Width <= (double) vector2_5.X + 16.0) + flag2 = true; + } + if (!flag2) + { + if ((double) vector2_4.Y + (double) Height <= (double) vector2_5.Y) + { + Collision.down = true; + if ((!(Main.tileSolidTop[(int) Main.tile[index1, index2].type] & fallThrough) || !((double) Velocity.Y <= 1.0 | fall2)) && (double) num13 > (double) vector2_5.Y) + { + num7 = index1; + num8 = index2; + if (num14 < 16) + ++num8; + if (num7 != num5 && !flag1) + { + vector2_1.Y = (float) ((double) vector2_5.Y - ((double) vector2_4.Y + (double) Height) + (gravDir == -1 ? -0.00999999977648258 : 0.0)); + num13 = vector2_5.Y; + } + } + } + else if ((double) vector2_4.X + (double) Width <= (double) vector2_5.X && !Main.tileSolidTop[(int) Main.tile[index1, index2].type]) + { + if (index1 >= 1 && Main.tile[index1 - 1, index2] == null) + Main.tile[index1 - 1, index2] = new Tile(); + if (index1 < 1 || Main.tile[index1 - 1, index2].slope() != (byte) 2 && Main.tile[index1 - 1, index2].slope() != (byte) 4) + { + num5 = index1; + num6 = index2; + if (num6 != num8) + vector2_1.X = vector2_5.X - (vector2_4.X + (float) Width); + if (num7 == num5) + vector2_1.Y = vector2_2.Y; + } + } + else if ((double) vector2_4.X >= (double) vector2_5.X + 16.0 && !Main.tileSolidTop[(int) Main.tile[index1, index2].type]) + { + if (Main.tile[index1 + 1, index2] == null) + Main.tile[index1 + 1, index2] = new Tile(); + if (Main.tile[index1 + 1, index2].slope() != (byte) 1 && Main.tile[index1 + 1, index2].slope() != (byte) 3) + { + num5 = index1; + num6 = index2; + if (num6 != num8) + vector2_1.X = vector2_5.X + 16f - vector2_4.X; + if (num7 == num5) + vector2_1.Y = vector2_2.Y; + } + } + else if ((double) vector2_4.Y >= (double) vector2_5.Y + (double) num14 && !Main.tileSolidTop[(int) Main.tile[index1, index2].type]) + { + Collision.up = true; + num7 = index1; + num8 = index2; + vector2_1.Y = (float) ((double) vector2_5.Y + (double) num14 - (double) vector2_4.Y + (gravDir == 1 ? 0.00999999977648258 : 0.0)); + if (num8 == num6) + vector2_1.X = vector2_2.X; + } + } + } + } + } + } + return vector2_1; + } + + public static bool IsClearSpotTest( + Vector2 position, + float testMagnitude, + int Width, + int Height, + bool fallThrough = false, + bool fall2 = false, + int gravDir = 1, + bool checkCardinals = true, + bool checkSlopes = false) + { + if (checkCardinals) + { + Vector2 Velocity1 = Vector2.UnitX * testMagnitude; + if (Collision.TileCollision(position - Velocity1, Velocity1, Width, Height, fallThrough, fall2, gravDir) != Velocity1) + return false; + Vector2 Velocity2 = -Vector2.UnitX * testMagnitude; + if (Collision.TileCollision(position - Velocity2, Velocity2, Width, Height, fallThrough, fall2, gravDir) != Velocity2) + return false; + Vector2 Velocity3 = Vector2.UnitY * testMagnitude; + if (Collision.TileCollision(position - Velocity3, Velocity3, Width, Height, fallThrough, fall2, gravDir) != Velocity3) + return false; + Vector2 Velocity4 = -Vector2.UnitY * testMagnitude; + if (Collision.TileCollision(position - Velocity4, Velocity4, Width, Height, fallThrough, fall2, gravDir) != Velocity4) + return false; + } + if (checkSlopes) + { + Vector2 Velocity5 = Vector2.UnitX * testMagnitude; + Vector4 vector4 = new Vector4(position, testMagnitude, 0.0f); + if (Collision.SlopeCollision(position, Velocity5, Width, Height, (float) gravDir, fallThrough) != vector4) + return false; + Vector2 Velocity6 = -Vector2.UnitX * testMagnitude; + vector4 = new Vector4(position, -testMagnitude, 0.0f); + if (Collision.SlopeCollision(position, Velocity6, Width, Height, (float) gravDir, fallThrough) != vector4) + return false; + Vector2 Velocity7 = Vector2.UnitY * testMagnitude; + vector4 = new Vector4(position, 0.0f, testMagnitude); + if (Collision.SlopeCollision(position, Velocity7, Width, Height, (float) gravDir, fallThrough) != vector4) + return false; + Vector2 Velocity8 = -Vector2.UnitY * testMagnitude; + vector4 = new Vector4(position, 0.0f, -testMagnitude); + if (Collision.SlopeCollision(position, Velocity8, Width, Height, (float) gravDir, fallThrough) != vector4) + return false; + } + return true; + } + + public static List FindCollisionTile( + int Direction, + Vector2 position, + float testMagnitude, + int Width, + int Height, + bool fallThrough = false, + bool fall2 = false, + int gravDir = 1, + bool checkCardinals = true, + bool checkSlopes = false) + { + List pointList = new List(); + Vector2 vector2_1; + Vector2 vector2_2; + switch (Direction) + { + case 0: + vector2_1 = Vector2.UnitX * testMagnitude; + break; + case 1: + vector2_1 = -Vector2.UnitX * testMagnitude; + break; + case 2: + vector2_2 = Vector2.UnitY * testMagnitude; + goto label_19; + case 3: + vector2_2 = -Vector2.UnitY * testMagnitude; + goto label_19; + default: +label_33: + return pointList; + } + Vector2 Velocity1 = vector2_1; + Vector4 vec1 = new Vector4(position, Velocity1.X, Velocity1.Y); + int x = (int) ((double) position.X + (Direction == 0 ? (double) Width : 0.0)) / 16; + float num1 = Math.Min((float) (16.0 - (double) position.Y % 16.0), (float) Height); + float num2 = num1; + if (checkCardinals && Collision.TileCollision(position - Velocity1, Velocity1, Width, (int) num1, fallThrough, fall2, gravDir) != Velocity1) + pointList.Add(new Point(x, (int) position.Y / 16)); + else if (checkSlopes && Collision.SlopeCollision(position, Velocity1, Width, (int) num1, (float) gravDir, fallThrough).XZW() != vec1.XZW()) + pointList.Add(new Point(x, (int) position.Y / 16)); + for (; (double) num2 + 16.0 <= (double) (Height - 16); num2 += 16f) + { + if (checkCardinals && Collision.TileCollision(position - Velocity1 + Vector2.UnitY * num2, Velocity1, Width, 16, fallThrough, fall2, gravDir) != Velocity1) + pointList.Add(new Point(x, (int) ((double) position.Y + (double) num2) / 16)); + else if (checkSlopes && Collision.SlopeCollision(position + Vector2.UnitY * num2, Velocity1, Width, 16, (float) gravDir, fallThrough).XZW() != vec1.XZW()) + pointList.Add(new Point(x, (int) ((double) position.Y + (double) num2) / 16)); + } + int Height1 = Height - (int) num2; + if (checkCardinals && Collision.TileCollision(position - Velocity1 + Vector2.UnitY * num2, Velocity1, Width, Height1, fallThrough, fall2, gravDir) != Velocity1) + { + pointList.Add(new Point(x, (int) ((double) position.Y + (double) num2) / 16)); + goto label_33; + } + else if (checkSlopes && Collision.SlopeCollision(position + Vector2.UnitY * num2, Velocity1, Width, Height1, (float) gravDir, fallThrough).XZW() != vec1.XZW()) + { + pointList.Add(new Point(x, (int) ((double) position.Y + (double) num2) / 16)); + goto label_33; + } + else + goto label_33; +label_19: + Vector2 Velocity2 = vector2_2; + Vector4 vec2 = new Vector4(position, Velocity2.X, Velocity2.Y); + int y = (int) ((double) position.Y + (Direction == 2 ? (double) Height : 0.0)) / 16; + float num3 = Math.Min((float) (16.0 - (double) position.X % 16.0), (float) Width); + float num4 = num3; + if (checkCardinals && Collision.TileCollision(position - Velocity2, Velocity2, (int) num3, Height, fallThrough, fall2, gravDir) != Velocity2) + pointList.Add(new Point((int) position.X / 16, y)); + else if (checkSlopes && Collision.SlopeCollision(position, Velocity2, (int) num3, Height, (float) gravDir, fallThrough).YZW() != vec2.YZW()) + pointList.Add(new Point((int) position.X / 16, y)); + for (; (double) num4 + 16.0 <= (double) (Width - 16); num4 += 16f) + { + if (checkCardinals && Collision.TileCollision(position - Velocity2 + Vector2.UnitX * num4, Velocity2, 16, Height, fallThrough, fall2, gravDir) != Velocity2) + pointList.Add(new Point((int) ((double) position.X + (double) num4) / 16, y)); + else if (checkSlopes && Collision.SlopeCollision(position + Vector2.UnitX * num4, Velocity2, 16, Height, (float) gravDir, fallThrough).YZW() != vec2.YZW()) + pointList.Add(new Point((int) ((double) position.X + (double) num4) / 16, y)); + } + int Width1 = Width - (int) num4; + if (checkCardinals && Collision.TileCollision(position - Velocity2 + Vector2.UnitX * num4, Velocity2, Width1, Height, fallThrough, fall2, gravDir) != Velocity2) + { + pointList.Add(new Point((int) ((double) position.X + (double) num4) / 16, y)); + goto label_33; + } + else if (checkSlopes && Collision.SlopeCollision(position + Vector2.UnitX * num4, Velocity2, Width1, Height, (float) gravDir, fallThrough).YZW() != vec2.YZW()) + { + pointList.Add(new Point((int) ((double) position.X + (double) num4) / 16, y)); + goto label_33; + } + else + goto label_33; + } + + public static bool FindCollisionDirection( + out int Direction, + Vector2 position, + int Width, + int Height, + bool fallThrough = false, + bool fall2 = false, + int gravDir = 1) + { + Vector2 Velocity1 = Vector2.UnitX * 16f; + if (Collision.TileCollision(position - Velocity1, Velocity1, Width, Height, fallThrough, fall2, gravDir) != Velocity1) + { + Direction = 0; + return true; + } + Vector2 Velocity2 = -Vector2.UnitX * 16f; + if (Collision.TileCollision(position - Velocity2, Velocity2, Width, Height, fallThrough, fall2, gravDir) != Velocity2) + { + Direction = 1; + return true; + } + Vector2 Velocity3 = Vector2.UnitY * 16f; + if (Collision.TileCollision(position - Velocity3, Velocity3, Width, Height, fallThrough, fall2, gravDir) != Velocity3) + { + Direction = 2; + return true; + } + Vector2 Velocity4 = -Vector2.UnitY * 16f; + if (Collision.TileCollision(position - Velocity4, Velocity4, Width, Height, fallThrough, fall2, gravDir) != Velocity4) + { + Direction = 3; + return true; + } + Direction = -1; + return false; + } + + public static bool SolidCollision(Vector2 Position, int Width, int Height) + { + int num1 = (int) ((double) Position.X / 16.0) - 1; + int num2 = (int) (((double) Position.X + (double) Width) / 16.0) + 2; + int num3 = (int) ((double) Position.Y / 16.0) - 1; + int num4 = (int) (((double) Position.Y + (double) Height) / 16.0) + 2; + int max = Main.maxTilesX - 1; + int num5 = Utils.Clamp(num1, 0, max); + int num6 = Utils.Clamp(num2, 0, Main.maxTilesX - 1); + int num7 = Utils.Clamp(num3, 0, Main.maxTilesY - 1); + int num8 = Utils.Clamp(num4, 0, Main.maxTilesY - 1); + for (int index1 = num5; index1 < num6; ++index1) + { + for (int index2 = num7; index2 < num8; ++index2) + { + if (Main.tile[index1, index2] != null && !Main.tile[index1, index2].inActive() && Main.tile[index1, index2].active() && Main.tileSolid[(int) Main.tile[index1, index2].type] && !Main.tileSolidTop[(int) Main.tile[index1, index2].type]) + { + Vector2 vector2; + vector2.X = (float) (index1 * 16); + vector2.Y = (float) (index2 * 16); + int num9 = 16; + if (Main.tile[index1, index2].halfBrick()) + { + vector2.Y += 8f; + num9 -= 8; + } + if ((double) Position.X + (double) Width > (double) vector2.X && (double) Position.X < (double) vector2.X + 16.0 && (double) Position.Y + (double) Height > (double) vector2.Y && (double) Position.Y < (double) vector2.Y + (double) num9) + return true; + } + } + } + return false; + } + + public static Vector2 WaterCollision( + Vector2 Position, + Vector2 Velocity, + int Width, + int Height, + bool fallThrough = false, + bool fall2 = false, + bool lavaWalk = true) + { + Vector2 vector2_1 = Velocity; + Vector2 vector2_2 = Position + Velocity; + Vector2 vector2_3 = Position; + int num1 = (int) ((double) Position.X / 16.0) - 1; + int num2 = (int) (((double) Position.X + (double) Width) / 16.0) + 2; + int num3 = (int) ((double) Position.Y / 16.0) - 1; + int num4 = (int) (((double) Position.Y + (double) Height) / 16.0) + 2; + int max = Main.maxTilesX - 1; + int num5 = Utils.Clamp(num1, 0, max); + int num6 = Utils.Clamp(num2, 0, Main.maxTilesX - 1); + int num7 = Utils.Clamp(num3, 0, Main.maxTilesY - 1); + int num8 = Utils.Clamp(num4, 0, Main.maxTilesY - 1); + for (int index1 = num5; index1 < num6; ++index1) + { + for (int index2 = num7; index2 < num8; ++index2) + { + if (Main.tile[index1, index2] != null && Main.tile[index1, index2].liquid > (byte) 0 && Main.tile[index1, index2 - 1].liquid == (byte) 0 && (!Main.tile[index1, index2].lava() || lavaWalk)) + { + int num9 = (int) Main.tile[index1, index2].liquid / 32 * 2 + 2; + Vector2 vector2_4; + vector2_4.X = (float) (index1 * 16); + vector2_4.Y = (float) (index2 * 16 + 16 - num9); + if ((double) vector2_2.X + (double) Width > (double) vector2_4.X && (double) vector2_2.X < (double) vector2_4.X + 16.0 && (double) vector2_2.Y + (double) Height > (double) vector2_4.Y && (double) vector2_2.Y < (double) vector2_4.Y + (double) num9 && (double) vector2_3.Y + (double) Height <= (double) vector2_4.Y && !fallThrough) + vector2_1.Y = vector2_4.Y - (vector2_3.Y + (float) Height); + } + } + } + return vector2_1; + } + + public static Vector2 AnyCollision( + Vector2 Position, + Vector2 Velocity, + int Width, + int Height, + bool evenActuated = false) + { + Vector2 vector2_1 = Velocity; + Vector2 vector2_2 = Velocity; + Vector2 vector2_3 = Position + Velocity; + Vector2 vector2_4 = Position; + int num1 = (int) ((double) Position.X / 16.0) - 1; + int num2 = (int) (((double) Position.X + (double) Width) / 16.0) + 2; + int num3 = (int) ((double) Position.Y / 16.0) - 1; + int num4 = (int) (((double) Position.Y + (double) Height) / 16.0) + 2; + int num5 = -1; + int num6 = -1; + int num7 = -1; + int num8 = -1; + if (num1 < 0) + num1 = 0; + if (num2 > Main.maxTilesX) + num2 = Main.maxTilesX; + if (num3 < 0) + num3 = 0; + if (num4 > Main.maxTilesY) + num4 = Main.maxTilesY; + for (int index1 = num1; index1 < num2; ++index1) + { + for (int index2 = num3; index2 < num4; ++index2) + { + if (Main.tile[index1, index2] != null && Main.tile[index1, index2].active() && (evenActuated || !Main.tile[index1, index2].inActive())) + { + Vector2 vector2_5; + vector2_5.X = (float) (index1 * 16); + vector2_5.Y = (float) (index2 * 16); + int num9 = 16; + if (Main.tile[index1, index2].halfBrick()) + { + vector2_5.Y += 8f; + num9 -= 8; + } + if ((double) vector2_3.X + (double) Width > (double) vector2_5.X && (double) vector2_3.X < (double) vector2_5.X + 16.0 && (double) vector2_3.Y + (double) Height > (double) vector2_5.Y && (double) vector2_3.Y < (double) vector2_5.Y + (double) num9) + { + if ((double) vector2_4.Y + (double) Height <= (double) vector2_5.Y) + { + num7 = index1; + num8 = index2; + if (num7 != num5) + vector2_1.Y = vector2_5.Y - (vector2_4.Y + (float) Height); + } + else if ((double) vector2_4.X + (double) Width <= (double) vector2_5.X && !Main.tileSolidTop[(int) Main.tile[index1, index2].type]) + { + num5 = index1; + num6 = index2; + if (num6 != num8) + vector2_1.X = vector2_5.X - (vector2_4.X + (float) Width); + if (num7 == num5) + vector2_1.Y = vector2_2.Y; + } + else if ((double) vector2_4.X >= (double) vector2_5.X + 16.0 && !Main.tileSolidTop[(int) Main.tile[index1, index2].type]) + { + num5 = index1; + num6 = index2; + if (num6 != num8) + vector2_1.X = vector2_5.X + 16f - vector2_4.X; + if (num7 == num5) + vector2_1.Y = vector2_2.Y; + } + else if ((double) vector2_4.Y >= (double) vector2_5.Y + (double) num9 && !Main.tileSolidTop[(int) Main.tile[index1, index2].type]) + { + num7 = index1; + num8 = index2; + vector2_1.Y = (float) ((double) vector2_5.Y + (double) num9 - (double) vector2_4.Y + 0.00999999977648258); + if (num8 == num6) + vector2_1.X = vector2_2.X + 0.01f; + } + } + } + } + } + return vector2_1; + } + + public static void HitTiles(Vector2 Position, Vector2 Velocity, int Width, int Height) + { + Vector2 vector2_1 = Position + Velocity; + int num1 = (int) ((double) Position.X / 16.0) - 1; + int num2 = (int) (((double) Position.X + (double) Width) / 16.0) + 2; + int num3 = (int) ((double) Position.Y / 16.0) - 1; + int num4 = (int) (((double) Position.Y + (double) Height) / 16.0) + 2; + if (num1 < 0) + num1 = 0; + if (num2 > Main.maxTilesX) + num2 = Main.maxTilesX; + if (num3 < 0) + num3 = 0; + if (num4 > Main.maxTilesY) + num4 = Main.maxTilesY; + for (int i = num1; i < num2; ++i) + { + for (int j = num3; j < num4; ++j) + { + if (Main.tile[i, j] != null && !Main.tile[i, j].inActive() && Main.tile[i, j].active() && (Main.tileSolid[(int) Main.tile[i, j].type] || Main.tileSolidTop[(int) Main.tile[i, j].type] && Main.tile[i, j].frameY == (short) 0)) + { + Vector2 vector2_2; + vector2_2.X = (float) (i * 16); + vector2_2.Y = (float) (j * 16); + int num5 = 16; + if (Main.tile[i, j].halfBrick()) + { + vector2_2.Y += 8f; + num5 -= 8; + } + if ((double) vector2_1.X + (double) Width >= (double) vector2_2.X && (double) vector2_1.X <= (double) vector2_2.X + 16.0 && (double) vector2_1.Y + (double) Height >= (double) vector2_2.Y && (double) vector2_1.Y <= (double) vector2_2.Y + (double) num5) + WorldGen.KillTile(i, j, true, true); + } + } + } + } + + public static Vector2 HurtTiles( + Vector2 Position, + Vector2 Velocity, + int Width, + int Height, + bool fireImmune = false) + { + Vector2 vector2_1 = Position; + int num1 = (int) ((double) Position.X / 16.0) - 1; + int num2 = (int) (((double) Position.X + (double) Width) / 16.0) + 2; + int num3 = (int) ((double) Position.Y / 16.0) - 1; + int num4 = (int) (((double) Position.Y + (double) Height) / 16.0) + 2; + if (num1 < 0) + num1 = 0; + if (num2 > Main.maxTilesX) + num2 = Main.maxTilesX; + if (num3 < 0) + num3 = 0; + if (num4 > Main.maxTilesY) + num4 = Main.maxTilesY; + for (int i = num1; i < num2; ++i) + { + for (int j = num3; j < num4; ++j) + { + if (Main.tile[i, j] != null && Main.tile[i, j].slope() == (byte) 0 && !Main.tile[i, j].inActive() && Main.tile[i, j].active() && (Main.tile[i, j].type == (ushort) 32 || Main.tile[i, j].type == (ushort) 37 || Main.tile[i, j].type == (ushort) 48 || Main.tile[i, j].type == (ushort) 232 || Main.tile[i, j].type == (ushort) 53 || Main.tile[i, j].type == (ushort) 57 || Main.tile[i, j].type == (ushort) 58 || Main.tile[i, j].type == (ushort) 69 || Main.tile[i, j].type == (ushort) 76 || Main.tile[i, j].type == (ushort) 112 || Main.tile[i, j].type == (ushort) 116 || Main.tile[i, j].type == (ushort) 123 || Main.tile[i, j].type == (ushort) 224 || Main.tile[i, j].type == (ushort) 234 || Main.tile[i, j].type == (ushort) 352 || Main.tile[i, j].type == (ushort) 484)) + { + Vector2 vector2_2; + vector2_2.X = (float) (i * 16); + vector2_2.Y = (float) (j * 16); + int num5 = 0; + int type = (int) Main.tile[i, j].type; + int num6 = 16; + if (Main.tile[i, j].halfBrick()) + { + vector2_2.Y += 8f; + num6 -= 8; + } + if (type == 32 || type == 69 || type == 80 || type == 352 || type == 80 && Main.expertMode) + { + if ((double) vector2_1.X + (double) Width > (double) vector2_2.X && (double) vector2_1.X < (double) vector2_2.X + 16.0 && (double) vector2_1.Y + (double) Height > (double) vector2_2.Y && (double) vector2_1.Y < (double) vector2_2.Y + (double) num6 + 11.0 / 1000.0) + { + int num7 = 1; + if ((double) vector2_1.X + (double) (Width / 2) < (double) vector2_2.X + 8.0) + num7 = -1; + int num8 = 10; + switch (type) + { + case 69: + num8 = 17; + break; + case 80: + num8 = 6; + break; + } + if (type == 32 || type == 69 || type == 352) + { + WorldGen.KillTile(i, j); + if (Main.netMode == 1 && !Main.tile[i, j].active() && Main.netMode == 1) + NetMessage.SendData(17, number: 4, number2: ((float) i), number3: ((float) j)); + } + return new Vector2((float) num7, (float) num8); + } + } + else if (type == 53 || type == 112 || type == 116 || type == 123 || type == 224 || type == 234) + { + if ((double) vector2_1.X + (double) Width - 2.0 >= (double) vector2_2.X && (double) vector2_1.X + 2.0 <= (double) vector2_2.X + 16.0 && (double) vector2_1.Y + (double) Height - 2.0 >= (double) vector2_2.Y && (double) vector2_1.Y + 2.0 <= (double) vector2_2.Y + (double) num6) + { + int num9 = 1; + if ((double) vector2_1.X + (double) (Width / 2) < (double) vector2_2.X + 8.0) + num9 = -1; + int num10 = 15; + return new Vector2((float) num9, (float) num10); + } + } + else if ((double) vector2_1.X + (double) Width >= (double) vector2_2.X && (double) vector2_1.X <= (double) vector2_2.X + 16.0 && (double) vector2_1.Y + (double) Height >= (double) vector2_2.Y && (double) vector2_1.Y <= (double) vector2_2.Y + (double) num6 + 11.0 / 1000.0) + { + int num11 = 1; + if ((double) vector2_1.X + (double) (Width / 2) < (double) vector2_2.X + 8.0) + num11 = -1; + if (!fireImmune && (type == 37 || type == 58 || type == 76)) + num5 = 20; + if (type == 48) + num5 = 60; + if (type == 232) + num5 = 80; + if (type == 484) + num5 = 25; + return new Vector2((float) num11, (float) num5); + } + } + } + } + return new Vector2(); + } + + public static bool SwitchTiles( + Vector2 Position, + int Width, + int Height, + Vector2 oldPosition, + int objType) + { + int num1 = (int) ((double) Position.X / 16.0) - 1; + int num2 = (int) (((double) Position.X + (double) Width) / 16.0) + 2; + int num3 = (int) ((double) Position.Y / 16.0) - 1; + int num4 = (int) (((double) Position.Y + (double) Height) / 16.0) + 2; + if (num1 < 0) + num1 = 0; + if (num2 > Main.maxTilesX) + num2 = Main.maxTilesX; + if (num3 < 0) + num3 = 0; + if (num4 > Main.maxTilesY) + num4 = Main.maxTilesY; + for (int index = num1; index < num2; ++index) + { + for (int j = num3; j < num4; ++j) + { + if (Main.tile[index, j] != null) + { + int type = (int) Main.tile[index, j].type; + if (Main.tile[index, j].active() && (type == 135 || type == 210 || type == 443 || type == 442)) + { + Vector2 vector2; + vector2.X = (float) (index * 16); + vector2.Y = (float) (j * 16 + 12); + bool flag1 = false; + if (type == 442) + { + if (objType == 4) + { + float r1StartX = 0.0f; + float r1StartY = 0.0f; + float r1Width = 0.0f; + float r1Height = 0.0f; + switch ((int) Main.tile[index, j].frameX / 22) + { + case 0: + r1StartX = (float) (index * 16); + r1StartY = (float) (j * 16 + 16 - 10); + r1Width = 16f; + r1Height = 10f; + break; + case 1: + r1StartX = (float) (index * 16); + r1StartY = (float) (j * 16); + r1Width = 16f; + r1Height = 10f; + break; + case 2: + r1StartX = (float) (index * 16); + r1StartY = (float) (j * 16); + r1Width = 10f; + r1Height = 16f; + break; + case 3: + r1StartX = (float) (index * 16 + 16 - 10); + r1StartY = (float) (j * 16); + r1Width = 10f; + r1Height = 16f; + break; + } + if (Utils.FloatIntersect(r1StartX, r1StartY, r1Width, r1Height, Position.X, Position.Y, (float) Width, (float) Height) && !Utils.FloatIntersect(r1StartX, r1StartY, r1Width, r1Height, oldPosition.X, oldPosition.Y, (float) Width, (float) Height)) + { + Wiring.HitSwitch(index, j); + NetMessage.SendData(59, number: index, number2: ((float) j)); + return true; + } + } + flag1 = true; + } + if (!flag1 && (double) Position.X + (double) Width > (double) vector2.X && (double) Position.X < (double) vector2.X + 16.0 && (double) Position.Y + (double) Height > (double) vector2.Y && (double) Position.Y < (double) vector2.Y + 4.01) + { + if (type == 210) + WorldGen.ExplodeMine(index, j); + else if ((double) oldPosition.X + (double) Width <= (double) vector2.X || (double) oldPosition.X >= (double) vector2.X + 16.0 || (double) oldPosition.Y + (double) Height <= (double) vector2.Y || (double) oldPosition.Y >= (double) vector2.Y + 16.01) + { + if (type == 443) + { + if (objType == 1) + { + Wiring.HitSwitch(index, j); + NetMessage.SendData(59, number: index, number2: ((float) j)); + } + } + else + { + int num5 = (int) Main.tile[index, j].frameY / 18; + bool flag2 = true; + if ((num5 == 4 || num5 == 2 || num5 == 3 || num5 == 6 || num5 == 7) && objType != 1) + flag2 = false; + if (num5 == 5 && (objType == 1 || objType == 4)) + flag2 = false; + if (flag2) + { + Wiring.HitSwitch(index, j); + NetMessage.SendData(59, number: index, number2: ((float) j)); + if (num5 == 7) + { + WorldGen.KillTile(index, j); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) index), number3: ((float) j)); + } + return true; + } + } + } + } + } + } + } + } + return false; + } + + public bool SwitchTilesNew( + Vector2 Position, + int Width, + int Height, + Vector2 oldPosition, + int objType) + { + Point tileCoordinates1 = Position.ToTileCoordinates(); + Point tileCoordinates2 = (Position + new Vector2((float) Width, (float) Height)).ToTileCoordinates(); + int num1 = Utils.Clamp(tileCoordinates1.X, 0, Main.maxTilesX - 1); + int num2 = Utils.Clamp(tileCoordinates1.Y, 0, Main.maxTilesY - 1); + int num3 = Utils.Clamp(tileCoordinates2.X, 0, Main.maxTilesX - 1); + int num4 = Utils.Clamp(tileCoordinates2.Y, 0, Main.maxTilesY - 1); + for (int index1 = num1; index1 <= num3; ++index1) + { + for (int index2 = num2; index2 <= num4; ++index2) + { + if (Main.tile[index1, index2] != null) + { + int type = (int) Main.tile[index1, index2].type; + } + } + } + return false; + } + + public static Vector2 StickyTiles( + Vector2 Position, + Vector2 Velocity, + int Width, + int Height) + { + Vector2 vector2_1 = Position; + int num1 = (int) ((double) Position.X / 16.0) - 1; + int num2 = (int) (((double) Position.X + (double) Width) / 16.0) + 2; + int num3 = (int) ((double) Position.Y / 16.0) - 1; + int num4 = (int) (((double) Position.Y + (double) Height) / 16.0) + 2; + if (num1 < 0) + num1 = 0; + if (num2 > Main.maxTilesX) + num2 = Main.maxTilesX; + if (num3 < 0) + num3 = 0; + if (num4 > Main.maxTilesY) + num4 = Main.maxTilesY; + Vector2 vector2_2; + for (int index1 = num1; index1 < num2; ++index1) + { + for (int index2 = num3; index2 < num4; ++index2) + { + if (Main.tile[index1, index2] != null && Main.tile[index1, index2].active() && !Main.tile[index1, index2].inActive()) + { + if (Main.tile[index1, index2].type == (ushort) 51) + { + int num5 = 0; + vector2_2.X = (float) (index1 * 16); + vector2_2.Y = (float) (index2 * 16); + if ((double) vector2_1.X + (double) Width > (double) vector2_2.X - (double) num5 && (double) vector2_1.X < (double) vector2_2.X + 16.0 + (double) num5 && (double) vector2_1.Y + (double) Height > (double) vector2_2.Y && (double) vector2_1.Y < (double) vector2_2.Y + 16.01) + { + if (Main.tile[index1, index2].type == (ushort) 51 && (double) Math.Abs(Velocity.X) + (double) Math.Abs(Velocity.Y) > 0.7 && Main.rand.Next(30) == 0) + Dust.NewDust(new Vector2((float) (index1 * 16), (float) (index2 * 16)), 16, 16, 30); + return new Vector2((float) index1, (float) index2); + } + } + else if (Main.tile[index1, index2].type == (ushort) 229 && Main.tile[index1, index2].slope() == (byte) 0) + { + int num6 = 1; + vector2_2.X = (float) (index1 * 16); + vector2_2.Y = (float) (index2 * 16); + float num7 = 16.01f; + if (Main.tile[index1, index2].halfBrick()) + { + vector2_2.Y += 8f; + num7 -= 8f; + } + if ((double) vector2_1.X + (double) Width > (double) vector2_2.X - (double) num6 && (double) vector2_1.X < (double) vector2_2.X + 16.0 + (double) num6 && (double) vector2_1.Y + (double) Height > (double) vector2_2.Y && (double) vector2_1.Y < (double) vector2_2.Y + (double) num7) + { + if (Main.tile[index1, index2].type == (ushort) 51 && (double) Math.Abs(Velocity.X) + (double) Math.Abs(Velocity.Y) > 0.7 && Main.rand.Next(30) == 0) + Dust.NewDust(new Vector2((float) (index1 * 16), (float) (index2 * 16)), 16, 16, 30); + return new Vector2((float) index1, (float) index2); + } + } + } + } + } + return new Vector2(-1f, -1f); + } + + public static bool SolidTilesVersatile(int startX, int endX, int startY, int endY) + { + if (startX > endX) + Utils.Swap(ref startX, ref endX); + if (startY > endY) + Utils.Swap(ref startY, ref endY); + return Collision.SolidTiles(startX, endX, startY, endY); + } + + public static bool SolidTiles(Vector2 position, int width, int height) => Collision.SolidTiles((int) ((double) position.X / 16.0), (int) (((double) position.X + (double) width) / 16.0), (int) ((double) position.Y / 16.0), (int) (((double) position.Y + (double) height) / 16.0)); + + public static bool SolidTiles(int startX, int endX, int startY, int endY) + { + if (startX < 0 || endX >= Main.maxTilesX || startY < 0 || endY >= Main.maxTilesY) + return true; + for (int index1 = startX; index1 < endX + 1; ++index1) + { + for (int index2 = startY; index2 < endY + 1; ++index2) + { + if (Main.tile[index1, index2] == null) + return false; + if (Main.tile[index1, index2].active() && !Main.tile[index1, index2].inActive() && Main.tileSolid[(int) Main.tile[index1, index2].type] && !Main.tileSolidTop[(int) Main.tile[index1, index2].type]) + return true; + } + } + return false; + } + + public static void StepDown( + ref Vector2 position, + ref Vector2 velocity, + int width, + int height, + ref float stepSpeed, + ref float gfxOffY, + int gravDir = 1, + bool waterWalk = false) + { + Vector2 vector2 = position; + vector2.X += velocity.X; + vector2.Y = (float) Math.Floor(((double) vector2.Y + (double) height) / 16.0) * 16f - (float) height; + bool flag = false; + int num1 = (int) ((double) vector2.X / 16.0); + int num2 = (int) (((double) vector2.X + (double) width) / 16.0); + int num3 = (int) (((double) vector2.Y + (double) height + 4.0) / 16.0); + int num4 = height / 16 + (height % 16 == 0 ? 0 : 1); + float num5 = (float) ((num3 + num4) * 16); + float num6 = (float) ((double) Main.bottomWorld / 16.0 - 42.0); + for (int x = num1; x <= num2; ++x) + { + for (int y = num3; y <= num3 + 1; ++y) + { + if (WorldGen.InWorld(x, y, 1)) + { + if (Main.tile[x, y] == null) + Main.tile[x, y] = new Tile(); + if (Main.tile[x, y - 1] == null) + Main.tile[x, y - 1] = new Tile(); + if (waterWalk && Main.tile[x, y].liquid > (byte) 0 && Main.tile[x, y - 1].liquid == (byte) 0) + { + int num7 = (int) Main.tile[x, y].liquid / 32 * 2 + 2; + int num8 = y * 16 + 16 - num7; + if (new Rectangle(x * 16, y * 16 - 17, 16, 16).Intersects(new Rectangle((int) position.X, (int) position.Y, width, height)) && (double) num8 < (double) num5) + num5 = (float) num8; + } + if ((double) y >= (double) num6 || Main.tile[x, y].nactive() && (Main.tileSolid[(int) Main.tile[x, y].type] || Main.tileSolidTop[(int) Main.tile[x, y].type])) + { + int num9 = y * 16; + if (Main.tile[x, y].halfBrick()) + num9 += 8; + if (Utils.FloatIntersect((float) (x * 16), (float) (y * 16 - 17), 16f, 16f, position.X, position.Y, (float) width, (float) height) && (double) num9 < (double) num5) + num5 = (float) num9; + } + } + } + } + float num10 = num5 - (position.Y + (float) height); + if ((double) num10 <= 7.0 || (double) num10 >= 17.0 || flag) + return; + stepSpeed = 1.5f; + if ((double) num10 > 9.0) + stepSpeed = 2.5f; + gfxOffY += position.Y + (float) height - num5; + position.Y = num5 - (float) height; + } + + public static void StepUp( + ref Vector2 position, + ref Vector2 velocity, + int width, + int height, + ref float stepSpeed, + ref float gfxOffY, + int gravDir = 1, + bool holdsMatching = false, + int specialChecksMode = 0) + { + int num1 = 0; + if ((double) velocity.X < 0.0) + num1 = -1; + if ((double) velocity.X > 0.0) + num1 = 1; + Vector2 vector2 = position; + vector2.X += velocity.X; + int x = (int) (((double) vector2.X + (double) (width / 2) + (double) ((width / 2 + 1) * num1)) / 16.0); + int index1 = (int) (((double) vector2.Y + 0.1) / 16.0); + if (gravDir == 1) + index1 = (int) (((double) vector2.Y + (double) height - 1.0) / 16.0); + int num2 = height / 16 + (height % 16 == 0 ? 0 : 1); + bool flag1 = true; + bool flag2 = true; + if (Main.tile[x, index1] == null) + return; + for (int index2 = 1; index2 < num2 + 2; ++index2) + { + if (!WorldGen.InWorld(x, index1 - index2 * gravDir) || Main.tile[x, index1 - index2 * gravDir] == null) + return; + } + if (!WorldGen.InWorld(x - num1, index1 - num2 * gravDir) || Main.tile[x - num1, index1 - num2 * gravDir] == null) + return; + for (int index3 = 2; index3 < num2 + 1; ++index3) + { + if (!WorldGen.InWorld(x, index1 - index3 * gravDir) || Main.tile[x, index1 - index3 * gravDir] == null) + return; + Tile tile = Main.tile[x, index1 - index3 * gravDir]; + flag1 = flag1 && (!tile.nactive() || !Main.tileSolid[(int) tile.type] || Main.tileSolidTop[(int) tile.type]); + } + Tile tile1 = Main.tile[x - num1, index1 - num2 * gravDir]; + bool flag3 = flag2 && (!tile1.nactive() || !Main.tileSolid[(int) tile1.type] || Main.tileSolidTop[(int) tile1.type]); + bool flag4 = true; + bool flag5 = true; + bool flag6 = true; + bool flag7; + Tile tile2; + bool flag8; + if (gravDir == 1) + { + if (Main.tile[x, index1 - gravDir] == null || Main.tile[x, index1 - (num2 + 1) * gravDir] == null) + return; + Tile tile3 = Main.tile[x, index1 - gravDir]; + Tile tile4 = Main.tile[x, index1 - (num2 + 1) * gravDir]; + flag7 = flag4 && (!tile3.nactive() || !Main.tileSolid[(int) tile3.type] || Main.tileSolidTop[(int) tile3.type] || tile3.slope() == (byte) 1 && (double) position.X + (double) (width / 2) > (double) (x * 16) || tile3.slope() == (byte) 2 && (double) position.X + (double) (width / 2) < (double) (x * 16 + 16) || tile3.halfBrick() && (!tile4.nactive() || !Main.tileSolid[(int) tile4.type] || Main.tileSolidTop[(int) tile4.type])); + Tile tile5 = Main.tile[x, index1]; + tile2 = Main.tile[x, index1 - 1]; + if (specialChecksMode == 1) + flag6 = tile5.type != (ushort) 16 && tile5.type != (ushort) 18 && tile5.type != (ushort) 14 && tile5.type != (ushort) 469 && tile5.type != (ushort) 134; + flag8 = ((!flag5 ? (false ? 1 : 0) : (!tile5.nactive() || tile5.topSlope() && (tile5.slope() != (byte) 1 || (double) position.X + (double) (width / 2) >= (double) (x * 16)) && (tile5.slope() != (byte) 2 || (double) position.X + (double) (width / 2) <= (double) (x * 16 + 16)) || tile5.topSlope() && (double) position.Y + (double) height <= (double) (index1 * 16) || (!Main.tileSolid[(int) tile5.type] || Main.tileSolidTop[(int) tile5.type]) && ((!holdsMatching || (!Main.tileSolidTop[(int) tile5.type] || tile5.frameY != (short) 0) && !TileID.Sets.Platforms[(int) tile5.type] ? 0 : (!Main.tileSolid[(int) tile2.type] ? 1 : (!tile2.nactive() ? 1 : 0))) & (flag6 ? 1 : 0)) == 0 ? (!tile2.halfBrick() ? (false ? 1 : 0) : (tile2.nactive() ? 1 : 0)) : (true ? 1 : 0))) & (!Main.tileSolidTop[(int) tile5.type] ? 1 : (!Main.tileSolidTop[(int) tile2.type] ? 1 : 0))) != 0; + } + else + { + Tile tile6 = Main.tile[x, index1 - gravDir]; + Tile tile7 = Main.tile[x, index1 - (num2 + 1) * gravDir]; + flag7 = flag4 && (!tile6.nactive() || !Main.tileSolid[(int) tile6.type] || Main.tileSolidTop[(int) tile6.type] || tile6.slope() != (byte) 0 || tile6.halfBrick() && (!tile7.nactive() || !Main.tileSolid[(int) tile7.type] || Main.tileSolidTop[(int) tile7.type])); + Tile tile8 = Main.tile[x, index1]; + tile2 = Main.tile[x, index1 + 1]; + flag8 = flag5 && (tile8.nactive() && (Main.tileSolid[(int) tile8.type] && !Main.tileSolidTop[(int) tile8.type] || holdsMatching && Main.tileSolidTop[(int) tile8.type] && tile8.frameY == (short) 0 && (!Main.tileSolid[(int) tile2.type] || !tile2.nactive())) || tile2.halfBrick() && tile2.nactive()); + } + if ((double) (x * 16) >= (double) vector2.X + (double) width || (double) (x * 16 + 16) <= (double) vector2.X) + return; + if (gravDir == 1) + { + if (!(flag8 & flag7 & flag1 & flag3)) + return; + float num3 = (float) (index1 * 16); + if (Main.tile[x, index1 - 1].halfBrick()) + num3 -= 8f; + else if (Main.tile[x, index1].halfBrick()) + num3 += 8f; + if ((double) num3 >= (double) vector2.Y + (double) height) + return; + float num4 = vector2.Y + (float) height - num3; + if ((double) num4 > 16.1) + return; + gfxOffY += position.Y + (float) height - num3; + position.Y = num3 - (float) height; + if ((double) num4 < 9.0) + stepSpeed = 1f; + else + stepSpeed = 2f; + } + else + { + if (!(flag8 & flag7 & flag1 & flag3) || Main.tile[x, index1].bottomSlope() || TileID.Sets.Platforms[(int) tile2.type]) + return; + float num5 = (float) (index1 * 16 + 16); + if ((double) num5 <= (double) vector2.Y) + return; + float num6 = num5 - vector2.Y; + if ((double) num6 > 16.1) + return; + gfxOffY -= num5 - position.Y; + position.Y = num5; + velocity.Y = 0.0f; + if ((double) num6 < 9.0) + stepSpeed = 1f; + else + stepSpeed = 2f; + } + } + + public static bool InTileBounds(int x, int y, int lx, int ly, int hx, int hy) => x >= lx && x <= hx && y >= ly && y <= hy; + + public static float GetTileRotation(Vector2 position) + { + float num1 = position.Y % 16f; + int index1 = (int) ((double) position.X / 16.0); + int index2 = (int) ((double) position.Y / 16.0); + Tile tile = Main.tile[index1, index2]; + bool flag = false; + for (int index3 = 2; index3 >= 0; --index3) + { + if (tile.active()) + { + if (Main.tileSolid[(int) tile.type]) + { + int num2 = tile.blockType(); + if (tile.type == (ushort) 19) + { + int num3 = (int) tile.frameX / 18; + if ((num3 >= 0 && num3 <= 7 || num3 >= 12 && num3 <= 16) && (double) num1 == 0.0 | flag) + return 0.0f; + switch (num3) + { + case 8: + case 19: + case 21: + case 23: + return -0.7853982f; + case 10: + case 20: + case 22: + case 24: + return 0.7853982f; + case 25: + case 26: + if (flag) + return 0.0f; + if (num2 == 2) + return 0.7853982f; + if (num2 == 3) + return -0.7853982f; + break; + } + } + else + { + if (num2 == 1) + return 0.0f; + if (num2 == 2) + return 0.7853982f; + return num2 == 3 ? -0.7853982f : 0.0f; + } + } + else if (((!Main.tileSolidTop[(int) tile.type] ? 0 : (tile.frameY == (short) 0 ? 1 : 0)) & (flag ? 1 : 0)) != 0) + return 0.0f; + } + ++index2; + tile = Main.tile[index1, index2]; + flag = true; + } + return 0.0f; + } + + public static List GetEntityEdgeTiles( + Entity entity, + bool left = true, + bool right = true, + bool up = true, + bool down = true) + { + int x1 = (int) entity.position.X; + int y1 = (int) entity.position.Y; + int num1 = x1 % 16; + int num2 = y1 % 16; + int x2 = (int) entity.Right.X; + int y2 = (int) entity.Bottom.Y; + if (x1 % 16 == 0) + --x1; + if (y1 % 16 == 0) + --y1; + if (x2 % 16 == 0) + ++x2; + if (y2 % 16 == 0) + ++y2; + int num3 = x2 / 16 - x1 / 16; + int num4 = y2 / 16 - y1 / 16; + List pointList = new List(); + int x3 = x1 / 16; + int y3 = y1 / 16; + for (int x4 = x3; x4 <= x3 + num3; ++x4) + { + if (up) + pointList.Add(new Point(x4, y3)); + if (down) + pointList.Add(new Point(x4, y3 + num4)); + } + for (int y4 = y3; y4 < y3 + num4; ++y4) + { + if (left) + pointList.Add(new Point(x3, y4)); + if (right) + pointList.Add(new Point(x3 + num3, y4)); + } + return pointList; + } + + public static void StepConveyorBelt(Entity entity, float gravDir) + { + Player player = (Player) null; + if (entity is Player) + { + player = (Player) entity; + if ((double) Math.Abs(player.gfxOffY) > 2.0 || player.grapCount > 0 || player.pulley) + return; + entity.height -= 5; + entity.position.Y += 5f; + } + int num1 = 0; + int num2 = 0; + bool flag = false; + int num3 = (int) entity.position.Y + entity.height; + entity.Hitbox.Inflate(2, 2); + Vector2 topLeft = entity.TopLeft; + Vector2 topRight = entity.TopRight; + Vector2 bottomLeft = entity.BottomLeft; + Vector2 bottomRight = entity.BottomRight; + List entityEdgeTiles = Collision.GetEntityEdgeTiles(entity, false, false); + Vector2 vector2_1 = new Vector2(0.0001f); + foreach (Point point in entityEdgeTiles) + { + if (WorldGen.InWorld(point.X, point.Y) && (player == null || !player.onTrack || point.Y >= num3)) + { + Tile tile = Main.tile[point.X, point.Y]; + if (tile != null && tile.active() && tile.nactive()) + { + int num4 = TileID.Sets.ConveyorDirection[(int) tile.type]; + if (num4 != 0) + { + Vector2 lineStart1; + Vector2 lineStart2; + lineStart1.X = lineStart2.X = (float) (point.X * 16); + Vector2 lineEnd1; + Vector2 lineEnd2; + lineEnd1.X = lineEnd2.X = (float) (point.X * 16 + 16); + switch (tile.slope()) + { + case 1: + lineStart2.Y = (float) (point.Y * 16); + lineEnd2.Y = lineEnd1.Y = lineStart1.Y = (float) (point.Y * 16 + 16); + break; + case 2: + lineEnd2.Y = (float) (point.Y * 16); + lineStart2.Y = lineEnd1.Y = lineStart1.Y = (float) (point.Y * 16 + 16); + break; + case 3: + lineEnd1.Y = lineStart2.Y = lineEnd2.Y = (float) (point.Y * 16); + lineStart1.Y = (float) (point.Y * 16 + 16); + break; + case 4: + lineStart1.Y = lineStart2.Y = lineEnd2.Y = (float) (point.Y * 16); + lineEnd1.Y = (float) (point.Y * 16 + 16); + break; + default: + lineStart2.Y = !tile.halfBrick() ? (lineEnd2.Y = (float) (point.Y * 16)) : (lineEnd2.Y = (float) (point.Y * 16 + 8)); + lineStart1.Y = lineEnd1.Y = (float) (point.Y * 16 + 16); + break; + } + int num5 = 0; + if (!TileID.Sets.Platforms[(int) tile.type] && Collision.CheckAABBvLineCollision2(entity.position - vector2_1, entity.Size + vector2_1 * 2f, lineStart1, lineEnd1)) + --num5; + if (Collision.CheckAABBvLineCollision2(entity.position - vector2_1, entity.Size + vector2_1 * 2f, lineStart2, lineEnd2)) + ++num5; + if (num5 != 0) + { + flag = true; + num1 += num4 * num5 * (int) gravDir; + if (tile.leftSlope()) + num2 += (int) gravDir * -num4; + if (tile.rightSlope()) + num2 -= (int) gravDir * -num4; + } + } + } + } + } + if (entity is Player) + { + entity.height += 5; + entity.position.Y -= 5f; + } + if (!flag || num1 == 0) + return; + int num6 = Math.Sign(num1); + int num7 = Math.Sign(num2); + Vector2 Velocity = Vector2.Normalize(new Vector2((float) num6 * gravDir, (float) num7)) * 2.5f; + Vector2 vector2_2 = Collision.TileCollision(entity.position, Velocity, entity.width, entity.height, gravDir: ((int) gravDir)); + entity.position += vector2_2; + Velocity = new Vector2(0.0f, 2.5f * gravDir); + Vector2 vector2_3 = Collision.TileCollision(entity.position, Velocity, entity.width, entity.height, gravDir: ((int) gravDir)); + entity.position += vector2_3; + } + + public static List GetTilesIn(Vector2 TopLeft, Vector2 BottomRight) + { + List pointList = new List(); + Point tileCoordinates1 = TopLeft.ToTileCoordinates(); + Point tileCoordinates2 = BottomRight.ToTileCoordinates(); + int num1 = Utils.Clamp(tileCoordinates1.X, 0, Main.maxTilesX - 1); + int num2 = Utils.Clamp(tileCoordinates1.Y, 0, Main.maxTilesY - 1); + int num3 = Utils.Clamp(tileCoordinates2.X, 0, Main.maxTilesX - 1); + int num4 = Utils.Clamp(tileCoordinates2.Y, 0, Main.maxTilesY - 1); + for (int x = num1; x <= num3; ++x) + { + for (int y = num2; y <= num4; ++y) + { + if (Main.tile[x, y] != null) + pointList.Add(new Point(x, y)); + } + } + return pointList; + } + + public static void ExpandVertically( + int startX, + int startY, + out int topY, + out int bottomY, + int maxExpandUp = 100, + int maxExpandDown = 100) + { + topY = startY; + bottomY = startY; + if (!WorldGen.InWorld(startX, startY, 10)) + return; + for (int index = 0; index < maxExpandUp && topY > 0 && topY >= 10 && Main.tile[startX, topY] != null && !WorldGen.SolidTile3(startX, topY); ++index) + --topY; + for (int index = 0; index < maxExpandDown && bottomY < Main.maxTilesY - 10 && bottomY <= Main.maxTilesY - 10 && Main.tile[startX, bottomY] != null && !WorldGen.SolidTile3(startX, bottomY); ++index) + ++bottomY; + } + + public static Vector2 AdvancedTileCollision( + bool[] forcedIgnoredTiles, + Vector2 Position, + Vector2 Velocity, + int Width, + int Height, + bool fallThrough = false, + bool fall2 = false, + int gravDir = 1) + { + Collision.up = false; + Collision.down = false; + Vector2 vector2_1 = Velocity; + Vector2 vector2_2 = Velocity; + Vector2 vector2_3 = Position + Velocity; + Vector2 vector2_4 = Position; + int num1 = (int) ((double) Position.X / 16.0) - 1; + int num2 = (int) (((double) Position.X + (double) Width) / 16.0) + 2; + int num3 = (int) ((double) Position.Y / 16.0) - 1; + int num4 = (int) (((double) Position.Y + (double) Height) / 16.0) + 2; + int num5 = -1; + int num6 = -1; + int num7 = -1; + int num8 = -1; + int max = Main.maxTilesX - 1; + int num9 = Utils.Clamp(num1, 0, max); + int num10 = Utils.Clamp(num2, 0, Main.maxTilesX - 1); + int num11 = Utils.Clamp(num3, 0, Main.maxTilesY - 1); + int num12 = Utils.Clamp(num4, 0, Main.maxTilesY - 1); + float num13 = (float) ((num12 + 3) * 16); + for (int index1 = num9; index1 < num10; ++index1) + { + for (int index2 = num11; index2 < num12; ++index2) + { + Tile tile = Main.tile[index1, index2]; + if (tile != null && tile.active() && !tile.inActive() && !forcedIgnoredTiles[(int) tile.type] && (Main.tileSolid[(int) tile.type] || Main.tileSolidTop[(int) tile.type] && tile.frameY == (short) 0)) + { + Vector2 vector2_5; + vector2_5.X = (float) (index1 * 16); + vector2_5.Y = (float) (index2 * 16); + int num14 = 16; + if (tile.halfBrick()) + { + vector2_5.Y += 8f; + num14 -= 8; + } + if ((double) vector2_3.X + (double) Width > (double) vector2_5.X && (double) vector2_3.X < (double) vector2_5.X + 16.0 && (double) vector2_3.Y + (double) Height > (double) vector2_5.Y && (double) vector2_3.Y < (double) vector2_5.Y + (double) num14) + { + bool flag1 = false; + bool flag2 = false; + if (tile.slope() > (byte) 2) + { + if (tile.slope() == (byte) 3 && (double) vector2_4.Y + (double) Math.Abs(Velocity.X) >= (double) vector2_5.Y && (double) vector2_4.X >= (double) vector2_5.X) + flag2 = true; + if (tile.slope() == (byte) 4 && (double) vector2_4.Y + (double) Math.Abs(Velocity.X) >= (double) vector2_5.Y && (double) vector2_4.X + (double) Width <= (double) vector2_5.X + 16.0) + flag2 = true; + } + else if (tile.slope() > (byte) 0) + { + flag1 = true; + if (tile.slope() == (byte) 1 && (double) vector2_4.Y + (double) Height - (double) Math.Abs(Velocity.X) <= (double) vector2_5.Y + (double) num14 && (double) vector2_4.X >= (double) vector2_5.X) + flag2 = true; + if (tile.slope() == (byte) 2 && (double) vector2_4.Y + (double) Height - (double) Math.Abs(Velocity.X) <= (double) vector2_5.Y + (double) num14 && (double) vector2_4.X + (double) Width <= (double) vector2_5.X + 16.0) + flag2 = true; + } + if (!flag2) + { + if ((double) vector2_4.Y + (double) Height <= (double) vector2_5.Y) + { + Collision.down = true; + if ((!(Main.tileSolidTop[(int) tile.type] & fallThrough) || !((double) Velocity.Y <= 1.0 | fall2)) && (double) num13 > (double) vector2_5.Y) + { + num7 = index1; + num8 = index2; + if (num14 < 16) + ++num8; + if (num7 != num5 && !flag1) + { + vector2_1.Y = (float) ((double) vector2_5.Y - ((double) vector2_4.Y + (double) Height) + (gravDir == -1 ? -0.00999999977648258 : 0.0)); + num13 = vector2_5.Y; + } + } + } + else if ((double) vector2_4.X + (double) Width <= (double) vector2_5.X && !Main.tileSolidTop[(int) tile.type]) + { + if (Main.tile[index1 - 1, index2] == null) + Main.tile[index1 - 1, index2] = new Tile(); + if (Main.tile[index1 - 1, index2].slope() != (byte) 2 && Main.tile[index1 - 1, index2].slope() != (byte) 4) + { + num5 = index1; + num6 = index2; + if (num6 != num8) + vector2_1.X = vector2_5.X - (vector2_4.X + (float) Width); + if (num7 == num5) + vector2_1.Y = vector2_2.Y; + } + } + else if ((double) vector2_4.X >= (double) vector2_5.X + 16.0 && !Main.tileSolidTop[(int) tile.type]) + { + if (Main.tile[index1 + 1, index2] == null) + Main.tile[index1 + 1, index2] = new Tile(); + if (Main.tile[index1 + 1, index2].slope() != (byte) 1 && Main.tile[index1 + 1, index2].slope() != (byte) 3) + { + num5 = index1; + num6 = index2; + if (num6 != num8) + vector2_1.X = vector2_5.X + 16f - vector2_4.X; + if (num7 == num5) + vector2_1.Y = vector2_2.Y; + } + } + else if ((double) vector2_4.Y >= (double) vector2_5.Y + (double) num14 && !Main.tileSolidTop[(int) tile.type]) + { + Collision.up = true; + num7 = index1; + num8 = index2; + vector2_1.Y = (float) ((double) vector2_5.Y + (double) num14 - (double) vector2_4.Y + (gravDir == 1 ? 0.00999999977648258 : 0.0)); + if (num8 == num6) + vector2_1.X = vector2_2.X; + } + } + } + } + } + } + return vector2_1; + } + + public static void LaserScan( + Vector2 samplingPoint, + Vector2 directionUnit, + float samplingWidth, + float maxDistance, + float[] samples) + { + for (int index = 0; index < samples.Length; ++index) + { + float num1 = (float) index / (float) (samples.Length - 1); + Vector2 vector2_1 = samplingPoint; + Vector2 spinningpoint = directionUnit; + Vector2 vector2_2 = new Vector2(); + Vector2 center = vector2_2; + Vector2 vector2_3 = spinningpoint.RotatedBy(1.57079637050629, center) * (num1 - 0.5f) * samplingWidth; + Vector2 vector2_4 = vector2_1 + vector2_3; + int x1 = (int) vector2_4.X / 16; + int y1 = (int) vector2_4.Y / 16; + Vector2 vector2_5 = vector2_4 + directionUnit * maxDistance; + int x2 = (int) vector2_5.X / 16; + int y2 = (int) vector2_5.Y / 16; + Tuple col; + float num2; + if (!Collision.TupleHitLine(x1, y1, x2, y2, 0, 0, new List>(), out col)) + { + vector2_2 = new Vector2((float) Math.Abs(x1 - col.Item1), (float) Math.Abs(y1 - col.Item2)); + num2 = vector2_2.Length() * 16f; + } + else if (col.Item1 == x2 && col.Item2 == y2) + { + num2 = maxDistance; + } + else + { + vector2_2 = new Vector2((float) Math.Abs(x1 - col.Item1), (float) Math.Abs(y1 - col.Item2)); + num2 = vector2_2.Length() * 16f; + } + samples[index] = num2; + } + } + + public static void AimingLaserScan( + Vector2 startPoint, + Vector2 endPoint, + float samplingWidth, + int samplesToTake, + out Vector2 vectorTowardsTarget, + out float[] samples) + { + samples = new float[samplesToTake]; + vectorTowardsTarget = endPoint - startPoint; + Collision.LaserScan(startPoint, vectorTowardsTarget.SafeNormalize(Vector2.Zero), samplingWidth, vectorTowardsTarget.Length(), samples); + } + } +} diff --git a/CombatText.cs b/CombatText.cs new file mode 100644 index 0000000..2d982e7 --- /dev/null +++ b/CombatText.cs @@ -0,0 +1,186 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.CombatText +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.GameContent; + +namespace Terraria +{ + public class CombatText + { + public static readonly Color DamagedFriendly = new Color((int) byte.MaxValue, 80, 90, (int) byte.MaxValue); + public static readonly Color DamagedFriendlyCrit = new Color((int) byte.MaxValue, 100, 30, (int) byte.MaxValue); + public static readonly Color DamagedHostile = new Color((int) byte.MaxValue, 160, 80, (int) byte.MaxValue); + public static readonly Color DamagedHostileCrit = new Color((int) byte.MaxValue, 100, 30, (int) byte.MaxValue); + public static readonly Color OthersDamagedHostile = CombatText.DamagedHostile * 0.4f; + public static readonly Color OthersDamagedHostileCrit = CombatText.DamagedHostileCrit * 0.4f; + public static readonly Color HealLife = new Color(100, (int) byte.MaxValue, 100, (int) byte.MaxValue); + public static readonly Color HealMana = new Color(100, 100, (int) byte.MaxValue, (int) byte.MaxValue); + public static readonly Color LifeRegen = new Color((int) byte.MaxValue, 60, 70, (int) byte.MaxValue); + public static readonly Color LifeRegenNegative = new Color((int) byte.MaxValue, 140, 40, (int) byte.MaxValue); + public Vector2 position; + public Vector2 velocity; + public float alpha; + public int alphaDir = 1; + public string text = ""; + public float scale = 1f; + public float rotation; + public Color color; + public bool active; + public int lifeTime; + public bool crit; + public bool dot; + + public static int NewText( + Rectangle location, + Color color, + int amount, + bool dramatic = false, + bool dot = false) + { + return CombatText.NewText(location, color, amount.ToString(), dramatic, dot); + } + + public static int NewText( + Rectangle location, + Color color, + string text, + bool dramatic = false, + bool dot = false) + { + if (Main.netMode == 2) + return 100; + for (int index1 = 0; index1 < 100; ++index1) + { + if (!Main.combatText[index1].active) + { + int index2 = 0; + if (dramatic) + index2 = 1; + Vector2 vector2 = FontAssets.CombatText[index2].Value.MeasureString(text); + Main.combatText[index1].alpha = 1f; + Main.combatText[index1].alphaDir = -1; + Main.combatText[index1].active = true; + Main.combatText[index1].scale = 0.0f; + Main.combatText[index1].rotation = 0.0f; + Main.combatText[index1].position.X = (float) ((double) location.X + (double) location.Width * 0.5 - (double) vector2.X * 0.5); + Main.combatText[index1].position.Y = (float) ((double) location.Y + (double) location.Height * 0.25 - (double) vector2.Y * 0.5); + Main.combatText[index1].position.X += (float) Main.rand.Next(-(int) ((double) location.Width * 0.5), (int) ((double) location.Width * 0.5) + 1); + Main.combatText[index1].position.Y += (float) Main.rand.Next(-(int) ((double) location.Height * 0.5), (int) ((double) location.Height * 0.5) + 1); + Main.combatText[index1].color = color; + Main.combatText[index1].text = text; + Main.combatText[index1].velocity.Y = -7f; + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + { + Main.combatText[index1].velocity.Y *= -1f; + Main.combatText[index1].position.Y = (float) ((double) location.Y + (double) location.Height * 0.75 + (double) vector2.Y * 0.5); + } + Main.combatText[index1].lifeTime = 60; + Main.combatText[index1].crit = dramatic; + Main.combatText[index1].dot = dot; + if (dramatic) + { + Main.combatText[index1].text = text; + Main.combatText[index1].lifeTime *= 2; + Main.combatText[index1].velocity.Y *= 2f; + Main.combatText[index1].velocity.X = (float) Main.rand.Next(-25, 26) * 0.05f; + Main.combatText[index1].rotation = (float) (Main.combatText[index1].lifeTime / 2) * (1f / 500f); + if ((double) Main.combatText[index1].velocity.X < 0.0) + Main.combatText[index1].rotation *= -1f; + } + if (dot) + { + Main.combatText[index1].velocity.Y = -4f; + Main.combatText[index1].lifeTime = 40; + } + return index1; + } + } + return 100; + } + + public static void clearAll() + { + for (int index = 0; index < 100; ++index) + Main.combatText[index].active = false; + } + + public static float TargetScale => 1f; + + public void Update() + { + if (!this.active) + return; + float targetScale = CombatText.TargetScale; + this.alpha += (float) this.alphaDir * 0.05f; + if ((double) this.alpha <= 0.6) + this.alphaDir = 1; + if ((double) this.alpha >= 1.0) + { + this.alpha = 1f; + this.alphaDir = -1; + } + if (this.dot) + { + this.velocity.Y += 0.15f; + } + else + { + this.velocity.Y *= 0.92f; + if (this.crit) + this.velocity.Y *= 0.92f; + } + this.velocity.X *= 0.93f; + this.position += this.velocity; + --this.lifeTime; + if (this.lifeTime <= 0) + { + this.scale -= 0.1f * targetScale; + if ((double) this.scale < 0.1) + this.active = false; + this.lifeTime = 0; + if (!this.crit) + return; + this.alphaDir = -1; + this.scale += 0.07f * targetScale; + } + else + { + if (this.crit) + { + if ((double) this.velocity.X < 0.0) + this.rotation += 1f / 1000f; + else + this.rotation -= 1f / 1000f; + } + if (this.dot) + { + this.scale += 0.5f * targetScale; + if ((double) this.scale <= 0.8 * (double) targetScale) + return; + this.scale = 0.8f * targetScale; + } + else + { + if ((double) this.scale < (double) targetScale) + this.scale += 0.1f * targetScale; + if ((double) this.scale <= (double) targetScale) + return; + this.scale = targetScale; + } + } + } + + public static void UpdateCombatText() + { + for (int index = 0; index < 100; ++index) + { + if (Main.combatText[index].active) + Main.combatText[index].Update(); + } + } + } +} diff --git a/DataStructures/AnchorData.cs b/DataStructures/AnchorData.cs new file mode 100644 index 0000000..4184cb2 --- /dev/null +++ b/DataStructures/AnchorData.cs @@ -0,0 +1,33 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.AnchorData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.Enums; + +namespace Terraria.DataStructures +{ + public struct AnchorData + { + public AnchorType type; + public int tileCount; + public int checkStart; + public static AnchorData Empty; + + public AnchorData(AnchorType type, int count, int start) + { + this.type = type; + this.tileCount = count; + this.checkStart = start; + } + + public static bool operator ==(AnchorData data1, AnchorData data2) => data1.type == data2.type && data1.tileCount == data2.tileCount && data1.checkStart == data2.checkStart; + + public static bool operator !=(AnchorData data1, AnchorData data2) => data1.type != data2.type || data1.tileCount != data2.tileCount || data1.checkStart != data2.checkStart; + + public override bool Equals(object obj) => obj is AnchorData anchorData && this.type == anchorData.type && this.tileCount == ((AnchorData) obj).tileCount && this.checkStart == ((AnchorData) obj).checkStart; + + public override int GetHashCode() => (int) (ushort) this.type << 16 | (int) (byte) this.tileCount << 8 | (int) (byte) this.checkStart; + } +} diff --git a/DataStructures/AnchoredEntitiesCollection.cs b/DataStructures/AnchoredEntitiesCollection.cs new file mode 100644 index 0000000..4b345f4 --- /dev/null +++ b/DataStructures/AnchoredEntitiesCollection.cs @@ -0,0 +1,72 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.AnchoredEntitiesCollection +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; + +namespace Terraria.DataStructures +{ + public class AnchoredEntitiesCollection + { + private List _anchoredNPCs; + private List _anchoredPlayers; + + public int AnchoredPlayersAmount => this._anchoredPlayers.Count; + + public AnchoredEntitiesCollection() + { + this._anchoredNPCs = new List(); + this._anchoredPlayers = new List(); + } + + public void ClearNPCAnchors() => this._anchoredNPCs.Clear(); + + public void ClearPlayerAnchors() => this._anchoredPlayers.Clear(); + + public void AddNPC(int npcIndex, Point coords) => this._anchoredNPCs.Add(new AnchoredEntitiesCollection.IndexPointPair() + { + index = npcIndex, + coords = coords + }); + + public int GetNextPlayerStackIndexInCoords(Point coords) => this.GetEntitiesInCoords(coords); + + public void AddPlayerAndGetItsStackedIndexInCoords( + int playerIndex, + Point coords, + out int stackedIndexInCoords) + { + stackedIndexInCoords = this.GetEntitiesInCoords(coords); + this._anchoredPlayers.Add(new AnchoredEntitiesCollection.IndexPointPair() + { + index = playerIndex, + coords = coords + }); + } + + private int GetEntitiesInCoords(Point coords) + { + int num = 0; + for (int index = 0; index < this._anchoredNPCs.Count; ++index) + { + if (this._anchoredNPCs[index].coords == coords) + ++num; + } + for (int index = 0; index < this._anchoredPlayers.Count; ++index) + { + if (this._anchoredPlayers[index].coords == coords) + ++num; + } + return num; + } + + private struct IndexPointPair + { + public int index; + public Point coords; + } + } +} diff --git a/DataStructures/BinaryWriterHelper.cs b/DataStructures/BinaryWriterHelper.cs new file mode 100644 index 0000000..c4e5806 --- /dev/null +++ b/DataStructures/BinaryWriterHelper.cs @@ -0,0 +1,49 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.BinaryWriterHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; + +namespace Terraria.DataStructures +{ + public struct BinaryWriterHelper + { + private long _placeInWriter; + + public void ReservePointToFillLengthLaterByFilling6Bytes(BinaryWriter writer) + { + this._placeInWriter = writer.BaseStream.Position; + writer.Write(0U); + writer.Write((ushort) 0); + } + + public void FillReservedPoint(BinaryWriter writer, ushort dataId) + { + long position = writer.BaseStream.Position; + writer.BaseStream.Position = this._placeInWriter; + long num = position - this._placeInWriter - 4L; + writer.Write((int) num); + writer.Write(dataId); + writer.BaseStream.Position = position; + } + + public void FillOnlyIfThereIsLengthOrRevertToSavedPosition( + BinaryWriter writer, + ushort dataId, + out bool wroteSomething) + { + wroteSomething = false; + long position = writer.BaseStream.Position; + writer.BaseStream.Position = this._placeInWriter; + long num = position - this._placeInWriter - 4L; + if (num == 0L) + return; + writer.Write((int) num); + writer.Write(dataId); + writer.BaseStream.Position = position; + wroteSomething = true; + } + } +} diff --git a/DataStructures/BufferPool.cs b/DataStructures/BufferPool.cs new file mode 100644 index 0000000..0a006f1 --- /dev/null +++ b/DataStructures/BufferPool.cs @@ -0,0 +1,74 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.BufferPool +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; + +namespace Terraria.DataStructures +{ + public static class BufferPool + { + private const int SMALL_BUFFER_SIZE = 32; + private const int MEDIUM_BUFFER_SIZE = 256; + private const int LARGE_BUFFER_SIZE = 16384; + private static object bufferLock = new object(); + private static Queue SmallBufferQueue = new Queue(); + private static Queue MediumBufferQueue = new Queue(); + private static Queue LargeBufferQueue = new Queue(); + + public static CachedBuffer Request(int size) + { + lock (BufferPool.bufferLock) + { + if (size <= 32) + return BufferPool.SmallBufferQueue.Count == 0 ? new CachedBuffer(new byte[32]) : BufferPool.SmallBufferQueue.Dequeue().Activate(); + if (size <= 256) + return BufferPool.MediumBufferQueue.Count == 0 ? new CachedBuffer(new byte[256]) : BufferPool.MediumBufferQueue.Dequeue().Activate(); + if (size > 16384) + return new CachedBuffer(new byte[size]); + return BufferPool.LargeBufferQueue.Count == 0 ? new CachedBuffer(new byte[16384]) : BufferPool.LargeBufferQueue.Dequeue().Activate(); + } + } + + public static CachedBuffer Request(byte[] data, int offset, int size) + { + CachedBuffer cachedBuffer = BufferPool.Request(size); + Buffer.BlockCopy((Array) data, offset, (Array) cachedBuffer.Data, 0, size); + return cachedBuffer; + } + + public static void Recycle(CachedBuffer buffer) + { + int length = buffer.Length; + lock (BufferPool.bufferLock) + { + if (length <= 32) + BufferPool.SmallBufferQueue.Enqueue(buffer); + else if (length <= 256) + { + BufferPool.MediumBufferQueue.Enqueue(buffer); + } + else + { + if (length > 16384) + return; + BufferPool.LargeBufferQueue.Enqueue(buffer); + } + } + } + + public static void PrintBufferSizes() + { + lock (BufferPool.bufferLock) + { + Console.WriteLine("SmallBufferQueue.Count: " + (object) BufferPool.SmallBufferQueue.Count); + Console.WriteLine("MediumBufferQueue.Count: " + (object) BufferPool.MediumBufferQueue.Count); + Console.WriteLine("LargeBufferQueue.Count: " + (object) BufferPool.LargeBufferQueue.Count); + Console.WriteLine(""); + } + } + } +} diff --git a/DataStructures/CachedBuffer.cs b/DataStructures/CachedBuffer.cs new file mode 100644 index 0000000..d8ee78a --- /dev/null +++ b/DataStructures/CachedBuffer.cs @@ -0,0 +1,46 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.CachedBuffer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; + +namespace Terraria.DataStructures +{ + public class CachedBuffer + { + public readonly byte[] Data; + public readonly BinaryWriter Writer; + public readonly BinaryReader Reader; + private readonly MemoryStream _memoryStream; + private bool _isActive = true; + + public int Length => this.Data.Length; + + public bool IsActive => this._isActive; + + public CachedBuffer(byte[] data) + { + this.Data = data; + this._memoryStream = new MemoryStream(data); + this.Writer = new BinaryWriter((Stream) this._memoryStream); + this.Reader = new BinaryReader((Stream) this._memoryStream); + } + + internal CachedBuffer Activate() + { + this._isActive = true; + this._memoryStream.Position = 0L; + return this; + } + + public void Recycle() + { + if (!this._isActive) + return; + this._isActive = false; + BufferPool.Recycle(this); + } + } +} diff --git a/DataStructures/ColorSlidersSet.cs b/DataStructures/ColorSlidersSet.cs new file mode 100644 index 0000000..96c2317 --- /dev/null +++ b/DataStructures/ColorSlidersSet.cs @@ -0,0 +1,50 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.ColorSlidersSet +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.DataStructures +{ + public class ColorSlidersSet + { + public float Hue; + public float Saturation; + public float Luminance; + public float Alpha = 1f; + + public void SetHSL(Color color) + { + Vector3 hsl = Main.rgbToHsl(color); + this.Hue = hsl.X; + this.Saturation = hsl.Y; + this.Luminance = hsl.Z; + } + + public void SetHSL(Vector3 vector) + { + this.Hue = vector.X; + this.Saturation = vector.Y; + this.Luminance = vector.Z; + } + + public Color GetColor() + { + Color rgb = Main.hslToRgb(this.Hue, this.Saturation, this.Luminance); + rgb.A = (byte) ((double) this.Alpha * (double) byte.MaxValue); + return rgb; + } + + public Vector3 GetHSLVector() => new Vector3(this.Hue, this.Saturation, this.Luminance); + + public void ApplyToMainLegacyBars() + { + Main.hBar = this.Hue; + Main.sBar = this.Saturation; + Main.lBar = this.Luminance; + Main.aBar = this.Alpha; + } + } +} diff --git a/DataStructures/CompositePlayerDrawContext.cs b/DataStructures/CompositePlayerDrawContext.cs new file mode 100644 index 0000000..19ded4d --- /dev/null +++ b/DataStructures/CompositePlayerDrawContext.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.CompositePlayerDrawContext +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.DataStructures +{ + public enum CompositePlayerDrawContext + { + BackShoulder, + BackArm, + Torso, + FrontArm, + FrontShoulder, + FrontArmAccessory, + BackArmAccessory, + } +} diff --git a/DataStructures/DoubleStack`1.cs b/DataStructures/DoubleStack`1.cs new file mode 100644 index 0000000..eb19075 --- /dev/null +++ b/DataStructures/DoubleStack`1.cs @@ -0,0 +1,149 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.DoubleStack`1 +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Terraria.DataStructures +{ + public class DoubleStack + { + private T1[][] _segmentList; + private readonly int _segmentSize; + private int _segmentCount; + private readonly int _segmentShiftPosition; + private int _start; + private int _end; + private int _size; + private int _last; + + public DoubleStack(int segmentSize = 1024, int initialSize = 0) + { + if (segmentSize < 16) + segmentSize = 16; + this._start = segmentSize / 2; + this._end = this._start; + this._size = 0; + this._segmentShiftPosition = segmentSize + this._start; + initialSize += this._start; + int length = initialSize / segmentSize + 1; + this._segmentList = new T1[length][]; + for (int index = 0; index < length; ++index) + this._segmentList[index] = new T1[segmentSize]; + this._segmentSize = segmentSize; + this._segmentCount = length; + this._last = this._segmentSize * this._segmentCount - 1; + } + + public void PushFront(T1 front) + { + if (this._start == 0) + { + T1[][] objArray = new T1[this._segmentCount + 1][]; + for (int index = 0; index < this._segmentCount; ++index) + objArray[index + 1] = this._segmentList[index]; + objArray[0] = new T1[this._segmentSize]; + this._segmentList = objArray; + ++this._segmentCount; + this._start += this._segmentSize; + this._end += this._segmentSize; + this._last += this._segmentSize; + } + --this._start; + this._segmentList[this._start / this._segmentSize][this._start % this._segmentSize] = front; + ++this._size; + } + + public T1 PopFront() + { + if (this._size == 0) + throw new InvalidOperationException("The DoubleStack is empty."); + T1[] segment1 = this._segmentList[this._start / this._segmentSize]; + int index1 = this._start % this._segmentSize; + T1 obj = segment1[index1]; + segment1[index1] = default (T1); + ++this._start; + --this._size; + if (this._start >= this._segmentShiftPosition) + { + T1[] segment2 = this._segmentList[0]; + for (int index2 = 0; index2 < this._segmentCount - 1; ++index2) + this._segmentList[index2] = this._segmentList[index2 + 1]; + this._segmentList[this._segmentCount - 1] = segment2; + this._start -= this._segmentSize; + this._end -= this._segmentSize; + } + if (this._size == 0) + { + this._start = this._segmentSize / 2; + this._end = this._start; + } + return obj; + } + + public T1 PeekFront() + { + if (this._size == 0) + throw new InvalidOperationException("The DoubleStack is empty."); + return this._segmentList[this._start / this._segmentSize][this._start % this._segmentSize]; + } + + public void PushBack(T1 back) + { + if (this._end == this._last) + { + T1[][] objArray = new T1[this._segmentCount + 1][]; + for (int index = 0; index < this._segmentCount; ++index) + objArray[index] = this._segmentList[index]; + objArray[this._segmentCount] = new T1[this._segmentSize]; + ++this._segmentCount; + this._segmentList = objArray; + this._last += this._segmentSize; + } + this._segmentList[this._end / this._segmentSize][this._end % this._segmentSize] = back; + ++this._end; + ++this._size; + } + + public T1 PopBack() + { + if (this._size == 0) + throw new InvalidOperationException("The DoubleStack is empty."); + T1[] segment = this._segmentList[this._end / this._segmentSize]; + int index = this._end % this._segmentSize; + T1 obj = segment[index]; + segment[index] = default (T1); + --this._end; + --this._size; + if (this._size == 0) + { + this._start = this._segmentSize / 2; + this._end = this._start; + } + return obj; + } + + public T1 PeekBack() + { + if (this._size == 0) + throw new InvalidOperationException("The DoubleStack is empty."); + return this._segmentList[this._end / this._segmentSize][this._end % this._segmentSize]; + } + + public void Clear(bool quickClear = false) + { + if (!quickClear) + { + for (int index = 0; index < this._segmentCount; ++index) + Array.Clear((Array) this._segmentList[index], 0, this._segmentSize); + } + this._start = this._segmentSize / 2; + this._end = this._start; + this._size = 0; + } + + public int Count => this._size; + } +} diff --git a/DataStructures/DrawAnimation.cs b/DataStructures/DrawAnimation.cs new file mode 100644 index 0000000..cd97dbe --- /dev/null +++ b/DataStructures/DrawAnimation.cs @@ -0,0 +1,25 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.DrawAnimation +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.DataStructures +{ + public class DrawAnimation + { + public int Frame; + public int FrameCount; + public int TicksPerFrame; + public int FrameCounter; + + public virtual void Update() + { + } + + public virtual Rectangle GetFrame(Texture2D texture, int frameCounterOverride = -1) => texture.Frame(); + } +} diff --git a/DataStructures/DrawAnimationVertical.cs b/DataStructures/DrawAnimationVertical.cs new file mode 100644 index 0000000..fbfbfd9 --- /dev/null +++ b/DataStructures/DrawAnimationVertical.cs @@ -0,0 +1,71 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.DrawAnimationVertical +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.DataStructures +{ + public class DrawAnimationVertical : DrawAnimation + { + public bool PingPong; + public bool NotActuallyAnimating; + + public DrawAnimationVertical(int ticksperframe, int frameCount, bool pingPong = false) + { + this.Frame = 0; + this.FrameCounter = 0; + this.FrameCount = frameCount; + this.TicksPerFrame = ticksperframe; + this.PingPong = pingPong; + } + + public override void Update() + { + if (this.NotActuallyAnimating) + return; + if (++this.FrameCounter < this.TicksPerFrame) + return; + this.FrameCounter = 0; + if (this.PingPong) + { + if (++this.Frame < this.FrameCount * 2 - 2) + return; + this.Frame = 0; + } + else + { + if (++this.Frame < this.FrameCount) + return; + this.Frame = 0; + } + } + + public override Rectangle GetFrame(Texture2D texture, int frameCounterOverride = -1) + { + if (frameCounterOverride != -1) + { + int num1 = frameCounterOverride / this.TicksPerFrame; + int num2 = this.FrameCount; + if (this.PingPong) + num2 = num2 * 2 - 1; + int num3 = num2; + int frameY = num1 % num3; + if (this.PingPong && frameY >= this.FrameCount) + frameY = this.FrameCount * 2 - 2 - frameY; + Rectangle rectangle = texture.Frame(verticalFrames: this.FrameCount, frameY: frameY); + rectangle.Height -= 2; + return rectangle; + } + int frameY1 = this.Frame; + if (this.PingPong && this.Frame >= this.FrameCount) + frameY1 = this.FrameCount * 2 - 2 - this.Frame; + Rectangle rectangle1 = texture.Frame(verticalFrames: this.FrameCount, frameY: frameY1); + rectangle1.Height -= 2; + return rectangle1; + } + } +} diff --git a/DataStructures/DrawData.cs b/DataStructures/DrawData.cs new file mode 100644 index 0000000..271c50b --- /dev/null +++ b/DataStructures/DrawData.cs @@ -0,0 +1,178 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.DrawData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.DataStructures +{ + public struct DrawData + { + public Texture2D texture; + public Vector2 position; + public Rectangle destinationRectangle; + public Rectangle? sourceRect; + public Color color; + public float rotation; + public Vector2 origin; + public Vector2 scale; + public SpriteEffects effect; + public int shader; + public bool ignorePlayerRotation; + public readonly bool useDestinationRectangle; + public static Rectangle? nullRectangle; + + public DrawData(Texture2D texture, Vector2 position, Color color) + { + this.texture = texture; + this.position = position; + this.color = color; + this.destinationRectangle = new Rectangle(); + this.sourceRect = DrawData.nullRectangle; + this.rotation = 0.0f; + this.origin = Vector2.Zero; + this.scale = Vector2.One; + this.effect = SpriteEffects.None; + this.shader = 0; + this.ignorePlayerRotation = false; + this.useDestinationRectangle = false; + } + + public DrawData(Texture2D texture, Vector2 position, Rectangle? sourceRect, Color color) + { + this.texture = texture; + this.position = position; + this.color = color; + this.destinationRectangle = new Rectangle(); + this.sourceRect = sourceRect; + this.rotation = 0.0f; + this.origin = Vector2.Zero; + this.scale = Vector2.One; + this.effect = SpriteEffects.None; + this.shader = 0; + this.ignorePlayerRotation = false; + this.useDestinationRectangle = false; + } + + public DrawData( + Texture2D texture, + Vector2 position, + Rectangle? sourceRect, + Color color, + float rotation, + Vector2 origin, + float scale, + SpriteEffects effect, + int inactiveLayerDepth) + { + this.texture = texture; + this.position = position; + this.sourceRect = sourceRect; + this.color = color; + this.rotation = rotation; + this.origin = origin; + this.scale = new Vector2(scale, scale); + this.effect = effect; + this.destinationRectangle = new Rectangle(); + this.shader = 0; + this.ignorePlayerRotation = false; + this.useDestinationRectangle = false; + } + + public DrawData( + Texture2D texture, + Vector2 position, + Rectangle? sourceRect, + Color color, + float rotation, + Vector2 origin, + Vector2 scale, + SpriteEffects effect, + int inactiveLayerDepth) + { + this.texture = texture; + this.position = position; + this.sourceRect = sourceRect; + this.color = color; + this.rotation = rotation; + this.origin = origin; + this.scale = scale; + this.effect = effect; + this.destinationRectangle = new Rectangle(); + this.shader = 0; + this.ignorePlayerRotation = false; + this.useDestinationRectangle = false; + } + + public DrawData(Texture2D texture, Rectangle destinationRectangle, Color color) + { + this.texture = texture; + this.destinationRectangle = destinationRectangle; + this.color = color; + this.position = Vector2.Zero; + this.sourceRect = DrawData.nullRectangle; + this.rotation = 0.0f; + this.origin = Vector2.Zero; + this.scale = Vector2.One; + this.effect = SpriteEffects.None; + this.shader = 0; + this.ignorePlayerRotation = false; + this.useDestinationRectangle = false; + } + + public DrawData( + Texture2D texture, + Rectangle destinationRectangle, + Rectangle? sourceRect, + Color color) + { + this.texture = texture; + this.destinationRectangle = destinationRectangle; + this.color = color; + this.position = Vector2.Zero; + this.sourceRect = sourceRect; + this.rotation = 0.0f; + this.origin = Vector2.Zero; + this.scale = Vector2.One; + this.effect = SpriteEffects.None; + this.shader = 0; + this.ignorePlayerRotation = false; + this.useDestinationRectangle = false; + } + + public DrawData( + Texture2D texture, + Rectangle destinationRectangle, + Rectangle? sourceRect, + Color color, + float rotation, + Vector2 origin, + SpriteEffects effect, + int inactiveLayerDepth) + { + this.texture = texture; + this.destinationRectangle = destinationRectangle; + this.sourceRect = sourceRect; + this.color = color; + this.rotation = rotation; + this.origin = origin; + this.effect = effect; + this.position = Vector2.Zero; + this.scale = Vector2.One; + this.shader = 0; + this.ignorePlayerRotation = false; + this.useDestinationRectangle = false; + } + + public void Draw(SpriteBatch sb) + { + if (this.useDestinationRectangle) + sb.Draw(this.texture, this.destinationRectangle, this.sourceRect, this.color, this.rotation, this.origin, this.effect, 0.0f); + else + sb.Draw(this.texture, this.position, this.sourceRect, this.color, this.rotation, this.origin, this.scale, this.effect, 0.0f); + } + } +} diff --git a/DataStructures/DrillDebugDraw.cs b/DataStructures/DrillDebugDraw.cs new file mode 100644 index 0000000..f673de0 --- /dev/null +++ b/DataStructures/DrillDebugDraw.cs @@ -0,0 +1,22 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.DrillDebugDraw +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.DataStructures +{ + public struct DrillDebugDraw + { + public Vector2 point; + public Color color; + + public DrillDebugDraw(Vector2 p, Color c) + { + this.point = p; + this.color = c; + } + } +} diff --git a/DataStructures/EntityShadowInfo.cs b/DataStructures/EntityShadowInfo.cs new file mode 100644 index 0000000..dd7a808 --- /dev/null +++ b/DataStructures/EntityShadowInfo.cs @@ -0,0 +1,32 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.EntityShadowInfo +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.DataStructures +{ + public struct EntityShadowInfo + { + public Vector2 Position; + public float Rotation; + public Vector2 Origin; + public int Direction; + public int GravityDirection; + public int BodyFrameIndex; + + public void CopyPlayer(Player player) + { + this.Position = player.position; + this.Rotation = player.fullRotation; + this.Origin = player.fullRotationOrigin; + this.Direction = player.direction; + this.GravityDirection = (int) player.gravDir; + this.BodyFrameIndex = player.bodyFrame.Y / player.bodyFrame.Height; + } + + public Vector2 HeadgearOffset => Main.OffsetsPlayerHeadgear[this.BodyFrameIndex]; + } +} diff --git a/DataStructures/EntryFilterer`2.cs b/DataStructures/EntryFilterer`2.cs new file mode 100644 index 0000000..270cefb --- /dev/null +++ b/DataStructures/EntryFilterer`2.cs @@ -0,0 +1,81 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.EntryFilterer`2 +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using Terraria.Localization; + +namespace Terraria.DataStructures +{ + public class EntryFilterer + where T : new() + where U : IEntryFilter + { + public List AvailableFilters; + public List ActiveFilters; + public List AlwaysActiveFilters; + private ISearchFilter _searchFilter; + private ISearchFilter _searchFilterFromConstructor; + + public EntryFilterer() + { + this.AvailableFilters = new List(); + this.ActiveFilters = new List(); + this.AlwaysActiveFilters = new List(); + } + + public void AddFilters(List filters) => this.AvailableFilters.AddRange((IEnumerable) filters); + + public bool FitsFilter(T entry) + { + if (this._searchFilter != null && !this._searchFilter.FitsFilter(entry)) + return false; + for (int index = 0; index < this.AlwaysActiveFilters.Count; ++index) + { + if (!this.AlwaysActiveFilters[index].FitsFilter(entry)) + return false; + } + if (this.ActiveFilters.Count == 0) + return true; + for (int index = 0; index < this.ActiveFilters.Count; ++index) + { + if (this.ActiveFilters[index].FitsFilter(entry)) + return true; + } + return false; + } + + public void ToggleFilter(int filterIndex) + { + U availableFilter = this.AvailableFilters[filterIndex]; + if (this.ActiveFilters.Contains(availableFilter)) + this.ActiveFilters.Remove(availableFilter); + else + this.ActiveFilters.Add(availableFilter); + } + + public bool IsFilterActive(int filterIndex) => this.AvailableFilters.IndexInRange(filterIndex) && this.ActiveFilters.Contains(this.AvailableFilters[filterIndex]); + + public void SetSearchFilterObject(Z searchFilter) where Z : ISearchFilter, U => this._searchFilterFromConstructor = (ISearchFilter) searchFilter; + + public void SetSearchFilter(string searchFilter) + { + if (string.IsNullOrWhiteSpace(searchFilter)) + { + this._searchFilter = (ISearchFilter) null; + } + else + { + this._searchFilter = this._searchFilterFromConstructor; + this._searchFilter.SetSearch(searchFilter); + } + } + + public string GetDisplayName() => Language.GetTextValueWith("BestiaryInfo.Filters", (object) new + { + Count = this.ActiveFilters.Count + }); + } +} diff --git a/DataStructures/EntrySorter`2.cs b/DataStructures/EntrySorter`2.cs new file mode 100644 index 0000000..873ec4f --- /dev/null +++ b/DataStructures/EntrySorter`2.cs @@ -0,0 +1,46 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.EntrySorter`2 +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using Terraria.Localization; + +namespace Terraria.DataStructures +{ + public class EntrySorter : IComparer + where TEntryType : new() + where TStepType : IEntrySortStep + { + public List Steps = new List(); + private int _prioritizedStep; + + public void AddSortSteps(List sortSteps) => this.Steps.AddRange((IEnumerable) sortSteps); + + public int Compare(TEntryType x, TEntryType y) + { + int num = 0; + if (this._prioritizedStep != -1) + { + num = this.Steps[this._prioritizedStep].Compare(x, y); + if (num != 0) + return num; + } + for (int index = 0; index < this.Steps.Count; ++index) + { + if (index != this._prioritizedStep) + { + num = this.Steps[index].Compare(x, y); + if (num != 0) + return num; + } + } + return num; + } + + public void SetPrioritizedStepIndex(int index) => this._prioritizedStep = index; + + public string GetDisplayName() => Language.GetTextValue(this.Steps[this._prioritizedStep].GetDisplayNameKey()); + } +} diff --git a/DataStructures/FishingAttempt.cs b/DataStructures/FishingAttempt.cs new file mode 100644 index 0000000..917122b --- /dev/null +++ b/DataStructures/FishingAttempt.cs @@ -0,0 +1,35 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.FishingAttempt +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.DataStructures +{ + public struct FishingAttempt + { + public PlayerFishingConditions playerFishingConditions; + public int X; + public int Y; + public int bobberType; + public bool common; + public bool uncommon; + public bool rare; + public bool veryrare; + public bool legendary; + public bool crate; + public bool inLava; + public bool inHoney; + public int waterTilesCount; + public int waterNeededToFish; + public float waterQuality; + public int chumsInWater; + public int fishingLevel; + public bool CanFishInLava; + public float atmo; + public int questFish; + public int heightLevel; + public int rolledItemDrop; + public int rolledEnemySpawn; + } +} diff --git a/DataStructures/FlowerPacketInfo.cs b/DataStructures/FlowerPacketInfo.cs new file mode 100644 index 0000000..746efc4 --- /dev/null +++ b/DataStructures/FlowerPacketInfo.cs @@ -0,0 +1,18 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.FlowerPacketInfo +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.DataStructures +{ + public class FlowerPacketInfo + { + public List stylesOnPurity = new List(); + public List stylesOnCorruption = new List(); + public List stylesOnCrimson = new List(); + public List stylesOnHallow = new List(); + } +} diff --git a/DataStructures/GameModeData.cs b/DataStructures/GameModeData.cs new file mode 100644 index 0000000..beadb85 --- /dev/null +++ b/DataStructures/GameModeData.cs @@ -0,0 +1,82 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.GameModeData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.DataStructures +{ + public class GameModeData + { + public static readonly GameModeData NormalMode = new GameModeData() + { + Id = 0, + EnemyMaxLifeMultiplier = 1f, + EnemyDamageMultiplier = 1f, + DebuffTimeMultiplier = 1f, + KnockbackToEnemiesMultiplier = 1f, + TownNPCDamageMultiplier = 1f, + EnemyDefenseMultiplier = 1f, + EnemyMoneyDropMultiplier = 1f + }; + public static readonly GameModeData ExpertMode = new GameModeData() + { + Id = 1, + IsExpertMode = true, + EnemyMaxLifeMultiplier = 2f, + EnemyDamageMultiplier = 2f, + DebuffTimeMultiplier = 2f, + KnockbackToEnemiesMultiplier = 0.9f, + TownNPCDamageMultiplier = 1.5f, + EnemyDefenseMultiplier = 1f, + EnemyMoneyDropMultiplier = 2.5f + }; + public static readonly GameModeData MasterMode = new GameModeData() + { + Id = 2, + IsExpertMode = true, + IsMasterMode = true, + EnemyMaxLifeMultiplier = 3f, + EnemyDamageMultiplier = 3f, + DebuffTimeMultiplier = 2.5f, + KnockbackToEnemiesMultiplier = 0.8f, + TownNPCDamageMultiplier = 1.75f, + EnemyDefenseMultiplier = 1f, + EnemyMoneyDropMultiplier = 2.5f + }; + public static readonly GameModeData CreativeMode = new GameModeData() + { + Id = 3, + IsJourneyMode = true, + EnemyMaxLifeMultiplier = 1f, + EnemyDamageMultiplier = 1f, + DebuffTimeMultiplier = 1f, + KnockbackToEnemiesMultiplier = 1f, + TownNPCDamageMultiplier = 2f, + EnemyDefenseMultiplier = 1f, + EnemyMoneyDropMultiplier = 1f + }; + + public int Id { get; private set; } + + public bool IsExpertMode { get; private set; } + + public bool IsMasterMode { get; private set; } + + public bool IsJourneyMode { get; private set; } + + public float EnemyMaxLifeMultiplier { get; private set; } + + public float EnemyDamageMultiplier { get; private set; } + + public float DebuffTimeMultiplier { get; private set; } + + public float KnockbackToEnemiesMultiplier { get; private set; } + + public float TownNPCDamageMultiplier { get; private set; } + + public float EnemyDefenseMultiplier { get; private set; } + + public float EnemyMoneyDropMultiplier { get; private set; } + } +} diff --git a/DataStructures/IEntryFilter`1.cs b/DataStructures/IEntryFilter`1.cs new file mode 100644 index 0000000..1e734ac --- /dev/null +++ b/DataStructures/IEntryFilter`1.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.IEntryFilter`1 +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.UI; + +namespace Terraria.DataStructures +{ + public interface IEntryFilter + { + bool FitsFilter(T entry); + + string GetDisplayNameKey(); + + UIElement GetImage(); + } +} diff --git a/DataStructures/IEntrySortStep`1.cs b/DataStructures/IEntrySortStep`1.cs new file mode 100644 index 0000000..558ecc9 --- /dev/null +++ b/DataStructures/IEntrySortStep`1.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.IEntrySortStep`1 +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.DataStructures +{ + public interface IEntrySortStep : IComparer + { + string GetDisplayNameKey(); + } +} diff --git a/DataStructures/ISearchFilter`1.cs b/DataStructures/ISearchFilter`1.cs new file mode 100644 index 0000000..ae69fce --- /dev/null +++ b/DataStructures/ISearchFilter`1.cs @@ -0,0 +1,13 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.ISearchFilter`1 +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.DataStructures +{ + public interface ISearchFilter : IEntryFilter + { + void SetSearch(string searchText); + } +} diff --git a/DataStructures/ItemSyncPersistentStats.cs b/DataStructures/ItemSyncPersistentStats.cs new file mode 100644 index 0000000..b6e4306 --- /dev/null +++ b/DataStructures/ItemSyncPersistentStats.cs @@ -0,0 +1,29 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.ItemSyncPersistentStats +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.DataStructures +{ + public struct ItemSyncPersistentStats + { + private Color color; + private int type; + + public void CopyFrom(Item item) + { + this.type = item.type; + this.color = item.color; + } + + public void PasteInto(Item item) + { + if (this.type != item.type) + return; + item.color = this.color; + } + } +} diff --git a/DataStructures/LineSegment.cs b/DataStructures/LineSegment.cs new file mode 100644 index 0000000..670e903 --- /dev/null +++ b/DataStructures/LineSegment.cs @@ -0,0 +1,22 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.LineSegment +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.DataStructures +{ + public struct LineSegment + { + public Vector2 Start; + public Vector2 End; + + public LineSegment(Vector2 start, Vector2 end) + { + this.Start = start; + this.End = end; + } + } +} diff --git a/DataStructures/MethodSequenceListItem.cs b/DataStructures/MethodSequenceListItem.cs new file mode 100644 index 0000000..d583e98 --- /dev/null +++ b/DataStructures/MethodSequenceListItem.cs @@ -0,0 +1,46 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.MethodSequenceListItem +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; + +namespace Terraria.DataStructures +{ + public class MethodSequenceListItem + { + public string Name; + public MethodSequenceListItem Parent; + public Func Method; + public bool Skip; + + public MethodSequenceListItem(string name, Func method, MethodSequenceListItem parent = null) + { + this.Name = name; + this.Method = method; + this.Parent = parent; + } + + public bool ShouldAct(List sequence) + { + if (this.Skip || !sequence.Contains(this)) + return false; + return this.Parent == null || this.Parent.ShouldAct(sequence); + } + + public bool Act() => this.Method(); + + public static void ExecuteSequence(List sequence) + { + foreach (MethodSequenceListItem sequenceListItem in sequence) + { + if (sequenceListItem.ShouldAct(sequence) && !sequenceListItem.Act()) + break; + } + } + + public override string ToString() => "name: " + this.Name + " skip: " + this.Skip.ToString() + " parent: " + (object) this.Parent; + } +} diff --git a/DataStructures/NPCAimedTarget.cs b/DataStructures/NPCAimedTarget.cs new file mode 100644 index 0000000..651a161 --- /dev/null +++ b/DataStructures/NPCAimedTarget.cs @@ -0,0 +1,56 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.NPCAimedTarget +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.Enums; + +namespace Terraria.DataStructures +{ + public struct NPCAimedTarget + { + public NPCTargetType Type; + public Rectangle Hitbox; + public int Width; + public int Height; + public Vector2 Position; + public Vector2 Velocity; + + public bool Invalid => this.Type == NPCTargetType.None; + + public Vector2 Center => this.Position + this.Size / 2f; + + public Vector2 Size => new Vector2((float) this.Width, (float) this.Height); + + public NPCAimedTarget(NPC npc) + { + this.Type = NPCTargetType.NPC; + this.Hitbox = npc.Hitbox; + this.Width = npc.width; + this.Height = npc.height; + this.Position = npc.position; + this.Velocity = npc.velocity; + } + + public NPCAimedTarget(Player player, bool ignoreTank = true) + { + this.Type = NPCTargetType.Player; + this.Hitbox = player.Hitbox; + this.Width = player.width; + this.Height = player.height; + this.Position = player.position; + this.Velocity = player.velocity; + if (ignoreTank || player.tankPet <= -1) + return; + Projectile projectile = Main.projectile[player.tankPet]; + this.Type = NPCTargetType.PlayerTankPet; + this.Hitbox = projectile.Hitbox; + this.Width = projectile.width; + this.Height = projectile.height; + this.Position = projectile.position; + this.Velocity = projectile.velocity; + } + } +} diff --git a/DataStructures/NPCStrengthHelper.cs b/DataStructures/NPCStrengthHelper.cs new file mode 100644 index 0000000..504eac1 --- /dev/null +++ b/DataStructures/NPCStrengthHelper.cs @@ -0,0 +1,24 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.NPCStrengthHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.DataStructures +{ + public struct NPCStrengthHelper + { + private float _strength; + private GameModeData _gameModeData; + + public bool IsExpertMode => (double) this._strength >= 2.0 || this._gameModeData.IsExpertMode; + + public bool IsMasterMode => (double) this._strength >= 3.0 || this._gameModeData.IsMasterMode; + + public NPCStrengthHelper(GameModeData data, float strength) + { + this._strength = strength; + this._gameModeData = data; + } + } +} diff --git a/DataStructures/PlacementHook.cs b/DataStructures/PlacementHook.cs new file mode 100644 index 0000000..d2290ec --- /dev/null +++ b/DataStructures/PlacementHook.cs @@ -0,0 +1,40 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.PlacementHook +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Terraria.DataStructures +{ + public struct PlacementHook + { + public Func hook; + public int badReturn; + public int badResponse; + public bool processedCoordinates; + public static PlacementHook Empty = new PlacementHook((Func) null, 0, 0, false); + public const int Response_AllInvalid = 0; + + public PlacementHook( + Func hook, + int badReturn, + int badResponse, + bool processedCoordinates) + { + this.hook = hook; + this.badResponse = badResponse; + this.badReturn = badReturn; + this.processedCoordinates = processedCoordinates; + } + + public static bool operator ==(PlacementHook first, PlacementHook second) => first.hook == second.hook && first.badResponse == second.badResponse && first.badReturn == second.badReturn && first.processedCoordinates == second.processedCoordinates; + + public static bool operator !=(PlacementHook first, PlacementHook second) => first.hook != second.hook || first.badResponse != second.badResponse || first.badReturn != second.badReturn || first.processedCoordinates != second.processedCoordinates; + + public override bool Equals(object obj) => obj is PlacementHook placementHook && this == placementHook; + + public override int GetHashCode() => base.GetHashCode(); + } +} diff --git a/DataStructures/PlayerDeathReason.cs b/DataStructures/PlayerDeathReason.cs new file mode 100644 index 0000000..99600e7 --- /dev/null +++ b/DataStructures/PlayerDeathReason.cs @@ -0,0 +1,131 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.PlayerDeathReason +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; +using Terraria.Localization; + +namespace Terraria.DataStructures +{ + public class PlayerDeathReason + { + private int _sourcePlayerIndex = -1; + private int _sourceNPCIndex = -1; + private int _sourceProjectileIndex = -1; + private int _sourceOtherIndex = -1; + private int _sourceProjectileType; + private int _sourceItemType; + private int _sourceItemPrefix; + private string _sourceCustomReason; + + public int? SourceProjectileType => this._sourceProjectileIndex == -1 ? new int?() : new int?(this._sourceProjectileType); + + public static PlayerDeathReason LegacyEmpty() => new PlayerDeathReason() + { + _sourceOtherIndex = 254 + }; + + public static PlayerDeathReason LegacyDefault() => new PlayerDeathReason() + { + _sourceOtherIndex = (int) byte.MaxValue + }; + + public static PlayerDeathReason ByNPC(int index) => new PlayerDeathReason() + { + _sourceNPCIndex = index + }; + + public static PlayerDeathReason ByCustomReason(string reasonInEnglish) => new PlayerDeathReason() + { + _sourceCustomReason = reasonInEnglish + }; + + public static PlayerDeathReason ByPlayer(int index) => new PlayerDeathReason() + { + _sourcePlayerIndex = index, + _sourceItemType = Main.player[index].inventory[Main.player[index].selectedItem].type, + _sourceItemPrefix = (int) Main.player[index].inventory[Main.player[index].selectedItem].prefix + }; + + public static PlayerDeathReason ByOther(int type) => new PlayerDeathReason() + { + _sourceOtherIndex = type + }; + + public static PlayerDeathReason ByProjectile( + int playerIndex, + int projectileIndex) + { + PlayerDeathReason playerDeathReason = new PlayerDeathReason() + { + _sourcePlayerIndex = playerIndex, + _sourceProjectileIndex = projectileIndex, + _sourceProjectileType = Main.projectile[projectileIndex].type + }; + if (playerIndex >= 0 && playerIndex <= (int) byte.MaxValue) + { + playerDeathReason._sourceItemType = Main.player[playerIndex].inventory[Main.player[playerIndex].selectedItem].type; + playerDeathReason._sourceItemPrefix = (int) Main.player[playerIndex].inventory[Main.player[playerIndex].selectedItem].prefix; + } + return playerDeathReason; + } + + public NetworkText GetDeathText(string deadPlayerName) => this._sourceCustomReason != null ? NetworkText.FromLiteral(this._sourceCustomReason) : Lang.CreateDeathMessage(deadPlayerName, this._sourcePlayerIndex, this._sourceNPCIndex, this._sourceProjectileIndex, this._sourceOtherIndex, this._sourceProjectileType, this._sourceItemType); + + public void WriteSelfTo(BinaryWriter writer) + { + BitsByte bitsByte = (BitsByte) (byte) 0; + bitsByte[0] = this._sourcePlayerIndex != -1; + bitsByte[1] = this._sourceNPCIndex != -1; + bitsByte[2] = this._sourceProjectileIndex != -1; + bitsByte[3] = this._sourceOtherIndex != -1; + bitsByte[4] = (uint) this._sourceProjectileType > 0U; + bitsByte[5] = (uint) this._sourceItemType > 0U; + bitsByte[6] = (uint) this._sourceItemPrefix > 0U; + bitsByte[7] = this._sourceCustomReason != null; + writer.Write((byte) bitsByte); + if (bitsByte[0]) + writer.Write((short) this._sourcePlayerIndex); + if (bitsByte[1]) + writer.Write((short) this._sourceNPCIndex); + if (bitsByte[2]) + writer.Write((short) this._sourceProjectileIndex); + if (bitsByte[3]) + writer.Write((byte) this._sourceOtherIndex); + if (bitsByte[4]) + writer.Write((short) this._sourceProjectileType); + if (bitsByte[5]) + writer.Write((short) this._sourceItemType); + if (bitsByte[6]) + writer.Write((byte) this._sourceItemPrefix); + if (!bitsByte[7]) + return; + writer.Write(this._sourceCustomReason); + } + + public static PlayerDeathReason FromReader(BinaryReader reader) + { + PlayerDeathReason playerDeathReason = new PlayerDeathReason(); + BitsByte bitsByte = (BitsByte) reader.ReadByte(); + if (bitsByte[0]) + playerDeathReason._sourcePlayerIndex = (int) reader.ReadInt16(); + if (bitsByte[1]) + playerDeathReason._sourceNPCIndex = (int) reader.ReadInt16(); + if (bitsByte[2]) + playerDeathReason._sourceProjectileIndex = (int) reader.ReadInt16(); + if (bitsByte[3]) + playerDeathReason._sourceOtherIndex = (int) reader.ReadByte(); + if (bitsByte[4]) + playerDeathReason._sourceProjectileType = (int) reader.ReadInt16(); + if (bitsByte[5]) + playerDeathReason._sourceItemType = (int) reader.ReadInt16(); + if (bitsByte[6]) + playerDeathReason._sourceItemPrefix = (int) reader.ReadByte(); + if (bitsByte[7]) + playerDeathReason._sourceCustomReason = reader.ReadString(); + return playerDeathReason; + } + } +} diff --git a/DataStructures/PlayerDrawHeadLayers.cs b/DataStructures/PlayerDrawHeadLayers.cs new file mode 100644 index 0000000..b202f26 --- /dev/null +++ b/DataStructures/PlayerDrawHeadLayers.cs @@ -0,0 +1,310 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.PlayerDrawHeadLayers +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using Terraria.GameContent; +using Terraria.Graphics; +using Terraria.ID; + +namespace Terraria.DataStructures +{ + public static class PlayerDrawHeadLayers + { + public static void DrawPlayer_0_(ref PlayerDrawHeadSet drawinfo) + { + } + + public static void DrawPlayer_00_BackHelmet(ref PlayerDrawHeadSet drawinfo) + { + if (drawinfo.drawPlayer.head < 0 || drawinfo.drawPlayer.head >= 266) + return; + int index = ArmorIDs.Head.Sets.FrontToBackID[drawinfo.drawPlayer.head]; + if (index < 0) + return; + Rectangle hairFrame = drawinfo.HairFrame; + PlayerDrawHeadLayers.QuickCDD(drawinfo.DrawData, drawinfo.cHead, TextureAssets.ArmorHead[index].Value, drawinfo.helmetOffset + new Vector2(drawinfo.Position.X - Main.screenPosition.X - (float) (drawinfo.bodyFrameMemory.Width / 2) + (float) (drawinfo.drawPlayer.width / 2), (float) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.bodyFrameMemory.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(hairFrame), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, drawinfo.scale, drawinfo.playerEffect, 0.0f); + } + + public static void DrawPlayer_01_FaceSkin(ref PlayerDrawHeadSet drawinfo) + { + if (drawinfo.drawPlayer.head == 38 || drawinfo.drawPlayer.head == 135 || drawinfo.drawPlayer.isHatRackDoll) + return; + PlayerDrawHeadLayers.QuickCDD(drawinfo.DrawData, drawinfo.skinDyePacked, TextureAssets.Players[drawinfo.skinVar, 0].Value, new Vector2(drawinfo.Position.X - Main.screenPosition.X - (float) (drawinfo.bodyFrameMemory.Width / 2) + (float) (drawinfo.drawPlayer.width / 2), (float) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.bodyFrameMemory.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.bodyFrameMemory), drawinfo.colorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, drawinfo.scale, drawinfo.playerEffect, 0.0f); + PlayerDrawHeadLayers.QuickCDD(drawinfo.DrawData, TextureAssets.Players[drawinfo.skinVar, 1].Value, new Vector2(drawinfo.Position.X - Main.screenPosition.X - (float) (drawinfo.bodyFrameMemory.Width / 2) + (float) (drawinfo.drawPlayer.width / 2), (float) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.bodyFrameMemory.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.bodyFrameMemory), drawinfo.colorEyeWhites, drawinfo.drawPlayer.headRotation, drawinfo.headVect, drawinfo.scale, drawinfo.playerEffect, 0.0f); + PlayerDrawHeadLayers.QuickCDD(drawinfo.DrawData, TextureAssets.Players[drawinfo.skinVar, 2].Value, new Vector2(drawinfo.Position.X - Main.screenPosition.X - (float) (drawinfo.bodyFrameMemory.Width / 2) + (float) (drawinfo.drawPlayer.width / 2), (float) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.bodyFrameMemory.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.bodyFrameMemory), drawinfo.colorEyes, drawinfo.drawPlayer.headRotation, drawinfo.headVect, drawinfo.scale, drawinfo.playerEffect, 0.0f); + if (!drawinfo.drawPlayer.yoraiz0rDarkness) + return; + PlayerDrawHeadLayers.QuickCDD(drawinfo.DrawData, drawinfo.skinDyePacked, TextureAssets.Extra[67].Value, new Vector2(drawinfo.Position.X - Main.screenPosition.X - (float) (drawinfo.bodyFrameMemory.Width / 2) + (float) (drawinfo.drawPlayer.width / 2), (float) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.bodyFrameMemory.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.bodyFrameMemory), drawinfo.colorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, drawinfo.scale, drawinfo.playerEffect, 0.0f); + } + + public static void DrawPlayer_02_DrawArmorWithFullHair(ref PlayerDrawHeadSet drawinfo) + { + if (!drawinfo.fullHair) + return; + PlayerDrawHeadLayers.QuickCDD(drawinfo.DrawData, drawinfo.cHead, TextureAssets.ArmorHead[drawinfo.drawPlayer.head].Value, drawinfo.helmetOffset + new Vector2(drawinfo.Position.X - Main.screenPosition.X - (float) (drawinfo.bodyFrameMemory.Width / 2) + (float) (drawinfo.drawPlayer.width / 2), (float) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.bodyFrameMemory.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.HairFrame), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, drawinfo.scale, drawinfo.playerEffect, 0.0f); + if (drawinfo.drawPlayer.invis || drawinfo.hideHair) + return; + Rectangle hairFrame = drawinfo.HairFrame; + hairFrame.Y -= 336; + if (hairFrame.Y < 0) + hairFrame.Y = 0; + PlayerDrawHeadLayers.QuickCDD(drawinfo.DrawData, drawinfo.hairShaderPacked, TextureAssets.PlayerHair[drawinfo.drawPlayer.hair].Value, new Vector2(drawinfo.Position.X - Main.screenPosition.X - (float) (drawinfo.bodyFrameMemory.Width / 2) + (float) (drawinfo.drawPlayer.width / 2), (float) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.bodyFrameMemory.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(hairFrame), drawinfo.colorHair, drawinfo.drawPlayer.headRotation, drawinfo.headVect, drawinfo.scale, drawinfo.playerEffect, 0.0f); + } + + public static void DrawPlayer_03_HelmetHair(ref PlayerDrawHeadSet drawinfo) + { + if (drawinfo.hideHair || !drawinfo.hatHair) + return; + Rectangle hairFrame = drawinfo.HairFrame; + hairFrame.Y -= 336; + if (hairFrame.Y < 0) + hairFrame.Y = 0; + if (drawinfo.drawPlayer.invis) + return; + PlayerDrawHeadLayers.QuickCDD(drawinfo.DrawData, drawinfo.hairShaderPacked, TextureAssets.PlayerHairAlt[drawinfo.drawPlayer.hair].Value, new Vector2(drawinfo.Position.X - Main.screenPosition.X - (float) (drawinfo.bodyFrameMemory.Width / 2) + (float) (drawinfo.drawPlayer.width / 2), (float) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.bodyFrameMemory.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(hairFrame), drawinfo.colorHair, drawinfo.drawPlayer.headRotation, drawinfo.headVect, drawinfo.scale, drawinfo.playerEffect, 0.0f); + } + + public static void DrawPlayer_04_RabbitOrder(ref PlayerDrawHeadSet drawinfo) + { + int verticalFrames = 27; + Texture2D texture2D = TextureAssets.ArmorHead[drawinfo.drawPlayer.head].Value; + Rectangle r = texture2D.Frame(verticalFrames: verticalFrames, frameY: drawinfo.drawPlayer.rabbitOrderFrame.DisplayFrame); + Vector2 origin = r.Size() / 2f; + int usedGravDir = 1; + Vector2 hatDrawPosition = PlayerDrawHeadLayers.DrawPlayer_04_GetHatDrawPosition(ref drawinfo, new Vector2(1f, -26f), usedGravDir); + int hatStacks = PlayerDrawHeadLayers.DrawPlayer_04_GetHatStacks(ref drawinfo, 4955); + float num1 = (float) Math.PI / 60f; + float num2 = (float) ((double) num1 * (double) drawinfo.drawPlayer.position.X % 6.28318548202515); + for (int index = hatStacks - 1; index >= 0; --index) + { + float x = (float) ((double) Vector2.UnitY.RotatedBy((double) num2 + (double) num1 * (double) index).X * ((double) index / 30.0) * 2.0) - (float) (index * 2 * drawinfo.drawPlayer.direction); + PlayerDrawHeadLayers.QuickCDD(drawinfo.DrawData, drawinfo.cHead, texture2D, hatDrawPosition + new Vector2(x, (float) (index * -14) * drawinfo.scale), new Rectangle?(r), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, origin, drawinfo.scale, drawinfo.playerEffect, 0.0f); + } + if (drawinfo.drawPlayer.invis || drawinfo.hideHair) + return; + Rectangle hairFrame = drawinfo.HairFrame; + hairFrame.Y -= 336; + if (hairFrame.Y < 0) + hairFrame.Y = 0; + PlayerDrawHeadLayers.QuickCDD(drawinfo.DrawData, drawinfo.hairShaderPacked, TextureAssets.PlayerHair[drawinfo.drawPlayer.hair].Value, new Vector2(drawinfo.Position.X - Main.screenPosition.X - (float) (drawinfo.bodyFrameMemory.Width / 2) + (float) (drawinfo.drawPlayer.width / 2), (float) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.bodyFrameMemory.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(hairFrame), drawinfo.colorHair, drawinfo.drawPlayer.headRotation, drawinfo.headVect, drawinfo.scale, drawinfo.playerEffect, 0.0f); + } + + public static void DrawPlayer_04_BadgersHat(ref PlayerDrawHeadSet drawinfo) + { + int verticalFrames = 6; + Texture2D texture2D = TextureAssets.ArmorHead[drawinfo.drawPlayer.head].Value; + Rectangle r = texture2D.Frame(verticalFrames: verticalFrames, frameY: drawinfo.drawPlayer.rabbitOrderFrame.DisplayFrame); + Vector2 origin = r.Size() / 2f; + int usedGravDir = 1; + Vector2 hatDrawPosition = PlayerDrawHeadLayers.DrawPlayer_04_GetHatDrawPosition(ref drawinfo, new Vector2(0.0f, -9f), usedGravDir); + int hatStacks = PlayerDrawHeadLayers.DrawPlayer_04_GetHatStacks(ref drawinfo, 5004); + float num1 = (float) Math.PI / 60f; + float num2 = (float) ((double) num1 * (double) drawinfo.drawPlayer.position.X % 6.28318548202515); + int num3 = hatStacks * 4 + 2; + int num4 = 0; + bool flag = ((double) Main.GlobalTimeWrappedHourly + 180.0) % 3600.0 < 60.0; + for (int index = num3 - 1; index >= 0; --index) + { + int num5 = 0; + if (index == num3 - 1) + { + r.Y = 0; + num5 = 2; + } + else + r.Y = index != 0 ? r.Height * (num4++ % 4 + 1) : r.Height * 5; + if (!(r.Y == r.Height * 3 & flag)) + { + float x = (float) ((double) Vector2.UnitY.RotatedBy((double) num2 + (double) num1 * (double) index).X * ((double) index / 10.0) * 4.0 - (double) index * 0.100000001490116 * (double) drawinfo.drawPlayer.direction); + PlayerDrawHeadLayers.QuickCDD(drawinfo.DrawData, drawinfo.cHead, texture2D, hatDrawPosition + new Vector2(x, (float) ((index * -4 + num5) * usedGravDir)) * drawinfo.scale, new Rectangle?(r), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, origin, drawinfo.scale, drawinfo.playerEffect, 0.0f); + } + } + } + + private static Vector2 DrawPlayer_04_GetHatDrawPosition( + ref PlayerDrawHeadSet drawinfo, + Vector2 hatOffset, + int usedGravDir) + { + Vector2 vector2 = new Vector2((float) drawinfo.drawPlayer.direction, (float) usedGravDir); + return drawinfo.Position - Main.screenPosition + new Vector2((float) (-drawinfo.bodyFrameMemory.Width / 2 + drawinfo.drawPlayer.width / 2), (float) (drawinfo.drawPlayer.height - drawinfo.bodyFrameMemory.Height + 4)) + hatOffset * vector2 * drawinfo.scale + (drawinfo.drawPlayer.headPosition + drawinfo.headVect); + } + + private static int DrawPlayer_04_GetHatStacks(ref PlayerDrawHeadSet drawinfo, int itemId) + { + int num = 0; + int index1 = 0; + if (drawinfo.drawPlayer.armor[index1] != null && drawinfo.drawPlayer.armor[index1].type == itemId && drawinfo.drawPlayer.armor[index1].stack > 0) + num += drawinfo.drawPlayer.armor[index1].stack; + int index2 = 10; + if (drawinfo.drawPlayer.armor[index2] != null && drawinfo.drawPlayer.armor[index2].type == itemId && drawinfo.drawPlayer.armor[index2].stack > 0) + num += drawinfo.drawPlayer.armor[index2].stack; + return num; + } + + public static void DrawPlayer_04_JungleRose(ref PlayerDrawHeadSet drawinfo) + { + if (drawinfo.drawPlayer.head == 259) + { + PlayerDrawHeadLayers.DrawPlayer_04_RabbitOrder(ref drawinfo); + } + else + { + if (!drawinfo.helmetIsOverFullHair) + return; + if (!drawinfo.drawPlayer.invis && !drawinfo.hideHair) + { + Rectangle hairFrame = drawinfo.HairFrame; + hairFrame.Y -= 336; + if (hairFrame.Y < 0) + hairFrame.Y = 0; + PlayerDrawHeadLayers.QuickCDD(drawinfo.DrawData, drawinfo.hairShaderPacked, TextureAssets.PlayerHair[drawinfo.drawPlayer.hair].Value, new Vector2(drawinfo.Position.X - Main.screenPosition.X - (float) (drawinfo.bodyFrameMemory.Width / 2) + (float) (drawinfo.drawPlayer.width / 2), (float) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.bodyFrameMemory.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(hairFrame), drawinfo.colorHair, drawinfo.drawPlayer.headRotation, drawinfo.headVect, drawinfo.scale, drawinfo.playerEffect, 0.0f); + } + if (drawinfo.drawPlayer.head == 0) + return; + PlayerDrawHeadLayers.QuickCDD(drawinfo.DrawData, drawinfo.cHead, TextureAssets.ArmorHead[drawinfo.drawPlayer.head].Value, drawinfo.helmetOffset + new Vector2(drawinfo.Position.X - Main.screenPosition.X - (float) (drawinfo.bodyFrameMemory.Width / 2) + (float) (drawinfo.drawPlayer.width / 2), (float) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.bodyFrameMemory.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.bodyFrameMemory), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, drawinfo.scale, drawinfo.playerEffect, 0.0f); + } + } + + public static void DrawPlayer_05_TallHats(ref PlayerDrawHeadSet drawinfo) + { + if (!drawinfo.helmetIsTall) + return; + Rectangle hairFrame = drawinfo.HairFrame; + if (drawinfo.drawPlayer.head == 158) + hairFrame.Height -= 2; + int num = 0; + if (hairFrame.Y == hairFrame.Height * 6) + hairFrame.Height -= 2; + else if (hairFrame.Y == hairFrame.Height * 7) + num = -2; + else if (hairFrame.Y == hairFrame.Height * 8) + num = -2; + else if (hairFrame.Y == hairFrame.Height * 9) + num = -2; + else if (hairFrame.Y == hairFrame.Height * 10) + num = -2; + else if (hairFrame.Y == hairFrame.Height * 13) + hairFrame.Height -= 2; + else if (hairFrame.Y == hairFrame.Height * 14) + num = -2; + else if (hairFrame.Y == hairFrame.Height * 15) + num = -2; + else if (hairFrame.Y == hairFrame.Height * 16) + num = -2; + hairFrame.Y += num; + PlayerDrawHeadLayers.QuickCDD(drawinfo.DrawData, drawinfo.cHead, TextureAssets.ArmorHead[drawinfo.drawPlayer.head].Value, drawinfo.helmetOffset + new Vector2(drawinfo.Position.X - Main.screenPosition.X - (float) (drawinfo.bodyFrameMemory.Width / 2) + (float) (drawinfo.drawPlayer.width / 2), (float) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.bodyFrameMemory.Height + 4.0) + (float) num) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(hairFrame), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, drawinfo.scale, drawinfo.playerEffect, 0.0f); + } + + public static void DrawPlayer_06_NormalHats(ref PlayerDrawHeadSet drawinfo) + { + if (drawinfo.drawPlayer.head == 265) + { + PlayerDrawHeadLayers.DrawPlayer_04_BadgersHat(ref drawinfo); + } + else + { + if (!drawinfo.helmetIsNormal) + return; + Rectangle hairFrame = drawinfo.HairFrame; + PlayerDrawHeadLayers.QuickCDD(drawinfo.DrawData, drawinfo.cHead, TextureAssets.ArmorHead[drawinfo.drawPlayer.head].Value, drawinfo.helmetOffset + new Vector2(drawinfo.Position.X - Main.screenPosition.X - (float) (drawinfo.bodyFrameMemory.Width / 2) + (float) (drawinfo.drawPlayer.width / 2), (float) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.bodyFrameMemory.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(hairFrame), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, drawinfo.scale, drawinfo.playerEffect, 0.0f); + } + } + + public static void DrawPlayer_07_JustHair(ref PlayerDrawHeadSet drawinfo) + { + if (drawinfo.helmetIsNormal || drawinfo.helmetIsOverFullHair || drawinfo.helmetIsTall || drawinfo.hideHair) + return; + if (drawinfo.drawPlayer.face == (sbyte) 5) + PlayerDrawHeadLayers.QuickCDD(drawinfo.DrawData, drawinfo.cFace, TextureAssets.AccFace[(int) drawinfo.drawPlayer.face].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.bodyFrameMemory.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.bodyFrameMemory.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.bodyFrameMemory), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, drawinfo.scale, drawinfo.playerEffect, 0.0f); + Rectangle hairFrame = drawinfo.HairFrame; + hairFrame.Y -= 336; + if (hairFrame.Y < 0) + hairFrame.Y = 0; + PlayerDrawHeadLayers.QuickCDD(drawinfo.DrawData, drawinfo.hairShaderPacked, TextureAssets.PlayerHair[drawinfo.drawPlayer.hair].Value, new Vector2(drawinfo.Position.X - Main.screenPosition.X - (float) (drawinfo.bodyFrameMemory.Width / 2) + (float) (drawinfo.drawPlayer.width / 2), (float) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.bodyFrameMemory.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(hairFrame), drawinfo.colorHair, drawinfo.drawPlayer.headRotation, drawinfo.headVect, drawinfo.scale, drawinfo.playerEffect, 0.0f); + } + + public static void DrawPlayer_08_FaceAcc(ref PlayerDrawHeadSet drawinfo) + { + if (drawinfo.drawPlayer.face > (sbyte) 0 && drawinfo.drawPlayer.face < (sbyte) 16 && drawinfo.drawPlayer.face != (sbyte) 5) + { + if (drawinfo.drawPlayer.face == (sbyte) 7) + { + Color color = new Color(200, 200, 200, 150); + PlayerDrawHeadLayers.QuickCDD(drawinfo.DrawData, drawinfo.cFace, TextureAssets.AccFace[(int) drawinfo.drawPlayer.face].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.bodyFrameMemory.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.bodyFrameMemory.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.bodyFrameMemory), new Color(200, 200, 200, 200), drawinfo.drawPlayer.headRotation, drawinfo.headVect, drawinfo.scale, drawinfo.playerEffect, 0.0f); + } + else + PlayerDrawHeadLayers.QuickCDD(drawinfo.DrawData, drawinfo.cFace, TextureAssets.AccFace[(int) drawinfo.drawPlayer.face].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.bodyFrameMemory.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.bodyFrameMemory.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.bodyFrameMemory), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, drawinfo.scale, drawinfo.playerEffect, 0.0f); + } + if (!drawinfo.drawUnicornHorn) + return; + PlayerDrawHeadLayers.QuickCDD(drawinfo.DrawData, drawinfo.cUnicornHorn, TextureAssets.Extra[143].Value, new Vector2(drawinfo.Position.X - Main.screenPosition.X - (float) (drawinfo.bodyFrameMemory.Width / 2) + (float) (drawinfo.drawPlayer.width / 2), (float) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.bodyFrameMemory.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.bodyFrameMemory), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, drawinfo.scale, drawinfo.playerEffect, 0.0f); + } + + public static void DrawPlayer_RenderAllLayers(ref PlayerDrawHeadSet drawinfo) + { + List drawData = drawinfo.DrawData; + Effect pixelShader = Main.pixelShader; + Projectile[] projectile = Main.projectile; + SpriteBatch spriteBatch = Main.spriteBatch; + for (int index = 0; index < drawData.Count; ++index) + { + DrawData cdd = drawData[index]; + if (!cdd.sourceRect.HasValue) + cdd.sourceRect = new Rectangle?(cdd.texture.Frame()); + PlayerDrawHelper.SetShaderForData(drawinfo.drawPlayer, drawinfo.cHead, ref cdd); + if (cdd.texture != null) + cdd.Draw(spriteBatch); + } + pixelShader.CurrentTechnique.Passes[0].Apply(); + } + + public static void DrawPlayer_DrawSelectionRect(ref PlayerDrawHeadSet drawinfo) + { + Vector2 lowest; + Vector2 highest; + SpriteRenderTargetHelper.GetDrawBoundary(drawinfo.DrawData, out lowest, out highest); + Utils.DrawRect(Main.spriteBatch, lowest + Main.screenPosition, highest + Main.screenPosition, Color.White); + } + + public static void QuickCDD( + List drawData, + Texture2D texture, + Vector2 position, + Rectangle? sourceRectangle, + Color color, + float rotation, + Vector2 origin, + float scale, + SpriteEffects effects, + float layerDepth) + { + drawData.Add(new DrawData(texture, position, sourceRectangle, color, rotation, origin, scale, effects, 0)); + } + + public static void QuickCDD( + List drawData, + int shaderTechnique, + Texture2D texture, + Vector2 position, + Rectangle? sourceRectangle, + Color color, + float rotation, + Vector2 origin, + float scale, + SpriteEffects effects, + float layerDepth) + { + drawData.Add(new DrawData(texture, position, sourceRectangle, color, rotation, origin, scale, effects, 0) + { + shader = shaderTechnique + }); + } + } +} diff --git a/DataStructures/PlayerDrawHeadSet.cs b/DataStructures/PlayerDrawHeadSet.cs new file mode 100644 index 0000000..07b38e2 --- /dev/null +++ b/DataStructures/PlayerDrawHeadSet.cs @@ -0,0 +1,119 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.PlayerDrawHeadSet +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; +using Terraria.ID; + +namespace Terraria.DataStructures +{ + public struct PlayerDrawHeadSet + { + public List DrawData; + public List Dust; + public List Gore; + public Player drawPlayer; + public int cHead; + public int cFace; + public int cUnicornHorn; + public int skinVar; + public int hairShaderPacked; + public int skinDyePacked; + public float scale; + public Color colorEyeWhites; + public Color colorEyes; + public Color colorHair; + public Color colorHead; + public Color colorArmorHead; + public SpriteEffects playerEffect; + public Vector2 headVect; + public Rectangle bodyFrameMemory; + public bool fullHair; + public bool hatHair; + public bool hideHair; + public bool helmetIsTall; + public bool helmetIsOverFullHair; + public bool helmetIsNormal; + public bool drawUnicornHorn; + public Vector2 Position; + public Vector2 helmetOffset; + + public Rectangle HairFrame + { + get + { + Rectangle bodyFrameMemory = this.bodyFrameMemory; + --bodyFrameMemory.Height; + return bodyFrameMemory; + } + } + + public void BoringSetup( + Player drawPlayer2, + List drawData, + List dust, + List gore, + float X, + float Y, + float Alpha, + float Scale) + { + this.DrawData = drawData; + this.Dust = dust; + this.Gore = gore; + this.drawPlayer = drawPlayer2; + this.Position = this.drawPlayer.position; + this.cHead = 0; + this.cFace = 0; + this.cUnicornHorn = 0; + this.drawUnicornHorn = false; + this.skinVar = this.drawPlayer.skinVariant; + this.hairShaderPacked = PlayerDrawHelper.PackShader((int) this.drawPlayer.hairDye, PlayerDrawHelper.ShaderConfiguration.HairShader); + if (this.drawPlayer.head == 0 && this.drawPlayer.hairDye == (byte) 0) + this.hairShaderPacked = PlayerDrawHelper.PackShader(1, PlayerDrawHelper.ShaderConfiguration.HairShader); + this.skinDyePacked = this.drawPlayer.skinDyePacked; + if (this.drawPlayer.face > (sbyte) 0 && this.drawPlayer.face < (sbyte) 16) + Main.instance.LoadAccFace((int) this.drawPlayer.face); + this.cHead = this.drawPlayer.cHead; + this.cFace = this.drawPlayer.cFace; + this.cUnicornHorn = this.drawPlayer.cUnicornHorn; + this.drawUnicornHorn = this.drawPlayer.hasUnicornHorn; + Main.instance.LoadHair(this.drawPlayer.hair); + this.scale = Scale; + this.colorEyeWhites = Main.quickAlpha(Color.White, Alpha); + this.colorEyes = Main.quickAlpha(this.drawPlayer.eyeColor, Alpha); + this.colorHair = Main.quickAlpha(this.drawPlayer.GetHairColor(false), Alpha); + this.colorHead = Main.quickAlpha(this.drawPlayer.skinColor, Alpha); + this.colorArmorHead = Main.quickAlpha(Color.White, Alpha); + this.playerEffect = SpriteEffects.None; + if (this.drawPlayer.direction < 0) + this.playerEffect = SpriteEffects.FlipHorizontally; + this.headVect = new Vector2((float) this.drawPlayer.legFrame.Width * 0.5f, (float) this.drawPlayer.legFrame.Height * 0.4f); + this.bodyFrameMemory = this.drawPlayer.bodyFrame; + this.bodyFrameMemory.Y = 0; + this.Position = Main.screenPosition; + this.Position.X += X; + this.Position.Y += Y; + this.Position.X -= 6f; + this.Position.Y -= 4f; + this.Position.Y -= (float) this.drawPlayer.HeightMapOffset; + if (this.drawPlayer.head > 0 && this.drawPlayer.head < 266) + { + Main.instance.LoadArmorHead(this.drawPlayer.head); + int i = ArmorIDs.Head.Sets.FrontToBackID[this.drawPlayer.head]; + if (i >= 0) + Main.instance.LoadArmorHead(i); + } + if (this.drawPlayer.face > (sbyte) 0 && this.drawPlayer.face < (sbyte) 16) + Main.instance.LoadAccFace((int) this.drawPlayer.face); + this.helmetOffset = this.drawPlayer.GetHelmetDrawOffset(); + this.drawPlayer.GetHairSettings(out this.fullHair, out this.hatHair, out this.hideHair, out bool _, out this.helmetIsOverFullHair); + this.helmetIsTall = this.drawPlayer.head == 14 || this.drawPlayer.head == 56 || this.drawPlayer.head == 158; + this.helmetIsNormal = !this.helmetIsTall && !this.helmetIsOverFullHair && this.drawPlayer.head > 0 && this.drawPlayer.head < 266 && this.drawPlayer.head != 28; + } + } +} diff --git a/DataStructures/PlayerDrawHelper.cs b/DataStructures/PlayerDrawHelper.cs new file mode 100644 index 0000000..3dd2c69 --- /dev/null +++ b/DataStructures/PlayerDrawHelper.cs @@ -0,0 +1,72 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.PlayerDrawHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.Graphics.Shaders; + +namespace Terraria.DataStructures +{ + public class PlayerDrawHelper + { + public static int PackShader( + int localShaderIndex, + PlayerDrawHelper.ShaderConfiguration shaderType) + { + return localShaderIndex + (int) shaderType * 1000; + } + + public static void UnpackShader( + int packedShaderIndex, + out int localShaderIndex, + out PlayerDrawHelper.ShaderConfiguration shaderType) + { + shaderType = (PlayerDrawHelper.ShaderConfiguration) (packedShaderIndex / 1000); + localShaderIndex = packedShaderIndex % 1000; + } + + public static void SetShaderForData(Player player, int cHead, ref DrawData cdd) + { + int localShaderIndex; + PlayerDrawHelper.ShaderConfiguration shaderType; + PlayerDrawHelper.UnpackShader(cdd.shader, out localShaderIndex, out shaderType); + switch (shaderType) + { + case PlayerDrawHelper.ShaderConfiguration.ArmorShader: + GameShaders.Hair.Apply((short) 0, player, new DrawData?(cdd)); + GameShaders.Armor.Apply(localShaderIndex, (Entity) player, new DrawData?(cdd)); + break; + case PlayerDrawHelper.ShaderConfiguration.HairShader: + if (player.head == 0) + { + GameShaders.Hair.Apply((short) 0, player, new DrawData?(cdd)); + GameShaders.Armor.Apply(cHead, (Entity) player, new DrawData?(cdd)); + break; + } + GameShaders.Armor.Apply(0, (Entity) player, new DrawData?(cdd)); + GameShaders.Hair.Apply((short) localShaderIndex, player, new DrawData?(cdd)); + break; + case PlayerDrawHelper.ShaderConfiguration.TileShader: + Main.tileShader.CurrentTechnique.Passes[localShaderIndex].Apply(); + break; + case PlayerDrawHelper.ShaderConfiguration.TilePaintID: + if (localShaderIndex == 31) + { + GameShaders.Armor.Apply(0, (Entity) player, new DrawData?(cdd)); + break; + } + Main.tileShader.CurrentTechnique.Passes[Main.ConvertPaintIdToTileShaderIndex(localShaderIndex, false, false)].Apply(); + break; + } + } + + public enum ShaderConfiguration + { + ArmorShader, + HairShader, + TileShader, + TilePaintID, + } + } +} diff --git a/DataStructures/PlayerDrawLayers.cs b/DataStructures/PlayerDrawLayers.cs new file mode 100644 index 0000000..5d9d6df --- /dev/null +++ b/DataStructures/PlayerDrawLayers.cs @@ -0,0 +1,2753 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.PlayerDrawLayers +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using System.Collections.Generic; +using Terraria.GameContent; +using Terraria.Graphics; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.UI; + +namespace Terraria.DataStructures +{ + public static class PlayerDrawLayers + { + public static void DrawPlayer_extra_TorsoPlus(ref PlayerDrawSet drawinfo) + { + drawinfo.Position.Y += drawinfo.torsoOffset; + drawinfo.ItemLocation.Y += drawinfo.torsoOffset; + } + + public static void DrawPlayer_extra_TorsoMinus(ref PlayerDrawSet drawinfo) + { + drawinfo.Position.Y -= drawinfo.torsoOffset; + drawinfo.ItemLocation.Y -= drawinfo.torsoOffset; + } + + public static void DrawPlayer_extra_MountPlus(ref PlayerDrawSet drawinfo) => drawinfo.Position.Y += (float) ((int) drawinfo.mountOffSet / 2); + + public static void DrawPlayer_extra_MountMinus(ref PlayerDrawSet drawinfo) => drawinfo.Position.Y -= (float) ((int) drawinfo.mountOffSet / 2); + + public static void DrawCompositeArmorPiece( + ref PlayerDrawSet drawinfo, + CompositePlayerDrawContext context, + DrawData data) + { + drawinfo.DrawDataCache.Add(data); + switch (context) + { + case CompositePlayerDrawContext.BackShoulder: + case CompositePlayerDrawContext.BackArm: + case CompositePlayerDrawContext.FrontArm: + case CompositePlayerDrawContext.FrontShoulder: + if (drawinfo.armGlowColor.PackedValue > 0U) + { + DrawData drawData = data; + drawData.color = drawinfo.armGlowColor; + Rectangle rectangle = drawData.sourceRect.Value; + rectangle.Y += 224; + drawData.sourceRect = new Rectangle?(rectangle); + if (drawinfo.drawPlayer.body == 227) + { + Vector2 position = drawData.position; + for (int index = 0; index < 2; ++index) + { + Vector2 vector2 = new Vector2((float) Main.rand.Next(-10, 10) * 0.125f, (float) Main.rand.Next(-10, 10) * 0.125f); + drawData.position = position + vector2; + if (index == 0) + drawinfo.DrawDataCache.Add(drawData); + } + } + drawinfo.DrawDataCache.Add(drawData); + break; + } + break; + case CompositePlayerDrawContext.Torso: + if (drawinfo.bodyGlowColor.PackedValue > 0U) + { + DrawData drawData = data; + drawData.color = drawinfo.bodyGlowColor; + Rectangle rectangle = drawData.sourceRect.Value; + rectangle.Y += 224; + drawData.sourceRect = new Rectangle?(rectangle); + if (drawinfo.drawPlayer.body == 227) + { + Vector2 position = drawData.position; + for (int index = 0; index < 2; ++index) + { + Vector2 vector2 = new Vector2((float) Main.rand.Next(-10, 10) * 0.125f, (float) Main.rand.Next(-10, 10) * 0.125f); + drawData.position = position + vector2; + if (index == 0) + drawinfo.DrawDataCache.Add(drawData); + } + } + drawinfo.DrawDataCache.Add(drawData); + break; + } + break; + } + if (context != CompositePlayerDrawContext.FrontArm || drawinfo.drawPlayer.body != 205) + return; + Color color = new Color(100, 100, 100, 0); + ulong seed = (ulong) (drawinfo.drawPlayer.miscCounter / 4); + int num1 = 4; + for (int index = 0; index < num1; ++index) + { + float num2 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.2f; + float num3 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.15f; + DrawData drawData = data; + Rectangle rectangle = drawData.sourceRect.Value; + rectangle.Y += 224; + drawData.sourceRect = new Rectangle?(rectangle); + drawData.position.X += num2; + drawData.position.Y += num3; + drawData.color = color; + drawinfo.DrawDataCache.Add(drawData); + } + } + + public static void DrawPlayer_01_BackHair(ref PlayerDrawSet drawinfo) + { + drawinfo.hairFrame = drawinfo.drawPlayer.bodyFrame; + drawinfo.hairFrame.Y -= 336; + if (drawinfo.hairFrame.Y < 0) + drawinfo.hairFrame.Y = 0; + int num = 26; + int hair = drawinfo.drawPlayer.hair; + drawinfo.backHairDraw = hair > 50 && (hair < 56 || hair > 63) && (hair < 74 || hair > 77) && (hair < 88 || hair > 89) && hair != 94 && hair != 100 && hair != 104 && hair != 112 && hair < 116; + if (hair == 133) + drawinfo.backHairDraw = true; + if (drawinfo.hideHair) + { + drawinfo.hairFrame.Height = 0; + } + else + { + if (!drawinfo.backHairDraw) + return; + if (drawinfo.drawPlayer.head == -1 || drawinfo.fullHair || drawinfo.drawsBackHairWithoutHeadgear) + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.PlayerHair[drawinfo.drawPlayer.hair].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.hairFrame), drawinfo.colorHair, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.hairDyePacked + }); + else if (drawinfo.hatHair) + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.PlayerHairAlt[drawinfo.drawPlayer.hair].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.hairFrame), drawinfo.colorHair, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.hairDyePacked + }); + if ((double) drawinfo.drawPlayer.gravDir != 1.0) + return; + drawinfo.hairFrame.Height = num; + } + } + + public static void DrawPlayer_02_MountBehindPlayer(ref PlayerDrawSet drawinfo) + { + if (!drawinfo.drawPlayer.mount.Active) + return; + PlayerDrawLayers.DrawMeowcartTrail(ref drawinfo); + PlayerDrawLayers.DrawTiedBalloons(ref drawinfo); + drawinfo.drawPlayer.mount.Draw(drawinfo.DrawDataCache, 0, drawinfo.drawPlayer, drawinfo.Position, drawinfo.colorMount, drawinfo.playerEffect, drawinfo.shadow); + drawinfo.drawPlayer.mount.Draw(drawinfo.DrawDataCache, 1, drawinfo.drawPlayer, drawinfo.Position, drawinfo.colorMount, drawinfo.playerEffect, drawinfo.shadow); + } + + public static void DrawPlayer_03_Carpet(ref PlayerDrawSet drawinfo) + { + if (drawinfo.drawPlayer.carpetFrame < 0) + return; + Color colorArmorLegs = drawinfo.colorArmorLegs; + float num = 0.0f; + if ((double) drawinfo.drawPlayer.gravDir == -1.0) + num = 10f; + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.FlyingCarpet.Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) (drawinfo.drawPlayer.height / 2) + 28.0 * (double) drawinfo.drawPlayer.gravDir + (double) num)), new Rectangle?(new Rectangle(0, TextureAssets.FlyingCarpet.Height() / 6 * drawinfo.drawPlayer.carpetFrame, TextureAssets.FlyingCarpet.Width(), TextureAssets.FlyingCarpet.Height() / 6)), colorArmorLegs, drawinfo.drawPlayer.bodyRotation, new Vector2((float) (TextureAssets.FlyingCarpet.Width() / 2), (float) (TextureAssets.FlyingCarpet.Height() / 8)), 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.cCarpet + }); + } + + public static void DrawPlayer_03_PortableStool(ref PlayerDrawSet drawinfo) + { + if (!drawinfo.drawPlayer.portableStoolInfo.IsInUse) + return; + Texture2D texture2D = TextureAssets.Extra[102].Value; + Vector2 position = new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height + 28.0)); + Rectangle r = texture2D.Frame(); + Vector2 origin = r.Size() * new Vector2(0.5f, 1f); + drawinfo.DrawDataCache.Add(new DrawData(texture2D, position, new Rectangle?(r), drawinfo.colorArmorLegs, drawinfo.drawPlayer.bodyRotation, origin, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.cPortableStool + }); + } + + public static void DrawPlayer_04_ElectrifiedDebuffBack(ref PlayerDrawSet drawinfo) + { + if (!drawinfo.drawPlayer.electrified || (double) drawinfo.shadow != 0.0) + return; + Texture2D texture = TextureAssets.GlowMask[25].Value; + int num1 = drawinfo.drawPlayer.miscCounter / 5; + for (int index = 0; index < 2; ++index) + { + int num2 = num1 % 7; + if (num2 <= 1 || num2 >= 5) + { + DrawData drawData = new DrawData(texture, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(new Rectangle(0, num2 * texture.Height / 7, texture.Width, texture.Height / 7)), drawinfo.colorElectricity, drawinfo.drawPlayer.bodyRotation, new Vector2((float) (texture.Width / 2), (float) (texture.Height / 14)), 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + num1 = num2 + 3; + } + } + + public static void DrawPlayer_05_ForbiddenSetRing(ref PlayerDrawSet drawinfo) + { + if (!drawinfo.drawPlayer.setForbidden || (double) drawinfo.shadow != 0.0) + return; + Color color1 = Color.Lerp(drawinfo.colorArmorBody, Color.White, 0.7f); + Texture2D texture2D = TextureAssets.Extra[74].Value; + Texture2D texture = TextureAssets.GlowMask[217].Value; + int num1 = !drawinfo.drawPlayer.setForbiddenCooldownLocked ? 1 : 0; + int num2 = (int) ((double) ((float) ((double) drawinfo.drawPlayer.miscCounter / 300.0 * 6.28318548202515)).ToRotationVector2().Y * 6.0); + float num3 = ((float) ((double) drawinfo.drawPlayer.miscCounter / 75.0 * 6.28318548202515)).ToRotationVector2().X * 4f; + Color color2 = new Color(80, 70, 40, 0) * (float) ((double) num3 / 8.0 + 0.5) * 0.8f; + if (num1 == 0) + { + num2 = 0; + num3 = 2f; + color2 = new Color(80, 70, 40, 0) * 0.3f; + color1 = color1.MultiplyRGB(new Color(0.5f, 0.5f, 1f)); + } + Vector2 vector2 = new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)); + int num4 = 10; + int num5 = 20; + if (drawinfo.drawPlayer.head == 238) + { + num4 += 4; + num5 += 4; + } + Vector2 position = vector2 + new Vector2((float) (-drawinfo.drawPlayer.direction * num4), (float) ((double) -num5 * (double) drawinfo.drawPlayer.gravDir + (double) num2 * (double) drawinfo.drawPlayer.gravDir)); + DrawData drawData = new DrawData(texture2D, position, new Rectangle?(), color1, drawinfo.drawPlayer.bodyRotation, texture2D.Size() / 2f, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cBody; + drawinfo.DrawDataCache.Add(drawData); + for (float num6 = 0.0f; (double) num6 < 4.0; ++num6) + { + drawData = new DrawData(texture, position + (num6 * 1.570796f).ToRotationVector2() * num3, new Rectangle?(), color2, drawinfo.drawPlayer.bodyRotation, texture2D.Size() / 2f, 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + } + + public static void DrawPlayer_01_3_BackHead(ref PlayerDrawSet drawinfo) + { + if (drawinfo.drawPlayer.head < 0 || drawinfo.drawPlayer.head >= 266) + return; + int index = ArmorIDs.Head.Sets.FrontToBackID[drawinfo.drawPlayer.head]; + if (index < 0) + return; + Vector2 helmetOffset = drawinfo.helmetOffset; + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.ArmorHead[index].Value, helmetOffset + new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.cHead + }); + } + + public static void DrawPlayer_01_2_JimsCloak(ref PlayerDrawSet drawinfo) + { + if (drawinfo.drawPlayer.legs != 60 || drawinfo.isSitting || drawinfo.drawPlayer.invis || PlayerDrawLayers.ShouldOverrideLegs_CheckShoes(ref drawinfo) && !drawinfo.drawPlayer.wearsRobe) + return; + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.Extra[153].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.legFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.legFrame.Height + 4.0)) + drawinfo.drawPlayer.legPosition + drawinfo.legVect, new Rectangle?(drawinfo.drawPlayer.legFrame), drawinfo.colorArmorLegs, drawinfo.drawPlayer.legRotation, drawinfo.legVect, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.cLegs + }); + } + + public static void DrawPlayer_05_2_SafemanSun(ref PlayerDrawSet drawinfo) + { + if (drawinfo.drawPlayer.head != 238 || (double) drawinfo.shadow != 0.0) + return; + Color color1 = Color.Lerp(drawinfo.colorArmorBody, Color.White, 0.7f); + Texture2D texture2D = TextureAssets.Extra[152].Value; + Texture2D texture = TextureAssets.Extra[152].Value; + int num1 = (int) ((double) ((float) ((double) drawinfo.drawPlayer.miscCounter / 300.0 * 6.28318548202515)).ToRotationVector2().Y * 6.0); + float num2 = ((float) ((double) drawinfo.drawPlayer.miscCounter / 75.0 * 6.28318548202515)).ToRotationVector2().X * 4f; + Color color2 = new Color(80, 70, 40, 0) * (float) ((double) num2 / 8.0 + 0.5) * 0.8f; + Vector2 vector2 = new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)); + int num3 = 8; + int num4 = 20; + int num5 = num3 + 4; + int num6 = num4 + 4; + Vector2 position = vector2 + new Vector2((float) (-drawinfo.drawPlayer.direction * num5), (float) ((double) -num6 * (double) drawinfo.drawPlayer.gravDir + (double) num1 * (double) drawinfo.drawPlayer.gravDir)); + DrawData drawData = new DrawData(texture2D, position, new Rectangle?(), color1, drawinfo.drawPlayer.bodyRotation, texture2D.Size() / 2f, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cHead; + drawinfo.DrawDataCache.Add(drawData); + for (float num7 = 0.0f; (double) num7 < 4.0; ++num7) + { + drawData = new DrawData(texture, position + (num7 * 1.570796f).ToRotationVector2() * num2, new Rectangle?(), color2, drawinfo.drawPlayer.bodyRotation, texture2D.Size() / 2f, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cHead; + drawinfo.DrawDataCache.Add(drawData); + } + } + + public static void DrawPlayer_06_WebbedDebuffBack(ref PlayerDrawSet drawinfo) + { + if (!drawinfo.drawPlayer.webbed || (double) drawinfo.shadow != 0.0 || (double) drawinfo.drawPlayer.velocity.Y == 0.0) + return; + Color color = drawinfo.colorArmorBody * 0.75f; + Texture2D texture2D = TextureAssets.Extra[32].Value; + DrawData drawData = new DrawData(texture2D, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(), color, drawinfo.drawPlayer.bodyRotation, texture2D.Size() / 2f, 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + + public static void DrawPlayer_07_LeinforsHairShampoo(ref PlayerDrawSet drawinfo) + { + if (!drawinfo.drawPlayer.leinforsHair || !drawinfo.fullHair && !drawinfo.hatHair && drawinfo.drawPlayer.head != -1 && drawinfo.drawPlayer.head != 0 || drawinfo.drawPlayer.hair == 12 || (double) drawinfo.shadow != 0.0 || (double) Main.rgbToHsl(drawinfo.colorHead).Z <= 0.200000002980232) + return; + if (Main.rand.Next(20) == 0 && !drawinfo.hatHair) + { + Rectangle r = Utils.CenteredRectangle(drawinfo.Position + drawinfo.drawPlayer.Size / 2f + new Vector2(0.0f, drawinfo.drawPlayer.gravDir * -20f), new Vector2(20f, 14f)); + int index = Dust.NewDust(r.TopLeft(), r.Width, r.Height, 204, Alpha: 150, Scale: 0.3f); + Main.dust[index].fadeIn = 1f; + Main.dust[index].velocity *= 0.1f; + Main.dust[index].noLight = true; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(drawinfo.drawPlayer.cLeinShampoo, drawinfo.drawPlayer); + drawinfo.DustCache.Add(index); + } + if (Main.rand.Next(40) == 0 && drawinfo.hatHair) + { + Rectangle r = Utils.CenteredRectangle(drawinfo.Position + drawinfo.drawPlayer.Size / 2f + new Vector2((float) (drawinfo.drawPlayer.direction * -10), drawinfo.drawPlayer.gravDir * -10f), new Vector2(5f, 5f)); + int index = Dust.NewDust(r.TopLeft(), r.Width, r.Height, 204, Alpha: 150, Scale: 0.3f); + Main.dust[index].fadeIn = 1f; + Main.dust[index].velocity *= 0.1f; + Main.dust[index].noLight = true; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(drawinfo.drawPlayer.cLeinShampoo, drawinfo.drawPlayer); + drawinfo.DustCache.Add(index); + } + if ((double) drawinfo.drawPlayer.velocity.X == 0.0 || !drawinfo.backHairDraw || Main.rand.Next(15) != 0) + return; + Rectangle r1 = Utils.CenteredRectangle(drawinfo.Position + drawinfo.drawPlayer.Size / 2f + new Vector2((float) (drawinfo.drawPlayer.direction * -14), 0.0f), new Vector2(4f, 30f)); + int index1 = Dust.NewDust(r1.TopLeft(), r1.Width, r1.Height, 204, Alpha: 150, Scale: 0.3f); + Main.dust[index1].fadeIn = 1f; + Main.dust[index1].velocity *= 0.1f; + Main.dust[index1].noLight = true; + Main.dust[index1].shader = GameShaders.Armor.GetSecondaryShader(drawinfo.drawPlayer.cLeinShampoo, drawinfo.drawPlayer); + drawinfo.DustCache.Add(index1); + } + + public static void DrawPlayer_08_Backpacks(ref PlayerDrawSet drawinfo) + { + drawinfo.backPack = false; + if (drawinfo.drawPlayer.wings != 0 && (double) drawinfo.drawPlayer.velocity.Y != 0.0 || drawinfo.heldItem.type != 1178 && drawinfo.heldItem.type != 779 && drawinfo.heldItem.type != 1295 && drawinfo.heldItem.type != 1910 && !drawinfo.drawPlayer.turtleArmor && drawinfo.drawPlayer.body != 106 && drawinfo.drawPlayer.body != 170 && (drawinfo.heldItem.type != 4818 || drawinfo.drawPlayer.ownedProjectileCounts[902] != 0)) + return; + drawinfo.backPack = true; + int type = drawinfo.heldItem.type; + int index = 1; + float num1 = -4f; + float num2 = -8f; + int num3 = 0; + if (drawinfo.drawPlayer.turtleArmor) + { + index = 4; + num3 = drawinfo.cBody; + } + else if (drawinfo.drawPlayer.body == 106) + { + index = 6; + num3 = drawinfo.cBody; + } + else if (drawinfo.drawPlayer.body == 170) + { + index = 7; + num3 = drawinfo.cBody; + } + else + { + switch (type) + { + case 779: + index = 2; + break; + case 1178: + index = 1; + break; + case 1295: + index = 3; + break; + case 1910: + index = 5; + break; + case 4818: + index = 8; + break; + } + } + Vector2 vector2 = new Vector2(0.0f, 8f); + Vector2 position1 = (drawinfo.Position - Main.screenPosition + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.width / 2), (float) (drawinfo.drawPlayer.height - drawinfo.drawPlayer.bodyFrame.Height / 2)) + new Vector2(0.0f, -4f) + vector2).Floor(); + Vector2 position2 = (drawinfo.Position - Main.screenPosition + new Vector2((float) (drawinfo.drawPlayer.width / 2), (float) (drawinfo.drawPlayer.height - drawinfo.drawPlayer.bodyFrame.Height / 2)) + new Vector2((num1 - 9f) * (float) drawinfo.drawPlayer.direction, (2f + num2) * drawinfo.drawPlayer.gravDir) + vector2).Floor(); + switch (index) + { + case 4: + case 6: + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.BackPack[index].Value, position1, new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorArmorBody, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0) + { + shader = num3 + }); + break; + case 7: + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.BackPack[index].Value, position1, new Rectangle?(new Rectangle(0, drawinfo.drawPlayer.bodyFrame.Y, TextureAssets.BackPack[index].Width(), drawinfo.drawPlayer.bodyFrame.Height)), drawinfo.colorArmorBody, drawinfo.drawPlayer.bodyRotation, new Vector2((float) TextureAssets.BackPack[index].Width() * 0.5f, drawinfo.bodyVect.Y), 1f, drawinfo.playerEffect, 0) + { + shader = num3 + }); + break; + case 8: + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.BackPack[index].Value, position1, new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorArmorBody, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0) + { + shader = num3 + }); + break; + default: + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.BackPack[index].Value, position2, new Rectangle?(new Rectangle(0, 0, TextureAssets.BackPack[index].Width(), TextureAssets.BackPack[index].Height())), drawinfo.colorArmorBody, drawinfo.drawPlayer.bodyRotation, new Vector2((float) (TextureAssets.BackPack[index].Width() / 2), (float) (TextureAssets.BackPack[index].Height() / 2)), 1f, drawinfo.playerEffect, 0) + { + shader = num3 + }); + break; + } + } + + public static void DrawPlayer_09_BackAc(ref PlayerDrawSet drawinfo) + { + if (drawinfo.backPack || drawinfo.drawPlayer.back <= (sbyte) 0 || drawinfo.drawPlayer.back >= (sbyte) 30 || drawinfo.drawPlayer.mount.Active) + return; + if (drawinfo.drawPlayer.front >= (sbyte) 1 && drawinfo.drawPlayer.front <= (sbyte) 4) + { + int num = drawinfo.drawPlayer.bodyFrame.Y / 56; + if (num < 1 || num > 5) + { + drawinfo.armorAdjust = 10; + } + else + { + if (drawinfo.drawPlayer.front == (sbyte) 1) + drawinfo.armorAdjust = 0; + if (drawinfo.drawPlayer.front == (sbyte) 2) + drawinfo.armorAdjust = 8; + if (drawinfo.drawPlayer.front == (sbyte) 3) + drawinfo.armorAdjust = 0; + if (drawinfo.drawPlayer.front == (sbyte) 4) + drawinfo.armorAdjust = 8; + } + } + Vector2 zero = Vector2.Zero; + Vector2 vector2 = new Vector2(0.0f, 8f); + Vector2 position1 = drawinfo.Position; + Vector2 position2 = (zero + position1 - Main.screenPosition + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.width / 2), (float) (drawinfo.drawPlayer.height - drawinfo.drawPlayer.bodyFrame.Height / 2)) + new Vector2(0.0f, -4f) + vector2).Floor(); + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.AccBack[(int) drawinfo.drawPlayer.back].Value, position2, new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorArmorBody, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.cBack + }); + } + + public static void DrawPlayer_10_Wings(ref PlayerDrawSet drawinfo) + { + Vector2 directions = drawinfo.drawPlayer.Directions; + Vector2 vector2_1 = drawinfo.Position - Main.screenPosition + drawinfo.drawPlayer.Size / 2f; + Vector2 vector2_2 = new Vector2(0.0f, 7f); + Vector2 commonWingPosPreFloor = drawinfo.Position - Main.screenPosition + new Vector2((float) (drawinfo.drawPlayer.width / 2), (float) (drawinfo.drawPlayer.height - drawinfo.drawPlayer.bodyFrame.Height / 2)) + vector2_2; + if (drawinfo.backPack || drawinfo.drawPlayer.wings <= 0) + return; + Main.instance.LoadWings(drawinfo.drawPlayer.wings); + if (drawinfo.drawPlayer.wings == 22) + { + if (!drawinfo.drawPlayer.ShouldDrawWingsThatAreAlwaysAnimated()) + return; + Main.instance.LoadItemFlames(1866); + Color colorArmorBody = drawinfo.colorArmorBody; + int num1 = 26; + int num2 = -9; + Vector2 vec = commonWingPosPreFloor + new Vector2((float) num2, (float) num1) * directions; + DrawData drawData; + if ((double) drawinfo.shadow == 0.0 && drawinfo.drawPlayer.grappling[0] == -1) + { + for (int index = 0; index < 7; ++index) + { + Color color = new Color(250 - index * 10, 250 - index * 10, 250 - index * 10, 150 - index * 10); + Vector2 vector2_3 = new Vector2((float) Main.rand.Next(-10, 11) * 0.2f, (float) Main.rand.Next(-10, 11) * 0.2f); + drawinfo.stealth *= drawinfo.stealth; + drawinfo.stealth *= 1f - drawinfo.shadow; + color = new Color((int) ((double) color.R * (double) drawinfo.stealth), (int) ((double) color.G * (double) drawinfo.stealth), (int) ((double) color.B * (double) drawinfo.stealth), (int) ((double) color.A * (double) drawinfo.stealth)); + vector2_3.X = drawinfo.drawPlayer.itemFlamePos[index].X; + vector2_3.Y = -drawinfo.drawPlayer.itemFlamePos[index].Y; + vector2_3 *= 0.5f; + Vector2 position = (vec + vector2_3).Floor(); + drawData = new DrawData(TextureAssets.ItemFlame[1866].Value, position, new Rectangle?(new Rectangle(0, TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 7 * drawinfo.drawPlayer.wingFrame, TextureAssets.Wings[drawinfo.drawPlayer.wings].Width(), TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 7 - 2)), color, drawinfo.drawPlayer.bodyRotation, new Vector2((float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Width() / 2), (float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 14)), 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + } + } + drawData = new DrawData(TextureAssets.Wings[drawinfo.drawPlayer.wings].Value, vec.Floor(), new Rectangle?(new Rectangle(0, TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 7 * drawinfo.drawPlayer.wingFrame, TextureAssets.Wings[drawinfo.drawPlayer.wings].Width(), TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 7)), colorArmorBody, drawinfo.drawPlayer.bodyRotation, new Vector2((float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Width() / 2), (float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 14)), 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + } + else if (drawinfo.drawPlayer.wings == 28) + { + if (!drawinfo.drawPlayer.ShouldDrawWingsThatAreAlwaysAnimated()) + return; + Color colorArmorBody = drawinfo.colorArmorBody; + Vector2 vector2_4 = new Vector2(0.0f, 0.0f); + Texture2D texture2D = TextureAssets.Wings[drawinfo.drawPlayer.wings].Value; + Vector2 vec = drawinfo.Position + drawinfo.drawPlayer.Size * new Vector2(0.5f, 1f) - Main.screenPosition + vector2_4 * drawinfo.drawPlayer.Directions; + Rectangle r = texture2D.Frame(verticalFrames: 4, frameY: (drawinfo.drawPlayer.miscCounter / 5 % 4)); + r.Width -= 2; + r.Height -= 2; + DrawData drawData = new DrawData(texture2D, vec.Floor(), new Rectangle?(r), Color.Lerp(colorArmorBody, Color.White, 1f), drawinfo.drawPlayer.bodyRotation, r.Size() / 2f, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + drawData = new DrawData(TextureAssets.Extra[38].Value, vec.Floor(), new Rectangle?(r), Color.Lerp(colorArmorBody, Color.White, 0.5f), drawinfo.drawPlayer.bodyRotation, r.Size() / 2f, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + } + else if (drawinfo.drawPlayer.wings == 45) + { + if (!drawinfo.drawPlayer.ShouldDrawWingsThatAreAlwaysAnimated()) + return; + PlayerDrawLayers.DrawStarboardRainbowTrail(ref drawinfo, commonWingPosPreFloor, directions); + Color color1 = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + int num3 = 22; + int num4 = 0; + Vector2 vec = commonWingPosPreFloor + new Vector2((float) num4, (float) num3) * directions; + double num5 = 1.0 - (double) drawinfo.shadow; + Color color2 = color1 * (float) num5; + DrawData drawData = new DrawData(TextureAssets.Wings[drawinfo.drawPlayer.wings].Value, vec.Floor(), new Rectangle?(new Rectangle(0, TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 6 * drawinfo.drawPlayer.wingFrame, TextureAssets.Wings[drawinfo.drawPlayer.wings].Width(), TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 6)), color2, drawinfo.drawPlayer.bodyRotation, new Vector2((float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Width() / 2), (float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 12)), 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + if ((double) drawinfo.shadow != 0.0) + return; + float num6 = ((float) ((double) drawinfo.drawPlayer.miscCounter / 75.0 * 6.28318548202515)).ToRotationVector2().X * 4f; + Color color3 = new Color(70, 70, 70, 0) * (float) ((double) num6 / 8.0 + 0.5) * 0.4f; + for (float f = 0.0f; (double) f < 6.28318548202515; f += 1.570796f) + { + drawData = new DrawData(TextureAssets.Wings[drawinfo.drawPlayer.wings].Value, vec.Floor() + f.ToRotationVector2() * num6, new Rectangle?(new Rectangle(0, TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 6 * drawinfo.drawPlayer.wingFrame, TextureAssets.Wings[drawinfo.drawPlayer.wings].Width(), TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 6)), color3, drawinfo.drawPlayer.bodyRotation, new Vector2((float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Width() / 2), (float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 12)), 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + } + } + else if (drawinfo.drawPlayer.wings == 34) + { + if (!drawinfo.drawPlayer.ShouldDrawWingsThatAreAlwaysAnimated()) + return; + drawinfo.stealth *= drawinfo.stealth; + drawinfo.stealth *= 1f - drawinfo.shadow; + Color color = new Color((int) (250.0 * (double) drawinfo.stealth), (int) (250.0 * (double) drawinfo.stealth), (int) (250.0 * (double) drawinfo.stealth), (int) (100.0 * (double) drawinfo.stealth)); + Vector2 vector2_5 = new Vector2(0.0f, 0.0f); + Texture2D texture2D = TextureAssets.Wings[drawinfo.drawPlayer.wings].Value; + Vector2 vec = drawinfo.Position + drawinfo.drawPlayer.Size / 2f - Main.screenPosition + vector2_5 * drawinfo.drawPlayer.Directions - Vector2.UnitX * (float) drawinfo.drawPlayer.direction * 4f; + Rectangle r = texture2D.Frame(verticalFrames: 6, frameY: drawinfo.drawPlayer.wingFrame); + r.Width -= 2; + r.Height -= 2; + drawinfo.DrawDataCache.Add(new DrawData(texture2D, vec.Floor(), new Rectangle?(r), color, drawinfo.drawPlayer.bodyRotation, r.Size() / 2f, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.cWings + }); + } + else if (drawinfo.drawPlayer.wings == 40) + { + drawinfo.stealth *= drawinfo.stealth; + drawinfo.stealth *= 1f - drawinfo.shadow; + Color color = new Color((int) (250.0 * (double) drawinfo.stealth), (int) (250.0 * (double) drawinfo.stealth), (int) (250.0 * (double) drawinfo.stealth), (int) (100.0 * (double) drawinfo.stealth)); + Vector2 vector2_6 = new Vector2(-4f, 0.0f); + Texture2D texture2D = TextureAssets.Wings[drawinfo.drawPlayer.wings].Value; + Vector2 vector2_7 = commonWingPosPreFloor + vector2_6 * directions; + for (int index = 0; index < 1; ++index) + { + SpriteEffects playerEffect = drawinfo.playerEffect; + Vector2 scale = new Vector2(1f); + Vector2 zero = Vector2.Zero; + zero.X = (float) (drawinfo.drawPlayer.direction * 3); + if (index == 1) + { + playerEffect ^= SpriteEffects.FlipHorizontally; + scale = new Vector2(0.7f, 1f); + zero.X += (float) -drawinfo.drawPlayer.direction * 6f; + } + Vector2 vector2_8 = drawinfo.drawPlayer.velocity * -1.5f; + int num7 = 0; + int num8 = 8; + float num9 = 4f; + if ((double) drawinfo.drawPlayer.velocity.Y == 0.0) + { + num7 = 8; + num8 = 14; + num9 = 3f; + } + for (int frameY = num7; frameY < num8; ++frameY) + { + Vector2 vector2_9 = vector2_7; + Rectangle r = texture2D.Frame(verticalFrames: 14, frameY: frameY); + r.Width -= 2; + r.Height -= 2; + int num10 = (frameY - num7) % (int) num9; + Vector2 vector2_10 = new Vector2(0.0f, 0.5f).RotatedBy(((double) drawinfo.drawPlayer.miscCounterNormalized * (2.0 + (double) num10) + (double) num10 * 0.5 + (double) index * 1.29999995231628) * 6.28318548202515) * (float) (num10 + 1); + Vector2 vec = vector2_9 + vector2_10 + vector2_8 * ((float) num10 / num9) + zero; + drawinfo.DrawDataCache.Add(new DrawData(texture2D, vec.Floor(), new Rectangle?(r), color, drawinfo.drawPlayer.bodyRotation, r.Size() / 2f, scale, playerEffect, 0) + { + shader = drawinfo.cWings + }); + } + } + } + else if (drawinfo.drawPlayer.wings == 39) + { + if (!drawinfo.drawPlayer.ShouldDrawWingsThatAreAlwaysAnimated()) + return; + drawinfo.stealth *= drawinfo.stealth; + drawinfo.stealth *= 1f - drawinfo.shadow; + Color colorArmorBody = drawinfo.colorArmorBody; + Vector2 vector2_11 = new Vector2(-6f, -7f); + Texture2D texture2D = TextureAssets.Wings[drawinfo.drawPlayer.wings].Value; + Vector2 vec = commonWingPosPreFloor + vector2_11 * directions; + Rectangle r = texture2D.Frame(verticalFrames: 6, frameY: drawinfo.drawPlayer.wingFrame); + r.Width -= 2; + r.Height -= 2; + drawinfo.DrawDataCache.Add(new DrawData(texture2D, vec.Floor(), new Rectangle?(r), colorArmorBody, drawinfo.drawPlayer.bodyRotation, r.Size() / 2f, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.cWings + }); + } + else + { + int num11 = 0; + int num12 = 0; + int num13 = 4; + if (drawinfo.drawPlayer.wings == 43) + { + num12 = -5; + num11 = -7; + num13 = 7; + } + else if (drawinfo.drawPlayer.wings == 44) + num13 = 7; + else if (drawinfo.drawPlayer.wings == 5) + { + num12 = 4; + num11 -= 4; + } + else if (drawinfo.drawPlayer.wings == 27) + num12 = 4; + Color color4 = drawinfo.colorArmorBody; + if (drawinfo.drawPlayer.wings == 9 || drawinfo.drawPlayer.wings == 29) + { + drawinfo.stealth *= drawinfo.stealth; + drawinfo.stealth *= 1f - drawinfo.shadow; + color4 = new Color((int) (250.0 * (double) drawinfo.stealth), (int) (250.0 * (double) drawinfo.stealth), (int) (250.0 * (double) drawinfo.stealth), (int) (100.0 * (double) drawinfo.stealth)); + } + if (drawinfo.drawPlayer.wings == 10) + { + drawinfo.stealth *= drawinfo.stealth; + drawinfo.stealth *= 1f - drawinfo.shadow; + color4 = new Color((int) (250.0 * (double) drawinfo.stealth), (int) (250.0 * (double) drawinfo.stealth), (int) (250.0 * (double) drawinfo.stealth), (int) (175.0 * (double) drawinfo.stealth)); + } + if (drawinfo.drawPlayer.wings == 11 && (int) color4.A > (int) Main.gFade) + color4.A = Main.gFade; + if (drawinfo.drawPlayer.wings == 31) + color4.A = (byte) (220.0 * (double) drawinfo.stealth); + if (drawinfo.drawPlayer.wings == 32) + color4.A = (byte) ((double) sbyte.MaxValue * (double) drawinfo.stealth); + if (drawinfo.drawPlayer.wings == 6) + { + color4.A = (byte) (160.0 * (double) drawinfo.stealth); + color4 *= 0.9f; + } + Vector2 vec = commonWingPosPreFloor + new Vector2((float) (num12 - 9), (float) (num11 + 2)) * directions; + DrawData drawData = new DrawData(TextureAssets.Wings[drawinfo.drawPlayer.wings].Value, vec.Floor(), new Rectangle?(new Rectangle(0, TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / num13 * drawinfo.drawPlayer.wingFrame, TextureAssets.Wings[drawinfo.drawPlayer.wings].Width(), TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / num13)), color4, drawinfo.drawPlayer.bodyRotation, new Vector2((float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Width() / 2), (float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / num13 / 2)), 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + if (drawinfo.drawPlayer.wings == 43 && (double) drawinfo.shadow == 0.0) + { + Vector2 vector2_12 = vec; + Vector2 origin = new Vector2((float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Width() / 2), (float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / num13 / 2)); + Rectangle rectangle = new Rectangle(0, TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / num13 * drawinfo.drawPlayer.wingFrame, TextureAssets.Wings[drawinfo.drawPlayer.wings].Width(), TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / num13); + for (int index = 0; index < 2; ++index) + { + Vector2 vector2_13 = new Vector2((float) Main.rand.Next(-10, 10) * 0.125f, (float) Main.rand.Next(-10, 10) * 0.125f); + drawData = new DrawData(TextureAssets.GlowMask[272].Value, vector2_12 + vector2_13, new Rectangle?(rectangle), new Color(230, 230, 230, 60), drawinfo.drawPlayer.bodyRotation, origin, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + } + } + if (drawinfo.drawPlayer.wings == 23) + { + drawinfo.stealth *= drawinfo.stealth; + drawinfo.stealth *= 1f - drawinfo.shadow; + color4 = new Color((int) (200.0 * (double) drawinfo.stealth), (int) (200.0 * (double) drawinfo.stealth), (int) (200.0 * (double) drawinfo.stealth), (int) (200.0 * (double) drawinfo.stealth)); + drawData = new DrawData(TextureAssets.Flames[8].Value, vec.Floor(), new Rectangle?(new Rectangle(0, TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4 * drawinfo.drawPlayer.wingFrame, TextureAssets.Wings[drawinfo.drawPlayer.wings].Width(), TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4)), color4, drawinfo.drawPlayer.bodyRotation, new Vector2((float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Width() / 2), (float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 8)), 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + } + else if (drawinfo.drawPlayer.wings == 27) + { + drawData = new DrawData(TextureAssets.GlowMask[92].Value, vec.Floor(), new Rectangle?(new Rectangle(0, TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4 * drawinfo.drawPlayer.wingFrame, TextureAssets.Wings[drawinfo.drawPlayer.wings].Width(), TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4)), new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue) * drawinfo.stealth * (1f - drawinfo.shadow), drawinfo.drawPlayer.bodyRotation, new Vector2((float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Width() / 2), (float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 8)), 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + } + else if (drawinfo.drawPlayer.wings == 44) + { + PlayerRainbowWingsTextureContent playerRainbowWings = TextureAssets.RenderTargets.PlayerRainbowWings; + playerRainbowWings.Request(); + if (!playerRainbowWings.IsReady) + return; + drawData = new DrawData((Texture2D) playerRainbowWings.GetTarget(), vec.Floor(), new Rectangle?(new Rectangle(0, TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 7 * drawinfo.drawPlayer.wingFrame, TextureAssets.Wings[drawinfo.drawPlayer.wings].Width(), TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 7)), new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue) * drawinfo.stealth * (1f - drawinfo.shadow), drawinfo.drawPlayer.bodyRotation, new Vector2((float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Width() / 2), (float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 14)), 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + } + else if (drawinfo.drawPlayer.wings == 30) + { + drawData = new DrawData(TextureAssets.GlowMask[181].Value, vec.Floor(), new Rectangle?(new Rectangle(0, TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4 * drawinfo.drawPlayer.wingFrame, TextureAssets.Wings[drawinfo.drawPlayer.wings].Width(), TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4)), new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue) * drawinfo.stealth * (1f - drawinfo.shadow), drawinfo.drawPlayer.bodyRotation, new Vector2((float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Width() / 2), (float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 8)), 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + } + else if (drawinfo.drawPlayer.wings == 38) + { + Color color5 = drawinfo.ArkhalisColor * drawinfo.stealth * (1f - drawinfo.shadow); + drawData = new DrawData(TextureAssets.GlowMask[251].Value, vec.Floor(), new Rectangle?(new Rectangle(0, TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4 * drawinfo.drawPlayer.wingFrame, TextureAssets.Wings[drawinfo.drawPlayer.wings].Width(), TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4)), color5, drawinfo.drawPlayer.bodyRotation, new Vector2((float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Width() / 2), (float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 8)), 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + for (int index = drawinfo.drawPlayer.shadowPos.Length - 2; index >= 0; --index) + { + Color color6 = color5; + color6.A = (byte) 0; + Color color7 = color6 * MathHelper.Lerp(1f, 0.0f, (float) index / 3f) * 0.1f; + Vector2 vector2_14 = drawinfo.drawPlayer.shadowPos[index] - drawinfo.drawPlayer.position; + for (float num14 = 0.0f; (double) num14 < 1.0; num14 += 0.01f) + { + Vector2 vector2_15 = new Vector2(2f, 0.0f).RotatedBy((double) num14 / 0.0399999991059303 * 6.28318548202515); + drawData = new DrawData(TextureAssets.GlowMask[251].Value, vector2_15 + vector2_14 * num14 + vec, new Rectangle?(new Rectangle(0, TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4 * drawinfo.drawPlayer.wingFrame, TextureAssets.Wings[drawinfo.drawPlayer.wings].Width(), TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4)), color7 * (1f - num14), drawinfo.drawPlayer.bodyRotation, new Vector2((float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Width() / 2), (float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 8)), 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + } + } + } + else if (drawinfo.drawPlayer.wings == 29) + { + drawData = new DrawData(TextureAssets.Wings[drawinfo.drawPlayer.wings].Value, vec.Floor(), new Rectangle?(new Rectangle(0, TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4 * drawinfo.drawPlayer.wingFrame, TextureAssets.Wings[drawinfo.drawPlayer.wings].Width(), TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4)), new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * drawinfo.stealth * (1f - drawinfo.shadow) * 0.5f, drawinfo.drawPlayer.bodyRotation, new Vector2((float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Width() / 2), (float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 8)), 1.06f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + } + else if (drawinfo.drawPlayer.wings == 36) + { + drawData = new DrawData(TextureAssets.GlowMask[213].Value, vec.Floor(), new Rectangle?(new Rectangle(0, TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4 * drawinfo.drawPlayer.wingFrame, TextureAssets.Wings[drawinfo.drawPlayer.wings].Width(), TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4)), new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * drawinfo.stealth * (1f - drawinfo.shadow), drawinfo.drawPlayer.bodyRotation, new Vector2((float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Width() / 2), (float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 8)), 1.06f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + Vector2 spinningpoint = new Vector2(0.0f, (float) (2.0 - (double) drawinfo.shadow * 2.0)); + for (int index = 0; index < 4; ++index) + { + drawData = new DrawData(TextureAssets.GlowMask[213].Value, spinningpoint.RotatedBy(1.57079637050629 * (double) index) + vec.Floor(), new Rectangle?(new Rectangle(0, TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4 * drawinfo.drawPlayer.wingFrame, TextureAssets.Wings[drawinfo.drawPlayer.wings].Width(), TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4)), new Color((int) sbyte.MaxValue, (int) sbyte.MaxValue, (int) sbyte.MaxValue, (int) sbyte.MaxValue) * drawinfo.stealth * (1f - drawinfo.shadow), drawinfo.drawPlayer.bodyRotation, new Vector2((float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Width() / 2), (float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 8)), 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + } + } + else if (drawinfo.drawPlayer.wings == 31) + { + Color color8 = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + Color color9 = Color.Lerp(Color.HotPink, Color.Crimson, (float) (Math.Cos(6.28318548202515 * ((double) drawinfo.drawPlayer.miscCounter / 100.0)) * 0.400000005960464 + 0.5)); + color9.A = (byte) 0; + for (int index = 0; index < 4; ++index) + { + Vector2 vector2_16 = new Vector2((float) (Math.Cos(6.28318548202515 * ((double) drawinfo.drawPlayer.miscCounter / 60.0)) * 0.5 + 0.5), 0.0f).RotatedBy((double) index * 1.57079637050629) * 1f; + drawData = new DrawData(TextureAssets.Wings[drawinfo.drawPlayer.wings].Value, vec.Floor() + vector2_16, new Rectangle?(new Rectangle(0, TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4 * drawinfo.drawPlayer.wingFrame, TextureAssets.Wings[drawinfo.drawPlayer.wings].Width(), TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4)), color9 * drawinfo.stealth * (1f - drawinfo.shadow) * 0.5f, drawinfo.drawPlayer.bodyRotation, new Vector2((float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Width() / 2), (float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 8)), 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + } + drawData = new DrawData(TextureAssets.Wings[drawinfo.drawPlayer.wings].Value, vec.Floor(), new Rectangle?(new Rectangle(0, TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4 * drawinfo.drawPlayer.wingFrame, TextureAssets.Wings[drawinfo.drawPlayer.wings].Width(), TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4)), color9 * drawinfo.stealth * (1f - drawinfo.shadow) * 1f, drawinfo.drawPlayer.bodyRotation, new Vector2((float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Width() / 2), (float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 8)), 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + } + else + { + if (drawinfo.drawPlayer.wings != 32) + return; + drawData = new DrawData(TextureAssets.GlowMask[183].Value, vec.Floor(), new Rectangle?(new Rectangle(0, TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4 * drawinfo.drawPlayer.wingFrame, TextureAssets.Wings[drawinfo.drawPlayer.wings].Width(), TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 4)), new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * drawinfo.stealth * (1f - drawinfo.shadow), drawinfo.drawPlayer.bodyRotation, new Vector2((float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Width() / 2), (float) (TextureAssets.Wings[drawinfo.drawPlayer.wings].Height() / 8)), 1.06f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + } + } + } + + public static void DrawPlayer_11_Balloons(ref PlayerDrawSet drawinfo) + { + if (drawinfo.drawPlayer.balloon <= (sbyte) 0) + return; + int num = !Main.hasFocus || Main.ingameOptionsWindow && Main.autoPause ? 0 : DateTime.Now.Millisecond % 800 / 200; + Vector2 vector2_1 = Main.OffsetsPlayerOffhand[drawinfo.drawPlayer.bodyFrame.Y / 56]; + if (drawinfo.drawPlayer.direction != 1) + vector2_1.X = (float) drawinfo.drawPlayer.width - vector2_1.X; + if ((double) drawinfo.drawPlayer.gravDir != 1.0) + vector2_1.Y -= (float) drawinfo.drawPlayer.height; + Vector2 vector2_2 = new Vector2(0.0f, 8f) + new Vector2(0.0f, 6f); + Vector2 vector2_3 = new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X + (double) vector2_1.X), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) vector2_1.Y * (double) drawinfo.drawPlayer.gravDir)); + vector2_3 = drawinfo.Position - Main.screenPosition + vector2_1 * new Vector2(1f, drawinfo.drawPlayer.gravDir) + new Vector2(0.0f, (float) (drawinfo.drawPlayer.height - drawinfo.drawPlayer.bodyFrame.Height)) + vector2_2; + vector2_3 = vector2_3.Floor(); + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.AccBalloon[(int) drawinfo.drawPlayer.balloon].Value, vector2_3, new Rectangle?(new Rectangle(0, TextureAssets.AccBalloon[(int) drawinfo.drawPlayer.balloon].Height() / 4 * num, TextureAssets.AccBalloon[(int) drawinfo.drawPlayer.balloon].Width(), TextureAssets.AccBalloon[(int) drawinfo.drawPlayer.balloon].Height() / 4)), drawinfo.colorArmorBody, drawinfo.drawPlayer.bodyRotation, new Vector2((float) (26 + drawinfo.drawPlayer.direction * 4), (float) (28.0 + (double) drawinfo.drawPlayer.gravDir * 6.0)), 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.cBalloon + }); + } + + public static void DrawPlayer_12_Skin(ref PlayerDrawSet drawinfo) + { + if (drawinfo.usesCompositeTorso) + { + PlayerDrawLayers.DrawPlayer_12_Skin_Composite(ref drawinfo); + } + else + { + if (drawinfo.isSitting) + drawinfo.hidesBottomSkin = true; + DrawData drawData; + if (!drawinfo.hidesTopSkin) + { + drawinfo.Position.Y += drawinfo.torsoOffset; + drawData = new DrawData(TextureAssets.Players[drawinfo.skinVar, 3].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorBodySkin, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.skinDyePacked + }; + drawinfo.DrawDataCache.Add(drawData); + drawinfo.Position.Y -= drawinfo.torsoOffset; + } + if (drawinfo.hidesBottomSkin || PlayerDrawLayers.IsBottomOverridden(ref drawinfo)) + return; + if (drawinfo.isSitting) + { + PlayerDrawLayers.DrawSittingLegs(ref drawinfo, TextureAssets.Players[drawinfo.skinVar, 10].Value, drawinfo.colorLegs); + } + else + { + drawData = new DrawData(TextureAssets.Players[drawinfo.skinVar, 10].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawinfo.drawPlayer.legFrame), drawinfo.colorLegs, drawinfo.drawPlayer.legRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + } + } + + public static bool IsBottomOverridden(ref PlayerDrawSet drawinfo) => PlayerDrawLayers.ShouldOverrideLegs_CheckPants(ref drawinfo) || PlayerDrawLayers.ShouldOverrideLegs_CheckShoes(ref drawinfo); + + public static bool ShouldOverrideLegs_CheckPants(ref PlayerDrawSet drawinfo) + { + switch (drawinfo.drawPlayer.legs) + { + case 67: + case 106: + case 138: + case 140: + case 143: + case 217: + return true; + default: + return false; + } + } + + public static bool ShouldOverrideLegs_CheckShoes(ref PlayerDrawSet drawinfo) => drawinfo.drawPlayer.shoe == (sbyte) 15; + + public static void DrawPlayer_12_Skin_Composite(ref PlayerDrawSet drawinfo) + { + DrawData drawData1; + if (!drawinfo.hidesTopSkin && !drawinfo.drawPlayer.invis) + { + Vector2 vector2_1 = new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)); + vector2_1.Y += drawinfo.torsoOffset; + Vector2 vector2_2 = Main.OffsetsPlayerHeadgear[drawinfo.drawPlayer.bodyFrame.Y / drawinfo.drawPlayer.bodyFrame.Height]; + vector2_2.Y -= 2f; + Vector2 position = vector2_1 + vector2_2; + float bodyRotation = drawinfo.drawPlayer.bodyRotation; + Vector2 vector2_3 = position; + Vector2 vector2_4 = position; + Vector2 bodyVect1 = drawinfo.bodyVect; + Vector2 bodyVect2 = drawinfo.bodyVect; + Vector2 compositeOffsetBackArm = PlayerDrawLayers.GetCompositeOffset_BackArm(ref drawinfo); + Vector2 vector2_5 = vector2_3 + compositeOffsetBackArm; + Vector2 vector2_6 = compositeOffsetBackArm; + Vector2 vector2_7 = bodyVect1 + vector2_6; + Vector2 compositeOffsetFrontArm = PlayerDrawLayers.GetCompositeOffset_FrontArm(ref drawinfo); + Vector2 vector2_8 = bodyVect2 + compositeOffsetFrontArm; + Vector2 vector2_9 = compositeOffsetFrontArm; + Vector2 vector2_10 = vector2_4 + vector2_9; + if (drawinfo.drawFloatingTube) + { + List drawDataCache = drawinfo.DrawDataCache; + drawData1 = new DrawData(TextureAssets.Extra[105].Value, position, new Rectangle?(new Rectangle(0, 0, 40, 56)), drawinfo.floatingTubeColor, bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.cFloatingTube; + DrawData drawData2 = drawData1; + drawDataCache.Add(drawData2); + } + List drawDataCache1 = drawinfo.DrawDataCache; + drawData1 = new DrawData(TextureAssets.Players[drawinfo.skinVar, 3].Value, position, new Rectangle?(drawinfo.compTorsoFrame), drawinfo.colorBodySkin, bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.skinDyePacked; + DrawData drawData3 = drawData1; + drawDataCache1.Add(drawData3); + } + if (!drawinfo.hidesBottomSkin && !drawinfo.drawPlayer.invis && !PlayerDrawLayers.IsBottomOverridden(ref drawinfo)) + { + if (drawinfo.isSitting) + { + PlayerDrawLayers.DrawSittingLegs(ref drawinfo, TextureAssets.Players[drawinfo.skinVar, 10].Value, drawinfo.colorLegs, drawinfo.skinDyePacked); + } + else + { + drawData1 = new DrawData(TextureAssets.Players[drawinfo.skinVar, 10].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawinfo.drawPlayer.legFrame), drawinfo.colorLegs, drawinfo.drawPlayer.legRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.skinDyePacked; + DrawData drawData4 = drawData1; + drawinfo.DrawDataCache.Add(drawData4); + } + } + PlayerDrawLayers.DrawPlayer_12_SkinComposite_BackArmShirt(ref drawinfo); + } + + public static void DrawPlayer_12_SkinComposite_BackArmShirt(ref PlayerDrawSet drawinfo) + { + Vector2 vector2_1 = new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)); + Vector2 vector2_2 = Main.OffsetsPlayerHeadgear[drawinfo.drawPlayer.bodyFrame.Y / drawinfo.drawPlayer.bodyFrame.Height]; + vector2_2.Y -= 2f; + Vector2 vector2_3 = vector2_1 + vector2_2 * (float) -drawinfo.playerEffect.HasFlag((Enum) SpriteEffects.FlipVertically).ToDirectionInt(); + vector2_3.Y += drawinfo.torsoOffset; + float bodyRotation = drawinfo.drawPlayer.bodyRotation; + Vector2 vector2_4 = vector2_3; + Vector2 vector2_5 = vector2_3; + Vector2 bodyVect = drawinfo.bodyVect; + Vector2 compositeOffsetBackArm = PlayerDrawLayers.GetCompositeOffset_BackArm(ref drawinfo); + Vector2 position1 = vector2_4 + compositeOffsetBackArm; + Vector2 position2 = vector2_5 + drawinfo.backShoulderOffset; + Vector2 origin1 = bodyVect + compositeOffsetBackArm; + float rotation = bodyRotation + drawinfo.compositeBackArmRotation; + bool flag1 = !drawinfo.drawPlayer.invis; + bool flag2 = !drawinfo.drawPlayer.invis; + bool flag3 = drawinfo.drawPlayer.body > 0 && drawinfo.drawPlayer.body < 235; + bool flag4 = !drawinfo.hidesTopSkin; + bool flag5 = false; + DrawData drawData1; + if (flag3) + { + flag1 &= drawinfo.missingHand; + if (flag2 && drawinfo.missingArm) + { + if (flag4) + { + List drawDataCache = drawinfo.DrawDataCache; + drawData1 = new DrawData(TextureAssets.Players[drawinfo.skinVar, 7].Value, position1, new Rectangle?(drawinfo.compBackArmFrame), drawinfo.colorBodySkin, rotation, origin1, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.skinDyePacked; + DrawData drawData2 = drawData1; + drawDataCache.Add(drawData2); + } + if (!flag5 & flag4) + { + List drawDataCache = drawinfo.DrawDataCache; + drawData1 = new DrawData(TextureAssets.Players[drawinfo.skinVar, 5].Value, position1, new Rectangle?(drawinfo.compBackArmFrame), drawinfo.colorBodySkin, rotation, origin1, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.skinDyePacked; + DrawData drawData3 = drawData1; + drawDataCache.Add(drawData3); + flag5 = true; + } + flag2 = false; + } + if (!drawinfo.drawPlayer.invis || PlayerDrawLayers.IsArmorDrawnWhenInvisible(drawinfo.drawPlayer.body)) + { + Texture2D texture = TextureAssets.ArmorBodyComposite[drawinfo.drawPlayer.body].Value; + if (!drawinfo.hideCompositeShoulders) + { + ref PlayerDrawSet local = ref drawinfo; + drawData1 = new DrawData(texture, position2, new Rectangle?(drawinfo.compBackShoulderFrame), drawinfo.colorArmorBody, bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.cBody; + DrawData data = drawData1; + PlayerDrawLayers.DrawCompositeArmorPiece(ref local, CompositePlayerDrawContext.BackShoulder, data); + } + ref PlayerDrawSet local1 = ref drawinfo; + drawData1 = new DrawData(texture, position1, new Rectangle?(drawinfo.compBackArmFrame), drawinfo.colorArmorBody, rotation, origin1, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.cBody; + DrawData data1 = drawData1; + PlayerDrawLayers.DrawCompositeArmorPiece(ref local1, CompositePlayerDrawContext.BackArm, data1); + } + } + if (flag1) + { + if (flag4) + { + if (flag2) + { + List drawDataCache = drawinfo.DrawDataCache; + drawData1 = new DrawData(TextureAssets.Players[drawinfo.skinVar, 7].Value, position1, new Rectangle?(drawinfo.compBackArmFrame), drawinfo.colorBodySkin, rotation, origin1, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.skinDyePacked; + DrawData drawData4 = drawData1; + drawDataCache.Add(drawData4); + } + if (!flag5 & flag4) + { + List drawDataCache = drawinfo.DrawDataCache; + drawData1 = new DrawData(TextureAssets.Players[drawinfo.skinVar, 5].Value, position1, new Rectangle?(drawinfo.compBackArmFrame), drawinfo.colorBodySkin, rotation, origin1, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.skinDyePacked; + DrawData drawData5 = drawData1; + drawDataCache.Add(drawData5); + } + } + if (!flag3) + { + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.Players[drawinfo.skinVar, 8].Value, position1, new Rectangle?(drawinfo.compBackArmFrame), drawinfo.colorUnderShirt, rotation, origin1, 1f, drawinfo.playerEffect, 0)); + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.Players[drawinfo.skinVar, 13].Value, position1, new Rectangle?(drawinfo.compBackArmFrame), drawinfo.colorShirt, rotation, origin1, 1f, drawinfo.playerEffect, 0)); + } + } + if (drawinfo.drawPlayer.handoff > (sbyte) 0 && drawinfo.drawPlayer.handoff < (sbyte) 14) + { + Texture2D texture = TextureAssets.AccHandsOffComposite[(int) drawinfo.drawPlayer.handoff].Value; + ref PlayerDrawSet local = ref drawinfo; + drawData1 = new DrawData(texture, position1, new Rectangle?(drawinfo.compBackArmFrame), drawinfo.colorArmorBody, rotation, origin1, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.cHandOff; + DrawData data = drawData1; + PlayerDrawLayers.DrawCompositeArmorPiece(ref local, CompositePlayerDrawContext.BackArmAccessory, data); + } + if (!drawinfo.drawPlayer.drawingFootball) + return; + Main.instance.LoadProjectile(861); + Texture2D texture2D = TextureAssets.Projectile[861].Value; + Rectangle r = texture2D.Frame(verticalFrames: 4); + Vector2 origin2 = r.Size() / 2f; + Vector2 position3 = position1 + new Vector2((float) (drawinfo.drawPlayer.direction * -2), drawinfo.drawPlayer.gravDir * 4f); + drawinfo.DrawDataCache.Add(new DrawData(texture2D, position3, new Rectangle?(r), drawinfo.colorArmorBody, bodyRotation + 0.7853982f * (float) drawinfo.drawPlayer.direction, origin2, 0.8f, drawinfo.playerEffect, 0)); + } + + public static void DrawPlayer_13_Leggings(ref PlayerDrawSet drawinfo) + { + if (drawinfo.isSitting && drawinfo.drawPlayer.legs != 140 && drawinfo.drawPlayer.legs != 217) + { + if (drawinfo.drawPlayer.legs > 0 && drawinfo.drawPlayer.legs < 218 && (!PlayerDrawLayers.ShouldOverrideLegs_CheckShoes(ref drawinfo) || drawinfo.drawPlayer.wearsRobe)) + { + if (drawinfo.drawPlayer.invis) + return; + PlayerDrawLayers.DrawSittingLegs(ref drawinfo, TextureAssets.ArmorLeg[drawinfo.drawPlayer.legs].Value, drawinfo.colorArmorLegs, drawinfo.cLegs); + if (drawinfo.legsGlowMask == -1) + return; + PlayerDrawLayers.DrawSittingLegs(ref drawinfo, TextureAssets.GlowMask[drawinfo.legsGlowMask].Value, drawinfo.legsGlowColor, drawinfo.cLegs); + } + else + { + if (drawinfo.drawPlayer.invis || PlayerDrawLayers.ShouldOverrideLegs_CheckShoes(ref drawinfo)) + return; + PlayerDrawLayers.DrawSittingLegs(ref drawinfo, TextureAssets.Players[drawinfo.skinVar, 11].Value, drawinfo.colorPants); + PlayerDrawLayers.DrawSittingLegs(ref drawinfo, TextureAssets.Players[drawinfo.skinVar, 12].Value, drawinfo.colorShoes); + } + } + else if (drawinfo.drawPlayer.legs == 140) + { + if (drawinfo.drawPlayer.invis || drawinfo.drawPlayer.mount.Active) + return; + Texture2D texture = TextureAssets.Extra[73].Value; + bool flag = drawinfo.drawPlayer.legFrame.Y != drawinfo.drawPlayer.legFrame.Height || Main.gameMenu; + int num1 = drawinfo.drawPlayer.miscCounter / 3 % 8; + if (flag) + num1 = drawinfo.drawPlayer.miscCounter / 4 % 8; + Rectangle r = new Rectangle(18 * flag.ToInt(), num1 * 26, 16, 24); + float num2 = 12f; + if (drawinfo.drawPlayer.bodyFrame.Height != 0) + num2 = 12f - Main.OffsetsPlayerHeadgear[drawinfo.drawPlayer.bodyFrame.Y / drawinfo.drawPlayer.bodyFrame.Height].Y; + Vector2 scale = new Vector2(1f, 1f); + Vector2 vector2_1 = drawinfo.Position + drawinfo.drawPlayer.Size * new Vector2(0.5f, (float) (0.5 + 0.5 * (double) drawinfo.drawPlayer.gravDir)); + int direction = drawinfo.drawPlayer.direction; + Vector2 vector2_2 = new Vector2(0.0f, -num2 * drawinfo.drawPlayer.gravDir); + Vector2 vec = vector2_1 + vector2_2 - Main.screenPosition + drawinfo.drawPlayer.legPosition; + if (drawinfo.isSitting) + vec.Y += drawinfo.seatYOffset; + Vector2 position = vec.Floor(); + drawinfo.DrawDataCache.Add(new DrawData(texture, position, new Rectangle?(r), drawinfo.colorArmorLegs, drawinfo.drawPlayer.legRotation, r.Size() * new Vector2(0.5f, (float) (0.5 - (double) drawinfo.drawPlayer.gravDir * 0.5)), scale, drawinfo.playerEffect, 0) + { + shader = drawinfo.cLegs + }); + } + else if (drawinfo.drawPlayer.legs > 0 && drawinfo.drawPlayer.legs < 218 && (!PlayerDrawLayers.ShouldOverrideLegs_CheckShoes(ref drawinfo) || drawinfo.drawPlayer.wearsRobe)) + { + if (drawinfo.drawPlayer.invis) + return; + DrawData drawData = new DrawData(TextureAssets.ArmorLeg[drawinfo.drawPlayer.legs].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.legFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.legFrame.Height + 4.0)) + drawinfo.drawPlayer.legPosition + drawinfo.legVect, new Rectangle?(drawinfo.drawPlayer.legFrame), drawinfo.colorArmorLegs, drawinfo.drawPlayer.legRotation, drawinfo.legVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cLegs; + drawinfo.DrawDataCache.Add(drawData); + if (drawinfo.legsGlowMask == -1) + return; + if (drawinfo.legsGlowMask == 274) + { + for (int index = 0; index < 2; ++index) + { + Vector2 vector2 = new Vector2((float) Main.rand.Next(-10, 10) * 0.125f, (float) Main.rand.Next(-10, 10) * 0.125f); + drawData = new DrawData(TextureAssets.GlowMask[drawinfo.legsGlowMask].Value, vector2 + new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.legFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.legFrame.Height + 4.0)) + drawinfo.drawPlayer.legPosition + drawinfo.legVect, new Rectangle?(drawinfo.drawPlayer.legFrame), drawinfo.legsGlowColor, drawinfo.drawPlayer.legRotation, drawinfo.legVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cLegs; + drawinfo.DrawDataCache.Add(drawData); + } + } + else + { + drawData = new DrawData(TextureAssets.GlowMask[drawinfo.legsGlowMask].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.legFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.legFrame.Height + 4.0)) + drawinfo.drawPlayer.legPosition + drawinfo.legVect, new Rectangle?(drawinfo.drawPlayer.legFrame), drawinfo.legsGlowColor, drawinfo.drawPlayer.legRotation, drawinfo.legVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cLegs; + drawinfo.DrawDataCache.Add(drawData); + } + } + else + { + if (drawinfo.drawPlayer.invis || PlayerDrawLayers.ShouldOverrideLegs_CheckShoes(ref drawinfo)) + return; + DrawData drawData = new DrawData(TextureAssets.Players[drawinfo.skinVar, 11].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.legFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.legFrame.Height + 4.0)) + drawinfo.drawPlayer.legPosition + drawinfo.legVect, new Rectangle?(drawinfo.drawPlayer.legFrame), drawinfo.colorPants, drawinfo.drawPlayer.legRotation, drawinfo.legVect, 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + drawData = new DrawData(TextureAssets.Players[drawinfo.skinVar, 12].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.legFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.legFrame.Height + 4.0)) + drawinfo.drawPlayer.legPosition + drawinfo.legVect, new Rectangle?(drawinfo.drawPlayer.legFrame), drawinfo.colorShoes, drawinfo.drawPlayer.legRotation, drawinfo.legVect, 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + } + + private static void DrawSittingLegs( + ref PlayerDrawSet drawinfo, + Texture2D textureToDraw, + Color matchingColor, + int shaderIndex = 0, + bool glowmask = false) + { + Vector2 vector2_1 = new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.legFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.legFrame.Height + 4.0)) + drawinfo.drawPlayer.legPosition + drawinfo.legVect; + Rectangle legFrame = drawinfo.drawPlayer.legFrame; + vector2_1.Y -= 2f; + vector2_1.Y += drawinfo.seatYOffset; + int num1 = 2; + int num2 = 42; + int num3 = 2; + int num4 = 2; + int num5 = 0; + int num6 = 0; + switch (drawinfo.drawPlayer.legs) + { + case 132: + num1 = -2; + num6 = 2; + break; + case 143: + num1 = 0; + num2 = 40; + break; + case 193: + case 194: + if (drawinfo.drawPlayer.body == 218) + { + num1 = -2; + num6 = 2; + vector2_1.Y += 2f; + break; + } + break; + case 210: + if (glowmask) + { + Vector2 vector2_2 = new Vector2((float) Main.rand.Next(-10, 10) * 0.125f, (float) Main.rand.Next(-10, 10) * 0.125f); + vector2_1 += vector2_2; + break; + } + break; + } + for (int index = num3; index >= 0; --index) + { + Vector2 position = vector2_1 + new Vector2((float) num1, 2f) * new Vector2((float) drawinfo.drawPlayer.direction, 1f); + Rectangle rectangle = legFrame; + rectangle.Y += index * 2; + rectangle.Y += num2; + rectangle.Height -= num2; + rectangle.Height -= index * 2; + if (index != num3) + rectangle.Height = 2; + position.X += (float) (drawinfo.drawPlayer.direction * num4 * index + num5 * drawinfo.drawPlayer.direction); + if (index != 0) + position.X += (float) (num6 * drawinfo.drawPlayer.direction); + position.Y += (float) num2; + drawinfo.DrawDataCache.Add(new DrawData(textureToDraw, position, new Rectangle?(rectangle), matchingColor, drawinfo.drawPlayer.legRotation, drawinfo.legVect, 1f, drawinfo.playerEffect, 0) + { + shader = shaderIndex + }); + } + } + + public static void DrawPlayer_14_Shoes(ref PlayerDrawSet drawinfo) + { + if (drawinfo.drawPlayer.shoe <= (sbyte) 0 || drawinfo.drawPlayer.shoe >= (sbyte) 25 || PlayerDrawLayers.ShouldOverrideLegs_CheckPants(ref drawinfo)) + return; + if (drawinfo.isSitting) + PlayerDrawLayers.DrawSittingLegs(ref drawinfo, TextureAssets.AccShoes[(int) drawinfo.drawPlayer.shoe].Value, drawinfo.colorArmorLegs, drawinfo.cShoe); + else + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.AccShoes[(int) drawinfo.drawPlayer.shoe].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.legFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.legFrame.Height + 4.0)) + drawinfo.drawPlayer.legPosition + drawinfo.legVect, new Rectangle?(drawinfo.drawPlayer.legFrame), drawinfo.colorArmorLegs, drawinfo.drawPlayer.legRotation, drawinfo.legVect, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.cShoe + }); + } + + public static void DrawPlayer_15_SkinLongCoat(ref PlayerDrawSet drawinfo) + { + if ((drawinfo.skinVar == 3 || drawinfo.skinVar == 8 ? 1 : (drawinfo.skinVar == 7 ? 1 : 0)) == 0 || drawinfo.drawPlayer.body > 0 && drawinfo.drawPlayer.body < 235 || drawinfo.drawPlayer.invis) + return; + if (drawinfo.isSitting) + { + PlayerDrawLayers.DrawSittingLegs(ref drawinfo, TextureAssets.Players[drawinfo.skinVar, 14].Value, drawinfo.colorShirt); + } + else + { + DrawData drawData = new DrawData(TextureAssets.Players[drawinfo.skinVar, 14].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.legFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.legFrame.Height + 4.0)) + drawinfo.drawPlayer.legPosition + drawinfo.legVect, new Rectangle?(drawinfo.drawPlayer.legFrame), drawinfo.colorShirt, drawinfo.drawPlayer.legRotation, drawinfo.legVect, 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + } + + public static void DrawPlayer_16_ArmorLongCoat(ref PlayerDrawSet drawinfo) + { + int i = -1; + switch (drawinfo.drawPlayer.body) + { + case 52: + i = !drawinfo.drawPlayer.Male ? 172 : 171; + break; + case 53: + i = !drawinfo.drawPlayer.Male ? 176 : 175; + break; + case 73: + i = 170; + break; + case 168: + i = 164; + break; + case 182: + i = 163; + break; + case 187: + i = 173; + break; + case 198: + i = 162; + break; + case 200: + i = 149; + break; + case 201: + i = 150; + break; + case 202: + i = 151; + break; + case 205: + i = 174; + break; + case 207: + i = 161; + break; + case 209: + i = 160; + break; + case 210: + i = !drawinfo.drawPlayer.Male ? 177 : 178; + break; + case 211: + i = !drawinfo.drawPlayer.Male ? 181 : 182; + break; + case 218: + i = 195; + break; + case 222: + i = !drawinfo.drawPlayer.Male ? 200 : 201; + break; + case 225: + i = 206; + break; + } + if (i == -1) + return; + Main.instance.LoadArmorLegs(i); + if (drawinfo.isSitting && i != 195) + PlayerDrawLayers.DrawSittingLegs(ref drawinfo, TextureAssets.ArmorLeg[i].Value, drawinfo.colorArmorBody, drawinfo.cBody); + else + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.ArmorLeg[i].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.legFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.legFrame.Height + 4.0)) + drawinfo.drawPlayer.legPosition + drawinfo.legVect, new Rectangle?(drawinfo.drawPlayer.legFrame), drawinfo.colorArmorBody, drawinfo.drawPlayer.legRotation, drawinfo.legVect, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.cBody + }); + } + + public static void DrawPlayer_17_Torso(ref PlayerDrawSet drawinfo) + { + if (drawinfo.usesCompositeTorso) + PlayerDrawLayers.DrawPlayer_17_TorsoComposite(ref drawinfo); + else if (drawinfo.drawPlayer.body > 0 && drawinfo.drawPlayer.body < 235) + { + Rectangle bodyFrame = drawinfo.drawPlayer.bodyFrame; + int num = drawinfo.armorAdjust; + bodyFrame.X += num; + bodyFrame.Width -= num; + if (drawinfo.drawPlayer.direction == -1) + num = 0; + if (!drawinfo.drawPlayer.invis || drawinfo.drawPlayer.body != 21 && drawinfo.drawPlayer.body != 22) + { + DrawData drawData = new DrawData(drawinfo.drawPlayer.Male ? TextureAssets.ArmorBody[drawinfo.drawPlayer.body].Value : TextureAssets.FemaleBody[drawinfo.drawPlayer.body].Value, new Vector2((float) ((int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)) + num), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(bodyFrame), drawinfo.colorArmorBody, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cBody; + drawinfo.DrawDataCache.Add(drawData); + if (drawinfo.bodyGlowMask != -1) + { + drawData = new DrawData(TextureAssets.GlowMask[drawinfo.bodyGlowMask].Value, new Vector2((float) ((int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)) + num), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(bodyFrame), drawinfo.bodyGlowColor, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cBody; + drawinfo.DrawDataCache.Add(drawData); + } + } + if (!drawinfo.missingHand || drawinfo.drawPlayer.invis) + return; + DrawData drawData1 = new DrawData(TextureAssets.Players[drawinfo.skinVar, 5].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorBodySkin, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.skinDyePacked + }; + drawinfo.DrawDataCache.Add(drawData1); + } + else + { + if (drawinfo.drawPlayer.invis) + return; + if (!drawinfo.drawPlayer.Male) + { + DrawData drawData = new DrawData(TextureAssets.Players[drawinfo.skinVar, 4].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorUnderShirt, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + drawData = new DrawData(TextureAssets.Players[drawinfo.skinVar, 6].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorShirt, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + else + { + DrawData drawData = new DrawData(TextureAssets.Players[drawinfo.skinVar, 4].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorUnderShirt, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + drawData = new DrawData(TextureAssets.Players[drawinfo.skinVar, 6].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorShirt, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + DrawData drawData2 = new DrawData(TextureAssets.Players[drawinfo.skinVar, 5].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorBodySkin, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.skinDyePacked + }; + drawinfo.DrawDataCache.Add(drawData2); + } + } + + public static void DrawPlayer_17_TorsoComposite(ref PlayerDrawSet drawinfo) + { + Vector2 vector2_1 = new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)); + Vector2 vector2_2 = Main.OffsetsPlayerHeadgear[drawinfo.drawPlayer.bodyFrame.Y / drawinfo.drawPlayer.bodyFrame.Height]; + vector2_2.Y -= 2f; + Vector2 position = vector2_1 + vector2_2 * (float) -drawinfo.playerEffect.HasFlag((Enum) SpriteEffects.FlipVertically).ToDirectionInt(); + float bodyRotation = drawinfo.drawPlayer.bodyRotation; + Vector2 vector2_3 = position; + Vector2 bodyVect = drawinfo.bodyVect; + Vector2 compositeOffsetBackArm = PlayerDrawLayers.GetCompositeOffset_BackArm(ref drawinfo); + Vector2 vector2_4 = compositeOffsetBackArm; + Vector2 vector2_5 = vector2_3 + vector2_4; + Vector2 vector2_6 = bodyVect + compositeOffsetBackArm; + DrawData drawData1; + if (drawinfo.drawPlayer.body > 0 && drawinfo.drawPlayer.body < 235) + { + if (!drawinfo.drawPlayer.invis || PlayerDrawLayers.IsArmorDrawnWhenInvisible(drawinfo.drawPlayer.body)) + { + Texture2D texture = TextureAssets.ArmorBodyComposite[drawinfo.drawPlayer.body].Value; + ref PlayerDrawSet local = ref drawinfo; + drawData1 = new DrawData(texture, position, new Rectangle?(drawinfo.compTorsoFrame), drawinfo.colorArmorBody, bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.cBody; + DrawData data = drawData1; + PlayerDrawLayers.DrawCompositeArmorPiece(ref local, CompositePlayerDrawContext.Torso, data); + } + } + else if (!drawinfo.drawPlayer.invis) + { + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.Players[drawinfo.skinVar, 4].Value, position, new Rectangle?(drawinfo.compBackShoulderFrame), drawinfo.colorUnderShirt, bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0)); + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.Players[drawinfo.skinVar, 6].Value, position, new Rectangle?(drawinfo.compBackShoulderFrame), drawinfo.colorShirt, bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0)); + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.Players[drawinfo.skinVar, 4].Value, position, new Rectangle?(drawinfo.compTorsoFrame), drawinfo.colorUnderShirt, bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0)); + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.Players[drawinfo.skinVar, 6].Value, position, new Rectangle?(drawinfo.compTorsoFrame), drawinfo.colorShirt, bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0)); + } + if (!drawinfo.drawFloatingTube) + return; + List drawDataCache = drawinfo.DrawDataCache; + drawData1 = new DrawData(TextureAssets.Extra[105].Value, position, new Rectangle?(new Rectangle(0, 56, 40, 56)), drawinfo.floatingTubeColor, bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.cFloatingTube; + DrawData drawData2 = drawData1; + drawDataCache.Add(drawData2); + } + + public static void DrawPlayer_18_OffhandAcc(ref PlayerDrawSet drawinfo) + { + if (drawinfo.usesCompositeBackHandAcc || drawinfo.drawPlayer.handoff <= (sbyte) 0 || drawinfo.drawPlayer.handoff >= (sbyte) 14) + return; + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.AccHandsOff[(int) drawinfo.drawPlayer.handoff].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorArmorBody, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.cHandOff + }); + } + + public static void DrawPlayer_19_WaistAcc(ref PlayerDrawSet drawinfo) + { + if (drawinfo.drawPlayer.waist <= (sbyte) 0 || drawinfo.drawPlayer.waist >= (sbyte) 17) + return; + Rectangle rectangle = drawinfo.drawPlayer.legFrame; + if (ArmorIDs.Waist.Sets.UsesTorsoFraming[(int) drawinfo.drawPlayer.waist]) + rectangle = drawinfo.drawPlayer.bodyFrame; + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.AccWaist[(int) drawinfo.drawPlayer.waist].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.legFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.legFrame.Height + 4.0)) + drawinfo.drawPlayer.legPosition + drawinfo.legVect, new Rectangle?(rectangle), drawinfo.colorArmorLegs, drawinfo.drawPlayer.legRotation, drawinfo.legVect, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.cWaist + }); + } + + public static void DrawPlayer_20_NeckAcc(ref PlayerDrawSet drawinfo) + { + if (drawinfo.drawPlayer.neck <= (sbyte) 0 || drawinfo.drawPlayer.neck >= (sbyte) 11) + return; + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.AccNeck[(int) drawinfo.drawPlayer.neck].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorArmorBody, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.cNeck + }); + } + + public static void DrawPlayer_21_Head(ref PlayerDrawSet drawinfo) + { + Vector2 helmetOffset = drawinfo.helmetOffset; + PlayerDrawLayers.DrawPlayer_21_Head_TheFace(ref drawinfo); + bool flag1 = drawinfo.drawPlayer.head == 14 || drawinfo.drawPlayer.head == 56 || drawinfo.drawPlayer.head == 114 || drawinfo.drawPlayer.head == 158 || drawinfo.drawPlayer.head == 69 || drawinfo.drawPlayer.head == 180; + bool flag2 = drawinfo.drawPlayer.head == 28; + bool flag3 = drawinfo.drawPlayer.head == 39 || drawinfo.drawPlayer.head == 38; + DrawData drawData; + if (drawinfo.fullHair) + { + drawData = new DrawData(TextureAssets.ArmorHead[drawinfo.drawPlayer.head].Value, helmetOffset + new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cHead; + drawinfo.DrawDataCache.Add(drawData); + if (!drawinfo.drawPlayer.invis) + { + drawData = new DrawData(TextureAssets.PlayerHair[drawinfo.drawPlayer.hair].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.hairFrame), drawinfo.colorHair, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.hairDyePacked; + drawinfo.DrawDataCache.Add(drawData); + } + } + if (drawinfo.hatHair && !drawinfo.drawPlayer.invis) + { + drawData = new DrawData(TextureAssets.PlayerHairAlt[drawinfo.drawPlayer.hair].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.hairFrame), drawinfo.colorHair, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.hairDyePacked; + drawinfo.DrawDataCache.Add(drawData); + } + if (drawinfo.drawPlayer.head == 23) + { + if (!drawinfo.drawPlayer.invis) + { + drawData = new DrawData(TextureAssets.PlayerHair[drawinfo.drawPlayer.hair].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.hairFrame), drawinfo.colorHair, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.hairDyePacked; + drawinfo.DrawDataCache.Add(drawData); + } + drawData = new DrawData(TextureAssets.ArmorHead[drawinfo.drawPlayer.head].Value, helmetOffset + new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cHead; + drawinfo.DrawDataCache.Add(drawData); + } + else if (flag1) + { + Rectangle bodyFrame = drawinfo.drawPlayer.bodyFrame; + Vector2 headVect = drawinfo.headVect; + if ((double) drawinfo.drawPlayer.gravDir == 1.0) + { + if (bodyFrame.Y != 0) + { + bodyFrame.Y -= 2; + bodyFrame.Height -= 8; + headVect.Y += 2f; + } + } + else if (bodyFrame.Y != 0) + { + bodyFrame.Y -= 2; + headVect.Y -= 10f; + bodyFrame.Height -= 8; + } + drawData = new DrawData(TextureAssets.ArmorHead[drawinfo.drawPlayer.head].Value, helmetOffset + new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(bodyFrame), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, headVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cHead; + drawinfo.DrawDataCache.Add(drawData); + } + else if (drawinfo.drawPlayer.head == 259) + { + int verticalFrames = 27; + Texture2D texture2D = TextureAssets.ArmorHead[drawinfo.drawPlayer.head].Value; + Rectangle r = texture2D.Frame(verticalFrames: verticalFrames, frameY: drawinfo.drawPlayer.rabbitOrderFrame.DisplayFrame); + Vector2 origin = r.Size() / 2f; + int num1 = drawinfo.drawPlayer.babyBird.ToInt(); + Vector2 specialHatDrawPosition = PlayerDrawLayers.DrawPlayer_21_Head_GetSpecialHatDrawPosition(ref drawinfo, ref helmetOffset, new Vector2((float) (1 + num1 * 2), (float) (drawinfo.drawPlayer.babyBird.ToInt() * -6 - 26))); + int hatStacks = PlayerDrawLayers.DrawPlayer_21_head_GetHatStacks(ref drawinfo, 4955); + float num2 = (float) Math.PI / 60f; + float num3 = (float) ((double) num2 * (double) drawinfo.drawPlayer.position.X % 6.28318548202515); + for (int index = hatStacks - 1; index >= 0; --index) + { + float x = (float) ((double) Vector2.UnitY.RotatedBy((double) num3 + (double) num2 * (double) index).X * ((double) index / 30.0) * 2.0) - (float) (index * 2 * drawinfo.drawPlayer.direction); + drawData = new DrawData(texture2D, specialHatDrawPosition + new Vector2(x, (float) (index * -14) * drawinfo.drawPlayer.gravDir), new Rectangle?(r), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, origin, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cHead; + drawinfo.DrawDataCache.Add(drawData); + } + if (!drawinfo.drawPlayer.invis) + { + drawData = new DrawData(TextureAssets.PlayerHair[drawinfo.drawPlayer.hair].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.hairFrame), drawinfo.colorHair, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.hairDyePacked; + drawinfo.DrawDataCache.Add(drawData); + } + } + else if (drawinfo.drawPlayer.head > 0 && drawinfo.drawPlayer.head < 266 && !flag2) + { + if (!(drawinfo.drawPlayer.invis & flag3)) + { + if (drawinfo.drawPlayer.head == 13) + { + int num4 = 0; + int index1 = 0; + if (drawinfo.drawPlayer.armor[index1] != null && drawinfo.drawPlayer.armor[index1].type == 205 && drawinfo.drawPlayer.armor[index1].stack > 0) + num4 += drawinfo.drawPlayer.armor[index1].stack; + int index2 = 10; + if (drawinfo.drawPlayer.armor[index2] != null && drawinfo.drawPlayer.armor[index2].type == 205 && drawinfo.drawPlayer.armor[index2].stack > 0) + num4 += drawinfo.drawPlayer.armor[index2].stack; + float num5 = (float) Math.PI / 60f; + float num6 = (float) ((double) num5 * (double) drawinfo.drawPlayer.position.X % 6.28318548202515); + for (int index3 = 0; index3 < num4; ++index3) + { + float num7 = (float) ((double) Vector2.UnitY.RotatedBy((double) num6 + (double) num5 * (double) index3).X * ((double) index3 / 30.0) * 2.0); + drawData = new DrawData(TextureAssets.ArmorHead[drawinfo.drawPlayer.head].Value, helmetOffset + new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)) + num7, (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0 - (double) (4 * index3))) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cHead; + drawinfo.DrawDataCache.Add(drawData); + } + } + else if (drawinfo.drawPlayer.head == 265) + { + int verticalFrames = 6; + Texture2D texture2D = TextureAssets.ArmorHead[drawinfo.drawPlayer.head].Value; + Rectangle r = texture2D.Frame(verticalFrames: verticalFrames, frameY: drawinfo.drawPlayer.rabbitOrderFrame.DisplayFrame); + Vector2 origin = r.Size() / 2f; + Vector2 specialHatDrawPosition = PlayerDrawLayers.DrawPlayer_21_Head_GetSpecialHatDrawPosition(ref drawinfo, ref helmetOffset, new Vector2(0.0f, -9f)); + int hatStacks = PlayerDrawLayers.DrawPlayer_21_head_GetHatStacks(ref drawinfo, 5004); + float num8 = (float) Math.PI / 60f; + float num9 = (float) ((double) num8 * (double) drawinfo.drawPlayer.position.X % 6.28318548202515); + int num10 = hatStacks * 4 + 2; + int num11 = 0; + bool flag4 = ((double) Main.GlobalTimeWrappedHourly + 180.0) % 3600.0 < 60.0; + for (int index = num10 - 1; index >= 0; --index) + { + int num12 = 0; + if (index == num10 - 1) + { + r.Y = 0; + num12 = 2; + } + else + r.Y = index != 0 ? r.Height * (num11++ % 4 + 1) : r.Height * 5; + if (!(r.Y == r.Height * 3 & flag4)) + { + float x = (float) ((double) Vector2.UnitY.RotatedBy((double) num9 + (double) num8 * (double) index).X * ((double) index / 10.0) * 4.0 - (double) index * 0.100000001490116 * (double) drawinfo.drawPlayer.direction); + drawData = new DrawData(texture2D, specialHatDrawPosition + new Vector2(x, (float) (index * -4 + num12) * drawinfo.drawPlayer.gravDir), new Rectangle?(r), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, origin, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cHead; + drawinfo.DrawDataCache.Add(drawData); + } + } + } + else + { + drawData = new DrawData(TextureAssets.ArmorHead[drawinfo.drawPlayer.head].Value, helmetOffset + new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cHead; + drawinfo.DrawDataCache.Add(drawData); + if (drawinfo.headGlowMask != -1) + { + if (drawinfo.headGlowMask == 273) + { + for (int index = 0; index < 2; ++index) + { + Vector2 vector2 = new Vector2((float) Main.rand.Next(-10, 10) * 0.125f, (float) Main.rand.Next(-10, 10) * 0.125f); + drawData = new DrawData(TextureAssets.GlowMask[drawinfo.headGlowMask].Value, vector2 + helmetOffset + new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.headGlowColor, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cHead; + drawinfo.DrawDataCache.Add(drawData); + } + } + else + { + drawData = new DrawData(TextureAssets.GlowMask[drawinfo.headGlowMask].Value, helmetOffset + new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.headGlowColor, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cHead; + drawinfo.DrawDataCache.Add(drawData); + } + } + if (drawinfo.drawPlayer.head == 211) + { + Color color = new Color(100, 100, 100, 0); + ulong seed = (ulong) (drawinfo.drawPlayer.miscCounter / 4 + 100); + int num = 4; + for (int index = 0; index < num; ++index) + { + float x = (float) Utils.RandomInt(ref seed, -10, 11) * 0.2f; + float y = (float) Utils.RandomInt(ref seed, -14, 1) * 0.15f; + drawData = new DrawData(TextureAssets.GlowMask[241].Value, helmetOffset + new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect + new Vector2(x, y), new Rectangle?(drawinfo.drawPlayer.bodyFrame), color, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cHead; + drawinfo.DrawDataCache.Add(drawData); + } + } + } + } + } + else if (!drawinfo.drawPlayer.invis && (drawinfo.drawPlayer.face < (sbyte) 0 || !ArmorIDs.Face.Sets.PreventHairDraw[(int) drawinfo.drawPlayer.face])) + { + if (drawinfo.drawPlayer.face == (sbyte) 5) + { + drawData = new DrawData(TextureAssets.AccFace[(int) drawinfo.drawPlayer.face].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cFace; + drawinfo.DrawDataCache.Add(drawData); + } + drawData = new DrawData(TextureAssets.PlayerHair[drawinfo.drawPlayer.hair].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.hairFrame), drawinfo.colorHair, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.hairDyePacked; + drawinfo.DrawDataCache.Add(drawData); + } + if (drawinfo.drawPlayer.head == 205) + { + drawData = new DrawData(TextureAssets.Extra[77].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.skinDyePacked + }; + drawinfo.DrawDataCache.Add(drawData); + } + if (drawinfo.drawPlayer.head == 214 && !drawinfo.drawPlayer.invis) + { + Rectangle bodyFrame = drawinfo.drawPlayer.bodyFrame; + bodyFrame.Y = 0; + float t = (float) drawinfo.drawPlayer.miscCounter / 300f; + Color color = new Color(0, 0, 0, 0); + float from = 0.8f; + float to = 0.9f; + if ((double) t >= (double) from) + color = Color.Lerp(Color.Transparent, new Color(200, 200, 200, 0), Utils.GetLerpValue(from, to, t, true)); + if ((double) t >= (double) to) + color = Color.Lerp(Color.Transparent, new Color(200, 200, 200, 0), Utils.GetLerpValue(1f, to, t, true)); + color *= drawinfo.stealth * (1f - drawinfo.shadow); + drawData = new DrawData(TextureAssets.Extra[90].Value, helmetOffset + new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect - Main.OffsetsPlayerHeadgear[drawinfo.drawPlayer.bodyFrame.Y / drawinfo.drawPlayer.bodyFrame.Height], new Rectangle?(bodyFrame), color, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + if (drawinfo.drawPlayer.head == 137) + { + drawData = new DrawData(TextureAssets.JackHat.Value, helmetOffset + new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.drawPlayer.bodyFrame), new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue), drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + for (int index = 0; index < 7; ++index) + { + Color color = new Color(110 - index * 10, 110 - index * 10, 110 - index * 10, 110 - index * 10); + Vector2 vector2 = new Vector2((float) Main.rand.Next(-10, 11) * 0.2f, (float) Main.rand.Next(-10, 11) * 0.2f); + vector2.X = drawinfo.drawPlayer.itemFlamePos[index].X; + vector2.Y = drawinfo.drawPlayer.itemFlamePos[index].Y; + vector2 *= 0.5f; + drawData = new DrawData(TextureAssets.JackHat.Value, helmetOffset + new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect + vector2, new Rectangle?(drawinfo.drawPlayer.bodyFrame), color, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + } + if (!drawinfo.drawPlayer.babyBird) + return; + Rectangle bodyFrame1 = drawinfo.drawPlayer.bodyFrame; + bodyFrame1.Y = 0; + drawData = new DrawData(TextureAssets.Extra[100].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect + Main.OffsetsPlayerHeadgear[drawinfo.drawPlayer.bodyFrame.Y / drawinfo.drawPlayer.bodyFrame.Height] * drawinfo.drawPlayer.gravDir, new Rectangle?(bodyFrame1), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + + private static int DrawPlayer_21_head_GetHatStacks(ref PlayerDrawSet drawinfo, int hatItemId) + { + int num = 0; + int index1 = 0; + if (drawinfo.drawPlayer.armor[index1] != null && drawinfo.drawPlayer.armor[index1].type == hatItemId && drawinfo.drawPlayer.armor[index1].stack > 0) + num += drawinfo.drawPlayer.armor[index1].stack; + int index2 = 10; + if (drawinfo.drawPlayer.armor[index2] != null && drawinfo.drawPlayer.armor[index2].type == hatItemId && drawinfo.drawPlayer.armor[index2].stack > 0) + num += drawinfo.drawPlayer.armor[index2].stack; + return num; + } + + private static Vector2 DrawPlayer_21_Head_GetSpecialHatDrawPosition( + ref PlayerDrawSet drawinfo, + ref Vector2 helmetOffset, + Vector2 hatOffset) + { + Vector2 vector2 = Main.OffsetsPlayerHeadgear[drawinfo.drawPlayer.bodyFrame.Y / drawinfo.drawPlayer.bodyFrame.Height] * drawinfo.drawPlayer.Directions; + Vector2 vec = (drawinfo.Position - Main.screenPosition + helmetOffset + new Vector2((float) (-drawinfo.drawPlayer.bodyFrame.Width / 2 + drawinfo.drawPlayer.width / 2), (float) (drawinfo.drawPlayer.height - drawinfo.drawPlayer.bodyFrame.Height + 4)) + hatOffset * drawinfo.drawPlayer.Directions + vector2).Floor() + (drawinfo.drawPlayer.headPosition + drawinfo.headVect); + if ((double) drawinfo.drawPlayer.gravDir == -1.0) + vec.Y += 12f; + vec = vec.Floor(); + return vec; + } + + private static void DrawPlayer_21_Head_TheFace(ref PlayerDrawSet drawinfo) + { + bool flag = drawinfo.drawPlayer.head == 38 && drawinfo.drawPlayer.head == 135; + if (drawinfo.drawPlayer.invis || flag) + return; + DrawData drawData1 = new DrawData(TextureAssets.Players[drawinfo.skinVar, 0].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.skinDyePacked; + DrawData drawData2 = drawData1; + drawinfo.DrawDataCache.Add(drawData2); + drawData2 = new DrawData(TextureAssets.Players[drawinfo.skinVar, 1].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorEyeWhites, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData2); + drawData2 = new DrawData(TextureAssets.Players[drawinfo.skinVar, 2].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorEyes, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData2); + Asset player = TextureAssets.Players[drawinfo.skinVar, 15]; + if (player.IsLoaded) + { + Vector2 vector2 = Main.OffsetsPlayerHeadgear[drawinfo.drawPlayer.bodyFrame.Y / drawinfo.drawPlayer.bodyFrame.Height]; + vector2.Y -= 2f; + Rectangle rectangle = player.Frame(verticalFrames: 3, frameY: drawinfo.drawPlayer.eyeHelper.EyeFrameToShow); + drawData1 = new DrawData(player.Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect + vector2, new Rectangle?(rectangle), drawinfo.colorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.skinDyePacked; + DrawData drawData3 = drawData1; + drawinfo.DrawDataCache.Add(drawData3); + } + if (!drawinfo.drawPlayer.yoraiz0rDarkness) + return; + drawData1 = new DrawData(TextureAssets.Extra[67].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.skinDyePacked; + DrawData drawData4 = drawData1; + drawinfo.DrawDataCache.Add(drawData4); + } + + public static void DrawPlayer_22_FaceAcc(ref PlayerDrawSet drawinfo) + { + DrawData drawData; + if (drawinfo.drawPlayer.face > (sbyte) 0 && drawinfo.drawPlayer.face < (sbyte) 16 && drawinfo.drawPlayer.face != (sbyte) 5) + { + if (drawinfo.drawPlayer.face == (sbyte) 7) + { + drawData = new DrawData(TextureAssets.AccFace[(int) drawinfo.drawPlayer.face].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.drawPlayer.bodyFrame), new Color(200, 200, 200, 150), drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cFace; + drawinfo.DrawDataCache.Add(drawData); + } + else + { + drawData = new DrawData(TextureAssets.AccFace[(int) drawinfo.drawPlayer.face].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cFace; + drawinfo.DrawDataCache.Add(drawData); + } + } + if (!drawinfo.drawUnicornHorn) + return; + drawData = new DrawData(TextureAssets.Extra[143].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.headPosition + drawinfo.headVect, new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorArmorHead, drawinfo.drawPlayer.headRotation, drawinfo.headVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cUnicornHorn; + drawinfo.DrawDataCache.Add(drawData); + } + + public static void DrawTiedBalloons(ref PlayerDrawSet drawinfo) + { + if (drawinfo.drawPlayer.mount.Type != 34) + return; + Texture2D texture2D = TextureAssets.Extra[141].Value; + Vector2 vector2 = new Vector2(0.0f, 4f); + Color colorMount = drawinfo.colorMount; + int frameY = (int) ((double) Main.GlobalTimeWrappedHourly * 3.0 + (double) drawinfo.drawPlayer.position.X / 50.0) % 3; + Rectangle rectangle = texture2D.Frame(verticalFrames: 3, frameY: frameY); + Vector2 origin = new Vector2((float) (rectangle.Width / 2), (float) rectangle.Height); + float rotation = (float) (-(double) drawinfo.drawPlayer.velocity.X * 0.100000001490116) - drawinfo.drawPlayer.fullRotation; + DrawData drawData = new DrawData(texture2D, drawinfo.drawPlayer.MountedCenter + vector2 - Main.screenPosition, new Rectangle?(rectangle), colorMount, rotation, origin, 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + + public static void DrawStarboardRainbowTrail( + ref PlayerDrawSet drawinfo, + Vector2 commonWingPosPreFloor, + Vector2 dirsVec) + { + if ((double) drawinfo.shadow != 0.0) + return; + int num1 = Math.Min(drawinfo.drawPlayer.availableAdvancedShadowsCount - 1, 30); + float num2 = 0.0f; + for (int shadowIndex = num1; shadowIndex > 0; --shadowIndex) + { + EntityShadowInfo advancedShadow1 = drawinfo.drawPlayer.GetAdvancedShadow(shadowIndex); + EntityShadowInfo advancedShadow2 = drawinfo.drawPlayer.GetAdvancedShadow(shadowIndex - 1); + num2 += Vector2.Distance(advancedShadow1.Position, advancedShadow2.Position); + } + float num3 = MathHelper.Clamp(num2 / 160f, 0.0f, 1f); + Main.instance.LoadProjectile(250); + Texture2D texture = TextureAssets.Projectile[250].Value; + float x = 1.7f; + Vector2 origin = new Vector2((float) (texture.Width / 2), (float) (texture.Height / 2)); + Vector2 vector2_1 = new Vector2((float) drawinfo.drawPlayer.width, (float) drawinfo.drawPlayer.height) / 2f; + Color white = Color.White; + white.A = (byte) 64; + Vector2 vector2_2 = drawinfo.drawPlayer.DefaultSize * new Vector2(0.5f, 1f) + new Vector2(0.0f, -4f); + for (int shadowIndex = num1; shadowIndex > 0; --shadowIndex) + { + EntityShadowInfo advancedShadow3 = drawinfo.drawPlayer.GetAdvancedShadow(shadowIndex); + EntityShadowInfo advancedShadow4 = drawinfo.drawPlayer.GetAdvancedShadow(shadowIndex - 1); + Vector2 pos1 = advancedShadow3.Position + vector2_2 + advancedShadow3.HeadgearOffset; + Vector2 pos2 = advancedShadow4.Position + vector2_2 + advancedShadow4.HeadgearOffset; + Vector2 vector2_3 = drawinfo.drawPlayer.RotatedRelativePoint(pos1, true, false); + Vector2 vector2_4 = drawinfo.drawPlayer.RotatedRelativePoint(pos2, true, false); + float num4 = (vector2_4 - vector2_3).ToRotation() - 1.570796f; + float rotation = 1.570796f * (float) drawinfo.drawPlayer.direction; + float t = Math.Abs(vector2_4.X - vector2_3.X); + Vector2 scale = new Vector2(x, t / (float) texture.Height); + float num5 = (float) (1.0 - (double) shadowIndex / (double) num1); + float num6 = num5 * num5 * Utils.GetLerpValue(0.0f, 4f, t, true) * 0.5f; + float num7 = num6 * num6; + Color color = white * num7 * num3; + if (!(color == Color.Transparent)) + { + DrawData drawData = new DrawData(texture, vector2_3 - Main.screenPosition, new Rectangle?(), color, rotation, origin, scale, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + for (float amount = 0.25f; (double) amount < 1.0; amount += 0.25f) + { + drawData = new DrawData(texture, Vector2.Lerp(vector2_3, vector2_4, amount) - Main.screenPosition, new Rectangle?(), color, rotation, origin, scale, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cWings; + drawinfo.DrawDataCache.Add(drawData); + } + } + } + } + + public static void DrawMeowcartTrail(ref PlayerDrawSet drawinfo) + { + if (drawinfo.drawPlayer.mount.Type != 33) + return; + int num1 = Math.Min(drawinfo.drawPlayer.availableAdvancedShadowsCount - 1, 20); + float num2 = 0.0f; + for (int shadowIndex = num1; shadowIndex > 0; --shadowIndex) + { + EntityShadowInfo advancedShadow1 = drawinfo.drawPlayer.GetAdvancedShadow(shadowIndex); + EntityShadowInfo advancedShadow2 = drawinfo.drawPlayer.GetAdvancedShadow(shadowIndex - 1); + num2 += Vector2.Distance(advancedShadow1.Position, advancedShadow2.Position); + } + float num3 = MathHelper.Clamp(num2 / 160f, 0.0f, 1f); + Main.instance.LoadProjectile(250); + Texture2D texture = TextureAssets.Projectile[250].Value; + float x = 1.5f; + Vector2 origin = new Vector2((float) (texture.Width / 2), 0.0f); + Vector2 vector2_1 = new Vector2((float) drawinfo.drawPlayer.width, (float) drawinfo.drawPlayer.height) / 2f; + Vector2 vector2_2 = new Vector2((float) (-drawinfo.drawPlayer.direction * 10), 15f); + Color white = Color.White; + white.A = (byte) 127; + Vector2 vector2_3 = vector2_2; + Vector2 vector2_4 = vector2_1 + vector2_3; + Vector2 zero = Vector2.Zero; + Vector2 vector2_5 = drawinfo.drawPlayer.RotatedRelativePoint(drawinfo.drawPlayer.Center + zero + vector2_2) - drawinfo.drawPlayer.position; + for (int shadowIndex = num1; shadowIndex > 0; --shadowIndex) + { + EntityShadowInfo advancedShadow3 = drawinfo.drawPlayer.GetAdvancedShadow(shadowIndex); + EntityShadowInfo advancedShadow4 = drawinfo.drawPlayer.GetAdvancedShadow(shadowIndex - 1); + Vector2 vector2_6 = advancedShadow3.Position + zero; + Vector2 vector2_7 = advancedShadow4.Position + zero; + Vector2 pos1 = vector2_6 + vector2_5; + Vector2 pos2 = vector2_7 + vector2_5; + Vector2 vector2_8 = drawinfo.drawPlayer.RotatedRelativePoint(pos1, true, false); + Vector2 vector2_9 = drawinfo.drawPlayer.RotatedRelativePoint(pos2, true, false); + float rotation = (vector2_9 - vector2_8).ToRotation() - 1.570796f; + float num4 = Vector2.Distance(vector2_8, vector2_9); + Vector2 scale = new Vector2(x, num4 / (float) texture.Height); + float num5 = (float) (1.0 - (double) shadowIndex / (double) num1); + float num6 = num5 * num5; + Color color = white * num6 * num3; + DrawData drawData = new DrawData(texture, vector2_8 - Main.screenPosition, new Rectangle?(), color, rotation, origin, scale, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + } + + public static void DrawPlayer_23_MountFront(ref PlayerDrawSet drawinfo) + { + if (!drawinfo.drawPlayer.mount.Active) + return; + drawinfo.drawPlayer.mount.Draw(drawinfo.DrawDataCache, 2, drawinfo.drawPlayer, drawinfo.Position, drawinfo.colorMount, drawinfo.playerEffect, drawinfo.shadow); + drawinfo.drawPlayer.mount.Draw(drawinfo.DrawDataCache, 3, drawinfo.drawPlayer, drawinfo.Position, drawinfo.colorMount, drawinfo.playerEffect, drawinfo.shadow); + } + + public static void DrawPlayer_24_Pulley(ref PlayerDrawSet drawinfo) + { + if (!drawinfo.drawPlayer.pulley || drawinfo.drawPlayer.itemAnimation != 0) + return; + if (drawinfo.drawPlayer.pulleyDir == (byte) 2) + { + int num1 = -25; + int num2 = 0; + float rotation = 0.0f; + DrawData drawData = new DrawData(TextureAssets.Pulley.Value, new Vector2((float) ((int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X + (double) (drawinfo.drawPlayer.width / 2) - (double) (9 * drawinfo.drawPlayer.direction)) + num2 * drawinfo.drawPlayer.direction), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) (drawinfo.drawPlayer.height / 2) + 2.0 * (double) drawinfo.drawPlayer.gravDir + (double) num1 * (double) drawinfo.drawPlayer.gravDir)), new Rectangle?(new Rectangle(0, TextureAssets.Pulley.Height() / 2 * drawinfo.drawPlayer.pulleyFrame, TextureAssets.Pulley.Width(), TextureAssets.Pulley.Height() / 2)), drawinfo.colorArmorHead, rotation, new Vector2((float) (TextureAssets.Pulley.Width() / 2), (float) (TextureAssets.Pulley.Height() / 4)), 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + else + { + int num3 = -26; + int num4 = 10; + float rotation = 0.35f * (float) -drawinfo.drawPlayer.direction; + DrawData drawData = new DrawData(TextureAssets.Pulley.Value, new Vector2((float) ((int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X + (double) (drawinfo.drawPlayer.width / 2) - (double) (9 * drawinfo.drawPlayer.direction)) + num4 * drawinfo.drawPlayer.direction), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) (drawinfo.drawPlayer.height / 2) + 2.0 * (double) drawinfo.drawPlayer.gravDir + (double) num3 * (double) drawinfo.drawPlayer.gravDir)), new Rectangle?(new Rectangle(0, TextureAssets.Pulley.Height() / 2 * drawinfo.drawPlayer.pulleyFrame, TextureAssets.Pulley.Width(), TextureAssets.Pulley.Height() / 2)), drawinfo.colorArmorHead, rotation, new Vector2((float) (TextureAssets.Pulley.Width() / 2), (float) (TextureAssets.Pulley.Height() / 4)), 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + } + + public static void DrawPlayer_25_Shield(ref PlayerDrawSet drawinfo) + { + if (drawinfo.drawPlayer.shield <= (sbyte) 0 || drawinfo.drawPlayer.shield >= (sbyte) 10) + return; + Vector2 zero1 = Vector2.Zero; + if (drawinfo.drawPlayer.shieldRaised) + zero1.Y -= 4f * drawinfo.drawPlayer.gravDir; + Rectangle bodyFrame = drawinfo.drawPlayer.bodyFrame; + Vector2 zero2 = Vector2.Zero; + Vector2 bodyVect = drawinfo.bodyVect; + if (bodyFrame.Width != TextureAssets.AccShield[(int) drawinfo.drawPlayer.shield].Value.Width) + { + bodyFrame.Width = TextureAssets.AccShield[(int) drawinfo.drawPlayer.shield].Value.Width; + bodyVect.X += (float) (bodyFrame.Width - TextureAssets.AccShield[(int) drawinfo.drawPlayer.shield].Value.Width); + if (drawinfo.playerEffect.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + bodyVect.X = (float) bodyFrame.Width - bodyVect.X; + } + DrawData drawData; + if (drawinfo.drawPlayer.shieldRaised) + { + float num1 = (float) Math.Sin((double) Main.GlobalTimeWrappedHourly * 6.28318548202515); + float x = (float) (2.5 + 1.5 * (double) num1); + Color colorArmorBody = drawinfo.colorArmorBody; + colorArmorBody.A = (byte) 0; + colorArmorBody *= (float) (0.449999988079071 - (double) num1 * 0.150000005960464); + for (float num2 = 0.0f; (double) num2 < 4.0; ++num2) + { + drawData = new DrawData(TextureAssets.AccShield[(int) drawinfo.drawPlayer.shield].Value, zero2 + new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)) + zero1 + new Vector2(x, 0.0f).RotatedBy((double) num2 / 4.0 * 6.28318548202515), new Rectangle?(bodyFrame), colorArmorBody, drawinfo.drawPlayer.bodyRotation, bodyVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cShield; + drawinfo.DrawDataCache.Add(drawData); + } + } + drawData = new DrawData(TextureAssets.AccShield[(int) drawinfo.drawPlayer.shield].Value, zero2 + new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)) + zero1, new Rectangle?(bodyFrame), drawinfo.colorArmorBody, drawinfo.drawPlayer.bodyRotation, bodyVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cShield; + drawinfo.DrawDataCache.Add(drawData); + if (drawinfo.drawPlayer.shieldRaised) + { + Color colorArmorBody = drawinfo.colorArmorBody; + float num = (float) Math.Sin((double) Main.GlobalTimeWrappedHourly * 3.14159274101257); + colorArmorBody.A = (byte) ((double) colorArmorBody.A * (0.5 + 0.5 * (double) num)); + colorArmorBody *= (float) (0.5 + 0.5 * (double) num); + drawData = new DrawData(TextureAssets.AccShield[(int) drawinfo.drawPlayer.shield].Value, zero2 + new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)) + zero1, new Rectangle?(bodyFrame), colorArmorBody, drawinfo.drawPlayer.bodyRotation, bodyVect, 1f, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cShield; + } + if (drawinfo.drawPlayer.shieldRaised && drawinfo.drawPlayer.shieldParryTimeLeft > 0) + { + float num3 = (float) drawinfo.drawPlayer.shieldParryTimeLeft / 20f; + float num4 = 1.5f * num3; + Vector2 vector2_1 = zero2 + new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)) + zero1; + Color colorArmorBody = drawinfo.colorArmorBody; + float num5 = 1f; + Vector2 vector2_2 = drawinfo.Position + drawinfo.drawPlayer.Size / 2f - Main.screenPosition; + Vector2 vector2_3 = vector2_1 - vector2_2; + Vector2 position = vector2_1 + vector2_3 * num4; + float scale = num5 + num4; + colorArmorBody.A = (byte) ((double) colorArmorBody.A * (1.0 - (double) num3)); + Color color = colorArmorBody * (1f - num3); + drawData = new DrawData(TextureAssets.AccShield[(int) drawinfo.drawPlayer.shield].Value, position, new Rectangle?(bodyFrame), color, drawinfo.drawPlayer.bodyRotation, bodyVect, scale, drawinfo.playerEffect, 0); + drawData.shader = drawinfo.cShield; + drawinfo.DrawDataCache.Add(drawData); + } + if (!drawinfo.drawPlayer.mount.Cart) + return; + drawinfo.DrawDataCache.Reverse(drawinfo.DrawDataCache.Count - 2, 2); + } + + public static void DrawPlayer_26_SolarShield(ref PlayerDrawSet drawinfo) + { + if (drawinfo.drawPlayer.solarShields <= 0 || (double) drawinfo.shadow != 0.0 || drawinfo.drawPlayer.dead) + return; + Texture2D texture2D = TextureAssets.Extra[61 + drawinfo.drawPlayer.solarShields - 1].Value; + Color color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue); + float rotation1 = (drawinfo.drawPlayer.solarShieldPos[0] * new Vector2(1f, 0.5f)).ToRotation(); + if (drawinfo.drawPlayer.direction == -1) + rotation1 += 3.141593f; + float rotation2 = rotation1 + 0.06283186f * (float) drawinfo.drawPlayer.direction; + drawinfo.DrawDataCache.Add(new DrawData(texture2D, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) (drawinfo.drawPlayer.height / 2))) + drawinfo.drawPlayer.solarShieldPos[0], new Rectangle?(), color, rotation2, texture2D.Size() / 2f, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.cBody + }); + } + + public static void DrawPlayer_27_HeldItem(ref PlayerDrawSet drawinfo) + { + if (drawinfo.drawPlayer.JustDroppedAnItem) + return; + if (drawinfo.drawPlayer.heldProj >= 0 && (double) drawinfo.shadow == 0.0 && !drawinfo.heldProjOverHand) + drawinfo.projectileDrawPosition = drawinfo.DrawDataCache.Count; + Item heldItem = drawinfo.heldItem; + int index1 = heldItem.type; + if (index1 == 8 && drawinfo.drawPlayer.UsingBiomeTorches) + index1 = drawinfo.drawPlayer.BiomeTorchHoldStyle(index1); + float scale = heldItem.scale; + Main.instance.LoadItem(index1); + Texture2D texture2D1 = TextureAssets.Item[index1].Value; + Vector2 position = new Vector2((float) (int) ((double) drawinfo.ItemLocation.X - (double) Main.screenPosition.X), (float) (int) ((double) drawinfo.ItemLocation.Y - (double) Main.screenPosition.Y)); + Rectangle? sourceRect = new Rectangle?(new Rectangle(0, 0, texture2D1.Width, texture2D1.Height)); + if (index1 == 75) + sourceRect = new Rectangle?(texture2D1.Frame(verticalFrames: 8)); + if (ItemID.Sets.IsFood[index1]) + sourceRect = new Rectangle?(texture2D1.Frame(verticalFrames: 3, frameY: 1)); + drawinfo.itemColor = Lighting.GetColor((int) ((double) drawinfo.Position.X + (double) drawinfo.drawPlayer.width * 0.5) / 16, (int) (((double) drawinfo.Position.Y + (double) drawinfo.drawPlayer.height * 0.5) / 16.0)); + if (index1 == 678) + drawinfo.itemColor = Color.White; + if (drawinfo.drawPlayer.shroomiteStealth && heldItem.ranged) + { + float num1 = drawinfo.drawPlayer.stealth; + if ((double) num1 < 0.03) + num1 = 0.03f; + float num2 = (float) ((1.0 + (double) num1 * 10.0) / 11.0); + drawinfo.itemColor = new Color((int) (byte) ((double) drawinfo.itemColor.R * (double) num1), (int) (byte) ((double) drawinfo.itemColor.G * (double) num1), (int) (byte) ((double) drawinfo.itemColor.B * (double) num2), (int) (byte) ((double) drawinfo.itemColor.A * (double) num1)); + } + if (drawinfo.drawPlayer.setVortex && heldItem.ranged) + { + float num3 = drawinfo.drawPlayer.stealth; + if ((double) num3 < 0.03) + num3 = 0.03f; + double num4 = (1.0 + (double) num3 * 10.0) / 11.0; + drawinfo.itemColor = drawinfo.itemColor.MultiplyRGBA(new Color(Vector4.Lerp(Vector4.One, new Vector4(0.0f, 0.12f, 0.16f, 0.0f), 1f - num3))); + } + bool flag1 = drawinfo.drawPlayer.itemAnimation > 0 && (uint) heldItem.useStyle > 0U; + bool flag2 = heldItem.holdStyle != 0 && !drawinfo.drawPlayer.pulley; + if (!drawinfo.drawPlayer.CanVisuallyHoldItem(heldItem)) + flag2 = false; + if ((double) drawinfo.shadow != 0.0 || drawinfo.drawPlayer.frozen || !(flag1 | flag2) || index1 <= 0 || drawinfo.drawPlayer.dead || heldItem.noUseGraphic || drawinfo.drawPlayer.wet && heldItem.noWet || drawinfo.drawPlayer.happyFunTorchTime && drawinfo.drawPlayer.inventory[drawinfo.drawPlayer.selectedItem].createTile == 4 && drawinfo.drawPlayer.itemAnimation == 0) + return; + string name = drawinfo.drawPlayer.name; + Color color1 = new Color(250, 250, 250, heldItem.alpha); + Vector2 vector2_1 = Vector2.Zero; + if (index1 == 3823) + vector2_1 = new Vector2((float) (7 * drawinfo.drawPlayer.direction), -7f * drawinfo.drawPlayer.gravDir); + if (index1 == 3827) + { + vector2_1 = new Vector2((float) (13 * drawinfo.drawPlayer.direction), -13f * drawinfo.drawPlayer.gravDir); + color1 = heldItem.GetAlpha(drawinfo.itemColor); + color1 = Color.Lerp(color1, Color.White, 0.6f); + color1.A = (byte) 66; + } + Vector2 vector2_2 = new Vector2((float) ((double) sourceRect.Value.Width * 0.5 - (double) sourceRect.Value.Width * 0.5 * (double) drawinfo.drawPlayer.direction), (float) sourceRect.Value.Height); + if (heldItem.useStyle == 9 && drawinfo.drawPlayer.itemAnimation > 0) + { + Vector2 vector2_3 = new Vector2(0.5f, 0.4f); + if (heldItem.type == 5009 || heldItem.type == 5042) + { + vector2_3 = new Vector2(0.26f, 0.5f); + if (drawinfo.drawPlayer.direction == -1) + vector2_3.X = 1f - vector2_3.X; + } + vector2_2 = sourceRect.Value.Size() * vector2_3; + } + if ((double) drawinfo.drawPlayer.gravDir == -1.0) + vector2_2.Y = (float) sourceRect.Value.Height - vector2_2.Y; + Vector2 origin1 = vector2_2 + vector2_1; + float rotation1 = drawinfo.drawPlayer.itemRotation; + if (heldItem.useStyle == 8) + { + ref float local = ref position.X; + double num = (double) local; + int direction = drawinfo.drawPlayer.direction; + local = (float) (num - 0.0); + rotation1 -= 1.570796f * (float) drawinfo.drawPlayer.direction; + origin1.Y = 2f; + origin1.X += (float) (2 * drawinfo.drawPlayer.direction); + } + if (index1 == 425 || index1 == 507) + drawinfo.itemEffect = (double) drawinfo.drawPlayer.gravDir != 1.0 ? (drawinfo.drawPlayer.direction != 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None) : (drawinfo.drawPlayer.direction != 1 ? SpriteEffects.FlipHorizontally | SpriteEffects.FlipVertically : SpriteEffects.FlipVertically); + if ((index1 == 946 || index1 == 4707) && (double) rotation1 != 0.0) + { + position.Y -= 22f * drawinfo.drawPlayer.gravDir; + rotation1 = -1.57f * (float) -drawinfo.drawPlayer.direction * drawinfo.drawPlayer.gravDir; + } + ItemSlot.GetItemLight(ref drawinfo.itemColor, heldItem); + switch (index1) + { + case 3476: + Texture2D texture2D2 = TextureAssets.Extra[64].Value; + Rectangle r1 = texture2D2.Frame(verticalFrames: 9, frameY: (drawinfo.drawPlayer.miscCounter % 54 / 6)); + Vector2 vector2_4 = new Vector2((float) (r1.Width / 2 * drawinfo.drawPlayer.direction), 0.0f); + Vector2 origin2 = r1.Size() / 2f; + DrawData drawData1 = new DrawData(texture2D2, (drawinfo.ItemLocation - Main.screenPosition + vector2_4).Floor(), new Rectangle?(r1), heldItem.GetAlpha(drawinfo.itemColor).MultiplyRGBA(new Color(new Vector4(0.5f, 0.5f, 0.5f, 0.8f))), drawinfo.drawPlayer.itemRotation, origin2, scale, drawinfo.itemEffect, 0); + drawinfo.DrawDataCache.Add(drawData1); + drawData1 = new DrawData(TextureAssets.GlowMask[195].Value, (drawinfo.ItemLocation - Main.screenPosition + vector2_4).Floor(), new Rectangle?(r1), new Color(250, 250, 250, heldItem.alpha) * 0.5f, drawinfo.drawPlayer.itemRotation, origin2, scale, drawinfo.itemEffect, 0); + drawinfo.DrawDataCache.Add(drawData1); + break; + case 3779: + Texture2D texture2D3 = texture2D1; + Rectangle r2 = texture2D3.Frame(); + Vector2 vector2_5 = new Vector2((float) (r2.Width / 2 * drawinfo.drawPlayer.direction), 0.0f); + Vector2 origin3 = r2.Size() / 2f; + Color color2 = new Color(120, 40, 222, 0) * (float) (((double) ((float) ((double) drawinfo.drawPlayer.miscCounter / 75.0 * 6.28318548202515)).ToRotationVector2().X * 1.0 + 0.0) / 2.0 * 0.300000011920929 + 0.850000023841858) * 0.5f; + float num5 = 2f; + DrawData drawData2; + for (float num6 = 0.0f; (double) num6 < 4.0; ++num6) + { + drawData2 = new DrawData(TextureAssets.GlowMask[218].Value, (drawinfo.ItemLocation - Main.screenPosition + vector2_5).Floor() + (num6 * 1.570796f).ToRotationVector2() * num5, new Rectangle?(r2), color2, drawinfo.drawPlayer.itemRotation, origin3, scale, drawinfo.itemEffect, 0); + drawinfo.DrawDataCache.Add(drawData2); + } + drawData2 = new DrawData(texture2D3, (drawinfo.ItemLocation - Main.screenPosition + vector2_5).Floor(), new Rectangle?(r2), heldItem.GetAlpha(drawinfo.itemColor).MultiplyRGBA(new Color(new Vector4(0.5f, 0.5f, 0.5f, 0.8f))), drawinfo.drawPlayer.itemRotation, origin3, scale, drawinfo.itemEffect, 0); + drawinfo.DrawDataCache.Add(drawData2); + break; + case 4049: + Texture2D texture2D4 = TextureAssets.Extra[92].Value; + Rectangle r3 = texture2D4.Frame(verticalFrames: 4, frameY: (drawinfo.drawPlayer.miscCounter % 20 / 5)); + Vector2 vector2_6 = new Vector2((float) (r3.Width / 2 * drawinfo.drawPlayer.direction), 0.0f) + new Vector2((float) (-10 * drawinfo.drawPlayer.direction), 8f * drawinfo.drawPlayer.gravDir); + Vector2 origin4 = r3.Size() / 2f; + DrawData drawData3 = new DrawData(texture2D4, (drawinfo.ItemLocation - Main.screenPosition + vector2_6).Floor(), new Rectangle?(r3), heldItem.GetAlpha(drawinfo.itemColor), drawinfo.drawPlayer.itemRotation, origin4, scale, drawinfo.itemEffect, 0); + drawinfo.DrawDataCache.Add(drawData3); + break; + default: + if (heldItem.useStyle == 5) + { + if (Item.staff[index1]) + { + float rotation2 = drawinfo.drawPlayer.itemRotation + 0.785f * (float) drawinfo.drawPlayer.direction; + int num7 = 0; + int num8 = 0; + Vector2 origin5 = new Vector2(0.0f, (float) texture2D1.Height); + if (index1 == 3210) + { + num7 = 8 * -drawinfo.drawPlayer.direction; + num8 = 2 * (int) drawinfo.drawPlayer.gravDir; + } + if (index1 == 3870) + { + Vector2 vector2_7 = (drawinfo.drawPlayer.itemRotation + 0.7853982f * (float) drawinfo.drawPlayer.direction).ToRotationVector2() * new Vector2((float) -drawinfo.drawPlayer.direction * 1.5f, drawinfo.drawPlayer.gravDir) * 3f; + num7 = (int) vector2_7.X; + num8 = (int) vector2_7.Y; + } + if (index1 == 3787) + num8 = (int) ((double) (8 * (int) drawinfo.drawPlayer.gravDir) * Math.Cos((double) rotation2)); + if ((double) drawinfo.drawPlayer.gravDir == -1.0) + { + if (drawinfo.drawPlayer.direction == -1) + { + rotation2 += 1.57f; + origin5 = new Vector2((float) texture2D1.Width, 0.0f); + num7 -= texture2D1.Width; + } + else + { + rotation2 -= 1.57f; + origin5 = Vector2.Zero; + } + } + else if (drawinfo.drawPlayer.direction == -1) + { + origin5 = new Vector2((float) texture2D1.Width, (float) texture2D1.Height); + num7 -= texture2D1.Width; + } + DrawData drawData4 = new DrawData(texture2D1, new Vector2((float) (int) ((double) drawinfo.ItemLocation.X - (double) Main.screenPosition.X + (double) origin5.X + (double) num7), (float) (int) ((double) drawinfo.ItemLocation.Y - (double) Main.screenPosition.Y + (double) num8)), sourceRect, heldItem.GetAlpha(drawinfo.itemColor), rotation2, origin5, scale, drawinfo.itemEffect, 0); + drawinfo.DrawDataCache.Add(drawData4); + if (index1 != 3870) + break; + drawData4 = new DrawData(TextureAssets.GlowMask[238].Value, new Vector2((float) (int) ((double) drawinfo.ItemLocation.X - (double) Main.screenPosition.X + (double) origin5.X + (double) num7), (float) (int) ((double) drawinfo.ItemLocation.Y - (double) Main.screenPosition.Y + (double) num8)), sourceRect, new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue), rotation2, origin5, scale, drawinfo.itemEffect, 0); + drawinfo.DrawDataCache.Add(drawData4); + break; + } + Vector2 vector2_8 = new Vector2((float) (texture2D1.Width / 2), (float) (texture2D1.Height / 2)); + Vector2 vector2_9 = Main.DrawPlayerItemPos(drawinfo.drawPlayer.gravDir, index1); + int x = (int) vector2_9.X; + vector2_8.Y = vector2_9.Y; + Vector2 origin6 = new Vector2((float) -x, (float) (texture2D1.Height / 2)); + if (drawinfo.drawPlayer.direction == -1) + origin6 = new Vector2((float) (texture2D1.Width + x), (float) (texture2D1.Height / 2)); + DrawData drawData5 = new DrawData(texture2D1, new Vector2((float) (int) ((double) drawinfo.ItemLocation.X - (double) Main.screenPosition.X + (double) vector2_8.X), (float) (int) ((double) drawinfo.ItemLocation.Y - (double) Main.screenPosition.Y + (double) vector2_8.Y)), sourceRect, heldItem.GetAlpha(drawinfo.itemColor), drawinfo.drawPlayer.itemRotation, origin6, scale, drawinfo.itemEffect, 0); + drawinfo.DrawDataCache.Add(drawData5); + if (heldItem.color != new Color()) + { + drawData5 = new DrawData(texture2D1, new Vector2((float) (int) ((double) drawinfo.ItemLocation.X - (double) Main.screenPosition.X + (double) vector2_8.X), (float) (int) ((double) drawinfo.ItemLocation.Y - (double) Main.screenPosition.Y + (double) vector2_8.Y)), sourceRect, heldItem.GetColor(drawinfo.itemColor), drawinfo.drawPlayer.itemRotation, origin6, scale, drawinfo.itemEffect, 0); + drawinfo.DrawDataCache.Add(drawData5); + } + if (heldItem.glowMask != (short) -1) + { + drawData5 = new DrawData(TextureAssets.GlowMask[(int) heldItem.glowMask].Value, new Vector2((float) (int) ((double) drawinfo.ItemLocation.X - (double) Main.screenPosition.X + (double) vector2_8.X), (float) (int) ((double) drawinfo.ItemLocation.Y - (double) Main.screenPosition.Y + (double) vector2_8.Y)), sourceRect, new Color(250, 250, 250, heldItem.alpha), drawinfo.drawPlayer.itemRotation, origin6, scale, drawinfo.itemEffect, 0); + drawinfo.DrawDataCache.Add(drawData5); + } + if (index1 != 3788) + break; + float num9 = (float) ((double) ((float) ((double) drawinfo.drawPlayer.miscCounter / 75.0 * 6.28318548202515)).ToRotationVector2().X * 1.0 + 0.0); + Color color3 = new Color(80, 40, 252, 0) * (float) ((double) num9 / 2.0 * 0.300000011920929 + 0.850000023841858) * 0.5f; + for (float num10 = 0.0f; (double) num10 < 4.0; ++num10) + { + drawData5 = new DrawData(TextureAssets.GlowMask[220].Value, new Vector2((float) (int) ((double) drawinfo.ItemLocation.X - (double) Main.screenPosition.X + (double) vector2_8.X), (float) (int) ((double) drawinfo.ItemLocation.Y - (double) Main.screenPosition.Y + (double) vector2_8.Y)) + (num10 * 1.570796f + drawinfo.drawPlayer.itemRotation).ToRotationVector2() * num9, new Rectangle?(), color3, drawinfo.drawPlayer.itemRotation, origin6, scale, drawinfo.itemEffect, 0); + drawinfo.DrawDataCache.Add(drawData5); + } + break; + } + if ((double) drawinfo.drawPlayer.gravDir == -1.0) + { + DrawData drawData6 = new DrawData(texture2D1, position, sourceRect, heldItem.GetAlpha(drawinfo.itemColor), rotation1, origin1, scale, drawinfo.itemEffect, 0); + drawinfo.DrawDataCache.Add(drawData6); + if (heldItem.color != new Color()) + { + drawData6 = new DrawData(texture2D1, position, sourceRect, heldItem.GetColor(drawinfo.itemColor), rotation1, origin1, scale, drawinfo.itemEffect, 0); + drawinfo.DrawDataCache.Add(drawData6); + } + if (heldItem.glowMask == (short) -1) + break; + drawData6 = new DrawData(TextureAssets.GlowMask[(int) heldItem.glowMask].Value, position, sourceRect, new Color(250, 250, 250, heldItem.alpha), rotation1, origin1, scale, drawinfo.itemEffect, 0); + drawinfo.DrawDataCache.Add(drawData6); + break; + } + DrawData drawData7 = new DrawData(texture2D1, position, sourceRect, heldItem.GetAlpha(drawinfo.itemColor), rotation1, origin1, scale, drawinfo.itemEffect, 0); + drawinfo.DrawDataCache.Add(drawData7); + if (heldItem.color != new Color()) + { + drawData7 = new DrawData(texture2D1, position, sourceRect, heldItem.GetColor(drawinfo.itemColor), rotation1, origin1, scale, drawinfo.itemEffect, 0); + drawinfo.DrawDataCache.Add(drawData7); + } + if (heldItem.glowMask != (short) -1) + { + drawData7 = new DrawData(TextureAssets.GlowMask[(int) heldItem.glowMask].Value, position, sourceRect, color1, rotation1, origin1, scale, drawinfo.itemEffect, 0); + drawinfo.DrawDataCache.Add(drawData7); + } + if (!heldItem.flame) + break; + if ((double) drawinfo.shadow != 0.0) + break; + try + { + Main.instance.LoadItemFlames(index1); + if (!TextureAssets.ItemFlame[index1].IsLoaded) + break; + Color color4 = new Color(100, 100, 100, 0); + int num11 = 7; + float num12 = 1f; + switch (index1) + { + case 3045: + color4 = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, 0); + break; + case 4952: + num11 = 3; + num12 = 0.6f; + color4 = new Color(50, 50, 50, 0); + break; + } + for (int index2 = 0; index2 < num11; ++index2) + { + float num13 = drawinfo.drawPlayer.itemFlamePos[index2].X * scale * num12; + float num14 = drawinfo.drawPlayer.itemFlamePos[index2].Y * scale * num12; + DrawData drawData8 = new DrawData(TextureAssets.ItemFlame[index1].Value, new Vector2((float) (int) ((double) position.X + (double) num13), (float) (int) ((double) position.Y + (double) num14)), sourceRect, color4, rotation1, origin1, scale, drawinfo.itemEffect, 0); + drawinfo.DrawDataCache.Add(drawData8); + } + break; + } + catch + { + break; + } + } + } + + public static void DrawPlayer_28_ArmOverItem(ref PlayerDrawSet drawinfo) + { + if (drawinfo.usesCompositeTorso) + PlayerDrawLayers.DrawPlayer_28_ArmOverItemComposite(ref drawinfo); + else if (drawinfo.drawPlayer.body > 0 && drawinfo.drawPlayer.body < 235) + { + Rectangle bodyFrame = drawinfo.drawPlayer.bodyFrame; + int num1 = drawinfo.armorAdjust; + bodyFrame.X += num1; + bodyFrame.Width -= num1; + if (drawinfo.drawPlayer.direction == -1) + num1 = 0; + if (drawinfo.drawPlayer.invis && (drawinfo.drawPlayer.body == 21 || drawinfo.drawPlayer.body == 22)) + return; + DrawData drawData1; + if (drawinfo.missingHand && !drawinfo.drawPlayer.invis) + { + int body = drawinfo.drawPlayer.body; + DrawData drawData2; + if (drawinfo.missingArm) + { + drawData2 = new DrawData(TextureAssets.Players[drawinfo.skinVar, 7].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorBodySkin, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0); + drawData2.shader = drawinfo.skinDyePacked; + DrawData drawData3 = drawData2; + drawinfo.DrawDataCache.Add(drawData3); + } + drawData2 = new DrawData(TextureAssets.Players[drawinfo.skinVar, 9].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorBodySkin, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0); + drawData2.shader = drawinfo.skinDyePacked; + drawData1 = drawData2; + drawinfo.DrawDataCache.Add(drawData1); + } + drawData1 = new DrawData(TextureAssets.ArmorArm[drawinfo.drawPlayer.body].Value, new Vector2((float) ((int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)) + num1), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(bodyFrame), drawinfo.colorArmorBody, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.cBody; + drawinfo.DrawDataCache.Add(drawData1); + if (drawinfo.armGlowMask != -1) + { + drawData1 = new DrawData(TextureAssets.GlowMask[drawinfo.armGlowMask].Value, new Vector2((float) ((int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)) + num1), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(bodyFrame), drawinfo.armGlowColor, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.cBody; + drawinfo.DrawDataCache.Add(drawData1); + } + if (drawinfo.drawPlayer.body != 205) + return; + Color color = new Color(100, 100, 100, 0); + ulong seed = (ulong) (drawinfo.drawPlayer.miscCounter / 4); + int num2 = 4; + for (int index = 0; index < num2; ++index) + { + float num3 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.2f; + float num4 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.15f; + drawData1 = new DrawData(TextureAssets.GlowMask[240].Value, new Vector2((float) ((int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)) + num1), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2) + num3, (float) (drawinfo.drawPlayer.bodyFrame.Height / 2) + num4), new Rectangle?(bodyFrame), color, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.cBody; + drawinfo.DrawDataCache.Add(drawData1); + } + } + else + { + if (drawinfo.drawPlayer.invis) + return; + DrawData drawData = new DrawData(TextureAssets.Players[drawinfo.skinVar, 7].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorBodySkin, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.skinDyePacked + }; + drawinfo.DrawDataCache.Add(drawData); + drawData = new DrawData(TextureAssets.Players[drawinfo.skinVar, 8].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorUnderShirt, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + drawData = new DrawData(TextureAssets.Players[drawinfo.skinVar, 13].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorShirt, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + } + + public static void DrawPlayer_28_ArmOverItemComposite(ref PlayerDrawSet drawinfo) + { + Vector2 vector2_1 = new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)); + Vector2 vector2_2 = Main.OffsetsPlayerHeadgear[drawinfo.drawPlayer.bodyFrame.Y / drawinfo.drawPlayer.bodyFrame.Height]; + vector2_2.Y -= 2f; + Vector2 vector2_3 = vector2_1 + vector2_2 * (float) -drawinfo.playerEffect.HasFlag((Enum) SpriteEffects.FlipVertically).ToDirectionInt(); + float bodyRotation = drawinfo.drawPlayer.bodyRotation; + float rotation = drawinfo.drawPlayer.bodyRotation + drawinfo.compositeFrontArmRotation; + Vector2 bodyVect = drawinfo.bodyVect; + Vector2 compositeOffsetFrontArm = PlayerDrawLayers.GetCompositeOffset_FrontArm(ref drawinfo); + Vector2 origin = bodyVect + compositeOffsetFrontArm; + Vector2 position1 = vector2_3 + compositeOffsetFrontArm; + Vector2 position2 = position1 + drawinfo.frontShoulderOffset; + if (drawinfo.compFrontArmFrame.X / drawinfo.compFrontArmFrame.Width >= 7) + position1 += new Vector2(drawinfo.playerEffect.HasFlag((Enum) SpriteEffects.FlipHorizontally) ? -1f : 1f, drawinfo.playerEffect.HasFlag((Enum) SpriteEffects.FlipVertically) ? -1f : 1f); + int num1 = drawinfo.drawPlayer.invis ? 1 : 0; + int num2 = drawinfo.drawPlayer.body <= 0 ? 0 : (drawinfo.drawPlayer.body < 235 ? 1 : 0); + int num3 = drawinfo.compShoulderOverFrontArm ? 1 : 0; + int num4 = drawinfo.compShoulderOverFrontArm ? 0 : 1; + int num5 = drawinfo.compShoulderOverFrontArm ? 0 : 1; + bool flag = !drawinfo.hidesTopSkin; + DrawData drawData1; + if (num2 != 0) + { + if (!drawinfo.drawPlayer.invis || PlayerDrawLayers.IsArmorDrawnWhenInvisible(drawinfo.drawPlayer.body)) + { + Texture2D texture = TextureAssets.ArmorBodyComposite[drawinfo.drawPlayer.body].Value; + for (int index = 0; index < 2; ++index) + { + if (((drawinfo.drawPlayer.invis ? 0 : (index == num5 ? 1 : 0)) & (flag ? 1 : 0)) != 0) + { + if (drawinfo.missingArm) + { + List drawDataCache = drawinfo.DrawDataCache; + drawData1 = new DrawData(TextureAssets.Players[drawinfo.skinVar, 7].Value, position1, new Rectangle?(drawinfo.compFrontArmFrame), drawinfo.colorBodySkin, rotation, origin, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.skinDyePacked; + DrawData drawData2 = drawData1; + drawDataCache.Add(drawData2); + } + if (drawinfo.missingHand) + { + List drawDataCache = drawinfo.DrawDataCache; + drawData1 = new DrawData(TextureAssets.Players[drawinfo.skinVar, 9].Value, position1, new Rectangle?(drawinfo.compFrontArmFrame), drawinfo.colorBodySkin, rotation, origin, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.skinDyePacked; + DrawData drawData3 = drawData1; + drawDataCache.Add(drawData3); + } + } + if (index == num3 && !drawinfo.hideCompositeShoulders) + { + ref PlayerDrawSet local = ref drawinfo; + drawData1 = new DrawData(texture, position2, new Rectangle?(drawinfo.compFrontShoulderFrame), drawinfo.colorArmorBody, bodyRotation, origin, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.cBody; + DrawData data = drawData1; + PlayerDrawLayers.DrawCompositeArmorPiece(ref local, CompositePlayerDrawContext.FrontShoulder, data); + } + if (index == num4) + { + ref PlayerDrawSet local = ref drawinfo; + drawData1 = new DrawData(texture, position1, new Rectangle?(drawinfo.compFrontArmFrame), drawinfo.colorArmorBody, rotation, origin, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.cBody; + DrawData data = drawData1; + PlayerDrawLayers.DrawCompositeArmorPiece(ref local, CompositePlayerDrawContext.FrontArm, data); + } + } + } + } + else if (!drawinfo.drawPlayer.invis) + { + for (int index = 0; index < 2; ++index) + { + if (index == num3) + { + if (flag) + { + List drawDataCache = drawinfo.DrawDataCache; + drawData1 = new DrawData(TextureAssets.Players[drawinfo.skinVar, 7].Value, position2, new Rectangle?(drawinfo.compFrontShoulderFrame), drawinfo.colorBodySkin, bodyRotation, origin, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.skinDyePacked; + DrawData drawData4 = drawData1; + drawDataCache.Add(drawData4); + } + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.Players[drawinfo.skinVar, 8].Value, position2, new Rectangle?(drawinfo.compFrontShoulderFrame), drawinfo.colorUnderShirt, bodyRotation, origin, 1f, drawinfo.playerEffect, 0)); + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.Players[drawinfo.skinVar, 13].Value, position2, new Rectangle?(drawinfo.compFrontShoulderFrame), drawinfo.colorShirt, bodyRotation, origin, 1f, drawinfo.playerEffect, 0)); + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.Players[drawinfo.skinVar, 6].Value, position2, new Rectangle?(drawinfo.compFrontShoulderFrame), drawinfo.colorShirt, bodyRotation, origin, 1f, drawinfo.playerEffect, 0)); + } + if (index == num4) + { + if (flag) + { + List drawDataCache = drawinfo.DrawDataCache; + drawData1 = new DrawData(TextureAssets.Players[drawinfo.skinVar, 7].Value, position1, new Rectangle?(drawinfo.compFrontArmFrame), drawinfo.colorBodySkin, rotation, origin, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.skinDyePacked; + DrawData drawData5 = drawData1; + drawDataCache.Add(drawData5); + } + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.Players[drawinfo.skinVar, 8].Value, position1, new Rectangle?(drawinfo.compFrontArmFrame), drawinfo.colorUnderShirt, rotation, origin, 1f, drawinfo.playerEffect, 0)); + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.Players[drawinfo.skinVar, 13].Value, position1, new Rectangle?(drawinfo.compFrontArmFrame), drawinfo.colorShirt, rotation, origin, 1f, drawinfo.playerEffect, 0)); + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.Players[drawinfo.skinVar, 6].Value, position1, new Rectangle?(drawinfo.compFrontArmFrame), drawinfo.colorShirt, rotation, origin, 1f, drawinfo.playerEffect, 0)); + } + } + } + if (drawinfo.drawPlayer.handon <= (sbyte) 0 || drawinfo.drawPlayer.handon >= (sbyte) 22) + return; + Texture2D texture1 = TextureAssets.AccHandsOnComposite[(int) drawinfo.drawPlayer.handon].Value; + ref PlayerDrawSet local1 = ref drawinfo; + drawData1 = new DrawData(texture1, position1, new Rectangle?(drawinfo.compFrontArmFrame), drawinfo.colorArmorBody, rotation, origin, 1f, drawinfo.playerEffect, 0); + drawData1.shader = drawinfo.cHandOn; + DrawData data1 = drawData1; + PlayerDrawLayers.DrawCompositeArmorPiece(ref local1, CompositePlayerDrawContext.FrontArmAccessory, data1); + } + + public static void DrawPlayer_29_OnhandAcc(ref PlayerDrawSet drawinfo) + { + if (drawinfo.usesCompositeFrontHandAcc || drawinfo.drawPlayer.handon <= (sbyte) 0 || drawinfo.drawPlayer.handon >= (sbyte) 22) + return; + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.AccHandsOn[(int) drawinfo.drawPlayer.handon].Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorArmorBody, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.cHandOn + }); + } + + public static void DrawPlayer_30_BladedGlove(ref PlayerDrawSet drawinfo) + { + Item heldItem = drawinfo.heldItem; + if (heldItem.type <= -1 || !Item.claw[heldItem.type] || (double) drawinfo.shadow != 0.0) + return; + Main.instance.LoadItem(heldItem.type); + Asset asset = TextureAssets.Item[heldItem.type]; + if (drawinfo.drawPlayer.frozen || drawinfo.drawPlayer.itemAnimation <= 0 && (heldItem.holdStyle == 0 || drawinfo.drawPlayer.pulley) || heldItem.type <= 0 || drawinfo.drawPlayer.dead || heldItem.noUseGraphic || drawinfo.drawPlayer.wet && heldItem.noWet) + return; + if ((double) drawinfo.drawPlayer.gravDir == -1.0) + { + DrawData drawData = new DrawData(asset.Value, new Vector2((float) (int) ((double) drawinfo.ItemLocation.X - (double) Main.screenPosition.X), (float) (int) ((double) drawinfo.ItemLocation.Y - (double) Main.screenPosition.Y)), new Rectangle?(new Rectangle(0, 0, asset.Width(), asset.Height())), heldItem.GetAlpha(drawinfo.itemColor), drawinfo.drawPlayer.itemRotation, new Vector2((float) ((double) asset.Width() * 0.5 - (double) asset.Width() * 0.5 * (double) drawinfo.drawPlayer.direction), 0.0f), heldItem.scale, drawinfo.itemEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + else + { + DrawData drawData = new DrawData(asset.Value, new Vector2((float) (int) ((double) drawinfo.ItemLocation.X - (double) Main.screenPosition.X), (float) (int) ((double) drawinfo.ItemLocation.Y - (double) Main.screenPosition.Y)), new Rectangle?(new Rectangle(0, 0, asset.Width(), asset.Height())), heldItem.GetAlpha(drawinfo.itemColor), drawinfo.drawPlayer.itemRotation, new Vector2((float) ((double) asset.Width() * 0.5 - (double) asset.Width() * 0.5 * (double) drawinfo.drawPlayer.direction), (float) asset.Height()), heldItem.scale, drawinfo.itemEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + } + + public static void DrawPlayer_31_ProjectileOverArm(ref PlayerDrawSet drawinfo) + { + if (drawinfo.drawPlayer.heldProj < 0 || (double) drawinfo.shadow != 0.0 || !drawinfo.heldProjOverHand) + return; + drawinfo.projectileDrawPosition = drawinfo.DrawDataCache.Count; + } + + public static void DrawPlayer_32_FrontAcc(ref PlayerDrawSet drawinfo) + { + if (drawinfo.backPack || drawinfo.drawPlayer.front <= (sbyte) 0 || drawinfo.drawPlayer.front >= (sbyte) 9 || drawinfo.drawPlayer.mount.Active) + return; + Vector2 zero = Vector2.Zero; + drawinfo.DrawDataCache.Add(new DrawData(TextureAssets.AccFront[(int) drawinfo.drawPlayer.front].Value, zero + new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawinfo.drawPlayer.bodyFrame), drawinfo.colorArmorBody, drawinfo.drawPlayer.bodyRotation, drawinfo.bodyVect, 1f, drawinfo.playerEffect, 0) + { + shader = drawinfo.cFront + }); + } + + public static void DrawPlayer_33_FrozenOrWebbedDebuff(ref PlayerDrawSet drawinfo) + { + if (drawinfo.drawPlayer.frozen && (double) drawinfo.shadow == 0.0) + { + Color colorArmorBody = drawinfo.colorArmorBody; + colorArmorBody.R = (byte) ((double) colorArmorBody.R * 0.55); + colorArmorBody.G = (byte) ((double) colorArmorBody.G * 0.55); + colorArmorBody.B = (byte) ((double) colorArmorBody.B * 0.55); + colorArmorBody.A = (byte) ((double) colorArmorBody.A * 0.55); + DrawData drawData = new DrawData(TextureAssets.Frozen.Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(new Rectangle(0, 0, TextureAssets.Frozen.Width(), TextureAssets.Frozen.Height())), colorArmorBody, drawinfo.drawPlayer.bodyRotation, new Vector2((float) (TextureAssets.Frozen.Width() / 2), (float) (TextureAssets.Frozen.Height() / 2)), 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + else + { + if (!drawinfo.drawPlayer.webbed || (double) drawinfo.shadow != 0.0 || (double) drawinfo.drawPlayer.velocity.Y != 0.0) + return; + Color color = drawinfo.colorArmorBody * 0.75f; + Texture2D texture2D = TextureAssets.Extra[31].Value; + int num = drawinfo.drawPlayer.height / 2; + DrawData drawData = new DrawData(texture2D, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0 + (double) num)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(), color, drawinfo.drawPlayer.bodyRotation, texture2D.Size() / 2f, 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + } + + public static void DrawPlayer_34_ElectrifiedDebuffFront(ref PlayerDrawSet drawinfo) + { + if (!drawinfo.drawPlayer.electrified || (double) drawinfo.shadow != 0.0) + return; + Texture2D texture = TextureAssets.GlowMask[25].Value; + int num1 = drawinfo.drawPlayer.miscCounter / 5; + for (int index = 0; index < 2; ++index) + { + int num2 = num1 % 7; + if (num2 > 1 && num2 < 5) + { + DrawData drawData = new DrawData(texture, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(new Rectangle(0, num2 * texture.Height / 7, texture.Width, texture.Height / 7)), drawinfo.colorElectricity, drawinfo.drawPlayer.bodyRotation, new Vector2((float) (texture.Width / 2), (float) (texture.Height / 14)), 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + num1 = num2 + 3; + } + } + + public static void DrawPlayer_35_IceBarrier(ref PlayerDrawSet drawinfo) + { + if (!drawinfo.drawPlayer.iceBarrier || (double) drawinfo.shadow != 0.0) + return; + int height = TextureAssets.IceBarrier.Height() / 12; + Color white = Color.White; + DrawData drawData = new DrawData(TextureAssets.IceBarrier.Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X - (double) (drawinfo.drawPlayer.bodyFrame.Width / 2) + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - (double) drawinfo.drawPlayer.bodyFrame.Height + 4.0)) + drawinfo.drawPlayer.bodyPosition + new Vector2((float) (drawinfo.drawPlayer.bodyFrame.Width / 2), (float) (drawinfo.drawPlayer.bodyFrame.Height / 2)), new Rectangle?(new Rectangle(0, height * (int) drawinfo.drawPlayer.iceBarrierFrame, TextureAssets.IceBarrier.Width(), height)), white, 0.0f, new Vector2((float) (TextureAssets.Frozen.Width() / 2), (float) (TextureAssets.Frozen.Height() / 2)), 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + + public static void DrawPlayer_36_CTG(ref PlayerDrawSet drawinfo) + { + if ((double) drawinfo.shadow != 0.0 || (byte) drawinfo.drawPlayer.ownedLargeGems <= (byte) 0) + return; + bool flag = false; + BitsByte ownedLargeGems = drawinfo.drawPlayer.ownedLargeGems; + float num1 = 0.0f; + for (int key = 0; key < 7; ++key) + { + if (ownedLargeGems[key]) + ++num1; + } + float num2 = (float) (1.0 - (double) num1 * 0.0599999986588955); + float num3 = (float) (((double) num1 - 1.0) * 4.0); + switch (num1) + { + case 2f: + num3 += 10f; + break; + case 3f: + num3 += 8f; + break; + case 4f: + num3 += 6f; + break; + case 5f: + num3 += 6f; + break; + case 6f: + num3 += 2f; + break; + case 7f: + num3 += 0.0f; + break; + } + float num4 = (float) ((double) drawinfo.drawPlayer.miscCounter / 300.0 * 6.28318548202515); + if ((double) num1 <= 0.0) + return; + float num5 = 6.283185f / num1; + float num6 = 0.0f; + Vector2 vector2 = new Vector2(1.3f, 0.65f); + if (!flag) + vector2 = Vector2.One; + List drawDataList = new List(); + for (int key = 0; key < 7; ++key) + { + if (!ownedLargeGems[key]) + { + ++num6; + } + else + { + Vector2 rotationVector2 = (num4 + num5 * ((float) key - num6)).ToRotationVector2(); + float num7 = num2; + if (flag) + num7 = MathHelper.Lerp(num2 * 0.7f, 1f, (float) ((double) rotationVector2.Y / 2.0 + 0.5)); + Texture2D texture2D = TextureAssets.Gem[key].Value; + DrawData drawData = new DrawData(texture2D, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) drawinfo.drawPlayer.height - 80.0)) + rotationVector2 * vector2 * num3, new Rectangle?(), new Color(250, 250, 250, (int) Main.mouseTextColor / 2), 0.0f, texture2D.Size() / 2f, (float) ((double) Main.mouseTextColor / 1000.0 + 0.800000011920929) * num7, SpriteEffects.None, 0); + drawDataList.Add(drawData); + } + } + if (flag) + drawDataList.Sort(new Comparison(DelegateMethods.CompareDrawSorterByYScale)); + drawinfo.DrawDataCache.AddRange((IEnumerable) drawDataList); + } + + public static void DrawPlayer_37_BeetleBuff(ref PlayerDrawSet drawinfo) + { + if (!drawinfo.drawPlayer.beetleOffense && !drawinfo.drawPlayer.beetleDefense || (double) drawinfo.shadow != 0.0) + return; + for (int index1 = 0; index1 < drawinfo.drawPlayer.beetleOrbs; ++index1) + { + DrawData drawData; + for (int index2 = 0; index2 < 5; ++index2) + { + Color colorArmorBody = drawinfo.colorArmorBody; + float num = 0.5f - (float) index2 * 0.1f; + colorArmorBody.R = (byte) ((double) colorArmorBody.R * (double) num); + colorArmorBody.G = (byte) ((double) colorArmorBody.G * (double) num); + colorArmorBody.B = (byte) ((double) colorArmorBody.B * (double) num); + colorArmorBody.A = (byte) ((double) colorArmorBody.A * (double) num); + Vector2 vector2 = -drawinfo.drawPlayer.beetleVel[index1] * (float) index2; + drawData = new DrawData(TextureAssets.Beetle.Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) (drawinfo.drawPlayer.height / 2))) + drawinfo.drawPlayer.beetlePos[index1] + vector2, new Rectangle?(new Rectangle(0, TextureAssets.Beetle.Height() / 3 * drawinfo.drawPlayer.beetleFrame + 1, TextureAssets.Beetle.Width(), TextureAssets.Beetle.Height() / 3 - 2)), colorArmorBody, 0.0f, new Vector2((float) (TextureAssets.Beetle.Width() / 2), (float) (TextureAssets.Beetle.Height() / 6)), 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + drawData = new DrawData(TextureAssets.Beetle.Value, new Vector2((float) (int) ((double) drawinfo.Position.X - (double) Main.screenPosition.X + (double) (drawinfo.drawPlayer.width / 2)), (float) (int) ((double) drawinfo.Position.Y - (double) Main.screenPosition.Y + (double) (drawinfo.drawPlayer.height / 2))) + drawinfo.drawPlayer.beetlePos[index1], new Rectangle?(new Rectangle(0, TextureAssets.Beetle.Height() / 3 * drawinfo.drawPlayer.beetleFrame + 1, TextureAssets.Beetle.Width(), TextureAssets.Beetle.Height() / 3 - 2)), drawinfo.colorArmorBody, 0.0f, new Vector2((float) (TextureAssets.Beetle.Width() / 2), (float) (TextureAssets.Beetle.Height() / 6)), 1f, drawinfo.playerEffect, 0); + drawinfo.DrawDataCache.Add(drawData); + } + } + + private static Vector2 GetCompositeOffset_BackArm(ref PlayerDrawSet drawinfo) => new Vector2((float) (6 * (drawinfo.playerEffect.HasFlag((Enum) SpriteEffects.FlipHorizontally) ? -1 : 1)), (float) (2 * (drawinfo.playerEffect.HasFlag((Enum) SpriteEffects.FlipVertically) ? -1 : 1))); + + private static Vector2 GetCompositeOffset_FrontArm(ref PlayerDrawSet drawinfo) => new Vector2((float) (-5 * (drawinfo.playerEffect.HasFlag((Enum) SpriteEffects.FlipHorizontally) ? -1 : 1)), 0.0f); + + public static void DrawPlayer_TransformDrawData(ref PlayerDrawSet drawinfo) + { + double rotation = (double) drawinfo.rotation; + Vector2 vector2_1 = drawinfo.Position - Main.screenPosition + drawinfo.rotationOrigin; + Vector2 vector2_2 = drawinfo.drawPlayer.position + drawinfo.rotationOrigin; + Matrix rotationZ = Matrix.CreateRotationZ(drawinfo.rotation); + for (int index = 0; index < drawinfo.DustCache.Count; ++index) + { + Vector2 vector2_3 = Vector2.Transform(Main.dust[drawinfo.DustCache[index]].position - vector2_2, rotationZ); + Main.dust[drawinfo.DustCache[index]].position = vector2_3 + vector2_2; + } + for (int index = 0; index < drawinfo.GoreCache.Count; ++index) + { + Vector2 vector2_4 = Vector2.Transform(Main.gore[drawinfo.GoreCache[index]].position - vector2_2, rotationZ); + Main.gore[drawinfo.GoreCache[index]].position = vector2_4 + vector2_2; + } + for (int index = 0; index < drawinfo.DrawDataCache.Count; ++index) + { + DrawData drawData = drawinfo.DrawDataCache[index]; + if (!drawData.ignorePlayerRotation) + { + Vector2 vector2_5 = Vector2.Transform(drawData.position - vector2_1, rotationZ); + drawData.position = vector2_5 + vector2_1; + drawData.rotation += drawinfo.rotation; + drawinfo.DrawDataCache[index] = drawData; + } + } + } + + public static void DrawPlayer_ScaleDrawData(ref PlayerDrawSet drawinfo, float scale) + { + if ((double) scale == 1.0) + return; + Vector2 vector2_1 = drawinfo.Position + drawinfo.drawPlayer.Size * new Vector2(0.5f, 1f) - Main.screenPosition; + for (int index = 0; index < drawinfo.DrawDataCache.Count; ++index) + { + DrawData drawData = drawinfo.DrawDataCache[index]; + Vector2 vector2_2 = drawData.position - vector2_1; + drawData.position = vector2_1 + vector2_2 * scale; + drawData.scale *= scale; + drawinfo.DrawDataCache[index] = drawData; + } + } + + public static void DrawPlayer_AddSelectionGlow(ref PlayerDrawSet drawinfo) + { + if (drawinfo.selectionGlowColor == Color.Transparent) + return; + Color selectionGlowColor = drawinfo.selectionGlowColor; + List drawDataList = new List(); + drawDataList.AddRange((IEnumerable) PlayerDrawLayers.GetFlatColoredCloneData(ref drawinfo, new Vector2(0.0f, -2f), selectionGlowColor)); + drawDataList.AddRange((IEnumerable) PlayerDrawLayers.GetFlatColoredCloneData(ref drawinfo, new Vector2(0.0f, 2f), selectionGlowColor)); + drawDataList.AddRange((IEnumerable) PlayerDrawLayers.GetFlatColoredCloneData(ref drawinfo, new Vector2(2f, 0.0f), selectionGlowColor)); + drawDataList.AddRange((IEnumerable) PlayerDrawLayers.GetFlatColoredCloneData(ref drawinfo, new Vector2(-2f, 0.0f), selectionGlowColor)); + drawDataList.AddRange((IEnumerable) drawinfo.DrawDataCache); + drawinfo.DrawDataCache = drawDataList; + } + + public static void DrawPlayer_MakeIntoFirstFractalAfterImage(ref PlayerDrawSet drawinfo) + { + if (!drawinfo.drawPlayer.isFirstFractalAfterImage) + { + int num = drawinfo.drawPlayer.HeldItem.type != 4722 ? 0 : (drawinfo.drawPlayer.itemAnimation > 0 ? 1 : 0); + } + else + { + for (int index = 0; index < drawinfo.DrawDataCache.Count; ++index) + { + DrawData drawData = drawinfo.DrawDataCache[index]; + drawData.color *= drawinfo.drawPlayer.firstFractalAfterImageOpacity; + drawData.color.A = (byte) ((double) drawData.color.A * 0.800000011920929); + drawinfo.DrawDataCache[index] = drawData; + } + } + } + + public static void DrawPlayer_RenderAllLayers(ref PlayerDrawSet drawinfo) + { + int num = -1; + List drawDataCache = drawinfo.DrawDataCache; + Effect pixelShader = Main.pixelShader; + Projectile[] projectile = Main.projectile; + SpriteBatch spriteBatch = Main.spriteBatch; + for (int index = 0; index <= drawDataCache.Count; ++index) + { + if (drawinfo.projectileDrawPosition == index) + { + projectile[drawinfo.drawPlayer.heldProj].gfxOffY = drawinfo.drawPlayer.gfxOffY; + if (num != 0) + { + pixelShader.CurrentTechnique.Passes[0].Apply(); + num = 0; + } + try + { + Main.instance.DrawProj(drawinfo.drawPlayer.heldProj); + } + catch + { + projectile[drawinfo.drawPlayer.heldProj].active = false; + } + } + if (index != drawDataCache.Count) + { + DrawData cdd = drawDataCache[index]; + if (!cdd.sourceRect.HasValue) + cdd.sourceRect = new Rectangle?(cdd.texture.Frame()); + PlayerDrawHelper.SetShaderForData(drawinfo.drawPlayer, drawinfo.cHead, ref cdd); + num = cdd.shader; + if (cdd.texture != null) + cdd.Draw(spriteBatch); + } + } + pixelShader.CurrentTechnique.Passes[0].Apply(); + } + + public static void DrawPlayer_DrawSelectionRect(ref PlayerDrawSet drawinfo) + { + Vector2 lowest; + Vector2 highest; + SpriteRenderTargetHelper.GetDrawBoundary(drawinfo.DrawDataCache, out lowest, out highest); + Utils.DrawRect(Main.spriteBatch, lowest + Main.screenPosition, highest + Main.screenPosition, Color.White); + } + + private static bool IsArmorDrawnWhenInvisible(int torsoID) + { + switch (torsoID) + { + case 21: + case 22: + return false; + default: + return true; + } + } + + private static DrawData[] GetFlatColoredCloneData( + ref PlayerDrawSet drawinfo, + Vector2 offset, + Color color) + { + int colorOnlyShaderIndex = ContentSamples.CommonlyUsedContentSamples.ColorOnlyShaderIndex; + DrawData[] drawDataArray = new DrawData[drawinfo.DrawDataCache.Count]; + for (int index = 0; index < drawinfo.DrawDataCache.Count; ++index) + { + DrawData drawData = drawinfo.DrawDataCache[index]; + drawData.position += offset; + drawData.shader = colorOnlyShaderIndex; + drawData.color = color; + drawDataArray[index] = drawData; + } + return drawDataArray; + } + } +} diff --git a/DataStructures/PlayerDrawSet.cs b/DataStructures/PlayerDrawSet.cs new file mode 100644 index 0000000..7b32855 --- /dev/null +++ b/DataStructures/PlayerDrawSet.cs @@ -0,0 +1,1554 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.PlayerDrawSet +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using Terraria.GameContent.Golf; +using Terraria.Graphics.Shaders; +using Terraria.ID; + +namespace Terraria.DataStructures +{ + public struct PlayerDrawSet + { + public List DrawDataCache; + public List DustCache; + public List GoreCache; + public Player drawPlayer; + public float shadow; + public Vector2 Position; + public int projectileDrawPosition; + public Vector2 ItemLocation; + public int armorAdjust; + public bool missingHand; + public bool missingArm; + public bool heldProjOverHand; + public int skinVar; + public bool fullHair; + public bool drawsBackHairWithoutHeadgear; + public bool hatHair; + public bool hideHair; + public int hairDyePacked; + public int skinDyePacked; + public float mountOffSet; + public int cHead; + public int cBody; + public int cLegs; + public int cHandOn; + public int cHandOff; + public int cBack; + public int cFront; + public int cShoe; + public int cWaist; + public int cShield; + public int cNeck; + public int cFace; + public int cBalloon; + public int cWings; + public int cCarpet; + public int cPortableStool; + public int cFloatingTube; + public int cUnicornHorn; + public int cLeinShampoo; + public SpriteEffects playerEffect; + public SpriteEffects itemEffect; + public Color colorHair; + public Color colorEyeWhites; + public Color colorEyes; + public Color colorHead; + public Color colorBodySkin; + public Color colorLegs; + public Color colorShirt; + public Color colorUnderShirt; + public Color colorPants; + public Color colorShoes; + public Color colorArmorHead; + public Color colorArmorBody; + public Color colorMount; + public Color colorArmorLegs; + public Color colorElectricity; + public int headGlowMask; + public int bodyGlowMask; + public int armGlowMask; + public int legsGlowMask; + public Color headGlowColor; + public Color bodyGlowColor; + public Color armGlowColor; + public Color legsGlowColor; + public Color ArkhalisColor; + public float stealth; + public Vector2 legVect; + public Vector2 bodyVect; + public Vector2 headVect; + public Color selectionGlowColor; + public float torsoOffset; + public bool hidesTopSkin; + public bool hidesBottomSkin; + public float rotation; + public Vector2 rotationOrigin; + public Rectangle hairFrame; + public bool backHairDraw; + public bool backPack; + public Color itemColor; + public bool usesCompositeTorso; + public bool usesCompositeFrontHandAcc; + public bool usesCompositeBackHandAcc; + public bool compShoulderOverFrontArm; + public Rectangle compBackShoulderFrame; + public Rectangle compFrontShoulderFrame; + public Rectangle compBackArmFrame; + public Rectangle compFrontArmFrame; + public Rectangle compTorsoFrame; + public float compositeBackArmRotation; + public float compositeFrontArmRotation; + public bool hideCompositeShoulders; + public Vector2 frontShoulderOffset; + public Vector2 backShoulderOffset; + public WeaponDrawOrder weaponDrawOrder; + public bool weaponOverFrontArm; + public bool isSitting; + public bool isSleeping; + public float seatYOffset; + public int sittingIndex; + public bool drawFrontAccInNeckAccLayer; + public Item heldItem; + public bool drawFloatingTube; + public bool drawUnicornHorn; + public Color floatingTubeColor; + public Vector2 helmetOffset; + + public Vector2 Center => new Vector2(this.Position.X + (float) (this.drawPlayer.width / 2), this.Position.Y + (float) (this.drawPlayer.height / 2)); + + public void BoringSetup( + Player player, + List drawData, + List dust, + List gore, + Vector2 drawPosition, + float shadowOpacity, + float rotation, + Vector2 rotationOrigin) + { + this.DrawDataCache = drawData; + this.DustCache = dust; + this.GoreCache = gore; + this.drawPlayer = player; + this.shadow = shadowOpacity; + this.rotation = rotation; + this.rotationOrigin = rotationOrigin; + this.heldItem = player.lastVisualizedSelectedItem; + this.cHead = this.drawPlayer.cHead; + this.cBody = this.drawPlayer.cBody; + this.cLegs = this.drawPlayer.cLegs; + if (this.drawPlayer.wearsRobe) + this.cLegs = this.cBody; + this.cHandOn = this.drawPlayer.cHandOn; + this.cHandOff = this.drawPlayer.cHandOff; + this.cBack = this.drawPlayer.cBack; + this.cFront = this.drawPlayer.cFront; + this.cShoe = this.drawPlayer.cShoe; + this.cWaist = this.drawPlayer.cWaist; + this.cShield = this.drawPlayer.cShield; + this.cNeck = this.drawPlayer.cNeck; + this.cFace = this.drawPlayer.cFace; + this.cBalloon = this.drawPlayer.cBalloon; + this.cWings = this.drawPlayer.cWings; + this.cCarpet = this.drawPlayer.cCarpet; + this.cPortableStool = this.drawPlayer.cPortalbeStool; + this.cFloatingTube = this.drawPlayer.cFloatingTube; + this.cUnicornHorn = this.drawPlayer.cUnicornHorn; + this.cLeinShampoo = this.drawPlayer.cLeinShampoo; + this.isSitting = this.drawPlayer.sitting.isSitting; + this.seatYOffset = 0.0f; + this.sittingIndex = 0; + Vector2 posOffset1 = Vector2.Zero; + this.drawPlayer.sitting.GetSittingOffsetInfo(this.drawPlayer, out posOffset1, out this.seatYOffset); + if (this.isSitting) + this.sittingIndex = this.drawPlayer.sitting.sittingIndex; + if (this.drawPlayer.mount.Active && this.drawPlayer.mount.Type == 17) + this.isSitting = true; + if (this.drawPlayer.mount.Active && this.drawPlayer.mount.Type == 23) + this.isSitting = true; + if (this.drawPlayer.mount.Active && this.drawPlayer.mount.Type == 45) + this.isSitting = true; + this.isSleeping = this.drawPlayer.sleeping.isSleeping; + this.Position = drawPosition; + if (this.isSitting) + { + this.torsoOffset = this.seatYOffset; + this.Position += posOffset1; + } + else + this.sittingIndex = -1; + if (this.isSleeping) + { + this.rotationOrigin = player.Size / 2f; + Vector2 posOffset2; + this.drawPlayer.sleeping.GetSleepingOffsetInfo(this.drawPlayer, out posOffset2); + this.Position += posOffset2; + } + this.weaponDrawOrder = WeaponDrawOrder.BehindFrontArm; + if (this.heldItem.type == 4952) + this.weaponDrawOrder = WeaponDrawOrder.BehindBackArm; + if (GolfHelper.IsPlayerHoldingClub(player) && player.itemAnimation > player.itemAnimationMax) + this.weaponDrawOrder = WeaponDrawOrder.OverFrontArm; + this.projectileDrawPosition = -1; + this.ItemLocation = this.Position + (this.drawPlayer.itemLocation - this.drawPlayer.position); + this.armorAdjust = 0; + this.missingHand = false; + this.missingArm = false; + this.heldProjOverHand = false; + this.skinVar = this.drawPlayer.skinVariant; + if (this.drawPlayer.body == 77 || this.drawPlayer.body == 103 || this.drawPlayer.body == 41 || this.drawPlayer.body == 100 || this.drawPlayer.body == 10 || this.drawPlayer.body == 11 || this.drawPlayer.body == 12 || this.drawPlayer.body == 13 || this.drawPlayer.body == 14 || this.drawPlayer.body == 43 || this.drawPlayer.body == 15 || this.drawPlayer.body == 16 || this.drawPlayer.body == 20 || this.drawPlayer.body == 39 || this.drawPlayer.body == 50 || this.drawPlayer.body == 38 || this.drawPlayer.body == 40 || this.drawPlayer.body == 57 || this.drawPlayer.body == 44 || this.drawPlayer.body == 52 || this.drawPlayer.body == 53 || this.drawPlayer.body == 68 || this.drawPlayer.body == 81 || this.drawPlayer.body == 85 || this.drawPlayer.body == 88 || this.drawPlayer.body == 98 || this.drawPlayer.body == 86 || this.drawPlayer.body == 87 || this.drawPlayer.body == 99 || this.drawPlayer.body == 165 || this.drawPlayer.body == 166 || this.drawPlayer.body == 167 || this.drawPlayer.body == 171 || this.drawPlayer.body == 45 || this.drawPlayer.body == 168 || this.drawPlayer.body == 169 || this.drawPlayer.body == 42 || this.drawPlayer.body == 180 || this.drawPlayer.body == 181 || this.drawPlayer.body == 183 || this.drawPlayer.body == 186 || this.drawPlayer.body == 187 || this.drawPlayer.body == 188 || this.drawPlayer.body == 64 || this.drawPlayer.body == 189 || this.drawPlayer.body == 191 || this.drawPlayer.body == 192 || this.drawPlayer.body == 198 || this.drawPlayer.body == 199 || this.drawPlayer.body == 202 || this.drawPlayer.body == 203 || this.drawPlayer.body == 58 || this.drawPlayer.body == 59 || this.drawPlayer.body == 60 || this.drawPlayer.body == 61 || this.drawPlayer.body == 62 || this.drawPlayer.body == 63 || this.drawPlayer.body == 36 || this.drawPlayer.body == 104 || this.drawPlayer.body == 184 || this.drawPlayer.body == 74 || this.drawPlayer.body == 78 || this.drawPlayer.body == 185 || this.drawPlayer.body == 196 || this.drawPlayer.body == 197 || this.drawPlayer.body == 182 || this.drawPlayer.body == 87 || this.drawPlayer.body == 76 || this.drawPlayer.body == 209 || this.drawPlayer.body == 168 || this.drawPlayer.body == 210 || this.drawPlayer.body == 211 || this.drawPlayer.body == 213) + this.missingHand = true; + this.missingArm = this.drawPlayer.body != 83; + if (this.drawPlayer.heldProj >= 0 && (double) this.shadow == 0.0) + { + switch (Main.projectile[this.drawPlayer.heldProj].type) + { + case 460: + case 535: + case 600: + this.heldProjOverHand = true; + break; + } + } + this.drawPlayer.GetHairSettings(out this.fullHair, out this.hatHair, out this.hideHair, out this.backHairDraw, out this.drawsBackHairWithoutHeadgear); + this.hairDyePacked = PlayerDrawHelper.PackShader((int) this.drawPlayer.hairDye, PlayerDrawHelper.ShaderConfiguration.HairShader); + if (this.drawPlayer.head == 0 && this.drawPlayer.hairDye == (byte) 0) + this.hairDyePacked = PlayerDrawHelper.PackShader(1, PlayerDrawHelper.ShaderConfiguration.HairShader); + this.skinDyePacked = player.skinDyePacked; + if (this.drawPlayer.isDisplayDollOrInanimate) + { + Point tileCoordinates = this.Center.ToTileCoordinates(); + bool actuallySelected; + if (Main.InSmartCursorHighlightArea(tileCoordinates.X, tileCoordinates.Y, out actuallySelected)) + { + Color color = Lighting.GetColor(tileCoordinates.X, tileCoordinates.Y); + int averageTileLighting = ((int) color.R + (int) color.G + (int) color.B) / 3; + if (averageTileLighting > 10) + this.selectionGlowColor = Colors.GetSelectionGlowColor(actuallySelected, averageTileLighting); + } + } + this.mountOffSet = this.drawPlayer.HeightOffsetVisual; + this.Position.Y -= this.mountOffSet; + Mount.currentShader = !this.drawPlayer.mount.Active ? 0 : (this.drawPlayer.mount.Cart ? this.drawPlayer.cMinecart : this.drawPlayer.cMount); + this.playerEffect = SpriteEffects.None; + this.itemEffect = SpriteEffects.FlipHorizontally; + this.colorHair = this.drawPlayer.GetImmuneAlpha(this.drawPlayer.GetHairColor(), this.shadow); + this.colorEyeWhites = this.drawPlayer.GetImmuneAlpha(Lighting.GetColor((int) ((double) this.Position.X + (double) this.drawPlayer.width * 0.5) / 16, (int) (((double) this.Position.Y + (double) this.drawPlayer.height * 0.25) / 16.0), Color.White), this.shadow); + this.colorEyes = this.drawPlayer.GetImmuneAlpha(Lighting.GetColor((int) ((double) this.Position.X + (double) this.drawPlayer.width * 0.5) / 16, (int) (((double) this.Position.Y + (double) this.drawPlayer.height * 0.25) / 16.0), this.drawPlayer.eyeColor), this.shadow); + this.colorHead = this.drawPlayer.GetImmuneAlpha(Lighting.GetColor((int) ((double) this.Position.X + (double) this.drawPlayer.width * 0.5) / 16, (int) (((double) this.Position.Y + (double) this.drawPlayer.height * 0.25) / 16.0), this.drawPlayer.skinColor), this.shadow); + this.colorBodySkin = this.drawPlayer.GetImmuneAlpha(Lighting.GetColor((int) ((double) this.Position.X + (double) this.drawPlayer.width * 0.5) / 16, (int) (((double) this.Position.Y + (double) this.drawPlayer.height * 0.5) / 16.0), this.drawPlayer.skinColor), this.shadow); + this.colorLegs = this.drawPlayer.GetImmuneAlpha(Lighting.GetColor((int) ((double) this.Position.X + (double) this.drawPlayer.width * 0.5) / 16, (int) (((double) this.Position.Y + (double) this.drawPlayer.height * 0.75) / 16.0), this.drawPlayer.skinColor), this.shadow); + this.colorShirt = this.drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int) ((double) this.Position.X + (double) this.drawPlayer.width * 0.5) / 16, (int) (((double) this.Position.Y + (double) this.drawPlayer.height * 0.5) / 16.0), this.drawPlayer.shirtColor), this.shadow); + this.colorUnderShirt = this.drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int) ((double) this.Position.X + (double) this.drawPlayer.width * 0.5) / 16, (int) (((double) this.Position.Y + (double) this.drawPlayer.height * 0.5) / 16.0), this.drawPlayer.underShirtColor), this.shadow); + this.colorPants = this.drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int) ((double) this.Position.X + (double) this.drawPlayer.width * 0.5) / 16, (int) (((double) this.Position.Y + (double) this.drawPlayer.height * 0.75) / 16.0), this.drawPlayer.pantsColor), this.shadow); + this.colorShoes = this.drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int) ((double) this.Position.X + (double) this.drawPlayer.width * 0.5) / 16, (int) (((double) this.Position.Y + (double) this.drawPlayer.height * 0.75) / 16.0), this.drawPlayer.shoeColor), this.shadow); + this.colorArmorHead = this.drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int) ((double) this.Position.X + (double) this.drawPlayer.width * 0.5) / 16, (int) ((double) this.Position.Y + (double) this.drawPlayer.height * 0.25) / 16, Color.White), this.shadow); + this.colorArmorBody = this.drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int) ((double) this.Position.X + (double) this.drawPlayer.width * 0.5) / 16, (int) ((double) this.Position.Y + (double) this.drawPlayer.height * 0.5) / 16, Color.White), this.shadow); + this.colorMount = this.colorArmorBody; + this.colorArmorLegs = this.drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int) ((double) this.Position.X + (double) this.drawPlayer.width * 0.5) / 16, (int) ((double) this.Position.Y + (double) this.drawPlayer.height * 0.75) / 16, Color.White), this.shadow); + this.floatingTubeColor = this.drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int) ((double) this.Position.X + (double) this.drawPlayer.width * 0.5) / 16, (int) ((double) this.Position.Y + (double) this.drawPlayer.height * 0.75) / 16, Color.White), this.shadow); + this.colorElectricity = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 100); + int num1 = 0; + int num2 = 0; + int num3 = 0; + int num4 = 0; + this.headGlowMask = -1; + this.bodyGlowMask = -1; + this.armGlowMask = -1; + this.legsGlowMask = -1; + this.headGlowColor = Color.Transparent; + this.bodyGlowColor = Color.Transparent; + this.armGlowColor = Color.Transparent; + this.legsGlowColor = Color.Transparent; + switch (this.drawPlayer.head) + { + case 169: + ++num1; + break; + case 170: + ++num2; + break; + case 171: + ++num3; + break; + case 189: + ++num4; + break; + } + switch (this.drawPlayer.body) + { + case 175: + ++num1; + break; + case 176: + ++num2; + break; + case 177: + ++num3; + break; + case 190: + ++num4; + break; + } + switch (this.drawPlayer.legs) + { + case 110: + int num5 = num1 + 1; + break; + case 111: + int num6 = num2 + 1; + break; + case 112: + int num7 = num3 + 1; + break; + case 130: + int num8 = num4 + 1; + break; + } + int num9 = 3; + int num10 = 3; + int num11 = 3; + int num12 = 3; + this.ArkhalisColor = this.drawPlayer.underShirtColor; + this.ArkhalisColor.A = (byte) 180; + if (this.drawPlayer.head == 169) + { + this.headGlowMask = 15; + byte num13 = (byte) (62.5 * (double) (1 + num9)); + this.headGlowColor = new Color((int) num13, (int) num13, (int) num13, 0); + } + else if (this.drawPlayer.head == 216) + { + this.headGlowMask = 256; + byte num14 = 127; + this.headGlowColor = new Color((int) num14, (int) num14, (int) num14, 0); + } + else if (this.drawPlayer.head == 210) + { + this.headGlowMask = 242; + byte num15 = 127; + this.headGlowColor = new Color((int) num15, (int) num15, (int) num15, 0); + } + else if (this.drawPlayer.head == 214) + { + this.headGlowMask = 245; + this.headGlowColor = this.ArkhalisColor; + } + else if (this.drawPlayer.head == 240) + { + this.headGlowMask = 273; + this.headGlowColor = new Color(230, 230, 230, 60); + } + else if (this.drawPlayer.head == 170) + { + this.headGlowMask = 16; + byte num16 = (byte) (62.5 * (double) (1 + num10)); + this.headGlowColor = new Color((int) num16, (int) num16, (int) num16, 0); + } + else if (this.drawPlayer.head == 189) + { + this.headGlowMask = 184; + byte num17 = (byte) (62.5 * (double) (1 + num12)); + this.headGlowColor = new Color((int) num17, (int) num17, (int) num17, 0); + this.colorArmorHead = this.drawPlayer.GetImmuneAlphaPure(new Color((int) num17, (int) num17, (int) num17, (int) byte.MaxValue), this.shadow); + } + else if (this.drawPlayer.head == 171) + { + byte num18 = (byte) (62.5 * (double) (1 + num11)); + this.colorArmorHead = this.drawPlayer.GetImmuneAlphaPure(new Color((int) num18, (int) num18, (int) num18, (int) byte.MaxValue), this.shadow); + } + else if (this.drawPlayer.head == 175) + { + this.headGlowMask = 41; + this.headGlowColor = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + } + else if (this.drawPlayer.head == 193) + { + this.headGlowMask = 209; + this.headGlowColor = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue); + } + else if (this.drawPlayer.head == 109) + { + this.headGlowMask = 208; + this.headGlowColor = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + } + else if (this.drawPlayer.head == 178) + { + this.headGlowMask = 96; + this.headGlowColor = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + } + if (this.drawPlayer.body == 175) + { + this.bodyGlowMask = !this.drawPlayer.Male ? 18 : 13; + byte num19 = (byte) (62.5 * (double) (1 + num9)); + this.bodyGlowColor = new Color((int) num19, (int) num19, (int) num19, 0); + } + else if (this.drawPlayer.body == 208) + { + this.bodyGlowMask = !this.drawPlayer.Male ? 247 : 246; + this.armGlowMask = 248; + this.bodyGlowColor = this.ArkhalisColor; + this.armGlowColor = this.ArkhalisColor; + } + else if (this.drawPlayer.body == 227) + { + this.bodyGlowColor = new Color(230, 230, 230, 60); + this.armGlowColor = new Color(230, 230, 230, 60); + } + else if (this.drawPlayer.body == 190) + { + this.bodyGlowMask = !this.drawPlayer.Male ? 186 : 185; + this.armGlowMask = 188; + byte num20 = (byte) (62.5 * (double) (1 + num12)); + this.bodyGlowColor = new Color((int) num20, (int) num20, (int) num20, 0); + this.armGlowColor = new Color((int) num20, (int) num20, (int) num20, 0); + this.colorArmorBody = this.drawPlayer.GetImmuneAlphaPure(new Color((int) num20, (int) num20, (int) num20, (int) byte.MaxValue), this.shadow); + } + else if (this.drawPlayer.body == 176) + { + this.bodyGlowMask = !this.drawPlayer.Male ? 19 : 14; + this.armGlowMask = 12; + byte num21 = (byte) (62.5 * (double) (1 + num10)); + this.bodyGlowColor = new Color((int) num21, (int) num21, (int) num21, 0); + this.armGlowColor = new Color((int) num21, (int) num21, (int) num21, 0); + } + else if (this.drawPlayer.body == 194) + { + this.bodyGlowMask = 210; + this.armGlowMask = 211; + this.bodyGlowColor = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue); + this.armGlowColor = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue); + } + else if (this.drawPlayer.body == 177) + { + byte num22 = (byte) (62.5 * (double) (1 + num11)); + this.colorArmorBody = this.drawPlayer.GetImmuneAlphaPure(new Color((int) num22, (int) num22, (int) num22, (int) byte.MaxValue), this.shadow); + } + else if (this.drawPlayer.body == 179) + { + this.bodyGlowMask = !this.drawPlayer.Male ? 43 : 42; + this.armGlowMask = 44; + this.bodyGlowColor = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + this.armGlowColor = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + } + if (this.drawPlayer.legs == 111) + { + this.legsGlowMask = 17; + byte num23 = (byte) (62.5 * (double) (1 + num10)); + this.legsGlowColor = new Color((int) num23, (int) num23, (int) num23, 0); + } + else if (this.drawPlayer.legs == 157) + { + this.legsGlowMask = 249; + this.legsGlowColor = this.ArkhalisColor; + } + else if (this.drawPlayer.legs == 158) + { + this.legsGlowMask = 250; + this.legsGlowColor = this.ArkhalisColor; + } + else if (this.drawPlayer.legs == 210) + { + this.legsGlowMask = 274; + this.legsGlowColor = new Color(230, 230, 230, 60); + } + else if (this.drawPlayer.legs == 110) + { + this.legsGlowMask = 199; + byte num24 = (byte) (62.5 * (double) (1 + num9)); + this.legsGlowColor = new Color((int) num24, (int) num24, (int) num24, 0); + } + else if (this.drawPlayer.legs == 112) + { + byte num25 = (byte) (62.5 * (double) (1 + num11)); + this.colorArmorLegs = this.drawPlayer.GetImmuneAlphaPure(new Color((int) num25, (int) num25, (int) num25, (int) byte.MaxValue), this.shadow); + } + else if (this.drawPlayer.legs == 134) + { + this.legsGlowMask = 212; + this.legsGlowColor = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue); + } + else if (this.drawPlayer.legs == 130) + { + byte num26 = (byte) ((int) sbyte.MaxValue * (1 + num12)); + this.legsGlowMask = 187; + this.legsGlowColor = new Color((int) num26, (int) num26, (int) num26, 0); + this.colorArmorLegs = this.drawPlayer.GetImmuneAlphaPure(new Color((int) num26, (int) num26, (int) num26, (int) byte.MaxValue), this.shadow); + } + float shadow = this.shadow; + this.headGlowColor = this.drawPlayer.GetImmuneAlphaPure(this.headGlowColor, shadow); + this.bodyGlowColor = this.drawPlayer.GetImmuneAlphaPure(this.bodyGlowColor, shadow); + this.armGlowColor = this.drawPlayer.GetImmuneAlphaPure(this.armGlowColor, shadow); + this.legsGlowColor = this.drawPlayer.GetImmuneAlphaPure(this.legsGlowColor, shadow); + if (this.drawPlayer.head > 0 && this.drawPlayer.head < 266) + { + Main.instance.LoadArmorHead(this.drawPlayer.head); + int i = ArmorIDs.Head.Sets.FrontToBackID[this.drawPlayer.head]; + if (i >= 0) + Main.instance.LoadArmorHead(i); + } + if (this.drawPlayer.body > 0 && this.drawPlayer.body < 235) + Main.instance.LoadArmorBody(this.drawPlayer.body); + if (this.drawPlayer.legs > 0 && this.drawPlayer.legs < 218) + Main.instance.LoadArmorLegs(this.drawPlayer.legs); + if (this.drawPlayer.handon > (sbyte) 0 && this.drawPlayer.handon < (sbyte) 22) + Main.instance.LoadAccHandsOn((int) this.drawPlayer.handon); + if (this.drawPlayer.handoff > (sbyte) 0 && this.drawPlayer.handoff < (sbyte) 14) + Main.instance.LoadAccHandsOff((int) this.drawPlayer.handoff); + if (this.drawPlayer.back > (sbyte) 0 && this.drawPlayer.back < (sbyte) 30) + Main.instance.LoadAccBack((int) this.drawPlayer.back); + if (this.drawPlayer.front > (sbyte) 0 && this.drawPlayer.front < (sbyte) 9) + Main.instance.LoadAccFront((int) this.drawPlayer.front); + if (this.drawPlayer.shoe > (sbyte) 0 && this.drawPlayer.shoe < (sbyte) 25) + Main.instance.LoadAccShoes((int) this.drawPlayer.shoe); + if (this.drawPlayer.waist > (sbyte) 0 && this.drawPlayer.waist < (sbyte) 17) + Main.instance.LoadAccWaist((int) this.drawPlayer.waist); + if (this.drawPlayer.shield > (sbyte) 0 && this.drawPlayer.shield < (sbyte) 10) + Main.instance.LoadAccShield((int) this.drawPlayer.shield); + if (this.drawPlayer.neck > (sbyte) 0 && this.drawPlayer.neck < (sbyte) 11) + Main.instance.LoadAccNeck((int) this.drawPlayer.neck); + if (this.drawPlayer.face > (sbyte) 0 && this.drawPlayer.face < (sbyte) 16) + Main.instance.LoadAccFace((int) this.drawPlayer.face); + if (this.drawPlayer.balloon > (sbyte) 0 && this.drawPlayer.balloon < (sbyte) 18) + Main.instance.LoadAccBalloon((int) this.drawPlayer.balloon); + Main.instance.LoadHair(this.drawPlayer.hair); + if (this.drawPlayer.isHatRackDoll) + { + this.colorLegs = Color.Transparent; + this.colorBodySkin = Color.Transparent; + this.colorHead = Color.Transparent; + this.colorHair = Color.Transparent; + this.colorEyes = Color.Transparent; + this.colorEyeWhites = Color.Transparent; + } + if (this.drawPlayer.isDisplayDollOrInanimate) + { + int localShaderIndex; + PlayerDrawHelper.ShaderConfiguration shaderType; + PlayerDrawHelper.UnpackShader(this.skinDyePacked, out localShaderIndex, out shaderType); + if (shaderType == PlayerDrawHelper.ShaderConfiguration.TilePaintID && localShaderIndex == 31) + { + this.colorHead = Color.White; + this.colorBodySkin = Color.White; + this.colorLegs = Color.White; + this.colorEyes = Color.White; + this.colorEyeWhites = Color.White; + this.colorArmorHead = Color.White; + this.colorArmorBody = Color.White; + this.colorArmorLegs = Color.White; + } + } + if (!this.drawPlayer.isDisplayDollOrInanimate) + { + if ((this.drawPlayer.head == 78 || this.drawPlayer.head == 79 || this.drawPlayer.head == 80) && this.drawPlayer.body == 51 && this.drawPlayer.legs == 47) + { + float num27 = (float) ((double) Main.mouseTextColor / 200.0 - 0.300000011920929); + if ((double) this.shadow != 0.0) + num27 = 0.0f; + this.colorArmorHead.R = (byte) ((double) this.colorArmorHead.R * (double) num27); + this.colorArmorHead.G = (byte) ((double) this.colorArmorHead.G * (double) num27); + this.colorArmorHead.B = (byte) ((double) this.colorArmorHead.B * (double) num27); + this.colorArmorBody.R = (byte) ((double) this.colorArmorBody.R * (double) num27); + this.colorArmorBody.G = (byte) ((double) this.colorArmorBody.G * (double) num27); + this.colorArmorBody.B = (byte) ((double) this.colorArmorBody.B * (double) num27); + this.colorArmorLegs.R = (byte) ((double) this.colorArmorLegs.R * (double) num27); + this.colorArmorLegs.G = (byte) ((double) this.colorArmorLegs.G * (double) num27); + this.colorArmorLegs.B = (byte) ((double) this.colorArmorLegs.B * (double) num27); + } + if (this.drawPlayer.head == 193 && this.drawPlayer.body == 194 && this.drawPlayer.legs == 134) + { + float num28 = (float) (0.600000023841858 - (double) this.drawPlayer.ghostFade * 0.300000011920929); + if ((double) this.shadow != 0.0) + num28 = 0.0f; + this.colorArmorHead.R = (byte) ((double) this.colorArmorHead.R * (double) num28); + this.colorArmorHead.G = (byte) ((double) this.colorArmorHead.G * (double) num28); + this.colorArmorHead.B = (byte) ((double) this.colorArmorHead.B * (double) num28); + this.colorArmorBody.R = (byte) ((double) this.colorArmorBody.R * (double) num28); + this.colorArmorBody.G = (byte) ((double) this.colorArmorBody.G * (double) num28); + this.colorArmorBody.B = (byte) ((double) this.colorArmorBody.B * (double) num28); + this.colorArmorLegs.R = (byte) ((double) this.colorArmorLegs.R * (double) num28); + this.colorArmorLegs.G = (byte) ((double) this.colorArmorLegs.G * (double) num28); + this.colorArmorLegs.B = (byte) ((double) this.colorArmorLegs.B * (double) num28); + } + if ((double) this.shadow > 0.0) + { + this.colorLegs = Color.Transparent; + this.colorBodySkin = Color.Transparent; + this.colorHead = Color.Transparent; + this.colorHair = Color.Transparent; + this.colorEyes = Color.Transparent; + this.colorEyeWhites = Color.Transparent; + } + } + float R = 1f; + float G = 1f; + float B = 1f; + float A = 1f; + if (this.drawPlayer.honey && Main.rand.Next(30) == 0 && (double) this.shadow == 0.0) + { + Dust dust1 = Dust.NewDustDirect(this.Position, this.drawPlayer.width, this.drawPlayer.height, 152, Alpha: 150); + dust1.velocity.Y = 0.3f; + dust1.velocity.X *= 0.1f; + dust1.scale += (float) Main.rand.Next(3, 4) * 0.1f; + dust1.alpha = 100; + dust1.noGravity = true; + dust1.velocity += this.drawPlayer.velocity * 0.1f; + this.DustCache.Add(dust1.dustIndex); + } + if (this.drawPlayer.dryadWard && (double) this.drawPlayer.velocity.X != 0.0 && Main.rand.Next(4) == 0) + { + Dust dust2 = Dust.NewDustDirect(new Vector2(this.drawPlayer.position.X - 2f, (float) ((double) this.drawPlayer.position.Y + (double) this.drawPlayer.height - 2.0)), this.drawPlayer.width + 4, 4, 163, Alpha: 100, Scale: 1.5f); + dust2.noGravity = true; + dust2.noLight = true; + dust2.velocity *= 0.0f; + this.DustCache.Add(dust2.dustIndex); + } + if (this.drawPlayer.poisoned) + { + if (Main.rand.Next(50) == 0 && (double) this.shadow == 0.0) + { + Dust dust3 = Dust.NewDustDirect(this.Position, this.drawPlayer.width, this.drawPlayer.height, 46, Alpha: 150, Scale: 0.2f); + dust3.noGravity = true; + dust3.fadeIn = 1.9f; + this.DustCache.Add(dust3.dustIndex); + } + R *= 0.65f; + B *= 0.75f; + } + if (this.drawPlayer.venom) + { + if (Main.rand.Next(10) == 0 && (double) this.shadow == 0.0) + { + Dust dust4 = Dust.NewDustDirect(this.Position, this.drawPlayer.width, this.drawPlayer.height, 171, Alpha: 100, Scale: 0.5f); + dust4.noGravity = true; + dust4.fadeIn = 1.5f; + this.DustCache.Add(dust4.dustIndex); + } + G *= 0.45f; + R *= 0.75f; + } + if (this.drawPlayer.onFire) + { + if (Main.rand.Next(4) == 0 && (double) this.shadow == 0.0) + { + Dust dust5 = Dust.NewDustDirect(new Vector2(this.Position.X - 2f, this.Position.Y - 2f), this.drawPlayer.width + 4, this.drawPlayer.height + 4, 6, this.drawPlayer.velocity.X * 0.4f, this.drawPlayer.velocity.Y * 0.4f, 100, Scale: 3f); + dust5.noGravity = true; + dust5.velocity *= 1.8f; + dust5.velocity.Y -= 0.5f; + this.DustCache.Add(dust5.dustIndex); + } + B *= 0.6f; + G *= 0.7f; + } + if (this.drawPlayer.dripping && (double) this.shadow == 0.0 && Main.rand.Next(4) != 0) + { + Vector2 position = this.Position; + position.X -= 2f; + position.Y -= 2f; + if (Main.rand.Next(2) == 0) + { + Dust dust6 = Dust.NewDustDirect(position, this.drawPlayer.width + 4, this.drawPlayer.height + 2, 211, Alpha: 50, Scale: 0.8f); + if (Main.rand.Next(2) == 0) + dust6.alpha += 25; + if (Main.rand.Next(2) == 0) + dust6.alpha += 25; + dust6.noLight = true; + dust6.velocity *= 0.2f; + dust6.velocity.Y += 0.2f; + dust6.velocity += this.drawPlayer.velocity; + this.DustCache.Add(dust6.dustIndex); + } + else + { + Dust dust7 = Dust.NewDustDirect(position, this.drawPlayer.width + 8, this.drawPlayer.height + 8, 211, Alpha: 50, Scale: 1.1f); + if (Main.rand.Next(2) == 0) + dust7.alpha += 25; + if (Main.rand.Next(2) == 0) + dust7.alpha += 25; + dust7.noLight = true; + dust7.noGravity = true; + dust7.velocity *= 0.2f; + ++dust7.velocity.Y; + dust7.velocity += this.drawPlayer.velocity; + this.DustCache.Add(dust7.dustIndex); + } + } + if (this.drawPlayer.drippingSlime) + { + int Alpha = 175; + Color newColor = new Color(0, 80, (int) byte.MaxValue, 100); + if (Main.rand.Next(4) != 0 && (double) this.shadow == 0.0) + { + Vector2 position = this.Position; + position.X -= 2f; + position.Y -= 2f; + if (Main.rand.Next(2) == 0) + { + Dust dust8 = Dust.NewDustDirect(position, this.drawPlayer.width + 4, this.drawPlayer.height + 2, 4, Alpha: Alpha, newColor: newColor, Scale: 1.4f); + if (Main.rand.Next(2) == 0) + dust8.alpha += 25; + if (Main.rand.Next(2) == 0) + dust8.alpha += 25; + dust8.noLight = true; + dust8.velocity *= 0.2f; + dust8.velocity.Y += 0.2f; + dust8.velocity += this.drawPlayer.velocity; + this.DustCache.Add(dust8.dustIndex); + } + } + R *= 0.8f; + G *= 0.8f; + } + if (this.drawPlayer.drippingSparkleSlime) + { + int Alpha = 100; + if (Main.rand.Next(4) != 0 && (double) this.shadow == 0.0) + { + Vector2 position = this.Position; + position.X -= 2f; + position.Y -= 2f; + if (Main.rand.Next(4) == 0) + { + Color rgb = Main.hslToRgb((float) (0.699999988079071 + 0.200000002980232 * (double) Main.rand.NextFloat()), 1f, 0.5f); + rgb.A /= (byte) 2; + Dust dust9 = Dust.NewDustDirect(position, this.drawPlayer.width + 4, this.drawPlayer.height + 2, 4, Alpha: Alpha, newColor: rgb, Scale: 0.65f); + if (Main.rand.Next(2) == 0) + dust9.alpha += 25; + if (Main.rand.Next(2) == 0) + dust9.alpha += 25; + dust9.noLight = true; + dust9.velocity *= 0.2f; + dust9.velocity += this.drawPlayer.velocity * 0.7f; + dust9.fadeIn = 0.8f; + this.DustCache.Add(dust9.dustIndex); + } + if (Main.rand.Next(30) == 0) + { + Main.hslToRgb((float) (0.699999988079071 + 0.200000002980232 * (double) Main.rand.NextFloat()), 1f, 0.5f).A /= (byte) 2; + Dust dust10 = Dust.NewDustDirect(position, this.drawPlayer.width + 4, this.drawPlayer.height + 2, 43, Alpha: 254, newColor: new Color((int) sbyte.MaxValue, (int) sbyte.MaxValue, (int) sbyte.MaxValue, 0), Scale: 0.45f); + dust10.noLight = true; + dust10.velocity.X *= 0.0f; + dust10.velocity *= 0.03f; + dust10.fadeIn = 0.6f; + this.DustCache.Add(dust10.dustIndex); + } + } + R *= 0.94f; + G *= 0.82f; + } + if (this.drawPlayer.ichor) + B = 0.0f; + if (this.drawPlayer.electrified && (double) this.shadow == 0.0 && Main.rand.Next(3) == 0) + { + Dust dust11 = Dust.NewDustDirect(new Vector2(this.Position.X - 2f, this.Position.Y - 2f), this.drawPlayer.width + 4, this.drawPlayer.height + 4, 226, Alpha: 100, Scale: 0.5f); + dust11.velocity *= 1.6f; + --dust11.velocity.Y; + dust11.position = Vector2.Lerp(dust11.position, this.drawPlayer.Center, 0.5f); + this.DustCache.Add(dust11.dustIndex); + } + if (this.drawPlayer.burned) + { + if ((double) this.shadow == 0.0) + { + Dust dust12 = Dust.NewDustDirect(new Vector2(this.Position.X - 2f, this.Position.Y - 2f), this.drawPlayer.width + 4, this.drawPlayer.height + 4, 6, this.drawPlayer.velocity.X * 0.4f, this.drawPlayer.velocity.Y * 0.4f, 100, Scale: 2f); + dust12.noGravity = true; + dust12.velocity *= 1.8f; + dust12.velocity.Y -= 0.75f; + this.DustCache.Add(dust12.dustIndex); + } + R = 1f; + B *= 0.6f; + G *= 0.7f; + } + if (this.drawPlayer.onFrostBurn) + { + if (Main.rand.Next(4) == 0 && (double) this.shadow == 0.0) + { + Dust dust13 = Dust.NewDustDirect(new Vector2(this.Position.X - 2f, this.Position.Y - 2f), this.drawPlayer.width + 4, this.drawPlayer.height + 4, 135, this.drawPlayer.velocity.X * 0.4f, this.drawPlayer.velocity.Y * 0.4f, 100, Scale: 3f); + dust13.noGravity = true; + dust13.velocity *= 1.8f; + dust13.velocity.Y -= 0.5f; + this.DustCache.Add(dust13.dustIndex); + } + R *= 0.5f; + G *= 0.7f; + } + if (this.drawPlayer.onFire2) + { + if (Main.rand.Next(4) == 0 && (double) this.shadow == 0.0) + { + Dust dust14 = Dust.NewDustDirect(new Vector2(this.Position.X - 2f, this.Position.Y - 2f), this.drawPlayer.width + 4, this.drawPlayer.height + 4, 75, this.drawPlayer.velocity.X * 0.4f, this.drawPlayer.velocity.Y * 0.4f, 100, Scale: 3f); + dust14.noGravity = true; + dust14.velocity *= 1.8f; + dust14.velocity.Y -= 0.5f; + this.DustCache.Add(dust14.dustIndex); + } + B *= 0.6f; + G *= 0.7f; + } + if (this.drawPlayer.noItems) + { + G *= 0.8f; + R *= 0.65f; + } + if (this.drawPlayer.blind) + { + G *= 0.65f; + R *= 0.7f; + } + if (this.drawPlayer.bleed) + { + G *= 0.9f; + B *= 0.9f; + if (!this.drawPlayer.dead && Main.rand.Next(30) == 0 && (double) this.shadow == 0.0) + { + Dust dust15 = Dust.NewDustDirect(this.Position, this.drawPlayer.width, this.drawPlayer.height, 5); + dust15.velocity.Y += 0.5f; + dust15.velocity *= 0.25f; + this.DustCache.Add(dust15.dustIndex); + } + } + if ((double) this.shadow == 0.0 && this.drawPlayer.palladiumRegen && this.drawPlayer.statLife < this.drawPlayer.statLifeMax2 && Main.instance.IsActive && !Main.gamePaused && this.drawPlayer.miscCounter % 10 == 0 && (double) this.shadow == 0.0) + { + Vector2 Position; + Position.X = this.Position.X + (float) Main.rand.Next(this.drawPlayer.width); + Position.Y = this.Position.Y + (float) Main.rand.Next(this.drawPlayer.height); + Position.X = (float) ((double) this.Position.X + (double) (this.drawPlayer.width / 2) - 6.0); + Position.Y = (float) ((double) this.Position.Y + (double) (this.drawPlayer.height / 2) - 6.0); + Position.X -= (float) Main.rand.Next(-10, 11); + Position.Y -= (float) Main.rand.Next(-20, 21); + this.GoreCache.Add(Gore.NewGore(Position, new Vector2((float) Main.rand.Next(-10, 11) * 0.1f, (float) Main.rand.Next(-20, -10) * 0.1f), 331, (float) Main.rand.Next(80, 120) * 0.01f)); + } + if ((double) this.shadow == 0.0 && this.drawPlayer.loveStruck && Main.instance.IsActive && !Main.gamePaused && Main.rand.Next(5) == 0) + { + Vector2 vector2 = new Vector2((float) Main.rand.Next(-10, 11), (float) Main.rand.Next(-10, 11)); + vector2.Normalize(); + vector2.X *= 0.66f; + int index = Gore.NewGore(this.Position + new Vector2((float) Main.rand.Next(this.drawPlayer.width + 1), (float) Main.rand.Next(this.drawPlayer.height + 1)), vector2 * (float) Main.rand.Next(3, 6) * 0.33f, 331, (float) Main.rand.Next(40, 121) * 0.01f); + Main.gore[index].sticky = false; + Main.gore[index].velocity *= 0.4f; + Main.gore[index].velocity.Y -= 0.6f; + this.GoreCache.Add(index); + } + if (this.drawPlayer.stinky && Main.instance.IsActive && !Main.gamePaused) + { + R *= 0.7f; + B *= 0.55f; + if (Main.rand.Next(5) == 0 && (double) this.shadow == 0.0) + { + Vector2 vector2_1 = new Vector2((float) Main.rand.Next(-10, 11), (float) Main.rand.Next(-10, 11)); + vector2_1.Normalize(); + vector2_1.X *= 0.66f; + vector2_1.Y = Math.Abs(vector2_1.Y); + Vector2 vector2_2 = vector2_1 * (float) Main.rand.Next(3, 5) * 0.25f; + int index = Dust.NewDust(this.Position, this.drawPlayer.width, this.drawPlayer.height, 188, vector2_2.X, vector2_2.Y * 0.5f, 100, Scale: 1.5f); + Main.dust[index].velocity *= 0.1f; + Main.dust[index].velocity.Y -= 0.5f; + this.DustCache.Add(index); + } + } + if (this.drawPlayer.slowOgreSpit && Main.instance.IsActive && !Main.gamePaused) + { + R *= 0.6f; + B *= 0.45f; + if (Main.rand.Next(5) == 0 && (double) this.shadow == 0.0) + { + int Type = Utils.SelectRandom(Main.rand, 4, 256); + Dust dust16 = Main.dust[Dust.NewDust(this.Position, this.drawPlayer.width, this.drawPlayer.height, Type, Alpha: 100)]; + dust16.scale = (float) (0.800000011920929 + (double) Main.rand.NextFloat() * 0.600000023841858); + dust16.fadeIn = 0.5f; + dust16.velocity *= 0.05f; + dust16.noLight = true; + if (dust16.type == 4) + dust16.color = new Color(80, 170, 40, 120); + this.DustCache.Add(dust16.dustIndex); + } + if (Main.rand.Next(5) == 0 && (double) this.shadow == 0.0) + { + int index = Gore.NewGore(this.Position + new Vector2(Main.rand.NextFloat(), Main.rand.NextFloat()) * this.drawPlayer.Size, Vector2.Zero, Utils.SelectRandom(Main.rand, 1024, 1025, 1026), 0.65f); + Main.gore[index].velocity *= 0.05f; + this.GoreCache.Add(index); + } + } + if (Main.instance.IsActive && !Main.gamePaused && (double) this.shadow == 0.0) + { + float num29 = (float) this.drawPlayer.miscCounter / 180f; + float num30 = 0.0f; + float num31 = 10f; + int Type = 90; + int num32 = 0; + for (int index1 = 0; index1 < 3; ++index1) + { + switch (index1) + { + case 0: + if (this.drawPlayer.nebulaLevelLife >= 1) + { + num30 = 6.283185f / (float) this.drawPlayer.nebulaLevelLife; + num32 = this.drawPlayer.nebulaLevelLife; + goto default; + } + else + break; + case 1: + if (this.drawPlayer.nebulaLevelMana >= 1) + { + num30 = -6.283185f / (float) this.drawPlayer.nebulaLevelMana; + num32 = this.drawPlayer.nebulaLevelMana; + num29 = (float) -this.drawPlayer.miscCounter / 180f; + num31 = 20f; + Type = 88; + goto default; + } + else + break; + case 2: + if (this.drawPlayer.nebulaLevelDamage >= 1) + { + num30 = 6.283185f / (float) this.drawPlayer.nebulaLevelDamage; + num32 = this.drawPlayer.nebulaLevelDamage; + num29 = (float) this.drawPlayer.miscCounter / 180f; + num31 = 30f; + Type = 86; + goto default; + } + else + break; + default: + for (int index2 = 0; index2 < num32; ++index2) + { + Dust dust17 = Dust.NewDustDirect(this.Position, this.drawPlayer.width, this.drawPlayer.height, Type, Alpha: 100, Scale: 1.5f); + dust17.noGravity = true; + dust17.velocity = Vector2.Zero; + dust17.position = this.drawPlayer.Center + Vector2.UnitY * this.drawPlayer.gfxOffY + ((float) ((double) num29 * 6.28318548202515 + (double) num30 * (double) index2)).ToRotationVector2() * num31; + dust17.customData = (object) this.drawPlayer; + this.DustCache.Add(dust17.dustIndex); + } + break; + } + } + } + if (this.drawPlayer.witheredArmor && Main.instance.IsActive && !Main.gamePaused) + { + G *= 0.5f; + R *= 0.75f; + } + if (this.drawPlayer.witheredWeapon && this.drawPlayer.itemAnimation > 0 && this.heldItem.damage > 0 && Main.instance.IsActive && !Main.gamePaused && Main.rand.Next(3) == 0) + { + Dust dust18 = Dust.NewDustDirect(new Vector2(this.Position.X - 2f, this.Position.Y - 2f), this.drawPlayer.width + 4, this.drawPlayer.height + 4, 272, Alpha: 50, Scale: 0.5f); + dust18.velocity *= 1.6f; + --dust18.velocity.Y; + dust18.position = Vector2.Lerp(dust18.position, this.drawPlayer.Center, 0.5f); + this.DustCache.Add(dust18.dustIndex); + } + if ((double) R != 1.0 || (double) G != 1.0 || (double) B != 1.0 || (double) A != 1.0) + { + if (this.drawPlayer.onFire || this.drawPlayer.onFire2 || this.drawPlayer.onFrostBurn) + { + this.colorEyeWhites = this.drawPlayer.GetImmuneAlpha(Color.White, this.shadow); + this.colorEyes = this.drawPlayer.GetImmuneAlpha(this.drawPlayer.eyeColor, this.shadow); + this.colorHair = this.drawPlayer.GetImmuneAlpha(this.drawPlayer.GetHairColor(false), this.shadow); + this.colorHead = this.drawPlayer.GetImmuneAlpha(this.drawPlayer.skinColor, this.shadow); + this.colorBodySkin = this.drawPlayer.GetImmuneAlpha(this.drawPlayer.skinColor, this.shadow); + this.colorShirt = this.drawPlayer.GetImmuneAlpha(this.drawPlayer.shirtColor, this.shadow); + this.colorUnderShirt = this.drawPlayer.GetImmuneAlpha(this.drawPlayer.underShirtColor, this.shadow); + this.colorPants = this.drawPlayer.GetImmuneAlpha(this.drawPlayer.pantsColor, this.shadow); + this.colorLegs = this.drawPlayer.GetImmuneAlpha(this.drawPlayer.skinColor, this.shadow); + this.colorShoes = this.drawPlayer.GetImmuneAlpha(this.drawPlayer.shoeColor, this.shadow); + this.colorArmorHead = this.drawPlayer.GetImmuneAlpha(Color.White, this.shadow); + this.colorArmorBody = this.drawPlayer.GetImmuneAlpha(Color.White, this.shadow); + this.colorArmorLegs = this.drawPlayer.GetImmuneAlpha(Color.White, this.shadow); + } + else + { + this.colorEyeWhites = Main.buffColor(this.colorEyeWhites, R, G, B, A); + this.colorEyes = Main.buffColor(this.colorEyes, R, G, B, A); + this.colorHair = Main.buffColor(this.colorHair, R, G, B, A); + this.colorHead = Main.buffColor(this.colorHead, R, G, B, A); + this.colorBodySkin = Main.buffColor(this.colorBodySkin, R, G, B, A); + this.colorShirt = Main.buffColor(this.colorShirt, R, G, B, A); + this.colorUnderShirt = Main.buffColor(this.colorUnderShirt, R, G, B, A); + this.colorPants = Main.buffColor(this.colorPants, R, G, B, A); + this.colorLegs = Main.buffColor(this.colorLegs, R, G, B, A); + this.colorShoes = Main.buffColor(this.colorShoes, R, G, B, A); + this.colorArmorHead = Main.buffColor(this.colorArmorHead, R, G, B, A); + this.colorArmorBody = Main.buffColor(this.colorArmorBody, R, G, B, A); + this.colorArmorLegs = Main.buffColor(this.colorArmorLegs, R, G, B, A); + } + } + if (this.drawPlayer.socialGhost) + { + this.colorEyeWhites = Color.Transparent; + this.colorEyes = Color.Transparent; + this.colorHair = Color.Transparent; + this.colorHead = Color.Transparent; + this.colorBodySkin = Color.Transparent; + this.colorShirt = Color.Transparent; + this.colorUnderShirt = Color.Transparent; + this.colorPants = Color.Transparent; + this.colorShoes = Color.Transparent; + this.colorLegs = Color.Transparent; + if ((int) this.colorArmorHead.A > (int) Main.gFade) + this.colorArmorHead.A = Main.gFade; + if ((int) this.colorArmorBody.A > (int) Main.gFade) + this.colorArmorBody.A = Main.gFade; + if ((int) this.colorArmorLegs.A > (int) Main.gFade) + this.colorArmorLegs.A = Main.gFade; + } + if (this.drawPlayer.socialIgnoreLight) + { + float num33 = 1.2f; + this.colorEyeWhites = Color.White * num33; + this.colorEyes = this.drawPlayer.eyeColor * num33; + this.colorHair = GameShaders.Hair.GetColor((short) this.drawPlayer.hairDye, this.drawPlayer, Color.White); + this.colorHead = this.drawPlayer.skinColor * num33; + this.colorBodySkin = this.drawPlayer.skinColor * num33; + this.colorShirt = this.drawPlayer.shirtColor * num33; + this.colorUnderShirt = this.drawPlayer.underShirtColor * num33; + this.colorPants = this.drawPlayer.pantsColor * num33; + this.colorShoes = this.drawPlayer.shoeColor * num33; + this.colorLegs = this.drawPlayer.skinColor * num33; + } + this.stealth = 1f; + if (this.heldItem.type == 3106) + { + float num34 = this.drawPlayer.stealth; + if ((double) num34 < 0.03) + num34 = 0.03f; + float num35 = (float) ((1.0 + (double) num34 * 10.0) / 11.0); + if ((double) num34 < 0.0) + num34 = 0.0f; + if ((double) num34 >= 1.0 - (double) this.shadow && (double) this.shadow > 0.0) + num34 = this.shadow * 0.5f; + this.stealth = num35; + this.colorArmorHead = new Color((int) (byte) ((double) this.colorArmorHead.R * (double) num34), (int) (byte) ((double) this.colorArmorHead.G * (double) num34), (int) (byte) ((double) this.colorArmorHead.B * (double) num35), (int) (byte) ((double) this.colorArmorHead.A * (double) num34)); + this.colorArmorBody = new Color((int) (byte) ((double) this.colorArmorBody.R * (double) num34), (int) (byte) ((double) this.colorArmorBody.G * (double) num34), (int) (byte) ((double) this.colorArmorBody.B * (double) num35), (int) (byte) ((double) this.colorArmorBody.A * (double) num34)); + this.colorArmorLegs = new Color((int) (byte) ((double) this.colorArmorLegs.R * (double) num34), (int) (byte) ((double) this.colorArmorLegs.G * (double) num34), (int) (byte) ((double) this.colorArmorLegs.B * (double) num35), (int) (byte) ((double) this.colorArmorLegs.A * (double) num34)); + float scale = num34 * num34; + this.colorEyeWhites = Color.Multiply(this.colorEyeWhites, scale); + this.colorEyes = Color.Multiply(this.colorEyes, scale); + this.colorHair = Color.Multiply(this.colorHair, scale); + this.colorHead = Color.Multiply(this.colorHead, scale); + this.colorBodySkin = Color.Multiply(this.colorBodySkin, scale); + this.colorShirt = Color.Multiply(this.colorShirt, scale); + this.colorUnderShirt = Color.Multiply(this.colorUnderShirt, scale); + this.colorPants = Color.Multiply(this.colorPants, scale); + this.colorShoes = Color.Multiply(this.colorShoes, scale); + this.colorLegs = Color.Multiply(this.colorLegs, scale); + this.colorMount = Color.Multiply(this.colorMount, scale); + this.headGlowColor = Color.Multiply(this.headGlowColor, scale); + this.bodyGlowColor = Color.Multiply(this.bodyGlowColor, scale); + this.armGlowColor = Color.Multiply(this.armGlowColor, scale); + this.legsGlowColor = Color.Multiply(this.legsGlowColor, scale); + } + else if (this.drawPlayer.shroomiteStealth) + { + float num36 = this.drawPlayer.stealth; + if ((double) num36 < 0.03) + num36 = 0.03f; + float num37 = (float) ((1.0 + (double) num36 * 10.0) / 11.0); + if ((double) num36 < 0.0) + num36 = 0.0f; + if ((double) num36 >= 1.0 - (double) this.shadow && (double) this.shadow > 0.0) + num36 = this.shadow * 0.5f; + this.stealth = num37; + this.colorArmorHead = new Color((int) (byte) ((double) this.colorArmorHead.R * (double) num36), (int) (byte) ((double) this.colorArmorHead.G * (double) num36), (int) (byte) ((double) this.colorArmorHead.B * (double) num37), (int) (byte) ((double) this.colorArmorHead.A * (double) num36)); + this.colorArmorBody = new Color((int) (byte) ((double) this.colorArmorBody.R * (double) num36), (int) (byte) ((double) this.colorArmorBody.G * (double) num36), (int) (byte) ((double) this.colorArmorBody.B * (double) num37), (int) (byte) ((double) this.colorArmorBody.A * (double) num36)); + this.colorArmorLegs = new Color((int) (byte) ((double) this.colorArmorLegs.R * (double) num36), (int) (byte) ((double) this.colorArmorLegs.G * (double) num36), (int) (byte) ((double) this.colorArmorLegs.B * (double) num37), (int) (byte) ((double) this.colorArmorLegs.A * (double) num36)); + float scale = num36 * num36; + this.colorEyeWhites = Color.Multiply(this.colorEyeWhites, scale); + this.colorEyes = Color.Multiply(this.colorEyes, scale); + this.colorHair = Color.Multiply(this.colorHair, scale); + this.colorHead = Color.Multiply(this.colorHead, scale); + this.colorBodySkin = Color.Multiply(this.colorBodySkin, scale); + this.colorShirt = Color.Multiply(this.colorShirt, scale); + this.colorUnderShirt = Color.Multiply(this.colorUnderShirt, scale); + this.colorPants = Color.Multiply(this.colorPants, scale); + this.colorShoes = Color.Multiply(this.colorShoes, scale); + this.colorLegs = Color.Multiply(this.colorLegs, scale); + this.colorMount = Color.Multiply(this.colorMount, scale); + this.headGlowColor = Color.Multiply(this.headGlowColor, scale); + this.bodyGlowColor = Color.Multiply(this.bodyGlowColor, scale); + this.armGlowColor = Color.Multiply(this.armGlowColor, scale); + this.legsGlowColor = Color.Multiply(this.legsGlowColor, scale); + } + else if (this.drawPlayer.setVortex) + { + float num38 = this.drawPlayer.stealth; + if ((double) num38 < 0.03) + num38 = 0.03f; + if ((double) num38 < 0.0) + num38 = 0.0f; + if ((double) num38 >= 1.0 - (double) this.shadow && (double) this.shadow > 0.0) + num38 = this.shadow * 0.5f; + this.stealth = num38; + Color secondColor = new Color(Vector4.Lerp(Vector4.One, new Vector4(0.0f, 0.12f, 0.16f, 0.0f), 1f - num38)); + this.colorArmorHead = this.colorArmorHead.MultiplyRGBA(secondColor); + this.colorArmorBody = this.colorArmorBody.MultiplyRGBA(secondColor); + this.colorArmorLegs = this.colorArmorLegs.MultiplyRGBA(secondColor); + float scale = num38 * num38; + this.colorEyeWhites = Color.Multiply(this.colorEyeWhites, scale); + this.colorEyes = Color.Multiply(this.colorEyes, scale); + this.colorHair = Color.Multiply(this.colorHair, scale); + this.colorHead = Color.Multiply(this.colorHead, scale); + this.colorBodySkin = Color.Multiply(this.colorBodySkin, scale); + this.colorShirt = Color.Multiply(this.colorShirt, scale); + this.colorUnderShirt = Color.Multiply(this.colorUnderShirt, scale); + this.colorPants = Color.Multiply(this.colorPants, scale); + this.colorShoes = Color.Multiply(this.colorShoes, scale); + this.colorLegs = Color.Multiply(this.colorLegs, scale); + this.colorMount = Color.Multiply(this.colorMount, scale); + this.headGlowColor = Color.Multiply(this.headGlowColor, scale); + this.bodyGlowColor = Color.Multiply(this.bodyGlowColor, scale); + this.armGlowColor = Color.Multiply(this.armGlowColor, scale); + this.legsGlowColor = Color.Multiply(this.legsGlowColor, scale); + } + if ((double) this.drawPlayer.gravDir == 1.0) + { + if (this.drawPlayer.direction == 1) + { + this.playerEffect = SpriteEffects.None; + this.itemEffect = SpriteEffects.None; + } + else + { + this.playerEffect = SpriteEffects.FlipHorizontally; + this.itemEffect = SpriteEffects.FlipHorizontally; + } + if (!this.drawPlayer.dead) + { + this.drawPlayer.legPosition.Y = 0.0f; + this.drawPlayer.headPosition.Y = 0.0f; + this.drawPlayer.bodyPosition.Y = 0.0f; + } + } + else + { + if (this.drawPlayer.direction == 1) + { + this.playerEffect = SpriteEffects.FlipVertically; + this.itemEffect = SpriteEffects.FlipVertically; + } + else + { + this.playerEffect = SpriteEffects.FlipHorizontally | SpriteEffects.FlipVertically; + this.itemEffect = SpriteEffects.FlipHorizontally | SpriteEffects.FlipVertically; + } + if (!this.drawPlayer.dead) + { + this.drawPlayer.legPosition.Y = 6f; + this.drawPlayer.headPosition.Y = 6f; + this.drawPlayer.bodyPosition.Y = 6f; + } + } + switch (this.heldItem.type) + { + case 3182: + case 3184: + case 3185: + case 3782: + this.itemEffect ^= SpriteEffects.FlipHorizontally | SpriteEffects.FlipVertically; + break; + } + this.legVect = new Vector2((float) this.drawPlayer.legFrame.Width * 0.5f, (float) this.drawPlayer.legFrame.Height * 0.75f); + this.bodyVect = new Vector2((float) this.drawPlayer.legFrame.Width * 0.5f, (float) this.drawPlayer.legFrame.Height * 0.5f); + this.headVect = new Vector2((float) this.drawPlayer.legFrame.Width * 0.5f, (float) this.drawPlayer.legFrame.Height * 0.4f); + if ((this.drawPlayer.merman || this.drawPlayer.forceMerman) && !this.drawPlayer.hideMerman) + { + this.drawPlayer.headRotation = (float) ((double) this.drawPlayer.velocity.Y * (double) this.drawPlayer.direction * 0.100000001490116); + if ((double) this.drawPlayer.headRotation < -0.3) + this.drawPlayer.headRotation = -0.3f; + if ((double) this.drawPlayer.headRotation > 0.3) + this.drawPlayer.headRotation = 0.3f; + } + else if (!this.drawPlayer.dead) + this.drawPlayer.headRotation = 0.0f; + this.hairFrame = this.drawPlayer.bodyFrame; + this.hairFrame.Y -= 336; + if (this.hairFrame.Y < 0) + this.hairFrame.Y = 0; + if (this.hideHair) + this.hairFrame.Height = 0; + this.hidesTopSkin = this.drawPlayer.body == 82 || this.drawPlayer.body == 83 || this.drawPlayer.body == 93 || this.drawPlayer.body == 21 || this.drawPlayer.body == 22; + this.hidesBottomSkin = this.drawPlayer.body == 93 || this.drawPlayer.legs == 20 || this.drawPlayer.legs == 21; + this.drawFloatingTube = this.drawPlayer.hasFloatingTube; + this.drawUnicornHorn = this.drawPlayer.hasUnicornHorn; + this.drawFrontAccInNeckAccLayer = false; + if (this.drawPlayer.bodyFrame.Y / this.drawPlayer.bodyFrame.Height == 5) + this.drawFrontAccInNeckAccLayer = this.drawPlayer.front > (sbyte) 0 && this.drawPlayer.front < (sbyte) 9 && ArmorIDs.Front.Sets.DrawsInNeckLayer[(int) this.drawPlayer.front]; + this.helmetOffset = this.drawPlayer.GetHelmetDrawOffset(); + this.CreateCompositeData(); + } + + private void CreateCompositeData() + { + this.frontShoulderOffset = Vector2.Zero; + this.backShoulderOffset = Vector2.Zero; + this.usesCompositeTorso = this.drawPlayer.body > 0 && this.drawPlayer.body < 235 && ArmorIDs.Body.Sets.UsesNewFramingCode[this.drawPlayer.body]; + this.usesCompositeFrontHandAcc = this.drawPlayer.handon > (sbyte) 0 && this.drawPlayer.handon < (sbyte) 22 && ArmorIDs.HandOn.Sets.UsesNewFramingCode[(int) this.drawPlayer.handon]; + this.usesCompositeBackHandAcc = this.drawPlayer.handoff > (sbyte) 0 && this.drawPlayer.handoff < (sbyte) 14 && ArmorIDs.HandOff.Sets.UsesNewFramingCode[(int) this.drawPlayer.handoff]; + if (this.drawPlayer.body < 1) + this.usesCompositeTorso = true; + if (!this.usesCompositeTorso) + return; + Point pt1 = new Point(1, 1); + Point pt2 = new Point(0, 1); + Point pt3 = new Point(); + Point frameIndex1 = new Point(); + Point frameIndex2 = new Point(); + int targetFrameNumber = this.drawPlayer.bodyFrame.Y / this.drawPlayer.bodyFrame.Height; + this.compShoulderOverFrontArm = true; + this.hideCompositeShoulders = false; + bool flag1 = true; + if (this.drawPlayer.body > 0) + flag1 = ArmorIDs.Body.Sets.showsShouldersWhileJumping[this.drawPlayer.body]; + bool flag2 = false; + if (this.drawPlayer.handon > (sbyte) 0) + flag2 = ArmorIDs.HandOn.Sets.UsesOldFramingTexturesForWalking[(int) this.drawPlayer.handon]; + bool flag3 = !flag2; + switch (targetFrameNumber) + { + case 0: + frameIndex2.X = 2; + flag3 = true; + break; + case 1: + frameIndex2.X = 3; + this.compShoulderOverFrontArm = false; + flag3 = true; + break; + case 2: + frameIndex2.X = 4; + this.compShoulderOverFrontArm = false; + flag3 = true; + break; + case 3: + frameIndex2.X = 5; + this.compShoulderOverFrontArm = true; + flag3 = true; + break; + case 4: + frameIndex2.X = 6; + this.compShoulderOverFrontArm = true; + flag3 = true; + break; + case 5: + frameIndex2.X = 2; + frameIndex2.Y = 1; + pt3.X = 1; + this.compShoulderOverFrontArm = false; + flag3 = true; + if (!flag1) + { + this.hideCompositeShoulders = true; + break; + } + break; + case 6: + frameIndex2.X = 3; + frameIndex2.Y = 1; + break; + case 7: + case 8: + case 9: + case 10: + frameIndex2.X = 4; + frameIndex2.Y = 1; + break; + case 11: + case 12: + case 13: + frameIndex2.X = 3; + frameIndex2.Y = 1; + break; + case 14: + frameIndex2.X = 5; + frameIndex2.Y = 1; + break; + case 15: + case 16: + frameIndex2.X = 6; + frameIndex2.Y = 1; + break; + case 17: + frameIndex2.X = 5; + frameIndex2.Y = 1; + break; + case 18: + case 19: + frameIndex2.X = 3; + frameIndex2.Y = 1; + break; + } + this.CreateCompositeData_DetermineShoulderOffsets(this.drawPlayer.body, targetFrameNumber); + this.backShoulderOffset *= new Vector2((float) this.drawPlayer.direction, this.drawPlayer.gravDir); + this.frontShoulderOffset *= new Vector2((float) this.drawPlayer.direction, this.drawPlayer.gravDir); + if (this.drawPlayer.body > 0 && ArmorIDs.Body.Sets.shouldersAreAlwaysInTheBack[this.drawPlayer.body]) + this.compShoulderOverFrontArm = false; + this.usesCompositeFrontHandAcc = flag3; + frameIndex1.X = frameIndex2.X; + frameIndex1.Y = frameIndex2.Y + 2; + this.UpdateCompositeArm(this.drawPlayer.compositeFrontArm, ref this.compositeFrontArmRotation, ref frameIndex2, 7); + this.UpdateCompositeArm(this.drawPlayer.compositeBackArm, ref this.compositeBackArmRotation, ref frameIndex1, 8); + if (!this.drawPlayer.Male) + { + pt1.Y += 2; + pt2.Y += 2; + pt3.Y += 2; + } + this.compBackShoulderFrame = this.CreateCompositeFrameRect(pt1); + this.compFrontShoulderFrame = this.CreateCompositeFrameRect(pt2); + this.compBackArmFrame = this.CreateCompositeFrameRect(frameIndex1); + this.compFrontArmFrame = this.CreateCompositeFrameRect(frameIndex2); + this.compTorsoFrame = this.CreateCompositeFrameRect(pt3); + } + + private void CreateCompositeData_DetermineShoulderOffsets(int armor, int targetFrameNumber) + { + int num = 0; + switch (armor) + { + case 55: + num = 1; + break; + case 71: + num = 2; + break; + case 101: + num = 6; + break; + case 183: + num = 4; + break; + case 201: + num = 5; + break; + case 204: + num = 3; + break; + case 207: + num = 7; + break; + } + switch (num) + { + case 1: + switch (targetFrameNumber) + { + case 6: + this.frontShoulderOffset.X = -2f; + return; + case 7: + case 8: + case 9: + case 10: + this.frontShoulderOffset.X = -4f; + return; + case 11: + case 12: + case 13: + case 14: + this.frontShoulderOffset.X = -2f; + return; + case 15: + return; + case 16: + return; + case 17: + return; + case 18: + case 19: + this.frontShoulderOffset.X = -2f; + return; + default: + return; + } + case 2: + switch (targetFrameNumber) + { + case 6: + this.frontShoulderOffset.X = -2f; + return; + case 7: + case 8: + case 9: + case 10: + this.frontShoulderOffset.X = -4f; + return; + case 11: + case 12: + case 13: + case 14: + this.frontShoulderOffset.X = -2f; + return; + case 15: + return; + case 16: + return; + case 17: + return; + case 18: + case 19: + this.frontShoulderOffset.X = -2f; + return; + default: + return; + } + case 3: + switch (targetFrameNumber) + { + case 7: + case 8: + case 9: + this.frontShoulderOffset.X = -2f; + return; + case 15: + case 16: + case 17: + this.frontShoulderOffset.X = 2f; + return; + default: + return; + } + case 4: + switch (targetFrameNumber) + { + case 6: + this.frontShoulderOffset.X = -2f; + return; + case 7: + case 8: + case 9: + case 10: + this.frontShoulderOffset.X = -4f; + return; + case 11: + case 12: + case 13: + this.frontShoulderOffset.X = -2f; + return; + case 14: + return; + case 15: + case 16: + this.frontShoulderOffset.X = 2f; + return; + case 17: + return; + case 18: + case 19: + this.frontShoulderOffset.X = -2f; + return; + default: + return; + } + case 5: + switch (targetFrameNumber) + { + case 7: + case 8: + case 9: + case 10: + this.frontShoulderOffset.X = -2f; + return; + case 15: + case 16: + this.frontShoulderOffset.X = 2f; + return; + default: + return; + } + case 6: + switch (targetFrameNumber) + { + case 7: + case 8: + case 9: + case 10: + this.frontShoulderOffset.X = -2f; + return; + case 14: + case 15: + case 16: + case 17: + this.frontShoulderOffset.X = 2f; + return; + default: + return; + } + case 7: + switch (targetFrameNumber) + { + case 6: + case 7: + case 8: + case 9: + case 10: + this.frontShoulderOffset.X = -2f; + return; + case 11: + case 12: + case 13: + case 14: + this.frontShoulderOffset.X = -2f; + return; + case 15: + return; + case 16: + return; + case 17: + return; + case 18: + case 19: + this.frontShoulderOffset.X = -2f; + return; + default: + return; + } + } + } + + private Rectangle CreateCompositeFrameRect(Point pt) => new Rectangle(pt.X * 40, pt.Y * 56, 40, 56); + + private void UpdateCompositeArm( + Player.CompositeArmData data, + ref float rotation, + ref Point frameIndex, + int targetX) + { + if (data.enabled) + { + rotation = data.rotation; + switch (data.stretch) + { + case Player.CompositeArmStretchAmount.Full: + frameIndex.X = targetX; + frameIndex.Y = 0; + break; + case Player.CompositeArmStretchAmount.None: + frameIndex.X = targetX; + frameIndex.Y = 3; + break; + case Player.CompositeArmStretchAmount.Quarter: + frameIndex.X = targetX; + frameIndex.Y = 2; + break; + case Player.CompositeArmStretchAmount.ThreeQuarters: + frameIndex.X = targetX; + frameIndex.Y = 1; + break; + } + } + else + rotation = 0.0f; + } + } +} diff --git a/DataStructures/PlayerFishingConditions.cs b/DataStructures/PlayerFishingConditions.cs new file mode 100644 index 0000000..73a34ec --- /dev/null +++ b/DataStructures/PlayerFishingConditions.cs @@ -0,0 +1,18 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.PlayerFishingConditions +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.DataStructures +{ + public struct PlayerFishingConditions + { + public int PolePower; + public int PoleItemType; + public int BaitPower; + public int BaitItemType; + public float LevelMultipliers; + public int FinalFishingLevel; + } +} diff --git a/DataStructures/PlayerInteractionAnchor.cs b/DataStructures/PlayerInteractionAnchor.cs new file mode 100644 index 0000000..3907634 --- /dev/null +++ b/DataStructures/PlayerInteractionAnchor.cs @@ -0,0 +1,42 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.PlayerInteractionAnchor +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.DataStructures +{ + public struct PlayerInteractionAnchor + { + public int interactEntityID; + public int X; + public int Y; + + public PlayerInteractionAnchor(int entityID, int x = -1, int y = -1) + { + this.interactEntityID = entityID; + this.X = x; + this.Y = y; + } + + public bool InUse => this.interactEntityID != -1; + + public void Clear() + { + this.interactEntityID = -1; + this.X = -1; + this.Y = -1; + } + + public void Set(int entityID, int x, int y) + { + this.interactEntityID = entityID; + this.X = x; + this.Y = y; + } + + public bool IsInValidUseTileEntity() => this.InUse && TileEntity.ByID.ContainsKey(this.interactEntityID); + + public TileEntity GetTileEntity() => !this.IsInValidUseTileEntity() ? (TileEntity) null : TileEntity.ByID[this.interactEntityID]; + } +} diff --git a/DataStructures/PlayerMovementAccsCache.cs b/DataStructures/PlayerMovementAccsCache.cs new file mode 100644 index 0000000..0ef282e --- /dev/null +++ b/DataStructures/PlayerMovementAccsCache.cs @@ -0,0 +1,66 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.PlayerMovementAccsCache +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.DataStructures +{ + public struct PlayerMovementAccsCache + { + private bool _readyToPaste; + private bool _mountPreventedFlight; + private bool _mountPreventedExtraJumps; + private int rocketTime; + private float wingTime; + private int rocketDelay; + private int rocketDelay2; + private bool jumpAgainCloud; + private bool jumpAgainSandstorm; + private bool jumpAgainBlizzard; + private bool jumpAgainFart; + private bool jumpAgainSail; + private bool jumpAgainUnicorn; + + public void CopyFrom(Player player) + { + if (this._readyToPaste) + return; + this._readyToPaste = true; + this._mountPreventedFlight = true; + this._mountPreventedExtraJumps = player.mount.BlockExtraJumps; + this.rocketTime = player.rocketTime; + this.rocketDelay = player.rocketDelay; + this.rocketDelay2 = player.rocketDelay2; + this.wingTime = player.wingTime; + this.jumpAgainCloud = player.canJumpAgain_Cloud; + this.jumpAgainSandstorm = player.canJumpAgain_Sandstorm; + this.jumpAgainBlizzard = player.canJumpAgain_Blizzard; + this.jumpAgainFart = player.canJumpAgain_Fart; + this.jumpAgainSail = player.canJumpAgain_Sail; + this.jumpAgainUnicorn = player.canJumpAgain_Unicorn; + } + + public void PasteInto(Player player) + { + if (!this._readyToPaste) + return; + this._readyToPaste = false; + if (this._mountPreventedFlight) + { + player.rocketTime = this.rocketTime; + player.rocketDelay = this.rocketDelay; + player.rocketDelay2 = this.rocketDelay2; + player.wingTime = this.wingTime; + } + if (!this._mountPreventedExtraJumps) + return; + player.canJumpAgain_Cloud = this.jumpAgainCloud; + player.canJumpAgain_Sandstorm = this.jumpAgainSandstorm; + player.canJumpAgain_Blizzard = this.jumpAgainBlizzard; + player.canJumpAgain_Fart = this.jumpAgainFart; + player.canJumpAgain_Sail = this.jumpAgainSail; + player.canJumpAgain_Unicorn = this.jumpAgainUnicorn; + } + } +} diff --git a/DataStructures/Point16.cs b/DataStructures/Point16.cs new file mode 100644 index 0000000..3db3b2e --- /dev/null +++ b/DataStructures/Point16.cs @@ -0,0 +1,56 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.Point16 +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.DataStructures +{ + public struct Point16 + { + public readonly short X; + public readonly short Y; + public static Point16 Zero = new Point16(0, 0); + public static Point16 NegativeOne = new Point16(-1, -1); + + public Point16(Point point) + { + this.X = (short) point.X; + this.Y = (short) point.Y; + } + + public Point16(int X, int Y) + { + this.X = (short) X; + this.Y = (short) Y; + } + + public Point16(short X, short Y) + { + this.X = X; + this.Y = Y; + } + + public static Point16 Max(int firstX, int firstY, int secondX, int secondY) => new Point16(firstX > secondX ? firstX : secondX, firstY > secondY ? firstY : secondY); + + public Point16 Max(int compareX, int compareY) => new Point16((int) this.X > compareX ? (int) this.X : compareX, (int) this.Y > compareY ? (int) this.Y : compareY); + + public Point16 Max(Point16 compareTo) => new Point16((int) this.X > (int) compareTo.X ? this.X : compareTo.X, (int) this.Y > (int) compareTo.Y ? this.Y : compareTo.Y); + + public static bool operator ==(Point16 first, Point16 second) => (int) first.X == (int) second.X && (int) first.Y == (int) second.Y; + + public static bool operator !=(Point16 first, Point16 second) => (int) first.X != (int) second.X || (int) first.Y != (int) second.Y; + + public override bool Equals(object obj) + { + Point16 point16 = (Point16) obj; + return (int) this.X == (int) point16.X && (int) this.Y == (int) point16.Y; + } + + public override int GetHashCode() => (int) this.X << 16 | (int) (ushort) this.Y; + + public override string ToString() => string.Format("{{{0}, {1}}}", (object) this.X, (object) this.Y); + } +} diff --git a/DataStructures/PortableStoolUsage.cs b/DataStructures/PortableStoolUsage.cs new file mode 100644 index 0000000..34ecdcf --- /dev/null +++ b/DataStructures/PortableStoolUsage.cs @@ -0,0 +1,34 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.PortableStoolUsage +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.DataStructures +{ + public struct PortableStoolUsage + { + public bool HasAStool; + public bool IsInUse; + public int HeightBoost; + public int VisualYOffset; + public int MapYOffset; + + public void Reset() + { + this.HasAStool = false; + this.IsInUse = false; + this.HeightBoost = 0; + this.VisualYOffset = 0; + this.MapYOffset = 0; + } + + public void SetStats(int heightBoost, int visualYOffset, int mapYOffset) + { + this.HasAStool = true; + this.HeightBoost = heightBoost; + this.VisualYOffset = visualYOffset; + this.MapYOffset = mapYOffset; + } + } +} diff --git a/DataStructures/SoundPlaySet.cs b/DataStructures/SoundPlaySet.cs new file mode 100644 index 0000000..af2f5ef --- /dev/null +++ b/DataStructures/SoundPlaySet.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.SoundPlaySet +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.DataStructures +{ + public class SoundPlaySet + { + public int IntendedCooldown; + public int SoundType; + public int SoundStyle; + } +} diff --git a/DataStructures/SpriteFrame.cs b/DataStructures/SpriteFrame.cs new file mode 100644 index 0000000..8b66f1a --- /dev/null +++ b/DataStructures/SpriteFrame.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.SpriteFrame +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.DataStructures +{ + public struct SpriteFrame + { + public int PaddingX; + public int PaddingY; + private byte _currentColumn; + private byte _currentRow; + public readonly byte ColumnCount; + public readonly byte RowCount; + + public byte CurrentColumn + { + get => this._currentColumn; + set => this._currentColumn = value; + } + + public byte CurrentRow + { + get => this._currentRow; + set => this._currentRow = value; + } + + public SpriteFrame(byte columns, byte rows) + { + this.PaddingX = 2; + this.PaddingY = 2; + this._currentColumn = (byte) 0; + this._currentRow = (byte) 0; + this.ColumnCount = columns; + this.RowCount = rows; + } + + public SpriteFrame(byte columns, byte rows, byte currentColumn, byte currentRow) + { + this.PaddingX = 2; + this.PaddingY = 2; + this._currentColumn = currentColumn; + this._currentRow = currentRow; + this.ColumnCount = columns; + this.RowCount = rows; + } + + public SpriteFrame With(byte columnToUse, byte rowToUse) + { + SpriteFrame spriteFrame = this; + spriteFrame.CurrentColumn = columnToUse; + spriteFrame.CurrentRow = rowToUse; + return spriteFrame; + } + + public Rectangle GetSourceRectangle(Texture2D texture) + { + int num1 = texture.Width / (int) this.ColumnCount; + int num2 = texture.Height / (int) this.RowCount; + return new Rectangle((int) this.CurrentColumn * num1, (int) this.CurrentRow * num2, num1 - (this.ColumnCount == (byte) 1 ? 0 : this.PaddingX), num2 - (this.RowCount == (byte) 1 ? 0 : this.PaddingY)); + } + } +} diff --git a/DataStructures/TileDataType.cs b/DataStructures/TileDataType.cs new file mode 100644 index 0000000..c4f8047 --- /dev/null +++ b/DataStructures/TileDataType.cs @@ -0,0 +1,24 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.TileDataType +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Terraria.DataStructures +{ + [Flags] + public enum TileDataType + { + Tile = 1, + TilePaint = 2, + Wall = 4, + WallPaint = 8, + Liquid = 16, // 0x00000010 + Wiring = 32, // 0x00000020 + Actuator = 64, // 0x00000040 + Slope = 128, // 0x00000080 + All = Slope | Actuator | Wiring | Liquid | WallPaint | Wall | TilePaint | Tile, // 0x000000FF + } +} diff --git a/DataStructures/TileDrawInfo.cs b/DataStructures/TileDrawInfo.cs new file mode 100644 index 0000000..f9b8bd1 --- /dev/null +++ b/DataStructures/TileDrawInfo.cs @@ -0,0 +1,34 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.TileDrawInfo +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.DataStructures +{ + public class TileDrawInfo + { + public Tile tileCache; + public ushort typeCache; + public short tileFrameX; + public short tileFrameY; + public Texture2D drawTexture; + public Color tileLight; + public int tileTop; + public int tileWidth; + public int tileHeight; + public int halfBrickHeight; + public int addFrY; + public int addFrX; + public SpriteEffects tileSpriteEffect; + public Texture2D glowTexture; + public Rectangle glowSourceRect; + public Color glowColor; + public Vector3[] colorSlices = new Vector3[9]; + public Color finalColor; + public Color colorTint; + } +} diff --git a/DataStructures/TileDrawSorter.cs b/DataStructures/TileDrawSorter.cs new file mode 100644 index 0000000..7eef3ef --- /dev/null +++ b/DataStructures/TileDrawSorter.cs @@ -0,0 +1,63 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.TileDrawSorter +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; + +namespace Terraria.DataStructures +{ + public class TileDrawSorter + { + public TileDrawSorter.TileTexPoint[] tilesToDraw; + private int _holderLength; + private int _currentCacheIndex; + private TileDrawSorter.CustomComparer _tileComparer = new TileDrawSorter.CustomComparer(); + + public TileDrawSorter() + { + this._currentCacheIndex = 0; + this._holderLength = 9000; + this.tilesToDraw = new TileDrawSorter.TileTexPoint[this._holderLength]; + } + + public void reset() => this._currentCacheIndex = 0; + + public void Cache(int x, int y, int type) + { + int index = this._currentCacheIndex++; + this.tilesToDraw[index].X = x; + this.tilesToDraw[index].Y = y; + this.tilesToDraw[index].TileType = type; + if (this._currentCacheIndex != this._holderLength) + return; + this.IncreaseArraySize(); + } + + private void IncreaseArraySize() + { + this._holderLength *= 2; + Array.Resize(ref this.tilesToDraw, this._holderLength); + } + + public void Sort() => Array.Sort(this.tilesToDraw, 0, this._currentCacheIndex, (IComparer) this._tileComparer); + + public int GetAmountToDraw() => this._currentCacheIndex; + + public struct TileTexPoint + { + public int X; + public int Y; + public int TileType; + + public override string ToString() => string.Format("X:{0}, Y:{1}, Type:{2}", (object) this.X, (object) this.Y, (object) this.TileType); + } + + public class CustomComparer : Comparer + { + public override int Compare(TileDrawSorter.TileTexPoint x, TileDrawSorter.TileTexPoint y) => x.TileType.CompareTo(y.TileType); + } + } +} diff --git a/DataStructures/TileEntitiesManager.cs b/DataStructures/TileEntitiesManager.cs new file mode 100644 index 0000000..eba39a4 --- /dev/null +++ b/DataStructures/TileEntitiesManager.cs @@ -0,0 +1,51 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.TileEntitiesManager +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using Terraria.GameContent.Tile_Entities; + +namespace Terraria.DataStructures +{ + public class TileEntitiesManager + { + private int _nextEntityID; + private Dictionary _types = new Dictionary(); + + private int AssignNewID() => this._nextEntityID++; + + private bool InvalidEntityID(int id) => id < 0 || id >= this._nextEntityID; + + public void RegisterAll() + { + this.Register((TileEntity) new TETrainingDummy()); + this.Register((TileEntity) new TEItemFrame()); + this.Register((TileEntity) new TELogicSensor()); + this.Register((TileEntity) new TEDisplayDoll()); + this.Register((TileEntity) new TEWeaponsRack()); + this.Register((TileEntity) new TEHatRack()); + this.Register((TileEntity) new TEFoodPlatter()); + this.Register((TileEntity) new TETeleportationPylon()); + } + + public void Register(TileEntity entity) + { + int num = this.AssignNewID(); + this._types[num] = entity; + entity.RegisterTileEntityID(num); + } + + public bool CheckValidTile(int id, int x, int y) => !this.InvalidEntityID(id) && this._types[id].IsTileValidForEntity(x, y); + + public void NetPlaceEntity(int id, int x, int y) + { + if (this.InvalidEntityID(id) || !this._types[id].IsTileValidForEntity(x, y)) + return; + this._types[id].NetPlaceEntityAttempt(x, y); + } + + public TileEntity GenerateInstance(int id) => this.InvalidEntityID(id) ? (TileEntity) null : this._types[id].GenerateInstance(); + } +} diff --git a/DataStructures/TileEntity.cs b/DataStructures/TileEntity.cs new file mode 100644 index 0000000..2a3fe61 --- /dev/null +++ b/DataStructures/TileEntity.cs @@ -0,0 +1,219 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.TileEntity +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.IO; +using Terraria.Audio; +using Terraria.GameInput; + +namespace Terraria.DataStructures +{ + public abstract class TileEntity + { + public static TileEntitiesManager manager; + public const int MaxEntitiesPerChunk = 1000; + public static Dictionary ByID = new Dictionary(); + public static Dictionary ByPosition = new Dictionary(); + public static int TileEntitiesNextID; + public int ID; + public Point16 Position; + public byte type; + + public static int AssignNewID() => TileEntity.TileEntitiesNextID++; + + public static event Action _UpdateStart; + + public static event Action _UpdateEnd; + + public static void Clear() + { + TileEntity.ByID.Clear(); + TileEntity.ByPosition.Clear(); + TileEntity.TileEntitiesNextID = 0; + } + + public static void UpdateStart() + { + if (TileEntity._UpdateStart == null) + return; + TileEntity._UpdateStart(); + } + + public static void UpdateEnd() + { + if (TileEntity._UpdateEnd == null) + return; + TileEntity._UpdateEnd(); + } + + public static void InitializeAll() + { + TileEntity.manager = new TileEntitiesManager(); + TileEntity.manager.RegisterAll(); + } + + public static void PlaceEntityNet(int x, int y, int type) + { + if (!WorldGen.InWorld(x, y) || TileEntity.ByPosition.ContainsKey(new Point16(x, y))) + return; + TileEntity.manager.NetPlaceEntity(type, x, y); + } + + public virtual void Update() + { + } + + public static void Write(BinaryWriter writer, TileEntity ent, bool networkSend = false) + { + writer.Write(ent.type); + ent.WriteInner(writer, networkSend); + } + + public static TileEntity Read(BinaryReader reader, bool networkSend = false) + { + byte num = reader.ReadByte(); + TileEntity instance = TileEntity.manager.GenerateInstance((int) num); + instance.type = num; + instance.ReadInner(reader, networkSend); + return instance; + } + + private void WriteInner(BinaryWriter writer, bool networkSend) + { + if (!networkSend) + writer.Write(this.ID); + writer.Write(this.Position.X); + writer.Write(this.Position.Y); + this.WriteExtraData(writer, networkSend); + } + + private void ReadInner(BinaryReader reader, bool networkSend) + { + if (!networkSend) + this.ID = reader.ReadInt32(); + this.Position = new Point16(reader.ReadInt16(), reader.ReadInt16()); + this.ReadExtraData(reader, networkSend); + } + + public virtual void WriteExtraData(BinaryWriter writer, bool networkSend) + { + } + + public virtual void ReadExtraData(BinaryReader reader, bool networkSend) + { + } + + public virtual void OnPlayerUpdate(Player player) + { + } + + public static bool IsOccupied(int id, out int interactingPlayer) + { + interactingPlayer = -1; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + Player player = Main.player[index]; + if (player.active && !player.dead && player.tileEntityAnchor.interactEntityID == id) + { + interactingPlayer = index; + return true; + } + } + return false; + } + + public virtual void OnInventoryDraw(Player player, SpriteBatch spriteBatch) + { + } + + public virtual string GetItemGamepadInstructions(int slot = 0) => ""; + + public virtual bool TryGetItemGamepadOverrideInstructions( + Item[] inv, + int context, + int slot, + out string instruction) + { + instruction = (string) null; + return false; + } + + public virtual bool OverrideItemSlotHover(Item[] inv, int context = 0, int slot = 0) => false; + + public virtual bool OverrideItemSlotLeftClick(Item[] inv, int context = 0, int slot = 0) => false; + + public static void BasicOpenCloseInteraction(Player player, int x, int y, int id) + { + player.CloseSign(); + if (Main.netMode != 1) + { + Main.stackSplit = 600; + player.GamepadEnableGrappleCooldown(); + int interactingPlayer; + if (TileEntity.IsOccupied(id, out interactingPlayer)) + { + if (interactingPlayer != player.whoAmI) + return; + Recipe.FindRecipes(); + SoundEngine.PlaySound(11); + player.tileEntityAnchor.Clear(); + } + else + TileEntity.SetInteractionAnchor(player, x, y, id); + } + else + { + Main.stackSplit = 600; + player.GamepadEnableGrappleCooldown(); + int interactingPlayer; + if (TileEntity.IsOccupied(id, out interactingPlayer)) + { + if (interactingPlayer != player.whoAmI) + return; + Recipe.FindRecipes(); + SoundEngine.PlaySound(11); + player.tileEntityAnchor.Clear(); + NetMessage.SendData(122, number: -1, number2: ((float) Main.myPlayer)); + } + else + NetMessage.SendData(122, number: id, number2: ((float) Main.myPlayer)); + } + } + + public static void SetInteractionAnchor(Player player, int x, int y, int id) + { + player.chest = -1; + player.SetTalkNPC(-1); + if (player.whoAmI == Main.myPlayer) + { + Main.playerInventory = true; + Main.recBigList = false; + Main.CreativeMenu.CloseMenu(); + if (PlayerInput.GrappleAndInteractAreShared) + PlayerInput.Triggers.JustPressed.Grapple = false; + if (player.tileEntityAnchor.interactEntityID != -1) + SoundEngine.PlaySound(12); + else + SoundEngine.PlaySound(10); + } + player.tileEntityAnchor.Set(id, x, y); + } + + public virtual void RegisterTileEntityID(int assignedID) + { + } + + public virtual void NetPlaceEntityAttempt(int x, int y) + { + } + + public virtual bool IsTileValidForEntity(int x, int y) => false; + + public virtual TileEntity GenerateInstance() => (TileEntity) null; + } +} diff --git a/DataStructures/TileObjectPreviewData.cs b/DataStructures/TileObjectPreviewData.cs new file mode 100644 index 0000000..78fe69b --- /dev/null +++ b/DataStructures/TileObjectPreviewData.cs @@ -0,0 +1,175 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.TileObjectPreviewData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Terraria.DataStructures +{ + public class TileObjectPreviewData + { + private ushort _type; + private short _style; + private int _alternate; + private int _random; + private bool _active; + private Point16 _size; + private Point16 _coordinates; + private Point16 _objectStart; + private int[,] _data; + private Point16 _dataSize; + private float _percentValid; + public static TileObjectPreviewData placementCache; + public static TileObjectPreviewData randomCache; + public const int None = 0; + public const int ValidSpot = 1; + public const int InvalidSpot = 2; + + public void Reset() + { + this._active = false; + this._size = Point16.Zero; + this._coordinates = Point16.Zero; + this._objectStart = Point16.Zero; + this._percentValid = 0.0f; + this._type = (ushort) 0; + this._style = (short) 0; + this._alternate = -1; + this._random = -1; + if (this._data == null) + return; + Array.Clear((Array) this._data, 0, (int) this._dataSize.X * (int) this._dataSize.Y); + } + + public void CopyFrom(TileObjectPreviewData copy) + { + this._type = copy._type; + this._style = copy._style; + this._alternate = copy._alternate; + this._random = copy._random; + this._active = copy._active; + this._size = copy._size; + this._coordinates = copy._coordinates; + this._objectStart = copy._objectStart; + this._percentValid = copy._percentValid; + if (this._data == null) + { + this._data = new int[(int) copy._dataSize.X, (int) copy._dataSize.Y]; + this._dataSize = copy._dataSize; + } + else + Array.Clear((Array) this._data, 0, this._data.Length); + if ((int) this._dataSize.X < (int) copy._dataSize.X || (int) this._dataSize.Y < (int) copy._dataSize.Y) + { + int X = (int) copy._dataSize.X > (int) this._dataSize.X ? (int) copy._dataSize.X : (int) this._dataSize.X; + int Y = (int) copy._dataSize.Y > (int) this._dataSize.Y ? (int) copy._dataSize.Y : (int) this._dataSize.Y; + this._data = new int[X, Y]; + this._dataSize = new Point16(X, Y); + } + for (int index1 = 0; index1 < (int) copy._dataSize.X; ++index1) + { + for (int index2 = 0; index2 < (int) copy._dataSize.Y; ++index2) + this._data[index1, index2] = copy._data[index1, index2]; + } + } + + public bool Active + { + get => this._active; + set => this._active = value; + } + + public ushort Type + { + get => this._type; + set => this._type = value; + } + + public short Style + { + get => this._style; + set => this._style = value; + } + + public int Alternate + { + get => this._alternate; + set => this._alternate = value; + } + + public int Random + { + get => this._random; + set => this._random = value; + } + + public Point16 Size + { + get => this._size; + set + { + if (value.X <= (short) 0 || value.Y <= (short) 0) + throw new FormatException("PlacementData.Size was set to a negative value."); + if ((int) value.X > (int) this._dataSize.X || (int) value.Y > (int) this._dataSize.Y) + { + int X = (int) value.X > (int) this._dataSize.X ? (int) value.X : (int) this._dataSize.X; + int Y = (int) value.Y > (int) this._dataSize.Y ? (int) value.Y : (int) this._dataSize.Y; + int[,] numArray = new int[X, Y]; + if (this._data != null) + { + for (int index1 = 0; index1 < (int) this._dataSize.X; ++index1) + { + for (int index2 = 0; index2 < (int) this._dataSize.Y; ++index2) + numArray[index1, index2] = this._data[index1, index2]; + } + } + this._data = numArray; + this._dataSize = new Point16(X, Y); + } + this._size = value; + } + } + + public Point16 Coordinates + { + get => this._coordinates; + set => this._coordinates = value; + } + + public Point16 ObjectStart + { + get => this._objectStart; + set => this._objectStart = value; + } + + public void AllInvalid() + { + for (int index1 = 0; index1 < (int) this._size.X; ++index1) + { + for (int index2 = 0; index2 < (int) this._size.Y; ++index2) + { + if (this._data[index1, index2] != 0) + this._data[index1, index2] = 2; + } + } + } + + public int this[int x, int y] + { + get + { + if (x < 0 || y < 0 || x >= (int) this._size.X || y >= (int) this._size.Y) + throw new IndexOutOfRangeException(); + return this._data[x, y]; + } + set + { + if (x < 0 || y < 0 || x >= (int) this._size.X || y >= (int) this._size.Y) + throw new IndexOutOfRangeException(); + this._data[x, y] = value; + } + } + } +} diff --git a/DataStructures/WeaponDrawOrder.cs b/DataStructures/WeaponDrawOrder.cs new file mode 100644 index 0000000..a0c3181 --- /dev/null +++ b/DataStructures/WeaponDrawOrder.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.WeaponDrawOrder +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.DataStructures +{ + public enum WeaponDrawOrder + { + BehindBackArm, + BehindFrontArm, + OverFrontArm, + } +} diff --git a/DataStructures/WingStats.cs b/DataStructures/WingStats.cs new file mode 100644 index 0000000..ab9edf6 --- /dev/null +++ b/DataStructures/WingStats.cs @@ -0,0 +1,37 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DataStructures.WingStats +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.DataStructures +{ + public struct WingStats + { + public static readonly WingStats Default; + public int FlyTime; + public float AccRunSpeedOverride; + public float AccRunAccelerationMult; + public bool HasDownHoverStats; + public float DownHoverSpeedOverride; + public float DownHoverAccelerationMult; + + public WingStats( + int flyTime = 100, + float flySpeedOverride = -1f, + float accelerationMultiplier = 1f, + bool hasHoldDownHoverFeatures = false, + float hoverFlySpeedOverride = -1f, + float hoverAccelerationMultiplier = 1f) + { + this.FlyTime = flyTime; + this.AccRunSpeedOverride = flySpeedOverride; + this.AccRunAccelerationMult = accelerationMultiplier; + this.HasDownHoverStats = hasHoldDownHoverFeatures; + this.DownHoverSpeedOverride = hoverFlySpeedOverride; + this.DownHoverAccelerationMult = hoverAccelerationMultiplier; + } + + public WingStats WithSpeedBoost(float multiplier) => new WingStats(this.FlyTime, this.AccRunSpeedOverride * multiplier, this.AccRunAccelerationMult, this.HasDownHoverStats, this.DownHoverSpeedOverride * multiplier, this.DownHoverAccelerationMult); + } +} diff --git a/DelegateMethods.cs b/DelegateMethods.cs new file mode 100644 index 0000000..af3144a --- /dev/null +++ b/DelegateMethods.cs @@ -0,0 +1,394 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DelegateMethods +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.Graphics.Shaders; +using Terraria.ID; + +namespace Terraria +{ + public static class DelegateMethods + { + public static Vector3 v3_1 = Vector3.Zero; + public static Vector2 v2_1 = Vector2.Zero; + public static float f_1 = 0.0f; + public static Color c_1 = Color.Transparent; + public static int i_1; + public static TileCuttingContext tilecut_0 = TileCuttingContext.Unknown; + + public static Color ColorLerp_BlackToWhite(float percent) => Color.Lerp(Color.Black, Color.White, percent); + + public static Color ColorLerp_HSL_H(float percent) => Main.hslToRgb(percent, 1f, 0.5f); + + public static Color ColorLerp_HSL_S(float percent) => Main.hslToRgb(DelegateMethods.v3_1.X, percent, DelegateMethods.v3_1.Z); + + public static Color ColorLerp_HSL_L(float percent) => Main.hslToRgb(DelegateMethods.v3_1.X, DelegateMethods.v3_1.Y, (float) (0.150000005960464 + 0.850000023841858 * (double) percent)); + + public static Color ColorLerp_HSL_O(float percent) => Color.Lerp(Color.White, Main.hslToRgb(DelegateMethods.v3_1.X, DelegateMethods.v3_1.Y, DelegateMethods.v3_1.Z), percent); + + public static bool SpreadDirt(int x, int y) + { + if ((double) Vector2.Distance(DelegateMethods.v2_1, new Vector2((float) x, (float) y)) > (double) DelegateMethods.f_1 || !WorldGen.PlaceTile(x, y, 0)) + return false; + if (Main.netMode != 0) + NetMessage.SendData(17, number: 1, number2: ((float) x), number3: ((float) y)); + Vector2 Position = new Vector2((float) (x * 16), (float) (y * 16)); + int Type = 0; + for (int index = 0; index < 3; ++index) + { + Dust dust1 = Dust.NewDustDirect(Position, 16, 16, Type, Alpha: 100, newColor: Color.Transparent, Scale: 2.2f); + dust1.noGravity = true; + dust1.velocity.Y -= 1.2f; + dust1.velocity *= 4f; + Dust dust2 = Dust.NewDustDirect(Position, 16, 16, Type, Alpha: 100, newColor: Color.Transparent, Scale: 1.3f); + dust2.velocity.Y -= 1.2f; + dust2.velocity *= 2f; + } + int i = x; + int j1 = y + 1; + if (Main.tile[i, j1] != null && !TileID.Sets.Platforms[(int) Main.tile[i, j1].type] && (Main.tile[i, j1].topSlope() || Main.tile[i, j1].halfBrick())) + { + WorldGen.SlopeTile(i, j1); + if (Main.netMode != 0) + NetMessage.SendData(17, number: 14, number2: ((float) i), number3: ((float) j1)); + } + int j2 = y - 1; + if (Main.tile[i, j2] != null && !TileID.Sets.Platforms[(int) Main.tile[i, j2].type] && Main.tile[i, j2].bottomSlope()) + { + WorldGen.SlopeTile(i, j2); + if (Main.netMode != 0) + NetMessage.SendData(17, number: 14, number2: ((float) i), number3: ((float) j2)); + } + return true; + } + + public static bool SpreadWater(int x, int y) + { + if ((double) Vector2.Distance(DelegateMethods.v2_1, new Vector2((float) x, (float) y)) > (double) DelegateMethods.f_1 || !WorldGen.PlaceLiquid(x, y, (byte) 0, byte.MaxValue)) + return false; + Vector2 Position = new Vector2((float) (x * 16), (float) (y * 16)); + int Type = Dust.dustWater(); + for (int index = 0; index < 3; ++index) + { + Dust dust1 = Dust.NewDustDirect(Position, 16, 16, Type, Alpha: 100, newColor: Color.Transparent, Scale: 2.2f); + dust1.noGravity = true; + dust1.velocity.Y -= 1.2f; + dust1.velocity *= 7f; + Dust dust2 = Dust.NewDustDirect(Position, 16, 16, Type, Alpha: 100, newColor: Color.Transparent, Scale: 1.3f); + dust2.velocity.Y -= 1.2f; + dust2.velocity *= 4f; + } + return true; + } + + public static bool SpreadHoney(int x, int y) + { + if ((double) Vector2.Distance(DelegateMethods.v2_1, new Vector2((float) x, (float) y)) > (double) DelegateMethods.f_1 || !WorldGen.PlaceLiquid(x, y, (byte) 2, byte.MaxValue)) + return false; + Vector2 Position = new Vector2((float) (x * 16), (float) (y * 16)); + int Type = 152; + for (int index = 0; index < 3; ++index) + { + Dust dust1 = Dust.NewDustDirect(Position, 16, 16, Type, Alpha: 100, newColor: Color.Transparent, Scale: 2.2f); + dust1.velocity.Y -= 1.2f; + dust1.velocity *= 7f; + Dust dust2 = Dust.NewDustDirect(Position, 16, 16, Type, Alpha: 100, newColor: Color.Transparent, Scale: 1.3f); + dust2.velocity.Y -= 1.2f; + dust2.velocity *= 4f; + } + return true; + } + + public static bool SpreadLava(int x, int y) + { + if ((double) Vector2.Distance(DelegateMethods.v2_1, new Vector2((float) x, (float) y)) > (double) DelegateMethods.f_1 || !WorldGen.PlaceLiquid(x, y, (byte) 1, byte.MaxValue)) + return false; + Vector2 Position = new Vector2((float) (x * 16), (float) (y * 16)); + int Type = 35; + for (int index = 0; index < 3; ++index) + { + Dust.NewDustDirect(Position, 16, 16, Type, Alpha: 100, newColor: Color.Transparent, Scale: 1.2f).velocity *= 7f; + Dust.NewDustDirect(Position, 16, 16, Type, Alpha: 100, newColor: Color.Transparent, Scale: 0.8f).velocity *= 4f; + } + return true; + } + + public static bool SpreadDry(int x, int y) + { + if ((double) Vector2.Distance(DelegateMethods.v2_1, new Vector2((float) x, (float) y)) > (double) DelegateMethods.f_1 || !WorldGen.EmptyLiquid(x, y)) + return false; + Vector2 Position = new Vector2((float) (x * 16), (float) (y * 16)); + int Type = 31; + for (int index = 0; index < 3; ++index) + { + Dust dust = Dust.NewDustDirect(Position, 16, 16, Type, Alpha: 100, newColor: Color.Transparent, Scale: 1.2f); + dust.noGravity = true; + dust.velocity *= 7f; + Dust.NewDustDirect(Position, 16, 16, Type, Alpha: 100, newColor: Color.Transparent, Scale: 0.8f).velocity *= 4f; + } + return true; + } + + public static bool SpreadTest(int x, int y) + { + Tile tile = Main.tile[x, y]; + if (!WorldGen.SolidTile(x, y) && tile.wall == (ushort) 0) + return true; + tile.active(); + return false; + } + + public static bool TestDust(int x, int y) + { + if (x < 0 || x >= Main.maxTilesX || y < 0 || y >= Main.maxTilesY) + return false; + int index = Dust.NewDust(new Vector2((float) x, (float) y) * 16f + new Vector2(8f), 0, 0, 6); + Main.dust[index].noGravity = true; + Main.dust[index].noLight = true; + return true; + } + + public static bool CastLight(int x, int y) + { + if (x < 0 || x >= Main.maxTilesX || y < 0 || y >= Main.maxTilesY || Main.tile[x, y] == null) + return false; + Lighting.AddLight(x, y, DelegateMethods.v3_1.X, DelegateMethods.v3_1.Y, DelegateMethods.v3_1.Z); + return true; + } + + public static bool CastLightOpen(int x, int y) + { + if (x < 0 || x >= Main.maxTilesX || y < 0 || y >= Main.maxTilesY || Main.tile[x, y] == null) + return false; + if (!Main.tile[x, y].active() || Main.tile[x, y].inActive() || Main.tileSolidTop[(int) Main.tile[x, y].type] || !Main.tileSolid[(int) Main.tile[x, y].type]) + Lighting.AddLight(x, y, DelegateMethods.v3_1.X, DelegateMethods.v3_1.Y, DelegateMethods.v3_1.Z); + return true; + } + + public static bool CastLightOpen_StopForSolids_ScaleWithDistance(int x, int y) + { + if (x < 0 || x >= Main.maxTilesX || y < 0 || y >= Main.maxTilesY || Main.tile[x, y] == null || Main.tile[x, y].active() && !Main.tile[x, y].inActive() && !Main.tileSolidTop[(int) Main.tile[x, y].type] && Main.tileSolid[(int) Main.tile[x, y].type]) + return false; + Vector3 v31 = DelegateMethods.v3_1; + Vector2 vector2 = new Vector2((float) x, (float) y); + float num = Vector2.Distance(DelegateMethods.v2_1, vector2); + Vector3 vector3 = v31 * MathHelper.Lerp(0.65f, 1f, num / DelegateMethods.f_1); + Lighting.AddLight(x, y, vector3.X, vector3.Y, vector3.Z); + return true; + } + + public static bool EmitGolfCartDust_StopForSolids(int x, int y) + { + if (x < 0 || x >= Main.maxTilesX || y < 0 || y >= Main.maxTilesY || Main.tile[x, y] == null || Main.tile[x, y].active() && !Main.tile[x, y].inActive() && !Main.tileSolidTop[(int) Main.tile[x, y].type] && Main.tileSolid[(int) Main.tile[x, y].type]) + return false; + Dust.NewDustPerfect(new Vector2((float) (x * 16 + 8), (float) (y * 16 + 8)), 260, new Vector2?(Vector2.UnitY * -0.2f)); + return true; + } + + public static bool NotDoorStand(int x, int y) + { + if (Main.tile[x, y] == null || !Main.tile[x, y].active() || Main.tile[x, y].type != (ushort) 11) + return true; + return Main.tile[x, y].frameX >= (short) 18 && Main.tile[x, y].frameX < (short) 54; + } + + public static bool CutTiles(int x, int y) + { + if (!WorldGen.InWorld(x, y, 1) || Main.tile[x, y] == null) + return false; + if (!Main.tileCut[(int) Main.tile[x, y].type] || !WorldGen.CanCutTile(x, y, DelegateMethods.tilecut_0)) + return true; + WorldGen.KillTile(x, y); + if (Main.netMode != 0) + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y)); + return true; + } + + public static bool SearchAvoidedByNPCs(int x, int y) => WorldGen.InWorld(x, y, 1) && Main.tile[x, y] != null && (!Main.tile[x, y].active() || !TileID.Sets.AvoidedByNPCs[(int) Main.tile[x, y].type]); + + public static void RainbowLaserDraw( + int stage, + Vector2 currentPosition, + float distanceLeft, + Rectangle lastFrame, + out float distCovered, + out Rectangle frame, + out Vector2 origin, + out Color color) + { + color = DelegateMethods.c_1; + switch (stage) + { + case 0: + distCovered = 33f; + frame = new Rectangle(0, 0, 26, 22); + origin = frame.Size() / 2f; + break; + case 1: + frame = new Rectangle(0, 25, 26, 28); + distCovered = (float) frame.Height; + origin = new Vector2((float) (frame.Width / 2), 0.0f); + break; + case 2: + distCovered = 22f; + frame = new Rectangle(0, 56, 26, 22); + origin = new Vector2((float) (frame.Width / 2), 1f); + break; + default: + distCovered = 9999f; + frame = Rectangle.Empty; + origin = Vector2.Zero; + color = Color.Transparent; + break; + } + } + + public static void TurretLaserDraw( + int stage, + Vector2 currentPosition, + float distanceLeft, + Rectangle lastFrame, + out float distCovered, + out Rectangle frame, + out Vector2 origin, + out Color color) + { + color = DelegateMethods.c_1; + switch (stage) + { + case 0: + distCovered = 32f; + frame = new Rectangle(0, 0, 22, 20); + origin = frame.Size() / 2f; + break; + case 1: + ++DelegateMethods.i_1; + int num = DelegateMethods.i_1 % 5; + frame = new Rectangle(0, 22 * (num + 1), 22, 20); + distCovered = (float) (frame.Height - 1); + origin = new Vector2((float) (frame.Width / 2), 0.0f); + break; + case 2: + frame = new Rectangle(0, 154, 22, 30); + distCovered = (float) frame.Height; + origin = new Vector2((float) (frame.Width / 2), 1f); + break; + default: + distCovered = 9999f; + frame = Rectangle.Empty; + origin = Vector2.Zero; + color = Color.Transparent; + break; + } + } + + public static void LightningLaserDraw( + int stage, + Vector2 currentPosition, + float distanceLeft, + Rectangle lastFrame, + out float distCovered, + out Rectangle frame, + out Vector2 origin, + out Color color) + { + color = DelegateMethods.c_1 * DelegateMethods.f_1; + switch (stage) + { + case 0: + distCovered = 0.0f; + frame = new Rectangle(0, 0, 21, 8); + origin = frame.Size() / 2f; + break; + case 1: + frame = new Rectangle(0, 8, 21, 6); + distCovered = (float) frame.Height; + origin = new Vector2((float) (frame.Width / 2), 0.0f); + break; + case 2: + distCovered = 8f; + frame = new Rectangle(0, 14, 21, 8); + origin = new Vector2((float) (frame.Width / 2), 2f); + break; + default: + distCovered = 9999f; + frame = Rectangle.Empty; + origin = Vector2.Zero; + color = Color.Transparent; + break; + } + } + + public static int CompareYReverse(Point a, Point b) => b.Y.CompareTo(a.Y); + + public static int CompareDrawSorterByYScale(DrawData a, DrawData b) => a.scale.Y.CompareTo(b.scale.Y); + + public static class Minecart + { + public static Vector2 rotationOrigin; + public static float rotation; + + public static void Sparks(Vector2 dustPosition) + { + dustPosition += new Vector2(Main.rand.Next(2) == 0 ? 13f : -13f, 0.0f).RotatedBy((double) DelegateMethods.Minecart.rotation); + int index = Dust.NewDust(dustPosition, 1, 1, 213, (float) Main.rand.Next(-2, 3), (float) Main.rand.Next(-2, 3)); + Main.dust[index].noGravity = true; + Main.dust[index].fadeIn = (float) ((double) Main.dust[index].scale + 1.0 + 0.00999999977648258 * (double) Main.rand.Next(0, 51)); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= (float) Main.rand.Next(15, 51) * 0.01f; + Main.dust[index].velocity.X *= (float) Main.rand.Next(25, 101) * 0.01f; + Main.dust[index].velocity.Y -= (float) Main.rand.Next(15, 31) * 0.1f; + Main.dust[index].position.Y -= 4f; + if (Main.rand.Next(3) != 0) + Main.dust[index].noGravity = false; + else + Main.dust[index].scale *= 0.6f; + } + + public static void LandingSound(Vector2 Position, int Width, int Height) => SoundEngine.PlaySound(SoundID.Item53, (int) Position.X + Width / 2, (int) Position.Y + Height / 2); + + public static void BumperSound(Vector2 Position, int Width, int Height) => SoundEngine.PlaySound(SoundID.Item56, (int) Position.X + Width / 2, (int) Position.Y + Height / 2); + + public static void SparksMech(Vector2 dustPosition) + { + dustPosition += new Vector2(Main.rand.Next(2) == 0 ? 13f : -13f, 0.0f).RotatedBy((double) DelegateMethods.Minecart.rotation); + int index = Dust.NewDust(dustPosition, 1, 1, 260, (float) Main.rand.Next(-2, 3), (float) Main.rand.Next(-2, 3)); + Main.dust[index].noGravity = true; + Main.dust[index].fadeIn = (float) ((double) Main.dust[index].scale + 0.5 + 0.00999999977648258 * (double) Main.rand.Next(0, 51)); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= (float) Main.rand.Next(15, 51) * 0.01f; + Main.dust[index].velocity.X *= (float) Main.rand.Next(25, 101) * 0.01f; + Main.dust[index].velocity.Y -= (float) Main.rand.Next(15, 31) * 0.1f; + Main.dust[index].position.Y -= 4f; + if (Main.rand.Next(3) != 0) + Main.dust[index].noGravity = false; + else + Main.dust[index].scale *= 0.6f; + } + + public static void SparksMeow(Vector2 dustPosition) + { + dustPosition += new Vector2(Main.rand.Next(2) == 0 ? 13f : -13f, 0.0f).RotatedBy((double) DelegateMethods.Minecart.rotation); + int index = Dust.NewDust(dustPosition, 1, 1, 213, (float) Main.rand.Next(-2, 3), (float) Main.rand.Next(-2, 3)); + Main.dust[index].shader = GameShaders.Armor.GetShaderFromItemId(2870); + Main.dust[index].noGravity = true; + Main.dust[index].fadeIn = (float) ((double) Main.dust[index].scale + 1.0 + 0.00999999977648258 * (double) Main.rand.Next(0, 51)); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= (float) Main.rand.Next(15, 51) * 0.01f; + Main.dust[index].velocity.X *= (float) Main.rand.Next(25, 101) * 0.01f; + Main.dust[index].velocity.Y -= (float) Main.rand.Next(15, 31) * 0.1f; + Main.dust[index].position.Y -= 4f; + if (Main.rand.Next(3) != 0) + Main.dust[index].noGravity = false; + else + Main.dust[index].scale *= 0.6f; + } + } + } +} diff --git a/DeprecatedClassLeftInForLoading.cs b/DeprecatedClassLeftInForLoading.cs new file mode 100644 index 0000000..3476b12 --- /dev/null +++ b/DeprecatedClassLeftInForLoading.cs @@ -0,0 +1,145 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.DeprecatedClassLeftInForLoading +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; + +namespace Terraria +{ + public class DeprecatedClassLeftInForLoading + { + public const int MaxDummies = 1000; + public static DeprecatedClassLeftInForLoading[] dummies = new DeprecatedClassLeftInForLoading[1000]; + public short x; + public short y; + public int npc; + public int whoAmI; + + public static void UpdateDummies() + { + Dictionary dictionary = new Dictionary(); + bool flag1 = false; + Rectangle rectangle = new Rectangle(0, 0, 32, 48); + rectangle.Inflate(1600, 1600); + int x = rectangle.X; + int y = rectangle.Y; + for (int index = 0; index < 1000; ++index) + { + if (DeprecatedClassLeftInForLoading.dummies[index] != null) + { + DeprecatedClassLeftInForLoading.dummies[index].whoAmI = index; + if (DeprecatedClassLeftInForLoading.dummies[index].npc != -1) + { + if (!Main.npc[DeprecatedClassLeftInForLoading.dummies[index].npc].active || Main.npc[DeprecatedClassLeftInForLoading.dummies[index].npc].type != 488 || (double) Main.npc[DeprecatedClassLeftInForLoading.dummies[index].npc].ai[0] != (double) DeprecatedClassLeftInForLoading.dummies[index].x || (double) Main.npc[DeprecatedClassLeftInForLoading.dummies[index].npc].ai[1] != (double) DeprecatedClassLeftInForLoading.dummies[index].y) + DeprecatedClassLeftInForLoading.dummies[index].Deactivate(); + } + else + { + if (!flag1) + { + for (int key = 0; key < (int) byte.MaxValue; ++key) + { + if (Main.player[key].active) + dictionary[key] = Main.player[key].getRect(); + } + flag1 = true; + } + rectangle.X = (int) DeprecatedClassLeftInForLoading.dummies[index].x * 16 + x; + rectangle.Y = (int) DeprecatedClassLeftInForLoading.dummies[index].y * 16 + y; + bool flag2 = false; + foreach (KeyValuePair keyValuePair in dictionary) + { + if (keyValuePair.Value.Intersects(rectangle)) + { + flag2 = true; + break; + } + } + if (flag2) + DeprecatedClassLeftInForLoading.dummies[index].Activate(); + } + } + } + } + + public DeprecatedClassLeftInForLoading(int x, int y) + { + this.x = (short) x; + this.y = (short) y; + this.npc = -1; + } + + public static int Find(int x, int y) + { + for (int index = 0; index < 1000; ++index) + { + if (DeprecatedClassLeftInForLoading.dummies[index] != null && (int) DeprecatedClassLeftInForLoading.dummies[index].x == x && (int) DeprecatedClassLeftInForLoading.dummies[index].y == y) + return index; + } + return -1; + } + + public static int Place(int x, int y) + { + int index1 = -1; + for (int index2 = 0; index2 < 1000; ++index2) + { + if (DeprecatedClassLeftInForLoading.dummies[index2] == null) + { + index1 = index2; + break; + } + } + if (index1 == -1) + return index1; + DeprecatedClassLeftInForLoading.dummies[index1] = new DeprecatedClassLeftInForLoading(x, y); + return index1; + } + + public static void Kill(int x, int y) + { + for (int index = 0; index < 1000; ++index) + { + DeprecatedClassLeftInForLoading dummy = DeprecatedClassLeftInForLoading.dummies[index]; + if (dummy != null && (int) dummy.x == x && (int) dummy.y == y) + DeprecatedClassLeftInForLoading.dummies[index] = (DeprecatedClassLeftInForLoading) null; + } + } + + public static int Hook_AfterPlacement(int x, int y, int type = 21, int style = 0, int direction = 1) + { + if (Main.netMode != 1) + return DeprecatedClassLeftInForLoading.Place(x - 1, y - 2); + NetMessage.SendTileSquare(Main.myPlayer, x - 1, y - 1, 3); + NetMessage.SendData(87, number: (x - 1), number2: ((float) (y - 2))); + return -1; + } + + public void Activate() + { + int index = NPC.NewNPC((int) this.x * 16 + 16, (int) this.y * 16 + 48, 488, 100); + Main.npc[index].ai[0] = (float) this.x; + Main.npc[index].ai[1] = (float) this.y; + Main.npc[index].netUpdate = true; + this.npc = index; + if (Main.netMode == 1) + return; + NetMessage.SendData(86, number: this.whoAmI, number2: ((float) this.x), number3: ((float) this.y)); + } + + public void Deactivate() + { + if (this.npc != -1) + Main.npc[this.npc].active = false; + this.npc = -1; + if (Main.netMode == 1) + return; + NetMessage.SendData(86, number: this.whoAmI, number2: ((float) this.x), number3: ((float) this.y)); + } + + public override string ToString() => this.x.ToString() + "x " + (object) this.y + "y npc: " + (object) this.npc; + } +} diff --git a/Dust.cs b/Dust.cs new file mode 100644 index 0000000..28dffaf --- /dev/null +++ b/Dust.cs @@ -0,0 +1,2017 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Dust +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using Terraria.GameContent; +using Terraria.GameContent.Events; +using Terraria.Graphics.Shaders; +using Terraria.Utilities; + +namespace Terraria +{ + public class Dust + { + public static float dCount; + public static int lavaBubbles; + public static int SandStormCount; + public int dustIndex; + public Vector2 position; + public Vector2 velocity; + public float fadeIn; + public bool noGravity; + public float scale; + public float rotation; + public bool noLight; + public bool noLightEmittence; + public bool active; + public int type; + public Color color; + public int alpha; + public Rectangle frame; + public ArmorShaderData shader; + public object customData; + public bool firstFrame; + + public static Dust NewDustPerfect( + Vector2 Position, + int Type, + Vector2? Velocity = null, + int Alpha = 0, + Color newColor = default (Color), + float Scale = 1f) + { + Dust dust = Main.dust[Dust.NewDust(Position, 0, 0, Type, Alpha: Alpha, newColor: newColor, Scale: Scale)]; + dust.position = Position; + if (Velocity.HasValue) + dust.velocity = Velocity.Value; + return dust; + } + + public static Dust NewDustDirect( + Vector2 Position, + int Width, + int Height, + int Type, + float SpeedX = 0.0f, + float SpeedY = 0.0f, + int Alpha = 0, + Color newColor = default (Color), + float Scale = 1f) + { + Dust dust = Main.dust[Dust.NewDust(Position, Width, Height, Type, SpeedX, SpeedY, Alpha, newColor, Scale)]; + if (dust.velocity.HasNaNs()) + dust.velocity = Vector2.Zero; + return dust; + } + + public static int NewDust( + Vector2 Position, + int Width, + int Height, + int Type, + float SpeedX = 0.0f, + float SpeedY = 0.0f, + int Alpha = 0, + Color newColor = default (Color), + float Scale = 1f) + { + if (Main.gameMenu) + return 6000; + if (Main.rand == null) + Main.rand = new UnifiedRandom((int) DateTime.Now.Ticks); + if (Main.gamePaused || WorldGen.gen || Main.netMode == 2) + return 6000; + int num1 = (int) (400.0 * (1.0 - (double) Dust.dCount)); + if (!new Rectangle((int) ((double) Main.screenPosition.X - (double) num1), (int) ((double) Main.screenPosition.Y - (double) num1), Main.screenWidth + num1 * 2, Main.screenHeight + num1 * 2).Intersects(new Rectangle((int) Position.X, (int) Position.Y, 10, 10))) + return 6000; + int num2 = 6000; + for (int index = 0; index < 6000; ++index) + { + Dust dust = Main.dust[index]; + if (!dust.active) + { + if ((double) index > (double) Main.maxDustToDraw * 0.9) + { + if (Main.rand.Next(4) != 0) + return 6000; + } + else if ((double) index > (double) Main.maxDustToDraw * 0.8) + { + if (Main.rand.Next(3) != 0) + return 6000; + } + else if ((double) index > (double) Main.maxDustToDraw * 0.7) + { + if (Main.rand.Next(2) == 0) + return 6000; + } + else if ((double) index > (double) Main.maxDustToDraw * 0.6) + { + if (Main.rand.Next(4) == 0) + return 6000; + } + else if ((double) index > (double) Main.maxDustToDraw * 0.5) + { + if (Main.rand.Next(5) == 0) + return 6000; + } + else + Dust.dCount = 0.0f; + int num3 = Width; + int num4 = Height; + if (num3 < 5) + num3 = 5; + if (num4 < 5) + num4 = 5; + num2 = index; + dust.fadeIn = 0.0f; + dust.active = true; + dust.type = Type; + dust.noGravity = false; + dust.color = newColor; + dust.alpha = Alpha; + dust.position.X = (float) ((double) Position.X + (double) Main.rand.Next(num3 - 4) + 4.0); + dust.position.Y = (float) ((double) Position.Y + (double) Main.rand.Next(num4 - 4) + 4.0); + dust.velocity.X = (float) Main.rand.Next(-20, 21) * 0.1f + SpeedX; + dust.velocity.Y = (float) Main.rand.Next(-20, 21) * 0.1f + SpeedY; + dust.frame.X = 10 * Type; + dust.frame.Y = 10 * Main.rand.Next(3); + dust.shader = (ArmorShaderData) null; + dust.customData = (object) null; + dust.noLightEmittence = false; + int num5 = Type; + while (num5 >= 100) + { + num5 -= 100; + dust.frame.X -= 1000; + dust.frame.Y += 30; + } + dust.frame.Width = 8; + dust.frame.Height = 8; + dust.rotation = 0.0f; + dust.scale = (float) (1.0 + (double) Main.rand.Next(-20, 21) * 0.00999999977648258); + dust.scale *= Scale; + dust.noLight = false; + dust.firstFrame = true; + if (dust.type == 228 || dust.type == 279 || dust.type == 269 || dust.type == 135 || dust.type == 6 || dust.type == 242 || dust.type == 75 || dust.type == 169 || dust.type == 29 || dust.type >= 59 && dust.type <= 65 || dust.type == 158 || dust.type == 293 || dust.type == 294 || dust.type == 295 || dust.type == 296 || dust.type == 297 || dust.type == 298 || dust.type == 302) + { + dust.velocity.Y = (float) Main.rand.Next(-10, 6) * 0.1f; + dust.velocity.X *= 0.3f; + dust.scale *= 0.7f; + } + if (dust.type == (int) sbyte.MaxValue || dust.type == 187) + { + dust.velocity *= 0.3f; + dust.scale *= 0.7f; + } + if (dust.type == 33 || dust.type == 52 || dust.type == 266 || dust.type == 98 || dust.type == 99 || dust.type == 100 || dust.type == 101 || dust.type == 102 || dust.type == 103 || dust.type == 104 || dust.type == 105) + { + dust.alpha = 170; + dust.velocity *= 0.5f; + ++dust.velocity.Y; + } + if (dust.type == 41) + dust.velocity *= 0.0f; + if (dust.type == 80) + dust.alpha = 50; + if (dust.type == 34 || dust.type == 35 || dust.type == 152) + { + dust.velocity *= 0.1f; + dust.velocity.Y = -0.5f; + if (dust.type == 34 && !Collision.WetCollision(new Vector2(dust.position.X, dust.position.Y - 8f), 4, 4)) + { + dust.active = false; + break; + } + break; + } + break; + } + } + return num2; + } + + public static Dust CloneDust(int dustIndex) => Dust.CloneDust(Main.dust[dustIndex]); + + public static Dust CloneDust(Dust rf) + { + if (rf.dustIndex == Main.maxDustToDraw) + return rf; + int index = Dust.NewDust(rf.position, 0, 0, rf.type); + Dust dust = Main.dust[index]; + dust.position = rf.position; + dust.velocity = rf.velocity; + dust.fadeIn = rf.fadeIn; + dust.noGravity = rf.noGravity; + dust.scale = rf.scale; + dust.rotation = rf.rotation; + dust.noLight = rf.noLight; + dust.active = rf.active; + dust.type = rf.type; + dust.color = rf.color; + dust.alpha = rf.alpha; + dust.frame = rf.frame; + dust.shader = rf.shader; + dust.customData = rf.customData; + return dust; + } + + public static Dust QuickDust(int x, int y, Color color) => Dust.QuickDust(new Point(x, y), color); + + public static Dust QuickDust(Point tileCoords, Color color) => Dust.QuickDust(tileCoords.ToWorldCoordinates(), color); + + public static void QuickBox( + Vector2 topLeft, + Vector2 bottomRight, + int divisions, + Color color, + Action manipulator) + { + float num1 = (float) (divisions + 2); + for (float num2 = 0.0f; (double) num2 <= (double) (divisions + 2); ++num2) + { + Dust dust1 = Dust.QuickDust(new Vector2(MathHelper.Lerp(topLeft.X, bottomRight.X, num2 / num1), topLeft.Y), color); + if (manipulator != null) + manipulator(dust1); + Dust dust2 = Dust.QuickDust(new Vector2(MathHelper.Lerp(topLeft.X, bottomRight.X, num2 / num1), bottomRight.Y), color); + if (manipulator != null) + manipulator(dust2); + Dust dust3 = Dust.QuickDust(new Vector2(topLeft.X, MathHelper.Lerp(topLeft.Y, bottomRight.Y, num2 / num1)), color); + if (manipulator != null) + manipulator(dust3); + Dust dust4 = Dust.QuickDust(new Vector2(bottomRight.X, MathHelper.Lerp(topLeft.Y, bottomRight.Y, num2 / num1)), color); + if (manipulator != null) + manipulator(dust4); + } + } + + public static Dust QuickDust(Vector2 pos, Color color) + { + Dust dust = Main.dust[Dust.NewDust(pos, 0, 0, 267)]; + dust.position = pos; + dust.velocity = Vector2.Zero; + dust.fadeIn = 1f; + dust.noLight = true; + dust.noGravity = true; + dust.color = color; + return dust; + } + + public static Dust QuickDustSmall(Vector2 pos, Color color, bool floorPositionValues = false) + { + Dust dust = Dust.QuickDust(pos, color); + dust.fadeIn = 0.0f; + dust.scale = 0.35f; + if (floorPositionValues) + dust.position = dust.position.Floor(); + return dust; + } + + public static void QuickDustLine(Vector2 start, Vector2 end, float splits, Color color) + { + Dust.QuickDust(start, color).scale = 2f; + Dust.QuickDust(end, color).scale = 2f; + float num = 1f / splits; + for (float amount = 0.0f; (double) amount < 1.0; amount += num) + Dust.QuickDust(Vector2.Lerp(start, end, amount), color).scale = 2f; + } + + public static int dustWater() + { + switch (Main.waterStyle) + { + case 2: + return 98; + case 3: + return 99; + case 4: + return 100; + case 5: + return 101; + case 6: + return 102; + case 7: + return 103; + case 8: + return 104; + case 9: + return 105; + case 10: + return 123; + case 12: + return 288; + default: + return 33; + } + } + + public static void UpdateDust() + { + int num1 = 0; + Dust.lavaBubbles = 0; + Main.snowDust = 0; + Dust.SandStormCount = 0; + bool flag = Sandstorm.ShouldSandstormDustPersist(); + for (int index1 = 0; index1 < 6000; ++index1) + { + Dust dust = Main.dust[index1]; + if (index1 < Main.maxDustToDraw) + { + if (dust.active) + { + ++Dust.dCount; + if ((double) dust.scale > 10.0) + dust.active = false; + if (dust.firstFrame && !ChildSafety.Disabled && ChildSafety.DangerousDust(dust.type)) + { + if (Main.rand.Next(2) == 0) + { + dust.firstFrame = false; + dust.type = 16; + dust.scale = (float) ((double) Main.rand.NextFloat() * 1.60000002384186 + 0.300000011920929); + dust.color = Color.Transparent; + dust.frame.X = 10 * dust.type; + dust.frame.Y = 10 * Main.rand.Next(3); + dust.shader = (ArmorShaderData) null; + dust.customData = (object) null; + int num2 = dust.type / 100; + dust.frame.X -= 1000 * num2; + dust.frame.Y += 30 * num2; + dust.noGravity = true; + } + else + dust.active = false; + } + switch (dust.type) + { + case 299: + case 300: + case 301: + dust.scale *= 0.96f; + dust.velocity.Y -= 0.01f; + break; + } + if (dust.type == 35) + ++Dust.lavaBubbles; + dust.position += dust.velocity; + if (dust.type == 258) + { + dust.noGravity = true; + dust.scale += 0.015f; + } + if ((dust.type >= 86 && dust.type <= 92 || dust.type == 286) && !dust.noLight && !dust.noLightEmittence) + { + float num3 = dust.scale * 0.6f; + if ((double) num3 > 1.0) + num3 = 1f; + int num4 = dust.type - 85; + float num5 = num3; + float num6 = num3; + float num7 = num3; + switch (num4) + { + case 1: + num5 *= 0.9f; + num6 *= 0.0f; + num7 *= 0.9f; + break; + case 2: + num5 *= 0.9f; + num6 *= 0.9f; + num7 *= 0.0f; + break; + case 3: + num5 *= 0.0f; + num6 *= 0.1f; + num7 *= 1.3f; + break; + case 4: + num5 *= 0.0f; + num6 *= 1f; + num7 *= 0.1f; + break; + case 5: + num5 *= 1f; + num6 *= 0.1f; + num7 *= 0.1f; + break; + case 6: + num5 *= 1.3f; + num6 *= 1.3f; + num7 *= 1.3f; + break; + } + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num3 * num5, num3 * num6, num3 * num7); + } + if (dust.type >= 86 && dust.type <= 92 || dust.type == 286) + { + if (dust.customData != null && dust.customData is Player) + { + Player customData = (Player) dust.customData; + dust.position += customData.position - customData.oldPosition; + } + else if (dust.customData != null && dust.customData is Projectile) + { + Projectile customData = (Projectile) dust.customData; + if (customData.active) + dust.position += customData.position - customData.oldPosition; + } + } + if (dust.type == 262 && !dust.noLight) + { + Vector3 rgb = new Vector3(0.9f, 0.6f, 0.0f) * dust.scale * 0.6f; + Lighting.AddLight(dust.position, rgb); + } + if (dust.type == 240 && dust.customData != null && dust.customData is Projectile) + { + Projectile customData = (Projectile) dust.customData; + if (customData.active) + dust.position += customData.position - customData.oldPosition; + } + if ((dust.type == 259 || dust.type == 6 || dust.type == 158) && dust.customData != null && dust.customData is int) + { + if ((int) dust.customData == 0) + { + if (Collision.SolidCollision(dust.position - Vector2.One * 5f, 10, 10) && (double) dust.fadeIn == 0.0) + { + dust.scale *= 0.9f; + dust.velocity *= 0.25f; + } + } + else if ((int) dust.customData == 1) + { + dust.scale *= 0.98f; + dust.velocity.Y *= 0.98f; + if (Collision.SolidCollision(dust.position - Vector2.One * 5f, 10, 10) && (double) dust.fadeIn == 0.0) + { + dust.scale *= 0.9f; + dust.velocity *= 0.25f; + } + } + } + if (dust.type == 263 || dust.type == 264) + { + if (!dust.noLight) + { + Vector3 rgb = dust.color.ToVector3() * dust.scale * 0.4f; + Lighting.AddLight(dust.position, rgb); + } + if (dust.customData != null && dust.customData is Player) + { + Player customData = (Player) dust.customData; + dust.position += customData.position - customData.oldPosition; + dust.customData = (object) null; + } + else if (dust.customData != null && dust.customData is Projectile) + { + Projectile customData = (Projectile) dust.customData; + dust.position += customData.position - customData.oldPosition; + } + } + if (dust.type == 230) + { + float num8 = dust.scale * 0.6f; + float num9 = num8; + float num10 = num8; + float num11 = num8; + float num12 = num9 * 0.5f; + float num13 = num10 * 0.9f; + float num14 = num11 * 1f; + dust.scale += 0.02f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num8 * num12, num8 * num13, num8 * num14); + if (dust.customData != null && dust.customData is Player) + { + Vector2 center = ((Entity) dust.customData).Center; + Vector2 vector2_1 = dust.position - center; + float val2 = vector2_1.Length(); + Vector2 vector2_2 = vector2_1 / val2; + dust.scale = Math.Min(dust.scale, (float) ((double) val2 / 24.0 - 1.0)); + dust.velocity -= vector2_2 * (100f / Math.Max(50f, val2)); + } + } + if (dust.type == 154 || dust.type == 218) + { + dust.rotation += dust.velocity.X * 0.3f; + dust.scale -= 0.03f; + } + if (dust.type == 172) + { + float num15 = dust.scale * 0.5f; + if ((double) num15 > 1.0) + num15 = 1f; + float num16 = num15; + float num17 = num15; + float num18 = num15; + float num19 = num16 * 0.0f; + float num20 = num17 * 0.25f; + float num21 = num18 * 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num15 * num19, num15 * num20, num15 * num21); + } + if (dust.type == 182) + { + ++dust.rotation; + if (!dust.noLight) + { + float num22 = dust.scale * 0.25f; + if ((double) num22 > 1.0) + num22 = 1f; + float num23 = num22; + float num24 = num22; + float num25 = num22; + float num26 = num23 * 1f; + float num27 = num24 * 0.2f; + float num28 = num25 * 0.1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num22 * num26, num22 * num27, num22 * num28); + } + if (dust.customData != null && dust.customData is Player) + { + Player customData = (Player) dust.customData; + dust.position += customData.position - customData.oldPosition; + dust.customData = (object) null; + } + } + if (dust.type == 261) + { + if (!dust.noLight && !dust.noLightEmittence) + { + float num29 = dust.scale * 0.3f; + if ((double) num29 > 1.0) + num29 = 1f; + Lighting.AddLight(dust.position, new Vector3(0.4f, 0.6f, 0.7f) * num29); + } + if (dust.noGravity) + { + dust.velocity *= 0.93f; + if ((double) dust.fadeIn == 0.0) + dust.scale += 1f / 400f; + } + dust.velocity *= new Vector2(0.97f, 0.99f); + dust.scale -= 1f / 400f; + if (dust.customData != null && dust.customData is Player) + { + Player customData = (Player) dust.customData; + dust.position += customData.position - customData.oldPosition; + } + } + if (dust.type == 254) + { + float num30 = dust.scale * 0.35f; + if ((double) num30 > 1.0) + num30 = 1f; + float num31 = num30; + float num32 = num30; + float num33 = num30; + float num34 = num31 * 0.9f; + float num35 = num32 * 0.1f; + float num36 = num33 * 0.75f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num30 * num34, num30 * num35, num30 * num36); + } + if (dust.type == (int) byte.MaxValue) + { + float num37 = dust.scale * 0.25f; + if ((double) num37 > 1.0) + num37 = 1f; + float num38 = num37; + float num39 = num37; + float num40 = num37; + float num41 = num38 * 0.9f; + float num42 = num39 * 0.1f; + float num43 = num40 * 0.75f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num37 * num41, num37 * num42, num37 * num43); + } + if (dust.type == 211 && dust.noLight && Collision.SolidCollision(dust.position, 4, 4)) + dust.active = false; + if (dust.type == 284 && Collision.SolidCollision(dust.position - Vector2.One * 4f, 8, 8) && (double) dust.fadeIn == 0.0) + dust.velocity *= 0.25f; + if (dust.type == 213 || dust.type == 260) + { + dust.rotation = 0.0f; + float num44 = (float) ((double) dust.scale / 2.5 * 0.200000002980232); + Vector3 vector3_1 = Vector3.Zero; + switch (dust.type) + { + case 213: + vector3_1 = new Vector3((float) byte.MaxValue, 217f, 48f); + break; + case 260: + vector3_1 = new Vector3((float) byte.MaxValue, 48f, 48f); + break; + } + Vector3 vector3_2 = vector3_1 / (float) byte.MaxValue; + if ((double) num44 > 1.0) + num44 = 1f; + Vector3 vector3_3 = vector3_2 * num44; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), vector3_3.X, vector3_3.Y, vector3_3.Z); + } + if (dust.type == 157) + { + float num45 = dust.scale * 0.2f; + float num46 = num45; + float num47 = num45; + float num48 = num45; + float num49 = num46 * 0.25f; + float num50 = num47 * 1f; + float num51 = num48 * 0.5f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num45 * num49, num45 * num50, num45 * num51); + } + if (dust.type == 206) + { + dust.scale -= 0.1f; + float num52 = dust.scale * 0.4f; + float num53 = num52; + float num54 = num52; + float num55 = num52; + float num56 = num53 * 0.1f; + float num57 = num54 * 0.6f; + float num58 = num55 * 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num52 * num56, num52 * num57, num52 * num58); + } + if (dust.type == 163) + { + float num59 = dust.scale * 0.25f; + float num60 = num59; + float num61 = num59; + float num62 = num59; + float num63 = num60 * 0.25f; + float num64 = num61 * 1f; + float num65 = num62 * 0.05f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num59 * num63, num59 * num64, num59 * num65); + } + if (dust.type == 205) + { + float num66 = dust.scale * 0.25f; + float num67 = num66; + float num68 = num66; + float num69 = num66; + float num70 = num67 * 1f; + float num71 = num68 * 0.05f; + float num72 = num69 * 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num66 * num70, num66 * num71, num66 * num72); + } + if (dust.type == 170) + { + float num73 = dust.scale * 0.5f; + float num74 = num73; + float num75 = num73; + float num76 = num73; + float num77 = num74 * 1f; + float num78 = num75 * 1f; + float num79 = num76 * 0.05f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num73 * num77, num73 * num78, num73 * num79); + } + if (dust.type == 156) + { + float lightAmount = dust.scale * 0.6f; + int type = dust.type; + float num80 = lightAmount; + float num81 = lightAmount; + float num82 = num80 * 0.9f; + float num83 = num81 * 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), 12, lightAmount); + } + if (dust.type == 234) + { + float lightAmount = dust.scale * 0.6f; + int type = dust.type; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), 13, lightAmount); + } + if (dust.type == 175) + dust.scale -= 0.05f; + if (dust.type == 174) + { + dust.scale -= 0.01f; + float r = dust.scale * 1f; + if ((double) r > 0.600000023841858) + r = 0.6f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), r, r * 0.4f, 0.0f); + } + if (dust.type == 235) + { + Vector2 vector2 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + vector2.Normalize(); + vector2 *= 15f; + dust.scale -= 0.01f; + } + else if (dust.type == 228 || dust.type == 279 || dust.type == 229 || dust.type == 6 || dust.type == 242 || dust.type == 135 || dust.type == (int) sbyte.MaxValue || dust.type == 187 || dust.type == 75 || dust.type == 169 || dust.type == 29 || dust.type >= 59 && dust.type <= 65 || dust.type == 158 || dust.type == 293 || dust.type == 294 || dust.type == 295 || dust.type == 296 || dust.type == 297 || dust.type == 298 || dust.type == 302) + { + if (!dust.noGravity) + dust.velocity.Y += 0.05f; + if (dust.type == 229 || dust.type == 228 || dust.type == 279) + { + if (dust.customData != null && dust.customData is NPC) + { + NPC customData = (NPC) dust.customData; + dust.position += customData.position - customData.oldPos[1]; + } + else if (dust.customData != null && dust.customData is Player) + { + Player customData = (Player) dust.customData; + dust.position += customData.position - customData.oldPosition; + } + else if (dust.customData != null && dust.customData is Vector2) + { + Vector2 vector2 = (Vector2) dust.customData - dust.position; + if (vector2 != Vector2.Zero) + vector2.Normalize(); + dust.velocity = (dust.velocity * 4f + vector2 * dust.velocity.Length()) / 5f; + } + } + if (!dust.noLight && !dust.noLightEmittence) + { + float num84 = dust.scale * 1.4f; + if (dust.type == 29) + { + if ((double) num84 > 1.0) + num84 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num84 * 0.1f, num84 * 0.4f, num84); + } + else if (dust.type == 75) + { + if ((double) num84 > 1.0) + num84 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), 8, num84); + } + else if (dust.type == 169) + { + if ((double) num84 > 1.0) + num84 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), 11, num84); + } + else if (dust.type == 135) + { + if ((double) num84 > 1.0) + num84 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), 9, num84); + } + else if (dust.type == 158) + { + if ((double) num84 > 1.0) + num84 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), 10, num84); + } + else if (dust.type == 228) + { + if ((double) num84 > 1.0) + num84 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num84 * 0.7f, num84 * 0.65f, num84 * 0.3f); + } + else if (dust.type == 229) + { + if ((double) num84 > 1.0) + num84 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num84 * 0.3f, num84 * 0.65f, num84 * 0.7f); + } + else if (dust.type == 242) + { + if ((double) num84 > 1.0) + num84 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), 15, num84); + } + else if (dust.type == 293) + { + if ((double) num84 > 1.0) + num84 = 1f; + float lightAmount = num84 * 0.95f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), 16, lightAmount); + } + else if (dust.type == 294) + { + if ((double) num84 > 1.0) + num84 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), 17, num84); + } + else if (dust.type >= 59 && dust.type <= 65) + { + if ((double) num84 > 0.800000011920929) + num84 = 0.8f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), 1 + dust.type - 59, num84); + } + else if (dust.type == (int) sbyte.MaxValue) + { + float r = num84 * 1.3f; + if ((double) r > 1.0) + r = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), r, r * 0.45f, r * 0.2f); + } + else if (dust.type == 187) + { + float b = num84 * 1.3f; + if ((double) b > 1.0) + b = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), b * 0.2f, b * 0.45f, b); + } + else if (dust.type == 295) + { + if ((double) num84 > 1.0) + num84 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), 18, num84); + } + else if (dust.type == 296) + { + if ((double) num84 > 1.0) + num84 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), 19, num84); + } + else if (dust.type == 297) + { + if ((double) num84 > 1.0) + num84 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), 20, num84); + } + else if (dust.type == 298) + { + if ((double) num84 > 1.0) + num84 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), 21, num84); + } + else + { + if ((double) num84 > 0.600000023841858) + num84 = 0.6f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num84, num84 * 0.65f, num84 * 0.4f); + } + } + } + else if (dust.type == 269) + { + if (!dust.noLight) + { + float num85 = dust.scale * 1.4f; + if ((double) num85 > 1.0) + num85 = 1f; + Vector3 vector3 = new Vector3(0.7f, 0.65f, 0.3f); + Lighting.AddLight(dust.position, vector3 * num85); + } + if (dust.customData != null && dust.customData is Vector2) + { + Vector2 vector2 = (Vector2) dust.customData - dust.position; + dust.velocity.X += 1f * (float) Math.Sign(vector2.X) * dust.scale; + } + } + else if (dust.type == 159) + { + float num86 = dust.scale * 1.3f; + if ((double) num86 > 1.0) + num86 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num86, num86, num86 * 0.1f); + if (dust.noGravity) + { + if ((double) dust.scale < 0.699999988079071) + dust.velocity *= 1.075f; + else if (Main.rand.Next(2) == 0) + dust.velocity *= -0.95f; + else + dust.velocity *= 1.05f; + dust.scale -= 0.03f; + } + else + { + dust.scale += 0.005f; + dust.velocity *= 0.9f; + dust.velocity.X += (float) Main.rand.Next(-10, 11) * 0.02f; + dust.velocity.Y += (float) Main.rand.Next(-10, 11) * 0.02f; + if (Main.rand.Next(5) == 0) + { + int index2 = Dust.NewDust(dust.position, 4, 4, dust.type); + Main.dust[index2].noGravity = true; + Main.dust[index2].scale = dust.scale * 2.5f; + } + } + } + else if (dust.type == 164) + { + float r = dust.scale; + if ((double) r > 1.0) + r = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), r, r * 0.1f, r * 0.8f); + if (dust.noGravity) + { + if ((double) dust.scale < 0.699999988079071) + dust.velocity *= 1.075f; + else if (Main.rand.Next(2) == 0) + dust.velocity *= -0.95f; + else + dust.velocity *= 1.05f; + dust.scale -= 0.03f; + } + else + { + dust.scale -= 0.005f; + dust.velocity *= 0.9f; + dust.velocity.X += (float) Main.rand.Next(-10, 11) * 0.02f; + dust.velocity.Y += (float) Main.rand.Next(-10, 11) * 0.02f; + if (Main.rand.Next(5) == 0) + { + int index3 = Dust.NewDust(dust.position, 4, 4, dust.type); + Main.dust[index3].noGravity = true; + Main.dust[index3].scale = dust.scale * 2.5f; + } + } + } + else if (dust.type == 173) + { + float b = dust.scale; + if ((double) b > 1.0) + b = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), b * 0.4f, b * 0.1f, b); + if (dust.noGravity) + { + dust.velocity *= 0.8f; + dust.velocity.X += (float) Main.rand.Next(-20, 21) * 0.01f; + dust.velocity.Y += (float) Main.rand.Next(-20, 21) * 0.01f; + dust.scale -= 0.01f; + } + else + { + dust.scale -= 0.015f; + dust.velocity *= 0.8f; + dust.velocity.X += (float) Main.rand.Next(-10, 11) * 0.005f; + dust.velocity.Y += (float) Main.rand.Next(-10, 11) * 0.005f; + if (Main.rand.Next(10) == 10) + { + int index4 = Dust.NewDust(dust.position, 4, 4, dust.type); + Main.dust[index4].noGravity = true; + Main.dust[index4].scale = dust.scale; + } + } + } + else if (dust.type == 184) + { + if (!dust.noGravity) + { + dust.velocity *= 0.0f; + dust.scale -= 0.01f; + } + } + else if (dust.type == 160 || dust.type == 162) + { + float num87 = dust.scale * 1.3f; + if ((double) num87 > 1.0) + num87 = 1f; + if (dust.type == 162) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num87, num87 * 0.7f, num87 * 0.1f); + else + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num87 * 0.1f, num87, num87); + if (dust.noGravity) + { + dust.velocity *= 0.8f; + dust.velocity.X += (float) Main.rand.Next(-20, 21) * 0.04f; + dust.velocity.Y += (float) Main.rand.Next(-20, 21) * 0.04f; + dust.scale -= 0.1f; + } + else + { + dust.scale -= 0.1f; + dust.velocity.X += (float) Main.rand.Next(-10, 11) * 0.02f; + dust.velocity.Y += (float) Main.rand.Next(-10, 11) * 0.02f; + if ((double) dust.scale > 0.3 && Main.rand.Next(50) == 0) + { + int index5 = Dust.NewDust(new Vector2(dust.position.X - 4f, dust.position.Y - 4f), 1, 1, dust.type); + Main.dust[index5].noGravity = true; + Main.dust[index5].scale = dust.scale * 1.5f; + } + } + } + else if (dust.type == 168) + { + float r = dust.scale * 0.8f; + if ((double) r > 0.55) + r = 0.55f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), r, 0.0f, r * 0.8f); + dust.scale += 0.03f; + dust.velocity.X += (float) Main.rand.Next(-10, 11) * 0.02f; + dust.velocity.Y += (float) Main.rand.Next(-10, 11) * 0.02f; + dust.velocity *= 0.99f; + } + else if (dust.type >= 139 && dust.type < 143) + { + dust.velocity.X *= 0.98f; + dust.velocity.Y *= 0.98f; + if ((double) dust.velocity.Y < 1.0) + dust.velocity.Y += 0.05f; + dust.scale += 0.009f; + dust.rotation -= dust.velocity.X * 0.4f; + if ((double) dust.velocity.X > 0.0) + dust.rotation += 0.005f; + else + dust.rotation -= 0.005f; + } + else if (dust.type == 14 || dust.type == 16 || dust.type == 31 || dust.type == 46 || dust.type == 124 || dust.type == 186 || dust.type == 188 || dust.type == 303) + { + dust.velocity.Y *= 0.98f; + dust.velocity.X *= 0.98f; + if (dust.type == 31) + { + if (dust.customData != null && dust.customData is NPC) + { + NPC customData = (NPC) dust.customData; + dust.position += customData.position - customData.oldPosition; + if (dust.noGravity) + dust.velocity *= 1.02f; + dust.alpha -= 70; + if (dust.alpha < 0) + dust.alpha = 0; + dust.scale *= 0.97f; + if ((double) dust.scale <= 0.00999999977648258) + { + dust.scale = 0.0001f; + dust.alpha = (int) byte.MaxValue; + } + } + else if (dust.noGravity) + { + dust.velocity *= 1.02f; + dust.scale += 0.02f; + dust.alpha += 4; + if (dust.alpha > (int) byte.MaxValue) + { + dust.scale = 0.0001f; + dust.alpha = (int) byte.MaxValue; + } + } + } + if (dust.type == 303 && dust.noGravity) + { + dust.velocity *= 1.02f; + dust.scale += 0.03f; + if (dust.alpha < 90) + dust.alpha = 90; + dust.alpha += 4; + if (dust.alpha > (int) byte.MaxValue) + { + dust.scale = 0.0001f; + dust.alpha = (int) byte.MaxValue; + } + } + } + else if (dust.type == 32) + { + dust.scale -= 0.01f; + dust.velocity.X *= 0.96f; + if (!dust.noGravity) + dust.velocity.Y += 0.1f; + } + else if (dust.type >= 244 && dust.type <= 247) + { + dust.rotation += 0.1f * dust.scale; + Color color = Lighting.GetColor((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0)); + int num88; + float num89 = (float) (((double) (num88 = (int) (byte) (((int) color.R + (int) color.G + (int) color.B) / 3)) / 270.0 + 1.0) / 2.0); + float num90 = (float) (((double) num88 / 270.0 + 1.0) / 2.0); + float num91 = (float) (((double) num88 / 270.0 + 1.0) / 2.0); + float num92 = num89 * (dust.scale * 0.9f); + float num93 = num90 * (dust.scale * 0.9f); + float num94 = num91 * (dust.scale * 0.9f); + if (dust.alpha < (int) byte.MaxValue) + { + dust.scale += 0.09f; + if ((double) dust.scale >= 1.0) + { + dust.scale = 1f; + dust.alpha = (int) byte.MaxValue; + } + } + else + { + if ((double) dust.scale < 0.8) + dust.scale -= 0.01f; + if ((double) dust.scale < 0.5) + dust.scale -= 0.01f; + } + float num95 = 1f; + if (dust.type == 244) + { + num92 *= 0.8862745f; + num93 *= 0.4627451f; + num94 *= 0.2980392f; + num95 = 0.9f; + } + else if (dust.type == 245) + { + num92 *= 0.5137255f; + num93 *= 0.6745098f; + num94 *= 0.6784314f; + num95 = 1f; + } + else if (dust.type == 246) + { + num92 *= 0.8f; + num93 *= 0.7098039f; + num94 *= 0.282353f; + num95 = 1.1f; + } + else if (dust.type == 247) + { + num92 *= 0.6f; + num93 *= 0.6745098f; + num94 *= 0.7254902f; + num95 = 1.2f; + } + float r = num92 * num95; + float g = num93 * num95; + float b = num94 * num95; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), r, g, b); + } + else if (dust.type == 43) + { + dust.rotation += 0.1f * dust.scale; + Color color = Lighting.GetColor((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0)); + float num96 = (float) color.R / 270f; + float num97 = (float) color.G / 270f; + float num98 = (float) color.B / 270f; + float num99 = (float) dust.color.R / (float) byte.MaxValue; + float num100 = (float) dust.color.G / (float) byte.MaxValue; + float num101 = (float) dust.color.B / (float) byte.MaxValue; + float r = num96 * (dust.scale * 1.07f * num99); + float g = num97 * (dust.scale * 1.07f * num100); + float b = num98 * (dust.scale * 1.07f * num101); + if (dust.alpha < (int) byte.MaxValue) + { + dust.scale += 0.09f; + if ((double) dust.scale >= 1.0) + { + dust.scale = 1f; + dust.alpha = (int) byte.MaxValue; + } + } + else + { + if ((double) dust.scale < 0.8) + dust.scale -= 0.01f; + if ((double) dust.scale < 0.5) + dust.scale -= 0.01f; + } + if ((double) r < 0.05 && (double) g < 0.05 && (double) b < 0.05) + dust.active = false; + else if (!dust.noLightEmittence) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), r, g, b); + if (dust.customData != null && dust.customData is Player) + { + Player customData = (Player) dust.customData; + dust.position += customData.position - customData.oldPosition; + } + } + else if (dust.type == 15 || dust.type == 57 || dust.type == 58 || dust.type == 274 || dust.type == 292) + { + dust.velocity.Y *= 0.98f; + dust.velocity.X *= 0.98f; + if (!dust.noLightEmittence) + { + float num102 = dust.scale; + if (dust.type != 15) + num102 = dust.scale * 0.8f; + if (dust.noLight) + dust.velocity *= 0.95f; + if ((double) num102 > 1.0) + num102 = 1f; + if (dust.type == 15) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num102 * 0.45f, num102 * 0.55f, num102); + else if (dust.type == 57) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num102 * 0.95f, num102 * 0.95f, num102 * 0.45f); + else if (dust.type == 58) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num102, num102 * 0.55f, num102 * 0.75f); + } + } + else if (dust.type == 204) + { + if ((double) dust.fadeIn > (double) dust.scale) + dust.scale += 0.02f; + else + dust.scale -= 0.02f; + dust.velocity *= 0.95f; + } + else if (dust.type == 110) + { + float g = dust.scale * 0.1f; + if ((double) g > 1.0) + g = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), g * 0.2f, g, g * 0.5f); + } + else if (dust.type == 111) + { + float b = dust.scale * 0.125f; + if ((double) b > 1.0) + b = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), b * 0.2f, b * 0.7f, b); + } + else if (dust.type == 112) + { + float num103 = dust.scale * 0.1f; + if ((double) num103 > 1.0) + num103 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num103 * 0.8f, num103 * 0.2f, num103 * 0.8f); + } + else if (dust.type == 113) + { + float num104 = dust.scale * 0.1f; + if ((double) num104 > 1.0) + num104 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num104 * 0.2f, num104 * 0.3f, num104 * 1.3f); + } + else if (dust.type == 114) + { + float num105 = dust.scale * 0.1f; + if ((double) num105 > 1.0) + num105 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num105 * 1.2f, num105 * 0.5f, num105 * 0.4f); + } + else if (dust.type == 66) + { + if ((double) dust.velocity.X < 0.0) + --dust.rotation; + else + ++dust.rotation; + dust.velocity.Y *= 0.98f; + dust.velocity.X *= 0.98f; + dust.scale += 0.02f; + float num106 = dust.scale; + if (dust.type != 15) + num106 = dust.scale * 0.8f; + if ((double) num106 > 1.0) + num106 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num106 * ((float) dust.color.R / (float) byte.MaxValue), num106 * ((float) dust.color.G / (float) byte.MaxValue), num106 * ((float) dust.color.B / (float) byte.MaxValue)); + } + else if (dust.type == 267) + { + if ((double) dust.velocity.X < 0.0) + --dust.rotation; + else + ++dust.rotation; + dust.velocity.Y *= 0.98f; + dust.velocity.X *= 0.98f; + dust.scale += 0.02f; + float num107 = dust.scale * 0.8f; + if ((double) num107 > 1.0) + num107 = 1f; + if (dust.noLight) + dust.noLight = false; + if (!dust.noLight && !dust.noLightEmittence) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num107 * ((float) dust.color.R / (float) byte.MaxValue), num107 * ((float) dust.color.G / (float) byte.MaxValue), num107 * ((float) dust.color.B / (float) byte.MaxValue)); + } + else if (dust.type == 20 || dust.type == 21 || dust.type == 231) + { + dust.scale += 0.005f; + dust.velocity.Y *= 0.94f; + dust.velocity.X *= 0.94f; + float b1 = dust.scale * 0.8f; + if ((double) b1 > 1.0) + b1 = 1f; + if (dust.type == 21 && !dust.noLightEmittence) + { + float b2 = dust.scale * 0.4f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), b2 * 0.8f, b2 * 0.3f, b2); + } + else if (dust.type == 231) + { + float r = dust.scale * 0.4f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), r, r * 0.5f, r * 0.3f); + } + else + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), b1 * 0.3f, b1 * 0.6f, b1); + } + else if (dust.type == 27 || dust.type == 45) + { + if (dust.type == 27 && (double) dust.fadeIn >= 100.0) + { + if ((double) dust.scale >= 1.5) + dust.scale -= 0.01f; + else + dust.scale -= 0.05f; + if ((double) dust.scale <= 0.5) + dust.scale -= 0.05f; + if ((double) dust.scale <= 0.25) + dust.scale -= 0.05f; + } + dust.velocity *= 0.94f; + dust.scale += 1f / 500f; + float b = dust.scale; + if (dust.noLight) + { + b *= 0.1f; + dust.scale -= 0.06f; + if ((double) dust.scale < 1.0) + dust.scale -= 0.06f; + if (Main.player[Main.myPlayer].wet) + dust.position += Main.player[Main.myPlayer].velocity * 0.5f; + else + dust.position += Main.player[Main.myPlayer].velocity; + } + if ((double) b > 1.0) + b = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), b * 0.6f, b * 0.2f, b); + } + else if (dust.type == 55 || dust.type == 56 || dust.type == 73 || dust.type == 74) + { + dust.velocity *= 0.98f; + if (!dust.noLightEmittence) + { + float num108 = dust.scale * 0.8f; + if (dust.type == 55) + { + if ((double) num108 > 1.0) + num108 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num108, num108, num108 * 0.6f); + } + else if (dust.type == 73) + { + if ((double) num108 > 1.0) + num108 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num108, num108 * 0.35f, num108 * 0.5f); + } + else if (dust.type == 74) + { + if ((double) num108 > 1.0) + num108 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num108 * 0.35f, num108, num108 * 0.5f); + } + else + { + float b = dust.scale * 1.2f; + if ((double) b > 1.0) + b = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), b * 0.35f, b * 0.5f, b); + } + } + } + else if (dust.type == 71 || dust.type == 72) + { + dust.velocity *= 0.98f; + float num109 = dust.scale; + if ((double) num109 > 1.0) + num109 = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num109 * 0.2f, 0.0f, num109 * 0.1f); + } + else if (dust.type == 76) + { + ++Main.snowDust; + dust.scale += 0.009f; + float y = Main.player[Main.myPlayer].velocity.Y; + if ((double) y > 0.0 && (double) dust.fadeIn == 0.0 && (double) dust.velocity.Y < (double) y) + dust.velocity.Y = MathHelper.Lerp(dust.velocity.Y, y, 0.04f); + if (!dust.noLight && (double) y > 0.0) + dust.position.Y += Main.player[Main.myPlayer].velocity.Y * 0.2f; + if (Collision.SolidCollision(dust.position - Vector2.One * 5f, 10, 10) && (double) dust.fadeIn == 0.0) + { + dust.scale *= 0.9f; + dust.velocity *= 0.25f; + } + } + else if (dust.type == 270) + { + dust.velocity *= 1.005025f; + dust.scale += 0.01f; + dust.rotation = 0.0f; + if (Collision.SolidCollision(dust.position - Vector2.One * 5f, 10, 10) && (double) dust.fadeIn == 0.0) + { + dust.scale *= 0.95f; + dust.velocity *= 0.25f; + } + else + { + dust.velocity.Y = (float) Math.Sin((double) dust.position.X * 0.0043982295319438) * 2f; + dust.velocity.Y -= 3f; + dust.velocity.Y /= 20f; + } + } + else if (dust.type == 271) + { + dust.velocity *= 1.005025f; + dust.scale += 3f / 1000f; + dust.rotation = 0.0f; + dust.velocity.Y -= 4f; + dust.velocity.Y /= 6f; + } + else if (dust.type == 268) + { + ++Dust.SandStormCount; + dust.velocity *= 1.005025f; + dust.scale += 0.01f; + if (!flag) + dust.scale -= 0.05f; + dust.rotation = 0.0f; + float y = Main.player[Main.myPlayer].velocity.Y; + if ((double) y > 0.0 && (double) dust.fadeIn == 0.0 && (double) dust.velocity.Y < (double) y) + dust.velocity.Y = MathHelper.Lerp(dust.velocity.Y, y, 0.04f); + if (!dust.noLight && (double) y > 0.0) + dust.position.Y += y * 0.2f; + if (Collision.SolidCollision(dust.position - Vector2.One * 5f, 10, 10) && (double) dust.fadeIn == 0.0) + { + dust.scale *= 0.9f; + dust.velocity *= 0.25f; + } + else + { + dust.velocity.Y = (float) Math.Sin((double) dust.position.X * 0.0043982295319438) * 2f; + dust.velocity.Y += 3f; + } + } + else if (!dust.noGravity && dust.type != 41 && dust.type != 44) + { + if (dust.type == 107) + dust.velocity *= 0.9f; + else + dust.velocity.Y += 0.1f; + } + if (dust.type == 5 || dust.type == 273 && dust.noGravity) + dust.scale -= 0.04f; + if (dust.type == 33 || dust.type == 52 || dust.type == 266 || dust.type == 98 || dust.type == 99 || dust.type == 100 || dust.type == 101 || dust.type == 102 || dust.type == 103 || dust.type == 104 || dust.type == 105 || dust.type == 123 || dust.type == 288) + { + if ((double) dust.velocity.X == 0.0) + { + if (Collision.SolidCollision(dust.position, 2, 2)) + dust.scale = 0.0f; + dust.rotation += 0.5f; + dust.scale -= 0.01f; + } + if (Collision.WetCollision(new Vector2(dust.position.X, dust.position.Y), 4, 4)) + { + dust.alpha += 20; + dust.scale -= 0.1f; + } + dust.alpha += 2; + dust.scale -= 0.005f; + if (dust.alpha > (int) byte.MaxValue) + dust.scale = 0.0f; + if ((double) dust.velocity.Y > 4.0) + dust.velocity.Y = 4f; + if (dust.noGravity) + { + if ((double) dust.velocity.X < 0.0) + dust.rotation -= 0.2f; + else + dust.rotation += 0.2f; + dust.scale += 0.03f; + dust.velocity.X *= 1.05f; + dust.velocity.Y += 0.15f; + } + } + if (dust.type == 35 && dust.noGravity) + { + dust.scale += 0.03f; + if ((double) dust.scale < 1.0) + dust.velocity.Y += 0.075f; + dust.velocity.X *= 1.08f; + if ((double) dust.velocity.X > 0.0) + dust.rotation += 0.01f; + else + dust.rotation -= 0.01f; + float r = dust.scale * 0.6f; + if ((double) r > 1.0) + r = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0 + 1.0), r, r * 0.3f, r * 0.1f); + } + else if (dust.type == 152 && dust.noGravity) + { + dust.scale += 0.03f; + if ((double) dust.scale < 1.0) + dust.velocity.Y += 0.075f; + dust.velocity.X *= 1.08f; + if ((double) dust.velocity.X > 0.0) + dust.rotation += 0.01f; + else + dust.rotation -= 0.01f; + } + else if (dust.type == 67 || dust.type == 92) + { + float b = dust.scale; + if ((double) b > 1.0) + b = 1f; + if (dust.noLight) + b *= 0.1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), 0.0f, b * 0.8f, b); + } + else if (dust.type == 185) + { + float b = dust.scale; + if ((double) b > 1.0) + b = 1f; + if (dust.noLight) + b *= 0.1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), b * 0.1f, b * 0.7f, b); + } + else if (dust.type == 107) + { + float g = dust.scale * 0.5f; + if ((double) g > 1.0) + g = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), g * 0.1f, g, g * 0.4f); + } + else if (dust.type == 34 || dust.type == 35 || dust.type == 152) + { + if (!Collision.WetCollision(new Vector2(dust.position.X, dust.position.Y - 8f), 4, 4)) + { + dust.scale = 0.0f; + } + else + { + dust.alpha += Main.rand.Next(2); + if (dust.alpha > (int) byte.MaxValue) + dust.scale = 0.0f; + dust.velocity.Y = -0.5f; + if (dust.type == 34) + { + dust.scale += 0.005f; + } + else + { + ++dust.alpha; + dust.scale -= 0.01f; + dust.velocity.Y = -0.2f; + } + dust.velocity.X += (float) Main.rand.Next(-10, 10) * (1f / 500f); + if ((double) dust.velocity.X < -0.25) + dust.velocity.X = -0.25f; + if ((double) dust.velocity.X > 0.25) + dust.velocity.X = 0.25f; + } + if (dust.type == 35) + { + float r = (float) ((double) dust.scale * 0.300000011920929 + 0.400000005960464); + if ((double) r > 1.0) + r = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), r, r * 0.5f, r * 0.3f); + } + } + if (dust.type == 68) + { + float b = dust.scale * 0.3f; + if ((double) b > 1.0) + b = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), b * 0.1f, b * 0.2f, b); + } + if (dust.type == 70) + { + float b = dust.scale * 0.3f; + if ((double) b > 1.0) + b = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), b * 0.5f, 0.0f, b); + } + if (dust.type == 41) + { + dust.velocity.X += (float) Main.rand.Next(-10, 11) * 0.01f; + dust.velocity.Y += (float) Main.rand.Next(-10, 11) * 0.01f; + if ((double) dust.velocity.X > 0.75) + dust.velocity.X = 0.75f; + if ((double) dust.velocity.X < -0.75) + dust.velocity.X = -0.75f; + if ((double) dust.velocity.Y > 0.75) + dust.velocity.Y = 0.75f; + if ((double) dust.velocity.Y < -0.75) + dust.velocity.Y = -0.75f; + dust.scale += 0.007f; + float b = dust.scale * 0.7f; + if ((double) b > 1.0) + b = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), b * 0.4f, b * 0.9f, b); + } + else if (dust.type == 44) + { + dust.velocity.X += (float) Main.rand.Next(-10, 11) * (3f / 1000f); + dust.velocity.Y += (float) Main.rand.Next(-10, 11) * (3f / 1000f); + if ((double) dust.velocity.X > 0.35) + dust.velocity.X = 0.35f; + if ((double) dust.velocity.X < -0.35) + dust.velocity.X = -0.35f; + if ((double) dust.velocity.Y > 0.35) + dust.velocity.Y = 0.35f; + if ((double) dust.velocity.Y < -0.35) + dust.velocity.Y = -0.35f; + dust.scale += 0.0085f; + float g = dust.scale * 0.7f; + if ((double) g > 1.0) + g = 1f; + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), g * 0.7f, g, g * 0.8f); + } + else + dust.velocity.X *= 0.99f; + if (dust.type != 79 && dust.type != 268) + dust.rotation += dust.velocity.X * 0.5f; + if ((double) dust.fadeIn > 0.0 && (double) dust.fadeIn < 100.0) + { + if (dust.type == 235) + { + dust.scale += 0.007f; + int index6 = (int) dust.fadeIn - 1; + if (index6 >= 0 && index6 <= (int) byte.MaxValue) + { + Vector2 vector2_3 = dust.position - Main.player[index6].Center; + float num110 = 100f - vector2_3.Length(); + if ((double) num110 > 0.0) + dust.scale -= num110 * 0.0015f; + vector2_3.Normalize(); + float num111 = (float) ((1.0 - (double) dust.scale) * 20.0); + Vector2 vector2_4 = vector2_3 * -num111; + dust.velocity = (dust.velocity * 4f + vector2_4) / 5f; + } + } + else if (dust.type == 46) + dust.scale += 0.1f; + else if (dust.type == 213 || dust.type == 260) + dust.scale += 0.1f; + else + dust.scale += 0.03f; + if ((double) dust.scale > (double) dust.fadeIn) + dust.fadeIn = 0.0f; + } + else if (dust.type == 213 || dust.type == 260) + dust.scale -= 0.2f; + else + dust.scale -= 0.01f; + if (dust.type >= 130 && dust.type <= 134) + { + float num112 = dust.scale; + if ((double) num112 > 1.0) + num112 = 1f; + if (dust.type == 130) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num112 * 1f, num112 * 0.5f, num112 * 0.4f); + if (dust.type == 131) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num112 * 0.4f, num112 * 1f, num112 * 0.6f); + if (dust.type == 132) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num112 * 0.3f, num112 * 0.5f, num112 * 1f); + if (dust.type == 133) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num112 * 0.9f, num112 * 0.9f, num112 * 0.3f); + if (dust.noGravity) + { + dust.velocity *= 0.93f; + if ((double) dust.fadeIn == 0.0) + dust.scale += 1f / 400f; + } + else if (dust.type == 131) + { + dust.velocity *= 0.98f; + dust.velocity.Y -= 0.1f; + dust.scale += 1f / 400f; + } + else + { + dust.velocity *= 0.95f; + dust.scale -= 1f / 400f; + } + } + else if (dust.type == 278) + { + float num113 = dust.scale; + if ((double) num113 > 1.0) + num113 = 1f; + if (!dust.noLight) + Lighting.AddLight(dust.position, dust.color.ToVector3() * num113); + if (dust.noGravity) + { + dust.velocity *= 0.93f; + if ((double) dust.fadeIn == 0.0) + dust.scale += 1f / 400f; + } + else + { + dust.velocity *= 0.95f; + dust.scale -= 1f / 400f; + } + if (WorldGen.SolidTile(Framing.GetTileSafely(dust.position)) && (double) dust.fadeIn == 0.0 && !dust.noGravity) + { + dust.scale *= 0.9f; + dust.velocity *= 0.25f; + } + } + else if (dust.type >= 219 && dust.type <= 223) + { + float num114 = dust.scale; + if ((double) num114 > 1.0) + num114 = 1f; + if (!dust.noLight) + { + if (dust.type == 219) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num114 * 1f, num114 * 0.5f, num114 * 0.4f); + if (dust.type == 220) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num114 * 0.4f, num114 * 1f, num114 * 0.6f); + if (dust.type == 221) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num114 * 0.3f, num114 * 0.5f, num114 * 1f); + if (dust.type == 222) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num114 * 0.9f, num114 * 0.9f, num114 * 0.3f); + } + if (dust.noGravity) + { + dust.velocity *= 0.93f; + if ((double) dust.fadeIn == 0.0) + dust.scale += 1f / 400f; + } + dust.velocity *= new Vector2(0.97f, 0.99f); + dust.scale -= 1f / 400f; + if (dust.customData != null && dust.customData is Player) + { + Player customData = (Player) dust.customData; + dust.position += customData.position - customData.oldPosition; + } + } + else if (dust.type == 226) + { + float num115 = dust.scale; + if ((double) num115 > 1.0) + num115 = 1f; + if (!dust.noLight) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num115 * 0.2f, num115 * 0.7f, num115 * 1f); + if (dust.noGravity) + { + dust.velocity *= 0.93f; + if ((double) dust.fadeIn == 0.0) + dust.scale += 1f / 400f; + } + dust.velocity *= new Vector2(0.97f, 0.99f); + if (dust.customData != null && dust.customData is Player) + { + Player customData = (Player) dust.customData; + dust.position += customData.position - customData.oldPosition; + } + dust.scale -= 0.01f; + } + else if (dust.type == 272) + { + float num116 = dust.scale; + if ((double) num116 > 1.0) + num116 = 1f; + if (!dust.noLight) + Lighting.AddLight((int) ((double) dust.position.X / 16.0), (int) ((double) dust.position.Y / 16.0), num116 * 0.5f, num116 * 0.2f, num116 * 0.8f); + if (dust.noGravity) + { + dust.velocity *= 0.93f; + if ((double) dust.fadeIn == 0.0) + dust.scale += 1f / 400f; + } + dust.velocity *= new Vector2(0.97f, 0.99f); + if (dust.customData != null && dust.customData is Player) + { + Player customData = (Player) dust.customData; + dust.position += customData.position - customData.oldPosition; + } + if (dust.customData != null && dust.customData is NPC) + { + NPC customData = (NPC) dust.customData; + dust.position += customData.position - customData.oldPosition; + } + dust.scale -= 0.01f; + } + else if (dust.noGravity) + { + dust.velocity *= 0.92f; + if ((double) dust.fadeIn == 0.0) + dust.scale -= 0.04f; + } + if ((double) dust.position.Y > (double) Main.screenPosition.Y + (double) Main.screenHeight) + dust.active = false; + float num117 = 0.1f; + if ((double) Dust.dCount == 0.5) + dust.scale -= 1f / 1000f; + if ((double) Dust.dCount == 0.6) + dust.scale -= 1f / 400f; + if ((double) Dust.dCount == 0.7) + dust.scale -= 0.005f; + if ((double) Dust.dCount == 0.8) + dust.scale -= 0.01f; + if ((double) Dust.dCount == 0.9) + dust.scale -= 0.02f; + if ((double) Dust.dCount == 0.5) + num117 = 0.11f; + if ((double) Dust.dCount == 0.6) + num117 = 0.13f; + if ((double) Dust.dCount == 0.7) + num117 = 0.16f; + if ((double) Dust.dCount == 0.8) + num117 = 0.22f; + if ((double) Dust.dCount == 0.9) + num117 = 0.25f; + if ((double) dust.scale < (double) num117) + dust.active = false; + } + } + else + dust.active = false; + } + int num118 = num1; + if ((double) num118 > (double) Main.maxDustToDraw * 0.9) + Dust.dCount = 0.9f; + else if ((double) num118 > (double) Main.maxDustToDraw * 0.8) + Dust.dCount = 0.8f; + else if ((double) num118 > (double) Main.maxDustToDraw * 0.7) + Dust.dCount = 0.7f; + else if ((double) num118 > (double) Main.maxDustToDraw * 0.6) + Dust.dCount = 0.6f; + else if ((double) num118 > (double) Main.maxDustToDraw * 0.5) + Dust.dCount = 0.5f; + else + Dust.dCount = 0.0f; + } + + public Color GetAlpha(Color newColor) + { + float num1 = (float) ((int) byte.MaxValue - this.alpha) / (float) byte.MaxValue; + switch (this.type) + { + case 299: + case 300: + case 301: + Color color = new Color(); + switch (this.type) + { + case 299: + color = new Color(50, (int) byte.MaxValue, 50, 200); + break; + case 300: + color = new Color(50, 200, (int) byte.MaxValue, (int) byte.MaxValue); + break; + case 301: + color = new Color((int) byte.MaxValue, 50, 125, 200); + break; + default: + color = new Color((int) byte.MaxValue, 150, 150, 200); + break; + } + return color; + default: + if (this.type == 292) + return Color.White; + if (this.type == 259) + return new Color(230, 230, 230, 230); + if (this.type == 261) + return new Color(230, 230, 230, 115); + if (this.type == 254 || this.type == (int) byte.MaxValue) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + if (this.type == 258) + return new Color(150, 50, 50, 0); + if (this.type == 263 || this.type == 264) + return new Color((int) this.color.R / 2 + (int) sbyte.MaxValue, (int) this.color.G + (int) sbyte.MaxValue, (int) this.color.B + (int) sbyte.MaxValue, (int) this.color.A / 8) * 0.5f; + if (this.type == 235) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + if ((this.type >= 86 && this.type <= 91 || this.type == 262 || this.type == 286) && !this.noLight) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + if (this.type == 213 || this.type == 260) + { + int num2 = (int) ((double) this.scale / 2.5 * (double) byte.MaxValue); + return new Color(num2, num2, num2, num2); + } + if (this.type == 64 && this.alpha == (int) byte.MaxValue && this.noLight) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + if (this.type == 197) + return new Color(250, 250, 250, 150); + if (this.type >= 110 && this.type <= 114) + return new Color(200, 200, 200, 0); + if (this.type == 204) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + if (this.type == 181) + return new Color(200, 200, 200, 0); + if (this.type == 182 || this.type == 206) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + if (this.type == 159) + return new Color(250, 250, 250, 50); + if (this.type == 163 || this.type == 205) + return new Color(250, 250, 250, 0); + if (this.type == 170) + return new Color(200, 200, 200, 100); + if (this.type == 180) + return new Color(200, 200, 200, 0); + if (this.type == 175) + return new Color(200, 200, 200, 0); + if (this.type == 183) + return new Color(50, 0, 0, 0); + if (this.type == 172) + return new Color(250, 250, 250, 150); + if (this.type == 160 || this.type == 162 || this.type == 164 || this.type == 173) + { + int num3 = (int) (250.0 * (double) this.scale); + return new Color(num3, num3, num3, 0); + } + if (this.type == 92 || this.type == 106 || this.type == 107) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + if (this.type == 185) + return new Color(200, 200, (int) byte.MaxValue, 125); + if (this.type == (int) sbyte.MaxValue || this.type == 187) + return new Color((int) newColor.R, (int) newColor.G, (int) newColor.B, 25); + if (this.type == 156 || this.type == 230 || this.type == 234) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + if (this.type == 270) + return new Color((int) newColor.R / 2 + (int) sbyte.MaxValue, (int) newColor.G / 2 + (int) sbyte.MaxValue, (int) newColor.B / 2 + (int) sbyte.MaxValue, 25); + if (this.type == 271) + return new Color((int) newColor.R / 2 + (int) sbyte.MaxValue, (int) newColor.G / 2 + (int) sbyte.MaxValue, (int) newColor.B / 2 + (int) sbyte.MaxValue, (int) sbyte.MaxValue); + if (this.type == 6 || this.type == 242 || this.type == 174 || this.type == 135 || this.type == 75 || this.type == 20 || this.type == 21 || this.type == 231 || this.type == 169 || this.type >= 130 && this.type <= 134 || this.type == 158 || this.type == 293 || this.type == 294 || this.type == 295 || this.type == 296 || this.type == 297 || this.type == 298) + return new Color((int) newColor.R, (int) newColor.G, (int) newColor.B, 25); + if (this.type == 278) + return new Color(newColor.ToVector3() * this.color.ToVector3()) + { + A = 25 + }; + if (this.type >= 219 && this.type <= 223) + { + newColor = Color.Lerp(newColor, Color.White, 0.5f); + return new Color((int) newColor.R, (int) newColor.G, (int) newColor.B, 25); + } + if (this.type == 226 || this.type == 272) + { + newColor = Color.Lerp(newColor, Color.White, 0.8f); + return new Color((int) newColor.R, (int) newColor.G, (int) newColor.B, 25); + } + if (this.type == 228) + { + newColor = Color.Lerp(newColor, Color.White, 0.8f); + return new Color((int) newColor.R, (int) newColor.G, (int) newColor.B, 25); + } + if (this.type == 279) + { + int a = (int) newColor.A; + newColor = Color.Lerp(newColor, Color.White, 0.8f); + return new Color((int) newColor.R, (int) newColor.G, (int) newColor.B, a) * MathHelper.Min(this.scale, 1f); + } + if (this.type == 229 || this.type == 269) + { + newColor = Color.Lerp(newColor, Color.White, 0.6f); + return new Color((int) newColor.R, (int) newColor.G, (int) newColor.B, 25); + } + if ((this.type == 68 || this.type == 70) && this.noGravity) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + if (this.type == 157) + { + int maxValue; + int num4 = maxValue = (int) byte.MaxValue; + int num5 = maxValue; + int num6 = maxValue; + float num7 = (float) ((double) Main.mouseTextColor / 100.0 - 1.60000002384186); + int num8 = (int) ((double) num6 * (double) num7); + int num9 = (int) ((double) num5 * (double) num7); + int num10 = (int) ((double) num4 * (double) num7); + int a = (int) (100.0 * (double) num7); + int r = num8 + 50; + if (r > (int) byte.MaxValue) + r = (int) byte.MaxValue; + int g = num9 + 50; + if (g > (int) byte.MaxValue) + g = (int) byte.MaxValue; + int b = num10 + 50; + if (b > (int) byte.MaxValue) + b = (int) byte.MaxValue; + return new Color(r, g, b, a); + } + if (this.type == 284) + return new Color(newColor.ToVector4() * this.color.ToVector4()) + { + A = this.color.A + }; + if (this.type == 15 || this.type == 274 || this.type == 20 || this.type == 21 || this.type == 29 || this.type == 35 || this.type == 41 || this.type == 44 || this.type == 27 || this.type == 45 || this.type == 55 || this.type == 56 || this.type == 57 || this.type == 58 || this.type == 73 || this.type == 74) + num1 = (float) (((double) num1 + 3.0) / 4.0); + else if (this.type == 43) + { + num1 = (float) (((double) num1 + 9.0) / 10.0); + } + else + { + if (this.type >= 244 && this.type <= 247) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + if (this.type == 66) + return new Color((int) newColor.R, (int) newColor.G, (int) newColor.B, 0); + if (this.type == 267) + return new Color((int) this.color.R, (int) this.color.G, (int) this.color.B, 0); + if (this.type == 71) + return new Color(200, 200, 200, 0); + if (this.type == 72) + return new Color(200, 200, 200, 200); + } + int r1 = (int) ((double) newColor.R * (double) num1); + int g1 = (int) ((double) newColor.G * (double) num1); + int b1 = (int) ((double) newColor.B * (double) num1); + int a1 = (int) newColor.A - this.alpha; + if (a1 < 0) + a1 = 0; + if (a1 > (int) byte.MaxValue) + a1 = (int) byte.MaxValue; + return new Color(r1, g1, b1, a1); + } + } + + public Color GetColor(Color newColor) + { + if (this.type == 284) + return Color.Transparent; + int r = (int) this.color.R - ((int) byte.MaxValue - (int) newColor.R); + int g = (int) this.color.G - ((int) byte.MaxValue - (int) newColor.G); + int b = (int) this.color.B - ((int) byte.MaxValue - (int) newColor.B); + int a = (int) this.color.A - ((int) byte.MaxValue - (int) newColor.A); + if (r < 0) + r = 0; + if (r > (int) byte.MaxValue) + r = (int) byte.MaxValue; + if (g < 0) + g = 0; + if (g > (int) byte.MaxValue) + g = (int) byte.MaxValue; + if (b < 0) + b = 0; + if (b > (int) byte.MaxValue) + b = (int) byte.MaxValue; + if (a < 0) + a = 0; + if (a > (int) byte.MaxValue) + a = (int) byte.MaxValue; + return new Color(r, g, b, a); + } + } +} diff --git a/Entity.cs b/Entity.cs new file mode 100644 index 0000000..3843ce1 --- /dev/null +++ b/Entity.cs @@ -0,0 +1,120 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Entity +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; + +namespace Terraria +{ + public abstract class Entity + { + public int whoAmI; + public bool active; + public Vector2 position; + public Vector2 velocity; + public Vector2 oldPosition; + public Vector2 oldVelocity; + public int oldDirection; + public int direction = 1; + public int width; + public int height; + public bool wet; + public bool honeyWet; + public byte wetCount; + public bool lavaWet; + + public virtual Vector2 VisualPosition => this.position; + + public float AngleTo(Vector2 Destination) => (float) Math.Atan2((double) Destination.Y - (double) this.Center.Y, (double) Destination.X - (double) this.Center.X); + + public float AngleFrom(Vector2 Source) => (float) Math.Atan2((double) this.Center.Y - (double) Source.Y, (double) this.Center.X - (double) Source.X); + + public float Distance(Vector2 Other) => Vector2.Distance(this.Center, Other); + + public float DistanceSQ(Vector2 Other) => Vector2.DistanceSquared(this.Center, Other); + + public Vector2 DirectionTo(Vector2 Destination) => Vector2.Normalize(Destination - this.Center); + + public Vector2 DirectionFrom(Vector2 Source) => Vector2.Normalize(this.Center - Source); + + public bool WithinRange(Vector2 Target, float MaxRange) => (double) Vector2.DistanceSquared(this.Center, Target) <= (double) MaxRange * (double) MaxRange; + + public Vector2 Center + { + get => new Vector2(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2)); + set => this.position = new Vector2(value.X - (float) (this.width / 2), value.Y - (float) (this.height / 2)); + } + + public Vector2 Left + { + get => new Vector2(this.position.X, this.position.Y + (float) (this.height / 2)); + set => this.position = new Vector2(value.X, value.Y - (float) (this.height / 2)); + } + + public Vector2 Right + { + get => new Vector2(this.position.X + (float) this.width, this.position.Y + (float) (this.height / 2)); + set => this.position = new Vector2(value.X - (float) this.width, value.Y - (float) (this.height / 2)); + } + + public Vector2 Top + { + get => new Vector2(this.position.X + (float) (this.width / 2), this.position.Y); + set => this.position = new Vector2(value.X - (float) (this.width / 2), value.Y); + } + + public Vector2 TopLeft + { + get => this.position; + set => this.position = value; + } + + public Vector2 TopRight + { + get => new Vector2(this.position.X + (float) this.width, this.position.Y); + set => this.position = new Vector2(value.X - (float) this.width, value.Y); + } + + public Vector2 Bottom + { + get => new Vector2(this.position.X + (float) (this.width / 2), this.position.Y + (float) this.height); + set => this.position = new Vector2(value.X - (float) (this.width / 2), value.Y - (float) this.height); + } + + public Vector2 BottomLeft + { + get => new Vector2(this.position.X, this.position.Y + (float) this.height); + set => this.position = new Vector2(value.X, value.Y - (float) this.height); + } + + public Vector2 BottomRight + { + get => new Vector2(this.position.X + (float) this.width, this.position.Y + (float) this.height); + set => this.position = new Vector2(value.X - (float) this.width, value.Y - (float) this.height); + } + + public Vector2 Size + { + get => new Vector2((float) this.width, (float) this.height); + set + { + this.width = (int) value.X; + this.height = (int) value.Y; + } + } + + public Rectangle Hitbox + { + get => new Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height); + set + { + this.position = new Vector2((float) value.X, (float) value.Y); + this.width = value.Width; + this.height = value.Height; + } + } + } +} diff --git a/Enums/AnchorType.cs b/Enums/AnchorType.cs new file mode 100644 index 0000000..1aad707 --- /dev/null +++ b/Enums/AnchorType.cs @@ -0,0 +1,24 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.AnchorType +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Terraria.Enums +{ + [Flags] + public enum AnchorType + { + None = 0, + SolidTile = 1, + SolidWithTop = 2, + Table = 4, + SolidSide = 8, + Tree = 16, // 0x00000010 + AlternateTile = 32, // 0x00000020 + EmptyTile = 64, // 0x00000040 + SolidBottom = 128, // 0x00000080 + } +} diff --git a/Enums/ItemRarityColor.cs b/Enums/ItemRarityColor.cs new file mode 100644 index 0000000..9509a41 --- /dev/null +++ b/Enums/ItemRarityColor.cs @@ -0,0 +1,26 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.ItemRarityColor +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Enums +{ + public enum ItemRarityColor + { + AmberMinus11 = -11, // 0xFFFFFFF5 + TrashMinus1 = -1, // 0xFFFFFFFF + White0 = 0, + Blue1 = 1, + Green2 = 2, + Orange3 = 3, + LightRed4 = 4, + Pink5 = 5, + LightPurple6 = 6, + Lime7 = 7, + Yellow8 = 8, + Cyan9 = 9, + StrongRed10 = 10, // 0x0000000A + Purple11 = 11, // 0x0000000B + } +} diff --git a/Enums/LiquidPlacement.cs b/Enums/LiquidPlacement.cs new file mode 100644 index 0000000..fe360d4 --- /dev/null +++ b/Enums/LiquidPlacement.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.LiquidPlacement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Enums +{ + public enum LiquidPlacement + { + Allowed, + NotAllowed, + OnlyInLiquid, + OnlyInFullLiquid, + } +} diff --git a/Enums/MoonPhase.cs b/Enums/MoonPhase.cs new file mode 100644 index 0000000..f3ad037 --- /dev/null +++ b/Enums/MoonPhase.cs @@ -0,0 +1,20 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.MoonPhase +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Enums +{ + public enum MoonPhase + { + Full, + ThreeQuartersAtLeft, + HalfAtLeft, + QuarterAtLeft, + Empty, + QuarterAtRight, + HalfAtRight, + ThreeQuartersAtRight, + } +} diff --git a/Enums/NPCTargetType.cs b/Enums/NPCTargetType.cs new file mode 100644 index 0000000..9277e57 --- /dev/null +++ b/Enums/NPCTargetType.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.NPCTargetType +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Enums +{ + public enum NPCTargetType + { + None, + Player, + NPC, + PlayerTankPet, + } +} diff --git a/Enums/TileCuttingContext.cs b/Enums/TileCuttingContext.cs new file mode 100644 index 0000000..6219cd7 --- /dev/null +++ b/Enums/TileCuttingContext.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.TileCuttingContext +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Enums +{ + public enum TileCuttingContext + { + Unknown, + AttackMelee, + AttackProjectile, + TilePlacement, + } +} diff --git a/Enums/TileIDEnum.cs b/Enums/TileIDEnum.cs new file mode 100644 index 0000000..290fd75 --- /dev/null +++ b/Enums/TileIDEnum.cs @@ -0,0 +1,363 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.TileIDEnum +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Enums +{ + public enum TileIDEnum + { + Dirt, + Stone, + Grass, + Plants, + Torches, + Trees, + Iron, + Copper, + Gold, + Silver, + ClosedDoor, + OpenDoor, + Heart, + Bottles, + Tables, + Chairs, + Anvils, + Furnaces, + WorkBenches, + Platforms, + Saplings, + Containers, + Demonite, + CorruptGrass, + CorruptPlants, + Ebonstone, + DemonAltar, + Sunflower, + Pots, + PiggyBank, + WoodBlock, + ShadowOrbs, + CorruptThorns, + Candles, + Chandeliers, + Jackolanterns, + Presents, + Meteorite, + GrayBrick, + RedBrick, + ClayBlock, + BlueDungeonBrick, + HangingLanterns, + GreenDungeonBrick, + PinkDungeonBrick, + GoldBrick, + SilverBrick, + CopperBrick, + Spikes, + WaterCandle, + Books, + Cobweb, + Vines, + Sand, + Glass, + Signs, + Obsidian, + Ash, + Hellstone, + Mud, + JungleGrass, + JunglePlants, + JungleVines, + Sapphire, + Ruby, + Emerald, + Topaz, + Amethyst, + Diamond, + JungleThorns, + MushroomGrass, + MushroomPlants, + MushroomTrees, + Plants2, + JunglePlants2, + ObsidianBrick, + HellstoneBrick, + Hellforge, + ClayPot, + Beds, + Cactus, + Coral, + ImmatureHerbs, + MatureHerbs, + BloomingHerbs, + Tombstones, + Loom, + Pianos, + Dressers, + Benches, + Bathtubs, + Banners, + Lampposts, + Lamps, + Kegs, + ChineseLanterns, + CookingPots, + Safes, + SkullLanterns, + TrashCan, + Candelabras, + Bookcases, + Thrones, + Bowls, + GrandfatherClocks, + Statues, + Sawmill, + Cobalt, + Mythril, + HallowedGrass, + HallowedPlants, + Adamantite, + Ebonsand, + HallowedPlants2, + TinkerersWorkbench, + HallowedVines, + Pearlsand, + Pearlstone, + PearlstoneBrick, + IridescentBrick, + Mudstone, + CobaltBrick, + MythrilBrick, + Silt, + WoodenPlank, + CrystalBall, + DiscoBall, + MagicalIceBlock, + Mannequin, + Crystals, + ActiveStoneBlock, + InactiveStoneBlock, + Lever, + AdamantiteForge, + MythrilAnvil, + PressurePlates, + Switches, + Traps, + Boulder, + MusicBoxes, + DemoniteBrick, + Explosives, + InletPump, + OutletPump, + Timers, + CandyCaneBlock, + GreenCandyCaneBlock, + SnowBlock, + SnowBrick, + HolidayLights, + AdamantiteBeam, + SandstoneBrick, + EbonstoneBrick, + RedStucco, + YellowStucco, + GreenStucco, + GrayStucco, + Ebonwood, + RichMahogany, + Pearlwood, + RainbowBrick, + IceBlock, + BreakableIce, + CorruptIce, + HallowedIce, + Stalagtite, + Tin, + Lead, + Tungsten, + Platinum, + PineTree, + ChristmasTree, + Sinks, + PlatinumCandelabra, + PlatinumCandle, + TinBrick, + TungstenBrick, + PlatinumBrick, + ExposedGems, + GreenMoss, + BrownMoss, + RedMoss, + BlueMoss, + PurpleMoss, + LongMoss, + SmallPiles, + LargePiles, + LargePiles2, + CactusBlock, + Cloud, + MushroomBlock, + LivingWood, + LeafBlock, + SlimeBlock, + BoneBlock, + FleshBlock, + RainCloud, + FrozenSlimeBlock, + Asphalt, + CrimsonGrass, + RedIce, + FleshWeeds, + Sunplate, + Crimstone, + Crimtane, + CrimsonVines, + IceBrick, + WaterFountain, + Shadewood, + Cannon, + LandMine, + Chlorophyte, + SnowballLauncher, + Rope, + Chain, + Campfire, + Firework, + Blendomatic, + MeatGrinder, + Extractinator, + Solidifier, + Palladium, + Orichalcum, + Titanium, + Slush, + Hive, + LihzahrdBrick, + DyePlants, + DyeVat, + HoneyBlock, + CrispyHoneyBlock, + Larva, + WoodenSpikes, + PlantDetritus, + Crimsand, + Teleporter, + LifeFruit, + LihzahrdAltar, + PlanteraBulb, + MetalBars, + Painting3X3, + Painting4X3, + Painting6X4, + ImbuingStation, + BubbleMachine, + Painting2X3, + Painting3X2, + Autohammer, + PalladiumColumn, + BubblegumBlock, + Titanstone, + PumpkinBlock, + HayBlock, + SpookyWood, + Pumpkins, + AmethystGemsparkOff, + TopazGemsparkOff, + SapphireGemsparkOff, + EmeraldGemsparkOff, + RubyGemsparkOff, + DiamondGemsparkOff, + AmberGemsparkOff, + AmethystGemspark, + TopazGemspark, + SapphireGemspark, + EmeraldGemspark, + RubyGemspark, + DiamondGemspark, + AmberGemspark, + Womannequin, + FireflyinaBottle, + LightningBuginaBottle, + Cog, + StoneSlab, + SandStoneSlab, + BunnyCage, + SquirrelCage, + MallardDuckCage, + DuckCage, + BirdCage, + BlueJay, + CardinalCage, + FishBowl, + HeavyWorkBench, + CopperPlating, + SnailCage, + GlowingSnailCage, + AmmoBox, + MonarchButterflyJar, + PurpleEmperorButterflyJar, + RedAdmiralButterflyJar, + UlyssesButterflyJar, + SulphurButterflyJar, + TreeNymphButterflyJar, + ZebraSwallowtailButterflyJar, + JuliaButterflyJar, + ScorpionCage, + BlackScorpionCage, + FrogCage, + MouseCage, + BoneWelder, + FleshCloningVat, + GlassKiln, + LihzahrdFurnace, + LivingLoom, + SkyMill, + IceMachine, + SteampunkBoiler, + HoneyDispenser, + PenguinCage, + WormCage, + DynastyWood, + RedDynastyShingles, + BlueDynastyShingles, + MinecartTrack, + Coralstone, + BlueJellyfishBowl, + GreenJellyfishBowl, + PinkJellyfishBowl, + ShipInABottle, + SeaweedPlanter, + BorealWood, + PalmWood, + PalmTree, + BeachPiles, + TinPlating, + Waterfall, + Lavafall, + Confetti, + ConfettiBlack, + CopperCoinPile, + SilverCoinPile, + GoldCoinPile, + PlatinumCoinPile, + WeaponsRack, + FireworksBox, + LivingFire, + AlphabetStatues, + FireworkFountain, + GrasshopperCage, + LivingCursedFire, + LivingDemonFire, + LivingFrostFire, + LivingIchor, + LivingUltrabrightFire, + Honeyfall, + ChlorophyteBrick, + CrimtaneBrick, + ShroomitePlating, + MushroomStatue, + Count, + } +} diff --git a/Enums/TileObjectDirection.cs b/Enums/TileObjectDirection.cs new file mode 100644 index 0000000..da1a40d --- /dev/null +++ b/Enums/TileObjectDirection.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.TileObjectDirection +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Enums +{ + public enum TileObjectDirection + { + None, + PlaceLeft, + PlaceRight, + } +} diff --git a/Enums/TileScanGroup.cs b/Enums/TileScanGroup.cs new file mode 100644 index 0000000..72e9d21 --- /dev/null +++ b/Enums/TileScanGroup.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.TileScanGroup +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Enums +{ + public enum TileScanGroup + { + None, + Corruption, + Crimson, + Hallow, + TotalGoodEvil, + } +} diff --git a/Enums/TownNPCRoomCheckFailureReason.cs b/Enums/TownNPCRoomCheckFailureReason.cs new file mode 100644 index 0000000..ccc4eb2 --- /dev/null +++ b/Enums/TownNPCRoomCheckFailureReason.cs @@ -0,0 +1,18 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.TownNPCRoomCheckFailureReason +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Enums +{ + public enum TownNPCRoomCheckFailureReason + { + None, + TooCloseToWorldEdge, + RoomIsTooBig, + RoomIsTooSmall, + HoleInWallIsTooBig, + RoomCheckStartedInASolidTile, + } +} diff --git a/Enums/TownNPCSpawnResult.cs b/Enums/TownNPCSpawnResult.cs new file mode 100644 index 0000000..6968b91 --- /dev/null +++ b/Enums/TownNPCSpawnResult.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.TownNPCSpawnResult +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Enums +{ + public enum TownNPCSpawnResult + { + Blocked, + Successful, + RelocatedHomeless, + BlockedInfiHousing, + } +} diff --git a/Enums/TreeTypes.cs b/Enums/TreeTypes.cs new file mode 100644 index 0000000..88363bb --- /dev/null +++ b/Enums/TreeTypes.cs @@ -0,0 +1,24 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Enums.TreeTypes +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Enums +{ + public enum TreeTypes + { + None, + Forest, + Corrupt, + Mushroom, + Crimson, + Jungle, + Snow, + Hallowed, + Palm, + PalmCrimson, + PalmCorrupt, + PalmHallowed, + } +} diff --git a/Extensions/EnumerationExtensions.cs b/Extensions/EnumerationExtensions.cs new file mode 100644 index 0000000..8bfbe8d --- /dev/null +++ b/Extensions/EnumerationExtensions.cs @@ -0,0 +1,65 @@ +// Decompiled with JetBrains decompiler +// Type: Extensions.EnumerationExtensions +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Extensions +{ + public static class EnumerationExtensions + { + public static T Include(this Enum value, T append) + { + Type type = value.GetType(); + object obj1 = (object) value; + EnumerationExtensions._Value obj2 = new EnumerationExtensions._Value((object) append, type); + if ((ValueType) obj2.Signed is long) + obj1 = (object) (Convert.ToInt64((object) value) | obj2.Signed.Value); + else if ((ValueType) obj2.Unsigned is ulong) + obj1 = (object) (ulong) ((long) Convert.ToUInt64((object) value) | (long) obj2.Unsigned.Value); + return (T) Enum.Parse(type, obj1.ToString()); + } + + public static T Remove(this Enum value, T remove) + { + Type type = value.GetType(); + object obj1 = (object) value; + EnumerationExtensions._Value obj2 = new EnumerationExtensions._Value((object) remove, type); + if ((ValueType) obj2.Signed is long) + obj1 = (object) (Convert.ToInt64((object) value) & ~obj2.Signed.Value); + else if ((ValueType) obj2.Unsigned is ulong) + obj1 = (object) (ulong) ((long) Convert.ToUInt64((object) value) & ~(long) obj2.Unsigned.Value); + return (T) Enum.Parse(type, obj1.ToString()); + } + + public static bool Has(this Enum value, T check) + { + Type type = value.GetType(); + EnumerationExtensions._Value obj = new EnumerationExtensions._Value((object) check, type); + if ((ValueType) obj.Signed is long) + return (Convert.ToInt64((object) value) & obj.Signed.Value) == obj.Signed.Value; + return (ValueType) obj.Unsigned is ulong && ((long) Convert.ToUInt64((object) value) & (long) obj.Unsigned.Value) == (long) obj.Unsigned.Value; + } + + public static bool Missing(this Enum obj, T value) => !obj.Has(value); + + private class _Value + { + private static Type _UInt64 = typeof (ulong); + private static Type _UInt32 = typeof (long); + public long? Signed; + public ulong? Unsigned; + + public _Value(object value, Type type) + { + Type type1 = type.IsEnum ? Enum.GetUnderlyingType(type) : throw new ArgumentException("Value provided is not an enumerated type!"); + if (type1.Equals(EnumerationExtensions._Value._UInt32) || type1.Equals(EnumerationExtensions._Value._UInt64)) + this.Unsigned = new ulong?(Convert.ToUInt64(value)); + else + this.Signed = new long?(Convert.ToInt64(value)); + } + } + } +} diff --git a/FrameSkipTest.cs b/FrameSkipTest.cs new file mode 100644 index 0000000..60280fa --- /dev/null +++ b/FrameSkipTest.cs @@ -0,0 +1,44 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.FrameSkipTest +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Utilities; +using System.Collections.Generic; +using System.Threading; + +namespace Terraria +{ + public class FrameSkipTest + { + private static int LastRecordedSecondNumber; + private static float CallsThisSecond; + private static float DeltasThisSecond; + private static List DeltaSamples = new List(); + private const int SamplesCount = 5; + private static MultiTimer serverFramerateTest = new MultiTimer(60); + + public static void Update(GameTime gameTime) => Thread.Sleep((int) MathHelper.Clamp((float) ((1.0 / 60.0 - gameTime.ElapsedGameTime.TotalSeconds) * 1000.0 + 1.0), 0.0f, 1000f)); + + public static void CheckReset(GameTime gameTime) + { + if (FrameSkipTest.LastRecordedSecondNumber == gameTime.TotalGameTime.Seconds) + return; + FrameSkipTest.DeltaSamples.Add(FrameSkipTest.DeltasThisSecond / FrameSkipTest.CallsThisSecond); + if (FrameSkipTest.DeltaSamples.Count > 5) + FrameSkipTest.DeltaSamples.RemoveAt(0); + FrameSkipTest.CallsThisSecond = 0.0f; + FrameSkipTest.DeltasThisSecond = 0.0f; + FrameSkipTest.LastRecordedSecondNumber = gameTime.TotalGameTime.Seconds; + } + + public static void UpdateServerTest() + { + FrameSkipTest.serverFramerateTest.Record("frame time"); + FrameSkipTest.serverFramerateTest.StopAndPrint(); + FrameSkipTest.serverFramerateTest.Start(); + } + } +} diff --git a/Framing.cs b/Framing.cs new file mode 100644 index 0000000..f6cd730 --- /dev/null +++ b/Framing.cs @@ -0,0 +1,391 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Framing +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.DataStructures; +using Terraria.ID; + +namespace Terraria +{ + public class Framing + { + private static Point16[][] selfFrame8WayLookup; + private static Point16[][] wallFrameLookup; + private static Point16 frameSize8Way; + private static Point16 wallFrameSize; + private static Framing.BlockStyle[] blockStyleLookup; + private static int[][] phlebasTileFrameNumberLookup; + private static int[][] lazureTileFrameNumberLookup; + private static int[][] centerWallFrameLookup; + + public static void Initialize() + { + Framing.selfFrame8WayLookup = new Point16[256][]; + Framing.frameSize8Way = new Point16(18, 18); + Framing.Add8WayLookup(0, (short) 9, (short) 3, (short) 10, (short) 3, (short) 11, (short) 3); + Framing.Add8WayLookup(1, (short) 6, (short) 3, (short) 7, (short) 3, (short) 8, (short) 3); + Framing.Add8WayLookup(2, (short) 12, (short) 0, (short) 12, (short) 1, (short) 12, (short) 2); + Framing.Add8WayLookup(3, (short) 15, (short) 2); + Framing.Add8WayLookup(4, (short) 9, (short) 0, (short) 9, (short) 1, (short) 9, (short) 2); + Framing.Add8WayLookup(5, (short) 13, (short) 2); + Framing.Add8WayLookup(6, (short) 6, (short) 4, (short) 7, (short) 4, (short) 8, (short) 4); + Framing.Add8WayLookup(7, (short) 14, (short) 2); + Framing.Add8WayLookup(8, (short) 6, (short) 0, (short) 7, (short) 0, (short) 8, (short) 0); + Framing.Add8WayLookup(9, (short) 5, (short) 0, (short) 5, (short) 1, (short) 5, (short) 2); + Framing.Add8WayLookup(10, (short) 15, (short) 0); + Framing.Add8WayLookup(11, (short) 15, (short) 1); + Framing.Add8WayLookup(12, (short) 13, (short) 0); + Framing.Add8WayLookup(13, (short) 13, (short) 1); + Framing.Add8WayLookup(14, (short) 14, (short) 0); + Framing.Add8WayLookup(15, (short) 14, (short) 1); + Framing.Add8WayLookup(19, (short) 1, (short) 4, (short) 3, (short) 4, (short) 5, (short) 4); + Framing.Add8WayLookup(23, (short) 16, (short) 3); + Framing.Add8WayLookup(27, (short) 17, (short) 0); + Framing.Add8WayLookup(31, (short) 13, (short) 4); + Framing.Add8WayLookup(37, (short) 0, (short) 4, (short) 2, (short) 4, (short) 4, (short) 4); + Framing.Add8WayLookup(39, (short) 17, (short) 3); + Framing.Add8WayLookup(45, (short) 16, (short) 0); + Framing.Add8WayLookup(47, (short) 12, (short) 4); + Framing.Add8WayLookup(55, (short) 1, (short) 2, (short) 2, (short) 2, (short) 3, (short) 2); + Framing.Add8WayLookup(63, (short) 6, (short) 2, (short) 7, (short) 2, (short) 8, (short) 2); + Framing.Add8WayLookup(74, (short) 1, (short) 3, (short) 3, (short) 3, (short) 5, (short) 3); + Framing.Add8WayLookup(75, (short) 17, (short) 1); + Framing.Add8WayLookup(78, (short) 16, (short) 2); + Framing.Add8WayLookup(79, (short) 13, (short) 3); + Framing.Add8WayLookup(91, (short) 4, (short) 0, (short) 4, (short) 1, (short) 4, (short) 2); + Framing.Add8WayLookup(95, (short) 11, (short) 0, (short) 11, (short) 1, (short) 11, (short) 2); + Framing.Add8WayLookup(111, (short) 17, (short) 4); + Framing.Add8WayLookup((int) sbyte.MaxValue, (short) 14, (short) 3); + Framing.Add8WayLookup(140, (short) 0, (short) 3, (short) 2, (short) 3, (short) 4, (short) 3); + Framing.Add8WayLookup(141, (short) 16, (short) 1); + Framing.Add8WayLookup(142, (short) 17, (short) 2); + Framing.Add8WayLookup(143, (short) 12, (short) 3); + Framing.Add8WayLookup(159, (short) 16, (short) 4); + Framing.Add8WayLookup(173, (short) 0, (short) 0, (short) 0, (short) 1, (short) 0, (short) 2); + Framing.Add8WayLookup(175, (short) 10, (short) 0, (short) 10, (short) 1, (short) 10, (short) 2); + Framing.Add8WayLookup(191, (short) 15, (short) 3); + Framing.Add8WayLookup(206, (short) 1, (short) 0, (short) 2, (short) 0, (short) 3, (short) 0); + Framing.Add8WayLookup(207, (short) 6, (short) 1, (short) 7, (short) 1, (short) 8, (short) 1); + Framing.Add8WayLookup(223, (short) 14, (short) 4); + Framing.Add8WayLookup(239, (short) 15, (short) 4); + Framing.Add8WayLookup((int) byte.MaxValue, (short) 1, (short) 1, (short) 2, (short) 1, (short) 3, (short) 1); + Framing.blockStyleLookup = new Framing.BlockStyle[6]; + Framing.blockStyleLookup[0] = new Framing.BlockStyle(true, true, true, true); + Framing.blockStyleLookup[1] = new Framing.BlockStyle(false, true, true, true); + Framing.blockStyleLookup[2] = new Framing.BlockStyle(false, true, true, false); + Framing.blockStyleLookup[3] = new Framing.BlockStyle(false, true, false, true); + Framing.blockStyleLookup[4] = new Framing.BlockStyle(true, false, true, false); + Framing.blockStyleLookup[5] = new Framing.BlockStyle(true, false, false, true); + Framing.phlebasTileFrameNumberLookup = new int[4][] + { + new int[3]{ 2, 4, 2 }, + new int[3]{ 1, 3, 1 }, + new int[3]{ 2, 2, 4 }, + new int[3]{ 1, 1, 3 } + }; + Framing.lazureTileFrameNumberLookup = new int[2][] + { + new int[2]{ 1, 3 }, + new int[2]{ 2, 4 } + }; + Framing.centerWallFrameLookup = new int[3][] + { + new int[3]{ 2, 0, 0 }, + new int[3]{ 0, 1, 4 }, + new int[3]{ 0, 3, 0 } + }; + Framing.wallFrameLookup = new Point16[20][]; + Framing.wallFrameSize = new Point16(36, 36); + Framing.AddWallFrameLookup(0, (short) 9, (short) 3, (short) 10, (short) 3, (short) 11, (short) 3, (short) 6, (short) 6); + Framing.AddWallFrameLookup(1, (short) 6, (short) 3, (short) 7, (short) 3, (short) 8, (short) 3, (short) 4, (short) 6); + Framing.AddWallFrameLookup(2, (short) 12, (short) 0, (short) 12, (short) 1, (short) 12, (short) 2, (short) 12, (short) 5); + Framing.AddWallFrameLookup(3, (short) 1, (short) 4, (short) 3, (short) 4, (short) 5, (short) 4, (short) 3, (short) 6); + Framing.AddWallFrameLookup(4, (short) 9, (short) 0, (short) 9, (short) 1, (short) 9, (short) 2, (short) 9, (short) 5); + Framing.AddWallFrameLookup(5, (short) 0, (short) 4, (short) 2, (short) 4, (short) 4, (short) 4, (short) 2, (short) 6); + Framing.AddWallFrameLookup(6, (short) 6, (short) 4, (short) 7, (short) 4, (short) 8, (short) 4, (short) 5, (short) 6); + Framing.AddWallFrameLookup(7, (short) 1, (short) 2, (short) 2, (short) 2, (short) 3, (short) 2, (short) 3, (short) 5); + Framing.AddWallFrameLookup(8, (short) 6, (short) 0, (short) 7, (short) 0, (short) 8, (short) 0, (short) 6, (short) 5); + Framing.AddWallFrameLookup(9, (short) 5, (short) 0, (short) 5, (short) 1, (short) 5, (short) 2, (short) 5, (short) 5); + Framing.AddWallFrameLookup(10, (short) 1, (short) 3, (short) 3, (short) 3, (short) 5, (short) 3, (short) 1, (short) 6); + Framing.AddWallFrameLookup(11, (short) 4, (short) 0, (short) 4, (short) 1, (short) 4, (short) 2, (short) 4, (short) 5); + Framing.AddWallFrameLookup(12, (short) 0, (short) 3, (short) 2, (short) 3, (short) 4, (short) 3, (short) 0, (short) 6); + Framing.AddWallFrameLookup(13, (short) 0, (short) 0, (short) 0, (short) 1, (short) 0, (short) 2, (short) 0, (short) 5); + Framing.AddWallFrameLookup(14, (short) 1, (short) 0, (short) 2, (short) 0, (short) 3, (short) 0, (short) 1, (short) 5); + Framing.AddWallFrameLookup(15, (short) 1, (short) 1, (short) 2, (short) 1, (short) 3, (short) 1, (short) 2, (short) 5); + Framing.AddWallFrameLookup(16, (short) 6, (short) 1, (short) 7, (short) 1, (short) 8, (short) 1, (short) 7, (short) 5); + Framing.AddWallFrameLookup(17, (short) 6, (short) 2, (short) 7, (short) 2, (short) 8, (short) 2, (short) 8, (short) 5); + Framing.AddWallFrameLookup(18, (short) 10, (short) 0, (short) 10, (short) 1, (short) 10, (short) 2, (short) 10, (short) 5); + Framing.AddWallFrameLookup(19, (short) 11, (short) 0, (short) 11, (short) 1, (short) 11, (short) 2, (short) 11, (short) 5); + } + + private static Framing.BlockStyle FindBlockStyle(Tile blockTile) => Framing.blockStyleLookup[blockTile.blockType()]; + + public static void Add8WayLookup( + int lookup, + short point1X, + short point1Y, + short point2X, + short point2Y, + short point3X, + short point3Y) + { + Point16[] point16Array = new Point16[3] + { + new Point16((int) point1X * (int) Framing.frameSize8Way.X, (int) point1Y * (int) Framing.frameSize8Way.Y), + new Point16((int) point2X * (int) Framing.frameSize8Way.X, (int) point2Y * (int) Framing.frameSize8Way.Y), + new Point16((int) point3X * (int) Framing.frameSize8Way.X, (int) point3Y * (int) Framing.frameSize8Way.Y) + }; + Framing.selfFrame8WayLookup[lookup] = point16Array; + } + + public static void Add8WayLookup(int lookup, short x, short y) + { + Point16[] point16Array = new Point16[3] + { + new Point16((int) x * (int) Framing.frameSize8Way.X, (int) y * (int) Framing.frameSize8Way.Y), + new Point16((int) x * (int) Framing.frameSize8Way.X, (int) y * (int) Framing.frameSize8Way.Y), + new Point16((int) x * (int) Framing.frameSize8Way.X, (int) y * (int) Framing.frameSize8Way.Y) + }; + Framing.selfFrame8WayLookup[lookup] = point16Array; + } + + public static void AddWallFrameLookup( + int lookup, + short point1X, + short point1Y, + short point2X, + short point2Y, + short point3X, + short point3Y, + short point4X, + short point4Y) + { + Point16[] point16Array = new Point16[4] + { + new Point16((int) point1X * (int) Framing.wallFrameSize.X, (int) point1Y * (int) Framing.wallFrameSize.Y), + new Point16((int) point2X * (int) Framing.wallFrameSize.X, (int) point2Y * (int) Framing.wallFrameSize.Y), + new Point16((int) point3X * (int) Framing.wallFrameSize.X, (int) point3Y * (int) Framing.wallFrameSize.Y), + new Point16((int) point4X * (int) Framing.wallFrameSize.X, (int) point4Y * (int) Framing.wallFrameSize.Y) + }; + Framing.wallFrameLookup[lookup] = point16Array; + } + + private static bool WillItBlend(ushort myType, ushort otherType) => TileID.Sets.ForcedDirtMerging[(int) myType] && otherType == (ushort) 0 || Main.tileBrick[(int) myType] && Main.tileBrick[(int) otherType] || (int) TileID.Sets.GemsparkFramingTypes[(int) otherType] == (int) TileID.Sets.GemsparkFramingTypes[(int) myType]; + + public static void SelfFrame8Way(int i, int j, Tile centerTile, bool resetFrame) + { + if (!centerTile.active()) + return; + Framing.BlockStyle blockStyle1 = Framing.FindBlockStyle(centerTile); + int index = 0; + Framing.BlockStyle blockStyle2 = new Framing.BlockStyle(); + if (blockStyle1.top) + { + Tile tileSafely = Framing.GetTileSafely(i, j - 1); + if (tileSafely.active() && Framing.WillItBlend(centerTile.type, tileSafely.type)) + { + blockStyle2 = Framing.FindBlockStyle(tileSafely); + if (blockStyle2.bottom) + index |= 1; + else + blockStyle2.Clear(); + } + } + Framing.BlockStyle blockStyle3 = new Framing.BlockStyle(); + if (blockStyle1.left) + { + Tile tileSafely = Framing.GetTileSafely(i - 1, j); + if (tileSafely.active() && Framing.WillItBlend(centerTile.type, tileSafely.type)) + { + blockStyle3 = Framing.FindBlockStyle(tileSafely); + if (blockStyle3.right) + index |= 2; + else + blockStyle3.Clear(); + } + } + Framing.BlockStyle blockStyle4 = new Framing.BlockStyle(); + if (blockStyle1.right) + { + Tile tileSafely = Framing.GetTileSafely(i + 1, j); + if (tileSafely.active() && Framing.WillItBlend(centerTile.type, tileSafely.type)) + { + blockStyle4 = Framing.FindBlockStyle(tileSafely); + if (blockStyle4.left) + index |= 4; + else + blockStyle4.Clear(); + } + } + Framing.BlockStyle blockStyle5 = new Framing.BlockStyle(); + if (blockStyle1.bottom) + { + Tile tileSafely = Framing.GetTileSafely(i, j + 1); + if (tileSafely.active() && Framing.WillItBlend(centerTile.type, tileSafely.type)) + { + blockStyle5 = Framing.FindBlockStyle(tileSafely); + if (blockStyle5.top) + index |= 8; + else + blockStyle5.Clear(); + } + } + if (blockStyle2.left && blockStyle3.top) + { + Tile tileSafely = Framing.GetTileSafely(i - 1, j - 1); + if (tileSafely.active() && Framing.WillItBlend(centerTile.type, tileSafely.type)) + { + Framing.BlockStyle blockStyle6 = Framing.FindBlockStyle(tileSafely); + if (blockStyle6.right && blockStyle6.bottom) + index |= 16; + } + } + if (blockStyle2.right && blockStyle4.top) + { + Tile tileSafely = Framing.GetTileSafely(i + 1, j - 1); + if (tileSafely.active() && Framing.WillItBlend(centerTile.type, tileSafely.type)) + { + Framing.BlockStyle blockStyle7 = Framing.FindBlockStyle(tileSafely); + if (blockStyle7.left && blockStyle7.bottom) + index |= 32; + } + } + if (blockStyle5.left && blockStyle3.bottom) + { + Tile tileSafely = Framing.GetTileSafely(i - 1, j + 1); + if (tileSafely.active() && Framing.WillItBlend(centerTile.type, tileSafely.type)) + { + Framing.BlockStyle blockStyle8 = Framing.FindBlockStyle(tileSafely); + if (blockStyle8.right && blockStyle8.top) + index |= 64; + } + } + if (blockStyle5.right && blockStyle4.bottom) + { + Tile tileSafely = Framing.GetTileSafely(i + 1, j + 1); + if (tileSafely.active() && Framing.WillItBlend(centerTile.type, tileSafely.type)) + { + Framing.BlockStyle blockStyle9 = Framing.FindBlockStyle(tileSafely); + if (blockStyle9.left && blockStyle9.top) + index |= 128; + } + } + if (resetFrame) + centerTile.frameNumber((byte) WorldGen.genRand.Next(0, 3)); + Point16 point16 = Framing.selfFrame8WayLookup[index][(int) centerTile.frameNumber()]; + centerTile.frameX = point16.X; + centerTile.frameY = point16.Y; + } + + public static void WallFrame(int i, int j, bool resetFrame = false) + { + if (WorldGen.SkipFramingBecauseOfGen || i <= 0 || j <= 0 || i >= Main.maxTilesX - 1 || j >= Main.maxTilesY - 1 || Main.tile[i, j] == null) + return; + if (Main.tile[i, j].wall >= (ushort) 316) + Main.tile[i, j].wall = (ushort) 0; + WorldGen.UpdateMapTile(i, j); + Tile tile1 = Main.tile[i, j]; + if (tile1.wall == (ushort) 0) + { + tile1.wallColor((byte) 0); + } + else + { + int index1 = 0; + if (j - 1 >= 0) + { + Tile tile2 = Main.tile[i, j - 1]; + if (tile2 != null && (tile2.wall > (ushort) 0 || tile2.active() && tile2.type == (ushort) 54)) + index1 = 1; + } + if (i - 1 >= 0) + { + Tile tile3 = Main.tile[i - 1, j]; + if (tile3 != null && (tile3.wall > (ushort) 0 || tile3.active() && tile3.type == (ushort) 54)) + index1 |= 2; + } + if (i + 1 <= Main.maxTilesX - 1) + { + Tile tile4 = Main.tile[i + 1, j]; + if (tile4 != null && (tile4.wall > (ushort) 0 || tile4.active() && tile4.type == (ushort) 54)) + index1 |= 4; + } + if (j + 1 <= Main.maxTilesY - 1) + { + Tile tile5 = Main.tile[i, j + 1]; + if (tile5 != null && (tile5.wall > (ushort) 0 || tile5.active() && tile5.type == (ushort) 54)) + index1 |= 8; + } + int index2; + if (Main.wallLargeFrames[(int) tile1.wall] == (byte) 1) + { + index2 = Framing.phlebasTileFrameNumberLookup[j % 4][i % 3] - 1; + tile1.wallFrameNumber((byte) index2); + } + else if (Main.wallLargeFrames[(int) tile1.wall] == (byte) 2) + { + index2 = Framing.lazureTileFrameNumberLookup[i % 2][j % 2] - 1; + tile1.wallFrameNumber((byte) index2); + } + else if (resetFrame) + { + index2 = WorldGen.genRand.Next(0, 3); + if (tile1.wall == (ushort) 21 && WorldGen.genRand.Next(2) == 0) + index2 = 2; + tile1.wallFrameNumber((byte) index2); + } + else + index2 = (int) tile1.wallFrameNumber(); + if (index1 == 15) + index1 += Framing.centerWallFrameLookup[i % 3][j % 3]; + Point16 point16 = Framing.wallFrameLookup[index1][index2]; + tile1.wallFrameX((int) point16.X); + tile1.wallFrameY((int) point16.Y); + } + } + + public static Tile GetTileSafely(Vector2 position) + { + position /= 16f; + return Framing.GetTileSafely((int) position.X, (int) position.Y); + } + + public static Tile GetTileSafely(Point pt) => Framing.GetTileSafely(pt.X, pt.Y); + + public static Tile GetTileSafely(Point16 pt) => Framing.GetTileSafely((int) pt.X, (int) pt.Y); + + public static Tile GetTileSafely(int i, int j) + { + if (!WorldGen.InWorld(i, j)) + return new Tile(); + Tile tile = Main.tile[i, j]; + if (tile == null) + { + tile = new Tile(); + Main.tile[i, j] = tile; + } + return tile; + } + + private struct BlockStyle + { + public bool top; + public bool bottom; + public bool left; + public bool right; + + public BlockStyle(bool up, bool down, bool left, bool right) + { + this.top = up; + this.bottom = down; + this.left = left; + this.right = right; + } + + public void Clear() => this.top = this.bottom = this.left = this.right = false; + } + } +} diff --git a/GameContent/ARenderTargetContentByRequest.cs b/GameContent/ARenderTargetContentByRequest.cs new file mode 100644 index 0000000..50dd23c --- /dev/null +++ b/GameContent/ARenderTargetContentByRequest.cs @@ -0,0 +1,74 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ARenderTargetContentByRequest +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; +using System; + +namespace Terraria.GameContent +{ + public abstract class ARenderTargetContentByRequest : INeedRenderTargetContent + { + protected RenderTarget2D _target; + protected bool _wasPrepared; + private bool _wasRequested; + + public bool IsReady => this._wasPrepared; + + public void Request() => this._wasRequested = true; + + public RenderTarget2D GetTarget() => this._target; + + public void PrepareRenderTarget(GraphicsDevice device, SpriteBatch spriteBatch) + { + this._wasPrepared = false; + if (!this._wasRequested) + return; + this._wasRequested = false; + this.HandleUseReqest(device, spriteBatch); + } + + protected abstract void HandleUseReqest(GraphicsDevice device, SpriteBatch spriteBatch); + + protected void PrepareARenderTarget_AndListenToEvents( + ref RenderTarget2D target, + GraphicsDevice device, + int neededWidth, + int neededHeight, + RenderTargetUsage usage) + { + if (target != null && !target.IsDisposed && target.Width == neededWidth && target.Height == neededHeight) + return; + if (target != null) + { + target.ContentLost -= new EventHandler(this.target_ContentLost); + target.Disposing -= new EventHandler(this.target_Disposing); + } + target = new RenderTarget2D(device, neededWidth, neededHeight, false, device.PresentationParameters.BackBufferFormat, DepthFormat.None, 0, usage); + target.ContentLost += new EventHandler(this.target_ContentLost); + target.Disposing += new EventHandler(this.target_Disposing); + } + + private void target_Disposing(object sender, EventArgs e) + { + this._wasPrepared = false; + this._target = (RenderTarget2D) null; + } + + private void target_ContentLost(object sender, EventArgs e) => this._wasPrepared = false; + + protected void PrepareARenderTarget_WithoutListeningToEvents( + ref RenderTarget2D target, + GraphicsDevice device, + int neededWidth, + int neededHeight, + RenderTargetUsage usage) + { + if (target != null && !target.IsDisposed && target.Width == neededWidth && target.Height == neededHeight) + return; + target = new RenderTarget2D(device, neededWidth, neededHeight, false, device.PresentationParameters.BackBufferFormat, DepthFormat.None, 0, usage); + } + } +} diff --git a/GameContent/Achievements/AchievementsHelper.cs b/GameContent/Achievements/AchievementsHelper.cs new file mode 100644 index 0000000..2d9e40e --- /dev/null +++ b/GameContent/Achievements/AchievementsHelper.cs @@ -0,0 +1,313 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Achievements.AchievementsHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Terraria.GameContent.Achievements +{ + public class AchievementsHelper + { + private static bool _isMining; + private static bool mayhemOK; + private static bool mayhem1down; + private static bool mayhem2down; + private static bool mayhem3down; + + public static event AchievementsHelper.ItemPickupEvent OnItemPickup; + + public static event AchievementsHelper.ItemCraftEvent OnItemCraft; + + public static event AchievementsHelper.TileDestroyedEvent OnTileDestroyed; + + public static event AchievementsHelper.NPCKilledEvent OnNPCKilled; + + public static event AchievementsHelper.ProgressionEventEvent OnProgressionEvent; + + public static bool CurrentlyMining + { + get => AchievementsHelper._isMining; + set => AchievementsHelper._isMining = value; + } + + public static void NotifyTileDestroyed(Player player, ushort tile) + { + if (Main.gameMenu || !AchievementsHelper._isMining || AchievementsHelper.OnTileDestroyed == null) + return; + AchievementsHelper.OnTileDestroyed(player, tile); + } + + public static void NotifyItemPickup(Player player, Item item) + { + if (AchievementsHelper.OnItemPickup == null) + return; + AchievementsHelper.OnItemPickup(player, (short) item.netID, item.stack); + } + + public static void NotifyItemPickup(Player player, Item item, int customStack) + { + if (AchievementsHelper.OnItemPickup == null) + return; + AchievementsHelper.OnItemPickup(player, (short) item.netID, customStack); + } + + public static void NotifyItemCraft(Recipe recipe) + { + if (AchievementsHelper.OnItemCraft == null) + return; + AchievementsHelper.OnItemCraft((short) recipe.createItem.netID, recipe.createItem.stack); + } + + public static void Initialize() => Player.Hooks.OnEnterWorld += new Action(AchievementsHelper.OnPlayerEnteredWorld); + + internal static void OnPlayerEnteredWorld(Player player) + { + if (AchievementsHelper.OnItemPickup != null) + { + for (int index = 0; index < 58; ++index) + AchievementsHelper.OnItemPickup(player, (short) player.inventory[index].type, player.inventory[index].stack); + for (int index = 0; index < player.armor.Length; ++index) + AchievementsHelper.OnItemPickup(player, (short) player.armor[index].type, player.armor[index].stack); + for (int index = 0; index < player.dye.Length; ++index) + AchievementsHelper.OnItemPickup(player, (short) player.dye[index].type, player.dye[index].stack); + for (int index = 0; index < player.miscEquips.Length; ++index) + AchievementsHelper.OnItemPickup(player, (short) player.miscEquips[index].type, player.miscEquips[index].stack); + for (int index = 0; index < player.miscDyes.Length; ++index) + AchievementsHelper.OnItemPickup(player, (short) player.miscDyes[index].type, player.miscDyes[index].stack); + for (int index = 0; index < player.bank.item.Length; ++index) + AchievementsHelper.OnItemPickup(player, (short) player.bank.item[index].type, player.bank.item[index].stack); + for (int index = 0; index < player.bank2.item.Length; ++index) + AchievementsHelper.OnItemPickup(player, (short) player.bank2.item[index].type, player.bank2.item[index].stack); + for (int index = 0; index < player.bank3.item.Length; ++index) + AchievementsHelper.OnItemPickup(player, (short) player.bank3.item[index].type, player.bank3.item[index].stack); + for (int index = 0; index < player.bank4.item.Length; ++index) + AchievementsHelper.OnItemPickup(player, (short) player.bank4.item[index].type, player.bank4.item[index].stack); + } + if (player.statManaMax > 20) + Main.Achievements.GetCondition("STAR_POWER", "Use").Complete(); + if (player.statLifeMax == 500 && player.statManaMax == 200) + Main.Achievements.GetCondition("TOPPED_OFF", "Use").Complete(); + if (player.miscEquips[4].type > 0) + Main.Achievements.GetCondition("HOLD_ON_TIGHT", "Equip").Complete(); + if (player.miscEquips[3].type > 0) + Main.Achievements.GetCondition("THE_CAVALRY", "Equip").Complete(); + for (int index = 0; index < player.armor.Length; ++index) + { + if (player.armor[index].wingSlot > (sbyte) 0) + { + Main.Achievements.GetCondition("HEAD_IN_THE_CLOUDS", "Equip").Complete(); + break; + } + } + if (player.armor[0].stack > 0 && player.armor[1].stack > 0 && player.armor[2].stack > 0) + Main.Achievements.GetCondition("MATCHING_ATTIRE", "Equip").Complete(); + if (player.armor[10].stack > 0 && player.armor[11].stack > 0 && player.armor[12].stack > 0) + Main.Achievements.GetCondition("FASHION_STATEMENT", "Equip").Complete(); + bool flag = true; + for (int slot = 0; slot < 10; ++slot) + { + if (player.IsAValidEquipmentSlotForIteration(slot) && (player.dye[slot].type < 1 || player.dye[slot].stack < 1)) + flag = false; + } + if (!flag) + return; + Main.Achievements.GetCondition("DYE_HARD", "Equip").Complete(); + } + + public static void NotifyNPCKilled(NPC npc) + { + if (Main.netMode == 0) + { + if (!npc.playerInteraction[Main.myPlayer]) + return; + AchievementsHelper.NotifyNPCKilledDirect(Main.player[Main.myPlayer], npc.netID); + } + else + { + for (int remoteClient = 0; remoteClient < (int) byte.MaxValue; ++remoteClient) + { + if (npc.playerInteraction[remoteClient]) + NetMessage.SendData(97, remoteClient, number: npc.netID); + } + } + } + + public static void NotifyNPCKilledDirect(Player player, int npcNetID) + { + if (AchievementsHelper.OnNPCKilled == null) + return; + AchievementsHelper.OnNPCKilled(player, (short) npcNetID); + } + + public static void NotifyProgressionEvent(int eventID) + { + if (Main.netMode == 2) + { + NetMessage.SendData(98, number: eventID); + } + else + { + if (AchievementsHelper.OnProgressionEvent == null) + return; + AchievementsHelper.OnProgressionEvent(eventID); + } + } + + public static void HandleOnEquip(Player player, Item item, int context) + { + if (context == 16) + Main.Achievements.GetCondition("HOLD_ON_TIGHT", "Equip").Complete(); + if (context == 17) + Main.Achievements.GetCondition("THE_CAVALRY", "Equip").Complete(); + if ((context == 10 || context == 11) && item.wingSlot > (sbyte) 0) + Main.Achievements.GetCondition("HEAD_IN_THE_CLOUDS", "Equip").Complete(); + if (context == 8 && player.armor[0].stack > 0 && player.armor[1].stack > 0 && player.armor[2].stack > 0) + Main.Achievements.GetCondition("MATCHING_ATTIRE", "Equip").Complete(); + if (context == 9 && player.armor[10].stack > 0 && player.armor[11].stack > 0 && player.armor[12].stack > 0) + Main.Achievements.GetCondition("FASHION_STATEMENT", "Equip").Complete(); + if (context != 12) + return; + for (int slot = 0; slot < 10; ++slot) + { + if (player.IsAValidEquipmentSlotForIteration(slot) && (player.dye[slot].type < 1 || player.dye[slot].stack < 1)) + return; + } + for (int index = 0; index < player.miscDyes.Length; ++index) + { + if (player.miscDyes[index].type < 1 || player.miscDyes[index].stack < 1) + return; + } + Main.Achievements.GetCondition("DYE_HARD", "Equip").Complete(); + } + + public static void HandleSpecialEvent(Player player, int eventID) + { + if (player.whoAmI != Main.myPlayer) + return; + switch (eventID) + { + case 1: + Main.Achievements.GetCondition("STAR_POWER", "Use").Complete(); + if (player.statLifeMax != 500 || player.statManaMax != 200) + break; + Main.Achievements.GetCondition("TOPPED_OFF", "Use").Complete(); + break; + case 2: + Main.Achievements.GetCondition("GET_A_LIFE", "Use").Complete(); + if (player.statLifeMax != 500 || player.statManaMax != 200) + break; + Main.Achievements.GetCondition("TOPPED_OFF", "Use").Complete(); + break; + case 3: + Main.Achievements.GetCondition("NOT_THE_BEES", "Use").Complete(); + break; + case 4: + Main.Achievements.GetCondition("WATCH_YOUR_STEP", "Hit").Complete(); + break; + case 5: + Main.Achievements.GetCondition("RAINBOWS_AND_UNICORNS", "Use").Complete(); + break; + case 6: + Main.Achievements.GetCondition("YOU_AND_WHAT_ARMY", "Spawn").Complete(); + break; + case 7: + Main.Achievements.GetCondition("THROWING_LINES", "Use").Complete(); + break; + case 8: + Main.Achievements.GetCondition("LUCKY_BREAK", "Hit").Complete(); + break; + case 9: + Main.Achievements.GetCondition("VEHICULAR_MANSLAUGHTER", "Hit").Complete(); + break; + case 10: + Main.Achievements.GetCondition("ROCK_BOTTOM", "Reach").Complete(); + break; + case 11: + Main.Achievements.GetCondition("INTO_ORBIT", "Reach").Complete(); + break; + case 12: + Main.Achievements.GetCondition("WHERES_MY_HONEY", "Reach").Complete(); + break; + case 13: + Main.Achievements.GetCondition("JEEPERS_CREEPERS", "Reach").Complete(); + break; + case 14: + Main.Achievements.GetCondition("ITS_GETTING_HOT_IN_HERE", "Reach").Complete(); + break; + case 15: + Main.Achievements.GetCondition("FUNKYTOWN", "Reach").Complete(); + break; + case 16: + Main.Achievements.GetCondition("I_AM_LOOT", "Peek").Complete(); + break; + } + } + + public static void HandleNurseService(int coinsSpent) => ((CustomFloatCondition) Main.Achievements.GetCondition("FREQUENT_FLYER", "Pay")).Value += (float) coinsSpent; + + public static void HandleAnglerService() + { + Main.Achievements.GetCondition("SERVANT_IN_TRAINING", "Finish").Complete(); + ++((CustomIntCondition) Main.Achievements.GetCondition("GOOD_LITTLE_SLAVE", "Finish")).Value; + ++((CustomIntCondition) Main.Achievements.GetCondition("TROUT_MONKEY", "Finish")).Value; + ++((CustomIntCondition) Main.Achievements.GetCondition("FAST_AND_FISHIOUS", "Finish")).Value; + ++((CustomIntCondition) Main.Achievements.GetCondition("SUPREME_HELPER_MINION", "Finish")).Value; + } + + public static void HandleRunning(float pixelsMoved) => ((CustomFloatCondition) Main.Achievements.GetCondition("MARATHON_MEDALIST", "Move")).Value += pixelsMoved; + + public static void HandleMining() => ++((CustomIntCondition) Main.Achievements.GetCondition("BULLDOZER", "Pick")).Value; + + public static void CheckMechaMayhem(int justKilled = -1) + { + if (!AchievementsHelper.mayhemOK) + { + if (!NPC.AnyNPCs((int) sbyte.MaxValue) || !NPC.AnyNPCs(134) || !NPC.AnyNPCs(126) || !NPC.AnyNPCs(125)) + return; + AchievementsHelper.mayhemOK = true; + AchievementsHelper.mayhem1down = false; + AchievementsHelper.mayhem2down = false; + AchievementsHelper.mayhem3down = false; + } + else + { + if (justKilled == 125 || justKilled == 126) + AchievementsHelper.mayhem1down = true; + else if (!NPC.AnyNPCs(125) && !NPC.AnyNPCs(126) && !AchievementsHelper.mayhem1down) + { + AchievementsHelper.mayhemOK = false; + return; + } + if (justKilled == 134) + AchievementsHelper.mayhem2down = true; + else if (!NPC.AnyNPCs(134) && !AchievementsHelper.mayhem2down) + { + AchievementsHelper.mayhemOK = false; + return; + } + if (justKilled == (int) sbyte.MaxValue) + AchievementsHelper.mayhem3down = true; + else if (!NPC.AnyNPCs((int) sbyte.MaxValue) && !AchievementsHelper.mayhem3down) + { + AchievementsHelper.mayhemOK = false; + return; + } + if (!AchievementsHelper.mayhem1down || !AchievementsHelper.mayhem2down || !AchievementsHelper.mayhem3down) + return; + AchievementsHelper.NotifyProgressionEvent(21); + } + } + + public delegate void ItemPickupEvent(Player player, short itemId, int count); + + public delegate void ItemCraftEvent(short itemId, int count); + + public delegate void TileDestroyedEvent(Player player, ushort tileId); + + public delegate void NPCKilledEvent(Player player, short npcId); + + public delegate void ProgressionEventEvent(int eventID); + } +} diff --git a/GameContent/Achievements/CustomFlagCondition.cs b/GameContent/Achievements/CustomFlagCondition.cs new file mode 100644 index 0000000..9c6cb5a --- /dev/null +++ b/GameContent/Achievements/CustomFlagCondition.cs @@ -0,0 +1,20 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Achievements.CustomFlagCondition +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.Achievements; + +namespace Terraria.GameContent.Achievements +{ + public class CustomFlagCondition : AchievementCondition + { + private CustomFlagCondition(string name) + : base(name) + { + } + + public static AchievementCondition Create(string name) => (AchievementCondition) new CustomFlagCondition(name); + } +} diff --git a/GameContent/Achievements/CustomFloatCondition.cs b/GameContent/Achievements/CustomFloatCondition.cs new file mode 100644 index 0000000..766ff44 --- /dev/null +++ b/GameContent/Achievements/CustomFloatCondition.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Achievements.CustomFloatCondition +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Terraria.Achievements; + +namespace Terraria.GameContent.Achievements +{ + public class CustomFloatCondition : AchievementCondition + { + [JsonProperty("Value")] + private float _value; + private float _maxValue; + + public float Value + { + get => this._value; + set + { + float newValue = Utils.Clamp(value, 0.0f, this._maxValue); + if (this._tracker != null) + ((AchievementTracker) this._tracker).SetValue(newValue); + this._value = newValue; + if ((double) this._value != (double) this._maxValue) + return; + this.Complete(); + } + } + + private CustomFloatCondition(string name, float maxValue) + : base(name) + { + this._maxValue = maxValue; + this._value = 0.0f; + } + + public override void Clear() + { + this._value = 0.0f; + base.Clear(); + } + + public override void Load(JObject state) + { + base.Load(state); + this._value = JToken.op_Explicit(state["Value"]); + if (this._tracker == null) + return; + ((AchievementTracker) this._tracker).SetValue(this._value, false); + } + + protected override IAchievementTracker CreateAchievementTracker() => (IAchievementTracker) new ConditionFloatTracker(this._maxValue); + + public static AchievementCondition Create(string name, float maxValue) => (AchievementCondition) new CustomFloatCondition(name, maxValue); + + public override void Complete() + { + if (this._tracker != null) + ((AchievementTracker) this._tracker).SetValue(this._maxValue); + this._value = this._maxValue; + base.Complete(); + } + } +} diff --git a/GameContent/Achievements/CustomIntCondition.cs b/GameContent/Achievements/CustomIntCondition.cs new file mode 100644 index 0000000..080e6b2 --- /dev/null +++ b/GameContent/Achievements/CustomIntCondition.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Achievements.CustomIntCondition +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Terraria.Achievements; + +namespace Terraria.GameContent.Achievements +{ + public class CustomIntCondition : AchievementCondition + { + [JsonProperty("Value")] + private int _value; + private int _maxValue; + + public int Value + { + get => this._value; + set + { + int newValue = Utils.Clamp(value, 0, this._maxValue); + if (this._tracker != null) + ((AchievementTracker) this._tracker).SetValue(newValue); + this._value = newValue; + if (this._value != this._maxValue) + return; + this.Complete(); + } + } + + private CustomIntCondition(string name, int maxValue) + : base(name) + { + this._maxValue = maxValue; + this._value = 0; + } + + public override void Clear() + { + this._value = 0; + base.Clear(); + } + + public override void Load(JObject state) + { + base.Load(state); + this._value = JToken.op_Explicit(state["Value"]); + if (this._tracker == null) + return; + ((AchievementTracker) this._tracker).SetValue(this._value, false); + } + + protected override IAchievementTracker CreateAchievementTracker() => (IAchievementTracker) new ConditionIntTracker(this._maxValue); + + public static AchievementCondition Create(string name, int maxValue) => (AchievementCondition) new CustomIntCondition(name, maxValue); + + public override void Complete() + { + if (this._tracker != null) + ((AchievementTracker) this._tracker).SetValue(this._maxValue); + this._value = this._maxValue; + base.Complete(); + } + } +} diff --git a/GameContent/Achievements/ItemCraftCondition.cs b/GameContent/Achievements/ItemCraftCondition.cs new file mode 100644 index 0000000..8c07989 --- /dev/null +++ b/GameContent/Achievements/ItemCraftCondition.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Achievements.ItemCraftCondition +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using Terraria.Achievements; + +namespace Terraria.GameContent.Achievements +{ + public class ItemCraftCondition : AchievementCondition + { + private const string Identifier = "ITEM_PICKUP"; + private static Dictionary> _listeners = new Dictionary>(); + private static bool _isListenerHooked; + private short[] _itemIds; + + private ItemCraftCondition(short itemId) + : base("ITEM_PICKUP_" + (object) itemId) + { + this._itemIds = new short[1]{ itemId }; + ItemCraftCondition.ListenForCraft(this); + } + + private ItemCraftCondition(short[] itemIds) + : base("ITEM_PICKUP_" + (object) itemIds[0]) + { + this._itemIds = itemIds; + ItemCraftCondition.ListenForCraft(this); + } + + private static void ListenForCraft(ItemCraftCondition condition) + { + if (!ItemCraftCondition._isListenerHooked) + { + AchievementsHelper.OnItemCraft += new AchievementsHelper.ItemCraftEvent(ItemCraftCondition.ItemCraftListener); + ItemCraftCondition._isListenerHooked = true; + } + for (int index = 0; index < condition._itemIds.Length; ++index) + { + if (!ItemCraftCondition._listeners.ContainsKey(condition._itemIds[index])) + ItemCraftCondition._listeners[condition._itemIds[index]] = new List(); + ItemCraftCondition._listeners[condition._itemIds[index]].Add(condition); + } + } + + private static void ItemCraftListener(short itemId, int count) + { + if (!ItemCraftCondition._listeners.ContainsKey(itemId)) + return; + foreach (AchievementCondition achievementCondition in ItemCraftCondition._listeners[itemId]) + achievementCondition.Complete(); + } + + public static AchievementCondition Create(params short[] items) => (AchievementCondition) new ItemCraftCondition(items); + + public static AchievementCondition Create(short item) => (AchievementCondition) new ItemCraftCondition(item); + + public static AchievementCondition[] CreateMany(params short[] items) + { + AchievementCondition[] achievementConditionArray = new AchievementCondition[items.Length]; + for (int index = 0; index < items.Length; ++index) + achievementConditionArray[index] = (AchievementCondition) new ItemCraftCondition(items[index]); + return achievementConditionArray; + } + } +} diff --git a/GameContent/Achievements/ItemPickupCondition.cs b/GameContent/Achievements/ItemPickupCondition.cs new file mode 100644 index 0000000..f99d9b8 --- /dev/null +++ b/GameContent/Achievements/ItemPickupCondition.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Achievements.ItemPickupCondition +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using Terraria.Achievements; + +namespace Terraria.GameContent.Achievements +{ + public class ItemPickupCondition : AchievementCondition + { + private const string Identifier = "ITEM_PICKUP"; + private static Dictionary> _listeners = new Dictionary>(); + private static bool _isListenerHooked; + private short[] _itemIds; + + private ItemPickupCondition(short itemId) + : base("ITEM_PICKUP_" + (object) itemId) + { + this._itemIds = new short[1]{ itemId }; + ItemPickupCondition.ListenForPickup(this); + } + + private ItemPickupCondition(short[] itemIds) + : base("ITEM_PICKUP_" + (object) itemIds[0]) + { + this._itemIds = itemIds; + ItemPickupCondition.ListenForPickup(this); + } + + private static void ListenForPickup(ItemPickupCondition condition) + { + if (!ItemPickupCondition._isListenerHooked) + { + AchievementsHelper.OnItemPickup += new AchievementsHelper.ItemPickupEvent(ItemPickupCondition.ItemPickupListener); + ItemPickupCondition._isListenerHooked = true; + } + for (int index = 0; index < condition._itemIds.Length; ++index) + { + if (!ItemPickupCondition._listeners.ContainsKey(condition._itemIds[index])) + ItemPickupCondition._listeners[condition._itemIds[index]] = new List(); + ItemPickupCondition._listeners[condition._itemIds[index]].Add(condition); + } + } + + private static void ItemPickupListener(Player player, short itemId, int count) + { + if (player.whoAmI != Main.myPlayer || !ItemPickupCondition._listeners.ContainsKey(itemId)) + return; + foreach (AchievementCondition achievementCondition in ItemPickupCondition._listeners[itemId]) + achievementCondition.Complete(); + } + + public static AchievementCondition Create(params short[] items) => (AchievementCondition) new ItemPickupCondition(items); + + public static AchievementCondition Create(short item) => (AchievementCondition) new ItemPickupCondition(item); + + public static AchievementCondition[] CreateMany(params short[] items) + { + AchievementCondition[] achievementConditionArray = new AchievementCondition[items.Length]; + for (int index = 0; index < items.Length; ++index) + achievementConditionArray[index] = (AchievementCondition) new ItemPickupCondition(items[index]); + return achievementConditionArray; + } + } +} diff --git a/GameContent/Achievements/NPCKilledCondition.cs b/GameContent/Achievements/NPCKilledCondition.cs new file mode 100644 index 0000000..895c93d --- /dev/null +++ b/GameContent/Achievements/NPCKilledCondition.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Achievements.NPCKilledCondition +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using Terraria.Achievements; + +namespace Terraria.GameContent.Achievements +{ + public class NPCKilledCondition : AchievementCondition + { + private const string Identifier = "NPC_KILLED"; + private static Dictionary> _listeners = new Dictionary>(); + private static bool _isListenerHooked; + private short[] _npcIds; + + private NPCKilledCondition(short npcId) + : base("NPC_KILLED_" + (object) npcId) + { + this._npcIds = new short[1]{ npcId }; + NPCKilledCondition.ListenForPickup(this); + } + + private NPCKilledCondition(short[] npcIds) + : base("NPC_KILLED_" + (object) npcIds[0]) + { + this._npcIds = npcIds; + NPCKilledCondition.ListenForPickup(this); + } + + private static void ListenForPickup(NPCKilledCondition condition) + { + if (!NPCKilledCondition._isListenerHooked) + { + AchievementsHelper.OnNPCKilled += new AchievementsHelper.NPCKilledEvent(NPCKilledCondition.NPCKilledListener); + NPCKilledCondition._isListenerHooked = true; + } + for (int index = 0; index < condition._npcIds.Length; ++index) + { + if (!NPCKilledCondition._listeners.ContainsKey(condition._npcIds[index])) + NPCKilledCondition._listeners[condition._npcIds[index]] = new List(); + NPCKilledCondition._listeners[condition._npcIds[index]].Add(condition); + } + } + + private static void NPCKilledListener(Player player, short npcId) + { + if (player.whoAmI != Main.myPlayer || !NPCKilledCondition._listeners.ContainsKey(npcId)) + return; + foreach (AchievementCondition achievementCondition in NPCKilledCondition._listeners[npcId]) + achievementCondition.Complete(); + } + + public static AchievementCondition Create(params short[] npcIds) => (AchievementCondition) new NPCKilledCondition(npcIds); + + public static AchievementCondition Create(short npcId) => (AchievementCondition) new NPCKilledCondition(npcId); + + public static AchievementCondition[] CreateMany(params short[] npcs) + { + AchievementCondition[] achievementConditionArray = new AchievementCondition[npcs.Length]; + for (int index = 0; index < npcs.Length; ++index) + achievementConditionArray[index] = (AchievementCondition) new NPCKilledCondition(npcs[index]); + return achievementConditionArray; + } + } +} diff --git a/GameContent/Achievements/ProgressionEventCondition.cs b/GameContent/Achievements/ProgressionEventCondition.cs new file mode 100644 index 0000000..b544728 --- /dev/null +++ b/GameContent/Achievements/ProgressionEventCondition.cs @@ -0,0 +1,69 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Achievements.ProgressionEventCondition +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using Terraria.Achievements; + +namespace Terraria.GameContent.Achievements +{ + public class ProgressionEventCondition : AchievementCondition + { + private const string Identifier = "PROGRESSION_EVENT"; + private static Dictionary> _listeners = new Dictionary>(); + private static bool _isListenerHooked; + private int[] _eventIDs; + + private ProgressionEventCondition(int eventID) + : base("PROGRESSION_EVENT_" + (object) eventID) + { + this._eventIDs = new int[1]{ eventID }; + ProgressionEventCondition.ListenForPickup(this); + } + + private ProgressionEventCondition(int[] eventIDs) + : base("PROGRESSION_EVENT_" + (object) eventIDs[0]) + { + this._eventIDs = eventIDs; + ProgressionEventCondition.ListenForPickup(this); + } + + private static void ListenForPickup(ProgressionEventCondition condition) + { + if (!ProgressionEventCondition._isListenerHooked) + { + AchievementsHelper.OnProgressionEvent += new AchievementsHelper.ProgressionEventEvent(ProgressionEventCondition.ProgressionEventListener); + ProgressionEventCondition._isListenerHooked = true; + } + for (int index = 0; index < condition._eventIDs.Length; ++index) + { + if (!ProgressionEventCondition._listeners.ContainsKey(condition._eventIDs[index])) + ProgressionEventCondition._listeners[condition._eventIDs[index]] = new List(); + ProgressionEventCondition._listeners[condition._eventIDs[index]].Add(condition); + } + } + + private static void ProgressionEventListener(int eventID) + { + if (!ProgressionEventCondition._listeners.ContainsKey(eventID)) + return; + foreach (AchievementCondition achievementCondition in ProgressionEventCondition._listeners[eventID]) + achievementCondition.Complete(); + } + + public static ProgressionEventCondition Create(params int[] eventIDs) => new ProgressionEventCondition(eventIDs); + + public static ProgressionEventCondition Create(int eventID) => new ProgressionEventCondition(eventID); + + public static ProgressionEventCondition[] CreateMany( + params int[] eventIDs) + { + ProgressionEventCondition[] progressionEventConditionArray = new ProgressionEventCondition[eventIDs.Length]; + for (int index = 0; index < eventIDs.Length; ++index) + progressionEventConditionArray[index] = new ProgressionEventCondition(eventIDs[index]); + return progressionEventConditionArray; + } + } +} diff --git a/GameContent/Achievements/TileDestroyedCondition.cs b/GameContent/Achievements/TileDestroyedCondition.cs new file mode 100644 index 0000000..e7ae778 --- /dev/null +++ b/GameContent/Achievements/TileDestroyedCondition.cs @@ -0,0 +1,51 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Achievements.TileDestroyedCondition +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using Terraria.Achievements; + +namespace Terraria.GameContent.Achievements +{ + public class TileDestroyedCondition : AchievementCondition + { + private const string Identifier = "TILE_DESTROYED"; + private static Dictionary> _listeners = new Dictionary>(); + private static bool _isListenerHooked; + private ushort[] _tileIds; + + private TileDestroyedCondition(ushort[] tileIds) + : base("TILE_DESTROYED_" + (object) tileIds[0]) + { + this._tileIds = tileIds; + TileDestroyedCondition.ListenForDestruction(this); + } + + private static void ListenForDestruction(TileDestroyedCondition condition) + { + if (!TileDestroyedCondition._isListenerHooked) + { + AchievementsHelper.OnTileDestroyed += new AchievementsHelper.TileDestroyedEvent(TileDestroyedCondition.TileDestroyedListener); + TileDestroyedCondition._isListenerHooked = true; + } + for (int index = 0; index < condition._tileIds.Length; ++index) + { + if (!TileDestroyedCondition._listeners.ContainsKey(condition._tileIds[index])) + TileDestroyedCondition._listeners[condition._tileIds[index]] = new List(); + TileDestroyedCondition._listeners[condition._tileIds[index]].Add(condition); + } + } + + private static void TileDestroyedListener(Player player, ushort tileId) + { + if (player.whoAmI != Main.myPlayer || !TileDestroyedCondition._listeners.ContainsKey(tileId)) + return; + foreach (AchievementCondition achievementCondition in TileDestroyedCondition._listeners[tileId]) + achievementCondition.Complete(); + } + + public static AchievementCondition Create(params ushort[] tileIds) => (AchievementCondition) new TileDestroyedCondition(tileIds); + } +} diff --git a/GameContent/Ambience/AmbienceServer.cs b/GameContent/Ambience/AmbienceServer.cs new file mode 100644 index 0000000..89632b6 --- /dev/null +++ b/GameContent/Ambience/AmbienceServer.cs @@ -0,0 +1,143 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Ambience.AmbienceServer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.GameContent.NetModules; +using Terraria.Net; + +namespace Terraria.GameContent.Ambience +{ + public class AmbienceServer + { + private const int MINIMUM_SECONDS_BETWEEN_SPAWNS = 10; + private const int MAXIMUM_SECONDS_BETWEEN_SPAWNS = 120; + private readonly Dictionary> _spawnConditions = new Dictionary>(); + private readonly Dictionary> _secondarySpawnConditionsPerPlayer = new Dictionary>(); + private int _updatesUntilNextAttempt; + private List _forcedSpawns = new List(); + + private static bool IsSunnyDay() => !Main.IsItRaining && Main.dayTime && !Main.eclipse; + + private static bool IsSunset() => Main.dayTime && Main.time > 40500.0; + + private static bool IsCalmNight() => !Main.IsItRaining && !Main.dayTime && !Main.bloodMoon && !Main.pumpkinMoon && !Main.snowMoon; + + public AmbienceServer() + { + this.ResetSpawnTime(); + this._spawnConditions[SkyEntityType.BirdsV] = new Func(AmbienceServer.IsSunnyDay); + this._spawnConditions[SkyEntityType.Wyvern] = (Func) (() => AmbienceServer.IsSunnyDay() && Main.hardMode); + this._spawnConditions[SkyEntityType.Airship] = (Func) (() => AmbienceServer.IsSunnyDay() && Main.IsItAHappyWindyDay); + this._spawnConditions[SkyEntityType.AirBalloon] = (Func) (() => AmbienceServer.IsSunnyDay() && !Main.IsItAHappyWindyDay); + this._spawnConditions[SkyEntityType.Eyeball] = (Func) (() => !Main.dayTime); + this._spawnConditions[SkyEntityType.Butterflies] = (Func) (() => AmbienceServer.IsSunnyDay() && !Main.IsItAHappyWindyDay && !NPC.TooWindyForButterflies && NPC.butterflyChance < 6); + this._spawnConditions[SkyEntityType.LostKite] = (Func) (() => Main.dayTime && !Main.eclipse && Main.IsItAHappyWindyDay); + this._spawnConditions[SkyEntityType.Vulture] = (Func) (() => AmbienceServer.IsSunnyDay()); + this._spawnConditions[SkyEntityType.Bats] = (Func) (() => AmbienceServer.IsSunset() && AmbienceServer.IsSunnyDay() || AmbienceServer.IsCalmNight()); + this._spawnConditions[SkyEntityType.PixiePosse] = (Func) (() => AmbienceServer.IsSunnyDay() || AmbienceServer.IsCalmNight()); + this._spawnConditions[SkyEntityType.Seagulls] = (Func) (() => AmbienceServer.IsSunnyDay()); + this._spawnConditions[SkyEntityType.SlimeBalloons] = (Func) (() => AmbienceServer.IsSunnyDay() && Main.IsItAHappyWindyDay); + this._spawnConditions[SkyEntityType.Gastropods] = (Func) (() => AmbienceServer.IsCalmNight()); + this._spawnConditions[SkyEntityType.Pegasus] = (Func) (() => AmbienceServer.IsSunnyDay()); + this._spawnConditions[SkyEntityType.EaterOfSouls] = (Func) (() => AmbienceServer.IsSunnyDay() || AmbienceServer.IsCalmNight()); + this._spawnConditions[SkyEntityType.Crimera] = (Func) (() => AmbienceServer.IsSunnyDay() || AmbienceServer.IsCalmNight()); + this._spawnConditions[SkyEntityType.Hellbats] = (Func) (() => true); + this._secondarySpawnConditionsPerPlayer[SkyEntityType.Vulture] = (Func) (player => player.ZoneDesert); + this._secondarySpawnConditionsPerPlayer[SkyEntityType.PixiePosse] = (Func) (player => player.ZoneHallow); + this._secondarySpawnConditionsPerPlayer[SkyEntityType.Seagulls] = (Func) (player => player.ZoneBeach); + this._secondarySpawnConditionsPerPlayer[SkyEntityType.Gastropods] = (Func) (player => player.ZoneHallow); + this._secondarySpawnConditionsPerPlayer[SkyEntityType.Pegasus] = (Func) (player => player.ZoneHallow); + this._secondarySpawnConditionsPerPlayer[SkyEntityType.EaterOfSouls] = (Func) (player => player.ZoneCorrupt); + this._secondarySpawnConditionsPerPlayer[SkyEntityType.Crimera] = (Func) (player => player.ZoneCrimson); + this._secondarySpawnConditionsPerPlayer[SkyEntityType.Bats] = (Func) (player => player.ZoneJungle); + } + + private bool IsPlayerAtRightHeightForType(SkyEntityType type, Player plr) => type == SkyEntityType.Hellbats ? AmbienceServer.IsPlayerInAPlaceWhereTheyCanSeeAmbienceHell(plr) : AmbienceServer.IsPlayerInAPlaceWhereTheyCanSeeAmbienceSky(plr); + + public void Update() + { + this.SpawnForcedEntities(); + if (this._updatesUntilNextAttempt > 0) + { + this._updatesUntilNextAttempt -= Main.dayRate; + } + else + { + this.ResetSpawnTime(); + IEnumerable source1 = this._spawnConditions.Where>>((Func>, bool>) (pair => pair.Value())).Select>, SkyEntityType>((Func>, SkyEntityType>) (pair => pair.Key)); + if (source1.Count((Func) (type => true)) == 0) + return; + Player player; + AmbienceServer.FindPlayerThatCanSeeBackgroundAmbience(out player); + if (player == null) + return; + IEnumerable source2 = source1.Where((Func) (type => this.IsPlayerAtRightHeightForType(type, player) && this._secondarySpawnConditionsPerPlayer.ContainsKey(type) && this._secondarySpawnConditionsPerPlayer[type](player))); + int maxValue = source2.Count((Func) (type => true)); + if (maxValue == 0 || Main.rand.Next(5) < 3) + { + source2 = source1.Where((Func) (type => + { + if (!this.IsPlayerAtRightHeightForType(type, player)) + return false; + return !this._secondarySpawnConditionsPerPlayer.ContainsKey(type) || this._secondarySpawnConditionsPerPlayer[type](player); + })); + maxValue = source2.Count((Func) (type => true)); + } + if (maxValue == 0) + return; + SkyEntityType type1 = source2.ElementAt(Main.rand.Next(maxValue)); + this.SpawnForPlayer(player, type1); + } + } + + public void ResetSpawnTime() => this._updatesUntilNextAttempt = Main.rand.Next(600, 7200); + + public void ForceEntitySpawn(AmbienceServer.AmbienceSpawnInfo info) => this._forcedSpawns.Add(info); + + private void SpawnForcedEntities() + { + if (this._forcedSpawns.Count == 0) + return; + for (int index = this._forcedSpawns.Count - 1; index >= 0; --index) + { + AmbienceServer.AmbienceSpawnInfo forcedSpawn = this._forcedSpawns[index]; + Player player; + if (forcedSpawn.targetPlayer == -1) + AmbienceServer.FindPlayerThatCanSeeBackgroundAmbience(out player); + else + player = Main.player[forcedSpawn.targetPlayer]; + if (player != null && this.IsPlayerAtRightHeightForType(forcedSpawn.skyEntityType, player)) + this.SpawnForPlayer(player, forcedSpawn.skyEntityType); + this._forcedSpawns.RemoveAt(index); + } + } + + private static void FindPlayerThatCanSeeBackgroundAmbience(out Player player) + { + player = (Player) null; + int maxValue = ((IEnumerable) Main.player).Count((Func) (plr => plr.active && AmbienceServer.IsPlayerInAPlaceWhereTheyCanSeeAmbience(plr))); + if (maxValue == 0) + return; + player = ((IEnumerable) Main.player).Where((Func) (plr => plr.active && AmbienceServer.IsPlayerInAPlaceWhereTheyCanSeeAmbience(plr))).ElementAt(Main.rand.Next(maxValue)); + } + + private static bool IsPlayerInAPlaceWhereTheyCanSeeAmbience(Player plr) => AmbienceServer.IsPlayerInAPlaceWhereTheyCanSeeAmbienceSky(plr) || AmbienceServer.IsPlayerInAPlaceWhereTheyCanSeeAmbienceHell(plr); + + private static bool IsPlayerInAPlaceWhereTheyCanSeeAmbienceSky(Player plr) => (double) plr.position.Y <= Main.worldSurface * 16.0 + 1600.0; + + private static bool IsPlayerInAPlaceWhereTheyCanSeeAmbienceHell(Player plr) => (double) plr.position.Y >= (double) ((Main.UnderworldLayer - 100) * 16); + + private void SpawnForPlayer(Player player, SkyEntityType type) => NetManager.Instance.BroadcastOrLoopback(NetAmbienceModule.SerializeSkyEntitySpawn(player, type)); + + public struct AmbienceSpawnInfo + { + public SkyEntityType skyEntityType; + public int targetPlayer; + } + } +} diff --git a/GameContent/Ambience/AmbientSkyDrawCache.cs b/GameContent/Ambience/AmbientSkyDrawCache.cs new file mode 100644 index 0000000..46ed61f --- /dev/null +++ b/GameContent/Ambience/AmbientSkyDrawCache.cs @@ -0,0 +1,37 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Ambience.AmbientSkyDrawCache +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Ambience +{ + public class AmbientSkyDrawCache + { + public static AmbientSkyDrawCache Instance = new AmbientSkyDrawCache(); + public AmbientSkyDrawCache.UnderworldCache[] Underworld = new AmbientSkyDrawCache.UnderworldCache[5]; + public AmbientSkyDrawCache.OceanLineCache OceanLineInfo; + + public void SetUnderworldInfo(int drawIndex, float scale) => this.Underworld[drawIndex] = new AmbientSkyDrawCache.UnderworldCache() + { + Scale = scale + }; + + public void SetOceanLineInfo(float yScreenPosition, float oceanOpacity) => this.OceanLineInfo = new AmbientSkyDrawCache.OceanLineCache() + { + YScreenPosition = yScreenPosition, + OceanOpacity = oceanOpacity + }; + + public struct UnderworldCache + { + public float Scale; + } + + public struct OceanLineCache + { + public float YScreenPosition; + public float OceanOpacity; + } + } +} diff --git a/GameContent/Ambience/SkyEntityType.cs b/GameContent/Ambience/SkyEntityType.cs new file mode 100644 index 0000000..0fd39a1 --- /dev/null +++ b/GameContent/Ambience/SkyEntityType.cs @@ -0,0 +1,31 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Ambience.SkyEntityType +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Ambience +{ + public enum SkyEntityType : byte + { + BirdsV, + Wyvern, + Airship, + AirBalloon, + Eyeball, + Meteor, + BoneSerpent, + Bats, + Butterflies, + LostKite, + Vulture, + PixiePosse, + Seagulls, + SlimeBalloons, + Gastropods, + Pegasus, + EaterOfSouls, + Crimera, + Hellbats, + } +} diff --git a/GameContent/AmbientWindSystem.cs b/GameContent/AmbientWindSystem.cs new file mode 100644 index 0000000..f3cf93e --- /dev/null +++ b/GameContent/AmbientWindSystem.cs @@ -0,0 +1,134 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.AmbientWindSystem +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.Utilities; + +namespace Terraria.GameContent +{ + public class AmbientWindSystem + { + private UnifiedRandom _random = new UnifiedRandom(); + private List _spotsForAirboneWind = new List(); + private int _updatesCounter; + + public void Update() + { + if (!Main.LocalPlayer.ZoneGraveyard) + return; + ++this._updatesCounter; + Rectangle tileWorkSpace = this.GetTileWorkSpace(); + int num1 = tileWorkSpace.X + tileWorkSpace.Width; + int num2 = tileWorkSpace.Y + tileWorkSpace.Height; + for (int x = tileWorkSpace.X; x < num1; ++x) + { + for (int y = tileWorkSpace.Y; y < num2; ++y) + this.TrySpawningWind(x, y); + } + if (this._updatesCounter % 30 != 0) + return; + this.SpawnAirborneWind(); + } + + private void SpawnAirborneWind() + { + foreach (Point point in this._spotsForAirboneWind) + this.SpawnAirborneCloud(point.X, point.Y); + this._spotsForAirboneWind.Clear(); + } + + private Rectangle GetTileWorkSpace() + { + Point tileCoordinates = Main.LocalPlayer.Center.ToTileCoordinates(); + int width = 120; + int height = 30; + return new Rectangle(tileCoordinates.X - width / 2, tileCoordinates.Y - height / 2, width, height); + } + + private void TrySpawningWind(int x, int y) + { + if (!WorldGen.InWorld(x, y, 10) || Main.tile[x, y] == null) + return; + this.TestAirCloud(x, y); + Tile tile = Main.tile[x, y]; + if (!tile.active() || tile.slope() > (byte) 0 || tile.halfBrick() || !Main.tileSolid[(int) tile.type] || WorldGen.SolidTile(Main.tile[x, y - 1]) || this._random.Next(120) != 0) + return; + this.SpawnFloorCloud(x, y); + if (this._random.Next(3) != 0) + return; + this.SpawnFloorCloud(x, y - 1); + } + + private void SpawnAirborneCloud(int x, int y) + { + int num1 = this._random.Next(2, 6); + float num2 = 1.1f; + float num3 = 2.2f; + float num4 = 3f * (float) Math.PI / 400f * this._random.NextFloatDirection(); + float num5 = 3f * (float) Math.PI / 400f * this._random.NextFloatDirection(); + while ((double) num5 > -3.0 * Math.PI / 800.0 && (double) num5 < 3.0 * Math.PI / 800.0) + num5 = 3f * (float) Math.PI / 400f * this._random.NextFloatDirection(); + if (this._random.Next(4) == 0) + { + num1 = this._random.Next(9, 16); + num2 = 1.1f; + num3 = 1.2f; + } + else if (this._random.Next(4) == 0) + { + num1 = this._random.Next(9, 16); + num2 = 1.1f; + num3 = 0.2f; + } + Vector2 vector2_1 = new Vector2(-10f, 0.0f); + Vector2 worldCoordinates = new Point(x, y).ToWorldCoordinates(); + float num6 = num4 - (float) ((double) num5 * (double) num1 * 0.5); + for (int index = 0; index < num1; ++index) + { + if (Main.rand.Next(10) == 0) + num5 *= this._random.NextFloatDirection(); + Vector2 vector2_2 = this._random.NextVector2Circular(4f, 4f); + int Type = 1091 + this._random.Next(2) * 2; + float num7 = 1.4f; + float Scale = num2 + this._random.NextFloat() * num3; + float num8 = num6 + num5; + Vector2 vector2_3 = Vector2.UnitX.RotatedBy((double) num8) * num7; + Gore.NewGorePerfect(worldCoordinates + vector2_2 - vector2_1, vector2_3 * Main.WindForVisuals, Type, Scale); + worldCoordinates += vector2_3 * 6.5f * Scale; + num6 = num8; + } + } + + private void SpawnFloorCloud(int x, int y) + { + Vector2 worldCoordinates = new Point(x, y - 1).ToWorldCoordinates(); + int Type = this._random.Next(1087, 1090); + float num1 = 16f * this._random.NextFloat(); + worldCoordinates.Y -= num1; + if ((double) num1 < 4.0) + Type = 1090; + float num2 = 0.4f; + float Scale = (float) (0.800000011920929 + (double) this._random.NextFloat() * 0.200000002980232); + Gore.NewGorePerfect(worldCoordinates, Vector2.UnitX * num2 * Main.WindForVisuals, Type, Scale); + } + + private void TestAirCloud(int x, int y) + { + if (this._random.Next(120000) != 0) + return; + for (int index = -2; index <= 2; ++index) + { + if (index != 0 && (!this.DoesTileAllowWind(Main.tile[x + index, y]) || !this.DoesTileAllowWind(Main.tile[x, y + index]))) + return; + } + this._spotsForAirboneWind.Add(new Point(x, y)); + } + + private bool DoesTileAllowWind(Tile t) => !t.active() || !Main.tileSolid[(int) t.type]; + } +} diff --git a/GameContent/AnOutlinedDrawRenderTargetContent.cs b/GameContent/AnOutlinedDrawRenderTargetContent.cs new file mode 100644 index 0000000..c5fa622 --- /dev/null +++ b/GameContent/AnOutlinedDrawRenderTargetContent.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.AnOutlinedDrawRenderTargetContent +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; + +namespace Terraria.GameContent +{ + public abstract class AnOutlinedDrawRenderTargetContent : ARenderTargetContentByRequest + { + protected int width = 84; + protected int height = 84; + public Color _borderColor = Color.White; + private EffectPass _coloringShader; + private RenderTarget2D _helperTarget; + + public void UseColor(Color color) => this._borderColor = color; + + protected override void HandleUseReqest(GraphicsDevice device, SpriteBatch spriteBatch) + { + Effect pixelShader = Main.pixelShader; + if (this._coloringShader == null) + this._coloringShader = pixelShader.CurrentTechnique.Passes["ColorOnly"]; + Rectangle rectangle = new Rectangle(0, 0, this.width, this.height); + this.PrepareARenderTarget_AndListenToEvents(ref this._target, device, this.width, this.height, RenderTargetUsage.PreserveContents); + this.PrepareARenderTarget_WithoutListeningToEvents(ref this._helperTarget, device, this.width, this.height, RenderTargetUsage.DiscardContents); + device.SetRenderTarget(this._helperTarget); + device.Clear(Color.Transparent); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null); + this.DrawTheContent(spriteBatch); + spriteBatch.End(); + device.SetRenderTarget(this._target); + device.Clear(Color.Transparent); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null); + this._coloringShader.Apply(); + int num1 = 2; + int num2 = num1 * 2; + for (int index1 = -num2; index1 <= num2; index1 += num1) + { + for (int index2 = -num2; index2 <= num2; index2 += num1) + { + if (Math.Abs(index1) + Math.Abs(index2) == num2) + spriteBatch.Draw((Texture2D) this._helperTarget, new Vector2((float) index1, (float) index2), Color.Black); + } + } + int num3 = num1; + for (int index3 = -num3; index3 <= num3; index3 += num1) + { + for (int index4 = -num3; index4 <= num3; index4 += num1) + { + if (Math.Abs(index3) + Math.Abs(index4) == num3) + spriteBatch.Draw((Texture2D) this._helperTarget, new Vector2((float) index3, (float) index4), this._borderColor); + } + } + pixelShader.CurrentTechnique.Passes[0].Apply(); + spriteBatch.Draw((Texture2D) this._helperTarget, Vector2.Zero, Color.White); + spriteBatch.End(); + device.SetRenderTarget((RenderTarget2D) null); + this._wasPrepared = true; + } + + internal abstract void DrawTheContent(SpriteBatch spriteBatch); + } +} diff --git a/GameContent/AssetSourceController.cs b/GameContent/AssetSourceController.cs new file mode 100644 index 0000000..8d1f756 --- /dev/null +++ b/GameContent/AssetSourceController.cs @@ -0,0 +1,53 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.AssetSourceController +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using ReLogic.Content; +using ReLogic.Content.Sources; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.IO; + +namespace Terraria.GameContent +{ + public class AssetSourceController + { + private readonly List _staticSources; + private readonly IAssetRepository _assetRepository; + + public event Action OnResourcePackChange; + + public ResourcePackList ActiveResourcePackList { get; private set; } + + public AssetSourceController( + IAssetRepository assetRepository, + IEnumerable staticSources) + { + this._assetRepository = assetRepository; + this._staticSources = staticSources.ToList(); + this.UseResourcePacks(new ResourcePackList()); + } + + public void Refresh() + { + foreach (ResourcePack allPack in this.ActiveResourcePackList.AllPacks) + allPack.Refresh(); + this.UseResourcePacks(this.ActiveResourcePackList); + } + + public void UseResourcePacks(ResourcePackList resourcePacks) + { + if (this.OnResourcePackChange != null) + this.OnResourcePackChange(resourcePacks); + this.ActiveResourcePackList = resourcePacks; + List icontentSourceList = new List(resourcePacks.EnabledPacks.OrderBy((Func) (pack => pack.SortingOrder)).Select((Func) (pack => pack.GetContentSource()))); + icontentSourceList.AddRange((IEnumerable) this._staticSources); + foreach (IContentSource icontentSource in icontentSourceList) + icontentSource.ClearRejections(); + this._assetRepository.SetSources((IEnumerable) icontentSourceList, (AssetRequestMode) 1); + } + } +} diff --git a/GameContent/BackgroundChangeFlashInfo.cs b/GameContent/BackgroundChangeFlashInfo.cs new file mode 100644 index 0000000..2ad70fe --- /dev/null +++ b/GameContent/BackgroundChangeFlashInfo.cs @@ -0,0 +1,58 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.BackgroundChangeFlashInfo +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.GameContent +{ + public class BackgroundChangeFlashInfo + { + private int[] _variations = new int[13]; + private float[] _flashPower = new float[13]; + + public void UpdateCache() + { + this.UpdateVariation(0, WorldGen.treeBG1); + this.UpdateVariation(1, WorldGen.treeBG2); + this.UpdateVariation(2, WorldGen.treeBG3); + this.UpdateVariation(3, WorldGen.treeBG4); + this.UpdateVariation(4, WorldGen.corruptBG); + this.UpdateVariation(5, WorldGen.jungleBG); + this.UpdateVariation(6, WorldGen.snowBG); + this.UpdateVariation(7, WorldGen.hallowBG); + this.UpdateVariation(8, WorldGen.crimsonBG); + this.UpdateVariation(9, WorldGen.desertBG); + this.UpdateVariation(10, WorldGen.oceanBG); + this.UpdateVariation(11, WorldGen.mushroomBG); + this.UpdateVariation(12, WorldGen.underworldBG); + } + + private void UpdateVariation(int areaId, int newVariationValue) + { + int variation = this._variations[areaId]; + this._variations[areaId] = newVariationValue; + int num = newVariationValue; + if (variation == num) + return; + this.ValueChanged(areaId); + } + + private void ValueChanged(int areaId) + { + if (Main.gameMenu) + return; + this._flashPower[areaId] = 1f; + } + + public void UpdateFlashValues() + { + for (int index = 0; index < this._flashPower.Length; ++index) + this._flashPower[index] = MathHelper.Clamp(this._flashPower[index] - 0.05f, 0.0f, 1f); + } + + public float GetFlashPower(int areaId) => this._flashPower[areaId]; + } +} diff --git a/GameContent/Bestiary/BestiaryDatabase.cs b/GameContent/Bestiary/BestiaryDatabase.cs new file mode 100644 index 0000000..99883ed --- /dev/null +++ b/GameContent/Bestiary/BestiaryDatabase.cs @@ -0,0 +1,86 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.BestiaryDatabase +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using Terraria.GameContent.ItemDropRules; + +namespace Terraria.GameContent.Bestiary +{ + public class BestiaryDatabase + { + private List _entries = new List(); + private List _filters = new List(); + private List _sortSteps = new List(); + private Dictionary _byNpcId = new Dictionary(); + private BestiaryEntry _trashEntry = new BestiaryEntry(); + + public List Entries => this._entries; + + public List Filters => this._filters; + + public List SortSteps => this._sortSteps; + + public BestiaryEntry Register(BestiaryEntry entry) + { + this._entries.Add(entry); + for (int index = 0; index < entry.Info.Count; ++index) + { + if (entry.Info[index] is NPCNetIdBestiaryInfoElement bestiaryInfoElement1) + this._byNpcId[bestiaryInfoElement1.NetId] = entry; + } + return entry; + } + + public IBestiaryEntryFilter Register(IBestiaryEntryFilter filter) + { + this._filters.Add(filter); + return filter; + } + + public IBestiarySortStep Register(IBestiarySortStep sortStep) + { + this._sortSteps.Add(sortStep); + return sortStep; + } + + public BestiaryEntry FindEntryByNPCID(int npcNetId) + { + BestiaryEntry bestiaryEntry; + if (this._byNpcId.TryGetValue(npcNetId, out bestiaryEntry)) + return bestiaryEntry; + this._trashEntry.Info.Clear(); + return this._trashEntry; + } + + public void Merge(ItemDropDatabase dropsDatabase) + { + for (int npcId = -65; npcId < 663; ++npcId) + this.ExtractDropsForNPC(dropsDatabase, npcId); + } + + private void ExtractDropsForNPC(ItemDropDatabase dropsDatabase, int npcId) + { + BestiaryEntry entryByNpcid = this.FindEntryByNPCID(npcId); + if (entryByNpcid == null) + return; + List rulesForNpcid = dropsDatabase.GetRulesForNPCID(npcId, false); + List drops = new List(); + DropRateInfoChainFeed ratesInfo = new DropRateInfoChainFeed(1f); + foreach (IItemDropRule itemDropRule in rulesForNpcid) + itemDropRule.ReportDroprates(drops, ratesInfo); + foreach (DropRateInfo info in drops) + entryByNpcid.Info.Add((IBestiaryInfoElement) new ItemDropBestiaryInfoElement(info)); + } + + public void ApplyPass(BestiaryDatabase.BestiaryEntriesPass pass) + { + for (int index = 0; index < this._entries.Count; ++index) + pass(this._entries[index]); + } + + public delegate void BestiaryEntriesPass(BestiaryEntry entry); + } +} diff --git a/GameContent/Bestiary/BestiaryDatabaseNPCsPopulator.cs b/GameContent/Bestiary/BestiaryDatabaseNPCsPopulator.cs new file mode 100644 index 0000000..02571cf --- /dev/null +++ b/GameContent/Bestiary/BestiaryDatabaseNPCsPopulator.cs @@ -0,0 +1,3601 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.BestiaryDatabaseNPCsPopulator +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.ID; + +namespace Terraria.GameContent.Bestiary +{ + public class BestiaryDatabaseNPCsPopulator + { + private BestiaryDatabase _currentDatabase; + + private BestiaryEntry FindEntryByNPCID(int npcNetId) => this._currentDatabase.FindEntryByNPCID(npcNetId); + + private BestiaryEntry Register(BestiaryEntry entry) => this._currentDatabase.Register(entry); + + private IBestiaryEntryFilter Register(IBestiaryEntryFilter filter) => this._currentDatabase.Register(filter); + + public void Populate(BestiaryDatabase database) + { + this._currentDatabase = database; + this.AddEmptyEntries_CrittersAndEnemies_Automated(); + this.AddTownNPCs_Manual(); + this.AddNPCBiomeRelationships_Automated(); + this.AddNPCBiomeRelationships_Manual(); + this.AddNPCBiomeRelationships_AddDecorations_Automated(); + this.ModifyEntriesThatNeedIt(); + this.RegisterFilters(); + this.RegisterSortSteps(); + } + + private void RegisterTestEntries() => this.Register(BestiaryEntry.Biome("Bestiary_Biomes.Hallow", "Images/UI/Bestiary/Biome_Hallow", new Func(BestiaryDatabaseNPCsPopulator.Conditions.ReachHardMode))); + + private void RegisterSortSteps() + { + foreach (IBestiarySortStep sortStep in new List() + { + (IBestiarySortStep) new SortingSteps.ByUnlockState(), + (IBestiarySortStep) new SortingSteps.ByBestiarySortingId(), + (IBestiarySortStep) new SortingSteps.Alphabetical(), + (IBestiarySortStep) new SortingSteps.ByNetId(), + (IBestiarySortStep) new SortingSteps.ByAttack(), + (IBestiarySortStep) new SortingSteps.ByDefense(), + (IBestiarySortStep) new SortingSteps.ByCoins(), + (IBestiarySortStep) new SortingSteps.ByHP(), + (IBestiarySortStep) new SortingSteps.ByBestiaryRarity() + }) + this._currentDatabase.Register(sortStep); + } + + private void RegisterFilters() + { + this.Register((IBestiaryEntryFilter) new Filters.ByUnlockState()); + this.Register((IBestiaryEntryFilter) new Filters.ByBoss()); + this.Register((IBestiaryEntryFilter) new Filters.ByRareCreature()); + List elementsForFilters = BestiaryDatabaseNPCsPopulator.CommonTags.GetCommonInfoElementsForFilters(); + for (int index = 0; index < elementsForFilters.Count; ++index) + this.Register((IBestiaryEntryFilter) new Filters.ByInfoElement(elementsForFilters[index])); + } + + private void ModifyEntriesThatNeedIt_NameOverride(int npcID, string newNameKey) + { + BestiaryEntry entryByNpcid = this.FindEntryByNPCID(npcID); + entryByNpcid.Info.RemoveAll((Predicate) (x => x is NamePlateInfoElement)); + entryByNpcid.Info.Add((IBestiaryInfoElement) new NamePlateInfoElement(newNameKey, npcID)); + entryByNpcid.Icon = (IEntryIcon) new UnlockableNPCEntryIcon(npcID, overrideNameKey: newNameKey); + } + + private void ModifyEntriesThatNeedIt() + { + this.FindEntryByNPCID(258).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SurfaceMushroom)); + this.FindEntryByNPCID(-1).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption)); + this.FindEntryByNPCID(81).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption)); + this.FindEntryByNPCID(121).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption)); + this.FindEntryByNPCID(7).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption)); + this.FindEntryByNPCID(98).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption)); + this.FindEntryByNPCID(6).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption)); + this.FindEntryByNPCID(94).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption)); + this.FindEntryByNPCID(173).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson)); + this.FindEntryByNPCID(181).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson)); + this.FindEntryByNPCID(183).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson)); + this.FindEntryByNPCID(242).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson)); + this.FindEntryByNPCID(241).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson)); + this.FindEntryByNPCID(174).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson)); + this.FindEntryByNPCID(240).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson)); + this.FindEntryByNPCID(175).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle)); + this.FindEntryByNPCID(153).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle)); + this.FindEntryByNPCID(52).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle)); + this.FindEntryByNPCID(58).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle)); + this.FindEntryByNPCID(102).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns)); + this.FindEntryByNPCID(157).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle)); + this.FindEntryByNPCID(51).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle)); + this.FindEntryByNPCID(169).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundSnow)); + this.FindEntryByNPCID(510).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert)); + this.FindEntryByNPCID(69).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert)); + this.FindEntryByNPCID(580).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert)); + this.FindEntryByNPCID(581).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert)); + this.FindEntryByNPCID(78).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert)); + this.FindEntryByNPCID(79).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CorruptDesert)); + this.FindEntryByNPCID(630).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CrimsonDesert)); + this.FindEntryByNPCID(80).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.HallowDesert)); + this.FindEntryByNPCID(533).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundBasedOnWorldEvilProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CorruptUndergroundDesert, (IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CrimsonUndergroundDesert)); + this.FindEntryByNPCID(528).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert)); + this.FindEntryByNPCID(529).AddTags((IBestiaryInfoElement) new BestiaryPortraitBackgroundBasedOnWorldEvilProviderPreferenceInfoElement((IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CorruptUndergroundDesert, (IBestiaryBackgroundImagePathAndColorProvider) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CrimsonUndergroundDesert)); + this._currentDatabase.ApplyPass(new BestiaryDatabase.BestiaryEntriesPass(this.TryGivingEntryFlavorTextIfItIsMissing)); + BestiaryEntry entryByNpcid = this.FindEntryByNPCID(398); + entryByNpcid.Info.Add((IBestiaryInfoElement) new MoonLordPortraitBackgroundProviderBestiaryInfoElement()); + entryByNpcid.Info.RemoveAll((Predicate) (x => x is NamePlateInfoElement)); + entryByNpcid.Info.Add((IBestiaryInfoElement) new NamePlateInfoElement("Enemies.MoonLord", 398)); + entryByNpcid.Icon = (IEntryIcon) new UnlockableNPCEntryIcon(398, overrideNameKey: "Enemies.MoonLord"); + this.ModifyEntriesThatNeedIt_NameOverride(637, "Friends.TownCat"); + this.ModifyEntriesThatNeedIt_NameOverride(638, "Friends.TownDog"); + this.ModifyEntriesThatNeedIt_NameOverride(656, "Friends.TownBunny"); + for (int index = 494; index <= 506; ++index) + this.FindEntryByNPCID(index).UIInfoProvider = (IBestiaryUICollectionInfoProvider) new SalamanderShellyDadUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[index]); + this.FindEntryByNPCID(534).UIInfoProvider = (IBestiaryUICollectionInfoProvider) new HighestOfMultipleUICollectionInfoProvider(new IBestiaryUICollectionInfoProvider[2] + { + (IBestiaryUICollectionInfoProvider) new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[534], false), + (IBestiaryUICollectionInfoProvider) new TownNPCUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[441]) + }); + foreach (NPCStatsReportInfoElement reportInfoElement in this.FindEntryByNPCID(13).Info.Select((Func) (x => x as NPCStatsReportInfoElement)).Where((Func) (x => x != null))) + reportInfoElement.LifeMax *= NPC.GetEaterOfWorldsSegmentsCountByGamemode(reportInfoElement.GameMode); + foreach (NPCStatsReportInfoElement reportInfoElement in this.FindEntryByNPCID(491).Info.Select((Func) (x => x as NPCStatsReportInfoElement)).Where((Func) (x => x != null))) + { + NPC npc = new NPC(); + int num = 4; + npc.SetDefaults(492); + reportInfoElement.LifeMax = num * npc.lifeMax; + } + this.FindEntryByNPCID(68).UIInfoProvider = (IBestiaryUICollectionInfoProvider) new HighestOfMultipleUICollectionInfoProvider(new IBestiaryUICollectionInfoProvider[3] + { + (IBestiaryUICollectionInfoProvider) new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[68], true), + (IBestiaryUICollectionInfoProvider) new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[35], true), + (IBestiaryUICollectionInfoProvider) new TownNPCUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[54]) + }); + this.FindEntryByNPCID(35).UIInfoProvider = (IBestiaryUICollectionInfoProvider) new HighestOfMultipleUICollectionInfoProvider(new IBestiaryUICollectionInfoProvider[2] + { + (IBestiaryUICollectionInfoProvider) new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[35], true), + (IBestiaryUICollectionInfoProvider) new TownNPCUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[54]) + }); + this.FindEntryByNPCID(37).UIInfoProvider = (IBestiaryUICollectionInfoProvider) new HighestOfMultipleUICollectionInfoProvider(new IBestiaryUICollectionInfoProvider[3] + { + (IBestiaryUICollectionInfoProvider) new TownNPCUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[37]), + (IBestiaryUICollectionInfoProvider) new TownNPCUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[54]), + (IBestiaryUICollectionInfoProvider) new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[35], true) + }); + this.FindEntryByNPCID(551).UIInfoProvider = (IBestiaryUICollectionInfoProvider) new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[551], true); + this.FindEntryByNPCID(491).UIInfoProvider = (IBestiaryUICollectionInfoProvider) new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[491], true); + foreach (KeyValuePair keyValuePair in new Dictionary() + { + { + 443, + new int[1]{ 46 } + }, + { + 442, + new int[1]{ 74 } + }, + { + 592, + new int[1]{ 55 } + }, + { + 444, + new int[1]{ 356 } + }, + { + 601, + new int[1]{ 599 } + }, + { + 445, + new int[1]{ 361 } + }, + { + 446, + new int[1]{ 377 } + }, + { + 605, + new int[1]{ 604 } + }, + { + 447, + new int[1]{ 300 } + }, + { + 627, + new int[1]{ 626 } + }, + { + 613, + new int[1]{ 612 } + }, + { + 448, + new int[1]{ 357 } + }, + { + 539, + new int[2]{ 299, 538 } + } + }) + this.FindEntryByNPCID(keyValuePair.Key).UIInfoProvider = (IBestiaryUICollectionInfoProvider) new GoldCritterUICollectionInfoProvider(keyValuePair.Value, ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[keyValuePair.Key]); + foreach (KeyValuePair keyValuePair in new Dictionary() + { + { + 362, + 363 + }, + { + 364, + 365 + }, + { + 602, + 603 + }, + { + 608, + 609 + } + }) + this.FindEntryByNPCID(keyValuePair.Key).UIInfoProvider = (IBestiaryUICollectionInfoProvider) new HighestOfMultipleUICollectionInfoProvider(new IBestiaryUICollectionInfoProvider[2] + { + (IBestiaryUICollectionInfoProvider) new CritterUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[keyValuePair.Key]), + (IBestiaryUICollectionInfoProvider) new CritterUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[keyValuePair.Value]) + }); + this.FindEntryByNPCID(4).AddTags((IBestiaryInfoElement) new SearchAliasInfoElement("eoc")); + this.FindEntryByNPCID(13).AddTags((IBestiaryInfoElement) new SearchAliasInfoElement("eow")); + this.FindEntryByNPCID(266).AddTags((IBestiaryInfoElement) new SearchAliasInfoElement("boc")); + this.FindEntryByNPCID(113).AddTags((IBestiaryInfoElement) new SearchAliasInfoElement("wof")); + this.FindEntryByNPCID(50).AddTags((IBestiaryInfoElement) new SearchAliasInfoElement("slime king")); + this.FindEntryByNPCID(125).AddTags((IBestiaryInfoElement) new SearchAliasInfoElement("the twins")); + this.FindEntryByNPCID(126).AddTags((IBestiaryInfoElement) new SearchAliasInfoElement("the twins")); + this.FindEntryByNPCID(222).AddTags((IBestiaryInfoElement) new SearchAliasInfoElement("qb")); + this.FindEntryByNPCID(222).AddTags((IBestiaryInfoElement) new SearchAliasInfoElement("bee queen")); + this.FindEntryByNPCID(398).AddTags((IBestiaryInfoElement) new SearchAliasInfoElement("moonlord")); + this.FindEntryByNPCID(398).AddTags((IBestiaryInfoElement) new SearchAliasInfoElement("cthulhu")); + this.FindEntryByNPCID(398).AddTags((IBestiaryInfoElement) new SearchAliasInfoElement("ml")); + this.FindEntryByNPCID(125).AddTags((IBestiaryInfoElement) new SearchAliasInfoElement("mech boss")); + this.FindEntryByNPCID(126).AddTags((IBestiaryInfoElement) new SearchAliasInfoElement("mech boss")); + this.FindEntryByNPCID((int) sbyte.MaxValue).AddTags((IBestiaryInfoElement) new SearchAliasInfoElement("mech boss")); + this.FindEntryByNPCID(134).AddTags((IBestiaryInfoElement) new SearchAliasInfoElement("mech boss")); + this.FindEntryByNPCID(657).AddTags((IBestiaryInfoElement) new SearchAliasInfoElement("slime queen")); + this.FindEntryByNPCID(636).AddTags((IBestiaryInfoElement) new SearchAliasInfoElement("eol")); + this.FindEntryByNPCID(636).AddTags((IBestiaryInfoElement) new SearchAliasInfoElement("fairy")); + } + + private void TryGivingEntryFlavorTextIfItIsMissing(BestiaryEntry entry) + { + if (entry.Info.Any((Func) (x => x is FlavorTextBestiaryInfoElement))) + return; + SpawnConditionBestiaryInfoElement bestiaryInfoElement1 = (SpawnConditionBestiaryInfoElement) null; + int? nullable1 = new int?(); + foreach (IBestiaryInfoElement bestiaryInfoElement2 in entry.Info) + { + if (bestiaryInfoElement2 is BestiaryPortraitBackgroundProviderPreferenceInfoElement preferenceInfoElement2 && preferenceInfoElement2.GetPreferredProvider() is SpawnConditionBestiaryInfoElement preferredProvider2) + { + bestiaryInfoElement1 = preferredProvider2; + break; + } + if (bestiaryInfoElement2 is SpawnConditionBestiaryInfoElement bestiaryInfoElement5) + { + int displayTextPriority = bestiaryInfoElement5.DisplayTextPriority; + if (nullable1.HasValue) + { + int num = displayTextPriority; + int? nullable2 = nullable1; + int valueOrDefault = nullable2.GetValueOrDefault(); + if (!(num >= valueOrDefault & nullable2.HasValue)) + continue; + } + bestiaryInfoElement1 = bestiaryInfoElement5; + nullable1 = new int?(displayTextPriority); + } + } + if (bestiaryInfoElement1 == null) + return; + string displayNameKey = bestiaryInfoElement1.GetDisplayNameKey(); + string languageKey = "Bestiary_BiomeText.biome_" + displayNameKey.Substring(displayNameKey.IndexOf('.') + 1); + entry.Info.Add((IBestiaryInfoElement) new FlavorTextBestiaryInfoElement(languageKey)); + } + + private void AddTownNPCs_Manual() + { + this.Register(BestiaryEntry.TownNPC(22)); + this.Register(BestiaryEntry.TownNPC(17)); + this.Register(BestiaryEntry.TownNPC(18)); + this.Register(BestiaryEntry.TownNPC(19)); + this.Register(BestiaryEntry.TownNPC(20)); + this.Register(BestiaryEntry.TownNPC(37)); + this.Register(BestiaryEntry.TownNPC(54)); + this.Register(BestiaryEntry.TownNPC(38)); + this.Register(BestiaryEntry.TownNPC(107)); + this.Register(BestiaryEntry.TownNPC(108)); + this.Register(BestiaryEntry.TownNPC(124)); + this.Register(BestiaryEntry.TownNPC(142)); + this.Register(BestiaryEntry.TownNPC(160)); + this.Register(BestiaryEntry.TownNPC(178)); + this.Register(BestiaryEntry.TownNPC(207)); + this.Register(BestiaryEntry.TownNPC(208)); + this.Register(BestiaryEntry.TownNPC(209)); + this.Register(BestiaryEntry.TownNPC(227)); + this.Register(BestiaryEntry.TownNPC(228)); + this.Register(BestiaryEntry.TownNPC(229)); + this.Register(BestiaryEntry.TownNPC(353)); + this.Register(BestiaryEntry.TownNPC(369)); + this.Register(BestiaryEntry.TownNPC(441)); + this.Register(BestiaryEntry.TownNPC(550)); + this.Register(BestiaryEntry.TownNPC(588)); + this.Register(BestiaryEntry.TownNPC(368)); + this.Register(BestiaryEntry.TownNPC(453)); + this.Register(BestiaryEntry.TownNPC(633)); + this.Register(BestiaryEntry.TownNPC(638)); + this.Register(BestiaryEntry.TownNPC(637)); + this.Register(BestiaryEntry.TownNPC(656)); + } + + private void AddMultiEntryNPCS_Manual() => this.Register(BestiaryEntry.Enemy(85)).Icon = (IEntryIcon) new UnlockableNPCEntryIcon(85, ai3: 3f); + + private void AddEmptyEntries_CrittersAndEnemies_Automated() + { + HashSet exclusions = BestiaryDatabaseNPCsPopulator.GetExclusions(); + foreach (KeyValuePair keyValuePair in ContentSamples.NpcsByNetId) + { + if (!exclusions.Contains(keyValuePair.Key) && !keyValuePair.Value.isLikeATownNPC) + { + if (keyValuePair.Value.CountsAsACritter) + this.Register(BestiaryEntry.Critter(keyValuePair.Key)); + else + this.Register(BestiaryEntry.Enemy(keyValuePair.Key)); + } + } + } + + private static HashSet GetExclusions() + { + HashSet intSet = new HashSet(); + List intList = new List(); + foreach (KeyValuePair keyValuePair in NPCID.Sets.NPCBestiaryDrawOffset) + { + if (keyValuePair.Value.Hide) + intList.Add(keyValuePair.Key); + } + foreach (int num in intList) + intSet.Add(num); + return intSet; + } + + private void AddNPCBiomeRelationships_Automated() + { + this.FindEntryByNPCID(357).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Rain + }); + this.FindEntryByNPCID(448).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Rain + }); + this.FindEntryByNPCID(606).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Graveyard + }); + this.FindEntryByNPCID(211).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(377).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface + }); + this.FindEntryByNPCID(446).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface + }); + this.FindEntryByNPCID(595).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(596).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(597).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(598).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(599).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(600).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(601).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(612).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(613).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(25).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(30).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Goblins + }); + this.FindEntryByNPCID(33).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(112).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption + }); + this.FindEntryByNPCID(300).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground + }); + this.FindEntryByNPCID(355).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(358).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow + }); + this.FindEntryByNPCID(447).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground + }); + this.FindEntryByNPCID(610).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Graveyard + }); + this.FindEntryByNPCID(210).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(261).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundMushroom + }); + this.FindEntryByNPCID(402).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.StardustPillar + }); + this.FindEntryByNPCID(403).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.StardustPillar + }); + this.FindEntryByNPCID(485).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle + }); + this.FindEntryByNPCID(486).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle + }); + this.FindEntryByNPCID(487).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle + }); + this.FindEntryByNPCID(359).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(410).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.StardustPillar + }); + this.FindEntryByNPCID(604).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.WindyDay + }); + this.FindEntryByNPCID(605).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.WindyDay + }); + this.FindEntryByNPCID(218).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundSnow + }); + this.FindEntryByNPCID(361).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle + }); + this.FindEntryByNPCID(404).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.StardustPillar + }); + this.FindEntryByNPCID(445).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle + }); + this.FindEntryByNPCID(626).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean + }); + this.FindEntryByNPCID(627).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean + }); + this.FindEntryByNPCID(2).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(74).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(190).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(191).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(192).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(193).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(194).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(217).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(297).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(298).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(356).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(360).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SurfaceMushroom, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundMushroom + }); + this.FindEntryByNPCID(655).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(653).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(654).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(442).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(444).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(582).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(583).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(584).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(585).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(1).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface + }); + this.FindEntryByNPCID(59).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(138).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundHallow + }); + this.FindEntryByNPCID(147).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Snow, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(265).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(367).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(616).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(617).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(23).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Meteor + }); + this.FindEntryByNPCID(55).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface + }); + this.FindEntryByNPCID(57).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon + }); + this.FindEntryByNPCID(58).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle + }); + this.FindEntryByNPCID(102).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(157).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle + }); + this.FindEntryByNPCID(219).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(220).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean + }); + this.FindEntryByNPCID(236).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(302).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Halloween + }); + this.FindEntryByNPCID(366).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(465).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon + }); + this.FindEntryByNPCID(537).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(592).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface + }); + this.FindEntryByNPCID(607).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert + }); + this.FindEntryByNPCID(10).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground + }); + this.FindEntryByNPCID(11).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground + }); + this.FindEntryByNPCID(12).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground + }); + this.FindEntryByNPCID(34).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(117).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(118).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(119).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(163).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SpiderNest + }); + this.FindEntryByNPCID(164).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SpiderNest + }); + this.FindEntryByNPCID(230).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Rain + }); + this.FindEntryByNPCID(241).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson + }); + this.FindEntryByNPCID(406).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.StardustPillar + }); + this.FindEntryByNPCID(496).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(497).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(519).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SolarPillar + }); + this.FindEntryByNPCID(593).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Rain + }); + this.FindEntryByNPCID(625).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean + }); + this.FindEntryByNPCID(49).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(51).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle + }); + this.FindEntryByNPCID(60).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(93).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(137).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundHallow + }); + this.FindEntryByNPCID(184).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundSnow + }); + this.FindEntryByNPCID(204).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(224).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Rain + }); + this.FindEntryByNPCID(259).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundMushroom + }); + this.FindEntryByNPCID(299).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(317).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(318).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(378).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon + }); + this.FindEntryByNPCID(393).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Martian + }); + this.FindEntryByNPCID(494).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(495).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(513).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(514).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(515).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(538).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(539).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(580).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(587).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon + }); + this.FindEntryByNPCID(16).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(71).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(81).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption + }); + this.FindEntryByNPCID(183).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson + }); + this.FindEntryByNPCID(67).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean + }); + this.FindEntryByNPCID(70).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(75).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow + }); + this.FindEntryByNPCID(239).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson + }); + this.FindEntryByNPCID(267).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson + }); + this.FindEntryByNPCID(288).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(394).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Martian + }); + this.FindEntryByNPCID(408).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.StardustPillar + }); + this.FindEntryByNPCID(428).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.VortexPillar + }); + this.FindEntryByNPCID(43).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(56).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle + }); + this.FindEntryByNPCID(72).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(141).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground + }); + this.FindEntryByNPCID(185).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundSnow + }); + this.FindEntryByNPCID(374).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundMushroom + }); + this.FindEntryByNPCID(375).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundMushroom + }); + this.FindEntryByNPCID(661).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow + }); + this.FindEntryByNPCID(388).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Martian + }); + this.FindEntryByNPCID(602).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean + }); + this.FindEntryByNPCID(603).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean + }); + this.FindEntryByNPCID(115).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(232).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(258).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SurfaceMushroom, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundMushroom + }); + this.FindEntryByNPCID(409).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.StardustPillar + }); + this.FindEntryByNPCID(462).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Eclipse + }); + this.FindEntryByNPCID(516).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SolarPillar + }); + this.FindEntryByNPCID(42).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(46).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(47).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon + }); + this.FindEntryByNPCID(69).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert + }); + this.FindEntryByNPCID(231).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(235).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(247).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheTemple + }); + this.FindEntryByNPCID(248).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheTemple + }); + this.FindEntryByNPCID(303).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Halloween, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(304).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Halloween, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(337).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Christmas, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(354).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SpiderNest + }); + this.FindEntryByNPCID(362).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(363).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(364).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(365).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(395).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Martian + }); + this.FindEntryByNPCID(443).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(464).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon + }); + this.FindEntryByNPCID(508).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(532).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(540).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Party, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(578).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(608).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert + }); + this.FindEntryByNPCID(609).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert + }); + this.FindEntryByNPCID(611).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(264).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(101).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption + }); + this.FindEntryByNPCID(121).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption + }); + this.FindEntryByNPCID(122).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow + }); + this.FindEntryByNPCID(132).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(148).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Snow + }); + this.FindEntryByNPCID(149).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Snow + }); + this.FindEntryByNPCID(168).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon + }); + this.FindEntryByNPCID(234).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(250).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Rain + }); + this.FindEntryByNPCID(257).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SurfaceMushroom, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundMushroom + }); + this.FindEntryByNPCID(421).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.NebulaPillar + }); + this.FindEntryByNPCID(470).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon + }); + this.FindEntryByNPCID(472).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Goblins + }); + this.FindEntryByNPCID(478).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Eclipse + }); + this.FindEntryByNPCID(546).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Sandstorm + }); + this.FindEntryByNPCID(581).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(615).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean + }); + this.FindEntryByNPCID(256).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SurfaceMushroom, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundMushroom + }); + this.FindEntryByNPCID(133).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(221).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean + }); + this.FindEntryByNPCID(252).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Pirates + }); + this.FindEntryByNPCID(329).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.PumpkinMoon + }); + this.FindEntryByNPCID(385).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Martian + }); + this.FindEntryByNPCID(427).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.VortexPillar + }); + this.FindEntryByNPCID(490).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon + }); + this.FindEntryByNPCID(548).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(63).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(64).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean + }); + this.FindEntryByNPCID(85).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(629).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundSnow + }); + this.FindEntryByNPCID(103).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(152).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle + }); + this.FindEntryByNPCID(174).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson + }); + this.FindEntryByNPCID(195).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(254).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SurfaceMushroom + }); + this.FindEntryByNPCID(260).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SurfaceMushroom, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundMushroom + }); + this.FindEntryByNPCID(382).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Martian + }); + this.FindEntryByNPCID(383).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Martian + }); + this.FindEntryByNPCID(386).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Martian + }); + this.FindEntryByNPCID(389).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Martian + }); + this.FindEntryByNPCID(466).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Eclipse + }); + this.FindEntryByNPCID(467).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Eclipse + }); + this.FindEntryByNPCID(489).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon + }); + this.FindEntryByNPCID(530).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(175).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(176).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(188).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(3).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(7).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption + }); + this.FindEntryByNPCID(8).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption + }); + this.FindEntryByNPCID(9).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption + }); + this.FindEntryByNPCID(95).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground + }); + this.FindEntryByNPCID(96).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground + }); + this.FindEntryByNPCID(97).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground + }); + this.FindEntryByNPCID(98).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption + }); + this.FindEntryByNPCID(99).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption + }); + this.FindEntryByNPCID(100).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption + }); + this.FindEntryByNPCID(120).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundHallow + }); + this.FindEntryByNPCID(150).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundSnow + }); + this.FindEntryByNPCID(151).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(153).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle + }); + this.FindEntryByNPCID(154).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundSnow + }); + this.FindEntryByNPCID(158).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Eclipse + }); + this.FindEntryByNPCID(161).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Snow + }); + this.FindEntryByNPCID(186).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(187).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(189).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(223).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Rain, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(233).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(251).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Eclipse + }); + this.FindEntryByNPCID(319).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(320).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(321).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(331).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(332).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(338).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostMoon + }); + this.FindEntryByNPCID(339).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostMoon + }); + this.FindEntryByNPCID(340).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostMoon + }); + this.FindEntryByNPCID(341).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostMoon + }); + this.FindEntryByNPCID(342).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostMoon + }); + this.FindEntryByNPCID(350).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostMoon + }); + this.FindEntryByNPCID(381).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Martian + }); + this.FindEntryByNPCID(492).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Pirates + }); + this.FindEntryByNPCID(510).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(511).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(512).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(552).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(553).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(554).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(590).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(82).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(116).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(166).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Eclipse + }); + this.FindEntryByNPCID(199).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheTemple + }); + this.FindEntryByNPCID(263).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(371).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean + }); + this.FindEntryByNPCID(461).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Eclipse + }); + this.FindEntryByNPCID(463).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Eclipse + }); + this.FindEntryByNPCID(523).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(52).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle + }); + this.FindEntryByNPCID(200).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(244).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Rain + }); + this.FindEntryByNPCID((int) byte.MaxValue).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SurfaceMushroom + }); + this.FindEntryByNPCID(384).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Martian + }); + this.FindEntryByNPCID(387).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Martian + }); + this.FindEntryByNPCID(390).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Martian + }); + this.FindEntryByNPCID(418).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SolarPillar + }); + this.FindEntryByNPCID(420).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.NebulaPillar + }); + this.FindEntryByNPCID(460).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Eclipse + }); + this.FindEntryByNPCID(468).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Eclipse + }); + this.FindEntryByNPCID(524).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(525).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CorruptUndergroundDesert + }); + this.FindEntryByNPCID(526).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CrimsonUndergroundDesert + }); + this.FindEntryByNPCID(527).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.HallowUndergroundDesert + }); + this.FindEntryByNPCID(536).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon + }); + this.FindEntryByNPCID(566).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(567).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(53).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon + }); + this.FindEntryByNPCID(169).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundSnow + }); + this.FindEntryByNPCID(301).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Graveyard + }); + this.FindEntryByNPCID(391).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Martian + }); + this.FindEntryByNPCID(405).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.StardustPillar + }); + this.FindEntryByNPCID(423).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.NebulaPillar + }); + this.FindEntryByNPCID(438).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(498).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(499).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(500).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(501).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(502).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(503).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(504).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(505).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(506).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(534).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(568).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(569).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(21).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(24).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(26).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Goblins + }); + this.FindEntryByNPCID(27).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Goblins + }); + this.FindEntryByNPCID(28).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Goblins + }); + this.FindEntryByNPCID(29).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Goblins + }); + this.FindEntryByNPCID(31).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(32).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(44).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(73).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface + }); + this.FindEntryByNPCID(77).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(78).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert + }); + this.FindEntryByNPCID(79).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CorruptDesert + }); + this.FindEntryByNPCID(630).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CrimsonDesert + }); + this.FindEntryByNPCID(80).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.HallowDesert + }); + this.FindEntryByNPCID(104).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(111).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Goblins + }); + this.FindEntryByNPCID(140).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(159).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Eclipse + }); + this.FindEntryByNPCID(162).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Eclipse + }); + this.FindEntryByNPCID(196).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(198).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheTemple + }); + this.FindEntryByNPCID(201).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(202).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(203).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(212).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Pirates + }); + this.FindEntryByNPCID(213).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Pirates + }); + this.FindEntryByNPCID(242).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson + }); + this.FindEntryByNPCID(269).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(270).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(272).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(273).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(275).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(276).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(277).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(278).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(279).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(280).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(281).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(282).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(283).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(284).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(285).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(286).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(287).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(294).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(295).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(296).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(310).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.PumpkinMoon + }); + this.FindEntryByNPCID(311).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.PumpkinMoon + }); + this.FindEntryByNPCID(312).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.PumpkinMoon + }); + this.FindEntryByNPCID(313).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.PumpkinMoon + }); + this.FindEntryByNPCID(316).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Graveyard + }); + this.FindEntryByNPCID(326).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.PumpkinMoon + }); + this.FindEntryByNPCID(415).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SolarPillar + }); + this.FindEntryByNPCID(449).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(450).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(451).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(452).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(471).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Goblins + }); + this.FindEntryByNPCID(482).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Granite + }); + this.FindEntryByNPCID(572).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(573).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(143).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostLegion + }); + this.FindEntryByNPCID(144).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostLegion + }); + this.FindEntryByNPCID(145).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostLegion + }); + this.FindEntryByNPCID(155).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Snow + }); + this.FindEntryByNPCID(271).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(274).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(314).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.PumpkinMoon + }); + this.FindEntryByNPCID(352).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostMoon + }); + this.FindEntryByNPCID(379).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(509).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(555).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(556).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(557).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(61).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert + }); + this.FindEntryByNPCID(110).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(206).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundSnow + }); + this.FindEntryByNPCID(214).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Pirates + }); + this.FindEntryByNPCID(215).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Pirates + }); + this.FindEntryByNPCID(216).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Pirates + }); + this.FindEntryByNPCID(225).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Rain + }); + this.FindEntryByNPCID(291).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(292).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(293).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(347).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostMoon + }); + this.FindEntryByNPCID(412).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SolarPillar + }); + this.FindEntryByNPCID(413).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SolarPillar + }); + this.FindEntryByNPCID(414).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SolarPillar + }); + this.FindEntryByNPCID(469).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Eclipse + }); + this.FindEntryByNPCID(473).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption + }); + this.FindEntryByNPCID(474).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCrimson + }); + this.FindEntryByNPCID(475).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundHallow + }); + this.FindEntryByNPCID(476).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(483).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Granite + }); + this.FindEntryByNPCID(586).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon + }); + this.FindEntryByNPCID(62).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(131).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(165).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SpiderNest + }); + this.FindEntryByNPCID(167).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundSnow + }); + this.FindEntryByNPCID(197).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundSnow + }); + this.FindEntryByNPCID(226).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheTemple + }); + this.FindEntryByNPCID(237).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(238).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SpiderNest + }); + this.FindEntryByNPCID(480).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Marble + }); + this.FindEntryByNPCID(528).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(529).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(289).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(439).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(440).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(533).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(170).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CorruptIce + }); + this.FindEntryByNPCID(171).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.HallowIce + }); + this.FindEntryByNPCID(179).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCrimson + }); + this.FindEntryByNPCID(180).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CrimsonIce + }); + this.FindEntryByNPCID(181).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson + }); + this.FindEntryByNPCID(205).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(411).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.StardustPillar + }); + this.FindEntryByNPCID(424).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.NebulaPillar + }); + this.FindEntryByNPCID(429).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.VortexPillar + }); + this.FindEntryByNPCID(481).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Marble + }); + this.FindEntryByNPCID(240).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson + }); + this.FindEntryByNPCID(290).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(430).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(431).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Snow, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(432).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(433).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(434).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(435).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(436).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(479).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Eclipse + }); + this.FindEntryByNPCID(518).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SolarPillar + }); + this.FindEntryByNPCID(591).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(45).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(130).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(172).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(305).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.PumpkinMoon + }); + this.FindEntryByNPCID(306).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.PumpkinMoon + }); + this.FindEntryByNPCID(307).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.PumpkinMoon + }); + this.FindEntryByNPCID(308).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.PumpkinMoon + }); + this.FindEntryByNPCID(309).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.PumpkinMoon + }); + this.FindEntryByNPCID(425).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.VortexPillar + }); + this.FindEntryByNPCID(426).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.VortexPillar + }); + this.FindEntryByNPCID(570).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(571).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(417).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SolarPillar + }); + this.FindEntryByNPCID(419).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SolarPillar + }); + this.FindEntryByNPCID(65).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean + }); + this.FindEntryByNPCID(372).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean + }); + this.FindEntryByNPCID(373).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean + }); + this.FindEntryByNPCID(407).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.StardustPillar + }); + this.FindEntryByNPCID(542).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Sandstorm + }); + this.FindEntryByNPCID(543).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CorruptDesert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Sandstorm + }); + this.FindEntryByNPCID(544).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CrimsonDesert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Sandstorm + }); + this.FindEntryByNPCID(545).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.HallowDesert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Sandstorm + }); + this.FindEntryByNPCID(619).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon + }); + this.FindEntryByNPCID(621).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon + }); + this.FindEntryByNPCID(622).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon + }); + this.FindEntryByNPCID(623).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon + }); + this.FindEntryByNPCID(128).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(177).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle + }); + this.FindEntryByNPCID(561).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(562).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(563).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(594).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.WindyDay + }); + this.FindEntryByNPCID(253).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Eclipse + }); + this.FindEntryByNPCID(129).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(6).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption + }); + this.FindEntryByNPCID(173).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson + }); + this.FindEntryByNPCID(399).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Sky + }); + this.FindEntryByNPCID(416).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SolarPillar + }); + this.FindEntryByNPCID(531).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(83).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption + }); + this.FindEntryByNPCID(84).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundHallow + }); + this.FindEntryByNPCID(86).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow + }); + this.FindEntryByNPCID(330).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.PumpkinMoon + }); + this.FindEntryByNPCID(620).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon + }); + this.FindEntryByNPCID(48).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Sky + }); + this.FindEntryByNPCID(268).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCrimson + }); + this.FindEntryByNPCID(328).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.PumpkinMoon + }); + this.FindEntryByNPCID(66).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(182).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCrimson + }); + this.FindEntryByNPCID(13).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption + }); + this.FindEntryByNPCID(14).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption + }); + this.FindEntryByNPCID(15).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption + }); + this.FindEntryByNPCID(39).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(40).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(41).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(315).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.PumpkinMoon + }); + this.FindEntryByNPCID(343).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostMoon + }); + this.FindEntryByNPCID(94).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption + }); + this.FindEntryByNPCID(392).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Martian + }); + this.FindEntryByNPCID(558).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(559).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(560).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(348).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostMoon + }); + this.FindEntryByNPCID(349).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostMoon + }); + this.FindEntryByNPCID(156).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(35).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(68).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(134).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(136).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(135).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(454).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(455).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(456).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(457).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(458).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(459).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(113).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(114).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld + }); + this.FindEntryByNPCID(564).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(565).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(327).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.PumpkinMoon + }); + this.FindEntryByNPCID(520).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Martian + }); + this.FindEntryByNPCID(574).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(575).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(246).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheTemple + }); + this.FindEntryByNPCID(50).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface + }); + this.FindEntryByNPCID(477).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Eclipse + }); + this.FindEntryByNPCID(541).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Sandstorm + }); + this.FindEntryByNPCID(109).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon + }); + this.FindEntryByNPCID(243).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Snow, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Blizzard + }); + this.FindEntryByNPCID(618).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon + }); + this.FindEntryByNPCID(351).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostMoon + }); + this.FindEntryByNPCID(249).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheTemple + }); + this.FindEntryByNPCID(222).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(262).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(87).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Sky + }); + this.FindEntryByNPCID(88).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Sky + }); + this.FindEntryByNPCID(89).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Sky + }); + this.FindEntryByNPCID(90).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Sky + }); + this.FindEntryByNPCID(91).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Sky + }); + this.FindEntryByNPCID(92).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Sky + }); + this.FindEntryByNPCID((int) sbyte.MaxValue).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(346).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostMoon + }); + this.FindEntryByNPCID(370).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean + }); + this.FindEntryByNPCID(4).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(551).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(245).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheTemple + }); + this.FindEntryByNPCID(576).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(577).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(266).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson + }); + this.FindEntryByNPCID(325).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.PumpkinMoon + }); + this.FindEntryByNPCID(344).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostMoon + }); + this.FindEntryByNPCID(125).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(126).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(549).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy + }); + this.FindEntryByNPCID(345).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostMoon + }); + this.FindEntryByNPCID(422).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.VortexPillar + }); + this.FindEntryByNPCID(493).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.StardustPillar + }); + this.FindEntryByNPCID(507).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.NebulaPillar + }); + this.FindEntryByNPCID(517).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SolarPillar + }); + this.FindEntryByNPCID(491).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Pirates + }); + } + + private void AddNPCBiomeRelationships_Manual() + { + this.FindEntryByNPCID(628).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.WindyDay + }); + this.FindEntryByNPCID(-4).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(-3).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(-7).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(1).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(-10).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(-8).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground + }); + this.FindEntryByNPCID(-9).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground + }); + this.FindEntryByNPCID(-6).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(-5).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(-2).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption + }); + this.FindEntryByNPCID(-1).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption + }); + this.FindEntryByNPCID(81).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption + }); + this.FindEntryByNPCID(121).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption + }); + this.FindEntryByNPCID(7).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption + }); + this.FindEntryByNPCID(8).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption + }); + this.FindEntryByNPCID(9).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption + }); + this.FindEntryByNPCID(98).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption + }); + this.FindEntryByNPCID(99).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption + }); + this.FindEntryByNPCID(100).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption + }); + this.FindEntryByNPCID(6).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption + }); + this.FindEntryByNPCID(94).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption + }); + this.FindEntryByNPCID(173).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCrimson + }); + this.FindEntryByNPCID(181).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCrimson + }); + this.FindEntryByNPCID(183).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCrimson + }); + this.FindEntryByNPCID(242).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCrimson + }); + this.FindEntryByNPCID(241).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCrimson + }); + this.FindEntryByNPCID(174).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCrimson + }); + this.FindEntryByNPCID(240).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCrimson + }); + this.FindEntryByNPCID(175).Info.Remove((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle); + this.FindEntryByNPCID(175).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(153).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(52).Info.Remove((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime); + this.FindEntryByNPCID(52).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(58).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(102).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(157).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(51).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle + }); + this.FindEntryByNPCID(161).Info.Remove((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime); + this.FindEntryByNPCID(161).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(155).Info.Remove((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime); + this.FindEntryByNPCID(155).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(169).Info.Remove((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundSnow); + this.FindEntryByNPCID(169).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Snow, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundSnow + }); + this.FindEntryByNPCID(510).Info.Remove((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert); + this.FindEntryByNPCID(510).Info.AddRange((IEnumerable) new IBestiaryInfoElement[3] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Sandstorm + }); + this.FindEntryByNPCID(511).Info.Remove((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert); + this.FindEntryByNPCID(511).Info.AddRange((IEnumerable) new IBestiaryInfoElement[3] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Sandstorm + }); + this.FindEntryByNPCID(512).Info.Remove((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert); + this.FindEntryByNPCID(512).Info.AddRange((IEnumerable) new IBestiaryInfoElement[3] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Sandstorm + }); + this.FindEntryByNPCID(69).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(580).Info.Remove((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert); + this.FindEntryByNPCID(580).Info.AddRange((IEnumerable) new IBestiaryInfoElement[3] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Sandstorm + }); + this.FindEntryByNPCID(581).Info.Remove((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert); + this.FindEntryByNPCID(581).Info.AddRange((IEnumerable) new IBestiaryInfoElement[3] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Sandstorm + }); + this.FindEntryByNPCID(78).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert + }); + this.FindEntryByNPCID(79).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CorruptUndergroundDesert + }); + this.FindEntryByNPCID(630).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CrimsonUndergroundDesert + }); + this.FindEntryByNPCID(80).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.HallowUndergroundDesert + }); + this.FindEntryByNPCID(533).Info.Remove((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert); + this.FindEntryByNPCID(533).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CorruptUndergroundDesert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CrimsonUndergroundDesert + }); + this.FindEntryByNPCID(528).Info.Remove((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert); + this.FindEntryByNPCID(528).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.HallowUndergroundDesert + }); + this.FindEntryByNPCID(529).Info.Remove((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert); + this.FindEntryByNPCID(529).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CorruptUndergroundDesert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CrimsonUndergroundDesert + }); + this.FindEntryByNPCID(624).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface + }); + this.FindEntryByNPCID(5).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(139).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(484).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime + }); + this.FindEntryByNPCID(317).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Halloween + }); + this.FindEntryByNPCID(318).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Halloween + }); + this.FindEntryByNPCID(320).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Halloween + }); + this.FindEntryByNPCID(321).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Halloween + }); + this.FindEntryByNPCID(319).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Halloween + }); + this.FindEntryByNPCID(324).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Halloween, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(322).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Halloween, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(323).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Halloween, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(302).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(521).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(332).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Christmas + }); + this.FindEntryByNPCID(331).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Christmas + }); + this.FindEntryByNPCID(335).Info.AddRange((IEnumerable) new IBestiaryInfoElement[3] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Christmas, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(336).Info.AddRange((IEnumerable) new IBestiaryInfoElement[3] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Christmas, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(333).Info.AddRange((IEnumerable) new IBestiaryInfoElement[3] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Christmas, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(334).Info.AddRange((IEnumerable) new IBestiaryInfoElement[3] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Christmas, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(535).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime + }); + this.FindEntryByNPCID(614).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground + }); + this.FindEntryByNPCID(225).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface + }); + this.FindEntryByNPCID(224).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface + }); + this.FindEntryByNPCID(250).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface + }); + this.FindEntryByNPCID(632).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Graveyard + }); + this.FindEntryByNPCID(631).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(634).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundMushroom + }); + this.FindEntryByNPCID(635).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundMushroom + }); + this.FindEntryByNPCID(636).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow + }); + this.FindEntryByNPCID(639).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(640).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(641).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(642).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(643).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(644).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(645).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(646).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(647).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(648).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(649).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(650).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(651).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(652).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns + }); + this.FindEntryByNPCID(657).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow + }); + this.FindEntryByNPCID(658).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow + }); + this.FindEntryByNPCID(660).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow + }); + this.FindEntryByNPCID(659).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow + }); + this.FindEntryByNPCID(22).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface + }); + this.FindEntryByNPCID(17).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface + }); + this.FindEntryByNPCID(588).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface + }); + this.FindEntryByNPCID(441).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Snow + }); + this.FindEntryByNPCID(124).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Snow + }); + this.FindEntryByNPCID(209).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Snow + }); + this.FindEntryByNPCID(142).Info.AddRange((IEnumerable) new IBestiaryInfoElement[2] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Snow, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Christmas + }); + this.FindEntryByNPCID(207).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert + }); + this.FindEntryByNPCID(19).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert + }); + this.FindEntryByNPCID(178).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert + }); + this.FindEntryByNPCID(20).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle + }); + this.FindEntryByNPCID(228).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle + }); + this.FindEntryByNPCID(227).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle + }); + this.FindEntryByNPCID(369).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean + }); + this.FindEntryByNPCID(229).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean + }); + this.FindEntryByNPCID(353).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean + }); + this.FindEntryByNPCID(38).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground + }); + this.FindEntryByNPCID(107).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground + }); + this.FindEntryByNPCID(54).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground + }); + this.FindEntryByNPCID(108).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow + }); + this.FindEntryByNPCID(18).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow + }); + this.FindEntryByNPCID(208).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow + }); + this.FindEntryByNPCID(550).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow + }); + this.FindEntryByNPCID(633).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface + }); + this.FindEntryByNPCID(160).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SurfaceMushroom + }); + this.FindEntryByNPCID(637).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface + }); + this.FindEntryByNPCID(638).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface + }); + this.FindEntryByNPCID(656).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface + }); + this.FindEntryByNPCID(368).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface + }); + this.FindEntryByNPCID(37).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon + }); + this.FindEntryByNPCID(453).Info.AddRange((IEnumerable) new IBestiaryInfoElement[1] + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground + }); + } + + private void AddNPCBiomeRelationships_AddDecorations_Automated() + { + foreach (KeyValuePair keyValuePair in ContentSamples.NpcsByNetId) + { + BestiaryEntry entryByNpcid = this.FindEntryByNPCID(keyValuePair.Key); + if (!entryByNpcid.Info.Contains((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Rain)) + { + if (entryByNpcid.Info.Contains((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Eclipse)) + entryByNpcid.AddTags((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Visuals.EclipseSun); + if (entryByNpcid.Info.Contains((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime)) + entryByNpcid.AddTags((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Visuals.Moon); + if (entryByNpcid.Info.Contains((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime)) + entryByNpcid.AddTags((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Visuals.Sun); + if (entryByNpcid.Info.Contains((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.PumpkinMoon)) + entryByNpcid.AddTags((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Visuals.PumpkinMoon); + if (entryByNpcid.Info.Contains((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostMoon)) + entryByNpcid.AddTags((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Visuals.FrostMoon); + if (entryByNpcid.Info.Contains((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Meteor)) + { + entryByNpcid.AddTags((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Visuals.Moon); + entryByNpcid.AddTags((IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Visuals.Meteor); + } + } + } + } + + public static class CommonTags + { + public static List GetCommonInfoElementsForFilters() => new List() + { + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Party, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.WindyDay, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Rain, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Graveyard, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Underground, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Granite, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Marble, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundMushroom, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SpiderNest, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Snow, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundSnow, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundDesert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Sandstorm, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundJungle, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Meteor, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheDungeon, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Sky, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CorruptIce, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CorruptDesert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CorruptUndergroundDesert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCrimson, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCrimson, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CrimsonIce, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CrimsonDesert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.CrimsonUndergroundDesert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheHallow, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundHallow, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.HallowIce, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.HallowDesert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.HallowUndergroundDesert, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SurfaceMushroom, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheTemple, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Goblins, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.OldOnesArmy, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Pirates, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.Martian, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Eclipse, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.PumpkinMoon, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostMoon, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Halloween, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Christmas, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Invasions.FrostLegion, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.NebulaPillar, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.SolarPillar, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.VortexPillar, + (IBestiaryInfoElement) BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.StardustPillar + }; + + public static class SpawnConditions + { + public static class Invasions + { + public static SpawnConditionBestiaryInfoElement Goblins = new SpawnConditionBestiaryInfoElement("Bestiary_Invasions.Goblins", 49, "Images/MapBG1"); + public static SpawnConditionBestiaryInfoElement Pirates = new SpawnConditionBestiaryInfoElement("Bestiary_Invasions.Pirates", 50, "Images/MapBG11"); + public static SpawnConditionBestiaryInfoElement Martian = new SpawnConditionBestiaryInfoElement("Bestiary_Invasions.Martian", 53, "Images/MapBG1", new Color?(new Color(35, 40, 40))); + public static SpawnConditionBestiaryInfoElement OldOnesArmy = new SpawnConditionBestiaryInfoElement("Bestiary_Invasions.OldOnesArmy", 55, "Images/MapBG1"); + public static SpawnConditionBestiaryInfoElement PumpkinMoon = new SpawnConditionBestiaryInfoElement("Bestiary_Invasions.PumpkinMoon", 51, "Images/MapBG1", new Color?(new Color(35, 40, 40))); + public static SpawnConditionBestiaryInfoElement FrostMoon = new SpawnConditionBestiaryInfoElement("Bestiary_Invasions.FrostMoon", 52, "Images/MapBG12", new Color?(new Color(35, 40, 40))); + public static SpawnConditionBestiaryInfoElement FrostLegion = new SpawnConditionBestiaryInfoElement("Bestiary_Invasions.FrostLegion", 54, "Images/MapBG12"); + } + + public static class Events + { + public static SpawnConditionBestiaryInfoElement SlimeRain; + public static SpawnConditionBestiaryInfoElement WindyDay; + public static SpawnConditionBestiaryInfoElement BloodMoon; + public static SpawnConditionBestiaryInfoElement Halloween; + public static SpawnConditionBestiaryOverlayInfoElement Rain; + public static SpawnConditionBestiaryInfoElement Christmas; + public static SpawnConditionBestiaryInfoElement Eclipse; + public static SpawnConditionBestiaryInfoElement Party; + public static SpawnConditionBestiaryOverlayInfoElement Blizzard; + public static SpawnConditionBestiaryOverlayInfoElement Sandstorm; + + static Events() + { + SpawnConditionBestiaryInfoElement bestiaryInfoElement1 = new SpawnConditionBestiaryInfoElement("Bestiary_Events.SlimeRain", 47, "Images/MapBG1"); + bestiaryInfoElement1.DisplayTextPriority = 1; + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.SlimeRain = bestiaryInfoElement1; + SpawnConditionBestiaryInfoElement bestiaryInfoElement2 = new SpawnConditionBestiaryInfoElement("Bestiary_Events.WindyDay", 41, "Images/MapBG1"); + bestiaryInfoElement2.DisplayTextPriority = 1; + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.WindyDay = bestiaryInfoElement2; + SpawnConditionBestiaryInfoElement bestiaryInfoElement3 = new SpawnConditionBestiaryInfoElement("Bestiary_Events.BloodMoon", 38, "Images/MapBG26", new Color?(new Color(200, 190, 180))); + bestiaryInfoElement3.DisplayTextPriority = 1; + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.BloodMoon = bestiaryInfoElement3; + SpawnConditionBestiaryInfoElement bestiaryInfoElement4 = new SpawnConditionBestiaryInfoElement("Bestiary_Events.Halloween", 45, "Images/MapBG1"); + bestiaryInfoElement4.DisplayTextPriority = 1; + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Halloween = bestiaryInfoElement4; + SpawnConditionBestiaryOverlayInfoElement overlayInfoElement1 = new SpawnConditionBestiaryOverlayInfoElement("Bestiary_Events.Rain", 40, "Images/MapBGOverlay2", new Color?(new Color(200, 200, 200))); + overlayInfoElement1.DisplayTextPriority = 1; + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Rain = overlayInfoElement1; + SpawnConditionBestiaryInfoElement bestiaryInfoElement5 = new SpawnConditionBestiaryInfoElement("Bestiary_Events.Christmas", 46, "Images/MapBG12"); + bestiaryInfoElement5.DisplayTextPriority = 1; + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Christmas = bestiaryInfoElement5; + SpawnConditionBestiaryInfoElement bestiaryInfoElement6 = new SpawnConditionBestiaryInfoElement("Bestiary_Events.Eclipse", 39, "Images/MapBG1", new Color?(new Color(60, 30, 0))); + bestiaryInfoElement6.DisplayTextPriority = 1; + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Eclipse = bestiaryInfoElement6; + SpawnConditionBestiaryInfoElement bestiaryInfoElement7 = new SpawnConditionBestiaryInfoElement("Bestiary_Events.Party", 48, "Images/MapBG1"); + bestiaryInfoElement7.DisplayTextPriority = 1; + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Party = bestiaryInfoElement7; + SpawnConditionBestiaryOverlayInfoElement overlayInfoElement2 = new SpawnConditionBestiaryOverlayInfoElement("Bestiary_Events.Blizzard", 42, "Images/MapBGOverlay6", new Color?(Color.White)); + overlayInfoElement2.DisplayTextPriority = 1; + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Blizzard = overlayInfoElement2; + SpawnConditionBestiaryOverlayInfoElement overlayInfoElement3 = new SpawnConditionBestiaryOverlayInfoElement("Bestiary_Events.Sandstorm", 43, "Images/MapBGOverlay1", new Color?(Color.White)); + overlayInfoElement3.DisplayTextPriority = 1; + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Events.Sandstorm = overlayInfoElement3; + } + } + + public static class Biomes + { + public static SpawnConditionBestiaryInfoElement TheCorruption = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.TheCorruption", 7, "Images/MapBG6", new Color?(new Color(200, 200, 200))); + public static SpawnConditionBestiaryInfoElement TheCrimson = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.Crimson", 12, "Images/MapBG7", new Color?(new Color(200, 200, 200))); + public static SpawnConditionBestiaryInfoElement Surface = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.Surface", 0, "Images/MapBG1"); + public static SpawnConditionBestiaryInfoElement Graveyard = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.Graveyard", 35, "Images/MapBG27"); + public static SpawnConditionBestiaryInfoElement UndergroundJungle = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.UndergroundJungle", 23, "Images/MapBG13"); + public static SpawnConditionBestiaryInfoElement TheUnderworld = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.TheUnderworld", 33, "Images/MapBG3"); + public static SpawnConditionBestiaryInfoElement TheDungeon = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.TheDungeon", 32, "Images/MapBG5"); + public static SpawnConditionBestiaryInfoElement Underground = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.Underground", 1, "Images/MapBG2"); + public static SpawnConditionBestiaryInfoElement TheHallow = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.TheHallow", 17, "Images/MapBG8"); + public static SpawnConditionBestiaryInfoElement UndergroundMushroom = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.UndergroundMushroom", 25, "Images/MapBG21"); + public static SpawnConditionBestiaryInfoElement Jungle = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.Jungle", 22, "Images/MapBG9"); + public static SpawnConditionBestiaryInfoElement Caverns = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.Caverns", 2, "Images/MapBG32"); + public static SpawnConditionBestiaryInfoElement UndergroundSnow = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.UndergroundSnow", 6, "Images/MapBG4"); + public static SpawnConditionBestiaryInfoElement Ocean = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.Ocean", 28, "Images/MapBG11"); + public static SpawnConditionBestiaryInfoElement SurfaceMushroom = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.SurfaceMushroom", 24, "Images/MapBG20"); + public static SpawnConditionBestiaryInfoElement UndergroundDesert = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.UndergroundDesert", 4, "Images/MapBG15"); + public static SpawnConditionBestiaryInfoElement Snow = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.Snow", 5, "Images/MapBG12"); + public static SpawnConditionBestiaryInfoElement Desert = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.Desert", 3, "Images/MapBG10"); + public static SpawnConditionBestiaryInfoElement Meteor = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.Meteor", 44, "Images/MapBG1", new Color?(new Color(35, 40, 40))); + public static SpawnConditionBestiaryInfoElement Oasis = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.Oasis", 27, "Images/MapBG10"); + public static SpawnConditionBestiaryInfoElement SpiderNest = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.SpiderNest", 34, "Images/MapBG19"); + public static SpawnConditionBestiaryInfoElement TheTemple = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.TheTemple", 31, "Images/MapBG14"); + public static SpawnConditionBestiaryInfoElement CorruptUndergroundDesert = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.CorruptUndergroundDesert", 10, "Images/MapBG40"); + public static SpawnConditionBestiaryInfoElement CrimsonUndergroundDesert = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.CrimsonUndergroundDesert", 15, "Images/MapBG41"); + public static SpawnConditionBestiaryInfoElement HallowUndergroundDesert = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.HallowUndergroundDesert", 20, "Images/MapBG42"); + public static SpawnConditionBestiaryInfoElement CorruptDesert = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.CorruptDesert", 9, "Images/MapBG37"); + public static SpawnConditionBestiaryInfoElement CrimsonDesert = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.CrimsonDesert", 14, "Images/MapBG38"); + public static SpawnConditionBestiaryInfoElement HallowDesert = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.HallowDesert", 19, "Images/MapBG39"); + public static SpawnConditionBestiaryInfoElement Granite = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.Granite", 30, "Images/MapBG17", new Color?(new Color(100, 100, 100))); + public static SpawnConditionBestiaryInfoElement UndergroundCorruption = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.UndergroundCorruption", 8, "Images/MapBG23"); + public static SpawnConditionBestiaryInfoElement UndergroundCrimson = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.UndergroundCrimson", 13, "Images/MapBG24"); + public static SpawnConditionBestiaryInfoElement UndergroundHallow = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.UndergroundHallow", 18, "Images/MapBG22"); + public static SpawnConditionBestiaryInfoElement Marble = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.Marble", 29, "Images/MapBG18"); + public static SpawnConditionBestiaryInfoElement CorruptIce = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.CorruptIce", 11, "Images/MapBG34", new Color?(new Color(200, 200, 200))); + public static SpawnConditionBestiaryInfoElement HallowIce = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.HallowIce", 21, "Images/MapBG36", new Color?(new Color(200, 200, 200))); + public static SpawnConditionBestiaryInfoElement CrimsonIce = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.CrimsonIce", 16, "Images/MapBG35", new Color?(new Color(200, 200, 200))); + public static SpawnConditionBestiaryInfoElement Sky = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.Sky", 26, "Images/MapBG33"); + public static SpawnConditionBestiaryInfoElement NebulaPillar = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.NebulaPillar", 58, "Images/MapBG28"); + public static SpawnConditionBestiaryInfoElement SolarPillar = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.SolarPillar", 56, "Images/MapBG29"); + public static SpawnConditionBestiaryInfoElement VortexPillar = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.VortexPillar", 57, "Images/MapBG30"); + public static SpawnConditionBestiaryInfoElement StardustPillar = new SpawnConditionBestiaryInfoElement("Bestiary_Biomes.StardustPillar", 59, "Images/MapBG31"); + } + + public static class Times + { + public static SpawnConditionBestiaryInfoElement DayTime; + public static SpawnConditionBestiaryInfoElement NightTime; + + static Times() + { + SpawnConditionBestiaryInfoElement bestiaryInfoElement1 = new SpawnConditionBestiaryInfoElement("Bestiary_Times.DayTime", 36); + bestiaryInfoElement1.DisplayTextPriority = -1; + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.DayTime = bestiaryInfoElement1; + SpawnConditionBestiaryInfoElement bestiaryInfoElement2 = new SpawnConditionBestiaryInfoElement("Bestiary_Times.NightTime", 37, "Images/MapBG1", new Color?(new Color(35, 40, 40))); + bestiaryInfoElement2.DisplayTextPriority = -1; + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Times.NightTime = bestiaryInfoElement2; + } + } + + public static class Visuals + { + public static SpawnConditionDecorativeOverlayInfoElement Sun = new SpawnConditionDecorativeOverlayInfoElement("Images/MapBGOverlay3", new Color?(Color.White)) + { + DisplayPriority = 1f + }; + public static SpawnConditionDecorativeOverlayInfoElement Moon = new SpawnConditionDecorativeOverlayInfoElement("Images/MapBGOverlay4", new Color?(Color.White)) + { + DisplayPriority = 1f + }; + public static SpawnConditionDecorativeOverlayInfoElement EclipseSun = new SpawnConditionDecorativeOverlayInfoElement("Images/MapBGOverlay5", new Color?(Color.White)) + { + DisplayPriority = 1f + }; + public static SpawnConditionDecorativeOverlayInfoElement PumpkinMoon = new SpawnConditionDecorativeOverlayInfoElement("Images/MapBGOverlay8", new Color?(Color.White)) + { + DisplayPriority = 1f + }; + public static SpawnConditionDecorativeOverlayInfoElement FrostMoon = new SpawnConditionDecorativeOverlayInfoElement("Images/MapBGOverlay9", new Color?(Color.White)) + { + DisplayPriority = 1f + }; + public static SpawnConditionDecorativeOverlayInfoElement Meteor = new SpawnConditionDecorativeOverlayInfoElement("Images/MapBGOverlay7", new Color?(Color.White)) + { + DisplayPriority = 1f + }; + } + } + } + + public static class Conditions + { + public static bool ReachHardMode() => Main.hardMode; + } + + public static class CrownosIconIndexes + { + public const int Surface = 0; + public const int Underground = 1; + public const int Cave = 2; + public const int Desert = 3; + public const int UndergroundDesert = 4; + public const int Snow = 5; + public const int UndergroundIce = 6; + public const int Corruption = 7; + public const int CorruptionUnderground = 8; + public const int CorruptionDesert = 9; + public const int CorruptionUndergroundDesert = 10; + public const int CorruptionIce = 11; + public const int Crimson = 12; + public const int CrimsonUnderground = 13; + public const int CrimsonDesert = 14; + public const int CrimsonUndergroundDesert = 15; + public const int CrimsonIce = 16; + public const int Hallow = 17; + public const int HallowUnderground = 18; + public const int HallowDesert = 19; + public const int HallowUndergroundDesert = 20; + public const int HallowIce = 21; + public const int Jungle = 22; + public const int UndergroundJungle = 23; + public const int SurfaceMushroom = 24; + public const int UndergroundMushroom = 25; + public const int Sky = 26; + public const int Oasis = 27; + public const int Ocean = 28; + public const int Marble = 29; + public const int Granite = 30; + public const int JungleTemple = 31; + public const int Dungeon = 32; + public const int Underworld = 33; + public const int SpiderNest = 34; + public const int Graveyard = 35; + public const int Day = 36; + public const int Night = 37; + public const int BloodMoon = 38; + public const int Eclipse = 39; + public const int Rain = 40; + public const int WindyDay = 41; + public const int Blizzard = 42; + public const int Sandstorm = 43; + public const int Meteor = 44; + public const int Halloween = 45; + public const int Christmas = 46; + public const int SlimeRain = 47; + public const int Party = 48; + public const int GoblinInvasion = 49; + public const int PirateInvasion = 50; + public const int PumpkinMoon = 51; + public const int FrostMoon = 52; + public const int AlienInvasion = 53; + public const int FrostLegion = 54; + public const int OldOnesArmy = 55; + public const int SolarTower = 56; + public const int VortexTower = 57; + public const int NebulaTower = 58; + public const int StardustTower = 59; + public const int Hardmode = 60; + public const int ItemSpawn = 61; + } + } +} diff --git a/GameContent/Bestiary/BestiaryEntry.cs b/GameContent/Bestiary/BestiaryEntry.cs new file mode 100644 index 0000000..5f968ae --- /dev/null +++ b/GameContent/Bestiary/BestiaryEntry.cs @@ -0,0 +1,109 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.BestiaryEntry +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using Terraria.ID; +using Terraria.Localization; + +namespace Terraria.GameContent.Bestiary +{ + public class BestiaryEntry + { + public IEntryIcon Icon; + public IBestiaryUICollectionInfoProvider UIInfoProvider; + + public List Info { get; private set; } + + public BestiaryEntry() => this.Info = new List(); + + public static BestiaryEntry Enemy(int npcNetId) + { + NPC npc = ContentSamples.NpcsByNetId[npcNetId]; + List bestiaryInfoElementList = new List() + { + (IBestiaryInfoElement) new NPCNetIdBestiaryInfoElement(npcNetId), + (IBestiaryInfoElement) new NamePlateInfoElement(Lang.GetNPCName(npcNetId).Key, npcNetId), + (IBestiaryInfoElement) new NPCPortraitInfoElement(new int?(ContentSamples.NpcBestiaryRarityStars[npcNetId])) + }; + foreach (int key in Main.RegisterdGameModes.Keys) + bestiaryInfoElementList.Add((IBestiaryInfoElement) new NPCStatsReportInfoElement(npcNetId, key)); + if (npc.rarity != 0) + bestiaryInfoElementList.Add((IBestiaryInfoElement) new RareSpawnBestiaryInfoElement(npc.rarity)); + IBestiaryUICollectionInfoProvider collectionInfoProvider; + if (npc.boss || NPCID.Sets.ShouldBeCountedAsBoss[npc.type]) + { + bestiaryInfoElementList.Add((IBestiaryInfoElement) new BossBestiaryInfoElement()); + collectionInfoProvider = (IBestiaryUICollectionInfoProvider) new CommonEnemyUICollectionInfoProvider(npc.GetBestiaryCreditId(), true); + } + else + collectionInfoProvider = (IBestiaryUICollectionInfoProvider) new CommonEnemyUICollectionInfoProvider(npc.GetBestiaryCreditId(), false); + string str = "Bestiary_FlavorText.npc_" + Lang.GetNPCName(npc.netID).Key.Replace("NPCName.", ""); + if (Language.Exists(str)) + bestiaryInfoElementList.Add((IBestiaryInfoElement) new FlavorTextBestiaryInfoElement(str)); + return new BestiaryEntry() + { + Icon = (IEntryIcon) new UnlockableNPCEntryIcon(npcNetId), + Info = bestiaryInfoElementList, + UIInfoProvider = collectionInfoProvider + }; + } + + public static BestiaryEntry TownNPC(int npcNetId) + { + NPC npc = ContentSamples.NpcsByNetId[npcNetId]; + List bestiaryInfoElementList = new List() + { + (IBestiaryInfoElement) new NPCNetIdBestiaryInfoElement(npcNetId), + (IBestiaryInfoElement) new NamePlateInfoElement(Lang.GetNPCName(npcNetId).Key, npcNetId), + (IBestiaryInfoElement) new NPCPortraitInfoElement(new int?(ContentSamples.NpcBestiaryRarityStars[npcNetId])) + }; + string str = "Bestiary_FlavorText.npc_" + Lang.GetNPCName(npc.netID).Key.Replace("NPCName.", ""); + if (Language.Exists(str)) + bestiaryInfoElementList.Add((IBestiaryInfoElement) new FlavorTextBestiaryInfoElement(str)); + return new BestiaryEntry() + { + Icon = (IEntryIcon) new UnlockableNPCEntryIcon(npcNetId), + Info = bestiaryInfoElementList, + UIInfoProvider = (IBestiaryUICollectionInfoProvider) new TownNPCUICollectionInfoProvider(npc.GetBestiaryCreditId()) + }; + } + + public static BestiaryEntry Critter(int npcNetId) + { + NPC npc = ContentSamples.NpcsByNetId[npcNetId]; + List bestiaryInfoElementList = new List() + { + (IBestiaryInfoElement) new NPCNetIdBestiaryInfoElement(npcNetId), + (IBestiaryInfoElement) new NamePlateInfoElement(Lang.GetNPCName(npcNetId).Key, npcNetId), + (IBestiaryInfoElement) new NPCPortraitInfoElement(new int?(ContentSamples.NpcBestiaryRarityStars[npcNetId])) + }; + string str = "Bestiary_FlavorText.npc_" + Lang.GetNPCName(npc.netID).Key.Replace("NPCName.", ""); + if (Language.Exists(str)) + bestiaryInfoElementList.Add((IBestiaryInfoElement) new FlavorTextBestiaryInfoElement(str)); + return new BestiaryEntry() + { + Icon = (IEntryIcon) new UnlockableNPCEntryIcon(npcNetId), + Info = bestiaryInfoElementList, + UIInfoProvider = (IBestiaryUICollectionInfoProvider) new CritterUICollectionInfoProvider(npc.GetBestiaryCreditId()) + }; + } + + public static BestiaryEntry Biome( + string nameLanguageKey, + string texturePath, + Func unlockCondition) + { + return new BestiaryEntry() + { + Icon = (IEntryIcon) new CustomEntryIcon(nameLanguageKey, texturePath, unlockCondition), + Info = new List() + }; + } + + public void AddTags(params IBestiaryInfoElement[] elements) => this.Info.AddRange((IEnumerable) elements); + } +} diff --git a/GameContent/Bestiary/BestiaryEntryUnlockState.cs b/GameContent/Bestiary/BestiaryEntryUnlockState.cs new file mode 100644 index 0000000..a2f41f0 --- /dev/null +++ b/GameContent/Bestiary/BestiaryEntryUnlockState.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.BestiaryEntryUnlockState +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Bestiary +{ + public enum BestiaryEntryUnlockState + { + NotKnownAtAll_0, + CanShowPortraitOnly_1, + CanShowStats_2, + CanShowDropsWithoutDropRates_3, + CanShowDropsWithDropRates_4, + } +} diff --git a/GameContent/Bestiary/BestiaryPortraitBackgroundBasedOnWorldEvilProvider.cs b/GameContent/Bestiary/BestiaryPortraitBackgroundBasedOnWorldEvilProvider.cs new file mode 100644 index 0000000..83dc8dc --- /dev/null +++ b/GameContent/Bestiary/BestiaryPortraitBackgroundBasedOnWorldEvilProvider.cs @@ -0,0 +1,36 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.BestiaryPortraitBackgroundBasedOnWorldEvilProviderPreferenceInfoElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class BestiaryPortraitBackgroundBasedOnWorldEvilProviderPreferenceInfoElement : + IPreferenceProviderElement, + IBestiaryInfoElement + { + private IBestiaryBackgroundImagePathAndColorProvider _preferredProviderCorrupt; + private IBestiaryBackgroundImagePathAndColorProvider _preferredProviderCrimson; + + public BestiaryPortraitBackgroundBasedOnWorldEvilProviderPreferenceInfoElement( + IBestiaryBackgroundImagePathAndColorProvider preferredProviderCorrupt, + IBestiaryBackgroundImagePathAndColorProvider preferredProviderCrimson) + { + this._preferredProviderCorrupt = preferredProviderCorrupt; + this._preferredProviderCrimson = preferredProviderCrimson; + } + + public UIElement ProvideUIElement(BestiaryUICollectionInfo info) => (UIElement) null; + + public bool Matches( + IBestiaryBackgroundImagePathAndColorProvider provider) + { + return Main.ActiveWorldFileData == null || !WorldGen.crimson ? provider == this._preferredProviderCorrupt : provider == this._preferredProviderCrimson; + } + + public IBestiaryBackgroundImagePathAndColorProvider GetPreferredProvider() => Main.ActiveWorldFileData == null || !WorldGen.crimson ? this._preferredProviderCorrupt : this._preferredProviderCrimson; + } +} diff --git a/GameContent/Bestiary/BestiaryPortraitBackgroundProviderPreferenceInfoEl.cs b/GameContent/Bestiary/BestiaryPortraitBackgroundProviderPreferenceInfoEl.cs new file mode 100644 index 0000000..538af01 --- /dev/null +++ b/GameContent/Bestiary/BestiaryPortraitBackgroundProviderPreferenceInfoEl.cs @@ -0,0 +1,33 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.BestiaryPortraitBackgroundProviderPreferenceInfoElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class BestiaryPortraitBackgroundProviderPreferenceInfoElement : + IPreferenceProviderElement, + IBestiaryInfoElement + { + private IBestiaryBackgroundImagePathAndColorProvider _preferredProvider; + + public BestiaryPortraitBackgroundProviderPreferenceInfoElement( + IBestiaryBackgroundImagePathAndColorProvider preferredProvider) + { + this._preferredProvider = preferredProvider; + } + + public UIElement ProvideUIElement(BestiaryUICollectionInfo info) => (UIElement) null; + + public bool Matches( + IBestiaryBackgroundImagePathAndColorProvider provider) + { + return provider == this._preferredProvider; + } + + public IBestiaryBackgroundImagePathAndColorProvider GetPreferredProvider() => this._preferredProvider; + } +} diff --git a/GameContent/Bestiary/BestiaryUICollectionInfo.cs b/GameContent/Bestiary/BestiaryUICollectionInfo.cs new file mode 100644 index 0000000..6f6205a --- /dev/null +++ b/GameContent/Bestiary/BestiaryUICollectionInfo.cs @@ -0,0 +1,14 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.BestiaryUICollectionInfo +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Bestiary +{ + public struct BestiaryUICollectionInfo + { + public BestiaryEntry OwnerEntry; + public BestiaryEntryUnlockState UnlockState; + } +} diff --git a/GameContent/Bestiary/BestiaryUnlockProgressReport.cs b/GameContent/Bestiary/BestiaryUnlockProgressReport.cs new file mode 100644 index 0000000..bd152ed --- /dev/null +++ b/GameContent/Bestiary/BestiaryUnlockProgressReport.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.BestiaryUnlockProgressReport +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Bestiary +{ + public struct BestiaryUnlockProgressReport + { + public int EntriesTotal; + public float CompletionAmountTotal; + + public float CompletionPercent => this.EntriesTotal == 0 ? 1f : this.CompletionAmountTotal / (float) this.EntriesTotal; + } +} diff --git a/GameContent/Bestiary/BestiaryUnlocksTracker.cs b/GameContent/Bestiary/BestiaryUnlocksTracker.cs new file mode 100644 index 0000000..91f9425 --- /dev/null +++ b/GameContent/Bestiary/BestiaryUnlocksTracker.cs @@ -0,0 +1,56 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.BestiaryUnlocksTracker +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; + +namespace Terraria.GameContent.Bestiary +{ + public class BestiaryUnlocksTracker : IPersistentPerWorldContent, IOnPlayerJoining + { + public NPCKillsTracker Kills = new NPCKillsTracker(); + public NPCWasNearPlayerTracker Sights = new NPCWasNearPlayerTracker(); + public NPCWasChatWithTracker Chats = new NPCWasChatWithTracker(); + + public void Save(BinaryWriter writer) + { + this.Kills.Save(writer); + this.Sights.Save(writer); + this.Chats.Save(writer); + } + + public void Load(BinaryReader reader, int gameVersionSaveWasMadeOn) + { + this.Kills.Load(reader, gameVersionSaveWasMadeOn); + this.Sights.Load(reader, gameVersionSaveWasMadeOn); + this.Chats.Load(reader, gameVersionSaveWasMadeOn); + } + + public void ValidateWorld(BinaryReader reader, int gameVersionSaveWasMadeOn) + { + this.Kills.ValidateWorld(reader, gameVersionSaveWasMadeOn); + this.Sights.ValidateWorld(reader, gameVersionSaveWasMadeOn); + this.Chats.ValidateWorld(reader, gameVersionSaveWasMadeOn); + } + + public void Reset() + { + this.Kills.Reset(); + this.Sights.Reset(); + this.Chats.Reset(); + } + + public void OnPlayerJoining(int playerIndex) + { + this.Kills.OnPlayerJoining(playerIndex); + this.Sights.OnPlayerJoining(playerIndex); + this.Chats.OnPlayerJoining(playerIndex); + } + + public void FillBasedOnVersionBefore210() + { + } + } +} diff --git a/GameContent/Bestiary/BossBestiaryInfoElement.cs b/GameContent/Bestiary/BossBestiaryInfoElement.cs new file mode 100644 index 0000000..77e5d72 --- /dev/null +++ b/GameContent/Bestiary/BossBestiaryInfoElement.cs @@ -0,0 +1,18 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.BossBestiaryInfoElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class BossBestiaryInfoElement : IBestiaryInfoElement, IProvideSearchFilterString + { + public UIElement ProvideUIElement(BestiaryUICollectionInfo info) => (UIElement) null; + + public string GetSearchString(ref BestiaryUICollectionInfo info) => info.UnlockState < BestiaryEntryUnlockState.CanShowPortraitOnly_1 ? (string) null : Language.GetText("BestiaryInfo.IsBoss").Value; + } +} diff --git a/GameContent/Bestiary/CommonEnemyUICollectionInfoProvider.cs b/GameContent/Bestiary/CommonEnemyUICollectionInfoProvider.cs new file mode 100644 index 0000000..ed13c49 --- /dev/null +++ b/GameContent/Bestiary/CommonEnemyUICollectionInfoProvider.cs @@ -0,0 +1,40 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.CommonEnemyUICollectionInfoProvider +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class CommonEnemyUICollectionInfoProvider : IBestiaryUICollectionInfoProvider + { + private string _persistentIdentifierToCheck; + private bool _quickUnlock; + + public CommonEnemyUICollectionInfoProvider(string persistentId, bool quickUnlock) + { + this._persistentIdentifierToCheck = persistentId; + this._quickUnlock = quickUnlock; + } + + public BestiaryUICollectionInfo GetEntryUICollectionInfo() + { + BestiaryEntryUnlockState stateByKillCount = CommonEnemyUICollectionInfoProvider.GetUnlockStateByKillCount(Main.BestiaryTracker.Kills.GetKillCount(this._persistentIdentifierToCheck), this._quickUnlock); + return new BestiaryUICollectionInfo() + { + UnlockState = stateByKillCount + }; + } + + public static BestiaryEntryUnlockState GetUnlockStateByKillCount( + int killCount, + bool quickUnlock) + { + return !quickUnlock || killCount <= 0 ? (killCount < 50 ? (killCount < 25 ? (killCount < 10 ? (killCount < 1 ? BestiaryEntryUnlockState.NotKnownAtAll_0 : BestiaryEntryUnlockState.CanShowPortraitOnly_1) : BestiaryEntryUnlockState.CanShowStats_2) : BestiaryEntryUnlockState.CanShowDropsWithoutDropRates_3) : BestiaryEntryUnlockState.CanShowDropsWithDropRates_4) : BestiaryEntryUnlockState.CanShowDropsWithDropRates_4; + } + + public UIElement ProvideUIElement(BestiaryUICollectionInfo info) => (UIElement) null; + } +} diff --git a/GameContent/Bestiary/CritterUICollectionInfoProvider.cs b/GameContent/Bestiary/CritterUICollectionInfoProvider.cs new file mode 100644 index 0000000..a667265 --- /dev/null +++ b/GameContent/Bestiary/CritterUICollectionInfoProvider.cs @@ -0,0 +1,24 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.CritterUICollectionInfoProvider +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class CritterUICollectionInfoProvider : IBestiaryUICollectionInfoProvider + { + private string _persistentIdentifierToCheck; + + public CritterUICollectionInfoProvider(string persistentId) => this._persistentIdentifierToCheck = persistentId; + + public BestiaryUICollectionInfo GetEntryUICollectionInfo() => new BestiaryUICollectionInfo() + { + UnlockState = Main.BestiaryTracker.Sights.GetWasNearbyBefore(this._persistentIdentifierToCheck) ? BestiaryEntryUnlockState.CanShowDropsWithDropRates_4 : BestiaryEntryUnlockState.NotKnownAtAll_0 + }; + + public UIElement ProvideUIElement(BestiaryUICollectionInfo info) => (UIElement) null; + } +} diff --git a/GameContent/Bestiary/CustomEntryIcon.cs b/GameContent/Bestiary/CustomEntryIcon.cs new file mode 100644 index 0000000..bdb6f59 --- /dev/null +++ b/GameContent/Bestiary/CustomEntryIcon.cs @@ -0,0 +1,59 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.CustomEntryIcon +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.Localization; + +namespace Terraria.GameContent.Bestiary +{ + public class CustomEntryIcon : IEntryIcon + { + private LocalizedText _text; + private Asset _textureAsset; + private Rectangle _sourceRectangle; + private Func _unlockCondition; + + public CustomEntryIcon(string nameLanguageKey, string texturePath, Func unlockCondition) + { + this._text = Language.GetText(nameLanguageKey); + this._textureAsset = Main.Assets.Request(texturePath, (AssetRequestMode) 1); + this._unlockCondition = unlockCondition; + this.UpdateUnlockState(false); + } + + public IEntryIcon CreateClone() => (IEntryIcon) new CustomEntryIcon(this._text.Key, this._textureAsset.Name, this._unlockCondition); + + public void Update( + BestiaryUICollectionInfo providedInfo, + Rectangle hitbox, + EntryIconDrawSettings settings) + { + this.UpdateUnlockState(this.GetUnlockState(providedInfo)); + } + + public void Draw( + BestiaryUICollectionInfo providedInfo, + SpriteBatch spriteBatch, + EntryIconDrawSettings settings) + { + Rectangle iconbox = settings.iconbox; + spriteBatch.Draw(this._textureAsset.Value, iconbox.Center.ToVector2() + Vector2.One, new Rectangle?(this._sourceRectangle), Color.White, 0.0f, this._sourceRectangle.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + } + + public string GetHoverText(BestiaryUICollectionInfo providedInfo) => this.GetUnlockState(providedInfo) ? this._text.Value : "???"; + + private void UpdateUnlockState(bool state) + { + this._sourceRectangle = this._textureAsset.Frame(2, frameX: state.ToInt()); + this._sourceRectangle.Inflate(-2, -2); + } + + public bool GetUnlockState(BestiaryUICollectionInfo providedInfo) => providedInfo.UnlockState > BestiaryEntryUnlockState.NotKnownAtAll_0; + } +} diff --git a/GameContent/Bestiary/EntryIconDrawSettings.cs b/GameContent/Bestiary/EntryIconDrawSettings.cs new file mode 100644 index 0000000..c1c012b --- /dev/null +++ b/GameContent/Bestiary/EntryIconDrawSettings.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.EntryIconDrawSettings +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.GameContent.Bestiary +{ + public struct EntryIconDrawSettings + { + public bool IsPortrait; + public bool IsHovered; + public Rectangle iconbox; + } +} diff --git a/GameContent/Bestiary/FilterProviderInfoElement.cs b/GameContent/Bestiary/FilterProviderInfoElement.cs new file mode 100644 index 0000000..add41fa --- /dev/null +++ b/GameContent/Bestiary/FilterProviderInfoElement.cs @@ -0,0 +1,88 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.FilterProviderInfoElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.GameContent.UI.Elements; +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class FilterProviderInfoElement : + IFilterInfoProvider, + IProvideSearchFilterString, + IBestiaryInfoElement + { + private const int framesPerRow = 16; + private const int framesPerColumn = 5; + private Point _filterIconFrame; + private string _key; + + public int DisplayTextPriority { get; set; } + + public FilterProviderInfoElement(string nameLanguageKey, int filterIconFrame) + { + this._key = nameLanguageKey; + this._filterIconFrame.X = filterIconFrame % 16; + this._filterIconFrame.Y = filterIconFrame / 16; + } + + public UIElement GetFilterImage() + { + Asset asset = Main.Assets.Request("Images/UI/Bestiary/Icon_Tags_Shadow", (AssetRequestMode) 1); + UIImageFramed uiImageFramed = new UIImageFramed(asset, asset.Frame(16, 5, this._filterIconFrame.X, this._filterIconFrame.Y)); + uiImageFramed.HAlign = 0.5f; + uiImageFramed.VAlign = 0.5f; + return (UIElement) uiImageFramed; + } + + public string GetSearchString(ref BestiaryUICollectionInfo info) => info.UnlockState == BestiaryEntryUnlockState.NotKnownAtAll_0 ? (string) null : Language.GetText(this._key).Value; + + public string GetDisplayNameKey() => this._key; + + public UIElement ProvideUIElement(BestiaryUICollectionInfo info) + { + if (info.UnlockState == BestiaryEntryUnlockState.NotKnownAtAll_0) + return (UIElement) null; + UIPanel uiPanel = new UIPanel(Main.Assets.Request("Images/UI/Bestiary/Stat_Panel", (AssetRequestMode) 1), (Asset) null, customBarSize: 7); + uiPanel.Width = new StyleDimension(-14f, 1f); + uiPanel.Height = new StyleDimension(34f, 0.0f); + uiPanel.BackgroundColor = new Color(43, 56, 101); + uiPanel.BorderColor = Color.Transparent; + uiPanel.Left = new StyleDimension(5f, 0.0f); + UIElement button = (UIElement) uiPanel; + button.SetPadding(0.0f); + button.PaddingRight = 5f; + UIElement filterImage = this.GetFilterImage(); + filterImage.HAlign = 0.0f; + filterImage.Left = new StyleDimension(5f, 0.0f); + UIText uiText1 = new UIText(Language.GetText(this.GetDisplayNameKey()), 0.8f); + uiText1.HAlign = 0.0f; + uiText1.Left = new StyleDimension(38f, 0.0f); + uiText1.TextOriginX = 0.0f; + uiText1.VAlign = 0.5f; + uiText1.DynamicallyScaleDownToWidth = true; + UIText uiText2 = uiText1; + if (filterImage != null) + button.Append(filterImage); + button.Append((UIElement) uiText2); + this.AddOnHover(button); + return button; + } + + private void AddOnHover(UIElement button) => button.OnUpdate += (UIElement.ElementEvent) (e => this.ShowButtonName(e)); + + private void ShowButtonName(UIElement element) + { + if (!element.IsMouseHovering) + return; + string textValue = Language.GetTextValue(this.GetDisplayNameKey()); + Main.instance.MouseText(textValue); + } + } +} diff --git a/GameContent/Bestiary/Filters.cs b/GameContent/Bestiary/Filters.cs new file mode 100644 index 0000000..f4bad75 --- /dev/null +++ b/GameContent/Bestiary/Filters.cs @@ -0,0 +1,147 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.Filters +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.DataStructures; +using Terraria.GameContent.UI.Elements; +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public static class Filters + { + public class BySearch : + IBestiaryEntryFilter, + IEntryFilter, + ISearchFilter + { + private string _search; + + public bool? ForcedDisplay => new bool?(true); + + public bool FitsFilter(BestiaryEntry entry) + { + if (this._search == null) + return true; + BestiaryUICollectionInfo uiCollectionInfo = entry.UIInfoProvider.GetEntryUICollectionInfo(); + for (int index = 0; index < entry.Info.Count; ++index) + { + if (entry.Info[index] is IProvideSearchFilterString searchFilterString1) + { + string searchString = searchFilterString1.GetSearchString(ref uiCollectionInfo); + if (searchString != null && searchString.ToLower().IndexOf(this._search, StringComparison.OrdinalIgnoreCase) != -1) + return true; + } + } + return false; + } + + public string GetDisplayNameKey() => "BestiaryInfo.IfSearched"; + + public UIElement GetImage() + { + Asset asset = Main.Assets.Request("Images/UI/Bestiary/Icon_Rank_Light", (AssetRequestMode) 1); + UIImageFramed uiImageFramed = new UIImageFramed(asset, asset.Frame()); + uiImageFramed.HAlign = 0.5f; + uiImageFramed.VAlign = 0.5f; + return (UIElement) uiImageFramed; + } + + public void SetSearch(string searchText) => this._search = searchText; + } + + public class ByUnlockState : IBestiaryEntryFilter, IEntryFilter + { + public bool? ForcedDisplay => new bool?(true); + + public bool FitsFilter(BestiaryEntry entry) + { + BestiaryUICollectionInfo uiCollectionInfo = entry.UIInfoProvider.GetEntryUICollectionInfo(); + return entry.Icon.GetUnlockState(uiCollectionInfo); + } + + public string GetDisplayNameKey() => "BestiaryInfo.IfUnlocked"; + + public UIElement GetImage() + { + Asset asset = Main.Assets.Request("Images/UI/Bestiary/Icon_Tags_Shadow", (AssetRequestMode) 1); + UIImageFramed uiImageFramed = new UIImageFramed(asset, asset.Frame(16, 5, 14, 3)); + uiImageFramed.HAlign = 0.5f; + uiImageFramed.VAlign = 0.5f; + return (UIElement) uiImageFramed; + } + } + + public class ByRareCreature : IBestiaryEntryFilter, IEntryFilter + { + public bool? ForcedDisplay => new bool?(); + + public bool FitsFilter(BestiaryEntry entry) + { + for (int index = 0; index < entry.Info.Count; ++index) + { + if (entry.Info[index] is RareSpawnBestiaryInfoElement) + return true; + } + return false; + } + + public string GetDisplayNameKey() => "BestiaryInfo.IsRare"; + + public UIElement GetImage() + { + Asset asset = Main.Assets.Request("Images/UI/Bestiary/Icon_Rank_Light", (AssetRequestMode) 1); + UIImageFramed uiImageFramed = new UIImageFramed(asset, asset.Frame()); + uiImageFramed.HAlign = 0.5f; + uiImageFramed.VAlign = 0.5f; + return (UIElement) uiImageFramed; + } + } + + public class ByBoss : IBestiaryEntryFilter, IEntryFilter + { + public bool? ForcedDisplay => new bool?(); + + public bool FitsFilter(BestiaryEntry entry) + { + for (int index = 0; index < entry.Info.Count; ++index) + { + if (entry.Info[index] is BossBestiaryInfoElement) + return true; + } + return false; + } + + public string GetDisplayNameKey() => "BestiaryInfo.IsBoss"; + + public UIElement GetImage() + { + Asset asset = Main.Assets.Request("Images/UI/Bestiary/Icon_Tags_Shadow", (AssetRequestMode) 1); + UIImageFramed uiImageFramed = new UIImageFramed(asset, asset.Frame(16, 5, 15, 3)); + uiImageFramed.HAlign = 0.5f; + uiImageFramed.VAlign = 0.5f; + return (UIElement) uiImageFramed; + } + } + + public class ByInfoElement : IBestiaryEntryFilter, IEntryFilter + { + private IBestiaryInfoElement _element; + + public bool? ForcedDisplay => new bool?(); + + public ByInfoElement(IBestiaryInfoElement element) => this._element = element; + + public bool FitsFilter(BestiaryEntry entry) => entry.Info.Contains(this._element); + + public string GetDisplayNameKey() => !(this._element is IFilterInfoProvider element) ? (string) null : element.GetDisplayNameKey(); + + public UIElement GetImage() => !(this._element is IFilterInfoProvider element) ? (UIElement) null : element.GetFilterImage(); + } + } +} diff --git a/GameContent/Bestiary/FlavorTextBestiaryInfoElement.cs b/GameContent/Bestiary/FlavorTextBestiaryInfoElement.cs new file mode 100644 index 0000000..804a1da --- /dev/null +++ b/GameContent/Bestiary/FlavorTextBestiaryInfoElement.cs @@ -0,0 +1,49 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.FlavorTextBestiaryInfoElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.GameContent.UI.Elements; +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class FlavorTextBestiaryInfoElement : IBestiaryInfoElement + { + private string _key; + + public FlavorTextBestiaryInfoElement(string languageKey) => this._key = languageKey; + + public UIElement ProvideUIElement(BestiaryUICollectionInfo info) + { + if (info.UnlockState < BestiaryEntryUnlockState.CanShowStats_2) + return (UIElement) null; + UIPanel uiPanel = new UIPanel(Main.Assets.Request("Images/UI/Bestiary/Stat_Panel", (AssetRequestMode) 1), (Asset) null, customBarSize: 7); + uiPanel.Width = new StyleDimension(-11f, 1f); + uiPanel.Height = new StyleDimension(109f, 0.0f); + uiPanel.BackgroundColor = new Color(43, 56, 101); + uiPanel.BorderColor = Color.Transparent; + uiPanel.Left = new StyleDimension(3f, 0.0f); + uiPanel.PaddingLeft = 4f; + uiPanel.PaddingRight = 4f; + UIText uiText = new UIText(Language.GetText(this._key), 0.8f); + uiText.HAlign = 0.0f; + uiText.VAlign = 0.0f; + uiText.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + uiText.Height = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + uiText.IsWrapped = true; + UIText text = uiText; + FlavorTextBestiaryInfoElement.AddDynamicResize((UIElement) uiPanel, text); + uiPanel.Append((UIElement) text); + return (UIElement) uiPanel; + } + + private static void AddDynamicResize(UIElement container, UIText text) => text.OnInternalTextChange += (Action) (() => container.Height = new StyleDimension(text.MinHeight.Pixels, 0.0f)); + } +} diff --git a/GameContent/Bestiary/GoldCritterUICollectionInfoProvider.cs b/GameContent/Bestiary/GoldCritterUICollectionInfoProvider.cs new file mode 100644 index 0000000..184e710 --- /dev/null +++ b/GameContent/Bestiary/GoldCritterUICollectionInfoProvider.cs @@ -0,0 +1,67 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.GoldCritterUICollectionInfoProvider +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.ID; + +namespace Terraria.GameContent.Bestiary +{ + public class GoldCritterUICollectionInfoProvider : IBestiaryUICollectionInfoProvider + { + private string[] _normalCritterPersistentId; + private string _goldCritterPersistentId; + + public GoldCritterUICollectionInfoProvider( + int[] normalCritterPersistentId, + string goldCritterPersistentId) + { + this._normalCritterPersistentId = new string[normalCritterPersistentId.Length]; + for (int index = 0; index < normalCritterPersistentId.Length; ++index) + this._normalCritterPersistentId[index] = ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[normalCritterPersistentId[index]]; + this._goldCritterPersistentId = goldCritterPersistentId; + } + + public BestiaryUICollectionInfo GetEntryUICollectionInfo() + { + BestiaryEntryUnlockState unlockStateForCritter1 = this.GetUnlockStateForCritter(this._goldCritterPersistentId); + BestiaryEntryUnlockState entryUnlockState = BestiaryEntryUnlockState.NotKnownAtAll_0; + if (unlockStateForCritter1 > entryUnlockState) + entryUnlockState = unlockStateForCritter1; + foreach (string persistentId in this._normalCritterPersistentId) + { + BestiaryEntryUnlockState unlockStateForCritter2 = this.GetUnlockStateForCritter(persistentId); + if (unlockStateForCritter2 > entryUnlockState) + entryUnlockState = unlockStateForCritter2; + } + BestiaryUICollectionInfo uiCollectionInfo = new BestiaryUICollectionInfo() + { + UnlockState = entryUnlockState + }; + if (entryUnlockState == BestiaryEntryUnlockState.NotKnownAtAll_0 || this.TryFindingOneGoldCritterThatIsAlreadyUnlocked()) + return uiCollectionInfo; + return new BestiaryUICollectionInfo() + { + UnlockState = BestiaryEntryUnlockState.NotKnownAtAll_0 + }; + } + + private bool TryFindingOneGoldCritterThatIsAlreadyUnlocked() + { + for (int index = 0; index < NPCID.Sets.GoldCrittersCollection.Count; ++index) + { + int goldCritters = NPCID.Sets.GoldCrittersCollection[index]; + if (this.GetUnlockStateForCritter(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[goldCritters]) > BestiaryEntryUnlockState.NotKnownAtAll_0) + return true; + } + return false; + } + + private BestiaryEntryUnlockState GetUnlockStateForCritter( + string persistentId) + { + return !Main.BestiaryTracker.Sights.GetWasNearbyBefore(persistentId) ? BestiaryEntryUnlockState.NotKnownAtAll_0 : BestiaryEntryUnlockState.CanShowDropsWithDropRates_4; + } + } +} diff --git a/GameContent/Bestiary/HighestOfMultipleUICollectionInfoProvider.cs b/GameContent/Bestiary/HighestOfMultipleUICollectionInfoProvider.cs new file mode 100644 index 0000000..7f717cc --- /dev/null +++ b/GameContent/Bestiary/HighestOfMultipleUICollectionInfoProvider.cs @@ -0,0 +1,39 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.HighestOfMultipleUICollectionInfoProvider +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class HighestOfMultipleUICollectionInfoProvider : IBestiaryUICollectionInfoProvider + { + private IBestiaryUICollectionInfoProvider[] _providers; + private int _mainProviderIndex; + + public HighestOfMultipleUICollectionInfoProvider( + params IBestiaryUICollectionInfoProvider[] providers) + { + this._providers = providers; + this._mainProviderIndex = 0; + } + + public BestiaryUICollectionInfo GetEntryUICollectionInfo() + { + BestiaryUICollectionInfo uiCollectionInfo1 = this._providers[this._mainProviderIndex].GetEntryUICollectionInfo(); + BestiaryEntryUnlockState unlockState = uiCollectionInfo1.UnlockState; + for (int index = 0; index < this._providers.Length; ++index) + { + BestiaryUICollectionInfo uiCollectionInfo2 = this._providers[index].GetEntryUICollectionInfo(); + if (unlockState < uiCollectionInfo2.UnlockState) + unlockState = uiCollectionInfo2.UnlockState; + } + uiCollectionInfo1.UnlockState = unlockState; + return uiCollectionInfo1; + } + + public UIElement ProvideUIElement(BestiaryUICollectionInfo info) => (UIElement) null; + } +} diff --git a/GameContent/Bestiary/IBestiaryBackgroundImagePathAndColorProvider.cs b/GameContent/Bestiary/IBestiaryBackgroundImagePathAndColorProvider.cs new file mode 100644 index 0000000..497cc87 --- /dev/null +++ b/GameContent/Bestiary/IBestiaryBackgroundImagePathAndColorProvider.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.IBestiaryBackgroundImagePathAndColorProvider +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; + +namespace Terraria.GameContent.Bestiary +{ + public interface IBestiaryBackgroundImagePathAndColorProvider + { + Asset GetBackgroundImage(); + + Color? GetBackgroundColor(); + } +} diff --git a/GameContent/Bestiary/IBestiaryBackgroundOverlayAndColorProvider.cs b/GameContent/Bestiary/IBestiaryBackgroundOverlayAndColorProvider.cs new file mode 100644 index 0000000..3ffca50 --- /dev/null +++ b/GameContent/Bestiary/IBestiaryBackgroundOverlayAndColorProvider.cs @@ -0,0 +1,21 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.IBestiaryBackgroundOverlayAndColorProvider +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; + +namespace Terraria.GameContent.Bestiary +{ + public interface IBestiaryBackgroundOverlayAndColorProvider + { + Asset GetBackgroundOverlayImage(); + + Color? GetBackgroundOverlayColor(); + + float DisplayPriority { get; } + } +} diff --git a/GameContent/Bestiary/IBestiaryEntryDisplayIndex.cs b/GameContent/Bestiary/IBestiaryEntryDisplayIndex.cs new file mode 100644 index 0000000..92bf939 --- /dev/null +++ b/GameContent/Bestiary/IBestiaryEntryDisplayIndex.cs @@ -0,0 +1,13 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.IBestiaryEntryDisplayIndex +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Bestiary +{ + public interface IBestiaryEntryDisplayIndex + { + int BestiaryDisplayIndex { get; } + } +} diff --git a/GameContent/Bestiary/IBestiaryEntryFilter.cs b/GameContent/Bestiary/IBestiaryEntryFilter.cs new file mode 100644 index 0000000..8832f0b --- /dev/null +++ b/GameContent/Bestiary/IBestiaryEntryFilter.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.IBestiaryEntryFilter +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.DataStructures; + +namespace Terraria.GameContent.Bestiary +{ + public interface IBestiaryEntryFilter : IEntryFilter + { + bool? ForcedDisplay { get; } + } +} diff --git a/GameContent/Bestiary/IBestiaryInfoElement.cs b/GameContent/Bestiary/IBestiaryInfoElement.cs new file mode 100644 index 0000000..bbd0e1c --- /dev/null +++ b/GameContent/Bestiary/IBestiaryInfoElement.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.IBestiaryInfoElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public interface IBestiaryInfoElement + { + UIElement ProvideUIElement(BestiaryUICollectionInfo info); + } +} diff --git a/GameContent/Bestiary/IBestiarySortStep.cs b/GameContent/Bestiary/IBestiarySortStep.cs new file mode 100644 index 0000000..b6a07c7 --- /dev/null +++ b/GameContent/Bestiary/IBestiarySortStep.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.IBestiarySortStep +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using Terraria.DataStructures; + +namespace Terraria.GameContent.Bestiary +{ + public interface IBestiarySortStep : IEntrySortStep, IComparer + { + bool HiddenFromSortOptions { get; } + } +} diff --git a/GameContent/Bestiary/IBestiaryUICollectionInfoProvider.cs b/GameContent/Bestiary/IBestiaryUICollectionInfoProvider.cs new file mode 100644 index 0000000..17f4d3b --- /dev/null +++ b/GameContent/Bestiary/IBestiaryUICollectionInfoProvider.cs @@ -0,0 +1,13 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.IBestiaryUICollectionInfoProvider +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Bestiary +{ + public interface IBestiaryUICollectionInfoProvider + { + BestiaryUICollectionInfo GetEntryUICollectionInfo(); + } +} diff --git a/GameContent/Bestiary/IEntryIcon.cs b/GameContent/Bestiary/IEntryIcon.cs new file mode 100644 index 0000000..3330425 --- /dev/null +++ b/GameContent/Bestiary/IEntryIcon.cs @@ -0,0 +1,30 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.IEntryIcon +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.GameContent.Bestiary +{ + public interface IEntryIcon + { + void Update( + BestiaryUICollectionInfo providedInfo, + Rectangle hitbox, + EntryIconDrawSettings settings); + + void Draw( + BestiaryUICollectionInfo providedInfo, + SpriteBatch spriteBatch, + EntryIconDrawSettings settings); + + bool GetUnlockState(BestiaryUICollectionInfo providedInfo); + + string GetHoverText(BestiaryUICollectionInfo providedInfo); + + IEntryIcon CreateClone(); + } +} diff --git a/GameContent/Bestiary/IFilterInfoProvider.cs b/GameContent/Bestiary/IFilterInfoProvider.cs new file mode 100644 index 0000000..df45bb1 --- /dev/null +++ b/GameContent/Bestiary/IFilterInfoProvider.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.IFilterInfoProvider +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public interface IFilterInfoProvider + { + UIElement GetFilterImage(); + + string GetDisplayNameKey(); + } +} diff --git a/GameContent/Bestiary/IItemBestiaryInfoElement.cs b/GameContent/Bestiary/IItemBestiaryInfoElement.cs new file mode 100644 index 0000000..c580cdf --- /dev/null +++ b/GameContent/Bestiary/IItemBestiaryInfoElement.cs @@ -0,0 +1,12 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.IItemBestiaryInfoElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Bestiary +{ + public interface IItemBestiaryInfoElement : IBestiaryInfoElement + { + } +} diff --git a/GameContent/Bestiary/IPreferenceProviderElement.cs b/GameContent/Bestiary/IPreferenceProviderElement.cs new file mode 100644 index 0000000..9a4fd80 --- /dev/null +++ b/GameContent/Bestiary/IPreferenceProviderElement.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.IPreferenceProviderElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Bestiary +{ + public interface IPreferenceProviderElement : IBestiaryInfoElement + { + IBestiaryBackgroundImagePathAndColorProvider GetPreferredProvider(); + + bool Matches( + IBestiaryBackgroundImagePathAndColorProvider provider); + } +} diff --git a/GameContent/Bestiary/IProvideSearchFilterString.cs b/GameContent/Bestiary/IProvideSearchFilterString.cs new file mode 100644 index 0000000..4f51677 --- /dev/null +++ b/GameContent/Bestiary/IProvideSearchFilterString.cs @@ -0,0 +1,13 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.IProvideSearchFilterString +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Bestiary +{ + public interface IProvideSearchFilterString + { + string GetSearchString(ref BestiaryUICollectionInfo info); + } +} diff --git a/GameContent/Bestiary/ItemDropBestiaryInfoElement.cs b/GameContent/Bestiary/ItemDropBestiaryInfoElement.cs new file mode 100644 index 0000000..6dcc355 --- /dev/null +++ b/GameContent/Bestiary/ItemDropBestiaryInfoElement.cs @@ -0,0 +1,56 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.ItemDropBestiaryInfoElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.GameContent.ItemDropRules; +using Terraria.GameContent.UI.Elements; +using Terraria.ID; +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class ItemDropBestiaryInfoElement : + IItemBestiaryInfoElement, + IBestiaryInfoElement, + IProvideSearchFilterString + { + protected DropRateInfo _droprateInfo; + + public ItemDropBestiaryInfoElement(DropRateInfo info) => this._droprateInfo = info; + + public virtual UIElement ProvideUIElement(BestiaryUICollectionInfo info) + { + bool flag = ItemDropBestiaryInfoElement.ShouldShowItem(ref this._droprateInfo); + if (info.UnlockState < BestiaryEntryUnlockState.CanShowStats_2) + flag = false; + return !flag ? (UIElement) null : (UIElement) new UIBestiaryInfoItemLine(this._droprateInfo, info); + } + + private static bool ShouldShowItem(ref DropRateInfo dropRateInfo) + { + bool flag = true; + if (dropRateInfo.conditions != null && dropRateInfo.conditions.Count > 0) + { + for (int index = 0; index < dropRateInfo.conditions.Count; ++index) + { + if (!dropRateInfo.conditions[index].CanShowItemDropInUI()) + { + flag = false; + break; + } + } + } + return flag; + } + + public string GetSearchString(ref BestiaryUICollectionInfo info) + { + bool flag = ItemDropBestiaryInfoElement.ShouldShowItem(ref this._droprateInfo); + if (info.UnlockState < BestiaryEntryUnlockState.CanShowStats_2) + flag = false; + return !flag ? (string) null : ContentSamples.ItemsByType[this._droprateInfo.itemId].Name; + } + } +} diff --git a/GameContent/Bestiary/ItemFromCatchingNPCBestiaryInfoElement.cs b/GameContent/Bestiary/ItemFromCatchingNPCBestiaryInfoElement.cs new file mode 100644 index 0000000..934c046 --- /dev/null +++ b/GameContent/Bestiary/ItemFromCatchingNPCBestiaryInfoElement.cs @@ -0,0 +1,26 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.ItemFromCatchingNPCBestiaryInfoElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.GameContent.UI.Elements; +using Terraria.ID; +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class ItemFromCatchingNPCBestiaryInfoElement : + IItemBestiaryInfoElement, + IBestiaryInfoElement, + IProvideSearchFilterString + { + private int _itemType; + + public ItemFromCatchingNPCBestiaryInfoElement(int itemId) => this._itemType = itemId; + + public UIElement ProvideUIElement(BestiaryUICollectionInfo info) => info.UnlockState < BestiaryEntryUnlockState.CanShowDropsWithoutDropRates_3 ? (UIElement) null : (UIElement) new UIBestiaryInfoLine("catch item #" + (object) this._itemType ?? ""); + + public string GetSearchString(ref BestiaryUICollectionInfo info) => info.UnlockState < BestiaryEntryUnlockState.CanShowDropsWithoutDropRates_3 ? (string) null : ContentSamples.ItemsByType[this._itemType].Name; + } +} diff --git a/GameContent/Bestiary/MoonLordPortraitBackgroundProviderBestiaryInfoElem.cs b/GameContent/Bestiary/MoonLordPortraitBackgroundProviderBestiaryInfoElem.cs new file mode 100644 index 0000000..1a79c21 --- /dev/null +++ b/GameContent/Bestiary/MoonLordPortraitBackgroundProviderBestiaryInfoElem.cs @@ -0,0 +1,24 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.MoonLordPortraitBackgroundProviderBestiaryInfoElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class MoonLordPortraitBackgroundProviderBestiaryInfoElement : + IBestiaryInfoElement, + IBestiaryBackgroundImagePathAndColorProvider + { + public Asset GetBackgroundImage() => Main.Assets.Request("Images/MapBG1", (AssetRequestMode) 1); + + public Color? GetBackgroundColor() => new Color?(Color.Black); + + public UIElement ProvideUIElement(BestiaryUICollectionInfo info) => (UIElement) null; + } +} diff --git a/GameContent/Bestiary/NPCKillsTracker.cs b/GameContent/Bestiary/NPCKillsTracker.cs new file mode 100644 index 0000000..73e5ec3 --- /dev/null +++ b/GameContent/Bestiary/NPCKillsTracker.cs @@ -0,0 +1,86 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.NPCKillsTracker +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using System.IO; +using Terraria.GameContent.NetModules; +using Terraria.ID; +using Terraria.Net; + +namespace Terraria.GameContent.Bestiary +{ + public class NPCKillsTracker : IPersistentPerWorldContent, IOnPlayerJoining + { + public const int POSITIVE_KILL_COUNT_CAP = 9999; + private Dictionary _killCountsByNpcId; + + public NPCKillsTracker() => this._killCountsByNpcId = new Dictionary(); + + public void RegisterKill(NPC npc) + { + string bestiaryCreditId = npc.GetBestiaryCreditId(); + int num; + this._killCountsByNpcId.TryGetValue(bestiaryCreditId, out num); + int killcount = num + 1; + this._killCountsByNpcId[bestiaryCreditId] = Utils.Clamp(killcount, 0, 9999); + if (Main.netMode != 2) + return; + NetManager.Instance.Broadcast(NetBestiaryModule.SerializeKillCount(npc.netID, killcount)); + } + + public int GetKillCount(NPC npc) => this.GetKillCount(npc.GetBestiaryCreditId()); + + public void SetKillCountDirectly(string persistentId, int killCount) => this._killCountsByNpcId[persistentId] = Utils.Clamp(killCount, 0, 9999); + + public int GetKillCount(string persistentId) + { + int num; + this._killCountsByNpcId.TryGetValue(persistentId, out num); + return num; + } + + public void Save(BinaryWriter writer) + { + lock (this._killCountsByNpcId) + { + writer.Write(this._killCountsByNpcId.Count); + foreach (KeyValuePair keyValuePair in this._killCountsByNpcId) + { + writer.Write(keyValuePair.Key); + writer.Write(keyValuePair.Value); + } + } + } + + public void Load(BinaryReader reader, int gameVersionSaveWasMadeOn) + { + int num = reader.ReadInt32(); + for (int index = 0; index < num; ++index) + this._killCountsByNpcId[reader.ReadString()] = reader.ReadInt32(); + } + + public void ValidateWorld(BinaryReader reader, int gameVersionSaveWasMadeOn) + { + int num = reader.ReadInt32(); + for (int index = 0; index < num; ++index) + { + reader.ReadString(); + reader.ReadInt32(); + } + } + + public void Reset() => this._killCountsByNpcId.Clear(); + + public void OnPlayerJoining(int playerIndex) + { + foreach (KeyValuePair keyValuePair in this._killCountsByNpcId) + { + int idsByPersistentId = ContentSamples.NpcNetIdsByPersistentIds[keyValuePair.Key]; + NetManager.Instance.SendToClient(NetBestiaryModule.SerializeKillCount(idsByPersistentId, keyValuePair.Value), playerIndex); + } + } + } +} diff --git a/GameContent/Bestiary/NPCNetIdBestiaryInfoElement.cs b/GameContent/Bestiary/NPCNetIdBestiaryInfoElement.cs new file mode 100644 index 0000000..2b8ee16 --- /dev/null +++ b/GameContent/Bestiary/NPCNetIdBestiaryInfoElement.cs @@ -0,0 +1,22 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.NPCNetIdBestiaryInfoElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.ID; +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class NPCNetIdBestiaryInfoElement : IBestiaryInfoElement, IBestiaryEntryDisplayIndex + { + public int NetId { get; private set; } + + public NPCNetIdBestiaryInfoElement(int npcNetId) => this.NetId = npcNetId; + + public UIElement ProvideUIElement(BestiaryUICollectionInfo info) => (UIElement) null; + + public int BestiaryDisplayIndex => ContentSamples.NpcBestiarySortingId[this.NetId]; + } +} diff --git a/GameContent/Bestiary/NPCPortraitInfoElement.cs b/GameContent/Bestiary/NPCPortraitInfoElement.cs new file mode 100644 index 0000000..f1b39ff --- /dev/null +++ b/GameContent/Bestiary/NPCPortraitInfoElement.cs @@ -0,0 +1,137 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.NPCPortraitInfoElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.GameContent.UI.Elements; +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class NPCPortraitInfoElement : IBestiaryInfoElement + { + private int? _filledStarsCount; + + public NPCPortraitInfoElement(int? rarityStars = null) => this._filledStarsCount = rarityStars; + + public UIElement ProvideUIElement(BestiaryUICollectionInfo info) + { + UIElement uiElement = new UIElement() + { + Width = new StyleDimension(0.0f, 1f), + Height = new StyleDimension(112f, 0.0f) + }; + uiElement.SetPadding(0.0f); + BestiaryEntry entry = new BestiaryEntry(); + Asset portraitBackgroundAsset = (Asset) null; + Color white = Color.White; + entry.Icon = info.OwnerEntry.Icon.CreateClone(); + entry.UIInfoProvider = info.OwnerEntry.UIInfoProvider; + List overlays = new List(); + bool flag1 = info.UnlockState > BestiaryEntryUnlockState.NotKnownAtAll_0; + if (flag1) + { + List source1 = new List(); + IEnumerable source2 = info.OwnerEntry.Info.OfType(); + IEnumerable preferences = info.OwnerEntry.Info.OfType(); + Func predicate = (Func) (provider => preferences.Any((Func) (preference => preference.Matches(provider)))); + IEnumerable andColorProviders = source2.Where(predicate); + bool flag2 = false; + foreach (IBestiaryBackgroundImagePathAndColorProvider andColorProvider in andColorProviders) + { + Asset backgroundImage = andColorProvider.GetBackgroundImage(); + if (backgroundImage != null) + { + portraitBackgroundAsset = backgroundImage; + flag2 = true; + Color? backgroundColor = andColorProvider.GetBackgroundColor(); + if (backgroundColor.HasValue) + { + white = backgroundColor.Value; + break; + } + break; + } + } + foreach (IBestiaryInfoElement bestiaryInfoElement in info.OwnerEntry.Info) + { + if (bestiaryInfoElement is IBestiaryBackgroundImagePathAndColorProvider andColorProvider9) + { + Asset backgroundImage = andColorProvider9.GetBackgroundImage(); + if (backgroundImage != null) + { + if (!flag2) + portraitBackgroundAsset = backgroundImage; + Color? backgroundColor = andColorProvider9.GetBackgroundColor(); + if (backgroundColor.HasValue) + white = backgroundColor.Value; + } + else + continue; + } + if (!flag2 && bestiaryInfoElement is IBestiaryBackgroundOverlayAndColorProvider andColorProvider10 && andColorProvider10.GetBackgroundOverlayImage() != null) + source1.Add(bestiaryInfoElement); + } + overlays.AddRange(source1.OrderBy(new Func(this.GetSortingValueForElement)).Select((Func) (x => x as IBestiaryBackgroundOverlayAndColorProvider))); + } + UIBestiaryNPCEntryPortrait npcEntryPortrait1 = new UIBestiaryNPCEntryPortrait(entry, portraitBackgroundAsset, white, overlays); + npcEntryPortrait1.Left = new StyleDimension(4f, 0.0f); + npcEntryPortrait1.HAlign = 0.0f; + UIBestiaryNPCEntryPortrait npcEntryPortrait2 = npcEntryPortrait1; + uiElement.Append((UIElement) npcEntryPortrait2); + if (flag1 && this._filledStarsCount.HasValue) + { + UIElement starsContainer = this.CreateStarsContainer(); + uiElement.Append(starsContainer); + } + return uiElement; + } + + private float GetSortingValueForElement(IBestiaryInfoElement element) => element is IBestiaryBackgroundOverlayAndColorProvider andColorProvider ? andColorProvider.DisplayPriority : 0.0f; + + private UIElement CreateStarsContainer() + { + int num1 = 14; + int num2 = 14; + int num3 = -4; + int num4 = num1 + num3; + int val2 = 5; + int val1 = 5; + int num5 = this._filledStarsCount.Value; + float num6 = 1f; + int num7 = num4 * Math.Min(val1, val2) - num3; + double num8 = (double) num4 * Math.Ceiling((double) val2 / (double) val1) - (double) num3; + UIPanel uiPanel = new UIPanel(Main.Assets.Request("Images/UI/Bestiary/Stat_Panel", (AssetRequestMode) 1), (Asset) null, 5, 21); + uiPanel.Width = new StyleDimension((float) num7 + num6 * 2f, 0.0f); + uiPanel.Height = new StyleDimension((float) num8 + num6 * 2f, 0.0f); + uiPanel.BackgroundColor = Color.Gray * 0.0f; + uiPanel.BorderColor = Color.Transparent; + uiPanel.Left = new StyleDimension(10f, 0.0f); + uiPanel.Top = new StyleDimension(6f, 0.0f); + uiPanel.VAlign = 0.0f; + UIElement uiElement = (UIElement) uiPanel; + uiElement.SetPadding(0.0f); + for (int index = val2 - 1; index >= 0; --index) + { + string str = "Images/UI/Bestiary/Icon_Rank_Light"; + if (index >= num5) + str = "Images/UI/Bestiary/Icon_Rank_Dim"; + UIImage uiImage1 = new UIImage(Main.Assets.Request(str, (AssetRequestMode) 1)); + uiImage1.Left = new StyleDimension((float) ((double) (num4 * (index % val1)) - (double) num7 * 0.5 + (double) num1 * 0.5), 0.0f); + uiImage1.Top = new StyleDimension((float) ((double) (num4 * (index / val1)) - num8 * 0.5 + (double) num2 * 0.5), 0.0f); + uiImage1.HAlign = 0.5f; + uiImage1.VAlign = 0.5f; + UIImage uiImage2 = uiImage1; + uiElement.Append((UIElement) uiImage2); + } + return uiElement; + } + } +} diff --git a/GameContent/Bestiary/NPCStatsReportInfoElement.cs b/GameContent/Bestiary/NPCStatsReportInfoElement.cs new file mode 100644 index 0000000..890ba51 --- /dev/null +++ b/GameContent/Bestiary/NPCStatsReportInfoElement.cs @@ -0,0 +1,245 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.NPCStatsReportInfoElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.DataStructures; +using Terraria.GameContent.UI.Elements; +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class NPCStatsReportInfoElement : IBestiaryInfoElement + { + public int NpcId; + public int GameMode; + public int Damage; + public int LifeMax; + public float MonetaryValue; + public int Defense; + public float KnockbackResist; + + public NPCStatsReportInfoElement(int npcNetId, int gameMode) + { + this.NpcId = npcNetId; + this.GameMode = gameMode; + if (!Main.RegisterdGameModes.TryGetValue(this.GameMode, out GameModeData _)) + return; + NPC npc = new NPC(); + npc.SetDefaults(this.NpcId); + this.Damage = npc.damage; + this.LifeMax = npc.lifeMax; + this.MonetaryValue = npc.value; + this.Defense = npc.defense; + this.KnockbackResist = npc.knockBackResist; + } + + public UIElement ProvideUIElement(BestiaryUICollectionInfo info) + { + if (info.UnlockState == BestiaryEntryUnlockState.NotKnownAtAll_0) + return (UIElement) null; + if (this.GameMode != Main.GameMode) + return (UIElement) null; + UIElement uiElement = new UIElement() + { + Width = new StyleDimension(0.0f, 1f), + Height = new StyleDimension(109f, 0.0f) + }; + int num1 = 99; + int num2 = 35; + int num3 = 3; + int num4 = 0; + UIImage uiImage1 = new UIImage(Main.Assets.Request("Images/UI/Bestiary/Stat_HP", (AssetRequestMode) 1)); + uiImage1.Top = new StyleDimension((float) num4, 0.0f); + uiImage1.Left = new StyleDimension((float) num3, 0.0f); + UIImage uiImage2 = uiImage1; + UIImage uiImage3 = new UIImage(Main.Assets.Request("Images/UI/Bestiary/Stat_Attack", (AssetRequestMode) 1)); + uiImage3.Top = new StyleDimension((float) (num4 + num2), 0.0f); + uiImage3.Left = new StyleDimension((float) num3, 0.0f); + UIImage uiImage4 = uiImage3; + UIImage uiImage5 = new UIImage(Main.Assets.Request("Images/UI/Bestiary/Stat_Defense", (AssetRequestMode) 1)); + uiImage5.Top = new StyleDimension((float) (num4 + num2), 0.0f); + uiImage5.Left = new StyleDimension((float) (num3 + num1), 0.0f); + UIImage uiImage6 = uiImage5; + UIImage uiImage7 = new UIImage(Main.Assets.Request("Images/UI/Bestiary/Stat_Knockback", (AssetRequestMode) 1)); + uiImage7.Top = new StyleDimension((float) num4, 0.0f); + uiImage7.Left = new StyleDimension((float) (num3 + num1), 0.0f); + UIImage uiImage8 = uiImage7; + uiElement.Append((UIElement) uiImage2); + uiElement.Append((UIElement) uiImage4); + uiElement.Append((UIElement) uiImage6); + uiElement.Append((UIElement) uiImage8); + int num5 = -10; + int num6 = 0; + int monetaryValue = (int) this.MonetaryValue; + string text1 = Utils.Clamp(monetaryValue / 1000000, 0, 999).ToString(); + string text2 = Utils.Clamp(monetaryValue % 1000000 / 10000, 0, 99).ToString(); + string text3 = Utils.Clamp(monetaryValue % 10000 / 100, 0, 99).ToString(); + string text4 = Utils.Clamp(monetaryValue % 100 / 1, 0, 99).ToString(); + if (monetaryValue / 1000000 < 1) + text1 = "-"; + if (monetaryValue / 10000 < 1) + text2 = "-"; + if (monetaryValue / 100 < 1) + text3 = "-"; + if (monetaryValue < 1) + text4 = "-"; + string text5 = this.LifeMax.ToString(); + string text6 = this.Damage.ToString(); + string text7 = this.Defense.ToString(); + string text8 = (double) this.KnockbackResist <= 0.800000011920929 ? ((double) this.KnockbackResist <= 0.400000005960464 ? ((double) this.KnockbackResist <= 0.0 ? Language.GetText("BestiaryInfo.KnockbackNone").Value : Language.GetText("BestiaryInfo.KnockbackLow").Value) : Language.GetText("BestiaryInfo.KnockbackMedium").Value) : Language.GetText("BestiaryInfo.KnockbackHigh").Value; + if (info.UnlockState < BestiaryEntryUnlockState.CanShowStats_2) + { + string str1; + text4 = str1 = "?"; + text3 = str1; + text2 = str1; + text1 = str1; + string str2; + text8 = str2 = "???"; + text7 = str2; + text6 = str2; + text5 = str2; + } + UIText uiText1 = new UIText(text5); + uiText1.HAlign = 1f; + uiText1.VAlign = 0.5f; + uiText1.Left = new StyleDimension((float) num5, 0.0f); + uiText1.Top = new StyleDimension((float) num6, 0.0f); + uiText1.IgnoresMouseInteraction = true; + UIText uiText2 = uiText1; + UIText uiText3 = new UIText(text8); + uiText3.HAlign = 1f; + uiText3.VAlign = 0.5f; + uiText3.Left = new StyleDimension((float) num5, 0.0f); + uiText3.Top = new StyleDimension((float) num6, 0.0f); + uiText3.IgnoresMouseInteraction = true; + UIText uiText4 = uiText3; + UIText uiText5 = new UIText(text6); + uiText5.HAlign = 1f; + uiText5.VAlign = 0.5f; + uiText5.Left = new StyleDimension((float) num5, 0.0f); + uiText5.Top = new StyleDimension((float) num6, 0.0f); + uiText5.IgnoresMouseInteraction = true; + UIText uiText6 = uiText5; + UIText uiText7 = new UIText(text7); + uiText7.HAlign = 1f; + uiText7.VAlign = 0.5f; + uiText7.Left = new StyleDimension((float) num5, 0.0f); + uiText7.Top = new StyleDimension((float) num6, 0.0f); + uiText7.IgnoresMouseInteraction = true; + UIText uiText8 = uiText7; + uiImage2.Append((UIElement) uiText2); + uiImage4.Append((UIElement) uiText6); + uiImage6.Append((UIElement) uiText8); + uiImage8.Append((UIElement) uiText4); + if (monetaryValue > 0) + { + UIHorizontalSeparator horizontalSeparator1 = new UIHorizontalSeparator(); + horizontalSeparator1.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + horizontalSeparator1.Color = new Color(89, 116, 213, (int) byte.MaxValue) * 0.9f; + horizontalSeparator1.Left = new StyleDimension(0.0f, 0.0f); + horizontalSeparator1.Top = new StyleDimension((float) (num6 + num2 * 2), 0.0f); + UIHorizontalSeparator horizontalSeparator2 = horizontalSeparator1; + uiElement.Append((UIElement) horizontalSeparator2); + int num7 = num3; + int num8 = num6 + num2 * 2 + 8; + int num9 = 49; + UIImage uiImage9 = new UIImage(Main.Assets.Request("Images/UI/Bestiary/Stat_Platinum", (AssetRequestMode) 1)); + uiImage9.Top = new StyleDimension((float) num8, 0.0f); + uiImage9.Left = new StyleDimension((float) num7, 0.0f); + UIImage uiImage10 = uiImage9; + UIImage uiImage11 = new UIImage(Main.Assets.Request("Images/UI/Bestiary/Stat_Gold", (AssetRequestMode) 1)); + uiImage11.Top = new StyleDimension((float) num8, 0.0f); + uiImage11.Left = new StyleDimension((float) (num7 + num9), 0.0f); + UIImage uiImage12 = uiImage11; + UIImage uiImage13 = new UIImage(Main.Assets.Request("Images/UI/Bestiary/Stat_Silver", (AssetRequestMode) 1)); + uiImage13.Top = new StyleDimension((float) num8, 0.0f); + uiImage13.Left = new StyleDimension((float) (num7 + num9 * 2 + 1), 0.0f); + UIImage uiImage14 = uiImage13; + UIImage uiImage15 = new UIImage(Main.Assets.Request("Images/UI/Bestiary/Stat_Copper", (AssetRequestMode) 1)); + uiImage15.Top = new StyleDimension((float) num8, 0.0f); + uiImage15.Left = new StyleDimension((float) (num7 + num9 * 3 + 1), 0.0f); + UIImage uiImage16 = uiImage15; + if (text1 != "-") + uiElement.Append((UIElement) uiImage10); + if (text2 != "-") + uiElement.Append((UIElement) uiImage12); + if (text3 != "-") + uiElement.Append((UIElement) uiImage14); + if (text4 != "-") + uiElement.Append((UIElement) uiImage16); + int num10 = num5 + 3; + float textScale = 0.85f; + UIText uiText9 = new UIText(text1, textScale); + uiText9.HAlign = 1f; + uiText9.VAlign = 0.5f; + uiText9.Left = new StyleDimension((float) num10, 0.0f); + uiText9.Top = new StyleDimension((float) num6, 0.0f); + UIText uiText10 = uiText9; + UIText uiText11 = new UIText(text2, textScale); + uiText11.HAlign = 1f; + uiText11.VAlign = 0.5f; + uiText11.Left = new StyleDimension((float) num10, 0.0f); + uiText11.Top = new StyleDimension((float) num6, 0.0f); + UIText uiText12 = uiText11; + UIText uiText13 = new UIText(text3, textScale); + uiText13.HAlign = 1f; + uiText13.VAlign = 0.5f; + uiText13.Left = new StyleDimension((float) num10, 0.0f); + uiText13.Top = new StyleDimension((float) num6, 0.0f); + UIText uiText14 = uiText13; + UIText uiText15 = new UIText(text4, textScale); + uiText15.HAlign = 1f; + uiText15.VAlign = 0.5f; + uiText15.Left = new StyleDimension((float) num10, 0.0f); + uiText15.Top = new StyleDimension((float) num6, 0.0f); + UIText uiText16 = uiText15; + uiImage10.Append((UIElement) uiText10); + uiImage12.Append((UIElement) uiText12); + uiImage14.Append((UIElement) uiText14); + uiImage16.Append((UIElement) uiText16); + } + else + uiElement.Height.Pixels = (float) (num6 + num2 * 2 - 4); + uiImage4.OnUpdate += new UIElement.ElementEvent(this.ShowStats_Attack); + uiImage6.OnUpdate += new UIElement.ElementEvent(this.ShowStats_Defense); + uiImage2.OnUpdate += new UIElement.ElementEvent(this.ShowStats_Life); + uiImage8.OnUpdate += new UIElement.ElementEvent(this.ShowStats_Knockback); + return uiElement; + } + + private void ShowStats_Attack(UIElement element) + { + if (!element.IsMouseHovering) + return; + Main.instance.MouseText(Language.GetTextValue("BestiaryInfo.Attack")); + } + + private void ShowStats_Defense(UIElement element) + { + if (!element.IsMouseHovering) + return; + Main.instance.MouseText(Language.GetTextValue("BestiaryInfo.Defense")); + } + + private void ShowStats_Knockback(UIElement element) + { + if (!element.IsMouseHovering) + return; + Main.instance.MouseText(Language.GetTextValue("BestiaryInfo.Knockback")); + } + + private void ShowStats_Life(UIElement element) + { + if (!element.IsMouseHovering) + return; + Main.instance.MouseText(Language.GetTextValue("BestiaryInfo.Life")); + } + } +} diff --git a/GameContent/Bestiary/NPCWasChatWithTracker.cs b/GameContent/Bestiary/NPCWasChatWithTracker.cs new file mode 100644 index 0000000..fa236e0 --- /dev/null +++ b/GameContent/Bestiary/NPCWasChatWithTracker.cs @@ -0,0 +1,73 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.NPCWasChatWithTracker +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using System.IO; +using Terraria.GameContent.NetModules; +using Terraria.ID; +using Terraria.Net; + +namespace Terraria.GameContent.Bestiary +{ + public class NPCWasChatWithTracker : IPersistentPerWorldContent, IOnPlayerJoining + { + private HashSet _chattedWithPlayer; + + public NPCWasChatWithTracker() => this._chattedWithPlayer = new HashSet(); + + public void RegisterChatStartWith(NPC npc) + { + string bestiaryCreditId = npc.GetBestiaryCreditId(); + bool flag = !this._chattedWithPlayer.Contains(bestiaryCreditId); + this._chattedWithPlayer.Add(bestiaryCreditId); + if (!(Main.netMode == 2 & flag)) + return; + NetManager.Instance.Broadcast(NetBestiaryModule.SerializeChat(npc.netID)); + } + + public void SetWasChatWithDirectly(string persistentId) => this._chattedWithPlayer.Add(persistentId); + + public bool GetWasChatWith(NPC npc) => this._chattedWithPlayer.Contains(npc.GetBestiaryCreditId()); + + public bool GetWasChatWith(string persistentId) => this._chattedWithPlayer.Contains(persistentId); + + public void Save(BinaryWriter writer) + { + lock (this._chattedWithPlayer) + { + writer.Write(this._chattedWithPlayer.Count); + foreach (string str in this._chattedWithPlayer) + writer.Write(str); + } + } + + public void Load(BinaryReader reader, int gameVersionSaveWasMadeOn) + { + int num = reader.ReadInt32(); + for (int index = 0; index < num; ++index) + this._chattedWithPlayer.Add(reader.ReadString()); + } + + public void ValidateWorld(BinaryReader reader, int gameVersionSaveWasMadeOn) + { + int num = reader.ReadInt32(); + for (int index = 0; index < num; ++index) + reader.ReadString(); + } + + public void Reset() => this._chattedWithPlayer.Clear(); + + public void OnPlayerJoining(int playerIndex) + { + foreach (string key in this._chattedWithPlayer) + { + int npcNetId; + if (ContentSamples.NpcNetIdsByPersistentIds.TryGetValue(key, out npcNetId)) + NetManager.Instance.SendToClient(NetBestiaryModule.SerializeChat(npcNetId), playerIndex); + } + } + } +} diff --git a/GameContent/Bestiary/NPCWasNearPlayerTracker.cs b/GameContent/Bestiary/NPCWasNearPlayerTracker.cs new file mode 100644 index 0000000..14f5fab --- /dev/null +++ b/GameContent/Bestiary/NPCWasNearPlayerTracker.cs @@ -0,0 +1,121 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.NPCWasNearPlayerTracker +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using System.IO; +using Terraria.GameContent.NetModules; +using Terraria.ID; +using Terraria.Net; + +namespace Terraria.GameContent.Bestiary +{ + public class NPCWasNearPlayerTracker : IPersistentPerWorldContent, IOnPlayerJoining + { + private HashSet _wasNearPlayer; + private List _playerHitboxesForBestiary; + private List _wasSeenNearPlayerByNetId; + + public void PrepareSamplesBasedOptimizations() + { + } + + public NPCWasNearPlayerTracker() + { + this._wasNearPlayer = new HashSet(); + this._playerHitboxesForBestiary = new List(); + this._wasSeenNearPlayerByNetId = new List(); + } + + public void RegisterWasNearby(NPC npc) + { + string bestiaryCreditId = npc.GetBestiaryCreditId(); + bool flag = !this._wasNearPlayer.Contains(bestiaryCreditId); + this._wasNearPlayer.Add(bestiaryCreditId); + if (!(Main.netMode == 2 & flag)) + return; + NetManager.Instance.Broadcast(NetBestiaryModule.SerializeSight(npc.netID)); + } + + public void SetWasSeenDirectly(string persistentId) => this._wasNearPlayer.Add(persistentId); + + public bool GetWasNearbyBefore(NPC npc) => this.GetWasNearbyBefore(npc.GetBestiaryCreditId()); + + public bool GetWasNearbyBefore(string persistentIdentifier) => this._wasNearPlayer.Contains(persistentIdentifier); + + public void Save(BinaryWriter writer) + { + lock (this._wasNearPlayer) + { + writer.Write(this._wasNearPlayer.Count); + foreach (string str in this._wasNearPlayer) + writer.Write(str); + } + } + + public void Load(BinaryReader reader, int gameVersionSaveWasMadeOn) + { + int num = reader.ReadInt32(); + for (int index = 0; index < num; ++index) + this._wasNearPlayer.Add(reader.ReadString()); + } + + public void ValidateWorld(BinaryReader reader, int gameVersionSaveWasMadeOn) + { + int num = reader.ReadInt32(); + for (int index = 0; index < num; ++index) + reader.ReadString(); + } + + public void Reset() + { + this._wasNearPlayer.Clear(); + this._playerHitboxesForBestiary.Clear(); + this._wasSeenNearPlayerByNetId.Clear(); + } + + public void ScanWorldForFinds() + { + this._playerHitboxesForBestiary.Clear(); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + Player player = Main.player[index]; + if (player.active) + { + Rectangle hitbox = player.Hitbox; + hitbox.Inflate(300, 200); + this._playerHitboxesForBestiary.Add(hitbox); + } + } + for (int index1 = 0; index1 < 200; ++index1) + { + NPC npc = Main.npc[index1]; + if (npc.active && npc.CountsAsACritter && !this._wasSeenNearPlayerByNetId.Contains(npc.netID)) + { + Rectangle hitbox = npc.Hitbox; + for (int index2 = 0; index2 < this._playerHitboxesForBestiary.Count; ++index2) + { + Rectangle rectangle = this._playerHitboxesForBestiary[index2]; + if (hitbox.Intersects(rectangle)) + { + this._wasSeenNearPlayerByNetId.Add(npc.netID); + this.RegisterWasNearby(npc); + } + } + } + } + } + + public void OnPlayerJoining(int playerIndex) + { + foreach (string key in this._wasNearPlayer) + { + int idsByPersistentId = ContentSamples.NpcNetIdsByPersistentIds[key]; + NetManager.Instance.SendToClient(NetBestiaryModule.SerializeSight(idsByPersistentId), playerIndex); + } + } + } +} diff --git a/GameContent/Bestiary/NamePlateInfoElement.cs b/GameContent/Bestiary/NamePlateInfoElement.cs new file mode 100644 index 0000000..c87f2ec --- /dev/null +++ b/GameContent/Bestiary/NamePlateInfoElement.cs @@ -0,0 +1,40 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.NamePlateInfoElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.GameContent.UI.Elements; +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class NamePlateInfoElement : IBestiaryInfoElement, IProvideSearchFilterString + { + private string _key; + private int _npcNetId; + + public NamePlateInfoElement(string languageKey, int npcNetId) + { + this._key = languageKey; + this._npcNetId = npcNetId; + } + + public UIElement ProvideUIElement(BestiaryUICollectionInfo info) + { + UIElement element = info.UnlockState != BestiaryEntryUnlockState.NotKnownAtAll_0 ? (UIElement) new UIText(Language.GetText(this._key)) : (UIElement) new UIText("???"); + element.HAlign = 0.5f; + element.VAlign = 0.5f; + element.Top = new StyleDimension(2f, 0.0f); + element.IgnoresMouseInteraction = true; + UIElement uiElement = new UIElement(); + uiElement.Width = new StyleDimension(0.0f, 1f); + uiElement.Height = new StyleDimension(24f, 0.0f); + uiElement.Append(element); + return uiElement; + } + + public string GetSearchString(ref BestiaryUICollectionInfo info) => info.UnlockState == BestiaryEntryUnlockState.NotKnownAtAll_0 ? (string) null : Language.GetText(this._key).Value; + } +} diff --git a/GameContent/Bestiary/RareSpawnBestiaryInfoElement.cs b/GameContent/Bestiary/RareSpawnBestiaryInfoElement.cs new file mode 100644 index 0000000..674a2c7 --- /dev/null +++ b/GameContent/Bestiary/RareSpawnBestiaryInfoElement.cs @@ -0,0 +1,22 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.RareSpawnBestiaryInfoElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class RareSpawnBestiaryInfoElement : IBestiaryInfoElement, IProvideSearchFilterString + { + public int RarityLevel { get; private set; } + + public RareSpawnBestiaryInfoElement(int rarityLevel) => this.RarityLevel = rarityLevel; + + public UIElement ProvideUIElement(BestiaryUICollectionInfo info) => (UIElement) null; + + public string GetSearchString(ref BestiaryUICollectionInfo info) => info.UnlockState == BestiaryEntryUnlockState.NotKnownAtAll_0 ? (string) null : Language.GetText("BestiaryInfo.IsRare").Value; + } +} diff --git a/GameContent/Bestiary/SalamanderShellyDadUICollectionInfoProvider.cs b/GameContent/Bestiary/SalamanderShellyDadUICollectionInfoProvider.cs new file mode 100644 index 0000000..0cf7289 --- /dev/null +++ b/GameContent/Bestiary/SalamanderShellyDadUICollectionInfoProvider.cs @@ -0,0 +1,65 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.SalamanderShellyDadUICollectionInfoProvider +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.ID; +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class SalamanderShellyDadUICollectionInfoProvider : IBestiaryUICollectionInfoProvider + { + private string _persistentIdentifierToCheck; + + public SalamanderShellyDadUICollectionInfoProvider(string persistentId) => this._persistentIdentifierToCheck = persistentId; + + public BestiaryUICollectionInfo GetEntryUICollectionInfo() + { + BestiaryEntryUnlockState unlockstatus = CommonEnemyUICollectionInfoProvider.GetUnlockStateByKillCount(Main.BestiaryTracker.Kills.GetKillCount(this._persistentIdentifierToCheck), false); + if (!this.IsIncludedInCurrentWorld()) + unlockstatus = this.GetLowestAvailableUnlockStateFromEntriesThatAreInWorld(unlockstatus); + return new BestiaryUICollectionInfo() + { + UnlockState = unlockstatus + }; + } + + private BestiaryEntryUnlockState GetLowestAvailableUnlockStateFromEntriesThatAreInWorld( + BestiaryEntryUnlockState unlockstatus) + { + BestiaryEntryUnlockState entryUnlockState = BestiaryEntryUnlockState.CanShowDropsWithDropRates_4; + int[,] cavernMonsterType = NPC.cavernMonsterType; + for (int index1 = 0; index1 < cavernMonsterType.GetLength(0); ++index1) + { + for (int index2 = 0; index2 < cavernMonsterType.GetLength(1); ++index2) + { + string creditIdsByNpcNetId = ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[cavernMonsterType[index1, index2]]; + BestiaryEntryUnlockState stateByKillCount = CommonEnemyUICollectionInfoProvider.GetUnlockStateByKillCount(Main.BestiaryTracker.Kills.GetKillCount(creditIdsByNpcNetId), false); + if (entryUnlockState > stateByKillCount) + entryUnlockState = stateByKillCount; + } + } + unlockstatus = entryUnlockState; + return unlockstatus; + } + + private bool IsIncludedInCurrentWorld() + { + int idsByPersistentId = ContentSamples.NpcNetIdsByPersistentIds[this._persistentIdentifierToCheck]; + int[,] cavernMonsterType = NPC.cavernMonsterType; + for (int index1 = 0; index1 < cavernMonsterType.GetLength(0); ++index1) + { + for (int index2 = 0; index2 < cavernMonsterType.GetLength(1); ++index2) + { + if (ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[cavernMonsterType[index1, index2]] == this._persistentIdentifierToCheck) + return true; + } + } + return false; + } + + public UIElement ProvideUIElement(BestiaryUICollectionInfo info) => (UIElement) null; + } +} diff --git a/GameContent/Bestiary/SearchAliasInfoElement.cs b/GameContent/Bestiary/SearchAliasInfoElement.cs new file mode 100644 index 0000000..693f24e --- /dev/null +++ b/GameContent/Bestiary/SearchAliasInfoElement.cs @@ -0,0 +1,21 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.SearchAliasInfoElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class SearchAliasInfoElement : IBestiaryInfoElement, IProvideSearchFilterString + { + private readonly string _alias; + + public SearchAliasInfoElement(string alias) => this._alias = alias; + + public string GetSearchString(ref BestiaryUICollectionInfo info) => info.UnlockState == BestiaryEntryUnlockState.NotKnownAtAll_0 ? (string) null : this._alias; + + public UIElement ProvideUIElement(BestiaryUICollectionInfo info) => (UIElement) null; + } +} diff --git a/GameContent/Bestiary/SortingSteps.cs b/GameContent/Bestiary/SortingSteps.cs new file mode 100644 index 0000000..657b416 --- /dev/null +++ b/GameContent/Bestiary/SortingSteps.cs @@ -0,0 +1,172 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.SortingSteps +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.Localization; + +namespace Terraria.GameContent.Bestiary +{ + public static class SortingSteps + { + public class ByNetId : IBestiarySortStep, IEntrySortStep, IComparer + { + public bool HiddenFromSortOptions => true; + + public int Compare(BestiaryEntry x, BestiaryEntry y) + { + NPCNetIdBestiaryInfoElement bestiaryInfoElement1 = x.Info.FirstOrDefault((Func) (element => element is NPCNetIdBestiaryInfoElement)) as NPCNetIdBestiaryInfoElement; + NPCNetIdBestiaryInfoElement bestiaryInfoElement2 = y.Info.FirstOrDefault((Func) (element => element is NPCNetIdBestiaryInfoElement)) as NPCNetIdBestiaryInfoElement; + if (bestiaryInfoElement1 == null && bestiaryInfoElement2 != null) + return 1; + if (bestiaryInfoElement2 == null && bestiaryInfoElement1 != null) + return -1; + return bestiaryInfoElement1 == null || bestiaryInfoElement2 == null ? 0 : bestiaryInfoElement1.NetId.CompareTo(bestiaryInfoElement2.NetId); + } + + public string GetDisplayNameKey() => "BestiaryInfo.Sort_ID"; + } + + public class ByUnlockState : + IBestiarySortStep, + IEntrySortStep, + IComparer + { + public bool HiddenFromSortOptions => true; + + public int Compare(BestiaryEntry x, BestiaryEntry y) + { + BestiaryUICollectionInfo uiCollectionInfo1 = x.UIInfoProvider.GetEntryUICollectionInfo(); + BestiaryUICollectionInfo uiCollectionInfo2 = y.UIInfoProvider.GetEntryUICollectionInfo(); + return y.Icon.GetUnlockState(uiCollectionInfo2).CompareTo(x.Icon.GetUnlockState(uiCollectionInfo1)); + } + + public string GetDisplayNameKey() => "BestiaryInfo.Sort_Unlocks"; + } + + public class ByBestiarySortingId : + IBestiarySortStep, + IEntrySortStep, + IComparer + { + public bool HiddenFromSortOptions => false; + + public int Compare(BestiaryEntry x, BestiaryEntry y) + { + NPCNetIdBestiaryInfoElement bestiaryInfoElement1 = x.Info.FirstOrDefault((Func) (element => element is NPCNetIdBestiaryInfoElement)) as NPCNetIdBestiaryInfoElement; + NPCNetIdBestiaryInfoElement bestiaryInfoElement2 = y.Info.FirstOrDefault((Func) (element => element is NPCNetIdBestiaryInfoElement)) as NPCNetIdBestiaryInfoElement; + if (bestiaryInfoElement1 == null && bestiaryInfoElement2 != null) + return 1; + if (bestiaryInfoElement2 == null && bestiaryInfoElement1 != null) + return -1; + return bestiaryInfoElement1 == null || bestiaryInfoElement2 == null ? 0 : ContentSamples.NpcBestiarySortingId[bestiaryInfoElement1.NetId].CompareTo(ContentSamples.NpcBestiarySortingId[bestiaryInfoElement2.NetId]); + } + + public string GetDisplayNameKey() => "BestiaryInfo.Sort_BestiaryID"; + } + + public class ByBestiaryRarity : + IBestiarySortStep, + IEntrySortStep, + IComparer + { + public bool HiddenFromSortOptions => false; + + public int Compare(BestiaryEntry x, BestiaryEntry y) + { + NPCNetIdBestiaryInfoElement bestiaryInfoElement1 = x.Info.FirstOrDefault((Func) (element => element is NPCNetIdBestiaryInfoElement)) as NPCNetIdBestiaryInfoElement; + NPCNetIdBestiaryInfoElement bestiaryInfoElement2 = y.Info.FirstOrDefault((Func) (element => element is NPCNetIdBestiaryInfoElement)) as NPCNetIdBestiaryInfoElement; + if (bestiaryInfoElement1 == null && bestiaryInfoElement2 != null) + return 1; + if (bestiaryInfoElement2 == null && bestiaryInfoElement1 != null) + return -1; + if (bestiaryInfoElement1 == null || bestiaryInfoElement2 == null) + return 0; + int bestiaryRarityStar = ContentSamples.NpcBestiaryRarityStars[bestiaryInfoElement1.NetId]; + return ContentSamples.NpcBestiaryRarityStars[bestiaryInfoElement2.NetId].CompareTo(bestiaryRarityStar); + } + + public string GetDisplayNameKey() => "BestiaryInfo.Sort_Rarity"; + } + + public class Alphabetical : + IBestiarySortStep, + IEntrySortStep, + IComparer + { + public bool HiddenFromSortOptions => false; + + public int Compare(BestiaryEntry x, BestiaryEntry y) + { + NPCNetIdBestiaryInfoElement bestiaryInfoElement1 = x.Info.FirstOrDefault((Func) (element => element is NPCNetIdBestiaryInfoElement)) as NPCNetIdBestiaryInfoElement; + NPCNetIdBestiaryInfoElement bestiaryInfoElement2 = y.Info.FirstOrDefault((Func) (element => element is NPCNetIdBestiaryInfoElement)) as NPCNetIdBestiaryInfoElement; + if (bestiaryInfoElement1 == null && bestiaryInfoElement2 != null) + return 1; + if (bestiaryInfoElement2 == null && bestiaryInfoElement1 != null) + return -1; + return bestiaryInfoElement1 == null || bestiaryInfoElement2 == null ? 0 : Language.GetTextValue(ContentSamples.NpcsByNetId[bestiaryInfoElement1.NetId].TypeName).CompareTo(Language.GetTextValue(ContentSamples.NpcsByNetId[bestiaryInfoElement2.NetId].TypeName)); + } + + public string GetDisplayNameKey() => "BestiaryInfo.Sort_Alphabetical"; + } + + public abstract class ByStat : + IBestiarySortStep, + IEntrySortStep, + IComparer + { + public bool HiddenFromSortOptions => false; + + public int Compare(BestiaryEntry x, BestiaryEntry y) + { + NPCStatsReportInfoElement cardX = x.Info.FirstOrDefault((Func) (element => this.IsAStatsCardINeed(element, Main.GameMode))) as NPCStatsReportInfoElement; + NPCStatsReportInfoElement cardY = y.Info.FirstOrDefault((Func) (element => this.IsAStatsCardINeed(element, Main.GameMode))) as NPCStatsReportInfoElement; + if (cardX == null && cardY != null) + return 1; + if (cardY == null && cardX != null) + return -1; + return cardX == null || cardY == null ? 0 : this.Compare(cardX, cardY); + } + + public abstract int Compare(NPCStatsReportInfoElement cardX, NPCStatsReportInfoElement cardY); + + public abstract string GetDisplayNameKey(); + + private bool IsAStatsCardINeed(IBestiaryInfoElement element, int gameMode) => element is NPCStatsReportInfoElement reportInfoElement && reportInfoElement.GameMode == gameMode; + } + + public class ByAttack : SortingSteps.ByStat + { + public override int Compare(NPCStatsReportInfoElement cardX, NPCStatsReportInfoElement cardY) => cardY.Damage.CompareTo(cardX.Damage); + + public override string GetDisplayNameKey() => "BestiaryInfo.Sort_Attack"; + } + + public class ByDefense : SortingSteps.ByStat + { + public override int Compare(NPCStatsReportInfoElement cardX, NPCStatsReportInfoElement cardY) => cardY.Defense.CompareTo(cardX.Defense); + + public override string GetDisplayNameKey() => "BestiaryInfo.Sort_Defense"; + } + + public class ByCoins : SortingSteps.ByStat + { + public override int Compare(NPCStatsReportInfoElement cardX, NPCStatsReportInfoElement cardY) => cardY.MonetaryValue.CompareTo(cardX.MonetaryValue); + + public override string GetDisplayNameKey() => "BestiaryInfo.Sort_Coins"; + } + + public class ByHP : SortingSteps.ByStat + { + public override int Compare(NPCStatsReportInfoElement cardX, NPCStatsReportInfoElement cardY) => cardY.LifeMax.CompareTo(cardX.LifeMax); + + public override string GetDisplayNameKey() => "BestiaryInfo.Sort_HitPoints"; + } + } +} diff --git a/GameContent/Bestiary/SpawnConditionBestiaryInfoElement.cs b/GameContent/Bestiary/SpawnConditionBestiaryInfoElement.cs new file mode 100644 index 0000000..8a4c366 --- /dev/null +++ b/GameContent/Bestiary/SpawnConditionBestiaryInfoElement.cs @@ -0,0 +1,35 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.SpawnConditionBestiaryInfoElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; + +namespace Terraria.GameContent.Bestiary +{ + public class SpawnConditionBestiaryInfoElement : + FilterProviderInfoElement, + IBestiaryBackgroundImagePathAndColorProvider + { + private string _backgroundImagePath; + private Color? _backgroundColor; + + public SpawnConditionBestiaryInfoElement( + string nameLanguageKey, + int filterIconFrame, + string backgroundImagePath = null, + Color? backgroundColor = null) + : base(nameLanguageKey, filterIconFrame) + { + this._backgroundImagePath = backgroundImagePath; + this._backgroundColor = backgroundColor; + } + + public Asset GetBackgroundImage() => this._backgroundImagePath == null ? (Asset) null : Main.Assets.Request(this._backgroundImagePath, (AssetRequestMode) 1); + + public Color? GetBackgroundColor() => this._backgroundColor; + } +} diff --git a/GameContent/Bestiary/SpawnConditionBestiaryOverlayInfoElement.cs b/GameContent/Bestiary/SpawnConditionBestiaryOverlayInfoElement.cs new file mode 100644 index 0000000..0b3c14a --- /dev/null +++ b/GameContent/Bestiary/SpawnConditionBestiaryOverlayInfoElement.cs @@ -0,0 +1,37 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.SpawnConditionBestiaryOverlayInfoElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; + +namespace Terraria.GameContent.Bestiary +{ + public class SpawnConditionBestiaryOverlayInfoElement : + FilterProviderInfoElement, + IBestiaryBackgroundOverlayAndColorProvider + { + private string _overlayImagePath; + private Color? _overlayColor; + + public float DisplayPriority { get; set; } + + public SpawnConditionBestiaryOverlayInfoElement( + string nameLanguageKey, + int filterIconFrame, + string overlayImagePath = null, + Color? overlayColor = null) + : base(nameLanguageKey, filterIconFrame) + { + this._overlayImagePath = overlayImagePath; + this._overlayColor = overlayColor; + } + + public Asset GetBackgroundOverlayImage() => this._overlayImagePath == null ? (Asset) null : Main.Assets.Request(this._overlayImagePath, (AssetRequestMode) 1); + + public Color? GetBackgroundOverlayColor() => this._overlayColor; + } +} diff --git a/GameContent/Bestiary/SpawnConditionDecorativeOverlayInfoElement.cs b/GameContent/Bestiary/SpawnConditionDecorativeOverlayInfoElement.cs new file mode 100644 index 0000000..bb50c0d --- /dev/null +++ b/GameContent/Bestiary/SpawnConditionDecorativeOverlayInfoElement.cs @@ -0,0 +1,35 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.SpawnConditionDecorativeOverlayInfoElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class SpawnConditionDecorativeOverlayInfoElement : + IBestiaryInfoElement, + IBestiaryBackgroundOverlayAndColorProvider + { + private string _overlayImagePath; + private Color? _overlayColor; + + public float DisplayPriority { get; set; } + + public SpawnConditionDecorativeOverlayInfoElement(string overlayImagePath = null, Color? overlayColor = null) + { + this._overlayImagePath = overlayImagePath; + this._overlayColor = overlayColor; + } + + public Asset GetBackgroundOverlayImage() => this._overlayImagePath == null ? (Asset) null : Main.Assets.Request(this._overlayImagePath, (AssetRequestMode) 1); + + public Color? GetBackgroundOverlayColor() => this._overlayColor; + + public UIElement ProvideUIElement(BestiaryUICollectionInfo info) => (UIElement) null; + } +} diff --git a/GameContent/Bestiary/TownNPCUICollectionInfoProvider.cs b/GameContent/Bestiary/TownNPCUICollectionInfoProvider.cs new file mode 100644 index 0000000..402f933 --- /dev/null +++ b/GameContent/Bestiary/TownNPCUICollectionInfoProvider.cs @@ -0,0 +1,24 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.TownNPCUICollectionInfoProvider +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class TownNPCUICollectionInfoProvider : IBestiaryUICollectionInfoProvider + { + private string _persistentIdentifierToCheck; + + public TownNPCUICollectionInfoProvider(string persistentId) => this._persistentIdentifierToCheck = persistentId; + + public BestiaryUICollectionInfo GetEntryUICollectionInfo() => new BestiaryUICollectionInfo() + { + UnlockState = Main.BestiaryTracker.Chats.GetWasChatWith(this._persistentIdentifierToCheck) ? BestiaryEntryUnlockState.CanShowDropsWithDropRates_4 : BestiaryEntryUnlockState.NotKnownAtAll_0 + }; + + public UIElement ProvideUIElement(BestiaryUICollectionInfo info) => (UIElement) null; + } +} diff --git a/GameContent/Bestiary/UnlockProgressDisplayBestiaryInfoElement.cs b/GameContent/Bestiary/UnlockProgressDisplayBestiaryInfoElement.cs new file mode 100644 index 0000000..947ad7c --- /dev/null +++ b/GameContent/Bestiary/UnlockProgressDisplayBestiaryInfoElement.cs @@ -0,0 +1,70 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.UnlockProgressDisplayBestiaryInfoElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.GameContent.UI.Elements; +using Terraria.UI; + +namespace Terraria.GameContent.Bestiary +{ + public class UnlockProgressDisplayBestiaryInfoElement : IBestiaryInfoElement + { + private BestiaryUnlockProgressReport _progressReport; + private UIElement _text1; + private UIElement _text2; + + public UnlockProgressDisplayBestiaryInfoElement(BestiaryUnlockProgressReport progressReport) => this._progressReport = progressReport; + + public UIElement ProvideUIElement(BestiaryUICollectionInfo info) + { + UIPanel uiPanel = new UIPanel(Main.Assets.Request("Images/UI/Bestiary/Stat_Panel", (AssetRequestMode) 1), (Asset) null, customBarSize: 7); + uiPanel.Width = new StyleDimension(-11f, 1f); + uiPanel.Height = new StyleDimension(109f, 0.0f); + uiPanel.BackgroundColor = new Color(43, 56, 101); + uiPanel.BorderColor = Color.Transparent; + uiPanel.Left = new StyleDimension(3f, 0.0f); + UIElement container = (UIElement) uiPanel; + container.PaddingLeft = 4f; + container.PaddingRight = 4f; + string text1 = string.Format("{0} Entry Collected", (object) Utils.PrettifyPercentDisplay((float) info.UnlockState / 4f, "P2")); + string text2 = string.Format("{0} Bestiary Collected", (object) Utils.PrettifyPercentDisplay(this._progressReport.CompletionPercent, "P2")); + int num = 8; + UIText uiText1 = new UIText(text1, 0.8f); + uiText1.HAlign = 0.0f; + uiText1.VAlign = 0.0f; + uiText1.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + uiText1.Height = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + uiText1.IsWrapped = true; + uiText1.PaddingTop = (float) -num; + uiText1.PaddingBottom = (float) -num; + UIText text3 = uiText1; + UIText uiText2 = new UIText(text2, 0.8f); + uiText2.HAlign = 0.0f; + uiText2.VAlign = 0.0f; + uiText2.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + uiText2.Height = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + uiText2.IsWrapped = true; + uiText2.PaddingTop = (float) -num; + uiText2.PaddingBottom = (float) -num; + UIText uiText3 = uiText2; + this._text1 = (UIElement) text3; + this._text2 = (UIElement) uiText3; + this.AddDynamicResize(container, text3); + container.Append((UIElement) text3); + container.Append((UIElement) uiText3); + return container; + } + + private void AddDynamicResize(UIElement container, UIText text) => text.OnInternalTextChange += (Action) (() => + { + container.Height = new StyleDimension(this._text1.MinHeight.Pixels + 4f + this._text2.MinHeight.Pixels, 0.0f); + this._text2.Top = new StyleDimension(this._text1.MinHeight.Pixels + 4f, 0.0f); + }); + } +} diff --git a/GameContent/Bestiary/UnlockableNPCEntryIcon.cs b/GameContent/Bestiary/UnlockableNPCEntryIcon.cs new file mode 100644 index 0000000..9c00ed4 --- /dev/null +++ b/GameContent/Bestiary/UnlockableNPCEntryIcon.cs @@ -0,0 +1,208 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Bestiary.UnlockableNPCEntryIcon +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.ID; +using Terraria.Localization; + +namespace Terraria.GameContent.Bestiary +{ + public class UnlockableNPCEntryIcon : IEntryIcon + { + private int _npcNetId; + private NPC _npcCache; + private bool _firstUpdateDone; + private Asset _customTexture; + private Vector2 _positionOffsetCache; + private string _overrideNameKey; + + public UnlockableNPCEntryIcon( + int npcNetId, + float ai0 = 0.0f, + float ai1 = 0.0f, + float ai2 = 0.0f, + float ai3 = 0.0f, + string overrideNameKey = null) + { + this._npcNetId = npcNetId; + this._npcCache = new NPC(); + this._npcCache.SetDefaults(this._npcNetId); + this._npcCache.IsABestiaryIconDummy = true; + this._firstUpdateDone = false; + this._npcCache.ai[0] = ai0; + this._npcCache.ai[1] = ai1; + this._npcCache.ai[2] = ai2; + this._npcCache.ai[3] = ai3; + this._customTexture = (Asset) null; + this._overrideNameKey = overrideNameKey; + } + + public IEntryIcon CreateClone() => (IEntryIcon) new UnlockableNPCEntryIcon(this._npcNetId, overrideNameKey: this._overrideNameKey); + + public void Update( + BestiaryUICollectionInfo providedInfo, + Rectangle hitbox, + EntryIconDrawSettings settings) + { + Vector2 vector2 = new Vector2(); + int? nullable1 = new int?(); + int? nullable2 = new int?(); + int? nullable3 = new int?(); + bool flag = false; + float velocity = 0.0f; + Asset asset = (Asset) null; + NPCID.Sets.NPCBestiaryDrawModifiers bestiaryDrawModifiers; + if (NPCID.Sets.NPCBestiaryDrawOffset.TryGetValue(this._npcNetId, out bestiaryDrawModifiers)) + { + this._npcCache.rotation = bestiaryDrawModifiers.Rotation; + this._npcCache.scale = bestiaryDrawModifiers.Scale; + if (bestiaryDrawModifiers.PortraitScale.HasValue && settings.IsPortrait) + this._npcCache.scale = bestiaryDrawModifiers.PortraitScale.Value; + vector2 = bestiaryDrawModifiers.Position; + nullable1 = bestiaryDrawModifiers.Frame; + nullable2 = bestiaryDrawModifiers.Direction; + nullable3 = bestiaryDrawModifiers.SpriteDirection; + velocity = bestiaryDrawModifiers.Velocity; + flag = bestiaryDrawModifiers.IsWet; + if (bestiaryDrawModifiers.PortraitPositionXOverride.HasValue && settings.IsPortrait) + vector2.X = bestiaryDrawModifiers.PortraitPositionXOverride.Value; + if (bestiaryDrawModifiers.PortraitPositionYOverride.HasValue && settings.IsPortrait) + vector2.Y = bestiaryDrawModifiers.PortraitPositionYOverride.Value; + if (bestiaryDrawModifiers.CustomTexturePath != null) + asset = Main.Assets.Request(bestiaryDrawModifiers.CustomTexturePath, (AssetRequestMode) 1); + if (asset != null && asset.IsLoaded) + this._customTexture = asset; + } + this._positionOffsetCache = vector2; + this.UpdatePosition(settings); + if (NPCID.Sets.TrailingMode[this._npcCache.type] != -1) + { + for (int index = 0; index < this._npcCache.oldPos.Length; ++index) + this._npcCache.oldPos[index] = this._npcCache.position; + } + this._npcCache.direction = this._npcCache.spriteDirection = nullable2.HasValue ? nullable2.Value : -1; + if (nullable3.HasValue) + this._npcCache.spriteDirection = nullable3.Value; + this._npcCache.wet = flag; + this.AdjustSpecialSpawnRulesForVisuals(settings); + this.SimulateFirstHover(velocity); + if (!nullable1.HasValue && (settings.IsPortrait || settings.IsHovered)) + { + this._npcCache.velocity.X = (float) this._npcCache.direction * velocity; + this._npcCache.FindFrame(); + } + else + { + if (!nullable1.HasValue) + return; + this._npcCache.FindFrame(); + this._npcCache.frame.Y = this._npcCache.frame.Height * nullable1.Value; + } + } + + private void UpdatePosition(EntryIconDrawSettings settings) + { + if (this._npcCache.noGravity) + this._npcCache.Center = settings.iconbox.Center.ToVector2() + this._positionOffsetCache; + else + this._npcCache.Bottom = settings.iconbox.TopLeft() + settings.iconbox.Size() * new Vector2(0.5f, 1f) + new Vector2(0.0f, -8f) + this._positionOffsetCache; + this._npcCache.position = this._npcCache.position.Floor(); + } + + private void AdjustSpecialSpawnRulesForVisuals(EntryIconDrawSettings settings) + { + int num; + if (NPCID.Sets.SpecialSpawningRules.TryGetValue(this._npcNetId, out num) && num == 0) + { + Point tileCoordinates = (this._npcCache.position - this._npcCache.rotation.ToRotationVector2() * -1600f).ToTileCoordinates(); + this._npcCache.ai[0] = (float) tileCoordinates.X; + this._npcCache.ai[1] = (float) tileCoordinates.Y; + } + switch (this._npcNetId) + { + case 244: + this._npcCache.AI_001_SetRainbowSlimeColor(); + break; + case 299: + case 538: + case 539: + case 639: + case 640: + case 641: + case 642: + case 643: + case 644: + case 645: + if (!settings.IsPortrait || this._npcCache.frame.Y != 0) + break; + this._npcCache.frame.Y = this._npcCache.frame.Height; + break; + case 330: + case 372: + case 586: + case 587: + case 619: + case 620: + this._npcCache.alpha = 0; + break; + case 356: + this._npcCache.ai[2] = 1f; + break; + case 636: + this._npcCache.Opacity = 1f; + if ((double) ++this._npcCache.localAI[0] < 44.0) + break; + this._npcCache.localAI[0] = 0.0f; + break; + case 656: + this._npcCache.townNpcVariationIndex = 1; + break; + } + } + + private void SimulateFirstHover(float velocity) + { + if (this._firstUpdateDone) + return; + this._firstUpdateDone = true; + this._npcCache.SetFrameSize(); + this._npcCache.velocity.X = (float) this._npcCache.direction * velocity; + for (int index = 0; index < 1; ++index) + this._npcCache.FindFrame(); + } + + public void Draw( + BestiaryUICollectionInfo providedInfo, + SpriteBatch spriteBatch, + EntryIconDrawSettings settings) + { + this.UpdatePosition(settings); + if (this._customTexture != null) + { + spriteBatch.Draw(this._customTexture.Value, this._npcCache.Center, new Rectangle?(), Color.White, 0.0f, this._customTexture.Size() / 2f, this._npcCache.scale, SpriteEffects.None, 0.0f); + } + else + { + ITownNPCProfile profile; + if (this._npcCache.townNPC && TownNPCProfiles.Instance.GetProfile(this._npcCache.type, out profile)) + TextureAssets.Npc[this._npcCache.type] = profile.GetTextureNPCShouldUse(this._npcCache); + Main.instance.DrawNPCDirect(spriteBatch, this._npcCache, this._npcCache.behindTiles, Vector2.Zero); + } + } + + public string GetHoverText(BestiaryUICollectionInfo providedInfo) + { + string str = Lang.GetNPCNameValue(this._npcCache.netID); + if (!string.IsNullOrWhiteSpace(this._overrideNameKey)) + str = Language.GetTextValue(this._overrideNameKey); + return this.GetUnlockState(providedInfo) ? str : "???"; + } + + public bool GetUnlockState(BestiaryUICollectionInfo providedInfo) => providedInfo.UnlockState > BestiaryEntryUnlockState.NotKnownAtAll_0; + } +} diff --git a/GameContent/Biomes/CampsiteBiome.cs b/GameContent/Biomes/CampsiteBiome.cs new file mode 100644 index 0000000..d98bece --- /dev/null +++ b/GameContent/Biomes/CampsiteBiome.cs @@ -0,0 +1,88 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.CampsiteBiome +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes +{ + public class CampsiteBiome : MicroBiome + { + public override bool Place(Point origin, StructureMap structures) + { + Ref count1 = new Ref(0); + Ref count2 = new Ref(0); + WorldUtils.Gen(origin, (GenShape) new Shapes.Circle(10), Actions.Chain((GenAction) new Actions.Scanner(count2), (GenAction) new Modifiers.IsSolid(), (GenAction) new Actions.Scanner(count1))); + if (count1.Value < count2.Value - 5) + return false; + int radius = GenBase._random.Next(6, 10); + int num1 = GenBase._random.Next(5); + if (!structures.CanPlace(new Microsoft.Xna.Framework.Rectangle(origin.X - radius, origin.Y - radius, radius * 2, radius * 2))) + return false; + ushort type1 = (ushort) (byte) (196 + WorldGen.genRand.Next(4)); + for (int index1 = origin.X - radius; index1 <= origin.X + radius; ++index1) + { + for (int index2 = origin.Y - radius; index2 <= origin.Y + radius; ++index2) + { + if (Main.tile[index1, index2].active()) + { + int type2 = (int) Main.tile[index1, index2].type; + if (type2 == 53 || type2 == 396 || type2 == 397 || type2 == 404) + type1 = (ushort) 187; + if (type2 == 161 || type2 == 147) + type1 = (ushort) 40; + if (type2 == 60) + type1 = (ushort) (byte) (204 + WorldGen.genRand.Next(4)); + if (type2 == 367) + type1 = (ushort) 178; + if (type2 == 368) + type1 = (ushort) 180; + } + } + } + ShapeData data = new ShapeData(); + WorldUtils.Gen(origin, (GenShape) new Shapes.Slime(radius), Actions.Chain(new Modifiers.Blotches(num1, num1, num1, 1).Output(data), (GenAction) new Modifiers.Offset(0, -2), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + (ushort) 53 + }), (GenAction) new Actions.SetTile((ushort) 397, true), (GenAction) new Modifiers.OnlyWalls(new ushort[1]), (GenAction) new Actions.PlaceWall(type1))); + WorldUtils.Gen(origin, (GenShape) new ModShapes.All(data), Actions.Chain((GenAction) new Actions.ClearTile(), (GenAction) new Actions.SetLiquid(value: (byte) 0), (GenAction) new Actions.SetFrames(true), (GenAction) new Modifiers.OnlyWalls(new ushort[1]), (GenAction) new Actions.PlaceWall(type1))); + Point result; + if (!WorldUtils.Find(origin, Searches.Chain((GenSearch) new Searches.Down(10), (GenCondition) new Conditions.IsSolid()), out result)) + return false; + int j = result.Y - 1; + bool flag = GenBase._random.Next() % 2 == 0; + if (GenBase._random.Next() % 10 != 0) + { + int num2 = GenBase._random.Next(1, 4); + int num3 = flag ? 4 : -(radius >> 1); + for (int index3 = 0; index3 < num2; ++index3) + { + int num4 = GenBase._random.Next(1, 3); + for (int index4 = 0; index4 < num4; ++index4) + WorldGen.PlaceTile(origin.X + num3 - index3, j - index4, 332, true); + } + } + int num5 = (radius - 3) * (flag ? -1 : 1); + if (GenBase._random.Next() % 10 != 0) + WorldGen.PlaceTile(origin.X + num5, j, 186); + if (GenBase._random.Next() % 10 != 0) + { + WorldGen.PlaceTile(origin.X, j, 215, true); + if (GenBase._tiles[origin.X, j].active() && GenBase._tiles[origin.X, j].type == (ushort) 215) + { + GenBase._tiles[origin.X, j].frameY += (short) 36; + GenBase._tiles[origin.X - 1, j].frameY += (short) 36; + GenBase._tiles[origin.X + 1, j].frameY += (short) 36; + GenBase._tiles[origin.X, j - 1].frameY += (short) 36; + GenBase._tiles[origin.X - 1, j - 1].frameY += (short) 36; + GenBase._tiles[origin.X + 1, j - 1].frameY += (short) 36; + } + } + structures.AddProtectedStructure(new Microsoft.Xna.Framework.Rectangle(origin.X - radius, origin.Y - radius, radius * 2, radius * 2), 4); + return true; + } + } +} diff --git a/GameContent/Biomes/CaveHouse/DesertHouseBuilder.cs b/GameContent/Biomes/CaveHouse/DesertHouseBuilder.cs new file mode 100644 index 0000000..3e41085 --- /dev/null +++ b/GameContent/Biomes/CaveHouse/DesertHouseBuilder.cs @@ -0,0 +1,55 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.CaveHouse.DesertHouseBuilder +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria.GameContent.Generation; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes.CaveHouse +{ + public class DesertHouseBuilder : HouseBuilder + { + public DesertHouseBuilder(IEnumerable rooms) + : base(HouseType.Desert, rooms) + { + this.TileType = (ushort) 396; + this.WallType = (ushort) 187; + this.BeamType = (ushort) 577; + this.PlatformStyle = 42; + this.DoorStyle = 43; + this.TableStyle = 7; + this.UsesTables2 = true; + this.WorkbenchStyle = 39; + this.PianoStyle = 38; + this.BookcaseStyle = 39; + this.ChairStyle = 43; + this.ChestStyle = 1; + } + + protected override void AgeRoom(Microsoft.Xna.Framework.Rectangle room) + { + WorldUtils.Gen(new Point(room.X, room.Y), (GenShape) new Shapes.Rectangle(room.Width, room.Height), Actions.Chain((GenAction) new Modifiers.Dither(0.800000011920929), (GenAction) new Modifiers.Blotches(chance: 0.200000002980232), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + this.TileType + }), (GenAction) new Actions.SetTileKeepWall((ushort) 396, true), (GenAction) new Modifiers.Dither(), (GenAction) new Actions.SetTileKeepWall((ushort) 397, true))); + WorldUtils.Gen(new Point(room.X + 1, room.Y), (GenShape) new Shapes.Rectangle(room.Width - 2, 1), Actions.Chain((GenAction) new Modifiers.Dither(), (GenAction) new Modifiers.OnlyTiles(new ushort[2] + { + (ushort) 397, + (ushort) 396 + }), (GenAction) new Modifiers.Offset(0, 1), (GenAction) new ActionStalagtite())); + WorldUtils.Gen(new Point(room.X + 1, room.Y + room.Height - 1), (GenShape) new Shapes.Rectangle(room.Width - 2, 1), Actions.Chain((GenAction) new Modifiers.Dither(), (GenAction) new Modifiers.OnlyTiles(new ushort[2] + { + (ushort) 397, + (ushort) 396 + }), (GenAction) new Modifiers.Offset(0, 1), (GenAction) new ActionStalagtite())); + WorldUtils.Gen(new Point(room.X, room.Y), (GenShape) new Shapes.Rectangle(room.Width, room.Height), Actions.Chain((GenAction) new Modifiers.Dither(0.800000011920929), (GenAction) new Modifiers.Blotches(), (GenAction) new Modifiers.OnlyWalls(new ushort[1] + { + this.WallType + }), (GenAction) new Actions.PlaceWall((ushort) 216))); + } + } +} diff --git a/GameContent/Biomes/CaveHouse/GraniteHouseBuilder.cs b/GameContent/Biomes/CaveHouse/GraniteHouseBuilder.cs new file mode 100644 index 0000000..59351e6 --- /dev/null +++ b/GameContent/Biomes/CaveHouse/GraniteHouseBuilder.cs @@ -0,0 +1,49 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.CaveHouse.GraniteHouseBuilder +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria.GameContent.Generation; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes.CaveHouse +{ + public class GraniteHouseBuilder : HouseBuilder + { + public GraniteHouseBuilder(IEnumerable rooms) + : base(HouseType.Granite, rooms) + { + this.TileType = (ushort) 369; + this.WallType = (ushort) 181; + this.BeamType = (ushort) 576; + this.PlatformStyle = 28; + this.DoorStyle = 34; + this.TableStyle = 33; + this.WorkbenchStyle = 29; + this.PianoStyle = 28; + this.BookcaseStyle = 30; + this.ChairStyle = 34; + this.ChestStyle = 50; + } + + protected override void AgeRoom(Microsoft.Xna.Framework.Rectangle room) + { + WorldUtils.Gen(new Point(room.X, room.Y), (GenShape) new Shapes.Rectangle(room.Width, room.Height), Actions.Chain((GenAction) new Modifiers.Dither(0.600000023841858), (GenAction) new Modifiers.Blotches(chance: 0.600000023841858), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + this.TileType + }), (GenAction) new Actions.SetTileKeepWall((ushort) 368, true))); + WorldUtils.Gen(new Point(room.X + 1, room.Y), (GenShape) new Shapes.Rectangle(room.Width - 2, 1), Actions.Chain((GenAction) new Modifiers.Dither(0.800000011920929), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + (ushort) 368 + }), (GenAction) new Modifiers.Offset(0, 1), (GenAction) new ActionStalagtite())); + WorldUtils.Gen(new Point(room.X + 1, room.Y + room.Height - 1), (GenShape) new Shapes.Rectangle(room.Width - 2, 1), Actions.Chain((GenAction) new Modifiers.Dither(0.800000011920929), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + (ushort) 368 + }), (GenAction) new Modifiers.Offset(0, 1), (GenAction) new ActionStalagtite())); + WorldUtils.Gen(new Point(room.X, room.Y), (GenShape) new Shapes.Rectangle(room.Width, room.Height), Actions.Chain((GenAction) new Modifiers.Dither(0.850000023841858), (GenAction) new Modifiers.Blotches(), (GenAction) new Actions.PlaceWall((ushort) 180))); + } + } +} diff --git a/GameContent/Biomes/CaveHouse/HouseBuilder.cs b/GameContent/Biomes/CaveHouse/HouseBuilder.cs new file mode 100644 index 0000000..6d177c2 --- /dev/null +++ b/GameContent/Biomes/CaveHouse/HouseBuilder.cs @@ -0,0 +1,441 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.CaveHouse.HouseBuilder +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using Terraria.Utilities; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes.CaveHouse +{ + public class HouseBuilder + { + private const int VERTICAL_EXIT_WIDTH = 3; + public static readonly HouseBuilder Invalid = new HouseBuilder(); + public readonly HouseType Type; + public readonly bool IsValid; + protected ushort[] SkipTilesDuringWallAging = new ushort[5] + { + (ushort) 245, + (ushort) 246, + (ushort) 240, + (ushort) 241, + (ushort) 242 + }; + + public float ChestChance { get; set; } + + public ushort TileType { get; protected set; } + + public ushort WallType { get; protected set; } + + public ushort BeamType { get; protected set; } + + public int PlatformStyle { get; protected set; } + + public int DoorStyle { get; protected set; } + + public int TableStyle { get; protected set; } + + public bool UsesTables2 { get; protected set; } + + public int WorkbenchStyle { get; protected set; } + + public int PianoStyle { get; protected set; } + + public int BookcaseStyle { get; protected set; } + + public int ChairStyle { get; protected set; } + + public int ChestStyle { get; protected set; } + + public ReadOnlyCollection Rooms { get; private set; } + + public Microsoft.Xna.Framework.Rectangle TopRoom => this.Rooms.First(); + + public Microsoft.Xna.Framework.Rectangle BottomRoom => this.Rooms.Last(); + + private UnifiedRandom _random => WorldGen.genRand; + + private Tile[,] _tiles => Main.tile; + + private HouseBuilder() => this.IsValid = false; + + protected HouseBuilder(HouseType type, IEnumerable rooms) + { + this.Type = type; + this.IsValid = true; + List list = rooms.ToList(); + list.Sort((Comparison) ((lhs, rhs) => lhs.Top.CompareTo(rhs.Top))); + this.Rooms = list.AsReadOnly(); + } + + protected virtual void AgeRoom(Microsoft.Xna.Framework.Rectangle room) + { + } + + public void Place(HouseBuilderContext context, StructureMap structures) + { + this.PlaceEmptyRooms(); + foreach (Microsoft.Xna.Framework.Rectangle room in this.Rooms) + structures.AddProtectedStructure(room, 8); + this.PlaceStairs(); + this.PlaceDoors(); + this.PlacePlatforms(); + this.PlaceSupportBeams(); + this.FillRooms(); + foreach (Microsoft.Xna.Framework.Rectangle room in this.Rooms) + this.AgeRoom(room); + this.PlaceChests(); + this.PlaceBiomeSpecificTool(context); + } + + private void PlaceEmptyRooms() + { + foreach (Microsoft.Xna.Framework.Rectangle room in this.Rooms) + { + WorldUtils.Gen(new Point(room.X, room.Y), (GenShape) new Shapes.Rectangle(room.Width, room.Height), Actions.Chain((GenAction) new Actions.SetTileKeepWall(this.TileType), (GenAction) new Actions.SetFrames(true))); + WorldUtils.Gen(new Point(room.X + 1, room.Y + 1), (GenShape) new Shapes.Rectangle(room.Width - 2, room.Height - 2), Actions.Chain((GenAction) new Actions.ClearTile(true), (GenAction) new Actions.PlaceWall(this.WallType))); + } + } + + private void FillRooms() + { + int x1 = 14; + if (this.UsesTables2) + x1 = 469; + Point[] pointArray = new Point[7] + { + new Point(x1, this.TableStyle), + new Point(16, 0), + new Point(18, this.WorkbenchStyle), + new Point(86, 0), + new Point(87, this.PianoStyle), + new Point(94, 0), + new Point(101, this.BookcaseStyle) + }; + foreach (Microsoft.Xna.Framework.Rectangle room in this.Rooms) + { + int num1 = room.Width / 8; + int num2 = room.Width / (num1 + 1); + int num3 = this._random.Next(2); + for (int index1 = 0; index1 < num1; ++index1) + { + int i = (index1 + 1) * num2 + room.X; + switch (index1 + num3 % 2) + { + case 0: + int j1 = room.Y + Math.Min(room.Height / 2, room.Height - 5); + Vector2 vector2 = this.Type != HouseType.Desert ? WorldGen.randHousePicture() : WorldGen.RandHousePictureDesert(); + int x2 = (int) vector2.X; + int y = (int) vector2.Y; + WorldGen.PlaceTile(i, j1, x2, true, style: y); + break; + case 1: + int j2 = room.Y + 1; + WorldGen.PlaceTile(i, j2, 34, true, style: this._random.Next(6)); + for (int index2 = -1; index2 < 2; ++index2) + { + for (int index3 = 0; index3 < 3; ++index3) + this._tiles[index2 + i, index3 + j2].frameX += (short) 54; + } + break; + } + } + int num4 = room.Width / 8 + 3; + WorldGen.SetupStatueList(); + for (; num4 > 0; --num4) + { + int num5 = this._random.Next(room.Width - 3) + 1 + room.X; + int num6 = room.Y + room.Height - 2; + switch (this._random.Next(4)) + { + case 0: + WorldGen.PlaceSmallPile(num5, num6, this._random.Next(31, 34), 1); + break; + case 1: + WorldGen.PlaceTile(num5, num6, 186, true, style: this._random.Next(22, 26)); + break; + case 2: + int index = this._random.Next(2, WorldGen.statueList.Length); + WorldGen.PlaceTile(num5, num6, (int) WorldGen.statueList[index].X, true, style: ((int) WorldGen.statueList[index].Y)); + if (WorldGen.StatuesWithTraps.Contains(index)) + { + WorldGen.PlaceStatueTrap(num5, num6); + break; + } + break; + case 3: + Point point = Utils.SelectRandom(this._random, pointArray); + WorldGen.PlaceTile(num5, num6, point.X, true, style: point.Y); + break; + } + } + } + } + + private void PlaceStairs() + { + foreach (Tuple stairs in this.CreateStairsList()) + { + Point origin = stairs.Item1; + Point point = stairs.Item2; + int num = point.X > origin.X ? 1 : -1; + ShapeData data = new ShapeData(); + for (int y = 0; y < point.Y - origin.Y; ++y) + data.Add(num * (y + 1), y); + WorldUtils.Gen(origin, (GenShape) new ModShapes.All(data), Actions.Chain((GenAction) new Actions.PlaceTile((ushort) 19, this.PlatformStyle), (GenAction) new Actions.SetSlope(num == 1 ? 1 : 2), (GenAction) new Actions.SetFrames(true))); + WorldUtils.Gen(new Point(origin.X + (num == 1 ? 1 : -4), origin.Y - 1), (GenShape) new Shapes.Rectangle(4, 1), Actions.Chain((GenAction) new Actions.Clear(), (GenAction) new Actions.PlaceWall(this.WallType), (GenAction) new Actions.PlaceTile((ushort) 19, this.PlatformStyle), (GenAction) new Actions.SetFrames(true))); + } + } + + private List> CreateStairsList() + { + List> tupleList = new List>(); + for (int index = 1; index < this.Rooms.Count; ++index) + { + Microsoft.Xna.Framework.Rectangle room1 = this.Rooms[index]; + Microsoft.Xna.Framework.Rectangle room2 = this.Rooms[index - 1]; + if (room2.X - room1.X > room1.X + room1.Width - (room2.X + room2.Width)) + tupleList.Add(new Tuple(new Point(room1.X + room1.Width - 1, room1.Y + 1), new Point(room1.X + room1.Width - room1.Height + 1, room1.Y + room1.Height - 1))); + else + tupleList.Add(new Tuple(new Point(room1.X, room1.Y + 1), new Point(room1.X + room1.Height - 1, room1.Y + room1.Height - 1))); + } + return tupleList; + } + + private void PlaceDoors() + { + foreach (Point door in this.CreateDoorList()) + { + WorldUtils.Gen(door, (GenShape) new Shapes.Rectangle(1, 3), (GenAction) new Actions.ClearTile(true)); + WorldGen.PlaceTile(door.X, door.Y, 10, true, true, style: this.DoorStyle); + } + } + + private List CreateDoorList() + { + List pointList = new List(); + foreach (Microsoft.Xna.Framework.Rectangle room in this.Rooms) + { + int exitY; + if (HouseBuilder.FindSideExit(new Microsoft.Xna.Framework.Rectangle(room.X + room.Width, room.Y + 1, 1, room.Height - 2), false, out exitY)) + pointList.Add(new Point(room.X + room.Width - 1, exitY)); + if (HouseBuilder.FindSideExit(new Microsoft.Xna.Framework.Rectangle(room.X, room.Y + 1, 1, room.Height - 2), true, out exitY)) + pointList.Add(new Point(room.X, exitY)); + } + return pointList; + } + + private void PlacePlatforms() + { + foreach (Point platforms in this.CreatePlatformsList()) + WorldUtils.Gen(platforms, (GenShape) new Shapes.Rectangle(3, 1), Actions.Chain((GenAction) new Actions.ClearMetadata(), (GenAction) new Actions.PlaceTile((ushort) 19, this.PlatformStyle), (GenAction) new Actions.SetFrames(true))); + } + + private List CreatePlatformsList() + { + List pointList = new List(); + Microsoft.Xna.Framework.Rectangle topRoom = this.TopRoom; + Microsoft.Xna.Framework.Rectangle bottomRoom = this.BottomRoom; + int exitX; + if (HouseBuilder.FindVerticalExit(new Microsoft.Xna.Framework.Rectangle(topRoom.X + 2, topRoom.Y, topRoom.Width - 4, 1), true, out exitX)) + pointList.Add(new Point(exitX, topRoom.Y)); + if (HouseBuilder.FindVerticalExit(new Microsoft.Xna.Framework.Rectangle(bottomRoom.X + 2, bottomRoom.Y + bottomRoom.Height - 1, bottomRoom.Width - 4, 1), false, out exitX)) + pointList.Add(new Point(exitX, bottomRoom.Y + bottomRoom.Height - 1)); + return pointList; + } + + private void PlaceSupportBeams() + { + foreach (Microsoft.Xna.Framework.Rectangle supportBeam in this.CreateSupportBeamList()) + { + if (supportBeam.Height > 1 && this._tiles[supportBeam.X, supportBeam.Y - 1].type != (ushort) 19) + { + WorldUtils.Gen(new Point(supportBeam.X, supportBeam.Y), (GenShape) new Shapes.Rectangle(supportBeam.Width, supportBeam.Height), Actions.Chain((GenAction) new Actions.SetTileKeepWall(this.BeamType), (GenAction) new Actions.SetFrames(true))); + Tile tile = this._tiles[supportBeam.X, supportBeam.Y + supportBeam.Height]; + tile.slope((byte) 0); + tile.halfBrick(false); + } + } + } + + private List CreateSupportBeamList() + { + List rectangleList = new List(); + int num1 = this.Rooms.Min((Func) (room => room.Left)); + int num2 = this.Rooms.Max((Func) (room => room.Right)) - 1; + int num3 = 6; + while (num3 > 4 && (num2 - num1) % num3 != 0) + --num3; + for (int x = num1; x <= num2; x += num3) + { + for (int index1 = 0; index1 < this.Rooms.Count; ++index1) + { + Microsoft.Xna.Framework.Rectangle room = this.Rooms[index1]; + if (x >= room.X && x < room.X + room.Width) + { + int y = room.Y + room.Height; + int num4 = 50; + for (int index2 = index1 + 1; index2 < this.Rooms.Count; ++index2) + { + if (x >= this.Rooms[index2].X && x < this.Rooms[index2].X + this.Rooms[index2].Width) + num4 = Math.Min(num4, this.Rooms[index2].Y - y); + } + if (num4 > 0) + { + Point result; + bool flag = WorldUtils.Find(new Point(x, y), Searches.Chain((GenSearch) new Searches.Down(num4), (GenCondition) new Conditions.IsSolid()), out result); + if (num4 < 50) + { + flag = true; + result = new Point(x, y + num4); + } + if (flag) + rectangleList.Add(new Microsoft.Xna.Framework.Rectangle(x, y, 1, result.Y - y)); + } + } + } + } + return rectangleList; + } + + private static bool FindVerticalExit(Microsoft.Xna.Framework.Rectangle wall, bool isUp, out int exitX) + { + Point result; + int num = WorldUtils.Find(new Point(wall.X + wall.Width - 3, wall.Y + (isUp ? -5 : 0)), Searches.Chain((GenSearch) new Searches.Left(wall.Width - 3), new Conditions.IsSolid().Not().AreaOr(3, 5)), out result) ? 1 : 0; + exitX = result.X; + return num != 0; + } + + private static bool FindSideExit(Microsoft.Xna.Framework.Rectangle wall, bool isLeft, out int exitY) + { + Point result; + int num = WorldUtils.Find(new Point(wall.X + (isLeft ? -4 : 0), wall.Y + wall.Height - 3), Searches.Chain((GenSearch) new Searches.Up(wall.Height - 3), new Conditions.IsSolid().Not().AreaOr(4, 3)), out result) ? 1 : 0; + exitY = result.Y; + return num != 0; + } + + private void PlaceChests() + { + if ((double) this._random.NextFloat() > (double) this.ChestChance) + return; + bool flag = false; + foreach (Microsoft.Xna.Framework.Rectangle room in this.Rooms) + { + int j = room.Height - 1 + room.Y; + int Style = j > (int) Main.worldSurface ? this.ChestStyle : 0; + int num = 0; + while (num < 10 && !(flag = WorldGen.AddBuriedChest(this._random.Next(2, room.Width - 2) + room.X, j, Style: Style))) + ++num; + if (!flag) + { + int i = room.X + 2; + while (i <= room.X + room.Width - 2 && !(flag = WorldGen.AddBuriedChest(i, j, Style: Style))) + ++i; + if (flag) + break; + } + else + break; + } + if (!flag) + { + foreach (Microsoft.Xna.Framework.Rectangle room in this.Rooms) + { + int j = room.Y - 1; + int Style = j > (int) Main.worldSurface ? this.ChestStyle : 0; + int num = 0; + while (num < 10 && !(flag = WorldGen.AddBuriedChest(this._random.Next(2, room.Width - 2) + room.X, j, Style: Style))) + ++num; + if (!flag) + { + int i = room.X + 2; + while (i <= room.X + room.Width - 2 && !(flag = WorldGen.AddBuriedChest(i, j, Style: Style))) + ++i; + if (flag) + break; + } + else + break; + } + } + if (flag) + return; + for (int index = 0; index < 1000; ++index) + { + int i = this._random.Next(this.Rooms[0].X - 30, this.Rooms[0].X + 30); + int num1 = this._random.Next(this.Rooms[0].Y - 30, this.Rooms[0].Y + 30); + int num2 = num1 > (int) Main.worldSurface ? this.ChestStyle : 0; + int j = num1; + int Style = num2; + if (WorldGen.AddBuriedChest(i, j, Style: Style)) + break; + } + } + + private void PlaceBiomeSpecificTool(HouseBuilderContext context) + { + if (this.Type == HouseType.Jungle && context.SharpenerCount < this._random.Next(2, 5)) + { + bool flag = false; + foreach (Microsoft.Xna.Framework.Rectangle room in this.Rooms) + { + int j = room.Height - 2 + room.Y; + for (int index = 0; index < 10; ++index) + { + int i = this._random.Next(2, room.Width - 2) + room.X; + WorldGen.PlaceTile(i, j, 377, true, true); + if (flag = this._tiles[i, j].active() && this._tiles[i, j].type == (ushort) 377) + break; + } + if (!flag) + { + int i = room.X + 2; + while (i <= room.X + room.Width - 2 && !(flag = WorldGen.PlaceTile(i, j, 377, true, true))) + ++i; + if (flag) + break; + } + else + break; + } + if (flag) + ++context.SharpenerCount; + } + if (this.Type != HouseType.Desert || context.ExtractinatorCount >= this._random.Next(2, 5)) + return; + bool flag1 = false; + foreach (Microsoft.Xna.Framework.Rectangle room in this.Rooms) + { + int j = room.Height - 2 + room.Y; + for (int index = 0; index < 10; ++index) + { + int i = this._random.Next(2, room.Width - 2) + room.X; + WorldGen.PlaceTile(i, j, 219, true, true); + if (flag1 = this._tiles[i, j].active() && this._tiles[i, j].type == (ushort) 219) + break; + } + if (!flag1) + { + int i = room.X + 2; + while (i <= room.X + room.Width - 2 && !(flag1 = WorldGen.PlaceTile(i, j, 219, true, true))) + ++i; + if (flag1) + break; + } + else + break; + } + if (!flag1) + return; + ++context.ExtractinatorCount; + } + } +} diff --git a/GameContent/Biomes/CaveHouse/HouseBuilderContext.cs b/GameContent/Biomes/CaveHouse/HouseBuilderContext.cs new file mode 100644 index 0000000..16c4012 --- /dev/null +++ b/GameContent/Biomes/CaveHouse/HouseBuilderContext.cs @@ -0,0 +1,14 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.CaveHouse.HouseBuilderContext +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Biomes.CaveHouse +{ + public class HouseBuilderContext + { + public int SharpenerCount; + public int ExtractinatorCount; + } +} diff --git a/GameContent/Biomes/CaveHouse/HouseType.cs b/GameContent/Biomes/CaveHouse/HouseType.cs new file mode 100644 index 0000000..9591029 --- /dev/null +++ b/GameContent/Biomes/CaveHouse/HouseType.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.CaveHouse.HouseType +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Biomes.CaveHouse +{ + public enum HouseType + { + Wood, + Ice, + Desert, + Jungle, + Mushroom, + Granite, + Marble, + } +} diff --git a/GameContent/Biomes/CaveHouse/HouseUtils.cs b/GameContent/Biomes/CaveHouse/HouseUtils.cs new file mode 100644 index 0000000..df819d5 --- /dev/null +++ b/GameContent/Biomes/CaveHouse/HouseUtils.cs @@ -0,0 +1,180 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.CaveHouse.HouseUtils +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.ID; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes.CaveHouse +{ + public static class HouseUtils + { + private static readonly bool[] BlacklistedTiles = TileID.Sets.Factory.CreateBoolSet(true, 225, 41, 43, 44, 226, 203, 112, 25, 151); + private static readonly bool[] BeelistedTiles = TileID.Sets.Factory.CreateBoolSet(true, 41, 43, 44, 226, 203, 112, 25, 151); + + public static HouseBuilder CreateBuilder(Point origin, StructureMap structures) + { + List rooms = HouseUtils.CreateRooms(origin); + if (rooms.Count == 0 || !HouseUtils.AreRoomLocationsValid((IEnumerable) rooms)) + return HouseBuilder.Invalid; + HouseType houseType = HouseUtils.GetHouseType((IEnumerable) rooms); + if (!HouseUtils.AreRoomsValid((IEnumerable) rooms, structures, houseType)) + return HouseBuilder.Invalid; + switch (houseType) + { + case HouseType.Wood: + return (HouseBuilder) new WoodHouseBuilder((IEnumerable) rooms); + case HouseType.Ice: + return (HouseBuilder) new IceHouseBuilder((IEnumerable) rooms); + case HouseType.Desert: + return (HouseBuilder) new DesertHouseBuilder((IEnumerable) rooms); + case HouseType.Jungle: + return (HouseBuilder) new JungleHouseBuilder((IEnumerable) rooms); + case HouseType.Mushroom: + return (HouseBuilder) new MushroomHouseBuilder((IEnumerable) rooms); + case HouseType.Granite: + return (HouseBuilder) new GraniteHouseBuilder((IEnumerable) rooms); + case HouseType.Marble: + return (HouseBuilder) new MarbleHouseBuilder((IEnumerable) rooms); + default: + return (HouseBuilder) new WoodHouseBuilder((IEnumerable) rooms); + } + } + + private static List CreateRooms(Point origin) + { + Point result; + if (!WorldUtils.Find(origin, Searches.Chain((GenSearch) new Searches.Down(200), (GenCondition) new Conditions.IsSolid()), out result) || result == origin) + return new List(); + Microsoft.Xna.Framework.Rectangle room1 = HouseUtils.FindRoom(result); + Microsoft.Xna.Framework.Rectangle room2 = HouseUtils.FindRoom(new Point(room1.Center.X, room1.Y + 1)); + Microsoft.Xna.Framework.Rectangle room3 = HouseUtils.FindRoom(new Point(room1.Center.X, room1.Y + room1.Height + 10)); + room3.Y = room1.Y + room1.Height - 1; + float roomSolidPrecentage1 = HouseUtils.GetRoomSolidPrecentage(room2); + float roomSolidPrecentage2 = HouseUtils.GetRoomSolidPrecentage(room3); + room1.Y += 3; + room2.Y += 3; + room3.Y += 3; + List rectangleList = new List(); + if ((double) WorldGen.genRand.NextFloat() > (double) roomSolidPrecentage1 + 0.200000002980232) + rectangleList.Add(room2); + rectangleList.Add(room1); + if ((double) WorldGen.genRand.NextFloat() > (double) roomSolidPrecentage2 + 0.200000002980232) + rectangleList.Add(room3); + return rectangleList; + } + + private static Microsoft.Xna.Framework.Rectangle FindRoom(Point origin) + { + Point result1; + bool flag1 = WorldUtils.Find(origin, Searches.Chain((GenSearch) new Searches.Left(25), (GenCondition) new Conditions.IsSolid()), out result1); + Point result2; + int num1 = WorldUtils.Find(origin, Searches.Chain((GenSearch) new Searches.Right(25), (GenCondition) new Conditions.IsSolid()), out result2) ? 1 : 0; + if (!flag1) + result1 = new Point(origin.X - 25, origin.Y); + if (num1 == 0) + result2 = new Point(origin.X + 25, origin.Y); + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(origin.X, origin.Y, 0, 0); + if (origin.X - result1.X > result2.X - origin.X) + { + rectangle.X = result1.X; + rectangle.Width = Utils.Clamp(result2.X - result1.X, 15, 30); + } + else + { + rectangle.Width = Utils.Clamp(result2.X - result1.X, 15, 30); + rectangle.X = result2.X - rectangle.Width; + } + Point result3; + bool flag2 = WorldUtils.Find(result1, Searches.Chain((GenSearch) new Searches.Up(10), (GenCondition) new Conditions.IsSolid()), out result3); + Point result4; + int num2 = WorldUtils.Find(result2, Searches.Chain((GenSearch) new Searches.Up(10), (GenCondition) new Conditions.IsSolid()), out result4) ? 1 : 0; + if (!flag2) + result3 = new Point(origin.X, origin.Y - 10); + if (num2 == 0) + result4 = new Point(origin.X, origin.Y - 10); + rectangle.Height = Utils.Clamp(Math.Max(origin.Y - result3.Y, origin.Y - result4.Y), 8, 12); + rectangle.Y -= rectangle.Height; + return rectangle; + } + + private static float GetRoomSolidPrecentage(Microsoft.Xna.Framework.Rectangle room) + { + float num = (float) (room.Width * room.Height); + Ref count = new Ref(0); + WorldUtils.Gen(new Point(room.X, room.Y), (GenShape) new Shapes.Rectangle(room.Width, room.Height), Actions.Chain((GenAction) new Modifiers.IsSolid(), (GenAction) new Actions.Count(count))); + return (float) count.Value / num; + } + + private static int SortBiomeResults(Tuple item1, Tuple item2) => item2.Item2.CompareTo(item1.Item2); + + private static bool AreRoomLocationsValid(IEnumerable rooms) + { + foreach (Microsoft.Xna.Framework.Rectangle room in rooms) + { + if (room.Y + room.Height > Main.maxTilesY - 220) + return false; + } + return true; + } + + private static HouseType GetHouseType(IEnumerable rooms) + { + Dictionary resultsOutput = new Dictionary(); + foreach (Microsoft.Xna.Framework.Rectangle room in rooms) + WorldUtils.Gen(new Point(room.X - 10, room.Y - 10), (GenShape) new Shapes.Rectangle(room.Width + 20, room.Height + 20), (GenAction) new Actions.TileScanner(new ushort[12] + { + (ushort) 0, + (ushort) 59, + (ushort) 147, + (ushort) 1, + (ushort) 161, + (ushort) 53, + (ushort) 396, + (ushort) 397, + (ushort) 368, + (ushort) 367, + (ushort) 60, + (ushort) 70 + }).Output(resultsOutput)); + List> tupleList = new List>(); + tupleList.Add(Tuple.Create(HouseType.Wood, resultsOutput[(ushort) 0] + resultsOutput[(ushort) 1])); + tupleList.Add(Tuple.Create(HouseType.Jungle, resultsOutput[(ushort) 59] + resultsOutput[(ushort) 60] * 10)); + tupleList.Add(Tuple.Create(HouseType.Mushroom, resultsOutput[(ushort) 59] + resultsOutput[(ushort) 70] * 10)); + tupleList.Add(Tuple.Create(HouseType.Ice, resultsOutput[(ushort) 147] + resultsOutput[(ushort) 161])); + tupleList.Add(Tuple.Create(HouseType.Desert, resultsOutput[(ushort) 397] + resultsOutput[(ushort) 396] + resultsOutput[(ushort) 53])); + tupleList.Add(Tuple.Create(HouseType.Granite, resultsOutput[(ushort) 368])); + tupleList.Add(Tuple.Create(HouseType.Marble, resultsOutput[(ushort) 367])); + tupleList.Sort(new Comparison>(HouseUtils.SortBiomeResults)); + return tupleList[0].Item1; + } + + private static bool AreRoomsValid( + IEnumerable rooms, + StructureMap structures, + HouseType style) + { + foreach (Microsoft.Xna.Framework.Rectangle room in rooms) + { + if (style != HouseType.Granite) + { + if (WorldUtils.Find(new Point(room.X - 2, room.Y - 2), Searches.Chain(new Searches.Rectangle(room.Width + 4, room.Height + 4).RequireAll(false), (GenCondition) new Conditions.HasLava()), out Point _)) + return false; + } + if (WorldGen.notTheBees) + { + if (!structures.CanPlace(room, HouseUtils.BeelistedTiles, 5)) + return false; + } + else if (!structures.CanPlace(room, HouseUtils.BlacklistedTiles, 5)) + return false; + } + return true; + } + } +} diff --git a/GameContent/Biomes/CaveHouse/IceHouseBuilder.cs b/GameContent/Biomes/CaveHouse/IceHouseBuilder.cs new file mode 100644 index 0000000..6514618 --- /dev/null +++ b/GameContent/Biomes/CaveHouse/IceHouseBuilder.cs @@ -0,0 +1,49 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.CaveHouse.IceHouseBuilder +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria.GameContent.Generation; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes.CaveHouse +{ + public class IceHouseBuilder : HouseBuilder + { + public IceHouseBuilder(IEnumerable rooms) + : base(HouseType.Ice, rooms) + { + this.TileType = (ushort) 321; + this.WallType = (ushort) 149; + this.BeamType = (ushort) 574; + this.DoorStyle = 30; + this.PlatformStyle = 19; + this.TableStyle = 28; + this.WorkbenchStyle = 23; + this.PianoStyle = 23; + this.BookcaseStyle = 25; + this.ChairStyle = 30; + this.ChestStyle = 11; + } + + protected override void AgeRoom(Microsoft.Xna.Framework.Rectangle room) + { + WorldUtils.Gen(new Point(room.X, room.Y), (GenShape) new Shapes.Rectangle(room.Width, room.Height), Actions.Chain((GenAction) new Modifiers.Dither(0.600000023841858), (GenAction) new Modifiers.Blotches(chance: 0.600000023841858), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + this.TileType + }), (GenAction) new Actions.SetTileKeepWall((ushort) 161, true), (GenAction) new Modifiers.Dither(0.8), (GenAction) new Actions.SetTileKeepWall((ushort) 147, true))); + WorldUtils.Gen(new Point(room.X + 1, room.Y), (GenShape) new Shapes.Rectangle(room.Width - 2, 1), Actions.Chain((GenAction) new Modifiers.Dither(), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + (ushort) 161 + }), (GenAction) new Modifiers.Offset(0, 1), (GenAction) new ActionStalagtite())); + WorldUtils.Gen(new Point(room.X + 1, room.Y + room.Height - 1), (GenShape) new Shapes.Rectangle(room.Width - 2, 1), Actions.Chain((GenAction) new Modifiers.Dither(), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + (ushort) 161 + }), (GenAction) new Modifiers.Offset(0, 1), (GenAction) new ActionStalagtite())); + WorldUtils.Gen(new Point(room.X, room.Y), (GenShape) new Shapes.Rectangle(room.Width, room.Height), Actions.Chain((GenAction) new Modifiers.Dither(0.850000023841858), (GenAction) new Modifiers.Blotches(chance: 0.8), (GenAction) new Modifiers.SkipTiles(this.SkipTilesDuringWallAging), (double) room.Y > Main.worldSurface ? (GenAction) new Actions.ClearWall(true) : (GenAction) new Actions.PlaceWall((ushort) 40))); + } + } +} diff --git a/GameContent/Biomes/CaveHouse/JungleHouseBuilder.cs b/GameContent/Biomes/CaveHouse/JungleHouseBuilder.cs new file mode 100644 index 0000000..6d9ed93 --- /dev/null +++ b/GameContent/Biomes/CaveHouse/JungleHouseBuilder.cs @@ -0,0 +1,49 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.CaveHouse.JungleHouseBuilder +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria.GameContent.Generation; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes.CaveHouse +{ + public class JungleHouseBuilder : HouseBuilder + { + public JungleHouseBuilder(IEnumerable rooms) + : base(HouseType.Jungle, rooms) + { + this.TileType = (ushort) 158; + this.WallType = (ushort) 42; + this.BeamType = (ushort) 575; + this.PlatformStyle = 2; + this.DoorStyle = 2; + this.TableStyle = 2; + this.WorkbenchStyle = 2; + this.PianoStyle = 2; + this.BookcaseStyle = 12; + this.ChairStyle = 3; + this.ChestStyle = 8; + } + + protected override void AgeRoom(Microsoft.Xna.Framework.Rectangle room) + { + WorldUtils.Gen(new Point(room.X, room.Y), (GenShape) new Shapes.Rectangle(room.Width, room.Height), Actions.Chain((GenAction) new Modifiers.Dither(0.600000023841858), (GenAction) new Modifiers.Blotches(chance: 0.600000023841858), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + this.TileType + }), (GenAction) new Actions.SetTileKeepWall((ushort) 60, true), (GenAction) new Modifiers.Dither(0.800000011920929), (GenAction) new Actions.SetTileKeepWall((ushort) 59, true))); + WorldUtils.Gen(new Point(room.X + 1, room.Y), (GenShape) new Shapes.Rectangle(room.Width - 2, 1), Actions.Chain((GenAction) new Modifiers.Dither(), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + (ushort) 60 + }), (GenAction) new Modifiers.Offset(0, 1), (GenAction) new Modifiers.IsEmpty(), (GenAction) new ActionVines(3, room.Height, 62))); + WorldUtils.Gen(new Point(room.X + 1, room.Y + room.Height - 1), (GenShape) new Shapes.Rectangle(room.Width - 2, 1), Actions.Chain((GenAction) new Modifiers.Dither(), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + (ushort) 60 + }), (GenAction) new Modifiers.Offset(0, 1), (GenAction) new Modifiers.IsEmpty(), (GenAction) new ActionVines(3, room.Height, 62))); + WorldUtils.Gen(new Point(room.X, room.Y), (GenShape) new Shapes.Rectangle(room.Width, room.Height), Actions.Chain((GenAction) new Modifiers.Dither(0.850000023841858), (GenAction) new Modifiers.Blotches(), (GenAction) new Actions.PlaceWall((ushort) 64))); + } + } +} diff --git a/GameContent/Biomes/CaveHouse/MarbleHouseBuilder.cs b/GameContent/Biomes/CaveHouse/MarbleHouseBuilder.cs new file mode 100644 index 0000000..71361e8 --- /dev/null +++ b/GameContent/Biomes/CaveHouse/MarbleHouseBuilder.cs @@ -0,0 +1,49 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.CaveHouse.MarbleHouseBuilder +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria.GameContent.Generation; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes.CaveHouse +{ + public class MarbleHouseBuilder : HouseBuilder + { + public MarbleHouseBuilder(IEnumerable rooms) + : base(HouseType.Marble, rooms) + { + this.TileType = (ushort) 357; + this.WallType = (ushort) 179; + this.BeamType = (ushort) 561; + this.PlatformStyle = 29; + this.DoorStyle = 35; + this.TableStyle = 34; + this.WorkbenchStyle = 30; + this.PianoStyle = 29; + this.BookcaseStyle = 31; + this.ChairStyle = 35; + this.ChestStyle = 51; + } + + protected override void AgeRoom(Microsoft.Xna.Framework.Rectangle room) + { + WorldUtils.Gen(new Point(room.X, room.Y), (GenShape) new Shapes.Rectangle(room.Width, room.Height), Actions.Chain((GenAction) new Modifiers.Dither(0.600000023841858), (GenAction) new Modifiers.Blotches(chance: 0.600000023841858), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + this.TileType + }), (GenAction) new Actions.SetTileKeepWall((ushort) 367, true))); + WorldUtils.Gen(new Point(room.X + 1, room.Y), (GenShape) new Shapes.Rectangle(room.Width - 2, 1), Actions.Chain((GenAction) new Modifiers.Dither(0.800000011920929), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + (ushort) 367 + }), (GenAction) new Modifiers.Offset(0, 1), (GenAction) new ActionStalagtite())); + WorldUtils.Gen(new Point(room.X + 1, room.Y + room.Height - 1), (GenShape) new Shapes.Rectangle(room.Width - 2, 1), Actions.Chain((GenAction) new Modifiers.Dither(0.800000011920929), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + (ushort) 367 + }), (GenAction) new Modifiers.Offset(0, 1), (GenAction) new ActionStalagtite())); + WorldUtils.Gen(new Point(room.X, room.Y), (GenShape) new Shapes.Rectangle(room.Width, room.Height), Actions.Chain((GenAction) new Modifiers.Dither(0.850000023841858), (GenAction) new Modifiers.Blotches(), (GenAction) new Actions.PlaceWall((ushort) 178))); + } + } +} diff --git a/GameContent/Biomes/CaveHouse/MushroomHouseBuilder.cs b/GameContent/Biomes/CaveHouse/MushroomHouseBuilder.cs new file mode 100644 index 0000000..665e253 --- /dev/null +++ b/GameContent/Biomes/CaveHouse/MushroomHouseBuilder.cs @@ -0,0 +1,48 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.CaveHouse.MushroomHouseBuilder +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes.CaveHouse +{ + public class MushroomHouseBuilder : HouseBuilder + { + public MushroomHouseBuilder(IEnumerable rooms) + : base(HouseType.Mushroom, rooms) + { + this.TileType = (ushort) 190; + this.WallType = (ushort) 74; + this.BeamType = (ushort) 578; + this.PlatformStyle = 18; + this.DoorStyle = 6; + this.TableStyle = 27; + this.WorkbenchStyle = 7; + this.PianoStyle = 22; + this.BookcaseStyle = 24; + this.ChairStyle = 9; + this.ChestStyle = 32; + } + + protected override void AgeRoom(Microsoft.Xna.Framework.Rectangle room) + { + WorldUtils.Gen(new Point(room.X, room.Y), (GenShape) new Shapes.Rectangle(room.Width, room.Height), Actions.Chain((GenAction) new Modifiers.Dither(0.699999988079071), (GenAction) new Modifiers.Blotches(chance: 0.5), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + this.TileType + }), (GenAction) new Actions.SetTileKeepWall((ushort) 70, true))); + WorldUtils.Gen(new Point(room.X + 1, room.Y), (GenShape) new Shapes.Rectangle(room.Width - 2, 1), Actions.Chain((GenAction) new Modifiers.Dither(0.600000023841858), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + (ushort) 70 + }), (GenAction) new Modifiers.Offset(0, -1), (GenAction) new Modifiers.IsEmpty(), (GenAction) new Actions.SetTile((ushort) 71))); + WorldUtils.Gen(new Point(room.X + 1, room.Y + room.Height - 1), (GenShape) new Shapes.Rectangle(room.Width - 2, 1), Actions.Chain((GenAction) new Modifiers.Dither(0.600000023841858), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + (ushort) 70 + }), (GenAction) new Modifiers.Offset(0, -1), (GenAction) new Modifiers.IsEmpty(), (GenAction) new Actions.SetTile((ushort) 71))); + WorldUtils.Gen(new Point(room.X, room.Y), (GenShape) new Shapes.Rectangle(room.Width, room.Height), Actions.Chain((GenAction) new Modifiers.Dither(0.850000023841858), (GenAction) new Modifiers.Blotches(), (GenAction) new Actions.ClearWall())); + } + } +} diff --git a/GameContent/Biomes/CaveHouse/WoodHouseBuilder.cs b/GameContent/Biomes/CaveHouse/WoodHouseBuilder.cs new file mode 100644 index 0000000..9c299d6 --- /dev/null +++ b/GameContent/Biomes/CaveHouse/WoodHouseBuilder.cs @@ -0,0 +1,47 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.CaveHouse.WoodHouseBuilder +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes.CaveHouse +{ + public class WoodHouseBuilder : HouseBuilder + { + public WoodHouseBuilder(IEnumerable rooms) + : base(HouseType.Wood, rooms) + { + this.TileType = (ushort) 30; + this.WallType = (ushort) 27; + this.BeamType = (ushort) 124; + this.PlatformStyle = 0; + this.DoorStyle = 0; + this.TableStyle = 0; + this.WorkbenchStyle = 0; + this.PianoStyle = 0; + this.BookcaseStyle = 0; + this.ChairStyle = 0; + this.ChestStyle = 1; + } + + protected override void AgeRoom(Microsoft.Xna.Framework.Rectangle room) + { + for (int index = 0; index < room.Width * room.Height / 16; ++index) + WorldUtils.Gen(new Point(WorldGen.genRand.Next(1, room.Width - 1) + room.X, WorldGen.genRand.Next(1, room.Height - 1) + room.Y), (GenShape) new Shapes.Rectangle(2, 2), Actions.Chain((GenAction) new Modifiers.Dither(), (GenAction) new Modifiers.Blotches(chance: 2.0), (GenAction) new Modifiers.IsEmpty(), (GenAction) new Actions.SetTile((ushort) 51, true))); + WorldUtils.Gen(new Point(room.X, room.Y), (GenShape) new Shapes.Rectangle(room.Width, room.Height), Actions.Chain((GenAction) new Modifiers.Dither(0.850000023841858), (GenAction) new Modifiers.Blotches(), (GenAction) new Modifiers.OnlyWalls(new ushort[1] + { + this.WallType + }), (GenAction) new Modifiers.SkipTiles(this.SkipTilesDuringWallAging), (double) room.Y > Main.worldSurface ? (GenAction) new Actions.ClearWall(true) : (GenAction) new Actions.PlaceWall((ushort) 2))); + WorldUtils.Gen(new Point(room.X, room.Y), (GenShape) new Shapes.Rectangle(room.Width, room.Height), Actions.Chain((GenAction) new Modifiers.Dither(0.949999988079071), (GenAction) new Modifiers.OnlyTiles(new ushort[3] + { + (ushort) 30, + (ushort) 321, + (ushort) 158 + }), (GenAction) new Actions.ClearTile(true))); + } + } +} diff --git a/GameContent/Biomes/CaveHouseBiome.cs b/GameContent/Biomes/CaveHouseBiome.cs new file mode 100644 index 0000000..8fad722 --- /dev/null +++ b/GameContent/Biomes/CaveHouseBiome.cs @@ -0,0 +1,89 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.CaveHouseBiome +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Newtonsoft.Json; +using Terraria.GameContent.Biomes.CaveHouse; +using Terraria.ID; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes +{ + public class CaveHouseBiome : MicroBiome + { + private readonly HouseBuilderContext _builderContext = new HouseBuilderContext(); + + [JsonProperty] + public float IceChestChance { get; set; } + + [JsonProperty] + public float JungleChestChance { get; set; } + + [JsonProperty] + public float GoldChestChance { get; set; } + + [JsonProperty] + public float GraniteChestChance { get; set; } + + [JsonProperty] + public float MarbleChestChance { get; set; } + + [JsonProperty] + public float MushroomChestChance { get; set; } + + [JsonProperty] + public float DesertChestChance { get; set; } + + public override bool Place(Point origin, StructureMap structures) + { + if (!WorldGen.InWorld(origin.X, origin.Y, 10)) + return false; + int num = 25; + for (int index1 = origin.X - num; index1 <= origin.X + num; ++index1) + { + for (int index2 = origin.Y - num; index2 <= origin.Y + num; ++index2) + { + if (Main.tile[index1, index2].wire() || TileID.Sets.BasicChest[(int) Main.tile[index1, index2].type]) + return false; + } + } + HouseBuilder builder = HouseUtils.CreateBuilder(origin, structures); + if (!builder.IsValid) + return false; + this.ApplyConfigurationToBuilder(builder); + builder.Place(this._builderContext, structures); + return true; + } + + private void ApplyConfigurationToBuilder(HouseBuilder builder) + { + switch (builder.Type) + { + case HouseType.Wood: + builder.ChestChance = this.GoldChestChance; + break; + case HouseType.Ice: + builder.ChestChance = this.IceChestChance; + break; + case HouseType.Desert: + builder.ChestChance = this.DesertChestChance; + break; + case HouseType.Jungle: + builder.ChestChance = this.JungleChestChance; + break; + case HouseType.Mushroom: + builder.ChestChance = this.MushroomChestChance; + break; + case HouseType.Granite: + builder.ChestChance = this.GraniteChestChance; + break; + case HouseType.Marble: + builder.ChestChance = this.MarbleChestChance; + break; + } + } + } +} diff --git a/GameContent/Biomes/CorruptionPitBiome.cs b/GameContent/Biomes/CorruptionPitBiome.cs new file mode 100644 index 0000000..cafa82e --- /dev/null +++ b/GameContent/Biomes/CorruptionPitBiome.cs @@ -0,0 +1,55 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.CorruptionPitBiome +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.ID; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes +{ + public class CorruptionPitBiome : MicroBiome + { + public static bool[] ValidTiles = TileID.Sets.Factory.CreateBoolSet(true, 21, 31, 26); + + public override bool Place(Point origin, StructureMap structures) + { + if (WorldGen.SolidTile(origin.X, origin.Y) && GenBase._tiles[origin.X, origin.Y].wall == (ushort) 3) + return false; + if (!WorldUtils.Find(origin, Searches.Chain((GenSearch) new Searches.Down(100), (GenCondition) new Conditions.IsSolid()), out origin)) + return false; + if (!WorldUtils.Find(new Point(origin.X - 4, origin.Y), Searches.Chain((GenSearch) new Searches.Down(5), new Conditions.IsTile(new ushort[1] + { + (ushort) 25 + }).AreaAnd(8, 1)), out Point _)) + return false; + ShapeData data1 = new ShapeData(); + ShapeData shapeData1 = new ShapeData(); + ShapeData shapeData2 = new ShapeData(); + for (int index = 0; index < 6; ++index) + WorldUtils.Gen(origin, (GenShape) new Shapes.Circle(GenBase._random.Next(10, 12) + index), Actions.Chain((GenAction) new Modifiers.Offset(0, 5 * index + 5), new Modifiers.Blotches(3).Output(data1))); + for (int index = 0; index < 6; ++index) + WorldUtils.Gen(origin, (GenShape) new Shapes.Circle(GenBase._random.Next(5, 7) + index), Actions.Chain((GenAction) new Modifiers.Offset(0, 2 * index + 18), new Modifiers.Blotches(3).Output(shapeData1))); + for (int index = 0; index < 6; ++index) + WorldUtils.Gen(origin, (GenShape) new Shapes.Circle(GenBase._random.Next(4, 6) + index / 2), Actions.Chain((GenAction) new Modifiers.Offset(0, (int) (7.5 * (double) index) - 10), new Modifiers.Blotches(3).Output(shapeData2))); + ShapeData data2 = new ShapeData(shapeData1); + shapeData1.Subtract(shapeData2, origin, origin); + data2.Subtract(shapeData1, origin, origin); + Microsoft.Xna.Framework.Rectangle bounds = ShapeData.GetBounds(origin, data1, shapeData2); + if (!structures.CanPlace(bounds, CorruptionPitBiome.ValidTiles, 2)) + return false; + WorldUtils.Gen(origin, (GenShape) new ModShapes.All(data1), Actions.Chain((GenAction) new Actions.SetTile((ushort) 25, true), (GenAction) new Actions.PlaceWall((ushort) 3))); + WorldUtils.Gen(origin, (GenShape) new ModShapes.All(shapeData1), (GenAction) new Actions.SetTile((ushort) 0, true)); + WorldUtils.Gen(origin, (GenShape) new ModShapes.All(shapeData2), (GenAction) new Actions.ClearTile(true)); + WorldUtils.Gen(origin, (GenShape) new ModShapes.All(shapeData1), Actions.Chain((GenAction) new Modifiers.IsTouchingAir(true), (GenAction) new Modifiers.NotTouching(false, new ushort[1] + { + (ushort) 25 + }), (GenAction) new Actions.SetTile((ushort) 23, true))); + WorldUtils.Gen(origin, (GenShape) new ModShapes.All(data2), (GenAction) new Actions.PlaceWall((ushort) 69)); + structures.AddProtectedStructure(bounds, 2); + return true; + } + } +} diff --git a/GameContent/Biomes/DeadMansChestBiome.cs b/GameContent/Biomes/DeadMansChestBiome.cs new file mode 100644 index 0000000..326318b --- /dev/null +++ b/GameContent/Biomes/DeadMansChestBiome.cs @@ -0,0 +1,461 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.DeadMansChestBiome +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Newtonsoft.Json; +using System.Collections.Generic; +using Terraria.ID; +using Terraria.Utilities; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes +{ + public class DeadMansChestBiome : MicroBiome + { + private List _dartTrapPlacementSpots = new List(); + private List _wirePlacementSpots = new List(); + private List _boulderPlacementSpots = new List(); + private List _explosivePlacementAttempt = new List(); + [JsonProperty("NumberOfDartTraps")] + private IntRange _numberOfDartTraps = new IntRange(3, 6); + [JsonProperty("NumberOfBoulderTraps")] + private IntRange _numberOfBoulderTraps = new IntRange(2, 4); + [JsonProperty("NumberOfStepsBetweenBoulderTraps")] + private IntRange _numberOfStepsBetweenBoulderTraps = new IntRange(2, 4); + + public override bool Place(Point origin, StructureMap structures) + { + if (!DeadMansChestBiome.IsAGoodSpot(origin)) + return false; + this.ClearCaches(); + Point position = new Point(origin.X, origin.Y + 1); + this.FindBoulderTrapSpots(position); + this.FindDartTrapSpots(position); + this.FindExplosiveTrapSpots(position); + if (!this.AreThereEnoughTraps()) + return false; + this.TurnGoldChestIntoDeadMansChest(origin); + foreach (DeadMansChestBiome.DartTrapPlacementAttempt trapPlacementSpot in this._dartTrapPlacementSpots) + this.ActuallyPlaceDartTrap(trapPlacementSpot.position, trapPlacementSpot.directionX, trapPlacementSpot.x, trapPlacementSpot.y, trapPlacementSpot.xPush, trapPlacementSpot.t); + foreach (DeadMansChestBiome.WirePlacementAttempt wirePlacementSpot in this._wirePlacementSpots) + this.PlaceWireLine(wirePlacementSpot.position, wirePlacementSpot.dirX, wirePlacementSpot.dirY, wirePlacementSpot.steps); + foreach (DeadMansChestBiome.BoulderPlacementAttempt boulderPlacementSpot in this._boulderPlacementSpots) + this.ActuallyPlaceBoulderTrap(boulderPlacementSpot.position, boulderPlacementSpot.yPush, boulderPlacementSpot.requiredHeight, boulderPlacementSpot.bestType); + foreach (DeadMansChestBiome.ExplosivePlacementAttempt placementAttempt in this._explosivePlacementAttempt) + this.ActuallyPlaceExplosive(placementAttempt.position); + this.PlaceWiresForExplosives(origin); + return true; + } + + private void PlaceWiresForExplosives(Point origin) + { + if (this._explosivePlacementAttempt.Count <= 0) + return; + this.PlaceWireLine(origin, 0, 1, this._explosivePlacementAttempt[0].position.Y - origin.Y); + int x1 = this._explosivePlacementAttempt[0].position.X; + int num = this._explosivePlacementAttempt[0].position.X; + int y = this._explosivePlacementAttempt[0].position.Y; + for (int index = 1; index < this._explosivePlacementAttempt.Count; ++index) + { + int x2 = this._explosivePlacementAttempt[index].position.X; + if (x1 > x2) + x1 = x2; + if (num < x2) + num = x2; + } + this.PlaceWireLine(new Point(x1, y), 1, 0, num - x1); + } + + private bool AreThereEnoughTraps() => (this._boulderPlacementSpots.Count >= 1 || this._explosivePlacementAttempt.Count >= 1) && this._dartTrapPlacementSpots.Count >= 1; + + private void ClearCaches() + { + this._dartTrapPlacementSpots.Clear(); + this._wirePlacementSpots.Clear(); + this._boulderPlacementSpots.Clear(); + this._explosivePlacementAttempt.Clear(); + } + + private void FindBoulderTrapSpots(Point position) + { + int x1 = position.X; + int num1 = GenBase._random.Next(this._numberOfBoulderTraps); + int num2 = GenBase._random.Next(this._numberOfStepsBetweenBoulderTraps); + int x2 = x1 - num1 / 2 * num2; + int y = position.Y - 6; + for (int index = 0; index <= num1; ++index) + { + this.FindBoulderTrapSpot(new Point(x2, y)); + x2 += num2; + } + if (this._boulderPlacementSpots.Count <= 0) + return; + int x3 = this._boulderPlacementSpots[0].position.X; + int num3 = this._boulderPlacementSpots[0].position.X; + for (int index = 1; index < this._boulderPlacementSpots.Count; ++index) + { + int x4 = this._boulderPlacementSpots[index].position.X; + if (x3 > x4) + x3 = x4; + if (num3 < x4) + num3 = x4; + } + if (x3 > position.X) + x3 = position.X; + if (num3 < position.X) + num3 = position.X; + this._wirePlacementSpots.Add(new DeadMansChestBiome.WirePlacementAttempt(new Point(x3, y - 1), 1, 0, num3 - x3)); + this._wirePlacementSpots.Add(new DeadMansChestBiome.WirePlacementAttempt(position, 0, -1, 7)); + } + + private void FindBoulderTrapSpot(Point position) + { + int x = position.X; + int y = position.Y; + for (int yPush = 0; yPush < 50; ++yPush) + { + if (Main.tile[x, y - yPush].active()) + { + this.PlaceBoulderTrapSpot(new Point(x, y - yPush), yPush); + break; + } + } + } + + private void PlaceBoulderTrapSpot(Point position, int yPush) + { + int[] numArray = new int[623]; + for (int x = position.X; x < position.X + 2; ++x) + { + for (int index = position.Y - 4; index <= position.Y; ++index) + { + Tile tile = Main.tile[x, index]; + if (tile.active() && !Main.tileFrameImportant[(int) tile.type] && Main.tileSolid[(int) tile.type]) + ++numArray[(int) tile.type]; + if (tile.active() && !TileID.Sets.CanBeClearedDuringGeneration[(int) tile.type]) + return; + } + } + for (int index1 = position.X - 1; index1 < position.X + 2 + 1; ++index1) + { + for (int index2 = position.Y - 4 - 1; index2 <= position.Y - 4 + 2; ++index2) + { + if (!Main.tile[index1, index2].active()) + return; + } + } + int bestType = -1; + for (int index = 0; index < numArray.Length; ++index) + { + if (bestType == -1 || numArray[bestType] < numArray[index]) + bestType = index; + } + this._boulderPlacementSpots.Add(new DeadMansChestBiome.BoulderPlacementAttempt(position, yPush - 1, 4, bestType)); + } + + private void FindDartTrapSpots(Point position) + { + int num1 = GenBase._random.Next(this._numberOfDartTraps); + int directionX = GenBase._random.Next(2) == 0 ? -1 : 1; + int steps = -1; + for (int index = 0; index < num1; ++index) + { + int num2 = this.FindDartTrapSpotSingle(position, directionX) ? 1 : 0; + directionX *= -1; + --position.Y; + if (num2 != 0) + steps = index; + } + this._wirePlacementSpots.Add(new DeadMansChestBiome.WirePlacementAttempt(new Point(position.X, position.Y + num1), 0, -1, steps)); + } + + private bool FindDartTrapSpotSingle(Point position, int directionX) + { + int x = position.X; + int y = position.Y; + for (int xPush = 0; xPush < 20; ++xPush) + { + Tile t = Main.tile[x + xPush * directionX, y]; + if (t.type != (ushort) 467 && t.active() && Main.tileSolid[(int) t.type]) + { + if (xPush < 5 || t.actuator() || Main.tileFrameImportant[(int) t.type] || !TileID.Sets.CanBeClearedDuringGeneration[(int) t.type]) + return false; + this._dartTrapPlacementSpots.Add(new DeadMansChestBiome.DartTrapPlacementAttempt(position, directionX, x, y, xPush, t)); + return true; + } + } + return false; + } + + private void FindExplosiveTrapSpots(Point position) + { + int x1 = position.X; + int y = position.Y + 3; + List intList = new List(); + if (this.IsGoodSpotsForExplosive(x1, y)) + intList.Add(x1); + int x2 = x1 + 1; + if (this.IsGoodSpotsForExplosive(x2, y)) + intList.Add(x2); + int x3 = -1; + if (intList.Count > 0) + x3 = intList[GenBase._random.Next(intList.Count)]; + intList.Clear(); + int num1 = x2 + GenBase._random.Next(2, 6); + int num2 = 4; + for (int x4 = num1; x4 < num1 + num2; ++x4) + { + if (this.IsGoodSpotsForExplosive(x4, y)) + intList.Add(x4); + } + int x5 = -1; + if (intList.Count > 0) + x5 = intList[GenBase._random.Next(intList.Count)]; + int num3 = position.X - num2 - GenBase._random.Next(2, 6); + for (int x6 = num3; x6 < num3 + num2; ++x6) + { + if (this.IsGoodSpotsForExplosive(x6, y)) + intList.Add(x6); + } + int x7 = -1; + if (intList.Count > 0) + x7 = intList[GenBase._random.Next(intList.Count)]; + if (x7 != -1) + this._explosivePlacementAttempt.Add(new DeadMansChestBiome.ExplosivePlacementAttempt(new Point(x7, y))); + if (x3 != -1) + this._explosivePlacementAttempt.Add(new DeadMansChestBiome.ExplosivePlacementAttempt(new Point(x3, y))); + if (x5 == -1) + return; + this._explosivePlacementAttempt.Add(new DeadMansChestBiome.ExplosivePlacementAttempt(new Point(x5, y))); + } + + private bool IsGoodSpotsForExplosive(int x, int y) + { + Tile tile = Main.tile[x, y]; + return tile.active() && Main.tileSolid[(int) tile.type] && !Main.tileFrameImportant[(int) tile.type] && !Main.tileSolidTop[(int) tile.type]; + } + + public List GetPossibleChestsToTrapify(StructureMap structures) + { + List intList = new List(); + bool[] validTiles = new bool[TileID.Sets.GeneralPlacementTiles.Length]; + for (int index = 0; index < validTiles.Length; ++index) + validTiles[index] = TileID.Sets.GeneralPlacementTiles[index]; + validTiles[21] = true; + validTiles[467] = true; + for (int index = 0; index < 8000; ++index) + { + Chest chest = Main.chest[index]; + if (chest != null) + { + Point position1 = new Point(chest.x, chest.y); + if (DeadMansChestBiome.IsAGoodSpot(position1)) + { + this.ClearCaches(); + Point position2 = new Point(position1.X, position1.Y + 1); + this.FindBoulderTrapSpots(position2); + this.FindDartTrapSpots(position2); + if (this.AreThereEnoughTraps() && (structures == null || structures.CanPlace(new Microsoft.Xna.Framework.Rectangle(position1.X, position1.Y, 1, 1), validTiles, 10))) + intList.Add(index); + } + } + } + return intList; + } + + private static bool IsAGoodSpot(Point position) + { + if (!WorldGen.InWorld(position.X, position.Y, 50) || WorldGen.oceanDepths(position.X, position.Y)) + return false; + Tile tile1 = Main.tile[position.X, position.Y]; + if (tile1.type != (ushort) 21 || (int) tile1.frameX / 36 != 1) + return false; + Tile tile2 = Main.tile[position.X, position.Y + 2]; + return TileID.Sets.CanBeClearedDuringGeneration[(int) tile2.type] && WorldGen.countWires(position.X, position.Y, 20) <= 0 && WorldGen.countTiles(position.X, position.Y, lavaOk: true) >= 40; + } + + private void TurnGoldChestIntoDeadMansChest(Point position) + { + for (int index1 = 0; index1 < 2; ++index1) + { + for (int index2 = 0; index2 < 2; ++index2) + { + int index3 = position.X + index1; + int index4 = position.Y + index2; + Tile tile = Main.tile[index3, index4]; + tile.type = (ushort) 467; + tile.frameX = (short) (144 + index1 * 18); + tile.frameY = (short) (index2 * 18); + } + } + if (GenBase._random.Next(3) != 0) + return; + int chest = Chest.FindChest(position.X, position.Y); + if (chest <= -1) + return; + Item[] objArray = Main.chest[chest].item; + for (int index = objArray.Length - 2; index > 0; --index) + { + Item obj = objArray[index]; + if (obj.stack != 0) + objArray[index + 1] = obj.DeepClone(); + } + objArray[1] = new Item(); + objArray[1].SetDefaults(5007); + Main.chest[chest].item = objArray; + } + + private void ActuallyPlaceDartTrap( + Point position, + int directionX, + int x, + int y, + int xPush, + Tile t) + { + t.type = (ushort) 137; + t.frameY = (short) 0; + t.frameX = directionX != -1 ? (short) 0 : (short) 18; + t.slope((byte) 0); + t.halfBrick(false); + WorldGen.TileFrame(x, y, true); + this.PlaceWireLine(position, directionX, 0, xPush); + } + + private void PlaceWireLine(Point start, int offsetX, int offsetY, int steps) + { + for (int index = 0; index <= steps; ++index) + Main.tile[start.X + offsetX * index, start.Y + offsetY * index].wire(true); + } + + private void ActuallyPlaceBoulderTrap( + Point position, + int yPush, + int requiredHeight, + int bestType) + { + for (int x = position.X; x < position.X + 2; ++x) + { + for (int j = position.Y - requiredHeight; j <= position.Y + 2; ++j) + { + Tile tile = Main.tile[x, j]; + if (j < position.Y - requiredHeight + 2) + tile.ClearTile(); + else if (j <= position.Y) + { + if (!tile.active()) + { + tile.active(true); + tile.type = (ushort) bestType; + } + tile.slope((byte) 0); + tile.halfBrick(false); + tile.actuator(true); + tile.wire(true); + WorldGen.TileFrame(x, j, true); + } + else + tile.ClearTile(); + } + } + int i = position.X + 1; + int j1 = position.Y - requiredHeight + 1; + int num1 = 3; + int num2 = i - num1; + int num3 = j1 - num1; + int num4 = i + num1 - 1; + int num5 = j1 + num1 - 1; + for (int index1 = num2; index1 <= num4; ++index1) + { + for (int index2 = num3; index2 <= num5; ++index2) + { + if (Main.tile[index1, index2].type != (ushort) 138) + Main.tile[index1, index2].type = (ushort) 1; + } + } + WorldGen.PlaceTile(i, j1, 138); + this.PlaceWireLine(position, 0, 1, yPush); + } + + private void ActuallyPlaceExplosive(Point position) + { + Tile tile = Main.tile[position.X, position.Y]; + tile.type = (ushort) 141; + int num1; + short num2 = (short) (num1 = 0); + tile.frameY = (short) num1; + tile.frameX = num2; + tile.slope((byte) 0); + tile.halfBrick(false); + WorldGen.TileFrame(position.X, position.Y, true); + } + + private class DartTrapPlacementAttempt + { + public int directionX; + public int xPush; + public int x; + public int y; + public Point position; + public Tile t; + + public DartTrapPlacementAttempt( + Point position, + int directionX, + int x, + int y, + int xPush, + Tile t) + { + this.position = position; + this.directionX = directionX; + this.x = x; + this.y = y; + this.xPush = xPush; + this.t = t; + } + } + + private class BoulderPlacementAttempt + { + public Point position; + public int yPush; + public int requiredHeight; + public int bestType; + + public BoulderPlacementAttempt(Point position, int yPush, int requiredHeight, int bestType) + { + this.position = position; + this.yPush = yPush; + this.requiredHeight = requiredHeight; + this.bestType = bestType; + } + } + + private class WirePlacementAttempt + { + public Point position; + public int dirX; + public int dirY; + public int steps; + + public WirePlacementAttempt(Point position, int dirX, int dirY, int steps) + { + this.position = position; + this.dirX = dirX; + this.dirY = dirY; + this.steps = steps; + } + } + + private class ExplosivePlacementAttempt + { + public Point position; + + public ExplosivePlacementAttempt(Point position) => this.position = position; + } + } +} diff --git a/GameContent/Biomes/Desert/AnthillEntrance.cs b/GameContent/Biomes/Desert/AnthillEntrance.cs new file mode 100644 index 0000000..f174b08 --- /dev/null +++ b/GameContent/Biomes/Desert/AnthillEntrance.cs @@ -0,0 +1,75 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.Desert.AnthillEntrance +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes.Desert +{ + public static class AnthillEntrance + { + public static void Place(DesertDescription description) + { + int num1 = WorldGen.genRand.Next(2, 4); + for (int index = 0; index < num1; ++index) + { + int holeRadius = WorldGen.genRand.Next(15, 18); + int num2 = (int) ((double) (index + 1) / (double) (num1 + 1) * (double) description.Surface.Width) + description.Desert.Left; + int y = (int) description.Surface[num2]; + AnthillEntrance.PlaceAt(description, new Point(num2, y), holeRadius); + } + } + + private static void PlaceAt(DesertDescription description, Point position, int holeRadius) + { + ShapeData data = new ShapeData(); + Point origin = new Point(position.X, position.Y + 6); + WorldUtils.Gen(origin, (GenShape) new Shapes.Tail((float) (holeRadius * 2), new Vector2(0.0f, (float) -holeRadius * 1.5f)), Actions.Chain(new Actions.SetTile((ushort) 53).Output(data))); + GenShapeActionPair pair1 = new GenShapeActionPair((GenShape) new Shapes.Rectangle(1, 1), Actions.Chain((GenAction) new Modifiers.Blotches(), (GenAction) new Modifiers.IsSolid(), (GenAction) new Actions.Clear(), (GenAction) new Actions.PlaceWall((ushort) 187))); + GenShapeActionPair genShapeActionPair = new GenShapeActionPair((GenShape) new Shapes.Rectangle(1, 1), Actions.Chain((GenAction) new Modifiers.IsSolid(), (GenAction) new Actions.Clear(), (GenAction) new Actions.PlaceWall((ushort) 187))); + GenShapeActionPair pair2 = new GenShapeActionPair((GenShape) new Shapes.Circle(2, 3), Actions.Chain((GenAction) new Modifiers.IsSolid(), (GenAction) new Actions.SetTile((ushort) 397), (GenAction) new Actions.PlaceWall((ushort) 187))); + GenShapeActionPair pair3 = new GenShapeActionPair((GenShape) new Shapes.Circle(holeRadius, 3), Actions.Chain((GenAction) new Modifiers.SkipWalls(new ushort[1] + { + (ushort) 187 + }), (GenAction) new Actions.SetTile((ushort) 53))); + GenShapeActionPair pair4 = new GenShapeActionPair((GenShape) new Shapes.Circle(holeRadius - 2, 3), Actions.Chain((GenAction) new Actions.PlaceWall((ushort) 187))); + int x = position.X; + int y1 = position.Y - holeRadius - 3; + while (true) + { + int num1 = y1; + Microsoft.Xna.Framework.Rectangle rectangle = description.Hive; + int top1 = rectangle.Top; + int y2 = position.Y; + rectangle = description.Desert; + int top2 = rectangle.Top; + int num2 = (y2 - top2) * 2; + int num3 = top1 + num2 + 12; + if (num1 < num3) + { + WorldUtils.Gen(new Point(x, y1), y1 < position.Y ? genShapeActionPair : pair1); + WorldUtils.Gen(new Point(x, y1), pair2); + if (y1 % 3 == 0 && y1 >= position.Y) + { + x += WorldGen.genRand.Next(-1, 2); + WorldUtils.Gen(new Point(x, y1), pair1); + if (y1 >= position.Y + 5) + { + WorldUtils.Gen(new Point(x, y1), pair3); + WorldUtils.Gen(new Point(x, y1), pair4); + } + WorldUtils.Gen(new Point(x, y1), pair2); + } + ++y1; + } + else + break; + } + WorldUtils.Gen(new Point(origin.X, origin.Y - (int) ((double) holeRadius * 1.5) + 3), (GenShape) new Shapes.Circle(holeRadius / 2, holeRadius / 3), Actions.Chain(Actions.Chain((GenAction) new Actions.ClearTile(), (GenAction) new Modifiers.Expand(1), (GenAction) new Actions.PlaceWall((ushort) 0)))); + WorldUtils.Gen(origin, (GenShape) new ModShapes.All(data), (GenAction) new Actions.Smooth()); + } + } +} diff --git a/GameContent/Biomes/Desert/ChambersEntrance.cs b/GameContent/Biomes/Desert/ChambersEntrance.cs new file mode 100644 index 0000000..92f70ec --- /dev/null +++ b/GameContent/Biomes/Desert/ChambersEntrance.cs @@ -0,0 +1,85 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.Desert.ChambersEntrance +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.Utilities; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes.Desert +{ + public static class ChambersEntrance + { + public static void Place(DesertDescription description) + { + int num = description.Desert.Center.X + WorldGen.genRand.Next(-40, 41); + Point position = new Point(num, (int) description.Surface[num]); + ChambersEntrance.PlaceAt(description, position); + } + + private static void PlaceAt(DesertDescription description, Point position) + { + ShapeData shapeData = new ShapeData(); + Point origin = new Point(position.X, position.Y + 2); + WorldUtils.Gen(origin, (GenShape) new Shapes.Circle(24, 12), Actions.Chain((GenAction) new Modifiers.Blotches(), new Actions.SetTile((ushort) 53).Output(shapeData))); + UnifiedRandom genRand = WorldGen.genRand; + ShapeData data = new ShapeData(); + int num1 = description.Hive.Top - position.Y; + int direction = genRand.Next(2) == 0 ? -1 : 1; + List pathConnectionList = new List() + { + new ChambersEntrance.PathConnection(new Point(position.X + -direction * 26, position.Y - 8), direction) + }; + int num2 = genRand.Next(2, 4); + for (int index = 0; index < num2; ++index) + { + int y = (int) ((double) (index + 1) / (double) num2 * (double) num1) + genRand.Next(-8, 9); + int x = direction * genRand.Next(20, 41); + int num3 = genRand.Next(18, 29); + WorldUtils.Gen(position, (GenShape) new Shapes.Circle(num3 / 2, 3), Actions.Chain((GenAction) new Modifiers.Offset(x, y), (GenAction) new Modifiers.Blotches(), new Actions.Clear().Output(data), (GenAction) new Actions.PlaceWall((ushort) 187))); + pathConnectionList.Add(new ChambersEntrance.PathConnection(new Point(x + num3 / 2 * -direction + position.X, y + position.Y), -direction)); + direction *= -1; + } + WorldUtils.Gen(position, (GenShape) new ModShapes.OuterOutline(data), Actions.Chain((GenAction) new Modifiers.Expand(1), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + (ushort) 53 + }), (GenAction) new Actions.SetTile((ushort) 397), (GenAction) new Actions.PlaceWall((ushort) 187))); + GenShapeActionPair pair = new GenShapeActionPair((GenShape) new Shapes.Rectangle(2, 4), Actions.Chain((GenAction) new Modifiers.IsSolid(), (GenAction) new Modifiers.Blotches(), (GenAction) new Actions.Clear(), (GenAction) new Modifiers.Expand(1), (GenAction) new Actions.PlaceWall((ushort) 187), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + (ushort) 53 + }), (GenAction) new Actions.SetTile((ushort) 397))); + for (int index = 1; index < pathConnectionList.Count; ++index) + { + ChambersEntrance.PathConnection pathConnection1 = pathConnectionList[index - 1]; + ChambersEntrance.PathConnection pathConnection2 = pathConnectionList[index]; + float num4 = Math.Abs(pathConnection2.Position.X - pathConnection1.Position.X) * 1.5f; + for (float amount = 0.0f; (double) amount <= 1.0; amount += 0.02f) + { + Vector2 vector2_1 = new Vector2(pathConnection1.Position.X + pathConnection1.Direction * num4 * amount, pathConnection1.Position.Y); + Vector2 vector2_2 = new Vector2(pathConnection2.Position.X + (float) ((double) pathConnection2.Direction * (double) num4 * (1.0 - (double) amount)), pathConnection2.Position.Y); + Vector2 vector2_3 = Vector2.Lerp(pathConnection1.Position, pathConnection2.Position, amount); + Vector2 vector2_4 = vector2_3; + double num5 = (double) amount; + WorldUtils.Gen(Vector2.Lerp(Vector2.Lerp(vector2_1, vector2_4, (float) num5), Vector2.Lerp(vector2_3, vector2_2, amount), amount).ToPoint(), pair); + } + } + WorldUtils.Gen(origin, (GenShape) new Shapes.Rectangle(new Microsoft.Xna.Framework.Rectangle(-29, -12, 58, 12)), Actions.Chain((GenAction) new Modifiers.NotInShape(shapeData), (GenAction) new Modifiers.Expand(1), (GenAction) new Actions.PlaceWall((ushort) 0))); + } + + private struct PathConnection + { + public readonly Vector2 Position; + public readonly float Direction; + + public PathConnection(Point position, int direction) + { + this.Position = new Vector2((float) position.X, (float) position.Y); + this.Direction = (float) direction; + } + } + } +} diff --git a/GameContent/Biomes/Desert/DesertDescription.cs b/GameContent/Biomes/Desert/DesertDescription.cs new file mode 100644 index 0000000..29f6cd7 --- /dev/null +++ b/GameContent/Biomes/Desert/DesertDescription.cs @@ -0,0 +1,90 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.Desert.DesertDescription +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.GameContent.Biomes.Desert +{ + public class DesertDescription + { + public static readonly DesertDescription Invalid = new DesertDescription() + { + IsValid = false + }; + private static readonly Vector2 DefaultBlockScale = new Vector2(4f, 2f); + private const int SCAN_PADDING = 5; + + public Rectangle CombinedArea { get; private set; } + + public Rectangle Desert { get; private set; } + + public Rectangle Hive { get; private set; } + + public Vector2 BlockScale { get; private set; } + + public int BlockColumnCount { get; private set; } + + public int BlockRowCount { get; private set; } + + public bool IsValid { get; private set; } + + public SurfaceMap Surface { get; private set; } + + private DesertDescription() + { + } + + public void UpdateSurfaceMap() => this.Surface = SurfaceMap.FromArea(this.CombinedArea.Left - 5, this.CombinedArea.Width + 10); + + public static DesertDescription CreateFromPlacement(Point origin) + { + Vector2 defaultBlockScale = DesertDescription.DefaultBlockScale; + float num1 = (float) Main.maxTilesX / 4200f; + int num2 = (int) (80.0 * (double) num1); + int num3 = (int) (((double) WorldGen.genRand.NextFloat() + 1.0) * 170.0 * (double) num1); + int width = (int) ((double) defaultBlockScale.X * (double) num2); + int height = (int) ((double) defaultBlockScale.Y * (double) num3); + origin.X -= width / 2; + SurfaceMap surfaceMap = SurfaceMap.FromArea(origin.X - 5, width + 10); + if (DesertDescription.RowHasInvalidTiles(origin.X, surfaceMap.Bottom, width)) + return DesertDescription.Invalid; + int y = (int) ((double) surfaceMap.Average + (double) surfaceMap.Bottom) / 2; + origin.Y = y + WorldGen.genRand.Next(40, 60); + return new DesertDescription() + { + CombinedArea = new Rectangle(origin.X, y, width, origin.Y + height - y), + Hive = new Rectangle(origin.X, origin.Y, width, height), + Desert = new Rectangle(origin.X, y, width, origin.Y + height / 2 - y), + BlockScale = defaultBlockScale, + BlockColumnCount = num2, + BlockRowCount = num3, + Surface = surfaceMap, + IsValid = true + }; + } + + private static bool RowHasInvalidTiles(int startX, int startY, int width) + { + if (WorldGen.skipDesertTileCheck) + return false; + for (int index = startX; index < startX + width; ++index) + { + switch (Main.tile[index, startY].type) + { + case 59: + case 60: + return true; + case 147: + case 161: + return true; + default: + continue; + } + } + return false; + } + } +} diff --git a/GameContent/Biomes/Desert/DesertHive.cs b/GameContent/Biomes/Desert/DesertHive.cs new file mode 100644 index 0000000..ee87591 --- /dev/null +++ b/GameContent/Biomes/Desert/DesertHive.cs @@ -0,0 +1,366 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.Desert.DesertHive +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.Utilities; + +namespace Terraria.GameContent.Biomes.Desert +{ + public static class DesertHive + { + public static void Place(DesertDescription description) + { + DesertHive.ClusterGroup clusters = DesertHive.ClusterGroup.FromDescription(description); + DesertHive.PlaceClusters(description, clusters); + DesertHive.AddTileVariance(description); + } + + private static void PlaceClusters( + DesertDescription description, + DesertHive.ClusterGroup clusters) + { + Rectangle hive = description.Hive; + hive.Inflate(20, 20); + DesertHive.PostPlacementEffect[,] postEffectMap = new DesertHive.PostPlacementEffect[hive.Width, hive.Height]; + DesertHive.PlaceClustersArea(description, clusters, hive, postEffectMap, Point.Zero); + for (int left = hive.Left; left < hive.Right; ++left) + { + for (int top = hive.Top; top < hive.Bottom; ++top) + { + if (postEffectMap[left - hive.Left, top - hive.Top].HasFlag((Enum) DesertHive.PostPlacementEffect.Smooth)) + Tile.SmoothSlope(left, top, false); + } + } + } + + private static void PlaceClustersArea( + DesertDescription description, + DesertHive.ClusterGroup clusters, + Rectangle area, + DesertHive.PostPlacementEffect[,] postEffectMap, + Point postEffectMapOffset) + { + FastRandom fastRandom1 = new FastRandom(Main.ActiveWorldFileData.Seed).WithModifier(57005UL); + Vector2 vector2_1 = new Vector2((float) description.Hive.Width, (float) description.Hive.Height); + Vector2 vector2_2 = new Vector2((float) clusters.Width, (float) clusters.Height); + Vector2 vector2_3 = description.BlockScale / 2f; + for (int left = area.Left; left < area.Right; ++left) + { + for (int top = area.Top; top < area.Bottom; ++top) + { + if (WorldGen.InWorld(left, top, 1)) + { + float num1 = 0.0f; + int num2 = -1; + float num3 = 0.0f; + ushort type = 53; + if (fastRandom1.Next(3) == 0) + type = (ushort) 397; + int x = left - description.Hive.X; + int y = top - description.Hive.Y; + Vector2 vector2_4 = (new Vector2((float) x, (float) y) - vector2_3) / vector2_1 * vector2_2; + for (int index = 0; index < clusters.Count; ++index) + { + DesertHive.Cluster cluster = clusters[index]; + if ((double) Math.Abs(cluster[0].Position.X - vector2_4.X) <= 10.0 && (double) Math.Abs(cluster[0].Position.Y - vector2_4.Y) <= 10.0) + { + float num4 = 0.0f; + foreach (DesertHive.Block block in (List) cluster) + num4 += 1f / Vector2.DistanceSquared(block.Position, vector2_4); + if ((double) num4 > (double) num1) + { + if ((double) num1 > (double) num3) + num3 = num1; + num1 = num4; + num2 = index; + } + else if ((double) num4 > (double) num3) + num3 = num4; + } + } + float num5 = num1 + num3; + Tile tile = Main.tile[left, top]; + bool flag = (double) ((new Vector2((float) x, (float) y) - vector2_3) / vector2_1 * 2f - Vector2.One).Length() >= 0.800000011920929; + DesertHive.PostPlacementEffect postPlacementEffect = DesertHive.PostPlacementEffect.None; + if ((double) num5 > 3.5) + { + postPlacementEffect = DesertHive.PostPlacementEffect.Smooth; + tile.ClearEverything(); + tile.wall = (ushort) 187; + if (num2 % 15 == 2) + tile.ResetToType((ushort) 404); + } + else if ((double) num5 > 1.79999995231628) + { + tile.wall = (ushort) 187; + if ((double) top < Main.worldSurface) + tile.liquid = (byte) 0; + else + tile.lava(true); + if (!flag || tile.active()) + { + tile.ResetToType((ushort) 396); + postPlacementEffect = DesertHive.PostPlacementEffect.Smooth; + } + } + else if ((double) num5 > 0.699999988079071 || !flag) + { + tile.wall = (ushort) 216; + tile.liquid = (byte) 0; + if (!flag || tile.active()) + { + tile.ResetToType(type); + postPlacementEffect = DesertHive.PostPlacementEffect.Smooth; + } + } + else if ((double) num5 > 0.25) + { + FastRandom fastRandom2 = fastRandom1.WithModifier(x, y); + float num6 = (float) (((double) num5 - 0.25) / 0.449999988079071); + if ((double) fastRandom2.NextFloat() < (double) num6) + { + tile.wall = (ushort) 187; + if ((double) top < Main.worldSurface) + tile.liquid = (byte) 0; + else + tile.lava(true); + if (tile.active()) + { + tile.ResetToType(type); + postPlacementEffect = DesertHive.PostPlacementEffect.Smooth; + } + } + } + postEffectMap[left - area.X + postEffectMapOffset.X, top - area.Y + postEffectMapOffset.Y] = postPlacementEffect; + } + } + } + } + + private static void AddTileVariance(DesertDescription description) + { + for (int index1 = -20; index1 < description.Hive.Width + 20; ++index1) + { + for (int index2 = -20; index2 < description.Hive.Height + 20; ++index2) + { + int x = index1 + description.Hive.X; + int y = index2 + description.Hive.Y; + if (WorldGen.InWorld(x, y, 1)) + { + Tile tile = Main.tile[x, y]; + Tile testTile1 = Main.tile[x, y + 1]; + Tile testTile2 = Main.tile[x, y + 2]; + if (tile.type == (ushort) 53 && (!WorldGen.SolidTile(testTile1) || !WorldGen.SolidTile(testTile2))) + tile.type = (ushort) 397; + } + } + } + for (int index3 = -20; index3 < description.Hive.Width + 20; ++index3) + { + for (int index4 = -20; index4 < description.Hive.Height + 20; ++index4) + { + int index5 = index3 + description.Hive.X; + int y = index4 + description.Hive.Y; + if (WorldGen.InWorld(index5, y, 1)) + { + Tile tile = Main.tile[index5, y]; + if (tile.active() && tile.type == (ushort) 396) + { + bool flag1 = true; + for (int index6 = -1; index6 >= -3; --index6) + { + if (Main.tile[index5, y + index6].active()) + { + flag1 = false; + break; + } + } + bool flag2 = true; + for (int index7 = 1; index7 <= 3; ++index7) + { + if (Main.tile[index5, y + index7].active()) + { + flag2 = false; + break; + } + } + if (flag1 && WorldGen.genRand.Next(5) == 0) + WorldGen.PlaceTile(index5, y - 1, 485, true, true, style: WorldGen.genRand.Next(4)); + else if (flag1 && WorldGen.genRand.Next(5) == 0) + WorldGen.PlaceTile(index5, y - 1, 484, true, true); + else if (flag1 ^ flag2 && WorldGen.genRand.Next(5) == 0) + WorldGen.PlaceTile(index5, y + (flag1 ? -1 : 1), 165, true, true); + else if (flag1 && WorldGen.genRand.Next(5) == 0) + WorldGen.PlaceTile(index5, y - 1, 187, true, true, style: (29 + WorldGen.genRand.Next(6))); + } + } + } + } + } + + private struct Block + { + public Vector2 Position; + + public Block(float x, float y) => this.Position = new Vector2(x, y); + } + + private class Cluster : List + { + } + + private class ClusterGroup : List + { + public readonly int Width; + public readonly int Height; + + private ClusterGroup(int width, int height) + { + this.Width = width; + this.Height = height; + this.Generate(); + } + + public static DesertHive.ClusterGroup FromDescription(DesertDescription description) => new DesertHive.ClusterGroup(description.BlockColumnCount, description.BlockRowCount); + + private static void SearchForCluster( + bool[,] blockMap, + List pointCluster, + int x, + int y, + int level = 2) + { + pointCluster.Add(new Point(x, y)); + blockMap[x, y] = false; + --level; + if (level == -1) + return; + if (x > 0 && blockMap[x - 1, y]) + DesertHive.ClusterGroup.SearchForCluster(blockMap, pointCluster, x - 1, y, level); + if (x < blockMap.GetLength(0) - 1 && blockMap[x + 1, y]) + DesertHive.ClusterGroup.SearchForCluster(blockMap, pointCluster, x + 1, y, level); + if (y > 0 && blockMap[x, y - 1]) + DesertHive.ClusterGroup.SearchForCluster(blockMap, pointCluster, x, y - 1, level); + if (y >= blockMap.GetLength(1) - 1 || !blockMap[x, y + 1]) + return; + DesertHive.ClusterGroup.SearchForCluster(blockMap, pointCluster, x, y + 1, level); + } + + private static void AttemptClaim( + int x, + int y, + int[,] clusterIndexMap, + List> pointClusters, + int index) + { + int clusterIndex = clusterIndexMap[x, y]; + if (clusterIndex == -1 || clusterIndex == index) + return; + int num = WorldGen.genRand.Next(2) == 0 ? -1 : index; + foreach (Point point in pointClusters[clusterIndex]) + clusterIndexMap[point.X, point.Y] = num; + } + + private void Generate() + { + this.Clear(); + bool[,] blockMap = new bool[this.Width, this.Height]; + int num1 = this.Width / 2 - 1; + int y1 = this.Height / 2 - 1; + int num2 = (num1 + 1) * (num1 + 1); + Point point1 = new Point(num1, y1); + for (int index1 = point1.Y - y1; index1 <= point1.Y + y1; ++index1) + { + float num3 = (float) num1 / (float) y1 * (float) (index1 - point1.Y); + int num4 = Math.Min(num1, (int) Math.Sqrt((double) num2 - (double) num3 * (double) num3)); + for (int index2 = point1.X - num4; index2 <= point1.X + num4; ++index2) + blockMap[index2, index1] = WorldGen.genRand.Next(2) == 0; + } + List> pointClusters = new List>(); + for (int x = 0; x < blockMap.GetLength(0); ++x) + { + for (int y2 = 0; y2 < blockMap.GetLength(1); ++y2) + { + if (blockMap[x, y2] && WorldGen.genRand.Next(2) == 0) + { + List pointCluster = new List(); + DesertHive.ClusterGroup.SearchForCluster(blockMap, pointCluster, x, y2); + if (pointCluster.Count > 2) + pointClusters.Add(pointCluster); + } + } + } + int[,] clusterIndexMap = new int[blockMap.GetLength(0), blockMap.GetLength(1)]; + for (int index3 = 0; index3 < clusterIndexMap.GetLength(0); ++index3) + { + for (int index4 = 0; index4 < clusterIndexMap.GetLength(1); ++index4) + clusterIndexMap[index3, index4] = -1; + } + for (int index = 0; index < pointClusters.Count; ++index) + { + foreach (Point point2 in pointClusters[index]) + clusterIndexMap[point2.X, point2.Y] = index; + } + for (int index5 = 0; index5 < pointClusters.Count; ++index5) + { + foreach (Point point3 in pointClusters[index5]) + { + int x = point3.X; + int y3 = point3.Y; + if (clusterIndexMap[x, y3] != -1) + { + int index6 = clusterIndexMap[x, y3]; + if (x > 0) + DesertHive.ClusterGroup.AttemptClaim(x - 1, y3, clusterIndexMap, pointClusters, index6); + if (x < clusterIndexMap.GetLength(0) - 1) + DesertHive.ClusterGroup.AttemptClaim(x + 1, y3, clusterIndexMap, pointClusters, index6); + if (y3 > 0) + DesertHive.ClusterGroup.AttemptClaim(x, y3 - 1, clusterIndexMap, pointClusters, index6); + if (y3 < clusterIndexMap.GetLength(1) - 1) + DesertHive.ClusterGroup.AttemptClaim(x, y3 + 1, clusterIndexMap, pointClusters, index6); + } + else + break; + } + } + foreach (List pointList in pointClusters) + pointList.Clear(); + for (int x = 0; x < clusterIndexMap.GetLength(0); ++x) + { + for (int y4 = 0; y4 < clusterIndexMap.GetLength(1); ++y4) + { + if (clusterIndexMap[x, y4] != -1) + pointClusters[clusterIndexMap[x, y4]].Add(new Point(x, y4)); + } + } + foreach (List pointList in pointClusters) + { + if (pointList.Count < 4) + pointList.Clear(); + } + foreach (List pointList in pointClusters) + { + DesertHive.Cluster cluster = new DesertHive.Cluster(); + if (pointList.Count > 0) + { + foreach (Point point4 in pointList) + cluster.Add(new DesertHive.Block((float) point4.X + (float) (((double) WorldGen.genRand.NextFloat() - 0.5) * 0.5), (float) point4.Y + (float) (((double) WorldGen.genRand.NextFloat() - 0.5) * 0.5))); + this.Add(cluster); + } + } + } + } + + [Flags] + private enum PostPlacementEffect : byte + { + None = 0, + Smooth = 1, + } + } +} diff --git a/GameContent/Biomes/Desert/LarvaHoleEntrance.cs b/GameContent/Biomes/Desert/LarvaHoleEntrance.cs new file mode 100644 index 0000000..4e4f612 --- /dev/null +++ b/GameContent/Biomes/Desert/LarvaHoleEntrance.cs @@ -0,0 +1,64 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.Desert.LarvaHoleEntrance +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes.Desert +{ + public static class LarvaHoleEntrance + { + public static void Place(DesertDescription description) + { + int num1 = WorldGen.genRand.Next(2, 4); + for (int index = 0; index < num1; ++index) + { + int holeRadius = WorldGen.genRand.Next(13, 16); + int num2 = (int) ((double) (index + 1) / (double) (num1 + 1) * (double) description.Surface.Width) + description.Desert.Left; + int y = (int) description.Surface[num2]; + LarvaHoleEntrance.PlaceAt(description, new Point(num2, y), holeRadius); + } + } + + private static void PlaceAt(DesertDescription description, Point position, int holeRadius) + { + ShapeData data = new ShapeData(); + WorldUtils.Gen(position, (GenShape) new Shapes.Rectangle(new Microsoft.Xna.Framework.Rectangle(-holeRadius, -holeRadius * 2, holeRadius * 2, holeRadius * 2)), new Actions.Clear().Output(data)); + WorldUtils.Gen(position, (GenShape) new Shapes.Tail((float) (holeRadius * 2), new Vector2(0.0f, (float) holeRadius * 1.5f)), Actions.Chain(new Actions.Clear().Output(data))); + WorldUtils.Gen(position, (GenShape) new ModShapes.All(data), Actions.Chain((GenAction) new Modifiers.Offset(0, 1), (GenAction) new Modifiers.Expand(1), (GenAction) new Modifiers.IsSolid(), (GenAction) new Actions.Smooth(true))); + GenShapeActionPair pair1 = new GenShapeActionPair((GenShape) new Shapes.Rectangle(1, 1), Actions.Chain((GenAction) new Modifiers.Blotches(), (GenAction) new Modifiers.IsSolid(), (GenAction) new Actions.Clear(), (GenAction) new Actions.PlaceWall((ushort) 187))); + GenShapeActionPair pair2 = new GenShapeActionPair((GenShape) new Shapes.Circle(2, 3), Actions.Chain((GenAction) new Modifiers.IsSolid(), (GenAction) new Actions.SetTile((ushort) 397), (GenAction) new Actions.PlaceWall((ushort) 187))); + int x = position.X; + int y1 = position.Y + (int) ((double) holeRadius * 1.5); + while (true) + { + int num1 = y1; + Microsoft.Xna.Framework.Rectangle rectangle = description.Hive; + int top1 = rectangle.Top; + int y2 = position.Y; + rectangle = description.Desert; + int top2 = rectangle.Top; + int num2 = (y2 - top2) * 2; + int num3 = top1 + num2 + 12; + if (num1 < num3) + { + WorldUtils.Gen(new Point(x, y1), pair1); + WorldUtils.Gen(new Point(x, y1), pair2); + if (y1 % 3 == 0) + { + x += WorldGen.genRand.Next(-1, 2); + WorldUtils.Gen(new Point(x, y1), pair1); + WorldUtils.Gen(new Point(x, y1), pair2); + } + ++y1; + } + else + break; + } + WorldUtils.Gen(new Point(position.X, position.Y + 2), (GenShape) new ModShapes.All(data), (GenAction) new Actions.PlaceWall((ushort) 0)); + } + } +} diff --git a/GameContent/Biomes/Desert/PitEntrance.cs b/GameContent/Biomes/Desert/PitEntrance.cs new file mode 100644 index 0000000..9bca716 --- /dev/null +++ b/GameContent/Biomes/Desert/PitEntrance.cs @@ -0,0 +1,78 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.Desert.PitEntrance +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; + +namespace Terraria.GameContent.Biomes.Desert +{ + public static class PitEntrance + { + public static void Place(DesertDescription description) + { + int holeRadius = WorldGen.genRand.Next(6, 9); + Point center = description.CombinedArea.Center; + center.Y = (int) description.Surface[center.X]; + PitEntrance.PlaceAt(description, center, holeRadius); + } + + private static void PlaceAt(DesertDescription description, Point position, int holeRadius) + { + for (int index = -holeRadius - 3; index < holeRadius + 3; ++index) + { + int j = (int) description.Surface[index + position.X]; + while (true) + { + int num1 = j; + Rectangle rectangle = description.Hive; + int num2 = rectangle.Top + 10; + if (num1 <= num2) + { + double num3 = (double) (j - (int) description.Surface[index + position.X]); + rectangle = description.Hive; + int top1 = rectangle.Top; + rectangle = description.Desert; + int top2 = rectangle.Top; + double num4 = (double) (top1 - top2); + float yProgress = MathHelper.Clamp((float) (num3 / num4), 0.0f, 1f); + int num5 = (int) ((double) PitEntrance.GetHoleRadiusScaleAt(yProgress) * (double) holeRadius); + if (Math.Abs(index) < num5) + Main.tile[index + position.X, j].ClearEverything(); + else if (Math.Abs(index) < num5 + 3 && (double) yProgress > 0.349999994039536) + Main.tile[index + position.X, j].ResetToType((ushort) 397); + float num6 = Math.Abs((float) index / (float) holeRadius); + float num7 = num6 * num6; + if (Math.Abs(index) < num5 + 3 && (double) (j - position.Y) > 15.0 - 3.0 * (double) num7) + { + Main.tile[index + position.X, j].wall = (ushort) 187; + WorldGen.SquareWallFrame(index + position.X, j - 1); + WorldGen.SquareWallFrame(index + position.X, j); + } + ++j; + } + else + break; + } + } + holeRadius += 4; + for (int index1 = -holeRadius; index1 < holeRadius; ++index1) + { + int num8 = holeRadius - Math.Abs(index1); + int num9 = Math.Min(10, num8 * num8); + for (int index2 = 0; index2 < num9; ++index2) + Main.tile[index1 + position.X, index2 + (int) description.Surface[index1 + position.X]].ClearEverything(); + } + } + + private static float GetHoleRadiusScaleAt(float yProgress) => (double) yProgress < 0.600000023841858 ? 1f : (float) ((1.0 - (double) PitEntrance.SmootherStep((float) (((double) yProgress - 0.600000023841858) / 0.400000005960464))) * 0.5 + 0.5); + + private static float SmootherStep(float delta) + { + delta = MathHelper.Clamp(delta, 0.0f, 1f); + return (float) (1.0 - Math.Cos((double) delta * 3.14159274101257) * 0.5 - 0.5); + } + } +} diff --git a/GameContent/Biomes/Desert/SandMound.cs b/GameContent/Biomes/Desert/SandMound.cs new file mode 100644 index 0000000..44ff573 --- /dev/null +++ b/GameContent/Biomes/Desert/SandMound.cs @@ -0,0 +1,69 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.Desert.SandMound +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; + +namespace Terraria.GameContent.Biomes.Desert +{ + public static class SandMound + { + public static void Place(DesertDescription description) + { + Rectangle desert1 = description.Desert; + desert1.Height = Math.Min(description.Desert.Height, description.Hive.Height / 2); + Rectangle desert2 = description.Desert; + desert2.Y = desert1.Bottom; + desert2.Height = Math.Max(0, description.Desert.Bottom - desert1.Bottom); + SurfaceMap surface = description.Surface; + int num1 = 0; + int num2 = 0; + for (int index1 = -5; index1 < desert1.Width + 5; ++index1) + { + float num3 = MathHelper.Clamp((float) ((double) Math.Abs((float) (index1 + 5) / (float) (desert1.Width + 10)) * 2.0 - 1.0), -1f, 1f); + if (index1 % 3 == 0) + num1 = Utils.Clamp(num1 + WorldGen.genRand.Next(-1, 2), -10, 10); + num2 = Utils.Clamp(num2 + WorldGen.genRand.Next(-1, 2), -10, 10); + float num4 = (float) Math.Sqrt(1.0 - (double) num3 * (double) num3 * (double) num3 * (double) num3); + int num5 = desert1.Bottom - (int) ((double) num4 * (double) desert1.Height) + num1; + if ((double) Math.Abs(num3) < 1.0) + { + float num6 = Utils.UnclampedSmoothStep(0.5f, 0.8f, Math.Abs(num3)); + float num7 = num6 * num6 * num6; + int num8 = Math.Min(10 + (int) ((double) desert1.Top - (double) num7 * 20.0) + num2, num5); + for (int index2 = (int) surface[index1 + desert1.X] - 1; index2 < num8; ++index2) + { + int index3 = index1 + desert1.X; + int index4 = index2; + Main.tile[index3, index4].active(false); + Main.tile[index3, index4].wall = (ushort) 0; + } + } + SandMound.PlaceSandColumn(index1 + desert1.X, num5, desert2.Bottom - num5); + } + } + + private static void PlaceSandColumn(int startX, int startY, int height) + { + for (int index = startY + height - 1; index >= startY; --index) + { + int i = startX; + int j = index; + Tile tile1 = Main.tile[i, j]; + tile1.liquid = (byte) 0; + Tile tile2 = Main.tile[i, j + 1]; + Tile tile3 = Main.tile[i, j + 2]; + tile1.type = (ushort) 53; + tile1.slope((byte) 0); + tile1.halfBrick(false); + tile1.active(true); + if (index < startY) + tile1.active(false); + WorldGen.SquareWallFrame(i, j); + } + } + } +} diff --git a/GameContent/Biomes/Desert/SurfaceMap.cs b/GameContent/Biomes/Desert/SurfaceMap.cs new file mode 100644 index 0000000..f00a69d --- /dev/null +++ b/GameContent/Biomes/Desert/SurfaceMap.cs @@ -0,0 +1,71 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.Desert.SurfaceMap +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Terraria.GameContent.Biomes.Desert +{ + public class SurfaceMap + { + public readonly float Average; + public readonly int Bottom; + public readonly int Top; + public readonly int X; + private readonly short[] _heights; + + public int Width => this._heights.Length; + + private SurfaceMap(short[] heights, int x) + { + this._heights = heights; + this.X = x; + int val1_1 = 0; + int val1_2 = int.MaxValue; + int num = 0; + for (int index = 0; index < heights.Length; ++index) + { + num += (int) heights[index]; + val1_1 = Math.Max(val1_1, (int) heights[index]); + val1_2 = Math.Min(val1_2, (int) heights[index]); + } + if ((double) val1_1 > Main.worldSurface - 10.0) + val1_1 = (int) Main.worldSurface - 10; + this.Bottom = val1_1; + this.Top = val1_2; + this.Average = (float) num / (float) this._heights.Length; + } + + public short this[int absoluteX] => this._heights[absoluteX - this.X]; + + public static SurfaceMap FromArea(int startX, int width) + { + int num1 = Main.maxTilesY / 2; + short[] heights = new short[width]; + for (int index1 = startX; index1 < startX + width; ++index1) + { + bool flag = false; + int num2 = 0; + for (int index2 = 50; index2 < 50 + num1; ++index2) + { + if (Main.tile[index1, index2].active()) + { + if (Main.tile[index1, index2].type == (ushort) 189 || Main.tile[index1, index2].type == (ushort) 196 || Main.tile[index1, index2].type == (ushort) 460) + flag = false; + else if (!flag) + { + num2 = index2; + flag = true; + } + } + if (!flag) + num2 = num1 + 50; + } + heights[index1 - startX] = (short) num2; + } + return new SurfaceMap(heights, startX); + } + } +} diff --git a/GameContent/Biomes/DesertBiome.cs b/GameContent/Biomes/DesertBiome.cs new file mode 100644 index 0000000..586fc41 --- /dev/null +++ b/GameContent/Biomes/DesertBiome.cs @@ -0,0 +1,74 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.DesertBiome +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Newtonsoft.Json; +using Terraria.GameContent.Biomes.Desert; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes +{ + public class DesertBiome : MicroBiome + { + [JsonProperty("ChanceOfEntrance")] + public float ChanceOfEntrance = 0.3333f; + + public override bool Place(Point origin, StructureMap structures) + { + DesertDescription fromPlacement = DesertDescription.CreateFromPlacement(origin); + if (!fromPlacement.IsValid) + return false; + DesertBiome.ExportDescriptionToEngine(fromPlacement); + SandMound.Place(fromPlacement); + fromPlacement.UpdateSurfaceMap(); + if ((double) GenBase._random.NextFloat() <= (double) this.ChanceOfEntrance) + { + switch (GenBase._random.Next(4)) + { + case 0: + ChambersEntrance.Place(fromPlacement); + break; + case 1: + AnthillEntrance.Place(fromPlacement); + break; + case 2: + LarvaHoleEntrance.Place(fromPlacement); + break; + case 3: + PitEntrance.Place(fromPlacement); + break; + } + } + DesertHive.Place(fromPlacement); + DesertBiome.CleanupArea(fromPlacement.Hive); + Microsoft.Xna.Framework.Rectangle area = new Microsoft.Xna.Framework.Rectangle(fromPlacement.CombinedArea.X, 50, fromPlacement.CombinedArea.Width, fromPlacement.CombinedArea.Bottom - 20); + structures.AddStructure(area, 10); + return true; + } + + private static void ExportDescriptionToEngine(DesertDescription description) + { + WorldGen.UndergroundDesertLocation = description.CombinedArea; + WorldGen.UndergroundDesertLocation.Inflate(10, 10); + WorldGen.UndergroundDesertHiveLocation = description.Hive; + } + + private static void CleanupArea(Microsoft.Xna.Framework.Rectangle area) + { + for (int index1 = area.Left - 20; index1 < area.Right + 20; ++index1) + { + for (int index2 = area.Top - 20; index2 < area.Bottom + 20; ++index2) + { + if (index1 > 0 && index1 < Main.maxTilesX - 1 && index2 > 0 && index2 < Main.maxTilesY - 1) + { + WorldGen.SquareWallFrame(index1, index2); + WorldUtils.TileFrame(index1, index2, true); + } + } + } + } + } +} diff --git a/GameContent/Biomes/DunesBiome.cs b/GameContent/Biomes/DunesBiome.cs new file mode 100644 index 0000000..b913542 --- /dev/null +++ b/GameContent/Biomes/DunesBiome.cs @@ -0,0 +1,150 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.DunesBiome +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Newtonsoft.Json; +using System; +using Terraria.GameContent.Biomes.Desert; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes +{ + public class DunesBiome : MicroBiome + { + [JsonProperty("SingleDunesWidth")] + private WorldGenRange _singleDunesWidth = WorldGenRange.Empty; + [JsonProperty("HeightScale")] + private float _heightScale = 1f; + + public int MaximumWidth => this._singleDunesWidth.ScaledMaximum * 2; + + public override bool Place(Point origin, StructureMap structures) + { + int height1 = (int) ((double) GenBase._random.Next(60, 100) * (double) this._heightScale); + int height2 = (int) ((double) GenBase._random.Next(60, 100) * (double) this._heightScale); + int random1 = this._singleDunesWidth.GetRandom(GenBase._random); + int random2 = this._singleDunesWidth.GetRandom(GenBase._random); + DunesBiome.DunesDescription fromPlacement1 = DunesBiome.DunesDescription.CreateFromPlacement(new Point(origin.X - random1 / 2 + 30, origin.Y), random1, height1); + DunesBiome.DunesDescription fromPlacement2 = DunesBiome.DunesDescription.CreateFromPlacement(new Point(origin.X + random2 / 2 - 30, origin.Y), random2, height2); + this.PlaceSingle(fromPlacement1, structures); + this.PlaceSingle(fromPlacement2, structures); + return true; + } + + private void PlaceSingle(DunesBiome.DunesDescription description, StructureMap structures) + { + int num1 = GenBase._random.Next(3) + 8; + for (int index = 0; index < num1 - 1; ++index) + { + int num2 = (int) (2.0 / (double) num1 * (double) description.Area.Width); + int num3 = (int) ((double) index / (double) num1 * (double) description.Area.Width + (double) description.Area.Left) + num2 * 2 / 5 + GenBase._random.Next(-5, 6); + float num4 = (float) (1.0 - (double) Math.Abs((float) index / (float) (num1 - 2) - 0.5f) * 2.0); + DunesBiome.PlaceHill(num3 - num2 / 2, num3 + num2 / 2, (float) ((double) num4 * 0.300000011920929 + 0.200000002980232) * this._heightScale, description); + } + int num5 = GenBase._random.Next(2) + 1; + for (int index = 0; index < num5; ++index) + { + int num6 = description.Area.Width / 2; + int num7 = description.Area.Center.X + GenBase._random.Next(-10, 11); + DunesBiome.PlaceHill(num7 - num6 / 2, num7 + num6 / 2, 0.8f * this._heightScale, description); + } + structures.AddStructure(description.Area, 20); + } + + private static void PlaceHill( + int startX, + int endX, + float scale, + DunesBiome.DunesDescription description) + { + Point startPoint = new Point(startX, (int) description.Surface[startX]); + Point endPoint = new Point(endX, (int) description.Surface[endX]); + Point point1 = new Point((startPoint.X + endPoint.X) / 2, (startPoint.Y + endPoint.Y) / 2 - (int) (35.0 * (double) scale)); + int num = (endPoint.X - point1.X) / 4; + int minValue = (endPoint.X - point1.X) / 16; + if (description.WindDirection == DunesBiome.WindDirection.Left) + point1.X -= WorldGen.genRand.Next(minValue, num + 1); + else + point1.X += WorldGen.genRand.Next(minValue, num + 1); + Point point2 = new Point(0, (int) ((double) scale * 12.0)); + Point point3 = new Point(point2.X / -2, point2.Y / -2); + DunesBiome.PlaceCurvedLine(startPoint, point1, description.WindDirection != DunesBiome.WindDirection.Left ? point3 : point2, description); + DunesBiome.PlaceCurvedLine(point1, endPoint, description.WindDirection == DunesBiome.WindDirection.Left ? point3 : point2, description); + } + + private static void PlaceCurvedLine( + Point startPoint, + Point endPoint, + Point anchorOffset, + DunesBiome.DunesDescription description) + { + Point p = new Point((startPoint.X + endPoint.X) / 2, (startPoint.Y + endPoint.Y) / 2); + p.X += anchorOffset.X; + p.Y += anchorOffset.Y; + Vector2 vector2_1 = startPoint.ToVector2(); + Vector2 vector2_2 = endPoint.ToVector2(); + Vector2 vector2_3 = p.ToVector2(); + float num1 = (float) (0.5 / ((double) vector2_2.X - (double) vector2_1.X)); + Point point1 = new Point(-1, -1); + for (float amount = 0.0f; (double) amount <= 1.0; amount += num1) + { + Point point2 = Vector2.Lerp(Vector2.Lerp(vector2_1, vector2_3, amount), Vector2.Lerp(vector2_3, vector2_2, amount), amount).ToPoint(); + if (!(point2 == point1)) + { + point1 = point2; + int num2 = description.Area.Width / 2 - Math.Abs(point2.X - description.Area.Center.X); + int num3 = (int) description.Surface[point2.X] + (int) (Math.Sqrt((double) num2) * 3.0); + for (int index = point2.Y - 10; index < point2.Y; ++index) + { + if (GenBase._tiles[point2.X, index].active() && GenBase._tiles[point2.X, index].type != (ushort) 53) + GenBase._tiles[point2.X, index].ClearEverything(); + } + for (int y = point2.Y; y < num3; ++y) + { + GenBase._tiles[point2.X, y].ResetToType((ushort) 53); + Tile.SmoothSlope(point2.X, y); + } + } + } + } + + private class DunesDescription + { + public bool IsValid { get; private set; } + + public SurfaceMap Surface { get; private set; } + + public Microsoft.Xna.Framework.Rectangle Area { get; private set; } + + public DunesBiome.WindDirection WindDirection { get; private set; } + + private DunesDescription() + { + } + + public static DunesBiome.DunesDescription CreateFromPlacement( + Point origin, + int width, + int height) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(origin.X - width / 2, origin.Y - height / 2, width, height); + return new DunesBiome.DunesDescription() + { + Area = rectangle, + IsValid = true, + Surface = SurfaceMap.FromArea(rectangle.Left - 20, rectangle.Width + 40), + WindDirection = WorldGen.genRand.Next(2) == 0 ? DunesBiome.WindDirection.Left : DunesBiome.WindDirection.Right + }; + } + } + + private enum WindDirection + { + Left, + Right, + } + } +} diff --git a/GameContent/Biomes/EnchantedSwordBiome.cs b/GameContent/Biomes/EnchantedSwordBiome.cs new file mode 100644 index 0000000..d80f6be --- /dev/null +++ b/GameContent/Biomes/EnchantedSwordBiome.cs @@ -0,0 +1,87 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.EnchantedSwordBiome +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Newtonsoft.Json; +using System.Collections.Generic; +using Terraria.GameContent.Generation; +using Terraria.ID; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes +{ + public class EnchantedSwordBiome : MicroBiome + { + [JsonProperty("ChanceOfEntrance")] + private float _chanceOfEntrance; + [JsonProperty("ChanceOfRealSword")] + private float _chanceOfRealSword; + + public override bool Place(Point origin, StructureMap structures) + { + Dictionary resultsOutput = new Dictionary(); + WorldUtils.Gen(new Point(origin.X - 25, origin.Y - 25), (GenShape) new Shapes.Rectangle(50, 50), (GenAction) new Actions.TileScanner(new ushort[2] + { + (ushort) 0, + (ushort) 1 + }).Output(resultsOutput)); + if (resultsOutput[(ushort) 0] + resultsOutput[(ushort) 1] < 1250) + return false; + Point result; + bool flag = WorldUtils.Find(origin, Searches.Chain((GenSearch) new Searches.Up(1000), new Conditions.IsSolid().AreaOr(1, 50).Not()), out result); + if (WorldUtils.Find(origin, Searches.Chain((GenSearch) new Searches.Up(origin.Y - result.Y), (GenCondition) new Conditions.IsTile(new ushort[1] + { + (ushort) 53 + })), out Point _) || !flag) + return false; + result.Y += 50; + ShapeData data1 = new ShapeData(); + ShapeData shapeData = new ShapeData(); + Point point1 = new Point(origin.X, origin.Y + 20); + Point point2 = new Point(origin.X, origin.Y + 30); + bool[] validTiles = new bool[TileID.Sets.GeneralPlacementTiles.Length]; + for (int index = 0; index < validTiles.Length; ++index) + validTiles[index] = TileID.Sets.GeneralPlacementTiles[index]; + validTiles[21] = false; + validTiles[467] = false; + float xScale = (float) (0.800000011920929 + (double) GenBase._random.NextFloat() * 0.5); + if (!structures.CanPlace(new Microsoft.Xna.Framework.Rectangle(point1.X - (int) (20.0 * (double) xScale), point1.Y - 20, (int) (40.0 * (double) xScale), 40), validTiles) || !structures.CanPlace(new Microsoft.Xna.Framework.Rectangle(origin.X, result.Y + 10, 1, origin.Y - result.Y - 9), validTiles, 2)) + return false; + WorldUtils.Gen(point1, (GenShape) new Shapes.Slime(20, xScale, 1f), Actions.Chain((GenAction) new Modifiers.Blotches(chance: 0.4), new Actions.ClearTile(true).Output(data1))); + WorldUtils.Gen(point2, (GenShape) new Shapes.Mound(14, 14), Actions.Chain((GenAction) new Modifiers.Blotches(2, 1, 0.8), (GenAction) new Actions.SetTile((ushort) 0), new Actions.SetFrames(true).Output(shapeData))); + data1.Subtract(shapeData, point1, point2); + WorldUtils.Gen(point1, (GenShape) new ModShapes.InnerOutline(data1), Actions.Chain((GenAction) new Actions.SetTile((ushort) 2), (GenAction) new Actions.SetFrames(true))); + WorldUtils.Gen(point1, (GenShape) new ModShapes.All(data1), Actions.Chain((GenAction) new Modifiers.RectangleMask(-40, 40, 0, 40), (GenAction) new Modifiers.IsEmpty(), (GenAction) new Actions.SetLiquid())); + WorldUtils.Gen(point1, (GenShape) new ModShapes.All(data1), Actions.Chain((GenAction) new Actions.PlaceWall((ushort) 68), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + (ushort) 2 + }), (GenAction) new Modifiers.Offset(0, 1), (GenAction) new ActionVines(3, 5, 382))); + if ((double) GenBase._random.NextFloat() <= (double) this._chanceOfEntrance) + { + ShapeData data2 = new ShapeData(); + WorldUtils.Gen(new Point(origin.X, result.Y + 10), (GenShape) new Shapes.Rectangle(1, origin.Y - result.Y - 9), Actions.Chain((GenAction) new Modifiers.Blotches(chance: 0.2), (GenAction) new Modifiers.SkipTiles(new ushort[2] + { + (ushort) 191, + (ushort) 192 + }), new Actions.ClearTile().Output(data2), (GenAction) new Modifiers.Expand(1), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + (ushort) 53 + }), new Actions.SetTile((ushort) 397).Output(data2))); + WorldUtils.Gen(new Point(origin.X, result.Y + 10), (GenShape) new ModShapes.All(data2), (GenAction) new Actions.SetFrames(true)); + } + if ((double) GenBase._random.NextFloat() <= (double) this._chanceOfRealSword) + WorldGen.PlaceTile(point2.X, point2.Y - 15, 187, true, style: 17); + else + WorldGen.PlaceTile(point2.X, point2.Y - 15, 186, true, style: 15); + WorldUtils.Gen(point2, (GenShape) new ModShapes.All(shapeData), Actions.Chain((GenAction) new Modifiers.Offset(0, -1), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + (ushort) 2 + }), (GenAction) new Modifiers.Offset(0, -1), (GenAction) new ActionGrass())); + structures.AddProtectedStructure(new Microsoft.Xna.Framework.Rectangle(point1.X - (int) (20.0 * (double) xScale), point1.Y - 20, (int) (40.0 * (double) xScale), 40), 10); + return true; + } + } +} diff --git a/GameContent/Biomes/GraniteBiome.cs b/GameContent/Biomes/GraniteBiome.cs new file mode 100644 index 0000000..922dcd7 --- /dev/null +++ b/GameContent/Biomes/GraniteBiome.cs @@ -0,0 +1,292 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.GraniteBiome +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.Utilities; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes +{ + public class GraniteBiome : MicroBiome + { + private const int MAX_MAGMA_ITERATIONS = 300; + private GraniteBiome.Magma[,] _sourceMagmaMap = new GraniteBiome.Magma[200, 200]; + private GraniteBiome.Magma[,] _targetMagmaMap = new GraniteBiome.Magma[200, 200]; + private static Vector2[] _normalisedVectors = new Vector2[9] + { + Vector2.Normalize(new Vector2(-1f, -1f)), + Vector2.Normalize(new Vector2(-1f, 0.0f)), + Vector2.Normalize(new Vector2(-1f, 1f)), + Vector2.Normalize(new Vector2(0.0f, -1f)), + new Vector2(0.0f, 0.0f), + Vector2.Normalize(new Vector2(0.0f, 1f)), + Vector2.Normalize(new Vector2(1f, -1f)), + Vector2.Normalize(new Vector2(1f, 0.0f)), + Vector2.Normalize(new Vector2(1f, 1f)) + }; + + public static bool CanPlace(Point origin, StructureMap structures) => !WorldGen.BiomeTileCheck(origin.X, origin.Y) && !GenBase._tiles[origin.X, origin.Y].active(); + + public override bool Place(Point origin, StructureMap structures) + { + if (GenBase._tiles[origin.X, origin.Y].active()) + return false; + origin.X -= this._sourceMagmaMap.GetLength(0) / 2; + origin.Y -= this._sourceMagmaMap.GetLength(1) / 2; + this.BuildMagmaMap(origin); + Microsoft.Xna.Framework.Rectangle effectedMapArea; + this.SimulatePressure(out effectedMapArea); + this.PlaceGranite(origin, effectedMapArea); + this.CleanupTiles(origin, effectedMapArea); + this.PlaceDecorations(origin, effectedMapArea); + structures.AddStructure(effectedMapArea, 8); + return true; + } + + private void BuildMagmaMap(Point tileOrigin) + { + this._sourceMagmaMap = new GraniteBiome.Magma[200, 200]; + this._targetMagmaMap = new GraniteBiome.Magma[200, 200]; + for (int index1 = 0; index1 < this._sourceMagmaMap.GetLength(0); ++index1) + { + for (int index2 = 0; index2 < this._sourceMagmaMap.GetLength(1); ++index2) + { + int i = index1 + tileOrigin.X; + int j = index2 + tileOrigin.Y; + this._sourceMagmaMap[index1, index2] = GraniteBiome.Magma.CreateEmpty(WorldGen.SolidTile(i, j) ? 4f : 1f); + this._targetMagmaMap[index1, index2] = this._sourceMagmaMap[index1, index2]; + } + } + } + + private void SimulatePressure(out Microsoft.Xna.Framework.Rectangle effectedMapArea) + { + int length1 = this._sourceMagmaMap.GetLength(0); + int length2 = this._sourceMagmaMap.GetLength(1); + int index1 = length1 / 2; + int index2 = length2 / 2; + int num1 = index1; + int min1 = num1; + int num2 = index2; + int min2 = num2; + for (int index3 = 0; index3 < 300; ++index3) + { + for (int index4 = num1; index4 <= min1; ++index4) + { + for (int index5 = num2; index5 <= min2; ++index5) + { + GraniteBiome.Magma sourceMagma1 = this._sourceMagmaMap[index4, index5]; + if (sourceMagma1.IsActive) + { + float num3 = 0.0f; + Vector2 zero = Vector2.Zero; + for (int index6 = -1; index6 <= 1; ++index6) + { + for (int index7 = -1; index7 <= 1; ++index7) + { + if (index6 != 0 || index7 != 0) + { + Vector2 normalisedVector = GraniteBiome._normalisedVectors[(index6 + 1) * 3 + (index7 + 1)]; + GraniteBiome.Magma sourceMagma2 = this._sourceMagmaMap[index4 + index6, index5 + index7]; + if ((double) sourceMagma1.Pressure > 0.00999999977648258 && !sourceMagma2.IsActive) + { + if (index6 == -1) + num1 = Utils.Clamp(index4 + index6, 1, num1); + else + min1 = Utils.Clamp(index4 + index6, min1, length1 - 2); + if (index7 == -1) + num2 = Utils.Clamp(index5 + index7, 1, num2); + else + min2 = Utils.Clamp(index5 + index7, min2, length2 - 2); + this._targetMagmaMap[index4 + index6, index5 + index7] = sourceMagma2.ToFlow(); + } + float pressure = sourceMagma2.Pressure; + num3 += pressure; + zero += pressure * normalisedVector; + } + } + } + float num4 = num3 / 8f; + if ((double) num4 > (double) sourceMagma1.Resistance) + { + float num5 = zero.Length() / 8f; + float pressure = Math.Max(0.0f, (float) ((double) Math.Max(num4 - num5 - sourceMagma1.Pressure, 0.0f) + (double) num5 + (double) sourceMagma1.Pressure * 0.875) - sourceMagma1.Resistance); + this._targetMagmaMap[index4, index5] = GraniteBiome.Magma.CreateFlow(pressure, Math.Max(0.0f, sourceMagma1.Resistance - pressure * 0.02f)); + } + } + } + } + if (index3 < 2) + this._targetMagmaMap[index1, index2] = GraniteBiome.Magma.CreateFlow(25f); + Utils.Swap(ref this._sourceMagmaMap, ref this._targetMagmaMap); + } + effectedMapArea = new Microsoft.Xna.Framework.Rectangle(num1, num2, min1 - num1 + 1, min2 - num2 + 1); + } + + private bool ShouldUseLava(Point tileOrigin) + { + int length1 = this._sourceMagmaMap.GetLength(0); + int length2 = this._sourceMagmaMap.GetLength(1); + int num1 = length1 / 2; + int num2 = length2 / 2; + if (tileOrigin.Y + num2 <= WorldGen.lavaLine - 30) + return false; + for (int index1 = -50; index1 < 50; ++index1) + { + for (int index2 = -50; index2 < 50; ++index2) + { + if (GenBase._tiles[tileOrigin.X + num1 + index1, tileOrigin.Y + num2 + index2].active()) + { + switch (GenBase._tiles[tileOrigin.X + num1 + index1, tileOrigin.Y + num2 + index2].type) + { + case 147: + case 161: + case 162: + case 163: + case 200: + return false; + default: + continue; + } + } + } + } + return true; + } + + private void PlaceGranite(Point tileOrigin, Microsoft.Xna.Framework.Rectangle magmaMapArea) + { + bool flag = this.ShouldUseLava(tileOrigin); + ushort type = 368; + ushort num = 180; + if (WorldGen.drunkWorldGen) + { + type = (ushort) 367; + num = (ushort) 178; + } + for (int left = magmaMapArea.Left; left < magmaMapArea.Right; ++left) + { + for (int top = magmaMapArea.Top; top < magmaMapArea.Bottom; ++top) + { + GraniteBiome.Magma sourceMagma = this._sourceMagmaMap[left, top]; + if (sourceMagma.IsActive) + { + Tile tile = GenBase._tiles[tileOrigin.X + left, tileOrigin.Y + top]; + if ((double) Math.Max(1f - Math.Max(0.0f, (float) (Math.Sin((double) (tileOrigin.Y + top) * 0.400000005960464) * 0.699999988079071 + 1.20000004768372) * (float) (0.200000002980232 + 0.5 / Math.Sqrt((double) Math.Max(0.0f, sourceMagma.Pressure - sourceMagma.Resistance)))), sourceMagma.Pressure / 15f) > 0.349999994039536 + (WorldGen.SolidTile(tileOrigin.X + left, tileOrigin.Y + top) ? 0.0 : 0.5)) + { + if (TileID.Sets.Ore[(int) tile.type]) + tile.ResetToType(tile.type); + else + tile.ResetToType(type); + tile.wall = num; + } + else if ((double) sourceMagma.Resistance < 0.00999999977648258) + { + WorldUtils.ClearTile(tileOrigin.X + left, tileOrigin.Y + top); + tile.wall = num; + } + if (tile.liquid > (byte) 0 & flag) + tile.liquidType(1); + } + } + } + } + + private void CleanupTiles(Point tileOrigin, Microsoft.Xna.Framework.Rectangle magmaMapArea) + { + ushort num1 = 180; + if (WorldGen.drunkWorldGen) + num1 = (ushort) 178; + List point16List = new List(); + for (int left = magmaMapArea.Left; left < magmaMapArea.Right; ++left) + { + for (int top = magmaMapArea.Top; top < magmaMapArea.Bottom; ++top) + { + if (this._sourceMagmaMap[left, top].IsActive) + { + int num2 = 0; + int num3 = left + tileOrigin.X; + int num4 = top + tileOrigin.Y; + if (WorldGen.SolidTile(num3, num4)) + { + for (int index1 = -1; index1 <= 1; ++index1) + { + for (int index2 = -1; index2 <= 1; ++index2) + { + if (WorldGen.SolidTile(num3 + index1, num4 + index2)) + ++num2; + } + } + if (num2 < 3) + point16List.Add(new Point16(num3, num4)); + } + } + } + } + foreach (Point16 point16 in point16List) + { + int x = (int) point16.X; + int y = (int) point16.Y; + WorldUtils.ClearTile(x, y, true); + GenBase._tiles[x, y].wall = num1; + } + point16List.Clear(); + } + + private void PlaceDecorations(Point tileOrigin, Microsoft.Xna.Framework.Rectangle magmaMapArea) + { + FastRandom fastRandom1 = new FastRandom(Main.ActiveWorldFileData.Seed).WithModifier(65440UL); + for (int left = magmaMapArea.Left; left < magmaMapArea.Right; ++left) + { + for (int top = magmaMapArea.Top; top < magmaMapArea.Bottom; ++top) + { + GraniteBiome.Magma sourceMagma = this._sourceMagmaMap[left, top]; + int index1 = left + tileOrigin.X; + int index2 = top + tileOrigin.Y; + if (sourceMagma.IsActive) + { + WorldUtils.TileFrame(index1, index2); + WorldGen.SquareWallFrame(index1, index2); + FastRandom fastRandom2 = fastRandom1.WithModifier(index1, index2); + if (fastRandom2.Next(8) == 0 && GenBase._tiles[index1, index2].active()) + { + if (!GenBase._tiles[index1, index2 + 1].active()) + WorldGen.PlaceUncheckedStalactite(index1, index2 + 1, fastRandom2.Next(2) == 0, fastRandom2.Next(3), false); + if (!GenBase._tiles[index1, index2 - 1].active()) + WorldGen.PlaceUncheckedStalactite(index1, index2 - 1, fastRandom2.Next(2) == 0, fastRandom2.Next(3), false); + } + if (fastRandom2.Next(2) == 0) + Tile.SmoothSlope(index1, index2); + } + } + } + } + + private struct Magma + { + public readonly float Pressure; + public readonly float Resistance; + public readonly bool IsActive; + + private Magma(float pressure, float resistance, bool active) + { + this.Pressure = pressure; + this.Resistance = resistance; + this.IsActive = active; + } + + public GraniteBiome.Magma ToFlow() => new GraniteBiome.Magma(this.Pressure, this.Resistance, true); + + public static GraniteBiome.Magma CreateFlow(float pressure, float resistance = 0.0f) => new GraniteBiome.Magma(pressure, resistance, true); + + public static GraniteBiome.Magma CreateEmpty(float resistance = 0.0f) => new GraniteBiome.Magma(0.0f, resistance, false); + } + } +} diff --git a/GameContent/Biomes/HiveBiome.cs b/GameContent/Biomes/HiveBiome.cs new file mode 100644 index 0000000..6a0ad8c --- /dev/null +++ b/GameContent/Biomes/HiveBiome.cs @@ -0,0 +1,324 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.HiveBiome +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using Terraria.Utilities; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes +{ + public class HiveBiome : MicroBiome + { + public override bool Place(Point origin, StructureMap structures) + { + if (!structures.CanPlace(new Microsoft.Xna.Framework.Rectangle(origin.X - 50, origin.Y - 50, 100, 100)) || HiveBiome.TooCloseToImportantLocations(origin)) + return false; + Ref count1 = new Ref(0); + Ref count2 = new Ref(0); + Ref count3 = new Ref(0); + WorldUtils.Gen(origin, (GenShape) new Shapes.Circle(15), Actions.Chain((GenAction) new Modifiers.IsSolid(), (GenAction) new Actions.Scanner(count1), (GenAction) new Modifiers.OnlyTiles(new ushort[2] + { + (ushort) 60, + (ushort) 59 + }), (GenAction) new Actions.Scanner(count2), (GenAction) new Modifiers.OnlyTiles(new ushort[1] + { + (ushort) 60 + }), (GenAction) new Actions.Scanner(count3))); + if ((double) count2.Value / (double) count1.Value < 0.75 || count3.Value < 2) + return false; + int index1 = 0; + int[] numArray1 = new int[1000]; + int[] numArray2 = new int[1000]; + Vector2 position1 = origin.ToVector2(); + int num1 = WorldGen.genRand.Next(2, 5); + if (WorldGen.drunkWorldGen) + num1 += WorldGen.genRand.Next(7, 10); + for (int index2 = 0; index2 < num1; ++index2) + { + Vector2 vector2 = position1; + int num2 = WorldGen.genRand.Next(2, 5); + for (int index3 = 0; index3 < num2; ++index3) + vector2 = HiveBiome.CreateHiveTunnel((int) position1.X, (int) position1.Y, WorldGen.genRand); + position1 = vector2; + numArray1[index1] = (int) position1.X; + numArray2[index1] = (int) position1.Y; + ++index1; + } + HiveBiome.FrameOutAllHiveContents(origin, 50); + for (int index4 = 0; index4 < index1; ++index4) + { + int x1 = numArray1[index4]; + int y = numArray2[index4]; + int dir = 1; + if (WorldGen.genRand.Next(2) == 0) + dir = -1; + bool flag = false; + while (WorldGen.InWorld(x1, y, 10) && HiveBiome.BadSpotForHoneyFall(x1, y)) + { + x1 += dir; + if (Math.Abs(x1 - numArray1[index4]) > 50) + { + flag = true; + break; + } + } + if (!flag) + { + int x2 = x1 + dir; + if (!HiveBiome.SpotActuallyNotInHive(x2, y)) + { + HiveBiome.CreateBlockedHoneyCube(x2, y); + HiveBiome.CreateDentForHoneyFall(x2, y, dir); + } + } + } + HiveBiome.CreateStandForLarva(position1); + if (WorldGen.drunkWorldGen) + { + for (int index5 = 0; index5 < 1000; ++index5) + { + Vector2 position2 = position1; + position2.X += (float) WorldGen.genRand.Next(-50, 51); + position2.Y += (float) WorldGen.genRand.Next(-50, 51); + if (WorldGen.InWorld((int) position2.X, (int) position2.Y) && (double) Vector2.Distance(position1, position2) > 10.0 && !Main.tile[(int) position2.X, (int) position2.Y].active() && Main.tile[(int) position2.X, (int) position2.Y].wall == (ushort) 86) + { + HiveBiome.CreateStandForLarva(position2); + break; + } + } + } + structures.AddProtectedStructure(new Microsoft.Xna.Framework.Rectangle(origin.X - 50, origin.Y - 50, 100, 100), 5); + return true; + } + + private static void FrameOutAllHiveContents(Point origin, int squareHalfWidth) + { + int num1 = Math.Max(10, origin.X - squareHalfWidth); + int num2 = Math.Min(Main.maxTilesX - 10, origin.X + squareHalfWidth); + int num3 = Math.Max(10, origin.Y - squareHalfWidth); + int num4 = Math.Min(Main.maxTilesY - 10, origin.Y + squareHalfWidth); + for (int i = num1; i < num2; ++i) + { + for (int j = num3; j < num4; ++j) + { + Tile tile = Main.tile[i, j]; + if (tile.active() && tile.type == (ushort) 225) + WorldGen.SquareTileFrame(i, j); + if (tile.wall == (ushort) 86) + WorldGen.SquareWallFrame(i, j); + } + } + } + + private static Vector2 CreateHiveTunnel(int i, int j, UnifiedRandom random) + { + double num1 = (double) random.Next(12, 21); + float num2 = (float) random.Next(10, 21); + if (WorldGen.drunkWorldGen) + { + double num3 = (double) random.Next(8, 26); + float num4 = (float) random.Next(10, 41); + float num5 = (float) (((double) (Main.maxTilesX / 4200) + 1.0) / 2.0); + num1 = num3 * (double) num5; + num2 = num4 * num5; + } + double num6 = num1; + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j; + Vector2 vector2_2; + vector2_2.X = (float) random.Next(-10, 11) * 0.2f; + vector2_2.Y = (float) random.Next(-10, 11) * 0.2f; + while (num1 > 0.0 && (double) num2 > 0.0) + { + if ((double) vector2_1.Y > (double) (Main.maxTilesY - 250)) + num2 = 0.0f; + num1 = num6 * (1.0 + (double) random.Next(-20, 20) * 0.00999999977648258); + float num7 = num2 - 1f; + int num8 = (int) ((double) vector2_1.X - num1); + int num9 = (int) ((double) vector2_1.X + num1); + int num10 = (int) ((double) vector2_1.Y - num1); + int num11 = (int) ((double) vector2_1.Y + num1); + if (num8 < 1) + num8 = 1; + if (num9 > Main.maxTilesX - 1) + num9 = Main.maxTilesX - 1; + if (num10 < 1) + num10 = 1; + if (num11 > Main.maxTilesY - 1) + num11 = Main.maxTilesY - 1; + for (int x = num8; x < num9; ++x) + { + for (int y = num10; y < num11; ++y) + { + if (!WorldGen.InWorld(x, y, 50)) + { + num7 = 0.0f; + } + else + { + if (Main.tile[x - 10, y].wall == (ushort) 87) + num7 = 0.0f; + if (Main.tile[x + 10, y].wall == (ushort) 87) + num7 = 0.0f; + if (Main.tile[x, y - 10].wall == (ushort) 87) + num7 = 0.0f; + if (Main.tile[x, y + 10].wall == (ushort) 87) + num7 = 0.0f; + } + if ((double) y < Main.worldSurface && Main.tile[x, y - 5].wall == (ushort) 0) + num7 = 0.0f; + double num12 = (double) Math.Abs((float) x - vector2_1.X); + float num13 = Math.Abs((float) y - vector2_1.Y); + double num14 = Math.Sqrt(num12 * num12 + (double) num13 * (double) num13); + if (num14 < num6 * 0.4 * (1.0 + (double) random.Next(-10, 11) * 0.005)) + { + if (random.Next(3) == 0) + Main.tile[x, y].liquid = byte.MaxValue; + if (WorldGen.drunkWorldGen) + Main.tile[x, y].liquid = byte.MaxValue; + Main.tile[x, y].honey(true); + Main.tile[x, y].wall = (ushort) 86; + Main.tile[x, y].active(false); + Main.tile[x, y].halfBrick(false); + Main.tile[x, y].slope((byte) 0); + } + else if (num14 < num6 * 0.75 * (1.0 + (double) random.Next(-10, 11) * 0.005)) + { + Main.tile[x, y].liquid = (byte) 0; + if (Main.tile[x, y].wall != (ushort) 86) + { + Main.tile[x, y].active(true); + Main.tile[x, y].halfBrick(false); + Main.tile[x, y].slope((byte) 0); + Main.tile[x, y].type = (ushort) 225; + } + } + if (num14 < num6 * 0.6 * (1.0 + (double) random.Next(-10, 11) * 0.005)) + { + Main.tile[x, y].wall = (ushort) 86; + if (WorldGen.drunkWorldGen && random.Next(2) == 0) + { + Main.tile[x, y].liquid = byte.MaxValue; + Main.tile[x, y].honey(true); + } + } + } + } + vector2_1 += vector2_2; + num2 = num7 - 1f; + vector2_2.Y += (float) random.Next(-10, 11) * 0.05f; + vector2_2.X += (float) random.Next(-10, 11) * 0.05f; + } + return vector2_1; + } + + private static bool TooCloseToImportantLocations(Point origin) + { + int x = origin.X; + int y = origin.Y; + int num = 150; + for (int index1 = x - num; index1 < x + num; index1 += 10) + { + if (index1 > 0 && index1 <= Main.maxTilesX - 1) + { + for (int index2 = y - num; index2 < y + num; index2 += 10) + { + if (index2 > 0 && index2 <= Main.maxTilesY - 1 && (Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 226 || Main.tile[index1, index2].wall == (ushort) 83 || Main.tile[index1, index2].wall == (ushort) 3 || Main.tile[index1, index2].wall == (ushort) 87)) + return true; + } + } + } + return false; + } + + private static void CreateDentForHoneyFall(int x, int y, int dir) + { + dir *= -1; + ++y; + int num = 0; + while ((num < 4 || WorldGen.SolidTile(x, y)) && x > 10 && x < Main.maxTilesX - 10) + { + ++num; + x += dir; + if (WorldGen.SolidTile(x, y)) + { + WorldGen.PoundTile(x, y); + if (!Main.tile[x, y + 1].active()) + { + Main.tile[x, y + 1].active(true); + Main.tile[x, y + 1].type = (ushort) 225; + } + } + } + } + + private static void CreateBlockedHoneyCube(int x, int y) + { + for (int index1 = x - 1; index1 <= x + 2; ++index1) + { + for (int index2 = y - 1; index2 <= y + 2; ++index2) + { + if (index1 >= x && index1 <= x + 1 && index2 >= y && index2 <= y + 1) + { + Main.tile[index1, index2].active(false); + Main.tile[index1, index2].liquid = byte.MaxValue; + Main.tile[index1, index2].honey(true); + } + else + { + Main.tile[index1, index2].active(true); + Main.tile[index1, index2].type = (ushort) 225; + } + } + } + } + + private static bool SpotActuallyNotInHive(int x, int y) + { + for (int index1 = x - 1; index1 <= x + 2; ++index1) + { + for (int index2 = y - 1; index2 <= y + 2; ++index2) + { + if (index1 < 10 || index1 > Main.maxTilesX - 10 || Main.tile[index1, index2].active() && Main.tile[index1, index2].type != (ushort) 225) + return true; + } + } + return false; + } + + private static bool BadSpotForHoneyFall(int x, int y) => !Main.tile[x, y].active() || !Main.tile[x, y + 1].active() || !Main.tile[x + 1, y].active() || !Main.tile[x + 1, y + 1].active(); + + public static void CreateStandForLarva(Vector2 position) + { + WorldGen.larvaX[WorldGen.numLarva] = Utils.Clamp((int) position.X, 5, Main.maxTilesX - 5); + WorldGen.larvaY[WorldGen.numLarva] = Utils.Clamp((int) position.Y, 5, Main.maxTilesY - 5); + ++WorldGen.numLarva; + if (WorldGen.numLarva >= WorldGen.larvaX.Length) + WorldGen.numLarva = WorldGen.larvaX.Length - 1; + int x = (int) position.X; + int y = (int) position.Y; + for (int index1 = x - 1; index1 <= x + 1 && index1 > 0 && index1 < Main.maxTilesX; ++index1) + { + for (int index2 = y - 2; index2 <= y + 1 && index2 > 0 && index2 < Main.maxTilesY; ++index2) + { + if (index2 != y + 1) + { + Main.tile[index1, index2].active(false); + } + else + { + Main.tile[index1, index2].active(true); + Main.tile[index1, index2].type = (ushort) 225; + Main.tile[index1, index2].slope((byte) 0); + Main.tile[index1, index2].halfBrick(false); + } + } + } + } + } +} diff --git a/GameContent/Biomes/HoneyPatchBiome.cs b/GameContent/Biomes/HoneyPatchBiome.cs new file mode 100644 index 0000000..3e6b784 --- /dev/null +++ b/GameContent/Biomes/HoneyPatchBiome.cs @@ -0,0 +1,34 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.HoneyPatchBiome +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes +{ + public class HoneyPatchBiome : MicroBiome + { + public override bool Place(Point origin, StructureMap structures) + { + if (GenBase._tiles[origin.X, origin.Y].active() && WorldGen.SolidTile(origin.X, origin.Y)) + return false; + Point result; + if (!WorldUtils.Find(origin, Searches.Chain((GenSearch) new Searches.Down(80), (GenCondition) new Conditions.IsSolid()), out result)) + return false; + result.Y += 2; + Ref count = new Ref(0); + WorldUtils.Gen(result, (GenShape) new Shapes.Circle(8), Actions.Chain((GenAction) new Modifiers.IsSolid(), (GenAction) new Actions.Scanner(count))); + if (count.Value < 20 || !structures.CanPlace(new Microsoft.Xna.Framework.Rectangle(result.X - 8, result.Y - 8, 16, 16))) + return false; + WorldUtils.Gen(result, (GenShape) new Shapes.Circle(8), Actions.Chain((GenAction) new Modifiers.RadialDither(0.0f, 10f), (GenAction) new Modifiers.IsSolid(), (GenAction) new Actions.SetTile((ushort) 229, true))); + ShapeData data = new ShapeData(); + WorldUtils.Gen(result, (GenShape) new Shapes.Circle(4, 3), Actions.Chain((GenAction) new Modifiers.Blotches(), (GenAction) new Modifiers.IsSolid(), (GenAction) new Actions.ClearTile(true), new Modifiers.RectangleMask(-6, 6, 0, 3).Output(data), (GenAction) new Actions.SetLiquid(2))); + WorldUtils.Gen(new Point(result.X, result.Y + 1), (GenShape) new ModShapes.InnerOutline(data), Actions.Chain((GenAction) new Modifiers.IsEmpty(), (GenAction) new Modifiers.RectangleMask(-6, 6, 1, 3), (GenAction) new Actions.SetTile((ushort) 59, true))); + structures.AddProtectedStructure(new Microsoft.Xna.Framework.Rectangle(result.X - 8, result.Y - 8, 16, 16)); + return true; + } + } +} diff --git a/GameContent/Biomes/JunglePass.cs b/GameContent/Biomes/JunglePass.cs new file mode 100644 index 0000000..3b7b0fd --- /dev/null +++ b/GameContent/Biomes/JunglePass.cs @@ -0,0 +1,232 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.JunglePass +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using Terraria.IO; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes +{ + public class JunglePass : GenPass + { + private float _worldScale; + + public int JungleOriginX { get; set; } + + public int DungeonSide { get; set; } + + public double WorldSurface { get; set; } + + public int LeftBeachEnd { get; set; } + + public int RightBeachStart { get; set; } + + public int JungleX { get; private set; } + + public JunglePass() + : base("Jungle", 10154.65f) + { + } + + protected override void ApplyPass(GenerationProgress progress, GameConfiguration configuration) + { + progress.Message = Lang.gen[11].Value; + this._worldScale = (float) (Main.maxTilesX / 4200) * 1.5f; + float worldScale = this._worldScale; + Point startPoint = this.CreateStartPoint(); + int x = startPoint.X; + int y = startPoint.Y; + Point zero = Point.Zero; + this.ApplyRandomMovement(ref x, ref y, 100, 100); + zero.X += x; + zero.Y += y; + this.PlaceFirstPassMud(x, y, 3); + this.PlaceGemsAt(x, y, (ushort) 63, 2); + progress.Set(0.15f); + this.ApplyRandomMovement(ref x, ref y, 250, 150); + zero.X += x; + zero.Y += y; + this.PlaceFirstPassMud(x, y, 0); + this.PlaceGemsAt(x, y, (ushort) 65, 2); + progress.Set(0.3f); + int oldX = x; + int oldY = y; + this.ApplyRandomMovement(ref x, ref y, 400, 150); + zero.X += x; + zero.Y += y; + this.PlaceFirstPassMud(x, y, -3); + this.PlaceGemsAt(x, y, (ushort) 67, 2); + progress.Set(0.45f); + int num1 = zero.X / 3; + int j = zero.Y / 3; + int num2 = GenBase._random.Next((int) (400.0 * (double) worldScale), (int) (600.0 * (double) worldScale)); + int num3 = (int) (25.0 * (double) worldScale); + int i = Utils.Clamp(num1, this.LeftBeachEnd + num2 / 2 + num3, this.RightBeachStart - num2 / 2 - num3); + WorldGen.mudWall = true; + WorldGen.TileRunner(i, j, (double) num2, 10000, 59, speedY: -20f, noYChange: true); + this.GenerateTunnelToSurface(i, j); + WorldGen.mudWall = false; + progress.Set(0.6f); + this.GenerateHolesInMudWalls(); + this.GenerateFinishingTouches(progress, oldX, oldY); + } + + private void PlaceGemsAt(int x, int y, ushort baseGem, int gemVariants) + { + for (int index = 0; (double) index < 6.0 * (double) this._worldScale; ++index) + WorldGen.TileRunner(x + GenBase._random.Next(-(int) (125.0 * (double) this._worldScale), (int) (125.0 * (double) this._worldScale)), y + GenBase._random.Next(-(int) (125.0 * (double) this._worldScale), (int) (125.0 * (double) this._worldScale)), (double) GenBase._random.Next(3, 7), GenBase._random.Next(3, 8), GenBase._random.Next((int) baseGem, (int) baseGem + gemVariants)); + } + + private void PlaceFirstPassMud(int x, int y, int xSpeedScale) + { + WorldGen.mudWall = true; + WorldGen.TileRunner(x, y, (double) GenBase._random.Next((int) (250.0 * (double) this._worldScale), (int) (500.0 * (double) this._worldScale)), GenBase._random.Next(50, 150), 59, speedX: ((float) (this.DungeonSide * xSpeedScale))); + WorldGen.mudWall = false; + } + + private Point CreateStartPoint() => new Point(this.JungleOriginX, (int) ((double) Main.maxTilesY + Main.rockLayer) / 2); + + private void ApplyRandomMovement(ref int x, ref int y, int xRange, int yRange) + { + x += GenBase._random.Next((int) ((double) -xRange * (double) this._worldScale), 1 + (int) ((double) xRange * (double) this._worldScale)); + y += GenBase._random.Next((int) ((double) -yRange * (double) this._worldScale), 1 + (int) ((double) yRange * (double) this._worldScale)); + y = Utils.Clamp(y, (int) Main.rockLayer, Main.maxTilesY); + } + + private void GenerateTunnelToSurface(int i, int j) + { + double num1 = (double) GenBase._random.Next(5, 11); + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j; + Vector2 vector2_2; + vector2_2.X = (float) GenBase._random.Next(-10, 11) * 0.1f; + vector2_2.Y = (float) GenBase._random.Next(10, 20) * 0.1f; + int num2 = 0; + bool flag = true; + while (flag) + { + if ((double) vector2_1.Y < Main.worldSurface) + { + if (WorldGen.drunkWorldGen) + flag = false; + int x = (int) vector2_1.X; + int y = (int) vector2_1.Y; + int index1 = Utils.Clamp(x, 10, Main.maxTilesX - 10); + int index2 = Utils.Clamp(y, 10, Main.maxTilesY - 10); + if (index2 < 5) + index2 = 5; + if (Main.tile[index1, index2].wall == (ushort) 0 && !Main.tile[index1, index2].active() && Main.tile[index1, index2 - 3].wall == (ushort) 0 && !Main.tile[index1, index2 - 3].active() && Main.tile[index1, index2 - 1].wall == (ushort) 0 && !Main.tile[index1, index2 - 1].active() && Main.tile[index1, index2 - 4].wall == (ushort) 0 && !Main.tile[index1, index2 - 4].active() && Main.tile[index1, index2 - 2].wall == (ushort) 0 && !Main.tile[index1, index2 - 2].active() && Main.tile[index1, index2 - 5].wall == (ushort) 0 && !Main.tile[index1, index2 - 5].active()) + flag = false; + } + this.JungleX = (int) vector2_1.X; + num1 += (double) GenBase._random.Next(-20, 21) * 0.100000001490116; + if (num1 < 5.0) + num1 = 5.0; + if (num1 > 10.0) + num1 = 10.0; + int num3 = (int) ((double) vector2_1.X - num1 * 0.5); + int num4 = (int) ((double) vector2_1.X + num1 * 0.5); + int num5 = (int) ((double) vector2_1.Y - num1 * 0.5); + int num6 = (int) ((double) vector2_1.Y + num1 * 0.5); + int max = Main.maxTilesX - 10; + int num7 = Utils.Clamp(num3, 10, max); + int num8 = Utils.Clamp(num4, 10, Main.maxTilesX - 10); + int num9 = Utils.Clamp(num5, 10, Main.maxTilesY - 10); + int num10 = Utils.Clamp(num6, 10, Main.maxTilesY - 10); + for (int i1 = num7; i1 < num8; ++i1) + { + for (int j1 = num9; j1 < num10; ++j1) + { + if ((double) Math.Abs((float) i1 - vector2_1.X) + (double) Math.Abs((float) j1 - vector2_1.Y) < num1 * 0.5 * (1.0 + (double) GenBase._random.Next(-10, 11) * 0.015)) + WorldGen.KillTile(i1, j1); + } + } + ++num2; + if (num2 > 10 && GenBase._random.Next(50) < num2) + { + num2 = 0; + int num11 = -2; + if (GenBase._random.Next(2) == 0) + num11 = 2; + WorldGen.TileRunner((int) vector2_1.X, (int) vector2_1.Y, (double) GenBase._random.Next(3, 20), GenBase._random.Next(10, 100), -1, speedX: ((float) num11)); + } + vector2_1 += vector2_2; + vector2_2.Y += (float) GenBase._random.Next(-10, 11) * 0.01f; + if ((double) vector2_2.Y > 0.0) + vector2_2.Y = 0.0f; + if ((double) vector2_2.Y < -2.0) + vector2_2.Y = -2f; + vector2_2.X += (float) GenBase._random.Next(-10, 11) * 0.1f; + if ((double) vector2_1.X < (double) (i - 200)) + vector2_2.X += (float) GenBase._random.Next(5, 21) * 0.1f; + if ((double) vector2_1.X > (double) (i + 200)) + vector2_2.X -= (float) GenBase._random.Next(5, 21) * 0.1f; + if ((double) vector2_2.X > 1.5) + vector2_2.X = 1.5f; + if ((double) vector2_2.X < -1.5) + vector2_2.X = -1.5f; + } + } + + private void GenerateHolesInMudWalls() + { + for (int index = 0; index < Main.maxTilesX / 4; ++index) + { + int i = GenBase._random.Next(20, Main.maxTilesX - 20); + int j; + for (j = GenBase._random.Next((int) this.WorldSurface + 10, Main.UnderworldLayer); Main.tile[i, j].wall != (ushort) 64 && Main.tile[i, j].wall != (ushort) 15; j = GenBase._random.Next((int) this.WorldSurface + 10, Main.UnderworldLayer)) + i = GenBase._random.Next(20, Main.maxTilesX - 20); + WorldGen.MudWallRunner(i, j); + } + } + + private void GenerateFinishingTouches(GenerationProgress progress, int oldX, int oldY) + { + int i1 = oldX; + int j1 = oldY; + float worldScale = this._worldScale; + for (int index = 0; (double) index <= 20.0 * (double) worldScale; ++index) + { + progress.Set((float) ((60.0 + (double) index / (double) worldScale) * 0.00999999977648258)); + i1 += GenBase._random.Next((int) (-5.0 * (double) worldScale), (int) (6.0 * (double) worldScale)); + j1 += GenBase._random.Next((int) (-5.0 * (double) worldScale), (int) (6.0 * (double) worldScale)); + WorldGen.TileRunner(i1, j1, (double) GenBase._random.Next(40, 100), GenBase._random.Next(300, 500), 59); + } + for (int index1 = 0; (double) index1 <= 10.0 * (double) worldScale; ++index1) + { + progress.Set((float) ((80.0 + (double) index1 / (double) worldScale * 2.0) * 0.00999999977648258)); + int i2 = oldX + GenBase._random.Next((int) (-600.0 * (double) worldScale), (int) (600.0 * (double) worldScale)); + int j2; + for (j2 = oldY + GenBase._random.Next((int) (-200.0 * (double) worldScale), (int) (200.0 * (double) worldScale)); i2 < 1 || i2 >= Main.maxTilesX - 1 || j2 < 1 || j2 >= Main.maxTilesY - 1 || Main.tile[i2, j2].type != (ushort) 59; j2 = oldY + GenBase._random.Next((int) (-200.0 * (double) worldScale), (int) (200.0 * (double) worldScale))) + i2 = oldX + GenBase._random.Next((int) (-600.0 * (double) worldScale), (int) (600.0 * (double) worldScale)); + for (int index2 = 0; (double) index2 < 8.0 * (double) worldScale; ++index2) + { + i2 += GenBase._random.Next(-30, 31); + j2 += GenBase._random.Next(-30, 31); + int type = -1; + if (GenBase._random.Next(7) == 0) + type = -2; + WorldGen.TileRunner(i2, j2, (double) GenBase._random.Next(10, 20), GenBase._random.Next(30, 70), type); + } + } + for (int index = 0; (double) index <= 300.0 * (double) worldScale; ++index) + { + int i3 = oldX + GenBase._random.Next((int) (-600.0 * (double) worldScale), (int) (600.0 * (double) worldScale)); + int j3; + for (j3 = oldY + GenBase._random.Next((int) (-200.0 * (double) worldScale), (int) (200.0 * (double) worldScale)); i3 < 1 || i3 >= Main.maxTilesX - 1 || j3 < 1 || j3 >= Main.maxTilesY - 1 || Main.tile[i3, j3].type != (ushort) 59; j3 = oldY + GenBase._random.Next((int) (-200.0 * (double) worldScale), (int) (200.0 * (double) worldScale))) + i3 = oldX + GenBase._random.Next((int) (-600.0 * (double) worldScale), (int) (600.0 * (double) worldScale)); + WorldGen.TileRunner(i3, j3, (double) GenBase._random.Next(4, 10), GenBase._random.Next(5, 30), 1); + if (GenBase._random.Next(4) == 0) + { + int type = GenBase._random.Next(63, 69); + WorldGen.TileRunner(i3 + GenBase._random.Next(-1, 2), j3 + GenBase._random.Next(-1, 2), (double) GenBase._random.Next(3, 7), GenBase._random.Next(4, 8), type); + } + } + } + } +} diff --git a/GameContent/Biomes/MahoganyTreeBiome.cs b/GameContent/Biomes/MahoganyTreeBiome.cs new file mode 100644 index 0000000..171c0ae --- /dev/null +++ b/GameContent/Biomes/MahoganyTreeBiome.cs @@ -0,0 +1,95 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.MahoganyTreeBiome +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.GameContent.Generation; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes +{ + public class MahoganyTreeBiome : MicroBiome + { + public override bool Place(Point origin, StructureMap structures) + { + Point result1; + if (!WorldUtils.Find(new Point(origin.X - 3, origin.Y), Searches.Chain((GenSearch) new Searches.Down(200), new Conditions.IsSolid().AreaAnd(6, 1)), out result1)) + return false; + Point result2; + if (!WorldUtils.Find(new Point(result1.X, result1.Y - 5), Searches.Chain((GenSearch) new Searches.Up(120), new Conditions.IsSolid().AreaOr(6, 1)), out result2) || result1.Y - 5 - result2.Y > 60 || result1.Y - result2.Y < 30 || !structures.CanPlace(new Microsoft.Xna.Framework.Rectangle(result1.X - 30, result1.Y - 60, 60, 90))) + return false; + if (!WorldGen.drunkWorldGen || WorldGen.genRand.Next(50) > 0) + { + Dictionary resultsOutput = new Dictionary(); + WorldUtils.Gen(new Point(result1.X - 25, result1.Y - 25), (GenShape) new Shapes.Rectangle(50, 50), (GenAction) new Actions.TileScanner(new ushort[4] + { + (ushort) 0, + (ushort) 59, + (ushort) 147, + (ushort) 1 + }).Output(resultsOutput)); + int num1 = resultsOutput[(ushort) 0] + resultsOutput[(ushort) 1]; + int num2 = resultsOutput[(ushort) 59]; + if (resultsOutput[(ushort) 147] > num2 || num1 > num2 || num2 < 50) + return false; + } + int num3 = (result1.Y - result2.Y - 9) / 5; + int num4 = num3 * 5; + int num5 = 0; + double num6 = GenBase._random.NextDouble() + 1.0; + double num7 = GenBase._random.NextDouble() + 2.0; + if (GenBase._random.Next(2) == 0) + num7 = -num7; + for (int index = 0; index < num3; ++index) + { + int num8 = (int) (Math.Sin((double) (index + 1) / 12.0 * num6 * 3.14159274101257) * num7); + int num9 = num8 < num5 ? num8 - num5 : 0; + WorldUtils.Gen(new Point(result1.X + num5 + num9, result1.Y - (index + 1) * 5), (GenShape) new Shapes.Rectangle(6 + Math.Abs(num8 - num5), 7), Actions.Chain((GenAction) new Actions.RemoveWall(), (GenAction) new Actions.SetTile((ushort) 383), (GenAction) new Actions.SetFrames())); + WorldUtils.Gen(new Point(result1.X + num5 + num9 + 2, result1.Y - (index + 1) * 5), (GenShape) new Shapes.Rectangle(2 + Math.Abs(num8 - num5), 5), Actions.Chain((GenAction) new Actions.ClearTile(true), (GenAction) new Actions.PlaceWall((ushort) 78))); + WorldUtils.Gen(new Point(result1.X + num5 + 2, result1.Y - index * 5), (GenShape) new Shapes.Rectangle(2, 2), Actions.Chain((GenAction) new Actions.ClearTile(true), (GenAction) new Actions.PlaceWall((ushort) 78))); + num5 = num8; + } + int num10 = 6; + if (num7 < 0.0) + num10 = 0; + List endpoints = new List(); + for (int index = 0; index < 2; ++index) + { + double num11 = ((double) index + 1.0) / 3.0; + int num12 = num10 + (int) (Math.Sin((double) num3 * num11 / 12.0 * num6 * 3.14159274101257) * num7); + double angle = GenBase._random.NextDouble() * 0.785398185253143 - 0.785398185253143 - 0.200000002980232; + if (num10 == 0) + angle -= 1.57079637050629; + WorldUtils.Gen(new Point(result1.X + num12, result1.Y - (int) ((double) (num3 * 5) * num11)), (GenShape) new ShapeBranch(angle, (double) GenBase._random.Next(12, 16)).OutputEndpoints(endpoints), Actions.Chain((GenAction) new Actions.SetTile((ushort) 383), (GenAction) new Actions.SetFrames(true))); + num10 = 6 - num10; + } + int num13 = (int) (Math.Sin((double) num3 / 12.0 * num6 * 3.14159274101257) * num7); + WorldUtils.Gen(new Point(result1.X + 6 + num13, result1.Y - num4), (GenShape) new ShapeBranch(-0.685398185253143, (double) GenBase._random.Next(16, 22)).OutputEndpoints(endpoints), Actions.Chain((GenAction) new Actions.SetTile((ushort) 383), (GenAction) new Actions.SetFrames(true))); + WorldUtils.Gen(new Point(result1.X + num13, result1.Y - num4), (GenShape) new ShapeBranch(-2.45619449615479, (double) GenBase._random.Next(16, 22)).OutputEndpoints(endpoints), Actions.Chain((GenAction) new Actions.SetTile((ushort) 383), (GenAction) new Actions.SetFrames(true))); + foreach (Point origin1 in endpoints) + { + Shapes.Circle circle = new Shapes.Circle(4); + GenAction action = Actions.Chain((GenAction) new Modifiers.Blotches(4, 2, 0.3), (GenAction) new Modifiers.SkipTiles(new ushort[1] + { + (ushort) 383 + }), (GenAction) new Modifiers.SkipWalls(new ushort[1] + { + (ushort) 78 + }), (GenAction) new Actions.SetTile((ushort) 384), (GenAction) new Actions.SetFrames(true)); + WorldUtils.Gen(origin1, (GenShape) circle, action); + } + for (int index = 0; index < 4; ++index) + { + float angle = (float) ((double) index / 3.0 * 2.0 + 0.570749998092651); + WorldUtils.Gen(result1, (GenShape) new ShapeRoot(angle, (float) GenBase._random.Next(40, 60)), (GenAction) new Actions.SetTile((ushort) 383, true)); + } + WorldGen.AddBuriedChest(result1.X + 3, result1.Y - 1, GenBase._random.Next(4) == 0 ? 0 : WorldGen.GetNextJungleChestItem(), Style: 10); + structures.AddProtectedStructure(new Microsoft.Xna.Framework.Rectangle(result1.X - 30, result1.Y - 30, 60, 60)); + return true; + } + } +} diff --git a/GameContent/Biomes/MarbleBiome.cs b/GameContent/Biomes/MarbleBiome.cs new file mode 100644 index 0000000..5820c2d --- /dev/null +++ b/GameContent/Biomes/MarbleBiome.cs @@ -0,0 +1,211 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.MarbleBiome +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using Terraria.ID; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes +{ + public class MarbleBiome : MicroBiome + { + private const int SCALE = 3; + private MarbleBiome.Slab[,] _slabs; + + private void SmoothSlope(int x, int y) + { + MarbleBiome.Slab slab = this._slabs[x, y]; + if (!slab.IsSolid) + return; + int num = this._slabs[x, y - 1].IsSolid ? 1 : 0; + bool isSolid1 = this._slabs[x, y + 1].IsSolid; + bool isSolid2 = this._slabs[x - 1, y].IsSolid; + bool isSolid3 = this._slabs[x + 1, y].IsSolid; + switch ((num != 0 ? 1 : 0) << 3 | (isSolid1 ? 1 : 0) << 2 | (isSolid2 ? 1 : 0) << 1 | (isSolid3 ? 1 : 0)) + { + case 4: + this._slabs[x, y] = slab.WithState(new MarbleBiome.SlabState(MarbleBiome.SlabStates.HalfBrick)); + break; + case 5: + this._slabs[x, y] = slab.WithState(new MarbleBiome.SlabState(MarbleBiome.SlabStates.BottomRightFilled)); + break; + case 6: + this._slabs[x, y] = slab.WithState(new MarbleBiome.SlabState(MarbleBiome.SlabStates.BottomLeftFilled)); + break; + case 9: + this._slabs[x, y] = slab.WithState(new MarbleBiome.SlabState(MarbleBiome.SlabStates.TopRightFilled)); + break; + case 10: + this._slabs[x, y] = slab.WithState(new MarbleBiome.SlabState(MarbleBiome.SlabStates.TopLeftFilled)); + break; + default: + this._slabs[x, y] = slab.WithState(new MarbleBiome.SlabState(MarbleBiome.SlabStates.Solid)); + break; + } + } + + private void PlaceSlab(MarbleBiome.Slab slab, int originX, int originY, int scale) + { + ushort num1 = 367; + ushort num2 = 178; + if (WorldGen.drunkWorldGen) + { + num1 = (ushort) 368; + num2 = (ushort) 180; + } + int num3 = -1; + int num4 = scale + 1; + int num5 = 0; + int num6 = scale; + for (int x = num3; x < num4; ++x) + { + if (x != num3 && x != num4 - 1 || WorldGen.genRand.Next(2) != 0) + { + if (WorldGen.genRand.Next(2) == 0) + --num5; + if (WorldGen.genRand.Next(2) == 0) + ++num6; + for (int y = num5; y < num6; ++y) + { + Tile tile = GenBase._tiles[originX + x, originY + y]; + tile.ResetToType(TileID.Sets.Ore[(int) tile.type] ? tile.type : num1); + bool active = slab.State(x, y, scale); + tile.active(active); + if (slab.HasWall) + tile.wall = num2; + WorldUtils.TileFrame(originX + x, originY + y, true); + WorldGen.SquareWallFrame(originX + x, originY + y); + Tile.SmoothSlope(originX + x, originY + y); + if (WorldGen.SolidTile(originX + x, originY + y - 1) && GenBase._random.Next(4) == 0) + WorldGen.PlaceTight(originX + x, originY + y); + if (WorldGen.SolidTile(originX + x, originY + y) && GenBase._random.Next(4) == 0) + WorldGen.PlaceTight(originX + x, originY + y - 1); + } + } + } + } + + private static bool IsGroupSolid(int x, int y, int scale) + { + int num = 0; + for (int index1 = 0; index1 < scale; ++index1) + { + for (int index2 = 0; index2 < scale; ++index2) + { + if (WorldGen.SolidOrSlopedTile(x + index1, y + index2)) + ++num; + } + } + return num > scale / 4 * 3; + } + + public override bool Place(Point origin, StructureMap structures) + { + if (WorldGen.BiomeTileCheck(origin.X, origin.Y)) + return false; + if (this._slabs == null) + this._slabs = new MarbleBiome.Slab[56, 26]; + int num1 = GenBase._random.Next(80, 150) / 3; + int num2 = GenBase._random.Next(40, 60) / 3; + int num3 = (num2 * 3 - GenBase._random.Next(20, 30)) / 3; + origin.X -= num1 * 3 / 2; + origin.Y -= num2 * 3 / 2; + for (int index1 = -1; index1 < num1 + 1; ++index1) + { + double num4 = (double) (index1 - num1 / 2) / (double) num1 + 0.5; + int num5 = (int) ((0.5 - Math.Abs(num4 - 0.5)) * 5.0) - 2; + for (int index2 = -1; index2 < num2 + 1; ++index2) + { + bool hasWall = true; + bool flag1 = false; + bool flag2 = MarbleBiome.IsGroupSolid(index1 * 3 + origin.X, index2 * 3 + origin.Y, 3); + int num6 = Math.Abs(index2 - num2 / 2) - num3 / 4 + num5; + if (num6 > 3) + { + flag1 = flag2; + hasWall = false; + } + else if (num6 > 0) + { + flag1 = index2 - num2 / 2 > 0 | flag2; + hasWall = index2 - num2 / 2 < 0 || num6 <= 2; + } + else if (num6 == 0) + flag1 = GenBase._random.Next(2) == 0 && index2 - num2 / 2 > 0 | flag2; + if (Math.Abs(num4 - 0.5) > 0.349999994039536 + (double) GenBase._random.NextFloat() * 0.100000001490116 && !flag2) + { + hasWall = false; + flag1 = false; + } + this._slabs[index1 + 1, index2 + 1] = MarbleBiome.Slab.Create(flag1 ? new MarbleBiome.SlabState(MarbleBiome.SlabStates.Solid) : new MarbleBiome.SlabState(MarbleBiome.SlabStates.Empty), hasWall); + } + } + for (int index3 = 0; index3 < num1; ++index3) + { + for (int index4 = 0; index4 < num2; ++index4) + this.SmoothSlope(index3 + 1, index4 + 1); + } + int num7 = num1 / 2; + int val1 = num2 / 2; + int num8 = (val1 + 1) * (val1 + 1); + float num9 = (float) ((double) GenBase._random.NextFloat() * 2.0 - 1.0); + float num10 = (float) ((double) GenBase._random.NextFloat() * 2.0 - 1.0); + float num11 = (float) ((double) GenBase._random.NextFloat() * 2.0 - 1.0); + float num12 = 0.0f; + for (int index5 = 0; index5 <= num1; ++index5) + { + float num13 = (float) val1 / (float) num7 * (float) (index5 - num7); + int num14 = Math.Min(val1, (int) Math.Sqrt((double) Math.Max(0.0f, (float) num8 - num13 * num13))); + if (index5 < num1 / 2) + num12 += MathHelper.Lerp(num9, num10, (float) index5 / (float) (num1 / 2)); + else + num12 += MathHelper.Lerp(num10, num11, (float) ((double) index5 / (double) (num1 / 2) - 1.0)); + for (int index6 = val1 - num14; index6 <= val1 + num14; ++index6) + this.PlaceSlab(this._slabs[index5 + 1, index6 + 1], index5 * 3 + origin.X, index6 * 3 + origin.Y + (int) num12, 3); + } + structures.AddStructure(new Microsoft.Xna.Framework.Rectangle(origin.X, origin.Y, num1 * 3, num2 * 3), 8); + return true; + } + + private delegate bool SlabState(int x, int y, int scale); + + private static class SlabStates + { + public static bool Empty(int x, int y, int scale) => false; + + public static bool Solid(int x, int y, int scale) => true; + + public static bool HalfBrick(int x, int y, int scale) => y >= scale / 2; + + public static bool BottomRightFilled(int x, int y, int scale) => x >= scale - y; + + public static bool BottomLeftFilled(int x, int y, int scale) => x < y; + + public static bool TopRightFilled(int x, int y, int scale) => x > y; + + public static bool TopLeftFilled(int x, int y, int scale) => x < scale - y; + } + + private struct Slab + { + public readonly MarbleBiome.SlabState State; + public readonly bool HasWall; + + public bool IsSolid => this.State != new MarbleBiome.SlabState(MarbleBiome.SlabStates.Empty); + + private Slab(MarbleBiome.SlabState state, bool hasWall) + { + this.State = state; + this.HasWall = hasWall; + } + + public MarbleBiome.Slab WithState(MarbleBiome.SlabState state) => new MarbleBiome.Slab(state, this.HasWall); + + public static MarbleBiome.Slab Create(MarbleBiome.SlabState state, bool hasWall) => new MarbleBiome.Slab(state, hasWall); + } + } +} diff --git a/GameContent/Biomes/MiningExplosivesBiome.cs b/GameContent/Biomes/MiningExplosivesBiome.cs new file mode 100644 index 0000000..d27322c --- /dev/null +++ b/GameContent/Biomes/MiningExplosivesBiome.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.MiningExplosivesBiome +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.GameContent.Generation; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes +{ + public class MiningExplosivesBiome : MicroBiome + { + public override bool Place(Point origin, StructureMap structures) + { + if (WorldGen.SolidTile(origin.X, origin.Y) || Main.tile[origin.X, origin.Y].wall == (ushort) 216 || Main.tile[origin.X, origin.Y].wall == (ushort) 187) + return false; + ushort type = Utils.SelectRandom(GenBase._random, WorldGen.goldBar == 19 ? (ushort) 8 : (ushort) 169, WorldGen.silverBar == 21 ? (ushort) 9 : (ushort) 168, WorldGen.ironBar == 22 ? (ushort) 6 : (ushort) 167, WorldGen.copperBar == 20 ? (ushort) 7 : (ushort) 166); + double num1 = GenBase._random.NextDouble() * 2.0 - 1.0; + if (!WorldUtils.Find(origin, Searches.Chain(num1 > 0.0 ? (GenSearch) new Searches.Right(40) : (GenSearch) new Searches.Left(40), (GenCondition) new Conditions.IsSolid()), out origin)) + return false; + if (!WorldUtils.Find(origin, Searches.Chain((GenSearch) new Searches.Down(80), (GenCondition) new Conditions.IsSolid()), out origin)) + return false; + ShapeData shapeData = new ShapeData(); + Ref count1 = new Ref(0); + Ref count2 = new Ref(0); + WorldUtils.Gen(origin, new ShapeRunner(10f, 20, new Vector2((float) num1, 1f)).Output(shapeData), Actions.Chain((GenAction) new Modifiers.Blotches(), (GenAction) new Actions.Scanner(count1), (GenAction) new Modifiers.IsSolid(), (GenAction) new Actions.Scanner(count2))); + if (count2.Value < count1.Value / 2) + return false; + Microsoft.Xna.Framework.Rectangle area = new Microsoft.Xna.Framework.Rectangle(origin.X - 15, origin.Y - 10, 30, 20); + if (!structures.CanPlace(area)) + return false; + WorldUtils.Gen(origin, (GenShape) new ModShapes.All(shapeData), (GenAction) new Actions.SetTile(type, true)); + WorldUtils.Gen(new Point(origin.X - (int) (num1 * -5.0), origin.Y - 5), (GenShape) new Shapes.Circle(5), Actions.Chain((GenAction) new Modifiers.Blotches(), (GenAction) new Actions.ClearTile(true))); + Point result1; + int num2 = 1 & (WorldUtils.Find(new Point(origin.X - (num1 > 0.0 ? 3 : -3), origin.Y - 3), Searches.Chain((GenSearch) new Searches.Down(10), (GenCondition) new Conditions.IsSolid()), out result1) ? 1 : 0); + int num3 = GenBase._random.Next(4) == 0 ? 3 : 7; + Point result2; + int num4 = WorldUtils.Find(new Point(origin.X - (num1 > 0.0 ? -num3 : num3), origin.Y - 3), Searches.Chain((GenSearch) new Searches.Down(10), (GenCondition) new Conditions.IsSolid()), out result2) ? 1 : 0; + if ((num2 & num4) == 0) + return false; + --result1.Y; + --result2.Y; + Tile tile1 = GenBase._tiles[result1.X, result1.Y + 1]; + tile1.slope((byte) 0); + tile1.halfBrick(false); + for (int index = -1; index <= 1; ++index) + { + WorldUtils.ClearTile(result2.X + index, result2.Y); + Tile tile2 = GenBase._tiles[result2.X + index, result2.Y + 1]; + if (!WorldGen.SolidOrSlopedTile(tile2)) + { + tile2.ResetToType((ushort) 1); + tile2.active(true); + } + tile2.slope((byte) 0); + tile2.halfBrick(false); + WorldUtils.TileFrame(result2.X + index, result2.Y + 1, true); + } + WorldGen.PlaceTile(result1.X, result1.Y, 141); + WorldGen.PlaceTile(result2.X, result2.Y, 411, true, true); + WorldUtils.WireLine(result1, result2); + structures.AddProtectedStructure(area, 5); + return true; + } + } +} diff --git a/GameContent/Biomes/TerrainPass.cs b/GameContent/Biomes/TerrainPass.cs new file mode 100644 index 0000000..599cfb1 --- /dev/null +++ b/GameContent/Biomes/TerrainPass.cs @@ -0,0 +1,309 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.TerrainPass +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using Terraria.IO; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes +{ + public class TerrainPass : GenPass + { + public double WorldSurface { get; private set; } + + public double WorldSurfaceHigh { get; private set; } + + public double WorldSurfaceLow { get; private set; } + + public double RockLayer { get; private set; } + + public double RockLayerHigh { get; private set; } + + public double RockLayerLow { get; private set; } + + public int WaterLine { get; private set; } + + public int LavaLine { get; private set; } + + public int LeftBeachSize { get; set; } + + public int RightBeachSize { get; set; } + + public TerrainPass() + : base("Terrain", 449.3722f) + { + } + + protected override void ApplyPass(GenerationProgress progress, GameConfiguration configuration) + { + int num1 = configuration.Get("FlatBeachPadding"); + progress.Message = Lang.gen[0].Value; + TerrainPass.TerrainFeatureType featureType = TerrainPass.TerrainFeatureType.Plateau; + double num2 = (double) Main.maxTilesY * 0.3 * ((double) GenBase._random.Next(90, 110) * 0.005); + double num3 = (num2 + (double) Main.maxTilesY * 0.2) * ((double) GenBase._random.Next(90, 110) * 0.01); + double val2_1 = num2; + double val2_2 = num2; + double val2_3 = num3; + double val2_4 = num3; + double num4 = (double) Main.maxTilesY * 0.23; + TerrainPass.SurfaceHistory history = new TerrainPass.SurfaceHistory(500); + int num5 = this.LeftBeachSize + num1; + for (int index = 0; index < Main.maxTilesX; ++index) + { + progress.Set((float) index / (float) Main.maxTilesX); + val2_1 = Math.Min(num2, val2_1); + val2_2 = Math.Max(num2, val2_2); + val2_3 = Math.Min(num3, val2_3); + val2_4 = Math.Max(num3, val2_4); + if (num5 <= 0) + { + featureType = (TerrainPass.TerrainFeatureType) GenBase._random.Next(0, 5); + num5 = GenBase._random.Next(5, 40); + if (featureType == TerrainPass.TerrainFeatureType.Plateau) + num5 *= (int) ((double) GenBase._random.Next(5, 30) * 0.2); + } + --num5; + if ((double) index > (double) Main.maxTilesX * 0.45 && (double) index < (double) Main.maxTilesX * 0.55 && (featureType == TerrainPass.TerrainFeatureType.Mountain || featureType == TerrainPass.TerrainFeatureType.Valley)) + featureType = (TerrainPass.TerrainFeatureType) GenBase._random.Next(3); + if ((double) index > (double) Main.maxTilesX * 0.48 && (double) index < (double) Main.maxTilesX * 0.52) + featureType = TerrainPass.TerrainFeatureType.Plateau; + num2 += TerrainPass.GenerateWorldSurfaceOffset(featureType); + float num6 = 0.17f; + float num7 = 0.26f; + if (WorldGen.drunkWorldGen) + { + num6 = 0.15f; + num7 = 0.28f; + } + if (index < this.LeftBeachSize + num1 || index > Main.maxTilesX - this.RightBeachSize - num1) + num2 = Utils.Clamp(num2, (double) Main.maxTilesY * 0.17, num4); + else if (num2 < (double) Main.maxTilesY * (double) num6) + { + num2 = (double) Main.maxTilesY * (double) num6; + num5 = 0; + } + else if (num2 > (double) Main.maxTilesY * (double) num7) + { + num2 = (double) Main.maxTilesY * (double) num7; + num5 = 0; + } + while (GenBase._random.Next(0, 3) == 0) + num3 += (double) GenBase._random.Next(-2, 3); + if (num3 < num2 + (double) Main.maxTilesY * 0.06) + ++num3; + if (num3 > num2 + (double) Main.maxTilesY * 0.35) + --num3; + history.Record(num2); + TerrainPass.FillColumn(index, num2, num3); + if (index == Main.maxTilesX - this.RightBeachSize - num1) + { + if (num2 > num4) + TerrainPass.RetargetSurfaceHistory(history, index, num4); + featureType = TerrainPass.TerrainFeatureType.Plateau; + num5 = Main.maxTilesX - index; + } + } + Main.worldSurface = (double) (int) (val2_2 + 25.0); + Main.rockLayer = val2_4; + double num8 = (double) ((int) ((Main.rockLayer - Main.worldSurface) / 6.0) * 6); + Main.rockLayer = (double) (int) (Main.worldSurface + num8); + int num9 = (int) (Main.rockLayer + (double) Main.maxTilesY) / 2 + GenBase._random.Next(-100, 20); + int num10 = num9 + GenBase._random.Next(50, 80); + int num11 = 20; + if (val2_3 < val2_2 + (double) num11) + { + double num12 = (val2_3 + val2_2) / 2.0; + double num13 = Math.Abs(val2_3 - val2_2); + if (num13 < (double) num11) + num13 = (double) num11; + val2_3 = num12 + num13 / 2.0; + val2_2 = num12 - num13 / 2.0; + } + this.RockLayer = num3; + this.RockLayerHigh = val2_4; + this.RockLayerLow = val2_3; + this.WorldSurface = num2; + this.WorldSurfaceHigh = val2_2; + this.WorldSurfaceLow = val2_1; + this.WaterLine = num9; + this.LavaLine = num10; + } + + private static void FillColumn(int x, double worldSurface, double rockLayer) + { + for (int index = 0; (double) index < worldSurface; ++index) + { + Main.tile[x, index].active(false); + Main.tile[x, index].frameX = (short) -1; + Main.tile[x, index].frameY = (short) -1; + } + for (int index = (int) worldSurface; index < Main.maxTilesY; ++index) + { + if ((double) index < rockLayer) + { + Main.tile[x, index].active(true); + Main.tile[x, index].type = (ushort) 0; + Main.tile[x, index].frameX = (short) -1; + Main.tile[x, index].frameY = (short) -1; + } + else + { + Main.tile[x, index].active(true); + Main.tile[x, index].type = (ushort) 1; + Main.tile[x, index].frameX = (short) -1; + Main.tile[x, index].frameY = (short) -1; + } + } + } + + private static void RetargetColumn(int x, double worldSurface) + { + for (int index = 0; (double) index < worldSurface; ++index) + { + Main.tile[x, index].active(false); + Main.tile[x, index].frameX = (short) -1; + Main.tile[x, index].frameY = (short) -1; + } + for (int index = (int) worldSurface; index < Main.maxTilesY; ++index) + { + if (Main.tile[x, index].type != (ushort) 1 || !Main.tile[x, index].active()) + { + Main.tile[x, index].active(true); + Main.tile[x, index].type = (ushort) 0; + Main.tile[x, index].frameX = (short) -1; + Main.tile[x, index].frameY = (short) -1; + } + } + } + + private static double GenerateWorldSurfaceOffset(TerrainPass.TerrainFeatureType featureType) + { + double num = 0.0; + if ((WorldGen.drunkWorldGen || WorldGen.getGoodWorldGen) && WorldGen.genRand.Next(2) == 0) + { + switch (featureType) + { + case TerrainPass.TerrainFeatureType.Plateau: + while (GenBase._random.Next(0, 6) == 0) + num += (double) GenBase._random.Next(-1, 2); + break; + case TerrainPass.TerrainFeatureType.Hill: + while (GenBase._random.Next(0, 3) == 0) + --num; + while (GenBase._random.Next(0, 10) == 0) + ++num; + break; + case TerrainPass.TerrainFeatureType.Dale: + while (GenBase._random.Next(0, 3) == 0) + ++num; + while (GenBase._random.Next(0, 10) == 0) + --num; + break; + case TerrainPass.TerrainFeatureType.Mountain: + while (GenBase._random.Next(0, 3) != 0) + --num; + while (GenBase._random.Next(0, 6) == 0) + ++num; + break; + case TerrainPass.TerrainFeatureType.Valley: + while (GenBase._random.Next(0, 3) != 0) + ++num; + while (GenBase._random.Next(0, 5) == 0) + --num; + break; + } + } + else + { + switch (featureType) + { + case TerrainPass.TerrainFeatureType.Plateau: + while (GenBase._random.Next(0, 7) == 0) + num += (double) GenBase._random.Next(-1, 2); + break; + case TerrainPass.TerrainFeatureType.Hill: + while (GenBase._random.Next(0, 4) == 0) + --num; + while (GenBase._random.Next(0, 10) == 0) + ++num; + break; + case TerrainPass.TerrainFeatureType.Dale: + while (GenBase._random.Next(0, 4) == 0) + ++num; + while (GenBase._random.Next(0, 10) == 0) + --num; + break; + case TerrainPass.TerrainFeatureType.Mountain: + while (GenBase._random.Next(0, 2) == 0) + --num; + while (GenBase._random.Next(0, 6) == 0) + ++num; + break; + case TerrainPass.TerrainFeatureType.Valley: + while (GenBase._random.Next(0, 2) == 0) + ++num; + while (GenBase._random.Next(0, 5) == 0) + --num; + break; + } + } + return num; + } + + private static void RetargetSurfaceHistory( + TerrainPass.SurfaceHistory history, + int targetX, + double targetHeight) + { + for (int index1 = 0; index1 < history.Length / 2 && history[history.Length - 1] > targetHeight; ++index1) + { + for (int index2 = 0; index2 < history.Length - index1 * 2; ++index2) + { + double num = history[history.Length - index2 - 1] - 1.0; + history[history.Length - index2 - 1] = num; + if (num <= targetHeight) + break; + } + } + for (int index = 0; index < history.Length; ++index) + { + double worldSurface = history[history.Length - index - 1]; + TerrainPass.RetargetColumn(targetX - index, worldSurface); + } + } + + private enum TerrainFeatureType + { + Plateau, + Hill, + Dale, + Mountain, + Valley, + } + + private class SurfaceHistory + { + private readonly double[] _heights; + private int _index; + + public double this[int index] + { + get => this._heights[(index + this._index) % this._heights.Length]; + set => this._heights[(index + this._index) % this._heights.Length] = value; + } + + public int Length => this._heights.Length; + + public SurfaceHistory(int size) => this._heights = new double[size]; + + public void Record(double height) + { + this._heights[this._index] = height; + this._index = (this._index + 1) % this._heights.Length; + } + } + } +} diff --git a/GameContent/Biomes/ThinIceBiome.cs b/GameContent/Biomes/ThinIceBiome.cs new file mode 100644 index 0000000..fb35a22 --- /dev/null +++ b/GameContent/Biomes/ThinIceBiome.cs @@ -0,0 +1,50 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Biomes.ThinIceBiome +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Biomes +{ + public class ThinIceBiome : MicroBiome + { + public override bool Place(Point origin, StructureMap structures) + { + Dictionary resultsOutput = new Dictionary(); + WorldUtils.Gen(new Point(origin.X - 25, origin.Y - 25), (GenShape) new Shapes.Rectangle(50, 50), (GenAction) new Actions.TileScanner(new ushort[5] + { + (ushort) 0, + (ushort) 59, + (ushort) 147, + (ushort) 1, + (ushort) 225 + }).Output(resultsOutput)); + int num1 = resultsOutput[(ushort) 0] + resultsOutput[(ushort) 1]; + int num2 = resultsOutput[(ushort) 59]; + int num3 = resultsOutput[(ushort) 147]; + if (resultsOutput[(ushort) 225] > 0 || num3 <= num2 || num3 <= num1) + return false; + int num4 = 0; + for (int radius = GenBase._random.Next(10, 15); radius > 5; --radius) + { + int num5 = GenBase._random.Next(-5, 5); + WorldUtils.Gen(new Point(origin.X + num5, origin.Y + num4), (GenShape) new Shapes.Circle(radius), Actions.Chain((GenAction) new Modifiers.Blotches(4), (GenAction) new Modifiers.OnlyTiles(new ushort[5] + { + (ushort) 147, + (ushort) 161, + (ushort) 224, + (ushort) 0, + (ushort) 1 + }), (GenAction) new Actions.SetTile((ushort) 162, true))); + WorldUtils.Gen(new Point(origin.X + num5, origin.Y + num4), (GenShape) new Shapes.Circle(radius), Actions.Chain((GenAction) new Modifiers.Blotches(4), (GenAction) new Modifiers.HasLiquid(), (GenAction) new Actions.SetTile((ushort) 162, true), (GenAction) new Actions.SetLiquid(value: (byte) 0))); + num4 += radius - 2; + } + structures.AddStructure(new Microsoft.Xna.Framework.Rectangle(origin.X - 25, origin.Y - 25, 50, 50), 8); + return true; + } + } +} diff --git a/GameContent/ChildSafety.cs b/GameContent/ChildSafety.cs new file mode 100644 index 0000000..b4cfeaa --- /dev/null +++ b/GameContent/ChildSafety.cs @@ -0,0 +1,23 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ChildSafety +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.ID; + +namespace Terraria.GameContent +{ + public class ChildSafety + { + private static SetFactory factoryDust = new SetFactory(304); + private static SetFactory factoryGore = new SetFactory(1269); + private static readonly bool[] SafeGore = ChildSafety.factoryGore.CreateBoolSet(11, 12, 13, 16, 17, 42, 53, 44, 51, 52, 53, 54, 55, 56, 57, 61, 62, 63, 67, 68, 69, 99, 106, 120, 130, 131, 147, 148, 149, 150, 156, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 213, 217, 218, 219, 220, 221, 222, 257, 265, 266, 267, 268, 269, 276, 277, 278, 279, 280, 281, 282, 314, 321, 322, 326, 331, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 375, 376, 377, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 435, 436, 437, 521, 522, 523, 525, 526, 527, 542, 570, 571, 572, 580, 581, 582, 603, 604, 605, 606, 610, 611, 612, 613, 614, 615, 616, 617, 618, 639, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 734, 728, 729, 730, 731, 732, 733, 825, 826, 827, 848, 849, 850, 851, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 892, 893, 898, 899, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 939, 940, 941, 942, 943, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1160, 1161, 1162, 1201, 1202, 1203, 1204, 1208, 1209, 1218, 1225, 1226, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1257, 1261); + private static readonly bool[] SafeDust = ChildSafety.factoryDust.CreateBoolSet(true, 5, 227, 273); + public static bool Disabled = true; + + public static bool DangerousGore(int id) => !ChildSafety.SafeGore[id]; + + public static bool DangerousDust(int id) => !ChildSafety.SafeDust[id]; + } +} diff --git a/GameContent/ChromaHotkeyPainter.cs b/GameContent/ChromaHotkeyPainter.cs new file mode 100644 index 0000000..0244207 --- /dev/null +++ b/GameContent/ChromaHotkeyPainter.cs @@ -0,0 +1,395 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ChromaHotkeyPainter +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Input; +using ReLogic.Peripherals.RGB; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.GameInput; + +namespace Terraria.GameContent +{ + public class ChromaHotkeyPainter + { + private readonly Dictionary _keys = new Dictionary(); + private readonly List _reactiveKeys = new List(); + private List _xnaKeysInUse = new List(); + private Player _player; + private int _quickHealAlert; + private List _wasdKeys = new List(); + private ChromaHotkeyPainter.PaintKey _healKey; + private ChromaHotkeyPainter.PaintKey _mountKey; + private ChromaHotkeyPainter.PaintKey _jumpKey; + private ChromaHotkeyPainter.PaintKey _grappleKey; + private ChromaHotkeyPainter.PaintKey _throwKey; + private ChromaHotkeyPainter.PaintKey _manaKey; + private ChromaHotkeyPainter.PaintKey _buffKey; + private ChromaHotkeyPainter.PaintKey _smartCursorKey; + private ChromaHotkeyPainter.PaintKey _smartSelectKey; + + public bool PotionAlert => (uint) this._quickHealAlert > 0U; + + public void CollectBoundKeys() + { + foreach (KeyValuePair key in this._keys) + key.Value.Unbind(); + this._keys.Clear(); + foreach (KeyValuePair> keyStatu in PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus) + this._keys.Add(keyStatu.Key, new ChromaHotkeyPainter.PaintKey(keyStatu.Key, keyStatu.Value)); + foreach (KeyValuePair key in this._keys) + key.Value.Bind(); + this._wasdKeys = new List() + { + this._keys["Up"], + this._keys["Down"], + this._keys["Left"], + this._keys["Right"] + }; + this._healKey = this._keys["QuickHeal"]; + this._mountKey = this._keys["QuickMount"]; + this._jumpKey = this._keys["Jump"]; + this._grappleKey = this._keys["Grapple"]; + this._throwKey = this._keys["Throw"]; + this._manaKey = this._keys["QuickMana"]; + this._buffKey = this._keys["QuickBuff"]; + this._smartCursorKey = this._keys["SmartCursor"]; + this._smartSelectKey = this._keys["SmartSelect"]; + this._reactiveKeys.Clear(); + this._xnaKeysInUse.Clear(); + foreach (KeyValuePair key in this._keys) + this._xnaKeysInUse.AddRange((IEnumerable) key.Value.GetXNAKeysInUse()); + this._xnaKeysInUse = this._xnaKeysInUse.Distinct().ToList(); + } + + public void PressKey(Keys key) + { + } + + private ChromaHotkeyPainter.ReactiveRGBKey FindReactiveKey(Keys keyTarget) => this._reactiveKeys.FirstOrDefault((Func) (x => x.XNAKey == keyTarget)); + + public void Update() + { + this._player = Main.LocalPlayer; + if (!Main.hasFocus) + { + this.Step_ClearAll(); + } + else + { + if (this.PotionAlert) + { + foreach (KeyValuePair key in this._keys) + { + if (key.Key != "QuickHeal") + key.Value.SetClear(); + } + this.Step_QuickHeal(); + } + else + { + this.Step_Movement(); + this.Step_QuickHeal(); + } + if (Main.InGameUI.CurrentState == Main.ManageControlsMenu) + { + this.Step_ClearAll(); + this.Step_KeybindsMenu(); + } + this.Step_UpdateReactiveKeys(); + } + } + + private void SetGroupColorBase(List keys, Color color) + { + foreach (ChromaHotkeyPainter.PaintKey key in keys) + key.SetSolid(color); + } + + private void SetGroupClear(List keys) + { + foreach (ChromaHotkeyPainter.PaintKey key in keys) + key.SetClear(); + } + + private void Step_KeybindsMenu() + { + this.SetGroupColorBase(this._wasdKeys, ChromaHotkeyPainter.PainterColors.MovementKeys); + this._jumpKey.SetSolid(ChromaHotkeyPainter.PainterColors.MovementKeys); + this._grappleKey.SetSolid(ChromaHotkeyPainter.PainterColors.QuickGrapple); + this._mountKey.SetSolid(ChromaHotkeyPainter.PainterColors.QuickMount); + this._quickHealAlert = 0; + this._healKey.SetSolid(ChromaHotkeyPainter.PainterColors.QuickHealReady); + this._manaKey.SetSolid(ChromaHotkeyPainter.PainterColors.QuickMana); + this._throwKey.SetSolid(ChromaHotkeyPainter.PainterColors.Throw); + this._smartCursorKey.SetSolid(ChromaHotkeyPainter.PainterColors.SmartCursor); + this._smartSelectKey.SetSolid(ChromaHotkeyPainter.PainterColors.SmartSelect); + } + + private void Step_UpdateReactiveKeys() + { + foreach (ChromaHotkeyPainter.ReactiveRGBKey reactiveRgbKey in this._reactiveKeys.FindAll((Predicate) (x => x.Expired))) + { + ChromaHotkeyPainter.ReactiveRGBKey key = reactiveRgbKey; + key.Clear(); + if (!this._keys.Any>((Func, bool>) (x => x.Value.UsesKey(key.XNAKey)))) + key.Unbind(); + } + this._reactiveKeys.RemoveAll((Predicate) (x => x.Expired)); + foreach (ChromaHotkeyPainter.ReactiveRGBKey reactiveKey in this._reactiveKeys) + reactiveKey.Update(); + } + + private void Step_ClearAll() + { + foreach (KeyValuePair key in this._keys) + key.Value.SetClear(); + } + + private void Step_SmartKeys() + { + ChromaHotkeyPainter.PaintKey smartCursorKey = this._smartCursorKey; + ChromaHotkeyPainter.PaintKey smartSelectKey = this._smartSelectKey; + if (this._player.DeadOrGhost || this._player.frozen || this._player.tongued || this._player.webbed || this._player.stoned || this._player.noItems) + { + smartCursorKey.SetClear(); + smartSelectKey.SetClear(); + } + else + { + if (Main.SmartCursorEnabled) + smartCursorKey.SetSolid(ChromaHotkeyPainter.PainterColors.SmartCursor); + else + smartCursorKey.SetClear(); + if (this._player.nonTorch >= 0) + smartSelectKey.SetSolid(ChromaHotkeyPainter.PainterColors.SmartSelect); + else + smartSelectKey.SetClear(); + } + } + + private void Step_Movement() + { + List wasdKeys = this._wasdKeys; + bool flag = this._player.frozen || this._player.tongued || this._player.webbed || this._player.stoned; + if (this._player.DeadOrGhost) + this.SetGroupClear(wasdKeys); + else if (flag) + this.SetGroupColorBase(wasdKeys, ChromaHotkeyPainter.PainterColors.DangerKeyBlocked); + else + this.SetGroupColorBase(wasdKeys, ChromaHotkeyPainter.PainterColors.MovementKeys); + } + + private void Step_Mount() + { + ChromaHotkeyPainter.PaintKey mountKey = this._mountKey; + if (this._player.QuickMount_GetItemToUse() == null || this._player.DeadOrGhost) + mountKey.SetClear(); + else if (this._player.frozen || this._player.tongued || this._player.webbed || this._player.stoned || (double) this._player.gravDir == -1.0 || this._player.noItems) + { + mountKey.SetSolid(ChromaHotkeyPainter.PainterColors.DangerKeyBlocked); + if ((double) this._player.gravDir != -1.0) + return; + mountKey.SetSolid(ChromaHotkeyPainter.PainterColors.DangerKeyBlocked * 0.6f); + } + else + mountKey.SetSolid(ChromaHotkeyPainter.PainterColors.QuickMount); + } + + private void Step_Grapple() + { + ChromaHotkeyPainter.PaintKey grappleKey = this._grappleKey; + if (this._player.QuickGrapple_GetItemToUse() == null || this._player.DeadOrGhost) + grappleKey.SetClear(); + else if (this._player.frozen || this._player.tongued || this._player.webbed || this._player.stoned || this._player.noItems) + grappleKey.SetSolid(ChromaHotkeyPainter.PainterColors.DangerKeyBlocked); + else + grappleKey.SetSolid(ChromaHotkeyPainter.PainterColors.QuickGrapple); + } + + private void Step_Jump() + { + ChromaHotkeyPainter.PaintKey jumpKey = this._jumpKey; + if (this._player.DeadOrGhost) + jumpKey.SetClear(); + else if (this._player.frozen || this._player.tongued || this._player.webbed || this._player.stoned) + jumpKey.SetSolid(ChromaHotkeyPainter.PainterColors.DangerKeyBlocked); + else + jumpKey.SetSolid(ChromaHotkeyPainter.PainterColors.MovementKeys); + } + + private void Step_QuickHeal() + { + ChromaHotkeyPainter.PaintKey healKey = this._healKey; + if (this._player.QuickHeal_GetItemToUse() == null || this._player.DeadOrGhost) + { + healKey.SetClear(); + this._quickHealAlert = 0; + } + else if (this._player.potionDelay > 0) + { + float lerpValue = Utils.GetLerpValue((float) this._player.potionDelayTime, 0.0f, (float) this._player.potionDelay, true); + Color color = Color.Lerp(ChromaHotkeyPainter.PainterColors.DangerKeyBlocked, ChromaHotkeyPainter.PainterColors.QuickHealCooldown, lerpValue) * lerpValue * lerpValue * lerpValue; + healKey.SetSolid(color); + this._quickHealAlert = 0; + } + else if (this._player.statLife == this._player.statLifeMax2) + { + healKey.SetClear(); + this._quickHealAlert = 0; + } + else if ((double) this._player.statLife <= (double) this._player.statLifeMax2 / 4.0) + { + if (this._quickHealAlert == 1) + return; + this._quickHealAlert = 1; + healKey.SetAlert(Color.Black, ChromaHotkeyPainter.PainterColors.QuickHealReadyUrgent, -1f, 2f); + } + else if ((double) this._player.statLife <= (double) this._player.statLifeMax2 / 2.0) + { + if (this._quickHealAlert == 2) + return; + this._quickHealAlert = 2; + healKey.SetAlert(Color.Black, ChromaHotkeyPainter.PainterColors.QuickHealReadyUrgent, -1f, 2f); + } + else + { + healKey.SetSolid(ChromaHotkeyPainter.PainterColors.QuickHealReady); + this._quickHealAlert = 0; + } + } + + private void Step_QuickMana() + { + ChromaHotkeyPainter.PaintKey manaKey = this._manaKey; + if (this._player.QuickMana_GetItemToUse() == null || this._player.DeadOrGhost || this._player.statMana == this._player.statManaMax2) + manaKey.SetClear(); + else + manaKey.SetSolid(ChromaHotkeyPainter.PainterColors.QuickMana); + } + + private void Step_Throw() + { + ChromaHotkeyPainter.PaintKey throwKey = this._throwKey; + Item heldItem = this._player.HeldItem; + if (this._player.DeadOrGhost || this._player.HeldItem.favorited || this._player.noThrow > 0) + throwKey.SetClear(); + else if (this._player.frozen || this._player.tongued || this._player.webbed || this._player.stoned || this._player.noItems) + throwKey.SetClear(); + else + throwKey.SetSolid(ChromaHotkeyPainter.PainterColors.Throw); + } + + private class ReactiveRGBKey + { + public readonly Keys XNAKey; + private readonly Color _color; + private readonly TimeSpan _duration; + private TimeSpan _startTime; + private TimeSpan _expireTime; + private RgbKey _rgbKey; + + public bool Expired => this._expireTime < Main.gameTimeCache.TotalGameTime; + + public ReactiveRGBKey(Keys key, Color color, TimeSpan duration) + { + this._color = color; + this.XNAKey = key; + this._duration = duration; + this._startTime = Main.gameTimeCache.TotalGameTime; + } + + public void Update() => this._rgbKey.SetSolid(Color.Lerp(this._color, Color.Black, (float) Utils.GetLerpValue(this._startTime.TotalSeconds, this._expireTime.TotalSeconds, Main.gameTimeCache.TotalGameTime.TotalSeconds, true))); + + public void Clear() => this._rgbKey.Clear(); + + public void Unbind() => Main.Chroma.UnbindKey(this.XNAKey); + + public void Bind() => this._rgbKey = Main.Chroma.BindKey(this.XNAKey); + + public void Refresh() + { + this._startTime = Main.gameTimeCache.TotalGameTime; + this._expireTime = this._startTime; + this._expireTime.Add(this._duration); + } + } + + private class PaintKey + { + private string _trigger; + private List _xnaKeys; + private List _rgbKeys; + + public PaintKey(string triggerName, List keys) + { + this._trigger = triggerName; + this._xnaKeys = new List(); + foreach (string key in keys) + { + Keys result; + if (Enum.TryParse(key, true, out result)) + this._xnaKeys.Add(result); + } + this._rgbKeys = new List(); + } + + public void Unbind() + { + foreach (RgbKey rgbKey in this._rgbKeys) + Main.Chroma.UnbindKey((Keys) rgbKey.Key); + } + + public void Bind() + { + foreach (Keys xnaKey in this._xnaKeys) + this._rgbKeys.Add(Main.Chroma.BindKey(xnaKey)); + this._rgbKeys = ((IEnumerable) this._rgbKeys).Distinct().ToList(); + } + + public void SetSolid(Color color) + { + foreach (RgbKey rgbKey in this._rgbKeys) + rgbKey.SetSolid(color); + } + + public void SetClear() + { + foreach (RgbKey rgbKey in this._rgbKeys) + rgbKey.Clear(); + } + + public bool UsesKey(Keys key) => this._xnaKeys.Contains(key); + + public void SetAlert(Color colorBase, Color colorFlash, float time, float flashesPerSecond) + { + if ((double) time == -1.0) + time = 10000f; + foreach (RgbKey rgbKey in this._rgbKeys) + rgbKey.SetFlashing(colorBase, colorFlash, time, flashesPerSecond); + } + + public List GetXNAKeysInUse() => new List((IEnumerable) this._xnaKeys); + } + + private static class PainterColors + { + private const float HOTKEY_COLOR_MULTIPLIER = 1f; + public static readonly Color MovementKeys = Color.Gray * 1f; + public static readonly Color QuickMount = Color.RoyalBlue * 1f; + public static readonly Color QuickGrapple = Color.Lerp(Color.RoyalBlue, Color.Blue, 0.5f) * 1f; + public static readonly Color QuickHealReady = Color.Pink * 1f; + public static readonly Color QuickHealReadyUrgent = Color.DeepPink * 1f; + public static readonly Color QuickHealCooldown = Color.HotPink * 0.5f * 1f; + public static readonly Color QuickMana = new Color(40, 0, 230) * 1f; + public static readonly Color Throw = Color.Red * 0.2f * 1f; + public static readonly Color SmartCursor = Color.Gold; + public static readonly Color SmartSelect = Color.Goldenrod; + public static readonly Color DangerKeyBlocked = Color.Red * 1f; + } + } +} diff --git a/GameContent/ChumBucketProjectileHelper.cs b/GameContent/ChumBucketProjectileHelper.cs new file mode 100644 index 0000000..6f05021 --- /dev/null +++ b/GameContent/ChumBucketProjectileHelper.cs @@ -0,0 +1,39 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ChumBucketProjectileHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; + +namespace Terraria.GameContent +{ + public class ChumBucketProjectileHelper + { + private Dictionary _chumCountsPendingForThisFrame = new Dictionary(); + private Dictionary _chumCountsFromLastFrame = new Dictionary(); + + public void OnPreUpdateAllProjectiles() + { + Utils.Swap>(ref this._chumCountsPendingForThisFrame, ref this._chumCountsFromLastFrame); + this._chumCountsPendingForThisFrame.Clear(); + } + + public void AddChumLocation(Vector2 spot) + { + Point tileCoordinates = spot.ToTileCoordinates(); + int num1 = 0; + this._chumCountsPendingForThisFrame.TryGetValue(tileCoordinates, out num1); + int num2 = num1 + 1; + this._chumCountsPendingForThisFrame[tileCoordinates] = num2; + } + + public int GetChumsInLocation(Point tileCoords) + { + int num = 0; + this._chumCountsFromLastFrame.TryGetValue(tileCoords, out num); + return num; + } + } +} diff --git a/GameContent/CoinLossRevengeSystem.cs b/GameContent/CoinLossRevengeSystem.cs new file mode 100644 index 0000000..e9b41e4 --- /dev/null +++ b/GameContent/CoinLossRevengeSystem.cs @@ -0,0 +1,431 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.CoinLossRevengeSystem +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Terraria.GameContent.Events; +using Terraria.ID; +using Terraria.UI; + +namespace Terraria.GameContent +{ + public class CoinLossRevengeSystem + { + public static bool DisplayCaching = false; + public static int MinimumCoinsForCaching = Item.buyPrice(silver: 10); + private const int PLAYER_BOX_WIDTH_INNER = 1968; + private const int PLAYER_BOX_HEIGHT_INNER = 1200; + private const int PLAYER_BOX_WIDTH_OUTER = 2608; + private const int PLAYER_BOX_HEIGHT_OUTER = 1840; + private static readonly Vector2 _playerBoxSizeInner = new Vector2(1968f, 1200f); + private static readonly Vector2 _playerBoxSizeOuter = new Vector2(2608f, 1840f); + private List _markers; + private readonly object _markersLock = new object(); + private int _gameTime; + + public void AddMarkerFromReader(BinaryReader reader) + { + int num1 = reader.ReadInt32(); + Vector2 coords = reader.ReadVector2(); + int num2 = reader.ReadInt32(); + float num3 = reader.ReadSingle(); + int num4 = reader.ReadInt32(); + int num5 = reader.ReadInt32(); + int num6 = reader.ReadInt32(); + float num7 = reader.ReadSingle(); + bool flag = reader.ReadBoolean(); + int npcNetId = num2; + double num8 = (double) num3; + int npcType = num4; + int npcAiStyle = num5; + int coinValue = num6; + double num9 = (double) num7; + int num10 = flag ? 1 : 0; + int gameTime = this._gameTime; + int uniqueID = num1; + this.AddMarker(new CoinLossRevengeSystem.RevengeMarker(coords, npcNetId, (float) num8, npcType, npcAiStyle, coinValue, (float) num9, num10 != 0, gameTime, uniqueID)); + } + + private void AddMarker(CoinLossRevengeSystem.RevengeMarker marker) + { + lock (this._markersLock) + this._markers.Add(marker); + } + + public void DestroyMarker(int markerUniqueID) + { + lock (this._markersLock) + this._markers.RemoveAll((Predicate) (x => x.UniqueID == markerUniqueID)); + } + + public CoinLossRevengeSystem() => this._markers = new List(); + + public void CacheEnemy(NPC npc) + { + if (npc.boss || npc.realLife != -1 || npc.rarity > 0 || npc.extraValue < CoinLossRevengeSystem.MinimumCoinsForCaching || (double) npc.position.X < (double) Main.leftWorld + 640.0 + 16.0 || (double) npc.position.X + (double) npc.width > (double) Main.rightWorld - 640.0 - 32.0 || (double) npc.position.Y < (double) Main.topWorld + 640.0 + 16.0 || (double) npc.position.Y > (double) Main.bottomWorld - 640.0 - 32.0 - (double) npc.height) + return; + int num1 = npc.netID; + int num2; + if (NPCID.Sets.RespawnEnemyID.TryGetValue(num1, out num2)) + num1 = num2; + if (num1 == 0) + return; + CoinLossRevengeSystem.RevengeMarker marker = new CoinLossRevengeSystem.RevengeMarker(npc.Center, num1, npc.GetLifePercent(), npc.type, npc.aiStyle, npc.extraValue, npc.value, npc.SpawnedFromStatue, this._gameTime); + this.AddMarker(marker); + if (Main.netMode == 2) + NetMessage.SendCoinLossRevengeMarker(marker); + if (!CoinLossRevengeSystem.DisplayCaching) + return; + Main.NewText("Cached " + npc.GivenOrTypeName); + } + + public void Reset() + { + lock (this._markersLock) + this._markers.Clear(); + this._gameTime = 0; + } + + public void Update() + { + ++this._gameTime; + if (Main.netMode != 1 || this._gameTime % 60 != 0) + return; + this.RemoveExpiredOrInvalidMarkers(); + } + + public void CheckRespawns() + { + lock (this._markersLock) + { + if (this._markers.Count == 0) + return; + } + List> tupleList = new List>(); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + Player player = Main.player[index]; + if (player.active && !player.dead) + tupleList.Add(Tuple.Create(index, Utils.CenteredRectangle(player.Center, CoinLossRevengeSystem._playerBoxSizeInner), Utils.CenteredRectangle(player.Center, CoinLossRevengeSystem._playerBoxSizeOuter))); + } + if (tupleList.Count == 0) + return; + this.RemoveExpiredOrInvalidMarkers(); + lock (this._markersLock) + { + List revengeMarkerList = new List(); + for (int index = 0; index < this._markers.Count; ++index) + { + CoinLossRevengeSystem.RevengeMarker marker = this._markers[index]; + bool flag = false; + Tuple tuple1 = (Tuple) null; + foreach (Tuple tuple2 in tupleList) + { + if (marker.Intersects(tuple2.Item2, tuple2.Item3)) + { + tuple1 = tuple2; + flag = true; + break; + } + } + if (!flag) + marker.SetRespawnAttemptLock(false); + else if (!marker.RespawnAttemptLocked) + { + marker.SetRespawnAttemptLock(true); + if (marker.WouldNPCBeDiscouraged(Main.player[tuple1.Item1])) + { + marker.SetToExpire(); + } + else + { + marker.SpawnEnemy(); + revengeMarkerList.Add(marker); + } + } + } + this._markers = this._markers.Except((IEnumerable) revengeMarkerList).ToList(); + } + } + + private void RemoveExpiredOrInvalidMarkers() + { + lock (this._markersLock) + { + this._markers.Where((Func) (x => x.IsExpired(this._gameTime))); + this._markers.Where((Func) (x => x.IsInvalid())); + this._markers.RemoveAll((Predicate) (x => x.IsInvalid())); + this._markers.RemoveAll((Predicate) (x => x.IsExpired(this._gameTime))); + } + } + + public CoinLossRevengeSystem.RevengeMarker DrawMapIcons( + SpriteBatch spriteBatch, + Vector2 mapTopLeft, + Vector2 mapX2Y2AndOff, + Rectangle? mapRect, + float mapScale, + float drawScale, + ref string unused) + { + CoinLossRevengeSystem.RevengeMarker revengeMarker = (CoinLossRevengeSystem.RevengeMarker) null; + lock (this._markersLock) + { + foreach (CoinLossRevengeSystem.RevengeMarker marker in this._markers) + { + if (marker.DrawMapIcon(spriteBatch, mapTopLeft, mapX2Y2AndOff, mapRect, mapScale, drawScale, this._gameTime)) + revengeMarker = marker; + } + } + return revengeMarker; + } + + public void SendAllMarkersToPlayer(int plr) + { + lock (this._markersLock) + { + foreach (CoinLossRevengeSystem.RevengeMarker marker in this._markers) + NetMessage.SendCoinLossRevengeMarker(marker, plr); + } + } + + public class RevengeMarker + { + private static int _uniqueIDCounter = 0; + private static readonly int _expirationCompCopper = Item.buyPrice(copper: 1); + private static readonly int _expirationCompSilver = Item.buyPrice(silver: 1); + private static readonly int _expirationCompGold = Item.buyPrice(gold: 1); + private static readonly int _expirationCompPlat = Item.buyPrice(1); + private const int ONE_MINUTE = 3600; + private const int ENEMY_BOX_WIDTH = 2160; + private const int ENEMY_BOX_HEIGHT = 1440; + public static readonly Vector2 EnemyBoxSize = new Vector2(2160f, 1440f); + private readonly Vector2 _location; + private readonly Rectangle _hitbox; + private readonly int _npcNetID; + private readonly float _npcHPPercent; + private readonly float _baseValue; + private readonly int _coinsValue; + private readonly int _npcTypeAgainstDiscouragement; + private readonly int _npcAIStyleAgainstDiscouragement; + private readonly int _expirationTime; + private readonly bool _spawnedFromStatue; + private readonly int _uniqueID; + private bool _forceExpire; + private bool _attemptedRespawn; + + public void SetToExpire() => this._forceExpire = true; + + public bool RespawnAttemptLocked => this._attemptedRespawn; + + public void SetRespawnAttemptLock(bool state) => this._attemptedRespawn = state; + + public RevengeMarker( + Vector2 coords, + int npcNetId, + float npcHPPercent, + int npcType, + int npcAiStyle, + int coinValue, + float baseValue, + bool spawnedFromStatue, + int gameTime, + int uniqueID = -1) + { + this._location = coords; + this._npcNetID = npcNetId; + this._npcHPPercent = npcHPPercent; + this._npcTypeAgainstDiscouragement = npcType; + this._npcAIStyleAgainstDiscouragement = npcAiStyle; + this._coinsValue = coinValue; + this._baseValue = baseValue; + this._spawnedFromStatue = spawnedFromStatue; + this._hitbox = Utils.CenteredRectangle(this._location, CoinLossRevengeSystem.RevengeMarker.EnemyBoxSize); + this._expirationTime = this.CalculateExpirationTime(gameTime, coinValue); + if (uniqueID == -1) + this._uniqueID = CoinLossRevengeSystem.RevengeMarker._uniqueIDCounter++; + else + this._uniqueID = uniqueID; + } + + public bool IsInvalid() + { + int npcInvasionGroup = NPC.GetNPCInvasionGroup(this._npcTypeAgainstDiscouragement); + switch (npcInvasionGroup) + { + case -3: + return !DD2Event.Ongoing; + case -2: + return !Main.pumpkinMoon || Main.dayTime; + case -1: + return !Main.snowMoon || Main.dayTime; + case 1: + case 2: + case 3: + case 4: + return npcInvasionGroup != Main.invasionType; + default: + switch (this._npcTypeAgainstDiscouragement) + { + case 158: + case 159: + case 162: + case 166: + case 251: + case 253: + case 460: + case 461: + case 462: + case 463: + case 466: + case 467: + case 468: + case 469: + case 477: + case 478: + case 479: + if (!Main.eclipse || !Main.dayTime) + return true; + break; + } + return false; + } + } + + public bool IsExpired(int gameTime) => this._forceExpire || this._expirationTime <= gameTime; + + private int CalculateExpirationTime(int gameCacheTime, int coinValue) + { + int num = (coinValue >= CoinLossRevengeSystem.RevengeMarker._expirationCompSilver ? (coinValue >= CoinLossRevengeSystem.RevengeMarker._expirationCompGold ? (coinValue >= CoinLossRevengeSystem.RevengeMarker._expirationCompPlat ? 432000 : (int) MathHelper.Lerp(108000f, 216000f, Utils.GetLerpValue((float) CoinLossRevengeSystem.RevengeMarker._expirationCompSilver, (float) CoinLossRevengeSystem.RevengeMarker._expirationCompGold, (float) coinValue, false))) : (int) MathHelper.Lerp(36000f, 108000f, Utils.GetLerpValue((float) CoinLossRevengeSystem.RevengeMarker._expirationCompSilver, (float) CoinLossRevengeSystem.RevengeMarker._expirationCompGold, (float) coinValue, false))) : (int) MathHelper.Lerp(0.0f, 3600f, Utils.GetLerpValue((float) CoinLossRevengeSystem.RevengeMarker._expirationCompCopper, (float) CoinLossRevengeSystem.RevengeMarker._expirationCompSilver, (float) coinValue, false))) + 18000; + return gameCacheTime + num; + } + + public bool Intersects(Rectangle rectInner, Rectangle rectOuter) => rectOuter.Intersects(this._hitbox); + + public void SpawnEnemy() + { + int number = NPC.NewNPC((int) this._location.X, (int) this._location.Y, this._npcNetID); + NPC npc = Main.npc[number]; + if (this._npcNetID < 0) + npc.SetDefaults(this._npcNetID); + int num1; + if (NPCID.Sets.SpecialSpawningRules.TryGetValue(this._npcNetID, out num1) && num1 == 0) + { + Point tileCoordinates = npc.position.ToTileCoordinates(); + npc.ai[0] = (float) tileCoordinates.X; + npc.ai[1] = (float) tileCoordinates.Y; + npc.netUpdate = true; + } + npc.timeLeft += 3600; + npc.extraValue = this._coinsValue; + npc.value = this._baseValue; + npc.SpawnedFromStatue = this._spawnedFromStatue; + float num2 = Math.Max(0.5f, this._npcHPPercent); + npc.life = (int) ((double) npc.lifeMax * (double) num2); + if (number < 200) + { + if (Main.netMode == 0) + { + npc.moneyPing(this._location); + } + else + { + NetMessage.SendData(23, number: number); + NetMessage.SendData(92, number: number, number2: ((float) this._coinsValue), number3: this._location.X, number4: this._location.Y); + } + } + if (!CoinLossRevengeSystem.DisplayCaching) + return; + Main.NewText("Spawned " + npc.GivenOrTypeName); + } + + public bool WouldNPCBeDiscouraged(Player playerTarget) + { + switch (this._npcAIStyleAgainstDiscouragement) + { + case 2: + return NPC.DespawnEncouragement_AIStyle2_FloatingEye_IsDiscouraged(this._npcTypeAgainstDiscouragement, playerTarget.position); + case 3: + return !NPC.DespawnEncouragement_AIStyle3_Fighters_NotDiscouraged(this._npcTypeAgainstDiscouragement, playerTarget.position, (NPC) null); + case 6: + bool flag = false; + switch (this._npcTypeAgainstDiscouragement) + { + case 10: + case 39: + case 95: + case 117: + case 510: + flag = true; + break; + case 513: + flag = !playerTarget.ZoneUndergroundDesert; + break; + } + return flag && (double) playerTarget.position.Y < Main.worldSurface * 16.0; + default: + switch (this._npcNetID) + { + case 253: + return !Main.eclipse; + case 490: + return Main.dayTime; + default: + return false; + } + } + } + + public bool DrawMapIcon( + SpriteBatch spriteBatch, + Vector2 mapTopLeft, + Vector2 mapX2Y2AndOff, + Rectangle? mapRect, + float mapScale, + float drawScale, + int gameTime) + { + Vector2 vector2 = (this._location / 16f - mapTopLeft) * mapScale + mapX2Y2AndOff; + if (mapRect.HasValue && !mapRect.Value.Contains(vector2.ToPoint())) + return false; + Texture2D texture2D1 = TextureAssets.MapDeath.Value; + Texture2D texture2D2 = this._coinsValue >= 100 ? (this._coinsValue >= 10000 ? (this._coinsValue >= 1000000 ? TextureAssets.Coin[3].Value : TextureAssets.Coin[2].Value) : TextureAssets.Coin[1].Value) : TextureAssets.Coin[0].Value; + Rectangle r = texture2D2.Frame(verticalFrames: 8); + spriteBatch.Draw(texture2D2, vector2, new Rectangle?(r), Color.White, 0.0f, r.Size() / 2f, drawScale, SpriteEffects.None, 0.0f); + return Utils.CenteredRectangle(vector2, r.Size() * drawScale).Contains(Main.MouseScreen.ToPoint()); + } + + public void UseMouseOver( + SpriteBatch spriteBatch, + ref string mouseTextString, + float drawScale = 1f) + { + mouseTextString = ""; + Vector2 vector2 = Main.MouseScreen / drawScale + new Vector2(-28f) + new Vector2(4f, 0.0f); + ItemSlot.DrawMoney(spriteBatch, "", vector2.X, vector2.Y, Utils.CoinsSplit((long) this._coinsValue), true); + } + + public int UniqueID => this._uniqueID; + + public void WriteSelfTo(BinaryWriter writer) + { + writer.Write(this._uniqueID); + writer.WriteVector2(this._location); + writer.Write(this._npcNetID); + writer.Write(this._npcHPPercent); + writer.Write(this._npcTypeAgainstDiscouragement); + writer.Write(this._npcAIStyleAgainstDiscouragement); + writer.Write(this._coinsValue); + writer.Write(this._baseValue); + writer.Write(this._spawnedFromStatue); + } + } + } +} diff --git a/GameContent/ContentRejectionFromSize.cs b/GameContent/ContentRejectionFromSize.cs new file mode 100644 index 0000000..a4b5d12 --- /dev/null +++ b/GameContent/ContentRejectionFromSize.cs @@ -0,0 +1,39 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ContentRejectionFromSize +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using ReLogic.Content; +using Terraria.Localization; + +namespace Terraria.GameContent +{ + public class ContentRejectionFromSize : IRejectionReason + { + private int _neededWidth; + private int _neededHeight; + private int _actualWidth; + private int _actualHeight; + + public ContentRejectionFromSize( + int neededWidth, + int neededHeight, + int actualWidth, + int actualHeight) + { + this._neededWidth = neededWidth; + this._neededHeight = neededHeight; + this._actualWidth = actualWidth; + this._actualHeight = actualHeight; + } + + public string GetReason() => Language.GetTextValueWith("AssetRejections.BadSize", (object) new + { + NeededWidth = this._neededWidth, + NeededHeight = this._neededHeight, + ActualWidth = this._actualWidth, + ActualHeight = this._actualHeight + }); + } +} diff --git a/GameContent/Creative/Content/Sacrifices.tsv b/GameContent/Creative/Content/Sacrifices.tsv new file mode 100644 index 0000000..bbc79f0 --- /dev/null +++ b/GameContent/Creative/Content/Sacrifices.tsv @@ -0,0 +1,5095 @@ +//A - 50 B - 25 C - 5 D - 1 E - Invalid 2 f 3 g 10 h 15 i 30 j 99 k 100 l 200 m N - 20 O - 400 +//ItemID RarityCategoryId SpecialTags Notes +YellowPhasesaberOld E +WhitePhasesaberOld E +PurplePhasesaberOld E +GreenPhasesaberOld E +RedPhasesaberOld E +BluePhasesaberOld E +PlatinumBowOld E +PlatinumHammerOld E +PlatinumAxeOld E +PlatinumShortswordOld E +PlatinumBroadswordOld E +PlatinumPickaxeOld E +TungstenBowOld E +TungstenHammerOld E +TungstenAxeOld E +TungstenShortswordOld E +TungstenBroadswordOld E +TungstenPickaxeOld E +LeadBowOld E +LeadHammerOld E +LeadAxeOld E +LeadShortswordOld E +LeadBroadswordOld E +LeadPickaxeOld E +TinBowOld E +TinHammerOld E +TinAxeOld E +TinShortswordOld E +TinBroadswordOld E +TinPickaxeOld E +CopperBowOld E +CopperHammerOld E +CopperAxeOld E +CopperShortswordOld E +CopperBroadswordOld E +CopperPickaxeOld E +SilverBowOld E +SilverHammerOld E +SilverAxeOld E +SilverShortswordOld E +SilverBroadswordOld E +SilverPickaxeOld E +GoldBowOld E +GoldHammerOld E +GoldAxeOld E +GoldShortswordOld E +GoldBroadswordOld E +GoldPickaxeOld E +None E +IronPickaxe D +DirtBlock L +StoneBlock L +IronBroadsword D +Mushroom J +IronShortsword D +IronHammer D +Torch L +Wood L +IronAxe D +IronOre L +CopperOre L +GoldOre L +SilverOre L +CopperWatch D +SilverWatch D +GoldWatch D +DepthMeter D +GoldBar B +CopperBar B +SilverBar B +IronBar B +Gel K +WoodenSword D +WoodenDoor D +StoneWall O +Acorn A +LesserHealingPotion J +LifeCrystal H +DirtWall O +Bottle B +WoodenTable D +Furnace D +WoodenChair D +IronAnvil D +WorkBench D +Goggles D +Lens B +WoodenBow D +WoodenArrow K +FlamingArrow K +Shuriken K +SuspiciousLookingEye G +DemonBow D +WarAxeoftheNight D +LightsBane D +UnholyArrow K +Chest D +BandofRegeneration D +MagicMirror D +JestersArrow K +AngelStatue D +CloudinaBottle D +HermesBoots D +EnchantedBoomerang D +DemoniteOre L +DemoniteBar B +Heart E +CorruptSeeds B +VileMushroom B +EbonstoneBlock L +GrassSeeds B +Sunflower C +Vilethorn D +Starfury D +PurificationPowder K +VilePowder K +RottenChunk B +WormTooth B +WormFood G +CopperCoin L +SilverCoin L +GoldCoin L +PlatinumCoin L +FallenStar A +CopperGreaves D +IronGreaves D +SilverGreaves D +GoldGreaves D +CopperChainmail D +IronChainmail D +SilverChainmail D +GoldChainmail D +GrapplingHook D +Chain L +ShadowScale B +PiggyBank D +MiningHelmet D +CopperHelmet D +IronHelmet D +SilverHelmet D +GoldHelmet D +WoodWall O +WoodPlatform M +FlintlockPistol D +Musket D +MusketBall K +Minishark D +IronBow D +ShadowGreaves D +ShadowScalemail D +ShadowHelmet D +NightmarePickaxe D +TheBreaker D +Candle D +CopperChandelier D +SilverChandelier D +GoldChandelier D +ManaCrystal H +LesserManaPotion J +BandofStarpower D +FlowerofFire D +MagicMissile D +DirtRod D +ShadowOrb D +Meteorite L +MeteoriteBar B +Hook D +Flamarang D +MoltenFury D +FieryGreatsword D +MoltenPickaxe D +MeteorHelmet D +MeteorSuit D +MeteorLeggings D +BottledWater J +SpaceGun D +RocketBoots D +GrayBrick L +GrayBrickWall O +RedBrick L +RedBrickWall O +ClayBlock L +BlueBrick L +BlueBrickWall O +ChainLantern D +GreenBrick L +GreenBrickWall O +PinkBrick L +PinkBrickWall O +GoldBrick L +GoldBrickWall O +SilverBrick L +SilverBrickWall O +CopperBrick L +CopperBrickWall O +Spike L +WaterCandle D +Book B +Cobweb A +NecroHelmet D +NecroBreastplate D +NecroGreaves D +Bone K +Muramasa D +CobaltShield D +AquaScepter D +LuckyHorseshoe D +ShinyRedBalloon D +Harpoon D +SpikyBall K +BallOHurt D +BlueMoon D +Handgun D +WaterBolt D +Bomb K +Dynamite K +Grenade K +SandBlock L +Glass L +Sign D +AshBlock L +Obsidian L +Hellstone L +HellstoneBar B +MudBlock L +Sapphire I +Ruby I +Emerald I +Topaz I +Amethyst I +Diamond I +GlowingMushroom L +Star E +IvyWhip D +BreathingReed D +Flipper D +HealingPotion J +ManaPotion J +BladeofGrass D +ThornChakram D +ObsidianBrick L +ObsidianSkull D +MushroomGrassSeeds B +JungleGrassSeeds B +WoodenHammer D +StarCannon D +BluePhaseblade D +RedPhaseblade D +GreenPhaseblade D +PurplePhaseblade D +WhitePhaseblade D +YellowPhaseblade D +MeteorHamaxe D +EmptyBucket D +WaterBucket D +LavaBucket D +JungleRose D +Stinger B +Vine C +FeralClaws D +AnkletoftheWind D +StaffofRegrowth D +HellstoneBrick L +WhoopieCushion D +Shackle D +MoltenHamaxe D +Flamelash D +PhoenixBlaster D +Sunfury D +Hellforge D +ClayPot D +NaturesGift D +Bed D +Silk B +LesserRestorationPotion J +RestorationPotion J +JungleHat D +JungleShirt D +JunglePants D +MoltenHelmet D +MoltenBreastplate D +MoltenGreaves D +MeteorShot K +StickyBomb K +BlackLens D +Sunglasses D +WizardHat D +TopHat D +TuxedoShirt D +TuxedoPants D +SummerHat D +BunnyHood D +PlumbersHat D +PlumbersShirt D +PlumbersPants D +HerosHat D +HerosShirt D +HerosPants D +FishBowl D +ArchaeologistsHat D +ArchaeologistsJacket D +ArchaeologistsPants D +BlackThread C +GreenThread C +NinjaHood D +NinjaShirt D +NinjaPants D +Leather C +RedHat D +Goldfish C +Robe D +RobotHat D +GoldCrown D +HellfireArrow K +Sandgun D +GuideVoodooDoll D +DivingHelmet D +FamiliarShirt D +FamiliarPants D +FamiliarWig D +DemonScythe D +NightsEdge D +DarkLance D +Coral B +Cactus L +Trident D +SilverBullet K +ThrowingKnife K +Spear D +Blowpipe D +Glowstick L +Seed K +WoodenBoomerang D +Aglet D +StickyGlowstick L +PoisonedKnife K +ObsidianSkinPotion N +RegenerationPotion N +SwiftnessPotion N +GillsPotion N +IronskinPotion N +ManaRegenerationPotion N +MagicPowerPotion N +FeatherfallPotion N +SpelunkerPotion N +InvisibilityPotion N +ShinePotion N +NightOwlPotion N +BattlePotion N +ThornsPotion N +WaterWalkingPotion N +ArcheryPotion N +HunterPotion N +GravitationPotion N +GoldChest D +DaybloomSeeds B +MoonglowSeeds B +BlinkrootSeeds B +DeathweedSeeds B +WaterleafSeeds B +FireblossomSeeds B +Daybloom B +Moonglow B +Blinkroot B +Deathweed B +Waterleaf B +Fireblossom B +SharkFin B +Feather B +Tombstone F +MimeMask D +AntlionMandible C +IllegalGunParts D +TheDoctorsShirt D +TheDoctorsPants D +GoldenKey g +ShadowChest D +ShadowKey D +ObsidianBrickWall O +JungleSpores B +Loom D +Piano D +Dresser D +Bench D +Bathtub D +RedBanner D +GreenBanner D +BlueBanner D +YellowBanner D +LampPost D +TikiTorch D +Barrel D +ChineseLantern D +CookingPot D +Safe D +SkullLantern D +TrashCan D +Candelabra D +PinkVase D +Mug D +Keg D +Ale N +Bookcase D +Throne D +Bowl D +BowlofSoup H +Toilet D +GrandfatherClock D +ArmorStatue D +GoblinBattleStandard G +TatteredCloth B +Sawmill D +CobaltOre L +MythrilOre L +AdamantiteOre L +Pwnhammer D +Excalibur D +HallowedSeeds B +EbonsandBlock L +CobaltHat D +CobaltHelmet D +CobaltMask D +CobaltBreastplate D +CobaltLeggings D +MythrilHood D +MythrilHelmet D +MythrilHat D +MythrilChainmail D +MythrilGreaves D +CobaltBar B +MythrilBar B +CobaltChainsaw D +MythrilChainsaw D +CobaltDrill D +MythrilDrill D +AdamantiteChainsaw D +AdamantiteDrill D +DaoofPow D +MythrilHalberd D +AdamantiteBar B +GlassWall O +Compass D +DivingGear D +GPS D +ObsidianHorseshoe D +ObsidianShield D +TinkerersWorkshop D +CloudinaBalloon D +AdamantiteHeadgear D +AdamantiteHelmet D +AdamantiteMask D +AdamantiteBreastplate D +AdamantiteLeggings D +SpectreBoots D +AdamantiteGlaive D +Toolbelt D +PearlsandBlock L +PearlstoneBlock L +MiningShirt D +MiningPants D +PearlstoneBrick L +IridescentBrick L +MudstoneBlock L +CobaltBrick L +MythrilBrick L +PearlstoneBrickWall O +IridescentBrickWall O +MudstoneBrickWall O +CobaltBrickWall O +MythrilBrickWall O +HolyWater K +UnholyWater K +SiltBlock M +FairyBell D +BreakerBlade D +BlueTorch L +RedTorch L +GreenTorch L +PurpleTorch L +WhiteTorch L +YellowTorch L +DemonTorch L +ClockworkAssaultRifle D +CobaltRepeater D +MythrilRepeater D +DualHook D +StarStatue D +SwordStatue D +SlimeStatue D +GoblinStatue D +ShieldStatue D +BatStatue D +FishStatue D +BunnyStatue D +SkeletonStatue D +ReaperStatue D +WomanStatue D +ImpStatue D +GargoyleStatue D +GloomStatue D +HornetStatue D +BombStatue D +CrabStatue D +HammerStatue D +PotionStatue D +SpearStatue D +CrossStatue D +JellyfishStatue D +BowStatue D +BoomerangStatue D +BootStatue D +ChestStatue D +BirdStatue D +AxeStatue D +CorruptStatue D +TreeStatue D +AnvilStatue D +PickaxeStatue D +MushroomStatue D +EyeballStatue D +PillarStatue D +HeartStatue D +PotStatue D +SunflowerStatue D +KingStatue D +QueenStatue D +PiranhaStatue D +PlankedWall O +WoodenBeam A +AdamantiteRepeater D +AdamantiteSword D +CobaltSword D +MythrilSword D +MoonCharm D +Ruler D +CrystalBall D +DiscoBall D +SorcererEmblem D +WarriorEmblem D +RangerEmblem D +DemonWings D +AngelWings D +MagicalHarp D +RainbowRod D +IceRod D +NeptunesShell D +Mannequin D +GreaterHealingPotion J +GreaterManaPotion J +PixieDust B +CrystalShard B +ClownHat D +ClownShirt D +ClownPants D +Flamethrower D +Bell D +Harp D +Wrench D +WireCutter D +ActiveStoneBlock L +InactiveStoneBlock L +Lever C +LaserRifle D +CrystalBullet K +HolyArrow K +MagicDagger D +CrystalStorm D +CursedFlames D +SoulofLight B +SoulofNight B +CursedFlame B +CursedTorch L +AdamantiteForge D +MythrilAnvil D +UnicornHorn C +DarkShard D +LightShard D +RedPressurePlate C +Wire L +SpellTome D +StarCloak D +Megashark D +Shotgun D +PhilosophersStone D +TitanGlove D +CobaltNaginata D +Switch C +DartTrap C +Boulder C +GreenPressurePlate C +GrayPressurePlate C +BrownPressurePlate C +MechanicalEye G +CursedArrow K +CursedBullet K +SoulofFright B +SoulofMight B +SoulofSight B +Gungnir D +HallowedPlateMail D +HallowedGreaves D +HallowedHelmet D +CrossNecklace D +ManaFlower D +MechanicalWorm G +MechanicalSkull G +HallowedHeadgear D +HallowedMask D +SlimeCrown G +LightDisc D +MusicBoxOverworldDay D +MusicBoxEerie D +MusicBoxNight D +MusicBoxTitle D +MusicBoxUnderground D +MusicBoxBoss1 D +MusicBoxJungle D +MusicBoxCorruption D +MusicBoxUndergroundCorruption D +MusicBoxTheHallow D +MusicBoxBoss2 D +MusicBoxUndergroundHallow D +MusicBoxBoss3 D +SoulofFlight B +MusicBox D +DemoniteBrick L +HallowedRepeater D +Drax D +Explosives C +InletPump D +OutletPump D +Timer1Second D +Timer3Second D +Timer5Second D +CandyCaneBlock L +CandyCaneWall O +SantaHat D +SantaShirt D +SantaPants D +GreenCandyCaneBlock L +GreenCandyCaneWall O +SnowBlock L +SnowBrick L +SnowBrickWall O +BlueLight B +RedLight B +GreenLight B +BluePresent E +GreenPresent E +YellowPresent E +SnowGlobe G +Carrot D +AdamantiteBeam L +AdamantiteBeamWall O +DemoniteBrickWall O +SandstoneBrick L +SandstoneBrickWall O +EbonstoneBrick L +EbonstoneBrickWall O +RedStucco L +YellowStucco L +GreenStucco L +GrayStucco L +RedStuccoWall O +YellowStuccoWall O +GreenStuccoWall O +GrayStuccoWall O +Ebonwood L +RichMahogany L +Pearlwood L +EbonwoodWall O +RichMahoganyWall O +PearlwoodWall O +EbonwoodChest D +RichMahoganyChest D +PearlwoodChest D +EbonwoodChair D +RichMahoganyChair D +PearlwoodChair D +EbonwoodPlatform M +RichMahoganyPlatform M +PearlwoodPlatform M +BonePlatform M +EbonwoodWorkBench D +RichMahoganyWorkBench D +PearlwoodWorkBench D +EbonwoodTable D +RichMahoganyTable D +PearlwoodTable D +EbonwoodPiano D +RichMahoganyPiano D +PearlwoodPiano D +EbonwoodBed D +RichMahoganyBed D +PearlwoodBed D +EbonwoodDresser D +RichMahoganyDresser D +PearlwoodDresser D +EbonwoodDoor D +RichMahoganyDoor D +PearlwoodDoor D +EbonwoodSword D +EbonwoodHammer D +EbonwoodBow D +RichMahoganySword D +RichMahoganyHammer D +RichMahoganyBow D +PearlwoodSword D +PearlwoodHammer D +PearlwoodBow D +RainbowBrick L +RainbowBrickWall O +IceBlock L +RedsWings D +RedsHelmet D +RedsBreastplate D +RedsLeggings D +Fish D +IceBoomerang D +Keybrand D +Cutlass D +BorealWoodWorkBench D +TrueExcalibur D +TrueNightsEdge D +Frostbrand D +BorealWoodTable D +RedPotion H +TacticalShotgun D +IvyChest D +IceChest D +Marrow D +UnholyTrident D +FrostHelmet D +FrostBreastplate D +FrostLeggings D +TinHelmet D +TinChainmail D +TinGreaves D +LeadHelmet D +LeadChainmail D +LeadGreaves D +TungstenHelmet D +TungstenChainmail D +TungstenGreaves D +PlatinumHelmet D +PlatinumChainmail D +PlatinumGreaves D +TinOre L +LeadOre L +TungstenOre L +PlatinumOre L +TinBar B +LeadBar B +TungstenBar B +PlatinumBar B +TinWatch D +TungstenWatch D +PlatinumWatch D +TinChandelier D +TungstenChandelier D +PlatinumChandelier D +PlatinumCandle D +PlatinumCandelabra D +PlatinumCrown D +LeadAnvil D +TinBrick L +TungstenBrick L +PlatinumBrick L +TinBrickWall O +TungstenBrickWall O +PlatinumBrickWall O +BeamSword D +IceBlade D +IceBow D +FrostStaff D +WoodHelmet D +WoodBreastplate D +WoodGreaves D +EbonwoodHelmet D +EbonwoodBreastplate D +EbonwoodGreaves D +RichMahoganyHelmet D +RichMahoganyBreastplate D +RichMahoganyGreaves D +PearlwoodHelmet D +PearlwoodBreastplate D +PearlwoodGreaves D +AmethystStaff D +TopazStaff D +SapphireStaff D +EmeraldStaff D +RubyStaff D +DiamondStaff D +GrassWall O +JungleWall O +FlowerWall O +Jetpack D +ButterflyWings D +CactusWall O +Cloud L +CloudWall O +Seaweed D +RuneHat D +RuneRobe D +MushroomSpear D +TerraBlade D +GrenadeLauncher D +RocketLauncher D +ProximityMineLauncher D +FairyWings D +SlimeBlock L +FleshBlock L +MushroomWall O +RainCloud L +BoneBlock L +FrozenSlimeBlock L +BoneBlockWall O +SlimeBlockWall O +FleshBlockWall O +RocketI K +RocketII K +RocketIII K +RocketIV K +AsphaltBlock L +CobaltPickaxe D +MythrilPickaxe D +AdamantitePickaxe D +Clentaminator D +GreenSolution K +BlueSolution K +PurpleSolution K +DarkBlueSolution K +RedSolution K +HarpyWings D +BoneWings D +Hammush D +NettleBurst D +AnkhBanner D +SnakeBanner D +OmegaBanner D +CrimsonHelmet D +CrimsonScalemail D +CrimsonGreaves D +BloodButcherer D +TendonBow D +FleshGrinder D +DeathbringerPickaxe D +BloodLustCluster D +TheUndertaker D +TheMeatball D +TheRottedFork D +EskimoHood D +EskimoCoat D +EskimoPants D +LivingWoodChair D +CactusChair D +BoneChair D +FleshChair D +MushroomChair D +BoneWorkBench D +CactusWorkBench D +FleshWorkBench D +MushroomWorkBench D +SlimeWorkBench D +CactusDoor D +FleshDoor D +MushroomDoor D +LivingWoodDoor D +BoneDoor D +FlameWings D +FrozenWings D +GhostWings D +SunplateBlock L +DiscWall O +SkywareChair D +BoneTable D +FleshTable D +LivingWoodTable D +SkywareTable D +LivingWoodChest D +LivingWoodWand D +PurpleIceBlock L +PinkIceBlock L +RedIceBlock L +CrimstoneBlock L +SkywareDoor D +SkywareChest D +SteampunkHat D +SteampunkShirt D +SteampunkPants D +BeeHat D +BeeShirt D +BeePants D +WorldBanner D +SunBanner D +GravityBanner D +PharaohsMask D +Actuator A +BlueWrench D +GreenWrench D +BluePressurePlate C +YellowPressurePlate C +DiscountCard D +LuckyCoin D +UnicornonaStick D +SandstorminaBottle D +BorealWoodSofa D +BeachBall D +CharmofMyths D +MoonShell D +StarVeil D +WaterWalkingBoots D +Tiara D +PrincessDress D +PharaohsRobe D +GreenCap D +MushroomCap D +TamOShanter D +MummyMask D +MummyShirt D +MummyPants D +CowboyHat D +CowboyJacket D +CowboyPants D +PirateHat D +PirateShirt D +PiratePants D +VikingHelmet D +CrimtaneOre L +CactusSword D +CactusPickaxe D +IceBrick L +IceBrickWall O +AdhesiveBandage D +ArmorPolish D +Bezoar D +Blindfold D +FastClock D +Megaphone D +Nazar D +Vitamins D +TrifoldMap D +CactusHelmet D +CactusBreastplate D +CactusLeggings D +PowerGlove D +LightningBoots D +SunStone D +MoonStone D +ArmorBracing D +MedicatedBandage D +ThePlan D +CountercurseMantra D +CoinGun D +LavaCharm D +ObsidianWaterWalkingBoots D +LavaWaders D +PureWaterFountain D +DesertWaterFountain D +Shadewood L +ShadewoodDoor D +ShadewoodPlatform M +ShadewoodChest D +ShadewoodChair D +ShadewoodWorkBench D +ShadewoodTable D +ShadewoodDresser D +ShadewoodPiano D +ShadewoodBed D +ShadewoodSword D +ShadewoodHammer D +ShadewoodBow D +ShadewoodHelmet D +ShadewoodBreastplate D +ShadewoodGreaves D +ShadewoodWall O +Cannon D +Cannonball B +FlareGun D +Flare K +BoneWand D +LeafWand D +FlyingCarpet D +AvengerEmblem D +MechanicalGlove D +LandMine C +PaladinsShield D +WebSlinger D +JungleWaterFountain D +IcyWaterFountain D +CorruptWaterFountain D +CrimsonWaterFountain D +HallowedWaterFountain D +BloodWaterFountain D +Umbrella D +ChlorophyteOre L +SteampunkWings D +Snowball K +IceSkates D +SnowballLauncher D +WebCoveredChest D +ClimbingClaws D +AncientIronHelmet D +AncientGoldHelmet D +AncientShadowHelmet D +AncientShadowScalemail D +AncientShadowGreaves D +AncientNecroHelmet D +AncientCobaltHelmet D +AncientCobaltBreastplate D +AncientCobaltLeggings D +BlackBelt D +Boomstick D +Rope L +Campfire D +Marshmallow H +MarshmallowonaStick H +CookedMarshmallow H +RedRocket C +GreenRocket C +BlueRocket C +YellowRocket C +IceTorch L +ShoeSpikes D +TigerClimbingGear D +Tabi D +PinkEskimoHood D +PinkEskimoCoat D +PinkEskimoPants D +PinkThread C +ManaRegenerationBand D +SandstorminaBalloon D +MasterNinjaGear D +RopeCoil H +Blowgun D +BlizzardinaBottle D +FrostburnArrow K +EnchantedSword D +PickaxeAxe D +CobaltWaraxe D +MythrilWaraxe D +AdamantiteWaraxe D +EatersBone D +BlendOMatic D +MeatGrinder D +Extractinator D +Solidifier D +Amber I +ConfettiGun C +ChlorophyteMask D +ChlorophyteHelmet D +ChlorophyteHeadgear D +ChlorophytePlateMail D +ChlorophyteGreaves D +ChlorophyteBar B +RedDye G +OrangeDye G +YellowDye G +LimeDye G +GreenDye G +TealDye G +CyanDye G +SkyBlueDye G +BlueDye G +PurpleDye G +VioletDye G +PinkDye G +RedandBlackDye G +OrangeandBlackDye G +YellowandBlackDye G +LimeandBlackDye G +GreenandBlackDye G +TealandBlackDye G +CyanandBlackDye G +SkyBlueandBlackDye G +BlueandBlackDye G +PurpleandBlackDye G +VioletandBlackDye G +PinkandBlackDye G +FlameDye G +FlameAndBlackDye G +GreenFlameDye G +GreenFlameAndBlackDye G +BlueFlameDye G +BlueFlameAndBlackDye G +SilverDye G +BrightRedDye G +BrightOrangeDye G +BrightYellowDye G +BrightLimeDye G +BrightGreenDye G +BrightTealDye G +BrightCyanDye G +BrightSkyBlueDye G +BrightBlueDye G +BrightPurpleDye G +BrightVioletDye G +BrightPinkDye G +BlackDye G +RedandSilverDye G +OrangeandSilverDye G +YellowandSilverDye G +LimeandSilverDye G +GreenandSilverDye G +TealandSilverDye G +CyanandSilverDye G +SkyBlueandSilverDye G +BlueandSilverDye G +PurpleandSilverDye G +VioletandSilverDye G +PinkandSilverDye G +IntenseFlameDye G +IntenseGreenFlameDye G +IntenseBlueFlameDye G +RainbowDye G +IntenseRainbowDye G +YellowGradientDye G +CyanGradientDye G +VioletGradientDye G +Paintbrush D +PaintRoller D +RedPaint L +OrangePaint L +YellowPaint L +LimePaint L +GreenPaint L +TealPaint L +CyanPaint L +SkyBluePaint L +BluePaint L +PurplePaint L +VioletPaint L +PinkPaint L +DeepRedPaint L +DeepOrangePaint L +DeepYellowPaint L +DeepLimePaint L +DeepGreenPaint L +DeepTealPaint L +DeepCyanPaint L +DeepSkyBluePaint L +DeepBluePaint L +DeepPurplePaint L +DeepVioletPaint L +DeepPinkPaint L +BlackPaint L +WhitePaint L +GrayPaint L +PaintScraper D +LihzahrdBrick L +LihzahrdBrickWall O +SlushBlock M +PalladiumOre L +OrichalcumOre L +TitaniumOre L +TealMushroom G +GreenMushroom G +SkyBlueFlower G +YellowMarigold G +BlueBerries G +LimeKelp G +PinkPricklyPear G +OrangeBloodroot G +RedHusk G +CyanHusk G +VioletHusk G +PurpleMucos G +BlackInk G +DyeVat D +BeeGun D +PossessedHatchet D +BeeKeeper D +Hive L +HoneyBlock L +HiveWall O +CrispyHoneyBlock L +HoneyBucket D +HiveWand D +Beenade K +GravityGlobe D +HoneyComb D +Abeemination G +BottledHoney J +RainHat D +RainCoat D +LihzahrdDoor D +DungeonDoor D +LeadDoor D +IronDoor D +TempleKey D +LihzahrdChest D +LihzahrdChair D +LihzahrdTable D +LihzahrdWorkBench D +SuperDartTrap C +FlameTrap C +SpikyBallTrap C +SpearTrap C +WoodenSpike L +LihzahrdPressurePlate C +LihzahrdStatue D +LihzahrdWatcherStatue D +LihzahrdGuardianStatue D +WaspGun D +PiranhaGun D +PygmyStaff D +PygmyNecklace D +TikiMask D +TikiShirt D +TikiPants D +LeafWings D +BlizzardinaBalloon D +BundleofBalloons D +BatWings D +BoneSword D +HerculesBeetle D +SmokeBomb B +BoneKey D +Nectar D +TikiTotem D +LizardEgg D +GraveMarker F +CrossGraveMarker F +Headstone F +Gravestone F +Obelisk F +LeafBlower D +ChlorophyteBullet K +ParrotCracker D +StrangeGlowingMushroom D +Seedling D +WispinaBottle D +PalladiumBar B +PalladiumSword D +PalladiumPike D +PalladiumRepeater D +PalladiumPickaxe D +PalladiumDrill D +PalladiumChainsaw D +OrichalcumBar B +OrichalcumSword D +OrichalcumHalberd D +OrichalcumRepeater D +OrichalcumPickaxe D +OrichalcumDrill D +OrichalcumChainsaw D +TitaniumBar B +TitaniumSword D +TitaniumTrident D +TitaniumRepeater D +TitaniumPickaxe D +TitaniumDrill D +TitaniumChainsaw D +PalladiumMask D +PalladiumHelmet D +PalladiumHeadgear D +PalladiumBreastplate D +PalladiumLeggings D +OrichalcumMask D +OrichalcumHelmet D +OrichalcumHeadgear D +OrichalcumBreastplate D +OrichalcumLeggings D +TitaniumMask D +TitaniumHelmet D +TitaniumHeadgear D +TitaniumBreastplate D +TitaniumLeggings D +OrichalcumAnvil D +TitaniumForge D +PalladiumWaraxe D +OrichalcumWaraxe D +TitaniumWaraxe D +HallowedBar B +ChlorophyteClaymore D +ChlorophyteSaber D +ChlorophytePartisan D +ChlorophyteShotbow D +ChlorophytePickaxe D +ChlorophyteDrill D +ChlorophyteChainsaw D +ChlorophyteGreataxe D +ChlorophyteWarhammer D +ChlorophyteArrow K +AmethystHook D +TopazHook D +SapphireHook D +EmeraldHook D +RubyHook D +DiamondHook D +AmberMosquito D +UmbrellaHat D +NimbusRod D +OrangeTorch L +CrimsandBlock L +BeeCloak D +EyeoftheGolem D +HoneyBalloon D +BlueHorseshoeBalloon D +WhiteHorseshoeBalloon D +YellowHorseshoeBalloon D +FrozenTurtleShell D +SniperRifle D +VenusMagnum D +CrimsonRod D +CrimtaneBar B +Stynger D +FlowerPow D +RainbowGun D +StyngerBolt K +ChlorophyteJackhammer D +Teleporter D +FlowerofFrost D +Uzi D +MagnetSphere D +PurpleStainedGlass O +YellowStainedGlass O +BlueStainedGlass O +GreenStainedGlass O +RedStainedGlass O +MulticoloredStainedGlass O +SkeletronHand D +Skull D +BallaHat D +GangstaHat D +SailorHat D +EyePatch D +SailorShirt D +SailorPants D +SkeletronMask D +AmethystRobe D +TopazRobe D +SapphireRobe D +EmeraldRobe D +RubyRobe D +DiamondRobe D +WhiteTuxedoShirt D +WhiteTuxedoPants D +PanicNecklace D +LifeFruit H +LihzahrdAltar D +LihzahrdPowerCell G +Picksaw D +HeatRay D +StaffofEarth D +GolemFist D +WaterChest D +Binoculars D +RifleScope D +DestroyerEmblem D +HighVelocityBullet K +JellyfishNecklace D +ZombieArm D +TheAxe D +IceSickle D +ClothierVoodooDoll D +PoisonStaff D +SlimeStaff D +PoisonDart K +EyeSpring D +ToySled D +BookofSkulls D +KOCannon D +PirateMap G +TurtleHelmet D +TurtleScaleMail D +TurtleLeggings D +SnowballCannon D +BonePickaxe D +MagicQuiver D +MagmaStone D +ObsidianRose D +Bananarang D +ChainKnife D +RodofDiscord D +DeathSickle D +TurtleShell G +TissueSample B +Vertebrae B +BloodySpine G +Ichor B +IchorTorch L +IchorArrow K +IchorBullet K +GoldenShower D +BunnyCannon D +ExplosiveBunny B +VialofVenom B +FlaskofVenom N +VenomArrow K +VenomBullet K +FireGauntlet D +Cog L +Confetti B +Nanites B +ExplosivePowder B +GoldDust B +PartyBullet K +NanoBullet K +ExplodingBullet K +GoldenBullet K +FlaskofCursedFlames N +FlaskofFire N +FlaskofGold N +FlaskofIchor N +FlaskofNanites N +FlaskofParty N +FlaskofPoison N +EyeofCthulhuTrophy D +EaterofWorldsTrophy D +BrainofCthulhuTrophy D +SkeletronTrophy D +QueenBeeTrophy D +WallofFleshTrophy D +DestroyerTrophy D +SkeletronPrimeTrophy D +RetinazerTrophy D +SpazmatismTrophy D +PlanteraTrophy D +GolemTrophy D +BloodMoonRising D +TheHangedMan D +GloryoftheFire D +BoneWarp D +WallSkeleton D +HangingSkeleton D +BlueSlabWall O +BlueTiledWall O +PinkSlabWall O +PinkTiledWall O +GreenSlabWall O +GreenTiledWall O +BlueBrickPlatform B +PinkBrickPlatform B +GreenBrickPlatform B +MetalShelf B +BrassShelf B +WoodShelf B +BrassLantern D +CagedLantern D +CarriageLantern D +AlchemyLantern D +DiablostLamp D +OilRagSconse D +BlueDungeonChair D +BlueDungeonTable D +BlueDungeonWorkBench D +GreenDungeonChair D +GreenDungeonTable D +GreenDungeonWorkBench D +PinkDungeonChair D +PinkDungeonTable D +PinkDungeonWorkBench D +BlueDungeonCandle D +GreenDungeonCandle D +PinkDungeonCandle D +BlueDungeonVase D +GreenDungeonVase D +PinkDungeonVase D +BlueDungeonDoor D +GreenDungeonDoor D +PinkDungeonDoor D +BlueDungeonBookcase D +GreenDungeonBookcase D +PinkDungeonBookcase D +Catacomb D +DungeonShelf B +SkellingtonJSkellingsworth D +TheCursedMan D +TheEyeSeestheEnd D +SomethingEvilisWatchingYou D +TheTwinsHaveAwoken D +TheScreamer D +GoblinsPlayingPoker D +Dryadisque D +Sunflowers D +TerrarianGothic D +Beanie D +ImbuingStation D +StarinaBottle D +EmptyBullet L +Impact D +PoweredbyBirds D +TheDestroyer D +ThePersistencyofEyes D +UnicornCrossingtheHallows D +GreatWave D +StarryNight D +GuidePicasso D +TheGuardiansGaze D +FatherofSomeone D +NurseLisa D +ShadowbeamStaff D +InfernoFork D +SpectreStaff D +WoodenFence O +LeadFence O +BubbleMachine D +BubbleWand D +MarchingBonesBanner D +NecromanticSign D +RustedCompanyStandard D +RaggedBrotherhoodSigil D +MoltenLegionFlag D +DiabolicSigil D +ObsidianPlatform M +ObsidianDoor D +ObsidianChair D +ObsidianTable D +ObsidianWorkBench D +ObsidianVase D +ObsidianBookcase D +HellboundBanner D +HellHammerBanner D +HelltowerBanner D +LostHopesofManBanner D +ObsidianWatcherBanner D +LavaEruptsBanner D +BlueDungeonBed D +GreenDungeonBed D +PinkDungeonBed D +ObsidianBed D +Waldo D +Darkness D +DarkSoulReaper D +Land D +TrappedGhost D +DemonsEye D +FindingGold D +FirstEncounter D +GoodMorning D +UndergroundReward D +ThroughtheWindow D +PlaceAbovetheClouds D +DoNotStepontheGrass D +ColdWatersintheWhiteLand D +LightlessChasms D +TheLandofDeceivingLooks D +Daylight D +SecretoftheSands D +DeadlandComesAlive D +EvilPresence D +SkyGuardian D +AmericanExplosive D +Discover D +HandEarth D +OldMiner D +Skelehead D +FacingtheCerebralMastermind D +LakeofFire D +TrioSuperHeroes D +SpectreHood D +SpectreRobe D +SpectrePants D +SpectrePickaxe D +SpectreHamaxe D +Ectoplasm B +GothicChair D +GothicTable D +GothicWorkBench D +GothicBookcase D +PaladinsHammer D +SWATHelmet D +BeeWings D +GiantHarpyFeather D +BoneFeather D +FireFeather D +IceFeather D +BrokenBatWing D +TatteredBeeWing D +LargeAmethyst D +LargeTopaz D +LargeSapphire D +LargeEmerald D +LargeRuby D +LargeDiamond D +JungleChest D +CorruptionChest D +CrimsonChest D +HallowedChest D +FrozenChest D +JungleKey D +CorruptionKey D +CrimsonKey D +HallowedKey D +FrozenKey D +ImpFace D +OminousPresence D +ShiningMoon D +LivingGore D +FlowingMagma D +SpectrePaintbrush D +SpectrePaintRoller D +SpectrePaintScraper D +ShroomiteHeadgear D +ShroomiteMask D +ShroomiteHelmet D +ShroomiteBreastplate D +ShroomiteLeggings D +Autohammer D +ShroomiteBar B +SDMG D +CenxsTiara D +CenxsBreastplate D +CenxsLeggings D +CrownosMask D +CrownosBreastplate D +CrownosLeggings D +WillsHelmet D +WillsBreastplate D +WillsLeggings D +JimsHelmet D +JimsBreastplate D +JimsLeggings D +AaronsHelmet D +AaronsBreastplate D +AaronsLeggings D +VampireKnives D +BrokenHeroSword D +ScourgeoftheCorruptor D +StaffoftheFrostHydra D +TheCreationoftheGuide D +TheMerchant D +CrownoDevoursHisLunch D +RareEnchantment D +GloriousNight D +SweetheartNecklace D +FlurryBoots D +DTownsHelmet D +DTownsBreastplate D +DTownsLeggings D +DTownsWings D +WillsWings D +CrownosWings D +CenxsWings D +CenxsDress D +CenxsDressPants D +PalladiumColumn L +PalladiumColumnWall O +BubblegumBlock L +BubblegumBlockWall O +TitanstoneBlock L +TitanstoneBlockWall O +MagicCuffs D +MusicBoxSnow D +MusicBoxSpace D +MusicBoxCrimson D +MusicBoxBoss4 D +MusicBoxAltOverworldDay D +MusicBoxRain D +MusicBoxIce D +MusicBoxDesert D +MusicBoxOcean D +MusicBoxDungeon D +MusicBoxPlantera D +MusicBoxBoss5 D +MusicBoxTemple D +MusicBoxEclipse D +MusicBoxMushrooms D +ButterflyDust D +AnkhCharm D +AnkhShield D +BlueFlare K +AnglerFishBanner D +AngryNimbusBanner D +AnomuraFungusBanner D +AntlionBanner D +ArapaimaBanner D +ArmoredSkeletonBanner D +BatBanner D +BirdBanner D +BlackRecluseBanner D +BloodFeederBanner D +BloodJellyBanner D +BloodCrawlerBanner D +BoneSerpentBanner D +BunnyBanner D +ChaosElementalBanner D +MimicBanner D +ClownBanner D +CorruptBunnyBanner D +CorruptGoldfishBanner D +CrabBanner D +CrimeraBanner D +CrimsonAxeBanner D +CursedHammerBanner D +DemonBanner D +DemonEyeBanner D +DerplingBanner D +EaterofSoulsBanner D +EnchantedSwordBanner D +ZombieEskimoBanner D +FaceMonsterBanner D +FloatyGrossBanner D +FlyingFishBanner D +FlyingSnakeBanner D +FrankensteinBanner D +FungiBulbBanner D +FungoFishBanner D +GastropodBanner D +GoblinThiefBanner D +GoblinSorcererBanner D +GoblinPeonBanner D +GoblinScoutBanner D +GoblinWarriorBanner D +GoldfishBanner D +HarpyBanner D +HellbatBanner D +HerplingBanner D +HornetBanner D +IceElementalBanner D +IcyMermanBanner D +FireImpBanner D +JellyfishBanner D +JungleCreeperBanner D +LihzahrdBanner D +ManEaterBanner D +MeteorHeadBanner D +MothBanner D +MummyBanner D +MushiLadybugBanner D +ParrotBanner D +PigronBanner D +PiranhaBanner D +PirateBanner D +PixieBanner D +RaincoatZombieBanner D +ReaperBanner D +SharkBanner D +SkeletonBanner D +SkeletonMageBanner D +SlimeBanner D +SnowFlinxBanner D +SpiderBanner D +SporeZombieBanner D +SwampThingBanner D +TortoiseBanner D +ToxicSludgeBanner D +UmbrellaSlimeBanner D +UnicornBanner D +VampireBanner D +VultureBanner D +NypmhBanner D +WerewolfBanner D +WolfBanner D +WorldFeederBanner D +WormBanner D +WraithBanner D +WyvernBanner D +ZombieBanner D +GlassPlatform M +GlassChair D +GoldenChair D +GoldenToilet D +BarStool D +HoneyChair D +SteampunkChair D +GlassDoor D +GoldenDoor D +HoneyDoor D +SteampunkDoor D +GlassTable D +BanquetTable D +Bar D +GoldenTable D +HoneyTable D +SteampunkTable D +GlassBed D +GoldenBed D +HoneyBed D +SteampunkBed D +LivingWoodWall O +FartinaJar D +Pumpkin L +PumpkinWall O +Hay L +HayWall O +SpookyWood L +SpookyWoodWall O +PumpkinHelmet D +PumpkinBreastplate D +PumpkinLeggings D +CandyApple E +SoulCake E +NurseHat D +NurseShirt D +NursePants D +WizardsHat D +GuyFawkesMask D +DyeTraderRobe D +SteampunkGoggles D +CyborgHelmet D +CyborgShirt D +CyborgPants D +CreeperMask D +CreeperShirt D +CreeperPants D +CatMask D +CatShirt D +CatPants D +GhostMask D +GhostShirt D +PumpkinMask D +PumpkinShirt D +PumpkinPants D +RobotMask D +RobotShirt D +RobotPants D +UnicornMask D +UnicornShirt D +UnicornPants D +VampireMask D +VampireShirt D +VampirePants D +WitchHat D +LeprechaunHat D +LeprechaunShirt D +LeprechaunPants D +PixieShirt D +PixiePants D +PrincessHat D +PrincessDressNew D +GoodieBag H +WitchDress D +WitchBoots D +BrideofFrankensteinMask D +BrideofFrankensteinDress D +KarateTortoiseMask D +KarateTortoiseShirt D +KarateTortoisePants D +CandyCornRifle D +CandyCorn K +JackOLanternLauncher D +ExplosiveJackOLantern K +Sickle D +PumpkinPie H +ScarecrowHat D +ScarecrowShirt D +ScarecrowPants D +Cauldron D +PumpkinChair D +PumpkinDoor D +PumpkinTable D +PumpkinWorkBench D +PumpkinPlatform M +TatteredFairyWings D +SpiderEgg D +MagicalPumpkinSeed D +BatHook D +BatScepter D +RavenStaff D +JungleKeyMold E +CorruptionKeyMold E +CrimsonKeyMold E +HallowedKeyMold E +FrozenKeyMold E +HangingJackOLantern D +RottenEgg K +UnluckyYarn D +BlackFairyDust D +Jackelier D +JackOLantern D +SpookyChair D +SpookyDoor D +SpookyTable D +SpookyWorkBench D +SpookyPlatform M +ReaperHood D +ReaperRobe D +FoxMask D +FoxShirt D +FoxPants D +CatEars D +BloodyMachete D +TheHorsemansBlade D +BladedGlove D +PumpkinSeed B +SpookyHook D +SpookyWings D +SpookyTwig D +SpookyHelmet D +SpookyBreastplate D +SpookyLeggings D +StakeLauncher D +Stake K +CursedSapling D +SpaceCreatureMask D +SpaceCreatureShirt D +SpaceCreaturePants D +WolfMask D +WolfShirt D +WolfPants D +PumpkinMoonMedallion G +NecromanticScroll D +JackingSkeletron D +BitterHarvest D +BloodMoonCountess D +HallowsEve D +MorbidCuriosity D +TreasureHunterShirt D +TreasureHunterPants D +DryadCoverings D +DryadLoincloth D +MourningWoodTrophy D +PumpkingTrophy D +JackOLanternMask D +SniperScope D +HeartLantern D +JellyfishDivingGear D +ArcticDivingGear D +FrostsparkBoots D +FartInABalloon D +PapyrusScarab D +CelestialStone D +Hoverboard D +CandyCane E +SugarPlum E +Present H +RedRyder D +FestiveWings D +PineTreeBlock L +ChristmasTree D +StarTopper1 D +StarTopper2 D +StarTopper3 D +BowTopper D +WhiteGarland D +WhiteAndRedGarland D +RedGardland D +RedAndGreenGardland D +GreenGardland D +GreenAndWhiteGarland D +MulticoloredBulb D +RedBulb D +YellowBulb D +GreenBulb D +RedAndGreenBulb D +YellowAndGreenBulb D +RedAndYellowBulb D +WhiteBulb D +WhiteAndRedBulb D +WhiteAndYellowBulb D +WhiteAndGreenBulb D +MulticoloredLights D +RedLights D +GreenLights D +BlueLights D +YellowLights D +RedAndYellowLights D +RedAndGreenLights D +YellowAndGreenLights D +BlueAndGreenLights D +RedAndBlueLights D +BlueAndYellowLights D +GiantBow D +ReindeerAntlers D +Holly D +CandyCaneSword D +EldMelter D +ChristmasPudding H +Eggnog J +StarAnise K +ReindeerBells D +CandyCaneHook D +ChristmasHook D +CnadyCanePickaxe D +FruitcakeChakram D +SugarCookie H +GingerbreadCookie H +HandWarmer D +Coal D +Toolbox D +PineDoor D +PineChair D +PineTable D +DogWhistle D +ChristmasTreeSword D +ChainGun D +Razorpine D +BlizzardStaff D +MrsClauseHat D +MrsClauseShirt D +MrsClauseHeels D +ParkaHood D +ParkaCoat D +ParkaPants D +SnowHat D +UglySweater D +TreeMask D +TreeShirt D +TreeTrunks D +ElfHat D +ElfShirt D +ElfPants D +SnowmanCannon D +NorthPole D +ChristmasTreeWallpaper O +OrnamentWallpaper O +CandyCaneWallpaper O +FestiveWallpaper O +StarsWallpaper O +SquigglesWallpaper O +SnowflakeWallpaper O +KrampusHornWallpaper O +BluegreenWallpaper O +GrinchFingerWallpaper O +NaughtyPresent G +BabyGrinchMischiefWhistle D +IceQueenTrophy D +SantaNK1Trophy D +EverscreamTrophy D +MusicBoxPumpkinMoon D +MusicBoxAltUnderground D +MusicBoxFrostMoon D +BrownPaint L +ShadowPaint L +NegativePaint L +TeamDye G +AmethystGemsparkBlock L +TopazGemsparkBlock L +SapphireGemsparkBlock L +EmeraldGemsparkBlock L +RubyGemsparkBlock L +DiamondGemsparkBlock L +AmberGemsparkBlock L +LifeHairDye D +ManaHairDye D +DepthHairDye D +MoneyHairDye D +TimeHairDye D +TeamHairDye D +BiomeHairDye D +PartyHairDye D +RainbowHairDye D +SpeedHairDye D +AngelHalo D +Fez D +Womannquin D +HairDyeRemover D +BugNet D +Firefly C +FireflyinaBottle D +MonarchButterfly C +PurpleEmperorButterfly C +RedAdmiralButterfly C +UlyssesButterfly C +SulphurButterfly C +TreeNymphButterfly C +ZebraSwallowtailButterfly C +JuliaButterfly C +Worm C +Mouse C +LightningBug C +LightningBuginaBottle D +Snail C +GlowingSnail C +FancyGreyWallpaper O +IceFloeWallpaper O +MusicWallpaper O +PurpleRainWallpaper O +RainbowWallpaper O +SparkleStoneWallpaper O +StarlitHeavenWallpaper O +Bird C +BlueJay C +Cardinal C +Squirrel C +Bunny C +CactusBookcase D +EbonwoodBookcase D +FleshBookcase D +HoneyBookcase D +SteampunkBookcase D +GlassBookcase D +RichMahoganyBookcase D +PearlwoodBookcase D +SpookyBookcase D +SkywareBookcase D +LihzahrdBookcase D +FrozenBookcase D +CactusLantern D +EbonwoodLantern D +FleshLantern D +HoneyLantern D +SteampunkLantern D +GlassLantern D +RichMahoganyLantern D +PearlwoodLantern D +FrozenLantern D +LihzahrdLantern D +SkywareLantern D +SpookyLantern D +FrozenDoor D +CactusCandle D +EbonwoodCandle D +FleshCandle D +GlassCandle D +FrozenCandle D +RichMahoganyCandle D +PearlwoodCandle D +LihzahrdCandle D +SkywareCandle D +PumpkinCandle D +CactusChandelier D +EbonwoodChandelier D +FleshChandelier D +HoneyChandelier D +FrozenChandelier D +RichMahoganyChandelier D +PearlwoodChandelier D +LihzahrdChandelier D +SkywareChandelier D +SpookyChandelier D +GlassChandelier D +CactusBed D +FleshBed D +FrozenBed D +LihzahrdBed D +SkywareBed D +SpookyBed D +CactusBathtub D +EbonwoodBathtub D +FleshBathtub D +GlassBathtub D +FrozenBathtub D +RichMahoganyBathtub D +PearlwoodBathtub D +LihzahrdBathtub D +SkywareBathtub D +SpookyBathtub D +CactusLamp D +EbonwoodLamp D +FleshLamp D +GlassLamp D +FrozenLamp D +RichMahoganyLamp D +PearlwoodLamp D +LihzahrdLamp D +SkywareLamp D +SpookyLamp D +CactusCandelabra D +EbonwoodCandelabra D +FleshCandelabra D +HoneyCandelabra D +SteampunkCandelabra D +GlassCandelabra D +RichMahoganyCandelabra D +PearlwoodCandelabra D +FrozenCandelabra D +LihzahrdCandelabra D +SkywareCandelabra D +SpookyCandelabra D +BrainMask D +FleshMask D +TwinMask D +SkeletronPrimeMask D +BeeMask D +PlanteraMask D +GolemMask D +EaterMask D +EyeMask D +DestroyerMask D +BlacksmithRack D +CarpentryRack D +HelmetRack D +SpearRack D +SwordRack D +StoneSlab L +SandstoneSlab L +Frog C +MallardDuck C +Duck C +HoneyBathtub D +SteampunkBathtub D +LivingWoodBathtub D +ShadewoodBathtub D +BoneBathtub D +HoneyLamp D +SteampunkLamp D +LivingWoodLamp D +ShadewoodLamp D +GoldenLamp D +BoneLamp D +LivingWoodBookcase D +ShadewoodBookcase D +GoldenBookcase D +BoneBookcase D +LivingWoodBed D +BoneBed D +LivingWoodChandelier D +ShadewoodChandelier D +GoldenChandelier D +BoneChandelier D +LivingWoodLantern D +ShadewoodLantern D +GoldenLantern D +BoneLantern D +LivingWoodCandelabra D +ShadewoodCandelabra D +GoldenCandelabra D +BoneCandelabra D +LivingWoodCandle D +ShadewoodCandle D +GoldenCandle D +BlackScorpion C +Scorpion C +BubbleWallpaper O +CopperPipeWallpaper O +DuckyWallpaper O +FrostCore G +BunnyCage D +SquirrelCage D +MallardDuckCage D +DuckCage D +BirdCage D +BlueJayCage D +CardinalCage D +WaterfallWall O +LavafallWall O +CrimsonSeeds B +HeavyWorkBench D +CopperPlating L +SnailCage D +GlowingSnailCage D +ShroomiteDiggingClaw D +AmmoBox D +MonarchButterflyJar D +PurpleEmperorButterflyJar D +RedAdmiralButterflyJar D +UlyssesButterflyJar D +SulphurButterflyJar D +TreeNymphButterflyJar D +ZebraSwallowtailButterflyJar D +JuliaButterflyJar D +ScorpionCage D +BlackScorpionCage D +VenomStaff D +SpectreMask D +FrogCage D +MouseCage D +BoneWelder D +FleshCloningVaat D +GlassKiln D +LihzahrdFurnace D +LivingLoom D +SkyMill D +IceMachine D +BeetleHelmet D +BeetleScaleMail D +BeetleShell D +BeetleLeggings D +SteampunkBoiler D +HoneyDispenser D +Penguin C +PenguinCage D +WormCage D +Terrarium D +SuperManaPotion J +EbonwoodFence O +RichMahoganyFence O +PearlwoodFence O +ShadewoodFence O +BrickLayer D +ExtendoGrip D +PaintSprayer D +PortableCementMixer D +BeetleHusk B +CelestialMagnet D +CelestialEmblem D +CelestialCuffs D +PeddlersHat D +PulseBow D +DynastyChandelier D +DynastyLamp D +DynastyLantern D +DynastyCandelabra D +DynastyChair D +DynastyWorkBench D +DynastyChest D +DynastyBed D +DynastyBathtub D +DynastyBookcase D +DynastyCup D +DynastyBowl D +DynastyCandle D +DynastyClock D +GoldenClock D +GlassClock D +HoneyClock D +SteampunkClock D +FancyDishes D +GlassBowl D +WineGlass D +LivingWoodPiano D +FleshPiano D +FrozenPiano D +FrozenTable D +HoneyChest D +SteampunkChest D +HoneyWorkBench D +FrozenWorkBench D +SteampunkWorkBench D +GlassPiano D +HoneyPiano D +SteampunkPiano D +HoneyCup D +SteampunkCup D +DynastyTable D +DynastyWood L +RedDynastyShingles L +BlueDynastyShingles L +WhiteDynastyWall O +BlueDynastyWall O +DynastyDoor D +Sake N +PadThai H +Pho H +Revolver D +Gatligator D +ArcaneRuneWall O +WaterGun D +Katana D +UltrabrightTorch L +MagicHat D +DiamondRing D +Gi D +Kimono D +GypsyRobe D +BeetleWings D +TigerSkin D +LeopardSkin D +ZebraSkin D +CrimsonCloak D +MysteriousCape D +RedCape D +WinterCape D +FrozenChair D +WoodFishingPole D +Bass G +ReinforcedFishingPole D +FiberglassFishingPole D +FisherofSouls D +GoldenFishingRod D +MechanicsRod D +SittingDucksFishingRod D +Trout G +Salmon G +AtlanticCod G +Tuna G +RedSnapper G +NeonTetra G +ArmoredCavefish G +Damselfish G +CrimsonTigerfish G +FrostMinnow G +PrincessFish G +GoldenCarp G +SpecularFish G +Prismite G +VariegatedLardfish G +FlarefinKoi G +DoubleCod G +Honeyfin J +Obsidifish G +Shrimp G +ChaosFish G +Ebonkoi G +Hemopiranha G +Rockfish D +Stinkfish G +MiningPotion N +HeartreachPotion N +CalmingPotion N +BuilderPotion N +TitanPotion N +FlipperPotion N +SummoningPotion N +TrapsightPotion N +PurpleClubberfish D +ObsidianSwordfish D +Swordfish D +IronFence O +WoodenCrate H +IronCrate H +GoldenCrate H +OldShoe D +FishingSeaweed D +TinCan D +MinecartTrack L +ReaverShark D +SawtoothShark D +Minecart D +AmmoReservationPotion N +LifeforcePotion N +EndurancePotion N +RagePotion N +InfernoPotion N +WrathPotion N +RecallPotion N +TeleportationPotion N +LovePotion N +StinkPotion N +FishingPotion N +SonarPotion N +CratePotion N +ShiverthornSeeds B +Shiverthorn B +WarmthPotion N +FishHook D +BeeHeadgear D +BeeBreastplate D +BeeGreaves D +HornetStaff D +ImpStaff D +QueenSpiderStaff D +AnglerHat D +AnglerVest D +AnglerPants D +SpiderMask D +SpiderBreastplate D +SpiderGreaves D +HighTestFishingLine D +AnglerEarring D +TackleBox D +BlueDungeonPiano D +GreenDungeonPiano D +PinkDungeonPiano D +GoldenPiano D +ObsidianPiano D +BonePiano D +CactusPiano D +SpookyPiano D +SkywarePiano D +LihzahrdPiano D +BlueDungeonDresser D +GreenDungeonDresser D +PinkDungeonDresser D +GoldenDresser D +ObsidianDresser D +BoneDresser D +CactusDresser D +SpookyDresser D +SkywareDresser D +HoneyDresser D +LihzahrdDresser D +Sofa D +EbonwoodSofa D +RichMahoganySofa D +PearlwoodSofa D +ShadewoodSofa D +BlueDungeonSofa D +GreenDungeonSofa D +PinkDungeonSofa D +GoldenSofa D +ObsidianSofa D +BoneSofa D +CactusSofa D +SpookySofa D +SkywareSofa D +HoneySofa D +SteampunkSofa D +MushroomSofa D +GlassSofa D +PumpkinSofa D +LihzahrdSofa D +SeashellHairpin D +MermaidAdornment D +MermaidTail D +ZephyrFish D +Fleshcatcher D +HotlineFishingHook D +FrogLeg D +Anchor D +CookedFish H +CookedShrimp H +Sashimi H +FuzzyCarrot D +ScalyTruffle D +SlimySaddle D +BeeWax B +CopperPlatingWall O +StoneSlabWall O +Sail O +CoralstoneBlock L +BlueJellyfish G +GreenJellyfish G +PinkJellyfish G +BlueJellyfishJar D +GreenJellyfishJar D +PinkJellyfishJar D +LifePreserver D +ShipsWheel D +CompassRose D +WallAnchor D +GoldfishTrophy D +BunnyfishTrophy D +SwordfishTrophy D +SharkteethTrophy D +Batfish F +BumblebeeTuna F +Catfish F +Cloudfish F +Cursedfish F +Dirtfish F +DynamiteFish F +EaterofPlankton F +FallenStarfish F +TheFishofCthulu F +Fishotron F +Harpyfish F +Hungerfish F +Ichorfish F +Jewelfish F +MirageFish F +MutantFlinxfin F +Pengfish F +Pixiefish F +Spiderfish F +TundraTrout F +UnicornFish F +GuideVoodooFish F +Wyverntail F +ZombieFish F +AmanitaFungifin F +Angelfish F +BloodyManowar F +Bonefish F +Bunnyfish F +CapnTunabeard F +Clownfish F +DemonicHellfish F +Derpfish F +Fishron F +InfectedScabbardfish F +Mudfish F +Slimefish F +TropicalBarracuda F +KingSlimeTrophy D +ShipInABottle D +HardySaddle D +PressureTrack C +KingSlimeMask D +FinWings D +TreasureMap D +SeaweedPlanter D +PillaginMePixels D +FishCostumeMask D +FishCostumeShirt D +FishCostumeFinskirt D +GingerBeard D +HoneyedGoggles D +BorealWood L +PalmWood L +BorealWoodWall O +PalmWoodWall O +BorealWoodFence O +PalmWoodFence O +BorealWoodHelmet D +BorealWoodBreastplate D +BorealWoodGreaves D +PalmWoodHelmet D +PalmWoodBreastplate D +PalmWoodGreaves D +PalmWoodBow D +PalmWoodHammer D +PalmWoodSword D +PalmWoodPlatform M +PalmWoodBathtub D +PalmWoodBed D +PalmWoodBench D +PalmWoodCandelabra D +PalmWoodCandle D +PalmWoodChair D +PalmWoodChandelier D +PalmWoodChest D +PalmWoodSofa D +PalmWoodDoor D +PalmWoodDresser D +PalmWoodLantern D +PalmWoodPiano D +PalmWoodTable D +PalmWoodLamp D +PalmWoodWorkBench D +OpticStaff D +PalmWoodBookcase D +MushroomBathtub D +MushroomBed D +MushroomBench D +MushroomBookcase D +MushroomCandelabra D +MushroomCandle D +MushroomChandelier D +MushroomChest D +MushroomDresser D +MushroomLantern D +MushroomLamp D +MushroomPiano D +MushroomPlatform M +MushroomTable D +SpiderStaff D +BorealWoodBathtub D +BorealWoodBed D +BorealWoodBookcase D +BorealWoodCandelabra D +BorealWoodCandle D +BorealWoodChair D +BorealWoodChandelier D +BorealWoodChest D +BorealWoodClock D +BorealWoodDoor D +BorealWoodDresser D +BorealWoodLamp D +BorealWoodLantern D +BorealWoodPiano D +BorealWoodPlatform M +SlimeBathtub D +SlimeBed D +SlimeBookcase D +SlimeCandelabra D +SlimeCandle D +SlimeChair D +SlimeChandelier D +SlimeChest D +SlimeClock D +SlimeDoor D +SlimeDresser D +SlimeLamp D +SlimeLantern D +SlimePiano D +SlimePlatform M +SlimeSofa D +SlimeTable D +PirateStaff D +SlimeHook D +StickyGrenade K +TartarSauce D +DukeFishronMask D +DukeFishronTrophy D +MolotovCocktail K +BoneClock D +CactusClock D +EbonwoodClock D +FrozenClock D +LihzahrdClock D +LivingWoodClock D +RichMahoganyClock D +FleshClock D +MushroomClock D +ObsidianClock D +PalmWoodClock D +PearlwoodClock D +PumpkinClock D +ShadewoodClock D +SpookyClock D +SkywareClock D +SpiderFang B +FalconBlade D +FishronWings D +SlimeGun D +Flairon D +GreenDungeonChest D +PinkDungeonChest D +BlueDungeonChest D +BoneChest D +CactusChest D +FleshChest D +ObsidianChest D +PumpkinChest D +SpookyChest D +TempestStaff D +RazorbladeTyphoon D +BubbleGun D +Tsunami D +Seashell C +Starfish C +SteampunkPlatform M +SkywarePlatform M +LivingWoodPlatform M +HoneyPlatform M +SkywareWorkbench D +GlassWorkBench D +LivingWoodWorkBench D +FleshSofa D +FrozenSofa D +LivingWoodSofa D +PumpkinDresser D +SteampunkDresser D +GlassDresser D +FleshDresser D +PumpkinLantern D +ObsidianLantern D +PumpkinLamp D +ObsidianLamp D +BlueDungeonLamp D +GreenDungeonLamp D +PinkDungeonLamp D +HoneyCandle D +SteampunkCandle D +SpookyCandle D +ObsidianCandle D +BlueDungeonChandelier D +GreenDungeonChandelier D +PinkDungeonChandelier D +SteampunkChandelier D +PumpkinChandelier D +ObsidianChandelier D +BlueDungeonBathtub D +GreenDungeonBathtub D +PinkDungeonBathtub D +PumpkinBathtub D +ObsidianBathtub D +GoldenBathtub D +BlueDungeonCandelabra D +GreenDungeonCandelabra D +PinkDungeonCandelabra D +ObsidianCandelabra D +PumpkinCandelabra D +PumpkinBed D +PumpkinBookcase D +PumpkinPiano D +SharkStatue D +TruffleWorm G +ApprenticeBait C +JourneymanBait C +MasterBait C +AmberGemsparkWall O +AmberGemsparkWallOff O +AmethystGemsparkWall O +AmethystGemsparkWallOff O +DiamondGemsparkWall O +DiamondGemsparkWallOff O +EmeraldGemsparkWall O +EmeraldGemsparkWallOff O +RubyGemsparkWall O +RubyGemsparkWallOff O +SapphireGemsparkWall O +SapphireGemsparkWallOff O +TopazGemsparkWall O +TopazGemsparkWallOff O +TinPlatingWall O +TinPlating L +WaterfallBlock L +LavafallBlock L +ConfettiBlock L +ConfettiWall O +ConfettiBlockBlack L +ConfettiWallBlack O +WeaponRack D +FireworksBox D +LivingFireBlock L +AlphabetStatue0 D +AlphabetStatue1 D +AlphabetStatue2 D +AlphabetStatue3 D +AlphabetStatue4 D +AlphabetStatue5 D +AlphabetStatue6 D +AlphabetStatue7 D +AlphabetStatue8 D +AlphabetStatue9 D +AlphabetStatueA D +AlphabetStatueB D +AlphabetStatueC D +AlphabetStatueD D +AlphabetStatueE D +AlphabetStatueF D +AlphabetStatueG D +AlphabetStatueH D +AlphabetStatueI D +AlphabetStatueJ D +AlphabetStatueK D +AlphabetStatueL D +AlphabetStatueM D +AlphabetStatueN D +AlphabetStatueO D +AlphabetStatueP D +AlphabetStatueQ D +AlphabetStatueR D +AlphabetStatueS D +AlphabetStatueT D +AlphabetStatueU D +AlphabetStatueV D +AlphabetStatueW D +AlphabetStatueX D +AlphabetStatueY D +AlphabetStatueZ D +FireworkFountain D +BoosterTrack C +Grasshopper C +GrasshopperCage D +MusicBoxUndergroundCrimson D +CactusTable D +CactusPlatform M +BorealWoodSword D +BorealWoodHammer D +BorealWoodBow D +GlassChest D +XenoStaff D +MeteorStaff D +LivingCursedFireBlock L +LivingDemonFireBlock L +LivingFrostFireBlock L +LivingIchorBlock L +LivingUltrabrightFireBlock L +GenderChangePotion N +VortexHelmet D +VortexBreastplate D +VortexLeggings D +NebulaHelmet D +NebulaBreastplate D +NebulaLeggings D +SolarFlareHelmet D +SolarFlareBreastplate D +SolarFlareLeggings D +LunarTabletFragment H +SolarTablet G +DrillContainmentUnit D +CosmicCarKey D +MothronWings D +BrainScrambler D +VortexAxe E +VortexChainsaw E +VortexDrill D +VortexHammer E +VortexPickaxe D +NebulaAxe E +NebulaChainsaw E +NebulaDrill D +NebulaHammer E +NebulaPickaxe D +SolarFlareAxe E +SolarFlareChainsaw E +SolarFlareDrill D +SolarFlareHammer E +SolarFlarePickaxe D +HoneyfallBlock L +HoneyfallWall O +ChlorophyteBrickWall O +CrimtaneBrickWall O +ShroomitePlatingWall O +ChlorophyteBrick L +CrimtaneBrick L +ShroomitePlating L +LaserMachinegun D +ElectrosphereLauncher D +Xenopopper D +LaserDrill D +LaserRuler D +AntiGravityHook D +MoonMask D +SunMask D +MartianCostumeMask D +MartianCostumeShirt D +MartianCostumePants D +MartianUniformHelmet D +MartianUniformTorso D +MartianUniformPants D +MartianAstroClock D +MartianBathtub D +MartianBed D +MartianHoverChair D +MartianChandelier D +MartianChest D +MartianDoor D +MartianDresser D +MartianHolobookcase D +MartianHoverCandle D +MartianLamppost D +MartianLantern D +MartianPiano D +MartianPlatform M +MartianSofa D +MartianTable D +MartianTableLamp D +MartianWorkBench D +WoodenSink D +EbonwoodSink D +RichMahoganySink D +PearlwoodSink D +BoneSink D +FleshSink D +LivingWoodSink D +SkywareSink D +ShadewoodSink D +LihzahrdSink D +BlueDungeonSink D +GreenDungeonSink D +PinkDungeonSink D +ObsidianSink D +MetalSink D +GlassSink D +GoldenSink D +HoneySink D +SteampunkSink D +PumpkinSink D +SpookySink D +FrozenSink D +DynastySink D +PalmWoodSink D +MushroomSink D +BorealWoodSink D +SlimeSink D +CactusSink D +MartianSink D +WhiteLunaticHood D +BlueLunaticHood D +WhiteLunaticRobe D +BlueLunaticRobe D +MartianConduitPlating L +MartianConduitWall O +HiTekSunglasses D +MartianHairDye D +MartianArmorDye G +PaintingCastleMarsberg D +PaintingMartiaLisa D +PaintingTheTruthIsUpThere D +SmokeBlock L +LivingFlameDye G +LivingRainbowDye G +ShadowDye G +NegativeDye G +LivingOceanDye G +BrownDye G +BrownAndBlackDye G +BrightBrownDye G +BrownAndSilverDye G +WispDye G +PixieDye G +InfluxWaver D +PhasicWarpEjector E +ChargedBlasterCannon D +ChlorophyteDye G +UnicornWispDye G +InfernalWispDye G +ViciousPowder K +ViciousMushroom B +BeesKnees D +GoldBird G +GoldBunny G +GoldButterfly G +GoldFrog G +GoldGrasshopper G +GoldMouse G +GoldWorm G +StickyDynamite K +AngryTrapperBanner D +ArmoredVikingBanner D +BlackSlimeBanner D +BlueArmoredBonesBanner D +BlueCultistArcherBanner D +BlueCultistCasterBanner D +BlueCultistFighterBanner E +BoneLeeBanner D +ClingerBanner D +CochinealBeetleBanner D +CorruptPenguinBanner D +CorruptSlimeBanner D +CorruptorBanner D +CrimslimeBanner D +CursedSkullBanner D +CyanBeetleBanner D +DevourerBanner D +DiablolistBanner D +DoctorBonesBanner D +DungeonSlimeBanner D +DungeonSpiritBanner D +ElfArcherBanner D +ElfCopterBanner D +EyezorBanner D +FlockoBanner D +GhostBanner D +GiantBatBanner D +GiantCursedSkullBanner D +GiantFlyingFoxBanner D +GingerbreadManBanner D +GoblinArcherBanner D +GreenSlimeBanner D +HeadlessHorsemanBanner D +HellArmoredBonesBanner D +HellhoundBanner D +HoppinJackBanner D +IceBatBanner D +IceGolemBanner D +IceSlimeBanner D +IchorStickerBanner D +IlluminantBatBanner D +IlluminantSlimeBanner D +JungleBatBanner D +JungleSlimeBanner D +KrampusBanner D +LacBeetleBanner D +LavaBatBanner D +LavaSlimeBanner D +MartianBrainscramblerBanner D +MartianDroneBanner D +MartianEngineerBanner D +MartianGigazapperBanner D +MartianGreyGruntBanner D +MartianOfficerBanner D +MartianRaygunnerBanner D +MartianScutlixGunnerBanner D +MartianTeslaTurretBanner D +MisterStabbyBanner D +MotherSlimeBanner D +NecromancerBanner D +NutcrackerBanner D +PaladinBanner D +PenguinBanner D +PinkyBanner D +PoltergeistBanner D +PossessedArmorBanner D +PresentMimicBanner D +PurpleSlimeBanner D +RaggedCasterBanner D +RainbowSlimeBanner D +RavenBanner D +RedSlimeBanner D +RuneWizardBanner D +RustyArmoredBonesBanner D +ScarecrowBanner D +ScutlixBanner D +SkeletonArcherBanner D +SkeletonCommandoBanner D +SkeletonSniperBanner D +SlimerBanner D +SnatcherBanner D +SnowBallaBanner D +SnowmanGangstaBanner D +SpikedIceSlimeBanner D +SpikedJungleSlimeBanner D +SplinterlingBanner D +SquidBanner D +TacticalSkeletonBanner D +TheGroomBanner D +TimBanner D +UndeadMinerBanner D +UndeadVikingBanner D +WhiteCultistArcherBanner E +WhiteCultistCasterBanner E +WhiteCultistFighterBanner E +YellowSlimeBanner D +YetiBanner D +ZombieElfBanner D +SparkyPainting D +VineRope L +WormholePotion N +SummonerEmblem D +BewitchingTable D +AlchemyTable D +StrangeBrew J +SpelunkerGlowstick L +BoneArrow K +BoneTorch L +VineRopeCoil H +SoulDrain D +DartPistol D +DartRifle D +CrystalDart K +CursedDart K +IchorDart K +ChainGuillotines D +FetidBaghnakhs D +ClingerStaff D +PutridScent D +FleshKnuckles D +FlowerBoots D +Seedler D +HellwingBow D +TendonHook D +ThornHook D +IlluminantHook D +WormHook D +DevDye G +PurpleOozeDye G +ReflectiveSilverDye G +ReflectiveGoldDye G +BlueAcidDye G +DaedalusStormbow D +FlyingKnife D +BottomlessBucket D +SuperAbsorbantSponge D +GoldRing D +CoinRing D +GreedyRing D +FishFinder D +WeatherRadio D +HadesDye G +TwilightDye G +AcidDye G +MushroomDye G +PhaseDye G +MagicLantern D +MusicBoxLunarBoss D +RainbowTorch L +CursedCampfire D +DemonCampfire D +FrozenCampfire D +IchorCampfire D +RainbowCampfire D +CrystalVileShard D +ShadowFlameBow D +ShadowFlameHexDoll D +ShadowFlameKnife D +PaintingAcorns D +PaintingColdSnap D +PaintingCursedSaint D +PaintingSnowfellas D +PaintingTheSeason D +BoneRattle D +ArchitectGizmoPack D +CrimsonHeart D +Meowmere D +Sundial D +StarWrath D +MarbleBlock L +HellstoneBrickWall O +CordageGuide D +WandofSparking D +GoldBirdCage D +GoldBunnyCage D +GoldButterflyCage D +GoldFrogCage D +GoldGrasshopperCage D +GoldMouseCage D +GoldWormCage D +SilkRope L +WebRope L +SilkRopeCoil H +WebRopeCoil H +Marble L +MarbleWall O +MarbleBlockWall O +Radar D +LockBox H +Granite L +GraniteBlock L +GraniteWall O +GraniteBlockWall O +RoyalGel D +NightKey D +LightKey D +HerbBag F +Javelin K +TallyCounter D +Sextant D +EoCShield D +ButchersChainsaw D +Stopwatch D +MeteoriteBrick L +MeteoriteBrickWall O +MetalDetector D +EndlessQuiver D +EndlessMusketPouch D +ToxicFlask D +PsychoKnife D +NailGun D +Nail K +NightVisionHelmet D +CelestialShell D +PinkGel C +BouncyGlowstick L +PinkSlimeBlock L +PinkTorch L +BouncyBomb K +BouncyGrenade K +PeaceCandle D +LifeformAnalyzer D +DPSMeter D +FishermansGuide D +GoblinTech D +REK D +PDA D +CellPhone D +GraniteChest D +MeteoriteClock D +MarbleClock D +GraniteClock D +MeteoriteDoor D +MarbleDoor D +GraniteDoor D +MeteoriteDresser D +MarbleDresser D +GraniteDresser D +MeteoriteLamp D +MarbleLamp D +GraniteLamp D +MeteoriteLantern D +MarbleLantern D +GraniteLantern D +MeteoritePiano D +MarblePiano D +GranitePiano D +MeteoritePlatform M +MarblePlatform M +GranitePlatform M +MeteoriteSink D +MarbleSink D +GraniteSink D +MeteoriteSofa D +MarbleSofa D +GraniteSofa D +MeteoriteTable D +MarbleTable D +GraniteTable D +MeteoriteWorkBench D +MarbleWorkBench D +GraniteWorkBench D +MeteoriteBathtub D +MarbleBathtub D +GraniteBathtub D +MeteoriteBed D +MarbleBed D +GraniteBed D +MeteoriteBookcase D +MarbleBookcase D +GraniteBookcase D +MeteoriteCandelabra D +MarbleCandelabra D +GraniteCandelabra D +MeteoriteCandle D +MarbleCandle D +GraniteCandle D +MeteoriteChair D +MarbleChair D +GraniteChair D +MeteoriteChandelier D +MarbleChandelier D +GraniteChandelier D +MeteoriteChest D +MarbleChest D +MagicWaterDropper D +GoldenBugNet D +MagicLavaDropper D +MagicHoneyDropper D +EmptyDropper D +GladiatorHelmet D +GladiatorBreastplate D +GladiatorLeggings D +ReflectiveDye G +EnchantedNightcrawler C +Grubby C +Sluggy C +Buggy C +GrubSoup H +BombFish K +FrostDaggerfish K +SharpeningStation D +IceMirror D +SailfishBoots D +TsunamiInABottle D +TargetDummy D +CorruptFishingCrate H +CrimsonFishingCrate H +DungeonFishingCrate H +FloatingIslandFishingCrate H +HallowedFishingCrate H +JungleFishingCrate H +CrystalSerpent D +Toxikarp D +Bladetongue D +SharkToothNecklace D +MoneyTrough D +Bubble L +DayBloomPlanterBox B +MoonglowPlanterBox B +CorruptPlanterBox B +CrimsonPlanterBox B +BlinkrootPlanterBox B +WaterleafPlanterBox B +ShiverthornPlanterBox B +FireBlossomPlanterBox B +BrainOfConfusion D +WormScarf D +BalloonPufferfish D +BejeweledValkyrieHead D +BejeweledValkyrieBody D +BejeweledValkyrieWing D +RichGravestone1 F +RichGravestone2 F +RichGravestone3 F +RichGravestone4 F +RichGravestone5 F +CrystalBlock L +MusicBoxMartians D +MusicBoxPirates D +MusicBoxHell D +CrystalBlockWall O +Trapdoor D +TallGate D +SharkronBalloon D +TaxCollectorHat D +TaxCollectorSuit D +TaxCollectorPants D +BoneGlove D +ClothierJacket D +ClothierPants D +DyeTraderTurban D +DeadlySphereStaff D +BalloonHorseshoeFart D +BalloonHorseshoeHoney D +BalloonHorseshoeSharkron D +LavaLamp D +CageEnchantedNightcrawler D +CageBuggy D +CageGrubby D +CageSluggy D +SlapHand D +TwilightHairDye D +BlessedApple D +SpectreBar B +Code1 D +BuccaneerBandana D +BuccaneerShirt D +BuccaneerPants D +ObsidianHelm D +ObsidianShirt D +ObsidianPants D +MedusaHead D +ItemFrame D +Sandstone L +HardenedSand L +SandstoneWall O +CorruptHardenedSand L +CrimsonHardenedSand L +CorruptSandstone L +CrimsonSandstone L +WoodYoyo D +CorruptYoyo D +CrimsonYoyo D +JungleYoyo D +Cascade D +Chik D +Code2 D +Rally D +Yelets D +RedsYoyo D +ValkyrieYoyo D +Amarok D +HelFire D +Kraken D +TheEyeOfCthulhu D +RedString D +OrangeString D +YellowString D +LimeString D +GreenString D +TealString D +CyanString D +SkyBlueString D +BlueString D +PurpleString D +VioletString D +PinkString D +BrownString D +WhiteString D +RainbowString D +BlackString D +BlackCounterweight D +BlueCounterweight D +GreenCounterweight D +PurpleCounterweight D +RedCounterweight D +YellowCounterweight D +FormatC D +Gradient D +Valor D +KingSlimeBossBag G +EyeOfCthulhuBossBag G +EaterOfWorldsBossBag G +BrainOfCthulhuBossBag G +QueenBeeBossBag G +SkeletronBossBag G +WallOfFleshBossBag G +DestroyerBossBag G +TwinsBossBag G +SkeletronPrimeBossBag G +PlanteraBossBag G +GolemBossBag G +FishronBossBag G +CultistBossBag E +MoonLordBossBag G +HiveBackpack D +YoYoGlove D +DemonHeart D +SporeSac D +ShinyStone D +HallowHardenedSand L +HallowSandstone L +HardenedSandWall O +CorruptHardenedSandWall O +CrimsonHardenedSandWall O +HallowHardenedSandWall O +CorruptSandstoneWall O +CrimsonSandstoneWall O +HallowSandstoneWall O +DesertFossil M +DesertFossilWall O +DyeTradersScimitar D +PainterPaintballGun D +TaxCollectorsStickOfDoom D +StylistKilLaKillScissorsIWish D +MinecartMech D +MechanicalWheelPiece D +MechanicalWagonPiece D +MechanicalBatteryPiece D +AncientCultistTrophy D +MartianSaucerTrophy D +FlyingDutchmanTrophy D +LivingMahoganyWand D +LivingMahoganyLeafWand D +FallenTuxedoShirt D +FallenTuxedoPants D +Fireplace D +Chimney D +YoyoBag D +ShrimpyTruffle D +Arkhalis D +ConfettiCannon D +MusicBoxTowers D +MusicBoxGoblins D +BossMaskCultist D +BossMaskMoonlord D +FossilHelm D +FossilShirt D +FossilPants D +AmberStaff D +BoneJavelin K +BoneDagger K +FossilOre L +StardustHelmet D +StardustBreastplate D +StardustLeggings D +PortalGun D +StrangePlant1 G +StrangePlant2 G +StrangePlant3 G +StrangePlant4 G +Terrarian D +GoblinSummonerBanner D +SalamanderBanner D +GiantShellyBanner D +CrawdadBanner D +FritzBanner D +CreatureFromTheDeepBanner D +DrManFlyBanner D +MothronBanner D +SeveredHandBanner E +ThePossessedBanner D +ButcherBanner D +PsychoBanner D +DeadlySphereBanner D +NailheadBanner D +PoisonousSporeBanner E +MedusaBanner D +GreekSkeletonBanner D +GraniteFlyerBanner D +GraniteGolemBanner D +BloodZombieBanner D +DripplerBanner D +TombCrawlerBanner D +DuneSplicerBanner D +FlyingAntlionBanner D +WalkingAntlionBanner D +DesertGhoulBanner D +DesertLamiaBanner D +DesertDjinnBanner D +DesertBasiliskBanner D +RavagerScorpionBanner D +StardustSoldierBanner D +StardustWormBanner D +StardustJellyfishBanner D +StardustSpiderBanner D +StardustSmallCellBanner E +StardustLargeCellBanner D +SolarCoriteBanner D +SolarSrollerBanner D +SolarCrawltipedeBanner D +SolarDrakomireRiderBanner D +SolarDrakomireBanner D +SolarSolenianBanner D +NebulaSoldierBanner D +NebulaHeadcrabBanner D +NebulaBrainBanner D +NebulaBeastBanner D +VortexLarvaBanner D +VortexHornetQueenBanner D +VortexHornetBanner D +VortexSoldierBanner D +VortexRiflemanBanner D +PirateCaptainBanner D +PirateDeadeyeBanner D +PirateCorsairBanner D +PirateCrossbowerBanner D +MartianWalkerBanner D +RedDevilBanner D +PinkJellyfishBanner D +GreenJellyfishBanner D +DarkMummyBanner D +LightMummyBanner D +AngryBonesBanner D +IceTortoiseBanner D +NebulaPickup1 E +NebulaPickup2 E +NebulaPickup3 E +FragmentVortex B +FragmentNebula B +FragmentSolar B +FragmentStardust B +LunarOre L +LunarBrick L +StardustAxe E +StardustChainsaw E +StardustDrill D +StardustHammer E +StardustPickaxe D +LunarBar B +WingsSolar D +WingsVortex D +WingsNebula D +WingsStardust D +LunarBrickWall O +SolarEruption D +StardustCellStaff D +VortexBeater D +NebulaArcanum D +BloodWater K +TheBrideHat D +TheBrideDress D +PlatinumBow D +PlatinumHammer D +PlatinumAxe D +PlatinumShortsword D +PlatinumBroadsword D +PlatinumPickaxe D +TungstenBow D +TungstenHammer D +TungstenAxe D +TungstenShortsword D +TungstenBroadsword D +TungstenPickaxe D +LeadBow D +LeadHammer D +LeadAxe D +LeadShortsword D +LeadBroadsword D +LeadPickaxe D +TinBow D +TinHammer D +TinAxe D +TinShortsword D +TinBroadsword D +TinPickaxe D +CopperBow D +CopperHammer D +CopperAxe D +CopperShortsword D +CopperBroadsword D +CopperPickaxe D +SilverBow D +SilverHammer D +SilverAxe D +SilverShortsword D +SilverBroadsword D +SilverPickaxe D +GoldBow D +GoldHammer D +GoldAxe D +GoldShortsword D +GoldBroadsword D +GoldPickaxe D +LunarHamaxeSolar D +LunarHamaxeVortex D +LunarHamaxeNebula D +LunarHamaxeStardust D +SolarDye G +NebulaDye G +VortexDye G +StardustDye G +VoidDye G +StardustDragonStaff D +Bacon H +ShiftingSandsDye G +MirageDye G +ShiftingPearlSandsDye G +VortexMonolith D +NebulaMonolith D +StardustMonolith D +SolarMonolith D +Phantasm D +LastPrism D +NebulaBlaze D +DayBreak D +SuperHealingPotion J +Detonator D +FireworksLauncher D +BouncyDynamite K +PartyGirlGrenade K +LunarCraftingStation D +FlameAndSilverDye G +GreenFlameAndSilverDye G +BlueFlameAndSilverDye G +ReflectiveCopperDye G +ReflectiveObsidianDye G +ReflectiveMetalDye G +MidnightRainbowDye G +BlackAndWhiteDye G +BrightSilverDye G +SilverAndBlackDye G +RedAcidDye G +GelDye G +PinkGelDye G +SquirrelRed C +SquirrelGold G +SquirrelOrangeCage D +SquirrelGoldCage D +MoonlordBullet K +MoonlordArrow K +MoonlordTurretStaff D +LunarFlareBook D +RainbowCrystalStaff D +LunarHook D +LunarBlockSolar L +LunarBlockVortex L +LunarBlockNebula L +LunarBlockStardust L +SuspiciousLookingTentacle D +Yoraiz0rShirt D +Yoraiz0rPants D +Yoraiz0rWings D +Yoraiz0rDarkness D +JimsWings D +Yoraiz0rHead D +LivingLeafWall O +SkiphsHelm D +SkiphsShirt D +SkiphsPants D +SkiphsWings D +LokisHelm D +LokisShirt D +LokisPants D +LokisWings D +SandSlimeBanner D +SeaSnailBanner D +MoonLordTrophy D +MoonLordPainting D +BurningHadesDye G +GrimDye G +LokisDye G +ShadowflameHadesDye G +CelestialSigil G +LogicGateLamp_Off C +LogicGate_AND C +LogicGate_OR C +LogicGate_NAND C +LogicGate_NOR C +LogicGate_XOR C +LogicGate_NXOR C +ConveyorBeltLeft L +ConveyorBeltRight L +WireKite D +YellowWrench D +LogicSensor_Sun C +LogicSensor_Moon C +LogicSensor_Above C +WirePipe B +AnnouncementBox D +LogicGateLamp_On C +MechanicalLens D +ActuationRod D +TeamBlockRed L +TeamBlockRedPlatform M +StaticHook D +ActuationAccessory D +MulticolorWrench D +WeightedPressurePlatePink C +EngineeringHelmet D +CompanionCube D +WireBulb C +WeightedPressurePlateOrange C +WeightedPressurePlatePurple C +WeightedPressurePlateCyan C +TeamBlockGreen L +TeamBlockBlue L +TeamBlockYellow L +TeamBlockPink L +TeamBlockWhite L +TeamBlockGreenPlatform M +TeamBlockBluePlatform M +TeamBlockYellowPlatform M +TeamBlockPinkPlatform M +TeamBlockWhitePlatform M +LargeAmber D +GemLockRuby D +GemLockSapphire D +GemLockEmerald D +GemLockTopaz D +GemLockAmethyst D +GemLockDiamond D +GemLockAmber D +SquirrelStatue D +ButterflyStatue D +WormStatue D +FireflyStatue D +ScorpionStatue D +SnailStatue D +GrasshopperStatue D +MouseStatue D +DuckStatue D +PenguinStatue D +FrogStatue D +BuggyStatue D +LogicGateLamp_Faulty C +PortalGunStation D +Fake_Chest D +Fake_GoldChest D +Fake_ShadowChest D +Fake_EbonwoodChest D +Fake_RichMahoganyChest D +Fake_PearlwoodChest D +Fake_IvyChest D +Fake_IceChest D +Fake_LivingWoodChest D +Fake_SkywareChest D +Fake_ShadewoodChest D +Fake_WebCoveredChest D +Fake_LihzahrdChest D +Fake_WaterChest D +Fake_JungleChest D +Fake_CorruptionChest D +Fake_CrimsonChest D +Fake_HallowedChest D +Fake_FrozenChest D +Fake_DynastyChest D +Fake_HoneyChest D +Fake_SteampunkChest D +Fake_PalmWoodChest D +Fake_MushroomChest D +Fake_BorealWoodChest D +Fake_SlimeChest D +Fake_GreenDungeonChest D +Fake_PinkDungeonChest D +Fake_BlueDungeonChest D +Fake_BoneChest D +Fake_CactusChest D +Fake_FleshChest D +Fake_ObsidianChest D +Fake_PumpkinChest D +Fake_SpookyChest D +Fake_GlassChest D +Fake_MartianChest D +Fake_MeteoriteChest D +Fake_GraniteChest D +Fake_MarbleChest D +Fake_newchest1 E +Fake_newchest2 E +ProjectilePressurePad C +WallCreeperStatue D +UnicornStatue D +DripplerStatue D +WraithStatue D +BoneSkeletonStatue D +UndeadVikingStatue D +MedusaStatue D +HarpyStatue D +PigronStatue D +HopliteStatue D +GraniteGolemStatue D +ZombieArmStatue D +BloodZombieStatue D +AnglerTackleBag D +GeyserTrap C +UltraBrightCampfire D +BoneCampfire D +PixelBox E +LogicSensor_Water C +LogicSensor_Lava C +LogicSensor_Honey C +LogicSensor_Liquid C +PartyBundleOfBalloonsAccessory D +PartyBalloonAnimal D +PartyHat D +FlowerBoyHat D +FlowerBoyShirt D +FlowerBoyPants D +SillyBalloonPink L +SillyBalloonPurple L +SillyBalloonGreen L +SillyStreamerBlue L +SillyStreamerGreen L +SillyStreamerPink L +SillyBalloonMachine D +SillyBalloonTiedPink D +SillyBalloonTiedPurple D +SillyBalloonTiedGreen D +Pigronata D +PartyMonolith D +PartyBundleOfBalloonTile D +PartyPresent D +SliceOfCake G +CogWall O +SandFallWall O +SnowFallWall O +SandFallBlock L +SnowFallBlock L +SnowCloudBlock L +PedguinHat D +PedguinShirt D +PedguinPants D +SillyBalloonPinkWall O +SillyBalloonPurpleWall O +SillyBalloonGreenWall O +AviatorSunglasses D +BluePhasesaber D +RedPhasesaber D +GreenPhasesaber D +PurplePhasesaber D +WhitePhasesaber D +YellowPhasesaber D +DjinnsCurse D +AncientHorn D +AntlionClaw D +AncientArmorHat D +AncientArmorShirt D +AncientArmorPants D +AncientBattleArmorHat D +AncientBattleArmorShirt D +AncientBattleArmorPants D +SpiritFlame D +SandElementalBanner D +PocketMirror D +MagicSandDropper D +AncientBattleArmorMaterial G +LamiaPants D +LamiaShirt D +LamiaHat D +SkyFracture D +OnyxBlaster D +SandsharkBanner D +SandsharkCorruptBanner D +SandsharkCrimsonBanner D +SandsharkHallowedBanner D +TumbleweedBanner D +AncientCloth C +DjinnLamp D +MusicBoxSandstorm D +ApprenticeHat D +ApprenticeRobe D +ApprenticeTrousers D +SquireGreatHelm D +SquirePlating D +SquireGreaves D +HuntressWig D +HuntressJerkin D +HuntressPants D +MonkBrows D +MonkShirt D +MonkPants D +ApprenticeScarf D +SquireShield D +HuntressBuckler D +MonkBelt D +DefendersForge D +WarTable D +WarTableBanner D +DD2ElderCrystalStand D +DefenderMedal A +DD2FlameburstTowerT1Popper D +DD2FlameburstTowerT2Popper D +DD2FlameburstTowerT3Popper D +AleThrowingGlove D +DD2EnergyCrystal E +DD2SquireDemonSword D +DD2BallistraTowerT1Popper D +DD2BallistraTowerT2Popper D +DD2BallistraTowerT3Popper D +DD2SquireBetsySword D +DD2ElderCrystal G +DD2LightningAuraT1Popper D +DD2LightningAuraT2Popper D +DD2LightningAuraT3Popper D +DD2ExplosiveTrapT1Popper D +DD2ExplosiveTrapT2Popper D +DD2ExplosiveTrapT3Popper D +MonkStaffT1 D +MonkStaffT2 D +DD2GoblinBomberBanner D +DD2GoblinBanner D +DD2SkeletonBanner D +DD2DrakinBanner D +DD2KoboldFlyerBanner D +DD2KoboldBanner D +DD2WitherBeastBanner D +DD2WyvernBanner D +DD2JavelinThrowerBanner D +DD2LightningBugBanner D +OgreMask E +GoblinMask E +GoblinBomberCap E +EtherianJavelin E +KoboldDynamiteBackpack E +BookStaff D +BoringBow E +DD2PhoenixBow D +DD2PetGato D +DD2PetGhost D +DD2PetDragon D +MonkStaffT3 D +DD2BetsyBow D +BossBagBetsy G +BossBagOgre E +BossBagDarkMage E +BossMaskBetsy D +BossMaskDarkMage D +BossMaskOgre D +BossTrophyBetsy D +BossTrophyDarkmage D +BossTrophyOgre D +MusicBoxDD2 D +ApprenticeStaffT3 D +SquireAltHead D +SquireAltShirt D +SquireAltPants D +ApprenticeAltHead D +ApprenticeAltShirt D +ApprenticeAltPants D +HuntressAltHead D +HuntressAltShirt D +HuntressAltPants D +MonkAltHead D +MonkAltShirt D +MonkAltPants D +BetsyWings D +CrystalChest D +GoldenChest D +Fake_CrystalChest D +Fake_GoldenChest D +CrystalDoor D +CrystalChair D +CrystalCandle D +CrystalLantern D +CrystalLamp D +CrystalCandelabra D +CrystalChandelier D +CrystalBathtub D +CrystalSink D +CrystalBed D +CrystalClock D +SkywareClock2 D +DungeonClockBlue D +DungeonClockGreen D +DungeonClockPink D +CrystalPlatform M +GoldenPlatform M +DynastyPlatform M +LihzahrdPlatform M +FleshPlatform M +FrozenPlatform M +CrystalWorkbench D +GoldenWorkbench D +CrystalDresser D +DynastyDresser D +FrozenDresser D +LivingWoodDresser D +CrystalPiano D +DynastyPiano D +CrystalBookCase D +CrystalSofaHowDoesThatEvenWork D +DynastySofa D +CrystalTable D +ArkhalisHat D +ArkhalisShirt D +ArkhalisPants D +ArkhalisWings D +LeinforsHat D +LeinforsShirt D +LeinforsPants D +LeinforsWings D +LeinforsAccessory D +Celeb2 D +SpiderBathtub D +SpiderBed D +SpiderBookcase D +SpiderDresser D +SpiderCandelabra D +SpiderCandle D +SpiderChair D +SpiderChandelier D +SpiderChest D +SpiderClock D +SpiderDoor D +SpiderLamp D +SpiderLantern D +SpiderPiano D +SpiderPlatform M +SpiderSinkSpiderSinkDoesWhateverASpiderSinkDoes D +SpiderSofa D +SpiderTable D +SpiderWorkbench D +Fake_SpiderChest D +IronBrick L +IronBrickWall O +LeadBrick L +LeadBrickWall O +LesionBlock L +LesionBlockWall O +LesionPlatform M +LesionBathtub D +LesionBed D +LesionBookcase D +LesionCandelabra D +LesionCandle D +LesionChair D +LesionChandelier D +LesionChest D +LesionClock D +LesionDoor D +LesionDresser D +LesionLamp D +LesionLantern D +LesionPiano D +LesionSink D +LesionSofa D +LesionTable D +LesionWorkbench D +Fake_LesionChest D +HatRack D +ColorOnlyDye E +WoodenCrateHard H +IronCrateHard H +GoldenCrateHard H +CorruptFishingCrateHard H +CrimsonFishingCrateHard H +DungeonFishingCrateHard H +FloatingIslandFishingCrateHard H +HallowedFishingCrateHard H +JungleFishingCrateHard H +DeadMansChest D +GolfBall D +AmphibianBoots D +ArcaneFlower D +BerserkerGlove D +FairyBoots D +FrogFlipper D +FrogGear D +FrogWebbing D +FrozenShield D +HeroShield D +LavaSkull D +MagnetFlower D +ManaCloak D +MoltenQuiver D +MoltenSkullRose D +ObsidianSkullRose D +ReconScope D +StalkersQuiver D +StingerNecklace D +UltrabrightHelmet D +Apple C +ApplePieSlice E +ApplePie H +BananaSplit H +BBQRibs H +BunnyStew H +Burger H +ChickenNugget H +ChocolateChipCookie H +CreamSoda H +Escargot H +FriedEgg H +Fries H +GoldenDelight H +Grapes H +GrilledSquirrel H +Hotdog H +IceCream H +Milkshake H +Nachos H +Pizza H +PotatoChips H +RoastedBird H +RoastedDuck H +SauteedFrogLegs H +SeafoodDinner H +ShrimpPoBoy H +Spaghetti H +Steak H +MoltenCharm D +GolfClubIron D +GolfCup D +FlowerPacketBlue B +FlowerPacketMagenta B +FlowerPacketPink B +FlowerPacketRed B +FlowerPacketYellow B +FlowerPacketViolet B +FlowerPacketWhite B +FlowerPacketTallGrass B +LawnMower D +CrimstoneBrick L +SmoothSandstone L +CrimstoneBrickWall O +SmoothSandstoneWall O +BloodMoonMonolith D +SandBoots D +AncientChisel D +CarbonGuitar D +SkeletonBow E +FossilPickaxe D +SuperStarCannon D +ThunderSpear D +ThunderStaff D +DrumSet D +PicnicTable D +PicnicTableWithCloth D +DesertMinecart D +FishMinecart D +FairyCritterPink G +FairyCritterGreen G +FairyCritterBlue G +JunoniaShell D +LightningWhelkShell D +TulipShell D +PinWheel D +WeatherVane D +VoidVault D +MusicBoxOceanAlt D +MusicBoxSlimeRain D +MusicBoxSpaceAlt D +MusicBoxTownDay D +MusicBoxTownNight D +MusicBoxWindyDay D +GolfCupFlagWhite D +GolfCupFlagRed D +GolfCupFlagGreen D +GolfCupFlagBlue D +GolfCupFlagYellow D +GolfCupFlagPurple D +GolfTee D +ShellPileBlock L +AntiPortalBlock L +GolfClubPutter D +GolfClubWedge D +GolfClubDriver D +GolfWhistle D +ToiletEbonyWood D +ToiletRichMahogany D +ToiletPearlwood D +ToiletLivingWood D +ToiletCactus D +ToiletBone D +ToiletFlesh D +ToiletMushroom D +ToiletSunplate D +ToiletShadewood D +ToiletLihzhard D +ToiletDungeonBlue D +ToiletDungeonGreen D +ToiletDungeonPink D +ToiletObsidian D +ToiletFrozen D +ToiletGlass D +ToiletHoney D +ToiletSteampunk D +ToiletPumpkin D +ToiletSpooky D +ToiletDynasty D +ToiletPalm D +ToiletBoreal D +ToiletSlime D +ToiletMartian D +ToiletGranite D +ToiletMarble D +ToiletCrystal D +ToiletSpider D +ToiletLesion D +ToiletDiamond D +MaidHead D +MaidShirt D +MaidPants D +VoidLens D +MaidHead2 D +MaidShirt2 D +MaidPants2 D +GolfHat D +GolfShirt D +GolfPants D +GolfVisor D +SpiderBlock L +SpiderWall O +ToiletMeteor D +LesionStation D +ManaCloakStar D +Terragrim D +SolarBathtub D +SolarBed D +SolarBookcase D +SolarDresser D +SolarCandelabra D +SolarCandle D +SolarChair D +SolarChandelier D +SolarChest D +SolarClock D +SolarDoor D +SolarLamp D +SolarLantern D +SolarPiano D +SolarPlatform M +SolarSink D +SolarSofa D +SolarTable D +SolarWorkbench D +Fake_SolarChest D +SolarToilet D +VortexBathtub D +VortexBed D +VortexBookcase D +VortexDresser D +VortexCandelabra D +VortexCandle D +VortexChair D +VortexChandelier D +VortexChest D +VortexClock D +VortexDoor D +VortexLamp D +VortexLantern D +VortexPiano D +VortexPlatform M +VortexSink D +VortexSofa D +VortexTable D +VortexWorkbench D +Fake_VortexChest D +VortexToilet D +NebulaBathtub D +NebulaBed D +NebulaBookcase D +NebulaDresser D +NebulaCandelabra D +NebulaCandle D +NebulaChair D +NebulaChandelier D +NebulaChest D +NebulaClock D +NebulaDoor D +NebulaLamp D +NebulaLantern D +NebulaPiano D +NebulaPlatform M +NebulaSink D +NebulaSofa D +NebulaTable D +NebulaWorkbench D +Fake_NebulaChest D +NebulaToilet D +StardustBathtub D +StardustBed D +StardustBookcase D +StardustDresser D +StardustCandelabra D +StardustCandle D +StardustChair D +StardustChandelier D +StardustChest D +StardustClock D +StardustDoor D +StardustLamp D +StardustLantern D +StardustPiano D +StardustPlatform M +StardustSink D +StardustSofa D +StardustTable D +StardustWorkbench D +Fake_StardustChest D +StardustToilet D +SolarBrick L +VortexBrick L +NebulaBrick L +StardustBrick L +SolarBrickWall O +VortexBrickWall O +NebulaBrickWall O +StardustBrickWall O +MusicBoxDayRemix D +CrackedBlueBrick L +CrackedGreenBrick L +CrackedPinkBrick L +FlowerPacketWild B +GolfBallDyedBlack D +GolfBallDyedBlue D +GolfBallDyedBrown D +GolfBallDyedCyan D +GolfBallDyedGreen D +GolfBallDyedLimeGreen D +GolfBallDyedOrange D +GolfBallDyedPink D +GolfBallDyedPurple D +GolfBallDyedRed D +GolfBallDyedSkyBlue D +GolfBallDyedTeal D +GolfBallDyedViolet D +GolfBallDyedYellow D +AmberRobe D +AmberHook D +OrangePhaseblade D +OrangePhasesaber D +OrangeStainedGlass O +OrangePressurePlate C +MysticCoilSnake D +MagicConch D +GolfCart D +GolfChest D +Fake_GolfChest D +DesertChest D +Fake_DesertChest D +SanguineStaff D +SharpTears D +BloodMoonStarter G +DripplerFlail D +VampireFrogStaff D +GoldGoldfish G +GoldGoldfishBowl D +CatBast D +GoldStarryGlassBlock L +BlueStarryGlassBlock L +GoldStarryGlassWall O +BlueStarryGlassWall O +BabyBirdStaff D +Apricot C +Banana C +BlackCurrant C +BloodOrange C +Cherry C +Coconut C +Dragonfruit C +Elderberry C +Grapefruit C +Lemon C +Mango C +Peach C +Pineapple C +Plum C +Rambutan C +Starfruit C +SandstoneBathtub D +SandstoneBed D +SandstoneBookcase D +SandstoneDresser D +SandstoneCandelabra D +SandstoneCandle D +SandstoneChair D +SandstoneChandelier D +SandstoneClock D +SandstoneDoor D +SandstoneLamp D +SandstoneLantern D +SandstonePiano D +SandstonePlatform M +SandstoneSink D +SandstoneSofa D +SandstoneTable D +SandstoneWorkbench D +SandstoneToilet D +BloodHamaxe D +VoidMonolith D +ArrowSign D +PaintedArrowSign D +GameMasterShirt D +GameMasterPants D +StarPrincessCrown D +StarPrincessDress D +BloodFishingRod D +FoodPlatter D +BlackDragonflyJar D +BlueDragonflyJar D +GreenDragonflyJar D +OrangeDragonflyJar D +RedDragonflyJar D +YellowDragonflyJar D +GoldDragonflyJar D +BlackDragonfly C +BlueDragonfly C +GreenDragonfly C +OrangeDragonfly C +RedDragonfly C +YellowDragonfly C +GoldDragonfly G +PortableStool D +DragonflyStatue D +PaperAirplaneA D +PaperAirplaneB D +CanOfWorms F +EncumberingStone D +ZapinatorGray D +ZapinatorOrange D +GreenMoss B +BrownMoss B +RedMoss B +BlueMoss B +PurpleMoss B +LavaMoss B +BoulderStatue D +MusicBoxTitleAlt D +MusicBoxStorm D +MusicBoxGraveyard D +Seagull C +SeagullStatue D +LadyBug C +GoldLadyBug G +Maggot C +MaggotCage D +CelestialWand D +EucaluptusSap D +KiteBlue D +KiteBlueAndYellow D +KiteRed D +KiteRedAndYellow D +KiteYellow D +IvyGuitar D +Pupfish C +Grebe C +Rat C +RatCage D +KryptonMoss B +XenonMoss B +KiteWyvern D +LadybugCage D +BloodRainBow D +CombatBook D +DesertTorch L +CoralTorch L +CorruptTorch L +CrimsonTorch L +HallowedTorch L +JungleTorch L +ArgonMoss B +RollingCactus C +ThinIce L +EchoBlock L +ScarabFish F +ScorpioFish F +Owl C +OwlCage D +OwlStatue D +PupfishBowl D +GoldLadybugCage D +Geode C +Flounder G +RockLobster G +LobsterTail H +FloatingTube D +FrozenCrate H +FrozenCrateHard H +OasisCrate H +OasisCrateHard H +SpectreGoggles D +Oyster C +ShuckedOyster H +WhitePearl C +BlackPearl C +PinkPearl C +StoneDoor D +StonePlatform M +OasisFountain D +WaterStrider C +GoldWaterStrider G +LawnFlamingo D +MusicBoxUndergroundJungle D +Grate L +ScarabBomb K +WroughtIronFence O +SharkBait D +BeeMinecart D +LadybugMinecart D +PigronMinecart D +SunflowerMinecart D +PottedForestCedar D +PottedJungleCedar D +PottedHallowCedar D +PottedForestTree D +PottedJungleTree D +PottedHallowTree D +PottedForestPalm D +PottedJunglePalm D +PottedHallowPalm D +PottedForestBamboo D +PottedJungleBamboo D +PottedHallowBamboo D +ScarabFishingRod D +HellMinecart D +WitchBroom D +ClusterRocketI K +ClusterRocketII K +WetRocket K +LavaRocket K +HoneyRocket K +ShroomMinecart D +AmethystMinecart D +TopazMinecart D +SapphireMinecart D +EmeraldMinecart D +RubyMinecart D +DiamondMinecart D +MiniNukeI K +MiniNukeII K +DryRocket K +SandcastleBucket D +TurtleCage D +TurtleJungleCage D +Gladius D +Turtle C +TurtleJungle C +TurtleStatue D +AmberMinecart D +BeetleMinecart D +MeowmereMinecart D +PartyMinecart D +PirateMinecart D +SteampunkMinecart D +GrebeCage D +SeagullCage D +WaterStriderCage D +GoldWaterStriderCage D +LuckPotionLesser N +LuckPotion N +LuckPotionGreater N +Seahorse C +SeahorseCage D +GoldSeahorse G +GoldSeahorseCage D +TimerOneHalfSecond D +TimerOneFourthSecond D +EbonstoneEcho O +MudWallEcho O +PearlstoneEcho O +SnowWallEcho O +AmethystEcho O +TopazEcho O +SapphireEcho O +EmeraldEcho O +RubyEcho O +DiamondEcho O +Cave1Echo O +Cave2Echo O +Cave3Echo O +Cave4Echo O +Cave5Echo O +Cave6Echo O +Cave7Echo O +SpiderEcho O +CorruptGrassEcho O +HallowedGrassEcho O +IceEcho O +ObsidianBackEcho O +CrimsonGrassEcho O +CrimstoneEcho O +CaveWall1Echo O +CaveWall2Echo O +Cave8Echo O +Corruption1Echo O +Corruption2Echo O +Corruption3Echo O +Corruption4Echo O +Crimson1Echo O +Crimson2Echo O +Crimson3Echo O +Crimson4Echo O +Dirt1Echo O +Dirt2Echo O +Dirt3Echo O +Dirt4Echo O +Hallow1Echo O +Hallow2Echo O +Hallow3Echo O +Hallow4Echo O +Jungle1Echo O +Jungle2Echo O +Jungle3Echo O +Jungle4Echo O +Lava1Echo O +Lava2Echo O +Lava3Echo O +Lava4Echo O +Rocks1Echo O +Rocks2Echo O +Rocks3Echo O +Rocks4Echo O +TheBrideBanner D +ZombieMermanBanner D +EyeballFlyingFishBanner D +BloodSquidBanner D +BloodEelBanner D +GoblinSharkBanner D +LargeBambooBlock L +LargeBambooBlockWall O +DemonHorns D +BambooLeaf D +HellCake D +FogMachine D +PlasmaLamp D +MarbleColumn A +ChefHat D +ChefShirt D +ChefPants D +StarHairpin D +HeartHairpin D +BunnyEars D +DevilHorns D +Fedora D +UnicornHornHat D +BambooBlock L +BambooBlockWall O +BambooBathtub D +BambooBed D +BambooBookcase D +BambooDresser D +BambooCandelabra D +BambooCandle D +BambooChair D +BambooChandelier D +BambooChest D +BambooClock D +BambooDoor D +BambooLamp D +BambooLantern D +BambooPiano D +BambooPlatform M +BambooSink D +BambooSofa D +BambooTable D +BambooWorkbench D +Fake_BambooChest D +BambooToilet D +GolfClubStoneIron D +GolfClubRustyPutter D +GolfClubBronzeWedge D +GolfClubWoodDriver D +GolfClubMythrilIron D +GolfClubLeadPutter D +GolfClubGoldWedge D +GolfClubPearlwoodDriver D +GolfClubTitaniumIron D +GolfClubShroomitePutter D +GolfClubDiamondWedge D +GolfClubChlorophyteDriver D +GolfTrophyBronze D +GolfTrophySilver D +GolfTrophyGold D +BloodNautilusBanner D +BirdieRattle D +ExoticEasternChewToy D +BedazzledNectar D +MusicBoxJungleNight D +StormTigerStaff D +ChumBucket B +GardenGnome D +KiteBoneSerpent D +KiteWorldFeeder D +KiteBunny D +KitePigron D +AppleJuice H +GrapeJuice H +Lemonade H +BananaDaiquiri H +PeachSangria H +PinaColada H +TropicalSmoothie H +BloodyMoscato H +SmoothieofDarkness H +PrismaticPunch H +FruitJuice H +FruitSalad H +AndrewSphinx D +WatchfulAntlion D +BurningSpirit D +JawsOfDeath D +TheSandsOfSlime D +SnakesIHateSnakes D +LifeAboveTheSand D +Oasis D +PrehistoryPreserved D +AncientTablet D +Uluru D +VisitingThePyramids D +BandageBoy D +DivineEye D +AmethystStoneBlock L +TopazStoneBlock L +SapphireStoneBlock L +EmeraldStoneBlock L +RubyStoneBlock L +DiamondStoneBlock L +AmberStoneBlock L +AmberStoneWallEcho O +KiteManEater D +KiteJellyfishBlue D +KiteJellyfishPink D +KiteShark D +SuperHeroMask D +SuperHeroCostume D +SuperHeroTights D +PinkFairyJar D +GreenFairyJar D +BlueFairyJar D +GolfPainting1 D +GolfPainting2 D +GolfPainting3 D +GolfPainting4 D +FogboundDye G +BloodbathDye G +PrettyPinkDressSkirt D +PrettyPinkDressPants D +PrettyPinkRibbon D +BambooFence O +GlowPaint L +KiteSandShark D +KiteBunnyCorrupt D +KiteBunnyCrimson D +BlandWhip D +DrumStick D +KiteGoldfish D +KiteAngryTrapper D +KiteKoi D +KiteCrawltipede D +SwordWhip D +MaceWhip D +ScytheWhip D +KiteSpectrum D +ReleaseDoves C +KiteWanderingEye D +KiteUnicorn D +UndertakerHat D +UndertakerCoat D +DandelionBanner D +GnomeBanner D +DesertCampfire D +CoralCampfire D +CorruptCampfire D +CrimsonCampfire D +HallowedCampfire D +JungleCampfire D +SoulBottleLight D +SoulBottleNight D +SoulBottleFlight D +SoulBottleSight D +SoulBottleMight D +SoulBottleFright D +MudBud D +ReleaseLantern C +QuadBarrelShotgun D +FuneralHat D +FuneralCoat D +FuneralPants D +TragicUmbrella D +VictorianGothHat D +VictorianGothDress D +TatteredWoodSign D +GravediggerShovel D +DungeonDesertChest D +Fake_DungeonDesertChest D +DungeonDesertKey D +SparkleGuitar D +MolluskWhistle D +BorealBeam A +RichMahoganyBeam A +GraniteColumn A +SandstoneColumn A +MushroomBeam A +FirstFractal D +Nevermore D +Reborn D +Graveyard D +GhostManifestation D +WickedUndead D +BloodyGoblet D +StillLife D +GhostarsWings D +TerraToilet D +GhostarSkullPin D +GhostarShirt D +GhostarPants D +BallOfFuseWire D +FullMoonSqueakyToy D +OrnateShadowKey D +DrManFlyMask D +DrManFlyLabCoat D +ButcherMask D +ButcherApron D +ButcherPants D +Football D +HunterCloak D +CoffinMinecart D +SafemanWings D +SafemanSunHair D +SafemanSunDress D +SafemanDressLeggings D +FoodBarbarianWings D +FoodBarbarianHelm D +FoodBarbarianArmor D +FoodBarbarianGreaves D +GroxTheGreatWings D +GroxTheGreatHelm D +GroxTheGreatArmor D +GroxTheGreatGreaves D +Smolstar D +SquirrelHook D +BouncingShield D +RockGolemHead D +CritterShampoo D +DiggingMoleMinecart D +Shroomerang D +TreeGlobe D +WorldGlobe D +DontHurtCrittersBook D +DogEars D +DogTail D +FoxEars D +FoxTail D +LizardEars D +LizardTail D +PandaEars D +BunnyTail D +FairyGlowstick L +LightningCarrot D +HallowBossDye G +MushroomHat D +MushroomVest D +MushroomPants D +FairyQueenBossBag G +FairyQueenTrophy D +FairyQueenMask D +PaintedHorseSaddle D +MajesticHorseSaddle D +DarkHorseSaddle D +JoustingLance D +ShadowJoustingLance D +HallowJoustingLance D +PogoStick D +PirateShipMountItem D +SpookyWoodMountItem D +SantankMountItem D +WallOfFleshGoatMountItem D +DarkMageBookMountItem D +KingSlimePetItem D +EyeOfCthulhuPetItem D +EaterOfWorldsPetItem D +BrainOfCthulhuPetItem D +SkeletronPetItem D +QueenBeePetItem D +DestroyerPetItem D +TwinsPetItem D +SkeletronPrimePetItem D +PlanteraPetItem D +GolemPetItem D +DukeFishronPetItem D +LunaticCultistPetItem D +MoonLordPetItem D +FairyQueenPetItem D +PumpkingPetItem D +EverscreamPetItem D +IceQueenPetItem D +MartianPetItem D +DD2OgrePetItem D +DD2BetsyPetItem D +CombatWrench D +DemonConch D +BottomlessLavaBucket D +FireproofBugNet D +FlameWakerBoots D +RainbowWings D +WetBomb K +LavaBomb K +HoneyBomb K +DryBomb K +SuperheatedBlood D +LicenseCat D +LicenseDog D +GemSquirrelAmethyst C +GemSquirrelTopaz C +GemSquirrelSapphire C +GemSquirrelEmerald C +GemSquirrelRuby C +GemSquirrelDiamond C +GemSquirrelAmber C +GemBunnyAmethyst C +GemBunnyTopaz C +GemBunnySapphire C +GemBunnyEmerald C +GemBunnyRuby C +GemBunnyDiamond C +GemBunnyAmber C +HellButterfly C +HellButterflyJar D +Lavafly C +LavaflyinaBottle D +MagmaSnail C +MagmaSnailCage D +GemTreeTopazSeed C +GemTreeAmethystSeed C +GemTreeSapphireSeed C +GemTreeEmeraldSeed C +GemTreeRubySeed C +GemTreeDiamondSeed C +GemTreeAmberSeed C +PotSuspended D +PotSuspendedDaybloom D +PotSuspendedMoonglow D +PotSuspendedWaterleaf D +PotSuspendedShiverthorn D +PotSuspendedBlinkroot D +PotSuspendedDeathweedCorrupt D +PotSuspendedDeathweedCrimson D +PotSuspendedFireblossom D +BrazierSuspended D +VolcanoSmall D +VolcanoLarge D +PotionOfReturn N +VanityTreeSakuraSeed b +LavaAbsorbantSponge D +HallowedHood D +HellfireTreads D +TeleportationPylonJungle D +TeleportationPylonPurity D +LavaCrate H +LavaCrateHard H +ObsidianLockbox H +LavaFishbowl D +LavaFishingHook D +AmethystBunnyCage D +TopazBunnyCage D +SapphireBunnyCage D +EmeraldBunnyCage D +RubyBunnyCage D +DiamondBunnyCage D +AmberBunnyCage D +AmethystSquirrelCage D +TopazSquirrelCage D +SapphireSquirrelCage D +EmeraldSquirrelCage D +RubySquirrelCage D +DiamondSquirrelCage D +AmberSquirrelCage D +AncientHallowedMask D +AncientHallowedHelmet D +AncientHallowedHeadgear D +AncientHallowedHood D +AncientHallowedPlateMail D +AncientHallowedGreaves D +PottedLavaPlantPalm D +PottedLavaPlantBush D +PottedLavaPlantBramble D +PottedLavaPlantBulb D +PottedLavaPlantTendrils D +VanityTreeYellowWillowSeed B +DirtBomb K +DirtStickyBomb K +LicenseBunny D +CoolWhip D +FireWhip D +ThornWhip D +RainbowWhip D +TungstenBullet K +TeleportationPylonHallow D +TeleportationPylonUnderground D +TeleportationPylonOcean D +TeleportationPylonDesert D +TeleportationPylonSnow D +TeleportationPylonMushroom D +CavernFountain D +PiercingStarlight D +EyeofCthulhuMasterTrophy D +EaterofWorldsMasterTrophy D +BrainofCthulhuMasterTrophy D +SkeletronMasterTrophy D +QueenBeeMasterTrophy D +KingSlimeMasterTrophy D +WallofFleshMasterTrophy D +TwinsMasterTrophy D +DestroyerMasterTrophy D +SkeletronPrimeMasterTrophy D +PlanteraMasterTrophy D +GolemMasterTrophy D +DukeFishronMasterTrophy D +LunaticCultistMasterTrophy D +MoonLordMasterTrophy D +UFOMasterTrophy D +FlyingDutchmanMasterTrophy D +MourningWoodMasterTrophy D +PumpkingMasterTrophy D +IceQueenMasterTrophy D +EverscreamMasterTrophy D +SantankMasterTrophy D +DarkMageMasterTrophy D +OgreMasterTrophy D +BetsyMasterTrophy D +FairyQueenMasterTrophy D +QueenSlimeMasterTrophy D +TeleportationPylonVictory D +FairyQueenMagicItem D +FairyQueenRangedItem D +LongRainbowTrailWings D +RabbitOrder D +Zenith D +QueenSlimeBossBag G +QueenSlimeTrophy D +QueenSlimeMask D +QueenSlimePetItem D +EmpressButterfly G +AccentSlab L +TruffleWormCage D +EmpressButterflyJar D +RockGolemBanner D +BloodMummyBanner D +SporeSkeletonBanner D +SporeBatBanner D +LarvaeAntlionBanner D +CrimsonBunnyBanner D +CrimsonGoldfishBanner D +CrimsonPenguinBanner D +BigMimicCorruptionBanner D +BigMimicCrimsonBanner D +BigMimicHallowBanner D +MossHornetBanner D +WanderingEyeBanner D +CreativeWings D +MusicBoxQueenSlime D +QueenSlimeHook D +QueenSlimeMountSaddle D +CrystalNinjaHelmet D +CrystalNinjaChestplate D +CrystalNinjaLeggings D +MusicBoxEmpressOfLight D +GelBalloon A +VolatileGelatin D +QueenSlimeCrystal G +EmpressFlightBooster D +MusicBoxDukeFishron D +MusicBoxMorningRain D +MusicBoxConsoleTitle D +ChippysCouch D +GraduationCapBlue D +GraduationCapMaroon D +GraduationCapBlack D +GraduationGownBlue D +GraduationGownMaroon D +GraduationGownBlack D +TerrasparkBoots D +MoonLordLegs D +OceanCrate H +OceanCrateHard H +BadgersHat D +EmpressBlade D +MusicBoxUndergroundDesert D +DeadMansSweater D +TeaKettle D +Teacup H +TreasureMagnet D +Mace D +FlamingMace D +SleepingIcon E +MusicBoxOWRain D +MusicBoxOWDay D +MusicBoxOWNight D +MusicBoxOWUnderground D +MusicBoxOWDesert D +MusicBoxOWOcean D +MusicBoxOWMushroom D +MusicBoxOWDungeon D +MusicBoxOWSpace D +MusicBoxOWUnderworld D +MusicBoxOWSnow D +MusicBoxOWCorruption D +MusicBoxOWUndergroundCorruption D +MusicBoxOWCrimson D +MusicBoxOWUndergroundCrimson D +MusicBoxOWUndergroundSnow D +MusicBoxOWUndergroundHallow D +MusicBoxOWBloodMoon D +MusicBoxOWBoss2 D +MusicBoxOWBoss1 D +MusicBoxOWInvasion D +MusicBoxOWTowers D +MusicBoxOWMoonLord D +MusicBoxOWPlantera D +MusicBoxOWJungle D +MusicBoxOWWallOfFlesh D +MusicBoxOWHallow D +MilkCarton H +CoffeeCup H +TorchGodsFavor D +MusicBoxCredits D \ No newline at end of file diff --git a/GameContent/Creative/CreativeItemSacrificesCatalog.cs b/GameContent/Creative/CreativeItemSacrificesCatalog.cs new file mode 100644 index 0000000..0b35623 --- /dev/null +++ b/GameContent/Creative/CreativeItemSacrificesCatalog.cs @@ -0,0 +1,106 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Creative.CreativeItemSacrificesCatalog +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using System.Text.RegularExpressions; +using Terraria.ID; + +namespace Terraria.GameContent.Creative +{ + public class CreativeItemSacrificesCatalog + { + public static CreativeItemSacrificesCatalog Instance = new CreativeItemSacrificesCatalog(); + private Dictionary _sacrificeCountNeededByItemId = new Dictionary(); + + public Dictionary SacrificeCountNeededByItemId => this._sacrificeCountNeededByItemId; + + public void Initialize() + { + this._sacrificeCountNeededByItemId.Clear(); + foreach (string str in Regex.Split(Utils.ReadEmbeddedResource("Terraria.GameContent.Creative.Content.Sacrifices.tsv"), "\r\n|\r|\n")) + { + if (!str.StartsWith("//")) + { + string[] strArray = str.Split('\t'); + int key; + if (strArray.Length >= 3 && ItemID.Search.TryGetId(strArray[0], ref key)) + { + int num = 0; + bool flag = false; + string lower = strArray[1].ToLower(); + switch (lower) + { + case "": + case "a": + num = 50; + break; + case "b": + num = 25; + break; + case "c": + num = 5; + break; + case "d": + num = 1; + break; + case "e": + flag = true; + break; + case "f": + num = 2; + break; + case "g": + num = 3; + break; + case "h": + num = 10; + break; + case "i": + num = 15; + break; + case "j": + num = 30; + break; + case "k": + num = 99; + break; + case "l": + num = 100; + break; + case "m": + num = 200; + break; + case "n": + num = 20; + break; + case "o": + num = 400; + break; + default: + throw new Exception("There is no category for this item: " + strArray[0] + ", category: " + lower); + } + if (!flag) + this._sacrificeCountNeededByItemId[key] = num; + } + } + } + } + + public bool TryGetSacrificeCountCapToUnlockInfiniteItems(int itemId, out int amountNeeded) => this._sacrificeCountNeededByItemId.TryGetValue(itemId, out amountNeeded); + + public void FillListOfItemsThatCanBeObtainedInfinitely( + List itemIdsThatCanBeCraftedInfinitely) + { + foreach (KeyValuePair keyValuePair in Main.LocalPlayerCreativeTracker.ItemSacrifices.SacrificesCountByItemIdCache) + { + int num; + if (this._sacrificeCountNeededByItemId.TryGetValue(keyValuePair.Key, out num) && keyValuePair.Value >= num) + itemIdsThatCanBeCraftedInfinitely.Add(keyValuePair.Key); + } + } + } +} diff --git a/GameContent/Creative/CreativePowerManager.cs b/GameContent/Creative/CreativePowerManager.cs new file mode 100644 index 0000000..120d8a0 --- /dev/null +++ b/GameContent/Creative/CreativePowerManager.cs @@ -0,0 +1,198 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Creative.CreativePowerManager +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using System.IO; +using Terraria.GameContent.NetModules; +using Terraria.Net; + +namespace Terraria.GameContent.Creative +{ + public class CreativePowerManager + { + public static readonly CreativePowerManager Instance = new CreativePowerManager(); + private Dictionary _powersById = new Dictionary(); + private Dictionary _powersByName = new Dictionary(); + private ushort _powersCount; + private static bool _initialized = false; + private const string _powerPermissionsLineHeader = "journeypermission_"; + + private CreativePowerManager() + { + } + + public void Register(string nameInServerConfig) where T : ICreativePower, new() + { + T obj = new T(); + CreativePowerManager.PowerTypeStorage.Power = obj; + CreativePowerManager.PowerTypeStorage.Id = this._powersCount; + CreativePowerManager.PowerTypeStorage.Name = nameInServerConfig; + obj.DefaultPermissionLevel = PowerPermissionLevel.CanBeChangedByEveryone; + obj.CurrentPermissionLevel = PowerPermissionLevel.CanBeChangedByEveryone; + this._powersById[this._powersCount] = (ICreativePower) obj; + this._powersByName[nameInServerConfig] = (ICreativePower) obj; + obj.PowerId = this._powersCount; + obj.ServerConfigName = nameInServerConfig; + ++this._powersCount; + } + + public T GetPower() where T : ICreativePower => CreativePowerManager.PowerTypeStorage.Power; + + public ushort GetPowerId() where T : ICreativePower => CreativePowerManager.PowerTypeStorage.Id; + + public bool TryGetPower(ushort id, out ICreativePower power) => this._powersById.TryGetValue(id, out power); + + public static void TryListingPermissionsFrom(string line) + { + int length = "journeypermission_".Length; + if (line.Length < length || !line.ToLower().StartsWith("journeypermission_")) + return; + string[] strArray = line.Substring(length).Split('='); + int result; + if (strArray.Length != 2 || !int.TryParse(strArray[1].Trim(), out result)) + return; + PowerPermissionLevel powerPermissionLevel = (PowerPermissionLevel) Utils.Clamp(result, 0, 2); + string lower = strArray[0].Trim().ToLower(); + CreativePowerManager.Initialize(); + ICreativePower creativePower; + if (!CreativePowerManager.Instance._powersByName.TryGetValue(lower, out creativePower)) + return; + creativePower.DefaultPermissionLevel = powerPermissionLevel; + creativePower.CurrentPermissionLevel = powerPermissionLevel; + } + + public static void Initialize() + { + if (CreativePowerManager._initialized) + return; + CreativePowerManager.Instance.Register("time_setfrozen"); + CreativePowerManager.Instance.Register("time_setdawn"); + CreativePowerManager.Instance.Register("time_setnoon"); + CreativePowerManager.Instance.Register("time_setdusk"); + CreativePowerManager.Instance.Register("time_setmidnight"); + CreativePowerManager.Instance.Register("godmode"); + CreativePowerManager.Instance.Register("wind_setstrength"); + CreativePowerManager.Instance.Register("rain_setstrength"); + CreativePowerManager.Instance.Register("time_setspeed"); + CreativePowerManager.Instance.Register("rain_setfrozen"); + CreativePowerManager.Instance.Register("wind_setfrozen"); + CreativePowerManager.Instance.Register("increaseplacementrange"); + CreativePowerManager.Instance.Register("setdifficulty"); + CreativePowerManager.Instance.Register("biomespread_setfrozen"); + CreativePowerManager.Instance.Register("setspawnrate"); + CreativePowerManager._initialized = true; + } + + public void Reset() + { + foreach (KeyValuePair keyValuePair in this._powersById) + { + keyValuePair.Value.CurrentPermissionLevel = keyValuePair.Value.DefaultPermissionLevel; + if (keyValuePair.Value is IPersistentPerWorldContent persistentPerWorldContent2) + persistentPerWorldContent2.Reset(); + if (keyValuePair.Value is IPersistentPerPlayerContent perPlayerContent2) + perPlayerContent2.Reset(); + } + } + + public void SaveToWorld(BinaryWriter writer) + { + lock (this._powersById) + { + foreach (KeyValuePair keyValuePair in this._powersById) + { + if (keyValuePair.Value is IPersistentPerWorldContent persistentPerWorldContent2) + { + writer.Write(true); + writer.Write(keyValuePair.Key); + persistentPerWorldContent2.Save(writer); + } + } + } + writer.Write(false); + } + + public void LoadFromWorld(BinaryReader reader, int versionGameWasLastSavedOn) + { + ICreativePower creativePower; + while (reader.ReadBoolean() && this._powersById.TryGetValue(reader.ReadUInt16(), out creativePower) && creativePower is IPersistentPerWorldContent persistentPerWorldContent) + persistentPerWorldContent.Load(reader, versionGameWasLastSavedOn); + } + + public void ValidateWorld(BinaryReader reader, int versionGameWasLastSavedOn) + { + ICreativePower creativePower; + while (reader.ReadBoolean() && this._powersById.TryGetValue(reader.ReadUInt16(), out creativePower) && creativePower is IPersistentPerWorldContent persistentPerWorldContent) + persistentPerWorldContent.ValidateWorld(reader, versionGameWasLastSavedOn); + } + + public void SyncThingsToJoiningPlayer(int playerIndex) + { + foreach (KeyValuePair keyValuePair in this._powersById) + { + NetPacket packet = NetCreativePowerPermissionsModule.SerializeCurrentPowerPermissionLevel(keyValuePair.Key, (int) keyValuePair.Value.CurrentPermissionLevel); + NetManager.Instance.SendToClient(packet, playerIndex); + } + foreach (KeyValuePair keyValuePair in this._powersById) + { + if (keyValuePair.Value is IOnPlayerJoining onPlayerJoining1) + onPlayerJoining1.OnPlayerJoining(playerIndex); + } + } + + public void SaveToPlayer(Player player, BinaryWriter writer) + { + foreach (KeyValuePair keyValuePair in this._powersById) + { + if (keyValuePair.Value is IPersistentPerPlayerContent perPlayerContent1) + { + writer.Write(true); + writer.Write(keyValuePair.Key); + perPlayerContent1.Save(player, writer); + } + } + writer.Write(false); + } + + public void LoadToPlayer(Player player, BinaryReader reader, int versionGameWasLastSavedOn) + { + ICreativePower creativePower; + while (reader.ReadBoolean() && this._powersById.TryGetValue(reader.ReadUInt16(), out creativePower)) + { + if (creativePower is IPersistentPerPlayerContent perPlayerContent2) + perPlayerContent2.Load(player, reader, versionGameWasLastSavedOn); + } + } + + public void ApplyLoadedDataToPlayer(Player player) + { + foreach (KeyValuePair keyValuePair in this._powersById) + { + if (keyValuePair.Value is IPersistentPerPlayerContent perPlayerContent1) + perPlayerContent1.ApplyLoadedDataToOutOfPlayerFields(player); + } + } + + public void ResetDataForNewPlayer(Player player) + { + foreach (KeyValuePair keyValuePair in this._powersById) + { + if (keyValuePair.Value is IPersistentPerPlayerContent perPlayerContent1) + { + perPlayerContent1.Reset(); + perPlayerContent1.ResetDataForNewPlayer(player); + } + } + } + + private class PowerTypeStorage where T : ICreativePower + { + public static ushort Id; + public static string Name; + public static T Power; + } + } +} diff --git a/GameContent/Creative/CreativePowerSettings.cs b/GameContent/Creative/CreativePowerSettings.cs new file mode 100644 index 0000000..0fc139f --- /dev/null +++ b/GameContent/Creative/CreativePowerSettings.cs @@ -0,0 +1,13 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Creative.CreativePowerSettings +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Creative +{ + public class CreativePowerSettings + { + public static bool ShouldPowersBeElaborated; + } +} diff --git a/GameContent/Creative/CreativePowerUIElementRequestInfo.cs b/GameContent/Creative/CreativePowerUIElementRequestInfo.cs new file mode 100644 index 0000000..86b39b4 --- /dev/null +++ b/GameContent/Creative/CreativePowerUIElementRequestInfo.cs @@ -0,0 +1,14 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Creative.CreativePowerUIElementRequestInfo +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Creative +{ + public struct CreativePowerUIElementRequestInfo + { + public int PreferredButtonWidth; + public int PreferredButtonHeight; + } +} diff --git a/GameContent/Creative/CreativePowers.cs b/GameContent/Creative/CreativePowers.cs new file mode 100644 index 0000000..5b6f76d --- /dev/null +++ b/GameContent/Creative/CreativePowers.cs @@ -0,0 +1,1210 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Creative.CreativePowers +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using System.Collections.Generic; +using System.IO; +using Terraria.GameContent.NetModules; +using Terraria.GameContent.UI.Elements; +using Terraria.GameInput; +using Terraria.Initializers; +using Terraria.Localization; +using Terraria.Net; +using Terraria.UI; + +namespace Terraria.GameContent.Creative +{ + public class CreativePowers + { + public abstract class APerPlayerTogglePower : ICreativePower, IOnPlayerJoining + { + internal string _powerNameKey; + internal Point _iconLocation; + internal bool _defaultToggleState; + private bool[] _perPlayerIsEnabled = new bool[(int) byte.MaxValue]; + + public ushort PowerId { get; set; } + + public string ServerConfigName { get; set; } + + public PowerPermissionLevel CurrentPermissionLevel { get; set; } + + public PowerPermissionLevel DefaultPermissionLevel { get; set; } + + public bool IsEnabledForPlayer(int playerIndex) => this._perPlayerIsEnabled.IndexInRange(playerIndex) && this._perPlayerIsEnabled[playerIndex]; + + public void DeserializeNetMessage(BinaryReader reader, int userId) + { + switch ((CreativePowers.APerPlayerTogglePower.SubMessageType) reader.ReadByte()) + { + case CreativePowers.APerPlayerTogglePower.SubMessageType.SyncEveryone: + this.Deserialize_SyncEveryone(reader, userId); + break; + case CreativePowers.APerPlayerTogglePower.SubMessageType.SyncOnePlayer: + int playerIndex = (int) reader.ReadByte(); + bool state = reader.ReadBoolean(); + if (Main.netMode == 2) + { + playerIndex = userId; + if (!CreativePowersHelper.IsAvailableForPlayer((ICreativePower) this, playerIndex)) + break; + } + this.SetEnabledState(playerIndex, state); + break; + } + } + + private void Deserialize_SyncEveryone(BinaryReader reader, int userId) + { + int count = (int) Math.Ceiling((double) this._perPlayerIsEnabled.Length / 8.0); + if (Main.netMode == 2 && !CreativePowersHelper.IsAvailableForPlayer((ICreativePower) this, userId)) + { + reader.ReadBytes(count); + } + else + { + for (int index = 0; index < count; ++index) + { + BitsByte bitsByte = (BitsByte) reader.ReadByte(); + for (int key = 0; key < 8; ++key) + { + int playerIndex = index * 8 + key; + if (playerIndex != Main.myPlayer) + { + if (playerIndex < this._perPlayerIsEnabled.Length) + this.SetEnabledState(playerIndex, bitsByte[key]); + else + break; + } + } + } + } + } + + public void SetEnabledState(int playerIndex, bool state) + { + this._perPlayerIsEnabled[playerIndex] = state; + if (Main.netMode != 2) + return; + NetPacket packet = NetCreativePowersModule.PreparePacket(this.PowerId, 3); + packet.Writer.Write((byte) 1); + packet.Writer.Write((byte) playerIndex); + packet.Writer.Write(state); + NetManager.Instance.Broadcast(packet); + } + + public void DebugCall() => this.RequestUse(); + + internal void RequestUse() + { + NetPacket packet = NetCreativePowersModule.PreparePacket(this.PowerId, 1); + packet.Writer.Write((byte) 1); + packet.Writer.Write((byte) Main.myPlayer); + packet.Writer.Write(!this._perPlayerIsEnabled[Main.myPlayer]); + NetManager.Instance.SendToServerOrLoopback(packet); + } + + public void Reset() + { + for (int index = 0; index < this._perPlayerIsEnabled.Length; ++index) + this._perPlayerIsEnabled[index] = this._defaultToggleState; + } + + public void OnPlayerJoining(int playerIndex) + { + int num = (int) Math.Ceiling((double) this._perPlayerIsEnabled.Length / 8.0); + NetPacket packet = NetCreativePowersModule.PreparePacket(this.PowerId, num + 1); + packet.Writer.Write((byte) 0); + for (int index1 = 0; index1 < num; ++index1) + { + BitsByte bitsByte = (BitsByte) (byte) 0; + for (int key = 0; key < 8; ++key) + { + int index2 = index1 * 8 + key; + if (index2 < this._perPlayerIsEnabled.Length) + bitsByte[key] = this._perPlayerIsEnabled[index2]; + else + break; + } + packet.Writer.Write((byte) bitsByte); + } + NetManager.Instance.SendToClient(packet, playerIndex); + } + + public void ProvidePowerButtons( + CreativePowerUIElementRequestInfo info, + List elements) + { + GroupOptionButton toggleButton = CreativePowersHelper.CreateToggleButton(info); + CreativePowersHelper.UpdateUnlockStateByPower((ICreativePower) this, (UIElement) toggleButton, Main.OurFavoriteColor); + toggleButton.Append((UIElement) CreativePowersHelper.GetIconImage(this._iconLocation)); + toggleButton.OnClick += new UIElement.MouseEvent(this.button_OnClick); + toggleButton.OnUpdate += new UIElement.ElementEvent(this.button_OnUpdate); + elements.Add((UIElement) toggleButton); + } + + private void button_OnUpdate(UIElement affectedElement) + { + bool option = this._perPlayerIsEnabled[Main.myPlayer]; + GroupOptionButton groupOptionButton = affectedElement as GroupOptionButton; + groupOptionButton.SetCurrentOption(option); + if (!affectedElement.IsMouseHovering) + return; + string textValue = Language.GetTextValue(groupOptionButton.IsSelected ? this._powerNameKey + "_Enabled" : this._powerNameKey + "_Disabled"); + CreativePowersHelper.AddDescriptionIfNeeded(ref textValue, this._powerNameKey + "_Description"); + CreativePowersHelper.AddUnlockTextIfNeeded(ref textValue, this.GetIsUnlocked(), this._powerNameKey + "_Unlock"); + CreativePowersHelper.AddPermissionTextIfNeeded((ICreativePower) this, ref textValue); + Main.instance.MouseTextNoOverride(textValue); + } + + private void button_OnClick(UIMouseEvent evt, UIElement listeningElement) + { + if (!this.GetIsUnlocked() || !CreativePowersHelper.IsAvailableForPlayer((ICreativePower) this, Main.myPlayer)) + return; + this.RequestUse(); + } + + public abstract bool GetIsUnlocked(); + + private enum SubMessageType : byte + { + SyncEveryone, + SyncOnePlayer, + } + } + + public abstract class APerPlayerSliderPower : + ICreativePower, + IOnPlayerJoining, + IProvideSliderElement, + IPowerSubcategoryElement + { + internal Point _iconLocation; + internal float _sliderCurrentValueCache; + internal string _powerNameKey; + internal float[] _cachePerPlayer = new float[256]; + internal float _sliderDefaultValue; + private float _currentTargetValue; + private bool _needsToCommitChange; + private DateTime _nextTimeWeCanPush = DateTime.UtcNow; + + public ushort PowerId { get; set; } + + public string ServerConfigName { get; set; } + + public PowerPermissionLevel CurrentPermissionLevel { get; set; } + + public PowerPermissionLevel DefaultPermissionLevel { get; set; } + + public bool GetRemappedSliderValueFor(int playerIndex, out float value) + { + value = 0.0f; + if (!this._cachePerPlayer.IndexInRange(playerIndex)) + return false; + value = this.RemapSliderValueToPowerValue(this._cachePerPlayer[playerIndex]); + return true; + } + + public abstract float RemapSliderValueToPowerValue(float sliderValue); + + public void DeserializeNetMessage(BinaryReader reader, int userId) + { + int playerIndex = (int) reader.ReadByte(); + float num = reader.ReadSingle(); + if (Main.netMode == 2) + { + playerIndex = userId; + if (!CreativePowersHelper.IsAvailableForPlayer((ICreativePower) this, playerIndex)) + return; + } + this._cachePerPlayer[playerIndex] = num; + if (playerIndex != Main.myPlayer) + return; + this._sliderCurrentValueCache = num; + this.UpdateInfoFromSliderValueCache(); + } + + internal abstract void UpdateInfoFromSliderValueCache(); + + public void ProvidePowerButtons( + CreativePowerUIElementRequestInfo info, + List elements) + { + throw new NotImplementedException(); + } + + public void DebugCall() + { + NetPacket packet = NetCreativePowersModule.PreparePacket(this.PowerId, 5); + packet.Writer.Write((byte) Main.myPlayer); + packet.Writer.Write(0.0f); + NetManager.Instance.SendToServerOrLoopback(packet); + } + + public abstract UIElement ProvideSlider(); + + internal float GetSliderValue() => Main.netMode == 1 && this._needsToCommitChange ? this._currentTargetValue : this._sliderCurrentValueCache; + + internal void SetValueKeyboard(float value) + { + if ((double) value == (double) this._currentTargetValue || !CreativePowersHelper.IsAvailableForPlayer((ICreativePower) this, Main.myPlayer)) + return; + this._currentTargetValue = value; + this._needsToCommitChange = true; + } + + internal void SetValueGamepad() + { + float sliderValue = this.GetSliderValue(); + float num = UILinksInitializer.HandleSliderVerticalInput(sliderValue, 0.0f, 1f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.35f); + if ((double) num == (double) sliderValue) + return; + this.SetValueKeyboard(num); + } + + public void PushChangeAndSetSlider(float value) + { + if (!CreativePowersHelper.IsAvailableForPlayer((ICreativePower) this, Main.myPlayer)) + return; + value = MathHelper.Clamp(value, 0.0f, 1f); + this._sliderCurrentValueCache = value; + this._currentTargetValue = value; + this.PushChange(value); + } + + public GroupOptionButton GetOptionButton( + CreativePowerUIElementRequestInfo info, + int optionIndex, + int currentOptionIndex) + { + GroupOptionButton categoryButton = CreativePowersHelper.CreateCategoryButton(info, optionIndex, currentOptionIndex); + CreativePowersHelper.UpdateUnlockStateByPower((ICreativePower) this, (UIElement) categoryButton, CreativePowersHelper.CommonSelectedColor); + categoryButton.Append((UIElement) CreativePowersHelper.GetIconImage(this._iconLocation)); + categoryButton.OnUpdate += new UIElement.ElementEvent(this.categoryButton_OnUpdate); + return categoryButton; + } + + private void categoryButton_OnUpdate(UIElement affectedElement) + { + if (affectedElement.IsMouseHovering) + { + string textValue = Language.GetTextValue(this._powerNameKey + ((affectedElement as GroupOptionButton).IsSelected ? "_Opened" : "_Closed")); + CreativePowersHelper.AddDescriptionIfNeeded(ref textValue, this._powerNameKey + "_Description"); + CreativePowersHelper.AddUnlockTextIfNeeded(ref textValue, this.GetIsUnlocked(), this._powerNameKey + "_Unlock"); + CreativePowersHelper.AddPermissionTextIfNeeded((ICreativePower) this, ref textValue); + Main.instance.MouseTextNoOverride(textValue); + } + this.AttemptPushingChange(); + } + + private void AttemptPushingChange() + { + if (!this._needsToCommitChange || DateTime.UtcNow.CompareTo(this._nextTimeWeCanPush) == -1) + return; + this.PushChange(this._currentTargetValue); + } + + internal void PushChange(float newSliderValue) + { + this._needsToCommitChange = false; + this._sliderCurrentValueCache = newSliderValue; + this._nextTimeWeCanPush = DateTime.UtcNow; + NetPacket packet = NetCreativePowersModule.PreparePacket(this.PowerId, 5); + packet.Writer.Write((byte) Main.myPlayer); + packet.Writer.Write(newSliderValue); + NetManager.Instance.SendToServerOrLoopback(packet); + } + + public virtual void Reset() + { + for (int playerIndex = 0; playerIndex < this._cachePerPlayer.Length; ++playerIndex) + this.ResetForPlayer(playerIndex); + } + + public virtual void ResetForPlayer(int playerIndex) + { + this._cachePerPlayer[playerIndex] = this._sliderDefaultValue; + if (playerIndex != Main.myPlayer) + return; + this._sliderCurrentValueCache = this._sliderDefaultValue; + this._currentTargetValue = this._sliderDefaultValue; + } + + public void OnPlayerJoining(int playerIndex) => this.ResetForPlayer(playerIndex); + + public abstract bool GetIsUnlocked(); + } + + public abstract class ASharedButtonPower : ICreativePower + { + internal Point _iconLocation; + internal string _powerNameKey; + internal string _descriptionKey; + + public ushort PowerId { get; set; } + + public string ServerConfigName { get; set; } + + public PowerPermissionLevel CurrentPermissionLevel { get; set; } + + public PowerPermissionLevel DefaultPermissionLevel { get; set; } + + public ASharedButtonPower() => this.OnCreation(); + + public void RequestUse() + { + NetPacket packet = NetCreativePowersModule.PreparePacket(this.PowerId, 0); + NetManager.Instance.SendToServerOrLoopback(packet); + } + + public void DeserializeNetMessage(BinaryReader reader, int userId) + { + if (Main.netMode == 2 && !CreativePowersHelper.IsAvailableForPlayer((ICreativePower) this, userId)) + return; + this.UsePower(); + } + + internal abstract void UsePower(); + + internal abstract void OnCreation(); + + public void ProvidePowerButtons( + CreativePowerUIElementRequestInfo info, + List elements) + { + GroupOptionButton simpleButton = CreativePowersHelper.CreateSimpleButton(info); + CreativePowersHelper.UpdateUnlockStateByPower((ICreativePower) this, (UIElement) simpleButton, CreativePowersHelper.CommonSelectedColor); + simpleButton.Append((UIElement) CreativePowersHelper.GetIconImage(this._iconLocation)); + simpleButton.OnClick += new UIElement.MouseEvent(this.button_OnClick); + simpleButton.OnUpdate += new UIElement.ElementEvent(this.button_OnUpdate); + elements.Add((UIElement) simpleButton); + } + + private void button_OnUpdate(UIElement affectedElement) + { + if (!affectedElement.IsMouseHovering) + return; + string textValue = Language.GetTextValue(this._powerNameKey); + CreativePowersHelper.AddDescriptionIfNeeded(ref textValue, this._descriptionKey); + CreativePowersHelper.AddUnlockTextIfNeeded(ref textValue, this.GetIsUnlocked(), this._powerNameKey + "_Unlock"); + CreativePowersHelper.AddPermissionTextIfNeeded((ICreativePower) this, ref textValue); + Main.instance.MouseTextNoOverride(textValue); + } + + private void button_OnClick(UIMouseEvent evt, UIElement listeningElement) + { + if (!CreativePowersHelper.IsAvailableForPlayer((ICreativePower) this, Main.myPlayer)) + return; + this.RequestUse(); + } + + public abstract bool GetIsUnlocked(); + } + + public abstract class ASharedTogglePower : ICreativePower, IOnPlayerJoining + { + public ushort PowerId { get; set; } + + public string ServerConfigName { get; set; } + + public PowerPermissionLevel CurrentPermissionLevel { get; set; } + + public PowerPermissionLevel DefaultPermissionLevel { get; set; } + + public bool Enabled { get; private set; } + + public void SetPowerInfo(bool enabled) => this.Enabled = enabled; + + public void Reset() => this.Enabled = false; + + public void OnPlayerJoining(int playerIndex) + { + NetPacket packet = NetCreativePowersModule.PreparePacket(this.PowerId, 1); + packet.Writer.Write(this.Enabled); + NetManager.Instance.SendToClient(packet, playerIndex); + } + + public void DeserializeNetMessage(BinaryReader reader, int userId) + { + bool enabled = reader.ReadBoolean(); + if (Main.netMode == 2 && !CreativePowersHelper.IsAvailableForPlayer((ICreativePower) this, userId)) + return; + this.SetPowerInfo(enabled); + if (Main.netMode != 2) + return; + NetPacket packet = NetCreativePowersModule.PreparePacket(this.PowerId, 1); + packet.Writer.Write(this.Enabled); + NetManager.Instance.Broadcast(packet); + } + + private void RequestUse() + { + NetPacket packet = NetCreativePowersModule.PreparePacket(this.PowerId, 1); + packet.Writer.Write(!this.Enabled); + NetManager.Instance.SendToServerOrLoopback(packet); + } + + public void ProvidePowerButtons( + CreativePowerUIElementRequestInfo info, + List elements) + { + GroupOptionButton toggleButton = CreativePowersHelper.CreateToggleButton(info); + CreativePowersHelper.UpdateUnlockStateByPower((ICreativePower) this, (UIElement) toggleButton, Main.OurFavoriteColor); + this.CustomizeButton((UIElement) toggleButton); + toggleButton.OnClick += new UIElement.MouseEvent(this.button_OnClick); + toggleButton.OnUpdate += new UIElement.ElementEvent(this.button_OnUpdate); + elements.Add((UIElement) toggleButton); + } + + private void button_OnUpdate(UIElement affectedElement) + { + bool enabled = this.Enabled; + GroupOptionButton groupOptionButton = affectedElement as GroupOptionButton; + groupOptionButton.SetCurrentOption(enabled); + if (!affectedElement.IsMouseHovering) + return; + string buttonTextKey = this.GetButtonTextKey(); + string textValue = Language.GetTextValue(buttonTextKey + (groupOptionButton.IsSelected ? "_Enabled" : "_Disabled")); + CreativePowersHelper.AddDescriptionIfNeeded(ref textValue, buttonTextKey + "_Description"); + CreativePowersHelper.AddUnlockTextIfNeeded(ref textValue, this.GetIsUnlocked(), buttonTextKey + "_Unlock"); + CreativePowersHelper.AddPermissionTextIfNeeded((ICreativePower) this, ref textValue); + Main.instance.MouseTextNoOverride(textValue); + } + + private void button_OnClick(UIMouseEvent evt, UIElement listeningElement) + { + if (!CreativePowersHelper.IsAvailableForPlayer((ICreativePower) this, Main.myPlayer)) + return; + this.RequestUse(); + } + + internal abstract void CustomizeButton(UIElement button); + + internal abstract string GetButtonTextKey(); + + public abstract bool GetIsUnlocked(); + } + + public abstract class ASharedSliderPower : + ICreativePower, + IOnPlayerJoining, + IProvideSliderElement, + IPowerSubcategoryElement + { + internal Point _iconLocation; + internal float _sliderCurrentValueCache; + internal string _powerNameKey; + internal bool _syncToJoiningPlayers = true; + internal float _currentTargetValue; + private bool _needsToCommitChange; + private DateTime _nextTimeWeCanPush = DateTime.UtcNow; + + public ushort PowerId { get; set; } + + public string ServerConfigName { get; set; } + + public PowerPermissionLevel CurrentPermissionLevel { get; set; } + + public PowerPermissionLevel DefaultPermissionLevel { get; set; } + + public void DeserializeNetMessage(BinaryReader reader, int userId) + { + float num = reader.ReadSingle(); + if (Main.netMode == 2 && !CreativePowersHelper.IsAvailableForPlayer((ICreativePower) this, userId)) + return; + this._sliderCurrentValueCache = num; + this.UpdateInfoFromSliderValueCache(); + if (Main.netMode != 2) + return; + NetPacket packet = NetCreativePowersModule.PreparePacket(this.PowerId, 4); + packet.Writer.Write(num); + NetManager.Instance.Broadcast(packet); + } + + internal abstract void UpdateInfoFromSliderValueCache(); + + public void ProvidePowerButtons( + CreativePowerUIElementRequestInfo info, + List elements) + { + throw new NotImplementedException(); + } + + public void DebugCall() + { + NetPacket packet = NetCreativePowersModule.PreparePacket(this.PowerId, 4); + packet.Writer.Write(0.0f); + NetManager.Instance.SendToServerOrLoopback(packet); + } + + public abstract UIElement ProvideSlider(); + + internal float GetSliderValue() => Main.netMode == 1 && this._needsToCommitChange ? this._currentTargetValue : this.GetSliderValueInner(); + + internal virtual float GetSliderValueInner() => this._sliderCurrentValueCache; + + internal void SetValueKeyboard(float value) + { + if ((double) value == (double) this._currentTargetValue || !CreativePowersHelper.IsAvailableForPlayer((ICreativePower) this, Main.myPlayer)) + return; + this._currentTargetValue = value; + this._needsToCommitChange = true; + } + + internal void SetValueGamepad() + { + float sliderValue = this.GetSliderValue(); + float num = UILinksInitializer.HandleSliderVerticalInput(sliderValue, 0.0f, 1f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.35f); + if ((double) num == (double) sliderValue) + return; + this.SetValueKeyboard(num); + } + + public GroupOptionButton GetOptionButton( + CreativePowerUIElementRequestInfo info, + int optionIndex, + int currentOptionIndex) + { + GroupOptionButton categoryButton = CreativePowersHelper.CreateCategoryButton(info, optionIndex, currentOptionIndex); + CreativePowersHelper.UpdateUnlockStateByPower((ICreativePower) this, (UIElement) categoryButton, CreativePowersHelper.CommonSelectedColor); + categoryButton.Append((UIElement) CreativePowersHelper.GetIconImage(this._iconLocation)); + categoryButton.OnUpdate += new UIElement.ElementEvent(this.categoryButton_OnUpdate); + return categoryButton; + } + + private void categoryButton_OnUpdate(UIElement affectedElement) + { + if (affectedElement.IsMouseHovering) + { + string textValue = Language.GetTextValue(this._powerNameKey + ((affectedElement as GroupOptionButton).IsSelected ? "_Opened" : "_Closed")); + CreativePowersHelper.AddDescriptionIfNeeded(ref textValue, this._powerNameKey + "_Description"); + CreativePowersHelper.AddUnlockTextIfNeeded(ref textValue, this.GetIsUnlocked(), this._powerNameKey + "_Unlock"); + CreativePowersHelper.AddPermissionTextIfNeeded((ICreativePower) this, ref textValue); + Main.instance.MouseTextNoOverride(textValue); + } + this.AttemptPushingChange(); + } + + private void AttemptPushingChange() + { + if (!this._needsToCommitChange || DateTime.UtcNow.CompareTo(this._nextTimeWeCanPush) == -1) + return; + this._needsToCommitChange = false; + this._sliderCurrentValueCache = this._currentTargetValue; + this._nextTimeWeCanPush = DateTime.UtcNow; + NetPacket packet = NetCreativePowersModule.PreparePacket(this.PowerId, 4); + packet.Writer.Write(this._currentTargetValue); + NetManager.Instance.SendToServerOrLoopback(packet); + } + + public virtual void Reset() => this._sliderCurrentValueCache = 0.0f; + + public void OnPlayerJoining(int playerIndex) + { + if (!this._syncToJoiningPlayers) + return; + NetPacket packet = NetCreativePowersModule.PreparePacket(this.PowerId, 4); + packet.Writer.Write(this._sliderCurrentValueCache); + NetManager.Instance.SendToClient(packet, playerIndex); + } + + public abstract bool GetIsUnlocked(); + } + + public class GodmodePower : CreativePowers.APerPlayerTogglePower, IPersistentPerPlayerContent + { + public GodmodePower() + { + this._powerNameKey = "CreativePowers.Godmode"; + this._iconLocation = CreativePowersHelper.CreativePowerIconLocations.Godmode; + } + + public override bool GetIsUnlocked() => true; + + public void Save(Player player, BinaryWriter writer) + { + bool flag = this.IsEnabledForPlayer(Main.myPlayer); + writer.Write(flag); + } + + public void ResetDataForNewPlayer(Player player) => player.savedPerPlayerFieldsThatArentInThePlayerClass.godmodePowerEnabled = this._defaultToggleState; + + public void Load(Player player, BinaryReader reader, int gameVersionSaveWasMadeOn) + { + bool flag = reader.ReadBoolean(); + player.savedPerPlayerFieldsThatArentInThePlayerClass.godmodePowerEnabled = flag; + } + + public void ApplyLoadedDataToOutOfPlayerFields(Player player) + { + if (player.savedPerPlayerFieldsThatArentInThePlayerClass.godmodePowerEnabled == this.IsEnabledForPlayer(player.whoAmI)) + return; + this.RequestUse(); + } + } + + public class FarPlacementRangePower : + CreativePowers.APerPlayerTogglePower, + IPersistentPerPlayerContent + { + public FarPlacementRangePower() + { + this._powerNameKey = "CreativePowers.InfinitePlacementRange"; + this._iconLocation = CreativePowersHelper.CreativePowerIconLocations.BlockPlacementRange; + this._defaultToggleState = true; + } + + public override bool GetIsUnlocked() => true; + + public void Save(Player player, BinaryWriter writer) + { + bool flag = this.IsEnabledForPlayer(Main.myPlayer); + writer.Write(flag); + } + + public void ResetDataForNewPlayer(Player player) => player.savedPerPlayerFieldsThatArentInThePlayerClass.farPlacementRangePowerEnabled = this._defaultToggleState; + + public void Load(Player player, BinaryReader reader, int gameVersionSaveWasMadeOn) + { + bool flag = reader.ReadBoolean(); + player.savedPerPlayerFieldsThatArentInThePlayerClass.farPlacementRangePowerEnabled = flag; + } + + public void ApplyLoadedDataToOutOfPlayerFields(Player player) + { + if (player.savedPerPlayerFieldsThatArentInThePlayerClass.farPlacementRangePowerEnabled == this.IsEnabledForPlayer(player.whoAmI)) + return; + this.RequestUse(); + } + } + + public class StartDayImmediately : CreativePowers.ASharedButtonPower + { + internal override void UsePower() + { + if (Main.netMode == 1) + return; + Main.SkipToTime(0, true); + } + + internal override void OnCreation() + { + this._powerNameKey = "CreativePowers.StartDayImmediately"; + this._descriptionKey = this._powerNameKey + "_Description"; + this._iconLocation = CreativePowersHelper.CreativePowerIconLocations.TimeDawn; + } + + public override bool GetIsUnlocked() => true; + } + + public class StartNightImmediately : CreativePowers.ASharedButtonPower + { + internal override void UsePower() + { + if (Main.netMode == 1) + return; + Main.SkipToTime(0, false); + } + + internal override void OnCreation() + { + this._powerNameKey = "CreativePowers.StartNightImmediately"; + this._descriptionKey = this._powerNameKey + "_Description"; + this._iconLocation = CreativePowersHelper.CreativePowerIconLocations.TimeDusk; + } + + public override bool GetIsUnlocked() => true; + } + + public class StartNoonImmediately : CreativePowers.ASharedButtonPower + { + internal override void UsePower() + { + if (Main.netMode == 1) + return; + Main.SkipToTime(27000, true); + } + + internal override void OnCreation() + { + this._powerNameKey = "CreativePowers.StartNoonImmediately"; + this._descriptionKey = this._powerNameKey + "_Description"; + this._iconLocation = CreativePowersHelper.CreativePowerIconLocations.TimeNoon; + } + + public override bool GetIsUnlocked() => true; + } + + public class StartMidnightImmediately : CreativePowers.ASharedButtonPower + { + internal override void UsePower() + { + if (Main.netMode == 1) + return; + Main.SkipToTime(16200, false); + } + + internal override void OnCreation() + { + this._powerNameKey = "CreativePowers.StartMidnightImmediately"; + this._descriptionKey = this._powerNameKey + "_Description"; + this._iconLocation = CreativePowersHelper.CreativePowerIconLocations.TimeMidnight; + } + + public override bool GetIsUnlocked() => true; + } + + public class ModifyTimeRate : CreativePowers.ASharedSliderPower, IPersistentPerWorldContent + { + public int TargetTimeRate { get; private set; } + + public ModifyTimeRate() + { + this._powerNameKey = "CreativePowers.ModifyTimeRate"; + this._iconLocation = CreativePowersHelper.CreativePowerIconLocations.ModifyTime; + } + + public override void Reset() + { + this._sliderCurrentValueCache = 0.0f; + this.TargetTimeRate = 1; + } + + internal override void UpdateInfoFromSliderValueCache() => this.TargetTimeRate = (int) Math.Round((double) Utils.Remap(this._sliderCurrentValueCache, 0.0f, 1f, 1f, 24f)); + + public override UIElement ProvideSlider() + { + UIVerticalSlider slider = CreativePowersHelper.CreateSlider(new Func(((CreativePowers.ASharedSliderPower) this).GetSliderValue), new Action(((CreativePowers.ASharedSliderPower) this).SetValueKeyboard), new Action(((CreativePowers.ASharedSliderPower) this).SetValueGamepad)); + slider.OnUpdate += new UIElement.ElementEvent(this.UpdateSliderAndShowMultiplierMouseOver); + UIPanel uiPanel = new UIPanel(); + uiPanel.Width = new StyleDimension(87f, 0.0f); + uiPanel.Height = new StyleDimension(180f, 0.0f); + uiPanel.HAlign = 0.0f; + uiPanel.VAlign = 0.5f; + uiPanel.Append((UIElement) slider); + uiPanel.OnUpdate += new UIElement.ElementEvent(CreativePowersHelper.UpdateUseMouseInterface); + UIText uiText1 = new UIText("x24"); + uiText1.HAlign = 1f; + uiText1.VAlign = 0.0f; + uiPanel.Append((UIElement) uiText1); + UIText uiText2 = new UIText("x12"); + uiText2.HAlign = 1f; + uiText2.VAlign = 0.5f; + uiPanel.Append((UIElement) uiText2); + UIText uiText3 = new UIText("x1"); + uiText3.HAlign = 1f; + uiText3.VAlign = 1f; + uiPanel.Append((UIElement) uiText3); + return (UIElement) uiPanel; + } + + public override bool GetIsUnlocked() => true; + + public void Save(BinaryWriter writer) => writer.Write(this._sliderCurrentValueCache); + + public void Load(BinaryReader reader, int gameVersionSaveWasMadeOn) + { + this._sliderCurrentValueCache = reader.ReadSingle(); + this.UpdateInfoFromSliderValueCache(); + } + + public void ValidateWorld(BinaryReader reader, int gameVersionSaveWasMadeOn) + { + double num = (double) reader.ReadSingle(); + } + + private void UpdateSliderAndShowMultiplierMouseOver(UIElement affectedElement) + { + if (!affectedElement.IsMouseHovering) + return; + string originalText = "x" + this.TargetTimeRate.ToString(); + CreativePowersHelper.AddPermissionTextIfNeeded((ICreativePower) this, ref originalText); + Main.instance.MouseTextNoOverride(originalText); + } + } + + public class DifficultySliderPower : + CreativePowers.ASharedSliderPower, + IPersistentPerWorldContent + { + public float StrengthMultiplierToGiveNPCs { get; private set; } + + public DifficultySliderPower() + { + this._powerNameKey = "CreativePowers.DifficultySlider"; + this._iconLocation = CreativePowersHelper.CreativePowerIconLocations.EnemyStrengthSlider; + } + + public override void Reset() + { + this._sliderCurrentValueCache = 0.0f; + this.UpdateInfoFromSliderValueCache(); + } + + internal override void UpdateInfoFromSliderValueCache() + { + this.StrengthMultiplierToGiveNPCs = (double) this._sliderCurrentValueCache > 0.330000013113022 ? Utils.Remap(this._sliderCurrentValueCache, 0.33f, 1f, 1f, 3f) : Utils.Remap(this._sliderCurrentValueCache, 0.0f, 0.33f, 0.5f, 1f); + this.StrengthMultiplierToGiveNPCs = (float) Math.Round((double) this.StrengthMultiplierToGiveNPCs * 20.0) / 20f; + } + + public override UIElement ProvideSlider() + { + UIVerticalSlider slider = CreativePowersHelper.CreateSlider(new Func(((CreativePowers.ASharedSliderPower) this).GetSliderValue), new Action(((CreativePowers.ASharedSliderPower) this).SetValueKeyboard), new Action(((CreativePowers.ASharedSliderPower) this).SetValueGamepad)); + UIPanel panel = new UIPanel(); + panel.Width = new StyleDimension(82f, 0.0f); + panel.Height = new StyleDimension(180f, 0.0f); + panel.HAlign = 0.0f; + panel.VAlign = 0.5f; + panel.Append((UIElement) slider); + panel.OnUpdate += new UIElement.ElementEvent(CreativePowersHelper.UpdateUseMouseInterface); + slider.OnUpdate += new UIElement.ElementEvent(this.UpdateSliderColorAndShowMultiplierMouseOver); + CreativePowers.DifficultySliderPower.AddIndication(panel, 0.0f, "x3", "Images/UI/WorldCreation/IconDifficultyMaster", new UIElement.ElementEvent(this.MouseOver_Master)); + CreativePowers.DifficultySliderPower.AddIndication(panel, 0.3333333f, "x2", "Images/UI/WorldCreation/IconDifficultyExpert", new UIElement.ElementEvent(this.MouseOver_Expert)); + CreativePowers.DifficultySliderPower.AddIndication(panel, 0.6666667f, "x1", "Images/UI/WorldCreation/IconDifficultyNormal", new UIElement.ElementEvent(this.MouseOver_Normal)); + CreativePowers.DifficultySliderPower.AddIndication(panel, 1f, "x0.5", "Images/UI/WorldCreation/IconDifficultyCreative", new UIElement.ElementEvent(this.MouseOver_Journey)); + return (UIElement) panel; + } + + private static void AddIndication( + UIPanel panel, + float yAnchor, + string indicationText, + string iconImagePath, + UIElement.ElementEvent updateEvent) + { + UIImage uiImage1 = new UIImage(Main.Assets.Request(iconImagePath, (AssetRequestMode) 1)); + uiImage1.HAlign = 1f; + uiImage1.VAlign = yAnchor; + uiImage1.Left = new StyleDimension(4f, 0.0f); + uiImage1.Top = new StyleDimension(2f, 0.0f); + uiImage1.RemoveFloatingPointsFromDrawPosition = true; + UIImage uiImage2 = uiImage1; + if (updateEvent != null) + uiImage2.OnUpdate += updateEvent; + panel.Append((UIElement) uiImage2); + } + + private void MouseOver_Journey(UIElement affectedElement) + { + if (!affectedElement.IsMouseHovering) + return; + string textValue = Language.GetTextValue("UI.Creative"); + Main.instance.MouseTextNoOverride(textValue); + } + + private void MouseOver_Normal(UIElement affectedElement) + { + if (!affectedElement.IsMouseHovering) + return; + string textValue = Language.GetTextValue("UI.Normal"); + Main.instance.MouseTextNoOverride(textValue); + } + + private void MouseOver_Expert(UIElement affectedElement) + { + if (!affectedElement.IsMouseHovering) + return; + string textValue = Language.GetTextValue("UI.Expert"); + Main.instance.MouseTextNoOverride(textValue); + } + + private void MouseOver_Master(UIElement affectedElement) + { + if (!affectedElement.IsMouseHovering) + return; + string textValue = Language.GetTextValue("UI.Master"); + Main.instance.MouseTextNoOverride(textValue); + } + + private void UpdateSliderColorAndShowMultiplierMouseOver(UIElement affectedElement) + { + if (affectedElement.IsMouseHovering) + { + string originalText = "x" + this.StrengthMultiplierToGiveNPCs.ToString("F2"); + CreativePowersHelper.AddPermissionTextIfNeeded((ICreativePower) this, ref originalText); + Main.instance.MouseTextNoOverride(originalText); + } + if (!(affectedElement is UIVerticalSlider uiVerticalSlider)) + return; + uiVerticalSlider.EmptyColor = Color.Black; + Color color = !Main.masterMode ? (!Main.expertMode ? ((double) this.StrengthMultiplierToGiveNPCs >= 1.0 ? Color.White : Main.creativeModeColor) : Main.mcColor) : Main.hcColor; + uiVerticalSlider.FilledColor = color; + } + + public override bool GetIsUnlocked() => true; + + public void Save(BinaryWriter writer) => writer.Write(this._sliderCurrentValueCache); + + public void Load(BinaryReader reader, int gameVersionSaveWasMadeOn) + { + this._sliderCurrentValueCache = reader.ReadSingle(); + this.UpdateInfoFromSliderValueCache(); + } + + public void ValidateWorld(BinaryReader reader, int gameVersionSaveWasMadeOn) + { + double num = (double) reader.ReadSingle(); + } + } + + public class ModifyWindDirectionAndStrength : CreativePowers.ASharedSliderPower + { + public ModifyWindDirectionAndStrength() + { + this._powerNameKey = "CreativePowers.ModifyWindDirectionAndStrength"; + this._iconLocation = CreativePowersHelper.CreativePowerIconLocations.WindDirection; + this._syncToJoiningPlayers = false; + } + + internal override void UpdateInfoFromSliderValueCache() => Main.windSpeedCurrent = Main.windSpeedTarget = MathHelper.Lerp(-0.8f, 0.8f, this._sliderCurrentValueCache); + + internal override float GetSliderValueInner() => Utils.GetLerpValue(-0.8f, 0.8f, Main.windSpeedTarget, false); + + public override bool GetIsUnlocked() => true; + + public override UIElement ProvideSlider() + { + UIVerticalSlider slider = CreativePowersHelper.CreateSlider(new Func(((CreativePowers.ASharedSliderPower) this).GetSliderValue), new Action(((CreativePowers.ASharedSliderPower) this).SetValueKeyboard), new Action(((CreativePowers.ASharedSliderPower) this).SetValueGamepad)); + slider.OnUpdate += new UIElement.ElementEvent(this.UpdateSliderAndShowMultiplierMouseOver); + UIPanel uiPanel = new UIPanel(); + uiPanel.Width = new StyleDimension(132f, 0.0f); + uiPanel.Height = new StyleDimension(180f, 0.0f); + uiPanel.HAlign = 0.0f; + uiPanel.VAlign = 0.5f; + uiPanel.Append((UIElement) slider); + uiPanel.OnUpdate += new UIElement.ElementEvent(CreativePowersHelper.UpdateUseMouseInterface); + UIText uiText1 = new UIText(Language.GetText("CreativePowers.WindWest")); + uiText1.HAlign = 1f; + uiText1.VAlign = 0.0f; + uiPanel.Append((UIElement) uiText1); + UIText uiText2 = new UIText(Language.GetText("CreativePowers.WindEast")); + uiText2.HAlign = 1f; + uiText2.VAlign = 1f; + uiPanel.Append((UIElement) uiText2); + UIText uiText3 = new UIText(Language.GetText("CreativePowers.WindNone")); + uiText3.HAlign = 1f; + uiText3.VAlign = 0.5f; + uiPanel.Append((UIElement) uiText3); + return (UIElement) uiPanel; + } + + private void UpdateSliderAndShowMultiplierMouseOver(UIElement affectedElement) + { + if (!affectedElement.IsMouseHovering) + return; + int num = (int) ((double) Main.windSpeedCurrent * 50.0); + string originalText = ""; + if (num < 0) + originalText += Language.GetTextValue("GameUI.EastWind", (object) Math.Abs(num)); + else if (num > 0) + originalText += Language.GetTextValue("GameUI.WestWind", (object) num); + CreativePowersHelper.AddPermissionTextIfNeeded((ICreativePower) this, ref originalText); + Main.instance.MouseTextNoOverride(originalText); + } + } + + public class ModifyRainPower : CreativePowers.ASharedSliderPower + { + public ModifyRainPower() + { + this._powerNameKey = "CreativePowers.ModifyRainPower"; + this._iconLocation = CreativePowersHelper.CreativePowerIconLocations.RainStrength; + this._syncToJoiningPlayers = false; + } + + internal override void UpdateInfoFromSliderValueCache() + { + if ((double) this._sliderCurrentValueCache == 0.0) + Main.StopRain(); + else + Main.StartRain(); + Main.cloudAlpha = this._sliderCurrentValueCache; + Main.maxRaining = this._sliderCurrentValueCache; + } + + internal override float GetSliderValueInner() => Main.cloudAlpha; + + public override bool GetIsUnlocked() => true; + + public override UIElement ProvideSlider() + { + UIVerticalSlider slider = CreativePowersHelper.CreateSlider(new Func(((CreativePowers.ASharedSliderPower) this).GetSliderValue), new Action(((CreativePowers.ASharedSliderPower) this).SetValueKeyboard), new Action(((CreativePowers.ASharedSliderPower) this).SetValueGamepad)); + slider.OnUpdate += new UIElement.ElementEvent(this.UpdateSliderAndShowMultiplierMouseOver); + UIPanel uiPanel = new UIPanel(); + uiPanel.Width = new StyleDimension(132f, 0.0f); + uiPanel.Height = new StyleDimension(180f, 0.0f); + uiPanel.HAlign = 0.0f; + uiPanel.VAlign = 0.5f; + uiPanel.Append((UIElement) slider); + uiPanel.OnUpdate += new UIElement.ElementEvent(CreativePowersHelper.UpdateUseMouseInterface); + UIText uiText1 = new UIText(Language.GetText("CreativePowers.WeatherMonsoon")); + uiText1.HAlign = 1f; + uiText1.VAlign = 0.0f; + uiPanel.Append((UIElement) uiText1); + UIText uiText2 = new UIText(Language.GetText("CreativePowers.WeatherClearSky")); + uiText2.HAlign = 1f; + uiText2.VAlign = 1f; + uiPanel.Append((UIElement) uiText2); + UIText uiText3 = new UIText(Language.GetText("CreativePowers.WeatherDrizzle")); + uiText3.HAlign = 1f; + uiText3.VAlign = 0.5f; + uiPanel.Append((UIElement) uiText3); + return (UIElement) uiPanel; + } + + private void UpdateSliderAndShowMultiplierMouseOver(UIElement affectedElement) + { + if (!affectedElement.IsMouseHovering) + return; + string originalText = Main.maxRaining.ToString("P0"); + CreativePowersHelper.AddPermissionTextIfNeeded((ICreativePower) this, ref originalText); + Main.instance.MouseTextNoOverride(originalText); + } + } + + public class FreezeTime : CreativePowers.ASharedTogglePower, IPersistentPerWorldContent + { + internal override void CustomizeButton(UIElement button) => button.Append((UIElement) CreativePowersHelper.GetIconImage(CreativePowersHelper.CreativePowerIconLocations.FreezeTime)); + + internal override string GetButtonTextKey() => "CreativePowers.FreezeTime"; + + public override bool GetIsUnlocked() => true; + + public void Save(BinaryWriter writer) => writer.Write(this.Enabled); + + public void Load(BinaryReader reader, int gameVersionSaveWasMadeOn) => this.SetPowerInfo(reader.ReadBoolean()); + + public void ValidateWorld(BinaryReader reader, int gameVersionSaveWasMadeOn) => reader.ReadBoolean(); + } + + public class FreezeWindDirectionAndStrength : + CreativePowers.ASharedTogglePower, + IPersistentPerWorldContent + { + internal override void CustomizeButton(UIElement button) => button.Append((UIElement) CreativePowersHelper.GetIconImage(CreativePowersHelper.CreativePowerIconLocations.WindFreeze)); + + internal override string GetButtonTextKey() => "CreativePowers.FreezeWindDirectionAndStrength"; + + public override bool GetIsUnlocked() => true; + + public void Save(BinaryWriter writer) => writer.Write(this.Enabled); + + public void Load(BinaryReader reader, int gameVersionSaveWasMadeOn) => this.SetPowerInfo(reader.ReadBoolean()); + + public void ValidateWorld(BinaryReader reader, int gameVersionSaveWasMadeOn) => reader.ReadBoolean(); + } + + public class FreezeRainPower : CreativePowers.ASharedTogglePower, IPersistentPerWorldContent + { + internal override void CustomizeButton(UIElement button) => button.Append((UIElement) CreativePowersHelper.GetIconImage(CreativePowersHelper.CreativePowerIconLocations.RainFreeze)); + + internal override string GetButtonTextKey() => "CreativePowers.FreezeRainPower"; + + public override bool GetIsUnlocked() => true; + + public void Save(BinaryWriter writer) => writer.Write(this.Enabled); + + public void Load(BinaryReader reader, int gameVersionSaveWasMadeOn) => this.SetPowerInfo(reader.ReadBoolean()); + + public void ValidateWorld(BinaryReader reader, int gameVersionSaveWasMadeOn) => reader.ReadBoolean(); + } + + public class StopBiomeSpreadPower : CreativePowers.ASharedTogglePower, IPersistentPerWorldContent + { + internal override void CustomizeButton(UIElement button) => button.Append((UIElement) CreativePowersHelper.GetIconImage(CreativePowersHelper.CreativePowerIconLocations.StopBiomeSpread)); + + internal override string GetButtonTextKey() => "CreativePowers.StopBiomeSpread"; + + public override bool GetIsUnlocked() => true; + + public void Save(BinaryWriter writer) => writer.Write(this.Enabled); + + public void Load(BinaryReader reader, int gameVersionSaveWasMadeOn) => this.SetPowerInfo(reader.ReadBoolean()); + + public void ValidateWorld(BinaryReader reader, int gameVersionSaveWasMadeOn) => reader.ReadBoolean(); + } + + public class SpawnRateSliderPerPlayerPower : + CreativePowers.APerPlayerSliderPower, + IPersistentPerPlayerContent + { + public float StrengthMultiplierToGiveNPCs { get; private set; } + + public SpawnRateSliderPerPlayerPower() + { + this._powerNameKey = "CreativePowers.NPCSpawnRateSlider"; + this._sliderDefaultValue = 0.5f; + this._iconLocation = CreativePowersHelper.CreativePowerIconLocations.EnemySpawnRate; + } + + public bool GetShouldDisableSpawnsFor(int playerIndex) => this._cachePerPlayer.IndexInRange(playerIndex) && (double) this._cachePerPlayer[playerIndex] == 0.0; + + internal override void UpdateInfoFromSliderValueCache() + { + } + + public override float RemapSliderValueToPowerValue(float sliderValue) => (double) sliderValue < 0.5 ? Utils.Remap(sliderValue, 0.0f, 0.5f, 0.1f, 1f) : Utils.Remap(sliderValue, 0.5f, 1f, 1f, 10f); + + public override UIElement ProvideSlider() + { + UIVerticalSlider slider = CreativePowersHelper.CreateSlider(new Func(((CreativePowers.APerPlayerSliderPower) this).GetSliderValue), new Action(((CreativePowers.APerPlayerSliderPower) this).SetValueKeyboard), new Action(((CreativePowers.APerPlayerSliderPower) this).SetValueGamepad)); + slider.OnUpdate += new UIElement.ElementEvent(this.UpdateSliderAndShowMultiplierMouseOver); + UIPanel uiPanel = new UIPanel(); + uiPanel.Width = new StyleDimension(77f, 0.0f); + uiPanel.Height = new StyleDimension(180f, 0.0f); + uiPanel.HAlign = 0.0f; + uiPanel.VAlign = 0.5f; + uiPanel.Append((UIElement) slider); + uiPanel.OnUpdate += new UIElement.ElementEvent(CreativePowersHelper.UpdateUseMouseInterface); + UIText uiText1 = new UIText("x10"); + uiText1.HAlign = 1f; + uiText1.VAlign = 0.0f; + uiPanel.Append((UIElement) uiText1); + UIText uiText2 = new UIText("x1"); + uiText2.HAlign = 1f; + uiText2.VAlign = 0.5f; + uiPanel.Append((UIElement) uiText2); + UIText uiText3 = new UIText("x0"); + uiText3.HAlign = 1f; + uiText3.VAlign = 1f; + uiPanel.Append((UIElement) uiText3); + return (UIElement) uiPanel; + } + + private void UpdateSliderAndShowMultiplierMouseOver(UIElement affectedElement) + { + if (!affectedElement.IsMouseHovering) + return; + string originalText = "x" + this.RemapSliderValueToPowerValue(this.GetSliderValue()).ToString("F2"); + if (this.GetShouldDisableSpawnsFor(Main.myPlayer)) + originalText = Language.GetTextValue(this._powerNameKey + "EnemySpawnsDisabled"); + CreativePowersHelper.AddPermissionTextIfNeeded((ICreativePower) this, ref originalText); + Main.instance.MouseTextNoOverride(originalText); + } + + public override bool GetIsUnlocked() => true; + + public void Save(Player player, BinaryWriter writer) + { + float num = this._cachePerPlayer[player.whoAmI]; + writer.Write(num); + } + + public void ResetDataForNewPlayer(Player player) => player.savedPerPlayerFieldsThatArentInThePlayerClass.spawnRatePowerSliderValue = this._sliderDefaultValue; + + public void Load(Player player, BinaryReader reader, int gameVersionSaveWasMadeOn) + { + float num = reader.ReadSingle(); + player.savedPerPlayerFieldsThatArentInThePlayerClass.spawnRatePowerSliderValue = num; + } + + public void ApplyLoadedDataToOutOfPlayerFields(Player player) => this.PushChangeAndSetSlider(player.savedPerPlayerFieldsThatArentInThePlayerClass.spawnRatePowerSliderValue); + } + } +} diff --git a/GameContent/Creative/CreativePowersHelper.cs b/GameContent/Creative/CreativePowersHelper.cs new file mode 100644 index 0000000..84fe7ec --- /dev/null +++ b/GameContent/Creative/CreativePowersHelper.cs @@ -0,0 +1,195 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Creative.CreativePowersHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.GameContent.UI.Elements; +using Terraria.ID; +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.GameContent.Creative +{ + public class CreativePowersHelper + { + public const int TextureIconColumns = 21; + public const int TextureIconRows = 1; + public static Color CommonSelectedColor = new Color(152, 175, 235); + + private static Asset GetPowerIconAsset(string path) => Main.Assets.Request(path, (AssetRequestMode) 1); + + public static UIImageFramed GetIconImage(Point iconLocation) + { + Asset powerIconAsset = CreativePowersHelper.GetPowerIconAsset("Images/UI/Creative/Infinite_Powers"); + UIImageFramed uiImageFramed = new UIImageFramed(powerIconAsset, powerIconAsset.Frame(21, frameX: iconLocation.X, frameY: iconLocation.Y)); + uiImageFramed.MarginLeft = 4f; + uiImageFramed.MarginTop = 4f; + uiImageFramed.VAlign = 0.5f; + uiImageFramed.HAlign = 1f; + uiImageFramed.IgnoresMouseInteraction = true; + return uiImageFramed; + } + + public static GroupOptionButton CreateToggleButton( + CreativePowerUIElementRequestInfo info) + { + GroupOptionButton groupOptionButton = new GroupOptionButton(true, (LocalizedText) null, (LocalizedText) null, Color.White, (string) null, 0.8f); + groupOptionButton.Width = new StyleDimension((float) info.PreferredButtonWidth, 0.0f); + groupOptionButton.Height = new StyleDimension((float) info.PreferredButtonHeight, 0.0f); + groupOptionButton.ShowHighlightWhenSelected = false; + groupOptionButton.SetCurrentOption(false); + groupOptionButton.SetColorsBasedOnSelectionState(new Color(152, 175, 235), Colors.InventoryDefaultColor, 1f, 0.7f); + groupOptionButton.SetColorsBasedOnSelectionState(Main.OurFavoriteColor, Colors.InventoryDefaultColor, 1f, 0.7f); + return groupOptionButton; + } + + public static GroupOptionButton CreateSimpleButton( + CreativePowerUIElementRequestInfo info) + { + GroupOptionButton groupOptionButton = new GroupOptionButton(true, (LocalizedText) null, (LocalizedText) null, Color.White, (string) null, 0.8f); + groupOptionButton.Width = new StyleDimension((float) info.PreferredButtonWidth, 0.0f); + groupOptionButton.Height = new StyleDimension((float) info.PreferredButtonHeight, 0.0f); + groupOptionButton.ShowHighlightWhenSelected = false; + groupOptionButton.SetCurrentOption(false); + groupOptionButton.SetColorsBasedOnSelectionState(new Color(152, 175, 235), Colors.InventoryDefaultColor, 1f, 0.7f); + return groupOptionButton; + } + + public static GroupOptionButton CreateCategoryButton( + CreativePowerUIElementRequestInfo info, + T option, + T currentOption) + where T : IConvertible, IEquatable + { + GroupOptionButton groupOptionButton = new GroupOptionButton(option, (LocalizedText) null, (LocalizedText) null, Color.White, (string) null, 0.8f); + groupOptionButton.Width = new StyleDimension((float) info.PreferredButtonWidth, 0.0f); + groupOptionButton.Height = new StyleDimension((float) info.PreferredButtonHeight, 0.0f); + groupOptionButton.ShowHighlightWhenSelected = false; + groupOptionButton.SetCurrentOption(currentOption); + groupOptionButton.SetColorsBasedOnSelectionState(new Color(152, 175, 235), Colors.InventoryDefaultColor, 1f, 0.7f); + return groupOptionButton; + } + + public static void AddPermissionTextIfNeeded(ICreativePower power, ref string originalText) + { + if (CreativePowersHelper.IsAvailableForPlayer(power, Main.myPlayer)) + return; + string textValue = Language.GetTextValue("CreativePowers.CantUsePowerBecauseOfNoPermissionFromServer"); + originalText = originalText + "\n" + textValue; + } + + public static void AddDescriptionIfNeeded(ref string originalText, string descriptionKey) + { + if (!CreativePowerSettings.ShouldPowersBeElaborated) + return; + string textValue = Language.GetTextValue(descriptionKey); + originalText = originalText + "\n" + textValue; + } + + public static void AddUnlockTextIfNeeded( + ref string originalText, + bool needed, + string descriptionKey) + { + if (needed) + return; + string textValue = Language.GetTextValue(descriptionKey); + originalText = originalText + "\n" + textValue; + } + + public static UIVerticalSlider CreateSlider( + Func GetSliderValueMethod, + Action SetValueKeyboardMethod, + Action SetValueGamepadMethod) + { + UIVerticalSlider uiVerticalSlider = new UIVerticalSlider(GetSliderValueMethod, SetValueKeyboardMethod, SetValueGamepadMethod, Color.Red); + uiVerticalSlider.Width = new StyleDimension(12f, 0.0f); + uiVerticalSlider.Height = new StyleDimension(-10f, 1f); + uiVerticalSlider.Left = new StyleDimension(6f, 0.0f); + uiVerticalSlider.HAlign = 0.0f; + uiVerticalSlider.VAlign = 0.5f; + uiVerticalSlider.EmptyColor = Color.OrangeRed; + uiVerticalSlider.FilledColor = Color.CornflowerBlue; + return uiVerticalSlider; + } + + public static void UpdateUseMouseInterface(UIElement affectedElement) + { + if (!affectedElement.IsMouseHovering) + return; + Main.LocalPlayer.mouseInterface = true; + } + + public static void UpdateUnlockStateByPower( + ICreativePower power, + UIElement button, + Color colorWhenSelected) + { + IGroupOptionButton asButton = button as IGroupOptionButton; + if (asButton == null) + return; + button.OnUpdate += (UIElement.ElementEvent) (element => CreativePowersHelper.UpdateUnlockStateByPowerInternal(power, colorWhenSelected, asButton)); + } + + public static bool IsAvailableForPlayer(ICreativePower power, int playerIndex) + { + switch (power.CurrentPermissionLevel) + { + case PowerPermissionLevel.CanBeChangedByHostAlone: + return Main.netMode == 0 || Main.countsAsHostForGameplay[playerIndex]; + case PowerPermissionLevel.CanBeChangedByEveryone: + return true; + default: + return false; + } + } + + private static void UpdateUnlockStateByPowerInternal( + ICreativePower power, + Color colorWhenSelected, + IGroupOptionButton asButton) + { + bool isUnlocked = power.GetIsUnlocked(); + bool flag = !CreativePowersHelper.IsAvailableForPlayer(power, Main.myPlayer); + asButton.SetBorderColor(flag ? Color.DimGray : Color.White); + if (flag) + asButton.SetColorsBasedOnSelectionState(new Color(60, 60, 60), new Color(60, 60, 60), 0.7f, 0.7f); + else if (isUnlocked) + asButton.SetColorsBasedOnSelectionState(colorWhenSelected, Colors.InventoryDefaultColor, 1f, 0.7f); + else + asButton.SetColorsBasedOnSelectionState(Color.Crimson, Color.Red, 0.7f, 0.7f); + } + + public class CreativePowerIconLocations + { + public static readonly Point Unassigned = new Point(0, 0); + public static readonly Point Deprecated = new Point(0, 0); + public static readonly Point ItemDuplication = new Point(0, 0); + public static readonly Point ItemResearch = new Point(1, 0); + public static readonly Point TimeCategory = new Point(2, 0); + public static readonly Point WeatherCategory = new Point(3, 0); + public static readonly Point EnemyStrengthSlider = new Point(4, 0); + public static readonly Point GameEvents = new Point(5, 0); + public static readonly Point Godmode = new Point(6, 0); + public static readonly Point BlockPlacementRange = new Point(7, 0); + public static readonly Point StopBiomeSpread = new Point(8, 0); + public static readonly Point EnemySpawnRate = new Point(9, 0); + public static readonly Point FreezeTime = new Point(10, 0); + public static readonly Point TimeDawn = new Point(11, 0); + public static readonly Point TimeNoon = new Point(12, 0); + public static readonly Point TimeDusk = new Point(13, 0); + public static readonly Point TimeMidnight = new Point(14, 0); + public static readonly Point WindDirection = new Point(15, 0); + public static readonly Point WindFreeze = new Point(16, 0); + public static readonly Point RainStrength = new Point(17, 0); + public static readonly Point RainFreeze = new Point(18, 0); + public static readonly Point ModifyTime = new Point(19, 0); + public static readonly Point PersonalCategory = new Point(20, 0); + } + } +} diff --git a/GameContent/Creative/CreativeUI.cs b/GameContent/Creative/CreativeUI.cs new file mode 100644 index 0000000..6b05196 --- /dev/null +++ b/GameContent/Creative/CreativeUI.cs @@ -0,0 +1,236 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Creative.CreativeUI +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using System.Collections.Generic; +using Terraria.Audio; +using Terraria.GameContent.NetModules; +using Terraria.GameContent.UI.Elements; +using Terraria.GameContent.UI.States; +using Terraria.Localization; +using Terraria.Net; +using Terraria.UI; +using Terraria.UI.Gamepad; + +namespace Terraria.GameContent.Creative +{ + public class CreativeUI + { + public const int ItemSlotIndexes_SacrificeItem = 0; + public const int ItemSlotIndexes_Count = 1; + private bool _initialized; + private Asset _buttonTexture; + private Asset _buttonBorderTexture; + private Item[] _itemSlotsForUI = new Item[1]; + private List _itemIdsAvailableInfinitely = new List(); + private UserInterface _powersUI = new UserInterface(); + public int GamepadPointIdForInfiniteItemSearchHack = -1; + public bool GamepadMoveToSearchButtonHack; + private UICreativePowersMenu _uiState; + + public bool Enabled { get; private set; } + + public bool Blocked => Main.LocalPlayer.talkNPC != -1 || Main.LocalPlayer.chest != -1; + + public CreativeUI() + { + for (int index = 0; index < this._itemSlotsForUI.Length; ++index) + this._itemSlotsForUI[index] = new Item(); + } + + public void Initialize() + { + this._buttonTexture = Main.Assets.Request("Images/UI/Creative/Journey_Toggle", (AssetRequestMode) 1); + this._buttonBorderTexture = Main.Assets.Request("Images/UI/Creative/Journey_Toggle_MouseOver", (AssetRequestMode) 1); + this._itemIdsAvailableInfinitely.Clear(); + this._uiState = new UICreativePowersMenu(); + this._powersUI.SetState((UIState) this._uiState); + this._initialized = true; + } + + public void Update(GameTime gameTime) + { + if (!this.Enabled || !Main.playerInventory) + return; + this._powersUI.Update(gameTime); + } + + public void Draw(SpriteBatch spriteBatch) + { + if (!this._initialized) + this.Initialize(); + if (Main.LocalPlayer.difficulty != (byte) 3) + { + this.Enabled = false; + } + else + { + if (this.Blocked) + return; + Vector2 location = new Vector2(28f, 267f); + Vector2 vector2_1 = new Vector2(353f, 258f); + Vector2 vector2_2 = new Vector2(40f, 267f); + Vector2 vector2_3 = new Vector2(50f, 50f); + Vector2 vector2_4 = vector2_1 + vector2_3; + if (Main.screenHeight < 650 && this.Enabled) + location.X += 52f * Main.inventoryScale; + this.DrawToggleButton(spriteBatch, location); + if (!this.Enabled) + return; + this._powersUI.Draw(spriteBatch, Main.gameTimeCache); + } + } + + public UIElement ProvideItemSlotElement(int itemSlotContext) => itemSlotContext != 0 ? (UIElement) null : (UIElement) new UIItemSlot(this._itemSlotsForUI, itemSlotContext, 30); + + public Item GetItemByIndex(int itemSlotContext) => itemSlotContext != 0 ? (Item) null : this._itemSlotsForUI[itemSlotContext]; + + public void SetItembyIndex(Item item, int itemSlotContext) + { + if (itemSlotContext != 0) + return; + this._itemSlotsForUI[itemSlotContext] = item; + } + + private void DrawToggleButton(SpriteBatch spritebatch, Vector2 location) + { + Vector2 size = this._buttonTexture.Size(); + Rectangle rectangle = Utils.CenteredRectangle(location + size / 2f, size); + UILinkPointNavigator.SetPosition(311, rectangle.Center.ToVector2()); + spritebatch.Draw(this._buttonTexture.Value, location, new Rectangle?(), Color.White, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + Main.LocalPlayer.creativeInterface = false; + if (!rectangle.Contains(Main.MouseScreen.ToPoint())) + return; + Main.LocalPlayer.creativeInterface = true; + Main.LocalPlayer.mouseInterface = true; + if (this.Enabled) + Main.instance.MouseText(Language.GetTextValue("CreativePowers.PowersMenuOpen")); + else + Main.instance.MouseText(Language.GetTextValue("CreativePowers.PowersMenuClosed")); + spritebatch.Draw(this._buttonBorderTexture.Value, location, new Rectangle?(), Color.White, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + if (!Main.mouseLeft || !Main.mouseLeftRelease) + return; + this.ToggleMenu(); + } + + public void SwapItem(ref Item item) => Utils.Swap(ref item, ref this._itemSlotsForUI[0]); + + public void CloseMenu() + { + this.Enabled = false; + if (this._itemSlotsForUI[0].stack <= 0) + return; + this._itemSlotsForUI[0] = Main.LocalPlayer.GetItem(Main.myPlayer, this._itemSlotsForUI[0], GetItemSettings.InventoryUIToInventorySettings); + } + + public void ToggleMenu() + { + this.Enabled = !this.Enabled; + SoundEngine.PlaySound(12); + if (this.Enabled) + { + Recipe.FindRecipes(); + Main.LocalPlayer.tileEntityAnchor.Clear(); + this.RefreshAvailableInfiniteItemsList(); + } + else + { + if (this._itemSlotsForUI[0].stack <= 0) + return; + this._itemSlotsForUI[0] = Main.LocalPlayer.GetItem(Main.myPlayer, this._itemSlotsForUI[0], GetItemSettings.InventoryUIToInventorySettings); + } + } + + public bool IsShowingResearchMenu() => this.Enabled && this._uiState != null && this._uiState.IsShowingResearchMenu; + + public bool ShouldDrawSacrificeArea() + { + if (!this._itemSlotsForUI[0].IsAir) + return true; + Item mouseItem = Main.mouseItem; + int amountNeeded; + return !mouseItem.IsAir && CreativeItemSacrificesCatalog.Instance.TryGetSacrificeCountCapToUnlockInfiniteItems(mouseItem.type, out amountNeeded) && Main.LocalPlayerCreativeTracker.ItemSacrifices.GetSacrificeCount(mouseItem.type) < amountNeeded; + } + + public bool GetSacrificeNumbers( + out int itemIdChecked, + out int amountWeHave, + out int amountNeededTotal) + { + amountWeHave = 0; + amountNeededTotal = 0; + itemIdChecked = 0; + Item obj = this._itemSlotsForUI[0]; + if (!obj.IsAir) + itemIdChecked = obj.type; + if (!CreativeItemSacrificesCatalog.Instance.TryGetSacrificeCountCapToUnlockInfiniteItems(obj.type, out amountNeededTotal)) + return false; + Main.LocalPlayerCreativeTracker.ItemSacrifices.SacrificesCountByItemIdCache.TryGetValue(obj.type, out amountWeHave); + return true; + } + + public CreativeUI.ItemSacrificeResult SacrificeItem(out int amountWeSacrificed) + { + int amountNeeded = 0; + amountWeSacrificed = 0; + Item newItem = this._itemSlotsForUI[0]; + if (!CreativeItemSacrificesCatalog.Instance.TryGetSacrificeCountCapToUnlockInfiniteItems(newItem.type, out amountNeeded)) + return CreativeUI.ItemSacrificeResult.CannotSacrifice; + int num1 = 0; + Main.LocalPlayerCreativeTracker.ItemSacrifices.SacrificesCountByItemIdCache.TryGetValue(newItem.type, out num1); + int val1 = Utils.Clamp(amountNeeded - num1, 0, amountNeeded); + if (val1 == 0) + return CreativeUI.ItemSacrificeResult.CannotSacrifice; + int amount = Math.Min(val1, newItem.stack); + if (!Main.ServerSideCharacter) + { + Main.LocalPlayerCreativeTracker.ItemSacrifices.RegisterItemSacrifice(newItem.type, amount); + } + else + { + NetPacket packet = NetCreativeUnlocksPlayerReportModule.SerializeSacrificeRequest(newItem.type, amount); + NetManager.Instance.SendToServerOrLoopback(packet); + } + int num2 = amount == val1 ? 1 : 0; + newItem.stack -= amount; + if (newItem.stack <= 0) + newItem.TurnToAir(); + amountWeSacrificed = amount; + this.RefreshAvailableInfiniteItemsList(); + if (newItem.stack > 0) + { + newItem.position.X = Main.player[Main.myPlayer].Center.X - (float) (newItem.width / 2); + newItem.position.Y = Main.player[Main.myPlayer].Center.Y - (float) (newItem.height / 2); + this._itemSlotsForUI[0] = Main.LocalPlayer.GetItem(Main.myPlayer, newItem, GetItemSettings.InventoryUIToInventorySettings); + } + return num2 == 0 ? CreativeUI.ItemSacrificeResult.SacrificedButNotDone : CreativeUI.ItemSacrificeResult.SacrificedAndDone; + } + + private void RefreshAvailableInfiniteItemsList() + { + this._itemIdsAvailableInfinitely.Clear(); + CreativeItemSacrificesCatalog.Instance.FillListOfItemsThatCanBeObtainedInfinitely(this._itemIdsAvailableInfinitely); + } + + public void Reset() + { + for (int index = 0; index < this._itemSlotsForUI.Length; ++index) + this._itemSlotsForUI[index].TurnToAir(); + this._initialized = false; + this.Enabled = false; + } + + public enum ItemSacrificeResult + { + CannotSacrifice, + SacrificedButNotDone, + SacrificedAndDone, + } + } +} diff --git a/GameContent/Creative/CreativeUnlocksTracker.cs b/GameContent/Creative/CreativeUnlocksTracker.cs new file mode 100644 index 0000000..990c77e --- /dev/null +++ b/GameContent/Creative/CreativeUnlocksTracker.cs @@ -0,0 +1,25 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Creative.CreativeUnlocksTracker +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; + +namespace Terraria.GameContent.Creative +{ + public class CreativeUnlocksTracker : IPersistentPerWorldContent, IOnPlayerJoining + { + public ItemsSacrificedUnlocksTracker ItemSacrifices = new ItemsSacrificedUnlocksTracker(); + + public void Save(BinaryWriter writer) => this.ItemSacrifices.Save(writer); + + public void Load(BinaryReader reader, int gameVersionSaveWasMadeOn) => this.ItemSacrifices.Load(reader, gameVersionSaveWasMadeOn); + + public void ValidateWorld(BinaryReader reader, int gameVersionSaveWasMadeOn) => this.ValidateWorld(reader, gameVersionSaveWasMadeOn); + + public void Reset() => this.ItemSacrifices.Reset(); + + public void OnPlayerJoining(int playerIndex) => this.ItemSacrifices.OnPlayerJoining(playerIndex); + } +} diff --git a/GameContent/Creative/ICreativeItemSortStep.cs b/GameContent/Creative/ICreativeItemSortStep.cs new file mode 100644 index 0000000..72e3a6b --- /dev/null +++ b/GameContent/Creative/ICreativeItemSortStep.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Creative.ICreativeItemSortStep +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using Terraria.DataStructures; + +namespace Terraria.GameContent.Creative +{ + public interface ICreativeItemSortStep : IEntrySortStep, IComparer + { + } +} diff --git a/GameContent/Creative/ICreativePower.cs b/GameContent/Creative/ICreativePower.cs new file mode 100644 index 0000000..3fca4cd --- /dev/null +++ b/GameContent/Creative/ICreativePower.cs @@ -0,0 +1,29 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Creative.ICreativePower +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using System.IO; +using Terraria.UI; + +namespace Terraria.GameContent.Creative +{ + public interface ICreativePower + { + ushort PowerId { get; set; } + + string ServerConfigName { get; set; } + + PowerPermissionLevel CurrentPermissionLevel { get; set; } + + PowerPermissionLevel DefaultPermissionLevel { get; set; } + + void DeserializeNetMessage(BinaryReader reader, int userId); + + void ProvidePowerButtons(CreativePowerUIElementRequestInfo info, List elements); + + bool GetIsUnlocked(); + } +} diff --git a/GameContent/Creative/IItemEntryFilter.cs b/GameContent/Creative/IItemEntryFilter.cs new file mode 100644 index 0000000..64d83c2 --- /dev/null +++ b/GameContent/Creative/IItemEntryFilter.cs @@ -0,0 +1,14 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Creative.IItemEntryFilter +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.DataStructures; + +namespace Terraria.GameContent.Creative +{ + public interface IItemEntryFilter : IEntryFilter + { + } +} diff --git a/GameContent/Creative/IPowerSubcategoryElement.cs b/GameContent/Creative/IPowerSubcategoryElement.cs new file mode 100644 index 0000000..918bffb --- /dev/null +++ b/GameContent/Creative/IPowerSubcategoryElement.cs @@ -0,0 +1,18 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Creative.IPowerSubcategoryElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.GameContent.UI.Elements; + +namespace Terraria.GameContent.Creative +{ + public interface IPowerSubcategoryElement + { + GroupOptionButton GetOptionButton( + CreativePowerUIElementRequestInfo info, + int optionIndex, + int currentOptionIndex); + } +} diff --git a/GameContent/Creative/IProvideSliderElement.cs b/GameContent/Creative/IProvideSliderElement.cs new file mode 100644 index 0000000..461b66f --- /dev/null +++ b/GameContent/Creative/IProvideSliderElement.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Creative.IProvideSliderElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.UI; + +namespace Terraria.GameContent.Creative +{ + public interface IProvideSliderElement : IPowerSubcategoryElement + { + UIElement ProvideSlider(); + } +} diff --git a/GameContent/Creative/ItemFilters.cs b/GameContent/Creative/ItemFilters.cs new file mode 100644 index 0000000..f460ce8 --- /dev/null +++ b/GameContent/Creative/ItemFilters.cs @@ -0,0 +1,179 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Creative.ItemFilters +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.DataStructures; +using Terraria.GameContent.UI.Elements; +using Terraria.ID; +using Terraria.UI; + +namespace Terraria.GameContent.Creative +{ + public static class ItemFilters + { + private const int framesPerRow = 9; + private const int framesPerColumn = 1; + private const int frameSizeOffsetX = -2; + private const int frameSizeOffsetY = 0; + + public class BySearch : IItemEntryFilter, IEntryFilter, ISearchFilter + { + private const int _tooltipMaxLines = 30; + private string[] _toolTipLines = new string[30]; + private bool[] _unusedPrefixLine = new bool[30]; + private bool[] _unusedBadPrefixLines = new bool[30]; + private int _unusedYoyoLogo; + private int _unusedResearchLine; + private string _search; + + public bool FitsFilter(Item entry) + { + if (this._search == null) + return true; + int numLines = 1; + float knockBack = entry.knockBack; + Main.MouseText_DrawItemTooltip_GetLinesInfo(entry, ref this._unusedYoyoLogo, ref this._unusedResearchLine, knockBack, ref numLines, this._toolTipLines, this._unusedPrefixLine, this._unusedBadPrefixLines); + for (int index = 0; index < numLines; ++index) + { + if (this._toolTipLines[index].ToLower().IndexOf(this._search, StringComparison.OrdinalIgnoreCase) != -1) + return true; + } + return false; + } + + public string GetDisplayNameKey() => "CreativePowers.TabSearch"; + + public UIElement GetImage() + { + Asset asset = Main.Assets.Request("Images/UI/Bestiary/Icon_Rank_Light", (AssetRequestMode) 1); + UIImageFramed uiImageFramed = new UIImageFramed(asset, asset.Frame()); + uiImageFramed.HAlign = 0.5f; + uiImageFramed.VAlign = 0.5f; + return (UIElement) uiImageFramed; + } + + public void SetSearch(string searchText) => this._search = searchText; + } + + public class BuildingBlock : IItemEntryFilter, IEntryFilter + { + public bool FitsFilter(Item entry) => entry.createTile != -1 || entry.createWall != -1 || entry.tileWand != -1; + + public string GetDisplayNameKey() => "CreativePowers.TabBlocks"; + + public UIElement GetImage() + { + Asset asset = Main.Assets.Request("Images/UI/Creative/Infinite_Icons", (AssetRequestMode) 1); + UIImageFramed uiImageFramed = new UIImageFramed(asset, asset.Frame(9, frameX: 4).OffsetSize(-2, 0)); + uiImageFramed.HAlign = 0.5f; + uiImageFramed.VAlign = 0.5f; + return (UIElement) uiImageFramed; + } + } + + public class Weapon : IItemEntryFilter, IEntryFilter + { + public bool FitsFilter(Item entry) => entry.damage > 0; + + public string GetDisplayNameKey() => "CreativePowers.TabWeapons"; + + public UIElement GetImage() + { + Asset asset = Main.Assets.Request("Images/UI/Creative/Infinite_Icons", (AssetRequestMode) 1); + UIImageFramed uiImageFramed = new UIImageFramed(asset, asset.Frame(9).OffsetSize(-2, 0)); + uiImageFramed.HAlign = 0.5f; + uiImageFramed.VAlign = 0.5f; + return (UIElement) uiImageFramed; + } + } + + public class Armor : IItemEntryFilter, IEntryFilter + { + public bool FitsFilter(Item entry) => entry.bodySlot != -1 || entry.headSlot != -1 || entry.legSlot != -1; + + public string GetDisplayNameKey() => "CreativePowers.TabArmor"; + + public UIElement GetImage() + { + Asset asset = Main.Assets.Request("Images/UI/Creative/Infinite_Icons", (AssetRequestMode) 1); + UIImageFramed uiImageFramed = new UIImageFramed(asset, asset.Frame(9, frameX: 2).OffsetSize(-2, 0)); + uiImageFramed.HAlign = 0.5f; + uiImageFramed.VAlign = 0.5f; + return (UIElement) uiImageFramed; + } + } + + public class Accessories : IItemEntryFilter, IEntryFilter + { + public bool FitsFilter(Item entry) => entry.accessory; + + public string GetDisplayNameKey() => "CreativePowers.TabAccessories"; + + public UIElement GetImage() + { + Asset asset = Main.Assets.Request("Images/UI/Creative/Infinite_Icons", (AssetRequestMode) 1); + UIImageFramed uiImageFramed = new UIImageFramed(asset, asset.Frame(9, frameX: 1).OffsetSize(-2, 0)); + uiImageFramed.HAlign = 0.5f; + uiImageFramed.VAlign = 0.5f; + return (UIElement) uiImageFramed; + } + } + + public class Consumables : IItemEntryFilter, IEntryFilter + { + public bool FitsFilter(Item entry) + { + bool flag = entry.createTile != -1 || entry.createWall != -1 || entry.tileWand != -1; + return entry.consumable && !flag; + } + + public string GetDisplayNameKey() => "CreativePowers.TabConsumables"; + + public UIElement GetImage() + { + Asset asset = Main.Assets.Request("Images/UI/Creative/Infinite_Icons", (AssetRequestMode) 1); + UIImageFramed uiImageFramed = new UIImageFramed(asset, asset.Frame(9, frameX: 3).OffsetSize(-2, 0)); + uiImageFramed.HAlign = 0.5f; + uiImageFramed.VAlign = 0.5f; + return (UIElement) uiImageFramed; + } + } + + public class GameplayItems : IItemEntryFilter, IEntryFilter + { + public bool FitsFilter(Item entry) => ItemID.Sets.SortingPriorityBossSpawns[entry.type] != -1; + + public string GetDisplayNameKey() => "CreativePowers.TabMisc"; + + public UIElement GetImage() + { + Asset asset = Main.Assets.Request("Images/UI/Creative/Infinite_Icons", (AssetRequestMode) 1); + UIImageFramed uiImageFramed = new UIImageFramed(asset, asset.Frame(9, frameX: 5).OffsetSize(-2, 0)); + uiImageFramed.HAlign = 0.5f; + uiImageFramed.VAlign = 0.5f; + return (UIElement) uiImageFramed; + } + } + + public class Materials : IItemEntryFilter, IEntryFilter + { + public bool FitsFilter(Item entry) => entry.material; + + public string GetDisplayNameKey() => "CreativePowers.TabMaterials"; + + public UIElement GetImage() + { + Asset asset = Main.Assets.Request("Images/UI/Creative/Infinite_Icons", (AssetRequestMode) 1); + UIImageFramed uiImageFramed = new UIImageFramed(asset, asset.Frame(9, frameX: 6).OffsetSize(-2, 0)); + uiImageFramed.HAlign = 0.5f; + uiImageFramed.VAlign = 0.5f; + return (UIElement) uiImageFramed; + } + } + } +} diff --git a/GameContent/Creative/ItemsSacrificedUnlocksTracker.cs b/GameContent/Creative/ItemsSacrificedUnlocksTracker.cs new file mode 100644 index 0000000..ea9a849 --- /dev/null +++ b/GameContent/Creative/ItemsSacrificedUnlocksTracker.cs @@ -0,0 +1,107 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Creative.ItemsSacrificedUnlocksTracker +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using System.IO; +using Terraria.ID; + +namespace Terraria.GameContent.Creative +{ + public class ItemsSacrificedUnlocksTracker : IPersistentPerWorldContent, IOnPlayerJoining + { + public const int POSITIVE_SACRIFICE_COUNT_CAP = 9999; + private Dictionary _sacrificeCountByItemPersistentId; + public readonly Dictionary SacrificesCountByItemIdCache; + + public int LastEditId { get; private set; } + + public ItemsSacrificedUnlocksTracker() + { + this._sacrificeCountByItemPersistentId = new Dictionary(); + this.SacrificesCountByItemIdCache = new Dictionary(); + this.LastEditId = 0; + } + + public int GetSacrificeCount(int itemId) + { + int num; + this.SacrificesCountByItemIdCache.TryGetValue(itemId, out num); + return num; + } + + public void RegisterItemSacrifice(int itemId, int amount) + { + string key; + if (!ContentSamples.ItemPersistentIdsByNetIds.TryGetValue(itemId, out key)) + return; + int num1; + this._sacrificeCountByItemPersistentId.TryGetValue(key, out num1); + int num2 = Utils.Clamp(num1 + amount, 0, 9999); + this._sacrificeCountByItemPersistentId[key] = num2; + this.SacrificesCountByItemIdCache[itemId] = num2; + this.MarkContentsDirty(); + } + + public void SetSacrificeCountDirectly(string persistentId, int sacrificeCount) + { + int num = Utils.Clamp(sacrificeCount, 0, 9999); + this._sacrificeCountByItemPersistentId[persistentId] = num; + int key; + if (!ContentSamples.ItemNetIdsByPersistentIds.TryGetValue(persistentId, out key)) + return; + this.SacrificesCountByItemIdCache[key] = num; + this.MarkContentsDirty(); + } + + public void Save(BinaryWriter writer) + { + Dictionary dictionary = new Dictionary((IDictionary) this._sacrificeCountByItemPersistentId); + writer.Write(dictionary.Count); + foreach (KeyValuePair keyValuePair in dictionary) + { + writer.Write(keyValuePair.Key); + writer.Write(keyValuePair.Value); + } + } + + public void Load(BinaryReader reader, int gameVersionSaveWasMadeOn) + { + int num1 = reader.ReadInt32(); + for (int index = 0; index < num1; ++index) + { + string key1 = reader.ReadString(); + int num2 = reader.ReadInt32(); + this._sacrificeCountByItemPersistentId[key1] = num2; + int key2; + if (ContentSamples.ItemNetIdsByPersistentIds.TryGetValue(key1, out key2)) + this.SacrificesCountByItemIdCache[key2] = num2; + } + } + + public void ValidateWorld(BinaryReader reader, int gameVersionSaveWasMadeOn) + { + int num = reader.ReadInt32(); + for (int index = 0; index < num; ++index) + { + reader.ReadString(); + reader.ReadInt32(); + } + } + + public void Reset() + { + this._sacrificeCountByItemPersistentId.Clear(); + this.SacrificesCountByItemIdCache.Clear(); + this.MarkContentsDirty(); + } + + public void OnPlayerJoining(int playerIndex) + { + } + + public void MarkContentsDirty() => ++this.LastEditId; + } +} diff --git a/GameContent/Creative/PowerPermissionLevel.cs b/GameContent/Creative/PowerPermissionLevel.cs new file mode 100644 index 0000000..ecd0326 --- /dev/null +++ b/GameContent/Creative/PowerPermissionLevel.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Creative.PowerPermissionLevel +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Creative +{ + public enum PowerPermissionLevel + { + LockedForEveryone, + CanBeChangedByHostAlone, + CanBeChangedByEveryone, + } +} diff --git a/GameContent/Creative/SortingSteps.cs b/GameContent/Creative/SortingSteps.cs new file mode 100644 index 0000000..178d1c8 --- /dev/null +++ b/GameContent/Creative/SortingSteps.cs @@ -0,0 +1,87 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Creative.SortingSteps +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using Terraria.DataStructures; +using Terraria.ID; + +namespace Terraria.GameContent.Creative +{ + public static class SortingSteps + { + public abstract class ACreativeItemSortStep : + ICreativeItemSortStep, + IEntrySortStep, + IComparer, + IComparer + { + public abstract string GetDisplayNameKey(); + + public int Compare(int x, int y) => this.Compare(ContentSamples.ItemsByType[x], ContentSamples.ItemsByType[y]); + + public abstract int Compare(Item x, Item y); + } + + public abstract class AStepByFittingFilter : SortingSteps.ACreativeItemSortStep + { + public override int Compare(Item x, Item y) + { + int num = this.FitsFilter(x).CompareTo(this.FitsFilter(y)); + if (num == 0) + num = 1; + return num; + } + + public abstract bool FitsFilter(Item item); + + public virtual int CompareWhenBothFit(Item x, Item y) => string.Compare(x.Name, y.Name, StringComparison.OrdinalIgnoreCase); + } + + public class Blocks : SortingSteps.AStepByFittingFilter + { + public override string GetDisplayNameKey() => "CreativePowers.Sort_Blocks"; + + public override bool FitsFilter(Item item) => item.createTile >= 0 && !Main.tileFrameImportant[item.createTile]; + } + + public class Walls : SortingSteps.AStepByFittingFilter + { + public override string GetDisplayNameKey() => "CreativePowers.Sort_Walls"; + + public override bool FitsFilter(Item item) => item.createWall >= 0; + } + + public class PlacableObjects : SortingSteps.AStepByFittingFilter + { + public override string GetDisplayNameKey() => "CreativePowers.Sort_PlacableObjects"; + + public override bool FitsFilter(Item item) => item.createTile >= 0 && Main.tileFrameImportant[item.createTile]; + } + + public class ByCreativeSortingId : SortingSteps.ACreativeItemSortStep + { + public override string GetDisplayNameKey() => "CreativePowers.Sort_SortingID"; + + public override int Compare(Item x, Item y) + { + ContentSamples.CreativeHelper.ItemGroupAndOrderInGroup groupAndOrderInGroup1 = ContentSamples.ItemCreativeSortingId[x.type]; + ContentSamples.CreativeHelper.ItemGroupAndOrderInGroup groupAndOrderInGroup2 = ContentSamples.ItemCreativeSortingId[y.type]; + int num = groupAndOrderInGroup1.Group.CompareTo((object) groupAndOrderInGroup2.Group); + if (num == 0) + num = groupAndOrderInGroup1.OrderInGroup.CompareTo(groupAndOrderInGroup2.OrderInGroup); + return num; + } + } + + public class Alphabetical : SortingSteps.ACreativeItemSortStep + { + public override string GetDisplayNameKey() => "CreativePowers.Sort_Alphabetical"; + + public override int Compare(Item x, Item y) => x.Name.CompareTo(y.Name); + } + } +} diff --git a/GameContent/DoorOpeningHelper.cs b/GameContent/DoorOpeningHelper.cs new file mode 100644 index 0000000..06eb76f --- /dev/null +++ b/GameContent/DoorOpeningHelper.cs @@ -0,0 +1,352 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.DoorOpeningHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.GameInput; + +namespace Terraria.GameContent +{ + public class DoorOpeningHelper + { + public static DoorOpeningHelper.DoorAutoOpeningPreference PreferenceSettings = DoorOpeningHelper.DoorAutoOpeningPreference.EnabledForEverything; + private Dictionary _handlerByTileType = new Dictionary() + { + { + 10, + (DoorOpeningHelper.DoorAutoHandler) new DoorOpeningHelper.CommonDoorOpeningInfoProvider() + }, + { + 388, + (DoorOpeningHelper.DoorAutoHandler) new DoorOpeningHelper.TallGateOpeningInfoProvider() + } + }; + private List _ongoingOpenDoors = new List(); + private int _timeWeCanOpenDoorsUsingVelocityAlone; + + public void AllowOpeningDoorsByVelocityAloneForATime(int timeInFramesToAllow) => this._timeWeCanOpenDoorsUsingVelocityAlone = timeInFramesToAllow; + + public void Update(Player player) + { + this.LookForDoorsToClose(player); + if (this.ShouldTryOpeningDoors()) + this.LookForDoorsToOpen(player); + if (this._timeWeCanOpenDoorsUsingVelocityAlone <= 0) + return; + --this._timeWeCanOpenDoorsUsingVelocityAlone; + } + + private bool ShouldTryOpeningDoors() + { + switch (DoorOpeningHelper.PreferenceSettings) + { + case DoorOpeningHelper.DoorAutoOpeningPreference.EnabledForGamepadOnly: + return PlayerInput.UsingGamepad; + case DoorOpeningHelper.DoorAutoOpeningPreference.EnabledForEverything: + return true; + default: + return false; + } + } + + public static void CyclePreferences() + { + switch (DoorOpeningHelper.PreferenceSettings) + { + case DoorOpeningHelper.DoorAutoOpeningPreference.Disabled: + DoorOpeningHelper.PreferenceSettings = DoorOpeningHelper.DoorAutoOpeningPreference.EnabledForEverything; + break; + case DoorOpeningHelper.DoorAutoOpeningPreference.EnabledForGamepadOnly: + DoorOpeningHelper.PreferenceSettings = DoorOpeningHelper.DoorAutoOpeningPreference.Disabled; + break; + case DoorOpeningHelper.DoorAutoOpeningPreference.EnabledForEverything: + DoorOpeningHelper.PreferenceSettings = DoorOpeningHelper.DoorAutoOpeningPreference.EnabledForGamepadOnly; + break; + } + } + + public void LookForDoorsToClose(Player player) + { + DoorOpeningHelper.PlayerInfoForClosingDoors infoForClosingDoor = this.GetPlayerInfoForClosingDoor(player); + for (int index = this._ongoingOpenDoors.Count - 1; index >= 0; --index) + { + DoorOpeningHelper.DoorOpenCloseTogglingInfo ongoingOpenDoor = this._ongoingOpenDoors[index]; + if (ongoingOpenDoor.handler.TryCloseDoor(ongoingOpenDoor, infoForClosingDoor) != DoorOpeningHelper.DoorCloseAttemptResult.StillInDoorArea) + this._ongoingOpenDoors.RemoveAt(index); + } + } + + private DoorOpeningHelper.PlayerInfoForClosingDoors GetPlayerInfoForClosingDoor( + Player player) + { + return new DoorOpeningHelper.PlayerInfoForClosingDoors() + { + hitboxToNotCloseDoor = player.Hitbox + }; + } + + public void LookForDoorsToOpen(Player player) + { + DoorOpeningHelper.PlayerInfoForOpeningDoors infoForOpeningDoor = this.GetPlayerInfoForOpeningDoor(player); + if (infoForOpeningDoor.intendedOpeningDirection == 0 && (double) player.velocity.X == 0.0) + return; + Point tileCoords = new Point(); + for (int left = infoForOpeningDoor.tileCoordSpaceForCheckingForDoors.Left; left <= infoForOpeningDoor.tileCoordSpaceForCheckingForDoors.Right; ++left) + { + for (int top = infoForOpeningDoor.tileCoordSpaceForCheckingForDoors.Top; top <= infoForOpeningDoor.tileCoordSpaceForCheckingForDoors.Bottom; ++top) + { + tileCoords.X = left; + tileCoords.Y = top; + this.TryAutoOpeningDoor(tileCoords, infoForOpeningDoor); + } + } + } + + private DoorOpeningHelper.PlayerInfoForOpeningDoors GetPlayerInfoForOpeningDoor( + Player player) + { + int num1 = player.controlRight.ToInt() - player.controlLeft.ToInt(); + int gravDir = (int) player.gravDir; + Rectangle hitbox1 = player.Hitbox; + hitbox1.Y -= -1; + hitbox1.Height += -2; + float num2 = player.velocity.X; + if (num1 == 0 && this._timeWeCanOpenDoorsUsingVelocityAlone == 0) + num2 = 0.0f; + float num3 = (float) num1 + num2; + int num4 = Math.Sign(num3) * (int) Math.Ceiling((double) Math.Abs(num3)); + hitbox1.X += num4; + if (num1 == 0) + num1 = Math.Sign(num3); + Rectangle hitbox2; + Rectangle rectangle1 = hitbox2 = player.Hitbox; + rectangle1.X += num4; + Rectangle rectangle2 = rectangle1; + Rectangle r = Rectangle.Union(hitbox2, rectangle2); + Point tileCoordinates1 = r.TopLeft().ToTileCoordinates(); + Point tileCoordinates2 = r.BottomRight().ToTileCoordinates(); + Rectangle rectangle3 = new Rectangle(tileCoordinates1.X, tileCoordinates1.Y, tileCoordinates2.X - tileCoordinates1.X, tileCoordinates2.Y - tileCoordinates1.Y); + return new DoorOpeningHelper.PlayerInfoForOpeningDoors() + { + hitboxToOpenDoor = hitbox1, + intendedOpeningDirection = num1, + playerGravityDirection = gravDir, + tileCoordSpaceForCheckingForDoors = rectangle3 + }; + } + + private void TryAutoOpeningDoor( + Point tileCoords, + DoorOpeningHelper.PlayerInfoForOpeningDoors playerInfo) + { + DoorOpeningHelper.DoorAutoHandler infoProvider; + if (!this.TryGetHandler(tileCoords, out infoProvider)) + return; + DoorOpeningHelper.DoorOpenCloseTogglingInfo info = infoProvider.ProvideInfo(tileCoords); + if (!infoProvider.TryOpenDoor(info, playerInfo)) + return; + this._ongoingOpenDoors.Add(info); + } + + private bool TryGetHandler(Point tileCoords, out DoorOpeningHelper.DoorAutoHandler infoProvider) + { + infoProvider = (DoorOpeningHelper.DoorAutoHandler) null; + if (!WorldGen.InWorld(tileCoords.X, tileCoords.Y, 3)) + return false; + Tile tile = Main.tile[tileCoords.X, tileCoords.Y]; + return tile != null && this._handlerByTileType.TryGetValue((int) tile.type, out infoProvider); + } + + public enum DoorAutoOpeningPreference + { + Disabled, + EnabledForGamepadOnly, + EnabledForEverything, + } + + private enum DoorCloseAttemptResult + { + StillInDoorArea, + ClosedDoor, + FailedToCloseDoor, + DoorIsInvalidated, + } + + private struct DoorOpenCloseTogglingInfo + { + public Point tileCoordsForToggling; + public DoorOpeningHelper.DoorAutoHandler handler; + } + + private struct PlayerInfoForOpeningDoors + { + public Rectangle hitboxToOpenDoor; + public int intendedOpeningDirection; + public int playerGravityDirection; + public Rectangle tileCoordSpaceForCheckingForDoors; + } + + private struct PlayerInfoForClosingDoors + { + public Rectangle hitboxToNotCloseDoor; + } + + private interface DoorAutoHandler + { + DoorOpeningHelper.DoorOpenCloseTogglingInfo ProvideInfo(Point tileCoords); + + bool TryOpenDoor( + DoorOpeningHelper.DoorOpenCloseTogglingInfo info, + DoorOpeningHelper.PlayerInfoForOpeningDoors playerInfo); + + DoorOpeningHelper.DoorCloseAttemptResult TryCloseDoor( + DoorOpeningHelper.DoorOpenCloseTogglingInfo info, + DoorOpeningHelper.PlayerInfoForClosingDoors playerInfo); + } + + private class CommonDoorOpeningInfoProvider : DoorOpeningHelper.DoorAutoHandler + { + public DoorOpeningHelper.DoorOpenCloseTogglingInfo ProvideInfo( + Point tileCoords) + { + Tile tile = Main.tile[tileCoords.X, tileCoords.Y]; + Point point = tileCoords; + point.Y -= (int) tile.frameY % 54 / 18; + return new DoorOpeningHelper.DoorOpenCloseTogglingInfo() + { + handler = (DoorOpeningHelper.DoorAutoHandler) this, + tileCoordsForToggling = point + }; + } + + public bool TryOpenDoor( + DoorOpeningHelper.DoorOpenCloseTogglingInfo doorInfo, + DoorOpeningHelper.PlayerInfoForOpeningDoors playerInfo) + { + Point coordsForToggling = doorInfo.tileCoordsForToggling; + int openingDirection = playerInfo.intendedOpeningDirection; + Rectangle rectangle = new Rectangle(doorInfo.tileCoordsForToggling.X * 16, doorInfo.tileCoordsForToggling.Y * 16, 16, 48); + switch (playerInfo.playerGravityDirection) + { + case -1: + rectangle.Y -= 16; + rectangle.Height += 16; + break; + case 1: + rectangle.Height += 16; + break; + } + if (!rectangle.Intersects(playerInfo.hitboxToOpenDoor) || playerInfo.hitboxToOpenDoor.Top < rectangle.Top || playerInfo.hitboxToOpenDoor.Bottom > rectangle.Bottom) + return false; + WorldGen.OpenDoor(coordsForToggling.X, coordsForToggling.Y, openingDirection); + if (Main.tile[coordsForToggling.X, coordsForToggling.Y].type != (ushort) 10) + { + NetMessage.SendData(19, number2: ((float) coordsForToggling.X), number3: ((float) coordsForToggling.Y), number4: ((float) openingDirection)); + return true; + } + WorldGen.OpenDoor(coordsForToggling.X, coordsForToggling.Y, -openingDirection); + if (Main.tile[coordsForToggling.X, coordsForToggling.Y].type == (ushort) 10) + return false; + NetMessage.SendData(19, number2: ((float) coordsForToggling.X), number3: ((float) coordsForToggling.Y), number4: ((float) -openingDirection)); + return true; + } + + public DoorOpeningHelper.DoorCloseAttemptResult TryCloseDoor( + DoorOpeningHelper.DoorOpenCloseTogglingInfo info, + DoorOpeningHelper.PlayerInfoForClosingDoors playerInfo) + { + Point coordsForToggling = info.tileCoordsForToggling; + Tile tile = Main.tile[coordsForToggling.X, coordsForToggling.Y]; + if (!tile.active() || tile.type != (ushort) 11) + return DoorOpeningHelper.DoorCloseAttemptResult.DoorIsInvalidated; + int num = (int) tile.frameX % 72 / 18; + Rectangle rectangle1 = new Rectangle(coordsForToggling.X * 16, coordsForToggling.Y * 16, 16, 48); + switch (num) + { + case 1: + rectangle1.X -= 16; + break; + case 2: + rectangle1.X += 16; + break; + } + rectangle1.Inflate(1, 0); + Rectangle rectangle2 = Rectangle.Intersect(rectangle1, playerInfo.hitboxToNotCloseDoor); + if (rectangle2.Width > 0 || rectangle2.Height > 0) + return DoorOpeningHelper.DoorCloseAttemptResult.StillInDoorArea; + if (!WorldGen.CloseDoor(coordsForToggling.X, coordsForToggling.Y)) + return DoorOpeningHelper.DoorCloseAttemptResult.FailedToCloseDoor; + NetMessage.SendData(13, number: Main.myPlayer); + NetMessage.SendData(19, number: 1, number2: ((float) coordsForToggling.X), number3: ((float) coordsForToggling.Y), number4: 1f); + return DoorOpeningHelper.DoorCloseAttemptResult.ClosedDoor; + } + } + + private class TallGateOpeningInfoProvider : DoorOpeningHelper.DoorAutoHandler + { + public DoorOpeningHelper.DoorOpenCloseTogglingInfo ProvideInfo( + Point tileCoords) + { + Tile tile = Main.tile[tileCoords.X, tileCoords.Y]; + Point point = tileCoords; + point.Y -= (int) tile.frameY % 90 / 18; + return new DoorOpeningHelper.DoorOpenCloseTogglingInfo() + { + handler = (DoorOpeningHelper.DoorAutoHandler) this, + tileCoordsForToggling = point + }; + } + + public bool TryOpenDoor( + DoorOpeningHelper.DoorOpenCloseTogglingInfo doorInfo, + DoorOpeningHelper.PlayerInfoForOpeningDoors playerInfo) + { + Point coordsForToggling = doorInfo.tileCoordsForToggling; + Rectangle rectangle = new Rectangle(doorInfo.tileCoordsForToggling.X * 16, doorInfo.tileCoordsForToggling.Y * 16, 16, 80); + switch (playerInfo.playerGravityDirection) + { + case -1: + rectangle.Y -= 16; + rectangle.Height += 16; + break; + case 1: + rectangle.Height += 16; + break; + } + if (!rectangle.Intersects(playerInfo.hitboxToOpenDoor) || playerInfo.hitboxToOpenDoor.Top < rectangle.Top || playerInfo.hitboxToOpenDoor.Bottom > rectangle.Bottom) + return false; + bool closing = false; + if (!WorldGen.ShiftTallGate(coordsForToggling.X, coordsForToggling.Y, closing)) + return false; + NetMessage.SendData(19, number: (4 + closing.ToInt()), number2: ((float) coordsForToggling.X), number3: ((float) coordsForToggling.Y)); + return true; + } + + public DoorOpeningHelper.DoorCloseAttemptResult TryCloseDoor( + DoorOpeningHelper.DoorOpenCloseTogglingInfo info, + DoorOpeningHelper.PlayerInfoForClosingDoors playerInfo) + { + Point coordsForToggling = info.tileCoordsForToggling; + Tile tile = Main.tile[coordsForToggling.X, coordsForToggling.Y]; + if (!tile.active() || tile.type != (ushort) 389) + return DoorOpeningHelper.DoorCloseAttemptResult.DoorIsInvalidated; + int num = (int) tile.frameY % 90 / 18; + Rectangle rectangle1 = new Rectangle(coordsForToggling.X * 16, coordsForToggling.Y * 16, 16, 80); + rectangle1.Inflate(1, 0); + Rectangle rectangle2 = Rectangle.Intersect(rectangle1, playerInfo.hitboxToNotCloseDoor); + if (rectangle2.Width > 0 || rectangle2.Height > 0) + return DoorOpeningHelper.DoorCloseAttemptResult.StillInDoorArea; + bool closing = true; + if (!WorldGen.ShiftTallGate(coordsForToggling.X, coordsForToggling.Y, closing)) + return DoorOpeningHelper.DoorCloseAttemptResult.FailedToCloseDoor; + NetMessage.SendData(13, number: Main.myPlayer); + NetMessage.SendData(19, number: (4 + closing.ToInt()), number2: ((float) coordsForToggling.X), number3: ((float) coordsForToggling.Y)); + return DoorOpeningHelper.DoorCloseAttemptResult.ClosedDoor; + } + } + } +} diff --git a/GameContent/Drawing/ParticleOrchestraSettings.cs b/GameContent/Drawing/ParticleOrchestraSettings.cs new file mode 100644 index 0000000..6fd6f68 --- /dev/null +++ b/GameContent/Drawing/ParticleOrchestraSettings.cs @@ -0,0 +1,36 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Drawing.ParticleOrchestraSettings +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.IO; + +namespace Terraria.GameContent.Drawing +{ + public struct ParticleOrchestraSettings + { + public Vector2 PositionInWorld; + public Vector2 MovementVector; + public int PackedShaderIndex; + public byte IndexOfPlayerWhoInvokedThis; + public const int SerializationSize = 21; + + public void Serialize(BinaryWriter writer) + { + writer.WriteVector2(this.PositionInWorld); + writer.WriteVector2(this.MovementVector); + writer.Write(this.PackedShaderIndex); + writer.Write(this.IndexOfPlayerWhoInvokedThis); + } + + public void DeserializeFrom(BinaryReader reader) + { + this.PositionInWorld = reader.ReadVector2(); + this.MovementVector = reader.ReadVector2(); + this.PackedShaderIndex = reader.ReadInt32(); + this.IndexOfPlayerWhoInvokedThis = reader.ReadByte(); + } + } +} diff --git a/GameContent/Drawing/ParticleOrchestraType.cs b/GameContent/Drawing/ParticleOrchestraType.cs new file mode 100644 index 0000000..128414a --- /dev/null +++ b/GameContent/Drawing/ParticleOrchestraType.cs @@ -0,0 +1,20 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Drawing.ParticleOrchestraType +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Drawing +{ + public enum ParticleOrchestraType : byte + { + Keybrand, + FlameWaders, + StellarTune, + WallOfFleshGoatMountFlames, + BlackLightningHit, + RainbowRodHit, + BlackLightningSmall, + StardustPunch, + } +} diff --git a/GameContent/Drawing/ParticleOrchestrator.cs b/GameContent/Drawing/ParticleOrchestrator.cs new file mode 100644 index 0000000..09f195d --- /dev/null +++ b/GameContent/Drawing/ParticleOrchestrator.cs @@ -0,0 +1,420 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Drawing.ParticleOrchestrator +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.GameContent.NetModules; +using Terraria.Graphics.Renderers; +using Terraria.Graphics.Shaders; +using Terraria.Net; + +namespace Terraria.GameContent.Drawing +{ + public class ParticleOrchestrator + { + private static ParticlePool _poolFading = new ParticlePool(200, new ParticlePool.ParticleInstantiator(ParticleOrchestrator.GetNewFadingParticle)); + private static ParticlePool _poolFlame = new ParticlePool(200, new ParticlePool.ParticleInstantiator(ParticleOrchestrator.GetNewFlameParticle)); + private static ParticlePool _poolRandomizedFrame = new ParticlePool(200, new ParticlePool.ParticleInstantiator(ParticleOrchestrator.GetNewRandomizedFrameParticle)); + private static ParticlePool _poolPrettySparkle = new ParticlePool(200, new ParticlePool.ParticleInstantiator(ParticleOrchestrator.GetNewPrettySparkleParticle)); + + public static void RequestParticleSpawn( + bool clientOnly, + ParticleOrchestraType type, + ParticleOrchestraSettings settings, + int? overrideInvokingPlayerIndex = null) + { + settings.IndexOfPlayerWhoInvokedThis = (byte) Main.myPlayer; + if (overrideInvokingPlayerIndex.HasValue) + settings.IndexOfPlayerWhoInvokedThis = (byte) overrideInvokingPlayerIndex.Value; + if (clientOnly) + ParticleOrchestrator.SpawnParticlesDirect(type, settings); + else + NetManager.Instance.SendToServerOrLoopback(NetParticlesModule.Serialize(type, settings)); + } + + private static FadingParticle GetNewFadingParticle() => new FadingParticle(); + + private static FlameParticle GetNewFlameParticle() => new FlameParticle(); + + private static RandomizedFrameParticle GetNewRandomizedFrameParticle() => new RandomizedFrameParticle(); + + private static PrettySparkleParticle GetNewPrettySparkleParticle() => new PrettySparkleParticle(); + + public static void SpawnParticlesDirect( + ParticleOrchestraType type, + ParticleOrchestraSettings settings) + { + if (Main.netMode == 2) + return; + switch (type) + { + case ParticleOrchestraType.Keybrand: + ParticleOrchestrator.Spawn_Keybrand(settings); + break; + case ParticleOrchestraType.FlameWaders: + ParticleOrchestrator.Spawn_FlameWaders(settings); + break; + case ParticleOrchestraType.StellarTune: + ParticleOrchestrator.Spawn_StellarTune(settings); + break; + case ParticleOrchestraType.WallOfFleshGoatMountFlames: + ParticleOrchestrator.Spawn_WallOfFleshGoatMountFlames(settings); + break; + case ParticleOrchestraType.BlackLightningHit: + ParticleOrchestrator.Spawn_BlackLightningHit(settings); + break; + case ParticleOrchestraType.RainbowRodHit: + ParticleOrchestrator.Spawn_RainbowRodHit(settings); + break; + case ParticleOrchestraType.BlackLightningSmall: + ParticleOrchestrator.Spawn_BlackLightningSmall(settings); + break; + case ParticleOrchestraType.StardustPunch: + ParticleOrchestrator.Spawn_StardustPunch(settings); + break; + } + } + + private static void Spawn_StardustPunch(ParticleOrchestraSettings settings) + { + float num1 = Main.rand.NextFloat() * 6.283185f; + float num2 = 1f; + for (float num3 = 0.0f; (double) num3 < 1.0; num3 += 1f / num2) + { + Vector2 vector2_1 = settings.MovementVector * (float) (0.300000011920929 + (double) Main.rand.NextFloat() * 0.349999994039536); + Vector2 vector2_2 = new Vector2((float) ((double) Main.rand.NextFloat() * 0.400000005960464 + 0.400000005960464)); + float f = num1 + Main.rand.NextFloat() * 6.283185f; + float num4 = 1.570796f; + Vector2 vector2_3 = 0.1f * vector2_2; + float num5 = 60f; + Vector2 vector2_4 = Main.rand.NextVector2Circular(8f, 8f) * vector2_2; + PrettySparkleParticle prettySparkleParticle1 = ParticleOrchestrator._poolPrettySparkle.RequestParticle(); + prettySparkleParticle1.Velocity = f.ToRotationVector2() * vector2_3 + vector2_1; + prettySparkleParticle1.AccelerationPerFrame = f.ToRotationVector2() * -(vector2_3 / num5) - vector2_1 * 1f / 60f; + prettySparkleParticle1.ColorTint = Main.hslToRgb((float) ((0.600000023841858 + (double) Main.rand.NextFloat() * 0.0500000007450581) % 1.0), 1f, (float) (0.400000005960464 + (double) Main.rand.NextFloat() * 0.25)); + prettySparkleParticle1.ColorTint.A = (byte) 0; + prettySparkleParticle1.LocalPosition = settings.PositionInWorld + vector2_4; + prettySparkleParticle1.Rotation = num4; + prettySparkleParticle1.Scale = vector2_2; + Main.ParticleSystem_World_OverPlayers.Add((IParticle) prettySparkleParticle1); + PrettySparkleParticle prettySparkleParticle2 = ParticleOrchestrator._poolPrettySparkle.RequestParticle(); + prettySparkleParticle2.Velocity = f.ToRotationVector2() * vector2_3 + vector2_1; + prettySparkleParticle2.AccelerationPerFrame = f.ToRotationVector2() * -(vector2_3 / num5) - vector2_1 * 1f / 30f; + prettySparkleParticle2.ColorTint = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + prettySparkleParticle2.LocalPosition = settings.PositionInWorld + vector2_4; + prettySparkleParticle2.Rotation = num4; + prettySparkleParticle2.Scale = vector2_2 * 0.6f; + Main.ParticleSystem_World_OverPlayers.Add((IParticle) prettySparkleParticle2); + } + for (int index = 0; index < 2; ++index) + { + Color rgb = Main.hslToRgb((float) ((0.589999973773956 + (double) Main.rand.NextFloat() * 0.0500000007450581) % 1.0), 1f, (float) (0.400000005960464 + (double) Main.rand.NextFloat() * 0.25)); + int dustIndex = Dust.NewDust(settings.PositionInWorld, 0, 0, 267, newColor: rgb); + Main.dust[dustIndex].velocity = Main.rand.NextVector2Circular(2f, 2f); + Main.dust[dustIndex].velocity += settings.MovementVector * (float) (0.5 + 0.5 * (double) Main.rand.NextFloat()) * 1.4f; + Main.dust[dustIndex].noGravity = true; + Main.dust[dustIndex].scale = (float) (0.600000023841858 + (double) Main.rand.NextFloat() * 2.0); + Main.dust[dustIndex].position += Main.rand.NextVector2Circular(16f, 16f); + if (dustIndex != 6000) + { + Dust dust = Dust.CloneDust(dustIndex); + dust.scale /= 2f; + dust.fadeIn *= 0.75f; + dust.color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + } + } + } + + private static void Spawn_RainbowRodHit(ParticleOrchestraSettings settings) + { + float num1 = Main.rand.NextFloat() * 6.283185f; + float num2 = 6f; + float num3 = Main.rand.NextFloat(); + for (float num4 = 0.0f; (double) num4 < 1.0; num4 += 1f / num2) + { + Vector2 vector2_1 = settings.MovementVector * Main.rand.NextFloatDirection() * 0.15f; + Vector2 vector2_2 = new Vector2((float) ((double) Main.rand.NextFloat() * 0.400000005960464 + 0.400000005960464)); + float f = num1 + Main.rand.NextFloat() * 6.283185f; + float num5 = 1.570796f; + Vector2 vector2_3 = 1.5f * vector2_2; + float num6 = 60f; + Vector2 vector2_4 = Main.rand.NextVector2Circular(8f, 8f) * vector2_2; + PrettySparkleParticle prettySparkleParticle1 = ParticleOrchestrator._poolPrettySparkle.RequestParticle(); + prettySparkleParticle1.Velocity = f.ToRotationVector2() * vector2_3 + vector2_1; + prettySparkleParticle1.AccelerationPerFrame = f.ToRotationVector2() * -(vector2_3 / num6) - vector2_1 * 1f / 60f; + prettySparkleParticle1.ColorTint = Main.hslToRgb((float) (((double) num3 + (double) Main.rand.NextFloat() * 0.330000013113022) % 1.0), 1f, (float) (0.400000005960464 + (double) Main.rand.NextFloat() * 0.25)); + prettySparkleParticle1.ColorTint.A = (byte) 0; + prettySparkleParticle1.LocalPosition = settings.PositionInWorld + vector2_4; + prettySparkleParticle1.Rotation = num5; + prettySparkleParticle1.Scale = vector2_2; + Main.ParticleSystem_World_OverPlayers.Add((IParticle) prettySparkleParticle1); + PrettySparkleParticle prettySparkleParticle2 = ParticleOrchestrator._poolPrettySparkle.RequestParticle(); + prettySparkleParticle2.Velocity = f.ToRotationVector2() * vector2_3 + vector2_1; + prettySparkleParticle2.AccelerationPerFrame = f.ToRotationVector2() * -(vector2_3 / num6) - vector2_1 * 1f / 60f; + prettySparkleParticle2.ColorTint = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + prettySparkleParticle2.LocalPosition = settings.PositionInWorld + vector2_4; + prettySparkleParticle2.Rotation = num5; + prettySparkleParticle2.Scale = vector2_2 * 0.6f; + Main.ParticleSystem_World_OverPlayers.Add((IParticle) prettySparkleParticle2); + } + for (int index = 0; index < 12; ++index) + { + Color rgb = Main.hslToRgb((float) (((double) num3 + (double) Main.rand.NextFloat() * 0.119999997317791) % 1.0), 1f, (float) (0.400000005960464 + (double) Main.rand.NextFloat() * 0.25)); + int dustIndex = Dust.NewDust(settings.PositionInWorld, 0, 0, 267, newColor: rgb); + Main.dust[dustIndex].velocity = Main.rand.NextVector2Circular(1f, 1f); + Main.dust[dustIndex].velocity += settings.MovementVector * Main.rand.NextFloatDirection() * 0.5f; + Main.dust[dustIndex].noGravity = true; + Main.dust[dustIndex].scale = (float) (0.600000023841858 + (double) Main.rand.NextFloat() * 0.899999976158142); + Main.dust[dustIndex].fadeIn = (float) (0.699999988079071 + (double) Main.rand.NextFloat() * 0.800000011920929); + if (dustIndex != 6000) + { + Dust dust = Dust.CloneDust(dustIndex); + dust.scale /= 2f; + dust.fadeIn *= 0.75f; + dust.color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + } + } + } + + private static void Spawn_BlackLightningSmall(ParticleOrchestraSettings settings) + { + float num1 = Main.rand.NextFloat() * 6.283185f; + float num2 = (float) Main.rand.Next(1, 3); + float num3 = 0.7f; + int i = 916; + Main.instance.LoadProjectile(i); + Color color1 = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + Color indigo = Color.Indigo; + indigo.A = (byte) 0; + for (float num4 = 0.0f; (double) num4 < 1.0; num4 += 1f / num2) + { + float f = (float) (6.28318548202515 * (double) num4 + (double) num1 + (double) Main.rand.NextFloatDirection() * 0.25); + float num5 = (float) ((double) Main.rand.NextFloat() * 4.0 + 0.100000001490116); + Vector2 initialLocalPosition = Main.rand.NextVector2Circular(12f, 12f) * num3; + Color.Lerp(Color.Lerp(Color.Black, indigo, Main.rand.NextFloat() * 0.5f), color1, Main.rand.NextFloat() * 0.6f); + Color color2 = new Color(0, 0, 0, (int) byte.MaxValue); + int num6 = Main.rand.Next(4); + if (num6 == 1) + color2 = Color.Lerp(new Color(106, 90, 205, (int) sbyte.MaxValue), Color.Black, (float) (0.100000001490116 + 0.699999988079071 * (double) Main.rand.NextFloat())); + if (num6 == 2) + color2 = Color.Lerp(new Color(106, 90, 205, 60), Color.Black, (float) (0.100000001490116 + 0.800000011920929 * (double) Main.rand.NextFloat())); + RandomizedFrameParticle randomizedFrameParticle = ParticleOrchestrator._poolRandomizedFrame.RequestParticle(); + randomizedFrameParticle.SetBasicInfo(TextureAssets.Projectile[i], new Rectangle?(), Vector2.Zero, initialLocalPosition); + randomizedFrameParticle.SetTypeInfo(Main.projFrames[i], 2, 24f); + randomizedFrameParticle.Velocity = f.ToRotationVector2() * num5 * new Vector2(1f, 0.5f) * 0.2f + settings.MovementVector; + randomizedFrameParticle.ColorTint = color2; + randomizedFrameParticle.LocalPosition = settings.PositionInWorld + initialLocalPosition; + randomizedFrameParticle.Rotation = randomizedFrameParticle.Velocity.ToRotation(); + randomizedFrameParticle.Scale = Vector2.One * 0.5f; + randomizedFrameParticle.FadeInNormalizedTime = 0.01f; + randomizedFrameParticle.FadeOutNormalizedTime = 0.5f; + randomizedFrameParticle.ScaleVelocity = new Vector2(0.025f); + Main.ParticleSystem_World_OverPlayers.Add((IParticle) randomizedFrameParticle); + } + } + + private static void Spawn_BlackLightningHit(ParticleOrchestraSettings settings) + { + float num1 = Main.rand.NextFloat() * 6.283185f; + float num2 = 7f; + float num3 = 0.7f; + int i = 916; + Main.instance.LoadProjectile(i); + Color color1 = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + Color indigo = Color.Indigo; + indigo.A = (byte) 0; + for (float num4 = 0.0f; (double) num4 < 1.0; num4 += 1f / num2) + { + float f = (float) (6.28318548202515 * (double) num4 + (double) num1 + (double) Main.rand.NextFloatDirection() * 0.25); + float num5 = (float) ((double) Main.rand.NextFloat() * 4.0 + 0.100000001490116); + Vector2 initialLocalPosition = Main.rand.NextVector2Circular(12f, 12f) * num3; + Color.Lerp(Color.Lerp(Color.Black, indigo, Main.rand.NextFloat() * 0.5f), color1, Main.rand.NextFloat() * 0.6f); + Color color2 = new Color(0, 0, 0, (int) byte.MaxValue); + int num6 = Main.rand.Next(4); + if (num6 == 1) + color2 = Color.Lerp(new Color(106, 90, 205, (int) sbyte.MaxValue), Color.Black, (float) (0.100000001490116 + 0.699999988079071 * (double) Main.rand.NextFloat())); + if (num6 == 2) + color2 = Color.Lerp(new Color(106, 90, 205, 60), Color.Black, (float) (0.100000001490116 + 0.800000011920929 * (double) Main.rand.NextFloat())); + RandomizedFrameParticle randomizedFrameParticle = ParticleOrchestrator._poolRandomizedFrame.RequestParticle(); + randomizedFrameParticle.SetBasicInfo(TextureAssets.Projectile[i], new Rectangle?(), Vector2.Zero, initialLocalPosition); + randomizedFrameParticle.SetTypeInfo(Main.projFrames[i], 2, 24f); + randomizedFrameParticle.Velocity = f.ToRotationVector2() * num5 * new Vector2(1f, 0.5f); + randomizedFrameParticle.ColorTint = color2; + randomizedFrameParticle.LocalPosition = settings.PositionInWorld + initialLocalPosition; + randomizedFrameParticle.Rotation = f; + randomizedFrameParticle.Scale = Vector2.One; + randomizedFrameParticle.FadeInNormalizedTime = 0.01f; + randomizedFrameParticle.FadeOutNormalizedTime = 0.5f; + randomizedFrameParticle.ScaleVelocity = new Vector2(0.05f); + Main.ParticleSystem_World_OverPlayers.Add((IParticle) randomizedFrameParticle); + } + } + + private static void Spawn_StellarTune(ParticleOrchestraSettings settings) + { + float num1 = Main.rand.NextFloat() * 6.283185f; + float num2 = 5f; + Vector2 vector2_1 = new Vector2(0.7f); + for (float num3 = 0.0f; (double) num3 < 1.0; num3 += 1f / num2) + { + float f = (float) (6.28318548202515 * (double) num3 + (double) num1 + (double) Main.rand.NextFloatDirection() * 0.25); + Vector2 vector2_2 = 1.5f * vector2_1; + float num4 = 60f; + Vector2 vector2_3 = Main.rand.NextVector2Circular(12f, 12f) * vector2_1; + Color color = Color.Lerp(Color.Gold, Color.HotPink, Main.rand.NextFloat()); + if (Main.rand.Next(2) == 0) + color = Color.Lerp(Color.Violet, Color.HotPink, Main.rand.NextFloat()); + PrettySparkleParticle prettySparkleParticle = ParticleOrchestrator._poolPrettySparkle.RequestParticle(); + prettySparkleParticle.Velocity = f.ToRotationVector2() * vector2_2; + prettySparkleParticle.AccelerationPerFrame = f.ToRotationVector2() * -(vector2_2 / num4); + prettySparkleParticle.ColorTint = color; + prettySparkleParticle.LocalPosition = settings.PositionInWorld + vector2_3; + prettySparkleParticle.Rotation = f; + prettySparkleParticle.Scale = vector2_1 * (float) ((double) Main.rand.NextFloat() * 0.800000011920929 + 0.200000002980232); + Main.ParticleSystem_World_OverPlayers.Add((IParticle) prettySparkleParticle); + } + } + + private static void Spawn_Keybrand(ParticleOrchestraSettings settings) + { + float num1 = Main.rand.NextFloat() * 6.283185f; + float num2 = 3f; + Vector2 vector2_1 = new Vector2(0.7f); + for (float num3 = 0.0f; (double) num3 < 1.0; num3 += 1f / num2) + { + float f = (float) (6.28318548202515 * (double) num3 + (double) num1 + (double) Main.rand.NextFloatDirection() * 0.100000001490116); + Vector2 vector2_2 = 1.5f * vector2_1; + float num4 = 60f; + Vector2 vector2_3 = Main.rand.NextVector2Circular(4f, 4f) * vector2_1; + PrettySparkleParticle prettySparkleParticle = ParticleOrchestrator._poolPrettySparkle.RequestParticle(); + prettySparkleParticle.Velocity = f.ToRotationVector2() * vector2_2; + prettySparkleParticle.AccelerationPerFrame = f.ToRotationVector2() * -(vector2_2 / num4); + prettySparkleParticle.ColorTint = Color.Lerp(Color.Gold, Color.OrangeRed, Main.rand.NextFloat()); + prettySparkleParticle.LocalPosition = settings.PositionInWorld + vector2_3; + prettySparkleParticle.Rotation = f; + prettySparkleParticle.Scale = vector2_1 * 0.8f; + Main.ParticleSystem_World_OverPlayers.Add((IParticle) prettySparkleParticle); + } + float num5 = num1 + (float) (1.0 / (double) num2 / 2.0 * 6.28318548202515); + float num6 = Main.rand.NextFloat() * 6.283185f; + for (float num7 = 0.0f; (double) num7 < 1.0; num7 += 1f / num2) + { + float f = (float) (6.28318548202515 * (double) num7 + (double) num6 + (double) Main.rand.NextFloatDirection() * 0.100000001490116); + Vector2 vector2_4 = 1f * vector2_1; + float timeToLive = 30f; + Color color = Color.Lerp(Color.White, Color.Lerp(Color.Gold, Color.OrangeRed, Main.rand.NextFloat()), 0.5f); + color.A = (byte) 0; + Vector2 vector2_5 = Main.rand.NextVector2Circular(4f, 4f) * vector2_1; + FadingParticle fadingParticle = ParticleOrchestrator._poolFading.RequestParticle(); + fadingParticle.SetBasicInfo(TextureAssets.Extra[98], new Rectangle?(), Vector2.Zero, Vector2.Zero); + fadingParticle.SetTypeInfo(timeToLive); + fadingParticle.Velocity = f.ToRotationVector2() * vector2_4; + fadingParticle.AccelerationPerFrame = f.ToRotationVector2() * -(vector2_4 / timeToLive); + fadingParticle.ColorTint = color; + fadingParticle.LocalPosition = settings.PositionInWorld + f.ToRotationVector2() * vector2_4 * vector2_1 * timeToLive * 0.2f + vector2_5; + fadingParticle.Rotation = f + 1.570796f; + fadingParticle.FadeInNormalizedTime = 0.3f; + fadingParticle.FadeOutNormalizedTime = 0.4f; + fadingParticle.Scale = new Vector2(0.5f, 1.2f) * 0.8f * vector2_1; + Main.ParticleSystem_World_OverPlayers.Add((IParticle) fadingParticle); + } + float num8 = 1f; + float num9 = Main.rand.NextFloat() * 6.283185f; + for (float num10 = 0.0f; (double) num10 < 1.0; num10 += 1f / num8) + { + float num11 = 6.283185f * num10 + num9; + float timeToLive = 30f; + Color color = Color.Lerp(Color.CornflowerBlue, Color.White, Main.rand.NextFloat()); + color.A = (byte) 127; + Vector2 vector2_6 = Main.rand.NextVector2Circular(4f, 4f) * vector2_1; + Vector2 vector2_7 = Main.rand.NextVector2Square(0.7f, 1.3f); + FadingParticle fadingParticle = ParticleOrchestrator._poolFading.RequestParticle(); + fadingParticle.SetBasicInfo(TextureAssets.Extra[174], new Rectangle?(), Vector2.Zero, Vector2.Zero); + fadingParticle.SetTypeInfo(timeToLive); + fadingParticle.ColorTint = color; + fadingParticle.LocalPosition = settings.PositionInWorld + vector2_6; + fadingParticle.Rotation = num11 + 1.570796f; + fadingParticle.FadeInNormalizedTime = 0.1f; + fadingParticle.FadeOutNormalizedTime = 0.4f; + fadingParticle.Scale = new Vector2(0.1f, 0.1f) * vector2_1; + fadingParticle.ScaleVelocity = vector2_7 * 1f / 60f; + fadingParticle.ScaleAcceleration = vector2_7 * -0.01666667f / 60f; + Main.ParticleSystem_World_OverPlayers.Add((IParticle) fadingParticle); + } + } + + private static void Spawn_FlameWaders(ParticleOrchestraSettings settings) + { + float timeToLive = 60f; + for (int index = -1; index <= 1; ++index) + { + int i = (int) Main.rand.NextFromList((short) 326, (short) 327, (short) 328); + Main.instance.LoadProjectile(i); + Player player = Main.player[(int) settings.IndexOfPlayerWhoInvokedThis]; + float num = (float) ((double) Main.rand.NextFloat() * 0.899999976158142 + 0.100000001490116); + Vector2 vector2 = settings.PositionInWorld + new Vector2((float) index * 5.333333f, 0.0f); + FlameParticle flameParticle = ParticleOrchestrator._poolFlame.RequestParticle(); + flameParticle.SetBasicInfo(TextureAssets.Projectile[i], new Rectangle?(), Vector2.Zero, vector2); + flameParticle.SetTypeInfo(timeToLive, (int) settings.IndexOfPlayerWhoInvokedThis, player.cShoe); + flameParticle.FadeOutNormalizedTime = 0.4f; + flameParticle.ScaleAcceleration = Vector2.One * num * -0.01666667f / timeToLive; + flameParticle.Scale = Vector2.One * num; + Main.ParticleSystem_World_BehindPlayers.Add((IParticle) flameParticle); + if (Main.rand.Next(16) == 0) + { + Dust dust = Dust.NewDustDirect(vector2, 4, 4, 6, Alpha: 100); + if (Main.rand.Next(2) == 0) + { + dust.noGravity = true; + dust.fadeIn = 1.15f; + } + else + dust.scale = 0.6f; + dust.velocity *= 0.6f; + dust.velocity.Y -= 1.2f; + dust.noLight = true; + dust.position.Y -= 4f; + dust.shader = GameShaders.Armor.GetSecondaryShader(player.cShoe, player); + } + } + } + + private static void Spawn_WallOfFleshGoatMountFlames(ParticleOrchestraSettings settings) + { + float timeToLive = 50f; + for (int index = -1; index <= 1; ++index) + { + int i = (int) Main.rand.NextFromList((short) 326, (short) 327, (short) 328); + Main.instance.LoadProjectile(i); + Player player = Main.player[(int) settings.IndexOfPlayerWhoInvokedThis]; + float num = (float) ((double) Main.rand.NextFloat() * 0.899999976158142 + 0.100000001490116); + Vector2 vector2 = settings.PositionInWorld + new Vector2((float) index * 5.333333f, 0.0f); + FlameParticle flameParticle = ParticleOrchestrator._poolFlame.RequestParticle(); + flameParticle.SetBasicInfo(TextureAssets.Projectile[i], new Rectangle?(), Vector2.Zero, vector2); + flameParticle.SetTypeInfo(timeToLive, (int) settings.IndexOfPlayerWhoInvokedThis, player.cMount); + flameParticle.FadeOutNormalizedTime = 0.3f; + flameParticle.ScaleAcceleration = Vector2.One * num * -0.01666667f / timeToLive; + flameParticle.Scale = Vector2.One * num; + Main.ParticleSystem_World_BehindPlayers.Add((IParticle) flameParticle); + if (Main.rand.Next(8) == 0) + { + Dust dust = Dust.NewDustDirect(vector2, 4, 4, 6, Alpha: 100); + if (Main.rand.Next(2) == 0) + { + dust.noGravity = true; + dust.fadeIn = 1.15f; + } + else + dust.scale = 0.6f; + dust.velocity *= 0.6f; + dust.velocity.Y -= 1.2f; + dust.noLight = true; + dust.position.Y -= 4f; + dust.shader = GameShaders.Armor.GetSecondaryShader(player.cMount, player); + } + } + } + } +} diff --git a/GameContent/Drawing/TileDrawing.cs b/GameContent/Drawing/TileDrawing.cs new file mode 100644 index 0000000..73bd683 --- /dev/null +++ b/GameContent/Drawing/TileDrawing.cs @@ -0,0 +1,6662 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Drawing.TileDrawing +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Threading; +using Terraria.DataStructures; +using Terraria.GameContent.Events; +using Terraria.GameContent.Tile_Entities; +using Terraria.Graphics.Capture; +using Terraria.ID; +using Terraria.ObjectData; +using Terraria.UI; +using Terraria.Utilities; + +namespace Terraria.GameContent.Drawing +{ + public class TileDrawing + { + private const int MAX_SPECIALS = 9000; + private const int MAX_SPECIALS_LEGACY = 1000; + private const float FORCE_FOR_MIN_WIND = 0.08f; + private const float FORCE_FOR_MAX_WIND = 1.2f; + private int _leafFrequency = 100000; + private int[] _specialsCount = new int[12]; + private Point[][] _specialPositions = new Point[12][]; + private Dictionary _displayDollTileEntityPositions = new Dictionary(); + private Dictionary _hatRackTileEntityPositions = new Dictionary(); + private Dictionary _trainingDummyTileEntityPositions = new Dictionary(); + private Dictionary _itemFrameTileEntityPositions = new Dictionary(); + private Dictionary _foodPlatterTileEntityPositions = new Dictionary(); + private Dictionary _weaponRackTileEntityPositions = new Dictionary(); + private Dictionary _chestPositions = new Dictionary(); + private int _specialTilesCount; + private int[] _specialTileX = new int[1000]; + private int[] _specialTileY = new int[1000]; + private UnifiedRandom _rand; + private double _treeWindCounter; + private double _grassWindCounter; + private double _sunflowerWindCounter; + private double _vineWindCounter; + private WindGrid _windGrid = new WindGrid(); + private bool _shouldShowInvisibleBlocks; + private List _vineRootsPositions = new List(); + private List _reverseVineRootsPositions = new List(); + private TilePaintSystemV2 _paintSystem; + private Color _martianGlow = new Color(0, 0, 0, 0); + private Color _meteorGlow = new Color(100, 100, 100, 0); + private Color _lavaMossGlow = new Color(150, 100, 50, 0); + private Color _kryptonMossGlow = new Color(0, 200, 0, 0); + private Color _xenonMossGlow = new Color(0, 180, 250, 0); + private Color _argonMossGlow = new Color(225, 0, 125, 0); + private bool _isActiveAndNotPaused; + private Player _localPlayer = new Player(); + private Color _highQualityLightingRequirement; + private Color _mediumQualityLightingRequirement; + private static readonly Vector2 _zero; + private ThreadLocal _currentTileDrawInfo = new ThreadLocal((Func) (() => new TileDrawInfo())); + private TileDrawInfo _currentTileDrawInfoNonThreaded = new TileDrawInfo(); + private Vector3[] _glowPaintColorSlices = new Vector3[9] + { + Vector3.One, + Vector3.One, + Vector3.One, + Vector3.One, + Vector3.One, + Vector3.One, + Vector3.One, + Vector3.One, + Vector3.One + }; + private List _voidLensData = new List(); + + private void AddSpecialPoint(int x, int y, TileDrawing.TileCounterType type) => this._specialPositions[(int) type][this._specialsCount[(int) type]++] = new Point(x, y); + + private bool[] _tileSolid => Main.tileSolid; + + private bool[] _tileSolidTop => Main.tileSolidTop; + + private Dust[] _dust => Main.dust; + + private Gore[] _gore => Main.gore; + + public TileDrawing(TilePaintSystemV2 paintSystem) + { + this._paintSystem = paintSystem; + this._rand = new UnifiedRandom(); + for (int index = 0; index < this._specialPositions.Length; ++index) + this._specialPositions[index] = new Point[9000]; + } + + public void PreparePaintForTilesOnScreen() + { + if (Main.GameUpdateCount % 6U > 0U) + return; + Vector2 unscaledPosition = Main.Camera.UnscaledPosition; + Vector2 vector2 = new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange); + if (Main.drawToScreen) + vector2 = Vector2.Zero; + int firstTileX; + int lastTileX; + int firstTileY; + int lastTileY; + this.GetScreenDrawArea(unscaledPosition, vector2 + (Main.Camera.UnscaledPosition - Main.Camera.ScaledPosition), out firstTileX, out lastTileX, out firstTileY, out lastTileY); + this.PrepareForAreaDrawing(firstTileX, lastTileX, firstTileY, lastTileY, true); + } + + public void PrepareForAreaDrawing( + int firstTileX, + int lastTileX, + int firstTileY, + int lastTileY, + bool prepareLazily) + { + TilePaintSystemV2.TileVariationkey lookupKey1 = new TilePaintSystemV2.TileVariationkey(); + TilePaintSystemV2.WallVariationKey lookupKey2 = new TilePaintSystemV2.WallVariationKey(); + for (int index1 = firstTileY; index1 < lastTileY + 4; ++index1) + { + for (int index2 = firstTileX - 2; index2 < lastTileX + 2; ++index2) + { + Tile tile = Main.tile[index2, index1]; + if (tile != null) + { + if (tile.active()) + { + Main.instance.LoadTiles((int) tile.type); + lookupKey1.TileType = (int) tile.type; + lookupKey1.PaintColor = (int) tile.color(); + int num = 0; + switch (tile.type) + { + case 5: + num = TileDrawing.GetTreeBiome(index2, index1, (int) tile.frameX, (int) tile.frameY); + break; + case 323: + num = this.GetPalmTreeBiome(index2, index1); + break; + } + lookupKey1.TileStyle = num; + if (lookupKey1.PaintColor != 0) + this._paintSystem.RequestTile(ref lookupKey1); + } + if (tile.wall != (ushort) 0) + { + Main.instance.LoadWall((int) tile.wall); + lookupKey2.WallType = (int) tile.wall; + lookupKey2.PaintColor = (int) tile.wallColor(); + if (lookupKey2.PaintColor != 0) + this._paintSystem.RequestWall(ref lookupKey2); + } + if (!prepareLazily) + this.MakeExtraPreparations(tile, index2, index1); + } + } + } + } + + private void MakeExtraPreparations(Tile tile, int x, int y) + { + switch (tile.type) + { + case 5: + int treeFrame1 = 0; + int floorY1 = 0; + int topTextureFrameWidth1 = 0; + int topTextureFrameHeight1 = 0; + int treeStyle1 = 0; + int xoffset1 = (tile.frameX == (short) 44).ToInt() - (tile.frameX == (short) 66).ToInt(); + if (!WorldGen.GetCommonTreeFoliageData(x, y, xoffset1, ref treeFrame1, ref treeStyle1, out floorY1, out topTextureFrameWidth1, out topTextureFrameHeight1)) + break; + TilePaintSystemV2.TreeFoliageVariantKey lookupKey1 = new TilePaintSystemV2.TreeFoliageVariantKey() + { + TextureIndex = treeStyle1, + PaintColor = (int) tile.color() + }; + this._paintSystem.RequestTreeTop(ref lookupKey1); + this._paintSystem.RequestTreeBranch(ref lookupKey1); + break; + case 323: + int num = 15; + if (x >= WorldGen.beachDistance && x <= Main.maxTilesX - WorldGen.beachDistance) + num = 21; + TilePaintSystemV2.TreeFoliageVariantKey lookupKey2 = new TilePaintSystemV2.TreeFoliageVariantKey() + { + TextureIndex = num, + PaintColor = (int) tile.color() + }; + this._paintSystem.RequestTreeTop(ref lookupKey2); + this._paintSystem.RequestTreeBranch(ref lookupKey2); + break; + case 583: + case 584: + case 585: + case 586: + case 587: + case 588: + case 589: + int treeFrame2 = 0; + int floorY2 = 0; + int topTextureFrameWidth2 = 0; + int topTextureFrameHeight2 = 0; + int treeStyle2 = 0; + int xoffset2 = (tile.frameX == (short) 44).ToInt() - (tile.frameX == (short) 66).ToInt(); + if (!WorldGen.GetGemTreeFoliageData(x, y, xoffset2, ref treeFrame2, ref treeStyle2, out floorY2, out topTextureFrameWidth2, out topTextureFrameHeight2)) + break; + TilePaintSystemV2.TreeFoliageVariantKey lookupKey3 = new TilePaintSystemV2.TreeFoliageVariantKey() + { + TextureIndex = treeStyle2, + PaintColor = (int) tile.color() + }; + this._paintSystem.RequestTreeTop(ref lookupKey3); + this._paintSystem.RequestTreeBranch(ref lookupKey3); + break; + case 596: + case 616: + int treeFrame3 = 0; + int floorY3 = 0; + int topTextureFrameWidth3 = 0; + int topTextureFrameHeight3 = 0; + int treeStyle3 = 0; + int xoffset3 = (tile.frameX == (short) 44).ToInt() - (tile.frameX == (short) 66).ToInt(); + if (!WorldGen.GetVanityTreeFoliageData(x, y, xoffset3, ref treeFrame3, ref treeStyle3, out floorY3, out topTextureFrameWidth3, out topTextureFrameHeight3)) + break; + TilePaintSystemV2.TreeFoliageVariantKey lookupKey4 = new TilePaintSystemV2.TreeFoliageVariantKey() + { + TextureIndex = treeStyle3, + PaintColor = (int) tile.color() + }; + this._paintSystem.RequestTreeTop(ref lookupKey4); + this._paintSystem.RequestTreeBranch(ref lookupKey4); + break; + } + } + + public void Update() + { + double lerpValue = (double) Utils.GetLerpValue(0.08f, 1.2f, Math.Abs(Main.WindForVisuals), true); + this._treeWindCounter += 1.0 / 240.0 + 1.0 / 240.0 * lerpValue * 2.0; + this._grassWindCounter += 1.0 / 180.0 + 1.0 / 180.0 * lerpValue * 4.0; + this._sunflowerWindCounter += 1.0 / 420.0 + 1.0 / 420.0 * lerpValue * 5.0; + this._vineWindCounter += 1.0 / 120.0 + 1.0 / 120.0 * lerpValue * 0.400000005960464; + this.UpdateLeafFrequency(); + this.EnsureWindGridSize(); + this._windGrid.Update(); + this._shouldShowInvisibleBlocks = Main.LocalPlayer.CanSeeInvisibleBlocks; + } + + public void PreDrawTiles(bool solidLayer, bool forRenderTargets, bool intoRenderTargets) + { + bool flag = intoRenderTargets || Lighting.UpdateEveryFrame; + if (!(!solidLayer & flag)) + return; + this._specialsCount[5] = 0; + this._specialsCount[4] = 0; + this._specialsCount[8] = 0; + this._specialsCount[6] = 0; + this._specialsCount[3] = 0; + this._specialsCount[0] = 0; + this._specialsCount[9] = 0; + this._specialsCount[10] = 0; + this._specialsCount[11] = 0; + } + + public void PostDrawTiles(bool solidLayer, bool forRenderTargets, bool intoRenderTargets) + { + if (!solidLayer && !intoRenderTargets) + { + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + this.DrawMultiTileVines(); + this.DrawMultiTileGrass(); + this.DrawVoidLenses(); + this.DrawTeleportationPylons(); + this.DrawMasterTrophies(); + this.DrawGrass(); + this.DrawTrees(); + this.DrawVines(); + this.DrawReverseVines(); + Main.spriteBatch.End(); + } + if (!solidLayer || intoRenderTargets) + return; + this.DrawEntities_HatRacks(); + this.DrawEntities_DisplayDolls(); + } + + public void Draw( + bool solidLayer, + bool forRenderTargets, + bool intoRenderTargets, + int waterStyleOverride = -1) + { + Stopwatch stopwatch = new Stopwatch(); + stopwatch.Start(); + this._isActiveAndNotPaused = !Main.gamePaused && Main.instance.IsActive; + this._localPlayer = Main.LocalPlayer; + Vector2 unscaledPosition = Main.Camera.UnscaledPosition; + Vector2 vector2 = new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange); + if (Main.drawToScreen) + vector2 = Vector2.Zero; + if (!solidLayer) + Main.critterCage = false; + this.EnsureWindGridSize(); + this.ClearLegacyCachedDraws(); + bool flag = intoRenderTargets || Main.LightingEveryFrame; + if (flag) + this.ClearCachedTileDraws(solidLayer); + float num1 = (float) ((double) byte.MaxValue * (1.0 - (double) Main.gfxQuality) + 30.0 * (double) Main.gfxQuality); + this._highQualityLightingRequirement.R = (byte) num1; + this._highQualityLightingRequirement.G = (byte) ((double) num1 * 1.1); + this._highQualityLightingRequirement.B = (byte) ((double) num1 * 1.2); + float num2 = (float) (50.0 * (1.0 - (double) Main.gfxQuality) + 2.0 * (double) Main.gfxQuality); + this._mediumQualityLightingRequirement.R = (byte) num2; + this._mediumQualityLightingRequirement.G = (byte) ((double) num2 * 1.1); + this._mediumQualityLightingRequirement.B = (byte) ((double) num2 * 1.2); + int firstTileX; + int lastTileX; + int firstTileY; + int lastTileY; + this.GetScreenDrawArea(unscaledPosition, vector2 + (Main.Camera.UnscaledPosition - Main.Camera.ScaledPosition), out firstTileX, out lastTileX, out firstTileY, out lastTileY); + byte num3 = (byte) (100.0 + 150.0 * (double) Main.martianLight); + this._martianGlow = new Color((int) num3, (int) num3, (int) num3, 0); + TileDrawInfo drawData = this._currentTileDrawInfo.Value; + for (int index1 = firstTileY; index1 < lastTileY + 4; ++index1) + { + for (int index2 = firstTileX - 2; index2 < lastTileX + 2; ++index2) + { + Tile tileCache = Main.tile[index2, index1]; + if (tileCache == null) + { + Tile tile = new Tile(); + Main.tile[index2, index1] = tile; + Main.mapTime += 60; + } + else if (tileCache.active() && this.IsTileDrawLayerSolid(tileCache.type) == solidLayer) + { + ushort type = tileCache.type; + short frameX = tileCache.frameX; + short frameY = tileCache.frameY; + if (!TextureAssets.Tile[(int) type].IsLoaded) + Main.instance.LoadTiles((int) type); + switch (type) + { + case 27: + if ((((int) frameX % 36 != 0 ? 0 : (frameY == (short) 0 ? 1 : 0)) & (flag ? 1 : 0)) != 0) + { + this.AddSpecialPoint(index2, index1, TileDrawing.TileCounterType.MultiTileGrass); + continue; + } + continue; + case 34: + if ((((int) frameX % 54 != 0 ? 0 : ((int) frameY % 54 == 0 ? 1 : 0)) & (flag ? 1 : 0)) != 0) + { + this.AddSpecialPoint(index2, index1, TileDrawing.TileCounterType.MultiTileVine); + continue; + } + continue; + case 42: + case 270: + case 271: + case 572: + case 581: + if ((((int) frameX % 18 != 0 ? 0 : ((int) frameY % 36 == 0 ? 1 : 0)) & (flag ? 1 : 0)) != 0) + { + this.AddSpecialPoint(index2, index1, TileDrawing.TileCounterType.MultiTileVine); + continue; + } + continue; + case 52: + case 62: + case 115: + case 205: + case 382: + case 528: + if (flag) + { + this.CrawlToTopOfVineAndAddSpecialPoint(index1, index2); + continue; + } + continue; + case 91: + if ((((int) frameX % 18 != 0 ? 0 : ((int) frameY % 54 == 0 ? 1 : 0)) & (flag ? 1 : 0)) != 0) + { + this.AddSpecialPoint(index2, index1, TileDrawing.TileCounterType.MultiTileVine); + continue; + } + continue; + case 95: + case 126: + case 444: + if ((((int) frameX % 36 != 0 ? 0 : ((int) frameY % 36 == 0 ? 1 : 0)) & (flag ? 1 : 0)) != 0) + { + this.AddSpecialPoint(index2, index1, TileDrawing.TileCounterType.MultiTileVine); + continue; + } + continue; + case 233: + if (((frameY != (short) 0 ? 0 : ((int) frameX % 54 == 0 ? 1 : 0)) & (flag ? 1 : 0)) != 0) + this.AddSpecialPoint(index2, index1, TileDrawing.TileCounterType.MultiTileGrass); + if (((frameY != (short) 34 ? 0 : ((int) frameX % 36 == 0 ? 1 : 0)) & (flag ? 1 : 0)) != 0) + { + this.AddSpecialPoint(index2, index1, TileDrawing.TileCounterType.MultiTileGrass); + continue; + } + continue; + case 236: + case 238: + if ((((int) frameX % 36 != 0 ? 0 : (frameY == (short) 0 ? 1 : 0)) & (flag ? 1 : 0)) != 0) + { + this.AddSpecialPoint(index2, index1, TileDrawing.TileCounterType.MultiTileGrass); + continue; + } + continue; + case 373: + case 374: + case 375: + case 461: + this.EmitLiquidDrops(index1, index2, tileCache, type); + continue; + case 454: + if ((((int) frameX % 72 != 0 ? 0 : ((int) frameY % 54 == 0 ? 1 : 0)) & (flag ? 1 : 0)) != 0) + { + this.AddSpecialPoint(index2, index1, TileDrawing.TileCounterType.MultiTileVine); + continue; + } + continue; + case 465: + case 591: + case 592: + if ((((int) frameX % 36 != 0 ? 0 : ((int) frameY % 54 == 0 ? 1 : 0)) & (flag ? 1 : 0)) != 0) + { + this.AddSpecialPoint(index2, index1, TileDrawing.TileCounterType.MultiTileVine); + continue; + } + continue; + case 485: + case 489: + case 490: + if (((frameY != (short) 0 ? 0 : ((int) frameX % 36 == 0 ? 1 : 0)) & (flag ? 1 : 0)) != 0) + { + this.AddSpecialPoint(index2, index1, TileDrawing.TileCounterType.MultiTileGrass); + continue; + } + continue; + case 491: + if (flag && frameX == (short) 18 && frameY == (short) 18) + { + this.AddSpecialPoint(index2, index1, TileDrawing.TileCounterType.VoidLens); + break; + } + break; + case 493: + if (((frameY != (short) 0 ? 0 : ((int) frameX % 18 == 0 ? 1 : 0)) & (flag ? 1 : 0)) != 0) + { + this.AddSpecialPoint(index2, index1, TileDrawing.TileCounterType.MultiTileGrass); + continue; + } + continue; + case 519: + if ((int) frameX / 18 <= 4 & flag) + { + this.AddSpecialPoint(index2, index1, TileDrawing.TileCounterType.MultiTileGrass); + continue; + } + continue; + case 521: + case 522: + case 523: + case 524: + case 525: + case 526: + case 527: + if (((frameY != (short) 0 ? 0 : ((int) frameX % 36 == 0 ? 1 : 0)) & (flag ? 1 : 0)) != 0) + { + this.AddSpecialPoint(index2, index1, TileDrawing.TileCounterType.MultiTileGrass); + continue; + } + continue; + case 530: + if (frameX < (short) 270) + { + if ((((int) frameX % 54 != 0 ? 0 : (frameY == (short) 0 ? 1 : 0)) & (flag ? 1 : 0)) != 0) + { + this.AddSpecialPoint(index2, index1, TileDrawing.TileCounterType.MultiTileGrass); + continue; + } + continue; + } + break; + case 541: + if (this._shouldShowInvisibleBlocks) + break; + continue; + case 549: + if (flag) + { + this.CrawlToBottomOfReverseVineAndAddSpecialPoint(index1, index2); + continue; + } + continue; + case 597: + if (flag && (int) frameX % 54 == 0 && frameY == (short) 0) + { + this.AddSpecialPoint(index2, index1, TileDrawing.TileCounterType.TeleportationPylon); + break; + } + break; + case 617: + if (flag && (int) frameX % 54 == 0 && (int) frameY % 72 == 0) + { + this.AddSpecialPoint(index2, index1, TileDrawing.TileCounterType.MasterTrophy); + break; + } + break; + default: + if (this.ShouldSwayInWind(index2, index1, tileCache)) + { + if (flag) + { + this.AddSpecialPoint(index2, index1, TileDrawing.TileCounterType.WindyGrass); + continue; + } + continue; + } + break; + } + this.DrawSingleTile(drawData, solidLayer, waterStyleOverride, unscaledPosition, vector2, index2, index1); + } + } + } + if (solidLayer) + { + Main.instance.DrawTileCracks(1, Main.player[Main.myPlayer].hitReplace); + Main.instance.DrawTileCracks(1, Main.player[Main.myPlayer].hitTile); + } + this.DrawSpecialTilesLegacy(unscaledPosition, vector2); + if (TileObject.objectPreview.Active && this._localPlayer.cursorItemIconEnabled && Main.placementPreview && !CaptureManager.Instance.Active) + { + Main.instance.LoadTiles((int) TileObject.objectPreview.Type); + TileObject.DrawPreview(Main.spriteBatch, TileObject.objectPreview, unscaledPosition - vector2); + } + if (solidLayer) + TimeLogger.DrawTime(0, stopwatch.Elapsed.TotalMilliseconds); + else + TimeLogger.DrawTime(1, stopwatch.Elapsed.TotalMilliseconds); + } + + private void CrawlToTopOfVineAndAddSpecialPoint(int j, int i) + { + int y = j; + for (int j1 = j - 1; j1 > 0; --j1) + { + Tile tile = Main.tile[i, j1]; + if (WorldGen.SolidTile(i, j1) || !tile.active()) + { + y = j1 + 1; + break; + } + } + Point point = new Point(i, y); + if (this._vineRootsPositions.Contains(point)) + return; + this._vineRootsPositions.Add(point); + this.AddSpecialPoint(i, y, TileDrawing.TileCounterType.Vine); + } + + private void CrawlToBottomOfReverseVineAndAddSpecialPoint(int j, int i) + { + int y = j; + for (int j1 = j; j1 < Main.maxTilesY; ++j1) + { + Tile tile = Main.tile[i, j1]; + if (WorldGen.SolidTile(i, j1) || !tile.active()) + { + y = j1 - 1; + break; + } + } + Point point = new Point(i, y); + if (this._reverseVineRootsPositions.Contains(point)) + return; + this._reverseVineRootsPositions.Add(point); + this.AddSpecialPoint(i, y, TileDrawing.TileCounterType.ReverseVine); + } + + private void DrawSingleTile( + TileDrawInfo drawData, + bool solidLayer, + int waterStyleOverride, + Vector2 screenPosition, + Vector2 screenOffset, + int tileX, + int tileY) + { + drawData.tileCache = Main.tile[tileX, tileY]; + drawData.typeCache = drawData.tileCache.type; + drawData.tileFrameX = drawData.tileCache.frameX; + drawData.tileFrameY = drawData.tileCache.frameY; + drawData.tileLight = Lighting.GetColor(tileX, tileY); + if (drawData.tileCache.liquid > (byte) 0 && drawData.tileCache.type == (ushort) 518) + return; + this.GetTileDrawData(tileX, tileY, drawData.tileCache, drawData.typeCache, ref drawData.tileFrameX, ref drawData.tileFrameY, out drawData.tileWidth, out drawData.tileHeight, out drawData.tileTop, out drawData.halfBrickHeight, out drawData.addFrX, out drawData.addFrY, out drawData.tileSpriteEffect, out drawData.glowTexture, out drawData.glowSourceRect, out drawData.glowColor); + drawData.drawTexture = this.GetTileDrawTexture(drawData.tileCache, tileX, tileY); + Texture2D highlightTexture = (Texture2D) null; + Rectangle rectangle1 = Rectangle.Empty; + Color transparent = Color.Transparent; + if (TileID.Sets.HasOutlines[(int) drawData.typeCache]) + this.GetTileOutlineInfo(tileX, tileY, drawData.typeCache, ref drawData.tileLight, ref highlightTexture, ref transparent); + if (this._localPlayer.dangerSense && TileDrawing.IsTileDangerous(this._localPlayer, drawData.tileCache, drawData.typeCache)) + { + if (drawData.tileLight.R < byte.MaxValue) + drawData.tileLight.R = byte.MaxValue; + if (drawData.tileLight.G < (byte) 50) + drawData.tileLight.G = (byte) 50; + if (drawData.tileLight.B < (byte) 50) + drawData.tileLight.B = (byte) 50; + if (this._isActiveAndNotPaused && this._rand.Next(30) == 0) + { + int index = Dust.NewDust(new Vector2((float) (tileX * 16), (float) (tileY * 16)), 16, 16, 60, Alpha: 100, Scale: 0.3f); + this._dust[index].fadeIn = 1f; + this._dust[index].velocity *= 0.1f; + this._dust[index].noLight = true; + this._dust[index].noGravity = true; + } + } + if (this._localPlayer.findTreasure && Main.IsTileSpelunkable(drawData.typeCache, drawData.tileFrameX, drawData.tileFrameY)) + { + if (drawData.tileLight.R < (byte) 200) + drawData.tileLight.R = (byte) 200; + if (drawData.tileLight.G < (byte) 170) + drawData.tileLight.G = (byte) 170; + if (this._isActiveAndNotPaused && this._rand.Next(60) == 0) + { + int index = Dust.NewDust(new Vector2((float) (tileX * 16), (float) (tileY * 16)), 16, 16, 204, Alpha: 150, Scale: 0.3f); + this._dust[index].fadeIn = 1f; + this._dust[index].velocity *= 0.1f; + this._dust[index].noLight = true; + } + } + if (this._isActiveAndNotPaused) + { + if (!Lighting.UpdateEveryFrame || new FastRandom(Main.TileFrameSeed).WithModifier(tileX, tileY).Next(4) == 0) + this.DrawTiles_EmitParticles(tileY, tileX, drawData.tileCache, drawData.typeCache, drawData.tileFrameX, drawData.tileFrameY, drawData.tileLight); + drawData.tileLight = this.DrawTiles_GetLightOverride(tileY, tileX, drawData.tileCache, drawData.typeCache, drawData.tileFrameX, drawData.tileFrameY, drawData.tileLight); + } + this.CacheSpecialDraws(tileX, tileY, drawData); + if (drawData.typeCache == (ushort) 72 && drawData.tileFrameX >= (short) 36) + { + int num = 0; + if (drawData.tileFrameY == (short) 18) + num = 1; + else if (drawData.tileFrameY == (short) 36) + num = 2; + Main.spriteBatch.Draw(TextureAssets.ShroomCap.Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X - 22), (float) (tileY * 16 - (int) screenPosition.Y - 26)) + screenOffset, new Rectangle?(new Rectangle(num * 62, 0, 60, 42)), Lighting.GetColor(tileX, tileY), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + Rectangle normalTileRect = new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY + drawData.addFrY, drawData.tileWidth, drawData.tileHeight - drawData.halfBrickHeight); + Vector2 vector2 = new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop + drawData.halfBrickHeight)) + screenOffset; + if (drawData.tileLight.R < (byte) 1 && drawData.tileLight.G < (byte) 1 && drawData.tileLight.B < (byte) 1) + return; + this.DrawTile_LiquidBehindTile(solidLayer, waterStyleOverride, screenPosition, screenOffset, tileX, tileY, drawData); + drawData.colorTint = Color.White; + drawData.finalColor = TileDrawing.GetFinalLight(drawData.tileCache, drawData.typeCache, drawData.tileLight, drawData.colorTint); + switch (drawData.typeCache) + { + case 51: + drawData.finalColor = drawData.tileLight * 0.5f; + break; + case 80: + bool evil; + bool good; + bool crimson; + this.GetCactusType(tileX, tileY, (int) drawData.tileFrameX, (int) drawData.tileFrameY, out evil, out good, out crimson); + if (evil) + normalTileRect.Y += 54; + if (good) + normalTileRect.Y += 108; + if (crimson) + { + normalTileRect.Y += 162; + break; + } + break; + case 83: + drawData.drawTexture = this.GetTileDrawTexture(drawData.tileCache, tileX, tileY); + break; + case 129: + drawData.finalColor = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 100); + int num1 = 2; + if (drawData.tileFrameX >= (short) 324) + drawData.finalColor = Color.Transparent; + if (drawData.tileFrameY < (short) 36) + { + vector2.Y += (float) (num1 * (drawData.tileFrameY == (short) 0).ToDirectionInt()); + break; + } + vector2.X += (float) (num1 * (drawData.tileFrameY == (short) 36).ToDirectionInt()); + break; + case 136: + switch ((int) drawData.tileFrameX / 18) + { + case 1: + vector2.X += -2f; + break; + case 2: + vector2.X += 2f; + break; + } + break; + case 160: + Color oldColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, (int) byte.MaxValue); + if (drawData.tileCache.inActive()) + oldColor = drawData.tileCache.actColor(oldColor); + drawData.finalColor = oldColor; + break; + case 272: + int num2 = (Main.tileFrame[(int) drawData.typeCache] + tileX % 2 + tileY % 2 + tileX % 3 + tileY % 3) % 2 * 90; + drawData.addFrY += num2; + normalTileRect.Y += num2; + break; + case 323: + if (drawData.tileCache.frameX <= (short) 132 && drawData.tileCache.frameX >= (short) 88) + return; + vector2.X += (float) drawData.tileCache.frameY; + break; + case 442: + if ((int) drawData.tileFrameX / 22 == 3) + { + vector2.X += 2f; + break; + } + break; + } + if (drawData.typeCache == (ushort) 314) + this.DrawTile_MinecartTrack(screenPosition, screenOffset, tileX, tileY, drawData); + else if (drawData.typeCache == (ushort) 171) + this.DrawXmasTree(screenPosition, screenOffset, tileX, tileY, drawData); + else + this.DrawBasicTile(screenPosition, screenOffset, tileX, tileY, drawData, normalTileRect, vector2); + if (Main.tileGlowMask[(int) drawData.tileCache.type] != (short) -1) + { + short num3 = Main.tileGlowMask[(int) drawData.tileCache.type]; + if (TextureAssets.GlowMask.IndexInRange>((int) num3)) + drawData.drawTexture = TextureAssets.GlowMask[(int) num3].Value; + double num4 = Main.timeForVisualEffects * 0.08; + Color color = Color.White; + bool flag = false; + switch (drawData.tileCache.type) + { + case 129: + if (drawData.tileFrameX < (short) 324) + { + flag = true; + break; + } + drawData.drawTexture = this.GetTileDrawTexture(drawData.tileCache, tileX, tileY); + Color rgb = Main.hslToRgb((float) (0.699999988079071 + Math.Sin(6.28318548202515 * (double) Main.GlobalTimeWrappedHourly * 0.159999996423721 + (double) tileX * 0.300000011920929 + (double) tileY * 0.699999988079071) * 0.159999996423721), 1f, 0.5f); + rgb.A /= (byte) 2; + color = rgb * 0.3f; + int num5 = 72; + for (float f = 0.0f; (double) f < 6.28318548202515; f += 1.570796f) + Main.spriteBatch.Draw(drawData.drawTexture, vector2 + f.ToRotationVector2() * 2f, new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY + drawData.addFrY + num5, drawData.tileWidth, drawData.tileHeight)), color, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 100); + break; + case 209: + color = PortalHelper.GetPortalColor(Main.myPlayer, drawData.tileCache.frameX >= (short) 288 ? 1 : 0); + break; + case 350: + color = new Color(new Vector4((float) (-Math.Cos((int) (num4 / 6.283) % 3 == 1 ? num4 : 0.0) * 0.2 + 0.2))); + break; + case 370: + case 390: + color = this._meteorGlow; + break; + case 381: + case 517: + color = this._lavaMossGlow; + break; + case 391: + color = new Color(250, 250, 250, 200); + break; + case 429: + case 445: + drawData.drawTexture = this.GetTileDrawTexture(drawData.tileCache, tileX, tileY); + drawData.addFrY = 18; + break; + case 534: + case 535: + color = this._kryptonMossGlow; + break; + case 536: + case 537: + color = this._xenonMossGlow; + break; + case 539: + case 540: + color = this._argonMossGlow; + break; + } + if (!flag) + { + if (drawData.tileCache.slope() == (byte) 0 && !drawData.tileCache.halfBrick()) + Main.spriteBatch.Draw(drawData.drawTexture, vector2, new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY + drawData.addFrY, drawData.tileWidth, drawData.tileHeight)), color, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + else if (drawData.tileCache.halfBrick()) + { + Main.spriteBatch.Draw(drawData.drawTexture, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + 10)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY + drawData.addFrY + 10, drawData.tileWidth, 6)), color, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + else + { + byte num6 = drawData.tileCache.slope(); + for (int index = 0; index < 8; ++index) + { + int width = index << 1; + Rectangle rectangle2 = new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY + drawData.addFrY + index * 2, width, 2); + int num7 = 0; + switch (num6) + { + case 2: + rectangle2.X = 16 - width; + num7 = 16 - width; + break; + case 3: + rectangle2.Width = 16 - width; + break; + case 4: + rectangle2.Width = 14 - width; + rectangle2.X = width + 2; + num7 = width + 2; + break; + } + Main.spriteBatch.Draw(drawData.drawTexture, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + (float) num7, (float) (tileY * 16 - (int) screenPosition.Y + index * 2)) + screenOffset, new Rectangle?(rectangle2), color, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } + } + } + if (drawData.glowTexture != null) + { + Vector2 position = new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset; + if (TileID.Sets.Platforms[(int) drawData.typeCache]) + position = vector2; + Main.spriteBatch.Draw(drawData.glowTexture, position, new Rectangle?(drawData.glowSourceRect), drawData.glowColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + if (highlightTexture == null) + return; + rectangle1 = new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY + drawData.addFrY, drawData.tileWidth, drawData.tileHeight); + int num8 = 0; + int num9 = 0; + Main.spriteBatch.Draw(highlightTexture, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + (float) num8, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop + num9)) + screenOffset, new Rectangle?(rectangle1), transparent, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + + private Texture2D GetTileDrawTexture(Tile tile, int tileX, int tileY) + { + Texture2D texture2D = TextureAssets.Tile[(int) tile.type].Value; + int tileStyle = 0; + int num = (int) tile.type; + switch (tile.type) + { + case 5: + tileStyle = TileDrawing.GetTreeBiome(tileX, tileY, (int) tile.frameX, (int) tile.frameY); + break; + case 83: + if (this.IsAlchemyPlantHarvestable((int) tile.frameX / 18)) + num = 84; + Main.instance.LoadTiles(num); + break; + case 323: + tileStyle = this.GetPalmTreeBiome(tileX, tileY); + break; + } + Texture2D requestIfNotReady = this._paintSystem.TryGetTileAndRequestIfNotReady(num, tileStyle, (int) tile.color()); + if (requestIfNotReady != null) + texture2D = requestIfNotReady; + return texture2D; + } + + private Texture2D GetTileDrawTexture( + Tile tile, + int tileX, + int tileY, + int paintOverride) + { + Texture2D texture2D = TextureAssets.Tile[(int) tile.type].Value; + int tileStyle = 0; + int num = (int) tile.type; + switch (tile.type) + { + case 5: + tileStyle = TileDrawing.GetTreeBiome(tileX, tileY, (int) tile.frameX, (int) tile.frameY); + break; + case 83: + if (this.IsAlchemyPlantHarvestable((int) tile.frameX / 18)) + num = 84; + Main.instance.LoadTiles(num); + break; + case 323: + tileStyle = this.GetPalmTreeBiome(tileX, tileY); + break; + } + Texture2D requestIfNotReady = this._paintSystem.TryGetTileAndRequestIfNotReady(num, tileStyle, paintOverride); + if (requestIfNotReady != null) + texture2D = requestIfNotReady; + return texture2D; + } + + private void DrawBasicTile( + Vector2 screenPosition, + Vector2 screenOffset, + int tileX, + int tileY, + TileDrawInfo drawData, + Rectangle normalTileRect, + Vector2 normalTilePosition) + { + if (drawData.tileCache.slope() > (byte) 0) + { + if (TileID.Sets.Platforms[(int) drawData.tileCache.type]) + { + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition, new Rectangle?(normalTileRect), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + if (drawData.tileCache.slope() == (byte) 1 && Main.tile[tileX + 1, tileY + 1].active() && Main.tileSolid[(int) Main.tile[tileX + 1, tileY + 1].type] && Main.tile[tileX + 1, tileY + 1].slope() != (byte) 2 && !Main.tile[tileX + 1, tileY + 1].halfBrick() && (!Main.tile[tileX, tileY + 1].active() || Main.tile[tileX, tileY + 1].blockType() != 0 && Main.tile[tileX, tileY + 1].blockType() != 5 || !TileID.Sets.BlocksStairs[(int) Main.tile[tileX, tileY + 1].type] && !TileID.Sets.BlocksStairsAbove[(int) Main.tile[tileX, tileY + 1].type])) + { + Rectangle rectangle = new Rectangle(198, (int) drawData.tileFrameY, 16, 16); + if (TileID.Sets.Platforms[(int) Main.tile[tileX + 1, tileY + 1].type] && Main.tile[tileX + 1, tileY + 1].slope() == (byte) 0) + rectangle.X = 324; + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition + new Vector2(0.0f, 16f), new Rectangle?(rectangle), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + else + { + if (drawData.tileCache.slope() != (byte) 2 || !Main.tile[tileX - 1, tileY + 1].active() || !Main.tileSolid[(int) Main.tile[tileX - 1, tileY + 1].type] || Main.tile[tileX - 1, tileY + 1].slope() == (byte) 1 || Main.tile[tileX - 1, tileY + 1].halfBrick() || Main.tile[tileX, tileY + 1].active() && (Main.tile[tileX, tileY + 1].blockType() == 0 || Main.tile[tileX, tileY + 1].blockType() == 4) && (TileID.Sets.BlocksStairs[(int) Main.tile[tileX, tileY + 1].type] || TileID.Sets.BlocksStairsAbove[(int) Main.tile[tileX, tileY + 1].type])) + return; + Rectangle rectangle = new Rectangle(162, (int) drawData.tileFrameY, 16, 16); + if (TileID.Sets.Platforms[(int) Main.tile[tileX - 1, tileY + 1].type] && Main.tile[tileX - 1, tileY + 1].slope() == (byte) 0) + rectangle.X = 306; + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition + new Vector2(0.0f, 16f), new Rectangle?(rectangle), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + } + else if (TileID.Sets.HasSlopeFrames[(int) drawData.tileCache.type]) + { + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition, new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY + drawData.addFrY, 16, 16)), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + else + { + int num1 = (int) drawData.tileCache.slope(); + int width = 2; + for (int index = 0; index < 8; ++index) + { + int num2 = index * -2; + int height = 16 - index * 2; + int num3 = 16 - height; + int num4; + switch (num1) + { + case 1: + num2 = 0; + num4 = index * 2; + height = 14 - index * 2; + num3 = 0; + break; + case 2: + num2 = 0; + num4 = 16 - index * 2 - 2; + height = 14 - index * 2; + num3 = 0; + break; + case 3: + num4 = index * 2; + break; + default: + num4 = 16 - index * 2 - 2; + break; + } + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition + new Vector2((float) num4, (float) (index * width + num2)), new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX + num4, (int) drawData.tileFrameY + drawData.addFrY + num3, width, height)), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + int num5 = num1 > 2 ? 0 : 14; + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition + new Vector2(0.0f, (float) num5), new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY + drawData.addFrY + num5, 16, 2)), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + } + else if (!TileID.Sets.Platforms[(int) drawData.typeCache] && !TileID.Sets.IgnoresNearbyHalfbricksWhenDrawn[(int) drawData.typeCache] && this._tileSolid[(int) drawData.typeCache] && !TileID.Sets.NotReallySolid[(int) drawData.typeCache] && !drawData.tileCache.halfBrick() && (Main.tile[tileX - 1, tileY].halfBrick() || Main.tile[tileX + 1, tileY].halfBrick())) + { + if (Main.tile[tileX - 1, tileY].halfBrick() && Main.tile[tileX + 1, tileY].halfBrick()) + { + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition + new Vector2(0.0f, 8f), new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, drawData.addFrY + (int) drawData.tileFrameY + 8, drawData.tileWidth, 8)), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + Rectangle rectangle = new Rectangle(126 + drawData.addFrX, drawData.addFrY, 16, 8); + if (Main.tile[tileX, tileY - 1].active() && !Main.tile[tileX, tileY - 1].bottomSlope() && (int) Main.tile[tileX, tileY - 1].type == (int) drawData.typeCache) + rectangle = new Rectangle(90 + drawData.addFrX, drawData.addFrY, 16, 8); + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition, new Rectangle?(rectangle), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + else if (Main.tile[tileX - 1, tileY].halfBrick()) + { + int width = 4; + if (TileID.Sets.AllBlocksWithSmoothBordersToResolveHalfBlockIssue[(int) drawData.typeCache]) + width = 2; + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition + new Vector2(0.0f, 8f), new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, drawData.addFrY + (int) drawData.tileFrameY + 8, drawData.tileWidth, 8)), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition + new Vector2((float) width, 0.0f), new Rectangle?(new Rectangle((int) drawData.tileFrameX + width + drawData.addFrX, drawData.addFrY + (int) drawData.tileFrameY, drawData.tileWidth - width, drawData.tileHeight)), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition, new Rectangle?(new Rectangle(144 + drawData.addFrX, drawData.addFrY, width, 8)), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + if (width != 2) + return; + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition, new Rectangle?(new Rectangle(148 + drawData.addFrX, drawData.addFrY, 2, 2)), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + else + { + if (!Main.tile[tileX + 1, tileY].halfBrick()) + return; + int width = 4; + if (TileID.Sets.AllBlocksWithSmoothBordersToResolveHalfBlockIssue[(int) drawData.typeCache]) + width = 2; + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition + new Vector2(0.0f, 8f), new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, drawData.addFrY + (int) drawData.tileFrameY + 8, drawData.tileWidth, 8)), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition, new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, drawData.addFrY + (int) drawData.tileFrameY, drawData.tileWidth - width, drawData.tileHeight)), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition + new Vector2((float) (16 - width), 0.0f), new Rectangle?(new Rectangle(144 + (16 - width), 0, width, 8)), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + if (width != 2) + return; + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition + new Vector2(14f, 0.0f), new Rectangle?(new Rectangle(156, 0, 2, 2)), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + } + else if (Lighting.NotRetro && this._tileSolid[(int) drawData.typeCache] && !drawData.tileCache.halfBrick() && !drawData.tileCache.inActive() && drawData.typeCache != (ushort) 137 && drawData.typeCache != (ushort) 235 && drawData.typeCache != (ushort) 388 && drawData.typeCache != (ushort) 476 && drawData.typeCache != (ushort) 160 && drawData.typeCache != (ushort) 138) + { + this.DrawSingleTile_SlicedBlock(normalTilePosition, tileX, tileY, drawData); + } + else + { + if (drawData.halfBrickHeight == 8 && (!Main.tile[tileX, tileY + 1].active() || !this._tileSolid[(int) Main.tile[tileX, tileY + 1].type] || Main.tile[tileX, tileY + 1].halfBrick())) + { + if (TileID.Sets.Platforms[(int) drawData.typeCache]) + { + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition, new Rectangle?(normalTileRect), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + else + { + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition, new Rectangle?(normalTileRect.Modified(0, 0, 0, -4)), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition + new Vector2(0.0f, 4f), new Rectangle?(new Rectangle(144 + drawData.addFrX, 66 + drawData.addFrY, drawData.tileWidth, 4)), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + } + else + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition, new Rectangle?(normalTileRect), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + this.DrawSingleTile_Flames(screenPosition, screenOffset, tileX, tileY, drawData); + } + } + + private int GetPalmTreeBiome(int tileX, int tileY) + { + int x = tileX; + int y = tileY; + while (Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 323) + ++y; + return this.GetPalmTreeVariant(x, y); + } + + private static int GetTreeBiome(int tileX, int tileY, int tileFrameX, int tileFrameY) + { + int x = tileX; + int y = tileY; + int type = (int) Main.tile[x, y].type; + if (tileFrameX == 66 && tileFrameY <= 45) + ++x; + if (tileFrameX == 88 && tileFrameY >= 66 && tileFrameY <= 110) + --x; + if (tileFrameY >= 198) + { + switch (tileFrameX) + { + case 44: + ++x; + break; + case 66: + --x; + break; + } + } + else if (tileFrameY >= 132) + { + switch (tileFrameX) + { + case 22: + --x; + break; + case 44: + ++x; + break; + } + } + while (Main.tile[x, y].active() && (int) Main.tile[x, y].type == type) + ++y; + return TileDrawing.GetTreeVariant(x, y); + } + + public static int GetTreeVariant(int x, int y) + { + if (Main.tile[x, y] == null || !Main.tile[x, y].active()) + return -1; + switch (Main.tile[x, y].type) + { + case 23: + return 0; + case 60: + return (double) y <= Main.worldSurface ? 1 : 5; + case 70: + return 6; + case 109: + case 492: + return 2; + case 147: + return 3; + case 199: + return 4; + default: + return -1; + } + } + + private TileDrawing.TileFlameData GetTileFlameData( + int tileX, + int tileY, + int type, + int tileFrameY) + { + switch (type) + { + case 270: + return new TileDrawing.TileFlameData() + { + flameTexture = TextureAssets.FireflyJar.Value, + flameColor = new Color(200, 200, 200, 0), + flameCount = 1 + }; + case 271: + return new TileDrawing.TileFlameData() + { + flameTexture = TextureAssets.LightningbugJar.Value, + flameColor = new Color(200, 200, 200, 0), + flameCount = 1 + }; + case 581: + return new TileDrawing.TileFlameData() + { + flameTexture = TextureAssets.GlowMask[291].Value, + flameColor = new Color(200, 100, 100, 0), + flameCount = 1 + }; + default: + if (!Main.tileFlame[type]) + return new TileDrawing.TileFlameData(); + ulong num = Main.TileFrameSeed ^ ((ulong) tileX << 32 | (ulong) (uint) tileY); + int index = 0; + switch (type) + { + case 4: + index = 0; + break; + case 33: + case 174: + index = 1; + break; + case 34: + index = 3; + break; + case 35: + index = 7; + break; + case 42: + index = 13; + break; + case 49: + index = 5; + break; + case 93: + index = 4; + break; + case 98: + index = 6; + break; + case 100: + case 173: + index = 2; + break; + case 372: + index = 16; + break; + } + TileDrawing.TileFlameData tileFlameData = new TileDrawing.TileFlameData() + { + flameTexture = TextureAssets.Flames[index].Value, + flameSeed = num + }; + switch (index) + { + case 1: + switch ((int) Main.tile[tileX, tileY].frameY / 22) + { + case 5: + case 6: + case 7: + case 10: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(50, 50, 50, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.075f; + tileFlameData.flameRangeMultY = 0.075f; + break; + case 8: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(50, 50, 50, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.3f; + tileFlameData.flameRangeMultY = 0.3f; + break; + case 12: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(50, 50, 50, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 1; + tileFlameData.flameRangeMultX = 0.1f; + tileFlameData.flameRangeMultY = 0.15f; + break; + case 14: + tileFlameData.flameCount = 8; + tileFlameData.flameColor = new Color(75, 75, 75, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.1f; + tileFlameData.flameRangeMultY = 0.1f; + break; + case 16: + tileFlameData.flameCount = 4; + tileFlameData.flameColor = new Color(75, 75, 75, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.15f; + tileFlameData.flameRangeMultY = 0.15f; + break; + case 27: + case 28: + tileFlameData.flameCount = 1; + tileFlameData.flameColor = new Color(75, 75, 75, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.0f; + tileFlameData.flameRangeMultY = 0.0f; + break; + default: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(100, 100, 100, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 1; + tileFlameData.flameRangeMultX = 0.15f; + tileFlameData.flameRangeMultY = 0.35f; + break; + } + break; + case 2: + switch ((int) Main.tile[tileX, tileY].frameY / 36) + { + case 3: + tileFlameData.flameCount = 3; + tileFlameData.flameColor = new Color(50, 50, 50, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.05f; + tileFlameData.flameRangeMultY = 0.15f; + break; + case 6: + tileFlameData.flameCount = 5; + tileFlameData.flameColor = new Color(75, 75, 75, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.15f; + tileFlameData.flameRangeMultY = 0.15f; + break; + case 9: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(100, 100, 100, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.3f; + tileFlameData.flameRangeMultY = 0.3f; + break; + case 11: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(50, 50, 50, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 1; + tileFlameData.flameRangeMultX = 0.1f; + tileFlameData.flameRangeMultY = 0.15f; + break; + case 13: + tileFlameData.flameCount = 8; + tileFlameData.flameColor = new Color(75, 75, 75, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.1f; + tileFlameData.flameRangeMultY = 0.1f; + break; + case 28: + case 29: + tileFlameData.flameCount = 1; + tileFlameData.flameColor = new Color(75, 75, 75, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 1; + tileFlameData.flameRangeMultX = 0.0f; + tileFlameData.flameRangeMultY = 0.0f; + break; + default: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(100, 100, 100, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 1; + tileFlameData.flameRangeMultX = 0.15f; + tileFlameData.flameRangeMultY = 0.35f; + break; + } + break; + case 3: + switch ((int) Main.tile[tileX, tileY].frameY / 54) + { + case 8: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(50, 50, 50, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.075f; + tileFlameData.flameRangeMultY = 0.075f; + break; + case 9: + tileFlameData.flameCount = 3; + tileFlameData.flameColor = new Color(50, 50, 50, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.05f; + tileFlameData.flameRangeMultY = 0.15f; + break; + case 11: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(50, 50, 50, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.3f; + tileFlameData.flameRangeMultY = 0.3f; + break; + case 15: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(50, 50, 50, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 1; + tileFlameData.flameRangeMultX = 0.1f; + tileFlameData.flameRangeMultY = 0.15f; + break; + case 17: + case 20: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(50, 50, 50, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.075f; + tileFlameData.flameRangeMultY = 0.075f; + break; + case 18: + tileFlameData.flameCount = 8; + tileFlameData.flameColor = new Color(75, 75, 75, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.1f; + tileFlameData.flameRangeMultY = 0.1f; + break; + case 34: + case 35: + tileFlameData.flameCount = 1; + tileFlameData.flameColor = new Color(75, 75, 75, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.0f; + tileFlameData.flameRangeMultY = 0.0f; + break; + default: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(100, 100, 100, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 1; + tileFlameData.flameRangeMultX = 0.15f; + tileFlameData.flameRangeMultY = 0.35f; + break; + } + break; + case 4: + switch ((int) Main.tile[tileX, tileY].frameY / 54) + { + case 1: + tileFlameData.flameCount = 3; + tileFlameData.flameColor = new Color(50, 50, 50, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.15f; + tileFlameData.flameRangeMultY = 0.15f; + break; + case 2: + case 4: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(50, 50, 50, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.075f; + tileFlameData.flameRangeMultY = 0.075f; + break; + case 3: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(100, 100, 100, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -20; + tileFlameData.flameRangeYMax = 1; + tileFlameData.flameRangeMultX = 0.2f; + tileFlameData.flameRangeMultY = 0.35f; + break; + case 5: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(50, 50, 50, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.3f; + tileFlameData.flameRangeMultY = 0.3f; + break; + case 9: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(50, 50, 50, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 1; + tileFlameData.flameRangeMultX = 0.1f; + tileFlameData.flameRangeMultY = 0.15f; + break; + case 12: + tileFlameData.flameCount = 1; + tileFlameData.flameColor = new Color(100, 100, 100, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.01f; + tileFlameData.flameRangeMultY = 0.01f; + break; + case 13: + tileFlameData.flameCount = 8; + tileFlameData.flameColor = new Color(50, 50, 50, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.1f; + tileFlameData.flameRangeMultY = 0.1f; + break; + case 28: + case 29: + tileFlameData.flameCount = 1; + tileFlameData.flameColor = new Color(75, 75, 75, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.0f; + tileFlameData.flameRangeMultY = 0.0f; + break; + default: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(100, 100, 100, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 1; + tileFlameData.flameRangeMultX = 0.15f; + tileFlameData.flameRangeMultY = 0.35f; + break; + } + break; + case 7: + tileFlameData.flameCount = 4; + tileFlameData.flameColor = new Color(50, 50, 50, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 10; + tileFlameData.flameRangeMultX = 0.0f; + tileFlameData.flameRangeMultY = 0.0f; + break; + case 13: + switch (tileFrameY / 36) + { + case 1: + case 3: + case 6: + case 8: + case 19: + case 27: + case 29: + case 30: + case 31: + case 32: + case 36: + case 39: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(100, 100, 100, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 1; + tileFlameData.flameRangeMultX = 0.15f; + tileFlameData.flameRangeMultY = 0.35f; + break; + case 2: + case 16: + case 25: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(50, 50, 50, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 1; + tileFlameData.flameRangeMultX = 0.15f; + tileFlameData.flameRangeMultY = 0.1f; + break; + case 11: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(50, 50, 50, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 11; + tileFlameData.flameRangeMultX = 0.075f; + tileFlameData.flameRangeMultY = 0.075f; + break; + case 34: + case 35: + tileFlameData.flameCount = 1; + tileFlameData.flameColor = new Color(75, 75, 75, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 1; + tileFlameData.flameRangeMultX = 0.0f; + tileFlameData.flameRangeMultY = 0.0f; + break; + case 44: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(100, 100, 100, 0); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 1; + tileFlameData.flameRangeMultX = 0.15f; + tileFlameData.flameRangeMultY = 0.35f; + break; + default: + tileFlameData.flameCount = 0; + break; + } + break; + default: + tileFlameData.flameCount = 7; + tileFlameData.flameColor = new Color(100, 100, 100, 0); + if (tileFrameY / 22 == 14) + tileFlameData.flameColor = new Color((float) Main.DiscoR / (float) byte.MaxValue, (float) Main.DiscoG / (float) byte.MaxValue, (float) Main.DiscoB / (float) byte.MaxValue, 0.0f); + tileFlameData.flameRangeXMin = -10; + tileFlameData.flameRangeXMax = 11; + tileFlameData.flameRangeYMin = -10; + tileFlameData.flameRangeYMax = 1; + tileFlameData.flameRangeMultX = 0.15f; + tileFlameData.flameRangeMultY = 0.35f; + break; + } + return tileFlameData; + } + } + + private void DrawSingleTile_Flames( + Vector2 screenPosition, + Vector2 screenOffset, + int tileX, + int tileY, + TileDrawInfo drawData) + { + if (drawData.typeCache == (ushort) 548 && (int) drawData.tileFrameX / 54 > 6) + Main.spriteBatch.Draw(TextureAssets.GlowMask[297].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY + drawData.addFrY, drawData.tileWidth, drawData.tileHeight)), Color.White, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + if (drawData.typeCache == (ushort) 613) + Main.spriteBatch.Draw(TextureAssets.GlowMask[298].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY + drawData.addFrY, drawData.tileWidth, drawData.tileHeight)), Color.White, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + if (drawData.typeCache == (ushort) 614) + Main.spriteBatch.Draw(TextureAssets.GlowMask[299].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY + drawData.addFrY, drawData.tileWidth, drawData.tileHeight)), Color.White, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + if (drawData.typeCache == (ushort) 593) + Main.spriteBatch.Draw(TextureAssets.GlowMask[295].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY + drawData.addFrY, drawData.tileWidth, drawData.tileHeight)), Color.White, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + if (drawData.typeCache == (ushort) 594) + Main.spriteBatch.Draw(TextureAssets.GlowMask[296].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY + drawData.addFrY, drawData.tileWidth, drawData.tileHeight)), Color.White, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + if (drawData.typeCache == (ushort) 215 && drawData.tileFrameY < (short) 36) + { + int index = 15; + Color color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + if ((int) drawData.tileFrameX / 54 == 5) + color = new Color((float) Main.DiscoR / (float) byte.MaxValue, (float) Main.DiscoG / (float) byte.MaxValue, (float) Main.DiscoB / (float) byte.MaxValue, 0.0f); + Main.spriteBatch.Draw(TextureAssets.Flames[index].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY + drawData.addFrY, drawData.tileWidth, drawData.tileHeight)), color, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + if (drawData.typeCache == (ushort) 85) + { + float graveyardVisualIntensity = Main.GraveyardVisualIntensity; + if ((double) graveyardVisualIntensity > 0.0) + { + ulong num1 = Main.TileFrameSeed ^ ((ulong) tileX << 32 | (ulong) (uint) tileY); + TileDrawing.TileFlameData tileFlameData = this.GetTileFlameData(tileX, tileY, (int) drawData.typeCache, (int) drawData.tileFrameY); + if (num1 == 0UL) + num1 = tileFlameData.flameSeed; + tileFlameData.flameSeed = num1; + Vector2 position = new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset; + Rectangle rectangle = new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight); + for (int index = 0; index < tileFlameData.flameCount; ++index) + { + Color color = tileFlameData.flameColor * graveyardVisualIntensity; + float x = (float) Utils.RandomInt(ref tileFlameData.flameSeed, tileFlameData.flameRangeXMin, tileFlameData.flameRangeXMax) * tileFlameData.flameRangeMultX; + float y = (float) Utils.RandomInt(ref tileFlameData.flameSeed, tileFlameData.flameRangeYMin, tileFlameData.flameRangeYMax) * tileFlameData.flameRangeMultY; + for (float num2 = 0.0f; (double) num2 < 1.0; num2 += 0.25f) + Main.spriteBatch.Draw(tileFlameData.flameTexture, position + new Vector2(x, y) + Vector2.UnitX.RotatedBy((double) num2 * 6.28318548202515) * 2f, new Rectangle?(rectangle), color, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + Main.spriteBatch.Draw(tileFlameData.flameTexture, position, new Rectangle?(rectangle), Color.White * graveyardVisualIntensity, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + } + } + if (drawData.typeCache == (ushort) 286) + Main.spriteBatch.Draw(TextureAssets.GlowSnail.Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY + drawData.addFrY, drawData.tileWidth, drawData.tileHeight)), new Color(75, 100, (int) byte.MaxValue, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + if (drawData.typeCache == (ushort) 582) + Main.spriteBatch.Draw(TextureAssets.GlowMask[293].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY + drawData.addFrY, drawData.tileWidth, drawData.tileHeight)), new Color(200, 100, 100, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + if (drawData.typeCache == (ushort) 391) + Main.spriteBatch.Draw(TextureAssets.GlowMask[131].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY + drawData.addFrY, drawData.tileWidth, drawData.tileHeight)), new Color(250, 250, 250, 200), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + if (drawData.typeCache == (ushort) 619) + Main.spriteBatch.Draw(TextureAssets.GlowMask[300].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY + drawData.addFrY, drawData.tileWidth, drawData.tileHeight)), new Color(75, 100, (int) byte.MaxValue, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + if (drawData.typeCache == (ushort) 270) + Main.spriteBatch.Draw(TextureAssets.FireflyJar.Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(200, 200, 200, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + if (drawData.typeCache == (ushort) 271) + Main.spriteBatch.Draw(TextureAssets.LightningbugJar.Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(200, 200, 200, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + if (drawData.typeCache == (ushort) 581) + Main.spriteBatch.Draw(TextureAssets.GlowMask[291].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(200, 200, 200, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + if (drawData.typeCache == (ushort) 316 || drawData.typeCache == (ushort) 317 || drawData.typeCache == (ushort) 318) + { + int index = (tileX - (int) drawData.tileFrameX / 18) / 2 * ((tileY - (int) drawData.tileFrameY / 18) / 3) % Main.cageFrames; + Main.spriteBatch.Draw(TextureAssets.JellyfishBowl[(int) drawData.typeCache - 316].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY + Main.jellyfishCageFrame[(int) drawData.typeCache - 316, index] * 36, drawData.tileWidth, drawData.tileHeight)), new Color(200, 200, 200, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + if (drawData.typeCache == (ushort) 149 && drawData.tileFrameX < (short) 54) + Main.spriteBatch.Draw(TextureAssets.XmasLight.Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(200, 200, 200, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + if (drawData.typeCache == (ushort) 300 || drawData.typeCache == (ushort) 302 || drawData.typeCache == (ushort) 303 || drawData.typeCache == (ushort) 306) + { + int index = 9; + if (drawData.typeCache == (ushort) 302) + index = 10; + if (drawData.typeCache == (ushort) 303) + index = 11; + if (drawData.typeCache == (ushort) 306) + index = 12; + Main.spriteBatch.Draw(TextureAssets.Flames[index].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY + drawData.addFrY, drawData.tileWidth, drawData.tileHeight)), new Color(200, 200, 200, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + else if (Main.tileFlame[(int) drawData.typeCache]) + { + ulong seed = Main.TileFrameSeed ^ ((ulong) tileX << 32 | (ulong) (uint) tileY); + int typeCache = (int) drawData.typeCache; + int index1 = 0; + switch (typeCache) + { + case 4: + index1 = 0; + break; + case 33: + case 174: + index1 = 1; + break; + case 34: + index1 = 3; + break; + case 35: + index1 = 7; + break; + case 42: + index1 = 13; + break; + case 49: + index1 = 5; + break; + case 93: + index1 = 4; + break; + case 98: + index1 = 6; + break; + case 100: + case 173: + index1 = 2; + break; + case 372: + index1 = 16; + break; + } + switch (index1) + { + case 1: + switch ((int) Main.tile[tileX, tileY].frameY / 22) + { + case 5: + case 6: + case 7: + case 10: + for (int index2 = 0; index2 < 7; ++index2) + { + float num3 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.075f; + float num4 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.075f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num3, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num4) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(50, 50, 50, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 8: + for (int index3 = 0; index3 < 7; ++index3) + { + float num5 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.3f; + float num6 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.3f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num5, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num6) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(50, 50, 50, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 12: + for (int index4 = 0; index4 < 7; ++index4) + { + float num7 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + float num8 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.15f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num7, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num8) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(50, 50, 50, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 14: + for (int index5 = 0; index5 < 8; ++index5) + { + float num9 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + float num10 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num9, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num10) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(75, 75, 75, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 16: + for (int index6 = 0; index6 < 4; ++index6) + { + float num11 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num12 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num11, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num12) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(75, 75, 75, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 27: + case 28: + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(75, 75, 75, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + break; + default: + for (int index7 = 0; index7 < 7; ++index7) + { + float num13 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num14 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.35f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num13, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num14) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(100, 100, 100, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + } + break; + case 2: + switch ((int) Main.tile[tileX, tileY].frameY / 36) + { + case 3: + for (int index8 = 0; index8 < 3; ++index8) + { + float num15 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.05f; + float num16 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num15, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num16) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(50, 50, 50, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 6: + for (int index9 = 0; index9 < 5; ++index9) + { + float num17 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num18 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num17, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num18) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(75, 75, 75, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 9: + for (int index10 = 0; index10 < 7; ++index10) + { + float num19 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.3f; + float num20 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.3f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num19, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num20) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(100, 100, 100, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 11: + for (int index11 = 0; index11 < 7; ++index11) + { + float num21 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + float num22 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.15f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num21, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num22) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(50, 50, 50, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 13: + for (int index12 = 0; index12 < 8; ++index12) + { + float num23 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + float num24 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num23, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num24) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(75, 75, 75, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 28: + case 29: + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(75, 75, 75, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + break; + default: + for (int index13 = 0; index13 < 7; ++index13) + { + float num25 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num26 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.35f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num25, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num26) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(100, 100, 100, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + } + break; + case 3: + switch ((int) Main.tile[tileX, tileY].frameY / 54) + { + case 8: + for (int index14 = 0; index14 < 7; ++index14) + { + float num27 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.075f; + float num28 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.075f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num27, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num28) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(50, 50, 50, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 9: + for (int index15 = 0; index15 < 3; ++index15) + { + float num29 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.05f; + float num30 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num29, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num30) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(50, 50, 50, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 11: + for (int index16 = 0; index16 < 7; ++index16) + { + float num31 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.3f; + float num32 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.3f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num31, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num32) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(50, 50, 50, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 15: + for (int index17 = 0; index17 < 7; ++index17) + { + float num33 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + float num34 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.15f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num33, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num34) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(50, 50, 50, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 17: + case 20: + for (int index18 = 0; index18 < 7; ++index18) + { + float num35 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.075f; + float num36 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.075f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num35, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num36) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(50, 50, 50, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 18: + for (int index19 = 0; index19 < 8; ++index19) + { + float num37 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + float num38 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num37, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num38) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(75, 75, 75, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 34: + case 35: + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(75, 75, 75, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + break; + default: + for (int index20 = 0; index20 < 7; ++index20) + { + float num39 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num40 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.35f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num39, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num40) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(100, 100, 100, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + } + break; + case 4: + switch ((int) Main.tile[tileX, tileY].frameY / 54) + { + case 1: + for (int index21 = 0; index21 < 3; ++index21) + { + float num41 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num42 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num41, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num42) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(50, 50, 50, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 2: + case 4: + for (int index22 = 0; index22 < 7; ++index22) + { + float num43 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.075f; + float num44 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.075f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num43, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num44) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(50, 50, 50, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 3: + for (int index23 = 0; index23 < 7; ++index23) + { + float num45 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.2f; + float num46 = (float) Utils.RandomInt(ref seed, -20, 1) * 0.35f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num45, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num46) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(100, 100, 100, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 5: + for (int index24 = 0; index24 < 7; ++index24) + { + float num47 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.3f; + float num48 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.3f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num47, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num48) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(50, 50, 50, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 9: + for (int index25 = 0; index25 < 7; ++index25) + { + float num49 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + float num50 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.15f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num49, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num50) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(50, 50, 50, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 12: + float num51 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.01f; + float num52 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.01f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num51, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num52) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(Utils.RandomInt(ref seed, 90, 111), Utils.RandomInt(ref seed, 90, 111), Utils.RandomInt(ref seed, 90, 111), 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + break; + case 13: + for (int index26 = 0; index26 < 8; ++index26) + { + float num53 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + float num54 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.1f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num53, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num54) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(75, 75, 75, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 28: + case 29: + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(75, 75, 75, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + break; + default: + for (int index27 = 0; index27 < 7; ++index27) + { + float num55 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num56 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.35f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num55, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num56) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY + drawData.addFrY, drawData.tileWidth, drawData.tileHeight)), new Color(100, 100, 100, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + } + break; + case 7: + for (int index28 = 0; index28 < 4; ++index28) + { + float num57 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num58 = (float) Utils.RandomInt(ref seed, -10, 10) * 0.15f; + float num59 = 0.0f; + float num60 = 0.0f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num59, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num60) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(50, 50, 50, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + case 13: + int num61 = (int) drawData.tileFrameY / 36; + if (num61 == 1 || num61 == 3 || num61 == 6 || num61 == 8 || num61 == 19 || num61 == 27 || num61 == 29 || num61 == 30 || num61 == 31 || num61 == 32 || num61 == 36 || num61 == 39) + { + for (int index29 = 0; index29 < 7; ++index29) + { + float num62 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num63 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.35f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num62, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num63) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(100, 100, 100, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + } + if (num61 == 25 || num61 == 16 || num61 == 2) + { + for (int index30 = 0; index30 < 7; ++index30) + { + float num64 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num65 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.1f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num64, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num65) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(50, 50, 50, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + } + if (num61 == 29) + { + for (int index31 = 0; index31 < 7; ++index31) + { + float num66 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num67 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.15f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num66, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num67) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(25, 25, 25, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + } + if (num61 == 34 || num61 == 35) + { + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(75, 75, 75, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + break; + } + break; + default: + for (int index32 = 0; index32 < 7; ++index32) + { + Color color = new Color(100, 100, 100, 0); + if ((int) drawData.tileFrameY / 22 == 14) + color = new Color((float) Main.DiscoR / (float) byte.MaxValue, (float) Main.DiscoG / (float) byte.MaxValue, (float) Main.DiscoB / (float) byte.MaxValue, 0.0f); + float num68 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float num69 = (float) Utils.RandomInt(ref seed, -10, 1) * 0.35f; + Main.spriteBatch.Draw(TextureAssets.Flames[index1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0) + num68, (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop) + num69) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), color, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + break; + } + } + if (drawData.typeCache == (ushort) 144) + Main.spriteBatch.Draw(TextureAssets.Timer.Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color(200, 200, 200, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + if (drawData.typeCache != (ushort) 237) + return; + Main.spriteBatch.Draw(TextureAssets.SunAltar.Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle((int) drawData.tileFrameX, (int) drawData.tileFrameY, drawData.tileWidth, drawData.tileHeight)), new Color((int) Main.mouseTextColor / 2, (int) Main.mouseTextColor / 2, (int) Main.mouseTextColor / 2, 0), 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + + private int GetPalmTreeVariant(int x, int y) + { + int num = -1; + if (Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 53) + num = 0; + if (Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 234) + num = 1; + if (Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 116) + num = 2; + if (Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 112) + num = 3; + if (WorldGen.IsPalmOasisTree(x)) + num += 4; + return num; + } + + private void DrawSingleTile_SlicedBlock( + Vector2 normalTilePosition, + int tileX, + int tileY, + TileDrawInfo drawData) + { + Color color = new Color(); + Vector2 origin = new Vector2(); + if ((int) drawData.tileLight.R > (int) this._highQualityLightingRequirement.R || (int) drawData.tileLight.G > (int) this._highQualityLightingRequirement.G || (int) drawData.tileLight.B > (int) this._highQualityLightingRequirement.B) + { + Vector3[] slices = drawData.colorSlices; + Lighting.GetColor9Slice(tileX, tileY, ref slices); + Vector3 vector3_1 = drawData.tileLight.ToVector3(); + Vector3 vector3_2 = drawData.colorTint.ToVector3(); + if (drawData.tileCache.color() == (byte) 31) + slices = this._glowPaintColorSlices; + for (int index = 0; index < 9; ++index) + { + Rectangle rectangle; + rectangle.X = 0; + rectangle.Y = 0; + rectangle.Width = 4; + rectangle.Height = 4; + switch (index) + { + case 1: + rectangle.Width = 8; + rectangle.X = 4; + break; + case 2: + rectangle.X = 12; + break; + case 3: + rectangle.Height = 8; + rectangle.Y = 4; + break; + case 4: + rectangle.Width = 8; + rectangle.Height = 8; + rectangle.X = 4; + rectangle.Y = 4; + break; + case 5: + rectangle.X = 12; + rectangle.Y = 4; + rectangle.Height = 8; + break; + case 6: + rectangle.Y = 12; + break; + case 7: + rectangle.Width = 8; + rectangle.Height = 4; + rectangle.X = 4; + rectangle.Y = 12; + break; + case 8: + rectangle.X = 12; + rectangle.Y = 12; + break; + } + Vector3 tileLight; + tileLight.X = (float) (((double) slices[index].X + (double) vector3_1.X) * 0.5); + tileLight.Y = (float) (((double) slices[index].Y + (double) vector3_1.Y) * 0.5); + tileLight.Z = (float) (((double) slices[index].Z + (double) vector3_1.Z) * 0.5); + TileDrawing.GetFinalLight(drawData.tileCache, drawData.typeCache, ref tileLight, ref vector3_2); + Vector2 position; + position.X = normalTilePosition.X + (float) rectangle.X; + position.Y = normalTilePosition.Y + (float) rectangle.Y; + rectangle.X += (int) drawData.tileFrameX + drawData.addFrX; + rectangle.Y += (int) drawData.tileFrameY + drawData.addFrY; + int num1 = (int) ((double) tileLight.X * (double) byte.MaxValue); + int num2 = (int) ((double) tileLight.Y * (double) byte.MaxValue); + int num3 = (int) ((double) tileLight.Z * (double) byte.MaxValue); + if (num1 > (int) byte.MaxValue) + num1 = (int) byte.MaxValue; + if (num2 > (int) byte.MaxValue) + num2 = (int) byte.MaxValue; + if (num3 > (int) byte.MaxValue) + num3 = (int) byte.MaxValue; + int num4 = num3 << 16; + int num5 = num2 << 8; + color.PackedValue = (uint) (num1 | num5 | num4 | -16777216); + Main.spriteBatch.Draw(drawData.drawTexture, position, new Rectangle?(rectangle), color, 0.0f, origin, 1f, drawData.tileSpriteEffect, 0.0f); + } + } + else if ((int) drawData.tileLight.R > (int) this._mediumQualityLightingRequirement.R || (int) drawData.tileLight.G > (int) this._mediumQualityLightingRequirement.G || (int) drawData.tileLight.B > (int) this._mediumQualityLightingRequirement.B) + { + Vector3[] colorSlices = drawData.colorSlices; + Lighting.GetColor4Slice(tileX, tileY, ref colorSlices); + Vector3 vector3_3 = drawData.tileLight.ToVector3(); + Vector3 vector3_4 = drawData.colorTint.ToVector3(); + Rectangle rectangle; + rectangle.Width = 8; + rectangle.Height = 8; + for (int index = 0; index < 4; ++index) + { + rectangle.X = 0; + rectangle.Y = 0; + switch (index) + { + case 1: + rectangle.X = 8; + break; + case 2: + rectangle.Y = 8; + break; + case 3: + rectangle.X = 8; + rectangle.Y = 8; + break; + } + Vector3 tileLight; + tileLight.X = (float) (((double) colorSlices[index].X + (double) vector3_3.X) * 0.5); + tileLight.Y = (float) (((double) colorSlices[index].Y + (double) vector3_3.Y) * 0.5); + tileLight.Z = (float) (((double) colorSlices[index].Z + (double) vector3_3.Z) * 0.5); + TileDrawing.GetFinalLight(drawData.tileCache, drawData.typeCache, ref tileLight, ref vector3_4); + Vector2 position; + position.X = normalTilePosition.X + (float) rectangle.X; + position.Y = normalTilePosition.Y + (float) rectangle.Y; + rectangle.X += (int) drawData.tileFrameX + drawData.addFrX; + rectangle.Y += (int) drawData.tileFrameY + drawData.addFrY; + int num6 = (int) ((double) tileLight.X * (double) byte.MaxValue); + int num7 = (int) ((double) tileLight.Y * (double) byte.MaxValue); + int num8 = (int) ((double) tileLight.Z * (double) byte.MaxValue); + if (num6 > (int) byte.MaxValue) + num6 = (int) byte.MaxValue; + if (num7 > (int) byte.MaxValue) + num7 = (int) byte.MaxValue; + if (num8 > (int) byte.MaxValue) + num8 = (int) byte.MaxValue; + int num9 = num8 << 16; + int num10 = num7 << 8; + color.PackedValue = (uint) (num6 | num10 | num9 | -16777216); + Main.spriteBatch.Draw(drawData.drawTexture, position, new Rectangle?(rectangle), color, 0.0f, origin, 1f, drawData.tileSpriteEffect, 0.0f); + } + } + else + Main.spriteBatch.Draw(drawData.drawTexture, normalTilePosition, new Rectangle?(new Rectangle((int) drawData.tileFrameX + drawData.addFrX, (int) drawData.tileFrameY + drawData.addFrY, drawData.tileWidth, drawData.tileHeight)), drawData.finalColor, 0.0f, TileDrawing._zero, 1f, drawData.tileSpriteEffect, 0.0f); + } + + private void GetCactusType( + int tileX, + int tileY, + int frameX, + int frameY, + out bool evil, + out bool good, + out bool crimson) + { + evil = false; + good = false; + crimson = false; + int index1 = tileX; + if (frameX == 36) + --index1; + if (frameX == 54) + ++index1; + if (frameX == 108) + { + if (frameY == 18) + --index1; + else + ++index1; + } + int index2 = tileY; + bool flag = false; + if (Main.tile[index1, index2].type == (ushort) 80 && Main.tile[index1, index2].active()) + flag = true; + while (!Main.tile[index1, index2].active() || !this._tileSolid[(int) Main.tile[index1, index2].type] || !flag) + { + if (Main.tile[index1, index2].type == (ushort) 80 && Main.tile[index1, index2].active()) + flag = true; + ++index2; + if (index2 > tileY + 20) + break; + } + if (Main.tile[index1, index2].type == (ushort) 112) + evil = true; + if (Main.tile[index1, index2].type == (ushort) 116) + good = true; + if (Main.tile[index1, index2].type != (ushort) 234) + return; + crimson = true; + } + + private void DrawXmasTree( + Vector2 screenPosition, + Vector2 screenOffset, + int tileX, + int tileY, + TileDrawInfo drawData) + { + if (tileY - (int) drawData.tileFrameY > 0 && drawData.tileFrameY == (short) 7 && Main.tile[tileX, tileY - (int) drawData.tileFrameY] != null) + { + drawData.tileTop -= 16 * (int) drawData.tileFrameY; + drawData.tileFrameX = Main.tile[tileX, tileY - (int) drawData.tileFrameY].frameX; + drawData.tileFrameY = Main.tile[tileX, tileY - (int) drawData.tileFrameY].frameY; + } + if (drawData.tileFrameX < (short) 10) + return; + int num1 = 0; + if (((int) drawData.tileFrameY & 1) == 1) + ++num1; + if (((int) drawData.tileFrameY & 2) == 2) + num1 += 2; + if (((int) drawData.tileFrameY & 4) == 4) + num1 += 4; + int num2 = 0; + if (((int) drawData.tileFrameY & 8) == 8) + ++num2; + if (((int) drawData.tileFrameY & 16) == 16) + num2 += 2; + if (((int) drawData.tileFrameY & 32) == 32) + num2 += 4; + int num3 = 0; + if (((int) drawData.tileFrameY & 64) == 64) + ++num3; + if (((int) drawData.tileFrameY & 128) == 128) + num3 += 2; + if (((int) drawData.tileFrameY & 256) == 256) + num3 += 4; + if (((int) drawData.tileFrameY & 512) == 512) + num3 += 8; + int num4 = 0; + if (((int) drawData.tileFrameY & 1024) == 1024) + ++num4; + if (((int) drawData.tileFrameY & 2048) == 2048) + num4 += 2; + if (((int) drawData.tileFrameY & 4096) == 4096) + num4 += 4; + if (((int) drawData.tileFrameY & 8192) == 8192) + num4 += 8; + Color color1 = Lighting.GetColor(tileX + 1, tileY - 3); + Main.spriteBatch.Draw(TextureAssets.XmasTree[0].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle(0, 0, 64, 128)), color1, 0.0f, TileDrawing._zero, 1f, SpriteEffects.None, 0.0f); + if (num1 > 0) + { + int num5 = num1 - 1; + Color color2 = color1; + if (num5 != 3) + color2 = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + Main.spriteBatch.Draw(TextureAssets.XmasTree[3].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle(66 * num5, 0, 64, 128)), color2, 0.0f, TileDrawing._zero, 1f, SpriteEffects.None, 0.0f); + } + if (num2 > 0) + { + int num6 = num2 - 1; + Main.spriteBatch.Draw(TextureAssets.XmasTree[1].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle(66 * num6, 0, 64, 128)), color1, 0.0f, TileDrawing._zero, 1f, SpriteEffects.None, 0.0f); + } + if (num3 > 0) + { + int num7 = num3 - 1; + Main.spriteBatch.Draw(TextureAssets.XmasTree[2].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle(66 * num7, 0, 64, 128)), color1, 0.0f, TileDrawing._zero, 1f, SpriteEffects.None, 0.0f); + } + if (num4 <= 0) + return; + int num8 = num4 - 1; + Main.spriteBatch.Draw(TextureAssets.XmasTree[4].Value, new Vector2((float) (tileX * 16 - (int) screenPosition.X) - (float) (((double) drawData.tileWidth - 16.0) / 2.0), (float) (tileY * 16 - (int) screenPosition.Y + drawData.tileTop)) + screenOffset, new Rectangle?(new Rectangle(66 * num8, 130 * Main.tileFrame[171], 64, 128)), new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue), 0.0f, TileDrawing._zero, 1f, SpriteEffects.None, 0.0f); + } + + private void DrawTile_MinecartTrack( + Vector2 screenPosition, + Vector2 screenOffset, + int tileX, + int tileY, + TileDrawInfo drawData) + { + drawData.tileLight = TileDrawing.GetFinalLight(drawData.tileCache, drawData.typeCache, drawData.tileLight, drawData.colorTint); + int frontColor; + int backColor; + Minecart.TrackColors(tileX, tileY, drawData.tileCache, out frontColor, out backColor); + drawData.drawTexture = this.GetTileDrawTexture(drawData.tileCache, tileX, tileY, frontColor); + Texture2D tileDrawTexture = this.GetTileDrawTexture(drawData.tileCache, tileX, tileY, backColor); + int num = (int) drawData.tileCache.frameNumber(); + if (drawData.tileFrameY != (short) -1) + Main.spriteBatch.Draw(tileDrawTexture, new Vector2((float) (tileX * 16 - (int) screenPosition.X), (float) (tileY * 16 - (int) screenPosition.Y)) + screenOffset, new Rectangle?(Minecart.GetSourceRect((int) drawData.tileFrameY, Main.tileFrame[314])), drawData.tileLight, 0.0f, new Vector2(), 1f, drawData.tileSpriteEffect, 0.0f); + Main.spriteBatch.Draw(drawData.drawTexture, new Vector2((float) (tileX * 16 - (int) screenPosition.X), (float) (tileY * 16 - (int) screenPosition.Y)) + screenOffset, new Rectangle?(Minecart.GetSourceRect((int) drawData.tileFrameX, Main.tileFrame[314])), drawData.tileLight, 0.0f, new Vector2(), 1f, drawData.tileSpriteEffect, 0.0f); + if (Minecart.DrawLeftDecoration((int) drawData.tileFrameY)) + Main.spriteBatch.Draw(tileDrawTexture, new Vector2((float) (tileX * 16 - (int) screenPosition.X), (float) ((tileY + 1) * 16 - (int) screenPosition.Y)) + screenOffset, new Rectangle?(Minecart.GetSourceRect(36)), drawData.tileLight, 0.0f, new Vector2(), 1f, drawData.tileSpriteEffect, 0.0f); + if (Minecart.DrawLeftDecoration((int) drawData.tileFrameX)) + Main.spriteBatch.Draw(drawData.drawTexture, new Vector2((float) (tileX * 16 - (int) screenPosition.X), (float) ((tileY + 1) * 16 - (int) screenPosition.Y)) + screenOffset, new Rectangle?(Minecart.GetSourceRect(36)), drawData.tileLight, 0.0f, new Vector2(), 1f, drawData.tileSpriteEffect, 0.0f); + if (Minecart.DrawRightDecoration((int) drawData.tileFrameY)) + Main.spriteBatch.Draw(tileDrawTexture, new Vector2((float) (tileX * 16 - (int) screenPosition.X), (float) ((tileY + 1) * 16 - (int) screenPosition.Y)) + screenOffset, new Rectangle?(Minecart.GetSourceRect(37, Main.tileFrame[314])), drawData.tileLight, 0.0f, new Vector2(), 1f, drawData.tileSpriteEffect, 0.0f); + if (Minecart.DrawRightDecoration((int) drawData.tileFrameX)) + Main.spriteBatch.Draw(drawData.drawTexture, new Vector2((float) (tileX * 16 - (int) screenPosition.X), (float) ((tileY + 1) * 16 - (int) screenPosition.Y)) + screenOffset, new Rectangle?(Minecart.GetSourceRect(37)), drawData.tileLight, 0.0f, new Vector2(), 1f, drawData.tileSpriteEffect, 0.0f); + if (Minecart.DrawBumper((int) drawData.tileFrameX)) + { + Main.spriteBatch.Draw(drawData.drawTexture, new Vector2((float) (tileX * 16 - (int) screenPosition.X), (float) ((tileY - 1) * 16 - (int) screenPosition.Y)) + screenOffset, new Rectangle?(Minecart.GetSourceRect(39)), drawData.tileLight, 0.0f, new Vector2(), 1f, drawData.tileSpriteEffect, 0.0f); + } + else + { + if (!Minecart.DrawBouncyBumper((int) drawData.tileFrameX)) + return; + Main.spriteBatch.Draw(drawData.drawTexture, new Vector2((float) (tileX * 16 - (int) screenPosition.X), (float) ((tileY - 1) * 16 - (int) screenPosition.Y)) + screenOffset, new Rectangle?(Minecart.GetSourceRect(38)), drawData.tileLight, 0.0f, new Vector2(), 1f, drawData.tileSpriteEffect, 0.0f); + } + } + + private void DrawTile_LiquidBehindTile( + bool solidLayer, + int waterStyleOverride, + Vector2 screenPosition, + Vector2 screenOffset, + int tileX, + int tileY, + TileDrawInfo drawData) + { + Tile tile1 = Main.tile[tileX + 1, tileY]; + Tile tile2 = Main.tile[tileX - 1, tileY]; + Tile tile3 = Main.tile[tileX, tileY - 1]; + Tile tile4 = Main.tile[tileX, tileY + 1]; + if (tile1 == null) + { + tile1 = new Tile(); + Main.tile[tileX + 1, tileY] = tile1; + } + if (tile2 == null) + { + tile2 = new Tile(); + Main.tile[tileX - 1, tileY] = tile2; + } + if (tile3 == null) + { + tile3 = new Tile(); + Main.tile[tileX, tileY - 1] = tile3; + } + if (tile4 == null) + { + tile4 = new Tile(); + Main.tile[tileX, tileY + 1] = tile4; + } + if (!solidLayer || drawData.tileCache.inActive() || this._tileSolidTop[(int) drawData.typeCache] || drawData.tileCache.halfBrick() && (tile2.liquid > (byte) 160 || tile1.liquid > (byte) 160) && Main.instance.waterfallManager.CheckForWaterfall(tileX, tileY) || TileID.Sets.BlocksWaterDrawingBehindSelf[(int) drawData.tileCache.type] && drawData.tileCache.slope() == (byte) 0) + return; + int num1 = 0; + bool flag1 = false; + bool flag2 = false; + bool flag3 = false; + bool flag4 = false; + bool flag5 = false; + int liquidType = 0; + bool flag6 = false; + int num2 = (int) drawData.tileCache.slope(); + int num3 = drawData.tileCache.blockType(); + if (drawData.tileCache.type == (ushort) 546 && drawData.tileCache.liquid > (byte) 0) + { + flag5 = true; + flag4 = true; + flag1 = true; + flag2 = true; + switch (drawData.tileCache.liquidType()) + { + case 0: + flag6 = true; + break; + case 1: + liquidType = 1; + break; + case 2: + liquidType = 11; + break; + } + num1 = (int) drawData.tileCache.liquid; + } + else + { + if (drawData.tileCache.liquid > (byte) 0) + { + switch (num3) + { + case 0: + goto label_25; + case 1: + if (drawData.tileCache.liquid <= (byte) 160) + goto label_25; + else + break; + } + flag5 = true; + switch (drawData.tileCache.liquidType()) + { + case 0: + flag6 = true; + break; + case 1: + liquidType = 1; + break; + case 2: + liquidType = 11; + break; + } + if ((int) drawData.tileCache.liquid > num1) + num1 = (int) drawData.tileCache.liquid; + } +label_25: + if (tile2.liquid > (byte) 0 && num2 != 1 && num2 != 3) + { + flag1 = true; + switch (tile2.liquidType()) + { + case 0: + flag6 = true; + break; + case 1: + liquidType = 1; + break; + case 2: + liquidType = 11; + break; + } + if ((int) tile2.liquid > num1) + num1 = (int) tile2.liquid; + } + if (tile1.liquid > (byte) 0 && num2 != 2 && num2 != 4) + { + flag2 = true; + switch (tile1.liquidType()) + { + case 0: + flag6 = true; + break; + case 1: + liquidType = 1; + break; + case 2: + liquidType = 11; + break; + } + if ((int) tile1.liquid > num1) + num1 = (int) tile1.liquid; + } + if (tile3.liquid > (byte) 0 && num2 != 3 && num2 != 4) + { + flag3 = true; + switch (tile3.liquidType()) + { + case 0: + flag6 = true; + break; + case 1: + liquidType = 1; + break; + case 2: + liquidType = 11; + break; + } + } + if (tile4.liquid > (byte) 0 && num2 != 1 && num2 != 2) + { + if (tile4.liquid > (byte) 240) + flag4 = true; + switch (tile4.liquidType()) + { + case 0: + flag6 = true; + break; + case 1: + liquidType = 1; + break; + case 2: + liquidType = 11; + break; + } + } + } + if (!flag3 && !flag4 && !flag1 && !flag2 && !flag5) + return; + if (waterStyleOverride != -1) + Main.waterStyle = waterStyleOverride; + if (liquidType == 0) + liquidType = Main.waterStyle; + Color color = Lighting.GetColor(tileX, tileY); + Vector2 vector2 = new Vector2((float) (tileX * 16), (float) (tileY * 16)); + Rectangle liquidSize = new Rectangle(0, 4, 16, 16); + if (flag4 && flag1 | flag2) + { + flag1 = true; + flag2 = true; + } + if ((!flag3 || !(flag1 | flag2)) && !(flag4 & flag3)) + { + if (flag3) + { + liquidSize = new Rectangle(0, 4, 16, 4); + if (drawData.tileCache.halfBrick() || drawData.tileCache.slope() != (byte) 0) + liquidSize = new Rectangle(0, 4, 16, 12); + } + else if (flag4 && !flag1 && !flag2) + { + vector2 = new Vector2((float) (tileX * 16), (float) (tileY * 16 + 12)); + liquidSize = new Rectangle(0, 4, 16, 4); + } + else + { + float num4 = (float) (256 - num1) / 32f; + int y = 4; + if (tile3.liquid == (byte) 0 && (num3 != 0 || !WorldGen.SolidTile(tileX, tileY - 1))) + y = 0; + if (drawData.tileCache.slope() != (byte) 0) + { + vector2 = new Vector2((float) (tileX * 16), (float) (tileY * 16 + (int) num4 * 2)); + liquidSize = new Rectangle(0, (int) num4 * 2, 16, 16 - (int) num4 * 2); + } + else if (flag1 & flag2 || drawData.tileCache.halfBrick()) + { + vector2 = new Vector2((float) (tileX * 16), (float) (tileY * 16 + (int) num4 * 2)); + liquidSize = new Rectangle(0, y, 16, 16 - (int) num4 * 2); + } + else if (flag1) + { + vector2 = new Vector2((float) (tileX * 16), (float) (tileY * 16 + (int) num4 * 2)); + liquidSize = new Rectangle(0, y, 4, 16 - (int) num4 * 2); + } + else + { + vector2 = new Vector2((float) (tileX * 16 + 12), (float) (tileY * 16 + (int) num4 * 2)); + liquidSize = new Rectangle(0, y, 4, 16 - (int) num4 * 2); + } + } + } + float num5 = 0.5f; + switch (liquidType) + { + case 1: + num5 = 1f; + break; + case 11: + num5 = Math.Max(num5 * 1.7f, 1f); + break; + } + if ((double) tileY <= Main.worldSurface || (double) num5 > 1.0) + { + num5 = 1f; + if (drawData.tileCache.wall == (ushort) 21) + num5 = 0.9f; + else if (drawData.tileCache.wall > (ushort) 0) + num5 = 0.6f; + } + if (drawData.tileCache.halfBrick() && tile3.liquid > (byte) 0 && drawData.tileCache.wall > (ushort) 0) + num5 = 0.0f; + if (drawData.tileCache.bottomSlope() && (tile2.liquid == (byte) 0 && !WorldGen.SolidTile(tileX - 1, tileY) || tile1.liquid == (byte) 0 && !WorldGen.SolidTile(tileX + 1, tileY))) + num5 = 0.0f; + Color aColor = color * num5; + bool flag7 = false; + if (flag6) + { + for (int index = 0; index < 13; ++index) + { + if (Main.IsLiquidStyleWater(index) && (double) Main.liquidAlpha[index] > 0.0 && index != liquidType) + { + this.DrawPartialLiquid(drawData.tileCache, vector2 - screenPosition + screenOffset, liquidSize, index, aColor); + flag7 = true; + break; + } + } + } + this.DrawPartialLiquid(drawData.tileCache, vector2 - screenPosition + screenOffset, liquidSize, liquidType, aColor * (flag7 ? Main.liquidAlpha[liquidType] : 1f)); + } + + private void CacheSpecialDraws(int tileX, int tileY, TileDrawInfo drawData) + { + if (TileID.Sets.BasicChest[(int) drawData.typeCache]) + { + Point key = new Point(tileX, tileY); + if ((int) drawData.tileFrameX % 36 != 0) + --key.X; + if ((int) drawData.tileFrameY % 36 != 0) + --key.Y; + if (!this._chestPositions.ContainsKey(key)) + this._chestPositions[key] = Chest.FindChest(key.X, key.Y); + int num1 = (int) drawData.tileFrameX / 18; + int num2 = (int) drawData.tileFrameY / 18; + int num3 = (int) drawData.tileFrameX / 36; + int num4 = num1 * 18; + drawData.addFrX = num4 - (int) drawData.tileFrameX; + int num5 = num2 * 18; + if (this._chestPositions[key] != -1) + { + int frame = Main.chest[this._chestPositions[key]].frame; + if (frame == 1) + num5 += 38; + if (frame == 2) + num5 += 76; + } + drawData.addFrY = num5 - (int) drawData.tileFrameY; + if (num2 != 0) + drawData.tileHeight = 18; + if (drawData.typeCache == (ushort) 21 && (num3 == 48 || num3 == 49)) + drawData.glowSourceRect = new Rectangle(16 * (num1 % 2), (int) drawData.tileFrameY + drawData.addFrY, drawData.tileWidth, drawData.tileHeight); + } + if (drawData.typeCache == (ushort) 378) + { + Point key = new Point(tileX, tileY); + if ((int) drawData.tileFrameX % 36 != 0) + --key.X; + if ((int) drawData.tileFrameY % 54 != 0) + key.Y -= (int) drawData.tileFrameY / 18; + if (!this._trainingDummyTileEntityPositions.ContainsKey(key)) + this._trainingDummyTileEntityPositions[key] = TETrainingDummy.Find(key.X, key.Y); + if (this._trainingDummyTileEntityPositions[key] != -1) + { + int npc = ((TETrainingDummy) TileEntity.ByID[this._trainingDummyTileEntityPositions[key]]).npc; + if (npc != -1) + { + int num = Main.npc[npc].frame.Y / 55 * 54 + (int) drawData.tileFrameY; + drawData.addFrY = num - (int) drawData.tileFrameY; + } + } + } + if (drawData.typeCache == (ushort) 395) + { + Point point = new Point(tileX, tileY); + if ((int) drawData.tileFrameX % 36 != 0) + --point.X; + if ((int) drawData.tileFrameY % 36 != 0) + --point.Y; + if (!this._itemFrameTileEntityPositions.ContainsKey(point)) + { + this._itemFrameTileEntityPositions[point] = TEItemFrame.Find(point.X, point.Y); + if (this._itemFrameTileEntityPositions[point] != -1) + this.AddSpecialLegacyPoint(point); + } + } + if (drawData.typeCache == (ushort) 520) + { + Point point = new Point(tileX, tileY); + if (!this._foodPlatterTileEntityPositions.ContainsKey(point)) + { + this._foodPlatterTileEntityPositions[point] = TEFoodPlatter.Find(point.X, point.Y); + if (this._foodPlatterTileEntityPositions[point] != -1) + this.AddSpecialLegacyPoint(point); + } + } + if (drawData.typeCache == (ushort) 471) + { + Point point = new Point(tileX, tileY); + point.X -= (int) drawData.tileFrameX % 54 / 18; + point.Y -= (int) drawData.tileFrameY % 54 / 18; + if (!this._weaponRackTileEntityPositions.ContainsKey(point)) + { + this._weaponRackTileEntityPositions[point] = TEWeaponsRack.Find(point.X, point.Y); + if (this._weaponRackTileEntityPositions[point] != -1) + this.AddSpecialLegacyPoint(point); + } + } + if (drawData.typeCache == (ushort) 470) + { + Point point = new Point(tileX, tileY); + point.X -= (int) drawData.tileFrameX % 36 / 18; + point.Y -= (int) drawData.tileFrameY % 54 / 18; + if (!this._displayDollTileEntityPositions.ContainsKey(point)) + { + this._displayDollTileEntityPositions[point] = TEDisplayDoll.Find(point.X, point.Y); + if (this._displayDollTileEntityPositions[point] != -1) + this.AddSpecialLegacyPoint(point); + } + } + if (drawData.typeCache == (ushort) 475) + { + Point point = new Point(tileX, tileY); + point.X -= (int) drawData.tileFrameX % 54 / 18; + point.Y -= (int) drawData.tileFrameY % 72 / 18; + if (!this._hatRackTileEntityPositions.ContainsKey(point)) + { + this._hatRackTileEntityPositions[point] = TEHatRack.Find(point.X, point.Y); + if (this._hatRackTileEntityPositions[point] != -1) + this.AddSpecialLegacyPoint(point); + } + } + if (drawData.typeCache == (ushort) 323 && drawData.tileFrameX <= (short) 132 && drawData.tileFrameX >= (short) 88) + this.AddSpecialPoint(tileX, tileY, TileDrawing.TileCounterType.Tree); + if (drawData.typeCache == (ushort) 412 && drawData.tileFrameX == (short) 0 && drawData.tileFrameY == (short) 0) + this.AddSpecialLegacyPoint(tileX, tileY); + if (drawData.typeCache == (ushort) 620 && drawData.tileFrameX == (short) 0 && drawData.tileFrameY == (short) 0) + this.AddSpecialLegacyPoint(tileX, tileY); + if (drawData.typeCache == (ushort) 237 && drawData.tileFrameX == (short) 18 && drawData.tileFrameY == (short) 0) + this.AddSpecialLegacyPoint(tileX, tileY); + switch (drawData.typeCache) + { + case 5: + case 583: + case 584: + case 585: + case 586: + case 587: + case 588: + case 589: + case 596: + case 616: + if (drawData.tileFrameY < (short) 198 || drawData.tileFrameX < (short) 22) + break; + this.AddSpecialPoint(tileX, tileY, TileDrawing.TileCounterType.Tree); + break; + } + } + + private static Color GetFinalLight( + Tile tileCache, + ushort typeCache, + Color tileLight, + Color tint) + { + int num1 = (int) ((double) ((int) tileLight.R * (int) tint.R) / (double) byte.MaxValue); + int num2 = (int) ((double) ((int) tileLight.G * (int) tint.G) / (double) byte.MaxValue); + int num3 = (int) ((double) ((int) tileLight.B * (int) tint.B) / (double) byte.MaxValue); + if (num1 > (int) byte.MaxValue) + num1 = (int) byte.MaxValue; + if (num2 > (int) byte.MaxValue) + num2 = (int) byte.MaxValue; + if (num3 > (int) byte.MaxValue) + num3 = (int) byte.MaxValue; + int num4 = num3 << 16; + int num5 = num2 << 8; + tileLight.PackedValue = (uint) (num1 | num5 | num4 | -16777216); + if (tileCache.color() == (byte) 31) + tileLight = Color.White; + if (tileCache.inActive()) + tileLight = tileCache.actColor(tileLight); + else if (TileDrawing.ShouldTileShine(typeCache, tileCache.frameX)) + tileLight = Main.shine(tileLight, (int) typeCache); + return tileLight; + } + + private static void GetFinalLight( + Tile tileCache, + ushort typeCache, + ref Vector3 tileLight, + ref Vector3 tint) + { + tileLight *= tint; + if (tileCache.inActive()) + { + tileCache.actColor(ref tileLight); + } + else + { + if (!TileDrawing.ShouldTileShine(typeCache, tileCache.frameX)) + return; + Main.shine(ref tileLight, (int) typeCache); + } + } + + private static bool ShouldTileShine(ushort type, short frameX) + { + if (!Main.tileShine2[(int) type]) + return false; + switch (type) + { + case 21: + case 441: + return frameX >= (short) 36 && frameX < (short) 178; + case 467: + case 468: + return frameX >= (short) 144 && frameX < (short) 178; + default: + return true; + } + } + + private static bool IsTileDangerous(Player localPlayer, Tile tileCache, ushort typeCache) + { + bool flag = typeCache == (ushort) 135 || typeCache == (ushort) 137 || typeCache == (ushort) 138 || typeCache == (ushort) 484 || typeCache == (ushort) 141 || typeCache == (ushort) 210 || typeCache == (ushort) 442 || typeCache == (ushort) 443 || typeCache == (ushort) 444 || typeCache == (ushort) 411 || typeCache == (ushort) 485 || typeCache == (ushort) 85; + if (tileCache.slope() == (byte) 0 && !tileCache.inActive()) + { + flag = flag || typeCache == (ushort) 32 || typeCache == (ushort) 69 || typeCache == (ushort) 48 || typeCache == (ushort) 232 || typeCache == (ushort) 352 || typeCache == (ushort) 483 || typeCache == (ushort) 482 || typeCache == (ushort) 481 || typeCache == (ushort) 51 || typeCache == (ushort) 229; + if (!localPlayer.fireWalk) + flag = flag || typeCache == (ushort) 37 || typeCache == (ushort) 58 || typeCache == (ushort) 76; + if (!localPlayer.iceSkate) + flag = flag || typeCache == (ushort) 162; + } + return flag; + } + + private bool IsTileDrawLayerSolid(ushort typeCache) => TileID.Sets.DrawTileInSolidLayer[(int) typeCache].HasValue ? TileID.Sets.DrawTileInSolidLayer[(int) typeCache].Value : this._tileSolid[(int) typeCache]; + + private void GetTileOutlineInfo( + int x, + int y, + ushort typeCache, + ref Color tileLight, + ref Texture2D highlightTexture, + ref Color highlightColor) + { + bool actuallySelected; + if (!Main.InSmartCursorHighlightArea(x, y, out actuallySelected)) + return; + int averageTileLighting = ((int) tileLight.R + (int) tileLight.G + (int) tileLight.B) / 3; + if (averageTileLighting <= 10) + return; + highlightTexture = TextureAssets.HighlightMask[(int) typeCache].Value; + highlightColor = Colors.GetSelectionGlowColor(actuallySelected, averageTileLighting); + } + + private void DrawPartialLiquid( + Tile tileCache, + Vector2 position, + Rectangle liquidSize, + int liquidType, + Color aColor) + { + int num = (int) tileCache.slope(); + if (!TileID.Sets.BlocksWaterDrawingBehindSelf[(int) tileCache.type] || num == 0) + { + Main.spriteBatch.Draw(TextureAssets.Liquid[liquidType].Value, position, new Rectangle?(liquidSize), aColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + else + { + liquidSize.X += 18 * (num - 1); + if (tileCache.slope() == (byte) 1) + Main.spriteBatch.Draw(TextureAssets.LiquidSlope[liquidType].Value, position, new Rectangle?(liquidSize), aColor, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + else if (tileCache.slope() == (byte) 2) + Main.spriteBatch.Draw(TextureAssets.LiquidSlope[liquidType].Value, position, new Rectangle?(liquidSize), aColor, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + else if (tileCache.slope() == (byte) 3) + { + Main.spriteBatch.Draw(TextureAssets.LiquidSlope[liquidType].Value, position, new Rectangle?(liquidSize), aColor, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + else + { + if (tileCache.slope() != (byte) 4) + return; + Main.spriteBatch.Draw(TextureAssets.LiquidSlope[liquidType].Value, position, new Rectangle?(liquidSize), aColor, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } + } + + private bool InAPlaceWithWind(int x, int y, int width, int height) => WorldGen.InAPlaceWithWind(x, y, width, height); + + private void GetTileDrawData( + int x, + int y, + Tile tileCache, + ushort typeCache, + ref short tileFrameX, + ref short tileFrameY, + out int tileWidth, + out int tileHeight, + out int tileTop, + out int halfBrickHeight, + out int addFrX, + out int addFrY, + out SpriteEffects tileSpriteEffect, + out Texture2D glowTexture, + out Rectangle glowSourceRect, + out Color glowColor) + { + tileTop = 0; + tileWidth = 16; + tileHeight = 16; + halfBrickHeight = 0; + addFrY = Main.tileFrame[(int) typeCache] * 38; + addFrX = 0; + tileSpriteEffect = SpriteEffects.None; + glowTexture = (Texture2D) null; + glowSourceRect = Rectangle.Empty; + glowColor = Color.Transparent; + switch (typeCache) + { + case 3: + case 24: + case 61: + case 71: + case 110: + case 201: + tileHeight = 20; + if (x % 2 == 0) + { + tileSpriteEffect = SpriteEffects.FlipHorizontally; + break; + } + break; + case 4: + tileWidth = 20; + tileHeight = 20; + if (WorldGen.SolidTile(x, y - 1)) + { + tileTop = 4; + break; + } + break; + case 5: + tileWidth = 20; + tileHeight = 20; + int treeBiome = TileDrawing.GetTreeBiome(x, y, (int) tileFrameX, (int) tileFrameY); + tileFrameX += (short) (176 * (treeBiome + 1)); + break; + case 12: + case 31: + case 96: + addFrY = Main.tileFrame[(int) typeCache] * 36; + break; + case 14: + case 21: + case 411: + case 467: + case 469: + if (tileFrameY == (short) 18) + { + tileHeight = 18; + break; + } + break; + case 15: + case 497: + if ((int) tileFrameY % 40 == 18) + { + tileHeight = 18; + break; + } + break; + case 16: + case 17: + case 18: + case 26: + case 32: + case 69: + case 72: + case 77: + case 79: + case 124: + case 137: + case 138: + case 352: + case 462: + case 487: + case 488: + case 574: + case 575: + case 576: + case 577: + case 578: + tileHeight = 18; + break; + case 20: + case 590: + case 595: + tileHeight = 18; + if (x % 2 == 0) + { + tileSpriteEffect = SpriteEffects.FlipHorizontally; + break; + } + break; + case 27: + if ((int) tileFrameY % 74 == 54) + { + tileHeight = 18; + break; + } + break; + case 28: + case 105: + case 470: + case 475: + case 506: + case 547: + case 548: + case 552: + case 560: + case 597: + case 613: + case 621: + case 622: + tileTop = 2; + break; + case 33: + case 49: + case 174: + case 372: + tileHeight = 20; + tileTop = -4; + break; + case 52: + case 62: + case 115: + case 205: + case 382: + case 528: + tileTop = -2; + if (x % 2 == 0) + { + tileSpriteEffect = SpriteEffects.FlipHorizontally; + break; + } + break; + case 73: + case 74: + case 113: + tileTop = -12; + tileHeight = 32; + if (x % 2 == 0) + { + tileSpriteEffect = SpriteEffects.FlipHorizontally; + break; + } + break; + case 78: + case 85: + case 100: + case 133: + case 134: + case 173: + case 210: + case 233: + case 254: + case 283: + case 378: + case 457: + case 466: + case 520: + tileTop = 2; + break; + case 80: + case 142: + case 143: + tileTop = 2; + break; + case 81: + tileTop -= 8; + tileHeight = 26; + tileWidth = 24; + if (x % 2 == 0) + { + tileSpriteEffect = SpriteEffects.FlipHorizontally; + break; + } + break; + case 82: + case 83: + case 84: + tileHeight = 20; + tileTop = -2; + if (x % 2 == 0) + { + tileSpriteEffect = SpriteEffects.FlipHorizontally; + break; + } + break; + case 89: + tileTop = 2; + break; + case 102: + tileTop = 2; + break; + case 106: + addFrY = Main.tileFrame[(int) typeCache] * 54; + break; + case 129: + addFrY = 0; + if (tileFrameX >= (short) 324) + { + int num1 = ((int) tileFrameX - 324) / 18; + int num2 = (num1 + Main.tileFrame[(int) typeCache]) % 6 - num1; + addFrX = num2 * 18; + break; + } + break; + case 132: + case 135: + tileTop = 2; + tileHeight = 18; + break; + case 136: + if (tileFrameX == (short) 0) + { + tileTop = 2; + break; + } + break; + case 139: + tileTop = 2; + int num3 = (int) tileFrameY / 2016; + addFrY -= 2016 * num3; + addFrX += 72 * num3; + break; + case 172: + case 376: + if ((int) tileFrameY % 38 == 18) + { + tileHeight = 18; + break; + } + break; + case 178: + if (tileFrameY <= (short) 36) + { + tileTop = 2; + break; + } + break; + case 184: + tileWidth = 20; + if (tileFrameY <= (short) 36) + { + tileTop = 2; + break; + } + if (tileFrameY <= (short) 108) + { + tileTop = -2; + break; + } + break; + case 185: + case 186: + case 187: + tileTop = 2; + switch (typeCache) + { + case 185: + Main.tileShine2[185] = tileFrameY == (short) 18 && tileFrameX >= (short) 576 && tileFrameX <= (short) 882; + if (tileFrameY == (short) 18) + { + int num4 = (int) tileFrameX / 1908; + addFrX -= 1908 * num4; + addFrY += 18 * num4; + break; + } + break; + case 186: + Main.tileShine2[186] = tileFrameX >= (short) 864 && tileFrameX <= (short) 1170; + break; + case 187: + int num5 = (int) tileFrameX / 1890; + addFrX -= 1890 * num5; + addFrY += 36 * num5; + break; + } + break; + case 207: + tileTop = 2; + if (tileFrameY >= (short) 72) + { + addFrY = Main.tileFrame[(int) typeCache]; + int num6 = x; + if ((int) tileFrameX % 36 != 0) + --num6; + addFrY += num6 % 6; + if (addFrY >= 6) + addFrY -= 6; + addFrY *= 72; + break; + } + addFrY = 0; + break; + case 215: + addFrY = tileFrameY >= (short) 36 ? 252 : Main.tileFrame[(int) typeCache] * 36; + tileTop = 2; + break; + case 217: + case 218: + case 564: + addFrY = Main.tileFrame[(int) typeCache] * 36; + tileTop = 2; + break; + case 219: + case 220: + addFrY = Main.tileFrame[(int) typeCache] * 54; + tileTop = 2; + break; + case 227: + tileWidth = 32; + tileHeight = 38; + if (tileFrameX == (short) 238) + tileTop -= 6; + else + tileTop -= 20; + if (tileFrameX == (short) 204) + { + bool evil; + bool good; + bool crimson; + this.GetCactusType(x, y, (int) tileFrameX, (int) tileFrameY, out evil, out good, out crimson); + if (good) + tileFrameX += (short) 238; + if (evil) + tileFrameX += (short) 204; + if (crimson) + tileFrameX += (short) 272; + } + if (x % 2 == 0) + { + tileSpriteEffect = SpriteEffects.FlipHorizontally; + break; + } + break; + case 228: + case 231: + case 243: + case 247: + tileTop = 2; + addFrY = Main.tileFrame[(int) typeCache] * 54; + break; + case 235: + addFrY = Main.tileFrame[(int) typeCache] * 18; + break; + case 238: + tileTop = 2; + addFrY = Main.tileFrame[(int) typeCache] * 36; + break; + case 244: + tileTop = 2; + addFrY = tileFrameX >= (short) 54 ? 0 : Main.tileFrame[(int) typeCache] * 36; + break; + case 270: + case 271: + case 581: + int num7 = Main.tileFrame[(int) typeCache] + x % 6; + if (x % 2 == 0) + num7 += 3; + if (x % 3 == 0) + num7 += 3; + if (x % 4 == 0) + num7 += 3; + while (num7 > 5) + num7 -= 6; + addFrX = num7 * 18; + addFrY = 0; + if (x % 2 == 0) + { + tileSpriteEffect = SpriteEffects.FlipHorizontally; + break; + } + break; + case 272: + addFrY = 0; + break; + case 275: + case 276: + case 277: + case 278: + case 279: + case 280: + case 281: + case 296: + case 297: + case 309: + case 358: + case 359: + case 413: + case 414: + case 542: + case 550: + case 551: + case 553: + case 554: + case 558: + case 559: + case 599: + case 600: + case 601: + case 602: + case 603: + case 604: + case 605: + case 606: + case 607: + case 608: + case 609: + case 610: + case 611: + case 612: + tileTop = 2; + Main.critterCage = true; + int bigAnimalCageFrame = this.GetBigAnimalCageFrame(x, y, (int) tileFrameX, (int) tileFrameY); + switch (typeCache) + { + case 275: + case 359: + case 599: + case 600: + case 601: + case 602: + case 603: + case 604: + case 605: + addFrY = Main.bunnyCageFrame[bigAnimalCageFrame] * 54; + break; + case 276: + case 413: + case 414: + case 606: + case 607: + case 608: + case 609: + case 610: + case 611: + case 612: + addFrY = Main.squirrelCageFrame[bigAnimalCageFrame] * 54; + break; + case 277: + addFrY = Main.mallardCageFrame[bigAnimalCageFrame] * 54; + break; + case 278: + addFrY = Main.duckCageFrame[bigAnimalCageFrame] * 54; + break; + case 279: + case 358: + addFrY = Main.birdCageFrame[bigAnimalCageFrame] * 54; + break; + case 280: + addFrY = Main.blueBirdCageFrame[bigAnimalCageFrame] * 54; + break; + case 281: + addFrY = Main.redBirdCageFrame[bigAnimalCageFrame] * 54; + break; + case 296: + case 297: + addFrY = Main.scorpionCageFrame[0, bigAnimalCageFrame] * 54; + break; + case 309: + addFrY = Main.penguinCageFrame[bigAnimalCageFrame] * 54; + break; + case 542: + addFrY = Main.owlCageFrame[bigAnimalCageFrame] * 54; + break; + case 550: + case 551: + addFrY = Main.turtleCageFrame[bigAnimalCageFrame] * 54; + break; + case 553: + addFrY = Main.grebeCageFrame[bigAnimalCageFrame] * 54; + break; + case 554: + addFrY = Main.seagullCageFrame[bigAnimalCageFrame] * 54; + break; + case 558: + case 559: + addFrY = Main.seahorseCageFrame[bigAnimalCageFrame] * 54; + break; + } + break; + case 282: + case 505: + case 543: + tileTop = 2; + Main.critterCage = true; + int waterAnimalCageFrame1 = this.GetWaterAnimalCageFrame(x, y, (int) tileFrameX, (int) tileFrameY); + addFrY = Main.fishBowlFrame[waterAnimalCageFrame1] * 36; + break; + case 285: + case 286: + case 298: + case 299: + case 310: + case 339: + case 361: + case 362: + case 363: + case 364: + case 391: + case 392: + case 393: + case 394: + case 532: + case 533: + case 538: + case 544: + case 555: + case 556: + case 582: + case 619: + tileTop = 2; + Main.critterCage = true; + int smallAnimalCageFrame1 = this.GetSmallAnimalCageFrame(x, y, (int) tileFrameX, (int) tileFrameY); + switch (typeCache) + { + case 285: + addFrY = Main.snailCageFrame[smallAnimalCageFrame1] * 36; + break; + case 286: + case 582: + addFrY = Main.snail2CageFrame[smallAnimalCageFrame1] * 36; + break; + case 298: + case 361: + addFrY = Main.frogCageFrame[smallAnimalCageFrame1] * 36; + break; + case 299: + case 363: + addFrY = Main.mouseCageFrame[smallAnimalCageFrame1] * 36; + break; + case 310: + case 364: + case 391: + case 619: + addFrY = Main.wormCageFrame[smallAnimalCageFrame1] * 36; + break; + case 339: + case 362: + addFrY = Main.grasshopperCageFrame[smallAnimalCageFrame1] * 36; + break; + case 392: + case 393: + case 394: + addFrY = Main.slugCageFrame[(int) typeCache - 392, smallAnimalCageFrame1] * 36; + break; + case 532: + addFrY = Main.maggotCageFrame[smallAnimalCageFrame1] * 36; + break; + case 533: + addFrY = Main.ratCageFrame[smallAnimalCageFrame1] * 36; + break; + case 538: + case 544: + addFrY = Main.ladybugCageFrame[smallAnimalCageFrame1] * 36; + break; + case 555: + case 556: + addFrY = Main.waterStriderCageFrame[smallAnimalCageFrame1] * 36; + break; + } + break; + case 288: + case 289: + case 290: + case 291: + case 292: + case 293: + case 294: + case 295: + case 360: + case 580: + case 620: + tileTop = 2; + Main.critterCage = true; + int waterAnimalCageFrame2 = this.GetWaterAnimalCageFrame(x, y, (int) tileFrameX, (int) tileFrameY); + int index1 = (int) typeCache - 288; + if (typeCache == (ushort) 360 || typeCache == (ushort) 580 || typeCache == (ushort) 620) + index1 = 8; + addFrY = Main.butterflyCageFrame[index1, waterAnimalCageFrame2] * 36; + break; + case 300: + case 301: + case 302: + case 303: + case 304: + case 305: + case 306: + case 307: + case 308: + case 354: + case 355: + case 499: + addFrY = Main.tileFrame[(int) typeCache] * 54; + tileTop = 2; + break; + case 316: + case 317: + case 318: + tileTop = 2; + Main.critterCage = true; + int smallAnimalCageFrame2 = this.GetSmallAnimalCageFrame(x, y, (int) tileFrameX, (int) tileFrameY); + int index2 = (int) typeCache - 316; + addFrY = Main.jellyfishCageFrame[index2, smallAnimalCageFrame2] * 36; + break; + case 323: + tileWidth = 20; + tileHeight = 20; + int palmTreeBiome = this.GetPalmTreeBiome(x, y); + tileFrameY = (short) (22 * palmTreeBiome); + break; + case 324: + tileWidth = 20; + tileHeight = 20; + tileTop = -2; + if (x % 2 == 0) + { + tileSpriteEffect = SpriteEffects.FlipHorizontally; + break; + } + break; + case 326: + case 327: + case 328: + case 329: + case 345: + case 351: + case 421: + case 422: + case 458: + case 459: + addFrY = Main.tileFrame[(int) typeCache] * 90; + break; + case 330: + case 331: + case 332: + case 333: + tileTop += 2; + break; + case 336: + case 340: + case 341: + case 342: + case 343: + case 344: + addFrY = Main.tileFrame[(int) typeCache] * 90; + tileTop = 2; + break; + case 349: + tileTop = 2; + int num8 = (int) tileFrameX % 36; + int num9 = (int) tileFrameY % 54; + int frameData1; + if (Animation.GetTemporaryFrame(x - num8 / 18, y - num9 / 18, out frameData1)) + { + tileFrameX = (short) (36 * frameData1 + num8); + break; + } + break; + case 377: + addFrY = Main.tileFrame[(int) typeCache] * 38; + tileTop = 2; + break; + case 379: + addFrY = Main.tileFrame[(int) typeCache] * 90; + break; + case 388: + case 389: + TileObjectData.GetTileData((int) typeCache, (int) tileFrameX / 18); + int num10 = 94; + tileTop = -2; + if ((int) tileFrameY == num10 - 20 || (int) tileFrameY == num10 * 2 - 20 || tileFrameY == (short) 0 || (int) tileFrameY == num10) + tileHeight = 18; + if (tileFrameY != (short) 0 && (int) tileFrameY != num10) + { + tileTop = 0; + break; + } + break; + case 390: + addFrY = Main.tileFrame[(int) typeCache] * 36; + break; + case 405: + tileHeight = 16; + if (tileFrameY > (short) 0) + tileHeight = 18; + int num11 = Main.tileFrame[(int) typeCache]; + if (tileFrameX >= (short) 54) + num11 = 0; + addFrY = num11 * 38; + break; + case 406: + tileHeight = 16; + if ((int) tileFrameY % 54 >= 36) + tileHeight = 18; + int num12 = Main.tileFrame[(int) typeCache]; + if (tileFrameY >= (short) 108) + num12 = 6 - (int) tileFrameY / 54; + else if (tileFrameY >= (short) 54) + num12 = Main.tileFrame[(int) typeCache] - 1; + addFrY = num12 * 56; + addFrY += (int) tileFrameY / 54 * 2; + break; + case 410: + if (tileFrameY == (short) 36) + tileHeight = 18; + if (tileFrameY >= (short) 56) + { + addFrY = Main.tileFrame[(int) typeCache]; + addFrY *= 56; + break; + } + addFrY = 0; + break; + case 412: + addFrY = 0; + tileTop = 2; + break; + case 426: + case 430: + case 431: + case 432: + case 433: + case 434: + addFrY = 90; + break; + case 428: + tileTop += 4; + if (PressurePlateHelper.PressurePlatesPressed.ContainsKey(new Point(x, y))) + { + addFrX += 18; + break; + } + break; + case 441: + case 468: + if (tileFrameY == (short) 18) + tileHeight = 18; + int num13 = (int) tileFrameX % 36; + int num14 = (int) tileFrameY % 38; + int frameData2; + if (Animation.GetTemporaryFrame(x - num13 / 18, y - num14 / 18, out frameData2)) + { + tileFrameY = (short) (38 * frameData2 + num14); + break; + } + break; + case 442: + tileWidth = 20; + tileHeight = 20; + switch ((int) tileFrameX / 22) + { + case 1: + tileTop = -4; + break; + case 2: + tileTop = -2; + tileWidth = 24; + break; + case 3: + tileTop = -2; + break; + } + break; + case 452: + int num15 = Main.tileFrame[(int) typeCache]; + if (tileFrameX >= (short) 54) + num15 = 0; + addFrY = num15 * 54; + break; + case 453: + int num16 = (Main.tileFrameCounter[(int) typeCache] / 20 + (y - (int) tileFrameY / 18 + x)) % 3; + addFrY = num16 * 54; + break; + case 454: + addFrY = Main.tileFrame[(int) typeCache] * 54; + break; + case 455: + addFrY = 0; + tileTop = 2; + int num17 = 1 + Main.tileFrame[(int) typeCache]; + if (!BirthdayParty.PartyIsUp) + num17 = 0; + addFrY = num17 * 54; + break; + case 456: + int num18 = (Main.tileFrameCounter[(int) typeCache] / 20 + (y - (int) tileFrameY / 18 + (x - (int) tileFrameX / 18))) % 4; + addFrY = num18 * 54; + break; + case 463: + case 464: + addFrY = Main.tileFrame[(int) typeCache] * 72; + tileTop = 2; + break; + case 476: + tileWidth = 20; + tileHeight = 18; + break; + case 480: + case 509: + if (tileFrameY >= (short) 54) + { + addFrY = Main.tileFrame[(int) typeCache]; + addFrY *= 54; + break; + } + addFrY = 0; + break; + case 485: + tileTop = 2; + int num19 = (Main.tileFrameCounter[(int) typeCache] / 5 + (y - (int) tileFrameY / 18 + (x - (int) tileFrameX / 18))) % 4; + addFrY = num19 * 36; + break; + case 489: + tileTop = 2; + int y1 = y - (int) tileFrameY / 18; + int x1 = x - (int) tileFrameX / 18; + if (this.InAPlaceWithWind(x1, y1, 2, 3)) + { + int num20 = (Main.tileFrameCounter[(int) typeCache] / 5 + (y1 + x1)) % 16; + addFrY = num20 * 54; + break; + } + break; + case 490: + tileTop = 2; + int y2 = y - (int) tileFrameY / 18; + int num21 = this.InAPlaceWithWind(x - (int) tileFrameX / 18, y2, 2, 2) ? 1 : 0; + int num22 = num21 != 0 ? Main.tileFrame[(int) typeCache] : 0; + int num23 = 0; + if (num21 != 0) + { + if ((double) Math.Abs(Main.WindForVisuals) > 0.5) + { + switch (Main.weatherVaneBobframe) + { + case 0: + num23 = 0; + break; + case 1: + num23 = 1; + break; + case 2: + num23 = 2; + break; + case 3: + num23 = 1; + break; + case 4: + num23 = 0; + break; + case 5: + num23 = -1; + break; + case 6: + num23 = -2; + break; + case 7: + num23 = -1; + break; + } + } + else + { + switch (Main.weatherVaneBobframe) + { + case 0: + num23 = 0; + break; + case 1: + num23 = 1; + break; + case 2: + num23 = 0; + break; + case 3: + num23 = -1; + break; + case 4: + num23 = 0; + break; + case 5: + num23 = 1; + break; + case 6: + num23 = 0; + break; + case 7: + num23 = -1; + break; + } + } + } + int num24 = num22 + num23; + if (num24 < 0) + num24 += 12; + int num25 = num24 % 12; + addFrY = num25 * 36; + break; + case 491: + tileTop = 2; + addFrX = 54; + break; + case 493: + if (tileFrameY == (short) 0) + { + int num26 = Main.tileFrameCounter[(int) typeCache]; + float num27 = Math.Abs(Main.WindForVisuals); + int y3 = y - (int) tileFrameY / 18; + int x2 = x - (int) tileFrameX / 18; + if (!this.InAPlaceWithWind(x2, y3, 1, 1)) + num27 = 0.0f; + if ((double) num27 >= 0.100000001490116) + { + if ((double) num27 < 0.5) + { + int num28 = (num26 / 20 + (y3 + x2)) % 6; + int num29 = (double) Main.WindForVisuals >= 0.0 ? num28 + 1 : 6 - num28; + addFrY = num29 * 36; + } + else + { + int num30 = (num26 / 10 + (y3 + x2)) % 6; + int num31 = (double) Main.WindForVisuals >= 0.0 ? num30 + 7 : 12 - num30; + addFrY = num31 * 36; + } + } + } + tileTop = 2; + break; + case 494: + tileTop = 2; + break; + case 507: + case 508: + int num32 = 20; + int num33 = (Main.tileFrameCounter[(int) typeCache] + x * 11 + y * 27) % (num32 * 8); + addFrY = 90 * (num33 / num32); + break; + case 518: + int num34 = (int) tileCache.liquid / 16 - 3; + if (WorldGen.SolidTile(x, y - 1) && num34 > 8) + num34 = 8; + if (tileCache.liquid == (byte) 0) + { + Tile tileSafely = Framing.GetTileSafely(x, y + 1); + if (tileSafely.nactive()) + { + switch (tileSafely.blockType()) + { + case 1: + num34 = Math.Max(8, (int) tileSafely.liquid / 16) - 16; + break; + case 2: + case 3: + num34 -= 4; + break; + } + } + } + tileTop -= num34; + break; + case 519: + tileTop = 2; + if (x % 2 == 0) + { + tileSpriteEffect = SpriteEffects.FlipHorizontally; + break; + } + break; + case 521: + case 522: + case 523: + case 524: + case 525: + case 526: + case 527: + tileTop = 2; + Main.critterCage = true; + int waterAnimalCageFrame3 = this.GetWaterAnimalCageFrame(x, y, (int) tileFrameX, (int) tileFrameY); + int index3 = (int) typeCache - 521; + addFrY = Main.dragonflyJarFrame[index3, waterAnimalCageFrame3] * 36; + break; + case 529: + int num35 = y + 1; + int num36 = x; + int corruptCount1; + int crimsonCount1; + int hallowedCount1; + WorldGen.GetBiomeInfluence(num36, num36, num35, num35, out corruptCount1, out crimsonCount1, out hallowedCount1); + int num37 = corruptCount1; + if (num37 < crimsonCount1) + num37 = crimsonCount1; + if (num37 < hallowedCount1) + num37 = hallowedCount1; + int num38 = corruptCount1 != 0 || crimsonCount1 != 0 || hallowedCount1 != 0 ? (hallowedCount1 != num37 ? (crimsonCount1 != num37 ? 4 : 3) : 2) : (x < WorldGen.beachDistance || x > Main.maxTilesX - WorldGen.beachDistance ? 1 : 0); + addFrY += 34 * num38 - (int) tileFrameY; + tileHeight = 32; + tileTop = -14; + if (x % 2 == 0) + { + tileSpriteEffect = SpriteEffects.FlipHorizontally; + break; + } + break; + case 530: + int num39 = y - (int) tileFrameY % 36 / 18 + 2; + int startX = x - (int) tileFrameX % 54 / 18; + int corruptCount2; + int crimsonCount2; + int hallowedCount2; + WorldGen.GetBiomeInfluence(startX, startX + 3, num39, num39, out corruptCount2, out crimsonCount2, out hallowedCount2); + int num40 = corruptCount2; + if (num40 < crimsonCount2) + num40 = crimsonCount2; + if (num40 < hallowedCount2) + num40 = hallowedCount2; + int num41 = corruptCount2 != 0 || crimsonCount2 != 0 || hallowedCount2 != 0 ? (hallowedCount2 != num40 ? (crimsonCount2 != num40 ? 3 : 2) : 1) : 0; + addFrY += 36 * num41; + tileTop = 2; + break; + case 541: + addFrY = this._shouldShowInvisibleBlocks ? 0 : 90; + break; + case 561: + tileTop -= 2; + tileHeight = 20; + addFrY = (int) tileFrameY / 18 * 4; + break; + case 565: + tileTop = 2; + addFrY = tileFrameX >= (short) 36 ? 0 : Main.tileFrame[(int) typeCache] * 36; + break; + case 567: + tileWidth = 26; + tileHeight = 18; + tileTop = 2; + if (x % 2 == 0) + { + tileSpriteEffect = SpriteEffects.FlipHorizontally; + break; + } + break; + case 568: + case 569: + case 570: + tileTop = 2; + Main.critterCage = true; + int waterAnimalCageFrame4 = this.GetWaterAnimalCageFrame(x, y, (int) tileFrameX, (int) tileFrameY); + addFrY = Main.fairyJarFrame[waterAnimalCageFrame4] * 36; + break; + case 571: + if (x % 2 == 0) + tileSpriteEffect = SpriteEffects.FlipHorizontally; + tileTop = 2; + break; + case 572: + int num42 = Main.tileFrame[(int) typeCache] + x % 6; + while (num42 > 3) + num42 -= 3; + addFrX = num42 * 18; + addFrY = 0; + if (x % 2 == 0) + { + tileSpriteEffect = SpriteEffects.FlipHorizontally; + break; + } + break; + case 579: + tileWidth = 20; + tileHeight = 20; + tileTop -= 2; + bool flag = (double) (x * 16 + 8) > (double) Main.LocalPlayer.Center.X; + addFrY = tileFrameX <= (short) 0 ? (!flag ? 22 : 0) : (!flag ? 0 : 22); + break; + case 583: + case 584: + case 585: + case 586: + case 587: + case 588: + case 589: + case 596: + case 616: + tileWidth = 20; + tileHeight = 20; + break; + case 592: + addFrY = Main.tileFrame[(int) typeCache] * 54; + break; + case 593: + if (tileFrameX >= (short) 18) + addFrX = -18; + tileTop = 2; + int frameData3; + addFrY = !Animation.GetTemporaryFrame(x, y, out frameData3) ? (tileFrameX >= (short) 18 ? 0 : Main.tileFrame[(int) typeCache] * 18) : (int) (short) (18 * frameData3); + break; + case 594: + if (tileFrameX >= (short) 36) + addFrX = -36; + tileTop = 2; + int num43 = (int) tileFrameX % 36; + int num44 = (int) tileFrameY % 36; + int frameData4; + addFrY = !Animation.GetTemporaryFrame(x - num43 / 18, y - num44 / 18, out frameData4) ? (tileFrameX >= (short) 36 ? 0 : Main.tileFrame[(int) typeCache] * 36) : (int) (short) (36 * frameData4); + break; + case 598: + tileTop = 2; + Main.critterCage = true; + int waterAnimalCageFrame5 = this.GetWaterAnimalCageFrame(x, y, (int) tileFrameX, (int) tileFrameY); + addFrY = Main.lavaFishBowlFrame[waterAnimalCageFrame5] * 36; + break; + case 614: + addFrX = Main.tileFrame[(int) typeCache] * 54; + addFrY = 0; + tileTop = 2; + break; + case 615: + tileHeight = 18; + if (x % 2 == 0) + { + tileSpriteEffect = SpriteEffects.FlipHorizontally; + break; + } + break; + case 617: + tileTop = 2; + tileFrameY %= (short) 144; + tileFrameX %= (short) 54; + break; + } + if (tileCache.halfBrick()) + halfBrickHeight = 8; + switch (typeCache) + { + case 10: + if ((int) tileFrameY / 54 != 32) + break; + glowTexture = TextureAssets.GlowMask[57].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY % 54, tileWidth, tileHeight); + glowColor = this._martianGlow; + break; + case 11: + int num45 = (int) tileFrameY / 54; + if (num45 == 32) + { + glowTexture = TextureAssets.GlowMask[58].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY % 54, tileWidth, tileHeight); + glowColor = this._martianGlow; + } + if (num45 != 33) + break; + glowTexture = TextureAssets.GlowMask[119].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY % 54, tileWidth, tileHeight); + glowColor = this._meteorGlow; + break; + case 14: + int num46 = (int) tileFrameX / 54; + if (num46 == 31) + { + glowTexture = TextureAssets.GlowMask[67].Value; + glowSourceRect = new Rectangle((int) tileFrameX % 54, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._martianGlow; + } + if (num46 != 32) + break; + glowTexture = TextureAssets.GlowMask[124].Value; + glowSourceRect = new Rectangle((int) tileFrameX % 54, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._meteorGlow; + break; + case 15: + int num47 = (int) tileFrameY / 40; + if (num47 == 32) + { + glowTexture = TextureAssets.GlowMask[54].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY % 40, tileWidth, tileHeight); + glowColor = this._martianGlow; + } + if (num47 != 33) + break; + glowTexture = TextureAssets.GlowMask[116].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY % 40, tileWidth, tileHeight); + glowColor = this._meteorGlow; + break; + case 18: + int num48 = (int) tileFrameX / 36; + if (num48 == 27) + { + glowTexture = TextureAssets.GlowMask[69].Value; + glowSourceRect = new Rectangle((int) tileFrameX % 36, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._martianGlow; + } + if (num48 != 28) + break; + glowTexture = TextureAssets.GlowMask[125].Value; + glowSourceRect = new Rectangle((int) tileFrameX % 36, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._meteorGlow; + break; + case 19: + int num49 = (int) tileFrameY / 18; + if (num49 == 26) + { + glowTexture = TextureAssets.GlowMask[65].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY % 18, tileWidth, tileHeight); + glowColor = this._martianGlow; + } + if (num49 != 27) + break; + glowTexture = TextureAssets.GlowMask[112].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY % 18, tileWidth, tileHeight); + glowColor = this._meteorGlow; + break; + case 21: + case 467: + int num50 = (int) tileFrameX / 36; + if (num50 == 48) + { + glowTexture = TextureAssets.GlowMask[56].Value; + glowSourceRect = new Rectangle((int) tileFrameX % 36, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._martianGlow; + } + if (num50 != 49) + break; + glowTexture = TextureAssets.GlowMask[117].Value; + glowSourceRect = new Rectangle((int) tileFrameX % 36, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._meteorGlow; + break; + case 33: + if ((int) tileFrameX / 18 != 0 || (int) tileFrameY / 22 != 26) + break; + glowTexture = TextureAssets.GlowMask[61].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY % 22, tileWidth, tileHeight); + glowColor = this._martianGlow; + break; + case 34: + if ((int) tileFrameX / 54 != 0 || (int) tileFrameY / 54 != 33) + break; + glowTexture = TextureAssets.GlowMask[55].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY % 54, tileWidth, tileHeight); + glowColor = this._martianGlow; + break; + case 42: + if ((int) tileFrameY / 36 != 33) + break; + glowTexture = TextureAssets.GlowMask[63].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY % 36, tileWidth, tileHeight); + glowColor = this._martianGlow; + break; + case 79: + int num51 = (int) tileFrameY / 36; + if (num51 == 27) + { + glowTexture = TextureAssets.GlowMask[53].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY % 36, tileWidth, tileHeight); + glowColor = this._martianGlow; + } + if (num51 != 28) + break; + glowTexture = TextureAssets.GlowMask[114].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY % 36, tileWidth, tileHeight); + glowColor = this._meteorGlow; + break; + case 87: + int num52 = (int) tileFrameX / 54; + int num53 = (int) tileFrameX / 1998; + addFrX -= 1998 * num53; + addFrY += 36 * num53; + if (num52 == 26) + { + glowTexture = TextureAssets.GlowMask[64].Value; + glowSourceRect = new Rectangle((int) tileFrameX % 54, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._martianGlow; + } + if (num52 != 27) + break; + glowTexture = TextureAssets.GlowMask[121].Value; + glowSourceRect = new Rectangle((int) tileFrameX % 54, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._meteorGlow; + break; + case 88: + int num54 = (int) tileFrameX / 54; + int num55 = (int) tileFrameX / 1998; + addFrX -= 1998 * num55; + addFrY += 36 * num55; + if (num54 == 24) + { + glowTexture = TextureAssets.GlowMask[59].Value; + glowSourceRect = new Rectangle((int) tileFrameX % 54, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._martianGlow; + } + if (num54 != 25) + break; + glowTexture = TextureAssets.GlowMask[120].Value; + glowSourceRect = new Rectangle((int) tileFrameX % 54, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._meteorGlow; + break; + case 89: + int num56 = (int) tileFrameX / 54; + int num57 = (int) tileFrameX / 1998; + addFrX -= 1998 * num57; + addFrY += 36 * num57; + if (num56 == 29) + { + glowTexture = TextureAssets.GlowMask[66].Value; + glowSourceRect = new Rectangle((int) tileFrameX % 54, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._martianGlow; + } + if (num56 != 30) + break; + glowTexture = TextureAssets.GlowMask[123].Value; + glowSourceRect = new Rectangle((int) tileFrameX % 54, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._meteorGlow; + break; + case 90: + int num58 = (int) tileFrameY / 36; + if (num58 == 27) + { + glowTexture = TextureAssets.GlowMask[52].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY % 36, tileWidth, tileHeight); + glowColor = this._martianGlow; + } + if (num58 != 28) + break; + glowTexture = TextureAssets.GlowMask[113].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY % 36, tileWidth, tileHeight); + glowColor = this._meteorGlow; + break; + case 93: + int num59 = (int) tileFrameY / 54; + int num60 = (int) tileFrameY / 1998; + addFrY -= 1998 * num60; + addFrX += 36 * num60; + tileTop += 2; + if (num59 != 27) + break; + glowTexture = TextureAssets.GlowMask[62].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY % 54, tileWidth, tileHeight); + glowColor = this._martianGlow; + break; + case 100: + if ((int) tileFrameX / 36 != 0 || (int) tileFrameY / 36 != 27) + break; + glowTexture = TextureAssets.GlowMask[68].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY % 36, tileWidth, tileHeight); + glowColor = this._martianGlow; + break; + case 101: + int num61 = (int) tileFrameX / 54; + int num62 = (int) tileFrameX / 1998; + addFrX -= 1998 * num62; + addFrY += 72 * num62; + if (num61 == 28) + { + glowTexture = TextureAssets.GlowMask[60].Value; + glowSourceRect = new Rectangle((int) tileFrameX % 54, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._martianGlow; + } + if (num61 != 29) + break; + glowTexture = TextureAssets.GlowMask[115].Value; + glowSourceRect = new Rectangle((int) tileFrameX % 54, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._meteorGlow; + break; + case 104: + int num63 = (int) tileFrameX / 36; + tileTop = 2; + if (num63 == 24) + { + glowTexture = TextureAssets.GlowMask[51].Value; + glowSourceRect = new Rectangle((int) tileFrameX % 36, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._martianGlow; + } + if (num63 != 25) + break; + glowTexture = TextureAssets.GlowMask[118].Value; + glowSourceRect = new Rectangle((int) tileFrameX % 36, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._meteorGlow; + break; + case 172: + int num64 = (int) tileFrameY / 38; + if (num64 == 28) + { + glowTexture = TextureAssets.GlowMask[88].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY % 38, tileWidth, tileHeight); + glowColor = this._martianGlow; + } + if (num64 != 29) + break; + glowTexture = TextureAssets.GlowMask[122].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY % 38, tileWidth, tileHeight); + glowColor = this._meteorGlow; + break; + case 184: + if (tileCache.frameX == (short) 110) + { + glowTexture = TextureAssets.GlowMask[(int) sbyte.MaxValue].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._lavaMossGlow; + } + if (tileCache.frameX == (short) 132) + { + glowTexture = TextureAssets.GlowMask[(int) sbyte.MaxValue].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._kryptonMossGlow; + } + if (tileCache.frameX == (short) 154) + { + glowTexture = TextureAssets.GlowMask[(int) sbyte.MaxValue].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._xenonMossGlow; + } + if (tileCache.frameX != (short) 176) + break; + glowTexture = TextureAssets.GlowMask[(int) sbyte.MaxValue].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._argonMossGlow; + break; + case 441: + case 468: + int num65 = (int) tileFrameX / 36; + if (num65 == 48) + { + glowTexture = TextureAssets.GlowMask[56].Value; + glowSourceRect = new Rectangle((int) tileFrameX % 36, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._martianGlow; + } + if (num65 != 49) + break; + glowTexture = TextureAssets.GlowMask[117].Value; + glowSourceRect = new Rectangle((int) tileFrameX % 36, (int) tileFrameY, tileWidth, tileHeight); + glowColor = this._meteorGlow; + break; + case 463: + glowTexture = TextureAssets.GlowMask[243].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY + addFrY, tileWidth, tileHeight); + glowColor = new Color((int) sbyte.MaxValue, (int) sbyte.MaxValue, (int) sbyte.MaxValue, 0); + break; + case 564: + if (tileCache.frameX < (short) 36) + { + glowTexture = TextureAssets.GlowMask[267].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY + addFrY, tileWidth, tileHeight); + glowColor = new Color(200, 200, 200, 0) * ((float) Main.mouseTextColor / (float) byte.MaxValue); + } + addFrY = 0; + break; + case 568: + glowTexture = TextureAssets.GlowMask[268].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY + addFrY, tileWidth, tileHeight); + glowColor = Color.White; + break; + case 569: + glowTexture = TextureAssets.GlowMask[269].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY + addFrY, tileWidth, tileHeight); + glowColor = Color.White; + break; + case 570: + glowTexture = TextureAssets.GlowMask[270].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY + addFrY, tileWidth, tileHeight); + glowColor = Color.White; + break; + case 580: + glowTexture = TextureAssets.GlowMask[289].Value; + glowSourceRect = new Rectangle((int) tileFrameX, (int) tileFrameY + addFrY, tileWidth, tileHeight); + glowColor = new Color(225, 110, 110, 0); + break; + } + } + + private bool IsWindBlocked(int x, int y) + { + Tile tile = Main.tile[x, y]; + return tile == null || tile.wall > (ushort) 0 && !WallID.Sets.AllowsWind[(int) tile.wall] || (double) y > Main.worldSurface; + } + + private int GetWaterAnimalCageFrame(int x, int y, int tileFrameX, int tileFrameY) => (x - tileFrameX / 18) / 2 * ((y - tileFrameY / 18) / 3) % Main.cageFrames; + + private int GetSmallAnimalCageFrame(int x, int y, int tileFrameX, int tileFrameY) => (x - tileFrameX / 18) / 3 * ((y - tileFrameY / 18) / 3) % Main.cageFrames; + + private int GetBigAnimalCageFrame(int x, int y, int tileFrameX, int tileFrameY) => (x - tileFrameX / 18) / 6 * ((y - tileFrameY / 18) / 4) % Main.cageFrames; + + private void GetScreenDrawArea( + Vector2 screenPosition, + Vector2 offSet, + out int firstTileX, + out int lastTileX, + out int firstTileY, + out int lastTileY) + { + firstTileX = (int) (((double) screenPosition.X - (double) offSet.X) / 16.0 - 1.0); + lastTileX = (int) (((double) screenPosition.X + (double) Main.screenWidth + (double) offSet.X) / 16.0) + 2; + firstTileY = (int) (((double) screenPosition.Y - (double) offSet.Y) / 16.0 - 1.0); + lastTileY = (int) (((double) screenPosition.Y + (double) Main.screenHeight + (double) offSet.Y) / 16.0) + 5; + if (firstTileX < 4) + firstTileX = 4; + if (lastTileX > Main.maxTilesX - 4) + lastTileX = Main.maxTilesX - 4; + if (firstTileY < 4) + firstTileY = 4; + if (lastTileY > Main.maxTilesY - 4) + lastTileY = Main.maxTilesY - 4; + if (Main.sectionManager.FrameSectionsLeft <= 0) + return; + TimeLogger.DetailedDrawReset(); + WorldGen.SectionTileFrameWithCheck(firstTileX, firstTileY, lastTileX, lastTileY); + TimeLogger.DetailedDrawTime(5); + } + + public void ClearCachedTileDraws(bool solidLayer) + { + if (!solidLayer) + return; + this._displayDollTileEntityPositions.Clear(); + this._hatRackTileEntityPositions.Clear(); + this._vineRootsPositions.Clear(); + this._reverseVineRootsPositions.Clear(); + } + + private void AddSpecialLegacyPoint(Point p) => this.AddSpecialLegacyPoint(p.X, p.Y); + + private void AddSpecialLegacyPoint(int x, int y) + { + this._specialTileX[this._specialTilesCount] = x; + this._specialTileY[this._specialTilesCount] = y; + ++this._specialTilesCount; + } + + private void ClearLegacyCachedDraws() + { + this._chestPositions.Clear(); + this._trainingDummyTileEntityPositions.Clear(); + this._foodPlatterTileEntityPositions.Clear(); + this._itemFrameTileEntityPositions.Clear(); + this._weaponRackTileEntityPositions.Clear(); + this._specialTilesCount = 0; + } + + private Color DrawTiles_GetLightOverride( + int j, + int i, + Tile tileCache, + ushort typeCache, + short tileFrameX, + short tileFrameY, + Color tileLight) + { + if (tileCache.color() == (byte) 31) + return Color.White; + switch (typeCache) + { + case 61: + if (tileFrameX == (short) 144) + { + tileLight.A = tileLight.R = tileLight.G = tileLight.B = (byte) (245.0 - (double) Main.mouseTextColor * 1.5); + break; + } + break; + case 83: + int style = (int) tileFrameX / 18; + if (this.IsAlchemyPlantHarvestable(style)) + { + if (style == 5) + { + tileLight.A = (byte) ((uint) Main.mouseTextColor / 2U); + tileLight.G = Main.mouseTextColor; + tileLight.B = Main.mouseTextColor; + } + if (style == 6) + { + byte num1 = (byte) (((int) Main.mouseTextColor + (int) tileLight.G * 2) / 3); + byte num2 = (byte) (((int) Main.mouseTextColor + (int) tileLight.B * 2) / 3); + if ((int) num1 > (int) tileLight.G) + tileLight.G = num1; + if ((int) num2 > (int) tileLight.B) + { + tileLight.B = num2; + break; + } + break; + } + break; + } + break; + case 541: + return Color.White; + } + return tileLight; + } + + private void DrawTiles_EmitParticles( + int j, + int i, + Tile tileCache, + ushort typeCache, + short tileFrameX, + short tileFrameY, + Color tileLight) + { + switch (typeCache) + { + case 238: + if (this._rand.Next(10) == 0) + { + int index = Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 168); + this._dust[index].noGravity = true; + this._dust[index].alpha = 200; + break; + } + break; + case 463: + if (tileFrameY == (short) 54 && tileFrameX == (short) 0) + { + for (int index = 0; index < 4; ++index) + { + if (this._rand.Next(2) != 0) + { + Dust dust = Dust.NewDustDirect(new Vector2((float) (i * 16 + 4), (float) (j * 16)), 36, 8, 16); + dust.noGravity = true; + dust.alpha = 140; + dust.fadeIn = 1.2f; + dust.velocity = Vector2.Zero; + } + } + } + if (tileFrameY == (short) 18 && (tileFrameX == (short) 0 || tileFrameX == (short) 36)) + { + for (int index = 0; index < 1; ++index) + { + if (this._rand.Next(13) == 0) + { + Dust dust = Dust.NewDustDirect(new Vector2((float) (i * 16), (float) (j * 16)), 8, 8, 274); + dust.position = new Vector2((float) (i * 16 + 8), (float) (j * 16 + 8)); + dust.position.X += tileFrameX == (short) 36 ? 4f : -4f; + dust.noGravity = true; + dust.alpha = 128; + dust.fadeIn = 1.2f; + dust.noLight = true; + dust.velocity = new Vector2(0.0f, this._rand.NextFloatDirection() * 1.2f); + } + } + break; + } + break; + default: + if (typeCache == (ushort) 497 && (int) tileCache.frameY / 40 == 31 && (int) tileCache.frameY % 40 == 0) + { + for (int index = 0; index < 1; ++index) + { + if (this._rand.Next(10) == 0) + { + Dust dust = Dust.NewDustDirect(new Vector2((float) (i * 16), (float) (j * 16 + 8)), 16, 12, 43); + dust.noGravity = true; + dust.alpha = 254; + dust.color = Color.White; + dust.scale = 0.7f; + dust.velocity = Vector2.Zero; + dust.noLight = true; + } + } + break; + } + break; + } + if (typeCache == (ushort) 139 && tileCache.frameX == (short) 36 && (int) tileCache.frameY % 36 == 0 && (int) Main.timeForVisualEffects % 7 == 0 && this._rand.Next(3) == 0) + { + int Type = this._rand.Next(570, 573); + Vector2 Position = new Vector2((float) (i * 16 + 8), (float) (j * 16 - 8)); + Vector2 Velocity = new Vector2(Main.WindForVisuals * 2f, -0.5f); + Velocity.X *= (float) (1.0 + (double) this._rand.Next(-50, 51) * 0.00999999977648258); + Velocity.Y *= (float) (1.0 + (double) this._rand.Next(-50, 51) * 0.00999999977648258); + if (Type == 572) + Position.X -= 8f; + if (Type == 571) + Position.X -= 4f; + Gore.NewGore(Position, Velocity, Type, 0.8f); + } + if (typeCache == (ushort) 244 && tileFrameX == (short) 18 && tileFrameY == (short) 18 && this._rand.Next(2) == 0) + { + if (this._rand.Next(500) == 0) + Gore.NewGore(new Vector2((float) (i * 16 + 8), (float) (j * 16 + 8)), new Vector2(), 415, (float) this._rand.Next(51, 101) * 0.01f); + else if (this._rand.Next(250) == 0) + Gore.NewGore(new Vector2((float) (i * 16 + 8), (float) (j * 16 + 8)), new Vector2(), 414, (float) this._rand.Next(51, 101) * 0.01f); + else if (this._rand.Next(80) == 0) + Gore.NewGore(new Vector2((float) (i * 16 + 8), (float) (j * 16 + 8)), new Vector2(), 413, (float) this._rand.Next(51, 101) * 0.01f); + else if (this._rand.Next(10) == 0) + Gore.NewGore(new Vector2((float) (i * 16 + 8), (float) (j * 16 + 8)), new Vector2(), 412, (float) this._rand.Next(51, 101) * 0.01f); + else if (this._rand.Next(3) == 0) + Gore.NewGore(new Vector2((float) (i * 16 + 8), (float) (j * 16 + 8)), new Vector2(), 411, (float) this._rand.Next(51, 101) * 0.01f); + } + if (typeCache == (ushort) 565 && tileFrameX == (short) 0 && tileFrameY == (short) 18 && this._rand.Next(3) == 0 && (Main.drawToScreen && this._rand.Next(4) == 0 || !Main.drawToScreen)) + { + Vector2 worldCoordinates = new Point(i, j).ToWorldCoordinates(); + int Type = 1202; + float Scale = (float) (8.0 + (double) Main.rand.NextFloat() * 1.60000002384186); + Vector2 vector2 = new Vector2(0.0f, -18f); + Gore.NewGorePerfect(worldCoordinates + vector2, (Main.rand.NextVector2Circular(0.7f, 0.25f) * 0.4f + Main.rand.NextVector2CircularEdge(1f, 0.4f) * 0.1f) * 4f, Type, Scale); + } + if (typeCache == (ushort) 165 && tileFrameX >= (short) 162 && tileFrameX <= (short) 214 && tileFrameY == (short) 72 && this._rand.Next(60) == 0) + { + int index = Dust.NewDust(new Vector2((float) (i * 16 + 2), (float) (j * 16 + 6)), 8, 4, 153); + this._dust[index].scale -= (float) this._rand.Next(3) * 0.1f; + this._dust[index].velocity.Y = 0.0f; + this._dust[index].velocity.X *= 0.05f; + this._dust[index].alpha = 100; + } + if (typeCache == (ushort) 42 && tileFrameX == (short) 0) + { + int num1 = (int) tileFrameY / 36; + int num2 = (int) tileFrameY / 18 % 2; + if (num1 == 7 && num2 == 1) + { + if (this._rand.Next(50) == 0) + this._dust[Dust.NewDust(new Vector2((float) (i * 16 + 4), (float) (j * 16 + 4)), 8, 8, 58, Alpha: 150)].velocity *= 0.5f; + if (this._rand.Next(100) == 0) + { + int index = Gore.NewGore(new Vector2((float) (i * 16 - 2), (float) (j * 16 - 4)), new Vector2(), this._rand.Next(16, 18)); + this._gore[index].scale *= 0.7f; + this._gore[index].velocity *= 0.25f; + } + } + else if (num1 == 29 && num2 == 1 && this._rand.Next(40) == 0) + { + int index = Dust.NewDust(new Vector2((float) (i * 16 + 4), (float) (j * 16)), 8, 8, 59, Alpha: 100); + if (this._rand.Next(3) != 0) + this._dust[index].noGravity = true; + this._dust[index].velocity *= 0.3f; + this._dust[index].velocity.Y -= 1.5f; + } + } + if (typeCache == (ushort) 215 && tileFrameY < (short) 36 && this._rand.Next(3) == 0 && (Main.drawToScreen && this._rand.Next(4) == 0 || !Main.drawToScreen) && tileFrameY == (short) 0) + { + int index = Dust.NewDust(new Vector2((float) (i * 16 + 2), (float) (j * 16 - 4)), 4, 8, 31, Alpha: 100); + if (tileFrameX == (short) 0) + this._dust[index].position.X += (float) this._rand.Next(8); + if (tileFrameX == (short) 36) + this._dust[index].position.X -= (float) this._rand.Next(8); + this._dust[index].alpha += this._rand.Next(100); + this._dust[index].velocity *= 0.2f; + this._dust[index].velocity.Y -= (float) (0.5 + (double) this._rand.Next(10) * 0.100000001490116); + this._dust[index].fadeIn = (float) (0.5 + (double) this._rand.Next(10) * 0.100000001490116); + } + if (typeCache == (ushort) 592 && tileFrameY == (short) 18 && this._rand.Next(3) == 0 && (Main.drawToScreen && this._rand.Next(6) == 0 || !Main.drawToScreen)) + { + int index = Dust.NewDust(new Vector2((float) (i * 16 + 2), (float) (j * 16 + 4)), 4, 8, 31, Alpha: 100); + if (tileFrameX == (short) 0) + this._dust[index].position.X += (float) this._rand.Next(8); + if (tileFrameX == (short) 36) + this._dust[index].position.X -= (float) this._rand.Next(8); + this._dust[index].alpha += this._rand.Next(100); + this._dust[index].velocity *= 0.2f; + this._dust[index].velocity.Y -= (float) (0.5 + (double) this._rand.Next(10) * 0.100000001490116); + this._dust[index].fadeIn = (float) (0.5 + (double) this._rand.Next(10) * 0.100000001490116); + } + if (typeCache == (ushort) 4 && this._rand.Next(40) == 0 && tileFrameX < (short) 66) + { + int num = (int) tileFrameY / 22; + int Type; + switch (num) + { + case 0: + Type = 6; + break; + case 8: + Type = 75; + break; + case 9: + Type = 135; + break; + case 10: + Type = 158; + break; + case 11: + Type = 169; + break; + case 12: + Type = 156; + break; + case 13: + Type = 234; + break; + case 14: + Type = 66; + break; + case 15: + Type = 242; + break; + case 16: + Type = 293; + break; + case 17: + Type = 294; + break; + default: + Type = 58 + num; + break; + } + int index; + switch (tileFrameX) + { + case 22: + index = Dust.NewDust(new Vector2((float) (i * 16 + 6), (float) (j * 16)), 4, 4, Type, Alpha: 100); + break; + case 44: + index = Dust.NewDust(new Vector2((float) (i * 16 + 2), (float) (j * 16)), 4, 4, Type, Alpha: 100); + break; + default: + index = Dust.NewDust(new Vector2((float) (i * 16 + 4), (float) (j * 16)), 4, 4, Type, Alpha: 100); + break; + } + if (this._rand.Next(3) != 0) + this._dust[index].noGravity = true; + this._dust[index].velocity *= 0.3f; + this._dust[index].velocity.Y -= 1.5f; + if (Type == 66) + { + this._dust[index].color = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB); + this._dust[index].noGravity = true; + } + } + if (typeCache == (ushort) 93 && this._rand.Next(40) == 0 && tileFrameX == (short) 0) + { + int num = (int) tileFrameY / 54; + if ((int) tileFrameY / 18 % 3 == 0) + { + int Type; + switch (num) + { + case 0: + case 6: + case 7: + case 8: + case 10: + case 14: + case 15: + case 16: + Type = 6; + break; + case 20: + Type = 59; + break; + default: + Type = -1; + break; + } + if (Type != -1) + { + int index = Dust.NewDust(new Vector2((float) (i * 16 + 4), (float) (j * 16 + 2)), 4, 4, Type, Alpha: 100); + if (this._rand.Next(3) != 0) + this._dust[index].noGravity = true; + this._dust[index].velocity *= 0.3f; + this._dust[index].velocity.Y -= 1.5f; + } + } + } + if (typeCache == (ushort) 100 && this._rand.Next(40) == 0 && tileFrameX < (short) 36) + { + int num = (int) tileFrameY / 36; + if ((int) tileFrameY / 18 % 2 == 0) + { + int Type; + switch (num) + { + case 0: + case 5: + case 7: + case 8: + case 10: + case 12: + case 14: + case 15: + case 16: + Type = 6; + break; + case 20: + Type = 59; + break; + default: + Type = -1; + break; + } + if (Type != -1) + { + int index = Dust.NewDust(tileFrameX != (short) 0 ? (this._rand.Next(3) != 0 ? new Vector2((float) (i * 16), (float) (j * 16 + 2)) : new Vector2((float) (i * 16 + 6), (float) (j * 16 + 2))) : (this._rand.Next(3) != 0 ? new Vector2((float) (i * 16 + 14), (float) (j * 16 + 2)) : new Vector2((float) (i * 16 + 4), (float) (j * 16 + 2))), 4, 4, Type, Alpha: 100); + if (this._rand.Next(3) != 0) + this._dust[index].noGravity = true; + this._dust[index].velocity *= 0.3f; + this._dust[index].velocity.Y -= 1.5f; + } + } + } + if (typeCache == (ushort) 98 && this._rand.Next(40) == 0 && tileFrameY == (short) 0 && tileFrameX == (short) 0) + { + int index = Dust.NewDust(new Vector2((float) (i * 16 + 12), (float) (j * 16 + 2)), 4, 4, 6, Alpha: 100); + if (this._rand.Next(3) != 0) + this._dust[index].noGravity = true; + this._dust[index].velocity *= 0.3f; + this._dust[index].velocity.Y -= 1.5f; + } + if (typeCache == (ushort) 49 && tileFrameX == (short) 0 && this._rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2((float) (i * 16 + 4), (float) (j * 16 - 4)), 4, 4, 172, Alpha: 100); + if (this._rand.Next(3) == 0) + { + this._dust[index].scale = 0.5f; + } + else + { + this._dust[index].scale = 0.9f; + this._dust[index].noGravity = true; + } + this._dust[index].velocity *= 0.3f; + this._dust[index].velocity.Y -= 1.5f; + } + if (typeCache == (ushort) 372 && tileFrameX == (short) 0 && this._rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2((float) (i * 16 + 4), (float) (j * 16 - 4)), 4, 4, 242, Alpha: 100); + if (this._rand.Next(3) == 0) + { + this._dust[index].scale = 0.5f; + } + else + { + this._dust[index].scale = 0.9f; + this._dust[index].noGravity = true; + } + this._dust[index].velocity *= 0.3f; + this._dust[index].velocity.Y -= 1.5f; + } + if (typeCache == (ushort) 34 && this._rand.Next(40) == 0 && tileFrameX < (short) 54) + { + int num3 = (int) tileFrameY / 54; + int num4 = (int) tileFrameX / 18 % 3; + if ((int) tileFrameY / 18 % 3 == 1 && num4 != 1) + { + int Type; + switch (num3) + { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 12: + case 13: + case 16: + case 19: + case 21: + Type = 6; + break; + case 25: + Type = 59; + break; + default: + Type = -1; + break; + } + if (Type != -1) + { + int index = Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16 + 2)), 14, 6, Type, Alpha: 100); + if (this._rand.Next(3) != 0) + this._dust[index].noGravity = true; + this._dust[index].velocity *= 0.3f; + this._dust[index].velocity.Y -= 1.5f; + } + } + } + int maxValue = this._leafFrequency / 4; + if (typeCache == (ushort) 192 && this._rand.Next(maxValue) == 0) + this.EmitLivingTreeLeaf(i, j, 910); + if (typeCache == (ushort) 384 && this._rand.Next(maxValue) == 0) + this.EmitLivingTreeLeaf(i, j, 914); + if (typeCache == (ushort) 83) + { + int style = (int) tileFrameX / 18; + if (this.IsAlchemyPlantHarvestable(style)) + this.EmitAlchemyHerbParticles(j, i, style); + } + if (typeCache == (ushort) 22 && this._rand.Next(400) == 0) + Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 14); + else if ((typeCache == (ushort) 23 || typeCache == (ushort) 24 || typeCache == (ushort) 32) && this._rand.Next(500) == 0) + Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 14); + else if (typeCache == (ushort) 25 && this._rand.Next(700) == 0) + Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 14); + else if (typeCache == (ushort) 112 && this._rand.Next(700) == 0) + Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 14); + else if (typeCache == (ushort) 31 && this._rand.Next(20) == 0) + { + if (tileFrameX >= (short) 36) + { + int index = Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 5, Alpha: 100); + this._dust[index].velocity.Y = 0.0f; + this._dust[index].velocity.X *= 0.3f; + } + else + Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 14, Alpha: 100); + } + else if (typeCache == (ushort) 26 && this._rand.Next(20) == 0) + { + if (tileFrameX >= (short) 54) + { + int index = Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 5, Alpha: 100); + this._dust[index].scale = 1.5f; + this._dust[index].noGravity = true; + this._dust[index].velocity *= 0.75f; + } + else + Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 14, Alpha: 100); + } + else if ((typeCache == (ushort) 71 || typeCache == (ushort) 72) && this._rand.Next(500) == 0) + Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 41, Alpha: 250, Scale: 0.8f); + else if ((typeCache == (ushort) 17 || typeCache == (ushort) 77 || typeCache == (ushort) 133) && this._rand.Next(40) == 0) + { + if (!(tileFrameX == (short) 18 & tileFrameY == (short) 18)) + return; + int index = Dust.NewDust(new Vector2((float) (i * 16 - 4), (float) (j * 16 - 6)), 8, 6, 6, Alpha: 100); + if (this._rand.Next(3) == 0) + return; + this._dust[index].noGravity = true; + } + else if (typeCache == (ushort) 405 && this._rand.Next(20) == 0) + { + if (!(tileFrameX == (short) 18 & tileFrameY == (short) 18)) + return; + int index = Dust.NewDust(new Vector2((float) (i * 16 - 4), (float) (j * 16 - 6)), 24, 10, 6, Alpha: 100); + if (this._rand.Next(5) == 0) + return; + this._dust[index].noGravity = true; + } + else if (typeCache == (ushort) 452 && tileFrameY == (short) 0 && tileFrameX == (short) 0 && this._rand.Next(3) == 0) + { + Vector2 Position = new Vector2((float) (i * 16 + 16), (float) (j * 16 + 8)); + Vector2 Velocity = new Vector2(0.0f, 0.0f); + if ((double) Main.WindForVisuals < 0.0) + Velocity.X = -Main.WindForVisuals; + int Type = 907 + Main.tileFrame[(int) typeCache] / 5; + if (this._rand.Next(2) != 0) + return; + Gore.NewGore(Position, Velocity, Type, (float) ((double) this._rand.NextFloat() * 0.400000005960464 + 0.400000005960464)); + } + else if (typeCache == (ushort) 406 && tileFrameY == (short) 54 && tileFrameX == (short) 0 && this._rand.Next(3) == 0) + { + Vector2 Position = new Vector2((float) (i * 16 + 16), (float) (j * 16 + 8)); + Vector2 Velocity = new Vector2(0.0f, 0.0f); + if ((double) Main.WindForVisuals < 0.0) + Velocity.X = -Main.WindForVisuals; + int Type = this._rand.Next(825, 828); + if (this._rand.Next(4) == 0) + Gore.NewGore(Position, Velocity, Type, (float) ((double) this._rand.NextFloat() * 0.200000002980232 + 0.200000002980232)); + else if (this._rand.Next(2) == 0) + Gore.NewGore(Position, Velocity, Type, (float) ((double) this._rand.NextFloat() * 0.300000011920929 + 0.300000011920929)); + else + Gore.NewGore(Position, Velocity, Type, (float) ((double) this._rand.NextFloat() * 0.400000005960464 + 0.400000005960464)); + } + else if (typeCache == (ushort) 37 && this._rand.Next(250) == 0) + { + int index = Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 6, Scale: ((float) this._rand.Next(3))); + if ((double) this._dust[index].scale <= 1.0) + return; + this._dust[index].noGravity = true; + } + else if ((typeCache == (ushort) 58 || typeCache == (ushort) 76) && this._rand.Next(250) == 0) + { + int index = Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 6, Scale: ((float) this._rand.Next(3))); + if ((double) this._dust[index].scale > 1.0) + this._dust[index].noGravity = true; + this._dust[index].noLight = true; + } + else if (typeCache == (ushort) 61) + { + if (tileFrameX != (short) 144 || this._rand.Next(60) != 0) + return; + this._dust[Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 44, Alpha: 250, Scale: 0.4f)].fadeIn = 0.7f; + } + else + { + if (Main.tileShine[(int) typeCache] <= 0 || tileLight.R <= (byte) 20 && tileLight.B <= (byte) 20 && tileLight.G <= (byte) 20) + return; + int num5 = (int) tileLight.R; + if ((int) tileLight.G > num5) + num5 = (int) tileLight.G; + if ((int) tileLight.B > num5) + num5 = (int) tileLight.B; + int num6 = num5 / 30; + if (this._rand.Next(Main.tileShine[(int) typeCache]) >= num6 || (typeCache == (ushort) 21 || typeCache == (ushort) 441) && (tileFrameX < (short) 36 || tileFrameX >= (short) 180) && (tileFrameX < (short) 396 || tileFrameX > (short) 409) || (typeCache == (ushort) 467 || typeCache == (ushort) 468) && (tileFrameX < (short) 144 || tileFrameX >= (short) 180)) + return; + Color newColor = Color.White; + if (typeCache == (ushort) 178) + { + switch ((int) tileFrameX / 18) + { + case 0: + newColor = new Color((int) byte.MaxValue, 0, (int) byte.MaxValue, (int) byte.MaxValue); + break; + case 1: + newColor = new Color((int) byte.MaxValue, (int) byte.MaxValue, 0, (int) byte.MaxValue); + break; + case 2: + newColor = new Color(0, 0, (int) byte.MaxValue, (int) byte.MaxValue); + break; + case 3: + newColor = new Color(0, (int) byte.MaxValue, 0, (int) byte.MaxValue); + break; + case 4: + newColor = new Color((int) byte.MaxValue, 0, 0, (int) byte.MaxValue); + break; + case 5: + newColor = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + break; + case 6: + newColor = new Color((int) byte.MaxValue, (int) byte.MaxValue, 0, (int) byte.MaxValue); + break; + } + this._dust[Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 43, Alpha: 254, newColor: newColor, Scale: 0.5f)].velocity *= 0.0f; + } + else + { + if (typeCache == (ushort) 63) + newColor = new Color(0, 0, (int) byte.MaxValue, (int) byte.MaxValue); + if (typeCache == (ushort) 64) + newColor = new Color((int) byte.MaxValue, 0, 0, (int) byte.MaxValue); + if (typeCache == (ushort) 65) + newColor = new Color(0, (int) byte.MaxValue, 0, (int) byte.MaxValue); + if (typeCache == (ushort) 66) + newColor = new Color((int) byte.MaxValue, (int) byte.MaxValue, 0, (int) byte.MaxValue); + if (typeCache == (ushort) 67) + newColor = new Color((int) byte.MaxValue, 0, (int) byte.MaxValue, (int) byte.MaxValue); + if (typeCache == (ushort) 68) + newColor = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + if (typeCache == (ushort) 12) + newColor = new Color((int) byte.MaxValue, 0, 0, (int) byte.MaxValue); + if (typeCache == (ushort) 204) + newColor = new Color((int) byte.MaxValue, 0, 0, (int) byte.MaxValue); + if (typeCache == (ushort) 211) + newColor = new Color(50, (int) byte.MaxValue, 100, (int) byte.MaxValue); + this._dust[Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 43, Alpha: 254, newColor: newColor, Scale: 0.5f)].velocity *= 0.0f; + } + } + } + + private void EmitLivingTreeLeaf(int i, int j, int leafGoreType) + { + this.EmitLivingTreeLeaf_Below(i, j, leafGoreType); + if (this._rand.Next(2) != 0) + return; + this.EmitLivingTreeLeaf_Sideways(i, j, leafGoreType); + } + + private void EmitLivingTreeLeaf_Below(int x, int y, int leafGoreType) + { + Tile testTile = Main.tile[x, y + 1]; + if (WorldGen.SolidTile(testTile) || testTile.liquid > (byte) 0) + return; + float windForVisuals = Main.WindForVisuals; + if ((double) windForVisuals < -0.200000002980232 && (WorldGen.SolidTile(Main.tile[x - 1, y + 1]) || WorldGen.SolidTile(Main.tile[x - 2, y + 1])) || (double) windForVisuals > 0.200000002980232 && (WorldGen.SolidTile(Main.tile[x + 1, y + 1]) || WorldGen.SolidTile(Main.tile[x + 2, y + 1]))) + return; + Gore.NewGorePerfect(new Vector2((float) (x * 16), (float) (y * 16 + 16)), Vector2.Zero, leafGoreType).Frame.CurrentColumn = Main.tile[x, y].color(); + } + + private void EmitLivingTreeLeaf_Sideways(int x, int y, int leafGoreType) + { + int num1 = 0; + if ((double) Main.WindForVisuals > 0.200000002980232) + num1 = 1; + else if ((double) Main.WindForVisuals < -0.200000002980232) + num1 = -1; + Tile testTile = Main.tile[x + num1, y]; + if (WorldGen.SolidTile(testTile) || testTile.liquid > (byte) 0) + return; + int num2 = 0; + if (num1 == -1) + num2 = -10; + Gore.NewGorePerfect(new Vector2((float) (x * 16 + 8 + 4 * num1 + num2), (float) (y * 16 + 8)), Vector2.Zero, leafGoreType).Frame.CurrentColumn = Main.tile[x, y].color(); + } + + private void EmitLiquidDrops(int j, int i, Tile tileCache, ushort typeCache) + { + int num1 = 60; + switch (typeCache) + { + case 374: + num1 = 120; + break; + case 375: + num1 = 180; + break; + case 461: + num1 = 180; + break; + } + if (this._rand.Next(num1 * 2) != 0 || tileCache.liquid != (byte) 0) + return; + Rectangle rectangle1 = new Rectangle(i * 16, j * 16, 16, 16); + rectangle1.X -= 34; + rectangle1.Width += 68; + rectangle1.Y -= 100; + rectangle1.Height = 400; + bool flag = true; + for (int index = 0; index < 600; ++index) + { + if (this._gore[index].active && (this._gore[index].type >= 706 && this._gore[index].type <= 717 || this._gore[index].type == 943 || this._gore[index].type == 1147 || this._gore[index].type >= 1160 && this._gore[index].type <= 1162)) + { + Rectangle rectangle2 = new Rectangle((int) this._gore[index].position.X, (int) this._gore[index].position.Y, 16, 16); + if (rectangle1.Intersects(rectangle2)) + flag = false; + } + } + if (!flag) + return; + Vector2 Position = new Vector2((float) (i * 16), (float) (j * 16)); + int num2 = 706; + if (Main.waterStyle == 12) + num2 = 1147; + else if (Main.waterStyle > 1) + num2 = 706 + Main.waterStyle - 1; + if (typeCache == (ushort) 374) + num2 = 716; + if (typeCache == (ushort) 375) + num2 = 717; + if (typeCache == (ushort) 461) + { + num2 = 943; + if (Main.player[Main.myPlayer].ZoneCorrupt) + num2 = 1160; + if (Main.player[Main.myPlayer].ZoneCrimson) + num2 = 1161; + if (Main.player[Main.myPlayer].ZoneHallow) + num2 = 1162; + } + Vector2 Velocity = new Vector2(); + int Type = num2; + this._gore[Gore.NewGore(Position, Velocity, Type)].velocity *= 0.0f; + } + + private float GetWindCycle(int x, int y, double windCounter) + { + if (!Main.SettingsEnabled_TilesSwayInWind) + return 0.0f; + float num1 = (float) ((double) x * 0.5 + (double) (y / 100) * 0.5); + float num2 = (float) Math.Cos(windCounter * 6.28318548202515 + (double) num1) * 0.5f; + return (double) y < Main.worldSurface ? (num2 + Main.WindForVisuals) * Utils.GetLerpValue(0.08f, 0.18f, Math.Abs(Main.WindForVisuals), true) : 0.0f; + } + + private bool ShouldSwayInWind(int x, int y, Tile tileCache) => Main.SettingsEnabled_TilesSwayInWind && TileID.Sets.SwaysInWindBasic[(int) tileCache.type] && (tileCache.type != (ushort) 227 || tileCache.frameX != (short) 204 && tileCache.frameX != (short) 238 && tileCache.frameX != (short) 408 && tileCache.frameX != (short) 442 && tileCache.frameX != (short) 476); + + private void UpdateLeafFrequency() + { + float num = Math.Abs(Main.WindForVisuals); + this._leafFrequency = (double) num > 0.100000001490116 ? ((double) num > 0.200000002980232 ? ((double) num > 0.300000011920929 ? ((double) num > 0.400000005960464 ? ((double) num > 0.5 ? ((double) num > 0.600000023841858 ? ((double) num > 0.699999988079071 ? ((double) num > 0.800000011920929 ? ((double) num > 0.899999976158142 ? ((double) num > 1.0 ? ((double) num > 1.10000002384186 ? 10 : 20) : 30) : 40) : 50) : 75) : 130) : 200) : 300) : 450) : 1000) : 2000; + this._leafFrequency *= 7; + } + + private void EnsureWindGridSize() + { + Vector2 unscaledPosition = Main.Camera.UnscaledPosition; + Vector2 offSet = new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange); + if (Main.drawToScreen) + offSet = Vector2.Zero; + int firstTileX; + int lastTileX; + int firstTileY; + int lastTileY; + this.GetScreenDrawArea(unscaledPosition, offSet, out firstTileX, out lastTileX, out firstTileY, out lastTileY); + this._windGrid.SetSize(lastTileX - firstTileX, lastTileY - firstTileY); + } + + private void EmitTreeLeaves(int tilePosX, int tilePosY, int grassPosX, int grassPosY) + { + if (!this._isActiveAndNotPaused) + return; + int treeHeight = grassPosY - tilePosY; + Tile topTile = Main.tile[tilePosX, tilePosY]; + if (topTile.liquid > (byte) 0) + return; + int passStyle; + WorldGen.GetTreeLeaf(tilePosX, topTile, Main.tile[grassPosX, grassPosY], ref treeHeight, out int _, out passStyle); + if (passStyle == -1 || passStyle == 912 || passStyle == 913) + return; + bool flag1 = passStyle >= 917 && passStyle <= 925 || passStyle >= 1113 && passStyle <= 1121; + int maxValue = this._leafFrequency; + bool flag2 = (uint) (tilePosX - grassPosX) > 0U; + if (flag1) + maxValue /= 2; + if ((double) tilePosY > Main.worldSurface) + maxValue = 10000; + if (flag2) + maxValue *= 3; + if (this._rand.Next(maxValue) != 0) + return; + int num1 = 2; + Vector2 vector2 = new Vector2((float) (tilePosX * 16 + 8), (float) (tilePosY * 16 + 8)); + if (flag2) + { + int num2 = tilePosX - grassPosX; + vector2.X += (float) (num2 * 12); + int num3 = 0; + if (topTile.frameY == (short) 220) + num3 = 1; + else if (topTile.frameY == (short) 242) + num3 = 2; + if (topTile.frameX == (short) 66) + { + switch (num3) + { + case 0: + vector2 += new Vector2(0.0f, -6f); + break; + case 1: + vector2 += new Vector2(0.0f, -6f); + break; + case 2: + vector2 += new Vector2(0.0f, 8f); + break; + } + } + else + { + switch (num3) + { + case 0: + vector2 += new Vector2(0.0f, 4f); + break; + case 1: + vector2 += new Vector2(2f, -6f); + break; + case 2: + vector2 += new Vector2(6f, -6f); + break; + } + } + } + else + { + vector2 += new Vector2(-16f, -16f); + if (flag1) + vector2.Y -= (float) (Main.rand.Next(0, 28) * 4); + } + if (WorldGen.SolidTile(vector2.ToTileCoordinates())) + return; + Gore.NewGoreDirect(vector2, Utils.RandomVector2(Main.rand, (float) -num1, (float) num1), passStyle, (float) (0.699999988079071 + (double) Main.rand.NextFloat() * 0.600000023841858)).Frame.CurrentColumn = Main.tile[tilePosX, tilePosY].color(); + } + + private void DrawSpecialTilesLegacy(Vector2 screenPosition, Vector2 offSet) + { + for (int index1 = 0; index1 < this._specialTilesCount; ++index1) + { + int index2 = this._specialTileX[index1]; + int index3 = this._specialTileY[index1]; + Tile tile = Main.tile[index2, index3]; + ushort type1 = tile.type; + short frameX1 = tile.frameX; + short frameY1 = tile.frameY; + if (type1 == (ushort) 237) + Main.spriteBatch.Draw(TextureAssets.SunOrb.Value, new Vector2((float) (index2 * 16 - (int) screenPosition.X) + 8f, (float) (index3 * 16 - (int) screenPosition.Y - 36)) + offSet, new Rectangle?(new Rectangle(0, 0, TextureAssets.SunOrb.Width(), TextureAssets.SunOrb.Height())), new Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, 0), Main.sunCircle, new Vector2((float) (TextureAssets.SunOrb.Width() / 2), (float) (TextureAssets.SunOrb.Height() / 2)), 1f, SpriteEffects.None, 0.0f); + if (type1 == (ushort) 334 && frameX1 >= (short) 5000) + { + int num1 = (int) frameY1 / 18; + int num2 = (int) frameX1; + int num3 = 0; + int type2 = num2 % 5000 - 100; + for (; num2 >= 5000; num2 -= 5000) + ++num3; + int frameX2 = (int) Main.tile[index2 + 1, index3].frameX; + int pre = frameX2 < 25000 ? frameX2 - 10000 : frameX2 - 25000; + Item obj = new Item(); + obj.netDefaults(type2); + obj.Prefix(pre); + Main.instance.LoadItem(obj.type); + Texture2D texture2D = TextureAssets.Item[obj.type].Value; + Rectangle rectangle = Main.itemAnimations[obj.type] == null ? texture2D.Frame() : Main.itemAnimations[obj.type].GetFrame(texture2D); + int width = rectangle.Width; + int height = rectangle.Height; + float num4 = 1f; + if (width > 40 || height > 40) + num4 = width <= height ? 40f / (float) height : 40f / (float) width; + float scale = num4 * obj.scale; + SpriteEffects effects = SpriteEffects.None; + if (num3 >= 3) + effects = SpriteEffects.FlipHorizontally; + Color color = Lighting.GetColor(index2, index3); + Main.spriteBatch.Draw(texture2D, new Vector2((float) (index2 * 16 - (int) screenPosition.X + 24), (float) (index3 * 16 - (int) screenPosition.Y + 8)) + offSet, new Rectangle?(rectangle), Lighting.GetColor(index2, index3), 0.0f, new Vector2((float) (width / 2), (float) (height / 2)), scale, effects, 0.0f); + if (obj.color != new Color()) + Main.spriteBatch.Draw(texture2D, new Vector2((float) (index2 * 16 - (int) screenPosition.X + 24), (float) (index3 * 16 - (int) screenPosition.Y + 8)) + offSet, new Rectangle?(rectangle), obj.GetColor(color), 0.0f, new Vector2((float) (width / 2), (float) (height / 2)), scale, effects, 0.0f); + } + if (type1 == (ushort) 395) + { + Item theItem = ((TEItemFrame) TileEntity.ByPosition[new Point16(index2, index3)]).item; + Vector2 screenPositionForItemCenter = new Vector2((float) (index2 * 16 - (int) screenPosition.X + 16), (float) (index3 * 16 - (int) screenPosition.Y + 16)) + offSet; + Color color = Lighting.GetColor(index2, index3); + Main.DrawItemIcon(Main.spriteBatch, theItem, screenPositionForItemCenter, color, 20f); + } + if (type1 == (ushort) 520) + { + Item obj = ((TEFoodPlatter) TileEntity.ByPosition[new Point16(index2, index3)]).item; + if (!obj.IsAir) + { + Main.instance.LoadItem(obj.type); + Texture2D texture2D = TextureAssets.Item[obj.type].Value; + Rectangle rectangle = !ItemID.Sets.IsFood[obj.type] ? texture2D.Frame() : texture2D.Frame(verticalFrames: 3, frameY: 2); + int width = rectangle.Width; + int height = rectangle.Height; + float num = 1f; + SpriteEffects effects = tile.frameX == (short) 0 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + Color color = Lighting.GetColor(index2, index3); + Color currentColor = color; + float scale1 = 1f; + ItemSlot.GetItemLight(ref currentColor, ref scale1, obj); + float scale2 = num * scale1; + Vector2 position = new Vector2((float) (index2 * 16 - (int) screenPosition.X + 8), (float) (index3 * 16 - (int) screenPosition.Y + 16)) + offSet; + position.Y += 2f; + Vector2 origin = new Vector2((float) (width / 2), (float) height); + Main.spriteBatch.Draw(texture2D, position, new Rectangle?(rectangle), currentColor, 0.0f, origin, scale2, effects, 0.0f); + if (obj.color != new Color()) + Main.spriteBatch.Draw(texture2D, position, new Rectangle?(rectangle), obj.GetColor(color), 0.0f, origin, scale2, effects, 0.0f); + } + } + if (type1 == (ushort) 471) + { + Item obj = (TileEntity.ByPosition[new Point16(index2, index3)] as TEWeaponsRack).item; + Main.instance.LoadItem(obj.type); + Texture2D texture2D = TextureAssets.Item[obj.type].Value; + Rectangle rectangle = Main.itemAnimations[obj.type] == null ? texture2D.Frame() : Main.itemAnimations[obj.type].GetFrame(texture2D); + int width = rectangle.Width; + int height = rectangle.Height; + float num5 = 1f; + float num6 = 40f; + if ((double) width > (double) num6 || (double) height > (double) num6) + num5 = width <= height ? num6 / (float) height : num6 / (float) width; + float num7 = num5 * obj.scale; + SpriteEffects effects = SpriteEffects.FlipHorizontally; + if (tile.frameX < (short) 54) + effects = SpriteEffects.None; + Color color = Lighting.GetColor(index2, index3); + Color currentColor = color; + float scale3 = 1f; + ItemSlot.GetItemLight(ref currentColor, ref scale3, obj); + float scale4 = num7 * scale3; + Main.spriteBatch.Draw(texture2D, new Vector2((float) (index2 * 16 - (int) screenPosition.X + 24), (float) (index3 * 16 - (int) screenPosition.Y + 24)) + offSet, new Rectangle?(rectangle), currentColor, 0.0f, new Vector2((float) (width / 2), (float) (height / 2)), scale4, effects, 0.0f); + if (obj.color != new Color()) + Main.spriteBatch.Draw(texture2D, new Vector2((float) (index2 * 16 - (int) screenPosition.X + 24), (float) (index3 * 16 - (int) screenPosition.Y + 24)) + offSet, new Rectangle?(rectangle), obj.GetColor(color), 0.0f, new Vector2((float) (width / 2), (float) (height / 2)), scale4, effects, 0.0f); + } + if (type1 == (ushort) 412) + { + Texture2D texture2D = TextureAssets.GlowMask[202].Value; + int frameY2 = Main.tileFrame[(int) type1] / 60; + int frameY3 = (frameY2 + 1) % 4; + float num = (float) (Main.tileFrame[(int) type1] % 60) / 60f; + Color color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + Main.spriteBatch.Draw(texture2D, new Vector2((float) (index2 * 16 - (int) screenPosition.X), (float) (index3 * 16 - (int) screenPosition.Y + 10)) + offSet, new Rectangle?(texture2D.Frame(verticalFrames: 4, frameY: frameY2)), color * (1f - num), 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(texture2D, new Vector2((float) (index2 * 16 - (int) screenPosition.X), (float) (index3 * 16 - (int) screenPosition.Y + 10)) + offSet, new Rectangle?(texture2D.Frame(verticalFrames: 4, frameY: frameY3)), color * num, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + if (type1 == (ushort) 620) + { + Texture2D texture = TextureAssets.Extra[202].Value; + double num8 = (double) (Main.tileFrame[(int) type1] % 60) / 60.0; + int num9 = 2; + Main.critterCage = true; + int waterAnimalCageFrame = this.GetWaterAnimalCageFrame(index2, index3, (int) frameX1, (int) frameY1); + int index4 = 8; + int num10 = Main.butterflyCageFrame[index4, waterAnimalCageFrame]; + int num11 = 6; + float num12 = 1f; + Rectangle rectangle = new Rectangle(0, 34 * num10, 32, 32); + Vector2 position1 = new Vector2((float) (index2 * 16 - (int) screenPosition.X), (float) (index3 * 16 - (int) screenPosition.Y + num9)) + offSet; + Main.spriteBatch.Draw(texture, position1, new Rectangle?(rectangle), new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue), 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + for (int index5 = 0; index5 < num11; ++index5) + { + Color color = new Color((int) sbyte.MaxValue, (int) sbyte.MaxValue, (int) sbyte.MaxValue, 0).MultiplyRGBA(Main.hslToRgb((float) (((double) Main.GlobalTimeWrappedHourly + (double) index5 / (double) num11) % 1.0), 1f, 0.5f)) * (float) (1.0 - (double) num12 * 0.5); + color.A = (byte) 0; + int num13 = 2; + Vector2 position2 = position1 + ((float) ((double) index5 / (double) num11 * 6.28318548202515)).ToRotationVector2() * (float) ((double) num13 * (double) num12 + 2.0); + Main.spriteBatch.Draw(texture, position2, new Rectangle?(rectangle), color, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + Main.spriteBatch.Draw(texture, position1, new Rectangle?(rectangle), new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * 0.1f, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } + } + + private void DrawEntities_DisplayDolls() + { + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + foreach (KeyValuePair tileEntityPosition in this._displayDollTileEntityPositions) + { + TileEntity tileEntity; + if (tileEntityPosition.Value != -1 && TileEntity.ByPosition.TryGetValue(new Point16(tileEntityPosition.Key.X, tileEntityPosition.Key.Y), out tileEntity)) + (tileEntity as TEDisplayDoll).Draw(tileEntityPosition.Key.X, tileEntityPosition.Key.Y); + } + Main.spriteBatch.End(); + } + + private void DrawEntities_HatRacks() + { + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + foreach (KeyValuePair tileEntityPosition in this._hatRackTileEntityPositions) + { + TileEntity tileEntity; + if (tileEntityPosition.Value != -1 && TileEntity.ByPosition.TryGetValue(new Point16(tileEntityPosition.Key.X, tileEntityPosition.Key.Y), out tileEntity)) + (tileEntity as TEHatRack).Draw(tileEntityPosition.Key.X, tileEntityPosition.Key.Y); + } + Main.spriteBatch.End(); + } + + private void DrawTrees() + { + Vector2 unscaledPosition = Main.Camera.UnscaledPosition; + Vector2 zero = Vector2.Zero; + int index1 = 0; + int num1 = this._specialsCount[index1]; + float num2 = 0.08f; + float num3 = 0.06f; + for (int index2 = 0; index2 < num1; ++index2) + { + Point point = this._specialPositions[index1][index2]; + int x = point.X; + int y1 = point.Y; + Tile t = Main.tile[x, y1]; + if (t != null && t.active()) + { + ushort type = t.type; + short frameX = t.frameX; + short frameY1 = t.frameY; + bool flag1 = t.wall > (ushort) 0; + WorldGen.GetTreeFoliageDataMethod foliageDataMethod = (WorldGen.GetTreeFoliageDataMethod) null; + try + { + bool flag2 = false; + switch (type) + { + case 5: + flag2 = true; + foliageDataMethod = new WorldGen.GetTreeFoliageDataMethod(WorldGen.GetCommonTreeFoliageData); + break; + case 583: + case 584: + case 585: + case 586: + case 587: + case 588: + case 589: + flag2 = true; + foliageDataMethod = new WorldGen.GetTreeFoliageDataMethod(WorldGen.GetGemTreeFoliageData); + break; + case 596: + case 616: + flag2 = true; + foliageDataMethod = new WorldGen.GetTreeFoliageDataMethod(WorldGen.GetVanityTreeFoliageData); + break; + } + if (flag2 && frameY1 >= (short) 198 && frameX >= (short) 22) + { + int treeFrame = WorldGen.GetTreeFrame(t); + switch (frameX) + { + case 22: + int treeStyle1 = 0; + int topTextureFrameWidth1 = 80; + int topTextureFrameHeight1 = 80; + int xoffset1 = 0; + int grassPosX = x + xoffset1; + int floorY1 = y1; + if (foliageDataMethod(x, y1, xoffset1, ref treeFrame, ref treeStyle1, out floorY1, out topTextureFrameWidth1, out topTextureFrameHeight1)) + { + this.EmitTreeLeaves(x, y1, grassPosX, floorY1); + if (treeStyle1 == 14) + { + float num4 = (float) this._rand.Next(28, 42) * 0.005f + (float) (270 - (int) Main.mouseTextColor) / 1000f; + Lighting.AddLight(x, y1, 0.1f, (float) (0.200000002980232 + (double) num4 / 2.0), 0.7f + num4); + } + byte tileColor = t.color(); + Texture2D treeTopTexture = this.GetTreeTopTexture(treeStyle1, 0, tileColor); + Vector2 vector2; + Vector2 position = vector2 = new Vector2((float) (x * 16 - (int) unscaledPosition.X + 8), (float) (y1 * 16 - (int) unscaledPosition.Y + 16)) + zero; + float num5 = 0.0f; + if (!flag1) + num5 = this.GetWindCycle(x, y1, this._treeWindCounter); + position.X += num5 * 2f; + position.Y += Math.Abs(num5) * 2f; + Color color = Lighting.GetColor(x, y1); + if (t.color() == (byte) 31) + color = Color.White; + Main.spriteBatch.Draw(treeTopTexture, position, new Rectangle?(new Rectangle(treeFrame * (topTextureFrameWidth1 + 2), 0, topTextureFrameWidth1, topTextureFrameHeight1)), color, num5 * num2, new Vector2((float) (topTextureFrameWidth1 / 2), (float) topTextureFrameHeight1), 1f, SpriteEffects.None, 0.0f); + break; + } + continue; + case 44: + int treeStyle2 = 0; + int num6 = x; + int floorY2 = y1; + int xoffset2 = 1; + int topTextureFrameWidth2; + int topTextureFrameHeight2; + if (foliageDataMethod(x, y1, xoffset2, ref treeFrame, ref treeStyle2, out floorY2, out topTextureFrameWidth2, out topTextureFrameHeight2)) + { + this.EmitTreeLeaves(x, y1, num6 + xoffset2, floorY2); + if (treeStyle2 == 14) + { + float num7 = (float) this._rand.Next(28, 42) * 0.005f + (float) (270 - (int) Main.mouseTextColor) / 1000f; + Lighting.AddLight(x, y1, 0.1f, (float) (0.200000002980232 + (double) num7 / 2.0), 0.7f + num7); + } + byte tileColor = t.color(); + Texture2D treeBranchTexture = this.GetTreeBranchTexture(treeStyle2, 0, tileColor); + Vector2 position = new Vector2((float) (x * 16), (float) (y1 * 16)) - unscaledPosition.Floor() + zero + new Vector2(16f, 12f); + float num8 = 0.0f; + if (!flag1) + num8 = this.GetWindCycle(x, y1, this._treeWindCounter); + if ((double) num8 > 0.0) + position.X += num8; + position.X += Math.Abs(num8) * 2f; + Color color = Lighting.GetColor(x, y1); + if (t.color() == (byte) 31) + color = Color.White; + Main.spriteBatch.Draw(treeBranchTexture, position, new Rectangle?(new Rectangle(0, treeFrame * 42, 40, 40)), color, num8 * num3, new Vector2(40f, 24f), 1f, SpriteEffects.None, 0.0f); + break; + } + continue; + case 66: + int treeStyle3 = 0; + int num9 = x; + int floorY3 = y1; + int xoffset3 = -1; + int topTextureFrameWidth3; + int topTextureFrameHeight3; + if (foliageDataMethod(x, y1, xoffset3, ref treeFrame, ref treeStyle3, out floorY3, out topTextureFrameWidth3, out topTextureFrameHeight3)) + { + this.EmitTreeLeaves(x, y1, num9 + xoffset3, floorY3); + if (treeStyle3 == 14) + { + float num10 = (float) this._rand.Next(28, 42) * 0.005f + (float) (270 - (int) Main.mouseTextColor) / 1000f; + Lighting.AddLight(x, y1, 0.1f, (float) (0.200000002980232 + (double) num10 / 2.0), 0.7f + num10); + } + byte tileColor = t.color(); + Texture2D treeBranchTexture = this.GetTreeBranchTexture(treeStyle3, 0, tileColor); + Vector2 position = new Vector2((float) (x * 16), (float) (y1 * 16)) - unscaledPosition.Floor() + zero + new Vector2(0.0f, 18f); + float num11 = 0.0f; + if (!flag1) + num11 = this.GetWindCycle(x, y1, this._treeWindCounter); + if ((double) num11 < 0.0) + position.X += num11; + position.X -= Math.Abs(num11) * 2f; + Color color = Lighting.GetColor(x, y1); + if (t.color() == (byte) 31) + color = Color.White; + Main.spriteBatch.Draw(treeBranchTexture, position, new Rectangle?(new Rectangle(42, treeFrame * 42, 40, 40)), color, num11 * num3, new Vector2(0.0f, 30f), 1f, SpriteEffects.None, 0.0f); + break; + } + continue; + } + } + if (type == (ushort) 323) + { + if (frameX >= (short) 88) + { + if (frameX <= (short) 132) + { + int num12 = 0; + if (frameX == (short) 110) + num12 = 1; + else if (frameX == (short) 132) + num12 = 2; + int treeTextureIndex = 15; + int width = 80; + int height = 80; + int num13 = 32; + int num14 = 0; + int palmTreeBiome = this.GetPalmTreeBiome(x, y1); + int y2 = palmTreeBiome * 82; + if (palmTreeBiome >= 4 && palmTreeBiome <= 7) + { + treeTextureIndex = 21; + width = 114; + height = 98; + y2 = (palmTreeBiome - 4) * 98; + num13 = 48; + num14 = 2; + } + int frameY2 = (int) Main.tile[x, y1].frameY; + byte tileColor = t.color(); + Texture2D treeTopTexture = this.GetTreeTopTexture(treeTextureIndex, palmTreeBiome, tileColor); + Vector2 position = new Vector2((float) (x * 16 - (int) unscaledPosition.X - num13 + frameY2 + width / 2), (float) (y1 * 16 - (int) unscaledPosition.Y + 16 + num14)) + zero; + float num15 = 0.0f; + if (!flag1) + num15 = this.GetWindCycle(x, y1, this._treeWindCounter); + position.X += num15 * 2f; + position.Y += Math.Abs(num15) * 2f; + Color color = Lighting.GetColor(x, y1); + if (t.color() == (byte) 31) + color = Color.White; + Main.spriteBatch.Draw(treeTopTexture, position, new Rectangle?(new Rectangle(num12 * (width + 2), y2, width, height)), color, num15 * num2, new Vector2((float) (width / 2), (float) height), 1f, SpriteEffects.None, 0.0f); + } + } + } + } + catch + { + } + } + } + } + + private Texture2D GetTreeTopTexture( + int treeTextureIndex, + int treeTextureStyle, + byte tileColor) + { + return this._paintSystem.TryGetTreeTopAndRequestIfNotReady(treeTextureIndex, treeTextureStyle, (int) tileColor) ?? TextureAssets.TreeTop[treeTextureIndex].Value; + } + + private Texture2D GetTreeBranchTexture( + int treeTextureIndex, + int treeTextureStyle, + byte tileColor) + { + return this._paintSystem.TryGetTreeBranchAndRequestIfNotReady(treeTextureIndex, treeTextureStyle, (int) tileColor) ?? TextureAssets.TreeBranch[treeTextureIndex].Value; + } + + private void DrawGrass() + { + Vector2 unscaledPosition = Main.Camera.UnscaledPosition; + Vector2 zero = Vector2.Zero; + int index1 = 3; + int num1 = this._specialsCount[index1]; + for (int index2 = 0; index2 < num1; ++index2) + { + Point point = this._specialPositions[index1][index2]; + int x = point.X; + int y = point.Y; + Tile tile = Main.tile[x, y]; + if (tile != null && tile.active()) + { + ushort type = tile.type; + short frameX = tile.frameX; + short frameY = tile.frameY; + int tileWidth; + int tileHeight; + int tileTop; + int halfBrickHeight; + int addFrX; + int addFrY; + SpriteEffects tileSpriteEffect; + this.GetTileDrawData(x, y, tile, type, ref frameX, ref frameY, out tileWidth, out tileHeight, out tileTop, out halfBrickHeight, out addFrX, out addFrY, out tileSpriteEffect, out Texture2D _, out Rectangle _, out Color _); + bool canDoDust = this._rand.Next(4) == 0; + Color tileLight = Lighting.GetColor(x, y); + this.DrawAnimatedTile_AdjustForVisionChangers(x, y, tile, type, frameX, frameY, ref tileLight, canDoDust); + tileLight = this.DrawTiles_GetLightOverride(y, x, tile, type, frameX, frameY, tileLight); + if (this._isActiveAndNotPaused & canDoDust) + this.DrawTiles_EmitParticles(y, x, tile, type, frameX, frameY, tileLight); + if (type == (ushort) 83 && this.IsAlchemyPlantHarvestable((int) frameX / 18)) + { + ushort num2 = 84; + Main.instance.LoadTiles((int) num2); + } + if (tile.type == (ushort) 227 && frameX == (short) 202) + { + bool evil; + bool good; + bool crimson; + this.GetCactusType(x, y, (int) frameX, (int) frameY, out evil, out good, out crimson); + if (good) + frameX += (short) 170; + if (evil) + frameX += (short) 204; + if (crimson) + frameX += (short) 238; + } + Vector2 position = new Vector2((float) (x * 16 - (int) unscaledPosition.X + 8), (float) (y * 16 - (int) unscaledPosition.Y + 16)) + zero; + double grassWindCounter = this._grassWindCounter; + float num3 = this.GetWindCycle(x, y, this._grassWindCounter); + if (!WallID.Sets.AllowsWind[(int) tile.wall]) + num3 = 0.0f; + if (!this.InAPlaceWithWind(x, y, 1, 1)) + num3 = 0.0f; + float num4 = num3 + this.GetWindGridPush(x, y, 20, 0.35f); + position.X += num4 * 1f; + position.Y += Math.Abs(num4) * 1f; + Texture2D tileDrawTexture = this.GetTileDrawTexture(tile, x, y); + if (tileDrawTexture != null) + Main.spriteBatch.Draw(tileDrawTexture, position, new Rectangle?(new Rectangle((int) frameX + addFrX, (int) frameY + addFrY, tileWidth, tileHeight - halfBrickHeight)), tileLight, num4 * 0.1f, new Vector2((float) (tileWidth / 2), (float) (16 - halfBrickHeight - tileTop)), 1f, tileSpriteEffect, 0.0f); + } + } + } + + private void DrawAnimatedTile_AdjustForVisionChangers( + int i, + int j, + Tile tileCache, + ushort typeCache, + short tileFrameX, + short tileFrameY, + ref Color tileLight, + bool canDoDust) + { + if (this._localPlayer.dangerSense && TileDrawing.IsTileDangerous(this._localPlayer, tileCache, typeCache)) + { + if (tileLight.R < byte.MaxValue) + tileLight.R = byte.MaxValue; + if (tileLight.G < (byte) 50) + tileLight.G = (byte) 50; + if (tileLight.B < (byte) 50) + tileLight.B = (byte) 50; + if (this._isActiveAndNotPaused & canDoDust && this._rand.Next(30) == 0) + { + int index = Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 60, Alpha: 100, Scale: 0.3f); + this._dust[index].fadeIn = 1f; + this._dust[index].velocity *= 0.1f; + this._dust[index].noLight = true; + this._dust[index].noGravity = true; + } + } + if (!this._localPlayer.findTreasure || !Main.IsTileSpelunkable(typeCache, tileFrameX, tileFrameY)) + return; + if (tileLight.R < (byte) 200) + tileLight.R = (byte) 200; + if (tileLight.G < (byte) 170) + tileLight.G = (byte) 170; + if (!this._isActiveAndNotPaused || !(this._rand.Next(60) == 0 & canDoDust)) + return; + int index1 = Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 204, Alpha: 150, Scale: 0.3f); + this._dust[index1].fadeIn = 1f; + this._dust[index1].velocity *= 0.1f; + this._dust[index1].noLight = true; + } + + private float GetWindGridPush( + int i, + int j, + int pushAnimationTimeTotal, + float pushForcePerFrame) + { + int windTimeLeft; + int direction; + this._windGrid.GetWindTime(i, j, pushAnimationTimeTotal, out windTimeLeft, out direction); + return windTimeLeft >= pushAnimationTimeTotal / 2 ? (float) (pushAnimationTimeTotal - windTimeLeft) * pushForcePerFrame * (float) direction : (float) windTimeLeft * pushForcePerFrame * (float) direction; + } + + private float GetWindGridPushComplex( + int i, + int j, + int pushAnimationTimeTotal, + float totalPushForce, + int loops, + bool flipDirectionPerLoop) + { + int windTimeLeft; + int direction; + this._windGrid.GetWindTime(i, j, pushAnimationTimeTotal, out windTimeLeft, out direction); + double num1 = (double) windTimeLeft / (double) pushAnimationTimeTotal; + int num2 = (int) (num1 * (double) loops); + float num3 = (float) (num1 * (double) loops % 1.0); + double num4 = 1.0 / (double) loops; + if (flipDirectionPerLoop && num2 % 2 == 1) + direction *= -1; + return num1 * (double) loops % 1.0 > 0.5 ? (1f - num3) * totalPushForce * (float) direction * (float) (loops - num2) : num3 * totalPushForce * (float) direction * (float) (loops - num2); + } + + private void DrawMasterTrophies() + { + int index1 = 11; + int num1 = this._specialsCount[index1]; + for (int index2 = 0; index2 < num1; ++index2) + { + Point p = this._specialPositions[index1][index2]; + Tile tile = Main.tile[p.X, p.Y]; + if (tile != null && tile.active()) + { + Texture2D texture2D = TextureAssets.Extra[198].Value; + int frameY = (int) tile.frameX / 54; + int num2 = (uint) tile.frameY / 72U > 0U ? 1 : 0; + int horizontalFrames = 1; + int verticalFrames = 27; + Rectangle r = texture2D.Frame(horizontalFrames, verticalFrames, frameY: frameY); + Vector2 origin = r.Size() / 2f; + Vector2 worldCoordinates = p.ToWorldCoordinates(24f, 64f); + float num3 = (float) Math.Sin((double) Main.GlobalTimeWrappedHourly * 6.28318548202515 / 5.0); + Vector2 vector2_1 = new Vector2(0.0f, -40f); + Vector2 vector2_2 = worldCoordinates + vector2_1 + new Vector2(0.0f, num3 * 4f); + Color color1 = Lighting.GetColor(p.X, p.Y); + SpriteEffects effects = num2 != 0 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + Main.spriteBatch.Draw(texture2D, vector2_2 - Main.screenPosition, new Rectangle?(r), color1, 0.0f, origin, 1f, effects, 0.0f); + float num4 = (float) (Math.Sin((double) Main.GlobalTimeWrappedHourly * 6.28318548202515 / 2.0) * 0.300000011920929 + 0.699999988079071); + Color color2 = color1; + color2.A = (byte) 0; + Color color3 = color2 * 0.1f * num4; + for (float num5 = 0.0f; (double) num5 < 1.0; num5 += 0.1666667f) + Main.spriteBatch.Draw(texture2D, vector2_2 - Main.screenPosition + (6.283185f * num5).ToRotationVector2() * (float) (6.0 + (double) num3 * 2.0), new Rectangle?(r), color3, 0.0f, origin, 1f, effects, 0.0f); + } + } + } + + private void DrawTeleportationPylons() + { + int index1 = 10; + int num1 = this._specialsCount[index1]; + for (int index2 = 0; index2 < num1; ++index2) + { + Point p = this._specialPositions[index1][index2]; + Tile tile = Main.tile[p.X, p.Y]; + if (tile != null && tile.active()) + { + Texture2D texture2D = TextureAssets.Extra[181].Value; + int tileStyle = (int) tile.frameX / 54; + int num2 = 3; + int horizontalFrames = num2 + 9; + int verticalFrames = 8; + int frameY = (Main.tileFrameCounter[597] + p.X + p.Y) % 64 / 8; + Rectangle r = texture2D.Frame(horizontalFrames, verticalFrames, num2 + tileStyle, frameY); + Rectangle rectangle = texture2D.Frame(horizontalFrames, verticalFrames, 2, frameY); + texture2D.Frame(horizontalFrames, verticalFrames, frameY: frameY); + Vector2 origin = r.Size() / 2f; + Vector2 worldCoordinates = p.ToWorldCoordinates(24f, 64f); + float num3 = (float) Math.Sin((double) Main.GlobalTimeWrappedHourly * 6.28318548202515 / 5.0); + Vector2 vector2 = new Vector2(0.0f, -40f); + Vector2 center = worldCoordinates + vector2 + new Vector2(0.0f, num3 * 4f); + if (this._isActiveAndNotPaused & this._rand.Next(4) == 0 && this._rand.Next(10) == 0) + { + Rectangle dustBox = Utils.CenteredRectangle(center, r.Size()); + TeleportPylonsSystem.SpawnInWorldDust(tileStyle, dustBox); + } + Color color1 = Color.Lerp(Lighting.GetColor(p.X, p.Y), Color.White, 0.8f); + Main.spriteBatch.Draw(texture2D, center - Main.screenPosition, new Rectangle?(r), color1 * 0.7f, 0.0f, origin, 1f, SpriteEffects.None, 0.0f); + Color color2 = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * 0.1f * (float) (Math.Sin((double) Main.GlobalTimeWrappedHourly * 6.28318548202515 / 1.0) * 0.200000002980232 + 0.800000011920929); + for (float num4 = 0.0f; (double) num4 < 1.0; num4 += 0.1666667f) + Main.spriteBatch.Draw(texture2D, center - Main.screenPosition + (6.283185f * num4).ToRotationVector2() * (float) (6.0 + (double) num3 * 2.0), new Rectangle?(r), color2, 0.0f, origin, 1f, SpriteEffects.None, 0.0f); + int num5 = 0; + bool actuallySelected; + if (Main.InSmartCursorHighlightArea(p.X, p.Y, out actuallySelected)) + { + num5 = 1; + if (actuallySelected) + num5 = 2; + } + if (num5 != 0) + { + int averageTileLighting = ((int) color1.R + (int) color1.G + (int) color1.B) / 3; + if (averageTileLighting > 10) + { + Color selectionGlowColor = Colors.GetSelectionGlowColor(num5 == 2, averageTileLighting); + Main.spriteBatch.Draw(texture2D, center - Main.screenPosition, new Rectangle?(rectangle), selectionGlowColor, 0.0f, origin, 1f, SpriteEffects.None, 0.0f); + } + } + } + } + } + + private void DrawVoidLenses() + { + int index1 = 8; + int num = this._specialsCount[index1]; + this._voidLensData.Clear(); + for (int index2 = 0; index2 < num; ++index2) + { + Point p = this._specialPositions[index1][index2]; + VoidLensHelper voidLensHelper = new VoidLensHelper(p.ToWorldCoordinates(), 1f); + if (!Main.gamePaused) + voidLensHelper.Update(); + int selectionMode = 0; + bool actuallySelected; + if (Main.InSmartCursorHighlightArea(p.X, p.Y, out actuallySelected)) + { + selectionMode = 1; + if (actuallySelected) + selectionMode = 2; + } + voidLensHelper.DrawToDrawData(this._voidLensData, selectionMode); + } + foreach (DrawData drawData in this._voidLensData) + drawData.Draw(Main.spriteBatch); + } + + private void DrawMultiTileGrass() + { + Vector2 unscaledPosition = Main.Camera.UnscaledPosition; + Vector2 zero = Vector2.Zero; + int index1 = 4; + int num = this._specialsCount[index1]; + for (int index2 = 0; index2 < num; ++index2) + { + Point point = this._specialPositions[index1][index2]; + int x = point.X; + int y = point.Y; + int sizeX = 1; + int sizeY = 1; + Tile tile = Main.tile[x, y]; + if (tile != null && tile.active()) + { + switch (Main.tile[x, y].type) + { + case 27: + sizeX = 2; + sizeY = 5; + break; + case 233: + sizeX = Main.tile[x, y].frameY != (short) 0 ? 2 : 3; + sizeY = 2; + break; + case 236: + case 238: + sizeX = sizeY = 2; + break; + case 485: + case 490: + case 521: + case 522: + case 523: + case 524: + case 525: + case 526: + case 527: + sizeX = 2; + sizeY = 2; + break; + case 489: + sizeX = 2; + sizeY = 3; + break; + case 493: + sizeX = 1; + sizeY = 2; + break; + case 519: + sizeX = 1; + sizeY = this.ClimbCatTail(x, y); + y -= sizeY - 1; + break; + case 530: + sizeX = 3; + sizeY = 2; + break; + } + this.DrawMultiTileGrassInWind(unscaledPosition, zero, x, y, sizeX, sizeY); + } + } + } + + private int ClimbCatTail(int originx, int originy) + { + int num = 0; + int index = originy; + while (index > 10) + { + Tile tile = Main.tile[originx, index]; + if (tile.active() && tile.type == (ushort) 519) + { + if (tile.frameX >= (short) 180) + { + ++num; + break; + } + --index; + ++num; + } + else + break; + } + return num; + } + + private void DrawMultiTileVines() + { + Vector2 unscaledPosition = Main.Camera.UnscaledPosition; + Vector2 zero = Vector2.Zero; + int index1 = 5; + int num = this._specialsCount[index1]; + for (int index2 = 0; index2 < num; ++index2) + { + Point point = this._specialPositions[index1][index2]; + int x = point.X; + int y = point.Y; + int sizeX = 1; + int sizeY = 1; + Tile tile = Main.tile[x, y]; + if (tile != null && tile.active()) + { + switch (Main.tile[x, y].type) + { + case 34: + sizeX = 3; + sizeY = 3; + break; + case 42: + case 270: + case 271: + case 572: + case 581: + sizeX = 1; + sizeY = 2; + break; + case 91: + sizeX = 1; + sizeY = 3; + break; + case 95: + case 126: + case 444: + sizeX = 2; + sizeY = 2; + break; + case 454: + sizeX = 4; + sizeY = 3; + break; + case 465: + case 591: + case 592: + sizeX = 2; + sizeY = 3; + break; + } + this.DrawMultiTileVinesInWind(unscaledPosition, zero, x, y, sizeX, sizeY); + } + } + } + + private void DrawVines() + { + Vector2 unscaledPosition = Main.Camera.UnscaledPosition; + Vector2 zero = Vector2.Zero; + int index1 = 6; + int num = this._specialsCount[index1]; + for (int index2 = 0; index2 < num; ++index2) + { + Point point = this._specialPositions[index1][index2]; + int x = point.X; + int y = point.Y; + this.DrawVineStrip(unscaledPosition, zero, x, y); + } + } + + private void DrawReverseVines() + { + Vector2 unscaledPosition = Main.Camera.UnscaledPosition; + Vector2 zero = Vector2.Zero; + int index1 = 9; + int num = this._specialsCount[index1]; + for (int index2 = 0; index2 < num; ++index2) + { + Point point = this._specialPositions[index1][index2]; + int x = point.X; + int y = point.Y; + this.DrawRisingVineStrip(unscaledPosition, zero, x, y); + } + } + + private void DrawMultiTileGrassInWind( + Vector2 screenPosition, + Vector2 offSet, + int topLeftX, + int topLeftY, + int sizeX, + int sizeY) + { + float windCycle = this.GetWindCycle(topLeftX, topLeftY, this._sunflowerWindCounter); + Vector2 vector2_1 = new Vector2((float) (sizeX * 16) * 0.5f, (float) (sizeY * 16)); + Vector2 vector2_2 = new Vector2((float) (topLeftX * 16 - (int) screenPosition.X) + (float) ((double) sizeX * 16.0 * 0.5), (float) (topLeftY * 16 - (int) screenPosition.Y + 16 * sizeY)) + offSet; + float num1 = 0.07f; + int type1 = (int) Main.tile[topLeftX, topLeftY].type; + Texture2D texture = (Texture2D) null; + Color color1 = Color.Transparent; + bool flag = this.InAPlaceWithWind(topLeftX, topLeftY, sizeX, sizeY); + switch (type1) + { + case 27: + texture = TextureAssets.Flames[14].Value; + color1 = Color.White; + break; + case 519: + flag = this.InAPlaceWithWind(topLeftX, topLeftY, sizeX, 1); + break; + case 521: + case 522: + case 523: + case 524: + case 525: + case 526: + case 527: + num1 = 0.0f; + flag = false; + break; + default: + num1 = 0.15f; + break; + } + for (int index1 = topLeftX; index1 < topLeftX + sizeX; ++index1) + { + for (int index2 = topLeftY; index2 < topLeftY + sizeY; ++index2) + { + Tile tile = Main.tile[index1, index2]; + ushort type2 = tile.type; + if ((int) type2 == type1) + { + double num2 = (double) Math.Abs((float) (((double) (index1 - topLeftX) + 0.5) / (double) sizeX - 0.5)); + short frameX = tile.frameX; + short frameY = tile.frameY; + float num3 = (float) (1.0 - (double) (index2 - topLeftY + 1) / (double) sizeY); + if ((double) num3 == 0.0) + num3 = 0.1f; + if (!flag) + num3 = 0.0f; + int tileWidth; + int tileHeight; + int tileTop; + int halfBrickHeight; + int addFrX; + int addFrY; + SpriteEffects tileSpriteEffect; + this.GetTileDrawData(index1, index2, tile, type2, ref frameX, ref frameY, out tileWidth, out tileHeight, out tileTop, out halfBrickHeight, out addFrX, out addFrY, out tileSpriteEffect, out Texture2D _, out Rectangle _, out Color _); + bool canDoDust = this._rand.Next(4) == 0; + Color color2 = Lighting.GetColor(index1, index2); + this.DrawAnimatedTile_AdjustForVisionChangers(index1, index2, tile, type2, frameX, frameY, ref color2, canDoDust); + Color lightOverride = this.DrawTiles_GetLightOverride(index2, index1, tile, type2, frameX, frameY, color2); + if (this._isActiveAndNotPaused & canDoDust) + this.DrawTiles_EmitParticles(index2, index1, tile, type2, frameX, frameY, lightOverride); + Vector2 vector2_3 = new Vector2((float) (index1 * 16 - (int) screenPosition.X), (float) (index2 * 16 - (int) screenPosition.Y + tileTop)) + offSet; + if (tile.type == (ushort) 493 && tile.frameY == (short) 0) + { + if ((double) Main.WindForVisuals >= 0.0) + tileSpriteEffect ^= SpriteEffects.FlipHorizontally; + if (!tileSpriteEffect.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + vector2_3.X -= 6f; + else + vector2_3.X += 6f; + } + Vector2 vector2_4 = new Vector2(windCycle * 1f, Math.Abs(windCycle) * 2f * num3); + Vector2 origin = vector2_2 - vector2_3; + Texture2D tileDrawTexture = this.GetTileDrawTexture(tile, index1, index2); + if (tileDrawTexture != null) + { + Main.spriteBatch.Draw(tileDrawTexture, vector2_2 + new Vector2(0.0f, vector2_4.Y), new Rectangle?(new Rectangle((int) frameX + addFrX, (int) frameY + addFrY, tileWidth, tileHeight - halfBrickHeight)), lightOverride, windCycle * num1 * num3, origin, 1f, tileSpriteEffect, 0.0f); + if (texture != null) + Main.spriteBatch.Draw(texture, vector2_2 + new Vector2(0.0f, vector2_4.Y), new Rectangle?(new Rectangle((int) frameX + addFrX, (int) frameY + addFrY, tileWidth, tileHeight - halfBrickHeight)), color1, windCycle * num1 * num3, origin, 1f, tileSpriteEffect, 0.0f); + } + } + } + } + } + + private void DrawVineStrip(Vector2 screenPosition, Vector2 offSet, int x, int startY) + { + int num1 = 0; + int num2 = 0; + Vector2 vector2 = new Vector2((float) (x * 16 + 8), (float) (startY * 16 - 2)); + float num3 = MathHelper.Lerp(0.2f, 1f, Math.Abs(Main.WindForVisuals) / 1.2f); + float num4 = -0.08f * num3; + float windCycle = this.GetWindCycle(x, startY, this._vineWindCounter); + float num5 = 0.0f; + float num6 = 0.0f; + for (int index = startY; index < Main.maxTilesY - 10; ++index) + { + Tile tile = Main.tile[x, index]; + if (tile != null) + { + ushort type = tile.type; + if (!tile.active() || !TileID.Sets.VineThreads[(int) type]) + break; + ++num1; + if (num2 >= 5) + num4 += 0.0075f * num3; + if (num2 >= 2) + num4 += 1f / 400f; + if (WallID.Sets.AllowsWind[(int) tile.wall] && (double) index < Main.worldSurface) + ++num2; + float windGridPush = this.GetWindGridPush(x, index, 20, 0.01f); + if ((double) windGridPush == 0.0 && (double) num6 != 0.0) + num5 *= -0.78f; + else + num5 -= windGridPush; + num6 = windGridPush; + short frameX = tile.frameX; + short frameY = tile.frameY; + Color color = Lighting.GetColor(x, index); + int tileWidth; + int tileHeight; + int tileTop; + int halfBrickHeight; + int addFrX; + int addFrY; + SpriteEffects tileSpriteEffect; + this.GetTileDrawData(x, index, tile, type, ref frameX, ref frameY, out tileWidth, out tileHeight, out tileTop, out halfBrickHeight, out addFrX, out addFrY, out tileSpriteEffect, out Texture2D _, out Rectangle _, out Color _); + Vector2 position = new Vector2((float) -(int) screenPosition.X, (float) -(int) screenPosition.Y) + offSet + vector2; + if (tile.color() == (byte) 31) + color = Color.White; + float rotation = (float) num2 * num4 * windCycle + num5; + Texture2D tileDrawTexture = this.GetTileDrawTexture(tile, x, index); + if (tileDrawTexture == null) + break; + Main.spriteBatch.Draw(tileDrawTexture, position, new Rectangle?(new Rectangle((int) frameX + addFrX, (int) frameY + addFrY, tileWidth, tileHeight - halfBrickHeight)), color, rotation, new Vector2((float) (tileWidth / 2), (float) (halfBrickHeight - tileTop)), 1f, tileSpriteEffect, 0.0f); + vector2 += (rotation + 1.570796f).ToRotationVector2() * 16f; + } + } + } + + private void DrawRisingVineStrip(Vector2 screenPosition, Vector2 offSet, int x, int startY) + { + int num1 = 0; + int num2 = 0; + Vector2 vector2 = new Vector2((float) (x * 16 + 8), (float) (startY * 16 + 16 + 2)); + float num3 = MathHelper.Lerp(0.2f, 1f, Math.Abs(Main.WindForVisuals) / 1.2f); + float num4 = -0.08f * num3; + float windCycle = this.GetWindCycle(x, startY, this._vineWindCounter); + float num5 = 0.0f; + float num6 = 0.0f; + for (int index = startY; index > 10; --index) + { + Tile tile = Main.tile[x, index]; + if (tile != null) + { + ushort type = tile.type; + if (!tile.active() || !TileID.Sets.ReverseVineThreads[(int) type]) + break; + ++num1; + if (num2 >= 5) + num4 += 0.0075f * num3; + if (num2 >= 2) + num4 += 1f / 400f; + if (WallID.Sets.AllowsWind[(int) tile.wall] && (double) index < Main.worldSurface) + ++num2; + float windGridPush = this.GetWindGridPush(x, index, 40, -0.004f); + if ((double) windGridPush == 0.0 && (double) num6 != 0.0) + num5 *= -0.78f; + else + num5 -= windGridPush; + num6 = windGridPush; + short frameX = tile.frameX; + short frameY = tile.frameY; + Color color = Lighting.GetColor(x, index); + int tileWidth; + int tileHeight; + int tileTop; + int halfBrickHeight; + int addFrX; + int addFrY; + SpriteEffects tileSpriteEffect; + this.GetTileDrawData(x, index, tile, type, ref frameX, ref frameY, out tileWidth, out tileHeight, out tileTop, out halfBrickHeight, out addFrX, out addFrY, out tileSpriteEffect, out Texture2D _, out Rectangle _, out Color _); + Vector2 position = new Vector2((float) -(int) screenPosition.X, (float) -(int) screenPosition.Y) + offSet + vector2; + float rotation = (float) num2 * -num4 * windCycle + num5; + Texture2D tileDrawTexture = this.GetTileDrawTexture(tile, x, index); + if (tileDrawTexture == null) + break; + Main.spriteBatch.Draw(tileDrawTexture, position, new Rectangle?(new Rectangle((int) frameX + addFrX, (int) frameY + addFrY, tileWidth, tileHeight - halfBrickHeight)), color, rotation, new Vector2((float) (tileWidth / 2), (float) (halfBrickHeight - tileTop + tileHeight)), 1f, tileSpriteEffect, 0.0f); + vector2 += (rotation - 1.570796f).ToRotationVector2() * 16f; + } + } + } + + private float GetAverageWindGridPush( + int topLeftX, + int topLeftY, + int sizeX, + int sizeY, + int totalPushTime, + float pushForcePerFrame) + { + float num1 = 0.0f; + int num2 = 0; + for (int index1 = 0; index1 < sizeX; ++index1) + { + for (int index2 = 0; index2 < sizeY; ++index2) + { + float windGridPush = this.GetWindGridPush(topLeftX + index1, topLeftY + index2, totalPushTime, pushForcePerFrame); + if ((double) windGridPush != 0.0) + { + num1 += windGridPush; + ++num2; + } + } + } + return num2 == 0 ? 0.0f : num1 / (float) num2; + } + + private float GetHighestWindGridPushComplex( + int topLeftX, + int topLeftY, + int sizeX, + int sizeY, + int totalPushTime, + float pushForcePerFrame, + int loops, + bool swapLoopDir) + { + float num1 = 0.0f; + int num2 = int.MaxValue; + for (int index1 = 0; index1 < 1; ++index1) + { + for (int index2 = 0; index2 < sizeY; ++index2) + { + int windTimeLeft; + this._windGrid.GetWindTime(topLeftX + index1 + sizeX / 2, topLeftY + index2, totalPushTime, out windTimeLeft, out int _); + float windGridPushComplex = this.GetWindGridPushComplex(topLeftX + index1, topLeftY + index2, totalPushTime, pushForcePerFrame, loops, swapLoopDir); + if (windTimeLeft < num2 && windTimeLeft != 0) + { + num1 = windGridPushComplex; + num2 = windTimeLeft; + } + } + } + return num1; + } + + private void DrawMultiTileVinesInWind( + Vector2 screenPosition, + Vector2 offSet, + int topLeftX, + int topLeftY, + int sizeX, + int sizeY) + { + float windCycle = this.GetWindCycle(topLeftX, topLeftY, this._sunflowerWindCounter); + float num1 = windCycle; + int totalPushTime = 60; + float pushForcePerFrame = 1.26f; + float windGridPushComplex = this.GetHighestWindGridPushComplex(topLeftX, topLeftY, sizeX, sizeY, totalPushTime, pushForcePerFrame, 3, true); + float num2 = windCycle + windGridPushComplex; + Vector2 vector2_1 = new Vector2((float) (sizeX * 16) * 0.5f, 0.0f); + Vector2 vector2_2 = new Vector2((float) (topLeftX * 16 - (int) screenPosition.X) + (float) ((double) sizeX * 16.0 * 0.5), (float) (topLeftY * 16 - (int) screenPosition.Y)) + offSet; + Tile tile1 = Main.tile[topLeftX, topLeftY]; + int type1 = (int) tile1.type; + Vector2 vector2_3 = new Vector2(0.0f, -2f); + Vector2 vector2_4 = vector2_2 + vector2_3; + Texture2D texture = (Texture2D) null; + Color color = Color.Transparent; + float? nullable = new float?(); + float num3 = 1f; + float num4 = -4f; + bool flag = false; + float num5 = 0.15f; + switch (type1) + { + case 34: + case 126: + nullable = new float?(1f); + num4 = 0.0f; + switch ((int) tile1.frameY / 54 + (int) tile1.frameX / 108 * 37) + { + case 9: + nullable = new float?(); + num4 = -1f; + flag = true; + num5 *= 0.3f; + break; + case 11: + num5 *= 0.5f; + break; + case 12: + nullable = new float?(); + num4 = -1f; + break; + case 18: + nullable = new float?(); + num4 = -1f; + break; + case 21: + nullable = new float?(); + num4 = -1f; + break; + case 23: + nullable = new float?(0.0f); + break; + case 25: + nullable = new float?(); + num4 = -1f; + flag = true; + break; + case 32: + num5 *= 0.5f; + break; + case 33: + num5 *= 0.5f; + break; + case 35: + nullable = new float?(0.0f); + break; + case 36: + nullable = new float?(); + num4 = -1f; + flag = true; + break; + case 37: + nullable = new float?(); + num4 = -1f; + flag = true; + num5 *= 0.5f; + break; + case 39: + nullable = new float?(); + num4 = -1f; + flag = true; + break; + case 40: + case 41: + case 42: + case 43: + nullable = new float?(); + num4 = -2f; + flag = true; + num5 *= 0.5f; + break; + case 44: + nullable = new float?(); + num4 = -3f; + break; + } + break; + case 42: + nullable = new float?(1f); + num4 = 0.0f; + switch ((int) tile1.frameY / 36) + { + case 0: + nullable = new float?(); + num4 = -1f; + break; + case 9: + nullable = new float?(0.0f); + break; + case 12: + nullable = new float?(); + num4 = -1f; + break; + case 14: + nullable = new float?(); + num4 = -1f; + break; + case 28: + nullable = new float?(); + num4 = -1f; + break; + case 30: + nullable = new float?(0.0f); + break; + case 32: + nullable = new float?(0.0f); + break; + case 33: + nullable = new float?(0.0f); + break; + case 34: + nullable = new float?(); + num4 = -1f; + break; + case 35: + nullable = new float?(0.0f); + break; + case 38: + nullable = new float?(); + num4 = -1f; + break; + case 39: + nullable = new float?(); + num4 = -1f; + flag = true; + break; + case 40: + case 41: + case 42: + case 43: + nullable = new float?(0.0f); + nullable = new float?(); + num4 = -1f; + flag = true; + break; + } + break; + case 95: + case 270: + case 271: + case 444: + case 454: + case 572: + case 581: + nullable = new float?(1f); + num4 = 0.0f; + break; + case 591: + num3 = 0.5f; + num4 = -2f; + break; + case 592: + num3 = 0.5f; + num4 = -2f; + texture = TextureAssets.GlowMask[294].Value; + color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + break; + } + if (flag) + vector2_4 += new Vector2(0.0f, 16f); + float num6 = num5 * -1f; + if (!this.InAPlaceWithWind(topLeftX, topLeftY, sizeX, sizeY)) + num2 -= num1; + ulong num7 = 0; + for (int index1 = topLeftX; index1 < topLeftX + sizeX; ++index1) + { + for (int index2 = topLeftY; index2 < topLeftY + sizeY; ++index2) + { + Tile tile2 = Main.tile[index1, index2]; + ushort type2 = tile2.type; + if ((int) type2 == type1) + { + double num8 = (double) Math.Abs((float) (((double) (index1 - topLeftX) + 0.5) / (double) sizeX - 0.5)); + short frameX = tile2.frameX; + short frameY = tile2.frameY; + float num9 = (float) (index2 - topLeftY + 1) / (float) sizeY; + if ((double) num9 == 0.0) + num9 = 0.1f; + if (nullable.HasValue) + num9 = nullable.Value; + if (flag && index2 == topLeftY) + num9 = 0.0f; + int tileWidth; + int tileHeight; + int tileTop; + int halfBrickHeight; + int addFrX; + int addFrY; + SpriteEffects tileSpriteEffect; + this.GetTileDrawData(index1, index2, tile2, type2, ref frameX, ref frameY, out tileWidth, out tileHeight, out tileTop, out halfBrickHeight, out addFrX, out addFrY, out tileSpriteEffect, out Texture2D _, out Rectangle _, out Color _); + bool canDoDust = this._rand.Next(4) == 0; + Color tileLight = Lighting.GetColor(index1, index2); + this.DrawAnimatedTile_AdjustForVisionChangers(index1, index2, tile2, type2, frameX, frameY, ref tileLight, canDoDust); + tileLight = this.DrawTiles_GetLightOverride(index2, index1, tile2, type2, frameX, frameY, tileLight); + if (this._isActiveAndNotPaused & canDoDust) + this.DrawTiles_EmitParticles(index2, index1, tile2, type2, frameX, frameY, tileLight); + Vector2 vector2_5 = new Vector2((float) (index1 * 16 - (int) screenPosition.X), (float) (index2 * 16 - (int) screenPosition.Y + tileTop)) + offSet + vector2_3; + Vector2 vector2_6 = new Vector2(num2 * num3, Math.Abs(num2) * num4 * num9); + Vector2 origin = vector2_4 - vector2_5; + Texture2D tileDrawTexture = this.GetTileDrawTexture(tile2, index1, index2); + if (tileDrawTexture != null) + { + Vector2 position = vector2_4 + new Vector2(0.0f, vector2_6.Y); + Rectangle rectangle = new Rectangle((int) frameX + addFrX, (int) frameY + addFrY, tileWidth, tileHeight - halfBrickHeight); + float rotation = num2 * num6 * num9; + Main.spriteBatch.Draw(tileDrawTexture, position, new Rectangle?(rectangle), tileLight, rotation, origin, 1f, tileSpriteEffect, 0.0f); + if (texture != null) + Main.spriteBatch.Draw(texture, position, new Rectangle?(rectangle), color, rotation, origin, 1f, tileSpriteEffect, 0.0f); + TileDrawing.TileFlameData tileFlameData = this.GetTileFlameData(index1, index2, (int) type2, (int) frameY); + if (num7 == 0UL) + num7 = tileFlameData.flameSeed; + tileFlameData.flameSeed = num7; + for (int index3 = 0; index3 < tileFlameData.flameCount; ++index3) + { + float x = (float) Utils.RandomInt(ref tileFlameData.flameSeed, tileFlameData.flameRangeXMin, tileFlameData.flameRangeXMax) * tileFlameData.flameRangeMultX; + float y = (float) Utils.RandomInt(ref tileFlameData.flameSeed, tileFlameData.flameRangeYMin, tileFlameData.flameRangeYMax) * tileFlameData.flameRangeMultY; + Main.spriteBatch.Draw(tileFlameData.flameTexture, position + new Vector2(x, y), new Rectangle?(rectangle), tileFlameData.flameColor, rotation, origin, 1f, tileSpriteEffect, 0.0f); + } + } + } + } + } + } + + private void EmitAlchemyHerbParticles(int j, int i, int style) + { + if (style == 0 && this._rand.Next(100) == 0) + { + int index = Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16 - 4)), 16, 16, 19, Alpha: 160, Scale: 0.1f); + this._dust[index].velocity.X /= 2f; + this._dust[index].velocity.Y /= 2f; + this._dust[index].noGravity = true; + this._dust[index].fadeIn = 1f; + } + if (style == 1 && this._rand.Next(100) == 0) + Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 41, Alpha: 250, Scale: 0.8f); + if (style == 3) + { + if (this._rand.Next(200) == 0) + this._dust[Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 14, Alpha: 100, Scale: 0.2f)].fadeIn = 1.2f; + if (this._rand.Next(75) == 0) + { + int index = Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 27, Alpha: 100); + this._dust[index].velocity.X /= 2f; + this._dust[index].velocity.Y /= 2f; + } + } + if (style == 4 && this._rand.Next(150) == 0) + { + int index = Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 8, 16); + this._dust[index].velocity.X /= 3f; + this._dust[index].velocity.Y /= 3f; + this._dust[index].velocity.Y -= 0.7f; + this._dust[index].alpha = 50; + this._dust[index].scale *= 0.1f; + this._dust[index].fadeIn = 0.9f; + this._dust[index].noGravity = true; + } + if (style == 5 && this._rand.Next(40) == 0) + { + int index = Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16 - 6)), 16, 16, 6, Scale: 1.5f); + this._dust[index].velocity.Y -= 2f; + this._dust[index].noGravity = true; + } + if (style != 6 || this._rand.Next(30) != 0) + return; + Color newColor = new Color(50, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + this._dust[Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 43, Alpha: 254, newColor: newColor, Scale: 0.5f)].velocity *= 0.0f; + } + + private bool IsAlchemyPlantHarvestable(int style) => style == 0 && Main.dayTime || style == 1 && !Main.dayTime || style == 3 && !Main.dayTime && (Main.bloodMoon || Main.moonPhase == 0) || style == 4 && (Main.raining || (double) Main.cloudAlpha > 0.0) || style == 5 && !Main.raining && Main.time > 40500.0; + + private enum TileCounterType + { + Tree, + DisplayDoll, + HatRack, + WindyGrass, + MultiTileGrass, + MultiTileVine, + Vine, + BiomeGrass, + VoidLens, + ReverseVine, + TeleportationPylon, + MasterTrophy, + Count, + } + + private struct TileFlameData + { + public Texture2D flameTexture; + public ulong flameSeed; + public int flameCount; + public Color flameColor; + public int flameRangeXMin; + public int flameRangeXMax; + public int flameRangeYMin; + public int flameRangeYMax; + public float flameRangeMultX; + public float flameRangeMultY; + } + } +} diff --git a/GameContent/Drawing/WallDrawing.cs b/GameContent/Drawing/WallDrawing.cs new file mode 100644 index 0000000..fbd527c --- /dev/null +++ b/GameContent/Drawing/WallDrawing.cs @@ -0,0 +1,178 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Drawing.WallDrawing +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.Diagnostics; +using Terraria.Graphics; +using Terraria.ID; + +namespace Terraria.GameContent.Drawing +{ + public class WallDrawing + { + private static VertexColors _glowPaintColors = new VertexColors(Color.White); + private Tile[,] _tileArray; + private TilePaintSystemV2 _paintSystem; + + public WallDrawing(TilePaintSystemV2 paintSystem) => this._paintSystem = paintSystem; + + public void DrawWalls() + { + float gfxQuality = Main.gfxQuality; + int offScreenRange = Main.offScreenRange; + int num1 = Main.drawToScreen ? 1 : 0; + Vector2 screenPosition = Main.screenPosition; + int screenWidth = Main.screenWidth; + int screenHeight = Main.screenHeight; + int maxTilesX = Main.maxTilesX; + int maxTilesY = Main.maxTilesY; + int[] wallBlend = Main.wallBlend; + SpriteBatch spriteBatch = Main.spriteBatch; + TileBatch tileBatch = Main.tileBatch; + this._tileArray = Main.tile; + Stopwatch stopwatch = new Stopwatch(); + stopwatch.Start(); + int num2; + int num3 = (int) ((double) (num2 = (int) (120.0 * (1.0 - (double) gfxQuality) + 40.0 * (double) gfxQuality)) * 0.400000005960464); + int num4 = (int) ((double) num2 * 0.349999994039536); + int num5 = (int) ((double) num2 * 0.300000011920929); + Vector2 vector2 = new Vector2((float) offScreenRange, (float) offScreenRange); + if (num1 != 0) + vector2 = Vector2.Zero; + int num6 = (int) (((double) screenPosition.X - (double) vector2.X) / 16.0 - 1.0); + int num7 = (int) (((double) screenPosition.X + (double) screenWidth + (double) vector2.X) / 16.0) + 2; + int num8 = (int) (((double) screenPosition.Y - (double) vector2.Y) / 16.0 - 1.0); + int num9 = (int) (((double) screenPosition.Y + (double) screenHeight + (double) vector2.Y) / 16.0) + 5; + int num10 = offScreenRange / 16; + int num11 = offScreenRange / 16; + if (num6 - num10 < 4) + num6 = num10 + 4; + if (num7 + num10 > maxTilesX - 4) + num7 = maxTilesX - num10 - 4; + if (num8 - num11 < 4) + num8 = num11 + 4; + if (num9 + num11 > maxTilesY - 4) + num9 = maxTilesY - num11 - 4; + VertexColors vertices = new VertexColors(); + Rectangle rectangle = new Rectangle(0, 0, 32, 32); + int underworldLayer = Main.UnderworldLayer; + Point screenOverdrawOffset = Main.GetScreenOverdrawOffset(); + for (int index1 = num8 - num11 + screenOverdrawOffset.Y; index1 < num9 + num11 - screenOverdrawOffset.Y; ++index1) + { + for (int index2 = num6 - num10 + screenOverdrawOffset.X; index2 < num7 + num10 - screenOverdrawOffset.X; ++index2) + { + Tile tile = this._tileArray[index2, index1]; + if (tile == null) + { + tile = new Tile(); + this._tileArray[index2, index1] = tile; + } + ushort wall = tile.wall; + if (wall > (ushort) 0 && !this.FullTile(index2, index1)) + { + Color color1 = Lighting.GetColor(index2, index1); + if (tile.wallColor() == (byte) 31) + color1 = Color.White; + if (color1.R != (byte) 0 || color1.G != (byte) 0 || color1.B != (byte) 0 || index1 >= underworldLayer) + { + Main.instance.LoadWall((int) wall); + rectangle.X = tile.wallFrameX(); + rectangle.Y = tile.wallFrameY() + (int) Main.wallFrame[(int) wall] * 180; + switch (tile.wall) + { + case 242: + case 243: + int num12 = 20; + int num13 = ((int) Main.wallFrameCounter[(int) wall] + index2 * 11 + index1 * 27) % (num12 * 8); + rectangle.Y = tile.wallFrameY() + 180 * (num13 / num12); + break; + } + if (Lighting.NotRetro && !Main.wallLight[(int) wall] && tile.wall != (ushort) 241 && (tile.wall < (ushort) 88 || tile.wall > (ushort) 93) && !WorldGen.SolidTile(tile)) + { + Texture2D tileDrawTexture = this.GetTileDrawTexture(tile, index2, index1); + if (tile.wall == (ushort) 44) + { + Color color2 = new Color((int) (byte) Main.DiscoR, (int) (byte) Main.DiscoG, (int) (byte) Main.DiscoB); + vertices.BottomLeftColor = color2; + vertices.BottomRightColor = color2; + vertices.TopLeftColor = color2; + vertices.TopRightColor = color2; + } + else + { + Lighting.GetCornerColors(index2, index1, out vertices); + if (tile.wallColor() == (byte) 31) + vertices = WallDrawing._glowPaintColors; + } + tileBatch.Draw(tileDrawTexture, new Vector2((float) (index2 * 16 - (int) screenPosition.X - 8), (float) (index1 * 16 - (int) screenPosition.Y - 8)) + vector2, new Rectangle?(rectangle), vertices, Vector2.Zero, 1f, SpriteEffects.None); + } + else + { + Color color3 = color1; + if (wall == (ushort) 44) + color3 = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB); + Texture2D tileDrawTexture = this.GetTileDrawTexture(tile, index2, index1); + spriteBatch.Draw(tileDrawTexture, new Vector2((float) (index2 * 16 - (int) screenPosition.X - 8), (float) (index1 * 16 - (int) screenPosition.Y - 8)) + vector2, new Rectangle?(rectangle), color3, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + if ((int) color1.R > num3 || (int) color1.G > num4 || (int) color1.B > num5) + { + int num14 = this._tileArray[index2 - 1, index1].wall <= (ushort) 0 ? 0 : (wallBlend[(int) this._tileArray[index2 - 1, index1].wall] != wallBlend[(int) tile.wall] ? 1 : 0); + bool flag1 = this._tileArray[index2 + 1, index1].wall > (ushort) 0 && wallBlend[(int) this._tileArray[index2 + 1, index1].wall] != wallBlend[(int) tile.wall]; + bool flag2 = this._tileArray[index2, index1 - 1].wall > (ushort) 0 && wallBlend[(int) this._tileArray[index2, index1 - 1].wall] != wallBlend[(int) tile.wall]; + bool flag3 = this._tileArray[index2, index1 + 1].wall > (ushort) 0 && wallBlend[(int) this._tileArray[index2, index1 + 1].wall] != wallBlend[(int) tile.wall]; + if (num14 != 0) + spriteBatch.Draw(TextureAssets.WallOutline.Value, new Vector2((float) (index2 * 16 - (int) screenPosition.X), (float) (index1 * 16 - (int) screenPosition.Y)) + vector2, new Rectangle?(new Rectangle(0, 0, 2, 16)), color1, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + if (flag1) + spriteBatch.Draw(TextureAssets.WallOutline.Value, new Vector2((float) (index2 * 16 - (int) screenPosition.X + 14), (float) (index1 * 16 - (int) screenPosition.Y)) + vector2, new Rectangle?(new Rectangle(14, 0, 2, 16)), color1, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + if (flag2) + spriteBatch.Draw(TextureAssets.WallOutline.Value, new Vector2((float) (index2 * 16 - (int) screenPosition.X), (float) (index1 * 16 - (int) screenPosition.Y)) + vector2, new Rectangle?(new Rectangle(0, 0, 16, 2)), color1, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + if (flag3) + spriteBatch.Draw(TextureAssets.WallOutline.Value, new Vector2((float) (index2 * 16 - (int) screenPosition.X), (float) (index1 * 16 - (int) screenPosition.Y + 14)) + vector2, new Rectangle?(new Rectangle(0, 14, 16, 2)), color1, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } + } + } + } + Main.instance.DrawTileCracks(2, Main.LocalPlayer.hitReplace); + Main.instance.DrawTileCracks(2, Main.LocalPlayer.hitTile); + TimeLogger.DrawTime(2, stopwatch.Elapsed.TotalMilliseconds); + } + + private Texture2D GetTileDrawTexture(Tile tile, int tileX, int tileY) + { + Texture2D texture2D = TextureAssets.Wall[(int) tile.wall].Value; + Texture2D requestIfNotReady = this._paintSystem.TryGetWallAndRequestIfNotReady((int) tile.wall, (int) tile.wallColor()); + if (requestIfNotReady != null) + texture2D = requestIfNotReady; + return texture2D; + } + + protected bool FullTile(int x, int y) + { + if (this._tileArray[x - 1, y] == null || this._tileArray[x - 1, y].blockType() != 0 || this._tileArray[x + 1, y] == null || this._tileArray[x + 1, y].blockType() != 0) + return false; + Tile tile = this._tileArray[x, y]; + if (tile == null || !tile.active() || (int) tile.type < TileID.Sets.DrawsWalls.Length && TileID.Sets.DrawsWalls[(int) tile.type] || !Main.tileSolid[(int) tile.type] || Main.tileSolidTop[(int) tile.type]) + return false; + int frameX = (int) tile.frameX; + int frameY = (int) tile.frameY; + if (Main.tileLargeFrames[(int) tile.type] > (byte) 0) + { + if ((frameY == 18 || frameY == 108) && (frameX >= 18 && frameX <= 54 || frameX >= 108 && frameX <= 144)) + return true; + } + else if (frameY == 18) + { + if (frameX >= 18 && frameX <= 54 || frameX >= 108 && frameX <= 144) + return true; + } + else if (frameY >= 90 && frameY <= 196 && (frameX <= 70 || frameX >= 144 && frameX <= 232)) + return true; + return false; + } + } +} diff --git a/GameContent/Drawing/WindGrid.cs b/GameContent/Drawing/WindGrid.cs new file mode 100644 index 0000000..a7fe99f --- /dev/null +++ b/GameContent/Drawing/WindGrid.cs @@ -0,0 +1,92 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Drawing.WindGrid +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; + +namespace Terraria.GameContent.Drawing +{ + public class WindGrid + { + private WindGrid.WindCoord[,] _grid = new WindGrid.WindCoord[1, 1]; + private int _width = 1; + private int _height = 1; + private int _gameTime; + + public void SetSize(int targetWidth, int targetHeight) + { + this._width = Math.Max(this._width, targetWidth); + this._height = Math.Max(this._height, targetHeight); + this.ResizeGrid(); + } + + public void Update() + { + ++this._gameTime; + if (!Main.SettingsEnabled_TilesSwayInWind) + return; + this.ScanPlayers(); + } + + public void GetWindTime( + int tileX, + int tileY, + int timeThreshold, + out int windTimeLeft, + out int direction) + { + WindGrid.WindCoord windCoord = this._grid[tileX % this._width, tileY % this._height]; + direction = windCoord.Direction; + if (windCoord.Time + timeThreshold < this._gameTime) + windTimeLeft = 0; + else + windTimeLeft = this._gameTime - windCoord.Time; + } + + private void ResizeGrid() + { + if (this._width <= this._grid.GetLength(0) && this._height <= this._grid.GetLength(1)) + return; + this._grid = new WindGrid.WindCoord[this._width, this._height]; + } + + private void SetWindTime(int tileX, int tileY, int direction) + { + this._grid[tileX % this._width, tileY % this._height].Time = this._gameTime; + this._grid[tileX % this._width, tileY % this._height].Direction = direction; + } + + private void ScanPlayers() + { + switch (Main.netMode) + { + case 0: + this.ScanPlayer(Main.myPlayer); + break; + case 1: + for (int i = 0; i < (int) byte.MaxValue; ++i) + this.ScanPlayer(i); + break; + } + } + + private void ScanPlayer(int i) + { + Player player = Main.player[i]; + if (!player.active || player.dead || (double) player.velocity.X == 0.0 || !Utils.CenteredRectangle(Main.Camera.Center, Main.Camera.UnscaledSize).Intersects(player.Hitbox) || player.velocity.HasNaNs()) + return; + int direction = Math.Sign(player.velocity.X); + foreach (Point point in Collision.GetTilesIn(player.TopLeft, player.BottomRight)) + this.SetWindTime(point.X, point.Y, direction); + } + + private struct WindCoord + { + public int Time; + public int Direction; + } + } +} diff --git a/GameContent/Dyes/LegacyHairShaderData.cs b/GameContent/Dyes/LegacyHairShaderData.cs new file mode 100644 index 0000000..33f6f02 --- /dev/null +++ b/GameContent/Dyes/LegacyHairShaderData.cs @@ -0,0 +1,39 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Dyes.LegacyHairShaderData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.Graphics.Shaders; + +namespace Terraria.GameContent.Dyes +{ + public class LegacyHairShaderData : HairShaderData + { + private LegacyHairShaderData.ColorProcessingMethod _colorProcessor; + + public LegacyHairShaderData() + : base((Ref) null, (string) null) + { + this._shaderDisabled = true; + } + + public override Color GetColor(Player player, Color lightColor) + { + bool lighting = true; + Color color = this._colorProcessor(player, player.hairColor, ref lighting); + return lighting ? new Color(color.ToVector4() * lightColor.ToVector4()) : color; + } + + public LegacyHairShaderData UseLegacyMethod( + LegacyHairShaderData.ColorProcessingMethod colorProcessor) + { + this._colorProcessor = colorProcessor; + return this; + } + + public delegate Color ColorProcessingMethod(Player player, Color color, ref bool lighting); + } +} diff --git a/GameContent/Dyes/ReflectiveArmorShaderData.cs b/GameContent/Dyes/ReflectiveArmorShaderData.cs new file mode 100644 index 0000000..41b1f5f --- /dev/null +++ b/GameContent/Dyes/ReflectiveArmorShaderData.cs @@ -0,0 +1,67 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Dyes.ReflectiveArmorShaderData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.DataStructures; +using Terraria.Graphics.Shaders; + +namespace Terraria.GameContent.Dyes +{ + public class ReflectiveArmorShaderData : ArmorShaderData + { + public ReflectiveArmorShaderData(Ref shader, string passName) + : base(shader, passName) + { + } + + public override void Apply(Entity entity, DrawData? drawData) + { + if (entity == null) + { + this.Shader.Parameters["uLightSource"].SetValue(Vector3.Zero); + } + else + { + float num1 = 0.0f; + if (drawData.HasValue) + num1 = drawData.Value.rotation; + Vector2 position = entity.position; + float width = (float) entity.width; + float height = (float) entity.height; + Vector2 vector2_1 = new Vector2(width, height) * 0.1f; + Vector2 vector2_2 = position + vector2_1; + float x = width * 0.8f; + float y = height * 0.8f; + Vector3 subLight1 = Lighting.GetSubLight(vector2_2 + new Vector2(x * 0.5f, 0.0f)); + Vector3 subLight2 = Lighting.GetSubLight(vector2_2 + new Vector2(0.0f, y * 0.5f)); + Vector3 subLight3 = Lighting.GetSubLight(vector2_2 + new Vector2(x, y * 0.5f)); + Vector3 subLight4 = Lighting.GetSubLight(vector2_2 + new Vector2(x * 0.5f, y)); + float num2 = subLight1.X + subLight1.Y + subLight1.Z; + float num3 = subLight2.X + subLight2.Y + subLight2.Z; + float num4 = subLight3.X + subLight3.Y + subLight3.Z; + float num5 = subLight4.X + subLight4.Y + subLight4.Z; + Vector2 spinningpoint = new Vector2(num4 - num3, num5 - num2); + if ((double) spinningpoint.Length() > 1.0) + { + float num6 = 1f; + spinningpoint /= num6; + } + if (entity.direction == -1) + spinningpoint.X *= -1f; + spinningpoint = spinningpoint.RotatedBy(-(double) num1); + Vector3 vector3 = new Vector3(spinningpoint, (float) (1.0 - ((double) spinningpoint.X * (double) spinningpoint.X + (double) spinningpoint.Y * (double) spinningpoint.Y))); + vector3.X *= 2f; + vector3.Y -= 0.15f; + vector3.Y *= 2f; + vector3.Normalize(); + vector3.Z *= 0.6f; + this.Shader.Parameters["uLightSource"].SetValue(vector3); + } + base.Apply(entity, drawData); + } + } +} diff --git a/GameContent/Dyes/TeamArmorShaderData.cs b/GameContent/Dyes/TeamArmorShaderData.cs new file mode 100644 index 0000000..3f687f8 --- /dev/null +++ b/GameContent/Dyes/TeamArmorShaderData.cs @@ -0,0 +1,49 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Dyes.TeamArmorShaderData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; +using Terraria.DataStructures; +using Terraria.Graphics.Shaders; + +namespace Terraria.GameContent.Dyes +{ + public class TeamArmorShaderData : ArmorShaderData + { + private static bool isInitialized; + private static ArmorShaderData[] dustShaderData; + + public TeamArmorShaderData(Ref shader, string passName) + : base(shader, passName) + { + if (TeamArmorShaderData.isInitialized) + return; + TeamArmorShaderData.isInitialized = true; + TeamArmorShaderData.dustShaderData = new ArmorShaderData[Main.teamColor.Length]; + for (int index = 1; index < Main.teamColor.Length; ++index) + TeamArmorShaderData.dustShaderData[index] = new ArmorShaderData(shader, passName).UseColor(Main.teamColor[index]); + TeamArmorShaderData.dustShaderData[0] = new ArmorShaderData(shader, "Default"); + } + + public override void Apply(Entity entity, DrawData? drawData) + { + if (!(entity is Player player) || player.team == 0) + { + TeamArmorShaderData.dustShaderData[0].Apply((Entity) player, drawData); + } + else + { + this.UseColor(Main.teamColor[player.team]); + base.Apply((Entity) player, drawData); + } + } + + public override ArmorShaderData GetSecondaryShader(Entity entity) + { + Player player = entity as Player; + return TeamArmorShaderData.dustShaderData[player.team]; + } + } +} diff --git a/GameContent/Dyes/TwilightDyeShaderData.cs b/GameContent/Dyes/TwilightDyeShaderData.cs new file mode 100644 index 0000000..73acb60 --- /dev/null +++ b/GameContent/Dyes/TwilightDyeShaderData.cs @@ -0,0 +1,40 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Dyes.TwilightDyeShaderData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; +using Terraria.DataStructures; +using Terraria.Graphics.Shaders; + +namespace Terraria.GameContent.Dyes +{ + public class TwilightDyeShaderData : ArmorShaderData + { + public TwilightDyeShaderData(Ref shader, string passName) + : base(shader, passName) + { + } + + public override void Apply(Entity entity, DrawData? drawData) + { + if (drawData.HasValue) + { + switch (entity) + { + case Player player2 when !player2.isDisplayDollOrInanimate && !player2.isHatRackDoll: + this.UseTargetPosition(Main.screenPosition + drawData.Value.position); + break; + case Projectile _: + this.UseTargetPosition(Main.screenPosition + drawData.Value.position); + break; + default: + this.UseTargetPosition(drawData.Value.position); + break; + } + } + base.Apply(entity, drawData); + } + } +} diff --git a/GameContent/Dyes/TwilightHairDyeShaderData.cs b/GameContent/Dyes/TwilightHairDyeShaderData.cs new file mode 100644 index 0000000..ae9609a --- /dev/null +++ b/GameContent/Dyes/TwilightHairDyeShaderData.cs @@ -0,0 +1,27 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Dyes.TwilightHairDyeShaderData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; +using Terraria.DataStructures; +using Terraria.Graphics.Shaders; + +namespace Terraria.GameContent.Dyes +{ + public class TwilightHairDyeShaderData : HairShaderData + { + public TwilightHairDyeShaderData(Ref shader, string passName) + : base(shader, passName) + { + } + + public override void Apply(Player player, DrawData? drawData = null) + { + if (drawData.HasValue) + this.UseTargetPosition(Main.screenPosition + drawData.Value.position); + base.Apply(player, drawData); + } + } +} diff --git a/GameContent/Events/BirthdayParty.cs b/GameContent/Events/BirthdayParty.cs new file mode 100644 index 0000000..6d3dc17 --- /dev/null +++ b/GameContent/Events/BirthdayParty.cs @@ -0,0 +1,153 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Events.BirthdayParty +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.Graphics.Effects; +using Terraria.ID; +using Terraria.Localization; + +namespace Terraria.GameContent.Events +{ + public class BirthdayParty + { + public static bool ManualParty; + public static bool GenuineParty; + public static int PartyDaysOnCooldown; + public static List CelebratingNPCs = new List(); + private static bool _wasCelebrating; + + public static bool PartyIsUp => BirthdayParty.GenuineParty || BirthdayParty.ManualParty; + + public static void CheckMorning() => BirthdayParty.NaturalAttempt(); + + public static void CheckNight() + { + bool flag = false; + if (BirthdayParty.GenuineParty) + { + flag = true; + BirthdayParty.GenuineParty = false; + BirthdayParty.CelebratingNPCs.Clear(); + } + if (BirthdayParty.ManualParty) + { + flag = true; + BirthdayParty.ManualParty = false; + } + if (!flag) + return; + Color color = new Color((int) byte.MaxValue, 0, 160); + WorldGen.BroadcastText(NetworkText.FromKey(Lang.misc[99].Key), color); + } + + private static bool CanNPCParty(NPC n) => n.active && n.townNPC && n.aiStyle != 0 && n.type != 37 && n.type != 453 && n.type != 441 && !NPCID.Sets.IsTownPet[n.type]; + + private static void NaturalAttempt() + { + if (Main.netMode == 1 || !NPC.AnyNPCs(208)) + return; + if (BirthdayParty.PartyDaysOnCooldown > 0) + { + --BirthdayParty.PartyDaysOnCooldown; + } + else + { + if (Main.rand.Next(10) != 0) + return; + List source = new List(); + for (int index = 0; index < 200; ++index) + { + NPC n = Main.npc[index]; + if (BirthdayParty.CanNPCParty(n)) + source.Add(n); + } + if (source.Count < 5) + return; + BirthdayParty.GenuineParty = true; + BirthdayParty.PartyDaysOnCooldown = Main.rand.Next(5, 11); + NPC.freeCake = true; + BirthdayParty.CelebratingNPCs.Clear(); + List intList = new List(); + int num = 1; + if (Main.rand.Next(5) == 0 && source.Count > 12) + num = 3; + else if (Main.rand.Next(3) == 0) + num = 2; + List list = source.OrderBy((Func) (i => Main.rand.Next())).ToList(); + for (int index = 0; index < num; ++index) + intList.Add(index); + for (int index = 0; index < intList.Count; ++index) + BirthdayParty.CelebratingNPCs.Add(list[intList[index]].whoAmI); + Color color = new Color((int) byte.MaxValue, 0, 160); + if (BirthdayParty.CelebratingNPCs.Count == 3) + WorldGen.BroadcastText(NetworkText.FromKey("Game.BirthdayParty_3", (object) Main.npc[BirthdayParty.CelebratingNPCs[0]].GetGivenOrTypeNetName(), (object) Main.npc[BirthdayParty.CelebratingNPCs[1]].GetGivenOrTypeNetName(), (object) Main.npc[BirthdayParty.CelebratingNPCs[2]].GetGivenOrTypeNetName()), color); + else if (BirthdayParty.CelebratingNPCs.Count == 2) + WorldGen.BroadcastText(NetworkText.FromKey("Game.BirthdayParty_2", (object) Main.npc[BirthdayParty.CelebratingNPCs[0]].GetGivenOrTypeNetName(), (object) Main.npc[BirthdayParty.CelebratingNPCs[1]].GetGivenOrTypeNetName()), color); + else + WorldGen.BroadcastText(NetworkText.FromKey("Game.BirthdayParty_1", (object) Main.npc[BirthdayParty.CelebratingNPCs[0]].GetGivenOrTypeNetName()), color); + NetMessage.SendData(7); + } + } + + public static void ToggleManualParty() + { + int num1 = BirthdayParty.PartyIsUp ? 1 : 0; + if (Main.netMode != 1) + BirthdayParty.ManualParty = !BirthdayParty.ManualParty; + else + NetMessage.SendData(111); + int num2 = BirthdayParty.PartyIsUp ? 1 : 0; + if (num1 == num2 || Main.netMode != 2) + return; + NetMessage.SendData(7); + } + + public static void WorldClear() + { + BirthdayParty.ManualParty = false; + BirthdayParty.GenuineParty = false; + BirthdayParty.PartyDaysOnCooldown = 0; + BirthdayParty.CelebratingNPCs.Clear(); + BirthdayParty._wasCelebrating = false; + } + + public static void UpdateTime() + { + if (BirthdayParty._wasCelebrating != BirthdayParty.PartyIsUp) + { + if (Main.netMode != 2) + { + if (BirthdayParty.PartyIsUp) + SkyManager.Instance.Activate("Party", new Vector2()); + else + SkyManager.Instance.Deactivate("Party"); + } + if (Main.netMode != 1 && BirthdayParty.CelebratingNPCs.Count > 0) + { + for (int index = 0; index < BirthdayParty.CelebratingNPCs.Count; ++index) + { + if (!BirthdayParty.CanNPCParty(Main.npc[BirthdayParty.CelebratingNPCs[index]])) + BirthdayParty.CelebratingNPCs.RemoveAt(index); + } + if (BirthdayParty.CelebratingNPCs.Count == 0) + { + BirthdayParty.GenuineParty = false; + if (!BirthdayParty.ManualParty) + { + Color color = new Color((int) byte.MaxValue, 0, 160); + WorldGen.BroadcastText(NetworkText.FromKey(Lang.misc[99].Key), color); + NetMessage.SendData(7); + } + } + } + } + BirthdayParty._wasCelebrating = BirthdayParty.PartyIsUp; + } + } +} diff --git a/GameContent/Events/CultistRitual.cs b/GameContent/Events/CultistRitual.cs new file mode 100644 index 0000000..a27ce78 --- /dev/null +++ b/GameContent/Events/CultistRitual.cs @@ -0,0 +1,91 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Events.CultistRitual +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.ID; + +namespace Terraria.GameContent.Events +{ + public class CultistRitual + { + public const int delayStart = 86400; + public const int respawnDelay = 43200; + private const int timePerCultist = 3600; + private const int recheckStart = 600; + public static int delay; + public static int recheck; + + public static void UpdateTime() + { + if (Main.netMode == 1) + return; + CultistRitual.delay -= Main.dayRate; + if (CultistRitual.delay < 0) + CultistRitual.delay = 0; + CultistRitual.recheck -= Main.dayRate; + if (CultistRitual.recheck < 0) + CultistRitual.recheck = 0; + if (CultistRitual.delay != 0 || CultistRitual.recheck != 0) + return; + CultistRitual.recheck = 600; + if (NPC.AnyDanger()) + CultistRitual.recheck *= 6; + else + CultistRitual.TrySpawning(Main.dungeonX, Main.dungeonY); + } + + public static void CultistSlain() => CultistRitual.delay -= 3600; + + public static void TabletDestroyed() => CultistRitual.delay = 43200; + + public static void TrySpawning(int x, int y) + { + if (WorldGen.PlayerLOS(x - 6, y) || WorldGen.PlayerLOS(x + 6, y) || !CultistRitual.CheckRitual(x, y)) + return; + NPC.NewNPC(x * 16 + 8, (y - 4) * 16 - 8, 437); + } + + private static bool CheckRitual(int x, int y) + { + if (CultistRitual.delay != 0 || !Main.hardMode || !NPC.downedGolemBoss || !NPC.downedBoss3 || y < 7 || WorldGen.SolidTile(Main.tile[x, y - 7]) || NPC.AnyNPCs(437)) + return false; + Vector2 Center = new Vector2((float) (x * 16 + 8), (float) (y * 16 - 64 - 8 - 27)); + Point[] pointArray = (Point[]) null; + ref Point[] local = ref pointArray; + return CultistRitual.CheckFloor(Center, out local); + } + + public static bool CheckFloor(Vector2 Center, out Point[] spawnPoints) + { + Point[] pointArray = new Point[4]; + int num1 = 0; + Point tileCoordinates = Center.ToTileCoordinates(); + for (int index1 = -5; index1 <= 5; index1 += 2) + { + if (index1 != -1 && index1 != 1) + { + for (int index2 = -5; index2 < 12; ++index2) + { + int num2 = tileCoordinates.X + index1 * 2; + int num3 = tileCoordinates.Y + index2; + if ((WorldGen.SolidTile(num2, num3) || TileID.Sets.Platforms[(int) Framing.GetTileSafely(num2, num3).type]) && (!Collision.SolidTiles(num2 - 1, num2 + 1, num3 - 3, num3 - 1) || !Collision.SolidTiles(num2, num2, num3 - 3, num3 - 1) && !Collision.SolidTiles(num2 + 1, num2 + 1, num3 - 3, num3 - 2) && !Collision.SolidTiles(num2 - 1, num2 - 1, num3 - 3, num3 - 2))) + { + pointArray[num1++] = new Point(num2, num3); + break; + } + } + } + } + if (num1 != 4) + { + spawnPoints = (Point[]) null; + return false; + } + spawnPoints = pointArray; + return true; + } + } +} diff --git a/GameContent/Events/DD2Event.cs b/GameContent/Events/DD2Event.cs new file mode 100644 index 0000000..fa20e5f --- /dev/null +++ b/GameContent/Events/DD2Event.cs @@ -0,0 +1,1711 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Events.DD2Event +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using System.IO; +using Terraria.Chat; +using Terraria.Graphics.Effects; +using Terraria.ID; +using Terraria.Localization; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Events +{ + public class DD2Event + { + private static readonly Color INFO_NEW_WAVE_COLOR = new Color(175, 55, (int) byte.MaxValue); + private static readonly Color INFO_START_INVASION_COLOR = new Color(50, (int) byte.MaxValue, 130); + private const int INVASION_ID = 3; + public static bool DownedInvasionT1; + public static bool DownedInvasionT2; + public static bool DownedInvasionT3; + public static bool LostThisRun; + public static bool WonThisRun; + public static int LaneSpawnRate = 60; + private static bool _downedDarkMageT1; + private static bool _downedOgreT2; + private static bool _spawnedBetsyT3; + public static bool Ongoing; + public static Microsoft.Xna.Framework.Rectangle ArenaHitbox; + private static int _arenaHitboxingCooldown; + public static int OngoingDifficulty; + private static List _deadGoblinSpots = new List(); + private static int _crystalsDropping_lastWave; + private static int _crystalsDropping_toDrop; + private static int _crystalsDropping_alreadyDropped; + private static int _timeLeftUntilSpawningBegins; + + public static bool ReadyToFindBartender => NPC.downedBoss2; + + public static bool DownedInvasionAnyDifficulty => DD2Event.DownedInvasionT1 || DD2Event.DownedInvasionT2 || DD2Event.DownedInvasionT3; + + public static int TimeLeftBetweenWaves + { + get => DD2Event._timeLeftUntilSpawningBegins; + set => DD2Event._timeLeftUntilSpawningBegins = value; + } + + public static bool EnemySpawningIsOnHold => (uint) DD2Event._timeLeftUntilSpawningBegins > 0U; + + public static bool EnemiesShouldChasePlayers => DD2Event.Ongoing || true; + + public static void Save(BinaryWriter writer) + { + writer.Write(DD2Event.DownedInvasionT1); + writer.Write(DD2Event.DownedInvasionT2); + writer.Write(DD2Event.DownedInvasionT3); + } + + public static void Load(BinaryReader reader, int gameVersionNumber) + { + if (gameVersionNumber < 178) + { + NPC.savedBartender = false; + DD2Event.ResetProgressEntirely(); + } + else + { + NPC.savedBartender = reader.ReadBoolean(); + DD2Event.DownedInvasionT1 = reader.ReadBoolean(); + DD2Event.DownedInvasionT2 = reader.ReadBoolean(); + DD2Event.DownedInvasionT3 = reader.ReadBoolean(); + } + } + + public static void ResetProgressEntirely() + { + int num; + DD2Event.DownedInvasionT3 = (num = 0) != 0; + DD2Event.DownedInvasionT2 = num != 0; + DD2Event.DownedInvasionT1 = num != 0; + DD2Event.Ongoing = false; + DD2Event.ArenaHitbox = new Microsoft.Xna.Framework.Rectangle(); + DD2Event._arenaHitboxingCooldown = 0; + DD2Event._timeLeftUntilSpawningBegins = 0; + } + + public static void ReportEventProgress() + { + int currentWave; + int requiredKillCount; + int currentKillCount; + DD2Event.GetInvasionStatus(out currentWave, out requiredKillCount, out currentKillCount); + Main.ReportInvasionProgress(currentKillCount, requiredKillCount, 3, currentWave); + } + + public static void SyncInvasionProgress(int toWho) + { + int currentWave; + int requiredKillCount; + int currentKillCount; + DD2Event.GetInvasionStatus(out currentWave, out requiredKillCount, out currentKillCount); + NetMessage.SendData(78, toWho, number: currentKillCount, number2: ((float) requiredKillCount), number3: 3f, number4: ((float) currentWave)); + } + + public static void SpawnNPC(ref int newNPC) + { + } + + public static void UpdateTime() + { + if (!DD2Event.Ongoing && !Main.dedServ) + { + Filters.Scene.Deactivate("CrystalDestructionVortex"); + Filters.Scene.Deactivate("CrystalDestructionColor"); + Filters.Scene.Deactivate("CrystalWin"); + } + else + { + if (Main.netMode != 1 && !NPC.AnyNPCs(548)) + DD2Event.StopInvasion(); + if (Main.netMode == 1) + { + if (DD2Event._timeLeftUntilSpawningBegins > 0) + --DD2Event._timeLeftUntilSpawningBegins; + if (DD2Event._timeLeftUntilSpawningBegins >= 0) + return; + DD2Event._timeLeftUntilSpawningBegins = 0; + } + else + { + if (DD2Event._timeLeftUntilSpawningBegins > 0) + { + --DD2Event._timeLeftUntilSpawningBegins; + if (DD2Event._timeLeftUntilSpawningBegins == 0) + { + int currentWave; + int requiredKillCount; + int currentKillCount; + DD2Event.GetInvasionStatus(out currentWave, out requiredKillCount, out currentKillCount); + WorldGen.BroadcastText(Lang.GetInvasionWaveText(currentWave, DD2Event.GetEnemiesForWave(currentWave)), DD2Event.INFO_NEW_WAVE_COLOR); + if (currentWave == 7 && DD2Event.OngoingDifficulty == 3) + DD2Event.SummonBetsy(); + if (Main.netMode != 1) + Main.ReportInvasionProgress(currentKillCount, requiredKillCount, 3, currentWave); + if (Main.netMode == 2) + NetMessage.SendData(78, number: Main.invasionProgress, number2: ((float) Main.invasionProgressMax), number3: 3f, number4: ((float) currentWave)); + } + } + if (DD2Event._timeLeftUntilSpawningBegins >= 0) + return; + DD2Event._timeLeftUntilSpawningBegins = 0; + } + } + } + + public static void StartInvasion(int difficultyOverride = -1) + { + if (Main.netMode == 1) + return; + DD2Event._crystalsDropping_toDrop = 0; + DD2Event._crystalsDropping_alreadyDropped = 0; + DD2Event._crystalsDropping_lastWave = 0; + DD2Event._timeLeftUntilSpawningBegins = 0; + DD2Event.Ongoing = true; + DD2Event.FindProperDifficulty(); + if (difficultyOverride != -1) + DD2Event.OngoingDifficulty = difficultyOverride; + DD2Event._deadGoblinSpots.Clear(); + DD2Event._downedDarkMageT1 = false; + DD2Event._downedOgreT2 = false; + DD2Event._spawnedBetsyT3 = false; + DD2Event.LostThisRun = false; + DD2Event.WonThisRun = false; + NPC.waveKills = 0.0f; + NPC.waveNumber = 1; + DD2Event.ClearAllTowersInGame(); + WorldGen.BroadcastText(NetworkText.FromKey("DungeonDefenders2.InvasionStart"), DD2Event.INFO_START_INVASION_COLOR); + NetMessage.SendData(7); + if (Main.netMode != 1) + Main.ReportInvasionProgress(0, 1, 3, 1); + if (Main.netMode == 2) + NetMessage.SendData(78, number2: 1f, number3: 3f, number4: 1f); + DD2Event.SetEnemySpawningOnHold(300); + DD2Event.WipeEntities(); + } + + public static void StopInvasion(bool win = false) + { + if (!DD2Event.Ongoing) + return; + if (win) + DD2Event.WinInvasionInternal(); + DD2Event.Ongoing = false; + DD2Event._deadGoblinSpots.Clear(); + if (Main.netMode == 1) + return; + NPC.waveKills = 0.0f; + NPC.waveNumber = 0; + DD2Event.WipeEntities(); + NetMessage.SendData(7); + } + + private static void WinInvasionInternal() + { + if (DD2Event.OngoingDifficulty >= 1) + DD2Event.DownedInvasionT1 = true; + if (DD2Event.OngoingDifficulty >= 2) + DD2Event.DownedInvasionT2 = true; + if (DD2Event.OngoingDifficulty >= 3) + DD2Event.DownedInvasionT3 = true; + if (DD2Event.OngoingDifficulty == 1) + DD2Event.DropMedals(3); + if (DD2Event.OngoingDifficulty == 2) + DD2Event.DropMedals(15); + if (DD2Event.OngoingDifficulty == 3) + DD2Event.DropMedals(60); + WorldGen.BroadcastText(NetworkText.FromKey("DungeonDefenders2.InvasionWin"), DD2Event.INFO_START_INVASION_COLOR); + } + + public static bool ReadyForTier2 => Main.hardMode && NPC.downedMechBossAny; + + public static bool ReadyForTier3 => Main.hardMode && NPC.downedGolemBoss; + + private static void FindProperDifficulty() + { + DD2Event.OngoingDifficulty = 1; + if (DD2Event.ReadyForTier2) + DD2Event.OngoingDifficulty = 2; + if (!DD2Event.ReadyForTier3) + return; + DD2Event.OngoingDifficulty = 3; + } + + public static void CheckProgress(int slainMonsterID) + { + if (Main.netMode == 1 || !DD2Event.Ongoing || DD2Event.LostThisRun || DD2Event.WonThisRun || DD2Event.EnemySpawningIsOnHold) + return; + int currentWave; + int requiredKillCount; + int currentKillCount; + DD2Event.GetInvasionStatus(out currentWave, out requiredKillCount, out currentKillCount); + float monsterPointsWorth = (float) DD2Event.GetMonsterPointsWorth(slainMonsterID); + float waveKills = NPC.waveKills; + NPC.waveKills += monsterPointsWorth; + currentKillCount += (int) monsterPointsWorth; + bool flag = false; + int progressWave = currentWave; + if ((double) NPC.waveKills >= (double) requiredKillCount && requiredKillCount != 0) + { + NPC.waveKills = 0.0f; + ++NPC.waveNumber; + flag = true; + DD2Event.GetInvasionStatus(out currentWave, out requiredKillCount, out currentKillCount, true); + if (DD2Event.WonThisRun) + { + if ((double) currentKillCount == (double) waveKills || (double) monsterPointsWorth == 0.0) + return; + if (Main.netMode != 1) + Main.ReportInvasionProgress(currentKillCount, requiredKillCount, 3, currentWave); + if (Main.netMode != 2) + return; + NetMessage.SendData(78, number: Main.invasionProgress, number2: ((float) Main.invasionProgressMax), number3: 3f, number4: ((float) currentWave)); + return; + } + int num = currentWave; + WorldGen.BroadcastText(NetworkText.FromKey("DungeonDefenders2.WaveComplete"), DD2Event.INFO_NEW_WAVE_COLOR); + DD2Event.SetEnemySpawningOnHold(1800); + if (DD2Event.OngoingDifficulty == 1) + { + if (num == 5) + DD2Event.DropMedals(1); + if (num == 4) + DD2Event.DropMedals(1); + } + if (DD2Event.OngoingDifficulty == 2) + { + if (num == 7) + DD2Event.DropMedals(6); + if (num == 6) + DD2Event.DropMedals(3); + if (num == 5) + DD2Event.DropMedals(1); + } + if (DD2Event.OngoingDifficulty == 3) + { + if (num == 7) + DD2Event.DropMedals(25); + if (num == 6) + DD2Event.DropMedals(11); + if (num == 5) + DD2Event.DropMedals(3); + if (num == 4) + DD2Event.DropMedals(1); + } + } + if ((double) currentKillCount == (double) waveKills) + return; + if (flag) + { + int num = 1; + int progressMax = 1; + if (Main.netMode != 1) + Main.ReportInvasionProgress(num, progressMax, 3, progressWave); + if (Main.netMode != 2) + return; + NetMessage.SendData(78, number: num, number2: ((float) progressMax), number3: 3f, number4: ((float) progressWave)); + } + else + { + if (Main.netMode != 1) + Main.ReportInvasionProgress(currentKillCount, requiredKillCount, 3, currentWave); + if (Main.netMode != 2) + return; + NetMessage.SendData(78, number: Main.invasionProgress, number2: ((float) Main.invasionProgressMax), number3: 3f, number4: ((float) currentWave)); + } + } + + public static void StartVictoryScene() + { + DD2Event.WonThisRun = true; + int firstNpc = NPC.FindFirstNPC(548); + if (firstNpc == -1) + return; + Main.npc[firstNpc].ai[1] = 2f; + Main.npc[firstNpc].ai[0] = 2f; + Main.npc[firstNpc].netUpdate = true; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index] != null && Main.npc[index].active && Main.npc[index].type == 549) + { + Main.npc[index].ai[0] = 0.0f; + Main.npc[index].ai[1] = 1f; + Main.npc[index].netUpdate = true; + } + } + } + + public static void ReportLoss() + { + DD2Event.LostThisRun = true; + DD2Event.SetEnemySpawningOnHold(30); + } + + private static void GetInvasionStatus( + out int currentWave, + out int requiredKillCount, + out int currentKillCount, + bool currentlyInCheckProgress = false) + { + currentWave = NPC.waveNumber; + requiredKillCount = 10; + currentKillCount = (int) NPC.waveKills; + switch (DD2Event.OngoingDifficulty) + { + case 2: + requiredKillCount = DD2Event.Difficulty_2_GetRequiredWaveKills(ref currentWave, ref currentKillCount, currentlyInCheckProgress); + break; + case 3: + requiredKillCount = DD2Event.Difficulty_3_GetRequiredWaveKills(ref currentWave, ref currentKillCount, currentlyInCheckProgress); + break; + default: + requiredKillCount = DD2Event.Difficulty_1_GetRequiredWaveKills(ref currentWave, ref currentKillCount, currentlyInCheckProgress); + break; + } + } + + private static short[] GetEnemiesForWave(int wave) + { + switch (DD2Event.OngoingDifficulty) + { + case 2: + return DD2Event.Difficulty_2_GetEnemiesForWave(wave); + case 3: + return DD2Event.Difficulty_3_GetEnemiesForWave(wave); + default: + return DD2Event.Difficulty_1_GetEnemiesForWave(wave); + } + } + + private static int GetMonsterPointsWorth(int slainMonsterID) + { + switch (DD2Event.OngoingDifficulty) + { + case 2: + return DD2Event.Difficulty_2_GetMonsterPointsWorth(slainMonsterID); + case 3: + return DD2Event.Difficulty_3_GetMonsterPointsWorth(slainMonsterID); + default: + return DD2Event.Difficulty_1_GetMonsterPointsWorth(slainMonsterID); + } + } + + public static void SpawnMonsterFromGate(Vector2 gateBottom) + { + switch (DD2Event.OngoingDifficulty) + { + case 2: + DD2Event.Difficulty_2_SpawnMonsterFromGate(gateBottom); + break; + case 3: + DD2Event.Difficulty_3_SpawnMonsterFromGate(gateBottom); + break; + default: + DD2Event.Difficulty_1_SpawnMonsterFromGate(gateBottom); + break; + } + } + + public static void SummonCrystal(int x, int y) + { + if (Main.netMode == 1) + NetMessage.SendData(113, number: x, number2: ((float) y)); + else + DD2Event.SummonCrystalDirect(x, y); + } + + public static void SummonCrystalDirect(int x, int y) + { + if (NPC.AnyNPCs(548)) + return; + Tile tileSafely = Framing.GetTileSafely(x, y); + if (!tileSafely.active() || tileSafely.type != (ushort) 466) + return; + Point point = new Point(x * 16, y * 16); + point.X -= (int) tileSafely.frameX / 18 * 16; + point.Y -= (int) tileSafely.frameY / 18 * 16; + point.X += 40; + point.Y += 64; + DD2Event.StartInvasion(); + NPC.NewNPC(point.X, point.Y, 548); + DD2Event.DropStarterCrystals(); + } + + public static bool WouldFailSpawningHere(int x, int y) + { + Point xLeftEnd; + Point xRightEnd; + StrayMethods.CheckArenaScore(new Point(x, y).ToWorldCoordinates(), out xLeftEnd, out xRightEnd); + int num1 = xRightEnd.X - x; + int num2 = x - xLeftEnd.X; + return num1 < 60 || num2 < 60; + } + + public static void FailureMessage(int client) + { + LocalizedText text = Language.GetText("DungeonDefenders2.BartenderWarning"); + Color color = new Color((int) byte.MaxValue, (int) byte.MaxValue, 0); + if (Main.netMode == 2) + ChatHelper.SendChatMessageToClient(NetworkText.FromKey(text.Key), color, client); + else + Main.NewText(text.Value, color.R, color.G, color.B); + } + + public static void WipeEntities() + { + DD2Event.ClearAllTowersInGame(); + DD2Event.ClearAllDD2HostilesInGame(); + DD2Event.ClearAllDD2EnergyCrystalsInChests(); + if (Main.netMode != 2) + return; + NetMessage.SendData(114); + } + + public static void ClearAllTowersInGame() + { + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && ProjectileID.Sets.IsADD2Turret[Main.projectile[index].type]) + Main.projectile[index].Kill(); + } + } + + public static void ClearAllDD2HostilesInGame() + { + for (int number = 0; number < 200; ++number) + { + if (Main.npc[number].active && NPCID.Sets.BelongsToInvasionOldOnesArmy[Main.npc[number].type]) + { + Main.npc[number].active = false; + if (Main.netMode == 2) + NetMessage.SendData(23, number: number); + } + } + } + + public static void ClearAllDD2EnergyCrystalsInGame() + { + for (int number = 0; number < 400; ++number) + { + Item obj = Main.item[number]; + if (obj.active && obj.type == 3822) + { + obj.active = false; + if (Main.netMode == 2) + NetMessage.SendData(21, number: number); + } + } + } + + public static void ClearAllDD2EnergyCrystalsInChests() + { + if (Main.netMode == 1) + return; + List currentlyOpenChests = Chest.GetCurrentlyOpenChests(); + for (int number = 0; number < 8000; ++number) + { + Chest chest = Main.chest[number]; + if (chest != null && currentlyOpenChests.Contains(number)) + { + for (int index = 0; index < 40; ++index) + { + if (chest.item[index].type == 3822 && chest.item[index].stack > 0) + { + chest.item[index].TurnToAir(); + if (Main.netMode != 0) + NetMessage.SendData(32, number: number, number2: ((float) index)); + } + } + } + } + } + + public static void AnnounceGoblinDeath(NPC n) => DD2Event._deadGoblinSpots.Add(n.Bottom); + + public static bool CanRaiseGoblinsHere(Vector2 spot) + { + int num = 0; + foreach (Vector2 deadGoblinSpot in DD2Event._deadGoblinSpots) + { + if ((double) Vector2.DistanceSquared(deadGoblinSpot, spot) <= 640000.0) + { + ++num; + if (num >= 3) + return true; + } + } + return false; + } + + public static void RaiseGoblins(Vector2 spot) + { + List vector2List = new List(); + foreach (Vector2 deadGoblinSpot in DD2Event._deadGoblinSpots) + { + if ((double) Vector2.DistanceSquared(deadGoblinSpot, spot) <= 722500.0) + vector2List.Add(deadGoblinSpot); + } + foreach (Vector2 vector2 in vector2List) + DD2Event._deadGoblinSpots.Remove(vector2); + int num = 0; + foreach (Vector2 vec in vector2List) + { + Point tileCoordinates = vec.ToTileCoordinates(); + tileCoordinates.X += Main.rand.Next(-15, 16); + Point result; + if (WorldUtils.Find(tileCoordinates, Searches.Chain((GenSearch) new Searches.Down(50), (GenCondition) new Conditions.IsSolid()), out result)) + { + if (DD2Event.OngoingDifficulty == 3) + NPC.NewNPC(result.X * 16 + 8, result.Y * 16, 567); + else + NPC.NewNPC(result.X * 16 + 8, result.Y * 16, 566); + if (++num >= 8) + break; + } + } + } + + public static void FindArenaHitbox() + { + if (DD2Event._arenaHitboxingCooldown > 0) + { + --DD2Event._arenaHitboxingCooldown; + } + else + { + DD2Event._arenaHitboxingCooldown = 60; + Vector2 vector2_1 = new Vector2(float.MaxValue, float.MaxValue); + Vector2 vector2_2 = new Vector2(0.0f, 0.0f); + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && (npc.type == 549 || npc.type == 548)) + { + Vector2 topLeft = npc.TopLeft; + if ((double) vector2_1.X > (double) topLeft.X) + vector2_1.X = topLeft.X; + if ((double) vector2_1.Y > (double) topLeft.Y) + vector2_1.Y = topLeft.Y; + Vector2 bottomRight = npc.BottomRight; + if ((double) vector2_2.X < (double) bottomRight.X) + vector2_2.X = bottomRight.X; + if ((double) vector2_2.Y < (double) bottomRight.Y) + vector2_2.Y = bottomRight.Y; + } + } + Vector2 vector2_3 = new Vector2(16f, 16f) * 50f; + vector2_1 -= vector2_3; + vector2_2 += vector2_3; + Vector2 vector2_4 = vector2_2 - vector2_1; + DD2Event.ArenaHitbox.X = (int) vector2_1.X; + DD2Event.ArenaHitbox.Y = (int) vector2_1.Y; + DD2Event.ArenaHitbox.Width = (int) vector2_4.X; + DD2Event.ArenaHitbox.Height = (int) vector2_4.Y; + } + } + + public static bool ShouldBlockBuilding(Vector2 worldPosition) => DD2Event.ArenaHitbox.Contains(worldPosition.ToPoint()); + + public static void DropMedals(int numberOfMedals) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 548) + Main.npc[index].DropItemInstanced(Main.npc[index].position, Main.npc[index].Size, 3817, numberOfMedals, false); + } + } + + public static bool ShouldDropCrystals() + { + int currentWave; + int requiredKillCount; + int currentKillCount; + DD2Event.GetInvasionStatus(out currentWave, out requiredKillCount, out currentKillCount); + if (DD2Event._crystalsDropping_lastWave < currentWave) + { + ++DD2Event._crystalsDropping_lastWave; + if (DD2Event._crystalsDropping_alreadyDropped > 0) + DD2Event._crystalsDropping_alreadyDropped -= DD2Event._crystalsDropping_toDrop; + switch (DD2Event.OngoingDifficulty) + { + case 1: + switch (currentWave) + { + case 1: + DD2Event._crystalsDropping_toDrop = 20; + break; + case 2: + DD2Event._crystalsDropping_toDrop = 20; + break; + case 3: + DD2Event._crystalsDropping_toDrop = 30; + break; + case 4: + DD2Event._crystalsDropping_toDrop = 30; + break; + case 5: + DD2Event._crystalsDropping_toDrop = 40; + break; + } + break; + case 2: + switch (currentWave) + { + case 1: + DD2Event._crystalsDropping_toDrop = 20; + break; + case 2: + DD2Event._crystalsDropping_toDrop = 20; + break; + case 3: + DD2Event._crystalsDropping_toDrop = 20; + break; + case 4: + DD2Event._crystalsDropping_toDrop = 20; + break; + case 5: + DD2Event._crystalsDropping_toDrop = 20; + break; + case 6: + DD2Event._crystalsDropping_toDrop = 30; + break; + case 7: + DD2Event._crystalsDropping_toDrop = 30; + break; + } + break; + case 3: + switch (currentWave) + { + case 1: + DD2Event._crystalsDropping_toDrop = 20; + break; + case 2: + DD2Event._crystalsDropping_toDrop = 20; + break; + case 3: + DD2Event._crystalsDropping_toDrop = 20; + break; + case 4: + DD2Event._crystalsDropping_toDrop = 20; + break; + case 5: + DD2Event._crystalsDropping_toDrop = 30; + break; + case 6: + DD2Event._crystalsDropping_toDrop = 30; + break; + case 7: + DD2Event._crystalsDropping_toDrop = 30; + break; + } + break; + } + } + if (Main.netMode != 0 && Main.expertMode) + DD2Event._crystalsDropping_toDrop = (int) ((double) DD2Event._crystalsDropping_toDrop * (double) NPC.GetBalance()); + float num = (float) currentKillCount / (float) requiredKillCount; + if ((double) DD2Event._crystalsDropping_alreadyDropped >= (double) DD2Event._crystalsDropping_toDrop * (double) num) + return false; + ++DD2Event._crystalsDropping_alreadyDropped; + return true; + } + + private static void SummonBetsy() + { + if (DD2Event._spawnedBetsyT3 || NPC.AnyNPCs(551)) + return; + Vector2 Position = new Vector2(1f, 1f); + int firstNpc = NPC.FindFirstNPC(548); + if (firstNpc != -1) + Position = Main.npc[firstNpc].Center; + NPC.SpawnOnPlayer((int) Player.FindClosest(Position, 1, 1), 551); + DD2Event._spawnedBetsyT3 = true; + } + + private static void DropStarterCrystals() + { + for (int index1 = 0; index1 < 200; ++index1) + { + if (Main.npc[index1].active && Main.npc[index1].type == 548) + { + for (int index2 = 0; index2 < 5; ++index2) + Item.NewItem(Main.npc[index1].position, Main.npc[index1].width, Main.npc[index1].height, 3822, 2); + break; + } + } + } + + private static void SetEnemySpawningOnHold(int forHowLong) + { + DD2Event._timeLeftUntilSpawningBegins = forHowLong; + if (Main.netMode != 2) + return; + NetMessage.SendData(116, number: DD2Event._timeLeftUntilSpawningBegins); + } + + private static short[] Difficulty_1_GetEnemiesForWave(int wave) + { + DD2Event.LaneSpawnRate = 60; + switch (wave) + { + case 1: + DD2Event.LaneSpawnRate = 90; + return new short[1]{ (short) 552 }; + case 2: + return new short[2]{ (short) 552, (short) 555 }; + case 3: + DD2Event.LaneSpawnRate = 55; + return new short[3] + { + (short) 552, + (short) 555, + (short) 561 + }; + case 4: + DD2Event.LaneSpawnRate = 50; + return new short[4] + { + (short) 552, + (short) 555, + (short) 561, + (short) 558 + }; + case 5: + DD2Event.LaneSpawnRate = 40; + return new short[5] + { + (short) 552, + (short) 555, + (short) 561, + (short) 558, + (short) 564 + }; + default: + return new short[1]{ (short) 552 }; + } + } + + private static int Difficulty_1_GetRequiredWaveKills( + ref int waveNumber, + ref int currentKillCount, + bool currentlyInCheckProgress) + { + switch (waveNumber) + { + case -1: + return 0; + case 1: + return 60; + case 2: + return 80; + case 3: + return 100; + case 4: + DD2Event._deadGoblinSpots.Clear(); + return 120; + case 5: + if (!DD2Event._downedDarkMageT1 && currentKillCount > 139) + currentKillCount = 139; + return 140; + case 6: + waveNumber = 5; + currentKillCount = 1; + if (currentlyInCheckProgress) + DD2Event.StartVictoryScene(); + return 1; + default: + return 10; + } + } + + private static void Difficulty_1_SpawnMonsterFromGate(Vector2 gateBottom) + { + int x = (int) gateBottom.X; + int y = (int) gateBottom.Y; + int num1 = 50; + int num2 = 6; + if (NPC.waveNumber > 4) + num2 = 12; + else if (NPC.waveNumber > 3) + num2 = 8; + int num3 = 6; + if (NPC.waveNumber > 4) + num3 = 8; + for (int index = 1; index < Main.CurrentFrameFlags.ActivePlayersCount; ++index) + { + num1 = (int) ((double) num1 * 1.3); + num2 = (int) ((double) num2 * 1.3); + num3 = (int) ((double) num3 * 1.3); + } + int number = 200; + switch (NPC.waveNumber) + { + case 1: + if (NPC.CountNPCS(552) + NPC.CountNPCS(555) < num1) + { + number = NPC.NewNPC(x, y, 552); + break; + } + break; + case 2: + if (NPC.CountNPCS(552) + NPC.CountNPCS(555) < num1) + { + number = Main.rand.Next(7) != 0 ? NPC.NewNPC(x, y, 552) : NPC.NewNPC(x, y, 555); + break; + } + break; + case 3: + if (Main.rand.Next(6) == 0 && NPC.CountNPCS(561) < num2) + { + number = NPC.NewNPC(x, y, 561); + break; + } + if (NPC.CountNPCS(552) + NPC.CountNPCS(555) < num1) + { + number = Main.rand.Next(5) != 0 ? NPC.NewNPC(x, y, 552) : NPC.NewNPC(x, y, 555); + break; + } + break; + case 4: + if (Main.rand.Next(12) == 0 && NPC.CountNPCS(558) < num3) + { + number = NPC.NewNPC(x, y, 558); + break; + } + if (Main.rand.Next(5) == 0 && NPC.CountNPCS(561) < num2) + { + number = NPC.NewNPC(x, y, 561); + break; + } + if (NPC.CountNPCS(552) + NPC.CountNPCS(555) < num1) + { + number = Main.rand.Next(5) != 0 ? NPC.NewNPC(x, y, 552) : NPC.NewNPC(x, y, 555); + break; + } + break; + case 5: + int requiredKillCount; + int currentKillCount; + DD2Event.GetInvasionStatus(out int _, out requiredKillCount, out currentKillCount); + if ((double) currentKillCount > (double) requiredKillCount * 0.5 && !NPC.AnyNPCs(564)) + number = NPC.NewNPC(x, y, 564); + if (Main.rand.Next(10) == 0 && NPC.CountNPCS(558) < num3) + { + number = NPC.NewNPC(x, y, 558); + break; + } + if (Main.rand.Next(4) == 0 && NPC.CountNPCS(561) < num2) + { + number = NPC.NewNPC(x, y, 561); + break; + } + if (NPC.CountNPCS(552) + NPC.CountNPCS(555) < num1) + { + number = Main.rand.Next(4) != 0 ? NPC.NewNPC(x, y, 552) : NPC.NewNPC(x, y, 555); + break; + } + break; + default: + number = NPC.NewNPC(x, y, 552); + break; + } + if (Main.netMode != 2 || number >= 200) + return; + NetMessage.SendData(23, number: number); + } + + private static int Difficulty_1_GetMonsterPointsWorth(int slainMonsterID) + { + if (NPC.waveNumber == 5 && (double) NPC.waveKills >= 139.0) + { + if (slainMonsterID != 564 && slainMonsterID != 565) + return 0; + DD2Event._downedDarkMageT1 = true; + return 1; + } + if ((uint) (slainMonsterID - 551) > 14U) + { + switch (slainMonsterID) + { + case 568: + case 569: + case 570: + case 571: + case 572: + case 573: + case 574: + case 575: + case 576: + case 577: + case 578: + break; + default: + return 0; + } + } + return NPC.waveNumber == 5 && (double) NPC.waveKills == 138.0 || !Main.expertMode ? 1 : 2; + } + + private static short[] Difficulty_2_GetEnemiesForWave(int wave) + { + DD2Event.LaneSpawnRate = 60; + switch (wave) + { + case 1: + DD2Event.LaneSpawnRate = 90; + return new short[2]{ (short) 553, (short) 562 }; + case 2: + DD2Event.LaneSpawnRate = 70; + return new short[3] + { + (short) 553, + (short) 562, + (short) 572 + }; + case 3: + return new short[5] + { + (short) 553, + (short) 556, + (short) 562, + (short) 559, + (short) 572 + }; + case 4: + DD2Event.LaneSpawnRate = 55; + return new short[5] + { + (short) 553, + (short) 559, + (short) 570, + (short) 572, + (short) 562 + }; + case 5: + DD2Event.LaneSpawnRate = 50; + return new short[6] + { + (short) 553, + (short) 556, + (short) 559, + (short) 572, + (short) 574, + (short) 570 + }; + case 6: + DD2Event.LaneSpawnRate = 45; + return new short[8] + { + (short) 553, + (short) 556, + (short) 562, + (short) 559, + (short) 568, + (short) 570, + (short) 572, + (short) 574 + }; + case 7: + DD2Event.LaneSpawnRate = 42; + return new short[8] + { + (short) 553, + (short) 556, + (short) 572, + (short) 559, + (short) 568, + (short) 574, + (short) 570, + (short) 576 + }; + default: + return new short[1]{ (short) 553 }; + } + } + + private static int Difficulty_2_GetRequiredWaveKills( + ref int waveNumber, + ref int currentKillCount, + bool currentlyInCheckProgress) + { + switch (waveNumber) + { + case -1: + return 0; + case 1: + return 60; + case 2: + return 80; + case 3: + return 100; + case 4: + return 120; + case 5: + return 140; + case 6: + return 180; + case 7: + if (!DD2Event._downedOgreT2 && currentKillCount > 219) + currentKillCount = 219; + return 220; + case 8: + waveNumber = 7; + currentKillCount = 1; + if (currentlyInCheckProgress) + DD2Event.StartVictoryScene(); + return 1; + default: + return 10; + } + } + + private static int Difficulty_2_GetMonsterPointsWorth(int slainMonsterID) + { + if (NPC.waveNumber == 7 && (double) NPC.waveKills >= 219.0) + { + if (slainMonsterID != 576 && slainMonsterID != 577) + return 0; + DD2Event._downedOgreT2 = true; + return 1; + } + if ((uint) (slainMonsterID - 551) > 14U) + { + switch (slainMonsterID) + { + case 568: + case 569: + case 570: + case 571: + case 572: + case 573: + case 574: + case 575: + case 576: + case 577: + case 578: + break; + default: + return 0; + } + } + return NPC.waveNumber == 7 && (double) NPC.waveKills == 218.0 || !Main.expertMode ? 1 : 2; + } + + private static void Difficulty_2_SpawnMonsterFromGate(Vector2 gateBottom) + { + int x = (int) gateBottom.X; + int y = (int) gateBottom.Y; + int num1 = 50; + int num2 = 5; + if (NPC.waveNumber > 1) + num2 = 8; + if (NPC.waveNumber > 3) + num2 = 10; + if (NPC.waveNumber > 5) + num2 = 12; + int num3 = 5; + if (NPC.waveNumber > 4) + num3 = 7; + int num4 = 2; + int num5 = 8; + if (NPC.waveNumber > 3) + num5 = 12; + int num6 = 3; + if (NPC.waveNumber > 5) + num6 = 5; + for (int index = 1; index < Main.CurrentFrameFlags.ActivePlayersCount; ++index) + { + num1 = (int) ((double) num1 * 1.3); + num2 = (int) ((double) num2 * 1.3); + num5 = (int) ((double) num1 * 1.3); + num6 = (int) ((double) num1 * 1.35); + } + int number1 = 200; + int number2 = 200; + switch (NPC.waveNumber) + { + case 1: + if (Main.rand.Next(20) == 0 && NPC.CountNPCS(562) < num2) + { + number1 = NPC.NewNPC(x, y, 562); + break; + } + if (NPC.CountNPCS(553) < num1) + { + number1 = NPC.NewNPC(x, y, 553); + break; + } + break; + case 2: + if (Main.rand.Next(3) == 0 && NPC.CountNPCS(572) < num5) + { + number1 = NPC.NewNPC(x, y, 572); + break; + } + if (Main.rand.Next(8) == 0 && NPC.CountNPCS(562) < num2) + { + number1 = NPC.NewNPC(x, y, 562); + break; + } + if (NPC.CountNPCS(553) < num1) + { + number1 = NPC.NewNPC(x, y, 553); + break; + } + break; + case 3: + if (Main.rand.Next(7) == 0 && NPC.CountNPCS(572) < num5) + { + number1 = NPC.NewNPC(x, y, 572); + break; + } + if (Main.rand.Next(10) == 0 && NPC.CountNPCS(559) < num3) + { + number1 = NPC.NewNPC(x, y, 559); + break; + } + if (Main.rand.Next(8) == 0 && NPC.CountNPCS(562) < num2) + { + number1 = NPC.NewNPC(x, y, 562); + break; + } + if (NPC.CountNPCS(553) + NPC.CountNPCS(556) < num1) + { + if (Main.rand.Next(4) == 0) + number1 = NPC.NewNPC(x, y, 556); + number2 = NPC.NewNPC(x, y, 553); + break; + } + break; + case 4: + if (Main.rand.Next(10) == 0 && NPC.CountNPCS(570) < num6) + { + number1 = NPC.NewNPC(x, y, 570); + break; + } + if (Main.rand.Next(12) == 0 && NPC.CountNPCS(559) < num3) + { + number1 = NPC.NewNPC(x, y, 559); + break; + } + if (Main.rand.Next(6) == 0 && NPC.CountNPCS(562) < num2) + { + number1 = NPC.NewNPC(x, y, 562); + break; + } + if (Main.rand.Next(3) == 0 && NPC.CountNPCS(572) < num5) + { + number1 = NPC.NewNPC(x, y, 572); + break; + } + if (NPC.CountNPCS(553) < num1) + { + number1 = NPC.NewNPC(x, y, 553); + break; + } + break; + case 5: + if (Main.rand.Next(7) == 0 && NPC.CountNPCS(570) < num6) + { + number1 = NPC.NewNPC(x, y, 570); + break; + } + if (Main.rand.Next(10) == 0 && NPC.CountNPCS(559) < num3) + { + number1 = NPC.NewNPC(x, y, 559); + break; + } + if (Main.rand.Next(4) == 0 && NPC.CountNPCS(572) + NPC.CountNPCS(574) < num5) + { + number1 = Main.rand.Next(2) != 0 ? NPC.NewNPC(x, y, 574) : NPC.NewNPC(x, y, 572); + break; + } + if (NPC.CountNPCS(553) + NPC.CountNPCS(556) < num1) + { + if (Main.rand.Next(3) == 0) + number1 = NPC.NewNPC(x, y, 556); + number2 = NPC.NewNPC(x, y, 553); + break; + } + break; + case 6: + if (Main.rand.Next(7) == 0 && NPC.CountNPCS(570) < num6) + { + number1 = NPC.NewNPC(x, y, 570); + break; + } + if (Main.rand.Next(17) == 0 && NPC.CountNPCS(568) < num4) + { + number1 = NPC.NewNPC(x, y, 568); + break; + } + if (Main.rand.Next(5) == 0 && NPC.CountNPCS(572) + NPC.CountNPCS(574) < num5) + { + number1 = Main.rand.Next(2) == 0 ? NPC.NewNPC(x, y, 574) : NPC.NewNPC(x, y, 572); + break; + } + if (Main.rand.Next(9) == 0 && NPC.CountNPCS(559) < num3) + { + number1 = NPC.NewNPC(x, y, 559); + break; + } + if (Main.rand.Next(3) == 0 && NPC.CountNPCS(562) < num2) + { + number1 = NPC.NewNPC(x, y, 562); + break; + } + if (NPC.CountNPCS(553) + NPC.CountNPCS(556) < num1) + { + if (Main.rand.Next(3) != 0) + number1 = NPC.NewNPC(x, y, 556); + number2 = NPC.NewNPC(x, y, 553); + break; + } + break; + case 7: + int requiredKillCount; + int currentKillCount; + DD2Event.GetInvasionStatus(out int _, out requiredKillCount, out currentKillCount); + if ((double) currentKillCount > (double) requiredKillCount * 0.100000001490116 && !NPC.AnyNPCs(576)) + { + number1 = NPC.NewNPC(x, y, 576); + break; + } + if (Main.rand.Next(7) == 0 && NPC.CountNPCS(570) < num6) + { + number1 = NPC.NewNPC(x, y, 570); + break; + } + if (Main.rand.Next(17) == 0 && NPC.CountNPCS(568) < num4) + { + number1 = NPC.NewNPC(x, y, 568); + break; + } + if (Main.rand.Next(7) == 0 && NPC.CountNPCS(572) + NPC.CountNPCS(574) < num5) + { + number1 = Main.rand.Next(3) == 0 ? NPC.NewNPC(x, y, 574) : NPC.NewNPC(x, y, 572); + break; + } + if (Main.rand.Next(11) == 0 && NPC.CountNPCS(559) < num3) + { + number1 = NPC.NewNPC(x, y, 559); + break; + } + if (NPC.CountNPCS(553) + NPC.CountNPCS(556) < num1) + { + if (Main.rand.Next(2) == 0) + number1 = NPC.NewNPC(x, y, 556); + number2 = NPC.NewNPC(x, y, 553); + break; + } + break; + default: + number1 = NPC.NewNPC(x, y, 553); + break; + } + if (Main.netMode == 2 && number1 < 200) + NetMessage.SendData(23, number: number1); + if (Main.netMode != 2 || number2 >= 200) + return; + NetMessage.SendData(23, number: number2); + } + + private static short[] Difficulty_3_GetEnemiesForWave(int wave) + { + DD2Event.LaneSpawnRate = 60; + switch (wave) + { + case 1: + DD2Event.LaneSpawnRate = 85; + return new short[3] + { + (short) 554, + (short) 557, + (short) 563 + }; + case 2: + DD2Event.LaneSpawnRate = 75; + return new short[5] + { + (short) 554, + (short) 557, + (short) 563, + (short) 573, + (short) 578 + }; + case 3: + DD2Event.LaneSpawnRate = 60; + return new short[5] + { + (short) 554, + (short) 563, + (short) 560, + (short) 573, + (short) 571 + }; + case 4: + DD2Event.LaneSpawnRate = 60; + return new short[7] + { + (short) 554, + (short) 560, + (short) 571, + (short) 573, + (short) 563, + (short) 575, + (short) 565 + }; + case 5: + DD2Event.LaneSpawnRate = 55; + return new short[7] + { + (short) 554, + (short) 557, + (short) 573, + (short) 575, + (short) 571, + (short) 569, + (short) 577 + }; + case 6: + DD2Event.LaneSpawnRate = 60; + return new short[8] + { + (short) 554, + (short) 557, + (short) 563, + (short) 560, + (short) 569, + (short) 571, + (short) 577, + (short) 565 + }; + case 7: + DD2Event.LaneSpawnRate = 90; + return new short[6] + { + (short) 554, + (short) 557, + (short) 563, + (short) 569, + (short) 571, + (short) 551 + }; + default: + return new short[1]{ (short) 554 }; + } + } + + private static int Difficulty_3_GetRequiredWaveKills( + ref int waveNumber, + ref int currentKillCount, + bool currentlyInCheckProgress) + { + switch (waveNumber) + { + case -1: + return 0; + case 1: + return 60; + case 2: + return 80; + case 3: + return 100; + case 4: + return 120; + case 5: + return 140; + case 6: + return 180; + case 7: + int firstNpc = NPC.FindFirstNPC(551); + if (firstNpc == -1) + return 1; + currentKillCount = 100 - (int) ((double) Main.npc[firstNpc].life / (double) Main.npc[firstNpc].lifeMax * 100.0); + return 100; + case 8: + waveNumber = 7; + currentKillCount = 1; + if (currentlyInCheckProgress) + DD2Event.StartVictoryScene(); + return 1; + default: + return 10; + } + } + + private static int Difficulty_3_GetMonsterPointsWorth(int slainMonsterID) + { + if (NPC.waveNumber == 7) + return slainMonsterID == 551 ? 1 : 0; + if ((uint) (slainMonsterID - 551) > 14U) + { + switch (slainMonsterID) + { + case 568: + case 569: + case 570: + case 571: + case 572: + case 573: + case 574: + case 575: + case 576: + case 577: + case 578: + break; + default: + return 0; + } + } + return !Main.expertMode ? 1 : 2; + } + + private static void Difficulty_3_SpawnMonsterFromGate(Vector2 gateBottom) + { + int x = (int) gateBottom.X; + int y = (int) gateBottom.Y; + int num1 = 60; + int num2 = 7; + if (NPC.waveNumber > 1) + num2 = 9; + if (NPC.waveNumber > 3) + num2 = 12; + if (NPC.waveNumber > 5) + num2 = 15; + int num3 = 7; + if (NPC.waveNumber > 4) + num3 = 10; + int num4 = 2; + if (NPC.waveNumber > 5) + num4 = 3; + int num5 = 12; + if (NPC.waveNumber > 3) + num5 = 18; + int num6 = 4; + if (NPC.waveNumber > 5) + num6 = 6; + int num7 = 4; + for (int index = 1; index < Main.CurrentFrameFlags.ActivePlayersCount; ++index) + { + num1 = (int) ((double) num1 * 1.3); + num2 = (int) ((double) num2 * 1.3); + num5 = (int) ((double) num1 * 1.3); + num6 = (int) ((double) num1 * 1.35); + num7 = (int) ((double) num7 * 1.3); + } + int number1 = 200; + int number2 = 200; + switch (NPC.waveNumber) + { + case 1: + if (Main.rand.Next(18) == 0 && NPC.CountNPCS(563) < num2) + { + number1 = NPC.NewNPC(x, y, 563); + break; + } + if (NPC.CountNPCS(554) < num1) + { + if (Main.rand.Next(7) == 0) + number1 = NPC.NewNPC(x, y, 557); + number2 = NPC.NewNPC(x, y, 554); + break; + } + break; + case 2: + if (Main.rand.Next(3) == 0 && NPC.CountNPCS(578) < num7) + { + number1 = NPC.NewNPC(x, y, 578); + break; + } + if (Main.rand.Next(7) == 0 && NPC.CountNPCS(563) < num2) + { + number1 = NPC.NewNPC(x, y, 563); + break; + } + if (Main.rand.Next(3) == 0 && NPC.CountNPCS(573) < num5) + { + number1 = NPC.NewNPC(x, y, 573); + break; + } + if (NPC.CountNPCS(554) < num1) + { + if (Main.rand.Next(4) == 0) + number1 = NPC.NewNPC(x, y, 557); + number2 = NPC.NewNPC(x, y, 554); + break; + } + break; + case 3: + if (Main.rand.Next(13) == 0 && NPC.CountNPCS(571) < num6) + { + number1 = NPC.NewNPC(x, y, 571); + break; + } + if (Main.rand.Next(7) == 0 && NPC.CountNPCS(573) < num5) + { + number1 = NPC.NewNPC(x, y, 573); + break; + } + if (Main.rand.Next(10) == 0 && NPC.CountNPCS(560) < num3) + { + number1 = NPC.NewNPC(x, y, 560); + break; + } + if (Main.rand.Next(8) == 0 && NPC.CountNPCS(563) < num2) + { + number1 = NPC.NewNPC(x, y, 563); + break; + } + if (NPC.CountNPCS(554) + NPC.CountNPCS(557) < num1) + { + number1 = NPC.NewNPC(x, y, 554); + break; + } + break; + case 4: + if (Main.rand.Next(24) == 0 && !NPC.AnyNPCs(565)) + { + number1 = NPC.NewNPC(x, y, 565); + break; + } + if (Main.rand.Next(12) == 0 && NPC.CountNPCS(571) < num6) + { + number1 = NPC.NewNPC(x, y, 571); + break; + } + if (Main.rand.Next(15) == 0 && NPC.CountNPCS(560) < num3) + { + number1 = NPC.NewNPC(x, y, 560); + break; + } + if (Main.rand.Next(7) == 0 && NPC.CountNPCS(563) < num2) + { + number1 = NPC.NewNPC(x, y, 563); + break; + } + if (Main.rand.Next(5) == 0 && NPC.CountNPCS(573) + NPC.CountNPCS(575) < num5) + { + number1 = Main.rand.Next(3) == 0 ? NPC.NewNPC(x, y, 575) : NPC.NewNPC(x, y, 573); + break; + } + if (NPC.CountNPCS(554) < num1) + { + number1 = NPC.NewNPC(x, y, 554); + break; + } + break; + case 5: + if (Main.rand.Next(20) == 0 && !NPC.AnyNPCs(577)) + { + number1 = NPC.NewNPC(x, y, 577); + break; + } + if (Main.rand.Next(17) == 0 && NPC.CountNPCS(569) < num4) + { + number1 = NPC.NewNPC(x, y, 569); + break; + } + if (Main.rand.Next(8) == 0 && NPC.CountNPCS(571) < num6) + { + number1 = NPC.NewNPC(x, y, 571); + break; + } + if (Main.rand.Next(7) == 0 && NPC.CountNPCS(573) + NPC.CountNPCS(575) < num5) + { + number1 = Main.rand.Next(4) == 0 ? NPC.NewNPC(x, y, 575) : NPC.NewNPC(x, y, 573); + break; + } + if (NPC.CountNPCS(554) + NPC.CountNPCS(557) < num1) + { + if (Main.rand.Next(3) == 0) + number1 = NPC.NewNPC(x, y, 557); + number2 = NPC.NewNPC(x, y, 554); + break; + } + break; + case 6: + if (Main.rand.Next(20) == 0 && !NPC.AnyNPCs(577)) + { + number1 = NPC.NewNPC(x, y, 577); + break; + } + if (Main.rand.Next(20) == 0 && !NPC.AnyNPCs(565)) + { + number1 = NPC.NewNPC(x, y, 565); + break; + } + if (Main.rand.Next(12) == 0 && NPC.CountNPCS(571) < num6) + { + number1 = NPC.NewNPC(x, y, 571); + break; + } + if (Main.rand.Next(25) == 0 && NPC.CountNPCS(569) < num4) + { + number1 = NPC.NewNPC(x, y, 569); + break; + } + if (Main.rand.Next(7) == 0 && NPC.CountNPCS(573) + NPC.CountNPCS(575) < num5) + { + number1 = Main.rand.Next(3) == 0 ? NPC.NewNPC(x, y, 575) : NPC.NewNPC(x, y, 573); + break; + } + if (Main.rand.Next(10) == 0 && NPC.CountNPCS(560) < num3) + { + number1 = NPC.NewNPC(x, y, 560); + break; + } + if (Main.rand.Next(5) == 0 && NPC.CountNPCS(563) < num2) + { + number1 = NPC.NewNPC(x, y, 563); + break; + } + if (NPC.CountNPCS(554) + NPC.CountNPCS(557) < num1) + { + if (Main.rand.Next(3) == 0) + number1 = NPC.NewNPC(x, y, 557); + number2 = NPC.NewNPC(x, y, 554); + break; + } + break; + case 7: + if (Main.rand.Next(20) == 0 && NPC.CountNPCS(571) < num6) + { + number1 = NPC.NewNPC(x, y, 571); + break; + } + if (Main.rand.Next(17) == 0 && NPC.CountNPCS(569) < num4) + { + number1 = NPC.NewNPC(x, y, 569); + break; + } + if (Main.rand.Next(10) == 0 && NPC.CountNPCS(563) < num2) + { + number1 = NPC.NewNPC(x, y, 563); + break; + } + if (NPC.CountNPCS(554) + NPC.CountNPCS(557) < num1) + { + if (Main.rand.Next(5) == 0) + number1 = NPC.NewNPC(x, y, 557); + number2 = NPC.NewNPC(x, y, 554); + break; + } + break; + default: + number1 = NPC.NewNPC(x, y, 554); + break; + } + if (Main.netMode == 2 && number1 < 200) + NetMessage.SendData(23, number: number1); + if (Main.netMode != 2 || number2 >= 200) + return; + NetMessage.SendData(23, number: number2); + } + } +} diff --git a/GameContent/Events/LanternNight.cs b/GameContent/Events/LanternNight.cs new file mode 100644 index 0000000..a83e1de --- /dev/null +++ b/GameContent/Events/LanternNight.cs @@ -0,0 +1,113 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Events.LanternNight +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.Graphics.Effects; + +namespace Terraria.GameContent.Events +{ + public class LanternNight + { + public static bool ManualLanterns; + public static bool GenuineLanterns; + public static bool NextNightIsLanternNight; + public static int LanternNightsOnCooldown; + private static bool _wasLanternNight; + + public static bool LanternsUp => LanternNight.GenuineLanterns || LanternNight.ManualLanterns; + + public static void CheckMorning() + { + bool flag = false; + if (LanternNight.GenuineLanterns) + { + flag = true; + LanternNight.GenuineLanterns = false; + } + if (LanternNight.ManualLanterns) + { + flag = true; + LanternNight.ManualLanterns = false; + } + int num = flag ? 1 : 0; + } + + public static void CheckNight() => LanternNight.NaturalAttempt(); + + public static bool LanternsCanPersist() => !Main.dayTime && LanternNight.LanternsCanStart(); + + public static bool LanternsCanStart() => !Main.bloodMoon && !Main.pumpkinMoon && !Main.snowMoon && Main.invasionType == 0 && NPC.MoonLordCountdown == 0 && !LanternNight.BossIsActive(); + + private static bool BossIsActive() + { + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && (npc.boss || npc.type >= 13 && npc.type <= 15)) + return true; + } + return false; + } + + private static void NaturalAttempt() + { + if (Main.netMode == 1 || !LanternNight.LanternsCanStart()) + return; + bool flag = false; + if (LanternNight.LanternNightsOnCooldown > 0) + --LanternNight.LanternNightsOnCooldown; + if (LanternNight.LanternNightsOnCooldown == 0 && NPC.downedMoonlord && Main.rand.Next(14) == 0) + flag = true; + if (!flag && LanternNight.NextNightIsLanternNight) + { + LanternNight.NextNightIsLanternNight = false; + flag = true; + } + if (!flag) + return; + LanternNight.GenuineLanterns = true; + LanternNight.LanternNightsOnCooldown = Main.rand.Next(5, 11); + } + + public static void ToggleManualLanterns() + { + int num1 = LanternNight.LanternsUp ? 1 : 0; + if (Main.netMode != 1) + LanternNight.ManualLanterns = !LanternNight.ManualLanterns; + int num2 = LanternNight.LanternsUp ? 1 : 0; + if (num1 == num2 || Main.netMode != 2) + return; + NetMessage.SendData(7); + } + + public static void WorldClear() + { + LanternNight.ManualLanterns = false; + LanternNight.GenuineLanterns = false; + LanternNight.LanternNightsOnCooldown = 0; + LanternNight._wasLanternNight = false; + } + + public static void UpdateTime() + { + if (LanternNight.GenuineLanterns && !LanternNight.LanternsCanPersist()) + LanternNight.GenuineLanterns = false; + if (LanternNight._wasLanternNight != LanternNight.LanternsUp) + { + if (Main.netMode != 2) + { + if (LanternNight.LanternsUp) + SkyManager.Instance.Activate("Lantern", new Vector2()); + else + SkyManager.Instance.Deactivate("Lantern"); + } + else + NetMessage.SendData(7); + } + LanternNight._wasLanternNight = LanternNight.LanternsUp; + } + } +} diff --git a/GameContent/Events/MoonlordDeathDrama.cs b/GameContent/Events/MoonlordDeathDrama.cs new file mode 100644 index 0000000..615a692 --- /dev/null +++ b/GameContent/Events/MoonlordDeathDrama.cs @@ -0,0 +1,220 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Events.MoonlordDeathDrama +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using System.Collections.Generic; +using Terraria.Utilities; + +namespace Terraria.GameContent.Events +{ + public class MoonlordDeathDrama + { + private static List _pieces = new List(); + private static List _explosions = new List(); + private static List _lightSources = new List(); + private static float whitening; + private static float requestedLight; + + public static void Update() + { + for (int index = 0; index < MoonlordDeathDrama._pieces.Count; ++index) + { + MoonlordDeathDrama.MoonlordPiece piece = MoonlordDeathDrama._pieces[index]; + piece.Update(); + if (piece.Dead) + { + MoonlordDeathDrama._pieces.Remove(piece); + --index; + } + } + for (int index = 0; index < MoonlordDeathDrama._explosions.Count; ++index) + { + MoonlordDeathDrama.MoonlordExplosion explosion = MoonlordDeathDrama._explosions[index]; + explosion.Update(); + if (explosion.Dead) + { + MoonlordDeathDrama._explosions.Remove(explosion); + --index; + } + } + bool flag = false; + for (int index = 0; index < MoonlordDeathDrama._lightSources.Count; ++index) + { + if ((double) Main.player[Main.myPlayer].Distance(MoonlordDeathDrama._lightSources[index]) < 2000.0) + { + flag = true; + break; + } + } + MoonlordDeathDrama._lightSources.Clear(); + if (!flag) + MoonlordDeathDrama.requestedLight = 0.0f; + if ((double) MoonlordDeathDrama.requestedLight != (double) MoonlordDeathDrama.whitening) + { + if ((double) Math.Abs(MoonlordDeathDrama.requestedLight - MoonlordDeathDrama.whitening) < 0.0199999995529652) + MoonlordDeathDrama.whitening = MoonlordDeathDrama.requestedLight; + else + MoonlordDeathDrama.whitening += (float) Math.Sign(MoonlordDeathDrama.requestedLight - MoonlordDeathDrama.whitening) * 0.02f; + } + MoonlordDeathDrama.requestedLight = 0.0f; + } + + public static void DrawPieces(SpriteBatch spriteBatch) + { + Rectangle playerScreen = Utils.CenteredRectangle(Main.screenPosition + new Vector2((float) Main.screenWidth, (float) Main.screenHeight) * 0.5f, new Vector2((float) (Main.screenWidth + 1000), (float) (Main.screenHeight + 1000))); + for (int index = 0; index < MoonlordDeathDrama._pieces.Count; ++index) + { + if (MoonlordDeathDrama._pieces[index].InDrawRange(playerScreen)) + MoonlordDeathDrama._pieces[index].Draw(spriteBatch); + } + } + + public static void DrawExplosions(SpriteBatch spriteBatch) + { + Rectangle playerScreen = Utils.CenteredRectangle(Main.screenPosition + new Vector2((float) Main.screenWidth, (float) Main.screenHeight) * 0.5f, new Vector2((float) (Main.screenWidth + 1000), (float) (Main.screenHeight + 1000))); + for (int index = 0; index < MoonlordDeathDrama._explosions.Count; ++index) + { + if (MoonlordDeathDrama._explosions[index].InDrawRange(playerScreen)) + MoonlordDeathDrama._explosions[index].Draw(spriteBatch); + } + } + + public static void DrawWhite(SpriteBatch spriteBatch) + { + if ((double) MoonlordDeathDrama.whitening == 0.0) + return; + Color color = Color.White * MoonlordDeathDrama.whitening; + spriteBatch.Draw(TextureAssets.MagicPixel.Value, new Rectangle(-2, -2, Main.screenWidth + 4, Main.screenHeight + 4), new Rectangle?(new Rectangle(0, 0, 1, 1)), color); + } + + public static void ThrowPieces(Vector2 MoonlordCoreCenter, int DramaSeed) + { + UnifiedRandom r = new UnifiedRandom(DramaSeed); + Vector2 vector2_1 = Vector2.UnitY.RotatedBy((double) r.NextFloat() * 1.57079637050629 - 0.785398185253143 + 3.14159274101257); + MoonlordDeathDrama._pieces.Add(new MoonlordDeathDrama.MoonlordPiece(Main.Assets.Request("Images/Misc/MoonExplosion/Spine", (AssetRequestMode) 1).Value, new Vector2(64f, 150f), MoonlordCoreCenter + new Vector2(0.0f, 50f), vector2_1 * 6f, 0.0f, (float) ((double) r.NextFloat() * 0.100000001490116 - 0.0500000007450581))); + Vector2 vector2_2 = Vector2.UnitY.RotatedBy((double) r.NextFloat() * 1.57079637050629 - 0.785398185253143 + 3.14159274101257); + MoonlordDeathDrama._pieces.Add(new MoonlordDeathDrama.MoonlordPiece(Main.Assets.Request("Images/Misc/MoonExplosion/Shoulder", (AssetRequestMode) 1).Value, new Vector2(40f, 120f), MoonlordCoreCenter + new Vector2(50f, -120f), vector2_2 * 10f, 0.0f, (float) ((double) r.NextFloat() * 0.100000001490116 - 0.0500000007450581))); + Vector2 vector2_3 = Vector2.UnitY.RotatedBy((double) r.NextFloat() * 1.57079637050629 - 0.785398185253143 + 3.14159274101257); + MoonlordDeathDrama._pieces.Add(new MoonlordDeathDrama.MoonlordPiece(Main.Assets.Request("Images/Misc/MoonExplosion/Torso", (AssetRequestMode) 1).Value, new Vector2(192f, 252f), MoonlordCoreCenter, vector2_3 * 8f, 0.0f, (float) ((double) r.NextFloat() * 0.100000001490116 - 0.0500000007450581))); + Vector2 vector2_4 = Vector2.UnitY.RotatedBy((double) r.NextFloat() * 1.57079637050629 - 0.785398185253143 + 3.14159274101257); + MoonlordDeathDrama._pieces.Add(new MoonlordDeathDrama.MoonlordPiece(Main.Assets.Request("Images/Misc/MoonExplosion/Head", (AssetRequestMode) 1).Value, new Vector2(138f, 185f), MoonlordCoreCenter - new Vector2(0.0f, 200f), vector2_4 * 12f, 0.0f, (float) ((double) r.NextFloat() * 0.100000001490116 - 0.0500000007450581))); + } + + public static void AddExplosion(Vector2 spot) => MoonlordDeathDrama._explosions.Add(new MoonlordDeathDrama.MoonlordExplosion(Main.Assets.Request("Images/Misc/MoonExplosion/Explosion", (AssetRequestMode) 1).Value, spot, Main.rand.Next(2, 4))); + + public static void RequestLight(float light, Vector2 spot) + { + MoonlordDeathDrama._lightSources.Add(spot); + if ((double) light > 1.0) + light = 1f; + if ((double) MoonlordDeathDrama.requestedLight >= (double) light) + return; + MoonlordDeathDrama.requestedLight = light; + } + + public class MoonlordPiece + { + private Texture2D _texture; + private Vector2 _position; + private Vector2 _velocity; + private Vector2 _origin; + private float _rotation; + private float _rotationVelocity; + + public MoonlordPiece( + Texture2D pieceTexture, + Vector2 textureOrigin, + Vector2 centerPos, + Vector2 velocity, + float rot, + float angularVelocity) + { + this._texture = pieceTexture; + this._origin = textureOrigin; + this._position = centerPos; + this._velocity = velocity; + this._rotation = rot; + this._rotationVelocity = angularVelocity; + } + + public void Update() + { + this._velocity.Y += 0.3f; + this._rotation += this._rotationVelocity; + this._rotationVelocity *= 0.99f; + this._position += this._velocity; + } + + public void Draw(SpriteBatch sp) + { + Color light = this.GetLight(); + sp.Draw(this._texture, this._position - Main.screenPosition, new Rectangle?(), light, this._rotation, this._origin, 1f, SpriteEffects.None, 0.0f); + } + + public bool Dead => (double) this._position.Y > (double) (Main.maxTilesY * 16) - 480.0 || (double) this._position.X < 480.0 || (double) this._position.X >= (double) (Main.maxTilesX * 16) - 480.0; + + public bool InDrawRange(Rectangle playerScreen) => playerScreen.Contains(this._position.ToPoint()); + + public Color GetLight() + { + Vector3 zero = Vector3.Zero; + float num1 = 0.0f; + int num2 = 5; + Point tileCoordinates = this._position.ToTileCoordinates(); + for (int x = tileCoordinates.X - num2; x <= tileCoordinates.X + num2; ++x) + { + for (int y = tileCoordinates.Y - num2; y <= tileCoordinates.Y + num2; ++y) + { + zero += Lighting.GetColor(x, y).ToVector3(); + ++num1; + } + } + return (double) num1 == 0.0 ? Color.White : new Color(zero / num1); + } + } + + public class MoonlordExplosion + { + private Texture2D _texture; + private Vector2 _position; + private Vector2 _origin; + private Rectangle _frame; + private int _frameCounter; + private int _frameSpeed; + + public MoonlordExplosion(Texture2D pieceTexture, Vector2 centerPos, int frameSpeed) + { + this._texture = pieceTexture; + this._position = centerPos; + this._frameSpeed = frameSpeed; + this._frameCounter = 0; + this._frame = this._texture.Frame(verticalFrames: 7); + this._origin = this._frame.Size() / 2f; + } + + public void Update() + { + ++this._frameCounter; + this._frame = this._texture.Frame(verticalFrames: 7, frameY: (this._frameCounter / this._frameSpeed)); + } + + public void Draw(SpriteBatch sp) + { + Color light = this.GetLight(); + sp.Draw(this._texture, this._position - Main.screenPosition, new Rectangle?(this._frame), light, 0.0f, this._origin, 1f, SpriteEffects.None, 0.0f); + } + + public bool Dead => (double) this._position.Y > (double) (Main.maxTilesY * 16) - 480.0 || (double) this._position.X < 480.0 || (double) this._position.X >= (double) (Main.maxTilesX * 16) - 480.0 || this._frameCounter >= this._frameSpeed * 7; + + public bool InDrawRange(Rectangle playerScreen) => playerScreen.Contains(this._position.ToPoint()); + + public Color GetLight() => new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue); + } + } +} diff --git a/GameContent/Events/MysticLogFairiesEvent.cs b/GameContent/Events/MysticLogFairiesEvent.cs new file mode 100644 index 0000000..867c5ce --- /dev/null +++ b/GameContent/Events/MysticLogFairiesEvent.cs @@ -0,0 +1,150 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Events.MysticLogFairiesEvent +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.Enums; + +namespace Terraria.GameContent.Events +{ + public class MysticLogFairiesEvent + { + private bool _canSpawnFairies; + private int _delayUntilNextAttempt; + private const int DELAY_BETWEEN_ATTEMPTS = 60; + private List _stumpCoords = new List(); + + public void WorldClear() + { + this._canSpawnFairies = false; + this._delayUntilNextAttempt = 0; + this._stumpCoords.Clear(); + } + + public void StartWorld() + { + if (Main.netMode == 1) + return; + this.ScanWholeOverworldForLogs(); + } + + public void StartNight() + { + if (Main.netMode == 1) + return; + this._canSpawnFairies = true; + this._delayUntilNextAttempt = 0; + this.ScanWholeOverworldForLogs(); + } + + public void UpdateTime() + { + if (Main.netMode == 1 || !this._canSpawnFairies || !this.IsAGoodTime()) + return; + this._delayUntilNextAttempt = Math.Max(0, this._delayUntilNextAttempt - Main.dayRate); + if (this._delayUntilNextAttempt != 0) + return; + this._delayUntilNextAttempt = 60; + this.TrySpawningFairies(); + } + + private bool IsAGoodTime() => !Main.dayTime && Main.time >= 6480.00009655952 && Main.time <= 25920.0003862381; + + private void TrySpawningFairies() + { + if ((double) Main.maxRaining > 0.0 || Main.bloodMoon || NPC.MoonLordCountdown > 0 || Main.snowMoon || Main.pumpkinMoon || Main.invasionType > 0 || this._stumpCoords.Count == 0) + return; + int oneOverSpawnChance = this.GetOneOverSpawnChance(); + bool flag = false; + for (int index = 0; index < Main.dayRate; ++index) + { + if (Main.rand.Next(oneOverSpawnChance) == 0) + { + flag = true; + break; + } + } + if (!flag) + return; + Point stumpCoord = this._stumpCoords[Main.rand.Next(this._stumpCoords.Count)]; + Vector2 worldCoordinates = stumpCoord.ToWorldCoordinates(24f); + worldCoordinates.Y -= 50f; + if (WorldGen.PlayerLOS(stumpCoord.X, stumpCoord.Y)) + return; + int num1 = Main.rand.Next(1, 4); + if (Main.rand.Next(7) == 0) + ++num1; + int num2 = (int) Utils.SelectRandom(Main.rand, (short) 585, (short) 584, (short) 583); + for (int index = 0; index < num1; ++index) + { + int Type = (int) Utils.SelectRandom(Main.rand, (short) 585, (short) 584, (short) 583); + int number = NPC.NewNPC((int) worldCoordinates.X, (int) worldCoordinates.Y, Type); + if (Main.netMode == 2 && number < 200) + NetMessage.SendData(23, number: number); + } + this._canSpawnFairies = false; + } + + public void FallenLogDestroyed() + { + if (Main.netMode == 1) + return; + this.ScanWholeOverworldForLogs(); + } + + private void ScanWholeOverworldForLogs() + { + this._stumpCoords.Clear(); + NPC.fairyLog = false; + int num1 = (int) Main.worldSurface - 10; + int num2 = 100; + int num3 = Main.maxTilesX - 100; + int num4 = 3; + int num5 = 2; + List pointList = new List(); + for (int x = 100; x < num3; x += num4) + { + for (int y = num1; y >= num2; y -= num5) + { + Tile tile = Main.tile[x, y]; + if (tile.active() && tile.type == (ushort) 488 && tile.liquid == (byte) 0) + { + pointList.Add(new Point(x, y)); + NPC.fairyLog = true; + } + } + } + foreach (Point stumpRandomPoint in pointList) + this._stumpCoords.Add(this.GetStumpTopLeft(stumpRandomPoint)); + } + + private Point GetStumpTopLeft(Point stumpRandomPoint) + { + Tile tile = Main.tile[stumpRandomPoint.X, stumpRandomPoint.Y]; + Point point = stumpRandomPoint; + point.X -= (int) tile.frameX / 18; + point.Y -= (int) tile.frameY / 18; + return point; + } + + private int GetOneOverSpawnChance() + { + int num; + switch (Main.GetMoonPhase()) + { + case MoonPhase.Full: + case MoonPhase.Empty: + num = 3600; + break; + default: + num = 10800; + break; + } + return num / 60; + } + } +} diff --git a/GameContent/Events/Sandstorm.cs b/GameContent/Events/Sandstorm.cs new file mode 100644 index 0000000..809417f --- /dev/null +++ b/GameContent/Events/Sandstorm.cs @@ -0,0 +1,208 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Events.Sandstorm +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using Terraria.Graphics.Effects; +using Terraria.Utilities; + +namespace Terraria.GameContent.Events +{ + public class Sandstorm + { + private const int SANDSTORM_DURATION_MINIMUM = 28800; + private const int SANDSTORM_DURATION_MAXIMUM = 86400; + public static bool Happening; + public static int TimeLeft; + public static float Severity; + public static float IntendedSeverity; + private static bool _effectsUp; + + private static bool HasSufficientWind() => (double) Math.Abs(Main.windSpeedCurrent) >= 0.600000023841858; + + public static void WorldClear() => Sandstorm.Happening = false; + + public static void UpdateTime() + { + if (Main.netMode != 1) + { + if (Sandstorm.Happening) + { + if (Sandstorm.TimeLeft > 86400) + Sandstorm.TimeLeft = 0; + Sandstorm.TimeLeft -= Main.dayRate; + if (!Sandstorm.HasSufficientWind()) + Sandstorm.TimeLeft -= 15 * Main.dayRate; + if ((double) Main.windSpeedCurrent == 0.0) + Sandstorm.TimeLeft = 0; + if (Sandstorm.TimeLeft <= 0) + Sandstorm.StopSandstorm(); + } + else if (Sandstorm.HasSufficientWind()) + { + for (int index = 0; index < Main.dayRate; ++index) + { + if (Main.rand.Next(86400) == 0) + Sandstorm.StartSandstorm(); + } + } + if (Main.rand.Next(18000) == 0) + Sandstorm.ChangeSeverityIntentions(); + } + Sandstorm.UpdateSeverity(); + } + + private static void ChangeSeverityIntentions() + { + Sandstorm.IntendedSeverity = !Sandstorm.Happening ? (Main.rand.Next(3) != 0 ? Main.rand.NextFloat() * 0.3f : 0.0f) : 0.4f + Main.rand.NextFloat(); + if (Main.netMode == 1) + return; + NetMessage.SendData(7); + } + + private static void UpdateSeverity() + { + if (float.IsNaN(Sandstorm.Severity)) + Sandstorm.Severity = 0.0f; + if (float.IsNaN(Sandstorm.IntendedSeverity)) + Sandstorm.IntendedSeverity = 0.0f; + int num1 = Math.Sign(Sandstorm.IntendedSeverity - Sandstorm.Severity); + Sandstorm.Severity = MathHelper.Clamp(Sandstorm.Severity + 3f / 1000f * (float) num1, 0.0f, 1f); + int num2 = Math.Sign(Sandstorm.IntendedSeverity - Sandstorm.Severity); + if (num1 == num2) + return; + Sandstorm.Severity = Sandstorm.IntendedSeverity; + } + + private static void StartSandstorm() + { + Sandstorm.Happening = true; + Sandstorm.TimeLeft = Main.rand.Next(28800, 86401); + Sandstorm.ChangeSeverityIntentions(); + } + + private static void StopSandstorm() + { + Sandstorm.Happening = false; + Sandstorm.TimeLeft = 0; + Sandstorm.ChangeSeverityIntentions(); + } + + public static void HandleEffectAndSky(bool toState) + { + if (toState == Sandstorm._effectsUp) + return; + Sandstorm._effectsUp = toState; + Vector2 center = Main.player[Main.myPlayer].Center; + if (Sandstorm._effectsUp) + { + SkyManager.Instance.Activate(nameof (Sandstorm), center); + Filters.Scene.Activate(nameof (Sandstorm), center); + Overlays.Scene.Activate(nameof (Sandstorm), center); + } + else + { + SkyManager.Instance.Deactivate(nameof (Sandstorm)); + Filters.Scene.Deactivate(nameof (Sandstorm)); + Overlays.Scene.Deactivate(nameof (Sandstorm)); + } + } + + public static bool ShouldSandstormDustPersist() => Sandstorm.Happening && Main.player[Main.myPlayer].ZoneSandstorm && (Main.bgStyle == 2 || Main.bgStyle == 5) && Main.bgDelay < 50; + + public static void EmitDust() + { + if (Main.gamePaused) + return; + int sandTileCount = Main.SceneMetrics.SandTileCount; + Player player = Main.player[Main.myPlayer]; + bool flag = Sandstorm.ShouldSandstormDustPersist(); + Sandstorm.HandleEffectAndSky(flag && Main.UseStormEffects); + if (sandTileCount < 100 || (double) player.position.Y > Main.worldSurface * 16.0 || player.ZoneBeach) + return; + int maxValue1 = 1; + if (!flag || Main.rand.Next(maxValue1) != 0) + return; + int num1 = Math.Sign(Main.windSpeedCurrent); + float amount = Math.Abs(Main.windSpeedCurrent); + if ((double) amount < 0.00999999977648258) + return; + float num2 = (float) num1 * MathHelper.Lerp(0.9f, 1f, amount); + float num3 = 2000f / (float) sandTileCount; + float num4 = MathHelper.Clamp(3f / num3, 0.77f, 1f); + int num5 = (int) num3; + int num6 = (int) (1000.0 * (double) ((float) Main.screenWidth / (float) Main.maxScreenW)); + float num7 = 20f * Sandstorm.Severity; + float num8 = (float) ((double) num6 * ((double) Main.gfxQuality * 0.5 + 0.5) + (double) num6 * 0.100000001490116) - (float) Dust.SandStormCount; + if ((double) num8 <= 0.0) + return; + float num9 = (float) Main.screenWidth + 1000f; + float screenHeight = (float) Main.screenHeight; + Vector2 vector2 = Main.screenPosition + player.velocity; + WeightedRandom weightedRandom = new WeightedRandom(); + weightedRandom.Add(new Color(200, 160, 20, 180), (double) (Main.SceneMetrics.GetTileCount((ushort) 53) + Main.SceneMetrics.GetTileCount((ushort) 396) + Main.SceneMetrics.GetTileCount((ushort) 397))); + weightedRandom.Add(new Color(103, 98, 122, 180), (double) (Main.SceneMetrics.GetTileCount((ushort) 112) + Main.SceneMetrics.GetTileCount((ushort) 400) + Main.SceneMetrics.GetTileCount((ushort) 398))); + weightedRandom.Add(new Color(135, 43, 34, 180), (double) (Main.SceneMetrics.GetTileCount((ushort) 234) + Main.SceneMetrics.GetTileCount((ushort) 401) + Main.SceneMetrics.GetTileCount((ushort) 399))); + weightedRandom.Add(new Color(213, 196, 197, 180), (double) (Main.SceneMetrics.GetTileCount((ushort) 116) + Main.SceneMetrics.GetTileCount((ushort) 403) + Main.SceneMetrics.GetTileCount((ushort) 402))); + float num10 = MathHelper.Lerp(0.2f, 0.35f, Sandstorm.Severity); + float num11 = MathHelper.Lerp(0.5f, 0.7f, Sandstorm.Severity); + int maxValue2 = (int) MathHelper.Lerp(1f, 10f, (float) (((double) num4 - 0.769999980926514) / 0.230000019073486)); + for (int index1 = 0; (double) index1 < (double) num7; ++index1) + { + if (Main.rand.Next(num5 / 4) == 0) + { + Vector2 Position = new Vector2((float) ((double) Main.rand.NextFloat() * (double) num9 - 500.0), Main.rand.NextFloat() * -50f); + if (Main.rand.Next(3) == 0 && num1 == 1) + Position.X = (float) (Main.rand.Next(500) - 500); + else if (Main.rand.Next(3) == 0 && num1 == -1) + Position.X = (float) (Main.rand.Next(500) + Main.screenWidth); + if ((double) Position.X < 0.0 || (double) Position.X > (double) Main.screenWidth) + Position.Y += (float) ((double) Main.rand.NextFloat() * (double) screenHeight * 0.899999976158142); + Position += vector2; + int x1 = (int) Position.X / 16; + int y1 = (int) Position.Y / 16; + if (WorldGen.InWorld(x1, y1, 10) && Main.tile[x1, y1] != null && Main.tile[x1, y1].wall == (ushort) 0) + { + for (int index2 = 0; index2 < 1; ++index2) + { + Dust dust = Main.dust[Dust.NewDust(Position, 10, 10, 268)]; + dust.velocity.Y = (float) (2.0 + (double) Main.rand.NextFloat() * 0.200000002980232); + dust.velocity.Y *= dust.scale; + dust.velocity.Y *= 0.35f; + dust.velocity.X = (float) ((double) num2 * 5.0 + (double) Main.rand.NextFloat() * 1.0); + dust.velocity.X += (float) ((double) num2 * (double) num11 * 20.0); + dust.fadeIn += num11 * 0.2f; + dust.velocity *= (float) (1.0 + (double) num10 * 0.5); + dust.color = (Color) weightedRandom; + dust.velocity *= 1f + num10; + dust.velocity *= num4; + dust.scale = 0.9f; + --num8; + if ((double) num8 > 0.0) + { + if (Main.rand.Next(maxValue2) != 0) + { + --index2; + Position += Utils.RandomVector2(Main.rand, -10f, 10f) + dust.velocity * -1.1f; + int x2 = (int) Position.X / 16; + int y2 = (int) Position.Y / 16; + if (WorldGen.InWorld(x2, y2, 10) && Main.tile[x2, y2] != null) + { + int wall = (int) Main.tile[x2, y2].wall; + } + } + } + else + break; + } + if ((double) num8 <= 0.0) + break; + } + } + } + } + } +} diff --git a/GameContent/Events/ScreenDarkness.cs b/GameContent/Events/ScreenDarkness.cs new file mode 100644 index 0000000..3d0dde7 --- /dev/null +++ b/GameContent/Events/ScreenDarkness.cs @@ -0,0 +1,48 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Events.ScreenDarkness +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.GameContent.Events +{ + public class ScreenDarkness + { + public static float screenObstruction; + + public static void Update() + { + float num = 0.0f; + float amount = 0.1f; + Vector2 mountedCenter = Main.player[Main.myPlayer].MountedCenter; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 370 && (double) Main.npc[index].Distance(mountedCenter) < 3000.0 && ((double) Main.npc[index].ai[0] >= 10.0 || (double) Main.npc[index].ai[0] == 9.0 && (double) Main.npc[index].ai[2] > 120.0)) + { + num = 0.95f; + amount = 0.03f; + } + } + ScreenDarkness.screenObstruction = MathHelper.Lerp(ScreenDarkness.screenObstruction, num, amount); + } + + public static void DrawBack(SpriteBatch spriteBatch) + { + if ((double) ScreenDarkness.screenObstruction == 0.0) + return; + Color color = Color.Black * ScreenDarkness.screenObstruction; + spriteBatch.Draw(TextureAssets.MagicPixel.Value, new Rectangle(-2, -2, Main.screenWidth + 4, Main.screenHeight + 4), new Rectangle?(new Rectangle(0, 0, 1, 1)), color); + } + + public static void DrawFront(SpriteBatch spriteBatch) + { + if ((double) ScreenDarkness.screenObstruction == 0.0) + return; + Color color = new Color(0, 0, 120) * ScreenDarkness.screenObstruction * 0.3f; + spriteBatch.Draw(TextureAssets.MagicPixel.Value, new Rectangle(-2, -2, Main.screenWidth + 4, Main.screenHeight + 4), new Rectangle?(new Rectangle(0, 0, 1, 1)), color); + } + } +} diff --git a/GameContent/Events/ScreenObstruction.cs b/GameContent/Events/ScreenObstruction.cs new file mode 100644 index 0000000..95dadab --- /dev/null +++ b/GameContent/Events/ScreenObstruction.cs @@ -0,0 +1,49 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Events.ScreenObstruction +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.GameContent.Events +{ + public class ScreenObstruction + { + public static float screenObstruction; + + public static void Update() + { + float num = 0.0f; + float amount = 0.1f; + if (Main.player[Main.myPlayer].headcovered) + { + num = 0.95f; + amount = 0.3f; + } + ScreenObstruction.screenObstruction = MathHelper.Lerp(ScreenObstruction.screenObstruction, num, amount); + } + + public static void Draw(SpriteBatch spriteBatch) + { + if ((double) ScreenObstruction.screenObstruction == 0.0) + return; + Color color = Color.Black * ScreenObstruction.screenObstruction; + int num1 = TextureAssets.Extra[49].Width(); + int num2 = 10; + Rectangle rect = Main.player[Main.myPlayer].getRect(); + rect.Inflate((num1 - rect.Width) / 2, (num1 - rect.Height) / 2 + num2 / 2); + rect.Offset(-(int) Main.screenPosition.X, -(int) Main.screenPosition.Y + (int) Main.player[Main.myPlayer].gfxOffY - num2); + Rectangle destinationRectangle1 = Rectangle.Union(new Rectangle(0, 0, 1, 1), new Rectangle(rect.Right - 1, rect.Top - 1, 1, 1)); + Rectangle destinationRectangle2 = Rectangle.Union(new Rectangle(Main.screenWidth - 1, 0, 1, 1), new Rectangle(rect.Right, rect.Bottom - 1, 1, 1)); + Rectangle destinationRectangle3 = Rectangle.Union(new Rectangle(Main.screenWidth - 1, Main.screenHeight - 1, 1, 1), new Rectangle(rect.Left, rect.Bottom, 1, 1)); + Rectangle destinationRectangle4 = Rectangle.Union(new Rectangle(0, Main.screenHeight - 1, 1, 1), new Rectangle(rect.Left - 1, rect.Top, 1, 1)); + spriteBatch.Draw(TextureAssets.MagicPixel.Value, destinationRectangle1, new Rectangle?(new Rectangle(0, 0, 1, 1)), color); + spriteBatch.Draw(TextureAssets.MagicPixel.Value, destinationRectangle2, new Rectangle?(new Rectangle(0, 0, 1, 1)), color); + spriteBatch.Draw(TextureAssets.MagicPixel.Value, destinationRectangle3, new Rectangle?(new Rectangle(0, 0, 1, 1)), color); + spriteBatch.Draw(TextureAssets.MagicPixel.Value, destinationRectangle4, new Rectangle?(new Rectangle(0, 0, 1, 1)), color); + spriteBatch.Draw(TextureAssets.Extra[49].Value, rect, color); + } + } +} diff --git a/GameContent/FixExploitManEaters.cs b/GameContent/FixExploitManEaters.cs new file mode 100644 index 0000000..f2bc2fc --- /dev/null +++ b/GameContent/FixExploitManEaters.cs @@ -0,0 +1,31 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.FixExploitManEaters +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent +{ + public static class FixExploitManEaters + { + private static readonly List IndexesProtected = new List(); + + public static void Update() => FixExploitManEaters.IndexesProtected.Clear(); + + public static void ProtectSpot(int x, int y) + { + int num = (x & (int) ushort.MaxValue) << 16 | y & (int) ushort.MaxValue; + if (FixExploitManEaters.IndexesProtected.Contains(num)) + return; + FixExploitManEaters.IndexesProtected.Add(num); + } + + public static bool SpotProtected(int x, int y) + { + int num = (x & (int) ushort.MaxValue) << 16 | y & (int) ushort.MaxValue; + return FixExploitManEaters.IndexesProtected.Contains(num); + } + } +} diff --git a/GameContent/FontAssets.cs b/GameContent/FontAssets.cs new file mode 100644 index 0000000..764acef --- /dev/null +++ b/GameContent/FontAssets.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.FontAssets +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using ReLogic.Content; +using ReLogic.Graphics; + +namespace Terraria.GameContent +{ + public static class FontAssets + { + public static Asset ItemStack; + public static Asset MouseText; + public static Asset DeathText; + public static Asset[] CombatText = new Asset[2]; + } +} diff --git a/GameContent/GameNotificationType.cs b/GameContent/GameNotificationType.cs new file mode 100644 index 0000000..5dfb9f4 --- /dev/null +++ b/GameContent/GameNotificationType.cs @@ -0,0 +1,20 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.GameNotificationType +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Terraria.GameContent +{ + [Flags] + public enum GameNotificationType + { + None = 0, + Damage = 1, + SpawnOrDeath = 2, + WorldGen = 4, + All = WorldGen | SpawnOrDeath | Damage, // 0x00000007 + } +} diff --git a/GameContent/Generation/ActionGrass.cs b/GameContent/Generation/ActionGrass.cs new file mode 100644 index 0000000..cf3e3d1 --- /dev/null +++ b/GameContent/Generation/ActionGrass.cs @@ -0,0 +1,22 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.ActionGrass +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Generation +{ + public class ActionGrass : GenAction + { + public override bool Apply(Point origin, int x, int y, params object[] args) + { + if (GenBase._tiles[x, y].active() || GenBase._tiles[x, y - 1].active()) + return false; + WorldGen.PlaceTile(x, y, (int) Utils.SelectRandom(GenBase._random, (ushort) 3, (ushort) 73), true); + return this.UnitApply(origin, x, y, args); + } + } +} diff --git a/GameContent/Generation/ActionPlaceStatue.cs b/GameContent/Generation/ActionPlaceStatue.cs new file mode 100644 index 0000000..1d74712 --- /dev/null +++ b/GameContent/Generation/ActionPlaceStatue.cs @@ -0,0 +1,26 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.ActionPlaceStatue +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.DataStructures; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Generation +{ + public class ActionPlaceStatue : GenAction + { + private int _statueIndex; + + public ActionPlaceStatue(int index = -1) => this._statueIndex = index; + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + Point16 point16 = this._statueIndex != -1 ? WorldGen.statueList[this._statueIndex] : WorldGen.statueList[GenBase._random.Next(2, WorldGen.statueList.Length)]; + WorldGen.PlaceTile(x, y, (int) point16.X, true, style: ((int) point16.Y)); + return this.UnitApply(origin, x, y, args); + } + } +} diff --git a/GameContent/Generation/ActionStalagtite.cs b/GameContent/Generation/ActionStalagtite.cs new file mode 100644 index 0000000..4230769 --- /dev/null +++ b/GameContent/Generation/ActionStalagtite.cs @@ -0,0 +1,20 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.ActionStalagtite +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Generation +{ + public class ActionStalagtite : GenAction + { + public override bool Apply(Point origin, int x, int y, params object[] args) + { + WorldGen.PlaceTight(x, y); + return this.UnitApply(origin, x, y, args); + } + } +} diff --git a/GameContent/Generation/ActionVines.cs b/GameContent/Generation/ActionVines.cs new file mode 100644 index 0000000..0bf87d5 --- /dev/null +++ b/GameContent/Generation/ActionVines.cs @@ -0,0 +1,37 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.ActionVines +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Generation +{ + public class ActionVines : GenAction + { + private int _minLength; + private int _maxLength; + private int _vineId; + + public ActionVines(int minLength = 6, int maxLength = 10, int vineId = 52) + { + this._minLength = minLength; + this._maxLength = maxLength; + this._vineId = vineId; + } + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + int num1 = GenBase._random.Next(this._minLength, this._maxLength + 1); + int num2; + for (num2 = 0; num2 < num1 && !GenBase._tiles[x, y + num2].active(); ++num2) + { + GenBase._tiles[x, y + num2].type = (ushort) this._vineId; + GenBase._tiles[x, y + num2].active(true); + } + return num2 > 0 && this.UnitApply(origin, x, y, args); + } + } +} diff --git a/GameContent/Generation/PassLegacy.cs b/GameContent/Generation/PassLegacy.cs new file mode 100644 index 0000000..a5446af --- /dev/null +++ b/GameContent/Generation/PassLegacy.cs @@ -0,0 +1,825 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.PassLegacy +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using Terraria.IO; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Generation +{ + public class PassLegacy : GenPass + { + private static readonly Dictionary _weightMap_135 = new Dictionary() + { + { + "Reset", + 2.2056f + }, + { + "Terrain", + 449.3722f + }, + { + "Tunnels", + 5.379f + }, + { + "Dunes", + 779.3144f + }, + { + "Mount Caves", + 36.1749f + }, + { + "Dirt Wall Backgrounds", + 238.8786f + }, + { + "Rocks In Dirt", + 1539.898f + }, + { + "Dirt In Rocks", + 1640.048f + }, + { + "Clay", + 302.2475f + }, + { + "Small Holes", + 3047.099f + }, + { + "Dirt Layer Caves", + 250.0248f + }, + { + "Rock Layer Caves", + 2635.903f + }, + { + "Surface Caves", + 41.3442f + }, + { + "Slush Check", + 62.3121f + }, + { + "Grass", + 27.8485f + }, + { + "Jungle", + 10154.65f + }, + { + "Marble", + 3140.926f + }, + { + "Granite", + 6769.554f + }, + { + "Mud Caves To Grass", + 29042.46f + }, + { + "Full Desert", + 7802.509f + }, + { + "Floating Islands", + 1504.831f + }, + { + "Mushroom Patches", + 1001.21f + }, + { + "Mud To Dirt", + 355.9895f + }, + { + "Silt", + 198.4567f + }, + { + "Shinies", + 253.9256f + }, + { + "Webs", + 53.7234f + }, + { + "Underworld", + 9213.443f + }, + { + "Lakes", + 14.6001f + }, + { + "Corruption", + 1367.068f + }, + { + "Dungeon", + 386.8962f + }, + { + "Slush", + 56.7959f + }, + { + "Mountain Caves", + 14.2958f + }, + { + "Beaches", + 7.6043f + }, + { + "Gems", + 1016.745f + }, + { + "Gravitating Sand", + 875.1385f + }, + { + "Clean Up Dirt", + 632.9365f + }, + { + "Pyramids", + 0.3045f + }, + { + "Dirt Rock Wall Runner", + 24.1628f + }, + { + "Living Trees", + 5.6897f + }, + { + "Wood Tree Walls", + 72.6673f + }, + { + "Altars", + 24.975f + }, + { + "Wet Jungle", + 18.2339f + }, + { + "Remove Water From Sand", + 14.3244f + }, + { + "Jungle Temple", + 838.0293f + }, + { + "Hives", + 7194.68f + }, + { + "Jungle Chests", + 2.3522f + }, + { + "Smooth World", + 6418.349f + }, + { + "Settle Liquids", + 13069.07f + }, + { + "Waterfalls", + 4614.806f + }, + { + "Ice", + 236.3986f + }, + { + "Wall Variety", + 5988.028f + }, + { + "Traps", + 113.9219f + }, + { + "Life Crystals", + 3.4912f + }, + { + "Statues", + 72.0258f + }, + { + "Buried Chests", + 2371.881f + }, + { + "Surface Chests", + 22.1015f + }, + { + "Jungle Chests Placement", + 11.6857f + }, + { + "Water Chests", + 18.6092f + }, + { + "Spider Caves", + 8218.94f + }, + { + "Gem Caves", + 96.4863f + }, + { + "Moss", + 4440.283f + }, + { + "Temple", + 12.6321f + }, + { + "Ice Walls", + 8744.889f + }, + { + "Jungle Trees", + 933.2522f + }, + { + "Floating Island Houses", + 2.8349f + }, + { + "Quick Cleanup", + 1339.91f + }, + { + "Pots", + 1363.35f + }, + { + "Spreading Grass", + 80.3414f + }, + { + "Piles", + 274.4605f + }, + { + "Cactus", + 30.4524f + }, + { + "Spawn Point", + 0.3068f + }, + { + "Grass Wall", + 512.8323f + }, + { + "Guide", + 3.1494f + }, + { + "Sunflowers", + 4.7643f + }, + { + "Planting Trees", + 356.2866f + }, + { + "Herbs", + 123.8192f + }, + { + "Dye Plants", + 437.3852f + }, + { + "Webs And Honey", + 770.3133f + }, + { + "Weeds", + 224.6974f + }, + { + "Mud Caves To Grass 2", + 737.635f + }, + { + "Jungle Plants", + 1037.098f + }, + { + "Vines", + 897.331f + }, + { + "Flowers", + 1.3216f + }, + { + "Mushrooms", + 0.7789f + }, + { + "Stalac", + 1079.509f + }, + { + "Gems In Ice Biome", + 14.8002f + }, + { + "Random Gems", + 15.3893f + }, + { + "Moss Grass", + 770.8217f + }, + { + "Muds Walls In Jungle", + 73.5705f + }, + { + "Larva", + 0.5222f + }, + { + "Settle Liquids Again", + 7461.561f + }, + { + "Tile Cleanup", + 1813.04f + }, + { + "Lihzahrd Altars", + 0.2171f + }, + { + "Micro Biomes", + 24240.07f + }, + { + "Final Cleanup", + 1768.462f + } + }; + private static readonly Dictionary _weightMap = new Dictionary() + { + { + "Reset", + 0.9667f + }, + { + "Terrain", + 507.352f + }, + { + "Dunes", + 239.7913f + }, + { + "Ocean Sand", + 10.4129f + }, + { + "Sand Patches", + 452.6755f + }, + { + "Tunnels", + 4.3622f + }, + { + "Mount Caves", + 49.9993f + }, + { + "Dirt Wall Backgrounds", + 328.7817f + }, + { + "Rocks In Dirt", + 1537.466f + }, + { + "Dirt In Rocks", + 1515.23f + }, + { + "Clay", + 314.8327f + }, + { + "Small Holes", + 2955.926f + }, + { + "Dirt Layer Caves", + 238.2545f + }, + { + "Rock Layer Caves", + 2708.396f + }, + { + "Surface Caves", + 42.3857f + }, + { + "Generate Ice Biome", + 100.005f + }, + { + "Grass", + 29.7885f + }, + { + "Jungle", + 11205.83f + }, + { + "Marble", + 5358.884f + }, + { + "Granite", + 2142.664f + }, + { + "Mud Caves To Grass", + 3319.761f + }, + { + "Full Desert", + 9730.408f + }, + { + "Floating Islands", + 1364.346f + }, + { + "Mushroom Patches", + 743.7686f + }, + { + "Dirt To Mud", + 351.3519f + }, + { + "Silt", + 211.84f + }, + { + "Shinies", + 237.4298f + }, + { + "Webs", + 50.6646f + }, + { + "Underworld", + 8936.494f + }, + { + "Lakes", + 12.1766f + }, + { + "Corruption", + 1094.237f + }, + { + "Dungeon", + 477.1963f + }, + { + "Slush", + 55.1857f + }, + { + "Mountain Caves", + 11.4819f + }, + { + "Beaches", + 7.8287f + }, + { + "Gems", + 895.426f + }, + { + "Gravitating Sand", + 933.5295f + }, + { + "Clean Up Dirt", + 697.0276f + }, + { + "Pyramids", + 6.6884f + }, + { + "Dirt Rock Wall Runner", + 24.7648f + }, + { + "Living Trees", + 4.937f + }, + { + "Wood Tree Walls", + 76.8709f + }, + { + "Altars", + 72.6607f + }, + { + "Wet Jungle", + 23.492f + }, + { + "Remove Water From Sand", + 22.0898f + }, + { + "Jungle Temple", + 595.8422f + }, + { + "Hives", + 371.392f + }, + { + "Jungle Chests", + 0.5896f + }, + { + "Smooth World", + 5841.608f + }, + { + "Settle Liquids", + 9398.525f + }, + { + "Waterfalls", + 4118.666f + }, + { + "Ice", + 163.0777f + }, + { + "Wall Variety", + 5264.021f + }, + { + "Life Crystals", + 2.7582f + }, + { + "Statues", + 64.5737f + }, + { + "Buried Chests", + 1102.553f + }, + { + "Surface Chests", + 12.8337f + }, + { + "Jungle Chests Placement", + 1.3546f + }, + { + "Water Chests", + 12.5981f + }, + { + "Spider Caves", + 475.4143f + }, + { + "Gem Caves", + 36.0143f + }, + { + "Moss", + 655.8314f + }, + { + "Temple", + 5.6917f + }, + { + "Ice Walls", + 957.0317f + }, + { + "Jungle Trees", + 817.2459f + }, + { + "Floating Island Houses", + 1.5022f + }, + { + "Quick Cleanup", + 1374.467f + }, + { + "Pots", + 1638.609f + }, + { + "Hellforge", + 2.8645f + }, + { + "Spreading Grass", + 127.7581f + }, + { + "Place Fallen Log", + 17.3377f + }, + { + "Traps", + 562.9085f + }, + { + "Piles", + 288.3675f + }, + { + "Spawn Point", + 0.012f + }, + { + "Grass Wall", + 604.9992f + }, + { + "Guide", + 0.016f + }, + { + "Sunflowers", + 4.1757f + }, + { + "Planting Trees", + 325.0993f + }, + { + "Cactus & Coral", + 31.6349f + }, + { + "Herbs", + 120.1871f + }, + { + "Dye Plants", + 226.6394f + }, + { + "Webs And Honey", + 608.9524f + }, + { + "Weeds", + 187.9759f + }, + { + "Mud Caves To Grass 2", + 686.4958f + }, + { + "Jungle Plants", + 1295.038f + }, + { + "Vines", + 1132.555f + }, + { + "Flowers", + 16.7723f + }, + { + "Mushrooms", + 0.2294f + }, + { + "Gems In Ice Biome", + 10.3092f + }, + { + "Random Gems", + 18.4925f + }, + { + "Moss Grass", + 687.742f + }, + { + "Muds Walls In Jungle", + 89.7739f + }, + { + "Larva", + 0.2074f + }, + { + "Settle Liquids Again", + 7073.647f + }, + { + "Tile Cleanup", + 1896.76f + }, + { + "Lihzahrd Altars", + 0.0071f + }, + { + "Micro Biomes", + 3547.43f + }, + { + "Stalac", + 1180.906f + }, + { + "Remove Broken Traps", + 1293.425f + }, + { + "Final Cleanup", + 2080.294f + } + }; + private readonly WorldGenLegacyMethod _method; + + public PassLegacy(string name, WorldGenLegacyMethod method) + : base(name, PassLegacy.GetWeight(name)) + { + this._method = method; + } + + public PassLegacy(string name, WorldGenLegacyMethod method, float weight) + : base(name, weight) + { + this._method = method; + } + + private static float GetWeight(string name) + { + float num; + if (!PassLegacy._weightMap.TryGetValue(name, out num)) + num = 1f; + return num; + } + + protected override void ApplyPass(GenerationProgress progress, GameConfiguration configuration) => this._method(progress, configuration); + } +} diff --git a/GameContent/Generation/ShapeBranch.cs b/GameContent/Generation/ShapeBranch.cs new file mode 100644 index 0000000..f6ee54d --- /dev/null +++ b/GameContent/Generation/ShapeBranch.cs @@ -0,0 +1,69 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.ShapeBranch +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Generation +{ + public class ShapeBranch : GenShape + { + private Point _offset; + private List _endPoints; + + public ShapeBranch() => this._offset = new Point(10, -5); + + public ShapeBranch(Point offset) => this._offset = offset; + + public ShapeBranch(double angle, double distance) => this._offset = new Point((int) (Math.Cos(angle) * distance), (int) (Math.Sin(angle) * distance)); + + private bool PerformSegment(Point origin, GenAction action, Point start, Point end, int size) + { + size = Math.Max(1, size); + for (int index1 = -(size >> 1); index1 < size - (size >> 1); ++index1) + { + for (int index2 = -(size >> 1); index2 < size - (size >> 1); ++index2) + { + if (!Utils.PlotLine(new Point(start.X + index1, start.Y + index2), end, (Utils.TileActionAttempt) ((tileX, tileY) => this.UnitApply(action, origin, tileX, tileY) || !this._quitOnFail), false)) + return false; + } + } + return true; + } + + public override bool Perform(Point origin, GenAction action) + { + float num1 = new Vector2((float) this._offset.X, (float) this._offset.Y).Length(); + int size = (int) ((double) num1 / 6.0); + if (this._endPoints != null) + this._endPoints.Add(new Point(origin.X + this._offset.X, origin.Y + this._offset.Y)); + if (!this.PerformSegment(origin, action, origin, new Point(origin.X + this._offset.X, origin.Y + this._offset.Y), size)) + return false; + int num2 = (int) ((double) num1 / 8.0); + for (int index = 0; index < num2; ++index) + { + float num3 = (float) (((double) index + 1.0) / ((double) num2 + 1.0)); + Point point1 = new Point((int) ((double) num3 * (double) this._offset.X), (int) ((double) num3 * (double) this._offset.Y)); + Vector2 spinningpoint = new Vector2((float) (this._offset.X - point1.X), (float) (this._offset.Y - point1.Y)); + spinningpoint = spinningpoint.RotatedBy((GenBase._random.NextDouble() * 0.5 + 1.0) * (GenBase._random.Next(2) == 0 ? -1.0 : 1.0)) * 0.75f; + Point point2 = new Point((int) spinningpoint.X + point1.X, (int) spinningpoint.Y + point1.Y); + if (this._endPoints != null) + this._endPoints.Add(new Point(point2.X + origin.X, point2.Y + origin.Y)); + if (!this.PerformSegment(origin, action, new Point(point1.X + origin.X, point1.Y + origin.Y), new Point(point2.X + origin.X, point2.Y + origin.Y), size - 1)) + return false; + } + return true; + } + + public ShapeBranch OutputEndpoints(List endpoints) + { + this._endPoints = endpoints; + return this; + } + } +} diff --git a/GameContent/Generation/ShapeFloodFill.cs b/GameContent/Generation/ShapeFloodFill.cs new file mode 100644 index 0000000..e53fc1a --- /dev/null +++ b/GameContent/Generation/ShapeFloodFill.cs @@ -0,0 +1,55 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.ShapeFloodFill +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria.DataStructures; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Generation +{ + public class ShapeFloodFill : GenShape + { + private int _maximumActions; + + public ShapeFloodFill(int maximumActions = 100) => this._maximumActions = maximumActions; + + public override bool Perform(Point origin, GenAction action) + { + Queue pointQueue = new Queue(); + HashSet point16Set = new HashSet(); + pointQueue.Enqueue(origin); + int maximumActions = this._maximumActions; + while (pointQueue.Count > 0 && maximumActions > 0) + { + Point point = pointQueue.Dequeue(); + if (!point16Set.Contains(new Point16(point.X, point.Y)) && this.UnitApply(action, origin, point.X, point.Y)) + { + point16Set.Add(new Point16(point)); + --maximumActions; + if (point.X + 1 < Main.maxTilesX - 1) + pointQueue.Enqueue(new Point(point.X + 1, point.Y)); + if (point.X - 1 >= 1) + pointQueue.Enqueue(new Point(point.X - 1, point.Y)); + if (point.Y + 1 < Main.maxTilesY - 1) + pointQueue.Enqueue(new Point(point.X, point.Y + 1)); + if (point.Y - 1 >= 1) + pointQueue.Enqueue(new Point(point.X, point.Y - 1)); + } + } + while (pointQueue.Count > 0) + { + Point point = pointQueue.Dequeue(); + if (!point16Set.Contains(new Point16(point.X, point.Y))) + { + pointQueue.Enqueue(point); + break; + } + } + return pointQueue.Count == 0; + } + } +} diff --git a/GameContent/Generation/ShapeRoot.cs b/GameContent/Generation/ShapeRoot.cs new file mode 100644 index 0000000..aa0af68 --- /dev/null +++ b/GameContent/Generation/ShapeRoot.cs @@ -0,0 +1,59 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.ShapeRoot +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Generation +{ + public class ShapeRoot : GenShape + { + private float _angle; + private float _startingSize; + private float _endingSize; + private float _distance; + + public ShapeRoot(float angle, float distance = 10f, float startingSize = 4f, float endingSize = 1f) + { + this._angle = angle; + this._distance = distance; + this._startingSize = startingSize; + this._endingSize = endingSize; + } + + private bool DoRoot( + Point origin, + GenAction action, + float angle, + float distance, + float startingSize) + { + float x = (float) origin.X; + float y = (float) origin.Y; + for (float num1 = 0.0f; (double) num1 < (double) distance * 0.850000023841858; ++num1) + { + float amount = num1 / distance; + float num2 = MathHelper.Lerp(startingSize, this._endingSize, amount); + x += (float) Math.Cos((double) angle); + y += (float) Math.Sin((double) angle); + angle += (float) ((double) GenBase._random.NextFloat() - 0.5 + (double) GenBase._random.NextFloat() * ((double) this._angle - 1.57079637050629) * 0.100000001490116 * (1.0 - (double) amount)); + angle = (float) ((double) angle * 0.400000005960464 + 0.449999988079071 * (double) MathHelper.Clamp(angle, this._angle - (float) (2.0 * (1.0 - 0.5 * (double) amount)), this._angle + (float) (2.0 * (1.0 - 0.5 * (double) amount))) + (double) MathHelper.Lerp(this._angle, 1.570796f, amount) * 0.150000005960464); + for (int index1 = 0; index1 < (int) num2; ++index1) + { + for (int index2 = 0; index2 < (int) num2; ++index2) + { + if (!this.UnitApply(action, origin, (int) x + index1, (int) y + index2) && this._quitOnFail) + return false; + } + } + } + return true; + } + + public override bool Perform(Point origin, GenAction action) => this.DoRoot(origin, action, this._angle, this._distance, this._startingSize); + } +} diff --git a/GameContent/Generation/ShapeRunner.cs b/GameContent/Generation/ShapeRunner.cs new file mode 100644 index 0000000..c3f3e29 --- /dev/null +++ b/GameContent/Generation/ShapeRunner.cs @@ -0,0 +1,62 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.ShapeRunner +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Generation +{ + public class ShapeRunner : GenShape + { + private float _startStrength; + private int _steps; + private Vector2 _startVelocity; + + public ShapeRunner(float strength, int steps, Vector2 velocity) + { + this._startStrength = strength; + this._steps = steps; + this._startVelocity = velocity; + } + + public override bool Perform(Point origin, GenAction action) + { + float num1 = (float) this._steps; + float steps = (float) this._steps; + double num2 = (double) this._startStrength; + Vector2 vector2_1 = new Vector2((float) origin.X, (float) origin.Y); + Vector2 vector2_2 = this._startVelocity == Vector2.Zero ? Utils.RandomVector2(GenBase._random, -1f, 1f) : this._startVelocity; + while ((double) num1 > 0.0 && num2 > 0.0) + { + num2 = (double) this._startStrength * ((double) num1 / (double) steps); + float num3 = num1 - 1f; + int num4 = Math.Max(1, (int) ((double) vector2_1.X - num2 * 0.5)); + int num5 = Math.Max(1, (int) ((double) vector2_1.Y - num2 * 0.5)); + int num6 = Math.Min(GenBase._worldWidth, (int) ((double) vector2_1.X + num2 * 0.5)); + int num7 = Math.Min(GenBase._worldHeight, (int) ((double) vector2_1.Y + num2 * 0.5)); + for (int x = num4; x < num6; ++x) + { + for (int y = num5; y < num7; ++y) + { + if ((double) Math.Abs((float) x - vector2_1.X) + (double) Math.Abs((float) y - vector2_1.Y) < num2 * 0.5 * (1.0 + (double) GenBase._random.Next(-10, 11) * 0.015)) + this.UnitApply(action, origin, x, y); + } + } + int num8 = (int) (num2 / 50.0) + 1; + num1 = num3 - (float) num8; + vector2_1 += vector2_2; + for (int index = 0; index < num8; ++index) + { + vector2_1 += vector2_2; + vector2_2 += Utils.RandomVector2(GenBase._random, -0.5f, 0.5f); + } + vector2_2 = Vector2.Clamp(vector2_2 + Utils.RandomVector2(GenBase._random, -0.5f, 0.5f), -Vector2.One, Vector2.One); + } + return true; + } + } +} diff --git a/GameContent/Generation/TrackGenerator.cs b/GameContent/Generation/TrackGenerator.cs new file mode 100644 index 0000000..0d93a86 --- /dev/null +++ b/GameContent/Generation/TrackGenerator.cs @@ -0,0 +1,424 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.TrackGenerator +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Diagnostics; +using Terraria.ID; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Generation +{ + public class TrackGenerator + { + private static readonly ushort[] InvalidWalls = new ushort[20] + { + (ushort) 7, + (ushort) 94, + (ushort) 95, + (ushort) 8, + (ushort) 98, + (ushort) 99, + (ushort) 9, + (ushort) 96, + (ushort) 97, + (ushort) 3, + (ushort) 83, + (ushort) 68, + (ushort) 62, + (ushort) 78, + (ushort) 87, + (ushort) 86, + (ushort) 42, + (ushort) 74, + (ushort) 27, + (ushort) 149 + }; + private static readonly ushort[] InvalidTiles = new ushort[22] + { + (ushort) 383, + (ushort) 384, + (ushort) 15, + (ushort) 304, + (ushort) 30, + (ushort) 321, + (ushort) 245, + (ushort) 246, + (ushort) 240, + (ushort) 241, + (ushort) 242, + (ushort) 16, + (ushort) 34, + (ushort) 158, + (ushort) 377, + (ushort) 94, + (ushort) 10, + (ushort) 19, + (ushort) 86, + (ushort) 219, + (ushort) 484, + (ushort) 190 + }; + private readonly TrackGenerator.TrackHistory[] _history = new TrackGenerator.TrackHistory[4096]; + private readonly TrackGenerator.TrackHistory[] _rewriteHistory = new TrackGenerator.TrackHistory[25]; + private int _xDirection; + private int _length; + private int playerHeight = 6; + + public bool Place(Point origin, int minLength, int maxLength) + { + if (!TrackGenerator.FindSuitableOrigin(ref origin)) + return false; + this.CreateTrackStart(origin); + if (!this.FindPath(minLength, maxLength)) + return false; + this.PlacePath(); + return true; + } + + private void PlacePath() + { + bool[] flagArray = new bool[this._length]; + for (int index1 = 0; index1 < this._length; ++index1) + { + if (WorldGen.genRand.Next(7) == 0) + this.playerHeight = WorldGen.genRand.Next(5, 9); + for (int index2 = 0; index2 < this.playerHeight; ++index2) + { + if (Main.tile[(int) this._history[index1].X, (int) this._history[index1].Y - index2 - 1].wall == (ushort) 244) + Main.tile[(int) this._history[index1].X, (int) this._history[index1].Y - index2 - 1].wall = (ushort) 0; + if (Main.tile[(int) this._history[index1].X, (int) this._history[index1].Y - index2].wall == (ushort) 244) + Main.tile[(int) this._history[index1].X, (int) this._history[index1].Y - index2].wall = (ushort) 0; + if (Main.tile[(int) this._history[index1].X, (int) this._history[index1].Y - index2 + 1].wall == (ushort) 244) + Main.tile[(int) this._history[index1].X, (int) this._history[index1].Y - index2 + 1].wall = (ushort) 0; + if (Main.tile[(int) this._history[index1].X, (int) this._history[index1].Y - index2].type == (ushort) 135) + flagArray[index1] = true; + WorldGen.KillTile((int) this._history[index1].X, (int) this._history[index1].Y - index2, noItem: true); + } + } + for (int index3 = 0; index3 < this._length; ++index3) + { + if (WorldGen.genRand.Next(7) == 0) + this.playerHeight = WorldGen.genRand.Next(5, 9); + TrackGenerator.TrackHistory trackHistory = this._history[index3]; + Tile.SmoothSlope((int) trackHistory.X, (int) trackHistory.Y + 1); + Tile.SmoothSlope((int) trackHistory.X, (int) trackHistory.Y - this.playerHeight); + bool wire = Main.tile[(int) trackHistory.X, (int) trackHistory.Y].wire(); + if (flagArray[index3] && index3 < this._length && index3 > 0 && (int) this._history[index3 - 1].Y == (int) trackHistory.Y && (int) this._history[index3 + 1].Y == (int) trackHistory.Y) + { + Main.tile[(int) trackHistory.X, (int) trackHistory.Y].ClearEverything(); + WorldGen.PlaceTile((int) trackHistory.X, (int) trackHistory.Y, 314, forced: true, style: 1); + } + else + Main.tile[(int) trackHistory.X, (int) trackHistory.Y].ResetToType((ushort) 314); + Main.tile[(int) trackHistory.X, (int) trackHistory.Y].wire(wire); + if (index3 != 0) + { + for (int index4 = 0; index4 < 8; ++index4) + WorldUtils.TileFrame((int) this._history[index3 - 1].X, (int) this._history[index3 - 1].Y - index4, true); + if (index3 == this._length - 1) + { + for (int index5 = 0; index5 < this.playerHeight; ++index5) + WorldUtils.TileFrame((int) trackHistory.X, (int) trackHistory.Y - index5, true); + } + } + } + } + + private void CreateTrackStart(Point origin) + { + this._xDirection = origin.X > Main.maxTilesX / 2 ? -1 : 1; + this._length = 1; + for (int index = 0; index < this._history.Length; ++index) + this._history[index] = new TrackGenerator.TrackHistory(origin.X + index * this._xDirection, origin.Y + index, TrackGenerator.TrackSlope.Down); + } + + private bool FindPath(int minLength, int maxLength) + { + int length = this._length; + while (this._length < this._history.Length - 100) + { + this.AppendToHistory(this._history[this._length - 1].Slope == TrackGenerator.TrackSlope.Up ? TrackGenerator.TrackSlope.Straight : TrackGenerator.TrackSlope.Down); + TrackGenerator.TrackPlacementState avoidTiles = this.TryRewriteHistoryToAvoidTiles(); + if (avoidTiles != TrackGenerator.TrackPlacementState.Invalid) + { + length = this._length; + TrackGenerator.TrackPlacementState trackPlacementState = avoidTiles; + while (trackPlacementState != TrackGenerator.TrackPlacementState.Available) + { + trackPlacementState = this.CreateTunnel(); + if (trackPlacementState != TrackGenerator.TrackPlacementState.Invalid) + length = this._length; + else + break; + } + if (this._length >= maxLength) + break; + } + else + break; + } + this._length = Math.Min(maxLength, length); + if (this._length < minLength) + return false; + this.SmoothTrack(); + return this.GetHistorySegmentPlacementState(0, this._length) != TrackGenerator.TrackPlacementState.Invalid; + } + + private TrackGenerator.TrackPlacementState CreateTunnel() + { + TrackGenerator.TrackSlope trackSlope1 = TrackGenerator.TrackSlope.Straight; + int num = 10; + TrackGenerator.TrackPlacementState trackPlacementState1 = TrackGenerator.TrackPlacementState.Invalid; + int x = (int) this._history[this._length - 1].X; + int y = (int) this._history[this._length - 1].Y; + for (TrackGenerator.TrackSlope trackSlope2 = TrackGenerator.TrackSlope.Up; trackSlope2 <= TrackGenerator.TrackSlope.Down; ++trackSlope2) + { + TrackGenerator.TrackPlacementState trackPlacementState2 = TrackGenerator.TrackPlacementState.Invalid; + for (int index = 1; index < num; ++index) + { + trackPlacementState2 = TrackGenerator.CalculateStateForLocation(x + index * this._xDirection, y + index * (int) trackSlope2); + switch (trackPlacementState2) + { + case TrackGenerator.TrackPlacementState.Obstructed: + continue; + case TrackGenerator.TrackPlacementState.Invalid: + goto label_6; + default: + trackSlope1 = trackSlope2; + num = index; + trackPlacementState1 = trackPlacementState2; + goto label_6; + } + } +label_6: + if (trackPlacementState1 != TrackGenerator.TrackPlacementState.Available && trackPlacementState2 == TrackGenerator.TrackPlacementState.Obstructed && (trackPlacementState1 != TrackGenerator.TrackPlacementState.Obstructed || trackSlope1 != TrackGenerator.TrackSlope.Straight)) + { + trackSlope1 = trackSlope2; + num = 10; + trackPlacementState1 = trackPlacementState2; + } + } + if (this._length == 0 || !TrackGenerator.CanSlopesTouch(this._history[this._length - 1].Slope, trackSlope1)) + this.RewriteSlopeDirection(this._length - 1, TrackGenerator.TrackSlope.Straight); + this._history[this._length - 1].Mode = TrackGenerator.TrackMode.Tunnel; + for (int index = 1; index < num; ++index) + this.AppendToHistory(trackSlope1, TrackGenerator.TrackMode.Tunnel); + return trackPlacementState1; + } + + private void AppendToHistory(TrackGenerator.TrackSlope slope, TrackGenerator.TrackMode mode = TrackGenerator.TrackMode.Normal) + { + this._history[this._length] = new TrackGenerator.TrackHistory((int) this._history[this._length - 1].X + this._xDirection, (int) ((sbyte) this._history[this._length - 1].Y + slope), slope); + this._history[this._length].Mode = mode; + ++this._length; + } + + private TrackGenerator.TrackPlacementState TryRewriteHistoryToAvoidTiles() + { + int index1 = this._length - 1; + int length = Math.Min(this._length, this._rewriteHistory.Length); + for (int index2 = 0; index2 < length; ++index2) + this._rewriteHistory[index2] = this._history[index1 - index2]; + for (; index1 >= this._length - length; --index1) + { + if (this._history[index1].Slope == TrackGenerator.TrackSlope.Down) + { + TrackGenerator.TrackPlacementState segmentPlacementState = this.GetHistorySegmentPlacementState(index1, this._length - index1); + if (segmentPlacementState == TrackGenerator.TrackPlacementState.Available) + return segmentPlacementState; + this.RewriteSlopeDirection(index1, TrackGenerator.TrackSlope.Straight); + } + } + if (this.GetHistorySegmentPlacementState(index1 + 1, this._length - (index1 + 1)) == TrackGenerator.TrackPlacementState.Available) + return TrackGenerator.TrackPlacementState.Available; + int index3; + for (index3 = this._length - 1; index3 >= this._length - length + 1; --index3) + { + if (this._history[index3].Slope == TrackGenerator.TrackSlope.Straight) + { + TrackGenerator.TrackPlacementState segmentPlacementState = this.GetHistorySegmentPlacementState(this._length - length, length); + if (segmentPlacementState == TrackGenerator.TrackPlacementState.Available) + return segmentPlacementState; + this.RewriteSlopeDirection(index3, TrackGenerator.TrackSlope.Up); + } + } + for (int index4 = 0; index4 < length; ++index4) + this._history[this._length - 1 - index4] = this._rewriteHistory[index4]; + this.RewriteSlopeDirection(this._length - 1, TrackGenerator.TrackSlope.Straight); + return this.GetHistorySegmentPlacementState(index3 + 1, this._length - (index3 + 1)); + } + + private void RewriteSlopeDirection(int index, TrackGenerator.TrackSlope slope) + { + int num = (int) (slope - this._history[index].Slope); + this._history[index].Slope = slope; + for (int index1 = index; index1 < this._length; ++index1) + this._history[index1].Y += (short) num; + } + + private TrackGenerator.TrackPlacementState GetHistorySegmentPlacementState( + int startIndex, + int length) + { + TrackGenerator.TrackPlacementState trackPlacementState = TrackGenerator.TrackPlacementState.Available; + for (int index = startIndex; index < startIndex + length; ++index) + { + TrackGenerator.TrackPlacementState stateForLocation = TrackGenerator.CalculateStateForLocation((int) this._history[index].X, (int) this._history[index].Y); + switch (stateForLocation) + { + case TrackGenerator.TrackPlacementState.Obstructed: + if (this._history[index].Mode != TrackGenerator.TrackMode.Tunnel) + { + trackPlacementState = stateForLocation; + break; + } + break; + case TrackGenerator.TrackPlacementState.Invalid: + return stateForLocation; + } + } + return trackPlacementState; + } + + private void SmoothTrack() + { + int val2 = this._length - 1; + bool flag = false; + for (int index1 = this._length - 1; index1 >= 0; --index1) + { + if (flag) + { + val2 = Math.Min(index1 + 15, val2); + if ((int) this._history[index1].Y >= (int) this._history[val2].Y) + { + for (int index2 = index1 + 1; (int) this._history[index2].Y > (int) this._history[index1].Y; ++index2) + { + this._history[index2].Y = this._history[index1].Y; + this._history[index2].Slope = TrackGenerator.TrackSlope.Straight; + } + if ((int) this._history[index1].Y == (int) this._history[val2].Y) + flag = false; + } + } + else if ((int) this._history[index1].Y > (int) this._history[val2].Y) + flag = true; + else + val2 = index1; + } + } + + private static bool CanSlopesTouch( + TrackGenerator.TrackSlope leftSlope, + TrackGenerator.TrackSlope rightSlope) + { + return leftSlope == rightSlope || leftSlope == TrackGenerator.TrackSlope.Straight || rightSlope == TrackGenerator.TrackSlope.Straight; + } + + private static bool FindSuitableOrigin(ref Point origin) + { + TrackGenerator.TrackPlacementState stateForLocation; + while ((stateForLocation = TrackGenerator.CalculateStateForLocation(origin.X, origin.Y)) != TrackGenerator.TrackPlacementState.Obstructed) + { + ++origin.Y; + if (stateForLocation == TrackGenerator.TrackPlacementState.Invalid) + return false; + } + --origin.Y; + return TrackGenerator.CalculateStateForLocation(origin.X, origin.Y) == TrackGenerator.TrackPlacementState.Available; + } + + private static TrackGenerator.TrackPlacementState CalculateStateForLocation( + int x, + int y) + { + for (int index = 0; index < 6; ++index) + { + if (TrackGenerator.IsLocationInvalid(x, y - index)) + return TrackGenerator.TrackPlacementState.Invalid; + } + for (int index = 0; index < 6; ++index) + { + if (TrackGenerator.IsMinecartTrack(x, y + index)) + return TrackGenerator.TrackPlacementState.Invalid; + } + for (int index = 0; index < 6; ++index) + { + if (WorldGen.SolidTile(x, y - index)) + return TrackGenerator.TrackPlacementState.Obstructed; + } + return WorldGen.IsTileNearby(x, y, 314, 30) ? TrackGenerator.TrackPlacementState.Invalid : TrackGenerator.TrackPlacementState.Available; + } + + private static bool IsMinecartTrack(int x, int y) => Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 314; + + private static bool IsLocationInvalid(int x, int y) + { + if (y > Main.UnderworldLayer || x < 5 || y < (int) Main.worldSurface || x > Main.maxTilesX - 5 || WorldGen.oceanDepths(x, y)) + return true; + ushort wall = Main.tile[x, y].wall; + for (int index = 0; index < TrackGenerator.InvalidWalls.Length; ++index) + { + if ((int) wall == (int) TrackGenerator.InvalidWalls[index] && (!WorldGen.notTheBees || wall != (ushort) 108)) + return true; + } + ushort type = Main.tile[x, y].type; + for (int index = 0; index < TrackGenerator.InvalidTiles.Length; ++index) + { + if ((int) type == (int) TrackGenerator.InvalidTiles[index]) + return true; + } + for (int index = -1; index <= 1; ++index) + { + if (Main.tile[x + index, y].active() && (Main.tile[x + index, y].type == (ushort) 314 || !TileID.Sets.GeneralPlacementTiles[(int) Main.tile[x + index, y].type]) && (!WorldGen.notTheBees || Main.tile[x + index, y].type != (ushort) 225)) + return true; + } + return false; + } + + [Conditional("DEBUG")] + private void DrawPause() + { + } + + private enum TrackPlacementState + { + Available, + Obstructed, + Invalid, + } + + private enum TrackSlope : sbyte + { + Up = -1, // 0xFF + Straight = 0, + Down = 1, + } + + private enum TrackMode : byte + { + Normal, + Tunnel, + } + + [DebuggerDisplay("X = {X}, Y = {Y}, Slope = {Slope}")] + private struct TrackHistory + { + public short X; + public short Y; + public TrackGenerator.TrackSlope Slope; + public TrackGenerator.TrackMode Mode; + + public TrackHistory(int x, int y, TrackGenerator.TrackSlope slope) + { + this.X = (short) x; + this.Y = (short) y; + this.Slope = slope; + this.Mode = TrackGenerator.TrackMode.Normal; + } + } + } +} diff --git a/GameContent/Generation/WorldGenLegacyMethod.cs b/GameContent/Generation/WorldGenLegacyMethod.cs new file mode 100644 index 0000000..e5a3e3f --- /dev/null +++ b/GameContent/Generation/WorldGenLegacyMethod.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Generation.WorldGenLegacyMethod +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.IO; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.Generation +{ + public delegate void WorldGenLegacyMethod( + GenerationProgress progress, + GameConfiguration configuration); +} diff --git a/GameContent/Golf/FancyGolfPredictionLine.cs b/GameContent/Golf/FancyGolfPredictionLine.cs new file mode 100644 index 0000000..a3b3ad1 --- /dev/null +++ b/GameContent/Golf/FancyGolfPredictionLine.cs @@ -0,0 +1,138 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Golf.FancyGolfPredictionLine +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Graphics; +using System; +using System.Collections.Generic; +using Terraria.Graphics; + +namespace Terraria.GameContent.Golf +{ + public class FancyGolfPredictionLine + { + private readonly List _positions; + private readonly Entity _entity = (Entity) new FancyGolfPredictionLine.PredictionEntity(); + private readonly int _iterations; + private readonly Color[] _colors = new Color[2] + { + Color.White, + Color.Gray + }; + private readonly BasicDebugDrawer _drawer = new BasicDebugDrawer(Main.instance.GraphicsDevice); + private float _time; + + public FancyGolfPredictionLine(int iterations) + { + this._positions = new List(iterations * 2 + 1); + this._iterations = iterations; + } + + public void Update(Entity golfBall, Vector2 impactVelocity, float roughLandResistance) + { + bool flag = Main.tileSolid[379]; + Main.tileSolid[379] = false; + this._positions.Clear(); + this._time += 0.01666667f; + this._entity.position = golfBall.position; + this._entity.width = golfBall.width; + this._entity.height = golfBall.height; + GolfHelper.HitGolfBall(this._entity, impactVelocity, roughLandResistance); + this._positions.Add(this._entity.position); + float angularVelocity = 0.0f; + for (int index = 0; index < this._iterations; ++index) + { + GolfHelper.StepGolfBall(this._entity, ref angularVelocity); + this._positions.Add(this._entity.position); + } + Main.tileSolid[379] = flag; + } + + public void Draw(Camera camera, SpriteBatch spriteBatch, float chargeProgress) + { + this._drawer.Begin(camera.GameViewMatrix.TransformationMatrix); + int count = this._positions.Count; + Texture2D texture2D = TextureAssets.Extra[33].Value; + Vector2 vector2_1 = new Vector2(3.5f, 3.5f); + Vector2 origin = texture2D.Size() / 2f; + Vector2 unscaledPosition = camera.UnscaledPosition; + Vector2 vector2_2 = vector2_1 - unscaledPosition; + float travelledLength = 0.0f; + float num = 0.0f; + for (int startIndex = 0; startIndex < this._positions.Count - 1; ++startIndex) + { + float length; + this.GetSectionLength(startIndex, out length, out float _); + if ((double) length != 0.0) + { + for (; (double) travelledLength < (double) num + (double) length; travelledLength += 4f) + { + float index = (travelledLength - num) / length + (float) startIndex; + Vector2 position = this.GetPosition((travelledLength - num) / length + (float) startIndex); + Color color = this.GetColor2(index) * MathHelper.Clamp((float) (2.0 - 2.0 * (double) index / (double) (this._positions.Count - 1)), 0.0f, 1f); + spriteBatch.Draw(texture2D, position + vector2_2, new Rectangle?(), color, 0.0f, origin, this.GetScale(travelledLength), SpriteEffects.None, 0.0f); + } + num += length; + } + } + this._drawer.End(); + } + + private Color GetColor(float travelledLength) + { + float num1 = ((float) ((double) travelledLength % 200.0 / 200.0) * (float) this._colors.Length - (float) ((double) this._time * 3.14159274101257 * 1.5)) % (float) this._colors.Length; + if ((double) num1 < 0.0) + num1 += (float) this._colors.Length; + int num2 = (int) Math.Floor((double) num1); + int num3 = num2 + 1; + int index1 = Utils.Clamp(num2 % this._colors.Length, 0, this._colors.Length - 1); + int index2 = Utils.Clamp(num3 % this._colors.Length, 0, this._colors.Length - 1); + float amount = num1 - (float) index1; + Color color = Color.Lerp(this._colors[index1], this._colors[index2], amount); + color.A = (byte) 64; + return color * 0.6f; + } + + private Color GetColor2(float index) + { + double d; + int index1 = (int) Math.Floor(d = (double) index * 0.5 - (double) this._time * 3.14159274101257 * 1.5) % this._colors.Length; + if (index1 < 0) + index1 += this._colors.Length; + int index2 = (index1 + 1) % this._colors.Length; + float amount = (float) d - (float) Math.Floor(d); + Color color = Color.Lerp(this._colors[index1], this._colors[index2], amount); + color.A = (byte) 64; + return color * 0.6f; + } + + private float GetScale(float travelledLength) => (float) (0.200000002980232 + (double) Utils.GetLerpValue(0.8f, 1f, (float) (Math.Cos((double) travelledLength / 50.0 + (double) this._time * -3.14159274101257) * 0.5 + 0.5), true) * 0.150000005960464); + + private void GetSectionLength(int startIndex, out float length, out float rotation) + { + int index = startIndex + 1; + if (index >= this._positions.Count) + index = this._positions.Count - 1; + length = Vector2.Distance(this._positions[startIndex], this._positions[index]); + rotation = (this._positions[index] - this._positions[startIndex]).ToRotation(); + } + + private Vector2 GetPosition(float indexProgress) + { + int index1 = (int) Math.Floor((double) indexProgress); + int index2 = index1 + 1; + if (index2 >= this._positions.Count) + index2 = this._positions.Count - 1; + float amount = indexProgress - (float) index1; + return Vector2.Lerp(this._positions[index1], this._positions[index2], amount); + } + + private class PredictionEntity : Entity + { + } + } +} diff --git a/GameContent/Golf/GolfBallTrackRecord.cs b/GameContent/Golf/GolfBallTrackRecord.cs new file mode 100644 index 0000000..1bcbabd --- /dev/null +++ b/GameContent/Golf/GolfBallTrackRecord.cs @@ -0,0 +1,39 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Golf.GolfBallTrackRecord +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; + +namespace Terraria.GameContent.Golf +{ + public class GolfBallTrackRecord + { + private List _hitLocations = new List(); + + public void RecordHit(Vector2 position) => this._hitLocations.Add(position); + + public int GetAccumulatedScore() + { + double totalDistancePassed; + int hitsMade; + this.GetTrackInfo(out totalDistancePassed, out hitsMade); + return (int) (totalDistancePassed / 16.0) / (hitsMade + 2); + } + + private void GetTrackInfo(out double totalDistancePassed, out int hitsMade) + { + hitsMade = 0; + totalDistancePassed = 0.0; + int index = 0; + while (index < this._hitLocations.Count - 1) + { + totalDistancePassed += (double) Vector2.Distance(this._hitLocations[index], this._hitLocations[index + 1]); + ++index; + ++hitsMade; + } + } + } +} diff --git a/GameContent/Golf/GolfHelper.cs b/GameContent/Golf/GolfHelper.cs new file mode 100644 index 0000000..8750a4e --- /dev/null +++ b/GameContent/Golf/GolfHelper.cs @@ -0,0 +1,485 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Golf.GolfHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Diagnostics; +using Terraria.Audio; +using Terraria.Chat; +using Terraria.GameContent.Metadata; +using Terraria.ID; +using Terraria.Localization; +using Terraria.Physics; + +namespace Terraria.GameContent.Golf +{ + public static class GolfHelper + { + public const int PointsNeededForLevel1 = 500; + public const int PointsNeededForLevel2 = 1000; + public const int PointsNeededForLevel3 = 2000; + private static readonly PhysicsProperties PhysicsProperties = new PhysicsProperties(0.3f, 0.99f); + private static readonly GolfHelper.ContactListener Listener = new GolfHelper.ContactListener(); + private static FancyGolfPredictionLine _predictionLine; + + public static BallStepResult StepGolfBall( + Entity entity, + ref float angularVelocity) + { + return BallCollision.Step(GolfHelper.PhysicsProperties, entity, ref angularVelocity, (IBallContactListener) GolfHelper.Listener); + } + + private static Vector2 FindVectorOnOval(Vector2 vector, Vector2 radius) => (double) Math.Abs(radius.X) < 9.99999974737875E-05 || (double) Math.Abs(radius.Y) < 9.99999974737875E-05 ? Vector2.Zero : Vector2.Normalize(vector / radius) * radius; + + private static GolfHelper.ShotStrength CalculateShotStrength( + Vector2 shotVector, + GolfHelper.ClubProperties clubProperties) + { + Vector2.Normalize(shotVector); + double num1 = (double) shotVector.Length(); + float num2 = GolfHelper.FindVectorOnOval(shotVector, clubProperties.MaximumStrength).Length(); + float num3 = GolfHelper.FindVectorOnOval(shotVector, clubProperties.MinimumStrength).Length(); + double num4 = (double) num3; + double num5 = (double) num2; + double num6 = (double) MathHelper.Clamp((float) num1, (float) num4, (float) num5); + return new GolfHelper.ShotStrength((float) (num6 * 32.0), Math.Max((float) ((num6 - (double) num3) / ((double) num2 - (double) num3)), 1f / 1000f), clubProperties.RoughLandResistance); + } + + public static bool IsPlayerHoldingClub(Player player) + { + if (player == null || player.HeldItem == null) + return false; + int type = player.HeldItem.type; + switch (type) + { + case 4039: + case 4092: + case 4093: + case 4094: + return true; + default: + if ((uint) (type - 4587) > 11U) + return false; + goto case 4039; + } + } + + public static GolfHelper.ShotStrength CalculateShotStrength( + Projectile golfHelper, + Entity golfBall) + { + int num1 = Main.screenWidth; + if (num1 > Main.screenHeight) + num1 = Main.screenHeight; + int num2 = 150; + int num3 = (num1 - num2) / 2; + if (num3 < 200) + num3 = 200; + float num4 = 300f; + return (double) golfHelper.ai[0] != 0.0 ? new GolfHelper.ShotStrength() : GolfHelper.CalculateShotStrength((golfHelper.Center - golfBall.Center) / num4, GolfHelper.GetClubPropertiesFromGolfHelper(golfHelper)); + } + + private static GolfHelper.ClubProperties GetClubPropertiesFromGolfHelper( + Projectile golfHelper) + { + return GolfHelper.GetClubProperties((short) Main.player[golfHelper.owner].HeldItem.type); + } + + private static GolfHelper.ClubProperties GetClubProperties(short itemId) + { + Vector2 vector2 = new Vector2(0.25f, 0.25f); + switch (itemId) + { + case 4039: + return new GolfHelper.ClubProperties(vector2, Vector2.One, 0.0f); + case 4092: + return new GolfHelper.ClubProperties(Vector2.Zero, vector2, 0.0f); + case 4093: + return new GolfHelper.ClubProperties(vector2, new Vector2(0.65f, 1.5f), 1f); + case 4094: + return new GolfHelper.ClubProperties(vector2, new Vector2(1.5f, 0.65f), 0.0f); + case 4587: + return new GolfHelper.ClubProperties(vector2, Vector2.One, 0.0f); + case 4588: + return new GolfHelper.ClubProperties(Vector2.Zero, vector2, 0.0f); + case 4589: + return new GolfHelper.ClubProperties(vector2, new Vector2(0.65f, 1.5f), 1f); + case 4590: + return new GolfHelper.ClubProperties(vector2, new Vector2(1.5f, 0.65f), 0.0f); + case 4591: + return new GolfHelper.ClubProperties(vector2, Vector2.One, 0.0f); + case 4592: + return new GolfHelper.ClubProperties(Vector2.Zero, vector2, 0.0f); + case 4593: + return new GolfHelper.ClubProperties(vector2, new Vector2(0.65f, 1.5f), 1f); + case 4594: + return new GolfHelper.ClubProperties(vector2, new Vector2(1.5f, 0.65f), 0.0f); + case 4595: + return new GolfHelper.ClubProperties(vector2, Vector2.One, 0.0f); + case 4596: + return new GolfHelper.ClubProperties(Vector2.Zero, vector2, 0.0f); + case 4597: + return new GolfHelper.ClubProperties(vector2, new Vector2(0.65f, 1.5f), 1f); + case 4598: + return new GolfHelper.ClubProperties(vector2, new Vector2(1.5f, 0.65f), 0.0f); + default: + return new GolfHelper.ClubProperties(); + } + } + + public static Projectile FindHelperFromGolfBall(Projectile golfBall) + { + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && projectile.type == 722 && projectile.owner == golfBall.owner) + return Main.projectile[index]; + } + return (Projectile) null; + } + + public static Projectile FindGolfBallForHelper(Projectile golfHelper) + { + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + Vector2 shotVector = golfHelper.Center - projectile.Center; + if (projectile.active && ProjectileID.Sets.IsAGolfBall[projectile.type] && projectile.owner == golfHelper.owner && GolfHelper.ValidateShot((Entity) projectile, Main.player[golfHelper.owner], ref shotVector)) + return Main.projectile[index]; + } + return (Projectile) null; + } + + public static bool IsGolfBallResting(Projectile golfBall) => (int) golfBall.localAI[1] == 0 || (double) Vector2.Distance(golfBall.position, golfBall.oldPos[golfBall.oldPos.Length - 1]) < 1.0; + + public static bool IsGolfShotValid(Entity golfBall, Player player) + { + Vector2 vector2 = golfBall.Center - player.Bottom; + if (player.direction == -1) + vector2.X *= -1f; + return (double) vector2.X >= -16.0 && (double) vector2.X <= 32.0 && (double) vector2.Y <= 16.0 && (double) vector2.Y >= -16.0; + } + + public static bool ValidateShot(Entity golfBall, Player player, ref Vector2 shotVector) + { + Vector2 vector2 = golfBall.Center - player.Bottom; + if (player.direction == -1) + { + vector2.X *= -1f; + shotVector.X *= -1f; + } + float rotation = shotVector.ToRotation(); + if ((double) rotation > 0.0) + shotVector = shotVector.Length() * new Vector2((float) Math.Cos(0.0), (float) Math.Sin(0.0)); + else if ((double) rotation < -1.52079641819) + shotVector = shotVector.Length() * new Vector2((float) Math.Cos(-1.52079641819), (float) Math.Sin(-1.52079641819)); + if (player.direction == -1) + shotVector.X *= -1f; + return (double) vector2.X >= -16.0 && (double) vector2.X <= 32.0 && (double) vector2.Y <= 16.0 && (double) vector2.Y >= -16.0; + } + + public static void HitGolfBall(Entity entity, Vector2 velocity, float roughLandResistance) + { + Vector2 bottom = entity.Bottom; + ++bottom.Y; + Point tileCoordinates = bottom.ToTileCoordinates(); + Tile tile = Main.tile[tileCoordinates.X, tileCoordinates.Y]; + if (tile != null && tile.active()) + { + TileMaterial byTileId = TileMaterials.GetByTileId(tile.type); + velocity = Vector2.Lerp(velocity * byTileId.GolfPhysics.ClubImpactDampening, velocity, byTileId.GolfPhysics.ImpactDampeningResistanceEfficiency * roughLandResistance); + } + entity.velocity = velocity; + if (!(entity is Projectile golfBall)) + return; + golfBall.timeLeft = 18000; + if ((double) golfBall.ai[1] < 0.0) + golfBall.ai[1] = 0.0f; + ++golfBall.ai[1]; + golfBall.localAI[1] = 1f; + Main.LocalGolfState.RecordSwing(golfBall); + } + + public static void DrawPredictionLine( + Entity golfBall, + Vector2 impactVelocity, + float chargeProgress, + float roughLandResistance) + { + if (GolfHelper._predictionLine == null) + GolfHelper._predictionLine = new FancyGolfPredictionLine(20); + GolfHelper._predictionLine.Update(golfBall, impactVelocity, roughLandResistance); + GolfHelper._predictionLine.Draw(Main.Camera, Main.spriteBatch, chargeProgress); + } + + [Conditional("DEBUG")] + private static void UpdateDebugDraw(Vector2 position) + { + } + + private struct ClubProperties + { + public readonly Vector2 MinimumStrength; + public readonly Vector2 MaximumStrength; + public readonly float RoughLandResistance; + + public ClubProperties( + Vector2 minimumStrength, + Vector2 maximumStrength, + float roughLandResistance) + { + this.MinimumStrength = minimumStrength; + this.MaximumStrength = maximumStrength; + this.RoughLandResistance = roughLandResistance; + } + } + + public struct ShotStrength + { + public readonly float AbsoluteStrength; + public readonly float RelativeStrength; + public readonly float RoughLandResistance; + + public ShotStrength( + float absoluteStrength, + float relativeStrength, + float roughLandResistance) + { + this.AbsoluteStrength = absoluteStrength; + this.RelativeStrength = relativeStrength; + this.RoughLandResistance = roughLandResistance; + } + } + + public class ContactListener : IBallContactListener + { + public void OnCollision( + PhysicsProperties properties, + ref Vector2 position, + ref Vector2 velocity, + ref BallCollisionEvent collision) + { + TileMaterial byTileId = TileMaterials.GetByTileId(collision.Tile.type); + Vector2 vector2_1 = velocity * byTileId.GolfPhysics.SideImpactDampening; + Vector2 vector2_2 = collision.Normal * Vector2.Dot(velocity, collision.Normal) * (byTileId.GolfPhysics.DirectImpactDampening - byTileId.GolfPhysics.SideImpactDampening); + velocity = vector2_1 + vector2_2; + Projectile entity = collision.Entity as Projectile; + switch (collision.Tile.type) + { + case 421: + case 422: + float num1 = 2.5f * collision.TimeScale; + Vector2 vector2_3 = new Vector2(-collision.Normal.Y, collision.Normal.X); + if (collision.Tile.type == (ushort) 422) + vector2_3 = -vector2_3; + float num2 = Vector2.Dot(velocity, vector2_3); + if ((double) num2 < (double) num1) + { + velocity += vector2_3 * MathHelper.Clamp(num1 - num2, 0.0f, num1 * 0.5f); + break; + } + break; + case 476: + float num3 = velocity.Length() / collision.TimeScale; + if ((double) collision.Normal.Y <= -0.00999999977648258 && (double) num3 <= 100.0) + { + velocity *= 0.0f; + if (entity != null && entity.active) + { + this.PutBallInCup(entity, collision); + break; + } + break; + } + break; + } + if (entity == null || (double) velocity.Y >= -0.300000011920929 || (double) velocity.Y <= -2.0 || (double) velocity.Length() <= 1.0) + return; + Dust dust = Dust.NewDustPerfect(collision.Entity.Center, 31, new Vector2?(collision.Normal), (int) sbyte.MaxValue); + dust.scale = 0.7f; + dust.fadeIn = 1f; + dust.velocity = dust.velocity * 0.5f + Main.rand.NextVector2CircularEdge(0.5f, 0.4f); + } + + private void PutBallInCup(Projectile proj, BallCollisionEvent collision) + { + if (proj.owner == Main.myPlayer && Main.LocalGolfState.ShouldScoreHole) + { + Point tileCoordinates = (collision.ImpactPoint - collision.Normal * 0.5f).ToTileCoordinates(); + int owner = proj.owner; + int numberOfHits = (int) proj.ai[1]; + int type = proj.type; + if (numberOfHits > 1) + Main.LocalGolfState.SetScoreTime(); + Main.LocalGolfState.RecordBallInfo(proj); + Main.LocalGolfState.LandBall(proj); + int golfBallScore = Main.LocalGolfState.GetGolfBallScore(proj); + if (numberOfHits > 0) + Main.player[owner].AccumulateGolfingScore(golfBallScore); + GolfHelper.ContactListener.PutBallInCup_TextAndEffects(tileCoordinates, owner, numberOfHits, type); + Main.LocalGolfState.ResetScoreTime(); + Wiring.HitSwitch(tileCoordinates.X, tileCoordinates.Y); + NetMessage.SendData(59, number: tileCoordinates.X, number2: ((float) tileCoordinates.Y)); + if (Main.netMode == 1) + NetMessage.SendData(128, number: owner, number2: ((float) numberOfHits), number3: ((float) type), number5: tileCoordinates.X, number6: tileCoordinates.Y); + } + proj.Kill(); + } + + public static void PutBallInCup_TextAndEffects( + Point hitLocation, + int plr, + int numberOfHits, + int projid) + { + if (numberOfHits == 0) + return; + GolfHelper.ContactListener.EmitGolfballExplosion(hitLocation.ToWorldCoordinates(autoAddY: 0.0f)); + string key = "Game.BallBounceResultGolf_Single"; + if (numberOfHits != 1) + key = "Game.BallBounceResultGolf_Plural"; + NetworkText text = NetworkText.FromKey(key, (object) Main.player[plr].name, (object) NetworkText.FromKey(Lang.GetProjectileName(projid).Key), (object) numberOfHits); + switch (Main.netMode) + { + case 0: + case 1: + Main.NewText(text.ToString(), G: (byte) 240, B: (byte) 20); + break; + case 2: + ChatHelper.BroadcastChatMessage(text, new Color((int) byte.MaxValue, 240, 20)); + break; + } + } + + public void OnPassThrough( + PhysicsProperties properties, + ref Vector2 position, + ref Vector2 velocity, + ref float angularVelocity, + ref BallPassThroughEvent collision) + { + switch (collision.Type) + { + case BallPassThroughType.Water: + velocity *= 0.91f; + angularVelocity *= 0.91f; + break; + case BallPassThroughType.Honey: + velocity *= 0.8f; + angularVelocity *= 0.8f; + break; + case BallPassThroughType.Tile: + TileMaterial byTileId = TileMaterials.GetByTileId(collision.Tile.type); + velocity *= byTileId.GolfPhysics.PassThroughDampening; + angularVelocity *= byTileId.GolfPhysics.PassThroughDampening; + break; + } + } + + private static void EmitGolfballExplosion_Old(Vector2 Center) => GolfHelper.ContactListener.EmitGolfballExplosion(Center); + + private static void EmitGolfballExplosion(Vector2 Center) + { + SoundEngine.PlaySound(SoundID.Item129, Center); + for (float num = 0.0f; (double) num < 1.0; num += 0.085f) + { + Dust dust = Dust.NewDustPerfect(Center, 278, new Vector2?((num * 6.283185f).ToRotationVector2() * new Vector2(2f, 0.5f))); + dust.fadeIn = 1.2f; + dust.noGravity = true; + dust.velocity.X *= 0.7f; + dust.velocity.Y -= 1.5f; + dust.position.Y += 8f; + dust.velocity.X *= 2f; + dust.color = Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.5f); + } + float num1 = Main.rand.NextFloat(); + float num2 = (float) Main.rand.Next(5, 10); + for (int index1 = 0; (double) index1 < (double) num2; ++index1) + { + int num3 = Main.rand.Next(5, 22); + Vector2 vector2 = ((float) (((double) index1 - (double) num2 / 2.0) * 6.28318548202515 / 256.0 - 1.57079637050629)).ToRotationVector2() * new Vector2(5f, 1f) * (float) (0.25 + (double) Main.rand.NextFloat() * 0.0500000007450581); + Color rgb = Main.hslToRgb((float) (((double) num1 + (double) index1 / (double) num2) % 1.0), 0.7f, 0.7f); + rgb.A = (byte) 127; + for (int index2 = 0; index2 < num3; ++index2) + { + Dust dust = Dust.NewDustPerfect(Center + new Vector2((float) index1 - num2 / 2f, 0.0f) * 2f, 278, new Vector2?(vector2)); + dust.fadeIn = 0.7f; + dust.scale = 0.7f; + dust.noGravity = true; + dust.position.Y += -1f; + dust.velocity *= (float) index2; + dust.scale += (float) (0.200000002980232 - (double) index2 * 0.0299999993294477); + dust.velocity += Main.rand.NextVector2Circular(0.05f, 0.05f); + dust.color = rgb; + } + } + for (float num4 = 0.0f; (double) num4 < 1.0; num4 += 0.2f) + { + Dust dust = Dust.NewDustPerfect(Center, 278, new Vector2?((num4 * 6.283185f).ToRotationVector2() * new Vector2(1f, 0.5f))); + dust.fadeIn = 1.2f; + dust.noGravity = true; + dust.velocity.X *= 0.7f; + dust.velocity.Y -= 0.5f; + dust.position.Y += 8f; + dust.velocity.X *= 2f; + dust.color = Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.3f); + } + float num5 = Main.rand.NextFloatDirection(); + for (float num6 = 0.0f; (double) num6 < 1.0; num6 += 0.15f) + { + Dust dust = Dust.NewDustPerfect(Center, 278, new Vector2?((num5 + num6 * 6.283185f).ToRotationVector2() * 4f)); + dust.fadeIn = 1.5f; + dust.velocity *= (float) (0.5 + (double) num6 * 0.800000011920929); + dust.noGravity = true; + dust.velocity.X *= 0.35f; + dust.velocity.Y *= 2f; + --dust.velocity.Y; + dust.velocity.Y = -Math.Abs(dust.velocity.Y); + dust.position += dust.velocity * 3f; + dust.color = Main.hslToRgb(Main.rand.NextFloat(), 1f, (float) (0.600000023841858 + (double) Main.rand.NextFloat() * 0.200000002980232)); + } + } + + private static void EmitGolfballExplosion_v1(Vector2 Center) + { + for (float num = 0.0f; (double) num < 1.0; num += 0.085f) + { + Dust dust = Dust.NewDustPerfect(Center, 278, new Vector2?((num * 6.283185f).ToRotationVector2() * new Vector2(2f, 0.5f))); + dust.fadeIn = 1.2f; + dust.noGravity = true; + dust.velocity.X *= 0.7f; + dust.velocity.Y -= 1.5f; + dust.position.Y += 8f; + dust.color = Color.Lerp(Color.Silver, Color.White, 0.5f); + } + for (float num = 0.0f; (double) num < 1.0; num += 0.2f) + { + Dust dust = Dust.NewDustPerfect(Center, 278, new Vector2?((num * 6.283185f).ToRotationVector2() * new Vector2(1f, 0.5f))); + dust.fadeIn = 1.2f; + dust.noGravity = true; + dust.velocity.X *= 0.7f; + dust.velocity.Y -= 0.5f; + dust.position.Y += 8f; + dust.color = Color.Lerp(Color.Silver, Color.White, 0.5f); + } + float num1 = Main.rand.NextFloatDirection(); + for (float num2 = 0.0f; (double) num2 < 1.0; num2 += 0.15f) + { + Dust dust = Dust.NewDustPerfect(Center, 278, new Vector2?((num1 + num2 * 6.283185f).ToRotationVector2() * 4f)); + dust.fadeIn = 1.5f; + dust.velocity *= (float) (0.5 + (double) num2 * 0.800000011920929); + dust.noGravity = true; + dust.velocity.X *= 0.35f; + dust.velocity.Y *= 2f; + --dust.velocity.Y; + dust.velocity.Y = -Math.Abs(dust.velocity.Y); + dust.position += dust.velocity * 3f; + dust.color = Color.Lerp(Color.Silver, Color.White, 0.5f); + } + } + } + } +} diff --git a/GameContent/Golf/GolfState.cs b/GameContent/Golf/GolfState.cs new file mode 100644 index 0000000..65832fd --- /dev/null +++ b/GameContent/Golf/GolfState.cs @@ -0,0 +1,111 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Golf.GolfState +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.ID; + +namespace Terraria.GameContent.Golf +{ + public class GolfState + { + private const int BALL_RETURN_PENALTY = 1; + private int golfScoreTime; + private int golfScoreTimeMax = 3600; + private int golfScoreDelay = 90; + private double _lastRecordedBallTime; + private Vector2? _lastRecordedBallLocation; + private bool _waitingForBallToSettle; + private Vector2 _lastSwingPosition; + private Projectile _lastHitGolfBall; + private int _lastRecordedSwingCount; + private GolfBallTrackRecord[] _hitRecords = new GolfBallTrackRecord[1000]; + + private void UpdateScoreTime() + { + if (this.golfScoreTime >= this.golfScoreTimeMax) + return; + ++this.golfScoreTime; + } + + public void ResetScoreTime() => this.golfScoreTime = 0; + + public void SetScoreTime() => this.golfScoreTime = this.golfScoreTimeMax; + + public float ScoreAdjustment => (float) this.golfScoreTime / (float) this.golfScoreTimeMax; + + public bool ShouldScoreHole => this.golfScoreTime >= this.golfScoreDelay; + + public bool IsTrackingBall => this.GetLastHitBall() != null && this._waitingForBallToSettle; + + public bool ShouldCameraTrackBallLastKnownLocation => this._lastRecordedBallTime + 2.0 >= Main.gameTimeCache.TotalGameTime.TotalSeconds && this.GetLastHitBall() == null; + + public Vector2? GetLastBallLocation() => this._lastRecordedBallLocation; + + public void CancelBallTracking() => this._waitingForBallToSettle = false; + + public void RecordSwing(Projectile golfBall) + { + this._lastSwingPosition = golfBall.position; + this._lastHitGolfBall = golfBall; + this._lastRecordedSwingCount = (int) golfBall.ai[1]; + this._waitingForBallToSettle = true; + int golfBallId = this.GetGolfBallId(golfBall); + if (this._hitRecords[golfBallId] == null || this._lastRecordedSwingCount == 1) + this._hitRecords[golfBallId] = new GolfBallTrackRecord(); + this._hitRecords[golfBallId].RecordHit(golfBall.position); + } + + private int GetGolfBallId(Projectile golfBall) => golfBall.whoAmI; + + public Projectile GetLastHitBall() => this._lastHitGolfBall == null || !this._lastHitGolfBall.active || !ProjectileID.Sets.IsAGolfBall[this._lastHitGolfBall.type] || this._lastHitGolfBall.owner != Main.myPlayer || this._lastRecordedSwingCount != (int) this._lastHitGolfBall.ai[1] ? (Projectile) null : this._lastHitGolfBall; + + public void Update() + { + this.UpdateScoreTime(); + Projectile lastHitBall = this.GetLastHitBall(); + if (lastHitBall == null) + { + this._waitingForBallToSettle = false; + } + else + { + if (this._waitingForBallToSettle) + this._waitingForBallToSettle = (int) lastHitBall.localAI[1] == 1; + if (Item.IsAGolfingItem(Main.LocalPlayer.HeldItem)) + return; + this._waitingForBallToSettle = false; + } + } + + public void RecordBallInfo(Projectile golfBall) + { + if (this.GetLastHitBall() != golfBall || !this._waitingForBallToSettle) + return; + this._lastRecordedBallLocation = new Vector2?(golfBall.Center); + this._lastRecordedBallTime = Main.gameTimeCache.TotalGameTime.TotalSeconds; + } + + public void LandBall(Projectile golfBall) => this._hitRecords[this.GetGolfBallId(golfBall)]?.RecordHit(golfBall.position); + + public int GetGolfBallScore(Projectile golfBall) + { + GolfBallTrackRecord hitRecord = this._hitRecords[this.GetGolfBallId(golfBall)]; + return hitRecord == null ? 0 : (int) ((double) hitRecord.GetAccumulatedScore() * (double) this.ScoreAdjustment); + } + + public void ResetGolfBall() + { + Projectile lastHitBall = this.GetLastHitBall(); + if (lastHitBall == null || (double) Vector2.Distance(lastHitBall.position, this._lastSwingPosition) < 1.0) + return; + lastHitBall.position = this._lastSwingPosition; + lastHitBall.velocity = Vector2.Zero; + ++lastHitBall.ai[1]; + lastHitBall.netUpdate2 = true; + this._lastRecordedSwingCount = (int) lastHitBall.ai[1]; + } + } +} diff --git a/GameContent/HairstyleUnlocksHelper.cs b/GameContent/HairstyleUnlocksHelper.cs new file mode 100644 index 0000000..914eaf7 --- /dev/null +++ b/GameContent/HairstyleUnlocksHelper.cs @@ -0,0 +1,102 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.HairstyleUnlocksHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent +{ + public class HairstyleUnlocksHelper + { + public List AvailableHairstyles = new List(); + private bool _defeatedMartians; + private bool _defeatedMoonlord; + private bool _isAtStylist; + private bool _isAtCharacterCreation; + + public void UpdateUnlocks() + { + if (!this.ListWarrantsRemake()) + return; + this.RebuildList(); + } + + private bool ListWarrantsRemake() + { + bool flag1 = NPC.downedMartians && !Main.gameMenu; + bool flag2 = NPC.downedMoonlord && !Main.gameMenu; + bool flag3 = Main.hairWindow && !Main.gameMenu; + bool gameMenu = Main.gameMenu; + bool flag4 = false; + if (this._defeatedMartians != flag1 || this._defeatedMoonlord != flag2 || this._isAtStylist != flag3 || this._isAtCharacterCreation != gameMenu) + flag4 = true; + this._defeatedMartians = flag1; + this._defeatedMoonlord = flag2; + this._isAtStylist = flag3; + this._isAtCharacterCreation = gameMenu; + return flag4; + } + + private void RebuildList() + { + List availableHairstyles = this.AvailableHairstyles; + availableHairstyles.Clear(); + if (this._isAtCharacterCreation || this._isAtStylist) + { + for (int index = 0; index < 51; ++index) + availableHairstyles.Add(index); + availableHairstyles.Add(136); + availableHairstyles.Add(137); + availableHairstyles.Add(138); + availableHairstyles.Add(139); + availableHairstyles.Add(140); + availableHairstyles.Add(141); + availableHairstyles.Add(142); + availableHairstyles.Add(143); + availableHairstyles.Add(144); + availableHairstyles.Add(147); + availableHairstyles.Add(148); + availableHairstyles.Add(149); + availableHairstyles.Add(150); + availableHairstyles.Add(151); + availableHairstyles.Add(154); + availableHairstyles.Add(155); + availableHairstyles.Add(157); + availableHairstyles.Add(158); + availableHairstyles.Add(161); + } + if (!this._isAtStylist) + return; + for (int index = 51; index < 123; ++index) + availableHairstyles.Add(index); + availableHairstyles.Add(134); + availableHairstyles.Add(135); + availableHairstyles.Add(145); + availableHairstyles.Add(146); + availableHairstyles.Add(152); + availableHairstyles.Add(153); + availableHairstyles.Add(156); + availableHairstyles.Add(159); + availableHairstyles.Add(160); + if (this._defeatedMartians) + availableHairstyles.AddRange((IEnumerable) new int[10] + { + 132, + 131, + 130, + 129, + 128, + (int) sbyte.MaxValue, + 126, + 125, + 124, + 123 + }); + if (!this._defeatedMartians || !this._defeatedMoonlord) + return; + availableHairstyles.Add(133); + } + } +} diff --git a/GameContent/INeedRenderTargetContent.cs b/GameContent/INeedRenderTargetContent.cs new file mode 100644 index 0000000..26a0e53 --- /dev/null +++ b/GameContent/INeedRenderTargetContent.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.INeedRenderTargetContent +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.GameContent +{ + public interface INeedRenderTargetContent + { + bool IsReady { get; } + + void PrepareRenderTarget(GraphicsDevice device, SpriteBatch spriteBatch); + } +} diff --git a/GameContent/IOnPlayerJoining.cs b/GameContent/IOnPlayerJoining.cs new file mode 100644 index 0000000..2e087e1 --- /dev/null +++ b/GameContent/IOnPlayerJoining.cs @@ -0,0 +1,13 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.IOnPlayerJoining +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent +{ + public interface IOnPlayerJoining + { + void OnPlayerJoining(int playerIndex); + } +} diff --git a/GameContent/IPersistentPerPlayerContent.cs b/GameContent/IPersistentPerPlayerContent.cs new file mode 100644 index 0000000..bcc1d3e --- /dev/null +++ b/GameContent/IPersistentPerPlayerContent.cs @@ -0,0 +1,23 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.IPersistentPerPlayerContent +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; + +namespace Terraria.GameContent +{ + public interface IPersistentPerPlayerContent + { + void Save(Player player, BinaryWriter writer); + + void Load(Player player, BinaryReader reader, int gameVersionSaveWasMadeOn); + + void ApplyLoadedDataToOutOfPlayerFields(Player player); + + void ResetDataForNewPlayer(Player player); + + void Reset(); + } +} diff --git a/GameContent/IPersistentPerWorldContent.cs b/GameContent/IPersistentPerWorldContent.cs new file mode 100644 index 0000000..33549d8 --- /dev/null +++ b/GameContent/IPersistentPerWorldContent.cs @@ -0,0 +1,21 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.IPersistentPerWorldContent +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; + +namespace Terraria.GameContent +{ + public interface IPersistentPerWorldContent + { + void Save(BinaryWriter writer); + + void Load(BinaryReader reader, int gameVersionSaveWasMadeOn); + + void ValidateWorld(BinaryReader reader, int gameVersionSaveWasMadeOn); + + void Reset(); + } +} diff --git a/GameContent/ITownNPCProfile.cs b/GameContent/ITownNPCProfile.cs new file mode 100644 index 0000000..1cc323a --- /dev/null +++ b/GameContent/ITownNPCProfile.cs @@ -0,0 +1,22 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ITownNPCProfile +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; + +namespace Terraria.GameContent +{ + public interface ITownNPCProfile + { + int RollVariation(); + + string GetNameForVariant(NPC npc); + + Asset GetTextureNPCShouldUse(NPC npc); + + int GetHeadTextureIndex(NPC npc); + } +} diff --git a/GameContent/ItemDropRules/Chains.cs b/GameContent/ItemDropRules/Chains.cs new file mode 100644 index 0000000..c10be1b --- /dev/null +++ b/GameContent/ItemDropRules/Chains.cs @@ -0,0 +1,125 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.Chains +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.ItemDropRules +{ + public static class Chains + { + public static void ReportDroprates( + List ChainedRules, + float personalDropRate, + List drops, + DropRateInfoChainFeed ratesInfo) + { + foreach (IItemDropRuleChainAttempt chainedRule in ChainedRules) + chainedRule.ReportDroprates(personalDropRate, drops, ratesInfo); + } + + public static IItemDropRule OnFailedRoll( + this IItemDropRule rule, + IItemDropRule ruleToChain, + bool hideLootReport = false) + { + rule.ChainedRules.Add((IItemDropRuleChainAttempt) new Chains.TryIfFailedRandomRoll(ruleToChain, hideLootReport)); + return ruleToChain; + } + + public static IItemDropRule OnSuccess( + this IItemDropRule rule, + IItemDropRule ruleToChain, + bool hideLootReport = false) + { + rule.ChainedRules.Add((IItemDropRuleChainAttempt) new Chains.TryIfSucceeded(ruleToChain, hideLootReport)); + return ruleToChain; + } + + public static IItemDropRule OnFailedConditions( + this IItemDropRule rule, + IItemDropRule ruleToChain, + bool hideLootReport = false) + { + rule.ChainedRules.Add((IItemDropRuleChainAttempt) new Chains.TryIfDoesntFillConditions(ruleToChain, hideLootReport)); + return ruleToChain; + } + + public class TryIfFailedRandomRoll : IItemDropRuleChainAttempt + { + private bool _hideLootReport; + + public IItemDropRule RuleToChain { get; private set; } + + public TryIfFailedRandomRoll(IItemDropRule rule, bool hideLootReport = false) + { + this.RuleToChain = rule; + this._hideLootReport = hideLootReport; + } + + public bool CanChainIntoRule(ItemDropAttemptResult parentResult) => parentResult.State == ItemDropAttemptResultState.FailedRandomRoll; + + public void ReportDroprates( + float personalDropRate, + List drops, + DropRateInfoChainFeed ratesInfo) + { + if (this._hideLootReport) + return; + this.RuleToChain.ReportDroprates(drops, ratesInfo.With(1f - personalDropRate)); + } + } + + public class TryIfSucceeded : IItemDropRuleChainAttempt + { + private bool _hideLootReport; + + public IItemDropRule RuleToChain { get; private set; } + + public TryIfSucceeded(IItemDropRule rule, bool hideLootReport = false) + { + this.RuleToChain = rule; + this._hideLootReport = hideLootReport; + } + + public bool CanChainIntoRule(ItemDropAttemptResult parentResult) => parentResult.State == ItemDropAttemptResultState.Success; + + public void ReportDroprates( + float personalDropRate, + List drops, + DropRateInfoChainFeed ratesInfo) + { + if (this._hideLootReport) + return; + this.RuleToChain.ReportDroprates(drops, ratesInfo.With(personalDropRate)); + } + } + + public class TryIfDoesntFillConditions : IItemDropRuleChainAttempt + { + private bool _hideLootReport; + + public IItemDropRule RuleToChain { get; private set; } + + public TryIfDoesntFillConditions(IItemDropRule rule, bool hideLootReport = false) + { + this.RuleToChain = rule; + this._hideLootReport = hideLootReport; + } + + public bool CanChainIntoRule(ItemDropAttemptResult parentResult) => parentResult.State == ItemDropAttemptResultState.DoesntFillConditions; + + public void ReportDroprates( + float personalDropRate, + List drops, + DropRateInfoChainFeed ratesInfo) + { + if (this._hideLootReport) + return; + this.RuleToChain.ReportDroprates(drops, ratesInfo.With(personalDropRate)); + } + } + } +} diff --git a/GameContent/ItemDropRules/CommonCode.cs b/GameContent/ItemDropRules/CommonCode.cs new file mode 100644 index 0000000..74334a4 --- /dev/null +++ b/GameContent/ItemDropRules/CommonCode.cs @@ -0,0 +1,117 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.CommonCode +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.Utilities; + +namespace Terraria.GameContent.ItemDropRules +{ + public static class CommonCode + { + public static void DropItemFromNPC(NPC npc, int itemId, int stack, bool scattered = false) + { + if (itemId <= 0 || itemId >= 5045) + return; + int X = (int) npc.position.X + npc.width / 2; + int Y = (int) npc.position.Y + npc.height / 2; + if (scattered) + { + X = (int) npc.position.X + Main.rand.Next(npc.width + 1); + Y = (int) npc.position.Y + Main.rand.Next(npc.height + 1); + } + int itemIndex = Item.NewItem(X, Y, 0, 0, itemId, stack, pfix: -1); + CommonCode.ModifyItemDropFromNPC(npc, itemIndex); + } + + public static void DropItemLocalPerClientAndSetNPCMoneyTo0( + NPC npc, + int itemId, + int stack, + bool interactionRequired = true) + { + if (itemId <= 0 || itemId >= 5045) + return; + if (Main.netMode == 2) + { + int number = Item.NewItem((int) npc.position.X, (int) npc.position.Y, npc.width, npc.height, itemId, stack, true, -1); + Main.timeItemSlotCannotBeReusedFor[number] = 54000; + for (int remoteClient = 0; remoteClient < (int) byte.MaxValue; ++remoteClient) + { + if (Main.player[remoteClient].active && (npc.playerInteraction[remoteClient] || !interactionRequired)) + NetMessage.SendData(90, remoteClient, number: number); + } + Main.item[number].active = false; + } + else + CommonCode.DropItemFromNPC(npc, itemId, stack); + npc.value = 0.0f; + } + + public static void DropItemForEachInteractingPlayerOnThePlayer( + NPC npc, + int itemId, + UnifiedRandom rng, + int dropsAtXOutOfY_TheX, + int dropsAtXOutOfY_TheY, + int stack = 1, + bool interactionRequired = true) + { + if (itemId <= 0 || itemId >= 5045) + return; + if (Main.netMode == 2) + { + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + Player player = Main.player[index]; + if (player.active && (npc.playerInteraction[index] || !interactionRequired) && rng.Next(dropsAtXOutOfY_TheY) < dropsAtXOutOfY_TheX) + { + int itemIndex = Item.NewItem(player.position, player.Size, itemId, stack, prefixGiven: -1); + CommonCode.ModifyItemDropFromNPC(npc, itemIndex); + } + } + } + else if (rng.Next(dropsAtXOutOfY_TheY) < dropsAtXOutOfY_TheX) + CommonCode.DropItemFromNPC(npc, itemId, stack); + npc.value = 0.0f; + } + + private static void ModifyItemDropFromNPC(NPC npc, int itemIndex) + { + Item obj = Main.item[itemIndex]; + switch (obj.type) + { + case 23: + if (npc.type != 1 || npc.netID == -1 || npc.netID == -2 || npc.netID == -5 || npc.netID == -6) + break; + obj.color = npc.color; + NetMessage.SendData(88, number: itemIndex, number2: 1f); + break; + case 319: + switch (npc.netID) + { + case 542: + obj.color = new Color(189, 148, 96, (int) byte.MaxValue); + NetMessage.SendData(88, number: itemIndex, number2: 1f); + return; + case 543: + obj.color = new Color(112, 85, 89, (int) byte.MaxValue); + NetMessage.SendData(88, number: itemIndex, number2: 1f); + return; + case 544: + obj.color = new Color(145, 27, 40, (int) byte.MaxValue); + NetMessage.SendData(88, number: itemIndex, number2: 1f); + return; + case 545: + obj.color = new Color(158, 113, 164, (int) byte.MaxValue); + NetMessage.SendData(88, number: itemIndex, number2: 1f); + return; + default: + return; + } + } + } + } +} diff --git a/GameContent/ItemDropRules/CommonDrop.cs b/GameContent/ItemDropRules/CommonDrop.cs new file mode 100644 index 0000000..359fc8f --- /dev/null +++ b/GameContent/ItemDropRules/CommonDrop.cs @@ -0,0 +1,62 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.CommonDrop +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.ItemDropRules +{ + public class CommonDrop : IItemDropRule + { + protected int _itemId; + protected int _dropsOutOfY; + protected int _amtDroppedMinimum; + protected int _amtDroppedMaximum; + protected int _dropsXoutOfY; + + public List ChainedRules { get; private set; } + + public CommonDrop( + int itemId, + int dropsOutOfY, + int amountDroppedMinimum = 1, + int amountDroppedMaximum = 1, + int dropsXOutOfY = 1) + { + this._itemId = itemId; + this._dropsOutOfY = dropsOutOfY; + this._amtDroppedMinimum = amountDroppedMinimum; + this._amtDroppedMaximum = amountDroppedMaximum; + this._dropsXoutOfY = dropsXOutOfY; + this.ChainedRules = new List(); + } + + public virtual bool CanDrop(DropAttemptInfo info) => true; + + public virtual ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info) + { + if (info.player.RollLuck(this._dropsOutOfY) < this._dropsXoutOfY) + { + CommonCode.DropItemFromNPC(info.npc, this._itemId, info.rng.Next(this._amtDroppedMinimum, this._amtDroppedMaximum + 1)); + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.Success + }; + } + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.FailedRandomRoll + }; + } + + public virtual void ReportDroprates(List drops, DropRateInfoChainFeed ratesInfo) + { + float personalDropRate = (float) this._dropsXoutOfY / (float) this._dropsOutOfY; + float dropRate = personalDropRate * ratesInfo.parentDroprateChance; + drops.Add(new DropRateInfo(this._itemId, this._amtDroppedMinimum, this._amtDroppedMaximum, dropRate, ratesInfo.conditions)); + Chains.ReportDroprates(this.ChainedRules, personalDropRate, drops, ratesInfo); + } + } +} diff --git a/GameContent/ItemDropRules/CommonDropNotScalingWithLuck.cs b/GameContent/ItemDropRules/CommonDropNotScalingWithLuck.cs new file mode 100644 index 0000000..5861f2f --- /dev/null +++ b/GameContent/ItemDropRules/CommonDropNotScalingWithLuck.cs @@ -0,0 +1,36 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.CommonDropNotScalingWithLuck +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.ItemDropRules +{ + public class CommonDropNotScalingWithLuck : CommonDrop + { + public CommonDropNotScalingWithLuck( + int itemId, + int dropsOutOfY, + int amountDroppedMinimum, + int amountDroppedMaximum) + : base(itemId, dropsOutOfY, amountDroppedMinimum, amountDroppedMaximum) + { + } + + public override ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info) + { + if (info.rng.Next(this._dropsOutOfY) < this._dropsXoutOfY) + { + CommonCode.DropItemFromNPC(info.npc, this._itemId, info.rng.Next(this._amtDroppedMinimum, this._amtDroppedMaximum + 1)); + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.Success + }; + } + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.FailedRandomRoll + }; + } + } +} diff --git a/GameContent/ItemDropRules/CommonDropWithRerolls.cs b/GameContent/ItemDropRules/CommonDropWithRerolls.cs new file mode 100644 index 0000000..772b71b --- /dev/null +++ b/GameContent/ItemDropRules/CommonDropWithRerolls.cs @@ -0,0 +1,57 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.CommonDropWithRerolls +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.ItemDropRules +{ + public class CommonDropWithRerolls : CommonDrop + { + private int _timesToRoll; + + public CommonDropWithRerolls( + int itemId, + int dropsOutOfY, + int amountDroppedMinimum, + int amountDroppedMaximum, + int rerolls) + : base(itemId, dropsOutOfY, amountDroppedMinimum, amountDroppedMaximum) + { + this._timesToRoll = rerolls + 1; + } + + public override ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info) + { + bool flag = false; + for (int index = 0; index < this._timesToRoll; ++index) + flag = flag || info.player.RollLuck(this._dropsOutOfY) < this._dropsXoutOfY; + if (flag) + { + CommonCode.DropItemFromNPC(info.npc, this._itemId, info.rng.Next(this._amtDroppedMinimum, this._amtDroppedMaximum + 1)); + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.Success + }; + } + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.FailedRandomRoll + }; + } + + public override void ReportDroprates(List drops, DropRateInfoChainFeed ratesInfo) + { + float num1 = 1f - (float) this._dropsXoutOfY / (float) this._dropsOutOfY; + float num2 = 1f; + for (int index = 0; index < this._timesToRoll; ++index) + num2 *= num1; + float personalDropRate = 1f - num2; + float dropRate = personalDropRate * ratesInfo.parentDroprateChance; + drops.Add(new DropRateInfo(this._itemId, this._amtDroppedMinimum, this._amtDroppedMaximum, dropRate, ratesInfo.conditions)); + Chains.ReportDroprates(this.ChainedRules, personalDropRate, drops, ratesInfo); + } + } +} diff --git a/GameContent/ItemDropRules/Conditions.cs b/GameContent/ItemDropRules/Conditions.cs new file mode 100644 index 0000000..4e246d7 --- /dev/null +++ b/GameContent/ItemDropRules/Conditions.cs @@ -0,0 +1,576 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.Conditions +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.Localization; + +namespace Terraria.GameContent.ItemDropRules +{ + public class Conditions + { + private static bool SoulOfWhateverConditionCanDrop(DropAttemptInfo info) + { + if (info.npc.boss) + return false; + switch (info.npc.type) + { + case 1: + case 13: + case 14: + case 15: + case 121: + case 535: + return false; + default: + return Main.hardMode && info.npc.lifeMax > 1 && !info.npc.friendly && (double) info.npc.position.Y > Main.rockLayer * 16.0 && (double) info.npc.value >= 1.0; + } + } + + public class NeverTrue : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => false; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => (string) null; + } + + public class IsUsingSpecificAIValues : IItemDropRuleCondition, IProvideItemConditionDescription + { + private int _aiSlotToCheck; + private float _valueToMatch; + + public IsUsingSpecificAIValues(int aislot, float valueToMatch) + { + this._aiSlotToCheck = aislot; + this._valueToMatch = valueToMatch; + } + + public bool CanDrop(DropAttemptInfo info) => (double) info.npc.ai[this._aiSlotToCheck] == (double) this._valueToMatch; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => (string) null; + } + + public class FrostMoonDropGatingChance : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) + { + if (!Main.snowMoon) + return false; + int waveNumber = NPC.waveNumber; + if (Main.expertMode) + waveNumber += 7; + int range = (int) ((double) (30 - waveNumber) / 2.5); + if (Main.expertMode) + range -= 2; + if (range < 1) + range = 1; + return info.player.RollLuck(range) == 0; + } + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => (string) null; + } + + public class PumpkinMoonDropGatingChance : + IItemDropRuleCondition, + IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) + { + if (!Main.pumpkinMoon) + return false; + int waveNumber = NPC.waveNumber; + if (Main.expertMode) + waveNumber += 6; + int range = (int) ((double) (17 - waveNumber) / 1.25); + if (Main.expertMode) + --range; + if (range < 1) + range = 1; + return info.player.RollLuck(range) == 0; + } + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => (string) null; + } + + public class FrostMoonDropGateForTrophies : + IItemDropRuleCondition, + IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) + { + if (!Main.snowMoon) + return false; + int waveNumber = NPC.waveNumber; + if (NPC.waveNumber < 15) + return false; + int maxValue = 4; + if (waveNumber == 16) + maxValue = 4; + if (waveNumber == 17) + maxValue = 3; + if (waveNumber == 18) + maxValue = 3; + if (waveNumber == 19) + maxValue = 2; + if (waveNumber >= 20) + maxValue = 2; + if (Main.expertMode && Main.rand.Next(3) == 0) + --maxValue; + return info.rng.Next(maxValue) == 0; + } + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => (string) null; + } + + public class IsPumpkinMoon : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => Main.pumpkinMoon; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => (string) null; + } + + public class FromCertainWaveAndAbove : IItemDropRuleCondition, IProvideItemConditionDescription + { + private int _neededWave; + + public FromCertainWaveAndAbove(int neededWave) => this._neededWave = neededWave; + + public bool CanDrop(DropAttemptInfo info) => NPC.waveNumber >= this._neededWave; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => (string) null; + } + + public class IsBloodMoonAndNotFromStatue : + IItemDropRuleCondition, + IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => !Main.dayTime && Main.bloodMoon && !info.npc.SpawnedFromStatue && !info.IsInSimulation; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => (string) null; + } + + public class DownedAllMechBosses : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => (string) null; + } + + public class DownedPlantera : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => NPC.downedPlantBoss; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => (string) null; + } + + public class FirstTimeKillingPlantera : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => !NPC.downedPlantBoss; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => (string) null; + } + + public class MechanicalBossesDummyCondition : + IItemDropRuleCondition, + IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => true; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => (string) null; + } + + public class PirateMap : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => (double) info.npc.value > 0.0 && Main.hardMode && (double) info.npc.position.Y / 16.0 < Main.worldSurface + 10.0 && ((double) info.npc.Center.X / 16.0 < 380.0 || (double) info.npc.Center.X / 16.0 > (double) (Main.maxTilesX - 380)) && !info.IsInSimulation; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.PirateMap"); + } + + public class IsChristmas : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => Main.xMas; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.IsChristmas"); + } + + public class NotExpert : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => !Main.expertMode; + + public bool CanShowItemDropInUI() => !Main.expertMode; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.NotExpert"); + } + + public class NotMasterMode : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => !Main.masterMode; + + public bool CanShowItemDropInUI() => !Main.masterMode; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.NotMasterMode"); + } + + public class MissingTwin : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) + { + int Type = 125; + if (info.npc.type == 125) + Type = 126; + return !NPC.AnyNPCs(Type); + } + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => (string) null; + } + + public class EmpressOfLightIsGenuinelyEnraged : + IItemDropRuleCondition, + IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => info.npc.AI_120_HallowBoss_IsGenuinelyEnraged(); + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.EmpressOfLightOnlyTookDamageWhileEnraged"); + } + + public class PlayerNeedsHealing : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => info.player.statLife < info.player.statLifeMax2; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.PlayerNeedsHealing"); + } + + public class LegacyHack_IsBossAndExpert : + IItemDropRuleCondition, + IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => info.npc.boss && Main.expertMode; + + public bool CanShowItemDropInUI() => Main.expertMode; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.LegacyHack_IsBossAndExpert"); + } + + public class LegacyHack_IsBossAndNotExpert : + IItemDropRuleCondition, + IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => info.npc.boss && !Main.expertMode; + + public bool CanShowItemDropInUI() => !Main.expertMode; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.LegacyHack_IsBossAndNotExpert"); + } + + public class LegacyHack_IsABoss : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => info.npc.boss; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => (string) null; + } + + public class IsExpert : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => Main.expertMode; + + public bool CanShowItemDropInUI() => Main.expertMode; + + public string GetConditionDescription() => Main.masterMode ? Language.GetTextValue("Bestiary_ItemDropConditions.IsMasterMode") : Language.GetTextValue("Bestiary_ItemDropConditions.IsExpert"); + } + + public class IsMasterMode : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => Main.masterMode; + + public bool CanShowItemDropInUI() => Main.masterMode; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.IsMasterMode"); + } + + public class IsCrimson : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => WorldGen.crimson; + + public bool CanShowItemDropInUI() => WorldGen.crimson; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.IsCrimson"); + } + + public class IsCorruption : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => !WorldGen.crimson; + + public bool CanShowItemDropInUI() => !WorldGen.crimson; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.IsCorruption"); + } + + public class IsCrimsonAndNotExpert : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => WorldGen.crimson && !Main.expertMode; + + public bool CanShowItemDropInUI() => WorldGen.crimson && !Main.expertMode; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.IsCrimsonAndNotExpert"); + } + + public class IsCorruptionAndNotExpert : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => !WorldGen.crimson && !Main.expertMode; + + public bool CanShowItemDropInUI() => !WorldGen.crimson && !Main.expertMode; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.IsCorruptionAndNotExpert"); + } + + public class HalloweenWeapons : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) + { + float num1 = 500f * Main.GameModeInfo.EnemyMoneyDropMultiplier; + float num2 = 40f * Main.GameModeInfo.EnemyDamageMultiplier; + float num3 = 20f * Main.GameModeInfo.EnemyDefenseMultiplier; + return Main.halloween && (double) info.npc.value > 0.0 && (double) info.npc.value < (double) num1 && (double) info.npc.damage < (double) num2 && (double) info.npc.defense < (double) num3 && !info.IsInSimulation; + } + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.HalloweenWeapons"); + } + + public class SoulOfNight : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) + { + if (!Conditions.SoulOfWhateverConditionCanDrop(info)) + return false; + return info.player.ZoneCorrupt || info.player.ZoneCrimson; + } + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.SoulOfNight"); + } + + public class SoulOfLight : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => Conditions.SoulOfWhateverConditionCanDrop(info) && info.player.ZoneHallow; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.SoulOfLight"); + } + + public class NotFromStatue : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => !info.npc.SpawnedFromStatue; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.NotFromStatue"); + } + + public class HalloweenGoodieBagDrop : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => Main.halloween && info.npc.lifeMax > 1 && info.npc.damage > 0 && !info.npc.friendly && info.npc.type != 121 && info.npc.type != 23 && (double) info.npc.value > 0.0 && !info.IsInSimulation; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.HalloweenGoodieBagDrop"); + } + + public class XmasPresentDrop : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => Main.xMas && info.npc.lifeMax > 1 && info.npc.damage > 0 && !info.npc.friendly && info.npc.type != 121 && info.npc.type != 23 && (double) info.npc.value > 0.0 && !info.IsInSimulation; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.XmasPresentDrop"); + } + + public class LivingFlames : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => info.npc.lifeMax > 5 && (double) info.npc.value > 0.0 && !info.npc.friendly && Main.hardMode && (double) info.npc.position.Y / 16.0 > (double) Main.UnderworldLayer && !info.IsInSimulation; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.LivingFlames"); + } + + public class NamedNPC : IItemDropRuleCondition, IProvideItemConditionDescription + { + private string _neededName; + + public NamedNPC(string neededName) => this._neededName = neededName; + + public bool CanDrop(DropAttemptInfo info) => info.npc.GivenOrTypeName == this._neededName; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.NamedNPC"); + } + + public class HallowKeyCondition : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => (double) info.npc.value > 0.0 && Main.hardMode && !info.IsInSimulation && info.player.ZoneHallow; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.HallowKeyCondition"); + } + + public class JungleKeyCondition : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => (double) info.npc.value > 0.0 && Main.hardMode && !info.IsInSimulation && info.player.ZoneJungle; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.JungleKeyCondition"); + } + + public class CorruptKeyCondition : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => (double) info.npc.value > 0.0 && Main.hardMode && !info.IsInSimulation && info.player.ZoneCorrupt; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.CorruptKeyCondition"); + } + + public class CrimsonKeyCondition : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => (double) info.npc.value > 0.0 && Main.hardMode && !info.IsInSimulation && info.player.ZoneCrimson; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.CrimsonKeyCondition"); + } + + public class FrozenKeyCondition : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => (double) info.npc.value > 0.0 && Main.hardMode && !info.IsInSimulation && info.player.ZoneSnow; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.FrozenKeyCondition"); + } + + public class DesertKeyCondition : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => (double) info.npc.value > 0.0 && Main.hardMode && !info.IsInSimulation && info.player.ZoneDesert && !info.player.ZoneBeach; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.DesertKeyCondition"); + } + + public class BeatAnyMechBoss : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => NPC.downedMechBossAny; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.BeatAnyMechBoss"); + } + + public class YoyoCascade : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => !Main.hardMode && info.npc.HasPlayerTarget && info.npc.lifeMax > 5 && !info.npc.friendly && (double) info.npc.position.Y / 16.0 > (double) (Main.maxTilesY - 350) && NPC.downedBoss3 && !info.IsInSimulation; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.YoyoCascade"); + } + + public class YoyosAmarok : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => Main.hardMode && info.npc.HasPlayerTarget && info.player.ZoneSnow && info.npc.lifeMax > 5 && !info.npc.friendly && (double) info.npc.value > 0.0 && !info.IsInSimulation; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.YoyosAmarok"); + } + + public class YoyosYelets : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => Main.hardMode && info.player.ZoneJungle && NPC.downedMechBossAny && info.npc.lifeMax > 5 && info.npc.HasPlayerTarget && !info.npc.friendly && (double) info.npc.value > 0.0 && !info.IsInSimulation; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.YoyosYelets"); + } + + public class YoyosKraken : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => Main.hardMode && info.player.ZoneDungeon && NPC.downedPlantBoss && info.npc.lifeMax > 5 && info.npc.HasPlayerTarget && !info.npc.friendly && (double) info.npc.value > 0.0 && !info.IsInSimulation; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.YoyosKraken"); + } + + public class YoyosHelFire : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => Main.hardMode && !info.player.ZoneDungeon && (double) info.npc.position.Y / 16.0 > (Main.rockLayer + (double) (Main.maxTilesY * 2)) / 3.0 && info.npc.lifeMax > 5 && info.npc.HasPlayerTarget && !info.npc.friendly && (double) info.npc.value > 0.0 && !info.IsInSimulation; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.YoyosHelFire"); + } + + public class KOCannon : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => Main.hardMode && Main.bloodMoon && (double) info.npc.value > 0.0 && !info.IsInSimulation; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.KOCannon"); + } + + public class WindyEnoughForKiteDrops : IItemDropRuleCondition, IProvideItemConditionDescription + { + public bool CanDrop(DropAttemptInfo info) => Main.WindyEnoughForKiteDrops; + + public bool CanShowItemDropInUI() => true; + + public string GetConditionDescription() => Language.GetTextValue("Bestiary_ItemDropConditions.IsItAHappyWindyDay"); + } + } +} diff --git a/GameContent/ItemDropRules/DropAttemptInfo.cs b/GameContent/ItemDropRules/DropAttemptInfo.cs new file mode 100644 index 0000000..2f71487 --- /dev/null +++ b/GameContent/ItemDropRules/DropAttemptInfo.cs @@ -0,0 +1,20 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.DropAttemptInfo +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.Utilities; + +namespace Terraria.GameContent.ItemDropRules +{ + public struct DropAttemptInfo + { + public NPC npc; + public Player player; + public UnifiedRandom rng; + public bool IsInSimulation; + public bool IsExpertMode; + public bool IsMasterMode; + } +} diff --git a/GameContent/ItemDropRules/DropBasedOnExpertMode.cs b/GameContent/ItemDropRules/DropBasedOnExpertMode.cs new file mode 100644 index 0000000..07cf881 --- /dev/null +++ b/GameContent/ItemDropRules/DropBasedOnExpertMode.cs @@ -0,0 +1,50 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.DropBasedOnExpertMode +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.ItemDropRules +{ + public class DropBasedOnExpertMode : IItemDropRule, INestedItemDropRule + { + private IItemDropRule _ruleForNormalMode; + private IItemDropRule _ruleForExpertMode; + + public List ChainedRules { get; private set; } + + public DropBasedOnExpertMode(IItemDropRule ruleForNormalMode, IItemDropRule ruleForExpertMode) + { + this._ruleForNormalMode = ruleForNormalMode; + this._ruleForExpertMode = ruleForExpertMode; + this.ChainedRules = new List(); + } + + public bool CanDrop(DropAttemptInfo info) => info.IsExpertMode ? this._ruleForExpertMode.CanDrop(info) : this._ruleForNormalMode.CanDrop(info); + + public ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info) => new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.DidNotRunCode + }; + + public ItemDropAttemptResult TryDroppingItem( + DropAttemptInfo info, + ItemDropRuleResolveAction resolveAction) + { + return info.IsExpertMode ? resolveAction(this._ruleForExpertMode, info) : resolveAction(this._ruleForNormalMode, info); + } + + public void ReportDroprates(List drops, DropRateInfoChainFeed ratesInfo) + { + DropRateInfoChainFeed ratesInfo1 = ratesInfo.With(1f); + ratesInfo1.AddCondition((IItemDropRuleCondition) new Conditions.IsExpert()); + this._ruleForExpertMode.ReportDroprates(drops, ratesInfo1); + DropRateInfoChainFeed ratesInfo2 = ratesInfo.With(1f); + ratesInfo2.AddCondition((IItemDropRuleCondition) new Conditions.NotExpert()); + this._ruleForNormalMode.ReportDroprates(drops, ratesInfo2); + Chains.ReportDroprates(this.ChainedRules, 1f, drops, ratesInfo); + } + } +} diff --git a/GameContent/ItemDropRules/DropBasedOnMasterMode.cs b/GameContent/ItemDropRules/DropBasedOnMasterMode.cs new file mode 100644 index 0000000..1e146a0 --- /dev/null +++ b/GameContent/ItemDropRules/DropBasedOnMasterMode.cs @@ -0,0 +1,50 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.DropBasedOnMasterMode +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.ItemDropRules +{ + public class DropBasedOnMasterMode : IItemDropRule, INestedItemDropRule + { + private IItemDropRule _ruleForDefault; + private IItemDropRule _ruleForMasterMode; + + public List ChainedRules { get; private set; } + + public DropBasedOnMasterMode(IItemDropRule ruleForDefault, IItemDropRule ruleForMasterMode) + { + this._ruleForDefault = ruleForDefault; + this._ruleForMasterMode = ruleForMasterMode; + this.ChainedRules = new List(); + } + + public bool CanDrop(DropAttemptInfo info) => info.IsMasterMode ? this._ruleForMasterMode.CanDrop(info) : this._ruleForDefault.CanDrop(info); + + public ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info) => new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.DidNotRunCode + }; + + public ItemDropAttemptResult TryDroppingItem( + DropAttemptInfo info, + ItemDropRuleResolveAction resolveAction) + { + return info.IsMasterMode ? resolveAction(this._ruleForMasterMode, info) : resolveAction(this._ruleForDefault, info); + } + + public void ReportDroprates(List drops, DropRateInfoChainFeed ratesInfo) + { + DropRateInfoChainFeed ratesInfo1 = ratesInfo.With(1f); + ratesInfo1.AddCondition((IItemDropRuleCondition) new Conditions.IsMasterMode()); + this._ruleForMasterMode.ReportDroprates(drops, ratesInfo1); + DropRateInfoChainFeed ratesInfo2 = ratesInfo.With(1f); + ratesInfo2.AddCondition((IItemDropRuleCondition) new Conditions.NotMasterMode()); + this._ruleForDefault.ReportDroprates(drops, ratesInfo2); + Chains.ReportDroprates(this.ChainedRules, 1f, drops, ratesInfo); + } + } +} diff --git a/GameContent/ItemDropRules/DropLocalPerClientAndResetsNPCMoneyTo0.cs b/GameContent/ItemDropRules/DropLocalPerClientAndResetsNPCMoneyTo0.cs new file mode 100644 index 0000000..a735905 --- /dev/null +++ b/GameContent/ItemDropRules/DropLocalPerClientAndResetsNPCMoneyTo0.cs @@ -0,0 +1,42 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.DropLocalPerClientAndResetsNPCMoneyTo0 +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.ItemDropRules +{ + public class DropLocalPerClientAndResetsNPCMoneyTo0 : CommonDrop + { + private IItemDropRuleCondition _condition; + + public DropLocalPerClientAndResetsNPCMoneyTo0( + int itemId, + int dropsOutOfY, + int amountDroppedMinimum, + int amountDroppedMaximum, + IItemDropRuleCondition optionalCondition) + : base(itemId, dropsOutOfY, amountDroppedMinimum, amountDroppedMaximum) + { + this._condition = optionalCondition; + } + + public override bool CanDrop(DropAttemptInfo info) => this._condition == null || this._condition.CanDrop(info); + + public override ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info) + { + if (info.rng.Next(this._dropsOutOfY) < this._dropsXoutOfY) + { + CommonCode.DropItemLocalPerClientAndSetNPCMoneyTo0(info.npc, this._itemId, info.rng.Next(this._amtDroppedMinimum, this._amtDroppedMaximum + 1)); + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.Success + }; + } + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.FailedRandomRoll + }; + } + } +} diff --git a/GameContent/ItemDropRules/DropNothing.cs b/GameContent/ItemDropRules/DropNothing.cs new file mode 100644 index 0000000..d484d8b --- /dev/null +++ b/GameContent/ItemDropRules/DropNothing.cs @@ -0,0 +1,26 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.DropNothing +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.ItemDropRules +{ + public class DropNothing : IItemDropRule + { + public List ChainedRules { get; private set; } + + public DropNothing() => this.ChainedRules = new List(); + + public bool CanDrop(DropAttemptInfo info) => false; + + public ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info) => new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.DoesntFillConditions + }; + + public void ReportDroprates(List drops, DropRateInfoChainFeed ratesInfo) => Chains.ReportDroprates(this.ChainedRules, 1f, drops, ratesInfo); + } +} diff --git a/GameContent/ItemDropRules/DropOneByOne.cs b/GameContent/ItemDropRules/DropOneByOne.cs new file mode 100644 index 0000000..cd874b1 --- /dev/null +++ b/GameContent/ItemDropRules/DropOneByOne.cs @@ -0,0 +1,70 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.DropOneByOne +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.ItemDropRules +{ + public class DropOneByOne : IItemDropRule + { + private int _itemId; + private DropOneByOne.Parameters _parameters; + + public List ChainedRules { get; private set; } + + public DropOneByOne(int itemId, DropOneByOne.Parameters parameters) + { + this.ChainedRules = new List(); + this._parameters = parameters; + this._itemId = itemId; + } + + public ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info) + { + if (info.player.RollLuck(this._parameters.DropsXOutOfYTimes_TheY) < this._parameters.DropsXOutOfYTimes_TheX) + { + int num1 = info.rng.Next(this._parameters.MinimumItemDropsCount, this._parameters.MaximumItemDropsCount + 1); + int activePlayersCount = Main.CurrentFrameFlags.ActivePlayersCount; + int minValue = this._parameters.MinimumStackPerChunkBase + activePlayersCount * this._parameters.BonusMinDropsPerChunkPerPlayer; + int num2 = this._parameters.MaximumStackPerChunkBase + activePlayersCount * this._parameters.BonusMaxDropsPerChunkPerPlayer; + for (int index = 0; index < num1; ++index) + CommonCode.DropItemFromNPC(info.npc, this._itemId, info.rng.Next(minValue, num2 + 1), true); + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.Success + }; + } + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.FailedRandomRoll + }; + } + + public void ReportDroprates(List drops, DropRateInfoChainFeed ratesInfo) + { + float personalDropRate = this._parameters.GetPersonalDropRate(); + float dropRate = personalDropRate * ratesInfo.parentDroprateChance; + drops.Add(new DropRateInfo(this._itemId, this._parameters.MinimumItemDropsCount * (this._parameters.MinimumStackPerChunkBase + this._parameters.BonusMinDropsPerChunkPerPlayer), this._parameters.MaximumItemDropsCount * (this._parameters.MaximumStackPerChunkBase + this._parameters.BonusMaxDropsPerChunkPerPlayer), dropRate, ratesInfo.conditions)); + Chains.ReportDroprates(this.ChainedRules, personalDropRate, drops, ratesInfo); + } + + public bool CanDrop(DropAttemptInfo info) => true; + + public struct Parameters + { + public int DropsXOutOfYTimes_TheX; + public int DropsXOutOfYTimes_TheY; + public int MinimumItemDropsCount; + public int MaximumItemDropsCount; + public int MinimumStackPerChunkBase; + public int MaximumStackPerChunkBase; + public int BonusMinDropsPerChunkPerPlayer; + public int BonusMaxDropsPerChunkPerPlayer; + + public float GetPersonalDropRate() => (float) this.DropsXOutOfYTimes_TheX / (float) this.DropsXOutOfYTimes_TheY; + } + } +} diff --git a/GameContent/ItemDropRules/DropPerPlayerOnThePlayer.cs b/GameContent/ItemDropRules/DropPerPlayerOnThePlayer.cs new file mode 100644 index 0000000..6b7ae1b --- /dev/null +++ b/GameContent/ItemDropRules/DropPerPlayerOnThePlayer.cs @@ -0,0 +1,35 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.DropPerPlayerOnThePlayer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.ItemDropRules +{ + public class DropPerPlayerOnThePlayer : CommonDrop + { + private IItemDropRuleCondition _condition; + + public DropPerPlayerOnThePlayer( + int itemId, + int dropsOutOfY, + int amountDroppedMinimum, + int amountDroppedMaximum, + IItemDropRuleCondition optionalCondition) + : base(itemId, dropsOutOfY, amountDroppedMinimum, amountDroppedMaximum) + { + this._condition = optionalCondition; + } + + public override bool CanDrop(DropAttemptInfo info) => this._condition == null || this._condition.CanDrop(info); + + public override ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info) + { + CommonCode.DropItemForEachInteractingPlayerOnThePlayer(info.npc, this._itemId, info.rng, this._dropsXoutOfY, this._dropsOutOfY, info.rng.Next(this._amtDroppedMinimum, this._amtDroppedMaximum + 1)); + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.Success + }; + } + } +} diff --git a/GameContent/ItemDropRules/DropRateInfo.cs b/GameContent/ItemDropRules/DropRateInfo.cs new file mode 100644 index 0000000..6689a6e --- /dev/null +++ b/GameContent/ItemDropRules/DropRateInfo.cs @@ -0,0 +1,43 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.DropRateInfo +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.ItemDropRules +{ + public struct DropRateInfo + { + public int itemId; + public int stackMin; + public int stackMax; + public float dropRate; + public List conditions; + + public DropRateInfo( + int itemId, + int stackMin, + int stackMax, + float dropRate, + List conditions = null) + { + this.itemId = itemId; + this.stackMin = stackMin; + this.stackMax = stackMax; + this.dropRate = dropRate; + this.conditions = (List) null; + if (conditions == null || conditions.Count <= 0) + return; + this.conditions = new List((IEnumerable) conditions); + } + + public void AddCondition(IItemDropRuleCondition condition) + { + if (this.conditions == null) + this.conditions = new List(); + this.conditions.Add(condition); + } + } +} diff --git a/GameContent/ItemDropRules/DropRateInfoChainFeed.cs b/GameContent/ItemDropRules/DropRateInfoChainFeed.cs new file mode 100644 index 0000000..483ddf9 --- /dev/null +++ b/GameContent/ItemDropRules/DropRateInfoChainFeed.cs @@ -0,0 +1,37 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.DropRateInfoChainFeed +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.ItemDropRules +{ + public struct DropRateInfoChainFeed + { + public float parentDroprateChance; + public List conditions; + + public void AddCondition(IItemDropRuleCondition condition) + { + if (this.conditions == null) + this.conditions = new List(); + this.conditions.Add(condition); + } + + public DropRateInfoChainFeed(float droprate) + { + this.parentDroprateChance = droprate; + this.conditions = (List) null; + } + + public DropRateInfoChainFeed With(float multiplier) + { + DropRateInfoChainFeed rateInfoChainFeed = new DropRateInfoChainFeed(this.parentDroprateChance * multiplier); + if (this.conditions != null) + rateInfoChainFeed.conditions = new List((IEnumerable) this.conditions); + return rateInfoChainFeed; + } + } +} diff --git a/GameContent/ItemDropRules/IItemDropRule.cs b/GameContent/ItemDropRules/IItemDropRule.cs new file mode 100644 index 0000000..a6bc06f --- /dev/null +++ b/GameContent/ItemDropRules/IItemDropRule.cs @@ -0,0 +1,21 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.IItemDropRule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.ItemDropRules +{ + public interface IItemDropRule + { + List ChainedRules { get; } + + bool CanDrop(DropAttemptInfo info); + + void ReportDroprates(List drops, DropRateInfoChainFeed ratesInfo); + + ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info); + } +} diff --git a/GameContent/ItemDropRules/IItemDropRuleChainAttempt.cs b/GameContent/ItemDropRules/IItemDropRuleChainAttempt.cs new file mode 100644 index 0000000..31e7fab --- /dev/null +++ b/GameContent/ItemDropRules/IItemDropRuleChainAttempt.cs @@ -0,0 +1,22 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.IItemDropRuleChainAttempt +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.ItemDropRules +{ + public interface IItemDropRuleChainAttempt + { + IItemDropRule RuleToChain { get; } + + bool CanChainIntoRule(ItemDropAttemptResult parentResult); + + void ReportDroprates( + float personalDropRate, + List drops, + DropRateInfoChainFeed ratesInfo); + } +} diff --git a/GameContent/ItemDropRules/IItemDropRuleCondition.cs b/GameContent/ItemDropRules/IItemDropRuleCondition.cs new file mode 100644 index 0000000..e085a1e --- /dev/null +++ b/GameContent/ItemDropRules/IItemDropRuleCondition.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.IItemDropRuleCondition +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.ItemDropRules +{ + public interface IItemDropRuleCondition : IProvideItemConditionDescription + { + bool CanDrop(DropAttemptInfo info); + + bool CanShowItemDropInUI(); + } +} diff --git a/GameContent/ItemDropRules/INestedItemDropRule.cs b/GameContent/ItemDropRules/INestedItemDropRule.cs new file mode 100644 index 0000000..998a08c --- /dev/null +++ b/GameContent/ItemDropRules/INestedItemDropRule.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.INestedItemDropRule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.ItemDropRules +{ + public interface INestedItemDropRule + { + ItemDropAttemptResult TryDroppingItem( + DropAttemptInfo info, + ItemDropRuleResolveAction resolveAction); + } +} diff --git a/GameContent/ItemDropRules/IProvideItemConditionDescription.cs b/GameContent/ItemDropRules/IProvideItemConditionDescription.cs new file mode 100644 index 0000000..28afbd0 --- /dev/null +++ b/GameContent/ItemDropRules/IProvideItemConditionDescription.cs @@ -0,0 +1,13 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.IProvideItemConditionDescription +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.ItemDropRules +{ + public interface IProvideItemConditionDescription + { + string GetConditionDescription(); + } +} diff --git a/GameContent/ItemDropRules/ItemDropAttemptResult.cs b/GameContent/ItemDropRules/ItemDropAttemptResult.cs new file mode 100644 index 0000000..7c67b9f --- /dev/null +++ b/GameContent/ItemDropRules/ItemDropAttemptResult.cs @@ -0,0 +1,13 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.ItemDropAttemptResult +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.ItemDropRules +{ + public struct ItemDropAttemptResult + { + public ItemDropAttemptResultState State; + } +} diff --git a/GameContent/ItemDropRules/ItemDropAttemptResultState.cs b/GameContent/ItemDropRules/ItemDropAttemptResultState.cs new file mode 100644 index 0000000..ecc83de --- /dev/null +++ b/GameContent/ItemDropRules/ItemDropAttemptResultState.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.ItemDropAttemptResultState +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.ItemDropRules +{ + public enum ItemDropAttemptResultState + { + DoesntFillConditions, + FailedRandomRoll, + Success, + DidNotRunCode, + } +} diff --git a/GameContent/ItemDropRules/ItemDropDatabase.cs b/GameContent/ItemDropRules/ItemDropDatabase.cs new file mode 100644 index 0000000..4756f5b --- /dev/null +++ b/GameContent/ItemDropRules/ItemDropDatabase.cs @@ -0,0 +1,1221 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.ItemDropDatabase +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.ID; + +namespace Terraria.GameContent.ItemDropRules +{ + public class ItemDropDatabase + { + private List _globalEntries = new List(); + private Dictionary> _entriesByNpcNetId = new Dictionary>(); + private Dictionary> _npcNetIdsByType = new Dictionary>(); + private int _masterModeDropRng = 4; + + public void PrepareNPCNetIDsByTypeDictionary() + { + this._npcNetIdsByType.Clear(); + foreach (KeyValuePair keyValuePair in ContentSamples.NpcsByNetId.Where>((Func, bool>) (x => x.Key < 0))) + { + if (!this._npcNetIdsByType.ContainsKey(keyValuePair.Value.type)) + this._npcNetIdsByType[keyValuePair.Value.type] = new List(); + this._npcNetIdsByType[keyValuePair.Value.type].Add(keyValuePair.Value.netID); + } + } + + public void TrimDuplicateRulesForNegativeIDs() + { + for (int key = -65; key < 0; ++key) + { + List source; + if (this._entriesByNpcNetId.TryGetValue(key, out source)) + this._entriesByNpcNetId[key] = source.Distinct().ToList(); + } + } + + public List GetRulesForNPCID( + int npcNetId, + bool includeGlobalDrops = true) + { + List itemDropRuleList1 = new List(); + if (includeGlobalDrops) + itemDropRuleList1.AddRange((IEnumerable) this._globalEntries); + List itemDropRuleList2; + if (this._entriesByNpcNetId.TryGetValue(npcNetId, out itemDropRuleList2)) + itemDropRuleList1.AddRange((IEnumerable) itemDropRuleList2); + return itemDropRuleList1; + } + + public IItemDropRule RegisterToGlobal(IItemDropRule entry) + { + this._globalEntries.Add(entry); + return entry; + } + + public IItemDropRule RegisterToNPC(int type, IItemDropRule entry) + { + this.RegisterToNPCNetId(type, entry); + List intList; + if (type > 0 && this._npcNetIdsByType.TryGetValue(type, out intList)) + { + for (int index = 0; index < intList.Count; ++index) + this.RegisterToNPCNetId(intList[index], entry); + } + return entry; + } + + private void RegisterToNPCNetId(int npcNetId, IItemDropRule entry) + { + if (!this._entriesByNpcNetId.ContainsKey(npcNetId)) + this._entriesByNpcNetId[npcNetId] = new List(); + this._entriesByNpcNetId[npcNetId].Add(entry); + } + + public IItemDropRule RegisterToMultipleNPCs( + IItemDropRule entry, + params int[] npcNetIds) + { + for (int index = 0; index < npcNetIds.Length; ++index) + this.RegisterToNPC(npcNetIds[index], entry); + return entry; + } + + private void RemoveFromNPCNetId(int npcNetId, IItemDropRule entry) + { + if (!this._entriesByNpcNetId.ContainsKey(npcNetId)) + return; + this._entriesByNpcNetId[npcNetId].Remove(entry); + } + + public IItemDropRule RemoveFromNPC(int type, IItemDropRule entry) + { + this.RemoveFromNPCNetId(type, entry); + List intList; + if (type > 0 && this._npcNetIdsByType.TryGetValue(type, out intList)) + { + for (int index = 0; index < intList.Count; ++index) + this.RemoveFromNPCNetId(intList[index], entry); + } + return entry; + } + + public IItemDropRule RemoveFromMultipleNPCs( + IItemDropRule entry, + params int[] npcNetIds) + { + for (int index = 0; index < npcNetIds.Length; ++index) + this.RemoveFromNPC(npcNetIds[index], entry); + return entry; + } + + public void Populate() + { + this.PrepareNPCNetIDsByTypeDictionary(); + this.RegisterGlobalRules(); + this.RegisterFoodDrops(); + this.RegisterWeirdRules(); + this.RegisterTownNPCDrops(); + this.RegisterDD2EventDrops(); + this.RegisterMiscDrops(); + this.RegisterHardmodeFeathers(); + this.RegisterYoyos(); + this.RegisterStatusImmunityItems(); + this.RegisterPirateDrops(); + this.RegisterBloodMoonFishingEnemies(); + this.RegisterMartianDrops(); + this.RegisterBossTrophies(); + this.RegisterBosses(); + this.RegisterHardmodeDungeonDrops(); + this.RegisterMimic(); + this.RegisterEclipse(); + this.RegisterBloodMoonFishing(); + this.TrimDuplicateRulesForNegativeIDs(); + } + + private void RegisterBloodMoonFishing() + { + this.RegisterToMultipleNPCs(ItemDropRule.Common(4608, 2, 4, 6), 587, 586); + this.RegisterToMultipleNPCs(ItemDropRule.Common(4608, 2, 7, 10), 620, 621, 618); + this.RegisterToMultipleNPCs(ItemDropRule.OneFromOptions(8, 4273, 4381, 4325), 587, 586); + this.RegisterToMultipleNPCs(ItemDropRule.Common(3213, 15), 587, 586); + this.RegisterToNPC(620, ItemDropRule.Common(4270, 8)); + this.RegisterToNPC(620, ItemDropRule.Common(4317, 8)); + this.RegisterToNPC(621, ItemDropRule.Common(4272, 8)); + this.RegisterToNPC(621, ItemDropRule.Common(4317, 8)); + this.RegisterToNPC(618, ItemDropRule.Common(4269, 5)); + this.RegisterToNPC(618, ItemDropRule.Common(4054, 10)); + Conditions.IsBloodMoonAndNotFromStatue andNotFromStatue = new Conditions.IsBloodMoonAndNotFromStatue(); + this.RegisterToMultipleNPCs(ItemDropRule.ByCondition((IItemDropRuleCondition) andNotFromStatue, 4271, 200), 587, 586, 489, 490, 109, 621, 620); + this.RegisterToMultipleNPCs(ItemDropRule.ByCondition((IItemDropRuleCondition) andNotFromStatue, 4271, 9), 53, 536, 618); + } + + private void RegisterEclipse() + { + this.RegisterToNPC(461, ItemDropRule.ExpertGetsRerolls(497, 50, 1)); + this.RegisterToMultipleNPCs(ItemDropRule.ExpertGetsRerolls(900, 35, 1), 159, 158); + this.RegisterToNPC(251, ItemDropRule.ExpertGetsRerolls(1311, 15, 1)); + Conditions.DownedAllMechBosses downedAllMechBosses = new Conditions.DownedAllMechBosses(); + Conditions.DownedPlantera downedPlantera = new Conditions.DownedPlantera(); + IItemDropRule npc = this.RegisterToNPC(477, (IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) downedAllMechBosses)); + IItemDropRule rule = npc.OnSuccess((IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) downedPlantera)); + npc.OnSuccess(ItemDropRule.ExpertGetsRerolls(1570, 4, 1)); + rule.OnSuccess(ItemDropRule.ExpertGetsRerolls(2770, 20, 1)); + rule.OnSuccess(ItemDropRule.ExpertGetsRerolls(3292, 3, 1)); + this.RegisterToNPC(253, (IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) downedAllMechBosses)).OnSuccess(ItemDropRule.ExpertGetsRerolls(1327, 40, 1)); + this.RegisterToNPC(460, (IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) downedPlantera)).OnSuccess(ItemDropRule.ExpertGetsRerolls(3098, 40, 1)); + this.RegisterToNPC(460, ItemDropRule.ExpertGetsRerolls(4740, 50, 1)); + this.RegisterToNPC(460, ItemDropRule.ExpertGetsRerolls(4741, 50, 1)); + this.RegisterToNPC(460, ItemDropRule.ExpertGetsRerolls(4742, 50, 1)); + this.RegisterToNPC(468, (IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) downedPlantera)).OnSuccess(ItemDropRule.ExpertGetsRerolls(3105, 40, 1)); + this.RegisterToNPC(468, ItemDropRule.ExpertGetsRerolls(4738, 50, 1)); + this.RegisterToNPC(468, ItemDropRule.ExpertGetsRerolls(4739, 50, 1)); + this.RegisterToNPC(466, (IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) downedPlantera)).OnSuccess(ItemDropRule.ExpertGetsRerolls(3106, 40, 1)); + this.RegisterToNPC(467, (IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) downedPlantera)).OnSuccess(ItemDropRule.ExpertGetsRerolls(3249, 40, 1)); + IItemDropRule itemDropRule1 = ItemDropRule.Common(3107, 25); + IItemDropRule itemDropRule2 = ItemDropRule.WithRerolls(3107, 1, 25); + itemDropRule1.OnSuccess(ItemDropRule.Common(3108, minimumDropped: 100, maximumDropped: 200), true); + itemDropRule2.OnSuccess(ItemDropRule.Common(3108, minimumDropped: 100, maximumDropped: 200), true); + this.RegisterToNPC(463, (IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) downedPlantera)).OnSuccess((IItemDropRule) new DropBasedOnExpertMode(itemDropRule1, itemDropRule2)); + } + + private void RegisterMimic() + { + this.RegisterToNPC(85, ItemDropRule.OneFromOptions(1, 437, 517, 535, 536, 532, 554)); + IItemDropRule itemDropRule = ItemDropRule.Common(1312, 20); + itemDropRule.OnFailedRoll(ItemDropRule.OneFromOptions(1, 676, 725, 1264)); + this.RegisterToNPC(629, itemDropRule); + } + + private void RegisterHardmodeDungeonDrops() + { + int[] numArray = new int[12] + { + 269, + 270, + 271, + 272, + 273, + 274, + 275, + 276, + 277, + 278, + 279, + 280 + }; + this.RegisterToNPC(290, ItemDropRule.ExpertGetsRerolls(1513, 15, 1)); + this.RegisterToNPC(290, ItemDropRule.ExpertGetsRerolls(938, 10, 1)); + this.RegisterToNPC(287, ItemDropRule.ExpertGetsRerolls(977, 12, 1)); + this.RegisterToNPC(287, ItemDropRule.ExpertGetsRerolls(963, 12, 1)); + this.RegisterToNPC(291, ItemDropRule.ExpertGetsRerolls(1300, 12, 1)); + this.RegisterToNPC(291, ItemDropRule.ExpertGetsRerolls(1254, 12, 1)); + this.RegisterToNPC(292, ItemDropRule.ExpertGetsRerolls(1514, 12, 1)); + this.RegisterToNPC(292, ItemDropRule.ExpertGetsRerolls(679, 12, 1)); + this.RegisterToNPC(293, ItemDropRule.ExpertGetsRerolls(759, 18, 1)); + this.RegisterToNPC(289, ItemDropRule.ExpertGetsRerolls(4789, 25, 1)); + this.RegisterToMultipleNPCs(ItemDropRule.ExpertGetsRerolls(1446, 20, 1), 281, 282); + this.RegisterToMultipleNPCs(ItemDropRule.ExpertGetsRerolls(1444, 20, 1), 283, 284); + this.RegisterToMultipleNPCs(ItemDropRule.ExpertGetsRerolls(1445, 20, 1), 285, 286); + this.RegisterToMultipleNPCs(ItemDropRule.ExpertGetsRerolls(1183, 400, 1), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.ExpertGetsRerolls(1266, 300, 1), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.ExpertGetsRerolls(671, 200, 1), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.ExpertGetsRerolls(4679, 200, 1), numArray); + this.RegisterToNPC(288, ItemDropRule.Common(1508, maximumDropped: 2)); + } + + private void RegisterBosses() + { + this.RegisterBoss_EOC(); + this.RegisterBoss_BOC(); + this.RegisterBoss_EOW(); + this.RegisterBoss_QueenBee(); + this.RegisterBoss_Skeletron(); + this.RegisterBoss_WOF(); + this.RegisterBoss_AncientCultist(); + this.RegisterBoss_MoonLord(); + this.RegisterBoss_LunarTowers(); + this.RegisterBoss_Betsy(); + this.RegisterBoss_Golem(); + this.RegisterBoss_DukeFishron(); + this.RegisterBoss_SkeletronPrime(); + this.RegisterBoss_TheDestroyer(); + this.RegisterBoss_Twins(); + this.RegisterBoss_Plantera(); + this.RegisterBoss_KingSlime(); + this.RegisterBoss_FrostMoon(); + this.RegisterBoss_PumpkinMoon(); + this.RegisterBoss_HallowBoss(); + this.RegisterBoss_QueenSlime(); + } + + private void RegisterBoss_QueenSlime() + { + short num = 657; + this.RegisterToNPC((int) num, ItemDropRule.BossBag(4957)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeCommonDrop(4950)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeDropOnAllPlayers(4960, this._masterModeDropRng)); + LeadingConditionRule rule = new LeadingConditionRule((IItemDropRuleCondition) new Conditions.NotExpert()); + this.RegisterToNPC((int) num, (IItemDropRule) rule); + rule.OnSuccess(ItemDropRule.Common(4986, minimumDropped: 25, maximumDropped: 75)); + rule.OnSuccess(ItemDropRule.Common(4959, 7)); + rule.OnSuccess(ItemDropRule.OneFromOptions(1, 4982, 4983, 4984)); + rule.OnSuccess(ItemDropRule.Common(4981, 4)); + rule.OnSuccess(ItemDropRule.NotScalingWithLuck(4980, 3)); + } + + private void RegisterBoss_HallowBoss() + { + short num = 636; + this.RegisterToNPC((int) num, ItemDropRule.BossBag(4782)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeCommonDrop(4949)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeDropOnAllPlayers(4811, this._masterModeDropRng)); + LeadingConditionRule rule = new LeadingConditionRule((IItemDropRuleCondition) new Conditions.NotExpert()); + this.RegisterToNPC((int) num, (IItemDropRule) rule).OnSuccess(ItemDropRule.OneFromOptions(1, 4923, 4952, 4953, 4914)); + rule.OnSuccess(ItemDropRule.Common(4823, 15)); + rule.OnSuccess(ItemDropRule.Common(4778, 4)); + rule.OnSuccess(ItemDropRule.Common(4715, 50)); + rule.OnSuccess(ItemDropRule.Common(4784, 7)); + LeadingConditionRule leadingConditionRule = new LeadingConditionRule((IItemDropRuleCondition) new Conditions.EmpressOfLightIsGenuinelyEnraged()); + this.RegisterToNPC((int) num, (IItemDropRule) leadingConditionRule).OnSuccess(ItemDropRule.Common(5005)); + } + + private void RegisterBoss_PumpkinMoon() + { + Conditions.PumpkinMoonDropGatingChance dropGatingChance = new Conditions.PumpkinMoonDropGatingChance(); + Conditions.IsPumpkinMoon isPumpkinMoon = new Conditions.IsPumpkinMoon(); + Conditions.FromCertainWaveAndAbove certainWaveAndAbove = new Conditions.FromCertainWaveAndAbove(15); + this.RegisterToNPC(327, (IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) isPumpkinMoon)).OnSuccess((IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) certainWaveAndAbove)).OnSuccess(ItemDropRule.Common(1856)); + this.RegisterToNPC(325, (IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) isPumpkinMoon)).OnSuccess((IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) certainWaveAndAbove)).OnSuccess(ItemDropRule.Common(1855)); + this.RegisterToNPC(315, ItemDropRule.ByCondition((IItemDropRuleCondition) dropGatingChance, 1857, 20)); + int[] numArray = new int[10] + { + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 312, + 313, + 314 + }; + this.RegisterToMultipleNPCs((IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) dropGatingChance), numArray).OnSuccess(ItemDropRule.OneFromOptions(10, 1788, 1789, 1790)); + IItemDropRule npc1 = this.RegisterToNPC(325, (IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) dropGatingChance)); + IItemDropRule rule1 = ItemDropRule.Common(1835); + rule1.OnSuccess(ItemDropRule.Common(1836, minimumDropped: 30, maximumDropped: 60), true); + npc1.OnSuccess((IItemDropRule) new OneFromRulesRule(1, new IItemDropRule[5] + { + ItemDropRule.Common(1829), + ItemDropRule.Common(1831), + rule1, + ItemDropRule.Common(1837), + ItemDropRule.Common(1845) + })); + npc1.OnSuccess(ItemDropRule.ByCondition((IItemDropRuleCondition) new Conditions.IsExpert(), 4444, 5)); + npc1.OnSuccess(ItemDropRule.MasterModeCommonDrop(4941)); + npc1.OnSuccess(ItemDropRule.MasterModeDropOnAllPlayers(4793, this._masterModeDropRng)); + IItemDropRule rule2 = ItemDropRule.Common(1782); + rule2.OnSuccess(ItemDropRule.Common(1783, minimumDropped: 50, maximumDropped: 100), true); + IItemDropRule rule3 = ItemDropRule.Common(1784); + rule3.OnSuccess(ItemDropRule.Common(1785, minimumDropped: 25, maximumDropped: 50), true); + IItemDropRule npc2 = this.RegisterToNPC(327, (IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) dropGatingChance)); + npc2.OnSuccess((IItemDropRule) new OneFromRulesRule(1, new IItemDropRule[8] + { + rule2, + rule3, + ItemDropRule.Common(1811), + ItemDropRule.Common(1826), + ItemDropRule.Common(1801), + ItemDropRule.Common(1802), + ItemDropRule.Common(4680), + ItemDropRule.Common(1798) + })); + npc2.OnSuccess(ItemDropRule.MasterModeCommonDrop(4942)); + npc2.OnSuccess(ItemDropRule.MasterModeDropOnAllPlayers(4812, this._masterModeDropRng)); + this.RegisterToNPC(325, ItemDropRule.ByCondition((IItemDropRuleCondition) isPumpkinMoon, 1729, minimumDropped: 30, maximumDropped: 50)); + this.RegisterToNPC(326, ItemDropRule.ByCondition((IItemDropRuleCondition) isPumpkinMoon, 1729, maximumDropped: 4)); + } + + private void RegisterBoss_FrostMoon() + { + Conditions.FrostMoonDropGatingChance dropGatingChance = new Conditions.FrostMoonDropGatingChance(); + Conditions.FrostMoonDropGateForTrophies dropGateForTrophies = new Conditions.FrostMoonDropGateForTrophies(); + Conditions.FromCertainWaveAndAbove certainWaveAndAbove = new Conditions.FromCertainWaveAndAbove(15); + IItemDropRule npc1 = this.RegisterToNPC(344, (IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) dropGatingChance)); + npc1.OnSuccess(ItemDropRule.ByCondition((IItemDropRuleCondition) dropGateForTrophies, 1962)); + npc1.OnSuccess(ItemDropRule.Common(1871, 15)).OnFailedRoll(ItemDropRule.OneFromOptions(1, 1916, 1928, 1930)); + npc1.OnSuccess(ItemDropRule.MasterModeCommonDrop(4944)); + npc1.OnSuccess(ItemDropRule.MasterModeDropOnAllPlayers(4813, this._masterModeDropRng)); + IItemDropRule npc2 = this.RegisterToNPC(345, (IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) dropGatingChance)); + npc2.OnSuccess(ItemDropRule.ByCondition((IItemDropRuleCondition) dropGateForTrophies, 1960)); + npc2.OnSuccess(ItemDropRule.ByCondition((IItemDropRuleCondition) certainWaveAndAbove, 1914, 30)); + npc2.OnSuccess(ItemDropRule.Common(1959, 15)).OnFailedRoll(ItemDropRule.OneFromOptions(1, 1931, 1946, 1947)); + npc2.OnSuccess(ItemDropRule.MasterModeCommonDrop(4943)); + npc2.OnSuccess(ItemDropRule.MasterModeDropOnAllPlayers(4814, this._masterModeDropRng)); + IItemDropRule npc3 = this.RegisterToNPC(346, (IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) dropGatingChance)); + npc3.OnSuccess(ItemDropRule.ByCondition((IItemDropRuleCondition) dropGateForTrophies, 1961)); + npc3.OnSuccess(ItemDropRule.OneFromOptions(1, 1910, 1929)); + npc3.OnSuccess(ItemDropRule.MasterModeCommonDrop(4945)); + npc3.OnSuccess(ItemDropRule.MasterModeDropOnAllPlayers(4794, this._masterModeDropRng)); + int[] numArray = new int[3]{ 338, 339, 340 }; + this.RegisterToMultipleNPCs(ItemDropRule.OneFromOptions(200, 1943, 1944, 1945), numArray); + this.RegisterToNPC(341, ItemDropRule.ByCondition((IItemDropRuleCondition) new Conditions.IsChristmas(), 1869)); + } + + private void RegisterBoss_KingSlime() + { + short num = 50; + this.RegisterToNPC((int) num, ItemDropRule.BossBag(3318)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeCommonDrop(4929)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeDropOnAllPlayers(4797, this._masterModeDropRng)); + LeadingConditionRule rule = new LeadingConditionRule((IItemDropRuleCondition) new Conditions.NotExpert()); + this.RegisterToNPC((int) num, (IItemDropRule) rule); + rule.OnSuccess(ItemDropRule.Common(2430, 4)); + rule.OnSuccess(ItemDropRule.Common(2493, 7)); + rule.OnSuccess(ItemDropRule.OneFromOptions(1, 256, 257, 258)); + rule.OnSuccess(ItemDropRule.NotScalingWithLuck(2585, 3)).OnFailedRoll(ItemDropRule.Common(2610)); + rule.OnSuccess(ItemDropRule.Common(998)); + } + + private void RegisterBoss_Plantera() + { + short num = 262; + this.RegisterToNPC((int) num, ItemDropRule.BossBag(3328)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeCommonDrop(4934)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeDropOnAllPlayers(4806, this._masterModeDropRng)); + LeadingConditionRule rule1 = new LeadingConditionRule((IItemDropRuleCondition) new Conditions.NotExpert()); + this.RegisterToNPC((int) num, (IItemDropRule) rule1); + LeadingConditionRule rule2 = new LeadingConditionRule((IItemDropRuleCondition) new Conditions.FirstTimeKillingPlantera()); + rule1.OnSuccess((IItemDropRule) rule2); + rule1.OnSuccess(ItemDropRule.Common(2109, 7)); + rule1.OnSuccess(ItemDropRule.Common(1141)); + rule1.OnSuccess(ItemDropRule.Common(1182, 20)); + rule1.OnSuccess(ItemDropRule.Common(1305, 50)); + rule1.OnSuccess(ItemDropRule.Common(1157, 4)); + rule1.OnSuccess(ItemDropRule.Common(3021, 10)); + IItemDropRule itemDropRule = ItemDropRule.Common(758); + itemDropRule.OnSuccess(ItemDropRule.Common(771, minimumDropped: 50, maximumDropped: 150), true); + rule2.OnSuccess(itemDropRule, true); + rule2.OnFailedConditions((IItemDropRule) new OneFromRulesRule(1, new IItemDropRule[7] + { + itemDropRule, + ItemDropRule.Common(1255), + ItemDropRule.Common(788), + ItemDropRule.Common(1178), + ItemDropRule.Common(1259), + ItemDropRule.Common(1155), + ItemDropRule.Common(3018) + })); + } + + private void RegisterBoss_SkeletronPrime() + { + Conditions.NotExpert notExpert = new Conditions.NotExpert(); + short maxValue = (short) sbyte.MaxValue; + this.RegisterToNPC((int) maxValue, ItemDropRule.BossBag(3327)); + this.RegisterToNPC((int) maxValue, ItemDropRule.MasterModeCommonDrop(4933)); + this.RegisterToNPC((int) maxValue, ItemDropRule.MasterModeDropOnAllPlayers(4805, this._masterModeDropRng)); + this.RegisterToNPC((int) maxValue, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 2107, 7)); + this.RegisterToNPC((int) maxValue, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 1225, minimumDropped: 15, maximumDropped: 30)); + this.RegisterToNPC((int) maxValue, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 547, minimumDropped: 25, maximumDropped: 40)); + } + + private void RegisterBoss_TheDestroyer() + { + Conditions.NotExpert notExpert = new Conditions.NotExpert(); + short num = 134; + this.RegisterToNPC((int) num, ItemDropRule.BossBag(3325)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeCommonDrop(4932)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeDropOnAllPlayers(4803, this._masterModeDropRng)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 2113, 7)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 1225, minimumDropped: 15, maximumDropped: 30)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 548, minimumDropped: 25, maximumDropped: 40)); + } + + private void RegisterBoss_Twins() + { + LeadingConditionRule rule1 = new LeadingConditionRule((IItemDropRuleCondition) new Conditions.MissingTwin()); + LeadingConditionRule rule2 = new LeadingConditionRule((IItemDropRuleCondition) new Conditions.NotExpert()); + rule1.OnSuccess(ItemDropRule.BossBag(3326)); + rule1.OnSuccess((IItemDropRule) rule2); + rule2.OnSuccess(ItemDropRule.Common(2106, 7)); + rule2.OnSuccess(ItemDropRule.Common(1225, minimumDropped: 15, maximumDropped: 30)); + rule2.OnSuccess(ItemDropRule.Common(549, minimumDropped: 25, maximumDropped: 40)); + rule1.OnSuccess(ItemDropRule.MasterModeCommonDrop(4931)); + rule1.OnSuccess(ItemDropRule.MasterModeDropOnAllPlayers(4804, this._masterModeDropRng)); + this.RegisterToMultipleNPCs((IItemDropRule) rule1, 126, 125); + } + + private void RegisterBoss_EOC() + { + Conditions.NotExpert notExpert = new Conditions.NotExpert(); + Conditions.IsCrimsonAndNotExpert crimsonAndNotExpert = new Conditions.IsCrimsonAndNotExpert(); + Conditions.IsCorruptionAndNotExpert corruptionAndNotExpert = new Conditions.IsCorruptionAndNotExpert(); + short num = 4; + this.RegisterToNPC((int) num, ItemDropRule.BossBag(3319)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeCommonDrop(4924)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeCommonDrop(3763)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeDropOnAllPlayers(4798, this._masterModeDropRng)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 2112, 7)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 1299, 40)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) crimsonAndNotExpert, 880, minimumDropped: 30, maximumDropped: 90)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) crimsonAndNotExpert, 2171, maximumDropped: 3)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) corruptionAndNotExpert, 47, minimumDropped: 20, maximumDropped: 50)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) corruptionAndNotExpert, 56, minimumDropped: 30, maximumDropped: 90)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) corruptionAndNotExpert, 59, maximumDropped: 3)); + } + + private void RegisterBoss_BOC() + { + Conditions.NotExpert notExpert = new Conditions.NotExpert(); + short num1 = 266; + this.RegisterToNPC((int) num1, ItemDropRule.BossBag(3321)); + this.RegisterToNPC((int) num1, ItemDropRule.MasterModeCommonDrop(4926)); + this.RegisterToNPC((int) num1, ItemDropRule.MasterModeDropOnAllPlayers(4800, this._masterModeDropRng)); + this.RegisterToNPC((int) num1, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 880, minimumDropped: 40, maximumDropped: 90)); + this.RegisterToNPC((int) num1, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 2104, 7)); + this.RegisterToNPC((int) num1, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 3060, 20)); + short num2 = 267; + this.RegisterToNPC((int) num2, (IItemDropRule) new DropBasedOnExpertMode((IItemDropRule) new CommonDrop(1329, 3, 2, 5, 2), (IItemDropRule) new CommonDrop(1329, 3, 4, 10, 2))); + this.RegisterToNPC((int) num2, (IItemDropRule) new DropBasedOnExpertMode((IItemDropRule) new CommonDrop(880, 3, 5, 12, 2), (IItemDropRule) new CommonDrop(880, 3, 11, 25, 2))); + } + + private void RegisterBoss_EOW() + { + Conditions.LegacyHack_IsBossAndExpert hackIsBossAndExpert = new Conditions.LegacyHack_IsBossAndExpert(); + Conditions.LegacyHack_IsBossAndNotExpert bossAndNotExpert = new Conditions.LegacyHack_IsBossAndNotExpert(); + int[] numArray = new int[3]{ 13, 14, 15 }; + this.RegisterToMultipleNPCs((IItemDropRule) new DropBasedOnExpertMode(ItemDropRule.Common(86, 2, maximumDropped: 2), ItemDropRule.Common(86, 2, 2, 3)), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(56, 2, 2, 5), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.BossBagByCondition((IItemDropRuleCondition) hackIsBossAndExpert, 3320), numArray); + IItemDropRule multipleNpCs = this.RegisterToMultipleNPCs((IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) new Conditions.LegacyHack_IsABoss()), numArray); + multipleNpCs.OnSuccess(ItemDropRule.MasterModeCommonDrop(4925)); + multipleNpCs.OnSuccess(ItemDropRule.MasterModeDropOnAllPlayers(4799, this._masterModeDropRng)); + this.RegisterToMultipleNPCs(ItemDropRule.ByCondition((IItemDropRuleCondition) bossAndNotExpert, 56, minimumDropped: 20, maximumDropped: 60), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.ByCondition((IItemDropRuleCondition) bossAndNotExpert, 994, 20), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.ByCondition((IItemDropRuleCondition) bossAndNotExpert, 2111, 7), numArray); + } + + private void RegisterBoss_QueenBee() + { + Conditions.NotExpert notExpert = new Conditions.NotExpert(); + short num = 222; + this.RegisterToNPC((int) num, ItemDropRule.BossBag(3322)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeCommonDrop(4928)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeDropOnAllPlayers(4802, this._masterModeDropRng)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 2108, 7)); + this.RegisterToNPC((int) num, (IItemDropRule) new DropBasedOnExpertMode(ItemDropRule.OneFromOptionsNotScalingWithLuck(1, 1121, 1123, 2888), ItemDropRule.DropNothing())); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 1132, 3)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 1170, 15)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 2502, 20)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 1129, 3)).OnFailedRoll(ItemDropRule.OneFromOptionsNotScalingWithLuck(2, 842, 843, 844)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 1130, 4, 10, 30, 3)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 2431, minimumDropped: 16, maximumDropped: 26)); + } + + private void RegisterBoss_Skeletron() + { + Conditions.NotExpert notExpert = new Conditions.NotExpert(); + short num = 35; + this.RegisterToNPC((int) num, ItemDropRule.BossBag(3323)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeCommonDrop(4927)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeDropOnAllPlayers(4801, this._masterModeDropRng)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 1281, 7)).OnFailedRoll(ItemDropRule.Common(1273, 7)).OnFailedRoll(ItemDropRule.Common(1313, 7)); + this.RegisterToNPC((int) num, ItemDropRule.Common(4993, 7)); + } + + private void RegisterBoss_WOF() + { + Conditions.NotExpert notExpert = new Conditions.NotExpert(); + short num = 113; + this.RegisterToNPC((int) num, ItemDropRule.BossBag(3324)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeCommonDrop(4930)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeDropOnAllPlayers(4795, this._masterModeDropRng)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 2105, 7)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 367)); + this.RegisterToNPC((int) num, (IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) notExpert)).OnSuccess((IItemDropRule) new OneFromRulesRule(1, new IItemDropRule[2] + { + ItemDropRule.OneFromOptionsNotScalingWithLuck(1, 490, 491, 489, 2998), + ItemDropRule.OneFromOptionsNotScalingWithLuck(1, 426, 434, 514, 4912) + })); + } + + private void RegisterBoss_AncientCultist() + { + short num = 439; + this.RegisterToNPC((int) num, ItemDropRule.MasterModeCommonDrop(4937)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeDropOnAllPlayers(4809, this._masterModeDropRng)); + this.RegisterToNPC((int) num, ItemDropRule.Common(3372, 7)); + this.RegisterToNPC((int) num, ItemDropRule.Common(3549)); + } + + private void RegisterBoss_MoonLord() + { + Conditions.NotExpert notExpert = new Conditions.NotExpert(); + short num = 398; + this.RegisterToNPC((int) num, ItemDropRule.BossBag(3332)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeCommonDrop(4938)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeDropOnAllPlayers(4810, this._masterModeDropRng)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 3373, 7)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 4469, 10)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 3384)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 3460, minimumDropped: 70, maximumDropped: 90)); + this.RegisterToNPC((int) num, (IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) notExpert)).OnSuccess(ItemDropRule.OneFromOptionsNotScalingWithLuck(1, 3063, 3389, 3065, 1553, 3930, 3541, 3570, 3571, 3569)); + } + + private void RegisterBoss_LunarTowers() + { + DropOneByOne.Parameters parameters1 = new DropOneByOne.Parameters() + { + MinimumItemDropsCount = 12, + MaximumItemDropsCount = 20, + DropsXOutOfYTimes_TheX = 1, + DropsXOutOfYTimes_TheY = 1, + MinimumStackPerChunkBase = 1, + MaximumStackPerChunkBase = 3, + BonusMinDropsPerChunkPerPlayer = 0, + BonusMaxDropsPerChunkPerPlayer = 0 + }; + DropOneByOne.Parameters parameters2 = parameters1; + parameters2.BonusMinDropsPerChunkPerPlayer = 1; + parameters2.BonusMaxDropsPerChunkPerPlayer = 1; + parameters2.MinimumStackPerChunkBase = (int) ((double) parameters1.MinimumStackPerChunkBase * 1.5); + parameters2.MaximumStackPerChunkBase = (int) ((double) parameters1.MaximumStackPerChunkBase * 1.5); + this.RegisterToNPC(517, (IItemDropRule) new DropBasedOnExpertMode((IItemDropRule) new DropOneByOne(3458, parameters1), (IItemDropRule) new DropOneByOne(3458, parameters2))); + this.RegisterToNPC(422, (IItemDropRule) new DropBasedOnExpertMode((IItemDropRule) new DropOneByOne(3456, parameters1), (IItemDropRule) new DropOneByOne(3456, parameters2))); + this.RegisterToNPC(507, (IItemDropRule) new DropBasedOnExpertMode((IItemDropRule) new DropOneByOne(3457, parameters1), (IItemDropRule) new DropOneByOne(3457, parameters2))); + this.RegisterToNPC(493, (IItemDropRule) new DropBasedOnExpertMode((IItemDropRule) new DropOneByOne(3459, parameters1), (IItemDropRule) new DropOneByOne(3459, parameters2))); + } + + private void RegisterBoss_Betsy() + { + Conditions.NotExpert notExpert = new Conditions.NotExpert(); + short num = 551; + this.RegisterToNPC((int) num, ItemDropRule.BossBag(3860)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeCommonDrop(4948)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeDropOnAllPlayers(4817, this._masterModeDropRng)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 3863, 7)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 3883, 4)); + this.RegisterToNPC((int) num, (IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) notExpert)).OnSuccess(ItemDropRule.OneFromOptionsNotScalingWithLuck(1, 3827, 3859, 3870, 3858)); + } + + private void RegisterBoss_Golem() + { + Conditions.NotExpert notExpert = new Conditions.NotExpert(); + short num = 245; + this.RegisterToNPC((int) num, ItemDropRule.BossBag(3329)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeCommonDrop(4935)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeDropOnAllPlayers(4807, this._masterModeDropRng)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 2110, 7)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 1294, 4)); + IItemDropRule rule = ItemDropRule.Common(1258); + rule.OnSuccess(ItemDropRule.Common(1261, minimumDropped: 60, maximumDropped: 180), true); + this.RegisterToNPC((int) num, (IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) notExpert)).OnSuccess((IItemDropRule) new OneFromRulesRule(1, new IItemDropRule[7] + { + rule, + ItemDropRule.Common(1122), + ItemDropRule.Common(899), + ItemDropRule.Common(1248), + ItemDropRule.Common(1295), + ItemDropRule.Common(1296), + ItemDropRule.Common(1297) + })); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 2218, minimumDropped: 4, maximumDropped: 8)); + } + + private void RegisterBoss_DukeFishron() + { + Conditions.NotExpert notExpert = new Conditions.NotExpert(); + short num = 370; + this.RegisterToNPC((int) num, ItemDropRule.BossBag(3330)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeCommonDrop(4936)); + this.RegisterToNPC((int) num, ItemDropRule.MasterModeDropOnAllPlayers(4808, this._masterModeDropRng)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 2588, 7)); + this.RegisterToNPC((int) num, ItemDropRule.ByCondition((IItemDropRuleCondition) notExpert, 2609, 15)); + this.RegisterToNPC((int) num, (IItemDropRule) new LeadingConditionRule((IItemDropRuleCondition) notExpert)).OnSuccess(ItemDropRule.OneFromOptions(1, 2611, 2624, 2622, 2621, 2623)); + } + + private void RegisterWeirdRules() => this.RegisterToMultipleNPCs(ItemDropRule.NormalvsExpert(3260, 40, 30), 86); + + private void RegisterGlobalRules() + { + this.RegisterToGlobal((IItemDropRule) new MechBossSpawnersDropRule()); + this.RegisterToGlobal((IItemDropRule) new SlimeBodyItemDropRule()); + this.RegisterToGlobal(ItemDropRule.ByCondition((IItemDropRuleCondition) new Conditions.HalloweenWeapons(), 1825, 2000)).OnFailedRoll(ItemDropRule.Common(1827, 2000)); + this.RegisterToGlobal((IItemDropRule) new ItemDropWithConditionRule(1533, 2500, 1, 1, (IItemDropRuleCondition) new Conditions.JungleKeyCondition())); + this.RegisterToGlobal((IItemDropRule) new ItemDropWithConditionRule(1534, 2500, 1, 1, (IItemDropRuleCondition) new Conditions.CorruptKeyCondition())); + this.RegisterToGlobal((IItemDropRule) new ItemDropWithConditionRule(1535, 2500, 1, 1, (IItemDropRuleCondition) new Conditions.CrimsonKeyCondition())); + this.RegisterToGlobal((IItemDropRule) new ItemDropWithConditionRule(1536, 2500, 1, 1, (IItemDropRuleCondition) new Conditions.HallowKeyCondition())); + this.RegisterToGlobal((IItemDropRule) new ItemDropWithConditionRule(1537, 2500, 1, 1, (IItemDropRuleCondition) new Conditions.FrozenKeyCondition())); + this.RegisterToGlobal((IItemDropRule) new ItemDropWithConditionRule(4714, 2500, 1, 1, (IItemDropRuleCondition) new Conditions.DesertKeyCondition())); + this.RegisterToGlobal((IItemDropRule) new ItemDropWithConditionRule(1774, 80, 1, 1, (IItemDropRuleCondition) new Conditions.HalloweenGoodieBagDrop())); + this.RegisterToGlobal((IItemDropRule) new ItemDropWithConditionRule(1869, 13, 1, 1, (IItemDropRuleCondition) new Conditions.XmasPresentDrop())); + this.RegisterToGlobal((IItemDropRule) new ItemDropWithConditionRule(2701, 50, 20, 50, (IItemDropRuleCondition) new Conditions.LivingFlames())); + this.RegisterToGlobal((IItemDropRule) new ItemDropWithConditionRule(1314, 1000, 1, 1, (IItemDropRuleCondition) new Conditions.KOCannon())); + this.RegisterToGlobal((IItemDropRule) new ItemDropWithConditionRule(520, 5, 1, 1, (IItemDropRuleCondition) new Conditions.SoulOfLight())); + this.RegisterToGlobal((IItemDropRule) new ItemDropWithConditionRule(521, 5, 1, 1, (IItemDropRuleCondition) new Conditions.SoulOfNight())); + this.RegisterToGlobal(ItemDropRule.ByCondition((IItemDropRuleCondition) new Conditions.PirateMap(), 1315, 100)); + } + + private void RegisterFoodDrops() + { + this.RegisterToNPC(48, ItemDropRule.Food(4016, 50)); + this.RegisterToNPC(224, ItemDropRule.Food(4021, 50)); + this.RegisterToNPC(44, ItemDropRule.Food(4037, 10)); + this.RegisterToNPC(469, ItemDropRule.Food(4037, 100)); + this.RegisterToMultipleNPCs(ItemDropRule.Food(4020, 30), 163, 238, 164, 165, 530, 531); + this.RegisterToMultipleNPCs(ItemDropRule.Food(4029, 50), 480, 481); + this.RegisterToMultipleNPCs(ItemDropRule.Food(4030, 75), 498, 499, 500, 501, 502, 503, 504, 505, 506, 496, 497, 494, 495); + this.RegisterToMultipleNPCs(ItemDropRule.Food(4036, 50), 482, 483); + this.RegisterToMultipleNPCs(ItemDropRule.Food(4015, 100), 6, 173); + this.RegisterToMultipleNPCs(ItemDropRule.Food(4026, 150), 150, 147, 184); + this.RegisterToMultipleNPCs(ItemDropRule.Food(4027, 75), 154, 206); + this.RegisterToMultipleNPCs(ItemDropRule.Food(3532, 15), 170, 180, 171); + this.RegisterToNPC(289, ItemDropRule.Food(4018, 35)); + this.RegisterToNPC(34, ItemDropRule.Food(4018, 70)); + this.RegisterToMultipleNPCs(ItemDropRule.Food(4013, 21), 293, 291, 292); + this.RegisterToMultipleNPCs(ItemDropRule.Food(5042, 30), 43, 175, 56); + this.RegisterToNPC(287, ItemDropRule.Food(5042, 10)); + this.RegisterToMultipleNPCs(ItemDropRule.Food(5041, 150), 21, 201, 202, 203, 322, 323, 324, 635, 449, 450, 451, 452); + this.RegisterToNPC(290, ItemDropRule.Food(4013, 7)); + this.RegisterToMultipleNPCs(ItemDropRule.Food(4025, 30), 39, 156); + this.RegisterToMultipleNPCs(ItemDropRule.Food(4023, 40), 177, 152); + this.RegisterToMultipleNPCs(ItemDropRule.Food(4012, 50), 581, 509, 580, 508, 69); + this.RegisterToMultipleNPCs(ItemDropRule.Food(4028, 30), 546, 542, 544, 543, 545); + this.RegisterToMultipleNPCs(ItemDropRule.Food(4035, 50), 67, 65); + this.RegisterToMultipleNPCs(ItemDropRule.Food(4011, 150), 120, 137, 138); + this.RegisterToNPC(122, ItemDropRule.Food(4017, 75)); + } + + private void RegisterTownNPCDrops() + { + this.RegisterToNPC(22, (IItemDropRule) new ItemDropWithConditionRule(867, 1, 1, 1, (IItemDropRuleCondition) new Conditions.NamedNPC("Andrew"))); + this.RegisterToNPC(178, (IItemDropRule) new ItemDropWithConditionRule(4372, 1, 1, 1, (IItemDropRuleCondition) new Conditions.NamedNPC("Whitney"))); + this.RegisterToNPC(353, ItemDropRule.Common(3352, 8)); + this.RegisterToNPC(441, ItemDropRule.Common(3351, 8)); + this.RegisterToNPC(227, ItemDropRule.Common(3350, 10)); + this.RegisterToNPC(550, ItemDropRule.Common(3821, 6)); + this.RegisterToNPC(208, ItemDropRule.Common(3548, 4, 30, 60)); + this.RegisterToNPC(207, ItemDropRule.Common(3349, 8)); + this.RegisterToNPC(124, ItemDropRule.Common(4818, 8)); + this.RegisterToNPC(54, ItemDropRule.Common(260)); + this.RegisterToNPC(368, ItemDropRule.Common(2222)); + } + + private void RegisterDD2EventDrops() + { + this.RegisterToNPC(576, (IItemDropRule) new CommonDropNotScalingWithLuck(3865, 7, 1, 1)); + this.RegisterToNPC(576, ItemDropRule.NormalvsExpertOneFromOptionsNotScalingWithLuck(3, 2, 3809, 3811, 3810, 3812)); + this.RegisterToNPC(576, ItemDropRule.NormalvsExpertOneFromOptionsNotScalingWithLuck(3, 2, 3852, 3854, 3823, 3835, 3836)); + this.RegisterToNPC(576, ItemDropRule.NormalvsExpertNotScalingWithLuck(3856, 5, 4)); + this.RegisterToNPC(577, (IItemDropRule) new CommonDropNotScalingWithLuck(3865, 14, 1, 1)); + this.RegisterToNPC(577, ItemDropRule.MasterModeCommonDrop(4947)); + this.RegisterToNPC(577, ItemDropRule.MasterModeDropOnAllPlayers(4816, this._masterModeDropRng)); + this.RegisterToNPC(577, ItemDropRule.OneFromOptionsNotScalingWithLuck(6, 3809, 3811, 3810, 3812)); + this.RegisterToNPC(577, ItemDropRule.OneFromOptionsNotScalingWithLuck(6, 3852, 3854, 3823, 3835, 3836)); + this.RegisterToNPC(577, ItemDropRule.Common(3856, 10)); + this.RegisterToNPC(564, ItemDropRule.Common(3864, 7)); + this.RegisterToNPC(564, ItemDropRule.MasterModeDropOnAllPlayers(4796, this._masterModeDropRng)); + this.RegisterToNPC(564, (IItemDropRule) new OneFromRulesRule(5, new IItemDropRule[2] + { + ItemDropRule.NotScalingWithLuck(3814), + ItemDropRule.NotScalingWithLuck(3815, minimumDropped: 4, maximumDropped: 4) + })); + this.RegisterToNPC(564, ItemDropRule.NormalvsExpertOneFromOptionsNotScalingWithLuck(3, 2, 3857, 3855)); + this.RegisterToNPC(565, ItemDropRule.Common(3864, 14)); + this.RegisterToNPC(565, ItemDropRule.MasterModeCommonDrop(4946)); + this.RegisterToNPC(565, ItemDropRule.MasterModeDropOnAllPlayers(4796, this._masterModeDropRng)); + this.RegisterToNPC(565, (IItemDropRule) new OneFromRulesRule(10, new IItemDropRule[2] + { + ItemDropRule.NotScalingWithLuck(3814), + ItemDropRule.NotScalingWithLuck(3815, minimumDropped: 4, maximumDropped: 4) + })); + this.RegisterToNPC(565, ItemDropRule.OneFromOptionsNotScalingWithLuck(6, 3857, 3855)); + } + + private void RegisterHardmodeFeathers() + { + this.RegisterToNPC(156, ItemDropRule.Common(1518, 75)); + this.RegisterToNPC(243, ItemDropRule.Common(1519, 3)); + this.RegisterToMultipleNPCs(ItemDropRule.Common(1517, 450), 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280); + this.RegisterToMultipleNPCs(ItemDropRule.Common(1520, 40), 159, 158); + this.RegisterToNPC(48, ItemDropRule.Common(1516, 200)); + this.RegisterToNPC(176, (IItemDropRule) new ItemDropWithConditionRule(1521, 150, 1, 1, (IItemDropRuleCondition) new Conditions.BeatAnyMechBoss())); + this.RegisterToNPC(205, (IItemDropRule) new ItemDropWithConditionRule(1611, 2, 1, 1, (IItemDropRuleCondition) new Conditions.BeatAnyMechBoss())); + } + + private void RegisterYoyos() + { + this.RegisterToGlobal((IItemDropRule) new ItemDropWithConditionRule(3282, 400, 1, 1, (IItemDropRuleCondition) new Conditions.YoyoCascade())); + this.RegisterToGlobal((IItemDropRule) new ItemDropWithConditionRule(3289, 300, 1, 1, (IItemDropRuleCondition) new Conditions.YoyosAmarok())); + this.RegisterToGlobal((IItemDropRule) new ItemDropWithConditionRule(3286, 200, 1, 1, (IItemDropRuleCondition) new Conditions.YoyosYelets())); + this.RegisterToGlobal((IItemDropRule) new ItemDropWithConditionRule(3291, 400, 1, 1, (IItemDropRuleCondition) new Conditions.YoyosKraken())); + this.RegisterToGlobal((IItemDropRule) new ItemDropWithConditionRule(3290, 400, 1, 1, (IItemDropRuleCondition) new Conditions.YoyosHelFire())); + } + + private void RegisterStatusImmunityItems() + { + this.RegisterToMultipleNPCs(ItemDropRule.StatusImmunityItem(3781, 100), 480); + this.RegisterToMultipleNPCs(ItemDropRule.StatusImmunityItem(885, 100), 104, 102, 269, 270, 271, 272); + this.RegisterToMultipleNPCs(ItemDropRule.StatusImmunityItem(886, 100), 77, 273, 274, 275, 276); + this.RegisterToMultipleNPCs(ItemDropRule.StatusImmunityItem(887, 100), 141, 176, 42, 231, 232, 233, 234, 235); + this.RegisterToMultipleNPCs(ItemDropRule.StatusImmunityItem(888, 100), 81, 79, 183, 630); + this.RegisterToMultipleNPCs(ItemDropRule.StatusImmunityItem(889, 100), 78, 82, 75); + this.RegisterToMultipleNPCs(ItemDropRule.StatusImmunityItem(890, 100), 103, 75, 79, 630); + this.RegisterToMultipleNPCs(ItemDropRule.StatusImmunityItem(891, 100), 34, 83, 84, 179, 289); + this.RegisterToMultipleNPCs(ItemDropRule.StatusImmunityItem(892, 100), 94, 182); + this.RegisterToMultipleNPCs(ItemDropRule.StatusImmunityItem(893, 100), 93, 109, 80); + } + + private void RegisterPirateDrops() + { + int[] numArray = new int[4]{ 212, 213, 214, 215 }; + this.RegisterToMultipleNPCs(ItemDropRule.Common(905, 8000), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(855, 4000), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(854, 2000), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(2584, 2000), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(3033, 1000), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(672, 200), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(1277, 500), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(1278, 500), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(1279, 500), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(1280, 500), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(1704, 300), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(1705, 300), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(1710, 300), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(1716, 300), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(1720, 300), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(2379, 300), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(2389, 300), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(2405, 300), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(2843, 300), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(3885, 300), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(2663, 300), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(3904, 150, 30, 50), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(3910, 300), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(2238, 300), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(2133, 300), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(2137, 300), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(2143, 300), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(2147, 300), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(2151, 300), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(2155, 300), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(3263, 500), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(3264, 500), numArray); + this.RegisterToMultipleNPCs(ItemDropRule.Common(3265, 500), numArray); + this.RegisterToNPC(216, ItemDropRule.Common(905, 2000)); + this.RegisterToNPC(216, ItemDropRule.Common(855, 1000)); + this.RegisterToNPC(216, ItemDropRule.Common(854, 500)); + this.RegisterToNPC(216, ItemDropRule.Common(2584, 500)); + this.RegisterToNPC(216, ItemDropRule.Common(3033, 250)); + this.RegisterToNPC(216, ItemDropRule.Common(672, 50)); + this.RegisterToNPC(491, ItemDropRule.Common(905, 400)); + this.RegisterToNPC(491, ItemDropRule.Common(855, 200)); + this.RegisterToNPC(491, ItemDropRule.Common(854, 100)); + this.RegisterToNPC(491, ItemDropRule.Common(2584, 100)); + this.RegisterToNPC(491, ItemDropRule.Common(3033, 50)); + this.RegisterToNPC(491, ItemDropRule.Common(4471, 20)); + this.RegisterToNPC(491, ItemDropRule.Common(672, 10)); + this.RegisterToNPC(491, ItemDropRule.MasterModeCommonDrop(4940)); + this.RegisterToNPC(491, ItemDropRule.MasterModeDropOnAllPlayers(4792, this._masterModeDropRng)); + } + + private void RegisterBloodMoonFishingEnemies() + { + } + + private void RegisterBossTrophies() + { + Conditions.LegacyHack_IsABoss legacyHackIsAboss = new Conditions.LegacyHack_IsABoss(); + this.RegisterToNPC(4, ItemDropRule.ByCondition((IItemDropRuleCondition) legacyHackIsAboss, 1360, 10)); + this.RegisterToNPC(13, ItemDropRule.ByCondition((IItemDropRuleCondition) legacyHackIsAboss, 1361, 10)); + this.RegisterToNPC(14, ItemDropRule.ByCondition((IItemDropRuleCondition) legacyHackIsAboss, 1361, 10)); + this.RegisterToNPC(15, ItemDropRule.ByCondition((IItemDropRuleCondition) legacyHackIsAboss, 1361, 10)); + this.RegisterToNPC(266, ItemDropRule.ByCondition((IItemDropRuleCondition) legacyHackIsAboss, 1362, 10)); + this.RegisterToNPC(35, ItemDropRule.ByCondition((IItemDropRuleCondition) legacyHackIsAboss, 1363, 10)); + this.RegisterToNPC(222, ItemDropRule.ByCondition((IItemDropRuleCondition) legacyHackIsAboss, 1364, 10)); + this.RegisterToNPC(113, ItemDropRule.ByCondition((IItemDropRuleCondition) legacyHackIsAboss, 1365, 10)); + this.RegisterToNPC(134, ItemDropRule.ByCondition((IItemDropRuleCondition) legacyHackIsAboss, 1366, 10)); + this.RegisterToNPC((int) sbyte.MaxValue, ItemDropRule.ByCondition((IItemDropRuleCondition) legacyHackIsAboss, 1367, 10)); + this.RegisterToNPC(262, ItemDropRule.ByCondition((IItemDropRuleCondition) legacyHackIsAboss, 1370, 10)); + this.RegisterToNPC(245, ItemDropRule.ByCondition((IItemDropRuleCondition) legacyHackIsAboss, 1371, 10)); + this.RegisterToNPC(50, ItemDropRule.ByCondition((IItemDropRuleCondition) legacyHackIsAboss, 2489, 10)); + this.RegisterToNPC(370, ItemDropRule.ByCondition((IItemDropRuleCondition) legacyHackIsAboss, 2589, 10)); + this.RegisterToNPC(439, ItemDropRule.ByCondition((IItemDropRuleCondition) legacyHackIsAboss, 3357, 10)); + this.RegisterToNPC(395, ItemDropRule.ByCondition((IItemDropRuleCondition) legacyHackIsAboss, 3358, 10)); + this.RegisterToNPC(398, ItemDropRule.ByCondition((IItemDropRuleCondition) legacyHackIsAboss, 3595, 10)); + this.RegisterToNPC(636, ItemDropRule.ByCondition((IItemDropRuleCondition) legacyHackIsAboss, 4783, 10)); + this.RegisterToNPC(657, ItemDropRule.ByCondition((IItemDropRuleCondition) legacyHackIsAboss, 4958, 10)); + this.RegisterToNPC(125, ItemDropRule.Common(1368, 10)); + this.RegisterToNPC(126, ItemDropRule.Common(1369, 10)); + this.RegisterToNPC(491, ItemDropRule.Common(3359, 10)); + this.RegisterToNPC(551, ItemDropRule.Common(3866, 10)); + this.RegisterToNPC(564, ItemDropRule.Common(3867, 10)); + this.RegisterToNPC(565, ItemDropRule.Common(3867, 10)); + this.RegisterToNPC(576, ItemDropRule.Common(3868, 10)); + this.RegisterToNPC(577, ItemDropRule.Common(3868, 10)); + } + + private void RegisterMartianDrops() + { + this.RegisterToMultipleNPCs(ItemDropRule.Common(2860, 8, 8, 20), 520, 383, 389, 385, 382, 381, 390, 386); + int[] numArray1 = new int[8] + { + 520, + 383, + 389, + 385, + 382, + 381, + 390, + 386 + }; + this.RegisterToMultipleNPCs(ItemDropRule.Common(2798, 800), numArray1); + this.RegisterToMultipleNPCs(ItemDropRule.Common(2800, 800), numArray1); + this.RegisterToMultipleNPCs(ItemDropRule.Common(2882, 800), numArray1); + int[] numArray2 = new int[3]{ 383, 389, 386 }; + this.RegisterToMultipleNPCs(ItemDropRule.Common(2806, 200), numArray2); + this.RegisterToMultipleNPCs(ItemDropRule.Common(2807, 200), numArray2); + this.RegisterToMultipleNPCs(ItemDropRule.Common(2808, 200), numArray2); + int[] numArray3 = new int[4]{ 385, 382, 381, 390 }; + this.RegisterToMultipleNPCs(ItemDropRule.Common(2803, 200), numArray3); + this.RegisterToMultipleNPCs(ItemDropRule.Common(2804, 200), numArray3); + this.RegisterToMultipleNPCs(ItemDropRule.Common(2805, 200), numArray3); + this.RegisterToNPC(395, ItemDropRule.OneFromOptionsNotScalingWithLuck(1, 2797, 2749, 2795, 2796, 2880, 2769)); + this.RegisterToNPC(395, ItemDropRule.MasterModeCommonDrop(4939)); + this.RegisterToNPC(395, ItemDropRule.MasterModeDropOnAllPlayers(4815, this._masterModeDropRng)); + this.RegisterToNPC(390, ItemDropRule.Common(2771, 100)); + } + + private void RegisterMiscDrops() + { + this.RegisterToNPC(68, ItemDropRule.Common(1169)); + this.RegisterToMultipleNPCs(ItemDropRule.Common(3086, minimumDropped: 5, maximumDropped: 10), 483, 482); + this.RegisterToNPC(77, ItemDropRule.Common(723, 150)); + this.RegisterToNPC(156, ItemDropRule.Common(683, 30)); + this.RegisterToMultipleNPCs(ItemDropRule.NormalvsExpert(3102, 2, 1), 195, 196); + this.RegisterToNPC(471, ItemDropRule.NormalvsExpertOneFromOptions(2, 1, 3052, 3053, 3054)); + this.RegisterToNPC(153, ItemDropRule.Common(1328, 17)); + this.RegisterToNPC(120, ItemDropRule.NormalvsExpert(1326, 500, 400)); + this.RegisterToNPC(84, ItemDropRule.Common(4758, 35)); + this.RegisterToNPC(49, ItemDropRule.Common(1325, 250)); + this.RegisterToNPC(634, ItemDropRule.Common(4764, 100)); + this.RegisterToNPC(185, ItemDropRule.Common(951, 150)); + this.RegisterToNPC(44, ItemDropRule.Common(1320, 50)); + this.RegisterToNPC(44, ItemDropRule.Common(88, 20)); + this.RegisterToNPC(60, ItemDropRule.Common(1322, 150)); + this.RegisterToNPC(151, ItemDropRule.Common(1322, 50)); + this.RegisterToNPC(24, ItemDropRule.Common(1323, 50)); + this.RegisterToNPC(109, ItemDropRule.Common(1324, 30, maximumDropped: 4)); + int[] numArray1 = new int[2]{ 163, 238 }; + this.RegisterToMultipleNPCs(ItemDropRule.Common(1308, 40), numArray1); + this.RegisterToMultipleNPCs((IItemDropRule) new DropBasedOnExpertMode(ItemDropRule.Common(2607, 2, maximumDropped: 3), (IItemDropRule) new CommonDrop(2607, 10, amountDroppedMaximum: 3, dropsXOutOfY: 9)), numArray1); + this.RegisterToMultipleNPCs(ItemDropRule.Common(1306, 180), 197, 206, 169, 154); + this.RegisterToNPC(244, ItemDropRule.Common(23, maximumDropped: 20)); + this.RegisterToNPC(244, ItemDropRule.Common(662, minimumDropped: 30, maximumDropped: 60)); + this.RegisterToNPC(250, ItemDropRule.Common(1244, 15)); + this.RegisterToNPC(172, ItemDropRule.Common(754)); + this.RegisterToNPC(172, ItemDropRule.Common(755)); + this.RegisterToNPC(110, ItemDropRule.Common(682, 200)); + this.RegisterToNPC(110, ItemDropRule.Common(1321, 80)); + this.RegisterToMultipleNPCs(ItemDropRule.Common(4428, 100), 170, 180, 171); + this.RegisterToMultipleNPCs((IItemDropRule) new ItemDropWithConditionRule(4613, 25, 1, 1, (IItemDropRuleCondition) new Conditions.WindyEnoughForKiteDrops()), 170, 180, 171); + this.RegisterToNPC(154, ItemDropRule.Common(1253, 100)); + this.RegisterToMultipleNPCs(ItemDropRule.Common(726, 50), 169, 206); + this.RegisterToNPC(243, ItemDropRule.Common(2161)); + this.RegisterToNPC(480, ItemDropRule.Common(3269, 50)); + int[] numArray2 = new int[3]{ 198, 199, 226 }; + this.RegisterToMultipleNPCs(ItemDropRule.Common(1172, 1000), numArray2); + this.RegisterToMultipleNPCs(ItemDropRule.Common(1293, 50), numArray2); + this.RegisterToMultipleNPCs(ItemDropRule.Common(2766, 7, maximumDropped: 2), numArray2); + int[] numArray3 = new int[4]{ 78, 79, 80, 630 }; + this.RegisterToMultipleNPCs(ItemDropRule.Common(870, 75), numArray3); + this.RegisterToMultipleNPCs(ItemDropRule.Common(871, 75), numArray3); + this.RegisterToMultipleNPCs(ItemDropRule.Common(872, 75), numArray3); + this.RegisterToNPC(473, ItemDropRule.OneFromOptions(1, 3008, 3014, 3012, 3015, 3023)); + this.RegisterToNPC(474, ItemDropRule.OneFromOptions(1, 3006, 3007, 3013, 3016, 3020)); + this.RegisterToNPC(475, ItemDropRule.OneFromOptions(1, 3029, 3030, 3051, 3022)); + int[] numArray4 = new int[3]{ 473, 474, 475 }; + this.RegisterToMultipleNPCs(ItemDropRule.Common(499, minimumDropped: 5, maximumDropped: 10), numArray4); + this.RegisterToMultipleNPCs(ItemDropRule.Common(500, minimumDropped: 5, maximumDropped: 15), numArray4); + this.RegisterToNPC(87, (IItemDropRule) new ItemDropWithConditionRule(4379, 25, 1, 1, (IItemDropRuleCondition) new Conditions.WindyEnoughForKiteDrops())); + this.RegisterToNPC(87, (IItemDropRule) new DropBasedOnExpertMode(ItemDropRule.Common(575, minimumDropped: 5, maximumDropped: 10), ItemDropRule.Common(575, minimumDropped: 10, maximumDropped: 20))); + this.RegisterToMultipleNPCs(ItemDropRule.OneFromOptions(50, 803, 804, 805), 161, 431); + this.RegisterToNPC(217, ItemDropRule.Common(1115)); + this.RegisterToNPC(218, ItemDropRule.Common(1116)); + this.RegisterToNPC(219, ItemDropRule.Common(1117)); + this.RegisterToNPC(220, ItemDropRule.Common(1118)); + this.RegisterToNPC(221, ItemDropRule.Common(1119)); + this.RegisterToNPC(167, ItemDropRule.Common(879, 50)); + this.RegisterToNPC(628, ItemDropRule.Common(313, 2, maximumDropped: 2)); + int[] numArray5 = new int[3]{ 143, 144, 145 }; + this.RegisterToMultipleNPCs(ItemDropRule.Common(593, minimumDropped: 5, maximumDropped: 10), numArray5); + this.RegisterToMultipleNPCs(ItemDropRule.Common(527, 10), 79, 630); + this.RegisterToNPC(80, ItemDropRule.Common(528, 10)); + this.RegisterToNPC(524, ItemDropRule.Common(3794, 10, maximumDropped: 3)); + this.RegisterToNPC(525, ItemDropRule.Common(3794, 10)); + this.RegisterToNPC(525, ItemDropRule.Common(522, 3, maximumDropped: 3)); + this.RegisterToNPC(525, ItemDropRule.Common(527, 15)); + this.RegisterToNPC(526, ItemDropRule.Common(3794, 10)); + this.RegisterToNPC(526, ItemDropRule.Common(1332, 3, maximumDropped: 3)); + this.RegisterToNPC(526, ItemDropRule.Common(527, 15)); + this.RegisterToNPC(527, ItemDropRule.Common(3794, 10)); + this.RegisterToNPC(527, ItemDropRule.Common(528, 15)); + this.RegisterToNPC(532, ItemDropRule.Common(3380, 3)); + this.RegisterToNPC(532, ItemDropRule.Common(3771, 50)); + this.RegisterToNPC(528, ItemDropRule.Common(2802, 25)); + this.RegisterToNPC(528, ItemDropRule.OneFromOptions(60, 3786, 3785, 3784)); + this.RegisterToNPC(529, ItemDropRule.Common(2801, 25)); + this.RegisterToNPC(529, ItemDropRule.OneFromOptions(40, 3786, 3785, 3784)); + this.RegisterToMultipleNPCs(ItemDropRule.Common(18, 100), 49, 51, 150, 93, 634); + this.RegisterToMultipleNPCs(ItemDropRule.Common(393, 50), 16, 185, 167, 197); + this.RegisterToNPC(58, ItemDropRule.Common(393, 75)); + int[] numArray6 = new int[13] + { + 494, + 495, + 496, + 497, + 498, + 499, + 500, + 501, + 502, + 503, + 504, + 505, + 506 + }; + this.RegisterToMultipleNPCs(ItemDropRule.Common(18, 80), numArray6).OnFailedRoll(ItemDropRule.Common(393, 80)).OnFailedRoll(ItemDropRule.Common(3285, 25)); + int[] numArray7 = new int[12] + { + 21, + 201, + 202, + 203, + 322, + 323, + 324, + 635, + 449, + 450, + 451, + 452 + }; + this.RegisterToMultipleNPCs(ItemDropRule.Common(954, 100), numArray7).OnFailedRoll(ItemDropRule.Common(955, 200)).OnFailedRoll(ItemDropRule.Common(1166, 200)).OnFailedRoll(ItemDropRule.Common(1274, 500)); + this.RegisterToNPC(6, ItemDropRule.OneFromOptions(175, 956, 957, 958)); + int[] numArray8 = new int[7] + { + 42, + 43, + 231, + 232, + 233, + 234, + 235 + }; + this.RegisterToMultipleNPCs(ItemDropRule.OneFromOptions(100, 960, 961, 962), numArray8); + int[] numArray9 = new int[5]{ 31, 32, 294, 295, 296 }; + this.RegisterToMultipleNPCs(ItemDropRule.Common(959, 450), numArray9); + this.RegisterToMultipleNPCs(ItemDropRule.Common(1307, 300), numArray9); + this.RegisterToMultipleNPCs(ItemDropRule.Common(996, 200), 174, 179, 182, 183, 98, 83, 94, 81, 101); + this.RegisterToMultipleNPCs(ItemDropRule.Common(522, minimumDropped: 2, maximumDropped: 5), 101, 98); + this.RegisterToNPC(98, ItemDropRule.ByCondition((IItemDropRuleCondition) new Conditions.WindyEnoughForKiteDrops(), 4611, 25)); + this.RegisterToNPC(86, ItemDropRule.Common(526)); + this.RegisterToNPC(86, ItemDropRule.Common(856, 100)); + this.RegisterToNPC(86, ItemDropRule.ByCondition((IItemDropRuleCondition) new Conditions.WindyEnoughForKiteDrops(), 4684, 25)); + this.RegisterToNPC(224, ItemDropRule.Common(4057, 100)); + this.RegisterToMultipleNPCs(ItemDropRule.Common(40, maximumDropped: 9), 186, 432); + this.RegisterToNPC(225, ItemDropRule.Common(1243, 45)).OnFailedRoll(ItemDropRule.Common(23, minimumDropped: 2, maximumDropped: 6)); + this.RegisterToNPC(537, ItemDropRule.Common(23, minimumDropped: 2, maximumDropped: 3)); + this.RegisterToNPC(537, ItemDropRule.NormalvsExpert(1309, 8000, 5600)); + int[] numArray10 = new int[4]{ 335, 336, 333, 334 }; + this.RegisterToMultipleNPCs(ItemDropRule.Common(1906, 20), numArray10); + this.RegisterToNPC(-4, ItemDropRule.Common(3111, minimumDropped: 25, maximumDropped: 50)); + this.RegisterToNPC(-4, ItemDropRule.NormalvsExpert(1309, 100, 70)); + int[] numArray11 = new int[15] + { + 1, + 16, + 138, + 141, + 147, + 184, + 187, + 433, + 204, + 302, + 333, + 334, + 335, + 336, + 535 + }; + int[] numArray12 = new int[4]{ -6, -7, -8, -9 }; + int[] numArray13 = new int[5]{ -6, -7, -8, -9, -4 }; + this.RemoveFromMultipleNPCs(this.RegisterToMultipleNPCs(ItemDropRule.Common(23, maximumDropped: 2), numArray11), numArray13); + this.RegisterToMultipleNPCs(ItemDropRule.Common(23, minimumDropped: 2, maximumDropped: 5), numArray12); + this.RemoveFromMultipleNPCs(this.RegisterToMultipleNPCs(ItemDropRule.NormalvsExpert(1309, 10000, 7000), numArray11), numArray13); + this.RegisterToMultipleNPCs(ItemDropRule.NormalvsExpert(1309, 10000, 7000), numArray12); + this.RegisterToNPC(75, ItemDropRule.Common(501, maximumDropped: 3)); + this.RegisterToMultipleNPCs(ItemDropRule.Common(23, minimumDropped: 2, maximumDropped: 4), 81, 183); + this.RegisterToNPC(122, ItemDropRule.Common(23, minimumDropped: 5, maximumDropped: 10)); + this.RegisterToNPC(71, ItemDropRule.Common(327)); + int[] numArray14 = new int[9] + { + 2, + 317, + 318, + 190, + 191, + 192, + 193, + 194, + 133 + }; + this.RegisterToMultipleNPCs(ItemDropRule.Common(236, 100), numArray14).OnFailedRoll(ItemDropRule.Common(38, 3)); + this.RegisterToNPC(133, ItemDropRule.ByCondition((IItemDropRuleCondition) new Conditions.WindyEnoughForKiteDrops(), 4683, 25)); + this.RegisterToNPC(104, ItemDropRule.Common(485, 60)); + this.RegisterToNPC(58, ItemDropRule.Common(263, 250)).OnFailedRoll(ItemDropRule.Common(118, 30)); + this.RegisterToNPC(102, ItemDropRule.Common(263, 250)); + int[] numArray15 = new int[23] + { + 3, + 591, + 590, + 331, + 332, + 132, + 161, + 186, + 187, + 188, + 189, + 200, + 223, + 319, + 320, + 321, + 430, + 431, + 432, + 433, + 434, + 435, + 436 + }; + this.RegisterToMultipleNPCs(ItemDropRule.Common(216, 50), numArray15); + this.RegisterToMultipleNPCs(ItemDropRule.Common(1304, 250), numArray15); + this.RegisterToMultipleNPCs(ItemDropRule.Common(8, minimumDropped: 5, maximumDropped: 20), 590, 591); + this.RegisterToMultipleNPCs(ItemDropRule.NormalvsExpert(3212, 150, 75), 489, 490); + this.RegisterToMultipleNPCs(ItemDropRule.NormalvsExpert(3213, 200, 100), 489, 490); + this.RegisterToNPC(223, ItemDropRule.OneFromOptions(20, 1135, 1136)); + this.RegisterToNPC(66, ItemDropRule.Common(267)); + this.RegisterToMultipleNPCs(ItemDropRule.Common(272, 35), 62, 66); + this.RegisterToNPC(52, ItemDropRule.Common(251)); + this.RegisterToNPC(53, ItemDropRule.Common(239)); + this.RegisterToNPC(536, ItemDropRule.Common(3478)); + this.RegisterToNPC(536, ItemDropRule.Common(3479)); + this.RegisterToMultipleNPCs(ItemDropRule.Common(323, 3, maximumDropped: 2), 69, 581, 580, 508, 509); + this.RegisterToNPC(582, ItemDropRule.Common(323, 6)); + this.RegisterToMultipleNPCs(ItemDropRule.Common(3772, 50), 581, 580, 508, 509); + this.RegisterToNPC(73, ItemDropRule.Common(362, maximumDropped: 2)); + int[] numArray16 = new int[2]{ 483, 482 }; + this.RegisterToMultipleNPCs(ItemDropRule.Common(3109, 30), numArray16); + this.RegisterToMultipleNPCs(ItemDropRule.Common(4400, 20), numArray16); + this.RegisterToMultipleNPCs(ItemDropRule.Common(68, 3), 6, 94); + this.RegisterToMultipleNPCs(ItemDropRule.Common(1330, 3), 181, 173, 239, 182, 240); + this.RegisterToMultipleNPCs(ItemDropRule.Common(68, 3, maximumDropped: 2), 7, 8, 9); + this.RegisterToMultipleNPCs(ItemDropRule.Common(69, minimumDropped: 3, maximumDropped: 8), 7, 8, 9); + this.RegisterToMultipleNPCs((IItemDropRule) new DropBasedOnExpertMode(ItemDropRule.Common(215, 50), ItemDropRule.WithRerolls(215, 1, 50)), 10, 11, 12, 95, 96, 97); + this.RegisterToMultipleNPCs(ItemDropRule.Common(243, 75), 47, 464); + this.RegisterToMultipleNPCs(ItemDropRule.OneFromOptions(50, 3757, 3758, 3759), 168, 470); + this.RegisterToNPC(533, ItemDropRule.Common(3795, 40)).OnFailedRoll(ItemDropRule.Common(3770, 30)); + int[] numArray17 = new int[3]{ 63, 103, 64 }; + this.RegisterToMultipleNPCs(ItemDropRule.Common(1303, 100), numArray17); + this.RegisterToMultipleNPCs(ItemDropRule.Common(282, maximumDropped: 4), numArray17); + this.RegisterToNPC(63, ItemDropRule.ByCondition((IItemDropRuleCondition) new Conditions.WindyEnoughForKiteDrops(), 4649, 50)); + this.RegisterToNPC(64, ItemDropRule.ByCondition((IItemDropRuleCondition) new Conditions.WindyEnoughForKiteDrops(), 4650, 50)); + this.RegisterToNPC(481, ItemDropRule.Common(3094, 2, 40, 80)); + this.RegisterToNPC(481, ItemDropRule.OneFromOptions(20, 3187, 3188, 3189)); + this.RegisterToNPC(481, ItemDropRule.Common(4463, 40)); + int[] numArray18 = new int[13] + { + 21, + 167, + 201, + 202, + 481, + 203, + 322, + 323, + 324, + 449, + 450, + 451, + 452 + }; + this.RegisterToMultipleNPCs(ItemDropRule.Common(118, 25), numArray18); + this.RegisterToNPC(44, ItemDropRule.Common(118, 25)).OnFailedRoll(ItemDropRule.OneFromOptions(20, 410, 411)).OnFailedRoll(ItemDropRule.Common(166, maximumDropped: 3)); + this.RegisterToNPC(45, ItemDropRule.Common(238)); + this.RegisterToNPC(23, ItemDropRule.Common(116, 50)); + this.RegisterToNPC(24, ItemDropRule.Common(244, 250)); + int[] numArray19 = new int[6] + { + 31, + 32, + 34, + 294, + 295, + 296 + }; + this.RegisterToMultipleNPCs(ItemDropRule.Common(932, 250), numArray19).OnFailedRoll(ItemDropRule.Common(3095, 100)).OnFailedRoll(ItemDropRule.Common(327, 65)).OnFailedRoll(ItemDropRule.ByCondition((IItemDropRuleCondition) new Conditions.NotExpert(), 154, maximumDropped: 3)); + this.RegisterToMultipleNPCs(ItemDropRule.ByCondition((IItemDropRuleCondition) new Conditions.IsExpert(), 154, minimumDropped: 2, maximumDropped: 6), numArray19); + int[] numArray20 = new int[5]{ 26, 27, 28, 29, 111 }; + this.RegisterToMultipleNPCs(ItemDropRule.Common(160, 200), numArray20).OnFailedRoll(ItemDropRule.Common(161, 2, maximumDropped: 5)); + this.RegisterToNPC(175, ItemDropRule.Common(1265, 100)); + this.RegisterToNPC(175, ItemDropRule.ByCondition((IItemDropRuleCondition) new Conditions.WindyEnoughForKiteDrops(), 4675, 25)); + this.RegisterToMultipleNPCs((IItemDropRule) new DropBasedOnExpertMode((IItemDropRule) new CommonDrop(209, 3, dropsXOutOfY: 2), ItemDropRule.Common(209)), 42, 231, 232, 233, 234, 235); + this.RegisterToNPC(204, ItemDropRule.NormalvsExpert(209, 2, 1)); + this.RegisterToNPC(43, ItemDropRule.NormalvsExpert(210, 2, 1)); + this.RegisterToNPC(43, ItemDropRule.ByCondition((IItemDropRuleCondition) new Conditions.WindyEnoughForKiteDrops(), 4648, 25)); + this.RegisterToNPC(39, ItemDropRule.ByCondition((IItemDropRuleCondition) new Conditions.WindyEnoughForKiteDrops(), 4610, 25)); + this.RegisterToNPC(65, ItemDropRule.ByCondition((IItemDropRuleCondition) new Conditions.WindyEnoughForKiteDrops(), 4651, 25)); + this.RegisterToNPC(65, ItemDropRule.Common(268, 50)).OnFailedRoll(ItemDropRule.Common(319)); + this.RegisterToNPC(48, ItemDropRule.NotScalingWithLuck(320, 2)); + this.RegisterToNPC(541, ItemDropRule.Common(3783)); + this.RegisterToMultipleNPCs(ItemDropRule.Common(319, 8), 542, 543, 544, 545); + this.RegisterToMultipleNPCs(ItemDropRule.ByCondition((IItemDropRuleCondition) new Conditions.WindyEnoughForKiteDrops(), 4669, 25), 542, 543, 544, 545); + this.RegisterToNPC(543, ItemDropRule.Common(527, 25)); + this.RegisterToNPC(544, ItemDropRule.Common(527, 25)); + this.RegisterToNPC(545, ItemDropRule.Common(528, 25)); + this.RegisterToNPC(47, ItemDropRule.ByCondition((IItemDropRuleCondition) new Conditions.WindyEnoughForKiteDrops(), 4670, 25)); + this.RegisterToNPC(464, ItemDropRule.ByCondition((IItemDropRuleCondition) new Conditions.WindyEnoughForKiteDrops(), 4671, 25)); + this.RegisterToNPC(268, ItemDropRule.Common(1332, minimumDropped: 2, maximumDropped: 5)); + this.RegisterToNPC(631, ItemDropRule.Common(3, minimumDropped: 10, maximumDropped: 20)); + this.RegisterToNPC(631, ItemDropRule.Common(4761, 20)); + int[] numArray21 = new int[1]{ 594 }; + LeadingConditionRule rule1 = new LeadingConditionRule((IItemDropRuleCondition) new Conditions.NeverTrue()); + int[] numArray22 = new int[0]; + IItemDropRule rule2 = rule1.OnSuccess(ItemDropRule.OneFromOptions(20, numArray22)); + int dropsOutOfY = 13; + rule2.OnSuccess((IItemDropRule) new CommonDrop(4367, dropsOutOfY)); + rule2.OnSuccess((IItemDropRule) new CommonDrop(4368, dropsOutOfY)); + rule2.OnSuccess((IItemDropRule) new CommonDrop(4369, dropsOutOfY)); + rule2.OnSuccess((IItemDropRule) new CommonDrop(4370, dropsOutOfY)); + rule2.OnSuccess((IItemDropRule) new CommonDrop(4371, dropsOutOfY)); + rule2.OnSuccess((IItemDropRule) new CommonDrop(4612, dropsOutOfY)); + rule2.OnSuccess((IItemDropRule) new CommonDrop(4674, dropsOutOfY)); + rule2.OnSuccess((IItemDropRule) new CommonDrop(4343, dropsOutOfY, dropsXOutOfY: 3)); + rule2.OnSuccess((IItemDropRule) new CommonDrop(4344, dropsOutOfY, dropsXOutOfY: 3)); + this.RegisterToMultipleNPCs((IItemDropRule) rule1, numArray21); + } + } +} diff --git a/GameContent/ItemDropRules/ItemDropResolver.cs b/GameContent/ItemDropRules/ItemDropResolver.cs new file mode 100644 index 0000000..ac94eba --- /dev/null +++ b/GameContent/ItemDropRules/ItemDropResolver.cs @@ -0,0 +1,65 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.ItemDropResolver +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.ItemDropRules +{ + public class ItemDropResolver + { + private ItemDropDatabase _database; + + public ItemDropResolver(ItemDropDatabase database) => this._database = database; + + public void TryDropping(DropAttemptInfo info) + { + List rulesForNpcid = this._database.GetRulesForNPCID(info.npc.netID); + for (int index = 0; index < rulesForNpcid.Count; ++index) + this.ResolveRule(rulesForNpcid[index], info); + } + + private ItemDropAttemptResult ResolveRule( + IItemDropRule rule, + DropAttemptInfo info) + { + if (!rule.CanDrop(info)) + { + ItemDropAttemptResult parentResult = new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.DoesntFillConditions + }; + this.ResolveRuleChains(rule, info, parentResult); + return parentResult; + } + ItemDropAttemptResult parentResult1 = !(rule is INestedItemDropRule nestedItemDropRule) ? rule.TryDroppingItem(info) : nestedItemDropRule.TryDroppingItem(info, new ItemDropRuleResolveAction(this.ResolveRule)); + this.ResolveRuleChains(rule, info, parentResult1); + return parentResult1; + } + + private void ResolveRuleChains( + IItemDropRule rule, + DropAttemptInfo info, + ItemDropAttemptResult parentResult) + { + this.ResolveRuleChains(ref info, ref parentResult, rule.ChainedRules); + } + + private void ResolveRuleChains( + ref DropAttemptInfo info, + ref ItemDropAttemptResult parentResult, + List ruleChains) + { + if (ruleChains == null) + return; + for (int index = 0; index < ruleChains.Count; ++index) + { + IItemDropRuleChainAttempt ruleChain = ruleChains[index]; + if (ruleChain.CanChainIntoRule(parentResult)) + this.ResolveRule(ruleChain.RuleToChain, info); + } + } + } +} diff --git a/GameContent/ItemDropRules/ItemDropRule.cs b/GameContent/ItemDropRules/ItemDropRule.cs new file mode 100644 index 0000000..70c19fc --- /dev/null +++ b/GameContent/ItemDropRules/ItemDropRule.cs @@ -0,0 +1,146 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.ItemDropRule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.ItemDropRules +{ + public class ItemDropRule + { + public static IItemDropRule Common( + int itemId, + int dropsOutOfX = 1, + int minimumDropped = 1, + int maximumDropped = 1) + { + return (IItemDropRule) new CommonDrop(itemId, dropsOutOfX, minimumDropped, maximumDropped); + } + + public static IItemDropRule BossBag(int itemId) => (IItemDropRule) new DropBasedOnExpertMode(ItemDropRule.DropNothing(), (IItemDropRule) new DropLocalPerClientAndResetsNPCMoneyTo0(itemId, 1, 1, 1, (IItemDropRuleCondition) null)); + + public static IItemDropRule BossBagByCondition( + IItemDropRuleCondition condition, + int itemId) + { + return (IItemDropRule) new DropBasedOnExpertMode(ItemDropRule.DropNothing(), (IItemDropRule) new DropLocalPerClientAndResetsNPCMoneyTo0(itemId, 1, 1, 1, condition)); + } + + public static IItemDropRule ExpertGetsRerolls( + int itemId, + int dropsOutOfX, + int expertRerolls) + { + return (IItemDropRule) new DropBasedOnExpertMode(ItemDropRule.WithRerolls(itemId, 0, dropsOutOfX), ItemDropRule.WithRerolls(itemId, expertRerolls, dropsOutOfX)); + } + + public static IItemDropRule MasterModeCommonDrop(int itemId) => ItemDropRule.ByCondition((IItemDropRuleCondition) new Conditions.IsMasterMode(), itemId); + + public static IItemDropRule MasterModeDropOnAllPlayers( + int itemId, + int dropsAtXOutOfY_TheY = 1) + { + return (IItemDropRule) new DropBasedOnMasterMode(ItemDropRule.DropNothing(), (IItemDropRule) new DropPerPlayerOnThePlayer(itemId, dropsAtXOutOfY_TheY, 1, 1, (IItemDropRuleCondition) new Conditions.IsMasterMode())); + } + + public static IItemDropRule WithRerolls( + int itemId, + int rerolls, + int dropsOutOfX = 1, + int minimumDropped = 1, + int maximumDropped = 1) + { + return (IItemDropRule) new CommonDropWithRerolls(itemId, dropsOutOfX, minimumDropped, maximumDropped, rerolls); + } + + public static IItemDropRule ByCondition( + IItemDropRuleCondition condition, + int itemId, + int dropsOutOfX = 1, + int minimumDropped = 1, + int maximumDropped = 1, + int dropsXOutOfY = 1) + { + return (IItemDropRule) new ItemDropWithConditionRule(itemId, dropsOutOfX, minimumDropped, maximumDropped, condition, dropsXOutOfY); + } + + public static IItemDropRule NotScalingWithLuck( + int itemId, + int dropsOutOfX = 1, + int minimumDropped = 1, + int maximumDropped = 1) + { + return (IItemDropRule) new CommonDrop(itemId, dropsOutOfX, minimumDropped, maximumDropped); + } + + public static IItemDropRule OneFromOptionsNotScalingWithLuck( + int dropsOutOfX, + params int[] options) + { + return (IItemDropRule) new OneFromOptionsNotScaledWithLuckDropRule(dropsOutOfX, 1, options); + } + + public static IItemDropRule OneFromOptionsNotScalingWithLuckWithX( + int dropsOutOfY, + int xOutOfY, + params int[] options) + { + return (IItemDropRule) new OneFromOptionsNotScaledWithLuckDropRule(dropsOutOfY, xOutOfY, options); + } + + public static IItemDropRule OneFromOptions(int dropsOutOfX, params int[] options) => (IItemDropRule) new OneFromOptionsDropRule(dropsOutOfX, 1, options); + + public static IItemDropRule OneFromOptionsWithX( + int dropsOutOfY, + int xOutOfY, + params int[] options) + { + return (IItemDropRule) new OneFromOptionsDropRule(dropsOutOfY, xOutOfY, options); + } + + public static IItemDropRule DropNothing() => (IItemDropRule) new Terraria.GameContent.ItemDropRules.DropNothing(); + + public static IItemDropRule NormalvsExpert( + int itemId, + int oncePerXInNormal, + int oncePerXInExpert) + { + return (IItemDropRule) new DropBasedOnExpertMode(ItemDropRule.Common(itemId, oncePerXInNormal), ItemDropRule.Common(itemId, oncePerXInExpert)); + } + + public static IItemDropRule NormalvsExpertNotScalingWithLuck( + int itemId, + int oncePerXInNormal, + int oncePerXInExpert) + { + return (IItemDropRule) new DropBasedOnExpertMode(ItemDropRule.NotScalingWithLuck(itemId, oncePerXInNormal), ItemDropRule.NotScalingWithLuck(itemId, oncePerXInExpert)); + } + + public static IItemDropRule NormalvsExpertOneFromOptionsNotScalingWithLuck( + int dropsOutOfXNormalMode, + int dropsOutOfXExpertMode, + params int[] options) + { + return (IItemDropRule) new DropBasedOnExpertMode(ItemDropRule.OneFromOptionsNotScalingWithLuck(dropsOutOfXNormalMode, options), ItemDropRule.OneFromOptionsNotScalingWithLuck(dropsOutOfXExpertMode, options)); + } + + public static IItemDropRule NormalvsExpertOneFromOptions( + int dropsOutOfXNormalMode, + int dropsOutOfXExpertMode, + params int[] options) + { + return (IItemDropRule) new DropBasedOnExpertMode(ItemDropRule.OneFromOptions(dropsOutOfXNormalMode, options), ItemDropRule.OneFromOptions(dropsOutOfXExpertMode, options)); + } + + public static IItemDropRule Food( + int itemId, + int dropsOutOfX, + int minimumDropped = 1, + int maximumDropped = 1) + { + return (IItemDropRule) new ItemDropWithConditionRule(itemId, dropsOutOfX, minimumDropped, maximumDropped, (IItemDropRuleCondition) new Conditions.NotFromStatue()); + } + + public static IItemDropRule StatusImmunityItem(int itemId, int dropsOutOfX) => ItemDropRule.ExpertGetsRerolls(itemId, dropsOutOfX, 1); + } +} diff --git a/GameContent/ItemDropRules/ItemDropRuleResolveAction.cs b/GameContent/ItemDropRules/ItemDropRuleResolveAction.cs new file mode 100644 index 0000000..61e1f0a --- /dev/null +++ b/GameContent/ItemDropRules/ItemDropRuleResolveAction.cs @@ -0,0 +1,12 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.ItemDropRuleResolveAction +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.ItemDropRules +{ + public delegate ItemDropAttemptResult ItemDropRuleResolveAction( + IItemDropRule rule, + DropAttemptInfo info); +} diff --git a/GameContent/ItemDropRules/ItemDropWithConditionRule.cs b/GameContent/ItemDropRules/ItemDropWithConditionRule.cs new file mode 100644 index 0000000..857dd34 --- /dev/null +++ b/GameContent/ItemDropRules/ItemDropWithConditionRule.cs @@ -0,0 +1,39 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.ItemDropWithConditionRule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.ItemDropRules +{ + public class ItemDropWithConditionRule : CommonDrop + { + private IItemDropRuleCondition _condition; + + public ItemDropWithConditionRule( + int itemId, + int dropsOutOfY, + int amountDroppedMinimum, + int amountDroppedMaximum, + IItemDropRuleCondition condition, + int dropsXOutOfY = 1) + : base(itemId, dropsOutOfY, amountDroppedMinimum, amountDroppedMaximum, dropsXOutOfY) + { + this._condition = condition; + } + + public override bool CanDrop(DropAttemptInfo info) => this._condition.CanDrop(info); + + public override void ReportDroprates(List drops, DropRateInfoChainFeed ratesInfo) + { + DropRateInfoChainFeed ratesInfo1 = ratesInfo.With(1f); + ratesInfo1.AddCondition(this._condition); + float personalDropRate = (float) this._dropsXoutOfY / (float) this._dropsOutOfY; + float dropRate = personalDropRate * ratesInfo1.parentDroprateChance; + drops.Add(new DropRateInfo(this._itemId, this._amtDroppedMinimum, this._amtDroppedMaximum, dropRate, ratesInfo1.conditions)); + Chains.ReportDroprates(this.ChainedRules, personalDropRate, drops, ratesInfo1); + } + } +} diff --git a/GameContent/ItemDropRules/LeadingConditionRule.cs b/GameContent/ItemDropRules/LeadingConditionRule.cs new file mode 100644 index 0000000..fc8170a --- /dev/null +++ b/GameContent/ItemDropRules/LeadingConditionRule.cs @@ -0,0 +1,36 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.LeadingConditionRule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.ItemDropRules +{ + public class LeadingConditionRule : IItemDropRule + { + private IItemDropRuleCondition _condition; + + public List ChainedRules { get; private set; } + + public LeadingConditionRule(IItemDropRuleCondition condition) + { + this._condition = condition; + this.ChainedRules = new List(); + } + + public bool CanDrop(DropAttemptInfo info) => this._condition.CanDrop(info); + + public void ReportDroprates(List drops, DropRateInfoChainFeed ratesInfo) + { + ratesInfo.AddCondition(this._condition); + Chains.ReportDroprates(this.ChainedRules, 1f, drops, ratesInfo); + } + + public ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info) => new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.Success + }; + } +} diff --git a/GameContent/ItemDropRules/MechBossSpawnersDropRule.cs b/GameContent/ItemDropRules/MechBossSpawnersDropRule.cs new file mode 100644 index 0000000..8de8221 --- /dev/null +++ b/GameContent/ItemDropRules/MechBossSpawnersDropRule.cs @@ -0,0 +1,64 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.MechBossSpawnersDropRule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.ItemDropRules +{ + public class MechBossSpawnersDropRule : IItemDropRule + { + private Conditions.MechanicalBossesDummyCondition _dummyCondition = new Conditions.MechanicalBossesDummyCondition(); + + public List ChainedRules { get; private set; } + + public MechBossSpawnersDropRule() => this.ChainedRules = new List(); + + public bool CanDrop(DropAttemptInfo info) => (double) info.npc.value > 0.0 && Main.hardMode && (!NPC.downedMechBoss1 || !NPC.downedMechBoss2 || !NPC.downedMechBoss3) && !info.IsInSimulation; + + public ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info) + { + if (!NPC.downedMechBoss1 && info.player.RollLuck(2500) == 0) + { + CommonCode.DropItemFromNPC(info.npc, 556, 1); + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.Success + }; + } + if (!NPC.downedMechBoss2 && info.player.RollLuck(2500) == 0) + { + CommonCode.DropItemFromNPC(info.npc, 544, 1); + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.Success + }; + } + if (!NPC.downedMechBoss3 && info.player.RollLuck(2500) == 0) + { + CommonCode.DropItemFromNPC(info.npc, 557, 1); + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.Success + }; + } + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.FailedRandomRoll + }; + } + + public void ReportDroprates(List drops, DropRateInfoChainFeed ratesInfo) + { + ratesInfo.AddCondition((IItemDropRuleCondition) this._dummyCondition); + float personalDropRate = 0.0004f; + float dropRate = personalDropRate * ratesInfo.parentDroprateChance; + drops.Add(new DropRateInfo(556, 1, 1, dropRate, ratesInfo.conditions)); + drops.Add(new DropRateInfo(544, 1, 1, dropRate, ratesInfo.conditions)); + drops.Add(new DropRateInfo(557, 1, 1, dropRate, ratesInfo.conditions)); + Chains.ReportDroprates(this.ChainedRules, personalDropRate, drops, ratesInfo); + } + } +} diff --git a/GameContent/ItemDropRules/OneFromOptionsDropRule.cs b/GameContent/ItemDropRules/OneFromOptionsDropRule.cs new file mode 100644 index 0000000..47754ce --- /dev/null +++ b/GameContent/ItemDropRules/OneFromOptionsDropRule.cs @@ -0,0 +1,54 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.OneFromOptionsDropRule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.ItemDropRules +{ + public class OneFromOptionsDropRule : IItemDropRule + { + private int[] _dropIds; + private int _outOfY; + private int _xoutOfY; + + public List ChainedRules { get; private set; } + + public OneFromOptionsDropRule(int outOfY, int xoutOfY, params int[] options) + { + this._outOfY = outOfY; + this._xoutOfY = xoutOfY; + this._dropIds = options; + this.ChainedRules = new List(); + } + + public bool CanDrop(DropAttemptInfo info) => true; + + public ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info) + { + if (info.player.RollLuck(this._outOfY) < this._xoutOfY) + { + CommonCode.DropItemFromNPC(info.npc, this._dropIds[info.rng.Next(this._dropIds.Length)], 1); + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.Success + }; + } + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.FailedRandomRoll + }; + } + + public void ReportDroprates(List drops, DropRateInfoChainFeed ratesInfo) + { + float personalDropRate = (float) this._xoutOfY / (float) this._outOfY; + float dropRate = 1f / (float) this._dropIds.Length * (personalDropRate * ratesInfo.parentDroprateChance); + for (int index = 0; index < this._dropIds.Length; ++index) + drops.Add(new DropRateInfo(this._dropIds[index], 1, 1, dropRate, ratesInfo.conditions)); + Chains.ReportDroprates(this.ChainedRules, personalDropRate, drops, ratesInfo); + } + } +} diff --git a/GameContent/ItemDropRules/OneFromOptionsNotScaledWithLuckDropRule.cs b/GameContent/ItemDropRules/OneFromOptionsNotScaledWithLuckDropRule.cs new file mode 100644 index 0000000..9202e04 --- /dev/null +++ b/GameContent/ItemDropRules/OneFromOptionsNotScaledWithLuckDropRule.cs @@ -0,0 +1,54 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.OneFromOptionsNotScaledWithLuckDropRule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.ItemDropRules +{ + public class OneFromOptionsNotScaledWithLuckDropRule : IItemDropRule + { + private int[] _dropIds; + private int _outOfY; + private int _xoutOfY; + + public List ChainedRules { get; private set; } + + public OneFromOptionsNotScaledWithLuckDropRule(int outOfY, int xoutOfY, params int[] options) + { + this._outOfY = outOfY; + this._dropIds = options; + this._xoutOfY = xoutOfY; + this.ChainedRules = new List(); + } + + public bool CanDrop(DropAttemptInfo info) => true; + + public ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info) + { + if (info.rng.Next(this._outOfY) < this._xoutOfY) + { + CommonCode.DropItemFromNPC(info.npc, this._dropIds[info.rng.Next(this._dropIds.Length)], 1); + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.Success + }; + } + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.FailedRandomRoll + }; + } + + public void ReportDroprates(List drops, DropRateInfoChainFeed ratesInfo) + { + float personalDropRate = (float) this._xoutOfY / (float) this._outOfY; + float dropRate = 1f / (float) this._dropIds.Length * (personalDropRate * ratesInfo.parentDroprateChance); + for (int index = 0; index < this._dropIds.Length; ++index) + drops.Add(new DropRateInfo(this._dropIds[index], 1, 1, dropRate, ratesInfo.conditions)); + Chains.ReportDroprates(this.ChainedRules, personalDropRate, drops, ratesInfo); + } + } +} diff --git a/GameContent/ItemDropRules/OneFromRulesRule.cs b/GameContent/ItemDropRules/OneFromRulesRule.cs new file mode 100644 index 0000000..bb135d4 --- /dev/null +++ b/GameContent/ItemDropRules/OneFromRulesRule.cs @@ -0,0 +1,60 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.OneFromRulesRule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.ItemDropRules +{ + public class OneFromRulesRule : IItemDropRule, INestedItemDropRule + { + private IItemDropRule[] _options; + private int _outOfY; + + public List ChainedRules { get; private set; } + + public OneFromRulesRule(int outOfY, params IItemDropRule[] options) + { + this._outOfY = outOfY; + this._options = options; + this.ChainedRules = new List(); + } + + public bool CanDrop(DropAttemptInfo info) => true; + + public ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info) => new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.DidNotRunCode + }; + + public ItemDropAttemptResult TryDroppingItem( + DropAttemptInfo info, + ItemDropRuleResolveAction resolveAction) + { + if (info.rng.Next(this._outOfY) == 0) + { + int index = info.rng.Next(this._options.Length); + ItemDropAttemptResult dropAttemptResult = resolveAction(this._options[index], info); + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.Success + }; + } + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.FailedRandomRoll + }; + } + + public void ReportDroprates(List drops, DropRateInfoChainFeed ratesInfo) + { + float personalDropRate = 1f / (float) this._outOfY; + float multiplier = 1f / (float) this._options.Length * (personalDropRate * ratesInfo.parentDroprateChance); + for (int index = 0; index < this._options.Length; ++index) + this._options[index].ReportDroprates(drops, ratesInfo.With(multiplier)); + Chains.ReportDroprates(this.ChainedRules, personalDropRate, drops, ratesInfo); + } + } +} diff --git a/GameContent/ItemDropRules/SlimeBodyItemDropRule.cs b/GameContent/ItemDropRules/SlimeBodyItemDropRule.cs new file mode 100644 index 0000000..75b1c27 --- /dev/null +++ b/GameContent/ItemDropRules/SlimeBodyItemDropRule.cs @@ -0,0 +1,81 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemDropRules.SlimeBodyItemDropRule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.ItemDropRules +{ + public class SlimeBodyItemDropRule : IItemDropRule + { + public List ChainedRules { get; private set; } + + public SlimeBodyItemDropRule() => this.ChainedRules = new List(); + + public bool CanDrop(DropAttemptInfo info) => info.npc.type == 1 && (double) info.npc.ai[1] > 0.0 && (double) info.npc.ai[1] < 5045.0; + + public ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info) + { + int itemId = (int) info.npc.ai[1]; + int amountDroppedMinimum; + int amountDroppedMaximum; + this.GetDropInfo(itemId, out amountDroppedMinimum, out amountDroppedMaximum); + CommonCode.DropItemFromNPC(info.npc, itemId, info.rng.Next(amountDroppedMinimum, amountDroppedMaximum + 1)); + return new ItemDropAttemptResult() + { + State = ItemDropAttemptResultState.Success + }; + } + + private void GetDropInfo( + int itemId, + out int amountDroppedMinimum, + out int amountDroppedMaximum) + { + amountDroppedMinimum = 1; + amountDroppedMaximum = 1; + switch (itemId) + { + case 8: + amountDroppedMinimum = 5; + amountDroppedMaximum = 10; + break; + case 11: + case 12: + case 13: + case 14: + case 699: + case 700: + case 701: + case 702: + amountDroppedMinimum = 3; + amountDroppedMaximum = 13; + break; + case 71: + amountDroppedMinimum = 50; + amountDroppedMaximum = 99; + break; + case 72: + amountDroppedMinimum = 20; + amountDroppedMaximum = 99; + break; + case 73: + amountDroppedMinimum = 1; + amountDroppedMaximum = 2; + break; + case 166: + amountDroppedMinimum = 2; + amountDroppedMaximum = 6; + break; + case 965: + amountDroppedMinimum = 20; + amountDroppedMaximum = 45; + break; + } + } + + public void ReportDroprates(List drops, DropRateInfoChainFeed ratesInfo) => Chains.ReportDroprates(this.ChainedRules, 1f, drops, ratesInfo); + } +} diff --git a/GameContent/ItemShopSellbackHelper.cs b/GameContent/ItemShopSellbackHelper.cs new file mode 100644 index 0000000..9bff538 --- /dev/null +++ b/GameContent/ItemShopSellbackHelper.cs @@ -0,0 +1,62 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ItemShopSellbackHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; + +namespace Terraria.GameContent +{ + public class ItemShopSellbackHelper + { + private List _memos = new List(); + + public void Add(Item item) + { + ItemShopSellbackHelper.ItemMemo itemMemo = this._memos.Find((Predicate) (x => x.Matches(item))); + if (itemMemo != null) + itemMemo.stack += item.stack; + else + this._memos.Add(new ItemShopSellbackHelper.ItemMemo(item)); + } + + public void Clear() => this._memos.Clear(); + + public int GetAmount(Item item) + { + ItemShopSellbackHelper.ItemMemo itemMemo = this._memos.Find((Predicate) (x => x.Matches(item))); + return itemMemo != null ? itemMemo.stack : 0; + } + + public int Remove(Item item) + { + ItemShopSellbackHelper.ItemMemo itemMemo = this._memos.Find((Predicate) (x => x.Matches(item))); + if (itemMemo == null) + return 0; + int stack = itemMemo.stack; + itemMemo.stack -= item.stack; + if (itemMemo.stack > 0) + return stack - itemMemo.stack; + this._memos.Remove(itemMemo); + return stack; + } + + private class ItemMemo + { + public readonly int itemNetID; + public readonly int itemPrefix; + public int stack; + + public ItemMemo(Item item) + { + this.itemNetID = item.netID; + this.itemPrefix = (int) item.prefix; + this.stack = item.stack; + } + + public bool Matches(Item item) => item.netID == this.itemNetID && (int) item.prefix == this.itemPrefix; + } + } +} diff --git a/GameContent/Liquid/LiquidRenderer.cs b/GameContent/Liquid/LiquidRenderer.cs new file mode 100644 index 0000000..b2dfb66 --- /dev/null +++ b/GameContent/Liquid/LiquidRenderer.cs @@ -0,0 +1,607 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Liquid.LiquidRenderer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.Graphics; +using Terraria.ID; +using Terraria.Utilities; + +namespace Terraria.GameContent.Liquid +{ + public class LiquidRenderer + { + private const int ANIMATION_FRAME_COUNT = 16; + private const int CACHE_PADDING = 2; + private const int CACHE_PADDING_2 = 4; + private static readonly int[] WATERFALL_LENGTH = new int[3] + { + 10, + 3, + 2 + }; + private static readonly float[] DEFAULT_OPACITY = new float[3] + { + 0.6f, + 0.95f, + 0.95f + }; + private static readonly byte[] WAVE_MASK_STRENGTH = new byte[5] + { + (byte) 0, + (byte) 0, + (byte) 0, + byte.MaxValue, + (byte) 0 + }; + private static readonly byte[] VISCOSITY_MASK = new byte[5] + { + (byte) 0, + (byte) 200, + (byte) 240, + (byte) 0, + (byte) 0 + }; + public const float MIN_LIQUID_SIZE = 0.25f; + public static LiquidRenderer Instance; + private readonly Asset[] _liquidTextures = new Asset[13]; + private LiquidRenderer.LiquidCache[] _cache = new LiquidRenderer.LiquidCache[1]; + private LiquidRenderer.LiquidDrawCache[] _drawCache = new LiquidRenderer.LiquidDrawCache[1]; + private int _animationFrame; + private Rectangle _drawArea = new Rectangle(0, 0, 1, 1); + private readonly UnifiedRandom _random = new UnifiedRandom(); + private Color[] _waveMask = new Color[1]; + private float _frameState; + + public event Action WaveFilters; + + private static Tile[,] Tiles => Main.tile; + + public static void LoadContent() + { + LiquidRenderer.Instance = new LiquidRenderer(); + LiquidRenderer.Instance.PrepareAssets(); + } + + private void PrepareAssets() + { + for (int index = 0; index < this._liquidTextures.Length; ++index) + this._liquidTextures[index] = Main.Assets.Request("Images/Misc/water_" + (object) index, (AssetRequestMode) 1); + } + + private unsafe void InternalPrepareDraw(Rectangle drawArea) + { + Rectangle rectangle = new Rectangle(drawArea.X - 2, drawArea.Y - 2, drawArea.Width + 4, drawArea.Height + 4); + this._drawArea = drawArea; + if (this._cache.Length < rectangle.Width * rectangle.Height + 1) + this._cache = new LiquidRenderer.LiquidCache[rectangle.Width * rectangle.Height + 1]; + if (this._drawCache.Length < drawArea.Width * drawArea.Height + 1) + this._drawCache = new LiquidRenderer.LiquidDrawCache[drawArea.Width * drawArea.Height + 1]; + if (this._waveMask.Length < drawArea.Width * drawArea.Height) + this._waveMask = new Color[drawArea.Width * drawArea.Height]; + fixed (LiquidRenderer.LiquidCache* liquidCachePtr1 = &this._cache[1]) + { + int num1 = rectangle.Height * 2 + 2; + LiquidRenderer.LiquidCache* liquidCachePtr2 = liquidCachePtr1; + for (int x = rectangle.X; x < rectangle.X + rectangle.Width; ++x) + { + for (int y = rectangle.Y; y < rectangle.Y + rectangle.Height; ++y) + { + Tile tile = LiquidRenderer.Tiles[x, y] ?? new Tile(); + liquidCachePtr2->LiquidLevel = (float) tile.liquid / (float) byte.MaxValue; + liquidCachePtr2->IsHalfBrick = tile.halfBrick() && liquidCachePtr2[-1].HasLiquid && !TileID.Sets.Platforms[(int) tile.type]; + liquidCachePtr2->IsSolid = WorldGen.SolidOrSlopedTile(tile); + liquidCachePtr2->HasLiquid = tile.liquid > (byte) 0; + liquidCachePtr2->VisibleLiquidLevel = 0.0f; + liquidCachePtr2->HasWall = tile.wall > (ushort) 0; + liquidCachePtr2->Type = tile.liquidType(); + if (liquidCachePtr2->IsHalfBrick && !liquidCachePtr2->HasLiquid) + liquidCachePtr2->Type = liquidCachePtr2[-1].Type; + ++liquidCachePtr2; + } + } + LiquidRenderer.LiquidCache* liquidCachePtr3 = liquidCachePtr1 + num1; + for (int index1 = 2; index1 < rectangle.Width - 2; ++index1) + { + for (int index2 = 2; index2 < rectangle.Height - 2; ++index2) + { + float val1 = 0.0f; + float num2; + if (liquidCachePtr3->IsHalfBrick && liquidCachePtr3[-1].HasLiquid) + num2 = 1f; + else if (!liquidCachePtr3->HasLiquid) + { + LiquidRenderer.LiquidCache liquidCache1 = liquidCachePtr3[-1]; + LiquidRenderer.LiquidCache liquidCache2 = liquidCachePtr3[1]; + LiquidRenderer.LiquidCache liquidCache3 = liquidCachePtr3[-rectangle.Height]; + LiquidRenderer.LiquidCache liquidCache4 = liquidCachePtr3[rectangle.Height]; + if (liquidCache1.HasLiquid && liquidCache2.HasLiquid && (int) liquidCache1.Type == (int) liquidCache2.Type && !liquidCache1.IsSolid && !liquidCache2.IsSolid) + { + val1 = liquidCache1.LiquidLevel + liquidCache2.LiquidLevel; + liquidCachePtr3->Type = liquidCache1.Type; + } + if (liquidCache3.HasLiquid && liquidCache4.HasLiquid && (int) liquidCache3.Type == (int) liquidCache4.Type && !liquidCache3.IsSolid && !liquidCache4.IsSolid) + { + val1 = Math.Max(val1, liquidCache3.LiquidLevel + liquidCache4.LiquidLevel); + liquidCachePtr3->Type = liquidCache3.Type; + } + num2 = val1 * 0.5f; + } + else + num2 = liquidCachePtr3->LiquidLevel; + liquidCachePtr3->VisibleLiquidLevel = num2; + liquidCachePtr3->HasVisibleLiquid = (double) num2 != 0.0; + ++liquidCachePtr3; + } + liquidCachePtr3 += 4; + } + LiquidRenderer.LiquidCache* liquidCachePtr4 = liquidCachePtr1; + for (int index3 = 0; index3 < rectangle.Width; ++index3) + { + for (int index4 = 0; index4 < rectangle.Height - 10; ++index4) + { + if (liquidCachePtr4->HasVisibleLiquid && (!liquidCachePtr4->IsSolid || liquidCachePtr4->IsHalfBrick)) + { + liquidCachePtr4->Opacity = 1f; + liquidCachePtr4->VisibleType = liquidCachePtr4->Type; + float num3 = 1f / (float) (LiquidRenderer.WATERFALL_LENGTH[(int) liquidCachePtr4->Type] + 1); + float num4 = 1f; + for (int index5 = 1; index5 <= LiquidRenderer.WATERFALL_LENGTH[(int) liquidCachePtr4->Type]; ++index5) + { + num4 -= num3; + if (!liquidCachePtr4[index5].IsSolid) + { + liquidCachePtr4[index5].VisibleLiquidLevel = Math.Max(liquidCachePtr4[index5].VisibleLiquidLevel, liquidCachePtr4->VisibleLiquidLevel * num4); + liquidCachePtr4[index5].Opacity = num4; + liquidCachePtr4[index5].VisibleType = liquidCachePtr4->Type; + } + else + break; + } + } + if (liquidCachePtr4->IsSolid && !liquidCachePtr4->IsHalfBrick) + { + liquidCachePtr4->VisibleLiquidLevel = 1f; + liquidCachePtr4->HasVisibleLiquid = false; + } + else + liquidCachePtr4->HasVisibleLiquid = (double) liquidCachePtr4->VisibleLiquidLevel != 0.0; + ++liquidCachePtr4; + } + liquidCachePtr4 += 10; + } + LiquidRenderer.LiquidCache* liquidCachePtr5 = liquidCachePtr1 + num1; + for (int index6 = 2; index6 < rectangle.Width - 2; ++index6) + { + for (int index7 = 2; index7 < rectangle.Height - 2; ++index7) + { + if (!liquidCachePtr5->HasVisibleLiquid) + { + liquidCachePtr5->HasLeftEdge = false; + liquidCachePtr5->HasTopEdge = false; + liquidCachePtr5->HasRightEdge = false; + liquidCachePtr5->HasBottomEdge = false; + } + else + { + LiquidRenderer.LiquidCache liquidCache5 = liquidCachePtr5[-1]; + LiquidRenderer.LiquidCache liquidCache6 = liquidCachePtr5[1]; + LiquidRenderer.LiquidCache liquidCache7 = liquidCachePtr5[-rectangle.Height]; + LiquidRenderer.LiquidCache liquidCache8 = liquidCachePtr5[rectangle.Height]; + float num5 = 0.0f; + float num6 = 1f; + float num7 = 0.0f; + float num8 = 1f; + float visibleLiquidLevel = liquidCachePtr5->VisibleLiquidLevel; + if (!liquidCache5.HasVisibleLiquid) + num7 += liquidCache6.VisibleLiquidLevel * (1f - visibleLiquidLevel); + if (!liquidCache6.HasVisibleLiquid && !liquidCache6.IsSolid && !liquidCache6.IsHalfBrick) + num8 -= liquidCache5.VisibleLiquidLevel * (1f - visibleLiquidLevel); + if (!liquidCache7.HasVisibleLiquid && !liquidCache7.IsSolid && !liquidCache7.IsHalfBrick) + num5 += liquidCache8.VisibleLiquidLevel * (1f - visibleLiquidLevel); + if (!liquidCache8.HasVisibleLiquid && !liquidCache8.IsSolid && !liquidCache8.IsHalfBrick) + num6 -= liquidCache7.VisibleLiquidLevel * (1f - visibleLiquidLevel); + liquidCachePtr5->LeftWall = num5; + liquidCachePtr5->RightWall = num6; + liquidCachePtr5->BottomWall = num8; + liquidCachePtr5->TopWall = num7; + Point zero = Point.Zero; + liquidCachePtr5->HasTopEdge = !liquidCache5.HasVisibleLiquid && !liquidCache5.IsSolid || (double) num7 != 0.0; + liquidCachePtr5->HasBottomEdge = !liquidCache6.HasVisibleLiquid && !liquidCache6.IsSolid || (double) num8 != 1.0; + liquidCachePtr5->HasLeftEdge = !liquidCache7.HasVisibleLiquid && !liquidCache7.IsSolid || (double) num5 != 0.0; + liquidCachePtr5->HasRightEdge = !liquidCache8.HasVisibleLiquid && !liquidCache8.IsSolid || (double) num6 != 1.0; + if (!liquidCachePtr5->HasLeftEdge) + { + if (liquidCachePtr5->HasRightEdge) + zero.X += 32; + else + zero.X += 16; + } + if (liquidCachePtr5->HasLeftEdge && liquidCachePtr5->HasRightEdge) + { + zero.X = 16; + zero.Y += 32; + if (liquidCachePtr5->HasTopEdge) + zero.Y = 16; + } + else if (!liquidCachePtr5->HasTopEdge) + { + if (!liquidCachePtr5->HasLeftEdge && !liquidCachePtr5->HasRightEdge) + zero.Y += 48; + else + zero.Y += 16; + } + if (zero.Y == 16 && liquidCachePtr5->HasLeftEdge ^ liquidCachePtr5->HasRightEdge && (index7 + rectangle.Y) % 2 == 0) + zero.Y += 16; + liquidCachePtr5->FrameOffset = zero; + } + ++liquidCachePtr5; + } + liquidCachePtr5 += 4; + } + LiquidRenderer.LiquidCache* liquidCachePtr6 = liquidCachePtr1 + num1; + for (int index8 = 2; index8 < rectangle.Width - 2; ++index8) + { + for (int index9 = 2; index9 < rectangle.Height - 2; ++index9) + { + if (liquidCachePtr6->HasVisibleLiquid) + { + LiquidRenderer.LiquidCache liquidCache9 = liquidCachePtr6[-1]; + LiquidRenderer.LiquidCache liquidCache10 = liquidCachePtr6[1]; + LiquidRenderer.LiquidCache liquidCache11 = liquidCachePtr6[-rectangle.Height]; + LiquidRenderer.LiquidCache liquidCache12 = liquidCachePtr6[rectangle.Height]; + liquidCachePtr6->VisibleLeftWall = liquidCachePtr6->LeftWall; + liquidCachePtr6->VisibleRightWall = liquidCachePtr6->RightWall; + liquidCachePtr6->VisibleTopWall = liquidCachePtr6->TopWall; + liquidCachePtr6->VisibleBottomWall = liquidCachePtr6->BottomWall; + if (liquidCache9.HasVisibleLiquid && liquidCache10.HasVisibleLiquid) + { + if (liquidCachePtr6->HasLeftEdge) + liquidCachePtr6->VisibleLeftWall = (float) (((double) liquidCachePtr6->LeftWall * 2.0 + (double) liquidCache9.LeftWall + (double) liquidCache10.LeftWall) * 0.25); + if (liquidCachePtr6->HasRightEdge) + liquidCachePtr6->VisibleRightWall = (float) (((double) liquidCachePtr6->RightWall * 2.0 + (double) liquidCache9.RightWall + (double) liquidCache10.RightWall) * 0.25); + } + if (liquidCache11.HasVisibleLiquid && liquidCache12.HasVisibleLiquid) + { + if (liquidCachePtr6->HasTopEdge) + liquidCachePtr6->VisibleTopWall = (float) (((double) liquidCachePtr6->TopWall * 2.0 + (double) liquidCache11.TopWall + (double) liquidCache12.TopWall) * 0.25); + if (liquidCachePtr6->HasBottomEdge) + liquidCachePtr6->VisibleBottomWall = (float) (((double) liquidCachePtr6->BottomWall * 2.0 + (double) liquidCache11.BottomWall + (double) liquidCache12.BottomWall) * 0.25); + } + } + ++liquidCachePtr6; + } + liquidCachePtr6 += 4; + } + LiquidRenderer.LiquidCache* liquidCachePtr7 = liquidCachePtr1 + num1; + for (int index10 = 2; index10 < rectangle.Width - 2; ++index10) + { + for (int index11 = 2; index11 < rectangle.Height - 2; ++index11) + { + if (liquidCachePtr7->HasLiquid) + { + LiquidRenderer.LiquidCache liquidCache13 = liquidCachePtr7[-1]; + LiquidRenderer.LiquidCache liquidCache14 = liquidCachePtr7[1]; + LiquidRenderer.LiquidCache liquidCache15 = liquidCachePtr7[-rectangle.Height]; + LiquidRenderer.LiquidCache liquidCache16 = liquidCachePtr7[rectangle.Height]; + if (liquidCachePtr7->HasTopEdge && !liquidCachePtr7->HasBottomEdge && liquidCachePtr7->HasLeftEdge ^ liquidCachePtr7->HasRightEdge) + { + if (liquidCachePtr7->HasRightEdge) + { + liquidCachePtr7->VisibleRightWall = liquidCache14.VisibleRightWall; + liquidCachePtr7->VisibleTopWall = liquidCache15.VisibleTopWall; + } + else + { + liquidCachePtr7->VisibleLeftWall = liquidCache14.VisibleLeftWall; + liquidCachePtr7->VisibleTopWall = liquidCache16.VisibleTopWall; + } + } + else if (liquidCache14.FrameOffset.X == 16 && liquidCache14.FrameOffset.Y == 32) + { + if ((double) liquidCachePtr7->VisibleLeftWall > 0.5) + { + liquidCachePtr7->VisibleLeftWall = 0.0f; + liquidCachePtr7->FrameOffset = new Point(0, 0); + } + else if ((double) liquidCachePtr7->VisibleRightWall < 0.5) + { + liquidCachePtr7->VisibleRightWall = 1f; + liquidCachePtr7->FrameOffset = new Point(32, 0); + } + } + } + ++liquidCachePtr7; + } + liquidCachePtr7 += 4; + } + LiquidRenderer.LiquidCache* liquidCachePtr8 = liquidCachePtr1 + num1; + for (int index12 = 2; index12 < rectangle.Width - 2; ++index12) + { + for (int index13 = 2; index13 < rectangle.Height - 2; ++index13) + { + if (liquidCachePtr8->HasLiquid) + { + LiquidRenderer.LiquidCache liquidCache17 = liquidCachePtr8[-1]; + LiquidRenderer.LiquidCache liquidCache18 = liquidCachePtr8[1]; + LiquidRenderer.LiquidCache liquidCache19 = liquidCachePtr8[-rectangle.Height]; + LiquidRenderer.LiquidCache liquidCache20 = liquidCachePtr8[rectangle.Height]; + if (!liquidCachePtr8->HasBottomEdge && !liquidCachePtr8->HasLeftEdge && !liquidCachePtr8->HasTopEdge && !liquidCachePtr8->HasRightEdge) + { + if (liquidCache19.HasTopEdge && liquidCache17.HasLeftEdge) + { + liquidCachePtr8->FrameOffset.X = Math.Max(4, (int) (16.0 - (double) liquidCache17.VisibleLeftWall * 16.0)) - 4; + liquidCachePtr8->FrameOffset.Y = 48 + Math.Max(4, (int) (16.0 - (double) liquidCache19.VisibleTopWall * 16.0)) - 4; + liquidCachePtr8->VisibleLeftWall = 0.0f; + liquidCachePtr8->VisibleTopWall = 0.0f; + liquidCachePtr8->VisibleRightWall = 1f; + liquidCachePtr8->VisibleBottomWall = 1f; + } + else if (liquidCache20.HasTopEdge && liquidCache17.HasRightEdge) + { + liquidCachePtr8->FrameOffset.X = 32 - Math.Min(16, (int) ((double) liquidCache17.VisibleRightWall * 16.0) - 4); + liquidCachePtr8->FrameOffset.Y = 48 + Math.Max(4, (int) (16.0 - (double) liquidCache20.VisibleTopWall * 16.0)) - 4; + liquidCachePtr8->VisibleLeftWall = 0.0f; + liquidCachePtr8->VisibleTopWall = 0.0f; + liquidCachePtr8->VisibleRightWall = 1f; + liquidCachePtr8->VisibleBottomWall = 1f; + } + } + } + ++liquidCachePtr8; + } + liquidCachePtr8 += 4; + } + LiquidRenderer.LiquidCache* liquidCachePtr9 = liquidCachePtr1 + num1; + fixed (LiquidRenderer.LiquidDrawCache* liquidDrawCachePtr1 = &this._drawCache[0]) + fixed (Color* colorPtr1 = &this._waveMask[0]) + { + LiquidRenderer.LiquidDrawCache* liquidDrawCachePtr2 = liquidDrawCachePtr1; + Color* colorPtr2 = colorPtr1; + for (int index14 = 2; index14 < rectangle.Width - 2; ++index14) + { + for (int index15 = 2; index15 < rectangle.Height - 2; ++index15) + { + if (liquidCachePtr9->HasVisibleLiquid) + { + float num9 = Math.Min(0.75f, liquidCachePtr9->VisibleLeftWall); + float num10 = Math.Max(0.25f, liquidCachePtr9->VisibleRightWall); + float num11 = Math.Min(0.75f, liquidCachePtr9->VisibleTopWall); + float num12 = Math.Max(0.25f, liquidCachePtr9->VisibleBottomWall); + if (liquidCachePtr9->IsHalfBrick && liquidCachePtr9->IsSolid && (double) num12 > 0.5) + num12 = 0.5f; + liquidDrawCachePtr2->IsVisible = liquidCachePtr9->HasWall || !liquidCachePtr9->IsHalfBrick || !liquidCachePtr9->HasLiquid || (double) liquidCachePtr9->LiquidLevel >= 1.0; + liquidDrawCachePtr2->SourceRectangle = new Rectangle((int) (16.0 - (double) num10 * 16.0) + liquidCachePtr9->FrameOffset.X, (int) (16.0 - (double) num12 * 16.0) + liquidCachePtr9->FrameOffset.Y, (int) Math.Ceiling(((double) num10 - (double) num9) * 16.0), (int) Math.Ceiling(((double) num12 - (double) num11) * 16.0)); + liquidDrawCachePtr2->IsSurfaceLiquid = liquidCachePtr9->FrameOffset.X == 16 && liquidCachePtr9->FrameOffset.Y == 0 && (double) (index15 + rectangle.Y) > Main.worldSurface - 40.0; + liquidDrawCachePtr2->Opacity = liquidCachePtr9->Opacity; + liquidDrawCachePtr2->LiquidOffset = new Vector2((float) Math.Floor((double) num9 * 16.0), (float) Math.Floor((double) num11 * 16.0)); + liquidDrawCachePtr2->Type = liquidCachePtr9->VisibleType; + liquidDrawCachePtr2->HasWall = liquidCachePtr9->HasWall; + byte num13 = LiquidRenderer.WAVE_MASK_STRENGTH[(int) liquidCachePtr9->VisibleType]; + byte num14 = (byte) ((uint) num13 >> 1); + colorPtr2->R = num14; + colorPtr2->G = num14; + colorPtr2->B = LiquidRenderer.VISCOSITY_MASK[(int) liquidCachePtr9->VisibleType]; + colorPtr2->A = num13; + LiquidRenderer.LiquidCache* liquidCachePtr10 = liquidCachePtr9 - 1; + if (index15 != 2 && !liquidCachePtr10->HasVisibleLiquid && !liquidCachePtr10->IsSolid && !liquidCachePtr10->IsHalfBrick) + *(colorPtr2 - 1) = *colorPtr2; + } + else + { + liquidDrawCachePtr2->IsVisible = false; + int index16 = liquidCachePtr9->IsSolid || liquidCachePtr9->IsHalfBrick ? 3 : 4; + byte num15 = LiquidRenderer.WAVE_MASK_STRENGTH[index16]; + byte num16 = (byte) ((uint) num15 >> 1); + colorPtr2->R = num16; + colorPtr2->G = num16; + colorPtr2->B = LiquidRenderer.VISCOSITY_MASK[index16]; + colorPtr2->A = num15; + } + ++liquidCachePtr9; + ++liquidDrawCachePtr2; + ++colorPtr2; + } + liquidCachePtr9 += 4; + } + } + LiquidRenderer.LiquidCache* liquidCachePtr11 = liquidCachePtr1; + for (int x = rectangle.X; x < rectangle.X + rectangle.Width; ++x) + { + for (int y = rectangle.Y; y < rectangle.Y + rectangle.Height; ++y) + { + if (liquidCachePtr11->VisibleType == (byte) 1 && liquidCachePtr11->HasVisibleLiquid && Dust.lavaBubbles < 200) + { + if (this._random.Next(700) == 0) + Dust.NewDust(new Vector2((float) (x * 16), (float) (y * 16)), 16, 16, 35, newColor: Color.White); + if (this._random.Next(350) == 0) + { + int index = Dust.NewDust(new Vector2((float) (x * 16), (float) (y * 16)), 16, 8, 35, Alpha: 50, newColor: Color.White, Scale: 1.5f); + Main.dust[index].velocity *= 0.8f; + Main.dust[index].velocity.X *= 2f; + Main.dust[index].velocity.Y -= (float) this._random.Next(1, 7) * 0.1f; + if (this._random.Next(10) == 0) + Main.dust[index].velocity.Y *= (float) this._random.Next(2, 5); + Main.dust[index].noGravity = true; + } + } + ++liquidCachePtr11; + } + } + } + if (this.WaveFilters == null) + return; + this.WaveFilters(this._waveMask, this.GetCachedDrawArea()); + } + + private unsafe void InternalDraw( + SpriteBatch spriteBatch, + Vector2 drawOffset, + int waterStyle, + float globalAlpha, + bool isBackgroundDraw) + { + Rectangle drawArea = this._drawArea; + Main.tileBatch.Begin(); + fixed (LiquidRenderer.LiquidDrawCache* liquidDrawCachePtr1 = &this._drawCache[0]) + { + LiquidRenderer.LiquidDrawCache* liquidDrawCachePtr2 = liquidDrawCachePtr1; + for (int x = drawArea.X; x < drawArea.X + drawArea.Width; ++x) + { + for (int y = drawArea.Y; y < drawArea.Y + drawArea.Height; ++y) + { + if (liquidDrawCachePtr2->IsVisible) + { + Rectangle sourceRectangle = liquidDrawCachePtr2->SourceRectangle; + if (liquidDrawCachePtr2->IsSurfaceLiquid) + sourceRectangle.Y = 1280; + else + sourceRectangle.Y += this._animationFrame * 80; + Vector2 liquidOffset = liquidDrawCachePtr2->LiquidOffset; + float val2 = liquidDrawCachePtr2->Opacity * (isBackgroundDraw ? 1f : LiquidRenderer.DEFAULT_OPACITY[(int) liquidDrawCachePtr2->Type]); + int index = (int) liquidDrawCachePtr2->Type; + switch (index) + { + case 0: + index = waterStyle; + val2 *= globalAlpha; + break; + case 2: + index = 11; + break; + } + float num = Math.Min(1f, val2); + VertexColors vertices; + Lighting.GetCornerColors(x, y, out vertices); + vertices.BottomLeftColor *= num; + vertices.BottomRightColor *= num; + vertices.TopLeftColor *= num; + vertices.TopRightColor *= num; + Main.DrawTileInWater(drawOffset, x, y); + Main.tileBatch.Draw(this._liquidTextures[index].Value, new Vector2((float) (x << 4), (float) (y << 4)) + drawOffset + liquidOffset, new Rectangle?(sourceRectangle), vertices, Vector2.Zero, 1f, SpriteEffects.None); + } + ++liquidDrawCachePtr2; + } + } + } + Main.tileBatch.End(); + } + + public bool HasFullWater(int x, int y) + { + x -= this._drawArea.X; + y -= this._drawArea.Y; + int index = x * this._drawArea.Height + y; + if (index < 0 || index >= this._drawCache.Length) + return true; + return this._drawCache[index].IsVisible && !this._drawCache[index].IsSurfaceLiquid; + } + + public float GetVisibleLiquid(int x, int y) + { + x -= this._drawArea.X; + y -= this._drawArea.Y; + if (x < 0 || x >= this._drawArea.Width || y < 0 || y >= this._drawArea.Height) + return 0.0f; + int index = (x + 2) * (this._drawArea.Height + 4) + y + 2; + return !this._cache[index].HasVisibleLiquid ? 0.0f : this._cache[index].VisibleLiquidLevel; + } + + public void Update(GameTime gameTime) + { + if (Main.gamePaused || !Main.hasFocus) + return; + float num = Main.windSpeedCurrent * 25f; + this._frameState += ((double) num >= 0.0 ? num + 6f : num - 6f) * (float) gameTime.ElapsedGameTime.TotalSeconds; + if ((double) this._frameState < 0.0) + this._frameState += 16f; + this._frameState %= 16f; + this._animationFrame = (int) this._frameState; + } + + public void PrepareDraw(Rectangle drawArea) => this.InternalPrepareDraw(drawArea); + + public void SetWaveMaskData(ref Texture2D texture) + { + try + { + if (texture == null || texture.Width < this._drawArea.Height || texture.Height < this._drawArea.Width) + { + Console.WriteLine("WaveMaskData texture recreated. {0}x{1}", (object) this._drawArea.Height, (object) this._drawArea.Width); + if (texture != null) + { + try + { + texture.Dispose(); + } + catch + { + } + } + texture = new Texture2D(Main.instance.GraphicsDevice, this._drawArea.Height, this._drawArea.Width, false, SurfaceFormat.Color); + } + texture.SetData(0, new Rectangle?(new Rectangle(0, 0, this._drawArea.Height, this._drawArea.Width)), this._waveMask, 0, this._drawArea.Width * this._drawArea.Height); + } + catch + { + texture = new Texture2D(Main.instance.GraphicsDevice, this._drawArea.Height, this._drawArea.Width, false, SurfaceFormat.Color); + texture.SetData(0, new Rectangle?(new Rectangle(0, 0, this._drawArea.Height, this._drawArea.Width)), this._waveMask, 0, this._drawArea.Width * this._drawArea.Height); + } + } + + public Rectangle GetCachedDrawArea() => this._drawArea; + + public void Draw( + SpriteBatch spriteBatch, + Vector2 drawOffset, + int waterStyle, + float alpha, + bool isBackgroundDraw) + { + this.InternalDraw(spriteBatch, drawOffset, waterStyle, alpha, isBackgroundDraw); + } + + private struct LiquidCache + { + public float LiquidLevel; + public float VisibleLiquidLevel; + public float Opacity; + public bool IsSolid; + public bool IsHalfBrick; + public bool HasLiquid; + public bool HasVisibleLiquid; + public bool HasWall; + public Point FrameOffset; + public bool HasLeftEdge; + public bool HasRightEdge; + public bool HasTopEdge; + public bool HasBottomEdge; + public float LeftWall; + public float RightWall; + public float BottomWall; + public float TopWall; + public float VisibleLeftWall; + public float VisibleRightWall; + public float VisibleBottomWall; + public float VisibleTopWall; + public byte Type; + public byte VisibleType; + } + + private struct LiquidDrawCache + { + public Rectangle SourceRectangle; + public Vector2 LiquidOffset; + public bool IsVisible; + public float Opacity; + public byte Type; + public bool IsSurfaceLiquid; + public bool HasWall; + } + } +} diff --git a/GameContent/LootSimulation/ISimulationConditionSetter.cs b/GameContent/LootSimulation/ISimulationConditionSetter.cs new file mode 100644 index 0000000..1062c0b --- /dev/null +++ b/GameContent/LootSimulation/ISimulationConditionSetter.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.LootSimulation.ISimulationConditionSetter +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.LootSimulation +{ + public interface ISimulationConditionSetter + { + int GetTimesToRunMultiplier(SimulatorInfo info); + + void Setup(SimulatorInfo info); + + void TearDown(SimulatorInfo info); + } +} diff --git a/GameContent/LootSimulation/LootSimulationItemCounter.cs b/GameContent/LootSimulation/LootSimulationItemCounter.cs new file mode 100644 index 0000000..97668c8 --- /dev/null +++ b/GameContent/LootSimulation/LootSimulationItemCounter.cs @@ -0,0 +1,62 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.LootSimulation.LootSimulationItemCounter +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.ID; + +namespace Terraria.GameContent.LootSimulation +{ + public class LootSimulationItemCounter + { + private long[] _itemCountsObtained = new long[5045]; + private long[] _itemCountsObtainedExpert = new long[5045]; + private long _totalTimesAttempted; + private long _totalTimesAttemptedExpert; + + public void AddItem(int itemId, int amount, bool expert) + { + if (expert) + this._itemCountsObtainedExpert[itemId] += (long) amount; + else + this._itemCountsObtained[itemId] += (long) amount; + } + + public void Exclude(params int[] itemIds) + { + foreach (int itemId in itemIds) + { + this._itemCountsObtained[itemId] = 0L; + this._itemCountsObtainedExpert[itemId] = 0L; + } + } + + public void IncreaseTimesAttempted(int amount, bool expert) + { + if (expert) + this._totalTimesAttemptedExpert += (long) amount; + else + this._totalTimesAttempted += (long) amount; + } + + public string PrintCollectedItems(bool expert) + { + long[] collectionToUse = this._itemCountsObtained; + long totalDropsAttempted = this._totalTimesAttempted; + if (expert) + { + collectionToUse = this._itemCountsObtainedExpert; + this._totalTimesAttempted = this._totalTimesAttemptedExpert; + } + return string.Join(",\n", ((IEnumerable) collectionToUse).Select((count, itemId) => new + { + itemId = itemId, + count = count + }).Where(entry => entry.count > 0L).Select(entry => entry.itemId).Select((Func) (itemId => string.Format("new ItemDropInfo(ItemID.{0}, {1}, {2})", (object) ItemID.Search.GetName(itemId), (object) collectionToUse[itemId], (object) totalDropsAttempted)))); + } + } +} diff --git a/GameContent/LootSimulation/LootSimulator.cs b/GameContent/LootSimulation/LootSimulator.cs new file mode 100644 index 0000000..162ecf5 --- /dev/null +++ b/GameContent/LootSimulation/LootSimulator.cs @@ -0,0 +1,121 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.LootSimulation.LootSimulator +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using ReLogic.OS; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using Terraria.ID; + +namespace Terraria.GameContent.LootSimulation +{ + public class LootSimulator + { + private List _neededTestConditions = new List(); + private int[] _excludedItemIds = new int[0]; + + public LootSimulator() + { + this.FillDesiredTestConditions(); + this.FillItemExclusions(); + } + + private void FillItemExclusions() + { + List intList = new List(); + intList.AddRange(((IEnumerable) ItemID.Sets.IsAPickup).Select((state, index) => new + { + index = index, + state = state + }).Where(tuple => tuple.state).Select(tuple => tuple.index)); + intList.AddRange(((IEnumerable) ItemID.Sets.CommonCoin).Select((state, index) => new + { + index = index, + state = state + }).Where(tuple => tuple.state).Select(tuple => tuple.index)); + this._excludedItemIds = intList.ToArray(); + } + + private void FillDesiredTestConditions() => this._neededTestConditions.AddRange((IEnumerable) new List() + { + (ISimulationConditionSetter) SimulationConditionSetters.MidDay, + (ISimulationConditionSetter) SimulationConditionSetters.MidNight, + (ISimulationConditionSetter) SimulationConditionSetters.HardMode, + (ISimulationConditionSetter) SimulationConditionSetters.ExpertMode, + (ISimulationConditionSetter) SimulationConditionSetters.ExpertAndHardMode, + (ISimulationConditionSetter) SimulationConditionSetters.WindyExpertHardmodeEndgameBloodMoonNight, + (ISimulationConditionSetter) SimulationConditionSetters.WindyExpertHardmodeEndgameEclipseMorning, + (ISimulationConditionSetter) SimulationConditionSetters.SlimeStaffTest, + (ISimulationConditionSetter) SimulationConditionSetters.LuckyCoinTest + }); + + public void Run() + { + int timesMultiplier = 10000; + this.SetCleanSlateWorldConditions(); + string str1 = ""; + Stopwatch stopwatch = new Stopwatch(); + stopwatch.Start(); + for (int npcNetId = -65; npcNetId < 663; ++npcNetId) + { + string outputText; + if (this.TryGettingLootFor(npcNetId, timesMultiplier, out outputText)) + str1 = str1 + outputText + "\n\n"; + } + stopwatch.Stop(); + string str2 = str1 + string.Format("\nSimulation Took {0} seconds to complete.\n", (object) (float) ((double) stopwatch.ElapsedMilliseconds / 1000.0)); + Platform.Get().Value = str2; + } + + private void SetCleanSlateWorldConditions() + { + Main.dayTime = true; + Main.time = 27000.0; + Main.hardMode = false; + Main.GameMode = 0; + NPC.downedMechBoss1 = false; + NPC.downedMechBoss2 = false; + NPC.downedMechBoss3 = false; + NPC.downedMechBossAny = false; + NPC.downedPlantBoss = false; + Main._shouldUseWindyDayMusic = false; + Main._shouldUseStormMusic = false; + Main.eclipse = false; + Main.bloodMoon = false; + } + + private bool TryGettingLootFor(int npcNetId, int timesMultiplier, out string outputText) + { + SimulatorInfo info = new SimulatorInfo(); + NPC npc = new NPC(); + npc.SetDefaults(npcNetId); + info.npcVictim = npc; + LootSimulationItemCounter simulationItemCounter = new LootSimulationItemCounter(); + info.itemCounter = simulationItemCounter; + foreach (ISimulationConditionSetter neededTestCondition in this._neededTestConditions) + { + neededTestCondition.Setup(info); + int amount = neededTestCondition.GetTimesToRunMultiplier(info) * timesMultiplier; + for (int index = 0; index < amount; ++index) + npc.NPCLoot(); + simulationItemCounter.IncreaseTimesAttempted(amount, info.runningExpertMode); + neededTestCondition.TearDown(info); + this.SetCleanSlateWorldConditions(); + } + simulationItemCounter.Exclude(((IEnumerable) this._excludedItemIds).ToArray()); + string str1 = simulationItemCounter.PrintCollectedItems(false); + string str2 = simulationItemCounter.PrintCollectedItems(true); + string str3 = string.Format("FindEntryByNPCID(NPCID.{0})", (object) NPCID.Search.GetName(npcNetId)); + if (str1.Length > 0) + str3 = string.Format("{0}\n.AddDropsNormalMode({1})", (object) str3, (object) str1); + if (str2.Length > 0) + str3 = string.Format("{0}\n.AddDropsExpertMode({1})", (object) str3, (object) str2); + string str4 = str3 + ";"; + outputText = str4; + return str1.Length > 0 || str2.Length > 0; + } + } +} diff --git a/GameContent/LootSimulation/LootSimulatorConditionSetterTypes/FastConditionSetter.cs b/GameContent/LootSimulation/LootSimulatorConditionSetterTypes/FastConditionSetter.cs new file mode 100644 index 0000000..63c1d32 --- /dev/null +++ b/GameContent/LootSimulation/LootSimulatorConditionSetterTypes/FastConditionSetter.cs @@ -0,0 +1,38 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.LootSimulation.LootSimulatorConditionSetterTypes.FastConditionSetter +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Terraria.GameContent.LootSimulation.LootSimulatorConditionSetterTypes +{ + public class FastConditionSetter : ISimulationConditionSetter + { + private Action _setup; + private Action _tearDown; + + public FastConditionSetter(Action setup, Action tearDown) + { + this._setup = setup; + this._tearDown = tearDown; + } + + public void Setup(SimulatorInfo info) + { + if (this._setup == null) + return; + this._setup(info); + } + + public void TearDown(SimulatorInfo info) + { + if (this._tearDown == null) + return; + this._tearDown(info); + } + + public int GetTimesToRunMultiplier(SimulatorInfo info) => 1; + } +} diff --git a/GameContent/LootSimulation/LootSimulatorConditionSetterTypes/LuckyCoinConditionSetter.cs b/GameContent/LootSimulation/LootSimulatorConditionSetterTypes/LuckyCoinConditionSetter.cs new file mode 100644 index 0000000..41a93db --- /dev/null +++ b/GameContent/LootSimulation/LootSimulatorConditionSetterTypes/LuckyCoinConditionSetter.cs @@ -0,0 +1,35 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.LootSimulation.LootSimulatorConditionSetterTypes.LuckyCoinConditionSetter +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.LootSimulation.LootSimulatorConditionSetterTypes +{ + public class LuckyCoinConditionSetter : ISimulationConditionSetter + { + private int _timesToRun; + + public LuckyCoinConditionSetter(int timesToRunMultiplier) => this._timesToRun = timesToRunMultiplier; + + public int GetTimesToRunMultiplier(SimulatorInfo info) + { + switch (info.npcVictim.netID) + { + case 216: + case 491: + return this._timesToRun; + default: + return 0; + } + } + + public void Setup(SimulatorInfo info) + { + } + + public void TearDown(SimulatorInfo info) + { + } + } +} diff --git a/GameContent/LootSimulation/LootSimulatorConditionSetterTypes/SlimeStaffConditionSetter.cs b/GameContent/LootSimulation/LootSimulatorConditionSetterTypes/SlimeStaffConditionSetter.cs new file mode 100644 index 0000000..f394e02 --- /dev/null +++ b/GameContent/LootSimulation/LootSimulatorConditionSetterTypes/SlimeStaffConditionSetter.cs @@ -0,0 +1,59 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.LootSimulation.LootSimulatorConditionSetterTypes.SlimeStaffConditionSetter +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.LootSimulation.LootSimulatorConditionSetterTypes +{ + public class SlimeStaffConditionSetter : ISimulationConditionSetter + { + private int _timesToRun; + + public SlimeStaffConditionSetter(int timesToRunMultiplier) => this._timesToRun = timesToRunMultiplier; + + public int GetTimesToRunMultiplier(SimulatorInfo info) + { + switch (info.npcVictim.netID) + { + case -33: + case -32: + case -10: + case -9: + case -8: + case -7: + case -6: + case -5: + case -4: + case -3: + case 1: + case 16: + case 138: + case 141: + case 147: + case 184: + case 187: + case 204: + case 302: + case 333: + case 334: + case 335: + case 336: + case 433: + case 535: + case 537: + return this._timesToRun; + default: + return 0; + } + } + + public void Setup(SimulatorInfo info) + { + } + + public void TearDown(SimulatorInfo info) + { + } + } +} diff --git a/GameContent/LootSimulation/LootSimulatorConditionSetterTypes/StackedConditionSetter.cs b/GameContent/LootSimulation/LootSimulatorConditionSetterTypes/StackedConditionSetter.cs new file mode 100644 index 0000000..a3969db --- /dev/null +++ b/GameContent/LootSimulation/LootSimulatorConditionSetterTypes/StackedConditionSetter.cs @@ -0,0 +1,29 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.LootSimulation.LootSimulatorConditionSetterTypes.StackedConditionSetter +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.LootSimulation.LootSimulatorConditionSetterTypes +{ + public class StackedConditionSetter : ISimulationConditionSetter + { + private ISimulationConditionSetter[] _setters; + + public StackedConditionSetter(params ISimulationConditionSetter[] setters) => this._setters = setters; + + public void Setup(SimulatorInfo info) + { + for (int index = 0; index < this._setters.Length; ++index) + this._setters[index].Setup(info); + } + + public void TearDown(SimulatorInfo info) + { + for (int index = 0; index < this._setters.Length; ++index) + this._setters[index].TearDown(info); + } + + public int GetTimesToRunMultiplier(SimulatorInfo info) => 1; + } +} diff --git a/GameContent/LootSimulation/SimulationConditionSetters.cs b/GameContent/LootSimulation/SimulationConditionSetters.cs new file mode 100644 index 0000000..45bde34 --- /dev/null +++ b/GameContent/LootSimulation/SimulationConditionSetters.cs @@ -0,0 +1,82 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.LootSimulation.SimulationConditionSetters +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using Terraria.GameContent.LootSimulation.LootSimulatorConditionSetterTypes; + +namespace Terraria.GameContent.LootSimulation +{ + public class SimulationConditionSetters + { + public static FastConditionSetter HardMode = new FastConditionSetter((Action) (info => Main.hardMode = true), (Action) (info => Main.hardMode = false)); + public static FastConditionSetter ExpertMode = new FastConditionSetter((Action) (info => + { + Main.GameMode = 1; + info.runningExpertMode = true; + }), (Action) (info => + { + Main.GameMode = 0; + info.runningExpertMode = false; + })); + public static FastConditionSetter Eclipse = new FastConditionSetter((Action) (info => Main.eclipse = true), (Action) (info => Main.eclipse = false)); + public static FastConditionSetter BloodMoon = new FastConditionSetter((Action) (info => Main.bloodMoon = true), (Action) (info => Main.bloodMoon = false)); + public static FastConditionSetter SlainMechBosses = new FastConditionSetter((Action) (info => + { + int num; + NPC.downedMechBossAny = (num = 1) != 0; + NPC.downedMechBoss3 = num != 0; + NPC.downedMechBoss2 = num != 0; + NPC.downedMechBoss1 = num != 0; + }), (Action) (info => + { + int num; + NPC.downedMechBossAny = (num = 0) != 0; + NPC.downedMechBoss3 = num != 0; + NPC.downedMechBoss2 = num != 0; + NPC.downedMechBoss1 = num != 0; + })); + public static FastConditionSetter SlainPlantera = new FastConditionSetter((Action) (info => NPC.downedPlantBoss = true), (Action) (info => NPC.downedPlantBoss = false)); + public static StackedConditionSetter ExpertAndHardMode = new StackedConditionSetter(new ISimulationConditionSetter[2] + { + (ISimulationConditionSetter) SimulationConditionSetters.ExpertMode, + (ISimulationConditionSetter) SimulationConditionSetters.HardMode + }); + public static FastConditionSetter WindyWeather = new FastConditionSetter((Action) (info => Main._shouldUseWindyDayMusic = true), (Action) (info => Main._shouldUseWindyDayMusic = false)); + public static FastConditionSetter MidDay = new FastConditionSetter((Action) (info => + { + Main.dayTime = true; + Main.time = 27000.0; + }), (Action) (info => info.ReturnToOriginalDaytime())); + public static FastConditionSetter MidNight = new FastConditionSetter((Action) (info => + { + Main.dayTime = false; + Main.time = 16200.0; + }), (Action) (info => info.ReturnToOriginalDaytime())); + public static FastConditionSetter SlimeRain = new FastConditionSetter((Action) (info => Main.slimeRain = true), (Action) (info => Main.slimeRain = false)); + public static StackedConditionSetter WindyExpertHardmodeEndgameEclipseMorning = new StackedConditionSetter(new ISimulationConditionSetter[7] + { + (ISimulationConditionSetter) SimulationConditionSetters.WindyWeather, + (ISimulationConditionSetter) SimulationConditionSetters.ExpertMode, + (ISimulationConditionSetter) SimulationConditionSetters.HardMode, + (ISimulationConditionSetter) SimulationConditionSetters.SlainMechBosses, + (ISimulationConditionSetter) SimulationConditionSetters.SlainPlantera, + (ISimulationConditionSetter) SimulationConditionSetters.Eclipse, + (ISimulationConditionSetter) SimulationConditionSetters.MidDay + }); + public static StackedConditionSetter WindyExpertHardmodeEndgameBloodMoonNight = new StackedConditionSetter(new ISimulationConditionSetter[7] + { + (ISimulationConditionSetter) SimulationConditionSetters.WindyWeather, + (ISimulationConditionSetter) SimulationConditionSetters.ExpertMode, + (ISimulationConditionSetter) SimulationConditionSetters.HardMode, + (ISimulationConditionSetter) SimulationConditionSetters.SlainMechBosses, + (ISimulationConditionSetter) SimulationConditionSetters.SlainPlantera, + (ISimulationConditionSetter) SimulationConditionSetters.BloodMoon, + (ISimulationConditionSetter) SimulationConditionSetters.MidNight + }); + public static SlimeStaffConditionSetter SlimeStaffTest = new SlimeStaffConditionSetter(100); + public static LuckyCoinConditionSetter LuckyCoinTest = new LuckyCoinConditionSetter(100); + } +} diff --git a/GameContent/LootSimulation/SimulatorInfo.cs b/GameContent/LootSimulation/SimulatorInfo.cs new file mode 100644 index 0000000..585c427 --- /dev/null +++ b/GameContent/LootSimulation/SimulatorInfo.cs @@ -0,0 +1,40 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.LootSimulation.SimulatorInfo +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.GameContent.LootSimulation +{ + public class SimulatorInfo + { + public Player player; + private double _originalDayTimeCounter; + private bool _originalDayTimeFlag; + private Vector2 _originalPlayerPosition; + public bool runningExpertMode; + public LootSimulationItemCounter itemCounter; + public NPC npcVictim; + + public SimulatorInfo() + { + this.player = new Player(); + this._originalDayTimeCounter = Main.time; + this._originalDayTimeFlag = Main.dayTime; + this._originalPlayerPosition = this.player.position; + this.runningExpertMode = false; + } + + public void ReturnToOriginalDaytime() + { + Main.dayTime = this._originalDayTimeFlag; + Main.time = this._originalDayTimeCounter; + } + + public void AddItem(int itemId, int amount) => this.itemCounter.AddItem(itemId, amount, this.runningExpertMode); + + public void ReturnToOriginalPlayerPosition() => this.player.position = this._originalPlayerPosition; + } +} diff --git a/GameContent/Metadata/MaterialData/Materials.json b/GameContent/Metadata/MaterialData/Materials.json new file mode 100644 index 0000000..5932025 --- /dev/null +++ b/GameContent/Metadata/MaterialData/Materials.json @@ -0,0 +1,128 @@ +{ + "Default": { + "GolfPhysics": { + "DirectImpactDampening": 0.95, + "SideImpactDampening": 0.98, + "ClubImpactDampening": 1, + "PassThroughDampening": 1, + "ImpactDampeningResistanceEfficiency": 0 + } + }, + "Dirt": { + "GolfPhysics": { + "DirectImpactDampening": 0.9, + "SideImpactDampening": 0.95, + "ClubImpactDampening": 0.9, + "PassThroughDampening": 1, + "ImpactDampeningResistanceEfficiency": 0.5 + } + }, + "Grass": { + "GolfPhysics": { + "DirectImpactDampening": 0.9, + "SideImpactDampening": 0.95, + "ClubImpactDampening": 1, + "PassThroughDampening": 1, + "ImpactDampeningResistanceEfficiency": 0.5 + } + }, + "Snow": { + "GolfPhysics": { + "DirectImpactDampening": 0.5, + "SideImpactDampening": 0.2, + "ClubImpactDampening": 0.6, + "PassThroughDampening": 1, + "ImpactDampeningResistanceEfficiency": 1 + } + }, + "Wood": { + "GolfPhysics": { + "DirectImpactDampening": 0.94, + "SideImpactDampening": 0.99, + "ClubImpactDampening": 0.99, + "PassThroughDampening": 1, + "ImpactDampeningResistanceEfficiency": 0 + } + }, + "Ice": { + "GolfPhysics": { + "DirectImpactDampening": 0.95, + "SideImpactDampening": 1.0, + "ClubImpactDampening": 0.99, + "PassThroughDampening": 1, + "ImpactDampeningResistanceEfficiency": 0 + } + }, + "Sand": { + "GolfPhysics": { + "DirectImpactDampening": 0.3, + "SideImpactDampening": 0.2, + "ClubImpactDampening": 0.4, + "PassThroughDampening": 1, + "ImpactDampeningResistanceEfficiency": 1 + } + }, + "PinkSlime": { + "GolfPhysics": { + "DirectImpactDampening": 1, + "SideImpactDampening": 1, + "ClubImpactDampening": 1, + "PassThroughDampening": 1, + "ImpactDampeningResistanceEfficiency": 0 + } + }, + "Organic": { + "GolfPhysics": { + "DirectImpactDampening": 0.7, + "SideImpactDampening": 0.4, + "ClubImpactDampening": 0.8, + "PassThroughDampening": 1, + "ImpactDampeningResistanceEfficiency": 0.5 + } + }, + "Sticky": { + "GolfPhysics": { + "DirectImpactDampening": 0.1, + "SideImpactDampening": 0.1, + "ClubImpactDampening": 0.2, + "PassThroughDampening": 1, + "ImpactDampeningResistanceEfficiency": 0.5 + } + }, + "Plant": { + "GolfPhysics": { + "DirectImpactDampening": 0.98, + "SideImpactDampening": 0.98, + "ClubImpactDampening": 0.98, + "PassThroughDampening": 0.99, + "ImpactDampeningResistanceEfficiency": 0.5 + } + }, + "Web": { + "GolfPhysics": { + "DirectImpactDampening": 0.98, + "SideImpactDampening": 0.98, + "ClubImpactDampening": 0.98, + "PassThroughDampening": 0.95, + "ImpactDampeningResistanceEfficiency": 0.5 + } + }, + "GolfGrass": { + "GolfPhysics": { + "DirectImpactDampening": 0.9, + "SideImpactDampening": 0.98, + "ClubImpactDampening": 1.5, + "PassThroughDampening": 1, + "ImpactDampeningResistanceEfficiency": 0 + } + }, + "GolfTee": { + "GolfPhysics": { + "DirectImpactDampening": 0.9, + "SideImpactDampening": 0.98, + "ClubImpactDampening": 1.8, + "PassThroughDampening": 1, + "ImpactDampeningResistanceEfficiency": 0 + } + } +} \ No newline at end of file diff --git a/GameContent/Metadata/MaterialData/Tiles.json b/GameContent/Metadata/MaterialData/Tiles.json new file mode 100644 index 0000000..5a405e3 --- /dev/null +++ b/GameContent/Metadata/MaterialData/Tiles.json @@ -0,0 +1,624 @@ +{ + "Dirt": "Dirt", + "Stone": "Default", + "Grass": "Grass", + "Plants": "Plant", + "Torches": "Default", + "Trees": "Default", + "Iron": "Default", + "Copper": "Default", + "Gold": "Default", + "Silver": "Default", + "ClosedDoor": "Default", + "OpenDoor": "Default", + "Heart": "Default", + "Bottles": "Default", + "Tables": "Default", + "Chairs": "Default", + "Anvils": "Default", + "Furnaces": "Default", + "WorkBenches": "Default", + "Platforms": "Default", + "Saplings": "Plant", + "Containers": "Default", + "Demonite": "Default", + "CorruptGrass": "Plant", + "CorruptPlants": "Plant", + "Ebonstone": "Default", + "DemonAltar": "Default", + "Sunflower": "Plant", + "Pots": "Default", + "PiggyBank": "Default", + "WoodBlock": "Wood", + "ShadowOrbs": "Default", + "CorruptThorns": "Plant", + "Candles": "Default", + "Chandeliers": "Default", + "Jackolanterns": "Default", + "Presents": "Default", + "Meteorite": "Default", + "GrayBrick": "Default", + "RedBrick": "Default", + "ClayBlock": "Default", + "BlueDungeonBrick": "Default", + "HangingLanterns": "Default", + "GreenDungeonBrick": "Default", + "PinkDungeonBrick": "Default", + "GoldBrick": "Default", + "SilverBrick": "Default", + "CopperBrick": "Default", + "Spikes": "Default", + "WaterCandle": "Default", + "Books": "Default", + "Cobweb": "Web", + "Vines": "Plant", + "Sand": "Sand", + "Glass": "Default", + "Signs": "Default", + "Obsidian": "Default", + "Ash": "Default", + "Hellstone": "Default", + "Mud": "Organic", + "JungleGrass": "Grass", + "JunglePlants": "Plant", + "JungleVines": "Plant", + "Sapphire": "Default", + "Ruby": "Default", + "Emerald": "Default", + "Topaz": "Default", + "Amethyst": "Default", + "Diamond": "Default", + "JungleThorns": "Plant", + "MushroomGrass": "Grass", + "MushroomPlants": "Plant", + "MushroomTrees": "Default", + "Plants2": "Plant", + "JunglePlants2": "Plant", + "ObsidianBrick": "Default", + "HellstoneBrick": "Default", + "Hellforge": "Default", + "ClayPot": "Default", + "Beds": "Default", + "Cactus": "Default", + "Coral": "Default", + "ImmatureHerbs": "Plant", + "MatureHerbs": "Plant", + "BloomingHerbs": "Plant", + "Tombstones": "Default", + "Loom": "Default", + "Pianos": "Default", + "Dressers": "Default", + "Benches": "Default", + "Bathtubs": "Default", + "Banners": "Default", + "Lampposts": "Default", + "Lamps": "Default", + "Kegs": "Default", + "ChineseLanterns": "Default", + "CookingPots": "Default", + "Safes": "Default", + "SkullLanterns": "Default", + "TrashCan": "Default", + "Candelabras": "Default", + "Bookcases": "Default", + "Thrones": "Default", + "Bowls": "Default", + "GrandfatherClocks": "Default", + "Statues": "Default", + "Sawmill": "Default", + "Cobalt": "Default", + "Mythril": "Default", + "HallowedGrass": "Grass", + "HallowedPlants": "Plant", + "Adamantite": "Default", + "Ebonsand": "Sand", + "HallowedPlants2": "Plant", + "TinkerersWorkbench": "Default", + "HallowedVines": "Plant", + "Pearlsand": "Sand", + "Pearlstone": "Default", + "PearlstoneBrick": "Default", + "IridescentBrick": "Default", + "Mudstone": "Default", + "CobaltBrick": "Default", + "MythrilBrick": "Default", + "Silt": "Sand", + "WoodenBeam": "Wood", + "CrystalBall": "Default", + "DiscoBall": "Default", + "MagicalIceBlock": "Ice", + "Mannequin": "Default", + "Crystals": "Default", + "ActiveStoneBlock": "Default", + "InactiveStoneBlock": "Default", + "Lever": "Default", + "AdamantiteForge": "Default", + "MythrilAnvil": "Default", + "PressurePlates": "Default", + "Switches": "Default", + "Traps": "Default", + "Boulder": "Default", + "MusicBoxes": "Default", + "DemoniteBrick": "Default", + "Explosives": "Default", + "InletPump": "Default", + "OutletPump": "Default", + "Timers": "Default", + "CandyCaneBlock": "Default", + "GreenCandyCaneBlock": "Default", + "SnowBlock": "Snow", + "SnowBrick": "Default", + "HolidayLights": "Default", + "AdamantiteBeam": "Default", + "SandstoneBrick": "Default", + "EbonstoneBrick": "Default", + "RedStucco": "Default", + "YellowStucco": "Default", + "GreenStucco": "Default", + "GrayStucco": "Default", + "Ebonwood": "Wood", + "RichMahogany": "Default", + "Pearlwood": "Wood", + "RainbowBrick": "Default", + "IceBlock": "Ice", + "BreakableIce": "Ice", + "CorruptIce": "Ice", + "HallowedIce": "Ice", + "Stalactite": "Default", + "Tin": "Default", + "Lead": "Default", + "Tungsten": "Default", + "Platinum": "Default", + "PineTree": "Default", + "ChristmasTree": "Default", + "Sinks": "Default", + "PlatinumCandelabra": "Default", + "PlatinumCandle": "Default", + "TinBrick": "Default", + "TungstenBrick": "Default", + "PlatinumBrick": "Default", + "ExposedGems": "Default", + "GreenMoss": "Grass", + "BrownMoss": "Grass", + "RedMoss": "Grass", + "BlueMoss": "Grass", + "PurpleMoss": "Grass", + "LongMoss": "Plant", + "SmallPiles": "Default", + "LargePiles": "Default", + "LargePiles2": "Default", + "CactusBlock": "Organic", + "Cloud": "Sand", + "MushroomBlock": "Organic", + "LivingWood": "Wood", + "LeafBlock": "Sand", + "SlimeBlock": "Organic", + "BoneBlock": "Default", + "FleshBlock": "Organic", + "RainCloud": "Sand", + "FrozenSlimeBlock": "Ice", + "Asphalt": "Default", + "CrimsonGrass": "Grass", + "FleshIce": "Ice", + "CrimsonPlants": "Plant", + "Sunplate": "Default", + "Crimstone": "Default", + "Crimtane": "Default", + "CrimsonVines": "Plant", + "IceBrick": "Ice", + "WaterFountain": "Default", + "Shadewood": "Wood", + "Cannon": "Default", + "LandMine": "Default", + "Chlorophyte": "Default", + "SnowballLauncher": "Default", + "Rope": "Default", + "Chain": "Default", + "Campfire": "Default", + "Firework": "Default", + "Blendomatic": "Default", + "MeatGrinder": "Default", + "Extractinator": "Default", + "Solidifier": "Default", + "Palladium": "Default", + "Orichalcum": "Default", + "Titanium": "Default", + "Slush": "Sand", + "Hive": "Organic", + "LihzahrdBrick": "Default", + "DyePlants": "Plant", + "DyeVat": "Default", + "HoneyBlock": "Sticky", + "CrispyHoneyBlock": "Organic", + "Larva": "Default", + "WoodenSpikes": "Wood", + "PlantDetritus": "Default", + "Crimsand": "Sand", + "Teleporter": "Default", + "LifeFruit": "Plant", + "LihzahrdAltar": "Default", + "PlanteraBulb": "Plant", + "MetalBars": "Default", + "Painting3X3": "Default", + "Painting4X3": "Default", + "Painting6X4": "Default", + "ImbuingStation": "Default", + "BubbleMachine": "Default", + "Painting2X3": "Default", + "Painting3X2": "Default", + "Autohammer": "Default", + "PalladiumColumn": "Default", + "BubblegumBlock": "Sticky", + "Titanstone": "Default", + "PumpkinBlock": "Organic", + "HayBlock": "Snow", + "SpookyWood": "Wood", + "Pumpkins": "Default", + "AmethystGemsparkOff": "Default", + "TopazGemsparkOff": "Default", + "SapphireGemsparkOff": "Default", + "EmeraldGemsparkOff": "Default", + "RubyGemsparkOff": "Default", + "DiamondGemsparkOff": "Default", + "AmberGemsparkOff": "Default", + "AmethystGemspark": "Default", + "TopazGemspark": "Default", + "SapphireGemspark": "Default", + "EmeraldGemspark": "Default", + "RubyGemspark": "Default", + "DiamondGemspark": "Default", + "AmberGemspark": "Default", + "Womannequin": "Default", + "FireflyinaBottle": "Default", + "LightningBuginaBottle": "Default", + "Cog": "Default", + "StoneSlab": "Default", + "SandStoneSlab": "Default", + "BunnyCage": "Default", + "SquirrelCage": "Default", + "MallardDuckCage": "Default", + "DuckCage": "Default", + "BirdCage": "Default", + "BlueJay": "Default", + "CardinalCage": "Default", + "FishBowl": "Default", + "HeavyWorkBench": "Default", + "CopperPlating": "Default", + "SnailCage": "Default", + "GlowingSnailCage": "Default", + "AmmoBox": "Default", + "MonarchButterflyJar": "Default", + "PurpleEmperorButterflyJar": "Default", + "RedAdmiralButterflyJar": "Default", + "UlyssesButterflyJar": "Default", + "SulphurButterflyJar": "Default", + "TreeNymphButterflyJar": "Default", + "ZebraSwallowtailButterflyJar": "Default", + "JuliaButterflyJar": "Default", + "ScorpionCage": "Default", + "BlackScorpionCage": "Default", + "FrogCage": "Default", + "MouseCage": "Default", + "BoneWelder": "Default", + "FleshCloningVat": "Default", + "GlassKiln": "Default", + "LihzahrdFurnace": "Default", + "LivingLoom": "Default", + "SkyMill": "Default", + "IceMachine": "Default", + "SteampunkBoiler": "Default", + "HoneyDispenser": "Default", + "PenguinCage": "Default", + "WormCage": "Default", + "DynastyWood": "Wood", + "RedDynastyShingles": "Default", + "BlueDynastyShingles": "Default", + "MinecartTrack": "Default", + "Coralstone": "Default", + "BlueJellyfishBowl": "Default", + "GreenJellyfishBowl": "Default", + "PinkJellyfishBowl": "Default", + "ShipInABottle": "Default", + "SeaweedPlanter": "Default", + "BorealWood": "Wood", + "PalmWood": "Wood", + "PalmTree": "Default", + "BeachPiles": "Default", + "TinPlating": "Default", + "Waterfall": "Default", + "Lavafall": "Default", + "Confetti": "Default", + "ConfettiBlack": "Default", + "CopperCoinPile": "Default", + "SilverCoinPile": "Default", + "GoldCoinPile": "Default", + "PlatinumCoinPile": "Default", + "WeaponsRack": "Default", + "FireworksBox": "Default", + "LivingFire": "Default", + "AlphabetStatues": "Default", + "FireworkFountain": "Default", + "GrasshopperCage": "Default", + "LivingCursedFire": "Default", + "LivingDemonFire": "Default", + "LivingFrostFire": "Default", + "LivingIchor": "Default", + "LivingUltrabrightFire": "Default", + "Honeyfall": "Default", + "ChlorophyteBrick": "Default", + "CrimtaneBrick": "Default", + "ShroomitePlating": "Default", + "MushroomStatue": "Default", + "MartianConduitPlating": "Default", + "ChimneySmoke": "Default", + "CrimsonThorns": "Plant", + "VineRope": "Default", + "BewitchingTable": "Default", + "AlchemyTable": "Default", + "Sundial": "Default", + "MarbleBlock": "Default", + "GoldBirdCage": "Default", + "GoldBunnyCage": "Default", + "GoldButterflyCage": "Default", + "GoldFrogCage": "Default", + "GoldGrasshopperCage": "Default", + "GoldMouseCage": "Default", + "GoldWormCage": "Default", + "SilkRope": "Default", + "WebRope": "Default", + "Marble": "Default", + "Granite": "Default", + "GraniteBlock": "Default", + "MeteoriteBrick": "Default", + "PinkSlimeBlock": "PinkSlime", + "PeaceCandle": "Default", + "WaterDrip": "Default", + "LavaDrip": "Default", + "HoneyDrip": "Default", + "FishingCrate": "Default", + "SharpeningStation": "Default", + "TargetDummy": "Default", + "Bubble": "Default", + "PlanterBox": "Default", + "LavaMoss": "Grass", + "VineFlowers": "Plant", + "LivingMahogany": "Wood", + "LivingMahoganyLeaves": "Sand", + "CrystalBlock": "Default", + "TrapdoorOpen": "Default", + "TrapdoorClosed": "Default", + "TallGateClosed": "Default", + "TallGateOpen": "Default", + "LavaLamp": "Default", + "CageEnchantedNightcrawler": "Default", + "CageBuggy": "Default", + "CageGrubby": "Default", + "CageSluggy": "Default", + "ItemFrame": "Default", + "Sandstone": "Default", + "HardenedSand": "Default", + "CorruptHardenedSand": "Default", + "CrimsonHardenedSand": "Default", + "CorruptSandstone": "Default", + "CrimsonSandstone": "Default", + "HallowHardenedSand": "Default", + "HallowSandstone": "Default", + "DesertFossil": "Default", + "Fireplace": "Default", + "Chimney": "Default", + "FossilOre": "Default", + "LunarOre": "Default", + "LunarBrick": "Default", + "LunarMonolith": "Default", + "Detonator": "Default", + "LunarCraftingStation": "Default", + "SquirrelOrangeCage": "Default", + "SquirrelGoldCage": "Default", + "LunarBlockSolar": "Default", + "LunarBlockVortex": "Default", + "LunarBlockNebula": "Default", + "LunarBlockStardust": "Default", + "LogicGateLamp": "Default", + "LogicGate": "Default", + "ConveyorBeltLeft": "Default", + "ConveyorBeltRight": "Default", + "LogicSensor": "Default", + "WirePipe": "Default", + "AnnouncementBox": "Default", + "TeamBlockRed": "Default", + "TeamBlockRedPlatform": "Default", + "WeightedPressurePlate": "Default", + "WireBulb": "Default", + "TeamBlockGreen": "Default", + "TeamBlockBlue": "Default", + "TeamBlockYellow": "Default", + "TeamBlockPink": "Default", + "TeamBlockWhite": "Default", + "TeamBlockGreenPlatform": "Default", + "TeamBlockBluePlatform": "Default", + "TeamBlockYellowPlatform": "Default", + "TeamBlockPinkPlatform": "Default", + "TeamBlockWhitePlatform": "Default", + "GemLocks": "Default", + "FakeContainers": "Default", + "ProjectilePressurePad": "Default", + "GeyserTrap": "Default", + "BeeHive": "Default", + "PixelBox": "Default", + "SillyBalloonPink": "PinkSlime", + "SillyBalloonPurple": "PinkSlime", + "SillyBalloonGreen": "PinkSlime", + "SillyStreamerBlue": "Default", + "SillyStreamerGreen": "Default", + "SillyStreamerPink": "Default", + "SillyBalloonMachine": "Default", + "SillyBalloonTile": "Default", + "Pigronata": "Default", + "PartyMonolith": "Default", + "PartyBundleOfBalloonTile": "Default", + "PartyPresent": "Default", + "SandFallBlock": "Default", + "SnowFallBlock": "Default", + "SnowCloud": "Sand", + "SandDrip": "Default", + "DjinnLamp": "Default", + "DefendersForge": "Default", + "WarTable": "Default", + "WarTableBanner": "Default", + "ElderCrystalStand": "Default", + "Containers2": "Default", + "FakeContainers2": "Default", + "Tables2": "Default", + "DisplayDoll": "Default", + "WeaponsRack2": "Default", + "IronBrick": "Default", + "LeadBrick": "Default", + "LesionBlock": "Organic", + "HatRack": "Default", + "GolfGrass": "GolfGrass", + "CrimstoneBrick": "Default", + "SmoothSandstone": "Default", + "BloodMoonMonolith": "Default", + "CrackedBlueDungeonBrick": "Default", + "CrackedGreenDungeonBrick": "Default", + "CrackedPinkDungeonBrick": "Default", + "RollingCactus": "Plant", + "AntlionLarva": "Plant", + "DrumSet": "Default", + "PicnicTable": "Default", + "FallenLog": "Default", + "PinWheel": "Default", + "WeatherVane": "Default", + "VoidVault": "Default", + "GolfGrassHallowed": "GolfGrass", + "GolfCupFlag": "Default", + "ShellPile": "Organic", + "AntiPortalBlock": "Default", + "Toilets": "Default", + "Spider": "Organic", + "LesionStation": "Default", + "SolarBrick": "Default", + "VortexBrick": "Default", + "NebulaBrick": "Default", + "StardustBrick": "Default", + "GolfTee": "GolfTee", + "MysticSnakeRope": "Default", + "GoldGoldfishBowl": "Default", + "CatBast": "Default", + "GoldStarryGlassBlock": "Default", + "BlueStarryGlassBlock": "Default", + "VoidMonolith": "Default", + "ArrowSign": "Default", + "PaintedArrowSign": "Default", + "GreenMossBrick": "Grass", + "BrownMossBrick": "Grass", + "RedMossBrick": "Grass", + "BlueMossBrick": "Grass", + "PurpleMossBrick": "Grass", + "LavaMossBrick": "Grass", + "LilyPad": "Default", + "Cattail": "Plant", + "FoodPlatter": "Default", + "BlackDragonflyJar": "Default", + "BlueDragonflyJar": "Default", + "GreenDragonflyJar": "Default", + "OrangeDragonflyJar": "Default", + "RedDragonflyJar": "Default", + "YellowDragonflyJar": "Default", + "GoldDragonflyJar": "Default", + "MushroomVines": "Plant", + "SeaOats": "Plant", + "OasisPlants": "Plant", + "BoulderStatue": "Default", + "MaggotCage": "Default", + "RatCage": "Default", + "KryptonMoss": "Grass", + "KryptonMossBrick": "Grass", + "XenonMoss": "Grass", + "XenonMossBrick": "Grass", + "LadybugCage": "Default", + "ArgonMoss": "Grass", + "ArgonMossBrick": "Grass", + "EchoBlock": "Default", + "OwlCage": "Default", + "PupfishBowl": "Default", + "GoldLadybugCage": "Default", + "LawnFlamingo": "Default", + "Grate": "Default", + "PottedPlants1": "Default", + "PottedPlants2": "Default", + "Seaweed": "Plant", + "TurtleCage": "Default", + "TurtleJungleCage": "Default", + "Sandcastles": "Default", + "GrebeCage": "Default", + "SeagullCage": "Default", + "WaterStriderCage": "Default", + "GoldWaterStriderCage": "Default", + "GrateClosed": "Default", + "SeahorseCage": "Default", + "GoldSeahorseCage": "Default", + "GolfTrophies": "Default", + "MarbleColumn": "Default", + "BambooBlock": "Wood", + "LargeBambooBlock": "Wood", + "PlasmaLamp": "Default", + "FogMachine": "Default", + "AmberStoneBlock": "Default", + "GardenGnome": "Default", + "PinkFairyJar": "Default", + "GreenFairyJar": "Default", + "BlueFairyJar": "Default", + "Bamboo": "Plant", + "SoulBottles": "Default", + "TatteredWoodSign": "Default", + "BorealBeam": "Default", + "RichMahoganyBeam": "Default", + "GraniteColumn": "Default", + "SandstoneColumn": "Default", + "MushroomBeam": "Default", + "RockGolemHead": "Default", + "HellButterflyJar": "Default", + "LavaflyinaBottle": "Default", + "MagmaSnailCage": "Default", + "TreeTopaz": "Default", + "TreeAmethyst": "Default", + "TreeSapphire": "Default", + "TreeEmerald": "Default", + "TreeRuby": "Default", + "TreeDiamond": "Default", + "TreeAmber": "Default", + "GemSaplings": "Plant", + "PotsSuspended": "Default", + "BrazierSuspended": "Default", + "VolcanoSmall": "Default", + "VolcanoLarge": "Default", + "VanityTreeSakuraSaplings": "Plant", + "VanityTreeSakura": "Default", + "TeleportationPylon": "Default", + "LavafishBowl": "Default", + "AmethystBunnyCage": "Default", + "TopazBunnyCage": "Default", + "SapphireBunnyCage": "Default", + "EmeraldBunnyCage": "Default", + "RubyBunnyCage": "Default", + "DiamondBunnyCage": "Default", + "AmberBunnyCage": "Default", + "AmethystSquirrelCage": "Default", + "TopazSquirrelCage": "Default", + "SapphireSquirrelCage": "Default", + "EmeraldSquirrelCage": "Default", + "RubySquirrelCage": "Default", + "DiamondSquirrelCage": "Default", + "AmberSquirrelCage": "Default", + "PottedLavaPlants": "Default", + "PottedLavaPlantTendrils": "Default", + "VanityTreeWillowSaplings": "Plant", + "VanityTreeYellowWillow": "Default", + "MasterTrophyBase": "Default", + "AccentSlab": "Default", + "TruffleWormCage": "Default", + "EmpressButterflyJar": "Default", + "SliceOfCake": "Default", + "TeaKettle": "Default" +} \ No newline at end of file diff --git a/GameContent/Metadata/TileGolfPhysics.cs b/GameContent/Metadata/TileGolfPhysics.cs new file mode 100644 index 0000000..71f312b --- /dev/null +++ b/GameContent/Metadata/TileGolfPhysics.cs @@ -0,0 +1,28 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Metadata.TileGolfPhysics +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Newtonsoft.Json; + +namespace Terraria.GameContent.Metadata +{ + public class TileGolfPhysics + { + [JsonProperty] + public float DirectImpactDampening { get; private set; } + + [JsonProperty] + public float SideImpactDampening { get; private set; } + + [JsonProperty] + public float ClubImpactDampening { get; private set; } + + [JsonProperty] + public float PassThroughDampening { get; private set; } + + [JsonProperty] + public float ImpactDampeningResistanceEfficiency { get; private set; } + } +} diff --git a/GameContent/Metadata/TileMaterial.cs b/GameContent/Metadata/TileMaterial.cs new file mode 100644 index 0000000..737ba54 --- /dev/null +++ b/GameContent/Metadata/TileMaterial.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Metadata.TileMaterial +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Newtonsoft.Json; + +namespace Terraria.GameContent.Metadata +{ + public class TileMaterial + { + [JsonProperty] + public TileGolfPhysics GolfPhysics { get; private set; } + } +} diff --git a/GameContent/Metadata/TileMaterials.cs b/GameContent/Metadata/TileMaterials.cs new file mode 100644 index 0000000..8c27f05 --- /dev/null +++ b/GameContent/Metadata/TileMaterials.cs @@ -0,0 +1,47 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Metadata.TileMaterials +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Newtonsoft.Json; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using Terraria.ID; + +namespace Terraria.GameContent.Metadata +{ + public static class TileMaterials + { + private static Dictionary _materialsByName; + private static readonly TileMaterial[] MaterialsByTileId = new TileMaterial[623]; + + static TileMaterials() + { + TileMaterials._materialsByName = TileMaterials.DeserializeEmbeddedResource>("Terraria.GameContent.Metadata.MaterialData.Materials.json"); + TileMaterial tileMaterial = TileMaterials._materialsByName["Default"]; + for (int index = 0; index < TileMaterials.MaterialsByTileId.Length; ++index) + TileMaterials.MaterialsByTileId[index] = tileMaterial; + foreach (KeyValuePair keyValuePair in TileMaterials.DeserializeEmbeddedResource>("Terraria.GameContent.Metadata.MaterialData.Tiles.json")) + { + string key1 = keyValuePair.Key; + string key2 = keyValuePair.Value; + TileMaterials.SetForTileId((ushort) TileID.Search.GetId(key1), TileMaterials._materialsByName[key2]); + } + } + + private static T DeserializeEmbeddedResource(string path) + { + using (Stream manifestResourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(path)) + { + using (StreamReader streamReader = new StreamReader(manifestResourceStream)) + return JsonConvert.DeserializeObject(streamReader.ReadToEnd()); + } + } + + public static void SetForTileId(ushort tileId, TileMaterial material) => TileMaterials.MaterialsByTileId[(int) tileId] = material; + + public static TileMaterial GetByTileId(ushort tileId) => TileMaterials.MaterialsByTileId[(int) tileId]; + } +} diff --git a/GameContent/MinecartDiggerHelper.cs b/GameContent/MinecartDiggerHelper.cs new file mode 100644 index 0000000..356deef --- /dev/null +++ b/GameContent/MinecartDiggerHelper.cs @@ -0,0 +1,187 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.MinecartDiggerHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.GameContent.Achievements; +using Terraria.ID; + +namespace Terraria.GameContent +{ + public class MinecartDiggerHelper + { + public static MinecartDiggerHelper Instance = new MinecartDiggerHelper(); + + public void TryDigging( + Player player, + Vector2 trackWorldPosition, + int digDirectionX, + int digDirectionY) + { + digDirectionY = 0; + Point tileCoordinates = trackWorldPosition.ToTileCoordinates(); + if (Framing.GetTileSafely(tileCoordinates).type != (ushort) 314 || (double) tileCoordinates.Y < Main.worldSurface) + return; + Point point1 = tileCoordinates; + point1.X += digDirectionX; + point1.Y += digDirectionY; + if (this.AlreadyLeadsIntoWantedTrack(tileCoordinates, point1) || digDirectionY == 0 && (this.AlreadyLeadsIntoWantedTrack(tileCoordinates, new Point(point1.X, point1.Y - 1)) || this.AlreadyLeadsIntoWantedTrack(tileCoordinates, new Point(point1.X, point1.Y + 1)))) + return; + int num = 5; + if (digDirectionY != 0) + num = 5; + Point point2 = point1; + Point point3 = point2; + point3.Y -= num - 1; + int x1 = point3.X; + for (int y = point3.Y; y <= point2.Y; ++y) + { + if (!this.CanGetPastTile(x1, y) || !this.HasPickPower(player, x1, y)) + return; + } + if (!this.CanConsumeATrackItem(player)) + return; + int x2 = point3.X; + for (int y = point3.Y; y <= point2.Y; ++y) + this.MineTheTileIfNecessary(x2, y); + this.ConsumeATrackItem(player); + this.PlaceATrack(point1.X, point1.Y); + player.velocity.X = MathHelper.Clamp(player.velocity.X, -1f, 1f); + if (this.DoTheTracksConnectProperly(tileCoordinates, point1)) + return; + this.CorrectTrackConnections(tileCoordinates, point1); + } + + private bool CanConsumeATrackItem(Player player) => this.FindMinecartTrackItem(player) != null; + + private void ConsumeATrackItem(Player player) + { + Item minecartTrackItem = this.FindMinecartTrackItem(player); + --minecartTrackItem.stack; + if (minecartTrackItem.stack != 0) + return; + minecartTrackItem.TurnToAir(); + } + + private Item FindMinecartTrackItem(Player player) + { + Item obj1 = (Item) null; + for (int index = 0; index < 58; ++index) + { + if (player.selectedItem != index || player.itemAnimation <= 0 && player.reuseDelay <= 0 && player.itemTime <= 0) + { + Item obj2 = player.inventory[index]; + if (obj2.type == 2340 && obj2.stack > 0) + { + obj1 = obj2; + break; + } + } + } + return obj1; + } + + private void PoundTrack(Point spot) + { + if (Main.tile[spot.X, spot.Y].type != (ushort) 314 || !Minecart.FrameTrack(spot.X, spot.Y, true) || Main.netMode != 1) + return; + NetMessage.SendData(17, number: 15, number2: ((float) spot.X), number3: ((float) spot.Y), number4: 1f); + } + + private bool AlreadyLeadsIntoWantedTrack( + Point tileCoordsOfFrontWheel, + Point tileCoordsWeWantToReach) + { + Tile tileSafely1 = Framing.GetTileSafely(tileCoordsOfFrontWheel); + Tile tileSafely2 = Framing.GetTileSafely(tileCoordsWeWantToReach); + if (!tileSafely1.active() || tileSafely1.type != (ushort) 314 || !tileSafely2.active() || tileSafely2.type != (ushort) 314) + return false; + int? expectedStartLeft; + int? expectedStartRight; + int? expectedEndLeft; + int? expectedEndRight; + MinecartDiggerHelper.GetExpectedDirections(tileCoordsOfFrontWheel, tileCoordsWeWantToReach, out expectedStartLeft, out expectedStartRight, out expectedEndLeft, out expectedEndRight); + return Minecart.GetAreExpectationsForSidesMet(tileCoordsOfFrontWheel, expectedStartLeft, expectedStartRight) && Minecart.GetAreExpectationsForSidesMet(tileCoordsWeWantToReach, expectedEndLeft, expectedEndRight); + } + + private static void GetExpectedDirections( + Point startCoords, + Point endCoords, + out int? expectedStartLeft, + out int? expectedStartRight, + out int? expectedEndLeft, + out int? expectedEndRight) + { + int num1 = endCoords.Y - startCoords.Y; + int num2 = endCoords.X - startCoords.X; + expectedStartLeft = new int?(); + expectedStartRight = new int?(); + expectedEndLeft = new int?(); + expectedEndRight = new int?(); + if (num2 == -1) + { + expectedStartLeft = new int?(num1); + expectedEndRight = new int?(-num1); + } + if (num2 != 1) + return; + expectedStartRight = new int?(num1); + expectedEndLeft = new int?(-num1); + } + + private bool DoTheTracksConnectProperly( + Point tileCoordsOfFrontWheel, + Point tileCoordsWeWantToReach) + { + return this.AlreadyLeadsIntoWantedTrack(tileCoordsOfFrontWheel, tileCoordsWeWantToReach); + } + + private void CorrectTrackConnections(Point startCoords, Point endCoords) + { + int? expectedStartLeft; + int? expectedStartRight; + int? expectedEndLeft; + int? expectedEndRight; + MinecartDiggerHelper.GetExpectedDirections(startCoords, endCoords, out expectedStartLeft, out expectedStartRight, out expectedEndLeft, out expectedEndRight); + Tile tileSafely1 = Framing.GetTileSafely(startCoords); + Tile tileSafely2 = Framing.GetTileSafely(endCoords); + if (tileSafely1.active() && tileSafely1.type == (ushort) 314) + Minecart.TryFittingTileOrientation(startCoords, expectedStartLeft, expectedStartRight); + if (!tileSafely2.active() || tileSafely2.type != (ushort) 314) + return; + Minecart.TryFittingTileOrientation(endCoords, expectedEndLeft, expectedEndRight); + } + + private bool HasPickPower(Player player, int x, int y) => player.HasEnoughPickPowerToHurtTile(x, y); + + private bool CanGetPastTile(int x, int y) + { + if (WorldGen.CheckTileBreakability(x, y) != 0) + return false; + Tile tile = Main.tile[x, y]; + return (!tile.active() || !TileID.Sets.Falling[(int) tile.type]) && (!tile.active() || WorldGen.CanKillTile(x, y)); + } + + private void PlaceATrack(int x, int y) + { + int Type = 314; + int num = 0; + if (!WorldGen.PlaceTile(x, y, Type, plr: Main.myPlayer, style: num)) + return; + NetMessage.SendData(17, number: 1, number2: ((float) x), number3: ((float) y), number4: ((float) Type), number5: num); + } + + private void MineTheTileIfNecessary(int x, int y) + { + AchievementsHelper.CurrentlyMining = true; + if (Main.tile[x, y].active()) + { + WorldGen.KillTile(x, y); + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y)); + } + AchievementsHelper.CurrentlyMining = false; + } + } +} diff --git a/GameContent/NPCHeadDrawRenderTargetContent.cs b/GameContent/NPCHeadDrawRenderTargetContent.cs new file mode 100644 index 0000000..7c13caf --- /dev/null +++ b/GameContent/NPCHeadDrawRenderTargetContent.cs @@ -0,0 +1,28 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.NPCHeadDrawRenderTargetContent +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.GameContent +{ + public class NPCHeadDrawRenderTargetContent : AnOutlinedDrawRenderTargetContent + { + private Texture2D _theTexture; + + public void SetTexture(Texture2D texture) + { + if (this._theTexture == texture) + return; + this._theTexture = texture; + this._wasPrepared = false; + this.width = texture.Width + 8; + this.height = texture.Height + 8; + } + + internal override void DrawTheContent(SpriteBatch spriteBatch) => spriteBatch.Draw(this._theTexture, new Vector2(4f, 4f), new Rectangle?(), Color.White, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } +} diff --git a/GameContent/NetModules/NetAmbienceModule.cs b/GameContent/NetModules/NetAmbienceModule.cs new file mode 100644 index 0000000..cf8292e --- /dev/null +++ b/GameContent/NetModules/NetAmbienceModule.cs @@ -0,0 +1,37 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.NetModules.NetAmbienceModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.IO; +using Terraria.GameContent.Ambience; +using Terraria.GameContent.Skies; +using Terraria.Graphics.Effects; +using Terraria.Net; + +namespace Terraria.GameContent.NetModules +{ + public class NetAmbienceModule : NetModule + { + public static NetPacket SerializeSkyEntitySpawn(Player player, SkyEntityType type) + { + int num = Main.rand.Next(); + NetPacket packet = NetModule.CreatePacket(6); + packet.Writer.Write((byte) player.whoAmI); + packet.Writer.Write(num); + packet.Writer.Write((byte) type); + return packet; + } + + public override bool Deserialize(BinaryReader reader, int userId) + { + byte playerId = reader.ReadByte(); + int seed = reader.ReadInt32(); + SkyEntityType type = (SkyEntityType) reader.ReadByte(); + Main.QueueMainThreadAction((Action) (() => ((AmbientSky) SkyManager.Instance["Ambience"]).Spawn(Main.player[(int) playerId], type, seed))); + return true; + } + } +} diff --git a/GameContent/NetModules/NetBestiaryModule.cs b/GameContent/NetModules/NetBestiaryModule.cs new file mode 100644 index 0000000..0599c58 --- /dev/null +++ b/GameContent/NetModules/NetBestiaryModule.cs @@ -0,0 +1,71 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.NetModules.NetBestiaryModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; +using Terraria.ID; +using Terraria.Net; + +namespace Terraria.GameContent.NetModules +{ + public class NetBestiaryModule : NetModule + { + public static NetPacket SerializeKillCount(int npcNetId, int killcount) + { + NetPacket packet = NetModule.CreatePacket(5); + packet.Writer.Write((byte) 0); + packet.Writer.Write((short) npcNetId); + packet.Writer.Write((ushort) killcount); + return packet; + } + + public static NetPacket SerializeSight(int npcNetId) + { + NetPacket packet = NetModule.CreatePacket(3); + packet.Writer.Write((byte) 1); + packet.Writer.Write((short) npcNetId); + return packet; + } + + public static NetPacket SerializeChat(int npcNetId) + { + NetPacket packet = NetModule.CreatePacket(3); + packet.Writer.Write((byte) 2); + packet.Writer.Write((short) npcNetId); + return packet; + } + + public override bool Deserialize(BinaryReader reader, int userId) + { + switch (reader.ReadByte()) + { + case 0: + short num1 = reader.ReadInt16(); + string bestiaryCreditId1 = ContentSamples.NpcsByNetId[(int) num1].GetBestiaryCreditId(); + ushort num2 = reader.ReadUInt16(); + Main.BestiaryTracker.Kills.SetKillCountDirectly(bestiaryCreditId1, (int) num2); + break; + case 1: + short num3 = reader.ReadInt16(); + string bestiaryCreditId2 = ContentSamples.NpcsByNetId[(int) num3].GetBestiaryCreditId(); + Main.BestiaryTracker.Sights.SetWasSeenDirectly(bestiaryCreditId2); + break; + case 2: + short num4 = reader.ReadInt16(); + string bestiaryCreditId3 = ContentSamples.NpcsByNetId[(int) num4].GetBestiaryCreditId(); + Main.BestiaryTracker.Chats.SetWasChatWithDirectly(bestiaryCreditId3); + break; + } + return true; + } + + private enum BestiaryUnlockType : byte + { + Kill, + Sight, + Chat, + } + } +} diff --git a/GameContent/NetModules/NetCreativePowerPermissionsModule.cs b/GameContent/NetModules/NetCreativePowerPermissionsModule.cs new file mode 100644 index 0000000..c3747b9 --- /dev/null +++ b/GameContent/NetModules/NetCreativePowerPermissionsModule.cs @@ -0,0 +1,40 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.NetModules.NetCreativePowerPermissionsModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; +using Terraria.GameContent.Creative; +using Terraria.Net; + +namespace Terraria.GameContent.NetModules +{ + public class NetCreativePowerPermissionsModule : NetModule + { + private const byte _setPermissionLevelId = 0; + + public static NetPacket SerializeCurrentPowerPermissionLevel(ushort powerId, int level) + { + NetPacket packet = NetModule.CreatePacket(4); + packet.Writer.Write((byte) 0); + packet.Writer.Write(powerId); + packet.Writer.Write((byte) level); + return packet; + } + + public override bool Deserialize(BinaryReader reader, int userId) + { + if (reader.ReadByte() == (byte) 0) + { + ushort id = reader.ReadUInt16(); + int num = (int) reader.ReadByte(); + ICreativePower power; + if (Main.netMode == 2 || !CreativePowerManager.Instance.TryGetPower(id, out power)) + return false; + power.CurrentPermissionLevel = (PowerPermissionLevel) num; + } + return true; + } + } +} diff --git a/GameContent/NetModules/NetCreativePowersModule.cs b/GameContent/NetModules/NetCreativePowersModule.cs new file mode 100644 index 0000000..f862ec6 --- /dev/null +++ b/GameContent/NetModules/NetCreativePowersModule.cs @@ -0,0 +1,34 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.NetModules.NetCreativePowersModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; +using Terraria.GameContent.Creative; +using Terraria.Net; + +namespace Terraria.GameContent.NetModules +{ + public class NetCreativePowersModule : NetModule + { + public static NetPacket PreparePacket( + ushort powerId, + int specificInfoBytesInPacketCount) + { + NetPacket packet = NetModule.CreatePacket(specificInfoBytesInPacketCount + 2); + packet.Writer.Write(powerId); + return packet; + } + + public override bool Deserialize(BinaryReader reader, int userId) + { + ushort id = reader.ReadUInt16(); + ICreativePower power; + if (!CreativePowerManager.Instance.TryGetPower(id, out power)) + return false; + power.DeserializeNetMessage(reader, userId); + return true; + } + } +} diff --git a/GameContent/NetModules/NetCreativeUnlocksModule.cs b/GameContent/NetModules/NetCreativeUnlocksModule.cs new file mode 100644 index 0000000..8cd3faf --- /dev/null +++ b/GameContent/NetModules/NetCreativeUnlocksModule.cs @@ -0,0 +1,30 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.NetModules.NetCreativeUnlocksModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; +using Terraria.ID; +using Terraria.Net; + +namespace Terraria.GameContent.NetModules +{ + public class NetCreativeUnlocksModule : NetModule + { + public static NetPacket SerializeItemSacrifice(int itemId, int sacrificeCount) + { + NetPacket packet = NetModule.CreatePacket(3); + packet.Writer.Write((short) itemId); + packet.Writer.Write((ushort) sacrificeCount); + return packet; + } + + public override bool Deserialize(BinaryReader reader, int userId) + { + short num = reader.ReadInt16(); + Main.LocalPlayerCreativeTracker.ItemSacrifices.SetSacrificeCountDirectly(ContentSamples.ItemPersistentIdsByNetIds[(int) num], (int) reader.ReadUInt16()); + return true; + } + } +} diff --git a/GameContent/NetModules/NetCreativeUnlocksPlayerReportModule.cs b/GameContent/NetModules/NetCreativeUnlocksPlayerReportModule.cs new file mode 100644 index 0000000..0fab77e --- /dev/null +++ b/GameContent/NetModules/NetCreativeUnlocksPlayerReportModule.cs @@ -0,0 +1,35 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.NetModules.NetCreativeUnlocksPlayerReportModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; +using Terraria.Net; + +namespace Terraria.GameContent.NetModules +{ + public class NetCreativeUnlocksPlayerReportModule : NetModule + { + private const byte _requestItemSacrificeId = 0; + + public static NetPacket SerializeSacrificeRequest(int itemId, int amount) + { + NetPacket packet = NetModule.CreatePacket(5); + packet.Writer.Write((byte) 0); + packet.Writer.Write((ushort) itemId); + packet.Writer.Write((ushort) amount); + return packet; + } + + public override bool Deserialize(BinaryReader reader, int userId) + { + if (reader.ReadByte() == (byte) 0) + { + int num1 = (int) reader.ReadUInt16(); + int num2 = (int) reader.ReadUInt16(); + } + return true; + } + } +} diff --git a/GameContent/NetModules/NetLiquidModule.cs b/GameContent/NetModules/NetLiquidModule.cs new file mode 100644 index 0000000..bcd1f79 --- /dev/null +++ b/GameContent/NetModules/NetLiquidModule.cs @@ -0,0 +1,140 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.NetModules.NetLiquidModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using System.IO; +using Terraria.Net; + +namespace Terraria.GameContent.NetModules +{ + public class NetLiquidModule : NetModule + { + private static List _changesForPlayerCache = new List(); + private static Dictionary _changesByChunkCoords = new Dictionary(); + + public static NetPacket Serialize(HashSet changes) + { + NetPacket packet = NetModule.CreatePacket(changes.Count * 6 + 2); + packet.Writer.Write((ushort) changes.Count); + foreach (int change in changes) + { + int index1 = change >> 16 & (int) ushort.MaxValue; + int index2 = change & (int) ushort.MaxValue; + packet.Writer.Write(change); + packet.Writer.Write(Main.tile[index1, index2].liquid); + packet.Writer.Write(Main.tile[index1, index2].liquidType()); + } + return packet; + } + + public static NetPacket SerializeForPlayer(int playerIndex) + { + NetLiquidModule._changesForPlayerCache.Clear(); + foreach (KeyValuePair changesByChunkCoord in NetLiquidModule._changesByChunkCoords) + { + if (changesByChunkCoord.Value.BroadcastingCondition(playerIndex)) + NetLiquidModule._changesForPlayerCache.AddRange((IEnumerable) changesByChunkCoord.Value.DirtiedPackedTileCoords); + } + NetPacket packet = NetModule.CreatePacket(NetLiquidModule._changesForPlayerCache.Count * 6 + 2); + packet.Writer.Write((ushort) NetLiquidModule._changesForPlayerCache.Count); + foreach (int num in NetLiquidModule._changesForPlayerCache) + { + int index1 = num >> 16 & (int) ushort.MaxValue; + int index2 = num & (int) ushort.MaxValue; + packet.Writer.Write(num); + packet.Writer.Write(Main.tile[index1, index2].liquid); + packet.Writer.Write(Main.tile[index1, index2].liquidType()); + } + return packet; + } + + public override bool Deserialize(BinaryReader reader, int userId) + { + int num1 = (int) reader.ReadUInt16(); + for (int index1 = 0; index1 < num1; ++index1) + { + int num2 = reader.ReadInt32(); + byte num3 = reader.ReadByte(); + byte num4 = reader.ReadByte(); + int index2 = num2 >> 16 & (int) ushort.MaxValue; + int index3 = num2 & (int) ushort.MaxValue; + Tile tile = Main.tile[index2, index3]; + if (tile != null) + { + tile.liquid = num3; + tile.liquidType((int) num4); + } + } + return true; + } + + public static void CreateAndBroadcastByChunk(HashSet dirtiedPackedTileCoords) + { + NetLiquidModule.PrepareChunks(dirtiedPackedTileCoords); + NetLiquidModule.PrepareAndSendToEachPlayerSeparately(); + } + + private static void PrepareAndSendToEachPlayerSeparately() + { + for (int index = 0; index < 256; ++index) + { + if (Netplay.Clients[index].IsConnected()) + NetManager.Instance.SendToClient(NetLiquidModule.SerializeForPlayer(index), index); + } + } + + private static void BroadcastEachChunkSeparately() + { + foreach (KeyValuePair changesByChunkCoord in NetLiquidModule._changesByChunkCoords) + NetManager.Instance.Broadcast(NetLiquidModule.Serialize(changesByChunkCoord.Value.DirtiedPackedTileCoords), new NetManager.BroadcastCondition(changesByChunkCoord.Value.BroadcastingCondition)); + } + + private static void PrepareChunks(HashSet dirtiedPackedTileCoords) + { + foreach (KeyValuePair changesByChunkCoord in NetLiquidModule._changesByChunkCoords) + changesByChunkCoord.Value.DirtiedPackedTileCoords.Clear(); + NetLiquidModule.DistributeChangesIntoChunks(dirtiedPackedTileCoords); + } + + private static void BroadcastAllChanges(HashSet dirtiedPackedTileCoords) => NetManager.Instance.Broadcast(NetLiquidModule.Serialize(dirtiedPackedTileCoords)); + + private static void DistributeChangesIntoChunks(HashSet dirtiedPackedTileCoords) + { + foreach (int dirtiedPackedTileCoord in dirtiedPackedTileCoords) + { + int x = dirtiedPackedTileCoord >> 16 & (int) ushort.MaxValue; + int y = dirtiedPackedTileCoord & (int) ushort.MaxValue; + Point key; + key.X = Netplay.GetSectionX(x); + key.Y = Netplay.GetSectionY(y); + NetLiquidModule.ChunkChanges chunkChanges; + if (!NetLiquidModule._changesByChunkCoords.TryGetValue(key, out chunkChanges)) + { + chunkChanges = new NetLiquidModule.ChunkChanges(key.X, key.Y); + NetLiquidModule._changesByChunkCoords[key] = chunkChanges; + } + chunkChanges.DirtiedPackedTileCoords.Add(dirtiedPackedTileCoord); + } + } + + private class ChunkChanges + { + public HashSet DirtiedPackedTileCoords; + public int ChunkX; + public int ChunkY; + + public ChunkChanges(int x, int y) + { + this.ChunkX = x; + this.ChunkY = y; + this.DirtiedPackedTileCoords = new HashSet(); + } + + public bool BroadcastingCondition(int clientIndex) => Netplay.Clients[clientIndex].TileSections[this.ChunkX, this.ChunkY]; + } + } +} diff --git a/GameContent/NetModules/NetParticlesModule.cs b/GameContent/NetModules/NetParticlesModule.cs new file mode 100644 index 0000000..108df76 --- /dev/null +++ b/GameContent/NetModules/NetParticlesModule.cs @@ -0,0 +1,37 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.NetModules.NetParticlesModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; +using Terraria.GameContent.Drawing; +using Terraria.Net; + +namespace Terraria.GameContent.NetModules +{ + public class NetParticlesModule : NetModule + { + public static NetPacket Serialize( + ParticleOrchestraType particleType, + ParticleOrchestraSettings settings) + { + NetPacket packet = NetModule.CreatePacket(22); + packet.Writer.Write((byte) particleType); + settings.Serialize(packet.Writer); + return packet; + } + + public override bool Deserialize(BinaryReader reader, int userId) + { + ParticleOrchestraType particleOrchestraType = (ParticleOrchestraType) reader.ReadByte(); + ParticleOrchestraSettings settings = new ParticleOrchestraSettings(); + settings.DeserializeFrom(reader); + if (Main.netMode == 2) + NetManager.Instance.Broadcast(NetParticlesModule.Serialize(particleOrchestraType, settings), userId); + else + ParticleOrchestrator.SpawnParticlesDirect(particleOrchestraType, settings); + return true; + } + } +} diff --git a/GameContent/NetModules/NetPingModule.cs b/GameContent/NetModules/NetPingModule.cs new file mode 100644 index 0000000..fd81ee4 --- /dev/null +++ b/GameContent/NetModules/NetPingModule.cs @@ -0,0 +1,29 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.NetModules.NetPingModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.IO; +using Terraria.Net; + +namespace Terraria.GameContent.NetModules +{ + public class NetPingModule : NetModule + { + public static NetPacket Serialize(Vector2 position) + { + NetPacket packet = NetModule.CreatePacket(8); + packet.Writer.WriteVector2(position); + return packet; + } + + public override bool Deserialize(BinaryReader reader, int userId) + { + Vector2 position = reader.ReadVector2(); + Main.Pings.Add(position); + return true; + } + } +} diff --git a/GameContent/NetModules/NetTeleportPylonModule.cs b/GameContent/NetModules/NetTeleportPylonModule.cs new file mode 100644 index 0000000..dd2c596 --- /dev/null +++ b/GameContent/NetModules/NetTeleportPylonModule.cs @@ -0,0 +1,73 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.NetModules.NetTeleportPylonModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; +using Terraria.DataStructures; +using Terraria.Net; + +namespace Terraria.GameContent.NetModules +{ + public class NetTeleportPylonModule : NetModule + { + public static NetPacket SerializePylonWasAddedOrRemoved( + TeleportPylonInfo info, + NetTeleportPylonModule.SubPacketType packetType) + { + NetPacket packet = NetModule.CreatePacket(6); + packet.Writer.Write((byte) packetType); + packet.Writer.Write(info.PositionInTiles.X); + packet.Writer.Write(info.PositionInTiles.Y); + packet.Writer.Write((byte) info.TypeOfPylon); + return packet; + } + + public static NetPacket SerializeUseRequest(TeleportPylonInfo info) + { + NetPacket packet = NetModule.CreatePacket(6); + packet.Writer.Write((byte) 2); + packet.Writer.Write(info.PositionInTiles.X); + packet.Writer.Write(info.PositionInTiles.Y); + packet.Writer.Write((byte) info.TypeOfPylon); + return packet; + } + + public override bool Deserialize(BinaryReader reader, int userId) + { + switch (reader.ReadByte()) + { + case 0: + Main.PylonSystem.AddForClient(new TeleportPylonInfo() + { + PositionInTiles = new Point16(reader.ReadInt16(), reader.ReadInt16()), + TypeOfPylon = (TeleportPylonType) reader.ReadByte() + }); + break; + case 1: + Main.PylonSystem.RemoveForClient(new TeleportPylonInfo() + { + PositionInTiles = new Point16(reader.ReadInt16(), reader.ReadInt16()), + TypeOfPylon = (TeleportPylonType) reader.ReadByte() + }); + break; + case 2: + Main.PylonSystem.HandleTeleportRequest(new TeleportPylonInfo() + { + PositionInTiles = new Point16(reader.ReadInt16(), reader.ReadInt16()), + TypeOfPylon = (TeleportPylonType) reader.ReadByte() + }, userId); + break; + } + return true; + } + + public enum SubPacketType : byte + { + PylonWasAdded, + PylonWasRemoved, + PlayerRequestsTeleport, + } + } +} diff --git a/GameContent/NetModules/NetTextModule.cs b/GameContent/NetModules/NetTextModule.cs new file mode 100644 index 0000000..fe06578 --- /dev/null +++ b/GameContent/NetModules/NetTextModule.cs @@ -0,0 +1,55 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.NetModules.NetTextModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.IO; +using Terraria.Chat; +using Terraria.Localization; +using Terraria.Net; +using Terraria.UI.Chat; + +namespace Terraria.GameContent.NetModules +{ + public class NetTextModule : NetModule + { + public static NetPacket SerializeClientMessage(ChatMessage message) + { + NetPacket packet = NetModule.CreatePacket(message.GetMaxSerializedSize()); + message.Serialize(packet.Writer); + return packet; + } + + public static NetPacket SerializeServerMessage(NetworkText text, Color color) => NetTextModule.SerializeServerMessage(text, color, byte.MaxValue); + + public static NetPacket SerializeServerMessage( + NetworkText text, + Color color, + byte authorId) + { + NetPacket packet = NetModule.CreatePacket(1 + text.GetMaxSerializedSize() + 3); + packet.Writer.Write(authorId); + text.Serialize(packet.Writer); + packet.Writer.WriteRGB(color); + return packet; + } + + private bool DeserializeAsClient(BinaryReader reader, int senderPlayerId) + { + byte messageAuthor = reader.ReadByte(); + ChatHelper.DisplayMessage(NetworkText.Deserialize(reader), reader.ReadRGB(), messageAuthor); + return true; + } + + private bool DeserializeAsServer(BinaryReader reader, int senderPlayerId) + { + ChatMessage message = ChatMessage.Deserialize(reader); + ChatManager.Commands.ProcessIncomingMessage(message, senderPlayerId); + return true; + } + + public override bool Deserialize(BinaryReader reader, int senderPlayerId) => this.DeserializeAsClient(reader, senderPlayerId); + } +} diff --git a/GameContent/ObjectInteractions/AHoverInteractionChecker.cs b/GameContent/ObjectInteractions/AHoverInteractionChecker.cs new file mode 100644 index 0000000..4063d02 --- /dev/null +++ b/GameContent/ObjectInteractions/AHoverInteractionChecker.cs @@ -0,0 +1,67 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ObjectInteractions.AHoverInteractionChecker +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.GameInput; + +namespace Terraria.GameContent.ObjectInteractions +{ + public abstract class AHoverInteractionChecker + { + internal AHoverInteractionChecker.HoverStatus AttemptInteraction( + Player player, + Rectangle Hitbox) + { + Point tileCoordinates = Hitbox.ClosestPointInRect(player.Center).ToTileCoordinates(); + if (!player.IsInTileInteractionRange(tileCoordinates.X, tileCoordinates.Y)) + return AHoverInteractionChecker.HoverStatus.NotSelectable; + Matrix matrix = Matrix.Invert(Main.GameViewMatrix.ZoomMatrix); + Vector2 vector2 = Main.ReverseGravitySupport(Main.MouseScreen); + Vector2.Transform(Main.screenPosition, matrix); + Vector2 screenPosition = Main.screenPosition; + Vector2 v = vector2 + screenPosition; + bool flag1 = Hitbox.Contains(v.ToPoint()); + bool flag2 = flag1; + bool? nullable = this.AttemptOverridingHoverStatus(player, Hitbox); + if (nullable.HasValue) + flag2 = nullable.Value; + bool flag3 = flag2 & !player.lastMouseInterface; + bool flag4 = !Main.SmartCursorEnabled && !PlayerInput.UsingGamepad; + if (!flag3) + return !flag4 ? AHoverInteractionChecker.HoverStatus.SelectableButNotSelected : AHoverInteractionChecker.HoverStatus.NotSelectable; + Main.HasInteractibleObjectThatIsNotATile = true; + if (flag1) + this.DoHoverEffect(player, Hitbox); + if (PlayerInput.UsingGamepad) + player.GamepadEnableGrappleCooldown(); + bool flag5 = this.ShouldBlockInteraction(player, Hitbox); + if (Main.mouseRight && Main.mouseRightRelease && !flag5) + { + Main.mouseRightRelease = false; + player.tileInteractAttempted = true; + player.tileInteractionHappened = true; + player.releaseUseTile = false; + this.PerformInteraction(player, Hitbox); + } + return !Main.SmartCursorEnabled && !PlayerInput.UsingGamepad || flag4 ? AHoverInteractionChecker.HoverStatus.NotSelectable : AHoverInteractionChecker.HoverStatus.Selected; + } + + internal abstract bool? AttemptOverridingHoverStatus(Player player, Rectangle rectangle); + + internal abstract void DoHoverEffect(Player player, Rectangle hitbox); + + internal abstract bool ShouldBlockInteraction(Player player, Rectangle hitbox); + + internal abstract void PerformInteraction(Player player, Rectangle hitbox); + + internal enum HoverStatus + { + NotSelectable, + SelectableButNotSelected, + Selected, + } + } +} diff --git a/GameContent/ObjectInteractions/BlockBecauseYouAreOverAnImportantTile.cs b/GameContent/ObjectInteractions/BlockBecauseYouAreOverAnImportantTile.cs new file mode 100644 index 0000000..5e45076 --- /dev/null +++ b/GameContent/ObjectInteractions/BlockBecauseYouAreOverAnImportantTile.cs @@ -0,0 +1,40 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ObjectInteractions.BlockBecauseYouAreOverAnImportantTile +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.ObjectInteractions +{ + public class BlockBecauseYouAreOverAnImportantTile : ISmartInteractBlockReasonProvider + { + public bool ShouldBlockSmartInteract(SmartInteractScanSettings settings) + { + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + if (!WorldGen.InWorld(tileTargetX, tileTargetY, 10)) + return true; + Tile tile = Main.tile[tileTargetX, tileTargetY]; + if (tile == null) + return true; + if (tile.active()) + { + switch (tile.type) + { + case 4: + case 33: + case 334: + case 395: + case 410: + case 455: + case 471: + case 480: + case 509: + case 520: + return true; + } + } + return false; + } + } +} diff --git a/GameContent/ObjectInteractions/ISmartInteractBlockReasonProvider.cs b/GameContent/ObjectInteractions/ISmartInteractBlockReasonProvider.cs new file mode 100644 index 0000000..b6f80da --- /dev/null +++ b/GameContent/ObjectInteractions/ISmartInteractBlockReasonProvider.cs @@ -0,0 +1,13 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ObjectInteractions.ISmartInteractBlockReasonProvider +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.ObjectInteractions +{ + public interface ISmartInteractBlockReasonProvider + { + bool ShouldBlockSmartInteract(SmartInteractScanSettings settings); + } +} diff --git a/GameContent/ObjectInteractions/ISmartInteractCandidate.cs b/GameContent/ObjectInteractions/ISmartInteractCandidate.cs new file mode 100644 index 0000000..bdfdaf2 --- /dev/null +++ b/GameContent/ObjectInteractions/ISmartInteractCandidate.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ObjectInteractions.ISmartInteractCandidate +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.ObjectInteractions +{ + public interface ISmartInteractCandidate + { + float DistanceFromCursor { get; } + + void WinCandidacy(); + } +} diff --git a/GameContent/ObjectInteractions/ISmartInteractCandidateProvider.cs b/GameContent/ObjectInteractions/ISmartInteractCandidateProvider.cs new file mode 100644 index 0000000..6b27e59 --- /dev/null +++ b/GameContent/ObjectInteractions/ISmartInteractCandidateProvider.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ObjectInteractions.ISmartInteractCandidateProvider +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.ObjectInteractions +{ + public interface ISmartInteractCandidateProvider + { + void ClearSelfAndPrepareForCheck(); + + bool ProvideCandidate(SmartInteractScanSettings settings, out ISmartInteractCandidate candidate); + } +} diff --git a/GameContent/ObjectInteractions/NPCSmartInteractCandidateProvider.cs b/GameContent/ObjectInteractions/NPCSmartInteractCandidateProvider.cs new file mode 100644 index 0000000..1faf062 --- /dev/null +++ b/GameContent/ObjectInteractions/NPCSmartInteractCandidateProvider.cs @@ -0,0 +1,76 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ObjectInteractions.NPCSmartInteractCandidateProvider +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.GameContent.ObjectInteractions +{ + public class NPCSmartInteractCandidateProvider : ISmartInteractCandidateProvider + { + private NPCSmartInteractCandidateProvider.ReusableCandidate _candidate = new NPCSmartInteractCandidateProvider.ReusableCandidate(); + + public void ClearSelfAndPrepareForCheck() => Main.SmartInteractNPC = -1; + + public bool ProvideCandidate( + SmartInteractScanSettings settings, + out ISmartInteractCandidate candidate) + { + candidate = (ISmartInteractCandidate) null; + if (!settings.FullInteraction) + return false; + Rectangle rectangle = Utils.CenteredRectangle(settings.player.Center, new Vector2((float) Player.tileRangeX, (float) Player.tileRangeY) * 16f * 2f); + Vector2 mousevec = settings.mousevec; + mousevec.ToPoint(); + bool flag = false; + int npcIndex = -1; + float npcDistanceFromCursor = -1f; + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && npc.townNPC && npc.Hitbox.Intersects(rectangle) && !flag) + { + float num = npc.Hitbox.Distance(mousevec); + if ((npcIndex == -1 ? 1 : ((double) Main.npc[npcIndex].Hitbox.Distance(mousevec) > (double) num ? 1 : 0)) != 0) + { + npcIndex = index; + npcDistanceFromCursor = num; + } + if ((double) num == 0.0) + { + flag = true; + npcIndex = index; + npcDistanceFromCursor = num; + break; + } + } + } + if (settings.DemandOnlyZeroDistanceTargets && !flag || npcIndex == -1) + return false; + this._candidate.Reuse(npcIndex, npcDistanceFromCursor); + candidate = (ISmartInteractCandidate) this._candidate; + return true; + } + + private class ReusableCandidate : ISmartInteractCandidate + { + private int _npcIndexToTarget; + + public float DistanceFromCursor { get; private set; } + + public void WinCandidacy() + { + Main.SmartInteractNPC = this._npcIndexToTarget; + Main.SmartInteractShowingGenuine = true; + } + + public void Reuse(int npcIndex, float npcDistanceFromCursor) + { + this._npcIndexToTarget = npcIndex; + this.DistanceFromCursor = npcDistanceFromCursor; + } + } + } +} diff --git a/GameContent/ObjectInteractions/PotionOfReturnGateInteractionChecker.cs b/GameContent/ObjectInteractions/PotionOfReturnGateInteractionChecker.cs new file mode 100644 index 0000000..b9db42b --- /dev/null +++ b/GameContent/ObjectInteractions/PotionOfReturnGateInteractionChecker.cs @@ -0,0 +1,26 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ObjectInteractions.PotionOfReturnGateInteractionChecker +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.GameContent.ObjectInteractions +{ + public class PotionOfReturnGateInteractionChecker : AHoverInteractionChecker + { + internal override bool? AttemptOverridingHoverStatus(Player player, Rectangle rectangle) => Main.SmartInteractPotionOfReturn ? new bool?(true) : new bool?(); + + internal override void DoHoverEffect(Player player, Rectangle hitbox) + { + player.noThrow = 2; + player.cursorItemIconEnabled = true; + player.cursorItemIconID = 4870; + } + + internal override bool ShouldBlockInteraction(Player player, Rectangle hitbox) => (uint) Player.BlockInteractionWithProjectiles > 0U; + + internal override void PerformInteraction(Player player, Rectangle hitbox) => player.DoPotionOfReturnReturnToOriginalUsePosition(); + } +} diff --git a/GameContent/ObjectInteractions/PotionOfReturnHelper.cs b/GameContent/ObjectInteractions/PotionOfReturnHelper.cs new file mode 100644 index 0000000..0f8f11e --- /dev/null +++ b/GameContent/ObjectInteractions/PotionOfReturnHelper.cs @@ -0,0 +1,24 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ObjectInteractions.PotionOfReturnHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.GameContent.ObjectInteractions +{ + public class PotionOfReturnHelper + { + public static bool TryGetGateHitbox(Player player, out Rectangle homeHitbox) + { + homeHitbox = Rectangle.Empty; + if (!player.PotionOfReturnHomePosition.HasValue) + return false; + Vector2 vector2 = new Vector2(0.0f, (float) (-player.height / 2)); + Vector2 center = player.PotionOfReturnHomePosition.Value + vector2; + homeHitbox = Utils.CenteredRectangle(center, new Vector2(24f, 40f)); + return true; + } + } +} diff --git a/GameContent/ObjectInteractions/PotionOfReturnSmartInteractCandidateProvider.cs b/GameContent/ObjectInteractions/PotionOfReturnSmartInteractCandidateProvider.cs new file mode 100644 index 0000000..0a3abf6 --- /dev/null +++ b/GameContent/ObjectInteractions/PotionOfReturnSmartInteractCandidateProvider.cs @@ -0,0 +1,43 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ObjectInteractions.PotionOfReturnSmartInteractCandidateProvider +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.GameContent.ObjectInteractions +{ + public class PotionOfReturnSmartInteractCandidateProvider : ISmartInteractCandidateProvider + { + private PotionOfReturnSmartInteractCandidateProvider.ReusableCandidate _candidate = new PotionOfReturnSmartInteractCandidateProvider.ReusableCandidate(); + + public void ClearSelfAndPrepareForCheck() => Main.SmartInteractPotionOfReturn = false; + + public bool ProvideCandidate( + SmartInteractScanSettings settings, + out ISmartInteractCandidate candidate) + { + candidate = (ISmartInteractCandidate) null; + Rectangle homeHitbox; + if (!PotionOfReturnHelper.TryGetGateHitbox(settings.player, out homeHitbox)) + return false; + this._candidate.Reuse(homeHitbox.ClosestPointInRect(settings.mousevec).Distance(settings.mousevec)); + candidate = (ISmartInteractCandidate) this._candidate; + return true; + } + + private class ReusableCandidate : ISmartInteractCandidate + { + public float DistanceFromCursor { get; private set; } + + public void WinCandidacy() + { + Main.SmartInteractPotionOfReturn = true; + Main.SmartInteractShowingGenuine = true; + } + + public void Reuse(float distanceFromCursor) => this.DistanceFromCursor = distanceFromCursor; + } + } +} diff --git a/GameContent/ObjectInteractions/ProjectileSmartInteractCandidateProvider.cs b/GameContent/ObjectInteractions/ProjectileSmartInteractCandidateProvider.cs new file mode 100644 index 0000000..f01eeb3 --- /dev/null +++ b/GameContent/ObjectInteractions/ProjectileSmartInteractCandidateProvider.cs @@ -0,0 +1,78 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ObjectInteractions.ProjectileSmartInteractCandidateProvider +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; + +namespace Terraria.GameContent.ObjectInteractions +{ + public class ProjectileSmartInteractCandidateProvider : ISmartInteractCandidateProvider + { + private ProjectileSmartInteractCandidateProvider.ReusableCandidate _candidate = new ProjectileSmartInteractCandidateProvider.ReusableCandidate(); + + public void ClearSelfAndPrepareForCheck() => Main.SmartInteractProj = -1; + + public bool ProvideCandidate( + SmartInteractScanSettings settings, + out ISmartInteractCandidate candidate) + { + candidate = (ISmartInteractCandidate) null; + if (!settings.FullInteraction) + return false; + List interactWithHack = settings.player.GetListOfProjectilesToInteractWithHack(); + bool flag = false; + Vector2 mousevec = settings.mousevec; + mousevec.ToPoint(); + int projectileIndex = -1; + float projectileDistanceFromCursor = -1f; + for (int index1 = 0; index1 < interactWithHack.Count; ++index1) + { + int index2 = interactWithHack[index1]; + Projectile projectile = Main.projectile[index2]; + if (projectile.active) + { + float num = projectile.Hitbox.Distance(mousevec); + if ((projectileIndex == -1 ? 1 : ((double) Main.projectile[projectileIndex].Hitbox.Distance(mousevec) > (double) num ? 1 : 0)) != 0) + { + projectileIndex = index2; + projectileDistanceFromCursor = num; + } + if ((double) num == 0.0) + { + flag = true; + projectileIndex = index2; + projectileDistanceFromCursor = num; + break; + } + } + } + if (settings.DemandOnlyZeroDistanceTargets && !flag || projectileIndex == -1) + return false; + this._candidate.Reuse(projectileIndex, projectileDistanceFromCursor); + candidate = (ISmartInteractCandidate) this._candidate; + return true; + } + + private class ReusableCandidate : ISmartInteractCandidate + { + private int _projectileIndexToTarget; + + public float DistanceFromCursor { get; private set; } + + public void WinCandidacy() + { + Main.SmartInteractProj = this._projectileIndexToTarget; + Main.SmartInteractShowingGenuine = true; + } + + public void Reuse(int projectileIndex, float projectileDistanceFromCursor) + { + this._projectileIndexToTarget = projectileIndex; + this.DistanceFromCursor = projectileDistanceFromCursor; + } + } + } +} diff --git a/GameContent/ObjectInteractions/SmartInteractScanSettings.cs b/GameContent/ObjectInteractions/SmartInteractScanSettings.cs new file mode 100644 index 0000000..f4aec43 --- /dev/null +++ b/GameContent/ObjectInteractions/SmartInteractScanSettings.cs @@ -0,0 +1,22 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ObjectInteractions.SmartInteractScanSettings +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.GameContent.ObjectInteractions +{ + public struct SmartInteractScanSettings + { + public Player player; + public bool DemandOnlyZeroDistanceTargets; + public bool FullInteraction; + public Vector2 mousevec; + public int LX; + public int HX; + public int LY; + public int HY; + } +} diff --git a/GameContent/ObjectInteractions/SmartInteractSystem.cs b/GameContent/ObjectInteractions/SmartInteractSystem.cs new file mode 100644 index 0000000..295628f --- /dev/null +++ b/GameContent/ObjectInteractions/SmartInteractSystem.cs @@ -0,0 +1,55 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ObjectInteractions.SmartInteractSystem +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.ObjectInteractions +{ + public class SmartInteractSystem + { + private List _candidateProvidersByOrderOfPriority = new List(); + private List _blockProviders = new List(); + private List _candidates = new List(); + + public SmartInteractSystem() + { + this._candidateProvidersByOrderOfPriority.Add((ISmartInteractCandidateProvider) new PotionOfReturnSmartInteractCandidateProvider()); + this._candidateProvidersByOrderOfPriority.Add((ISmartInteractCandidateProvider) new ProjectileSmartInteractCandidateProvider()); + this._candidateProvidersByOrderOfPriority.Add((ISmartInteractCandidateProvider) new NPCSmartInteractCandidateProvider()); + this._candidateProvidersByOrderOfPriority.Add((ISmartInteractCandidateProvider) new TileSmartInteractCandidateProvider()); + this._blockProviders.Add((ISmartInteractBlockReasonProvider) new BlockBecauseYouAreOverAnImportantTile()); + } + + public void RunQuery(SmartInteractScanSettings settings) + { + this._candidates.Clear(); + foreach (ISmartInteractBlockReasonProvider blockProvider in this._blockProviders) + { + if (blockProvider.ShouldBlockSmartInteract(settings)) + return; + } + foreach (ISmartInteractCandidateProvider candidateProvider in this._candidateProvidersByOrderOfPriority) + candidateProvider.ClearSelfAndPrepareForCheck(); + foreach (ISmartInteractCandidateProvider candidateProvider in this._candidateProvidersByOrderOfPriority) + { + ISmartInteractCandidate candidate; + if (candidateProvider.ProvideCandidate(settings, out candidate)) + { + this._candidates.Add(candidate); + if ((double) candidate.DistanceFromCursor == 0.0) + break; + } + } + ISmartInteractCandidate interactCandidate = (ISmartInteractCandidate) null; + foreach (ISmartInteractCandidate candidate in this._candidates) + { + if (interactCandidate == null || (double) interactCandidate.DistanceFromCursor > (double) candidate.DistanceFromCursor) + interactCandidate = candidate; + } + interactCandidate?.WinCandidacy(); + } + } +} diff --git a/GameContent/ObjectInteractions/TileSmartInteractCandidateProvider.cs b/GameContent/ObjectInteractions/TileSmartInteractCandidateProvider.cs new file mode 100644 index 0000000..7c046fe --- /dev/null +++ b/GameContent/ObjectInteractions/TileSmartInteractCandidateProvider.cs @@ -0,0 +1,387 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ObjectInteractions.TileSmartInteractCandidateProvider +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; + +namespace Terraria.GameContent.ObjectInteractions +{ + public class TileSmartInteractCandidateProvider : ISmartInteractCandidateProvider + { + private List> targets = new List>(); + private TileSmartInteractCandidateProvider.ReusableCandidate _candidate = new TileSmartInteractCandidateProvider.ReusableCandidate(); + + public void ClearSelfAndPrepareForCheck() + { + Main.TileInteractionLX = -1; + Main.TileInteractionHX = -1; + Main.TileInteractionLY = -1; + Main.TileInteractionHY = -1; + Main.SmartInteractTileCoords.Clear(); + Main.SmartInteractTileCoordsSelected.Clear(); + this.targets.Clear(); + } + + public bool ProvideCandidate( + SmartInteractScanSettings settings, + out ISmartInteractCandidate candidate) + { + candidate = (ISmartInteractCandidate) null; + Point tileCoordinates = settings.mousevec.ToTileCoordinates(); + this.FillPotentialTargetTiles(settings); + int num1 = -1; + int num2 = -1; + int AimedX = -1; + int AimedY = -1; + if (this.targets.Count > 0) + { + float num3 = -1f; + Tuple target = this.targets[0]; + for (int index = 0; index < this.targets.Count; ++index) + { + float num4 = Vector2.Distance(new Vector2((float) this.targets[index].Item1, (float) this.targets[index].Item2) * 16f + Vector2.One * 8f, settings.mousevec); + if ((double) num3 == -1.0 || (double) num4 <= (double) num3) + { + num3 = num4; + target = this.targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, settings.LX, settings.LY, settings.HX, settings.HY)) + { + num1 = target.Item1; + num2 = target.Item2; + } + } + bool flag1 = false; + for (int index1 = 0; index1 < this.targets.Count; ++index1) + { + int index2 = this.targets[index1].Item1; + int index3 = this.targets[index1].Item2; + Tile tile = Main.tile[index2, index3]; + int num5 = 0; + int num6 = 0; + int num7 = 18; + int num8 = 18; + int num9 = 2; + switch (tile.type) + { + case 10: + num5 = 1; + num6 = 3; + num9 = 0; + break; + case 11: + case 356: + case 410: + case 470: + case 480: + case 509: + num5 = 2; + num6 = 3; + num9 = 0; + break; + case 15: + case 497: + num5 = 1; + num6 = 2; + num9 = 4; + break; + case 21: + case 55: + case 85: + case 97: + case 125: + case 132: + case 287: + case 335: + case 386: + case 411: + case 425: + case 441: + case 467: + case 468: + case 573: + case 621: + num5 = 2; + num6 = 2; + break; + case 29: + case 387: + num5 = 2; + num6 = 1; + break; + case 79: + case 139: + case 510: + case 511: + num5 = 2; + num6 = 2; + num9 = 0; + break; + case 88: + num5 = 3; + num6 = 1; + num9 = 0; + break; + case 89: + case 215: + case 237: + case 377: + num5 = 3; + num6 = 2; + break; + case 102: + case 463: + case 475: + case 597: + num5 = 3; + num6 = 4; + break; + case 104: + num5 = 2; + num6 = 5; + break; + case 136: + case 144: + case 494: + num5 = 1; + num6 = 1; + num9 = 0; + break; + case 207: + num5 = 2; + num6 = 4; + num9 = 0; + break; + case 209: + num5 = 4; + num6 = 3; + num9 = 0; + break; + case 212: + num5 = 4; + num6 = 3; + break; + case 216: + case 338: + num5 = 1; + num6 = 2; + break; + case 354: + case 455: + case 491: + num5 = 3; + num6 = 3; + num9 = 0; + break; + case 388: + case 389: + num5 = 1; + num6 = 5; + break; + case 487: + num5 = 4; + num6 = 2; + num9 = 0; + break; + } + if (num5 != 0 && num6 != 0) + { + int lx = index2 - (int) tile.frameX % (num7 * num5) / num7; + int ly = index3 - (int) tile.frameY % (num8 * num6 + num9) / num8; + bool flag2 = Collision.InTileBounds(num1, num2, lx, ly, lx + num5 - 1, ly + num6 - 1); + bool flag3 = Collision.InTileBounds(tileCoordinates.X, tileCoordinates.Y, lx, ly, lx + num5 - 1, ly + num6 - 1); + if (flag3) + { + AimedX = tileCoordinates.X; + AimedY = tileCoordinates.Y; + } + if (!settings.FullInteraction) + flag2 &= flag3; + if (flag1) + flag2 = false; + for (int x = lx; x < lx + num5; ++x) + { + for (int y = ly; y < ly + num6; ++y) + { + Point point = new Point(x, y); + if (!Main.SmartInteractTileCoords.Contains(point)) + { + if (flag2) + Main.SmartInteractTileCoordsSelected.Add(point); + if (flag2 || settings.FullInteraction) + Main.SmartInteractTileCoords.Add(point); + } + } + } + if (!flag1 & flag2) + flag1 = true; + } + } + if (settings.DemandOnlyZeroDistanceTargets) + { + if (AimedX == -1 || AimedY == -1) + return false; + this._candidate.Reuse(true, 0.0f, AimedX, AimedY, settings.LX - 10, settings.LY - 10, settings.HX + 10, settings.HY + 10); + candidate = (ISmartInteractCandidate) this._candidate; + return true; + } + if (num1 == -1 || num2 == -1) + return false; + this._candidate.Reuse(false, new Rectangle(num1 * 16, num2 * 16, 16, 16).ClosestPointInRect(settings.mousevec).Distance(settings.mousevec), num1, num2, settings.LX - 10, settings.LY - 10, settings.HX + 10, settings.HY + 10); + candidate = (ISmartInteractCandidate) this._candidate; + return true; + } + + private void FillPotentialTargetTiles(SmartInteractScanSettings settings) + { + for (int lx = settings.LX; lx <= settings.HX; ++lx) + { + for (int ly = settings.LY; ly <= settings.HY; ++ly) + { + Tile tile = Main.tile[lx, ly]; + if (tile != null && tile.active()) + { + switch (tile.type) + { + case 10: + case 11: + case 21: + case 29: + case 55: + case 79: + case 85: + case 88: + case 89: + case 97: + case 102: + case 104: + case 125: + case 132: + case 136: + case 139: + case 144: + case 207: + case 209: + case 215: + case 216: + case 287: + case 335: + case 338: + case 354: + case 377: + case 386: + case 387: + case 388: + case 389: + case 410: + case 411: + case 425: + case 441: + case 455: + case 463: + case 467: + case 468: + case 470: + case 475: + case 480: + case 487: + case 491: + case 494: + case 509: + case 510: + case 511: + case 573: + case 597: + case 621: + this.targets.Add(new Tuple(lx, ly)); + continue; + case 15: + case 497: + if (settings.player.IsWithinSnappngRangeToTile(lx, ly, 40)) + { + this.targets.Add(new Tuple(lx, ly)); + continue; + } + continue; + case 212: + if (settings.player.HasItem(949)) + { + this.targets.Add(new Tuple(lx, ly)); + continue; + } + continue; + case 237: + if (settings.player.HasItem(1293)) + { + this.targets.Add(new Tuple(lx, ly)); + continue; + } + continue; + case 356: + if (!Main.fastForwardTime && (Main.netMode == 1 || Main.sundialCooldown == 0)) + { + this.targets.Add(new Tuple(lx, ly)); + continue; + } + continue; + default: + continue; + } + } + } + } + } + + private class ReusableCandidate : ISmartInteractCandidate + { + private bool _strictSettings; + private int _aimedX; + private int _aimedY; + private int _hx; + private int _hy; + private int _lx; + private int _ly; + + public void Reuse( + bool strictSettings, + float distanceFromCursor, + int AimedX, + int AimedY, + int LX, + int LY, + int HX, + int HY) + { + this.DistanceFromCursor = distanceFromCursor; + this._strictSettings = strictSettings; + this._aimedX = AimedX; + this._aimedY = AimedY; + this._lx = LX; + this._ly = LY; + this._hx = HX; + this._hy = HY; + } + + public float DistanceFromCursor { get; private set; } + + public void WinCandidacy() + { + Main.SmartInteractX = this._aimedX; + Main.SmartInteractY = this._aimedY; + if (this._strictSettings) + Main.SmartInteractShowingFake = Main.SmartInteractTileCoords.Count > 0; + else + Main.SmartInteractShowingGenuine = true; + Main.TileInteractionLX = this._lx - 10; + Main.TileInteractionLY = this._ly - 10; + Main.TileInteractionHX = this._hx + 10; + Main.TileInteractionHY = this._hy + 10; + } + } + } +} diff --git a/GameContent/Personalities/AllPersonalitiesModifier.cs b/GameContent/Personalities/AllPersonalitiesModifier.cs new file mode 100644 index 0000000..c75a503 --- /dev/null +++ b/GameContent/Personalities/AllPersonalitiesModifier.cs @@ -0,0 +1,458 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Personalities.AllPersonalitiesModifier +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Personalities +{ + public class AllPersonalitiesModifier : IShopPersonalityTrait + { + public void ModifyShopPrice(HelperInfo info, ShopHelper shopHelperInstance) + { + int primaryPlayerBiome = info.PrimaryPlayerBiome; + bool[] nearbyNpCsByType = info.nearbyNPCsByType; + switch (info.npc.type) + { + case 17: + case 22: + case 588: + case 633: + if (primaryPlayerBiome == 0) + { + shopHelperInstance.LikeBiome(primaryPlayerBiome); + break; + } + break; + case 18: + case 108: + case 208: + case 550: + if (primaryPlayerBiome == 6) + { + shopHelperInstance.LikeBiome(primaryPlayerBiome); + break; + } + break; + case 19: + case 178: + case 207: + if (primaryPlayerBiome == 3) + { + shopHelperInstance.LikeBiome(primaryPlayerBiome); + break; + } + break; + case 20: + case 227: + case 228: + if (primaryPlayerBiome == 4) + { + shopHelperInstance.LikeBiome(primaryPlayerBiome); + break; + } + break; + case 38: + case 54: + case 107: + if (primaryPlayerBiome == 1) + { + shopHelperInstance.LikeBiome(primaryPlayerBiome); + break; + } + break; + case 124: + case 209: + case 441: + if (primaryPlayerBiome == 2) + { + shopHelperInstance.LikeBiome(primaryPlayerBiome); + break; + } + break; + case 142: + if (primaryPlayerBiome == 2) + { + shopHelperInstance.LoveBiome(primaryPlayerBiome); + break; + } + break; + case 160: + if (primaryPlayerBiome == 7) + { + shopHelperInstance.LikeBiome(primaryPlayerBiome); + break; + } + break; + case 229: + case 353: + case 369: + if (primaryPlayerBiome == 5) + { + shopHelperInstance.LikeBiome(primaryPlayerBiome); + break; + } + break; + } + switch (info.npc.type) + { + case 17: + case 20: + case 369: + case 633: + if (primaryPlayerBiome == 3) + { + shopHelperInstance.DislikeBiome(primaryPlayerBiome); + break; + } + break; + case 18: + case 19: + case 353: + case 550: + if (primaryPlayerBiome == 2) + { + shopHelperInstance.DislikeBiome(primaryPlayerBiome); + break; + } + break; + case 22: + case 38: + case 108: + if (primaryPlayerBiome == 5) + { + shopHelperInstance.DislikeBiome(primaryPlayerBiome); + break; + } + break; + case 54: + case 228: + case 441: + if (primaryPlayerBiome == 6) + { + shopHelperInstance.DislikeBiome(primaryPlayerBiome); + break; + } + break; + case 107: + case 178: + case 209: + if (primaryPlayerBiome == 4) + { + shopHelperInstance.DislikeBiome(primaryPlayerBiome); + break; + } + break; + case 124: + case 208: + case 229: + case 588: + if (primaryPlayerBiome == 1) + { + shopHelperInstance.DislikeBiome(primaryPlayerBiome); + break; + } + break; + case 142: + if (primaryPlayerBiome == 3) + { + shopHelperInstance.HateBiome(primaryPlayerBiome); + break; + } + break; + case 207: + case 227: + if (primaryPlayerBiome == 0) + { + shopHelperInstance.DislikeBiome(primaryPlayerBiome); + break; + } + break; + } + switch (info.npc.type) + { + case 17: + if (nearbyNpCsByType[588]) + shopHelperInstance.LikeNPC(588); + if (nearbyNpCsByType[18]) + shopHelperInstance.LikeNPC(18); + if (nearbyNpCsByType[441]) + shopHelperInstance.DislikeNPC(441); + if (!nearbyNpCsByType[369]) + break; + shopHelperInstance.HateNPC(369); + break; + case 18: + if (nearbyNpCsByType[19]) + shopHelperInstance.LoveNPC(19); + if (nearbyNpCsByType[108]) + shopHelperInstance.LikeNPC(108); + if (nearbyNpCsByType[208]) + shopHelperInstance.DislikeNPC(208); + if (nearbyNpCsByType[20]) + shopHelperInstance.DislikeNPC(20); + if (!nearbyNpCsByType[633]) + break; + shopHelperInstance.HateNPC(633); + break; + case 19: + if (nearbyNpCsByType[18]) + shopHelperInstance.LoveNPC(18); + if (nearbyNpCsByType[178]) + shopHelperInstance.LikeNPC(178); + if (nearbyNpCsByType[588]) + shopHelperInstance.DislikeNPC(588); + if (!nearbyNpCsByType[38]) + break; + shopHelperInstance.HateNPC(38); + break; + case 20: + if (nearbyNpCsByType[228]) + shopHelperInstance.LikeNPC(228); + if (nearbyNpCsByType[160]) + shopHelperInstance.LikeNPC(160); + if (nearbyNpCsByType[369]) + shopHelperInstance.DislikeNPC(369); + if (!nearbyNpCsByType[588]) + break; + shopHelperInstance.HateNPC(588); + break; + case 22: + if (nearbyNpCsByType[54]) + shopHelperInstance.LikeNPC(54); + if (nearbyNpCsByType[178]) + shopHelperInstance.DislikeNPC(178); + if (nearbyNpCsByType[227]) + shopHelperInstance.HateNPC(227); + if (!nearbyNpCsByType[633]) + break; + shopHelperInstance.LikeNPC(633); + break; + case 38: + if (nearbyNpCsByType[550]) + shopHelperInstance.LoveNPC(550); + if (nearbyNpCsByType[124]) + shopHelperInstance.LikeNPC(124); + if (nearbyNpCsByType[107]) + shopHelperInstance.DislikeNPC(107); + if (!nearbyNpCsByType[19]) + break; + shopHelperInstance.DislikeNPC(19); + break; + case 54: + if (nearbyNpCsByType[160]) + shopHelperInstance.LoveNPC(160); + if (nearbyNpCsByType[441]) + shopHelperInstance.LikeNPC(441); + if (nearbyNpCsByType[18]) + shopHelperInstance.DislikeNPC(18); + if (!nearbyNpCsByType[124]) + break; + shopHelperInstance.HateNPC(124); + break; + case 107: + if (nearbyNpCsByType[124]) + shopHelperInstance.LoveNPC(124); + if (nearbyNpCsByType[207]) + shopHelperInstance.LikeNPC(207); + if (nearbyNpCsByType[54]) + shopHelperInstance.DislikeNPC(54); + if (!nearbyNpCsByType[353]) + break; + shopHelperInstance.HateNPC(353); + break; + case 108: + if (nearbyNpCsByType[588]) + shopHelperInstance.LoveNPC(588); + if (nearbyNpCsByType[17]) + shopHelperInstance.LikeNPC(17); + if (nearbyNpCsByType[228]) + shopHelperInstance.DislikeNPC(228); + if (!nearbyNpCsByType[209]) + break; + shopHelperInstance.HateNPC(209); + break; + case 124: + if (nearbyNpCsByType[107]) + shopHelperInstance.LoveNPC(107); + if (nearbyNpCsByType[209]) + shopHelperInstance.LikeNPC(209); + if (nearbyNpCsByType[19]) + shopHelperInstance.DislikeNPC(19); + if (!nearbyNpCsByType[54]) + break; + shopHelperInstance.HateNPC(54); + break; + case 142: + if (!nearbyNpCsByType[441]) + break; + shopHelperInstance.HateNPC(441); + break; + case 160: + if (nearbyNpCsByType[22]) + shopHelperInstance.LoveNPC(22); + if (nearbyNpCsByType[20]) + shopHelperInstance.LikeNPC(20); + if (nearbyNpCsByType[54]) + shopHelperInstance.DislikeNPC(54); + if (!nearbyNpCsByType[228]) + break; + shopHelperInstance.HateNPC(228); + break; + case 178: + if (nearbyNpCsByType[209]) + shopHelperInstance.LoveNPC(209); + if (nearbyNpCsByType[227]) + shopHelperInstance.LikeNPC(227); + if (nearbyNpCsByType[208]) + shopHelperInstance.DislikeNPC(208); + if (nearbyNpCsByType[108]) + shopHelperInstance.DislikeNPC(108); + if (!nearbyNpCsByType[20]) + break; + shopHelperInstance.DislikeNPC(20); + break; + case 207: + if (nearbyNpCsByType[19]) + shopHelperInstance.LikeNPC(19); + if (nearbyNpCsByType[227]) + shopHelperInstance.LikeNPC(227); + if (nearbyNpCsByType[178]) + shopHelperInstance.DislikeNPC(178); + if (!nearbyNpCsByType[229]) + break; + shopHelperInstance.HateNPC(229); + break; + case 208: + if (nearbyNpCsByType[108]) + shopHelperInstance.LoveNPC(108); + if (nearbyNpCsByType[353]) + shopHelperInstance.LikeNPC(353); + if (nearbyNpCsByType[17]) + shopHelperInstance.DislikeNPC(17); + if (nearbyNpCsByType[441]) + shopHelperInstance.HateNPC(441); + if (!nearbyNpCsByType[633]) + break; + shopHelperInstance.LoveNPC(633); + break; + case 209: + if (nearbyNpCsByType[353]) + shopHelperInstance.LikeNPC(353); + if (nearbyNpCsByType[229]) + shopHelperInstance.LikeNPC(229); + if (nearbyNpCsByType[178]) + shopHelperInstance.LikeNPC(178); + if (nearbyNpCsByType[108]) + shopHelperInstance.HateNPC(108); + if (!nearbyNpCsByType[633]) + break; + shopHelperInstance.DislikeNPC(633); + break; + case 227: + if (nearbyNpCsByType[20]) + shopHelperInstance.LoveNPC(20); + if (nearbyNpCsByType[208]) + shopHelperInstance.LikeNPC(208); + if (nearbyNpCsByType[209]) + shopHelperInstance.DislikeNPC(209); + if (!nearbyNpCsByType[160]) + break; + shopHelperInstance.DislikeNPC(160); + break; + case 228: + if (nearbyNpCsByType[20]) + shopHelperInstance.LikeNPC(20); + if (nearbyNpCsByType[22]) + shopHelperInstance.LikeNPC(22); + if (nearbyNpCsByType[18]) + shopHelperInstance.DislikeNPC(18); + if (!nearbyNpCsByType[160]) + break; + shopHelperInstance.HateNPC(160); + break; + case 229: + if (nearbyNpCsByType[369]) + shopHelperInstance.LoveNPC(369); + if (nearbyNpCsByType[550]) + shopHelperInstance.LikeNPC(550); + if (nearbyNpCsByType[353]) + shopHelperInstance.DislikeNPC(353); + if (!nearbyNpCsByType[22]) + break; + shopHelperInstance.HateNPC(22); + break; + case 353: + if (nearbyNpCsByType[207]) + shopHelperInstance.LoveNPC(207); + if (nearbyNpCsByType[229]) + shopHelperInstance.LikeNPC(229); + if (nearbyNpCsByType[550]) + shopHelperInstance.DislikeNPC(550); + if (!nearbyNpCsByType[107]) + break; + shopHelperInstance.HateNPC(107); + break; + case 369: + if (nearbyNpCsByType[208]) + shopHelperInstance.LikeNPC(208); + if (nearbyNpCsByType[38]) + shopHelperInstance.LikeNPC(38); + if (nearbyNpCsByType[441]) + shopHelperInstance.LikeNPC(441); + if (!nearbyNpCsByType[550]) + break; + shopHelperInstance.HateNPC(550); + break; + case 441: + if (nearbyNpCsByType[17]) + shopHelperInstance.LoveNPC(17); + if (nearbyNpCsByType[208]) + shopHelperInstance.LikeNPC(208); + if (nearbyNpCsByType[38]) + shopHelperInstance.DislikeNPC(38); + if (nearbyNpCsByType[124]) + shopHelperInstance.DislikeNPC(124); + if (!nearbyNpCsByType[142]) + break; + shopHelperInstance.HateNPC(142); + break; + case 550: + if (nearbyNpCsByType[38]) + shopHelperInstance.LoveNPC(38); + if (nearbyNpCsByType[107]) + shopHelperInstance.LikeNPC(107); + if (nearbyNpCsByType[22]) + shopHelperInstance.DislikeNPC(22); + if (!nearbyNpCsByType[207]) + break; + shopHelperInstance.HateNPC(207); + break; + case 588: + if (nearbyNpCsByType[227]) + shopHelperInstance.LikeNPC(227); + if (nearbyNpCsByType[369]) + shopHelperInstance.LoveNPC(369); + if (nearbyNpCsByType[17]) + shopHelperInstance.HateNPC(17); + if (nearbyNpCsByType[229]) + shopHelperInstance.DislikeNPC(229); + if (!nearbyNpCsByType[633]) + break; + shopHelperInstance.LikeNPC(633); + break; + case 633: + if (nearbyNpCsByType[369]) + shopHelperInstance.DislikeNPC(369); + if (nearbyNpCsByType[19]) + shopHelperInstance.HateNPC(19); + if (nearbyNpCsByType[228]) + shopHelperInstance.LoveNPC(228); + if (!nearbyNpCsByType[588]) + break; + shopHelperInstance.LikeNPC(588); + break; + } + } + } +} diff --git a/GameContent/Personalities/HelperInfo.cs b/GameContent/Personalities/HelperInfo.cs new file mode 100644 index 0000000..a67aebc --- /dev/null +++ b/GameContent/Personalities/HelperInfo.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Personalities.HelperInfo +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.Personalities +{ + public struct HelperInfo + { + public Player player; + public NPC npc; + public List NearbyNPCs; + public int PrimaryPlayerBiome; + public bool[] nearbyNPCsByType; + } +} diff --git a/GameContent/Personalities/IShopPersonalityTrait.cs b/GameContent/Personalities/IShopPersonalityTrait.cs new file mode 100644 index 0000000..3d1cf10 --- /dev/null +++ b/GameContent/Personalities/IShopPersonalityTrait.cs @@ -0,0 +1,13 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Personalities.IShopPersonalityTrait +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Personalities +{ + public interface IShopPersonalityTrait + { + void ModifyShopPrice(HelperInfo info, ShopHelper shopHelperInstance); + } +} diff --git a/GameContent/Personalities/PersonalityDatabase.cs b/GameContent/Personalities/PersonalityDatabase.cs new file mode 100644 index 0000000..b51daa9 --- /dev/null +++ b/GameContent/Personalities/PersonalityDatabase.cs @@ -0,0 +1,30 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Personalities.PersonalityDatabase +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.Personalities +{ + public class PersonalityDatabase + { + private Dictionary _personalityProfiles; + + public PersonalityDatabase() => this._personalityProfiles = new Dictionary(); + + private void Register(IShopPersonalityTrait trait, int npcId) + { + if (!this._personalityProfiles.ContainsKey(npcId)) + this._personalityProfiles[npcId] = new PersonalityProfile(); + this._personalityProfiles[npcId].ShopModifiers.Add(trait); + } + + private void Register(IShopPersonalityTrait trait, params int[] npcIds) + { + for (int index = 0; index < npcIds.Length; ++index) + this.Register(trait, npcIds[index]); + } + } +} diff --git a/GameContent/Personalities/PersonalityProfile.cs b/GameContent/Personalities/PersonalityProfile.cs new file mode 100644 index 0000000..7bde227 --- /dev/null +++ b/GameContent/Personalities/PersonalityProfile.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Personalities.PersonalityProfile +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent.Personalities +{ + public class PersonalityProfile + { + public List ShopModifiers = new List(); + } +} diff --git a/GameContent/PlayerEyeHelper.cs b/GameContent/PlayerEyeHelper.cs new file mode 100644 index 0000000..3fbdd48 --- /dev/null +++ b/GameContent/PlayerEyeHelper.cs @@ -0,0 +1,122 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.PlayerEyeHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent +{ + public struct PlayerEyeHelper + { + private PlayerEyeHelper.EyeState _state; + private int _timeInState; + private const int TimeToActDamaged = 20; + + public int EyeFrameToShow { get; private set; } + + public void Update(Player player) + { + this.SetStateByPlayerInfo(player); + this.UpdateEyeFrameToShow(player); + ++this._timeInState; + } + + private void UpdateEyeFrameToShow(Player player) + { + PlayerEyeHelper.EyeFrame eyeFrame1 = PlayerEyeHelper.EyeFrame.EyeOpen; + switch (this._state) + { + case PlayerEyeHelper.EyeState.NormalBlinking: + int num = this._timeInState % 240 - 234; + eyeFrame1 = num < 4 ? (num < 2 ? (num < 0 ? PlayerEyeHelper.EyeFrame.EyeOpen : PlayerEyeHelper.EyeFrame.EyeHalfClosed) : PlayerEyeHelper.EyeFrame.EyeClosed) : PlayerEyeHelper.EyeFrame.EyeHalfClosed; + break; + case PlayerEyeHelper.EyeState.InStorm: + eyeFrame1 = this._timeInState % 120 - 114 < 0 ? PlayerEyeHelper.EyeFrame.EyeHalfClosed : PlayerEyeHelper.EyeFrame.EyeClosed; + break; + case PlayerEyeHelper.EyeState.InBed: + PlayerEyeHelper.EyeFrame eyeFrame2 = this.DoesPlayerCountAsModeratelyDamaged(player) ? PlayerEyeHelper.EyeFrame.EyeHalfClosed : PlayerEyeHelper.EyeFrame.EyeOpen; + this._timeInState = player.sleeping.timeSleeping; + eyeFrame1 = this._timeInState >= 60 ? (this._timeInState >= 120 ? PlayerEyeHelper.EyeFrame.EyeClosed : PlayerEyeHelper.EyeFrame.EyeHalfClosed) : eyeFrame2; + break; + case PlayerEyeHelper.EyeState.JustTookDamage: + eyeFrame1 = PlayerEyeHelper.EyeFrame.EyeClosed; + break; + case PlayerEyeHelper.EyeState.IsModeratelyDamaged: + case PlayerEyeHelper.EyeState.IsTipsy: + case PlayerEyeHelper.EyeState.IsPoisoned: + eyeFrame1 = this._timeInState % 120 - 100 < 0 ? PlayerEyeHelper.EyeFrame.EyeHalfClosed : PlayerEyeHelper.EyeFrame.EyeClosed; + break; + case PlayerEyeHelper.EyeState.IsBlind: + eyeFrame1 = PlayerEyeHelper.EyeFrame.EyeClosed; + break; + } + this.EyeFrameToShow = (int) eyeFrame1; + } + + private void SetStateByPlayerInfo(Player player) + { + if (player.blackout || player.blind) + { + this.SwitchToState(PlayerEyeHelper.EyeState.IsBlind); + } + else + { + if (this._state == PlayerEyeHelper.EyeState.JustTookDamage && this._timeInState < 20) + return; + if (player.sleeping.isSleeping) + this.SwitchToState(PlayerEyeHelper.EyeState.InBed, player.itemAnimation > 0); + else if (this.DoesPlayerCountAsModeratelyDamaged(player)) + this.SwitchToState(PlayerEyeHelper.EyeState.IsModeratelyDamaged); + else if (player.tipsy) + this.SwitchToState(PlayerEyeHelper.EyeState.IsTipsy); + else if (player.poisoned || player.venom) + { + this.SwitchToState(PlayerEyeHelper.EyeState.IsPoisoned); + } + else + { + bool flag = player.ZoneSandstorm || player.ZoneSnow && Main.IsItRaining; + if (player.behindBackWall) + flag = false; + if (flag) + this.SwitchToState(PlayerEyeHelper.EyeState.InStorm); + else + this.SwitchToState(PlayerEyeHelper.EyeState.NormalBlinking); + } + } + } + + private void SwitchToState( + PlayerEyeHelper.EyeState newState, + bool resetStateTimerEvenIfAlreadyInState = false) + { + if (this._state == newState && !resetStateTimerEvenIfAlreadyInState) + return; + this._state = newState; + this._timeInState = 0; + } + + private bool DoesPlayerCountAsModeratelyDamaged(Player player) => (double) player.statLife <= (double) player.statLifeMax2 * 0.25; + + public void BlinkBecausePlayerGotHurt() => this.SwitchToState(PlayerEyeHelper.EyeState.JustTookDamage, true); + + private enum EyeFrame + { + EyeOpen, + EyeHalfClosed, + EyeClosed, + } + + private enum EyeState + { + NormalBlinking, + InStorm, + InBed, + JustTookDamage, + IsModeratelyDamaged, + IsBlind, + IsTipsy, + IsPoisoned, + } + } +} diff --git a/GameContent/PlayerHeadDrawRenderTargetContent.cs b/GameContent/PlayerHeadDrawRenderTargetContent.cs new file mode 100644 index 0000000..8b199d9 --- /dev/null +++ b/GameContent/PlayerHeadDrawRenderTargetContent.cs @@ -0,0 +1,43 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.PlayerHeadDrawRenderTargetContent +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; +using Terraria.DataStructures; + +namespace Terraria.GameContent +{ + public class PlayerHeadDrawRenderTargetContent : AnOutlinedDrawRenderTargetContent + { + private Player _player; + private readonly List _drawData = new List(); + private readonly List _dust = new List(); + private readonly List _gore = new List(); + + public void UsePlayer(Player player) => this._player = player; + + internal override void DrawTheContent(SpriteBatch spriteBatch) + { + if (this._player == null) + return; + this._drawData.Clear(); + this._dust.Clear(); + this._gore.Clear(); + PlayerDrawHeadSet drawinfo = new PlayerDrawHeadSet(); + drawinfo.BoringSetup(this._player, this._drawData, this._dust, this._gore, (float) (this.width / 2), (float) (this.height / 2), 1f, 1f); + PlayerDrawHeadLayers.DrawPlayer_00_BackHelmet(ref drawinfo); + PlayerDrawHeadLayers.DrawPlayer_01_FaceSkin(ref drawinfo); + PlayerDrawHeadLayers.DrawPlayer_02_DrawArmorWithFullHair(ref drawinfo); + PlayerDrawHeadLayers.DrawPlayer_03_HelmetHair(ref drawinfo); + PlayerDrawHeadLayers.DrawPlayer_04_JungleRose(ref drawinfo); + PlayerDrawHeadLayers.DrawPlayer_05_TallHats(ref drawinfo); + PlayerDrawHeadLayers.DrawPlayer_06_NormalHats(ref drawinfo); + PlayerDrawHeadLayers.DrawPlayer_07_JustHair(ref drawinfo); + PlayerDrawHeadLayers.DrawPlayer_08_FaceAcc(ref drawinfo); + PlayerDrawHeadLayers.DrawPlayer_RenderAllLayers(ref drawinfo); + } + } +} diff --git a/GameContent/PlayerQueenSlimeMountTextureContent.cs b/GameContent/PlayerQueenSlimeMountTextureContent.cs new file mode 100644 index 0000000..6494dc4 --- /dev/null +++ b/GameContent/PlayerQueenSlimeMountTextureContent.cs @@ -0,0 +1,32 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.PlayerQueenSlimeMountTextureContent +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.DataStructures; +using Terraria.Graphics.Shaders; + +namespace Terraria.GameContent +{ + public class PlayerQueenSlimeMountTextureContent : ARenderTargetContentByRequest + { + protected override void HandleUseReqest(GraphicsDevice device, SpriteBatch spriteBatch) + { + Asset asset = TextureAssets.Extra[204]; + this.PrepareARenderTarget_AndListenToEvents(ref this._target, device, asset.Width(), asset.Height(), RenderTargetUsage.PreserveContents); + device.SetRenderTarget(this._target); + device.Clear(Color.Transparent); + DrawData drawData = new DrawData(asset.Value, Vector2.Zero, Color.White); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend); + GameShaders.Misc["QueenSlime"].Apply(new DrawData?(drawData)); + drawData.Draw(spriteBatch); + spriteBatch.End(); + device.SetRenderTarget((RenderTarget2D) null); + this._wasPrepared = true; + } + } +} diff --git a/GameContent/PlayerRainbowWingsTextureContent.cs b/GameContent/PlayerRainbowWingsTextureContent.cs new file mode 100644 index 0000000..d9c8ee2 --- /dev/null +++ b/GameContent/PlayerRainbowWingsTextureContent.cs @@ -0,0 +1,32 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.PlayerRainbowWingsTextureContent +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.DataStructures; +using Terraria.Graphics.Shaders; + +namespace Terraria.GameContent +{ + public class PlayerRainbowWingsTextureContent : ARenderTargetContentByRequest + { + protected override void HandleUseReqest(GraphicsDevice device, SpriteBatch spriteBatch) + { + Asset asset = TextureAssets.Extra[171]; + this.PrepareARenderTarget_AndListenToEvents(ref this._target, device, asset.Width(), asset.Height(), RenderTargetUsage.PreserveContents); + device.SetRenderTarget(this._target); + device.Clear(Color.Transparent); + DrawData drawData = new DrawData(asset.Value, Vector2.Zero, Color.White); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend); + GameShaders.Misc["HallowBoss"].Apply(new DrawData?(drawData)); + drawData.Draw(spriteBatch); + spriteBatch.End(); + device.SetRenderTarget((RenderTarget2D) null); + this._wasPrepared = true; + } + } +} diff --git a/GameContent/PlayerSittingHelper.cs b/GameContent/PlayerSittingHelper.cs new file mode 100644 index 0000000..759a48f --- /dev/null +++ b/GameContent/PlayerSittingHelper.cs @@ -0,0 +1,251 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.PlayerSittingHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.ID; + +namespace Terraria.GameContent +{ + public struct PlayerSittingHelper + { + public const int ChairSittingMaxDistance = 40; + public bool isSitting; + public Vector2 offsetForSeat; + public int sittingIndex; + + public void GetSittingOffsetInfo( + Player player, + out Vector2 posOffset, + out float seatAdjustment) + { + if (this.isSitting) + { + posOffset = new Vector2((float) (this.sittingIndex * player.direction * 8), (float) ((double) this.sittingIndex * (double) player.gravDir * -4.0)); + seatAdjustment = -4f; + seatAdjustment += (float) (int) this.offsetForSeat.Y; + posOffset += this.offsetForSeat * player.Directions; + } + else + { + posOffset = Vector2.Zero; + seatAdjustment = 0.0f; + } + } + + public void UpdateSitting(Player player) + { + if (!this.isSitting) + return; + Point tileCoordinates = (player.Bottom + new Vector2(0.0f, -2f)).ToTileCoordinates(); + int targetDirection; + Vector2 seatDownOffset; + if (!PlayerSittingHelper.GetSittingTargetInfo(player, tileCoordinates.X, tileCoordinates.Y, out targetDirection, out Vector2 _, out seatDownOffset)) + { + this.SitUp(player); + } + else + { + if (player.controlLeft || player.controlRight || player.controlUp || player.controlDown || player.controlJump || player.pulley || player.mount.Active || targetDirection != player.direction) + this.SitUp(player); + if (Main.sittingManager.GetNextPlayerStackIndexInCoords(tileCoordinates) >= 2) + this.SitUp(player); + if (!this.isSitting) + return; + this.offsetForSeat = seatDownOffset; + Main.sittingManager.AddPlayerAndGetItsStackedIndexInCoords(player.whoAmI, tileCoordinates, out this.sittingIndex); + } + } + + public void SitUp(Player player, bool multiplayerBroadcast = true) + { + if (!this.isSitting) + return; + this.isSitting = false; + this.offsetForSeat = Vector2.Zero; + this.sittingIndex = -1; + if (!multiplayerBroadcast || Main.myPlayer != player.whoAmI) + return; + NetMessage.SendData(13, number: player.whoAmI); + } + + public void SitDown(Player player, int x, int y) + { + int targetDirection; + Vector2 playerSittingPosition; + Vector2 seatDownOffset; + if (!PlayerSittingHelper.GetSittingTargetInfo(player, x, y, out targetDirection, out playerSittingPosition, out seatDownOffset)) + return; + Vector2 offset = playerSittingPosition - player.Bottom; + bool position = player.CanSnapToPosition(offset); + if (position) + position &= Main.sittingManager.GetNextPlayerStackIndexInCoords((playerSittingPosition + new Vector2(0.0f, -2f)).ToTileCoordinates()) < 2; + if (!position) + return; + if (this.isSitting && player.Bottom == playerSittingPosition) + { + this.SitUp(player); + } + else + { + player.StopVanityActions(); + player.RemoveAllGrapplingHooks(); + if (player.mount.Active) + player.mount.Dismount(player); + player.Bottom = playerSittingPosition; + player.ChangeDir(targetDirection); + this.isSitting = true; + this.offsetForSeat = seatDownOffset; + Main.sittingManager.AddPlayerAndGetItsStackedIndexInCoords(player.whoAmI, new Point(x, y), out this.sittingIndex); + player.velocity = Vector2.Zero; + player.gravDir = 1f; + if (Main.myPlayer != player.whoAmI) + return; + NetMessage.SendData(13, number: player.whoAmI); + } + } + + public static bool GetSittingTargetInfo( + Player player, + int x, + int y, + out int targetDirection, + out Vector2 playerSittingPosition, + out Vector2 seatDownOffset) + { + Tile tileSafely = Framing.GetTileSafely(x, y); + if (!TileID.Sets.CanBeSatOnForPlayers[(int) tileSafely.type] || !tileSafely.active()) + { + targetDirection = 1; + seatDownOffset = Vector2.Zero; + playerSittingPosition = new Vector2(); + return false; + } + int x1 = x; + int num1 = y; + targetDirection = 1; + seatDownOffset = Vector2.Zero; + int num2 = 6; + Vector2 zero1 = Vector2.Zero; + switch (tileSafely.type) + { + case 15: + case 497: + seatDownOffset.Y = (float) ((tileSafely.type == (ushort) 15 && (int) tileSafely.frameY / 40 == 27).ToInt() * 4); + if ((int) tileSafely.frameY % 40 != 0) + --num1; + targetDirection = -1; + if (tileSafely.frameX != (short) 0) + { + targetDirection = 1; + break; + } + break; + case 89: + targetDirection = player.direction; + num2 = 0; + Vector2 vector2_1 = new Vector2(-4f, 2f); + Vector2 vector2_2 = new Vector2(4f, 2f); + Vector2 vector2_3 = new Vector2(0.0f, 2f); + Vector2 zero2 = Vector2.Zero; + zero2.X = 1f; + zero1.X = -1f; + switch ((int) tileSafely.frameX / 54) + { + case 0: + vector2_3.Y = vector2_1.Y = vector2_2.Y = 1f; + break; + case 1: + vector2_3.Y = 1f; + break; + case 2: + case 14: + case 15: + case 17: + case 20: + case 21: + case 22: + case 23: + case 25: + case 26: + case 27: + case 28: + case 35: + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + vector2_3.Y = vector2_1.Y = vector2_2.Y = 1f; + break; + case 3: + case 4: + case 5: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 16: + case 18: + case 19: + case 36: + vector2_3.Y = vector2_1.Y = vector2_2.Y = 0.0f; + break; + case 6: + vector2_3.Y = vector2_1.Y = vector2_2.Y = -1f; + break; + case 24: + vector2_3.Y = 0.0f; + vector2_1.Y = -4f; + vector2_1.X = 0.0f; + vector2_2.X = 0.0f; + vector2_2.Y = -4f; + break; + } + if ((int) tileSafely.frameY % 40 != 0) + --num1; + seatDownOffset = (int) tileSafely.frameX % 54 == 0 && targetDirection == -1 || (int) tileSafely.frameX % 54 == 36 && targetDirection == 1 ? vector2_1 : ((int) tileSafely.frameX % 54 == 0 && targetDirection == 1 || (int) tileSafely.frameX % 54 == 36 && targetDirection == -1 ? vector2_2 : vector2_3); + seatDownOffset += zero2; + break; + case 102: + int num3 = (int) tileSafely.frameX / 18; + if (num3 == 0) + ++x1; + if (num3 == 2) + --x1; + int num4 = (int) tileSafely.frameY / 18; + if (num4 == 0) + num1 += 2; + if (num4 == 1) + ++num1; + if (num4 == 3) + --num1; + targetDirection = player.direction; + num2 = 0; + break; + case 487: + int num5 = (int) tileSafely.frameX % 72 / 18; + if (num5 == 1) + --x1; + if (num5 == 2) + ++x1; + if ((int) tileSafely.frameY / 18 != 0) + --num1; + targetDirection = (num5 <= 1).ToDirectionInt(); + num2 = 0; + --seatDownOffset.Y; + break; + } + playerSittingPosition = new Point(x1, num1 + 1).ToWorldCoordinates(autoAddY: 16f); + playerSittingPosition.X += (float) (targetDirection * num2); + playerSittingPosition += zero1; + return true; + } + } +} diff --git a/GameContent/PlayerSleepingHelper.cs b/GameContent/PlayerSleepingHelper.cs new file mode 100644 index 0000000..37b47f3 --- /dev/null +++ b/GameContent/PlayerSleepingHelper.cs @@ -0,0 +1,238 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.PlayerSleepingHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.ID; + +namespace Terraria.GameContent +{ + public struct PlayerSleepingHelper + { + public const int BedSleepingMaxDistance = 96; + public const int TimeToFullyFallAsleep = 120; + public bool isSleeping; + public int sleepingIndex; + public int timeSleeping; + public Vector2 visualOffsetOfBedBase; + + public bool FullyFallenAsleep => this.isSleeping && this.timeSleeping >= 120; + + public void GetSleepingOffsetInfo(Player player, out Vector2 posOffset) + { + if (this.isSleeping) + posOffset = this.visualOffsetOfBedBase * player.Directions + new Vector2(0.0f, (float) ((double) this.sleepingIndex * (double) player.gravDir * -4.0)); + else + posOffset = Vector2.Zero; + } + + private bool DoesPlayerHaveReasonToActUpInBed(Player player) => NPC.AnyDanger(true) || Main.bloodMoon && !Main.dayTime || Main.eclipse && Main.dayTime || player.itemAnimation > 0; + + public void SetIsSleepingAndAdjustPlayerRotation(Player player, bool state) + { + if (this.isSleeping == state) + return; + this.isSleeping = state; + if (state) + { + player.fullRotation = 1.570796f * (float) -player.direction; + } + else + { + player.fullRotation = 0.0f; + this.visualOffsetOfBedBase = new Vector2(); + } + } + + public void UpdateState(Player player) + { + if (!this.isSleeping) + { + this.timeSleeping = 0; + } + else + { + ++this.timeSleeping; + if (this.DoesPlayerHaveReasonToActUpInBed(player)) + this.timeSleeping = 0; + Point tileCoordinates = (player.Bottom + new Vector2(0.0f, -2f)).ToTileCoordinates(); + int targetDirection; + Vector2 visualoffset; + if (!PlayerSleepingHelper.GetSleepingTargetInfo(tileCoordinates.X, tileCoordinates.Y, out targetDirection, out Vector2 _, out visualoffset)) + { + this.StopSleeping(player); + } + else + { + if (player.controlLeft || player.controlRight || player.controlUp || player.controlDown || player.controlJump || player.pulley || player.mount.Active || targetDirection != player.direction) + this.StopSleeping(player); + bool flag = false; + if (player.itemAnimation > 0) + { + Item heldItem = player.HeldItem; + if (heldItem.damage > 0 && !heldItem.noMelee) + flag = true; + if (heldItem.fishingPole > 0) + flag = true; + bool? nullable = ItemID.Sets.ForcesBreaksSleeping[heldItem.type]; + if (nullable.HasValue) + flag = nullable.Value; + } + if (flag) + this.StopSleeping(player); + if (Main.sleepingManager.GetNextPlayerStackIndexInCoords(tileCoordinates) >= 2) + this.StopSleeping(player); + if (!this.isSleeping) + return; + this.visualOffsetOfBedBase = visualoffset; + Main.sleepingManager.AddPlayerAndGetItsStackedIndexInCoords(player.whoAmI, tileCoordinates, out this.sleepingIndex); + } + } + } + + public void StopSleeping(Player player, bool multiplayerBroadcast = true) + { + if (!this.isSleeping) + return; + this.SetIsSleepingAndAdjustPlayerRotation(player, false); + this.timeSleeping = 0; + this.sleepingIndex = -1; + this.visualOffsetOfBedBase = new Vector2(); + if (!multiplayerBroadcast || Main.myPlayer != player.whoAmI) + return; + NetMessage.SendData(13, number: player.whoAmI); + } + + public void StartSleeping(Player player, int x, int y) + { + int targetDirection; + Vector2 anchorPosition; + Vector2 visualoffset; + PlayerSleepingHelper.GetSleepingTargetInfo(x, y, out targetDirection, out anchorPosition, out visualoffset); + Vector2 offset = anchorPosition - player.Bottom; + bool position = player.CanSnapToPosition(offset); + if (position) + position &= Main.sleepingManager.GetNextPlayerStackIndexInCoords((anchorPosition + new Vector2(0.0f, -2f)).ToTileCoordinates()) < 2; + if (!position) + return; + if (this.isSleeping && player.Bottom == anchorPosition) + { + this.StopSleeping(player); + } + else + { + player.StopVanityActions(); + player.RemoveAllGrapplingHooks(); + player.RemoveAllFishingBobbers(); + if (player.mount.Active) + player.mount.Dismount(player); + player.Bottom = anchorPosition; + player.ChangeDir(targetDirection); + Main.sleepingManager.AddPlayerAndGetItsStackedIndexInCoords(player.whoAmI, new Point(x, y), out this.sleepingIndex); + player.velocity = Vector2.Zero; + player.gravDir = 1f; + this.SetIsSleepingAndAdjustPlayerRotation(player, true); + this.visualOffsetOfBedBase = visualoffset; + if (Main.myPlayer != player.whoAmI) + return; + NetMessage.SendData(13, number: player.whoAmI); + } + } + + public static bool GetSleepingTargetInfo( + int x, + int y, + out int targetDirection, + out Vector2 anchorPosition, + out Vector2 visualoffset) + { + Tile tileSafely = Framing.GetTileSafely(x, y); + if (!TileID.Sets.CanBeSleptIn[(int) tileSafely.type] || !tileSafely.active()) + { + targetDirection = 1; + anchorPosition = new Vector2(); + visualoffset = new Vector2(); + return false; + } + int num1 = x; + int num2 = y; + int num3 = (int) tileSafely.frameX % 72 / 18; + int num4 = num1 - num3; + if ((int) tileSafely.frameY % 36 != 0) + --num2; + targetDirection = 1; + int num5 = (int) tileSafely.frameX / 72; + int x1 = num4; + switch (num5) + { + case 0: + targetDirection = -1; + ++x1; + break; + case 1: + x1 += 2; + break; + } + anchorPosition = new Point(x1, num2 + 1).ToWorldCoordinates(autoAddY: 16f); + visualoffset = PlayerSleepingHelper.SetOffsetbyBed((int) tileSafely.frameY / 36); + return true; + } + + private static Vector2 SetOffsetbyBed(int bedStyle) + { + switch (bedStyle) + { + case 8: + return new Vector2(-11f, 1f); + case 10: + return new Vector2(-9f, -1f); + case 11: + return new Vector2(-11f, 1f); + case 13: + return new Vector2(-11f, -3f); + case 15: + case 16: + case 17: + return new Vector2(-7f, -3f); + case 18: + return new Vector2(-9f, -3f); + case 19: + return new Vector2(-3f, -1f); + case 20: + return new Vector2(-9f, -5f); + case 21: + return new Vector2(-9f, 5f); + case 22: + return new Vector2(-7f, 1f); + case 23: + return new Vector2(-5f, -1f); + case 24: + case 25: + return new Vector2(-7f, 1f); + case 27: + return new Vector2(-9f, 3f); + case 28: + return new Vector2(-9f, 5f); + case 29: + return new Vector2(-11f, -1f); + case 30: + return new Vector2(-9f, 3f); + case 31: + return new Vector2(-7f, 5f); + case 32: + return new Vector2(-7f, -1f); + case 34: + case 35: + case 36: + case 37: + return new Vector2(-13f, 1f); + case 38: + return new Vector2(-11f, -3f); + default: + return new Vector2(-9f, 1f); + } + } + } +} diff --git a/GameContent/PlayerTitaniumStormBuffTextureContent.cs b/GameContent/PlayerTitaniumStormBuffTextureContent.cs new file mode 100644 index 0000000..3dc0142 --- /dev/null +++ b/GameContent/PlayerTitaniumStormBuffTextureContent.cs @@ -0,0 +1,52 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.PlayerTitaniumStormBuffTextureContent +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.DataStructures; +using Terraria.Graphics.Shaders; + +namespace Terraria.GameContent +{ + public class PlayerTitaniumStormBuffTextureContent : ARenderTargetContentByRequest + { + private MiscShaderData _shaderData; + + public PlayerTitaniumStormBuffTextureContent() + { + this._shaderData = new MiscShaderData(Main.PixelShaderRef, "TitaniumStorm"); + this._shaderData.UseImage1("Images/Extra_" + (object) (short) 156); + } + + protected override void HandleUseReqest(GraphicsDevice device, SpriteBatch spriteBatch) + { + Main.instance.LoadProjectile(908); + Asset asset = TextureAssets.Projectile[908]; + this.UpdateSettingsForRendering(0.6f, 0.0f, Main.GlobalTimeWrappedHourly, 0.3f); + this.PrepareARenderTarget_AndListenToEvents(ref this._target, device, asset.Width(), asset.Height(), RenderTargetUsage.PreserveContents); + device.SetRenderTarget(this._target); + device.Clear(Color.Transparent); + DrawData drawData = new DrawData(asset.Value, Vector2.Zero, Color.White); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend); + this._shaderData.Apply(new DrawData?(drawData)); + drawData.Draw(spriteBatch); + spriteBatch.End(); + device.SetRenderTarget((RenderTarget2D) null); + this._wasPrepared = true; + } + + public void UpdateSettingsForRendering( + float gradientContributionFromOriginalTexture, + float gradientScrollingSpeed, + float flatGradientOffset, + float gradientColorDominance) + { + this._shaderData.UseColor(gradientScrollingSpeed, gradientContributionFromOriginalTexture, gradientColorDominance); + this._shaderData.UseOpacity(flatGradientOffset); + } + } +} diff --git a/GameContent/PortalHelper.cs b/GameContent/PortalHelper.cs new file mode 100644 index 0000000..0047292 --- /dev/null +++ b/GameContent/PortalHelper.cs @@ -0,0 +1,500 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.PortalHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.ID; + +namespace Terraria.GameContent +{ + public class PortalHelper + { + public const int PORTALS_PER_PERSON = 2; + private static int[,] FoundPortals = new int[256, 2]; + private static int[] PortalCooldownForPlayers = new int[256]; + private static int[] PortalCooldownForNPCs = new int[200]; + private static readonly Vector2[] EDGES = new Vector2[4] + { + new Vector2(0.0f, 1f), + new Vector2(0.0f, -1f), + new Vector2(1f, 0.0f), + new Vector2(-1f, 0.0f) + }; + private static readonly Vector2[] SLOPE_EDGES = new Vector2[4] + { + new Vector2(1f, -1f), + new Vector2(-1f, -1f), + new Vector2(1f, 1f), + new Vector2(-1f, 1f) + }; + private static readonly Point[] SLOPE_OFFSETS = new Point[4] + { + new Point(1, -1), + new Point(-1, -1), + new Point(1, 1), + new Point(-1, 1) + }; + private static bool anyPortalAtAll = false; + + static PortalHelper() + { + for (int index = 0; index < PortalHelper.SLOPE_EDGES.Length; ++index) + PortalHelper.SLOPE_EDGES[index].Normalize(); + for (int index = 0; index < PortalHelper.FoundPortals.GetLength(0); ++index) + { + PortalHelper.FoundPortals[index, 0] = -1; + PortalHelper.FoundPortals[index, 1] = -1; + } + } + + public static void UpdatePortalPoints() + { + PortalHelper.anyPortalAtAll = false; + for (int index = 0; index < PortalHelper.FoundPortals.GetLength(0); ++index) + { + PortalHelper.FoundPortals[index, 0] = -1; + PortalHelper.FoundPortals[index, 1] = -1; + } + for (int index = 0; index < PortalHelper.PortalCooldownForPlayers.Length; ++index) + { + if (PortalHelper.PortalCooldownForPlayers[index] > 0) + --PortalHelper.PortalCooldownForPlayers[index]; + } + for (int index = 0; index < PortalHelper.PortalCooldownForNPCs.Length; ++index) + { + if (PortalHelper.PortalCooldownForNPCs[index] > 0) + --PortalHelper.PortalCooldownForNPCs[index]; + } + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && projectile.type == 602 && (double) projectile.ai[1] >= 0.0 && (double) projectile.ai[1] <= 1.0 && projectile.owner >= 0 && projectile.owner <= (int) byte.MaxValue) + { + PortalHelper.FoundPortals[projectile.owner, (int) projectile.ai[1]] = index; + if (PortalHelper.FoundPortals[projectile.owner, 0] != -1 && PortalHelper.FoundPortals[projectile.owner, 1] != -1) + PortalHelper.anyPortalAtAll = true; + } + } + } + + public static void TryGoingThroughPortals(Entity ent) + { + if (!PortalHelper.anyPortalAtAll) + return; + float collisionPoint = 0.0f; + Vector2 velocity = ent.velocity; + int width = ent.width; + int height = ent.height; + int gravDir = 1; + if (ent is Player) + gravDir = (int) ((Player) ent).gravDir; + for (int index1 = 0; index1 < PortalHelper.FoundPortals.GetLength(0); ++index1) + { + if (PortalHelper.FoundPortals[index1, 0] != -1 && PortalHelper.FoundPortals[index1, 1] != -1 && (!(ent is Player) || index1 < PortalHelper.PortalCooldownForPlayers.Length && PortalHelper.PortalCooldownForPlayers[index1] <= 0) && (!(ent is NPC) || index1 < PortalHelper.PortalCooldownForNPCs.Length && PortalHelper.PortalCooldownForNPCs[index1] <= 0)) + { + for (int index2 = 0; index2 < 2; ++index2) + { + Projectile projectile1 = Main.projectile[PortalHelper.FoundPortals[index1, index2]]; + Vector2 start; + Vector2 end; + PortalHelper.GetPortalEdges(projectile1.Center, projectile1.ai[0], out start, out end); + if (Collision.CheckAABBvLineCollision(ent.position + ent.velocity, ent.Size, start, end, 2f, ref collisionPoint)) + { + Projectile projectile2 = Main.projectile[PortalHelper.FoundPortals[index1, 1 - index2]]; + float num1 = ent.Hitbox.Distance(projectile1.Center); + int bonusX; + int bonusY; + Vector2 newPos = PortalHelper.GetPortalOutingPoint(ent.Size, projectile2.Center, projectile2.ai[0], out bonusX, out bonusY) + Vector2.Normalize(new Vector2((float) bonusX, (float) bonusY)) * num1; + Vector2 Velocity1 = Vector2.UnitX * 16f; + if (!(Collision.TileCollision(newPos - Velocity1, Velocity1, width, height, true, true, gravDir) != Velocity1)) + { + Vector2 Velocity2 = -Vector2.UnitX * 16f; + if (!(Collision.TileCollision(newPos - Velocity2, Velocity2, width, height, true, true, gravDir) != Velocity2)) + { + Vector2 Velocity3 = Vector2.UnitY * 16f; + if (!(Collision.TileCollision(newPos - Velocity3, Velocity3, width, height, true, true, gravDir) != Velocity3)) + { + Vector2 Velocity4 = -Vector2.UnitY * 16f; + if (!(Collision.TileCollision(newPos - Velocity4, Velocity4, width, height, true, true, gravDir) != Velocity4)) + { + float num2 = 0.1f; + if (bonusY == -gravDir) + num2 = 0.1f; + if (ent.velocity == Vector2.Zero) + ent.velocity = (projectile1.ai[0] - 1.570796f).ToRotationVector2() * num2; + if ((double) ent.velocity.Length() < (double) num2) + { + ent.velocity.Normalize(); + ent.velocity *= num2; + } + Vector2 vec = Vector2.Normalize(new Vector2((float) bonusX, (float) bonusY)); + if (vec.HasNaNs() || vec == Vector2.Zero) + vec = Vector2.UnitX * (float) ent.direction; + ent.velocity = vec * ent.velocity.Length(); + if (bonusY == -gravDir && Math.Sign(ent.velocity.Y) != -gravDir || (double) Math.Abs(ent.velocity.Y) < 0.100000001490116) + ent.velocity.Y = (float) -gravDir * 0.1f; + int extraInfo = (int) ((double) (projectile2.owner * 2) + (double) projectile2.ai[1]); + int num3 = extraInfo + (extraInfo % 2 == 0 ? 1 : -1); + switch (ent) + { + case Player _: + Player player = (Player) ent; + player.lastPortalColorIndex = num3; + player.Teleport(newPos, 4, extraInfo); + if (Main.netMode == 1) + { + NetMessage.SendData(96, number: player.whoAmI, number2: newPos.X, number3: newPos.Y, number4: ((float) extraInfo)); + NetMessage.SendData(13, number: player.whoAmI); + } + PortalHelper.PortalCooldownForPlayers[index1] = 10; + return; + case NPC _: + NPC npc = (NPC) ent; + npc.lastPortalColorIndex = num3; + npc.Teleport(newPos, 4, extraInfo); + if (Main.netMode == 2) + { + NetMessage.SendData(100, number: npc.whoAmI, number2: newPos.X, number3: newPos.Y, number4: ((float) extraInfo)); + NetMessage.SendData(23, number: npc.whoAmI); + } + PortalHelper.PortalCooldownForPlayers[index1] = 10; + if (bonusY != -1 || (double) ent.velocity.Y <= -3.0) + return; + ent.velocity.Y = -3f; + return; + default: + return; + } + } + } + } + } + } + } + } + } + } + + public static int TryPlacingPortal( + Projectile theBolt, + Vector2 velocity, + Vector2 theCrashVelocity) + { + Vector2 vector2_1 = velocity / velocity.Length(); + Point tileCoordinates = PortalHelper.FindCollision(theBolt.position, theBolt.position + velocity + vector2_1 * 32f).ToTileCoordinates(); + Tile tile = Main.tile[tileCoordinates.X, tileCoordinates.Y]; + Vector2 vector2_2 = new Vector2((float) (tileCoordinates.X * 16 + 8), (float) (tileCoordinates.Y * 16 + 8)); + if (!WorldGen.SolidOrSlopedTile(tile)) + return -1; + int num = (int) tile.slope(); + bool flag = tile.halfBrick(); + for (int index = 0; index < (flag ? 2 : PortalHelper.EDGES.Length); ++index) + { + Point bestPosition; + if ((double) Vector2.Dot(PortalHelper.EDGES[index], vector2_1) > 0.0 && PortalHelper.FindValidLine(tileCoordinates, (int) PortalHelper.EDGES[index].Y, (int) -(double) PortalHelper.EDGES[index].X, out bestPosition)) + return PortalHelper.AddPortal(new Vector2((float) (bestPosition.X * 16 + 8), (float) (bestPosition.Y * 16 + 8)) - PortalHelper.EDGES[index] * (flag ? 0.0f : 8f), (float) Math.Atan2((double) PortalHelper.EDGES[index].Y, (double) PortalHelper.EDGES[index].X) + 1.570796f, (int) theBolt.ai[0], theBolt.direction); + } + if (num != 0) + { + Vector2 vector2_3 = PortalHelper.SLOPE_EDGES[num - 1]; + Point bestPosition; + if ((double) Vector2.Dot(vector2_3, -vector2_1) > 0.0 && PortalHelper.FindValidLine(tileCoordinates, -PortalHelper.SLOPE_OFFSETS[num - 1].Y, PortalHelper.SLOPE_OFFSETS[num - 1].X, out bestPosition)) + return PortalHelper.AddPortal(new Vector2((float) (bestPosition.X * 16 + 8), (float) (bestPosition.Y * 16 + 8)), (float) Math.Atan2((double) vector2_3.Y, (double) vector2_3.X) - 1.570796f, (int) theBolt.ai[0], theBolt.direction); + } + return -1; + } + + private static bool FindValidLine( + Point position, + int xOffset, + int yOffset, + out Point bestPosition) + { + bestPosition = position; + if (PortalHelper.IsValidLine(position, xOffset, yOffset)) + return true; + Point position1 = new Point(position.X - xOffset, position.Y - yOffset); + if (PortalHelper.IsValidLine(position1, xOffset, yOffset)) + { + bestPosition = position1; + return true; + } + Point position2 = new Point(position.X + xOffset, position.Y + yOffset); + if (!PortalHelper.IsValidLine(position2, xOffset, yOffset)) + return false; + bestPosition = position2; + return true; + } + + private static bool IsValidLine(Point position, int xOffset, int yOffset) + { + Tile tile = Main.tile[position.X, position.Y]; + Tile t1 = Main.tile[position.X - xOffset, position.Y - yOffset]; + Tile t2 = Main.tile[position.X + xOffset, position.Y + yOffset]; + return !PortalHelper.BlockPortals(Main.tile[position.X + yOffset, position.Y - xOffset]) && !PortalHelper.BlockPortals(Main.tile[position.X + yOffset - xOffset, position.Y - xOffset - yOffset]) && !PortalHelper.BlockPortals(Main.tile[position.X + yOffset + xOffset, position.Y - xOffset + yOffset]) && PortalHelper.CanPlacePortalOn(tile) && PortalHelper.CanPlacePortalOn(t1) && PortalHelper.CanPlacePortalOn(t2) && t1.HasSameSlope(tile) && t2.HasSameSlope(tile); + } + + private static bool CanPlacePortalOn(Tile t) => PortalHelper.DoesTileTypeSupportPortals(t.type) && WorldGen.SolidOrSlopedTile(t); + + private static bool DoesTileTypeSupportPortals(ushort tileType) => tileType != (ushort) 496; + + private static bool BlockPortals(Tile t) => t.active() && !Main.tileCut[(int) t.type] && !TileID.Sets.BreakableWhenPlacing[(int) t.type] && Main.tileSolid[(int) t.type]; + + private static Vector2 FindCollision(Vector2 startPosition, Vector2 stopPosition) + { + int lastX = 0; + int lastY = 0; + Utils.PlotLine(startPosition.ToTileCoordinates(), stopPosition.ToTileCoordinates(), (Utils.TileActionAttempt) ((x, y) => + { + lastX = x; + lastY = y; + return !WorldGen.SolidOrSlopedTile(x, y); + }), false); + return new Vector2((float) lastX * 16f, (float) lastY * 16f); + } + + private static int AddPortal(Vector2 position, float angle, int form, int direction) + { + if (!PortalHelper.SupportedTilesAreFine(position, angle)) + return -1; + PortalHelper.RemoveMyOldPortal(form); + PortalHelper.RemoveIntersectingPortals(position, angle); + int index = Projectile.NewProjectile(position.X, position.Y, 0.0f, 0.0f, 602, 0, 0.0f, Main.myPlayer, angle, (float) form); + Main.projectile[index].direction = direction; + Main.projectile[index].netUpdate = true; + return index; + } + + private static void RemoveMyOldPortal(int form) + { + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && projectile.type == 602 && projectile.owner == Main.myPlayer && (double) projectile.ai[1] == (double) form) + { + projectile.Kill(); + break; + } + } + } + + private static void RemoveIntersectingPortals(Vector2 position, float angle) + { + Vector2 start1; + Vector2 end1; + PortalHelper.GetPortalEdges(position, angle, out start1, out end1); + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && projectile.type == 602) + { + Vector2 start2; + Vector2 end2; + PortalHelper.GetPortalEdges(projectile.Center, projectile.ai[0], out start2, out end2); + if (Collision.CheckLinevLine(start1, end1, start2, end2).Length != 0) + { + if (projectile.owner != Main.myPlayer && Main.netMode != 2) + NetMessage.SendData(95, number: projectile.owner, number2: ((float) (int) projectile.ai[1])); + projectile.Kill(); + } + } + } + } + + public static Color GetPortalColor(int colorIndex) => PortalHelper.GetPortalColor(colorIndex / 2, colorIndex % 2); + + public static Color GetPortalColor(int player, int portal) + { + Color white = Color.White; + Color color; + if (Main.netMode == 0) + { + color = portal != 0 ? Main.hslToRgb(0.52f, 1f, 0.6f) : Main.hslToRgb(0.12f, 1f, 0.5f); + } + else + { + float num = 0.08f; + color = Main.hslToRgb((float) ((0.5 + (double) player * ((double) num * 2.0) + (double) portal * (double) num) % 1.0), 1f, 0.5f); + } + color.A = (byte) 66; + return color; + } + + private static void GetPortalEdges( + Vector2 position, + float angle, + out Vector2 start, + out Vector2 end) + { + Vector2 rotationVector2 = angle.ToRotationVector2(); + start = position + rotationVector2 * -22f; + end = position + rotationVector2 * 22f; + } + + private static Vector2 GetPortalOutingPoint( + Vector2 objectSize, + Vector2 portalPosition, + float portalAngle, + out int bonusX, + out int bonusY) + { + int num = (int) Math.Round((double) MathHelper.WrapAngle(portalAngle) / 0.785398185253143); + switch (num) + { + case -3: + case 3: + bonusX = num == -3 ? 1 : -1; + bonusY = -1; + return portalPosition + new Vector2(num == -3 ? 0.0f : -objectSize.X, -objectSize.Y); + case -2: + case 2: + bonusX = num == 2 ? -1 : 1; + bonusY = 0; + return portalPosition + new Vector2(num == 2 ? -objectSize.X : 0.0f, (float) (-(double) objectSize.Y / 2.0)); + case -1: + case 1: + bonusX = num == -1 ? 1 : -1; + bonusY = 1; + return portalPosition + new Vector2(num == -1 ? 0.0f : -objectSize.X, 0.0f); + case 0: + case 4: + bonusX = 0; + bonusY = num == 0 ? 1 : -1; + return portalPosition + new Vector2((float) (-(double) objectSize.X / 2.0), num == 0 ? 0.0f : -objectSize.Y); + default: + bonusX = 0; + bonusY = 0; + return portalPosition; + } + } + + public static void SyncPortalsOnPlayerJoin( + int plr, + int fluff, + List dontInclude, + out List portals, + out List portalCenters) + { + portals = new List(); + portalCenters = new List(); + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && (projectile.type == 602 || projectile.type == 601)) + { + Vector2 center = projectile.Center; + int sectionX = Netplay.GetSectionX((int) ((double) center.X / 16.0)); + int sectionY = Netplay.GetSectionY((int) ((double) center.Y / 16.0)); + for (int x = sectionX - fluff; x < sectionX + fluff + 1; ++x) + { + for (int y = sectionY - fluff; y < sectionY + fluff + 1; ++y) + { + if (x >= 0 && x < Main.maxSectionsX && y >= 0 && y < Main.maxSectionsY && !Netplay.Clients[plr].TileSections[x, y] && !dontInclude.Contains(new Point(x, y))) + { + portals.Add(new Point(x, y)); + if (!portalCenters.Contains(new Point(sectionX, sectionY))) + portalCenters.Add(new Point(sectionX, sectionY)); + } + } + } + } + } + } + + public static void SyncPortalSections(Vector2 portalPosition, int fluff) + { + for (int playerIndex = 0; playerIndex < (int) byte.MaxValue; ++playerIndex) + { + if (Main.player[playerIndex].active) + RemoteClient.CheckSection(playerIndex, portalPosition, fluff); + } + } + + public static bool SupportedTilesAreFine(Vector2 portalCenter, float portalAngle) + { + Point tileCoordinates = portalCenter.ToTileCoordinates(); + int num1 = (int) Math.Round((double) MathHelper.WrapAngle(portalAngle) / 0.785398185253143); + int num2; + int num3; + switch (num1) + { + case -3: + case 3: + num2 = num1 == -3 ? 1 : -1; + num3 = -1; + break; + case -2: + case 2: + num2 = num1 == 2 ? -1 : 1; + num3 = 0; + break; + case -1: + case 1: + num2 = num1 == -1 ? 1 : -1; + num3 = 1; + break; + case 0: + case 4: + num2 = 0; + num3 = num1 == 0 ? 1 : -1; + break; + default: + Main.NewText("Broken portal! (over4s = " + (object) num1 + " , " + (object) portalAngle + ")"); + return false; + } + if (num2 != 0 && num3 != 0) + { + int num4 = 3; + if (num2 == -1 && num3 == 1) + num4 = 5; + if (num2 == 1 && num3 == -1) + num4 = 2; + if (num2 == 1 && num3 == 1) + num4 = 4; + int slope = num4 - 1; + return PortalHelper.SupportedSlope(tileCoordinates.X, tileCoordinates.Y, slope) && PortalHelper.SupportedSlope(tileCoordinates.X + num2, tileCoordinates.Y - num3, slope) && PortalHelper.SupportedSlope(tileCoordinates.X - num2, tileCoordinates.Y + num3, slope); + } + switch (num2) + { + case 0: + switch (num3) + { + case 0: + return true; + case 1: + --tileCoordinates.Y; + break; + } + if (PortalHelper.SupportedNormal(tileCoordinates.X, tileCoordinates.Y) && PortalHelper.SupportedNormal(tileCoordinates.X + 1, tileCoordinates.Y) && PortalHelper.SupportedNormal(tileCoordinates.X - 1, tileCoordinates.Y)) + return true; + return PortalHelper.SupportedHalfbrick(tileCoordinates.X, tileCoordinates.Y) && PortalHelper.SupportedHalfbrick(tileCoordinates.X + 1, tileCoordinates.Y) && PortalHelper.SupportedHalfbrick(tileCoordinates.X - 1, tileCoordinates.Y); + case 1: + --tileCoordinates.X; + break; + } + return PortalHelper.SupportedNormal(tileCoordinates.X, tileCoordinates.Y) && PortalHelper.SupportedNormal(tileCoordinates.X, tileCoordinates.Y - 1) && PortalHelper.SupportedNormal(tileCoordinates.X, tileCoordinates.Y + 1); + } + + private static bool SupportedSlope(int x, int y, int slope) + { + Tile tile = Main.tile[x, y]; + return tile != null && tile.nactive() && !Main.tileCut[(int) tile.type] && !TileID.Sets.BreakableWhenPlacing[(int) tile.type] && Main.tileSolid[(int) tile.type] && (int) tile.slope() == slope && PortalHelper.DoesTileTypeSupportPortals(tile.type); + } + + private static bool SupportedHalfbrick(int x, int y) + { + Tile tile = Main.tile[x, y]; + return tile != null && tile.nactive() && !Main.tileCut[(int) tile.type] && !TileID.Sets.BreakableWhenPlacing[(int) tile.type] && Main.tileSolid[(int) tile.type] && tile.halfBrick() && PortalHelper.DoesTileTypeSupportPortals(tile.type); + } + + private static bool SupportedNormal(int x, int y) + { + Tile tile = Main.tile[x, y]; + return tile != null && tile.nactive() && !Main.tileCut[(int) tile.type] && !TileID.Sets.BreakableWhenPlacing[(int) tile.type] && Main.tileSolid[(int) tile.type] && !TileID.Sets.NotReallySolid[(int) tile.type] && !tile.halfBrick() && tile.slope() == (byte) 0 && PortalHelper.DoesTileTypeSupportPortals(tile.type); + } + } +} diff --git a/GameContent/PotionOfReturnGateHelper.cs b/GameContent/PotionOfReturnGateHelper.cs new file mode 100644 index 0000000..fbfce00 --- /dev/null +++ b/GameContent/PotionOfReturnGateHelper.cs @@ -0,0 +1,146 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.PotionOfReturnGateHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System.Collections.Generic; +using Terraria.DataStructures; +using Terraria.ID; + +namespace Terraria.GameContent +{ + public struct PotionOfReturnGateHelper + { + private readonly Vector2 _position; + private readonly float _opacity; + private readonly int _frameNumber; + private readonly PotionOfReturnGateHelper.GateType _gateType; + + public PotionOfReturnGateHelper( + PotionOfReturnGateHelper.GateType gateType, + Vector2 worldPosition, + float opacity) + { + this._gateType = gateType; + worldPosition.Y -= 2f; + this._position = worldPosition; + this._opacity = opacity; + int num = (int) (((double) Main.tileFrameCounter[491] + (double) this._position.X + (double) this._position.Y) % 40.0) / 5; + if (gateType == PotionOfReturnGateHelper.GateType.ExitPoint) + num = 7 - num; + this._frameNumber = num; + } + + public void Update() + { + Lighting.AddLight(this._position, 0.4f, 0.2f, 0.9f); + this.SpawnReturnPortalDust(); + } + + public void SpawnReturnPortalDust() + { + if (this._gateType == PotionOfReturnGateHelper.GateType.EntryPoint) + { + if (Main.rand.Next(3) != 0) + return; + if (Main.rand.Next(2) == 0) + { + Vector2 vector2 = Vector2.UnitY.RotatedByRandom(6.28318548202515) * new Vector2(0.5f, 1f); + Dust dust = Dust.NewDustDirect(this._position - vector2 * 30f, 0, 0, Utils.SelectRandom(Main.rand, 86, 88)); + dust.noGravity = true; + dust.noLightEmittence = true; + dust.position = this._position - vector2.SafeNormalize(Vector2.Zero) * (float) Main.rand.Next(10, 21); + dust.velocity = vector2.RotatedBy(1.57079637050629) * 2f; + dust.scale = 0.5f + Main.rand.NextFloat(); + dust.fadeIn = 0.5f; + dust.customData = (object) this; + dust.position += dust.velocity * 10f; + dust.velocity *= -1f; + } + else + { + Vector2 vector2 = Vector2.UnitY.RotatedByRandom(6.28318548202515) * new Vector2(0.5f, 1f); + Dust dust = Dust.NewDustDirect(this._position - vector2 * 30f, 0, 0, 240); + dust.noGravity = true; + dust.noLight = true; + dust.position = this._position - vector2.SafeNormalize(Vector2.Zero) * (float) Main.rand.Next(5, 10); + dust.velocity = vector2.RotatedBy(-1.57079637050629) * 3f; + dust.scale = 0.5f + Main.rand.NextFloat(); + dust.fadeIn = 0.5f; + dust.customData = (object) this; + dust.position += dust.velocity * 10f; + dust.velocity *= -1f; + } + } + else + { + if (Main.rand.Next(3) != 0) + return; + if (Main.rand.Next(2) == 0) + { + Vector2 spinningpoint = Vector2.UnitY.RotatedByRandom(6.28318548202515) * new Vector2(0.5f, 1f); + Dust dust = Dust.NewDustDirect(this._position - spinningpoint * 30f, 0, 0, Utils.SelectRandom(Main.rand, 86, 88)); + dust.noGravity = true; + dust.noLightEmittence = true; + dust.position = this._position; + dust.velocity = spinningpoint.RotatedBy(-0.785398185253143) * 2f; + dust.scale = 0.5f + Main.rand.NextFloat(); + dust.fadeIn = 0.5f; + dust.customData = (object) this; + dust.position += spinningpoint * new Vector2(20f); + } + else + { + Vector2 spinningpoint = Vector2.UnitY.RotatedByRandom(6.28318548202515) * new Vector2(0.5f, 1f); + Dust dust = Dust.NewDustDirect(this._position - spinningpoint * 30f, 0, 0, Utils.SelectRandom(Main.rand, 86, 88)); + dust.noGravity = true; + dust.noLightEmittence = true; + dust.position = this._position; + dust.velocity = spinningpoint.RotatedBy(-0.785398185253143) * 2f; + dust.scale = 0.5f + Main.rand.NextFloat(); + dust.fadeIn = 0.5f; + dust.customData = (object) this; + dust.position += spinningpoint * new Vector2(20f); + } + } + } + + public void DrawToDrawData(List drawDataList, int selectionMode) + { + short num1 = this._gateType == PotionOfReturnGateHelper.GateType.EntryPoint ? (short) 183 : (short) 184; + Asset tex = TextureAssets.Extra[(int) num1]; + Rectangle r = tex.Frame(verticalFrames: 8, frameY: this._frameNumber); + Color color = Color.Lerp(Lighting.GetColor(this._position.ToTileCoordinates()), Color.White, 0.5f) * this._opacity; + DrawData drawData1 = new DrawData(tex.Value, this._position - Main.screenPosition, new Rectangle?(r), color, 0.0f, r.Size() / 2f, 1f, SpriteEffects.None, 0); + drawDataList.Add(drawData1); + for (float num2 = 0.0f; (double) num2 < 1.0; num2 += 0.34f) + { + DrawData drawData2 = drawData1; + drawData2.color = new Color((int) sbyte.MaxValue, 50, (int) sbyte.MaxValue, 0) * this._opacity; + drawData2.scale *= 1.1f; + float x = ((float) ((double) Main.GlobalTimeWrappedHourly / 5.0 * 6.28318548202515)).ToRotationVector2().X; + drawData2.color *= (float) ((double) x * 0.100000001490116 + 0.300000011920929); + drawData2.position += ((float) (((double) Main.GlobalTimeWrappedHourly / 5.0 + (double) num2) * 6.28318548202515)).ToRotationVector2() * (float) ((double) x * 1.0 + 2.0); + drawDataList.Add(drawData2); + } + if (selectionMode == 0) + return; + int averageTileLighting = ((int) color.R + (int) color.G + (int) color.B) / 3; + if (averageTileLighting <= 10) + return; + Color selectionGlowColor = Colors.GetSelectionGlowColor(selectionMode == 2, averageTileLighting); + drawData1 = new DrawData(TextureAssets.Extra[93].Value, this._position - Main.screenPosition, new Rectangle?(r), selectionGlowColor, 0.0f, r.Size() / 2f, 1f, SpriteEffects.None, 0); + drawDataList.Add(drawData1); + } + + public enum GateType + { + EntryPoint, + ExitPoint, + } + } +} diff --git a/GameContent/PressurePlateHelper.cs b/GameContent/PressurePlateHelper.cs new file mode 100644 index 0000000..dad2c58 --- /dev/null +++ b/GameContent/PressurePlateHelper.cs @@ -0,0 +1,143 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.PressurePlateHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using System.Linq; + +namespace Terraria.GameContent +{ + public class PressurePlateHelper + { + public static Dictionary PressurePlatesPressed = new Dictionary(); + public static bool NeedsFirstUpdate; + private static Vector2[] PlayerLastPosition = new Vector2[(int) byte.MaxValue]; + private static Rectangle pressurePlateBounds = new Rectangle(0, 0, 16, 10); + + public static void Update() + { + if (!PressurePlateHelper.NeedsFirstUpdate) + return; + foreach (Point key in PressurePlateHelper.PressurePlatesPressed.Keys) + PressurePlateHelper.PokeLocation(key); + PressurePlateHelper.PressurePlatesPressed.Clear(); + PressurePlateHelper.NeedsFirstUpdate = false; + } + + public static void Reset() + { + PressurePlateHelper.PressurePlatesPressed.Clear(); + for (int index = 0; index < PressurePlateHelper.PlayerLastPosition.Length; ++index) + PressurePlateHelper.PlayerLastPosition[index] = Vector2.Zero; + } + + public static void ResetPlayer(int player) + { + foreach (Point location in PressurePlateHelper.PressurePlatesPressed.Keys.ToArray()) + PressurePlateHelper.MoveAwayFrom(location, player); + } + + public static void UpdatePlayerPosition(Player player) + { + Point p = new Point(1, 1); + Vector2 vector2 = p.ToVector2(); + List tilesIn1 = Collision.GetTilesIn(PressurePlateHelper.PlayerLastPosition[player.whoAmI] + vector2, PressurePlateHelper.PlayerLastPosition[player.whoAmI] + player.Size - vector2 * 2f); + List tilesIn2 = Collision.GetTilesIn(player.TopLeft + vector2, player.BottomRight - vector2 * 2f); + Rectangle hitbox1 = player.Hitbox; + Rectangle hitbox2 = player.Hitbox; + hitbox1.Inflate(-p.X, -p.Y); + hitbox2.Inflate(-p.X, -p.Y); + hitbox2.X = (int) PressurePlateHelper.PlayerLastPosition[player.whoAmI].X; + hitbox2.Y = (int) PressurePlateHelper.PlayerLastPosition[player.whoAmI].Y; + for (int index = 0; index < tilesIn1.Count; ++index) + { + Point location = tilesIn1[index]; + Tile tile = Main.tile[location.X, location.Y]; + if (tile.active() && tile.type == (ushort) 428) + { + PressurePlateHelper.pressurePlateBounds.X = location.X * 16; + PressurePlateHelper.pressurePlateBounds.Y = location.Y * 16 + 16 - PressurePlateHelper.pressurePlateBounds.Height; + if (!hitbox1.Intersects(PressurePlateHelper.pressurePlateBounds) && !tilesIn2.Contains(location)) + PressurePlateHelper.MoveAwayFrom(location, player.whoAmI); + } + } + for (int index = 0; index < tilesIn2.Count; ++index) + { + Point location = tilesIn2[index]; + Tile tile = Main.tile[location.X, location.Y]; + if (tile.active() && tile.type == (ushort) 428) + { + PressurePlateHelper.pressurePlateBounds.X = location.X * 16; + PressurePlateHelper.pressurePlateBounds.Y = location.Y * 16 + 16 - PressurePlateHelper.pressurePlateBounds.Height; + if (hitbox1.Intersects(PressurePlateHelper.pressurePlateBounds) && (!tilesIn1.Contains(location) || !hitbox2.Intersects(PressurePlateHelper.pressurePlateBounds))) + PressurePlateHelper.MoveInto(location, player.whoAmI); + } + } + PressurePlateHelper.PlayerLastPosition[player.whoAmI] = player.position; + } + + public static void DestroyPlate(Point location) + { + if (!PressurePlateHelper.PressurePlatesPressed.TryGetValue(location, out bool[] _)) + return; + PressurePlateHelper.PressurePlatesPressed.Remove(location); + PressurePlateHelper.PokeLocation(location); + } + + private static void UpdatePlatePosition(Point location, int player, bool onIt) + { + if (onIt) + PressurePlateHelper.MoveInto(location, player); + else + PressurePlateHelper.MoveAwayFrom(location, player); + } + + private static void MoveInto(Point location, int player) + { + bool[] flagArray; + if (PressurePlateHelper.PressurePlatesPressed.TryGetValue(location, out flagArray)) + { + flagArray[player] = true; + } + else + { + PressurePlateHelper.PressurePlatesPressed[location] = new bool[(int) byte.MaxValue]; + PressurePlateHelper.PressurePlatesPressed[location][player] = true; + PressurePlateHelper.PokeLocation(location); + } + } + + private static void MoveAwayFrom(Point location, int player) + { + bool[] flagArray; + if (!PressurePlateHelper.PressurePlatesPressed.TryGetValue(location, out flagArray)) + return; + flagArray[player] = false; + bool flag = false; + for (int index = 0; index < flagArray.Length; ++index) + { + if (flagArray[index]) + { + flag = true; + break; + } + } + if (flag) + return; + PressurePlateHelper.PressurePlatesPressed.Remove(location); + PressurePlateHelper.PokeLocation(location); + } + + private static void PokeLocation(Point location) + { + if (Main.netMode == 1) + return; + Wiring.blockPlayerTeleportationForOneIteration = true; + Wiring.HitSwitch(location.X, location.Y); + NetMessage.SendData(59, number: location.X, number2: ((float) location.Y)); + } + } +} diff --git a/GameContent/Profiles.cs b/GameContent/Profiles.cs new file mode 100644 index 0000000..c8ae69b --- /dev/null +++ b/GameContent/Profiles.cs @@ -0,0 +1,102 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Profiles +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System.Collections.Generic; +using Terraria.Localization; + +namespace Terraria.GameContent +{ + public class Profiles + { + public class LegacyNPCProfile : ITownNPCProfile + { + private string _rootFilePath; + private int _defaultVariationHeadIndex; + private Asset _defaultNoAlt; + private Asset _defaultParty; + + public LegacyNPCProfile(string npcFileTitleFilePath, int defaultHeadIndex) + { + this._rootFilePath = npcFileTitleFilePath; + this._defaultVariationHeadIndex = defaultHeadIndex; + this._defaultNoAlt = Main.Assets.Request(npcFileTitleFilePath + "_Default", (AssetRequestMode) 0); + this._defaultParty = Main.Assets.Request(npcFileTitleFilePath + "_Default_Party", (AssetRequestMode) 0); + } + + public int RollVariation() => 0; + + public string GetNameForVariant(NPC npc) => NPC.getNewNPCName(npc.type); + + public Asset GetTextureNPCShouldUse(NPC npc) => npc.IsABestiaryIconDummy || npc.altTexture != 1 ? this._defaultNoAlt : this._defaultParty; + + public int GetHeadTextureIndex(NPC npc) => this._defaultVariationHeadIndex; + } + + public class TransformableNPCProfile : ITownNPCProfile + { + private string _rootFilePath; + private int _defaultVariationHeadIndex; + private Asset _defaultNoAlt; + private Asset _defaultTransformed; + + public TransformableNPCProfile(string npcFileTitleFilePath, int defaultHeadIndex) + { + this._rootFilePath = npcFileTitleFilePath; + this._defaultVariationHeadIndex = defaultHeadIndex; + this._defaultNoAlt = Main.Assets.Request(npcFileTitleFilePath + "_Default", (AssetRequestMode) 0); + this._defaultTransformed = Main.Assets.Request(npcFileTitleFilePath + "_Default_Transformed", (AssetRequestMode) 0); + } + + public int RollVariation() => 0; + + public string GetNameForVariant(NPC npc) => NPC.getNewNPCName(npc.type); + + public Asset GetTextureNPCShouldUse(NPC npc) => npc.IsABestiaryIconDummy || npc.altTexture != 2 ? this._defaultNoAlt : this._defaultTransformed; + + public int GetHeadTextureIndex(NPC npc) => this._defaultVariationHeadIndex; + } + + public class VariantNPCProfile : ITownNPCProfile + { + private string _rootFilePath; + private string _npcBaseName; + private int[] _variantHeadIDs; + private string[] _variants; + private Dictionary> _variantTextures = new Dictionary>(); + + public VariantNPCProfile( + string npcFileTitleFilePath, + string npcBaseName, + int[] variantHeadIds, + params string[] variantTextureNames) + { + this._rootFilePath = npcFileTitleFilePath; + this._npcBaseName = npcBaseName; + this._variantHeadIDs = variantHeadIds; + this._variants = variantTextureNames; + foreach (string variant in this._variants) + { + string key = this._rootFilePath + "_" + variant; + this._variantTextures[key] = Main.Assets.Request(key, (AssetRequestMode) 0); + } + } + + public int RollVariation() => Main.rand.Next(this._variants.Length); + + public string GetNameForVariant(NPC npc) => Language.RandomFromCategory(this._npcBaseName + "Names_" + this._variants[npc.townNpcVariationIndex], WorldGen.genRand).Value; + + public Asset GetTextureNPCShouldUse(NPC npc) + { + string key = this._rootFilePath + "_" + this._variants[npc.townNpcVariationIndex]; + return npc.IsABestiaryIconDummy || npc.altTexture != 1 || !this._variantTextures.ContainsKey(key + "_Party") ? this._variantTextures[key] : this._variantTextures[key + "_Party"]; + } + + public int GetHeadTextureIndex(NPC npc) => this._variantHeadIDs[npc.townNpcVariationIndex]; + } + } +} diff --git a/GameContent/RGB/BlizzardShader.cs b/GameContent/RGB/BlizzardShader.cs new file mode 100644 index 0000000..6daaebb --- /dev/null +++ b/GameContent/RGB/BlizzardShader.cs @@ -0,0 +1,34 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.BlizzardShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; + +namespace Terraria.GameContent.RGB +{ + public class BlizzardShader : ChromaShader + { + private readonly Vector4 _backColor = new Vector4(0.1f, 0.1f, 0.3f, 1f); + private readonly Vector4 _frontColor = new Vector4(1f, 1f, 1f, 1f); + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + if (quality == null) + time *= 0.25f; + for (int index = 0; index < fragment.Count; ++index) + { + float staticNoise = NoiseHelper.GetStaticNoise(fragment.GetCanvasPositionOfIndex(index) * new Vector2(0.2f, 0.4f) + new Vector2(time * 0.35f, time * -0.35f)); + Vector4 vector4 = Vector4.Lerp(this._backColor, this._frontColor, staticNoise * staticNoise); + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/BrainShader.cs b/GameContent/RGB/BrainShader.cs new file mode 100644 index 0000000..9d0381a --- /dev/null +++ b/GameContent/RGB/BrainShader.cs @@ -0,0 +1,55 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.BrainShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class BrainShader : ChromaShader + { + private readonly Vector4 _brainColor; + private readonly Vector4 _veinColor; + + public BrainShader(Color brainColor, Color veinColor) + { + this._brainColor = brainColor.ToVector4(); + this._veinColor = veinColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + Vector4 vector4 = Vector4.Lerp(this._brainColor, this._veinColor, Math.Max(0.0f, (float) Math.Sin((double) time * 3.0))); + for (int index = 0; index < fragment.Count; ++index) + fragment.SetColor(index, vector4); + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + Vector2 vector2 = new Vector2(1.6f, 0.5f); + Vector4 vector4_1 = Vector4.Lerp(this._brainColor, this._veinColor, (float) ((double) Math.Max(0.0f, (float) Math.Sin((double) time * 3.0)) * 0.5 + 0.5)); + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 brainColor = this._brainColor; + float amount = Math.Max(0.0f, (float) (1.0 - 5.0 * (Math.Sin((double) NoiseHelper.GetDynamicNoise(canvasPositionOfIndex * 0.15f + new Vector2(time * (1f / 500f)), time * 0.03f) * 10.0) * 0.5 + 0.5))); + Vector4 vector4_2 = Vector4.Lerp(brainColor, vector4_1, amount); + fragment.SetColor(index, vector4_2); + } + } + } +} diff --git a/GameContent/RGB/CavernShader.cs b/GameContent/RGB/CavernShader.cs new file mode 100644 index 0000000..9835703 --- /dev/null +++ b/GameContent/RGB/CavernShader.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.CavernShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class CavernShader : ChromaShader + { + private readonly Vector4 _backColor; + private readonly Vector4 _frontColor; + private readonly float _speed; + + public CavernShader(Color backColor, Color frontColor, float speed) + { + this._backColor = backColor.ToVector4(); + this._frontColor = frontColor.ToVector4(); + this._speed = speed; + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4 = Vector4.Lerp(this._backColor, this._frontColor, (float) (Math.Sin((double) time * (double) this._speed + (double) canvasPositionOfIndex.X) * 0.5 + 0.5)); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + time *= this._speed * 0.5f; + float num1 = time % 1f; + int num2 = (double) time % 2.0 > 1.0 ? 1 : 0; + Vector4 vector4_1 = num2 != 0 ? this._frontColor : this._backColor; + Vector4 vector4_2 = num2 != 0 ? this._backColor : this._frontColor; + float num3 = num1 * 1.2f; + for (int index = 0; index < fragment.Count; ++index) + { + float staticNoise = NoiseHelper.GetStaticNoise(fragment.GetCanvasPositionOfIndex(index) * 0.5f + new Vector2(0.0f, time * 0.5f)); + Vector4 vector4_3 = vector4_1; + float num4 = staticNoise + num3; + if ((double) num4 > 0.999000012874603) + { + float amount = MathHelper.Clamp((float) (((double) num4 - 0.999000012874603) / 0.200000002980232), 0.0f, 1f); + vector4_3 = Vector4.Lerp(vector4_3, vector4_2, amount); + } + fragment.SetColor(index, vector4_3); + } + } + } +} diff --git a/GameContent/RGB/CommonConditions.cs b/GameContent/RGB/CommonConditions.cs new file mode 100644 index 0000000..c0041f3 --- /dev/null +++ b/GameContent/RGB/CommonConditions.cs @@ -0,0 +1,188 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.CommonConditions +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public static class CommonConditions + { + public static readonly ChromaCondition InMenu = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => Main.gameMenu && !Main.drunkWorld)); + public static readonly ChromaCondition DrunkMenu = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => Main.gameMenu && Main.drunkWorld)); + + public abstract class ConditionBase : ChromaCondition + { + protected Player CurrentPlayer => Main.player[Main.myPlayer]; + } + + private class SimpleCondition : CommonConditions.ConditionBase + { + private Func _condition; + + public SimpleCondition(Func condition) => this._condition = condition; + + public virtual bool IsActive() => this._condition(this.CurrentPlayer); + } + + public static class SurfaceBiome + { + public static readonly ChromaCondition Ocean = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneBeach && player.ZoneOverworldHeight)); + public static readonly ChromaCondition Desert = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneDesert && !player.ZoneBeach && player.ZoneOverworldHeight)); + public static readonly ChromaCondition Jungle = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneJungle && player.ZoneOverworldHeight)); + public static readonly ChromaCondition Snow = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneSnow && player.ZoneOverworldHeight)); + public static readonly ChromaCondition Mushroom = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneGlowshroom && player.ZoneOverworldHeight)); + public static readonly ChromaCondition Corruption = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneCorrupt && player.ZoneOverworldHeight)); + public static readonly ChromaCondition Hallow = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneHallow && player.ZoneOverworldHeight)); + public static readonly ChromaCondition Crimson = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneCrimson && player.ZoneOverworldHeight)); + } + + public static class MiscBiome + { + public static readonly ChromaCondition Meteorite = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneMeteor)); + } + + public static class UndergroundBiome + { + public static readonly ChromaCondition Hive = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneHive)); + public static readonly ChromaCondition Jungle = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneJungle && !player.ZoneOverworldHeight)); + public static readonly ChromaCondition Mushroom = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneGlowshroom && !player.ZoneOverworldHeight)); + public static readonly ChromaCondition Ice = (ChromaCondition) new CommonConditions.SimpleCondition(new Func(CommonConditions.UndergroundBiome.InIce)); + public static readonly ChromaCondition HallowIce = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.UndergroundBiome.InIce(player) && player.ZoneHallow)); + public static readonly ChromaCondition CrimsonIce = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.UndergroundBiome.InIce(player) && player.ZoneCrimson)); + public static readonly ChromaCondition CorruptIce = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.UndergroundBiome.InIce(player) && player.ZoneCorrupt)); + public static readonly ChromaCondition Hallow = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneHallow && !player.ZoneOverworldHeight)); + public static readonly ChromaCondition Crimson = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneCrimson && !player.ZoneOverworldHeight)); + public static readonly ChromaCondition Corrupt = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneCorrupt && !player.ZoneOverworldHeight)); + public static readonly ChromaCondition Desert = (ChromaCondition) new CommonConditions.SimpleCondition(new Func(CommonConditions.UndergroundBiome.InDesert)); + public static readonly ChromaCondition HallowDesert = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.UndergroundBiome.InDesert(player) && player.ZoneHallow)); + public static readonly ChromaCondition CrimsonDesert = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.UndergroundBiome.InDesert(player) && player.ZoneCrimson)); + public static readonly ChromaCondition CorruptDesert = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.UndergroundBiome.InDesert(player) && player.ZoneCorrupt)); + public static readonly ChromaCondition Temple = (ChromaCondition) new CommonConditions.SimpleCondition(new Func(CommonConditions.UndergroundBiome.InTemple)); + public static readonly ChromaCondition Dungeon = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneDungeon)); + public static readonly ChromaCondition Marble = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneMarble)); + public static readonly ChromaCondition Granite = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneGranite)); + public static readonly ChromaCondition GemCave = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneGemCave)); + + private static bool InTemple(Player player) + { + int x = (int) ((double) player.position.X + (double) (player.width / 2)) / 16; + int y = (int) ((double) player.position.Y + (double) (player.height / 2)) / 16; + return WorldGen.InWorld(x, y) && Main.tile[x, y] != null && Main.tile[x, y].wall == (ushort) 87; + } + + private static bool InIce(Player player) => player.ZoneSnow && !player.ZoneOverworldHeight; + + private static bool InDesert(Player player) => player.ZoneDesert && !player.ZoneOverworldHeight; + } + + public static class Boss + { + public static int HighestTierBossOrEvent; + public static readonly ChromaCondition EaterOfWorlds = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == 13)); + public static readonly ChromaCondition Destroyer = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == 134)); + public static readonly ChromaCondition KingSlime = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == 50)); + public static readonly ChromaCondition QueenSlime = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == 657)); + public static readonly ChromaCondition BrainOfCthulhu = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == 266)); + public static readonly ChromaCondition DukeFishron = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == 370)); + public static readonly ChromaCondition QueenBee = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == 222)); + public static readonly ChromaCondition Plantera = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == 262)); + public static readonly ChromaCondition Empress = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == 636)); + public static readonly ChromaCondition EyeOfCthulhu = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == 4)); + public static readonly ChromaCondition TheTwins = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == 126)); + public static readonly ChromaCondition MoonLord = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == 398)); + public static readonly ChromaCondition WallOfFlesh = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == 113)); + public static readonly ChromaCondition Golem = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == 245)); + public static readonly ChromaCondition Cultist = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == 439)); + public static readonly ChromaCondition Skeletron = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == 35)); + public static readonly ChromaCondition SkeletronPrime = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == (int) sbyte.MaxValue)); + } + + public static class Weather + { + public static readonly ChromaCondition Rain = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneRain && !player.ZoneSnow && !player.ZoneSandstorm)); + public static readonly ChromaCondition Sandstorm = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneSandstorm)); + public static readonly ChromaCondition Blizzard = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneSnow && player.ZoneRain)); + public static readonly ChromaCondition SlimeRain = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => Main.slimeRain && player.ZoneOverworldHeight)); + } + + public static class Depth + { + public static readonly ChromaCondition Sky = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => (double) player.position.Y / 16.0 < Main.worldSurface * 0.449999988079071)); + public static readonly ChromaCondition Surface = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneOverworldHeight && (double) player.position.Y / 16.0 >= Main.worldSurface * 0.449999988079071 && !CommonConditions.Depth.IsPlayerInFrontOfDirtWall(player))); + public static readonly ChromaCondition Vines = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneOverworldHeight && (double) player.position.Y / 16.0 >= Main.worldSurface * 0.449999988079071 && CommonConditions.Depth.IsPlayerInFrontOfDirtWall(player))); + public static readonly ChromaCondition Underground = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneDirtLayerHeight)); + public static readonly ChromaCondition Caverns = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneRockLayerHeight && player.position.ToTileCoordinates().Y <= Main.maxTilesY - 400)); + public static readonly ChromaCondition Magma = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneRockLayerHeight && player.position.ToTileCoordinates().Y > Main.maxTilesY - 400)); + public static readonly ChromaCondition Underworld = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneUnderworldHeight)); + + private static bool IsPlayerInFrontOfDirtWall(Player player) + { + Point tileCoordinates = player.Center.ToTileCoordinates(); + if (!WorldGen.InWorld(tileCoordinates.X, tileCoordinates.Y) || Main.tile[tileCoordinates.X, tileCoordinates.Y] == null) + return false; + switch (Main.tile[tileCoordinates.X, tileCoordinates.Y].wall) + { + case 2: + case 16: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 61: + case 170: + case 171: + case 185: + case 196: + case 197: + case 198: + case 199: + case 212: + case 213: + case 214: + case 215: + return true; + default: + return false; + } + } + } + + public static class Events + { + public static readonly ChromaCondition BloodMoon = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => Main.bloodMoon && !Main.snowMoon && !Main.pumpkinMoon)); + public static readonly ChromaCondition FrostMoon = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => Main.snowMoon)); + public static readonly ChromaCondition PumpkinMoon = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => Main.pumpkinMoon)); + public static readonly ChromaCondition SolarEclipse = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => Main.eclipse)); + public static readonly ChromaCondition SolarPillar = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneTowerSolar)); + public static readonly ChromaCondition NebulaPillar = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneTowerNebula)); + public static readonly ChromaCondition VortexPillar = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneTowerVortex)); + public static readonly ChromaCondition StardustPillar = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.ZoneTowerStardust)); + public static readonly ChromaCondition PirateInvasion = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == -3)); + public static readonly ChromaCondition DD2Event = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == -6)); + public static readonly ChromaCondition FrostLegion = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == -2)); + public static readonly ChromaCondition MartianMadness = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == -4)); + public static readonly ChromaCondition GoblinArmy = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => CommonConditions.Boss.HighestTierBossOrEvent == -1)); + } + + public static class Alert + { + public static readonly ChromaCondition MoonlordComing = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => NPC.MoonLordCountdown > 0)); + public static readonly ChromaCondition Drowning = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.breath != player.breathMax)); + public static readonly ChromaCondition Keybinds = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => Main.InGameUI.CurrentState == Main.ManageControlsMenu || Main.MenuUI.CurrentState == Main.ManageControlsMenu)); + public static readonly ChromaCondition LavaIndicator = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.lavaWet)); + } + + public static class CriticalAlert + { + public static readonly ChromaCondition LowLife = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => Main.ChromaPainter.PotionAlert)); + public static readonly ChromaCondition Death = (ChromaCondition) new CommonConditions.SimpleCondition((Func) (player => player.dead)); + } + } +} diff --git a/GameContent/RGB/CorruptSurfaceShader.cs b/GameContent/RGB/CorruptSurfaceShader.cs new file mode 100644 index 0000000..2811858 --- /dev/null +++ b/GameContent/RGB/CorruptSurfaceShader.cs @@ -0,0 +1,84 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.CorruptSurfaceShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class CorruptSurfaceShader : ChromaShader + { + private readonly Vector4 _baseColor; + private readonly Vector4 _skyColor; + private Vector4 _lightColor; + + public CorruptSurfaceShader(Color color) + { + this._baseColor = color.ToVector4(); + this._skyColor = Vector4.Lerp(this._baseColor, Color.DeepSkyBlue.ToVector4(), 0.5f); + } + + public CorruptSurfaceShader(Color vineColor, Color skyColor) + { + this._baseColor = vineColor.ToVector4(); + this._skyColor = skyColor.ToVector4(); + } + + public virtual void Update(float elapsedTime) => this._lightColor = Main.ColorOfTheSkies.ToVector4() * 0.75f + Vector4.One * 0.25f; + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + Vector4 vector4_1 = this._skyColor * this._lightColor; + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4_2 = Vector4.Lerp(this._baseColor, vector4_1, (float) (Math.Sin((double) time * 0.5 + (double) canvasPositionOfIndex.X) * 0.5 + 0.5)); + fragment.SetColor(index, vector4_2); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + Vector4 vector4_1 = this._skyColor * this._lightColor; + for (int index = 0; index < fragment.Count; ++index) + { + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index); + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + float num1 = (float) (((double) NoiseHelper.GetStaticNoise(gridPositionOfIndex.X) * 10.0 + (double) time * 0.400000005960464) % 10.0); + float num2 = 1f; + if ((double) num1 > 1.0) + { + num2 = MathHelper.Clamp((float) (1.0 - ((double) num1 - 1.39999997615814)), 0.0f, 1f); + num1 = 1f; + } + float num3 = (float) (Math.Sin((double) canvasPositionOfIndex.X) * 0.300000011920929 + 0.699999988079071); + float num4 = num1 - (1f - canvasPositionOfIndex.Y); + Vector4 vector4_2 = vector4_1; + if ((double) num4 > 0.0) + { + float num5 = 1f; + if ((double) num4 < 0.200000002980232) + num5 = num4 * 5f; + vector4_2 = Vector4.Lerp(vector4_2, this._baseColor, num5 * num2); + } + if ((double) canvasPositionOfIndex.Y > (double) num3) + vector4_2 = this._baseColor; + fragment.SetColor(index, vector4_2); + } + } + } +} diff --git a/GameContent/RGB/CultistShader.cs b/GameContent/RGB/CultistShader.cs new file mode 100644 index 0000000..90f15e0 --- /dev/null +++ b/GameContent/RGB/CultistShader.cs @@ -0,0 +1,51 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.CultistShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class CultistShader : ChromaShader + { + private readonly Vector4 _lightningDarkColor = new Color(23, 11, 23).ToVector4(); + private readonly Vector4 _lightningBrightColor = new Color(249, 140, (int) byte.MaxValue).ToVector4(); + private readonly Vector4 _fireDarkColor = Color.Red.ToVector4(); + private readonly Vector4 _fireBrightColor = new Color((int) byte.MaxValue, 196, 0).ToVector4(); + private readonly Vector4 _iceDarkColor = new Color(4, 4, 148).ToVector4(); + private readonly Vector4 _iceBrightColor = new Color(208, 233, (int) byte.MaxValue).ToVector4(); + private readonly Vector4 _backgroundColor = Color.Black.ToVector4(); + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + time *= 2f; + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 backgroundColor = this._backgroundColor; + float num1 = time * 0.5f + canvasPositionOfIndex.X + canvasPositionOfIndex.Y; + float amount = MathHelper.Clamp((float) (Math.Cos((double) num1) * 2.0 + 2.0), 0.0f, 1f); + float num2 = (float) (((double) num1 + 3.14159274101257) % 18.8495559692383); + Vector4 vector4_1; + if ((double) num2 < 6.28318548202515) + { + float staticNoise = NoiseHelper.GetStaticNoise(canvasPositionOfIndex * 0.3f + new Vector2(12.5f, time * 0.2f)); + vector4_1 = Vector4.Lerp(this._fireDarkColor, this._fireBrightColor, MathHelper.Clamp(Math.Max(0.0f, (float) (1.0 - (double) staticNoise * (double) staticNoise * 4.0 * (double) staticNoise)), 0.0f, 1f)); + } + else + vector4_1 = (double) num2 >= 12.5663709640503 ? Vector4.Lerp(this._lightningDarkColor, this._lightningBrightColor, Math.Max(0.0f, (float) (1.0 - 5.0 * (Math.Sin((double) NoiseHelper.GetDynamicNoise(canvasPositionOfIndex * 0.15f, time * 0.05f) * 15.0) * 0.5 + 0.5)))) : Vector4.Lerp(this._iceDarkColor, this._iceBrightColor, Math.Max(0.0f, (float) (1.0 - (double) NoiseHelper.GetDynamicNoise(new Vector2((float) (((double) canvasPositionOfIndex.X + (double) canvasPositionOfIndex.Y) * 0.200000002980232), 0.0f), time / 5f) * 1.5))); + Vector4 vector4_2 = Vector4.Lerp(backgroundColor, vector4_1, amount); + fragment.SetColor(index, vector4_2); + } + } + } +} diff --git a/GameContent/RGB/DD2Shader.cs b/GameContent/RGB/DD2Shader.cs new file mode 100644 index 0000000..47799a0 --- /dev/null +++ b/GameContent/RGB/DD2Shader.cs @@ -0,0 +1,57 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.DD2Shader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; + +namespace Terraria.GameContent.RGB +{ + public class DD2Shader : ChromaShader + { + private readonly Vector4 _darkGlowColor; + private readonly Vector4 _lightGlowColor; + + public DD2Shader(Color darkGlowColor, Color lightGlowColor) + { + this._darkGlowColor = darkGlowColor.ToVector4(); + this._lightGlowColor = lightGlowColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + Vector2 vector2_1 = fragment.CanvasCenter; + if (quality == null) + vector2_1 = new Vector2(1.7f, 0.5f); + time *= 0.5f; + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4_1 = new Vector4(0.0f, 0.0f, 0.0f, 1f); + Vector2 vector2_2 = vector2_1; + float num1 = (canvasPositionOfIndex - vector2_2).Length(); + float num2 = (float) ((double) num1 * (double) num1 * 0.75); + float num3 = (float) (((double) num1 - (double) time) % 1.0); + if ((double) num3 < 0.0) + ++num3; + float num4 = (double) num3 <= 0.800000011920929 ? num3 / 0.8f : num3 * (float) (1.0 - ((double) num3 - 1.0 + 0.200000002980232) / 0.200000002980232); + Vector4 vector4_2 = Vector4.Lerp(this._darkGlowColor, this._lightGlowColor, num4 * num4); + float amount1 = num4 * (float) ((double) MathHelper.Clamp(1f - num2, 0.0f, 1f) * 0.75 + 0.25); + vector4_1 = Vector4.Lerp(vector4_1, vector4_2, amount1); + if ((double) num1 < 0.5) + { + float amount2 = 1f - MathHelper.Clamp((float) (((double) num1 - 0.5 + 0.400000005960464) / 0.400000005960464), 0.0f, 1f); + vector4_1 = Vector4.Lerp(vector4_1, this._lightGlowColor, amount2); + } + fragment.SetColor(index, vector4_1); + } + } + } +} diff --git a/GameContent/RGB/DeathShader.cs b/GameContent/RGB/DeathShader.cs new file mode 100644 index 0000000..15195cf --- /dev/null +++ b/GameContent/RGB/DeathShader.cs @@ -0,0 +1,43 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.DeathShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class DeathShader : ChromaShader + { + private readonly Vector4 _primaryColor; + private readonly Vector4 _secondaryColor; + + public DeathShader(Color primaryColor, Color secondaryColor) + { + this._primaryColor = primaryColor.ToVector4(); + this._secondaryColor = secondaryColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + time *= 3f; + float amount = 0.0f; + float num = time % 12.56637f; + if ((double) num < 3.14159274101257) + amount = (float) Math.Sin((double) num); + for (int index = 0; index < fragment.Count; ++index) + { + Vector4 vector4 = Vector4.Lerp(this._primaryColor, this._secondaryColor, amount); + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/DebugKeyboard.cs b/GameContent/RGB/DebugKeyboard.cs new file mode 100644 index 0000000..1eabf14 --- /dev/null +++ b/GameContent/RGB/DebugKeyboard.cs @@ -0,0 +1,52 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.DebugKeyboard +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Graphics; +using ReLogic.Peripherals.RGB; + +namespace Terraria.GameContent.RGB +{ + internal class DebugKeyboard : RgbDevice + { + private DebugKeyboard(Fragment fragment) + : base((RgbDeviceVendor) 4, (RgbDeviceType) 6, fragment, new DeviceColorProfile()) + { + } + + public static DebugKeyboard Create() + { + int num1 = 400; + int num2 = 100; + Point[] pointArray = new Point[num1 * num2]; + for (int index1 = 0; index1 < num2; ++index1) + { + for (int index2 = 0; index2 < num1; ++index2) + pointArray[index1 * num1 + index2] = new Point(index2 / 10, index1 / 10); + } + Vector2[] vector2Array = new Vector2[num1 * num2]; + for (int index3 = 0; index3 < num2; ++index3) + { + for (int index4 = 0; index4 < num1; ++index4) + vector2Array[index3 * num1 + index4] = new Vector2((float) index4 / (float) num2, (float) index3 / (float) num2); + } + return new DebugKeyboard(Fragment.FromCustom(pointArray, vector2Array)); + } + + public virtual void Present() + { + } + + public virtual void DebugDraw(IDebugDrawer drawer, Vector2 position, float scale) + { + for (int index = 0; index < this.LedCount; ++index) + { + Vector2 ledCanvasPosition = this.GetLedCanvasPosition(index); + drawer.DrawSquare(new Vector4(ledCanvasPosition * scale + position, scale / 100f, scale / 100f), new Color(this.GetUnprocessedLedColor(index))); + } + } + } +} diff --git a/GameContent/RGB/DesertShader.cs b/GameContent/RGB/DesertShader.cs new file mode 100644 index 0000000..3144df6 --- /dev/null +++ b/GameContent/RGB/DesertShader.cs @@ -0,0 +1,42 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.DesertShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class DesertShader : ChromaShader + { + private readonly Vector4 _baseColor; + private readonly Vector4 _sandColor; + + public DesertShader(Color baseColor, Color sandColor) + { + this._baseColor = baseColor.ToVector4(); + this._sandColor = sandColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + fragment.GetGridPositionOfIndex(index); + canvasPositionOfIndex.Y += (float) Math.Sin((double) canvasPositionOfIndex.X * 2.0 + (double) time * 2.0) * 0.2f; + float staticNoise = NoiseHelper.GetStaticNoise(canvasPositionOfIndex * new Vector2(0.1f, 0.5f)); + Vector4 vector4 = Vector4.Lerp(this._baseColor, this._sandColor, staticNoise * staticNoise); + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/DrippingShader.cs b/GameContent/RGB/DrippingShader.cs new file mode 100644 index 0000000..a37ec76 --- /dev/null +++ b/GameContent/RGB/DrippingShader.cs @@ -0,0 +1,58 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.DrippingShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class DrippingShader : ChromaShader + { + private readonly Vector4 _baseColor; + private readonly Vector4 _liquidColor; + private readonly float _viscosity; + + public DrippingShader(Color baseColor, Color liquidColor, float viscosity = 1f) + { + this._baseColor = baseColor.ToVector4(); + this._liquidColor = liquidColor.ToVector4(); + this._viscosity = viscosity; + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4 = Vector4.Lerp(this._baseColor, this._liquidColor, (float) (Math.Sin((double) time * 0.5 + (double) canvasPositionOfIndex.X) * 0.5 + 0.5)); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + fragment.GetGridPositionOfIndex(index); + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + float staticNoise = NoiseHelper.GetStaticNoise(canvasPositionOfIndex * new Vector2(0.7f * this._viscosity, 0.075f) + new Vector2(0.0f, time * -0.1f * this._viscosity)); + Vector4 vector4 = Vector4.Lerp(this._baseColor, this._liquidColor, Math.Max(0.0f, (float) (1.0 - ((double) canvasPositionOfIndex.Y * 4.5 + 0.5) * (double) staticNoise))); + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/DrowningShader.cs b/GameContent/RGB/DrowningShader.cs new file mode 100644 index 0000000..a8c6bcf --- /dev/null +++ b/GameContent/RGB/DrowningShader.cs @@ -0,0 +1,55 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.DrowningShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; + +namespace Terraria.GameContent.RGB +{ + public class DrowningShader : ChromaShader + { + private float _breath = 1f; + + public virtual void Update(float elapsedTime) + { + Player player = Main.player[Main.myPlayer]; + this._breath = (float) (player.breath * player.breathCDMax - player.breathCD) / (float) (player.breathMax * player.breathCDMax); + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4 = new Vector4(0.0f, 0.0f, 1f, 1f - this._breath); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + float num = (float) ((double) this._breath * 1.20000004768372 - 0.100000001490116); + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4 = Vector4.Zero; + if ((double) canvasPositionOfIndex.Y > (double) num) + vector4 = new Vector4(0.0f, 0.0f, 1f, MathHelper.Clamp((float) (((double) canvasPositionOfIndex.Y - (double) num) * 5.0), 0.0f, 1f)); + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/DukeFishronShader.cs b/GameContent/RGB/DukeFishronShader.cs new file mode 100644 index 0000000..fae6b93 --- /dev/null +++ b/GameContent/RGB/DukeFishronShader.cs @@ -0,0 +1,55 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.DukeFishronShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class DukeFishronShader : ChromaShader + { + private readonly Vector4 _primaryColor; + private readonly Vector4 _secondaryColor; + + public DukeFishronShader(Color primaryColor, Color secondaryColor) + { + this._primaryColor = primaryColor.ToVector4(); + this._secondaryColor = secondaryColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4 = Vector4.Lerp(this._primaryColor, this._secondaryColor, Math.Max(0.0f, (float) Math.Sin((double) time * 2.0 + (double) canvasPositionOfIndex.X))); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + float dynamicNoise = NoiseHelper.GetDynamicNoise(fragment.GetGridPositionOfIndex(index).Y, time); + Vector4 vector4 = Vector4.Lerp(this._primaryColor, this._secondaryColor, Math.Max(0.0f, (float) Math.Sin((double) canvasPositionOfIndex.X + 2.0 * (double) time + (double) dynamicNoise) - 0.2f)); + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/DungeonShader.cs b/GameContent/RGB/DungeonShader.cs new file mode 100644 index 0000000..e8ba2c4 --- /dev/null +++ b/GameContent/RGB/DungeonShader.cs @@ -0,0 +1,45 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.DungeonShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class DungeonShader : ChromaShader + { + private readonly Vector4 _backgroundColor = new Color(5, 5, 5).ToVector4(); + private readonly Vector4 _spiritTrailColor = new Color(6, 51, 222).ToVector4(); + private readonly Vector4 _spiritColor = Color.White.ToVector4(); + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index); + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + float num = (float) ((((double) NoiseHelper.GetStaticNoise(gridPositionOfIndex.Y) * 10.0 + (double) time) % 10.0 - ((double) canvasPositionOfIndex.X + 2.0)) * 0.5); + Vector4 vector4_1 = this._backgroundColor; + if ((double) num > 0.0) + { + float amount1 = Math.Max(0.0f, 1.2f - num); + float amount2 = MathHelper.Clamp(amount1 * amount1 * amount1, 0.0f, 1f); + if ((double) num < 0.200000002980232) + amount1 = num / 0.2f; + Vector4 vector4_2 = Vector4.Lerp(this._spiritTrailColor, this._spiritColor, amount2); + vector4_1 = Vector4.Lerp(vector4_1, vector4_2, amount1); + } + fragment.SetColor(index, vector4_1); + } + } + } +} diff --git a/GameContent/RGB/EmpressShader.cs b/GameContent/RGB/EmpressShader.cs new file mode 100644 index 0000000..7e516f6 --- /dev/null +++ b/GameContent/RGB/EmpressShader.cs @@ -0,0 +1,85 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.EmpressShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class EmpressShader : ChromaShader + { + private static readonly Vector4[] _colors = new Vector4[12] + { + new Vector4(1f, 0.1f, 0.1f, 1f), + new Vector4(1f, 0.5f, 0.1f, 1f), + new Vector4(1f, 1f, 0.1f, 1f), + new Vector4(0.5f, 1f, 0.1f, 1f), + new Vector4(0.1f, 1f, 0.1f, 1f), + new Vector4(0.1f, 1f, 0.5f, 1f), + new Vector4(0.1f, 1f, 1f, 1f), + new Vector4(0.1f, 0.5f, 1f, 1f), + new Vector4(0.1f, 0.1f, 1f, 1f), + new Vector4(0.5f, 0.1f, 1f, 1f), + new Vector4(1f, 0.1f, 1f, 1f), + new Vector4(1f, 0.1f, 0.5f, 1f) + }; + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + float num1 = time * 2f; + for (int index = 0; index < fragment.Count; ++index) + { + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index); + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + double num2 = (double) MathHelper.Max(0.0f, (float) Math.Cos(((double) NoiseHelper.GetStaticNoise(gridPositionOfIndex.X) + (double) num1) * 6.28318548202515 * 0.200000002980232)); + Vector4 vector4_1 = Color.Lerp(Color.Black, Color.Indigo, 0.5f).ToVector4(); + Math.Max(0.0f, (float) Math.Sin((double) Main.GlobalTimeWrappedHourly * 2.0 + (double) canvasPositionOfIndex.X * 1.0)); + float amount1 = 0.0f; + Vector4 vector4_2 = Vector4.Lerp(vector4_1, new Vector4(1f, 0.1f, 0.1f, 1f), amount1); + double x = (double) canvasPositionOfIndex.X; + float amount2 = (float) ((num2 + x + (double) canvasPositionOfIndex.Y) % 1.0); + if ((double) amount2 > 0.0) + { + int num3 = (gridPositionOfIndex.X + gridPositionOfIndex.Y) % EmpressShader._colors.Length; + if (num3 < 0) + { + int num4 = num3 + EmpressShader._colors.Length; + } + Vector4 vector4_3 = Main.hslToRgb((float) ((((double) canvasPositionOfIndex.X + (double) canvasPositionOfIndex.Y) * 0.150000005960464 + (double) time * 0.100000001490116) % 1.0), 1f, 0.5f).ToVector4(); + vector4_2 = Vector4.Lerp(vector4_2, vector4_3, amount2); + } + fragment.SetColor(index, vector4_2); + } + } + + private static void RedsVersion(Fragment fragment, float time) + { + time *= 3f; + for (int index1 = 0; index1 < fragment.Count; ++index1) + { + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index1); + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index1); + float num = (float) (((double) NoiseHelper.GetStaticNoise(gridPositionOfIndex.X) * 7.0 + (double) time * 0.400000005960464) % 7.0) - canvasPositionOfIndex.Y; + Vector4 vector4 = new Vector4(); + if ((double) num > 0.0) + { + float amount = Math.Max(0.0f, 1.4f - num); + if ((double) num < 0.400000005960464) + amount = num / 0.4f; + int index2 = (gridPositionOfIndex.X + EmpressShader._colors.Length + (int) ((double) time / 6.0)) % EmpressShader._colors.Length; + vector4 = Vector4.Lerp(vector4, EmpressShader._colors[index2], amount); + } + fragment.SetColor(index1, vector4); + } + } + } +} diff --git a/GameContent/RGB/EyeOfCthulhuShader.cs b/GameContent/RGB/EyeOfCthulhuShader.cs new file mode 100644 index 0000000..841b91e --- /dev/null +++ b/GameContent/RGB/EyeOfCthulhuShader.cs @@ -0,0 +1,83 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.EyeOfCthulhuShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class EyeOfCthulhuShader : ChromaShader + { + private readonly Vector4 _eyeColor; + private readonly Vector4 _veinColor; + private readonly Vector4 _backgroundColor; + + public EyeOfCthulhuShader(Color eyeColor, Color veinColor, Color backgroundColor) + { + this._eyeColor = eyeColor.ToVector4(); + this._veinColor = veinColor.ToVector4(); + this._backgroundColor = backgroundColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4 = Vector4.Lerp(this._veinColor, this._eyeColor, (float) (Math.Sin((double) time + (double) canvasPositionOfIndex.X * 4.0) * 0.5 + 0.5)); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + if (device.Type != null && device.Type != 6) + { + this.ProcessLowDetail(device, fragment, quality, time); + } + else + { + float num1 = (float) ((double) time * 0.200000002980232 % 2.0); + int num2 = 1; + if ((double) num1 > 1.0) + { + num1 = 2f - num1; + num2 = -1; + } + Vector2 vector2_1 = new Vector2((float) ((double) num1 * 7.0 - 3.5), 0.0f) + fragment.CanvasCenter; + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4_1 = this._backgroundColor; + Vector2 vector2_2 = vector2_1; + Vector2 vector2_3 = canvasPositionOfIndex - vector2_2; + float num3 = vector2_3.Length(); + if ((double) num3 < 0.5) + { + float amount1 = 1f - MathHelper.Clamp((float) (((double) num3 - 0.5 + 0.200000002980232) / 0.200000002980232), 0.0f, 1f); + float amount2 = MathHelper.Clamp((float) (((double) vector2_3.X + 0.5 - 0.200000002980232) / 0.600000023841858), 0.0f, 1f); + if (num2 == 1) + amount2 = 1f - amount2; + Vector4 vector4_2 = Vector4.Lerp(this._eyeColor, this._veinColor, amount2); + vector4_1 = Vector4.Lerp(vector4_1, vector4_2, amount1); + } + fragment.SetColor(index, vector4_1); + } + } + } + } +} diff --git a/GameContent/RGB/EyeballShader.cs b/GameContent/RGB/EyeballShader.cs new file mode 100644 index 0000000..4bfa68f --- /dev/null +++ b/GameContent/RGB/EyeballShader.cs @@ -0,0 +1,160 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.EyeballShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; +using Terraria.Utilities; + +namespace Terraria.GameContent.RGB +{ + public class EyeballShader : ChromaShader + { + private static readonly EyeballShader.Ring[] Rings = new EyeballShader.Ring[5] + { + new EyeballShader.Ring(Color.Black.ToVector4(), 0.0f), + new EyeballShader.Ring(Color.Black.ToVector4(), 0.4f), + new EyeballShader.Ring(new Color(17, 220, 237).ToVector4(), 0.5f), + new EyeballShader.Ring(new Color(17, 120, 237).ToVector4(), 0.6f), + new EyeballShader.Ring(Vector4.One, 0.65f) + }; + private readonly Vector4 _eyelidColor = new Color(108, 110, 75).ToVector4(); + private float _eyelidProgress; + private Vector2 _pupilOffset = Vector2.Zero; + private Vector2 _targetOffset = Vector2.Zero; + private readonly UnifiedRandom _random = new UnifiedRandom(); + private float _timeUntilPupilMove; + private float _eyelidStateTime; + private readonly bool _isSpawning; + private EyeballShader.EyelidState _eyelidState; + + public EyeballShader(bool isSpawning) => this._isSpawning = isSpawning; + + public virtual void Update(float elapsedTime) + { + this.UpdateEyelid(elapsedTime); + int num1 = (double) this._timeUntilPupilMove <= 0.0 ? 1 : 0; + this._pupilOffset = (this._targetOffset + this._pupilOffset) * 0.5f; + this._timeUntilPupilMove -= elapsedTime; + if (num1 == 0) + return; + float num2 = (float) this._random.NextDouble() * 6.283185f; + float num3; + if (this._isSpawning) + { + this._timeUntilPupilMove = (float) (this._random.NextDouble() * 0.400000005960464 + 0.300000011920929); + num3 = (float) this._random.NextDouble() * 0.7f; + } + else + { + this._timeUntilPupilMove = (float) (this._random.NextDouble() * 0.400000005960464 + 0.600000023841858); + num3 = (float) this._random.NextDouble() * 0.3f; + } + this._targetOffset = new Vector2((float) Math.Cos((double) num2), (float) Math.Sin((double) num2)) * num3; + } + + private void UpdateEyelid(float elapsedTime) + { + float num1 = 0.5f; + float num2 = 6f; + if (this._isSpawning) + { + if (NPC.MoonLordCountdown >= 3590) + { + this._eyelidStateTime = 0.0f; + this._eyelidState = EyeballShader.EyelidState.Closed; + } + num1 = (float) ((double) NPC.MoonLordCountdown / 3600.0 * 10.0 + 0.5); + num2 = 2f; + } + this._eyelidStateTime += elapsedTime; + switch (this._eyelidState) + { + case EyeballShader.EyelidState.Closed: + this._eyelidProgress = 0.0f; + if ((double) this._eyelidStateTime <= (double) num1) + break; + this._eyelidStateTime = 0.0f; + this._eyelidState = EyeballShader.EyelidState.Opening; + break; + case EyeballShader.EyelidState.Opening: + this._eyelidProgress = this._eyelidStateTime / 0.4f; + if ((double) this._eyelidStateTime <= 0.400000005960464) + break; + this._eyelidStateTime = 0.0f; + this._eyelidState = EyeballShader.EyelidState.Open; + break; + case EyeballShader.EyelidState.Open: + this._eyelidProgress = 1f; + if ((double) this._eyelidStateTime <= (double) num2) + break; + this._eyelidStateTime = 0.0f; + this._eyelidState = EyeballShader.EyelidState.Closing; + break; + case EyeballShader.EyelidState.Closing: + this._eyelidProgress = (float) (1.0 - (double) this._eyelidStateTime / 0.400000005960464); + if ((double) this._eyelidStateTime <= 0.400000005960464) + break; + this._eyelidStateTime = 0.0f; + this._eyelidState = EyeballShader.EyelidState.Closed; + break; + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + Vector2 vector2_1 = new Vector2(1.5f, 0.5f); + Vector2 vector2_2 = vector2_1 + this._pupilOffset; + for (int index1 = 0; index1 < fragment.Count; ++index1) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index1); + Vector2 vector2_3 = canvasPositionOfIndex - vector2_1; + Vector4 vector4 = Vector4.One; + float num1 = (vector2_2 - canvasPositionOfIndex).Length(); + for (int index2 = 1; index2 < EyeballShader.Rings.Length; ++index2) + { + EyeballShader.Ring ring1 = EyeballShader.Rings[index2]; + EyeballShader.Ring ring2 = EyeballShader.Rings[index2 - 1]; + if ((double) num1 < (double) ring1.Distance) + { + vector4 = Vector4.Lerp(ring2.Color, ring1.Color, (float) (((double) num1 - (double) ring2.Distance) / ((double) ring1.Distance - (double) ring2.Distance))); + break; + } + } + float num2 = (float) Math.Sqrt(1.0 - 0.400000005960464 * (double) vector2_3.Y * (double) vector2_3.Y) * 5f; + float num3 = Math.Abs(vector2_3.X) - num2 * (float) (1.10000002384186 * (double) this._eyelidProgress - 0.100000001490116); + if ((double) num3 > 0.0) + vector4 = Vector4.Lerp(vector4, this._eyelidColor, Math.Min(1f, num3 * 10f)); + fragment.SetColor(index1, vector4); + } + } + + private struct Ring + { + public readonly Vector4 Color; + public readonly float Distance; + + public Ring(Vector4 color, float distance) + { + this.Color = color; + this.Distance = distance; + } + } + + private enum EyelidState + { + Closed, + Opening, + Open, + Closing, + } + } +} diff --git a/GameContent/RGB/FrostLegionShader.cs b/GameContent/RGB/FrostLegionShader.cs new file mode 100644 index 0000000..309c01d --- /dev/null +++ b/GameContent/RGB/FrostLegionShader.cs @@ -0,0 +1,44 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.FrostLegionShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; + +namespace Terraria.GameContent.RGB +{ + public class FrostLegionShader : ChromaShader + { + private readonly Vector4 _primaryColor; + private readonly Vector4 _secondaryColor; + + public FrostLegionShader(Color primaryColor, Color secondaryColor) + { + this._primaryColor = primaryColor.ToVector4(); + this._secondaryColor = secondaryColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + float staticNoise = NoiseHelper.GetStaticNoise(fragment.GetGridPositionOfIndex(index).X / 2); + float num = (float) (((double) canvasPositionOfIndex.Y + (double) canvasPositionOfIndex.X / 2.0 - (double) staticNoise + (double) time) % 2.0); + if ((double) num < 0.0) + num += 2f; + if ((double) num < 0.200000002980232) + num = (float) (1.0 - (double) num / 0.200000002980232); + Vector4 vector4 = Vector4.Lerp(this._primaryColor, this._secondaryColor, num / 2f); + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/GemCaveShader.cs b/GameContent/RGB/GemCaveShader.cs new file mode 100644 index 0000000..7d07a47 --- /dev/null +++ b/GameContent/RGB/GemCaveShader.cs @@ -0,0 +1,66 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.GemCaveShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class GemCaveShader : ChromaShader + { + private readonly Vector4 _primaryColor; + private readonly Vector4 _secondaryColor; + private static readonly Vector4[] _gemColors = new Vector4[7] + { + Color.White.ToVector4(), + Color.Yellow.ToVector4(), + Color.Orange.ToVector4(), + Color.Red.ToVector4(), + Color.Green.ToVector4(), + Color.Blue.ToVector4(), + Color.Purple.ToVector4() + }; + + public GemCaveShader(Color primaryColor, Color secondaryColor) + { + this._primaryColor = primaryColor.ToVector4(); + this._secondaryColor = secondaryColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + time *= 0.25f; + float num1 = time % 1f; + int num2 = (double) time % 2.0 > 1.0 ? 1 : 0; + Vector4 vector4_1 = num2 != 0 ? this._secondaryColor : this._primaryColor; + Vector4 vector4_2 = num2 != 0 ? this._primaryColor : this._secondaryColor; + float num3 = num1 * 1.2f; + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index); + float staticNoise = NoiseHelper.GetStaticNoise(canvasPositionOfIndex * 0.5f + new Vector2(0.0f, time * 0.5f)); + Vector4 vector4_3 = vector4_1; + float num4 = staticNoise + num3; + if ((double) num4 > 0.999000012874603) + { + float amount = MathHelper.Clamp((float) (((double) num4 - 0.999000012874603) / 0.200000002980232), 0.0f, 1f); + vector4_3 = Vector4.Lerp(vector4_3, vector4_2, amount); + } + float amount1 = Math.Max(0.0f, (float) (1.0 - (double) NoiseHelper.GetDynamicNoise(gridPositionOfIndex.X, gridPositionOfIndex.Y, time / 100f) * 20.0)); + Vector4 vector4_4 = Vector4.Lerp(vector4_3, GemCaveShader._gemColors[((gridPositionOfIndex.Y * 47 + gridPositionOfIndex.X) % GemCaveShader._gemColors.Length + GemCaveShader._gemColors.Length) % GemCaveShader._gemColors.Length], amount1); + fragment.SetColor(index, vector4_4); + fragment.SetColor(index, vector4_4); + } + } + } +} diff --git a/GameContent/RGB/GoblinArmyShader.cs b/GameContent/RGB/GoblinArmyShader.cs new file mode 100644 index 0000000..86aea47 --- /dev/null +++ b/GameContent/RGB/GoblinArmyShader.cs @@ -0,0 +1,60 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.GoblinArmyShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class GoblinArmyShader : ChromaShader + { + private readonly Vector4 _primaryColor; + private readonly Vector4 _secondaryColor; + + public GoblinArmyShader(Color primaryColor, Color secondaryColor) + { + this._primaryColor = primaryColor.ToVector4(); + this._secondaryColor = secondaryColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + time *= 0.5f; + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + canvasPositionOfIndex.Y = 1f; + float staticNoise = NoiseHelper.GetStaticNoise(canvasPositionOfIndex * 0.3f + new Vector2(12.5f, time * 0.2f)); + float amount = MathHelper.Clamp(Math.Max(0.0f, (float) (1.0 - (double) staticNoise * (double) staticNoise * 4.0 * (double) staticNoise)), 0.0f, 1f); + Vector4 vector4 = Vector4.Lerp(new Vector4(0.0f, 0.0f, 0.0f, 1f), Vector4.Lerp(Vector4.Lerp(this._primaryColor, this._secondaryColor, amount), Vector4.One, amount * amount), amount); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + float staticNoise = NoiseHelper.GetStaticNoise(canvasPositionOfIndex * 0.3f + new Vector2(12.5f, time * 0.2f)); + float amount = MathHelper.Clamp(Math.Max(0.0f, (float) (1.0 - (double) staticNoise * (double) staticNoise * 4.0 * (double) staticNoise * (1.20000004768372 - (double) canvasPositionOfIndex.Y))) * canvasPositionOfIndex.Y * canvasPositionOfIndex.Y, 0.0f, 1f); + Vector4 vector4 = Vector4.Lerp(new Vector4(0.0f, 0.0f, 0.0f, 1f), Vector4.Lerp(Vector4.Lerp(this._primaryColor, this._secondaryColor, amount), Vector4.One, amount * amount * amount), amount); + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/GolemShader.cs b/GameContent/RGB/GolemShader.cs new file mode 100644 index 0000000..23c1ead --- /dev/null +++ b/GameContent/RGB/GolemShader.cs @@ -0,0 +1,74 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.GolemShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class GolemShader : ChromaShader + { + private readonly Vector4 _glowColor; + private readonly Vector4 _coreColor; + private readonly Vector4 _backgroundColor; + + public GolemShader(Color glowColor, Color coreColor, Color backgroundColor) + { + this._glowColor = glowColor.ToVector4(); + this._coreColor = coreColor.ToVector4(); + this._backgroundColor = backgroundColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + Vector4 vector4_1 = Vector4.Lerp(this._backgroundColor, this._coreColor, Math.Max(0.0f, (float) Math.Sin((double) time * 0.5))); + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4_2 = Vector4.Lerp(vector4_1, this._glowColor, Math.Max(0.0f, (float) Math.Sin((double) canvasPositionOfIndex.X * 2.0 + (double) time + 101.0))); + fragment.SetColor(index, vector4_2); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + float num1 = (float) (0.5 + Math.Sin((double) time * 3.0) * 0.100000001490116); + Vector2 vector2 = new Vector2(1.6f, 0.5f); + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index); + Vector4 vector4 = this._backgroundColor; + float num2 = (float) (((double) NoiseHelper.GetStaticNoise(gridPositionOfIndex.Y) * 10.0 + (double) time * 2.0) % 10.0) - Math.Abs(canvasPositionOfIndex.X - vector2.X); + if ((double) num2 > 0.0) + { + float amount = Math.Max(0.0f, 1.2f - num2); + if ((double) num2 < 0.200000002980232) + amount = num2 * 5f; + vector4 = Vector4.Lerp(vector4, this._glowColor, amount); + } + float num3 = (canvasPositionOfIndex - vector2).Length(); + if ((double) num3 < (double) num1) + { + float amount = 1f - MathHelper.Clamp((float) (((double) num3 - (double) num1 + 0.100000001490116) / 0.100000001490116), 0.0f, 1f); + vector4 = Vector4.Lerp(vector4, this._coreColor, amount); + } + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/HallowSurfaceShader.cs b/GameContent/RGB/HallowSurfaceShader.cs new file mode 100644 index 0000000..8f9fea0 --- /dev/null +++ b/GameContent/RGB/HallowSurfaceShader.cs @@ -0,0 +1,59 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.HallowSurfaceShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class HallowSurfaceShader : ChromaShader + { + private readonly Vector4 _skyColor = new Color(150, 220, 220).ToVector4(); + private readonly Vector4 _groundColor = new Vector4(1f, 0.2f, 0.25f, 1f); + private readonly Vector4 _pinkFlowerColor = new Vector4(1f, 0.2f, 0.25f, 1f); + private readonly Vector4 _yellowFlowerColor = new Vector4(1f, 1f, 0.0f, 1f); + private Vector4 _lightColor; + + public virtual void Update(float elapsedTime) => this._lightColor = Main.ColorOfTheSkies.ToVector4() * 0.75f + Vector4.One * 0.25f; + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4 = Vector4.Lerp(this._skyColor, this._groundColor, (float) (Math.Sin((double) time + (double) canvasPositionOfIndex.X) * 0.5 + 0.5)); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + Vector4 vector4_1 = this._skyColor * this._lightColor; + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index); + float amount = Math.Max(0.0f, (float) (1.0 - (double) NoiseHelper.GetDynamicNoise(gridPositionOfIndex.X, gridPositionOfIndex.Y, time / 20f) * 5.0)); + Vector4 vector4_2 = vector4_1; + Vector4 vector4_3 = (gridPositionOfIndex.X * 100 + gridPositionOfIndex.Y) % 2 != 0 ? Vector4.Lerp(vector4_2, this._pinkFlowerColor, amount) : Vector4.Lerp(vector4_2, this._yellowFlowerColor, amount); + if ((double) canvasPositionOfIndex.Y > Math.Sin((double) canvasPositionOfIndex.X) * 0.300000011920929 + 0.699999988079071) + vector4_3 = this._groundColor; + fragment.SetColor(index, vector4_3); + } + } + } +} diff --git a/GameContent/RGB/IceShader.cs b/GameContent/RGB/IceShader.cs new file mode 100644 index 0000000..998e7bf --- /dev/null +++ b/GameContent/RGB/IceShader.cs @@ -0,0 +1,42 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.IceShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class IceShader : ChromaShader + { + private readonly Vector4 _baseColor; + private readonly Vector4 _iceColor; + private readonly Vector4 _shineColor = new Vector4(1f, 1f, 0.7f, 1f); + + public IceShader(Color baseColor, Color iceColor) + { + this._baseColor = baseColor.ToVector4(); + this._iceColor = iceColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + float amount1 = Math.Max(0.0f, (float) (1.0 - (double) NoiseHelper.GetDynamicNoise(new Vector2((float) (((double) canvasPositionOfIndex.X - (double) canvasPositionOfIndex.Y) * 0.200000002980232), 0.0f), time / 5f) * 1.5)); + float amount2 = Math.Max(0.0f, (float) (1.0 - (double) NoiseHelper.GetDynamicNoise(new Vector2((float) (((double) canvasPositionOfIndex.X - (double) canvasPositionOfIndex.Y) * 0.300000011920929), 0.3f), time / 20f) * 5.0)); + Vector4 vector4 = Vector4.Lerp(Vector4.Lerp(this._baseColor, this._iceColor, amount1), this._shineColor, amount2); + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/JungleShader.cs b/GameContent/RGB/JungleShader.cs new file mode 100644 index 0000000..8d40c36 --- /dev/null +++ b/GameContent/RGB/JungleShader.cs @@ -0,0 +1,62 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.JungleShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class JungleShader : ChromaShader + { + private readonly Vector4 _backgroundColor = new Color(40, 80, 0).ToVector4(); + private readonly Vector4 _sporeColor = new Color((int) byte.MaxValue, (int) byte.MaxValue, 0).ToVector4(); + private readonly Vector4[] _flowerColors = new Vector4[5] + { + Color.Yellow.ToVector4(), + Color.Pink.ToVector4(), + Color.Purple.ToVector4(), + Color.Red.ToVector4(), + Color.Blue.ToVector4() + }; + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector4 vector4 = Vector4.Lerp(this._backgroundColor, this._sporeColor, NoiseHelper.GetDynamicNoise(fragment.GetCanvasPositionOfIndex(index) * 0.3f, time / 5f)); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + bool flag = device.Type == null || device.Type == 6; + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index); + Vector4 vector4 = Vector4.Lerp(this._backgroundColor, this._sporeColor, Math.Max(0.0f, (float) (1.0 - (double) NoiseHelper.GetDynamicNoise(canvasPositionOfIndex * 0.3f, time / 5f) * 2.5))); + if (flag) + { + float amount = Math.Max(0.0f, (float) (1.0 - (double) NoiseHelper.GetDynamicNoise(gridPositionOfIndex.X, gridPositionOfIndex.Y, time / 100f) * 20.0)); + vector4 = Vector4.Lerp(vector4, this._flowerColors[((gridPositionOfIndex.Y * 47 + gridPositionOfIndex.X) % 5 + 5) % 5], amount); + } + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/KeybindsMenuShader.cs b/GameContent/RGB/KeybindsMenuShader.cs new file mode 100644 index 0000000..84c0ea5 --- /dev/null +++ b/GameContent/RGB/KeybindsMenuShader.cs @@ -0,0 +1,31 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.KeybindsMenuShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + internal class KeybindsMenuShader : ChromaShader + { + private static Vector4 _baseColor = new Color(20, 20, 20, 245).ToVector4(); + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + float num = (float) (Math.Cos((double) time * 1.57079637050629) * 0.200000002980232 + 0.800000011920929); + Vector4 vector4 = KeybindsMenuShader._baseColor * num; + vector4.W = KeybindsMenuShader._baseColor.W; + for (int index = 0; index < fragment.Count; ++index) + fragment.SetColor(index, vector4); + } + } +} diff --git a/GameContent/RGB/KingSlimeShader.cs b/GameContent/RGB/KingSlimeShader.cs new file mode 100644 index 0000000..c62b63c --- /dev/null +++ b/GameContent/RGB/KingSlimeShader.cs @@ -0,0 +1,53 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.KingSlimeShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class KingSlimeShader : ChromaShader + { + private readonly Vector4 _slimeColor; + private readonly Vector4 _debrisColor; + + public KingSlimeShader(Color slimeColor, Color debrisColor) + { + this._slimeColor = slimeColor.ToVector4(); + this._debrisColor = debrisColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector4 vector4 = Vector4.Lerp(this._slimeColor, this._debrisColor, Math.Max(0.0f, (float) (1.0 - (double) NoiseHelper.GetDynamicNoise(fragment.GetCanvasPositionOfIndex(index), time * 0.25f) * 2.0))); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + Vector2 vector2 = new Vector2(1.6f, 0.5f); + for (int index = 0; index < fragment.Count; ++index) + { + Vector4 vector4 = Vector4.Lerp(this._slimeColor, this._debrisColor, (float) Math.Sqrt((double) Math.Max(0.0f, (float) (1.0 - (double) NoiseHelper.GetStaticNoise(fragment.GetCanvasPositionOfIndex(index) * 0.3f + new Vector2(0.0f, time * 0.1f)) * 3.0)))); + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/LavaIndicatorShader.cs b/GameContent/RGB/LavaIndicatorShader.cs new file mode 100644 index 0000000..518c2c9 --- /dev/null +++ b/GameContent/RGB/LavaIndicatorShader.cs @@ -0,0 +1,65 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.LavaIndicatorShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class LavaIndicatorShader : ChromaShader + { + private readonly Vector4 _backgroundColor; + private readonly Vector4 _primaryColor; + private readonly Vector4 _secondaryColor; + + public LavaIndicatorShader(Color backgroundColor, Color primaryColor, Color secondaryColor) + { + this._backgroundColor = backgroundColor.ToVector4(); + this._primaryColor = primaryColor.ToVector4(); + this._secondaryColor = secondaryColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + float staticNoise = NoiseHelper.GetStaticNoise(fragment.GetCanvasPositionOfIndex(index) * 0.3f + new Vector2(12.5f, time * 0.2f)); + Vector4 vector4 = Vector4.Lerp(this._primaryColor, this._secondaryColor, MathHelper.Clamp(Math.Max(0.0f, (float) (1.0 - (double) staticNoise * (double) staticNoise * 4.0 * (double) staticNoise)), 0.0f, 1f)); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4_1 = this._backgroundColor; + float num1 = 0.4f + NoiseHelper.GetDynamicNoise(canvasPositionOfIndex * 0.2f, time * 0.5f) * 0.4f; + float num2 = 1.1f - canvasPositionOfIndex.Y; + if ((double) num2 < (double) num1) + { + float staticNoise = NoiseHelper.GetStaticNoise(canvasPositionOfIndex * 0.3f + new Vector2(12.5f, time * 0.2f)); + Vector4 vector4_2 = Vector4.Lerp(this._primaryColor, this._secondaryColor, MathHelper.Clamp(Math.Max(0.0f, (float) (1.0 - (double) staticNoise * (double) staticNoise * 4.0 * (double) staticNoise)), 0.0f, 1f)); + float amount = 1f - MathHelper.Clamp((float) (((double) num2 - (double) num1 + 0.200000002980232) / 0.200000002980232), 0.0f, 1f); + vector4_1 = Vector4.Lerp(vector4_1, vector4_2, amount); + } + fragment.SetColor(index, vector4_1); + } + } + } +} diff --git a/GameContent/RGB/LowLifeShader.cs b/GameContent/RGB/LowLifeShader.cs new file mode 100644 index 0000000..ff1e707 --- /dev/null +++ b/GameContent/RGB/LowLifeShader.cs @@ -0,0 +1,31 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.LowLifeShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class LowLifeShader : ChromaShader + { + private static Vector4 _baseColor = new Color(40, 0, 8, (int) byte.MaxValue).ToVector4(); + + [RgbProcessor] + private void ProcessAnyDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + float num = (float) (Math.Cos((double) time * 3.14159274101257) * 0.300000011920929 + 0.699999988079071); + Vector4 vector4 = LowLifeShader._baseColor * num; + vector4.W = LowLifeShader._baseColor.W; + for (int index = 0; index < fragment.Count; ++index) + fragment.SetColor(index, vector4); + } + } +} diff --git a/GameContent/RGB/MartianMadnessShader.cs b/GameContent/RGB/MartianMadnessShader.cs new file mode 100644 index 0000000..210610b --- /dev/null +++ b/GameContent/RGB/MartianMadnessShader.cs @@ -0,0 +1,105 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.MartianMadnessShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class MartianMadnessShader : ChromaShader + { + private readonly Vector4 _metalColor; + private readonly Vector4 _glassColor; + private readonly Vector4 _beamColor; + private readonly Vector4 _backgroundColor; + + public MartianMadnessShader( + Color metalColor, + Color glassColor, + Color beamColor, + Color backgroundColor) + { + this._metalColor = metalColor.ToVector4(); + this._glassColor = glassColor.ToVector4(); + this._beamColor = beamColor.ToVector4(); + this._backgroundColor = backgroundColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index); + float amount = (float) (Math.Sin((double) time * 2.0 + (double) canvasPositionOfIndex.X * 5.0) * 0.5 + 0.5); + int num = (gridPositionOfIndex.X + gridPositionOfIndex.Y) % 2; + if (num < 0) + num += 2; + Vector4 vector4 = num == 1 ? Vector4.Lerp(this._glassColor, this._beamColor, amount) : this._metalColor; + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + if (device.Type != null && device.Type != 6) + { + this.ProcessLowDetail(device, fragment, quality, time); + } + else + { + float num1 = (float) ((double) time * 0.5 % 6.28318548202515); + if ((double) num1 > 3.14159274101257) + num1 = 6.283185f - num1; + Vector2 vector2_1 = new Vector2((float) (1.70000004768372 + Math.Cos((double) num1) * 2.0), (float) (Math.Sin((double) num1) * 1.10000002384186 - 0.5)); + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4 = this._backgroundColor; + float num2 = Math.Abs(vector2_1.X - canvasPositionOfIndex.X); + if ((double) canvasPositionOfIndex.Y > (double) vector2_1.Y && (double) num2 < 0.200000002980232) + { + float num3 = 1f - MathHelper.Clamp((float) (((double) num2 - 0.200000002980232 + 0.200000002980232) / 0.200000002980232), 0.0f, 1f); + float num4 = Math.Max(0.0f, (float) (1.0 - (double) Math.Abs((float) (((double) num1 - 1.57079637050629) / 1.57079637050629)) * 3.0)); + vector4 = Vector4.Lerp(vector4, this._beamColor, num3 * num4); + } + Vector2 vector2_2 = vector2_1 - canvasPositionOfIndex; + vector2_2.X /= 1f; + vector2_2.Y /= 0.2f; + float num5 = vector2_2.Length(); + if ((double) num5 < 1.0) + { + float amount = 1f - MathHelper.Clamp((float) (((double) num5 - 1.0 + 0.200000002980232) / 0.200000002980232), 0.0f, 1f); + vector4 = Vector4.Lerp(vector4, this._metalColor, amount); + } + Vector2 vector2_3 = vector2_1 - canvasPositionOfIndex + new Vector2(0.0f, -0.1f); + vector2_3.X /= 0.3f; + vector2_3.Y /= 0.3f; + if ((double) vector2_3.Y < 0.0) + vector2_3.Y *= 2f; + float num6 = vector2_3.Length(); + if ((double) num6 < 1.0) + { + float amount = 1f - MathHelper.Clamp((float) (((double) num6 - 1.0 + 0.200000002980232) / 0.200000002980232), 0.0f, 1f); + vector4 = Vector4.Lerp(vector4, this._glassColor, amount); + } + fragment.SetColor(index, vector4); + } + } + } + } +} diff --git a/GameContent/RGB/MeteoriteShader.cs b/GameContent/RGB/MeteoriteShader.cs new file mode 100644 index 0000000..29e132c --- /dev/null +++ b/GameContent/RGB/MeteoriteShader.cs @@ -0,0 +1,52 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.MeteoriteShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class MeteoriteShader : ChromaShader + { + private readonly Vector4 _baseColor = new Color(39, 15, 26).ToVector4(); + private readonly Vector4 _secondaryColor = new Color(69, 50, 43).ToVector4(); + private readonly Vector4 _glowColor = Color.DarkOrange.ToVector4(); + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4 = Vector4.Lerp(this._baseColor, this._secondaryColor, (float) (Math.Sin((double) time + (double) canvasPositionOfIndex.X) * 0.5 + 0.5)); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index); + Vector4 baseColor = this._baseColor; + float dynamicNoise = NoiseHelper.GetDynamicNoise(gridPositionOfIndex.X, gridPositionOfIndex.Y, time / 10f); + Vector4 vector4 = Vector4.Lerp(Vector4.Lerp(baseColor, this._secondaryColor, dynamicNoise * dynamicNoise), this._glowColor, (float) Math.Sqrt((double) Math.Max(0.0f, (float) (1.0 - (double) NoiseHelper.GetDynamicNoise(canvasPositionOfIndex * 0.5f + new Vector2(0.0f, time * 0.05f), time / 20f) * 2.0))) * 0.75f); + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/MoonShader.cs b/GameContent/RGB/MoonShader.cs new file mode 100644 index 0000000..e1f250d --- /dev/null +++ b/GameContent/RGB/MoonShader.cs @@ -0,0 +1,93 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.MoonShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class MoonShader : ChromaShader + { + private readonly Vector4 _moonCoreColor; + private readonly Vector4 _moonRingColor; + private readonly Vector4 _skyColor; + private readonly Vector4 _cloudColor; + private float _progress; + + public MoonShader(Color skyColor, Color moonRingColor, Color moonCoreColor) + : this(skyColor, moonRingColor, moonCoreColor, Color.White) + { + } + + public MoonShader(Color skyColor, Color moonColor) + : this(skyColor, moonColor, moonColor) + { + } + + public MoonShader(Color skyColor, Color moonRingColor, Color moonCoreColor, Color cloudColor) + { + this._skyColor = skyColor.ToVector4(); + this._moonRingColor = moonRingColor.ToVector4(); + this._moonCoreColor = moonCoreColor.ToVector4(); + this._cloudColor = cloudColor.ToVector4(); + } + + public virtual void Update(float elapsedTime) + { + if (Main.dayTime) + this._progress = (float) (Main.time / 54000.0); + else + this._progress = (float) (Main.time / 32400.0); + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector4 vector4 = Vector4.Lerp(this._skyColor, this._cloudColor, (float) Math.Sqrt((double) Math.Max(0.0f, (float) (1.0 - 2.0 * (double) NoiseHelper.GetDynamicNoise(fragment.GetCanvasPositionOfIndex(index) * new Vector2(0.1f, 0.5f) + new Vector2(time * 0.02f, 0.0f), time / 40f)))) * 0.1f); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + if (device.Type != null && device.Type != 6) + { + this.ProcessLowDetail(device, fragment, quality, time); + } + else + { + Vector2 vector2_1 = new Vector2(2f, 0.5f); + Vector2 vector2_2 = new Vector2(2.5f, 1f); + float num1 = (float) ((double) this._progress * 3.14159274101257 + 3.14159274101257); + Vector2 vector2_3 = new Vector2((float) Math.Cos((double) num1), (float) Math.Sin((double) num1)) * vector2_2 + vector2_1; + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + float num2 = (float) Math.Sqrt((double) Math.Max(0.0f, (float) (1.0 - 2.0 * (double) NoiseHelper.GetDynamicNoise(canvasPositionOfIndex * new Vector2(0.1f, 0.5f) + new Vector2(time * 0.02f, 0.0f), time / 40f)))); + float num3 = (canvasPositionOfIndex - vector2_3).Length(); + Vector4 vector4 = Vector4.Lerp(this._skyColor, this._cloudColor, num2 * 0.15f); + if ((double) num3 < 0.800000011920929) + vector4 = Vector4.Lerp(this._moonRingColor, this._moonCoreColor, Math.Min(0.1f, 0.8f - num3) / 0.1f); + else if ((double) num3 < 1.0) + vector4 = Vector4.Lerp(vector4, this._moonRingColor, Math.Min(0.2f, 1f - num3) / 0.2f); + fragment.SetColor(index, vector4); + } + } + } + } +} diff --git a/GameContent/RGB/NoiseHelper.cs b/GameContent/RGB/NoiseHelper.cs new file mode 100644 index 0000000..1903403 --- /dev/null +++ b/GameContent/RGB/NoiseHelper.cs @@ -0,0 +1,69 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.NoiseHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using Terraria.Utilities; + +namespace Terraria.GameContent.RGB +{ + public static class NoiseHelper + { + private const int RANDOM_SEED = 1; + private const int NOISE_2D_SIZE = 32; + private const int NOISE_2D_SIZE_MASK = 31; + private const int NOISE_SIZE_MASK = 1023; + private static readonly float[] StaticNoise = NoiseHelper.CreateStaticNoise(1024); + + private static float[] CreateStaticNoise(int length) + { + UnifiedRandom r = new UnifiedRandom(1); + float[] numArray = new float[length]; + for (int index = 0; index < numArray.Length; ++index) + numArray[index] = r.NextFloat(); + return numArray; + } + + public static float GetDynamicNoise(int index, float currentTime) => Math.Abs(Math.Abs(NoiseHelper.StaticNoise[index & 1023] - currentTime % 1f) - 0.5f) * 2f; + + public static float GetStaticNoise(int index) => NoiseHelper.StaticNoise[index & 1023]; + + public static float GetDynamicNoise(int x, int y, float currentTime) => NoiseHelper.GetDynamicNoiseInternal(x, y, currentTime % 1f); + + private static float GetDynamicNoiseInternal(int x, int y, float wrappedTime) + { + x &= 31; + y &= 31; + return Math.Abs(Math.Abs(NoiseHelper.StaticNoise[y * 32 + x] - wrappedTime) - 0.5f) * 2f; + } + + public static float GetStaticNoise(int x, int y) + { + x &= 31; + y &= 31; + return NoiseHelper.StaticNoise[y * 32 + x]; + } + + public static float GetDynamicNoise(Vector2 position, float currentTime) + { + position *= 10f; + currentTime %= 1f; + Vector2 vector2_1 = new Vector2((float) Math.Floor((double) position.X), (float) Math.Floor((double) position.Y)); + Point point = new Point((int) vector2_1.X, (int) vector2_1.Y); + Vector2 vector2_2 = new Vector2(position.X - vector2_1.X, position.Y - vector2_1.Y); + return MathHelper.Lerp(MathHelper.Lerp(NoiseHelper.GetDynamicNoiseInternal(point.X, point.Y, currentTime), NoiseHelper.GetDynamicNoiseInternal(point.X, point.Y + 1, currentTime), vector2_2.Y), MathHelper.Lerp(NoiseHelper.GetDynamicNoiseInternal(point.X + 1, point.Y, currentTime), NoiseHelper.GetDynamicNoiseInternal(point.X + 1, point.Y + 1, currentTime), vector2_2.Y), vector2_2.X); + } + + public static float GetStaticNoise(Vector2 position) + { + position *= 10f; + Vector2 vector2_1 = new Vector2((float) Math.Floor((double) position.X), (float) Math.Floor((double) position.Y)); + Point point = new Point((int) vector2_1.X, (int) vector2_1.Y); + Vector2 vector2_2 = new Vector2(position.X - vector2_1.X, position.Y - vector2_1.Y); + return MathHelper.Lerp(MathHelper.Lerp(NoiseHelper.GetStaticNoise(point.X, point.Y), NoiseHelper.GetStaticNoise(point.X, point.Y + 1), vector2_2.Y), MathHelper.Lerp(NoiseHelper.GetStaticNoise(point.X + 1, point.Y), NoiseHelper.GetStaticNoise(point.X + 1, point.Y + 1), vector2_2.Y), vector2_2.X); + } + } +} diff --git a/GameContent/RGB/PillarShader.cs b/GameContent/RGB/PillarShader.cs new file mode 100644 index 0000000..9473fa9 --- /dev/null +++ b/GameContent/RGB/PillarShader.cs @@ -0,0 +1,65 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.PillarShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class PillarShader : ChromaShader + { + private readonly Vector4 _primaryColor; + private readonly Vector4 _secondaryColor; + + public PillarShader(Color primaryColor, Color secondaryColor) + { + this._primaryColor = primaryColor.ToVector4(); + this._secondaryColor = secondaryColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4 = Vector4.Lerp(this._primaryColor, this._secondaryColor, (float) (Math.Sin((double) time * 2.5 + (double) canvasPositionOfIndex.X) * 0.5 + 0.5)); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + Vector2 vector2_1 = new Vector2(1.5f, 0.5f); + time *= 4f; + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 vector2_2 = fragment.GetCanvasPositionOfIndex(index) - vector2_1; + float num1 = vector2_2.Length() * 2f; + float num2 = (float) Math.Atan2((double) vector2_2.Y, (double) vector2_2.X); + Vector4 vector4 = Vector4.Lerp(this._primaryColor, this._secondaryColor, (float) (Math.Sin((double) num1 * 4.0 - (double) time - (double) num2) * 0.5 + 0.5)); + if ((double) num1 < 1.0) + { + float num3 = num1 / 1f; + float num4 = num3 * (num3 * num3); + vector4 = Vector4.Lerp(this._primaryColor, this._secondaryColor, (float) (Math.Sin(4.0 - (double) time - (double) num2) * 0.5 + 0.5)) * num4; + } + vector4.W = 1f; + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/PirateInvasionShader.cs b/GameContent/RGB/PirateInvasionShader.cs new file mode 100644 index 0000000..3222e82 --- /dev/null +++ b/GameContent/RGB/PirateInvasionShader.cs @@ -0,0 +1,81 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.PirateInvasionShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class PirateInvasionShader : ChromaShader + { + private readonly Vector4 _cannonBallColor; + private readonly Vector4 _splashColor; + private readonly Vector4 _waterColor; + private readonly Vector4 _backgroundColor; + + public PirateInvasionShader( + Color cannonBallColor, + Color splashColor, + Color waterColor, + Color backgroundColor) + { + this._cannonBallColor = cannonBallColor.ToVector4(); + this._splashColor = splashColor.ToVector4(); + this._waterColor = waterColor.ToVector4(); + this._backgroundColor = backgroundColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4 = Vector4.Lerp(this._waterColor, this._cannonBallColor, (float) (Math.Sin((double) time * 0.5 + (double) canvasPositionOfIndex.X) * 0.5 + 0.5)); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index); + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + gridPositionOfIndex.X /= 2; + double num1 = ((double) NoiseHelper.GetStaticNoise(gridPositionOfIndex.X) * 40.0 + (double) time * 1.0) % 40.0; + float amount1 = 0.0f; + float num2 = (float) (num1 - (double) canvasPositionOfIndex.Y / 1.20000004768372); + if (num1 > 1.0) + { + float num3 = (float) (1.0 - (double) canvasPositionOfIndex.Y / 1.20000004768372); + amount1 = (float) ((1.0 - (double) Math.Min(1f, num2 - num3)) * (1.0 - (double) Math.Min(1f, num3 / 1f))); + } + Vector4 vector4 = this._backgroundColor; + if ((double) num2 > 0.0) + { + float amount2 = Math.Max(0.0f, (float) (1.20000004768372 - (double) num2 * 4.0)); + if ((double) num2 < 0.100000001490116) + amount2 = num2 / 0.1f; + vector4 = Vector4.Lerp(Vector4.Lerp(vector4, this._cannonBallColor, amount2), this._splashColor, amount1); + } + if ((double) canvasPositionOfIndex.Y > 0.800000011920929) + vector4 = this._waterColor; + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/PlanteraShader.cs b/GameContent/RGB/PlanteraShader.cs new file mode 100644 index 0000000..4555342 --- /dev/null +++ b/GameContent/RGB/PlanteraShader.cs @@ -0,0 +1,78 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.PlanteraShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class PlanteraShader : ChromaShader + { + private readonly Vector4 _bulbColor; + private readonly Vector4 _vineColor; + private readonly Vector4 _backgroundColor; + + public PlanteraShader(Color bulbColor, Color vineColor, Color backgroundColor) + { + this._bulbColor = bulbColor.ToVector4(); + this._vineColor = vineColor.ToVector4(); + this._backgroundColor = backgroundColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4 = Vector4.Lerp(this._bulbColor, this._vineColor, (float) (Math.Sin((double) time * 2.0 + (double) canvasPositionOfIndex.X * 10.0) * 0.5 + 0.5)); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index); + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + canvasPositionOfIndex.X -= 1.8f; + if ((double) canvasPositionOfIndex.X < 0.0) + { + canvasPositionOfIndex.X *= -1f; + gridPositionOfIndex.Y += 101; + } + float num1 = (float) (((double) NoiseHelper.GetStaticNoise(gridPositionOfIndex.Y) * 5.0 + (double) time * 0.400000005960464) % 5.0); + float num2 = 1f; + if ((double) num1 > 1.0) + { + num2 = 1f - MathHelper.Clamp((float) (((double) num1 - 0.400000005960464 - 1.0) / 0.400000005960464), 0.0f, 1f); + num1 = 1f; + } + float num3 = num1 - canvasPositionOfIndex.X / 5f; + Vector4 vector4 = this._backgroundColor; + if ((double) num3 > 0.0) + { + float num4 = 1f; + if ((double) num3 < 0.200000002980232) + num4 = num3 / 0.2f; + vector4 = (gridPositionOfIndex.X + 7 * gridPositionOfIndex.Y) % 5 != 0 ? Vector4.Lerp(this._backgroundColor, this._vineColor, num4 * num2) : Vector4.Lerp(this._backgroundColor, this._bulbColor, num4 * num2); + } + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/QueenBeeShader.cs b/GameContent/RGB/QueenBeeShader.cs new file mode 100644 index 0000000..741af7f --- /dev/null +++ b/GameContent/RGB/QueenBeeShader.cs @@ -0,0 +1,54 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.QueenBeeShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class QueenBeeShader : ChromaShader + { + private readonly Vector4 _primaryColor; + private readonly Vector4 _secondaryColor; + + public QueenBeeShader(Color primaryColor, Color secondaryColor) + { + this._primaryColor = primaryColor.ToVector4(); + this._secondaryColor = secondaryColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4 = Vector4.Lerp(this._primaryColor, this._secondaryColor, (float) (Math.Sin((double) time * 2.0 + (double) canvasPositionOfIndex.X * 10.0) * 0.5 + 0.5)); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + time *= 0.5f; + for (int index = 0; index < fragment.Count; ++index) + { + Vector4 vector4 = Vector4.Lerp(this._primaryColor, this._secondaryColor, MathHelper.Clamp((float) Math.Sin((double) fragment.GetCanvasPositionOfIndex(index).X * 5.0 - 4.0 * (double) time) * 1.5f, 0.0f, 1f)); + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/QueenSlimeShader.cs b/GameContent/RGB/QueenSlimeShader.cs new file mode 100644 index 0000000..e6c0815 --- /dev/null +++ b/GameContent/RGB/QueenSlimeShader.cs @@ -0,0 +1,53 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.QueenSlimeShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class QueenSlimeShader : ChromaShader + { + private readonly Vector4 _slimeColor; + private readonly Vector4 _debrisColor; + + public QueenSlimeShader(Color slimeColor, Color debrisColor) + { + this._slimeColor = slimeColor.ToVector4(); + this._debrisColor = debrisColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector4 vector4 = Vector4.Lerp(this._slimeColor, this._debrisColor, Math.Max(0.0f, (float) (1.0 - (double) NoiseHelper.GetDynamicNoise(fragment.GetCanvasPositionOfIndex(index), time * 0.25f) * 2.0))); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + Vector2 vector2 = new Vector2(1.6f, 0.5f); + for (int index = 0; index < fragment.Count; ++index) + { + Vector4 vector4 = Vector4.Lerp(this._slimeColor, this._debrisColor, (float) Math.Sqrt((double) Math.Max(0.0f, (float) (1.0 - (double) NoiseHelper.GetStaticNoise(fragment.GetCanvasPositionOfIndex(index) * 0.3f + new Vector2(0.0f, time * 0.1f)) * 3.0)))); + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/RainShader.cs b/GameContent/RGB/RainShader.cs new file mode 100644 index 0000000..cfd21c5 --- /dev/null +++ b/GameContent/RGB/RainShader.cs @@ -0,0 +1,45 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.RainShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class RainShader : ChromaShader + { + private bool _inBloodMoon; + + public virtual void Update(float elapsedTime) => this._inBloodMoon = Main.bloodMoon; + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + Vector4 vector4_1 = !this._inBloodMoon ? new Vector4(0.0f, 0.0f, 1f, 1f) : new Vector4(1f, 0.0f, 0.0f, 1f); + Vector4 vector4_2 = new Vector4(0.0f, 0.0f, 0.0f, 0.75f); + for (int index = 0; index < fragment.Count; ++index) + { + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index); + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + float num = (float) (((double) NoiseHelper.GetStaticNoise(gridPositionOfIndex.X) * 10.0 + (double) time) % 10.0) - canvasPositionOfIndex.Y; + Vector4 vector4_3 = vector4_2; + if ((double) num > 0.0) + { + float amount = Math.Max(0.0f, 1.2f - num); + if ((double) num < 0.200000002980232) + amount = num * 5f; + vector4_3 = Vector4.Lerp(vector4_3, vector4_1, amount); + } + fragment.SetColor(index, vector4_3); + } + } + } +} diff --git a/GameContent/RGB/SandstormShader.cs b/GameContent/RGB/SandstormShader.cs new file mode 100644 index 0000000..3a38715 --- /dev/null +++ b/GameContent/RGB/SandstormShader.cs @@ -0,0 +1,33 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.SandstormShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; + +namespace Terraria.GameContent.RGB +{ + public class SandstormShader : ChromaShader + { + private readonly Vector4 _backColor = new Vector4(0.2f, 0.0f, 0.0f, 1f); + private readonly Vector4 _frontColor = new Vector4(1f, 0.5f, 0.0f, 1f); + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + if (quality == null) + time *= 0.25f; + for (int index = 0; index < fragment.Count; ++index) + { + Vector4 vector4 = Vector4.Lerp(this._backColor, this._frontColor, NoiseHelper.GetStaticNoise(fragment.GetCanvasPositionOfIndex(index) * 0.3f + new Vector2(time, -time) * 0.5f)); + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/SkullShader.cs b/GameContent/RGB/SkullShader.cs new file mode 100644 index 0000000..fa801a1 --- /dev/null +++ b/GameContent/RGB/SkullShader.cs @@ -0,0 +1,70 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.SkullShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class SkullShader : ChromaShader + { + private readonly Vector4 _skullColor; + private readonly Vector4 _bloodDark; + private readonly Vector4 _bloodLight; + private readonly Vector4 _backgroundColor = Color.Black.ToVector4(); + + public SkullShader(Color skullColor, Color bloodDark, Color bloodLight) + { + this._skullColor = skullColor.ToVector4(); + this._bloodDark = bloodDark.ToVector4(); + this._bloodLight = bloodLight.ToVector4(); + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4 = Vector4.Lerp(this._skullColor, this._bloodLight, (float) (Math.Sin((double) time * 2.0 + (double) canvasPositionOfIndex.X * 2.0) * 0.5 + 0.5)); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index); + Vector4 vector4_1 = this._backgroundColor; + float num = (float) (((double) NoiseHelper.GetStaticNoise(gridPositionOfIndex.X) * 10.0 + (double) time * 0.75) % 10.0 + (double) canvasPositionOfIndex.Y - 1.0); + if ((double) num > 0.0) + { + float amount = Math.Max(0.0f, 1.2f - num); + if ((double) num < 0.200000002980232) + amount = num * 5f; + vector4_1 = Vector4.Lerp(vector4_1, this._skullColor, amount); + } + float staticNoise = NoiseHelper.GetStaticNoise(canvasPositionOfIndex * 0.5f + new Vector2(12.5f, time * 0.2f)); + float amount1 = MathHelper.Clamp(Math.Max(0.0f, (float) (1.0 - (double) staticNoise * (double) staticNoise * 4.0 * (double) staticNoise * (1.0 - (double) canvasPositionOfIndex.Y * (double) canvasPositionOfIndex.Y))) * canvasPositionOfIndex.Y * canvasPositionOfIndex.Y, 0.0f, 1f); + Vector4 vector4_2 = Vector4.Lerp(this._bloodDark, this._bloodLight, amount1); + Vector4 vector4_3 = Vector4.Lerp(vector4_1, vector4_2, amount1); + fragment.SetColor(index, vector4_3); + } + } + } +} diff --git a/GameContent/RGB/SkyShader.cs b/GameContent/RGB/SkyShader.cs new file mode 100644 index 0000000..43ea118 --- /dev/null +++ b/GameContent/RGB/SkyShader.cs @@ -0,0 +1,60 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.SkyShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class SkyShader : ChromaShader + { + private readonly Vector4 _baseSkyColor; + private readonly Vector4 _baseSpaceColor; + private Vector4 _processedSkyColor; + private Vector4 _processedCloudColor; + private float _backgroundTransition; + private float _starVisibility; + + public SkyShader(Color skyColor, Color spaceColor) + { + this._baseSkyColor = skyColor.ToVector4(); + this._baseSpaceColor = spaceColor.ToVector4(); + } + + public virtual void Update(float elapsedTime) + { + this._backgroundTransition = MathHelper.Clamp((float) (((double) (Main.player[Main.myPlayer].position.Y / 16f) - Main.worldSurface * 0.25) / (Main.worldSurface * 0.100000001490116)), 0.0f, 1f); + this._processedSkyColor = this._baseSkyColor * (Main.ColorOfTheSkies.ToVector4() * 0.75f + Vector4.One * 0.25f); + this._processedCloudColor = Main.ColorOfTheSkies.ToVector4() * 0.75f + Vector4.One * 0.25f; + if (Main.dayTime) + { + float num = (float) (Main.time / 54000.0); + this._starVisibility = (double) num >= 0.25 ? ((double) num <= 0.75 ? 0.0f : (float) (((double) num - 0.75) / 0.25)) : (float) (1.0 - (double) num / 0.25); + } + else + this._starVisibility = 1f; + this._starVisibility = Math.Max(1f - this._backgroundTransition, this._starVisibility); + } + + [RgbProcessor] + private void ProcessAnyDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index); + Vector2 vector2 = new Vector2(0.1f, 0.5f); + Vector4 vector4 = Vector4.Lerp(Vector4.Lerp(this._baseSpaceColor, Vector4.Lerp(this._processedSkyColor, this._processedCloudColor, (float) Math.Sqrt((double) Math.Max(0.0f, (float) (1.0 - 2.0 * (double) NoiseHelper.GetDynamicNoise(canvasPositionOfIndex * vector2 + new Vector2(time * 0.05f, 0.0f), time / 20f))))), this._backgroundTransition), Vector4.One, Math.Max(0.0f, (float) (1.0 - (double) NoiseHelper.GetDynamicNoise(gridPositionOfIndex.X, gridPositionOfIndex.Y, time / 60f) * 20.0)) * 0.98f * this._starVisibility); + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/SlimeRainShader.cs b/GameContent/RGB/SlimeRainShader.cs new file mode 100644 index 0000000..3359402 --- /dev/null +++ b/GameContent/RGB/SlimeRainShader.cs @@ -0,0 +1,48 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.SlimeRainShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class SlimeRainShader : ChromaShader + { + private static readonly Vector4[] _colors = new Vector4[3] + { + Color.Blue.ToVector4(), + Color.Green.ToVector4(), + Color.Purple.ToVector4() + }; + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + Vector4 vector4_1 = new Vector4(0.0f, 0.0f, 0.0f, 0.75f); + for (int index1 = 0; index1 < fragment.Count; ++index1) + { + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index1); + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index1); + float num = (float) (((double) NoiseHelper.GetStaticNoise(gridPositionOfIndex.X) * 7.0 + (double) time * 0.400000005960464) % 7.0) - canvasPositionOfIndex.Y; + Vector4 vector4_2 = vector4_1; + if ((double) num > 0.0) + { + float amount = Math.Max(0.0f, 1.2f - num); + if ((double) num < 0.400000005960464) + amount = num / 0.4f; + int index2 = (gridPositionOfIndex.X % SlimeRainShader._colors.Length + SlimeRainShader._colors.Length) % SlimeRainShader._colors.Length; + vector4_2 = Vector4.Lerp(vector4_2, SlimeRainShader._colors[index2], amount); + } + fragment.SetColor(index1, vector4_2); + } + } + } +} diff --git a/GameContent/RGB/SurfaceBiomeShader.cs b/GameContent/RGB/SurfaceBiomeShader.cs new file mode 100644 index 0000000..2f9eb15 --- /dev/null +++ b/GameContent/RGB/SurfaceBiomeShader.cs @@ -0,0 +1,83 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.SurfaceBiomeShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class SurfaceBiomeShader : ChromaShader + { + private readonly Vector4 _primaryColor; + private readonly Vector4 _secondaryColor; + private Vector4 _surfaceColor; + private float _starVisibility; + + public SurfaceBiomeShader(Color primaryColor, Color secondaryColor) + { + this._primaryColor = primaryColor.ToVector4(); + this._secondaryColor = secondaryColor.ToVector4(); + } + + public virtual void Update(float elapsedTime) + { + this._surfaceColor = Main.ColorOfTheSkies.ToVector4() * 0.75f + Vector4.One * 0.25f; + if (Main.dayTime) + { + float num = (float) (Main.time / 54000.0); + if ((double) num < 0.25) + { + this._starVisibility = (float) (1.0 - (double) num / 0.25); + } + else + { + if ((double) num <= 0.75) + return; + this._starVisibility = (float) (((double) num - 0.75) / 0.25); + } + } + else + this._starVisibility = 1f; + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + Vector4 vector4_1 = this._primaryColor * this._surfaceColor; + Vector4 vector4_2 = this._secondaryColor * this._surfaceColor; + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4_3 = Vector4.Lerp(vector4_1, vector4_2, (float) (Math.Sin((double) time * 0.5 + (double) canvasPositionOfIndex.X) * 0.5 + 0.5)); + fragment.SetColor(index, vector4_3); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + Vector4 vector4_1 = this._primaryColor * this._surfaceColor; + Vector4 vector4_2 = this._secondaryColor * this._surfaceColor; + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index); + float amount = (float) (Math.Sin((double) canvasPositionOfIndex.X * 1.5 + (double) canvasPositionOfIndex.Y + (double) time) * 0.5 + 0.5); + Vector4 vector4_3 = Vector4.Max(Vector4.Lerp(vector4_1, vector4_2, amount), new Vector4(Math.Max(0.0f, (float) (1.0 - (double) NoiseHelper.GetDynamicNoise(gridPositionOfIndex.X, gridPositionOfIndex.Y, time / 60f) * 20.0)) * (1f - this._surfaceColor.X) * this._starVisibility)); + fragment.SetColor(index, vector4_3); + } + } + } +} diff --git a/GameContent/RGB/TempleShader.cs b/GameContent/RGB/TempleShader.cs new file mode 100644 index 0000000..b668e18 --- /dev/null +++ b/GameContent/RGB/TempleShader.cs @@ -0,0 +1,42 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.TempleShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class TempleShader : ChromaShader + { + private readonly Vector4 _backgroundColor = new Vector4(0.05f, 0.025f, 0.0f, 1f); + private readonly Vector4 _glowColor = Color.Orange.ToVector4(); + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index); + Vector4 vector4 = this._backgroundColor; + float num = (float) (((double) NoiseHelper.GetStaticNoise(gridPositionOfIndex.Y * 7) * 10.0 + (double) time) % 10.0 - ((double) canvasPositionOfIndex.X + 2.0)); + if ((double) num > 0.0) + { + float amount = Math.Max(0.0f, 1.2f - num); + if ((double) num < 0.200000002980232) + amount = num * 5f; + vector4 = Vector4.Lerp(vector4, this._glowColor, amount); + } + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/TwinsShader.cs b/GameContent/RGB/TwinsShader.cs new file mode 100644 index 0000000..673642c --- /dev/null +++ b/GameContent/RGB/TwinsShader.cs @@ -0,0 +1,123 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.TwinsShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class TwinsShader : ChromaShader + { + private readonly Vector4 _eyeColor; + private readonly Vector4 _veinColor; + private readonly Vector4 _laserColor; + private readonly Vector4 _mouthColor; + private readonly Vector4 _flameColor; + private readonly Vector4 _backgroundColor; + private static readonly Vector4[] _irisColors = new Vector4[2] + { + Color.Green.ToVector4(), + Color.Blue.ToVector4() + }; + + public TwinsShader( + Color eyeColor, + Color veinColor, + Color laserColor, + Color mouthColor, + Color flameColor, + Color backgroundColor) + { + this._eyeColor = eyeColor.ToVector4(); + this._veinColor = veinColor.ToVector4(); + this._laserColor = laserColor.ToVector4(); + this._mouthColor = mouthColor.ToVector4(); + this._flameColor = flameColor.ToVector4(); + this._backgroundColor = backgroundColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index); + Vector4 vector4_1 = Vector4.Lerp(this._veinColor, this._eyeColor, (float) (Math.Sin((double) time + (double) canvasPositionOfIndex.X * 4.0) * 0.5 + 0.5)); + float amount = Math.Max(0.0f, (float) (1.0 - (double) NoiseHelper.GetDynamicNoise(gridPositionOfIndex.X, gridPositionOfIndex.Y, time / 25f) * 5.0)); + Vector4 vector4_2 = Vector4.Lerp(vector4_1, TwinsShader._irisColors[((gridPositionOfIndex.Y * 47 + gridPositionOfIndex.X) % TwinsShader._irisColors.Length + TwinsShader._irisColors.Length) % TwinsShader._irisColors.Length], amount); + fragment.SetColor(index, vector4_2); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + if (device.Type != null && device.Type != 6) + { + this.ProcessLowDetail(device, fragment, quality, time); + } + else + { + bool flag = true; + float num1 = (float) ((double) time * 0.100000001490116 % 2.0); + if ((double) num1 > 1.0) + { + num1 = 2f - num1; + flag = false; + } + Vector2 vector2_1 = new Vector2((float) ((double) num1 * 7.0 - 3.5), 0.0f) + fragment.CanvasCenter; + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index); + Vector4 vector4_1 = this._backgroundColor; + Vector2 vector2_2 = canvasPositionOfIndex - vector2_1; + float num2 = vector2_2.Length(); + if ((double) num2 < 0.5) + { + float amount1 = 1f - MathHelper.Clamp((float) (((double) num2 - 0.5 + 0.200000002980232) / 0.200000002980232), 0.0f, 1f); + float amount2 = MathHelper.Clamp((float) (((double) vector2_2.X + 0.5 - 0.200000002980232) / 0.600000023841858), 0.0f, 1f); + if (flag) + amount2 = 1f - amount2; + Vector4 vector4_2 = Vector4.Lerp(this._eyeColor, this._veinColor, amount2); + float num3 = (float) Math.Atan2((double) vector2_2.Y, (double) vector2_2.X); + if (!flag && 3.14159274101257 - (double) Math.Abs(num3) < 0.600000023841858) + vector4_2 = this._mouthColor; + vector4_1 = Vector4.Lerp(vector4_1, vector4_2, amount1); + } + if (flag && gridPositionOfIndex.Y == 3 && (double) canvasPositionOfIndex.X > (double) vector2_1.X) + { + float num4 = (float) (1.0 - (double) Math.Abs((float) ((double) canvasPositionOfIndex.X - (double) vector2_1.X * 2.0 - 0.5)) / 0.5); + vector4_1 = Vector4.Lerp(vector4_1, this._laserColor, MathHelper.Clamp(num4, 0.0f, 1f)); + } + else if (!flag) + { + Vector2 vector2_3 = canvasPositionOfIndex - (vector2_1 - new Vector2(1.2f, 0.0f)); + vector2_3.Y *= 3.5f; + float num5 = vector2_3.Length(); + if ((double) num5 < 0.699999988079071) + { + float dynamicNoise = NoiseHelper.GetDynamicNoise(canvasPositionOfIndex, time); + float amount = dynamicNoise * dynamicNoise * dynamicNoise * (1f - MathHelper.Clamp((float) (((double) num5 - 0.699999988079071 + 0.300000011920929) / 0.300000011920929), 0.0f, 1f)); + vector4_1 = Vector4.Lerp(vector4_1, this._flameColor, amount); + } + } + fragment.SetColor(index, vector4_1); + } + } + } + } +} diff --git a/GameContent/RGB/UndergroundCorruptionShader.cs b/GameContent/RGB/UndergroundCorruptionShader.cs new file mode 100644 index 0000000..500de35 --- /dev/null +++ b/GameContent/RGB/UndergroundCorruptionShader.cs @@ -0,0 +1,53 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.UndergroundCorruptionShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class UndergroundCorruptionShader : ChromaShader + { + private readonly Vector4 _corruptionColor = new Vector4(Color.Purple.ToVector3() * 0.2f, 1f); + private readonly Vector4 _flameColor = Color.Green.ToVector4(); + private readonly Vector4 _flameTipColor = Color.Yellow.ToVector4(); + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + Vector4 vector4_1 = Vector4.Lerp(this._flameColor, this._flameTipColor, 0.25f); + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4_2 = Vector4.Lerp(this._corruptionColor, vector4_1, (float) (Math.Sin((double) time + (double) canvasPositionOfIndex.X) * 0.5 + 0.5)); + fragment.SetColor(index, vector4_2); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + fragment.GetGridPositionOfIndex(index); + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + float dynamicNoise = NoiseHelper.GetDynamicNoise(canvasPositionOfIndex * 0.3f + new Vector2(12.5f, time * 0.05f), time * 0.1f); + float amount = MathHelper.Clamp(Math.Max(0.0f, (float) (1.0 - (double) dynamicNoise * (double) dynamicNoise * 4.0 * (1.20000004768372 - (double) canvasPositionOfIndex.Y))) * canvasPositionOfIndex.Y, 0.0f, 1f); + Vector4 vector4 = Vector4.Lerp(this._corruptionColor, Vector4.Lerp(this._flameColor, this._flameTipColor, amount), amount); + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/UndergroundHallowShader.cs b/GameContent/RGB/UndergroundHallowShader.cs new file mode 100644 index 0000000..d2e2cf2 --- /dev/null +++ b/GameContent/RGB/UndergroundHallowShader.cs @@ -0,0 +1,53 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.UndergroundHallowShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class UndergroundHallowShader : ChromaShader + { + private readonly Vector4 _baseColor = new Color(0.05f, 0.05f, 0.05f).ToVector4(); + private readonly Vector4 _pinkCrystalColor = Color.HotPink.ToVector4(); + private readonly Vector4 _blueCrystalColor = Color.DeepSkyBlue.ToVector4(); + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4 = Vector4.Lerp(this._pinkCrystalColor, this._blueCrystalColor, (float) (Math.Sin((double) time * 2.0 + (double) canvasPositionOfIndex.X) * 0.5 + 0.5)); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + fragment.GetGridPositionOfIndex(index); + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 baseColor = this._baseColor; + float amount1 = Math.Max(0.0f, (float) (1.0 - 2.5 * (double) NoiseHelper.GetDynamicNoise(canvasPositionOfIndex * 0.4f, time * 0.05f))); + float amount2 = Math.Max(0.0f, (float) (1.0 - 2.5 * (double) NoiseHelper.GetDynamicNoise(canvasPositionOfIndex * 0.4f + new Vector2(0.05f, 0.0f), time * 0.05f))); + Vector4 vector4 = (double) amount1 <= (double) amount2 ? Vector4.Lerp(baseColor, this._blueCrystalColor, amount2) : Vector4.Lerp(baseColor, this._pinkCrystalColor, amount1); + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/UndergroundMushroomShader.cs b/GameContent/RGB/UndergroundMushroomShader.cs new file mode 100644 index 0000000..7a11c0d --- /dev/null +++ b/GameContent/RGB/UndergroundMushroomShader.cs @@ -0,0 +1,60 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.UndergroundMushroomShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class UndergroundMushroomShader : ChromaShader + { + private readonly Vector4 _baseColor = new Color(10, 10, 10).ToVector4(); + private readonly Vector4 _edgeGlowColor = new Color(0, 0, (int) byte.MaxValue).ToVector4(); + private readonly Vector4 _sporeColor = new Color((int) byte.MaxValue, 230, 150).ToVector4(); + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4 = Vector4.Lerp(this._edgeGlowColor, this._sporeColor, (float) (Math.Sin((double) time * 0.5 + (double) canvasPositionOfIndex.X) * 0.5 + 0.5)); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index); + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4_1 = this._baseColor; + float num = (float) ((((double) NoiseHelper.GetStaticNoise(gridPositionOfIndex.X) * 10.0 + (double) time * 0.200000002980232) % 10.0 - (1.0 - (double) canvasPositionOfIndex.Y)) * 2.0); + if ((double) num > 0.0) + { + float amount = Math.Max(0.0f, 1.5f - num); + if ((double) num < 0.5) + amount = num * 2f; + vector4_1 = Vector4.Lerp(vector4_1, this._sporeColor, amount); + } + float amount1 = Math.Max(0.0f, (float) (1.0 - (double) NoiseHelper.GetStaticNoise(canvasPositionOfIndex * 0.3f + new Vector2(0.0f, time * 0.1f)) * (1.0 + (1.0 - (double) canvasPositionOfIndex.Y) * 4.0))) * Math.Max(0.0f, (float) (((double) canvasPositionOfIndex.Y - 0.300000011920929) / 0.699999988079071)); + Vector4 vector4_2 = Vector4.Lerp(vector4_1, this._edgeGlowColor, amount1); + fragment.SetColor(index, vector4_2); + } + } + } +} diff --git a/GameContent/RGB/UnderworldShader.cs b/GameContent/RGB/UnderworldShader.cs new file mode 100644 index 0000000..7c34e6d --- /dev/null +++ b/GameContent/RGB/UnderworldShader.cs @@ -0,0 +1,55 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.UnderworldShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class UnderworldShader : ChromaShader + { + private readonly Vector4 _backColor; + private readonly Vector4 _frontColor; + private readonly float _speed; + + public UnderworldShader(Color backColor, Color frontColor, float speed) + { + this._backColor = backColor.ToVector4(); + this._frontColor = frontColor.ToVector4(); + this._speed = speed; + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4 = Vector4.Lerp(this._backColor, this._frontColor, (float) (Math.Sin((double) time * (double) this._speed + (double) canvasPositionOfIndex.X) * 0.5 + 0.5)); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector4 vector4 = Vector4.Lerp(this._backColor, this._frontColor, NoiseHelper.GetDynamicNoise(fragment.GetCanvasPositionOfIndex(index) * 0.5f, (float) ((double) time * (double) this._speed / 3.0))); + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/VineShader.cs b/GameContent/RGB/VineShader.cs new file mode 100644 index 0000000..31ff2e2 --- /dev/null +++ b/GameContent/RGB/VineShader.cs @@ -0,0 +1,62 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.VineShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; + +namespace Terraria.GameContent.RGB +{ + public class VineShader : ChromaShader + { + private readonly Vector4 _backgroundColor = new Color(46, 17, 6).ToVector4(); + private readonly Vector4 _vineColor = Color.Green.ToVector4(); + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + fragment.GetCanvasPositionOfIndex(index); + fragment.SetColor(index, this._backgroundColor); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Point gridPositionOfIndex = fragment.GetGridPositionOfIndex(index); + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + float num1 = (float) (((double) NoiseHelper.GetStaticNoise(gridPositionOfIndex.X) * 10.0 + (double) time * 0.400000005960464) % 10.0); + float num2 = 1f; + if ((double) num1 > 1.0) + { + num2 = 1f - MathHelper.Clamp((float) (((double) num1 - 0.400000005960464 - 1.0) / 0.400000005960464), 0.0f, 1f); + num1 = 1f; + } + float num3 = num1 - canvasPositionOfIndex.Y / 1f; + Vector4 vector4 = this._backgroundColor; + if ((double) num3 > 0.0) + { + float num4 = 1f; + if ((double) num3 < 0.200000002980232) + num4 = num3 / 0.2f; + vector4 = Vector4.Lerp(this._backgroundColor, this._vineColor, num4 * num2); + } + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/VirtualKeyboard.cs b/GameContent/RGB/VirtualKeyboard.cs new file mode 100644 index 0000000..fd126e3 --- /dev/null +++ b/GameContent/RGB/VirtualKeyboard.cs @@ -0,0 +1,455 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.VirtualKeyboard +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Input; +using ReLogic.Peripherals.RGB; +using System.Collections.Generic; + +namespace Terraria.GameContent.RGB +{ + public class VirtualKeyboard : RgbKeyboard + { + private Dictionary _keyCodeMap = new Dictionary(); + + private VirtualKeyboard(Fragment fragment, Keys[] keyMap) + : base((RgbDeviceVendor) 4, fragment, new DeviceColorProfile()) + { + for (int index = 0; index < keyMap.Length; ++index) + { + if (keyMap[index] != Keys.None) + this._keyCodeMap.Add(keyMap[index], index); + } + } + + public static VirtualKeyboard Create() + { + Point[] pointArray = new Point[133] + { + new Point(2, 6), + new Point(7, 0), + new Point(1, 4), + new Point(2, 4), + new Point(0, 5), + new Point(1, 5), + new Point(2, 5), + new Point(0, 6), + new Point(1, 6), + new Point(1, 3), + new Point(2, 3), + new Point(0, 4), + new Point(4, 0), + new Point(5, 0), + new Point(6, 0), + new Point(19, 3), + new Point(20, 3), + new Point(21, 3), + new Point(17, 5), + new Point(17, 6), + new Point(20, 5), + new Point(19, 6), + new Point(20, 6), + new Point(16, 3), + new Point(17, 3), + new Point(17, 4), + new Point(16, 2), + new Point(17, 2), + new Point(19, 0), + new Point(18, 1), + new Point(19, 1), + new Point(20, 1), + new Point(21, 1), + new Point(19, 2), + new Point(20, 2), + new Point(21, 2), + new Point(10, 6), + new Point(14, 6), + new Point(15, 6), + new Point(16, 6), + new Point(24, 6), + new Point(0, 1), + new Point(1, 1), + new Point(2, 1), + new Point(0, 2), + new Point(1, 2), + new Point(2, 2), + new Point(0, 3), + new Point(22, 4), + new Point(23, 4), + new Point(24, 4), + new Point(22, 5), + new Point(23, 5), + new Point(24, 5), + new Point(23, 6), + new Point(23, 2), + new Point(24, 2), + new Point(25, 2), + new Point(25, 3), + new Point(25, 5), + new Point(22, 3), + new Point(23, 3), + new Point(24, 3), + new Point(21, 6), + new Point(20, 0), + new Point(23, 0), + new Point(22, 1), + new Point(23, 1), + new Point(24, 1), + new Point(25, 1), + new Point(22, 2), + new Point(15, 2), + new Point(4, 3), + new Point(5, 3), + new Point(6, 3), + new Point(7, 3), + new Point(8, 3), + new Point(9, 3), + new Point(10, 3), + new Point(7, 2), + new Point(8, 2), + new Point(9, 2), + new Point(10, 2), + new Point(11, 2), + new Point(12, 2), + new Point(13, 2), + new Point(14, 2), + new Point(12, 1), + new Point(13, 1), + new Point(15, 1), + new Point(16, 1), + new Point(17, 1), + new Point(4, 2), + new Point(5, 2), + new Point(6, 2), + new Point(4, 1), + new Point(5, 1), + new Point(6, 1), + new Point(7, 1), + new Point(8, 1), + new Point(10, 1), + new Point(11, 1), + new Point(11, 5), + new Point(12, 5), + new Point(13, 5), + new Point(14, 5), + new Point(15, 5), + new Point(4, 6), + new Point(5, 6), + new Point(6, 6), + new Point(15, 4), + new Point(4, 5), + new Point(6, 5), + new Point(7, 5), + new Point(8, 5), + new Point(9, 5), + new Point(10, 5), + new Point(7, 4), + new Point(8, 4), + new Point(9, 4), + new Point(10, 4), + new Point(11, 4), + new Point(12, 4), + new Point(13, 4), + new Point(14, 4), + new Point(11, 3), + new Point(12, 3), + new Point(13, 3), + new Point(14, 3), + new Point(15, 3), + new Point(4, 4), + new Point(5, 4), + new Point(6, 4) + }; + Vector2[] vector2Array = new Vector2[133] + { + new Vector2(0.4365079f, 1f), + new Vector2(1.123016f, 0.007936508f), + new Vector2(0.2857143f, 0.6666667f), + new Vector2(0.4365079f, 0.6666667f), + new Vector2(0.1349206f, 0.8571429f), + new Vector2(0.2857143f, 0.8571429f), + new Vector2(0.4365079f, 0.8571429f), + new Vector2(0.1349206f, 1f), + new Vector2(0.2857143f, 1f), + new Vector2(0.2857143f, 0.515873f), + new Vector2(0.4365079f, 0.515873f), + new Vector2(0.1349206f, 0.6666667f), + new Vector2(0.6428571f, 0.007936508f), + new Vector2(0.8015873f, 0.007936508f), + new Vector2(0.9603174f, 0.007936508f), + new Vector2(3.06746f, 0.515873f), + new Vector2(3.226191f, 0.515873f), + new Vector2(3.384921f, 0.515873f), + new Vector2(2.730159f, 0.8412699f), + new Vector2(2.829365f, 0.9920635f), + new Vector2(3.226191f, 0.8412699f), + new Vector2(3.071429f, 0.9920635f), + new Vector2(3.226191f, 0.9920635f), + new Vector2(2.630952f, 0.515873f), + new Vector2(2.829365f, 0.515873f), + new Vector2(2.769841f, 0.6825397f), + new Vector2(2.551587f, 0.3650794f), + new Vector2(2.789683f, 0.3650794f), + new Vector2(3.075397f, 0.0f), + new Vector2(2.869048f, 0.1904762f), + new Vector2(3.06746f, 0.1904762f), + new Vector2(3.226191f, 0.1904762f), + new Vector2(3.384921f, 0.1904762f), + new Vector2(3.06746f, 0.3650794f), + new Vector2(3.226191f, 0.3650794f), + new Vector2(3.384921f, 0.3650794f), + new Vector2(1.674603f, 0.9920635f), + new Vector2(2.289683f, 0.9920635f), + new Vector2(2.472222f, 0.9920635f), + new Vector2(2.630952f, 0.9920635f), + new Vector2(3.904762f, 0.9920635f), + new Vector2(0.1349206f, 0.1825397f), + new Vector2(0.2857143f, 0.1825397f), + new Vector2(0.4365079f, 0.1825397f), + new Vector2(0.1349206f, 0.3333333f), + new Vector2(0.2857143f, 0.3333333f), + new Vector2(0.4365079f, 0.3333333f), + new Vector2(0.1349206f, 0.515873f), + new Vector2(3.59127f, 0.6825397f), + new Vector2(3.75f, 0.6825397f), + new Vector2(3.90873f, 0.6825397f), + new Vector2(3.59127f, 0.8412699f), + new Vector2(3.75f, 0.8412699f), + new Vector2(3.90873f, 0.8412699f), + new Vector2(3.670635f, 0.9920635f), + new Vector2(3.75f, 0.3650794f), + new Vector2(3.90873f, 0.3650794f), + new Vector2(4.063492f, 0.3650794f), + new Vector2(4.063492f, 0.515873f), + new Vector2(4.063492f, 0.8412699f), + new Vector2(3.59127f, 0.515873f), + new Vector2(3.75f, 0.515873f), + new Vector2(3.90873f, 0.515873f), + new Vector2(3.384921f, 0.9920635f), + new Vector2(3.234127f, 0.0f), + new Vector2(3.75f, 0.0f), + new Vector2(3.595238f, 0.1904762f), + new Vector2(3.75f, 0.1904762f), + new Vector2(3.900794f, 0.1904762f), + new Vector2(4.059524f, 0.1904762f), + new Vector2(3.59127f, 0.3650794f), + new Vector2(2.392857f, 0.3650794f), + new Vector2(0.6785714f, 0.515873f), + new Vector2(0.8849207f, 0.515873f), + new Vector2(1.043651f, 0.515873f), + new Vector2(1.194444f, 0.515873f), + new Vector2(1.361111f, 0.515873f), + new Vector2(1.519841f, 0.515873f), + new Vector2(1.678571f, 0.515873f), + new Vector2(1.123016f, 0.3650794f), + new Vector2(1.281746f, 0.3650794f), + new Vector2(1.440476f, 0.3650794f), + new Vector2(1.599206f, 0.3650794f), + new Vector2(1.757936f, 0.3650794f), + new Vector2(1.916667f, 0.3650794f), + new Vector2(2.075397f, 0.3650794f), + new Vector2(2.234127f, 0.3650794f), + new Vector2(1.964286f, 0.1904762f), + new Vector2(2.130952f, 0.1904762f), + new Vector2(2.392857f, 0.1904762f), + new Vector2(2.551587f, 0.1904762f), + new Vector2(2.710317f, 0.1904762f), + new Vector2(0.6388889f, 0.3650794f), + new Vector2(0.8055556f, 0.3650794f), + new Vector2(0.9642857f, 0.3650794f), + new Vector2(0.6388889f, 0.1904762f), + new Vector2(0.9087301f, 0.1904762f), + new Vector2(1.06746f, 0.1904762f), + new Vector2(1.22619f, 0.1904762f), + new Vector2(1.384921f, 0.1904762f), + new Vector2(1.654762f, 0.1904762f), + new Vector2(1.805556f, 0.1904762f), + new Vector2(1.797619f, 0.8412699f), + new Vector2(1.956349f, 0.8412699f), + new Vector2(2.115079f, 0.8412699f), + new Vector2(2.273809f, 0.8412699f), + new Vector2(2.43254f, 0.8412699f), + new Vector2(0.6785714f, 0.9920635f), + new Vector2(0.8849207f, 0.9920635f), + new Vector2(1.063492f, 0.9920635f), + new Vector2(2.511905f, 0.6825397f), + new Vector2(0.7380952f, 0.8412699f), + new Vector2(1.003968f, 0.8412699f), + new Vector2(1.162698f, 0.8412699f), + new Vector2(1.321429f, 0.8412699f), + new Vector2(1.480159f, 0.8412699f), + new Vector2(1.638889f, 0.8412699f), + new Vector2(1.242064f, 0.6825397f), + new Vector2(1.400794f, 0.6825397f), + new Vector2(1.559524f, 0.6825397f), + new Vector2(1.718254f, 0.6825397f), + new Vector2(1.876984f, 0.6825397f), + new Vector2(2.035714f, 0.6825397f), + new Vector2(2.194444f, 0.6825397f), + new Vector2(2.353175f, 0.6825397f), + new Vector2(1.837302f, 0.515873f), + new Vector2(1.996032f, 0.515873f), + new Vector2(2.154762f, 0.515873f), + new Vector2(2.313492f, 0.515873f), + new Vector2(2.472222f, 0.515873f), + new Vector2(0.6984127f, 0.6825397f), + new Vector2(0.9166667f, 0.6825397f), + new Vector2(1.083333f, 0.6825397f) + }; + Keys[] keyMap = new Keys[133] + { + Keys.None, + Keys.None, + Keys.None, + Keys.None, + Keys.None, + Keys.None, + Keys.None, + Keys.None, + Keys.None, + Keys.None, + Keys.None, + Keys.None, + Keys.None, + Keys.None, + Keys.None, + Keys.Delete, + Keys.End, + Keys.PageDown, + Keys.RightShift, + Keys.RightControl, + Keys.Up, + Keys.Left, + Keys.Down, + Keys.OemCloseBrackets, + Keys.OemBackslash, + Keys.Enter, + Keys.OemPlus, + Keys.Back, + Keys.None, + Keys.F12, + Keys.PrintScreen, + Keys.Scroll, + Keys.Pause, + Keys.Insert, + Keys.Home, + Keys.PageUp, + Keys.Space, + Keys.RightAlt, + Keys.None, + Keys.None, + Keys.Decimal, + Keys.None, + Keys.None, + Keys.None, + Keys.None, + Keys.None, + Keys.None, + Keys.None, + Keys.NumPad4, + Keys.NumPad5, + Keys.NumPad6, + Keys.NumPad1, + Keys.NumPad2, + Keys.NumPad3, + Keys.NumPad0, + Keys.Divide, + Keys.Multiply, + Keys.Subtract, + Keys.Add, + Keys.None, + Keys.NumPad7, + Keys.NumPad8, + Keys.NumPad9, + Keys.Right, + Keys.None, + Keys.VolumeMute, + Keys.MediaStop, + Keys.MediaPreviousTrack, + Keys.MediaPlayPause, + Keys.MediaNextTrack, + Keys.NumLock, + Keys.OemMinus, + Keys.Tab, + Keys.Q, + Keys.W, + Keys.E, + Keys.R, + Keys.T, + Keys.Y, + Keys.D3, + Keys.D4, + Keys.D5, + Keys.D6, + Keys.D7, + Keys.D8, + Keys.D9, + Keys.D0, + Keys.F7, + Keys.F8, + Keys.F9, + Keys.F10, + Keys.F11, + Keys.OemTilde, + Keys.D1, + Keys.D2, + Keys.Escape, + Keys.F1, + Keys.F2, + Keys.F3, + Keys.F4, + Keys.F5, + Keys.F6, + Keys.N, + Keys.M, + Keys.OemComma, + Keys.OemPeriod, + Keys.OemQuestion, + Keys.LeftControl, + Keys.None, + Keys.LeftAlt, + Keys.OemQuotes, + Keys.LeftShift, + Keys.Z, + Keys.X, + Keys.C, + Keys.V, + Keys.B, + Keys.D, + Keys.F, + Keys.G, + Keys.H, + Keys.J, + Keys.K, + Keys.L, + Keys.OemSemicolon, + Keys.U, + Keys.I, + Keys.O, + Keys.P, + Keys.OemOpenBrackets, + Keys.CapsLock, + Keys.A, + Keys.S + }; + return new VirtualKeyboard(Fragment.FromCustom(pointArray, vector2Array), keyMap); + } + + public virtual void Present() + { + } + + public virtual void Render(IEnumerable keys) + { + foreach (RgbKey key in keys) + { + int num; + if (this._keyCodeMap.TryGetValue((Keys) key.Key, out num)) + ((RgbDevice) this).SetLedColor(num, key.CurrentColor.ToVector4()); + } + } + } +} diff --git a/GameContent/RGB/WallOfFleshShader.cs b/GameContent/RGB/WallOfFleshShader.cs new file mode 100644 index 0000000..365f899 --- /dev/null +++ b/GameContent/RGB/WallOfFleshShader.cs @@ -0,0 +1,38 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.WallOfFleshShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class WallOfFleshShader : ChromaShader + { + private readonly Vector4 _primaryColor; + private readonly Vector4 _secondaryColor; + + public WallOfFleshShader(Color primaryColor, Color secondaryColor) + { + this._primaryColor = primaryColor.ToVector4(); + this._secondaryColor = secondaryColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector4 vector4 = Vector4.Lerp(this._secondaryColor, this._primaryColor, (float) Math.Sqrt((double) Math.Max(0.0f, (float) (1.0 - (double) NoiseHelper.GetDynamicNoise(fragment.GetCanvasPositionOfIndex(index) * 0.3f, time / 5f) * 2.0))) * 0.75f); + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/RGB/WormShader.cs b/GameContent/RGB/WormShader.cs new file mode 100644 index 0000000..9266c85 --- /dev/null +++ b/GameContent/RGB/WormShader.cs @@ -0,0 +1,76 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.RGB.WormShader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Peripherals.RGB; +using System; + +namespace Terraria.GameContent.RGB +{ + public class WormShader : ChromaShader + { + private readonly Vector4 _skinColor; + private readonly Vector4 _eyeColor; + private readonly Vector4 _innerEyeColor; + + public WormShader() + { + } + + public WormShader(Color skinColor, Color eyeColor, Color innerEyeColor) + { + this._skinColor = skinColor.ToVector4(); + this._eyeColor = eyeColor.ToVector4(); + this._innerEyeColor = innerEyeColor.ToVector4(); + } + + [RgbProcessor] + private void ProcessLowDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + Vector4 vector4 = Vector4.Lerp(this._skinColor, this._eyeColor, Math.Max(0.0f, (float) Math.Sin((double) time * -3.0 + (double) canvasPositionOfIndex.X))); + fragment.SetColor(index, vector4); + } + } + + [RgbProcessor] + private void ProcessHighDetail( + RgbDevice device, + Fragment fragment, + EffectDetailLevel quality, + float time) + { + time *= 0.25f; + for (int index = 0; index < fragment.Count; ++index) + { + Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(index); + canvasPositionOfIndex.X -= time * 1.5f; + canvasPositionOfIndex.X %= 2f; + if ((double) canvasPositionOfIndex.X < 0.0) + canvasPositionOfIndex.X += 2f; + float num1 = (canvasPositionOfIndex - new Vector2(0.5f)).Length(); + Vector4 vector4 = this._skinColor; + if ((double) num1 < 0.5) + { + float num2 = MathHelper.Clamp((float) (((double) num1 - 0.5 + 0.200000002980232) / 0.200000002980232), 0.0f, 1f); + vector4 = Vector4.Lerp(vector4, this._eyeColor, 1f - num2); + if ((double) num1 < 0.400000005960464) + { + float num3 = MathHelper.Clamp((float) (((double) num1 - 0.400000005960464 + 0.200000002980232) / 0.200000002980232), 0.0f, 1f); + vector4 = Vector4.Lerp(vector4, this._innerEyeColor, 1f - num3); + } + } + fragment.SetColor(index, vector4); + } + } + } +} diff --git a/GameContent/Shaders/BlizzardShaderData.cs b/GameContent/Shaders/BlizzardShaderData.cs new file mode 100644 index 0000000..6f0c8c3 --- /dev/null +++ b/GameContent/Shaders/BlizzardShaderData.cs @@ -0,0 +1,48 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Shaders.BlizzardShaderData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.Graphics.Shaders; + +namespace Terraria.GameContent.Shaders +{ + public class BlizzardShaderData : ScreenShaderData + { + private Vector2 _texturePosition = Vector2.Zero; + private float windSpeed = 0.1f; + + public BlizzardShaderData(string passName) + : base(passName) + { + } + + public override void Update(GameTime gameTime) + { + float num = Main.windSpeedCurrent; + if ((double) num >= 0.0 && (double) num <= 0.100000001490116) + num = 0.1f; + else if ((double) num <= 0.0 && (double) num >= -0.100000001490116) + num = -0.1f; + this.windSpeed = (float) ((double) num * 0.0500000007450581 + (double) this.windSpeed * 0.949999988079071); + Vector2 direction = new Vector2(-this.windSpeed, -1f) * new Vector2(10f, 2f); + direction.Normalize(); + direction *= new Vector2(0.8f, 0.6f); + if (!Main.gamePaused && Main.hasFocus) + this._texturePosition += direction * (float) gameTime.ElapsedGameTime.TotalSeconds; + this._texturePosition.X %= 10f; + this._texturePosition.Y %= 10f; + this.UseDirection(direction); + this.UseTargetPosition(this._texturePosition); + base.Update(gameTime); + } + + public override void Apply() + { + this.UseTargetPosition(this._texturePosition); + base.Apply(); + } + } +} diff --git a/GameContent/Shaders/BloodMoonScreenShaderData.cs b/GameContent/Shaders/BloodMoonScreenShaderData.cs new file mode 100644 index 0000000..b9f1dc4 --- /dev/null +++ b/GameContent/Shaders/BloodMoonScreenShaderData.cs @@ -0,0 +1,21 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Shaders.BloodMoonScreenShaderData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.Graphics.Shaders; + +namespace Terraria.GameContent.Shaders +{ + public class BloodMoonScreenShaderData : ScreenShaderData + { + public BloodMoonScreenShaderData(string passName) + : base(passName) + { + } + + public override void Update(GameTime gameTime) => this.UseOpacity((1f - Utils.SmoothStep((float) Main.worldSurface + 50f, (float) Main.rockLayer + 100f, (float) (((double) Main.screenPosition.Y + (double) (Main.screenHeight / 2)) / 16.0))) * 0.75f); + } +} diff --git a/GameContent/Shaders/MoonLordScreenShaderData.cs b/GameContent/Shaders/MoonLordScreenShaderData.cs new file mode 100644 index 0000000..171b396 --- /dev/null +++ b/GameContent/Shaders/MoonLordScreenShaderData.cs @@ -0,0 +1,48 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Shaders.MoonLordScreenShaderData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.Graphics.Shaders; + +namespace Terraria.GameContent.Shaders +{ + public class MoonLordScreenShaderData : ScreenShaderData + { + private int _moonLordIndex = -1; + private bool _aimAtPlayer; + + public MoonLordScreenShaderData(string passName, bool aimAtPlayer) + : base(passName) + { + this._aimAtPlayer = aimAtPlayer; + } + + private void UpdateMoonLordIndex() + { + if (this._aimAtPlayer || this._moonLordIndex >= 0 && Main.npc[this._moonLordIndex].active && Main.npc[this._moonLordIndex].type == 398) + return; + int num = -1; + for (int index = 0; index < Main.npc.Length; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 398) + { + num = index; + break; + } + } + this._moonLordIndex = num; + } + + public override void Apply() + { + this.UpdateMoonLordIndex(); + if (this._aimAtPlayer) + this.UseTargetPosition(Main.LocalPlayer.Center); + else if (this._moonLordIndex != -1) + this.UseTargetPosition(Main.npc[this._moonLordIndex].Center); + base.Apply(); + } + } +} diff --git a/GameContent/Shaders/RippleShape.cs b/GameContent/Shaders/RippleShape.cs new file mode 100644 index 0000000..6ee1662 --- /dev/null +++ b/GameContent/Shaders/RippleShape.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Shaders.RippleShape +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Shaders +{ + public enum RippleShape + { + None, + Square, + Circle, + } +} diff --git a/GameContent/Shaders/SandstormShaderData.cs b/GameContent/Shaders/SandstormShaderData.cs new file mode 100644 index 0000000..f50b5bb --- /dev/null +++ b/GameContent/Shaders/SandstormShaderData.cs @@ -0,0 +1,40 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Shaders.SandstormShaderData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.Graphics.Shaders; + +namespace Terraria.GameContent.Shaders +{ + public class SandstormShaderData : ScreenShaderData + { + private Vector2 _texturePosition = Vector2.Zero; + + public SandstormShaderData(string passName) + : base(passName) + { + } + + public override void Update(GameTime gameTime) + { + Vector2 vector2 = new Vector2(-Main.windSpeedCurrent, -1f) * new Vector2(20f, 0.1f); + vector2.Normalize(); + Vector2 direction = vector2 * new Vector2(2f, 0.2f); + if (!Main.gamePaused && Main.hasFocus) + this._texturePosition += direction * (float) gameTime.ElapsedGameTime.TotalSeconds; + this._texturePosition.X %= 10f; + this._texturePosition.Y %= 10f; + this.UseDirection(direction); + base.Update(gameTime); + } + + public override void Apply() + { + this.UseTargetPosition(this._texturePosition); + base.Apply(); + } + } +} diff --git a/GameContent/Shaders/WaterShaderData.cs b/GameContent/Shaders/WaterShaderData.cs new file mode 100644 index 0000000..97d6be9 --- /dev/null +++ b/GameContent/Shaders/WaterShaderData.cs @@ -0,0 +1,411 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Shaders.WaterShaderData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.DataStructures; +using Terraria.GameContent.Liquid; +using Terraria.Graphics; +using Terraria.Graphics.Light; +using Terraria.Graphics.Shaders; +using Terraria.ID; + +namespace Terraria.GameContent.Shaders +{ + public class WaterShaderData : ScreenShaderData + { + private const float DISTORTION_BUFFER_SCALE = 0.25f; + private const float WAVE_FRAMERATE = 0.01666667f; + private const int MAX_RIPPLES_QUEUED = 200; + public bool _useViscosityFilter = true; + private RenderTarget2D _distortionTarget; + private RenderTarget2D _distortionTargetSwap; + private bool _usingRenderTargets; + private Vector2 _lastDistortionDrawOffset = Vector2.Zero; + private float _progress; + private WaterShaderData.Ripple[] _rippleQueue = new WaterShaderData.Ripple[200]; + private int _rippleQueueCount; + private int _lastScreenWidth; + private int _lastScreenHeight; + public bool _useProjectileWaves = true; + private bool _useNPCWaves = true; + private bool _usePlayerWaves = true; + private bool _useRippleWaves = true; + private bool _useCustomWaves = true; + private bool _clearNextFrame = true; + private Texture2D[] _viscosityMaskChain = new Texture2D[3]; + private int _activeViscosityMask; + private Asset _rippleShapeTexture; + private bool _isWaveBufferDirty = true; + private int _queuedSteps; + private const int MAX_QUEUED_STEPS = 2; + + public event Action OnWaveDraw; + + public WaterShaderData(string passName) + : base(passName) + { + Main.OnRenderTargetsInitialized += new ResolutionChangeEvent(this.InitRenderTargets); + Main.OnRenderTargetsReleased += new Action(this.ReleaseRenderTargets); + this._rippleShapeTexture = Main.Assets.Request("Images/Misc/Ripples", (AssetRequestMode) 1); + Main.OnPreDraw += new Action(this.PreDraw); + } + + public override void Update(GameTime gameTime) + { + this._useViscosityFilter = Main.WaveQuality >= 3; + this._useProjectileWaves = Main.WaveQuality >= 3; + this._usePlayerWaves = Main.WaveQuality >= 2; + this._useRippleWaves = Main.WaveQuality >= 2; + this._useCustomWaves = Main.WaveQuality >= 2; + if (Main.gamePaused || !Main.hasFocus) + return; + this._progress += (float) (gameTime.ElapsedGameTime.TotalSeconds * (double) this.Intensity * 0.75); + this._progress %= 86400f; + if (this._useProjectileWaves || this._useRippleWaves || this._useCustomWaves || this._usePlayerWaves) + ++this._queuedSteps; + base.Update(gameTime); + } + + private void StepLiquids() + { + this._isWaveBufferDirty = true; + Vector2 vector2_1 = Main.drawToScreen ? Vector2.Zero : new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange); + Vector2 vector2_2 = vector2_1 - Main.screenPosition; + TileBatch tileBatch = Main.tileBatch; + GraphicsDevice graphicsDevice = Main.instance.GraphicsDevice; + graphicsDevice.SetRenderTarget(this._distortionTarget); + if (this._clearNextFrame) + { + graphicsDevice.Clear(new Color(0.5f, 0.5f, 0.0f, 1f)); + this._clearNextFrame = false; + } + this.DrawWaves(); + graphicsDevice.SetRenderTarget(this._distortionTargetSwap); + graphicsDevice.Clear(new Color(0.5f, 0.5f, 0.5f, 1f)); + Main.tileBatch.Begin(); + Vector2 vector2_3 = vector2_2 * 0.25f; + vector2_3.X = (float) Math.Floor((double) vector2_3.X); + vector2_3.Y = (float) Math.Floor((double) vector2_3.Y); + Vector2 vector2_4 = vector2_3 - this._lastDistortionDrawOffset; + this._lastDistortionDrawOffset = vector2_3; + tileBatch.Draw((Texture2D) this._distortionTarget, new Vector4(vector2_4.X, vector2_4.Y, (float) this._distortionTarget.Width, (float) this._distortionTarget.Height), new VertexColors(Color.White)); + GameShaders.Misc["WaterProcessor"].Apply(new DrawData?(new DrawData((Texture2D) this._distortionTarget, Vector2.Zero, Color.White))); + tileBatch.End(); + RenderTarget2D distortionTarget = this._distortionTarget; + this._distortionTarget = this._distortionTargetSwap; + this._distortionTargetSwap = distortionTarget; + if (this._useViscosityFilter) + { + LiquidRenderer.Instance.SetWaveMaskData(ref this._viscosityMaskChain[this._activeViscosityMask]); + tileBatch.Begin(); + Rectangle cachedDrawArea = LiquidRenderer.Instance.GetCachedDrawArea(); + Rectangle rectangle = new Rectangle(0, 0, cachedDrawArea.Height, cachedDrawArea.Width); + Vector4 vector4 = new Vector4((float) (cachedDrawArea.X + cachedDrawArea.Width), (float) cachedDrawArea.Y, (float) cachedDrawArea.Height, (float) cachedDrawArea.Width) * 16f; + vector4.X -= vector2_1.X; + vector4.Y -= vector2_1.Y; + Vector4 destination = vector4 * 0.25f; + destination.X += vector2_3.X; + destination.Y += vector2_3.Y; + graphicsDevice.SamplerStates[0] = SamplerState.PointClamp; + tileBatch.Draw(this._viscosityMaskChain[this._activeViscosityMask], destination, new Rectangle?(rectangle), new VertexColors(Color.White), Vector2.Zero, SpriteEffects.FlipHorizontally, 1.570796f); + tileBatch.End(); + ++this._activeViscosityMask; + this._activeViscosityMask %= this._viscosityMaskChain.Length; + } + graphicsDevice.SetRenderTarget((RenderTarget2D) null); + } + + private void DrawWaves() + { + Vector2 screenPosition = Main.screenPosition; + Vector2 vector2_1 = -this._lastDistortionDrawOffset / 0.25f + (Main.drawToScreen ? Vector2.Zero : new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange)); + TileBatch tileBatch = Main.tileBatch; + GraphicsDevice graphicsDevice = Main.instance.GraphicsDevice; + Vector2 dimensions1 = new Vector2((float) Main.screenWidth, (float) Main.screenHeight); + Vector2 vector2_2 = new Vector2(16f, 16f); + tileBatch.Begin(); + GameShaders.Misc["WaterDistortionObject"].Apply(new DrawData?()); + if (this._useNPCWaves) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index] != null && Main.npc[index].active && (Main.npc[index].wet || Main.npc[index].wetCount != (byte) 0) && Collision.CheckAABBvAABBCollision(screenPosition, dimensions1, Main.npc[index].position - vector2_2, Main.npc[index].Size + vector2_2)) + { + NPC npc = Main.npc[index]; + Vector2 vector2_3 = npc.Center - vector2_1; + Vector2 vector2_4 = npc.velocity.RotatedBy(-(double) npc.rotation) / new Vector2((float) npc.height, (float) npc.width); + float num1 = vector2_4.LengthSquared(); + float num2 = Math.Min((float) ((double) num1 * 0.300000011920929 + 0.699999988079071 * (double) num1 * (1024.0 / (double) (npc.height * npc.width))), 0.08f) + (npc.velocity - npc.oldVelocity).Length() * 0.5f; + vector2_4.Normalize(); + Vector2 velocity = npc.velocity; + velocity.Normalize(); + Vector2 vector2_5 = vector2_3 - velocity * 10f; + if (!this._useViscosityFilter && (npc.honeyWet || npc.lavaWet)) + num2 *= 0.3f; + if (npc.wet) + tileBatch.Draw(TextureAssets.MagicPixel.Value, new Vector4(vector2_5.X, vector2_5.Y, (float) npc.width * 2f, (float) npc.height * 2f) * 0.25f, new Rectangle?(), new VertexColors(new Color((float) ((double) vector2_4.X * 0.5 + 0.5), (float) ((double) vector2_4.Y * 0.5 + 0.5), 0.5f * num2)), new Vector2((float) TextureAssets.MagicPixel.Width() / 2f, (float) TextureAssets.MagicPixel.Height() / 2f), SpriteEffects.None, npc.rotation); + if (npc.wetCount != (byte) 0) + { + float num3 = 0.195f * (float) Math.Sqrt((double) npc.velocity.Length()); + float num4 = 5f; + if (!npc.wet) + num4 = -20f; + this.QueueRipple(npc.Center + velocity * num4, new Color(0.5f, (float) ((npc.wet ? (double) num3 : -(double) num3) * 0.5 + 0.5), 0.0f, 1f) * 0.5f, new Vector2((float) npc.width, (float) npc.height * ((float) npc.wetCount / 9f)) * MathHelper.Clamp(num3 * 10f, 0.0f, 1f), RippleShape.Circle); + } + } + } + } + if (this._usePlayerWaves) + { + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index] != null && Main.player[index].active && (Main.player[index].wet || Main.player[index].wetCount != (byte) 0) && Collision.CheckAABBvAABBCollision(screenPosition, dimensions1, Main.player[index].position - vector2_2, Main.player[index].Size + vector2_2)) + { + Player player = Main.player[index]; + Vector2 vector2_6 = player.Center - vector2_1; + float num5 = 0.05f * (float) Math.Sqrt((double) player.velocity.Length()); + Vector2 velocity = player.velocity; + velocity.Normalize(); + Vector2 vector2_7 = vector2_6 - velocity * 10f; + if (!this._useViscosityFilter && (player.honeyWet || player.lavaWet)) + num5 *= 0.3f; + if (player.wet) + tileBatch.Draw(TextureAssets.MagicPixel.Value, new Vector4(vector2_7.X - (float) ((double) player.width * 2.0 * 0.5), vector2_7.Y - (float) ((double) player.height * 2.0 * 0.5), (float) player.width * 2f, (float) player.height * 2f) * 0.25f, new VertexColors(new Color((float) ((double) velocity.X * 0.5 + 0.5), (float) ((double) velocity.Y * 0.5 + 0.5), 0.5f * num5))); + if (player.wetCount != (byte) 0) + { + float num6 = 5f; + if (!player.wet) + num6 = -20f; + float num7 = num5 * 3f; + this.QueueRipple(player.Center + velocity * num6, player.wet ? num7 : -num7, new Vector2((float) player.width, (float) player.height * ((float) player.wetCount / 9f)) * MathHelper.Clamp(num7 * 10f, 0.0f, 1f), RippleShape.Circle); + } + } + } + } + if (this._useProjectileWaves) + { + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + int num8 = !projectile.wet || projectile.lavaWet ? 0 : (!projectile.honeyWet ? 1 : 0); + bool flag1 = projectile.lavaWet; + bool flag2 = projectile.honeyWet; + bool flag3 = projectile.wet; + if (projectile.ignoreWater) + flag3 = true; + if (((projectile == null || !projectile.active ? 0 : (ProjectileID.Sets.CanDistortWater[projectile.type] ? 1 : 0)) & (flag3 ? 1 : 0)) != 0 && !ProjectileID.Sets.NoLiquidDistortion[projectile.type] && Collision.CheckAABBvAABBCollision(screenPosition, dimensions1, projectile.position - vector2_2, projectile.Size + vector2_2)) + { + if (projectile.ignoreWater) + { + int num9 = Collision.LavaCollision(projectile.position, projectile.width, projectile.height) ? 1 : 0; + flag1 = Collision.WetCollision(projectile.position, projectile.width, projectile.height); + flag2 = Collision.honey; + int num10 = flag1 ? 1 : 0; + if ((num9 | num10 | (flag2 ? 1 : 0)) == 0) + continue; + } + Vector2 vector2_8 = projectile.Center - vector2_1; + float num11 = 2f * (float) Math.Sqrt(0.0500000007450581 * (double) projectile.velocity.Length()); + Vector2 velocity = projectile.velocity; + velocity.Normalize(); + if (!this._useViscosityFilter && flag2 | flag1) + num11 *= 0.3f; + float z = Math.Max(12f, (float) projectile.width * 0.75f); + float w = Math.Max(12f, (float) projectile.height * 0.75f); + tileBatch.Draw(TextureAssets.MagicPixel.Value, new Vector4(vector2_8.X - z * 0.5f, vector2_8.Y - w * 0.5f, z, w) * 0.25f, new VertexColors(new Color((float) ((double) velocity.X * 0.5 + 0.5), (float) ((double) velocity.Y * 0.5 + 0.5), num11 * 0.5f))); + } + } + } + tileBatch.End(); + if (this._useRippleWaves) + { + tileBatch.Begin(); + for (int index = 0; index < this._rippleQueueCount; ++index) + { + Vector2 vector2_9 = this._rippleQueue[index].Position - vector2_1; + Vector2 size = this._rippleQueue[index].Size; + Rectangle sourceRectangle = this._rippleQueue[index].SourceRectangle; + Texture2D texture = this._rippleShapeTexture.Value; + tileBatch.Draw(texture, new Vector4(vector2_9.X, vector2_9.Y, size.X, size.Y) * 0.25f, new Rectangle?(sourceRectangle), new VertexColors(this._rippleQueue[index].WaveData), new Vector2((float) (sourceRectangle.Width / 2), (float) (sourceRectangle.Height / 2)), SpriteEffects.None, this._rippleQueue[index].Rotation); + } + tileBatch.End(); + } + this._rippleQueueCount = 0; + if (!this._useCustomWaves || this.OnWaveDraw == null) + return; + tileBatch.Begin(); + this.OnWaveDraw(tileBatch); + tileBatch.End(); + } + + private void PreDraw(GameTime gameTime) + { + this.ValidateRenderTargets(); + if (!this._usingRenderTargets || !Main.IsGraphicsDeviceAvailable) + return; + if (this._useProjectileWaves || this._useRippleWaves || this._useCustomWaves || this._usePlayerWaves) + { + for (int index = 0; index < Math.Min(this._queuedSteps, 2); ++index) + this.StepLiquids(); + } + else if (this._isWaveBufferDirty || this._clearNextFrame) + { + GraphicsDevice graphicsDevice = Main.instance.GraphicsDevice; + graphicsDevice.SetRenderTarget(this._distortionTarget); + graphicsDevice.Clear(new Color(0.5f, 0.5f, 0.0f, 1f)); + this._clearNextFrame = false; + this._isWaveBufferDirty = false; + graphicsDevice.SetRenderTarget((RenderTarget2D) null); + } + this._queuedSteps = 0; + } + + public override void Apply() + { + if (!this._usingRenderTargets || !Main.IsGraphicsDeviceAvailable) + return; + this.UseProgress(this._progress); + Main.graphics.GraphicsDevice.SamplerStates[0] = SamplerState.PointClamp; + Vector2 vector2_1 = new Vector2((float) Main.screenWidth, (float) Main.screenHeight) * 0.5f * (Vector2.One - Vector2.One / Main.GameViewMatrix.Zoom); + Vector2 vector2_2 = (Main.drawToScreen ? Vector2.Zero : new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange)) - Main.screenPosition - vector2_1; + this.UseImage((Texture2D) this._distortionTarget, 1); + this.UseImage((Texture2D) Main.waterTarget, 2, SamplerState.PointClamp); + this.UseTargetPosition(Main.screenPosition - Main.sceneWaterPos + new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange) + vector2_1); + this.UseImageOffset(-(vector2_2 * 0.25f - this._lastDistortionDrawOffset) / new Vector2((float) this._distortionTarget.Width, (float) this._distortionTarget.Height)); + base.Apply(); + } + + private void ValidateRenderTargets() + { + int backBufferWidth = Main.instance.GraphicsDevice.PresentationParameters.BackBufferWidth; + int backBufferHeight = Main.instance.GraphicsDevice.PresentationParameters.BackBufferHeight; + bool flag = !Main.drawToScreen; + if (this._usingRenderTargets && !flag) + this.ReleaseRenderTargets(); + else if (!this._usingRenderTargets & flag) + { + this.InitRenderTargets(backBufferWidth, backBufferHeight); + } + else + { + if (!(this._usingRenderTargets & flag) || !this._distortionTarget.IsContentLost && !this._distortionTargetSwap.IsContentLost) + return; + this._clearNextFrame = true; + } + } + + private void InitRenderTargets(int width, int height) + { + this._lastScreenWidth = width; + this._lastScreenHeight = height; + width = (int) ((double) width * 0.25); + height = (int) ((double) height * 0.25); + try + { + this._distortionTarget = new RenderTarget2D(Main.instance.GraphicsDevice, width, height, false, SurfaceFormat.Color, DepthFormat.None, 0, RenderTargetUsage.PreserveContents); + this._distortionTargetSwap = new RenderTarget2D(Main.instance.GraphicsDevice, width, height, false, SurfaceFormat.Color, DepthFormat.None, 0, RenderTargetUsage.PreserveContents); + this._usingRenderTargets = true; + this._clearNextFrame = true; + } + catch (Exception ex) + { + Lighting.Mode = LightMode.Retro; + this._usingRenderTargets = false; + Console.WriteLine("Failed to create water distortion render targets. " + (object) ex); + } + } + + private void ReleaseRenderTargets() + { + try + { + if (this._distortionTarget != null) + this._distortionTarget.Dispose(); + if (this._distortionTargetSwap != null) + this._distortionTargetSwap.Dispose(); + } + catch (Exception ex) + { + Console.WriteLine("Error disposing of water distortion render targets. " + (object) ex); + } + this._distortionTarget = (RenderTarget2D) null; + this._distortionTargetSwap = (RenderTarget2D) null; + this._usingRenderTargets = false; + } + + public void QueueRipple(Vector2 position, float strength = 1f, RippleShape shape = RippleShape.Square, float rotation = 0.0f) + { + float g = (float) ((double) strength * 0.5 + 0.5); + float num = Math.Min(Math.Abs(strength), 1f); + this.QueueRipple(position, new Color(0.5f, g, 0.0f, 1f) * num, new Vector2(4f * Math.Max(Math.Abs(strength), 1f)), shape, rotation); + } + + public void QueueRipple( + Vector2 position, + float strength, + Vector2 size, + RippleShape shape = RippleShape.Square, + float rotation = 0.0f) + { + float g = (float) ((double) strength * 0.5 + 0.5); + float num = Math.Min(Math.Abs(strength), 1f); + this.QueueRipple(position, new Color(0.5f, g, 0.0f, 1f) * num, size, shape, rotation); + } + + public void QueueRipple( + Vector2 position, + Color waveData, + Vector2 size, + RippleShape shape = RippleShape.Square, + float rotation = 0.0f) + { + if (!this._useRippleWaves || Main.drawToScreen) + { + this._rippleQueueCount = 0; + } + else + { + if (this._rippleQueueCount >= this._rippleQueue.Length) + return; + this._rippleQueue[this._rippleQueueCount++] = new WaterShaderData.Ripple(position, waveData, size, shape, rotation); + } + } + + private struct Ripple + { + private static readonly Rectangle[] RIPPLE_SHAPE_SOURCE_RECTS = new Rectangle[3] + { + new Rectangle(0, 0, 0, 0), + new Rectangle(1, 1, 62, 62), + new Rectangle(1, 65, 62, 62) + }; + public readonly Vector2 Position; + public readonly Color WaveData; + public readonly Vector2 Size; + public readonly RippleShape Shape; + public readonly float Rotation; + + public Rectangle SourceRectangle => WaterShaderData.Ripple.RIPPLE_SHAPE_SOURCE_RECTS[(int) this.Shape]; + + public Ripple( + Vector2 position, + Color waveData, + Vector2 size, + RippleShape shape, + float rotation) + { + this.Position = position; + this.WaveData = waveData; + this.Size = size; + this.Shape = shape; + this.Rotation = rotation; + } + } + } +} diff --git a/GameContent/ShopHelper.cs b/GameContent/ShopHelper.cs new file mode 100644 index 0000000..7389ace --- /dev/null +++ b/GameContent/ShopHelper.cs @@ -0,0 +1,358 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.ShopHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.GameContent.Personalities; +using Terraria.ID; +using Terraria.Localization; + +namespace Terraria.GameContent +{ + public class ShopHelper + { + private const float LowestPossiblePriceMultiplier = 0.75f; + private const float HighestPossiblePriceMultiplier = 1.5f; + private string _currentHappiness; + private float _currentPriceAdjustment; + private NPC _currentNPCBeingTalkedTo; + private Player _currentPlayerTalking; + private const float likeValue = 0.95f; + private const float dislikeValue = 1.05f; + private const float loveValue = 0.9f; + private const float hateValue = 1.1f; + + public ShoppingSettings GetShoppingSettings(Player player, NPC npc) + { + ShoppingSettings shoppingSettings = new ShoppingSettings() + { + PriceAdjustment = 1.0, + HappinessReport = "" + }; + this._currentNPCBeingTalkedTo = npc; + this._currentPlayerTalking = player; + this.ProcessMood(player, npc); + shoppingSettings.PriceAdjustment = (double) this._currentPriceAdjustment; + shoppingSettings.HappinessReport = this._currentHappiness; + return shoppingSettings; + } + + private float GetSkeletonMerchantPrices(NPC npc) + { + float num = 1f; + if (Main.moonPhase == 1 || Main.moonPhase == 7) + num = 1.1f; + if (Main.moonPhase == 2 || Main.moonPhase == 6) + num = 1.2f; + if (Main.moonPhase == 3 || Main.moonPhase == 5) + num = 1.3f; + if (Main.moonPhase == 4) + num = 1.4f; + if (Main.dayTime) + num += 0.1f; + return num; + } + + private float GetTravelingMerchantPrices(NPC npc) => (float) ((2.0 + (double) (1.5f - Vector2.Distance(npc.Center / 16f, new Vector2((float) Main.spawnTileX, (float) Main.spawnTileY)) / (float) (Main.maxTilesX / 2))) / 3.0); + + private void ProcessMood(Player player, NPC npc) + { + this._currentHappiness = ""; + this._currentPriceAdjustment = 1f; + if (npc.type == 368) + this._currentPriceAdjustment = 1f; + else if (npc.type == 453) + { + this._currentPriceAdjustment = 1f; + } + else + { + if (npc.type == 656 || npc.type == 637 || npc.type == 638) + return; + if (this.IsNotReallyTownNPC(npc)) + { + this._currentPriceAdjustment = 1f; + } + else + { + if (this.RuinMoodIfHomeless(npc)) + this._currentPriceAdjustment = 1000f; + else if (this.IsFarFromHome(npc)) + this._currentPriceAdjustment = 1000f; + if (this.IsPlayerInEvilBiomes(player)) + this._currentPriceAdjustment = 1000f; + int npcsWithinHouse; + int npcsWithinVillage; + List nearbyResidentNpCs = this.GetNearbyResidentNPCs(npc, out npcsWithinHouse, out npcsWithinVillage); + if (npcsWithinHouse > 2) + { + for (int index = 2; index < npcsWithinHouse + 1; ++index) + this._currentPriceAdjustment *= 1.04f; + if (npcsWithinHouse > 4) + this.AddHappinessReportText("HateCrowded"); + else + this.AddHappinessReportText("DislikeCrowded"); + } + if (npcsWithinHouse < 2 && npcsWithinVillage < 4) + { + this.AddHappinessReportText("LoveSpace"); + this._currentPriceAdjustment *= 0.9f; + } + bool[] flagArray = new bool[663]; + foreach (NPC npc1 in nearbyResidentNpCs) + flagArray[npc1.type] = true; + new AllPersonalitiesModifier().ModifyShopPrice(new HelperInfo() + { + player = player, + npc = npc, + NearbyNPCs = nearbyResidentNpCs, + PrimaryPlayerBiome = player.GetPrimaryBiome(), + nearbyNPCsByType = flagArray + }, this); + if (this._currentHappiness == "") + this.AddHappinessReportText("Content"); + this._currentPriceAdjustment = this.LimitAndRoundMultiplier(this._currentPriceAdjustment); + } + } + } + + private float LimitAndRoundMultiplier(float priceAdjustment) + { + priceAdjustment = MathHelper.Clamp(priceAdjustment, 0.75f, 1.5f); + priceAdjustment = (float) Math.Round((double) priceAdjustment * 20.0) / 20f; + return priceAdjustment; + } + + private static string BiomeName(int biomeID) + { + switch (biomeID) + { + case 1: + return "the Underground"; + case 2: + return "the Snow"; + case 3: + return "the Desert"; + case 4: + return "the Jungle"; + case 5: + return "the Ocean"; + case 6: + return "the Hallow"; + case 7: + return "the Glowing Mushrooms"; + case 8: + return "the Dungeon"; + case 9: + return "the Corruption"; + case 10: + return "the Crimson"; + default: + return "the Forest"; + } + } + + private static string BiomeNameKey(int biomeID) + { + switch (biomeID) + { + case 1: + return "the Underground"; + case 2: + return "the Snow"; + case 3: + return "the Desert"; + case 4: + return "the Jungle"; + case 5: + return "the Ocean"; + case 6: + return "the Hallow"; + case 7: + return "the Glowing Mushrooms"; + case 8: + return "the Dungeon"; + case 9: + return "the Corruption"; + case 10: + return "the Crimson"; + default: + return "the Forest"; + } + } + + private void AddHappinessReportText(string textKeyInCategory, object substitutes = null) + { + string str = "TownNPCMood_" + NPCID.Search.GetName(this._currentNPCBeingTalkedTo.netID); + if (this._currentNPCBeingTalkedTo.type == 633 && this._currentNPCBeingTalkedTo.altTexture == 2) + str += "Transformed"; + this._currentHappiness = this._currentHappiness + Language.GetTextValueWith(str + "." + textKeyInCategory, substitutes) + " "; + } + + public void LikeBiome(int biomeID) + { + this.AddHappinessReportText(nameof (LikeBiome), (object) new + { + BiomeName = ShopHelper.BiomeNameKey(biomeID) + }); + this._currentPriceAdjustment *= 0.95f; + } + + public void LoveBiome(int biomeID) + { + this.AddHappinessReportText(nameof (LoveBiome), (object) new + { + BiomeName = ShopHelper.BiomeNameKey(biomeID) + }); + this._currentPriceAdjustment *= 0.9f; + } + + public void DislikeBiome(int biomeID) + { + this.AddHappinessReportText(nameof (DislikeBiome), (object) new + { + BiomeName = ShopHelper.BiomeNameKey(biomeID) + }); + this._currentPriceAdjustment *= 1.05f; + } + + public void HateBiome(int biomeID) + { + this.AddHappinessReportText(nameof (HateBiome), (object) new + { + BiomeName = ShopHelper.BiomeNameKey(biomeID) + }); + this._currentPriceAdjustment *= 1.1f; + } + + public void LikeNPC(int npcType) + { + this.AddHappinessReportText(nameof (LikeNPC), (object) new + { + NPCName = NPC.GetFullnameByID(npcType) + }); + this._currentPriceAdjustment *= 0.95f; + } + + public void LoveNPC(int npcType) + { + this.AddHappinessReportText(nameof (LoveNPC), (object) new + { + NPCName = NPC.GetFullnameByID(npcType) + }); + this._currentPriceAdjustment *= 0.9f; + } + + public void DislikeNPC(int npcType) + { + this.AddHappinessReportText(nameof (DislikeNPC), (object) new + { + NPCName = NPC.GetFullnameByID(npcType) + }); + this._currentPriceAdjustment *= 1.05f; + } + + public void HateNPC(int npcType) + { + this.AddHappinessReportText(nameof (HateNPC), (object) new + { + NPCName = NPC.GetFullnameByID(npcType) + }); + this._currentPriceAdjustment *= 1.1f; + } + + private List GetNearbyResidentNPCs( + NPC npc, + out int npcsWithinHouse, + out int npcsWithinVillage) + { + List npcList = new List(); + npcsWithinHouse = 0; + npcsWithinVillage = 0; + Vector2 vector2_1 = new Vector2((float) npc.homeTileX, (float) npc.homeTileY); + if (npc.homeless) + vector2_1 = new Vector2(npc.Center.X / 16f, npc.Center.Y / 16f); + for (int index = 0; index < 200; ++index) + { + if (index != npc.whoAmI) + { + NPC npc1 = Main.npc[index]; + if (npc1.active && npc1.townNPC && !this.IsNotReallyTownNPC(npc1) && !WorldGen.TownManager.CanNPCsLiveWithEachOther_ShopHelper(npc, npc1)) + { + Vector2 vector2_2 = new Vector2((float) npc1.homeTileX, (float) npc1.homeTileY); + if (npc1.homeless) + vector2_2 = npc1.Center / 16f; + float num = Vector2.Distance(vector2_1, vector2_2); + if ((double) num < 25.0) + { + npcList.Add(npc1); + ++npcsWithinHouse; + } + else if ((double) num < 120.0) + ++npcsWithinVillage; + } + } + } + return npcList; + } + + private bool RuinMoodIfHomeless(NPC npc) + { + if (npc.homeless) + this.AddHappinessReportText("NoHome"); + return npc.homeless; + } + + private bool IsFarFromHome(NPC npc) + { + if ((double) Vector2.Distance(new Vector2((float) npc.homeTileX, (float) npc.homeTileY), new Vector2(npc.Center.X / 16f, npc.Center.Y / 16f)) <= 120.0) + return false; + this.AddHappinessReportText("FarFromHome"); + return true; + } + + private bool IsPlayerInEvilBiomes(Player player) + { + if (player.ZoneCorrupt) + { + this.AddHappinessReportText("HateBiome", (object) new + { + BiomeName = ShopHelper.BiomeNameKey(9) + }); + return true; + } + if (player.ZoneCrimson) + { + this.AddHappinessReportText("HateBiome", (object) new + { + BiomeName = ShopHelper.BiomeNameKey(10) + }); + return true; + } + if (!player.ZoneDungeon) + return false; + this.AddHappinessReportText("HateBiome", (object) new + { + BiomeName = ShopHelper.BiomeNameKey(8) + }); + return true; + } + + private bool IsNotReallyTownNPC(NPC npc) + { + switch (npc.type) + { + case 37: + case 368: + case 453: + return true; + default: + return false; + } + } + } +} diff --git a/GameContent/Skies/AmbientSky.cs b/GameContent/Skies/AmbientSky.cs new file mode 100644 index 0000000..a8bdaac --- /dev/null +++ b/GameContent/Skies/AmbientSky.cs @@ -0,0 +1,1219 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.AmbientSky +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using ReLogic.Utilities; +using System; +using System.Collections.Generic; +using Terraria.DataStructures; +using Terraria.GameContent.Ambience; +using Terraria.Graphics; +using Terraria.Graphics.Effects; +using Terraria.ID; +using Terraria.Utilities; + +namespace Terraria.GameContent.Skies +{ + public class AmbientSky : CustomSky + { + private bool _isActive; + private readonly SlotVector _entities = new SlotVector(500); + private int _frameCounter; + + public override void Activate(Vector2 position, params object[] args) => this._isActive = true; + + public override void Deactivate(params object[] args) => this._isActive = false; + + private bool AnActiveSkyConflictsWithAmbience() => SkyManager.Instance["MonolithMoonLord"].IsActive() || SkyManager.Instance["MoonLord"].IsActive(); + + public override void Update(GameTime gameTime) + { + if (Main.gamePaused) + return; + ++this._frameCounter; + if (Main.netMode != 2 && this.AnActiveSkyConflictsWithAmbience() && SkyManager.Instance["Ambience"].IsActive()) + SkyManager.Instance.Deactivate("Ambience"); + foreach (SlotVector.ItemPair entity in (IEnumerable.ItemPair>) this._entities) + { + // ISSUE: variable of the null type + __Null local = entity.Value; + ((AmbientSky.SkyEntity) local).Update(this._frameCounter); + if (!((AmbientSky.SkyEntity) local).IsActive) + { + this._entities.Remove((SlotId) entity.Id); + if (Main.netMode != 2 && this._entities.Count == 0 && SkyManager.Instance["Ambience"].IsActive()) + SkyManager.Instance.Deactivate("Ambience"); + } + } + } + + public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) + { + if (Main.gameMenu && Main.netMode == 0 && SkyManager.Instance["Ambience"].IsActive()) + { + this._entities.Clear(); + SkyManager.Instance.Deactivate("Ambience"); + } + foreach (SlotVector.ItemPair entity in (IEnumerable.ItemPair>) this._entities) + ((AmbientSky.SkyEntity) entity.Value).Draw(spriteBatch, 3f, minDepth, maxDepth); + } + + public override bool IsActive() => this._isActive; + + public override void Reset() + { + } + + public void Spawn(Player player, SkyEntityType type, int seed) + { + FastRandom random = new FastRandom(seed); + switch (type) + { + case SkyEntityType.BirdsV: + this._entities.Add((AmbientSky.SkyEntity) new AmbientSky.BirdsPackSkyEntity(player, random)); + break; + case SkyEntityType.Wyvern: + this._entities.Add((AmbientSky.SkyEntity) new AmbientSky.WyvernSkyEntity(player, random)); + break; + case SkyEntityType.Airship: + this._entities.Add((AmbientSky.SkyEntity) new AmbientSky.AirshipSkyEntity(player, random)); + break; + case SkyEntityType.AirBalloon: + this._entities.Add((AmbientSky.SkyEntity) new AmbientSky.AirBalloonSkyEntity(player, random)); + break; + case SkyEntityType.Eyeball: + this._entities.Add((AmbientSky.SkyEntity) new AmbientSky.EOCSkyEntity(player, random)); + break; + case SkyEntityType.Meteor: + this._entities.Add((AmbientSky.SkyEntity) new AmbientSky.MeteorSkyEntity(player, random)); + break; + case SkyEntityType.Bats: + List group1 = AmbientSky.BatsGroupSkyEntity.CreateGroup(player, random); + for (int index = 0; index < group1.Count; ++index) + this._entities.Add((AmbientSky.SkyEntity) group1[index]); + break; + case SkyEntityType.Butterflies: + this._entities.Add((AmbientSky.SkyEntity) new AmbientSky.ButterfliesSkyEntity(player, random)); + break; + case SkyEntityType.LostKite: + this._entities.Add((AmbientSky.SkyEntity) new AmbientSky.LostKiteSkyEntity(player, random)); + break; + case SkyEntityType.Vulture: + this._entities.Add((AmbientSky.SkyEntity) new AmbientSky.VultureSkyEntity(player, random)); + break; + case SkyEntityType.PixiePosse: + this._entities.Add((AmbientSky.SkyEntity) new AmbientSky.PixiePosseSkyEntity(player, random)); + break; + case SkyEntityType.Seagulls: + List group2 = AmbientSky.SeagullsGroupSkyEntity.CreateGroup(player, random); + for (int index = 0; index < group2.Count; ++index) + this._entities.Add((AmbientSky.SkyEntity) group2[index]); + break; + case SkyEntityType.SlimeBalloons: + List group3 = AmbientSky.SlimeBalloonGroupSkyEntity.CreateGroup(player, random); + for (int index = 0; index < group3.Count; ++index) + this._entities.Add((AmbientSky.SkyEntity) group3[index]); + break; + case SkyEntityType.Gastropods: + List group4 = AmbientSky.GastropodGroupSkyEntity.CreateGroup(player, random); + for (int index = 0; index < group4.Count; ++index) + this._entities.Add((AmbientSky.SkyEntity) group4[index]); + break; + case SkyEntityType.Pegasus: + this._entities.Add((AmbientSky.SkyEntity) new AmbientSky.PegasusSkyEntity(player, random)); + break; + case SkyEntityType.EaterOfSouls: + this._entities.Add((AmbientSky.SkyEntity) new AmbientSky.EOSSkyEntity(player, random)); + break; + case SkyEntityType.Crimera: + this._entities.Add((AmbientSky.SkyEntity) new AmbientSky.CrimeraSkyEntity(player, random)); + break; + case SkyEntityType.Hellbats: + List group5 = AmbientSky.HellBatsGoupSkyEntity.CreateGroup(player, random); + for (int index = 0; index < group5.Count; ++index) + this._entities.Add((AmbientSky.SkyEntity) group5[index]); + break; + } + if (Main.netMode == 2 || this.AnActiveSkyConflictsWithAmbience() || SkyManager.Instance["Ambience"].IsActive()) + return; + SkyManager.Instance.Activate("Ambience", new Vector2()); + } + + private abstract class SkyEntity + { + public Vector2 Position; + public Asset Texture; + public SpriteFrame Frame; + public float Depth; + public SpriteEffects Effects; + public bool IsActive = true; + public float Rotation; + + public Rectangle SourceRectangle => this.Frame.GetSourceRectangle(this.Texture.Value); + + protected void NextFrame() => this.Frame.CurrentRow = (byte) (((uint) this.Frame.CurrentRow + 1U) % (uint) this.Frame.RowCount); + + public abstract Color GetColor(Color backgroundColor); + + public abstract void Update(int frameCount); + + protected void SetPositionInWorldBasedOnScreenSpace(Vector2 actualWorldSpace) + { + Vector2 vector2 = actualWorldSpace - Main.Camera.Center; + this.Position = Main.Camera.Center + vector2 * (this.Depth / 3f); + } + + public abstract Vector2 GetDrawPosition(); + + public virtual void Draw( + SpriteBatch spriteBatch, + float depthScale, + float minDepth, + float maxDepth) + { + this.CommonDraw(spriteBatch, depthScale, minDepth, maxDepth); + } + + public void CommonDraw( + SpriteBatch spriteBatch, + float depthScale, + float minDepth, + float maxDepth) + { + if ((double) this.Depth <= (double) minDepth || (double) this.Depth > (double) maxDepth) + return; + Vector2 drawPositionByDepth = this.GetDrawPositionByDepth(); + Color color = this.GetColor(Main.ColorOfTheSkies) * Main.atmo; + Vector2 origin = this.SourceRectangle.Size() / 2f; + float scale = depthScale / this.Depth; + spriteBatch.Draw(this.Texture.Value, drawPositionByDepth - Main.Camera.UnscaledPosition, new Rectangle?(this.SourceRectangle), color, this.Rotation, origin, scale, this.Effects, 0.0f); + } + + internal Vector2 GetDrawPositionByDepth() => (this.GetDrawPosition() - Main.Camera.Center) * new Vector2(1f / this.Depth, 0.9f / this.Depth) + Main.Camera.Center; + + internal float Helper_GetOpacityWithAccountingForOceanWaterLine() + { + float t = (this.GetDrawPositionByDepth() - Main.Camera.UnscaledPosition).Y + (float) (this.SourceRectangle.Height / 2); + float yscreenPosition = AmbientSkyDrawCache.Instance.OceanLineInfo.YScreenPosition; + return 1f - Utils.GetLerpValue(yscreenPosition - 10f, yscreenPosition - 2f, t, true) * AmbientSkyDrawCache.Instance.OceanLineInfo.OceanOpacity; + } + } + + private class FadingSkyEntity : AmbientSky.SkyEntity + { + protected int LifeTime; + protected Vector2 Velocity; + protected int FramingSpeed; + protected int TimeEntitySpawnedIn; + protected float Opacity; + protected float BrightnessLerper; + protected float FinalOpacityMultiplier; + protected float OpacityNormalizedTimeToFadeIn; + protected float OpacityNormalizedTimeToFadeOut; + protected int FrameOffset; + + public FadingSkyEntity() + { + this.Opacity = 0.0f; + this.TimeEntitySpawnedIn = -1; + this.BrightnessLerper = 0.0f; + this.FinalOpacityMultiplier = 1f; + this.OpacityNormalizedTimeToFadeIn = 0.1f; + this.OpacityNormalizedTimeToFadeOut = 0.9f; + } + + public override void Update(int frameCount) + { + if (this.IsMovementDone(frameCount)) + return; + this.UpdateOpacity(frameCount); + if ((frameCount + this.FrameOffset) % this.FramingSpeed == 0) + this.NextFrame(); + this.UpdateVelocity(frameCount); + this.Position = this.Position + this.Velocity; + } + + public virtual void UpdateVelocity(int frameCount) + { + } + + private void UpdateOpacity(int frameCount) + { + int num = frameCount - this.TimeEntitySpawnedIn; + if ((double) num >= (double) this.LifeTime * (double) this.OpacityNormalizedTimeToFadeOut) + this.Opacity = Utils.GetLerpValue((float) this.LifeTime, (float) this.LifeTime * this.OpacityNormalizedTimeToFadeOut, (float) num, true); + else + this.Opacity = Utils.GetLerpValue(0.0f, (float) this.LifeTime * this.OpacityNormalizedTimeToFadeIn, (float) num, true); + } + + private bool IsMovementDone(int frameCount) + { + if (this.TimeEntitySpawnedIn == -1) + this.TimeEntitySpawnedIn = frameCount; + if (frameCount - this.TimeEntitySpawnedIn < this.LifeTime) + return false; + this.IsActive = false; + return true; + } + + public override Color GetColor(Color backgroundColor) => Color.Lerp(backgroundColor, Color.White, this.BrightnessLerper) * this.Opacity * this.FinalOpacityMultiplier * this.Helper_GetOpacityWithAccountingForOceanWaterLine(); + + public void StartFadingOut(int currentFrameCount) + { + int num1 = (int) ((double) this.LifeTime * (double) this.OpacityNormalizedTimeToFadeOut); + int num2 = currentFrameCount - num1; + if (num2 >= this.TimeEntitySpawnedIn) + return; + this.TimeEntitySpawnedIn = num2; + } + + public override Vector2 GetDrawPosition() => this.Position; + } + + private class ButterfliesSkyEntity : AmbientSky.FadingSkyEntity + { + public ButterfliesSkyEntity(Player player, FastRandom random) + { + VirtualCamera virtualCamera = new VirtualCamera(player); + this.Effects = (double) Main.WindForVisuals > 0.0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + int num1 = 100; + if (this.Effects == SpriteEffects.FlipHorizontally) + this.Position.X = virtualCamera.Position.X + virtualCamera.Size.X + (float) num1; + else + this.Position.X = virtualCamera.Position.X - (float) num1; + this.Position.Y = (float) ((double) random.NextFloat() * (Main.worldSurface * 16.0 - 4000.0) + 4000.0); + this.Depth = (float) ((double) random.NextFloat() * 3.0 + 3.0); + this.SetPositionInWorldBasedOnScreenSpace(this.Position); + int num2 = random.Next(2) + 1; + this.Texture = Main.Assets.Request("Images/Backgrounds/Ambience/ButterflySwarm" + (object) num2, (AssetRequestMode) 1); + this.Frame = new SpriteFrame((byte) 1, num2 == 2 ? (byte) 19 : (byte) 17); + this.LifeTime = random.Next(60, 121) * 60; + this.OpacityNormalizedTimeToFadeIn = 0.15f; + this.OpacityNormalizedTimeToFadeOut = 0.85f; + this.BrightnessLerper = 0.2f; + this.FinalOpacityMultiplier = 1f; + this.FramingSpeed = 5; + } + + public override void UpdateVelocity(int frameCount) => this.Velocity = new Vector2((float) ((0.100000001490116 + (double) Math.Abs(Main.WindForVisuals) * 0.0500000007450581) * (this.Effects == SpriteEffects.FlipHorizontally ? -1.0 : 1.0)), 0.0f); + + public override void Update(int frameCount) + { + base.Update(frameCount); + if (!Main.IsItRaining && Main.dayTime && !Main.eclipse) + return; + this.StartFadingOut(frameCount); + } + } + + private class LostKiteSkyEntity : AmbientSky.FadingSkyEntity + { + public LostKiteSkyEntity(Player player, FastRandom random) + { + VirtualCamera virtualCamera = new VirtualCamera(player); + this.Effects = (double) Main.WindForVisuals > 0.0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + int num1 = 100; + if (this.Effects == SpriteEffects.FlipHorizontally) + this.Position.X = virtualCamera.Position.X + virtualCamera.Size.X + (float) num1; + else + this.Position.X = virtualCamera.Position.X - (float) num1; + this.Position.Y = (float) ((double) random.NextFloat() * (Main.worldSurface * 16.0 - 1600.0 - 2400.0) + 2400.0); + this.Depth = (float) ((double) random.NextFloat() * 3.0 + 3.0); + this.SetPositionInWorldBasedOnScreenSpace(this.Position); + this.Texture = Main.Assets.Request("Images/Backgrounds/Ambience/LostKite", (AssetRequestMode) 1); + this.Frame = new SpriteFrame((byte) 1, (byte) 42); + this.LifeTime = random.Next(60, 121) * 60; + this.OpacityNormalizedTimeToFadeIn = 0.15f; + this.OpacityNormalizedTimeToFadeOut = 0.85f; + this.BrightnessLerper = 0.2f; + this.FinalOpacityMultiplier = 1f; + this.FramingSpeed = 6; + int num2 = random.Next((int) this.Frame.RowCount); + for (int index = 0; index < num2; ++index) + this.NextFrame(); + } + + public override void UpdateVelocity(int frameCount) + { + float num = (float) (1.20000004768372 + (double) Math.Abs(Main.WindForVisuals) * 3.0); + if (Main.IsItStorming) + num *= 1.5f; + this.Velocity = new Vector2(num * (this.Effects == SpriteEffects.FlipHorizontally ? -1f : 1f), 0.0f); + } + + public override void Update(int frameCount) + { + if (Main.IsItStorming) + this.FramingSpeed = 4; + this.Effects = (double) Main.WindForVisuals > 0.0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + base.Update(frameCount); + if (Main.dayTime && !Main.eclipse) + return; + this.StartFadingOut(frameCount); + } + } + + private class PegasusSkyEntity : AmbientSky.FadingSkyEntity + { + public PegasusSkyEntity(Player player, FastRandom random) + { + VirtualCamera virtualCamera = new VirtualCamera(player); + this.Effects = (double) Main.WindForVisuals > 0.0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + int num = 100; + if (this.Effects == SpriteEffects.FlipHorizontally) + this.Position.X = virtualCamera.Position.X + virtualCamera.Size.X + (float) num; + else + this.Position.X = virtualCamera.Position.X - (float) num; + this.Position.Y = (float) ((double) random.NextFloat() * (Main.worldSurface * 16.0 - 1600.0 - 2400.0) + 2400.0); + this.Depth = (float) ((double) random.NextFloat() * 3.0 + 3.0); + this.SetPositionInWorldBasedOnScreenSpace(this.Position); + this.Texture = Main.Assets.Request("Images/Backgrounds/Ambience/Pegasus", (AssetRequestMode) 1); + this.Frame = new SpriteFrame((byte) 1, (byte) 11); + this.LifeTime = random.Next(60, 121) * 60; + this.OpacityNormalizedTimeToFadeIn = 0.15f; + this.OpacityNormalizedTimeToFadeOut = 0.85f; + this.BrightnessLerper = 0.2f; + this.FinalOpacityMultiplier = 1f; + this.FramingSpeed = 5; + } + + public override void UpdateVelocity(int frameCount) => this.Velocity = new Vector2((float) ((1.5 + (double) Math.Abs(Main.WindForVisuals) * 0.600000023841858) * (this.Effects == SpriteEffects.FlipHorizontally ? -1.0 : 1.0)), 0.0f); + + public override void Update(int frameCount) + { + base.Update(frameCount); + if (!Main.IsItRaining && Main.dayTime && !Main.eclipse) + return; + this.StartFadingOut(frameCount); + } + + public override Color GetColor(Color backgroundColor) => base.GetColor(backgroundColor) * Main.bgAlphaFrontLayer[6]; + } + + private class VultureSkyEntity : AmbientSky.FadingSkyEntity + { + public VultureSkyEntity(Player player, FastRandom random) + { + VirtualCamera virtualCamera = new VirtualCamera(player); + this.Effects = (double) Main.WindForVisuals > 0.0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + int num = 100; + if (this.Effects == SpriteEffects.FlipHorizontally) + this.Position.X = virtualCamera.Position.X + virtualCamera.Size.X + (float) num; + else + this.Position.X = virtualCamera.Position.X - (float) num; + this.Position.Y = (float) ((double) random.NextFloat() * (Main.worldSurface * 16.0 - 1600.0 - 2400.0) + 2400.0); + this.Depth = (float) ((double) random.NextFloat() * 3.0 + 3.0); + this.SetPositionInWorldBasedOnScreenSpace(this.Position); + this.Texture = Main.Assets.Request("Images/Backgrounds/Ambience/Vulture", (AssetRequestMode) 1); + this.Frame = new SpriteFrame((byte) 1, (byte) 10); + this.LifeTime = random.Next(60, 121) * 60; + this.OpacityNormalizedTimeToFadeIn = 0.15f; + this.OpacityNormalizedTimeToFadeOut = 0.85f; + this.BrightnessLerper = 0.2f; + this.FinalOpacityMultiplier = 1f; + this.FramingSpeed = 5; + } + + public override void UpdateVelocity(int frameCount) => this.Velocity = new Vector2((float) ((3.0 + (double) Math.Abs(Main.WindForVisuals) * 0.800000011920929) * (this.Effects == SpriteEffects.FlipHorizontally ? -1.0 : 1.0)), 0.0f); + + public override void Update(int frameCount) + { + base.Update(frameCount); + if (!Main.IsItRaining && Main.dayTime && !Main.eclipse) + return; + this.StartFadingOut(frameCount); + } + + public override Color GetColor(Color backgroundColor) => base.GetColor(backgroundColor) * Math.Max(Main.bgAlphaFrontLayer[2], Main.bgAlphaFrontLayer[5]); + } + + private class PixiePosseSkyEntity : AmbientSky.FadingSkyEntity + { + private int pixieType = 1; + + public PixiePosseSkyEntity(Player player, FastRandom random) + { + VirtualCamera virtualCamera = new VirtualCamera(player); + this.Effects = (double) Main.WindForVisuals > 0.0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + int num = 100; + if (this.Effects == SpriteEffects.FlipHorizontally) + this.Position.X = virtualCamera.Position.X + virtualCamera.Size.X + (float) num; + else + this.Position.X = virtualCamera.Position.X - (float) num; + this.Position.Y = (float) ((double) random.NextFloat() * (Main.worldSurface * 16.0 - 4000.0) + 4000.0); + this.Depth = (float) ((double) random.NextFloat() * 3.0 + 2.0); + this.SetPositionInWorldBasedOnScreenSpace(this.Position); + if (!Main.dayTime) + this.pixieType = 2; + this.Texture = Main.Assets.Request("Images/Backgrounds/Ambience/PixiePosse" + (object) this.pixieType, (AssetRequestMode) 1); + this.Frame = new SpriteFrame((byte) 1, (byte) 25); + this.LifeTime = random.Next(60, 121) * 60; + this.OpacityNormalizedTimeToFadeIn = 0.15f; + this.OpacityNormalizedTimeToFadeOut = 0.85f; + this.BrightnessLerper = 0.6f; + this.FinalOpacityMultiplier = 1f; + this.FramingSpeed = 5; + } + + public override void UpdateVelocity(int frameCount) => this.Velocity = new Vector2((float) ((0.119999997317791 + (double) Math.Abs(Main.WindForVisuals) * 0.0799999982118607) * (this.Effects == SpriteEffects.FlipHorizontally ? -1.0 : 1.0)), 0.0f); + + public override void Update(int frameCount) + { + base.Update(frameCount); + if ((this.pixieType != 1 || Main.dayTime) && (this.pixieType != 2 || !Main.dayTime) && !Main.IsItRaining && !Main.eclipse && !Main.bloodMoon && !Main.pumpkinMoon && !Main.snowMoon) + return; + this.StartFadingOut(frameCount); + } + + public override void Draw( + SpriteBatch spriteBatch, + float depthScale, + float minDepth, + float maxDepth) + { + this.CommonDraw(spriteBatch, depthScale - 0.1f, minDepth, maxDepth); + } + } + + private class BirdsPackSkyEntity : AmbientSky.FadingSkyEntity + { + public BirdsPackSkyEntity(Player player, FastRandom random) + { + VirtualCamera virtualCamera = new VirtualCamera(player); + this.Effects = (double) Main.WindForVisuals > 0.0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + int num = 100; + if (this.Effects == SpriteEffects.FlipHorizontally) + this.Position.X = virtualCamera.Position.X + virtualCamera.Size.X + (float) num; + else + this.Position.X = virtualCamera.Position.X - (float) num; + this.Position.Y = (float) ((double) random.NextFloat() * (Main.worldSurface * 16.0 - 1600.0 - 2400.0) + 2400.0); + this.Depth = (float) ((double) random.NextFloat() * 3.0 + 3.0); + this.SetPositionInWorldBasedOnScreenSpace(this.Position); + this.Texture = Main.Assets.Request("Images/Backgrounds/Ambience/BirdsVShape", (AssetRequestMode) 1); + this.Frame = new SpriteFrame((byte) 1, (byte) 4); + this.LifeTime = random.Next(60, 121) * 60; + this.OpacityNormalizedTimeToFadeIn = 0.15f; + this.OpacityNormalizedTimeToFadeOut = 0.85f; + this.BrightnessLerper = 0.2f; + this.FinalOpacityMultiplier = 1f; + this.FramingSpeed = 5; + } + + public override void UpdateVelocity(int frameCount) => this.Velocity = new Vector2((float) ((3.0 + (double) Math.Abs(Main.WindForVisuals) * 0.800000011920929) * (this.Effects == SpriteEffects.FlipHorizontally ? -1.0 : 1.0)), 0.0f); + + public override void Update(int frameCount) + { + base.Update(frameCount); + if (!Main.IsItRaining && Main.dayTime && !Main.eclipse) + return; + this.StartFadingOut(frameCount); + } + } + + private class SeagullsGroupSkyEntity : AmbientSky.FadingSkyEntity + { + private Vector2 _magnetAccelerations; + private Vector2 _magnetPointTarget; + private Vector2 _positionVsMagnet; + private Vector2 _velocityVsMagnet; + + public SeagullsGroupSkyEntity(Player player, FastRandom random) + { + VirtualCamera virtualCamera = new VirtualCamera(player); + this.Effects = (double) Main.WindForVisuals > 0.0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + int num1 = 100; + if (this.Effects == SpriteEffects.FlipHorizontally) + this.Position.X = virtualCamera.Position.X + virtualCamera.Size.X + (float) num1; + else + this.Position.X = virtualCamera.Position.X - (float) num1; + this.Position.Y = (float) ((double) random.NextFloat() * (Main.worldSurface * 16.0 - 1600.0 - 2400.0) + 2400.0); + this.Depth = (float) ((double) random.NextFloat() * 3.0 + 3.0); + this.SetPositionInWorldBasedOnScreenSpace(this.Position); + this.Texture = Main.Assets.Request("Images/Backgrounds/Ambience/Seagull", (AssetRequestMode) 1); + this.Frame = new SpriteFrame((byte) 1, (byte) 9); + this.LifeTime = random.Next(60, 121) * 60; + this.OpacityNormalizedTimeToFadeIn = 0.1f; + this.OpacityNormalizedTimeToFadeOut = 0.9f; + this.BrightnessLerper = 0.2f; + this.FinalOpacityMultiplier = 1f; + this.FramingSpeed = 4; + this.FrameOffset = random.Next(0, (int) this.Frame.RowCount); + int num2 = random.Next((int) this.Frame.RowCount); + for (int index = 0; index < num2; ++index) + this.NextFrame(); + } + + public override void UpdateVelocity(int frameCount) + { + this._velocityVsMagnet += this._magnetAccelerations * new Vector2((float) Math.Sign(this._magnetPointTarget.X - this._positionVsMagnet.X), (float) Math.Sign(this._magnetPointTarget.Y - this._positionVsMagnet.Y)); + this._positionVsMagnet += this._velocityVsMagnet; + this.Velocity = new Vector2((float) (4.0 * (this.Effects == SpriteEffects.FlipHorizontally ? -1.0 : 1.0)), 0.0f) + this._velocityVsMagnet; + } + + public override void Update(int frameCount) + { + base.Update(frameCount); + if (!Main.IsItRaining && Main.dayTime && !Main.eclipse) + return; + this.StartFadingOut(frameCount); + } + + public void SetMagnetization(Vector2 accelerations, Vector2 targetOffset) + { + this._magnetAccelerations = accelerations; + this._magnetPointTarget = targetOffset; + } + + public override Color GetColor(Color backgroundColor) => base.GetColor(backgroundColor) * Main.bgAlphaFrontLayer[4]; + + public override void Draw( + SpriteBatch spriteBatch, + float depthScale, + float minDepth, + float maxDepth) + { + this.CommonDraw(spriteBatch, depthScale - 1.5f, minDepth, maxDepth); + } + + public static List CreateGroup( + Player player, + FastRandom random) + { + List seagullsGroupSkyEntityList = new List(); + int num1 = 100; + int num2 = random.Next(5, 9); + float num3 = 100f; + VirtualCamera virtualCamera = new VirtualCamera(player); + SpriteEffects spriteEffects = (double) Main.WindForVisuals > 0.0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + Vector2 vector2_1 = new Vector2(); + vector2_1.X = spriteEffects != SpriteEffects.FlipHorizontally ? virtualCamera.Position.X - (float) num1 : virtualCamera.Position.X + virtualCamera.Size.X + (float) num1; + vector2_1.Y = (float) ((double) random.NextFloat() * (Main.worldSurface * 16.0 - 1600.0 - 2400.0) + 2400.0); + float num4 = (float) ((double) random.NextFloat() * 2.0 + 1.0); + int num5 = random.Next(30, 61) * 60; + Vector2 vector2_2 = new Vector2((float) ((double) random.NextFloat() * 0.5 + 0.5), (float) ((double) random.NextFloat() * 0.5 + 0.5)); + Vector2 targetOffset = new Vector2((float) ((double) random.NextFloat() * 2.0 - 1.0), (float) ((double) random.NextFloat() * 2.0 - 1.0)) * num3; + for (int index = 0; index < num2; ++index) + { + AmbientSky.SeagullsGroupSkyEntity seagullsGroupSkyEntity = new AmbientSky.SeagullsGroupSkyEntity(player, random); + seagullsGroupSkyEntity.Depth = num4 + random.NextFloat() * 0.5f; + seagullsGroupSkyEntity.Position = vector2_1 + new Vector2((float) ((double) random.NextFloat() * 20.0 - 10.0), random.NextFloat() * 3f) * 50f; + seagullsGroupSkyEntity.Effects = spriteEffects; + seagullsGroupSkyEntity.SetPositionInWorldBasedOnScreenSpace(seagullsGroupSkyEntity.Position); + seagullsGroupSkyEntity.LifeTime = num5 + random.Next(301); + seagullsGroupSkyEntity.SetMagnetization(vector2_2 * (float) ((double) random.NextFloat() * 0.300000011920929 + 0.850000023841858) * 0.05f, targetOffset); + seagullsGroupSkyEntityList.Add(seagullsGroupSkyEntity); + } + return seagullsGroupSkyEntityList; + } + } + + private class GastropodGroupSkyEntity : AmbientSky.FadingSkyEntity + { + private Vector2 _magnetAccelerations; + private Vector2 _magnetPointTarget; + private Vector2 _positionVsMagnet; + private Vector2 _velocityVsMagnet; + + public GastropodGroupSkyEntity(Player player, FastRandom random) + { + VirtualCamera virtualCamera = new VirtualCamera(player); + this.Effects = (double) Main.WindForVisuals > 0.0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + int num = 100; + if (this.Effects == SpriteEffects.FlipHorizontally) + this.Position.X = virtualCamera.Position.X + virtualCamera.Size.X + (float) num; + else + this.Position.X = virtualCamera.Position.X - (float) num; + this.Position.Y = (float) ((double) random.NextFloat() * (Main.worldSurface * 16.0 - 1600.0 - 3200.0) + 3200.0); + this.Depth = (float) ((double) random.NextFloat() * 3.0 + 2.0); + this.SetPositionInWorldBasedOnScreenSpace(this.Position); + this.Texture = Main.Assets.Request("Images/Backgrounds/Ambience/Gastropod", (AssetRequestMode) 1); + this.Frame = new SpriteFrame((byte) 1, (byte) 1); + this.LifeTime = random.Next(60, 121) * 60; + this.OpacityNormalizedTimeToFadeIn = 0.1f; + this.OpacityNormalizedTimeToFadeOut = 0.9f; + this.BrightnessLerper = 0.75f; + this.FinalOpacityMultiplier = 1f; + this.FramingSpeed = int.MaxValue; + } + + public override void UpdateVelocity(int frameCount) + { + this._velocityVsMagnet += this._magnetAccelerations * new Vector2((float) Math.Sign(this._magnetPointTarget.X - this._positionVsMagnet.X), (float) Math.Sign(this._magnetPointTarget.Y - this._positionVsMagnet.Y)); + this._positionVsMagnet += this._velocityVsMagnet; + this.Velocity = new Vector2((float) ((1.5 + (double) Math.Abs(Main.WindForVisuals) * 0.200000002980232) * (this.Effects == SpriteEffects.FlipHorizontally ? -1.0 : 1.0)), 0.0f) + this._velocityVsMagnet; + this.Rotation = this.Velocity.X * 0.1f; + } + + public override void Update(int frameCount) + { + base.Update(frameCount); + if (!Main.IsItRaining && !Main.dayTime && !Main.bloodMoon && !Main.pumpkinMoon && !Main.snowMoon) + return; + this.StartFadingOut(frameCount); + } + + public override Color GetColor(Color backgroundColor) => Color.Lerp(backgroundColor, Colors.AmbientNPCGastropodLight, this.BrightnessLerper) * this.Opacity * this.FinalOpacityMultiplier; + + public override void Draw( + SpriteBatch spriteBatch, + float depthScale, + float minDepth, + float maxDepth) + { + this.CommonDraw(spriteBatch, depthScale - 0.1f, minDepth, maxDepth); + } + + public void SetMagnetization(Vector2 accelerations, Vector2 targetOffset) + { + this._magnetAccelerations = accelerations; + this._magnetPointTarget = targetOffset; + } + + public static List CreateGroup( + Player player, + FastRandom random) + { + List gastropodGroupSkyEntityList = new List(); + int num1 = 100; + int num2 = random.Next(3, 8); + VirtualCamera virtualCamera = new VirtualCamera(player); + SpriteEffects spriteEffects = (double) Main.WindForVisuals > 0.0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + Vector2 vector2_1 = new Vector2(); + vector2_1.X = spriteEffects != SpriteEffects.FlipHorizontally ? virtualCamera.Position.X - (float) num1 : virtualCamera.Position.X + virtualCamera.Size.X + (float) num1; + vector2_1.Y = (float) ((double) random.NextFloat() * (Main.worldSurface * 16.0 - 1600.0 - 3200.0) + 3200.0); + float num3 = (float) ((double) random.NextFloat() * 3.0 + 2.0); + int num4 = random.Next(30, 61) * 60; + Vector2 vector2_2 = new Vector2((float) ((double) random.NextFloat() * 0.100000001490116 + 0.100000001490116), (float) ((double) random.NextFloat() * 0.300000011920929 + 0.300000011920929)); + Vector2 targetOffset = new Vector2((float) ((double) random.NextFloat() * 2.0 - 1.0), (float) ((double) random.NextFloat() * 2.0 - 1.0)) * 120f; + for (int index = 0; index < num2; ++index) + { + AmbientSky.GastropodGroupSkyEntity gastropodGroupSkyEntity = new AmbientSky.GastropodGroupSkyEntity(player, random); + gastropodGroupSkyEntity.Depth = num3 + random.NextFloat() * 0.5f; + gastropodGroupSkyEntity.Position = vector2_1 + new Vector2((float) ((double) random.NextFloat() * 20.0 - 10.0), random.NextFloat() * 3f) * 60f; + gastropodGroupSkyEntity.Effects = spriteEffects; + gastropodGroupSkyEntity.SetPositionInWorldBasedOnScreenSpace(gastropodGroupSkyEntity.Position); + gastropodGroupSkyEntity.LifeTime = num4 + random.Next(301); + gastropodGroupSkyEntity.SetMagnetization(vector2_2 * (random.NextFloat() * 0.5f) * 0.05f, targetOffset); + gastropodGroupSkyEntityList.Add(gastropodGroupSkyEntity); + } + return gastropodGroupSkyEntityList; + } + } + + private class SlimeBalloonGroupSkyEntity : AmbientSky.FadingSkyEntity + { + private Vector2 _magnetAccelerations; + private Vector2 _magnetPointTarget; + private Vector2 _positionVsMagnet; + private Vector2 _velocityVsMagnet; + + public SlimeBalloonGroupSkyEntity(Player player, FastRandom random) + { + VirtualCamera virtualCamera = new VirtualCamera(player); + this.Effects = (double) Main.WindForVisuals > 0.0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + int num = 100; + if (this.Effects == SpriteEffects.FlipHorizontally) + this.Position.X = virtualCamera.Position.X + virtualCamera.Size.X + (float) num; + else + this.Position.X = virtualCamera.Position.X - (float) num; + this.Position.Y = (float) ((double) random.NextFloat() * (Main.worldSurface * 16.0 - 1600.0 - 4000.0) + 4000.0); + this.Depth = (float) ((double) random.NextFloat() * 3.0 + 3.0); + this.SetPositionInWorldBasedOnScreenSpace(this.Position); + this.Texture = Main.Assets.Request("Images/Backgrounds/Ambience/SlimeBalloons", (AssetRequestMode) 1); + this.Frame = new SpriteFrame((byte) 1, (byte) 7); + this.Frame.CurrentRow = (byte) random.Next(7); + this.LifeTime = random.Next(60, 121) * 60; + this.OpacityNormalizedTimeToFadeIn = 0.025f; + this.OpacityNormalizedTimeToFadeOut = 0.975f; + this.BrightnessLerper = 0.2f; + this.FinalOpacityMultiplier = 1f; + this.FramingSpeed = int.MaxValue; + } + + public override void UpdateVelocity(int frameCount) + { + this._velocityVsMagnet += this._magnetAccelerations * new Vector2((float) Math.Sign(this._magnetPointTarget.X - this._positionVsMagnet.X), (float) Math.Sign(this._magnetPointTarget.Y - this._positionVsMagnet.Y)); + this._positionVsMagnet += this._velocityVsMagnet; + this.Velocity = new Vector2((float) ((1.0 + (double) Math.Abs(Main.WindForVisuals) * 1.0) * (this.Effects == SpriteEffects.FlipHorizontally ? -1.0 : 1.0)), -0.01f) + this._velocityVsMagnet; + this.Rotation = this.Velocity.X * 0.1f; + } + + public override void Update(int frameCount) + { + base.Update(frameCount); + this.Effects = (double) Main.WindForVisuals > 0.0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + if (Main.IsItAHappyWindyDay && !Main.IsItRaining && Main.dayTime && !Main.eclipse) + return; + this.StartFadingOut(frameCount); + } + + public void SetMagnetization(Vector2 accelerations, Vector2 targetOffset) + { + this._magnetAccelerations = accelerations; + this._magnetPointTarget = targetOffset; + } + + public static List CreateGroup( + Player player, + FastRandom random) + { + List balloonGroupSkyEntityList = new List(); + int num1 = 100; + int num2 = random.Next(5, 10); + VirtualCamera virtualCamera = new VirtualCamera(player); + SpriteEffects spriteEffects = (double) Main.WindForVisuals > 0.0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + Vector2 vector2_1 = new Vector2(); + vector2_1.X = spriteEffects != SpriteEffects.FlipHorizontally ? virtualCamera.Position.X - (float) num1 : virtualCamera.Position.X + virtualCamera.Size.X + (float) num1; + vector2_1.Y = (float) ((double) random.NextFloat() * (Main.worldSurface * 16.0 - 1600.0 - 2400.0) + 2400.0); + float num3 = (float) ((double) random.NextFloat() * 3.0 + 3.0); + int num4 = random.Next(80, 121) * 60; + Vector2 vector2_2 = new Vector2((float) ((double) random.NextFloat() * 0.100000001490116 + 0.100000001490116), (float) ((double) random.NextFloat() * 0.100000001490116 + 0.100000001490116)); + Vector2 targetOffset = new Vector2((float) ((double) random.NextFloat() * 2.0 - 1.0), (float) ((double) random.NextFloat() * 2.0 - 1.0)) * 150f; + for (int index = 0; index < num2; ++index) + { + AmbientSky.SlimeBalloonGroupSkyEntity balloonGroupSkyEntity = new AmbientSky.SlimeBalloonGroupSkyEntity(player, random); + balloonGroupSkyEntity.Depth = num3 + random.NextFloat() * 0.5f; + balloonGroupSkyEntity.Position = vector2_1 + new Vector2((float) ((double) random.NextFloat() * 20.0 - 10.0), random.NextFloat() * 3f) * 80f; + balloonGroupSkyEntity.Effects = spriteEffects; + balloonGroupSkyEntity.SetPositionInWorldBasedOnScreenSpace(balloonGroupSkyEntity.Position); + balloonGroupSkyEntity.LifeTime = num4 + random.Next(301); + balloonGroupSkyEntity.SetMagnetization(vector2_2 * (random.NextFloat() * 0.2f) * 0.05f, targetOffset); + balloonGroupSkyEntityList.Add(balloonGroupSkyEntity); + } + return balloonGroupSkyEntityList; + } + } + + private class HellBatsGoupSkyEntity : AmbientSky.FadingSkyEntity + { + private Vector2 _magnetAccelerations; + private Vector2 _magnetPointTarget; + private Vector2 _positionVsMagnet; + private Vector2 _velocityVsMagnet; + + public HellBatsGoupSkyEntity(Player player, FastRandom random) + { + VirtualCamera virtualCamera = new VirtualCamera(player); + this.Effects = (double) Main.WindForVisuals > 0.0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + int num1 = 100; + if (this.Effects == SpriteEffects.FlipHorizontally) + this.Position.X = virtualCamera.Position.X + virtualCamera.Size.X + (float) num1; + else + this.Position.X = virtualCamera.Position.X - (float) num1; + this.Position.Y = random.NextFloat() * 400f + (float) (Main.UnderworldLayer * 16); + this.Depth = (float) ((double) random.NextFloat() * 5.0 + 3.0); + this.SetPositionInWorldBasedOnScreenSpace(this.Position); + this.Texture = Main.Assets.Request("Images/Backgrounds/Ambience/HellBat" + (object) random.Next(1, 3), (AssetRequestMode) 1); + this.Frame = new SpriteFrame((byte) 1, (byte) 10); + this.LifeTime = random.Next(60, 121) * 60; + this.OpacityNormalizedTimeToFadeIn = 0.1f; + this.OpacityNormalizedTimeToFadeOut = 0.9f; + this.BrightnessLerper = 0.2f; + this.FinalOpacityMultiplier = 1f; + this.FramingSpeed = 4; + this.FrameOffset = random.Next(0, (int) this.Frame.RowCount); + int num2 = random.Next((int) this.Frame.RowCount); + for (int index = 0; index < num2; ++index) + this.NextFrame(); + } + + public override void UpdateVelocity(int frameCount) + { + this._velocityVsMagnet += this._magnetAccelerations * new Vector2((float) Math.Sign(this._magnetPointTarget.X - this._positionVsMagnet.X), (float) Math.Sign(this._magnetPointTarget.Y - this._positionVsMagnet.Y)); + this._positionVsMagnet += this._velocityVsMagnet; + this.Velocity = new Vector2((float) ((3.0 + (double) Math.Abs(Main.WindForVisuals) * 0.800000011920929) * (this.Effects == SpriteEffects.FlipHorizontally ? -1.0 : 1.0)), 0.0f) + this._velocityVsMagnet; + } + + public override void Update(int frameCount) => base.Update(frameCount); + + public void SetMagnetization(Vector2 accelerations, Vector2 targetOffset) + { + this._magnetAccelerations = accelerations; + this._magnetPointTarget = targetOffset; + } + + public override Color GetColor(Color backgroundColor) => Color.Lerp(Color.White, Color.Gray, this.Depth / 15f) * this.Opacity * this.FinalOpacityMultiplier; + + public static List CreateGroup( + Player player, + FastRandom random) + { + List batsGoupSkyEntityList = new List(); + int num1 = 100; + int num2 = random.Next(20, 40); + VirtualCamera virtualCamera = new VirtualCamera(player); + SpriteEffects spriteEffects = (double) Main.WindForVisuals > 0.0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + Vector2 vector2_1 = new Vector2(); + vector2_1.X = spriteEffects != SpriteEffects.FlipHorizontally ? virtualCamera.Position.X - (float) num1 : virtualCamera.Position.X + virtualCamera.Size.X + (float) num1; + vector2_1.Y = random.NextFloat() * 800f + (float) (Main.UnderworldLayer * 16); + float num3 = (float) ((double) random.NextFloat() * 5.0 + 3.0); + int num4 = random.Next(30, 61) * 60; + Vector2 vector2_2 = new Vector2((float) ((double) random.NextFloat() * 0.5 + 0.5), (float) ((double) random.NextFloat() * 0.5 + 0.5)); + Vector2 targetOffset = new Vector2((float) ((double) random.NextFloat() * 2.0 - 1.0), (float) ((double) random.NextFloat() * 2.0 - 1.0)) * 100f; + for (int index = 0; index < num2; ++index) + { + AmbientSky.HellBatsGoupSkyEntity batsGoupSkyEntity = new AmbientSky.HellBatsGoupSkyEntity(player, random); + batsGoupSkyEntity.Depth = num3 + random.NextFloat() * 0.5f; + batsGoupSkyEntity.Position = vector2_1 + new Vector2((float) ((double) random.NextFloat() * 20.0 - 10.0), random.NextFloat() * 3f) * 50f; + batsGoupSkyEntity.Effects = spriteEffects; + batsGoupSkyEntity.SetPositionInWorldBasedOnScreenSpace(batsGoupSkyEntity.Position); + batsGoupSkyEntity.LifeTime = num4 + random.Next(301); + batsGoupSkyEntity.SetMagnetization(vector2_2 * (float) ((double) random.NextFloat() * 0.300000011920929 + 0.850000023841858) * 0.05f, targetOffset); + batsGoupSkyEntityList.Add(batsGoupSkyEntity); + } + return batsGoupSkyEntityList; + } + } + + private class BatsGroupSkyEntity : AmbientSky.FadingSkyEntity + { + private Vector2 _magnetAccelerations; + private Vector2 _magnetPointTarget; + private Vector2 _positionVsMagnet; + private Vector2 _velocityVsMagnet; + + public BatsGroupSkyEntity(Player player, FastRandom random) + { + VirtualCamera virtualCamera = new VirtualCamera(player); + this.Effects = (double) Main.WindForVisuals > 0.0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + int num1 = 100; + if (this.Effects == SpriteEffects.FlipHorizontally) + this.Position.X = virtualCamera.Position.X + virtualCamera.Size.X + (float) num1; + else + this.Position.X = virtualCamera.Position.X - (float) num1; + this.Position.Y = (float) ((double) random.NextFloat() * (Main.worldSurface * 16.0 - 1600.0 - 2400.0) + 2400.0); + this.Depth = (float) ((double) random.NextFloat() * 3.0 + 3.0); + this.SetPositionInWorldBasedOnScreenSpace(this.Position); + this.Texture = Main.Assets.Request("Images/Backgrounds/Ambience/Bat" + (object) random.Next(1, 4), (AssetRequestMode) 1); + this.Frame = new SpriteFrame((byte) 1, (byte) 10); + this.LifeTime = random.Next(60, 121) * 60; + this.OpacityNormalizedTimeToFadeIn = 0.1f; + this.OpacityNormalizedTimeToFadeOut = 0.9f; + this.BrightnessLerper = 0.2f; + this.FinalOpacityMultiplier = 1f; + this.FramingSpeed = 4; + this.FrameOffset = random.Next(0, (int) this.Frame.RowCount); + int num2 = random.Next((int) this.Frame.RowCount); + for (int index = 0; index < num2; ++index) + this.NextFrame(); + } + + public override void UpdateVelocity(int frameCount) + { + this._velocityVsMagnet += this._magnetAccelerations * new Vector2((float) Math.Sign(this._magnetPointTarget.X - this._positionVsMagnet.X), (float) Math.Sign(this._magnetPointTarget.Y - this._positionVsMagnet.Y)); + this._positionVsMagnet += this._velocityVsMagnet; + this.Velocity = new Vector2((float) ((3.0 + (double) Math.Abs(Main.WindForVisuals) * 0.800000011920929) * (this.Effects == SpriteEffects.FlipHorizontally ? -1.0 : 1.0)), 0.0f) + this._velocityVsMagnet; + } + + public override void Update(int frameCount) + { + base.Update(frameCount); + if (!Main.IsItRaining && Main.dayTime && !Main.eclipse) + return; + this.StartFadingOut(frameCount); + } + + public void SetMagnetization(Vector2 accelerations, Vector2 targetOffset) + { + this._magnetAccelerations = accelerations; + this._magnetPointTarget = targetOffset; + } + + public override Color GetColor(Color backgroundColor) => base.GetColor(backgroundColor) * Utils.Max(Main.bgAlphaFrontLayer[3], Main.bgAlphaFrontLayer[0], Main.bgAlphaFrontLayer[10], Main.bgAlphaFrontLayer[11], Main.bgAlphaFrontLayer[12]); + + public static List CreateGroup( + Player player, + FastRandom random) + { + List batsGroupSkyEntityList = new List(); + int num1 = 100; + int num2 = random.Next(20, 40); + VirtualCamera virtualCamera = new VirtualCamera(player); + SpriteEffects spriteEffects = (double) Main.WindForVisuals > 0.0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + Vector2 vector2_1 = new Vector2(); + vector2_1.X = spriteEffects != SpriteEffects.FlipHorizontally ? virtualCamera.Position.X - (float) num1 : virtualCamera.Position.X + virtualCamera.Size.X + (float) num1; + vector2_1.Y = (float) ((double) random.NextFloat() * (Main.worldSurface * 16.0 - 1600.0 - 2400.0) + 2400.0); + float num3 = (float) ((double) random.NextFloat() * 3.0 + 3.0); + int num4 = random.Next(30, 61) * 60; + Vector2 vector2_2 = new Vector2((float) ((double) random.NextFloat() * 0.5 + 0.5), (float) ((double) random.NextFloat() * 0.5 + 0.5)); + Vector2 targetOffset = new Vector2((float) ((double) random.NextFloat() * 2.0 - 1.0), (float) ((double) random.NextFloat() * 2.0 - 1.0)) * 100f; + for (int index = 0; index < num2; ++index) + { + AmbientSky.BatsGroupSkyEntity batsGroupSkyEntity = new AmbientSky.BatsGroupSkyEntity(player, random); + batsGroupSkyEntity.Depth = num3 + random.NextFloat() * 0.5f; + batsGroupSkyEntity.Position = vector2_1 + new Vector2((float) ((double) random.NextFloat() * 20.0 - 10.0), random.NextFloat() * 3f) * 50f; + batsGroupSkyEntity.Effects = spriteEffects; + batsGroupSkyEntity.SetPositionInWorldBasedOnScreenSpace(batsGroupSkyEntity.Position); + batsGroupSkyEntity.LifeTime = num4 + random.Next(301); + batsGroupSkyEntity.SetMagnetization(vector2_2 * (float) ((double) random.NextFloat() * 0.300000011920929 + 0.850000023841858) * 0.05f, targetOffset); + batsGroupSkyEntityList.Add(batsGroupSkyEntity); + } + return batsGroupSkyEntityList; + } + } + + private class WyvernSkyEntity : AmbientSky.FadingSkyEntity + { + public WyvernSkyEntity(Player player, FastRandom random) + { + VirtualCamera virtualCamera = new VirtualCamera(player); + this.Effects = (double) Main.WindForVisuals > 0.0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + int num = 100; + if (this.Effects == SpriteEffects.FlipHorizontally) + this.Position.X = virtualCamera.Position.X + virtualCamera.Size.X + (float) num; + else + this.Position.X = virtualCamera.Position.X - (float) num; + this.Position.Y = (float) ((double) random.NextFloat() * (Main.worldSurface * 16.0 - 1600.0 - 2400.0) + 2400.0); + this.Depth = (float) ((double) random.NextFloat() * 3.0 + 3.0); + this.SetPositionInWorldBasedOnScreenSpace(this.Position); + this.Texture = Main.Assets.Request("Images/Backgrounds/Ambience/Wyvern", (AssetRequestMode) 1); + this.Frame = new SpriteFrame((byte) 1, (byte) 5); + this.LifeTime = random.Next(40, 71) * 60; + this.OpacityNormalizedTimeToFadeIn = 0.15f; + this.OpacityNormalizedTimeToFadeOut = 0.85f; + this.BrightnessLerper = 0.2f; + this.FinalOpacityMultiplier = 1f; + this.FramingSpeed = 4; + } + + public override void UpdateVelocity(int frameCount) => this.Velocity = new Vector2((float) ((3.0 + (double) Math.Abs(Main.WindForVisuals) * 0.800000011920929) * (this.Effects == SpriteEffects.FlipHorizontally ? -1.0 : 1.0)), 0.0f); + } + + private class NormalizedBackgroundLayerSpaceSkyEntity : AmbientSky.SkyEntity + { + public override Color GetColor(Color backgroundColor) => Color.Lerp(backgroundColor, Color.White, 0.3f); + + public override Vector2 GetDrawPosition() => this.Position; + + public override void Update(int frameCount) + { + } + } + + private class BoneSerpentSkyEntity : AmbientSky.NormalizedBackgroundLayerSpaceSkyEntity + { + } + + private class AirshipSkyEntity : AmbientSky.FadingSkyEntity + { + public AirshipSkyEntity(Player player, FastRandom random) + { + VirtualCamera virtualCamera = new VirtualCamera(player); + this.Effects = random.Next(2) == 0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + int num = 100; + if (this.Effects == SpriteEffects.FlipHorizontally) + this.Position.X = virtualCamera.Position.X + virtualCamera.Size.X + (float) num; + else + this.Position.X = virtualCamera.Position.X - (float) num; + this.Position.Y = (float) ((double) random.NextFloat() * (Main.worldSurface * 16.0 - 1600.0 - 2400.0) + 2400.0); + this.Depth = (float) ((double) random.NextFloat() * 3.0 + 3.0); + this.SetPositionInWorldBasedOnScreenSpace(this.Position); + this.Texture = Main.Assets.Request("Images/Backgrounds/Ambience/FlyingShip", (AssetRequestMode) 1); + this.Frame = new SpriteFrame((byte) 1, (byte) 4); + this.LifeTime = random.Next(40, 71) * 60; + this.OpacityNormalizedTimeToFadeIn = 0.05f; + this.OpacityNormalizedTimeToFadeOut = 0.95f; + this.BrightnessLerper = 0.2f; + this.FinalOpacityMultiplier = 1f; + this.FramingSpeed = 4; + } + + public override void UpdateVelocity(int frameCount) => this.Velocity = new Vector2((float) ((6.0 + (double) Math.Abs(Main.WindForVisuals) * 1.60000002384186) * (this.Effects == SpriteEffects.FlipHorizontally ? -1.0 : 1.0)), 0.0f); + + public override void Update(int frameCount) + { + base.Update(frameCount); + if (!Main.IsItRaining && Main.dayTime && !Main.eclipse) + return; + this.StartFadingOut(frameCount); + } + } + + private class AirBalloonSkyEntity : AmbientSky.FadingSkyEntity + { + private const int RANDOM_TILE_SPAWN_RANGE = 100; + + public AirBalloonSkyEntity(Player player, FastRandom random) + { + VirtualCamera virtualCamera = new VirtualCamera(player); + int x = player.Center.ToTileCoordinates().X; + this.Effects = random.Next(2) == 0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + this.Position.X = (float) (((double) x + 100.0 * ((double) random.NextFloat() * 2.0 - 1.0)) * 16.0); + this.Position.Y = (float) (Main.worldSurface * 16.0 - (double) random.Next(50, 81) * 16.0); + this.Depth = (float) ((double) random.NextFloat() * 3.0 + 3.0); + this.Texture = Main.Assets.Request("Images/Backgrounds/Ambience/AirBalloons_" + (random.Next(2) == 0 ? "Large" : "Small"), (AssetRequestMode) 1); + this.Frame = new SpriteFrame((byte) 1, (byte) 5); + this.Frame.CurrentRow = (byte) random.Next(5); + this.LifeTime = random.Next(20, 51) * 60; + this.OpacityNormalizedTimeToFadeIn = 0.05f; + this.OpacityNormalizedTimeToFadeOut = 0.95f; + this.BrightnessLerper = 0.2f; + this.FinalOpacityMultiplier = 1f; + this.FramingSpeed = int.MaxValue; + } + + public override void UpdateVelocity(int frameCount) + { + float x = Main.WindForVisuals * 4f; + float num = (float) (3.0 + (double) Math.Abs(Main.WindForVisuals) * 1.0); + if ((double) this.Position.Y < Main.worldSurface * 12.0) + num *= 0.5f; + if ((double) this.Position.Y < Main.worldSurface * 8.0) + num *= 0.5f; + if ((double) this.Position.Y < Main.worldSurface * 4.0) + num *= 0.5f; + this.Velocity = new Vector2(x, -num); + } + + public override void Update(int frameCount) + { + base.Update(frameCount); + if (!Main.IsItRaining && Main.dayTime && !Main.eclipse) + return; + this.StartFadingOut(frameCount); + } + } + + private class CrimeraSkyEntity : AmbientSky.EOCSkyEntity + { + public CrimeraSkyEntity(Player player, FastRandom random) + : base(player, random) + { + int num = 3; + if ((double) this.Depth <= 6.0) + num = 2; + if ((double) this.Depth <= 5.0) + num = 1; + this.Texture = Main.Assets.Request("Images/Backgrounds/Ambience/Crimera" + (object) num, (AssetRequestMode) 1); + this.Frame = new SpriteFrame((byte) 1, (byte) 3); + } + + public override Color GetColor(Color backgroundColor) => base.GetColor(backgroundColor) * Main.bgAlphaFrontLayer[8]; + } + + private class EOSSkyEntity : AmbientSky.EOCSkyEntity + { + public EOSSkyEntity(Player player, FastRandom random) + : base(player, random) + { + int num = 3; + if ((double) this.Depth <= 6.0) + num = 2; + if ((double) this.Depth <= 5.0) + num = 1; + this.Texture = Main.Assets.Request("Images/Backgrounds/Ambience/EOS" + (object) num, (AssetRequestMode) 1); + this.Frame = new SpriteFrame((byte) 1, (byte) 4); + } + + public override Color GetColor(Color backgroundColor) => base.GetColor(backgroundColor) * Main.bgAlphaFrontLayer[1]; + } + + private class EOCSkyEntity : AmbientSky.FadingSkyEntity + { + private const int STATE_ZIGZAG = 1; + private const int STATE_GOOVERPLAYER = 2; + private int _state; + private int _direction; + private float _waviness; + + public EOCSkyEntity(Player player, FastRandom random) + { + VirtualCamera camera = new VirtualCamera(player); + this.Texture = Main.Assets.Request("Images/Backgrounds/Ambience/EOC", (AssetRequestMode) 1); + this.Frame = new SpriteFrame((byte) 1, (byte) 3); + this.Depth = (float) ((double) random.NextFloat() * 3.0 + 4.5); + if (random.Next(4) != 0) + this.BeginZigZag(ref random, camera, random.Next(2) == 1 ? 1 : -1); + else + this.BeginChasingPlayer(ref random, camera); + this.SetPositionInWorldBasedOnScreenSpace(this.Position); + this.OpacityNormalizedTimeToFadeIn = 0.1f; + this.OpacityNormalizedTimeToFadeOut = 0.9f; + this.BrightnessLerper = 0.2f; + this.FinalOpacityMultiplier = 1f; + this.FramingSpeed = 5; + } + + private void BeginZigZag(ref FastRandom random, VirtualCamera camera, int direction) + { + this._state = 1; + this.LifeTime = random.Next(18, 31) * 60; + this._direction = direction; + this._waviness = (float) ((double) random.NextFloat() * 1.0 + 1.0); + this.Position.Y = camera.Position.Y; + int num = 100; + if (this._direction == 1) + this.Position.X = camera.Position.X - (float) num; + else + this.Position.X = camera.Position.X + camera.Size.X + (float) num; + } + + private void BeginChasingPlayer(ref FastRandom random, VirtualCamera camera) + { + this._state = 2; + this.LifeTime = random.Next(18, 31) * 60; + this.Position = camera.Position + camera.Size * new Vector2(random.NextFloat(), random.NextFloat()); + } + + public override void UpdateVelocity(int frameCount) + { + switch (this._state) + { + case 1: + this.ZigzagMove(frameCount); + break; + case 2: + this.ChasePlayerTop(frameCount); + break; + } + this.Rotation = this.Velocity.ToRotation(); + } + + private void ZigzagMove(int frameCount) => this.Velocity = new Vector2((float) (this._direction * 3), (float) Math.Cos((double) frameCount / 1200.0 * 6.28318548202515) * this._waviness); + + private void ChasePlayerTop(int frameCount) + { + Vector2 vector2 = Main.LocalPlayer.Center + new Vector2(0.0f, -500f) - this.Position; + if ((double) vector2.Length() < 100.0) + return; + this.Velocity.X += 0.1f * (float) Math.Sign(vector2.X); + this.Velocity.Y += 0.1f * (float) Math.Sign(vector2.Y); + this.Velocity = Vector2.Clamp(this.Velocity, new Vector2(-18f), new Vector2(18f)); + } + } + + private class MeteorSkyEntity : AmbientSky.FadingSkyEntity + { + public MeteorSkyEntity(Player player, FastRandom random) + { + VirtualCamera virtualCamera = new VirtualCamera(player); + this.Effects = random.Next(2) == 0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + this.Depth = (float) ((double) random.NextFloat() * 3.0 + 3.0); + this.Texture = Main.Assets.Request("Images/Backgrounds/Ambience/Meteor", (AssetRequestMode) 1); + this.Frame = new SpriteFrame((byte) 1, (byte) 4); + Vector2 rotationVector2 = ((float) (0.785398185253143 + (double) random.NextFloat() * 1.57079637050629)).ToRotationVector2(); + double num1 = (Main.worldSurface * 16.0 - 0.0) / (double) rotationVector2.Y; + float num2 = 1200f; + double num3 = (double) num2; + float num4 = (float) (num1 / num3); + this.Velocity = rotationVector2 * num4; + int num5 = 100; + this.Position = player.Center + new Vector2((float) random.Next(-num5, num5 + 1), (float) random.Next(-num5, num5 + 1)) - this.Velocity * num2 * 0.5f; + this.LifeTime = (int) num2; + this.OpacityNormalizedTimeToFadeIn = 0.05f; + this.OpacityNormalizedTimeToFadeOut = 0.95f; + this.BrightnessLerper = 0.5f; + this.FinalOpacityMultiplier = 1f; + this.FramingSpeed = 5; + this.Rotation = this.Velocity.ToRotation() + 1.570796f; + } + } + + private delegate AmbientSky.SkyEntity EntityFactoryMethod(Player player, int seed); + } +} diff --git a/GameContent/Skies/BlizzardSky.cs b/GameContent/Skies/BlizzardSky.cs new file mode 100644 index 0000000..3f3e2f3 --- /dev/null +++ b/GameContent/Skies/BlizzardSky.cs @@ -0,0 +1,72 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.BlizzardSky +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria.Graphics.Effects; +using Terraria.Utilities; + +namespace Terraria.GameContent.Skies +{ + public class BlizzardSky : CustomSky + { + private UnifiedRandom _random = new UnifiedRandom(); + private bool _isActive; + private bool _isLeaving; + private float _opacity; + + public override void OnLoad() + { + } + + public override void Update(GameTime gameTime) + { + if (Main.gamePaused || !Main.hasFocus) + return; + if (this._isLeaving) + { + this._opacity -= (float) gameTime.ElapsedGameTime.TotalSeconds; + if ((double) this._opacity >= 0.0) + return; + this._isActive = false; + this._opacity = 0.0f; + } + else + { + this._opacity += (float) gameTime.ElapsedGameTime.TotalSeconds; + if ((double) this._opacity <= 1.0) + return; + this._opacity = 1f; + } + } + + public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) + { + if ((double) minDepth >= 1.0 && (double) maxDepth != 3.40282346638529E+38) + return; + float num = Math.Min(1f, Main.cloudAlpha * 2f); + Color color = new Color(new Vector4(1f) * Main.ColorOfTheSkies.ToVector4()) * this._opacity * 0.7f * num; + spriteBatch.Draw(TextureAssets.MagicPixel.Value, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), color); + } + + public override void Activate(Vector2 position, params object[] args) + { + this._isActive = true; + this._isLeaving = false; + } + + public override void Deactivate(params object[] args) => this._isLeaving = true; + + public override void Reset() + { + this._opacity = 0.0f; + this._isActive = false; + } + + public override bool IsActive() => this._isActive; + } +} diff --git a/GameContent/Skies/CreditsRoll/Actions.cs b/GameContent/Skies/CreditsRoll/Actions.cs new file mode 100644 index 0000000..6894d41 --- /dev/null +++ b/GameContent/Skies/CreditsRoll/Actions.cs @@ -0,0 +1,241 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.CreditsRoll.Actions +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.GameContent.Skies.CreditsRoll +{ + public class Actions + { + public class NPCs + { + public interface INPCAction : ICreditsRollSegmentAction + { + } + + public class Fade : Actions.NPCs.INPCAction, ICreditsRollSegmentAction + { + private int _duration; + private int _alphaPerFrame; + private float _delay; + + public Fade(int alphaPerFrame) + { + this._duration = 0; + this._alphaPerFrame = alphaPerFrame; + } + + public Fade(int alphaPerFrame, int duration) + { + this._duration = duration; + this._alphaPerFrame = alphaPerFrame; + } + + public void BindTo(NPC obj) + { + } + + public int ExpectedLengthOfActionInFrames => this._duration; + + public void SetDelay(float delay) => this._delay = delay; + + public void ApplyTo(NPC obj, float localTimeForObj) + { + if ((double) localTimeForObj < (double) this._delay) + return; + if (this._duration == 0) + { + obj.alpha = Utils.Clamp(obj.alpha + this._alphaPerFrame, 0, (int) byte.MaxValue); + } + else + { + float num = localTimeForObj - this._delay; + if ((double) num > (double) this._duration) + num = (float) this._duration; + obj.alpha = Utils.Clamp(obj.alpha + (int) num * this._alphaPerFrame, 0, (int) byte.MaxValue); + } + } + } + + public class Move : Actions.NPCs.INPCAction, ICreditsRollSegmentAction + { + private Vector2 _offsetPerFrame; + private int _duration; + private float _delay; + + public Move(Vector2 offsetPerFrame, int durationInFrames) + { + this._offsetPerFrame = offsetPerFrame; + this._duration = durationInFrames; + } + + public void BindTo(NPC obj) + { + } + + public int ExpectedLengthOfActionInFrames => this._duration; + + public void SetDelay(float delay) => this._delay = delay; + + public void ApplyTo(NPC obj, float localTimeForObj) + { + if ((double) localTimeForObj < (double) this._delay) + return; + float num = localTimeForObj - this._delay; + if ((double) num > (double) this._duration) + num = (float) this._duration; + NPC npc = obj; + npc.position = npc.position + this._offsetPerFrame * num; + obj.velocity = this._offsetPerFrame; + if ((double) this._offsetPerFrame.X == 0.0) + return; + obj.direction = obj.spriteDirection = (double) this._offsetPerFrame.X > 0.0 ? 1 : -1; + } + } + + public class Wait : Actions.NPCs.INPCAction, ICreditsRollSegmentAction + { + private int _duration; + private float _delay; + + public Wait(int durationInFrames) => this._duration = durationInFrames; + + public void BindTo(NPC obj) + { + } + + public int ExpectedLengthOfActionInFrames => this._duration; + + public void ApplyTo(NPC obj, float localTimeForObj) + { + if ((double) localTimeForObj < (double) this._delay) + return; + obj.velocity = Vector2.Zero; + } + + public void SetDelay(float delay) => this._delay = delay; + } + + public class LookAt : Actions.NPCs.INPCAction, ICreditsRollSegmentAction + { + private int _direction; + private float _delay; + + public LookAt(int direction) => this._direction = direction; + + public void BindTo(NPC obj) + { + } + + public int ExpectedLengthOfActionInFrames => 0; + + public void ApplyTo(NPC obj, float localTimeForObj) + { + if ((double) localTimeForObj < (double) this._delay) + return; + obj.direction = obj.spriteDirection = this._direction; + } + + public void SetDelay(float delay) => this._delay = delay; + } + + public class PartyHard : Actions.NPCs.INPCAction, ICreditsRollSegmentAction + { + public void BindTo(NPC obj) + { + obj.ForcePartyHatOn = true; + obj.UpdateAltTexture(); + } + + public int ExpectedLengthOfActionInFrames => 0; + + public void ApplyTo(NPC obj, float localTimeForObj) + { + } + + public void SetDelay(float delay) + { + } + } + } + + public class Sprites + { + public interface ISpriteAction : ICreditsRollSegmentAction + { + } + + public class Fade : + Actions.Sprites.ISpriteAction, + ICreditsRollSegmentAction + { + private int _duration; + private float _opacityTarget; + private float _delay; + + public Fade(float opacityTarget) + { + this._duration = 0; + this._opacityTarget = opacityTarget; + } + + public Fade(float opacityTarget, int duration) + { + this._duration = duration; + this._opacityTarget = opacityTarget; + } + + public void BindTo(Segments.LooseSprite obj) + { + } + + public int ExpectedLengthOfActionInFrames => this._duration; + + public void SetDelay(float delay) => this._delay = delay; + + public void ApplyTo(Segments.LooseSprite obj, float localTimeForObj) + { + if ((double) localTimeForObj < (double) this._delay) + return; + if (this._duration == 0) + { + obj.CurrentOpacity = this._opacityTarget; + } + else + { + float t = localTimeForObj - this._delay; + if ((double) t > (double) this._duration) + t = (float) this._duration; + obj.CurrentOpacity = MathHelper.Lerp(obj.CurrentOpacity, this._opacityTarget, Utils.GetLerpValue(0.0f, (float) this._duration, t, true)); + } + } + } + + public class Wait : + Actions.Sprites.ISpriteAction, + ICreditsRollSegmentAction + { + private int _duration; + private float _delay; + + public Wait(int durationInFrames) => this._duration = durationInFrames; + + public void BindTo(Segments.LooseSprite obj) + { + } + + public int ExpectedLengthOfActionInFrames => this._duration; + + public void ApplyTo(Segments.LooseSprite obj, float localTimeForObj) + { + double delay = (double) this._delay; + } + + public void SetDelay(float delay) => this._delay = delay; + } + } + } +} diff --git a/GameContent/Skies/CreditsRoll/CreditsRollInfo.cs b/GameContent/Skies/CreditsRoll/CreditsRollInfo.cs new file mode 100644 index 0000000..2c74049 --- /dev/null +++ b/GameContent/Skies/CreditsRoll/CreditsRollInfo.cs @@ -0,0 +1,18 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.CreditsRoll.CreditsRollInfo +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.GameContent.Skies.CreditsRoll +{ + public struct CreditsRollInfo + { + public SpriteBatch SpriteBatch; + public Vector2 AnchorPositionOnScreen; + public int TimeInAnimation; + } +} diff --git a/GameContent/Skies/CreditsRoll/ICreditsRollSegment.cs b/GameContent/Skies/CreditsRoll/ICreditsRollSegment.cs new file mode 100644 index 0000000..c2ae5f2 --- /dev/null +++ b/GameContent/Skies/CreditsRoll/ICreditsRollSegment.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.CreditsRoll.ICreditsRollSegment +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Skies.CreditsRoll +{ + public interface ICreditsRollSegment + { + float DedicatedTimeNeeded { get; } + + void Draw(ref CreditsRollInfo info); + } +} diff --git a/GameContent/Skies/CreditsRoll/ICreditsRollSegmentAction`1.cs b/GameContent/Skies/CreditsRoll/ICreditsRollSegmentAction`1.cs new file mode 100644 index 0000000..f9d82ed --- /dev/null +++ b/GameContent/Skies/CreditsRoll/ICreditsRollSegmentAction`1.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.CreditsRoll.ICreditsRollSegmentAction`1 +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Skies.CreditsRoll +{ + public interface ICreditsRollSegmentAction + { + void BindTo(T obj); + + int ExpectedLengthOfActionInFrames { get; } + + void ApplyTo(T obj, float localTimeForObj); + + void SetDelay(float delay); + } +} diff --git a/GameContent/Skies/CreditsRoll/Segments.cs b/GameContent/Skies/CreditsRoll/Segments.cs new file mode 100644 index 0000000..49c1420 --- /dev/null +++ b/GameContent/Skies/CreditsRoll/Segments.cs @@ -0,0 +1,256 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.CreditsRoll.Segments +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using Terraria.DataStructures; +using Terraria.Localization; +using Terraria.UI.Chat; + +namespace Terraria.GameContent.Skies.CreditsRoll +{ + public class Segments + { + private const float PixelsToRollUpPerFrame = 0.5f; + + public class LocalizedTextSegment : ICreditsRollSegment + { + private const int PixelsForALine = 120; + private LocalizedText _text; + private float _timeToShowPeak; + + public float DedicatedTimeNeeded => 240f; + + public LocalizedTextSegment(float timeInAnimation, string textKey) + { + this._text = Language.GetText(textKey); + this._timeToShowPeak = timeInAnimation; + } + + public void Draw(ref CreditsRollInfo info) + { + float num1 = 400f; + float num2 = 400f; + int timeInAnimation = info.TimeInAnimation; + float num3 = Utils.GetLerpValue(this._timeToShowPeak - num1, this._timeToShowPeak, (float) timeInAnimation, true) * Utils.GetLerpValue(this._timeToShowPeak + num2, this._timeToShowPeak, (float) timeInAnimation, true); + if ((double) num3 <= 0.0) + return; + float num4 = this._timeToShowPeak - (float) timeInAnimation; + Vector2 position = info.AnchorPositionOnScreen + new Vector2(0.0f, num4 * 0.5f); + float Hue = (float) ((double) this._timeToShowPeak / 100.0 % 1.0); + if ((double) Hue < 0.0) + ++Hue; + Color rgb = Main.hslToRgb(Hue, 1f, 0.5f); + string text = this._text.Value; + Vector2 origin = FontAssets.DeathText.Value.MeasureString(text) * 0.5f; + float num5 = (float) (1.0 - (1.0 - (double) num3) * (1.0 - (double) num3)); + ChatManager.DrawColorCodedStringShadow(info.SpriteBatch, FontAssets.DeathText.Value, text, position, rgb * num5 * num5 * 0.25f, 0.0f, origin, Vector2.One); + ChatManager.DrawColorCodedString(info.SpriteBatch, FontAssets.DeathText.Value, text, position, Color.White * num5, 0.0f, origin, Vector2.One); + } + } + + public abstract class ACreditsRollSegmentWithActions : ICreditsRollSegment + { + private int _dedicatedTimeNeeded; + private int _lastDedicatedTimeNeeded; + protected int _targetTime; + private List> _actions = new List>(); + + public float DedicatedTimeNeeded => (float) this._dedicatedTimeNeeded; + + public ACreditsRollSegmentWithActions(int targetTime) + { + this._targetTime = targetTime; + this._dedicatedTimeNeeded = 0; + } + + protected void ProcessActions(T obj, float localTimeForObject) + { + for (int index = 0; index < this._actions.Count; ++index) + this._actions[index].ApplyTo(obj, localTimeForObject); + } + + public Segments.ACreditsRollSegmentWithActions Then( + ICreditsRollSegmentAction act) + { + this.Bind(act); + act.SetDelay((float) this._dedicatedTimeNeeded); + this._actions.Add(act); + this._lastDedicatedTimeNeeded = this._dedicatedTimeNeeded; + this._dedicatedTimeNeeded += act.ExpectedLengthOfActionInFrames; + return this; + } + + public Segments.ACreditsRollSegmentWithActions With( + ICreditsRollSegmentAction act) + { + this.Bind(act); + act.SetDelay((float) this._lastDedicatedTimeNeeded); + this._actions.Add(act); + return this; + } + + protected abstract void Bind(ICreditsRollSegmentAction act); + + public abstract void Draw(ref CreditsRollInfo info); + } + + public class NPCSegment : Segments.ACreditsRollSegmentWithActions + { + private NPC _npc; + private Vector2 _anchorOffset; + private Vector2 _normalizedOriginForHitbox; + + public NPCSegment( + int targetTime, + int npcId, + Vector2 anchorOffset, + Vector2 normalizedNPCHitboxOrigin) + : base(targetTime) + { + this._npc = new NPC(); + this._npc.SetDefaults(npcId); + this._npc.IsABestiaryIconDummy = true; + this._anchorOffset = anchorOffset; + this._normalizedOriginForHitbox = normalizedNPCHitboxOrigin; + } + + protected override void Bind(ICreditsRollSegmentAction act) => act.BindTo(this._npc); + + public override void Draw(ref CreditsRollInfo info) + { + if ((double) info.TimeInAnimation > (double) this._targetTime + (double) this.DedicatedTimeNeeded) + return; + this.ResetNPCAnimation(ref info); + this.ProcessActions(this._npc, (float) (info.TimeInAnimation - this._targetTime)); + if (this._npc.alpha >= (int) byte.MaxValue) + return; + this._npc.FindFrame(); + Main.instance.DrawNPCDirect(info.SpriteBatch, this._npc, this._npc.behindTiles, Vector2.Zero); + } + + private void ResetNPCAnimation(ref CreditsRollInfo info) + { + this._npc.position = info.AnchorPositionOnScreen + this._anchorOffset - this._npc.Size * this._normalizedOriginForHitbox; + this._npc.alpha = 0; + this._npc.velocity = Vector2.Zero; + } + } + + public class LooseSprite + { + private DrawData _originalDrawData; + public DrawData CurrentDrawData; + public float CurrentOpacity; + + public LooseSprite(DrawData data) + { + this._originalDrawData = data; + this.Reset(); + } + + public void Reset() + { + this.CurrentDrawData = this._originalDrawData; + this.CurrentOpacity = 1f; + } + } + + public class SpriteSegment : Segments.ACreditsRollSegmentWithActions + { + private Segments.LooseSprite _sprite; + private Vector2 _anchorOffset; + + public SpriteSegment(int targetTime, DrawData data, Vector2 anchorOffset) + : base(targetTime) + { + this._sprite = new Segments.LooseSprite(data); + this._anchorOffset = anchorOffset; + } + + protected override void Bind( + ICreditsRollSegmentAction act) + { + act.BindTo(this._sprite); + } + + public override void Draw(ref CreditsRollInfo info) + { + if ((double) info.TimeInAnimation > (double) this._targetTime + (double) this.DedicatedTimeNeeded) + return; + this.ResetSpriteAnimation(ref info); + this.ProcessActions(this._sprite, (float) (info.TimeInAnimation - this._targetTime)); + DrawData currentDrawData = this._sprite.CurrentDrawData; + currentDrawData.position += info.AnchorPositionOnScreen; + currentDrawData.color *= this._sprite.CurrentOpacity; + currentDrawData.Draw(info.SpriteBatch); + } + + private void ResetSpriteAnimation(ref CreditsRollInfo info) => this._sprite.Reset(); + } + + public class EmoteSegment : ICreditsRollSegment + { + private int _targetTime; + private Vector2 _offset; + private SpriteEffects _effect; + private int _emoteId; + + public float DedicatedTimeNeeded { get; private set; } + + public EmoteSegment( + int emoteId, + int targetTime, + int timeToPlay, + Vector2 position, + SpriteEffects drawEffect) + { + this._emoteId = emoteId; + this._targetTime = targetTime; + this._effect = drawEffect; + this._offset = position; + this.DedicatedTimeNeeded = (float) timeToPlay; + } + + public void Draw(ref CreditsRollInfo info) + { + int num = info.TimeInAnimation - this._targetTime; + if (num < 0 || (double) num >= (double) this.DedicatedTimeNeeded) + return; + Vector2 position = (info.AnchorPositionOnScreen + this._offset).Floor(); + bool flag = num < 6 || (double) num >= (double) this.DedicatedTimeNeeded - 6.0; + Texture2D texture2D = TextureAssets.Extra[48].Value; + Rectangle rectangle = texture2D.Frame(8, 38, flag ? 0 : 1); + Vector2 origin = new Vector2((float) (rectangle.Width / 2), (float) rectangle.Height); + SpriteEffects effect = this._effect; + info.SpriteBatch.Draw(texture2D, position, new Rectangle?(rectangle), Color.White, 0.0f, origin, 1f, effect, 0.0f); + if (flag) + return; + switch (this._emoteId) + { + case 87: + case 89: + if (effect.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + { + effect &= ~SpriteEffects.FlipHorizontally; + position.X += 4f; + break; + } + break; + } + info.SpriteBatch.Draw(texture2D, position, new Rectangle?(this.GetFrame(num % 20)), Color.White, 0.0f, origin, 1f, effect, 0.0f); + } + + private Rectangle GetFrame(int wrappedTime) + { + int num = wrappedTime >= 10 ? 1 : 0; + return TextureAssets.Extra[48].Value.Frame(8, 38, this._emoteId % 4 * 2 + num, this._emoteId / 4 + 1); + } + } + } +} diff --git a/GameContent/Skies/CreditsRollSky.cs b/GameContent/Skies/CreditsRollSky.cs new file mode 100644 index 0000000..8e9b3c8 --- /dev/null +++ b/GameContent/Skies/CreditsRollSky.cs @@ -0,0 +1,81 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.CreditsRollSky +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; +using Terraria.DataStructures; +using Terraria.GameContent.Skies.CreditsRoll; +using Terraria.Graphics.Effects; + +namespace Terraria.GameContent.Skies +{ + public class CreditsRollSky : CustomSky + { + private int _endTime; + private int _currentTime; + private List _segments; + + public void EnsureSegmentsAreMade() + { + this._segments = new List(); + new string[1][0] = "Now, this is a story all about how"; + Segments.ACreditsRollSegmentWithActions segmentWithActions1 = new Segments.NPCSegment(0, 22, new Vector2(-300f, 0.0f), new Vector2(0.5f, 1f)).Then((ICreditsRollSegmentAction) new Actions.NPCs.Fade((int) byte.MaxValue)).With((ICreditsRollSegmentAction) new Actions.NPCs.Fade(-5, 51)).Then((ICreditsRollSegmentAction) new Actions.NPCs.Move(new Vector2(1f, 0.0f), 60)); + Segments.ACreditsRollSegmentWithActions segmentWithActions2 = new Segments.SpriteSegment(0, new DrawData(TextureAssets.Extra[156].Value, Vector2.Zero, new Rectangle?(), Color.White, 0.0f, TextureAssets.Extra[156].Size() / 2f, 0.25f, SpriteEffects.None, 0), new Vector2(-100f, 0.0f)).Then((ICreditsRollSegmentAction) new Actions.Sprites.Fade(0.0f, 0)).Then((ICreditsRollSegmentAction) new Actions.Sprites.Fade(1f, 60)).Then((ICreditsRollSegmentAction) new Actions.Sprites.Wait(60)).Then((ICreditsRollSegmentAction) new Actions.Sprites.Fade(0.0f, 60)); + int num = 60; + Segments.EmoteSegment emoteSegment = new Segments.EmoteSegment(3, (int) segmentWithActions1.DedicatedTimeNeeded, num, new Vector2(-254f, -38f), SpriteEffects.FlipHorizontally); + segmentWithActions1.Then((ICreditsRollSegmentAction) new Actions.NPCs.Wait(num)).Then((ICreditsRollSegmentAction) new Actions.NPCs.Wait(60)).With((ICreditsRollSegmentAction) new Actions.NPCs.Fade(5, 51)); + this._segments.Add((ICreditsRollSegment) segmentWithActions1); + this._segments.Add((ICreditsRollSegment) emoteSegment); + this._segments.Add((ICreditsRollSegment) segmentWithActions2); + foreach (ICreditsRollSegment segment in this._segments) + this._endTime += (int) segment.DedicatedTimeNeeded; + this._endTime += 300; + } + + public override void Update(GameTime gameTime) + { + ++this._currentTime; + int num = 0; + foreach (ICreditsRollSegment segment in this._segments) + num += (int) segment.DedicatedTimeNeeded; + if (this._currentTime < num + 1) + return; + this._currentTime = 0; + } + + public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) + { + float num = 4.5f; + if ((double) num < (double) minDepth || (double) num > (double) maxDepth) + return; + CreditsRollInfo info = new CreditsRollInfo() + { + SpriteBatch = spriteBatch, + AnchorPositionOnScreen = Main.ScreenSize.ToVector2() / 2f, + TimeInAnimation = this._currentTime + }; + for (int index = 0; index < this._segments.Count; ++index) + this._segments[index].Draw(ref info); + } + + public override bool IsActive() => this._currentTime < this._endTime; + + public override void Reset() + { + this._currentTime = 0; + this.EnsureSegmentsAreMade(); + } + + public override void Activate(Vector2 position, params object[] args) + { + this._currentTime = 0; + this.EnsureSegmentsAreMade(); + } + + public override void Deactivate(params object[] args) => this._currentTime = 0; + } +} diff --git a/GameContent/Skies/LanternSky.cs b/GameContent/Skies/LanternSky.cs new file mode 100644 index 0000000..c4ae315 --- /dev/null +++ b/GameContent/Skies/LanternSky.cs @@ -0,0 +1,230 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.LanternSky +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.GameContent.Events; +using Terraria.Graphics.Effects; +using Terraria.Utilities; + +namespace Terraria.GameContent.Skies +{ + public class LanternSky : CustomSky + { + private bool _active; + private bool _leaving; + private float _opacity; + private Asset _texture; + private LanternSky.Lantern[] _lanterns; + private UnifiedRandom _random = new UnifiedRandom(); + private int _lanternsDrawing; + private const float slowDown = 0.5f; + + public override void OnLoad() + { + this._texture = TextureAssets.Extra[134]; + this.GenerateLanterns(false); + } + + private void GenerateLanterns(bool onlyMissing) + { + if (!onlyMissing) + this._lanterns = new LanternSky.Lantern[Main.maxTilesY / 4]; + for (int i = 0; i < this._lanterns.Length; ++i) + { + if (!onlyMissing || !this._lanterns[i].Active) + { + int maxValue = (int) ((double) Main.screenPosition.Y * 0.7 - (double) Main.screenHeight); + int minValue = (int) ((double) maxValue - Main.worldSurface * 16.0); + this._lanterns[i].Position = new Vector2((float) (this._random.Next(0, Main.maxTilesX) * 16), (float) this._random.Next(minValue, maxValue)); + this.ResetLantern(i); + this._lanterns[i].Active = true; + } + } + this._lanternsDrawing = this._lanterns.Length; + } + + public void ResetLantern(int i) + { + this._lanterns[i].Depth = (float) ((1.0 - (double) i / (double) this._lanterns.Length) * 4.40000009536743 + 1.60000002384186); + this._lanterns[i].Speed = (float) (-1.5 - 2.5 * this._random.NextDouble()); + this._lanterns[i].Texture = this._texture.Value; + this._lanterns[i].Variant = this._random.Next(3); + this._lanterns[i].TimeUntilFloat = (int) ((double) (2000 + this._random.Next(1200)) * 2.0); + this._lanterns[i].TimeUntilFloatMax = this._lanterns[i].TimeUntilFloat; + } + + public override void Update(GameTime gameTime) + { + if (Main.gamePaused || !Main.hasFocus) + return; + this._opacity = Utils.Clamp(this._opacity + (float) LanternNight.LanternsUp.ToDirectionInt() * 0.01f, 0.0f, 1f); + for (int i = 0; i < this._lanterns.Length; ++i) + { + if (this._lanterns[i].Active) + { + float num1 = Main.windSpeedCurrent; + if ((double) num1 == 0.0) + num1 = 0.1f; + float num2 = (float) Math.Sin((double) this._lanterns[i].Position.X / 120.0) * 0.5f; + this._lanterns[i].Position.Y += num2 * 0.5f; + this._lanterns[i].Position.Y += this._lanterns[i].FloatAdjustedSpeed * 0.5f; + this._lanterns[i].Position.X += (float) ((0.100000001490116 + (double) num1) * (3.0 - (double) this._lanterns[i].Speed) * 0.5 * ((double) i / (double) this._lanterns.Length + 1.5) / 2.5); + this._lanterns[i].Rotation = (float) ((double) num2 * ((double) num1 < 0.0 ? -1.0 : 1.0) * 0.5); + this._lanterns[i].TimeUntilFloat = Math.Max(0, this._lanterns[i].TimeUntilFloat - 1); + if ((double) this._lanterns[i].Position.Y < 300.0) + { + if (!this._leaving) + { + this.ResetLantern(i); + this._lanterns[i].Position = new Vector2((float) (this._random.Next(0, Main.maxTilesX) * 16), (float) (Main.worldSurface * 16.0 + 1600.0)); + } + else + { + this._lanterns[i].Active = false; + --this._lanternsDrawing; + } + } + } + } + this._active = true; + } + + public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) + { + if (Main.gameMenu && this._active) + { + this._active = false; + this._leaving = false; + for (int index = 0; index < this._lanterns.Length; ++index) + this._lanterns[index].Active = false; + } + if ((double) Main.screenPosition.Y > Main.worldSurface * 16.0 || Main.gameMenu || (double) this._opacity <= 0.0) + return; + int num1 = -1; + int num2 = 0; + for (int index = 0; index < this._lanterns.Length; ++index) + { + float depth = this._lanterns[index].Depth; + if (num1 == -1 && (double) depth < (double) maxDepth) + num1 = index; + if ((double) depth > (double) minDepth) + num2 = index; + else + break; + } + if (num1 == -1) + return; + Vector2 vector2 = Main.screenPosition + new Vector2((float) (Main.screenWidth >> 1), (float) (Main.screenHeight >> 1)); + Rectangle rectangle = new Rectangle(-1000, -1000, 4000, 4000); + for (int index = num1; index < num2; ++index) + { + if (this._lanterns[index].Active) + { + Color opacity = new Color(250, 120, 60, 120); + float alpha = 1f; + if ((double) this._lanterns[index].Depth > 5.0) + alpha = 0.3f; + else if ((double) this._lanterns[index].Depth > 4.5) + alpha = 0.4f; + else if ((double) this._lanterns[index].Depth > 4.0) + alpha = 0.5f; + else if ((double) this._lanterns[index].Depth > 3.5) + alpha = 0.6f; + else if ((double) this._lanterns[index].Depth > 3.0) + alpha = 0.7f; + else if ((double) this._lanterns[index].Depth > 2.5) + alpha = 0.8f; + else if ((double) this._lanterns[index].Depth > 2.0) + alpha = 0.9f; + opacity = new Color((int) ((double) opacity.R * (double) alpha), (int) ((double) opacity.G * (double) alpha), (int) ((double) opacity.B * (double) alpha), (int) ((double) opacity.A * (double) alpha)); + Vector2 depthScale = new Vector2(1f / this._lanterns[index].Depth, 0.9f / this._lanterns[index].Depth); + depthScale *= 1.2f; + Vector2 position = (this._lanterns[index].Position - vector2) * depthScale + vector2 - Main.screenPosition; + position.X = (float) (((double) position.X + 500.0) % 4000.0); + if ((double) position.X < 0.0) + position.X += 4000f; + position.X -= 500f; + if (rectangle.Contains((int) position.X, (int) position.Y)) + this.DrawLantern(spriteBatch, this._lanterns[index], opacity, depthScale, position, alpha); + } + } + } + + private void DrawLantern( + SpriteBatch spriteBatch, + LanternSky.Lantern lantern, + Color opacity, + Vector2 depthScale, + Vector2 position, + float alpha) + { + float y = ((float) ((double) Main.GlobalTimeWrappedHourly % 6.0 / 6.0 * 6.28318548202515)).ToRotationVector2().Y; + float num1 = (float) ((double) y * 0.200000002980232 + 0.800000011920929); + Color color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * this._opacity * alpha * num1 * 0.4f; + for (float num2 = 0.0f; (double) num2 < 1.0; num2 += 0.3333333f) + { + Vector2 vector2 = new Vector2(0.0f, 2f).RotatedBy(6.28318548202515 * (double) num2 + (double) lantern.Rotation) * y; + spriteBatch.Draw(lantern.Texture, position + vector2, new Rectangle?(lantern.GetSourceRectangle()), color, lantern.Rotation, lantern.GetSourceRectangle().Size() / 2f, depthScale.X * 2f, SpriteEffects.None, 0.0f); + } + spriteBatch.Draw(lantern.Texture, position, new Rectangle?(lantern.GetSourceRectangle()), opacity * this._opacity, lantern.Rotation, lantern.GetSourceRectangle().Size() / 2f, depthScale.X * 2f, SpriteEffects.None, 0.0f); + } + + public override void Activate(Vector2 position, params object[] args) + { + if (this._active) + { + this._leaving = false; + this.GenerateLanterns(true); + } + else + { + this.GenerateLanterns(false); + this._active = true; + this._leaving = false; + } + } + + public override void Deactivate(params object[] args) => this._leaving = true; + + public override bool IsActive() => this._active; + + public override void Reset() => this._active = false; + + private struct Lantern + { + private const int MAX_FRAMES_X = 3; + public int Variant; + public int TimeUntilFloat; + public int TimeUntilFloatMax; + private Texture2D _texture; + public Vector2 Position; + public float Depth; + public float Rotation; + public int FrameHeight; + public int FrameWidth; + public float Speed; + public bool Active; + + public Texture2D Texture + { + get => this._texture; + set + { + this._texture = value; + this.FrameWidth = value.Width / 3; + this.FrameHeight = value.Height; + } + } + + public float FloatAdjustedSpeed => this.Speed * ((float) this.TimeUntilFloat / (float) this.TimeUntilFloatMax); + + public Rectangle GetSourceRectangle() => new Rectangle(this.FrameWidth * this.Variant, 0, this.FrameWidth, this.FrameHeight); + } + } +} diff --git a/GameContent/Skies/MartianSky.cs b/GameContent/Skies/MartianSky.cs new file mode 100644 index 0000000..1b12db4 --- /dev/null +++ b/GameContent/Skies/MartianSky.cs @@ -0,0 +1,277 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.MartianSky +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria.Graphics.Effects; +using Terraria.Utilities; + +namespace Terraria.GameContent.Skies +{ + public class MartianSky : CustomSky + { + private MartianSky.Ufo[] _ufos; + private UnifiedRandom _random = new UnifiedRandom(); + private int _maxUfos; + private bool _active; + private bool _leaving; + private int _activeUfos; + + public override void Update(GameTime gameTime) + { + if (Main.gamePaused || !Main.hasFocus) + return; + int activeUfos = this._activeUfos; + for (int index = 0; index < this._ufos.Length; ++index) + { + MartianSky.Ufo ufo = this._ufos[index]; + if (ufo.IsActive) + { + ++ufo.Frame; + if (!ufo.Update()) + { + if (!this._leaving) + { + ufo.AssignNewBehavior(); + } + else + { + ufo.IsActive = false; + --activeUfos; + } + } + } + this._ufos[index] = ufo; + } + if (!this._leaving && activeUfos != this._maxUfos) + { + this._ufos[activeUfos].IsActive = true; + this._ufos[activeUfos++].AssignNewBehavior(); + } + this._active = !this._leaving || (uint) activeUfos > 0U; + this._activeUfos = activeUfos; + } + + public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) + { + if ((double) Main.screenPosition.Y > 10000.0) + return; + int num1 = -1; + int num2 = 0; + for (int index = 0; index < this._ufos.Length; ++index) + { + float depth = this._ufos[index].Depth; + if (num1 == -1 && (double) depth < (double) maxDepth) + num1 = index; + if ((double) depth > (double) minDepth) + num2 = index; + else + break; + } + if (num1 == -1) + return; + Color color = new Color(Main.ColorOfTheSkies.ToVector4() * 0.9f + new Vector4(0.1f)); + Vector2 vector2_1 = Main.screenPosition + new Vector2((float) (Main.screenWidth >> 1), (float) (Main.screenHeight >> 1)); + Rectangle rectangle = new Rectangle(-1000, -1000, 4000, 4000); + for (int index = num1; index < num2; ++index) + { + Vector2 vector2_2 = new Vector2(1f / this._ufos[index].Depth, 0.9f / this._ufos[index].Depth); + Vector2 position = (this._ufos[index].Position - vector2_1) * vector2_2 + vector2_1 - Main.screenPosition; + if (this._ufos[index].IsActive && rectangle.Contains((int) position.X, (int) position.Y)) + { + spriteBatch.Draw(this._ufos[index].Texture, position, new Rectangle?(this._ufos[index].GetSourceRectangle()), color * this._ufos[index].Opacity, this._ufos[index].Rotation, Vector2.Zero, vector2_2.X * 5f * this._ufos[index].Scale, SpriteEffects.None, 0.0f); + if (this._ufos[index].GlowTexture != null) + spriteBatch.Draw(this._ufos[index].GlowTexture, position, new Rectangle?(this._ufos[index].GetSourceRectangle()), Color.White * this._ufos[index].Opacity, this._ufos[index].Rotation, Vector2.Zero, vector2_2.X * 5f * this._ufos[index].Scale, SpriteEffects.None, 0.0f); + } + } + } + + private void GenerateUfos() + { + this._maxUfos = (int) (256.0 * (double) ((float) Main.maxTilesX / 4200f)); + this._ufos = new MartianSky.Ufo[this._maxUfos]; + int num1 = this._maxUfos >> 4; + for (int index = 0; index < num1; ++index) + { + double num2 = (double) index / (double) num1; + this._ufos[index] = new MartianSky.Ufo(TextureAssets.Extra[5].Value, (float) (Main.rand.NextDouble() * 4.0 + 6.59999990463257)); + this._ufos[index].GlowTexture = TextureAssets.GlowMask[90].Value; + } + for (int index = num1; index < this._ufos.Length; ++index) + { + double num3 = (double) (index - num1) / (double) (this._ufos.Length - num1); + this._ufos[index] = new MartianSky.Ufo(TextureAssets.Extra[6].Value, (float) (Main.rand.NextDouble() * 5.0 + 1.60000002384186)); + this._ufos[index].Scale = 0.5f; + this._ufos[index].GlowTexture = TextureAssets.GlowMask[91].Value; + } + } + + public override void Activate(Vector2 position, params object[] args) + { + this._activeUfos = 0; + this.GenerateUfos(); + Array.Sort(this._ufos, (Comparison) ((ufo1, ufo2) => ufo2.Depth.CompareTo(ufo1.Depth))); + this._active = true; + this._leaving = false; + } + + public override void Deactivate(params object[] args) => this._leaving = true; + + public override bool IsActive() => this._active; + + public override void Reset() => this._active = false; + + private abstract class IUfoController + { + public abstract void InitializeUfo(ref MartianSky.Ufo ufo); + + public abstract bool Update(ref MartianSky.Ufo ufo); + } + + private class ZipBehavior : MartianSky.IUfoController + { + private Vector2 _speed; + private int _ticks; + private int _maxTicks; + + public override void InitializeUfo(ref MartianSky.Ufo ufo) + { + ufo.Position.X = (float) MartianSky.Ufo.Random.NextDouble() * (float) (Main.maxTilesX << 4); + ufo.Position.Y = (float) (MartianSky.Ufo.Random.NextDouble() * 5000.0); + ufo.Opacity = 0.0f; + float num1 = (float) (MartianSky.Ufo.Random.NextDouble() * 5.0 + 10.0); + double num2 = MartianSky.Ufo.Random.NextDouble() * 0.600000023841858 - 0.300000011920929; + ufo.Rotation = (float) num2; + if (MartianSky.Ufo.Random.Next(2) == 0) + num2 += 3.14159274101257; + this._speed = new Vector2((float) Math.Cos(num2) * num1, (float) Math.Sin(num2) * num1); + this._ticks = 0; + this._maxTicks = MartianSky.Ufo.Random.Next(400, 500); + } + + public override bool Update(ref MartianSky.Ufo ufo) + { + if (this._ticks < 10) + ufo.Opacity += 0.1f; + else if (this._ticks > this._maxTicks - 10) + ufo.Opacity -= 0.1f; + ufo.Position += this._speed; + if (this._ticks == this._maxTicks) + return false; + ++this._ticks; + return true; + } + } + + private class HoverBehavior : MartianSky.IUfoController + { + private int _ticks; + private int _maxTicks; + + public override void InitializeUfo(ref MartianSky.Ufo ufo) + { + ufo.Position.X = (float) MartianSky.Ufo.Random.NextDouble() * (float) (Main.maxTilesX << 4); + ufo.Position.Y = (float) (MartianSky.Ufo.Random.NextDouble() * 5000.0); + ufo.Opacity = 0.0f; + ufo.Rotation = 0.0f; + this._ticks = 0; + this._maxTicks = MartianSky.Ufo.Random.Next(120, 240); + } + + public override bool Update(ref MartianSky.Ufo ufo) + { + if (this._ticks < 10) + ufo.Opacity += 0.1f; + else if (this._ticks > this._maxTicks - 10) + ufo.Opacity -= 0.1f; + if (this._ticks == this._maxTicks) + return false; + ++this._ticks; + return true; + } + } + + private struct Ufo + { + private const int MAX_FRAMES = 3; + private const int FRAME_RATE = 4; + public static UnifiedRandom Random = new UnifiedRandom(); + private int _frame; + private Texture2D _texture; + private MartianSky.IUfoController _controller; + public Texture2D GlowTexture; + public Vector2 Position; + public int FrameHeight; + public int FrameWidth; + public float Depth; + public float Scale; + public float Opacity; + public bool IsActive; + public float Rotation; + + public int Frame + { + get => this._frame; + set => this._frame = value % 12; + } + + public Texture2D Texture + { + get => this._texture; + set + { + this._texture = value; + this.FrameWidth = value.Width; + this.FrameHeight = value.Height / 3; + } + } + + public MartianSky.IUfoController Controller + { + get => this._controller; + set + { + this._controller = value; + value.InitializeUfo(ref this); + } + } + + public Ufo(Texture2D texture, float depth = 1f) + { + this._frame = 0; + this.Position = Vector2.Zero; + this._texture = texture; + this.Depth = depth; + this.Scale = 1f; + this.FrameWidth = texture.Width; + this.FrameHeight = texture.Height / 3; + this.GlowTexture = (Texture2D) null; + this.Opacity = 0.0f; + this.Rotation = 0.0f; + this.IsActive = false; + this._controller = (MartianSky.IUfoController) null; + } + + public Rectangle GetSourceRectangle() => new Rectangle(0, this._frame / 4 * this.FrameHeight, this.FrameWidth, this.FrameHeight); + + public bool Update() => this.Controller.Update(ref this); + + public void AssignNewBehavior() + { + switch (MartianSky.Ufo.Random.Next(2)) + { + case 0: + this.Controller = (MartianSky.IUfoController) new MartianSky.ZipBehavior(); + break; + case 1: + this.Controller = (MartianSky.IUfoController) new MartianSky.HoverBehavior(); + break; + } + } + } + } +} diff --git a/GameContent/Skies/MoonLordSky.cs b/GameContent/Skies/MoonLordSky.cs new file mode 100644 index 0000000..df486ff --- /dev/null +++ b/GameContent/Skies/MoonLordSky.cs @@ -0,0 +1,109 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.MoonLordSky +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria.Graphics.Effects; +using Terraria.Utilities; + +namespace Terraria.GameContent.Skies +{ + public class MoonLordSky : CustomSky + { + private UnifiedRandom _random = new UnifiedRandom(); + private bool _isActive; + private int _moonLordIndex = -1; + private bool _forPlayer; + private float _fadeOpacity; + + public MoonLordSky(bool forPlayer) => this._forPlayer = forPlayer; + + public override void OnLoad() + { + } + + public override void Update(GameTime gameTime) + { + if (!this._forPlayer) + return; + if (this._isActive) + this._fadeOpacity = Math.Min(1f, 0.01f + this._fadeOpacity); + else + this._fadeOpacity = Math.Max(0.0f, this._fadeOpacity - 0.01f); + } + + private float GetIntensity() + { + if (this._forPlayer) + return this._fadeOpacity; + if (!this.UpdateMoonLordIndex()) + return 0.0f; + float x = 0.0f; + if (this._moonLordIndex != -1) + x = Vector2.Distance(Main.player[Main.myPlayer].Center, Main.npc[this._moonLordIndex].Center); + return 1f - Utils.SmoothStep(3000f, 6000f, x); + } + + public override Color OnTileColor(Color inColor) + { + float intensity = this.GetIntensity(); + return new Color(Vector4.Lerp(new Vector4(0.5f, 0.8f, 1f, 1f), inColor.ToVector4(), 1f - intensity)); + } + + private bool UpdateMoonLordIndex() + { + if (this._moonLordIndex >= 0 && Main.npc[this._moonLordIndex].active && Main.npc[this._moonLordIndex].type == 398) + return true; + int num = -1; + for (int index = 0; index < Main.npc.Length; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 398) + { + num = index; + break; + } + } + this._moonLordIndex = num; + return num != -1; + } + + public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) + { + if ((double) maxDepth < 0.0 || (double) minDepth >= 0.0) + return; + float intensity = this.GetIntensity(); + spriteBatch.Draw(TextureAssets.BlackTile.Value, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Color.Black * intensity); + } + + public override float GetCloudAlpha() => 1f - this._fadeOpacity; + + public override void Activate(Vector2 position, params object[] args) + { + this._isActive = true; + if (this._forPlayer) + this._fadeOpacity = 1f / 500f; + else + this._fadeOpacity = 1f; + } + + public override void Deactivate(params object[] args) + { + this._isActive = false; + if (this._forPlayer) + return; + this._fadeOpacity = 0.0f; + } + + public override void Reset() + { + this._isActive = false; + this._fadeOpacity = 0.0f; + } + + public override bool IsActive() => this._isActive || (double) this._fadeOpacity > 1.0 / 1000.0; + } +} diff --git a/GameContent/Skies/NebulaSky.cs b/GameContent/Skies/NebulaSky.cs new file mode 100644 index 0000000..dd440bb --- /dev/null +++ b/GameContent/Skies/NebulaSky.cs @@ -0,0 +1,123 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.NebulaSky +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.Graphics.Effects; +using Terraria.Utilities; + +namespace Terraria.GameContent.Skies +{ + public class NebulaSky : CustomSky + { + private NebulaSky.LightPillar[] _pillars; + private UnifiedRandom _random = new UnifiedRandom(); + private Asset _planetTexture; + private Asset _bgTexture; + private Asset _beamTexture; + private Asset[] _rockTextures; + private bool _isActive; + private float _fadeOpacity; + + public override void OnLoad() + { + this._planetTexture = Main.Assets.Request("Images/Misc/NebulaSky/Planet", (AssetRequestMode) 1); + this._bgTexture = Main.Assets.Request("Images/Misc/NebulaSky/Background", (AssetRequestMode) 1); + this._beamTexture = Main.Assets.Request("Images/Misc/NebulaSky/Beam", (AssetRequestMode) 1); + this._rockTextures = new Asset[3]; + for (int index = 0; index < this._rockTextures.Length; ++index) + this._rockTextures[index] = Main.Assets.Request("Images/Misc/NebulaSky/Rock_" + (object) index, (AssetRequestMode) 1); + } + + public override void Update(GameTime gameTime) + { + if (this._isActive) + this._fadeOpacity = Math.Min(1f, 0.01f + this._fadeOpacity); + else + this._fadeOpacity = Math.Max(0.0f, this._fadeOpacity - 0.01f); + } + + public override Color OnTileColor(Color inColor) => new Color(Vector4.Lerp(inColor.ToVector4(), Vector4.One, this._fadeOpacity * 0.5f)); + + public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) + { + if ((double) maxDepth >= 3.40282346638529E+38 && (double) minDepth < 3.40282346638529E+38) + { + spriteBatch.Draw(TextureAssets.BlackTile.Value, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Color.Black * this._fadeOpacity); + spriteBatch.Draw(this._bgTexture.Value, new Rectangle(0, Math.Max(0, (int) ((Main.worldSurface * 16.0 - (double) Main.screenPosition.Y - 2400.0) * 0.100000001490116)), Main.screenWidth, Main.screenHeight), Color.White * Math.Min(1f, (float) (((double) Main.screenPosition.Y - 800.0) / 1000.0) * this._fadeOpacity)); + Vector2 vector2_1 = new Vector2((float) (Main.screenWidth >> 1), (float) (Main.screenHeight >> 1)); + Vector2 vector2_2 = 0.01f * (new Vector2((float) Main.maxTilesX * 8f, (float) Main.worldSurface / 2f) - Main.screenPosition); + spriteBatch.Draw(this._planetTexture.Value, vector2_1 + new Vector2(-200f, -200f) + vector2_2, new Rectangle?(), Color.White * 0.9f * this._fadeOpacity, 0.0f, new Vector2((float) (this._planetTexture.Width() >> 1), (float) (this._planetTexture.Height() >> 1)), 1f, SpriteEffects.None, 1f); + } + int num1 = -1; + int num2 = 0; + for (int index = 0; index < this._pillars.Length; ++index) + { + float depth = this._pillars[index].Depth; + if (num1 == -1 && (double) depth < (double) maxDepth) + num1 = index; + if ((double) depth > (double) minDepth) + num2 = index; + else + break; + } + if (num1 == -1) + return; + Vector2 vector2_3 = Main.screenPosition + new Vector2((float) (Main.screenWidth >> 1), (float) (Main.screenHeight >> 1)); + Rectangle rectangle = new Rectangle(-1000, -1000, 4000, 4000); + float num3 = Math.Min(1f, (float) (((double) Main.screenPosition.Y - 1000.0) / 1000.0)); + for (int index1 = num1; index1 < num2; ++index1) + { + Vector2 vector2_4 = new Vector2(1f / this._pillars[index1].Depth, 0.9f / this._pillars[index1].Depth); + Vector2 position = (this._pillars[index1].Position - vector2_3) * vector2_4 + vector2_3 - Main.screenPosition; + if (rectangle.Contains((int) position.X, (int) position.Y)) + { + float num4 = vector2_4.X * 450f; + spriteBatch.Draw(this._beamTexture.Value, position, new Rectangle?(), Color.White * 0.2f * num3 * this._fadeOpacity, 0.0f, Vector2.Zero, new Vector2(num4 / 70f, num4 / 45f), SpriteEffects.None, 0.0f); + int index2 = 0; + for (float num5 = 0.0f; (double) num5 <= 1.0; num5 += 0.03f) + { + float num6 = (float) (1.0 - ((double) num5 + (double) Main.GlobalTimeWrappedHourly * 0.0199999995529652 + Math.Sin((double) index1)) % 1.0); + spriteBatch.Draw(this._rockTextures[index2].Value, position + new Vector2((float) (Math.Sin((double) num5 * 1582.0) * ((double) num4 * 0.5) + (double) num4 * 0.5), num6 * 2000f), new Rectangle?(), Color.White * num6 * num3 * this._fadeOpacity, num6 * 20f, new Vector2((float) (this._rockTextures[index2].Width() >> 1), (float) (this._rockTextures[index2].Height() >> 1)), 0.9f, SpriteEffects.None, 0.0f); + index2 = (index2 + 1) % this._rockTextures.Length; + } + } + } + } + + public override float GetCloudAlpha() => (float) ((1.0 - (double) this._fadeOpacity) * 0.300000011920929 + 0.699999988079071); + + public override void Activate(Vector2 position, params object[] args) + { + this._fadeOpacity = 1f / 500f; + this._isActive = true; + this._pillars = new NebulaSky.LightPillar[40]; + for (int index = 0; index < this._pillars.Length; ++index) + { + this._pillars[index].Position.X = (float) ((double) index / (double) this._pillars.Length * ((double) Main.maxTilesX * 16.0 + 20000.0) + (double) this._random.NextFloat() * 40.0 - 20.0 - 20000.0); + this._pillars[index].Position.Y = (float) ((double) this._random.NextFloat() * 200.0 - 2000.0); + this._pillars[index].Depth = (float) ((double) this._random.NextFloat() * 8.0 + 7.0); + } + Array.Sort(this._pillars, new Comparison(this.SortMethod)); + } + + private int SortMethod(NebulaSky.LightPillar pillar1, NebulaSky.LightPillar pillar2) => pillar2.Depth.CompareTo(pillar1.Depth); + + public override void Deactivate(params object[] args) => this._isActive = false; + + public override void Reset() => this._isActive = false; + + public override bool IsActive() => this._isActive || (double) this._fadeOpacity > 1.0 / 1000.0; + + private struct LightPillar + { + public Vector2 Position; + public float Depth; + } + } +} diff --git a/GameContent/Skies/PartySky.cs b/GameContent/Skies/PartySky.cs new file mode 100644 index 0000000..3af3a92 --- /dev/null +++ b/GameContent/Skies/PartySky.cs @@ -0,0 +1,213 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.PartySky +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.Graphics.Effects; +using Terraria.Utilities; + +namespace Terraria.GameContent.Skies +{ + public class PartySky : CustomSky + { + public static bool MultipleSkyWorkaroundFix; + private bool _active; + private bool _leaving; + private float _opacity; + private Asset[] _textures; + private PartySky.Balloon[] _balloons; + private UnifiedRandom _random = new UnifiedRandom(); + private int _balloonsDrawing; + + public override void OnLoad() + { + this._textures = new Asset[3]; + for (int index = 0; index < this._textures.Length; ++index) + this._textures[index] = TextureAssets.Extra[69 + index]; + this.GenerateBalloons(false); + } + + private void GenerateBalloons(bool onlyMissing) + { + if (!onlyMissing) + this._balloons = new PartySky.Balloon[Main.maxTilesY / 4]; + for (int i = 0; i < this._balloons.Length; ++i) + { + if (!onlyMissing || !this._balloons[i].Active) + { + int maxValue = (int) ((double) Main.screenPosition.Y * 0.7 - (double) Main.screenHeight); + int minValue = (int) ((double) maxValue - Main.worldSurface * 16.0); + this._balloons[i].Position = new Vector2((float) (this._random.Next(0, Main.maxTilesX) * 16), (float) this._random.Next(minValue, maxValue)); + this.ResetBalloon(i); + this._balloons[i].Active = true; + } + } + this._balloonsDrawing = this._balloons.Length; + } + + public void ResetBalloon(int i) + { + this._balloons[i].Depth = (float) ((double) i / (double) this._balloons.Length * 1.75 + 1.60000002384186); + this._balloons[i].Speed = (float) (-1.5 - 2.5 * this._random.NextDouble()); + this._balloons[i].Texture = this._textures[this._random.Next(2)].Value; + this._balloons[i].Variant = this._random.Next(3); + if (this._random.Next(30) != 0) + return; + this._balloons[i].Texture = this._textures[2].Value; + } + + private bool IsNearParty() => (double) Main.player[Main.myPlayer].townNPCs > 0.0 || Main.SceneMetrics.PartyMonolithCount > 0; + + public override void Update(GameTime gameTime) + { + if (!PartySky.MultipleSkyWorkaroundFix && Main.dayRate == 0) + return; + PartySky.MultipleSkyWorkaroundFix = false; + if (Main.gamePaused || !Main.hasFocus) + return; + this._opacity = Utils.Clamp(this._opacity + (float) this.IsNearParty().ToDirectionInt() * 0.01f, 0.0f, 1f); + for (int i = 0; i < this._balloons.Length; ++i) + { + if (this._balloons[i].Active) + { + ++this._balloons[i].Frame; + this._balloons[i].Position.Y += this._balloons[i].Speed; + this._balloons[i].Position.X += Main.windSpeedCurrent * (3f - this._balloons[i].Speed); + if ((double) this._balloons[i].Position.Y < 300.0) + { + if (!this._leaving) + { + this.ResetBalloon(i); + this._balloons[i].Position = new Vector2((float) (this._random.Next(0, Main.maxTilesX) * 16), (float) (Main.worldSurface * 16.0 + 1600.0)); + if (this._random.Next(30) == 0) + this._balloons[i].Texture = this._textures[2].Value; + } + else + { + this._balloons[i].Active = false; + --this._balloonsDrawing; + } + } + } + } + if (this._balloonsDrawing == 0) + this._active = false; + this._active = true; + } + + public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) + { + if (Main.gameMenu && this._active) + { + this._active = false; + this._leaving = false; + for (int index = 0; index < this._balloons.Length; ++index) + this._balloons[index].Active = false; + } + if ((double) Main.screenPosition.Y > Main.worldSurface * 16.0 || Main.gameMenu || (double) this._opacity <= 0.0) + return; + int num1 = -1; + int num2 = 0; + for (int index = 0; index < this._balloons.Length; ++index) + { + float depth = this._balloons[index].Depth; + if (num1 == -1 && (double) depth < (double) maxDepth) + num1 = index; + if ((double) depth > (double) minDepth) + num2 = index; + else + break; + } + if (num1 == -1) + return; + Vector2 vector2_1 = Main.screenPosition + new Vector2((float) (Main.screenWidth >> 1), (float) (Main.screenHeight >> 1)); + Rectangle rectangle = new Rectangle(-1000, -1000, 4000, 4000); + for (int index = num1; index < num2; ++index) + { + if (this._balloons[index].Active) + { + Color color = new Color(Main.ColorOfTheSkies.ToVector4() * 0.9f + new Vector4(0.1f)) * 0.8f; + float num3 = 1f; + if ((double) this._balloons[index].Depth > 3.0) + num3 = 0.6f; + else if ((double) this._balloons[index].Depth > 2.5) + num3 = 0.7f; + else if ((double) this._balloons[index].Depth > 2.0) + num3 = 0.8f; + else if ((double) this._balloons[index].Depth > 1.5) + num3 = 0.9f; + float num4 = num3 * 0.9f; + color = new Color((int) ((double) color.R * (double) num4), (int) ((double) color.G * (double) num4), (int) ((double) color.B * (double) num4), (int) ((double) color.A * (double) num4)); + Vector2 vector2_2 = new Vector2(1f / this._balloons[index].Depth, 0.9f / this._balloons[index].Depth); + Vector2 position = (this._balloons[index].Position - vector2_1) * vector2_2 + vector2_1 - Main.screenPosition; + position.X = (float) (((double) position.X + 500.0) % 4000.0); + if ((double) position.X < 0.0) + position.X += 4000f; + position.X -= 500f; + if (rectangle.Contains((int) position.X, (int) position.Y)) + spriteBatch.Draw(this._balloons[index].Texture, position, new Rectangle?(this._balloons[index].GetSourceRectangle()), color * this._opacity, 0.0f, Vector2.Zero, vector2_2.X * 2f, SpriteEffects.None, 0.0f); + } + } + } + + public override void Activate(Vector2 position, params object[] args) + { + if (this._active) + { + this._leaving = false; + this.GenerateBalloons(true); + } + else + { + this.GenerateBalloons(false); + this._active = true; + this._leaving = false; + } + } + + public override void Deactivate(params object[] args) => this._leaving = true; + + public override bool IsActive() => this._active; + + public override void Reset() => this._active = false; + + private struct Balloon + { + private const int MAX_FRAMES_X = 3; + private const int MAX_FRAMES_Y = 3; + private const int FRAME_RATE = 14; + public int Variant; + private Texture2D _texture; + public Vector2 Position; + public float Depth; + public int FrameHeight; + public int FrameWidth; + public float Speed; + public bool Active; + private int _frameCounter; + + public Texture2D Texture + { + get => this._texture; + set + { + this._texture = value; + this.FrameWidth = value.Width / 3; + this.FrameHeight = value.Height / 3; + } + } + + public int Frame + { + get => this._frameCounter; + set => this._frameCounter = value % 42; + } + + public Rectangle GetSourceRectangle() => new Rectangle(this.FrameWidth * this.Variant, this._frameCounter / 14 * this.FrameHeight, this.FrameWidth, this.FrameHeight); + } + } +} diff --git a/GameContent/Skies/SandstormSky.cs b/GameContent/Skies/SandstormSky.cs new file mode 100644 index 0000000..bff8d24 --- /dev/null +++ b/GameContent/Skies/SandstormSky.cs @@ -0,0 +1,73 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.SandstormSky +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria.GameContent.Events; +using Terraria.Graphics.Effects; +using Terraria.Utilities; + +namespace Terraria.GameContent.Skies +{ + public class SandstormSky : CustomSky + { + private UnifiedRandom _random = new UnifiedRandom(); + private bool _isActive; + private bool _isLeaving; + private float _opacity; + + public override void OnLoad() + { + } + + public override void Update(GameTime gameTime) + { + if (Main.gamePaused || !Main.hasFocus) + return; + if (this._isLeaving) + { + this._opacity -= (float) gameTime.ElapsedGameTime.TotalSeconds; + if ((double) this._opacity >= 0.0) + return; + this._isActive = false; + this._opacity = 0.0f; + } + else + { + this._opacity += (float) gameTime.ElapsedGameTime.TotalSeconds; + if ((double) this._opacity <= 1.0) + return; + this._opacity = 1f; + } + } + + public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) + { + if ((double) minDepth >= 1.0 && (double) maxDepth != 3.40282346638529E+38) + return; + float num = Math.Min(1f, Sandstorm.Severity * 1.5f); + Color color = new Color(new Vector4(0.85f, 0.66f, 0.33f, 1f) * 0.8f * Main.ColorOfTheSkies.ToVector4()) * this._opacity * num; + spriteBatch.Draw(TextureAssets.MagicPixel.Value, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), color); + } + + public override void Activate(Vector2 position, params object[] args) + { + this._isActive = true; + this._isLeaving = false; + } + + public override void Deactivate(params object[] args) => this._isLeaving = true; + + public override void Reset() + { + this._opacity = 0.0f; + this._isActive = false; + } + + public override bool IsActive() => this._isActive; + } +} diff --git a/GameContent/Skies/SlimeSky.cs b/GameContent/Skies/SlimeSky.cs new file mode 100644 index 0000000..8d3ebaf --- /dev/null +++ b/GameContent/Skies/SlimeSky.cs @@ -0,0 +1,196 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.SlimeSky +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.Graphics.Effects; +using Terraria.Utilities; + +namespace Terraria.GameContent.Skies +{ + public class SlimeSky : CustomSky + { + private Asset[] _textures; + private SlimeSky.Slime[] _slimes; + private UnifiedRandom _random = new UnifiedRandom(); + private int _slimesRemaining; + private bool _isActive; + private bool _isLeaving; + + public override void OnLoad() + { + this._textures = new Asset[4]; + for (int index = 0; index < 4; ++index) + this._textures[index] = Main.Assets.Request("Images/Misc/Sky_Slime_" + (object) (index + 1), (AssetRequestMode) 1); + this.GenerateSlimes(); + } + + private void GenerateSlimes() + { + this._slimes = new SlimeSky.Slime[Main.maxTilesY / 6]; + for (int index = 0; index < this._slimes.Length; ++index) + { + int maxValue = (int) ((double) Main.screenPosition.Y * 0.7 - (double) Main.screenHeight); + int minValue = (int) ((double) maxValue - Main.worldSurface * 16.0); + this._slimes[index].Position = new Vector2((float) (this._random.Next(0, Main.maxTilesX) * 16), (float) this._random.Next(minValue, maxValue)); + this._slimes[index].Speed = (float) (5.0 + 3.0 * this._random.NextDouble()); + this._slimes[index].Depth = (float) ((double) index / (double) this._slimes.Length * 1.75 + 1.60000002384186); + this._slimes[index].Texture = this._textures[this._random.Next(2)].Value; + if (this._random.Next(60) == 0) + { + this._slimes[index].Texture = this._textures[3].Value; + this._slimes[index].Speed = (float) (6.0 + 3.0 * this._random.NextDouble()); + this._slimes[index].Depth += 0.5f; + } + else if (this._random.Next(30) == 0) + { + this._slimes[index].Texture = this._textures[2].Value; + this._slimes[index].Speed = (float) (6.0 + 2.0 * this._random.NextDouble()); + } + this._slimes[index].Active = true; + } + this._slimesRemaining = this._slimes.Length; + } + + public override void Update(GameTime gameTime) + { + if (Main.gamePaused || !Main.hasFocus) + return; + for (int index = 0; index < this._slimes.Length; ++index) + { + if (this._slimes[index].Active) + { + ++this._slimes[index].Frame; + this._slimes[index].Position.Y += this._slimes[index].Speed; + if ((double) this._slimes[index].Position.Y > Main.worldSurface * 16.0) + { + if (!this._isLeaving) + { + this._slimes[index].Depth = (float) ((double) index / (double) this._slimes.Length * 1.75 + 1.60000002384186); + this._slimes[index].Position = new Vector2((float) (this._random.Next(0, Main.maxTilesX) * 16), -100f); + this._slimes[index].Texture = this._textures[this._random.Next(2)].Value; + this._slimes[index].Speed = (float) (5.0 + 3.0 * this._random.NextDouble()); + if (this._random.Next(60) == 0) + { + this._slimes[index].Texture = this._textures[3].Value; + this._slimes[index].Speed = (float) (6.0 + 3.0 * this._random.NextDouble()); + this._slimes[index].Depth += 0.5f; + } + else if (this._random.Next(30) == 0) + { + this._slimes[index].Texture = this._textures[2].Value; + this._slimes[index].Speed = (float) (6.0 + 2.0 * this._random.NextDouble()); + } + } + else + { + this._slimes[index].Active = false; + --this._slimesRemaining; + } + } + } + } + if (this._slimesRemaining != 0) + return; + this._isActive = false; + } + + public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) + { + if ((double) Main.screenPosition.Y > 10000.0 || Main.gameMenu) + return; + int num1 = -1; + int num2 = 0; + for (int index = 0; index < this._slimes.Length; ++index) + { + float depth = this._slimes[index].Depth; + if (num1 == -1 && (double) depth < (double) maxDepth) + num1 = index; + if ((double) depth > (double) minDepth) + num2 = index; + else + break; + } + if (num1 == -1) + return; + Vector2 vector2_1 = Main.screenPosition + new Vector2((float) (Main.screenWidth >> 1), (float) (Main.screenHeight >> 1)); + Rectangle rectangle = new Rectangle(-1000, -1000, 4000, 4000); + for (int index = num1; index < num2; ++index) + { + if (this._slimes[index].Active) + { + Color color = new Color(Main.ColorOfTheSkies.ToVector4() * 0.9f + new Vector4(0.1f)) * 0.8f; + float num3 = 1f; + if ((double) this._slimes[index].Depth > 3.0) + num3 = 0.6f; + else if ((double) this._slimes[index].Depth > 2.5) + num3 = 0.7f; + else if ((double) this._slimes[index].Depth > 2.0) + num3 = 0.8f; + else if ((double) this._slimes[index].Depth > 1.5) + num3 = 0.9f; + float num4 = num3 * 0.8f; + color = new Color((int) ((double) color.R * (double) num4), (int) ((double) color.G * (double) num4), (int) ((double) color.B * (double) num4), (int) ((double) color.A * (double) num4)); + Vector2 vector2_2 = new Vector2(1f / this._slimes[index].Depth, 0.9f / this._slimes[index].Depth); + Vector2 position = (this._slimes[index].Position - vector2_1) * vector2_2 + vector2_1 - Main.screenPosition; + position.X = (float) (((double) position.X + 500.0) % 4000.0); + if ((double) position.X < 0.0) + position.X += 4000f; + position.X -= 500f; + if (rectangle.Contains((int) position.X, (int) position.Y)) + spriteBatch.Draw(this._slimes[index].Texture, position, new Rectangle?(this._slimes[index].GetSourceRectangle()), color, 0.0f, Vector2.Zero, vector2_2.X * 2f, SpriteEffects.None, 0.0f); + } + } + } + + public override void Activate(Vector2 position, params object[] args) + { + this.GenerateSlimes(); + this._isActive = true; + this._isLeaving = false; + } + + public override void Deactivate(params object[] args) => this._isLeaving = true; + + public override void Reset() => this._isActive = false; + + public override bool IsActive() => this._isActive; + + private struct Slime + { + private const int MAX_FRAMES = 4; + private const int FRAME_RATE = 6; + private Texture2D _texture; + public Vector2 Position; + public float Depth; + public int FrameHeight; + public int FrameWidth; + public float Speed; + public bool Active; + private int _frame; + + public Texture2D Texture + { + get => this._texture; + set + { + this._texture = value; + this.FrameWidth = value.Width; + this.FrameHeight = value.Height / 4; + } + } + + public int Frame + { + get => this._frame; + set => this._frame = value % 24; + } + + public Rectangle GetSourceRectangle() => new Rectangle(0, this._frame / 6 * this.FrameHeight, this.FrameWidth, this.FrameHeight); + } + } +} diff --git a/GameContent/Skies/SolarSky.cs b/GameContent/Skies/SolarSky.cs new file mode 100644 index 0000000..0cbb292 --- /dev/null +++ b/GameContent/Skies/SolarSky.cs @@ -0,0 +1,126 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.SolarSky +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.Graphics.Effects; +using Terraria.Utilities; + +namespace Terraria.GameContent.Skies +{ + public class SolarSky : CustomSky + { + private UnifiedRandom _random = new UnifiedRandom(); + private Asset _planetTexture; + private Asset _bgTexture; + private Asset _meteorTexture; + private bool _isActive; + private SolarSky.Meteor[] _meteors; + private float _fadeOpacity; + + public override void OnLoad() + { + this._planetTexture = Main.Assets.Request("Images/Misc/SolarSky/Planet", (AssetRequestMode) 1); + this._bgTexture = Main.Assets.Request("Images/Misc/SolarSky/Background", (AssetRequestMode) 1); + this._meteorTexture = Main.Assets.Request("Images/Misc/SolarSky/Meteor", (AssetRequestMode) 1); + } + + public override void Update(GameTime gameTime) + { + this._fadeOpacity = !this._isActive ? Math.Max(0.0f, this._fadeOpacity - 0.01f) : Math.Min(1f, 0.01f + this._fadeOpacity); + float num = 1200f; + for (int index = 0; index < this._meteors.Length; ++index) + { + this._meteors[index].Position.X -= num * (float) gameTime.ElapsedGameTime.TotalSeconds; + this._meteors[index].Position.Y += num * (float) gameTime.ElapsedGameTime.TotalSeconds; + if ((double) this._meteors[index].Position.Y > Main.worldSurface * 16.0) + { + this._meteors[index].Position.X = this._meteors[index].StartX; + this._meteors[index].Position.Y = -10000f; + } + } + } + + public override Color OnTileColor(Color inColor) => new Color(Vector4.Lerp(inColor.ToVector4(), Vector4.One, this._fadeOpacity * 0.5f)); + + public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) + { + if ((double) maxDepth >= 3.40282346638529E+38 && (double) minDepth < 3.40282346638529E+38) + { + spriteBatch.Draw(TextureAssets.BlackTile.Value, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Color.Black * this._fadeOpacity); + spriteBatch.Draw(this._bgTexture.Value, new Rectangle(0, Math.Max(0, (int) ((Main.worldSurface * 16.0 - (double) Main.screenPosition.Y - 2400.0) * 0.100000001490116)), Main.screenWidth, Main.screenHeight), Color.White * Math.Min(1f, (float) (((double) Main.screenPosition.Y - 800.0) / 1000.0) * this._fadeOpacity)); + Vector2 vector2_1 = new Vector2((float) (Main.screenWidth >> 1), (float) (Main.screenHeight >> 1)); + Vector2 vector2_2 = 0.01f * (new Vector2((float) Main.maxTilesX * 8f, (float) Main.worldSurface / 2f) - Main.screenPosition); + spriteBatch.Draw(this._planetTexture.Value, vector2_1 + new Vector2(-200f, -200f) + vector2_2, new Rectangle?(), Color.White * 0.9f * this._fadeOpacity, 0.0f, new Vector2((float) (this._planetTexture.Width() >> 1), (float) (this._planetTexture.Height() >> 1)), 1f, SpriteEffects.None, 1f); + } + int num1 = -1; + int num2 = 0; + for (int index = 0; index < this._meteors.Length; ++index) + { + float depth = this._meteors[index].Depth; + if (num1 == -1 && (double) depth < (double) maxDepth) + num1 = index; + if ((double) depth > (double) minDepth) + num2 = index; + else + break; + } + if (num1 == -1) + return; + float num3 = Math.Min(1f, (float) (((double) Main.screenPosition.Y - 1000.0) / 1000.0)); + Vector2 vector2_3 = Main.screenPosition + new Vector2((float) (Main.screenWidth >> 1), (float) (Main.screenHeight >> 1)); + Rectangle rectangle = new Rectangle(-1000, -1000, 4000, 4000); + for (int index = num1; index < num2; ++index) + { + Vector2 vector2_4 = new Vector2(1f / this._meteors[index].Depth, 0.9f / this._meteors[index].Depth); + Vector2 position = (this._meteors[index].Position - vector2_3) * vector2_4 + vector2_3 - Main.screenPosition; + int num4 = this._meteors[index].FrameCounter / 3; + this._meteors[index].FrameCounter = (this._meteors[index].FrameCounter + 1) % 12; + if (rectangle.Contains((int) position.X, (int) position.Y)) + spriteBatch.Draw(this._meteorTexture.Value, position, new Rectangle?(new Rectangle(0, num4 * (this._meteorTexture.Height() / 4), this._meteorTexture.Width(), this._meteorTexture.Height() / 4)), Color.White * num3 * this._fadeOpacity, 0.0f, Vector2.Zero, vector2_4.X * 5f * this._meteors[index].Scale, SpriteEffects.None, 0.0f); + } + } + + public override float GetCloudAlpha() => (float) ((1.0 - (double) this._fadeOpacity) * 0.300000011920929 + 0.699999988079071); + + public override void Activate(Vector2 position, params object[] args) + { + this._fadeOpacity = 1f / 500f; + this._isActive = true; + this._meteors = new SolarSky.Meteor[150]; + for (int index = 0; index < this._meteors.Length; ++index) + { + float num = (float) index / (float) this._meteors.Length; + this._meteors[index].Position.X = (float) ((double) num * ((double) Main.maxTilesX * 16.0) + (double) this._random.NextFloat() * 40.0 - 20.0); + this._meteors[index].Position.Y = (float) ((double) this._random.NextFloat() * -(Main.worldSurface * 16.0 + 10000.0) - 10000.0); + this._meteors[index].Depth = this._random.Next(3) == 0 ? (float) ((double) this._random.NextFloat() * 5.0 + 4.80000019073486) : (float) ((double) this._random.NextFloat() * 3.0 + 1.79999995231628); + this._meteors[index].FrameCounter = this._random.Next(12); + this._meteors[index].Scale = (float) ((double) this._random.NextFloat() * 0.5 + 1.0); + this._meteors[index].StartX = this._meteors[index].Position.X; + } + Array.Sort(this._meteors, new Comparison(this.SortMethod)); + } + + private int SortMethod(SolarSky.Meteor meteor1, SolarSky.Meteor meteor2) => meteor2.Depth.CompareTo(meteor1.Depth); + + public override void Deactivate(params object[] args) => this._isActive = false; + + public override void Reset() => this._isActive = false; + + public override bool IsActive() => this._isActive || (double) this._fadeOpacity > 1.0 / 1000.0; + + private struct Meteor + { + public Vector2 Position; + public float Depth; + public int FrameCounter; + public float Scale; + public float StartX; + } + } +} diff --git a/GameContent/Skies/StardustSky.cs b/GameContent/Skies/StardustSky.cs new file mode 100644 index 0000000..43e2494 --- /dev/null +++ b/GameContent/Skies/StardustSky.cs @@ -0,0 +1,134 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.StardustSky +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.Graphics.Effects; +using Terraria.Utilities; + +namespace Terraria.GameContent.Skies +{ + public class StardustSky : CustomSky + { + private UnifiedRandom _random = new UnifiedRandom(); + private Asset _planetTexture; + private Asset _bgTexture; + private Asset[] _starTextures; + private bool _isActive; + private StardustSky.Star[] _stars; + private float _fadeOpacity; + + public override void OnLoad() + { + this._planetTexture = Main.Assets.Request("Images/Misc/StarDustSky/Planet", (AssetRequestMode) 1); + this._bgTexture = Main.Assets.Request("Images/Misc/StarDustSky/Background", (AssetRequestMode) 1); + this._starTextures = new Asset[2]; + for (int index = 0; index < this._starTextures.Length; ++index) + this._starTextures[index] = Main.Assets.Request("Images/Misc/StarDustSky/Star " + (object) index, (AssetRequestMode) 1); + } + + public override void Update(GameTime gameTime) + { + if (this._isActive) + this._fadeOpacity = Math.Min(1f, 0.01f + this._fadeOpacity); + else + this._fadeOpacity = Math.Max(0.0f, this._fadeOpacity - 0.01f); + } + + public override Color OnTileColor(Color inColor) => new Color(Vector4.Lerp(inColor.ToVector4(), Vector4.One, this._fadeOpacity * 0.5f)); + + public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) + { + if ((double) maxDepth >= 3.40282346638529E+38 && (double) minDepth < 3.40282346638529E+38) + { + spriteBatch.Draw(TextureAssets.BlackTile.Value, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Color.Black * this._fadeOpacity); + spriteBatch.Draw(this._bgTexture.Value, new Rectangle(0, Math.Max(0, (int) ((Main.worldSurface * 16.0 - (double) Main.screenPosition.Y - 2400.0) * 0.100000001490116)), Main.screenWidth, Main.screenHeight), Color.White * Math.Min(1f, (float) (((double) Main.screenPosition.Y - 800.0) / 1000.0) * this._fadeOpacity)); + Vector2 vector2_1 = new Vector2((float) (Main.screenWidth >> 1), (float) (Main.screenHeight >> 1)); + Vector2 vector2_2 = 0.01f * (new Vector2((float) Main.maxTilesX * 8f, (float) Main.worldSurface / 2f) - Main.screenPosition); + spriteBatch.Draw(this._planetTexture.Value, vector2_1 + new Vector2(-200f, -200f) + vector2_2, new Rectangle?(), Color.White * 0.9f * this._fadeOpacity, 0.0f, new Vector2((float) (this._planetTexture.Width() >> 1), (float) (this._planetTexture.Height() >> 1)), 1f, SpriteEffects.None, 1f); + } + int num1 = -1; + int num2 = 0; + for (int index = 0; index < this._stars.Length; ++index) + { + float depth = this._stars[index].Depth; + if (num1 == -1 && (double) depth < (double) maxDepth) + num1 = index; + if ((double) depth > (double) minDepth) + num2 = index; + else + break; + } + if (num1 == -1) + return; + float num3 = Math.Min(1f, (float) (((double) Main.screenPosition.Y - 1000.0) / 1000.0)); + Vector2 vector2_3 = Main.screenPosition + new Vector2((float) (Main.screenWidth >> 1), (float) (Main.screenHeight >> 1)); + Rectangle rectangle = new Rectangle(-1000, -1000, 4000, 4000); + for (int index = num1; index < num2; ++index) + { + Vector2 vector2_4 = new Vector2(1f / this._stars[index].Depth, 1.1f / this._stars[index].Depth); + Vector2 position = (this._stars[index].Position - vector2_3) * vector2_4 + vector2_3 - Main.screenPosition; + if (rectangle.Contains((int) position.X, (int) position.Y)) + { + float num4 = (float) Math.Sin((double) this._stars[index].AlphaFrequency * (double) Main.GlobalTimeWrappedHourly + (double) this._stars[index].SinOffset) * this._stars[index].AlphaAmplitude + this._stars[index].AlphaAmplitude; + float num5 = (float) (Math.Sin((double) this._stars[index].AlphaFrequency * (double) Main.GlobalTimeWrappedHourly * 5.0 + (double) this._stars[index].SinOffset) * 0.100000001490116 - 0.100000001490116); + float num6 = MathHelper.Clamp(num4, 0.0f, 1f); + Texture2D texture = this._starTextures[this._stars[index].TextureIndex].Value; + spriteBatch.Draw(texture, position, new Rectangle?(), Color.White * num3 * num6 * 0.8f * (1f - num5) * this._fadeOpacity, 0.0f, new Vector2((float) (texture.Width >> 1), (float) (texture.Height >> 1)), (float) (((double) vector2_4.X * 0.5 + 0.5) * ((double) num6 * 0.300000011920929 + 0.699999988079071)), SpriteEffects.None, 0.0f); + } + } + } + + public override float GetCloudAlpha() => (float) ((1.0 - (double) this._fadeOpacity) * 0.300000011920929 + 0.699999988079071); + + public override void Activate(Vector2 position, params object[] args) + { + this._fadeOpacity = 1f / 500f; + this._isActive = true; + int num1 = 200; + int num2 = 10; + this._stars = new StardustSky.Star[num1 * num2]; + int index1 = 0; + for (int index2 = 0; index2 < num1; ++index2) + { + float num3 = (float) index2 / (float) num1; + for (int index3 = 0; index3 < num2; ++index3) + { + float num4 = (float) index3 / (float) num2; + this._stars[index1].Position.X = (float) ((double) num3 * (double) Main.maxTilesX * 16.0); + this._stars[index1].Position.Y = (float) ((double) num4 * (Main.worldSurface * 16.0 + 2000.0) - 1000.0); + this._stars[index1].Depth = (float) ((double) this._random.NextFloat() * 8.0 + 1.5); + this._stars[index1].TextureIndex = this._random.Next(this._starTextures.Length); + this._stars[index1].SinOffset = this._random.NextFloat() * 6.28f; + this._stars[index1].AlphaAmplitude = this._random.NextFloat() * 5f; + this._stars[index1].AlphaFrequency = this._random.NextFloat() + 1f; + ++index1; + } + } + Array.Sort(this._stars, new Comparison(this.SortMethod)); + } + + private int SortMethod(StardustSky.Star meteor1, StardustSky.Star meteor2) => meteor2.Depth.CompareTo(meteor1.Depth); + + public override void Deactivate(params object[] args) => this._isActive = false; + + public override void Reset() => this._isActive = false; + + public override bool IsActive() => this._isActive || (double) this._fadeOpacity > 1.0 / 1000.0; + + private struct Star + { + public Vector2 Position; + public float Depth; + public int TextureIndex; + public float SinOffset; + public float AlphaFrequency; + public float AlphaAmplitude; + } + } +} diff --git a/GameContent/Skies/VortexSky.cs b/GameContent/Skies/VortexSky.cs new file mode 100644 index 0000000..b4c46ce --- /dev/null +++ b/GameContent/Skies/VortexSky.cs @@ -0,0 +1,122 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Skies.VortexSky +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.Graphics.Effects; +using Terraria.Utilities; + +namespace Terraria.GameContent.Skies +{ + public class VortexSky : CustomSky + { + private UnifiedRandom _random = new UnifiedRandom(); + private Asset _planetTexture; + private Asset _bgTexture; + private Asset _boltTexture; + private Asset _flashTexture; + private bool _isActive; + private int _ticksUntilNextBolt; + private float _fadeOpacity; + private VortexSky.Bolt[] _bolts; + + public override void OnLoad() + { + this._planetTexture = Main.Assets.Request("Images/Misc/VortexSky/Planet", (AssetRequestMode) 1); + this._bgTexture = Main.Assets.Request("Images/Misc/VortexSky/Background", (AssetRequestMode) 1); + this._boltTexture = Main.Assets.Request("Images/Misc/VortexSky/Bolt", (AssetRequestMode) 1); + this._flashTexture = Main.Assets.Request("Images/Misc/VortexSky/Flash", (AssetRequestMode) 1); + } + + public override void Update(GameTime gameTime) + { + this._fadeOpacity = !this._isActive ? Math.Max(0.0f, this._fadeOpacity - 0.01f) : Math.Min(1f, 0.01f + this._fadeOpacity); + if (this._ticksUntilNextBolt <= 0) + { + this._ticksUntilNextBolt = this._random.Next(1, 5); + int index = 0; + while (this._bolts[index].IsAlive && index != this._bolts.Length - 1) + ++index; + this._bolts[index].IsAlive = true; + this._bolts[index].Position.X = (float) ((double) this._random.NextFloat() * ((double) Main.maxTilesX * 16.0 + 4000.0) - 2000.0); + this._bolts[index].Position.Y = this._random.NextFloat() * 500f; + this._bolts[index].Depth = (float) ((double) this._random.NextFloat() * 8.0 + 2.0); + this._bolts[index].Life = 30; + } + --this._ticksUntilNextBolt; + for (int index = 0; index < this._bolts.Length; ++index) + { + if (this._bolts[index].IsAlive) + { + --this._bolts[index].Life; + if (this._bolts[index].Life <= 0) + this._bolts[index].IsAlive = false; + } + } + } + + public override Color OnTileColor(Color inColor) => new Color(Vector4.Lerp(inColor.ToVector4(), Vector4.One, this._fadeOpacity * 0.5f)); + + public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) + { + if ((double) maxDepth >= 3.40282346638529E+38 && (double) minDepth < 3.40282346638529E+38) + { + spriteBatch.Draw(TextureAssets.BlackTile.Value, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Color.Black * this._fadeOpacity); + spriteBatch.Draw(this._bgTexture.Value, new Rectangle(0, Math.Max(0, (int) ((Main.worldSurface * 16.0 - (double) Main.screenPosition.Y - 2400.0) * 0.100000001490116)), Main.screenWidth, Main.screenHeight), Color.White * Math.Min(1f, (float) (((double) Main.screenPosition.Y - 800.0) / 1000.0)) * this._fadeOpacity); + Vector2 vector2_1 = new Vector2((float) (Main.screenWidth >> 1), (float) (Main.screenHeight >> 1)); + Vector2 vector2_2 = 0.01f * (new Vector2((float) Main.maxTilesX * 8f, (float) Main.worldSurface / 2f) - Main.screenPosition); + spriteBatch.Draw(this._planetTexture.Value, vector2_1 + new Vector2(-200f, -200f) + vector2_2, new Rectangle?(), Color.White * 0.9f * this._fadeOpacity, 0.0f, new Vector2((float) (this._planetTexture.Width() >> 1), (float) (this._planetTexture.Height() >> 1)), 1f, SpriteEffects.None, 1f); + } + float num1 = Math.Min(1f, (float) (((double) Main.screenPosition.Y - 1000.0) / 1000.0)); + Vector2 vector2_3 = Main.screenPosition + new Vector2((float) (Main.screenWidth >> 1), (float) (Main.screenHeight >> 1)); + Rectangle rectangle = new Rectangle(-1000, -1000, 4000, 4000); + for (int index = 0; index < this._bolts.Length; ++index) + { + if (this._bolts[index].IsAlive && (double) this._bolts[index].Depth > (double) minDepth && (double) this._bolts[index].Depth < (double) maxDepth) + { + Vector2 vector2_4 = new Vector2(1f / this._bolts[index].Depth, 0.9f / this._bolts[index].Depth); + Vector2 position = (this._bolts[index].Position - vector2_3) * vector2_4 + vector2_3 - Main.screenPosition; + if (rectangle.Contains((int) position.X, (int) position.Y)) + { + Texture2D texture = this._boltTexture.Value; + int life = this._bolts[index].Life; + if (life > 26 && life % 2 == 0) + texture = this._flashTexture.Value; + float num2 = (float) life / 30f; + spriteBatch.Draw(texture, position, new Rectangle?(), Color.White * num1 * num2 * this._fadeOpacity, 0.0f, Vector2.Zero, vector2_4.X * 5f, SpriteEffects.None, 0.0f); + } + } + } + } + + public override float GetCloudAlpha() => (float) ((1.0 - (double) this._fadeOpacity) * 0.300000011920929 + 0.699999988079071); + + public override void Activate(Vector2 position, params object[] args) + { + this._fadeOpacity = 1f / 500f; + this._isActive = true; + this._bolts = new VortexSky.Bolt[500]; + for (int index = 0; index < this._bolts.Length; ++index) + this._bolts[index].IsAlive = false; + } + + public override void Deactivate(params object[] args) => this._isActive = false; + + public override void Reset() => this._isActive = false; + + public override bool IsActive() => this._isActive || (double) this._fadeOpacity > 1.0 / 1000.0; + + private struct Bolt + { + public Vector2 Position; + public float Depth; + public int Life; + public bool IsAlive; + } + } +} diff --git a/GameContent/SmartCursorHelper.cs b/GameContent/SmartCursorHelper.cs new file mode 100644 index 0000000..8d0bf46 --- /dev/null +++ b/GameContent/SmartCursorHelper.cs @@ -0,0 +1,2364 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.SmartCursorHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.Enums; +using Terraria.GameContent.UI; +using Terraria.GameInput; +using Terraria.ID; + +namespace Terraria.GameContent +{ + public class SmartCursorHelper + { + private static List> _targets = new List>(); + private static List> _grappleTargets = new List>(); + private static List> _points = new List>(); + private static List> _endpoints = new List>(); + private static List> _toRemove = new List>(); + private static List> _targets2 = new List>(); + + public static void SmartCursorLookup(Player player) + { + Main.SmartCursorShowing = false; + if (!Main.SmartCursorEnabled) + return; + SmartCursorHelper.SmartCursorUsageInfo providedInfo = new SmartCursorHelper.SmartCursorUsageInfo() + { + player = player, + item = player.inventory[player.selectedItem], + mouse = Main.MouseWorld, + position = player.position, + Center = player.Center + }; + double gravDir = (double) player.gravDir; + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + int tileRangeX = Player.tileRangeX; + int tileRangeY = Player.tileRangeY; + providedInfo.screenTargetX = Utils.Clamp(tileTargetX, 10, Main.maxTilesX - 10); + providedInfo.screenTargetY = Utils.Clamp(tileTargetY, 10, Main.maxTilesY - 10); + if (Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY] == null) + return; + int num1 = SmartCursorHelper.IsHoveringOverAnInteractibleTileThatBlocksSmartCursor(providedInfo) ? 1 : 0; + int num2 = SmartCursorHelper.TryFindingPaintInplayerInventory(providedInfo); + providedInfo.paintLookup = num2; + int tileBoost = providedInfo.item.tileBoost; + providedInfo.reachableStartX = (int) ((double) player.position.X / 16.0) - tileRangeX - tileBoost + 1; + providedInfo.reachableEndX = (int) (((double) player.position.X + (double) player.width) / 16.0) + tileRangeX + tileBoost - 1; + providedInfo.reachableStartY = (int) ((double) player.position.Y / 16.0) - tileRangeY - tileBoost + 1; + providedInfo.reachableEndY = (int) (((double) player.position.Y + (double) player.height) / 16.0) + tileRangeY + tileBoost - 2; + providedInfo.reachableStartX = Utils.Clamp(providedInfo.reachableStartX, 10, Main.maxTilesX - 10); + providedInfo.reachableEndX = Utils.Clamp(providedInfo.reachableEndX, 10, Main.maxTilesX - 10); + providedInfo.reachableStartY = Utils.Clamp(providedInfo.reachableStartY, 10, Main.maxTilesY - 10); + providedInfo.reachableEndY = Utils.Clamp(providedInfo.reachableEndY, 10, Main.maxTilesY - 10); + if (num1 != 0 && providedInfo.screenTargetX >= providedInfo.reachableStartX && providedInfo.screenTargetX <= providedInfo.reachableEndX && providedInfo.screenTargetY >= providedInfo.reachableStartY && providedInfo.screenTargetY <= providedInfo.reachableEndY) + return; + SmartCursorHelper._grappleTargets.Clear(); + int[] grappling = player.grappling; + int grapCount = player.grapCount; + for (int index = 0; index < grapCount; ++index) + { + Projectile projectile = Main.projectile[grappling[index]]; + int num3 = (int) projectile.Center.X / 16; + int num4 = (int) projectile.Center.Y / 16; + SmartCursorHelper._grappleTargets.Add(new Tuple(num3, num4)); + } + int num5 = -1; + int num6 = -1; + if (!Player.SmartCursorSettings.SmartAxeAfterPickaxe) + SmartCursorHelper.Step_Axe(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_ForceCursorToAnyMinableThing(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_Pickaxe_MineShinies(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_Pickaxe_MineSolids(player, providedInfo, SmartCursorHelper._grappleTargets, ref num5, ref num6); + if (Player.SmartCursorSettings.SmartAxeAfterPickaxe) + SmartCursorHelper.Step_Axe(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_ColoredWrenches(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_MulticolorWrench(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_Hammers(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_ActuationRod(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_WireCutter(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_Platforms(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_MinecartTracks(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_Walls(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_PumpkinSeeds(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_Pigronata(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_Boulders(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_Torch(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_LawnMower(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_BlocksFilling(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_BlocksLines(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_PaintRoller(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_PaintBrush(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_PaintScrapper(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_Acorns(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_GemCorns(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_EmptyBuckets(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_Actuators(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_AlchemySeeds(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_PlanterBox(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_ClayPots(providedInfo, ref num5, ref num6); + SmartCursorHelper.Step_StaffOfRegrowth(providedInfo, ref num5, ref num6); + if (num5 != -1 && num6 != -1) + { + Main.SmartCursorX = Player.tileTargetX = num5; + Main.SmartCursorY = Player.tileTargetY = num6; + Main.SmartCursorShowing = true; + } + SmartCursorHelper._grappleTargets.Clear(); + } + + private static int TryFindingPaintInplayerInventory( + SmartCursorHelper.SmartCursorUsageInfo providedInfo) + { + Item[] inventory = providedInfo.player.inventory; + int num = 0; + if (providedInfo.item.type == 1071 || providedInfo.item.type == 1543 || providedInfo.item.type == 1072 || providedInfo.item.type == 1544) + { + for (int index = 0; index < 58; ++index) + { + if (inventory[index].stack > 0 && inventory[index].paint > (byte) 0) + { + num = (int) inventory[index].paint; + break; + } + } + } + return num; + } + + private static bool IsHoveringOverAnInteractibleTileThatBlocksSmartCursor( + SmartCursorHelper.SmartCursorUsageInfo providedInfo) + { + bool flag = false; + if (Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY].active()) + { + switch (Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY].type) + { + case 4: + case 10: + case 11: + case 13: + case 21: + case 29: + case 33: + case 49: + case 50: + case 55: + case 79: + case 85: + case 88: + case 97: + case 104: + case 125: + case 132: + case 136: + case 139: + case 144: + case 174: + case 207: + case 209: + case 212: + case 216: + case 219: + case 237: + case 287: + case 334: + case 335: + case 338: + case 354: + case 386: + case 387: + case 388: + case 389: + case 411: + case 425: + case 441: + case 463: + case 467: + case 468: + case 491: + case 494: + case 510: + case 511: + case 573: + case 621: + flag = true; + break; + case 314: + if ((double) providedInfo.player.gravDir == 1.0) + { + flag = true; + break; + } + break; + } + } + return flag; + } + + private static void Step_StaffOfRegrowth( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + if (providedInfo.item.type != 213 || focusedX != -1 || focusedY != -1) + return; + SmartCursorHelper._targets.Clear(); + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile = Main.tile[reachableStartX, reachableStartY]; + bool flag1 = !Main.tile[reachableStartX - 1, reachableStartY].active() || !Main.tile[reachableStartX, reachableStartY + 1].active() || !Main.tile[reachableStartX + 1, reachableStartY].active() || !Main.tile[reachableStartX, reachableStartY - 1].active(); + bool flag2 = !Main.tile[reachableStartX - 1, reachableStartY - 1].active() || !Main.tile[reachableStartX - 1, reachableStartY + 1].active() || !Main.tile[reachableStartX + 1, reachableStartY + 1].active() || !Main.tile[reachableStartX + 1, reachableStartY - 1].active(); + if (tile.active() && !tile.inActive() && tile.type == (ushort) 0 && (flag1 || tile.type == (ushort) 0 & flag2)) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num1 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num2 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_ClayPots( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + if (providedInfo.item.createTile != 78 || focusedX != -1 || focusedY != -1) + return; + SmartCursorHelper._targets.Clear(); + bool flag = false; + if (Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY].active()) + flag = true; + if (!Collision.InTileBounds(providedInfo.screenTargetX, providedInfo.screenTargetY, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + flag = true; + if (!flag) + { + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile1 = Main.tile[reachableStartX, reachableStartY]; + Tile tile2 = Main.tile[reachableStartX, reachableStartY + 1]; + if ((!tile1.active() || Main.tileCut[(int) tile1.type] || TileID.Sets.BreakableWhenPlacing[(int) tile1.type]) && tile2.nactive() && !tile2.halfBrick() && tile2.slope() == (byte) 0 && Main.tileSolid[(int) tile2.type]) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + } + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num1 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + if (Collision.EmptyTile(SmartCursorHelper._targets[index].Item1, SmartCursorHelper._targets[index].Item2, true)) + { + float num2 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + target = SmartCursorHelper._targets[index]; + } + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY) && (double) num1 != -1.0) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_PlanterBox( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + if (providedInfo.item.createTile != 380 || focusedX != -1 || focusedY != -1) + return; + SmartCursorHelper._targets.Clear(); + bool flag = false; + if (Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY].active() && Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY].type == (ushort) 380) + flag = true; + if (!flag) + { + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile = Main.tile[reachableStartX, reachableStartY]; + if (tile.active() && tile.type == (ushort) 380) + { + if (!Main.tile[reachableStartX - 1, reachableStartY].active() || Main.tileCut[(int) Main.tile[reachableStartX - 1, reachableStartY].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[reachableStartX - 1, reachableStartY].type]) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX - 1, reachableStartY)); + if (!Main.tile[reachableStartX + 1, reachableStartY].active() || Main.tileCut[(int) Main.tile[reachableStartX + 1, reachableStartY].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[reachableStartX + 1, reachableStartY].type]) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX + 1, reachableStartY)); + } + } + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num1 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num2 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY) && (double) num1 != -1.0) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_AlchemySeeds( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + if (providedInfo.item.createTile != 82 || focusedX != -1 || focusedY != -1) + return; + int placeStyle = providedInfo.item.placeStyle; + SmartCursorHelper._targets.Clear(); + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile1 = Main.tile[reachableStartX, reachableStartY]; + Tile tile2 = Main.tile[reachableStartX, reachableStartY + 1]; + int num = !tile1.active() || TileID.Sets.BreakableWhenPlacing[(int) tile1.type] ? 1 : (!Main.tileCut[(int) tile1.type] || tile1.type == (ushort) 82 ? 0 : (WorldGen.IsHarvestableHerbWithSeed((int) tile1.type, (int) tile1.frameX / 18) ? 1 : 0)); + bool flag = tile2.nactive() && !tile2.halfBrick() && tile2.slope() == (byte) 0; + if (num != 0 && flag) + { + switch (placeStyle) + { + case 0: + if (tile2.type != (ushort) 78 && tile2.type != (ushort) 380 && tile2.type != (ushort) 2 && tile2.type != (ushort) 477 && tile2.type != (ushort) 109 && tile2.type != (ushort) 492 || tile1.liquid > (byte) 0) + continue; + break; + case 1: + if (tile2.type != (ushort) 78 && tile2.type != (ushort) 380 && tile2.type != (ushort) 60 || tile1.liquid > (byte) 0) + continue; + break; + case 2: + if (tile2.type != (ushort) 78 && tile2.type != (ushort) 380 && tile2.type != (ushort) 0 && tile2.type != (ushort) 59 || tile1.liquid > (byte) 0) + continue; + break; + case 3: + if (tile2.type != (ushort) 78 && tile2.type != (ushort) 380 && tile2.type != (ushort) 203 && tile2.type != (ushort) 199 && tile2.type != (ushort) 23 && tile2.type != (ushort) 25 || tile1.liquid > (byte) 0) + continue; + break; + case 4: + if (tile2.type != (ushort) 78 && tile2.type != (ushort) 380 && tile2.type != (ushort) 53 && tile2.type != (ushort) 116 || tile1.liquid > (byte) 0 && tile1.lava()) + continue; + break; + case 5: + if (tile2.type != (ushort) 78 && tile2.type != (ushort) 380 && tile2.type != (ushort) 57 || tile1.liquid > (byte) 0 && !tile1.lava()) + continue; + break; + case 6: + if (tile2.type != (ushort) 78 && tile2.type != (ushort) 380 && tile2.type != (ushort) 147 && tile2.type != (ushort) 161 && tile2.type != (ushort) 163 && tile2.type != (ushort) 164 && tile2.type != (ushort) 200 || tile1.liquid > (byte) 0 && tile1.lava()) + continue; + break; + } + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + } + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num1 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num2 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_Actuators( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + if (providedInfo.item.type != 849 || focusedX != -1 || focusedY != -1) + return; + SmartCursorHelper._targets.Clear(); + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile = Main.tile[reachableStartX, reachableStartY]; + if ((tile.wire() || tile.wire2() || tile.wire3() || tile.wire4()) && !tile.actuator() && tile.active()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num1 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num2 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_EmptyBuckets( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + if (providedInfo.item.type != 205 || focusedX != -1 || focusedY != -1) + return; + SmartCursorHelper._targets.Clear(); + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile = Main.tile[reachableStartX, reachableStartY]; + if (tile.liquid > (byte) 0) + { + int num1 = (int) tile.liquidType(); + int num2 = 0; + for (int index1 = reachableStartX - 1; index1 <= reachableStartX + 1; ++index1) + { + for (int index2 = reachableStartY - 1; index2 <= reachableStartY + 1; ++index2) + { + if ((int) Main.tile[index1, index2].liquidType() == num1) + num2 += (int) Main.tile[index1, index2].liquid; + } + } + if (num2 > 100) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + } + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num3 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num4 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num3 == -1.0 || (double) num4 < (double) num3) + { + num3 = num4; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_PaintScrapper( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + if (!ItemID.Sets.IsPaintScraper[providedInfo.item.type] || focusedX != -1 || focusedY != -1) + return; + SmartCursorHelper._targets.Clear(); + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile = Main.tile[reachableStartX, reachableStartY]; + if (tile.active() && (tile.color() > (byte) 0 || tile.type == (ushort) 184) || tile.wall > (ushort) 0 && tile.wallColor() > (byte) 0) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num1 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num2 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_PaintBrush( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + if (providedInfo.item.type != 1071 && providedInfo.item.type != 1543 || providedInfo.paintLookup == 0 || focusedX != -1 || focusedY != -1) + return; + SmartCursorHelper._targets.Clear(); + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile = Main.tile[reachableStartX, reachableStartY]; + if (tile.active() && (int) tile.color() != providedInfo.paintLookup) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num1 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num2 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_PaintRoller( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + if (providedInfo.item.type != 1072 && providedInfo.item.type != 1544 || providedInfo.paintLookup == 0 || focusedX != -1 || focusedY != -1) + return; + SmartCursorHelper._targets.Clear(); + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile = Main.tile[reachableStartX, reachableStartY]; + if (tile.wall > (ushort) 0 && (int) tile.wallColor() != providedInfo.paintLookup && (!tile.active() || !Main.tileSolid[(int) tile.type] || Main.tileSolidTop[(int) tile.type])) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num1 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num2 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_BlocksLines( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + if (!Player.SmartCursorSettings.SmartBlocksEnabled || providedInfo.item.createTile <= -1 || providedInfo.item.type == 213 || !Main.tileSolid[providedInfo.item.createTile] || Main.tileSolidTop[providedInfo.item.createTile] || Main.tileFrameImportant[providedInfo.item.createTile] || focusedX != -1 || focusedY != -1) + return; + SmartCursorHelper._targets.Clear(); + bool flag1 = false; + if (Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY].active()) + flag1 = true; + if (!Collision.InTileBounds(providedInfo.screenTargetX, providedInfo.screenTargetY, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + flag1 = true; + if (!flag1) + { + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile = Main.tile[reachableStartX, reachableStartY]; + if (!tile.active() || Main.tileCut[(int) tile.type] || TileID.Sets.BreakableWhenPlacing[(int) tile.type]) + { + bool flag2 = false; + if (Main.tile[reachableStartX - 1, reachableStartY].active() && Main.tileSolid[(int) Main.tile[reachableStartX - 1, reachableStartY].type] && !Main.tileSolidTop[(int) Main.tile[reachableStartX - 1, reachableStartY].type]) + flag2 = true; + if (Main.tile[reachableStartX + 1, reachableStartY].active() && Main.tileSolid[(int) Main.tile[reachableStartX + 1, reachableStartY].type] && !Main.tileSolidTop[(int) Main.tile[reachableStartX + 1, reachableStartY].type]) + flag2 = true; + if (Main.tile[reachableStartX, reachableStartY - 1].active() && Main.tileSolid[(int) Main.tile[reachableStartX, reachableStartY - 1].type] && !Main.tileSolidTop[(int) Main.tile[reachableStartX, reachableStartY - 1].type]) + flag2 = true; + if (Main.tile[reachableStartX, reachableStartY + 1].active() && Main.tileSolid[(int) Main.tile[reachableStartX, reachableStartY + 1].type] && !Main.tileSolidTop[(int) Main.tile[reachableStartX, reachableStartY + 1].type]) + flag2 = true; + if (flag2) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + } + } + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num1 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + if (Collision.EmptyTile(SmartCursorHelper._targets[index].Item1, SmartCursorHelper._targets[index].Item2)) + { + float num2 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + target = SmartCursorHelper._targets[index]; + } + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY) && (double) num1 != -1.0) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_Boulders( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + if (providedInfo.item.createTile != 138 || focusedX != -1 || focusedY != -1) + return; + SmartCursorHelper._targets.Clear(); + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile1 = Main.tile[reachableStartX, reachableStartY + 1]; + Tile tile2 = Main.tile[reachableStartX - 1, reachableStartY + 1]; + bool flag = true; + if (!tile2.nactive() || !tile1.nactive()) + flag = false; + if (tile2.slope() > (byte) 0 || tile1.slope() > (byte) 0 || tile2.halfBrick() || tile1.halfBrick()) + flag = false; + if (Main.tileNoAttach[(int) tile2.type] || Main.tileNoAttach[(int) tile1.type]) + flag = false; + for (int index1 = reachableStartX - 1; index1 <= reachableStartX; ++index1) + { + for (int index2 = reachableStartY - 1; index2 <= reachableStartY; ++index2) + { + Tile tile3 = Main.tile[index1, index2]; + if (tile3.active() && !Main.tileCut[(int) tile3.type]) + flag = false; + } + } + Rectangle rectangle = new Rectangle(reachableStartX * 16 - 16, reachableStartY * 16 - 16, 32, 32); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + Player player = Main.player[index]; + if (player.active && !player.dead && player.Hitbox.Intersects(rectangle)) + { + flag = false; + break; + } + } + if (flag) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num1 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num2 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_Pigronata( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + if (providedInfo.item.createTile != 454 || focusedX != -1 || focusedY != -1) + return; + SmartCursorHelper._targets.Clear(); + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY && (double) reachableStartY <= Main.worldSurface - 2.0; ++reachableStartY) + { + bool flag = true; + for (int index1 = reachableStartX - 2; index1 <= reachableStartX + 1; ++index1) + { + for (int index2 = reachableStartY - 1; index2 <= reachableStartY + 2; ++index2) + { + Tile testTile = Main.tile[index1, index2]; + if (index2 == reachableStartY - 1) + { + if (!WorldGen.SolidTile(testTile)) + flag = false; + } + else if (testTile.active() && (!Main.tileCut[(int) testTile.type] || testTile.type == (ushort) 454)) + flag = false; + } + } + if (flag) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num1 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num2 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_PumpkinSeeds( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + if (providedInfo.item.createTile != 254 || focusedX != -1 || focusedY != -1) + return; + SmartCursorHelper._targets.Clear(); + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile1 = Main.tile[reachableStartX, reachableStartY + 1]; + Tile tile2 = Main.tile[reachableStartX - 1, reachableStartY + 1]; + if ((double) reachableStartY <= Main.worldSurface - 2.0) + { + bool flag = true; + if (!tile2.active() || !tile1.active()) + flag = false; + if (tile2.slope() > (byte) 0 || tile1.slope() > (byte) 0 || tile2.halfBrick() || tile1.halfBrick()) + flag = false; + if (tile2.type != (ushort) 2 && tile2.type != (ushort) 477 && tile2.type != (ushort) 109 && tile2.type != (ushort) 492) + flag = false; + if (tile1.type != (ushort) 2 && tile1.type != (ushort) 477 && tile1.type != (ushort) 109 && tile1.type != (ushort) 492) + flag = false; + for (int x = reachableStartX - 1; x <= reachableStartX; ++x) + { + for (int y = reachableStartY - 1; y <= reachableStartY; ++y) + { + if (Main.tile[x, y].active() && !WorldGen.CanCutTile(x, y, TileCuttingContext.TilePlacement)) + flag = false; + } + } + if (flag) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + } + else + break; + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num1 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num2 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_Walls( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + int width = providedInfo.player.width; + int height = providedInfo.player.height; + if (providedInfo.item.createWall <= 0 || focusedX != -1 || focusedY != -1) + return; + SmartCursorHelper._targets.Clear(); + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile = Main.tile[reachableStartX, reachableStartY]; + if (tile.wall == (ushort) 0 && (!tile.active() || !Main.tileSolid[(int) tile.type] || Main.tileSolidTop[(int) tile.type]) && Collision.CanHitWithCheck(providedInfo.position, width, height, new Vector2((float) reachableStartX, (float) reachableStartY) * 16f, 16, 16, new Utils.TileActionAttempt(DelegateMethods.NotDoorStand))) + { + bool flag = false; + if (Main.tile[reachableStartX - 1, reachableStartY].active() || Main.tile[reachableStartX - 1, reachableStartY].wall > (ushort) 0) + flag = true; + if (Main.tile[reachableStartX + 1, reachableStartY].active() || Main.tile[reachableStartX + 1, reachableStartY].wall > (ushort) 0) + flag = true; + if (Main.tile[reachableStartX, reachableStartY - 1].active() || Main.tile[reachableStartX, reachableStartY - 1].wall > (ushort) 0) + flag = true; + if (Main.tile[reachableStartX, reachableStartY + 1].active() || Main.tile[reachableStartX, reachableStartY + 1].wall > (ushort) 0) + flag = true; + if (WorldGen.IsOpenDoorAnchorFrame(reachableStartX, reachableStartY)) + flag = false; + if (flag) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + } + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num1 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num2 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_MinecartTracks( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + if ((providedInfo.item.type == 2340 || providedInfo.item.type == 2739) && focusedX == -1 && focusedY == -1) + { + SmartCursorHelper._targets.Clear(); + Vector2 vector2 = (Main.MouseWorld - providedInfo.Center).SafeNormalize(Vector2.UnitY); + double num1 = (double) Vector2.Dot(vector2, -Vector2.UnitY); + bool flag1 = num1 >= 0.5; + bool flag2 = num1 <= -0.5; + double num2 = (double) Vector2.Dot(vector2, Vector2.UnitX); + bool flag3 = num2 >= 0.5; + bool flag4 = num2 <= -0.5; + bool flag5 = flag1 & flag4; + bool flag6 = flag1 & flag3; + bool flag7 = flag2 & flag4; + bool flag8 = flag2 & flag3; + bool flag9; + if (flag5) + flag9 = flag4 = false; + if (flag6) + flag9 = flag3 = false; + bool flag10; + if (flag7) + flag10 = flag4 = false; + if (flag8) + flag10 = flag3 = false; + bool flag11 = false; + if (Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY].active() && Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY].type == (ushort) 314) + flag11 = true; + if (!flag11) + { + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile = Main.tile[reachableStartX, reachableStartY]; + if (tile.active() && tile.type == (ushort) 314) + { + bool flag12 = Main.tile[reachableStartX + 1, reachableStartY + 1].active() && Main.tile[reachableStartX + 1, reachableStartY + 1].type == (ushort) 314; + bool flag13 = Main.tile[reachableStartX + 1, reachableStartY - 1].active() && Main.tile[reachableStartX + 1, reachableStartY - 1].type == (ushort) 314; + bool flag14 = Main.tile[reachableStartX - 1, reachableStartY + 1].active() && Main.tile[reachableStartX - 1, reachableStartY + 1].type == (ushort) 314; + bool flag15 = Main.tile[reachableStartX - 1, reachableStartY - 1].active() && Main.tile[reachableStartX - 1, reachableStartY - 1].type == (ushort) 314; + if (flag5 && (!Main.tile[reachableStartX - 1, reachableStartY - 1].active() || Main.tileCut[(int) Main.tile[reachableStartX - 1, reachableStartY - 1].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[reachableStartX - 1, reachableStartY - 1].type]) && !(!flag12 & flag13) && !flag14) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX - 1, reachableStartY - 1)); + if (flag4 && (!Main.tile[reachableStartX - 1, reachableStartY].active() || Main.tileCut[(int) Main.tile[reachableStartX - 1, reachableStartY].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[reachableStartX - 1, reachableStartY].type])) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX - 1, reachableStartY)); + if (flag7 && (!Main.tile[reachableStartX - 1, reachableStartY + 1].active() || Main.tileCut[(int) Main.tile[reachableStartX - 1, reachableStartY + 1].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[reachableStartX - 1, reachableStartY + 1].type]) && !(!flag13 & flag12) && !flag15) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX - 1, reachableStartY + 1)); + if (flag6 && (!Main.tile[reachableStartX + 1, reachableStartY - 1].active() || Main.tileCut[(int) Main.tile[reachableStartX + 1, reachableStartY - 1].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[reachableStartX + 1, reachableStartY - 1].type]) && !(!flag14 & flag15) && !flag12) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX + 1, reachableStartY - 1)); + if (flag3 && (!Main.tile[reachableStartX + 1, reachableStartY].active() || Main.tileCut[(int) Main.tile[reachableStartX + 1, reachableStartY].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[reachableStartX + 1, reachableStartY].type])) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX + 1, reachableStartY)); + if (flag8 && (!Main.tile[reachableStartX + 1, reachableStartY + 1].active() || Main.tileCut[(int) Main.tile[reachableStartX + 1, reachableStartY + 1].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[reachableStartX + 1, reachableStartY + 1].type]) && !(!flag15 & flag14) && !flag13) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX + 1, reachableStartY + 1)); + } + } + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num3 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + if ((!Main.tile[SmartCursorHelper._targets[index].Item1, SmartCursorHelper._targets[index].Item2 - 1].active() || Main.tile[SmartCursorHelper._targets[index].Item1, SmartCursorHelper._targets[index].Item2 - 1].type != (ushort) 314) && (!Main.tile[SmartCursorHelper._targets[index].Item1, SmartCursorHelper._targets[index].Item2 + 1].active() || Main.tile[SmartCursorHelper._targets[index].Item1, SmartCursorHelper._targets[index].Item2 + 1].type != (ushort) 314)) + { + float num4 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num3 == -1.0 || (double) num4 < (double) num3) + { + num3 = num4; + target = SmartCursorHelper._targets[index]; + } + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY) && (double) num3 != -1.0) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + if (providedInfo.item.type != 2492 || focusedX != -1 || focusedY != -1) + return; + SmartCursorHelper._targets.Clear(); + bool flag = false; + if (Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY].active() && Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY].type == (ushort) 314) + flag = true; + if (!flag) + { + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile = Main.tile[reachableStartX, reachableStartY]; + if (tile.active() && tile.type == (ushort) 314) + { + if (!Main.tile[reachableStartX - 1, reachableStartY].active() || Main.tileCut[(int) Main.tile[reachableStartX - 1, reachableStartY].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[reachableStartX - 1, reachableStartY].type]) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX - 1, reachableStartY)); + if (!Main.tile[reachableStartX + 1, reachableStartY].active() || Main.tileCut[(int) Main.tile[reachableStartX + 1, reachableStartY].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[reachableStartX + 1, reachableStartY].type]) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX + 1, reachableStartY)); + } + } + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num5 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + if ((!Main.tile[SmartCursorHelper._targets[index].Item1, SmartCursorHelper._targets[index].Item2 - 1].active() || Main.tile[SmartCursorHelper._targets[index].Item1, SmartCursorHelper._targets[index].Item2 - 1].type != (ushort) 314) && (!Main.tile[SmartCursorHelper._targets[index].Item1, SmartCursorHelper._targets[index].Item2 + 1].active() || Main.tile[SmartCursorHelper._targets[index].Item1, SmartCursorHelper._targets[index].Item2 + 1].type != (ushort) 314)) + { + float num6 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num5 == -1.0 || (double) num6 < (double) num5) + { + num5 = num6; + target = SmartCursorHelper._targets[index]; + } + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY) && (double) num5 != -1.0) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_Platforms( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + if (providedInfo.item.createTile < 0 || !TileID.Sets.Platforms[providedInfo.item.createTile] || focusedX != -1 || focusedY != -1) + return; + SmartCursorHelper._targets.Clear(); + bool flag = false; + if (Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY].active() && TileID.Sets.Platforms[(int) Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY].type]) + flag = true; + if (!flag) + { + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile1 = Main.tile[reachableStartX, reachableStartY]; + if (tile1.active() && TileID.Sets.Platforms[(int) tile1.type]) + { + int num = (int) tile1.slope(); + if (num != 2 && !Main.tile[reachableStartX - 1, reachableStartY - 1].active()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX - 1, reachableStartY - 1)); + if (!Main.tile[reachableStartX - 1, reachableStartY].active()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX - 1, reachableStartY)); + if (num != 1 && !Main.tile[reachableStartX - 1, reachableStartY + 1].active()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX - 1, reachableStartY + 1)); + if (num != 1 && !Main.tile[reachableStartX + 1, reachableStartY - 1].active()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX + 1, reachableStartY - 1)); + if (!Main.tile[reachableStartX + 1, reachableStartY].active()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX + 1, reachableStartY)); + if (num != 2 && !Main.tile[reachableStartX + 1, reachableStartY + 1].active()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX + 1, reachableStartY + 1)); + } + if (!tile1.active()) + { + int num1 = 0; + int num2 = 1; + Tile tile2 = Main.tile[reachableStartX + num1, reachableStartY + num2]; + if (tile2.active() && Main.tileSolid[(int) tile2.type] && !Main.tileSolidTop[(int) tile2.type]) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + int num3 = -1; + int num4 = 0; + Tile tile3 = Main.tile[reachableStartX + num3, reachableStartY + num4]; + if (tile3.active() && Main.tileSolid[(int) tile3.type] && !Main.tileSolidTop[(int) tile3.type]) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + int num5 = 1; + int num6 = 0; + Tile tile4 = Main.tile[reachableStartX + num5, reachableStartY + num6]; + if (tile4.active() && Main.tileSolid[(int) tile4.type] && !Main.tileSolidTop[(int) tile4.type]) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + } + } + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num7 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num8 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num7 == -1.0 || (double) num8 < (double) num7) + { + num7 = num8; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_WireCutter( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + if (providedInfo.item.type != 510 || focusedX != -1 || focusedY != -1) + return; + SmartCursorHelper._targets.Clear(); + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile = Main.tile[reachableStartX, reachableStartY]; + if (tile.wire() || tile.wire2() || tile.wire3() || tile.wire4() || tile.actuator()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num1 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num2 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_ActuationRod( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + bool actuationRodLock = providedInfo.player.ActuationRodLock; + bool actuationRodLockSetting = providedInfo.player.ActuationRodLockSetting; + if (providedInfo.item.type != 3620 || focusedX != -1 || focusedY != -1) + return; + SmartCursorHelper._targets.Clear(); + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile = Main.tile[reachableStartX, reachableStartY]; + if (tile.active() && tile.actuator() && (!actuationRodLock || actuationRodLockSetting == tile.inActive())) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num1 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num2 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_Hammers( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + int width = providedInfo.player.width; + int height = providedInfo.player.height; + if (providedInfo.item.hammer > 0 && focusedX == -1 && focusedY == -1) + { + Vector2 vector2 = providedInfo.mouse - providedInfo.Center; + int num1 = Math.Sign(vector2.X); + int num2 = Math.Sign(vector2.Y); + if ((double) Math.Abs(vector2.X) > (double) Math.Abs(vector2.Y) * 3.0) + { + num2 = 0; + providedInfo.mouse.Y = providedInfo.Center.Y; + } + if ((double) Math.Abs(vector2.Y) > (double) Math.Abs(vector2.X) * 3.0) + { + num1 = 0; + providedInfo.mouse.X = providedInfo.Center.X; + } + int num3 = (int) providedInfo.Center.X / 16; + int num4 = (int) providedInfo.Center.Y / 16; + SmartCursorHelper._points.Clear(); + SmartCursorHelper._endpoints.Clear(); + int num5 = 1; + if (num2 == -1 && num1 != 0) + num5 = -1; + int index1 = (int) (((double) providedInfo.position.X + (double) (width / 2) + (double) ((width / 2 - 1) * num1)) / 16.0); + int index2 = (int) (((double) providedInfo.position.Y + 0.1) / 16.0); + if (num5 == -1) + index2 = (int) (((double) providedInfo.position.Y + (double) height - 1.0) / 16.0); + int num6 = width / 16 + (width % 16 == 0 ? 0 : 1); + int num7 = height / 16 + (height % 16 == 0 ? 0 : 1); + if (num1 != 0) + { + for (int index3 = 0; index3 < num7; ++index3) + { + if (Main.tile[index1, index2 + index3 * num5] != null) + SmartCursorHelper._points.Add(new Tuple(index1, index2 + index3 * num5)); + } + } + if (num2 != 0) + { + for (int index4 = 0; index4 < num6; ++index4) + { + if (Main.tile[(int) ((double) providedInfo.position.X / 16.0) + index4, index2] != null) + SmartCursorHelper._points.Add(new Tuple((int) ((double) providedInfo.position.X / 16.0) + index4, index2)); + } + } + int index5 = (int) (((double) providedInfo.mouse.X + (double) ((width / 2 - 1) * num1)) / 16.0); + int index6 = (int) (((double) providedInfo.mouse.Y + 0.1 - (double) (height / 2 + 1)) / 16.0); + if (num5 == -1) + index6 = (int) (((double) providedInfo.mouse.Y + (double) (height / 2) - 1.0) / 16.0); + if ((double) providedInfo.player.gravDir == -1.0 && num2 == 0) + ++index6; + if (index6 < 10) + index6 = 10; + if (index6 > Main.maxTilesY - 10) + index6 = Main.maxTilesY - 10; + int num8 = width / 16 + (width % 16 == 0 ? 0 : 1); + int num9 = height / 16 + (height % 16 == 0 ? 0 : 1); + if (num1 != 0) + { + for (int index7 = 0; index7 < num9; ++index7) + { + if (Main.tile[index5, index6 + index7 * num5] != null) + SmartCursorHelper._endpoints.Add(new Tuple(index5, index6 + index7 * num5)); + } + } + if (num2 != 0) + { + for (int index8 = 0; index8 < num8; ++index8) + { + if (Main.tile[(int) (((double) providedInfo.mouse.X - (double) (width / 2)) / 16.0) + index8, index6] != null) + SmartCursorHelper._endpoints.Add(new Tuple((int) (((double) providedInfo.mouse.X - (double) (width / 2)) / 16.0) + index8, index6)); + } + } + SmartCursorHelper._targets.Clear(); + while (SmartCursorHelper._points.Count > 0) + { + Tuple point = SmartCursorHelper._points[0]; + Tuple endpoint = SmartCursorHelper._endpoints[0]; + Tuple tuple = Collision.TupleHitLineWall(point.Item1, point.Item2, endpoint.Item1, endpoint.Item2); + if (tuple.Item1 == -1 || tuple.Item2 == -1) + { + SmartCursorHelper._points.Remove(point); + SmartCursorHelper._endpoints.Remove(endpoint); + } + else + { + if (tuple.Item1 != endpoint.Item1 || tuple.Item2 != endpoint.Item2) + SmartCursorHelper._targets.Add(tuple); + Tile tile = Main.tile[tuple.Item1, tuple.Item2]; + if (Collision.HitWallSubstep(tuple.Item1, tuple.Item2)) + SmartCursorHelper._targets.Add(tuple); + SmartCursorHelper._points.Remove(point); + SmartCursorHelper._endpoints.Remove(endpoint); + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num10 = -1f; + Tuple tuple = (Tuple) null; + for (int index9 = 0; index9 < SmartCursorHelper._targets.Count; ++index9) + { + if (!Main.tile[SmartCursorHelper._targets[index9].Item1, SmartCursorHelper._targets[index9].Item2].active() || Main.tile[SmartCursorHelper._targets[index9].Item1, SmartCursorHelper._targets[index9].Item2].type != (ushort) 26) + { + float num11 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index9].Item1, (float) SmartCursorHelper._targets[index9].Item2) * 16f + Vector2.One * 8f, providedInfo.Center); + if ((double) num10 == -1.0 || (double) num11 < (double) num10) + { + num10 = num11; + tuple = SmartCursorHelper._targets[index9]; + } + } + } + if (tuple != null && Collision.InTileBounds(tuple.Item1, tuple.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + providedInfo.player.poundRelease = false; + focusedX = tuple.Item1; + focusedY = tuple.Item2; + } + } + SmartCursorHelper._targets.Clear(); + SmartCursorHelper._points.Clear(); + SmartCursorHelper._endpoints.Clear(); + } + if (providedInfo.item.hammer <= 0 || focusedX != -1 || focusedY != -1) + return; + SmartCursorHelper._targets.Clear(); + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + if (Main.tile[reachableStartX, reachableStartY].wall > (ushort) 0 && Collision.HitWallSubstep(reachableStartX, reachableStartY)) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num12 = -1f; + Tuple tuple = (Tuple) null; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + if (!Main.tile[SmartCursorHelper._targets[index].Item1, SmartCursorHelper._targets[index].Item2].active() || Main.tile[SmartCursorHelper._targets[index].Item1, SmartCursorHelper._targets[index].Item2].type != (ushort) 26) + { + float num13 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num12 == -1.0 || (double) num13 < (double) num12) + { + num12 = num13; + tuple = SmartCursorHelper._targets[index]; + } + } + } + if (tuple != null && Collision.InTileBounds(tuple.Item1, tuple.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + providedInfo.player.poundRelease = false; + focusedX = tuple.Item1; + focusedY = tuple.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_MulticolorWrench( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + if (providedInfo.item.type != 3625 || focusedX != -1 || focusedY != -1) + return; + SmartCursorHelper._targets.Clear(); + WiresUI.Settings.MultiToolMode toolMode1 = WiresUI.Settings.ToolMode; + WiresUI.Settings.MultiToolMode multiToolMode = (WiresUI.Settings.MultiToolMode) 0; + if (Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY].wire()) + multiToolMode |= WiresUI.Settings.MultiToolMode.Red; + if (Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY].wire2()) + multiToolMode |= WiresUI.Settings.MultiToolMode.Blue; + if (Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY].wire3()) + multiToolMode |= WiresUI.Settings.MultiToolMode.Green; + if (Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY].wire4()) + multiToolMode |= WiresUI.Settings.MultiToolMode.Yellow; + int num1 = (toolMode1 & ~WiresUI.Settings.MultiToolMode.Cutter) == multiToolMode ? 1 : 0; + WiresUI.Settings.MultiToolMode toolMode2 = WiresUI.Settings.ToolMode; + if (num1 == 0) + { + bool flag1 = toolMode2.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Red); + bool flag2 = toolMode2.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Blue); + bool flag3 = toolMode2.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Green); + bool flag4 = toolMode2.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Yellow); + bool flag5 = toolMode2.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Cutter); + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile = Main.tile[reachableStartX, reachableStartY]; + if (flag5) + { + if (tile.wire() & flag1 || tile.wire2() & flag2 || tile.wire3() & flag3 || tile.wire4() & flag4) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + } + else if (tile.wire() & flag1 || tile.wire2() & flag2 || tile.wire3() & flag3 || tile.wire4() & flag4) + { + if (flag1) + { + if (!Main.tile[reachableStartX - 1, reachableStartY].wire()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX - 1, reachableStartY)); + if (!Main.tile[reachableStartX + 1, reachableStartY].wire()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX + 1, reachableStartY)); + if (!Main.tile[reachableStartX, reachableStartY - 1].wire()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY - 1)); + if (!Main.tile[reachableStartX, reachableStartY + 1].wire()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY + 1)); + } + if (flag2) + { + if (!Main.tile[reachableStartX - 1, reachableStartY].wire2()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX - 1, reachableStartY)); + if (!Main.tile[reachableStartX + 1, reachableStartY].wire2()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX + 1, reachableStartY)); + if (!Main.tile[reachableStartX, reachableStartY - 1].wire2()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY - 1)); + if (!Main.tile[reachableStartX, reachableStartY + 1].wire2()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY + 1)); + } + if (flag3) + { + if (!Main.tile[reachableStartX - 1, reachableStartY].wire3()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX - 1, reachableStartY)); + if (!Main.tile[reachableStartX + 1, reachableStartY].wire3()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX + 1, reachableStartY)); + if (!Main.tile[reachableStartX, reachableStartY - 1].wire3()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY - 1)); + if (!Main.tile[reachableStartX, reachableStartY + 1].wire3()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY + 1)); + } + if (flag4) + { + if (!Main.tile[reachableStartX - 1, reachableStartY].wire4()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX - 1, reachableStartY)); + if (!Main.tile[reachableStartX + 1, reachableStartY].wire4()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX + 1, reachableStartY)); + if (!Main.tile[reachableStartX, reachableStartY - 1].wire4()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY - 1)); + if (!Main.tile[reachableStartX, reachableStartY + 1].wire4()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY + 1)); + } + } + } + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num2 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num3 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num2 == -1.0 || (double) num3 < (double) num2) + { + num2 = num3; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_ColoredWrenches( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + if (providedInfo.item.type != 509 && providedInfo.item.type != 850 && providedInfo.item.type != 851 && providedInfo.item.type != 3612 || focusedX != -1 || focusedY != -1) + return; + SmartCursorHelper._targets.Clear(); + int num1 = 0; + if (providedInfo.item.type == 509) + num1 = 1; + if (providedInfo.item.type == 850) + num1 = 2; + if (providedInfo.item.type == 851) + num1 = 3; + if (providedInfo.item.type == 3612) + num1 = 4; + bool flag = false; + if (Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY].wire() && num1 == 1) + flag = true; + if (Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY].wire2() && num1 == 2) + flag = true; + if (Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY].wire3() && num1 == 3) + flag = true; + if (Main.tile[providedInfo.screenTargetX, providedInfo.screenTargetY].wire4() && num1 == 4) + flag = true; + if (!flag) + { + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile = Main.tile[reachableStartX, reachableStartY]; + if (tile.wire() && num1 == 1 || tile.wire2() && num1 == 2 || tile.wire3() && num1 == 3 || tile.wire4() && num1 == 4) + { + if (num1 == 1) + { + if (!Main.tile[reachableStartX - 1, reachableStartY].wire()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX - 1, reachableStartY)); + if (!Main.tile[reachableStartX + 1, reachableStartY].wire()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX + 1, reachableStartY)); + if (!Main.tile[reachableStartX, reachableStartY - 1].wire()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY - 1)); + if (!Main.tile[reachableStartX, reachableStartY + 1].wire()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY + 1)); + } + if (num1 == 2) + { + if (!Main.tile[reachableStartX - 1, reachableStartY].wire2()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX - 1, reachableStartY)); + if (!Main.tile[reachableStartX + 1, reachableStartY].wire2()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX + 1, reachableStartY)); + if (!Main.tile[reachableStartX, reachableStartY - 1].wire2()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY - 1)); + if (!Main.tile[reachableStartX, reachableStartY + 1].wire2()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY + 1)); + } + if (num1 == 3) + { + if (!Main.tile[reachableStartX - 1, reachableStartY].wire3()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX - 1, reachableStartY)); + if (!Main.tile[reachableStartX + 1, reachableStartY].wire3()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX + 1, reachableStartY)); + if (!Main.tile[reachableStartX, reachableStartY - 1].wire3()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY - 1)); + if (!Main.tile[reachableStartX, reachableStartY + 1].wire3()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY + 1)); + } + if (num1 == 4) + { + if (!Main.tile[reachableStartX - 1, reachableStartY].wire4()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX - 1, reachableStartY)); + if (!Main.tile[reachableStartX + 1, reachableStartY].wire4()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX + 1, reachableStartY)); + if (!Main.tile[reachableStartX, reachableStartY - 1].wire4()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY - 1)); + if (!Main.tile[reachableStartX, reachableStartY + 1].wire4()) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY + 1)); + } + } + } + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num2 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num3 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num2 == -1.0 || (double) num3 < (double) num2) + { + num2 = num3; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_Acorns( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + if (providedInfo.item.type != 27 || focusedX != -1 || focusedY != -1 || providedInfo.reachableStartY <= 20) + return; + SmartCursorHelper._targets.Clear(); + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile1 = Main.tile[reachableStartX, reachableStartY]; + Tile tile2 = Main.tile[reachableStartX, reachableStartY - 1]; + Tile testTile = Main.tile[reachableStartX, reachableStartY + 1]; + Tile tile3 = Main.tile[reachableStartX - 1, reachableStartY]; + Tile tile4 = Main.tile[reachableStartX + 1, reachableStartY]; + Tile tile5 = Main.tile[reachableStartX - 2, reachableStartY]; + Tile tile6 = Main.tile[reachableStartX + 2, reachableStartY]; + Tile tile7 = Main.tile[reachableStartX - 3, reachableStartY]; + Tile tile8 = Main.tile[reachableStartX + 3, reachableStartY]; + if ((!tile1.active() || Main.tileCut[(int) tile1.type] || TileID.Sets.BreakableWhenPlacing[(int) tile1.type]) && (!tile2.active() || Main.tileCut[(int) tile2.type] || TileID.Sets.BreakableWhenPlacing[(int) tile2.type]) && (!tile3.active() || !TileID.Sets.CommonSapling[(int) tile3.type]) && (!tile4.active() || !TileID.Sets.CommonSapling[(int) tile4.type]) && (!tile5.active() || !TileID.Sets.CommonSapling[(int) tile5.type]) && (!tile6.active() || !TileID.Sets.CommonSapling[(int) tile6.type]) && (!tile7.active() || !TileID.Sets.CommonSapling[(int) tile7.type]) && (!tile8.active() || !TileID.Sets.CommonSapling[(int) tile8.type]) && testTile.active() && WorldGen.SolidTile2(testTile)) + { + switch (testTile.type) + { + case 2: + case 23: + case 53: + case 109: + case 112: + case 116: + case 147: + case 199: + case 234: + case 477: + case 492: + if (tile3.liquid == (byte) 0 && tile1.liquid == (byte) 0 && tile4.liquid == (byte) 0 && WorldGen.EmptyTileCheck(reachableStartX - 2, reachableStartX + 2, reachableStartY - 20, reachableStartY, 20)) + { + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + continue; + } + continue; + case 60: + if (WorldGen.EmptyTileCheck(reachableStartX - 2, reachableStartX + 2, reachableStartY - 20, reachableStartY, 20)) + { + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + continue; + } + continue; + default: + continue; + } + } + } + } + SmartCursorHelper._toRemove.Clear(); + for (int index1 = 0; index1 < SmartCursorHelper._targets.Count; ++index1) + { + bool flag = false; + for (int index2 = -1; index2 < 2; index2 += 2) + { + Tile tile = Main.tile[SmartCursorHelper._targets[index1].Item1 + index2, SmartCursorHelper._targets[index1].Item2 + 1]; + if (tile.active()) + { + switch (tile.type) + { + case 2: + case 23: + case 53: + case 60: + case 109: + case 112: + case 116: + case 147: + case 199: + case 234: + case 477: + case 492: + flag = true; + continue; + default: + continue; + } + } + } + if (!flag) + SmartCursorHelper._toRemove.Add(SmartCursorHelper._targets[index1]); + } + for (int index = 0; index < SmartCursorHelper._toRemove.Count; ++index) + SmartCursorHelper._targets.Remove(SmartCursorHelper._toRemove[index]); + SmartCursorHelper._toRemove.Clear(); + if (SmartCursorHelper._targets.Count > 0) + { + float num1 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num2 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_GemCorns( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int focusedX, + ref int focusedY) + { + WorldGen.GrowTreeSettings profile; + if (!WorldGen.GrowTreeSettings.Profiles.TryGetFromItemId(providedInfo.item.type, out profile) || focusedX != -1 || focusedY != -1 || providedInfo.reachableStartY <= 20) + return; + SmartCursorHelper._targets.Clear(); + for (int reachableStartX = providedInfo.reachableStartX; reachableStartX <= providedInfo.reachableEndX; ++reachableStartX) + { + for (int reachableStartY = providedInfo.reachableStartY; reachableStartY <= providedInfo.reachableEndY; ++reachableStartY) + { + Tile tile1 = Main.tile[reachableStartX, reachableStartY]; + Tile tile2 = Main.tile[reachableStartX, reachableStartY - 1]; + Tile testTile = Main.tile[reachableStartX, reachableStartY + 1]; + Tile tile3 = Main.tile[reachableStartX - 1, reachableStartY]; + Tile tile4 = Main.tile[reachableStartX + 1, reachableStartY]; + Tile tile5 = Main.tile[reachableStartX - 2, reachableStartY]; + Tile tile6 = Main.tile[reachableStartX + 2, reachableStartY]; + Tile tile7 = Main.tile[reachableStartX - 3, reachableStartY]; + Tile tile8 = Main.tile[reachableStartX + 3, reachableStartY]; + if (profile.GroundTest((int) testTile.type) && (!tile1.active() || Main.tileCut[(int) tile1.type] || TileID.Sets.BreakableWhenPlacing[(int) tile1.type]) && (!tile2.active() || Main.tileCut[(int) tile2.type] || TileID.Sets.BreakableWhenPlacing[(int) tile2.type]) && (!tile3.active() || !TileID.Sets.CommonSapling[(int) tile3.type]) && (!tile4.active() || !TileID.Sets.CommonSapling[(int) tile4.type]) && (!tile5.active() || !TileID.Sets.CommonSapling[(int) tile5.type]) && (!tile6.active() || !TileID.Sets.CommonSapling[(int) tile6.type]) && (!tile7.active() || !TileID.Sets.CommonSapling[(int) tile7.type]) && (!tile8.active() || !TileID.Sets.CommonSapling[(int) tile8.type]) && testTile.active() && WorldGen.SolidTile2(testTile) && tile3.liquid == (byte) 0 && tile1.liquid == (byte) 0 && tile4.liquid == (byte) 0 && WorldGen.EmptyTileCheck(reachableStartX - 2, reachableStartX + 2, reachableStartY - profile.TreeHeightMax, reachableStartY, (int) profile.SaplingTileType)) + SmartCursorHelper._targets.Add(new Tuple(reachableStartX, reachableStartY)); + } + } + SmartCursorHelper._toRemove.Clear(); + for (int index1 = 0; index1 < SmartCursorHelper._targets.Count; ++index1) + { + bool flag = false; + for (int index2 = -1; index2 < 2; index2 += 2) + { + Tile tile = Main.tile[SmartCursorHelper._targets[index1].Item1 + index2, SmartCursorHelper._targets[index1].Item2 + 1]; + if (tile.active() && profile.GroundTest((int) tile.type)) + flag = true; + } + if (!flag) + SmartCursorHelper._toRemove.Add(SmartCursorHelper._targets[index1]); + } + for (int index = 0; index < SmartCursorHelper._toRemove.Count; ++index) + SmartCursorHelper._targets.Remove(SmartCursorHelper._toRemove[index]); + SmartCursorHelper._toRemove.Clear(); + if (SmartCursorHelper._targets.Count > 0) + { + float num1 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num2 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_ForceCursorToAnyMinableThing( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int fX, + ref int fY) + { + int reachableStartX = providedInfo.reachableStartX; + int reachableStartY = providedInfo.reachableStartY; + int reachableEndX = providedInfo.reachableEndX; + int reachableEndY = providedInfo.reachableEndY; + int screenTargetX = providedInfo.screenTargetX; + int screenTargetY = providedInfo.screenTargetY; + Vector2 mouse = providedInfo.mouse; + Item obj = providedInfo.item; + if (fX != -1 || fY != -1 || PlayerInput.UsingGamepad) + return; + Point tileCoordinates = mouse.ToTileCoordinates(); + int x = tileCoordinates.X; + int y = tileCoordinates.Y; + if (!Collision.InTileBounds(x, y, reachableStartX, reachableStartY, reachableEndX, reachableEndY)) + return; + Tile tile = Main.tile[x, y]; + bool flag = tile.active() && WorldGen.CanKillTile(x, y) && (!Main.tileSolid[(int) tile.type] || Main.tileSolidTop[(int) tile.type]); + if (flag && Main.tileAxe[(int) tile.type] && obj.axe < 1) + flag = false; + if (flag && Main.tileHammer[(int) tile.type] && obj.hammer < 1) + flag = false; + if (flag && !Main.tileHammer[(int) tile.type] && !Main.tileAxe[(int) tile.type] && obj.pick < 1) + flag = false; + if (!flag) + return; + fX = x; + fY = y; + } + + private static void Step_Pickaxe_MineShinies( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int fX, + ref int fY) + { + int reachableStartX = providedInfo.reachableStartX; + int reachableStartY = providedInfo.reachableStartY; + int reachableEndX = providedInfo.reachableEndX; + int reachableEndY = providedInfo.reachableEndY; + int screenTargetX = providedInfo.screenTargetX; + int screenTargetY = providedInfo.screenTargetY; + Item obj = providedInfo.item; + Vector2 mouse = providedInfo.mouse; + if (obj.pick <= 0 || fX != -1 || fY != -1) + return; + SmartCursorHelper._targets.Clear(); + int num1 = obj.type == 1333 || obj.type == 523 ? 0 : (obj.type != 4384 ? 1 : 0); + int num2 = 0; + for (int index1 = reachableStartX; index1 <= reachableEndX; ++index1) + { + for (int index2 = reachableStartY; index2 <= reachableEndY; ++index2) + { + Tile tile1 = Main.tile[index1, index2]; + Tile tile2 = Main.tile[index1 - 1, index2]; + Tile tile3 = Main.tile[index1 + 1, index2]; + Tile tile4 = Main.tile[index1, index2 + 1]; + if (tile1.active()) + { + int num3; + int num4 = num3 = TileID.Sets.SmartCursorPickaxePriorityOverride[(int) tile1.type]; + if (num4 > 0) + { + if (num2 < num4) + num2 = num4; + SmartCursorHelper._targets.Add(new Tuple(index1, index2)); + } + } + } + } + SmartCursorHelper._targets2.Clear(); + foreach (Tuple tuple in SmartCursorHelper._targets2) + { + Tile tile = Main.tile[tuple.Item1, tuple.Item2]; + if (TileID.Sets.SmartCursorPickaxePriorityOverride[(int) tile.type] < num2) + SmartCursorHelper._targets2.Add(tuple); + } + foreach (Tuple tuple in SmartCursorHelper._targets2) + SmartCursorHelper._targets.Remove(tuple); + if (SmartCursorHelper._targets.Count > 0) + { + float num5 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num6 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, mouse); + if ((double) num5 == -1.0 || (double) num6 < (double) num5) + { + num5 = num6; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, reachableStartX, reachableStartY, reachableEndX, reachableEndY)) + { + fX = target.Item1; + fY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_Pickaxe_MineSolids( + Player player, + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + List> grappleTargets, + ref int focusedX, + ref int focusedY) + { + int width = player.width; + int height = player.height; + int direction = player.direction; + Vector2 center = player.Center; + Vector2 position = player.position; + float gravDir = player.gravDir; + int whoAmI = player.whoAmI; + if (providedInfo.item.pick <= 0 || focusedX != -1 || focusedY != -1) + return; + if (PlayerInput.UsingGamepad) + { + Vector2 navigatorDirections = PlayerInput.Triggers.Current.GetNavigatorDirections(); + Vector2 gamepadThumbstickLeft = PlayerInput.GamepadThumbstickLeft; + Vector2 gamepadThumbstickRight = PlayerInput.GamepadThumbstickRight; + Vector2 zero = Vector2.Zero; + if (navigatorDirections == zero && (double) gamepadThumbstickLeft.Length() < 0.0500000007450581 && (double) gamepadThumbstickRight.Length() < 0.0500000007450581) + providedInfo.mouse = center + new Vector2((float) (direction * 1000), 0.0f); + } + Vector2 vector2_1 = providedInfo.mouse - center; + int num1 = Math.Sign(vector2_1.X); + int num2 = Math.Sign(vector2_1.Y); + if ((double) Math.Abs(vector2_1.X) > (double) Math.Abs(vector2_1.Y) * 3.0) + { + num2 = 0; + providedInfo.mouse.Y = center.Y; + } + if ((double) Math.Abs(vector2_1.Y) > (double) Math.Abs(vector2_1.X) * 3.0) + { + num1 = 0; + providedInfo.mouse.X = center.X; + } + int num3 = (int) center.X / 16; + int num4 = (int) center.Y / 16; + SmartCursorHelper._points.Clear(); + SmartCursorHelper._endpoints.Clear(); + int num5 = 1; + if (num2 == -1 && num1 != 0) + num5 = -1; + int index1 = (int) (((double) position.X + (double) (width / 2) + (double) ((width / 2 - 1) * num1)) / 16.0); + int index2 = (int) (((double) position.Y + 0.1) / 16.0); + if (num5 == -1) + index2 = (int) (((double) position.Y + (double) height - 1.0) / 16.0); + int num6 = width / 16 + (width % 16 == 0 ? 0 : 1); + int num7 = height / 16 + (height % 16 == 0 ? 0 : 1); + if (num1 != 0) + { + for (int index3 = 0; index3 < num7; ++index3) + { + if (Main.tile[index1, index2 + index3 * num5] != null) + SmartCursorHelper._points.Add(new Tuple(index1, index2 + index3 * num5)); + } + } + if (num2 != 0) + { + for (int index4 = 0; index4 < num6; ++index4) + { + if (Main.tile[(int) ((double) position.X / 16.0) + index4, index2] != null) + SmartCursorHelper._points.Add(new Tuple((int) ((double) position.X / 16.0) + index4, index2)); + } + } + int x = (int) (((double) providedInfo.mouse.X + (double) ((width / 2 - 1) * num1)) / 16.0); + int y = (int) (((double) providedInfo.mouse.Y + 0.1 - (double) (height / 2 + 1)) / 16.0); + if (num5 == -1) + y = (int) (((double) providedInfo.mouse.Y + (double) (height / 2) - 1.0) / 16.0); + if ((double) gravDir == -1.0 && num2 == 0) + ++y; + if (y < 10) + y = 10; + if (y > Main.maxTilesY - 10) + y = Main.maxTilesY - 10; + int num8 = width / 16 + (width % 16 == 0 ? 0 : 1); + int num9 = height / 16 + (height % 16 == 0 ? 0 : 1); + if (WorldGen.InWorld(x, y, Main.Map.BlackEdgeWidth)) + { + if (num1 != 0) + { + for (int index5 = 0; index5 < num9; ++index5) + { + if (Main.tile[x, y + index5 * num5] != null) + SmartCursorHelper._endpoints.Add(new Tuple(x, y + index5 * num5)); + } + } + if (num2 != 0) + { + for (int index6 = 0; index6 < num8; ++index6) + { + if (Main.tile[(int) (((double) providedInfo.mouse.X - (double) (width / 2)) / 16.0) + index6, y] != null) + SmartCursorHelper._endpoints.Add(new Tuple((int) (((double) providedInfo.mouse.X - (double) (width / 2)) / 16.0) + index6, y)); + } + } + } + SmartCursorHelper._targets.Clear(); + while (SmartCursorHelper._points.Count > 0 && SmartCursorHelper._endpoints.Count > 0) + { + Tuple point = SmartCursorHelper._points[0]; + Tuple endpoint = SmartCursorHelper._endpoints[0]; + Tuple col; + if (!Collision.TupleHitLine(point.Item1, point.Item2, endpoint.Item1, endpoint.Item2, num1 * (int) gravDir, -num2 * (int) gravDir, grappleTargets, out col)) + { + SmartCursorHelper._points.Remove(point); + SmartCursorHelper._endpoints.Remove(endpoint); + } + else + { + if (col.Item1 != endpoint.Item1 || col.Item2 != endpoint.Item2) + SmartCursorHelper._targets.Add(col); + Tile tile = Main.tile[col.Item1, col.Item2]; + if (!tile.inActive() && tile.active() && Main.tileSolid[(int) tile.type] && !Main.tileSolidTop[(int) tile.type] && !grappleTargets.Contains(col)) + SmartCursorHelper._targets.Add(col); + SmartCursorHelper._points.Remove(point); + SmartCursorHelper._endpoints.Remove(endpoint); + } + } + SmartCursorHelper._toRemove.Clear(); + for (int index7 = 0; index7 < SmartCursorHelper._targets.Count; ++index7) + { + if (!WorldGen.CanKillTile(SmartCursorHelper._targets[index7].Item1, SmartCursorHelper._targets[index7].Item2)) + SmartCursorHelper._toRemove.Add(SmartCursorHelper._targets[index7]); + } + for (int index8 = 0; index8 < SmartCursorHelper._toRemove.Count; ++index8) + SmartCursorHelper._targets.Remove(SmartCursorHelper._toRemove[index8]); + SmartCursorHelper._toRemove.Clear(); + if (SmartCursorHelper._targets.Count > 0) + { + float num10 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + Vector2 vector2_2 = center; + if (Main.netMode == 1) + { + int num11 = 0; + int num12 = 0; + int num13 = 0; + for (int index9 = 0; index9 < whoAmI; ++index9) + { + Player player1 = Main.player[index9]; + if (player1.active && !player1.dead && player1.HeldItem.pick > 0 && player1.itemAnimation > 0) + { + if ((double) player.Distance(player1.Center) <= 8.0) + ++num11; + if ((double) player.Distance(player1.Center) <= 80.0 && (double) Math.Abs(player1.Center.Y - center.Y) <= 12.0) + ++num12; + } + } + for (int index10 = whoAmI + 1; index10 < (int) byte.MaxValue; ++index10) + { + Player player2 = Main.player[index10]; + if (player2.active && !player2.dead && player2.HeldItem.pick > 0 && player2.itemAnimation > 0 && (double) player.Distance(player2.Center) <= 8.0) + ++num13; + } + if (num11 > 0) + { + if (num11 % 2 == 1) + vector2_2.X += 12f; + else + vector2_2.X -= 12f; + if (num12 % 2 == 1) + vector2_2.Y -= 12f; + } + if (num13 > 0 && num11 == 0) + { + if (num13 % 2 == 1) + vector2_2.X -= 12f; + else + vector2_2.X += 12f; + } + } + for (int index11 = 0; index11 < SmartCursorHelper._targets.Count; ++index11) + { + float num14 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index11].Item1, (float) SmartCursorHelper._targets[index11].Item2) * 16f + Vector2.One * 8f, vector2_2); + if ((double) num10 == -1.0 || (double) num14 < (double) num10) + { + num10 = num14; + target = SmartCursorHelper._targets[index11]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, providedInfo.reachableStartX, providedInfo.reachableStartY, providedInfo.reachableEndX, providedInfo.reachableEndY)) + { + focusedX = target.Item1; + focusedY = target.Item2; + } + } + SmartCursorHelper._points.Clear(); + SmartCursorHelper._endpoints.Clear(); + SmartCursorHelper._targets.Clear(); + } + + private static void Step_Axe( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int fX, + ref int fY) + { + int reachableStartX = providedInfo.reachableStartX; + int reachableStartY = providedInfo.reachableStartY; + int reachableEndX = providedInfo.reachableEndX; + int reachableEndY = providedInfo.reachableEndY; + int screenTargetX = providedInfo.screenTargetX; + int screenTargetY = providedInfo.screenTargetY; + if (providedInfo.item.axe <= 0 || fX != -1 || fY != -1) + return; + float num1 = -1f; + for (int index1 = reachableStartX; index1 <= reachableEndX; ++index1) + { + for (int index2 = reachableStartY; index2 <= reachableEndY; ++index2) + { + if (Main.tile[index1, index2].active()) + { + Tile tile = Main.tile[index1, index2]; + if (Main.tileAxe[(int) tile.type] && !TileID.Sets.IgnoreSmartCursorPriorityAxe[(int) tile.type]) + { + int x = index1; + int y = index2; + int type = (int) tile.type; + if (TileID.Sets.IsATreeTrunk[type]) + { + if (Collision.InTileBounds(x + 1, y, reachableStartX, reachableStartY, reachableEndX, reachableEndY)) + { + if (Main.tile[x, y].frameY >= (short) 198 && Main.tile[x, y].frameX == (short) 44) + ++x; + if (Main.tile[x, y].frameX == (short) 66 && Main.tile[x, y].frameY <= (short) 44) + ++x; + if (Main.tile[x, y].frameX == (short) 44 && Main.tile[x, y].frameY >= (short) 132 && Main.tile[x, y].frameY <= (short) 176) + ++x; + } + if (Collision.InTileBounds(x - 1, y, reachableStartX, reachableStartY, reachableEndX, reachableEndY)) + { + if (Main.tile[x, y].frameY >= (short) 198 && Main.tile[x, y].frameX == (short) 66) + --x; + if (Main.tile[x, y].frameX == (short) 88 && Main.tile[x, y].frameY >= (short) 66 && Main.tile[x, y].frameY <= (short) 110) + --x; + if (Main.tile[x, y].frameX == (short) 22 && Main.tile[x, y].frameY >= (short) 132 && Main.tile[x, y].frameY <= (short) 176) + --x; + } + while (Main.tile[x, y].active() && (int) Main.tile[x, y].type == type && (int) Main.tile[x, y + 1].type == type && Collision.InTileBounds(x, y + 1, reachableStartX, reachableStartY, reachableEndX, reachableEndY)) + ++y; + } + if (tile.type == (ushort) 80) + { + if (Collision.InTileBounds(x + 1, y, reachableStartX, reachableStartY, reachableEndX, reachableEndY)) + { + if (Main.tile[x, y].frameX == (short) 54) + ++x; + if (Main.tile[x, y].frameX == (short) 108 && Main.tile[x, y].frameY == (short) 36) + ++x; + } + if (Collision.InTileBounds(x - 1, y, reachableStartX, reachableStartY, reachableEndX, reachableEndY)) + { + if (Main.tile[x, y].frameX == (short) 36) + --x; + if (Main.tile[x, y].frameX == (short) 108 && Main.tile[x, y].frameY == (short) 18) + --x; + } + while (Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 80 && Main.tile[x, y + 1].type == (ushort) 80 && Collision.InTileBounds(x, y + 1, reachableStartX, reachableStartY, reachableEndX, reachableEndY)) + ++y; + } + if (tile.type == (ushort) 323 || tile.type == (ushort) 72) + { + while (Main.tile[x, y].active() && (Main.tile[x, y].type == (ushort) 323 && Main.tile[x, y + 1].type == (ushort) 323 || Main.tile[x, y].type == (ushort) 72 && Main.tile[x, y + 1].type == (ushort) 72) && Collision.InTileBounds(x, y + 1, reachableStartX, reachableStartY, reachableEndX, reachableEndY)) + ++y; + } + float num2 = Vector2.Distance(new Vector2((float) x, (float) y) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + fX = x; + fY = y; + } + } + } + } + } + } + + private static void Step_BlocksFilling( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int fX, + ref int fY) + { + if (!Player.SmartCursorSettings.SmartBlocksEnabled) + return; + int reachableStartX = providedInfo.reachableStartX; + int reachableStartY = providedInfo.reachableStartY; + int reachableEndX = providedInfo.reachableEndX; + int reachableEndY = providedInfo.reachableEndY; + int screenTargetX = providedInfo.screenTargetX; + int screenTargetY = providedInfo.screenTargetY; + if (Player.SmartCursorSettings.SmartBlocksEnabled || providedInfo.item.createTile <= -1 || providedInfo.item.type == 213 || !Main.tileSolid[providedInfo.item.createTile] || Main.tileSolidTop[providedInfo.item.createTile] || Main.tileFrameImportant[providedInfo.item.createTile] || fX != -1 || fY != -1) + return; + SmartCursorHelper._targets.Clear(); + bool flag1 = false; + if (Main.tile[screenTargetX, screenTargetY].active()) + flag1 = true; + if (!Collision.InTileBounds(screenTargetX, screenTargetY, reachableStartX, reachableStartY, reachableEndX, reachableEndY)) + flag1 = true; + if (!flag1) + { + for (int index1 = reachableStartX; index1 <= reachableEndX; ++index1) + { + for (int index2 = reachableStartY; index2 <= reachableEndY; ++index2) + { + Tile tile = Main.tile[index1, index2]; + if (!tile.active() || Main.tileCut[(int) tile.type] || TileID.Sets.BreakableWhenPlacing[(int) tile.type]) + { + int num = 0; + if (Main.tile[index1 - 1, index2].active() && Main.tileSolid[(int) Main.tile[index1 - 1, index2].type] && !Main.tileSolidTop[(int) Main.tile[index1 - 1, index2].type]) + ++num; + if (Main.tile[index1 + 1, index2].active() && Main.tileSolid[(int) Main.tile[index1 + 1, index2].type] && !Main.tileSolidTop[(int) Main.tile[index1 + 1, index2].type]) + ++num; + if (Main.tile[index1, index2 - 1].active() && Main.tileSolid[(int) Main.tile[index1, index2 - 1].type] && !Main.tileSolidTop[(int) Main.tile[index1, index2 - 1].type]) + ++num; + if (Main.tile[index1, index2 + 1].active() && Main.tileSolid[(int) Main.tile[index1, index2 + 1].type] && !Main.tileSolidTop[(int) Main.tile[index1, index2 + 1].type]) + ++num; + if (num >= 2) + SmartCursorHelper._targets.Add(new Tuple(index1, index2)); + } + } + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num1 = -1f; + float num2 = float.PositiveInfinity; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + if (Collision.EmptyTile(SmartCursorHelper._targets[index].Item1, SmartCursorHelper._targets[index].Item2, true)) + { + Vector2 vector2 = new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f - providedInfo.mouse; + bool flag2 = false; + float num3 = Math.Abs(vector2.X); + float num4 = vector2.Length(); + if ((double) num3 < (double) num2) + flag2 = true; + if ((double) num3 == (double) num2 && ((double) num1 == -1.0 || (double) num4 < (double) num1)) + flag2 = true; + if (flag2) + { + num1 = num4; + num2 = num3; + target = SmartCursorHelper._targets[index]; + } + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, reachableStartX, reachableStartY, reachableEndX, reachableEndY) && (double) num1 != -1.0) + { + fX = target.Item1; + fY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_Torch( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int fX, + ref int fY) + { + int reachableStartX = providedInfo.reachableStartX; + int reachableStartY = providedInfo.reachableStartY; + int reachableEndX = providedInfo.reachableEndX; + int reachableEndY = providedInfo.reachableEndY; + int screenTargetX = providedInfo.screenTargetX; + int screenTargetY = providedInfo.screenTargetY; + if (providedInfo.item.createTile != 4 || fX != -1 || fY != -1) + return; + SmartCursorHelper._targets.Clear(); + bool flag1 = providedInfo.item.type != 1333 && providedInfo.item.type != 523 && providedInfo.item.type != 4384; + for (int index1 = reachableStartX; index1 <= reachableEndX; ++index1) + { + for (int index2 = reachableStartY; index2 <= reachableEndY; ++index2) + { + Tile tile1 = Main.tile[index1, index2]; + Tile tile2 = Main.tile[index1 - 1, index2]; + Tile tile3 = Main.tile[index1 + 1, index2]; + Tile tile4 = Main.tile[index1, index2 + 1]; + if (!tile1.active() || TileID.Sets.BreakableWhenPlacing[(int) tile1.type] || Main.tileCut[(int) tile1.type] && tile1.type != (ushort) 82 && tile1.type != (ushort) 83) + { + bool flag2 = false; + for (int index3 = index1 - 8; index3 <= index1 + 8; ++index3) + { + for (int index4 = index2 - 8; index4 <= index2 + 8; ++index4) + { + if (Main.tile[index3, index4] != null && Main.tile[index3, index4].type == (ushort) 4) + { + flag2 = true; + break; + } + } + if (flag2) + break; + } + if (!flag2 && (!flag1 || tile1.liquid <= (byte) 0) && (tile1.wall > (ushort) 0 || tile2.active() && (tile2.slope() == (byte) 0 || (int) tile2.slope() % 2 != 1) && (Main.tileSolid[(int) tile2.type] && !Main.tileNoAttach[(int) tile2.type] && !Main.tileSolidTop[(int) tile2.type] && !TileID.Sets.NotReallySolid[(int) tile2.type] || TileID.Sets.IsBeam[(int) tile2.type] || WorldGen.IsTreeType((int) tile2.type) && WorldGen.IsTreeType((int) Main.tile[index1 - 1, index2 - 1].type) && WorldGen.IsTreeType((int) Main.tile[index1 - 1, index2 + 1].type)) || tile3.active() && (tile3.slope() == (byte) 0 || (int) tile3.slope() % 2 != 0) && (Main.tileSolid[(int) tile3.type] && !Main.tileNoAttach[(int) tile3.type] && !Main.tileSolidTop[(int) tile3.type] && !TileID.Sets.NotReallySolid[(int) tile3.type] || TileID.Sets.IsBeam[(int) tile3.type] || WorldGen.IsTreeType((int) tile3.type) && WorldGen.IsTreeType((int) Main.tile[index1 + 1, index2 - 1].type) && WorldGen.IsTreeType((int) Main.tile[index1 + 1, index2 + 1].type)) || tile4.active() && Main.tileSolid[(int) tile4.type] && !Main.tileNoAttach[(int) tile4.type] && (!Main.tileSolidTop[(int) tile4.type] || TileID.Sets.Platforms[(int) tile4.type] && tile4.slope() == (byte) 0) && !TileID.Sets.NotReallySolid[(int) tile4.type] && !tile4.halfBrick() && tile4.slope() == (byte) 0) && tile1.type != (ushort) 4) + SmartCursorHelper._targets.Add(new Tuple(index1, index2)); + } + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num1 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num2 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, reachableStartX, reachableStartY, reachableEndX, reachableEndY)) + { + fX = target.Item1; + fY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private static void Step_LawnMower( + SmartCursorHelper.SmartCursorUsageInfo providedInfo, + ref int fX, + ref int fY) + { + int reachableStartX = providedInfo.reachableStartX; + int reachableStartY = providedInfo.reachableStartY; + int reachableEndX = providedInfo.reachableEndX; + int reachableEndY = providedInfo.reachableEndY; + int screenTargetX = providedInfo.screenTargetX; + int screenTargetY = providedInfo.screenTargetY; + if (providedInfo.item.type != 4049 || fX != -1 || fY != -1) + return; + SmartCursorHelper._targets.Clear(); + for (int index1 = reachableStartX; index1 <= reachableEndX; ++index1) + { + for (int index2 = reachableStartY; index2 <= reachableEndY; ++index2) + { + Tile tile = Main.tile[index1, index2]; + if (tile.active() && (tile.type == (ushort) 2 || tile.type == (ushort) 109)) + SmartCursorHelper._targets.Add(new Tuple(index1, index2)); + } + } + if (SmartCursorHelper._targets.Count > 0) + { + float num1 = -1f; + Tuple target = SmartCursorHelper._targets[0]; + for (int index = 0; index < SmartCursorHelper._targets.Count; ++index) + { + float num2 = Vector2.Distance(new Vector2((float) SmartCursorHelper._targets[index].Item1, (float) SmartCursorHelper._targets[index].Item2) * 16f + Vector2.One * 8f, providedInfo.mouse); + if ((double) num1 == -1.0 || (double) num2 < (double) num1) + { + num1 = num2; + target = SmartCursorHelper._targets[index]; + } + } + if (Collision.InTileBounds(target.Item1, target.Item2, reachableStartX, reachableStartY, reachableEndX, reachableEndY)) + { + fX = target.Item1; + fY = target.Item2; + } + } + SmartCursorHelper._targets.Clear(); + } + + private class SmartCursorUsageInfo + { + public Player player; + public Item item; + public Vector2 mouse; + public Vector2 position; + public Vector2 Center; + public int screenTargetX; + public int screenTargetY; + public int reachableStartX; + public int reachableEndX; + public int reachableStartY; + public int reachableEndY; + public int paintLookup; + } + } +} diff --git a/GameContent/SpelunkerProjectileHelper.cs b/GameContent/SpelunkerProjectileHelper.cs new file mode 100644 index 0000000..1598ccc --- /dev/null +++ b/GameContent/SpelunkerProjectileHelper.cs @@ -0,0 +1,69 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.SpelunkerProjectileHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; + +namespace Terraria.GameContent +{ + public class SpelunkerProjectileHelper + { + private HashSet _positionsChecked = new HashSet(); + private HashSet _tilesChecked = new HashSet(); + private Rectangle _clampBox; + private int _frameCounter; + + public void OnPreUpdateAllProjectiles() + { + this._clampBox = new Rectangle(2, 2, Main.maxTilesX - 2, Main.maxTilesY - 2); + if (++this._frameCounter < 10) + return; + this._frameCounter = 0; + this._tilesChecked.Clear(); + this._positionsChecked.Clear(); + } + + public void AddSpotToCheck(Vector2 spot) + { + if (!this._positionsChecked.Add(spot)) + return; + this.CheckSpot(spot); + } + + private void CheckSpot(Vector2 Center) + { + int num1 = (int) Center.X / 16; + int num2 = (int) Center.Y / 16; + int num3 = Utils.Clamp(num1 - 30, this._clampBox.Left, this._clampBox.Right); + int num4 = Utils.Clamp(num1 + 30, this._clampBox.Left, this._clampBox.Right); + int num5 = Utils.Clamp(num2 - 30, this._clampBox.Top, this._clampBox.Bottom); + int num6 = Utils.Clamp(num2 + 30, this._clampBox.Top, this._clampBox.Bottom); + Point point = new Point(); + Vector2 Position = new Vector2(); + for (int index1 = num3; index1 <= num4; ++index1) + { + for (int index2 = num5; index2 <= num6; ++index2) + { + Tile t = Main.tile[index1, index2]; + if (t != null && t.active() && Main.IsTileSpelunkable(t) && (double) new Vector2((float) (num1 - index1), (float) (num2 - index2)).Length() <= 30.0) + { + point.X = index1; + point.Y = index2; + if (this._tilesChecked.Add(point) && Main.rand.Next(4) == 0) + { + Position.X = (float) (index1 * 16); + Position.Y = (float) (index2 * 16); + Dust dust = Dust.NewDustDirect(Position, 16, 16, 204, Alpha: 150, Scale: 0.3f); + dust.fadeIn = 0.75f; + dust.velocity *= 0.1f; + dust.noLight = true; + } + } + } + } + } + } +} diff --git a/GameContent/TeleportHelpers.cs b/GameContent/TeleportHelpers.cs new file mode 100644 index 0000000..8a17307 --- /dev/null +++ b/GameContent/TeleportHelpers.cs @@ -0,0 +1,112 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.TeleportHelpers +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.GameContent +{ + public class TeleportHelpers + { + public static bool RequestMagicConchTeleportPosition( + Player player, + int crawlOffsetX, + int startX, + out Point landingPoint) + { + landingPoint = new Point(); + Point point = new Point(startX, 50); + int num1 = 1; + int num2 = -1; + int num3 = 1; + int num4 = 0; + int num5 = 5000; + Vector2 vector2 = new Vector2((float) player.width * 0.5f, (float) player.height); + int num6 = 40; + bool flag1 = WorldGen.SolidOrSlopedTile(Main.tile[point.X, point.Y]); + int num7 = 0; + int num8 = 400; + while (num4 < num5 && num7 < num8) + { + ++num4; + Tile tile1 = Main.tile[point.X, point.Y]; + Tile tile2 = Main.tile[point.X, point.Y + num3]; + bool flag2 = WorldGen.SolidOrSlopedTile(tile1) || tile1.liquid > (byte) 0; + bool flag3 = WorldGen.SolidOrSlopedTile(tile2) || tile2.liquid > (byte) 0; + if (TeleportHelpers.IsInSolidTilesExtended(new Vector2((float) (point.X * 16 + 8), (float) (point.Y * 16 + 15)) - vector2, player.velocity, player.width, player.height, (int) player.gravDir)) + { + if (flag1) + point.Y += num1; + else + point.Y += num2; + } + else if (flag2) + { + if (flag1) + point.Y += num1; + else + point.Y += num2; + } + else + { + flag1 = false; + if (!TeleportHelpers.IsInSolidTilesExtended(new Vector2((float) (point.X * 16 + 8), (float) (point.Y * 16 + 15 + 16)) - vector2, player.velocity, player.width, player.height, (int) player.gravDir) && !flag3 && (double) point.Y < Main.worldSurface) + point.Y += num1; + else if (tile2.liquid > (byte) 0) + { + point.X += crawlOffsetX; + ++num7; + } + else if (TeleportHelpers.TileIsDangerous(point.X, point.Y)) + { + point.X += crawlOffsetX; + ++num7; + } + else if (TeleportHelpers.TileIsDangerous(point.X, point.Y + num3)) + { + point.X += crawlOffsetX; + ++num7; + } + else if (point.Y < num6) + point.Y += num1; + else + break; + } + } + if (num4 == num5 || num7 >= num8 || !WorldGen.InWorld(point.X, point.Y, 40)) + return false; + landingPoint = point; + return true; + } + + private static bool TileIsDangerous(int x, int y) + { + Tile tile = Main.tile[x, y]; + return tile.liquid > (byte) 0 && tile.lava() || tile.wall == (ushort) 87 && (double) y > Main.worldSurface && !NPC.downedPlantBoss || Main.wallDungeon[(int) tile.wall] && (double) y > Main.worldSurface && !NPC.downedBoss3; + } + + private static bool IsInSolidTilesExtended( + Vector2 testPosition, + Vector2 playerVelocity, + int width, + int height, + int gravDir) + { + if (Collision.LavaCollision(testPosition, width, height) || (double) Collision.HurtTiles(testPosition, playerVelocity, width, height).Y > 0.0 || Collision.SolidCollision(testPosition, width, height)) + return true; + Vector2 Velocity1 = Vector2.UnitX * 16f; + if (Collision.TileCollision(testPosition - Velocity1, Velocity1, width, height, gravDir: gravDir) != Velocity1) + return true; + Vector2 Velocity2 = -Vector2.UnitX * 16f; + if (Collision.TileCollision(testPosition - Velocity2, Velocity2, width, height, gravDir: gravDir) != Velocity2) + return true; + Vector2 Velocity3 = Vector2.UnitY * 16f; + if (Collision.TileCollision(testPosition - Velocity3, Velocity3, width, height, gravDir: gravDir) != Velocity3) + return true; + Vector2 Velocity4 = -Vector2.UnitY * 16f; + return Collision.TileCollision(testPosition - Velocity4, Velocity4, width, height, gravDir: gravDir) != Velocity4; + } + } +} diff --git a/GameContent/TeleportPylonInfo.cs b/GameContent/TeleportPylonInfo.cs new file mode 100644 index 0000000..61a0f8e --- /dev/null +++ b/GameContent/TeleportPylonInfo.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.TeleportPylonInfo +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using Terraria.DataStructures; + +namespace Terraria.GameContent +{ + public struct TeleportPylonInfo : IEquatable + { + public Point16 PositionInTiles; + public TeleportPylonType TypeOfPylon; + + public bool Equals(TeleportPylonInfo other) => this.PositionInTiles == other.PositionInTiles && this.TypeOfPylon == other.TypeOfPylon; + } +} diff --git a/GameContent/TeleportPylonType.cs b/GameContent/TeleportPylonType.cs new file mode 100644 index 0000000..8bbf64a --- /dev/null +++ b/GameContent/TeleportPylonType.cs @@ -0,0 +1,22 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.TeleportPylonType +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent +{ + public enum TeleportPylonType : byte + { + SurfacePurity, + Jungle, + Hallow, + Underground, + Beach, + Desert, + Snow, + GlowingMushroom, + Victory, + Count, + } +} diff --git a/GameContent/TeleportPylonsSystem.cs b/GameContent/TeleportPylonsSystem.cs new file mode 100644 index 0000000..57c11f2 --- /dev/null +++ b/GameContent/TeleportPylonsSystem.cs @@ -0,0 +1,321 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.TeleportPylonsSystem +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.Chat; +using Terraria.DataStructures; +using Terraria.GameContent.NetModules; +using Terraria.GameContent.Tile_Entities; +using Terraria.Localization; +using Terraria.Net; + +namespace Terraria.GameContent +{ + public class TeleportPylonsSystem : IOnPlayerJoining + { + private List _pylons = new List(); + private List _pylonsOld = new List(); + private int _cooldownForUpdatingPylonsList; + private const int CooldownTimePerPylonsListUpdate = 2147483647; + private SceneMetrics _sceneMetrics = new SceneMetrics(Main.ActiveWorld); + + public List Pylons => this._pylons; + + public void Update() + { + if (Main.netMode == 1) + return; + if (this._cooldownForUpdatingPylonsList > 0) + { + --this._cooldownForUpdatingPylonsList; + } + else + { + this._cooldownForUpdatingPylonsList = int.MaxValue; + this.UpdatePylonsListAndBroadcastChanges(); + } + } + + public bool HasPylonOfType(TeleportPylonType pylonType) => this._pylons.Any((Func) (x => x.TypeOfPylon == pylonType)); + + public bool HasAnyPylon() => this._pylons.Count > 0; + + public void RequestImmediateUpdate() + { + if (Main.netMode == 1) + return; + this._cooldownForUpdatingPylonsList = int.MaxValue; + this.UpdatePylonsListAndBroadcastChanges(); + } + + private void UpdatePylonsListAndBroadcastChanges() + { + Utils.Swap>(ref this._pylons, ref this._pylonsOld); + this._pylons.Clear(); + foreach (TileEntity tileEntity in TileEntity.ByPosition.Values) + { + TeleportPylonType pylonType; + if (tileEntity is TETeleportationPylon teleportationPylon2 && teleportationPylon2.TryGetPylonType(out pylonType)) + this._pylons.Add(new TeleportPylonInfo() + { + PositionInTiles = teleportationPylon2.Position, + TypeOfPylon = pylonType + }); + } + IEnumerable teleportPylonInfos = this._pylonsOld.Except((IEnumerable) this._pylons); + foreach (TeleportPylonInfo info in this._pylons.Except((IEnumerable) this._pylonsOld)) + NetManager.Instance.BroadcastOrLoopback(NetTeleportPylonModule.SerializePylonWasAddedOrRemoved(info, NetTeleportPylonModule.SubPacketType.PylonWasAdded)); + foreach (TeleportPylonInfo info in teleportPylonInfos) + NetManager.Instance.BroadcastOrLoopback(NetTeleportPylonModule.SerializePylonWasAddedOrRemoved(info, NetTeleportPylonModule.SubPacketType.PylonWasRemoved)); + } + + public void AddForClient(TeleportPylonInfo info) + { + if (this._pylons.Contains(info)) + return; + this._pylons.Add(info); + } + + public void RemoveForClient(TeleportPylonInfo info) => this._pylons.RemoveAll((Predicate) (x => x.Equals(info))); + + public void HandleTeleportRequest(TeleportPylonInfo info, int playerIndex) + { + Player player = Main.player[playerIndex]; + string key = (string) null; + bool flag1 = true; + if (flag1) + { + flag1 &= TeleportPylonsSystem.IsPlayerNearAPylon(player); + if (!flag1) + key = "Net.CannotTeleportToPylonBecausePlayerIsNotNearAPylon"; + } + if (flag1) + { + int necessaryNPCCount = this.HowManyNPCsDoesPylonNeed(info, player); + flag1 &= this.DoesPylonHaveEnoughNPCsAroundIt(info, necessaryNPCCount); + if (!flag1) + key = "Net.CannotTeleportToPylonBecauseNotEnoughNPCs"; + } + if (flag1) + { + flag1 &= !NPC.AnyDanger(); + if (!flag1) + key = "Net.CannotTeleportToPylonBecauseThereIsDanger"; + } + if (flag1) + { + if (!NPC.downedPlantBoss && (double) info.PositionInTiles.Y > Main.worldSurface && Framing.GetTileSafely((int) info.PositionInTiles.X, (int) info.PositionInTiles.Y).wall == (ushort) 87) + flag1 = false; + if (!flag1) + key = "Net.CannotTeleportToPylonBecauseAccessingLihzahrdTempleEarly"; + } + SceneMetricsScanSettings metricsScanSettings; + if (flag1) + { + SceneMetrics sceneMetrics = this._sceneMetrics; + metricsScanSettings = new SceneMetricsScanSettings(); + metricsScanSettings.VisualScanArea = new Rectangle?(); + metricsScanSettings.BiomeScanCenterPositionInWorld = new Vector2?(info.PositionInTiles.ToWorldCoordinates()); + metricsScanSettings.ScanOreFinderData = false; + SceneMetricsScanSettings settings = metricsScanSettings; + sceneMetrics.ScanAndExportToMain(settings); + flag1 = this.DoesPylonAcceptTeleportation(info, player); + if (!flag1) + key = "Net.CannotTeleportToPylonBecauseNotMeetingBiomeRequirements"; + } + if (flag1) + { + bool flag2 = false; + int num = 0; + for (int index = 0; index < this._pylons.Count; ++index) + { + TeleportPylonInfo pylon = this._pylons[index]; + if (player.InInteractionRange((int) pylon.PositionInTiles.X, (int) pylon.PositionInTiles.Y)) + { + if (num < 1) + num = 1; + int necessaryNPCCount = this.HowManyNPCsDoesPylonNeed(pylon, player); + if (this.DoesPylonHaveEnoughNPCsAroundIt(pylon, necessaryNPCCount)) + { + if (num < 2) + num = 2; + SceneMetrics sceneMetrics = this._sceneMetrics; + metricsScanSettings = new SceneMetricsScanSettings(); + metricsScanSettings.VisualScanArea = new Rectangle?(); + metricsScanSettings.BiomeScanCenterPositionInWorld = new Vector2?(pylon.PositionInTiles.ToWorldCoordinates()); + metricsScanSettings.ScanOreFinderData = false; + SceneMetricsScanSettings settings = metricsScanSettings; + sceneMetrics.ScanAndExportToMain(settings); + if (this.DoesPylonAcceptTeleportation(pylon, player)) + { + flag2 = true; + break; + } + } + } + } + if (!flag2) + { + flag1 = false; + switch (num) + { + case 1: + key = "Net.CannotTeleportToPylonBecauseNotEnoughNPCsAtCurrentPylon"; + break; + case 2: + key = "Net.CannotTeleportToPylonBecauseNotMeetingBiomeRequirements"; + break; + default: + key = "Net.CannotTeleportToPylonBecausePlayerIsNotNearAPylon"; + break; + } + } + } + if (flag1) + { + Vector2 newPos = info.PositionInTiles.ToWorldCoordinates() - new Vector2(0.0f, (float) player.HeightOffsetBoost); + int num = 9; + int typeOfPylon = (int) info.TypeOfPylon; + int number6 = 0; + player.Teleport(newPos, num, typeOfPylon); + player.velocity = Vector2.Zero; + if (Main.netMode != 2) + return; + RemoteClient.CheckSection(player.whoAmI, player.position); + NetMessage.SendData(65, number2: ((float) player.whoAmI), number3: newPos.X, number4: newPos.Y, number5: num, number6: number6, number7: typeOfPylon); + } + else + ChatHelper.SendChatMessageToClient(NetworkText.FromKey(key), new Color((int) byte.MaxValue, 240, 20), playerIndex); + } + + public static bool IsPlayerNearAPylon(Player player) => player.IsTileTypeInInteractionRange(597); + + private bool DoesPylonHaveEnoughNPCsAroundIt(TeleportPylonInfo info, int necessaryNPCCount) + { + if (necessaryNPCCount <= 0) + return true; + Point16 positionInTiles = info.PositionInTiles; + Rectangle rectangle = new Rectangle((int) positionInTiles.X - Main.buffScanAreaWidth / 2, (int) positionInTiles.Y - Main.buffScanAreaHeight / 2, Main.buffScanAreaWidth, Main.buffScanAreaHeight); + int num = necessaryNPCCount; + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && npc.isLikeATownNPC && !npc.homeless && rectangle.Contains(npc.homeTileX, npc.homeTileY)) + { + --num; + if (num == 0) + return true; + } + } + return false; + } + + public void RequestTeleportation(TeleportPylonInfo info, Player player) => NetManager.Instance.SendToServerOrLoopback(NetTeleportPylonModule.SerializeUseRequest(info)); + + private bool DoesPylonAcceptTeleportation(TeleportPylonInfo info, Player player) + { + switch (info.TypeOfPylon) + { + case TeleportPylonType.SurfacePurity: + return !(((double) info.PositionInTiles.Y <= Main.worldSurface ? 1 : 0) == 0 | ((int) info.PositionInTiles.X >= Main.maxTilesX - 380 || info.PositionInTiles.X <= (short) 380)) && (this._sceneMetrics.EnoughTilesForJungle || this._sceneMetrics.EnoughTilesForSnow || this._sceneMetrics.EnoughTilesForDesert || this._sceneMetrics.EnoughTilesForGlowingMushroom || this._sceneMetrics.EnoughTilesForHallow || this._sceneMetrics.EnoughTilesForCrimson ? 1 : (this._sceneMetrics.EnoughTilesForCorruption ? 1 : 0)) == 0; + case TeleportPylonType.Jungle: + return this._sceneMetrics.EnoughTilesForJungle; + case TeleportPylonType.Hallow: + return this._sceneMetrics.EnoughTilesForHallow; + case TeleportPylonType.Underground: + return (double) info.PositionInTiles.Y >= Main.worldSurface; + case TeleportPylonType.Beach: + bool flag = (double) info.PositionInTiles.Y <= Main.worldSurface && (double) info.PositionInTiles.Y > Main.worldSurface * 0.349999994039536; + return (((int) info.PositionInTiles.X >= Main.maxTilesX - 380 ? 1 : (info.PositionInTiles.X <= (short) 380 ? 1 : 0)) & (flag ? 1 : 0)) != 0; + case TeleportPylonType.Desert: + return this._sceneMetrics.EnoughTilesForDesert; + case TeleportPylonType.Snow: + return this._sceneMetrics.EnoughTilesForSnow; + case TeleportPylonType.GlowingMushroom: + return this._sceneMetrics.EnoughTilesForGlowingMushroom; + case TeleportPylonType.Victory: + return true; + default: + return true; + } + } + + private int HowManyNPCsDoesPylonNeed(TeleportPylonInfo info, Player player) => info.TypeOfPylon != TeleportPylonType.Victory ? 2 : 0; + + public void Reset() + { + this._pylons.Clear(); + this._cooldownForUpdatingPylonsList = 0; + } + + public void OnPlayerJoining(int playerIndex) + { + foreach (TeleportPylonInfo pylon in this._pylons) + NetManager.Instance.SendToClient(NetTeleportPylonModule.SerializePylonWasAddedOrRemoved(pylon, NetTeleportPylonModule.SubPacketType.PylonWasAdded), playerIndex); + } + + public static void SpawnInWorldDust(int tileStyle, Rectangle dustBox) + { + float r = 1f; + float g = 1f; + float b = 1f; + switch ((byte) tileStyle) + { + case 0: + r = 0.05f; + g = 0.8f; + b = 0.3f; + break; + case 1: + r = 0.7f; + g = 0.8f; + b = 0.05f; + break; + case 2: + r = 0.5f; + g = 0.3f; + b = 0.7f; + break; + case 3: + r = 0.4f; + g = 0.4f; + b = 0.6f; + break; + case 4: + r = 0.2f; + g = 0.2f; + b = 0.95f; + break; + case 5: + r = 0.85f; + g = 0.45f; + b = 0.1f; + break; + case 6: + r = 1f; + g = 1f; + b = 1.2f; + break; + case 7: + r = 0.4f; + g = 0.7f; + b = 1.2f; + break; + case 8: + r = 0.7f; + g = 0.7f; + b = 0.7f; + break; + } + int index = Dust.NewDust(dustBox.TopLeft(), dustBox.Width, dustBox.Height, 43, Alpha: 254, newColor: new Color(r, g, b, 1f), Scale: 0.5f); + Main.dust[index].velocity *= 0.1f; + Main.dust[index].velocity.Y -= 0.2f; + } + } +} diff --git a/GameContent/TextureAssets.cs b/GameContent/TextureAssets.cs new file mode 100644 index 0000000..f8a8093 --- /dev/null +++ b/GameContent/TextureAssets.cs @@ -0,0 +1,301 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.TextureAssets +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; + +namespace Terraria.GameContent +{ + public static class TextureAssets + { + public static Asset[] InfoIcon = new Asset[14]; + public static Asset[] WireUi = new Asset[12]; + public static Asset BuilderAcc; + public static Asset QuicksIcon; + public static Asset[] Clothes = new Asset[6]; + public static Asset[] MapIcon = new Asset[9]; + public static Asset[] Underworld = new Asset[14]; + public static Asset MapPing; + public static Asset Map; + public static Asset[] MapBGs = new Asset[42]; + public static Asset Hue; + public static Asset FlameRing; + public static Asset MapDeath; + public static Asset ColorSlider; + public static Asset ColorBar; + public static Asset ColorBlip; + public static Asset SmartDig; + public static Asset ColorHighlight; + public static Asset TileCrack; + public static Asset LockOnCursor; + public static Asset IceBarrier; + public static Asset[] ChestStack = new Asset[2]; + public static Asset[] NpcHead = new Asset[45]; + public static Asset[] NpcHeadBoss = new Asset[39]; + public static Asset[] CraftToggle = new Asset[4]; + public static Asset[] InventorySort = new Asset[2]; + public static Asset[] TextGlyph = new Asset[1]; + public static Asset[] HotbarRadial = new Asset[3]; + public static Asset CraftUpButton; + public static Asset CraftDownButton; + public static Asset ScrollLeftButton; + public static Asset ScrollRightButton; + public static Asset Frozen; + public static Asset MagicPixel; + public static Asset SettingsPanel; + public static Asset SettingsPanel2; + public static Asset[] Dest = new Asset[3]; + public static Asset[] Gem = new Asset[7]; + public static Asset[] RudolphMount = new Asset[3]; + public static Asset BunnyMount; + public static Asset PigronMount; + public static Asset SlimeMount; + public static Asset MinecartMount; + public static Asset TurtleMount; + public static Asset DesertMinecartMount; + public static Asset FishMinecartMount; + public static Asset[] BeeMount = new Asset[2]; + public static Asset[] UfoMount = new Asset[2]; + public static Asset[] DrillMount = new Asset[6]; + public static Asset[] ScutlixMount = new Asset[3]; + public static Asset UnicornMount; + public static Asset BasiliskMount; + public static Asset[] MinecartMechMount = new Asset[2]; + public static Asset[] CuteFishronMount = new Asset[2]; + public static Asset MinecartWoodMount; + public static Asset[] Wings = new Asset[47]; + public static Asset[] ArmorHead = new Asset[266]; + public static Asset[] ArmorBody = new Asset[235]; + public static Asset[] ArmorBodyComposite = new Asset[235]; + public static Asset[] FemaleBody = new Asset[235]; + public static Asset[] ArmorArm = new Asset[235]; + public static Asset[] ArmorLeg = new Asset[218]; + public static Asset[] AccHandsOn = new Asset[22]; + public static Asset[] AccHandsOnComposite = new Asset[22]; + public static Asset[] AccHandsOff = new Asset[14]; + public static Asset[] AccHandsOffComposite = new Asset[14]; + public static Asset[] AccBack = new Asset[30]; + public static Asset[] AccFront = new Asset[9]; + public static Asset[] AccShoes = new Asset[25]; + public static Asset[] AccWaist = new Asset[17]; + public static Asset[] AccShield = new Asset[10]; + public static Asset[] AccNeck = new Asset[11]; + public static Asset[] AccFace = new Asset[16]; + public static Asset[] AccBalloon = new Asset[18]; + public static Asset Pulley; + public static Asset[] XmasTree = new Asset[5]; + public static Asset[] Flames = new Asset[17]; + public static Asset Timer; + public static Asset[] Reforge = new Asset[2]; + public static Asset EmoteMenuButton; + public static Asset BestiaryMenuButton; + public static Asset WallOutline; + public static Asset Actuator; + public static Asset Wire; + public static Asset Wire2; + public static Asset Wire3; + public static Asset Wire4; + public static Asset WireNew; + public static Asset[] Camera = new Asset[8]; + public static Asset FlyingCarpet; + public static Asset Grid; + public static Asset LightDisc; + public static Asset EyeLaser; + public static Asset BoneEyes; + public static Asset BoneLaser; + public static Asset Trash; + public static Asset FishingLine; + public static Asset Beetle; + public static Asset Probe; + public static Asset EyeLaserSmall; + public static Asset XmasLight; + public static Asset[] Golem = new Asset[4]; + public static Asset Confuse; + public static Asset SunOrb; + public static Asset SunAltar; + public static Asset[] Chains = new Asset[17]; + public static Asset Chain; + public static Asset[] GemChain = new Asset[7]; + public static Asset Chain2; + public static Asset Chain3; + public static Asset Chain4; + public static Asset Chain5; + public static Asset Chain6; + public static Asset Chain7; + public static Asset Chain8; + public static Asset Chain9; + public static Asset Chain10; + public static Asset Chain11; + public static Asset Chain12; + public static Asset Chain13; + public static Asset Chain14; + public static Asset Chain15; + public static Asset Chain16; + public static Asset Chain17; + public static Asset Chain18; + public static Asset Chain19; + public static Asset Chain20; + public static Asset Chain21; + public static Asset Chain22; + public static Asset Chain23; + public static Asset Chain24; + public static Asset Chain25; + public static Asset Chain26; + public static Asset Chain27; + public static Asset Chain28; + public static Asset Chain29; + public static Asset Chain30; + public static Asset Chain31; + public static Asset Chain32; + public static Asset Chain33; + public static Asset Chain34; + public static Asset Chain35; + public static Asset Chain36; + public static Asset Chain37; + public static Asset Chain38; + public static Asset Chain39; + public static Asset Chain40; + public static Asset Chain41; + public static Asset Chain42; + public static Asset Chain43; + public static Asset Hb1; + public static Asset Hb2; + public static Asset Chaos; + public static Asset Cd; + public static Asset Wof; + public static Asset BoneArm; + public static Asset BoneArm2; + public static Asset PumpkingArm; + public static Asset PumpkingCloak; + public static Asset[] EquipPage = new Asset[11]; + public static Asset HouseBanner; + public static Asset[] Pvp = new Asset[3]; + public static Asset[] NpcToggle = new Asset[2]; + public static Asset[] HbLock = new Asset[2]; + public static Asset[] blockReplaceIcon = new Asset[2]; + public static Asset[] Buff = new Asset[323]; + public static Asset[] Item = new Asset[5045]; + public static Asset[] ItemFlame = new Asset[5045]; + public static Asset[] Npc = new Asset[663]; + public static Asset[] Projectile = new Asset[950]; + public static Asset[] Gore = new Asset[1269]; + public static Asset[] BackPack = new Asset[9]; + public static Asset Rain; + public static Asset[] GlowMask = new Asset[301]; + public static Asset[] Extra = new Asset[212]; + public static Asset[] HighlightMask = new Asset[623]; + public static Asset[] Coin = new Asset[4]; + public static Asset[] Cursors = new Asset[18]; + public static Asset CursorRadial; + public static Asset Dust; + public static Asset Sun; + public static Asset Sun2; + public static Asset Sun3; + public static Asset[] Moon = new Asset[9]; + public static Asset SmileyMoon; + public static Asset PumpkinMoon; + public static Asset SnowMoon; + public static Asset OneDropLogo; + public static Asset[] Tile = new Asset[623]; + public static Asset BlackTile; + public static Asset[] Wall = new Asset[316]; + public static Asset[] Background = new Asset[298]; + public static Asset[] Cloud = new Asset[37]; + public static Asset[] Star = new Asset[4]; + public static Asset[] Liquid = new Asset[13]; + public static Asset[] LiquidSlope = new Asset[13]; + public static Asset Heart; + public static Asset Heart2; + public static Asset Mana; + public static Asset Bubble; + public static Asset Flame; + public static Asset[] TreeTop = new Asset[31]; + public static Asset[] TreeBranch = new Asset[31]; + public static Asset[] Wood = new Asset[7]; + public static Asset ShroomCap; + public static Asset InventoryBack; + public static Asset InventoryBack2; + public static Asset InventoryBack3; + public static Asset InventoryBack4; + public static Asset InventoryBack5; + public static Asset InventoryBack6; + public static Asset InventoryBack7; + public static Asset InventoryBack8; + public static Asset InventoryBack9; + public static Asset InventoryBack10; + public static Asset InventoryBack11; + public static Asset InventoryBack12; + public static Asset InventoryBack13; + public static Asset InventoryBack14; + public static Asset InventoryBack15; + public static Asset InventoryBack16; + public static Asset InventoryBack17; + public static Asset InventoryBack18; + public static Asset HairStyleBack; + public static Asset ClothesStyleBack; + public static Asset InventoryTickOn; + public static Asset InventoryTickOff; + public static Asset SplashTexture16x9; + public static Asset SplashTexture4x3; + public static Asset SplashTextureLegoBack; + public static Asset SplashTextureLegoResonanace; + public static Asset SplashTextureLegoTree; + public static Asset SplashTextureLegoFront; + public static Asset Logo; + public static Asset Logo2; + public static Asset Logo3; + public static Asset Logo4; + public static Asset TextBack; + public static Asset Chat; + public static Asset Chat2; + public static Asset ChatBack; + public static Asset Team; + public static Asset Re; + public static Asset Ra; + public static Asset Splash; + public static Asset Fade; + public static Asset Ninja; + public static Asset AntLion; + public static Asset SpikeBase; + public static Asset Ghost; + public static Asset EvilCactus; + public static Asset GoodCactus; + public static Asset CrimsonCactus; + public static Asset WraithEye; + public static Asset Firefly; + public static Asset FireflyJar; + public static Asset Lightningbug; + public static Asset LightningbugJar; + public static Asset[] JellyfishBowl = new Asset[3]; + public static Asset GlowSnail; + public static Asset IceQueen; + public static Asset SantaTank; + public static Asset ReaperEye; + public static Asset JackHat; + public static Asset TreeFace; + public static Asset PumpkingFace; + public static Asset DukeFishron; + public static Asset MiniMinotaur; + public static Asset[,] Players; + public static Asset[] PlayerHair = new Asset[162]; + public static Asset[] PlayerHairAlt = new Asset[162]; + public static Asset LoadingSunflower; + public static Asset GolfSwingBarPanel; + public static Asset GolfSwingBarFill; + public static Asset SpawnPoint; + public static Asset SpawnBed; + public static Asset GolfBallArrow; + public static Asset GolfBallArrowShadow; + public static Asset GolfBallOutline; + + public static class RenderTargets + { + public static PlayerRainbowWingsTextureContent PlayerRainbowWings; + public static PlayerTitaniumStormBuffTextureContent PlayerTitaniumStormBuff; + public static PlayerQueenSlimeMountTextureContent QueenSlimeMount; + } + } +} diff --git a/GameContent/TilePaintSystemV2.cs b/GameContent/TilePaintSystemV2.cs new file mode 100644 index 0000000..895dec3 --- /dev/null +++ b/GameContent/TilePaintSystemV2.cs @@ -0,0 +1,377 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.TilePaintSystemV2 +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using System.Collections.Generic; + +namespace Terraria.GameContent +{ + public class TilePaintSystemV2 + { + private Dictionary _tilesRenders = new Dictionary(); + private Dictionary _wallsRenders = new Dictionary(); + private Dictionary _treeTopRenders = new Dictionary(); + private Dictionary _treeBranchRenders = new Dictionary(); + private List _requests = new List(); + + public void Reset() + { + foreach (TilePaintSystemV2.ARenderTargetHolder arenderTargetHolder in this._tilesRenders.Values) + arenderTargetHolder.Clear(); + this._tilesRenders.Clear(); + foreach (TilePaintSystemV2.ARenderTargetHolder arenderTargetHolder in this._wallsRenders.Values) + arenderTargetHolder.Clear(); + this._wallsRenders.Clear(); + foreach (TilePaintSystemV2.ARenderTargetHolder arenderTargetHolder in this._treeTopRenders.Values) + arenderTargetHolder.Clear(); + this._treeTopRenders.Clear(); + foreach (TilePaintSystemV2.ARenderTargetHolder arenderTargetHolder in this._treeBranchRenders.Values) + arenderTargetHolder.Clear(); + this._treeBranchRenders.Clear(); + foreach (TilePaintSystemV2.ARenderTargetHolder request in this._requests) + request.Clear(); + this._requests.Clear(); + } + + public void RequestTile(ref TilePaintSystemV2.TileVariationkey lookupKey) + { + TilePaintSystemV2.TileRenderTargetHolder renderTargetHolder; + if (!this._tilesRenders.TryGetValue(lookupKey, out renderTargetHolder)) + { + renderTargetHolder = new TilePaintSystemV2.TileRenderTargetHolder() + { + Key = lookupKey + }; + this._tilesRenders.Add(lookupKey, renderTargetHolder); + } + if (renderTargetHolder.IsReady) + return; + this._requests.Add((TilePaintSystemV2.ARenderTargetHolder) renderTargetHolder); + } + + private void RequestTile_CheckForRelatedTileRequests( + ref TilePaintSystemV2.TileVariationkey lookupKey) + { + if (lookupKey.TileType != 83) + return; + TilePaintSystemV2.TileVariationkey lookupKey1 = new TilePaintSystemV2.TileVariationkey() + { + TileType = 84, + TileStyle = lookupKey.TileStyle, + PaintColor = lookupKey.PaintColor + }; + this.RequestTile(ref lookupKey1); + } + + public void RequestWall(ref TilePaintSystemV2.WallVariationKey lookupKey) + { + TilePaintSystemV2.WallRenderTargetHolder renderTargetHolder; + if (!this._wallsRenders.TryGetValue(lookupKey, out renderTargetHolder)) + { + renderTargetHolder = new TilePaintSystemV2.WallRenderTargetHolder() + { + Key = lookupKey + }; + this._wallsRenders.Add(lookupKey, renderTargetHolder); + } + if (renderTargetHolder.IsReady) + return; + this._requests.Add((TilePaintSystemV2.ARenderTargetHolder) renderTargetHolder); + } + + public void RequestTreeTop( + ref TilePaintSystemV2.TreeFoliageVariantKey lookupKey) + { + TilePaintSystemV2.TreeTopRenderTargetHolder renderTargetHolder; + if (!this._treeTopRenders.TryGetValue(lookupKey, out renderTargetHolder)) + { + renderTargetHolder = new TilePaintSystemV2.TreeTopRenderTargetHolder() + { + Key = lookupKey + }; + this._treeTopRenders.Add(lookupKey, renderTargetHolder); + } + if (renderTargetHolder.IsReady) + return; + this._requests.Add((TilePaintSystemV2.ARenderTargetHolder) renderTargetHolder); + } + + public void RequestTreeBranch( + ref TilePaintSystemV2.TreeFoliageVariantKey lookupKey) + { + TilePaintSystemV2.TreeBranchTargetHolder branchTargetHolder; + if (!this._treeBranchRenders.TryGetValue(lookupKey, out branchTargetHolder)) + { + branchTargetHolder = new TilePaintSystemV2.TreeBranchTargetHolder() + { + Key = lookupKey + }; + this._treeBranchRenders.Add(lookupKey, branchTargetHolder); + } + if (branchTargetHolder.IsReady) + return; + this._requests.Add((TilePaintSystemV2.ARenderTargetHolder) branchTargetHolder); + } + + public Texture2D TryGetTileAndRequestIfNotReady( + int tileType, + int tileStyle, + int paintColor) + { + TilePaintSystemV2.TileVariationkey lookupKey = new TilePaintSystemV2.TileVariationkey() + { + TileType = tileType, + TileStyle = tileStyle, + PaintColor = paintColor + }; + TilePaintSystemV2.TileRenderTargetHolder renderTargetHolder; + if (this._tilesRenders.TryGetValue(lookupKey, out renderTargetHolder) && renderTargetHolder.IsReady) + return (Texture2D) renderTargetHolder.Target; + this.RequestTile(ref lookupKey); + return (Texture2D) null; + } + + public Texture2D TryGetWallAndRequestIfNotReady(int wallType, int paintColor) + { + TilePaintSystemV2.WallVariationKey lookupKey = new TilePaintSystemV2.WallVariationKey() + { + WallType = wallType, + PaintColor = paintColor + }; + TilePaintSystemV2.WallRenderTargetHolder renderTargetHolder; + if (this._wallsRenders.TryGetValue(lookupKey, out renderTargetHolder) && renderTargetHolder.IsReady) + return (Texture2D) renderTargetHolder.Target; + this.RequestWall(ref lookupKey); + return (Texture2D) null; + } + + public Texture2D TryGetTreeTopAndRequestIfNotReady( + int treeTopIndex, + int treeTopStyle, + int paintColor) + { + TilePaintSystemV2.TreeFoliageVariantKey lookupKey = new TilePaintSystemV2.TreeFoliageVariantKey() + { + TextureIndex = treeTopIndex, + TextureStyle = treeTopStyle, + PaintColor = paintColor + }; + TilePaintSystemV2.TreeTopRenderTargetHolder renderTargetHolder; + if (this._treeTopRenders.TryGetValue(lookupKey, out renderTargetHolder) && renderTargetHolder.IsReady) + return (Texture2D) renderTargetHolder.Target; + this.RequestTreeTop(ref lookupKey); + return (Texture2D) null; + } + + public Texture2D TryGetTreeBranchAndRequestIfNotReady( + int treeTopIndex, + int treeTopStyle, + int paintColor) + { + TilePaintSystemV2.TreeFoliageVariantKey lookupKey = new TilePaintSystemV2.TreeFoliageVariantKey() + { + TextureIndex = treeTopIndex, + TextureStyle = treeTopStyle, + PaintColor = paintColor + }; + TilePaintSystemV2.TreeBranchTargetHolder branchTargetHolder; + if (this._treeBranchRenders.TryGetValue(lookupKey, out branchTargetHolder) && branchTargetHolder.IsReady) + return (Texture2D) branchTargetHolder.Target; + this.RequestTreeBranch(ref lookupKey); + return (Texture2D) null; + } + + public void PrepareAllRequests() + { + if (this._requests.Count == 0) + return; + for (int index = 0; index < this._requests.Count; ++index) + this._requests[index].Prepare(); + this._requests.Clear(); + } + + public abstract class ARenderTargetHolder + { + public RenderTarget2D Target; + protected bool _wasPrepared; + + public bool IsReady => this._wasPrepared; + + public abstract void Prepare(); + + public abstract void PrepareShader(); + + public void Clear() + { + if (this.Target == null || this.Target.IsDisposed) + return; + this.Target.Dispose(); + } + + protected void PrepareTextureIfNecessary(Texture2D originalTexture, Rectangle? sourceRect = null) + { + if (this.Target != null && !this.Target.IsContentLost) + return; + Main instance = Main.instance; + if (!sourceRect.HasValue) + sourceRect = new Rectangle?(originalTexture.Frame()); + this.Target = new RenderTarget2D(instance.GraphicsDevice, sourceRect.Value.Width, sourceRect.Value.Height, false, instance.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.None, 0, RenderTargetUsage.PreserveContents); + this.Target.ContentLost += new EventHandler(this.Target_ContentLost); + this.Target.Disposing += new EventHandler(this.Target_Disposing); + instance.GraphicsDevice.SetRenderTarget(this.Target); + instance.GraphicsDevice.Clear(Color.Transparent); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend); + this.PrepareShader(); + Rectangle destinationRectangle = sourceRect.Value; + destinationRectangle.X = 0; + destinationRectangle.Y = 0; + Main.spriteBatch.Draw(originalTexture, destinationRectangle, Color.White); + Main.spriteBatch.End(); + instance.GraphicsDevice.SetRenderTarget((RenderTarget2D) null); + this._wasPrepared = true; + } + + private void Target_Disposing(object sender, EventArgs e) + { + this._wasPrepared = false; + this.Target = (RenderTarget2D) null; + } + + private void Target_ContentLost(object sender, EventArgs e) => this._wasPrepared = false; + + protected void PrepareShader(int paintColor, TreePaintingSettings settings) + { + Effect tileShader = Main.tileShader; + tileShader.Parameters["leafHueTestOffset"].SetValue(settings.HueTestOffset); + tileShader.Parameters["leafMinHue"].SetValue(settings.SpecialGroupMinimalHueValue); + tileShader.Parameters["leafMaxHue"].SetValue(settings.SpecialGroupMaximumHueValue); + tileShader.Parameters["leafMinSat"].SetValue(settings.SpecialGroupMinimumSaturationValue); + tileShader.Parameters["leafMaxSat"].SetValue(settings.SpecialGroupMaximumSaturationValue); + tileShader.Parameters["invertSpecialGroupResult"].SetValue(settings.InvertSpecialGroupResult); + tileShader.CurrentTechnique.Passes[Main.ConvertPaintIdToTileShaderIndex(paintColor, settings.UseSpecialGroups, settings.UseWallShaderHacks)].Apply(); + } + } + + public class TreeTopRenderTargetHolder : TilePaintSystemV2.ARenderTargetHolder + { + public TilePaintSystemV2.TreeFoliageVariantKey Key; + + public override void Prepare() => this.PrepareTextureIfNecessary(Main.Assets.Request(TextureAssets.TreeTop[this.Key.TextureIndex].Name, (AssetRequestMode) 1).Value); + + public override void PrepareShader() => this.PrepareShader(this.Key.PaintColor, TreePaintSystemData.GetTreeFoliageSettings(this.Key.TextureIndex, this.Key.TextureStyle)); + } + + public class TreeBranchTargetHolder : TilePaintSystemV2.ARenderTargetHolder + { + public TilePaintSystemV2.TreeFoliageVariantKey Key; + + public override void Prepare() => this.PrepareTextureIfNecessary(Main.Assets.Request(TextureAssets.TreeBranch[this.Key.TextureIndex].Name, (AssetRequestMode) 1).Value); + + public override void PrepareShader() => this.PrepareShader(this.Key.PaintColor, TreePaintSystemData.GetTreeFoliageSettings(this.Key.TextureIndex, this.Key.TextureStyle)); + } + + public class TileRenderTargetHolder : TilePaintSystemV2.ARenderTargetHolder + { + public TilePaintSystemV2.TileVariationkey Key; + + public override void Prepare() => this.PrepareTextureIfNecessary(Main.Assets.Request(TextureAssets.Tile[this.Key.TileType].Name, (AssetRequestMode) 1).Value); + + public override void PrepareShader() => this.PrepareShader(this.Key.PaintColor, TreePaintSystemData.GetTileSettings(this.Key.TileType, this.Key.TileStyle)); + } + + public class WallRenderTargetHolder : TilePaintSystemV2.ARenderTargetHolder + { + public TilePaintSystemV2.WallVariationKey Key; + + public override void Prepare() => this.PrepareTextureIfNecessary(Main.Assets.Request(TextureAssets.Wall[this.Key.WallType].Name, (AssetRequestMode) 1).Value); + + public override void PrepareShader() => this.PrepareShader(this.Key.PaintColor, TreePaintSystemData.GetWallSettings(this.Key.WallType)); + } + + public struct TileVariationkey + { + public int TileType; + public int TileStyle; + public int PaintColor; + + public bool Equals(TilePaintSystemV2.TileVariationkey other) => this.TileType == other.TileType && this.TileStyle == other.TileStyle && this.PaintColor == other.PaintColor; + + public override bool Equals(object obj) => obj is TilePaintSystemV2.TileVariationkey other && this.Equals(other); + + public override int GetHashCode() => (this.TileType * 397 ^ this.TileStyle) * 397 ^ this.PaintColor; + + public static bool operator ==( + TilePaintSystemV2.TileVariationkey left, + TilePaintSystemV2.TileVariationkey right) + { + return left.Equals(right); + } + + public static bool operator !=( + TilePaintSystemV2.TileVariationkey left, + TilePaintSystemV2.TileVariationkey right) + { + return !left.Equals(right); + } + } + + public struct WallVariationKey + { + public int WallType; + public int PaintColor; + + public bool Equals(TilePaintSystemV2.WallVariationKey other) => this.WallType == other.WallType && this.PaintColor == other.PaintColor; + + public override bool Equals(object obj) => obj is TilePaintSystemV2.WallVariationKey other && this.Equals(other); + + public override int GetHashCode() => this.WallType * 397 ^ this.PaintColor; + + public static bool operator ==( + TilePaintSystemV2.WallVariationKey left, + TilePaintSystemV2.WallVariationKey right) + { + return left.Equals(right); + } + + public static bool operator !=( + TilePaintSystemV2.WallVariationKey left, + TilePaintSystemV2.WallVariationKey right) + { + return !left.Equals(right); + } + } + + public struct TreeFoliageVariantKey + { + public int TextureIndex; + public int TextureStyle; + public int PaintColor; + + public bool Equals(TilePaintSystemV2.TreeFoliageVariantKey other) => this.TextureIndex == other.TextureIndex && this.TextureStyle == other.TextureStyle && this.PaintColor == other.PaintColor; + + public override bool Equals(object obj) => obj is TilePaintSystemV2.TreeFoliageVariantKey other && this.Equals(other); + + public override int GetHashCode() => (this.TextureIndex * 397 ^ this.TextureStyle) * 397 ^ this.PaintColor; + + public static bool operator ==( + TilePaintSystemV2.TreeFoliageVariantKey left, + TilePaintSystemV2.TreeFoliageVariantKey right) + { + return left.Equals(right); + } + + public static bool operator !=( + TilePaintSystemV2.TreeFoliageVariantKey left, + TilePaintSystemV2.TreeFoliageVariantKey right) + { + return !left.Equals(right); + } + } + } +} diff --git a/GameContent/Tile_Entities/DisplayDollSlot.cs b/GameContent/Tile_Entities/DisplayDollSlot.cs new file mode 100644 index 0000000..a8ed103 --- /dev/null +++ b/GameContent/Tile_Entities/DisplayDollSlot.cs @@ -0,0 +1,21 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Tile_Entities.DisplayDollSlot +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Tile_Entities +{ + public static class DisplayDollSlot + { + public const int Armor_Head = 0; + public const int Armor_Shirt = 1; + public const int Armor_Legs = 2; + public const int Acc_1 = 3; + public const int Acc_2 = 4; + public const int Acc_3 = 5; + public const int Acc_4 = 6; + public const int Acc_5 = 7; + public const int Count = 8; + } +} diff --git a/GameContent/Tile_Entities/HatRackSlot.cs b/GameContent/Tile_Entities/HatRackSlot.cs new file mode 100644 index 0000000..932375e --- /dev/null +++ b/GameContent/Tile_Entities/HatRackSlot.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Tile_Entities.HatRackSlot +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.Tile_Entities +{ + public static class HatRackSlot + { + public const int LeftHat = 0; + public const int RightHat = 1; + public const int Count = 2; + } +} diff --git a/GameContent/Tile_Entities/TEDisplayDoll.cs b/GameContent/Tile_Entities/TEDisplayDoll.cs new file mode 100644 index 0000000..43c4e17 --- /dev/null +++ b/GameContent/Tile_Entities/TEDisplayDoll.cs @@ -0,0 +1,510 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Tile_Entities.TEDisplayDoll +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.IO; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.GameInput; +using Terraria.UI; + +namespace Terraria.GameContent.Tile_Entities +{ + public class TEDisplayDoll : TileEntity + { + private static byte _myEntityID; + private const int MyTileID = 470; + private const int entityTileWidth = 2; + private const int entityTileHeight = 3; + private Player _dollPlayer; + private Item[] _items; + private Item[] _dyes; + private static int accessoryTargetSlot = 3; + + public TEDisplayDoll() + { + this._items = new Item[8]; + for (int index = 0; index < this._items.Length; ++index) + this._items[index] = new Item(); + this._dyes = new Item[8]; + for (int index = 0; index < this._dyes.Length; ++index) + this._dyes[index] = new Item(); + this._dollPlayer = new Player(); + this._dollPlayer.hair = 15; + this._dollPlayer.skinColor = Color.White; + this._dollPlayer.skinVariant = 10; + } + + public override void RegisterTileEntityID(int assignedID) => TEDisplayDoll._myEntityID = (byte) assignedID; + + public override TileEntity GenerateInstance() => (TileEntity) new TEDisplayDoll(); + + public override void NetPlaceEntityAttempt(int x, int y) => NetMessage.SendData(86, number: TEDisplayDoll.Place(x, y), number2: ((float) x), number3: ((float) y)); + + public static int Place(int x, int y) + { + TEDisplayDoll teDisplayDoll = new TEDisplayDoll(); + teDisplayDoll.Position = new Point16(x, y); + teDisplayDoll.ID = TileEntity.AssignNewID(); + teDisplayDoll.type = TEDisplayDoll._myEntityID; + TileEntity.ByID[teDisplayDoll.ID] = (TileEntity) teDisplayDoll; + TileEntity.ByPosition[teDisplayDoll.Position] = (TileEntity) teDisplayDoll; + return teDisplayDoll.ID; + } + + public static int Hook_AfterPlacement( + int x, + int y, + int type = 470, + int style = 0, + int direction = 1, + int alternate = 0) + { + if (Main.netMode != 1) + return TEDisplayDoll.Place(x, y - 2); + NetMessage.SendTileSquare(Main.myPlayer, x, y - 1, 3); + NetMessage.SendData(87, number: x, number2: ((float) (y - 2)), number3: ((float) TEDisplayDoll._myEntityID)); + return -1; + } + + public static void Kill(int x, int y) + { + TileEntity tileEntity; + if (!TileEntity.ByPosition.TryGetValue(new Point16(x, y), out tileEntity) || (int) tileEntity.type != (int) TEDisplayDoll._myEntityID) + return; + TileEntity.ByID.Remove(tileEntity.ID); + TileEntity.ByPosition.Remove(new Point16(x, y)); + } + + public static int Find(int x, int y) + { + TileEntity tileEntity; + return TileEntity.ByPosition.TryGetValue(new Point16(x, y), out tileEntity) && (int) tileEntity.type == (int) TEDisplayDoll._myEntityID ? tileEntity.ID : -1; + } + + public override void WriteExtraData(BinaryWriter writer, bool networkSend) + { + BitsByte bitsByte1 = (BitsByte) (byte) 0; + bitsByte1[0] = !this._items[0].IsAir; + bitsByte1[1] = !this._items[1].IsAir; + bitsByte1[2] = !this._items[2].IsAir; + bitsByte1[3] = !this._items[3].IsAir; + bitsByte1[4] = !this._items[4].IsAir; + bitsByte1[5] = !this._items[5].IsAir; + bitsByte1[6] = !this._items[6].IsAir; + bitsByte1[7] = !this._items[7].IsAir; + BitsByte bitsByte2 = (BitsByte) (byte) 0; + bitsByte2[0] = !this._dyes[0].IsAir; + bitsByte2[1] = !this._dyes[1].IsAir; + bitsByte2[2] = !this._dyes[2].IsAir; + bitsByte2[3] = !this._dyes[3].IsAir; + bitsByte2[4] = !this._dyes[4].IsAir; + bitsByte2[5] = !this._dyes[5].IsAir; + bitsByte2[6] = !this._dyes[6].IsAir; + bitsByte2[7] = !this._dyes[7].IsAir; + writer.Write((byte) bitsByte1); + writer.Write((byte) bitsByte2); + for (int index = 0; index < 8; ++index) + { + Item obj = this._items[index]; + if (!obj.IsAir) + { + writer.Write((short) obj.netID); + writer.Write(obj.prefix); + writer.Write((short) obj.stack); + } + } + for (int index = 0; index < 8; ++index) + { + Item dye = this._dyes[index]; + if (!dye.IsAir) + { + writer.Write((short) dye.netID); + writer.Write(dye.prefix); + writer.Write((short) dye.stack); + } + } + } + + public override void ReadExtraData(BinaryReader reader, bool networkSend) + { + BitsByte bitsByte1 = (BitsByte) reader.ReadByte(); + BitsByte bitsByte2 = (BitsByte) reader.ReadByte(); + for (int key = 0; key < 8; ++key) + { + this._items[key] = new Item(); + Item obj = this._items[key]; + if (bitsByte1[key]) + { + obj.netDefaults((int) reader.ReadInt16()); + obj.Prefix((int) reader.ReadByte()); + obj.stack = (int) reader.ReadInt16(); + } + } + for (int key = 0; key < 8; ++key) + { + this._dyes[key] = new Item(); + Item dye = this._dyes[key]; + if (bitsByte2[key]) + { + dye.netDefaults((int) reader.ReadInt16()); + dye.Prefix((int) reader.ReadByte()); + dye.stack = (int) reader.ReadInt16(); + } + } + } + + public override string ToString() => this.Position.X.ToString() + "x " + (object) this.Position.Y + "y item: " + (object) this._items[0] + " " + (object) this._items[1] + " " + (object) this._items[2]; + + public static void Framing_CheckTile(int callX, int callY) + { + if (WorldGen.destroyObject) + return; + int num1 = callX; + int num2 = callY; + Tile tileSafely = Framing.GetTileSafely(callX, callY); + int num3 = num1 - (int) tileSafely.frameX / 18 % 2; + int y = num2 - (int) tileSafely.frameY / 18 % 3; + bool flag = false; + for (int index1 = num3; index1 < num3 + 2; ++index1) + { + for (int index2 = y; index2 < y + 3; ++index2) + { + Tile tile = Main.tile[index1, index2]; + if (!tile.active() || tile.type != (ushort) 470) + flag = true; + } + } + if (!WorldGen.SolidTileAllowBottomSlope(num3, y + 3) || !WorldGen.SolidTileAllowBottomSlope(num3 + 1, y + 3)) + flag = true; + if (!flag) + return; + TEDisplayDoll.Kill(num3, y); + if ((int) Main.tile[callX, callY].frameX / 72 != 1) + Item.NewItem(num3 * 16, y * 16, 32, 48, 498); + else + Item.NewItem(num3 * 16, y * 16, 32, 48, 1989); + WorldGen.destroyObject = true; + for (int i = num3; i < num3 + 2; ++i) + { + for (int j = y; j < y + 3; ++j) + { + if (Main.tile[i, j].active() && Main.tile[i, j].type == (ushort) 470) + WorldGen.KillTile(i, j); + } + } + WorldGen.destroyObject = false; + } + + public void Draw(int tileLeftX, int tileTopY) + { + Player dollPlayer = this._dollPlayer; + for (int index = 0; index < 8; ++index) + { + dollPlayer.armor[index] = this._items[index]; + dollPlayer.dye[index] = this._dyes[index]; + } + dollPlayer.direction = -1; + dollPlayer.Male = true; + Tile tileSafely = Framing.GetTileSafely(tileLeftX, tileTopY); + if ((int) tileSafely.frameX % 72 == 36) + dollPlayer.direction = 1; + if ((int) tileSafely.frameX / 72 == 1) + dollPlayer.Male = false; + dollPlayer.isDisplayDollOrInanimate = true; + dollPlayer.ResetEffects(); + dollPlayer.ResetVisibleAccessories(); + dollPlayer.UpdateDyes(); + dollPlayer.DisplayDollUpdate(); + dollPlayer.UpdateSocialShadow(); + dollPlayer.PlayerFrame(); + Vector2 vector2 = new Vector2((float) (tileLeftX + 1), (float) (tileTopY + 3)) * 16f + new Vector2((float) (-dollPlayer.width / 2), (float) (-dollPlayer.height - 6)); + dollPlayer.position = vector2; + dollPlayer.skinDyePacked = PlayerDrawHelper.PackShader((int) tileSafely.color(), PlayerDrawHelper.ShaderConfiguration.TilePaintID); + Main.PlayerRenderer.DrawPlayer(Main.Camera, dollPlayer, dollPlayer.position, 0.0f, dollPlayer.fullRotationOrigin); + } + + public override void OnPlayerUpdate(Player player) + { + if (player.InInteractionRange(player.tileEntityAnchor.X, player.tileEntityAnchor.Y) && player.chest == -1 && player.talkNPC == -1) + return; + if (player.chest == -1 && player.talkNPC == -1) + SoundEngine.PlaySound(11); + player.tileEntityAnchor.Clear(); + Recipe.FindRecipes(); + } + + public static void OnPlayerInteraction(Player player, int clickX, int clickY) + { + int x = clickX; + int index = clickY; + if ((int) Main.tile[x, index].frameX % 36 != 0) + --x; + int y1 = index - (int) Main.tile[x, index].frameY / 18; + int id = TEDisplayDoll.Find(x, y1); + if (id == -1) + return; + int y2 = y1 + 1; + TEDisplayDoll.accessoryTargetSlot = 3; + TileEntity.BasicOpenCloseInteraction(player, x, y2, id); + } + + public override void OnInventoryDraw(Player player, SpriteBatch spriteBatch) + { + if (Main.tile[player.tileEntityAnchor.X, player.tileEntityAnchor.Y].type != (ushort) 470) + { + player.tileEntityAnchor.Clear(); + Recipe.FindRecipes(); + } + else + this.DrawInner(player, spriteBatch); + } + + public override bool TryGetItemGamepadOverrideInstructions( + Item[] inv, + int context, + int slot, + out string instruction) + { + instruction = ""; + Item newItem = inv[slot]; + if (newItem.IsAir || newItem.favorited) + return false; + switch (context) + { + case 0: + if (TEDisplayDoll.FitsDisplayDoll(newItem)) + { + instruction = Lang.misc[76].Value; + return true; + } + break; + case 23: + case 24: + case 25: + if (Main.player[Main.myPlayer].ItemSpace(newItem).CanTakeItemToPersonalInventory) + { + instruction = Lang.misc[68].Value; + return true; + } + break; + } + return false; + } + + public override string GetItemGamepadInstructions(int slot = 0) + { + Item[] inv = this._items; + int slot1 = slot; + int context = 23; + if (slot >= 8) + { + slot1 -= 8; + inv = this._dyes; + context = 25; + } + else if (slot >= 3) + { + inv = this._items; + context = 24; + } + return ItemSlot.GetGamepadInstructions(inv, context, slot1); + } + + private void DrawInner(Player player, SpriteBatch spriteBatch) + { + Main.inventoryScale = 0.72f; + this.DrawSlotPairSet(player, spriteBatch, 3, 0, 0.0f, 0.5f, 23); + this.DrawSlotPairSet(player, spriteBatch, 5, 3, 3f, 0.5f, 24); + } + + private void DrawSlotPairSet( + Player player, + SpriteBatch spriteBatch, + int slotsToShowLine, + int slotsArrayOffset, + float offsetX, + float offsetY, + int inventoryContextTarget) + { + Item[] items = this._items; + for (int index1 = 0; index1 < slotsToShowLine; ++index1) + { + for (int index2 = 0; index2 < 2; ++index2) + { + int num1 = (int) (73.0 + ((double) index1 + (double) offsetX) * 56.0 * (double) Main.inventoryScale); + int num2 = (int) ((double) Main.instance.invBottom + ((double) index2 + (double) offsetY) * 56.0 * (double) Main.inventoryScale); + Item[] inv; + int context; + if (index2 == 0) + { + inv = this._items; + context = inventoryContextTarget; + } + else + { + inv = this._dyes; + context = 25; + } + if (Utils.FloatIntersect((float) Main.mouseX, (float) Main.mouseY, 0.0f, 0.0f, (float) num1, (float) num2, (float) TextureAssets.InventoryBack.Width() * Main.inventoryScale, (float) TextureAssets.InventoryBack.Height() * Main.inventoryScale) && !PlayerInput.IgnoreMouseInterface) + { + player.mouseInterface = true; + ItemSlot.Handle(inv, context, index1 + slotsArrayOffset); + } + ItemSlot.Draw(spriteBatch, inv, context, index1 + slotsArrayOffset, new Vector2((float) num1, (float) num2)); + } + } + } + + public override bool OverrideItemSlotHover(Item[] inv, int context = 0, int slot = 0) + { + Item obj = inv[slot]; + if (!obj.IsAir && !inv[slot].favorited && context == 0 && TEDisplayDoll.FitsDisplayDoll(obj)) + { + Main.cursorOverride = 9; + return true; + } + if (obj.IsAir || context != 23 && context != 24 && context != 25 || !Main.player[Main.myPlayer].ItemSpace(inv[slot]).CanTakeItemToPersonalInventory) + return false; + Main.cursorOverride = 8; + return true; + } + + public override bool OverrideItemSlotLeftClick(Item[] inv, int context = 0, int slot = 0) + { + if (!ItemSlot.ShiftInUse) + return false; + if (Main.cursorOverride == 9 && context == 0) + { + Item obj = inv[slot]; + if (!obj.IsAir && !obj.favorited && TEDisplayDoll.FitsDisplayDoll(obj)) + return this.TryFitting(inv, context, slot); + } + if ((Main.cursorOverride != 8 || context != 23) && context != 24 && context != 25) + return false; + inv[slot] = Main.player[Main.myPlayer].GetItem(Main.myPlayer, inv[slot], GetItemSettings.InventoryEntityToPlayerInventorySettings); + if (Main.netMode == 1) + { + if (context == 25) + NetMessage.SendData(121, number: Main.myPlayer, number2: ((float) this.ID), number3: ((float) slot), number4: 1f); + else + NetMessage.SendData(121, number: Main.myPlayer, number2: ((float) this.ID), number3: ((float) slot)); + } + return true; + } + + public static bool FitsDisplayDoll(Item item) + { + if (item.maxStack > 1) + return false; + return item.headSlot > 0 || item.bodySlot > 0 || item.legSlot > 0 || item.accessory; + } + + private bool TryFitting(Item[] inv, int context = 0, int slot = 0, bool justCheck = false) + { + Item obj = inv[slot]; + int index1 = -1; + if (obj.headSlot > 0) + index1 = 0; + if (obj.bodySlot > 0) + index1 = 1; + if (obj.legSlot > 0) + index1 = 2; + if (obj.accessory) + index1 = TEDisplayDoll.accessoryTargetSlot; + if (index1 == -1) + return false; + if (justCheck) + return true; + if (obj.accessory) + { + ++TEDisplayDoll.accessoryTargetSlot; + if (TEDisplayDoll.accessoryTargetSlot >= 8) + TEDisplayDoll.accessoryTargetSlot = 3; + for (int index2 = 3; index2 < 8; ++index2) + { + if (this._items[index2].IsAir) + { + index1 = index2; + TEDisplayDoll.accessoryTargetSlot = index2; + break; + } + } + for (int index3 = 3; index3 < 8; ++index3) + { + if (inv[slot].type == this._items[index3].type) + index1 = index3; + } + } + SoundEngine.PlaySound(7); + Utils.Swap(ref this._items[index1], ref inv[slot]); + if (Main.netMode == 1) + NetMessage.SendData(121, number: Main.myPlayer, number2: ((float) this.ID), number3: ((float) index1)); + return true; + } + + public void WriteItem(int itemIndex, BinaryWriter writer, bool dye) + { + Item dye1 = this._items[itemIndex]; + if (dye) + dye1 = this._dyes[itemIndex]; + writer.Write((ushort) dye1.netID); + writer.Write((ushort) dye1.stack); + writer.Write(dye1.prefix); + } + + public void ReadItem(int itemIndex, BinaryReader reader, bool dye) + { + int Type = (int) reader.ReadUInt16(); + int num = (int) reader.ReadUInt16(); + int pre = (int) reader.ReadByte(); + Item dye1 = this._items[itemIndex]; + if (dye) + dye1 = this._dyes[itemIndex]; + dye1.SetDefaults(Type); + dye1.stack = num; + dye1.Prefix(pre); + } + + public override bool IsTileValidForEntity(int x, int y) => Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 470 && Main.tile[x, y].frameY == (short) 0 && (int) Main.tile[x, y].frameX % 36 == 0; + + public void SetInventoryFromMannequin(int headFrame, int shirtFrame, int legFrame) + { + headFrame /= 100; + shirtFrame /= 100; + legFrame /= 100; + if (headFrame >= 0 && headFrame < Item.headType.Length) + this._items[0].SetDefaults(Item.headType[headFrame]); + if (shirtFrame >= 0 && shirtFrame < Item.bodyType.Length) + this._items[1].SetDefaults(Item.bodyType[shirtFrame]); + if (legFrame < 0 || legFrame >= Item.legType.Length) + return; + this._items[2].SetDefaults(Item.legType[legFrame]); + } + + public static bool IsBreakable(int clickX, int clickY) + { + int x = clickX; + int index = clickY; + if ((int) Main.tile[x, index].frameX % 36 != 0) + --x; + int y = index - (int) Main.tile[x, index].frameY / 18; + int key = TEDisplayDoll.Find(x, y); + return key == -1 || !(TileEntity.ByID[key] as TEDisplayDoll).ContainsItems(); + } + + public bool ContainsItems() + { + for (int index = 0; index < 8; ++index) + { + if (!this._items[index].IsAir || !this._dyes[index].IsAir) + return true; + } + return false; + } + } +} diff --git a/GameContent/Tile_Entities/TEFoodPlatter.cs b/GameContent/Tile_Entities/TEFoodPlatter.cs new file mode 100644 index 0000000..3c81f5f --- /dev/null +++ b/GameContent/Tile_Entities/TEFoodPlatter.cs @@ -0,0 +1,175 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Tile_Entities.TEFoodPlatter +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; +using Terraria.DataStructures; +using Terraria.ID; + +namespace Terraria.GameContent.Tile_Entities +{ + public class TEFoodPlatter : TileEntity + { + private static byte _myEntityID; + public Item item; + + public override void RegisterTileEntityID(int assignedID) => TEFoodPlatter._myEntityID = (byte) assignedID; + + public override void NetPlaceEntityAttempt(int x, int y) => TEFoodPlatter.NetPlaceEntity(x, y); + + public static void NetPlaceEntity(int x, int y) => NetMessage.SendData(86, number: TEFoodPlatter.Place(x, y), number2: ((float) x), number3: ((float) y)); + + public override TileEntity GenerateInstance() => (TileEntity) new TEFoodPlatter(); + + public TEFoodPlatter() => this.item = new Item(); + + public static int Place(int x, int y) + { + TEFoodPlatter teFoodPlatter = new TEFoodPlatter(); + teFoodPlatter.Position = new Point16(x, y); + teFoodPlatter.ID = TileEntity.AssignNewID(); + teFoodPlatter.type = TEFoodPlatter._myEntityID; + TileEntity.ByID[teFoodPlatter.ID] = (TileEntity) teFoodPlatter; + TileEntity.ByPosition[teFoodPlatter.Position] = (TileEntity) teFoodPlatter; + return teFoodPlatter.ID; + } + + public override bool IsTileValidForEntity(int x, int y) => TEFoodPlatter.ValidTile(x, y); + + public static int Hook_AfterPlacement( + int x, + int y, + int type = 520, + int style = 0, + int direction = 1, + int alternate = 0) + { + if (Main.netMode != 1) + return TEFoodPlatter.Place(x, y); + NetMessage.SendTileSquare(Main.myPlayer, x, y, 1); + NetMessage.SendData(87, number: x, number2: ((float) y), number3: ((float) TEFoodPlatter._myEntityID)); + return -1; + } + + public static void Kill(int x, int y) + { + TileEntity tileEntity; + if (!TileEntity.ByPosition.TryGetValue(new Point16(x, y), out tileEntity) || (int) tileEntity.type != (int) TEFoodPlatter._myEntityID) + return; + TileEntity.ByID.Remove(tileEntity.ID); + TileEntity.ByPosition.Remove(new Point16(x, y)); + } + + public static int Find(int x, int y) + { + TileEntity tileEntity; + return TileEntity.ByPosition.TryGetValue(new Point16(x, y), out tileEntity) && (int) tileEntity.type == (int) TEFoodPlatter._myEntityID ? tileEntity.ID : -1; + } + + public static bool ValidTile(int x, int y) => Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 520 && Main.tile[x, y].frameY == (short) 0; + + public override void WriteExtraData(BinaryWriter writer, bool networkSend) + { + writer.Write((short) this.item.netID); + writer.Write(this.item.prefix); + writer.Write((short) this.item.stack); + } + + public override void ReadExtraData(BinaryReader reader, bool networkSend) + { + this.item = new Item(); + this.item.netDefaults((int) reader.ReadInt16()); + this.item.Prefix((int) reader.ReadByte()); + this.item.stack = (int) reader.ReadInt16(); + } + + public override string ToString() => this.Position.X.ToString() + "x " + (object) this.Position.Y + "y item: " + (object) this.item; + + public void DropItem() + { + if (Main.netMode != 1) + Item.NewItem((int) this.Position.X * 16, (int) this.Position.Y * 16, 16, 16, this.item.netID, pfix: ((int) this.item.prefix)); + this.item = new Item(); + } + + public static void TryPlacing(int x, int y, int netid, int prefix, int stack) + { + WorldGen.RangeFrame(x, y, x + 1, y + 1); + int key = TEFoodPlatter.Find(x, y); + if (key == -1) + { + int number = Item.NewItem(x * 16, y * 16, 16, 16, 1); + Main.item[number].netDefaults(netid); + Main.item[number].Prefix(prefix); + Main.item[number].stack = stack; + NetMessage.SendData(21, number: number); + } + else + { + TEFoodPlatter teFoodPlatter = (TEFoodPlatter) TileEntity.ByID[key]; + if (teFoodPlatter.item.stack > 0) + teFoodPlatter.DropItem(); + teFoodPlatter.item = new Item(); + teFoodPlatter.item.netDefaults(netid); + teFoodPlatter.item.Prefix(prefix); + teFoodPlatter.item.stack = stack; + NetMessage.SendData(86, number: teFoodPlatter.ID, number2: ((float) x), number3: ((float) y)); + } + } + + public static void OnPlayerInteraction(Player player, int clickX, int clickY) + { + if (TEFoodPlatter.FitsFoodPlatter(player.inventory[player.selectedItem]) && !player.inventory[player.selectedItem].favorited) + { + player.GamepadEnableGrappleCooldown(); + TEFoodPlatter.PlaceItemInFrame(player, clickX, clickY); + Recipe.FindRecipes(); + } + else + { + int x = clickX; + int y = clickY; + int key = TEFoodPlatter.Find(x, y); + if (key == -1 || ((TEFoodPlatter) TileEntity.ByID[key]).item.stack <= 0) + return; + player.GamepadEnableGrappleCooldown(); + WorldGen.KillTile(clickX, clickY, true); + if (Main.netMode != 1) + return; + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y), number4: 1f); + } + } + + public static bool FitsFoodPlatter(Item i) => i.stack > 0 && ItemID.Sets.IsFood[i.type]; + + public static void PlaceItemInFrame(Player player, int x, int y) + { + int key = TEFoodPlatter.Find(x, y); + if (key == -1) + return; + if (((TEFoodPlatter) TileEntity.ByID[key]).item.stack > 0) + { + WorldGen.KillTile(x, y, true); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) Player.tileTargetX), number3: ((float) y), number4: 1f); + } + if (Main.netMode == 1) + NetMessage.SendData(133, number: x, number2: ((float) y), number3: ((float) player.selectedItem), number4: ((float) player.whoAmI), number5: 1); + else + TEFoodPlatter.TryPlacing(x, y, player.inventory[player.selectedItem].netID, (int) player.inventory[player.selectedItem].prefix, 1); + --player.inventory[player.selectedItem].stack; + if (player.inventory[player.selectedItem].stack <= 0) + { + player.inventory[player.selectedItem].SetDefaults(); + Main.mouseItem.SetDefaults(); + } + if (player.selectedItem == 58) + Main.mouseItem = player.inventory[player.selectedItem].Clone(); + player.releaseUseItem = false; + player.mouseInterface = true; + WorldGen.RangeFrame(x, y, x + 1, y + 1); + } + } +} diff --git a/GameContent/Tile_Entities/TEHatRack.cs b/GameContent/Tile_Entities/TEHatRack.cs new file mode 100644 index 0000000..c30e7dc --- /dev/null +++ b/GameContent/Tile_Entities/TEHatRack.cs @@ -0,0 +1,457 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Tile_Entities.TEHatRack +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.IO; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.GameInput; +using Terraria.UI; + +namespace Terraria.GameContent.Tile_Entities +{ + public class TEHatRack : TileEntity + { + private static byte _myEntityID; + private const int MyTileID = 475; + private const int entityTileWidth = 3; + private const int entityTileHeight = 4; + private Player _dollPlayer; + private Item[] _items; + private Item[] _dyes; + private static int hatTargetSlot; + + public TEHatRack() + { + this._items = new Item[2]; + for (int index = 0; index < this._items.Length; ++index) + this._items[index] = new Item(); + this._dyes = new Item[2]; + for (int index = 0; index < this._dyes.Length; ++index) + this._dyes[index] = new Item(); + this._dollPlayer = new Player(); + this._dollPlayer.hair = 15; + this._dollPlayer.skinColor = Color.White; + this._dollPlayer.skinVariant = 10; + } + + public override void RegisterTileEntityID(int assignedID) => TEHatRack._myEntityID = (byte) assignedID; + + public override TileEntity GenerateInstance() => (TileEntity) new TEHatRack(); + + public override void NetPlaceEntityAttempt(int x, int y) => NetMessage.SendData(86, number: TEHatRack.Place(x, y), number2: ((float) x), number3: ((float) y)); + + public static int Place(int x, int y) + { + TEHatRack teHatRack = new TEHatRack(); + teHatRack.Position = new Point16(x, y); + teHatRack.ID = TileEntity.AssignNewID(); + teHatRack.type = TEHatRack._myEntityID; + TileEntity.ByID[teHatRack.ID] = (TileEntity) teHatRack; + TileEntity.ByPosition[teHatRack.Position] = (TileEntity) teHatRack; + return teHatRack.ID; + } + + public static int Hook_AfterPlacement( + int x, + int y, + int type = 475, + int style = 0, + int direction = 1, + int alternate = 0) + { + if (Main.netMode != 1) + return TEHatRack.Place(x - 1, y - 3); + NetMessage.SendTileSquare(Main.myPlayer, x, y - 1, 5); + NetMessage.SendData(87, number: (x - 1), number2: ((float) (y - 3)), number3: ((float) TEHatRack._myEntityID)); + return -1; + } + + public static void Kill(int x, int y) + { + TileEntity tileEntity; + if (!TileEntity.ByPosition.TryGetValue(new Point16(x, y), out tileEntity) || (int) tileEntity.type != (int) TEHatRack._myEntityID) + return; + TileEntity.ByID.Remove(tileEntity.ID); + TileEntity.ByPosition.Remove(new Point16(x, y)); + } + + public static int Find(int x, int y) + { + TileEntity tileEntity; + return TileEntity.ByPosition.TryGetValue(new Point16(x, y), out tileEntity) && (int) tileEntity.type == (int) TEHatRack._myEntityID ? tileEntity.ID : -1; + } + + public override void WriteExtraData(BinaryWriter writer, bool networkSend) + { + BitsByte bitsByte = (BitsByte) (byte) 0; + bitsByte[0] = !this._items[0].IsAir; + bitsByte[1] = !this._items[1].IsAir; + bitsByte[2] = !this._dyes[0].IsAir; + bitsByte[3] = !this._dyes[1].IsAir; + writer.Write((byte) bitsByte); + for (int index = 0; index < 2; ++index) + { + Item obj = this._items[index]; + if (!obj.IsAir) + { + writer.Write((short) obj.netID); + writer.Write(obj.prefix); + writer.Write((short) obj.stack); + } + } + for (int index = 0; index < 2; ++index) + { + Item dye = this._dyes[index]; + if (!dye.IsAir) + { + writer.Write((short) dye.netID); + writer.Write(dye.prefix); + writer.Write((short) dye.stack); + } + } + } + + public override void ReadExtraData(BinaryReader reader, bool networkSend) + { + BitsByte bitsByte = (BitsByte) reader.ReadByte(); + for (int key = 0; key < 2; ++key) + { + this._items[key] = new Item(); + Item obj = this._items[key]; + if (bitsByte[key]) + { + obj.netDefaults((int) reader.ReadInt16()); + obj.Prefix((int) reader.ReadByte()); + obj.stack = (int) reader.ReadInt16(); + } + } + for (int index = 0; index < 2; ++index) + { + this._dyes[index] = new Item(); + Item dye = this._dyes[index]; + if (bitsByte[index + 2]) + { + dye.netDefaults((int) reader.ReadInt16()); + dye.Prefix((int) reader.ReadByte()); + dye.stack = (int) reader.ReadInt16(); + } + } + } + + public override string ToString() => this.Position.X.ToString() + "x " + (object) this.Position.Y + "y item: " + (object) this._items[0] + " " + (object) this._items[1]; + + public static void Framing_CheckTile(int callX, int callY) + { + if (WorldGen.destroyObject) + return; + int num1 = callX; + int num2 = callY; + Tile tileSafely = Framing.GetTileSafely(callX, callY); + int num3 = num1 - (int) tileSafely.frameX / 18 % 3; + int y = num2 - (int) tileSafely.frameY / 18 % 4; + bool flag = false; + for (int index1 = num3; index1 < num3 + 3; ++index1) + { + for (int index2 = y; index2 < y + 4; ++index2) + { + Tile tile = Main.tile[index1, index2]; + if (!tile.active() || tile.type != (ushort) 475) + flag = true; + } + } + if (!WorldGen.SolidTileAllowBottomSlope(num3, y + 4) || !WorldGen.SolidTileAllowBottomSlope(num3 + 1, y + 4) || !WorldGen.SolidTileAllowBottomSlope(num3 + 2, y + 4)) + flag = true; + if (!flag) + return; + TEHatRack.Kill(num3, y); + Item.NewItem(num3 * 16, y * 16, 48, 64, 3977); + WorldGen.destroyObject = true; + for (int i = num3; i < num3 + 3; ++i) + { + for (int j = y; j < y + 4; ++j) + { + if (Main.tile[i, j].active() && Main.tile[i, j].type == (ushort) 475) + WorldGen.KillTile(i, j); + } + } + WorldGen.destroyObject = false; + } + + public void Draw(int tileLeftX, int tileTopY) + { + Player dollPlayer = this._dollPlayer; + dollPlayer.direction = -1; + dollPlayer.Male = true; + if ((int) Framing.GetTileSafely(tileLeftX, tileTopY).frameX % 216 == 54) + dollPlayer.direction = 1; + dollPlayer.isDisplayDollOrInanimate = true; + dollPlayer.isHatRackDoll = true; + dollPlayer.armor[0] = this._items[0]; + dollPlayer.dye[0] = this._dyes[0]; + dollPlayer.ResetEffects(); + dollPlayer.ResetVisibleAccessories(); + dollPlayer.invis = true; + dollPlayer.UpdateDyes(); + dollPlayer.DisplayDollUpdate(); + dollPlayer.PlayerFrame(); + Vector2 vector2_1 = new Vector2((float) tileLeftX + 1.5f, (float) (tileTopY + 4)) * 16f; + dollPlayer.direction *= -1; + Vector2 vector2_2 = new Vector2((float) (-dollPlayer.width / 2), (float) (-dollPlayer.height - 6)) + new Vector2((float) (dollPlayer.direction * 14), -2f); + dollPlayer.position = vector2_1 + vector2_2; + Main.PlayerRenderer.DrawPlayer(Main.Camera, dollPlayer, dollPlayer.position, 0.0f, dollPlayer.fullRotationOrigin); + dollPlayer.armor[0] = this._items[1]; + dollPlayer.dye[0] = this._dyes[1]; + dollPlayer.ResetEffects(); + dollPlayer.ResetVisibleAccessories(); + dollPlayer.invis = true; + dollPlayer.UpdateDyes(); + dollPlayer.DisplayDollUpdate(); + dollPlayer.skipAnimatingValuesInPlayerFrame = true; + dollPlayer.PlayerFrame(); + dollPlayer.skipAnimatingValuesInPlayerFrame = false; + dollPlayer.direction *= -1; + Vector2 vector2_3 = new Vector2((float) (-dollPlayer.width / 2), (float) (-dollPlayer.height - 6)) + new Vector2((float) (dollPlayer.direction * 12), 16f); + dollPlayer.position = vector2_1 + vector2_3; + Main.PlayerRenderer.DrawPlayer(Main.Camera, dollPlayer, dollPlayer.position, 0.0f, dollPlayer.fullRotationOrigin); + } + + public override string GetItemGamepadInstructions(int slot = 0) + { + Item[] inv = this._items; + int slot1 = slot; + int context = 26; + if (slot >= 2) + { + slot1 -= 2; + inv = this._dyes; + context = 27; + } + return ItemSlot.GetGamepadInstructions(inv, context, slot1); + } + + public override bool TryGetItemGamepadOverrideInstructions( + Item[] inv, + int context, + int slot, + out string instruction) + { + instruction = ""; + Item newItem = inv[slot]; + if (newItem.IsAir || newItem.favorited) + return false; + switch (context) + { + case 0: + if (TEHatRack.FitsHatRack(newItem)) + { + instruction = Lang.misc[76].Value; + return true; + } + break; + case 26: + case 27: + if (Main.player[Main.myPlayer].ItemSpace(newItem).CanTakeItemToPersonalInventory) + { + instruction = Lang.misc[68].Value; + return true; + } + break; + } + return false; + } + + public override void OnPlayerUpdate(Player player) + { + if (player.InInteractionRange(player.tileEntityAnchor.X, player.tileEntityAnchor.Y) && player.chest == -1 && player.talkNPC == -1) + return; + if (player.chest == -1 && player.talkNPC == -1) + SoundEngine.PlaySound(11); + player.tileEntityAnchor.Clear(); + Recipe.FindRecipes(); + } + + public static void OnPlayerInteraction(Player player, int clickX, int clickY) + { + int index1 = clickX; + int index2 = clickY; + int x1 = index1 - (int) Main.tile[index1, index2].frameX % 54 / 18; + int y1 = index2 - (int) Main.tile[x1, index2].frameY / 18; + int id = TEHatRack.Find(x1, y1); + if (id == -1) + return; + int y2 = y1 + 1; + int x2 = x1 + 1; + TileEntity.BasicOpenCloseInteraction(player, x2, y2, id); + } + + public override void OnInventoryDraw(Player player, SpriteBatch spriteBatch) + { + if (Main.tile[player.tileEntityAnchor.X, player.tileEntityAnchor.Y].type != (ushort) 475) + { + player.tileEntityAnchor.Clear(); + Recipe.FindRecipes(); + } + else + this.DrawInner(player, spriteBatch); + } + + private void DrawInner(Player player, SpriteBatch spriteBatch) + { + Main.inventoryScale = 0.72f; + this.DrawSlotPairSet(player, spriteBatch, 2, 0, 3.5f, 0.5f, 26); + } + + private void DrawSlotPairSet( + Player player, + SpriteBatch spriteBatch, + int slotsToShowLine, + int slotsArrayOffset, + float offsetX, + float offsetY, + int inventoryContextTarget) + { + Item[] items = this._items; + for (int index1 = 0; index1 < slotsToShowLine; ++index1) + { + for (int index2 = 0; index2 < 2; ++index2) + { + int num1 = (int) (73.0 + ((double) index1 + (double) offsetX) * 56.0 * (double) Main.inventoryScale); + int num2 = (int) ((double) Main.instance.invBottom + ((double) index2 + (double) offsetY) * 56.0 * (double) Main.inventoryScale); + Item[] inv; + int context; + if (index2 == 0) + { + inv = this._items; + context = inventoryContextTarget; + } + else + { + inv = this._dyes; + context = 27; + } + if (Utils.FloatIntersect((float) Main.mouseX, (float) Main.mouseY, 0.0f, 0.0f, (float) num1, (float) num2, (float) TextureAssets.InventoryBack.Width() * Main.inventoryScale, (float) TextureAssets.InventoryBack.Height() * Main.inventoryScale) && !PlayerInput.IgnoreMouseInterface) + { + player.mouseInterface = true; + ItemSlot.Handle(inv, context, index1 + slotsArrayOffset); + } + ItemSlot.Draw(spriteBatch, inv, context, index1 + slotsArrayOffset, new Vector2((float) num1, (float) num2)); + } + } + } + + public override bool OverrideItemSlotHover(Item[] inv, int context = 0, int slot = 0) + { + Item obj = inv[slot]; + if (!obj.IsAir && !inv[slot].favorited && context == 0 && TEHatRack.FitsHatRack(obj)) + { + Main.cursorOverride = 9; + return true; + } + if (obj.IsAir || context != 26 && context != 27 || !Main.player[Main.myPlayer].ItemSpace(inv[slot]).CanTakeItemToPersonalInventory) + return false; + Main.cursorOverride = 8; + return true; + } + + public override bool OverrideItemSlotLeftClick(Item[] inv, int context = 0, int slot = 0) + { + if (!ItemSlot.ShiftInUse) + return false; + if (Main.cursorOverride == 9 && context == 0) + { + Item obj = inv[slot]; + if (Main.cursorOverride == 9 && !obj.IsAir && !obj.favorited && context == 0 && TEHatRack.FitsHatRack(obj)) + return this.TryFitting(inv, context, slot); + } + if ((Main.cursorOverride != 8 || context != 23) && context != 26 && context != 27) + return false; + inv[slot] = Main.player[Main.myPlayer].GetItem(Main.myPlayer, inv[slot], GetItemSettings.InventoryEntityToPlayerInventorySettings); + if (Main.netMode == 1) + NetMessage.SendData(124, number: Main.myPlayer, number2: ((float) this.ID), number3: ((float) slot)); + return true; + } + + public static bool FitsHatRack(Item item) => item.maxStack <= 1 && item.headSlot > 0; + + private bool TryFitting(Item[] inv, int context = 0, int slot = 0, bool justCheck = false) + { + if (!TEHatRack.FitsHatRack(inv[slot])) + return false; + if (justCheck) + return true; + int index1 = TEHatRack.hatTargetSlot; + ++TEHatRack.hatTargetSlot; + for (int index2 = 0; index2 < 2; ++index2) + { + if (this._items[index2].IsAir) + { + index1 = index2; + TEHatRack.hatTargetSlot = index2 + 1; + break; + } + } + for (int index3 = 0; index3 < 2; ++index3) + { + if (inv[slot].type == this._items[index3].type) + index1 = index3; + } + if (TEHatRack.hatTargetSlot >= 2) + TEHatRack.hatTargetSlot = 0; + SoundEngine.PlaySound(7); + Utils.Swap(ref this._items[index1], ref inv[slot]); + if (Main.netMode == 1) + NetMessage.SendData(124, number: Main.myPlayer, number2: ((float) this.ID), number3: ((float) index1)); + return true; + } + + public void WriteItem(int itemIndex, BinaryWriter writer, bool dye) + { + Item dye1 = this._items[itemIndex]; + if (dye) + dye1 = this._dyes[itemIndex]; + writer.Write((ushort) dye1.netID); + writer.Write((ushort) dye1.stack); + writer.Write(dye1.prefix); + } + + public void ReadItem(int itemIndex, BinaryReader reader, bool dye) + { + int Type = (int) reader.ReadUInt16(); + int num = (int) reader.ReadUInt16(); + int pre = (int) reader.ReadByte(); + Item dye1 = this._items[itemIndex]; + if (dye) + dye1 = this._dyes[itemIndex]; + dye1.SetDefaults(Type); + dye1.stack = num; + dye1.Prefix(pre); + } + + public override bool IsTileValidForEntity(int x, int y) => Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 475 && Main.tile[x, y].frameY == (short) 0 && (int) Main.tile[x, y].frameX % 54 == 0; + + public static bool IsBreakable(int clickX, int clickY) + { + int index1 = clickX; + int index2 = clickY; + int x = index1 - (int) Main.tile[index1, index2].frameX % 54 / 18; + int y = index2 - (int) Main.tile[x, index2].frameY / 18; + int key = TEHatRack.Find(x, y); + return key == -1 || !(TileEntity.ByID[key] as TEHatRack).ContainsItems(); + } + + public bool ContainsItems() + { + for (int index = 0; index < 2; ++index) + { + if (!this._items[index].IsAir || !this._dyes[index].IsAir) + return true; + } + return false; + } + } +} diff --git a/GameContent/Tile_Entities/TEItemFrame.cs b/GameContent/Tile_Entities/TEItemFrame.cs new file mode 100644 index 0000000..b6e1174 --- /dev/null +++ b/GameContent/Tile_Entities/TEItemFrame.cs @@ -0,0 +1,182 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Tile_Entities.TEItemFrame +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; +using Terraria.DataStructures; + +namespace Terraria.GameContent.Tile_Entities +{ + public class TEItemFrame : TileEntity + { + private static byte _myEntityID; + public Item item; + + public override void RegisterTileEntityID(int assignedID) => TEItemFrame._myEntityID = (byte) assignedID; + + public override void NetPlaceEntityAttempt(int x, int y) => TEItemFrame.NetPlaceEntity(x, y); + + public static void NetPlaceEntity(int x, int y) => NetMessage.SendData(86, number: TEItemFrame.Place(x, y), number2: ((float) x), number3: ((float) y)); + + public override TileEntity GenerateInstance() => (TileEntity) new TEItemFrame(); + + public TEItemFrame() => this.item = new Item(); + + public static int Place(int x, int y) + { + TEItemFrame teItemFrame = new TEItemFrame(); + teItemFrame.Position = new Point16(x, y); + teItemFrame.ID = TileEntity.AssignNewID(); + teItemFrame.type = TEItemFrame._myEntityID; + TileEntity.ByID[teItemFrame.ID] = (TileEntity) teItemFrame; + TileEntity.ByPosition[teItemFrame.Position] = (TileEntity) teItemFrame; + return teItemFrame.ID; + } + + public override bool IsTileValidForEntity(int x, int y) => TEItemFrame.ValidTile(x, y); + + public static int Hook_AfterPlacement( + int x, + int y, + int type = 395, + int style = 0, + int direction = 1, + int alternate = 0) + { + if (Main.netMode != 1) + return TEItemFrame.Place(x, y); + NetMessage.SendTileSquare(Main.myPlayer, x, y, 2); + NetMessage.SendData(87, number: x, number2: ((float) y), number3: ((float) TEItemFrame._myEntityID)); + return -1; + } + + public static void Kill(int x, int y) + { + TileEntity tileEntity; + if (!TileEntity.ByPosition.TryGetValue(new Point16(x, y), out tileEntity) || (int) tileEntity.type != (int) TEItemFrame._myEntityID) + return; + TileEntity.ByID.Remove(tileEntity.ID); + TileEntity.ByPosition.Remove(new Point16(x, y)); + } + + public static int Find(int x, int y) + { + TileEntity tileEntity; + return TileEntity.ByPosition.TryGetValue(new Point16(x, y), out tileEntity) && (int) tileEntity.type == (int) TEItemFrame._myEntityID ? tileEntity.ID : -1; + } + + public static bool ValidTile(int x, int y) => Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 395 && Main.tile[x, y].frameY == (short) 0 && (int) Main.tile[x, y].frameX % 36 == 0; + + public override void WriteExtraData(BinaryWriter writer, bool networkSend) + { + writer.Write((short) this.item.netID); + writer.Write(this.item.prefix); + writer.Write((short) this.item.stack); + } + + public override void ReadExtraData(BinaryReader reader, bool networkSend) + { + this.item = new Item(); + this.item.netDefaults((int) reader.ReadInt16()); + this.item.Prefix((int) reader.ReadByte()); + this.item.stack = (int) reader.ReadInt16(); + } + + public override string ToString() => this.Position.X.ToString() + "x " + (object) this.Position.Y + "y item: " + (object) this.item; + + public void DropItem() + { + if (Main.netMode != 1) + Item.NewItem((int) this.Position.X * 16, (int) this.Position.Y * 16, 32, 32, this.item.netID, pfix: ((int) this.item.prefix)); + this.item = new Item(); + } + + public static void TryPlacing(int x, int y, int netid, int prefix, int stack) + { + WorldGen.RangeFrame(x, y, x + 2, y + 2); + int key = TEItemFrame.Find(x, y); + if (key == -1) + { + int number = Item.NewItem(x * 16, y * 16, 32, 32, 1); + Main.item[number].netDefaults(netid); + Main.item[number].Prefix(prefix); + Main.item[number].stack = stack; + NetMessage.SendData(21, number: number); + } + else + { + TEItemFrame teItemFrame = (TEItemFrame) TileEntity.ByID[key]; + if (teItemFrame.item.stack > 0) + teItemFrame.DropItem(); + teItemFrame.item = new Item(); + teItemFrame.item.netDefaults(netid); + teItemFrame.item.Prefix(prefix); + teItemFrame.item.stack = stack; + NetMessage.SendData(86, number: teItemFrame.ID, number2: ((float) x), number3: ((float) y)); + } + } + + public static void OnPlayerInteraction(Player player, int clickX, int clickY) + { + if (TEItemFrame.FitsItemFrame(player.inventory[player.selectedItem]) && !player.inventory[player.selectedItem].favorited) + { + player.GamepadEnableGrappleCooldown(); + TEItemFrame.PlaceItemInFrame(player, clickX, clickY); + Recipe.FindRecipes(); + } + else + { + int x = clickX; + int y = clickY; + if ((int) Main.tile[x, y].frameX % 36 != 0) + --x; + if ((int) Main.tile[x, y].frameY % 36 != 0) + --y; + int key = TEItemFrame.Find(x, y); + if (key == -1 || ((TEItemFrame) TileEntity.ByID[key]).item.stack <= 0) + return; + player.GamepadEnableGrappleCooldown(); + WorldGen.KillTile(clickX, clickY, true); + if (Main.netMode != 1) + return; + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y), number4: 1f); + } + } + + public static bool FitsItemFrame(Item i) => i.stack > 0; + + public static void PlaceItemInFrame(Player player, int x, int y) + { + if ((int) Main.tile[x, y].frameX % 36 != 0) + --x; + if ((int) Main.tile[x, y].frameY % 36 != 0) + --y; + int key = TEItemFrame.Find(x, y); + if (key == -1) + return; + if (((TEItemFrame) TileEntity.ByID[key]).item.stack > 0) + { + WorldGen.KillTile(x, y, true); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) Player.tileTargetX), number3: ((float) y), number4: 1f); + } + if (Main.netMode == 1) + NetMessage.SendData(89, number: x, number2: ((float) y), number3: ((float) player.selectedItem), number4: ((float) player.whoAmI), number5: 1); + else + TEItemFrame.TryPlacing(x, y, player.inventory[player.selectedItem].netID, (int) player.inventory[player.selectedItem].prefix, 1); + --player.inventory[player.selectedItem].stack; + if (player.inventory[player.selectedItem].stack <= 0) + { + player.inventory[player.selectedItem].SetDefaults(); + Main.mouseItem.SetDefaults(); + } + if (player.selectedItem == 58) + Main.mouseItem = player.inventory[player.selectedItem].Clone(); + player.releaseUseItem = false; + player.mouseInterface = true; + WorldGen.RangeFrame(x, y, x + 2, y + 2); + } + } +} diff --git a/GameContent/Tile_Entities/TELogicSensor.cs b/GameContent/Tile_Entities/TELogicSensor.cs new file mode 100644 index 0000000..7ff94d5 --- /dev/null +++ b/GameContent/Tile_Entities/TELogicSensor.cs @@ -0,0 +1,379 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Tile_Entities.TELogicSensor +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using System.IO; +using Terraria.DataStructures; + +namespace Terraria.GameContent.Tile_Entities +{ + public class TELogicSensor : TileEntity + { + private static byte _myEntityID; + private static Dictionary playerBox = new Dictionary(); + private static List> tripPoints = new List>(); + private static List markedIDsForRemoval = new List(); + private static bool inUpdateLoop; + private static bool playerBoxFilled; + public TELogicSensor.LogicCheckType logicCheck; + public bool On; + public int CountedData; + + public override void RegisterTileEntityID(int assignedID) + { + TELogicSensor._myEntityID = (byte) assignedID; + TileEntity._UpdateStart += new Action(TELogicSensor.UpdateStartInternal); + TileEntity._UpdateEnd += new Action(TELogicSensor.UpdateEndInternal); + } + + public override void NetPlaceEntityAttempt(int x, int y) => TELogicSensor.NetPlaceEntity(x, y); + + public static void NetPlaceEntity(int x, int y) + { + int num = TELogicSensor.Place(x, y); + ((TELogicSensor) TileEntity.ByID[num]).FigureCheckState(); + NetMessage.SendData(86, number: num, number2: ((float) x), number3: ((float) y)); + } + + public override bool IsTileValidForEntity(int x, int y) => TELogicSensor.ValidTile(x, y); + + public override TileEntity GenerateInstance() => (TileEntity) new TELogicSensor(); + + private static void UpdateStartInternal() + { + TELogicSensor.inUpdateLoop = true; + TELogicSensor.markedIDsForRemoval.Clear(); + TELogicSensor.playerBox.Clear(); + TELogicSensor.playerBoxFilled = false; + TELogicSensor.FillPlayerHitboxes(); + } + + private static void FillPlayerHitboxes() + { + if (TELogicSensor.playerBoxFilled) + return; + for (int key = 0; key < (int) byte.MaxValue; ++key) + { + if (Main.player[key].active) + TELogicSensor.playerBox[key] = Main.player[key].getRect(); + } + TELogicSensor.playerBoxFilled = true; + } + + private static void UpdateEndInternal() + { + TELogicSensor.inUpdateLoop = false; + foreach (Tuple tripPoint in TELogicSensor.tripPoints) + { + Wiring.blockPlayerTeleportationForOneIteration = tripPoint.Item2; + Wiring.HitSwitch((int) tripPoint.Item1.X, (int) tripPoint.Item1.Y); + if (Main.netMode == 2) + NetMessage.SendData(59, number: ((int) tripPoint.Item1.X), number2: ((float) tripPoint.Item1.Y)); + } + Wiring.blockPlayerTeleportationForOneIteration = false; + TELogicSensor.tripPoints.Clear(); + foreach (int key in TELogicSensor.markedIDsForRemoval) + { + TileEntity tileEntity; + if (TileEntity.ByID.TryGetValue(key, out tileEntity) && (int) tileEntity.type == (int) TELogicSensor._myEntityID) + TileEntity.ByID.Remove(key); + TileEntity.ByPosition.Remove(tileEntity.Position); + } + TELogicSensor.markedIDsForRemoval.Clear(); + } + + public override void Update() + { + bool state = TELogicSensor.GetState((int) this.Position.X, (int) this.Position.Y, this.logicCheck, this); + switch (this.logicCheck) + { + case TELogicSensor.LogicCheckType.Day: + case TELogicSensor.LogicCheckType.Night: + if (!this.On & state) + this.ChangeState(true, true); + if (!this.On || state) + break; + this.ChangeState(false, false); + break; + case TELogicSensor.LogicCheckType.PlayerAbove: + case TELogicSensor.LogicCheckType.Water: + case TELogicSensor.LogicCheckType.Lava: + case TELogicSensor.LogicCheckType.Honey: + case TELogicSensor.LogicCheckType.Liquid: + if (this.On == state) + break; + this.ChangeState(state, true); + break; + } + } + + public void ChangeState(bool onState, bool TripWire) + { + if (onState != this.On && !TELogicSensor.SanityCheck((int) this.Position.X, (int) this.Position.Y)) + return; + Main.tile[(int) this.Position.X, (int) this.Position.Y].frameX = onState ? (short) 18 : (short) 0; + this.On = onState; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, (int) this.Position.X, (int) this.Position.Y, 1); + if (!TripWire || Main.netMode == 1) + return; + TELogicSensor.tripPoints.Add(Tuple.Create(this.Position, this.logicCheck == TELogicSensor.LogicCheckType.PlayerAbove)); + } + + public static bool ValidTile(int x, int y) => Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 423 && (int) Main.tile[x, y].frameY % 18 == 0 && (int) Main.tile[x, y].frameX % 18 == 0; + + public TELogicSensor() + { + this.logicCheck = TELogicSensor.LogicCheckType.None; + this.On = false; + } + + public static TELogicSensor.LogicCheckType FigureCheckType( + int x, + int y, + out bool on) + { + on = false; + if (!WorldGen.InWorld(x, y)) + return TELogicSensor.LogicCheckType.None; + Tile tile = Main.tile[x, y]; + if (tile == null) + return TELogicSensor.LogicCheckType.None; + TELogicSensor.LogicCheckType type = TELogicSensor.LogicCheckType.None; + switch ((int) tile.frameY / 18) + { + case 0: + type = TELogicSensor.LogicCheckType.Day; + break; + case 1: + type = TELogicSensor.LogicCheckType.Night; + break; + case 2: + type = TELogicSensor.LogicCheckType.PlayerAbove; + break; + case 3: + type = TELogicSensor.LogicCheckType.Water; + break; + case 4: + type = TELogicSensor.LogicCheckType.Lava; + break; + case 5: + type = TELogicSensor.LogicCheckType.Honey; + break; + case 6: + type = TELogicSensor.LogicCheckType.Liquid; + break; + } + on = TELogicSensor.GetState(x, y, type); + return type; + } + + public static bool GetState( + int x, + int y, + TELogicSensor.LogicCheckType type, + TELogicSensor instance = null) + { + switch (type) + { + case TELogicSensor.LogicCheckType.Day: + return Main.dayTime; + case TELogicSensor.LogicCheckType.Night: + return !Main.dayTime; + case TELogicSensor.LogicCheckType.PlayerAbove: + bool flag1 = false; + Rectangle rectangle = new Rectangle(x * 16 - 32 - 1, y * 16 - 160 - 1, 82, 162); + foreach (KeyValuePair keyValuePair in TELogicSensor.playerBox) + { + if (keyValuePair.Value.Intersects(rectangle)) + { + flag1 = true; + break; + } + } + return flag1; + case TELogicSensor.LogicCheckType.Water: + case TELogicSensor.LogicCheckType.Lava: + case TELogicSensor.LogicCheckType.Honey: + case TELogicSensor.LogicCheckType.Liquid: + if (instance == null) + return false; + Tile tile = Main.tile[x, y]; + bool flag2 = true; + if (tile == null || tile.liquid == (byte) 0) + flag2 = false; + if (!tile.lava() && type == TELogicSensor.LogicCheckType.Lava) + flag2 = false; + if (!tile.honey() && type == TELogicSensor.LogicCheckType.Honey) + flag2 = false; + if ((tile.honey() || tile.lava()) && type == TELogicSensor.LogicCheckType.Water) + flag2 = false; + if (!flag2 && instance.On) + { + if (instance.CountedData == 0) + instance.CountedData = 15; + else if (instance.CountedData > 0) + --instance.CountedData; + flag2 = instance.CountedData > 0; + } + return flag2; + default: + return false; + } + } + + public void FigureCheckState() + { + this.logicCheck = TELogicSensor.FigureCheckType((int) this.Position.X, (int) this.Position.Y, out this.On); + TELogicSensor.GetFrame((int) this.Position.X, (int) this.Position.Y, this.logicCheck, this.On); + } + + public static void GetFrame(int x, int y, TELogicSensor.LogicCheckType type, bool on) + { + Main.tile[x, y].frameX = on ? (short) 18 : (short) 0; + switch (type) + { + case TELogicSensor.LogicCheckType.Day: + Main.tile[x, y].frameY = (short) 0; + break; + case TELogicSensor.LogicCheckType.Night: + Main.tile[x, y].frameY = (short) 18; + break; + case TELogicSensor.LogicCheckType.PlayerAbove: + Main.tile[x, y].frameY = (short) 36; + break; + case TELogicSensor.LogicCheckType.Water: + Main.tile[x, y].frameY = (short) 54; + break; + case TELogicSensor.LogicCheckType.Lava: + Main.tile[x, y].frameY = (short) 72; + break; + case TELogicSensor.LogicCheckType.Honey: + Main.tile[x, y].frameY = (short) 90; + break; + case TELogicSensor.LogicCheckType.Liquid: + Main.tile[x, y].frameY = (short) 108; + break; + default: + Main.tile[x, y].frameY = (short) 0; + break; + } + } + + public static bool SanityCheck(int x, int y) + { + if (Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 423) + return true; + TELogicSensor.Kill(x, y); + return false; + } + + public static int Place(int x, int y) + { + TELogicSensor teLogicSensor = new TELogicSensor(); + teLogicSensor.Position = new Point16(x, y); + teLogicSensor.ID = TileEntity.AssignNewID(); + teLogicSensor.type = TELogicSensor._myEntityID; + TileEntity.ByID[teLogicSensor.ID] = (TileEntity) teLogicSensor; + TileEntity.ByPosition[teLogicSensor.Position] = (TileEntity) teLogicSensor; + return teLogicSensor.ID; + } + + public static int Hook_AfterPlacement( + int x, + int y, + int type = 423, + int style = 0, + int direction = 1, + int alternate = 0) + { + bool on; + TELogicSensor.LogicCheckType type1 = TELogicSensor.FigureCheckType(x, y, out on); + TELogicSensor.GetFrame(x, y, type1, on); + if (Main.netMode == 1) + { + NetMessage.SendTileSquare(Main.myPlayer, x, y, 1); + NetMessage.SendData(87, number: x, number2: ((float) y), number3: ((float) TELogicSensor._myEntityID)); + return -1; + } + int key = TELogicSensor.Place(x, y); + ((TELogicSensor) TileEntity.ByID[key]).FigureCheckState(); + return key; + } + + public static void Kill(int x, int y) + { + TileEntity tileEntity; + if (!TileEntity.ByPosition.TryGetValue(new Point16(x, y), out tileEntity) || (int) tileEntity.type != (int) TELogicSensor._myEntityID) + return; + Wiring.blockPlayerTeleportationForOneIteration = ((TELogicSensor) tileEntity).logicCheck == TELogicSensor.LogicCheckType.PlayerAbove; + bool flag = false; + if (((TELogicSensor) tileEntity).logicCheck == TELogicSensor.LogicCheckType.PlayerAbove && ((TELogicSensor) tileEntity).On) + flag = true; + else if (((TELogicSensor) tileEntity).logicCheck == TELogicSensor.LogicCheckType.Water && ((TELogicSensor) tileEntity).On) + flag = true; + else if (((TELogicSensor) tileEntity).logicCheck == TELogicSensor.LogicCheckType.Lava && ((TELogicSensor) tileEntity).On) + flag = true; + else if (((TELogicSensor) tileEntity).logicCheck == TELogicSensor.LogicCheckType.Honey && ((TELogicSensor) tileEntity).On) + flag = true; + else if (((TELogicSensor) tileEntity).logicCheck == TELogicSensor.LogicCheckType.Liquid && ((TELogicSensor) tileEntity).On) + flag = true; + if (flag) + { + Wiring.HitSwitch((int) tileEntity.Position.X, (int) tileEntity.Position.Y); + NetMessage.SendData(59, number: ((int) tileEntity.Position.X), number2: ((float) tileEntity.Position.Y)); + } + Wiring.blockPlayerTeleportationForOneIteration = false; + if (TELogicSensor.inUpdateLoop) + { + TELogicSensor.markedIDsForRemoval.Add(tileEntity.ID); + } + else + { + TileEntity.ByPosition.Remove(new Point16(x, y)); + TileEntity.ByID.Remove(tileEntity.ID); + } + } + + public static int Find(int x, int y) + { + TileEntity tileEntity; + return TileEntity.ByPosition.TryGetValue(new Point16(x, y), out tileEntity) && (int) tileEntity.type == (int) TELogicSensor._myEntityID ? tileEntity.ID : -1; + } + + public override void WriteExtraData(BinaryWriter writer, bool networkSend) + { + if (networkSend) + return; + writer.Write((byte) this.logicCheck); + writer.Write(this.On); + } + + public override void ReadExtraData(BinaryReader reader, bool networkSend) + { + if (networkSend) + return; + this.logicCheck = (TELogicSensor.LogicCheckType) reader.ReadByte(); + this.On = reader.ReadBoolean(); + } + + public override string ToString() => this.Position.X.ToString() + "x " + (object) this.Position.Y + "y " + (object) this.logicCheck; + + public enum LogicCheckType + { + None, + Day, + Night, + PlayerAbove, + Water, + Lava, + Honey, + Liquid, + } + } +} diff --git a/GameContent/Tile_Entities/TETeleportationPylon.cs b/GameContent/Tile_Entities/TETeleportationPylon.cs new file mode 100644 index 0000000..d2ca87b --- /dev/null +++ b/GameContent/Tile_Entities/TETeleportationPylon.cs @@ -0,0 +1,181 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Tile_Entities.TETeleportationPylon +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.DataStructures; + +namespace Terraria.GameContent.Tile_Entities +{ + public class TETeleportationPylon : TileEntity + { + private static byte _myEntityID; + private const int MyTileID = 597; + private const int entityTileWidth = 3; + private const int entityTileHeight = 4; + + public override void RegisterTileEntityID(int assignedID) => TETeleportationPylon._myEntityID = (byte) assignedID; + + public override TileEntity GenerateInstance() => (TileEntity) new TETeleportationPylon(); + + public override void NetPlaceEntityAttempt(int x, int y) + { + TeleportPylonType pylonType; + if (!this.TryGetPylonTypeFromTileCoords(x, y, out pylonType)) + TETeleportationPylon.RejectPlacementFromNet(x, y); + else if (Main.PylonSystem.HasPylonOfType(pylonType)) + TETeleportationPylon.RejectPlacementFromNet(x, y); + else + NetMessage.SendData(86, number: TETeleportationPylon.Place(x, y), number2: ((float) x), number3: ((float) y)); + } + + public bool TryGetPylonType(out TeleportPylonType pylonType) => this.TryGetPylonTypeFromTileCoords((int) this.Position.X, (int) this.Position.Y, out pylonType); + + private static void RejectPlacementFromNet(int x, int y) + { + WorldGen.KillTile(x, y); + if (Main.netMode != 2) + return; + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y)); + } + + public static int Place(int x, int y) + { + TETeleportationPylon teleportationPylon = new TETeleportationPylon(); + teleportationPylon.Position = new Point16(x, y); + teleportationPylon.ID = TileEntity.AssignNewID(); + teleportationPylon.type = TETeleportationPylon._myEntityID; + TileEntity.ByID[teleportationPylon.ID] = (TileEntity) teleportationPylon; + TileEntity.ByPosition[teleportationPylon.Position] = (TileEntity) teleportationPylon; + Main.PylonSystem.RequestImmediateUpdate(); + return teleportationPylon.ID; + } + + public static void Kill(int x, int y) + { + TileEntity tileEntity; + if (!TileEntity.ByPosition.TryGetValue(new Point16(x, y), out tileEntity) || (int) tileEntity.type != (int) TETeleportationPylon._myEntityID) + return; + TileEntity.ByID.Remove(tileEntity.ID); + TileEntity.ByPosition.Remove(new Point16(x, y)); + Main.PylonSystem.RequestImmediateUpdate(); + } + + public override string ToString() => this.Position.X.ToString() + "x " + (object) this.Position.Y + "y"; + + public static void Framing_CheckTile(int callX, int callY) + { + if (WorldGen.destroyObject) + return; + int num1 = callX; + int num2 = callY; + Tile tileSafely = Framing.GetTileSafely(callX, callY); + int num3 = num1 - (int) tileSafely.frameX / 18 % 3; + int y = num2 - (int) tileSafely.frameY / 18 % 4; + int pylonStyleFromTile = TETeleportationPylon.GetPylonStyleFromTile(tileSafely); + bool flag = false; + for (int index1 = num3; index1 < num3 + 3; ++index1) + { + for (int index2 = y; index2 < y + 4; ++index2) + { + Tile tile = Main.tile[index1, index2]; + if (!tile.active() || tile.type != (ushort) 597) + flag = true; + } + } + if (!WorldGen.SolidTileAllowBottomSlope(num3, y + 4) || !WorldGen.SolidTileAllowBottomSlope(num3 + 1, y + 4) || !WorldGen.SolidTileAllowBottomSlope(num3 + 2, y + 4)) + flag = true; + if (!flag) + return; + TETeleportationPylon.Kill(num3, y); + int typeFromTileStyle = TETeleportationPylon.GetPylonItemTypeFromTileStyle(pylonStyleFromTile); + Item.NewItem(num3 * 16, y * 16, 48, 64, typeFromTileStyle); + WorldGen.destroyObject = true; + for (int i = num3; i < num3 + 3; ++i) + { + for (int j = y; j < y + 4; ++j) + { + if (Main.tile[i, j].active() && Main.tile[i, j].type == (ushort) 597) + WorldGen.KillTile(i, j); + } + } + WorldGen.destroyObject = false; + } + + public static int GetPylonStyleFromTile(Tile tile) => (int) tile.frameX / 54; + + public static int GetPylonItemTypeFromTileStyle(int style) + { + switch (style) + { + case 1: + return 4875; + case 2: + return 4916; + case 3: + return 4917; + case 4: + return 4918; + case 5: + return 4919; + case 6: + return 4920; + case 7: + return 4921; + case 8: + return 4951; + default: + return 4876; + } + } + + public override bool IsTileValidForEntity(int x, int y) => Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 597 && Main.tile[x, y].frameY == (short) 0 && (int) Main.tile[x, y].frameX % 54 == 0; + + public static int PlacementPreviewHook_AfterPlacement( + int x, + int y, + int type = 597, + int style = 0, + int direction = 1, + int alternate = 0) + { + if (Main.netMode != 1) + return TETeleportationPylon.Place(x - 1, y - 3); + NetMessage.SendTileSquare(Main.myPlayer, x, y - 1, 5); + NetMessage.SendData(87, number: (x - 1), number2: ((float) (y - 3)), number3: ((float) TETeleportationPylon._myEntityID)); + return -1; + } + + public static int PlacementPreviewHook_CheckIfCanPlace( + int x, + int y, + int type = 597, + int style = 0, + int direction = 1, + int alternate = 0) + { + TeleportPylonType fromPylonTileStyle = TETeleportationPylon.GetPylonTypeFromPylonTileStyle(style); + return Main.PylonSystem.HasPylonOfType(fromPylonTileStyle) ? 1 : 0; + } + + private bool TryGetPylonTypeFromTileCoords(int x, int y, out TeleportPylonType pylonType) + { + pylonType = TeleportPylonType.SurfacePurity; + Tile tile = Main.tile[x, y]; + if (tile == null || !tile.active() || tile.type != (ushort) 597) + return false; + int pylonStyle = (int) tile.frameX / 54; + pylonType = TETeleportationPylon.GetPylonTypeFromPylonTileStyle(pylonStyle); + return true; + } + + private static TeleportPylonType GetPylonTypeFromPylonTileStyle(int pylonStyle) => (TeleportPylonType) pylonStyle; + + public static int Find(int x, int y) + { + TileEntity tileEntity; + return TileEntity.ByPosition.TryGetValue(new Point16(x, y), out tileEntity) && (int) tileEntity.type == (int) TETeleportationPylon._myEntityID ? tileEntity.ID : -1; + } + } +} diff --git a/GameContent/Tile_Entities/TETrainingDummy.cs b/GameContent/Tile_Entities/TETrainingDummy.cs new file mode 100644 index 0000000..8be5981 --- /dev/null +++ b/GameContent/Tile_Entities/TETrainingDummy.cs @@ -0,0 +1,159 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Tile_Entities.TETrainingDummy +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using System.IO; +using Terraria.DataStructures; + +namespace Terraria.GameContent.Tile_Entities +{ + public class TETrainingDummy : TileEntity + { + private static Dictionary playerBox = new Dictionary(); + private static bool playerBoxFilled; + private static byte _myEntityID; + public int npc; + + public override void RegisterTileEntityID(int assignedID) + { + TETrainingDummy._myEntityID = (byte) assignedID; + TileEntity._UpdateStart += new Action(TETrainingDummy.ClearBoxes); + } + + public override void NetPlaceEntityAttempt(int x, int y) => TETrainingDummy.NetPlaceEntity(x, y); + + public static void NetPlaceEntity(int x, int y) => TETrainingDummy.Place(x, y); + + public override TileEntity GenerateInstance() => (TileEntity) new TETrainingDummy(); + + public override bool IsTileValidForEntity(int x, int y) => TETrainingDummy.ValidTile(x, y); + + public static void ClearBoxes() + { + TETrainingDummy.playerBox.Clear(); + TETrainingDummy.playerBoxFilled = false; + } + + public override void Update() + { + Rectangle rectangle = new Rectangle(0, 0, 32, 48); + rectangle.Inflate(1600, 1600); + int x = rectangle.X; + int y = rectangle.Y; + if (this.npc != -1) + { + if (Main.npc[this.npc].active && Main.npc[this.npc].type == 488 && (double) Main.npc[this.npc].ai[0] == (double) this.Position.X && (double) Main.npc[this.npc].ai[1] == (double) this.Position.Y) + return; + this.Deactivate(); + } + else + { + TETrainingDummy.FillPlayerHitboxes(); + rectangle.X = (int) this.Position.X * 16 + x; + rectangle.Y = (int) this.Position.Y * 16 + y; + bool flag = false; + foreach (KeyValuePair keyValuePair in TETrainingDummy.playerBox) + { + if (keyValuePair.Value.Intersects(rectangle)) + { + flag = true; + break; + } + } + if (!flag) + return; + this.Activate(); + } + } + + private static void FillPlayerHitboxes() + { + if (TETrainingDummy.playerBoxFilled) + return; + for (int key = 0; key < (int) byte.MaxValue; ++key) + { + if (Main.player[key].active) + TETrainingDummy.playerBox[key] = Main.player[key].getRect(); + } + TETrainingDummy.playerBoxFilled = true; + } + + public static bool ValidTile(int x, int y) => Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 378 && Main.tile[x, y].frameY == (short) 0 && (int) Main.tile[x, y].frameX % 36 == 0; + + public TETrainingDummy() => this.npc = -1; + + public static int Place(int x, int y) + { + TETrainingDummy teTrainingDummy = new TETrainingDummy(); + teTrainingDummy.Position = new Point16(x, y); + teTrainingDummy.ID = TileEntity.AssignNewID(); + teTrainingDummy.type = TETrainingDummy._myEntityID; + TileEntity.ByID[teTrainingDummy.ID] = (TileEntity) teTrainingDummy; + TileEntity.ByPosition[teTrainingDummy.Position] = (TileEntity) teTrainingDummy; + return teTrainingDummy.ID; + } + + public static int Hook_AfterPlacement( + int x, + int y, + int type = 378, + int style = 0, + int direction = 1, + int alternate = 0) + { + if (Main.netMode != 1) + return TETrainingDummy.Place(x - 1, y - 2); + NetMessage.SendTileSquare(Main.myPlayer, x - 1, y - 1, 3); + NetMessage.SendData(87, number: (x - 1), number2: ((float) (y - 2)), number3: ((float) TETrainingDummy._myEntityID)); + return -1; + } + + public static void Kill(int x, int y) + { + TileEntity tileEntity; + if (!TileEntity.ByPosition.TryGetValue(new Point16(x, y), out tileEntity) || (int) tileEntity.type != (int) TETrainingDummy._myEntityID) + return; + TileEntity.ByID.Remove(tileEntity.ID); + TileEntity.ByPosition.Remove(new Point16(x, y)); + } + + public static int Find(int x, int y) + { + TileEntity tileEntity; + return TileEntity.ByPosition.TryGetValue(new Point16(x, y), out tileEntity) && (int) tileEntity.type == (int) TETrainingDummy._myEntityID ? tileEntity.ID : -1; + } + + public override void WriteExtraData(BinaryWriter writer, bool networkSend) => writer.Write((short) this.npc); + + public override void ReadExtraData(BinaryReader reader, bool networkSend) => this.npc = (int) reader.ReadInt16(); + + public void Activate() + { + int index = NPC.NewNPC((int) this.Position.X * 16 + 16, (int) this.Position.Y * 16 + 48, 488, 100); + Main.npc[index].ai[0] = (float) this.Position.X; + Main.npc[index].ai[1] = (float) this.Position.Y; + Main.npc[index].netUpdate = true; + this.npc = index; + if (Main.netMode == 1) + return; + NetMessage.SendData(86, number: this.ID, number2: ((float) this.Position.X), number3: ((float) this.Position.Y)); + } + + public void Deactivate() + { + if (this.npc != -1) + Main.npc[this.npc].active = false; + this.npc = -1; + if (Main.netMode == 1) + return; + NetMessage.SendData(86, number: this.ID, number2: ((float) this.Position.X), number3: ((float) this.Position.Y)); + } + + public override string ToString() => this.Position.X.ToString() + "x " + (object) this.Position.Y + "y npc: " + (object) this.npc; + } +} diff --git a/GameContent/Tile_Entities/TEWeaponsRack.cs b/GameContent/Tile_Entities/TEWeaponsRack.cs new file mode 100644 index 0000000..5ed4f47 --- /dev/null +++ b/GameContent/Tile_Entities/TEWeaponsRack.cs @@ -0,0 +1,239 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.Tile_Entities.TEWeaponsRack +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; +using Terraria.DataStructures; +using Terraria.ID; + +namespace Terraria.GameContent.Tile_Entities +{ + public class TEWeaponsRack : TileEntity + { + private static byte _myEntityID; + public Item item; + private const int MyTileID = 471; + + public TEWeaponsRack() => this.item = new Item(); + + public override void RegisterTileEntityID(int assignedID) => TEWeaponsRack._myEntityID = (byte) assignedID; + + public override TileEntity GenerateInstance() => (TileEntity) new TEWeaponsRack(); + + public override void NetPlaceEntityAttempt(int x, int y) => TEWeaponsRack.NetPlaceEntity(x, y); + + public static void NetPlaceEntity(int x, int y) => NetMessage.SendData(86, number: TEWeaponsRack.Place(x, y), number2: ((float) x), number3: ((float) y)); + + public override bool IsTileValidForEntity(int x, int y) => TEWeaponsRack.ValidTile(x, y); + + public static bool ValidTile(int x, int y) => Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 471 && Main.tile[x, y].frameY == (short) 0 && (int) Main.tile[x, y].frameX % 54 == 0; + + public static int Place(int x, int y) + { + TEWeaponsRack teWeaponsRack = new TEWeaponsRack(); + teWeaponsRack.Position = new Point16(x, y); + teWeaponsRack.ID = TileEntity.AssignNewID(); + teWeaponsRack.type = TEWeaponsRack._myEntityID; + TileEntity.ByID[teWeaponsRack.ID] = (TileEntity) teWeaponsRack; + TileEntity.ByPosition[teWeaponsRack.Position] = (TileEntity) teWeaponsRack; + return teWeaponsRack.ID; + } + + public static int Hook_AfterPlacement( + int x, + int y, + int type = 471, + int style = 0, + int direction = 1, + int alternate = 0) + { + if (Main.netMode != 1) + return TEWeaponsRack.Place(x, y); + NetMessage.SendTileSquare(Main.myPlayer, x, y, 5); + NetMessage.SendData(87, number: x, number2: ((float) y), number3: ((float) TEWeaponsRack._myEntityID)); + return -1; + } + + public static void Kill(int x, int y) + { + TileEntity tileEntity; + if (!TileEntity.ByPosition.TryGetValue(new Point16(x, y), out tileEntity) || (int) tileEntity.type != (int) TEWeaponsRack._myEntityID) + return; + TileEntity.ByID.Remove(tileEntity.ID); + TileEntity.ByPosition.Remove(new Point16(x, y)); + } + + public static int Find(int x, int y) + { + TileEntity tileEntity; + return TileEntity.ByPosition.TryGetValue(new Point16(x, y), out tileEntity) && (int) tileEntity.type == (int) TEWeaponsRack._myEntityID ? tileEntity.ID : -1; + } + + public override void WriteExtraData(BinaryWriter writer, bool networkSend) + { + writer.Write((short) this.item.netID); + writer.Write(this.item.prefix); + writer.Write((short) this.item.stack); + } + + public override void ReadExtraData(BinaryReader reader, bool networkSend) + { + this.item = new Item(); + this.item.netDefaults((int) reader.ReadInt16()); + this.item.Prefix((int) reader.ReadByte()); + this.item.stack = (int) reader.ReadInt16(); + } + + public override string ToString() => this.Position.X.ToString() + "x " + (object) this.Position.Y + "y item: " + (object) this.item; + + public static void Framing_CheckTile(int callX, int callY) + { + int num1 = 3; + int num2 = 3; + if (WorldGen.destroyObject) + return; + int num3 = callX; + int num4 = callY; + Tile tileSafely = Framing.GetTileSafely(callX, callY); + int x = num3 - (int) tileSafely.frameX / 18 % num1; + int y = num4 - (int) tileSafely.frameY / 18 % num2; + bool flag = false; + for (int index1 = x; index1 < x + num1; ++index1) + { + for (int index2 = y; index2 < y + num2; ++index2) + { + Tile tile = Main.tile[index1, index2]; + if (!tile.active() || tile.type != (ushort) 471 || tile.wall == (ushort) 0) + flag = true; + } + } + if (!flag) + return; + Item.NewItem(x * 16, y * 16, 48, 48, 2699); + WorldGen.destroyObject = true; + int key = TEWeaponsRack.Find(x, y); + if (key != -1) + { + TEWeaponsRack teWeaponsRack = (TEWeaponsRack) TileEntity.ByID[key]; + if (!teWeaponsRack.item.IsAir) + teWeaponsRack.DropItem(); + } + for (int i = x; i < x + num1; ++i) + { + for (int j = y; j < y + num2; ++j) + { + if (Main.tile[i, j].active() && Main.tile[i, j].type == (ushort) 471) + WorldGen.KillTile(i, j); + } + } + WorldGen.destroyObject = false; + } + + public void DropItem() + { + if (Main.netMode != 1) + Item.NewItem((int) this.Position.X * 16, (int) this.Position.Y * 16, 32, 32, this.item.netID, pfix: ((int) this.item.prefix)); + this.item = new Item(); + } + + public static void TryPlacing(int x, int y, int netid, int prefix, int stack) + { + WorldGen.RangeFrame(x, y, x + 3, y + 3); + int key = TEWeaponsRack.Find(x, y); + if (key == -1) + { + int number = Item.NewItem(x * 16, y * 16, 32, 32, 1); + Main.item[number].netDefaults(netid); + Main.item[number].Prefix(prefix); + Main.item[number].stack = stack; + NetMessage.SendData(21, number: number); + } + else + { + TEWeaponsRack teWeaponsRack = (TEWeaponsRack) TileEntity.ByID[key]; + if (teWeaponsRack.item.stack > 0) + teWeaponsRack.DropItem(); + teWeaponsRack.item = new Item(); + teWeaponsRack.item.netDefaults(netid); + teWeaponsRack.item.Prefix(prefix); + teWeaponsRack.item.stack = stack; + NetMessage.SendData(86, number: teWeaponsRack.ID, number2: ((float) x), number3: ((float) y)); + } + } + + public static void OnPlayerInteraction(Player player, int clickX, int clickY) + { + if (TEWeaponsRack.FitsWeaponFrame(player.inventory[player.selectedItem]) && !player.inventory[player.selectedItem].favorited) + { + player.GamepadEnableGrappleCooldown(); + TEWeaponsRack.PlaceItemInFrame(player, clickX, clickY); + Recipe.FindRecipes(); + } + else + { + int index1 = clickX; + int index2 = clickY; + int index3 = index1 - (int) Main.tile[index1, index2].frameX % 54 / 18; + int num = index2 - (int) Main.tile[index3, index2].frameY % 54 / 18; + int key = TEWeaponsRack.Find(index3, num); + if (key == -1 || ((TEWeaponsRack) TileEntity.ByID[key]).item.stack <= 0) + return; + player.GamepadEnableGrappleCooldown(); + WorldGen.KillTile(index3, num, true); + if (Main.netMode != 1) + return; + NetMessage.SendData(17, number2: ((float) index3), number3: ((float) num), number4: 1f); + } + } + + public static bool FitsWeaponFrame(Item i) + { + if (!i.IsAir && (i.fishingPole > 0 || ItemID.Sets.CanBePlacedOnWeaponRacks[i.type])) + return true; + return i.damage > 0 && i.useStyle != 0 && i.stack > 0; + } + + private static void PlaceItemInFrame(Player player, int x, int y) + { + x -= (int) Main.tile[x, y].frameX % 54 / 18; + y -= (int) Main.tile[x, y].frameY % 54 / 18; + int key = TEWeaponsRack.Find(x, y); + if (key == -1) + return; + if (((TEWeaponsRack) TileEntity.ByID[key]).item.stack > 0) + { + WorldGen.KillTile(x, y, true); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) Player.tileTargetX), number3: ((float) y), number4: 1f); + } + if (Main.netMode == 1) + NetMessage.SendData(123, number: x, number2: ((float) y), number3: ((float) player.selectedItem), number4: ((float) player.whoAmI), number5: 1); + else + TEWeaponsRack.TryPlacing(x, y, player.inventory[player.selectedItem].netID, (int) player.inventory[player.selectedItem].prefix, 1); + --player.inventory[player.selectedItem].stack; + if (player.inventory[player.selectedItem].stack <= 0) + { + player.inventory[player.selectedItem].SetDefaults(); + Main.mouseItem.SetDefaults(); + } + if (player.selectedItem == 58) + Main.mouseItem = player.inventory[player.selectedItem].Clone(); + player.releaseUseItem = false; + player.mouseInterface = true; + WorldGen.RangeFrame(x, y, x + 3, y + 3); + } + + public static bool KillTileDropItem(Tile tileCache, int i, int j) + { + int key = TEWeaponsRack.Find(i - (int) tileCache.frameX % 54 / 18, j - (int) tileCache.frameY % 54 / 18); + if (key == -1 || ((TEWeaponsRack) TileEntity.ByID[key]).item.stack <= 0) + return false; + ((TEWeaponsRack) TileEntity.ByID[key]).DropItem(); + if (Main.netMode != 2) + Main.LocalPlayer.InterruptItemUsageIfOverTile(471); + return true; + } + } +} diff --git a/GameContent/TownNPCProfiles.cs b/GameContent/TownNPCProfiles.cs new file mode 100644 index 0000000..4f33b14 --- /dev/null +++ b/GameContent/TownNPCProfiles.cs @@ -0,0 +1,160 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.TownNPCProfiles +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.GameContent +{ + public class TownNPCProfiles + { + private const string DefaultNPCFileFolderPath = "Images/TownNPCs/"; + private static readonly int[] CatHeadIDs = new int[6] + { + 27, + 28, + 29, + 30, + 31, + 32 + }; + private static readonly int[] DogHeadIDs = new int[6] + { + 33, + 34, + 35, + 36, + 37, + 38 + }; + private static readonly int[] BunnyHeadIDs = new int[6] + { + 39, + 40, + 41, + 42, + 43, + 44 + }; + private Dictionary _townNPCProfiles = new Dictionary() + { + { + 369, + (ITownNPCProfile) new Profiles.LegacyNPCProfile("Images/TownNPCs/Angler", 22) + }, + { + 633, + (ITownNPCProfile) new Profiles.TransformableNPCProfile("Images/TownNPCs/BestiaryGirl", 26) + }, + { + 54, + (ITownNPCProfile) new Profiles.LegacyNPCProfile("Images/TownNPCs/Clothier", 7) + }, + { + 209, + (ITownNPCProfile) new Profiles.LegacyNPCProfile("Images/TownNPCs/Cyborg", 16) + }, + { + 38, + (ITownNPCProfile) new Profiles.LegacyNPCProfile("Images/TownNPCs/Demolitionist", 4) + }, + { + 207, + (ITownNPCProfile) new Profiles.LegacyNPCProfile("Images/TownNPCs/DyeTrader", 14) + }, + { + 588, + (ITownNPCProfile) new Profiles.LegacyNPCProfile("Images/TownNPCs/Golfer", 25) + }, + { + 124, + (ITownNPCProfile) new Profiles.LegacyNPCProfile("Images/TownNPCs/Mechanic", 8) + }, + { + 17, + (ITownNPCProfile) new Profiles.LegacyNPCProfile("Images/TownNPCs/Merchant", 2) + }, + { + 18, + (ITownNPCProfile) new Profiles.LegacyNPCProfile("Images/TownNPCs/Nurse", 3) + }, + { + 227, + (ITownNPCProfile) new Profiles.LegacyNPCProfile("Images/TownNPCs/Painter", 17) + }, + { + 229, + (ITownNPCProfile) new Profiles.LegacyNPCProfile("Images/TownNPCs/Pirate", 19) + }, + { + 142, + (ITownNPCProfile) new Profiles.LegacyNPCProfile("Images/TownNPCs/Santa", 11) + }, + { + 453, + (ITownNPCProfile) new Profiles.LegacyNPCProfile("Images/TownNPCs/SkeletonMerchant", -1) + }, + { + 178, + (ITownNPCProfile) new Profiles.LegacyNPCProfile("Images/TownNPCs/Steampunker", 13) + }, + { + 353, + (ITownNPCProfile) new Profiles.LegacyNPCProfile("Images/TownNPCs/Stylist", 20) + }, + { + 441, + (ITownNPCProfile) new Profiles.LegacyNPCProfile("Images/TownNPCs/TaxCollector", 23) + }, + { + 368, + (ITownNPCProfile) new Profiles.LegacyNPCProfile("Images/TownNPCs/TravelingMerchant", 21) + }, + { + 108, + (ITownNPCProfile) new Profiles.LegacyNPCProfile("Images/TownNPCs/Wizard", 10) + }, + { + 637, + (ITownNPCProfile) new Profiles.VariantNPCProfile("Images/TownNPCs/Cat", "Cat", TownNPCProfiles.CatHeadIDs, new string[6] + { + "Siamese", + "Black", + "OrangeTabby", + "RussianBlue", + "Silver", + "White" + }) + }, + { + 638, + (ITownNPCProfile) new Profiles.VariantNPCProfile("Images/TownNPCs/Dog", "Dog", TownNPCProfiles.DogHeadIDs, new string[6] + { + "Labrador", + "PitBull", + "Beagle", + "Corgi", + "Dalmation", + "Husky" + }) + }, + { + 656, + (ITownNPCProfile) new Profiles.VariantNPCProfile("Images/TownNPCs/Bunny", "Bunny", TownNPCProfiles.BunnyHeadIDs, new string[6] + { + "White", + "Angora", + "Dutch", + "Flemish", + "Lop", + "Silver" + }) + } + }; + public static TownNPCProfiles Instance = new TownNPCProfiles(); + + public bool GetProfile(int npcId, out ITownNPCProfile profile) => this._townNPCProfiles.TryGetValue(npcId, out profile); + } +} diff --git a/GameContent/TownRoomManager.cs b/GameContent/TownRoomManager.cs new file mode 100644 index 0000000..5e3c25a --- /dev/null +++ b/GameContent/TownRoomManager.cs @@ -0,0 +1,132 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.TownRoomManager +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using System.IO; +using Terraria.ID; + +namespace Terraria.GameContent +{ + public class TownRoomManager + { + private List> _roomLocationPairs = new List>(); + private bool[] _hasRoom = new bool[663]; + + public void AddOccupantsToList(int x, int y, List occupantsList) => this.AddOccupantsToList(new Point(x, y), occupantsList); + + public void AddOccupantsToList(Point tilePosition, List occupants) + { + foreach (Tuple roomLocationPair in this._roomLocationPairs) + { + if (roomLocationPair.Item2 == tilePosition) + occupants.Add(roomLocationPair.Item1); + } + } + + public bool HasRoomQuick(int npcID) => this._hasRoom[npcID]; + + public bool HasRoom(int npcID, out Point roomPosition) + { + if (!this._hasRoom[npcID]) + { + roomPosition = new Point(0, 0); + return false; + } + foreach (Tuple roomLocationPair in this._roomLocationPairs) + { + if (roomLocationPair.Item1 == npcID) + { + roomPosition = roomLocationPair.Item2; + return true; + } + } + roomPosition = new Point(0, 0); + return false; + } + + public void SetRoom(int npcID, int x, int y) + { + this._hasRoom[npcID] = true; + this.SetRoom(npcID, new Point(x, y)); + } + + public void SetRoom(int npcID, Point pt) + { + this._roomLocationPairs.RemoveAll((Predicate>) (x => x.Item1 == npcID)); + this._roomLocationPairs.Add(Tuple.Create(npcID, pt)); + } + + public void KickOut(NPC n) + { + this.KickOut(n.type); + this._hasRoom[n.type] = false; + } + + public void KickOut(int npcType) => this._roomLocationPairs.RemoveAll((Predicate>) (x => x.Item1 == npcType)); + + public void DisplayRooms() + { + foreach (Tuple roomLocationPair in this._roomLocationPairs) + Dust.QuickDust(roomLocationPair.Item2, Main.hslToRgb((float) ((double) roomLocationPair.Item1 * 0.0500000007450581 % 1.0), 1f, 0.5f)); + } + + public void Save(BinaryWriter writer) + { + lock (this._roomLocationPairs) + { + writer.Write(this._roomLocationPairs.Count); + foreach (Tuple roomLocationPair in this._roomLocationPairs) + { + writer.Write(roomLocationPair.Item1); + writer.Write(roomLocationPair.Item2.X); + writer.Write(roomLocationPair.Item2.Y); + } + } + } + + public void Load(BinaryReader reader) + { + this.Clear(); + int num = reader.ReadInt32(); + for (int index1 = 0; index1 < num; ++index1) + { + int index2 = reader.ReadInt32(); + Point point = new Point(reader.ReadInt32(), reader.ReadInt32()); + this._roomLocationPairs.Add(Tuple.Create(index2, point)); + this._hasRoom[index2] = true; + } + } + + public void Clear() + { + this._roomLocationPairs.Clear(); + for (int index = 0; index < this._hasRoom.Length; ++index) + this._hasRoom[index] = false; + } + + public byte GetHouseholdStatus(NPC n) + { + byte num = 0; + if (n.homeless) + num = (byte) 1; + else if (this.HasRoomQuick(n.type)) + num = (byte) 2; + return num; + } + + public bool CanNPCsLiveWithEachOther(int npc1ByType, NPC npc2) + { + NPC npc1; + return !ContentSamples.NpcsByNetId.TryGetValue(npc1ByType, out npc1) || this.CanNPCsLiveWithEachOther(npc1, npc2); + } + + public bool CanNPCsLiveWithEachOther(NPC npc1, NPC npc2) => npc1.housingCategory != npc2.housingCategory; + + public bool CanNPCsLiveWithEachOther_ShopHelper(NPC npc1, NPC npc2) => this.CanNPCsLiveWithEachOther(npc1, npc2); + } +} diff --git a/GameContent/TreePaintSystemData.cs b/GameContent/TreePaintSystemData.cs new file mode 100644 index 0000000..fb7179b --- /dev/null +++ b/GameContent/TreePaintSystemData.cs @@ -0,0 +1,377 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.TreePaintSystemData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent +{ + public static class TreePaintSystemData + { + private static TreePaintingSettings DefaultNoSpecialGroups = new TreePaintingSettings() + { + UseSpecialGroups = false + }; + private static TreePaintingSettings DefaultNoSpecialGroups_ForWalls = new TreePaintingSettings() + { + UseSpecialGroups = false, + UseWallShaderHacks = true + }; + private static TreePaintingSettings DefaultDirt = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.03f, + SpecialGroupMaximumHueValue = 0.08f, + SpecialGroupMinimumSaturationValue = 0.38f, + SpecialGroupMaximumSaturationValue = 0.53f, + InvertSpecialGroupResult = true + }; + private static TreePaintingSettings CullMud = new TreePaintingSettings() + { + UseSpecialGroups = true, + HueTestOffset = 0.5f, + SpecialGroupMinimalHueValue = 0.42f, + SpecialGroupMaximumHueValue = 0.55f, + SpecialGroupMinimumSaturationValue = 0.2f, + SpecialGroupMaximumSaturationValue = 0.27f, + InvertSpecialGroupResult = true + }; + private static TreePaintingSettings WoodPurity = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.1666667f, + SpecialGroupMaximumHueValue = 0.8333333f, + SpecialGroupMinimumSaturationValue = 0.0f, + SpecialGroupMaximumSaturationValue = 1f + }; + private static TreePaintingSettings WoodCorruption = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.5f, + SpecialGroupMaximumHueValue = 1f, + SpecialGroupMinimumSaturationValue = 0.27f, + SpecialGroupMaximumSaturationValue = 1f + }; + private static TreePaintingSettings WoodJungle = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.1666667f, + SpecialGroupMaximumHueValue = 0.8333333f, + SpecialGroupMinimumSaturationValue = 0.0f, + SpecialGroupMaximumSaturationValue = 1f + }; + private static TreePaintingSettings WoodHallow = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.0f, + SpecialGroupMaximumHueValue = 1f, + SpecialGroupMinimumSaturationValue = 0.0f, + SpecialGroupMaximumSaturationValue = 0.34f, + InvertSpecialGroupResult = true + }; + private static TreePaintingSettings WoodSnow = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.0f, + SpecialGroupMaximumHueValue = 0.06944445f, + SpecialGroupMinimumSaturationValue = 0.0f, + SpecialGroupMaximumSaturationValue = 1f + }; + private static TreePaintingSettings WoodCrimson = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.3333333f, + SpecialGroupMaximumHueValue = 0.6666667f, + SpecialGroupMinimumSaturationValue = 0.0f, + SpecialGroupMaximumSaturationValue = 1f, + InvertSpecialGroupResult = true + }; + private static TreePaintingSettings WoodJungleUnderground = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.1666667f, + SpecialGroupMaximumHueValue = 0.8333333f, + SpecialGroupMinimumSaturationValue = 0.0f, + SpecialGroupMaximumSaturationValue = 1f + }; + private static TreePaintingSettings WoodGlowingMushroom = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.5f, + SpecialGroupMaximumHueValue = 0.8333333f, + SpecialGroupMinimumSaturationValue = 0.0f, + SpecialGroupMaximumSaturationValue = 1f + }; + private static TreePaintingSettings VanityCherry = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.8333333f, + SpecialGroupMaximumHueValue = 1f, + SpecialGroupMinimumSaturationValue = 0.0f, + SpecialGroupMaximumSaturationValue = 1f + }; + private static TreePaintingSettings VanityYellowWillow = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.0f, + SpecialGroupMaximumHueValue = 0.025f, + SpecialGroupMinimumSaturationValue = 0.0f, + SpecialGroupMaximumSaturationValue = 1f, + InvertSpecialGroupResult = true + }; + private static TreePaintingSettings GemTreeRuby = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.0f, + SpecialGroupMaximumHueValue = 1f, + SpecialGroupMinimumSaturationValue = 0.0f, + SpecialGroupMaximumSaturationValue = 1f / 360f, + InvertSpecialGroupResult = true + }; + private static TreePaintingSettings GemTreeAmber = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.0f, + SpecialGroupMaximumHueValue = 1f, + SpecialGroupMinimumSaturationValue = 0.0f, + SpecialGroupMaximumSaturationValue = 1f / 360f, + InvertSpecialGroupResult = true + }; + private static TreePaintingSettings GemTreeSapphire = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.0f, + SpecialGroupMaximumHueValue = 1f, + SpecialGroupMinimumSaturationValue = 0.0f, + SpecialGroupMaximumSaturationValue = 1f / 360f, + InvertSpecialGroupResult = true + }; + private static TreePaintingSettings GemTreeEmerald = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.0f, + SpecialGroupMaximumHueValue = 1f, + SpecialGroupMinimumSaturationValue = 0.0f, + SpecialGroupMaximumSaturationValue = 1f / 360f, + InvertSpecialGroupResult = true + }; + private static TreePaintingSettings GemTreeAmethyst = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.0f, + SpecialGroupMaximumHueValue = 1f, + SpecialGroupMinimumSaturationValue = 0.0f, + SpecialGroupMaximumSaturationValue = 1f / 360f, + InvertSpecialGroupResult = true + }; + private static TreePaintingSettings GemTreeTopaz = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.0f, + SpecialGroupMaximumHueValue = 1f, + SpecialGroupMinimumSaturationValue = 0.0f, + SpecialGroupMaximumSaturationValue = 1f / 360f, + InvertSpecialGroupResult = true + }; + private static TreePaintingSettings GemTreeDiamond = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.0f, + SpecialGroupMaximumHueValue = 1f, + SpecialGroupMinimumSaturationValue = 0.0f, + SpecialGroupMaximumSaturationValue = 1f / 360f, + InvertSpecialGroupResult = true + }; + private static TreePaintingSettings PalmTreePurity = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.1527778f, + SpecialGroupMaximumHueValue = 0.25f, + SpecialGroupMinimumSaturationValue = 0.88f, + SpecialGroupMaximumSaturationValue = 1f + }; + private static TreePaintingSettings PalmTreeCorruption = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.0f, + SpecialGroupMaximumHueValue = 1f, + SpecialGroupMinimumSaturationValue = 0.4f, + SpecialGroupMaximumSaturationValue = 1f + }; + private static TreePaintingSettings PalmTreeCrimson = new TreePaintingSettings() + { + UseSpecialGroups = true, + HueTestOffset = 0.5f, + SpecialGroupMinimalHueValue = 0.3333333f, + SpecialGroupMaximumHueValue = 0.5277778f, + SpecialGroupMinimumSaturationValue = 0.0f, + SpecialGroupMaximumSaturationValue = 1f + }; + private static TreePaintingSettings PalmTreeHallow = new TreePaintingSettings() + { + UseSpecialGroups = true, + SpecialGroupMinimalHueValue = 0.5f, + SpecialGroupMaximumHueValue = 0.6111111f, + SpecialGroupMinimumSaturationValue = 0.0f, + SpecialGroupMaximumSaturationValue = 1f + }; + + public static TreePaintingSettings GetTileSettings( + int tileType, + int tileStyle) + { + switch (tileType) + { + case 0: + case 2: + case 23: + case 109: + case 199: + case 477: + case 492: + return TreePaintSystemData.DefaultDirt; + case 5: + switch (tileStyle) + { + case 0: + return TreePaintSystemData.WoodCorruption; + case 1: + return TreePaintSystemData.WoodJungle; + case 2: + return TreePaintSystemData.WoodHallow; + case 3: + return TreePaintSystemData.WoodSnow; + case 4: + return TreePaintSystemData.WoodCrimson; + case 5: + return TreePaintSystemData.WoodJungleUnderground; + case 6: + return TreePaintSystemData.WoodGlowingMushroom; + default: + return TreePaintSystemData.WoodPurity; + } + case 59: + case 60: + case 70: + return TreePaintSystemData.CullMud; + case 323: + switch (tileStyle) + { + case 0: + case 4: + return TreePaintSystemData.PalmTreePurity; + case 1: + case 5: + return TreePaintSystemData.PalmTreeCrimson; + case 2: + case 6: + return TreePaintSystemData.PalmTreeHallow; + case 3: + case 7: + return TreePaintSystemData.PalmTreeCorruption; + default: + return TreePaintSystemData.WoodPurity; + } + case 583: + return TreePaintSystemData.GemTreeTopaz; + case 584: + return TreePaintSystemData.GemTreeAmethyst; + case 585: + return TreePaintSystemData.GemTreeSapphire; + case 586: + return TreePaintSystemData.GemTreeEmerald; + case 587: + return TreePaintSystemData.GemTreeRuby; + case 588: + return TreePaintSystemData.GemTreeDiamond; + case 589: + return TreePaintSystemData.GemTreeAmber; + case 595: + case 596: + return TreePaintSystemData.VanityCherry; + case 615: + case 616: + return TreePaintSystemData.VanityYellowWillow; + default: + return TreePaintSystemData.DefaultNoSpecialGroups; + } + } + + public static TreePaintingSettings GetTreeFoliageSettings( + int foliageIndex, + int foliageStyle) + { + switch (foliageIndex) + { + case 0: + case 6: + case 7: + case 8: + case 9: + case 10: + return TreePaintSystemData.WoodPurity; + case 1: + return TreePaintSystemData.WoodCorruption; + case 2: + case 11: + case 13: + return TreePaintSystemData.WoodJungle; + case 3: + case 19: + case 20: + return TreePaintSystemData.WoodHallow; + case 4: + case 12: + case 16: + case 17: + case 18: + return TreePaintSystemData.WoodSnow; + case 5: + return TreePaintSystemData.WoodCrimson; + case 14: + return TreePaintSystemData.WoodGlowingMushroom; + case 15: + case 21: + switch (foliageStyle) + { + case 0: + case 4: + return TreePaintSystemData.PalmTreePurity; + case 1: + case 5: + return TreePaintSystemData.PalmTreeCrimson; + case 2: + case 6: + return TreePaintSystemData.PalmTreeHallow; + case 3: + case 7: + return TreePaintSystemData.PalmTreeCorruption; + default: + return TreePaintSystemData.WoodPurity; + } + case 22: + return TreePaintSystemData.GemTreeTopaz; + case 23: + return TreePaintSystemData.GemTreeAmethyst; + case 24: + return TreePaintSystemData.GemTreeSapphire; + case 25: + return TreePaintSystemData.GemTreeEmerald; + case 26: + return TreePaintSystemData.GemTreeRuby; + case 27: + return TreePaintSystemData.GemTreeDiamond; + case 28: + return TreePaintSystemData.GemTreeAmber; + case 29: + return TreePaintSystemData.VanityCherry; + case 30: + return TreePaintSystemData.VanityYellowWillow; + default: + return TreePaintSystemData.DefaultDirt; + } + } + + public static TreePaintingSettings GetWallSettings(int wallType) => TreePaintSystemData.DefaultNoSpecialGroups_ForWalls; + } +} diff --git a/GameContent/TreePaintingSettings.cs b/GameContent/TreePaintingSettings.cs new file mode 100644 index 0000000..59923e1 --- /dev/null +++ b/GameContent/TreePaintingSettings.cs @@ -0,0 +1,20 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.TreePaintingSettings +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent +{ + public class TreePaintingSettings + { + public float SpecialGroupMinimalHueValue; + public float SpecialGroupMaximumHueValue; + public float SpecialGroupMinimumSaturationValue; + public float SpecialGroupMaximumSaturationValue; + public float HueTestOffset; + public bool UseSpecialGroups; + public bool UseWallShaderHacks; + public bool InvertSpecialGroupResult; + } +} diff --git a/GameContent/TreeTopsInfo.cs b/GameContent/TreeTopsInfo.cs new file mode 100644 index 0000000..9778c9b --- /dev/null +++ b/GameContent/TreeTopsInfo.cs @@ -0,0 +1,183 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.TreeTopsInfo +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.IO; +using Terraria.ID; +using Terraria.Utilities; + +namespace Terraria.GameContent +{ + public class TreeTopsInfo + { + private int[] _variations = new int[13]; + + public void Save(BinaryWriter writer) + { + writer.Write(this._variations.Length); + for (int index = 0; index < this._variations.Length; ++index) + writer.Write(this._variations[index]); + } + + public void Load(BinaryReader reader, int loadVersion) + { + if (loadVersion < 211) + { + this.CopyExistingWorldInfo(); + } + else + { + int num = reader.ReadInt32(); + for (int index = 0; index < num && index < this._variations.Length; ++index) + this._variations[index] = reader.ReadInt32(); + } + } + + public void SyncSend(BinaryWriter writer) + { + for (int index = 0; index < this._variations.Length; ++index) + writer.Write((byte) this._variations[index]); + } + + public void SyncReceive(BinaryReader reader) + { + for (int areaID = 0; areaID < this._variations.Length; ++areaID) + { + int variation = this._variations[areaID]; + this._variations[areaID] = (int) reader.ReadByte(); + if (this._variations[areaID] != variation) + this.DoTreeFX(areaID); + } + } + + public int GetTreeStyle(int areaId) => this._variations[areaId]; + + public void RandomizeTreeStyleBasedOnWorldPosition(UnifiedRandom rand, Vector2 worldPosition) + { + Point pt = new Point((int) ((double) worldPosition.X / 16.0), (int) ((double) worldPosition.Y / 16.0) + 1); + Tile tileSafely = Framing.GetTileSafely(pt); + if (!tileSafely.active()) + return; + int areaId = -1; + if (tileSafely.type == (ushort) 70) + areaId = 11; + else if (tileSafely.type == (ushort) 53 && WorldGen.oceanDepths(pt.X, pt.Y)) + areaId = 10; + else if (tileSafely.type == (ushort) 23) + areaId = 4; + else if (tileSafely.type == (ushort) 199) + areaId = 8; + else if (tileSafely.type == (ushort) 109 || tileSafely.type == (ushort) 492) + areaId = 7; + else if (tileSafely.type == (ushort) 53) + areaId = 9; + else if (tileSafely.type == (ushort) 147) + areaId = 6; + else if (tileSafely.type == (ushort) 60) + areaId = 5; + else if (tileSafely.type == (ushort) 2 || tileSafely.type == (ushort) 477) + areaId = pt.X >= Main.treeX[0] ? (pt.X >= Main.treeX[1] ? (pt.X >= Main.treeX[2] ? 3 : 2) : 1) : 0; + if (areaId <= -1) + return; + this.RandomizeTreeStyle(rand, areaId); + } + + public void RandomizeTreeStyle(UnifiedRandom rand, int areaId) + { + int variation = this._variations[areaId]; + bool flag = false; + while (this._variations[areaId] == variation) + { + switch (areaId) + { + case 0: + case 1: + case 2: + case 3: + this._variations[areaId] = rand.Next(6); + break; + case 4: + this._variations[areaId] = rand.Next(5); + break; + case 5: + this._variations[areaId] = rand.Next(6); + break; + case 6: + this._variations[areaId] = rand.NextFromList(0, 1, 2, 21, 22, 3, 31, 32, 4, 41, 42, 5, 6, 7); + break; + case 7: + this._variations[areaId] = rand.Next(5); + break; + case 8: + this._variations[areaId] = rand.Next(6); + break; + case 9: + this._variations[areaId] = rand.Next(5); + break; + case 10: + this._variations[areaId] = rand.Next(6); + break; + case 11: + this._variations[areaId] = rand.Next(4); + break; + default: + flag = true; + break; + } + if (flag) + break; + } + if (variation == this._variations[areaId]) + return; + if (Main.netMode == 2) + NetMessage.SendData(7); + else + this.DoTreeFX(areaId); + } + + private void DoTreeFX(int areaID) + { + } + + public void CopyExistingWorldInfoForWorldGeneration() => this.CopyExistingWorldInfo(); + + private void CopyExistingWorldInfo() + { + this._variations[0] = Main.treeStyle[0]; + this._variations[1] = Main.treeStyle[1]; + this._variations[2] = Main.treeStyle[2]; + this._variations[3] = Main.treeStyle[3]; + this._variations[4] = WorldGen.corruptBG; + this._variations[5] = WorldGen.jungleBG; + this._variations[6] = WorldGen.snowBG; + this._variations[7] = WorldGen.hallowBG; + this._variations[8] = WorldGen.crimsonBG; + this._variations[9] = WorldGen.desertBG; + this._variations[10] = WorldGen.oceanBG; + this._variations[11] = WorldGen.mushroomBG; + this._variations[12] = WorldGen.underworldBG; + } + + public class AreaId + { + public static SetFactory Factory = new SetFactory(13); + public const int Forest1 = 0; + public const int Forest2 = 1; + public const int Forest3 = 2; + public const int Forest4 = 3; + public const int Corruption = 4; + public const int Jungle = 5; + public const int Snow = 6; + public const int Hallow = 7; + public const int Crimson = 8; + public const int Desert = 9; + public const int Ocean = 10; + public const int GlowingMushroom = 11; + public const int Underworld = 12; + public const int Count = 13; + } + } +} diff --git a/GameContent/UI/BigProgressBar/BigProgressBarHelper.cs b/GameContent/UI/BigProgressBar/BigProgressBarHelper.cs new file mode 100644 index 0000000..8d6cd10 --- /dev/null +++ b/GameContent/UI/BigProgressBar/BigProgressBarHelper.cs @@ -0,0 +1,116 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.BigProgressBar.BigProgressBarHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; + +namespace Terraria.GameContent.UI.BigProgressBar +{ + public class BigProgressBarHelper + { + private const string _bossBarTexturePath = "Images/UI/UI_BossBar"; + + public static void DrawBareBonesBar(SpriteBatch spriteBatch, float lifePercent) + { + Rectangle destinationRectangle1 = Utils.CenteredRectangle(Main.ScreenSize.ToVector2() * new Vector2(0.5f, 1f) + new Vector2(0.0f, -50f), new Vector2(400f, 20f)); + Rectangle destinationRectangle2 = destinationRectangle1; + destinationRectangle2.Inflate(2, 2); + Texture2D texture = TextureAssets.MagicPixel.Value; + Rectangle rectangle = new Rectangle(0, 0, 1, 1); + Rectangle destinationRectangle3 = destinationRectangle1; + destinationRectangle3.Width = (int) ((double) destinationRectangle3.Width * (double) lifePercent); + spriteBatch.Draw(texture, destinationRectangle2, new Rectangle?(rectangle), Color.White * 0.6f); + spriteBatch.Draw(texture, destinationRectangle1, new Rectangle?(rectangle), Color.Black * 0.6f); + spriteBatch.Draw(texture, destinationRectangle3, new Rectangle?(rectangle), Color.LimeGreen * 0.5f); + } + + public static void DrawFancyBar( + SpriteBatch spriteBatch, + float lifePercent, + Texture2D barIconTexture, + Rectangle barIconFrame) + { + Texture2D texture2D = Main.Assets.Request("Images/UI/UI_BossBar", (AssetRequestMode) 1).Value; + Point p1 = new Point(456, 22); + Point p2 = new Point(32, 24); + int verticalFrames = 6; + Rectangle rectangle1 = texture2D.Frame(verticalFrames: verticalFrames, frameY: 3); + Color color = Color.White * 0.2f; + int num1 = (int) ((double) p1.X * (double) lifePercent); + int num2 = num1 - num1 % 2; + Rectangle rectangle2 = texture2D.Frame(verticalFrames: verticalFrames, frameY: 2); + rectangle2.X += p2.X; + rectangle2.Y += p2.Y; + rectangle2.Width = 2; + rectangle2.Height = p1.Y; + Rectangle rectangle3 = texture2D.Frame(verticalFrames: verticalFrames, frameY: 1); + rectangle3.X += p2.X; + rectangle3.Y += p2.Y; + rectangle3.Width = 2; + rectangle3.Height = p1.Y; + Rectangle r = Utils.CenteredRectangle(Main.ScreenSize.ToVector2() * new Vector2(0.5f, 1f) + new Vector2(0.0f, -50f), p1.ToVector2()); + Vector2 position = r.TopLeft() - p2.ToVector2(); + spriteBatch.Draw(texture2D, position, new Rectangle?(rectangle1), color, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + spriteBatch.Draw(texture2D, r.TopLeft(), new Rectangle?(rectangle2), Color.White, 0.0f, Vector2.Zero, new Vector2((float) (num2 / rectangle2.Width), 1f), SpriteEffects.None, 0.0f); + spriteBatch.Draw(texture2D, r.TopLeft() + new Vector2((float) (num2 - 2), 0.0f), new Rectangle?(rectangle3), Color.White, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + Rectangle rectangle4 = texture2D.Frame(verticalFrames: verticalFrames); + spriteBatch.Draw(texture2D, position, new Rectangle?(rectangle4), Color.White, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + Vector2 vector2 = new Vector2(4f, 20f) + new Vector2(26f, 28f) / 2f; + spriteBatch.Draw(barIconTexture, position + vector2, new Rectangle?(barIconFrame), Color.White, 0.0f, barIconFrame.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + } + + public static void DrawFancyBar( + SpriteBatch spriteBatch, + float lifePercent, + Texture2D barIconTexture, + Rectangle barIconFrame, + float shieldPercent) + { + Texture2D texture2D = Main.Assets.Request("Images/UI/UI_BossBar", (AssetRequestMode) 1).Value; + Point p1 = new Point(456, 22); + Point p2 = new Point(32, 24); + int verticalFrames = 6; + Rectangle rectangle1 = texture2D.Frame(verticalFrames: verticalFrames, frameY: 3); + Color color = Color.White * 0.2f; + int num1 = (int) ((double) p1.X * (double) lifePercent); + int num2 = num1 - num1 % 2; + Rectangle rectangle2 = texture2D.Frame(verticalFrames: verticalFrames, frameY: 2); + rectangle2.X += p2.X; + rectangle2.Y += p2.Y; + rectangle2.Width = 2; + rectangle2.Height = p1.Y; + Rectangle rectangle3 = texture2D.Frame(verticalFrames: verticalFrames, frameY: 1); + rectangle3.X += p2.X; + rectangle3.Y += p2.Y; + rectangle3.Width = 2; + rectangle3.Height = p1.Y; + int num3 = (int) ((double) p1.X * (double) shieldPercent); + int num4 = num3 - num3 % 2; + Rectangle rectangle4 = texture2D.Frame(verticalFrames: verticalFrames, frameY: 5); + rectangle4.X += p2.X; + rectangle4.Y += p2.Y; + rectangle4.Width = 2; + rectangle4.Height = p1.Y; + Rectangle rectangle5 = texture2D.Frame(verticalFrames: verticalFrames, frameY: 4); + rectangle5.X += p2.X; + rectangle5.Y += p2.Y; + rectangle5.Width = 2; + rectangle5.Height = p1.Y; + Rectangle r = Utils.CenteredRectangle(Main.ScreenSize.ToVector2() * new Vector2(0.5f, 1f) + new Vector2(0.0f, -50f), p1.ToVector2()); + Vector2 position = r.TopLeft() - p2.ToVector2(); + spriteBatch.Draw(texture2D, position, new Rectangle?(rectangle1), color, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + spriteBatch.Draw(texture2D, r.TopLeft(), new Rectangle?(rectangle2), Color.White, 0.0f, Vector2.Zero, new Vector2((float) (num2 / rectangle2.Width), 1f), SpriteEffects.None, 0.0f); + spriteBatch.Draw(texture2D, r.TopLeft() + new Vector2((float) (num2 - 2), 0.0f), new Rectangle?(rectangle3), Color.White, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + spriteBatch.Draw(texture2D, r.TopLeft(), new Rectangle?(rectangle4), Color.White, 0.0f, Vector2.Zero, new Vector2((float) (num4 / rectangle4.Width), 1f), SpriteEffects.None, 0.0f); + spriteBatch.Draw(texture2D, r.TopLeft() + new Vector2((float) (num4 - 2), 0.0f), new Rectangle?(rectangle5), Color.White, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + Rectangle rectangle6 = texture2D.Frame(verticalFrames: verticalFrames); + spriteBatch.Draw(texture2D, position, new Rectangle?(rectangle6), Color.White, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + Vector2 vector2 = new Vector2(4f, 20f) + barIconFrame.Size() / 2f; + spriteBatch.Draw(barIconTexture, position + vector2, new Rectangle?(barIconFrame), Color.White, 0.0f, barIconFrame.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + } + } +} diff --git a/GameContent/UI/BigProgressBar/BigProgressBarInfo.cs b/GameContent/UI/BigProgressBar/BigProgressBarInfo.cs new file mode 100644 index 0000000..c9f713b --- /dev/null +++ b/GameContent/UI/BigProgressBar/BigProgressBarInfo.cs @@ -0,0 +1,14 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.BigProgressBar.BigProgressBarInfo +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.UI.BigProgressBar +{ + public struct BigProgressBarInfo + { + public int npcIndexToAimAt; + public bool validatedAtLeastOnce; + } +} diff --git a/GameContent/UI/BigProgressBar/BigProgressBarSystem.cs b/GameContent/UI/BigProgressBar/BigProgressBarSystem.cs new file mode 100644 index 0000000..38b3b6e --- /dev/null +++ b/GameContent/UI/BigProgressBar/BigProgressBarSystem.cs @@ -0,0 +1,185 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.BigProgressBar.BigProgressBarSystem +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; + +namespace Terraria.GameContent.UI.BigProgressBar +{ + public class BigProgressBarSystem + { + private IBigProgressBar _currentBar; + private CommonBossBigProgressBar _bossBar = new CommonBossBigProgressBar(); + private BigProgressBarInfo _info; + private static TwinsBigProgressBar _twinsBar = new TwinsBigProgressBar(); + private static EaterOfWorldsProgressBar _eaterOfWorldsBar = new EaterOfWorldsProgressBar(); + private static BrainOfCthuluBigProgressBar _brainOfCthuluBar = new BrainOfCthuluBigProgressBar(); + private static GolemHeadProgressBar _golemBar = new GolemHeadProgressBar(); + private static MoonLordProgressBar _moonlordBar = new MoonLordProgressBar(); + private static SolarFlarePillarBigProgressBar _solarPillarBar = new SolarFlarePillarBigProgressBar(); + private static VortexPillarBigProgressBar _vortexPillarBar = new VortexPillarBigProgressBar(); + private static NebulaPillarBigProgressBar _nebulaPillarBar = new NebulaPillarBigProgressBar(); + private static StardustPillarBigProgressBar _stardustPillarBar = new StardustPillarBigProgressBar(); + private static NeverValidProgressBar _neverValid = new NeverValidProgressBar(); + private static PirateShipBigProgressBar _pirateShipBar = new PirateShipBigProgressBar(); + private static MartianSaucerBigProgressBar _martianSaucerBar = new MartianSaucerBigProgressBar(); + private Dictionary _bossBarsByNpcNetId = new Dictionary() + { + { + 125, + (IBigProgressBar) BigProgressBarSystem._twinsBar + }, + { + 126, + (IBigProgressBar) BigProgressBarSystem._twinsBar + }, + { + 13, + (IBigProgressBar) BigProgressBarSystem._eaterOfWorldsBar + }, + { + 14, + (IBigProgressBar) BigProgressBarSystem._eaterOfWorldsBar + }, + { + 15, + (IBigProgressBar) BigProgressBarSystem._eaterOfWorldsBar + }, + { + 266, + (IBigProgressBar) BigProgressBarSystem._brainOfCthuluBar + }, + { + 245, + (IBigProgressBar) BigProgressBarSystem._golemBar + }, + { + 246, + (IBigProgressBar) BigProgressBarSystem._golemBar + }, + { + 517, + (IBigProgressBar) BigProgressBarSystem._solarPillarBar + }, + { + 422, + (IBigProgressBar) BigProgressBarSystem._vortexPillarBar + }, + { + 507, + (IBigProgressBar) BigProgressBarSystem._nebulaPillarBar + }, + { + 493, + (IBigProgressBar) BigProgressBarSystem._stardustPillarBar + }, + { + 398, + (IBigProgressBar) BigProgressBarSystem._moonlordBar + }, + { + 396, + (IBigProgressBar) BigProgressBarSystem._moonlordBar + }, + { + 397, + (IBigProgressBar) BigProgressBarSystem._moonlordBar + }, + { + 548, + (IBigProgressBar) BigProgressBarSystem._neverValid + }, + { + 549, + (IBigProgressBar) BigProgressBarSystem._neverValid + }, + { + 491, + (IBigProgressBar) BigProgressBarSystem._pirateShipBar + }, + { + 492, + (IBigProgressBar) BigProgressBarSystem._pirateShipBar + }, + { + 440, + (IBigProgressBar) BigProgressBarSystem._neverValid + }, + { + 395, + (IBigProgressBar) BigProgressBarSystem._martianSaucerBar + }, + { + 393, + (IBigProgressBar) BigProgressBarSystem._martianSaucerBar + }, + { + 394, + (IBigProgressBar) BigProgressBarSystem._martianSaucerBar + }, + { + 68, + (IBigProgressBar) BigProgressBarSystem._neverValid + } + }; + + public void Update() + { + if (this._currentBar == null) + this.TryFindingNPCToTrack(); + if (this._currentBar == null || this._currentBar.ValidateAndCollectNecessaryInfo(ref this._info)) + return; + this._currentBar = (IBigProgressBar) null; + } + + public void Draw(SpriteBatch spriteBatch) + { + if (this._currentBar == null) + return; + this._currentBar.Draw(ref this._info, spriteBatch); + } + + private void TryFindingNPCToTrack() + { + Rectangle rectangle = new Rectangle((int) Main.screenPosition.X, (int) Main.screenPosition.Y, Main.screenWidth, Main.screenHeight); + rectangle.Inflate(5000, 5000); + float num1 = float.PositiveInfinity; + for (int npcIndex = 0; npcIndex < 200; ++npcIndex) + { + NPC npc = Main.npc[npcIndex]; + if (npc.active && npc.Hitbox.Intersects(rectangle)) + { + float num2 = npc.Distance(Main.LocalPlayer.Center); + if ((double) num1 > (double) num2 && this.TryTracking(npcIndex)) + num1 = num2; + } + } + } + + public bool TryTracking(int npcIndex) + { + if (npcIndex < 0 || npcIndex > 200) + return false; + NPC npc = Main.npc[npcIndex]; + if (!npc.active) + return false; + BigProgressBarInfo info = new BigProgressBarInfo() + { + npcIndexToAimAt = npcIndex + }; + IBigProgressBar bigProgressBar1 = (IBigProgressBar) this._bossBar; + IBigProgressBar bigProgressBar2; + if (this._bossBarsByNpcNetId.TryGetValue(npc.netID, out bigProgressBar2)) + bigProgressBar1 = bigProgressBar2; + if (!bigProgressBar1.ValidateAndCollectNecessaryInfo(ref info)) + return false; + this._currentBar = bigProgressBar1; + this._info = info; + return true; + } + } +} diff --git a/GameContent/UI/BigProgressBar/BrainOfCthuluBigProgressBar.cs b/GameContent/UI/BigProgressBar/BrainOfCthuluBigProgressBar.cs new file mode 100644 index 0000000..0f7167f --- /dev/null +++ b/GameContent/UI/BigProgressBar/BrainOfCthuluBigProgressBar.cs @@ -0,0 +1,49 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.BigProgressBar.BrainOfCthuluBigProgressBar +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.ID; + +namespace Terraria.GameContent.UI.BigProgressBar +{ + public class BrainOfCthuluBigProgressBar : IBigProgressBar + { + private float _lifePercentToShow; + private NPC _creeperForReference; + + public BrainOfCthuluBigProgressBar() => this._creeperForReference = new NPC(); + + public bool ValidateAndCollectNecessaryInfo(ref BigProgressBarInfo info) + { + if (info.npcIndexToAimAt < 0 || info.npcIndexToAimAt > 200) + return false; + NPC npc1 = Main.npc[info.npcIndexToAimAt]; + if (!npc1.active) + return false; + int cthuluCreepersCount = NPC.GetBrainOfCthuluCreepersCount(); + this._creeperForReference.SetDefaults(267, npc1.GetMatchingSpawnParams()); + int num1 = this._creeperForReference.lifeMax * cthuluCreepersCount; + float num2 = 0.0f; + for (int index = 0; index < 200; ++index) + { + NPC npc2 = Main.npc[index]; + if (npc2.active && npc2.type == this._creeperForReference.type) + num2 += (float) npc2.life; + } + this._lifePercentToShow = Utils.Clamp(((float) npc1.life + num2) / (float) (npc1.lifeMax + num1), 0.0f, 1f); + return true; + } + + public void Draw(ref BigProgressBarInfo info, SpriteBatch spriteBatch) + { + int bossHeadTexture = NPCID.Sets.BossHeadTextures[266]; + Texture2D texture2D = TextureAssets.NpcHeadBoss[bossHeadTexture].Value; + Rectangle barIconFrame = texture2D.Frame(); + BigProgressBarHelper.DrawFancyBar(spriteBatch, this._lifePercentToShow, texture2D, barIconFrame); + } + } +} diff --git a/GameContent/UI/BigProgressBar/CommonBossBigProgressBar.cs b/GameContent/UI/BigProgressBar/CommonBossBigProgressBar.cs new file mode 100644 index 0000000..add7715 --- /dev/null +++ b/GameContent/UI/BigProgressBar/CommonBossBigProgressBar.cs @@ -0,0 +1,39 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.BigProgressBar.CommonBossBigProgressBar +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.GameContent.UI.BigProgressBar +{ + public class CommonBossBigProgressBar : IBigProgressBar + { + private float _lifePercentToShow; + private int _headIndex; + + public bool ValidateAndCollectNecessaryInfo(ref BigProgressBarInfo info) + { + if (info.npcIndexToAimAt < 0 || info.npcIndexToAimAt > 200) + return false; + NPC npc = Main.npc[info.npcIndexToAimAt]; + if (!npc.active) + return false; + int headTextureIndex = npc.GetBossHeadTextureIndex(); + if (headTextureIndex == -1) + return false; + this._lifePercentToShow = Utils.Clamp((float) npc.life / (float) npc.lifeMax, 0.0f, 1f); + this._headIndex = headTextureIndex; + return true; + } + + public void Draw(ref BigProgressBarInfo info, SpriteBatch spriteBatch) + { + Texture2D texture2D = TextureAssets.NpcHeadBoss[this._headIndex].Value; + Rectangle barIconFrame = texture2D.Frame(); + BigProgressBarHelper.DrawFancyBar(spriteBatch, this._lifePercentToShow, texture2D, barIconFrame); + } + } +} diff --git a/GameContent/UI/BigProgressBar/EaterOfWorldsProgressBar.cs b/GameContent/UI/BigProgressBar/EaterOfWorldsProgressBar.cs new file mode 100644 index 0000000..b06eaef --- /dev/null +++ b/GameContent/UI/BigProgressBar/EaterOfWorldsProgressBar.cs @@ -0,0 +1,55 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.BigProgressBar.EaterOfWorldsProgressBar +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.ID; + +namespace Terraria.GameContent.UI.BigProgressBar +{ + public class EaterOfWorldsProgressBar : IBigProgressBar + { + private float _lifePercentToShow; + + public bool ValidateAndCollectNecessaryInfo(ref BigProgressBarInfo info) + { + if (info.npcIndexToAimAt < 0 || info.npcIndexToAimAt > 200 || !Main.npc[info.npcIndexToAimAt].active && !this.TryFindingAnotherEOWPiece(ref info)) + return false; + int worldsSegmentsCount = NPC.GetEaterOfWorldsSegmentsCount(); + float num = 0.0f; + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && npc.type >= 13 && npc.type <= 15) + num += (float) npc.life / (float) npc.lifeMax; + } + this._lifePercentToShow = Utils.Clamp(num / (float) worldsSegmentsCount, 0.0f, 1f); + return true; + } + + public void Draw(ref BigProgressBarInfo info, SpriteBatch spriteBatch) + { + int bossHeadTexture = NPCID.Sets.BossHeadTextures[13]; + Texture2D texture2D = TextureAssets.NpcHeadBoss[bossHeadTexture].Value; + Rectangle barIconFrame = texture2D.Frame(); + BigProgressBarHelper.DrawFancyBar(spriteBatch, this._lifePercentToShow, texture2D, barIconFrame); + } + + private bool TryFindingAnotherEOWPiece(ref BigProgressBarInfo info) + { + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && npc.type >= 13 && npc.type <= 15) + { + info.npcIndexToAimAt = index; + return true; + } + } + return false; + } + } +} diff --git a/GameContent/UI/BigProgressBar/GolemHeadProgressBar.cs b/GameContent/UI/BigProgressBar/GolemHeadProgressBar.cs new file mode 100644 index 0000000..f6d6b08 --- /dev/null +++ b/GameContent/UI/BigProgressBar/GolemHeadProgressBar.cs @@ -0,0 +1,71 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.BigProgressBar.GolemHeadProgressBar +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; +using Terraria.ID; + +namespace Terraria.GameContent.UI.BigProgressBar +{ + public class GolemHeadProgressBar : IBigProgressBar + { + private float _lifePercentToShow; + private NPC _referenceDummy; + private HashSet ValidIds = new HashSet() + { + 246, + 245 + }; + + public GolemHeadProgressBar() => this._referenceDummy = new NPC(); + + public bool ValidateAndCollectNecessaryInfo(ref BigProgressBarInfo info) + { + if (info.npcIndexToAimAt < 0 || info.npcIndexToAimAt > 200) + return false; + NPC npc1 = Main.npc[info.npcIndexToAimAt]; + if (!npc1.active && !this.TryFindingAnotherGolemPiece(ref info)) + return false; + int num1 = 0; + this._referenceDummy.SetDefaults(245, npc1.GetMatchingSpawnParams()); + int num2 = num1 + this._referenceDummy.lifeMax; + this._referenceDummy.SetDefaults(246, npc1.GetMatchingSpawnParams()); + int num3 = num2 + this._referenceDummy.lifeMax; + float num4 = 0.0f; + for (int index = 0; index < 200; ++index) + { + NPC npc2 = Main.npc[index]; + if (npc2.active && this.ValidIds.Contains(npc2.type)) + num4 += (float) npc2.life; + } + this._lifePercentToShow = Utils.Clamp(num4 / (float) num3, 0.0f, 1f); + return true; + } + + public void Draw(ref BigProgressBarInfo info, SpriteBatch spriteBatch) + { + int bossHeadTexture = NPCID.Sets.BossHeadTextures[246]; + Texture2D texture2D = TextureAssets.NpcHeadBoss[bossHeadTexture].Value; + Rectangle barIconFrame = texture2D.Frame(); + BigProgressBarHelper.DrawFancyBar(spriteBatch, this._lifePercentToShow, texture2D, barIconFrame); + } + + private bool TryFindingAnotherGolemPiece(ref BigProgressBarInfo info) + { + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && this.ValidIds.Contains(npc.type)) + { + info.npcIndexToAimAt = index; + return true; + } + } + return false; + } + } +} diff --git a/GameContent/UI/BigProgressBar/IBigProgressBar.cs b/GameContent/UI/BigProgressBar/IBigProgressBar.cs new file mode 100644 index 0000000..4d17f13 --- /dev/null +++ b/GameContent/UI/BigProgressBar/IBigProgressBar.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.BigProgressBar.IBigProgressBar +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.GameContent.UI.BigProgressBar +{ + internal interface IBigProgressBar + { + bool ValidateAndCollectNecessaryInfo(ref BigProgressBarInfo info); + + void Draw(ref BigProgressBarInfo info, SpriteBatch spriteBatch); + } +} diff --git a/GameContent/UI/BigProgressBar/LunarPillarBigProgessBar.cs b/GameContent/UI/BigProgressBar/LunarPillarBigProgessBar.cs new file mode 100644 index 0000000..d7a7bff --- /dev/null +++ b/GameContent/UI/BigProgressBar/LunarPillarBigProgessBar.cs @@ -0,0 +1,50 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.BigProgressBar.LunarPillarBigProgessBar +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.GameContent.UI.BigProgressBar +{ + public abstract class LunarPillarBigProgessBar : IBigProgressBar + { + private float _lifePercentToShow; + private float _shieldPercentToShow; + private int _headIndex; + + public bool ValidateAndCollectNecessaryInfo(ref BigProgressBarInfo info) + { + if (info.npcIndexToAimAt < 0 || info.npcIndexToAimAt > 200) + return false; + NPC npc = Main.npc[info.npcIndexToAimAt]; + if (!npc.active) + return false; + int headTextureIndex = npc.GetBossHeadTextureIndex(); + if (headTextureIndex == -1 || !this.IsPlayerInCombatArea() || (double) npc.ai[2] == 1.0) + return false; + float num1 = Utils.Clamp((float) npc.life / (float) npc.lifeMax, 0.0f, 1f); + float num2 = this.GetCurrentShieldValue() / this.GetMaxShieldValue(); + double num3 = 600.0 * (double) Main.GameModeInfo.EnemyMaxLifeMultiplier * (double) this.GetMaxShieldValue() / (double) npc.lifeMax; + this._lifePercentToShow = num1; + this._shieldPercentToShow = num2; + this._headIndex = headTextureIndex; + return true; + } + + public void Draw(ref BigProgressBarInfo info, SpriteBatch spriteBatch) + { + Texture2D texture2D = TextureAssets.NpcHeadBoss[this._headIndex].Value; + Rectangle barIconFrame = texture2D.Frame(); + BigProgressBarHelper.DrawFancyBar(spriteBatch, this._lifePercentToShow, texture2D, barIconFrame, this._shieldPercentToShow); + } + + internal abstract float GetCurrentShieldValue(); + + internal abstract float GetMaxShieldValue(); + + internal abstract bool IsPlayerInCombatArea(); + } +} diff --git a/GameContent/UI/BigProgressBar/MartianSaucerBigProgressBar.cs b/GameContent/UI/BigProgressBar/MartianSaucerBigProgressBar.cs new file mode 100644 index 0000000..d2ef7aa --- /dev/null +++ b/GameContent/UI/BigProgressBar/MartianSaucerBigProgressBar.cs @@ -0,0 +1,85 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.BigProgressBar.MartianSaucerBigProgressBar +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; +using Terraria.ID; + +namespace Terraria.GameContent.UI.BigProgressBar +{ + public class MartianSaucerBigProgressBar : IBigProgressBar + { + private float _lifePercentToShow; + private NPC _referenceDummy; + private HashSet ValidIds = new HashSet() + { + 395 + }; + private HashSet ValidIdsToScanHp = new HashSet() + { + 395, + 393, + 394 + }; + + public MartianSaucerBigProgressBar() => this._referenceDummy = new NPC(); + + public bool ValidateAndCollectNecessaryInfo(ref BigProgressBarInfo info) + { + if (info.npcIndexToAimAt < 0 || info.npcIndexToAimAt > 200) + return false; + NPC npc1 = Main.npc[info.npcIndexToAimAt]; + if (!npc1.active || npc1.type != 395) + { + if (!this.TryFindingAnotherMartianSaucerPiece(ref info)) + return false; + npc1 = Main.npc[info.npcIndexToAimAt]; + } + int num1 = 0; + if (Main.expertMode) + { + this._referenceDummy.SetDefaults(395, npc1.GetMatchingSpawnParams()); + num1 += this._referenceDummy.lifeMax; + } + this._referenceDummy.SetDefaults(394, npc1.GetMatchingSpawnParams()); + int num2 = num1 + this._referenceDummy.lifeMax * 2; + this._referenceDummy.SetDefaults(393, npc1.GetMatchingSpawnParams()); + int num3 = num2 + this._referenceDummy.lifeMax * 2; + float num4 = 0.0f; + for (int index = 0; index < 200; ++index) + { + NPC npc2 = Main.npc[index]; + if (npc2.active && this.ValidIdsToScanHp.Contains(npc2.type) && (Main.expertMode || npc2.type != 395)) + num4 += (float) npc2.life; + } + this._lifePercentToShow = Utils.Clamp(num4 / (float) num3, 0.0f, 1f); + return true; + } + + public void Draw(ref BigProgressBarInfo info, SpriteBatch spriteBatch) + { + int bossHeadTexture = NPCID.Sets.BossHeadTextures[395]; + Texture2D texture2D = TextureAssets.NpcHeadBoss[bossHeadTexture].Value; + Rectangle barIconFrame = texture2D.Frame(); + BigProgressBarHelper.DrawFancyBar(spriteBatch, this._lifePercentToShow, texture2D, barIconFrame); + } + + private bool TryFindingAnotherMartianSaucerPiece(ref BigProgressBarInfo info) + { + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && this.ValidIds.Contains(npc.type)) + { + info.npcIndexToAimAt = index; + return true; + } + } + return false; + } + } +} diff --git a/GameContent/UI/BigProgressBar/MoonLordProgressBar.cs b/GameContent/UI/BigProgressBar/MoonLordProgressBar.cs new file mode 100644 index 0000000..f26915e --- /dev/null +++ b/GameContent/UI/BigProgressBar/MoonLordProgressBar.cs @@ -0,0 +1,81 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.BigProgressBar.MoonLordProgressBar +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; +using Terraria.ID; + +namespace Terraria.GameContent.UI.BigProgressBar +{ + public class MoonLordProgressBar : IBigProgressBar + { + private float _lifePercentToShow; + private NPC _referenceDummy; + private HashSet ValidIds = new HashSet() + { + 396, + 397, + 398 + }; + + public MoonLordProgressBar() => this._referenceDummy = new NPC(); + + public bool ValidateAndCollectNecessaryInfo(ref BigProgressBarInfo info) + { + if (info.npcIndexToAimAt < 0 || info.npcIndexToAimAt > 200) + return false; + NPC npc1 = Main.npc[info.npcIndexToAimAt]; + if ((!npc1.active || this.IsInBadAI(npc1)) && !this.TryFindingAnotherMoonLordPiece(ref info)) + return false; + int num1 = 0; + NPCSpawnParams spawnparams = new NPCSpawnParams() + { + strengthMultiplierOverride = new float?(npc1.strengthMultiplier), + playerCountForMultiplayerDifficultyOverride = new int?(npc1.statsAreScaledForThisManyPlayers) + }; + this._referenceDummy.SetDefaults(398, spawnparams); + int num2 = num1 + this._referenceDummy.lifeMax; + this._referenceDummy.SetDefaults(396, spawnparams); + int num3 = num2 + this._referenceDummy.lifeMax; + this._referenceDummy.SetDefaults(397, spawnparams); + int num4 = num3 + this._referenceDummy.lifeMax + this._referenceDummy.lifeMax; + float num5 = 0.0f; + for (int index = 0; index < 200; ++index) + { + NPC npc2 = Main.npc[index]; + if (npc2.active && this.ValidIds.Contains(npc2.type) && !this.IsInBadAI(npc2)) + num5 += (float) npc2.life; + } + this._lifePercentToShow = Utils.Clamp(num5 / (float) num4, 0.0f, 1f); + return true; + } + + private bool IsInBadAI(NPC npc) => npc.type == 398 && ((double) npc.ai[0] == 2.0 || (double) npc.ai[0] == -1.0) || (double) npc.ai[0] == -2.0 || (double) npc.ai[0] == -3.0; + + public void Draw(ref BigProgressBarInfo info, SpriteBatch spriteBatch) + { + int bossHeadTexture = NPCID.Sets.BossHeadTextures[396]; + Texture2D texture2D = TextureAssets.NpcHeadBoss[bossHeadTexture].Value; + Rectangle barIconFrame = texture2D.Frame(); + BigProgressBarHelper.DrawFancyBar(spriteBatch, this._lifePercentToShow, texture2D, barIconFrame); + } + + private bool TryFindingAnotherMoonLordPiece(ref BigProgressBarInfo info) + { + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && this.ValidIds.Contains(npc.type) && !this.IsInBadAI(npc)) + { + info.npcIndexToAimAt = index; + return true; + } + } + return false; + } + } +} diff --git a/GameContent/UI/BigProgressBar/NebulaPillarBigProgressBar.cs b/GameContent/UI/BigProgressBar/NebulaPillarBigProgressBar.cs new file mode 100644 index 0000000..b8fa038 --- /dev/null +++ b/GameContent/UI/BigProgressBar/NebulaPillarBigProgressBar.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.BigProgressBar.NebulaPillarBigProgressBar +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.UI.BigProgressBar +{ + public class NebulaPillarBigProgressBar : LunarPillarBigProgessBar + { + internal override float GetCurrentShieldValue() => (float) NPC.ShieldStrengthTowerNebula; + + internal override float GetMaxShieldValue() => (float) NPC.ShieldStrengthTowerMax; + + internal override bool IsPlayerInCombatArea() => Main.LocalPlayer.ZoneTowerNebula; + } +} diff --git a/GameContent/UI/BigProgressBar/NeverValidProgressBar.cs b/GameContent/UI/BigProgressBar/NeverValidProgressBar.cs new file mode 100644 index 0000000..6b3f060 --- /dev/null +++ b/GameContent/UI/BigProgressBar/NeverValidProgressBar.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.BigProgressBar.NeverValidProgressBar +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.GameContent.UI.BigProgressBar +{ + public class NeverValidProgressBar : IBigProgressBar + { + public bool ValidateAndCollectNecessaryInfo(ref BigProgressBarInfo info) => false; + + public void Draw(ref BigProgressBarInfo info, SpriteBatch spriteBatch) + { + } + } +} diff --git a/GameContent/UI/BigProgressBar/PirateShipBigProgressBar.cs b/GameContent/UI/BigProgressBar/PirateShipBigProgressBar.cs new file mode 100644 index 0000000..ae13172 --- /dev/null +++ b/GameContent/UI/BigProgressBar/PirateShipBigProgressBar.cs @@ -0,0 +1,76 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.BigProgressBar.PirateShipBigProgressBar +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; +using Terraria.ID; + +namespace Terraria.GameContent.UI.BigProgressBar +{ + public class PirateShipBigProgressBar : IBigProgressBar + { + private float _lifePercentToShow; + private NPC _referenceDummy; + private HashSet ValidIds = new HashSet() + { + 491 + }; + + public PirateShipBigProgressBar() => this._referenceDummy = new NPC(); + + public bool ValidateAndCollectNecessaryInfo(ref BigProgressBarInfo info) + { + if (info.npcIndexToAimAt < 0 || info.npcIndexToAimAt > 200) + return false; + NPC npc1 = Main.npc[info.npcIndexToAimAt]; + if (!npc1.active || npc1.type != 491) + { + if (!this.TryFindingAnotherPirateShipPiece(ref info)) + return false; + npc1 = Main.npc[info.npcIndexToAimAt]; + } + int num1 = 0; + this._referenceDummy.SetDefaults(492, npc1.GetMatchingSpawnParams()); + int num2 = num1 + this._referenceDummy.lifeMax * 4; + float num3 = 0.0f; + for (int index1 = 0; index1 < 4; ++index1) + { + int index2 = (int) npc1.ai[index1]; + if (Main.npc.IndexInRange(index2)) + { + NPC npc2 = Main.npc[index2]; + if (npc2.active && npc2.type == 492) + num3 += (float) npc2.life; + } + } + this._lifePercentToShow = Utils.Clamp(num3 / (float) num2, 0.0f, 1f); + return true; + } + + public void Draw(ref BigProgressBarInfo info, SpriteBatch spriteBatch) + { + int bossHeadTexture = NPCID.Sets.BossHeadTextures[491]; + Texture2D texture2D = TextureAssets.NpcHeadBoss[bossHeadTexture].Value; + Rectangle barIconFrame = texture2D.Frame(); + BigProgressBarHelper.DrawFancyBar(spriteBatch, this._lifePercentToShow, texture2D, barIconFrame); + } + + private bool TryFindingAnotherPirateShipPiece(ref BigProgressBarInfo info) + { + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && this.ValidIds.Contains(npc.type)) + { + info.npcIndexToAimAt = index; + return true; + } + } + return false; + } + } +} diff --git a/GameContent/UI/BigProgressBar/SolarFlarePillarBigProgressBar.cs b/GameContent/UI/BigProgressBar/SolarFlarePillarBigProgressBar.cs new file mode 100644 index 0000000..09346f2 --- /dev/null +++ b/GameContent/UI/BigProgressBar/SolarFlarePillarBigProgressBar.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.BigProgressBar.SolarFlarePillarBigProgressBar +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.UI.BigProgressBar +{ + public class SolarFlarePillarBigProgressBar : LunarPillarBigProgessBar + { + internal override float GetCurrentShieldValue() => (float) NPC.ShieldStrengthTowerSolar; + + internal override float GetMaxShieldValue() => (float) NPC.ShieldStrengthTowerMax; + + internal override bool IsPlayerInCombatArea() => Main.LocalPlayer.ZoneTowerSolar; + } +} diff --git a/GameContent/UI/BigProgressBar/StardustPillarBigProgressBar.cs b/GameContent/UI/BigProgressBar/StardustPillarBigProgressBar.cs new file mode 100644 index 0000000..d7100f3 --- /dev/null +++ b/GameContent/UI/BigProgressBar/StardustPillarBigProgressBar.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.BigProgressBar.StardustPillarBigProgressBar +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.UI.BigProgressBar +{ + public class StardustPillarBigProgressBar : LunarPillarBigProgessBar + { + internal override float GetCurrentShieldValue() => (float) NPC.ShieldStrengthTowerStardust; + + internal override float GetMaxShieldValue() => (float) NPC.ShieldStrengthTowerMax; + + internal override bool IsPlayerInCombatArea() => Main.LocalPlayer.ZoneTowerStardust; + } +} diff --git a/GameContent/UI/BigProgressBar/TwinsBigProgressBar.cs b/GameContent/UI/BigProgressBar/TwinsBigProgressBar.cs new file mode 100644 index 0000000..2cf38cc --- /dev/null +++ b/GameContent/UI/BigProgressBar/TwinsBigProgressBar.cs @@ -0,0 +1,49 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.BigProgressBar.TwinsBigProgressBar +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.GameContent.UI.BigProgressBar +{ + public class TwinsBigProgressBar : IBigProgressBar + { + private float _lifePercentToShow; + private int _headIndex; + + public bool ValidateAndCollectNecessaryInfo(ref BigProgressBarInfo info) + { + if (info.npcIndexToAimAt < 0 || info.npcIndexToAimAt > 200) + return false; + NPC npc1 = Main.npc[info.npcIndexToAimAt]; + if (!npc1.active) + return false; + int num = npc1.type == 126 ? 125 : 126; + int lifeMax = npc1.lifeMax; + int life = npc1.life; + for (int index = 0; index < 200; ++index) + { + NPC npc2 = Main.npc[index]; + if (npc2.active && npc2.type == num) + { + lifeMax += npc2.lifeMax; + life += npc2.life; + break; + } + } + this._lifePercentToShow = Utils.Clamp((float) life / (float) lifeMax, 0.0f, 1f); + this._headIndex = npc1.GetBossHeadTextureIndex(); + return true; + } + + public void Draw(ref BigProgressBarInfo info, SpriteBatch spriteBatch) + { + Texture2D texture2D = TextureAssets.NpcHeadBoss[this._headIndex].Value; + Rectangle barIconFrame = texture2D.Frame(); + BigProgressBarHelper.DrawFancyBar(spriteBatch, this._lifePercentToShow, texture2D, barIconFrame); + } + } +} diff --git a/GameContent/UI/BigProgressBar/VortexPillarBigProgressBar.cs b/GameContent/UI/BigProgressBar/VortexPillarBigProgressBar.cs new file mode 100644 index 0000000..5d8fd67 --- /dev/null +++ b/GameContent/UI/BigProgressBar/VortexPillarBigProgressBar.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.BigProgressBar.VortexPillarBigProgressBar +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.UI.BigProgressBar +{ + public class VortexPillarBigProgressBar : LunarPillarBigProgessBar + { + internal override float GetCurrentShieldValue() => (float) NPC.ShieldStrengthTowerVortex; + + internal override float GetMaxShieldValue() => (float) NPC.ShieldStrengthTowerMax; + + internal override bool IsPlayerInCombatArea() => Main.LocalPlayer.ZoneTowerVortex; + } +} diff --git a/GameContent/UI/Chat/AchievementTagHandler.cs b/GameContent/UI/Chat/AchievementTagHandler.cs new file mode 100644 index 0000000..c6ae195 --- /dev/null +++ b/GameContent/UI/Chat/AchievementTagHandler.cs @@ -0,0 +1,45 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Chat.AchievementTagHandler +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.Achievements; +using Terraria.UI; +using Terraria.UI.Chat; + +namespace Terraria.GameContent.UI.Chat +{ + public class AchievementTagHandler : ITagHandler + { + TextSnippet ITagHandler.Parse( + string text, + Color baseColor, + string options) + { + Achievement achievement = Main.Achievements.GetAchievement(text); + return achievement == null ? new TextSnippet(text) : (TextSnippet) new AchievementTagHandler.AchievementSnippet(achievement); + } + + public static string GenerateTag(Achievement achievement) => "[a:" + achievement.Name + "]"; + + private class AchievementSnippet : TextSnippet + { + private Achievement _achievement; + + public AchievementSnippet(Achievement achievement) + : base(achievement.FriendlyName.Value, Color.LightBlue) + { + this.CheckForHover = true; + this._achievement = achievement; + } + + public override void OnClick() + { + IngameOptions.Close(); + IngameFancyUI.OpenAchievementsAndGoto(this._achievement); + } + } + } +} diff --git a/GameContent/UI/Chat/ColorTagHandler.cs b/GameContent/UI/Chat/ColorTagHandler.cs new file mode 100644 index 0000000..1e8bdb7 --- /dev/null +++ b/GameContent/UI/Chat/ColorTagHandler.cs @@ -0,0 +1,29 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Chat.ColorTagHandler +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Globalization; +using Terraria.UI.Chat; + +namespace Terraria.GameContent.UI.Chat +{ + public class ColorTagHandler : ITagHandler + { + TextSnippet ITagHandler.Parse( + string text, + Color baseColor, + string options) + { + TextSnippet textSnippet = new TextSnippet(text); + int result; + if (!int.TryParse(options, NumberStyles.AllowHexSpecifier, (IFormatProvider) CultureInfo.InvariantCulture, out result)) + return textSnippet; + textSnippet.Color = new Color(result >> 16 & (int) byte.MaxValue, result >> 8 & (int) byte.MaxValue, result & (int) byte.MaxValue); + return textSnippet; + } + } +} diff --git a/GameContent/UI/Chat/GlyphTagHandler.cs b/GameContent/UI/Chat/GlyphTagHandler.cs new file mode 100644 index 0000000..30e88cd --- /dev/null +++ b/GameContent/UI/Chat/GlyphTagHandler.cs @@ -0,0 +1,181 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Chat.GlyphTagHandler +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Input; +using ReLogic.Graphics; +using System.Collections.Generic; +using Terraria.UI.Chat; + +namespace Terraria.GameContent.UI.Chat +{ + public class GlyphTagHandler : ITagHandler + { + private const int GlyphsPerLine = 25; + private const int MaxGlyphs = 26; + public static float GlyphsScale = 1f; + private static Dictionary GlyphIndexes = new Dictionary() + { + { + Buttons.A.ToString(), + 0 + }, + { + Buttons.B.ToString(), + 1 + }, + { + Buttons.Back.ToString(), + 4 + }, + { + Buttons.DPadDown.ToString(), + 15 + }, + { + Buttons.DPadLeft.ToString(), + 14 + }, + { + Buttons.DPadRight.ToString(), + 13 + }, + { + Buttons.DPadUp.ToString(), + 16 + }, + { + Buttons.LeftShoulder.ToString(), + 6 + }, + { + Buttons.LeftStick.ToString(), + 10 + }, + { + Buttons.LeftThumbstickDown.ToString(), + 20 + }, + { + Buttons.LeftThumbstickLeft.ToString(), + 17 + }, + { + Buttons.LeftThumbstickRight.ToString(), + 18 + }, + { + Buttons.LeftThumbstickUp.ToString(), + 19 + }, + { + Buttons.LeftTrigger.ToString(), + 8 + }, + { + Buttons.RightShoulder.ToString(), + 7 + }, + { + Buttons.RightStick.ToString(), + 11 + }, + { + Buttons.RightThumbstickDown.ToString(), + 24 + }, + { + Buttons.RightThumbstickLeft.ToString(), + 21 + }, + { + Buttons.RightThumbstickRight.ToString(), + 22 + }, + { + Buttons.RightThumbstickUp.ToString(), + 23 + }, + { + Buttons.RightTrigger.ToString(), + 9 + }, + { + Buttons.Start.ToString(), + 5 + }, + { + Buttons.X.ToString(), + 2 + }, + { + Buttons.Y.ToString(), + 3 + }, + { + "LR", + 25 + } + }; + + TextSnippet ITagHandler.Parse( + string text, + Color baseColor, + string options) + { + int result; + if (!int.TryParse(text, out result) || result >= 26) + return new TextSnippet(text); + GlyphTagHandler.GlyphSnippet glyphSnippet = new GlyphTagHandler.GlyphSnippet(result); + glyphSnippet.DeleteWhole = true; + glyphSnippet.Text = "[g:" + (object) result + "]"; + return (TextSnippet) glyphSnippet; + } + + public static string GenerateTag(int index) => "[g" + ":" + (object) index + "]"; + + public static string GenerateTag(string keyname) + { + int index; + return GlyphTagHandler.GlyphIndexes.TryGetValue(keyname, out index) ? GlyphTagHandler.GenerateTag(index) : keyname; + } + + private class GlyphSnippet : TextSnippet + { + private int _glyphIndex; + + public GlyphSnippet(int index) + : base() + { + this._glyphIndex = index; + this.Color = Color.White; + } + + public override bool UniqueDraw( + bool justCheckingString, + out Vector2 size, + SpriteBatch spriteBatch, + Vector2 position = default (Vector2), + Color color = default (Color), + float scale = 1f) + { + if (!justCheckingString && color != Color.Black) + { + int frameX = this._glyphIndex; + if (this._glyphIndex == 25) + frameX = (double) Main.GlobalTimeWrappedHourly % 0.600000023841858 < 0.300000011920929 ? 17 : 18; + Texture2D texture2D = TextureAssets.TextGlyph[0].Value; + spriteBatch.Draw(texture2D, position, new Rectangle?(texture2D.Frame(25, frameX: frameX, frameY: (frameX / 25))), color, 0.0f, Vector2.Zero, GlyphTagHandler.GlyphsScale, SpriteEffects.None, 0.0f); + } + size = new Vector2(26f) * GlyphTagHandler.GlyphsScale; + return true; + } + + public override float GetStringLength(DynamicSpriteFont font) => 26f * GlyphTagHandler.GlyphsScale; + } + } +} diff --git a/GameContent/UI/Chat/IChatMonitor.cs b/GameContent/UI/Chat/IChatMonitor.cs new file mode 100644 index 0000000..21929aa --- /dev/null +++ b/GameContent/UI/Chat/IChatMonitor.cs @@ -0,0 +1,29 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Chat.IChatMonitor +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.GameContent.UI.Chat +{ + public interface IChatMonitor + { + void NewText(string newText, byte R = 255, byte G = 255, byte B = 255); + + void NewTextMultiline(string text, bool force = false, Color c = default (Color), int WidthLimit = -1); + + void DrawChat(bool drawingPlayerChat); + + void Clear(); + + void Update(); + + void Offset(int linesOffset); + + void ResetOffset(); + + void OnResolutionChange(); + } +} diff --git a/GameContent/UI/Chat/ItemTagHandler.cs b/GameContent/UI/Chat/ItemTagHandler.cs new file mode 100644 index 0000000..e8a52c7 --- /dev/null +++ b/GameContent/UI/Chat/ItemTagHandler.cs @@ -0,0 +1,134 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Chat.ItemTagHandler +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Graphics; +using Terraria.UI; +using Terraria.UI.Chat; + +namespace Terraria.GameContent.UI.Chat +{ + public class ItemTagHandler : ITagHandler + { + TextSnippet ITagHandler.Parse( + string text, + Color baseColor, + string options) + { + Item obj = new Item(); + int result1; + if (int.TryParse(text, out result1)) + obj.netDefaults(result1); + if (obj.type <= 0) + return new TextSnippet(text); + obj.stack = 1; + if (options != null) + { + string[] strArray = options.Split(','); + for (int index = 0; index < strArray.Length; ++index) + { + if (strArray[index].Length != 0) + { + switch (strArray[index][0]) + { + case 'p': + int result2; + if (int.TryParse(strArray[index].Substring(1), out result2)) + { + obj.Prefix((int) (byte) Utils.Clamp(result2, 0, 85)); + continue; + } + continue; + case 's': + case 'x': + int result3; + if (int.TryParse(strArray[index].Substring(1), out result3)) + { + obj.stack = Utils.Clamp(result3, 1, obj.maxStack); + continue; + } + continue; + default: + continue; + } + } + } + } + string str = ""; + if (obj.stack > 1) + str = " (" + (object) obj.stack + ")"; + ItemTagHandler.ItemSnippet itemSnippet = new ItemTagHandler.ItemSnippet(obj); + itemSnippet.Text = "[" + obj.AffixName() + str + "]"; + itemSnippet.CheckForHover = true; + itemSnippet.DeleteWhole = true; + return (TextSnippet) itemSnippet; + } + + public static string GenerateTag(Item I) + { + string str = "[i"; + if (I.prefix != (byte) 0) + str = str + "/p" + (object) I.prefix; + if (I.stack != 1) + str = str + "/s" + (object) I.stack; + return str + ":" + (object) I.netID + "]"; + } + + private class ItemSnippet : TextSnippet + { + private Item _item; + + public ItemSnippet(Item item) + : base() + { + this._item = item; + this.Color = ItemRarity.GetColor(item.rare); + } + + public override void OnHover() + { + Main.HoverItem = this._item.Clone(); + Main.instance.MouseText(this._item.Name, this._item.rare); + } + + public override bool UniqueDraw( + bool justCheckingString, + out Vector2 size, + SpriteBatch spriteBatch, + Vector2 position = default (Vector2), + Color color = default (Color), + float scale = 1f) + { + float num1 = 1f; + float num2 = 1f; + if (Main.netMode != 2 && !Main.dedServ) + { + Main.instance.LoadItem(this._item.type); + Texture2D texture2D = TextureAssets.Item[this._item.type].Value; + Rectangle rectangle = Main.itemAnimations[this._item.type] == null ? texture2D.Frame() : Main.itemAnimations[this._item.type].GetFrame(texture2D); + if (rectangle.Height > 32) + num2 = 32f / (float) rectangle.Height; + } + float num3 = num2 * scale; + float num4 = num1 * num3; + if ((double) num4 > 0.75) + num4 = 0.75f; + if (!justCheckingString && color != Color.Black) + { + double inventoryScale = (double) Main.inventoryScale; + Main.inventoryScale = scale * num4; + ItemSlot.Draw(spriteBatch, ref this._item, 14, position - new Vector2(10f) * scale * num4, Color.White); + Main.inventoryScale = (float) inventoryScale; + } + size = new Vector2(32f) * scale * num4; + return true; + } + + public override float GetStringLength(DynamicSpriteFont font) => (float) (32.0 * (double) this.Scale * 0.649999976158142); + } + } +} diff --git a/GameContent/UI/Chat/LegacyChatMonitor.cs b/GameContent/UI/Chat/LegacyChatMonitor.cs new file mode 100644 index 0000000..eaeb942 --- /dev/null +++ b/GameContent/UI/Chat/LegacyChatMonitor.cs @@ -0,0 +1,188 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Chat.LegacyChatMonitor +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria.Audio; +using Terraria.UI.Chat; + +namespace Terraria.GameContent.UI.Chat +{ + public class LegacyChatMonitor : IChatMonitor + { + private int numChatLines; + private ChatLine[] chatLine; + private int chatLength; + private int showCount; + private int startChatLine; + + public int TextMaxLengthForScreen => Main.screenWidth - 320; + + public void OnResolutionChange() + { + } + + public LegacyChatMonitor() + { + this.showCount = 10; + this.numChatLines = 500; + this.chatLength = 600; + this.chatLine = new ChatLine[this.numChatLines]; + for (int index = 0; index < this.numChatLines; ++index) + this.chatLine[index] = new ChatLine(); + } + + public void Clear() + { + for (int index = 0; index < this.numChatLines; ++index) + this.chatLine[index] = new ChatLine(); + } + + public void ResetOffset() => this.startChatLine = 0; + + public void Update() + { + for (int index = 0; index < this.numChatLines; ++index) + this.chatLine[index].UpdateTimeLeft(); + } + + public void Offset(int linesOffset) + { + this.showCount = (int) ((double) (Main.screenHeight / 3) / (double) FontAssets.MouseText.Value.MeasureString("1").Y) - 1; + switch (linesOffset) + { + case -1: + --this.startChatLine; + if (this.startChatLine >= 0) + break; + this.startChatLine = 0; + break; + case 1: + ++this.startChatLine; + if (this.startChatLine + this.showCount >= this.numChatLines - 1) + this.startChatLine = this.numChatLines - this.showCount - 1; + if (!(this.chatLine[this.startChatLine + this.showCount].originalText == "")) + break; + --this.startChatLine; + break; + } + } + + public void NewText(string newText, byte R = 255, byte G = 255, byte B = 255) => this.NewTextMultiline(newText, false, new Color((int) R, (int) G, (int) B), -1); + + public void NewTextInternal(string newText, byte R = 255, byte G = 255, byte B = 255, bool force = false) + { + int maxTextSize = 80; + if (!force && newText.Length > maxTextSize) + { + string oldText = newText; + string newText1 = this.TrimIntoMultipleLines(R, G, B, maxTextSize, oldText); + if (newText1.Length <= 0) + return; + this.NewTextInternal(newText1, R, G, B, true); + } + else + { + for (int index = this.numChatLines - 1; index > 0; --index) + this.chatLine[index].Copy(this.chatLine[index - 1]); + this.chatLine[0].color = new Color((int) R, (int) G, (int) B); + this.chatLine[0].originalText = newText; + this.chatLine[0].parsedText = ChatManager.ParseMessage(this.chatLine[0].originalText, this.chatLine[0].color).ToArray(); + this.chatLine[0].showTime = this.chatLength; + SoundEngine.PlaySound(12); + } + } + + private string TrimIntoMultipleLines(byte R, byte G, byte B, int maxTextSize, string oldText) + { + while (oldText.Length > maxTextSize) + { + int num = maxTextSize; + int startIndex = num; + while (oldText.Substring(startIndex, 1) != " ") + { + --startIndex; + if (startIndex < 1) + break; + } + if (startIndex == 0) + { + while (oldText.Substring(num, 1) != " ") + { + ++num; + if (num >= oldText.Length - 1) + break; + } + } + else + num = startIndex; + if (num >= oldText.Length - 1) + num = oldText.Length; + this.NewTextInternal(oldText.Substring(0, num), R, G, B, true); + oldText = oldText.Substring(num); + if (oldText.Length > 0) + { + while (oldText.Substring(0, 1) == " ") + oldText = oldText.Substring(1); + } + } + return oldText; + } + + public void NewTextMultiline(string text, bool force = false, Color c = default (Color), int WidthLimit = -1) + { + if (c == new Color()) + c = Color.White; + List> textSnippetListList = WidthLimit == -1 ? Utils.WordwrapStringSmart(text, c, FontAssets.MouseText.Value, this.TextMaxLengthForScreen, 10) : Utils.WordwrapStringSmart(text, c, FontAssets.MouseText.Value, WidthLimit, 10); + for (int index = 0; index < textSnippetListList.Count; ++index) + this.NewText(textSnippetListList[index]); + } + + public void NewText(List snippets) + { + for (int index = this.numChatLines - 1; index > 0; --index) + this.chatLine[index].Copy(this.chatLine[index - 1]); + this.chatLine[0].originalText = "this is a hack because draw checks length is higher than 0"; + this.chatLine[0].parsedText = snippets.ToArray(); + this.chatLine[0].showTime = this.chatLength; + SoundEngine.PlaySound(12); + } + + public void DrawChat(bool drawingPlayerChat) + { + int num1 = this.startChatLine; + int num2 = this.startChatLine + this.showCount; + if (num2 >= this.numChatLines) + { + num2 = --this.numChatLines; + num1 = num2 - this.showCount; + } + int num3 = 0; + int index1 = -1; + int index2 = -1; + for (int index3 = num1; index3 < num2; ++index3) + { + if (drawingPlayerChat || this.chatLine[index3].showTime > 0 && this.chatLine[index3].parsedText.Length != 0) + { + int hoveredSnippet = -1; + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, FontAssets.MouseText.Value, this.chatLine[index3].parsedText, new Vector2(88f, (float) (Main.screenHeight - 30 - 28 - num3 * 21)), 0.0f, Vector2.Zero, Vector2.One, out hoveredSnippet); + if (hoveredSnippet >= 0 && this.chatLine[index3].parsedText[hoveredSnippet].CheckForHover) + { + index1 = index3; + index2 = hoveredSnippet; + } + } + ++num3; + } + if (index1 <= -1) + return; + this.chatLine[index1].parsedText[index2].OnHover(); + if (!Main.mouseLeft || !Main.mouseLeftRelease) + return; + this.chatLine[index1].parsedText[index2].OnClick(); + } + } +} diff --git a/GameContent/UI/Chat/NameTagHandler.cs b/GameContent/UI/Chat/NameTagHandler.cs new file mode 100644 index 0000000..3928ffc --- /dev/null +++ b/GameContent/UI/Chat/NameTagHandler.cs @@ -0,0 +1,24 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Chat.NameTagHandler +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.UI.Chat; + +namespace Terraria.GameContent.UI.Chat +{ + public class NameTagHandler : ITagHandler + { + TextSnippet ITagHandler.Parse( + string text, + Color baseColor, + string options) + { + return new TextSnippet("<" + text.Replace("\\[", "[").Replace("\\]", "]") + ">", baseColor); + } + + public static string GenerateTag(string name) => "[n:" + name.Replace("[", "\\[").Replace("]", "\\]") + "]"; + } +} diff --git a/GameContent/UI/Chat/PlainTagHandler.cs b/GameContent/UI/Chat/PlainTagHandler.cs new file mode 100644 index 0000000..2848924 --- /dev/null +++ b/GameContent/UI/Chat/PlainTagHandler.cs @@ -0,0 +1,37 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Chat.PlainTagHandler +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.UI.Chat; + +namespace Terraria.GameContent.UI.Chat +{ + public class PlainTagHandler : ITagHandler + { + TextSnippet ITagHandler.Parse( + string text, + Color baseColor, + string options) + { + return (TextSnippet) new PlainTagHandler.PlainSnippet(text); + } + + public class PlainSnippet : TextSnippet + { + public PlainSnippet(string text = "") + : base(text) + { + } + + public PlainSnippet(string text, Color color, float scale = 1f) + : base(text, color, scale) + { + } + + public override Color GetVisibleColor() => this.Color; + } + } +} diff --git a/GameContent/UI/Chat/RemadeChatMonitor.cs b/GameContent/UI/Chat/RemadeChatMonitor.cs new file mode 100644 index 0000000..2eebf05 --- /dev/null +++ b/GameContent/UI/Chat/RemadeChatMonitor.cs @@ -0,0 +1,156 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Chat.RemadeChatMonitor +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.UI.Chat; + +namespace Terraria.GameContent.UI.Chat +{ + public class RemadeChatMonitor : IChatMonitor + { + private const int MaxMessages = 500; + private int _showCount; + private int _startChatLine; + private List _messages; + private bool _recalculateOnNextUpdate; + + public RemadeChatMonitor() + { + this._showCount = 10; + this._startChatLine = 0; + this._messages = new List(); + } + + public void NewText(string newText, byte R = 255, byte G = 255, byte B = 255) => this.AddNewMessage(newText, new Color((int) R, (int) G, (int) B)); + + public void NewTextMultiline(string text, bool force = false, Color c = default (Color), int WidthLimit = -1) => this.AddNewMessage(text, c, WidthLimit); + + public void AddNewMessage(string text, Color color, int widthLimitInPixels = -1) + { + ChatMessageContainer messageContainer = new ChatMessageContainer(); + messageContainer.SetContents(text, color, widthLimitInPixels); + this._messages.Insert(0, messageContainer); + while (this._messages.Count > 500) + this._messages.RemoveAt(this._messages.Count - 1); + } + + public void DrawChat(bool drawingPlayerChat) + { + int startChatLine = this._startChatLine; + int index = 0; + int snippetIndex1 = 0; + while (startChatLine > 0 && index < this._messages.Count) + { + int num = Math.Min(startChatLine, this._messages[index].LineCount); + startChatLine -= num; + snippetIndex1 += num; + if (snippetIndex1 == this._messages[index].LineCount) + { + snippetIndex1 = 0; + ++index; + } + } + int num1 = 0; + int? nullable1 = new int?(); + int snippetIndex2 = -1; + int? nullable2 = new int?(); + int hoveredSnippet = -1; + while (num1 < this._showCount && index < this._messages.Count) + { + ChatMessageContainer message = this._messages[index]; + if (message.Prepared && drawingPlayerChat | message.CanBeShownWhenChatIsClosed) + { + TextSnippet[] withInversedIndex = message.GetSnippetWithInversedIndex(snippetIndex1); + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, FontAssets.MouseText.Value, withInversedIndex, new Vector2(88f, (float) (Main.screenHeight - 30 - 28 - num1 * 21)), 0.0f, Vector2.Zero, Vector2.One, out hoveredSnippet); + if (hoveredSnippet >= 0) + { + nullable2 = new int?(hoveredSnippet); + nullable1 = new int?(index); + snippetIndex2 = snippetIndex1; + } + ++num1; + ++snippetIndex1; + if (snippetIndex1 >= message.LineCount) + { + snippetIndex1 = 0; + ++index; + } + } + else + break; + } + if (!nullable1.HasValue || !nullable2.HasValue) + return; + TextSnippet[] withInversedIndex1 = this._messages[nullable1.Value].GetSnippetWithInversedIndex(snippetIndex2); + withInversedIndex1[nullable2.Value].OnHover(); + if (!Main.mouseLeft || !Main.mouseLeftRelease) + return; + withInversedIndex1[nullable2.Value].OnClick(); + } + + public void Clear() => this._messages.Clear(); + + public void Update() + { + if (this._recalculateOnNextUpdate) + { + this._recalculateOnNextUpdate = false; + for (int index = 0; index < this._messages.Count; ++index) + this._messages[index].MarkToNeedRefresh(); + } + for (int index = 0; index < this._messages.Count; ++index) + this._messages[index].Update(); + } + + public void Offset(int linesOffset) + { + this._startChatLine += linesOffset; + this.ClampMessageIndex(); + } + + private void ClampMessageIndex() + { + int num1 = 0; + int index = 0; + int num2 = 0; + int num3 = this._startChatLine + this._showCount; + while (num1 < num3 && index < this._messages.Count) + { + int num4 = Math.Min(num3 - num1, this._messages[index].LineCount); + num1 += num4; + if (num1 < num3) + { + ++index; + num2 = 0; + } + else + num2 = num4; + } + int showCount = this._showCount; + while (showCount > 0 && num1 > 0) + { + --num2; + --showCount; + --num1; + if (num2 < 0) + { + --index; + if (index != -1) + num2 = this._messages[index].LineCount - 1; + else + break; + } + } + this._startChatLine = num1; + } + + public void ResetOffset() => this._startChatLine = 0; + + public void OnResolutionChange() => this._recalculateOnNextUpdate = true; + } +} diff --git a/GameContent/UI/ClassicPlayerResourcesDisplaySet.cs b/GameContent/UI/ClassicPlayerResourcesDisplaySet.cs new file mode 100644 index 0000000..cd11e80 --- /dev/null +++ b/GameContent/UI/ClassicPlayerResourcesDisplaySet.cs @@ -0,0 +1,164 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.ClassicPlayerResourcesDisplaySet +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Graphics; + +namespace Terraria.GameContent.UI +{ + public class ClassicPlayerResourcesDisplaySet : IPlayerResourcesDisplaySet + { + private int UIDisplay_ManaPerStar = 20; + private float UIDisplay_LifePerHeart = 20f; + private int UI_ScreenAnchorX; + + public void Draw() + { + this.UI_ScreenAnchorX = Main.screenWidth - 800; + this.DrawLife(); + this.DrawMana(); + } + + private void DrawLife() + { + Player localPlayer = Main.LocalPlayer; + SpriteBatch spriteBatch = Main.spriteBatch; + Color color = new Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor); + this.UIDisplay_LifePerHeart = 20f; + if (localPlayer.ghost) + return; + int num1 = localPlayer.statLifeMax / 20; + int num2 = (localPlayer.statLifeMax - 400) / 5; + if (num2 < 0) + num2 = 0; + if (num2 > 0) + { + num1 = localPlayer.statLifeMax / (20 + num2 / 4); + this.UIDisplay_LifePerHeart = (float) localPlayer.statLifeMax / 20f; + } + this.UIDisplay_LifePerHeart += (float) ((localPlayer.statLifeMax2 - localPlayer.statLifeMax) / num1); + int num3 = (int) ((double) localPlayer.statLifeMax2 / (double) this.UIDisplay_LifePerHeart); + if (num3 >= 10) + num3 = 10; + string str = Lang.inter[0].Value + " " + (object) localPlayer.statLifeMax2 + "/" + (object) localPlayer.statLifeMax2; + Vector2 vector2 = FontAssets.MouseText.Value.MeasureString(str); + if (!localPlayer.ghost) + { + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, Lang.inter[0].Value, new Vector2((float) (500 + 13 * num3) - vector2.X * 0.5f + (float) this.UI_ScreenAnchorX, 6f), color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, localPlayer.statLife.ToString() + "/" + (object) localPlayer.statLifeMax2, new Vector2((float) (500 + 13 * num3) + vector2.X * 0.5f + (float) this.UI_ScreenAnchorX, 6f), color, 0.0f, new Vector2(FontAssets.MouseText.Value.MeasureString(localPlayer.statLife.ToString() + "/" + (object) localPlayer.statLifeMax2).X, 0.0f), 1f, SpriteEffects.None, 0.0f); + } + for (int index = 1; index < (int) ((double) localPlayer.statLifeMax2 / (double) this.UIDisplay_LifePerHeart) + 1; ++index) + { + float scale = 1f; + bool flag = false; + int num4; + if ((double) localPlayer.statLife >= (double) index * (double) this.UIDisplay_LifePerHeart) + { + num4 = (int) byte.MaxValue; + if ((double) localPlayer.statLife == (double) index * (double) this.UIDisplay_LifePerHeart) + flag = true; + } + else + { + float num5 = ((float) localPlayer.statLife - (float) (index - 1) * this.UIDisplay_LifePerHeart) / this.UIDisplay_LifePerHeart; + num4 = (int) (30.0 + 225.0 * (double) num5); + if (num4 < 30) + num4 = 30; + scale = (float) ((double) num5 / 4.0 + 0.75); + if ((double) scale < 0.75) + scale = 0.75f; + if ((double) num5 > 0.0) + flag = true; + } + if (flag) + scale += Main.cursorScale - 1f; + int num6 = 0; + int num7 = 0; + if (index > 10) + { + num6 -= 260; + num7 += 26; + } + int a = (int) ((double) num4 * 0.9); + if (!localPlayer.ghost) + { + if (num2 > 0) + { + --num2; + spriteBatch.Draw(TextureAssets.Heart2.Value, new Vector2((float) (500 + 26 * (index - 1) + num6 + this.UI_ScreenAnchorX + TextureAssets.Heart.Width() / 2), (float) (32.0 + ((double) TextureAssets.Heart.Height() - (double) TextureAssets.Heart.Height() * (double) scale) / 2.0) + (float) num7 + (float) (TextureAssets.Heart.Height() / 2)), new Rectangle?(new Rectangle(0, 0, TextureAssets.Heart.Width(), TextureAssets.Heart.Height())), new Color(num4, num4, num4, a), 0.0f, new Vector2((float) (TextureAssets.Heart.Width() / 2), (float) (TextureAssets.Heart.Height() / 2)), scale, SpriteEffects.None, 0.0f); + } + else + spriteBatch.Draw(TextureAssets.Heart.Value, new Vector2((float) (500 + 26 * (index - 1) + num6 + this.UI_ScreenAnchorX + TextureAssets.Heart.Width() / 2), (float) (32.0 + ((double) TextureAssets.Heart.Height() - (double) TextureAssets.Heart.Height() * (double) scale) / 2.0) + (float) num7 + (float) (TextureAssets.Heart.Height() / 2)), new Rectangle?(new Rectangle(0, 0, TextureAssets.Heart.Width(), TextureAssets.Heart.Height())), new Color(num4, num4, num4, a), 0.0f, new Vector2((float) (TextureAssets.Heart.Width() / 2), (float) (TextureAssets.Heart.Height() / 2)), scale, SpriteEffects.None, 0.0f); + } + } + } + + private void DrawMana() + { + Player localPlayer = Main.LocalPlayer; + SpriteBatch spriteBatch = Main.spriteBatch; + Color color = new Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor); + this.UIDisplay_ManaPerStar = 20; + if (localPlayer.ghost || localPlayer.statManaMax2 <= 0) + return; + int num1 = localPlayer.statManaMax2 / 20; + Vector2 vector2 = FontAssets.MouseText.Value.MeasureString(Lang.inter[2].Value); + int num2 = 50; + if ((double) vector2.X >= 45.0) + num2 = (int) vector2.X + 5; + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, Lang.inter[2].Value, new Vector2((float) (800 - num2 + this.UI_ScreenAnchorX), 6f), color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + for (int index = 1; index < localPlayer.statManaMax2 / this.UIDisplay_ManaPerStar + 1; ++index) + { + bool flag = false; + float scale = 1f; + int num3; + if (localPlayer.statMana >= index * this.UIDisplay_ManaPerStar) + { + num3 = (int) byte.MaxValue; + if (localPlayer.statMana == index * this.UIDisplay_ManaPerStar) + flag = true; + } + else + { + float num4 = (float) (localPlayer.statMana - (index - 1) * this.UIDisplay_ManaPerStar) / (float) this.UIDisplay_ManaPerStar; + num3 = (int) (30.0 + 225.0 * (double) num4); + if (num3 < 30) + num3 = 30; + scale = (float) ((double) num4 / 4.0 + 0.75); + if ((double) scale < 0.75) + scale = 0.75f; + if ((double) num4 > 0.0) + flag = true; + } + if (flag) + scale += Main.cursorScale - 1f; + int a = (int) ((double) num3 * 0.9); + spriteBatch.Draw(TextureAssets.Mana.Value, new Vector2((float) (775 + this.UI_ScreenAnchorX), (float) (30 + TextureAssets.Mana.Height() / 2) + (float) (((double) TextureAssets.Mana.Height() - (double) TextureAssets.Mana.Height() * (double) scale) / 2.0) + (float) (28 * (index - 1))), new Rectangle?(new Rectangle(0, 0, TextureAssets.Mana.Width(), TextureAssets.Mana.Height())), new Color(num3, num3, num3, a), 0.0f, new Vector2((float) (TextureAssets.Mana.Width() / 2), (float) (TextureAssets.Mana.Height() / 2)), scale, SpriteEffects.None, 0.0f); + } + } + + public void TryToHover() + { + Vector2 mouseScreen = Main.MouseScreen; + Player localPlayer = Main.LocalPlayer; + int num1 = 26 * localPlayer.statLifeMax2 / (int) this.UIDisplay_LifePerHeart; + int num2 = 0; + if (localPlayer.statLifeMax2 > 200) + { + num1 = 260; + num2 += 26; + } + if ((double) mouseScreen.X > (double) (500 + this.UI_ScreenAnchorX) && (double) mouseScreen.X < (double) (500 + num1 + this.UI_ScreenAnchorX) && (double) mouseScreen.Y > 32.0 && (double) mouseScreen.Y < (double) (32 + TextureAssets.Heart.Height() + num2)) + CommonResourceBarMethods.DrawLifeMouseOver(); + int num3 = 24; + int num4 = 28 * localPlayer.statManaMax2 / this.UIDisplay_ManaPerStar; + if ((double) mouseScreen.X <= (double) (762 + this.UI_ScreenAnchorX) || (double) mouseScreen.X >= (double) (762 + num3 + this.UI_ScreenAnchorX) || (double) mouseScreen.Y <= 30.0 || (double) mouseScreen.Y >= (double) (30 + num4)) + return; + CommonResourceBarMethods.DrawManaMouseOver(); + } + } +} diff --git a/GameContent/UI/CommonResourceBarMethods.cs b/GameContent/UI/CommonResourceBarMethods.cs new file mode 100644 index 0000000..d32821f --- /dev/null +++ b/GameContent/UI/CommonResourceBarMethods.cs @@ -0,0 +1,33 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.CommonResourceBarMethods +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.UI +{ + public class CommonResourceBarMethods + { + public static void DrawLifeMouseOver() + { + if (Main.mouseText) + return; + Player localPlayer = Main.LocalPlayer; + localPlayer.cursorItemIconEnabled = false; + string text = localPlayer.statLife.ToString() + "/" + (object) localPlayer.statLifeMax2; + Main.instance.MouseTextHackZoom(text); + Main.mouseText = true; + } + + public static void DrawManaMouseOver() + { + if (Main.mouseText) + return; + Player localPlayer = Main.LocalPlayer; + localPlayer.cursorItemIconEnabled = false; + string text = localPlayer.statMana.ToString() + "/" + (object) localPlayer.statManaMax2; + Main.instance.MouseTextHackZoom(text); + Main.mouseText = true; + } + } +} diff --git a/GameContent/UI/CustomCurrencyManager.cs b/GameContent/UI/CustomCurrencyManager.cs new file mode 100644 index 0000000..a5fe94b --- /dev/null +++ b/GameContent/UI/CustomCurrencyManager.cs @@ -0,0 +1,150 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.CustomCurrencyManager +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; +using Terraria.ID; + +namespace Terraria.GameContent.UI +{ + public class CustomCurrencyManager + { + private static int _nextCurrencyIndex; + private static Dictionary _currencies = new Dictionary(); + + public static void Initialize() + { + CustomCurrencyManager._nextCurrencyIndex = 0; + CustomCurrencyID.DefenderMedals = CustomCurrencyManager.RegisterCurrency((CustomCurrencySystem) new CustomCurrencySingleCoin(3817, 999L)); + } + + public static int RegisterCurrency(CustomCurrencySystem collection) + { + int nextCurrencyIndex = CustomCurrencyManager._nextCurrencyIndex; + ++CustomCurrencyManager._nextCurrencyIndex; + CustomCurrencyManager._currencies[nextCurrencyIndex] = collection; + return nextCurrencyIndex; + } + + public static void DrawSavings( + SpriteBatch sb, + int currencyIndex, + float shopx, + float shopy, + bool horizontal = false) + { + CustomCurrencySystem currency = CustomCurrencyManager._currencies[currencyIndex]; + Player player = Main.player[Main.myPlayer]; + bool overFlowing; + long num1 = currency.CountCurrency(out overFlowing, player.bank.item); + long num2 = currency.CountCurrency(out overFlowing, player.bank2.item); + long num3 = currency.CountCurrency(out overFlowing, player.bank3.item); + long num4 = currency.CountCurrency(out overFlowing, player.bank4.item); + long totalCoins = currency.CombineStacks(out overFlowing, num1, num2, num3, num4); + if (totalCoins <= 0L) + return; + Main.instance.LoadItem(4076); + Main.instance.LoadItem(3813); + Main.instance.LoadItem(346); + Main.instance.LoadItem(87); + if (num4 > 0L) + sb.Draw(TextureAssets.Item[4076].Value, Utils.CenteredRectangle(new Vector2(shopx + 96f, shopy + 50f), TextureAssets.Item[4076].Value.Size() * 0.65f), new Rectangle?(), Color.White); + if (num3 > 0L) + sb.Draw(TextureAssets.Item[3813].Value, Utils.CenteredRectangle(new Vector2(shopx + 80f, shopy + 50f), TextureAssets.Item[3813].Value.Size() * 0.65f), new Rectangle?(), Color.White); + if (num2 > 0L) + sb.Draw(TextureAssets.Item[346].Value, Utils.CenteredRectangle(new Vector2(shopx + 80f, shopy + 50f), TextureAssets.Item[346].Value.Size() * 0.65f), new Rectangle?(), Color.White); + if (num1 > 0L) + sb.Draw(TextureAssets.Item[87].Value, Utils.CenteredRectangle(new Vector2(shopx + 70f, shopy + 60f), TextureAssets.Item[87].Value.Size() * 0.65f), new Rectangle?(), Color.White); + Utils.DrawBorderStringFourWay(sb, FontAssets.MouseText.Value, Lang.inter[66].Value, shopx, shopy + 40f, Color.White * ((float) Main.mouseTextColor / (float) byte.MaxValue), Color.Black, Vector2.Zero); + currency.DrawSavingsMoney(sb, Lang.inter[66].Value, shopx, shopy, totalCoins, horizontal); + } + + public static void GetPriceText( + int currencyIndex, + string[] lines, + ref int currentLine, + int price) + { + CustomCurrencyManager._currencies[currencyIndex].GetPriceText(lines, ref currentLine, price); + } + + public static bool BuyItem(Player player, int price, int currencyIndex) + { + CustomCurrencySystem currency = CustomCurrencyManager._currencies[currencyIndex]; + bool overFlowing; + long num1 = currency.CountCurrency(out overFlowing, player.inventory, 58, 57, 56, 55, 54); + long num2 = currency.CountCurrency(out overFlowing, player.bank.item); + long num3 = currency.CountCurrency(out overFlowing, player.bank2.item); + long num4 = currency.CountCurrency(out overFlowing, player.bank3.item); + long num5 = currency.CountCurrency(out overFlowing, player.bank4.item); + if (currency.CombineStacks(out overFlowing, num1, num2, num3, num4, num5) < (long) price) + return false; + List objArrayList = new List(); + Dictionary> slotsToIgnore = new Dictionary>(); + List pointList1 = new List(); + List slotCoins = new List(); + List pointList2 = new List(); + List pointList3 = new List(); + List pointList4 = new List(); + List pointList5 = new List(); + objArrayList.Add(player.inventory); + objArrayList.Add(player.bank.item); + objArrayList.Add(player.bank2.item); + objArrayList.Add(player.bank3.item); + objArrayList.Add(player.bank4.item); + for (int key = 0; key < objArrayList.Count; ++key) + slotsToIgnore[key] = new List(); + slotsToIgnore[0] = new List() + { + 58, + 57, + 56, + 55, + 54 + }; + for (int index = 0; index < objArrayList.Count; ++index) + { + for (int y = 0; y < objArrayList[index].Length; ++y) + { + if (!slotsToIgnore[index].Contains(y) && currency.Accepts(objArrayList[index][y])) + slotCoins.Add(new Point(index, y)); + } + } + CustomCurrencyManager.FindEmptySlots(objArrayList, slotsToIgnore, pointList1, 0); + CustomCurrencyManager.FindEmptySlots(objArrayList, slotsToIgnore, pointList2, 1); + CustomCurrencyManager.FindEmptySlots(objArrayList, slotsToIgnore, pointList3, 2); + CustomCurrencyManager.FindEmptySlots(objArrayList, slotsToIgnore, pointList4, 3); + CustomCurrencyManager.FindEmptySlots(objArrayList, slotsToIgnore, pointList5, 4); + return currency.TryPurchasing(price, objArrayList, slotCoins, pointList1, pointList2, pointList3, pointList4, pointList5); + } + + private static void FindEmptySlots( + List inventories, + Dictionary> slotsToIgnore, + List emptySlots, + int currentInventoryIndex) + { + for (int y = inventories[currentInventoryIndex].Length - 1; y >= 0; --y) + { + if (!slotsToIgnore[currentInventoryIndex].Contains(y) && (inventories[currentInventoryIndex][y].type == 0 || inventories[currentInventoryIndex][y].stack == 0)) + emptySlots.Add(new Point(currentInventoryIndex, y)); + } + } + + public static bool IsCustomCurrency(Item item) + { + foreach (KeyValuePair currency in CustomCurrencyManager._currencies) + { + if (currency.Value.Accepts(item)) + return true; + } + return false; + } + + public static void GetPrices(Item item, out int calcForSelling, out int calcForBuying) => CustomCurrencyManager._currencies[item.shopSpecialCurrency].GetItemExpectedPrice(item, out calcForSelling, out calcForBuying); + } +} diff --git a/GameContent/UI/CustomCurrencySingleCoin.cs b/GameContent/UI/CustomCurrencySingleCoin.cs new file mode 100644 index 0000000..808a552 --- /dev/null +++ b/GameContent/UI/CustomCurrencySingleCoin.cs @@ -0,0 +1,112 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.CustomCurrencySingleCoin +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.Localization; +using Terraria.UI.Chat; + +namespace Terraria.GameContent.UI +{ + public class CustomCurrencySingleCoin : CustomCurrencySystem + { + public float CurrencyDrawScale = 0.8f; + public string CurrencyTextKey = "Currency.DefenderMedals"; + public Color CurrencyTextColor = new Color(240, 100, 120); + + public CustomCurrencySingleCoin(int coinItemID, long currencyCap) + { + this.Include(coinItemID, 1); + this.SetCurrencyCap(currencyCap); + } + + public override bool TryPurchasing( + int price, + List inv, + List slotCoins, + List slotsEmpty, + List slotEmptyBank, + List slotEmptyBank2, + List slotEmptyBank3, + List slotEmptyBank4) + { + List> cache = this.ItemCacheCreate(inv); + int num1 = price; + for (int index = 0; index < slotCoins.Count; ++index) + { + Point slotCoin = slotCoins[index]; + int num2 = num1; + if (inv[slotCoin.X][slotCoin.Y].stack < num2) + num2 = inv[slotCoin.X][slotCoin.Y].stack; + num1 -= num2; + inv[slotCoin.X][slotCoin.Y].stack -= num2; + if (inv[slotCoin.X][slotCoin.Y].stack == 0) + { + switch (slotCoin.X) + { + case 0: + slotsEmpty.Add(slotCoin); + break; + case 1: + slotEmptyBank.Add(slotCoin); + break; + case 2: + slotEmptyBank2.Add(slotCoin); + break; + case 3: + slotEmptyBank3.Add(slotCoin); + break; + case 4: + slotEmptyBank4.Add(slotCoin); + break; + } + slotCoins.Remove(slotCoin); + --index; + } + if (num1 == 0) + break; + } + if (num1 == 0) + return true; + this.ItemCacheRestore(cache, inv); + return false; + } + + public override void DrawSavingsMoney( + SpriteBatch sb, + string text, + float shopx, + float shopy, + long totalCoins, + bool horizontal = false) + { + int i = this._valuePerUnit.Keys.ElementAt(0); + Main.instance.LoadItem(i); + Texture2D texture2D = TextureAssets.Item[i].Value; + if (horizontal) + { + Vector2 position = new Vector2((float) ((double) shopx + (double) ChatManager.GetStringSize(FontAssets.MouseText.Value, text, Vector2.One).X + 45.0), shopy + 50f); + sb.Draw(texture2D, position, new Rectangle?(), Color.White, 0.0f, texture2D.Size() / 2f, this.CurrencyDrawScale, SpriteEffects.None, 0.0f); + Utils.DrawBorderStringFourWay(sb, FontAssets.ItemStack.Value, totalCoins.ToString(), position.X - 11f, position.Y, Color.White, Color.Black, new Vector2(0.3f), 0.75f); + } + else + { + int num = totalCoins > 99L ? -6 : 0; + sb.Draw(texture2D, new Vector2(shopx + 11f, shopy + 75f), new Rectangle?(), Color.White, 0.0f, texture2D.Size() / 2f, this.CurrencyDrawScale, SpriteEffects.None, 0.0f); + Utils.DrawBorderStringFourWay(sb, FontAssets.ItemStack.Value, totalCoins.ToString(), shopx + (float) num, shopy + 75f, Color.White, Color.Black, new Vector2(0.3f), 0.75f); + } + } + + public override void GetPriceText(string[] lines, ref int currentLine, int price) + { + Color color = this.CurrencyTextColor * ((float) Main.mouseTextColor / (float) byte.MaxValue); + lines[currentLine++] = string.Format("[c/{0:X2}{1:X2}{2:X2}:{3} {4} {5}]", (object) color.R, (object) color.G, (object) color.B, (object) Lang.tip[50].Value, (object) price, (object) Language.GetTextValue(this.CurrencyTextKey).ToLower()); + } + } +} diff --git a/GameContent/UI/CustomCurrencySystem.cs b/GameContent/UI/CustomCurrencySystem.cs new file mode 100644 index 0000000..7912b32 --- /dev/null +++ b/GameContent/UI/CustomCurrencySystem.cs @@ -0,0 +1,253 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.CustomCurrencySystem +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; + +namespace Terraria.GameContent.UI +{ + public class CustomCurrencySystem + { + protected Dictionary _valuePerUnit = new Dictionary(); + private long _currencyCap = 999999999; + + public long CurrencyCap => this._currencyCap; + + public void Include(int coin, int howMuchIsItWorth) => this._valuePerUnit[coin] = howMuchIsItWorth; + + public void SetCurrencyCap(long cap) => this._currencyCap = cap; + + public virtual long CountCurrency(out bool overFlowing, Item[] inv, params int[] ignoreSlots) + { + List intList = new List((IEnumerable) ignoreSlots); + long num1 = 0; + for (int index = 0; index < inv.Length; ++index) + { + if (!intList.Contains(index)) + { + int num2; + if (this._valuePerUnit.TryGetValue(inv[index].type, out num2)) + num1 += (long) (num2 * inv[index].stack); + if (num1 >= this.CurrencyCap) + { + overFlowing = true; + return this.CurrencyCap; + } + } + } + overFlowing = false; + return num1; + } + + public virtual long CombineStacks(out bool overFlowing, params long[] coinCounts) + { + long num = 0; + foreach (long coinCount in coinCounts) + { + num += coinCount; + if (num >= this.CurrencyCap) + { + overFlowing = true; + return this.CurrencyCap; + } + } + overFlowing = false; + return num; + } + + public virtual bool TryPurchasing( + int price, + List inv, + List slotCoins, + List slotsEmpty, + List slotEmptyBank, + List slotEmptyBank2, + List slotEmptyBank3, + List slotEmptyBank4) + { + long num1 = (long) price; + Dictionary dictionary = new Dictionary(); + bool flag = true; + while (num1 > 0L) + { + long num2 = 1000000; + for (int index = 0; index < 4; ++index) + { + if (num1 >= num2) + { + foreach (Point slotCoin in slotCoins) + { + if (inv[slotCoin.X][slotCoin.Y].type == 74 - index) + { + long num3 = num1 / num2; + dictionary[slotCoin] = inv[slotCoin.X][slotCoin.Y].Clone(); + if (num3 < (long) inv[slotCoin.X][slotCoin.Y].stack) + { + inv[slotCoin.X][slotCoin.Y].stack -= (int) num3; + } + else + { + inv[slotCoin.X][slotCoin.Y].SetDefaults(); + slotsEmpty.Add(slotCoin); + } + num1 -= num2 * (long) (dictionary[slotCoin].stack - inv[slotCoin.X][slotCoin.Y].stack); + } + } + } + num2 /= 100L; + } + if (num1 > 0L) + { + if (slotsEmpty.Count > 0) + { + slotsEmpty.Sort(new Comparison(DelegateMethods.CompareYReverse)); + Point point = new Point(-1, -1); + for (int index1 = 0; index1 < inv.Count; ++index1) + { + long num4 = 10000; + for (int index2 = 0; index2 < 3; ++index2) + { + if (num1 >= num4) + { + foreach (Point slotCoin in slotCoins) + { + if (slotCoin.X == index1 && inv[slotCoin.X][slotCoin.Y].type == 74 - index2 && inv[slotCoin.X][slotCoin.Y].stack >= 1) + { + List pointList = slotsEmpty; + if (index1 == 1 && slotEmptyBank.Count > 0) + pointList = slotEmptyBank; + if (index1 == 2 && slotEmptyBank2.Count > 0) + pointList = slotEmptyBank2; + if (index1 == 3 && slotEmptyBank3.Count > 0) + pointList = slotEmptyBank3; + if (index1 == 4 && slotEmptyBank4.Count > 0) + pointList = slotEmptyBank4; + if (--inv[slotCoin.X][slotCoin.Y].stack <= 0) + { + inv[slotCoin.X][slotCoin.Y].SetDefaults(); + pointList.Add(slotCoin); + } + dictionary[pointList[0]] = inv[pointList[0].X][pointList[0].Y].Clone(); + inv[pointList[0].X][pointList[0].Y].SetDefaults(73 - index2); + inv[pointList[0].X][pointList[0].Y].stack = 100; + point = pointList[0]; + pointList.RemoveAt(0); + break; + } + } + } + if (point.X == -1 && point.Y == -1) + num4 /= 100L; + else + break; + } + for (int index3 = 0; index3 < 2; ++index3) + { + if (point.X == -1 && point.Y == -1) + { + foreach (Point slotCoin in slotCoins) + { + if (slotCoin.X == index1 && inv[slotCoin.X][slotCoin.Y].type == 73 + index3 && inv[slotCoin.X][slotCoin.Y].stack >= 1) + { + List pointList = slotsEmpty; + if (index1 == 1 && slotEmptyBank.Count > 0) + pointList = slotEmptyBank; + if (index1 == 2 && slotEmptyBank2.Count > 0) + pointList = slotEmptyBank2; + if (index1 == 3 && slotEmptyBank3.Count > 0) + pointList = slotEmptyBank3; + if (index1 == 4 && slotEmptyBank4.Count > 0) + pointList = slotEmptyBank4; + if (--inv[slotCoin.X][slotCoin.Y].stack <= 0) + { + inv[slotCoin.X][slotCoin.Y].SetDefaults(); + pointList.Add(slotCoin); + } + dictionary[pointList[0]] = inv[pointList[0].X][pointList[0].Y].Clone(); + inv[pointList[0].X][pointList[0].Y].SetDefaults(72 + index3); + inv[pointList[0].X][pointList[0].Y].stack = 100; + point = pointList[0]; + pointList.RemoveAt(0); + break; + } + } + } + } + if (point.X != -1 && point.Y != -1) + { + slotCoins.Add(point); + break; + } + } + slotsEmpty.Sort(new Comparison(DelegateMethods.CompareYReverse)); + slotEmptyBank.Sort(new Comparison(DelegateMethods.CompareYReverse)); + slotEmptyBank2.Sort(new Comparison(DelegateMethods.CompareYReverse)); + slotEmptyBank3.Sort(new Comparison(DelegateMethods.CompareYReverse)); + slotEmptyBank4.Sort(new Comparison(DelegateMethods.CompareYReverse)); + } + else + { + foreach (KeyValuePair keyValuePair in dictionary) + inv[keyValuePair.Key.X][keyValuePair.Key.Y] = keyValuePair.Value.Clone(); + flag = false; + break; + } + } + } + return flag; + } + + public virtual bool Accepts(Item item) => this._valuePerUnit.ContainsKey(item.type); + + public virtual void DrawSavingsMoney( + SpriteBatch sb, + string text, + float shopx, + float shopy, + long totalCoins, + bool horizontal = false) + { + } + + public virtual void GetPriceText(string[] lines, ref int currentLine, int price) + { + } + + protected int SortByHighest(Tuple valueA, Tuple valueB) => valueA.Item2 > valueB.Item2 || valueA.Item2 != valueB.Item2 ? -1 : 0; + + protected List> ItemCacheCreate(List inventories) + { + List> tupleList = new List>(); + for (int index = 0; index < inventories.Count; ++index) + { + for (int y = 0; y < inventories[index].Length; ++y) + { + Item obj = inventories[index][y]; + tupleList.Add(new Tuple(new Point(index, y), obj.DeepClone())); + } + } + return tupleList; + } + + protected void ItemCacheRestore(List> cache, List inventories) + { + foreach (Tuple tuple in cache) + inventories[tuple.Item1.X][tuple.Item1.Y] = tuple.Item2; + } + + public virtual void GetItemExpectedPrice( + Item item, + out int calcForSelling, + out int calcForBuying) + { + int storeValue = item.GetStoreValue(); + calcForSelling = storeValue; + calcForBuying = storeValue; + } + } +} diff --git a/GameContent/UI/Elements/EmoteButton.cs b/GameContent/UI/Elements/EmoteButton.cs new file mode 100644 index 0000000..7fe3565 --- /dev/null +++ b/GameContent/UI/Elements/EmoteButton.cs @@ -0,0 +1,97 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.EmoteButton +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.Audio; +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class EmoteButton : UIElement + { + private Asset _texture; + private Asset _textureBorder; + private int _emoteIndex; + private bool _hovered; + private int _frameCounter; + + public EmoteButton(int emoteIndex) + { + this._texture = Main.Assets.Request("Images/Extra_" + (object) (short) 48, (AssetRequestMode) 1); + this._textureBorder = Main.Assets.Request("Images/UI/EmoteBubbleBorder", (AssetRequestMode) 1); + this._emoteIndex = emoteIndex; + Rectangle frame = this.GetFrame(); + this.Width.Set((float) frame.Width, 0.0f); + this.Height.Set((float) frame.Height, 0.0f); + } + + private Rectangle GetFrame() => this._texture.Frame(8, 38, this._emoteIndex % 4 * 2 + (this._frameCounter >= 10 ? 1 : 0), this._emoteIndex / 4 + 1); + + private void UpdateFrame() + { + if (++this._frameCounter < 20) + return; + this._frameCounter = 0; + } + + public override void Update(GameTime gameTime) + { + this.UpdateFrame(); + base.Update(gameTime); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + CalculatedStyle dimensions = this.GetDimensions(); + Vector2 position = dimensions.Position() + new Vector2(dimensions.Width, dimensions.Height) / 2f; + Rectangle frame = this.GetFrame(); + Rectangle rectangle = frame; + rectangle.X = this._texture.Width() / 8; + rectangle.Y = 0; + Vector2 origin = frame.Size() / 2f; + Color white = Color.White; + Color color = Color.Black; + if (this._hovered) + color = Main.OurFavoriteColor; + spriteBatch.Draw(this._texture.Value, position, new Rectangle?(rectangle), white, 0.0f, origin, 1f, SpriteEffects.None, 0.0f); + spriteBatch.Draw(this._texture.Value, position, new Rectangle?(frame), white, 0.0f, origin, 1f, SpriteEffects.None, 0.0f); + spriteBatch.Draw(this._textureBorder.Value, position - Vector2.One * 2f, new Rectangle?(), color, 0.0f, origin, 1f, SpriteEffects.None, 0.0f); + if (!this._hovered) + return; + string cursorText = "/" + Language.GetTextValue("EmojiName." + EmoteID.Search.GetName(this._emoteIndex)); + Main.instance.MouseText(cursorText); + } + + public override void MouseOver(UIMouseEvent evt) + { + base.MouseOver(evt); + SoundEngine.PlaySound(12); + this._hovered = true; + } + + public override void MouseOut(UIMouseEvent evt) + { + base.MouseOut(evt); + this._hovered = false; + } + + public override void Click(UIMouseEvent evt) + { + base.Click(evt); + if (Main.netMode == 0) + { + EmoteBubble.NewBubble(this._emoteIndex, new WorldUIAnchor((Entity) Main.LocalPlayer), 360); + EmoteBubble.CheckForNPCsToReactToEmoteBubble(this._emoteIndex, Main.LocalPlayer); + } + else + NetMessage.SendData(120, number: Main.myPlayer, number2: ((float) this._emoteIndex)); + IngameFancyUI.Close(); + } + } +} diff --git a/GameContent/UI/Elements/EmotesGroupListItem.cs b/GameContent/UI/Elements/EmotesGroupListItem.cs new file mode 100644 index 0000000..6dd82b0 --- /dev/null +++ b/GameContent/UI/Elements/EmotesGroupListItem.cs @@ -0,0 +1,87 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.EmotesGroupListItem +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class EmotesGroupListItem : UIElement + { + private const int TITLE_HEIGHT = 20; + private const int SEPARATOR_HEIGHT = 10; + private const int SIZE_PER_EMOTE = 36; + private Asset _tempTex; + private int _groupIndex; + private int _maxEmotesPerRow = 10; + + public EmotesGroupListItem( + LocalizedText groupTitle, + int groupIndex, + int maxEmotesPerRow, + params int[] emotes) + { + maxEmotesPerRow = 14; + this.SetPadding(0.0f); + this._groupIndex = groupIndex; + this._maxEmotesPerRow = maxEmotesPerRow; + this._tempTex = Main.Assets.Request("Images/UI/ButtonFavoriteInactive", (AssetRequestMode) 1); + int num1 = emotes.Length / this._maxEmotesPerRow; + if (emotes.Length % this._maxEmotesPerRow != 0) + ++num1; + this.Height.Set((float) (30 + 36 * num1), 0.0f); + this.Width.Set(0.0f, 1f); + UIElement element = new UIElement() + { + Height = StyleDimension.FromPixels(30f), + Width = StyleDimension.FromPixelsAndPercent(-20f, 1f), + HAlign = 0.5f + }; + element.SetPadding(0.0f); + this.Append(element); + UIHorizontalSeparator horizontalSeparator1 = new UIHorizontalSeparator(); + horizontalSeparator1.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + horizontalSeparator1.VAlign = 1f; + horizontalSeparator1.HAlign = 0.5f; + horizontalSeparator1.Color = Color.Lerp(Color.White, new Color(63, 65, 151, (int) byte.MaxValue), 0.85f) * 0.9f; + UIHorizontalSeparator horizontalSeparator2 = horizontalSeparator1; + element.Append((UIElement) horizontalSeparator2); + UIText uiText1 = new UIText(groupTitle); + uiText1.VAlign = 1f; + uiText1.HAlign = 0.5f; + uiText1.Top = StyleDimension.FromPixels(-6f); + UIText uiText2 = uiText1; + element.Append((UIElement) uiText2); + float num2 = 6f; + for (int id = 0; id < emotes.Length; ++id) + { + int emote = emotes[id]; + int num3 = id / this._maxEmotesPerRow; + int num4 = id % this._maxEmotesPerRow; + int num5 = emotes.Length % this._maxEmotesPerRow; + if (emotes.Length / this._maxEmotesPerRow != num3) + num5 = this._maxEmotesPerRow; + if (num5 == 0) + num5 = this._maxEmotesPerRow; + float num6 = (float) (36.0 * ((double) num5 / 2.0)) - 16f; + float num7 = -16f; + EmoteButton emoteButton1 = new EmoteButton(emote); + emoteButton1.HAlign = 0.0f; + emoteButton1.VAlign = 0.0f; + emoteButton1.Top = StyleDimension.FromPixels((float) (30 + num3 * 36) + num2); + emoteButton1.Left = StyleDimension.FromPixels((float) (36 * num4) - num7); + EmoteButton emoteButton2 = emoteButton1; + this.Append((UIElement) emoteButton2); + emoteButton2.SetSnapPoint("Group " + (object) groupIndex, id); + } + } + + public override int CompareTo(object obj) => obj is EmotesGroupListItem emotesGroupListItem ? this._groupIndex.CompareTo(emotesGroupListItem._groupIndex) : base.CompareTo(obj); + } +} diff --git a/GameContent/UI/Elements/ExtraBestiaryInfoPageInformation.cs b/GameContent/UI/Elements/ExtraBestiaryInfoPageInformation.cs new file mode 100644 index 0000000..41fd83a --- /dev/null +++ b/GameContent/UI/Elements/ExtraBestiaryInfoPageInformation.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.ExtraBestiaryInfoPageInformation +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.GameContent.Bestiary; + +namespace Terraria.GameContent.UI.Elements +{ + public struct ExtraBestiaryInfoPageInformation + { + public BestiaryUnlockProgressReport BestiaryProgressReport; + } +} diff --git a/GameContent/UI/Elements/GroupOptionButton`1.cs b/GameContent/UI/Elements/GroupOptionButton`1.cs new file mode 100644 index 0000000..8aeb554 --- /dev/null +++ b/GameContent/UI/Elements/GroupOptionButton`1.cs @@ -0,0 +1,169 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.GroupOptionButton`1 +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.Audio; +using Terraria.ID; +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class GroupOptionButton : UIElement, IGroupOptionButton where T : IConvertible + { + private T _currentOption; + private readonly Asset _BasePanelTexture; + private readonly Asset _selectedBorderTexture; + private readonly Asset _hoveredBorderTexture; + private readonly Asset _iconTexture; + private readonly T _myOption; + private Color _color; + private Color _borderColor; + public float FadeFromBlack = 1f; + private float _whiteLerp = 0.7f; + private float _opacity = 0.7f; + private bool _hovered; + private bool _soundedHover; + public bool ShowHighlightWhenSelected = true; + private bool _UseOverrideColors; + private Color _overrideUnpickedColor = Color.White; + private Color _overridePickedColor = Color.White; + private float _overrideOpacityPicked; + private float _overrideOpacityUnpicked; + public readonly LocalizedText Description; + private UIText _title; + + public T OptionValue => this._myOption; + + public bool IsSelected => this._currentOption.Equals((object) this._myOption); + + public GroupOptionButton( + T option, + LocalizedText title, + LocalizedText description, + Color textColor, + string iconTexturePath, + float textSize = 1f, + float titleAlignmentX = 0.5f, + float titleWidthReduction = 10f) + { + this._borderColor = Color.White; + this._currentOption = option; + this._myOption = option; + this.Description = description; + this.Width = StyleDimension.FromPixels(44f); + this.Height = StyleDimension.FromPixels(34f); + this._BasePanelTexture = Main.Assets.Request("Images/UI/CharCreation/PanelGrayscale", (AssetRequestMode) 1); + this._selectedBorderTexture = Main.Assets.Request("Images/UI/CharCreation/CategoryPanelHighlight", (AssetRequestMode) 1); + this._hoveredBorderTexture = Main.Assets.Request("Images/UI/CharCreation/CategoryPanelBorder", (AssetRequestMode) 1); + if (iconTexturePath != null) + this._iconTexture = Main.Assets.Request(iconTexturePath, (AssetRequestMode) 1); + this._color = Colors.InventoryDefaultColor; + if (title == null) + return; + UIText uiText1 = new UIText(title, textSize); + uiText1.HAlign = titleAlignmentX; + uiText1.VAlign = 0.5f; + uiText1.Width = StyleDimension.FromPixelsAndPercent(-titleWidthReduction, 1f); + uiText1.Top = StyleDimension.FromPixels(0.0f); + UIText uiText2 = uiText1; + uiText2.TextColor = textColor; + this.Append((UIElement) uiText2); + this._title = uiText2; + } + + public void SetText(LocalizedText text, float textSize, Color color) + { + if (this._title != null) + this._title.Remove(); + UIText uiText1 = new UIText(text, textSize); + uiText1.HAlign = 0.5f; + uiText1.VAlign = 0.5f; + uiText1.Width = StyleDimension.FromPixelsAndPercent(-10f, 1f); + uiText1.Top = StyleDimension.FromPixels(0.0f); + UIText uiText2 = uiText1; + uiText2.TextColor = color; + this.Append((UIElement) uiText2); + this._title = uiText2; + } + + public void SetCurrentOption(T option) => this._currentOption = option; + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + if (this._hovered) + { + if (!this._soundedHover) + SoundEngine.PlaySound(12); + this._soundedHover = true; + } + else + this._soundedHover = false; + CalculatedStyle dimensions = this.GetDimensions(); + Color color1 = this._color; + float num = this._opacity; + bool isSelected = this.IsSelected; + if (this._UseOverrideColors) + { + color1 = isSelected ? this._overridePickedColor : this._overrideUnpickedColor; + num = isSelected ? this._overrideOpacityPicked : this._overrideOpacityUnpicked; + } + Utils.DrawSplicedPanel(spriteBatch, this._BasePanelTexture.Value, (int) dimensions.X, (int) dimensions.Y, (int) dimensions.Width, (int) dimensions.Height, 10, 10, 10, 10, Color.Lerp(Color.Black, color1, this.FadeFromBlack) * num); + if (isSelected && this.ShowHighlightWhenSelected) + Utils.DrawSplicedPanel(spriteBatch, this._selectedBorderTexture.Value, (int) dimensions.X + 7, (int) dimensions.Y + 7, (int) dimensions.Width - 14, (int) dimensions.Height - 14, 10, 10, 10, 10, Color.Lerp(color1, Color.White, this._whiteLerp) * num); + if (this._hovered) + Utils.DrawSplicedPanel(spriteBatch, this._hoveredBorderTexture.Value, (int) dimensions.X, (int) dimensions.Y, (int) dimensions.Width, (int) dimensions.Height, 10, 10, 10, 10, this._borderColor); + if (this._iconTexture == null) + return; + Color color2 = Color.White; + if (!this._hovered && !isSelected) + color2 = Color.Lerp(color1, Color.White, this._whiteLerp) * num; + spriteBatch.Draw(this._iconTexture.Value, new Vector2(dimensions.X + 1f, dimensions.Y + 1f), color2); + } + + public override void MouseDown(UIMouseEvent evt) + { + SoundEngine.PlaySound(12); + base.MouseDown(evt); + } + + public override void MouseOver(UIMouseEvent evt) + { + base.MouseOver(evt); + this._hovered = true; + } + + public override void MouseOut(UIMouseEvent evt) + { + base.MouseOut(evt); + this._hovered = false; + } + + public void SetColor(Color color, float opacity) + { + this._color = color; + this._opacity = opacity; + } + + public void SetColorsBasedOnSelectionState( + Color pickedColor, + Color unpickedColor, + float opacityPicked, + float opacityNotPicked) + { + this._UseOverrideColors = true; + this._overridePickedColor = pickedColor; + this._overrideUnpickedColor = unpickedColor; + this._overrideOpacityPicked = opacityPicked; + this._overrideOpacityUnpicked = opacityNotPicked; + } + + public void SetBorderColor(Color color) => this._borderColor = color; + } +} diff --git a/GameContent/UI/Elements/IColorable.cs b/GameContent/UI/Elements/IColorable.cs new file mode 100644 index 0000000..cd8272b --- /dev/null +++ b/GameContent/UI/Elements/IColorable.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.IColorable +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.GameContent.UI.Elements +{ + public interface IColorable + { + Color Color { get; set; } + } +} diff --git a/GameContent/UI/Elements/IGroupOptionButton.cs b/GameContent/UI/Elements/IGroupOptionButton.cs new file mode 100644 index 0000000..bf155f1 --- /dev/null +++ b/GameContent/UI/Elements/IGroupOptionButton.cs @@ -0,0 +1,21 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.IGroupOptionButton +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.GameContent.UI.Elements +{ + public interface IGroupOptionButton + { + void SetColorsBasedOnSelectionState( + Color pickedColor, + Color unpickedColor, + float opacityPicked, + float opacityNotPicked); + + void SetBorderColor(Color color); + } +} diff --git a/GameContent/UI/Elements/IManuallyOrderedUIElement.cs b/GameContent/UI/Elements/IManuallyOrderedUIElement.cs new file mode 100644 index 0000000..9b278c8 --- /dev/null +++ b/GameContent/UI/Elements/IManuallyOrderedUIElement.cs @@ -0,0 +1,13 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.IManuallyOrderedUIElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.UI.Elements +{ + public interface IManuallyOrderedUIElement + { + int OrderInUIList { get; set; } + } +} diff --git a/GameContent/UI/Elements/PowerStripUIElement.cs b/GameContent/UI/Elements/PowerStripUIElement.cs new file mode 100644 index 0000000..fc718d7 --- /dev/null +++ b/GameContent/UI/Elements/PowerStripUIElement.cs @@ -0,0 +1,49 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.PowerStripUIElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class PowerStripUIElement : UIElement + { + private List _buttonsBySorting; + private string _gamepadPointGroupname; + + public PowerStripUIElement(string gamepadGroupName, List buttons) + { + this._buttonsBySorting = new List((IEnumerable) buttons); + this._gamepadPointGroupname = gamepadGroupName; + int count = buttons.Count; + int num1 = 4; + int num2 = 40; + int num3 = 40; + int num4 = num3 + num1; + UIPanel uiPanel1 = new UIPanel(); + uiPanel1.Width = new StyleDimension((float) (num2 + num1 * 2), 0.0f); + uiPanel1.Height = new StyleDimension((float) (num3 * count + num1 * (1 + count)), 0.0f); + UIPanel uiPanel2 = uiPanel1; + this.SetPadding(0.0f); + this.Width = uiPanel2.Width; + this.Height = uiPanel2.Height; + uiPanel2.BorderColor = new Color(89, 116, 213, (int) byte.MaxValue) * 0.9f; + uiPanel2.BackgroundColor = new Color(73, 94, 171) * 0.9f; + uiPanel2.SetPadding(0.0f); + this.Append((UIElement) uiPanel2); + for (int index = 0; index < count; ++index) + { + UIElement button = buttons[index]; + button.HAlign = 0.5f; + button.Top = new StyleDimension((float) (num1 + num4 * index), 0.0f); + button.SetSnapPoint(this._gamepadPointGroupname, index); + uiPanel2.Append(button); + this._buttonsBySorting.Add(button); + } + } + } +} diff --git a/GameContent/UI/Elements/UIAchievementListItem.cs b/GameContent/UI/Elements/UIAchievementListItem.cs new file mode 100644 index 0000000..beb0283 --- /dev/null +++ b/GameContent/UI/Elements/UIAchievementListItem.cs @@ -0,0 +1,231 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIAchievementListItem +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.Achievements; +using Terraria.Localization; +using Terraria.UI; +using Terraria.UI.Chat; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIAchievementListItem : UIPanel + { + private Achievement _achievement; + private UIImageFramed _achievementIcon; + private UIImage _achievementIconBorders; + private const int _iconSize = 64; + private const int _iconSizeWithSpace = 66; + private const int _iconsPerRow = 8; + private int _iconIndex; + private Rectangle _iconFrame; + private Rectangle _iconFrameUnlocked; + private Rectangle _iconFrameLocked; + private Asset _innerPanelTopTexture; + private Asset _innerPanelBottomTexture; + private Asset _categoryTexture; + private bool _locked; + private bool _large; + + public UIAchievementListItem(Achievement achievement, bool largeForOtherLanguages) + { + this._large = largeForOtherLanguages; + this.BackgroundColor = new Color(26, 40, 89) * 0.8f; + this.BorderColor = new Color(13, 20, 44) * 0.8f; + float num = (float) (16 + this._large.ToInt() * 20); + float pixels1 = (float) (this._large.ToInt() * 6); + float pixels2 = (float) (this._large.ToInt() * 12); + this._achievement = achievement; + this.Height.Set(66f + num, 0.0f); + this.Width.Set(0.0f, 1f); + this.PaddingTop = 8f; + this.PaddingLeft = 9f; + int iconIndex = Main.Achievements.GetIconIndex(achievement.Name); + this._iconIndex = iconIndex; + this._iconFrameUnlocked = new Rectangle(iconIndex % 8 * 66, iconIndex / 8 * 66, 64, 64); + this._iconFrameLocked = this._iconFrameUnlocked; + this._iconFrameLocked.X += 528; + this._iconFrame = this._iconFrameLocked; + this.UpdateIconFrame(); + this._achievementIcon = new UIImageFramed(Main.Assets.Request("Images/UI/Achievements", (AssetRequestMode) 1), this._iconFrame); + this._achievementIcon.Left.Set(pixels1, 0.0f); + this._achievementIcon.Top.Set(pixels2, 0.0f); + this.Append((UIElement) this._achievementIcon); + this._achievementIconBorders = new UIImage(Main.Assets.Request("Images/UI/Achievement_Borders", (AssetRequestMode) 1)); + this._achievementIconBorders.Left.Set(pixels1 - 4f, 0.0f); + this._achievementIconBorders.Top.Set(pixels2 - 4f, 0.0f); + this.Append((UIElement) this._achievementIconBorders); + this._innerPanelTopTexture = Main.Assets.Request("Images/UI/Achievement_InnerPanelTop", (AssetRequestMode) 1); + this._innerPanelBottomTexture = !this._large ? Main.Assets.Request("Images/UI/Achievement_InnerPanelBottom", (AssetRequestMode) 1) : Main.Assets.Request("Images/UI/Achievement_InnerPanelBottom_Large", (AssetRequestMode) 1); + this._categoryTexture = Main.Assets.Request("Images/UI/Achievement_Categories", (AssetRequestMode) 1); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + base.DrawSelf(spriteBatch); + int num1 = this._large.ToInt() * 6; + Vector2 vector2_1 = new Vector2((float) num1, 0.0f); + this._locked = !this._achievement.IsCompleted; + this.UpdateIconFrame(); + CalculatedStyle innerDimensions = this.GetInnerDimensions(); + CalculatedStyle dimensions = this._achievementIconBorders.GetDimensions(); + Vector2 vector2_2 = new Vector2(dimensions.X + dimensions.Width + 7f, innerDimensions.Y); + Tuple trackerValues = this.GetTrackerValues(); + bool flag = false; + if ((!(trackerValues.Item1 == 0M) || !(trackerValues.Item2 == 0M)) && this._locked) + flag = true; + float num2 = (float) ((double) innerDimensions.Width - (double) dimensions.Width + 1.0) - (float) (num1 * 2); + Vector2 baseScale1 = new Vector2(0.85f); + Vector2 baseScale2 = new Vector2(0.92f); + string wrappedText = FontAssets.ItemStack.Value.CreateWrappedText(this._achievement.Description.Value, (float) (((double) num2 - 20.0) * (1.0 / (double) baseScale2.X)), Language.ActiveCulture.CultureInfo); + Vector2 stringSize1 = ChatManager.GetStringSize(FontAssets.ItemStack.Value, wrappedText, baseScale2, num2); + if (!this._large) + stringSize1 = ChatManager.GetStringSize(FontAssets.ItemStack.Value, this._achievement.Description.Value, baseScale2, num2); + float num3 = (float) (38.0 + (this._large ? 20.0 : 0.0)); + if ((double) stringSize1.Y > (double) num3) + baseScale2.Y *= num3 / stringSize1.Y; + Color baseColor1 = Color.Lerp(this._locked ? Color.Silver : Color.Gold, Color.White, this.IsMouseHovering ? 0.5f : 0.0f); + Color baseColor2 = Color.Lerp(this._locked ? Color.DarkGray : Color.Silver, Color.White, this.IsMouseHovering ? 1f : 0.0f); + Color color1 = this.IsMouseHovering ? Color.White : Color.Gray; + Vector2 position1 = vector2_2 - Vector2.UnitY * 2f + vector2_1; + this.DrawPanelTop(spriteBatch, position1, num2, color1); + AchievementCategory category = this._achievement.Category; + position1.Y += 2f; + position1.X += 4f; + spriteBatch.Draw(this._categoryTexture.Value, position1, new Rectangle?(this._categoryTexture.Frame(4, 2, (int) category)), this.IsMouseHovering ? Color.White : Color.Silver, 0.0f, Vector2.Zero, 0.5f, SpriteEffects.None, 0.0f); + position1.X += 4f; + position1.X += 17f; + ChatManager.DrawColorCodedStringWithShadow(spriteBatch, FontAssets.ItemStack.Value, this._achievement.FriendlyName.Value, position1, baseColor1, 0.0f, Vector2.Zero, baseScale1, num2); + position1.X -= 17f; + Vector2 position2 = vector2_2 + Vector2.UnitY * 27f + vector2_1; + this.DrawPanelBottom(spriteBatch, position2, num2, color1); + position2.X += 8f; + position2.Y += 4f; + ChatManager.DrawColorCodedStringWithShadow(spriteBatch, FontAssets.ItemStack.Value, wrappedText, position2, baseColor2, 0.0f, Vector2.Zero, baseScale2); + if (!flag) + return; + Vector2 position3 = position1 + Vector2.UnitX * num2 + Vector2.UnitY; + string text = ((int) trackerValues.Item1).ToString() + "/" + (object) (int) trackerValues.Item2; + Vector2 baseScale3 = new Vector2(0.75f); + Vector2 stringSize2 = ChatManager.GetStringSize(FontAssets.ItemStack.Value, text, baseScale3); + float progress = (float) (trackerValues.Item1 / trackerValues.Item2); + float Width = 80f; + Color color2 = new Color(100, (int) byte.MaxValue, 100); + if (!this.IsMouseHovering) + color2 = Color.Lerp(color2, Color.Black, 0.25f); + Color BackColor = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + if (!this.IsMouseHovering) + BackColor = Color.Lerp(BackColor, Color.Black, 0.25f); + this.DrawProgressBar(spriteBatch, progress, position3 - Vector2.UnitX * Width * 0.7f, Width, BackColor, color2, color2.MultiplyRGBA(new Color(new Vector4(1f, 1f, 1f, 0.5f)))); + position3.X -= Width * 1.4f + stringSize2.X; + ChatManager.DrawColorCodedStringWithShadow(spriteBatch, FontAssets.ItemStack.Value, text, position3, baseColor1, 0.0f, new Vector2(0.0f, 0.0f), baseScale3, 90f); + } + + private void UpdateIconFrame() + { + this._iconFrame = this._locked ? this._iconFrameLocked : this._iconFrameUnlocked; + if (this._achievementIcon == null) + return; + this._achievementIcon.SetFrame(this._iconFrame); + } + + private void DrawPanelTop(SpriteBatch spriteBatch, Vector2 position, float width, Color color) + { + spriteBatch.Draw(this._innerPanelTopTexture.Value, position, new Rectangle?(new Rectangle(0, 0, 2, this._innerPanelTopTexture.Height())), color); + spriteBatch.Draw(this._innerPanelTopTexture.Value, new Vector2(position.X + 2f, position.Y), new Rectangle?(new Rectangle(2, 0, 2, this._innerPanelTopTexture.Height())), color, 0.0f, Vector2.Zero, new Vector2((float) (((double) width - 4.0) / 2.0), 1f), SpriteEffects.None, 0.0f); + spriteBatch.Draw(this._innerPanelTopTexture.Value, new Vector2((float) ((double) position.X + (double) width - 2.0), position.Y), new Rectangle?(new Rectangle(4, 0, 2, this._innerPanelTopTexture.Height())), color); + } + + private void DrawPanelBottom( + SpriteBatch spriteBatch, + Vector2 position, + float width, + Color color) + { + spriteBatch.Draw(this._innerPanelBottomTexture.Value, position, new Rectangle?(new Rectangle(0, 0, 6, this._innerPanelBottomTexture.Height())), color); + spriteBatch.Draw(this._innerPanelBottomTexture.Value, new Vector2(position.X + 6f, position.Y), new Rectangle?(new Rectangle(6, 0, 7, this._innerPanelBottomTexture.Height())), color, 0.0f, Vector2.Zero, new Vector2((float) (((double) width - 12.0) / 7.0), 1f), SpriteEffects.None, 0.0f); + spriteBatch.Draw(this._innerPanelBottomTexture.Value, new Vector2((float) ((double) position.X + (double) width - 6.0), position.Y), new Rectangle?(new Rectangle(13, 0, 6, this._innerPanelBottomTexture.Height())), color); + } + + public override void MouseOver(UIMouseEvent evt) + { + base.MouseOver(evt); + this.BackgroundColor = new Color(46, 60, 119); + this.BorderColor = new Color(20, 30, 56); + } + + public override void MouseOut(UIMouseEvent evt) + { + base.MouseOut(evt); + this.BackgroundColor = new Color(26, 40, 89) * 0.8f; + this.BorderColor = new Color(13, 20, 44) * 0.8f; + } + + public Achievement GetAchievement() => this._achievement; + + private Tuple GetTrackerValues() + { + if (!this._achievement.HasTracker) + return Tuple.Create(0M, 0M); + IAchievementTracker tracker = this._achievement.GetTracker(); + if (tracker.GetTrackerType() == TrackerType.Int) + { + AchievementTracker achievementTracker = (AchievementTracker) tracker; + return Tuple.Create((Decimal) achievementTracker.Value, (Decimal) achievementTracker.MaxValue); + } + if (tracker.GetTrackerType() != TrackerType.Float) + return Tuple.Create(0M, 0M); + AchievementTracker achievementTracker1 = (AchievementTracker) tracker; + return Tuple.Create((Decimal) achievementTracker1.Value, (Decimal) achievementTracker1.MaxValue); + } + + private void DrawProgressBar( + SpriteBatch spriteBatch, + float progress, + Vector2 spot, + float Width = 169f, + Color BackColor = default (Color), + Color FillingColor = default (Color), + Color BlipColor = default (Color)) + { + if (BlipColor == Color.Transparent) + BlipColor = new Color((int) byte.MaxValue, 165, 0, (int) sbyte.MaxValue); + if (FillingColor == Color.Transparent) + FillingColor = new Color((int) byte.MaxValue, 241, 51); + if (BackColor == Color.Transparent) + FillingColor = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + Texture2D texture1 = TextureAssets.ColorBar.Value; + Texture2D texture2D = TextureAssets.ColorBlip.Value; + Texture2D texture2 = TextureAssets.MagicPixel.Value; + float num1 = MathHelper.Clamp(progress, 0.0f, 1f); + float num2 = Width * 1f; + float y = 8f; + float x = num2 / 169f; + Vector2 vector2 = spot + Vector2.UnitY * y + Vector2.UnitX * 1f; + spriteBatch.Draw(texture1, spot, new Rectangle?(new Rectangle(5, 0, texture1.Width - 9, texture1.Height)), BackColor, 0.0f, new Vector2(84.5f, 0.0f), new Vector2(x, 1f), SpriteEffects.None, 0.0f); + spriteBatch.Draw(texture1, spot + new Vector2((float) (-(double) x * 84.5 - 5.0), 0.0f), new Rectangle?(new Rectangle(0, 0, 5, texture1.Height)), BackColor, 0.0f, Vector2.Zero, Vector2.One, SpriteEffects.None, 0.0f); + spriteBatch.Draw(texture1, spot + new Vector2(x * 84.5f, 0.0f), new Rectangle?(new Rectangle(texture1.Width - 4, 0, 4, texture1.Height)), BackColor, 0.0f, Vector2.Zero, Vector2.One, SpriteEffects.None, 0.0f); + Vector2 position = vector2 + Vector2.UnitX * (num1 - 0.5f) * num2; + --position.X; + spriteBatch.Draw(texture2, position, new Rectangle?(new Rectangle(0, 0, 1, 1)), FillingColor, 0.0f, new Vector2(1f, 0.5f), new Vector2(num2 * num1, y), SpriteEffects.None, 0.0f); + if ((double) progress != 0.0) + spriteBatch.Draw(texture2, position, new Rectangle?(new Rectangle(0, 0, 1, 1)), BlipColor, 0.0f, new Vector2(1f, 0.5f), new Vector2(2f, y), SpriteEffects.None, 0.0f); + spriteBatch.Draw(texture2, position, new Rectangle?(new Rectangle(0, 0, 1, 1)), Color.Black, 0.0f, new Vector2(0.0f, 0.5f), new Vector2(num2 * (1f - num1), y), SpriteEffects.None, 0.0f); + } + + public override int CompareTo(object obj) + { + if (!(obj is UIAchievementListItem achievementListItem)) + return 0; + if (this._achievement.IsCompleted && !achievementListItem._achievement.IsCompleted) + return -1; + return !this._achievement.IsCompleted && achievementListItem._achievement.IsCompleted ? 1 : this._achievement.Id.CompareTo(achievementListItem._achievement.Id); + } + } +} diff --git a/GameContent/UI/Elements/UIBestiaryEntryButton.cs b/GameContent/UI/Elements/UIBestiaryEntryButton.cs new file mode 100644 index 0000000..35160b2 --- /dev/null +++ b/GameContent/UI/Elements/UIBestiaryEntryButton.cs @@ -0,0 +1,155 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIBestiaryEntryButton +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.Audio; +using Terraria.GameContent.Bestiary; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIBestiaryEntryButton : UIElement + { + private UIImage _bordersGlow; + private UIImage _bordersOverlay; + private UIImage _borders; + private UIBestiaryEntryIcon _icon; + + public BestiaryEntry Entry { get; private set; } + + public UIBestiaryEntryButton(BestiaryEntry entry, bool isAPrettyPortrait) + { + this.Entry = entry; + this.Height.Set(72f, 0.0f); + this.Width.Set(72f, 0.0f); + this.SetPadding(0.0f); + UIElement element = new UIElement() + { + Width = new StyleDimension(-4f, 1f), + Height = new StyleDimension(-4f, 1f), + IgnoresMouseInteraction = true, + OverflowHidden = true, + HAlign = 0.5f, + VAlign = 0.5f + }; + element.SetPadding(0.0f); + UIImage uiImage1 = new UIImage(Main.Assets.Request("Images/UI/Bestiary/Slot_Back", (AssetRequestMode) 1)); + uiImage1.VAlign = 0.5f; + uiImage1.HAlign = 0.5f; + element.Append((UIElement) uiImage1); + if (isAPrettyPortrait) + { + Asset texture = this.TryGettingBackgroundImageProvider(entry); + if (texture != null) + { + UIElement uiElement = element; + UIImage uiImage2 = new UIImage(texture); + uiImage2.HAlign = 0.5f; + uiImage2.VAlign = 0.5f; + uiElement.Append((UIElement) uiImage2); + } + } + UIBestiaryEntryIcon bestiaryEntryIcon = new UIBestiaryEntryIcon(entry, isAPrettyPortrait); + element.Append((UIElement) bestiaryEntryIcon); + this.Append(element); + this._icon = bestiaryEntryIcon; + int? nullable = this.TryGettingDisplayIndex(entry); + if (nullable.HasValue) + { + UIText uiText = new UIText(nullable.Value.ToString(), 0.9f); + uiText.Top = new StyleDimension(10f, 0.0f); + uiText.Left = new StyleDimension(10f, 0.0f); + uiText.IgnoresMouseInteraction = true; + this.Append((UIElement) uiText); + } + UIImage uiImage3 = new UIImage(Main.Assets.Request("Images/UI/Bestiary/Slot_Selection", (AssetRequestMode) 1)); + uiImage3.VAlign = 0.5f; + uiImage3.HAlign = 0.5f; + uiImage3.IgnoresMouseInteraction = true; + this._bordersGlow = uiImage3; + UIImage uiImage4 = new UIImage(Main.Assets.Request("Images/UI/Bestiary/Slot_Overlay", (AssetRequestMode) 1)); + uiImage4.VAlign = 0.5f; + uiImage4.HAlign = 0.5f; + uiImage4.IgnoresMouseInteraction = true; + uiImage4.Color = Color.White * 0.6f; + this._bordersOverlay = uiImage4; + this.Append((UIElement) this._bordersOverlay); + UIImage uiImage5 = new UIImage(Main.Assets.Request("Images/UI/Bestiary/Slot_Front", (AssetRequestMode) 1)); + uiImage5.VAlign = 0.5f; + uiImage5.HAlign = 0.5f; + uiImage5.IgnoresMouseInteraction = true; + this.Append((UIElement) uiImage5); + this._borders = uiImage5; + if (isAPrettyPortrait) + this.RemoveChild((UIElement) this._bordersOverlay); + if (isAPrettyPortrait) + return; + this.OnMouseOver += new UIElement.MouseEvent(this.MouseOver); + this.OnMouseOut += new UIElement.MouseEvent(this.MouseOut); + } + + private Asset TryGettingBackgroundImageProvider(BestiaryEntry entry) + { + IEnumerable source = entry.Info.Where((Func) (x => x is IBestiaryBackgroundImagePathAndColorProvider)).Select((Func) (x => x as IBestiaryBackgroundImagePathAndColorProvider)); + IEnumerable preferences = entry.Info.OfType(); + foreach (IBestiaryBackgroundImagePathAndColorProvider andColorProvider in source.Where((Func) (provider => preferences.Any((Func) (preference => preference.Matches(provider)))))) + { + Asset backgroundImage = andColorProvider.GetBackgroundImage(); + if (backgroundImage != null) + return backgroundImage; + } + foreach (IBestiaryBackgroundImagePathAndColorProvider andColorProvider in source) + { + Asset backgroundImage = andColorProvider.GetBackgroundImage(); + if (backgroundImage != null) + return backgroundImage; + } + return (Asset) null; + } + + private int? TryGettingDisplayIndex(BestiaryEntry entry) + { + int? nullable = new int?(); + IBestiaryInfoElement bestiaryInfoElement = entry.Info.FirstOrDefault((Func) (x => x is IBestiaryEntryDisplayIndex)); + if (bestiaryInfoElement != null) + nullable = new int?((bestiaryInfoElement as IBestiaryEntryDisplayIndex).BestiaryDisplayIndex); + return nullable; + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + if (!this.IsMouseHovering) + return; + Main.instance.MouseText(this._icon.GetHoverText()); + } + + private void MouseOver(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + this.RemoveChild((UIElement) this._borders); + this.RemoveChild((UIElement) this._bordersGlow); + this.RemoveChild((UIElement) this._bordersOverlay); + this.Append((UIElement) this._borders); + this.Append((UIElement) this._bordersGlow); + this._icon.ForceHover = true; + } + + private void MouseOut(UIMouseEvent evt, UIElement listeningElement) + { + this.RemoveChild((UIElement) this._borders); + this.RemoveChild((UIElement) this._bordersGlow); + this.RemoveChild((UIElement) this._bordersOverlay); + this.Append((UIElement) this._bordersOverlay); + this.Append((UIElement) this._borders); + this._icon.ForceHover = false; + } + } +} diff --git a/GameContent/UI/Elements/UIBestiaryEntryGrid.cs b/GameContent/UI/Elements/UIBestiaryEntryGrid.cs new file mode 100644 index 0000000..e4e6dc3 --- /dev/null +++ b/GameContent/UI/Elements/UIBestiaryEntryGrid.cs @@ -0,0 +1,124 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIBestiaryEntryGrid +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.GameContent.Bestiary; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIBestiaryEntryGrid : UIElement + { + private List _workingSetEntries; + private UIElement.MouseEvent _clickOnEntryEvent; + private int _atEntryIndex; + private int _lastEntry; + + public event Action OnGridContentsChanged; + + public UIBestiaryEntryGrid( + List workingSet, + UIElement.MouseEvent clickOnEntryEvent) + { + this.Width = new StyleDimension(0.0f, 1f); + this.Height = new StyleDimension(0.0f, 1f); + this._workingSetEntries = workingSet; + this._clickOnEntryEvent = clickOnEntryEvent; + this.SetPadding(0.0f); + this.UpdateEntries(); + this.FillBestiarySpaceWithEntries(); + } + + public void UpdateEntries() => this._lastEntry = this._workingSetEntries.Count; + + public void FillBestiarySpaceWithEntries() + { + this.RemoveAllChildren(); + this.UpdateEntries(); + int maxEntriesWidth; + int maxEntriesHeight; + int maxEntriesToHave; + this.GetEntriesToShow(out maxEntriesWidth, out maxEntriesHeight, out maxEntriesToHave); + this.FixBestiaryRange(0, maxEntriesToHave); + int atEntryIndex = this._atEntryIndex; + int num1 = Math.Min(this._lastEntry, atEntryIndex + maxEntriesToHave); + List bestiaryEntryList = new List(); + for (int index = atEntryIndex; index < num1; ++index) + bestiaryEntryList.Add(this._workingSetEntries[index]); + int num2 = 0; + float num3 = 0.5f / (float) maxEntriesWidth; + float num4 = 0.5f / (float) maxEntriesHeight; + for (int index1 = 0; index1 < maxEntriesHeight; ++index1) + { + for (int index2 = 0; index2 < maxEntriesWidth && num2 < bestiaryEntryList.Count; ++index2) + { + UIElement element = (UIElement) new UIBestiaryEntryButton(bestiaryEntryList[num2], false); + ++num2; + element.OnClick += this._clickOnEntryEvent; + element.VAlign = element.HAlign = 0.5f; + element.Left.Set(0.0f, (float) ((double) index2 / (double) maxEntriesWidth - 0.5) + num3); + element.Top.Set(0.0f, (float) ((double) index1 / (double) maxEntriesHeight - 0.5) + num4); + element.SetSnapPoint("Entries", num2, new Vector2?(new Vector2(0.2f, 0.7f))); + this.Append(element); + } + } + } + + public override void Recalculate() + { + base.Recalculate(); + this.FillBestiarySpaceWithEntries(); + } + + public void GetEntriesToShow( + out int maxEntriesWidth, + out int maxEntriesHeight, + out int maxEntriesToHave) + { + Rectangle rectangle = this.GetDimensions().ToRectangle(); + maxEntriesWidth = rectangle.Width / 72; + maxEntriesHeight = rectangle.Height / 72; + int num = 0; + maxEntriesToHave = maxEntriesWidth * maxEntriesHeight - num; + } + + public string GetRangeText() + { + int maxEntriesToHave; + this.GetEntriesToShow(out int _, out int _, out maxEntriesToHave); + int atEntryIndex = this._atEntryIndex; + int val2 = Math.Min(this._lastEntry, atEntryIndex + maxEntriesToHave); + return string.Format("{0}-{1} ({2})", (object) Math.Min(atEntryIndex + 1, val2), (object) val2, (object) this._lastEntry); + } + + public void MakeButtonGoByOffset(UIElement element, int howManyPages) => element.OnClick += (UIElement.MouseEvent) ((e, v) => this.OffsetLibraryByPages(howManyPages)); + + public void OffsetLibraryByPages(int howManyPages) + { + int maxEntriesToHave; + this.GetEntriesToShow(out int _, out int _, out maxEntriesToHave); + this.OffsetLibrary(howManyPages * maxEntriesToHave); + } + + public void OffsetLibrary(int offset) + { + int maxEntriesToHave; + this.GetEntriesToShow(out int _, out int _, out maxEntriesToHave); + this.FixBestiaryRange(offset, maxEntriesToHave); + this.FillBestiarySpaceWithEntries(); + } + + private void FixBestiaryRange(int offset, int maxEntriesToHave) + { + this._atEntryIndex = Utils.Clamp(this._atEntryIndex + offset, 0, Math.Max(0, this._lastEntry - maxEntriesToHave)); + if (this.OnGridContentsChanged == null) + return; + this.OnGridContentsChanged(); + } + } +} diff --git a/GameContent/UI/Elements/UIBestiaryEntryIcon.cs b/GameContent/UI/Elements/UIBestiaryEntryIcon.cs new file mode 100644 index 0000000..e186d1d --- /dev/null +++ b/GameContent/UI/Elements/UIBestiaryEntryIcon.cs @@ -0,0 +1,73 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIBestiaryEntryIcon +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.GameContent.Bestiary; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIBestiaryEntryIcon : UIElement + { + private BestiaryEntry _entry; + private Asset _notUnlockedTexture; + private bool _isPortrait; + public bool ForceHover; + private BestiaryUICollectionInfo _collectionInfo; + + public UIBestiaryEntryIcon(BestiaryEntry entry, bool isPortrait) + { + this._entry = entry; + this.IgnoresMouseInteraction = true; + this.OverrideSamplerState = Main.DefaultSamplerState; + this.UseImmediateMode = true; + this.Width.Set(0.0f, 1f); + this.Height.Set(0.0f, 1f); + this._notUnlockedTexture = Main.Assets.Request("Images/UI/Bestiary/Icon_Locked", (AssetRequestMode) 1); + this._isPortrait = isPortrait; + this._collectionInfo = this._entry.UIInfoProvider.GetEntryUICollectionInfo(); + } + + public override void Update(GameTime gameTime) + { + this._collectionInfo = this._entry.UIInfoProvider.GetEntryUICollectionInfo(); + CalculatedStyle dimensions = this.GetDimensions(); + bool flag = this.IsMouseHovering || this.ForceHover; + this._entry.Icon.Update(this._collectionInfo, dimensions.ToRectangle(), new EntryIconDrawSettings() + { + iconbox = dimensions.ToRectangle(), + IsPortrait = this._isPortrait, + IsHovered = flag + }); + base.Update(gameTime); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + CalculatedStyle dimensions = this.GetDimensions(); + int num = this._entry.Icon.GetUnlockState(this._collectionInfo) ? 1 : 0; + bool flag = this.IsMouseHovering || this.ForceHover; + if (num != 0) + { + this._entry.Icon.Draw(this._collectionInfo, spriteBatch, new EntryIconDrawSettings() + { + iconbox = dimensions.ToRectangle(), + IsPortrait = this._isPortrait, + IsHovered = flag + }); + } + else + { + Texture2D texture2D = this._notUnlockedTexture.Value; + spriteBatch.Draw(texture2D, dimensions.Center(), new Rectangle?(), Color.White * 0.15f, 0.0f, texture2D.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + } + } + + public string GetHoverText() => this._entry.Icon.GetHoverText(this._collectionInfo); + } +} diff --git a/GameContent/UI/Elements/UIBestiaryEntryInfoPage.cs b/GameContent/UI/Elements/UIBestiaryEntryInfoPage.cs new file mode 100644 index 0000000..74ddbfb --- /dev/null +++ b/GameContent/UI/Elements/UIBestiaryEntryInfoPage.cs @@ -0,0 +1,188 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIBestiaryEntryInfoPage +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.GameContent.Bestiary; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIBestiaryEntryInfoPage : UIPanel + { + private UIList _list; + private UIScrollbar _scrollbar; + private bool _isScrollbarAttached; + + public UIBestiaryEntryInfoPage() + { + this.Width.Set(230f, 0.0f); + this.Height.Set(0.0f, 1f); + this.SetPadding(0.0f); + this.BorderColor = new Color(89, 116, 213, (int) byte.MaxValue); + this.BackgroundColor = new Color(73, 94, 171); + UIList uiList1 = new UIList(); + uiList1.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + uiList1.Height = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + UIList uiList2 = uiList1; + uiList2.SetPadding(2f); + uiList2.PaddingBottom = 4f; + uiList2.PaddingTop = 4f; + this.Append((UIElement) uiList2); + this._list = uiList2; + uiList2.ListPadding = 4f; + uiList2.ManualSortMethod = new Action>(this.ManualIfnoSortingMethod); + UIScrollbar uiScrollbar = new UIScrollbar(); + uiScrollbar.SetView(100f, 1000f); + uiScrollbar.Height.Set(-20f, 1f); + uiScrollbar.HAlign = 1f; + uiScrollbar.VAlign = 0.5f; + uiScrollbar.Left.Set(-6f, 0.0f); + this._scrollbar = uiScrollbar; + this._list.SetScrollbar(this._scrollbar); + this.CheckScrollBar(); + this.AppendBorderOverEverything(); + } + + public void UpdateScrollbar(int scrollWheelValue) + { + if (this._scrollbar == null) + return; + this._scrollbar.ViewPosition -= (float) scrollWheelValue; + } + + private void AppendBorderOverEverything() + { + UIPanel uiPanel1 = new UIPanel(); + uiPanel1.Width = new StyleDimension(0.0f, 1f); + uiPanel1.Height = new StyleDimension(0.0f, 1f); + uiPanel1.IgnoresMouseInteraction = true; + UIPanel uiPanel2 = uiPanel1; + uiPanel2.BorderColor = new Color(89, 116, 213, (int) byte.MaxValue); + uiPanel2.BackgroundColor = Color.Transparent; + this.Append((UIElement) uiPanel2); + } + + private void ManualIfnoSortingMethod(List list) + { + } + + public override void Recalculate() + { + base.Recalculate(); + this.CheckScrollBar(); + } + + private void CheckScrollBar() + { + if (this._scrollbar == null) + return; + bool canScroll = this._scrollbar.CanScroll; + bool flag = true; + if (this._isScrollbarAttached && !flag) + { + this.RemoveChild((UIElement) this._scrollbar); + this._isScrollbarAttached = false; + this._list.Width.Set(0.0f, 1f); + } + else + { + if (!(!this._isScrollbarAttached & flag)) + return; + this.Append((UIElement) this._scrollbar); + this._isScrollbarAttached = true; + this._list.Width.Set(-20f, 1f); + } + } + + public void FillInfoForEntry(BestiaryEntry entry, ExtraBestiaryInfoPageInformation extraInfo) + { + this._list.Clear(); + if (entry == null) + return; + this.AddInfoToList(entry, extraInfo); + this.Recalculate(); + } + + private BestiaryUICollectionInfo GetUICollectionInfo( + BestiaryEntry entry, + ExtraBestiaryInfoPageInformation extraInfo) + { + IBestiaryUICollectionInfoProvider uiInfoProvider = entry.UIInfoProvider; + BestiaryUICollectionInfo uiCollectionInfo = uiInfoProvider == null ? new BestiaryUICollectionInfo() : uiInfoProvider.GetEntryUICollectionInfo(); + uiCollectionInfo.OwnerEntry = entry; + return uiCollectionInfo; + } + + private void AddInfoToList(BestiaryEntry entry, ExtraBestiaryInfoPageInformation extraInfo) + { + BestiaryUICollectionInfo uiCollectionInfo = this.GetUICollectionInfo(entry, extraInfo); + IOrderedEnumerable> orderedEnumerable = new List((IEnumerable) entry.Info).GroupBy(new Func(this.GetBestiaryInfoCategory)).OrderBy, UIBestiaryEntryInfoPage.BestiaryInfoCategory>((Func, UIBestiaryEntryInfoPage.BestiaryInfoCategory>) (x => x.Key)); + UIElement uiElement1 = (UIElement) null; + foreach (IGrouping source in (IEnumerable>) orderedEnumerable) + { + if (source.Count() != 0) + { + bool flag = false; + foreach (IBestiaryInfoElement bestiaryInfoElement in (IEnumerable) source) + { + UIElement uiElement2 = bestiaryInfoElement.ProvideUIElement(uiCollectionInfo); + if (uiElement2 != null) + { + this._list.Add(uiElement2); + flag = true; + } + } + if (flag) + { + UIHorizontalSeparator horizontalSeparator1 = new UIHorizontalSeparator(); + horizontalSeparator1.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + horizontalSeparator1.Color = new Color(89, 116, 213, (int) byte.MaxValue) * 0.9f; + UIHorizontalSeparator horizontalSeparator2 = horizontalSeparator1; + this._list.Add((UIElement) horizontalSeparator2); + uiElement1 = (UIElement) horizontalSeparator2; + } + } + } + this._list.Remove(uiElement1); + } + + private UIBestiaryEntryInfoPage.BestiaryInfoCategory GetBestiaryInfoCategory( + IBestiaryInfoElement element) + { + switch (element) + { + case NPCPortraitInfoElement _: + return UIBestiaryEntryInfoPage.BestiaryInfoCategory.Portrait; + case FlavorTextBestiaryInfoElement _: + return UIBestiaryEntryInfoPage.BestiaryInfoCategory.FlavorText; + case NamePlateInfoElement _: + return UIBestiaryEntryInfoPage.BestiaryInfoCategory.Nameplate; + case ItemFromCatchingNPCBestiaryInfoElement _: + return UIBestiaryEntryInfoPage.BestiaryInfoCategory.ItemsFromCatchingNPC; + case ItemDropBestiaryInfoElement _: + return UIBestiaryEntryInfoPage.BestiaryInfoCategory.ItemsFromDrops; + case NPCStatsReportInfoElement _: + return UIBestiaryEntryInfoPage.BestiaryInfoCategory.Stats; + default: + return UIBestiaryEntryInfoPage.BestiaryInfoCategory.Misc; + } + } + + private enum BestiaryInfoCategory + { + Nameplate, + Portrait, + FlavorText, + Stats, + ItemsFromCatchingNPC, + ItemsFromDrops, + Misc, + } + } +} diff --git a/GameContent/UI/Elements/UIBestiaryFilteringOptionsGrid.cs b/GameContent/UI/Elements/UIBestiaryFilteringOptionsGrid.cs new file mode 100644 index 0000000..facbb70 --- /dev/null +++ b/GameContent/UI/Elements/UIBestiaryFilteringOptionsGrid.cs @@ -0,0 +1,244 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIBestiaryFilteringOptionsGrid +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using System.Collections.Generic; +using Terraria.DataStructures; +using Terraria.GameContent.Bestiary; +using Terraria.ID; +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIBestiaryFilteringOptionsGrid : UIPanel + { + private EntryFilterer _filterer; + private List> _filterButtons; + private List _areFiltersAvailable; + private List> _filterAvailabilityTests; + private UIElement _container; + + public event Action OnClickingOption; + + public UIBestiaryFilteringOptionsGrid( + EntryFilterer filterer) + { + this._filterer = filterer; + this._filterButtons = new List>(); + this._areFiltersAvailable = new List(); + this._filterAvailabilityTests = new List>(); + this.Width = new StyleDimension(0.0f, 1f); + this.Height = new StyleDimension(0.0f, 1f); + this.BackgroundColor = new Color(35, 40, 83) * 0.5f; + this.BorderColor = new Color(35, 40, 83) * 0.5f; + this.IgnoresMouseInteraction = false; + this.SetPadding(0.0f); + this.BuildContainer(); + } + + private void BuildContainer() + { + int widthWithSpacing; + int heightWithSpacing; + int perRow; + int howManyRows; + this.GetDisplaySettings(out int _, out int _, out widthWithSpacing, out heightWithSpacing, out perRow, out float _, out float _, out howManyRows); + UIPanel uiPanel1 = new UIPanel(); + uiPanel1.Width = new StyleDimension((float) (perRow * widthWithSpacing + 10), 0.0f); + uiPanel1.Height = new StyleDimension((float) (howManyRows * heightWithSpacing + 10), 0.0f); + uiPanel1.HAlign = 1f; + uiPanel1.VAlign = 0.0f; + uiPanel1.Left = new StyleDimension(0.0f, 0.0f); + uiPanel1.Top = new StyleDimension(0.0f, 0.0f); + UIPanel uiPanel2 = uiPanel1; + uiPanel2.BorderColor = new Color(89, 116, 213, (int) byte.MaxValue) * 0.9f; + uiPanel2.BackgroundColor = new Color(73, 94, 171) * 0.9f; + uiPanel2.SetPadding(0.0f); + this.Append((UIElement) uiPanel2); + this._container = (UIElement) uiPanel2; + } + + public void SetupAvailabilityTest(List allAvailableEntries) + { + this._filterAvailabilityTests.Clear(); + for (int index1 = 0; index1 < this._filterer.AvailableFilters.Count; ++index1) + { + List bestiaryEntryList = new List(); + this._filterAvailabilityTests.Add(bestiaryEntryList); + IBestiaryEntryFilter availableFilter = this._filterer.AvailableFilters[index1]; + for (int index2 = 0; index2 < allAvailableEntries.Count; ++index2) + { + if (availableFilter.FitsFilter(allAvailableEntries[index2])) + bestiaryEntryList.Add(allAvailableEntries[index2]); + } + } + } + + public void UpdateAvailability() + { + int widthPerButton; + int heightPerButton; + int widthWithSpacing; + int heightWithSpacing; + int perRow; + float offsetLeft; + float offsetTop; + this.GetDisplaySettings(out widthPerButton, out heightPerButton, out widthWithSpacing, out heightWithSpacing, out perRow, out offsetLeft, out offsetTop, out int _); + this._container.RemoveAllChildren(); + this._filterButtons.Clear(); + this._areFiltersAvailable.Clear(); + int num1 = -1; + int num2 = -1; + for (int index = 0; index < this._filterer.AvailableFilters.Count; ++index) + { + int num3 = index / perRow; + int num4 = index % perRow; + IBestiaryEntryFilter availableFilter = this._filterer.AvailableFilters[index]; + List availabilityTest = this._filterAvailabilityTests[index]; + if (this.GetIsFilterAvailableForEntries(availableFilter, availabilityTest)) + { + GroupOptionButton groupOptionButton1 = new GroupOptionButton(index, (LocalizedText) null, (LocalizedText) null, Color.White, (string) null); + groupOptionButton1.Width = new StyleDimension((float) widthPerButton, 0.0f); + groupOptionButton1.Height = new StyleDimension((float) heightPerButton, 0.0f); + groupOptionButton1.HAlign = 0.0f; + groupOptionButton1.VAlign = 0.0f; + groupOptionButton1.Top = new StyleDimension(offsetTop + (float) (num3 * heightWithSpacing), 0.0f); + groupOptionButton1.Left = new StyleDimension(offsetLeft + (float) (num4 * widthWithSpacing), 0.0f); + GroupOptionButton groupOptionButton2 = groupOptionButton1; + groupOptionButton2.OnClick += new UIElement.MouseEvent(this.ClickOption); + groupOptionButton2.SetSnapPoint("Filters", index); + groupOptionButton2.ShowHighlightWhenSelected = false; + this.AddOnHover(availableFilter, (UIElement) groupOptionButton2); + this._container.Append((UIElement) groupOptionButton2); + UIElement image = availableFilter.GetImage(); + if (image != null) + { + image.Left = new StyleDimension((float) num1, 0.0f); + image.Top = new StyleDimension((float) num2, 0.0f); + groupOptionButton2.Append(image); + } + this._filterButtons.Add(groupOptionButton2); + } + else + { + this._filterer.ActiveFilters.Remove(availableFilter); + GroupOptionButton groupOptionButton3 = new GroupOptionButton(-2, (LocalizedText) null, (LocalizedText) null, Color.White, (string) null); + groupOptionButton3.Width = new StyleDimension((float) widthPerButton, 0.0f); + groupOptionButton3.Height = new StyleDimension((float) heightPerButton, 0.0f); + groupOptionButton3.HAlign = 0.0f; + groupOptionButton3.VAlign = 0.0f; + groupOptionButton3.Top = new StyleDimension(offsetTop + (float) (num3 * heightWithSpacing), 0.0f); + groupOptionButton3.Left = new StyleDimension(offsetLeft + (float) (num4 * widthWithSpacing), 0.0f); + groupOptionButton3.FadeFromBlack = 0.5f; + GroupOptionButton groupOptionButton4 = groupOptionButton3; + groupOptionButton4.ShowHighlightWhenSelected = false; + groupOptionButton4.SetPadding(0.0f); + groupOptionButton4.SetSnapPoint("Filters", index); + Asset asset = Main.Assets.Request("Images/UI/Bestiary/Icon_Tags_Shadow", (AssetRequestMode) 1); + UIImageFramed uiImageFramed1 = new UIImageFramed(asset, asset.Frame(16, 5, frameY: 4)); + uiImageFramed1.HAlign = 0.5f; + uiImageFramed1.VAlign = 0.5f; + uiImageFramed1.Color = Color.White * 0.2f; + UIImageFramed uiImageFramed2 = uiImageFramed1; + uiImageFramed2.Left = new StyleDimension((float) num1, 0.0f); + uiImageFramed2.Top = new StyleDimension((float) num2, 0.0f); + groupOptionButton4.Append((UIElement) uiImageFramed2); + this._filterButtons.Add(groupOptionButton4); + this._container.Append((UIElement) groupOptionButton4); + } + } + this.UpdateButtonSelections(); + } + + public void GetEntriesToShow( + out int maxEntriesWidth, + out int maxEntriesHeight, + out int maxEntriesToHave) + { + int perRow; + int howManyRows; + this.GetDisplaySettings(out int _, out int _, out int _, out int _, out perRow, out float _, out float _, out howManyRows); + maxEntriesWidth = perRow; + maxEntriesHeight = howManyRows; + maxEntriesToHave = this._filterer.AvailableFilters.Count; + } + + private void GetDisplaySettings( + out int widthPerButton, + out int heightPerButton, + out int widthWithSpacing, + out int heightWithSpacing, + out int perRow, + out float offsetLeft, + out float offsetTop, + out int howManyRows) + { + widthPerButton = 32; + heightPerButton = 32; + int num = 2; + widthWithSpacing = widthPerButton + num; + heightWithSpacing = heightPerButton + num; + perRow = (int) Math.Ceiling(Math.Sqrt((double) this._filterer.AvailableFilters.Count)); + perRow = 12; + howManyRows = (int) Math.Ceiling((double) this._filterer.AvailableFilters.Count / (double) perRow); + offsetLeft = (float) (perRow * widthWithSpacing - num) * 0.5f; + offsetTop = (float) (howManyRows * heightWithSpacing - num) * 0.5f; + offsetLeft = 6f; + offsetTop = 6f; + } + + private void UpdateButtonSelections() + { + foreach (GroupOptionButton filterButton in this._filterButtons) + { + bool flag = this._filterer.IsFilterActive(filterButton.OptionValue); + filterButton.SetCurrentOption(flag ? filterButton.OptionValue : -1); + if (flag) + filterButton.SetColor(new Color(152, 175, 235), 1f); + else + filterButton.SetColor(Colors.InventoryDefaultColor, 0.7f); + } + } + + private bool GetIsFilterAvailableForEntries( + IBestiaryEntryFilter filter, + List entries) + { + bool? forcedDisplay = filter.ForcedDisplay; + if (forcedDisplay.HasValue) + return forcedDisplay.Value; + for (int index = 0; index < entries.Count; ++index) + { + if (filter.FitsFilter(entries[index]) && entries[index].UIInfoProvider.GetEntryUICollectionInfo().UnlockState > BestiaryEntryUnlockState.NotKnownAtAll_0) + return true; + } + return false; + } + + private void AddOnHover(IBestiaryEntryFilter filter, UIElement button) => button.OnUpdate += (UIElement.ElementEvent) (element => this.ShowButtonName(element, filter)); + + private void ShowButtonName(UIElement element, IBestiaryEntryFilter number) + { + if (!element.IsMouseHovering) + return; + string textValue = Language.GetTextValue(number.GetDisplayNameKey()); + Main.instance.MouseText(textValue); + } + + private void ClickOption(UIMouseEvent evt, UIElement listeningElement) + { + this._filterer.ToggleFilter(((GroupOptionButton) listeningElement).OptionValue); + this.UpdateButtonSelections(); + if (this.OnClickingOption == null) + return; + this.OnClickingOption(); + } + } +} diff --git a/GameContent/UI/Elements/UIBestiaryInfoItemLine.cs b/GameContent/UI/Elements/UIBestiaryInfoItemLine.cs new file mode 100644 index 0000000..8786c01 --- /dev/null +++ b/GameContent/UI/Elements/UIBestiaryInfoItemLine.cs @@ -0,0 +1,143 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIBestiaryInfoItemLine +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System.Collections.Generic; +using Terraria.Audio; +using Terraria.GameContent.Bestiary; +using Terraria.GameContent.ItemDropRules; +using Terraria.ID; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIBestiaryInfoItemLine : UIPanel, IManuallyOrderedUIElement + { + private Item _infoDisplayItem; + private bool _hideMouseOver; + + public int OrderInUIList { get; set; } + + public UIBestiaryInfoItemLine( + DropRateInfo info, + BestiaryUICollectionInfo uiinfo, + float textScale = 1f) + { + this._infoDisplayItem = new Item(); + this._infoDisplayItem.SetDefaults(info.itemId); + this.SetBestiaryNotesOnItemCache(info); + this.SetPadding(0.0f); + this.PaddingLeft = 10f; + this.PaddingRight = 10f; + this.Width.Set(-14f, 1f); + this.Height.Set(32f, 0.0f); + this.Left.Set(5f, 0.0f); + this.OnMouseOver += new UIElement.MouseEvent(this.MouseOver); + this.OnMouseOut += new UIElement.MouseEvent(this.MouseOut); + this.BorderColor = new Color(89, 116, 213, (int) byte.MaxValue); + string stackRange; + string droprate; + this.GetDropInfo(info, uiinfo, out stackRange, out droprate); + if (uiinfo.UnlockState < BestiaryEntryUnlockState.CanShowDropsWithoutDropRates_3) + { + this._hideMouseOver = true; + Asset texture = Main.Assets.Request("Images/UI/Bestiary/Icon_Locked", (AssetRequestMode) 1); + UIElement element = new UIElement() + { + Height = new StyleDimension(0.0f, 1f), + Width = new StyleDimension(0.0f, 1f), + HAlign = 0.5f, + VAlign = 0.5f + }; + element.SetPadding(0.0f); + UIImage uiImage1 = new UIImage(texture); + uiImage1.ImageScale = 0.55f; + uiImage1.HAlign = 0.5f; + uiImage1.VAlign = 0.5f; + UIImage uiImage2 = uiImage1; + element.Append((UIElement) uiImage2); + this.Append(element); + } + else + { + UIItemIcon uiItemIcon = new UIItemIcon(this._infoDisplayItem, uiinfo.UnlockState < BestiaryEntryUnlockState.CanShowDropsWithoutDropRates_3); + uiItemIcon.IgnoresMouseInteraction = true; + uiItemIcon.HAlign = 0.0f; + uiItemIcon.Left = new StyleDimension(4f, 0.0f); + this.Append((UIElement) uiItemIcon); + if (!string.IsNullOrEmpty(stackRange)) + droprate = stackRange + " " + droprate; + UITextPanel uiTextPanel = new UITextPanel(droprate, textScale); + uiTextPanel.IgnoresMouseInteraction = true; + uiTextPanel.DrawPanel = false; + uiTextPanel.HAlign = 1f; + uiTextPanel.Top = new StyleDimension(-4f, 0.0f); + this.Append((UIElement) uiTextPanel); + } + } + + protected void GetDropInfo( + DropRateInfo dropRateInfo, + BestiaryUICollectionInfo uiinfo, + out string stackRange, + out string droprate) + { + stackRange = dropRateInfo.stackMin == dropRateInfo.stackMax ? (dropRateInfo.stackMin != 1 ? " (" + (object) dropRateInfo.stackMin + ")" : "") : string.Format(" ({0}-{1})", (object) dropRateInfo.stackMin, (object) dropRateInfo.stackMax); + string originalFormat = "P"; + if ((double) dropRateInfo.dropRate < 0.001) + originalFormat = "P4"; + droprate = (double) dropRateInfo.dropRate == 1.0 ? "100%" : Utils.PrettifyPercentDisplay(dropRateInfo.dropRate, originalFormat); + if (uiinfo.UnlockState == BestiaryEntryUnlockState.CanShowDropsWithDropRates_4) + return; + droprate = "???"; + stackRange = ""; + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + base.DrawSelf(spriteBatch); + if (!this.IsMouseHovering || this._hideMouseOver) + return; + this.DrawMouseOver(); + } + + private void DrawMouseOver() + { + Main.HoverItem = this._infoDisplayItem; + Main.instance.MouseText(""); + Main.mouseText = true; + } + + public override int CompareTo(object obj) => obj is IManuallyOrderedUIElement orderedUiElement ? this.OrderInUIList.CompareTo(orderedUiElement.OrderInUIList) : base.CompareTo(obj); + + private void SetBestiaryNotesOnItemCache(DropRateInfo info) + { + List stringList = new List(); + if (info.conditions == null) + return; + foreach (IProvideItemConditionDescription condition in info.conditions) + { + if (condition != null) + { + string conditionDescription = condition.GetConditionDescription(); + if (!string.IsNullOrWhiteSpace(conditionDescription)) + stringList.Add(conditionDescription); + } + } + this._infoDisplayItem.BestiaryNotes = string.Join("\n", (IEnumerable) stringList); + } + + private void MouseOver(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + this.BorderColor = Colors.FancyUIFatButtonMouseOver; + } + + private void MouseOut(UIMouseEvent evt, UIElement listeningElement) => this.BorderColor = new Color(89, 116, 213, (int) byte.MaxValue); + } +} diff --git a/GameContent/UI/Elements/UIBestiaryInfoLine`1.cs b/GameContent/UI/Elements/UIBestiaryInfoLine`1.cs new file mode 100644 index 0000000..7c999b8 --- /dev/null +++ b/GameContent/UI/Elements/UIBestiaryInfoLine`1.cs @@ -0,0 +1,69 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIBestiaryInfoLine`1 +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIBestiaryInfoLine : UIElement, IManuallyOrderedUIElement + { + private T _text; + private float _textScale = 1f; + private Vector2 _textSize = Vector2.Zero; + private Color _color = Color.White; + + public int OrderInUIList { get; set; } + + public float TextScale + { + get => this._textScale; + set => this._textScale = value; + } + + public Vector2 TextSize => this._textSize; + + public string Text => (object) this._text != null ? this._text.ToString() : ""; + + public Color TextColor + { + get => this._color; + set => this._color = value; + } + + public UIBestiaryInfoLine(T text, float textScale = 1f) => this.SetText(text, textScale); + + public override void Recalculate() + { + this.SetText(this._text, this._textScale); + base.Recalculate(); + } + + public void SetText(T text) => this.SetText(text, this._textScale); + + public virtual void SetText(T text, float textScale) + { + Vector2 vector2 = new Vector2(FontAssets.MouseText.Value.MeasureString(text.ToString()).X, 16f) * textScale; + this._text = text; + this._textScale = textScale; + this._textSize = vector2; + this.MinWidth.Set(vector2.X + this.PaddingLeft + this.PaddingRight, 0.0f); + this.MinHeight.Set(vector2.Y + this.PaddingTop + this.PaddingBottom, 0.0f); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + CalculatedStyle innerDimensions = this.GetInnerDimensions(); + Vector2 pos = innerDimensions.Position(); + pos.Y -= 2f * this._textScale; + pos.X += (float) (((double) innerDimensions.Width - (double) this._textSize.X) * 0.5); + Utils.DrawBorderString(spriteBatch, this.Text, pos, this._color, this._textScale); + } + + public override int CompareTo(object obj) => obj is IManuallyOrderedUIElement orderedUiElement ? this.OrderInUIList.CompareTo(orderedUiElement.OrderInUIList) : base.CompareTo(obj); + } +} diff --git a/GameContent/UI/Elements/UIBestiaryNPCEntryPortrait.cs b/GameContent/UI/Elements/UIBestiaryNPCEntryPortrait.cs new file mode 100644 index 0000000..03136ef --- /dev/null +++ b/GameContent/UI/Elements/UIBestiaryNPCEntryPortrait.cs @@ -0,0 +1,76 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIBestiaryNPCEntryPortrait +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System.Collections.Generic; +using Terraria.GameContent.Bestiary; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIBestiaryNPCEntryPortrait : UIElement + { + public BestiaryEntry Entry { get; private set; } + + public UIBestiaryNPCEntryPortrait( + BestiaryEntry entry, + Asset portraitBackgroundAsset, + Color portraitColor, + List overlays) + { + this.Entry = entry; + this.Height.Set(112f, 0.0f); + this.Width.Set(193f, 0.0f); + this.SetPadding(0.0f); + UIElement element = new UIElement() + { + Width = new StyleDimension(-4f, 1f), + Height = new StyleDimension(-4f, 1f), + IgnoresMouseInteraction = true, + OverflowHidden = true, + HAlign = 0.5f, + VAlign = 0.5f + }; + element.SetPadding(0.0f); + if (portraitBackgroundAsset != null) + { + UIElement uiElement = element; + UIImage uiImage = new UIImage(portraitBackgroundAsset); + uiImage.HAlign = 0.5f; + uiImage.VAlign = 0.5f; + uiImage.ScaleToFit = true; + uiImage.Width = new StyleDimension(0.0f, 1f); + uiImage.Height = new StyleDimension(0.0f, 1f); + uiImage.Color = portraitColor; + uiElement.Append((UIElement) uiImage); + } + for (int index = 0; index < overlays.Count; ++index) + { + Asset backgroundOverlayImage = overlays[index].GetBackgroundOverlayImage(); + Color? backgroundOverlayColor = overlays[index].GetBackgroundOverlayColor(); + UIElement uiElement = element; + UIImage uiImage = new UIImage(backgroundOverlayImage); + uiImage.HAlign = 0.5f; + uiImage.VAlign = 0.5f; + uiImage.ScaleToFit = true; + uiImage.Width = new StyleDimension(0.0f, 1f); + uiImage.Height = new StyleDimension(0.0f, 1f); + uiImage.Color = backgroundOverlayColor.HasValue ? backgroundOverlayColor.Value : Color.Lerp(Color.White, portraitColor, 0.5f); + uiElement.Append((UIElement) uiImage); + } + UIBestiaryEntryIcon bestiaryEntryIcon = new UIBestiaryEntryIcon(entry, true); + element.Append((UIElement) bestiaryEntryIcon); + this.Append(element); + UIImage uiImage1 = new UIImage(Main.Assets.Request("Images/UI/Bestiary/Portrait_Front", (AssetRequestMode) 1)); + uiImage1.VAlign = 0.5f; + uiImage1.HAlign = 0.5f; + uiImage1.IgnoresMouseInteraction = true; + this.Append((UIElement) uiImage1); + } + } +} diff --git a/GameContent/UI/Elements/UIBestiarySortingOptionsGrid.cs b/GameContent/UI/Elements/UIBestiarySortingOptionsGrid.cs new file mode 100644 index 0000000..096af7e --- /dev/null +++ b/GameContent/UI/Elements/UIBestiarySortingOptionsGrid.cs @@ -0,0 +1,118 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIBestiarySortingOptionsGrid +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.DataStructures; +using Terraria.GameContent.Bestiary; +using Terraria.ID; +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIBestiarySortingOptionsGrid : UIPanel + { + private EntrySorter _sorter; + private List> _buttonsBySorting; + private int _currentSelected = -1; + private int _defaultStepIndex; + + public event Action OnClickingOption; + + public UIBestiarySortingOptionsGrid( + EntrySorter sorter) + { + this._sorter = sorter; + this._buttonsBySorting = new List>(); + this.Width = new StyleDimension(0.0f, 1f); + this.Height = new StyleDimension(0.0f, 1f); + this.BackgroundColor = new Color(35, 40, 83) * 0.5f; + this.BorderColor = new Color(35, 40, 83) * 0.5f; + this.IgnoresMouseInteraction = false; + this.SetPadding(0.0f); + this.BuildGrid(); + } + + private void BuildGrid() + { + int num1 = 2; + int num2 = 26 + num1; + int num3 = 0; + for (int index = 0; index < this._sorter.Steps.Count; ++index) + { + if (!this._sorter.Steps[index].HiddenFromSortOptions) + ++num3; + } + UIPanel uiPanel1 = new UIPanel(); + uiPanel1.Width = new StyleDimension(126f, 0.0f); + uiPanel1.Height = new StyleDimension((float) (num3 * num2 + 5 + 3), 0.0f); + uiPanel1.HAlign = 1f; + uiPanel1.VAlign = 0.0f; + uiPanel1.Left = new StyleDimension(-118f, 0.0f); + uiPanel1.Top = new StyleDimension(0.0f, 0.0f); + UIPanel uiPanel2 = uiPanel1; + uiPanel2.BorderColor = new Color(89, 116, 213, (int) byte.MaxValue) * 0.9f; + uiPanel2.BackgroundColor = new Color(73, 94, 171) * 0.9f; + uiPanel2.SetPadding(0.0f); + this.Append((UIElement) uiPanel2); + int id = 0; + for (int index = 0; index < this._sorter.Steps.Count; ++index) + { + IBestiarySortStep step = this._sorter.Steps[index]; + if (!step.HiddenFromSortOptions) + { + GroupOptionButton groupOptionButton1 = new GroupOptionButton(index, Language.GetText(step.GetDisplayNameKey()), (LocalizedText) null, Color.White, (string) null, 0.8f); + groupOptionButton1.Width = new StyleDimension(114f, 0.0f); + groupOptionButton1.Height = new StyleDimension((float) (num2 - num1), 0.0f); + groupOptionButton1.HAlign = 0.5f; + groupOptionButton1.Top = new StyleDimension((float) (5 + num2 * id), 0.0f); + GroupOptionButton groupOptionButton2 = groupOptionButton1; + groupOptionButton2.ShowHighlightWhenSelected = false; + groupOptionButton2.OnClick += new UIElement.MouseEvent(this.ClickOption); + groupOptionButton2.SetSnapPoint("SortSteps", id); + uiPanel2.Append((UIElement) groupOptionButton2); + this._buttonsBySorting.Add(groupOptionButton2); + ++id; + } + } + foreach (GroupOptionButton groupOptionButton in this._buttonsBySorting) + groupOptionButton.SetCurrentOption(-1); + } + + private void ClickOption(UIMouseEvent evt, UIElement listeningElement) + { + int index = ((GroupOptionButton) listeningElement).OptionValue; + if (index == this._currentSelected) + index = this._defaultStepIndex; + foreach (GroupOptionButton groupOptionButton in this._buttonsBySorting) + { + bool flag = index == groupOptionButton.OptionValue; + groupOptionButton.SetCurrentOption(flag ? index : -1); + if (flag) + groupOptionButton.SetColor(new Color(152, 175, 235), 1f); + else + groupOptionButton.SetColor(Colors.InventoryDefaultColor, 0.7f); + } + this._currentSelected = index; + this._sorter.SetPrioritizedStepIndex(index); + if (this.OnClickingOption == null) + return; + this.OnClickingOption(); + } + + public void GetEntriesToShow( + out int maxEntriesWidth, + out int maxEntriesHeight, + out int maxEntriesToHave) + { + maxEntriesWidth = 1; + maxEntriesHeight = this._buttonsBySorting.Count; + maxEntriesToHave = this._buttonsBySorting.Count; + } + } +} diff --git a/GameContent/UI/Elements/UICharacter.cs b/GameContent/UI/Elements/UICharacter.cs new file mode 100644 index 0000000..fac9e25 --- /dev/null +++ b/GameContent/UI/Elements/UICharacter.cs @@ -0,0 +1,79 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UICharacter +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UICharacter : UIElement + { + private Player _player; + private Asset _texture; + private static Item _blankItem = new Item(); + private bool _animated; + private bool _drawsBackPanel; + private float _characterScale = 1f; + private int _animationCounter; + + public UICharacter(Player player, bool animated = false, bool hasBackPanel = true, float characterScale = 1f) + { + this._player = player; + this.Width.Set(59f, 0.0f); + this.Height.Set(58f, 0.0f); + this._texture = Main.Assets.Request("Images/UI/PlayerBackground", (AssetRequestMode) 1); + this.UseImmediateMode = true; + this._animated = animated; + this._drawsBackPanel = hasBackPanel; + this._characterScale = characterScale; + this.OverrideSamplerState = SamplerState.PointClamp; + } + + public override void Update(GameTime gameTime) + { + this._player.ResetEffects(); + this._player.ResetVisibleAccessories(); + this._player.UpdateMiscCounter(); + this._player.UpdateDyes(); + this._player.PlayerFrame(); + if (this._animated) + ++this._animationCounter; + base.Update(gameTime); + } + + private void UpdateAnim() + { + if (!this._animated) + { + this._player.bodyFrame.Y = this._player.legFrame.Y = this._player.headFrame.Y = 0; + } + else + { + this._player.bodyFrame.Y = this._player.legFrame.Y = this._player.headFrame.Y = ((int) ((double) Main.GlobalTimeWrappedHourly / 0.0700000002980232) % 14 + 6) * 56; + this._player.WingFrame(false); + } + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + CalculatedStyle dimensions = this.GetDimensions(); + if (this._drawsBackPanel) + spriteBatch.Draw(this._texture.Value, dimensions.Position(), Color.White); + this.UpdateAnim(); + Vector2 vector2 = dimensions.Position() + new Vector2(dimensions.Width * 0.5f - (float) (this._player.width >> 1), dimensions.Height * 0.5f - (float) (this._player.height >> 1)); + Item obj = this._player.inventory[this._player.selectedItem]; + this._player.inventory[this._player.selectedItem] = UICharacter._blankItem; + Main.PlayerRenderer.DrawPlayer(Main.Camera, this._player, vector2 + Main.screenPosition, 0.0f, Vector2.Zero, scale: this._characterScale); + this._player.inventory[this._player.selectedItem] = obj; + } + + public void SetAnimated(bool animated) => this._animated = animated; + + public bool IsAnimated => this._animated; + } +} diff --git a/GameContent/UI/Elements/UICharacterListItem.cs b/GameContent/UI/Elements/UICharacterListItem.cs new file mode 100644 index 0000000..4c4f99e --- /dev/null +++ b/GameContent/UI/Elements/UICharacterListItem.cs @@ -0,0 +1,284 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UICharacterListItem +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.Audio; +using Terraria.IO; +using Terraria.Localization; +using Terraria.Social; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UICharacterListItem : UIPanel + { + private PlayerFileData _data; + private Asset _dividerTexture; + private Asset _innerPanelTexture; + private UICharacter _playerPanel; + private UIText _buttonLabel; + private UIText _deleteButtonLabel; + private Asset _buttonCloudActiveTexture; + private Asset _buttonCloudInactiveTexture; + private Asset _buttonFavoriteActiveTexture; + private Asset _buttonFavoriteInactiveTexture; + private Asset _buttonPlayTexture; + private Asset _buttonDeleteTexture; + private UIImageButton _deleteButton; + + public bool IsFavorite => this._data.IsFavorite; + + public UICharacterListItem(PlayerFileData data, int snapPointIndex) + { + this.BorderColor = new Color(89, 116, 213) * 0.7f; + this._dividerTexture = Main.Assets.Request("Images/UI/Divider", (AssetRequestMode) 1); + this._innerPanelTexture = Main.Assets.Request("Images/UI/InnerPanelBackground", (AssetRequestMode) 1); + this._buttonCloudActiveTexture = Main.Assets.Request("Images/UI/ButtonCloudActive", (AssetRequestMode) 1); + this._buttonCloudInactiveTexture = Main.Assets.Request("Images/UI/ButtonCloudInactive", (AssetRequestMode) 1); + this._buttonFavoriteActiveTexture = Main.Assets.Request("Images/UI/ButtonFavoriteActive", (AssetRequestMode) 1); + this._buttonFavoriteInactiveTexture = Main.Assets.Request("Images/UI/ButtonFavoriteInactive", (AssetRequestMode) 1); + this._buttonPlayTexture = Main.Assets.Request("Images/UI/ButtonPlay", (AssetRequestMode) 1); + this._buttonDeleteTexture = Main.Assets.Request("Images/UI/ButtonDelete", (AssetRequestMode) 1); + this.Height.Set(96f, 0.0f); + this.Width.Set(0.0f, 1f); + this.SetPadding(6f); + this._data = data; + this._playerPanel = new UICharacter(data.Player); + this._playerPanel.Left.Set(4f, 0.0f); + this._playerPanel.OnDoubleClick += new UIElement.MouseEvent(this.PlayGame); + this.OnDoubleClick += new UIElement.MouseEvent(this.PlayGame); + this.Append((UIElement) this._playerPanel); + UIImageButton uiImageButton1 = new UIImageButton(this._buttonPlayTexture); + uiImageButton1.VAlign = 1f; + uiImageButton1.Left.Set(4f, 0.0f); + uiImageButton1.OnClick += new UIElement.MouseEvent(this.PlayGame); + uiImageButton1.OnMouseOver += new UIElement.MouseEvent(this.PlayMouseOver); + uiImageButton1.OnMouseOut += new UIElement.MouseEvent(this.ButtonMouseOut); + this.Append((UIElement) uiImageButton1); + UIImageButton uiImageButton2 = new UIImageButton(this._data.IsFavorite ? this._buttonFavoriteActiveTexture : this._buttonFavoriteInactiveTexture); + uiImageButton2.VAlign = 1f; + uiImageButton2.Left.Set(28f, 0.0f); + uiImageButton2.OnClick += new UIElement.MouseEvent(this.FavoriteButtonClick); + uiImageButton2.OnMouseOver += new UIElement.MouseEvent(this.FavoriteMouseOver); + uiImageButton2.OnMouseOut += new UIElement.MouseEvent(this.ButtonMouseOut); + uiImageButton2.SetVisibility(1f, this._data.IsFavorite ? 0.8f : 0.4f); + this.Append((UIElement) uiImageButton2); + if (SocialAPI.Cloud != null) + { + UIImageButton uiImageButton3 = new UIImageButton(this._data.IsCloudSave ? this._buttonCloudActiveTexture : this._buttonCloudInactiveTexture); + uiImageButton3.VAlign = 1f; + uiImageButton3.Left.Set(52f, 0.0f); + uiImageButton3.OnClick += new UIElement.MouseEvent(this.CloudButtonClick); + uiImageButton3.OnMouseOver += new UIElement.MouseEvent(this.CloudMouseOver); + uiImageButton3.OnMouseOut += new UIElement.MouseEvent(this.ButtonMouseOut); + this.Append((UIElement) uiImageButton3); + uiImageButton3.SetSnapPoint("Cloud", snapPointIndex); + } + UIImageButton uiImageButton4 = new UIImageButton(this._buttonDeleteTexture); + uiImageButton4.VAlign = 1f; + uiImageButton4.HAlign = 1f; + if (!this._data.IsFavorite) + uiImageButton4.OnClick += new UIElement.MouseEvent(this.DeleteButtonClick); + uiImageButton4.OnMouseOver += new UIElement.MouseEvent(this.DeleteMouseOver); + uiImageButton4.OnMouseOut += new UIElement.MouseEvent(this.DeleteMouseOut); + this._deleteButton = uiImageButton4; + this.Append((UIElement) uiImageButton4); + this._buttonLabel = new UIText(""); + this._buttonLabel.VAlign = 1f; + this._buttonLabel.Left.Set(80f, 0.0f); + this._buttonLabel.Top.Set(-3f, 0.0f); + this.Append((UIElement) this._buttonLabel); + this._deleteButtonLabel = new UIText(""); + this._deleteButtonLabel.VAlign = 1f; + this._deleteButtonLabel.HAlign = 1f; + this._deleteButtonLabel.Left.Set(-30f, 0.0f); + this._deleteButtonLabel.Top.Set(-3f, 0.0f); + this.Append((UIElement) this._deleteButtonLabel); + uiImageButton1.SetSnapPoint("Play", snapPointIndex); + uiImageButton2.SetSnapPoint("Favorite", snapPointIndex); + uiImageButton4.SetSnapPoint("Delete", snapPointIndex); + } + + private void FavoriteMouseOver(UIMouseEvent evt, UIElement listeningElement) + { + if (this._data.IsFavorite) + this._buttonLabel.SetText(Language.GetTextValue("UI.Unfavorite")); + else + this._buttonLabel.SetText(Language.GetTextValue("UI.Favorite")); + } + + private void CloudMouseOver(UIMouseEvent evt, UIElement listeningElement) + { + if (this._data.IsCloudSave) + this._buttonLabel.SetText(Language.GetTextValue("UI.MoveOffCloud")); + else + this._buttonLabel.SetText(Language.GetTextValue("UI.MoveToCloud")); + } + + private void PlayMouseOver(UIMouseEvent evt, UIElement listeningElement) => this._buttonLabel.SetText(Language.GetTextValue("UI.Play")); + + private void DeleteMouseOver(UIMouseEvent evt, UIElement listeningElement) + { + if (this._data.IsFavorite) + this._deleteButtonLabel.SetText(Language.GetTextValue("UI.CannotDeleteFavorited")); + else + this._deleteButtonLabel.SetText(Language.GetTextValue("UI.Delete")); + } + + private void DeleteMouseOut(UIMouseEvent evt, UIElement listeningElement) => this._deleteButtonLabel.SetText(""); + + private void ButtonMouseOut(UIMouseEvent evt, UIElement listeningElement) => this._buttonLabel.SetText(""); + + private void CloudButtonClick(UIMouseEvent evt, UIElement listeningElement) + { + if (this._data.IsCloudSave) + this._data.MoveToLocal(); + else + this._data.MoveToCloud(); + ((UIImageButton) evt.Target).SetImage(this._data.IsCloudSave ? this._buttonCloudActiveTexture : this._buttonCloudInactiveTexture); + if (this._data.IsCloudSave) + this._buttonLabel.SetText(Language.GetTextValue("UI.MoveOffCloud")); + else + this._buttonLabel.SetText(Language.GetTextValue("UI.MoveToCloud")); + } + + private void DeleteButtonClick(UIMouseEvent evt, UIElement listeningElement) + { + for (int index = 0; index < Main.PlayerList.Count; ++index) + { + if (Main.PlayerList[index] == this._data) + { + SoundEngine.PlaySound(10); + Main.selectedPlayer = index; + Main.menuMode = 5; + break; + } + } + } + + private void PlayGame(UIMouseEvent evt, UIElement listeningElement) + { + if (listeningElement != evt.Target || this._data.Player.loadStatus != 0) + return; + Main.SelectPlayer(this._data); + } + + private void FavoriteButtonClick(UIMouseEvent evt, UIElement listeningElement) + { + this._data.ToggleFavorite(); + ((UIImageButton) evt.Target).SetImage(this._data.IsFavorite ? this._buttonFavoriteActiveTexture : this._buttonFavoriteInactiveTexture); + ((UIImageButton) evt.Target).SetVisibility(1f, this._data.IsFavorite ? 0.8f : 0.4f); + if (this._data.IsFavorite) + { + this._buttonLabel.SetText(Language.GetTextValue("UI.Unfavorite")); + this._deleteButton.OnClick -= new UIElement.MouseEvent(this.DeleteButtonClick); + } + else + { + this._buttonLabel.SetText(Language.GetTextValue("UI.Favorite")); + this._deleteButton.OnClick += new UIElement.MouseEvent(this.DeleteButtonClick); + } + if (!(this.Parent.Parent is UIList parent)) + return; + parent.UpdateOrder(); + } + + public override int CompareTo(object obj) + { + if (!(obj is UICharacterListItem characterListItem)) + return base.CompareTo(obj); + if (this.IsFavorite && !characterListItem.IsFavorite) + return -1; + if (!this.IsFavorite && characterListItem.IsFavorite) + return 1; + return this._data.Name.CompareTo(characterListItem._data.Name) != 0 ? this._data.Name.CompareTo(characterListItem._data.Name) : this._data.GetFileName().CompareTo(characterListItem._data.GetFileName()); + } + + public override void MouseOver(UIMouseEvent evt) + { + base.MouseOver(evt); + this.BackgroundColor = new Color(73, 94, 171); + this.BorderColor = new Color(89, 116, 213); + this._playerPanel.SetAnimated(true); + } + + public override void MouseOut(UIMouseEvent evt) + { + base.MouseOut(evt); + this.BackgroundColor = new Color(63, 82, 151) * 0.7f; + this.BorderColor = new Color(89, 116, 213) * 0.7f; + this._playerPanel.SetAnimated(false); + } + + private void DrawPanel(SpriteBatch spriteBatch, Vector2 position, float width) + { + spriteBatch.Draw(this._innerPanelTexture.Value, position, new Rectangle?(new Rectangle(0, 0, 8, this._innerPanelTexture.Height())), Color.White); + spriteBatch.Draw(this._innerPanelTexture.Value, new Vector2(position.X + 8f, position.Y), new Rectangle?(new Rectangle(8, 0, 8, this._innerPanelTexture.Height())), Color.White, 0.0f, Vector2.Zero, new Vector2((float) (((double) width - 16.0) / 8.0), 1f), SpriteEffects.None, 0.0f); + spriteBatch.Draw(this._innerPanelTexture.Value, new Vector2((float) ((double) position.X + (double) width - 8.0), position.Y), new Rectangle?(new Rectangle(16, 0, 8, this._innerPanelTexture.Height())), Color.White); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + base.DrawSelf(spriteBatch); + CalculatedStyle innerDimensions = this.GetInnerDimensions(); + CalculatedStyle dimensions = this._playerPanel.GetDimensions(); + float x = dimensions.X + dimensions.Width; + Utils.DrawBorderString(spriteBatch, this._data.Name, new Vector2(x + 6f, dimensions.Y - 2f), Color.White); + spriteBatch.Draw(this._dividerTexture.Value, new Vector2(x, innerDimensions.Y + 21f), new Rectangle?(), Color.White, 0.0f, Vector2.Zero, new Vector2((float) (((double) this.GetDimensions().X + (double) this.GetDimensions().Width - (double) x) / 8.0), 1f), SpriteEffects.None, 0.0f); + Vector2 vector2 = new Vector2(x + 6f, innerDimensions.Y + 29f); + float width1 = 200f; + Vector2 position1 = vector2; + this.DrawPanel(spriteBatch, position1, width1); + spriteBatch.Draw(TextureAssets.Heart.Value, position1 + new Vector2(5f, 2f), Color.White); + position1.X += 10f + (float) TextureAssets.Heart.Width(); + Utils.DrawBorderString(spriteBatch, this._data.Player.statLifeMax.ToString() + Language.GetTextValue("GameUI.PlayerLifeMax"), position1 + new Vector2(0.0f, 3f), Color.White); + position1.X += 65f; + spriteBatch.Draw(TextureAssets.Mana.Value, position1 + new Vector2(5f, 2f), Color.White); + position1.X += 10f + (float) TextureAssets.Mana.Width(); + Utils.DrawBorderString(spriteBatch, this._data.Player.statManaMax.ToString() + Language.GetTextValue("GameUI.PlayerManaMax"), position1 + new Vector2(0.0f, 3f), Color.White); + vector2.X += width1 + 5f; + Vector2 position2 = vector2; + float width2 = 140f; + if (GameCulture.FromCultureName(GameCulture.CultureName.Russian).IsActive) + width2 = 180f; + this.DrawPanel(spriteBatch, position2, width2); + string text1 = ""; + Color color = Color.White; + switch (this._data.Player.difficulty) + { + case 0: + text1 = Language.GetTextValue("UI.Softcore"); + break; + case 1: + text1 = Language.GetTextValue("UI.Mediumcore"); + color = Main.mcColor; + break; + case 2: + text1 = Language.GetTextValue("UI.Hardcore"); + color = Main.hcColor; + break; + case 3: + text1 = Language.GetTextValue("UI.Creative"); + color = Main.creativeModeColor; + break; + } + Vector2 pos1 = position2 + new Vector2((float) ((double) width2 * 0.5 - (double) FontAssets.MouseText.Value.MeasureString(text1).X * 0.5), 3f); + Utils.DrawBorderString(spriteBatch, text1, pos1, color); + vector2.X += width2 + 5f; + Vector2 position3 = vector2; + float width3 = innerDimensions.X + innerDimensions.Width - position3.X; + this.DrawPanel(spriteBatch, position3, width3); + TimeSpan playTime = this._data.GetPlayTime(); + int num = playTime.Days * 24 + playTime.Hours; + string text2 = (num < 10 ? (object) "0" : (object) "").ToString() + (object) num + playTime.ToString("\\:mm\\:ss"); + Vector2 pos2 = position3 + new Vector2((float) ((double) width3 * 0.5 - (double) FontAssets.MouseText.Value.MeasureString(text2).X * 0.5), 3f); + Utils.DrawBorderString(spriteBatch, text2, pos2, Color.White); + } + } +} diff --git a/GameContent/UI/Elements/UICharacterNameButton.cs b/GameContent/UI/Elements/UICharacterNameButton.cs new file mode 100644 index 0000000..1f9e3a1 --- /dev/null +++ b/GameContent/UI/Elements/UICharacterNameButton.cs @@ -0,0 +1,132 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UICharacterNameButton +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.Audio; +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UICharacterNameButton : UIElement + { + private readonly Asset _BasePanelTexture; + private readonly Asset _selectedBorderTexture; + private readonly Asset _hoveredBorderTexture; + private bool _hovered; + private bool _soundedHover; + private readonly LocalizedText _textToShowWhenEmpty; + private string actualContents; + private UIText _text; + private UIText _title; + public readonly LocalizedText Description; + public float DistanceFromTitleToOption = 20f; + + public UICharacterNameButton( + LocalizedText titleText, + LocalizedText emptyContentText, + LocalizedText description = null) + { + this.Width = StyleDimension.FromPixels(400f); + this.Height = StyleDimension.FromPixels(40f); + this.Description = description; + this._BasePanelTexture = Main.Assets.Request("Images/UI/CharCreation/CategoryPanel", (AssetRequestMode) 1); + this._selectedBorderTexture = Main.Assets.Request("Images/UI/CharCreation/CategoryPanelHighlight", (AssetRequestMode) 1); + this._hoveredBorderTexture = Main.Assets.Request("Images/UI/CharCreation/CategoryPanelBorder", (AssetRequestMode) 1); + this._textToShowWhenEmpty = emptyContentText; + float textScale = 1f; + UIText uiText1 = new UIText(titleText, textScale); + uiText1.HAlign = 0.0f; + uiText1.VAlign = 0.5f; + uiText1.Left = StyleDimension.FromPixels(10f); + UIText uiText2 = uiText1; + this.Append((UIElement) uiText2); + this._title = uiText2; + UIText uiText3 = new UIText(Language.GetText("UI.PlayerNameSlot"), textScale); + uiText3.HAlign = 0.0f; + uiText3.VAlign = 0.5f; + uiText3.Left = StyleDimension.FromPixels(150f); + UIText uiText4 = uiText3; + this.Append((UIElement) uiText4); + this._text = uiText4; + this.SetContents((string) null); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + if (this._hovered) + { + if (!this._soundedHover) + SoundEngine.PlaySound(12); + this._soundedHover = true; + } + else + this._soundedHover = false; + CalculatedStyle dimensions = this.GetDimensions(); + Utils.DrawSplicedPanel(spriteBatch, this._BasePanelTexture.Value, (int) dimensions.X, (int) dimensions.Y, (int) dimensions.Width, (int) dimensions.Height, 10, 10, 10, 10, Color.White * 0.5f); + if (!this._hovered) + return; + Utils.DrawSplicedPanel(spriteBatch, this._hoveredBorderTexture.Value, (int) dimensions.X, (int) dimensions.Y, (int) dimensions.Width, (int) dimensions.Height, 10, 10, 10, 10, Color.White); + } + + public void SetContents(string name) + { + this.actualContents = name; + if (string.IsNullOrEmpty(this.actualContents)) + { + this._text.TextColor = Color.Gray; + this._text.SetText(this._textToShowWhenEmpty); + } + else + { + this._text.TextColor = Color.White; + this._text.SetText(this.actualContents); + } + this._text.Left = StyleDimension.FromPixels(this._title.GetInnerDimensions().Width + this.DistanceFromTitleToOption); + } + + public void TrimDisplayIfOverElementDimensions(int padding) + { + CalculatedStyle dimensions1 = this.GetDimensions(); + Point point1 = new Point((int) dimensions1.X, (int) dimensions1.Y); + Point point2 = new Point(point1.X + (int) dimensions1.Width, point1.Y + (int) dimensions1.Height); + Rectangle rectangle1 = new Rectangle(point1.X, point1.Y, point2.X - point1.X, point2.Y - point1.Y); + CalculatedStyle dimensions2 = this._text.GetDimensions(); + Point point3 = new Point((int) dimensions2.X, (int) dimensions2.Y); + Point point4 = new Point(point3.X + (int) dimensions2.Width, point3.Y + (int) dimensions2.Height); + Rectangle rectangle2 = new Rectangle(point3.X, point3.Y, point4.X - point3.X, point4.Y - point3.Y); + int num = 0; + for (; rectangle2.Right > rectangle1.Right - padding; rectangle2 = new Rectangle(point3.X, point3.Y, point4.X - point3.X, point4.Y - point3.Y)) + { + this._text.SetText(this._text.Text.Substring(0, this._text.Text.Length - 1)); + ++num; + this.RecalculateChildren(); + CalculatedStyle dimensions3 = this._text.GetDimensions(); + point3 = new Point((int) dimensions3.X, (int) dimensions3.Y); + point4 = new Point(point3.X + (int) dimensions3.Width, point3.Y + (int) dimensions3.Height); + } + if (num <= 0) + return; + this._text.SetText(this._text.Text.Substring(0, this._text.Text.Length - 1) + "…"); + } + + public override void MouseDown(UIMouseEvent evt) => base.MouseDown(evt); + + public override void MouseOver(UIMouseEvent evt) + { + base.MouseOver(evt); + this._hovered = true; + } + + public override void MouseOut(UIMouseEvent evt) + { + base.MouseOut(evt); + this._hovered = false; + } + } +} diff --git a/GameContent/UI/Elements/UIClothStyleButton.cs b/GameContent/UI/Elements/UIClothStyleButton.cs new file mode 100644 index 0000000..43ed383 --- /dev/null +++ b/GameContent/UI/Elements/UIClothStyleButton.cs @@ -0,0 +1,91 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIClothStyleButton +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.Audio; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIClothStyleButton : UIElement + { + private readonly Player _player; + public readonly int ClothStyleId; + private readonly Asset _BasePanelTexture; + private readonly Asset _selectedBorderTexture; + private readonly Asset _hoveredBorderTexture; + private readonly UICharacter _char; + private bool _hovered; + private bool _soundedHover; + private int _realSkinVariant; + + public UIClothStyleButton(Player player, int clothStyleId) + { + this._player = player; + this.ClothStyleId = clothStyleId; + this.Width = StyleDimension.FromPixels(44f); + this.Height = StyleDimension.FromPixels(80f); + this._BasePanelTexture = Main.Assets.Request("Images/UI/CharCreation/CategoryPanel", (AssetRequestMode) 1); + this._selectedBorderTexture = Main.Assets.Request("Images/UI/CharCreation/CategoryPanelHighlight", (AssetRequestMode) 1); + this._hoveredBorderTexture = Main.Assets.Request("Images/UI/CharCreation/CategoryPanelBorder", (AssetRequestMode) 1); + UICharacter uiCharacter = new UICharacter(this._player, hasBackPanel: false); + uiCharacter.HAlign = 0.5f; + uiCharacter.VAlign = 0.5f; + this._char = uiCharacter; + this.Append((UIElement) this._char); + } + + public override void Draw(SpriteBatch spriteBatch) + { + this._realSkinVariant = this._player.skinVariant; + this._player.skinVariant = this.ClothStyleId; + base.Draw(spriteBatch); + this._player.skinVariant = this._realSkinVariant; + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + if (this._hovered) + { + if (!this._soundedHover) + SoundEngine.PlaySound(12); + this._soundedHover = true; + } + else + this._soundedHover = false; + CalculatedStyle dimensions = this.GetDimensions(); + Utils.DrawSplicedPanel(spriteBatch, this._BasePanelTexture.Value, (int) dimensions.X, (int) dimensions.Y, (int) dimensions.Width, (int) dimensions.Height, 10, 10, 10, 10, Color.White * 0.5f); + if (this._realSkinVariant == this.ClothStyleId) + Utils.DrawSplicedPanel(spriteBatch, this._selectedBorderTexture.Value, (int) dimensions.X + 3, (int) dimensions.Y + 3, (int) dimensions.Width - 6, (int) dimensions.Height - 6, 10, 10, 10, 10, Color.White); + if (!this._hovered) + return; + Utils.DrawSplicedPanel(spriteBatch, this._hoveredBorderTexture.Value, (int) dimensions.X, (int) dimensions.Y, (int) dimensions.Width, (int) dimensions.Height, 10, 10, 10, 10, Color.White); + } + + public override void MouseDown(UIMouseEvent evt) + { + this._player.skinVariant = this.ClothStyleId; + SoundEngine.PlaySound(12); + base.MouseDown(evt); + } + + public override void MouseOver(UIMouseEvent evt) + { + base.MouseOver(evt); + this._hovered = true; + this._char.SetAnimated(true); + } + + public override void MouseOut(UIMouseEvent evt) + { + base.MouseOut(evt); + this._hovered = false; + this._char.SetAnimated(false); + } + } +} diff --git a/GameContent/UI/Elements/UIColoredImageButton.cs b/GameContent/UI/Elements/UIColoredImageButton.cs new file mode 100644 index 0000000..c9f09f7 --- /dev/null +++ b/GameContent/UI/Elements/UIColoredImageButton.cs @@ -0,0 +1,89 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIColoredImageButton +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.Audio; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIColoredImageButton : UIElement + { + private Asset _backPanelTexture; + private Asset _texture; + private Asset _middleTexture; + private Asset _backPanelHighlightTexture; + private Asset _backPanelBorderTexture; + private Color _color; + private float _visibilityActive = 1f; + private float _visibilityInactive = 0.4f; + private bool _selected; + private bool _hovered; + + public UIColoredImageButton(Asset texture, bool isSmall = false) + { + this._color = Color.White; + this._texture = texture; + this._backPanelTexture = !isSmall ? Main.Assets.Request("Images/UI/CharCreation/CategoryPanel", (AssetRequestMode) 1) : Main.Assets.Request("Images/UI/CharCreation/SmallPanel", (AssetRequestMode) 1); + this.Width.Set((float) this._backPanelTexture.Width(), 0.0f); + this.Height.Set((float) this._backPanelTexture.Height(), 0.0f); + this._backPanelHighlightTexture = Main.Assets.Request("Images/UI/CharCreation/CategoryPanelHighlight", (AssetRequestMode) 1); + if (isSmall) + this._backPanelBorderTexture = Main.Assets.Request("Images/UI/CharCreation/SmallPanelBorder", (AssetRequestMode) 1); + else + this._backPanelBorderTexture = Main.Assets.Request("Images/UI/CharCreation/CategoryPanelBorder", (AssetRequestMode) 1); + } + + public void SetImage(Asset texture) + { + this._texture = texture; + this.Width.Set((float) this._texture.Width(), 0.0f); + this.Height.Set((float) this._texture.Height(), 0.0f); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + CalculatedStyle dimensions = this.GetDimensions(); + Vector2 position = dimensions.Position() + new Vector2(dimensions.Width, dimensions.Height) / 2f; + spriteBatch.Draw(this._backPanelTexture.Value, position, new Rectangle?(), Color.White * (this.IsMouseHovering ? this._visibilityActive : this._visibilityInactive), 0.0f, this._backPanelTexture.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + Color white = Color.White; + if (this._hovered) + spriteBatch.Draw(this._backPanelBorderTexture.Value, position, new Rectangle?(), Color.White, 0.0f, this._backPanelBorderTexture.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + if (this._selected) + spriteBatch.Draw(this._backPanelHighlightTexture.Value, position, new Rectangle?(), Color.White, 0.0f, this._backPanelHighlightTexture.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + if (this._middleTexture != null) + spriteBatch.Draw(this._middleTexture.Value, position, new Rectangle?(), Color.White, 0.0f, this._middleTexture.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + spriteBatch.Draw(this._texture.Value, position, new Rectangle?(), this._color, 0.0f, this._texture.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + } + + public override void MouseOver(UIMouseEvent evt) + { + base.MouseOver(evt); + SoundEngine.PlaySound(12); + this._hovered = true; + } + + public void SetVisibility(float whenActive, float whenInactive) + { + this._visibilityActive = MathHelper.Clamp(whenActive, 0.0f, 1f); + this._visibilityInactive = MathHelper.Clamp(whenInactive, 0.0f, 1f); + } + + public void SetColor(Color color) => this._color = color; + + public void SetMiddleTexture(Asset texAsset) => this._middleTexture = texAsset; + + public void SetSelected(bool selected) => this._selected = selected; + + public override void MouseOut(UIMouseEvent evt) + { + base.MouseOut(evt); + this._hovered = false; + } + } +} diff --git a/GameContent/UI/Elements/UIColoredSlider.cs b/GameContent/UI/Elements/UIColoredSlider.cs new file mode 100644 index 0000000..51b0e52 --- /dev/null +++ b/GameContent/UI/Elements/UIColoredSlider.cs @@ -0,0 +1,150 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIColoredSlider +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria.Audio; +using Terraria.GameInput; +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIColoredSlider : UISliderBase + { + private Color _color; + private LocalizedText _textKey; + private Func _getStatusTextAct; + private Action _slideKeyboardAction; + private Func _blipFunc; + private Action _slideGamepadAction; + private const bool BOTHER_WITH_TEXT = false; + private bool _isReallyMouseOvered; + private bool _alreadyHovered; + private bool _soundedUsage; + + public UIColoredSlider( + LocalizedText textKey, + Func getStatus, + Action setStatusKeyboard, + Action setStatusGamepad, + Func blipColorFunction, + Color color) + { + this._color = color; + this._textKey = textKey; + this._getStatusTextAct = getStatus != null ? getStatus : (Func) (() => 0.0f); + this._slideKeyboardAction = setStatusKeyboard != null ? setStatusKeyboard : (Action) (s => { }); + this._blipFunc = blipColorFunction != null ? blipColorFunction : (Func) (s => Color.Lerp(Color.Black, Color.White, s)); + this._slideGamepadAction = setStatusGamepad; + this._isReallyMouseOvered = false; + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + UISliderBase.CurrentAimedSlider = (UIElement) null; + if (!Main.mouseLeft) + UISliderBase.CurrentLockedSlider = (UIElement) null; + int usageLevel = this.GetUsageLevel(); + float num1 = 8f; + base.DrawSelf(spriteBatch); + CalculatedStyle dimensions = this.GetDimensions(); + float num2 = dimensions.Width + 1f; + Vector2 vector2_1 = new Vector2(dimensions.X, dimensions.Y); + bool flag1 = false; + bool flag2 = this.IsMouseHovering; + if (usageLevel == 2) + flag2 = false; + if (usageLevel == 1) + flag2 = true; + Vector2 vector2_2 = new Vector2(0.0f, 2f); + Vector2 drawPosition = vector2_1 + vector2_2; + Color.Lerp(flag1 ? Color.Gold : (flag2 ? Color.White : Color.Silver), Color.White, flag2 ? 0.5f : 0.0f); + Vector2 vector2_3 = new Vector2(0.8f); + drawPosition.X += 8f; + drawPosition.Y += num1; + drawPosition.X -= 17f; + TextureAssets.ColorBar.Frame(); + drawPosition = new Vector2((float) ((double) dimensions.X + (double) dimensions.Width - 10.0), dimensions.Y + 10f + num1); + bool wasInBar; + float num3 = this.DrawValueBar(spriteBatch, drawPosition, 1f, this._getStatusTextAct(), usageLevel, out wasInBar, this._blipFunc); + if (UISliderBase.CurrentLockedSlider == this | wasInBar) + { + UISliderBase.CurrentAimedSlider = (UIElement) this; + if (PlayerInput.Triggers.Current.MouseLeft && !PlayerInput.UsingGamepad && UISliderBase.CurrentLockedSlider == this) + { + this._slideKeyboardAction(num3); + if (!this._soundedUsage) + SoundEngine.PlaySound(12); + this._soundedUsage = true; + } + else + this._soundedUsage = false; + } + if (UISliderBase.CurrentAimedSlider != null && UISliderBase.CurrentLockedSlider == null) + UISliderBase.CurrentLockedSlider = UISliderBase.CurrentAimedSlider; + if (!this._isReallyMouseOvered) + return; + this._slideGamepadAction(); + } + + private float DrawValueBar( + SpriteBatch sb, + Vector2 drawPosition, + float drawScale, + float sliderPosition, + int lockMode, + out bool wasInBar, + Func blipColorFunc) + { + Texture2D texture = TextureAssets.ColorBar.Value; + Vector2 vector2 = new Vector2((float) texture.Width, (float) texture.Height) * drawScale; + drawPosition.X -= (float) (int) vector2.X; + Rectangle destinationRectangle1 = new Rectangle((int) drawPosition.X, (int) drawPosition.Y - (int) vector2.Y / 2, (int) vector2.X, (int) vector2.Y); + Rectangle destinationRectangle2 = destinationRectangle1; + sb.Draw(texture, destinationRectangle1, Color.White); + float num1 = (float) destinationRectangle1.X + 5f * drawScale; + float y = (float) destinationRectangle1.Y + 4f * drawScale; + for (float num2 = 0.0f; (double) num2 < 167.0; ++num2) + { + float num3 = num2 / 167f; + Color color = blipColorFunc(num3); + sb.Draw(TextureAssets.ColorBlip.Value, new Vector2(num1 + num2 * drawScale, y), new Rectangle?(), color, 0.0f, Vector2.Zero, drawScale, SpriteEffects.None, 0.0f); + } + destinationRectangle1.X = (int) num1 - 2; + destinationRectangle1.Y = (int) y; + destinationRectangle1.Width -= 4; + destinationRectangle1.Height -= 8; + bool flag = destinationRectangle1.Contains(new Point(Main.mouseX, Main.mouseY)); + this._isReallyMouseOvered = flag; + if (this.IgnoresMouseInteraction) + flag = false; + if (lockMode == 2) + flag = false; + if (flag || lockMode == 1) + { + sb.Draw(TextureAssets.ColorHighlight.Value, destinationRectangle2, Main.OurFavoriteColor); + if (!this._alreadyHovered) + SoundEngine.PlaySound(12); + this._alreadyHovered = true; + } + else + this._alreadyHovered = false; + wasInBar = false; + if (!this.IgnoresMouseInteraction) + { + sb.Draw(TextureAssets.ColorSlider.Value, new Vector2(num1 + 167f * drawScale * sliderPosition, y + 4f * drawScale), new Rectangle?(), Color.White, 0.0f, new Vector2(0.5f * (float) TextureAssets.ColorSlider.Value.Width, 0.5f * (float) TextureAssets.ColorSlider.Value.Height), drawScale, SpriteEffects.None, 0.0f); + if (Main.mouseX >= destinationRectangle1.X && Main.mouseX <= destinationRectangle1.X + destinationRectangle1.Width) + { + wasInBar = flag; + return (float) (Main.mouseX - destinationRectangle1.X) / (float) destinationRectangle1.Width; + } + } + return destinationRectangle1.X >= Main.mouseX ? 0.0f : 1f; + } + } +} diff --git a/GameContent/UI/Elements/UIColoredSliderSimple.cs b/GameContent/UI/Elements/UIColoredSliderSimple.cs new file mode 100644 index 0000000..cd14e3a --- /dev/null +++ b/GameContent/UI/Elements/UIColoredSliderSimple.cs @@ -0,0 +1,40 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIColoredSliderSimple +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIColoredSliderSimple : UIElement + { + public float FillPercent; + public Color FilledColor = Main.OurFavoriteColor; + public Color EmptyColor = Color.Black; + + protected override void DrawSelf(SpriteBatch spriteBatch) => this.DrawValueBarDynamicWidth(spriteBatch); + + private void DrawValueBarDynamicWidth(SpriteBatch sb) + { + Texture2D texture1 = TextureAssets.ColorBar.Value; + Rectangle rectangle1 = this.GetDimensions().ToRectangle(); + Rectangle rectangle2 = new Rectangle(5, 4, 4, 4); + Utils.DrawSplicedPanel(sb, texture1, rectangle1.X, rectangle1.Y, rectangle1.Width, rectangle1.Height, rectangle2.X, rectangle2.Width, rectangle2.Y, rectangle2.Height, Color.White); + Rectangle destinationRectangle1 = rectangle1; + destinationRectangle1.X += rectangle2.Left; + destinationRectangle1.Width -= rectangle2.Right; + destinationRectangle1.Y += rectangle2.Top; + destinationRectangle1.Height -= rectangle2.Bottom; + Texture2D texture2 = TextureAssets.MagicPixel.Value; + Rectangle rectangle3 = new Rectangle(0, 0, 1, 1); + sb.Draw(texture2, destinationRectangle1, new Rectangle?(rectangle3), this.EmptyColor); + Rectangle destinationRectangle2 = destinationRectangle1; + destinationRectangle2.Width = (int) ((double) destinationRectangle2.Width * (double) this.FillPercent); + sb.Draw(texture2, destinationRectangle2, new Rectangle?(rectangle3), this.FilledColor); + } + } +} diff --git a/GameContent/UI/Elements/UICreativeInfiniteItemsDisplay.cs b/GameContent/UI/Elements/UICreativeInfiniteItemsDisplay.cs new file mode 100644 index 0000000..81f43ee --- /dev/null +++ b/GameContent/UI/Elements/UICreativeInfiniteItemsDisplay.cs @@ -0,0 +1,574 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UICreativeInfiniteItemsDisplay +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.GameContent.Creative; +using Terraria.GameContent.UI.States; +using Terraria.Graphics.Renderers; +using Terraria.ID; +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UICreativeInfiniteItemsDisplay : UIElement + { + private List _itemIdsAvailableTotal; + private List _itemIdsAvailableToShow; + private CreativeUnlocksTracker _lastTrackerCheckedForEdits; + private int _lastCheckedVersionForEdits = -1; + private UISearchBar _searchBar; + private UIPanel _searchBoxPanel; + private UIState _parentUIState; + private string _searchString; + private UIDynamicItemCollection _itemGrid; + private EntryFilterer _filterer; + private EntrySorter _sorter; + private UIElement _containerInfinites; + private UIElement _containerSacrifice; + private bool _showSacrificesInsteadOfInfinites; + public const string SnapPointName_SacrificeSlot = "CreativeSacrificeSlot"; + public const string SnapPointName_SacrificeConfirmButton = "CreativeSacrificeConfirm"; + public const string SnapPointName_InfinitesFilter = "CreativeInfinitesFilter"; + public const string SnapPointName_InfinitesSearch = "CreativeInfinitesSearch"; + public const string SnapPointName_InfinitesItemSlot = "CreativeInfinitesSlot"; + private List _sacrificeCogsSmall = new List(); + private List _sacrificeCogsMedium = new List(); + private List _sacrificeCogsBig = new List(); + private UIImageFramed _sacrificePistons; + private UIParticleLayer _pistonParticleSystem; + private Asset _pistonParticleAsset; + private int _sacrificeAnimationTimeLeft; + private bool _researchComplete; + private bool _hovered; + private int _lastItemIdSacrificed; + private int _lastItemAmountWeHad; + private int _lastItemAmountWeNeededTotal; + + public UICreativeInfiniteItemsDisplay(UIState uiStateThatHoldsThis) + { + this._parentUIState = uiStateThatHoldsThis; + this._itemIdsAvailableTotal = new List(); + this._itemIdsAvailableToShow = new List(); + this._filterer = new EntryFilterer(); + this._filterer.AddFilters(new List() + { + (IItemEntryFilter) new ItemFilters.Weapon(), + (IItemEntryFilter) new ItemFilters.Armor(), + (IItemEntryFilter) new ItemFilters.BuildingBlock(), + (IItemEntryFilter) new ItemFilters.GameplayItems(), + (IItemEntryFilter) new ItemFilters.Accessories(), + (IItemEntryFilter) new ItemFilters.Consumables(), + (IItemEntryFilter) new ItemFilters.Materials() + }); + this._filterer.SetSearchFilterObject(new ItemFilters.BySearch()); + this._sorter = new EntrySorter(); + this._sorter.AddSortSteps(new List() + { + (ICreativeItemSortStep) new SortingSteps.ByCreativeSortingId(), + (ICreativeItemSortStep) new SortingSteps.Alphabetical() + }); + this._itemIdsAvailableTotal.AddRange((IEnumerable) CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId.Keys.ToList()); + this.BuildPage(); + } + + private void BuildPage() + { + this._lastCheckedVersionForEdits = -1; + this.RemoveAllChildren(); + this.SetPadding(0.0f); + UIElement totalContainer1 = new UIElement() + { + Width = StyleDimension.Fill, + Height = StyleDimension.Fill + }; + totalContainer1.SetPadding(0.0f); + this._containerInfinites = totalContainer1; + UIElement totalContainer2 = new UIElement() + { + Width = StyleDimension.Fill, + Height = StyleDimension.Fill + }; + totalContainer2.SetPadding(0.0f); + this._containerSacrifice = totalContainer2; + this.BuildInfinitesMenuContents(totalContainer1); + this.BuildSacrificeMenuContents(totalContainer2); + this.UpdateContents(); + this.OnUpdate += new UIElement.ElementEvent(this.UICreativeInfiniteItemsDisplay_OnUpdate); + } + + private void Hover_OnUpdate(UIElement affectedElement) + { + if (!this._hovered) + return; + Main.LocalPlayer.mouseInterface = true; + } + + private void Hover_OnMouseOut(UIMouseEvent evt, UIElement listeningElement) => this._hovered = false; + + private void Hover_OnMouseOver(UIMouseEvent evt, UIElement listeningElement) => this._hovered = true; + + private static UIPanel CreateBasicPanel() + { + UIPanel uiPanel = new UIPanel(); + UICreativeInfiniteItemsDisplay.SetBasicSizesForCreativeSacrificeOrInfinitesPanel((UIElement) uiPanel); + uiPanel.BackgroundColor *= 0.8f; + uiPanel.BorderColor *= 0.8f; + return uiPanel; + } + + private static void SetBasicSizesForCreativeSacrificeOrInfinitesPanel(UIElement element) + { + element.Width = new StyleDimension(0.0f, 1f); + element.Height = new StyleDimension(-38f, 1f); + element.Top = new StyleDimension(38f, 0.0f); + } + + private void BuildInfinitesMenuContents(UIElement totalContainer) + { + UIPanel basicPanel = UICreativeInfiniteItemsDisplay.CreateBasicPanel(); + totalContainer.Append((UIElement) basicPanel); + basicPanel.OnUpdate += new UIElement.ElementEvent(this.Hover_OnUpdate); + basicPanel.OnMouseOver += new UIElement.MouseEvent(this.Hover_OnMouseOver); + basicPanel.OnMouseOut += new UIElement.MouseEvent(this.Hover_OnMouseOut); + UIDynamicItemCollection dynamicItemCollection = new UIDynamicItemCollection(); + this._itemGrid = dynamicItemCollection; + UIElement uiElement = new UIElement() + { + Height = new StyleDimension(24f, 0.0f), + Width = new StyleDimension(0.0f, 1f) + }; + uiElement.SetPadding(0.0f); + basicPanel.Append(uiElement); + this.AddSearchBar(uiElement); + this._searchBar.SetContents((string) null, true); + UIList uiList1 = new UIList(); + uiList1.Width = new StyleDimension(-25f, 1f); + uiList1.Height = new StyleDimension(-28f, 1f); + uiList1.VAlign = 1f; + uiList1.HAlign = 0.0f; + UIList uiList2 = uiList1; + basicPanel.Append((UIElement) uiList2); + float num = 4f; + UIScrollbar uiScrollbar = new UIScrollbar(); + uiScrollbar.Height = new StyleDimension((float) (-28.0 - (double) num * 2.0), 1f); + uiScrollbar.Top = new StyleDimension(-num, 0.0f); + uiScrollbar.VAlign = 1f; + uiScrollbar.HAlign = 1f; + UIScrollbar scrollbar = uiScrollbar; + basicPanel.Append((UIElement) scrollbar); + uiList2.SetScrollbar(scrollbar); + uiList2.Add((UIElement) dynamicItemCollection); + UICreativeItemsInfiniteFilteringOptions filteringOptions = new UICreativeItemsInfiniteFilteringOptions(this._filterer, "CreativeInfinitesFilter"); + filteringOptions.OnClickingOption += new Action(this.filtersHelper_OnClickingOption); + filteringOptions.Left = new StyleDimension(20f, 0.0f); + totalContainer.Append((UIElement) filteringOptions); + filteringOptions.OnUpdate += new UIElement.ElementEvent(this.Hover_OnUpdate); + filteringOptions.OnMouseOver += new UIElement.MouseEvent(this.Hover_OnMouseOver); + filteringOptions.OnMouseOut += new UIElement.MouseEvent(this.Hover_OnMouseOut); + } + + private void BuildSacrificeMenuContents(UIElement totalContainer) + { + UIPanel basicPanel = UICreativeInfiniteItemsDisplay.CreateBasicPanel(); + basicPanel.VAlign = 0.5f; + basicPanel.Height = new StyleDimension(170f, 0.0f); + basicPanel.Width = new StyleDimension(170f, 0.0f); + basicPanel.Top = new StyleDimension(); + totalContainer.Append((UIElement) basicPanel); + basicPanel.OnUpdate += new UIElement.ElementEvent(this.Hover_OnUpdate); + basicPanel.OnMouseOver += new UIElement.MouseEvent(this.Hover_OnMouseOver); + basicPanel.OnMouseOut += new UIElement.MouseEvent(this.Hover_OnMouseOut); + this.AddCogsForSacrificeMenu((UIElement) basicPanel); + this._pistonParticleAsset = Main.Assets.Request("Images/UI/Creative/Research_Spark", (AssetRequestMode) 1); + float pixels = 0.0f; + UIImage uiImage1 = new UIImage(Main.Assets.Request("Images/UI/Creative/Research_Slots", (AssetRequestMode) 1)); + uiImage1.HAlign = 0.5f; + uiImage1.VAlign = 0.5f; + uiImage1.Top = new StyleDimension(-20f, 0.0f); + uiImage1.Left = new StyleDimension(pixels, 0.0f); + UIImage uiImage2 = uiImage1; + basicPanel.Append((UIElement) uiImage2); + Asset asset = Main.Assets.Request("Images/UI/Creative/Research_FramedPistons", (AssetRequestMode) 1); + UIImageFramed uiImageFramed1 = new UIImageFramed(asset, asset.Frame(verticalFrames: 9)); + uiImageFramed1.HAlign = 0.5f; + uiImageFramed1.VAlign = 0.5f; + uiImageFramed1.Top = new StyleDimension(-20f, 0.0f); + uiImageFramed1.Left = new StyleDimension(pixels, 0.0f); + uiImageFramed1.IgnoresMouseInteraction = true; + UIImageFramed uiImageFramed2 = uiImageFramed1; + basicPanel.Append((UIElement) uiImageFramed2); + this._sacrificePistons = uiImageFramed2; + UIParticleLayer uiParticleLayer = new UIParticleLayer(); + uiParticleLayer.Width = new StyleDimension(0.0f, 1f); + uiParticleLayer.Height = new StyleDimension(0.0f, 1f); + uiParticleLayer.AnchorPositionOffsetByPercents = Vector2.One / 2f; + uiParticleLayer.AnchorPositionOffsetByPixels = Vector2.Zero; + this._pistonParticleSystem = uiParticleLayer; + uiImageFramed2.Append((UIElement) this._pistonParticleSystem); + UIElement element = Main.CreativeMenu.ProvideItemSlotElement(0); + element.HAlign = 0.5f; + element.VAlign = 0.5f; + element.Top = new StyleDimension(-15f, 0.0f); + element.Left = new StyleDimension(pixels, 0.0f); + element.SetSnapPoint("CreativeSacrificeSlot", 0); + uiImage2.Append(element); + UIText uiText1 = new UIText("(0/50)", 0.8f); + uiText1.Top = new StyleDimension(10f, 0.0f); + uiText1.Left = new StyleDimension(pixels, 0.0f); + uiText1.HAlign = 0.5f; + uiText1.VAlign = 0.5f; + uiText1.IgnoresMouseInteraction = true; + UIText uiText2 = uiText1; + uiText2.OnUpdate += new UIElement.ElementEvent(this.descriptionText_OnUpdate); + basicPanel.Append((UIElement) uiText2); + UIPanel uiPanel1 = new UIPanel(); + uiPanel1.Top = new StyleDimension(0.0f, 0.0f); + uiPanel1.Left = new StyleDimension(pixels, 0.0f); + uiPanel1.HAlign = 0.5f; + uiPanel1.VAlign = 1f; + uiPanel1.Width = new StyleDimension(124f, 0.0f); + uiPanel1.Height = new StyleDimension(30f, 0.0f); + UIPanel uiPanel2 = uiPanel1; + UIText uiText3 = new UIText(Language.GetText("CreativePowers.ConfirmInfiniteItemSacrifice"), 0.8f); + uiText3.IgnoresMouseInteraction = true; + uiText3.HAlign = 0.5f; + uiText3.VAlign = 0.5f; + UIText uiText4 = uiText3; + uiPanel2.Append((UIElement) uiText4); + uiPanel2.SetSnapPoint("CreativeSacrificeConfirm", 0); + uiPanel2.OnClick += new UIElement.MouseEvent(this.sacrificeButton_OnClick); + uiPanel2.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver); + uiPanel2.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut); + uiPanel2.OnUpdate += new UIElement.ElementEvent(this.research_OnUpdate); + basicPanel.Append((UIElement) uiPanel2); + basicPanel.OnUpdate += new UIElement.ElementEvent(this.sacrificeWindow_OnUpdate); + } + + private void research_OnUpdate(UIElement affectedElement) + { + if (!affectedElement.IsMouseHovering) + return; + Main.instance.MouseText(Language.GetTextValue("CreativePowers.ResearchButtonTooltip")); + } + + private void FadedMouseOver(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + ((UIPanel) evt.Target).BackgroundColor = new Color(73, 94, 171); + ((UIPanel) evt.Target).BorderColor = Colors.FancyUIFatButtonMouseOver; + } + + private void FadedMouseOut(UIMouseEvent evt, UIElement listeningElement) + { + ((UIPanel) evt.Target).BackgroundColor = new Color(63, 82, 151) * 0.8f; + ((UIPanel) evt.Target).BorderColor = Color.Black; + } + + private void AddCogsForSacrificeMenu(UIElement sacrificesContainer) + { + UIElement uiElement = new UIElement(); + uiElement.IgnoresMouseInteraction = true; + UICreativeInfiniteItemsDisplay.SetBasicSizesForCreativeSacrificeOrInfinitesPanel(uiElement); + uiElement.VAlign = 0.5f; + uiElement.Height = new StyleDimension(170f, 0.0f); + uiElement.Width = new StyleDimension(280f, 0.0f); + uiElement.Top = new StyleDimension(); + uiElement.SetPadding(0.0f); + sacrificesContainer.Append(uiElement); + Vector2 vector2 = new Vector2(-10f, -10f); + this.AddSymetricalCogsPair(uiElement, new Vector2(22f, 1f) + vector2, "Images/UI/Creative/Research_GearC", this._sacrificeCogsSmall); + this.AddSymetricalCogsPair(uiElement, new Vector2(1f, 28f) + vector2, "Images/UI/Creative/Research_GearB", this._sacrificeCogsMedium); + this.AddSymetricalCogsPair(uiElement, new Vector2(5f, 5f) + vector2, "Images/UI/Creative/Research_GearA", this._sacrificeCogsBig); + } + + private void sacrificeWindow_OnUpdate(UIElement affectedElement) + { + float num1 = 0.05f; + float animationProgress = this.GetSacrificeAnimationProgress(); + double lerpValue = (double) Utils.GetLerpValue(1f, 0.7f, animationProgress, true); + float num2 = 1f + (float) (lerpValue * lerpValue) * 2f; + float num3 = num1 * num2; + float num4 = 1.142857f; + float num5 = 1f; + UICreativeInfiniteItemsDisplay.OffsetRotationsForCogs((float) (2.0 * (double) num3), this._sacrificeCogsSmall); + UICreativeInfiniteItemsDisplay.OffsetRotationsForCogs(num4 * num3, this._sacrificeCogsMedium); + UICreativeInfiniteItemsDisplay.OffsetRotationsForCogs(-num5 * num3, this._sacrificeCogsBig); + int frameY = 0; + if (this._sacrificeAnimationTimeLeft != 0) + { + float num6 = 0.1f; + float num7 = 0.06666667f; + frameY = (double) animationProgress < 1.0 - (double) num6 ? ((double) animationProgress < 1.0 - (double) num6 * 2.0 ? ((double) animationProgress < 1.0 - (double) num6 * 3.0 ? ((double) animationProgress < (double) num7 * 4.0 ? ((double) animationProgress < (double) num7 * 3.0 ? ((double) animationProgress < (double) num7 * 2.0 ? ((double) animationProgress < (double) num7 ? 1 : 2) : 3) : 4) : 5) : 6) : 7) : 8; + if (this._sacrificeAnimationTimeLeft == 56) + { + SoundEngine.PlaySound(63); + Vector2 vector2 = new Vector2(0.0f, 0.1635f); + for (int index = 0; index < 15; ++index) + { + Vector2 initialVelocity = Main.rand.NextVector2Circular(4f, 3f); + if ((double) initialVelocity.Y > 0.0) + initialVelocity.Y = -initialVelocity.Y; + initialVelocity.Y -= 2f; + this._pistonParticleSystem.AddParticle((IParticle) new CreativeSacrificeParticle(this._pistonParticleAsset, new Rectangle?(), initialVelocity, Vector2.Zero) + { + AccelerationPerFrame = vector2, + ScaleOffsetPerFrame = -0.01666667f + }); + } + } + if (this._sacrificeAnimationTimeLeft == 40 && this._researchComplete) + { + this._researchComplete = false; + SoundEngine.PlaySound(64); + } + } + this._sacrificePistons.SetFrame(1, 9, 0, frameY, 0, 0); + } + + private static void OffsetRotationsForCogs(float rotationOffset, List cogsList) + { + cogsList[0].Rotation += rotationOffset; + cogsList[1].Rotation -= rotationOffset; + } + + private void AddSymetricalCogsPair( + UIElement sacrificesContainer, + Vector2 cogOFfsetsInPixels, + string assetPath, + List imagesList) + { + Asset asset = Main.Assets.Request(assetPath, (AssetRequestMode) 1); + cogOFfsetsInPixels += -asset.Size() / 2f; + UIImage uiImage1 = new UIImage(asset); + uiImage1.NormalizedOrigin = Vector2.One / 2f; + uiImage1.Left = new StyleDimension(cogOFfsetsInPixels.X, 0.0f); + uiImage1.Top = new StyleDimension(cogOFfsetsInPixels.Y, 0.0f); + UIImage uiImage2 = uiImage1; + imagesList.Add(uiImage2); + sacrificesContainer.Append((UIElement) uiImage2); + UIImage uiImage3 = new UIImage(asset); + uiImage3.NormalizedOrigin = Vector2.One / 2f; + uiImage3.HAlign = 1f; + uiImage3.Left = new StyleDimension(-cogOFfsetsInPixels.X, 0.0f); + uiImage3.Top = new StyleDimension(cogOFfsetsInPixels.Y, 0.0f); + UIImage uiImage4 = uiImage3; + imagesList.Add(uiImage4); + sacrificesContainer.Append((UIElement) uiImage4); + } + + private void descriptionText_OnUpdate(UIElement affectedElement) + { + UIText uiText = affectedElement as UIText; + int itemIdChecked; + int amountWeHave; + int amountNeededTotal; + bool sacrificeNumbers = Main.CreativeMenu.GetSacrificeNumbers(out itemIdChecked, out amountWeHave, out amountNeededTotal); + Main.CreativeMenu.ShouldDrawSacrificeArea(); + if (!Main.mouseItem.IsAir) + this.ForgetItemSacrifice(); + if (itemIdChecked == 0) + { + if (this._lastItemIdSacrificed != 0 && this._lastItemAmountWeNeededTotal != this._lastItemAmountWeHad) + uiText.SetText(string.Format("({0}/{1})", (object) this._lastItemAmountWeHad, (object) this._lastItemAmountWeNeededTotal)); + else + uiText.SetText("???"); + } + else + { + this.ForgetItemSacrifice(); + if (!sacrificeNumbers) + uiText.SetText("X"); + else + uiText.SetText(string.Format("({0}/{1})", (object) amountWeHave, (object) amountNeededTotal)); + } + } + + private void sacrificeButton_OnClick(UIMouseEvent evt, UIElement listeningElement) + { + int itemIdChecked; + int amountWeHave; + int amountNeededTotal; + Main.CreativeMenu.GetSacrificeNumbers(out itemIdChecked, out amountWeHave, out amountNeededTotal); + int amountWeSacrificed; + switch (Main.CreativeMenu.SacrificeItem(out amountWeSacrificed)) + { + case CreativeUI.ItemSacrificeResult.SacrificedButNotDone: + this._researchComplete = false; + this.BeginSacrificeAnimation(); + this.RememberItemSacrifice(itemIdChecked, amountWeHave + amountWeSacrificed, amountNeededTotal); + break; + case CreativeUI.ItemSacrificeResult.SacrificedAndDone: + this._researchComplete = true; + this.BeginSacrificeAnimation(); + this.RememberItemSacrifice(itemIdChecked, amountWeHave + amountWeSacrificed, amountNeededTotal); + break; + } + } + + private void RememberItemSacrifice(int itemId, int amountWeHave, int amountWeNeedTotal) + { + this._lastItemIdSacrificed = itemId; + this._lastItemAmountWeHad = amountWeHave; + this._lastItemAmountWeNeededTotal = amountWeNeedTotal; + } + + private void ForgetItemSacrifice() + { + this._lastItemIdSacrificed = 0; + this._lastItemAmountWeHad = 0; + this._lastItemAmountWeNeededTotal = 0; + } + + private void BeginSacrificeAnimation() => this._sacrificeAnimationTimeLeft = 60; + + private void UpdateSacrificeAnimation() + { + if (this._sacrificeAnimationTimeLeft <= 0) + return; + --this._sacrificeAnimationTimeLeft; + } + + private float GetSacrificeAnimationProgress() => Utils.GetLerpValue(60f, 0.0f, (float) this._sacrificeAnimationTimeLeft, true); + + public void SetPageTypeToShow( + UICreativeInfiniteItemsDisplay.InfiniteItemsDisplayPage page) + { + this._showSacrificesInsteadOfInfinites = page == UICreativeInfiniteItemsDisplay.InfiniteItemsDisplayPage.InfiniteItemsResearch; + } + + private void UICreativeInfiniteItemsDisplay_OnUpdate(UIElement affectedElement) + { + this.RemoveAllChildren(); + CreativeUnlocksTracker playerCreativeTracker = Main.LocalPlayerCreativeTracker; + if (this._lastTrackerCheckedForEdits != playerCreativeTracker) + { + this._lastTrackerCheckedForEdits = playerCreativeTracker; + this._lastCheckedVersionForEdits = -1; + } + int lastEditId = playerCreativeTracker.ItemSacrifices.LastEditId; + if (this._lastCheckedVersionForEdits != lastEditId) + { + this._lastCheckedVersionForEdits = lastEditId; + this.UpdateContents(); + } + if (this._showSacrificesInsteadOfInfinites) + this.Append(this._containerSacrifice); + else + this.Append(this._containerInfinites); + this.UpdateSacrificeAnimation(); + } + + private void filtersHelper_OnClickingOption() => this.UpdateContents(); + + private void UpdateContents() + { + this._itemIdsAvailableTotal.Clear(); + CreativeItemSacrificesCatalog.Instance.FillListOfItemsThatCanBeObtainedInfinitely(this._itemIdsAvailableTotal); + this._itemIdsAvailableToShow.Clear(); + this._itemIdsAvailableToShow.AddRange(this._itemIdsAvailableTotal.Where((Func) (x => this._filterer.FitsFilter(ContentSamples.ItemsByType[x])))); + this._itemIdsAvailableToShow.Sort((IComparer) this._sorter); + this._itemGrid.SetContentsToShow(this._itemIdsAvailableToShow); + } + + private void AddSearchBar(UIElement searchArea) + { + UIImageButton uiImageButton1 = new UIImageButton(Main.Assets.Request("Images/UI/Bestiary/Button_Search", (AssetRequestMode) 1)); + uiImageButton1.VAlign = 0.5f; + uiImageButton1.HAlign = 0.0f; + UIImageButton uiImageButton2 = uiImageButton1; + uiImageButton2.OnClick += new UIElement.MouseEvent(this.Click_SearchArea); + uiImageButton2.SetHoverImage(Main.Assets.Request("Images/UI/Bestiary/Button_Search_Border", (AssetRequestMode) 1)); + uiImageButton2.SetVisibility(1f, 1f); + uiImageButton2.SetSnapPoint("CreativeInfinitesSearch", 0); + searchArea.Append((UIElement) uiImageButton2); + UIPanel uiPanel1 = new UIPanel(); + uiPanel1.Width = new StyleDimension((float) (-(double) uiImageButton2.Width.Pixels - 3.0), 1f); + uiPanel1.Height = new StyleDimension(0.0f, 1f); + uiPanel1.VAlign = 0.5f; + uiPanel1.HAlign = 1f; + UIPanel uiPanel2 = uiPanel1; + this._searchBoxPanel = uiPanel2; + uiPanel2.BackgroundColor = new Color(35, 40, 83); + uiPanel2.BorderColor = new Color(35, 40, 83); + uiPanel2.SetPadding(0.0f); + searchArea.Append((UIElement) uiPanel2); + UISearchBar uiSearchBar1 = new UISearchBar(Language.GetText("UI.PlayerNameSlot"), 0.8f); + uiSearchBar1.Width = new StyleDimension(0.0f, 1f); + uiSearchBar1.Height = new StyleDimension(0.0f, 1f); + uiSearchBar1.HAlign = 0.0f; + uiSearchBar1.VAlign = 0.5f; + uiSearchBar1.Left = new StyleDimension(0.0f, 0.0f); + uiSearchBar1.IgnoresMouseInteraction = true; + UISearchBar uiSearchBar2 = uiSearchBar1; + this._searchBar = uiSearchBar2; + uiPanel2.OnClick += new UIElement.MouseEvent(this.Click_SearchArea); + uiSearchBar2.OnContentsChanged += new Action(this.OnSearchContentsChanged); + uiPanel2.Append((UIElement) uiSearchBar2); + uiSearchBar2.OnStartTakingInput += new Action(this.OnStartTakingInput); + uiSearchBar2.OnEndTakingInput += new Action(this.OnEndTakingInput); + uiSearchBar2.OnNeedingVirtualKeyboard += new Action(this.OpenVirtualKeyboardWhenNeeded); + uiSearchBar2.OnCancledTakingInput += new Action(this.OnCancledInput); + } + + private void OnCancledInput() => Main.LocalPlayer.ToggleInv(); + + private void Click_SearchArea(UIMouseEvent evt, UIElement listeningElement) => this._searchBar.ToggleTakingText(); + + private void OnSearchContentsChanged(string contents) + { + this._searchString = contents; + this._filterer.SetSearchFilter(contents); + this.UpdateContents(); + } + + private void OnStartTakingInput() => this._searchBoxPanel.BorderColor = Main.OurFavoriteColor; + + private void OnEndTakingInput() => this._searchBoxPanel.BorderColor = new Color(35, 40, 83); + + private void OpenVirtualKeyboardWhenNeeded() + { + int length = 40; + UIVirtualKeyboard uiVirtualKeyboard = new UIVirtualKeyboard(Language.GetText("UI.PlayerNameSlot").Value, this._searchString, new UIVirtualKeyboard.KeyboardSubmitEvent(this.OnFinishedSettingName), new Action(this.GoBackHere), 3, true); + uiVirtualKeyboard.SetMaxInputLength(length); + IngameFancyUI.OpenUIState((UIState) uiVirtualKeyboard); + } + + private static UserInterface GetCurrentInterface() + { + UserInterface activeInstance = UserInterface.ActiveInstance; + return !Main.gameMenu ? Main.InGameUI : Main.MenuUI; + } + + private void OnFinishedSettingName(string name) + { + this._searchBar.SetContents(name.Trim()); + this.GoBackHere(); + } + + private void GoBackHere() + { + IngameFancyUI.Close(); + this._searchBar.ToggleTakingText(); + Main.CreativeMenu.GamepadMoveToSearchButtonHack = true; + } + + public int GetItemsPerLine() => this._itemGrid.GetItemsPerLine(); + + public enum InfiniteItemsDisplayPage + { + InfiniteItemsPickup, + InfiniteItemsResearch, + } + } +} diff --git a/GameContent/UI/Elements/UICreativeItemsInfiniteFilteringOptions.cs b/GameContent/UI/Elements/UICreativeItemsInfiniteFilteringOptions.cs new file mode 100644 index 0000000..3fbe5cb --- /dev/null +++ b/GameContent/UI/Elements/UICreativeItemsInfiniteFilteringOptions.cs @@ -0,0 +1,112 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UICreativeItemsInfiniteFilteringOptions +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using System.Collections.Generic; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.GameContent.Creative; +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UICreativeItemsInfiniteFilteringOptions : UIElement + { + private EntryFilterer _filterer; + private Dictionary _filtersByButtons = new Dictionary(); + private Dictionary _iconsByButtons = new Dictionary(); + private const int barFramesX = 2; + private const int barFramesY = 4; + + public event Action OnClickingOption; + + public UICreativeItemsInfiniteFilteringOptions( + EntryFilterer filterer, + string snapPointsName) + { + this._filterer = filterer; + int num1 = 40; + int count = this._filterer.AvailableFilters.Count; + int num2 = num1 * count; + this.Height = new StyleDimension((float) num1, 0.0f); + this.Width = new StyleDimension((float) num2, 0.0f); + this.Top = new StyleDimension(4f, 0.0f); + this.SetPadding(0.0f); + Asset asset = Main.Assets.Request("Images/UI/Creative/Infinite_Tabs_B", (AssetRequestMode) 1); + for (int index = 0; index < this._filterer.AvailableFilters.Count; ++index) + { + IItemEntryFilter availableFilter = this._filterer.AvailableFilters[index]; + asset.Frame(2, 4).OffsetSize(-2, -2); + UIImageFramed uiImageFramed = new UIImageFramed(asset, asset.Frame(2, 4).OffsetSize(-2, -2)); + uiImageFramed.Left.Set((float) (num1 * index), 0.0f); + uiImageFramed.OnClick += new UIElement.MouseEvent(this.singleFilterButtonClick); + uiImageFramed.OnMouseOver += new UIElement.MouseEvent(this.button_OnMouseOver); + uiImageFramed.SetPadding(0.0f); + uiImageFramed.SetSnapPoint(snapPointsName, index); + this.AddOnHover(availableFilter, (UIElement) uiImageFramed, index); + UIElement image = availableFilter.GetImage(); + image.IgnoresMouseInteraction = true; + image.Left = new StyleDimension(6f, 0.0f); + image.HAlign = 0.0f; + uiImageFramed.Append(image); + this._filtersByButtons[uiImageFramed] = availableFilter; + this._iconsByButtons[uiImageFramed] = image; + this.Append((UIElement) uiImageFramed); + this.UpdateVisuals(uiImageFramed, index); + } + } + + private void button_OnMouseOver(UIMouseEvent evt, UIElement listeningElement) => SoundEngine.PlaySound(12); + + private void singleFilterButtonClick(UIMouseEvent evt, UIElement listeningElement) + { + IItemEntryFilter itemEntryFilter; + if (!(evt.Target is UIImageFramed target) || !this._filtersByButtons.TryGetValue(target, out itemEntryFilter)) + return; + int num = this._filterer.AvailableFilters.IndexOf(itemEntryFilter); + if (num == -1) + return; + if (!this._filterer.ActiveFilters.Contains(itemEntryFilter)) + this._filterer.ActiveFilters.Clear(); + this._filterer.ToggleFilter(num); + this.UpdateVisuals(target, num); + if (this.OnClickingOption == null) + return; + this.OnClickingOption(); + } + + private void UpdateVisuals(UIImageFramed button, int indexOfFilter) + { + bool flag = this._filterer.IsFilterActive(indexOfFilter); + bool isMouseHovering = button.IsMouseHovering; + int frameX = flag.ToInt(); + int frameY = flag.ToInt() * 2 + isMouseHovering.ToInt(); + button.SetFrame(2, 4, frameX, frameY, -2, -2); + if (!(this._iconsByButtons[button] is IColorable iconsByButton)) + return; + Color color = flag ? Color.White : Color.White * 0.5f; + iconsByButton.Color = color; + } + + private void AddOnHover(IItemEntryFilter filter, UIElement button, int indexOfFilter) + { + button.OnUpdate += (UIElement.ElementEvent) (element => this.ShowButtonName(element, filter, indexOfFilter)); + button.OnUpdate += (UIElement.ElementEvent) (element => this.UpdateVisuals(button as UIImageFramed, indexOfFilter)); + } + + private void ShowButtonName(UIElement element, IItemEntryFilter number, int indexOfFilter) + { + if (!element.IsMouseHovering) + return; + string textValue = Language.GetTextValue(number.GetDisplayNameKey()); + Main.instance.MouseText(textValue); + } + } +} diff --git a/GameContent/UI/Elements/UICreativePowerButton.cs b/GameContent/UI/Elements/UICreativePowerButton.cs new file mode 100644 index 0000000..ea494fc --- /dev/null +++ b/GameContent/UI/Elements/UICreativePowerButton.cs @@ -0,0 +1,14 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UICreativePowerButton +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UICreativePowerButton : UIElement + { + } +} diff --git a/GameContent/UI/Elements/UIDifficultyButton.cs b/GameContent/UI/Elements/UIDifficultyButton.cs new file mode 100644 index 0000000..439c181 --- /dev/null +++ b/GameContent/UI/Elements/UIDifficultyButton.cs @@ -0,0 +1,94 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIDifficultyButton +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.Audio; +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIDifficultyButton : UIElement + { + private readonly Player _player; + private readonly Asset _BasePanelTexture; + private readonly Asset _selectedBorderTexture; + private readonly Asset _hoveredBorderTexture; + private readonly byte _difficulty; + private readonly Color _color; + private bool _hovered; + private bool _soundedHover; + + public UIDifficultyButton( + Player player, + LocalizedText title, + LocalizedText description, + byte difficulty, + Color color) + { + this._player = player; + this._difficulty = difficulty; + this.Width = StyleDimension.FromPixels(44f); + this.Height = StyleDimension.FromPixels(110f); + this._BasePanelTexture = Main.Assets.Request("Images/UI/CharCreation/PanelGrayscale", (AssetRequestMode) 1); + this._selectedBorderTexture = Main.Assets.Request("Images/UI/CharCreation/CategoryPanelHighlight", (AssetRequestMode) 1); + this._hoveredBorderTexture = Main.Assets.Request("Images/UI/CharCreation/CategoryPanelBorder", (AssetRequestMode) 1); + this._color = color; + UIText uiText = new UIText(title, 0.9f); + uiText.HAlign = 0.5f; + uiText.VAlign = 0.0f; + uiText.Width = StyleDimension.FromPixelsAndPercent(-10f, 1f); + uiText.Top = StyleDimension.FromPixels(5f); + this.Append((UIElement) uiText); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + if (this._hovered) + { + if (!this._soundedHover) + SoundEngine.PlaySound(12); + this._soundedHover = true; + } + else + this._soundedHover = false; + CalculatedStyle dimensions = this.GetDimensions(); + int num1 = 7; + if ((double) dimensions.Height < 30.0) + num1 = 5; + int num2 = 10; + int num3 = 10; + int num4 = (int) this._difficulty == (int) this._player.difficulty ? 1 : 0; + Utils.DrawSplicedPanel(spriteBatch, this._BasePanelTexture.Value, (int) dimensions.X, (int) dimensions.Y, (int) dimensions.Width, (int) dimensions.Height, num2, num2, num3, num3, Color.Lerp(Color.Black, this._color, 0.8f) * 0.5f); + if (num4 != 0) + Utils.DrawSplicedPanel(spriteBatch, this._BasePanelTexture.Value, (int) dimensions.X + num1, (int) dimensions.Y + num1 - 2, (int) dimensions.Width - num1 * 2, (int) dimensions.Height - num1 * 2, num2, num2, num3, num3, Color.Lerp(this._color, Color.White, 0.7f) * 0.5f); + if (!this._hovered) + return; + Utils.DrawSplicedPanel(spriteBatch, this._hoveredBorderTexture.Value, (int) dimensions.X, (int) dimensions.Y, (int) dimensions.Width, (int) dimensions.Height, num2, num2, num3, num3, Color.White); + } + + public override void MouseDown(UIMouseEvent evt) + { + this._player.difficulty = this._difficulty; + SoundEngine.PlaySound(12); + base.MouseDown(evt); + } + + public override void MouseOver(UIMouseEvent evt) + { + base.MouseOver(evt); + this._hovered = true; + } + + public override void MouseOut(UIMouseEvent evt) + { + base.MouseOut(evt); + this._hovered = false; + } + } +} diff --git a/GameContent/UI/Elements/UIDynamicItemCollection.cs b/GameContent/UI/Elements/UIDynamicItemCollection.cs new file mode 100644 index 0000000..24af841 --- /dev/null +++ b/GameContent/UI/Elements/UIDynamicItemCollection.cs @@ -0,0 +1,176 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIDynamicItemCollection +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using Terraria.GameInput; +using Terraria.ID; +using Terraria.UI; +using Terraria.UI.Gamepad; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIDynamicItemCollection : UIElement + { + private List _itemIdsAvailableToShow = new List(); + private List _itemIdsToLoadTexturesFor = new List(); + private int _itemsPerLine; + private const int sizePerEntryX = 44; + private const int sizePerEntryY = 44; + private List _dummySnapPoints = new List(); + + public UIDynamicItemCollection() + { + this.Width = new StyleDimension(0.0f, 1f); + this.HAlign = 0.5f; + this.UpdateSize(); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + Main.inventoryScale = 0.8461539f; + int startX; + int startY; + int startItemIndex; + int endItemIndex; + this.GetGridParameters(out startX, out startY, out startItemIndex, out endItemIndex); + int itemsPerLine = this._itemsPerLine; + for (int index = startItemIndex; index < endItemIndex; ++index) + { + int key = this._itemIdsAvailableToShow[index]; + Rectangle itemSlotHitbox = this.GetItemSlotHitbox(startX, startY, startItemIndex, index); + Item inv = ContentSamples.ItemsByType[key]; + int context = 29; + if (TextureAssets.Item[key].State == null) + --itemsPerLine; + bool flag = false; + if (this.IsMouseHovering && itemSlotHitbox.Contains(Main.MouseScreen.ToPoint()) && !PlayerInput.IgnoreMouseInterface) + { + Main.LocalPlayer.mouseInterface = true; + ItemSlot.OverrideHover(ref inv, context); + ItemSlot.LeftClick(ref inv, context); + ItemSlot.RightClick(ref inv, context); + ItemSlot.MouseHover(ref inv, context); + flag = true; + } + UILinkPointNavigator.Shortcuts.CREATIVE_ItemSlotShouldHighlightAsSelected = flag; + ItemSlot.Draw(spriteBatch, ref inv, context, itemSlotHitbox.TopLeft()); + if (itemsPerLine <= 0) + break; + } + while (this._itemIdsToLoadTexturesFor.Count > 0 && itemsPerLine > 0) + { + int i = this._itemIdsToLoadTexturesFor[0]; + this._itemIdsToLoadTexturesFor.RemoveAt(0); + if (TextureAssets.Item[i].State == null) + { + Main.instance.LoadItem(i); + itemsPerLine -= 4; + } + } + } + + private Rectangle GetItemSlotHitbox( + int startX, + int startY, + int startItemIndex, + int i) + { + int num1 = i - startItemIndex; + int num2 = num1 % this._itemsPerLine; + int num3 = num1 / this._itemsPerLine; + return new Rectangle(startX + num2 * 44, startY + num3 * 44, 44, 44); + } + + private void GetGridParameters( + out int startX, + out int startY, + out int startItemIndex, + out int endItemIndex) + { + Rectangle rectangle = this.GetDimensions().ToRectangle(); + Rectangle viewCullingArea = this.Parent.GetViewCullingArea(); + int x = rectangle.Center.X; + startX = x - (int) ((double) (44 * this._itemsPerLine) * 0.5); + startY = rectangle.Top; + startItemIndex = 0; + endItemIndex = this._itemIdsAvailableToShow.Count; + int num1 = (Math.Min(viewCullingArea.Top, rectangle.Top) - viewCullingArea.Top) / 44; + startY += -num1 * 44; + startItemIndex += -num1 * this._itemsPerLine; + int num2 = (int) Math.Ceiling((double) viewCullingArea.Height / 44.0) * this._itemsPerLine; + if (endItemIndex <= num2 + startItemIndex + this._itemsPerLine) + return; + endItemIndex = num2 + startItemIndex + this._itemsPerLine; + } + + public override void Recalculate() + { + base.Recalculate(); + this.UpdateSize(); + } + + public override void Update(GameTime gameTime) + { + base.Update(gameTime); + if (!this.IsMouseHovering) + return; + Main.LocalPlayer.mouseInterface = true; + } + + public void SetContentsToShow(List itemIdsToShow) + { + this._itemIdsAvailableToShow.Clear(); + this._itemIdsToLoadTexturesFor.Clear(); + this._itemIdsAvailableToShow.AddRange((IEnumerable) itemIdsToShow); + this._itemIdsToLoadTexturesFor.AddRange((IEnumerable) itemIdsToShow); + this.UpdateSize(); + } + + public int GetItemsPerLine() => this._itemsPerLine; + + public override List GetSnapPoints() + { + List snapPointList = new List(); + int startX; + int startY; + int startItemIndex; + int endItemIndex; + this.GetGridParameters(out startX, out startY, out startItemIndex, out endItemIndex); + int itemsPerLine = this._itemsPerLine; + Rectangle viewCullingArea = this.Parent.GetViewCullingArea(); + int num1 = endItemIndex - startItemIndex; + while (this._dummySnapPoints.Count < num1) + this._dummySnapPoints.Add(new SnapPoint("CreativeInfinitesSlot", 0, Vector2.Zero, Vector2.Zero)); + int num2 = 0; + Vector2 vector2 = this.GetDimensions().Position(); + for (int i = startItemIndex; i < endItemIndex; ++i) + { + Point center = this.GetItemSlotHitbox(startX, startY, startItemIndex, i).Center; + if (viewCullingArea.Contains(center)) + { + SnapPoint dummySnapPoint = this._dummySnapPoints[num2]; + dummySnapPoint.ThisIsAHackThatChangesTheSnapPointsInfo(Vector2.Zero, center.ToVector2() - vector2, num2); + dummySnapPoint.Calculate((UIElement) this); + ++num2; + snapPointList.Add(dummySnapPoint); + } + } + foreach (UIElement element in this.Elements) + snapPointList.AddRange((IEnumerable) element.GetSnapPoints()); + return snapPointList; + } + + public void UpdateSize() + { + int num = this.GetDimensions().ToRectangle().Width / 44; + this._itemsPerLine = num; + this.MinHeight.Set((float) (44 * (int) Math.Ceiling((double) this._itemIdsAvailableToShow.Count / (double) num)), 0.0f); + } + } +} diff --git a/GameContent/UI/Elements/UIGenProgressBar.cs b/GameContent/UI/Elements/UIGenProgressBar.cs new file mode 100644 index 0000000..7e49611 --- /dev/null +++ b/GameContent/UI/Elements/UIGenProgressBar.cs @@ -0,0 +1,124 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIGenProgressBar +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIGenProgressBar : UIElement + { + private Asset _texOuterCrimson; + private Asset _texOuterCorrupt; + private Asset _texOuterLower; + private float _visualOverallProgress; + private float _targetOverallProgress; + private float _visualCurrentProgress; + private float _targetCurrentProgress; + private int _smallBarWidth = 508; + private int _longBarWidth = 570; + + public UIGenProgressBar() + { + if (Main.netMode != 2) + { + this._texOuterCorrupt = Main.Assets.Request("Images/UI/WorldGen/Outer_Corrupt", (AssetRequestMode) 1); + this._texOuterCrimson = Main.Assets.Request("Images/UI/WorldGen/Outer_Crimson", (AssetRequestMode) 1); + this._texOuterLower = Main.Assets.Request("Images/UI/WorldGen/Outer_Lower", (AssetRequestMode) 1); + } + this.Recalculate(); + } + + public override void Recalculate() + { + this.Width.Precent = 0.0f; + this.Height.Precent = 0.0f; + this.Width.Pixels = 612f; + this.Height.Pixels = 70f; + base.Recalculate(); + } + + public void SetProgress(float overallProgress, float currentProgress) + { + this._targetCurrentProgress = currentProgress; + this._targetOverallProgress = overallProgress; + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + if (!this._texOuterCorrupt.IsLoaded || !this._texOuterCrimson.IsLoaded || !this._texOuterLower.IsLoaded) + return; + bool flag = WorldGen.crimson; + if (WorldGen.drunkWorldGen && Main.rand.Next(2) == 0) + flag = !flag; + this._visualOverallProgress = this._targetOverallProgress; + this._visualCurrentProgress = this._targetCurrentProgress; + CalculatedStyle dimensions = this.GetDimensions(); + int completedWidth1 = (int) ((double) this._visualOverallProgress * (double) this._longBarWidth); + int completedWidth2 = (int) ((double) this._visualCurrentProgress * (double) this._smallBarWidth); + Vector2 vector2 = new Vector2(dimensions.X, dimensions.Y); + Color filled = new Color(); + filled.PackedValue = flag ? 4286836223U : 4283888223U; + this.DrawFilling2(spriteBatch, vector2 + new Vector2(20f, 40f), 16, completedWidth1, this._longBarWidth, filled, Color.Lerp(filled, Color.Black, 0.5f), new Color(48, 48, 48)); + filled.PackedValue = 4290947159U; + this.DrawFilling2(spriteBatch, vector2 + new Vector2(50f, 60f), 8, completedWidth2, this._smallBarWidth, filled, Color.Lerp(filled, Color.Black, 0.5f), new Color(33, 33, 33)); + Rectangle rectangle = this.GetDimensions().ToRectangle(); + rectangle.X -= 8; + spriteBatch.Draw(flag ? this._texOuterCrimson.Value : this._texOuterCorrupt.Value, rectangle.TopLeft(), Color.White); + spriteBatch.Draw(this._texOuterLower.Value, rectangle.TopLeft() + new Vector2(44f, 60f), Color.White); + } + + private void DrawFilling( + SpriteBatch spritebatch, + Texture2D tex, + Texture2D texShadow, + Vector2 topLeft, + int completedWidth, + int totalWidth, + Color separator, + Color empty) + { + if (completedWidth % 2 != 0) + --completedWidth; + Vector2 position = topLeft + (float) completedWidth * Vector2.UnitX; + int num = completedWidth; + Rectangle rectangle = tex.Frame(); + for (; num > 0; num -= rectangle.Width) + { + if (rectangle.Width > num) + { + rectangle.X += rectangle.Width - num; + rectangle.Width = num; + } + spritebatch.Draw(tex, position, new Rectangle?(rectangle), Color.White, 0.0f, new Vector2((float) rectangle.Width, 0.0f), 1f, SpriteEffects.None, 0.0f); + position.X -= (float) rectangle.Width; + } + if (texShadow != null) + spritebatch.Draw(texShadow, topLeft, new Rectangle?(new Rectangle(0, 0, completedWidth, texShadow.Height)), Color.White); + spritebatch.Draw(TextureAssets.MagicPixel.Value, new Rectangle((int) topLeft.X + completedWidth, (int) topLeft.Y, totalWidth - completedWidth, tex.Height), new Rectangle?(new Rectangle(0, 0, 1, 1)), empty); + spritebatch.Draw(TextureAssets.MagicPixel.Value, new Rectangle((int) topLeft.X + completedWidth - 2, (int) topLeft.Y, 2, tex.Height), new Rectangle?(new Rectangle(0, 0, 1, 1)), separator); + } + + private void DrawFilling2( + SpriteBatch spritebatch, + Vector2 topLeft, + int height, + int completedWidth, + int totalWidth, + Color filled, + Color separator, + Color empty) + { + if (completedWidth % 2 != 0) + --completedWidth; + spritebatch.Draw(TextureAssets.MagicPixel.Value, new Rectangle((int) topLeft.X, (int) topLeft.Y, completedWidth, height), new Rectangle?(new Rectangle(0, 0, 1, 1)), filled); + spritebatch.Draw(TextureAssets.MagicPixel.Value, new Rectangle((int) topLeft.X + completedWidth, (int) topLeft.Y, totalWidth - completedWidth, height), new Rectangle?(new Rectangle(0, 0, 1, 1)), empty); + spritebatch.Draw(TextureAssets.MagicPixel.Value, new Rectangle((int) topLeft.X + completedWidth - 2, (int) topLeft.Y, 2, height), new Rectangle?(new Rectangle(0, 0, 1, 1)), separator); + } + } +} diff --git a/GameContent/UI/Elements/UIHairStyleButton.cs b/GameContent/UI/Elements/UIHairStyleButton.cs new file mode 100644 index 0000000..8eeda1b --- /dev/null +++ b/GameContent/UI/Elements/UIHairStyleButton.cs @@ -0,0 +1,76 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIHairStyleButton +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.Audio; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIHairStyleButton : UIImageButton + { + private readonly Player _player; + public readonly int HairStyleId; + private readonly Asset _selectedBorderTexture; + private readonly Asset _hoveredBorderTexture; + private bool _hovered; + private bool _soundedHover; + + public UIHairStyleButton(Player player, int hairStyleId) + : base(Main.Assets.Request("Images/UI/CharCreation/CategoryPanel", (AssetRequestMode) 1)) + { + this._player = player; + this.HairStyleId = hairStyleId; + this.Width = StyleDimension.FromPixels(44f); + this.Height = StyleDimension.FromPixels(44f); + this._selectedBorderTexture = Main.Assets.Request("Images/UI/CharCreation/CategoryPanelHighlight", (AssetRequestMode) 1); + this._hoveredBorderTexture = Main.Assets.Request("Images/UI/CharCreation/CategoryPanelBorder", (AssetRequestMode) 1); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + if (this._hovered) + { + if (!this._soundedHover) + SoundEngine.PlaySound(12); + this._soundedHover = true; + } + else + this._soundedHover = false; + Vector2 vector2 = new Vector2(-5f, -5f); + base.DrawSelf(spriteBatch); + if (this._player.hair == this.HairStyleId) + spriteBatch.Draw(this._selectedBorderTexture.Value, this.GetDimensions().Center() - this._selectedBorderTexture.Size() / 2f, Color.White); + if (this._hovered) + spriteBatch.Draw(this._hoveredBorderTexture.Value, this.GetDimensions().Center() - this._hoveredBorderTexture.Size() / 2f, Color.White); + int hair = this._player.hair; + this._player.hair = this.HairStyleId; + Main.PlayerRenderer.DrawPlayerHead(Main.Camera, this._player, this.GetDimensions().Center() + vector2); + this._player.hair = hair; + } + + public override void MouseDown(UIMouseEvent evt) + { + this._player.hair = this.HairStyleId; + SoundEngine.PlaySound(12); + base.MouseDown(evt); + } + + public override void MouseOver(UIMouseEvent evt) + { + base.MouseOver(evt); + this._hovered = true; + } + + public override void MouseOut(UIMouseEvent evt) + { + base.MouseOut(evt); + this._hovered = false; + } + } +} diff --git a/GameContent/UI/Elements/UIHeader.cs b/GameContent/UI/Elements/UIHeader.cs new file mode 100644 index 0000000..0a0b29c --- /dev/null +++ b/GameContent/UI/Elements/UIHeader.cs @@ -0,0 +1,50 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIHeader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Graphics; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIHeader : UIElement + { + private string _text; + + public string Text + { + get => this._text; + set + { + if (!(this._text != value)) + return; + this._text = value; + Vector2 vector2 = FontAssets.DeathText.Value.MeasureString(this.Text); + this.Width.Pixels = vector2.X; + this.Height.Pixels = vector2.Y; + this.Width.Precent = 0.0f; + this.Height.Precent = 0.0f; + this.Recalculate(); + } + } + + public UIHeader() => this.Text = ""; + + public UIHeader(string text) => this.Text = text; + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + CalculatedStyle dimensions = this.GetDimensions(); + float num = 1.2f; + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.DeathText.Value, this.Text, new Vector2(dimensions.X - num, dimensions.Y - num), Color.Black); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.DeathText.Value, this.Text, new Vector2(dimensions.X + num, dimensions.Y - num), Color.Black); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.DeathText.Value, this.Text, new Vector2(dimensions.X - num, dimensions.Y + num), Color.Black); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.DeathText.Value, this.Text, new Vector2(dimensions.X + num, dimensions.Y + num), Color.Black); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.DeathText.Value, this.Text, new Vector2(dimensions.X, dimensions.Y), Color.White); + } + } +} diff --git a/GameContent/UI/Elements/UIHorizontalSeparator.cs b/GameContent/UI/Elements/UIHorizontalSeparator.cs new file mode 100644 index 0000000..314d23e --- /dev/null +++ b/GameContent/UI/Elements/UIHorizontalSeparator.cs @@ -0,0 +1,36 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIHorizontalSeparator +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIHorizontalSeparator : UIElement + { + private Asset _texture; + public Color Color; + public int EdgeWidth; + + public UIHorizontalSeparator(int EdgeWidth = 2, bool highlightSideUp = true) + { + this.Color = Color.White; + this._texture = !highlightSideUp ? Main.Assets.Request("Images/UI/CharCreation/Separator2", (AssetRequestMode) 1) : Main.Assets.Request("Images/UI/CharCreation/Separator1", (AssetRequestMode) 1); + this.Width.Set((float) this._texture.Width(), 0.0f); + this.Height.Set((float) this._texture.Height(), 0.0f); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + CalculatedStyle dimensions = this.GetDimensions(); + Utils.DrawPanel(this._texture.Value, this.EdgeWidth, 0, spriteBatch, dimensions.Position(), dimensions.Width, this.Color); + } + + public override bool ContainsPoint(Vector2 point) => false; + } +} diff --git a/GameContent/UI/Elements/UIImage.cs b/GameContent/UI/Elements/UIImage.cs new file mode 100644 index 0000000..138c6c9 --- /dev/null +++ b/GameContent/UI/Elements/UIImage.cs @@ -0,0 +1,55 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIImage +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIImage : UIElement + { + private Asset _texture; + public float ImageScale = 1f; + public float Rotation; + public bool ScaleToFit; + public Color Color = Color.White; + public Vector2 NormalizedOrigin = Vector2.Zero; + public bool RemoveFloatingPointsFromDrawPosition; + + public UIImage(Asset texture) + { + this._texture = texture; + this.Width.Set((float) this._texture.Width(), 0.0f); + this.Height.Set((float) this._texture.Height(), 0.0f); + } + + public void SetImage(Asset texture) + { + this._texture = texture; + this.Width.Set((float) this._texture.Width(), 0.0f); + this.Height.Set((float) this._texture.Height(), 0.0f); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + CalculatedStyle dimensions = this.GetDimensions(); + if (this.ScaleToFit) + { + spriteBatch.Draw(this._texture.Value, dimensions.ToRectangle(), this.Color); + } + else + { + Vector2 vector2_1 = this._texture.Value.Size(); + Vector2 vector2_2 = dimensions.Position() + vector2_1 * (1f - this.ImageScale) / 2f + vector2_1 * this.NormalizedOrigin; + if (this.RemoveFloatingPointsFromDrawPosition) + vector2_2 = vector2_2.Floor(); + spriteBatch.Draw(this._texture.Value, vector2_2, new Rectangle?(), this.Color, this.Rotation, vector2_1 * this.NormalizedOrigin, this.ImageScale, SpriteEffects.None, 0.0f); + } + } + } +} diff --git a/GameContent/UI/Elements/UIImageButton.cs b/GameContent/UI/Elements/UIImageButton.cs new file mode 100644 index 0000000..5ef509b --- /dev/null +++ b/GameContent/UI/Elements/UIImageButton.cs @@ -0,0 +1,61 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIImageButton +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.Audio; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIImageButton : UIElement + { + private Asset _texture; + private float _visibilityActive = 1f; + private float _visibilityInactive = 0.4f; + private Asset _borderTexture; + + public UIImageButton(Asset texture) + { + this._texture = texture; + this.Width.Set((float) this._texture.Width(), 0.0f); + this.Height.Set((float) this._texture.Height(), 0.0f); + } + + public void SetHoverImage(Asset texture) => this._borderTexture = texture; + + public void SetImage(Asset texture) + { + this._texture = texture; + this.Width.Set((float) this._texture.Width(), 0.0f); + this.Height.Set((float) this._texture.Height(), 0.0f); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + CalculatedStyle dimensions = this.GetDimensions(); + spriteBatch.Draw(this._texture.Value, dimensions.Position(), Color.White * (this.IsMouseHovering ? this._visibilityActive : this._visibilityInactive)); + if (this._borderTexture == null || !this.IsMouseHovering) + return; + spriteBatch.Draw(this._borderTexture.Value, dimensions.Position(), Color.White); + } + + public override void MouseOver(UIMouseEvent evt) + { + base.MouseOver(evt); + SoundEngine.PlaySound(12); + } + + public override void MouseOut(UIMouseEvent evt) => base.MouseOut(evt); + + public void SetVisibility(float whenActive, float whenInactive) + { + this._visibilityActive = MathHelper.Clamp(whenActive, 0.0f, 1f); + this._visibilityInactive = MathHelper.Clamp(whenInactive, 0.0f, 1f); + } + } +} diff --git a/GameContent/UI/Elements/UIImageFramed.cs b/GameContent/UI/Elements/UIImageFramed.cs new file mode 100644 index 0000000..4334c1d --- /dev/null +++ b/GameContent/UI/Elements/UIImageFramed.cs @@ -0,0 +1,62 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIImageFramed +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIImageFramed : UIElement, IColorable + { + private Asset _texture; + private Rectangle _frame; + + public Color Color { get; set; } + + public UIImageFramed(Asset texture, Rectangle frame) + { + this._texture = texture; + this._frame = frame; + this.Width.Set((float) this._frame.Width, 0.0f); + this.Height.Set((float) this._frame.Height, 0.0f); + this.Color = Color.White; + } + + public void SetImage(Asset texture, Rectangle frame) + { + this._texture = texture; + this._frame = frame; + this.Width.Set((float) this._frame.Width, 0.0f); + this.Height.Set((float) this._frame.Height, 0.0f); + } + + public void SetFrame(Rectangle frame) + { + this._frame = frame; + this.Width.Set((float) this._frame.Width, 0.0f); + this.Height.Set((float) this._frame.Height, 0.0f); + } + + public void SetFrame( + int frameCountHorizontal, + int frameCountVertical, + int frameX, + int frameY, + int sizeOffsetX, + int sizeOffsetY) + { + this.SetFrame(this._texture.Frame(frameCountHorizontal, frameCountVertical, frameX, frameY).OffsetSize(sizeOffsetX, sizeOffsetY)); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + CalculatedStyle dimensions = this.GetDimensions(); + spriteBatch.Draw(this._texture.Value, dimensions.Position(), new Rectangle?(this._frame), this.Color); + } + } +} diff --git a/GameContent/UI/Elements/UIItemIcon.cs b/GameContent/UI/Elements/UIItemIcon.cs new file mode 100644 index 0000000..e2853db --- /dev/null +++ b/GameContent/UI/Elements/UIItemIcon.cs @@ -0,0 +1,32 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIItemIcon +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIItemIcon : UIElement + { + private Item _item; + private bool _blackedOut; + + public UIItemIcon(Item item, bool blackedOut) + { + this._item = item; + this.Width.Set(32f, 0.0f); + this.Height.Set(32f, 0.0f); + this._blackedOut = blackedOut; + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + CalculatedStyle dimensions = this.GetDimensions(); + Main.DrawItemIcon(spriteBatch, this._item, dimensions.Center(), this._blackedOut ? Color.Black : Color.White, 32f); + } + } +} diff --git a/GameContent/UI/Elements/UIItemSlot.cs b/GameContent/UI/Elements/UIItemSlot.cs new file mode 100644 index 0000000..aa5aa88 --- /dev/null +++ b/GameContent/UI/Elements/UIItemSlot.cs @@ -0,0 +1,49 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIItemSlot +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIItemSlot : UIElement + { + private Item[] _itemArray; + private int _itemIndex; + private int _itemSlotContext; + + public UIItemSlot(Item[] itemArray, int itemIndex, int itemSlotContext) + { + this._itemArray = itemArray; + this._itemIndex = itemIndex; + this._itemSlotContext = itemSlotContext; + this.Width = new StyleDimension(48f, 0.0f); + this.Height = new StyleDimension(48f, 0.0f); + } + + private void HandleItemSlotLogic() + { + if (!this.IsMouseHovering) + return; + Main.LocalPlayer.mouseInterface = true; + Item inv = this._itemArray[this._itemIndex]; + ItemSlot.OverrideHover(ref inv, this._itemSlotContext); + ItemSlot.LeftClick(ref inv, this._itemSlotContext); + ItemSlot.RightClick(ref inv, this._itemSlotContext); + ItemSlot.MouseHover(ref inv, this._itemSlotContext); + this._itemArray[this._itemIndex] = inv; + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + this.HandleItemSlotLogic(); + Item inv = this._itemArray[this._itemIndex]; + Vector2 position = this.GetDimensions().Center() + new Vector2(52f, 52f) * -0.5f * Main.inventoryScale; + ItemSlot.Draw(spriteBatch, ref inv, this._itemSlotContext, position); + } + } +} diff --git a/GameContent/UI/Elements/UIKeybindingListItem.cs b/GameContent/UI/Elements/UIKeybindingListItem.cs new file mode 100644 index 0000000..c7aa59b --- /dev/null +++ b/GameContent/UI/Elements/UIKeybindingListItem.cs @@ -0,0 +1,204 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIKeybindingListItem +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; +using Terraria.GameContent.UI.Chat; +using Terraria.GameInput; +using Terraria.Localization; +using Terraria.UI; +using Terraria.UI.Chat; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIKeybindingListItem : UIElement + { + private InputMode _inputmode; + private Color _color; + private string _keybind; + + public UIKeybindingListItem(string bind, InputMode mode, Color color) + { + this._keybind = bind; + this._inputmode = mode; + this._color = color; + this.OnClick += new UIElement.MouseEvent(this.OnClickMethod); + } + + public void OnClickMethod(UIMouseEvent evt, UIElement listeningElement) + { + if (!(PlayerInput.ListeningTrigger != this._keybind)) + return; + if (PlayerInput.CurrentProfile.AllowEditting) + PlayerInput.ListenFor(this._keybind, this._inputmode); + else + PlayerInput.ListenFor((string) null, this._inputmode); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + float num1 = 6f; + base.DrawSelf(spriteBatch); + CalculatedStyle dimensions = this.GetDimensions(); + float num2 = dimensions.Width + 1f; + Vector2 vector2 = new Vector2(dimensions.X, dimensions.Y); + bool flag = PlayerInput.ListeningTrigger == this._keybind; + Vector2 baseScale = new Vector2(0.8f); + Color baseColor = Color.Lerp(flag ? Color.Gold : (this.IsMouseHovering ? Color.White : Color.Silver), Color.White, this.IsMouseHovering ? 0.5f : 0.0f); + Color color = this.IsMouseHovering ? this._color : this._color.MultiplyRGBA(new Color(180, 180, 180)); + Vector2 position = vector2; + Utils.DrawSettingsPanel(spriteBatch, position, num2, color); + position.X += 8f; + position.Y += 2f + num1; + ChatManager.DrawColorCodedStringWithShadow(spriteBatch, FontAssets.ItemStack.Value, this.GetFriendlyName(), position, baseColor, 0.0f, Vector2.Zero, baseScale, num2); + position.X -= 17f; + string text = this.GenInput(PlayerInput.CurrentProfile.InputModes[this._inputmode].KeyStatus[this._keybind]); + if (string.IsNullOrEmpty(text)) + { + text = Lang.menu[195].Value; + if (!flag) + baseColor = new Color(80, 80, 80); + } + Vector2 stringSize = ChatManager.GetStringSize(FontAssets.ItemStack.Value, text, baseScale); + position = new Vector2((float) ((double) dimensions.X + (double) dimensions.Width - (double) stringSize.X - 10.0), dimensions.Y + 2f + num1); + if (this._inputmode == InputMode.XBoxGamepad || this._inputmode == InputMode.XBoxGamepadUI) + position += new Vector2(0.0f, -3f); + GlyphTagHandler.GlyphsScale = 0.85f; + ChatManager.DrawColorCodedStringWithShadow(spriteBatch, FontAssets.ItemStack.Value, text, position, baseColor, 0.0f, Vector2.Zero, baseScale, num2); + GlyphTagHandler.GlyphsScale = 1f; + } + + private string GenInput(List list) + { + if (list.Count == 0) + return ""; + string str = ""; + switch (this._inputmode) + { + case InputMode.Keyboard: + case InputMode.KeyboardUI: + case InputMode.Mouse: + str = list[0]; + for (int index = 1; index < list.Count; ++index) + str = str + "/" + list[index]; + break; + case InputMode.XBoxGamepad: + case InputMode.XBoxGamepadUI: + str = GlyphTagHandler.GenerateTag(list[0]); + for (int index = 1; index < list.Count; ++index) + str = str + "/" + GlyphTagHandler.GenerateTag(list[index]); + break; + } + return str; + } + + private string GetFriendlyName() + { + switch (this._keybind) + { + case "Down": + return Lang.menu[149].Value; + case "DpadRadial1": + return Lang.menu[186].Value; + case "DpadRadial2": + return Lang.menu[187].Value; + case "DpadRadial3": + return Lang.menu[188].Value; + case "DpadRadial4": + return Lang.menu[189].Value; + case "DpadSnap1": + return Lang.menu[191].Value; + case "DpadSnap2": + return Lang.menu[192].Value; + case "DpadSnap3": + return Lang.menu[193].Value; + case "DpadSnap4": + return Lang.menu[194].Value; + case "Grapple": + return Lang.menu[155].Value; + case "Hotbar1": + return Lang.menu[176].Value; + case "Hotbar10": + return Lang.menu[185].Value; + case "Hotbar2": + return Lang.menu[177].Value; + case "Hotbar3": + return Lang.menu[178].Value; + case "Hotbar4": + return Lang.menu[179].Value; + case "Hotbar5": + return Lang.menu[180].Value; + case "Hotbar6": + return Lang.menu[181].Value; + case "Hotbar7": + return Lang.menu[182].Value; + case "Hotbar8": + return Lang.menu[183].Value; + case "Hotbar9": + return Lang.menu[184].Value; + case "HotbarMinus": + return Lang.menu[174].Value; + case "HotbarPlus": + return Lang.menu[175].Value; + case "Inventory": + return Lang.menu[154].Value; + case "Jump": + return Lang.menu[152].Value; + case "Left": + return Lang.menu[150].Value; + case "LockOn": + return Lang.menu[231].Value; + case "MapAlphaDown": + return Lang.menu[170].Value; + case "MapAlphaUp": + return Lang.menu[171].Value; + case "MapFull": + return Lang.menu[173].Value; + case "MapStyle": + return Lang.menu[172].Value; + case "MapZoomIn": + return Lang.menu[168].Value; + case "MapZoomOut": + return Lang.menu[169].Value; + case "MouseLeft": + return Lang.menu[162].Value; + case "MouseRight": + return Lang.menu[163].Value; + case "QuickBuff": + return Lang.menu[157].Value; + case "QuickHeal": + return Lang.menu[159].Value; + case "QuickMana": + return Lang.menu[156].Value; + case "QuickMount": + return Lang.menu[158].Value; + case "RadialHotbar": + return Lang.menu[190].Value; + case "RadialQuickbar": + return Lang.menu[244].Value; + case "Right": + return Lang.menu[151].Value; + case "SmartCursor": + return Lang.menu[161].Value; + case "SmartSelect": + return Lang.menu[160].Value; + case "Throw": + return Lang.menu[153].Value; + case "ToggleCreativeMenu": + return Language.GetTextValue("UI.ToggleCreativeMenu"); + case "Up": + return Lang.menu[148].Value; + case "ViewZoomIn": + return Language.GetTextValue("UI.ZoomIn"); + case "ViewZoomOut": + return Language.GetTextValue("UI.ZoomOut"); + default: + return this._keybind; + } + } + } +} diff --git a/GameContent/UI/Elements/UIKeybindingSimpleListItem.cs b/GameContent/UI/Elements/UIKeybindingSimpleListItem.cs new file mode 100644 index 0000000..5debbd0 --- /dev/null +++ b/GameContent/UI/Elements/UIKeybindingSimpleListItem.cs @@ -0,0 +1,46 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIKeybindingSimpleListItem +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria.UI; +using Terraria.UI.Chat; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIKeybindingSimpleListItem : UIElement + { + private Color _color; + private Func _GetTextFunction; + + public UIKeybindingSimpleListItem(Func getText, Color color) + { + this._color = color; + this._GetTextFunction = getText != null ? getText : (Func) (() => "???"); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + float num1 = 6f; + base.DrawSelf(spriteBatch); + CalculatedStyle dimensions = this.GetDimensions(); + float num2 = dimensions.Width + 1f; + Vector2 vector2 = new Vector2(dimensions.X, dimensions.Y); + Vector2 baseScale = new Vector2(0.8f); + Color baseColor = Color.Lerp(this.IsMouseHovering ? Color.White : Color.Silver, Color.White, this.IsMouseHovering ? 0.5f : 0.0f); + Color color = this.IsMouseHovering ? this._color : this._color.MultiplyRGBA(new Color(180, 180, 180)); + Vector2 position = vector2; + Utils.DrawSettings2Panel(spriteBatch, position, num2, color); + position.X += 8f; + position.Y += 2f + num1; + string text = this._GetTextFunction(); + Vector2 stringSize = ChatManager.GetStringSize(FontAssets.ItemStack.Value, text, baseScale); + position.X = (float) ((double) dimensions.X + (double) dimensions.Width / 2.0 - (double) stringSize.X / 2.0); + ChatManager.DrawColorCodedStringWithShadow(spriteBatch, FontAssets.ItemStack.Value, text, position, baseColor, 0.0f, Vector2.Zero, baseScale, num2); + } + } +} diff --git a/GameContent/UI/Elements/UIKeybindingSliderItem.cs b/GameContent/UI/Elements/UIKeybindingSliderItem.cs new file mode 100644 index 0000000..dc25c4f --- /dev/null +++ b/GameContent/UI/Elements/UIKeybindingSliderItem.cs @@ -0,0 +1,90 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIKeybindingSliderItem +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.GameInput; +using Terraria.UI; +using Terraria.UI.Chat; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIKeybindingSliderItem : UIElement + { + private Color _color; + private Func _TextDisplayFunction; + private Func _GetStatusFunction; + private Action _SlideKeyboardAction; + private Action _SlideGamepadAction; + private int _sliderIDInPage; + private Asset _toggleTexture; + + public UIKeybindingSliderItem( + Func getText, + Func getStatus, + Action setStatusKeyboard, + Action setStatusGamepad, + int sliderIDInPage, + Color color) + { + this._color = color; + this._toggleTexture = Main.Assets.Request("Images/UI/Settings_Toggle", (AssetRequestMode) 1); + this._TextDisplayFunction = getText != null ? getText : (Func) (() => "???"); + this._GetStatusFunction = getStatus != null ? getStatus : (Func) (() => 0.0f); + this._SlideKeyboardAction = setStatusKeyboard != null ? setStatusKeyboard : (Action) (s => { }); + this._SlideGamepadAction = setStatusGamepad != null ? setStatusGamepad : (Action) (() => { }); + this._sliderIDInPage = sliderIDInPage; + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + float num1 = 6f; + base.DrawSelf(spriteBatch); + int lockState = 0; + IngameOptions.rightHover = -1; + if (!Main.mouseLeft) + IngameOptions.rightLock = -1; + if (IngameOptions.rightLock == this._sliderIDInPage) + lockState = 1; + else if (IngameOptions.rightLock != -1) + lockState = 2; + CalculatedStyle dimensions = this.GetDimensions(); + float num2 = dimensions.Width + 1f; + Vector2 vector2 = new Vector2(dimensions.X, dimensions.Y); + bool flag = this.IsMouseHovering; + if (lockState == 1) + flag = true; + if (lockState == 2) + flag = false; + Vector2 baseScale = new Vector2(0.8f); + Color baseColor = Color.Lerp(false ? Color.Gold : (flag ? Color.White : Color.Silver), Color.White, flag ? 0.5f : 0.0f); + Color color = flag ? this._color : this._color.MultiplyRGBA(new Color(180, 180, 180)); + Vector2 position = vector2; + Utils.DrawSettingsPanel(spriteBatch, position, num2, color); + position.X += 8f; + position.Y += 2f + num1; + ChatManager.DrawColorCodedStringWithShadow(spriteBatch, FontAssets.ItemStack.Value, this._TextDisplayFunction(), position, baseColor, 0.0f, Vector2.Zero, baseScale, num2); + position.X -= 17f; + TextureAssets.ColorBar.Frame(); + position = new Vector2((float) ((double) dimensions.X + (double) dimensions.Width - 10.0), dimensions.Y + 10f + num1); + IngameOptions.valuePosition = position; + float num3 = IngameOptions.DrawValueBar(spriteBatch, 1f, this._GetStatusFunction(), lockState); + if (IngameOptions.inBar || IngameOptions.rightLock == this._sliderIDInPage) + { + IngameOptions.rightHover = this._sliderIDInPage; + if (PlayerInput.Triggers.Current.MouseLeft && PlayerInput.CurrentProfile.AllowEditting && !PlayerInput.UsingGamepad && IngameOptions.rightLock == this._sliderIDInPage) + this._SlideKeyboardAction(num3); + } + if (IngameOptions.rightHover != -1 && IngameOptions.rightLock == -1) + IngameOptions.rightLock = IngameOptions.rightHover; + if (!this.IsMouseHovering || !PlayerInput.CurrentProfile.AllowEditting) + return; + this._SlideGamepadAction(); + } + } +} diff --git a/GameContent/UI/Elements/UIKeybindingToggleListItem.cs b/GameContent/UI/Elements/UIKeybindingToggleListItem.cs new file mode 100644 index 0000000..ee8041c --- /dev/null +++ b/GameContent/UI/Elements/UIKeybindingToggleListItem.cs @@ -0,0 +1,53 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIKeybindingToggleListItem +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.UI; +using Terraria.UI.Chat; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIKeybindingToggleListItem : UIElement + { + private Color _color; + private Func _TextDisplayFunction; + private Func _IsOnFunction; + private Asset _toggleTexture; + + public UIKeybindingToggleListItem(Func getText, Func getStatus, Color color) + { + this._color = color; + this._toggleTexture = Main.Assets.Request("Images/UI/Settings_Toggle", (AssetRequestMode) 1); + this._TextDisplayFunction = getText != null ? getText : (Func) (() => "???"); + this._IsOnFunction = getStatus != null ? getStatus : (Func) (() => false); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + float num1 = 6f; + base.DrawSelf(spriteBatch); + CalculatedStyle dimensions = this.GetDimensions(); + float num2 = dimensions.Width + 1f; + Vector2 vector2_1 = new Vector2(dimensions.X, dimensions.Y); + Vector2 baseScale = new Vector2(0.8f); + Color baseColor = Color.Lerp(false ? Color.Gold : (this.IsMouseHovering ? Color.White : Color.Silver), Color.White, this.IsMouseHovering ? 0.5f : 0.0f); + Color color = this.IsMouseHovering ? this._color : this._color.MultiplyRGBA(new Color(180, 180, 180)); + Vector2 position = vector2_1; + Utils.DrawSettingsPanel(spriteBatch, position, num2, color); + position.X += 8f; + position.Y += 2f + num1; + ChatManager.DrawColorCodedStringWithShadow(spriteBatch, FontAssets.ItemStack.Value, this._TextDisplayFunction(), position, baseColor, 0.0f, Vector2.Zero, baseScale, num2); + position.X -= 17f; + Rectangle rectangle = new Rectangle(this._IsOnFunction() ? (this._toggleTexture.Width() - 2) / 2 + 2 : 0, 0, (this._toggleTexture.Width() - 2) / 2, this._toggleTexture.Height()); + Vector2 vector2_2 = new Vector2((float) rectangle.Width, 0.0f); + position = new Vector2((float) ((double) dimensions.X + (double) dimensions.Width - (double) vector2_2.X - 10.0), dimensions.Y + 2f + num1); + spriteBatch.Draw(this._toggleTexture.Value, position, new Rectangle?(rectangle), Color.White, 0.0f, Vector2.Zero, Vector2.One, SpriteEffects.None, 0.0f); + } + } +} diff --git a/GameContent/UI/Elements/UIList.cs b/GameContent/UI/Elements/UIList.cs new file mode 100644 index 0000000..8e6ae90 --- /dev/null +++ b/GameContent/UI/Elements/UIList.cs @@ -0,0 +1,168 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIList +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections; +using System.Collections.Generic; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIList : UIElement, IEnumerable, IEnumerable + { + protected List _items = new List(); + protected UIScrollbar _scrollbar; + private UIElement _innerList = (UIElement) new UIList.UIInnerList(); + private float _innerListHeight; + public float ListPadding = 5f; + public Action> ManualSortMethod; + + public int Count => this._items.Count; + + public UIList() + { + this._innerList.OverflowHidden = false; + this._innerList.Width.Set(0.0f, 1f); + this._innerList.Height.Set(0.0f, 1f); + this.OverflowHidden = true; + this.Append(this._innerList); + } + + public float GetTotalHeight() => this._innerListHeight; + + public void Goto(UIList.ElementSearchMethod searchMethod) + { + for (int index = 0; index < this._items.Count; ++index) + { + if (searchMethod(this._items[index])) + { + this._scrollbar.ViewPosition = this._items[index].Top.Pixels; + break; + } + } + } + + public virtual void Add(UIElement item) + { + this._items.Add(item); + this._innerList.Append(item); + this.UpdateOrder(); + this._innerList.Recalculate(); + } + + public virtual bool Remove(UIElement item) + { + this._innerList.RemoveChild(item); + this.UpdateOrder(); + return this._items.Remove(item); + } + + public virtual void Clear() + { + this._innerList.RemoveAllChildren(); + this._items.Clear(); + } + + public override void Recalculate() + { + base.Recalculate(); + this.UpdateScrollbar(); + } + + public override void ScrollWheel(UIScrollWheelEvent evt) + { + base.ScrollWheel(evt); + if (this._scrollbar == null) + return; + this._scrollbar.ViewPosition -= (float) evt.ScrollWheelValue; + } + + public override void RecalculateChildren() + { + base.RecalculateChildren(); + float pixels = 0.0f; + for (int index = 0; index < this._items.Count; ++index) + { + float num = this._items.Count == 1 ? 0.0f : this.ListPadding; + this._items[index].Top.Set(pixels, 0.0f); + this._items[index].Recalculate(); + CalculatedStyle outerDimensions = this._items[index].GetOuterDimensions(); + pixels += outerDimensions.Height + num; + } + this._innerListHeight = pixels; + } + + private void UpdateScrollbar() + { + if (this._scrollbar == null) + return; + this._scrollbar.SetView(this.GetInnerDimensions().Height, this._innerListHeight); + } + + public void SetScrollbar(UIScrollbar scrollbar) + { + this._scrollbar = scrollbar; + this.UpdateScrollbar(); + } + + public void UpdateOrder() + { + if (this.ManualSortMethod != null) + this.ManualSortMethod(this._items); + else + this._items.Sort(new Comparison(this.SortMethod)); + this.UpdateScrollbar(); + } + + public int SortMethod(UIElement item1, UIElement item2) => item1.CompareTo((object) item2); + + public override List GetSnapPoints() + { + List snapPointList = new List(); + SnapPoint point; + if (this.GetSnapPoint(out point)) + snapPointList.Add(point); + foreach (UIElement uiElement in this._items) + snapPointList.AddRange((IEnumerable) uiElement.GetSnapPoints()); + return snapPointList; + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + if (this._scrollbar != null) + this._innerList.Top.Set(-this._scrollbar.GetValue(), 0.0f); + this.Recalculate(); + } + + public IEnumerator GetEnumerator() => ((IEnumerable) this._items).GetEnumerator(); + + IEnumerator IEnumerable.GetEnumerator() => (IEnumerator) ((IEnumerable) this._items).GetEnumerator(); + + public delegate bool ElementSearchMethod(UIElement element); + + private class UIInnerList : UIElement + { + public override bool ContainsPoint(Vector2 point) => true; + + protected override void DrawChildren(SpriteBatch spriteBatch) + { + Vector2 position1 = this.Parent.GetDimensions().Position(); + Vector2 dimensions1 = new Vector2(this.Parent.GetDimensions().Width, this.Parent.GetDimensions().Height); + foreach (UIElement element in this.Elements) + { + Vector2 position2 = element.GetDimensions().Position(); + Vector2 dimensions2 = new Vector2(element.GetDimensions().Width, element.GetDimensions().Height); + if (Collision.CheckAABBvAABBCollision(position1, dimensions1, position2, dimensions2)) + element.Draw(spriteBatch); + } + } + + public override Rectangle GetViewCullingArea() => this.Parent.GetDimensions().ToRectangle(); + } + } +} diff --git a/GameContent/UI/Elements/UIPanel.cs b/GameContent/UI/Elements/UIPanel.cs new file mode 100644 index 0000000..0a35db4 --- /dev/null +++ b/GameContent/UI/Elements/UIPanel.cs @@ -0,0 +1,74 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIPanel +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIPanel : UIElement + { + private int _cornerSize = 12; + private int _barSize = 4; + private Asset _borderTexture; + private Asset _backgroundTexture; + public Color BorderColor = Color.Black; + public Color BackgroundColor = new Color(63, 82, 151) * 0.7f; + + public UIPanel() + { + if (this._borderTexture == null) + this._borderTexture = Main.Assets.Request("Images/UI/PanelBorder", (AssetRequestMode) 1); + if (this._backgroundTexture == null) + this._backgroundTexture = Main.Assets.Request("Images/UI/PanelBackground", (AssetRequestMode) 1); + this.SetPadding((float) this._cornerSize); + } + + public UIPanel( + Asset customBackground, + Asset customborder, + int customCornerSize = 12, + int customBarSize = 4) + { + if (this._borderTexture == null) + this._borderTexture = customborder; + if (this._backgroundTexture == null) + this._backgroundTexture = customBackground; + this._cornerSize = customCornerSize; + this._barSize = customBarSize; + this.SetPadding((float) this._cornerSize); + } + + private void DrawPanel(SpriteBatch spriteBatch, Texture2D texture, Color color) + { + CalculatedStyle dimensions = this.GetDimensions(); + Point point1 = new Point((int) dimensions.X, (int) dimensions.Y); + Point point2 = new Point(point1.X + (int) dimensions.Width - this._cornerSize, point1.Y + (int) dimensions.Height - this._cornerSize); + int width = point2.X - point1.X - this._cornerSize; + int height = point2.Y - point1.Y - this._cornerSize; + spriteBatch.Draw(texture, new Rectangle(point1.X, point1.Y, this._cornerSize, this._cornerSize), new Rectangle?(new Rectangle(0, 0, this._cornerSize, this._cornerSize)), color); + spriteBatch.Draw(texture, new Rectangle(point2.X, point1.Y, this._cornerSize, this._cornerSize), new Rectangle?(new Rectangle(this._cornerSize + this._barSize, 0, this._cornerSize, this._cornerSize)), color); + spriteBatch.Draw(texture, new Rectangle(point1.X, point2.Y, this._cornerSize, this._cornerSize), new Rectangle?(new Rectangle(0, this._cornerSize + this._barSize, this._cornerSize, this._cornerSize)), color); + spriteBatch.Draw(texture, new Rectangle(point2.X, point2.Y, this._cornerSize, this._cornerSize), new Rectangle?(new Rectangle(this._cornerSize + this._barSize, this._cornerSize + this._barSize, this._cornerSize, this._cornerSize)), color); + spriteBatch.Draw(texture, new Rectangle(point1.X + this._cornerSize, point1.Y, width, this._cornerSize), new Rectangle?(new Rectangle(this._cornerSize, 0, this._barSize, this._cornerSize)), color); + spriteBatch.Draw(texture, new Rectangle(point1.X + this._cornerSize, point2.Y, width, this._cornerSize), new Rectangle?(new Rectangle(this._cornerSize, this._cornerSize + this._barSize, this._barSize, this._cornerSize)), color); + spriteBatch.Draw(texture, new Rectangle(point1.X, point1.Y + this._cornerSize, this._cornerSize, height), new Rectangle?(new Rectangle(0, this._cornerSize, this._cornerSize, this._barSize)), color); + spriteBatch.Draw(texture, new Rectangle(point2.X, point1.Y + this._cornerSize, this._cornerSize, height), new Rectangle?(new Rectangle(this._cornerSize + this._barSize, this._cornerSize, this._cornerSize, this._barSize)), color); + spriteBatch.Draw(texture, new Rectangle(point1.X + this._cornerSize, point1.Y + this._cornerSize, width, height), new Rectangle?(new Rectangle(this._cornerSize, this._cornerSize, this._barSize, this._barSize)), color); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + if (this._backgroundTexture != null) + this.DrawPanel(spriteBatch, this._backgroundTexture.Value, this.BackgroundColor); + if (this._borderTexture == null) + return; + this.DrawPanel(spriteBatch, this._borderTexture.Value, this.BorderColor); + } + } +} diff --git a/GameContent/UI/Elements/UIParticleLayer.cs b/GameContent/UI/Elements/UIParticleLayer.cs new file mode 100644 index 0000000..2452b0b --- /dev/null +++ b/GameContent/UI/Elements/UIParticleLayer.cs @@ -0,0 +1,40 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIParticleLayer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.Graphics.Renderers; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIParticleLayer : UIElement + { + public ParticleRenderer ParticleSystem; + public Vector2 AnchorPositionOffsetByPercents; + public Vector2 AnchorPositionOffsetByPixels; + + public UIParticleLayer() + { + this.IgnoresMouseInteraction = true; + this.ParticleSystem = new ParticleRenderer(); + this.OnUpdate += new UIElement.ElementEvent(this.ParticleSystemUpdate); + } + + private void ParticleSystemUpdate(UIElement affectedElement) => this.ParticleSystem.Update(); + + public override void Recalculate() + { + base.Recalculate(); + Rectangle rectangle = this.GetDimensions().ToRectangle(); + this.ParticleSystem.Settings.AnchorPosition = rectangle.TopLeft() + this.AnchorPositionOffsetByPercents * rectangle.Size() + this.AnchorPositionOffsetByPixels; + } + + protected override void DrawSelf(SpriteBatch spriteBatch) => this.ParticleSystem.Draw(spriteBatch); + + public void AddParticle(IParticle particle) => this.ParticleSystem.Add(particle); + } +} diff --git a/GameContent/UI/Elements/UIProgressBar.cs b/GameContent/UI/Elements/UIProgressBar.cs new file mode 100644 index 0000000..0c051f2 --- /dev/null +++ b/GameContent/UI/Elements/UIProgressBar.cs @@ -0,0 +1,50 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIProgressBar +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIProgressBar : UIElement + { + private UIProgressBar.UIInnerProgressBar _progressBar = new UIProgressBar.UIInnerProgressBar(); + private float _visualProgress; + private float _targetProgress; + + public UIProgressBar() + { + this._progressBar.Height.Precent = 1f; + this._progressBar.Recalculate(); + this.Append((UIElement) this._progressBar); + } + + public void SetProgress(float value) + { + this._targetProgress = value; + if ((double) value >= (double) this._visualProgress) + return; + this._visualProgress = value; + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + this._visualProgress = (float) ((double) this._visualProgress * 0.949999988079071 + 0.0500000007450581 * (double) this._targetProgress); + this._progressBar.Width.Precent = this._visualProgress; + this._progressBar.Recalculate(); + } + + private class UIInnerProgressBar : UIElement + { + protected override void DrawSelf(SpriteBatch spriteBatch) + { + CalculatedStyle dimensions = this.GetDimensions(); + spriteBatch.Draw(TextureAssets.MagicPixel.Value, new Vector2(dimensions.X, dimensions.Y), new Rectangle?(), Color.Blue, 0.0f, Vector2.Zero, new Vector2(dimensions.Width, dimensions.Height / 1000f), SpriteEffects.None, 0.0f); + } + } + } +} diff --git a/GameContent/UI/Elements/UIResourcePack.cs b/GameContent/UI/Elements/UIResourcePack.cs new file mode 100644 index 0000000..2635b82 --- /dev/null +++ b/GameContent/UI/Elements/UIResourcePack.cs @@ -0,0 +1,119 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIResourcePack +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.IO; +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIResourcePack : UIPanel + { + private const int PANEL_PADDING = 5; + private const int ICON_SIZE = 64; + private const int ICON_BORDER_PADDING = 4; + private const int HEIGHT_FLUFF = 10; + private const float HEIGHT = 102f; + private const float MIN_WIDTH = 102f; + private static readonly Color DefaultBackgroundColor = new Color(26, 40, 89) * 0.8f; + private static readonly Color DefaultBorderColor = new Color(13, 20, 44) * 0.8f; + private static readonly Color HoverBackgroundColor = new Color(46, 60, 119); + private static readonly Color HoverBorderColor = new Color(20, 30, 56); + public readonly ResourcePack ResourcePack; + private readonly Asset _iconBorderTexture; + + public int Order { get; set; } + + public UIElement ContentPanel { get; private set; } + + public UIResourcePack(ResourcePack pack, int order) + { + this.ResourcePack = pack; + this.Order = order; + this.BackgroundColor = UIResourcePack.DefaultBackgroundColor; + this.BorderColor = UIResourcePack.DefaultBorderColor; + this.Height = StyleDimension.FromPixels(102f); + this.MinHeight = this.Height; + this.MaxHeight = this.Height; + this.MinWidth = StyleDimension.FromPixels(102f); + this.Width = StyleDimension.FromPercent(1f); + this.SetPadding(5f); + this._iconBorderTexture = Main.Assets.Request("Images/UI/Achievement_Borders", (AssetRequestMode) 1); + this.OverflowHidden = true; + this.BuildChildren(); + } + + private void BuildChildren() + { + StyleDimension styleDimension1 = StyleDimension.FromPixels(77f); + StyleDimension styleDimension2 = StyleDimension.FromPixels(4f); + UIText uiText1 = new UIText(this.ResourcePack.Name); + uiText1.Left = styleDimension1; + uiText1.Top = styleDimension2; + UIText uiText2 = uiText1; + this.Append((UIElement) uiText2); + styleDimension2.Pixels += uiText2.GetOuterDimensions().Height + 6f; + UIText uiText3 = new UIText(Language.GetTextValue("UI.Author", (object) this.ResourcePack.Author), 0.7f); + uiText3.Left = styleDimension1; + uiText3.Top = styleDimension2; + UIText uiText4 = uiText3; + this.Append((UIElement) uiText4); + styleDimension2.Pixels += uiText4.GetOuterDimensions().Height + 10f; + Asset asset = Main.Assets.Request("Images/UI/Divider", (AssetRequestMode) 1); + UIImage uiImage1 = new UIImage(asset); + uiImage1.Left = StyleDimension.FromPixels(72f); + uiImage1.Top = styleDimension2; + uiImage1.Height = StyleDimension.FromPixels((float) asset.Height()); + uiImage1.Width = StyleDimension.FromPixelsAndPercent(-80f, 1f); + uiImage1.ScaleToFit = true; + UIImage uiImage2 = uiImage1; + this.Recalculate(); + this.Append((UIElement) uiImage2); + styleDimension2.Pixels += uiImage2.GetOuterDimensions().Height + 5f; + UIElement element = new UIElement() + { + Left = styleDimension1, + Top = styleDimension2, + Height = StyleDimension.FromPixels(92f - styleDimension2.Pixels), + Width = StyleDimension.FromPixelsAndPercent(-styleDimension1.Pixels, 1f) + }; + this.Append(element); + this.ContentPanel = element; + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + base.DrawSelf(spriteBatch); + this.DrawIcon(spriteBatch); + } + + private void DrawIcon(SpriteBatch spriteBatch) + { + CalculatedStyle innerDimensions = this.GetInnerDimensions(); + spriteBatch.Draw(this.ResourcePack.Icon, new Rectangle((int) innerDimensions.X + 4, (int) innerDimensions.Y + 4 + 10, 64, 64), Color.White); + spriteBatch.Draw(this._iconBorderTexture.Value, new Rectangle((int) innerDimensions.X, (int) innerDimensions.Y + 10, 72, 72), Color.White); + } + + public override int CompareTo(object obj) => this.Order.CompareTo(((UIResourcePack) obj).Order); + + public override void MouseOver(UIMouseEvent evt) + { + base.MouseOver(evt); + this.BackgroundColor = UIResourcePack.HoverBackgroundColor; + this.BorderColor = UIResourcePack.HoverBorderColor; + } + + public override void MouseOut(UIMouseEvent evt) + { + base.MouseOut(evt); + this.BackgroundColor = UIResourcePack.DefaultBackgroundColor; + this.BorderColor = UIResourcePack.DefaultBorderColor; + } + } +} diff --git a/GameContent/UI/Elements/UIResourcePackInfoButton`1.cs b/GameContent/UI/Elements/UIResourcePackInfoButton`1.cs new file mode 100644 index 0000000..88d6616 --- /dev/null +++ b/GameContent/UI/Elements/UIResourcePackInfoButton`1.cs @@ -0,0 +1,48 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIResourcePackInfoButton`1 +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.IO; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIResourcePackInfoButton : UITextPanel + { + private readonly Asset _BasePanelTexture; + private readonly Asset _hoveredBorderTexture; + private ResourcePack _resourcePack; + + public ResourcePack ResourcePack + { + get => this._resourcePack; + set => this._resourcePack = value; + } + + public UIResourcePackInfoButton(T text, float textScale = 1f, bool large = false) + : base(text, textScale, large) + { + this._BasePanelTexture = Main.Assets.Request("Images/UI/CharCreation/PanelGrayscale", (AssetRequestMode) 1); + this._hoveredBorderTexture = Main.Assets.Request("Images/UI/CharCreation/CategoryPanelBorder", (AssetRequestMode) 1); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + if (this._drawPanel) + { + CalculatedStyle dimensions = this.GetDimensions(); + int num1 = 10; + int num2 = 10; + Utils.DrawSplicedPanel(spriteBatch, this._BasePanelTexture.Value, (int) dimensions.X, (int) dimensions.Y, (int) dimensions.Width, (int) dimensions.Height, num1, num1, num2, num2, Color.Lerp(Color.Black, this._color, 0.8f) * 0.5f); + if (this.IsMouseHovering) + Utils.DrawSplicedPanel(spriteBatch, this._hoveredBorderTexture.Value, (int) dimensions.X, (int) dimensions.Y, (int) dimensions.Width, (int) dimensions.Height, num1, num1, num2, num2, Color.White); + } + this.DrawText(spriteBatch); + } + } +} diff --git a/GameContent/UI/Elements/UIScrollbar.cs b/GameContent/UI/Elements/UIScrollbar.cs new file mode 100644 index 0000000..093fb73 --- /dev/null +++ b/GameContent/UI/Elements/UIScrollbar.cs @@ -0,0 +1,116 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIScrollbar +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.Audio; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIScrollbar : UIElement + { + private float _viewPosition; + private float _viewSize = 1f; + private float _maxViewSize = 20f; + private bool _isDragging; + private bool _isHoveringOverHandle; + private float _dragYOffset; + private Asset _texture; + private Asset _innerTexture; + + public float ViewPosition + { + get => this._viewPosition; + set => this._viewPosition = MathHelper.Clamp(value, 0.0f, this._maxViewSize - this._viewSize); + } + + public bool CanScroll => (double) this._maxViewSize != (double) this._viewSize; + + public UIScrollbar() + { + this.Width.Set(20f, 0.0f); + this.MaxWidth.Set(20f, 0.0f); + this._texture = Main.Assets.Request("Images/UI/Scrollbar", (AssetRequestMode) 1); + this._innerTexture = Main.Assets.Request("Images/UI/ScrollbarInner", (AssetRequestMode) 1); + this.PaddingTop = 5f; + this.PaddingBottom = 5f; + } + + public void SetView(float viewSize, float maxViewSize) + { + viewSize = MathHelper.Clamp(viewSize, 0.0f, maxViewSize); + this._viewPosition = MathHelper.Clamp(this._viewPosition, 0.0f, maxViewSize - viewSize); + this._viewSize = viewSize; + this._maxViewSize = maxViewSize; + } + + public float GetValue() => this._viewPosition; + + private Rectangle GetHandleRectangle() + { + CalculatedStyle innerDimensions = this.GetInnerDimensions(); + if ((double) this._maxViewSize == 0.0 && (double) this._viewSize == 0.0) + { + this._viewSize = 1f; + this._maxViewSize = 1f; + } + return new Rectangle((int) innerDimensions.X, (int) ((double) innerDimensions.Y + (double) innerDimensions.Height * ((double) this._viewPosition / (double) this._maxViewSize)) - 3, 20, (int) ((double) innerDimensions.Height * ((double) this._viewSize / (double) this._maxViewSize)) + 7); + } + + private void DrawBar( + SpriteBatch spriteBatch, + Texture2D texture, + Rectangle dimensions, + Color color) + { + spriteBatch.Draw(texture, new Rectangle(dimensions.X, dimensions.Y - 6, dimensions.Width, 6), new Rectangle?(new Rectangle(0, 0, texture.Width, 6)), color); + spriteBatch.Draw(texture, new Rectangle(dimensions.X, dimensions.Y, dimensions.Width, dimensions.Height), new Rectangle?(new Rectangle(0, 6, texture.Width, 4)), color); + spriteBatch.Draw(texture, new Rectangle(dimensions.X, dimensions.Y + dimensions.Height, dimensions.Width, 6), new Rectangle?(new Rectangle(0, texture.Height - 6, texture.Width, 6)), color); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + CalculatedStyle dimensions = this.GetDimensions(); + CalculatedStyle innerDimensions = this.GetInnerDimensions(); + if (this._isDragging) + this._viewPosition = MathHelper.Clamp((UserInterface.ActiveInstance.MousePosition.Y - innerDimensions.Y - this._dragYOffset) / innerDimensions.Height * this._maxViewSize, 0.0f, this._maxViewSize - this._viewSize); + Rectangle handleRectangle = this.GetHandleRectangle(); + Vector2 mousePosition = UserInterface.ActiveInstance.MousePosition; + int num = this._isHoveringOverHandle ? 1 : 0; + this._isHoveringOverHandle = handleRectangle.Contains(new Point((int) mousePosition.X, (int) mousePosition.Y)); + if (num == 0 && this._isHoveringOverHandle && Main.hasFocus) + SoundEngine.PlaySound(12); + this.DrawBar(spriteBatch, this._texture.Value, dimensions.ToRectangle(), Color.White); + this.DrawBar(spriteBatch, this._innerTexture.Value, handleRectangle, Color.White * (this._isDragging || this._isHoveringOverHandle ? 1f : 0.85f)); + } + + public override void MouseDown(UIMouseEvent evt) + { + base.MouseDown(evt); + if (evt.Target != this) + return; + Rectangle handleRectangle = this.GetHandleRectangle(); + if (handleRectangle.Contains(new Point((int) evt.MousePosition.X, (int) evt.MousePosition.Y))) + { + this._isDragging = true; + this._dragYOffset = evt.MousePosition.Y - (float) handleRectangle.Y; + } + else + { + CalculatedStyle innerDimensions = this.GetInnerDimensions(); + this._viewPosition = MathHelper.Clamp((UserInterface.ActiveInstance.MousePosition.Y - innerDimensions.Y - (float) (handleRectangle.Height >> 1)) / innerDimensions.Height * this._maxViewSize, 0.0f, this._maxViewSize - this._viewSize); + } + } + + public override void MouseUp(UIMouseEvent evt) + { + base.MouseUp(evt); + this._isDragging = false; + } + } +} diff --git a/GameContent/UI/Elements/UISearchBar.cs b/GameContent/UI/Elements/UISearchBar.cs new file mode 100644 index 0000000..152c32f --- /dev/null +++ b/GameContent/UI/Elements/UISearchBar.cs @@ -0,0 +1,170 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UISearchBar +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria.Audio; +using Terraria.GameInput; +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UISearchBar : UIElement + { + private readonly LocalizedText _textToShowWhenEmpty; + private UITextBox _text; + private string actualContents; + private float _textScale; + private bool isWritingText; + + public event Action OnContentsChanged; + + public event Action OnStartTakingInput; + + public event Action OnEndTakingInput; + + public event Action OnCancledTakingInput; + + public event Action OnNeedingVirtualKeyboard; + + public UISearchBar(LocalizedText emptyContentText, float scale) + { + this._textToShowWhenEmpty = emptyContentText; + this._textScale = scale; + UITextBox uiTextBox1 = new UITextBox("", scale); + uiTextBox1.HAlign = 0.0f; + uiTextBox1.VAlign = 0.5f; + uiTextBox1.BackgroundColor = Color.Transparent; + uiTextBox1.BorderColor = Color.Transparent; + uiTextBox1.Width = new StyleDimension(0.0f, 1f); + uiTextBox1.Height = new StyleDimension(0.0f, 1f); + uiTextBox1.TextHAlign = 0.0f; + uiTextBox1.ShowInputTicker = false; + UITextBox uiTextBox2 = uiTextBox1; + this.Append((UIElement) uiTextBox2); + this._text = uiTextBox2; + } + + public void SetContents(string contents, bool forced = false) + { + if (this.actualContents == contents && !forced) + return; + this.actualContents = contents; + if (string.IsNullOrEmpty(this.actualContents)) + { + this._text.TextColor = Color.Gray; + this._text.SetText(this._textToShowWhenEmpty.Value, this._textScale, false); + } + else + { + this._text.TextColor = Color.White; + this._text.SetText(this.actualContents); + } + this.TrimDisplayIfOverElementDimensions(0); + if (this.OnContentsChanged == null) + return; + this.OnContentsChanged(contents); + } + + public void TrimDisplayIfOverElementDimensions(int padding) + { + CalculatedStyle dimensions1 = this.GetDimensions(); + if ((double) dimensions1.Width == 0.0 && (double) dimensions1.Height == 0.0) + return; + Point point1 = new Point((int) dimensions1.X, (int) dimensions1.Y); + Point point2 = new Point(point1.X + (int) dimensions1.Width, point1.Y + (int) dimensions1.Height); + Rectangle rectangle1 = new Rectangle(point1.X, point1.Y, point2.X - point1.X, point2.Y - point1.Y); + CalculatedStyle dimensions2 = this._text.GetDimensions(); + Point point3 = new Point((int) dimensions2.X, (int) dimensions2.Y); + Point point4 = new Point(point3.X + (int) dimensions2.Width, point3.Y + (int) dimensions2.Height); + Rectangle rectangle2 = new Rectangle(point3.X, point3.Y, point4.X - point3.X, point4.Y - point3.Y); + int num = 0; + for (; rectangle2.Right > rectangle1.Right - padding && this._text.Text.Length > 0; rectangle2 = new Rectangle(point3.X, point3.Y, point4.X - point3.X, point4.Y - point3.Y)) + { + this._text.SetText(this._text.Text.Substring(0, this._text.Text.Length - 1)); + ++num; + this.RecalculateChildren(); + CalculatedStyle dimensions3 = this._text.GetDimensions(); + point3 = new Point((int) dimensions3.X, (int) dimensions3.Y); + point4 = new Point(point3.X + (int) dimensions3.Width, point3.Y + (int) dimensions3.Height); + } + if (num <= 0 || this._text.Text.Length <= 0) + return; + this._text.SetText(this._text.Text.Substring(0, this._text.Text.Length - 1) + "…"); + } + + public override void MouseDown(UIMouseEvent evt) => base.MouseDown(evt); + + public override void MouseOver(UIMouseEvent evt) + { + base.MouseOver(evt); + SoundEngine.PlaySound(12); + } + + public override void Update(GameTime gameTime) + { + if (this.isWritingText) + { + if (this.NeedsVirtualkeyboard()) + { + if (this.OnNeedingVirtualKeyboard == null) + return; + this.OnNeedingVirtualKeyboard(); + return; + } + PlayerInput.WritingText = true; + Main.CurrentInputTextTakerOverride = (object) this; + } + base.Update(gameTime); + } + + private bool NeedsVirtualkeyboard() => PlayerInput.UsingGamepad; + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + base.DrawSelf(spriteBatch); + if (!this.isWritingText) + return; + PlayerInput.WritingText = true; + Main.instance.HandleIME(); + Vector2 position = new Vector2((float) (Main.screenWidth / 2), (float) (this._text.GetDimensions().ToRectangle().Bottom + 32)); + Main.instance.DrawWindowsIMEPanel(position, 0.5f); + string inputText = Main.GetInputText(this.actualContents); + if (Main.inputTextEnter) + this.ToggleTakingText(); + else if (Main.inputTextEscape) + { + this.ToggleTakingText(); + if (this.OnCancledTakingInput != null) + this.OnCancledTakingInput(); + } + this.SetContents(inputText); + position = new Vector2((float) (Main.screenWidth / 2), (float) (this._text.GetDimensions().ToRectangle().Bottom + 32)); + Main.instance.DrawWindowsIMEPanel(position, 0.5f); + } + + public void ToggleTakingText() + { + this.isWritingText = !this.isWritingText; + this._text.ShowInputTicker = this.isWritingText; + Main.clrInput(); + if (this.isWritingText) + { + if (this.OnStartTakingInput == null) + return; + this.OnStartTakingInput(); + } + else + { + if (this.OnEndTakingInput == null) + return; + this.OnEndTakingInput(); + } + } + } +} diff --git a/GameContent/UI/Elements/UISelectableTextPanel`1.cs b/GameContent/UI/Elements/UISelectableTextPanel`1.cs new file mode 100644 index 0000000..a0b5c71 --- /dev/null +++ b/GameContent/UI/Elements/UISelectableTextPanel`1.cs @@ -0,0 +1,51 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UISelectableTextPanel`1 +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UISelectableTextPanel : UITextPanel + { + private readonly Asset _BasePanelTexture; + private readonly Asset _hoveredBorderTexture; + private Func, bool> _isSelected; + + public Func, bool> IsSelected + { + get => this._isSelected; + set => this._isSelected = value; + } + + public UISelectableTextPanel(T text, float textScale = 1f, bool large = false) + : base(text, textScale, large) + { + this._BasePanelTexture = Main.Assets.Request("Images/UI/CharCreation/PanelGrayscale", (AssetRequestMode) 1); + this._hoveredBorderTexture = Main.Assets.Request("Images/UI/CharCreation/CategoryPanelBorder", (AssetRequestMode) 1); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + if (this._drawPanel) + { + CalculatedStyle dimensions = this.GetDimensions(); + int num1 = 4; + int num2 = 10; + int num3 = 10; + Utils.DrawSplicedPanel(spriteBatch, this._BasePanelTexture.Value, (int) dimensions.X, (int) dimensions.Y, (int) dimensions.Width, (int) dimensions.Height, num2, num2, num3, num3, Color.Lerp(Color.Black, this._color, 0.8f) * 0.5f); + if (this.IsSelected != null && this.IsSelected(this)) + Utils.DrawSplicedPanel(spriteBatch, this._BasePanelTexture.Value, (int) dimensions.X + num1, (int) dimensions.Y + num1, (int) dimensions.Width - num1 * 2, (int) dimensions.Height - num1 * 2, num2, num2, num3, num3, Color.Lerp(this._color, Color.White, 0.7f) * 0.5f); + if (this.IsMouseHovering) + Utils.DrawSplicedPanel(spriteBatch, this._hoveredBorderTexture.Value, (int) dimensions.X, (int) dimensions.Y, (int) dimensions.Width, (int) dimensions.Height, num2, num2, num3, num3, Color.White); + } + this.DrawText(spriteBatch); + } + } +} diff --git a/GameContent/UI/Elements/UISlicedImage.cs b/GameContent/UI/Elements/UISlicedImage.cs new file mode 100644 index 0000000..a7db012 --- /dev/null +++ b/GameContent/UI/Elements/UISlicedImage.cs @@ -0,0 +1,60 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UISlicedImage +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UISlicedImage : UIElement + { + private Asset _texture; + private Color _color; + private int _leftSliceDepth; + private int _rightSliceDepth; + private int _topSliceDepth; + private int _bottomSliceDepth; + + public Color Color + { + get => this._color; + set => this._color = value; + } + + public UISlicedImage(Asset texture) + { + this._texture = texture; + this.Width.Set((float) this._texture.Width(), 0.0f); + this.Height.Set((float) this._texture.Height(), 0.0f); + } + + public void SetImage(Asset texture) => this._texture = texture; + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + CalculatedStyle dimensions = this.GetDimensions(); + Utils.DrawSplicedPanel(spriteBatch, this._texture.Value, (int) dimensions.X, (int) dimensions.Y, (int) dimensions.Width, (int) dimensions.Height, this._leftSliceDepth, this._rightSliceDepth, this._topSliceDepth, this._bottomSliceDepth, this._color); + } + + public void SetSliceDepths(int top, int bottom, int left, int right) + { + this._leftSliceDepth = left; + this._rightSliceDepth = right; + this._topSliceDepth = top; + this._bottomSliceDepth = bottom; + } + + public void SetSliceDepths(int fluff) + { + this._leftSliceDepth = fluff; + this._rightSliceDepth = fluff; + this._topSliceDepth = fluff; + this._bottomSliceDepth = fluff; + } + } +} diff --git a/GameContent/UI/Elements/UISliderBase.cs b/GameContent/UI/Elements/UISliderBase.cs new file mode 100644 index 0000000..8e2bead --- /dev/null +++ b/GameContent/UI/Elements/UISliderBase.cs @@ -0,0 +1,29 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UISliderBase +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UISliderBase : UIElement + { + internal const int UsageLevel_NotSelected = 0; + internal const int UsageLevel_SelectedAndLocked = 1; + internal const int UsageLevel_OtherElementIsLocked = 2; + internal static UIElement CurrentLockedSlider; + internal static UIElement CurrentAimedSlider; + + internal int GetUsageLevel() + { + int num = 0; + if (UISliderBase.CurrentLockedSlider == this) + num = 1; + else if (UISliderBase.CurrentLockedSlider != null) + num = 2; + return num; + } + } +} diff --git a/GameContent/UI/Elements/UIText.cs b/GameContent/UI/Elements/UIText.cs new file mode 100644 index 0000000..31e6a2f --- /dev/null +++ b/GameContent/UI/Elements/UIText.cs @@ -0,0 +1,127 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIText +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Graphics; +using System; +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIText : UIElement + { + private object _text = (object) ""; + private float _textScale = 1f; + private Vector2 _textSize = Vector2.Zero; + private bool _isLarge; + private Color _color = Color.White; + private bool _isWrapped; + public bool DynamicallyScaleDownToWidth; + private string _visibleText; + private string _lastTextReference; + + public string Text => this._text.ToString(); + + public float TextOriginX { get; set; } + + public float WrappedTextBottomPadding { get; set; } + + public bool IsWrapped + { + get => this._isWrapped; + set + { + this._isWrapped = value; + this.InternalSetText(this._text, this._textScale, this._isLarge); + } + } + + public event Action OnInternalTextChange; + + public Color TextColor + { + get => this._color; + set => this._color = value; + } + + public UIText(string text, float textScale = 1f, bool large = false) + { + this.TextOriginX = 0.5f; + this.IsWrapped = false; + this.WrappedTextBottomPadding = 20f; + this.InternalSetText((object) text, textScale, large); + } + + public UIText(LocalizedText text, float textScale = 1f, bool large = false) + { + this.TextOriginX = 0.5f; + this.IsWrapped = false; + this.WrappedTextBottomPadding = 20f; + this.InternalSetText((object) text, textScale, large); + } + + public override void Recalculate() + { + this.InternalSetText(this._text, this._textScale, this._isLarge); + base.Recalculate(); + } + + public void SetText(string text) => this.InternalSetText((object) text, this._textScale, this._isLarge); + + public void SetText(LocalizedText text) => this.InternalSetText((object) text, this._textScale, this._isLarge); + + public void SetText(string text, float textScale, bool large) => this.InternalSetText((object) text, textScale, large); + + public void SetText(LocalizedText text, float textScale, bool large) => this.InternalSetText((object) text, textScale, large); + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + base.DrawSelf(spriteBatch); + this.VerifyTextState(); + CalculatedStyle innerDimensions = this.GetInnerDimensions(); + Vector2 pos = innerDimensions.Position(); + if (this._isLarge) + pos.Y -= 10f * this._textScale; + else + pos.Y -= 2f * this._textScale; + pos.X += (innerDimensions.Width - this._textSize.X) * this.TextOriginX; + float textScale = this._textScale; + if (this.DynamicallyScaleDownToWidth && (double) this._textSize.X > (double) innerDimensions.Width) + textScale *= innerDimensions.Width / this._textSize.X; + if (this._isLarge) + Utils.DrawBorderStringBig(spriteBatch, this._visibleText, pos, this._color, textScale); + else + Utils.DrawBorderString(spriteBatch, this._visibleText, pos, this._color, textScale); + } + + private void VerifyTextState() + { + if ((object) this._lastTextReference == (object) this.Text) + return; + this.InternalSetText(this._text, this._textScale, this._isLarge); + } + + private void InternalSetText(object text, float textScale, bool large) + { + DynamicSpriteFont dynamicSpriteFont = large ? FontAssets.DeathText.Value : FontAssets.MouseText.Value; + this._text = text; + this._isLarge = large; + this._textScale = textScale; + this._lastTextReference = this._text.ToString(); + this._visibleText = !this.IsWrapped ? this._lastTextReference : dynamicSpriteFont.CreateWrappedText(this._lastTextReference, this.GetInnerDimensions().Width / this._textScale); + Vector2 vector2_1 = dynamicSpriteFont.MeasureString(this._visibleText); + Vector2 vector2_2 = !this.IsWrapped ? new Vector2(vector2_1.X, large ? 32f : 16f) * textScale : new Vector2(vector2_1.X, vector2_1.Y + this.WrappedTextBottomPadding) * textScale; + this._textSize = vector2_2; + this.MinWidth.Set(vector2_2.X + this.PaddingLeft + this.PaddingRight, 0.0f); + this.MinHeight.Set(vector2_2.Y + this.PaddingTop + this.PaddingBottom, 0.0f); + if (this.OnInternalTextChange == null) + return; + this.OnInternalTextChange(); + } + } +} diff --git a/GameContent/UI/Elements/UITextBox.cs b/GameContent/UI/Elements/UITextBox.cs new file mode 100644 index 0000000..fbbaa07 --- /dev/null +++ b/GameContent/UI/Elements/UITextBox.cs @@ -0,0 +1,89 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UITextBox +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + internal class UITextBox : UITextPanel + { + private int _cursor; + private int _frameCount; + private int _maxLength = 20; + public bool ShowInputTicker = true; + public bool HideSelf; + + public UITextBox(string text, float textScale = 1f, bool large = false) + : base(text, textScale, large) + { + } + + public void Write(string text) + { + this.SetText(this.Text.Insert(this._cursor, text)); + this._cursor += text.Length; + } + + public override void SetText(string text, float textScale, bool large) + { + if (text == null) + text = ""; + if (text.Length > this._maxLength) + text = text.Substring(0, this._maxLength); + base.SetText(text, textScale, large); + this._cursor = Math.Min(this.Text.Length, this._cursor); + } + + public void SetTextMaxLength(int maxLength) => this._maxLength = maxLength; + + public void Backspace() + { + if (this._cursor == 0) + return; + this.SetText(this.Text.Substring(0, this.Text.Length - 1)); + } + + public void CursorLeft() + { + if (this._cursor == 0) + return; + --this._cursor; + } + + public void CursorRight() + { + if (this._cursor >= this.Text.Length) + return; + ++this._cursor; + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + if (this.HideSelf) + return; + this._cursor = this.Text.Length; + base.DrawSelf(spriteBatch); + ++this._frameCount; + if ((this._frameCount %= 40) > 20 || !this.ShowInputTicker) + return; + CalculatedStyle innerDimensions = this.GetInnerDimensions(); + Vector2 pos = innerDimensions.Position(); + Vector2 vector2 = new Vector2((this.IsLarge ? FontAssets.DeathText.Value : FontAssets.MouseText.Value).MeasureString(this.Text.Substring(0, this._cursor)).X, this.IsLarge ? 32f : 16f) * this.TextScale; + if (this.IsLarge) + pos.Y -= 8f * this.TextScale; + else + pos.Y -= 2f * this.TextScale; + pos.X += (float) (((double) innerDimensions.Width - (double) this.TextSize.X) * (double) this.TextHAlign + (double) vector2.X - (this.IsLarge ? 8.0 : 4.0) * (double) this.TextScale + 6.0); + if (this.IsLarge) + Utils.DrawBorderStringBig(spriteBatch, "|", pos, this.TextColor, this.TextScale); + else + Utils.DrawBorderString(spriteBatch, "|", pos, this.TextColor, this.TextScale); + } + } +} diff --git a/GameContent/UI/Elements/UITextPanel`1.cs b/GameContent/UI/Elements/UITextPanel`1.cs new file mode 100644 index 0000000..9a555e2 --- /dev/null +++ b/GameContent/UI/Elements/UITextPanel`1.cs @@ -0,0 +1,90 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UITextPanel`1 +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UITextPanel : UIPanel + { + protected T _text; + protected float _textScale = 1f; + protected Vector2 _textSize = Vector2.Zero; + protected bool _isLarge; + protected Color _color = Color.White; + protected bool _drawPanel = true; + public float TextHAlign = 0.5f; + + public bool IsLarge => this._isLarge; + + public bool DrawPanel + { + get => this._drawPanel; + set => this._drawPanel = value; + } + + public float TextScale + { + get => this._textScale; + set => this._textScale = value; + } + + public Vector2 TextSize => this._textSize; + + public string Text => (object) this._text != null ? this._text.ToString() : ""; + + public Color TextColor + { + get => this._color; + set => this._color = value; + } + + public UITextPanel(T text, float textScale = 1f, bool large = false) => this.SetText(text, textScale, large); + + public override void Recalculate() + { + this.SetText(this._text, this._textScale, this._isLarge); + base.Recalculate(); + } + + public void SetText(T text) => this.SetText(text, this._textScale, this._isLarge); + + public virtual void SetText(T text, float textScale, bool large) + { + Vector2 vector2 = new Vector2((large ? FontAssets.DeathText.Value : FontAssets.MouseText.Value).MeasureString(text.ToString()).X, large ? 32f : 16f) * textScale; + this._text = text; + this._textScale = textScale; + this._textSize = vector2; + this._isLarge = large; + this.MinWidth.Set(vector2.X + this.PaddingLeft + this.PaddingRight, 0.0f); + this.MinHeight.Set(vector2.Y + this.PaddingTop + this.PaddingBottom, 0.0f); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + if (this._drawPanel) + base.DrawSelf(spriteBatch); + this.DrawText(spriteBatch); + } + + protected void DrawText(SpriteBatch spriteBatch) + { + CalculatedStyle innerDimensions = this.GetInnerDimensions(); + Vector2 pos = innerDimensions.Position(); + if (this._isLarge) + pos.Y -= 10f * this._textScale * this._textScale; + else + pos.Y -= 2f * this._textScale; + pos.X += (innerDimensions.Width - this._textSize.X) * this.TextHAlign; + if (this._isLarge) + Utils.DrawBorderStringBig(spriteBatch, this.Text, pos, this._color, this._textScale); + else + Utils.DrawBorderString(spriteBatch, this.Text, pos, this._color, this._textScale); + } + } +} diff --git a/GameContent/UI/Elements/UIToggleImage.cs b/GameContent/UI/Elements/UIToggleImage.cs new file mode 100644 index 0000000..47a0b8a --- /dev/null +++ b/GameContent/UI/Elements/UIToggleImage.cs @@ -0,0 +1,72 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIToggleImage +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIToggleImage : UIElement + { + private Asset _onTexture; + private Asset _offTexture; + private int _drawWidth; + private int _drawHeight; + private Point _onTextureOffset = Point.Zero; + private Point _offTextureOffset = Point.Zero; + private bool _isOn; + + public bool IsOn => this._isOn; + + public UIToggleImage( + Asset texture, + int width, + int height, + Point onTextureOffset, + Point offTextureOffset) + { + this._onTexture = texture; + this._offTexture = texture; + this._offTextureOffset = offTextureOffset; + this._onTextureOffset = onTextureOffset; + this._drawWidth = width; + this._drawHeight = height; + this.Width.Set((float) width, 0.0f); + this.Height.Set((float) height, 0.0f); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + CalculatedStyle dimensions = this.GetDimensions(); + Texture2D texture; + Point point; + if (this._isOn) + { + texture = this._onTexture.Value; + point = this._onTextureOffset; + } + else + { + texture = this._offTexture.Value; + point = this._offTextureOffset; + } + Color color = this.IsMouseHovering ? Color.White : Color.Silver; + spriteBatch.Draw(texture, new Rectangle((int) dimensions.X, (int) dimensions.Y, this._drawWidth, this._drawHeight), new Rectangle?(new Rectangle(point.X, point.Y, this._drawWidth, this._drawHeight)), color); + } + + public override void Click(UIMouseEvent evt) + { + this.Toggle(); + base.Click(evt); + } + + public void SetState(bool value) => this._isOn = value; + + public void Toggle() => this._isOn = !this._isOn; + } +} diff --git a/GameContent/UI/Elements/UIVerticalSeparator.cs b/GameContent/UI/Elements/UIVerticalSeparator.cs new file mode 100644 index 0000000..0eac78a --- /dev/null +++ b/GameContent/UI/Elements/UIVerticalSeparator.cs @@ -0,0 +1,36 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIVerticalSeparator +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIVerticalSeparator : UIElement + { + private Asset _texture; + public Color Color; + public int EdgeWidth; + + public UIVerticalSeparator() + { + this.Color = Color.White; + this._texture = Main.Assets.Request("Images/UI/OnePixel", (AssetRequestMode) 1); + this.Width.Set((float) this._texture.Width(), 0.0f); + this.Height.Set((float) this._texture.Height(), 0.0f); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + CalculatedStyle dimensions = this.GetDimensions(); + spriteBatch.Draw(this._texture.Value, dimensions.ToRectangle(), this.Color); + } + + public override bool ContainsPoint(Vector2 point) => false; + } +} diff --git a/GameContent/UI/Elements/UIVerticalSlider.cs b/GameContent/UI/Elements/UIVerticalSlider.cs new file mode 100644 index 0000000..3f51a12 --- /dev/null +++ b/GameContent/UI/Elements/UIVerticalSlider.cs @@ -0,0 +1,122 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIVerticalSlider +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria.Audio; +using Terraria.GameInput; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIVerticalSlider : UISliderBase + { + public float FillPercent; + public Color FilledColor = Main.OurFavoriteColor; + public Color EmptyColor = Color.Black; + private Func _getSliderValue; + private Action _slideKeyboardAction; + private Func _blipFunc; + private Action _slideGamepadAction; + private bool _isReallyMouseOvered; + private bool _soundedUsage; + private bool _alreadyHovered; + + public UIVerticalSlider( + Func getStatus, + Action setStatusKeyboard, + Action setStatusGamepad, + Color color) + { + this._getSliderValue = getStatus != null ? getStatus : (Func) (() => 0.0f); + this._slideKeyboardAction = setStatusKeyboard != null ? setStatusKeyboard : (Action) (s => { }); + this._slideGamepadAction = setStatusGamepad; + this._isReallyMouseOvered = false; + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + UISliderBase.CurrentAimedSlider = (UIElement) null; + if (!Main.mouseLeft) + UISliderBase.CurrentLockedSlider = (UIElement) null; + this.GetUsageLevel(); + this.FillPercent = this._getSliderValue(); + float sliderValueThatWasSet = this.FillPercent; + bool flag = false; + if (this.DrawValueBarDynamicWidth(spriteBatch, out sliderValueThatWasSet)) + flag = true; + if (UISliderBase.CurrentLockedSlider == this | flag) + { + UISliderBase.CurrentAimedSlider = (UIElement) this; + if (PlayerInput.Triggers.Current.MouseLeft && !PlayerInput.UsingGamepad && UISliderBase.CurrentLockedSlider == this) + { + this._slideKeyboardAction(sliderValueThatWasSet); + if (!this._soundedUsage) + SoundEngine.PlaySound(12); + this._soundedUsage = true; + } + else + this._soundedUsage = false; + } + if (UISliderBase.CurrentAimedSlider != null && UISliderBase.CurrentLockedSlider == null) + UISliderBase.CurrentLockedSlider = UISliderBase.CurrentAimedSlider; + if (!this._isReallyMouseOvered) + return; + this._slideGamepadAction(); + } + + private bool DrawValueBarDynamicWidth(SpriteBatch spriteBatch, out float sliderValueThatWasSet) + { + sliderValueThatWasSet = 0.0f; + Texture2D texture1 = TextureAssets.ColorBar.Value; + Rectangle rectangle1 = this.GetDimensions().ToRectangle(); + Rectangle rectangle2 = new Rectangle(5, 4, 4, 4); + Utils.DrawSplicedPanel(spriteBatch, texture1, rectangle1.X, rectangle1.Y, rectangle1.Width, rectangle1.Height, rectangle2.X, rectangle2.Width, rectangle2.Y, rectangle2.Height, Color.White); + Rectangle destinationRectangle1 = rectangle1; + destinationRectangle1.X += rectangle2.Left; + destinationRectangle1.Width -= rectangle2.Right; + destinationRectangle1.Y += rectangle2.Top; + destinationRectangle1.Height -= rectangle2.Bottom; + Texture2D texture2 = TextureAssets.MagicPixel.Value; + Rectangle rectangle3 = new Rectangle(0, 0, 1, 1); + spriteBatch.Draw(texture2, destinationRectangle1, new Rectangle?(rectangle3), this.EmptyColor); + Rectangle destinationRectangle2 = destinationRectangle1; + destinationRectangle2.Height = (int) ((double) destinationRectangle2.Height * (double) this.FillPercent); + destinationRectangle2.Y += destinationRectangle1.Height - destinationRectangle2.Height; + spriteBatch.Draw(texture2, destinationRectangle2, new Rectangle?(rectangle3), this.FilledColor); + Rectangle destinationRectangle3 = Utils.CenteredRectangle(new Vector2((float) (destinationRectangle2.Center.X + 1), (float) destinationRectangle2.Top), new Vector2((float) (destinationRectangle2.Width + 16), 4f)); + Rectangle destinationRectangle4 = destinationRectangle3; + destinationRectangle4.Inflate(2, 2); + spriteBatch.Draw(texture2, destinationRectangle4, new Rectangle?(rectangle3), Color.Black); + spriteBatch.Draw(texture2, destinationRectangle3, new Rectangle?(rectangle3), Color.White); + Rectangle rectangle4 = destinationRectangle1; + rectangle4.Inflate(4, 0); + bool flag1 = rectangle4.Contains(Main.MouseScreen.ToPoint()); + this._isReallyMouseOvered = flag1; + bool flag2 = flag1; + if (this.IgnoresMouseInteraction) + flag2 = false; + int usageLevel = this.GetUsageLevel(); + if (usageLevel == 2) + flag2 = false; + if (usageLevel == 1) + flag2 = true; + if (flag2 || usageLevel == 1) + { + if (!this._alreadyHovered) + SoundEngine.PlaySound(12); + this._alreadyHovered = true; + } + else + this._alreadyHovered = false; + if (!flag2) + return false; + sliderValueThatWasSet = Utils.GetLerpValue((float) destinationRectangle1.Bottom, (float) destinationRectangle1.Top, (float) Main.mouseY, true); + return true; + } + } +} diff --git a/GameContent/UI/Elements/UIWorldCreationPreview.cs b/GameContent/UI/Elements/UIWorldCreationPreview.cs new file mode 100644 index 0000000..993cba4 --- /dev/null +++ b/GameContent/UI/Elements/UIWorldCreationPreview.cs @@ -0,0 +1,124 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIWorldCreationPreview +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIWorldCreationPreview : UIElement + { + private readonly Asset _BorderTexture; + private readonly Asset _BackgroundExpertTexture; + private readonly Asset _BackgroundNormalTexture; + private readonly Asset _BackgroundMasterTexture; + private readonly Asset _BunnyExpertTexture; + private readonly Asset _BunnyNormalTexture; + private readonly Asset _BunnyCreativeTexture; + private readonly Asset _BunnyMasterTexture; + private readonly Asset _EvilRandomTexture; + private readonly Asset _EvilCorruptionTexture; + private readonly Asset _EvilCrimsonTexture; + private readonly Asset _SizeSmallTexture; + private readonly Asset _SizeMediumTexture; + private readonly Asset _SizeLargeTexture; + private byte _difficulty; + private byte _evil; + private byte _size; + + public UIWorldCreationPreview() + { + this._BorderTexture = Main.Assets.Request("Images/UI/WorldCreation/PreviewBorder", (AssetRequestMode) 1); + this._BackgroundNormalTexture = Main.Assets.Request("Images/UI/WorldCreation/PreviewDifficultyNormal1", (AssetRequestMode) 1); + this._BackgroundExpertTexture = Main.Assets.Request("Images/UI/WorldCreation/PreviewDifficultyExpert1", (AssetRequestMode) 1); + this._BackgroundMasterTexture = Main.Assets.Request("Images/UI/WorldCreation/PreviewDifficultyMaster1", (AssetRequestMode) 1); + this._BunnyNormalTexture = Main.Assets.Request("Images/UI/WorldCreation/PreviewDifficultyNormal2", (AssetRequestMode) 1); + this._BunnyExpertTexture = Main.Assets.Request("Images/UI/WorldCreation/PreviewDifficultyExpert2", (AssetRequestMode) 1); + this._BunnyCreativeTexture = Main.Assets.Request("Images/UI/WorldCreation/PreviewDifficultyCreative2", (AssetRequestMode) 1); + this._BunnyMasterTexture = Main.Assets.Request("Images/UI/WorldCreation/PreviewDifficultyMaster2", (AssetRequestMode) 1); + this._EvilRandomTexture = Main.Assets.Request("Images/UI/WorldCreation/PreviewEvilRandom", (AssetRequestMode) 1); + this._EvilCorruptionTexture = Main.Assets.Request("Images/UI/WorldCreation/PreviewEvilCorruption", (AssetRequestMode) 1); + this._EvilCrimsonTexture = Main.Assets.Request("Images/UI/WorldCreation/PreviewEvilCrimson", (AssetRequestMode) 1); + this._SizeSmallTexture = Main.Assets.Request("Images/UI/WorldCreation/PreviewSizeSmall", (AssetRequestMode) 1); + this._SizeMediumTexture = Main.Assets.Request("Images/UI/WorldCreation/PreviewSizeMedium", (AssetRequestMode) 1); + this._SizeLargeTexture = Main.Assets.Request("Images/UI/WorldCreation/PreviewSizeLarge", (AssetRequestMode) 1); + this.Width.Set((float) this._BackgroundExpertTexture.Width(), 0.0f); + this.Height.Set((float) this._BackgroundExpertTexture.Height(), 0.0f); + } + + public void UpdateOption(byte difficulty, byte evil, byte size) + { + this._difficulty = difficulty; + this._evil = evil; + this._size = size; + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + CalculatedStyle dimensions = this.GetDimensions(); + Vector2 position = new Vector2(dimensions.X + 4f, dimensions.Y + 4f); + Color color = Color.White; + switch (this._difficulty) + { + case 0: + case 3: + spriteBatch.Draw(this._BackgroundNormalTexture.Value, position, Color.White); + color = Color.White; + break; + case 1: + spriteBatch.Draw(this._BackgroundExpertTexture.Value, position, Color.White); + color = Color.DarkGray; + break; + case 2: + spriteBatch.Draw(this._BackgroundMasterTexture.Value, position, Color.White); + color = Color.DarkGray; + break; + } + switch (this._size) + { + case 0: + spriteBatch.Draw(this._SizeSmallTexture.Value, position, color); + break; + case 1: + spriteBatch.Draw(this._SizeMediumTexture.Value, position, color); + break; + case 2: + spriteBatch.Draw(this._SizeLargeTexture.Value, position, color); + break; + } + switch (this._evil) + { + case 0: + spriteBatch.Draw(this._EvilRandomTexture.Value, position, color); + break; + case 1: + spriteBatch.Draw(this._EvilCorruptionTexture.Value, position, color); + break; + case 2: + spriteBatch.Draw(this._EvilCrimsonTexture.Value, position, color); + break; + } + switch (this._difficulty) + { + case 0: + spriteBatch.Draw(this._BunnyNormalTexture.Value, position, color); + break; + case 1: + spriteBatch.Draw(this._BunnyExpertTexture.Value, position, color); + break; + case 2: + spriteBatch.Draw(this._BunnyMasterTexture.Value, position, color * 1.2f); + break; + case 3: + spriteBatch.Draw(this._BunnyCreativeTexture.Value, position, color); + break; + } + spriteBatch.Draw(this._BorderTexture.Value, new Vector2(dimensions.X, dimensions.Y), Color.White); + } + } +} diff --git a/GameContent/UI/Elements/UIWorldListItem.cs b/GameContent/UI/Elements/UIWorldListItem.cs new file mode 100644 index 0000000..dfe6969 --- /dev/null +++ b/GameContent/UI/Elements/UIWorldListItem.cs @@ -0,0 +1,364 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.Elements.UIWorldListItem +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using ReLogic.OS; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.IO; +using Terraria.Localization; +using Terraria.Social; +using Terraria.UI; + +namespace Terraria.GameContent.UI.Elements +{ + public class UIWorldListItem : UIPanel + { + private WorldFileData _data; + private Asset _dividerTexture; + private Asset _innerPanelTexture; + private UIImage _worldIcon; + private UIText _buttonLabel; + private UIText _deleteButtonLabel; + private Asset _buttonCloudActiveTexture; + private Asset _buttonCloudInactiveTexture; + private Asset _buttonFavoriteActiveTexture; + private Asset _buttonFavoriteInactiveTexture; + private Asset _buttonPlayTexture; + private Asset _buttonSeedTexture; + private Asset _buttonDeleteTexture; + private UIImageButton _deleteButton; + private int _orderInList; + private bool _canBePlayed; + + public bool IsFavorite => this._data.IsFavorite; + + public UIWorldListItem(WorldFileData data, int orderInList, bool canBePlayed) + { + this._orderInList = orderInList; + this._data = data; + this._canBePlayed = canBePlayed; + this.LoadTextures(); + this.InitializeAppearance(); + this._worldIcon = new UIImage(this.GetIcon()); + this._worldIcon.Left.Set(4f, 0.0f); + this._worldIcon.OnDoubleClick += new UIElement.MouseEvent(this.PlayGame); + this.Append((UIElement) this._worldIcon); + float pixels1 = 4f; + UIImageButton uiImageButton1 = new UIImageButton(this._buttonPlayTexture); + uiImageButton1.VAlign = 1f; + uiImageButton1.Left.Set(pixels1, 0.0f); + uiImageButton1.OnClick += new UIElement.MouseEvent(this.PlayGame); + this.OnDoubleClick += new UIElement.MouseEvent(this.PlayGame); + uiImageButton1.OnMouseOver += new UIElement.MouseEvent(this.PlayMouseOver); + uiImageButton1.OnMouseOut += new UIElement.MouseEvent(this.ButtonMouseOut); + this.Append((UIElement) uiImageButton1); + float pixels2 = pixels1 + 24f; + UIImageButton uiImageButton2 = new UIImageButton(this._data.IsFavorite ? this._buttonFavoriteActiveTexture : this._buttonFavoriteInactiveTexture); + uiImageButton2.VAlign = 1f; + uiImageButton2.Left.Set(pixels2, 0.0f); + uiImageButton2.OnClick += new UIElement.MouseEvent(this.FavoriteButtonClick); + uiImageButton2.OnMouseOver += new UIElement.MouseEvent(this.FavoriteMouseOver); + uiImageButton2.OnMouseOut += new UIElement.MouseEvent(this.ButtonMouseOut); + uiImageButton2.SetVisibility(1f, this._data.IsFavorite ? 0.8f : 0.4f); + this.Append((UIElement) uiImageButton2); + float pixels3 = pixels2 + 24f; + if (SocialAPI.Cloud != null) + { + UIImageButton uiImageButton3 = new UIImageButton(this._data.IsCloudSave ? this._buttonCloudActiveTexture : this._buttonCloudInactiveTexture); + uiImageButton3.VAlign = 1f; + uiImageButton3.Left.Set(pixels3, 0.0f); + uiImageButton3.OnClick += new UIElement.MouseEvent(this.CloudButtonClick); + uiImageButton3.OnMouseOver += new UIElement.MouseEvent(this.CloudMouseOver); + uiImageButton3.OnMouseOut += new UIElement.MouseEvent(this.ButtonMouseOut); + uiImageButton3.SetSnapPoint("Cloud", orderInList); + this.Append((UIElement) uiImageButton3); + pixels3 += 24f; + } + if (this._data.WorldGeneratorVersion != 0UL) + { + UIImageButton uiImageButton4 = new UIImageButton(this._buttonSeedTexture); + uiImageButton4.VAlign = 1f; + uiImageButton4.Left.Set(pixels3, 0.0f); + uiImageButton4.OnClick += new UIElement.MouseEvent(this.SeedButtonClick); + uiImageButton4.OnMouseOver += new UIElement.MouseEvent(this.SeedMouseOver); + uiImageButton4.OnMouseOut += new UIElement.MouseEvent(this.ButtonMouseOut); + uiImageButton4.SetSnapPoint("Seed", orderInList); + this.Append((UIElement) uiImageButton4); + pixels3 += 24f; + } + UIImageButton uiImageButton5 = new UIImageButton(this._buttonDeleteTexture); + uiImageButton5.VAlign = 1f; + uiImageButton5.HAlign = 1f; + if (!this._data.IsFavorite) + uiImageButton5.OnClick += new UIElement.MouseEvent(this.DeleteButtonClick); + uiImageButton5.OnMouseOver += new UIElement.MouseEvent(this.DeleteMouseOver); + uiImageButton5.OnMouseOut += new UIElement.MouseEvent(this.DeleteMouseOut); + this._deleteButton = uiImageButton5; + this.Append((UIElement) uiImageButton5); + float pixels4 = pixels3 + 4f; + this._buttonLabel = new UIText(""); + this._buttonLabel.VAlign = 1f; + this._buttonLabel.Left.Set(pixels4, 0.0f); + this._buttonLabel.Top.Set(-3f, 0.0f); + this.Append((UIElement) this._buttonLabel); + this._deleteButtonLabel = new UIText(""); + this._deleteButtonLabel.VAlign = 1f; + this._deleteButtonLabel.HAlign = 1f; + this._deleteButtonLabel.Left.Set(-30f, 0.0f); + this._deleteButtonLabel.Top.Set(-3f, 0.0f); + this.Append((UIElement) this._deleteButtonLabel); + uiImageButton1.SetSnapPoint("Play", orderInList); + uiImageButton2.SetSnapPoint("Favorite", orderInList); + uiImageButton5.SetSnapPoint("Delete", orderInList); + } + + private void LoadTextures() + { + this._dividerTexture = Main.Assets.Request("Images/UI/Divider", (AssetRequestMode) 1); + this._innerPanelTexture = Main.Assets.Request("Images/UI/InnerPanelBackground", (AssetRequestMode) 1); + this._buttonCloudActiveTexture = Main.Assets.Request("Images/UI/ButtonCloudActive", (AssetRequestMode) 1); + this._buttonCloudInactiveTexture = Main.Assets.Request("Images/UI/ButtonCloudInactive", (AssetRequestMode) 1); + this._buttonFavoriteActiveTexture = Main.Assets.Request("Images/UI/ButtonFavoriteActive", (AssetRequestMode) 1); + this._buttonFavoriteInactiveTexture = Main.Assets.Request("Images/UI/ButtonFavoriteInactive", (AssetRequestMode) 1); + this._buttonPlayTexture = Main.Assets.Request("Images/UI/ButtonPlay", (AssetRequestMode) 1); + this._buttonSeedTexture = Main.Assets.Request("Images/UI/ButtonSeed", (AssetRequestMode) 1); + this._buttonDeleteTexture = Main.Assets.Request("Images/UI/ButtonDelete", (AssetRequestMode) 1); + } + + private void InitializeAppearance() + { + this.Height.Set(96f, 0.0f); + this.Width.Set(0.0f, 1f); + this.SetPadding(6f); + this.SetColorsToNotHovered(); + } + + private void SetColorsToHovered() + { + this.BackgroundColor = new Color(73, 94, 171); + this.BorderColor = new Color(89, 116, 213); + if (this._canBePlayed) + return; + this.BorderColor = new Color(150, 150, 150) * 1f; + this.BackgroundColor = Color.Lerp(this.BackgroundColor, new Color(120, 120, 120), 0.5f) * 1f; + } + + private void SetColorsToNotHovered() + { + this.BackgroundColor = new Color(63, 82, 151) * 0.7f; + this.BorderColor = new Color(89, 116, 213) * 0.7f; + if (this._canBePlayed) + return; + this.BorderColor = new Color((int) sbyte.MaxValue, (int) sbyte.MaxValue, (int) sbyte.MaxValue) * 0.7f; + this.BackgroundColor = Color.Lerp(new Color(63, 82, 151), new Color(80, 80, 80), 0.5f) * 0.7f; + } + + private Asset GetIcon() => this._data.DrunkWorld ? Main.Assets.Request("Images/UI/Icon" + (this._data.IsHardMode ? "Hallow" : "") + "CorruptionCrimson", (AssetRequestMode) 1) : Main.Assets.Request("Images/UI/Icon" + (this._data.IsHardMode ? "Hallow" : "") + (this._data.HasCorruption ? "Corruption" : "Crimson"), (AssetRequestMode) 1); + + private void FavoriteMouseOver(UIMouseEvent evt, UIElement listeningElement) + { + if (this._data.IsFavorite) + this._buttonLabel.SetText(Language.GetTextValue("UI.Unfavorite")); + else + this._buttonLabel.SetText(Language.GetTextValue("UI.Favorite")); + } + + private void CloudMouseOver(UIMouseEvent evt, UIElement listeningElement) + { + if (this._data.IsCloudSave) + this._buttonLabel.SetText(Language.GetTextValue("UI.MoveOffCloud")); + else + this._buttonLabel.SetText(Language.GetTextValue("UI.MoveToCloud")); + } + + private void PlayMouseOver(UIMouseEvent evt, UIElement listeningElement) => this._buttonLabel.SetText(Language.GetTextValue("UI.Play")); + + private void SeedMouseOver(UIMouseEvent evt, UIElement listeningElement) => this._buttonLabel.SetText(Language.GetTextValue("UI.CopySeed", (object) this._data.GetFullSeedText())); + + private void DeleteMouseOver(UIMouseEvent evt, UIElement listeningElement) + { + if (this._data.IsFavorite) + this._deleteButtonLabel.SetText(Language.GetTextValue("UI.CannotDeleteFavorited")); + else + this._deleteButtonLabel.SetText(Language.GetTextValue("UI.Delete")); + } + + private void DeleteMouseOut(UIMouseEvent evt, UIElement listeningElement) => this._deleteButtonLabel.SetText(""); + + private void ButtonMouseOut(UIMouseEvent evt, UIElement listeningElement) => this._buttonLabel.SetText(""); + + private void CloudButtonClick(UIMouseEvent evt, UIElement listeningElement) + { + if (this._data.IsCloudSave) + this._data.MoveToLocal(); + else + this._data.MoveToCloud(); + ((UIImageButton) evt.Target).SetImage(this._data.IsCloudSave ? this._buttonCloudActiveTexture : this._buttonCloudInactiveTexture); + if (this._data.IsCloudSave) + this._buttonLabel.SetText(Language.GetTextValue("UI.MoveOffCloud")); + else + this._buttonLabel.SetText(Language.GetTextValue("UI.MoveToCloud")); + } + + private void DeleteButtonClick(UIMouseEvent evt, UIElement listeningElement) + { + for (int index = 0; index < Main.WorldList.Count; ++index) + { + if (Main.WorldList[index] == this._data) + { + SoundEngine.PlaySound(10); + Main.selectedWorld = index; + Main.menuMode = 9; + break; + } + } + } + + private void PlayGame(UIMouseEvent evt, UIElement listeningElement) + { + if (listeningElement != evt.Target || this.TryMovingToRejectionMenuIfNeeded(this._data.GameMode)) + return; + this._data.SetAsActive(); + SoundEngine.PlaySound(10); + Main.GetInputText(""); + Main.menuMode = !Main.menuMultiplayer || SocialAPI.Network == null ? (!Main.menuMultiplayer ? 10 : 30) : 889; + if (Main.menuMultiplayer) + return; + WorldGen.playWorld(); + } + + private bool TryMovingToRejectionMenuIfNeeded(int worldGameMode) + { + GameModeData gameModeData; + if (!Main.RegisterdGameModes.TryGetValue(worldGameMode, out gameModeData)) + { + SoundEngine.PlaySound(10); + Main.statusText = Language.GetTextValue("UI.WorldCannotBeLoadedBecauseItHasAnInvalidGameMode"); + Main.menuMode = 1000000; + return true; + } + bool flag = Main.ActivePlayerFileData.Player.difficulty == (byte) 3; + bool isJourneyMode = gameModeData.IsJourneyMode; + if (flag && !isJourneyMode) + { + SoundEngine.PlaySound(10); + Main.statusText = Language.GetTextValue("UI.PlayerIsCreativeAndWorldIsNotCreative"); + Main.menuMode = 1000000; + return true; + } + if (!(!flag & isJourneyMode)) + return false; + SoundEngine.PlaySound(10); + Main.statusText = Language.GetTextValue("UI.PlayerIsNotCreativeAndWorldIsCreative"); + Main.menuMode = 1000000; + return true; + } + + private void FavoriteButtonClick(UIMouseEvent evt, UIElement listeningElement) + { + this._data.ToggleFavorite(); + ((UIImageButton) evt.Target).SetImage(this._data.IsFavorite ? this._buttonFavoriteActiveTexture : this._buttonFavoriteInactiveTexture); + ((UIImageButton) evt.Target).SetVisibility(1f, this._data.IsFavorite ? 0.8f : 0.4f); + if (this._data.IsFavorite) + { + this._buttonLabel.SetText(Language.GetTextValue("UI.Unfavorite")); + this._deleteButton.OnClick -= new UIElement.MouseEvent(this.DeleteButtonClick); + } + else + { + this._buttonLabel.SetText(Language.GetTextValue("UI.Favorite")); + this._deleteButton.OnClick += new UIElement.MouseEvent(this.DeleteButtonClick); + } + if (!(this.Parent.Parent is UIList parent)) + return; + parent.UpdateOrder(); + } + + private void SeedButtonClick(UIMouseEvent evt, UIElement listeningElement) + { + Platform.Get().Value = this._data.GetFullSeedText(); + this._buttonLabel.SetText(Language.GetTextValue("UI.SeedCopied")); + } + + public override int CompareTo(object obj) => obj is UIWorldListItem uiWorldListItem ? this._orderInList.CompareTo(uiWorldListItem._orderInList) : base.CompareTo(obj); + + public override void MouseOver(UIMouseEvent evt) + { + base.MouseOver(evt); + this.SetColorsToHovered(); + } + + public override void MouseOut(UIMouseEvent evt) + { + base.MouseOut(evt); + this.SetColorsToNotHovered(); + } + + private void DrawPanel(SpriteBatch spriteBatch, Vector2 position, float width) + { + spriteBatch.Draw(this._innerPanelTexture.Value, position, new Rectangle?(new Rectangle(0, 0, 8, this._innerPanelTexture.Height())), Color.White); + spriteBatch.Draw(this._innerPanelTexture.Value, new Vector2(position.X + 8f, position.Y), new Rectangle?(new Rectangle(8, 0, 8, this._innerPanelTexture.Height())), Color.White, 0.0f, Vector2.Zero, new Vector2((float) (((double) width - 16.0) / 8.0), 1f), SpriteEffects.None, 0.0f); + spriteBatch.Draw(this._innerPanelTexture.Value, new Vector2((float) ((double) position.X + (double) width - 8.0), position.Y), new Rectangle?(new Rectangle(16, 0, 8, this._innerPanelTexture.Height())), Color.White); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + base.DrawSelf(spriteBatch); + CalculatedStyle innerDimensions = this.GetInnerDimensions(); + CalculatedStyle dimensions = this._worldIcon.GetDimensions(); + float x1 = dimensions.X + dimensions.Width; + Color color1 = this._data.IsValid ? Color.White : Color.Red; + Utils.DrawBorderString(spriteBatch, this._data.Name, new Vector2(x1 + 6f, dimensions.Y - 2f), color1); + spriteBatch.Draw(this._dividerTexture.Value, new Vector2(x1, innerDimensions.Y + 21f), new Rectangle?(), Color.White, 0.0f, Vector2.Zero, new Vector2((float) (((double) this.GetDimensions().X + (double) this.GetDimensions().Width - (double) x1) / 8.0), 1f), SpriteEffects.None, 0.0f); + Vector2 position = new Vector2(x1 + 6f, innerDimensions.Y + 29f); + float width1 = 100f; + this.DrawPanel(spriteBatch, position, width1); + Color color2 = Color.White; + string textValue1; + switch (this._data.GameMode) + { + case 1: + textValue1 = Language.GetTextValue("UI.Expert"); + color2 = Main.mcColor; + break; + case 2: + textValue1 = Language.GetTextValue("UI.Master"); + color2 = Main.hcColor; + break; + case 3: + textValue1 = Language.GetTextValue("UI.Creative"); + color2 = Main.creativeModeColor; + break; + default: + textValue1 = Language.GetTextValue("UI.Normal"); + break; + } + float x2 = FontAssets.MouseText.Value.MeasureString(textValue1).X; + float x3 = (float) ((double) width1 * 0.5 - (double) x2 * 0.5); + Utils.DrawBorderString(spriteBatch, textValue1, position + new Vector2(x3, 3f), color2); + position.X += width1 + 5f; + float width2 = 150f; + if (!GameCulture.FromCultureName(GameCulture.CultureName.English).IsActive) + width2 += 40f; + this.DrawPanel(spriteBatch, position, width2); + string textValue2 = Language.GetTextValue("UI.WorldSizeFormat", (object) this._data.WorldSizeName); + float x4 = FontAssets.MouseText.Value.MeasureString(textValue2).X; + float x5 = (float) ((double) width2 * 0.5 - (double) x4 * 0.5); + Utils.DrawBorderString(spriteBatch, textValue2, position + new Vector2(x5, 3f), Color.White); + position.X += width2 + 5f; + float width3 = innerDimensions.X + innerDimensions.Width - position.X; + this.DrawPanel(spriteBatch, position, width3); + string textValue3 = Language.GetTextValue("UI.WorldCreatedFormat", !GameCulture.FromCultureName(GameCulture.CultureName.English).IsActive ? (object) this._data.CreationTime.ToShortDateString() : (object) this._data.CreationTime.ToString("d MMMM yyyy")); + float x6 = FontAssets.MouseText.Value.MeasureString(textValue3).X; + float x7 = (float) ((double) width3 * 0.5 - (double) x6 * 0.5); + Utils.DrawBorderString(spriteBatch, textValue3, position + new Vector2(x7, 3f), Color.White); + position.X += width3 + 5f; + } + } +} diff --git a/GameContent/UI/EmoteBubble.cs b/GameContent/UI/EmoteBubble.cs new file mode 100644 index 0000000..54a7b64 --- /dev/null +++ b/GameContent/UI/EmoteBubble.cs @@ -0,0 +1,846 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.EmoteBubble +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using Terraria.GameContent.Events; +using Terraria.ID; + +namespace Terraria.GameContent.UI +{ + public class EmoteBubble + { + private static int[] CountNPCs = new int[663]; + public static Dictionary byID = new Dictionary(); + private static List toClean = new List(); + public static int NextID; + public int ID; + public WorldUIAnchor anchor; + public int lifeTime; + public int lifeTimeStart; + public int emote; + public int metadata; + private const int frameSpeed = 8; + public int frameCounter; + public int frame; + public const int EMOTE_SHEET_HORIZONTAL_FRAMES = 8; + public const int EMOTE_SHEET_EMOTES_PER_ROW = 4; + public const int EMOTE_SHEET_VERTICAL_FRAMES = 38; + + public static void UpdateAll() + { + lock (EmoteBubble.byID) + { + EmoteBubble.toClean.Clear(); + foreach (KeyValuePair keyValuePair in EmoteBubble.byID) + { + keyValuePair.Value.Update(); + if (keyValuePair.Value.lifeTime <= 0) + EmoteBubble.toClean.Add(keyValuePair.Key); + } + foreach (int key in EmoteBubble.toClean) + EmoteBubble.byID.Remove(key); + EmoteBubble.toClean.Clear(); + } + } + + public static void DrawAll(SpriteBatch sb) + { + lock (EmoteBubble.byID) + { + foreach (KeyValuePair keyValuePair in EmoteBubble.byID) + keyValuePair.Value.Draw(sb); + } + } + + public static Tuple SerializeNetAnchor(WorldUIAnchor anch) + { + if (anch.type != WorldUIAnchor.AnchorType.Entity) + return Tuple.Create(0, 0); + int num = 0; + if (anch.entity is NPC) + num = 0; + else if (anch.entity is Player) + num = 1; + else if (anch.entity is Projectile) + num = 2; + return Tuple.Create(num, anch.entity.whoAmI); + } + + public static WorldUIAnchor DeserializeNetAnchor(int type, int meta) + { + if (type == 0) + return new WorldUIAnchor((Entity) Main.npc[meta]); + if (type == 1) + return new WorldUIAnchor((Entity) Main.player[meta]); + if (type == 2) + return new WorldUIAnchor((Entity) Main.projectile[meta]); + throw new Exception("How did you end up getting this?"); + } + + public static int AssignNewID() => EmoteBubble.NextID++; + + public static int NewBubble(int emoticon, WorldUIAnchor bubbleAnchor, int time) + { + EmoteBubble emoteBubble = new EmoteBubble(emoticon, bubbleAnchor, time) + { + ID = EmoteBubble.AssignNewID() + }; + EmoteBubble.byID[emoteBubble.ID] = emoteBubble; + if (Main.netMode == 2) + { + Tuple tuple = EmoteBubble.SerializeNetAnchor(bubbleAnchor); + NetMessage.SendData(91, number: emoteBubble.ID, number2: ((float) tuple.Item1), number3: ((float) tuple.Item2), number4: ((float) time), number5: emoticon); + } + EmoteBubble.OnBubbleChange(emoteBubble.ID); + return emoteBubble.ID; + } + + public static int NewBubbleNPC(WorldUIAnchor bubbleAnchor, int time, WorldUIAnchor other = null) + { + EmoteBubble emoteBubble = new EmoteBubble(0, bubbleAnchor, time) + { + ID = EmoteBubble.AssignNewID() + }; + EmoteBubble.byID[emoteBubble.ID] = emoteBubble; + emoteBubble.PickNPCEmote(other); + if (Main.netMode == 2) + { + Tuple tuple = EmoteBubble.SerializeNetAnchor(bubbleAnchor); + NetMessage.SendData(91, number: emoteBubble.ID, number2: ((float) tuple.Item1), number3: ((float) tuple.Item2), number4: ((float) time), number5: emoteBubble.emote, number6: emoteBubble.metadata); + } + return emoteBubble.ID; + } + + public static void CheckForNPCsToReactToEmoteBubble(int emoteID, Player player) + { + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc != null && npc.active && npc.aiStyle == 7 && npc.townNPC && (double) npc.ai[0] < 2.0 && (player.CanBeTalkedTo && (double) player.Distance(npc.Center) < 200.0 || !Collision.CanHitLine(npc.Top, 0, 0, player.Top, 0, 0))) + { + int directionInt = ((double) npc.position.X < (double) player.position.X).ToDirectionInt(); + npc.ai[0] = 19f; + npc.ai[1] = 220f; + npc.ai[2] = (float) player.whoAmI; + npc.direction = directionInt; + npc.netUpdate = true; + } + } + } + + public EmoteBubble(int emotion, WorldUIAnchor bubbleAnchor, int time = 180) + { + this.anchor = bubbleAnchor; + this.emote = emotion; + this.lifeTime = time; + this.lifeTimeStart = time; + } + + private void Update() + { + if (--this.lifeTime <= 0 || ++this.frameCounter < 8) + return; + this.frameCounter = 0; + if (++this.frame < 2) + return; + this.frame = 0; + } + + private void Draw(SpriteBatch sb) + { + Texture2D texture2D = TextureAssets.Extra[48].Value; + SpriteEffects effect = SpriteEffects.None; + Vector2 vector2 = this.GetPosition(out effect).Floor(); + bool flag = this.lifeTime < 6 || this.lifeTimeStart - this.lifeTime < 6; + Rectangle rectangle = texture2D.Frame(8, 38, flag ? 0 : 1); + Vector2 origin = new Vector2((float) (rectangle.Width / 2), (float) rectangle.Height); + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + { + origin.Y = 0.0f; + effect |= SpriteEffects.FlipVertically; + vector2 = Main.ReverseGravitySupport(vector2); + } + sb.Draw(texture2D, vector2, new Rectangle?(rectangle), Color.White, 0.0f, origin, 1f, effect, 0.0f); + if (flag) + return; + if (this.emote >= 0) + { + if ((this.emote == 87 || this.emote == 89) && effect.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + { + effect &= ~SpriteEffects.FlipHorizontally; + vector2.X += 4f; + } + sb.Draw(texture2D, vector2, new Rectangle?(texture2D.Frame(8, 38, this.emote * 2 % 8 + this.frame, 1 + this.emote / 4)), Color.White, 0.0f, origin, 1f, effect, 0.0f); + } + else + { + if (this.emote != -1) + return; + Texture2D texture = TextureAssets.NpcHead[this.metadata].Value; + float scale = 1f; + if ((double) texture.Width / 22.0 > 1.0) + scale = 22f / (float) texture.Width; + if ((double) texture.Height / 16.0 > 1.0 / (double) scale) + scale = 16f / (float) texture.Height; + sb.Draw(texture, vector2 + new Vector2(effect.HasFlag((Enum) SpriteEffects.FlipHorizontally) ? 1f : -1f, (float) (-rectangle.Height + 3)), new Rectangle?(), Color.White, 0.0f, new Vector2((float) (texture.Width / 2), 0.0f), scale, effect, 0.0f); + } + } + + private Vector2 GetPosition(out SpriteEffects effect) + { + switch (this.anchor.type) + { + case WorldUIAnchor.AnchorType.Entity: + effect = this.anchor.entity.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + return new Vector2(this.anchor.entity.Top.X, this.anchor.entity.VisualPosition.Y) + new Vector2((float) (-this.anchor.entity.direction * this.anchor.entity.width) * 0.75f, 2f) - Main.screenPosition; + case WorldUIAnchor.AnchorType.Tile: + effect = SpriteEffects.None; + return this.anchor.pos - Main.screenPosition + new Vector2(0.0f, (float) (-(double) this.anchor.size.Y / 2.0)); + case WorldUIAnchor.AnchorType.Pos: + effect = SpriteEffects.None; + return this.anchor.pos - Main.screenPosition; + default: + effect = SpriteEffects.None; + return new Vector2((float) Main.screenWidth, (float) Main.screenHeight) / 2f; + } + } + + public static void OnBubbleChange(int bubbleID) + { + EmoteBubble emoteBubble1 = EmoteBubble.byID[bubbleID]; + if (emoteBubble1.anchor.type != WorldUIAnchor.AnchorType.Entity || !(emoteBubble1.anchor.entity is Player entity)) + return; + foreach (EmoteBubble emoteBubble2 in EmoteBubble.byID.Values) + { + if (emoteBubble2.anchor.type == WorldUIAnchor.AnchorType.Entity && emoteBubble2.anchor.entity == entity && emoteBubble2.ID != bubbleID) + emoteBubble2.lifeTime = 6; + } + } + + public void PickNPCEmote(WorldUIAnchor other = null) + { + Player plr = Main.player[(int) Player.FindClosest(this.anchor.entity.Center, 0, 0)]; + List list = new List(); + bool flag = false; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].boss) + flag = true; + } + if (!flag) + { + if (Main.rand.Next(3) == 0) + this.ProbeTownNPCs(list); + if (Main.rand.Next(3) == 0) + this.ProbeEmotions(list); + if (Main.rand.Next(3) == 0) + this.ProbeBiomes(list, plr); + if (Main.rand.Next(2) == 0) + this.ProbeCritters(list); + if (Main.rand.Next(2) == 0) + this.ProbeItems(list, plr); + if (Main.rand.Next(5) == 0) + this.ProbeBosses(list); + if (Main.rand.Next(2) == 0) + this.ProbeDebuffs(list, plr); + if (Main.rand.Next(2) == 0) + this.ProbeEvents(list); + if (Main.rand.Next(2) == 0) + this.ProbeWeather(list, plr); + this.ProbeExceptions(list, plr, other); + } + else + this.ProbeCombat(list); + if (list.Count <= 0) + return; + this.emote = list[Main.rand.Next(list.Count)]; + } + + private void ProbeCombat(List list) + { + list.Add(16); + list.Add(1); + list.Add(2); + list.Add(91); + list.Add(93); + list.Add(84); + list.Add(84); + } + + private void ProbeWeather(List list, Player plr) + { + if ((double) Main.cloudBGActive > 0.0) + list.Add(96); + if ((double) Main.cloudAlpha > 0.0) + { + if (!Main.dayTime) + list.Add(5); + list.Add(4); + if (plr.ZoneSnow) + list.Add(98); + if ((double) plr.position.X < 4000.0 || (double) plr.position.X > (double) (Main.maxTilesX * 16 - 4000) && (double) plr.position.Y < Main.worldSurface / 16.0) + list.Add(97); + } + else + list.Add(95); + if (!plr.ZoneHallow) + return; + list.Add(6); + } + + private void ProbeEvents(List list) + { + if (BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0) + list.Add(Utils.SelectRandom(Main.rand, (int) sbyte.MaxValue, 128, 129, 126)); + if (Main.bloodMoon || !Main.dayTime && Main.rand.Next(4) == 0) + list.Add(18); + if (Main.eclipse || Main.hardMode && Main.rand.Next(4) == 0) + list.Add(19); + if ((!Main.dayTime || WorldGen.spawnMeteor) && NPC.downedBoss2) + list.Add(99); + if (Main.pumpkinMoon || (NPC.downedHalloweenKing || NPC.downedHalloweenTree) && !Main.dayTime) + list.Add(20); + if (Main.snowMoon || (NPC.downedChristmasIceQueen || NPC.downedChristmasSantank || NPC.downedChristmasTree) && !Main.dayTime) + list.Add(21); + if (!DD2Event.Ongoing && !DD2Event.DownedInvasionAnyDifficulty) + return; + list.Add(133); + } + + private void ProbeDebuffs(List list, Player plr) + { + if ((double) plr.Center.Y > (double) (Main.maxTilesY * 16 - 3200) || plr.onFire || ((NPC) this.anchor.entity).onFire || plr.onFire2) + list.Add(9); + if (Main.rand.Next(2) == 0) + list.Add(11); + if (plr.poisoned || ((NPC) this.anchor.entity).poisoned || plr.ZoneJungle) + list.Add(8); + if (plr.inventory[plr.selectedItem].type != 215 && Main.rand.Next(3) != 0) + return; + list.Add(10); + } + + private void ProbeItems(List list, Player plr) + { + list.Add(7); + list.Add(73); + list.Add(74); + list.Add(75); + list.Add(78); + list.Add(90); + if (plr.statLife >= plr.statLifeMax2 / 2) + return; + list.Add(84); + } + + private void ProbeTownNPCs(List list) + { + for (int index = 0; index < 663; ++index) + EmoteBubble.CountNPCs[index] = 0; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active) + ++EmoteBubble.CountNPCs[Main.npc[index].type]; + } + int type = ((NPC) this.anchor.entity).type; + for (int index = 0; index < 663; ++index) + { + if (NPCID.Sets.FaceEmote[index] > 0 && EmoteBubble.CountNPCs[index] > 0 && index != type) + list.Add(NPCID.Sets.FaceEmote[index]); + } + } + + private void ProbeBiomes(List list, Player plr) + { + if ((double) plr.position.Y / 16.0 < Main.worldSurface * 0.45) + list.Add(22); + else if ((double) plr.position.Y / 16.0 > Main.rockLayer + (double) (Main.maxTilesY / 2) - 100.0) + list.Add(31); + else if ((double) plr.position.Y / 16.0 > Main.rockLayer) + list.Add(30); + else if (plr.ZoneHallow) + list.Add(27); + else if (plr.ZoneCorrupt) + list.Add(26); + else if (plr.ZoneCrimson) + list.Add(25); + else if (plr.ZoneJungle) + list.Add(24); + else if (plr.ZoneSnow) + list.Add(32); + else if ((double) plr.position.Y / 16.0 < Main.worldSurface && ((double) plr.position.X < 4000.0 || (double) plr.position.X > (double) (16 * (Main.maxTilesX - 250)))) + list.Add(29); + else if (plr.ZoneDesert) + list.Add(28); + else + list.Add(23); + } + + private void ProbeCritters(List list) + { + Vector2 center = this.anchor.entity.Center; + float num1 = 1f; + float num2 = 1f; + if ((double) center.Y < Main.rockLayer * 16.0) + num2 = 0.2f; + else + num1 = 0.2f; + if ((double) Main.rand.NextFloat() <= (double) num1) + { + if (Main.dayTime) + { + list.Add(13); + list.Add(12); + list.Add(68); + list.Add(62); + list.Add(63); + list.Add(69); + list.Add(70); + } + if (!Main.dayTime || Main.dayTime && (Main.time < 5400.0 || Main.time > 48600.0)) + list.Add(61); + if (NPC.downedGoblins) + list.Add(64); + if (NPC.downedFrost) + list.Add(66); + if (NPC.downedPirates) + list.Add(65); + if (NPC.downedMartians) + list.Add(71); + if (WorldGen.crimson) + list.Add(67); + } + if ((double) Main.rand.NextFloat() > (double) num2) + return; + list.Add(72); + list.Add(69); + } + + private void ProbeEmotions(List list) + { + list.Add(0); + list.Add(1); + list.Add(2); + list.Add(3); + list.Add(15); + list.Add(16); + list.Add(17); + list.Add(87); + list.Add(91); + list.Add(136); + list.Add(134); + list.Add(135); + list.Add(137); + list.Add(138); + list.Add(139); + if (!Main.bloodMoon || Main.dayTime) + return; + int num = Utils.SelectRandom(Main.rand, 16, 1, 138); + list.Add(num); + list.Add(num); + list.Add(num); + } + + private void ProbeBosses(List list) + { + int num = 0; + if (!NPC.downedBoss1 && !Main.dayTime || NPC.downedBoss1) + num = 1; + if (NPC.downedBoss2) + num = 2; + if (NPC.downedQueenBee || NPC.downedBoss3) + num = 3; + if (Main.hardMode) + num = 4; + if (NPC.downedMechBossAny) + num = 5; + if (NPC.downedPlantBoss) + num = 6; + if (NPC.downedGolemBoss) + num = 7; + if (NPC.downedAncientCultist) + num = 8; + int maxValue = 10; + if (NPC.downedMoonlord) + maxValue = 1; + if (num >= 1 && num <= 2 || num >= 1 && Main.rand.Next(maxValue) == 0) + { + list.Add(39); + if (WorldGen.crimson) + list.Add(41); + else + list.Add(40); + list.Add(51); + } + if (num >= 2 && num <= 3 || num >= 2 && Main.rand.Next(maxValue) == 0) + { + list.Add(43); + list.Add(42); + } + if (num >= 4 && num <= 5 || num >= 4 && Main.rand.Next(maxValue) == 0) + { + list.Add(44); + list.Add(47); + list.Add(45); + list.Add(46); + } + if (num >= 5 && num <= 6 || num >= 5 && Main.rand.Next(maxValue) == 0) + { + if (!NPC.downedMechBoss1) + list.Add(47); + if (!NPC.downedMechBoss2) + list.Add(45); + if (!NPC.downedMechBoss3) + list.Add(46); + list.Add(48); + } + if (num == 6 || num >= 6 && Main.rand.Next(maxValue) == 0) + { + list.Add(48); + list.Add(49); + list.Add(50); + } + if (num == 7 || num >= 7 && Main.rand.Next(maxValue) == 0) + { + list.Add(49); + list.Add(50); + list.Add(52); + } + if (num == 8 || num >= 8 && Main.rand.Next(maxValue) == 0) + { + list.Add(52); + list.Add(53); + } + if (NPC.downedPirates && Main.expertMode) + list.Add(59); + if (NPC.downedMartians) + list.Add(60); + if (NPC.downedChristmasIceQueen) + list.Add(57); + if (NPC.downedChristmasSantank) + list.Add(58); + if (NPC.downedChristmasTree) + list.Add(56); + if (NPC.downedHalloweenKing) + list.Add(55); + if (NPC.downedHalloweenTree) + list.Add(54); + if (NPC.downedEmpressOfLight) + list.Add(143); + if (!NPC.downedQueenSlime) + return; + list.Add(144); + } + + private void ProbeExceptions(List list, Player plr, WorldUIAnchor other) + { + NPC entity = (NPC) this.anchor.entity; + if (entity.type == 17) + { + list.Add(80); + list.Add(85); + list.Add(85); + list.Add(85); + list.Add(85); + } + else if (entity.type == 18) + { + list.Add(73); + list.Add(73); + list.Add(84); + list.Add(75); + } + else if (entity.type == 19) + { + if (other != null && ((NPC) other.entity).type == 22) + { + list.Add(1); + list.Add(1); + list.Add(93); + list.Add(92); + } + else if (other != null && ((NPC) other.entity).type == 22) + { + list.Add(1); + list.Add(1); + list.Add(93); + list.Add(92); + } + else + { + list.Add(82); + list.Add(82); + list.Add(85); + list.Add(85); + list.Add(77); + list.Add(93); + } + } + else if (entity.type == 20) + { + if (list.Contains(121)) + { + list.Add(121); + list.Add(121); + } + list.Add(14); + list.Add(14); + } + else if (entity.type == 22) + { + if (!Main.bloodMoon) + { + if (other != null && ((NPC) other.entity).type == 19) + { + list.Add(1); + list.Add(1); + list.Add(93); + list.Add(92); + } + else + list.Add(79); + } + if (!Main.dayTime) + { + list.Add(16); + list.Add(16); + list.Add(16); + } + } + else if (entity.type == 37) + { + list.Add(43); + list.Add(43); + list.Add(43); + list.Add(72); + list.Add(72); + } + else if (entity.type == 38) + { + if (Main.bloodMoon) + { + list.Add(77); + list.Add(77); + list.Add(77); + list.Add(81); + } + else + { + list.Add(77); + list.Add(77); + list.Add(81); + list.Add(81); + list.Add(81); + list.Add(90); + list.Add(90); + } + } + else if (entity.type == 54) + { + if (Main.bloodMoon) + { + list.Add(43); + list.Add(72); + list.Add(1); + } + else + { + if (list.Contains(111)) + list.Add(111); + list.Add(17); + } + } + else if (entity.type == 107) + { + if (other != null && ((NPC) other.entity).type == 124) + { + list.Remove(111); + list.Add(0); + list.Add(0); + list.Add(0); + list.Add(17); + list.Add(17); + list.Add(86); + list.Add(88); + list.Add(88); + } + else + { + if (list.Contains(111)) + { + list.Add(111); + list.Add(111); + list.Add(111); + } + list.Add(91); + list.Add(92); + list.Add(91); + list.Add(92); + } + } + else if (entity.type == 108) + { + list.Add(100); + list.Add(89); + list.Add(11); + } + if (entity.type == 124) + { + if (other != null && ((NPC) other.entity).type == 107) + { + list.Remove(111); + list.Add(0); + list.Add(0); + list.Add(0); + list.Add(17); + list.Add(17); + list.Add(88); + list.Add(88); + } + else + { + if (list.Contains(109)) + { + list.Add(109); + list.Add(109); + list.Add(109); + } + if (list.Contains(108)) + { + list.Remove(108); + if (Main.hardMode) + { + list.Add(108); + list.Add(108); + } + else + { + list.Add(106); + list.Add(106); + } + } + list.Add(43); + list.Add(2); + } + } + else if (entity.type == 142) + { + list.Add(32); + list.Add(66); + list.Add(17); + list.Add(15); + list.Add(15); + } + else if (entity.type == 160) + { + list.Add(10); + list.Add(89); + list.Add(94); + list.Add(8); + } + else if (entity.type == 178) + { + list.Add(83); + list.Add(83); + } + else if (entity.type == 207) + { + list.Add(28); + list.Add(95); + list.Add(93); + } + else if (entity.type == 208) + { + list.Add(94); + list.Add(17); + list.Add(3); + list.Add(77); + } + else if (entity.type == 209) + { + list.Add(48); + list.Add(83); + list.Add(5); + list.Add(5); + } + else if (entity.type == 227) + { + list.Add(63); + list.Add(68); + } + else if (entity.type == 228) + { + list.Add(24); + list.Add(24); + list.Add(95); + list.Add(8); + } + else if (entity.type == 229) + { + list.Add(93); + list.Add(9); + list.Add(65); + list.Add(120); + list.Add(59); + } + else if (entity.type == 353) + { + if (list.Contains(104)) + { + list.Add(104); + list.Add(104); + } + if (list.Contains(111)) + { + list.Add(111); + list.Add(111); + } + list.Add(67); + } + else if (entity.type == 368) + { + list.Add(85); + list.Add(7); + list.Add(79); + } + else if (entity.type == 369) + { + if (Main.bloodMoon) + return; + list.Add(70); + list.Add(70); + list.Add(76); + list.Add(76); + list.Add(79); + list.Add(79); + if ((double) entity.position.Y >= Main.worldSurface) + return; + list.Add(29); + } + else if (entity.type == 453) + { + list.Add(72); + list.Add(69); + list.Add(87); + list.Add(3); + } + else + { + if (entity.type != 441) + return; + list.Add(100); + list.Add(100); + list.Add(1); + list.Add(1); + list.Add(1); + list.Add(87); + } + } + } +} diff --git a/GameContent/UI/EmoteID.cs b/GameContent/UI/EmoteID.cs new file mode 100644 index 0000000..cf6a6dd --- /dev/null +++ b/GameContent/UI/EmoteID.cs @@ -0,0 +1,162 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.EmoteID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using ReLogic.Reflection; + +namespace Terraria.GameContent.UI +{ + public class EmoteID + { + public const int ItemDisplay = -1; + public const int Count = 145; + public const int RPSWinScissors = 33; + public const int RPSWinRock = 34; + public const int RPSWinPaper = 35; + public const int RPSScissors = 36; + public const int RPSRock = 37; + public const int RPSPaper = 38; + public const int WeatherRain = 4; + public const int WeatherLightning = 5; + public const int WeatherRainbow = 6; + public const int WeatherSunny = 95; + public const int WeatherCloudy = 96; + public const int WeatherStorming = 97; + public const int WeatherSnowstorm = 98; + public const int EventBloodmoon = 18; + public const int EventEclipse = 19; + public const int EventPumpkin = 20; + public const int EventSnow = 21; + public const int EventMeteor = 99; + public const int ItemRing = 7; + public const int ItemLifePotion = 73; + public const int ItemManaPotion = 74; + public const int ItemSoup = 75; + public const int ItemCookedFish = 76; + public const int ItemAle = 77; + public const int ItemSword = 78; + public const int ItemFishingRod = 79; + public const int ItemBugNet = 80; + public const int ItemDynamite = 81; + public const int ItemMinishark = 82; + public const int ItemCog = 83; + public const int ItemTombstone = 84; + public const int ItemGoldpile = 85; + public const int ItemDiamondRing = 86; + public const int ItemPickaxe = 90; + public const int DebuffPoison = 8; + public const int DebuffBurn = 9; + public const int DebuffSilence = 10; + public const int DebuffCurse = 11; + public const int CritterBee = 12; + public const int CritterSlime = 13; + public const int CritterZombie = 61; + public const int CritterBunny = 62; + public const int CritterButterfly = 63; + public const int CritterGoblin = 64; + public const int CritterPirate = 65; + public const int CritterSnowman = 66; + public const int CritterSpider = 67; + public const int CritterBird = 68; + public const int CritterMouse = 69; + public const int CritterGoldfish = 70; + public const int CritterMartian = 71; + public const int CritterSkeleton = 72; + public const int BossEoC = 39; + public const int BossEoW = 40; + public const int BossBoC = 41; + public const int BossKingSlime = 51; + public const int BossQueenBee = 42; + public const int BossSkeletron = 43; + public const int BossWoF = 44; + public const int BossDestroyer = 45; + public const int BossSkeletronPrime = 46; + public const int BossTwins = 47; + public const int BossPlantera = 48; + public const int BossGolem = 49; + public const int BossFishron = 50; + public const int BossCultist = 52; + public const int BossMoonmoon = 53; + public const int BossMourningWood = 54; + public const int BossPumpking = 55; + public const int BossEverscream = 56; + public const int BossIceQueen = 57; + public const int BossSantank = 58; + public const int BossPirateship = 59; + public const int BossMartianship = 60; + public const int BossEmpressOfLight = 143; + public const int BossQueenSlime = 144; + public const int EmotionLove = 0; + public const int EmotionAnger = 1; + public const int EmotionCry = 2; + public const int EmotionAlert = 3; + public const int EmoteLaugh = 15; + public const int EmoteFear = 16; + public const int EmoteNote = 17; + public const int EmoteConfused = 87; + public const int EmoteKiss = 88; + public const int EmoteSleep = 89; + public const int EmoteRun = 91; + public const int EmoteKick = 92; + public const int EmoteFight = 93; + public const int EmoteEating = 94; + public const int EmoteSadness = 134; + public const int EmoteAnger = 135; + public const int EmoteHappiness = 136; + public const int EmoteWink = 137; + public const int EmoteScowl = 138; + public const int EmoteSilly = 139; + public const int MiscTree = 14; + public const int MiscFire = 100; + public const int BiomeSky = 22; + public const int BiomeOtherworld = 23; + public const int BiomeJungle = 24; + public const int BiomeCrimson = 25; + public const int BiomeCorruption = 26; + public const int BiomeHallow = 27; + public const int BiomeDesert = 28; + public const int BiomeBeach = 29; + public const int BiomeRocklayer = 30; + public const int BiomeLavalayer = 31; + public const int BiomeSnow = 32; + public const int TownMerchant = 101; + public const int TownNurse = 102; + public const int TownArmsDealer = 103; + public const int TownDryad = 104; + public const int TownGuide = 105; + public const int TownOldman = 106; + public const int TownDemolitionist = 107; + public const int TownClothier = 108; + public const int TownGoblinTinkerer = 109; + public const int TownWizard = 110; + public const int TownMechanic = 111; + public const int TownSanta = 112; + public const int TownTruffle = 113; + public const int TownSteampunker = 114; + public const int TownDyeTrader = 115; + public const int TownPartyGirl = 116; + public const int TownCyborg = 117; + public const int TownPainter = 118; + public const int TownWitchDoctor = 119; + public const int TownPirate = 120; + public const int TownStylist = 121; + public const int TownTravellingMerchant = 122; + public const int TownAngler = 123; + public const int TownSkeletonMerchant = 124; + public const int TownTaxCollector = 125; + public const int TownGolfer = 140; + public const int TownBestiaryGirl = 141; + public const int TownBestiaryGirlFox = 142; + public const int PartyPresent = 126; + public const int PartyBalloons = 127; + public const int PartyCake = 128; + public const int PartyHats = 129; + public const int TownBartender = 130; + public const int ItemBeer = 131; + public const int ItemDefenderMedal = 132; + public const int EventOldOnesArmy = 133; + public static readonly IdDictionary Search = IdDictionary.Create(); + } +} diff --git a/GameContent/UI/FancyClassicPlayerResourcesDisplaySet.cs b/GameContent/UI/FancyClassicPlayerResourcesDisplaySet.cs new file mode 100644 index 0000000..2afc928 --- /dev/null +++ b/GameContent/UI/FancyClassicPlayerResourcesDisplaySet.cs @@ -0,0 +1,297 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.FancyClassicPlayerResourcesDisplaySet +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using ReLogic.Graphics; + +namespace Terraria.GameContent.UI +{ + public class FancyClassicPlayerResourcesDisplaySet : IPlayerResourcesDisplaySet + { + private float _currentPlayerLife; + private float _lifePerHeart; + private int _playerLifeFruitCount; + private int _lastHeartFillingIndex; + private int _lastHeartPanelIndex; + private int _heartCountRow1; + private int _heartCountRow2; + private int _starCount; + private int _lastStarFillingIndex; + private float _manaPerStar; + private float _currentPlayerMana; + private Asset _heartLeft; + private Asset _heartMiddle; + private Asset _heartRight; + private Asset _heartRightFancy; + private Asset _heartFill; + private Asset _heartFillHoney; + private Asset _heartSingleFancy; + private Asset _starTop; + private Asset _starMiddle; + private Asset _starBottom; + private Asset _starSingle; + private Asset _starFill; + private bool _hoverLife; + private bool _hoverMana; + + public FancyClassicPlayerResourcesDisplaySet(string name, AssetRequestMode mode) + { + string str = "Images\\UI\\PlayerResourceSets\\" + name; + this._heartLeft = Main.Assets.Request(str + "\\Heart_Left", mode); + this._heartMiddle = Main.Assets.Request(str + "\\Heart_Middle", mode); + this._heartRight = Main.Assets.Request(str + "\\Heart_Right", mode); + this._heartRightFancy = Main.Assets.Request(str + "\\Heart_Right_Fancy", mode); + this._heartFill = Main.Assets.Request(str + "\\Heart_Fill", mode); + this._heartFillHoney = Main.Assets.Request(str + "\\Heart_Fill_B", mode); + this._heartSingleFancy = Main.Assets.Request(str + "\\Heart_Single_Fancy", mode); + this._starTop = Main.Assets.Request(str + "\\Star_A", mode); + this._starMiddle = Main.Assets.Request(str + "\\Star_B", mode); + this._starBottom = Main.Assets.Request(str + "\\Star_C", mode); + this._starSingle = Main.Assets.Request(str + "\\Star_Single", mode); + this._starFill = Main.Assets.Request(str + "\\Star_Fill", mode); + } + + public void Draw() + { + Player localPlayer = Main.LocalPlayer; + SpriteBatch spriteBatch = Main.spriteBatch; + this.PrepareFields(localPlayer); + this.DrawLifeBar(spriteBatch); + this.DrawManaBar(spriteBatch); + } + + private void DrawLifeBar(SpriteBatch spriteBatch) + { + Vector2 vector2 = new Vector2((float) (Main.screenWidth - 300 + 4), 15f); + bool isHovered = false; + new ResourceDrawSettings() + { + ElementCount = this._heartCountRow1, + ElementIndexOffset = 0, + TopLeftAnchor = vector2, + GetTextureMethod = new ResourceDrawSettings.TextureGetter(this.HeartPanelDrawer), + OffsetPerDraw = Vector2.Zero, + OffsetPerDrawByTexturePercentile = Vector2.UnitX, + OffsetSpriteAnchor = Vector2.Zero, + OffsetSpriteAnchorByTexturePercentile = Vector2.Zero + }.Draw(spriteBatch, ref isHovered); + new ResourceDrawSettings() + { + ElementCount = this._heartCountRow2, + ElementIndexOffset = 10, + TopLeftAnchor = (vector2 + new Vector2(0.0f, 28f)), + GetTextureMethod = new ResourceDrawSettings.TextureGetter(this.HeartPanelDrawer), + OffsetPerDraw = Vector2.Zero, + OffsetPerDrawByTexturePercentile = Vector2.UnitX, + OffsetSpriteAnchor = Vector2.Zero, + OffsetSpriteAnchorByTexturePercentile = Vector2.Zero + }.Draw(spriteBatch, ref isHovered); + new ResourceDrawSettings() + { + ElementCount = this._heartCountRow1, + ElementIndexOffset = 0, + TopLeftAnchor = (vector2 + new Vector2(15f, 15f)), + GetTextureMethod = new ResourceDrawSettings.TextureGetter(this.HeartFillingDrawer), + OffsetPerDraw = (Vector2.UnitX * 2f), + OffsetPerDrawByTexturePercentile = Vector2.UnitX, + OffsetSpriteAnchor = Vector2.Zero, + OffsetSpriteAnchorByTexturePercentile = new Vector2(0.5f, 0.5f) + }.Draw(spriteBatch, ref isHovered); + new ResourceDrawSettings() + { + ElementCount = this._heartCountRow2, + ElementIndexOffset = 10, + TopLeftAnchor = (vector2 + new Vector2(15f, 15f) + new Vector2(0.0f, 28f)), + GetTextureMethod = new ResourceDrawSettings.TextureGetter(this.HeartFillingDrawer), + OffsetPerDraw = (Vector2.UnitX * 2f), + OffsetPerDrawByTexturePercentile = Vector2.UnitX, + OffsetSpriteAnchor = Vector2.Zero, + OffsetSpriteAnchorByTexturePercentile = new Vector2(0.5f, 0.5f) + }.Draw(spriteBatch, ref isHovered); + this._hoverLife = isHovered; + } + + private static void DrawLifeBarText(SpriteBatch spriteBatch, Vector2 topLeftAnchor) + { + Vector2 vector2_1 = topLeftAnchor + new Vector2(130f, -24f); + Player localPlayer = Main.LocalPlayer; + Color color = new Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor); + string str = Lang.inter[0].Value + " " + (object) localPlayer.statLifeMax2 + "/" + (object) localPlayer.statLifeMax2; + Vector2 vector2_2 = FontAssets.MouseText.Value.MeasureString(str); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, Lang.inter[0].Value, vector2_1 + new Vector2((float) (-(double) vector2_2.X * 0.5), 0.0f), color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, localPlayer.statLife.ToString() + "/" + (object) localPlayer.statLifeMax2, vector2_1 + new Vector2(vector2_2.X * 0.5f, 0.0f), color, 0.0f, new Vector2(FontAssets.MouseText.Value.MeasureString(localPlayer.statLife.ToString() + "/" + (object) localPlayer.statLifeMax2).X, 0.0f), 1f, SpriteEffects.None, 0.0f); + } + + private void DrawManaBar(SpriteBatch spriteBatch) + { + Vector2 vector2 = new Vector2((float) (Main.screenWidth - 40), 22f); + int starCount = this._starCount; + bool isHovered = false; + new ResourceDrawSettings() + { + ElementCount = this._starCount, + ElementIndexOffset = 0, + TopLeftAnchor = vector2, + GetTextureMethod = new ResourceDrawSettings.TextureGetter(this.StarPanelDrawer), + OffsetPerDraw = Vector2.Zero, + OffsetPerDrawByTexturePercentile = Vector2.UnitY, + OffsetSpriteAnchor = Vector2.Zero, + OffsetSpriteAnchorByTexturePercentile = Vector2.Zero + }.Draw(spriteBatch, ref isHovered); + new ResourceDrawSettings() + { + ElementCount = this._starCount, + ElementIndexOffset = 0, + TopLeftAnchor = (vector2 + new Vector2(15f, 16f)), + GetTextureMethod = new ResourceDrawSettings.TextureGetter(this.StarFillingDrawer), + OffsetPerDraw = (Vector2.UnitY * -2f), + OffsetPerDrawByTexturePercentile = Vector2.UnitY, + OffsetSpriteAnchor = Vector2.Zero, + OffsetSpriteAnchorByTexturePercentile = new Vector2(0.5f, 0.5f) + }.Draw(spriteBatch, ref isHovered); + this._hoverMana = isHovered; + } + + private static void DrawManaText(SpriteBatch spriteBatch) + { + Vector2 vector2 = FontAssets.MouseText.Value.MeasureString(Lang.inter[2].Value); + Color color = new Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor); + int num = 50; + if ((double) vector2.X >= 45.0) + num = (int) vector2.X + 5; + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, Lang.inter[2].Value, new Vector2((float) (Main.screenWidth - num), 6f), color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + + private void HeartPanelDrawer( + int elementIndex, + int firstElementIndex, + int lastElementIndex, + out Asset sprite, + out Vector2 offset, + out float drawScale, + out Rectangle? sourceRect) + { + sourceRect = new Rectangle?(); + offset = Vector2.Zero; + sprite = this._heartLeft; + drawScale = 1f; + if (elementIndex == lastElementIndex && elementIndex == firstElementIndex) + { + sprite = this._heartSingleFancy; + offset = new Vector2(-4f, -4f); + } + else if (elementIndex == lastElementIndex && lastElementIndex == this._lastHeartPanelIndex) + { + sprite = this._heartRightFancy; + offset = new Vector2(-8f, -4f); + } + else if (elementIndex == lastElementIndex) + { + sprite = this._heartRight; + } + else + { + if (elementIndex == firstElementIndex) + return; + sprite = this._heartMiddle; + } + } + + private void HeartFillingDrawer( + int elementIndex, + int firstElementIndex, + int lastElementIndex, + out Asset sprite, + out Vector2 offset, + out float drawScale, + out Rectangle? sourceRect) + { + sourceRect = new Rectangle?(); + offset = Vector2.Zero; + sprite = this._heartLeft; + sprite = elementIndex >= this._playerLifeFruitCount ? this._heartFill : this._heartFillHoney; + float lerpValue = Utils.GetLerpValue(this._lifePerHeart * (float) elementIndex, this._lifePerHeart * (float) (elementIndex + 1), this._currentPlayerLife, true); + drawScale = lerpValue; + if (elementIndex != this._lastHeartFillingIndex || (double) lerpValue <= 0.0) + return; + drawScale += Main.cursorScale - 1f; + } + + private void StarPanelDrawer( + int elementIndex, + int firstElementIndex, + int lastElementIndex, + out Asset sprite, + out Vector2 offset, + out float drawScale, + out Rectangle? sourceRect) + { + sourceRect = new Rectangle?(); + offset = Vector2.Zero; + sprite = this._starTop; + drawScale = 1f; + if (elementIndex == lastElementIndex && elementIndex == firstElementIndex) + sprite = this._starSingle; + else if (elementIndex == lastElementIndex) + { + sprite = this._starBottom; + offset = new Vector2(0.0f, 0.0f); + } + else + { + if (elementIndex == firstElementIndex) + return; + sprite = this._starMiddle; + } + } + + private void StarFillingDrawer( + int elementIndex, + int firstElementIndex, + int lastElementIndex, + out Asset sprite, + out Vector2 offset, + out float drawScale, + out Rectangle? sourceRect) + { + sourceRect = new Rectangle?(); + offset = Vector2.Zero; + sprite = this._starFill; + float lerpValue = Utils.GetLerpValue(this._manaPerStar * (float) elementIndex, this._manaPerStar * (float) (elementIndex + 1), this._currentPlayerMana, true); + drawScale = lerpValue; + if (elementIndex != this._lastStarFillingIndex || (double) lerpValue <= 0.0) + return; + drawScale += Main.cursorScale - 1f; + } + + private void PrepareFields(Player player) + { + PlayerStatsSnapshot playerStatsSnapshot = new PlayerStatsSnapshot(player); + this._playerLifeFruitCount = playerStatsSnapshot.LifeFruitCount; + this._lifePerHeart = playerStatsSnapshot.LifePerSegment; + this._currentPlayerLife = (float) playerStatsSnapshot.Life; + this._manaPerStar = playerStatsSnapshot.ManaPerSegment; + this._heartCountRow1 = Utils.Clamp((int) ((double) playerStatsSnapshot.LifeMax / (double) this._lifePerHeart), 0, 10); + this._heartCountRow2 = Utils.Clamp((int) ((double) (playerStatsSnapshot.LifeMax - 200) / (double) this._lifePerHeart), 0, 10); + this._lastHeartFillingIndex = (int) ((double) playerStatsSnapshot.Life / (double) this._lifePerHeart); + this._lastHeartPanelIndex = this._heartCountRow1 + this._heartCountRow2 - 1; + this._starCount = (int) ((double) playerStatsSnapshot.ManaMax / (double) this._manaPerStar); + this._currentPlayerMana = (float) playerStatsSnapshot.Mana; + this._lastStarFillingIndex = (int) ((double) this._currentPlayerMana / (double) this._manaPerStar); + } + + public void TryToHover() + { + if (this._hoverLife) + CommonResourceBarMethods.DrawLifeMouseOver(); + if (!this._hoverMana) + return; + CommonResourceBarMethods.DrawManaMouseOver(); + } + } +} diff --git a/GameContent/UI/GameTipsDisplay.cs b/GameContent/UI/GameTipsDisplay.cs new file mode 100644 index 0000000..c06d471 --- /dev/null +++ b/GameContent/UI/GameTipsDisplay.cs @@ -0,0 +1,157 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.GameTipsDisplay +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Graphics; +using System; +using System.Collections.Generic; +using Terraria.GameInput; +using Terraria.Localization; +using Terraria.UI.Chat; + +namespace Terraria.GameContent.UI +{ + public class GameTipsDisplay + { + private LocalizedText[] _tipsDefault; + private LocalizedText[] _tipsGamepad; + private LocalizedText[] _tipsKeyboard; + private readonly List _currentTips = new List(); + private LocalizedText _lastTip; + + public GameTipsDisplay() + { + this._tipsDefault = Language.FindAll(Lang.CreateDialogFilter("LoadingTips_Default.")); + this._tipsGamepad = Language.FindAll(Lang.CreateDialogFilter("LoadingTips_GamePad.")); + this._tipsKeyboard = Language.FindAll(Lang.CreateDialogFilter("LoadingTips_Keyboard.")); + this._lastTip = (LocalizedText) null; + } + + public void Update() + { + double time = Main.gameTimeCache.TotalGameTime.TotalSeconds; + this._currentTips.RemoveAll((Predicate) (x => x.IsExpired(time))); + bool flag = true; + foreach (GameTipsDisplay.GameTip currentTip in this._currentTips) + { + if (!currentTip.IsExpiring(time)) + { + flag = false; + break; + } + } + if (flag) + this.AddNewTip(time); + foreach (GameTipsDisplay.GameTip currentTip in this._currentTips) + currentTip.Update(time); + } + + public void ClearTips() => this._currentTips.Clear(); + + public void Draw() + { + SpriteBatch spriteBatch = Main.spriteBatch; + float screenWidth = (float) Main.screenWidth; + float y = (float) (Main.screenHeight - 150); + float num1 = (float) Main.screenWidth * 0.5f; + foreach (GameTipsDisplay.GameTip currentTip in this._currentTips) + { + if ((double) currentTip.ScreenAnchorX >= -0.5 && (double) currentTip.ScreenAnchorX <= 1.5) + { + DynamicSpriteFont font = FontAssets.MouseText.Value; + string text = font.CreateWrappedText(currentTip.Text, num1, Language.ActiveCulture.CultureInfo); + if (text.Split('\n').Length > 2) + text = font.CreateWrappedText(currentTip.Text, (float) ((double) num1 * 1.5 - 50.0), Language.ActiveCulture.CultureInfo); + if (WorldGen.drunkWorldGenText) + { + text = string.Concat((object) Main.rand.Next(999999999)); + for (int index = 0; index < 14; ++index) + { + if (Main.rand.Next(2) == 0) + text += (string) (object) Main.rand.Next(999999999); + } + } + if (WorldGen.getGoodWorldGen) + { + string str = ""; + for (int startIndex = text.Length - 1; startIndex >= 0; --startIndex) + str += text.Substring(startIndex, 1); + text = str; + } + Vector2 vector2 = font.MeasureString(text); + float num2 = 1.1f; + float num3 = 110f; + if ((double) vector2.Y > (double) num3) + num2 = num3 / vector2.Y; + Vector2 position = new Vector2(screenWidth * currentTip.ScreenAnchorX, y); + position -= vector2 * num2 * 0.5f; + ChatManager.DrawColorCodedStringWithShadow(spriteBatch, font, text, position, Color.White, 0.0f, Vector2.Zero, new Vector2(num2, num2)); + } + } + } + + private void AddNewTip(double currentTime) + { + string textKey = "UI.Back"; + List localizedTextList = new List(); + localizedTextList.AddRange((IEnumerable) this._tipsDefault); + if (PlayerInput.UsingGamepad) + localizedTextList.AddRange((IEnumerable) this._tipsGamepad); + else + localizedTextList.AddRange((IEnumerable) this._tipsKeyboard); + if (this._lastTip != null) + localizedTextList.Remove(this._lastTip); + LocalizedText localizedText = localizedTextList.Count != 0 ? localizedTextList[Main.rand.Next(localizedTextList.Count)] : LocalizedText.Empty; + this._lastTip = localizedText; + string key = localizedText.Key; + if (Language.Exists(key)) + textKey = key; + this._currentTips.Add(new GameTipsDisplay.GameTip(textKey, currentTime)); + } + + private class GameTip + { + private const float APPEAR_FROM = 2.5f; + private const float APPEAR_TO = 0.5f; + private const float DISAPPEAR_TO = -1.5f; + private const float APPEAR_TIME = 0.5f; + private const float DISAPPEAR_TIME = 1f; + private const float DURATION = 16.5f; + private LocalizedText _textKey; + private string _formattedText; + public float ScreenAnchorX; + public readonly float Duration; + public readonly double SpawnTime; + + public string Text => this._textKey == null ? "What?!" : this._formattedText; + + public bool IsExpired(double currentTime) => currentTime >= this.SpawnTime + (double) this.Duration; + + public bool IsExpiring(double currentTime) => currentTime >= this.SpawnTime + (double) this.Duration - 1.0; + + public GameTip(string textKey, double spawnTime) + { + this._textKey = Language.GetText(textKey); + this.SpawnTime = spawnTime; + this.ScreenAnchorX = 2.5f; + this.Duration = 16.5f; + this._formattedText = this._textKey.FormatWith(Lang.CreateDialogSubstitutionObject()); + } + + public void Update(double currentTime) + { + double t = currentTime - this.SpawnTime; + if (t < 0.5) + this.ScreenAnchorX = MathHelper.SmoothStep(2.5f, 0.5f, (float) Utils.GetLerpValue(0.0, 0.5, t, true)); + else if (t >= (double) this.Duration - 1.0) + this.ScreenAnchorX = MathHelper.SmoothStep(0.5f, -1.5f, (float) Utils.GetLerpValue((double) this.Duration - 1.0, (double) this.Duration, t, true)); + else + this.ScreenAnchorX = 0.5f; + } + } + } +} diff --git a/GameContent/UI/HorizontalBarsPlayerReosurcesDisplaySet.cs b/GameContent/UI/HorizontalBarsPlayerReosurcesDisplaySet.cs new file mode 100644 index 0000000..8009558 --- /dev/null +++ b/GameContent/UI/HorizontalBarsPlayerReosurcesDisplaySet.cs @@ -0,0 +1,256 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.HorizontalBarsPlayerReosurcesDisplaySet +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using ReLogic.Graphics; + +namespace Terraria.GameContent.UI +{ + public class HorizontalBarsPlayerReosurcesDisplaySet : IPlayerResourcesDisplaySet + { + private int _maxSegmentCount; + private int _hpSegmentsCount; + private int _mpSegmentsCount; + private int _hpFruitCount; + private float _hpPercent; + private float _mpPercent; + private bool _hpHovered; + private bool _mpHovered; + private Asset _hpFill; + private Asset _hpFillHoney; + private Asset _mpFill; + private Asset _panelLeft; + private Asset _panelMiddleHP; + private Asset _panelRightHP; + private Asset _panelMiddleMP; + private Asset _panelRightMP; + + public HorizontalBarsPlayerReosurcesDisplaySet(string name, AssetRequestMode mode) + { + string str = "Images\\UI\\PlayerResourceSets\\" + name; + this._hpFill = Main.Assets.Request(str + "\\HP_Fill", mode); + this._hpFillHoney = Main.Assets.Request(str + "\\HP_Fill_Honey", mode); + this._mpFill = Main.Assets.Request(str + "\\MP_Fill", mode); + this._panelLeft = Main.Assets.Request(str + "\\Panel_Left", mode); + this._panelMiddleHP = Main.Assets.Request(str + "\\HP_Panel_Middle", mode); + this._panelRightHP = Main.Assets.Request(str + "\\HP_Panel_Right", mode); + this._panelMiddleMP = Main.Assets.Request(str + "\\MP_Panel_Middle", mode); + this._panelRightMP = Main.Assets.Request(str + "\\MP_Panel_Right", mode); + } + + public void Draw() + { + this.PrepareFields(Main.LocalPlayer); + SpriteBatch spriteBatch = Main.spriteBatch; + int num1 = 16; + int num2 = 18; + int num3 = Main.screenWidth - 300 - 22 + num1; + Vector2 vector2_1 = new Vector2((float) num3, (float) num2); + vector2_1.X += (float) ((this._maxSegmentCount - this._hpSegmentsCount) * this._panelMiddleHP.Width()); + bool isHovered1 = false; + new ResourceDrawSettings() + { + ElementCount = (this._hpSegmentsCount + 2), + ElementIndexOffset = 0, + TopLeftAnchor = vector2_1, + GetTextureMethod = new ResourceDrawSettings.TextureGetter(this.LifePanelDrawer), + OffsetPerDraw = Vector2.Zero, + OffsetPerDrawByTexturePercentile = Vector2.UnitX, + OffsetSpriteAnchor = Vector2.Zero, + OffsetSpriteAnchorByTexturePercentile = Vector2.Zero + }.Draw(spriteBatch, ref isHovered1); + new ResourceDrawSettings() + { + ElementCount = this._hpSegmentsCount, + ElementIndexOffset = 0, + TopLeftAnchor = (vector2_1 + new Vector2(6f, 6f)), + GetTextureMethod = new ResourceDrawSettings.TextureGetter(this.LifeFillingDrawer), + OffsetPerDraw = new Vector2((float) this._hpFill.Width(), 0.0f), + OffsetPerDrawByTexturePercentile = Vector2.Zero, + OffsetSpriteAnchor = Vector2.Zero, + OffsetSpriteAnchorByTexturePercentile = Vector2.Zero + }.Draw(spriteBatch, ref isHovered1); + this._hpHovered = isHovered1; + bool isHovered2 = false; + Vector2 vector2_2 = new Vector2((float) (num3 - 10), (float) (num2 + 24)); + vector2_2.X += (float) ((this._maxSegmentCount - this._mpSegmentsCount) * this._panelMiddleMP.Width()); + new ResourceDrawSettings() + { + ElementCount = (this._mpSegmentsCount + 2), + ElementIndexOffset = 0, + TopLeftAnchor = vector2_2, + GetTextureMethod = new ResourceDrawSettings.TextureGetter(this.ManaPanelDrawer), + OffsetPerDraw = Vector2.Zero, + OffsetPerDrawByTexturePercentile = Vector2.UnitX, + OffsetSpriteAnchor = Vector2.Zero, + OffsetSpriteAnchorByTexturePercentile = Vector2.Zero + }.Draw(spriteBatch, ref isHovered2); + new ResourceDrawSettings() + { + ElementCount = this._mpSegmentsCount, + ElementIndexOffset = 0, + TopLeftAnchor = (vector2_2 + new Vector2(6f, 6f)), + GetTextureMethod = new ResourceDrawSettings.TextureGetter(this.ManaFillingDrawer), + OffsetPerDraw = new Vector2((float) this._mpFill.Width(), 0.0f), + OffsetPerDrawByTexturePercentile = Vector2.Zero, + OffsetSpriteAnchor = Vector2.Zero, + OffsetSpriteAnchorByTexturePercentile = Vector2.Zero + }.Draw(spriteBatch, ref isHovered2); + this._mpHovered = isHovered2; + } + + private static void DrawManaText(SpriteBatch spriteBatch) + { + Color color = new Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor); + int num = 180; + Player localPlayer = Main.LocalPlayer; + string str1 = Lang.inter[2].Value + ":"; + string str2 = localPlayer.statMana.ToString() + "/" + (object) localPlayer.statManaMax2; + Vector2 vector2_1 = new Vector2((float) (Main.screenWidth - num), 65f); + string str3 = str1 + " " + str2; + Vector2 vector2_2 = FontAssets.MouseText.Value.MeasureString(str3); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, str1, vector2_1 + new Vector2((float) (-(double) vector2_2.X * 0.5), 0.0f), color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, str2, vector2_1 + new Vector2(vector2_2.X * 0.5f, 0.0f), color, 0.0f, new Vector2(FontAssets.MouseText.Value.MeasureString(str2).X, 0.0f), 1f, SpriteEffects.None, 0.0f); + } + + private static void DrawLifeBarText(SpriteBatch spriteBatch, Vector2 topLeftAnchor) + { + Vector2 vector2_1 = topLeftAnchor + new Vector2(130f, -20f); + Player localPlayer = Main.LocalPlayer; + Color color = new Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor); + string str = Lang.inter[0].Value + " " + (object) localPlayer.statLifeMax2 + "/" + (object) localPlayer.statLifeMax2; + Vector2 vector2_2 = FontAssets.MouseText.Value.MeasureString(str); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, Lang.inter[0].Value, vector2_1 + new Vector2((float) (-(double) vector2_2.X * 0.5), 0.0f), color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, localPlayer.statLife.ToString() + "/" + (object) localPlayer.statLifeMax2, vector2_1 + new Vector2(vector2_2.X * 0.5f, 0.0f), color, 0.0f, new Vector2(FontAssets.MouseText.Value.MeasureString(localPlayer.statLife.ToString() + "/" + (object) localPlayer.statLifeMax2).X, 0.0f), 1f, SpriteEffects.None, 0.0f); + } + + private void PrepareFields(Player player) + { + PlayerStatsSnapshot playerStatsSnapshot = new PlayerStatsSnapshot(player); + this._hpSegmentsCount = (int) ((double) playerStatsSnapshot.LifeMax / (double) playerStatsSnapshot.LifePerSegment); + this._mpSegmentsCount = (int) ((double) playerStatsSnapshot.ManaMax / (double) playerStatsSnapshot.ManaPerSegment); + this._maxSegmentCount = 20; + this._hpFruitCount = playerStatsSnapshot.LifeFruitCount; + this._hpPercent = (float) playerStatsSnapshot.Life / (float) playerStatsSnapshot.LifeMax; + this._mpPercent = (float) playerStatsSnapshot.Mana / (float) playerStatsSnapshot.ManaMax; + } + + private void LifePanelDrawer( + int elementIndex, + int firstElementIndex, + int lastElementIndex, + out Asset sprite, + out Vector2 offset, + out float drawScale, + out Rectangle? sourceRect) + { + sourceRect = new Rectangle?(); + offset = Vector2.Zero; + sprite = this._panelLeft; + drawScale = 1f; + if (elementIndex == lastElementIndex) + { + sprite = this._panelRightHP; + offset = new Vector2(-16f, -10f); + } + else + { + if (elementIndex == firstElementIndex) + return; + sprite = this._panelMiddleHP; + } + } + + private void ManaPanelDrawer( + int elementIndex, + int firstElementIndex, + int lastElementIndex, + out Asset sprite, + out Vector2 offset, + out float drawScale, + out Rectangle? sourceRect) + { + sourceRect = new Rectangle?(); + offset = Vector2.Zero; + sprite = this._panelLeft; + drawScale = 1f; + if (elementIndex == lastElementIndex) + { + sprite = this._panelRightMP; + offset = new Vector2(-16f, -6f); + } + else + { + if (elementIndex == firstElementIndex) + return; + sprite = this._panelMiddleMP; + } + } + + private void LifeFillingDrawer( + int elementIndex, + int firstElementIndex, + int lastElementIndex, + out Asset sprite, + out Vector2 offset, + out float drawScale, + out Rectangle? sourceRect) + { + sprite = this._hpFill; + if (elementIndex >= this._hpSegmentsCount - this._hpFruitCount) + sprite = this._hpFillHoney; + HorizontalBarsPlayerReosurcesDisplaySet.FillBarByValues(elementIndex, sprite, this._hpSegmentsCount, this._hpPercent, out offset, out drawScale, out sourceRect); + } + + private static void FillBarByValues( + int elementIndex, + Asset sprite, + int segmentsCount, + float fillPercent, + out Vector2 offset, + out float drawScale, + out Rectangle? sourceRect) + { + sourceRect = new Rectangle?(); + offset = Vector2.Zero; + int num1 = elementIndex; + float num2 = 1f / (float) segmentsCount; + float t = 1f - fillPercent; + float num3 = 1f - Utils.GetLerpValue(num2 * (float) num1, num2 * (float) (num1 + 1), t, true); + drawScale = 1f; + Rectangle rectangle = sprite.Frame(); + int num4 = (int) ((double) rectangle.Width * (1.0 - (double) num3)); + offset.X += (float) num4; + rectangle.X += num4; + rectangle.Width -= num4; + sourceRect = new Rectangle?(rectangle); + } + + private void ManaFillingDrawer( + int elementIndex, + int firstElementIndex, + int lastElementIndex, + out Asset sprite, + out Vector2 offset, + out float drawScale, + out Rectangle? sourceRect) + { + sprite = this._mpFill; + HorizontalBarsPlayerReosurcesDisplaySet.FillBarByValues(elementIndex, sprite, this._mpSegmentsCount, this._mpPercent, out offset, out drawScale, out sourceRect); + } + + public void TryToHover() + { + if (this._hpHovered) + CommonResourceBarMethods.DrawLifeMouseOver(); + if (!this._mpHovered) + return; + CommonResourceBarMethods.DrawManaMouseOver(); + } + } +} diff --git a/GameContent/UI/IMultiplayerClosePlayersOverlay.cs b/GameContent/UI/IMultiplayerClosePlayersOverlay.cs new file mode 100644 index 0000000..56d00e2 --- /dev/null +++ b/GameContent/UI/IMultiplayerClosePlayersOverlay.cs @@ -0,0 +1,13 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.IMultiplayerClosePlayersOverlay +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.UI +{ + public interface IMultiplayerClosePlayersOverlay + { + void Draw(); + } +} diff --git a/GameContent/UI/IPlayerResourcesDisplaySet.cs b/GameContent/UI/IPlayerResourcesDisplaySet.cs new file mode 100644 index 0000000..59b8947 --- /dev/null +++ b/GameContent/UI/IPlayerResourcesDisplaySet.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.IPlayerResourcesDisplaySet +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.UI +{ + public interface IPlayerResourcesDisplaySet + { + void Draw(); + + void TryToHover(); + } +} diff --git a/GameContent/UI/ItemRarity.cs b/GameContent/UI/ItemRarity.cs new file mode 100644 index 0000000..00189b3 --- /dev/null +++ b/GameContent/UI/ItemRarity.cs @@ -0,0 +1,39 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.ItemRarity +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria.ID; + +namespace Terraria.GameContent.UI +{ + public class ItemRarity + { + private static Dictionary _rarities = new Dictionary(); + + public static void Initialize() + { + ItemRarity._rarities.Clear(); + ItemRarity._rarities.Add(-11, Colors.RarityAmber); + ItemRarity._rarities.Add(-1, Colors.RarityTrash); + ItemRarity._rarities.Add(1, Colors.RarityBlue); + ItemRarity._rarities.Add(2, Colors.RarityGreen); + ItemRarity._rarities.Add(3, Colors.RarityOrange); + ItemRarity._rarities.Add(4, Colors.RarityRed); + ItemRarity._rarities.Add(5, Colors.RarityPink); + ItemRarity._rarities.Add(6, Colors.RarityPurple); + ItemRarity._rarities.Add(7, Colors.RarityLime); + ItemRarity._rarities.Add(8, Colors.RarityYellow); + ItemRarity._rarities.Add(9, Colors.RarityCyan); + } + + public static Color GetColor(int rarity) + { + Color color = new Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor); + return ItemRarity._rarities.ContainsKey(rarity) ? ItemRarity._rarities[rarity] : color; + } + } +} diff --git a/GameContent/UI/LegacyMultiplayerClosePlayersOverlay.cs b/GameContent/UI/LegacyMultiplayerClosePlayersOverlay.cs new file mode 100644 index 0000000..87c7753 --- /dev/null +++ b/GameContent/UI/LegacyMultiplayerClosePlayersOverlay.cs @@ -0,0 +1,146 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.LegacyMultiplayerClosePlayersOverlay +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Graphics; +using System; +using Terraria.GameInput; +using Terraria.Graphics; +using Terraria.Graphics.Renderers; +using Terraria.Localization; +using Terraria.UI.Chat; + +namespace Terraria.GameContent.UI +{ + public class LegacyMultiplayerClosePlayersOverlay : IMultiplayerClosePlayersOverlay + { + public void Draw() + { + int namePlateDistance = Main.teamNamePlateDistance; + if (namePlateDistance <= 0) + return; + SpriteBatch spriteBatch = Main.spriteBatch; + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, (BlendState) null, (SamplerState) null, (DepthStencilState) null, (RasterizerState) null, (Effect) null, Main.UIScaleMatrix); + PlayerInput.SetZoom_World(); + int screenWidth = Main.screenWidth; + int screenHeight = Main.screenHeight; + Vector2 screenPosition1 = Main.screenPosition; + PlayerInput.SetZoom_UI(); + float uiScale = Main.UIScale; + int num1 = namePlateDistance * 8; + Player[] player1 = Main.player; + int player2 = Main.myPlayer; + SpriteViewMatrix gameViewMatrix = Main.GameViewMatrix; + byte mouseTextColor = Main.mouseTextColor; + Color[] teamColor = Main.teamColor; + Camera camera = Main.Camera; + IPlayerRenderer playerRenderer = Main.PlayerRenderer; + Vector2 screenPosition2 = Main.screenPosition; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (player1[index].active && player2 != index && !player1[index].dead && player1[player2].team > 0 && player1[player2].team == player1[index].team) + { + string name = player1[index].name; + Vector2 namePlatePos = FontAssets.MouseText.Value.MeasureString(name); + float num2 = 0.0f; + if (player1[index].chatOverhead.timeLeft > 0) + num2 = -namePlatePos.Y * uiScale; + else if (player1[index].emoteTime > 0) + num2 = -namePlatePos.Y * uiScale; + Vector2 vector2_1 = new Vector2((float) (screenWidth / 2) + screenPosition1.X, (float) (screenHeight / 2) + screenPosition1.Y); + Vector2 position1 = player1[index].position; + Vector2 vector2_2 = position1 + (position1 - vector2_1) * (gameViewMatrix.Zoom - Vector2.One); + float num3 = 0.0f; + float num4 = (float) mouseTextColor / (float) byte.MaxValue; + Color namePlateColor = new Color((int) (byte) ((double) teamColor[player1[index].team].R * (double) num4), (int) (byte) ((double) teamColor[player1[index].team].G * (double) num4), (int) (byte) ((double) teamColor[player1[index].team].B * (double) num4), (int) mouseTextColor); + float num5 = vector2_2.X + (float) (player1[index].width / 2) - vector2_1.X; + float num6 = (float) ((double) vector2_2.Y - (double) namePlatePos.Y - 2.0) + num2 - vector2_1.Y; + float num7 = (float) Math.Sqrt((double) num5 * (double) num5 + (double) num6 * (double) num6); + int num8 = screenHeight; + if (screenHeight > screenWidth) + num8 = screenWidth; + int num9 = num8 / 2 - 50; + if (num9 < 100) + num9 = 100; + if ((double) num7 < (double) num9) + { + namePlatePos.X = (float) ((double) vector2_2.X + (double) (player1[index].width / 2) - (double) namePlatePos.X / 2.0) - screenPosition1.X; + namePlatePos.Y = (float) ((double) vector2_2.Y - (double) namePlatePos.Y - 2.0) + num2 - screenPosition1.Y; + } + else + { + num3 = num7; + float num10 = (float) num9 / num7; + namePlatePos.X = (float) ((double) (screenWidth / 2) + (double) num5 * (double) num10 - (double) namePlatePos.X / 2.0); + namePlatePos.Y = (float) ((double) (screenHeight / 2) + (double) num6 * (double) num10 + 40.0 * (double) uiScale); + } + Vector2 vector2_3 = FontAssets.MouseText.Value.MeasureString(name); + namePlatePos += vector2_3 / 2f; + namePlatePos *= 1f / uiScale; + namePlatePos -= vector2_3 / 2f; + if ((double) player1[player2].gravDir == -1.0) + namePlatePos.Y = (float) screenHeight - namePlatePos.Y; + if ((double) num3 > 0.0) + { + float num11 = 20f; + float num12 = -27f - (float) (((double) vector2_3.X - 85.0) / 2.0); + float num13 = player1[index].Center.X - player1[player2].Center.X; + float num14 = player1[index].Center.Y - player1[player2].Center.Y; + float num15 = (float) Math.Sqrt((double) num13 * (double) num13 + (double) num14 * (double) num14); + if ((double) num15 <= (double) num1) + { + string textValue = Language.GetTextValue("GameUI.PlayerDistance", (object) (int) ((double) num15 / 16.0 * 2.0)); + Vector2 npDistPos = FontAssets.MouseText.Value.MeasureString(textValue); + npDistPos.X = namePlatePos.X - num12; + npDistPos.Y = (float) ((double) namePlatePos.Y + (double) vector2_3.Y / 2.0 - (double) npDistPos.Y / 2.0) - num11; + LegacyMultiplayerClosePlayersOverlay.DrawPlayerName2(spriteBatch, ref namePlateColor, textValue, ref npDistPos); + Color headBordersColor = Main.GetPlayerHeadBordersColor(player1[index]); + Vector2 position2 = new Vector2(namePlatePos.X, namePlatePos.Y - num11); + position2.X -= 22f + num12; + position2.Y += 8f; + playerRenderer.DrawPlayerHead(camera, player1[index], position2, scale: 0.8f, borderColor: headBordersColor); + Vector2 vector2_4 = npDistPos + screenPosition2 + new Vector2(26f, 20f); + if (player1[index].statLife != player1[index].statLifeMax2) + Main.instance.DrawHealthBar(vector2_4.X, vector2_4.Y, player1[index].statLife, player1[index].statLifeMax2, 1f, 1.25f, true); + ChatManager.DrawColorCodedStringWithShadow(spriteBatch, FontAssets.MouseText.Value, name, namePlatePos + new Vector2(0.0f, -40f), namePlateColor, 0.0f, Vector2.Zero, Vector2.One); + } + } + else + LegacyMultiplayerClosePlayersOverlay.DrawPlayerName(spriteBatch, name, ref namePlatePos, ref namePlateColor); + } + } + } + + private static void DrawPlayerName2( + SpriteBatch spriteBatch, + ref Color namePlateColor, + string npDist, + ref Vector2 npDistPos) + { + float num = 0.85f; + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, npDist, new Vector2(npDistPos.X - 2f, npDistPos.Y), Color.Black, 0.0f, new Vector2(), num, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, npDist, new Vector2(npDistPos.X + 2f, npDistPos.Y), Color.Black, 0.0f, new Vector2(), num, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, npDist, new Vector2(npDistPos.X, npDistPos.Y - 2f), Color.Black, 0.0f, new Vector2(), num, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, npDist, new Vector2(npDistPos.X, npDistPos.Y + 2f), Color.Black, 0.0f, new Vector2(), num, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, npDist, npDistPos, namePlateColor, 0.0f, new Vector2(), num, SpriteEffects.None, 0.0f); + } + + private static void DrawPlayerName( + SpriteBatch spriteBatch, + string namePlate, + ref Vector2 namePlatePos, + ref Color namePlateColor) + { + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, namePlate, new Vector2(namePlatePos.X - 2f, namePlatePos.Y), Color.Black, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, namePlate, new Vector2(namePlatePos.X + 2f, namePlatePos.Y), Color.Black, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, namePlate, new Vector2(namePlatePos.X, namePlatePos.Y - 2f), Color.Black, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, namePlate, new Vector2(namePlatePos.X, namePlatePos.Y + 2f), Color.Black, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, namePlate, namePlatePos, namePlateColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } +} diff --git a/GameContent/UI/MinimapFrame.cs b/GameContent/UI/MinimapFrame.cs new file mode 100644 index 0000000..2365f4e --- /dev/null +++ b/GameContent/UI/MinimapFrame.cs @@ -0,0 +1,133 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.MinimapFrame +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using System.Diagnostics; +using Terraria.Audio; +using Terraria.GameInput; + +namespace Terraria.GameContent.UI +{ + public class MinimapFrame + { + private const float DEFAULT_ZOOM = 1.05f; + private const float ZOOM_OUT_MULTIPLIER = 0.975f; + private const float ZOOM_IN_MULTIPLIER = 1.025f; + private readonly Asset _frameTexture; + private readonly Vector2 _frameOffset; + private MinimapFrame.Button _resetButton; + private MinimapFrame.Button _zoomInButton; + private MinimapFrame.Button _zoomOutButton; + + public Vector2 MinimapPosition { get; set; } + + private Vector2 FramePosition + { + get => this.MinimapPosition + this._frameOffset; + set => this.MinimapPosition = value - this._frameOffset; + } + + public MinimapFrame(Asset frameTexture, Vector2 frameOffset) + { + this._frameTexture = frameTexture; + this._frameOffset = frameOffset; + } + + public void SetResetButton(Asset hoverTexture, Vector2 position) => this._resetButton = new MinimapFrame.Button(hoverTexture, position, (Action) (() => this.ResetZoom())); + + private void ResetZoom() => Main.mapMinimapScale = 1.05f; + + public void SetZoomInButton(Asset hoverTexture, Vector2 position) => this._zoomInButton = new MinimapFrame.Button(hoverTexture, position, (Action) (() => this.ZoomInButton())); + + private void ZoomInButton() => Main.mapMinimapScale *= 1.025f; + + public void SetZoomOutButton(Asset hoverTexture, Vector2 position) => this._zoomOutButton = new MinimapFrame.Button(hoverTexture, position, (Action) (() => this.ZoomOutButton())); + + private void ZoomOutButton() => Main.mapMinimapScale *= 0.975f; + + public void Update() + { + MinimapFrame.Button buttonUnderMouse = this.GetButtonUnderMouse(); + this._zoomInButton.IsHighlighted = buttonUnderMouse == this._zoomInButton; + this._zoomOutButton.IsHighlighted = buttonUnderMouse == this._zoomOutButton; + this._resetButton.IsHighlighted = buttonUnderMouse == this._resetButton; + if (buttonUnderMouse == null || Main.LocalPlayer.lastMouseInterface) + return; + buttonUnderMouse.IsHighlighted = true; + if (PlayerInput.IgnoreMouseInterface) + return; + Main.LocalPlayer.mouseInterface = true; + if (!Main.mouseLeft) + return; + buttonUnderMouse.Click(); + if (!Main.mouseLeftRelease) + return; + SoundEngine.PlaySound(12); + } + + public void DrawBackground(SpriteBatch spriteBatch) => spriteBatch.Draw(TextureAssets.MagicPixel.Value, new Rectangle((int) this.MinimapPosition.X - 6, (int) this.MinimapPosition.Y - 6, 244, 244), Color.Black * Main.mapMinimapAlpha); + + public void DrawForeground(SpriteBatch spriteBatch) + { + spriteBatch.Draw(this._frameTexture.Value, this.FramePosition, Color.White); + this._zoomInButton.Draw(spriteBatch, this.FramePosition); + this._zoomOutButton.Draw(spriteBatch, this.FramePosition); + this._resetButton.Draw(spriteBatch, this.FramePosition); + } + + private MinimapFrame.Button GetButtonUnderMouse() + { + Vector2 testPoint = new Vector2((float) Main.mouseX, (float) Main.mouseY); + if (this._zoomInButton.IsTouchingPoint(testPoint, this.FramePosition)) + return this._zoomInButton; + if (this._zoomOutButton.IsTouchingPoint(testPoint, this.FramePosition)) + return this._zoomOutButton; + return this._resetButton.IsTouchingPoint(testPoint, this.FramePosition) ? this._resetButton : (MinimapFrame.Button) null; + } + + [Conditional("DEBUG")] + private void ValidateState() + { + } + + private class Button + { + public bool IsHighlighted; + private readonly Vector2 _position; + private readonly Asset _hoverTexture; + private readonly Action _onMouseDown; + + private Vector2 Size => new Vector2((float) this._hoverTexture.Width(), (float) this._hoverTexture.Height()); + + public Button(Asset hoverTexture, Vector2 position, Action mouseDownCallback) + { + this._position = position; + this._hoverTexture = hoverTexture; + this._onMouseDown = mouseDownCallback; + } + + public void Click() => this._onMouseDown(); + + public void Draw(SpriteBatch spriteBatch, Vector2 parentPosition) + { + if (!this.IsHighlighted) + return; + spriteBatch.Draw(this._hoverTexture.Value, this._position + parentPosition, Color.White); + } + + public bool IsTouchingPoint(Vector2 testPoint, Vector2 parentPosition) + { + Vector2 vector2_1 = this._position + parentPosition + this.Size * 0.5f; + Vector2 vector2_2 = Vector2.Max(this.Size, new Vector2(22f, 22f)) * 0.5f; + Vector2 vector2_3 = testPoint - vector2_1; + return (double) Math.Abs(vector2_3.X) < (double) vector2_2.X && (double) Math.Abs(vector2_3.Y) < (double) vector2_2.Y; + } + } + } +} diff --git a/GameContent/UI/NewMultiplayerClosePlayersOverlay.cs b/GameContent/UI/NewMultiplayerClosePlayersOverlay.cs new file mode 100644 index 0000000..1a11ff8 --- /dev/null +++ b/GameContent/UI/NewMultiplayerClosePlayersOverlay.cs @@ -0,0 +1,250 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.NewMultiplayerClosePlayersOverlay +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Graphics; +using System; +using System.Collections.Generic; +using Terraria.GameInput; +using Terraria.Graphics; +using Terraria.Localization; +using Terraria.UI.Chat; + +namespace Terraria.GameContent.UI +{ + public class NewMultiplayerClosePlayersOverlay : IMultiplayerClosePlayersOverlay + { + private List _playerOnScreenCache = new List(); + private List _playerOffScreenCache = new List(); + + public void Draw() + { + int namePlateDistance = Main.teamNamePlateDistance; + if (namePlateDistance <= 0) + return; + this._playerOnScreenCache.Clear(); + this._playerOffScreenCache.Clear(); + SpriteBatch spriteBatch = Main.spriteBatch; + PlayerInput.SetZoom_World(); + int screenWidth = Main.screenWidth; + int screenHeight = Main.screenHeight; + Vector2 screenPosition1 = Main.screenPosition; + PlayerInput.SetZoom_UI(); + int num1 = namePlateDistance * 8; + Player[] player1 = Main.player; + int player2 = Main.myPlayer; + byte mouseTextColor = Main.mouseTextColor; + Color[] teamColor = Main.teamColor; + Vector2 screenPosition2 = Main.screenPosition; + Player localPlayer = player1[player2]; + float num2 = (float) mouseTextColor / (float) byte.MaxValue; + if (localPlayer.team == 0) + return; + DynamicSpriteFont font = FontAssets.MouseText.Value; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (index != player2) + { + Player player3 = player1[index]; + if (player3.active && !player3.dead && player3.team == localPlayer.team) + { + string name = player3.name; + Vector2 namePlatePos; + float namePlateDist; + Vector2 measurement; + NewMultiplayerClosePlayersOverlay.GetDistance(screenWidth, screenHeight, screenPosition1, localPlayer, font, player3, name, out namePlatePos, out namePlateDist, out measurement); + Color color = new Color((int) (byte) ((double) teamColor[player3.team].R * (double) num2), (int) (byte) ((double) teamColor[player3.team].G * (double) num2), (int) (byte) ((double) teamColor[player3.team].B * (double) num2), (int) mouseTextColor); + if ((double) namePlateDist > 0.0) + { + float num3 = player3.Distance(localPlayer.Center); + if ((double) num3 <= (double) num1) + { + float num4 = 20f; + float num5 = -27f - (float) (((double) measurement.X - 85.0) / 2.0); + string textValue = Language.GetTextValue("GameUI.PlayerDistance", (object) (int) ((double) num3 / 16.0 * 2.0)); + Vector2 npDistPos = font.MeasureString(textValue); + npDistPos.X = namePlatePos.X - num5; + npDistPos.Y = (float) ((double) namePlatePos.Y + (double) measurement.Y / 2.0 - (double) npDistPos.Y / 2.0) - num4; + this._playerOffScreenCache.Add(new NewMultiplayerClosePlayersOverlay.PlayerOffScreenCache(name, namePlatePos, color, npDistPos, textValue, player3, measurement)); + } + } + else + this._playerOnScreenCache.Add(new NewMultiplayerClosePlayersOverlay.PlayerOnScreenCache(name, namePlatePos, color)); + } + } + } + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, (BlendState) null, (SamplerState) null, (DepthStencilState) null, (RasterizerState) null, (Effect) null, Main.UIScaleMatrix); + for (int index = 0; index < this._playerOnScreenCache.Count; ++index) + this._playerOnScreenCache[index].DrawPlayerName_WhenPlayerIsOnScreen(spriteBatch); + NewMultiplayerClosePlayersOverlay.PlayerOffScreenCache playerOffScreenCache; + for (int index = 0; index < this._playerOffScreenCache.Count; ++index) + { + playerOffScreenCache = this._playerOffScreenCache[index]; + playerOffScreenCache.DrawPlayerName(spriteBatch); + } + for (int index = 0; index < this._playerOffScreenCache.Count; ++index) + { + playerOffScreenCache = this._playerOffScreenCache[index]; + playerOffScreenCache.DrawPlayerDistance(spriteBatch); + } + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, (BlendState) null, (SamplerState) null, (DepthStencilState) null, (RasterizerState) null, (Effect) null, Main.UIScaleMatrix); + for (int index = 0; index < this._playerOffScreenCache.Count; ++index) + { + playerOffScreenCache = this._playerOffScreenCache[index]; + playerOffScreenCache.DrawLifeBar(); + } + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, (BlendState) null, (SamplerState) null, (DepthStencilState) null, (RasterizerState) null, (Effect) null, Main.UIScaleMatrix); + for (int index = 0; index < this._playerOffScreenCache.Count; ++index) + { + playerOffScreenCache = this._playerOffScreenCache[index]; + playerOffScreenCache.DrawPlayerHead(); + } + } + + private static void GetDistance( + int testWidth, + int testHeight, + Vector2 testPosition, + Player localPlayer, + DynamicSpriteFont font, + Player player, + string nameToShow, + out Vector2 namePlatePos, + out float namePlateDist, + out Vector2 measurement) + { + float uiScale = Main.UIScale; + SpriteViewMatrix gameViewMatrix = Main.GameViewMatrix; + namePlatePos = font.MeasureString(nameToShow); + float num1 = 0.0f; + if (player.chatOverhead.timeLeft > 0) + num1 = -namePlatePos.Y * uiScale; + else if (player.emoteTime > 0) + num1 = -namePlatePos.Y * uiScale; + Vector2 vector2_1 = new Vector2((float) (testWidth / 2) + testPosition.X, (float) (testHeight / 2) + testPosition.Y); + Vector2 position = player.position; + Vector2 vector2_2 = position + (position - vector2_1) * (gameViewMatrix.Zoom - Vector2.One); + namePlateDist = 0.0f; + float num2 = vector2_2.X + (float) (player.width / 2) - vector2_1.X; + float num3 = (float) ((double) vector2_2.Y - (double) namePlatePos.Y - 2.0) + num1 - vector2_1.Y; + float num4 = (float) Math.Sqrt((double) num2 * (double) num2 + (double) num3 * (double) num3); + int num5 = testHeight; + if (testHeight > testWidth) + num5 = testWidth; + int num6 = num5 / 2 - 50; + if (num6 < 100) + num6 = 100; + if ((double) num4 < (double) num6) + { + namePlatePos.X = (float) ((double) vector2_2.X + (double) (player.width / 2) - (double) namePlatePos.X / 2.0) - testPosition.X; + namePlatePos.Y = (float) ((double) vector2_2.Y - (double) namePlatePos.Y - 2.0) + num1 - testPosition.Y; + } + else + { + namePlateDist = num4; + float num7 = (float) num6 / num4; + namePlatePos.X = (float) ((double) (testWidth / 2) + (double) num2 * (double) num7 - (double) namePlatePos.X / 2.0); + namePlatePos.Y = (float) ((double) (testHeight / 2) + (double) num3 * (double) num7 + 40.0 * (double) uiScale); + } + measurement = font.MeasureString(nameToShow); + namePlatePos += measurement / 2f; + namePlatePos *= 1f / uiScale; + namePlatePos -= measurement / 2f; + if ((double) localPlayer.gravDir != -1.0) + return; + namePlatePos.Y = (float) testHeight - namePlatePos.Y; + } + + private struct PlayerOnScreenCache + { + private string _name; + private Vector2 _pos; + private Color _color; + + public PlayerOnScreenCache(string name, Vector2 pos, Color color) + { + this._name = name; + this._pos = pos; + this._color = color; + } + + public void DrawPlayerName_WhenPlayerIsOnScreen(SpriteBatch spriteBatch) + { + this._pos = this._pos.Floor(); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, this._name, new Vector2(this._pos.X - 2f, this._pos.Y), Color.Black, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, this._name, new Vector2(this._pos.X + 2f, this._pos.Y), Color.Black, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, this._name, new Vector2(this._pos.X, this._pos.Y - 2f), Color.Black, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, this._name, new Vector2(this._pos.X, this._pos.Y + 2f), Color.Black, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, this._name, this._pos, this._color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + + private struct PlayerOffScreenCache + { + private Player player; + private string nameToShow; + private Vector2 namePlatePos; + private Color namePlateColor; + private Vector2 distanceDrawPosition; + private string distanceString; + private Vector2 measurement; + + public PlayerOffScreenCache( + string name, + Vector2 pos, + Color color, + Vector2 npDistPos, + string npDist, + Player thePlayer, + Vector2 theMeasurement) + { + this.nameToShow = name; + this.namePlatePos = pos.Floor(); + this.namePlateColor = color; + this.distanceDrawPosition = npDistPos.Floor(); + this.distanceString = npDist; + this.player = thePlayer; + this.measurement = theMeasurement; + } + + public void DrawPlayerName(SpriteBatch spriteBatch) => ChatManager.DrawColorCodedStringWithShadow(spriteBatch, FontAssets.MouseText.Value, this.nameToShow, this.namePlatePos + new Vector2(0.0f, -40f), this.namePlateColor, 0.0f, Vector2.Zero, Vector2.One); + + public void DrawPlayerHead() + { + float num1 = 20f; + float num2 = -27f - (float) (((double) this.measurement.X - 85.0) / 2.0); + Color headBordersColor = Main.GetPlayerHeadBordersColor(this.player); + Vector2 vec = new Vector2(this.namePlatePos.X, this.namePlatePos.Y - num1); + vec.X -= 22f + num2; + vec.Y += 8f; + Vector2 position = vec.Floor(); + Main.MapPlayerRenderer.DrawPlayerHead(Main.Camera, this.player, position, scale: 0.8f, borderColor: headBordersColor); + } + + public void DrawLifeBar() + { + Vector2 vector2 = Main.screenPosition + this.distanceDrawPosition + new Vector2(26f, 20f); + if (this.player.statLife == this.player.statLifeMax2) + return; + Main.instance.DrawHealthBar(vector2.X, vector2.Y, this.player.statLife, this.player.statLifeMax2, 1f, 1.25f, true); + } + + public void DrawPlayerDistance(SpriteBatch spriteBatch) + { + float num = 0.85f; + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, this.distanceString, new Vector2(this.distanceDrawPosition.X - 2f, this.distanceDrawPosition.Y), Color.Black, 0.0f, new Vector2(), num, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, this.distanceString, new Vector2(this.distanceDrawPosition.X + 2f, this.distanceDrawPosition.Y), Color.Black, 0.0f, new Vector2(), num, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, this.distanceString, new Vector2(this.distanceDrawPosition.X, this.distanceDrawPosition.Y - 2f), Color.Black, 0.0f, new Vector2(), num, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, this.distanceString, new Vector2(this.distanceDrawPosition.X, this.distanceDrawPosition.Y + 2f), Color.Black, 0.0f, new Vector2(), num, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, this.distanceString, this.distanceDrawPosition, this.namePlateColor, 0.0f, new Vector2(), num, SpriteEffects.None, 0.0f); + } + } + } +} diff --git a/GameContent/UI/PlayerStatsSnapshot.cs b/GameContent/UI/PlayerStatsSnapshot.cs new file mode 100644 index 0000000..f4e8303 --- /dev/null +++ b/GameContent/UI/PlayerStatsSnapshot.cs @@ -0,0 +1,42 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.PlayerStatsSnapshot +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent.UI +{ + public struct PlayerStatsSnapshot + { + public int Life; + public int LifeMax; + public int LifeFruitCount; + public float LifePerSegment; + public int Mana; + public int ManaMax; + public float ManaPerSegment; + + public PlayerStatsSnapshot(Player player) + { + this.Life = player.statLife; + this.Mana = player.statMana; + this.LifeMax = player.statLifeMax2; + this.ManaMax = player.statManaMax2; + float num1 = 20f; + int num2 = player.statLifeMax / 20; + int num3 = (player.statLifeMax - 400) / 5; + if (num3 < 0) + num3 = 0; + if (num3 > 0) + { + num2 = player.statLifeMax / (20 + num3 / 4); + num1 = (float) player.statLifeMax / 20f; + } + int num4 = player.statLifeMax2 - player.statLifeMax; + float num5 = num1 + (float) (num4 / num2); + this.LifeFruitCount = num3; + this.LifePerSegment = num5; + this.ManaPerSegment = 20f; + } + } +} diff --git a/GameContent/UI/ResourceDrawSettings.cs b/GameContent/UI/ResourceDrawSettings.cs new file mode 100644 index 0000000..08e48fe --- /dev/null +++ b/GameContent/UI/ResourceDrawSettings.cs @@ -0,0 +1,60 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.ResourceDrawSettings +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; + +namespace Terraria.GameContent.UI +{ + public struct ResourceDrawSettings + { + public Vector2 TopLeftAnchor; + public int ElementCount; + public int ElementIndexOffset; + public ResourceDrawSettings.TextureGetter GetTextureMethod; + public Vector2 OffsetPerDraw; + public Vector2 OffsetPerDrawByTexturePercentile; + public Vector2 OffsetSpriteAnchor; + public Vector2 OffsetSpriteAnchorByTexturePercentile; + + public void Draw(SpriteBatch spriteBatch, ref bool isHovered) + { + int elementCount = this.ElementCount; + Vector2 topLeftAnchor = this.TopLeftAnchor; + Point point = Main.MouseScreen.ToPoint(); + for (int index = 0; index < elementCount; ++index) + { + Asset texture; + Vector2 drawOffset; + float drawScale; + Rectangle? sourceRect; + this.GetTextureMethod(index + this.ElementIndexOffset, this.ElementIndexOffset, this.ElementIndexOffset + elementCount - 1, out texture, out drawOffset, out drawScale, out sourceRect); + Rectangle r = texture.Frame(); + if (sourceRect.HasValue) + r = sourceRect.Value; + Vector2 position = topLeftAnchor + drawOffset; + Vector2 origin = this.OffsetSpriteAnchor + r.Size() * this.OffsetSpriteAnchorByTexturePercentile; + Rectangle rectangle = r; + rectangle.X += (int) ((double) position.X - (double) origin.X); + rectangle.Y += (int) ((double) position.Y - (double) origin.Y); + if (rectangle.Contains(point)) + isHovered = true; + spriteBatch.Draw(texture.Value, position, new Rectangle?(r), Color.White, 0.0f, origin, drawScale, SpriteEffects.None, 0.0f); + topLeftAnchor += this.OffsetPerDraw + r.Size() * this.OffsetPerDrawByTexturePercentile; + } + } + + public delegate void TextureGetter( + int elementIndex, + int firstElementIndex, + int lastElementIndex, + out Asset texture, + out Vector2 drawOffset, + out float drawScale, + out Rectangle? sourceRect); + } +} diff --git a/GameContent/UI/States/UIAchievementsMenu.cs b/GameContent/UI/States/UIAchievementsMenu.cs new file mode 100644 index 0000000..3bd06d7 --- /dev/null +++ b/GameContent/UI/States/UIAchievementsMenu.cs @@ -0,0 +1,229 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UIAchievementsMenu +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System.Collections.Generic; +using Terraria.Achievements; +using Terraria.Audio; +using Terraria.GameContent.UI.Elements; +using Terraria.GameInput; +using Terraria.ID; +using Terraria.Localization; +using Terraria.UI; +using Terraria.UI.Gamepad; + +namespace Terraria.GameContent.UI.States +{ + public class UIAchievementsMenu : UIState + { + private UIList _achievementsList; + private List _achievementElements = new List(); + private List _categoryButtons = new List(); + private UIElement _backpanel; + private UIElement _outerContainer; + + public void InitializePage() + { + this.RemoveAllChildren(); + this._categoryButtons.Clear(); + this._achievementElements.Clear(); + this._achievementsList = (UIList) null; + bool largeForOtherLanguages = true; + int num = largeForOtherLanguages.ToInt() * 100; + UIElement element1 = new UIElement(); + element1.Width.Set(0.0f, 0.8f); + element1.MaxWidth.Set(800f + (float) num, 0.0f); + element1.MinWidth.Set(600f + (float) num, 0.0f); + element1.Top.Set(220f, 0.0f); + element1.Height.Set(-220f, 1f); + element1.HAlign = 0.5f; + this._outerContainer = element1; + this.Append(element1); + UIPanel uiPanel = new UIPanel(); + uiPanel.Width.Set(0.0f, 1f); + uiPanel.Height.Set(-110f, 1f); + uiPanel.BackgroundColor = new Color(33, 43, 79) * 0.8f; + uiPanel.PaddingTop = 0.0f; + element1.Append((UIElement) uiPanel); + this._achievementsList = new UIList(); + this._achievementsList.Width.Set(-25f, 1f); + this._achievementsList.Height.Set(-50f, 1f); + this._achievementsList.Top.Set(50f, 0.0f); + this._achievementsList.ListPadding = 5f; + uiPanel.Append((UIElement) this._achievementsList); + UITextPanel uiTextPanel1 = new UITextPanel(Language.GetText("UI.Achievements"), large: true); + uiTextPanel1.HAlign = 0.5f; + uiTextPanel1.Top.Set(-33f, 0.0f); + uiTextPanel1.SetPadding(13f); + uiTextPanel1.BackgroundColor = new Color(73, 94, 171); + element1.Append((UIElement) uiTextPanel1); + UITextPanel uiTextPanel2 = new UITextPanel(Language.GetText("UI.Back"), 0.7f, true); + uiTextPanel2.Width.Set(-10f, 0.5f); + uiTextPanel2.Height.Set(50f, 0.0f); + uiTextPanel2.VAlign = 1f; + uiTextPanel2.HAlign = 0.5f; + uiTextPanel2.Top.Set(-45f, 0.0f); + uiTextPanel2.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver); + uiTextPanel2.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut); + uiTextPanel2.OnClick += new UIElement.MouseEvent(this.GoBackClick); + element1.Append((UIElement) uiTextPanel2); + this._backpanel = (UIElement) uiTextPanel2; + List achievementsList = Main.Achievements.CreateAchievementsList(); + for (int index = 0; index < achievementsList.Count; ++index) + { + UIAchievementListItem achievementListItem = new UIAchievementListItem(achievementsList[index], largeForOtherLanguages); + this._achievementsList.Add((UIElement) achievementListItem); + this._achievementElements.Add(achievementListItem); + } + UIScrollbar scrollbar = new UIScrollbar(); + scrollbar.SetView(100f, 1000f); + scrollbar.Height.Set(-50f, 1f); + scrollbar.Top.Set(50f, 0.0f); + scrollbar.HAlign = 1f; + uiPanel.Append((UIElement) scrollbar); + this._achievementsList.SetScrollbar(scrollbar); + UIElement element2 = new UIElement(); + element2.Width.Set(0.0f, 1f); + element2.Height.Set(32f, 0.0f); + element2.Top.Set(10f, 0.0f); + Asset texture = Main.Assets.Request("Images/UI/Achievement_Categories", (AssetRequestMode) 1); + for (int index = 0; index < 4; ++index) + { + UIToggleImage uiToggleImage = new UIToggleImage(texture, 32, 32, new Point(34 * index, 0), new Point(34 * index, 34)); + uiToggleImage.Left.Set((float) (index * 36 + 8), 0.0f); + uiToggleImage.SetState(true); + uiToggleImage.OnClick += new UIElement.MouseEvent(this.FilterList); + this._categoryButtons.Add(uiToggleImage); + element2.Append((UIElement) uiToggleImage); + } + uiPanel.Append(element2); + } + + public override void Draw(SpriteBatch spriteBatch) + { + base.Draw(spriteBatch); + for (int index = 0; index < this._categoryButtons.Count; ++index) + { + if (this._categoryButtons[index].IsMouseHovering) + { + string textValue; + switch (index) + { + case -1: + textValue = Language.GetTextValue("Achievements.NoCategory"); + break; + case 0: + textValue = Language.GetTextValue("Achievements.SlayerCategory"); + break; + case 1: + textValue = Language.GetTextValue("Achievements.CollectorCategory"); + break; + case 2: + textValue = Language.GetTextValue("Achievements.ExplorerCategory"); + break; + case 3: + textValue = Language.GetTextValue("Achievements.ChallengerCategory"); + break; + default: + textValue = Language.GetTextValue("Achievements.NoCategory"); + break; + } + float x = FontAssets.MouseText.Value.MeasureString(textValue).X; + Vector2 vector2 = new Vector2((float) Main.mouseX, (float) Main.mouseY) + new Vector2(16f); + if ((double) vector2.Y > (double) (Main.screenHeight - 30)) + vector2.Y = (float) (Main.screenHeight - 30); + if ((double) vector2.X > (double) Main.screenWidth - (double) x) + vector2.X = (float) (Main.screenWidth - 460); + Utils.DrawBorderStringFourWay(spriteBatch, FontAssets.MouseText.Value, textValue, vector2.X, vector2.Y, new Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor), Color.Black, Vector2.Zero); + break; + } + } + this.SetupGamepadPoints(spriteBatch); + } + + public void GotoAchievement(Achievement achievement) => this._achievementsList.Goto((UIList.ElementSearchMethod) (element => element is UIAchievementListItem achievementListItem && achievementListItem.GetAchievement() == achievement)); + + private void GoBackClick(UIMouseEvent evt, UIElement listeningElement) + { + Main.menuMode = 0; + IngameFancyUI.Close(); + } + + private void FadedMouseOver(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + ((UIPanel) evt.Target).BackgroundColor = new Color(73, 94, 171); + ((UIPanel) evt.Target).BorderColor = Colors.FancyUIFatButtonMouseOver; + } + + private void FadedMouseOut(UIMouseEvent evt, UIElement listeningElement) + { + ((UIPanel) evt.Target).BackgroundColor = new Color(63, 82, 151) * 0.8f; + ((UIPanel) evt.Target).BorderColor = Color.Black; + } + + private void FilterList(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + this._achievementsList.Clear(); + foreach (UIAchievementListItem achievementElement in this._achievementElements) + { + if (this._categoryButtons[(int) achievementElement.GetAchievement().Category].IsOn) + this._achievementsList.Add((UIElement) achievementElement); + } + this.Recalculate(); + } + + public override void OnActivate() + { + this.InitializePage(); + if (Main.gameMenu) + { + this._outerContainer.Top.Set(220f, 0.0f); + this._outerContainer.Height.Set(-220f, 1f); + } + else + { + this._outerContainer.Top.Set(120f, 0.0f); + this._outerContainer.Height.Set(-120f, 1f); + } + this._achievementsList.UpdateOrder(); + if (!PlayerInput.UsingGamepadUI) + return; + UILinkPointNavigator.ChangePoint(3002); + } + + private void SetupGamepadPoints(SpriteBatch spriteBatch) + { + UILinkPointNavigator.Shortcuts.BackButtonCommand = 3; + int ID = 3000; + UILinkPointNavigator.SetPosition(ID, this._backpanel.GetInnerDimensions().ToRectangle().Center.ToVector2()); + UILinkPointNavigator.SetPosition(ID + 1, this._outerContainer.GetInnerDimensions().ToRectangle().Center.ToVector2()); + int key = ID; + UILinkPoint point1 = UILinkPointNavigator.Points[key]; + point1.Unlink(); + point1.Up = key + 1; + int num = key + 1; + UILinkPoint point2 = UILinkPointNavigator.Points[num]; + point2.Unlink(); + point2.Up = num + 1; + point2.Down = num - 1; + for (int index = 0; index < this._categoryButtons.Count; ++index) + { + ++num; + UILinkPointNavigator.Shortcuts.FANCYUI_HIGHEST_INDEX = num; + UILinkPointNavigator.SetPosition(num, this._categoryButtons[index].GetInnerDimensions().ToRectangle().Center.ToVector2()); + UILinkPoint point3 = UILinkPointNavigator.Points[num]; + point3.Unlink(); + point3.Left = index == 0 ? -3 : num - 1; + point3.Right = index == this._categoryButtons.Count - 1 ? -4 : num + 1; + point3.Down = ID; + } + } + } +} diff --git a/GameContent/UI/States/UIBestiaryTest.cs b/GameContent/UI/States/UIBestiaryTest.cs new file mode 100644 index 0000000..45cfea0 --- /dev/null +++ b/GameContent/UI/States/UIBestiaryTest.cs @@ -0,0 +1,844 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UIBestiaryTest +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.GameContent.Bestiary; +using Terraria.GameContent.UI.Elements; +using Terraria.GameInput; +using Terraria.ID; +using Terraria.Localization; +using Terraria.UI; +using Terraria.UI.Gamepad; + +namespace Terraria.GameContent.UI.States +{ + public class UIBestiaryTest : UIState + { + private UIElement _bestiarySpace; + private UIBestiaryEntryInfoPage _infoSpace; + private UIBestiaryEntryButton _selectedEntryButton; + private List _originalEntriesList; + private List _workingSetEntries; + private UIText _indexesRangeText; + private EntryFilterer _filterer = new EntryFilterer(); + private EntrySorter _sorter = new EntrySorter(); + private UIBestiaryEntryGrid _entryGrid; + private UIBestiarySortingOptionsGrid _sortingGrid; + private UIBestiaryFilteringOptionsGrid _filteringGrid; + private UISearchBar _searchBar; + private UIPanel _searchBoxPanel; + private UIText _sortingText; + private UIText _filteringText; + private string _searchString; + private BestiaryUnlockProgressReport _progressReport; + private UIText _progressPercentText; + private UIColoredSliderSimple _unlocksProgressBar; + + public UIBestiaryTest(BestiaryDatabase database) + { + this._filterer.SetSearchFilterObject(new Filters.BySearch()); + this._originalEntriesList = new List((IEnumerable) database.Entries); + this._workingSetEntries = new List((IEnumerable) this._originalEntriesList); + this._filterer.AddFilters(database.Filters); + this._sorter.AddSortSteps(database.SortSteps); + this.BuildPage(); + } + + public void OnOpenPage() => this.UpdateBestiaryContents(); + + private void BuildPage() + { + this.RemoveAllChildren(); + int num1 = true.ToInt() * 100; + UIElement uiElement1 = new UIElement(); + uiElement1.Width.Set(0.0f, 0.875f); + uiElement1.MaxWidth.Set(800f + (float) num1, 0.0f); + uiElement1.MinWidth.Set(600f + (float) num1, 0.0f); + uiElement1.Top.Set(220f, 0.0f); + uiElement1.Height.Set(-220f, 1f); + uiElement1.HAlign = 0.5f; + this.Append(uiElement1); + this.MakeExitButton(uiElement1); + UIPanel uiPanel = new UIPanel(); + uiPanel.Width.Set(0.0f, 1f); + uiPanel.Height.Set(-90f, 1f); + uiPanel.BackgroundColor = new Color(33, 43, 79) * 0.8f; + uiElement1.Append((UIElement) uiPanel); + uiPanel.PaddingTop -= 4f; + uiPanel.PaddingBottom -= 4f; + int num2 = 24; + UIElement uiElement2 = new UIElement() + { + Width = new StyleDimension(0.0f, 1f), + Height = new StyleDimension((float) num2, 0.0f), + VAlign = 0.0f + }; + uiElement2.SetPadding(0.0f); + uiPanel.Append(uiElement2); + UIBestiaryEntryInfoPage bestiaryEntryInfoPage = new UIBestiaryEntryInfoPage(); + bestiaryEntryInfoPage.Height = new StyleDimension(12f, 1f); + bestiaryEntryInfoPage.HAlign = 1f; + UIBestiaryEntryInfoPage infoSpace = bestiaryEntryInfoPage; + this.AddSortAndFilterButtons(uiElement2, infoSpace); + this.AddSearchBar(uiElement2, infoSpace); + int num3 = 20; + UIElement element1 = new UIElement() + { + Width = new StyleDimension(0.0f, 1f), + Height = new StyleDimension((float) (-num2 - 6 - num3), 1f), + VAlign = 1f, + Top = new StyleDimension((float) -num3, 0.0f) + }; + element1.SetPadding(0.0f); + uiPanel.Append(element1); + UIElement uiElement3 = new UIElement() + { + Width = new StyleDimension(0.0f, 1f), + Height = new StyleDimension(20f, 0.0f), + VAlign = 1f + }; + uiPanel.Append(uiElement3); + uiElement3.SetPadding(0.0f); + this.FillProgressBottomBar(uiElement3); + UIElement element2 = new UIElement() + { + Width = new StyleDimension(-12f - infoSpace.Width.Pixels, 1f), + Height = new StyleDimension(-4f, 1f), + VAlign = 1f + }; + element1.Append(element2); + element2.SetPadding(0.0f); + this._bestiarySpace = element2; + UIBestiaryEntryGrid bestiaryEntryGrid = new UIBestiaryEntryGrid(this._workingSetEntries, new UIElement.MouseEvent(this.Click_SelectEntryButton)); + element2.Append((UIElement) bestiaryEntryGrid); + this._entryGrid = bestiaryEntryGrid; + this._entryGrid.OnGridContentsChanged += new Action(this.UpdateBestiaryGridRange); + element1.Append((UIElement) infoSpace); + this._infoSpace = infoSpace; + this.AddBackAndForwardButtons(uiElement2); + this._sortingGrid = new UIBestiarySortingOptionsGrid(this._sorter); + this._sortingGrid.OnClick += new UIElement.MouseEvent(this.Click_CloseSortingGrid); + this._sortingGrid.OnClickingOption += new Action(this.UpdateBestiaryContents); + this._filteringGrid = new UIBestiaryFilteringOptionsGrid(this._filterer); + this._filteringGrid.OnClick += new UIElement.MouseEvent(this.Click_CloseFilteringGrid); + this._filteringGrid.OnClickingOption += new Action(this.UpdateBestiaryContents); + this._filteringGrid.SetupAvailabilityTest(this._originalEntriesList); + this._searchBar.SetContents((string) null, true); + this.UpdateBestiaryContents(); + } + + private void FillProgressBottomBar(UIElement container) + { + UIText uiText = new UIText("", 0.8f); + uiText.HAlign = 0.0f; + uiText.VAlign = 1f; + uiText.TextOriginX = 0.0f; + this._progressPercentText = uiText; + UIColoredSliderSimple coloredSliderSimple1 = new UIColoredSliderSimple(); + coloredSliderSimple1.Width = new StyleDimension(0.0f, 1f); + coloredSliderSimple1.Height = new StyleDimension(15f, 0.0f); + coloredSliderSimple1.VAlign = 1f; + coloredSliderSimple1.FilledColor = new Color(51, 137, (int) byte.MaxValue); + coloredSliderSimple1.EmptyColor = new Color(35, 43, 81); + coloredSliderSimple1.FillPercent = 0.0f; + UIColoredSliderSimple coloredSliderSimple2 = coloredSliderSimple1; + coloredSliderSimple2.OnUpdate += new UIElement.ElementEvent(this.ShowStats_Completion); + this._unlocksProgressBar = coloredSliderSimple2; + container.Append((UIElement) coloredSliderSimple2); + } + + private void ShowStats_Completion(UIElement element) + { + if (!element.IsMouseHovering) + return; + string completionPercentText = this.GetCompletionPercentText(); + Main.instance.MouseText(completionPercentText); + } + + private string GetCompletionPercentText() => Language.GetTextValueWith("BestiaryInfo.PercentCollected", (object) new + { + Percent = Utils.PrettifyPercentDisplay(this.GetProgressPercent(), "P2") + }); + + private float GetProgressPercent() => this._progressReport.CompletionPercent; + + private void EmptyInteraction(float input) + { + } + + private void EmptyInteraction2() + { + } + + private Color GetColorAtBlip(float percentile) => (double) percentile < (double) this.GetProgressPercent() ? new Color(51, 137, (int) byte.MaxValue) : new Color(35, 40, 83); + + private void AddBackAndForwardButtons(UIElement innerTopContainer) + { + UIImageButton uiImageButton1 = new UIImageButton(Main.Assets.Request("Images/UI/Bestiary/Button_Back", (AssetRequestMode) 1)); + uiImageButton1.SetHoverImage(Main.Assets.Request("Images/UI/Bestiary/Button_Border", (AssetRequestMode) 1)); + uiImageButton1.SetVisibility(1f, 1f); + uiImageButton1.SetSnapPoint("BackPage", 0); + this._entryGrid.MakeButtonGoByOffset((UIElement) uiImageButton1, -1); + innerTopContainer.Append((UIElement) uiImageButton1); + UIImageButton uiImageButton2 = new UIImageButton(Main.Assets.Request("Images/UI/Bestiary/Button_Forward", (AssetRequestMode) 1)); + uiImageButton2.Left = new StyleDimension(uiImageButton1.Width.Pixels + 1f, 0.0f); + UIImageButton uiImageButton3 = uiImageButton2; + uiImageButton3.SetHoverImage(Main.Assets.Request("Images/UI/Bestiary/Button_Border", (AssetRequestMode) 1)); + uiImageButton3.SetVisibility(1f, 1f); + uiImageButton3.SetSnapPoint("NextPage", 0); + this._entryGrid.MakeButtonGoByOffset((UIElement) uiImageButton3, 1); + innerTopContainer.Append((UIElement) uiImageButton3); + UIPanel uiPanel1 = new UIPanel(); + uiPanel1.Left = new StyleDimension((float) ((double) uiImageButton1.Width.Pixels + 1.0 + (double) uiImageButton3.Width.Pixels + 3.0), 0.0f); + uiPanel1.Width = new StyleDimension(135f, 0.0f); + uiPanel1.Height = new StyleDimension(0.0f, 1f); + uiPanel1.VAlign = 0.5f; + UIPanel uiPanel2 = uiPanel1; + uiPanel2.BackgroundColor = new Color(35, 40, 83); + uiPanel2.BorderColor = new Color(35, 40, 83); + uiPanel2.SetPadding(0.0f); + innerTopContainer.Append((UIElement) uiPanel2); + UIText uiText1 = new UIText("9000-9999 (9001)", 0.8f); + uiText1.HAlign = 0.5f; + uiText1.VAlign = 0.5f; + UIText uiText2 = uiText1; + uiPanel2.Append((UIElement) uiText2); + this._indexesRangeText = uiText2; + } + + private void AddSortAndFilterButtons( + UIElement innerTopContainer, + UIBestiaryEntryInfoPage infoSpace) + { + int num = 17; + UIImageButton uiImageButton1 = new UIImageButton(Main.Assets.Request("Images/UI/Bestiary/Button_Filtering", (AssetRequestMode) 1)); + uiImageButton1.Left = new StyleDimension(-infoSpace.Width.Pixels - (float) num, 0.0f); + uiImageButton1.HAlign = 1f; + UIImageButton uiImageButton2 = uiImageButton1; + uiImageButton2.SetHoverImage(Main.Assets.Request("Images/UI/Bestiary/Button_Wide_Border", (AssetRequestMode) 1)); + uiImageButton2.SetVisibility(1f, 1f); + uiImageButton2.SetSnapPoint("FilterButton", 0); + uiImageButton2.OnClick += new UIElement.MouseEvent(this.OpenOrCloseFilteringGrid); + innerTopContainer.Append((UIElement) uiImageButton2); + UIText uiText1 = new UIText("", 0.8f); + uiText1.Left = new StyleDimension(34f, 0.0f); + uiText1.Top = new StyleDimension(2f, 0.0f); + uiText1.VAlign = 0.5f; + uiText1.TextOriginX = 0.0f; + UIText uiText2 = uiText1; + uiImageButton2.Append((UIElement) uiText2); + this._filteringText = uiText2; + UIImageButton uiImageButton3 = new UIImageButton(Main.Assets.Request("Images/UI/Bestiary/Button_Sorting", (AssetRequestMode) 1)); + uiImageButton3.Left = new StyleDimension((float) (-(double) infoSpace.Width.Pixels - (double) uiImageButton2.Width.Pixels - 3.0) - (float) num, 0.0f); + uiImageButton3.HAlign = 1f; + UIImageButton uiImageButton4 = uiImageButton3; + uiImageButton4.SetHoverImage(Main.Assets.Request("Images/UI/Bestiary/Button_Wide_Border", (AssetRequestMode) 1)); + uiImageButton4.SetVisibility(1f, 1f); + uiImageButton4.SetSnapPoint("SortButton", 0); + uiImageButton4.OnClick += new UIElement.MouseEvent(this.OpenOrCloseSortingOptions); + innerTopContainer.Append((UIElement) uiImageButton4); + UIText uiText3 = new UIText("", 0.8f); + uiText3.Left = new StyleDimension(34f, 0.0f); + uiText3.Top = new StyleDimension(2f, 0.0f); + uiText3.VAlign = 0.5f; + uiText3.TextOriginX = 0.0f; + UIText uiText4 = uiText3; + uiImageButton4.Append((UIElement) uiText4); + this._sortingText = uiText4; + } + + private void AddSearchBar(UIElement innerTopContainer, UIBestiaryEntryInfoPage infoSpace) + { + UIImageButton uiImageButton1 = new UIImageButton(Main.Assets.Request("Images/UI/Bestiary/Button_Search", (AssetRequestMode) 1)); + uiImageButton1.Left = new StyleDimension(-infoSpace.Width.Pixels, 1f); + uiImageButton1.VAlign = 0.5f; + UIImageButton uiImageButton2 = uiImageButton1; + uiImageButton2.OnClick += new UIElement.MouseEvent(this.Click_SearchArea); + uiImageButton2.SetHoverImage(Main.Assets.Request("Images/UI/Bestiary/Button_Search_Border", (AssetRequestMode) 1)); + uiImageButton2.SetVisibility(1f, 1f); + uiImageButton2.SetSnapPoint("SearchButton", 0); + innerTopContainer.Append((UIElement) uiImageButton2); + UIPanel uiPanel1 = new UIPanel(); + uiPanel1.Left = new StyleDimension((float) (-(double) infoSpace.Width.Pixels + (double) uiImageButton2.Width.Pixels + 3.0), 1f); + uiPanel1.Width = new StyleDimension((float) ((double) infoSpace.Width.Pixels - (double) uiImageButton2.Width.Pixels - 3.0), 0.0f); + uiPanel1.Height = new StyleDimension(0.0f, 1f); + uiPanel1.VAlign = 0.5f; + UIPanel uiPanel2 = uiPanel1; + this._searchBoxPanel = uiPanel2; + uiPanel2.BackgroundColor = new Color(35, 40, 83); + uiPanel2.BorderColor = new Color(35, 40, 83); + uiPanel2.SetPadding(0.0f); + innerTopContainer.Append((UIElement) uiPanel2); + UISearchBar uiSearchBar1 = new UISearchBar(Language.GetText("UI.PlayerNameSlot"), 0.8f); + uiSearchBar1.Width = new StyleDimension(0.0f, 1f); + uiSearchBar1.Height = new StyleDimension(0.0f, 1f); + uiSearchBar1.HAlign = 0.0f; + uiSearchBar1.VAlign = 0.5f; + uiSearchBar1.Left = new StyleDimension(0.0f, 0.0f); + uiSearchBar1.IgnoresMouseInteraction = true; + UISearchBar uiSearchBar2 = uiSearchBar1; + this._searchBar = uiSearchBar2; + uiPanel2.OnClick += new UIElement.MouseEvent(this.Click_SearchArea); + uiSearchBar2.OnContentsChanged += new Action(this.OnSearchContentsChanged); + uiPanel2.Append((UIElement) uiSearchBar2); + uiSearchBar2.OnStartTakingInput += new Action(this.OnStartTakingInput); + uiSearchBar2.OnEndTakingInput += new Action(this.OnEndTakingInput); + uiSearchBar2.OnNeedingVirtualKeyboard += new Action(this.OpenVirtualKeyboardWhenNeeded); + } + + private void OpenVirtualKeyboardWhenNeeded() + { + int length = 40; + UIVirtualKeyboard uiVirtualKeyboard = new UIVirtualKeyboard(Language.GetText("UI.PlayerNameSlot").Value, this._searchString, new UIVirtualKeyboard.KeyboardSubmitEvent(this.OnFinishedSettingName), new Action(this.GoBackHere), allowEmpty: true); + uiVirtualKeyboard.SetMaxInputLength(length); + UserInterface.ActiveInstance.SetState((UIState) uiVirtualKeyboard); + } + + private void OnFinishedSettingName(string name) + { + this._searchBar.SetContents(name.Trim()); + this.GoBackHere(); + } + + private void GoBackHere() + { + UserInterface.ActiveInstance.SetState((UIState) this); + this._searchBar.ToggleTakingText(); + } + + private void OnStartTakingInput() => this._searchBoxPanel.BorderColor = Main.OurFavoriteColor; + + private void OnEndTakingInput() => this._searchBoxPanel.BorderColor = new Color(35, 40, 83); + + private void OnSearchContentsChanged(string contents) + { + this._searchString = contents; + this._filterer.SetSearchFilter(contents); + this.UpdateBestiaryContents(); + } + + private void Click_SearchArea(UIMouseEvent evt, UIElement listeningElement) => this._searchBar.ToggleTakingText(); + + private void FilterEntries() + { + this._workingSetEntries.Clear(); + this._workingSetEntries.AddRange(this._originalEntriesList.Where(new Func(this._filterer.FitsFilter))); + } + + private void SortEntries() => this._workingSetEntries.Sort((IComparer) this._sorter); + + private void FillBestiarySpaceWithEntries() + { + if (this._entryGrid == null || this._entryGrid.Parent == null) + return; + this.DeselectEntryButton(); + this._progressReport = this.GetUnlockProgress(); + this._entryGrid.FillBestiarySpaceWithEntries(); + } + + public void UpdateBestiaryGridRange() => this._indexesRangeText.SetText(this._entryGrid.GetRangeText()); + + public override void Recalculate() + { + base.Recalculate(); + this.FillBestiarySpaceWithEntries(); + } + + private void GetEntriesToShow( + out int maxEntriesWidth, + out int maxEntriesHeight, + out int maxEntriesToHave) + { + Rectangle rectangle = this._bestiarySpace.GetDimensions().ToRectangle(); + maxEntriesWidth = rectangle.Width / 72; + maxEntriesHeight = rectangle.Height / 72; + int num = 0; + maxEntriesToHave = maxEntriesWidth * maxEntriesHeight - num; + } + + private void MakeExitButton(UIElement outerContainer) + { + UITextPanel uiTextPanel1 = new UITextPanel(Language.GetText("UI.Back"), 0.7f, true); + uiTextPanel1.Width = StyleDimension.FromPixelsAndPercent(-10f, 0.5f); + uiTextPanel1.Height = StyleDimension.FromPixels(50f); + uiTextPanel1.VAlign = 1f; + uiTextPanel1.HAlign = 0.5f; + uiTextPanel1.Top = StyleDimension.FromPixels(-25f); + UITextPanel uiTextPanel2 = uiTextPanel1; + uiTextPanel2.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver); + uiTextPanel2.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut); + uiTextPanel2.OnMouseDown += new UIElement.MouseEvent(this.Click_GoBack); + uiTextPanel2.SetSnapPoint("ExitButton", 0); + outerContainer.Append((UIElement) uiTextPanel2); + } + + private void Click_GoBack(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(11); + if (Main.gameMenu) + Main.menuMode = 0; + else + IngameFancyUI.Close(); + } + + private void OpenOrCloseSortingOptions(UIMouseEvent evt, UIElement listeningElement) + { + if (this._sortingGrid.Parent != null) + { + this.CloseSortingGrid(); + } + else + { + this._bestiarySpace.RemoveChild((UIElement) this._sortingGrid); + this._bestiarySpace.RemoveChild((UIElement) this._filteringGrid); + this._bestiarySpace.Append((UIElement) this._sortingGrid); + } + } + + private void OpenOrCloseFilteringGrid(UIMouseEvent evt, UIElement listeningElement) + { + if (this._filteringGrid.Parent != null) + { + this.CloseFilteringGrid(); + } + else + { + this._bestiarySpace.RemoveChild((UIElement) this._sortingGrid); + this._bestiarySpace.RemoveChild((UIElement) this._filteringGrid); + this._bestiarySpace.Append((UIElement) this._filteringGrid); + } + } + + private void Click_CloseFilteringGrid(UIMouseEvent evt, UIElement listeningElement) + { + if (evt.Target != this._filteringGrid) + return; + this.CloseFilteringGrid(); + } + + private void CloseFilteringGrid() + { + this.UpdateBestiaryContents(); + this._bestiarySpace.RemoveChild((UIElement) this._filteringGrid); + } + + private void UpdateBestiaryContents() + { + this._filteringGrid.UpdateAvailability(); + this._sortingText.SetText(this._sorter.GetDisplayName()); + this._filteringText.SetText(this._filterer.GetDisplayName()); + this.FilterEntries(); + this.SortEntries(); + this.FillBestiarySpaceWithEntries(); + this._progressReport = this.GetUnlockProgress(); + this._progressPercentText.SetText(this.GetCompletionPercentText()); + this._unlocksProgressBar.FillPercent = this.GetProgressPercent(); + } + + private void Click_CloseSortingGrid(UIMouseEvent evt, UIElement listeningElement) + { + if (evt.Target != this._sortingGrid) + return; + this.CloseSortingGrid(); + } + + private void CloseSortingGrid() + { + this.UpdateBestiaryContents(); + this._bestiarySpace.RemoveChild((UIElement) this._sortingGrid); + } + + private void FadedMouseOver(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + ((UIPanel) evt.Target).BackgroundColor = new Color(73, 94, 171); + ((UIPanel) evt.Target).BorderColor = Colors.FancyUIFatButtonMouseOver; + } + + private void FadedMouseOut(UIMouseEvent evt, UIElement listeningElement) + { + ((UIPanel) evt.Target).BackgroundColor = new Color(63, 82, 151) * 0.8f; + ((UIPanel) evt.Target).BorderColor = Color.Black; + } + + private void Click_SelectEntryButton(UIMouseEvent evt, UIElement listeningElement) + { + UIBestiaryEntryButton button = (UIBestiaryEntryButton) listeningElement; + if (button == null) + return; + this.SelectEntryButton(button); + } + + private void SelectEntryButton(UIBestiaryEntryButton button) + { + this.DeselectEntryButton(); + this._selectedEntryButton = button; + this._infoSpace.FillInfoForEntry(button.Entry, new ExtraBestiaryInfoPageInformation() + { + BestiaryProgressReport = this._progressReport + }); + } + + private void DeselectEntryButton() => this._infoSpace.FillInfoForEntry((BestiaryEntry) null, new ExtraBestiaryInfoPageInformation()); + + public BestiaryUnlockProgressReport GetUnlockProgress() + { + float num1 = 0.0f; + int num2 = 0; + List originalEntriesList = this._originalEntriesList; + for (int index = 0; index < originalEntriesList.Count; ++index) + { + int num3 = originalEntriesList[index].UIInfoProvider.GetEntryUICollectionInfo().UnlockState > BestiaryEntryUnlockState.NotKnownAtAll_0 ? 1 : 0; + ++num2; + num1 += (float) num3; + } + return new BestiaryUnlockProgressReport() + { + EntriesTotal = num2, + CompletionAmountTotal = num1 + }; + } + + public override void Draw(SpriteBatch spriteBatch) + { + base.Draw(spriteBatch); + this.SetupGamepadPoints(spriteBatch); + } + + private void SetupGamepadPoints(SpriteBatch spriteBatch) + { + UILinkPointNavigator.Shortcuts.BackButtonCommand = 1; + int num1 = 3000; + int num2 = num1; + List snapPoints = this.GetSnapPoints(); + SnapPoint snap1 = (SnapPoint) null; + SnapPoint snap2 = (SnapPoint) null; + SnapPoint snap3 = (SnapPoint) null; + SnapPoint snap4 = (SnapPoint) null; + SnapPoint snap5 = (SnapPoint) null; + SnapPoint snap6 = (SnapPoint) null; + for (int index = 0; index < snapPoints.Count; ++index) + { + SnapPoint snapPoint = snapPoints[index]; + string name = snapPoint.Name; + if (!(name == "BackPage")) + { + if (!(name == "NextPage")) + { + if (!(name == "ExitButton")) + { + if (!(name == "FilterButton")) + { + if (!(name == "SortButton")) + { + if (name == "SearchButton") + snap5 = snapPoint; + } + else + snap3 = snapPoint; + } + else + snap4 = snapPoint; + } + else + snap6 = snapPoint; + } + else + snap2 = snapPoint; + } + else + snap1 = snapPoint; + } + int id1 = num2; + int num3 = id1 + 1; + UILinkPoint uiLinkPoint1 = this.MakeLinkPointFromSnapPoint(id1, snap1); + int id2 = num3; + int num4 = id2 + 1; + UILinkPoint uiLinkPoint2 = this.MakeLinkPointFromSnapPoint(id2, snap2); + int id3 = num4; + int num5 = id3 + 1; + UILinkPoint downSide1 = this.MakeLinkPointFromSnapPoint(id3, snap6); + int id4 = num5; + int num6 = id4 + 1; + UILinkPoint uiLinkPoint3 = this.MakeLinkPointFromSnapPoint(id4, snap4); + int id5 = num6; + int num7 = id5 + 1; + UILinkPoint uiLinkPoint4 = this.MakeLinkPointFromSnapPoint(id5, snap3); + int id6 = num7; + int currentID = id6 + 1; + UILinkPoint rightSide = this.MakeLinkPointFromSnapPoint(id6, snap5); + this.PairLeftRight(uiLinkPoint1, uiLinkPoint2); + this.PairLeftRight(uiLinkPoint2, uiLinkPoint4); + this.PairLeftRight(uiLinkPoint4, uiLinkPoint3); + this.PairLeftRight(uiLinkPoint3, rightSide); + downSide1.Up = uiLinkPoint2.ID; + UILinkPoint[,] gridPoints = new UILinkPoint[1, 1]; + if (this._filteringGrid.Parent != null) + { + int gridWidth; + int gridHeight; + this.SetupPointsForFilterGrid(ref currentID, snapPoints, out gridWidth, out gridHeight, out gridPoints); + this.PairUpDown(uiLinkPoint2, downSide1); + this.PairUpDown(uiLinkPoint1, downSide1); + for (int index = gridWidth - 1; index >= 0; --index) + { + UILinkPoint upSide1 = gridPoints[index, gridHeight - 1]; + if (upSide1 != null) + this.PairUpDown(upSide1, downSide1); + UILinkPoint upSide2 = gridPoints[index, gridHeight - 2]; + if (upSide2 != null && upSide1 == null) + this.PairUpDown(upSide2, downSide1); + UILinkPoint downSide2 = gridPoints[index, 0]; + if (downSide2 != null) + { + if (index < gridWidth - 3) + this.PairUpDown(uiLinkPoint4, downSide2); + else + this.PairUpDown(uiLinkPoint3, downSide2); + } + } + } + else if (this._sortingGrid.Parent != null) + { + int gridWidth; + int gridHeight; + this.SetupPointsForSortingGrid(ref currentID, snapPoints, out gridWidth, out gridHeight, out gridPoints); + this.PairUpDown(uiLinkPoint2, downSide1); + this.PairUpDown(uiLinkPoint1, downSide1); + for (int index = gridWidth - 1; index >= 0; --index) + { + UILinkPoint upSide = gridPoints[index, gridHeight - 1]; + if (upSide != null) + this.PairUpDown(upSide, downSide1); + UILinkPoint downSide3 = gridPoints[index, 0]; + if (downSide3 != null) + { + this.PairUpDown(uiLinkPoint3, downSide3); + this.PairUpDown(uiLinkPoint4, downSide3); + } + } + } + else if (this._entryGrid.Parent != null) + { + int gridWidth; + int gridHeight; + this.SetupPointsForEntryGrid(ref currentID, snapPoints, out gridWidth, out gridHeight, out gridPoints); + for (int index = 0; index < gridWidth; ++index) + { + if (gridHeight - 1 >= 0) + { + UILinkPoint upSide3 = gridPoints[index, gridHeight - 1]; + if (upSide3 != null) + this.PairUpDown(upSide3, downSide1); + if (gridHeight - 2 >= 0) + { + UILinkPoint upSide4 = gridPoints[index, gridHeight - 2]; + if (upSide4 != null && upSide3 == null) + this.PairUpDown(upSide4, downSide1); + } + } + UILinkPoint downSide4 = gridPoints[index, 0]; + if (downSide4 != null) + { + if (index < gridWidth / 2) + this.PairUpDown(uiLinkPoint2, downSide4); + else if (index == gridWidth - 1) + this.PairUpDown(uiLinkPoint3, downSide4); + else + this.PairUpDown(uiLinkPoint4, downSide4); + } + } + UILinkPoint downSide5 = gridPoints[0, 0]; + if (downSide5 != null) + { + this.PairUpDown(uiLinkPoint2, downSide5); + this.PairUpDown(uiLinkPoint1, downSide5); + } + else + { + this.PairUpDown(uiLinkPoint2, downSide1); + this.PairUpDown(uiLinkPoint1, downSide1); + this.PairUpDown(uiLinkPoint3, downSide1); + this.PairUpDown(uiLinkPoint4, downSide1); + } + } + List lostrefpoints = new List(); + for (int key = num1; key < currentID; ++key) + lostrefpoints.Add(UILinkPointNavigator.Points[key]); + if (!PlayerInput.UsingGamepadUI || UILinkPointNavigator.CurrentPoint < currentID) + return; + this.MoveToVisuallyClosestPoint(lostrefpoints); + } + + private void MoveToVisuallyClosestPoint(List lostrefpoints) + { + Dictionary points = UILinkPointNavigator.Points; + Vector2 mouseScreen = Main.MouseScreen; + UILinkPoint uiLinkPoint = (UILinkPoint) null; + foreach (UILinkPoint lostrefpoint in lostrefpoints) + { + if (uiLinkPoint == null || (double) Vector2.Distance(mouseScreen, uiLinkPoint.Position) > (double) Vector2.Distance(mouseScreen, lostrefpoint.Position)) + uiLinkPoint = lostrefpoint; + } + if (uiLinkPoint == null) + return; + UILinkPointNavigator.ChangePoint(uiLinkPoint.ID); + } + + private void SetupPointsForEntryGrid( + ref int currentID, + List pts, + out int gridWidth, + out int gridHeight, + out UILinkPoint[,] gridPoints) + { + List pointsByCategoryName = UIBestiaryTest.GetOrderedPointsByCategoryName(pts, "Entries"); + this._entryGrid.GetEntriesToShow(out gridWidth, out gridHeight, out int _); + gridPoints = new UILinkPoint[gridWidth, gridHeight]; + for (int index1 = 0; index1 < pointsByCategoryName.Count; ++index1) + { + int index2 = index1 % gridWidth; + int index3 = index1 / gridWidth; + gridPoints[index2, index3] = this.MakeLinkPointFromSnapPoint(currentID++, pointsByCategoryName[index1]); + } + for (int index4 = 0; index4 < gridWidth; ++index4) + { + for (int index5 = 0; index5 < gridHeight; ++index5) + { + UILinkPoint uiLinkPoint = gridPoints[index4, index5]; + if (index4 < gridWidth - 1) + { + UILinkPoint rightSide = gridPoints[index4 + 1, index5]; + if (uiLinkPoint != null && rightSide != null) + this.PairLeftRight(uiLinkPoint, rightSide); + } + if (index5 < gridHeight - 1) + { + UILinkPoint downSide = gridPoints[index4, index5 + 1]; + if (uiLinkPoint != null && downSide != null) + this.PairUpDown(uiLinkPoint, downSide); + } + } + } + } + + private void SetupPointsForFilterGrid( + ref int currentID, + List pts, + out int gridWidth, + out int gridHeight, + out UILinkPoint[,] gridPoints) + { + List pointsByCategoryName = UIBestiaryTest.GetOrderedPointsByCategoryName(pts, "Filters"); + this._filteringGrid.GetEntriesToShow(out gridWidth, out gridHeight, out int _); + gridPoints = new UILinkPoint[gridWidth, gridHeight]; + for (int index1 = 0; index1 < pointsByCategoryName.Count; ++index1) + { + int index2 = index1 % gridWidth; + int index3 = index1 / gridWidth; + gridPoints[index2, index3] = this.MakeLinkPointFromSnapPoint(currentID++, pointsByCategoryName[index1]); + } + for (int index4 = 0; index4 < gridWidth; ++index4) + { + for (int index5 = 0; index5 < gridHeight; ++index5) + { + UILinkPoint uiLinkPoint = gridPoints[index4, index5]; + if (index4 < gridWidth - 1) + { + UILinkPoint rightSide = gridPoints[index4 + 1, index5]; + if (uiLinkPoint != null && rightSide != null) + this.PairLeftRight(uiLinkPoint, rightSide); + } + if (index5 < gridHeight - 1) + { + UILinkPoint downSide = gridPoints[index4, index5 + 1]; + if (uiLinkPoint != null && downSide != null) + this.PairUpDown(uiLinkPoint, downSide); + } + } + } + } + + private void SetupPointsForSortingGrid( + ref int currentID, + List pts, + out int gridWidth, + out int gridHeight, + out UILinkPoint[,] gridPoints) + { + List pointsByCategoryName = UIBestiaryTest.GetOrderedPointsByCategoryName(pts, "SortSteps"); + this._sortingGrid.GetEntriesToShow(out gridWidth, out gridHeight, out int _); + gridPoints = new UILinkPoint[gridWidth, gridHeight]; + for (int index1 = 0; index1 < pointsByCategoryName.Count; ++index1) + { + int index2 = index1 % gridWidth; + int index3 = index1 / gridWidth; + gridPoints[index2, index3] = this.MakeLinkPointFromSnapPoint(currentID++, pointsByCategoryName[index1]); + } + for (int index4 = 0; index4 < gridWidth; ++index4) + { + for (int index5 = 0; index5 < gridHeight; ++index5) + { + UILinkPoint uiLinkPoint = gridPoints[index4, index5]; + if (index4 < gridWidth - 1) + { + UILinkPoint rightSide = gridPoints[index4 + 1, index5]; + if (uiLinkPoint != null && rightSide != null) + this.PairLeftRight(uiLinkPoint, rightSide); + } + if (index5 < gridHeight - 1) + { + UILinkPoint downSide = gridPoints[index4, index5 + 1]; + if (uiLinkPoint != null && downSide != null) + this.PairUpDown(uiLinkPoint, downSide); + } + } + } + } + + private static List GetOrderedPointsByCategoryName( + List pts, + string name) + { + return pts.Where((Func) (x => x.Name == name)).OrderBy((Func) (x => x.Id)).ToList(); + } + + private void PairLeftRight(UILinkPoint leftSide, UILinkPoint rightSide) + { + leftSide.Right = rightSide.ID; + rightSide.Left = leftSide.ID; + } + + private void PairUpDown(UILinkPoint upSide, UILinkPoint downSide) + { + upSide.Down = downSide.ID; + downSide.Up = upSide.ID; + } + + private UILinkPoint MakeLinkPointFromSnapPoint(int id, SnapPoint snap) + { + UILinkPointNavigator.SetPosition(id, snap.Position); + UILinkPoint point = UILinkPointNavigator.Points[id]; + point.Unlink(); + return point; + } + + public override void ScrollWheel(UIScrollWheelEvent evt) + { + base.ScrollWheel(evt); + this._infoSpace.UpdateScrollbar(evt.ScrollWheelValue); + } + + public void TryMovingPages(int direction) => this._entryGrid.OffsetLibraryByPages(direction); + } +} diff --git a/GameContent/UI/States/UICharacterCreation.cs b/GameContent/UI/States/UICharacterCreation.cs new file mode 100644 index 0000000..08a47ff --- /dev/null +++ b/GameContent/UI/States/UICharacterCreation.cs @@ -0,0 +1,1512 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UICharacterCreation +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Newtonsoft.Json; +using ReLogic.Content; +using ReLogic.OS; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using Terraria.Audio; +using Terraria.GameContent.Creative; +using Terraria.GameContent.UI.Elements; +using Terraria.GameInput; +using Terraria.ID; +using Terraria.Initializers; +using Terraria.IO; +using Terraria.Localization; +using Terraria.UI; +using Terraria.UI.Gamepad; + +namespace Terraria.GameContent.UI.States +{ + public class UICharacterCreation : UIState + { + private int[] _validClothStyles = new int[10] + { + 0, + 2, + 1, + 3, + 8, + 4, + 6, + 5, + 7, + 9 + }; + private readonly Player _player; + private UIColoredImageButton[] _colorPickers; + private UICharacterCreation.CategoryId _selectedPicker; + private Vector3 _currentColorHSL; + private UIColoredImageButton _clothingStylesCategoryButton; + private UIColoredImageButton _hairStylesCategoryButton; + private UIColoredImageButton _charInfoCategoryButton; + private UIElement _topContainer; + private UIElement _middleContainer; + private UIElement _hslContainer; + private UIElement _hairstylesContainer; + private UIElement _clothStylesContainer; + private UIElement _infoContainer; + private UIText _hslHexText; + private UIText _difficultyDescriptionText; + private UIElement _copyHexButton; + private UIElement _pasteHexButton; + private UIElement _randomColorButton; + private UIElement _copyTemplateButton; + private UIElement _pasteTemplateButton; + private UIElement _randomizePlayerButton; + private UIColoredImageButton _genderMale; + private UIColoredImageButton _genderFemale; + private UICharacterNameButton _charName; + private UIText _helpGlyphLeft; + private UIText _helpGlyphRight; + private UIGamepadHelper _helper; + private List _foundPoints = new List(); + + public UICharacterCreation(Player player) + { + this._player = player; + this._player.difficulty = (byte) 3; + this.BuildPage(); + } + + private void BuildPage() + { + this.RemoveAllChildren(); + int num = 4; + UIElement uiElement1 = new UIElement() + { + Width = StyleDimension.FromPixels(500f), + Height = StyleDimension.FromPixels((float) (380 + num)), + Top = StyleDimension.FromPixels(220f), + HAlign = 0.5f, + VAlign = 0.0f + }; + uiElement1.SetPadding(0.0f); + this.Append(uiElement1); + UIPanel uiPanel = new UIPanel(); + uiPanel.Width = StyleDimension.FromPercent(1f); + uiPanel.Height = StyleDimension.FromPixels(uiElement1.Height.Pixels - 150f - (float) num); + uiPanel.Top = StyleDimension.FromPixels(50f); + uiPanel.BackgroundColor = new Color(33, 43, 79) * 0.8f; + UIPanel container = uiPanel; + container.SetPadding(0.0f); + uiElement1.Append((UIElement) container); + this.MakeBackAndCreatebuttons(uiElement1); + this.MakeCharPreview(container); + UIElement uiElement2 = new UIElement() + { + Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f), + Height = StyleDimension.FromPixelsAndPercent(50f, 0.0f) + }; + uiElement2.SetPadding(0.0f); + uiElement2.PaddingTop = 4f; + uiElement2.PaddingBottom = 0.0f; + container.Append(uiElement2); + UIElement uiElement3 = new UIElement() + { + Top = StyleDimension.FromPixelsAndPercent(uiElement2.Height.Pixels + 6f, 0.0f), + Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f), + Height = StyleDimension.FromPixelsAndPercent(container.Height.Pixels - 70f, 0.0f) + }; + uiElement3.SetPadding(0.0f); + uiElement3.PaddingTop = 3f; + uiElement3.PaddingBottom = 0.0f; + container.Append(uiElement3); + this._topContainer = uiElement2; + this._middleContainer = uiElement3; + this.MakeInfoMenu(uiElement3); + this.MakeHSLMenu(uiElement3); + this.MakeHairsylesMenu(uiElement3); + this.MakeClothStylesMenu(uiElement3); + this.MakeCategoriesBar(uiElement2); + this.Click_CharInfo((UIMouseEvent) null, (UIElement) null); + } + + private void MakeCharPreview(UIPanel container) + { + float num1 = 70f; + for (float num2 = 0.0f; (double) num2 <= 1.0; ++num2) + { + UICharacter uiCharacter1 = new UICharacter(this._player, true, false, 1.5f); + uiCharacter1.Width = StyleDimension.FromPixels(80f); + uiCharacter1.Height = StyleDimension.FromPixelsAndPercent(80f, 0.0f); + uiCharacter1.Top = StyleDimension.FromPixelsAndPercent(-num1, 0.0f); + uiCharacter1.VAlign = 0.0f; + uiCharacter1.HAlign = 0.5f; + UICharacter uiCharacter2 = uiCharacter1; + container.Append((UIElement) uiCharacter2); + } + } + + private void MakeHairsylesMenu(UIElement middleInnerPanel) + { + Main.Hairstyles.UpdateUnlocks(); + UIElement element = new UIElement() + { + Width = StyleDimension.FromPixelsAndPercent(-10f, 1f), + Height = StyleDimension.FromPixelsAndPercent(0.0f, 1f), + HAlign = 0.5f, + VAlign = 0.5f, + Top = StyleDimension.FromPixels(6f) + }; + middleInnerPanel.Append(element); + element.SetPadding(0.0f); + UIList uiList1 = new UIList(); + uiList1.Width = StyleDimension.FromPixelsAndPercent(-18f, 1f); + uiList1.Height = StyleDimension.FromPixelsAndPercent(-6f, 1f); + UIList uiList2 = uiList1; + uiList2.SetPadding(4f); + element.Append((UIElement) uiList2); + UIScrollbar uiScrollbar = new UIScrollbar(); + uiScrollbar.HAlign = 1f; + uiScrollbar.Height = StyleDimension.FromPixelsAndPercent(-30f, 1f); + uiScrollbar.Top = StyleDimension.FromPixels(10f); + UIScrollbar scrollbar = uiScrollbar; + scrollbar.SetView(100f, 1000f); + uiList2.SetScrollbar(scrollbar); + element.Append((UIElement) scrollbar); + int count = Main.Hairstyles.AvailableHairstyles.Count; + UIElement uiElement = new UIElement() + { + Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f), + Height = StyleDimension.FromPixelsAndPercent((float) (48 * (count / 10 + (count % 10 == 0 ? 0 : 1))), 0.0f) + }; + uiList2.Add(uiElement); + uiElement.SetPadding(0.0f); + for (int index = 0; index < count; ++index) + { + UIHairStyleButton uiHairStyleButton1 = new UIHairStyleButton(this._player, Main.Hairstyles.AvailableHairstyles[index]); + uiHairStyleButton1.Left = StyleDimension.FromPixels((float) ((double) (index % 10) * 46.0 + 6.0)); + uiHairStyleButton1.Top = StyleDimension.FromPixels((float) ((double) (index / 10) * 48.0 + 1.0)); + UIHairStyleButton uiHairStyleButton2 = uiHairStyleButton1; + uiHairStyleButton2.SetSnapPoint("Middle", index); + uiElement.Append((UIElement) uiHairStyleButton2); + } + this._hairstylesContainer = element; + } + + private void MakeClothStylesMenu(UIElement middleInnerPanel) + { + UIElement element1 = new UIElement() + { + Width = StyleDimension.FromPixelsAndPercent(-10f, 1f), + Height = StyleDimension.FromPixelsAndPercent(0.0f, 1f), + HAlign = 0.5f, + VAlign = 0.5f + }; + middleInnerPanel.Append(element1); + element1.SetPadding(0.0f); + int num1 = 15; + for (int id = 0; id < this._validClothStyles.Length; ++id) + { + int num2 = 0; + if (id >= this._validClothStyles.Length / 2) + num2 = 20; + UIClothStyleButton clothStyleButton1 = new UIClothStyleButton(this._player, this._validClothStyles[id]); + clothStyleButton1.Left = StyleDimension.FromPixels((float) ((double) id * 46.0 + (double) num2 + 6.0)); + clothStyleButton1.Top = StyleDimension.FromPixels((float) num1); + UIClothStyleButton clothStyleButton2 = clothStyleButton1; + clothStyleButton2.OnMouseDown += new UIElement.MouseEvent(this.Click_CharClothStyle); + clothStyleButton2.SetSnapPoint("Middle", id); + element1.Append((UIElement) clothStyleButton2); + } + for (int index = 0; index < 2; ++index) + { + int num3 = 0; + if (index >= 1) + num3 = 20; + UIHorizontalSeparator horizontalSeparator1 = new UIHorizontalSeparator(); + horizontalSeparator1.Left = StyleDimension.FromPixels((float) ((double) index * 230.0 + (double) num3 + 6.0)); + horizontalSeparator1.Top = StyleDimension.FromPixels((float) (num1 + 86)); + horizontalSeparator1.Width = StyleDimension.FromPixelsAndPercent(230f, 0.0f); + horizontalSeparator1.Color = Color.Lerp(Color.White, new Color(63, 65, 151, (int) byte.MaxValue), 0.85f) * 0.9f; + UIHorizontalSeparator horizontalSeparator2 = horizontalSeparator1; + element1.Append((UIElement) horizontalSeparator2); + UIColoredImageButton pickerWithoutClick = this.CreatePickerWithoutClick(UICharacterCreation.CategoryId.Clothing, "Images/UI/CharCreation/" + (index == 0 ? "ClothStyleMale" : "ClothStyleFemale"), 0.0f, 0.0f); + pickerWithoutClick.Top = StyleDimension.FromPixelsAndPercent((float) (num1 + 92), 0.0f); + pickerWithoutClick.Left = StyleDimension.FromPixels((float) ((double) index * 230.0 + 92.0 + (double) num3 + 6.0)); + pickerWithoutClick.HAlign = 0.0f; + pickerWithoutClick.VAlign = 0.0f; + element1.Append((UIElement) pickerWithoutClick); + if (index == 0) + { + pickerWithoutClick.OnMouseDown += new UIElement.MouseEvent(this.Click_CharGenderMale); + this._genderMale = pickerWithoutClick; + } + else + { + pickerWithoutClick.OnMouseDown += new UIElement.MouseEvent(this.Click_CharGenderFemale); + this._genderFemale = pickerWithoutClick; + } + pickerWithoutClick.SetSnapPoint("Low", index * 4); + } + UIElement element2 = new UIElement() + { + Width = StyleDimension.FromPixels(130f), + Height = StyleDimension.FromPixels(50f), + HAlign = 0.5f, + VAlign = 1f + }; + element1.Append(element2); + UIColoredImageButton coloredImageButton1 = new UIColoredImageButton(Main.Assets.Request("Images/UI/CharCreation/Copy", (AssetRequestMode) 1), true); + coloredImageButton1.VAlign = 0.5f; + coloredImageButton1.HAlign = 0.0f; + coloredImageButton1.Left = StyleDimension.FromPixelsAndPercent(0.0f, 0.0f); + UIColoredImageButton coloredImageButton2 = coloredImageButton1; + coloredImageButton2.OnMouseDown += new UIElement.MouseEvent(this.Click_CopyPlayerTemplate); + element2.Append((UIElement) coloredImageButton2); + this._copyTemplateButton = (UIElement) coloredImageButton2; + UIColoredImageButton coloredImageButton3 = new UIColoredImageButton(Main.Assets.Request("Images/UI/CharCreation/Paste", (AssetRequestMode) 1), true); + coloredImageButton3.VAlign = 0.5f; + coloredImageButton3.HAlign = 0.5f; + UIColoredImageButton coloredImageButton4 = coloredImageButton3; + coloredImageButton4.OnMouseDown += new UIElement.MouseEvent(this.Click_PastePlayerTemplate); + element2.Append((UIElement) coloredImageButton4); + this._pasteTemplateButton = (UIElement) coloredImageButton4; + UIColoredImageButton coloredImageButton5 = new UIColoredImageButton(Main.Assets.Request("Images/UI/CharCreation/Randomize", (AssetRequestMode) 1), true); + coloredImageButton5.VAlign = 0.5f; + coloredImageButton5.HAlign = 1f; + UIColoredImageButton coloredImageButton6 = coloredImageButton5; + coloredImageButton6.OnMouseDown += new UIElement.MouseEvent(this.Click_RandomizePlayer); + element2.Append((UIElement) coloredImageButton6); + this._randomizePlayerButton = (UIElement) coloredImageButton6; + coloredImageButton2.SetSnapPoint("Low", 1); + coloredImageButton4.SetSnapPoint("Low", 2); + coloredImageButton6.SetSnapPoint("Low", 3); + this._clothStylesContainer = element1; + } + + private void MakeCategoriesBar(UIElement categoryContainer) + { + float xPositionStart = -240f; + float xPositionPerId = 48f; + this._colorPickers = new UIColoredImageButton[10]; + categoryContainer.Append((UIElement) this.CreateColorPicker(UICharacterCreation.CategoryId.HairColor, "Images/UI/CharCreation/ColorHair", xPositionStart, xPositionPerId)); + categoryContainer.Append((UIElement) this.CreateColorPicker(UICharacterCreation.CategoryId.Eye, "Images/UI/CharCreation/ColorEye", xPositionStart, xPositionPerId)); + categoryContainer.Append((UIElement) this.CreateColorPicker(UICharacterCreation.CategoryId.Skin, "Images/UI/CharCreation/ColorSkin", xPositionStart, xPositionPerId)); + categoryContainer.Append((UIElement) this.CreateColorPicker(UICharacterCreation.CategoryId.Shirt, "Images/UI/CharCreation/ColorShirt", xPositionStart, xPositionPerId)); + categoryContainer.Append((UIElement) this.CreateColorPicker(UICharacterCreation.CategoryId.Undershirt, "Images/UI/CharCreation/ColorUndershirt", xPositionStart, xPositionPerId)); + categoryContainer.Append((UIElement) this.CreateColorPicker(UICharacterCreation.CategoryId.Pants, "Images/UI/CharCreation/ColorPants", xPositionStart, xPositionPerId)); + categoryContainer.Append((UIElement) this.CreateColorPicker(UICharacterCreation.CategoryId.Shoes, "Images/UI/CharCreation/ColorShoes", xPositionStart, xPositionPerId)); + this._colorPickers[4].SetMiddleTexture(Main.Assets.Request("Images/UI/CharCreation/ColorEyeBack", (AssetRequestMode) 1)); + this._clothingStylesCategoryButton = this.CreatePickerWithoutClick(UICharacterCreation.CategoryId.Clothing, "Images/UI/CharCreation/ClothStyleMale", xPositionStart, xPositionPerId); + this._clothingStylesCategoryButton.OnMouseDown += new UIElement.MouseEvent(this.Click_ClothStyles); + this._clothingStylesCategoryButton.SetSnapPoint("Top", 1); + categoryContainer.Append((UIElement) this._clothingStylesCategoryButton); + this._hairStylesCategoryButton = this.CreatePickerWithoutClick(UICharacterCreation.CategoryId.HairStyle, "Images/UI/CharCreation/HairStyle_Hair", xPositionStart, xPositionPerId); + this._hairStylesCategoryButton.OnMouseDown += new UIElement.MouseEvent(this.Click_HairStyles); + this._hairStylesCategoryButton.SetMiddleTexture(Main.Assets.Request("Images/UI/CharCreation/HairStyle_Arrow", (AssetRequestMode) 1)); + this._hairStylesCategoryButton.SetSnapPoint("Top", 2); + categoryContainer.Append((UIElement) this._hairStylesCategoryButton); + this._charInfoCategoryButton = this.CreatePickerWithoutClick(UICharacterCreation.CategoryId.CharInfo, "Images/UI/CharCreation/CharInfo", xPositionStart, xPositionPerId); + this._charInfoCategoryButton.OnMouseDown += new UIElement.MouseEvent(this.Click_CharInfo); + this._charInfoCategoryButton.SetSnapPoint("Top", 0); + categoryContainer.Append((UIElement) this._charInfoCategoryButton); + this.UpdateColorPickers(); + UIHorizontalSeparator horizontalSeparator1 = new UIHorizontalSeparator(); + horizontalSeparator1.Width = StyleDimension.FromPixelsAndPercent(-20f, 1f); + horizontalSeparator1.Top = StyleDimension.FromPixels(6f); + horizontalSeparator1.VAlign = 1f; + horizontalSeparator1.HAlign = 0.5f; + horizontalSeparator1.Color = Color.Lerp(Color.White, new Color(63, 65, 151, (int) byte.MaxValue), 0.85f) * 0.9f; + UIHorizontalSeparator horizontalSeparator2 = horizontalSeparator1; + categoryContainer.Append((UIElement) horizontalSeparator2); + int num = 21; + UIText uiText1 = new UIText(PlayerInput.GenerateInputTag_ForCurrentGamemode(false, "HotbarMinus")); + uiText1.Left = new StyleDimension((float) -num, 0.0f); + uiText1.VAlign = 0.5f; + uiText1.Top = new StyleDimension(-4f, 0.0f); + UIText uiText2 = uiText1; + categoryContainer.Append((UIElement) uiText2); + UIText uiText3 = new UIText(PlayerInput.GenerateInputTag_ForCurrentGamemode(false, "HotbarMinus")); + uiText3.HAlign = 1f; + uiText3.Left = new StyleDimension((float) (12 + num), 0.0f); + uiText3.VAlign = 0.5f; + uiText3.Top = new StyleDimension(-4f, 0.0f); + UIText uiText4 = uiText3; + categoryContainer.Append((UIElement) uiText4); + this._helpGlyphLeft = uiText2; + this._helpGlyphRight = uiText4; + categoryContainer.OnUpdate += new UIElement.ElementEvent(this.UpdateHelpGlyphs); + } + + private void UpdateHelpGlyphs(UIElement element) + { + string text1 = ""; + string text2 = ""; + if (PlayerInput.UsingGamepad) + { + text1 = PlayerInput.GenerateInputTag_ForCurrentGamemode(false, "HotbarMinus"); + text2 = PlayerInput.GenerateInputTag_ForCurrentGamemode(false, "HotbarPlus"); + } + this._helpGlyphLeft.SetText(text1); + this._helpGlyphRight.SetText(text2); + } + + private UIColoredImageButton CreateColorPicker( + UICharacterCreation.CategoryId id, + string texturePath, + float xPositionStart, + float xPositionPerId) + { + UIColoredImageButton coloredImageButton = new UIColoredImageButton(Main.Assets.Request(texturePath, (AssetRequestMode) 1)); + this._colorPickers[(int) id] = coloredImageButton; + coloredImageButton.VAlign = 0.0f; + coloredImageButton.HAlign = 0.0f; + coloredImageButton.Left.Set(xPositionStart + (float) id * xPositionPerId, 0.5f); + coloredImageButton.OnMouseDown += new UIElement.MouseEvent(this.Click_ColorPicker); + coloredImageButton.SetSnapPoint("Top", (int) id); + return coloredImageButton; + } + + private UIColoredImageButton CreatePickerWithoutClick( + UICharacterCreation.CategoryId id, + string texturePath, + float xPositionStart, + float xPositionPerId) + { + UIColoredImageButton coloredImageButton = new UIColoredImageButton(Main.Assets.Request(texturePath, (AssetRequestMode) 1)); + coloredImageButton.VAlign = 0.0f; + coloredImageButton.HAlign = 0.0f; + coloredImageButton.Left.Set(xPositionStart + (float) id * xPositionPerId, 0.5f); + return coloredImageButton; + } + + private void MakeInfoMenu(UIElement parentContainer) + { + UIElement element1 = new UIElement() + { + Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f), + Height = StyleDimension.FromPixelsAndPercent(0.0f, 1f), + HAlign = 0.5f, + VAlign = 0.0f + }; + element1.SetPadding(10f); + element1.PaddingBottom = 0.0f; + element1.PaddingTop = 0.0f; + parentContainer.Append(element1); + UICharacterNameButton characterNameButton = new UICharacterNameButton(Language.GetText("UI.WorldCreationName"), Language.GetText("UI.PlayerEmptyName")); + characterNameButton.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + characterNameButton.HAlign = 0.5f; + element1.Append((UIElement) characterNameButton); + this._charName = characterNameButton; + characterNameButton.OnMouseDown += new UIElement.MouseEvent(this.Click_Naming); + characterNameButton.SetSnapPoint("Middle", 0); + float num1 = 4f; + float num2 = 0.0f; + float percent = 0.4f; + UIElement element2 = new UIElement() + { + HAlign = 0.0f, + VAlign = 1f, + Width = StyleDimension.FromPixelsAndPercent(-num1, percent), + Height = StyleDimension.FromPixelsAndPercent(-50f, 1f) + }; + element2.SetPadding(0.0f); + element1.Append(element2); + UISlicedImage uiSlicedImage1 = new UISlicedImage(Main.Assets.Request("Images/UI/CharCreation/CategoryPanelHighlight", (AssetRequestMode) 1)); + uiSlicedImage1.HAlign = 1f; + uiSlicedImage1.VAlign = 1f; + uiSlicedImage1.Width = StyleDimension.FromPixelsAndPercent((float) (-(double) num1 * 2.0), 1f - percent); + uiSlicedImage1.Left = StyleDimension.FromPixels(-num1); + uiSlicedImage1.Height = StyleDimension.FromPixelsAndPercent(element2.Height.Pixels, element2.Height.Precent); + UISlicedImage uiSlicedImage2 = uiSlicedImage1; + uiSlicedImage2.SetSliceDepths(10); + uiSlicedImage2.Color = Color.LightGray * 0.7f; + element1.Append((UIElement) uiSlicedImage2); + float num3 = 4f; + UIDifficultyButton difficultyButton1 = new UIDifficultyButton(this._player, Lang.menu[26], Lang.menu[31], (byte) 0, Color.Cyan); + difficultyButton1.HAlign = 0.0f; + difficultyButton1.VAlign = (float) (1.0 / ((double) num3 - 1.0)); + difficultyButton1.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + difficultyButton1.Height = StyleDimension.FromPixelsAndPercent(-num2, 1f / num3); + UIDifficultyButton difficultyButton2 = difficultyButton1; + UIDifficultyButton difficultyButton3 = new UIDifficultyButton(this._player, Lang.menu[25], Lang.menu[30], (byte) 1, Main.mcColor); + difficultyButton3.HAlign = 0.0f; + difficultyButton3.VAlign = (float) (2.0 / ((double) num3 - 1.0)); + difficultyButton3.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + difficultyButton3.Height = StyleDimension.FromPixelsAndPercent(-num2, 1f / num3); + UIDifficultyButton difficultyButton4 = difficultyButton3; + UIDifficultyButton difficultyButton5 = new UIDifficultyButton(this._player, Lang.menu[24], Lang.menu[29], (byte) 2, Main.hcColor); + difficultyButton5.HAlign = 0.0f; + difficultyButton5.VAlign = 1f; + difficultyButton5.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + difficultyButton5.Height = StyleDimension.FromPixelsAndPercent(-num2, 1f / num3); + UIDifficultyButton difficultyButton6 = difficultyButton5; + UIDifficultyButton difficultyButton7 = new UIDifficultyButton(this._player, Language.GetText("UI.Creative"), Language.GetText("UI.CreativeDescriptionPlayer"), (byte) 3, Main.creativeModeColor); + difficultyButton7.HAlign = 0.0f; + difficultyButton7.VAlign = 0.0f; + difficultyButton7.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + difficultyButton7.Height = StyleDimension.FromPixelsAndPercent(-num2, 1f / num3); + UIDifficultyButton difficultyButton8 = difficultyButton7; + UIText uiText1 = new UIText(Lang.menu[26]); + uiText1.HAlign = 0.0f; + uiText1.VAlign = 0.5f; + uiText1.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + uiText1.Height = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + uiText1.Top = StyleDimension.FromPixelsAndPercent(15f, 0.0f); + uiText1.IsWrapped = true; + UIText uiText2 = uiText1; + uiText2.PaddingLeft = 20f; + uiText2.PaddingRight = 20f; + uiSlicedImage2.Append((UIElement) uiText2); + element2.Append((UIElement) difficultyButton2); + element2.Append((UIElement) difficultyButton4); + element2.Append((UIElement) difficultyButton6); + element2.Append((UIElement) difficultyButton8); + this._infoContainer = element1; + this._difficultyDescriptionText = uiText2; + difficultyButton2.OnMouseDown += new UIElement.MouseEvent(this.UpdateDifficultyDescription); + difficultyButton4.OnMouseDown += new UIElement.MouseEvent(this.UpdateDifficultyDescription); + difficultyButton6.OnMouseDown += new UIElement.MouseEvent(this.UpdateDifficultyDescription); + difficultyButton8.OnMouseDown += new UIElement.MouseEvent(this.UpdateDifficultyDescription); + this.UpdateDifficultyDescription((UIMouseEvent) null, (UIElement) null); + difficultyButton2.SetSnapPoint("Middle", 1); + difficultyButton4.SetSnapPoint("Middle", 2); + difficultyButton6.SetSnapPoint("Middle", 3); + difficultyButton8.SetSnapPoint("Middle", 4); + } + + private void UpdateDifficultyDescription(UIMouseEvent evt, UIElement listeningElement) + { + LocalizedText text = Lang.menu[31]; + switch (this._player.difficulty) + { + case 0: + text = Lang.menu[31]; + break; + case 1: + text = Lang.menu[30]; + break; + case 2: + text = Lang.menu[29]; + break; + case 3: + text = Language.GetText("UI.CreativeDescriptionPlayer"); + break; + } + this._difficultyDescriptionText.SetText(text); + } + + private void MakeHSLMenu(UIElement parentContainer) + { + UIElement element1 = new UIElement() + { + Width = StyleDimension.FromPixelsAndPercent(220f, 0.0f), + Height = StyleDimension.FromPixelsAndPercent(158f, 0.0f), + HAlign = 0.5f, + VAlign = 0.0f + }; + element1.SetPadding(0.0f); + parentContainer.Append(element1); + UIPanel uiPanel1 = new UIPanel(); + uiPanel1.Width = StyleDimension.FromPixelsAndPercent(220f, 0.0f); + uiPanel1.Height = StyleDimension.FromPixelsAndPercent(104f, 0.0f); + uiPanel1.HAlign = 0.5f; + uiPanel1.VAlign = 0.0f; + uiPanel1.Top = StyleDimension.FromPixelsAndPercent(10f, 0.0f); + UIElement element2 = (UIElement) uiPanel1; + element2.SetPadding(0.0f); + element2.PaddingTop = 3f; + element1.Append(element2); + element2.Append((UIElement) this.CreateHSLSlider(UICharacterCreation.HSLSliderId.Hue)); + element2.Append((UIElement) this.CreateHSLSlider(UICharacterCreation.HSLSliderId.Saturation)); + element2.Append((UIElement) this.CreateHSLSlider(UICharacterCreation.HSLSliderId.Luminance)); + UIPanel uiPanel2 = new UIPanel(); + uiPanel2.VAlign = 1f; + uiPanel2.HAlign = 1f; + uiPanel2.Width = StyleDimension.FromPixelsAndPercent(100f, 0.0f); + uiPanel2.Height = StyleDimension.FromPixelsAndPercent(32f, 0.0f); + UIPanel uiPanel3 = uiPanel2; + UIText uiText1 = new UIText("FFFFFF"); + uiText1.VAlign = 0.5f; + uiText1.HAlign = 0.5f; + UIText uiText2 = uiText1; + uiPanel3.Append((UIElement) uiText2); + element1.Append((UIElement) uiPanel3); + UIColoredImageButton coloredImageButton1 = new UIColoredImageButton(Main.Assets.Request("Images/UI/CharCreation/Copy", (AssetRequestMode) 1), true); + coloredImageButton1.VAlign = 1f; + coloredImageButton1.HAlign = 0.0f; + coloredImageButton1.Left = StyleDimension.FromPixelsAndPercent(0.0f, 0.0f); + UIColoredImageButton coloredImageButton2 = coloredImageButton1; + coloredImageButton2.OnMouseDown += new UIElement.MouseEvent(this.Click_CopyHex); + element1.Append((UIElement) coloredImageButton2); + this._copyHexButton = (UIElement) coloredImageButton2; + UIColoredImageButton coloredImageButton3 = new UIColoredImageButton(Main.Assets.Request("Images/UI/CharCreation/Paste", (AssetRequestMode) 1), true); + coloredImageButton3.VAlign = 1f; + coloredImageButton3.HAlign = 0.0f; + coloredImageButton3.Left = StyleDimension.FromPixelsAndPercent(40f, 0.0f); + UIColoredImageButton coloredImageButton4 = coloredImageButton3; + coloredImageButton4.OnMouseDown += new UIElement.MouseEvent(this.Click_PasteHex); + element1.Append((UIElement) coloredImageButton4); + this._pasteHexButton = (UIElement) coloredImageButton4; + UIColoredImageButton coloredImageButton5 = new UIColoredImageButton(Main.Assets.Request("Images/UI/CharCreation/Randomize", (AssetRequestMode) 1), true); + coloredImageButton5.VAlign = 1f; + coloredImageButton5.HAlign = 0.0f; + coloredImageButton5.Left = StyleDimension.FromPixelsAndPercent(80f, 0.0f); + UIColoredImageButton coloredImageButton6 = coloredImageButton5; + coloredImageButton6.OnMouseDown += new UIElement.MouseEvent(this.Click_RandomizeSingleColor); + element1.Append((UIElement) coloredImageButton6); + this._randomColorButton = (UIElement) coloredImageButton6; + this._hslContainer = element1; + this._hslHexText = uiText2; + coloredImageButton2.SetSnapPoint("Low", 0); + coloredImageButton4.SetSnapPoint("Low", 1); + coloredImageButton6.SetSnapPoint("Low", 2); + } + + private UIColoredSlider CreateHSLSlider(UICharacterCreation.HSLSliderId id) + { + UIColoredSlider sliderButtonBase = this.CreateHSLSliderButtonBase(id); + sliderButtonBase.VAlign = 0.0f; + sliderButtonBase.HAlign = 0.0f; + sliderButtonBase.Width = StyleDimension.FromPixelsAndPercent(-10f, 1f); + sliderButtonBase.Top.Set((float) (30 * (int) id), 0.0f); + sliderButtonBase.OnMouseDown += new UIElement.MouseEvent(this.Click_ColorPicker); + sliderButtonBase.SetSnapPoint("Middle", (int) id, offset: new Vector2?(new Vector2(0.0f, 20f))); + return sliderButtonBase; + } + + private UIColoredSlider CreateHSLSliderButtonBase( + UICharacterCreation.HSLSliderId id) + { + UIColoredSlider uiColoredSlider; + switch (id) + { + case UICharacterCreation.HSLSliderId.Saturation: + uiColoredSlider = new UIColoredSlider(LocalizedText.Empty, (Func) (() => this.GetHSLSliderPosition(UICharacterCreation.HSLSliderId.Saturation)), (Action) (x => this.UpdateHSLValue(UICharacterCreation.HSLSliderId.Saturation, x)), new Action(this.UpdateHSL_S), (Func) (x => this.GetHSLSliderColorAt(UICharacterCreation.HSLSliderId.Saturation, x)), Color.Transparent); + break; + case UICharacterCreation.HSLSliderId.Luminance: + uiColoredSlider = new UIColoredSlider(LocalizedText.Empty, (Func) (() => this.GetHSLSliderPosition(UICharacterCreation.HSLSliderId.Luminance)), (Action) (x => this.UpdateHSLValue(UICharacterCreation.HSLSliderId.Luminance, x)), new Action(this.UpdateHSL_L), (Func) (x => this.GetHSLSliderColorAt(UICharacterCreation.HSLSliderId.Luminance, x)), Color.Transparent); + break; + default: + uiColoredSlider = new UIColoredSlider(LocalizedText.Empty, (Func) (() => this.GetHSLSliderPosition(UICharacterCreation.HSLSliderId.Hue)), (Action) (x => this.UpdateHSLValue(UICharacterCreation.HSLSliderId.Hue, x)), new Action(this.UpdateHSL_H), (Func) (x => this.GetHSLSliderColorAt(UICharacterCreation.HSLSliderId.Hue, x)), Color.Transparent); + break; + } + return uiColoredSlider; + } + + private void UpdateHSL_H() => this.UpdateHSLValue(UICharacterCreation.HSLSliderId.Hue, UILinksInitializer.HandleSliderHorizontalInput(this._currentColorHSL.X, 0.0f, 1f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.35f)); + + private void UpdateHSL_S() => this.UpdateHSLValue(UICharacterCreation.HSLSliderId.Saturation, UILinksInitializer.HandleSliderHorizontalInput(this._currentColorHSL.Y, 0.0f, 1f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.35f)); + + private void UpdateHSL_L() => this.UpdateHSLValue(UICharacterCreation.HSLSliderId.Luminance, UILinksInitializer.HandleSliderHorizontalInput(this._currentColorHSL.Z, 0.0f, 1f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.35f)); + + private float GetHSLSliderPosition(UICharacterCreation.HSLSliderId id) + { + switch (id) + { + case UICharacterCreation.HSLSliderId.Hue: + return this._currentColorHSL.X; + case UICharacterCreation.HSLSliderId.Saturation: + return this._currentColorHSL.Y; + case UICharacterCreation.HSLSliderId.Luminance: + return this._currentColorHSL.Z; + default: + return 1f; + } + } + + private void UpdateHSLValue(UICharacterCreation.HSLSliderId id, float value) + { + switch (id) + { + case UICharacterCreation.HSLSliderId.Hue: + this._currentColorHSL.X = value; + break; + case UICharacterCreation.HSLSliderId.Saturation: + this._currentColorHSL.Y = value; + break; + case UICharacterCreation.HSLSliderId.Luminance: + this._currentColorHSL.Z = value; + break; + } + Color rgb = UICharacterCreation.ScaledHslToRgb(this._currentColorHSL.X, this._currentColorHSL.Y, this._currentColorHSL.Z); + this.ApplyPendingColor(rgb); + this._colorPickers[(int) this._selectedPicker]?.SetColor(rgb); + if (this._selectedPicker == UICharacterCreation.CategoryId.HairColor) + this._hairStylesCategoryButton.SetColor(rgb); + this.UpdateHexText(rgb); + } + + private Color GetHSLSliderColorAt(UICharacterCreation.HSLSliderId id, float pointAt) + { + switch (id) + { + case UICharacterCreation.HSLSliderId.Hue: + return UICharacterCreation.ScaledHslToRgb(pointAt, 1f, 0.5f); + case UICharacterCreation.HSLSliderId.Saturation: + return UICharacterCreation.ScaledHslToRgb(this._currentColorHSL.X, pointAt, this._currentColorHSL.Z); + case UICharacterCreation.HSLSliderId.Luminance: + return UICharacterCreation.ScaledHslToRgb(this._currentColorHSL.X, this._currentColorHSL.Y, pointAt); + default: + return Color.White; + } + } + + private void ApplyPendingColor(Color pendingColor) + { + switch (this._selectedPicker) + { + case UICharacterCreation.CategoryId.HairColor: + this._player.hairColor = pendingColor; + break; + case UICharacterCreation.CategoryId.Eye: + this._player.eyeColor = pendingColor; + break; + case UICharacterCreation.CategoryId.Skin: + this._player.skinColor = pendingColor; + break; + case UICharacterCreation.CategoryId.Shirt: + this._player.shirtColor = pendingColor; + break; + case UICharacterCreation.CategoryId.Undershirt: + this._player.underShirtColor = pendingColor; + break; + case UICharacterCreation.CategoryId.Pants: + this._player.pantsColor = pendingColor; + break; + case UICharacterCreation.CategoryId.Shoes: + this._player.shoeColor = pendingColor; + break; + } + } + + private void UpdateHexText(Color pendingColor) => this._hslHexText.SetText(UICharacterCreation.GetHexText(pendingColor)); + + private static string GetHexText(Color pendingColor) => "#" + pendingColor.Hex3().ToUpper(); + + private void MakeBackAndCreatebuttons(UIElement outerContainer) + { + UITextPanel uiTextPanel1 = new UITextPanel(Language.GetText("UI.Back"), 0.7f, true); + uiTextPanel1.Width = StyleDimension.FromPixelsAndPercent(-10f, 0.5f); + uiTextPanel1.Height = StyleDimension.FromPixels(50f); + uiTextPanel1.VAlign = 1f; + uiTextPanel1.HAlign = 0.0f; + uiTextPanel1.Top = StyleDimension.FromPixels(-45f); + UITextPanel uiTextPanel2 = uiTextPanel1; + uiTextPanel2.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver); + uiTextPanel2.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut); + uiTextPanel2.OnMouseDown += new UIElement.MouseEvent(this.Click_GoBack); + uiTextPanel2.SetSnapPoint("Back", 0); + outerContainer.Append((UIElement) uiTextPanel2); + UITextPanel uiTextPanel3 = new UITextPanel(Language.GetText("UI.Create"), 0.7f, true); + uiTextPanel3.Width = StyleDimension.FromPixelsAndPercent(-10f, 0.5f); + uiTextPanel3.Height = StyleDimension.FromPixels(50f); + uiTextPanel3.VAlign = 1f; + uiTextPanel3.HAlign = 1f; + uiTextPanel3.Top = StyleDimension.FromPixels(-45f); + UITextPanel uiTextPanel4 = uiTextPanel3; + uiTextPanel4.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver); + uiTextPanel4.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut); + uiTextPanel4.OnMouseDown += new UIElement.MouseEvent(this.Click_NamingAndCreating); + uiTextPanel4.SetSnapPoint("Create", 0); + outerContainer.Append((UIElement) uiTextPanel4); + } + + private void Click_GoBack(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(11); + Main.OpenCharacterSelectUI(); + } + + private void FadedMouseOver(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + ((UIPanel) evt.Target).BackgroundColor = new Color(73, 94, 171); + ((UIPanel) evt.Target).BorderColor = Colors.FancyUIFatButtonMouseOver; + } + + private void FadedMouseOut(UIMouseEvent evt, UIElement listeningElement) + { + ((UIPanel) evt.Target).BackgroundColor = new Color(63, 82, 151) * 0.8f; + ((UIPanel) evt.Target).BorderColor = Color.Black; + } + + private void Click_ColorPicker(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + for (int index = 0; index < this._colorPickers.Length; ++index) + { + if (this._colorPickers[index] == evt.Target) + { + this.SelectColorPicker((UICharacterCreation.CategoryId) index); + break; + } + } + } + + private void Click_ClothStyles(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + this.UnselectAllCategories(); + this._selectedPicker = UICharacterCreation.CategoryId.Clothing; + this._middleContainer.Append(this._clothStylesContainer); + this._clothingStylesCategoryButton.SetSelected(true); + this.UpdateSelectedGender(); + } + + private void Click_HairStyles(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + this.UnselectAllCategories(); + this._selectedPicker = UICharacterCreation.CategoryId.HairStyle; + this._middleContainer.Append(this._hairstylesContainer); + this._hairStylesCategoryButton.SetSelected(true); + } + + private void Click_CharInfo(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + this.UnselectAllCategories(); + this._selectedPicker = UICharacterCreation.CategoryId.CharInfo; + this._middleContainer.Append(this._infoContainer); + this._charInfoCategoryButton.SetSelected(true); + } + + private void Click_CharClothStyle(UIMouseEvent evt, UIElement listeningElement) + { + this._clothingStylesCategoryButton.SetImage(Main.Assets.Request("Images/UI/CharCreation/" + (this._player.Male ? "ClothStyleMale" : "ClothStyleFemale"), (AssetRequestMode) 1)); + this.UpdateSelectedGender(); + } + + private void Click_CharGenderMale(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + this._player.Male = true; + this.Click_CharClothStyle(evt, listeningElement); + this.UpdateSelectedGender(); + } + + private void Click_CharGenderFemale(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + this._player.Male = false; + this.Click_CharClothStyle(evt, listeningElement); + this.UpdateSelectedGender(); + } + + private void UpdateSelectedGender() + { + this._genderMale.SetSelected(this._player.Male); + this._genderFemale.SetSelected(!this._player.Male); + } + + private void Click_CopyHex(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + Platform.Get().Value = this._hslHexText.Text; + } + + private void Click_PasteHex(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + Vector3 hsl; + if (!this.GetHexColor(Platform.Get().Value, out hsl)) + return; + this.ApplyPendingColor(UICharacterCreation.ScaledHslToRgb(hsl.X, hsl.Y, hsl.Z)); + this._currentColorHSL = hsl; + this.UpdateHexText(UICharacterCreation.ScaledHslToRgb(hsl.X, hsl.Y, hsl.Z)); + this.UpdateColorPickers(); + } + + private void Click_CopyPlayerTemplate(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + string text = JsonConvert.SerializeObject((object) new Dictionary() + { + { + "version", + (object) 1 + }, + { + "hairStyle", + (object) this._player.hair + }, + { + "clothingStyle", + (object) this._player.skinVariant + }, + { + "hairColor", + (object) UICharacterCreation.GetHexText(this._player.hairColor) + }, + { + "eyeColor", + (object) UICharacterCreation.GetHexText(this._player.eyeColor) + }, + { + "skinColor", + (object) UICharacterCreation.GetHexText(this._player.skinColor) + }, + { + "shirtColor", + (object) UICharacterCreation.GetHexText(this._player.shirtColor) + }, + { + "underShirtColor", + (object) UICharacterCreation.GetHexText(this._player.underShirtColor) + }, + { + "pantsColor", + (object) UICharacterCreation.GetHexText(this._player.pantsColor) + }, + { + "shoeColor", + (object) UICharacterCreation.GetHexText(this._player.shoeColor) + } + }, new JsonSerializerSettings() + { + TypeNameHandling = (TypeNameHandling) 4, + MetadataPropertyHandling = (MetadataPropertyHandling) 1, + Formatting = (Formatting) 1 + }); + PlayerInput.PrettyPrintProfiles(ref text); + Platform.Get().Value = text; + } + + private void Click_PastePlayerTemplate(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + try + { + string str1 = Platform.Get().Value; + int startIndex = str1.IndexOf("{"); + if (startIndex == -1) + return; + string str2 = str1.Substring(startIndex); + int num1 = str2.LastIndexOf("}"); + if (num1 == -1) + return; + Dictionary dictionary1 = JsonConvert.DeserializeObject>(str2.Substring(0, num1 + 1)); + if (dictionary1 == null) + return; + Dictionary dictionary2 = new Dictionary(); + foreach (KeyValuePair keyValuePair in dictionary1) + dictionary2[keyValuePair.Key.ToLower()] = keyValuePair.Value; + object obj; + if (dictionary2.TryGetValue("version", out obj)) + { + long num2 = (long) obj; + } + if (dictionary2.TryGetValue("hairstyle", out obj)) + { + int num3 = (int) (long) obj; + if (Main.Hairstyles.AvailableHairstyles.Contains(num3)) + this._player.hair = num3; + } + if (dictionary2.TryGetValue("clothingstyle", out obj)) + { + int num4 = (int) (long) obj; + if (((IEnumerable) this._validClothStyles).Contains(num4)) + this._player.skinVariant = num4; + } + Vector3 hsl; + if (dictionary2.TryGetValue("haircolor", out obj) && this.GetHexColor((string) obj, out hsl)) + this._player.hairColor = UICharacterCreation.ScaledHslToRgb(hsl); + if (dictionary2.TryGetValue("eyecolor", out obj) && this.GetHexColor((string) obj, out hsl)) + this._player.eyeColor = UICharacterCreation.ScaledHslToRgb(hsl); + if (dictionary2.TryGetValue("skincolor", out obj) && this.GetHexColor((string) obj, out hsl)) + this._player.skinColor = UICharacterCreation.ScaledHslToRgb(hsl); + if (dictionary2.TryGetValue("shirtcolor", out obj) && this.GetHexColor((string) obj, out hsl)) + this._player.shirtColor = UICharacterCreation.ScaledHslToRgb(hsl); + if (dictionary2.TryGetValue("undershirtcolor", out obj) && this.GetHexColor((string) obj, out hsl)) + this._player.underShirtColor = UICharacterCreation.ScaledHslToRgb(hsl); + if (dictionary2.TryGetValue("pantscolor", out obj) && this.GetHexColor((string) obj, out hsl)) + this._player.pantsColor = UICharacterCreation.ScaledHslToRgb(hsl); + if (dictionary2.TryGetValue("shoecolor", out obj) && this.GetHexColor((string) obj, out hsl)) + this._player.shoeColor = UICharacterCreation.ScaledHslToRgb(hsl); + this.Click_CharClothStyle((UIMouseEvent) null, (UIElement) null); + this.UpdateColorPickers(); + } + catch + { + } + } + + private void Click_RandomizePlayer(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + Player player = this._player; + int index = Main.rand.Next(Main.Hairstyles.AvailableHairstyles.Count); + player.hair = Main.Hairstyles.AvailableHairstyles[index]; + while ((int) player.eyeColor.R + (int) player.eyeColor.G + (int) player.eyeColor.B > 300) + player.eyeColor = UICharacterCreation.ScaledHslToRgb(UICharacterCreation.GetRandomColorVector()); + float num = (float) Main.rand.Next(60, 120) * 0.01f; + if ((double) num > 1.0) + num = 1f; + player.skinColor.R = (byte) ((double) Main.rand.Next(240, (int) byte.MaxValue) * (double) num); + player.skinColor.G = (byte) ((double) Main.rand.Next(110, 140) * (double) num); + player.skinColor.B = (byte) ((double) Main.rand.Next(75, 110) * (double) num); + player.hairColor = UICharacterCreation.ScaledHslToRgb(UICharacterCreation.GetRandomColorVector()); + player.shirtColor = UICharacterCreation.ScaledHslToRgb(UICharacterCreation.GetRandomColorVector()); + player.underShirtColor = UICharacterCreation.ScaledHslToRgb(UICharacterCreation.GetRandomColorVector()); + player.pantsColor = UICharacterCreation.ScaledHslToRgb(UICharacterCreation.GetRandomColorVector()); + player.shoeColor = UICharacterCreation.ScaledHslToRgb(UICharacterCreation.GetRandomColorVector()); + player.skinVariant = this._validClothStyles[Main.rand.Next(this._validClothStyles.Length)]; + switch (player.hair + 1) + { + case 5: + case 6: + case 7: + case 10: + case 12: + case 19: + case 22: + case 23: + case 26: + case 27: + case 30: + case 33: + player.Male = false; + break; + default: + player.Male = true; + break; + } + this.Click_CharClothStyle((UIMouseEvent) null, (UIElement) null); + this.UpdateSelectedGender(); + this.UpdateColorPickers(); + } + + private void Click_Naming(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(10); + this._player.name = ""; + Main.clrInput(); + UIVirtualKeyboard uiVirtualKeyboard = new UIVirtualKeyboard(Lang.menu[45].Value, "", new UIVirtualKeyboard.KeyboardSubmitEvent(this.OnFinishedNaming), new Action(this.OnCancledNaming), allowEmpty: true); + uiVirtualKeyboard.SetMaxInputLength(20); + Main.MenuUI.SetState((UIState) uiVirtualKeyboard); + } + + private void Click_NamingAndCreating(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(10); + if (string.IsNullOrEmpty(this._player.name)) + { + this._player.name = ""; + Main.clrInput(); + UIVirtualKeyboard uiVirtualKeyboard = new UIVirtualKeyboard(Lang.menu[45].Value, "", new UIVirtualKeyboard.KeyboardSubmitEvent(this.OnFinishedNamingAndCreating), new Action(this.OnCancledNaming)); + uiVirtualKeyboard.SetMaxInputLength(20); + Main.MenuUI.SetState((UIState) uiVirtualKeyboard); + } + else + this.FinishCreatingCharacter(); + } + + private void OnFinishedNaming(string name) + { + this._player.name = name.Trim(); + Main.MenuUI.SetState((UIState) this); + this._charName.SetContents(this._player.name); + } + + private void OnCancledNaming() => Main.MenuUI.SetState((UIState) this); + + private void OnFinishedNamingAndCreating(string name) + { + this._player.name = name.Trim(); + Main.MenuUI.SetState((UIState) this); + this._charName.SetContents(this._player.name); + this.FinishCreatingCharacter(); + } + + private void FinishCreatingCharacter() + { + this.SetupPlayerStatsAndInventoryBasedOnDifficulty(); + PlayerFileData.CreateAndSave(this._player); + Main.LoadPlayers(); + Main.menuMode = 1; + } + + private void SetupPlayerStatsAndInventoryBasedOnDifficulty() + { + int index1 = 0; + int num1; + if (this._player.difficulty == (byte) 3) + { + this._player.statLife = this._player.statLifeMax = 100; + this._player.statMana = this._player.statManaMax = 20; + this._player.inventory[index1].SetDefaults(6); + Item[] inventory1 = this._player.inventory; + int index2 = index1; + int index3 = index2 + 1; + inventory1[index2].Prefix(-1); + this._player.inventory[index3].SetDefaults(1); + Item[] inventory2 = this._player.inventory; + int index4 = index3; + int index5 = index4 + 1; + inventory2[index4].Prefix(-1); + this._player.inventory[index5].SetDefaults(10); + Item[] inventory3 = this._player.inventory; + int index6 = index5; + int index7 = index6 + 1; + inventory3[index6].Prefix(-1); + this._player.inventory[index7].SetDefaults(7); + Item[] inventory4 = this._player.inventory; + int index8 = index7; + int index9 = index8 + 1; + inventory4[index8].Prefix(-1); + this._player.inventory[index9].SetDefaults(4281); + Item[] inventory5 = this._player.inventory; + int index10 = index9; + int index11 = index10 + 1; + inventory5[index10].Prefix(-1); + this._player.inventory[index11].SetDefaults(8); + Item[] inventory6 = this._player.inventory; + int index12 = index11; + int index13 = index12 + 1; + inventory6[index12].stack = 100; + this._player.inventory[index13].SetDefaults(965); + Item[] inventory7 = this._player.inventory; + int index14 = index13; + int num2 = index14 + 1; + inventory7[index14].stack = 100; + Item[] inventory8 = this._player.inventory; + int index15 = num2; + num1 = index15 + 1; + inventory8[index15].SetDefaults(50); + this._player.armor[3].SetDefaults(4978); + this._player.armor[3].Prefix(-1); + this._player.AddBuff(216, 3600); + } + else + { + this._player.inventory[index1].SetDefaults(3507); + Item[] inventory9 = this._player.inventory; + int index16 = index1; + int index17 = index16 + 1; + inventory9[index16].Prefix(-1); + this._player.inventory[index17].SetDefaults(3509); + Item[] inventory10 = this._player.inventory; + int index18 = index17; + int index19 = index18 + 1; + inventory10[index18].Prefix(-1); + this._player.inventory[index19].SetDefaults(3506); + Item[] inventory11 = this._player.inventory; + int index20 = index19; + num1 = index20 + 1; + inventory11[index20].Prefix(-1); + } + if (Main.runningCollectorsEdition) + { + Item[] inventory = this._player.inventory; + int index21 = num1; + int num3 = index21 + 1; + inventory[index21].SetDefaults(603); + } + this._player.savedPerPlayerFieldsThatArentInThePlayerClass = new Player.SavedPlayerDataWithAnnoyingRules(); + CreativePowerManager.Instance.ResetDataForNewPlayer(this._player); + } + + private bool GetHexColor(string hexString, out Vector3 hsl) + { + if (hexString.StartsWith("#")) + hexString = hexString.Substring(1); + uint result; + if (hexString.Length <= 6 && uint.TryParse(hexString, NumberStyles.HexNumber, (IFormatProvider) CultureInfo.CurrentCulture, out result)) + { + uint num1 = result & (uint) byte.MaxValue; + uint num2 = result >> 8 & (uint) byte.MaxValue; + uint num3 = result >> 16 & (uint) byte.MaxValue; + hsl = UICharacterCreation.RgbToScaledHsl(new Color((int) num3, (int) num2, (int) num1)); + return true; + } + hsl = Vector3.Zero; + return false; + } + + private void Click_RandomizeSingleColor(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + Vector3 randomColorVector = UICharacterCreation.GetRandomColorVector(); + this.ApplyPendingColor(UICharacterCreation.ScaledHslToRgb(randomColorVector.X, randomColorVector.Y, randomColorVector.Z)); + this._currentColorHSL = randomColorVector; + this.UpdateHexText(UICharacterCreation.ScaledHslToRgb(randomColorVector.X, randomColorVector.Y, randomColorVector.Z)); + this.UpdateColorPickers(); + } + + private static Vector3 GetRandomColorVector() => new Vector3(Main.rand.NextFloat(), Main.rand.NextFloat(), Main.rand.NextFloat()); + + private void UnselectAllCategories() + { + foreach (UIColoredImageButton colorPicker in this._colorPickers) + colorPicker?.SetSelected(false); + this._clothingStylesCategoryButton.SetSelected(false); + this._hairStylesCategoryButton.SetSelected(false); + this._charInfoCategoryButton.SetSelected(false); + this._hslContainer.Remove(); + this._hairstylesContainer.Remove(); + this._clothStylesContainer.Remove(); + this._infoContainer.Remove(); + } + + private void SelectColorPicker(UICharacterCreation.CategoryId selection) + { + this._selectedPicker = selection; + switch (selection) + { + case UICharacterCreation.CategoryId.CharInfo: + this.Click_CharInfo((UIMouseEvent) null, (UIElement) null); + break; + case UICharacterCreation.CategoryId.Clothing: + this.Click_ClothStyles((UIMouseEvent) null, (UIElement) null); + break; + case UICharacterCreation.CategoryId.HairStyle: + this.Click_HairStyles((UIMouseEvent) null, (UIElement) null); + break; + default: + this.UnselectAllCategories(); + this._middleContainer.Append(this._hslContainer); + for (int index = 0; index < this._colorPickers.Length; ++index) + { + if (this._colorPickers[index] != null) + this._colorPickers[index].SetSelected((UICharacterCreation.CategoryId) index == selection); + } + Vector3 vector3 = Vector3.One; + switch (this._selectedPicker) + { + case UICharacterCreation.CategoryId.HairColor: + vector3 = UICharacterCreation.RgbToScaledHsl(this._player.hairColor); + break; + case UICharacterCreation.CategoryId.Eye: + vector3 = UICharacterCreation.RgbToScaledHsl(this._player.eyeColor); + break; + case UICharacterCreation.CategoryId.Skin: + vector3 = UICharacterCreation.RgbToScaledHsl(this._player.skinColor); + break; + case UICharacterCreation.CategoryId.Shirt: + vector3 = UICharacterCreation.RgbToScaledHsl(this._player.shirtColor); + break; + case UICharacterCreation.CategoryId.Undershirt: + vector3 = UICharacterCreation.RgbToScaledHsl(this._player.underShirtColor); + break; + case UICharacterCreation.CategoryId.Pants: + vector3 = UICharacterCreation.RgbToScaledHsl(this._player.pantsColor); + break; + case UICharacterCreation.CategoryId.Shoes: + vector3 = UICharacterCreation.RgbToScaledHsl(this._player.shoeColor); + break; + } + this._currentColorHSL = vector3; + this.UpdateHexText(UICharacterCreation.ScaledHslToRgb(vector3.X, vector3.Y, vector3.Z)); + break; + } + } + + private void UpdateColorPickers() + { + int selectedPicker = (int) this._selectedPicker; + this._colorPickers[3].SetColor(this._player.hairColor); + this._hairStylesCategoryButton.SetColor(this._player.hairColor); + this._colorPickers[4].SetColor(this._player.eyeColor); + this._colorPickers[5].SetColor(this._player.skinColor); + this._colorPickers[6].SetColor(this._player.shirtColor); + this._colorPickers[7].SetColor(this._player.underShirtColor); + this._colorPickers[8].SetColor(this._player.pantsColor); + this._colorPickers[9].SetColor(this._player.shoeColor); + } + + public override void Draw(SpriteBatch spriteBatch) + { + base.Draw(spriteBatch); + string text = (string) null; + if (this._copyHexButton.IsMouseHovering) + text = Language.GetTextValue("UI.CopyColorToClipboard"); + if (this._pasteHexButton.IsMouseHovering) + text = Language.GetTextValue("UI.PasteColorFromClipboard"); + if (this._randomColorButton.IsMouseHovering) + text = Language.GetTextValue("UI.RandomizeColor"); + if (this._copyTemplateButton.IsMouseHovering) + text = Language.GetTextValue("UI.CopyPlayerToClipboard"); + if (this._pasteTemplateButton.IsMouseHovering) + text = Language.GetTextValue("UI.PastePlayerFromClipboard"); + if (this._randomizePlayerButton.IsMouseHovering) + text = Language.GetTextValue("UI.RandomizePlayer"); + if (text != null) + { + float x = FontAssets.MouseText.Value.MeasureString(text).X; + Vector2 vector2 = new Vector2((float) Main.mouseX, (float) Main.mouseY) + new Vector2(16f); + if ((double) vector2.Y > (double) (Main.screenHeight - 30)) + vector2.Y = (float) (Main.screenHeight - 30); + if ((double) vector2.X > (double) Main.screenWidth - (double) x) + vector2.X = (float) (Main.screenWidth - 460); + Utils.DrawBorderStringFourWay(spriteBatch, FontAssets.MouseText.Value, text, vector2.X, vector2.Y, new Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor), Color.Black, Vector2.Zero); + } + this.SetupGamepadPoints(spriteBatch); + } + + private void SetupGamepadPoints(SpriteBatch spriteBatch) + { + UILinkPointNavigator.Shortcuts.BackButtonCommand = 1; + int num1 = 3000; + int num2 = num1 + 20; + int num3 = num1; + List snapPoints = this.GetSnapPoints(); + SnapPoint snapPoint1 = snapPoints.First((Func) (a => a.Name == "Back")); + SnapPoint snapPoint2 = snapPoints.First((Func) (a => a.Name == "Create")); + UILinkPoint point1 = UILinkPointNavigator.Points[num3]; + point1.Unlink(); + UILinkPointNavigator.SetPosition(num3, snapPoint1.Position); + int num4 = num3 + 1; + UILinkPoint point2 = UILinkPointNavigator.Points[num4]; + point2.Unlink(); + UILinkPointNavigator.SetPosition(num4, snapPoint2.Position); + int num5 = num4 + 1; + point1.Right = point2.ID; + point2.Left = point1.ID; + this._foundPoints.Clear(); + this._foundPoints.Add(point1.ID); + this._foundPoints.Add(point2.ID); + List list1 = snapPoints.Where((Func) (a => a.Name == "Top")).ToList(); + list1.Sort(new Comparison(this.SortPoints)); + for (int index = 0; index < list1.Count; ++index) + { + UILinkPoint point3 = UILinkPointNavigator.Points[num5]; + point3.Unlink(); + UILinkPointNavigator.SetPosition(num5, list1[index].Position); + point3.Left = num5 - 1; + point3.Right = num5 + 1; + point3.Down = num2; + if (index == 0) + point3.Left = -3; + if (index == list1.Count - 1) + point3.Right = -4; + if (this._selectedPicker == UICharacterCreation.CategoryId.HairStyle || this._selectedPicker == UICharacterCreation.CategoryId.Clothing) + point3.Down = num2 + index; + this._foundPoints.Add(num5); + ++num5; + } + List list2 = snapPoints.Where((Func) (a => a.Name == "Middle")).ToList(); + list2.Sort(new Comparison(this.SortPoints)); + int ptid1 = num2; + switch (this._selectedPicker) + { + case UICharacterCreation.CategoryId.CharInfo: + for (int index = 0; index < list2.Count; ++index) + { + UILinkPoint andSet = this.GetAndSet(ptid1, list2[index]); + andSet.Up = andSet.ID - 1; + andSet.Down = andSet.ID + 1; + if (index == 0) + andSet.Up = num1 + 2; + if (index == list2.Count - 1) + { + andSet.Down = point1.ID; + point1.Up = andSet.ID; + point2.Up = andSet.ID; + } + this._foundPoints.Add(ptid1); + ++ptid1; + } + break; + case UICharacterCreation.CategoryId.Clothing: + List list3 = snapPoints.Where((Func) (a => a.Name == "Low")).ToList(); + list3.Sort(new Comparison(this.SortPoints)); + int num6 = -2; + int num7 = -2; + int ptid2 = num2 + 20; + for (int index = 0; index < list3.Count; ++index) + { + UILinkPoint andSet = this.GetAndSet(ptid2, list3[index]); + andSet.Up = num2 + index + 2; + andSet.Down = point1.ID; + if (index >= 3) + { + ++andSet.Up; + andSet.Down = point2.ID; + } + andSet.Left = andSet.ID - 1; + andSet.Right = andSet.ID + 1; + if (index == 0) + { + num6 = andSet.ID; + andSet.Left = andSet.ID + 4; + point1.Up = andSet.ID; + } + if (index == list3.Count - 1) + { + num7 = andSet.ID; + andSet.Right = andSet.ID - 4; + point2.Up = andSet.ID; + } + this._foundPoints.Add(ptid2); + ++ptid2; + } + int ptid3 = num2; + for (int index = 0; index < list2.Count; ++index) + { + UILinkPoint andSet = this.GetAndSet(ptid3, list2[index]); + andSet.Up = num1 + 2 + index; + andSet.Left = andSet.ID - 1; + andSet.Right = andSet.ID + 1; + if (index == 0) + andSet.Left = andSet.ID + 9; + if (index == list2.Count - 1) + andSet.Right = andSet.ID - 9; + andSet.Down = num6; + if (index >= 5) + andSet.Down = num7; + this._foundPoints.Add(ptid3); + ++ptid3; + } + break; + case UICharacterCreation.CategoryId.HairStyle: + if (list2.Count != 0) + { + this._helper.CullPointsOutOfElementArea(spriteBatch, list2, this._hairstylesContainer); + SnapPoint snapPoint3 = list2[list2.Count - 1]; + int num8 = snapPoint3.Id / 10; + int num9 = snapPoint3.Id % 10; + int count = Main.Hairstyles.AvailableHairstyles.Count; + for (int index = 0; index < list2.Count; ++index) + { + SnapPoint snap = list2[index]; + UILinkPoint andSet = this.GetAndSet(ptid1, snap); + andSet.Left = andSet.ID - 1; + if (snap.Id == 0) + andSet.Left = -3; + andSet.Right = andSet.ID + 1; + if (snap.Id == count - 1) + andSet.Right = -4; + andSet.Up = andSet.ID - 10; + if (index < 10) + andSet.Up = num1 + 2 + index; + andSet.Down = andSet.ID + 10; + if (snap.Id + 10 > snapPoint3.Id) + andSet.Down = snap.Id % 10 >= 5 ? point2.ID : point1.ID; + if (index == list2.Count - 1) + { + point1.Up = andSet.ID; + point2.Up = andSet.ID; + } + this._foundPoints.Add(ptid1); + ++ptid1; + } + break; + } + break; + default: + List list4 = snapPoints.Where((Func) (a => a.Name == "Low")).ToList(); + list4.Sort(new Comparison(this.SortPoints)); + int ptid4 = num2 + 20; + for (int index = 0; index < list4.Count; ++index) + { + UILinkPoint andSet = this.GetAndSet(ptid4, list4[index]); + andSet.Up = num2 + 2; + andSet.Down = point1.ID; + andSet.Left = andSet.ID - 1; + andSet.Right = andSet.ID + 1; + if (index == 0) + { + andSet.Left = andSet.ID + 2; + point1.Up = andSet.ID; + } + if (index == list4.Count - 1) + { + andSet.Right = andSet.ID - 2; + point2.Up = andSet.ID; + } + this._foundPoints.Add(ptid4); + ++ptid4; + } + int ptid5 = num2; + for (int index = 0; index < list2.Count; ++index) + { + UILinkPoint andSet = this.GetAndSet(ptid5, list2[index]); + andSet.Up = andSet.ID - 1; + andSet.Down = andSet.ID + 1; + if (index == 0) + andSet.Up = num1 + 2 + 5; + if (index == list2.Count - 1) + andSet.Down = num2 + 20 + 2; + this._foundPoints.Add(ptid5); + ++ptid5; + } + break; + } + if (!PlayerInput.UsingGamepadUI || this._foundPoints.Contains(UILinkPointNavigator.CurrentPoint)) + return; + this.MoveToVisuallyClosestPoint(); + } + + private void MoveToVisuallyClosestPoint() + { + Dictionary points = UILinkPointNavigator.Points; + Vector2 mouseScreen = Main.MouseScreen; + UILinkPoint uiLinkPoint1 = (UILinkPoint) null; + foreach (int foundPoint in this._foundPoints) + { + UILinkPoint uiLinkPoint2; + if (!points.TryGetValue(foundPoint, out uiLinkPoint2)) + return; + if (uiLinkPoint1 == null || (double) Vector2.Distance(mouseScreen, uiLinkPoint1.Position) > (double) Vector2.Distance(mouseScreen, uiLinkPoint2.Position)) + uiLinkPoint1 = uiLinkPoint2; + } + if (uiLinkPoint1 == null) + return; + UILinkPointNavigator.ChangePoint(uiLinkPoint1.ID); + } + + public void TryMovingCategory(int direction) + { + int num = (int) (this._selectedPicker + direction) % 10; + if (num < 0) + num += 10; + this.SelectColorPicker((UICharacterCreation.CategoryId) num); + } + + private UILinkPoint GetAndSet(int ptid, SnapPoint snap) + { + UILinkPoint point = UILinkPointNavigator.Points[ptid]; + point.Unlink(); + UILinkPointNavigator.SetPosition(point.ID, snap.Position); + return point; + } + + private bool PointWithName(SnapPoint a, string comp) => a.Name == comp; + + private int SortPoints(SnapPoint a, SnapPoint b) => a.Id.CompareTo(b.Id); + + private static Color ScaledHslToRgb(Vector3 hsl) => UICharacterCreation.ScaledHslToRgb(hsl.X, hsl.Y, hsl.Z); + + private static Color ScaledHslToRgb(float hue, float saturation, float luminosity) => Main.hslToRgb(hue, saturation, (float) ((double) luminosity * 0.850000023841858 + 0.150000005960464)); + + private static Vector3 RgbToScaledHsl(Color color) + { + Vector3 hsl = Main.rgbToHsl(color); + hsl.Z = (float) (((double) hsl.Z - 0.150000005960464) / 0.850000023841858); + return Vector3.Clamp(hsl, Vector3.Zero, Vector3.One); + } + + private enum CategoryId + { + CharInfo, + Clothing, + HairStyle, + HairColor, + Eye, + Skin, + Shirt, + Undershirt, + Pants, + Shoes, + Count, + } + + private enum HSLSliderId + { + Hue, + Saturation, + Luminance, + } + } +} diff --git a/GameContent/UI/States/UICharacterSelect.cs b/GameContent/UI/States/UICharacterSelect.cs new file mode 100644 index 0000000..d177b50 --- /dev/null +++ b/GameContent/UI/States/UICharacterSelect.cs @@ -0,0 +1,290 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UICharacterSelect +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.Audio; +using Terraria.GameContent.UI.Elements; +using Terraria.GameInput; +using Terraria.ID; +using Terraria.IO; +using Terraria.Localization; +using Terraria.UI; +using Terraria.UI.Gamepad; + +namespace Terraria.GameContent.UI.States +{ + public class UICharacterSelect : UIState + { + private UIList _playerList; + private UITextPanel _backPanel; + private UITextPanel _newPanel; + private UIPanel _containerPanel; + private UIScrollbar _scrollbar; + private bool _isScrollbarAttached; + private List> favoritesCache = new List>(); + private bool skipDraw; + + public override void OnInitialize() + { + UIElement element = new UIElement(); + element.Width.Set(0.0f, 0.8f); + element.MaxWidth.Set(650f, 0.0f); + element.Top.Set(220f, 0.0f); + element.Height.Set(-220f, 1f); + element.HAlign = 0.5f; + UIPanel uiPanel = new UIPanel(); + uiPanel.Width.Set(0.0f, 1f); + uiPanel.Height.Set(-110f, 1f); + uiPanel.BackgroundColor = new Color(33, 43, 79) * 0.8f; + this._containerPanel = uiPanel; + element.Append((UIElement) uiPanel); + this._playerList = new UIList(); + this._playerList.Width.Set(0.0f, 1f); + this._playerList.Height.Set(0.0f, 1f); + this._playerList.ListPadding = 5f; + uiPanel.Append((UIElement) this._playerList); + this._scrollbar = new UIScrollbar(); + this._scrollbar.SetView(100f, 1000f); + this._scrollbar.Height.Set(0.0f, 1f); + this._scrollbar.HAlign = 1f; + this._playerList.SetScrollbar(this._scrollbar); + UITextPanel uiTextPanel1 = new UITextPanel(Language.GetText("UI.SelectPlayer"), 0.8f, true); + uiTextPanel1.HAlign = 0.5f; + uiTextPanel1.Top.Set(-40f, 0.0f); + uiTextPanel1.SetPadding(15f); + uiTextPanel1.BackgroundColor = new Color(73, 94, 171); + element.Append((UIElement) uiTextPanel1); + UITextPanel uiTextPanel2 = new UITextPanel(Language.GetText("UI.Back"), 0.7f, true); + uiTextPanel2.Width.Set(-10f, 0.5f); + uiTextPanel2.Height.Set(50f, 0.0f); + uiTextPanel2.VAlign = 1f; + uiTextPanel2.Top.Set(-45f, 0.0f); + uiTextPanel2.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver); + uiTextPanel2.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut); + uiTextPanel2.OnClick += new UIElement.MouseEvent(this.GoBackClick); + uiTextPanel2.SetSnapPoint("Back", 0); + element.Append((UIElement) uiTextPanel2); + this._backPanel = uiTextPanel2; + UITextPanel uiTextPanel3 = new UITextPanel(Language.GetText("UI.New"), 0.7f, true); + uiTextPanel3.CopyStyle((UIElement) uiTextPanel2); + uiTextPanel3.HAlign = 1f; + uiTextPanel3.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver); + uiTextPanel3.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut); + uiTextPanel3.OnClick += new UIElement.MouseEvent(this.NewCharacterClick); + element.Append((UIElement) uiTextPanel3); + uiTextPanel2.SetSnapPoint("New", 0); + this._newPanel = uiTextPanel3; + this.Append(element); + } + + public override void Recalculate() + { + if (this._scrollbar != null) + { + if (this._isScrollbarAttached && !this._scrollbar.CanScroll) + { + this._containerPanel.RemoveChild((UIElement) this._scrollbar); + this._isScrollbarAttached = false; + this._playerList.Width.Set(0.0f, 1f); + } + else if (!this._isScrollbarAttached && this._scrollbar.CanScroll) + { + this._containerPanel.Append((UIElement) this._scrollbar); + this._isScrollbarAttached = true; + this._playerList.Width.Set(-25f, 1f); + } + } + base.Recalculate(); + } + + private void NewCharacterClick(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(10); + Main.PendingPlayer = new Player(); + Main.MenuUI.SetState((UIState) new UICharacterCreation(Main.PendingPlayer)); + Main.menuMode = 888; + } + + private void GoBackClick(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(11); + Main.menuMode = 0; + } + + private void FadedMouseOver(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + ((UIPanel) evt.Target).BackgroundColor = new Color(73, 94, 171); + ((UIPanel) evt.Target).BorderColor = Colors.FancyUIFatButtonMouseOver; + } + + private void FadedMouseOut(UIMouseEvent evt, UIElement listeningElement) + { + ((UIPanel) evt.Target).BackgroundColor = new Color(63, 82, 151) * 0.7f; + ((UIPanel) evt.Target).BorderColor = Color.Black; + } + + public override void OnActivate() + { + Main.LoadPlayers(); + Main.ActivePlayerFileData = new PlayerFileData(); + this.UpdatePlayersList(); + if (!PlayerInput.UsingGamepadUI) + return; + UILinkPointNavigator.ChangePoint(3000 + (this._playerList.Count == 0 ? 1 : 2)); + } + + private void UpdatePlayersList() + { + this._playerList.Clear(); + List playerFileDataList = new List((IEnumerable) Main.PlayerList); + playerFileDataList.Sort((Comparison) ((x, y) => + { + if (x.IsFavorite && !y.IsFavorite) + return -1; + if (!x.IsFavorite && y.IsFavorite) + return 1; + return x.Name.CompareTo(y.Name) != 0 ? x.Name.CompareTo(y.Name) : x.GetFileName().CompareTo(y.GetFileName()); + })); + int num = 0; + foreach (PlayerFileData data in playerFileDataList) + this._playerList.Add((UIElement) new UICharacterListItem(data, num++)); + } + + public override void Draw(SpriteBatch spriteBatch) + { + if (this.skipDraw) + { + this.skipDraw = false; + } + else + { + if (this.UpdateFavoritesCache()) + { + this.skipDraw = true; + Main.MenuUI.Draw(spriteBatch, new GameTime()); + } + base.Draw(spriteBatch); + this.SetupGamepadPoints(spriteBatch); + } + } + + private bool UpdateFavoritesCache() + { + List playerFileDataList = new List((IEnumerable) Main.PlayerList); + playerFileDataList.Sort((Comparison) ((x, y) => + { + if (x.IsFavorite && !y.IsFavorite) + return -1; + if (!x.IsFavorite && y.IsFavorite) + return 1; + return x.Name.CompareTo(y.Name) != 0 ? x.Name.CompareTo(y.Name) : x.GetFileName().CompareTo(y.GetFileName()); + })); + bool flag = false; + if (!flag && playerFileDataList.Count != this.favoritesCache.Count) + flag = true; + if (!flag) + { + for (int index = 0; index < this.favoritesCache.Count; ++index) + { + Tuple tuple = this.favoritesCache[index]; + if (!(playerFileDataList[index].Name == tuple.Item1) || playerFileDataList[index].IsFavorite != tuple.Item2) + { + flag = true; + break; + } + } + } + if (flag) + { + this.favoritesCache.Clear(); + foreach (PlayerFileData playerFileData in playerFileDataList) + this.favoritesCache.Add(Tuple.Create(playerFileData.Name, playerFileData.IsFavorite)); + this.UpdatePlayersList(); + } + return flag; + } + + private void SetupGamepadPoints(SpriteBatch spriteBatch) + { + UILinkPointNavigator.Shortcuts.BackButtonCommand = 1; + int num1 = 3000; + UILinkPointNavigator.SetPosition(num1, this._backPanel.GetInnerDimensions().ToRectangle().Center.ToVector2()); + UILinkPointNavigator.SetPosition(num1 + 1, this._newPanel.GetInnerDimensions().ToRectangle().Center.ToVector2()); + int key1 = num1; + UILinkPoint point1 = UILinkPointNavigator.Points[key1]; + point1.Unlink(); + point1.Right = key1 + 1; + int key2 = num1 + 1; + UILinkPoint point2 = UILinkPointNavigator.Points[key2]; + point2.Unlink(); + point2.Left = key2 - 1; + float num2 = 1f / Main.UIScale; + Rectangle clippingRectangle = this._containerPanel.GetClippingRectangle(spriteBatch); + Vector2 minimum = clippingRectangle.TopLeft() * num2; + Vector2 maximum = clippingRectangle.BottomRight() * num2; + List snapPoints = this.GetSnapPoints(); + for (int index = 0; index < snapPoints.Count; ++index) + { + if (!snapPoints[index].Position.Between(minimum, maximum)) + { + snapPoints.Remove(snapPoints[index]); + --index; + } + } + SnapPoint[,] snapPointArray = new SnapPoint[this._playerList.Count, 4]; + foreach (SnapPoint snapPoint in snapPoints.Where((Func) (a => a.Name == "Play"))) + snapPointArray[snapPoint.Id, 0] = snapPoint; + foreach (SnapPoint snapPoint in snapPoints.Where((Func) (a => a.Name == "Favorite"))) + snapPointArray[snapPoint.Id, 1] = snapPoint; + foreach (SnapPoint snapPoint in snapPoints.Where((Func) (a => a.Name == "Cloud"))) + snapPointArray[snapPoint.Id, 2] = snapPoint; + foreach (SnapPoint snapPoint in snapPoints.Where((Func) (a => a.Name == "Delete"))) + snapPointArray[snapPoint.Id, 3] = snapPoint; + int num3 = num1 + 2; + int[] numArray = new int[this._playerList.Count]; + for (int index = 0; index < numArray.Length; ++index) + numArray[index] = -1; + for (int index1 = 0; index1 < 4; ++index1) + { + int key3 = -1; + for (int index2 = 0; index2 < snapPointArray.GetLength(0); ++index2) + { + if (snapPointArray[index2, index1] != null) + { + UILinkPoint point3 = UILinkPointNavigator.Points[num3]; + point3.Unlink(); + UILinkPointNavigator.SetPosition(num3, snapPointArray[index2, index1].Position); + if (key3 != -1) + { + point3.Up = key3; + UILinkPointNavigator.Points[key3].Down = num3; + } + if (numArray[index2] != -1) + { + point3.Left = numArray[index2]; + UILinkPointNavigator.Points[numArray[index2]].Right = num3; + } + point3.Down = num1; + if (index1 == 0) + UILinkPointNavigator.Points[num1].Up = UILinkPointNavigator.Points[num1 + 1].Up = num3; + key3 = num3; + numArray[index2] = num3; + UILinkPointNavigator.Shortcuts.FANCYUI_HIGHEST_INDEX = num3; + ++num3; + } + } + } + if (!PlayerInput.UsingGamepadUI || this._playerList.Count != 0 || UILinkPointNavigator.CurrentPoint <= 3001) + return; + UILinkPointNavigator.ChangePoint(3001); + } + } +} diff --git a/GameContent/UI/States/UICreativePowersMenu.cs b/GameContent/UI/States/UICreativePowersMenu.cs new file mode 100644 index 0000000..638869f --- /dev/null +++ b/GameContent/UI/States/UICreativePowersMenu.cs @@ -0,0 +1,481 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UICreativePowersMenu +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using Terraria.GameContent.Creative; +using Terraria.GameContent.UI.Elements; +using Terraria.Localization; +using Terraria.UI; +using Terraria.UI.Gamepad; + +namespace Terraria.GameContent.UI.States +{ + public class UICreativePowersMenu : UIState + { + private bool _hovered; + private PowerStripUIElement _mainPowerStrip; + private PowerStripUIElement _timePowersStrip; + private PowerStripUIElement _weatherPowersStrip; + private PowerStripUIElement _personalPowersStrip; + private UICreativeInfiniteItemsDisplay _infiniteItemsWindow; + private UIElement _container; + private UICreativePowersMenu.MenuTree _mainCategory = new UICreativePowersMenu.MenuTree(UICreativePowersMenu.OpenMainSubCategory.None); + private UICreativePowersMenu.MenuTree _weatherCategory = new UICreativePowersMenu.MenuTree(UICreativePowersMenu.WeatherSubcategory.None); + private UICreativePowersMenu.MenuTree _timeCategory = new UICreativePowersMenu.MenuTree(UICreativePowersMenu.TimeSubcategory.None); + private UICreativePowersMenu.MenuTree _personalCategory = new UICreativePowersMenu.MenuTree(UICreativePowersMenu.PersonalSubcategory.None); + private const int INITIAL_LEFT_PIXELS = 20; + private const int LEFT_PIXELS_PER_STRIP_DEPTH = 60; + private const string STRIP_MAIN = "strip 0"; + private const string STRIP_DEPTH_1 = "strip 1"; + private const string STRIP_DEPTH_2 = "strip 2"; + private UIGamepadHelper _helper; + + public bool IsShowingResearchMenu => this._mainCategory.CurrentOption == 2; + + public override void OnActivate() => this.InitializePage(); + + private void InitializePage() + { + int num1 = 270; + int num2 = 20; + this._container = new UIElement() + { + HAlign = 0.0f, + VAlign = 0.0f, + Width = new StyleDimension(0.0f, 1f), + Height = new StyleDimension((float) (-num1 - num2), 1f), + Top = new StyleDimension((float) num1, 0.0f) + }; + this.Append(this._container); + PowerStripUIElement powerStripUiElement1 = new PowerStripUIElement("strip 0", this.CreateMainPowerStrip()); + powerStripUiElement1.HAlign = 0.0f; + powerStripUiElement1.VAlign = 0.5f; + powerStripUiElement1.Left = new StyleDimension(20f, 0.0f); + PowerStripUIElement powerStripUiElement2 = powerStripUiElement1; + powerStripUiElement2.OnMouseOver += new UIElement.MouseEvent(this.strip_OnMouseOver); + powerStripUiElement2.OnMouseOut += new UIElement.MouseEvent(this.strip_OnMouseOut); + this._mainPowerStrip = powerStripUiElement2; + PowerStripUIElement powerStripUiElement3 = new PowerStripUIElement("strip 1", this.CreateTimePowerStrip()); + powerStripUiElement3.HAlign = 0.0f; + powerStripUiElement3.VAlign = 0.5f; + powerStripUiElement3.Left = new StyleDimension(80f, 0.0f); + PowerStripUIElement powerStripUiElement4 = powerStripUiElement3; + powerStripUiElement4.OnMouseOver += new UIElement.MouseEvent(this.strip_OnMouseOver); + powerStripUiElement4.OnMouseOut += new UIElement.MouseEvent(this.strip_OnMouseOut); + this._timePowersStrip = powerStripUiElement4; + PowerStripUIElement powerStripUiElement5 = new PowerStripUIElement("strip 1", this.CreateWeatherPowerStrip()); + powerStripUiElement5.HAlign = 0.0f; + powerStripUiElement5.VAlign = 0.5f; + powerStripUiElement5.Left = new StyleDimension(80f, 0.0f); + PowerStripUIElement powerStripUiElement6 = powerStripUiElement5; + powerStripUiElement6.OnMouseOver += new UIElement.MouseEvent(this.strip_OnMouseOver); + powerStripUiElement6.OnMouseOut += new UIElement.MouseEvent(this.strip_OnMouseOut); + this._weatherPowersStrip = powerStripUiElement6; + PowerStripUIElement powerStripUiElement7 = new PowerStripUIElement("strip 1", this.CreatePersonalPowerStrip()); + powerStripUiElement7.HAlign = 0.0f; + powerStripUiElement7.VAlign = 0.5f; + powerStripUiElement7.Left = new StyleDimension(80f, 0.0f); + PowerStripUIElement powerStripUiElement8 = powerStripUiElement7; + powerStripUiElement8.OnMouseOver += new UIElement.MouseEvent(this.strip_OnMouseOver); + powerStripUiElement8.OnMouseOut += new UIElement.MouseEvent(this.strip_OnMouseOut); + this._personalPowersStrip = powerStripUiElement8; + UICreativeInfiniteItemsDisplay infiniteItemsDisplay = new UICreativeInfiniteItemsDisplay((UIState) this); + infiniteItemsDisplay.HAlign = 0.0f; + infiniteItemsDisplay.VAlign = 0.5f; + infiniteItemsDisplay.Left = new StyleDimension(80f, 0.0f); + infiniteItemsDisplay.Width = new StyleDimension(480f, 0.0f); + infiniteItemsDisplay.Height = new StyleDimension(-88f, 1f); + this._infiniteItemsWindow = infiniteItemsDisplay; + this.RefreshElementsOrder(); + this.OnUpdate += new UIElement.ElementEvent(this.UICreativePowersMenu_OnUpdate); + } + + private List CreateMainPowerStrip() + { + UICreativePowersMenu.MenuTree mainCategory = this._mainCategory; + mainCategory.Buttons.Clear(); + List elements = new List(); + CreativePowerUIElementRequestInfo request = new CreativePowerUIElementRequestInfo() + { + PreferredButtonWidth = 40, + PreferredButtonHeight = 40 + }; + GroupOptionButton categoryButton1 = CreativePowersHelper.CreateCategoryButton(request, 1, 0); + categoryButton1.Append((UIElement) CreativePowersHelper.GetIconImage(CreativePowersHelper.CreativePowerIconLocations.ItemDuplication)); + categoryButton1.OnClick += new UIElement.MouseEvent(this.MainCategoryButtonClick); + categoryButton1.OnUpdate += new UIElement.ElementEvent(this.itemsWindowButton_OnUpdate); + mainCategory.Buttons.Add(1, categoryButton1); + elements.Add((UIElement) categoryButton1); + GroupOptionButton categoryButton2 = CreativePowersHelper.CreateCategoryButton(request, 2, 0); + categoryButton2.Append((UIElement) CreativePowersHelper.GetIconImage(CreativePowersHelper.CreativePowerIconLocations.ItemResearch)); + categoryButton2.OnClick += new UIElement.MouseEvent(this.MainCategoryButtonClick); + categoryButton2.OnUpdate += new UIElement.ElementEvent(this.researchWindowButton_OnUpdate); + mainCategory.Buttons.Add(2, categoryButton2); + elements.Add((UIElement) categoryButton2); + GroupOptionButton categoryButton3 = CreativePowersHelper.CreateCategoryButton(request, 3, 0); + categoryButton3.Append((UIElement) CreativePowersHelper.GetIconImage(CreativePowersHelper.CreativePowerIconLocations.TimeCategory)); + categoryButton3.OnClick += new UIElement.MouseEvent(this.MainCategoryButtonClick); + categoryButton3.OnUpdate += new UIElement.ElementEvent(this.timeCategoryButton_OnUpdate); + mainCategory.Buttons.Add(3, categoryButton3); + elements.Add((UIElement) categoryButton3); + GroupOptionButton categoryButton4 = CreativePowersHelper.CreateCategoryButton(request, 4, 0); + categoryButton4.Append((UIElement) CreativePowersHelper.GetIconImage(CreativePowersHelper.CreativePowerIconLocations.WeatherCategory)); + categoryButton4.OnClick += new UIElement.MouseEvent(this.MainCategoryButtonClick); + categoryButton4.OnUpdate += new UIElement.ElementEvent(this.weatherCategoryButton_OnUpdate); + mainCategory.Buttons.Add(4, categoryButton4); + elements.Add((UIElement) categoryButton4); + GroupOptionButton categoryButton5 = CreativePowersHelper.CreateCategoryButton(request, 6, 0); + categoryButton5.Append((UIElement) CreativePowersHelper.GetIconImage(CreativePowersHelper.CreativePowerIconLocations.PersonalCategory)); + categoryButton5.OnClick += new UIElement.MouseEvent(this.MainCategoryButtonClick); + categoryButton5.OnUpdate += new UIElement.ElementEvent(this.personalCategoryButton_OnUpdate); + mainCategory.Buttons.Add(6, categoryButton5); + elements.Add((UIElement) categoryButton5); + CreativePowerManager.Instance.GetPower().ProvidePowerButtons(request, elements); + GroupOptionButton subcategoryButton = this.CreateSubcategoryButton(ref request, 1, "strip 1", 5, 0, mainCategory.Buttons, mainCategory.Sliders); + subcategoryButton.OnClick += new UIElement.MouseEvent(this.MainCategoryButtonClick); + elements.Add((UIElement) subcategoryButton); + return elements; + } + + private static void CategoryButton_OnUpdate_DisplayTooltips( + UIElement affectedElement, + string categoryNameKey) + { + GroupOptionButton groupOptionButton = affectedElement as GroupOptionButton; + if (!affectedElement.IsMouseHovering) + return; + string textValue = Language.GetTextValue(groupOptionButton.IsSelected ? categoryNameKey + "Opened" : categoryNameKey + "Closed"); + CreativePowersHelper.AddDescriptionIfNeeded(ref textValue, categoryNameKey); + Main.instance.MouseTextNoOverride(textValue); + } + + private void itemsWindowButton_OnUpdate(UIElement affectedElement) => UICreativePowersMenu.CategoryButton_OnUpdate_DisplayTooltips(affectedElement, "CreativePowers.InfiniteItemsCategory"); + + private void researchWindowButton_OnUpdate(UIElement affectedElement) => UICreativePowersMenu.CategoryButton_OnUpdate_DisplayTooltips(affectedElement, "CreativePowers.ResearchItemsCategory"); + + private void timeCategoryButton_OnUpdate(UIElement affectedElement) => UICreativePowersMenu.CategoryButton_OnUpdate_DisplayTooltips(affectedElement, "CreativePowers.TimeCategory"); + + private void weatherCategoryButton_OnUpdate(UIElement affectedElement) => UICreativePowersMenu.CategoryButton_OnUpdate_DisplayTooltips(affectedElement, "CreativePowers.WeatherCategory"); + + private void personalCategoryButton_OnUpdate(UIElement affectedElement) => UICreativePowersMenu.CategoryButton_OnUpdate_DisplayTooltips(affectedElement, "CreativePowers.PersonalCategory"); + + private void UICreativePowersMenu_OnUpdate(UIElement affectedElement) + { + if (!this._hovered) + return; + Main.LocalPlayer.mouseInterface = true; + } + + private void strip_OnMouseOut(UIMouseEvent evt, UIElement listeningElement) => this._hovered = false; + + private void strip_OnMouseOver(UIMouseEvent evt, UIElement listeningElement) => this._hovered = true; + + private void MainCategoryButtonClick(UIMouseEvent evt, UIElement listeningElement) + { + this.ToggleMainCategory((listeningElement as GroupOptionButton).OptionValue); + this.RefreshElementsOrder(); + } + + private void ToggleMainCategory(int option) => this.ToggleCategory(this._mainCategory, option, UICreativePowersMenu.OpenMainSubCategory.None); + + private void ToggleWeatherCategory(int option) => this.ToggleCategory(this._weatherCategory, option, UICreativePowersMenu.WeatherSubcategory.None); + + private void ToggleTimeCategory(int option) => this.ToggleCategory(this._timeCategory, option, UICreativePowersMenu.TimeSubcategory.None); + + private void TogglePersonalCategory(int option) => this.ToggleCategory(this._personalCategory, option, UICreativePowersMenu.PersonalSubcategory.None); + + private void ToggleCategory( + UICreativePowersMenu.MenuTree tree, + int option, + TEnum defaultOption) + where TEnum : struct, IConvertible + { + if (tree.CurrentOption == option) + option = defaultOption.ToInt32((IFormatProvider) null); + tree.CurrentOption = option; + foreach (GroupOptionButton groupOptionButton in tree.Buttons.Values) + groupOptionButton.SetCurrentOption(option); + } + + private List CreateTimePowerStrip() + { + UICreativePowersMenu.MenuTree timeCategory = this._timeCategory; + List elements = new List(); + CreativePowerUIElementRequestInfo request = new CreativePowerUIElementRequestInfo() + { + PreferredButtonWidth = 40, + PreferredButtonHeight = 40 + }; + CreativePowerManager.Instance.GetPower().ProvidePowerButtons(request, elements); + CreativePowerManager.Instance.GetPower().ProvidePowerButtons(request, elements); + CreativePowerManager.Instance.GetPower().ProvidePowerButtons(request, elements); + CreativePowerManager.Instance.GetPower().ProvidePowerButtons(request, elements); + CreativePowerManager.Instance.GetPower().ProvidePowerButtons(request, elements); + GroupOptionButton subcategoryButton = this.CreateSubcategoryButton(ref request, 2, "strip 2", 1, 0, timeCategory.Buttons, timeCategory.Sliders); + subcategoryButton.OnClick += new UIElement.MouseEvent(this.TimeCategoryButtonClick); + elements.Add((UIElement) subcategoryButton); + return elements; + } + + private List CreatePersonalPowerStrip() + { + UICreativePowersMenu.MenuTree personalCategory = this._personalCategory; + List elements = new List(); + CreativePowerUIElementRequestInfo request = new CreativePowerUIElementRequestInfo() + { + PreferredButtonWidth = 40, + PreferredButtonHeight = 40 + }; + CreativePowerManager.Instance.GetPower().ProvidePowerButtons(request, elements); + CreativePowerManager.Instance.GetPower().ProvidePowerButtons(request, elements); + GroupOptionButton subcategoryButton = this.CreateSubcategoryButton(ref request, 2, "strip 2", 1, 0, personalCategory.Buttons, personalCategory.Sliders); + subcategoryButton.OnClick += new UIElement.MouseEvent(this.PersonalCategoryButtonClick); + elements.Add((UIElement) subcategoryButton); + return elements; + } + + private List CreateWeatherPowerStrip() + { + UICreativePowersMenu.MenuTree weatherCategory = this._weatherCategory; + List elements = new List(); + CreativePowerUIElementRequestInfo request = new CreativePowerUIElementRequestInfo() + { + PreferredButtonWidth = 40, + PreferredButtonHeight = 40 + }; + GroupOptionButton subcategoryButton1 = this.CreateSubcategoryButton(ref request, 2, "strip 2", 1, 0, weatherCategory.Buttons, weatherCategory.Sliders); + subcategoryButton1.OnClick += new UIElement.MouseEvent(this.WeatherCategoryButtonClick); + elements.Add((UIElement) subcategoryButton1); + CreativePowerManager.Instance.GetPower().ProvidePowerButtons(request, elements); + GroupOptionButton subcategoryButton2 = this.CreateSubcategoryButton(ref request, 2, "strip 2", 2, 0, weatherCategory.Buttons, weatherCategory.Sliders); + subcategoryButton2.OnClick += new UIElement.MouseEvent(this.WeatherCategoryButtonClick); + elements.Add((UIElement) subcategoryButton2); + CreativePowerManager.Instance.GetPower().ProvidePowerButtons(request, elements); + return elements; + } + + private GroupOptionButton CreateSubcategoryButton( + ref CreativePowerUIElementRequestInfo request, + int subcategoryDepth, + string subcategoryName, + int subcategoryIndex, + int currentSelectedInSubcategory, + Dictionary> subcategoryButtons, + Dictionary slidersSet) + where T : ICreativePower, IProvideSliderElement, IPowerSubcategoryElement + { + T power = CreativePowerManager.Instance.GetPower(); + UIElement uiElement = power.ProvideSlider(); + uiElement.Left = new StyleDimension((float) (20 + subcategoryDepth * 60), 0.0f); + slidersSet[subcategoryIndex] = uiElement; + uiElement.SetSnapPoint(subcategoryName, 0, new Vector2?(new Vector2(0.0f, 0.5f)), new Vector2?(new Vector2(28f, 0.0f))); + GroupOptionButton optionButton = power.GetOptionButton(request, subcategoryIndex, currentSelectedInSubcategory); + subcategoryButtons[subcategoryIndex] = optionButton; + CreativePowersHelper.UpdateUnlockStateByPower((ICreativePower) power, (UIElement) optionButton, CreativePowersHelper.CommonSelectedColor); + return optionButton; + } + + private void WeatherCategoryButtonClick(UIMouseEvent evt, UIElement listeningElement) + { + GroupOptionButton groupOptionButton = listeningElement as GroupOptionButton; + switch (groupOptionButton.OptionValue) + { + case 1: + if (!CreativePowerManager.Instance.GetPower().GetIsUnlocked()) + return; + break; + case 2: + if (!CreativePowerManager.Instance.GetPower().GetIsUnlocked()) + return; + break; + } + this.ToggleWeatherCategory(groupOptionButton.OptionValue); + this.RefreshElementsOrder(); + } + + private void TimeCategoryButtonClick(UIMouseEvent evt, UIElement listeningElement) + { + GroupOptionButton groupOptionButton = listeningElement as GroupOptionButton; + if (groupOptionButton.OptionValue == 1 && !CreativePowerManager.Instance.GetPower().GetIsUnlocked()) + return; + this.ToggleTimeCategory(groupOptionButton.OptionValue); + this.RefreshElementsOrder(); + } + + private void PersonalCategoryButtonClick(UIMouseEvent evt, UIElement listeningElement) + { + GroupOptionButton groupOptionButton = listeningElement as GroupOptionButton; + if (groupOptionButton.OptionValue == 1 && !CreativePowerManager.Instance.GetPower().GetIsUnlocked()) + return; + this.TogglePersonalCategory(groupOptionButton.OptionValue); + this.RefreshElementsOrder(); + } + + private void RefreshElementsOrder() + { + this._container.RemoveAllChildren(); + this._container.Append((UIElement) this._mainPowerStrip); + UIElement element = (UIElement) null; + UICreativePowersMenu.MenuTree mainCategory = this._mainCategory; + if (mainCategory.Sliders.TryGetValue(mainCategory.CurrentOption, out element)) + this._container.Append(element); + if (mainCategory.CurrentOption == 1) + { + this._infiniteItemsWindow.SetPageTypeToShow(UICreativeInfiniteItemsDisplay.InfiniteItemsDisplayPage.InfiniteItemsPickup); + this._container.Append((UIElement) this._infiniteItemsWindow); + } + if (mainCategory.CurrentOption == 2) + { + this._infiniteItemsWindow.SetPageTypeToShow(UICreativeInfiniteItemsDisplay.InfiniteItemsDisplayPage.InfiniteItemsResearch); + this._container.Append((UIElement) this._infiniteItemsWindow); + } + if (mainCategory.CurrentOption == 3) + { + this._container.Append((UIElement) this._timePowersStrip); + UICreativePowersMenu.MenuTree timeCategory = this._timeCategory; + if (timeCategory.Sliders.TryGetValue(timeCategory.CurrentOption, out element)) + this._container.Append(element); + } + if (mainCategory.CurrentOption == 4) + { + this._container.Append((UIElement) this._weatherPowersStrip); + UICreativePowersMenu.MenuTree weatherCategory = this._weatherCategory; + if (weatherCategory.Sliders.TryGetValue(weatherCategory.CurrentOption, out element)) + this._container.Append(element); + } + if (mainCategory.CurrentOption != 6) + return; + this._container.Append((UIElement) this._personalPowersStrip); + UICreativePowersMenu.MenuTree personalCategory = this._personalCategory; + if (!personalCategory.Sliders.TryGetValue(personalCategory.CurrentOption, out element)) + return; + this._container.Append(element); + } + + public override void Draw(SpriteBatch spriteBatch) + { + base.Draw(spriteBatch); + this.SetupGamepadPoints(spriteBatch); + } + + private void SetupGamepadPoints(SpriteBatch spriteBatch) + { + int currentID = 10000; + List snapPoints = this.GetSnapPoints(); + List pointsByCategoryName1 = this._helper.GetOrderedPointsByCategoryName(snapPoints, "strip 0"); + List pointsByCategoryName2 = this._helper.GetOrderedPointsByCategoryName(snapPoints, "strip 1"); + List pointsByCategoryName3 = this._helper.GetOrderedPointsByCategoryName(snapPoints, "strip 2"); + UILinkPoint[] uiLinkPointArray1 = (UILinkPoint[]) null; + UILinkPoint[] uiLinkPointArray2 = (UILinkPoint[]) null; + UILinkPoint[] stripOnRight = (UILinkPoint[]) null; + if (pointsByCategoryName1.Count > 0) + uiLinkPointArray1 = this._helper.CreateUILinkStripVertical(ref currentID, pointsByCategoryName1); + if (pointsByCategoryName2.Count > 0) + uiLinkPointArray2 = this._helper.CreateUILinkStripVertical(ref currentID, pointsByCategoryName2); + if (pointsByCategoryName3.Count > 0) + stripOnRight = this._helper.CreateUILinkStripVertical(ref currentID, pointsByCategoryName3); + if (uiLinkPointArray1 != null && uiLinkPointArray2 != null) + this._helper.LinkVerticalStrips(uiLinkPointArray1, uiLinkPointArray2, (uiLinkPointArray1.Length - uiLinkPointArray2.Length) / 2); + if (uiLinkPointArray2 != null && stripOnRight != null) + this._helper.LinkVerticalStrips(uiLinkPointArray2, stripOnRight, (uiLinkPointArray1.Length - uiLinkPointArray2.Length) / 2); + UILinkPoint downSide = (UILinkPoint) null; + UILinkPoint uiLinkPoint = (UILinkPoint) null; + for (int index = 0; index < snapPoints.Count; ++index) + { + SnapPoint snap = snapPoints[index]; + string name = snap.Name; + if (!(name == "CreativeSacrificeConfirm")) + { + if (name == "CreativeInfinitesSearch") + { + uiLinkPoint = this._helper.MakeLinkPointFromSnapPoint(currentID++, snap); + Main.CreativeMenu.GamepadPointIdForInfiniteItemSearchHack = uiLinkPoint.ID; + } + } + else + downSide = this._helper.MakeLinkPointFromSnapPoint(currentID++, snap); + } + UILinkPoint point = UILinkPointNavigator.Points[15000]; + List pointsByCategoryName4 = this._helper.GetOrderedPointsByCategoryName(snapPoints, "CreativeInfinitesFilter"); + if (pointsByCategoryName4.Count > 0) + { + UILinkPoint[] linkStripHorizontal = this._helper.CreateUILinkStripHorizontal(ref currentID, pointsByCategoryName4); + if (uiLinkPoint != null) + { + uiLinkPoint.Up = linkStripHorizontal[0].ID; + for (int index = 0; index < linkStripHorizontal.Length; ++index) + linkStripHorizontal[index].Down = uiLinkPoint.ID; + } + } + List pointsByCategoryName5 = this._helper.GetOrderedPointsByCategoryName(snapPoints, "CreativeInfinitesSlot"); + UILinkPoint[,] uiLinkPointArray3 = (UILinkPoint[,]) null; + if (pointsByCategoryName5.Count > 0) + { + uiLinkPointArray3 = this._helper.CreateUILinkPointGrid(ref currentID, pointsByCategoryName5, this._infiniteItemsWindow.GetItemsPerLine(), uiLinkPoint, uiLinkPointArray1[0]); + this._helper.LinkVerticalStripRightSideToSingle(uiLinkPointArray1, uiLinkPointArray3[0, 0]); + } + else if (uiLinkPoint != null) + this._helper.LinkVerticalStripRightSideToSingle(uiLinkPointArray1, uiLinkPoint); + if (uiLinkPoint != null && uiLinkPointArray3 != null) + this._helper.PairUpDown(uiLinkPoint, uiLinkPointArray3[0, 0]); + if (point != null && this.IsShowingResearchMenu) + this._helper.LinkVerticalStripRightSideToSingle(uiLinkPointArray1, point); + if (downSide != null) + { + this._helper.PairUpDown(point, downSide); + downSide.Left = uiLinkPointArray1[0].ID; + } + if (!Main.CreativeMenu.GamepadMoveToSearchButtonHack) + return; + Main.CreativeMenu.GamepadMoveToSearchButtonHack = false; + if (uiLinkPoint == null) + return; + UILinkPointNavigator.ChangePoint(uiLinkPoint.ID); + } + + private class MenuTree where TEnum : struct, IConvertible + { + public int CurrentOption; + public Dictionary> Buttons = new Dictionary>(); + public Dictionary Sliders = new Dictionary(); + + public MenuTree(TEnum defaultValue) => this.CurrentOption = defaultValue.ToInt32((IFormatProvider) null); + } + + private enum OpenMainSubCategory + { + None, + InfiniteItems, + ResearchWindow, + Time, + Weather, + EnemyStrengthSlider, + PersonalPowers, + } + + private enum WeatherSubcategory + { + None, + WindSlider, + RainSlider, + } + + private enum TimeSubcategory + { + None, + TimeRate, + } + + private enum PersonalSubcategory + { + None, + EnemySpawnRateSlider, + } + } +} diff --git a/GameContent/UI/States/UIEmotesMenu.cs b/GameContent/UI/States/UIEmotesMenu.cs new file mode 100644 index 0000000..9710df7 --- /dev/null +++ b/GameContent/UI/States/UIEmotesMenu.cs @@ -0,0 +1,633 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UIEmotesMenu +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.Audio; +using Terraria.GameContent.Events; +using Terraria.GameContent.UI.Elements; +using Terraria.ID; +using Terraria.Localization; +using Terraria.UI; +using Terraria.UI.Gamepad; + +namespace Terraria.GameContent.UI.States +{ + public class UIEmotesMenu : UIState + { + private UIElement _outerContainer; + private UIElement _backPanel; + private UIElement _container; + private UIList _list; + private UIScrollbar _scrollBar; + private bool _isScrollbarAttached; + + public override void OnActivate() + { + this.InitializePage(); + if (Main.gameMenu) + { + this._outerContainer.Top.Set(220f, 0.0f); + this._outerContainer.Height.Set(-220f, 1f); + } + else + { + this._outerContainer.Top.Set(120f, 0.0f); + this._outerContainer.Height.Set(-120f, 1f); + } + } + + public void InitializePage() + { + this.RemoveAllChildren(); + UIElement element = new UIElement(); + element.Width.Set(590f, 0.0f); + element.Top.Set(220f, 0.0f); + element.Height.Set(-220f, 1f); + element.HAlign = 0.5f; + this._outerContainer = element; + this.Append(element); + UIPanel uiPanel = new UIPanel(); + uiPanel.Width.Set(0.0f, 1f); + uiPanel.Height.Set(-110f, 1f); + uiPanel.BackgroundColor = new Color(33, 43, 79) * 0.8f; + uiPanel.PaddingTop = 0.0f; + element.Append((UIElement) uiPanel); + this._container = (UIElement) uiPanel; + UIList uiList = new UIList(); + uiList.Width.Set(-25f, 1f); + uiList.Height.Set(-50f, 1f); + uiList.Top.Set(50f, 0.0f); + uiList.HAlign = 0.5f; + uiList.ListPadding = 14f; + uiPanel.Append((UIElement) uiList); + this._list = uiList; + UIScrollbar scrollbar = new UIScrollbar(); + scrollbar.SetView(100f, 1000f); + scrollbar.Height.Set(-20f, 1f); + scrollbar.HAlign = 1f; + scrollbar.VAlign = 1f; + scrollbar.Top = StyleDimension.FromPixels(-5f); + uiList.SetScrollbar(scrollbar); + this._scrollBar = scrollbar; + UITextPanel uiTextPanel = new UITextPanel(Language.GetText("UI.Back"), 0.7f, true); + uiTextPanel.Width.Set(-10f, 0.5f); + uiTextPanel.Height.Set(50f, 0.0f); + uiTextPanel.VAlign = 1f; + uiTextPanel.HAlign = 0.5f; + uiTextPanel.Top.Set(-45f, 0.0f); + uiTextPanel.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver); + uiTextPanel.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut); + uiTextPanel.OnClick += new UIElement.MouseEvent(this.GoBackClick); + uiTextPanel.SetSnapPoint("Back", 0); + element.Append((UIElement) uiTextPanel); + this._backPanel = (UIElement) uiTextPanel; + int currentGroupIndex = 0; + this.TryAddingList(Language.GetText("UI.EmoteCategoryGeneral"), ref currentGroupIndex, 10, this.GetEmotesGeneral()); + this.TryAddingList(Language.GetText("UI.EmoteCategoryRPS"), ref currentGroupIndex, 10, this.GetEmotesRPS()); + this.TryAddingList(Language.GetText("UI.EmoteCategoryItems"), ref currentGroupIndex, 11, this.GetEmotesItems()); + this.TryAddingList(Language.GetText("UI.EmoteCategoryBiomesAndEvents"), ref currentGroupIndex, 8, this.GetEmotesBiomesAndEvents()); + this.TryAddingList(Language.GetText("UI.EmoteCategoryTownNPCs"), ref currentGroupIndex, 9, this.GetEmotesTownNPCs()); + this.TryAddingList(Language.GetText("UI.EmoteCategoryCritters"), ref currentGroupIndex, 7, this.GetEmotesCritters()); + this.TryAddingList(Language.GetText("UI.EmoteCategoryBosses"), ref currentGroupIndex, 8, this.GetEmotesBosses()); + } + + private void TryAddingList( + LocalizedText title, + ref int currentGroupIndex, + int maxEmotesPerRow, + List emoteIds) + { + if (emoteIds == null || emoteIds.Count == 0) + return; + this._list.Add((UIElement) new EmotesGroupListItem(title, currentGroupIndex++, maxEmotesPerRow, emoteIds.ToArray())); + } + + private List GetEmotesGeneral() => new List() + { + 0, + 1, + 2, + 3, + 15, + 136, + 94, + 16, + 135, + 134, + 137, + 138, + 139, + 17, + 87, + 88, + 89, + 91, + 92, + 93, + 8, + 9, + 10, + 11, + 14, + 100 + }; + + private List GetEmotesRPS() => new List() + { + 36, + 37, + 38, + 33, + 34, + 35 + }; + + private List GetEmotesItems() => new List() + { + 7, + 73, + 74, + 75, + 76, + 131, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 90, + 132, + 126, + (int) sbyte.MaxValue, + 128, + 129 + }; + + private List GetEmotesBiomesAndEvents() => new List() + { + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 18, + 19, + 20, + 21, + 99, + 4, + 5, + 6, + 95, + 96, + 97, + 98 + }; + + private List GetEmotesTownNPCs() => new List() + { + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 130, + 140, + 141, + 142 + }; + + private List GetEmotesCritters() + { + List intList = new List(); + intList.AddRange((IEnumerable) new int[5] + { + 12, + 13, + 61, + 62, + 63 + }); + intList.AddRange((IEnumerable) new int[4] + { + 67, + 68, + 69, + 70 + }); + intList.Add(72); + if (NPC.downedGoblins) + intList.Add(64); + if (NPC.downedFrost) + intList.Add(66); + if (NPC.downedPirates) + intList.Add(65); + if (NPC.downedMartians) + intList.Add(71); + return intList; + } + + private List GetEmotesBosses() + { + List intList = new List(); + if (NPC.downedBoss1) + intList.Add(39); + if (NPC.downedBoss2) + { + intList.Add(40); + intList.Add(41); + } + if (NPC.downedSlimeKing) + intList.Add(51); + if (NPC.downedQueenBee) + intList.Add(42); + if (NPC.downedBoss3) + intList.Add(43); + if (Main.hardMode) + intList.Add(44); + if (NPC.downedQueenSlime) + intList.Add(144); + if (NPC.downedMechBoss1) + intList.Add(45); + if (NPC.downedMechBoss3) + intList.Add(46); + if (NPC.downedMechBoss2) + intList.Add(47); + if (NPC.downedPlantBoss) + intList.Add(48); + if (NPC.downedGolemBoss) + intList.Add(49); + if (NPC.downedFishron) + intList.Add(50); + if (NPC.downedEmpressOfLight) + intList.Add(143); + if (NPC.downedAncientCultist) + intList.Add(52); + if (NPC.downedMoonlord) + intList.Add(53); + if (NPC.downedHalloweenTree) + intList.Add(54); + if (NPC.downedHalloweenKing) + intList.Add(55); + if (NPC.downedChristmasTree) + intList.Add(56); + if (NPC.downedChristmasIceQueen) + intList.Add(57); + if (NPC.downedChristmasSantank) + intList.Add(58); + if (NPC.downedPirates) + intList.Add(59); + if (NPC.downedMartians) + intList.Add(60); + if (DD2Event.DownedInvasionAnyDifficulty) + intList.Add(133); + return intList; + } + + public override void Recalculate() + { + if (this._scrollBar != null) + { + if (this._isScrollbarAttached && !this._scrollBar.CanScroll) + { + this._container.RemoveChild((UIElement) this._scrollBar); + this._isScrollbarAttached = false; + this._list.Width.Set(0.0f, 1f); + } + else if (!this._isScrollbarAttached && this._scrollBar.CanScroll) + { + this._container.Append((UIElement) this._scrollBar); + this._isScrollbarAttached = true; + this._list.Width.Set(-25f, 1f); + } + } + base.Recalculate(); + } + + private void GoBackClick(UIMouseEvent evt, UIElement listeningElement) + { + Main.menuMode = 0; + IngameFancyUI.Close(); + } + + private void FadedMouseOver(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + ((UIPanel) evt.Target).BackgroundColor = new Color(73, 94, 171); + ((UIPanel) evt.Target).BorderColor = Colors.FancyUIFatButtonMouseOver; + } + + private void FadedMouseOut(UIMouseEvent evt, UIElement listeningElement) + { + ((UIPanel) evt.Target).BackgroundColor = new Color(63, 82, 151) * 0.8f; + ((UIPanel) evt.Target).BorderColor = Color.Black; + } + + public override void Draw(SpriteBatch spriteBatch) + { + base.Draw(spriteBatch); + this.SetupGamepadPoints2(spriteBatch); + } + + private void SetupGamepadPoints2(SpriteBatch spriteBatch) + { + int num1 = 7; + UILinkPointNavigator.Shortcuts.BackButtonCommand = 1; + int ID; + int key1 = ID = 3001; + List snapPoints = this.GetSnapPoints(); + this.RemoveSnapPointsOutOfScreen(spriteBatch, snapPoints); + Vector2 vector2 = this._backPanel.GetInnerDimensions().ToRectangle().Center.ToVector2(); + UILinkPointNavigator.SetPosition(ID, vector2); + UILinkPoint point1 = UILinkPointNavigator.Points[key1]; + point1.Unlink(); + point1.Up = key1 + 1; + UILinkPoint uiLinkPoint = point1; + int num2 = key1 + 1; + int length = 0; + List> snapPointListList = new List>(); + for (int groupIndex = 0; groupIndex < num1; ++groupIndex) + { + List emoteGroup = this.GetEmoteGroup(snapPoints, groupIndex); + if (emoteGroup.Count > 0) + snapPointListList.Add(emoteGroup); + length += (int) Math.Ceiling((double) emoteGroup.Count / 14.0); + } + SnapPoint[,] snapPointArray = new SnapPoint[14, length]; + int num3 = 0; + for (int index1 = 0; index1 < snapPointListList.Count; ++index1) + { + List snapPointList = snapPointListList[index1]; + for (int index2 = 0; index2 < snapPointList.Count; ++index2) + { + int index3 = num3 + index2 / 14; + int index4 = index2 % 14; + snapPointArray[index4, index3] = snapPointList[index2]; + } + num3 += (int) Math.Ceiling((double) snapPointList.Count / 14.0); + } + int[,] grid = new int[14, length]; + int num4 = 0; + for (int index5 = 0; index5 < snapPointArray.GetLength(1); ++index5) + { + for (int index6 = 0; index6 < snapPointArray.GetLength(0); ++index6) + { + SnapPoint snapPoint = snapPointArray[index6, index5]; + if (snapPoint != null) + { + UILinkPointNavigator.Points[num2].Unlink(); + UILinkPointNavigator.SetPosition(num2, snapPoint.Position); + grid[index6, index5] = num2; + if (index6 == 0) + num4 = num2; + ++num2; + } + } + } + uiLinkPoint.Up = num4; + for (int y1 = 0; y1 < snapPointArray.GetLength(1); ++y1) + { + for (int x1 = 0; x1 < snapPointArray.GetLength(0); ++x1) + { + int key2 = grid[x1, y1]; + if (key2 != 0) + { + UILinkPoint point2 = UILinkPointNavigator.Points[key2]; + if (this.TryGetPointOnGrid(grid, x1, y1, -1, 0)) + { + point2.Left = grid[x1 - 1, y1]; + } + else + { + point2.Left = point2.ID; + for (int x2 = x1; x2 < snapPointArray.GetLength(0); ++x2) + { + if (this.TryGetPointOnGrid(grid, x2, y1, 0, 0)) + point2.Left = grid[x2, y1]; + } + } + if (this.TryGetPointOnGrid(grid, x1, y1, 1, 0)) + { + point2.Right = grid[x1 + 1, y1]; + } + else + { + point2.Right = point2.ID; + for (int x3 = x1; x3 >= 0; --x3) + { + if (this.TryGetPointOnGrid(grid, x3, y1, 0, 0)) + point2.Right = grid[x3, y1]; + } + } + if (this.TryGetPointOnGrid(grid, x1, y1, 0, -1)) + { + point2.Up = grid[x1, y1 - 1]; + } + else + { + point2.Up = point2.ID; + for (int y2 = y1 - 1; y2 >= 0; --y2) + { + if (this.TryGetPointOnGrid(grid, x1, y2, 0, 0)) + { + point2.Up = grid[x1, y2]; + break; + } + } + } + if (this.TryGetPointOnGrid(grid, x1, y1, 0, 1)) + { + point2.Down = grid[x1, y1 + 1]; + } + else + { + point2.Down = point2.ID; + for (int y3 = y1 + 1; y3 < snapPointArray.GetLength(1); ++y3) + { + if (this.TryGetPointOnGrid(grid, x1, y3, 0, 0)) + { + point2.Down = grid[x1, y3]; + break; + } + } + if (point2.Down == point2.ID) + point2.Down = uiLinkPoint.ID; + } + } + } + } + } + + private bool TryGetPointOnGrid(int[,] grid, int x, int y, int offsetX, int offsetY) => x + offsetX >= 0 && x + offsetX < grid.GetLength(0) && y + offsetY >= 0 && y + offsetY < grid.GetLength(1) && grid[x + offsetX, y + offsetY] != 0; + + private void RemoveSnapPointsOutOfScreen(SpriteBatch spriteBatch, List pts) + { + float num = 1f / Main.UIScale; + Rectangle clippingRectangle = this._container.GetClippingRectangle(spriteBatch); + Vector2 minimum = clippingRectangle.TopLeft() * num; + Vector2 maximum = clippingRectangle.BottomRight() * num; + for (int index = 0; index < pts.Count; ++index) + { + if (!pts[index].Position.Between(minimum, maximum)) + { + pts.Remove(pts[index]); + --index; + } + } + } + + private void SetupGamepadPoints(SpriteBatch spriteBatch) + { + UILinkPointNavigator.Shortcuts.BackButtonCommand = 1; + int ID = 3001; + int key = ID; + List snapPoints = this.GetSnapPoints(); + UILinkPointNavigator.SetPosition(ID, this._backPanel.GetInnerDimensions().ToRectangle().Center.ToVector2()); + UILinkPoint point1 = UILinkPointNavigator.Points[key]; + point1.Unlink(); + point1.Up = key + 1; + UILinkPoint uiLinkPoint = point1; + int num1 = key + 1; + float num2 = 1f / Main.UIScale; + Rectangle clippingRectangle = this._container.GetClippingRectangle(spriteBatch); + Vector2 minimum = clippingRectangle.TopLeft() * num2; + Vector2 maximum = clippingRectangle.BottomRight() * num2; + for (int index = 0; index < snapPoints.Count; ++index) + { + if (!snapPoints[index].Position.Between(minimum, maximum)) + { + snapPoints.Remove(snapPoints[index]); + --index; + } + } + int num3 = 0; + int num4 = 7; + List> snapPointListList = new List>(); + for (int groupIndex = 0; groupIndex < num4; ++groupIndex) + { + List emoteGroup = this.GetEmoteGroup(snapPoints, groupIndex); + if (emoteGroup.Count > 0) + snapPointListList.Add(emoteGroup); + } + List[] array = snapPointListList.ToArray(); + for (int index1 = 0; index1 < array.Length; ++index1) + { + List snapPointList = array[index1]; + int num5 = snapPointList.Count / 14; + if (snapPointList.Count % 14 > 0) + ++num5; + int num6 = 14; + if (snapPointList.Count % 14 != 0) + num6 = snapPointList.Count % 14; + for (int index2 = 0; index2 < snapPointList.Count; ++index2) + { + UILinkPoint point2 = UILinkPointNavigator.Points[num1]; + point2.Unlink(); + UILinkPointNavigator.SetPosition(num1, snapPointList[index2].Position); + int num7 = 14; + if (index2 / 14 == num5 - 1 && snapPointList.Count % 14 != 0) + num7 = snapPointList.Count % 14; + int num8 = index2 % 14; + point2.Left = num1 - 1; + point2.Right = num1 + 1; + point2.Up = num1 - 14; + point2.Down = num1 + 14; + if (num8 == num7 - 1) + point2.Right = num1 - num7 + 1; + if (num8 == 0) + point2.Left = num1 + num7 - 1; + if (num8 == 0) + uiLinkPoint.Up = num1; + if (index2 < 14) + { + if (num3 == 0) + { + point2.Up = -1; + } + else + { + point2.Up = num1 - 14; + if (num8 >= num3) + point2.Up -= 14; + for (int index3 = index1 - 1; index3 > 0 && array[index3].Count <= num8; --index3) + point2.Up -= 14; + } + } + int num9 = ID; + if (index1 == array.Length - 1) + { + if (index2 / 14 < num5 - 1 && num8 >= snapPointList.Count % 14) + point2.Down = num9; + if (index2 / 14 == num5 - 1) + point2.Down = num9; + } + else if (index2 / 14 == num5 - 1) + { + point2.Down = num1 + 14; + for (int index4 = index1 + 1; index4 < array.Length && array[index4].Count <= num8; ++index4) + point2.Down += 14; + if (index1 == array.Length - 1) + point2.Down = num9; + } + else if (num8 >= num6) + { + point2.Down = num1 + 14 + 14; + for (int index5 = index1 + 1; index5 < array.Length && array[index5].Count <= num8; ++index5) + point2.Down += 14; + } + ++num1; + } + num3 = num6; + int num10 = 14 - num3; + num1 += num10; + } + } + + private List GetEmoteGroup(List ptsOnPage, int groupIndex) + { + string groupName = "Group " + (object) groupIndex; + List list = ptsOnPage.Where((Func) (a => a.Name == groupName)).ToList(); + list.Sort(new Comparison(this.SortPoints)); + return list; + } + + private int SortPoints(SnapPoint a, SnapPoint b) => a.Id.CompareTo(b.Id); + } +} diff --git a/GameContent/UI/States/UIGamepadHelper.cs b/GameContent/UI/States/UIGamepadHelper.cs new file mode 100644 index 0000000..e44b00c --- /dev/null +++ b/GameContent/UI/States/UIGamepadHelper.cs @@ -0,0 +1,237 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UIGamepadHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using Terraria.GameInput; +using Terraria.UI; +using Terraria.UI.Gamepad; + +namespace Terraria.GameContent.UI.States +{ + [StructLayout(LayoutKind.Sequential, Size = 1)] + public struct UIGamepadHelper + { + public UILinkPoint[,] CreateUILinkPointGrid( + ref int currentID, + List pointsForGrid, + int pointsPerLine, + UILinkPoint topLinkPoint, + UILinkPoint leftLinkPoint) + { + int length = (int) Math.Ceiling((double) pointsForGrid.Count / (double) pointsPerLine); + UILinkPoint[,] uiLinkPointArray = new UILinkPoint[pointsPerLine, length]; + for (int index1 = 0; index1 < pointsForGrid.Count; ++index1) + { + int index2 = index1 % pointsPerLine; + int index3 = index1 / pointsPerLine; + uiLinkPointArray[index2, index3] = this.MakeLinkPointFromSnapPoint(currentID++, pointsForGrid[index1]); + } + for (int index4 = 0; index4 < uiLinkPointArray.GetLength(0); ++index4) + { + for (int index5 = 0; index5 < uiLinkPointArray.GetLength(1); ++index5) + { + UILinkPoint uiLinkPoint = uiLinkPointArray[index4, index5]; + if (uiLinkPoint != null) + { + if (index4 < uiLinkPointArray.GetLength(0) - 1) + { + UILinkPoint rightSide = uiLinkPointArray[index4 + 1, index5]; + if (rightSide != null) + this.PairLeftRight(uiLinkPoint, rightSide); + } + if (index5 < uiLinkPointArray.GetLength(1) - 1) + { + UILinkPoint downSide = uiLinkPointArray[index4, index5 + 1]; + if (downSide != null) + this.PairUpDown(uiLinkPoint, downSide); + } + if (index4 == 0) + uiLinkPoint.Left = leftLinkPoint.ID; + if (index5 == 0) + uiLinkPoint.Up = topLinkPoint.ID; + } + } + } + return uiLinkPointArray; + } + + public void LinkVerticalStrips( + UILinkPoint[] stripOnLeft, + UILinkPoint[] stripOnRight, + int leftStripStartOffset) + { + if (stripOnLeft == null || stripOnRight == null) + return; + int num1 = Math.Max(stripOnLeft.Length, stripOnRight.Length); + int num2 = Math.Min(stripOnLeft.Length, stripOnRight.Length); + for (int index = 0; index < leftStripStartOffset; ++index) + this.PairLeftRight(stripOnLeft[index], stripOnRight[0]); + for (int index = 0; index < num2; ++index) + this.PairLeftRight(stripOnLeft[index + leftStripStartOffset], stripOnRight[index]); + for (int index = num2; index < num1; ++index) + { + if (stripOnLeft.Length > index) + stripOnLeft[index].Right = stripOnRight[stripOnRight.Length - 1].ID; + if (stripOnRight.Length > index) + stripOnRight[index].Left = stripOnLeft[stripOnLeft.Length - 1].ID; + } + } + + public void LinkVerticalStripRightSideToSingle(UILinkPoint[] strip, UILinkPoint theSingle) + { + if (strip == null || theSingle == null) + return; + int num1 = Math.Max(strip.Length, 1); + int num2 = Math.Min(strip.Length, 1); + for (int index = 0; index < num2; ++index) + this.PairLeftRight(strip[index], theSingle); + for (int index = num2; index < num1; ++index) + { + if (strip.Length > index) + strip[index].Right = theSingle.ID; + } + } + + public void LinkVerticalStripBottomSideToSingle(UILinkPoint[] strip, UILinkPoint theSingle) + { + if (strip == null || theSingle == null) + return; + this.PairUpDown(strip[strip.Length - 1], theSingle); + } + + public UILinkPoint[] CreateUILinkStripVertical( + ref int currentID, + List currentStrip) + { + UILinkPoint[] uiLinkPointArray = new UILinkPoint[currentStrip.Count]; + for (int index = 0; index < currentStrip.Count; ++index) + uiLinkPointArray[index] = this.MakeLinkPointFromSnapPoint(currentID++, currentStrip[index]); + for (int index = 0; index < currentStrip.Count - 1; ++index) + this.PairUpDown(uiLinkPointArray[index], uiLinkPointArray[index + 1]); + return uiLinkPointArray; + } + + public UILinkPoint[] CreateUILinkStripHorizontal( + ref int currentID, + List currentStrip) + { + UILinkPoint[] uiLinkPointArray = new UILinkPoint[currentStrip.Count]; + for (int index = 0; index < currentStrip.Count; ++index) + uiLinkPointArray[index] = this.MakeLinkPointFromSnapPoint(currentID++, currentStrip[index]); + for (int index = 0; index < currentStrip.Count - 1; ++index) + this.PairLeftRight(uiLinkPointArray[index], uiLinkPointArray[index + 1]); + return uiLinkPointArray; + } + + public void TryMovingBackIntoCreativeGridIfOutOfIt(int start, int currentID) + { + List lostrefpoints = new List(); + for (int key = start; key < currentID; ++key) + lostrefpoints.Add(UILinkPointNavigator.Points[key]); + if (!PlayerInput.UsingGamepadUI || UILinkPointNavigator.CurrentPoint < currentID) + return; + this.MoveToVisuallyClosestPoint(lostrefpoints); + } + + public void MoveToVisuallyClosestPoint(List lostrefpoints) + { + Dictionary points = UILinkPointNavigator.Points; + Vector2 mouseScreen = Main.MouseScreen; + UILinkPoint uiLinkPoint = (UILinkPoint) null; + foreach (UILinkPoint lostrefpoint in lostrefpoints) + { + if (uiLinkPoint == null || (double) Vector2.Distance(mouseScreen, uiLinkPoint.Position) > (double) Vector2.Distance(mouseScreen, lostrefpoint.Position)) + uiLinkPoint = lostrefpoint; + } + if (uiLinkPoint == null) + return; + UILinkPointNavigator.ChangePoint(uiLinkPoint.ID); + } + + public List GetOrderedPointsByCategoryName( + List pts, + string name) + { + return pts.Where((Func) (x => x.Name == name)).OrderBy((Func) (x => x.Id)).ToList(); + } + + public void PairLeftRight(UILinkPoint leftSide, UILinkPoint rightSide) + { + leftSide.Right = rightSide.ID; + rightSide.Left = leftSide.ID; + } + + public void PairUpDown(UILinkPoint upSide, UILinkPoint downSide) + { + upSide.Down = downSide.ID; + downSide.Up = upSide.ID; + } + + public UILinkPoint MakeLinkPointFromSnapPoint(int id, SnapPoint snap) + { + UILinkPointNavigator.SetPosition(id, snap.Position); + UILinkPoint point = UILinkPointNavigator.Points[id]; + point.Unlink(); + return point; + } + + public UILinkPoint[] GetVerticalStripFromCategoryName( + ref int currentID, + List pts, + string categoryName) + { + List pointsByCategoryName = this.GetOrderedPointsByCategoryName(pts, categoryName); + UILinkPoint[] uiLinkPointArray = (UILinkPoint[]) null; + if (pointsByCategoryName.Count > 0) + uiLinkPointArray = this.CreateUILinkStripVertical(ref currentID, pointsByCategoryName); + return uiLinkPointArray; + } + + public void MoveToVisuallyClosestPoint(int idRangeStartInclusive, int idRangeEndExclusive) + { + if (UILinkPointNavigator.CurrentPoint >= idRangeStartInclusive && UILinkPointNavigator.CurrentPoint < idRangeEndExclusive) + return; + Dictionary points = UILinkPointNavigator.Points; + Vector2 mouseScreen = Main.MouseScreen; + UILinkPoint uiLinkPoint1 = (UILinkPoint) null; + for (int key = idRangeStartInclusive; key < idRangeEndExclusive; ++key) + { + UILinkPoint uiLinkPoint2; + if (!points.TryGetValue(key, out uiLinkPoint2)) + return; + if (uiLinkPoint1 == null || (double) Vector2.Distance(mouseScreen, uiLinkPoint1.Position) > (double) Vector2.Distance(mouseScreen, uiLinkPoint2.Position)) + uiLinkPoint1 = uiLinkPoint2; + } + if (uiLinkPoint1 == null) + return; + UILinkPointNavigator.ChangePoint(uiLinkPoint1.ID); + } + + public void CullPointsOutOfElementArea( + SpriteBatch spriteBatch, + List pointsAtMiddle, + UIElement container) + { + float num = 1f / Main.UIScale; + Rectangle clippingRectangle = container.GetClippingRectangle(spriteBatch); + Vector2 minimum = clippingRectangle.TopLeft() * num; + Vector2 maximum = clippingRectangle.BottomRight() * num; + for (int index = 0; index < pointsAtMiddle.Count; ++index) + { + if (!pointsAtMiddle[index].Position.Between(minimum, maximum)) + { + pointsAtMiddle.Remove(pointsAtMiddle[index]); + --index; + } + } + } + } +} diff --git a/GameContent/UI/States/UIManageControls.cs b/GameContent/UI/States/UIManageControls.cs new file mode 100644 index 0000000..99382dc --- /dev/null +++ b/GameContent/UI/States/UIManageControls.cs @@ -0,0 +1,1078 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UIManageControls +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Input; +using ReLogic.Content; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.Audio; +using Terraria.GameContent.UI.Elements; +using Terraria.GameInput; +using Terraria.ID; +using Terraria.Initializers; +using Terraria.Localization; +using Terraria.UI; +using Terraria.UI.Gamepad; + +namespace Terraria.GameContent.UI.States +{ + public class UIManageControls : UIState + { + public static int ForceMoveTo = -1; + private const float PanelTextureHeight = 30f; + private static List _BindingsFullLine = new List() + { + "Throw", + "Inventory", + "RadialHotbar", + "RadialQuickbar", + "LockOn", + "ToggleCreativeMenu", + "sp3", + "sp4", + "sp5", + "sp6", + "sp7", + "sp8", + "sp18", + "sp19", + "sp9", + "sp10", + "sp11", + "sp12", + "sp13" + }; + private static List _BindingsHalfSingleLine = new List() + { + "sp9", + "sp10", + "sp11", + "sp12", + "sp13" + }; + private bool OnKeyboard = true; + private bool OnGameplay = true; + private List _bindsKeyboard = new List(); + private List _bindsGamepad = new List(); + private List _bindsKeyboardUI = new List(); + private List _bindsGamepadUI = new List(); + private UIElement _outerContainer; + private UIList _uilist; + private UIImageFramed _buttonKeyboard; + private UIImageFramed _buttonGamepad; + private UIImageFramed _buttonBorder1; + private UIImageFramed _buttonBorder2; + private UIKeybindingSimpleListItem _buttonProfile; + private UIElement _buttonBack; + private UIImageFramed _buttonVs1; + private UIImageFramed _buttonVs2; + private UIImageFramed _buttonBorderVs1; + private UIImageFramed _buttonBorderVs2; + private Asset _KeyboardGamepadTexture; + private Asset _keyboardGamepadBorderTexture; + private Asset _GameplayVsUITexture; + private Asset _GameplayVsUIBorderTexture; + private static int SnapPointIndex; + + public override void OnInitialize() + { + this._KeyboardGamepadTexture = Main.Assets.Request("Images/UI/Settings_Inputs", (AssetRequestMode) 1); + this._keyboardGamepadBorderTexture = Main.Assets.Request("Images/UI/Settings_Inputs_Border", (AssetRequestMode) 1); + this._GameplayVsUITexture = Main.Assets.Request("Images/UI/Settings_Inputs_2", (AssetRequestMode) 1); + this._GameplayVsUIBorderTexture = Main.Assets.Request("Images/UI/Settings_Inputs_2_Border", (AssetRequestMode) 1); + UIElement element = new UIElement(); + element.Width.Set(0.0f, 0.8f); + element.MaxWidth.Set(600f, 0.0f); + element.Top.Set(220f, 0.0f); + element.Height.Set(-200f, 1f); + element.HAlign = 0.5f; + this._outerContainer = element; + UIPanel uiPanel = new UIPanel(); + uiPanel.Width.Set(0.0f, 1f); + uiPanel.Height.Set(-110f, 1f); + uiPanel.BackgroundColor = new Color(33, 43, 79) * 0.8f; + element.Append((UIElement) uiPanel); + this._buttonKeyboard = new UIImageFramed(this._KeyboardGamepadTexture, this._KeyboardGamepadTexture.Frame(2, 2)); + this._buttonKeyboard.VAlign = 0.0f; + this._buttonKeyboard.HAlign = 0.0f; + this._buttonKeyboard.Left.Set(0.0f, 0.0f); + this._buttonKeyboard.Top.Set(8f, 0.0f); + this._buttonKeyboard.OnClick += new UIElement.MouseEvent(this.KeyboardButtonClick); + this._buttonKeyboard.OnMouseOver += new UIElement.MouseEvent(this.ManageBorderKeyboardOn); + this._buttonKeyboard.OnMouseOut += new UIElement.MouseEvent(this.ManageBorderKeyboardOff); + uiPanel.Append((UIElement) this._buttonKeyboard); + this._buttonGamepad = new UIImageFramed(this._KeyboardGamepadTexture, this._KeyboardGamepadTexture.Frame(2, 2, 1, 1)); + this._buttonGamepad.VAlign = 0.0f; + this._buttonGamepad.HAlign = 0.0f; + this._buttonGamepad.Left.Set(76f, 0.0f); + this._buttonGamepad.Top.Set(8f, 0.0f); + this._buttonGamepad.OnClick += new UIElement.MouseEvent(this.GamepadButtonClick); + this._buttonGamepad.OnMouseOver += new UIElement.MouseEvent(this.ManageBorderGamepadOn); + this._buttonGamepad.OnMouseOut += new UIElement.MouseEvent(this.ManageBorderGamepadOff); + uiPanel.Append((UIElement) this._buttonGamepad); + this._buttonBorder1 = new UIImageFramed(this._keyboardGamepadBorderTexture, this._keyboardGamepadBorderTexture.Frame()); + this._buttonBorder1.VAlign = 0.0f; + this._buttonBorder1.HAlign = 0.0f; + this._buttonBorder1.Left.Set(0.0f, 0.0f); + this._buttonBorder1.Top.Set(8f, 0.0f); + this._buttonBorder1.Color = Color.Silver; + this._buttonBorder1.IgnoresMouseInteraction = true; + uiPanel.Append((UIElement) this._buttonBorder1); + this._buttonBorder2 = new UIImageFramed(this._keyboardGamepadBorderTexture, this._keyboardGamepadBorderTexture.Frame()); + this._buttonBorder2.VAlign = 0.0f; + this._buttonBorder2.HAlign = 0.0f; + this._buttonBorder2.Left.Set(76f, 0.0f); + this._buttonBorder2.Top.Set(8f, 0.0f); + this._buttonBorder2.Color = Color.Transparent; + this._buttonBorder2.IgnoresMouseInteraction = true; + uiPanel.Append((UIElement) this._buttonBorder2); + this._buttonVs1 = new UIImageFramed(this._GameplayVsUITexture, this._GameplayVsUITexture.Frame(2, 2)); + this._buttonVs1.VAlign = 0.0f; + this._buttonVs1.HAlign = 0.0f; + this._buttonVs1.Left.Set(172f, 0.0f); + this._buttonVs1.Top.Set(8f, 0.0f); + this._buttonVs1.OnClick += new UIElement.MouseEvent(this.VsGameplayButtonClick); + this._buttonVs1.OnMouseOver += new UIElement.MouseEvent(this.ManageBorderGameplayOn); + this._buttonVs1.OnMouseOut += new UIElement.MouseEvent(this.ManageBorderGameplayOff); + uiPanel.Append((UIElement) this._buttonVs1); + this._buttonVs2 = new UIImageFramed(this._GameplayVsUITexture, this._GameplayVsUITexture.Frame(2, 2, 1, 1)); + this._buttonVs2.VAlign = 0.0f; + this._buttonVs2.HAlign = 0.0f; + this._buttonVs2.Left.Set(212f, 0.0f); + this._buttonVs2.Top.Set(8f, 0.0f); + this._buttonVs2.OnClick += new UIElement.MouseEvent(this.VsMenuButtonClick); + this._buttonVs2.OnMouseOver += new UIElement.MouseEvent(this.ManageBorderMenuOn); + this._buttonVs2.OnMouseOut += new UIElement.MouseEvent(this.ManageBorderMenuOff); + uiPanel.Append((UIElement) this._buttonVs2); + this._buttonBorderVs1 = new UIImageFramed(this._GameplayVsUIBorderTexture, this._GameplayVsUIBorderTexture.Frame()); + this._buttonBorderVs1.VAlign = 0.0f; + this._buttonBorderVs1.HAlign = 0.0f; + this._buttonBorderVs1.Left.Set(172f, 0.0f); + this._buttonBorderVs1.Top.Set(8f, 0.0f); + this._buttonBorderVs1.Color = Color.Silver; + this._buttonBorderVs1.IgnoresMouseInteraction = true; + uiPanel.Append((UIElement) this._buttonBorderVs1); + this._buttonBorderVs2 = new UIImageFramed(this._GameplayVsUIBorderTexture, this._GameplayVsUIBorderTexture.Frame()); + this._buttonBorderVs2.VAlign = 0.0f; + this._buttonBorderVs2.HAlign = 0.0f; + this._buttonBorderVs2.Left.Set(212f, 0.0f); + this._buttonBorderVs2.Top.Set(8f, 0.0f); + this._buttonBorderVs2.Color = Color.Transparent; + this._buttonBorderVs2.IgnoresMouseInteraction = true; + uiPanel.Append((UIElement) this._buttonBorderVs2); + this._buttonProfile = new UIKeybindingSimpleListItem((Func) (() => PlayerInput.CurrentProfile.ShowName), new Color(73, 94, 171, (int) byte.MaxValue) * 0.9f); + this._buttonProfile.VAlign = 0.0f; + this._buttonProfile.HAlign = 1f; + this._buttonProfile.Width.Set(180f, 0.0f); + this._buttonProfile.Height.Set(30f, 0.0f); + this._buttonProfile.MarginRight = 30f; + this._buttonProfile.Left.Set(0.0f, 0.0f); + this._buttonProfile.Top.Set(8f, 0.0f); + this._buttonProfile.OnClick += new UIElement.MouseEvent(this.profileButtonClick); + uiPanel.Append((UIElement) this._buttonProfile); + this._uilist = new UIList(); + this._uilist.Width.Set(-25f, 1f); + this._uilist.Height.Set(-50f, 1f); + this._uilist.VAlign = 1f; + this._uilist.PaddingBottom = 5f; + this._uilist.ListPadding = 20f; + uiPanel.Append((UIElement) this._uilist); + this.AssembleBindPanels(); + this.FillList(); + UIScrollbar scrollbar = new UIScrollbar(); + scrollbar.SetView(100f, 1000f); + scrollbar.Height.Set(-67f, 1f); + scrollbar.HAlign = 1f; + scrollbar.VAlign = 1f; + scrollbar.MarginBottom = 11f; + uiPanel.Append((UIElement) scrollbar); + this._uilist.SetScrollbar(scrollbar); + UITextPanel uiTextPanel1 = new UITextPanel(Language.GetText("UI.Keybindings"), 0.7f, true); + uiTextPanel1.HAlign = 0.5f; + uiTextPanel1.Top.Set(-45f, 0.0f); + uiTextPanel1.Left.Set(-10f, 0.0f); + uiTextPanel1.SetPadding(15f); + uiTextPanel1.BackgroundColor = new Color(73, 94, 171); + element.Append((UIElement) uiTextPanel1); + UITextPanel uiTextPanel2 = new UITextPanel(Language.GetText("UI.Back"), 0.7f, true); + uiTextPanel2.Width.Set(-10f, 0.5f); + uiTextPanel2.Height.Set(50f, 0.0f); + uiTextPanel2.VAlign = 1f; + uiTextPanel2.HAlign = 0.5f; + uiTextPanel2.Top.Set(-45f, 0.0f); + uiTextPanel2.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver); + uiTextPanel2.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut); + uiTextPanel2.OnClick += new UIElement.MouseEvent(this.GoBackClick); + element.Append((UIElement) uiTextPanel2); + this._buttonBack = (UIElement) uiTextPanel2; + this.Append(element); + } + + private void AssembleBindPanels() + { + List bindings1 = new List() + { + "MouseLeft", + "MouseRight", + "Up", + "Down", + "Left", + "Right", + "Jump", + "Grapple", + "SmartSelect", + "SmartCursor", + "QuickMount", + "QuickHeal", + "QuickMana", + "QuickBuff", + "Throw", + "Inventory", + "ToggleCreativeMenu", + "ViewZoomIn", + "ViewZoomOut", + "sp9" + }; + List bindings2 = new List() + { + "MouseLeft", + "MouseRight", + "Up", + "Down", + "Left", + "Right", + "Jump", + "Grapple", + "SmartSelect", + "SmartCursor", + "QuickMount", + "QuickHeal", + "QuickMana", + "QuickBuff", + "LockOn", + "Throw", + "Inventory", + "sp9" + }; + List bindings3 = new List() + { + "HotbarMinus", + "HotbarPlus", + "Hotbar1", + "Hotbar2", + "Hotbar3", + "Hotbar4", + "Hotbar5", + "Hotbar6", + "Hotbar7", + "Hotbar8", + "Hotbar9", + "Hotbar10", + "sp10" + }; + List bindings4 = new List() + { + "MapZoomIn", + "MapZoomOut", + "MapAlphaUp", + "MapAlphaDown", + "MapFull", + "MapStyle", + "sp11" + }; + List bindings5 = new List() + { + "sp1", + "sp2", + "RadialHotbar", + "RadialQuickbar", + "sp12" + }; + List bindings6 = new List() + { + "sp3", + "sp4", + "sp5", + "sp6", + "sp7", + "sp8", + "sp14", + "sp15", + "sp16", + "sp17", + "sp18", + "sp19", + "sp13" + }; + InputMode currentInputMode1 = InputMode.Keyboard; + this._bindsKeyboard.Add((UIElement) this.CreateBindingGroup(0, bindings1, currentInputMode1)); + this._bindsKeyboard.Add((UIElement) this.CreateBindingGroup(1, bindings4, currentInputMode1)); + this._bindsKeyboard.Add((UIElement) this.CreateBindingGroup(2, bindings3, currentInputMode1)); + InputMode currentInputMode2 = InputMode.XBoxGamepad; + this._bindsGamepad.Add((UIElement) this.CreateBindingGroup(0, bindings2, currentInputMode2)); + this._bindsGamepad.Add((UIElement) this.CreateBindingGroup(1, bindings4, currentInputMode2)); + this._bindsGamepad.Add((UIElement) this.CreateBindingGroup(2, bindings3, currentInputMode2)); + this._bindsGamepad.Add((UIElement) this.CreateBindingGroup(3, bindings5, currentInputMode2)); + this._bindsGamepad.Add((UIElement) this.CreateBindingGroup(4, bindings6, currentInputMode2)); + InputMode currentInputMode3 = InputMode.KeyboardUI; + this._bindsKeyboardUI.Add((UIElement) this.CreateBindingGroup(0, bindings1, currentInputMode3)); + this._bindsKeyboardUI.Add((UIElement) this.CreateBindingGroup(1, bindings4, currentInputMode3)); + this._bindsKeyboardUI.Add((UIElement) this.CreateBindingGroup(2, bindings3, currentInputMode3)); + InputMode currentInputMode4 = InputMode.XBoxGamepadUI; + this._bindsGamepadUI.Add((UIElement) this.CreateBindingGroup(0, bindings2, currentInputMode4)); + this._bindsGamepadUI.Add((UIElement) this.CreateBindingGroup(1, bindings4, currentInputMode4)); + this._bindsGamepadUI.Add((UIElement) this.CreateBindingGroup(2, bindings3, currentInputMode4)); + this._bindsGamepadUI.Add((UIElement) this.CreateBindingGroup(3, bindings5, currentInputMode4)); + this._bindsGamepadUI.Add((UIElement) this.CreateBindingGroup(4, bindings6, currentInputMode4)); + } + + private UISortableElement CreateBindingGroup( + int elementIndex, + List bindings, + InputMode currentInputMode) + { + UISortableElement uiSortableElement = new UISortableElement(elementIndex); + uiSortableElement.HAlign = 0.5f; + uiSortableElement.Width.Set(0.0f, 1f); + uiSortableElement.Height.Set(2000f, 0.0f); + UIPanel uiPanel = new UIPanel(); + uiPanel.Width.Set(0.0f, 1f); + uiPanel.Height.Set(-16f, 1f); + uiPanel.VAlign = 1f; + uiPanel.BackgroundColor = new Color(33, 43, 79) * 0.8f; + uiSortableElement.Append((UIElement) uiPanel); + UIList parent = new UIList(); + parent.OverflowHidden = false; + parent.Width.Set(0.0f, 1f); + parent.Height.Set(-8f, 1f); + parent.VAlign = 1f; + parent.ListPadding = 5f; + uiPanel.Append((UIElement) parent); + Color backgroundColor = uiPanel.BackgroundColor; + switch (elementIndex) + { + case 0: + uiPanel.BackgroundColor = Color.Lerp(uiPanel.BackgroundColor, Color.Green, 0.18f); + break; + case 1: + uiPanel.BackgroundColor = Color.Lerp(uiPanel.BackgroundColor, Color.Goldenrod, 0.18f); + break; + case 2: + uiPanel.BackgroundColor = Color.Lerp(uiPanel.BackgroundColor, Color.HotPink, 0.18f); + break; + case 3: + uiPanel.BackgroundColor = Color.Lerp(uiPanel.BackgroundColor, Color.Indigo, 0.18f); + break; + case 4: + uiPanel.BackgroundColor = Color.Lerp(uiPanel.BackgroundColor, Color.Turquoise, 0.18f); + break; + } + this.CreateElementGroup(parent, bindings, currentInputMode, uiPanel.BackgroundColor); + uiPanel.BackgroundColor = uiPanel.BackgroundColor.MultiplyRGBA(new Color(111, 111, 111)); + LocalizedText text = LocalizedText.Empty; + switch (elementIndex) + { + case 0: + text = currentInputMode == InputMode.Keyboard || currentInputMode == InputMode.XBoxGamepad ? Lang.menu[164] : Lang.menu[243]; + break; + case 1: + text = Lang.menu[165]; + break; + case 2: + text = Lang.menu[166]; + break; + case 3: + text = Lang.menu[167]; + break; + case 4: + text = Lang.menu[198]; + break; + } + UITextPanel uiTextPanel1 = new UITextPanel(text, 0.7f); + uiTextPanel1.VAlign = 0.0f; + uiTextPanel1.HAlign = 0.5f; + UITextPanel uiTextPanel2 = uiTextPanel1; + uiSortableElement.Append((UIElement) uiTextPanel2); + uiSortableElement.Recalculate(); + float totalHeight = parent.GetTotalHeight(); + uiSortableElement.Width.Set(0.0f, 1f); + uiSortableElement.Height.Set((float) ((double) totalHeight + 30.0 + 16.0), 0.0f); + return uiSortableElement; + } + + private void CreateElementGroup( + UIList parent, + List bindings, + InputMode currentInputMode, + Color color) + { + for (int index = 0; index < bindings.Count; ++index) + { + string binding = bindings[index]; + UISortableElement uiSortableElement = new UISortableElement(index); + uiSortableElement.Width.Set(0.0f, 1f); + uiSortableElement.Height.Set(30f, 0.0f); + uiSortableElement.HAlign = 0.5f; + parent.Add((UIElement) uiSortableElement); + if (UIManageControls._BindingsHalfSingleLine.Contains(bindings[index])) + { + UIElement panel = this.CreatePanel(bindings[index], currentInputMode, color); + panel.Width.Set(0.0f, 0.5f); + panel.HAlign = 0.5f; + panel.Height.Set(0.0f, 1f); + panel.SetSnapPoint("Wide", UIManageControls.SnapPointIndex++); + uiSortableElement.Append(panel); + } + else if (UIManageControls._BindingsFullLine.Contains(bindings[index])) + { + UIElement panel = this.CreatePanel(bindings[index], currentInputMode, color); + panel.Width.Set(0.0f, 1f); + panel.Height.Set(0.0f, 1f); + panel.SetSnapPoint("Wide", UIManageControls.SnapPointIndex++); + uiSortableElement.Append(panel); + } + else + { + UIElement panel1 = this.CreatePanel(bindings[index], currentInputMode, color); + panel1.Width.Set(-5f, 0.5f); + panel1.Height.Set(0.0f, 1f); + panel1.SetSnapPoint("Thin", UIManageControls.SnapPointIndex++); + uiSortableElement.Append(panel1); + ++index; + if (index < bindings.Count) + { + UIElement panel2 = this.CreatePanel(bindings[index], currentInputMode, color); + panel2.Width.Set(-5f, 0.5f); + panel2.Height.Set(0.0f, 1f); + panel2.HAlign = 1f; + panel2.SetSnapPoint("Thin", UIManageControls.SnapPointIndex++); + uiSortableElement.Append(panel2); + } + } + } + } + + public UIElement CreatePanel(string bind, InputMode currentInputMode, Color color) + { + switch (bind) + { + case "sp1": + UIKeybindingToggleListItem keybindingToggleListItem1 = new UIKeybindingToggleListItem((Func) (() => Lang.menu[196].Value), (Func) (() => PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadSnap1"].Contains(Buttons.DPadUp.ToString()) && PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadSnap2"].Contains(Buttons.DPadRight.ToString()) && PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadSnap3"].Contains(Buttons.DPadDown.ToString()) && PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadSnap4"].Contains(Buttons.DPadLeft.ToString()) && PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadSnap1"].Contains(Buttons.DPadUp.ToString()) && PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadSnap2"].Contains(Buttons.DPadRight.ToString()) && PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadSnap3"].Contains(Buttons.DPadDown.ToString()) && PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadSnap4"].Contains(Buttons.DPadLeft.ToString())), color); + keybindingToggleListItem1.OnClick += new UIElement.MouseEvent(this.SnapButtonClick); + return (UIElement) keybindingToggleListItem1; + case "sp10": + UIKeybindingSimpleListItem keybindingSimpleListItem1 = new UIKeybindingSimpleListItem((Func) (() => Lang.menu[86].Value), color); + keybindingSimpleListItem1.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + string copyableProfileName = UIManageControls.GetCopyableProfileName(); + PlayerInput.CurrentProfile.CopyHotbarSettingsFrom(PlayerInput.OriginalProfiles[copyableProfileName], currentInputMode); + }); + return (UIElement) keybindingSimpleListItem1; + case "sp11": + UIKeybindingSimpleListItem keybindingSimpleListItem2 = new UIKeybindingSimpleListItem((Func) (() => Lang.menu[86].Value), color); + keybindingSimpleListItem2.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + string copyableProfileName = UIManageControls.GetCopyableProfileName(); + PlayerInput.CurrentProfile.CopyMapSettingsFrom(PlayerInput.OriginalProfiles[copyableProfileName], currentInputMode); + }); + return (UIElement) keybindingSimpleListItem2; + case "sp12": + UIKeybindingSimpleListItem keybindingSimpleListItem3 = new UIKeybindingSimpleListItem((Func) (() => Lang.menu[86].Value), color); + keybindingSimpleListItem3.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + string copyableProfileName = UIManageControls.GetCopyableProfileName(); + PlayerInput.CurrentProfile.CopyGamepadSettingsFrom(PlayerInput.OriginalProfiles[copyableProfileName], currentInputMode); + }); + return (UIElement) keybindingSimpleListItem3; + case "sp13": + UIKeybindingSimpleListItem keybindingSimpleListItem4 = new UIKeybindingSimpleListItem((Func) (() => Lang.menu[86].Value), color); + keybindingSimpleListItem4.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + string copyableProfileName = UIManageControls.GetCopyableProfileName(); + PlayerInput.CurrentProfile.CopyGamepadAdvancedSettingsFrom(PlayerInput.OriginalProfiles[copyableProfileName], currentInputMode); + }); + return (UIElement) keybindingSimpleListItem4; + case "sp14": + UIKeybindingToggleListItem keybindingToggleListItem2 = new UIKeybindingToggleListItem((Func) (() => Lang.menu[205].Value), (Func) (() => PlayerInput.CurrentProfile.LeftThumbstickInvertX), color); + keybindingToggleListItem2.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + if (!PlayerInput.CurrentProfile.AllowEditting) + return; + PlayerInput.CurrentProfile.LeftThumbstickInvertX = !PlayerInput.CurrentProfile.LeftThumbstickInvertX; + }); + return (UIElement) keybindingToggleListItem2; + case "sp15": + UIKeybindingToggleListItem keybindingToggleListItem3 = new UIKeybindingToggleListItem((Func) (() => Lang.menu[206].Value), (Func) (() => PlayerInput.CurrentProfile.LeftThumbstickInvertY), color); + keybindingToggleListItem3.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + if (!PlayerInput.CurrentProfile.AllowEditting) + return; + PlayerInput.CurrentProfile.LeftThumbstickInvertY = !PlayerInput.CurrentProfile.LeftThumbstickInvertY; + }); + return (UIElement) keybindingToggleListItem3; + case "sp16": + UIKeybindingToggleListItem keybindingToggleListItem4 = new UIKeybindingToggleListItem((Func) (() => Lang.menu[207].Value), (Func) (() => PlayerInput.CurrentProfile.RightThumbstickInvertX), color); + keybindingToggleListItem4.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + if (!PlayerInput.CurrentProfile.AllowEditting) + return; + PlayerInput.CurrentProfile.RightThumbstickInvertX = !PlayerInput.CurrentProfile.RightThumbstickInvertX; + }); + return (UIElement) keybindingToggleListItem4; + case "sp17": + UIKeybindingToggleListItem keybindingToggleListItem5 = new UIKeybindingToggleListItem((Func) (() => Lang.menu[208].Value), (Func) (() => PlayerInput.CurrentProfile.RightThumbstickInvertY), color); + keybindingToggleListItem5.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + if (!PlayerInput.CurrentProfile.AllowEditting) + return; + PlayerInput.CurrentProfile.RightThumbstickInvertY = !PlayerInput.CurrentProfile.RightThumbstickInvertY; + }); + return (UIElement) keybindingToggleListItem5; + case "sp18": + return (UIElement) new UIKeybindingSliderItem((Func) (() => + { + int holdTimeRequired = PlayerInput.CurrentProfile.HotbarRadialHoldTimeRequired; + return holdTimeRequired == -1 ? Lang.menu[228].Value : Lang.menu[227].Value + " (" + ((float) holdTimeRequired / 60f).ToString("F2") + "s)"; + }), (Func) (() => PlayerInput.CurrentProfile.HotbarRadialHoldTimeRequired == -1 ? 1f : (float) PlayerInput.CurrentProfile.HotbarRadialHoldTimeRequired / 301f), (Action) (f => + { + PlayerInput.CurrentProfile.HotbarRadialHoldTimeRequired = (int) ((double) f * 301.0); + if ((double) PlayerInput.CurrentProfile.HotbarRadialHoldTimeRequired != 301.0) + return; + PlayerInput.CurrentProfile.HotbarRadialHoldTimeRequired = -1; + }), (Action) (() => + { + PlayerInput.CurrentProfile.HotbarRadialHoldTimeRequired = (int) ((double) UILinksInitializer.HandleSliderHorizontalInput(PlayerInput.CurrentProfile.HotbarRadialHoldTimeRequired == -1 ? 1f : (float) PlayerInput.CurrentProfile.HotbarRadialHoldTimeRequired / 301f, 0.0f, 1f, PlayerInput.CurrentProfile.InterfaceDeadzoneX) * 301.0); + if ((double) PlayerInput.CurrentProfile.HotbarRadialHoldTimeRequired != 301.0) + return; + PlayerInput.CurrentProfile.HotbarRadialHoldTimeRequired = -1; + }), 1007, color); + case "sp19": + return (UIElement) new UIKeybindingSliderItem((Func) (() => + { + int inventoryMoveCd = PlayerInput.CurrentProfile.InventoryMoveCD; + return Lang.menu[252].Value + " (" + ((float) inventoryMoveCd / 60f).ToString("F2") + "s)"; + }), (Func) (() => Utils.GetLerpValue(4f, 12f, (float) PlayerInput.CurrentProfile.InventoryMoveCD, true)), (Action) (f => PlayerInput.CurrentProfile.InventoryMoveCD = (int) Math.Round((double) MathHelper.Lerp(4f, 12f, f))), (Action) (() => + { + if (UILinkPointNavigator.Shortcuts.INV_MOVE_OPTION_CD > 0) + --UILinkPointNavigator.Shortcuts.INV_MOVE_OPTION_CD; + if (UILinkPointNavigator.Shortcuts.INV_MOVE_OPTION_CD != 0) + return; + float lerpValue = Utils.GetLerpValue(4f, 12f, (float) PlayerInput.CurrentProfile.InventoryMoveCD, true); + float num = UILinksInitializer.HandleSliderHorizontalInput(lerpValue, 0.0f, 1f, PlayerInput.CurrentProfile.InterfaceDeadzoneX); + if ((double) lerpValue == (double) num) + return; + UILinkPointNavigator.Shortcuts.INV_MOVE_OPTION_CD = 8; + PlayerInput.CurrentProfile.InventoryMoveCD = (int) MathHelper.Clamp((float) (PlayerInput.CurrentProfile.InventoryMoveCD + Math.Sign(num - lerpValue)), 4f, 12f); + }), 1008, color); + case "sp2": + UIKeybindingToggleListItem keybindingToggleListItem6 = new UIKeybindingToggleListItem((Func) (() => Lang.menu[197].Value), (Func) (() => PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadRadial1"].Contains(Buttons.DPadUp.ToString()) && PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadRadial2"].Contains(Buttons.DPadRight.ToString()) && PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadRadial3"].Contains(Buttons.DPadDown.ToString()) && PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadRadial4"].Contains(Buttons.DPadLeft.ToString()) && PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadRadial1"].Contains(Buttons.DPadUp.ToString()) && PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadRadial2"].Contains(Buttons.DPadRight.ToString()) && PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadRadial3"].Contains(Buttons.DPadDown.ToString()) && PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadRadial4"].Contains(Buttons.DPadLeft.ToString())), color); + keybindingToggleListItem6.OnClick += new UIElement.MouseEvent(this.RadialButtonClick); + return (UIElement) keybindingToggleListItem6; + case "sp3": + return (UIElement) new UIKeybindingSliderItem((Func) (() => Lang.menu[199].Value + " (" + PlayerInput.CurrentProfile.TriggersDeadzone.ToString("P1") + ")"), (Func) (() => PlayerInput.CurrentProfile.TriggersDeadzone), (Action) (f => PlayerInput.CurrentProfile.TriggersDeadzone = f), (Action) (() => PlayerInput.CurrentProfile.TriggersDeadzone = UILinksInitializer.HandleSliderHorizontalInput(PlayerInput.CurrentProfile.TriggersDeadzone, 0.0f, 0.95f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.35f)), 1000, color); + case "sp4": + return (UIElement) new UIKeybindingSliderItem((Func) (() => Lang.menu[200].Value + " (" + PlayerInput.CurrentProfile.InterfaceDeadzoneX.ToString("P1") + ")"), (Func) (() => PlayerInput.CurrentProfile.InterfaceDeadzoneX), (Action) (f => PlayerInput.CurrentProfile.InterfaceDeadzoneX = f), (Action) (() => PlayerInput.CurrentProfile.InterfaceDeadzoneX = UILinksInitializer.HandleSliderHorizontalInput(PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.0f, 0.95f, 0.35f, 0.35f)), 1001, color); + case "sp5": + return (UIElement) new UIKeybindingSliderItem((Func) (() => Lang.menu[201].Value + " (" + PlayerInput.CurrentProfile.LeftThumbstickDeadzoneX.ToString("P1") + ")"), (Func) (() => PlayerInput.CurrentProfile.LeftThumbstickDeadzoneX), (Action) (f => PlayerInput.CurrentProfile.LeftThumbstickDeadzoneX = f), (Action) (() => PlayerInput.CurrentProfile.LeftThumbstickDeadzoneX = UILinksInitializer.HandleSliderHorizontalInput(PlayerInput.CurrentProfile.LeftThumbstickDeadzoneX, 0.0f, 0.95f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.35f)), 1002, color); + case "sp6": + return (UIElement) new UIKeybindingSliderItem((Func) (() => Lang.menu[202].Value + " (" + PlayerInput.CurrentProfile.LeftThumbstickDeadzoneY.ToString("P1") + ")"), (Func) (() => PlayerInput.CurrentProfile.LeftThumbstickDeadzoneY), (Action) (f => PlayerInput.CurrentProfile.LeftThumbstickDeadzoneY = f), (Action) (() => PlayerInput.CurrentProfile.LeftThumbstickDeadzoneY = UILinksInitializer.HandleSliderHorizontalInput(PlayerInput.CurrentProfile.LeftThumbstickDeadzoneY, 0.0f, 0.95f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.35f)), 1003, color); + case "sp7": + return (UIElement) new UIKeybindingSliderItem((Func) (() => Lang.menu[203].Value + " (" + PlayerInput.CurrentProfile.RightThumbstickDeadzoneX.ToString("P1") + ")"), (Func) (() => PlayerInput.CurrentProfile.RightThumbstickDeadzoneX), (Action) (f => PlayerInput.CurrentProfile.RightThumbstickDeadzoneX = f), (Action) (() => PlayerInput.CurrentProfile.RightThumbstickDeadzoneX = UILinksInitializer.HandleSliderHorizontalInput(PlayerInput.CurrentProfile.RightThumbstickDeadzoneX, 0.0f, 0.95f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.35f)), 1004, color); + case "sp8": + return (UIElement) new UIKeybindingSliderItem((Func) (() => Lang.menu[204].Value + " (" + PlayerInput.CurrentProfile.RightThumbstickDeadzoneY.ToString("P1") + ")"), (Func) (() => PlayerInput.CurrentProfile.RightThumbstickDeadzoneY), (Action) (f => PlayerInput.CurrentProfile.RightThumbstickDeadzoneY = f), (Action) (() => PlayerInput.CurrentProfile.RightThumbstickDeadzoneY = UILinksInitializer.HandleSliderHorizontalInput(PlayerInput.CurrentProfile.RightThumbstickDeadzoneY, 0.0f, 0.95f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.35f)), 1005, color); + case "sp9": + UIKeybindingSimpleListItem keybindingSimpleListItem5 = new UIKeybindingSimpleListItem((Func) (() => Lang.menu[86].Value), color); + keybindingSimpleListItem5.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + string copyableProfileName = UIManageControls.GetCopyableProfileName(); + PlayerInput.CurrentProfile.CopyGameplaySettingsFrom(PlayerInput.OriginalProfiles[copyableProfileName], currentInputMode); + }); + return (UIElement) keybindingSimpleListItem5; + default: + return (UIElement) new UIKeybindingListItem(bind, currentInputMode, color); + } + } + + public override void OnActivate() + { + if (Main.gameMenu) + { + this._outerContainer.Top.Set(220f, 0.0f); + this._outerContainer.Height.Set(-220f, 1f); + } + else + { + this._outerContainer.Top.Set(120f, 0.0f); + this._outerContainer.Height.Set(-120f, 1f); + } + if (!PlayerInput.UsingGamepadUI) + return; + UILinkPointNavigator.ChangePoint(3002); + } + + private static string GetCopyableProfileName() + { + string str = "Redigit's Pick"; + if (PlayerInput.OriginalProfiles.ContainsKey(PlayerInput.CurrentProfile.Name)) + str = PlayerInput.CurrentProfile.Name; + return str; + } + + private void FillList() + { + List uiElementList = this._bindsKeyboard; + if (!this.OnKeyboard) + uiElementList = this._bindsGamepad; + if (!this.OnGameplay) + uiElementList = this.OnKeyboard ? this._bindsKeyboardUI : this._bindsGamepadUI; + this._uilist.Clear(); + foreach (UIElement uiElement in uiElementList) + this._uilist.Add(uiElement); + } + + private void SnapButtonClick(UIMouseEvent evt, UIElement listeningElement) + { + if (!PlayerInput.CurrentProfile.AllowEditting) + return; + SoundEngine.PlaySound(12); + List keyStatu1 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadSnap1"]; + Buttons buttons = Buttons.DPadUp; + string str1 = buttons.ToString(); + if (keyStatu1.Contains(str1)) + { + List keyStatu2 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadSnap2"]; + buttons = Buttons.DPadRight; + string str2 = buttons.ToString(); + if (keyStatu2.Contains(str2)) + { + List keyStatu3 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadSnap3"]; + buttons = Buttons.DPadDown; + string str3 = buttons.ToString(); + if (keyStatu3.Contains(str3)) + { + List keyStatu4 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadSnap4"]; + buttons = Buttons.DPadLeft; + string str4 = buttons.ToString(); + if (keyStatu4.Contains(str4)) + { + List keyStatu5 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadSnap1"]; + buttons = Buttons.DPadUp; + string str5 = buttons.ToString(); + if (keyStatu5.Contains(str5)) + { + List keyStatu6 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadSnap2"]; + buttons = Buttons.DPadRight; + string str6 = buttons.ToString(); + if (keyStatu6.Contains(str6)) + { + List keyStatu7 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadSnap3"]; + buttons = Buttons.DPadDown; + string str7 = buttons.ToString(); + if (keyStatu7.Contains(str7)) + { + List keyStatu8 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadSnap4"]; + buttons = Buttons.DPadLeft; + string str8 = buttons.ToString(); + if (keyStatu8.Contains(str8)) + { + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadSnap1"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadSnap2"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadSnap3"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadSnap4"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadSnap1"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadSnap2"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadSnap3"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadSnap4"].Clear(); + return; + } + } + } + } + } + } + } + } + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadRadial1"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadRadial2"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadRadial3"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadRadial4"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadRadial1"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadRadial2"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadRadial3"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadRadial4"].Clear(); + Dictionary> keyStatus1 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus; + List stringList1 = new List(); + buttons = Buttons.DPadUp; + stringList1.Add(buttons.ToString()); + keyStatus1["DpadSnap1"] = stringList1; + Dictionary> keyStatus2 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus; + List stringList2 = new List(); + buttons = Buttons.DPadRight; + stringList2.Add(buttons.ToString()); + keyStatus2["DpadSnap2"] = stringList2; + Dictionary> keyStatus3 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus; + List stringList3 = new List(); + buttons = Buttons.DPadDown; + stringList3.Add(buttons.ToString()); + keyStatus3["DpadSnap3"] = stringList3; + Dictionary> keyStatus4 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus; + List stringList4 = new List(); + buttons = Buttons.DPadLeft; + stringList4.Add(buttons.ToString()); + keyStatus4["DpadSnap4"] = stringList4; + Dictionary> keyStatus5 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus; + List stringList5 = new List(); + buttons = Buttons.DPadUp; + stringList5.Add(buttons.ToString()); + keyStatus5["DpadSnap1"] = stringList5; + Dictionary> keyStatus6 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus; + List stringList6 = new List(); + buttons = Buttons.DPadRight; + stringList6.Add(buttons.ToString()); + keyStatus6["DpadSnap2"] = stringList6; + Dictionary> keyStatus7 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus; + List stringList7 = new List(); + buttons = Buttons.DPadDown; + stringList7.Add(buttons.ToString()); + keyStatus7["DpadSnap3"] = stringList7; + Dictionary> keyStatus8 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus; + List stringList8 = new List(); + buttons = Buttons.DPadLeft; + stringList8.Add(buttons.ToString()); + keyStatus8["DpadSnap4"] = stringList8; + } + + private void RadialButtonClick(UIMouseEvent evt, UIElement listeningElement) + { + if (!PlayerInput.CurrentProfile.AllowEditting) + return; + SoundEngine.PlaySound(12); + List keyStatu1 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadRadial1"]; + Buttons buttons = Buttons.DPadUp; + string str1 = buttons.ToString(); + if (keyStatu1.Contains(str1)) + { + List keyStatu2 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadRadial2"]; + buttons = Buttons.DPadRight; + string str2 = buttons.ToString(); + if (keyStatu2.Contains(str2)) + { + List keyStatu3 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadRadial3"]; + buttons = Buttons.DPadDown; + string str3 = buttons.ToString(); + if (keyStatu3.Contains(str3)) + { + List keyStatu4 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadRadial4"]; + buttons = Buttons.DPadLeft; + string str4 = buttons.ToString(); + if (keyStatu4.Contains(str4)) + { + List keyStatu5 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadRadial1"]; + buttons = Buttons.DPadUp; + string str5 = buttons.ToString(); + if (keyStatu5.Contains(str5)) + { + List keyStatu6 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadRadial2"]; + buttons = Buttons.DPadRight; + string str6 = buttons.ToString(); + if (keyStatu6.Contains(str6)) + { + List keyStatu7 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadRadial3"]; + buttons = Buttons.DPadDown; + string str7 = buttons.ToString(); + if (keyStatu7.Contains(str7)) + { + List keyStatu8 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadRadial4"]; + buttons = Buttons.DPadLeft; + string str8 = buttons.ToString(); + if (keyStatu8.Contains(str8)) + { + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadRadial1"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadRadial2"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadRadial3"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadRadial4"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadRadial1"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadRadial2"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadRadial3"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadRadial4"].Clear(); + return; + } + } + } + } + } + } + } + } + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadSnap1"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadSnap2"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadSnap3"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadSnap4"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadSnap1"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadSnap2"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadSnap3"].Clear(); + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadSnap4"].Clear(); + Dictionary> keyStatus1 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus; + List stringList1 = new List(); + buttons = Buttons.DPadUp; + stringList1.Add(buttons.ToString()); + keyStatus1["DpadRadial1"] = stringList1; + Dictionary> keyStatus2 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus; + List stringList2 = new List(); + buttons = Buttons.DPadRight; + stringList2.Add(buttons.ToString()); + keyStatus2["DpadRadial2"] = stringList2; + Dictionary> keyStatus3 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus; + List stringList3 = new List(); + buttons = Buttons.DPadDown; + stringList3.Add(buttons.ToString()); + keyStatus3["DpadRadial3"] = stringList3; + Dictionary> keyStatus4 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus; + List stringList4 = new List(); + buttons = Buttons.DPadLeft; + stringList4.Add(buttons.ToString()); + keyStatus4["DpadRadial4"] = stringList4; + Dictionary> keyStatus5 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus; + List stringList5 = new List(); + buttons = Buttons.DPadUp; + stringList5.Add(buttons.ToString()); + keyStatus5["DpadRadial1"] = stringList5; + Dictionary> keyStatus6 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus; + List stringList6 = new List(); + buttons = Buttons.DPadRight; + stringList6.Add(buttons.ToString()); + keyStatus6["DpadRadial2"] = stringList6; + Dictionary> keyStatus7 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus; + List stringList7 = new List(); + buttons = Buttons.DPadDown; + stringList7.Add(buttons.ToString()); + keyStatus7["DpadRadial3"] = stringList7; + Dictionary> keyStatus8 = PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus; + List stringList8 = new List(); + buttons = Buttons.DPadLeft; + stringList8.Add(buttons.ToString()); + keyStatus8["DpadRadial4"] = stringList8; + } + + private void KeyboardButtonClick(UIMouseEvent evt, UIElement listeningElement) + { + this._buttonKeyboard.SetFrame(this._KeyboardGamepadTexture.Frame(2, 2)); + this._buttonGamepad.SetFrame(this._KeyboardGamepadTexture.Frame(2, 2, 1, 1)); + this.OnKeyboard = true; + this.FillList(); + } + + private void GamepadButtonClick(UIMouseEvent evt, UIElement listeningElement) + { + this._buttonKeyboard.SetFrame(this._KeyboardGamepadTexture.Frame(2, 2, frameY: 1)); + this._buttonGamepad.SetFrame(this._KeyboardGamepadTexture.Frame(2, 2, 1)); + this.OnKeyboard = false; + this.FillList(); + } + + private void ManageBorderKeyboardOn(UIMouseEvent evt, UIElement listeningElement) + { + this._buttonBorder2.Color = !this.OnKeyboard ? Color.Silver : Color.Black; + this._buttonBorder1.Color = Main.OurFavoriteColor; + } + + private void ManageBorderKeyboardOff(UIMouseEvent evt, UIElement listeningElement) + { + this._buttonBorder2.Color = !this.OnKeyboard ? Color.Silver : Color.Black; + this._buttonBorder1.Color = this.OnKeyboard ? Color.Silver : Color.Black; + } + + private void ManageBorderGamepadOn(UIMouseEvent evt, UIElement listeningElement) + { + this._buttonBorder1.Color = this.OnKeyboard ? Color.Silver : Color.Black; + this._buttonBorder2.Color = Main.OurFavoriteColor; + } + + private void ManageBorderGamepadOff(UIMouseEvent evt, UIElement listeningElement) + { + this._buttonBorder1.Color = this.OnKeyboard ? Color.Silver : Color.Black; + this._buttonBorder2.Color = !this.OnKeyboard ? Color.Silver : Color.Black; + } + + private void VsGameplayButtonClick(UIMouseEvent evt, UIElement listeningElement) + { + this._buttonVs1.SetFrame(this._GameplayVsUITexture.Frame(2, 2)); + this._buttonVs2.SetFrame(this._GameplayVsUITexture.Frame(2, 2, 1, 1)); + this.OnGameplay = true; + this.FillList(); + } + + private void VsMenuButtonClick(UIMouseEvent evt, UIElement listeningElement) + { + this._buttonVs1.SetFrame(this._GameplayVsUITexture.Frame(2, 2, frameY: 1)); + this._buttonVs2.SetFrame(this._GameplayVsUITexture.Frame(2, 2, 1)); + this.OnGameplay = false; + this.FillList(); + } + + private void ManageBorderGameplayOn(UIMouseEvent evt, UIElement listeningElement) + { + this._buttonBorderVs2.Color = !this.OnGameplay ? Color.Silver : Color.Black; + this._buttonBorderVs1.Color = Main.OurFavoriteColor; + } + + private void ManageBorderGameplayOff(UIMouseEvent evt, UIElement listeningElement) + { + this._buttonBorderVs2.Color = !this.OnGameplay ? Color.Silver : Color.Black; + this._buttonBorderVs1.Color = this.OnGameplay ? Color.Silver : Color.Black; + } + + private void ManageBorderMenuOn(UIMouseEvent evt, UIElement listeningElement) + { + this._buttonBorderVs1.Color = this.OnGameplay ? Color.Silver : Color.Black; + this._buttonBorderVs2.Color = Main.OurFavoriteColor; + } + + private void ManageBorderMenuOff(UIMouseEvent evt, UIElement listeningElement) + { + this._buttonBorderVs1.Color = this.OnGameplay ? Color.Silver : Color.Black; + this._buttonBorderVs2.Color = !this.OnGameplay ? Color.Silver : Color.Black; + } + + private void profileButtonClick(UIMouseEvent evt, UIElement listeningElement) + { + string name = PlayerInput.CurrentProfile.Name; + List list = PlayerInput.Profiles.Keys.ToList(); + int index = list.IndexOf(name) + 1; + if (index >= list.Count) + index -= list.Count; + PlayerInput.SetSelectedProfile(list[index]); + } + + private void FadedMouseOver(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + ((UIPanel) evt.Target).BackgroundColor = new Color(73, 94, 171); + ((UIPanel) evt.Target).BorderColor = Colors.FancyUIFatButtonMouseOver; + } + + private void FadedMouseOut(UIMouseEvent evt, UIElement listeningElement) + { + ((UIPanel) evt.Target).BackgroundColor = new Color(63, 82, 151) * 0.7f; + ((UIPanel) evt.Target).BorderColor = Color.Black; + } + + private void GoBackClick(UIMouseEvent evt, UIElement listeningElement) + { + Main.menuMode = 1127; + IngameFancyUI.Close(); + } + + public override void Draw(SpriteBatch spriteBatch) + { + base.Draw(spriteBatch); + this.SetupGamepadPoints(spriteBatch); + } + + private void SetupGamepadPoints(SpriteBatch spriteBatch) + { + UILinkPointNavigator.Shortcuts.BackButtonCommand = 4; + int num1 = 3000; + UILinkPointNavigator.SetPosition(num1, this._buttonBack.GetInnerDimensions().ToRectangle().Center.ToVector2()); + UILinkPointNavigator.SetPosition(num1 + 1, this._buttonKeyboard.GetInnerDimensions().ToRectangle().Center.ToVector2()); + UILinkPointNavigator.SetPosition(num1 + 2, this._buttonGamepad.GetInnerDimensions().ToRectangle().Center.ToVector2()); + UILinkPointNavigator.SetPosition(num1 + 3, this._buttonProfile.GetInnerDimensions().ToRectangle().Center.ToVector2()); + UILinkPointNavigator.SetPosition(num1 + 4, this._buttonVs1.GetInnerDimensions().ToRectangle().Center.ToVector2()); + UILinkPointNavigator.SetPosition(num1 + 5, this._buttonVs2.GetInnerDimensions().ToRectangle().Center.ToVector2()); + int key1 = num1; + UILinkPoint point1 = UILinkPointNavigator.Points[key1]; + point1.Unlink(); + point1.Up = num1 + 6; + int key2 = num1 + 1; + UILinkPoint point2 = UILinkPointNavigator.Points[key2]; + point2.Unlink(); + point2.Right = num1 + 2; + point2.Down = num1 + 6; + int key3 = num1 + 2; + UILinkPoint point3 = UILinkPointNavigator.Points[key3]; + point3.Unlink(); + point3.Left = num1 + 1; + point3.Right = num1 + 4; + point3.Down = num1 + 6; + int key4 = num1 + 4; + UILinkPoint point4 = UILinkPointNavigator.Points[key4]; + point4.Unlink(); + point4.Left = num1 + 2; + point4.Right = num1 + 5; + point4.Down = num1 + 6; + int key5 = num1 + 5; + UILinkPoint point5 = UILinkPointNavigator.Points[key5]; + point5.Unlink(); + point5.Left = num1 + 4; + point5.Right = num1 + 3; + point5.Down = num1 + 6; + int key6 = num1 + 3; + UILinkPoint point6 = UILinkPointNavigator.Points[key6]; + point6.Unlink(); + point6.Left = num1 + 5; + point6.Down = num1 + 6; + float num2 = 1f / Main.UIScale; + Rectangle clippingRectangle = this._uilist.GetClippingRectangle(spriteBatch); + Vector2 minimum = clippingRectangle.TopLeft() * num2; + Vector2 maximum = clippingRectangle.BottomRight() * num2; + List snapPoints = this._uilist.GetSnapPoints(); + for (int index = 0; index < snapPoints.Count; ++index) + { + if (!snapPoints[index].Position.Between(minimum, maximum)) + { + Vector2 position = snapPoints[index].Position; + snapPoints.Remove(snapPoints[index]); + --index; + } + } + snapPoints.Sort((Comparison) ((x, y) => x.Id.CompareTo(y.Id))); + for (int index = 0; index < snapPoints.Count; ++index) + { + int num3 = num1 + 6 + index; + if (snapPoints[index].Name == "Thin") + { + UILinkPoint point7 = UILinkPointNavigator.Points[num3]; + point7.Unlink(); + UILinkPointNavigator.SetPosition(num3, snapPoints[index].Position); + point7.Right = num3 + 1; + point7.Down = index < snapPoints.Count - 2 ? num3 + 2 : num1; + point7.Up = index < 2 ? num1 + 1 : (snapPoints[index - 1].Name == "Wide" ? num3 - 1 : num3 - 2); + UILinkPointNavigator.Points[num1].Up = num3; + UILinkPointNavigator.Shortcuts.FANCYUI_HIGHEST_INDEX = num3; + ++index; + if (index < snapPoints.Count) + { + int num4 = num1 + 6 + index; + UILinkPoint point8 = UILinkPointNavigator.Points[num4]; + point8.Unlink(); + UILinkPointNavigator.SetPosition(num4, snapPoints[index].Position); + point8.Left = num4 - 1; + point8.Down = index < snapPoints.Count - 1 ? (snapPoints[index + 1].Name == "Wide" ? num4 + 1 : num4 + 2) : num1; + point8.Up = index < 2 ? num1 + 1 : num4 - 2; + UILinkPointNavigator.Shortcuts.FANCYUI_HIGHEST_INDEX = num4; + } + } + else + { + UILinkPoint point9 = UILinkPointNavigator.Points[num3]; + point9.Unlink(); + UILinkPointNavigator.SetPosition(num3, snapPoints[index].Position); + point9.Down = index < snapPoints.Count - 1 ? num3 + 1 : num1; + point9.Up = index < 1 ? num1 + 1 : (snapPoints[index - 1].Name == "Wide" ? num3 - 1 : num3 - 2); + UILinkPointNavigator.Shortcuts.FANCYUI_HIGHEST_INDEX = num3; + UILinkPointNavigator.Points[num1].Up = num3; + } + } + if (UIManageControls.ForceMoveTo == -1) + return; + UILinkPointNavigator.ChangePoint((int) MathHelper.Clamp((float) UIManageControls.ForceMoveTo, (float) num1, (float) UILinkPointNavigator.Shortcuts.FANCYUI_HIGHEST_INDEX)); + UIManageControls.ForceMoveTo = -1; + } + } +} diff --git a/GameContent/UI/States/UIResourcePackInfoMenu.cs b/GameContent/UI/States/UIResourcePackInfoMenu.cs new file mode 100644 index 0000000..bb1488a --- /dev/null +++ b/GameContent/UI/States/UIResourcePackInfoMenu.cs @@ -0,0 +1,209 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UIResourcePackInfoMenu +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System.Collections.Generic; +using Terraria.Audio; +using Terraria.GameContent.UI.Elements; +using Terraria.GameInput; +using Terraria.ID; +using Terraria.IO; +using Terraria.Localization; +using Terraria.UI; +using Terraria.UI.Gamepad; + +namespace Terraria.GameContent.UI.States +{ + public class UIResourcePackInfoMenu : UIState + { + private UIResourcePackSelectionMenu _resourceMenu; + private ResourcePack _pack; + private UIElement _container; + private UIList _list; + private UIScrollbar _scrollbar; + private bool _isScrollbarAttached; + private const string _backPointName = "GoBack"; + private UIGamepadHelper _helper; + + public UIResourcePackInfoMenu(UIResourcePackSelectionMenu parent, ResourcePack pack) + { + this._resourceMenu = parent; + this._pack = pack; + this.BuildPage(); + } + + private void BuildPage() + { + this.RemoveAllChildren(); + UIElement element1 = new UIElement(); + element1.Width.Set(0.0f, 0.8f); + element1.MaxWidth.Set(500f, 0.0f); + element1.MinWidth.Set(300f, 0.0f); + element1.Top.Set(230f, 0.0f); + element1.Height.Set(-element1.Top.Pixels, 1f); + element1.HAlign = 0.5f; + this.Append(element1); + UIPanel uiPanel = new UIPanel(); + uiPanel.Width.Set(0.0f, 1f); + uiPanel.Height.Set(-110f, 1f); + uiPanel.BackgroundColor = new Color(33, 43, 79) * 0.8f; + element1.Append((UIElement) uiPanel); + UIElement element2 = new UIElement() + { + Width = StyleDimension.Fill, + Height = StyleDimension.FromPixelsAndPercent(0.0f, 1f) + }; + uiPanel.Append(element2); + UIElement element3 = new UIElement() + { + Width = new StyleDimension(0.0f, 1f), + Height = new StyleDimension(52f, 0.0f) + }; + element3.SetPadding(0.0f); + element2.Append(element3); + UIText uiText1 = new UIText(this._pack.Name, 0.7f, true) + { + TextColor = Color.Gold + }; + uiText1.HAlign = 0.5f; + uiText1.VAlign = 0.0f; + element3.Append((UIElement) uiText1); + UIText uiText2 = new UIText(Language.GetTextValue("UI.Author", (object) this._pack.Author), 0.9f); + uiText2.HAlign = 0.0f; + uiText2.VAlign = 1f; + UIText uiText3 = uiText2; + uiText3.Top.Set(-6f, 0.0f); + element3.Append((UIElement) uiText3); + UIText uiText4 = new UIText(Language.GetTextValue("UI.Version", (object) this._pack.Version.GetFormattedVersion()), 0.9f); + uiText4.HAlign = 1f; + uiText4.VAlign = 1f; + uiText4.TextColor = Color.Silver; + UIText uiText5 = uiText4; + uiText5.Top.Set(-6f, 0.0f); + element3.Append((UIElement) uiText5); + Asset asset = Main.Assets.Request("Images/UI/Divider", (AssetRequestMode) 1); + UIImage uiImage1 = new UIImage(asset); + uiImage1.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + uiImage1.Height = StyleDimension.FromPixels((float) asset.Height()); + uiImage1.ScaleToFit = true; + UIImage uiImage2 = uiImage1; + uiImage2.Top.Set(52f, 0.0f); + uiImage2.SetPadding(6f); + element2.Append((UIElement) uiImage2); + UIElement element4 = new UIElement() + { + HAlign = 0.5f, + VAlign = 1f, + Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f), + Height = StyleDimension.FromPixelsAndPercent(-74f, 1f) + }; + element2.Append(element4); + this._container = element4; + UIText uiText6 = new UIText(this._pack.Description); + uiText6.HAlign = 0.5f; + uiText6.VAlign = 0.0f; + uiText6.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + uiText6.Height = StyleDimension.FromPixelsAndPercent(0.0f, 0.0f); + uiText6.IsWrapped = true; + uiText6.WrappedTextBottomPadding = 0.0f; + UIText uiText7 = uiText6; + UIList uiList1 = new UIList(); + uiList1.HAlign = 0.5f; + uiList1.VAlign = 0.0f; + uiList1.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + uiList1.Height = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + uiList1.PaddingRight = 20f; + UIList uiList2 = uiList1; + uiList2.ListPadding = 5f; + uiList2.Add((UIElement) uiText7); + element4.Append((UIElement) uiList2); + this._list = uiList2; + UIScrollbar scrollbar = new UIScrollbar(); + scrollbar.SetView(100f, 1000f); + scrollbar.Height.Set(0.0f, 1f); + scrollbar.HAlign = 1f; + this._scrollbar = scrollbar; + uiList2.SetScrollbar(scrollbar); + UITextPanel uiTextPanel = new UITextPanel(Language.GetText("UI.Back"), 0.7f, true); + uiTextPanel.Width.Set(-10f, 0.5f); + uiTextPanel.Height.Set(50f, 0.0f); + uiTextPanel.VAlign = 1f; + uiTextPanel.HAlign = 0.5f; + uiTextPanel.Top.Set(-45f, 0.0f); + uiTextPanel.OnMouseOver += new UIElement.MouseEvent(UIResourcePackInfoMenu.FadedMouseOver); + uiTextPanel.OnMouseOut += new UIElement.MouseEvent(UIResourcePackInfoMenu.FadedMouseOut); + uiTextPanel.OnClick += new UIElement.MouseEvent(this.GoBackClick); + uiTextPanel.SetSnapPoint("GoBack", 0); + element1.Append((UIElement) uiTextPanel); + } + + public override void Recalculate() + { + if (this._scrollbar != null) + { + if (this._isScrollbarAttached && !this._scrollbar.CanScroll) + { + this._container.RemoveChild((UIElement) this._scrollbar); + this._isScrollbarAttached = false; + this._list.Width.Set(0.0f, 1f); + } + else if (!this._isScrollbarAttached && this._scrollbar.CanScroll) + { + this._container.Append((UIElement) this._scrollbar); + this._isScrollbarAttached = true; + this._list.Width.Set(-25f, 1f); + } + } + base.Recalculate(); + } + + private void GoBackClick(UIMouseEvent evt, UIElement listeningElement) => Main.MenuUI.SetState((UIState) this._resourceMenu); + + private static void FadedMouseOver(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + ((UIPanel) evt.Target).BackgroundColor = new Color(73, 94, 171); + ((UIPanel) evt.Target).BorderColor = Colors.FancyUIFatButtonMouseOver; + } + + private static void FadedMouseOut(UIMouseEvent evt, UIElement listeningElement) + { + ((UIPanel) evt.Target).BackgroundColor = new Color(63, 82, 151) * 0.8f; + ((UIPanel) evt.Target).BorderColor = Color.Black; + } + + public override void Draw(SpriteBatch spriteBatch) + { + base.Draw(spriteBatch); + this.SetupGamepadPoints(spriteBatch); + } + + private void SetupGamepadPoints(SpriteBatch spriteBatch) + { + UILinkPointNavigator.Shortcuts.BackButtonCommand = 1; + int idRangeStartInclusive = 3000; + int idRangeEndExclusive = idRangeStartInclusive; + List snapPoints = this.GetSnapPoints(); + UILinkPoint uiLinkPoint = (UILinkPoint) null; + for (int index = 0; index < snapPoints.Count; ++index) + { + SnapPoint snap = snapPoints[index]; + if (snap.Name == "GoBack") + uiLinkPoint = this._helper.MakeLinkPointFromSnapPoint(idRangeEndExclusive++, snap); + } + if (PlayerInput.UsingGamepadUI) + this._helper.MoveToVisuallyClosestPoint(idRangeStartInclusive, idRangeEndExclusive); + if (!Main.CreativeMenu.GamepadMoveToSearchButtonHack) + return; + Main.CreativeMenu.GamepadMoveToSearchButtonHack = false; + if (uiLinkPoint == null) + return; + UILinkPointNavigator.ChangePoint(uiLinkPoint.ID); + } + } +} diff --git a/GameContent/UI/States/UIResourcePackSelectionMenu.cs b/GameContent/UI/States/UIResourcePackSelectionMenu.cs new file mode 100644 index 0000000..337dfb3 --- /dev/null +++ b/GameContent/UI/States/UIResourcePackSelectionMenu.cs @@ -0,0 +1,516 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UIResourcePackSelectionMenu +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Newtonsoft.Json.Linq; +using ReLogic.Content; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.Audio; +using Terraria.GameContent.UI.Elements; +using Terraria.GameInput; +using Terraria.ID; +using Terraria.Initializers; +using Terraria.IO; +using Terraria.Localization; +using Terraria.UI; +using Terraria.UI.Gamepad; + +namespace Terraria.GameContent.UI.States +{ + public class UIResourcePackSelectionMenu : UIState + { + private readonly AssetSourceController _sourceController; + private UIList _availablePacksList; + private UIList _enabledPacksList; + private ResourcePackList _packsList; + private UIText _titleAvailable; + private UIText _titleEnabled; + private const string _snapCategory_ToggleFromOffToOn = "ToggleToOn"; + private const string _snapCategory_ToggleFromOnToOff = "ToggleToOff"; + private const string _snapCategory_InfoWhenOff = "InfoOff"; + private const string _snapCategory_InfoWhenOn = "InfoOn"; + private const string _snapCategory_OffsetOrderUp = "OrderUp"; + private const string _snapCategory_OffsetOrderDown = "OrderDown"; + private const string _snapPointName_goBack = "GoBack"; + private const string _snapPointName_openFolder = "OpenFolder"; + private UIGamepadHelper _helper; + + public UIResourcePackSelectionMenu( + AssetSourceController sourceController, + ResourcePackList currentResourcePackList) + { + this._sourceController = sourceController; + this.BuildPage(); + this._packsList = currentResourcePackList; + this.PopulatePackList(); + } + + private void PopulatePackList() + { + this._availablePacksList.Clear(); + this._enabledPacksList.Clear(); + this.CleanUpResourcePackPriority(); + IEnumerable enabledPacks = this._packsList.EnabledPacks; + IEnumerable disabledPacks = this._packsList.DisabledPacks; + int num1 = 0; + foreach (ResourcePack resourcePack in disabledPacks) + { + UIResourcePack uiResourcePack1 = new UIResourcePack(resourcePack, num1); + uiResourcePack1.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + UIResourcePack uiResourcePack2 = uiResourcePack1; + UIElement packToggleButton = this.CreatePackToggleButton(resourcePack); + packToggleButton.OnUpdate += new UIElement.ElementEvent(this.EnablePackUpdate); + packToggleButton.SetSnapPoint("ToggleToOn", num1); + uiResourcePack2.ContentPanel.Append(packToggleButton); + UIElement packInfoButton = this.CreatePackInfoButton(resourcePack); + packInfoButton.OnUpdate += new UIElement.ElementEvent(this.SeeInfoUpdate); + packInfoButton.SetSnapPoint("InfoOff", num1); + uiResourcePack2.ContentPanel.Append(packInfoButton); + this._availablePacksList.Add((UIElement) uiResourcePack2); + ++num1; + } + int num2 = 0; + foreach (ResourcePack resourcePack in enabledPacks) + { + UIResourcePack uiResourcePack3 = new UIResourcePack(resourcePack, num2); + uiResourcePack3.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + UIResourcePack uiResourcePack4 = uiResourcePack3; + if (resourcePack.IsEnabled) + { + UIElement packToggleButton = this.CreatePackToggleButton(resourcePack); + packToggleButton.Left = new StyleDimension(0.0f, 0.0f); + packToggleButton.Width = new StyleDimension(0.0f, 0.5f); + packToggleButton.OnUpdate += new UIElement.ElementEvent(this.DisablePackUpdate); + packToggleButton.SetSnapPoint("ToggleToOff", num2); + uiResourcePack4.ContentPanel.Append(packToggleButton); + UIElement packInfoButton = this.CreatePackInfoButton(resourcePack); + packInfoButton.OnUpdate += new UIElement.ElementEvent(this.SeeInfoUpdate); + packInfoButton.Left = new StyleDimension(0.0f, 0.5f); + packInfoButton.Width = new StyleDimension(0.0f, 0.1666667f); + packInfoButton.SetSnapPoint("InfoOn", num2); + uiResourcePack4.ContentPanel.Append(packInfoButton); + UIElement offsetButton1 = this.CreateOffsetButton(resourcePack, -1); + offsetButton1.Left = new StyleDimension(0.0f, 0.6666667f); + offsetButton1.Width = new StyleDimension(0.0f, 0.1666667f); + offsetButton1.SetSnapPoint("OrderUp", num2); + uiResourcePack4.ContentPanel.Append(offsetButton1); + UIElement offsetButton2 = this.CreateOffsetButton(resourcePack, 1); + offsetButton2.Left = new StyleDimension(0.0f, 0.8333334f); + offsetButton2.Width = new StyleDimension(0.0f, 0.1666667f); + offsetButton2.SetSnapPoint("OrderDown", num2); + uiResourcePack4.ContentPanel.Append(offsetButton2); + } + this._enabledPacksList.Add((UIElement) uiResourcePack4); + ++num2; + } + this.UpdateTitles(); + } + + private UIElement CreateOffsetButton(ResourcePack resourcePack, int offset) + { + GroupOptionButton groupOptionButton1 = new GroupOptionButton(true, (LocalizedText) null, (LocalizedText) null, Color.White, (string) null, 0.8f); + groupOptionButton1.Left = StyleDimension.FromPercent(0.5f); + groupOptionButton1.Width = StyleDimension.FromPixelsAndPercent(0.0f, 0.5f); + groupOptionButton1.Height = StyleDimension.Fill; + GroupOptionButton groupOptionButton2 = groupOptionButton1; + int num = (offset != -1 ? 0 : (resourcePack.SortingOrder == 0 ? 1 : 0)) | (offset != 1 ? 0 : (resourcePack.SortingOrder == this._packsList.EnabledPacks.Count() - 1 ? 1 : 0)); + Color lightCyan = Color.LightCyan; + groupOptionButton2.SetColorsBasedOnSelectionState(lightCyan, lightCyan, 0.7f, 0.7f); + groupOptionButton2.ShowHighlightWhenSelected = false; + groupOptionButton2.SetPadding(0.0f); + Asset asset = Main.Assets.Request("Images/UI/TexturePackButtons", (AssetRequestMode) 1); + UIImageFramed uiImageFramed1 = new UIImageFramed(asset, asset.Frame(2, 2, offset == 1 ? 1 : 0)); + uiImageFramed1.HAlign = 0.5f; + uiImageFramed1.VAlign = 0.5f; + uiImageFramed1.IgnoresMouseInteraction = true; + UIImageFramed uiImageFramed2 = uiImageFramed1; + groupOptionButton2.Append((UIElement) uiImageFramed2); + groupOptionButton2.OnMouseOver += (UIElement.MouseEvent) ((evt, listeningElement) => SoundEngine.PlaySound(12)); + int offsetLocalForLambda = offset; + if (num != 0) + groupOptionButton2.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => SoundEngine.PlaySound(12)); + else + groupOptionButton2.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + SoundEngine.PlaySound(12); + this.OffsetResourcePackPriority(resourcePack, offsetLocalForLambda); + this.PopulatePackList(); + Main.instance.TilePaintSystem.Reset(); + }); + if (offset == 1) + groupOptionButton2.OnUpdate += new UIElement.ElementEvent(this.OffsetFrontwardUpdate); + else + groupOptionButton2.OnUpdate += new UIElement.ElementEvent(this.OffsetBackwardUpdate); + return (UIElement) groupOptionButton2; + } + + private UIElement CreatePackToggleButton(ResourcePack resourcePack) + { + Language.GetText(resourcePack.IsEnabled ? "GameUI.Enabled" : "GameUI.Disabled"); + GroupOptionButton groupOptionButton = new GroupOptionButton(true, (LocalizedText) null, (LocalizedText) null, Color.White, (string) null, 0.8f); + groupOptionButton.Left = StyleDimension.FromPercent(0.5f); + groupOptionButton.Width = StyleDimension.FromPixelsAndPercent(0.0f, 0.5f); + groupOptionButton.Height = StyleDimension.Fill; + groupOptionButton.SetColorsBasedOnSelectionState(Color.LightGreen, Color.PaleVioletRed, 0.7f, 0.7f); + groupOptionButton.SetCurrentOption(resourcePack.IsEnabled); + groupOptionButton.ShowHighlightWhenSelected = false; + groupOptionButton.SetPadding(0.0f); + Asset asset = Main.Assets.Request("Images/UI/TexturePackButtons", (AssetRequestMode) 1); + UIImageFramed uiImageFramed = new UIImageFramed(asset, asset.Frame(2, 2, resourcePack.IsEnabled ? 0 : 1, 1)); + uiImageFramed.HAlign = 0.5f; + uiImageFramed.VAlign = 0.5f; + uiImageFramed.IgnoresMouseInteraction = true; + groupOptionButton.Append((UIElement) uiImageFramed); + groupOptionButton.OnMouseOver += (UIElement.MouseEvent) ((evt, listeningElement) => SoundEngine.PlaySound(12)); + groupOptionButton.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + SoundEngine.PlaySound(12); + resourcePack.IsEnabled = !resourcePack.IsEnabled; + this.SetResourcePackAsTopPriority(resourcePack); + this.PopulatePackList(); + Main.instance.TilePaintSystem.Reset(); + }); + return (UIElement) groupOptionButton; + } + + private void SetResourcePackAsTopPriority(ResourcePack resourcePack) + { + if (!resourcePack.IsEnabled) + return; + int num = -1; + foreach (ResourcePack enabledPack in this._packsList.EnabledPacks) + { + if (num < enabledPack.SortingOrder && enabledPack != resourcePack) + num = enabledPack.SortingOrder; + } + resourcePack.SortingOrder = num + 1; + } + + private void OffsetResourcePackPriority(ResourcePack resourcePack, int offset) + { + if (!resourcePack.IsEnabled) + return; + List list = this._packsList.EnabledPacks.ToList(); + int index1 = list.IndexOf(resourcePack); + int index2 = Utils.Clamp(index1 + offset, 0, list.Count - 1); + if (index2 == index1) + return; + int sortingOrder = list[index1].SortingOrder; + list[index1].SortingOrder = list[index2].SortingOrder; + list[index2].SortingOrder = sortingOrder; + } + + private UIElement CreatePackInfoButton(ResourcePack resourcePack) + { + UIResourcePackInfoButton resourcePackInfoButton = new UIResourcePackInfoButton("", 0.8f); + resourcePackInfoButton.Width = StyleDimension.FromPixelsAndPercent(0.0f, 0.5f); + resourcePackInfoButton.Height = StyleDimension.Fill; + resourcePackInfoButton.ResourcePack = resourcePack; + resourcePackInfoButton.SetPadding(0.0f); + UIImage uiImage = new UIImage(Main.Assets.Request("Images/UI/CharCreation/CharInfo", (AssetRequestMode) 1)); + uiImage.HAlign = 0.5f; + uiImage.VAlign = 0.5f; + uiImage.IgnoresMouseInteraction = true; + resourcePackInfoButton.Append((UIElement) uiImage); + resourcePackInfoButton.OnMouseOver += (UIElement.MouseEvent) ((evt, listeningElement) => SoundEngine.PlaySound(12)); + resourcePackInfoButton.OnClick += new UIElement.MouseEvent(this.Click_Info); + return (UIElement) resourcePackInfoButton; + } + + private void Click_Info(UIMouseEvent evt, UIElement listeningElement) + { + if (!(listeningElement is UIResourcePackInfoButton resourcePackInfoButton)) + return; + SoundEngine.PlaySound(10); + Main.MenuUI.SetState((UIState) new UIResourcePackInfoMenu(this, resourcePackInfoButton.ResourcePack)); + } + + private void ApplyListChanges() => this._sourceController.UseResourcePacks(new ResourcePackList(this._enabledPacksList.Select((Func) (uiPack => ((UIResourcePack) uiPack).ResourcePack)))); + + private void CleanUpResourcePackPriority() + { + IOrderedEnumerable orderedEnumerable = this._packsList.EnabledPacks.OrderBy((Func) (pack => pack.SortingOrder)); + int num = 0; + foreach (ResourcePack resourcePack in (IEnumerable) orderedEnumerable) + resourcePack.SortingOrder = num++; + } + + private void BuildPage() + { + this.RemoveAllChildren(); + UIElement uiElement = new UIElement(); + uiElement.Width.Set(0.0f, 0.8f); + uiElement.MaxWidth.Set(800f, 0.0f); + uiElement.MinWidth.Set(600f, 0.0f); + uiElement.Top.Set(240f, 0.0f); + uiElement.Height.Set(-240f, 1f); + uiElement.HAlign = 0.5f; + this.Append(uiElement); + UIPanel uiPanel1 = new UIPanel(); + uiPanel1.Width = StyleDimension.Fill; + uiPanel1.Height = new StyleDimension(-110f, 1f); + uiPanel1.BackgroundColor = new Color(33, 43, 79) * 0.8f; + uiPanel1.PaddingRight = 0.0f; + uiPanel1.PaddingLeft = 0.0f; + UIPanel uiPanel2 = uiPanel1; + uiElement.Append((UIElement) uiPanel2); + int num1 = 35; + int num2 = num1; + int num3 = 30; + UIElement element1 = new UIElement() + { + Width = StyleDimension.Fill, + Height = StyleDimension.FromPixelsAndPercent((float) -(num3 + 4 + 5), 1f), + VAlign = 1f + }; + element1.SetPadding(0.0f); + uiPanel2.Append(element1); + UIElement element2 = new UIElement() + { + Width = new StyleDimension(-20f, 0.5f), + Height = new StyleDimension(0.0f, 1f), + Left = new StyleDimension(10f, 0.0f) + }; + element2.SetPadding(0.0f); + element1.Append(element2); + UIElement element3 = new UIElement() + { + Width = new StyleDimension(-20f, 0.5f), + Height = new StyleDimension(0.0f, 1f), + Left = new StyleDimension(-10f, 0.0f), + HAlign = 1f + }; + element3.SetPadding(0.0f); + element1.Append(element3); + UIList uiList1 = new UIList(); + uiList1.Width = new StyleDimension(-25f, 1f); + uiList1.Height = new StyleDimension(0.0f, 1f); + uiList1.ListPadding = 5f; + uiList1.HAlign = 1f; + UIList uiList2 = uiList1; + element2.Append((UIElement) uiList2); + this._availablePacksList = uiList2; + UIList uiList3 = new UIList(); + uiList3.Width = new StyleDimension(-25f, 1f); + uiList3.Height = new StyleDimension(0.0f, 1f); + uiList3.ListPadding = 5f; + uiList3.HAlign = 0.0f; + uiList3.Left = new StyleDimension(0.0f, 0.0f); + UIList uiList4 = uiList3; + element3.Append((UIElement) uiList4); + this._enabledPacksList = uiList4; + UIText uiText1 = new UIText(Language.GetText("UI.AvailableResourcePacksTitle")); + uiText1.HAlign = 0.0f; + uiText1.Left = new StyleDimension(25f, 0.0f); + uiText1.Width = new StyleDimension(-25f, 0.5f); + uiText1.VAlign = 0.0f; + uiText1.Top = new StyleDimension(10f, 0.0f); + UIText uiText2 = uiText1; + this._titleAvailable = uiText2; + uiPanel2.Append((UIElement) uiText2); + UIText uiText3 = new UIText(Language.GetText("UI.EnabledResourcePacksTitle")); + uiText3.HAlign = 1f; + uiText3.Left = new StyleDimension(-25f, 0.0f); + uiText3.Width = new StyleDimension(-25f, 0.5f); + uiText3.VAlign = 0.0f; + uiText3.Top = new StyleDimension(10f, 0.0f); + UIText uiText4 = uiText3; + this._titleEnabled = uiText4; + uiPanel2.Append((UIElement) uiText4); + UITextPanel uiTextPanel1 = new UITextPanel(Language.GetText("UI.ResourcePacks"), large: true); + uiTextPanel1.HAlign = 0.5f; + uiTextPanel1.VAlign = 0.0f; + uiTextPanel1.Top = new StyleDimension(-44f, 0.0f); + uiTextPanel1.BackgroundColor = new Color(73, 94, 171); + UITextPanel uiTextPanel2 = uiTextPanel1; + uiTextPanel2.SetPadding(13f); + uiElement.Append((UIElement) uiTextPanel2); + UIScrollbar uiScrollbar1 = new UIScrollbar(); + uiScrollbar1.Height = new StyleDimension(0.0f, 1f); + uiScrollbar1.HAlign = 0.0f; + uiScrollbar1.Left = new StyleDimension(0.0f, 0.0f); + UIScrollbar scrollbar1 = uiScrollbar1; + element2.Append((UIElement) scrollbar1); + this._availablePacksList.SetScrollbar(scrollbar1); + UIVerticalSeparator verticalSeparator1 = new UIVerticalSeparator(); + verticalSeparator1.Height = new StyleDimension(-12f, 1f); + verticalSeparator1.HAlign = 0.5f; + verticalSeparator1.VAlign = 1f; + verticalSeparator1.Color = new Color(89, 116, 213, (int) byte.MaxValue) * 0.9f; + UIVerticalSeparator verticalSeparator2 = verticalSeparator1; + uiPanel2.Append((UIElement) verticalSeparator2); + UIHorizontalSeparator horizontalSeparator1 = new UIHorizontalSeparator(); + horizontalSeparator1.Width = new StyleDimension((float) -num2, 0.5f); + horizontalSeparator1.VAlign = 0.0f; + horizontalSeparator1.HAlign = 0.0f; + horizontalSeparator1.Color = new Color(89, 116, 213, (int) byte.MaxValue) * 0.9f; + horizontalSeparator1.Top = new StyleDimension((float) num3, 0.0f); + horizontalSeparator1.Left = new StyleDimension((float) num1, 0.0f); + UIHorizontalSeparator horizontalSeparator2 = new UIHorizontalSeparator(); + horizontalSeparator2.Width = new StyleDimension((float) -num2, 0.5f); + horizontalSeparator2.VAlign = 0.0f; + horizontalSeparator2.HAlign = 1f; + horizontalSeparator2.Color = new Color(89, 116, 213, (int) byte.MaxValue) * 0.9f; + horizontalSeparator2.Top = new StyleDimension((float) num3, 0.0f); + horizontalSeparator2.Left = new StyleDimension((float) -num1, 0.0f); + UIScrollbar uiScrollbar2 = new UIScrollbar(); + uiScrollbar2.Height = new StyleDimension(0.0f, 1f); + uiScrollbar2.HAlign = 1f; + UIScrollbar scrollbar2 = uiScrollbar2; + element3.Append((UIElement) scrollbar2); + this._enabledPacksList.SetScrollbar(scrollbar2); + this.AddBackAndFolderButtons(uiElement); + } + + private void UpdateTitles() + { + this._titleAvailable.SetText(Language.GetText("UI.AvailableResourcePacksTitle").FormatWith((object) new + { + Amount = this._availablePacksList.Count + })); + this._titleEnabled.SetText(Language.GetText("UI.EnabledResourcePacksTitle").FormatWith((object) new + { + Amount = this._enabledPacksList.Count + })); + } + + private void AddBackAndFolderButtons(UIElement outerContainer) + { + UITextPanel uiTextPanel1 = new UITextPanel(Language.GetText("UI.Back"), 0.7f, true); + uiTextPanel1.Width = new StyleDimension(-8f, 0.5f); + uiTextPanel1.Height = new StyleDimension(50f, 0.0f); + uiTextPanel1.VAlign = 1f; + uiTextPanel1.HAlign = 0.0f; + uiTextPanel1.Top = new StyleDimension(-45f, 0.0f); + UITextPanel uiTextPanel2 = uiTextPanel1; + uiTextPanel2.OnMouseOver += new UIElement.MouseEvent(UIResourcePackSelectionMenu.FadedMouseOver); + uiTextPanel2.OnMouseOut += new UIElement.MouseEvent(UIResourcePackSelectionMenu.FadedMouseOut); + uiTextPanel2.OnClick += new UIElement.MouseEvent(this.GoBackClick); + uiTextPanel2.SetSnapPoint("GoBack", 0); + outerContainer.Append((UIElement) uiTextPanel2); + UITextPanel uiTextPanel3 = new UITextPanel(Language.GetText("GameUI.OpenFileFolder"), 0.7f, true); + uiTextPanel3.Width = new StyleDimension(-8f, 0.5f); + uiTextPanel3.Height = new StyleDimension(50f, 0.0f); + uiTextPanel3.VAlign = 1f; + uiTextPanel3.HAlign = 1f; + uiTextPanel3.Top = new StyleDimension(-45f, 0.0f); + UITextPanel uiTextPanel4 = uiTextPanel3; + uiTextPanel4.OnMouseOver += new UIElement.MouseEvent(UIResourcePackSelectionMenu.FadedMouseOver); + uiTextPanel4.OnMouseOut += new UIElement.MouseEvent(UIResourcePackSelectionMenu.FadedMouseOut); + uiTextPanel4.OnClick += new UIElement.MouseEvent(this.OpenFoldersClick); + uiTextPanel4.SetSnapPoint("OpenFolder", 0); + outerContainer.Append((UIElement) uiTextPanel4); + } + + private void OpenFoldersClick(UIMouseEvent evt, UIElement listeningElement) + { + string resourcePackFolder; + AssetInitializer.GetResourcePacksFolderPathAndConfirmItExists(out JArray _, out resourcePackFolder); + SoundEngine.PlaySound(12); + Utils.OpenFolder(resourcePackFolder); + } + + private void GoBackClick(UIMouseEvent evt, UIElement listeningElement) + { + this.ApplyListChanges(); + Main.SaveSettings(); + Main.menuMode = 0; + IngameFancyUI.Close(); + } + + private static void FadedMouseOver(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + ((UIPanel) evt.Target).BackgroundColor = new Color(73, 94, 171); + ((UIPanel) evt.Target).BorderColor = Colors.FancyUIFatButtonMouseOver; + } + + private static void FadedMouseOut(UIMouseEvent evt, UIElement listeningElement) + { + ((UIPanel) evt.Target).BackgroundColor = new Color(63, 82, 151) * 0.8f; + ((UIPanel) evt.Target).BorderColor = Color.Black; + } + + private void OffsetBackwardUpdate(UIElement affectedElement) => UIResourcePackSelectionMenu.DisplayMouseTextIfHovered(affectedElement, "UI.OffsetTexturePackPriorityDown"); + + private void OffsetFrontwardUpdate(UIElement affectedElement) => UIResourcePackSelectionMenu.DisplayMouseTextIfHovered(affectedElement, "UI.OffsetTexturePackPriorityUp"); + + private void EnablePackUpdate(UIElement affectedElement) => UIResourcePackSelectionMenu.DisplayMouseTextIfHovered(affectedElement, "UI.EnableTexturePack"); + + private void DisablePackUpdate(UIElement affectedElement) => UIResourcePackSelectionMenu.DisplayMouseTextIfHovered(affectedElement, "UI.DisableTexturePack"); + + private void SeeInfoUpdate(UIElement affectedElement) => UIResourcePackSelectionMenu.DisplayMouseTextIfHovered(affectedElement, "UI.SeeTexturePackInfo"); + + private static void DisplayMouseTextIfHovered(UIElement affectedElement, string textKey) + { + if (!affectedElement.IsMouseHovering) + return; + string textValue = Language.GetTextValue(textKey); + Main.instance.MouseText(textValue); + } + + public override void Draw(SpriteBatch spriteBatch) + { + base.Draw(spriteBatch); + this.SetupGamepadPoints(spriteBatch); + } + + private void SetupGamepadPoints(SpriteBatch spriteBatch) + { + UILinkPointNavigator.Shortcuts.BackButtonCommand = 1; + int idRangeStartInclusive = 3000; + int currentID = idRangeStartInclusive; + List snapPoints1 = this.GetSnapPoints(); + List snapPoints2 = this._availablePacksList.GetSnapPoints(); + this._helper.CullPointsOutOfElementArea(spriteBatch, snapPoints2, (UIElement) this._availablePacksList); + List snapPoints3 = this._enabledPacksList.GetSnapPoints(); + this._helper.CullPointsOutOfElementArea(spriteBatch, snapPoints3, (UIElement) this._enabledPacksList); + UILinkPoint[] fromCategoryName1 = this._helper.GetVerticalStripFromCategoryName(ref currentID, snapPoints2, "ToggleToOn"); + UILinkPoint[] fromCategoryName2 = this._helper.GetVerticalStripFromCategoryName(ref currentID, snapPoints2, "InfoOff"); + UILinkPoint[] fromCategoryName3 = this._helper.GetVerticalStripFromCategoryName(ref currentID, snapPoints3, "ToggleToOff"); + UILinkPoint[] fromCategoryName4 = this._helper.GetVerticalStripFromCategoryName(ref currentID, snapPoints3, "InfoOn"); + UILinkPoint[] fromCategoryName5 = this._helper.GetVerticalStripFromCategoryName(ref currentID, snapPoints3, "OrderUp"); + UILinkPoint[] fromCategoryName6 = this._helper.GetVerticalStripFromCategoryName(ref currentID, snapPoints3, "OrderDown"); + UILinkPoint uiLinkPoint1 = (UILinkPoint) null; + UILinkPoint uiLinkPoint2 = (UILinkPoint) null; + for (int index = 0; index < snapPoints1.Count; ++index) + { + SnapPoint snap = snapPoints1[index]; + string name = snap.Name; + if (!(name == "GoBack")) + { + if (name == "OpenFolder") + uiLinkPoint2 = this._helper.MakeLinkPointFromSnapPoint(currentID++, snap); + } + else + uiLinkPoint1 = this._helper.MakeLinkPointFromSnapPoint(currentID++, snap); + } + this._helper.LinkVerticalStrips(fromCategoryName2, fromCategoryName1, 0); + this._helper.LinkVerticalStrips(fromCategoryName1, fromCategoryName3, 0); + this._helper.LinkVerticalStrips(fromCategoryName3, fromCategoryName4, 0); + this._helper.LinkVerticalStrips(fromCategoryName4, fromCategoryName5, 0); + this._helper.LinkVerticalStrips(fromCategoryName5, fromCategoryName6, 0); + this._helper.LinkVerticalStripBottomSideToSingle(fromCategoryName1, uiLinkPoint1); + this._helper.LinkVerticalStripBottomSideToSingle(fromCategoryName2, uiLinkPoint1); + this._helper.LinkVerticalStripBottomSideToSingle(fromCategoryName5, uiLinkPoint2); + this._helper.LinkVerticalStripBottomSideToSingle(fromCategoryName6, uiLinkPoint2); + this._helper.LinkVerticalStripBottomSideToSingle(fromCategoryName3, uiLinkPoint2); + this._helper.LinkVerticalStripBottomSideToSingle(fromCategoryName4, uiLinkPoint2); + this._helper.PairLeftRight(uiLinkPoint1, uiLinkPoint2); + if (PlayerInput.UsingGamepadUI) + this._helper.MoveToVisuallyClosestPoint(idRangeStartInclusive, currentID); + if (!Main.CreativeMenu.GamepadMoveToSearchButtonHack) + return; + Main.CreativeMenu.GamepadMoveToSearchButtonHack = false; + if (uiLinkPoint1 == null) + return; + UILinkPointNavigator.ChangePoint(uiLinkPoint1.ID); + } + } +} diff --git a/GameContent/UI/States/UISortableElement.cs b/GameContent/UI/States/UISortableElement.cs new file mode 100644 index 0000000..a05d005 --- /dev/null +++ b/GameContent/UI/States/UISortableElement.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UISortableElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.UI; + +namespace Terraria.GameContent.UI.States +{ + public class UISortableElement : UIElement + { + public int OrderIndex; + + public UISortableElement(int index) => this.OrderIndex = index; + + public override int CompareTo(object obj) => obj is UISortableElement uiSortableElement ? this.OrderIndex.CompareTo(uiSortableElement.OrderIndex) : base.CompareTo(obj); + } +} diff --git a/GameContent/UI/States/UIVirtualKeyboard.cs b/GameContent/UI/States/UIVirtualKeyboard.cs new file mode 100644 index 0000000..5f0129c --- /dev/null +++ b/GameContent/UI/States/UIVirtualKeyboard.cs @@ -0,0 +1,808 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UIVirtualKeyboard +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.Audio; +using Terraria.GameContent.UI.Elements; +using Terraria.GameInput; +using Terraria.ID; +using Terraria.Localization; +using Terraria.UI; +using Terraria.UI.Gamepad; + +namespace Terraria.GameContent.UI.States +{ + public class UIVirtualKeyboard : UIState + { + private static UIVirtualKeyboard _currentInstance; + private static string _cancelCacheSign = ""; + private static string _cancelCacheChest = ""; + private const string DEFAULT_KEYS = "1234567890qwertyuiopasdfghjkl'zxcvbnm,.?"; + private const string SHIFT_KEYS = "1234567890QWERTYUIOPASDFGHJKL'ZXCVBNM,.?"; + private const string SYMBOL_KEYS = "1234567890!@#$%^&*()-_+=/\\{}[]<>;:\"`|~£¥"; + private const float KEY_SPACING = 4f; + private const float KEY_WIDTH = 48f; + private const float KEY_HEIGHT = 37f; + private UITextPanel[] _keyList = new UITextPanel[50]; + private UITextPanel _shiftButton; + private UITextPanel _symbolButton; + private UITextBox _textBox; + private UITextPanel _submitButton; + private UITextPanel _cancelButton; + private UIText _label; + private UITextPanel _enterButton; + private UITextPanel _spacebarButton; + private UITextPanel _restoreButton; + private Asset _textureShift; + private Asset _textureBackspace; + private Color _internalBorderColor = new Color(89, 116, 213); + private Color _internalBorderColorSelected = Main.OurFavoriteColor; + private UITextPanel _submitButton2; + private UITextPanel _cancelButton2; + private UIElement outerLayer1; + private UIElement outerLayer2; + private bool _allowEmpty; + private UIVirtualKeyboard.KeyState _keyState; + private UIVirtualKeyboard.KeyboardSubmitEvent _submitAction; + private Action _cancelAction; + private int _lastOffsetDown; + public static int OffsetDown; + public static bool ShouldHideText; + private int _keyboardContext; + private bool _edittingSign; + private bool _edittingChest; + private float _textBoxHeight; + private float _labelHeight; + private bool _canSubmit; + + public string Text + { + get => this._textBox.Text; + set + { + this._textBox.SetText(value); + this.ValidateText(); + } + } + + public UIVirtualKeyboard( + string labelText, + string startingText, + UIVirtualKeyboard.KeyboardSubmitEvent submitAction, + Action cancelAction, + int inputMode = 0, + bool allowEmpty = false) + { + this._keyboardContext = inputMode; + this._allowEmpty = allowEmpty; + UIVirtualKeyboard.OffsetDown = 0; + UIVirtualKeyboard.ShouldHideText = false; + this._lastOffsetDown = 0; + this._edittingSign = this._keyboardContext == 1; + this._edittingChest = this._keyboardContext == 2; + UIVirtualKeyboard._currentInstance = this; + this._submitAction = submitAction; + this._cancelAction = cancelAction; + this._textureShift = Main.Assets.Request("Images/UI/VK_Shift", (AssetRequestMode) 1); + this._textureBackspace = Main.Assets.Request("Images/UI/VK_Backspace", (AssetRequestMode) 1); + this.Top.Pixels = (float) this._lastOffsetDown; + float num1 = (float) (-5000 * this._edittingSign.ToInt()); + float num2 = 270f; + float num3 = 0.0f; + float num4 = 516f; + UIElement element = new UIElement(); + element.Width.Pixels = (float) ((double) num4 + 8.0 + 16.0); + element.Top.Precent = num3; + element.Top.Pixels = num2; + element.Height.Pixels = 266f; + element.HAlign = 0.5f; + element.SetPadding(0.0f); + this.outerLayer1 = element; + UIElement uiElement = new UIElement(); + uiElement.Width.Pixels = (float) ((double) num4 + 8.0 + 16.0); + uiElement.Top.Precent = num3; + uiElement.Top.Pixels = num2; + uiElement.Height.Pixels = 266f; + uiElement.HAlign = 0.5f; + uiElement.SetPadding(0.0f); + this.outerLayer2 = uiElement; + UIPanel mainPanel = new UIPanel(); + mainPanel.Width.Precent = 1f; + mainPanel.Height.Pixels = 225f; + mainPanel.BackgroundColor = new Color(23, 33, 69) * 0.7f; + element.Append((UIElement) mainPanel); + float num5 = -50f; + this._textBox = new UITextBox("", 0.78f, true); + this._textBox.BackgroundColor = Color.Transparent; + this._textBox.BorderColor = Color.Transparent; + this._textBox.HAlign = 0.5f; + this._textBox.Width.Pixels = num4; + this._textBox.Top.Pixels = (float) ((double) num5 + (double) num2 - 10.0) + num1; + this._textBox.Top.Precent = num3; + this._textBox.Height.Pixels = 37f; + this.Append((UIElement) this._textBox); + for (int x = 0; x < 10; ++x) + { + for (int y = 0; y < 4; ++y) + { + UITextPanel keyboardButton = this.CreateKeyboardButton((object) "1234567890qwertyuiopasdfghjkl'zxcvbnm,.?"[y * 10 + x].ToString(), x, y); + keyboardButton.OnClick += new UIElement.MouseEvent(this.TypeText); + mainPanel.Append((UIElement) keyboardButton); + } + } + this._shiftButton = this.CreateKeyboardButton((object) "", 0, 4, style: false); + this._shiftButton.PaddingLeft = 0.0f; + this._shiftButton.PaddingRight = 0.0f; + this._shiftButton.PaddingBottom = this._shiftButton.PaddingTop = 0.0f; + this._shiftButton.BackgroundColor = new Color(63, 82, 151) * 0.7f; + this._shiftButton.BorderColor = this._internalBorderColor * 0.7f; + this._shiftButton.OnMouseOver += (UIElement.MouseEvent) ((evt, listeningElement) => + { + this._shiftButton.BorderColor = this._internalBorderColorSelected; + if (this._keyState == UIVirtualKeyboard.KeyState.Shift) + return; + this._shiftButton.BackgroundColor = new Color(73, 94, 171); + }); + this._shiftButton.OnMouseOut += (UIElement.MouseEvent) ((evt, listeningElement) => + { + this._shiftButton.BorderColor = this._internalBorderColor * 0.7f; + if (this._keyState == UIVirtualKeyboard.KeyState.Shift) + return; + this._shiftButton.BackgroundColor = new Color(63, 82, 151) * 0.7f; + }); + this._shiftButton.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + SoundEngine.PlaySound(12); + this.SetKeyState(this._keyState == UIVirtualKeyboard.KeyState.Shift ? UIVirtualKeyboard.KeyState.Default : UIVirtualKeyboard.KeyState.Shift); + }); + UIImage uiImage1 = new UIImage(this._textureShift); + uiImage1.HAlign = 0.5f; + uiImage1.VAlign = 0.5f; + uiImage1.ImageScale = 0.85f; + this._shiftButton.Append((UIElement) uiImage1); + mainPanel.Append((UIElement) this._shiftButton); + this._symbolButton = this.CreateKeyboardButton((object) "@%", 1, 4, style: false); + this._symbolButton.PaddingLeft = 0.0f; + this._symbolButton.PaddingRight = 0.0f; + this._symbolButton.BackgroundColor = new Color(63, 82, 151) * 0.7f; + this._symbolButton.BorderColor = this._internalBorderColor * 0.7f; + this._symbolButton.OnMouseOver += (UIElement.MouseEvent) ((evt, listeningElement) => + { + this._symbolButton.BorderColor = this._internalBorderColorSelected; + if (this._keyState == UIVirtualKeyboard.KeyState.Symbol) + return; + this._symbolButton.BackgroundColor = new Color(73, 94, 171); + }); + this._symbolButton.OnMouseOut += (UIElement.MouseEvent) ((evt, listeningElement) => + { + this._symbolButton.BorderColor = this._internalBorderColor * 0.7f; + if (this._keyState == UIVirtualKeyboard.KeyState.Symbol) + return; + this._symbolButton.BackgroundColor = new Color(63, 82, 151) * 0.7f; + }); + this._symbolButton.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + SoundEngine.PlaySound(12); + this.SetKeyState(this._keyState == UIVirtualKeyboard.KeyState.Symbol ? UIVirtualKeyboard.KeyState.Default : UIVirtualKeyboard.KeyState.Symbol); + }); + mainPanel.Append((UIElement) this._symbolButton); + this.BuildSpaceBarArea(mainPanel); + this._submitButton = new UITextPanel(this._edittingSign || this._edittingChest ? Language.GetText("UI.Save") : Language.GetText("UI.Submit"), 0.4f, true); + this._submitButton.Height.Pixels = 37f; + this._submitButton.Width.Precent = 0.4f; + this._submitButton.HAlign = 1f; + this._submitButton.VAlign = 1f; + this._submitButton.PaddingLeft = 0.0f; + this._submitButton.PaddingRight = 0.0f; + this.ValidateText(); + this._submitButton.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver); + this._submitButton.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut); + this._submitButton.OnMouseOver += (UIElement.MouseEvent) ((evt, listeningElement) => this.ValidateText()); + this._submitButton.OnMouseOut += (UIElement.MouseEvent) ((evt, listeningElement) => this.ValidateText()); + this._submitButton.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => UIVirtualKeyboard.Submit()); + element.Append((UIElement) this._submitButton); + this._cancelButton = new UITextPanel(Language.GetText("UI.Cancel"), 0.4f, true); + this.StyleKey(this._cancelButton, true); + this._cancelButton.Height.Pixels = 37f; + this._cancelButton.Width.Precent = 0.4f; + this._cancelButton.VAlign = 1f; + this._cancelButton.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + SoundEngine.PlaySound(11); + this._cancelAction(); + }); + this._cancelButton.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver); + this._cancelButton.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut); + element.Append((UIElement) this._cancelButton); + this._submitButton2 = new UITextPanel(this._edittingSign || this._edittingChest ? Language.GetText("UI.Save") : Language.GetText("UI.Submit"), 0.72f, true); + this._submitButton2.TextColor = Color.Silver; + this._submitButton2.DrawPanel = false; + this._submitButton2.Height.Pixels = 60f; + this._submitButton2.Width.Precent = 0.4f; + this._submitButton2.HAlign = 0.5f; + this._submitButton2.VAlign = 0.0f; + this._submitButton2.OnMouseOver += (UIElement.MouseEvent) ((a, b) => + { + ((UITextPanel) b).TextScale = 0.85f; + ((UITextPanel) b).TextColor = Color.White; + }); + this._submitButton2.OnMouseOut += (UIElement.MouseEvent) ((a, b) => + { + ((UITextPanel) b).TextScale = 0.72f; + ((UITextPanel) b).TextColor = Color.Silver; + }); + this._submitButton2.Top.Pixels = 50f; + this._submitButton2.PaddingLeft = 0.0f; + this._submitButton2.PaddingRight = 0.0f; + this.ValidateText(); + this._submitButton2.OnMouseOver += (UIElement.MouseEvent) ((evt, listeningElement) => this.ValidateText()); + this._submitButton2.OnMouseOut += (UIElement.MouseEvent) ((evt, listeningElement) => this.ValidateText()); + this._submitButton2.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver); + this._submitButton2.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut); + this._submitButton2.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + string text = this.Text.Trim(); + if (text.Length <= 0 && !this._edittingSign && !this._edittingChest && !this._allowEmpty) + return; + SoundEngine.PlaySound(10); + this._submitAction(text); + }); + this.outerLayer2.Append((UIElement) this._submitButton2); + this._cancelButton2 = new UITextPanel(Language.GetText("UI.Cancel"), 0.72f, true); + this._cancelButton2.TextColor = Color.Silver; + this._cancelButton2.DrawPanel = false; + this._cancelButton2.OnMouseOver += (UIElement.MouseEvent) ((a, b) => + { + ((UITextPanel) b).TextScale = 0.85f; + ((UITextPanel) b).TextColor = Color.White; + }); + this._cancelButton2.OnMouseOut += (UIElement.MouseEvent) ((a, b) => + { + ((UITextPanel) b).TextScale = 0.72f; + ((UITextPanel) b).TextColor = Color.Silver; + }); + this._cancelButton2.Height.Pixels = 60f; + this._cancelButton2.Width.Precent = 0.4f; + this._cancelButton2.Top.Pixels = 114f; + this._cancelButton2.VAlign = 0.0f; + this._cancelButton2.HAlign = 0.5f; + this._cancelButton2.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + SoundEngine.PlaySound(11); + this._cancelAction(); + }); + this.outerLayer2.Append((UIElement) this._cancelButton2); + UITextPanel keyboardButton1 = this.CreateKeyboardButton((object) "", 8, 4, 2); + keyboardButton1.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + SoundEngine.PlaySound(12); + this._textBox.Backspace(); + this.ValidateText(); + }); + keyboardButton1.PaddingLeft = 0.0f; + keyboardButton1.PaddingRight = 0.0f; + keyboardButton1.PaddingBottom = keyboardButton1.PaddingTop = 0.0f; + UIImage uiImage2 = new UIImage(this._textureBackspace); + uiImage2.HAlign = 0.5f; + uiImage2.VAlign = 0.5f; + uiImage2.ImageScale = 0.92f; + keyboardButton1.Append((UIElement) uiImage2); + mainPanel.Append((UIElement) keyboardButton1); + UIText uiText = new UIText(labelText, 0.75f, true); + uiText.HAlign = 0.5f; + uiText.Width.Pixels = num4; + uiText.Top.Pixels = (float) ((double) num5 - 37.0 - 4.0) + num2 + num1; + uiText.Top.Precent = num3; + uiText.Height.Pixels = 37f; + this.Append((UIElement) uiText); + this._label = uiText; + this.Append(element); + this._textBox.SetTextMaxLength(this._edittingSign ? 1200 : 20); + this.Text = startingText; + if (this.Text.Length == 0) + this.SetKeyState(UIVirtualKeyboard.KeyState.Shift); + UIVirtualKeyboard.ShouldHideText = true; + UIVirtualKeyboard.OffsetDown = 9999; + this.UpdateOffsetDown(); + } + + public void SetMaxInputLength(int length) => this._textBox.SetTextMaxLength(length); + + private void BuildSpaceBarArea(UIPanel mainPanel) + { + Action createTheseTwo = (Action) (() => + { + bool flag = this.CanRestore(); + int x = flag ? 4 : 5; + bool edittingSign = this._edittingSign; + int width = flag & edittingSign ? 2 : 3; + UITextPanel keyboardButton1 = this.CreateKeyboardButton((object) Language.GetText("UI.SpaceButton"), 2, 4, this._edittingSign || this._edittingChest & flag ? width : 6); + keyboardButton1.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + SoundEngine.PlaySound(12); + this._textBox.Write(" "); + this.ValidateText(); + }); + mainPanel.Append((UIElement) keyboardButton1); + this._spacebarButton = keyboardButton1; + if (!edittingSign) + return; + UITextPanel keyboardButton2 = this.CreateKeyboardButton((object) Language.GetText("UI.EnterButton"), x, 4, width); + keyboardButton2.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + SoundEngine.PlaySound(12); + this._textBox.Write("\n"); + this.ValidateText(); + }); + mainPanel.Append((UIElement) keyboardButton2); + this._enterButton = keyboardButton2; + }); + createTheseTwo(); + if (!this.CanRestore()) + return; + UITextPanel restoreBar = this.CreateKeyboardButton((object) Language.GetText("UI.RestoreButton"), 6, 4, 2); + restoreBar.OnClick += (UIElement.MouseEvent) ((evt, listeningElement) => + { + SoundEngine.PlaySound(12); + this.RestoreCancelledInput(this._keyboardContext); + this.ValidateText(); + restoreBar.Remove(); + this._enterButton.Remove(); + this._spacebarButton.Remove(); + createTheseTwo(); + }); + mainPanel.Append((UIElement) restoreBar); + this._restoreButton = restoreBar; + } + + private bool CanRestore() + { + if (this._edittingSign) + return UIVirtualKeyboard._cancelCacheSign.Length > 0; + return this._edittingChest && UIVirtualKeyboard._cancelCacheChest.Length > 0; + } + + private void TypeText(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + int num = this.Text.Length == 0 ? 1 : 0; + this._textBox.Write(((UITextPanel) listeningElement).Text); + this.ValidateText(); + if (num == 0 || this.Text.Length <= 0 || this._keyState != UIVirtualKeyboard.KeyState.Shift) + return; + this.SetKeyState(UIVirtualKeyboard.KeyState.Default); + } + + public void SetKeyState(UIVirtualKeyboard.KeyState keyState) + { + UITextPanel uiTextPanel1 = (UITextPanel) null; + switch (this._keyState) + { + case UIVirtualKeyboard.KeyState.Symbol: + uiTextPanel1 = this._symbolButton; + break; + case UIVirtualKeyboard.KeyState.Shift: + uiTextPanel1 = this._shiftButton; + break; + } + if (uiTextPanel1 != null) + { + if (uiTextPanel1.IsMouseHovering) + uiTextPanel1.BackgroundColor = new Color(73, 94, 171); + else + uiTextPanel1.BackgroundColor = new Color(63, 82, 151) * 0.7f; + } + string str = (string) null; + UITextPanel uiTextPanel2 = (UITextPanel) null; + switch (keyState) + { + case UIVirtualKeyboard.KeyState.Default: + str = "1234567890qwertyuiopasdfghjkl'zxcvbnm,.?"; + break; + case UIVirtualKeyboard.KeyState.Symbol: + str = "1234567890!@#$%^&*()-_+=/\\{}[]<>;:\"`|~£¥"; + uiTextPanel2 = this._symbolButton; + break; + case UIVirtualKeyboard.KeyState.Shift: + str = "1234567890QWERTYUIOPASDFGHJKL'ZXCVBNM,.?"; + uiTextPanel2 = this._shiftButton; + break; + } + for (int index = 0; index < str.Length; ++index) + this._keyList[index].SetText((object) str[index].ToString()); + this._keyState = keyState; + if (uiTextPanel2 == null) + return; + uiTextPanel2.BackgroundColor = new Color(93, 114, 191); + } + + private void ValidateText() + { + if (this.Text.Trim().Length > 0 || this._edittingSign || this._edittingChest || this._allowEmpty) + { + this._canSubmit = true; + this._submitButton.TextColor = Color.White; + if (this._submitButton.IsMouseHovering) + this._submitButton.BackgroundColor = new Color(73, 94, 171); + else + this._submitButton.BackgroundColor = new Color(63, 82, 151) * 0.7f; + } + else + { + this._canSubmit = false; + this._submitButton.TextColor = Color.Gray; + if (this._submitButton.IsMouseHovering) + this._submitButton.BackgroundColor = new Color(180, 60, 60) * 0.85f; + else + this._submitButton.BackgroundColor = new Color(150, 40, 40) * 0.85f; + } + } + + private void StyleKey(UITextPanel button, bool external = false) + { + button.PaddingLeft = 0.0f; + button.PaddingRight = 0.0f; + button.BackgroundColor = new Color(63, 82, 151) * 0.7f; + if (!external) + button.BorderColor = this._internalBorderColor * 0.7f; + button.OnMouseOver += (UIElement.MouseEvent) ((evt, listeningElement) => + { + ((UIPanel) listeningElement).BackgroundColor = new Color(73, 94, 171) * 0.85f; + if (external) + return; + ((UIPanel) listeningElement).BorderColor = this._internalBorderColorSelected * 0.85f; + }); + button.OnMouseOut += (UIElement.MouseEvent) ((evt, listeningElement) => + { + ((UIPanel) listeningElement).BackgroundColor = new Color(63, 82, 151) * 0.7f; + if (external) + return; + ((UIPanel) listeningElement).BorderColor = this._internalBorderColor * 0.7f; + }); + } + + private UITextPanel CreateKeyboardButton( + object text, + int x, + int y, + int width = 1, + bool style = true) + { + float num = 516f; + UITextPanel button = new UITextPanel(text, 0.4f, true); + button.Width.Pixels = (float) (48.0 * (double) width + 4.0 * (double) (width - 1)); + button.Height.Pixels = 37f; + button.Left.Precent = 0.5f; + button.Left.Pixels = (float) (52.0 * (double) x - (double) num * 0.5); + button.Top.Pixels = 41f * (float) y; + if (style) + this.StyleKey(button); + for (int index = 0; index < width; ++index) + this._keyList[y * 10 + x + index] = button; + return button; + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + if (Main.gameMenu) + { + if (PlayerInput.UsingGamepad) + { + this.outerLayer2.Remove(); + if (!this.Elements.Contains(this.outerLayer1)) + this.Append(this.outerLayer1); + this.outerLayer1.Activate(); + this.outerLayer2.Deactivate(); + this.Recalculate(); + this.RecalculateChildren(); + if ((double) this._labelHeight != 0.0) + { + this._textBox.Top.Pixels = this._textBoxHeight; + this._label.Top.Pixels = this._labelHeight; + this._textBox.Recalculate(); + this._label.Recalculate(); + this._labelHeight = this._textBoxHeight = 0.0f; + UserInterface.ActiveInstance.ResetLasts(); + } + } + else + { + this.outerLayer1.Remove(); + if (!this.Elements.Contains(this.outerLayer2)) + this.Append(this.outerLayer2); + this.outerLayer2.Activate(); + this.outerLayer1.Deactivate(); + this.Recalculate(); + this.RecalculateChildren(); + if ((double) this._textBoxHeight == 0.0) + { + this._textBoxHeight = this._textBox.Top.Pixels; + this._labelHeight = this._label.Top.Pixels; + this._textBox.Top.Pixels += 50f; + this._label.Top.Pixels += 50f; + this._textBox.Recalculate(); + this._label.Recalculate(); + UserInterface.ActiveInstance.ResetLasts(); + } + } + } + if (!Main.editSign && this._edittingSign) + IngameFancyUI.Close(); + else if (!Main.editChest && this._edittingChest) + { + IngameFancyUI.Close(); + } + else + { + base.DrawSelf(spriteBatch); + this.UpdateOffsetDown(); + UIVirtualKeyboard.OffsetDown = 0; + UIVirtualKeyboard.ShouldHideText = false; + this.SetupGamepadPoints(spriteBatch); + PlayerInput.WritingText = true; + Main.instance.HandleIME(); + Vector2 position = new Vector2((float) (Main.screenWidth / 2), (float) (this._textBox.GetDimensions().ToRectangle().Bottom + 32)); + Main.instance.DrawWindowsIMEPanel(position, 0.5f); + string inputText = Main.GetInputText(this.Text, this._edittingSign); + if (this._edittingSign && Main.inputTextEnter) + { + inputText += "\n"; + } + else + { + if (this._edittingChest && Main.inputTextEnter) + { + ChestUI.RenameChestSubmit(Main.player[Main.myPlayer]); + IngameFancyUI.Close(); + return; + } + if (Main.inputTextEnter && UIVirtualKeyboard.CanSubmit) + UIVirtualKeyboard.Submit(); + else if (this._edittingChest && Main.player[Main.myPlayer].chest < 0) + ChestUI.RenameChestCancel(); + else if (Main.inputTextEscape) + { + if (this._edittingSign) + Main.InputTextSignCancel(); + if (this._edittingChest) + ChestUI.RenameChestCancel(); + IngameFancyUI.Close(); + return; + } + } + if (IngameFancyUI.CanShowVirtualKeyboard(this._keyboardContext)) + { + if (inputText != this.Text) + this.Text = inputText; + if (this._edittingSign) + this.CopyTextToSign(); + if (this._edittingChest) + this.CopyTextToChest(); + } + byte num = (byte) (((int) byte.MaxValue + (int) Main.tileColor.R * 2) / 3); + Color color = new Color((int) num, (int) num, (int) num, (int) byte.MaxValue); + this._textBox.TextColor = Color.Lerp(Color.White, color, 0.2f); + this._label.TextColor = Color.Lerp(Color.White, color, 0.2f); + position = new Vector2((float) (Main.screenWidth / 2), (float) (this._textBox.GetDimensions().ToRectangle().Bottom + 32)); + Main.instance.DrawWindowsIMEPanel(position, 0.5f); + } + } + + private void UpdateOffsetDown() + { + this._textBox.HideSelf = UIVirtualKeyboard.ShouldHideText; + int num1 = UIVirtualKeyboard.OffsetDown - this._lastOffsetDown; + int num2 = num1; + if (Math.Abs(num1) < 10) + num2 = num1; + this._lastOffsetDown += num2; + if (num2 == 0) + return; + this.Top.Pixels += (float) num2; + this.Recalculate(); + } + + public override void OnActivate() + { + if (!PlayerInput.UsingGamepadUI || this._restoreButton == null) + return; + UILinkPointNavigator.ChangePoint(3002); + } + + public override void OnDeactivate() + { + base.OnDeactivate(); + PlayerInput.WritingText = false; + UILinkPointNavigator.Shortcuts.FANCYUI_SPECIAL_INSTRUCTIONS = 0; + } + + private void SetupGamepadPoints(SpriteBatch spriteBatch) + { + UILinkPointNavigator.Shortcuts.BackButtonCommand = 6; + UILinkPointNavigator.Shortcuts.FANCYUI_SPECIAL_INSTRUCTIONS = 1; + int num1 = 3002; + UILinkPointNavigator.SetPosition(3000, this._cancelButton.GetDimensions().Center()); + UILinkPoint point1 = UILinkPointNavigator.Points[3000]; + point1.Unlink(); + point1.Right = 3001; + point1.Up = num1 + 40; + UILinkPointNavigator.SetPosition(3001, this._submitButton.GetDimensions().Center()); + UILinkPoint point2 = UILinkPointNavigator.Points[3001]; + point2.Unlink(); + point2.Left = 3000; + point2.Up = num1 + 49; + for (int index1 = 0; index1 < 5; ++index1) + { + for (int index2 = 0; index2 < 10; ++index2) + { + int index3 = index1 * 10 + index2; + int num2 = num1 + index3; + if (this._keyList[index3] != null) + { + UILinkPointNavigator.SetPosition(num2, this._keyList[index3].GetDimensions().Center()); + UILinkPoint point3 = UILinkPointNavigator.Points[num2]; + point3.Unlink(); + int num3 = index2 - 1; + while (num3 >= 0 && this._keyList[index1 * 10 + num3] == this._keyList[index3]) + --num3; + point3.Left = num3 == -1 ? index1 * 10 + 9 + num1 : index1 * 10 + num3 + num1; + int index4 = index2 + 1; + while (index4 <= 9 && this._keyList[index1 * 10 + index4] == this._keyList[index3]) + ++index4; + point3.Right = index4 == 10 || this._keyList[index3] == this._keyList[index4] ? index1 * 10 + num1 : index1 * 10 + index4 + num1; + if (index1 != 0) + point3.Up = num2 - 10; + point3.Down = index1 == 4 ? (index2 < 5 ? 3000 : 3001) : num2 + 10; + } + } + } + } + + public static void CycleSymbols() + { + if (UIVirtualKeyboard._currentInstance == null) + return; + switch (UIVirtualKeyboard._currentInstance._keyState) + { + case UIVirtualKeyboard.KeyState.Default: + UIVirtualKeyboard._currentInstance.SetKeyState(UIVirtualKeyboard.KeyState.Shift); + break; + case UIVirtualKeyboard.KeyState.Symbol: + UIVirtualKeyboard._currentInstance.SetKeyState(UIVirtualKeyboard.KeyState.Default); + break; + case UIVirtualKeyboard.KeyState.Shift: + UIVirtualKeyboard._currentInstance.SetKeyState(UIVirtualKeyboard.KeyState.Symbol); + break; + } + } + + public static void BackSpace() + { + if (UIVirtualKeyboard._currentInstance == null) + return; + SoundEngine.PlaySound(12); + UIVirtualKeyboard._currentInstance._textBox.Backspace(); + UIVirtualKeyboard._currentInstance.ValidateText(); + } + + public static bool CanSubmit => UIVirtualKeyboard._currentInstance != null && UIVirtualKeyboard._currentInstance._canSubmit; + + public static void Submit() + { + if (UIVirtualKeyboard._currentInstance == null) + return; + UIVirtualKeyboard._currentInstance.InternalSubmit(); + } + + private void InternalSubmit() + { + string text = this.Text.Trim(); + if (text.Length <= 0 && !this._edittingSign && !this._edittingChest && !this._allowEmpty) + return; + SoundEngine.PlaySound(10); + this._submitAction(text); + } + + public static void Cancel() + { + if (UIVirtualKeyboard._currentInstance == null) + return; + SoundEngine.PlaySound(11); + UIVirtualKeyboard._currentInstance._cancelAction(); + } + + public static void Write(string text) + { + if (UIVirtualKeyboard._currentInstance == null) + return; + SoundEngine.PlaySound(12); + int num = UIVirtualKeyboard._currentInstance.Text.Length == 0 ? 1 : 0; + UIVirtualKeyboard._currentInstance._textBox.Write(text); + UIVirtualKeyboard._currentInstance.ValidateText(); + if (num == 0 || UIVirtualKeyboard._currentInstance.Text.Length <= 0 || UIVirtualKeyboard._currentInstance._keyState != UIVirtualKeyboard.KeyState.Shift) + return; + UIVirtualKeyboard._currentInstance.SetKeyState(UIVirtualKeyboard.KeyState.Default); + } + + public static void CursorLeft() + { + if (UIVirtualKeyboard._currentInstance == null) + return; + SoundEngine.PlaySound(12); + UIVirtualKeyboard._currentInstance._textBox.CursorLeft(); + } + + public static void CursorRight() + { + if (UIVirtualKeyboard._currentInstance == null) + return; + SoundEngine.PlaySound(12); + UIVirtualKeyboard._currentInstance._textBox.CursorRight(); + } + + public static bool CanDisplay(int keyboardContext) => keyboardContext != 1 || Main.screenHeight > 700; + + public static int KeyboardContext => UIVirtualKeyboard._currentInstance == null ? -1 : UIVirtualKeyboard._currentInstance._keyboardContext; + + public static void CacheCancelledInput(int cacheMode) + { + if (cacheMode != 1) + return; + UIVirtualKeyboard._cancelCacheSign = Main.npcChatText; + } + + private void RestoreCancelledInput(int cacheMode) + { + if (cacheMode != 1) + return; + Main.npcChatText = UIVirtualKeyboard._cancelCacheSign; + this.Text = Main.npcChatText; + UIVirtualKeyboard._cancelCacheSign = ""; + } + + private void CopyTextToSign() + { + if (!this._edittingSign) + return; + int sign = Main.player[Main.myPlayer].sign; + if (sign < 0 || Main.sign[sign] == null) + return; + Main.npcChatText = this.Text; + } + + private void CopyTextToChest() + { + if (!this._edittingChest) + return; + Main.npcChatText = this.Text; + } + + private void FadedMouseOver(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + ((UIPanel) evt.Target).BackgroundColor = new Color(73, 94, 171); + ((UIPanel) evt.Target).BorderColor = Colors.FancyUIFatButtonMouseOver; + } + + private void FadedMouseOut(UIMouseEvent evt, UIElement listeningElement) + { + ((UIPanel) evt.Target).BackgroundColor = new Color(63, 82, 151) * 0.7f; + ((UIPanel) evt.Target).BorderColor = Color.Black; + } + + public delegate void KeyboardSubmitEvent(string text); + + public enum KeyState + { + Default, + Symbol, + Shift, + } + } +} diff --git a/GameContent/UI/States/UIWorldCreation.cs b/GameContent/UI/States/UIWorldCreation.cs new file mode 100644 index 0000000..223628b --- /dev/null +++ b/GameContent/UI/States/UIWorldCreation.cs @@ -0,0 +1,927 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UIWorldCreation +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.Audio; +using Terraria.GameContent.UI.Elements; +using Terraria.ID; +using Terraria.IO; +using Terraria.Localization; +using Terraria.Social; +using Terraria.UI; +using Terraria.UI.Gamepad; + +namespace Terraria.GameContent.UI.States +{ + public class UIWorldCreation : UIState + { + private UIWorldCreation.WorldSizeId _optionSize; + private UIWorldCreation.WorldDifficultyId _optionDifficulty; + private UIWorldCreation.WorldEvilId _optionEvil; + private string _optionwWorldName; + private string _optionSeed; + private UICharacterNameButton _namePlate; + private UICharacterNameButton _seedPlate; + private UIWorldCreationPreview _previewPlate; + private GroupOptionButton[] _sizeButtons; + private GroupOptionButton[] _difficultyButtons; + private GroupOptionButton[] _evilButtons; + private UIText _descriptionText; + private const int MAX_NAME_LENGTH = 27; + private const int MAX_SEED_LENGTH = 40; + + public UIWorldCreation() => this.BuildPage(); + + private void BuildPage() + { + int num = 18; + this.RemoveAllChildren(); + UIElement uiElement1 = new UIElement() + { + Width = StyleDimension.FromPixels(500f), + Height = StyleDimension.FromPixels(434f + (float) num), + Top = StyleDimension.FromPixels(170f - (float) num), + HAlign = 0.5f, + VAlign = 0.0f + }; + uiElement1.SetPadding(0.0f); + this.Append(uiElement1); + UIPanel uiPanel1 = new UIPanel(); + uiPanel1.Width = StyleDimension.FromPercent(1f); + uiPanel1.Height = StyleDimension.FromPixels((float) (280 + num)); + uiPanel1.Top = StyleDimension.FromPixels(50f); + uiPanel1.BackgroundColor = new Color(33, 43, 79) * 0.8f; + UIPanel uiPanel2 = uiPanel1; + uiPanel2.SetPadding(0.0f); + uiElement1.Append((UIElement) uiPanel2); + this.MakeBackAndCreatebuttons(uiElement1); + UIElement uiElement2 = new UIElement() + { + Top = StyleDimension.FromPixelsAndPercent(0.0f, 0.0f), + Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f), + Height = StyleDimension.FromPixelsAndPercent(0.0f, 1f), + HAlign = 1f + }; + uiElement2.SetPadding(0.0f); + uiElement2.PaddingTop = 8f; + uiElement2.PaddingBottom = 12f; + uiPanel2.Append(uiElement2); + this.MakeInfoMenu(uiElement2); + } + + private void MakeInfoMenu(UIElement parentContainer) + { + UIElement uiElement = new UIElement() + { + Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f), + Height = StyleDimension.FromPixelsAndPercent(0.0f, 1f), + HAlign = 0.5f, + VAlign = 0.0f + }; + uiElement.SetPadding(10f); + uiElement.PaddingBottom = 0.0f; + uiElement.PaddingTop = 0.0f; + parentContainer.Append(uiElement); + float pixels1 = 0.0f; + float num1 = 44f; + float num2 = (float) (88.0 + (double) num1); + float pixels2 = num1; + GroupOptionButton groupOptionButton1 = new GroupOptionButton(true, (LocalizedText) null, Language.GetText("UI.WorldCreationRandomizeNameDescription"), Color.White, "Images/UI/WorldCreation/IconRandomName"); + groupOptionButton1.Width = StyleDimension.FromPixelsAndPercent(40f, 0.0f); + groupOptionButton1.Height = new StyleDimension(40f, 0.0f); + groupOptionButton1.HAlign = 0.0f; + groupOptionButton1.Top = StyleDimension.FromPixelsAndPercent(pixels1, 0.0f); + groupOptionButton1.ShowHighlightWhenSelected = false; + GroupOptionButton groupOptionButton2 = groupOptionButton1; + groupOptionButton2.OnMouseDown += new UIElement.MouseEvent(this.ClickRandomizeName); + groupOptionButton2.OnMouseOver += new UIElement.MouseEvent(this.ShowOptionDescription); + groupOptionButton2.OnMouseOut += new UIElement.MouseEvent(this.ClearOptionDescription); + groupOptionButton2.SetSnapPoint("RandomizeName", 0); + uiElement.Append((UIElement) groupOptionButton2); + UICharacterNameButton characterNameButton1 = new UICharacterNameButton(Language.GetText("UI.WorldCreationName"), Language.GetText("UI.WorldCreationNameEmpty"), Language.GetText("UI.WorldDescriptionName")); + characterNameButton1.Width = StyleDimension.FromPixelsAndPercent(-num2, 1f); + characterNameButton1.HAlign = 0.0f; + characterNameButton1.Left = new StyleDimension(pixels2, 0.0f); + characterNameButton1.Top = StyleDimension.FromPixelsAndPercent(pixels1, 0.0f); + UICharacterNameButton characterNameButton2 = characterNameButton1; + characterNameButton2.OnMouseDown += new UIElement.MouseEvent(this.Click_SetName); + characterNameButton2.OnMouseOver += new UIElement.MouseEvent(this.ShowOptionDescription); + characterNameButton2.OnMouseOut += new UIElement.MouseEvent(this.ClearOptionDescription); + characterNameButton2.SetSnapPoint("Name", 0); + uiElement.Append((UIElement) characterNameButton2); + this._namePlate = characterNameButton2; + CalculatedStyle dimensions1 = characterNameButton2.GetDimensions(); + float pixels3 = pixels1 + (dimensions1.Height + 4f); + GroupOptionButton groupOptionButton3 = new GroupOptionButton(true, (LocalizedText) null, Language.GetText("UI.WorldCreationRandomizeSeedDescription"), Color.White, "Images/UI/WorldCreation/IconRandomSeed"); + groupOptionButton3.Width = StyleDimension.FromPixelsAndPercent(40f, 0.0f); + groupOptionButton3.Height = new StyleDimension(40f, 0.0f); + groupOptionButton3.HAlign = 0.0f; + groupOptionButton3.Top = StyleDimension.FromPixelsAndPercent(pixels3, 0.0f); + groupOptionButton3.ShowHighlightWhenSelected = false; + GroupOptionButton groupOptionButton4 = groupOptionButton3; + groupOptionButton4.OnMouseDown += new UIElement.MouseEvent(this.ClickRandomizeSeed); + groupOptionButton4.OnMouseOver += new UIElement.MouseEvent(this.ShowOptionDescription); + groupOptionButton4.OnMouseOut += new UIElement.MouseEvent(this.ClearOptionDescription); + groupOptionButton4.SetSnapPoint("RandomizeSeed", 0); + uiElement.Append((UIElement) groupOptionButton4); + UICharacterNameButton characterNameButton3 = new UICharacterNameButton(Language.GetText("UI.WorldCreationSeed"), Language.GetText("UI.WorldCreationSeedEmpty"), Language.GetText("UI.WorldDescriptionSeed")); + characterNameButton3.Width = StyleDimension.FromPixelsAndPercent(-num2, 1f); + characterNameButton3.HAlign = 0.0f; + characterNameButton3.Left = new StyleDimension(pixels2, 0.0f); + characterNameButton3.Top = StyleDimension.FromPixelsAndPercent(pixels3, 0.0f); + characterNameButton3.DistanceFromTitleToOption = 29f; + UICharacterNameButton characterNameButton4 = characterNameButton3; + characterNameButton4.OnMouseDown += new UIElement.MouseEvent(this.Click_SetSeed); + characterNameButton4.OnMouseOver += new UIElement.MouseEvent(this.ShowOptionDescription); + characterNameButton4.OnMouseOut += new UIElement.MouseEvent(this.ClearOptionDescription); + characterNameButton4.SetSnapPoint("Seed", 0); + uiElement.Append((UIElement) characterNameButton4); + this._seedPlate = characterNameButton4; + UIWorldCreationPreview worldCreationPreview1 = new UIWorldCreationPreview(); + worldCreationPreview1.Width = StyleDimension.FromPixels(84f); + worldCreationPreview1.Height = StyleDimension.FromPixels(84f); + worldCreationPreview1.HAlign = 1f; + worldCreationPreview1.VAlign = 0.0f; + UIWorldCreationPreview worldCreationPreview2 = worldCreationPreview1; + uiElement.Append((UIElement) worldCreationPreview2); + this._previewPlate = worldCreationPreview2; + CalculatedStyle dimensions2 = characterNameButton4.GetDimensions(); + float accumualtedHeight1 = pixels3 + (dimensions2.Height + 10f); + UIWorldCreation.AddHorizontalSeparator(uiElement, accumualtedHeight1 + 2f); + float usableWidthPercent = 1f; + this.AddWorldSizeOptions(uiElement, accumualtedHeight1, new UIElement.MouseEvent(this.ClickSizeOption), "size", usableWidthPercent); + float accumualtedHeight2 = accumualtedHeight1 + 48f; + UIWorldCreation.AddHorizontalSeparator(uiElement, accumualtedHeight2); + this.AddWorldDifficultyOptions(uiElement, accumualtedHeight2, new UIElement.MouseEvent(this.ClickDifficultyOption), "difficulty", usableWidthPercent); + float accumualtedHeight3 = accumualtedHeight2 + 48f; + UIWorldCreation.AddHorizontalSeparator(uiElement, accumualtedHeight3); + this.AddWorldEvilOptions(uiElement, accumualtedHeight3, new UIElement.MouseEvent(this.ClickEvilOption), "evil", usableWidthPercent); + float num3 = accumualtedHeight3 + 48f; + UIWorldCreation.AddHorizontalSeparator(uiElement, num3); + this.AddDescriptionPanel(uiElement, num3, "desc"); + this.SetDefaultOptions(); + } + + private static void AddHorizontalSeparator(UIElement Container, float accumualtedHeight) + { + UIHorizontalSeparator horizontalSeparator1 = new UIHorizontalSeparator(); + horizontalSeparator1.Width = StyleDimension.FromPercent(1f); + horizontalSeparator1.Top = StyleDimension.FromPixels(accumualtedHeight - 8f); + horizontalSeparator1.Color = Color.Lerp(Color.White, new Color(63, 65, 151, (int) byte.MaxValue), 0.85f) * 0.9f; + UIHorizontalSeparator horizontalSeparator2 = horizontalSeparator1; + Container.Append((UIElement) horizontalSeparator2); + } + + private void SetDefaultOptions() + { + this.AssignRandomWorldName(); + this.AssignRandomWorldSeed(); + this.UpdateInputFields(); + foreach (GroupOptionButton sizeButton in this._sizeButtons) + sizeButton.SetCurrentOption(UIWorldCreation.WorldSizeId.Small); + if (Main.ActivePlayerFileData.Player.difficulty == (byte) 3) + { + foreach (GroupOptionButton difficultyButton in this._difficultyButtons) + difficultyButton.SetCurrentOption(UIWorldCreation.WorldDifficultyId.Creative); + this._optionDifficulty = UIWorldCreation.WorldDifficultyId.Creative; + this.UpdatePreviewPlate(); + } + else + { + foreach (GroupOptionButton difficultyButton in this._difficultyButtons) + difficultyButton.SetCurrentOption(UIWorldCreation.WorldDifficultyId.Normal); + } + foreach (GroupOptionButton evilButton in this._evilButtons) + evilButton.SetCurrentOption(UIWorldCreation.WorldEvilId.Random); + } + + private void AddDescriptionPanel(UIElement container, float accumulatedHeight, string tagGroup) + { + float num = 0.0f; + UISlicedImage uiSlicedImage1 = new UISlicedImage(Main.Assets.Request("Images/UI/CharCreation/CategoryPanelHighlight", (AssetRequestMode) 1)); + uiSlicedImage1.HAlign = 0.5f; + uiSlicedImage1.VAlign = 1f; + uiSlicedImage1.Width = StyleDimension.FromPixelsAndPercent((float) (-(double) num * 2.0), 1f); + uiSlicedImage1.Left = StyleDimension.FromPixels(-num); + uiSlicedImage1.Height = StyleDimension.FromPixelsAndPercent(40f, 0.0f); + uiSlicedImage1.Top = StyleDimension.FromPixels(2f); + UISlicedImage uiSlicedImage2 = uiSlicedImage1; + uiSlicedImage2.SetSliceDepths(10); + uiSlicedImage2.Color = Color.LightGray * 0.7f; + container.Append((UIElement) uiSlicedImage2); + UIText uiText1 = new UIText(Language.GetText("UI.WorldDescriptionDefault"), 0.82f); + uiText1.HAlign = 0.0f; + uiText1.VAlign = 0.0f; + uiText1.Width = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + uiText1.Height = StyleDimension.FromPixelsAndPercent(0.0f, 1f); + uiText1.Top = StyleDimension.FromPixelsAndPercent(5f, 0.0f); + UIText uiText2 = uiText1; + uiText2.PaddingLeft = 20f; + uiText2.PaddingRight = 20f; + uiText2.PaddingTop = 6f; + uiSlicedImage2.Append((UIElement) uiText2); + this._descriptionText = uiText2; + } + + private void AddWorldSizeOptions( + UIElement container, + float accumualtedHeight, + UIElement.MouseEvent clickEvent, + string tagGroup, + float usableWidthPercent) + { + UIWorldCreation.WorldSizeId[] worldSizeIdArray = new UIWorldCreation.WorldSizeId[3] + { + UIWorldCreation.WorldSizeId.Small, + UIWorldCreation.WorldSizeId.Medium, + UIWorldCreation.WorldSizeId.Large + }; + LocalizedText[] localizedTextArray1 = new LocalizedText[3] + { + Lang.menu[92], + Lang.menu[93], + Lang.menu[94] + }; + LocalizedText[] localizedTextArray2 = new LocalizedText[3] + { + Language.GetText("UI.WorldDescriptionSizeSmall"), + Language.GetText("UI.WorldDescriptionSizeMedium"), + Language.GetText("UI.WorldDescriptionSizeLarge") + }; + Color[] colorArray = new Color[3] + { + Color.Cyan, + Color.Lerp(Color.Cyan, Color.LimeGreen, 0.5f), + Color.LimeGreen + }; + string[] strArray = new string[3] + { + "Images/UI/WorldCreation/IconSizeSmall", + "Images/UI/WorldCreation/IconSizeMedium", + "Images/UI/WorldCreation/IconSizeLarge" + }; + GroupOptionButton[] groupOptionButtonArray = new GroupOptionButton[worldSizeIdArray.Length]; + for (int id = 0; id < groupOptionButtonArray.Length; ++id) + { + GroupOptionButton groupOptionButton = new GroupOptionButton(worldSizeIdArray[id], localizedTextArray1[id], localizedTextArray2[id], colorArray[id], strArray[id], titleAlignmentX: 1f, titleWidthReduction: 16f); + groupOptionButton.Width = StyleDimension.FromPixelsAndPercent((float) (-4 * (groupOptionButtonArray.Length - 1)), 1f / (float) groupOptionButtonArray.Length * usableWidthPercent); + groupOptionButton.Left = StyleDimension.FromPercent(1f - usableWidthPercent); + groupOptionButton.HAlign = (float) id / (float) (groupOptionButtonArray.Length - 1); + groupOptionButton.Top.Set(accumualtedHeight, 0.0f); + groupOptionButton.OnMouseDown += clickEvent; + groupOptionButton.OnMouseOver += new UIElement.MouseEvent(this.ShowOptionDescription); + groupOptionButton.OnMouseOut += new UIElement.MouseEvent(this.ClearOptionDescription); + groupOptionButton.SetSnapPoint(tagGroup, id); + container.Append((UIElement) groupOptionButton); + groupOptionButtonArray[id] = groupOptionButton; + } + this._sizeButtons = groupOptionButtonArray; + } + + private void AddWorldDifficultyOptions( + UIElement container, + float accumualtedHeight, + UIElement.MouseEvent clickEvent, + string tagGroup, + float usableWidthPercent) + { + UIWorldCreation.WorldDifficultyId[] worldDifficultyIdArray = new UIWorldCreation.WorldDifficultyId[4] + { + UIWorldCreation.WorldDifficultyId.Creative, + UIWorldCreation.WorldDifficultyId.Normal, + UIWorldCreation.WorldDifficultyId.Expert, + UIWorldCreation.WorldDifficultyId.Master + }; + LocalizedText[] localizedTextArray1 = new LocalizedText[4] + { + Language.GetText("UI.Creative"), + Language.GetText("UI.Normal"), + Language.GetText("UI.Expert"), + Language.GetText("UI.Master") + }; + LocalizedText[] localizedTextArray2 = new LocalizedText[4] + { + Language.GetText("UI.WorldDescriptionCreative"), + Language.GetText("UI.WorldDescriptionNormal"), + Language.GetText("UI.WorldDescriptionExpert"), + Language.GetText("UI.WorldDescriptionMaster") + }; + Color[] colorArray = new Color[4] + { + Main.creativeModeColor, + Color.White, + Main.mcColor, + Main.hcColor + }; + string[] strArray = new string[4] + { + "Images/UI/WorldCreation/IconDifficultyCreative", + "Images/UI/WorldCreation/IconDifficultyNormal", + "Images/UI/WorldCreation/IconDifficultyExpert", + "Images/UI/WorldCreation/IconDifficultyMaster" + }; + GroupOptionButton[] groupOptionButtonArray = new GroupOptionButton[worldDifficultyIdArray.Length]; + for (int id = 0; id < groupOptionButtonArray.Length; ++id) + { + GroupOptionButton groupOptionButton = new GroupOptionButton(worldDifficultyIdArray[id], localizedTextArray1[id], localizedTextArray2[id], colorArray[id], strArray[id], titleAlignmentX: 1f, titleWidthReduction: 16f); + groupOptionButton.Width = StyleDimension.FromPixelsAndPercent((float) (-1 * (groupOptionButtonArray.Length - 1)), 1f / (float) groupOptionButtonArray.Length * usableWidthPercent); + groupOptionButton.Left = StyleDimension.FromPercent(1f - usableWidthPercent); + groupOptionButton.HAlign = (float) id / (float) (groupOptionButtonArray.Length - 1); + groupOptionButton.Top.Set(accumualtedHeight, 0.0f); + groupOptionButton.OnMouseDown += clickEvent; + groupOptionButton.OnMouseOver += new UIElement.MouseEvent(this.ShowOptionDescription); + groupOptionButton.OnMouseOut += new UIElement.MouseEvent(this.ClearOptionDescription); + groupOptionButton.SetSnapPoint(tagGroup, id); + container.Append((UIElement) groupOptionButton); + groupOptionButtonArray[id] = groupOptionButton; + } + this._difficultyButtons = groupOptionButtonArray; + } + + private void AddWorldEvilOptions( + UIElement container, + float accumualtedHeight, + UIElement.MouseEvent clickEvent, + string tagGroup, + float usableWidthPercent) + { + UIWorldCreation.WorldEvilId[] worldEvilIdArray = new UIWorldCreation.WorldEvilId[3] + { + UIWorldCreation.WorldEvilId.Random, + UIWorldCreation.WorldEvilId.Corruption, + UIWorldCreation.WorldEvilId.Crimson + }; + LocalizedText[] localizedTextArray1 = new LocalizedText[3] + { + Lang.misc[103], + Lang.misc[101], + Lang.misc[102] + }; + LocalizedText[] localizedTextArray2 = new LocalizedText[3] + { + Language.GetText("UI.WorldDescriptionEvilRandom"), + Language.GetText("UI.WorldDescriptionEvilCorrupt"), + Language.GetText("UI.WorldDescriptionEvilCrimson") + }; + Color[] colorArray = new Color[3] + { + Color.White, + Color.MediumPurple, + Color.IndianRed + }; + string[] strArray = new string[3] + { + "Images/UI/WorldCreation/IconEvilRandom", + "Images/UI/WorldCreation/IconEvilCorruption", + "Images/UI/WorldCreation/IconEvilCrimson" + }; + GroupOptionButton[] groupOptionButtonArray = new GroupOptionButton[worldEvilIdArray.Length]; + for (int id = 0; id < groupOptionButtonArray.Length; ++id) + { + GroupOptionButton groupOptionButton = new GroupOptionButton(worldEvilIdArray[id], localizedTextArray1[id], localizedTextArray2[id], colorArray[id], strArray[id], titleAlignmentX: 1f, titleWidthReduction: 16f); + groupOptionButton.Width = StyleDimension.FromPixelsAndPercent((float) (-4 * (groupOptionButtonArray.Length - 1)), 1f / (float) groupOptionButtonArray.Length * usableWidthPercent); + groupOptionButton.Left = StyleDimension.FromPercent(1f - usableWidthPercent); + groupOptionButton.HAlign = (float) id / (float) (groupOptionButtonArray.Length - 1); + groupOptionButton.Top.Set(accumualtedHeight, 0.0f); + groupOptionButton.OnMouseDown += clickEvent; + groupOptionButton.OnMouseOver += new UIElement.MouseEvent(this.ShowOptionDescription); + groupOptionButton.OnMouseOut += new UIElement.MouseEvent(this.ClearOptionDescription); + groupOptionButton.SetSnapPoint(tagGroup, id); + container.Append((UIElement) groupOptionButton); + groupOptionButtonArray[id] = groupOptionButton; + } + this._evilButtons = groupOptionButtonArray; + } + + private void ClickRandomizeName(UIMouseEvent evt, UIElement listeningElement) + { + this.AssignRandomWorldName(); + this.UpdateInputFields(); + this.UpdateSliders(); + this.UpdatePreviewPlate(); + } + + private void ClickRandomizeSeed(UIMouseEvent evt, UIElement listeningElement) + { + this.AssignRandomWorldSeed(); + this.UpdateInputFields(); + this.UpdateSliders(); + this.UpdatePreviewPlate(); + } + + private void ClickSizeOption(UIMouseEvent evt, UIElement listeningElement) + { + GroupOptionButton groupOptionButton = (GroupOptionButton) listeningElement; + this._optionSize = groupOptionButton.OptionValue; + foreach (GroupOptionButton sizeButton in this._sizeButtons) + sizeButton.SetCurrentOption(groupOptionButton.OptionValue); + this.UpdatePreviewPlate(); + } + + private void ClickDifficultyOption(UIMouseEvent evt, UIElement listeningElement) + { + GroupOptionButton groupOptionButton = (GroupOptionButton) listeningElement; + this._optionDifficulty = groupOptionButton.OptionValue; + foreach (GroupOptionButton difficultyButton in this._difficultyButtons) + difficultyButton.SetCurrentOption(groupOptionButton.OptionValue); + this.UpdatePreviewPlate(); + } + + private void ClickEvilOption(UIMouseEvent evt, UIElement listeningElement) + { + GroupOptionButton groupOptionButton = (GroupOptionButton) listeningElement; + this._optionEvil = groupOptionButton.OptionValue; + foreach (GroupOptionButton evilButton in this._evilButtons) + evilButton.SetCurrentOption(groupOptionButton.OptionValue); + this.UpdatePreviewPlate(); + } + + private void UpdatePreviewPlate() => this._previewPlate.UpdateOption((byte) this._optionDifficulty, (byte) this._optionEvil, (byte) this._optionSize); + + private void UpdateSliders() + { + foreach (GroupOptionButton sizeButton in this._sizeButtons) + sizeButton.SetCurrentOption(this._optionSize); + foreach (GroupOptionButton difficultyButton in this._difficultyButtons) + difficultyButton.SetCurrentOption(this._optionDifficulty); + foreach (GroupOptionButton evilButton in this._evilButtons) + evilButton.SetCurrentOption(this._optionEvil); + } + + public void ShowOptionDescription(UIMouseEvent evt, UIElement listeningElement) + { + LocalizedText text = (LocalizedText) null; + if (listeningElement is GroupOptionButton groupOptionButton1) + text = groupOptionButton1.Description; + if (listeningElement is GroupOptionButton groupOptionButton2) + text = groupOptionButton2.Description; + if (listeningElement is GroupOptionButton groupOptionButton3) + text = groupOptionButton3.Description; + if (listeningElement is UICharacterNameButton characterNameButton) + text = characterNameButton.Description; + if (listeningElement is GroupOptionButton groupOptionButton4) + text = groupOptionButton4.Description; + if (text == null) + return; + this._descriptionText.SetText(text); + } + + public void ClearOptionDescription(UIMouseEvent evt, UIElement listeningElement) => this._descriptionText.SetText(Language.GetText("UI.WorldDescriptionDefault")); + + private void MakeBackAndCreatebuttons(UIElement outerContainer) + { + UITextPanel uiTextPanel1 = new UITextPanel(Language.GetText("UI.Back"), 0.7f, true); + uiTextPanel1.Width = StyleDimension.FromPixelsAndPercent(-10f, 0.5f); + uiTextPanel1.Height = StyleDimension.FromPixels(50f); + uiTextPanel1.VAlign = 1f; + uiTextPanel1.HAlign = 0.0f; + uiTextPanel1.Top = StyleDimension.FromPixels(-45f); + UITextPanel uiTextPanel2 = uiTextPanel1; + uiTextPanel2.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver); + uiTextPanel2.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut); + uiTextPanel2.OnMouseDown += new UIElement.MouseEvent(this.Click_GoBack); + uiTextPanel2.SetSnapPoint("Back", 0); + outerContainer.Append((UIElement) uiTextPanel2); + UITextPanel uiTextPanel3 = new UITextPanel(Language.GetText("UI.Create"), 0.7f, true); + uiTextPanel3.Width = StyleDimension.FromPixelsAndPercent(-10f, 0.5f); + uiTextPanel3.Height = StyleDimension.FromPixels(50f); + uiTextPanel3.VAlign = 1f; + uiTextPanel3.HAlign = 1f; + uiTextPanel3.Top = StyleDimension.FromPixels(-45f); + UITextPanel uiTextPanel4 = uiTextPanel3; + uiTextPanel4.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver); + uiTextPanel4.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut); + uiTextPanel4.OnMouseDown += new UIElement.MouseEvent(this.Click_NamingAndCreating); + uiTextPanel4.SetSnapPoint("Create", 0); + outerContainer.Append((UIElement) uiTextPanel4); + } + + private void Click_GoBack(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(11); + Main.OpenWorldSelectUI(); + } + + private void FadedMouseOver(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + ((UIPanel) evt.Target).BackgroundColor = new Color(73, 94, 171); + ((UIPanel) evt.Target).BorderColor = Colors.FancyUIFatButtonMouseOver; + } + + private void FadedMouseOut(UIMouseEvent evt, UIElement listeningElement) + { + ((UIPanel) evt.Target).BackgroundColor = new Color(63, 82, 151) * 0.8f; + ((UIPanel) evt.Target).BorderColor = Color.Black; + } + + private void Click_SetName(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(10); + Main.clrInput(); + UIVirtualKeyboard uiVirtualKeyboard = new UIVirtualKeyboard(Lang.menu[48].Value, "", new UIVirtualKeyboard.KeyboardSubmitEvent(this.OnFinishedSettingName), new Action(this.GoBackHere), allowEmpty: true); + uiVirtualKeyboard.SetMaxInputLength(27); + Main.MenuUI.SetState((UIState) uiVirtualKeyboard); + } + + private void Click_SetSeed(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(10); + Main.clrInput(); + UIVirtualKeyboard uiVirtualKeyboard = new UIVirtualKeyboard(Language.GetTextValue("UI.EnterSeed"), "", new UIVirtualKeyboard.KeyboardSubmitEvent(this.OnFinishedSettingSeed), new Action(this.GoBackHere), allowEmpty: true); + uiVirtualKeyboard.SetMaxInputLength(40); + Main.MenuUI.SetState((UIState) uiVirtualKeyboard); + } + + private void Click_NamingAndCreating(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(10); + if (string.IsNullOrEmpty(this._optionwWorldName)) + { + this._optionwWorldName = ""; + Main.clrInput(); + UIVirtualKeyboard uiVirtualKeyboard = new UIVirtualKeyboard(Lang.menu[48].Value, "", new UIVirtualKeyboard.KeyboardSubmitEvent(this.OnFinishedNamingAndCreating), new Action(this.GoBackHere)); + uiVirtualKeyboard.SetMaxInputLength(27); + Main.MenuUI.SetState((UIState) uiVirtualKeyboard); + } + else + this.FinishCreatingWorld(); + } + + private void OnFinishedSettingName(string name) + { + this._optionwWorldName = name.Trim(); + this.UpdateInputFields(); + this.GoBackHere(); + } + + private void UpdateInputFields() + { + this._namePlate.SetContents(this._optionwWorldName); + this._namePlate.TrimDisplayIfOverElementDimensions(27); + this._namePlate.Recalculate(); + this._seedPlate.SetContents(this._optionSeed); + this._seedPlate.TrimDisplayIfOverElementDimensions(40); + this._seedPlate.Recalculate(); + } + + private void OnFinishedSettingSeed(string seed) + { + this._optionSeed = seed.Trim(); + string processedSeed; + this.ProcessSeed(out processedSeed); + this._optionSeed = processedSeed; + this.UpdateInputFields(); + this.UpdateSliders(); + this.UpdatePreviewPlate(); + this.GoBackHere(); + } + + private void GoBackHere() => Main.MenuUI.SetState((UIState) this); + + private void OnFinishedNamingAndCreating(string name) + { + this.OnFinishedSettingName(name); + this.FinishCreatingWorld(); + } + + private void FinishCreatingWorld() + { + string processedSeed; + this.ProcessSeed(out processedSeed); + switch (this._optionSize) + { + case UIWorldCreation.WorldSizeId.Small: + Main.maxTilesX = 4200; + Main.maxTilesY = 1200; + break; + case UIWorldCreation.WorldSizeId.Medium: + Main.maxTilesX = 6400; + Main.maxTilesY = 1800; + break; + case UIWorldCreation.WorldSizeId.Large: + Main.maxTilesX = 8400; + Main.maxTilesY = 2400; + break; + } + WorldGen.setWorldSize(); + switch (this._optionDifficulty) + { + case UIWorldCreation.WorldDifficultyId.Normal: + Main.GameMode = 0; + break; + case UIWorldCreation.WorldDifficultyId.Expert: + Main.GameMode = 1; + break; + case UIWorldCreation.WorldDifficultyId.Master: + Main.GameMode = 2; + break; + case UIWorldCreation.WorldDifficultyId.Creative: + Main.GameMode = 3; + break; + } + switch (this._optionEvil) + { + case UIWorldCreation.WorldEvilId.Random: + WorldGen.WorldGenParam_Evil = -1; + break; + case UIWorldCreation.WorldEvilId.Corruption: + WorldGen.WorldGenParam_Evil = 0; + break; + case UIWorldCreation.WorldEvilId.Crimson: + WorldGen.WorldGenParam_Evil = 1; + break; + } + Main.ActiveWorldFileData = WorldFile.CreateMetadata(Main.worldName = this._optionwWorldName.Trim(), SocialAPI.Cloud != null && SocialAPI.Cloud.EnabledByDefault, Main.GameMode); + if (processedSeed.Length == 0) + Main.ActiveWorldFileData.SetSeedToRandom(); + else + Main.ActiveWorldFileData.SetSeed(processedSeed); + Main.menuMode = 10; + WorldGen.CreateNewWorld(); + } + + private void ProcessSeed(out string processedSeed) + { + processedSeed = this._optionSeed; + WorldGen.notTheBees = processedSeed.ToLower() == "not the bees" || processedSeed.ToLower() == "not the bees!"; + WorldGen.getGoodWorldGen = processedSeed.ToLower() == "for the worthy"; + string[] strArray = this._optionSeed.Split('.'); + if (strArray.Length != 4) + return; + int result; + if (int.TryParse(strArray[0], out result)) + { + switch (result) + { + case 1: + this._optionSize = UIWorldCreation.WorldSizeId.Small; + break; + case 2: + this._optionSize = UIWorldCreation.WorldSizeId.Medium; + break; + case 3: + this._optionSize = UIWorldCreation.WorldSizeId.Large; + break; + } + } + if (int.TryParse(strArray[1], out result)) + { + switch (result) + { + case 1: + this._optionDifficulty = UIWorldCreation.WorldDifficultyId.Normal; + break; + case 2: + this._optionDifficulty = UIWorldCreation.WorldDifficultyId.Expert; + break; + case 3: + this._optionDifficulty = UIWorldCreation.WorldDifficultyId.Master; + break; + case 4: + this._optionDifficulty = UIWorldCreation.WorldDifficultyId.Creative; + break; + } + } + if (int.TryParse(strArray[2], out result)) + { + switch (result) + { + case 1: + this._optionEvil = UIWorldCreation.WorldEvilId.Corruption; + break; + case 2: + this._optionEvil = UIWorldCreation.WorldEvilId.Crimson; + break; + } + } + processedSeed = strArray[3]; + } + + private void AssignRandomWorldName() + { + do + { + LocalizedText localizedText = Language.SelectRandom(Lang.CreateDialogFilter("RandomWorldName_Composition.")); + var data = new + { + Adjective = Language.SelectRandom(Lang.CreateDialogFilter("RandomWorldName_Adjective.")).Value, + Location = Language.SelectRandom(Lang.CreateDialogFilter("RandomWorldName_Location.")).Value, + Noun = Language.SelectRandom(Lang.CreateDialogFilter("RandomWorldName_Noun.")).Value + }; + this._optionwWorldName = localizedText.FormatWith((object) data); + } + while (this._optionwWorldName.Length > 27); + } + + private void AssignRandomWorldSeed() => this._optionSeed = Main.rand.Next().ToString(); + + public override void Draw(SpriteBatch spriteBatch) + { + base.Draw(spriteBatch); + this.SetupGamepadPoints(spriteBatch); + } + + private void SetupGamepadPoints(SpriteBatch spriteBatch) + { + UILinkPointNavigator.Shortcuts.BackButtonCommand = 1; + int num1 = 3000; + List snapPoints = this.GetSnapPoints(); + SnapPoint snapPoint1 = (SnapPoint) null; + SnapPoint snapPoint2 = (SnapPoint) null; + SnapPoint snapPoint3 = (SnapPoint) null; + SnapPoint snapPoint4 = (SnapPoint) null; + SnapPoint snapPoint5 = (SnapPoint) null; + SnapPoint snapPoint6 = (SnapPoint) null; + for (int index = 0; index < snapPoints.Count; ++index) + { + SnapPoint snapPoint7 = snapPoints[index]; + string name = snapPoint7.Name; + if (!(name == "Back")) + { + if (!(name == "Create")) + { + if (!(name == "Name")) + { + if (!(name == "Seed")) + { + if (!(name == "RandomizeName")) + { + if (name == "RandomizeSeed") + snapPoint6 = snapPoint7; + } + else + snapPoint5 = snapPoint7; + } + else + snapPoint4 = snapPoint7; + } + else + snapPoint3 = snapPoint7; + } + else + snapPoint2 = snapPoint7; + } + else + snapPoint1 = snapPoint7; + } + List snapGroup1 = this.GetSnapGroup(snapPoints, "size"); + List snapGroup2 = this.GetSnapGroup(snapPoints, "difficulty"); + List snapGroup3 = this.GetSnapGroup(snapPoints, "evil"); + UILinkPointNavigator.SetPosition(num1, snapPoint1.Position); + UILinkPoint point1 = UILinkPointNavigator.Points[num1]; + point1.Unlink(); + UILinkPoint uiLinkPoint1 = point1; + int num2 = num1 + 1; + UILinkPointNavigator.SetPosition(num2, snapPoint2.Position); + UILinkPoint point2 = UILinkPointNavigator.Points[num2]; + point2.Unlink(); + UILinkPoint uiLinkPoint2 = point2; + int num3 = num2 + 1; + UILinkPointNavigator.SetPosition(num3, snapPoint5.Position); + UILinkPoint point3 = UILinkPointNavigator.Points[num3]; + point3.Unlink(); + UILinkPoint uiLinkPoint3 = point3; + int num4 = num3 + 1; + UILinkPointNavigator.SetPosition(num4, snapPoint3.Position); + UILinkPoint point4 = UILinkPointNavigator.Points[num4]; + point4.Unlink(); + UILinkPoint uiLinkPoint4 = point4; + int num5 = num4 + 1; + UILinkPointNavigator.SetPosition(num5, snapPoint6.Position); + UILinkPoint point5 = UILinkPointNavigator.Points[num5]; + point5.Unlink(); + UILinkPoint uiLinkPoint5 = point5; + int num6 = num5 + 1; + UILinkPointNavigator.SetPosition(num6, snapPoint4.Position); + UILinkPoint point6 = UILinkPointNavigator.Points[num6]; + point6.Unlink(); + UILinkPoint uiLinkPoint6 = point6; + int num7 = num6 + 1; + UILinkPoint[] uiLinkPointArray1 = new UILinkPoint[snapGroup1.Count]; + for (int index = 0; index < snapGroup1.Count; ++index) + { + UILinkPointNavigator.SetPosition(num7, snapGroup1[index].Position); + UILinkPoint point7 = UILinkPointNavigator.Points[num7]; + point7.Unlink(); + uiLinkPointArray1[index] = point7; + ++num7; + } + UILinkPoint[] uiLinkPointArray2 = new UILinkPoint[snapGroup2.Count]; + for (int index = 0; index < snapGroup2.Count; ++index) + { + UILinkPointNavigator.SetPosition(num7, snapGroup2[index].Position); + UILinkPoint point8 = UILinkPointNavigator.Points[num7]; + point8.Unlink(); + uiLinkPointArray2[index] = point8; + ++num7; + } + UILinkPoint[] uiLinkPointArray3 = new UILinkPoint[snapGroup3.Count]; + for (int index = 0; index < snapGroup3.Count; ++index) + { + UILinkPointNavigator.SetPosition(num7, snapGroup3[index].Position); + UILinkPoint point9 = UILinkPointNavigator.Points[num7]; + point9.Unlink(); + uiLinkPointArray3[index] = point9; + ++num7; + } + this.LoopHorizontalLineLinks(uiLinkPointArray1); + this.LoopHorizontalLineLinks(uiLinkPointArray2); + this.EstablishUpDownRelationship(uiLinkPointArray1, uiLinkPointArray2); + for (int index = 0; index < uiLinkPointArray1.Length; ++index) + uiLinkPointArray1[index].Up = uiLinkPoint6.ID; + if (true) + { + this.LoopHorizontalLineLinks(uiLinkPointArray3); + this.EstablishUpDownRelationship(uiLinkPointArray2, uiLinkPointArray3); + for (int index = 0; index < uiLinkPointArray3.Length; ++index) + uiLinkPointArray3[index].Down = uiLinkPoint1.ID; + uiLinkPointArray3[uiLinkPointArray3.Length - 1].Down = uiLinkPoint2.ID; + uiLinkPoint2.Up = uiLinkPointArray3[uiLinkPointArray3.Length - 1].ID; + uiLinkPoint1.Up = uiLinkPointArray3[0].ID; + } + else + { + for (int index = 0; index < uiLinkPointArray2.Length; ++index) + uiLinkPointArray2[index].Down = uiLinkPoint1.ID; + uiLinkPointArray2[uiLinkPointArray2.Length - 1].Down = uiLinkPoint2.ID; + uiLinkPoint2.Up = uiLinkPointArray2[uiLinkPointArray2.Length - 1].ID; + uiLinkPoint1.Up = uiLinkPointArray2[0].ID; + } + uiLinkPoint2.Left = uiLinkPoint1.ID; + uiLinkPoint1.Right = uiLinkPoint2.ID; + uiLinkPoint4.Down = uiLinkPoint6.ID; + uiLinkPoint4.Left = uiLinkPoint3.ID; + uiLinkPoint3.Right = uiLinkPoint4.ID; + uiLinkPoint6.Up = uiLinkPoint4.ID; + uiLinkPoint6.Down = uiLinkPointArray1[0].ID; + uiLinkPoint6.Left = uiLinkPoint5.ID; + uiLinkPoint5.Right = uiLinkPoint6.ID; + uiLinkPoint5.Up = uiLinkPoint3.ID; + uiLinkPoint5.Down = uiLinkPointArray1[0].ID; + uiLinkPoint3.Down = uiLinkPoint5.ID; + } + + private void EstablishUpDownRelationship(UILinkPoint[] topSide, UILinkPoint[] bottomSide) + { + int num = Math.Max(topSide.Length, bottomSide.Length); + for (int val1 = 0; val1 < num; ++val1) + { + int index1 = Math.Min(val1, topSide.Length - 1); + int index2 = Math.Min(val1, bottomSide.Length - 1); + topSide[index1].Down = bottomSide[index2].ID; + bottomSide[index2].Up = topSide[index1].ID; + } + } + + private void LoopHorizontalLineLinks(UILinkPoint[] pointsLine) + { + for (int index = 1; index < pointsLine.Length - 1; ++index) + { + pointsLine[index - 1].Right = pointsLine[index].ID; + pointsLine[index].Left = pointsLine[index - 1].ID; + pointsLine[index].Right = pointsLine[index + 1].ID; + pointsLine[index + 1].Left = pointsLine[index].ID; + } + } + + private List GetSnapGroup(List ptsOnPage, string groupName) + { + List list = ptsOnPage.Where((Func) (a => a.Name == groupName)).ToList(); + list.Sort(new Comparison(this.SortPoints)); + return list; + } + + private int SortPoints(SnapPoint a, SnapPoint b) => a.Id.CompareTo(b.Id); + + private enum WorldSizeId + { + Small, + Medium, + Large, + } + + private enum WorldDifficultyId + { + Normal, + Expert, + Master, + Creative, + } + + private enum WorldEvilId + { + Random, + Corruption, + Crimson, + } + } +} diff --git a/GameContent/UI/States/UIWorldLoad.cs b/GameContent/UI/States/UIWorldLoad.cs new file mode 100644 index 0000000..9a01f44 --- /dev/null +++ b/GameContent/UI/States/UIWorldLoad.cs @@ -0,0 +1,108 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UIWorldLoad +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria.GameContent.UI.Elements; +using Terraria.GameInput; +using Terraria.Localization; +using Terraria.UI; +using Terraria.UI.Gamepad; +using Terraria.WorldBuilding; + +namespace Terraria.GameContent.UI.States +{ + public class UIWorldLoad : UIState + { + private UIGenProgressBar _progressBar = new UIGenProgressBar(); + private UIHeader _progressMessage = new UIHeader(); + private GenerationProgress _progress; + + public UIWorldLoad() + { + this._progressBar.Top.Pixels = 270f; + this._progressBar.HAlign = 0.5f; + this._progressBar.VAlign = 0.0f; + this._progressBar.Recalculate(); + this._progressMessage.CopyStyle((UIElement) this._progressBar); + this._progressMessage.Top.Pixels -= 70f; + this._progressMessage.Recalculate(); + this.Append((UIElement) this._progressBar); + this.Append((UIElement) this._progressMessage); + } + + public override void OnActivate() + { + if (!PlayerInput.UsingGamepadUI) + return; + UILinkPointNavigator.Points[3000].Unlink(); + UILinkPointNavigator.ChangePoint(3000); + } + + public override void Update(GameTime gameTime) + { + this._progressBar.Top.Pixels = MathHelper.Lerp(270f, 370f, Utils.GetLerpValue(600f, 700f, (float) Main.screenHeight, true)); + this._progressMessage.Top.Pixels = this._progressBar.Top.Pixels - 70f; + this._progressBar.Recalculate(); + this._progressMessage.Recalculate(); + base.Update(gameTime); + } + + public override void Draw(SpriteBatch spriteBatch) + { + this._progress = WorldGenerator.CurrentGenerationProgress; + if (this._progress == null) + return; + base.Draw(spriteBatch); + } + + protected override void DrawSelf(SpriteBatch spriteBatch) + { + float overallProgress = 0.0f; + float currentProgress = 0.0f; + string str1 = string.Empty; + if (this._progress != null) + { + overallProgress = this._progress.TotalProgress; + currentProgress = this._progress.Value; + str1 = this._progress.Message; + } + this._progressBar.SetProgress(overallProgress, currentProgress); + this._progressMessage.Text = str1; + if (WorldGen.drunkWorldGenText && !WorldGen.placingTraps) + { + this._progressMessage.Text = string.Concat((object) Main.rand.Next(999999999)); + for (int index = 0; index < 3; ++index) + { + if (Main.rand.Next(2) == 0) + this._progressMessage.Text += (string) (object) Main.rand.Next(999999999); + } + } + if (WorldGen.notTheBees) + this._progressMessage.Text = Language.GetTextValue("UI.WorldGenEasterEgg_GeneratingBees"); + if (WorldGen.getGoodWorldGen) + { + string str2 = ""; + for (int startIndex = this._progressMessage.Text.Length - 1; startIndex >= 0; --startIndex) + str2 += this._progressMessage.Text.Substring(startIndex, 1); + this._progressMessage.Text = str2; + } + Main.gameTips.Update(); + Main.gameTips.Draw(); + this.UpdateGamepadSquiggle(); + } + + private void UpdateGamepadSquiggle() + { + Vector2 vector2 = new Vector2((float) Math.Cos((double) Main.GlobalTimeWrappedHourly * 6.28318548202515), (float) Math.Sin((double) Main.GlobalTimeWrappedHourly * 6.28318548202515 * 2.0)) * new Vector2(30f, 15f) + Vector2.UnitY * 20f; + UILinkPointNavigator.Points[3000].Unlink(); + UILinkPointNavigator.SetPosition(3000, new Vector2((float) Main.screenWidth, (float) Main.screenHeight) / 2f + vector2); + } + + public string GetStatusText() => this._progress == null ? string.Format("{0:0.0%} - ... - {1:0.0%}", (object) 0, (object) 0) : string.Format("{0:0.0%} - " + this._progress.Message + " - {1:0.0%}", (object) this._progress.TotalProgress, (object) this._progress.Value); + } +} diff --git a/GameContent/UI/States/UIWorldSelect.cs b/GameContent/UI/States/UIWorldSelect.cs new file mode 100644 index 0000000..ac2a2bb --- /dev/null +++ b/GameContent/UI/States/UIWorldSelect.cs @@ -0,0 +1,283 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.States.UIWorldSelect +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.Audio; +using Terraria.GameContent.UI.Elements; +using Terraria.GameInput; +using Terraria.ID; +using Terraria.IO; +using Terraria.Localization; +using Terraria.UI; +using Terraria.UI.Gamepad; + +namespace Terraria.GameContent.UI.States +{ + public class UIWorldSelect : UIState + { + private UIList _worldList; + private UITextPanel _backPanel; + private UITextPanel _newPanel; + private UIPanel _containerPanel; + private UIScrollbar _scrollbar; + private bool _isScrollbarAttached; + private List> favoritesCache = new List>(); + private bool skipDraw; + + public override void OnInitialize() + { + UIElement element = new UIElement(); + element.Width.Set(0.0f, 0.8f); + element.MaxWidth.Set(650f, 0.0f); + element.Top.Set(220f, 0.0f); + element.Height.Set(-220f, 1f); + element.HAlign = 0.5f; + UIPanel uiPanel = new UIPanel(); + uiPanel.Width.Set(0.0f, 1f); + uiPanel.Height.Set(-110f, 1f); + uiPanel.BackgroundColor = new Color(33, 43, 79) * 0.8f; + element.Append((UIElement) uiPanel); + this._containerPanel = uiPanel; + this._worldList = new UIList(); + this._worldList.Width.Set(0.0f, 1f); + this._worldList.Height.Set(0.0f, 1f); + this._worldList.ListPadding = 5f; + uiPanel.Append((UIElement) this._worldList); + this._scrollbar = new UIScrollbar(); + this._scrollbar.SetView(100f, 1000f); + this._scrollbar.Height.Set(0.0f, 1f); + this._scrollbar.HAlign = 1f; + this._worldList.SetScrollbar(this._scrollbar); + UITextPanel uiTextPanel1 = new UITextPanel(Language.GetText("UI.SelectWorld"), 0.8f, true); + uiTextPanel1.HAlign = 0.5f; + uiTextPanel1.Top.Set(-40f, 0.0f); + uiTextPanel1.SetPadding(15f); + uiTextPanel1.BackgroundColor = new Color(73, 94, 171); + element.Append((UIElement) uiTextPanel1); + UITextPanel uiTextPanel2 = new UITextPanel(Language.GetText("UI.Back"), 0.7f, true); + uiTextPanel2.Width.Set(-10f, 0.5f); + uiTextPanel2.Height.Set(50f, 0.0f); + uiTextPanel2.VAlign = 1f; + uiTextPanel2.Top.Set(-45f, 0.0f); + uiTextPanel2.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver); + uiTextPanel2.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut); + uiTextPanel2.OnClick += new UIElement.MouseEvent(this.GoBackClick); + element.Append((UIElement) uiTextPanel2); + this._backPanel = uiTextPanel2; + UITextPanel uiTextPanel3 = new UITextPanel(Language.GetText("UI.New"), 0.7f, true); + uiTextPanel3.CopyStyle((UIElement) uiTextPanel2); + uiTextPanel3.HAlign = 1f; + uiTextPanel3.OnMouseOver += new UIElement.MouseEvent(this.FadedMouseOver); + uiTextPanel3.OnMouseOut += new UIElement.MouseEvent(this.FadedMouseOut); + uiTextPanel3.OnClick += new UIElement.MouseEvent(this.NewWorldClick); + element.Append((UIElement) uiTextPanel3); + this._newPanel = uiTextPanel3; + this.Append(element); + } + + public override void Recalculate() + { + if (this._scrollbar != null) + { + if (this._isScrollbarAttached && !this._scrollbar.CanScroll) + { + this._containerPanel.RemoveChild((UIElement) this._scrollbar); + this._isScrollbarAttached = false; + this._worldList.Width.Set(0.0f, 1f); + } + else if (!this._isScrollbarAttached && this._scrollbar.CanScroll) + { + this._containerPanel.Append((UIElement) this._scrollbar); + this._isScrollbarAttached = true; + this._worldList.Width.Set(-25f, 1f); + } + } + base.Recalculate(); + } + + private void NewWorldClick(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(10); + Main.newWorldName = Lang.gen[57].Value + " " + (object) (Main.WorldList.Count + 1); + Main.MenuUI.SetState((UIState) new UIWorldCreation()); + Main.menuMode = 888; + } + + private void GoBackClick(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(11); + Main.menuMode = Main.menuMultiplayer ? 12 : 1; + } + + private void FadedMouseOver(UIMouseEvent evt, UIElement listeningElement) + { + SoundEngine.PlaySound(12); + ((UIPanel) evt.Target).BackgroundColor = new Color(73, 94, 171); + ((UIPanel) evt.Target).BorderColor = Colors.FancyUIFatButtonMouseOver; + } + + private void FadedMouseOut(UIMouseEvent evt, UIElement listeningElement) + { + ((UIPanel) evt.Target).BackgroundColor = new Color(63, 82, 151) * 0.7f; + ((UIPanel) evt.Target).BorderColor = Color.Black; + } + + public override void OnActivate() + { + Main.LoadWorlds(); + this.UpdateWorldsList(); + if (!PlayerInput.UsingGamepadUI) + return; + UILinkPointNavigator.ChangePoint(3000 + (this._worldList.Count == 0 ? 1 : 2)); + } + + private void UpdateWorldsList() + { + this._worldList.Clear(); + IOrderedEnumerable orderedEnumerable = new List((IEnumerable) Main.WorldList).OrderByDescending(new Func(this.CanWorldBePlayed)).ThenByDescending((Func) (x => x.IsFavorite)).ThenBy((Func) (x => x.Name)).ThenBy((Func) (x => x.GetFileName())); + int num = 0; + foreach (WorldFileData worldFileData in (IEnumerable) orderedEnumerable) + this._worldList.Add((UIElement) new UIWorldListItem(worldFileData, num++, this.CanWorldBePlayed(worldFileData))); + } + + private bool CanWorldBePlayed(WorldFileData file) => Main.ActivePlayerFileData.Player.difficulty == (byte) 3 == (file.GameMode == 3); + + public override void Draw(SpriteBatch spriteBatch) + { + if (this.skipDraw) + { + this.skipDraw = false; + } + else + { + if (this.UpdateFavoritesCache()) + { + this.skipDraw = true; + Main.MenuUI.Draw(spriteBatch, new GameTime()); + } + base.Draw(spriteBatch); + this.SetupGamepadPoints(spriteBatch); + } + } + + private bool UpdateFavoritesCache() + { + List worldFileDataList = new List((IEnumerable) Main.WorldList); + worldFileDataList.Sort((Comparison) ((x, y) => + { + if (x.IsFavorite && !y.IsFavorite) + return -1; + if (!x.IsFavorite && y.IsFavorite) + return 1; + return x.Name.CompareTo(y.Name) != 0 ? x.Name.CompareTo(y.Name) : x.GetFileName().CompareTo(y.GetFileName()); + })); + bool flag = false; + if (!flag && worldFileDataList.Count != this.favoritesCache.Count) + flag = true; + if (!flag) + { + for (int index = 0; index < this.favoritesCache.Count; ++index) + { + Tuple tuple = this.favoritesCache[index]; + if (!(worldFileDataList[index].Name == tuple.Item1) || worldFileDataList[index].IsFavorite != tuple.Item2) + { + flag = true; + break; + } + } + } + if (flag) + { + this.favoritesCache.Clear(); + foreach (WorldFileData worldFileData in worldFileDataList) + this.favoritesCache.Add(Tuple.Create(worldFileData.Name, worldFileData.IsFavorite)); + this.UpdateWorldsList(); + } + return flag; + } + + private void SetupGamepadPoints(SpriteBatch spriteBatch) + { + UILinkPointNavigator.Shortcuts.BackButtonCommand = 2; + int num1 = 3000; + UILinkPointNavigator.SetPosition(num1, this._backPanel.GetInnerDimensions().ToRectangle().Center.ToVector2()); + UILinkPointNavigator.SetPosition(num1 + 1, this._newPanel.GetInnerDimensions().ToRectangle().Center.ToVector2()); + int key1 = num1; + UILinkPoint point1 = UILinkPointNavigator.Points[key1]; + point1.Unlink(); + point1.Right = key1 + 1; + int key2 = num1 + 1; + UILinkPoint point2 = UILinkPointNavigator.Points[key2]; + point2.Unlink(); + point2.Left = key2 - 1; + float num2 = 1f / Main.UIScale; + Rectangle clippingRectangle = this._containerPanel.GetClippingRectangle(spriteBatch); + Vector2 minimum = clippingRectangle.TopLeft() * num2; + Vector2 maximum = clippingRectangle.BottomRight() * num2; + List snapPoints = this.GetSnapPoints(); + for (int index = 0; index < snapPoints.Count; ++index) + { + if (!snapPoints[index].Position.Between(minimum, maximum)) + { + snapPoints.Remove(snapPoints[index]); + --index; + } + } + SnapPoint[,] snapPointArray = new SnapPoint[this._worldList.Count, 5]; + foreach (SnapPoint snapPoint in snapPoints.Where((Func) (a => a.Name == "Play"))) + snapPointArray[snapPoint.Id, 0] = snapPoint; + foreach (SnapPoint snapPoint in snapPoints.Where((Func) (a => a.Name == "Favorite"))) + snapPointArray[snapPoint.Id, 1] = snapPoint; + foreach (SnapPoint snapPoint in snapPoints.Where((Func) (a => a.Name == "Cloud"))) + snapPointArray[snapPoint.Id, 2] = snapPoint; + foreach (SnapPoint snapPoint in snapPoints.Where((Func) (a => a.Name == "Seed"))) + snapPointArray[snapPoint.Id, 3] = snapPoint; + foreach (SnapPoint snapPoint in snapPoints.Where((Func) (a => a.Name == "Delete"))) + snapPointArray[snapPoint.Id, 4] = snapPoint; + int num3 = num1 + 2; + int[] numArray = new int[this._worldList.Count]; + for (int index = 0; index < numArray.Length; ++index) + numArray[index] = -1; + for (int index1 = 0; index1 < 5; ++index1) + { + int key3 = -1; + for (int index2 = 0; index2 < snapPointArray.GetLength(0); ++index2) + { + if (snapPointArray[index2, index1] != null) + { + UILinkPoint point3 = UILinkPointNavigator.Points[num3]; + point3.Unlink(); + UILinkPointNavigator.SetPosition(num3, snapPointArray[index2, index1].Position); + if (key3 != -1) + { + point3.Up = key3; + UILinkPointNavigator.Points[key3].Down = num3; + } + if (numArray[index2] != -1) + { + point3.Left = numArray[index2]; + UILinkPointNavigator.Points[numArray[index2]].Right = num3; + } + point3.Down = num1; + if (index1 == 0) + UILinkPointNavigator.Points[num1].Up = UILinkPointNavigator.Points[num1 + 1].Up = num3; + key3 = num3; + numArray[index2] = num3; + UILinkPointNavigator.Shortcuts.FANCYUI_HIGHEST_INDEX = num3; + ++num3; + } + } + } + if (!PlayerInput.UsingGamepadUI || this._worldList.Count != 0 || UILinkPointNavigator.CurrentPoint <= 3001) + return; + UILinkPointNavigator.ChangePoint(3001); + } + } +} diff --git a/GameContent/UI/WiresUI.cs b/GameContent/UI/WiresUI.cs new file mode 100644 index 0000000..ecf3c5f --- /dev/null +++ b/GameContent/UI/WiresUI.cs @@ -0,0 +1,595 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.WiresUI +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria.GameInput; + +namespace Terraria.GameContent.UI +{ + public class WiresUI + { + private static WiresUI.WiresRadial radial = new WiresUI.WiresRadial(); + + public static bool Open => WiresUI.radial.active; + + public static void HandleWiresUI(SpriteBatch spriteBatch) + { + WiresUI.radial.Update(); + WiresUI.radial.Draw(spriteBatch); + } + + public static class Settings + { + public static WiresUI.Settings.MultiToolMode ToolMode = WiresUI.Settings.MultiToolMode.Red; + private static int _lastActuatorEnabled; + + public static bool DrawWires + { + get + { + if (Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].mech) + return true; + return Main.player[Main.myPlayer].InfoAccMechShowWires && Main.player[Main.myPlayer].builderAccStatus[8] == 0; + } + } + + public static bool HideWires => Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type == 3620; + + public static bool DrawToolModeUI + { + get + { + int type = Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type; + return type == 3611 || type == 3625; + } + } + + public static bool DrawToolAllowActuators + { + get + { + int type = Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type; + if (type == 3611) + WiresUI.Settings._lastActuatorEnabled = 2; + if (type == 3625) + WiresUI.Settings._lastActuatorEnabled = 1; + return WiresUI.Settings._lastActuatorEnabled == 2; + } + } + + [Flags] + public enum MultiToolMode + { + Red = 1, + Green = 2, + Blue = 4, + Yellow = 8, + Actuator = 16, // 0x00000010 + Cutter = 32, // 0x00000020 + } + } + + public class WiresRadial + { + public Vector2 position; + public bool active; + public bool OnWiresMenu; + private float _lineOpacity; + + public void Update() + { + this.FlowerUpdate(); + this.LineUpdate(); + } + + private void LineUpdate() + { + bool flag1 = true; + float min = 0.75f; + Player player = Main.player[Main.myPlayer]; + if (!WiresUI.Settings.DrawToolModeUI || Main.drawingPlayerChat) + { + flag1 = false; + min = 0.0f; + } + bool flag2; + if (player.dead || Main.mouseItem.type > 0) + { + flag2 = false; + this._lineOpacity = 0.0f; + } + else if (player.cursorItemIconEnabled && player.cursorItemIconID != 0 && player.cursorItemIconID != 3625) + { + flag2 = false; + this._lineOpacity = 0.0f; + } + else if (!player.cursorItemIconEnabled && (!PlayerInput.UsingGamepad && !WiresUI.Settings.DrawToolAllowActuators || player.mouseInterface || player.lastMouseInterface) || Main.ingameOptionsWindow || Main.InGameUI.IsVisible) + { + flag2 = false; + this._lineOpacity = 0.0f; + } + else + { + float num = Utils.Clamp(this._lineOpacity + 0.05f * (float) flag1.ToDirectionInt(), min, 1f); + this._lineOpacity += 0.05f * (float) Math.Sign(num - this._lineOpacity); + if ((double) Math.Abs(this._lineOpacity - num) >= 0.0500000007450581) + return; + this._lineOpacity = num; + } + } + + private void FlowerUpdate() + { + Player player = Main.player[Main.myPlayer]; + if (!WiresUI.Settings.DrawToolModeUI) + this.active = false; + else if ((player.mouseInterface || player.lastMouseInterface) && !this.OnWiresMenu) + this.active = false; + else if (player.dead || Main.mouseItem.type > 0) + { + this.active = false; + this.OnWiresMenu = false; + } + else + { + this.OnWiresMenu = false; + if (!Main.mouseRight || !Main.mouseRightRelease || PlayerInput.LockGamepadTileUseButton || player.noThrow != 0 || Main.HoveringOverAnNPC || player.talkNPC != -1) + return; + if (this.active) + { + this.active = false; + } + else + { + if (Main.SmartInteractShowingGenuine) + return; + this.active = true; + this.position = Main.MouseScreen; + if (!PlayerInput.UsingGamepad || !Main.SmartCursorEnabled) + return; + this.position = new Vector2((float) Main.screenWidth, (float) Main.screenHeight) / 2f; + } + } + } + + public void Draw(SpriteBatch spriteBatch) + { + this.DrawFlower(spriteBatch); + this.DrawCursorArea(spriteBatch); + } + + private void DrawLine(SpriteBatch spriteBatch) + { + if (this.active || (double) this._lineOpacity == 0.0) + return; + Vector2 vector2_1 = Main.MouseScreen; + Vector2 vector2_2 = new Vector2((float) (Main.screenWidth / 2), (float) (Main.screenHeight - 70)); + if (PlayerInput.UsingGamepad) + vector2_1 = Vector2.Zero; + Vector2 v = vector2_1 - vector2_2; + double num1 = (double) Vector2.Dot(Vector2.Normalize(v), Vector2.UnitX); + double num2 = (double) Vector2.Dot(Vector2.Normalize(v), Vector2.UnitY); + double rotation = (double) v.ToRotation(); + double num3 = (double) v.Length(); + bool flag1 = false; + bool toolAllowActuators = WiresUI.Settings.DrawToolAllowActuators; + for (int index = 0; index < 6; ++index) + { + if (toolAllowActuators || index != 5) + { + bool flag2 = WiresUI.Settings.ToolMode.HasFlag((Enum) (WiresUI.Settings.MultiToolMode) (1 << index)); + if (index == 5) + flag2 = WiresUI.Settings.ToolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Actuator); + Vector2 vector2_3 = vector2_2 + Vector2.UnitX * (float) (45.0 * ((double) index - 1.5)); + int num4 = index; + if (index == 0) + num4 = 3; + if (index == 3) + num4 = 0; + switch (num4) + { + case 0: + case 1: + vector2_3 = vector2_2 + new Vector2((float) (45.0 + (toolAllowActuators ? 15.0 : 0.0)) * (float) (2 - num4), 0.0f) * this._lineOpacity; + break; + case 2: + case 3: + vector2_3 = vector2_2 + new Vector2((float) -(45.0 + (toolAllowActuators ? 15.0 : 0.0)) * (float) (num4 - 1), 0.0f) * this._lineOpacity; + break; + case 4: + flag2 = false; + vector2_3 = vector2_2 - new Vector2(0.0f, toolAllowActuators ? 22f : 0.0f) * this._lineOpacity; + break; + case 5: + vector2_3 = vector2_2 + new Vector2(0.0f, 22f) * this._lineOpacity; + break; + } + bool flag3 = false; + if (!PlayerInput.UsingGamepad) + flag3 = (double) Vector2.Distance(vector2_3, vector2_1) < 19.0 * (double) this._lineOpacity; + if (flag1) + flag3 = false; + if (flag3) + flag1 = true; + Texture2D texture2D1 = TextureAssets.WireUi[(WiresUI.Settings.ToolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Cutter) ? 8 : 0) + (flag3 ? 1 : 0)].Value; + Texture2D texture2D2 = (Texture2D) null; + switch (index) + { + case 0: + case 1: + case 2: + case 3: + texture2D2 = TextureAssets.WireUi[2 + index].Value; + break; + case 4: + texture2D2 = TextureAssets.WireUi[WiresUI.Settings.ToolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Cutter) ? 7 : 6].Value; + break; + case 5: + texture2D2 = TextureAssets.WireUi[10].Value; + break; + } + Color color1 = Color.White; + Color color2 = Color.White; + if (!flag2 && index != 4) + { + if (flag3) + { + color2 = new Color(100, 100, 100); + color2 = new Color(120, 120, 120); + color1 = new Color(200, 200, 200); + } + else + { + color2 = new Color(150, 150, 150); + color2 = new Color(80, 80, 80); + color1 = new Color(100, 100, 100); + } + } + Utils.CenteredRectangle(vector2_3, new Vector2(40f)); + if (flag3) + { + if (Main.mouseLeft && Main.mouseLeftRelease) + { + switch (index) + { + case 0: + WiresUI.Settings.ToolMode ^= WiresUI.Settings.MultiToolMode.Red; + break; + case 1: + WiresUI.Settings.ToolMode ^= WiresUI.Settings.MultiToolMode.Green; + break; + case 2: + WiresUI.Settings.ToolMode ^= WiresUI.Settings.MultiToolMode.Blue; + break; + case 3: + WiresUI.Settings.ToolMode ^= WiresUI.Settings.MultiToolMode.Yellow; + break; + case 4: + WiresUI.Settings.ToolMode ^= WiresUI.Settings.MultiToolMode.Cutter; + break; + case 5: + WiresUI.Settings.ToolMode ^= WiresUI.Settings.MultiToolMode.Actuator; + break; + } + } + if (!Main.mouseLeft || Main.player[Main.myPlayer].mouseInterface) + Main.player[Main.myPlayer].mouseInterface = true; + this.OnWiresMenu = true; + } + int num5 = flag3 ? 1 : 0; + spriteBatch.Draw(texture2D1, vector2_3, new Rectangle?(), color1 * this._lineOpacity, 0.0f, texture2D1.Size() / 2f, this._lineOpacity, SpriteEffects.None, 0.0f); + spriteBatch.Draw(texture2D2, vector2_3, new Rectangle?(), color2 * this._lineOpacity, 0.0f, texture2D2.Size() / 2f, this._lineOpacity, SpriteEffects.None, 0.0f); + } + } + if (!Main.mouseLeft || !Main.mouseLeftRelease || flag1) + return; + this.active = false; + } + + private void DrawFlower(SpriteBatch spriteBatch) + { + if (!this.active) + return; + Vector2 vector2_1 = Main.MouseScreen; + Vector2 position = this.position; + if (PlayerInput.UsingGamepad && Main.SmartCursorEnabled) + vector2_1 = !(PlayerInput.GamepadThumbstickRight != Vector2.Zero) ? (!(PlayerInput.GamepadThumbstickLeft != Vector2.Zero) ? this.position : this.position + PlayerInput.GamepadThumbstickLeft * 40f) : this.position + PlayerInput.GamepadThumbstickRight * 40f; + Vector2 v = vector2_1 - position; + double num1 = (double) Vector2.Dot(Vector2.Normalize(v), Vector2.UnitX); + double num2 = (double) Vector2.Dot(Vector2.Normalize(v), Vector2.UnitY); + float rotation = v.ToRotation(); + float num3 = v.Length(); + bool flag1 = false; + bool toolAllowActuators = WiresUI.Settings.DrawToolAllowActuators; + float num4 = (float) (4 + toolAllowActuators.ToInt()); + float num5 = toolAllowActuators ? 11f : -0.5f; + for (int index = 0; index < 6; ++index) + { + if (toolAllowActuators || index != 5) + { + bool flag2 = WiresUI.Settings.ToolMode.HasFlag((Enum) (WiresUI.Settings.MultiToolMode) (1 << index)); + if (index == 5) + flag2 = WiresUI.Settings.ToolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Actuator); + Vector2 vector2_2 = position + Vector2.UnitX * (float) (45.0 * ((double) index - 1.5)); + switch (index) + { + case 0: + case 1: + case 2: + case 3: + float num6 = (float) index; + if (index == 0) + num6 = 3f; + if (index == 3) + num6 = 0.0f; + vector2_2 = position + Vector2.UnitX.RotatedBy((double) num6 * 6.28318548202515 / (double) num4 - 3.14159274101257 / (double) num5) * 45f; + break; + case 4: + flag2 = false; + vector2_2 = position; + break; + case 5: + vector2_2 = position + Vector2.UnitX.RotatedBy((double) (index - 1) * 6.28318548202515 / (double) num4 - 3.14159274101257 / (double) num5) * 45f; + break; + } + bool flag3 = false; + if (index == 4) + flag3 = (double) num3 < 20.0; + switch (index) + { + case 0: + case 1: + case 2: + case 3: + case 5: + float num7 = (vector2_2 - position).ToRotation().AngleTowards(rotation, (float) (6.28318548202515 / ((double) num4 * 2.0))) - rotation; + if ((double) num3 >= 20.0 && (double) Math.Abs(num7) < 0.00999999977648258) + { + flag3 = true; + break; + } + break; + case 4: + flag3 = (double) num3 < 20.0; + break; + } + if (!PlayerInput.UsingGamepad) + flag3 = (double) Vector2.Distance(vector2_2, vector2_1) < 19.0; + if (flag1) + flag3 = false; + if (flag3) + flag1 = true; + Texture2D texture2D1 = TextureAssets.WireUi[(WiresUI.Settings.ToolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Cutter) ? 8 : 0) + (flag3 ? 1 : 0)].Value; + Texture2D texture2D2 = (Texture2D) null; + switch (index) + { + case 0: + case 1: + case 2: + case 3: + texture2D2 = TextureAssets.WireUi[2 + index].Value; + break; + case 4: + texture2D2 = TextureAssets.WireUi[WiresUI.Settings.ToolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Cutter) ? 7 : 6].Value; + break; + case 5: + texture2D2 = TextureAssets.WireUi[10].Value; + break; + } + Color color1 = Color.White; + Color color2 = Color.White; + if (!flag2 && index != 4) + { + if (flag3) + { + color2 = new Color(100, 100, 100); + color2 = new Color(120, 120, 120); + color1 = new Color(200, 200, 200); + } + else + { + color2 = new Color(150, 150, 150); + color2 = new Color(80, 80, 80); + color1 = new Color(100, 100, 100); + } + } + Utils.CenteredRectangle(vector2_2, new Vector2(40f)); + if (flag3) + { + if (Main.mouseLeft && Main.mouseLeftRelease) + { + switch (index) + { + case 0: + WiresUI.Settings.ToolMode ^= WiresUI.Settings.MultiToolMode.Red; + break; + case 1: + WiresUI.Settings.ToolMode ^= WiresUI.Settings.MultiToolMode.Green; + break; + case 2: + WiresUI.Settings.ToolMode ^= WiresUI.Settings.MultiToolMode.Blue; + break; + case 3: + WiresUI.Settings.ToolMode ^= WiresUI.Settings.MultiToolMode.Yellow; + break; + case 4: + WiresUI.Settings.ToolMode ^= WiresUI.Settings.MultiToolMode.Cutter; + break; + case 5: + WiresUI.Settings.ToolMode ^= WiresUI.Settings.MultiToolMode.Actuator; + break; + } + } + Main.player[Main.myPlayer].mouseInterface = true; + this.OnWiresMenu = true; + } + int num8 = flag3 ? 1 : 0; + spriteBatch.Draw(texture2D1, vector2_2, new Rectangle?(), color1, 0.0f, texture2D1.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + spriteBatch.Draw(texture2D2, vector2_2, new Rectangle?(), color2, 0.0f, texture2D2.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + } + } + if (!Main.mouseLeft || !Main.mouseLeftRelease || flag1) + return; + this.active = false; + } + + private void DrawCursorArea(SpriteBatch spriteBatch) + { + if (this.active || (double) this._lineOpacity == 0.0) + return; + Vector2 vector2 = Main.MouseScreen + new Vector2((float) (10 - 9 * PlayerInput.UsingGamepad.ToInt()), 25f); + Color color1 = new Color(50, 50, 50); + bool toolAllowActuators = WiresUI.Settings.DrawToolAllowActuators; + if (!toolAllowActuators) + { + if (!PlayerInput.UsingGamepad) + vector2 += new Vector2(-20f, 10f); + else + vector2 += new Vector2(0.0f, 10f); + } + Texture2D texture1 = TextureAssets.BuilderAcc.Value; + Texture2D texture2 = texture1; + Rectangle r1 = new Rectangle(140, 2, 6, 6); + Rectangle r2 = new Rectangle(148, 2, 6, 6); + Rectangle r3 = new Rectangle(128, 0, 10, 10); + float num1 = 1f; + float scale = 1f; + bool flag1 = false; + if (flag1 && !toolAllowActuators) + num1 *= Main.cursorScale; + float lineOpacity = this._lineOpacity; + if (PlayerInput.UsingGamepad) + lineOpacity *= Main.GamepadCursorAlpha; + for (int index = 0; index < 5; ++index) + { + if (toolAllowActuators || index != 4) + { + float num2 = lineOpacity; + Vector2 vec = vector2 + Vector2.UnitX * (float) (45.0 * ((double) index - 1.5)); + int num3 = index; + if (index == 0) + num3 = 3; + if (index == 1) + num3 = 2; + if (index == 2) + num3 = 1; + if (index == 3) + num3 = 0; + if (index == 4) + num3 = 5; + int num4 = num3; + switch (num4) + { + case 1: + num4 = 2; + break; + case 2: + num4 = 1; + break; + } + bool flag2 = WiresUI.Settings.ToolMode.HasFlag((Enum) (WiresUI.Settings.MultiToolMode) (1 << num4)); + if (num4 == 5) + flag2 = WiresUI.Settings.ToolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Actuator); + Color color2 = Color.HotPink; + switch (num3) + { + case 0: + color2 = new Color(253, 58, 61); + break; + case 1: + color2 = new Color(83, 180, 253); + break; + case 2: + color2 = new Color(83, 253, 153); + break; + case 3: + color2 = new Color(253, 254, 83); + break; + case 5: + color2 = Color.WhiteSmoke; + break; + } + if (!flag2) + color2 = Color.Lerp(color2, Color.Black, 0.65f); + if (flag1) + { + if (toolAllowActuators) + { + switch (num3) + { + case 0: + vec = vector2 + new Vector2(-12f, 0.0f) * num1; + break; + case 1: + vec = vector2 + new Vector2(-6f, 12f) * num1; + break; + case 2: + vec = vector2 + new Vector2(6f, 12f) * num1; + break; + case 3: + vec = vector2 + new Vector2(12f, 0.0f) * num1; + break; + case 5: + vec = vector2 + new Vector2(0.0f, 0.0f) * num1; + break; + } + } + else + vec = vector2 + new Vector2((float) (12 * (num3 + 1)), (float) (12 * (3 - num3))) * num1; + } + else if (toolAllowActuators) + { + switch (num3) + { + case 0: + vec = vector2 + new Vector2(-12f, 0.0f) * num1; + break; + case 1: + vec = vector2 + new Vector2(-6f, 12f) * num1; + break; + case 2: + vec = vector2 + new Vector2(6f, 12f) * num1; + break; + case 3: + vec = vector2 + new Vector2(12f, 0.0f) * num1; + break; + case 5: + vec = vector2 + new Vector2(0.0f, 0.0f) * num1; + break; + } + } + else + { + float num5 = 0.7f; + switch (num3) + { + case 0: + vec = vector2 + new Vector2(0.0f, -12f) * num1 * num5; + break; + case 1: + vec = vector2 + new Vector2(-12f, 0.0f) * num1 * num5; + break; + case 2: + vec = vector2 + new Vector2(0.0f, 12f) * num1 * num5; + break; + case 3: + vec = vector2 + new Vector2(12f, 0.0f) * num1 * num5; + break; + } + } + Vector2 position = vec.Floor(); + spriteBatch.Draw(texture2, position, new Rectangle?(r3), color1 * num2, 0.0f, r3.Size() / 2f, scale, SpriteEffects.None, 0.0f); + spriteBatch.Draw(texture1, position, new Rectangle?(r1), color2 * num2, 0.0f, r1.Size() / 2f, scale, SpriteEffects.None, 0.0f); + if (WiresUI.Settings.ToolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Cutter)) + spriteBatch.Draw(texture1, position, new Rectangle?(r2), color1 * num2, 0.0f, r2.Size() / 2f, scale, SpriteEffects.None, 0.0f); + } + } + } + } + } +} diff --git a/GameContent/UI/WorldUIAnchor.cs b/GameContent/UI/WorldUIAnchor.cs new file mode 100644 index 0000000..25a03ea --- /dev/null +++ b/GameContent/UI/WorldUIAnchor.cs @@ -0,0 +1,63 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.UI.WorldUIAnchor +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; + +namespace Terraria.GameContent.UI +{ + public class WorldUIAnchor + { + public WorldUIAnchor.AnchorType type; + public Entity entity; + public Vector2 pos = Vector2.Zero; + public Vector2 size = Vector2.Zero; + + public WorldUIAnchor() => this.type = WorldUIAnchor.AnchorType.None; + + public WorldUIAnchor(Entity anchor) + { + this.type = WorldUIAnchor.AnchorType.Entity; + this.entity = anchor; + } + + public WorldUIAnchor(Vector2 anchor) + { + this.type = WorldUIAnchor.AnchorType.Pos; + this.pos = anchor; + } + + public WorldUIAnchor(int topLeftX, int topLeftY, int width, int height) + { + this.type = WorldUIAnchor.AnchorType.Tile; + this.pos = new Vector2((float) topLeftX + (float) width / 2f, (float) topLeftY + (float) height / 2f) * 16f; + this.size = new Vector2((float) width, (float) height) * 16f; + } + + public bool InRange(Vector2 target, float tileRangeX, float tileRangeY) + { + switch (this.type) + { + case WorldUIAnchor.AnchorType.Entity: + return (double) Math.Abs(target.X - this.entity.Center.X) <= (double) tileRangeX * 16.0 + (double) this.entity.width / 2.0 && (double) Math.Abs(target.Y - this.entity.Center.Y) <= (double) tileRangeY * 16.0 + (double) this.entity.height / 2.0; + case WorldUIAnchor.AnchorType.Tile: + return (double) Math.Abs(target.X - this.pos.X) <= (double) tileRangeX * 16.0 + (double) this.size.X / 2.0 && (double) Math.Abs(target.Y - this.pos.Y) <= (double) tileRangeY * 16.0 + (double) this.size.Y / 2.0; + case WorldUIAnchor.AnchorType.Pos: + return (double) Math.Abs(target.X - this.pos.X) <= (double) tileRangeX * 16.0 && (double) Math.Abs(target.Y - this.pos.Y) <= (double) tileRangeY * 16.0; + default: + return true; + } + } + + public enum AnchorType + { + Entity, + Tile, + Pos, + None, + } + } +} diff --git a/GameContent/VanillaContentValidator.cs b/GameContent/VanillaContentValidator.cs new file mode 100644 index 0000000..818040e --- /dev/null +++ b/GameContent/VanillaContentValidator.cs @@ -0,0 +1,63 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.VanillaContentValidator +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System.Collections.Generic; +using System.Text.RegularExpressions; + +namespace Terraria.GameContent +{ + public class VanillaContentValidator : IContentValidator + { + public static VanillaContentValidator Instance; + private Dictionary _info = new Dictionary(); + + public VanillaContentValidator(string infoFilePath) + { + foreach (string str in Regex.Split(Utils.ReadEmbeddedResource(infoFilePath), "\r\n|\r|\n")) + { + if (!str.StartsWith("//")) + { + string[] strArray = str.Split('\t'); + int result1; + int result2; + if (strArray.Length >= 3 && int.TryParse(strArray[1], out result1) && int.TryParse(strArray[2], out result2)) + this._info[strArray[0].Replace('/', '\\')] = new VanillaContentValidator.TextureMetaData() + { + Width = result1, + Height = result2 + }; + } + } + } + + public bool AssetIsValid(T content, string contentPath, out IRejectionReason rejectReason) where T : class + { + Texture2D texture = (object) content as Texture2D; + rejectReason = (IRejectionReason) null; + VanillaContentValidator.TextureMetaData textureMetaData; + return texture == null || !this._info.TryGetValue(contentPath, out textureMetaData) || textureMetaData.Matches(texture, out rejectReason); + } + + private struct TextureMetaData + { + public int Width; + public int Height; + + public bool Matches(Texture2D texture, out IRejectionReason rejectReason) + { + if (texture.Width != this.Width || texture.Height != this.Height) + { + rejectReason = (IRejectionReason) new ContentRejectionFromSize(this.Width, this.Height, texture.Width, texture.Height); + return false; + } + rejectReason = (IRejectionReason) null; + return true; + } + } + } +} diff --git a/GameContent/VoidLensHelper.cs b/GameContent/VoidLensHelper.cs new file mode 100644 index 0000000..7025137 --- /dev/null +++ b/GameContent/VoidLensHelper.cs @@ -0,0 +1,105 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.VoidLensHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System.Collections.Generic; +using Terraria.DataStructures; +using Terraria.ID; + +namespace Terraria.GameContent +{ + public struct VoidLensHelper + { + private readonly Vector2 _position; + private readonly float _opacity; + private readonly int _frameNumber; + + public VoidLensHelper(Projectile proj) + { + this._position = proj.Center; + this._opacity = proj.Opacity; + this._frameNumber = proj.frame; + } + + public VoidLensHelper(Vector2 worldPosition, float opacity) + { + worldPosition.Y -= 2f; + this._position = worldPosition; + this._opacity = opacity; + this._frameNumber = (int) (((double) Main.tileFrameCounter[491] + (double) this._position.X + (double) this._position.Y) % 40.0) / 5; + } + + public void Update() + { + Lighting.AddLight(this._position, 0.4f, 0.2f, 0.9f); + this.SpawnVoidLensDust(); + } + + public void SpawnVoidLensDust() + { + if (Main.rand.Next(3) != 0) + return; + if (Main.rand.Next(2) == 0) + { + Vector2 vector2 = Vector2.UnitY.RotatedByRandom(6.28318548202515) * new Vector2(0.5f, 1f); + Dust dust = Dust.NewDustDirect(this._position - vector2 * 30f, 0, 0, Utils.SelectRandom(Main.rand, 86, 88)); + dust.noGravity = true; + dust.noLightEmittence = true; + dust.position = this._position - vector2.SafeNormalize(Vector2.Zero) * (float) Main.rand.Next(10, 21); + dust.velocity = vector2.RotatedBy(1.57079637050629) * 2f; + dust.scale = 0.5f + Main.rand.NextFloat(); + dust.fadeIn = 0.5f; + dust.customData = (object) this; + dust.position += dust.velocity * 10f; + dust.velocity *= -1f; + } + else + { + Vector2 vector2 = Vector2.UnitY.RotatedByRandom(6.28318548202515) * new Vector2(0.5f, 1f); + Dust dust = Dust.NewDustDirect(this._position - vector2 * 30f, 0, 0, Utils.SelectRandom(Main.rand, 86, 88)); + dust.noGravity = true; + dust.noLightEmittence = true; + dust.position = this._position - vector2.SafeNormalize(Vector2.Zero) * (float) Main.rand.Next(5, 10); + dust.velocity = vector2.RotatedBy(-1.57079637050629) * 3f; + dust.scale = 0.5f + Main.rand.NextFloat(); + dust.fadeIn = 0.5f; + dust.customData = (object) this; + dust.position += dust.velocity * 10f; + dust.velocity *= -1f; + } + } + + public void DrawToDrawData(List drawDataList, int selectionMode) + { + Main.instance.LoadProjectile(734); + Asset tex = TextureAssets.Projectile[734]; + Rectangle r = tex.Frame(verticalFrames: 8, frameY: this._frameNumber); + Color color = Color.Lerp(Lighting.GetColor(this._position.ToTileCoordinates()), Color.White, 0.5f) * this._opacity; + DrawData drawData1 = new DrawData(tex.Value, this._position - Main.screenPosition, new Rectangle?(r), color, 0.0f, r.Size() / 2f, 1f, SpriteEffects.None, 0); + drawDataList.Add(drawData1); + for (float num = 0.0f; (double) num < 1.0; num += 0.34f) + { + DrawData drawData2 = drawData1; + drawData2.color = new Color((int) sbyte.MaxValue, 50, (int) sbyte.MaxValue, 0) * this._opacity; + drawData2.scale *= 1.1f; + float x = ((float) ((double) Main.GlobalTimeWrappedHourly / 5.0 * 6.28318548202515)).ToRotationVector2().X; + drawData2.color *= (float) ((double) x * 0.100000001490116 + 0.300000011920929); + drawData2.position += ((float) (((double) Main.GlobalTimeWrappedHourly / 5.0 + (double) num) * 6.28318548202515)).ToRotationVector2() * (float) ((double) x * 1.0 + 2.0); + drawDataList.Add(drawData2); + } + if (selectionMode == 0) + return; + int averageTileLighting = ((int) color.R + (int) color.G + (int) color.B) / 3; + if (averageTileLighting <= 10) + return; + Color selectionGlowColor = Colors.GetSelectionGlowColor(selectionMode == 2, averageTileLighting); + drawData1 = new DrawData(TextureAssets.Extra[93].Value, this._position - Main.screenPosition, new Rectangle?(r), selectionGlowColor, 0.0f, r.Size() / 2f, 1f, SpriteEffects.None, 0); + drawDataList.Add(drawData1); + } + } +} diff --git a/GameContent/WellFedHelper.cs b/GameContent/WellFedHelper.cs new file mode 100644 index 0000000..3b6d2cb --- /dev/null +++ b/GameContent/WellFedHelper.cs @@ -0,0 +1,78 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameContent.WellFedHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameContent +{ + public struct WellFedHelper + { + private const int MAXIMUM_TIME_LEFT_PER_COUNTER = 72000; + private int _timeLeftRank1; + private int _timeLeftRank2; + private int _timeLeftRank3; + + public int TimeLeft => this._timeLeftRank1 + this._timeLeftRank2 + this._timeLeftRank3; + + public int Rank + { + get + { + if (this._timeLeftRank3 > 0) + return 3; + if (this._timeLeftRank2 > 0) + return 2; + return this._timeLeftRank1 > 0 ? 1 : 0; + } + } + + public void Eat(int foodRank, int foodBuffTime) + { + int timeLeftToAdd = foodBuffTime; + if (foodRank >= 3) + this.AddTimeTo(ref this._timeLeftRank3, ref timeLeftToAdd, 72000); + if (foodRank >= 2) + this.AddTimeTo(ref this._timeLeftRank2, ref timeLeftToAdd, 72000); + if (foodRank < 1) + return; + this.AddTimeTo(ref this._timeLeftRank1, ref timeLeftToAdd, 72000); + } + + public void Update() => this.ReduceTimeLeft(); + + public void Clear() + { + this._timeLeftRank1 = 0; + this._timeLeftRank2 = 0; + this._timeLeftRank3 = 0; + } + + private void AddTimeTo(ref int foodTimeCounter, ref int timeLeftToAdd, int counterMaximumTime) + { + if (timeLeftToAdd == 0) + return; + int num = timeLeftToAdd; + if (foodTimeCounter + num > counterMaximumTime) + num = counterMaximumTime - foodTimeCounter; + foodTimeCounter += num; + timeLeftToAdd -= num; + } + + private void ReduceTimeLeft() + { + if (this._timeLeftRank3 > 0) + --this._timeLeftRank3; + else if (this._timeLeftRank2 > 0) + { + --this._timeLeftRank2; + } + else + { + if (this._timeLeftRank1 <= 0) + return; + --this._timeLeftRank1; + } + } + } +} diff --git a/GameContent/WorldBuilding/Configuration.json b/GameContent/WorldBuilding/Configuration.json new file mode 100644 index 0000000..4875dba --- /dev/null +++ b/GameContent/WorldBuilding/Configuration.json @@ -0,0 +1,261 @@ +{ + "Biomes": { + "CaveHouseBiome": { + // Min: 0.0, Max: 1.0 + "IceChestChance": 1.0, + // Min: 0.0, Max: 1.0 + "JungleChestChance": 1.0, + // Min: 0.0, Max: 1.0 + "GoldChestChance": 1.0, + // Min: 0.0, Max: 1.0 + "GraniteChestChance": 1.0, + // Min: 0.0, Max: 1.0 + "MarbleChestChance": 1.0, + // Min: 0.0, Max: 1.0 + "MushroomChestChance": 1.0, + // Min: 0.0, Max: 1.0 + "DesertChestChance": 1.0 + }, + "DesertBiome": { + // Min: 0.0, Max: 1.0 + "ChanceOfEntrance": .5 + }, + "DunesBiome": { + // Min: 0.1, Max: 3.0 + "HeightScale": 1.0, + // Min: 10 + "SingleDunesWidth": { + "Min": 150, + "Max": 250, + "ScaleWith": "None" + } + }, + "EnchantedSwordBiome": { + // Min: 0.0, Max: 1.0 + "ChanceOfEntrance": 0.3333333, + // Min: 0.0, Max: 1.0 + "ChanceOfRealSword": 1.0 + } + }, + "Passes": { + "Reset": {}, + "Terrain": { + // Min: 0 + "FlatBeachPadding": 5 + }, + "Dunes": { + // Min: 0 + "Count": { + "Min": 1, + "Max": 2, + "ScaleWith": "WorldWidth" + }, + // Min: 0.0, Max: 1.0 + "ChanceOfPyramid": 0.4 + }, + "Tunnels": {}, + "Ocean Sand": {}, + "Mount Caves": {}, + "Dirt Wall Backgrounds": {}, + "Rocks In Dirt": {}, + "Dirt In Rocks": {}, + "Clay": {}, + "Small Holes": {}, + "Dirt Layer Caves": {}, + "Rock Layer Caves": {}, + "Surface Caves": {}, + "Slush Check": {}, + "Grass": {}, + "Jungle": {}, + "Marble": { + // Min: 0 + "Count": { + "Min": 4, + "Max": 8, + "ScaleWith": "WorldArea" + } + }, + "Granite": { + // Min: 0 + "Count": { + "Min": 4, + "Max": 8, + "ScaleWith": "WorldWidth" + } + }, + "Mud Caves To Grass": {}, + "Full Desert": {}, + "Floating Islands": {}, + "Mushroom Patches": {}, + "Mud To Dirt": {}, + "Silt": {}, + "Shinies": {}, + "Webs": {}, + "Underworld": {}, + "Lakes": {}, + "Corruption": {}, + "Dungeon": { + "MinimumDistanceToBeach": 50 + }, + "Slush": {}, + "Mountain Caves": {}, + "Beaches": {}, + "Gems": {}, + "Gravitating Sand": {}, + "Clean Up Dirt": {}, + "Pyramids": {}, + "Dirt Rock Wall Runner": {}, + "Living Trees": {}, + "Wood Tree Walls": {}, + "Altars": {}, + "Wet Jungle": {}, + "Remove Water From Sand": {}, + "Jungle Temple": {}, + "Hives": {}, + "Jungle Chests": {}, + "Smooth World": {}, + "Settle Liquids": {}, + "Waterfalls": {}, + "Ice": {}, + "Wall Variety": {}, + "Traps": {}, + "Life Crystals": {}, + "Statues": {}, + "Buried Chests": { + // Min: 0 + "CaveHouseCount": { + "Min": 35, + "Max": 40, + "ScaleWith": "WorldArea" + }, + // Min: 0 + "CaveChestCount": { + "Min": 35, + "Max": 40, + "ScaleWith": "WorldArea" + }, + // Min: 0 + "UnderworldChestCount": { + "Min": 7, + "Max": 10, + "ScaleWith": "WorldWidth" + }, + // Min: 0 + "AdditionalDesertHouseCount": { + "Min": 2, + "Max": 2, + "ScaleWith": "WorldArea" + } + }, + "Surface Chests": {}, + "Jungle Chests Placement": {}, + "Water Chests": {}, + "Spider Caves": {}, + "Gem Caves": {}, + "Moss": {}, + "Temple": {}, + "Ice Walls": {}, + "Jungle Trees": {}, + "Floating Island Houses": {}, + "Quick Cleanup": {}, + "Pots": {}, + "Hellforge": {}, + "Spreading Grass": {}, + "Piles": {}, + "Cactus": {}, + "Spawn Point": {}, + "Grass Wall": {}, + "Guide": {}, + "Sunflowers": {}, + "Planting Trees": {}, + "Herbs": {}, + "Dye Plants": {}, + "Webs And Honey": {}, + "Weeds": {}, + "Mud Caves To Grass 2": {}, + "Jungle Plants": {}, + "Vines": {}, + "Flowers": {}, + "Mushrooms": {}, + "Stalac": {}, + "Gems In Ice Biome": {}, + "Random Gems": {}, + "Moss Grass": {}, + "Muds Walls In Jungle": {}, + "Larva": {}, + "Temple Cleanup": {}, + "Settle Liquids Again": {}, + "Tile Cleanup": {}, + "Lihzahrd Altars": {}, + "Micro Biomes": { + "DeadManChests": { + "Min": 10, + "Max": 20, + "ScaleWith": "WorldWidth" + }, + // Min: 0 + "SwordShrineAttempts": { + "Min": 1, + "Max": 2, + "ScaleWith": "WorldWidth" + }, + // Min: 0, Max: 1 + "SwordShrinePlacementChance": 0.25, + // Min: 0 + "ThinIcePatchCount": { + "Min": 3, + "Max": 5, + "ScaleWith": "WorldWidth" + }, + // Min: 0 + "CampsiteCount": { + "Min": 6, + "Max": 11, + "ScaleWith": "WorldArea" + }, + // Min: 0 + "ExplosiveTrapCount": { + "Min": 14, + "Max": 29, + "ScaleWith": "WorldArea" + }, + // Min: 0 + "LivingTreeCount": { + "Min": 6, + "Max": 11, + "ScaleWith": "WorldWidth" + }, + // Min: 0 + "CorruptionPitCount": { + "Min": 1, + "Max": 2, + "ScaleWith": "WorldArea" + }, + // Min: 0 + "StandardTrackCount": { + "Min": 4, + "Max": 7, + "ScaleWith": "WorldArea" + }, + // Min: 1 + "StandardTrackLength": { + "Min": 150, + "Max": 300, + "ScaleWith": "WorldWidth" + }, + // Min: 0 + "LongTrackCount": { + "Min": 1, + "Max": 2, + "ScaleWith": "WorldWidth" + }, + // Min: 1 + "LongTrackLength": { + "Min": 400, + "Max": 1000, + "ScaleWith": "WorldWidth" + } + }, + "Final Cleanup": {} + } +} \ No newline at end of file diff --git a/GameInput/InputMode.cs b/GameInput/InputMode.cs new file mode 100644 index 0000000..d6294fb --- /dev/null +++ b/GameInput/InputMode.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameInput.InputMode +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameInput +{ + public enum InputMode + { + Keyboard, + KeyboardUI, + Mouse, + XBoxGamepad, + XBoxGamepadUI, + } +} diff --git a/GameInput/KeyConfiguration.cs b/GameInput/KeyConfiguration.cs new file mode 100644 index 0000000..9a97f83 --- /dev/null +++ b/GameInput/KeyConfiguration.cs @@ -0,0 +1,80 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameInput.KeyConfiguration +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using System.Linq; + +namespace Terraria.GameInput +{ + public class KeyConfiguration + { + public Dictionary> KeyStatus = new Dictionary>(); + + public bool DoGrappleAndInteractShareTheSameKey => this.KeyStatus["Grapple"].Count > 0 && this.KeyStatus["MouseRight"].Count > 0 && this.KeyStatus["MouseRight"].Contains(this.KeyStatus["Grapple"][0]); + + public void SetupKeys() + { + this.KeyStatus.Clear(); + foreach (string knownTrigger in PlayerInput.KnownTriggers) + this.KeyStatus.Add(knownTrigger, new List()); + } + + public void Processkey(TriggersSet set, string newKey) + { + foreach (KeyValuePair> keyStatu in this.KeyStatus) + { + if (keyStatu.Value.Contains(newKey)) + set.KeyStatus[keyStatu.Key] = true; + } + if (!set.Up && !set.Down && !set.Left && !set.Right && !set.HotbarPlus && !set.HotbarMinus && (!Main.gameMenu && !Main.ingameOptionsWindow || !set.MenuUp && !set.MenuDown && !set.MenuLeft && !set.MenuRight)) + return; + set.UsedMovementKey = true; + } + + public void CopyKeyState(TriggersSet oldSet, TriggersSet newSet, string newKey) + { + foreach (KeyValuePair> keyStatu in this.KeyStatus) + { + if (keyStatu.Value.Contains(newKey)) + newSet.KeyStatus[keyStatu.Key] = oldSet.KeyStatus[keyStatu.Key]; + } + } + + public void ReadPreferences(Dictionary> dict) + { + foreach (KeyValuePair> keyValuePair in dict) + { + if (this.KeyStatus.ContainsKey(keyValuePair.Key)) + { + this.KeyStatus[keyValuePair.Key].Clear(); + foreach (string str in keyValuePair.Value) + this.KeyStatus[keyValuePair.Key].Add(str); + } + } + } + + public Dictionary> WritePreferences() + { + Dictionary> dictionary = new Dictionary>(); + foreach (KeyValuePair> keyStatu in this.KeyStatus) + { + if (keyStatu.Value.Count > 0) + dictionary.Add(keyStatu.Key, keyStatu.Value.ToList()); + } + if (!dictionary.ContainsKey("MouseLeft") || dictionary["MouseLeft"].Count == 0) + dictionary["MouseLeft"] = new List() + { + "Mouse1" + }; + if (!dictionary.ContainsKey("Inventory") || dictionary["Inventory"].Count == 0) + dictionary["Inventory"] = new List() + { + "Escape" + }; + return dictionary; + } + } +} diff --git a/GameInput/LockOnHelper.cs b/GameInput/LockOnHelper.cs new file mode 100644 index 0000000..e679dea --- /dev/null +++ b/GameInput/LockOnHelper.cs @@ -0,0 +1,410 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameInput.LockOnHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using Terraria.GameContent; +using Terraria.ID; + +namespace Terraria.GameInput +{ + public class LockOnHelper + { + private const float LOCKON_RANGE = 2000f; + private const int LOCKON_HOLD_LIFETIME = 40; + public static LockOnHelper.LockOnMode UseMode = LockOnHelper.LockOnMode.ThreeDS; + private static bool _enabled; + private static bool _canLockOn; + private static List _targets = new List(); + private static int _pickedTarget; + private static int _lifeTimeCounter; + private static int _lifeTimeArrowDisplay; + private static int _threeDSTarget = -1; + private static int _targetClosestTarget = -1; + public static bool ForceUsability = false; + private static float[,] _drawProgress = new float[200, 2]; + + public static void CycleUseModes() + { + switch (LockOnHelper.UseMode) + { + case LockOnHelper.LockOnMode.FocusTarget: + LockOnHelper.UseMode = LockOnHelper.LockOnMode.TargetClosest; + break; + case LockOnHelper.LockOnMode.TargetClosest: + LockOnHelper.UseMode = LockOnHelper.LockOnMode.ThreeDS; + break; + case LockOnHelper.LockOnMode.ThreeDS: + LockOnHelper.UseMode = LockOnHelper.LockOnMode.TargetClosest; + break; + } + } + + public static NPC AimedTarget => LockOnHelper._pickedTarget == -1 || LockOnHelper._targets.Count < 1 ? (NPC) null : Main.npc[LockOnHelper._targets[LockOnHelper._pickedTarget]]; + + public static Vector2 PredictedPosition + { + get + { + NPC aimedTarget = LockOnHelper.AimedTarget; + if (aimedTarget == null) + return Vector2.Zero; + Vector2 vec = aimedTarget.Center; + int index1; + Vector2 pos; + if (NPC.GetNPCLocation(LockOnHelper._targets[LockOnHelper._pickedTarget], true, false, out index1, out pos)) + vec = pos + Main.npc[index1].Distance(Main.player[Main.myPlayer].Center) / 2000f * Main.npc[index1].velocity * 45f; + Player player = Main.player[Main.myPlayer]; + for (int index2 = ItemID.Sets.LockOnAimAbove[player.inventory[player.selectedItem].type]; index2 > 0 && (double) vec.Y > 100.0; --index2) + { + Point tileCoordinates = vec.ToTileCoordinates(); + tileCoordinates.Y -= 4; + if (WorldGen.InWorld(tileCoordinates.X, tileCoordinates.Y, 10) && !WorldGen.SolidTile(tileCoordinates.X, tileCoordinates.Y)) + vec.Y -= 16f; + else + break; + } + float? nullable = ItemID.Sets.LockOnAimCompensation[player.inventory[player.selectedItem].type]; + if (nullable.HasValue) + { + vec.Y -= (float) (aimedTarget.height / 2); + Vector2 v = vec - player.Center; + Vector2 vector2 = v.SafeNormalize(Vector2.Zero); + --vector2.Y; + float num = (float) Math.Pow((double) v.Length() / 700.0, 2.0) * 700f; + vec.Y += (float) ((double) vector2.Y * (double) num * (double) nullable.Value * 1.0); + vec.X += (float) (-(double) vector2.X * (double) num * (double) nullable.Value * 1.0); + } + return vec; + } + } + + public static void Update() + { + LockOnHelper._canLockOn = false; + if (!LockOnHelper.CanUseLockonSystem()) + { + LockOnHelper.SetActive(false); + } + else + { + if (--LockOnHelper._lifeTimeArrowDisplay < 0) + LockOnHelper._lifeTimeArrowDisplay = 0; + LockOnHelper.FindMostViableTarget(LockOnHelper.LockOnMode.ThreeDS, ref LockOnHelper._threeDSTarget); + LockOnHelper.FindMostViableTarget(LockOnHelper.LockOnMode.TargetClosest, ref LockOnHelper._targetClosestTarget); + if (PlayerInput.Triggers.JustPressed.LockOn && !PlayerInput.WritingText) + { + LockOnHelper._lifeTimeCounter = 40; + LockOnHelper._lifeTimeArrowDisplay = 30; + LockOnHelper.HandlePressing(); + } + if (!LockOnHelper._enabled) + return; + if (LockOnHelper.UseMode == LockOnHelper.LockOnMode.FocusTarget && PlayerInput.Triggers.Current.LockOn) + { + if (LockOnHelper._lifeTimeCounter <= 0) + { + LockOnHelper.SetActive(false); + return; + } + --LockOnHelper._lifeTimeCounter; + } + NPC aimedTarget = LockOnHelper.AimedTarget; + if (!LockOnHelper.ValidTarget(aimedTarget)) + LockOnHelper.SetActive(false); + if (LockOnHelper.UseMode == LockOnHelper.LockOnMode.TargetClosest) + { + LockOnHelper.SetActive(false); + LockOnHelper.SetActive(LockOnHelper.CanEnable()); + } + if (!LockOnHelper._enabled) + return; + Player p = Main.player[Main.myPlayer]; + Vector2 predictedPosition = LockOnHelper.PredictedPosition; + bool flag = false; + if (LockOnHelper.ShouldLockOn(p) && (ItemID.Sets.LockOnIgnoresCollision[p.inventory[p.selectedItem].type] || Collision.CanHit(p.Center, 0, 0, predictedPosition, 0, 0) || Collision.CanHitLine(p.Center, 0, 0, predictedPosition, 0, 0) || Collision.CanHit(p.Center, 0, 0, aimedTarget.Center, 0, 0) || Collision.CanHitLine(p.Center, 0, 0, aimedTarget.Center, 0, 0))) + flag = true; + if (!flag) + return; + LockOnHelper._canLockOn = true; + } + } + + public static bool CanUseLockonSystem() => LockOnHelper.ForceUsability || PlayerInput.UsingGamepad; + + public static void SetUP() + { + if (!LockOnHelper._canLockOn) + return; + NPC aimedTarget = LockOnHelper.AimedTarget; + LockOnHelper.SetLockPosition(Main.ReverseGravitySupport(LockOnHelper.PredictedPosition - Main.screenPosition)); + } + + public static void SetDOWN() + { + if (!LockOnHelper._canLockOn) + return; + LockOnHelper.ResetLockPosition(); + } + + private static bool ShouldLockOn(Player p) => p.inventory[p.selectedItem].type != 496; + + public static void Toggle(bool forceOff = false) + { + LockOnHelper._lifeTimeCounter = 40; + LockOnHelper._lifeTimeArrowDisplay = 30; + LockOnHelper.HandlePressing(); + if (!forceOff) + return; + LockOnHelper._enabled = false; + } + + public static bool Enabled => LockOnHelper._enabled; + + private static void FindMostViableTarget(LockOnHelper.LockOnMode context, ref int targetVar) + { + targetVar = -1; + if (LockOnHelper.UseMode != context || !LockOnHelper.CanUseLockonSystem()) + return; + List t1_1 = new List(); + int t1_2 = -1; + Utils.Swap>(ref t1_1, ref LockOnHelper._targets); + Utils.Swap(ref t1_2, ref LockOnHelper._pickedTarget); + LockOnHelper.RefreshTargets(Main.MouseWorld, 2000f); + LockOnHelper.GetClosestTarget(Main.MouseWorld); + Utils.Swap>(ref t1_1, ref LockOnHelper._targets); + Utils.Swap(ref t1_2, ref LockOnHelper._pickedTarget); + if (t1_2 >= 0) + targetVar = t1_1[t1_2]; + t1_1.Clear(); + } + + private static void HandlePressing() + { + switch (LockOnHelper.UseMode) + { + case LockOnHelper.LockOnMode.TargetClosest: + LockOnHelper.SetActive(!LockOnHelper._enabled); + break; + case LockOnHelper.LockOnMode.ThreeDS: + if (!LockOnHelper._enabled) + { + LockOnHelper.SetActive(true); + break; + } + LockOnHelper.CycleTargetThreeDS(); + break; + default: + if (!LockOnHelper._enabled) + { + LockOnHelper.SetActive(true); + break; + } + LockOnHelper.CycleTargetFocus(); + break; + } + } + + private static void CycleTargetFocus() + { + int target = LockOnHelper._targets[LockOnHelper._pickedTarget]; + LockOnHelper.RefreshTargets(Main.MouseWorld, 2000f); + if (LockOnHelper._targets.Count < 1 || LockOnHelper._targets.Count == 1 && target == LockOnHelper._targets[0]) + { + LockOnHelper.SetActive(false); + } + else + { + LockOnHelper._pickedTarget = 0; + for (int index = 0; index < LockOnHelper._targets.Count; ++index) + { + if (LockOnHelper._targets[index] > target) + { + LockOnHelper._pickedTarget = index; + break; + } + } + } + } + + private static void CycleTargetThreeDS() + { + int target = LockOnHelper._targets[LockOnHelper._pickedTarget]; + LockOnHelper.RefreshTargets(Main.MouseWorld, 2000f); + LockOnHelper.GetClosestTarget(Main.MouseWorld); + if (LockOnHelper._targets.Count >= 1 && (LockOnHelper._targets.Count != 1 || target != LockOnHelper._targets[0]) && target != LockOnHelper._targets[LockOnHelper._pickedTarget]) + return; + LockOnHelper.SetActive(false); + } + + private static bool CanEnable() => !Main.player[Main.myPlayer].dead; + + private static void SetActive(bool on) + { + if (on) + { + if (!LockOnHelper.CanEnable()) + return; + LockOnHelper.RefreshTargets(Main.MouseWorld, 2000f); + LockOnHelper.GetClosestTarget(Main.MouseWorld); + if (LockOnHelper._pickedTarget < 0) + return; + LockOnHelper._enabled = true; + } + else + { + LockOnHelper._enabled = false; + LockOnHelper._targets.Clear(); + LockOnHelper._lifeTimeCounter = 0; + LockOnHelper._threeDSTarget = -1; + LockOnHelper._targetClosestTarget = -1; + } + } + + private static void RefreshTargets(Vector2 position, float radius) + { + LockOnHelper._targets.Clear(); + Rectangle rectangle = Utils.CenteredRectangle(Main.player[Main.myPlayer].Center, new Vector2(1920f, 1200f)); + Vector2 center = Main.player[Main.myPlayer].Center; + Main.player[Main.myPlayer].DirectionTo(Main.MouseWorld); + for (int index = 0; index < Main.npc.Length; ++index) + { + NPC n = Main.npc[index]; + if (LockOnHelper.ValidTarget(n) && (double) n.Distance(position) <= (double) radius && rectangle.Intersects(n.Hitbox) && (double) Lighting.GetSubLight(n.Center).Length() / 3.0 >= 0.0299999993294477) + LockOnHelper._targets.Add(index); + } + } + + private static void GetClosestTarget(Vector2 position) + { + LockOnHelper._pickedTarget = -1; + float num1 = -1f; + if (LockOnHelper.UseMode == LockOnHelper.LockOnMode.ThreeDS) + { + Vector2 center = Main.player[Main.myPlayer].Center; + Vector2 vector2 = Main.player[Main.myPlayer].DirectionTo(Main.MouseWorld); + for (int index = 0; index < LockOnHelper._targets.Count; ++index) + { + int target = LockOnHelper._targets[index]; + NPC n = Main.npc[target]; + float num2 = Vector2.Dot(n.DirectionFrom(center), vector2); + if (LockOnHelper.ValidTarget(n) && (LockOnHelper._pickedTarget == -1 || (double) num2 > (double) num1)) + { + LockOnHelper._pickedTarget = index; + num1 = num2; + } + } + } + else + { + for (int index = 0; index < LockOnHelper._targets.Count; ++index) + { + int target = LockOnHelper._targets[index]; + NPC n = Main.npc[target]; + if (LockOnHelper.ValidTarget(n) && (LockOnHelper._pickedTarget == -1 || (double) n.Distance(position) < (double) num1)) + { + LockOnHelper._pickedTarget = index; + num1 = n.Distance(position); + } + } + } + } + + private static bool ValidTarget(NPC n) => n != null && n.active && !n.dontTakeDamage && !n.friendly && !n.isLikeATownNPC && n.life >= 1 && !n.immortal && (n.aiStyle != 25 || (double) n.ai[0] != 0.0); + + private static void SetLockPosition(Vector2 position) + { + PlayerInput.LockOnCachePosition(); + Main.mouseX = PlayerInput.MouseX = (int) position.X; + Main.mouseY = PlayerInput.MouseY = (int) position.Y; + } + + private static void ResetLockPosition() + { + PlayerInput.LockOnUnCachePosition(); + Main.mouseX = PlayerInput.MouseX; + Main.mouseY = PlayerInput.MouseY; + } + + public static void Draw(SpriteBatch spriteBatch) + { + if (Main.gameMenu) + return; + Texture2D texture = TextureAssets.LockOnCursor.Value; + Rectangle r1 = new Rectangle(0, 0, texture.Width, 12); + Rectangle r2 = new Rectangle(0, 16, texture.Width, 12); + Color color1 = Main.OurFavoriteColor.MultiplyRGBA(new Color(0.75f, 0.75f, 0.75f, 1f)); + color1.A = (byte) 220; + Color favoriteColor = Main.OurFavoriteColor; + favoriteColor.A = (byte) 220; + float num1 = (float) (0.939999997615814 + Math.Sin((double) Main.GlobalTimeWrappedHourly * 6.28318548202515) * 0.0599999986588955); + favoriteColor *= num1; + Color t1 = color1 * num1; + Utils.Swap(ref t1, ref favoriteColor); + Color color2 = t1.MultiplyRGBA(new Color(0.8f, 0.8f, 0.8f, 0.8f)); + Color color3 = t1.MultiplyRGBA(new Color(0.8f, 0.8f, 0.8f, 0.8f)); + float gravDir = Main.player[Main.myPlayer].gravDir; + float num2 = 1f; + float num3 = 0.1f; + float num4 = 0.8f; + float num5 = 1f; + float num6 = 10f; + float num7 = 10f; + bool flag = false; + for (int i = 0; i < LockOnHelper._drawProgress.GetLength(0); ++i) + { + int num8 = 0; + if (LockOnHelper._pickedTarget != -1 && LockOnHelper._targets.Count > 0 && i == LockOnHelper._targets[LockOnHelper._pickedTarget]) + num8 = 2; + else if (flag && LockOnHelper._targets.Contains(i) || LockOnHelper.UseMode == LockOnHelper.LockOnMode.ThreeDS && LockOnHelper._threeDSTarget == i || LockOnHelper.UseMode == LockOnHelper.LockOnMode.TargetClosest && LockOnHelper._targetClosestTarget == i) + num8 = 1; + LockOnHelper._drawProgress[i, 0] = MathHelper.Clamp(LockOnHelper._drawProgress[i, 0] + (num8 == 1 ? num3 : -num3), 0.0f, 1f); + LockOnHelper._drawProgress[i, 1] = MathHelper.Clamp(LockOnHelper._drawProgress[i, 1] + (num8 == 2 ? num3 : -num3), 0.0f, 1f); + float num9 = LockOnHelper._drawProgress[i, 0]; + if ((double) num9 > 0.0) + { + float num10 = (float) (1.0 - (double) num9 * (double) num9); + Vector2 position = Main.ReverseGravitySupport(Main.npc[i].Top + new Vector2(0.0f, (float) (-(double) num7 - (double) num10 * (double) num6)) * gravDir - Main.screenPosition, (float) Main.npc[i].height); + spriteBatch.Draw(texture, position, new Rectangle?(r1), color2 * num9, 0.0f, r1.Size() / 2f, new Vector2(0.58f, 1f) * num2 * num4 * (1f + num9) / 2f, SpriteEffects.None, 0.0f); + spriteBatch.Draw(texture, position, new Rectangle?(r2), color3 * num9 * num9, 0.0f, r2.Size() / 2f, new Vector2(0.58f, 1f) * num2 * num4 * (1f + num9) / 2f, SpriteEffects.None, 0.0f); + } + float num11 = LockOnHelper._drawProgress[i, 1]; + if ((double) num11 > 0.0) + { + int num12 = Main.npc[i].width; + if (Main.npc[i].height > num12) + num12 = Main.npc[i].height; + int num13 = num12 + 20; + if ((double) num13 < 70.0) + num5 *= (float) num13 / 70f; + float num14 = 3f; + Vector2 vector2_1 = Main.npc[i].Center; + Vector2 pos; + if (LockOnHelper._targets.Count >= 0 && LockOnHelper._pickedTarget >= 0 && LockOnHelper._pickedTarget < LockOnHelper._targets.Count && i == LockOnHelper._targets[LockOnHelper._pickedTarget] && NPC.GetNPCLocation(i, true, false, out int _, out pos)) + vector2_1 = pos; + for (int index = 0; (double) index < (double) num14; ++index) + { + float num15 = (float) (6.28318548202515 / (double) num14 * (double) index + (double) Main.GlobalTimeWrappedHourly * 6.28318548202515 * 0.25); + Vector2 vector2_2 = new Vector2(0.0f, (float) (num13 / 2)).RotatedBy((double) num15); + Vector2 position = Main.ReverseGravitySupport(vector2_1 + vector2_2 - Main.screenPosition); + float rotation = (float) ((double) num15 * ((double) gravDir == 1.0 ? 1.0 : -1.0) + 3.14159274101257 * ((double) gravDir == 1.0 ? 1.0 : 0.0)); + spriteBatch.Draw(texture, position, new Rectangle?(r1), t1 * num11, rotation, r1.Size() / 2f, new Vector2(0.58f, 1f) * num2 * num5 * (1f + num11) / 2f, SpriteEffects.None, 0.0f); + spriteBatch.Draw(texture, position, new Rectangle?(r2), favoriteColor * num11 * num11, rotation, r2.Size() / 2f, new Vector2(0.58f, 1f) * num2 * num5 * (1f + num11) / 2f, SpriteEffects.None, 0.0f); + } + } + } + } + + public enum LockOnMode + { + FocusTarget, + TargetClosest, + ThreeDS, + } + } +} diff --git a/GameInput/PlayerInput.cs b/GameInput/PlayerInput.cs new file mode 100644 index 0000000..078f701 --- /dev/null +++ b/GameInput/PlayerInput.cs @@ -0,0 +1,2026 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameInput.PlayerInput +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Input; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.Audio; +using Terraria.GameContent.UI; +using Terraria.GameContent.UI.Chat; +using Terraria.GameContent.UI.States; +using Terraria.ID; +using Terraria.IO; +using Terraria.Social; +using Terraria.UI; +using Terraria.UI.Gamepad; + +namespace Terraria.GameInput +{ + public class PlayerInput + { + public static Vector2 RawMouseScale = Vector2.One; + public static TriggersPack Triggers = new TriggersPack(); + public static List KnownTriggers = new List() + { + "MouseLeft", + "MouseRight", + "Up", + "Down", + "Left", + "Right", + "Jump", + "Throw", + "Inventory", + "Grapple", + "SmartSelect", + "SmartCursor", + "QuickMount", + "QuickHeal", + "QuickMana", + "QuickBuff", + "MapZoomIn", + "MapZoomOut", + "MapAlphaUp", + "MapAlphaDown", + "MapFull", + "MapStyle", + "Hotbar1", + "Hotbar2", + "Hotbar3", + "Hotbar4", + "Hotbar5", + "Hotbar6", + "Hotbar7", + "Hotbar8", + "Hotbar9", + "Hotbar10", + "HotbarMinus", + "HotbarPlus", + "DpadRadial1", + "DpadRadial2", + "DpadRadial3", + "DpadRadial4", + "RadialHotbar", + "RadialQuickbar", + "DpadSnap1", + "DpadSnap2", + "DpadSnap3", + "DpadSnap4", + "MenuUp", + "MenuDown", + "MenuLeft", + "MenuRight", + "LockOn", + "ViewZoomIn", + "ViewZoomOut", + "ToggleCreativeMenu" + }; + private static bool _canReleaseRebindingLock = true; + private static int _memoOfLastPoint = -1; + public static int NavigatorRebindingLock; + public static string BlockedKey = ""; + private static string _listeningTrigger; + private static InputMode _listeningInputMode; + public static Dictionary Profiles = new Dictionary(); + public static Dictionary OriginalProfiles = new Dictionary(); + private static string _selectedProfile; + private static PlayerInputProfile _currentProfile; + public static InputMode CurrentInputMode = InputMode.Keyboard; + private static Buttons[] ButtonsGamepad = (Buttons[]) Enum.GetValues(typeof (Buttons)); + public static bool GrappleAndInteractAreShared; + public static SmartSelectGamepadPointer smartSelectPointer = new SmartSelectGamepadPointer(); + private static string _invalidatorCheck = ""; + private static bool _lastActivityState; + public static MouseState MouseInfo; + public static MouseState MouseInfoOld; + public static int MouseX; + public static int MouseY; + public static bool LockGamepadTileUseButton = false; + public static List MouseKeys = new List(); + public static int PreUIX; + public static int PreUIY; + public static int PreLockOnX; + public static int PreLockOnY; + public static int ScrollWheelValue; + public static int ScrollWheelValueOld; + public static int ScrollWheelDelta; + public static int ScrollWheelDeltaForUI; + public static bool GamepadAllowScrolling; + public static int GamepadScrollValue; + public static Vector2 GamepadThumbstickLeft = Vector2.Zero; + public static Vector2 GamepadThumbstickRight = Vector2.Zero; + private const int _fastUseMouseItemSlotType = -2; + private const int _fastUseEmpty = -1; + private static int _fastUseItemInventorySlot = -1; + private static bool _InBuildingMode; + private static int _UIPointForBuildingMode = -1; + public static bool WritingText; + private static int _originalMouseX; + private static int _originalMouseY; + private static int _originalLastMouseX; + private static int _originalLastMouseY; + private static int _originalScreenWidth; + private static int _originalScreenHeight; + private static ZoomContext _currentWantedZoom; + private static int[] DpadSnapCooldown = new int[4]; + + public static event Action OnBindingChange; + + public static event Action OnActionableInput; + + public static void ListenFor(string triggerName, InputMode inputmode) + { + PlayerInput._listeningTrigger = triggerName; + PlayerInput._listeningInputMode = inputmode; + } + + public static string ListeningTrigger => PlayerInput._listeningTrigger; + + public static bool CurrentlyRebinding => PlayerInput._listeningTrigger != null; + + public static bool InvisibleGamepadInMenus + { + get + { + if (((Main.gameMenu || Main.ingameOptionsWindow || Main.playerInventory || Main.player[Main.myPlayer].talkNPC != -1 || Main.player[Main.myPlayer].sign != -1 ? 1 : (Main.InGameUI.CurrentState != null ? 1 : 0)) == 0 || PlayerInput._InBuildingMode ? 0 : (Main.InvisibleCursorForGamepad ? 1 : 0)) != 0) + return true; + return PlayerInput.CursorIsBusy && !PlayerInput._InBuildingMode; + } + } + + public static PlayerInputProfile CurrentProfile => PlayerInput._currentProfile; + + public static KeyConfiguration ProfileGamepadUI => PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI]; + + public static bool UsingGamepad => PlayerInput.CurrentInputMode == InputMode.XBoxGamepad || PlayerInput.CurrentInputMode == InputMode.XBoxGamepadUI; + + public static bool UsingGamepadUI => PlayerInput.CurrentInputMode == InputMode.XBoxGamepadUI; + + public static bool IgnoreMouseInterface + { + get + { + if (PlayerInput.UsingGamepad && !UILinkPointNavigator.Available) + return true; + return Main.LocalPlayer.itemAnimation > 0 && !PlayerInput.UsingGamepad; + } + } + + private static bool InvalidateKeyboardSwap() + { + if (PlayerInput._invalidatorCheck.Length == 0) + return false; + string str = ""; + List pressedKeys = PlayerInput.GetPressedKeys(); + for (int index = 0; index < pressedKeys.Count; ++index) + str = str + (object) pressedKeys[index] + ", "; + if (str == PlayerInput._invalidatorCheck) + return true; + PlayerInput._invalidatorCheck = ""; + return false; + } + + public static void ResetInputsOnActiveStateChange() + { + bool isActive = Main.instance.IsActive; + if (PlayerInput._lastActivityState != isActive) + { + PlayerInput.MouseInfo = new MouseState(); + PlayerInput.MouseInfoOld = new MouseState(); + Main.keyState = Keyboard.GetState(); + Main.inputText = Keyboard.GetState(); + Main.oldInputText = Keyboard.GetState(); + Main.keyCount = 0; + PlayerInput.Triggers.Reset(); + PlayerInput.Triggers.Reset(); + string str = ""; + List pressedKeys = PlayerInput.GetPressedKeys(); + for (int index = 0; index < pressedKeys.Count; ++index) + str = str + (object) pressedKeys[index] + ", "; + PlayerInput._invalidatorCheck = str; + } + PlayerInput._lastActivityState = isActive; + } + + public static List GetPressedKeys() + { + List list = ((IEnumerable) Main.keyState.GetPressedKeys()).ToList(); + for (int index = list.Count - 1; index >= 0; --index) + { + if (list[index] == Keys.None) + list.RemoveAt(index); + } + return list; + } + + public static void TryEnteringFastUseModeForInventorySlot(int inventorySlot) + { + PlayerInput._fastUseItemInventorySlot = inventorySlot; + if (inventorySlot >= 50 || inventorySlot < 0) + return; + Player localPlayer = Main.LocalPlayer; + ItemSlot.PickupItemIntoMouse(localPlayer.inventory, 0, inventorySlot, localPlayer); + } + + public static void TryEnteringFastUseModeForMouseItem() => PlayerInput._fastUseItemInventorySlot = -2; + + public static bool ShouldFastUseItem => PlayerInput._fastUseItemInventorySlot != -1; + + public static void TryEndingFastUse() + { + if (PlayerInput._fastUseItemInventorySlot >= 0 && PlayerInput._fastUseItemInventorySlot != -2) + { + Player localPlayer = Main.LocalPlayer; + if (localPlayer.inventory[PlayerInput._fastUseItemInventorySlot].IsAir) + Utils.Swap(ref Main.mouseItem, ref localPlayer.inventory[PlayerInput._fastUseItemInventorySlot]); + } + PlayerInput._fastUseItemInventorySlot = -1; + } + + public static bool InBuildingMode => PlayerInput._InBuildingMode; + + public static void EnterBuildingMode() + { + SoundEngine.PlaySound(10); + PlayerInput._InBuildingMode = true; + PlayerInput._UIPointForBuildingMode = UILinkPointNavigator.CurrentPoint; + if (Main.mouseItem.stack > 0) + return; + int pointForBuildingMode = PlayerInput._UIPointForBuildingMode; + if (pointForBuildingMode >= 50 || pointForBuildingMode < 0 || Main.player[Main.myPlayer].inventory[pointForBuildingMode].stack <= 0) + return; + Utils.Swap(ref Main.mouseItem, ref Main.player[Main.myPlayer].inventory[pointForBuildingMode]); + } + + public static void ExitBuildingMode() + { + SoundEngine.PlaySound(11); + PlayerInput._InBuildingMode = false; + UILinkPointNavigator.ChangePoint(PlayerInput._UIPointForBuildingMode); + if (Main.mouseItem.stack > 0 && Main.player[Main.myPlayer].itemAnimation == 0) + { + int pointForBuildingMode = PlayerInput._UIPointForBuildingMode; + if (pointForBuildingMode < 50 && pointForBuildingMode >= 0 && Main.player[Main.myPlayer].inventory[pointForBuildingMode].stack <= 0) + Utils.Swap(ref Main.mouseItem, ref Main.player[Main.myPlayer].inventory[pointForBuildingMode]); + } + PlayerInput._UIPointForBuildingMode = -1; + } + + public static void VerifyBuildingMode() + { + if (!PlayerInput._InBuildingMode) + return; + Player player = Main.player[Main.myPlayer]; + bool flag = false; + if (Main.mouseItem.stack <= 0) + flag = true; + if (player.dead) + flag = true; + if (!flag) + return; + PlayerInput.ExitBuildingMode(); + } + + public static int RealScreenWidth => PlayerInput._originalScreenWidth; + + public static int RealScreenHeight => PlayerInput._originalScreenHeight; + + public static void SetSelectedProfile(string name) + { + if (!PlayerInput.Profiles.ContainsKey(name)) + return; + PlayerInput._selectedProfile = name; + PlayerInput._currentProfile = PlayerInput.Profiles[PlayerInput._selectedProfile]; + } + + public static void Initialize() + { + Main.InputProfiles.OnProcessText += new Preferences.TextProcessAction(PlayerInput.PrettyPrintProfiles); + Player.Hooks.OnEnterWorld += new Action(PlayerInput.Hook_OnEnterWorld); + PlayerInputProfile playerInputProfile1 = new PlayerInputProfile("Redigit's Pick"); + playerInputProfile1.Initialize(PresetProfiles.Redigit); + PlayerInput.Profiles.Add(playerInputProfile1.Name, playerInputProfile1); + PlayerInputProfile playerInputProfile2 = new PlayerInputProfile("Yoraiz0r's Pick"); + playerInputProfile2.Initialize(PresetProfiles.Yoraiz0r); + PlayerInput.Profiles.Add(playerInputProfile2.Name, playerInputProfile2); + PlayerInputProfile playerInputProfile3 = new PlayerInputProfile("Console (Playstation)"); + playerInputProfile3.Initialize(PresetProfiles.ConsolePS); + PlayerInput.Profiles.Add(playerInputProfile3.Name, playerInputProfile3); + PlayerInputProfile playerInputProfile4 = new PlayerInputProfile("Console (Xbox)"); + playerInputProfile4.Initialize(PresetProfiles.ConsoleXBox); + PlayerInput.Profiles.Add(playerInputProfile4.Name, playerInputProfile4); + PlayerInputProfile playerInputProfile5 = new PlayerInputProfile("Custom"); + playerInputProfile5.Initialize(PresetProfiles.Redigit); + PlayerInput.Profiles.Add(playerInputProfile5.Name, playerInputProfile5); + PlayerInputProfile playerInputProfile6 = new PlayerInputProfile("Redigit's Pick"); + playerInputProfile6.Initialize(PresetProfiles.Redigit); + PlayerInput.OriginalProfiles.Add(playerInputProfile6.Name, playerInputProfile6); + PlayerInputProfile playerInputProfile7 = new PlayerInputProfile("Yoraiz0r's Pick"); + playerInputProfile7.Initialize(PresetProfiles.Yoraiz0r); + PlayerInput.OriginalProfiles.Add(playerInputProfile7.Name, playerInputProfile7); + PlayerInputProfile playerInputProfile8 = new PlayerInputProfile("Console (Playstation)"); + playerInputProfile8.Initialize(PresetProfiles.ConsolePS); + PlayerInput.OriginalProfiles.Add(playerInputProfile8.Name, playerInputProfile8); + PlayerInputProfile playerInputProfile9 = new PlayerInputProfile("Console (Xbox)"); + playerInputProfile9.Initialize(PresetProfiles.ConsoleXBox); + PlayerInput.OriginalProfiles.Add(playerInputProfile9.Name, playerInputProfile9); + PlayerInput.SetSelectedProfile("Custom"); + PlayerInput.Triggers.Initialize(); + } + + public static void Hook_OnEnterWorld(Player player) + { + if (!PlayerInput.UsingGamepad || player.whoAmI != Main.myPlayer) + return; + Main.SmartCursorEnabled = true; + } + + public static bool Save() + { + Main.InputProfiles.Clear(); + Main.InputProfiles.Put("Selected Profile", (object) PlayerInput._selectedProfile); + foreach (KeyValuePair profile in PlayerInput.Profiles) + Main.InputProfiles.Put(profile.Value.Name, (object) profile.Value.Save()); + return Main.InputProfiles.Save(); + } + + public static void Load() + { + Main.InputProfiles.Load(); + Dictionary dictionary = new Dictionary(); + string currentValue1 = (string) null; + Main.InputProfiles.Get("Selected Profile", ref currentValue1); + List allKeys = Main.InputProfiles.GetAllKeys(); + for (int index = 0; index < allKeys.Count; ++index) + { + string str = allKeys[index]; + if (!(str == "Selected Profile") && !string.IsNullOrEmpty(str)) + { + Dictionary currentValue2 = new Dictionary(); + Main.InputProfiles.Get>(str, ref currentValue2); + if (currentValue2.Count > 0) + { + PlayerInputProfile playerInputProfile = new PlayerInputProfile(str); + playerInputProfile.Initialize(PresetProfiles.None); + if (playerInputProfile.Load(currentValue2)) + dictionary.Add(str, playerInputProfile); + } + } + } + if (dictionary.Count <= 0) + return; + PlayerInput.Profiles = dictionary; + if (!string.IsNullOrEmpty(currentValue1) && PlayerInput.Profiles.ContainsKey(currentValue1)) + PlayerInput.SetSelectedProfile(currentValue1); + else + PlayerInput.SetSelectedProfile(PlayerInput.Profiles.Keys.First()); + } + + public static void ManageVersion_1_3() + { + PlayerInputProfile profile = PlayerInput.Profiles["Custom"]; + string[,] strArray = new string[20, 2] + { + { + "KeyUp", + "Up" + }, + { + "KeyDown", + "Down" + }, + { + "KeyLeft", + "Left" + }, + { + "KeyRight", + "Right" + }, + { + "KeyJump", + "Jump" + }, + { + "KeyThrowItem", + "Throw" + }, + { + "KeyInventory", + "Inventory" + }, + { + "KeyQuickHeal", + "QuickHeal" + }, + { + "KeyQuickMana", + "QuickMana" + }, + { + "KeyQuickBuff", + "QuickBuff" + }, + { + "KeyUseHook", + "Grapple" + }, + { + "KeyAutoSelect", + "SmartSelect" + }, + { + "KeySmartCursor", + "SmartCursor" + }, + { + "KeyMount", + "QuickMount" + }, + { + "KeyMapStyle", + "MapStyle" + }, + { + "KeyFullscreenMap", + "MapFull" + }, + { + "KeyMapZoomIn", + "MapZoomIn" + }, + { + "KeyMapZoomOut", + "MapZoomOut" + }, + { + "KeyMapAlphaUp", + "MapAlphaUp" + }, + { + "KeyMapAlphaDown", + "MapAlphaDown" + } + }; + for (int index = 0; index < strArray.GetLength(0); ++index) + { + string currentValue = (string) null; + Main.Configuration.Get(strArray[index, 0], ref currentValue); + if (currentValue != null) + { + profile.InputModes[InputMode.Keyboard].KeyStatus[strArray[index, 1]] = new List() + { + currentValue + }; + profile.InputModes[InputMode.KeyboardUI].KeyStatus[strArray[index, 1]] = new List() + { + currentValue + }; + } + } + } + + public static bool CursorIsBusy => (double) ItemSlot.CircularRadialOpacity > 0.0 || (double) ItemSlot.QuicksRadialOpacity > 0.0; + + public static void UpdateInput() + { + PlayerInput.Triggers.Reset(); + PlayerInput.ScrollWheelValueOld = PlayerInput.ScrollWheelValue; + PlayerInput.ScrollWheelValue = 0; + PlayerInput.GamepadThumbstickLeft = Vector2.Zero; + PlayerInput.GamepadThumbstickRight = Vector2.Zero; + PlayerInput.GrappleAndInteractAreShared = PlayerInput.UsingGamepad && PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].DoGrappleAndInteractShareTheSameKey; + if (PlayerInput.InBuildingMode && !PlayerInput.UsingGamepad) + PlayerInput.ExitBuildingMode(); + if (PlayerInput._canReleaseRebindingLock && PlayerInput.NavigatorRebindingLock > 0) + { + --PlayerInput.NavigatorRebindingLock; + PlayerInput.Triggers.Current.UsedMovementKey = false; + if (PlayerInput.NavigatorRebindingLock == 0 && PlayerInput._memoOfLastPoint != -1) + { + UIManageControls.ForceMoveTo = PlayerInput._memoOfLastPoint; + PlayerInput._memoOfLastPoint = -1; + } + } + PlayerInput._canReleaseRebindingLock = true; + PlayerInput.VerifyBuildingMode(); + PlayerInput.MouseInput(); + int num = 0 | (PlayerInput.KeyboardInput() ? 1 : 0) | (PlayerInput.GamePadInput() ? 1 : 0); + PlayerInput.Triggers.Update(); + PlayerInput.PostInput(); + PlayerInput.ScrollWheelDelta = PlayerInput.ScrollWheelValue - PlayerInput.ScrollWheelValueOld; + PlayerInput.ScrollWheelDeltaForUI = PlayerInput.ScrollWheelDelta; + PlayerInput.WritingText = false; + PlayerInput.UpdateMainMouse(); + Main.mouseLeft = PlayerInput.Triggers.Current.MouseLeft; + Main.mouseRight = PlayerInput.Triggers.Current.MouseRight; + PlayerInput.CacheZoomableValues(); + if (num == 0 || PlayerInput.OnActionableInput == null) + return; + PlayerInput.OnActionableInput(); + } + + public static void UpdateMainMouse() + { + Main.lastMouseX = Main.mouseX; + Main.lastMouseY = Main.mouseY; + Main.mouseX = PlayerInput.MouseX; + Main.mouseY = PlayerInput.MouseY; + } + + public static void CacheZoomableValues() + { + PlayerInput.CacheOriginalInput(); + PlayerInput.CacheOriginalScreenDimensions(); + } + + public static void CacheMousePositionForZoom() + { + float num = 1f; + PlayerInput._originalMouseX = (int) ((double) Main.mouseX * (double) num); + PlayerInput._originalMouseY = (int) ((double) Main.mouseY * (double) num); + } + + private static void CacheOriginalInput() + { + PlayerInput._originalMouseX = Main.mouseX; + PlayerInput._originalMouseY = Main.mouseY; + PlayerInput._originalLastMouseX = Main.lastMouseX; + PlayerInput._originalLastMouseY = Main.lastMouseY; + } + + public static void CacheOriginalScreenDimensions() + { + PlayerInput._originalScreenWidth = Main.screenWidth; + PlayerInput._originalScreenHeight = Main.screenHeight; + } + + public static Vector2 OriginalScreenSize => new Vector2((float) PlayerInput._originalScreenWidth, (float) PlayerInput._originalScreenHeight); + + private static bool GamePadInput() + { + bool flag1 = false; + PlayerInput.ScrollWheelValue += PlayerInput.GamepadScrollValue; + GamePadState gamePadState = new GamePadState(); + bool flag2 = false; + for (int index = 0; index < 4; ++index) + { + GamePadState state = GamePad.GetState((PlayerIndex) index); + if (state.IsConnected) + { + flag2 = true; + gamePadState = state; + break; + } + } + if (Main.SettingBlockGamepadsEntirely || !flag2 || !Main.instance.IsActive && !Main.AllowUnfocusedInputOnGamepad) + return false; + Player player = Main.player[Main.myPlayer]; + bool flag3 = UILinkPointNavigator.Available && !PlayerInput.InBuildingMode; + InputMode key = InputMode.XBoxGamepad; + if (Main.gameMenu | flag3 || player.talkNPC != -1 || player.sign != -1 || IngameFancyUI.CanCover()) + key = InputMode.XBoxGamepadUI; + if (!Main.gameMenu && PlayerInput.InBuildingMode) + key = InputMode.XBoxGamepad; + if (PlayerInput.CurrentInputMode == InputMode.XBoxGamepad && key == InputMode.XBoxGamepadUI) + flag1 = true; + if (PlayerInput.CurrentInputMode == InputMode.XBoxGamepadUI && key == InputMode.XBoxGamepad) + flag1 = true; + if (flag1) + PlayerInput.CurrentInputMode = key; + KeyConfiguration inputMode = PlayerInput.CurrentProfile.InputModes[key]; + int num1 = 2145386496; + for (int index = 0; index < PlayerInput.ButtonsGamepad.Length; ++index) + { + if (((Buttons) num1 & PlayerInput.ButtonsGamepad[index]) <= (Buttons) 0 && gamePadState.IsButtonDown(PlayerInput.ButtonsGamepad[index])) + { + if (PlayerInput.CheckRebindingProcessGamepad(PlayerInput.ButtonsGamepad[index].ToString())) + return false; + inputMode.Processkey(PlayerInput.Triggers.Current, PlayerInput.ButtonsGamepad[index].ToString()); + flag1 = true; + } + } + PlayerInput.GamepadThumbstickLeft = gamePadState.ThumbSticks.Left * new Vector2(1f, -1f) * new Vector2((float) (PlayerInput.CurrentProfile.LeftThumbstickInvertX.ToDirectionInt() * -1), (float) (PlayerInput.CurrentProfile.LeftThumbstickInvertY.ToDirectionInt() * -1)); + PlayerInput.GamepadThumbstickRight = gamePadState.ThumbSticks.Right * new Vector2(1f, -1f) * new Vector2((float) (PlayerInput.CurrentProfile.RightThumbstickInvertX.ToDirectionInt() * -1), (float) (PlayerInput.CurrentProfile.RightThumbstickInvertY.ToDirectionInt() * -1)); + Vector2 gamepadThumbstickRight = PlayerInput.GamepadThumbstickRight; + Vector2 gamepadThumbstickLeft = PlayerInput.GamepadThumbstickLeft; + Vector2 vector2_1 = gamepadThumbstickRight; + if (vector2_1 != Vector2.Zero) + vector2_1.Normalize(); + Vector2 vector2_2 = gamepadThumbstickLeft; + if (vector2_2 != Vector2.Zero) + vector2_2.Normalize(); + float num2 = 0.6f; + float triggersDeadzone = PlayerInput.CurrentProfile.TriggersDeadzone; + if (key == InputMode.XBoxGamepadUI) + { + num2 = 0.4f; + if (PlayerInput.GamepadAllowScrolling) + PlayerInput.GamepadScrollValue -= (int) ((double) gamepadThumbstickRight.Y * 16.0); + PlayerInput.GamepadAllowScrolling = false; + } + Buttons buttons; + if ((double) Vector2.Dot(-Vector2.UnitX, vector2_2) >= (double) num2 && (double) gamepadThumbstickLeft.X < -(double) PlayerInput.CurrentProfile.LeftThumbstickDeadzoneX) + { + if (PlayerInput.CheckRebindingProcessGamepad(Buttons.LeftThumbstickLeft.ToString())) + return false; + KeyConfiguration keyConfiguration = inputMode; + TriggersSet current = PlayerInput.Triggers.Current; + buttons = Buttons.LeftThumbstickLeft; + string newKey = buttons.ToString(); + keyConfiguration.Processkey(current, newKey); + flag1 = true; + } + if ((double) Vector2.Dot(Vector2.UnitX, vector2_2) >= (double) num2 && (double) gamepadThumbstickLeft.X > (double) PlayerInput.CurrentProfile.LeftThumbstickDeadzoneX) + { + buttons = Buttons.LeftThumbstickRight; + if (PlayerInput.CheckRebindingProcessGamepad(buttons.ToString())) + return false; + KeyConfiguration keyConfiguration = inputMode; + TriggersSet current = PlayerInput.Triggers.Current; + buttons = Buttons.LeftThumbstickRight; + string newKey = buttons.ToString(); + keyConfiguration.Processkey(current, newKey); + flag1 = true; + } + if ((double) Vector2.Dot(-Vector2.UnitY, vector2_2) >= (double) num2 && (double) gamepadThumbstickLeft.Y < -(double) PlayerInput.CurrentProfile.LeftThumbstickDeadzoneY) + { + buttons = Buttons.LeftThumbstickUp; + if (PlayerInput.CheckRebindingProcessGamepad(buttons.ToString())) + return false; + KeyConfiguration keyConfiguration = inputMode; + TriggersSet current = PlayerInput.Triggers.Current; + buttons = Buttons.LeftThumbstickUp; + string newKey = buttons.ToString(); + keyConfiguration.Processkey(current, newKey); + flag1 = true; + } + if ((double) Vector2.Dot(Vector2.UnitY, vector2_2) >= (double) num2 && (double) gamepadThumbstickLeft.Y > (double) PlayerInput.CurrentProfile.LeftThumbstickDeadzoneY) + { + buttons = Buttons.LeftThumbstickDown; + if (PlayerInput.CheckRebindingProcessGamepad(buttons.ToString())) + return false; + KeyConfiguration keyConfiguration = inputMode; + TriggersSet current = PlayerInput.Triggers.Current; + buttons = Buttons.LeftThumbstickDown; + string newKey = buttons.ToString(); + keyConfiguration.Processkey(current, newKey); + flag1 = true; + } + if ((double) Vector2.Dot(-Vector2.UnitX, vector2_1) >= (double) num2 && (double) gamepadThumbstickRight.X < -(double) PlayerInput.CurrentProfile.RightThumbstickDeadzoneX) + { + buttons = Buttons.RightThumbstickLeft; + if (PlayerInput.CheckRebindingProcessGamepad(buttons.ToString())) + return false; + KeyConfiguration keyConfiguration = inputMode; + TriggersSet current = PlayerInput.Triggers.Current; + buttons = Buttons.RightThumbstickLeft; + string newKey = buttons.ToString(); + keyConfiguration.Processkey(current, newKey); + flag1 = true; + } + if ((double) Vector2.Dot(Vector2.UnitX, vector2_1) >= (double) num2 && (double) gamepadThumbstickRight.X > (double) PlayerInput.CurrentProfile.RightThumbstickDeadzoneX) + { + buttons = Buttons.RightThumbstickRight; + if (PlayerInput.CheckRebindingProcessGamepad(buttons.ToString())) + return false; + KeyConfiguration keyConfiguration = inputMode; + TriggersSet current = PlayerInput.Triggers.Current; + buttons = Buttons.RightThumbstickRight; + string newKey = buttons.ToString(); + keyConfiguration.Processkey(current, newKey); + flag1 = true; + } + if ((double) Vector2.Dot(-Vector2.UnitY, vector2_1) >= (double) num2 && (double) gamepadThumbstickRight.Y < -(double) PlayerInput.CurrentProfile.RightThumbstickDeadzoneY) + { + buttons = Buttons.RightThumbstickUp; + if (PlayerInput.CheckRebindingProcessGamepad(buttons.ToString())) + return false; + KeyConfiguration keyConfiguration = inputMode; + TriggersSet current = PlayerInput.Triggers.Current; + buttons = Buttons.RightThumbstickUp; + string newKey = buttons.ToString(); + keyConfiguration.Processkey(current, newKey); + flag1 = true; + } + if ((double) Vector2.Dot(Vector2.UnitY, vector2_1) >= (double) num2 && (double) gamepadThumbstickRight.Y > (double) PlayerInput.CurrentProfile.RightThumbstickDeadzoneY) + { + buttons = Buttons.RightThumbstickDown; + if (PlayerInput.CheckRebindingProcessGamepad(buttons.ToString())) + return false; + KeyConfiguration keyConfiguration = inputMode; + TriggersSet current = PlayerInput.Triggers.Current; + buttons = Buttons.RightThumbstickDown; + string newKey = buttons.ToString(); + keyConfiguration.Processkey(current, newKey); + flag1 = true; + } + if ((double) gamePadState.Triggers.Left > (double) triggersDeadzone) + { + buttons = Buttons.LeftTrigger; + if (PlayerInput.CheckRebindingProcessGamepad(buttons.ToString())) + return false; + KeyConfiguration keyConfiguration = inputMode; + TriggersSet current = PlayerInput.Triggers.Current; + buttons = Buttons.LeftTrigger; + string newKey = buttons.ToString(); + keyConfiguration.Processkey(current, newKey); + flag1 = true; + } + if ((double) gamePadState.Triggers.Right > (double) triggersDeadzone) + { + buttons = Buttons.RightTrigger; + if (PlayerInput.CheckRebindingProcessGamepad(buttons.ToString())) + return false; + KeyConfiguration keyConfiguration = inputMode; + TriggersSet current = PlayerInput.Triggers.Current; + buttons = Buttons.RightTrigger; + string newKey = buttons.ToString(); + keyConfiguration.Processkey(current, newKey); + flag1 = true; + } + bool flag4 = ItemID.Sets.GamepadWholeScreenUseRange[player.inventory[player.selectedItem].type] || player.scope; + int num3 = player.inventory[player.selectedItem].tileBoost + ItemID.Sets.GamepadExtraRange[player.inventory[player.selectedItem].type]; + if (player.yoyoString && ItemID.Sets.Yoyo[player.inventory[player.selectedItem].type]) + num3 += 5; + else if (player.inventory[player.selectedItem].createTile < 0 && player.inventory[player.selectedItem].createWall <= 0 && player.inventory[player.selectedItem].shoot > 0) + num3 += 10; + else if (player.controlTorch) + ++num3; + if (flag4) + num3 += 30; + if (player.mount.Active && player.mount.Type == 8) + num3 = 10; + bool flag5 = false; + bool flag6 = !Main.gameMenu && !flag3 && Main.SmartCursorEnabled; + if (!PlayerInput.CursorIsBusy) + { + bool flag7 = Main.mapFullscreen || !Main.gameMenu && !flag3; + int num4 = Main.screenWidth / 2; + int num5 = Main.screenHeight / 2; + if (!Main.mapFullscreen & flag7 && !flag4) + { + Point point = Main.ReverseGravitySupport(player.Center - Main.screenPosition).ToPoint(); + num4 = point.X; + num5 = point.Y; + } + if (((!(player.velocity == Vector2.Zero) || !(gamepadThumbstickLeft == Vector2.Zero) ? 0 : (gamepadThumbstickRight == Vector2.Zero ? 1 : 0)) & (flag6 ? 1 : 0)) != 0) + num4 += player.direction * 10; + float m11_1 = Main.GameViewMatrix.ZoomMatrix.M11; + PlayerInput.smartSelectPointer.UpdateSize(new Vector2((float) (Player.tileRangeX * 16 + num3 * 16), (float) (Player.tileRangeY * 16 + num3 * 16)) * m11_1); + if (flag4) + PlayerInput.smartSelectPointer.UpdateSize(new Vector2((float) (Math.Max(Main.screenWidth, Main.screenHeight) / 2))); + PlayerInput.smartSelectPointer.UpdateCenter(new Vector2((float) num4, (float) num5)); + if (gamepadThumbstickRight != Vector2.Zero & flag7) + { + Vector2 vector2_3 = new Vector2(8f); + if (!Main.gameMenu && Main.mapFullscreen) + vector2_3 = new Vector2(16f); + if (flag6) + { + vector2_3 = new Vector2((float) (Player.tileRangeX * 16), (float) (Player.tileRangeY * 16)); + if (num3 != 0) + vector2_3 += new Vector2((float) (num3 * 16), (float) (num3 * 16)); + if (flag4) + vector2_3 = new Vector2((float) (Math.Max(Main.screenWidth, Main.screenHeight) / 2)); + } + else if (!Main.mapFullscreen) + { + if (player.inventory[player.selectedItem].mech) + vector2_3 += Vector2.Zero; + else + vector2_3 += new Vector2((float) num3) / 4f; + } + float m11_2 = Main.GameViewMatrix.ZoomMatrix.M11; + Vector2 vector2_4 = gamepadThumbstickRight * vector2_3 * m11_2; + int num6 = PlayerInput.MouseX - num4; + int num7 = PlayerInput.MouseY - num5; + if (flag6) + { + num6 = 0; + num7 = 0; + } + int num8 = num6 + (int) vector2_4.X; + int num9 = num7 + (int) vector2_4.Y; + PlayerInput.MouseX = num8 + num4; + PlayerInput.MouseY = num9 + num5; + flag1 = true; + flag5 = true; + } + if (gamepadThumbstickLeft != Vector2.Zero & flag7) + { + float num10 = 8f; + if (!Main.gameMenu && Main.mapFullscreen) + num10 = 3f; + if (Main.mapFullscreen) + { + Vector2 vector2_5 = gamepadThumbstickLeft * num10; + Main.mapFullscreenPos += vector2_5 * num10 * (1f / Main.mapFullscreenScale); + } + else if (!flag5 && Main.SmartCursorEnabled) + { + float m11_3 = Main.GameViewMatrix.ZoomMatrix.M11; + Vector2 vector2_6 = gamepadThumbstickLeft * new Vector2((float) (Player.tileRangeX * 16), (float) (Player.tileRangeY * 16)) * m11_3; + if (num3 != 0) + vector2_6 = gamepadThumbstickLeft * new Vector2((float) ((Player.tileRangeX + num3) * 16), (float) ((Player.tileRangeY + num3) * 16)) * m11_3; + if (flag4) + vector2_6 = new Vector2((float) (Math.Max(Main.screenWidth, Main.screenHeight) / 2)) * gamepadThumbstickLeft; + int x = (int) vector2_6.X; + int y = (int) vector2_6.Y; + PlayerInput.MouseX = x + num4; + int num11 = num5; + PlayerInput.MouseY = y + num11; + } + flag1 = true; + } + if (PlayerInput.CurrentInputMode == InputMode.XBoxGamepad) + { + PlayerInput.HandleDpadSnap(); + int num12 = PlayerInput.MouseX - num4; + int num13 = PlayerInput.MouseY - num5; + int num14; + int num15; + if (!Main.gameMenu && !flag3) + { + if (flag4 && !Main.mapFullscreen) + { + float num16 = 1f; + int num17 = Main.screenWidth / 2; + int num18 = Main.screenHeight / 2; + num14 = (int) Utils.Clamp((float) num12, (float) -num17 * num16, (float) num17 * num16); + num15 = (int) Utils.Clamp((float) num13, (float) -num18 * num16, (float) num18 * num16); + } + else + { + float num19 = 0.0f; + if (player.HeldItem.createTile >= 0 || player.HeldItem.createWall > 0 || player.HeldItem.tileWand >= 0) + num19 = 0.5f; + float m11_4 = Main.GameViewMatrix.ZoomMatrix.M11; + float num20 = (float) (-((double) (Player.tileRangeY + num3) - (double) num19) * 16.0) * m11_4; + float max = (float) (((double) (Player.tileRangeY + num3) - (double) num19) * 16.0) * m11_4; + float min = num20 - (float) (player.height / 16 / 2 * 16); + num14 = (int) Utils.Clamp((float) num12, (float) (-((double) (Player.tileRangeX + num3) - (double) num19) * 16.0) * m11_4, (float) (((double) (Player.tileRangeX + num3) - (double) num19) * 16.0) * m11_4); + num15 = (int) Utils.Clamp((float) num13, min, max); + } + if (flag6 && !flag1 | flag4) + { + float num21 = 0.81f; + if (flag4) + num21 = 0.95f; + num14 = (int) ((double) num14 * (double) num21); + num15 = (int) ((double) num15 * (double) num21); + } + } + else + { + num14 = Utils.Clamp(num12, -num4 + 10, num4 - 10); + num15 = Utils.Clamp(num13, -num5 + 10, num5 - 10); + } + PlayerInput.MouseX = num14 + num4; + PlayerInput.MouseY = num15 + num5; + } + } + if (flag1) + PlayerInput.CurrentInputMode = key; + if (PlayerInput.CurrentInputMode == InputMode.XBoxGamepad) + Main.SetCameraGamepadLerp(0.1f); + return flag1; + } + + private static void MouseInput() + { + bool flag = false; + PlayerInput.MouseInfoOld = PlayerInput.MouseInfo; + PlayerInput.MouseInfo = Mouse.GetState(); + PlayerInput.ScrollWheelValue += PlayerInput.MouseInfo.ScrollWheelValue; + if (PlayerInput.MouseInfo.X != PlayerInput.MouseInfoOld.X || PlayerInput.MouseInfo.Y != PlayerInput.MouseInfoOld.Y || PlayerInput.MouseInfo.ScrollWheelValue != PlayerInput.MouseInfoOld.ScrollWheelValue) + { + PlayerInput.MouseX = (int) ((double) PlayerInput.MouseInfo.X * (double) PlayerInput.RawMouseScale.X); + PlayerInput.MouseY = (int) ((double) PlayerInput.MouseInfo.Y * (double) PlayerInput.RawMouseScale.Y); + flag = true; + } + PlayerInput.MouseKeys.Clear(); + if (Main.instance.IsActive) + { + if (PlayerInput.MouseInfo.LeftButton == ButtonState.Pressed) + { + PlayerInput.MouseKeys.Add("Mouse1"); + flag = true; + } + if (PlayerInput.MouseInfo.RightButton == ButtonState.Pressed) + { + PlayerInput.MouseKeys.Add("Mouse2"); + flag = true; + } + if (PlayerInput.MouseInfo.MiddleButton == ButtonState.Pressed) + { + PlayerInput.MouseKeys.Add("Mouse3"); + flag = true; + } + if (PlayerInput.MouseInfo.XButton1 == ButtonState.Pressed) + { + PlayerInput.MouseKeys.Add("Mouse4"); + flag = true; + } + if (PlayerInput.MouseInfo.XButton2 == ButtonState.Pressed) + { + PlayerInput.MouseKeys.Add("Mouse5"); + flag = true; + } + } + if (!flag) + return; + PlayerInput.CurrentInputMode = InputMode.Mouse; + PlayerInput.Triggers.Current.UsedMovementKey = false; + } + + private static bool KeyboardInput() + { + bool flag1 = false; + bool flag2 = false; + List pressedKeys = PlayerInput.GetPressedKeys(); + PlayerInput.DebugKeys(pressedKeys); + if (pressedKeys.Count == 0 && PlayerInput.MouseKeys.Count == 0) + return false; + for (int index = 0; index < pressedKeys.Count; ++index) + { + if (pressedKeys[index] == Keys.LeftShift || pressedKeys[index] == Keys.RightShift) + flag1 = true; + else if (pressedKeys[index] == Keys.LeftAlt || pressedKeys[index] == Keys.RightAlt) + flag2 = true; + Main.ChromaPainter.PressKey(pressedKeys[index]); + } + string blockKey = Main.blockKey; + Keys keys = Keys.None; + string str1 = keys.ToString(); + if (blockKey != str1) + { + bool flag3 = false; + for (int index = 0; index < pressedKeys.Count; ++index) + { + keys = pressedKeys[index]; + if (keys.ToString() == Main.blockKey) + { + pressedKeys[index] = Keys.None; + flag3 = true; + } + } + if (!flag3) + { + keys = Keys.None; + Main.blockKey = keys.ToString(); + } + } + KeyConfiguration inputMode = PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard]; + if (Main.gameMenu && !PlayerInput.WritingText) + inputMode = PlayerInput.CurrentProfile.InputModes[InputMode.KeyboardUI]; + List stringList1 = new List(pressedKeys.Count); + for (int index = 0; index < pressedKeys.Count; ++index) + { + List stringList2 = stringList1; + keys = pressedKeys[index]; + string str2 = keys.ToString(); + stringList2.Add(str2); + } + if (PlayerInput.WritingText) + stringList1.Clear(); + int count = stringList1.Count; + stringList1.AddRange((IEnumerable) PlayerInput.MouseKeys); + bool flag4 = false; + for (int index = 0; index < stringList1.Count; ++index) + { + if (index >= count || pressedKeys[index] != Keys.None) + { + string newKey = stringList1[index]; + string str3 = stringList1[index]; + keys = Keys.Tab; + string str4 = keys.ToString(); + if (!(str3 == str4) || ((!flag1 ? 0 : (SocialAPI.Mode == SocialMode.Steam ? 1 : 0)) | (flag2 ? 1 : 0)) == 0) + { + if (PlayerInput.CheckRebindingProcessKeyboard(newKey)) + return false; + KeyboardState oldKeyState = Main.oldKeyState; + if (index >= count || !Main.oldKeyState.IsKeyDown(pressedKeys[index])) + inputMode.Processkey(PlayerInput.Triggers.Current, newKey); + else + inputMode.CopyKeyState(PlayerInput.Triggers.Old, PlayerInput.Triggers.Current, newKey); + if (index >= count || pressedKeys[index] != Keys.None) + flag4 = true; + } + } + } + if (flag4) + PlayerInput.CurrentInputMode = InputMode.Keyboard; + return flag4; + } + + private static void DebugKeys(List keys) + { + } + + private static void FixDerpedRebinds() + { + List triggers = new List() + { + "MouseLeft", + "MouseRight", + "Inventory" + }; + foreach (InputMode inputMode in Enum.GetValues(typeof (InputMode))) + { + if (inputMode != InputMode.Mouse) + { + PlayerInput.FixKeysConflict(inputMode, triggers); + foreach (string str in triggers) + { + if (PlayerInput.CurrentProfile.InputModes[inputMode].KeyStatus[str].Count < 1) + PlayerInput.ResetKeyBinding(inputMode, str); + } + } + } + } + + private static void FixKeysConflict(InputMode inputMode, List triggers) + { + for (int index1 = 0; index1 < triggers.Count; ++index1) + { + for (int index2 = index1 + 1; index2 < triggers.Count; ++index2) + { + List keyStatu1 = PlayerInput.CurrentProfile.InputModes[inputMode].KeyStatus[triggers[index1]]; + List keyStatu2 = PlayerInput.CurrentProfile.InputModes[inputMode].KeyStatus[triggers[index2]]; + foreach (string str in keyStatu1.Intersect((IEnumerable) keyStatu2).ToList()) + { + keyStatu1.Remove(str); + keyStatu2.Remove(str); + } + } + } + } + + private static void ResetKeyBinding(InputMode inputMode, string trigger) + { + string key = "Redigit's Pick"; + if (PlayerInput.OriginalProfiles.ContainsKey(PlayerInput._selectedProfile)) + key = PlayerInput._selectedProfile; + PlayerInput.CurrentProfile.InputModes[inputMode].KeyStatus[trigger].Clear(); + PlayerInput.CurrentProfile.InputModes[inputMode].KeyStatus[trigger].AddRange((IEnumerable) PlayerInput.OriginalProfiles[key].InputModes[inputMode].KeyStatus[trigger]); + } + + private static bool CheckRebindingProcessGamepad(string newKey) + { + PlayerInput._canReleaseRebindingLock = false; + if (PlayerInput.CurrentlyRebinding && PlayerInput._listeningInputMode == InputMode.XBoxGamepad) + { + PlayerInput.NavigatorRebindingLock = 3; + PlayerInput._memoOfLastPoint = UILinkPointNavigator.CurrentPoint; + SoundEngine.PlaySound(12); + if (PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus[PlayerInput.ListeningTrigger].Contains(newKey)) + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus[PlayerInput.ListeningTrigger].Remove(newKey); + else + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus[PlayerInput.ListeningTrigger] = new List() + { + newKey + }; + PlayerInput.ListenFor((string) null, InputMode.XBoxGamepad); + } + if (PlayerInput.CurrentlyRebinding && PlayerInput._listeningInputMode == InputMode.XBoxGamepadUI) + { + PlayerInput.NavigatorRebindingLock = 3; + PlayerInput._memoOfLastPoint = UILinkPointNavigator.CurrentPoint; + SoundEngine.PlaySound(12); + if (PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus[PlayerInput.ListeningTrigger].Contains(newKey)) + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus[PlayerInput.ListeningTrigger].Remove(newKey); + else + PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus[PlayerInput.ListeningTrigger] = new List() + { + newKey + }; + PlayerInput.ListenFor((string) null, InputMode.XBoxGamepadUI); + } + PlayerInput.FixDerpedRebinds(); + if (PlayerInput.OnBindingChange != null) + PlayerInput.OnBindingChange(); + return PlayerInput.NavigatorRebindingLock > 0; + } + + private static bool CheckRebindingProcessKeyboard(string newKey) + { + PlayerInput._canReleaseRebindingLock = false; + if (PlayerInput.CurrentlyRebinding && PlayerInput._listeningInputMode == InputMode.Keyboard) + { + PlayerInput.NavigatorRebindingLock = 3; + PlayerInput._memoOfLastPoint = UILinkPointNavigator.CurrentPoint; + SoundEngine.PlaySound(12); + if (PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus[PlayerInput.ListeningTrigger].Contains(newKey)) + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus[PlayerInput.ListeningTrigger].Remove(newKey); + else + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus[PlayerInput.ListeningTrigger] = new List() + { + newKey + }; + PlayerInput.ListenFor((string) null, InputMode.Keyboard); + Main.blockKey = newKey; + Main.blockInput = false; + Main.ChromaPainter.CollectBoundKeys(); + } + if (PlayerInput.CurrentlyRebinding && PlayerInput._listeningInputMode == InputMode.KeyboardUI) + { + PlayerInput.NavigatorRebindingLock = 3; + PlayerInput._memoOfLastPoint = UILinkPointNavigator.CurrentPoint; + SoundEngine.PlaySound(12); + if (PlayerInput.CurrentProfile.InputModes[InputMode.KeyboardUI].KeyStatus[PlayerInput.ListeningTrigger].Contains(newKey)) + PlayerInput.CurrentProfile.InputModes[InputMode.KeyboardUI].KeyStatus[PlayerInput.ListeningTrigger].Remove(newKey); + else + PlayerInput.CurrentProfile.InputModes[InputMode.KeyboardUI].KeyStatus[PlayerInput.ListeningTrigger] = new List() + { + newKey + }; + PlayerInput.ListenFor((string) null, InputMode.KeyboardUI); + Main.blockKey = newKey; + Main.blockInput = false; + Main.ChromaPainter.CollectBoundKeys(); + } + PlayerInput.FixDerpedRebinds(); + if (PlayerInput.OnBindingChange != null) + PlayerInput.OnBindingChange(); + return PlayerInput.NavigatorRebindingLock > 0; + } + + private static void PostInput() + { + Main.GamepadCursorAlpha = MathHelper.Clamp(Main.GamepadCursorAlpha + (!Main.SmartCursorEnabled || UILinkPointNavigator.Available || !(PlayerInput.GamepadThumbstickLeft == Vector2.Zero) || !(PlayerInput.GamepadThumbstickRight == Vector2.Zero) ? 0.05f : -0.05f), 0.0f, 1f); + if (PlayerInput.CurrentProfile.HotbarAllowsRadial) + { + int num = PlayerInput.Triggers.Current.HotbarPlus.ToInt() - PlayerInput.Triggers.Current.HotbarMinus.ToInt(); + if (PlayerInput.MiscSettingsTEMP.HotbarRadialShouldBeUsed) + { + switch (num) + { + case -1: + PlayerInput.Triggers.Current.RadialQuickbar = true; + PlayerInput.Triggers.JustReleased.RadialQuickbar = false; + break; + case 1: + PlayerInput.Triggers.Current.RadialHotbar = true; + PlayerInput.Triggers.JustReleased.RadialHotbar = false; + break; + } + } + } + PlayerInput.MiscSettingsTEMP.HotbarRadialShouldBeUsed = false; + } + + private static void HandleDpadSnap() + { + Vector2 zero = Vector2.Zero; + Player player = Main.player[Main.myPlayer]; + for (int index = 0; index < 4; ++index) + { + bool flag = false; + Vector2 vector2 = Vector2.Zero; + if (Main.gameMenu || UILinkPointNavigator.Available && !PlayerInput.InBuildingMode) + return; + switch (index) + { + case 0: + flag = PlayerInput.Triggers.Current.DpadMouseSnap1; + vector2 = -Vector2.UnitY; + break; + case 1: + flag = PlayerInput.Triggers.Current.DpadMouseSnap2; + vector2 = Vector2.UnitX; + break; + case 2: + flag = PlayerInput.Triggers.Current.DpadMouseSnap3; + vector2 = Vector2.UnitY; + break; + case 3: + flag = PlayerInput.Triggers.Current.DpadMouseSnap4; + vector2 = -Vector2.UnitX; + break; + } + if (PlayerInput.DpadSnapCooldown[index] > 0) + --PlayerInput.DpadSnapCooldown[index]; + if (flag) + { + if (PlayerInput.DpadSnapCooldown[index] == 0) + { + int num = 6; + if (ItemSlot.IsABuildingItem(player.inventory[player.selectedItem])) + num = player.inventory[player.selectedItem].useTime; + PlayerInput.DpadSnapCooldown[index] = num; + zero += vector2; + } + } + else + PlayerInput.DpadSnapCooldown[index] = 0; + } + if (!(zero != Vector2.Zero)) + return; + Main.SmartCursorEnabled = false; + Matrix zoomMatrix = Main.GameViewMatrix.ZoomMatrix; + Matrix matrix1 = Matrix.Invert(zoomMatrix); + Vector2 mouseScreen = Main.MouseScreen; + Vector2.Transform(Main.screenPosition, matrix1); + Matrix matrix2 = matrix1; + Vector2 vector2_1 = Vector2.Transform((Vector2.Transform(mouseScreen, matrix2) + zero * new Vector2(16f) + Main.screenPosition).ToTileCoordinates().ToWorldCoordinates() - Main.screenPosition, zoomMatrix); + PlayerInput.MouseX = (int) vector2_1.X; + PlayerInput.MouseY = (int) vector2_1.Y; + } + + public static string ComposeInstructionsForGamepad() + { + string str1 = ""; + if (!PlayerInput.UsingGamepad) + return str1; + InputMode key = InputMode.XBoxGamepad; + if (Main.gameMenu || UILinkPointNavigator.Available) + key = InputMode.XBoxGamepadUI; + if (PlayerInput.InBuildingMode && !Main.gameMenu) + key = InputMode.XBoxGamepad; + KeyConfiguration inputMode = PlayerInput.CurrentProfile.InputModes[key]; + string str2; + if (Main.mapFullscreen && !Main.gameMenu) + { + str2 = str1 + " " + PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.inter[118].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"]) + PlayerInput.BuildCommand(Lang.inter[119].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"]); + if (Main.netMode == 1 && Main.player[Main.myPlayer].HasItem(2997)) + str2 += PlayerInput.BuildCommand(Lang.inter[120].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseRight"]); + } + else if (key == InputMode.XBoxGamepadUI && !PlayerInput.InBuildingMode) + { + str2 = UILinkPointNavigator.GetInstructions(); + } + else + { + string str3 = str1 + PlayerInput.BuildCommand(Lang.misc[58].Value, false, inputMode.KeyStatus["Jump"]) + PlayerInput.BuildCommand(Lang.misc[59].Value, false, inputMode.KeyStatus["HotbarMinus"], inputMode.KeyStatus["HotbarPlus"]); + if (PlayerInput.InBuildingMode) + str3 += PlayerInput.BuildCommand(Lang.menu[6].Value, false, inputMode.KeyStatus["Inventory"], inputMode.KeyStatus["MouseRight"]); + if (WiresUI.Open) + { + str2 = str3 + PlayerInput.BuildCommand(Lang.misc[53].Value, false, inputMode.KeyStatus["MouseLeft"]) + PlayerInput.BuildCommand(Lang.misc[56].Value, false, inputMode.KeyStatus["MouseRight"]); + } + else + { + Item obj = Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem]; + if (obj.damage > 0 && obj.ammo == 0) + str2 = str3 + PlayerInput.BuildCommand(Lang.misc[60].Value, false, inputMode.KeyStatus["MouseLeft"]); + else if (obj.createTile >= 0 || obj.createWall > 0) + str2 = str3 + PlayerInput.BuildCommand(Lang.misc[61].Value, false, inputMode.KeyStatus["MouseLeft"]); + else + str2 = str3 + PlayerInput.BuildCommand(Lang.misc[63].Value, false, inputMode.KeyStatus["MouseLeft"]); + bool flag1 = true; + bool flag2 = Main.SmartInteractProj != -1 || Main.HasInteractibleObjectThatIsNotATile; + bool flag3 = !Main.SmartInteractShowingGenuine && Main.SmartInteractShowingFake; + if (((Main.SmartInteractShowingGenuine ? 1 : (Main.SmartInteractShowingFake ? 1 : 0)) | (flag2 ? 1 : 0)) != 0) + { + if (Main.SmartInteractNPC != -1) + { + if (flag3) + flag1 = false; + str2 += PlayerInput.BuildCommand(Lang.misc[80].Value, false, inputMode.KeyStatus["MouseRight"]); + } + else if (flag2) + { + if (flag3) + flag1 = false; + str2 += PlayerInput.BuildCommand(Lang.misc[79].Value, false, inputMode.KeyStatus["MouseRight"]); + } + else if (Main.SmartInteractX != -1 && Main.SmartInteractY != -1) + { + if (flag3) + flag1 = false; + Tile tile = Main.tile[Main.SmartInteractX, Main.SmartInteractY]; + if (TileID.Sets.TileInteractRead[(int) tile.type]) + str2 += PlayerInput.BuildCommand(Lang.misc[81].Value, false, inputMode.KeyStatus["MouseRight"]); + else + str2 += PlayerInput.BuildCommand(Lang.misc[79].Value, false, inputMode.KeyStatus["MouseRight"]); + } + } + else if (WiresUI.Settings.DrawToolModeUI) + str2 += PlayerInput.BuildCommand(Lang.misc[89].Value, false, inputMode.KeyStatus["MouseRight"]); + if ((!PlayerInput.GrappleAndInteractAreShared || !WiresUI.Settings.DrawToolModeUI && (!Main.SmartInteractShowingGenuine || !Main.HasSmartInteractTarget) && (!Main.SmartInteractShowingFake || flag1)) && Main.LocalPlayer.QuickGrapple_GetItemToUse() != null) + str2 += PlayerInput.BuildCommand(Lang.misc[57].Value, false, inputMode.KeyStatus["Grapple"]); + } + } + return str2; + } + + public static string BuildCommand( + string CommandText, + bool Last, + params List[] Bindings) + { + string str1 = ""; + if (Bindings.Length == 0) + return str1; + string str2 = str1 + PlayerInput.GenerateGlyphList(Bindings[0]); + for (int index = 1; index < Bindings.Length; ++index) + { + string glyphList = PlayerInput.GenerateGlyphList(Bindings[index]); + if (glyphList.Length > 0) + str2 = str2 + "/" + glyphList; + } + if (str2.Length > 0) + { + str2 = str2 + ": " + CommandText; + if (!Last) + str2 += " "; + } + return str2; + } + + public static string GenerateInputTag_ForCurrentGamemode_WithHacks( + bool tagForGameplay, + string triggerName) + { + InputMode inputMode = PlayerInput.CurrentInputMode; + switch (inputMode) + { + case InputMode.KeyboardUI: + case InputMode.Mouse: + inputMode = InputMode.Keyboard; + break; + } + if (!(triggerName == "SmartSelect")) + { + if (triggerName == "SmartCursor" && inputMode == InputMode.Keyboard) + return PlayerInput.GenerateRawInputList(new List() + { + Keys.LeftAlt.ToString() + }); + } + else if (inputMode == InputMode.Keyboard) + return PlayerInput.GenerateRawInputList(new List() + { + Keys.LeftControl.ToString() + }); + return PlayerInput.GenerateInputTag_ForCurrentGamemode(tagForGameplay, triggerName); + } + + public static string GenerateInputTag_ForCurrentGamemode( + bool tagForGameplay, + string triggerName) + { + InputMode key = PlayerInput.CurrentInputMode; + switch (key) + { + case InputMode.KeyboardUI: + case InputMode.Mouse: + key = InputMode.Keyboard; + break; + } + if (tagForGameplay) + { + switch (key) + { + case InputMode.XBoxGamepad: + case InputMode.XBoxGamepadUI: + return PlayerInput.GenerateGlyphList(PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus[triggerName]); + default: + return PlayerInput.GenerateRawInputList(PlayerInput.CurrentProfile.InputModes[key].KeyStatus[triggerName]); + } + } + else + { + switch (key) + { + case InputMode.XBoxGamepad: + case InputMode.XBoxGamepadUI: + return PlayerInput.GenerateGlyphList(PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus[triggerName]); + default: + return PlayerInput.GenerateRawInputList(PlayerInput.CurrentProfile.InputModes[key].KeyStatus[triggerName]); + } + } + } + + public static string GenerateInputTags_GamepadUI(string triggerName) => PlayerInput.GenerateGlyphList(PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepadUI].KeyStatus[triggerName]); + + public static string GenerateInputTags_Gamepad(string triggerName) => PlayerInput.GenerateGlyphList(PlayerInput.CurrentProfile.InputModes[InputMode.XBoxGamepad].KeyStatus[triggerName]); + + private static string GenerateGlyphList(List list) + { + if (list.Count == 0) + return ""; + string str = GlyphTagHandler.GenerateTag(list[0]); + for (int index = 1; index < list.Count; ++index) + str = str + "/" + GlyphTagHandler.GenerateTag(list[index]); + return str; + } + + private static string GenerateRawInputList(List list) + { + if (list.Count == 0) + return ""; + string str = list[0]; + for (int index = 1; index < list.Count; ++index) + str = str + "/" + list[index]; + return str; + } + + public static void NavigatorCachePosition() + { + PlayerInput.PreUIX = PlayerInput.MouseX; + PlayerInput.PreUIY = PlayerInput.MouseY; + } + + public static void NavigatorUnCachePosition() + { + PlayerInput.MouseX = PlayerInput.PreUIX; + PlayerInput.MouseY = PlayerInput.PreUIY; + } + + public static void LockOnCachePosition() + { + PlayerInput.PreLockOnX = PlayerInput.MouseX; + PlayerInput.PreLockOnY = PlayerInput.MouseY; + } + + public static void LockOnUnCachePosition() + { + PlayerInput.MouseX = PlayerInput.PreLockOnX; + PlayerInput.MouseY = PlayerInput.PreLockOnY; + } + + public static void PrettyPrintProfiles(ref string text) + { + string str1 = text; + string[] separator = new string[1]{ "\r\n" }; + foreach (string str2 in str1.Split(separator, StringSplitOptions.None)) + { + if (str2.Contains(": {")) + { + string str3 = str2.Substring(0, str2.IndexOf('"')); + string oldValue = str2 + "\r\n "; + string newValue = oldValue.Replace(": {\r\n ", ": \r\n" + str3 + "{\r\n "); + text = text.Replace(oldValue, newValue); + } + } + text = text.Replace("[\r\n ", "["); + text = text.Replace("[\r\n ", "["); + text = text.Replace("\"\r\n ", "\""); + text = text.Replace("\",\r\n ", "\", "); + text = text.Replace("\",\r\n ", "\", "); + text = text.Replace("\r\n ]", "]"); + } + + public static void PrettyPrintProfilesOld(ref string text) + { + text = text.Replace(": {\r\n ", ": \r\n {\r\n "); + text = text.Replace("[\r\n ", "["); + text = text.Replace("\"\r\n ", "\""); + text = text.Replace("\",\r\n ", "\", "); + text = text.Replace("\r\n ]", "]"); + } + + public static void Reset(KeyConfiguration c, PresetProfiles style, InputMode mode) + { + switch (style) + { + case PresetProfiles.Redigit: + switch (mode) + { + case InputMode.Keyboard: + c.KeyStatus["MouseLeft"].Add("Mouse1"); + c.KeyStatus["MouseRight"].Add("Mouse2"); + c.KeyStatus["Up"].Add("W"); + c.KeyStatus["Down"].Add("S"); + c.KeyStatus["Left"].Add("A"); + c.KeyStatus["Right"].Add("D"); + c.KeyStatus["Jump"].Add("Space"); + c.KeyStatus["Inventory"].Add("Escape"); + c.KeyStatus["Grapple"].Add("E"); + c.KeyStatus["SmartSelect"].Add("LeftShift"); + c.KeyStatus["SmartCursor"].Add("LeftControl"); + c.KeyStatus["QuickMount"].Add("R"); + c.KeyStatus["QuickHeal"].Add("H"); + c.KeyStatus["QuickMana"].Add("J"); + c.KeyStatus["QuickBuff"].Add("B"); + c.KeyStatus["MapStyle"].Add("Tab"); + c.KeyStatus["MapFull"].Add("M"); + c.KeyStatus["MapZoomIn"].Add("Add"); + c.KeyStatus["MapZoomOut"].Add("Subtract"); + c.KeyStatus["MapAlphaUp"].Add("PageUp"); + c.KeyStatus["MapAlphaDown"].Add("PageDown"); + c.KeyStatus["Hotbar1"].Add("D1"); + c.KeyStatus["Hotbar2"].Add("D2"); + c.KeyStatus["Hotbar3"].Add("D3"); + c.KeyStatus["Hotbar4"].Add("D4"); + c.KeyStatus["Hotbar5"].Add("D5"); + c.KeyStatus["Hotbar6"].Add("D6"); + c.KeyStatus["Hotbar7"].Add("D7"); + c.KeyStatus["Hotbar8"].Add("D8"); + c.KeyStatus["Hotbar9"].Add("D9"); + c.KeyStatus["Hotbar10"].Add("D0"); + c.KeyStatus["ViewZoomOut"].Add("OemMinus"); + c.KeyStatus["ViewZoomIn"].Add("OemPlus"); + c.KeyStatus["ToggleCreativeMenu"].Add("C"); + return; + case InputMode.KeyboardUI: + c.KeyStatus["MouseLeft"].Add("Mouse1"); + c.KeyStatus["MouseLeft"].Add("Space"); + c.KeyStatus["MouseRight"].Add("Mouse2"); + c.KeyStatus["Up"].Add("W"); + c.KeyStatus["Up"].Add("Up"); + c.KeyStatus["Down"].Add("S"); + c.KeyStatus["Down"].Add("Down"); + c.KeyStatus["Left"].Add("A"); + c.KeyStatus["Left"].Add("Left"); + c.KeyStatus["Right"].Add("D"); + c.KeyStatus["Right"].Add("Right"); + c.KeyStatus["Inventory"].Add(Keys.Escape.ToString()); + c.KeyStatus["MenuUp"].Add(string.Concat((object) Buttons.DPadUp)); + c.KeyStatus["MenuDown"].Add(string.Concat((object) Buttons.DPadDown)); + c.KeyStatus["MenuLeft"].Add(string.Concat((object) Buttons.DPadLeft)); + c.KeyStatus["MenuRight"].Add(string.Concat((object) Buttons.DPadRight)); + return; + case InputMode.Mouse: + return; + case InputMode.XBoxGamepad: + c.KeyStatus["MouseLeft"].Add(string.Concat((object) Buttons.RightTrigger)); + c.KeyStatus["MouseRight"].Add(string.Concat((object) Buttons.B)); + c.KeyStatus["Up"].Add(string.Concat((object) Buttons.LeftThumbstickUp)); + c.KeyStatus["Down"].Add(string.Concat((object) Buttons.LeftThumbstickDown)); + c.KeyStatus["Left"].Add(string.Concat((object) Buttons.LeftThumbstickLeft)); + c.KeyStatus["Right"].Add(string.Concat((object) Buttons.LeftThumbstickRight)); + c.KeyStatus["Jump"].Add(string.Concat((object) Buttons.LeftTrigger)); + c.KeyStatus["Inventory"].Add(string.Concat((object) Buttons.Y)); + c.KeyStatus["Grapple"].Add(string.Concat((object) Buttons.B)); + c.KeyStatus["LockOn"].Add(string.Concat((object) Buttons.X)); + c.KeyStatus["QuickMount"].Add(string.Concat((object) Buttons.A)); + c.KeyStatus["SmartSelect"].Add(string.Concat((object) Buttons.RightStick)); + c.KeyStatus["SmartCursor"].Add(string.Concat((object) Buttons.LeftStick)); + c.KeyStatus["HotbarMinus"].Add(string.Concat((object) Buttons.LeftShoulder)); + c.KeyStatus["HotbarPlus"].Add(string.Concat((object) Buttons.RightShoulder)); + c.KeyStatus["MapFull"].Add(string.Concat((object) Buttons.Start)); + c.KeyStatus["DpadSnap1"].Add(string.Concat((object) Buttons.DPadUp)); + c.KeyStatus["DpadSnap3"].Add(string.Concat((object) Buttons.DPadDown)); + c.KeyStatus["DpadSnap4"].Add(string.Concat((object) Buttons.DPadLeft)); + c.KeyStatus["DpadSnap2"].Add(string.Concat((object) Buttons.DPadRight)); + c.KeyStatus["MapStyle"].Add(string.Concat((object) Buttons.Back)); + return; + case InputMode.XBoxGamepadUI: + c.KeyStatus["MouseLeft"].Add(string.Concat((object) Buttons.A)); + c.KeyStatus["MouseRight"].Add(string.Concat((object) Buttons.LeftShoulder)); + c.KeyStatus["SmartCursor"].Add(string.Concat((object) Buttons.RightShoulder)); + c.KeyStatus["Up"].Add(string.Concat((object) Buttons.LeftThumbstickUp)); + c.KeyStatus["Down"].Add(string.Concat((object) Buttons.LeftThumbstickDown)); + c.KeyStatus["Left"].Add(string.Concat((object) Buttons.LeftThumbstickLeft)); + c.KeyStatus["Right"].Add(string.Concat((object) Buttons.LeftThumbstickRight)); + c.KeyStatus["Inventory"].Add(string.Concat((object) Buttons.B)); + c.KeyStatus["Inventory"].Add(string.Concat((object) Buttons.Y)); + c.KeyStatus["HotbarMinus"].Add(string.Concat((object) Buttons.LeftTrigger)); + c.KeyStatus["HotbarPlus"].Add(string.Concat((object) Buttons.RightTrigger)); + c.KeyStatus["Grapple"].Add(string.Concat((object) Buttons.X)); + c.KeyStatus["MapFull"].Add(string.Concat((object) Buttons.Start)); + c.KeyStatus["SmartSelect"].Add(string.Concat((object) Buttons.Back)); + c.KeyStatus["QuickMount"].Add(string.Concat((object) Buttons.RightStick)); + c.KeyStatus["DpadSnap1"].Add(string.Concat((object) Buttons.DPadUp)); + c.KeyStatus["DpadSnap3"].Add(string.Concat((object) Buttons.DPadDown)); + c.KeyStatus["DpadSnap4"].Add(string.Concat((object) Buttons.DPadLeft)); + c.KeyStatus["DpadSnap2"].Add(string.Concat((object) Buttons.DPadRight)); + c.KeyStatus["MenuUp"].Add(string.Concat((object) Buttons.DPadUp)); + c.KeyStatus["MenuDown"].Add(string.Concat((object) Buttons.DPadDown)); + c.KeyStatus["MenuLeft"].Add(string.Concat((object) Buttons.DPadLeft)); + c.KeyStatus["MenuRight"].Add(string.Concat((object) Buttons.DPadRight)); + return; + default: + return; + } + case PresetProfiles.Yoraiz0r: + switch (mode) + { + case InputMode.Keyboard: + c.KeyStatus["MouseLeft"].Add("Mouse1"); + c.KeyStatus["MouseRight"].Add("Mouse2"); + c.KeyStatus["Up"].Add("W"); + c.KeyStatus["Down"].Add("S"); + c.KeyStatus["Left"].Add("A"); + c.KeyStatus["Right"].Add("D"); + c.KeyStatus["Jump"].Add("Space"); + c.KeyStatus["Inventory"].Add("Escape"); + c.KeyStatus["Grapple"].Add("E"); + c.KeyStatus["SmartSelect"].Add("LeftShift"); + c.KeyStatus["SmartCursor"].Add("LeftControl"); + c.KeyStatus["QuickMount"].Add("R"); + c.KeyStatus["QuickHeal"].Add("H"); + c.KeyStatus["QuickMana"].Add("J"); + c.KeyStatus["QuickBuff"].Add("B"); + c.KeyStatus["MapStyle"].Add("Tab"); + c.KeyStatus["MapFull"].Add("M"); + c.KeyStatus["MapZoomIn"].Add("Add"); + c.KeyStatus["MapZoomOut"].Add("Subtract"); + c.KeyStatus["MapAlphaUp"].Add("PageUp"); + c.KeyStatus["MapAlphaDown"].Add("PageDown"); + c.KeyStatus["Hotbar1"].Add("D1"); + c.KeyStatus["Hotbar2"].Add("D2"); + c.KeyStatus["Hotbar3"].Add("D3"); + c.KeyStatus["Hotbar4"].Add("D4"); + c.KeyStatus["Hotbar5"].Add("D5"); + c.KeyStatus["Hotbar6"].Add("D6"); + c.KeyStatus["Hotbar7"].Add("D7"); + c.KeyStatus["Hotbar8"].Add("D8"); + c.KeyStatus["Hotbar9"].Add("D9"); + c.KeyStatus["Hotbar10"].Add("D0"); + c.KeyStatus["ViewZoomOut"].Add("OemMinus"); + c.KeyStatus["ViewZoomIn"].Add("OemPlus"); + c.KeyStatus["ToggleCreativeMenu"].Add("C"); + return; + case InputMode.KeyboardUI: + c.KeyStatus["MouseLeft"].Add("Mouse1"); + c.KeyStatus["MouseLeft"].Add("Space"); + c.KeyStatus["MouseRight"].Add("Mouse2"); + c.KeyStatus["Up"].Add("W"); + c.KeyStatus["Up"].Add("Up"); + c.KeyStatus["Down"].Add("S"); + c.KeyStatus["Down"].Add("Down"); + c.KeyStatus["Left"].Add("A"); + c.KeyStatus["Left"].Add("Left"); + c.KeyStatus["Right"].Add("D"); + c.KeyStatus["Right"].Add("Right"); + c.KeyStatus["Inventory"].Add(Keys.Escape.ToString()); + c.KeyStatus["MenuUp"].Add(string.Concat((object) Buttons.DPadUp)); + c.KeyStatus["MenuDown"].Add(string.Concat((object) Buttons.DPadDown)); + c.KeyStatus["MenuLeft"].Add(string.Concat((object) Buttons.DPadLeft)); + c.KeyStatus["MenuRight"].Add(string.Concat((object) Buttons.DPadRight)); + return; + case InputMode.Mouse: + return; + case InputMode.XBoxGamepad: + c.KeyStatus["MouseLeft"].Add(string.Concat((object) Buttons.RightTrigger)); + c.KeyStatus["MouseRight"].Add(string.Concat((object) Buttons.B)); + c.KeyStatus["Up"].Add(string.Concat((object) Buttons.LeftThumbstickUp)); + c.KeyStatus["Down"].Add(string.Concat((object) Buttons.LeftThumbstickDown)); + c.KeyStatus["Left"].Add(string.Concat((object) Buttons.LeftThumbstickLeft)); + c.KeyStatus["Right"].Add(string.Concat((object) Buttons.LeftThumbstickRight)); + c.KeyStatus["Jump"].Add(string.Concat((object) Buttons.LeftTrigger)); + c.KeyStatus["Inventory"].Add(string.Concat((object) Buttons.Y)); + c.KeyStatus["Grapple"].Add(string.Concat((object) Buttons.LeftShoulder)); + c.KeyStatus["SmartSelect"].Add(string.Concat((object) Buttons.LeftStick)); + c.KeyStatus["SmartCursor"].Add(string.Concat((object) Buttons.RightStick)); + c.KeyStatus["QuickMount"].Add(string.Concat((object) Buttons.X)); + c.KeyStatus["QuickHeal"].Add(string.Concat((object) Buttons.A)); + c.KeyStatus["RadialHotbar"].Add(string.Concat((object) Buttons.RightShoulder)); + c.KeyStatus["MapFull"].Add(string.Concat((object) Buttons.Start)); + c.KeyStatus["DpadSnap1"].Add(string.Concat((object) Buttons.DPadUp)); + c.KeyStatus["DpadSnap3"].Add(string.Concat((object) Buttons.DPadDown)); + c.KeyStatus["DpadSnap4"].Add(string.Concat((object) Buttons.DPadLeft)); + c.KeyStatus["DpadSnap2"].Add(string.Concat((object) Buttons.DPadRight)); + c.KeyStatus["MapStyle"].Add(string.Concat((object) Buttons.Back)); + return; + case InputMode.XBoxGamepadUI: + c.KeyStatus["MouseLeft"].Add(string.Concat((object) Buttons.A)); + c.KeyStatus["MouseRight"].Add(string.Concat((object) Buttons.LeftShoulder)); + c.KeyStatus["SmartCursor"].Add(string.Concat((object) Buttons.RightShoulder)); + c.KeyStatus["Up"].Add(string.Concat((object) Buttons.LeftThumbstickUp)); + c.KeyStatus["Down"].Add(string.Concat((object) Buttons.LeftThumbstickDown)); + c.KeyStatus["Left"].Add(string.Concat((object) Buttons.LeftThumbstickLeft)); + c.KeyStatus["Right"].Add(string.Concat((object) Buttons.LeftThumbstickRight)); + c.KeyStatus["LockOn"].Add(string.Concat((object) Buttons.B)); + c.KeyStatus["Inventory"].Add(string.Concat((object) Buttons.Y)); + c.KeyStatus["HotbarMinus"].Add(string.Concat((object) Buttons.LeftTrigger)); + c.KeyStatus["HotbarPlus"].Add(string.Concat((object) Buttons.RightTrigger)); + c.KeyStatus["Grapple"].Add(string.Concat((object) Buttons.X)); + c.KeyStatus["MapFull"].Add(string.Concat((object) Buttons.Start)); + c.KeyStatus["SmartSelect"].Add(string.Concat((object) Buttons.Back)); + c.KeyStatus["QuickMount"].Add(string.Concat((object) Buttons.RightStick)); + c.KeyStatus["DpadSnap1"].Add(string.Concat((object) Buttons.DPadUp)); + c.KeyStatus["DpadSnap3"].Add(string.Concat((object) Buttons.DPadDown)); + c.KeyStatus["DpadSnap4"].Add(string.Concat((object) Buttons.DPadLeft)); + c.KeyStatus["DpadSnap2"].Add(string.Concat((object) Buttons.DPadRight)); + c.KeyStatus["MenuUp"].Add(string.Concat((object) Buttons.DPadUp)); + c.KeyStatus["MenuDown"].Add(string.Concat((object) Buttons.DPadDown)); + c.KeyStatus["MenuLeft"].Add(string.Concat((object) Buttons.DPadLeft)); + c.KeyStatus["MenuRight"].Add(string.Concat((object) Buttons.DPadRight)); + return; + default: + return; + } + case PresetProfiles.ConsolePS: + switch (mode) + { + case InputMode.Keyboard: + c.KeyStatus["MouseLeft"].Add("Mouse1"); + c.KeyStatus["MouseRight"].Add("Mouse2"); + c.KeyStatus["Up"].Add("W"); + c.KeyStatus["Down"].Add("S"); + c.KeyStatus["Left"].Add("A"); + c.KeyStatus["Right"].Add("D"); + c.KeyStatus["Jump"].Add("Space"); + c.KeyStatus["Inventory"].Add("Escape"); + c.KeyStatus["Grapple"].Add("E"); + c.KeyStatus["SmartSelect"].Add("LeftShift"); + c.KeyStatus["SmartCursor"].Add("LeftControl"); + c.KeyStatus["QuickMount"].Add("R"); + c.KeyStatus["QuickHeal"].Add("H"); + c.KeyStatus["QuickMana"].Add("J"); + c.KeyStatus["QuickBuff"].Add("B"); + c.KeyStatus["MapStyle"].Add("Tab"); + c.KeyStatus["MapFull"].Add("M"); + c.KeyStatus["MapZoomIn"].Add("Add"); + c.KeyStatus["MapZoomOut"].Add("Subtract"); + c.KeyStatus["MapAlphaUp"].Add("PageUp"); + c.KeyStatus["MapAlphaDown"].Add("PageDown"); + c.KeyStatus["Hotbar1"].Add("D1"); + c.KeyStatus["Hotbar2"].Add("D2"); + c.KeyStatus["Hotbar3"].Add("D3"); + c.KeyStatus["Hotbar4"].Add("D4"); + c.KeyStatus["Hotbar5"].Add("D5"); + c.KeyStatus["Hotbar6"].Add("D6"); + c.KeyStatus["Hotbar7"].Add("D7"); + c.KeyStatus["Hotbar8"].Add("D8"); + c.KeyStatus["Hotbar9"].Add("D9"); + c.KeyStatus["Hotbar10"].Add("D0"); + c.KeyStatus["ViewZoomOut"].Add("OemMinus"); + c.KeyStatus["ViewZoomIn"].Add("OemPlus"); + c.KeyStatus["ToggleCreativeMenu"].Add("C"); + return; + case InputMode.KeyboardUI: + c.KeyStatus["MouseLeft"].Add("Mouse1"); + c.KeyStatus["MouseLeft"].Add("Space"); + c.KeyStatus["MouseRight"].Add("Mouse2"); + c.KeyStatus["Up"].Add("W"); + c.KeyStatus["Up"].Add("Up"); + c.KeyStatus["Down"].Add("S"); + c.KeyStatus["Down"].Add("Down"); + c.KeyStatus["Left"].Add("A"); + c.KeyStatus["Left"].Add("Left"); + c.KeyStatus["Right"].Add("D"); + c.KeyStatus["Right"].Add("Right"); + c.KeyStatus["MenuUp"].Add(string.Concat((object) Buttons.DPadUp)); + c.KeyStatus["MenuDown"].Add(string.Concat((object) Buttons.DPadDown)); + c.KeyStatus["MenuLeft"].Add(string.Concat((object) Buttons.DPadLeft)); + c.KeyStatus["MenuRight"].Add(string.Concat((object) Buttons.DPadRight)); + c.KeyStatus["Inventory"].Add(Keys.Escape.ToString()); + return; + case InputMode.Mouse: + return; + case InputMode.XBoxGamepad: + c.KeyStatus["MouseLeft"].Add(string.Concat((object) Buttons.RightShoulder)); + c.KeyStatus["MouseRight"].Add(string.Concat((object) Buttons.B)); + c.KeyStatus["Up"].Add(string.Concat((object) Buttons.LeftThumbstickUp)); + c.KeyStatus["Down"].Add(string.Concat((object) Buttons.LeftThumbstickDown)); + c.KeyStatus["Left"].Add(string.Concat((object) Buttons.LeftThumbstickLeft)); + c.KeyStatus["Right"].Add(string.Concat((object) Buttons.LeftThumbstickRight)); + c.KeyStatus["Jump"].Add(string.Concat((object) Buttons.A)); + c.KeyStatus["LockOn"].Add(string.Concat((object) Buttons.X)); + c.KeyStatus["Inventory"].Add(string.Concat((object) Buttons.Y)); + c.KeyStatus["Grapple"].Add(string.Concat((object) Buttons.LeftShoulder)); + c.KeyStatus["SmartSelect"].Add(string.Concat((object) Buttons.LeftStick)); + c.KeyStatus["SmartCursor"].Add(string.Concat((object) Buttons.RightStick)); + c.KeyStatus["HotbarMinus"].Add(string.Concat((object) Buttons.LeftTrigger)); + c.KeyStatus["HotbarPlus"].Add(string.Concat((object) Buttons.RightTrigger)); + c.KeyStatus["MapFull"].Add(string.Concat((object) Buttons.Start)); + c.KeyStatus["DpadRadial1"].Add(string.Concat((object) Buttons.DPadUp)); + c.KeyStatus["DpadRadial3"].Add(string.Concat((object) Buttons.DPadDown)); + c.KeyStatus["DpadRadial4"].Add(string.Concat((object) Buttons.DPadLeft)); + c.KeyStatus["DpadRadial2"].Add(string.Concat((object) Buttons.DPadRight)); + c.KeyStatus["QuickMount"].Add(string.Concat((object) Buttons.Back)); + return; + case InputMode.XBoxGamepadUI: + c.KeyStatus["MouseLeft"].Add(string.Concat((object) Buttons.A)); + c.KeyStatus["MouseRight"].Add(string.Concat((object) Buttons.LeftShoulder)); + c.KeyStatus["SmartCursor"].Add(string.Concat((object) Buttons.RightShoulder)); + c.KeyStatus["Up"].Add(string.Concat((object) Buttons.LeftThumbstickUp)); + c.KeyStatus["Down"].Add(string.Concat((object) Buttons.LeftThumbstickDown)); + c.KeyStatus["Left"].Add(string.Concat((object) Buttons.LeftThumbstickLeft)); + c.KeyStatus["Right"].Add(string.Concat((object) Buttons.LeftThumbstickRight)); + c.KeyStatus["Inventory"].Add(string.Concat((object) Buttons.B)); + c.KeyStatus["Inventory"].Add(string.Concat((object) Buttons.Y)); + c.KeyStatus["HotbarMinus"].Add(string.Concat((object) Buttons.LeftTrigger)); + c.KeyStatus["HotbarPlus"].Add(string.Concat((object) Buttons.RightTrigger)); + c.KeyStatus["Grapple"].Add(string.Concat((object) Buttons.X)); + c.KeyStatus["MapFull"].Add(string.Concat((object) Buttons.Start)); + c.KeyStatus["SmartSelect"].Add(string.Concat((object) Buttons.Back)); + c.KeyStatus["QuickMount"].Add(string.Concat((object) Buttons.RightStick)); + c.KeyStatus["DpadRadial1"].Add(string.Concat((object) Buttons.DPadUp)); + c.KeyStatus["DpadRadial3"].Add(string.Concat((object) Buttons.DPadDown)); + c.KeyStatus["DpadRadial4"].Add(string.Concat((object) Buttons.DPadLeft)); + c.KeyStatus["DpadRadial2"].Add(string.Concat((object) Buttons.DPadRight)); + c.KeyStatus["MenuUp"].Add(string.Concat((object) Buttons.DPadUp)); + c.KeyStatus["MenuDown"].Add(string.Concat((object) Buttons.DPadDown)); + c.KeyStatus["MenuLeft"].Add(string.Concat((object) Buttons.DPadLeft)); + c.KeyStatus["MenuRight"].Add(string.Concat((object) Buttons.DPadRight)); + return; + default: + return; + } + case PresetProfiles.ConsoleXBox: + switch (mode) + { + case InputMode.Keyboard: + c.KeyStatus["MouseLeft"].Add("Mouse1"); + c.KeyStatus["MouseRight"].Add("Mouse2"); + c.KeyStatus["Up"].Add("W"); + c.KeyStatus["Down"].Add("S"); + c.KeyStatus["Left"].Add("A"); + c.KeyStatus["Right"].Add("D"); + c.KeyStatus["Jump"].Add("Space"); + c.KeyStatus["Inventory"].Add("Escape"); + c.KeyStatus["Grapple"].Add("E"); + c.KeyStatus["SmartSelect"].Add("LeftShift"); + c.KeyStatus["SmartCursor"].Add("LeftControl"); + c.KeyStatus["QuickMount"].Add("R"); + c.KeyStatus["QuickHeal"].Add("H"); + c.KeyStatus["QuickMana"].Add("J"); + c.KeyStatus["QuickBuff"].Add("B"); + c.KeyStatus["MapStyle"].Add("Tab"); + c.KeyStatus["MapFull"].Add("M"); + c.KeyStatus["MapZoomIn"].Add("Add"); + c.KeyStatus["MapZoomOut"].Add("Subtract"); + c.KeyStatus["MapAlphaUp"].Add("PageUp"); + c.KeyStatus["MapAlphaDown"].Add("PageDown"); + c.KeyStatus["Hotbar1"].Add("D1"); + c.KeyStatus["Hotbar2"].Add("D2"); + c.KeyStatus["Hotbar3"].Add("D3"); + c.KeyStatus["Hotbar4"].Add("D4"); + c.KeyStatus["Hotbar5"].Add("D5"); + c.KeyStatus["Hotbar6"].Add("D6"); + c.KeyStatus["Hotbar7"].Add("D7"); + c.KeyStatus["Hotbar8"].Add("D8"); + c.KeyStatus["Hotbar9"].Add("D9"); + c.KeyStatus["Hotbar10"].Add("D0"); + c.KeyStatus["ViewZoomOut"].Add("OemMinus"); + c.KeyStatus["ViewZoomIn"].Add("OemPlus"); + c.KeyStatus["ToggleCreativeMenu"].Add("C"); + return; + case InputMode.KeyboardUI: + c.KeyStatus["MouseLeft"].Add("Mouse1"); + c.KeyStatus["MouseLeft"].Add("Space"); + c.KeyStatus["MouseRight"].Add("Mouse2"); + c.KeyStatus["Up"].Add("W"); + c.KeyStatus["Up"].Add("Up"); + c.KeyStatus["Down"].Add("S"); + c.KeyStatus["Down"].Add("Down"); + c.KeyStatus["Left"].Add("A"); + c.KeyStatus["Left"].Add("Left"); + c.KeyStatus["Right"].Add("D"); + c.KeyStatus["Right"].Add("Right"); + c.KeyStatus["MenuUp"].Add(string.Concat((object) Buttons.DPadUp)); + c.KeyStatus["MenuDown"].Add(string.Concat((object) Buttons.DPadDown)); + c.KeyStatus["MenuLeft"].Add(string.Concat((object) Buttons.DPadLeft)); + c.KeyStatus["MenuRight"].Add(string.Concat((object) Buttons.DPadRight)); + c.KeyStatus["Inventory"].Add(Keys.Escape.ToString()); + return; + case InputMode.Mouse: + return; + case InputMode.XBoxGamepad: + c.KeyStatus["MouseLeft"].Add(string.Concat((object) Buttons.RightTrigger)); + c.KeyStatus["MouseRight"].Add(string.Concat((object) Buttons.B)); + c.KeyStatus["Up"].Add(string.Concat((object) Buttons.LeftThumbstickUp)); + c.KeyStatus["Down"].Add(string.Concat((object) Buttons.LeftThumbstickDown)); + c.KeyStatus["Left"].Add(string.Concat((object) Buttons.LeftThumbstickLeft)); + c.KeyStatus["Right"].Add(string.Concat((object) Buttons.LeftThumbstickRight)); + c.KeyStatus["Jump"].Add(string.Concat((object) Buttons.A)); + c.KeyStatus["LockOn"].Add(string.Concat((object) Buttons.X)); + c.KeyStatus["Inventory"].Add(string.Concat((object) Buttons.Y)); + c.KeyStatus["Grapple"].Add(string.Concat((object) Buttons.LeftTrigger)); + c.KeyStatus["SmartSelect"].Add(string.Concat((object) Buttons.LeftStick)); + c.KeyStatus["SmartCursor"].Add(string.Concat((object) Buttons.RightStick)); + c.KeyStatus["HotbarMinus"].Add(string.Concat((object) Buttons.LeftShoulder)); + c.KeyStatus["HotbarPlus"].Add(string.Concat((object) Buttons.RightShoulder)); + c.KeyStatus["MapFull"].Add(string.Concat((object) Buttons.Start)); + c.KeyStatus["DpadRadial1"].Add(string.Concat((object) Buttons.DPadUp)); + c.KeyStatus["DpadRadial3"].Add(string.Concat((object) Buttons.DPadDown)); + c.KeyStatus["DpadRadial4"].Add(string.Concat((object) Buttons.DPadLeft)); + c.KeyStatus["DpadRadial2"].Add(string.Concat((object) Buttons.DPadRight)); + c.KeyStatus["QuickMount"].Add(string.Concat((object) Buttons.Back)); + return; + case InputMode.XBoxGamepadUI: + c.KeyStatus["MouseLeft"].Add(string.Concat((object) Buttons.A)); + c.KeyStatus["MouseRight"].Add(string.Concat((object) Buttons.LeftShoulder)); + c.KeyStatus["SmartCursor"].Add(string.Concat((object) Buttons.RightShoulder)); + c.KeyStatus["Up"].Add(string.Concat((object) Buttons.LeftThumbstickUp)); + c.KeyStatus["Down"].Add(string.Concat((object) Buttons.LeftThumbstickDown)); + c.KeyStatus["Left"].Add(string.Concat((object) Buttons.LeftThumbstickLeft)); + c.KeyStatus["Right"].Add(string.Concat((object) Buttons.LeftThumbstickRight)); + c.KeyStatus["Inventory"].Add(string.Concat((object) Buttons.B)); + c.KeyStatus["Inventory"].Add(string.Concat((object) Buttons.Y)); + c.KeyStatus["HotbarMinus"].Add(string.Concat((object) Buttons.LeftTrigger)); + c.KeyStatus["HotbarPlus"].Add(string.Concat((object) Buttons.RightTrigger)); + c.KeyStatus["Grapple"].Add(string.Concat((object) Buttons.X)); + c.KeyStatus["MapFull"].Add(string.Concat((object) Buttons.Start)); + c.KeyStatus["SmartSelect"].Add(string.Concat((object) Buttons.Back)); + c.KeyStatus["QuickMount"].Add(string.Concat((object) Buttons.RightStick)); + c.KeyStatus["DpadRadial1"].Add(string.Concat((object) Buttons.DPadUp)); + c.KeyStatus["DpadRadial3"].Add(string.Concat((object) Buttons.DPadDown)); + c.KeyStatus["DpadRadial4"].Add(string.Concat((object) Buttons.DPadLeft)); + c.KeyStatus["DpadRadial2"].Add(string.Concat((object) Buttons.DPadRight)); + c.KeyStatus["MenuUp"].Add(string.Concat((object) Buttons.DPadUp)); + c.KeyStatus["MenuDown"].Add(string.Concat((object) Buttons.DPadDown)); + c.KeyStatus["MenuLeft"].Add(string.Concat((object) Buttons.DPadLeft)); + c.KeyStatus["MenuRight"].Add(string.Concat((object) Buttons.DPadRight)); + return; + default: + return; + } + } + } + + public static void SetZoom_UI() => PlayerInput.SetZoom_Scaled(1f / Main.UIScale); + + public static void SetZoom_World() + { + PlayerInput.SetZoom_Scaled(1f); + PlayerInput.SetZoom_MouseInWorld(); + } + + public static void SetZoom_Unscaled() + { + Main.lastMouseX = PlayerInput._originalLastMouseX; + Main.lastMouseY = PlayerInput._originalLastMouseY; + Main.mouseX = PlayerInput._originalMouseX; + Main.mouseY = PlayerInput._originalMouseY; + Main.screenWidth = PlayerInput._originalScreenWidth; + Main.screenHeight = PlayerInput._originalScreenHeight; + } + + public static void SetZoom_Test() + { + Vector2 vector2_1 = Main.screenPosition + new Vector2((float) Main.screenWidth, (float) Main.screenHeight) / 2f; + Vector2 vector2_2 = Main.screenPosition + new Vector2((float) PlayerInput._originalMouseX, (float) PlayerInput._originalMouseY); + Vector2 vector2_3 = Main.screenPosition + new Vector2((float) PlayerInput._originalLastMouseX, (float) PlayerInput._originalLastMouseY); + Vector2 vector2_4 = Main.screenPosition + new Vector2(0.0f, 0.0f); + Vector2 vector2_5 = Main.screenPosition + new Vector2((float) Main.screenWidth, (float) Main.screenHeight); + Vector2 vector2_6 = vector2_2 - vector2_1; + Vector2 vector2_7 = vector2_3 - vector2_1; + Vector2 vector2_8 = vector2_4 - vector2_1; + Vector2 vector2_9 = vector2_1; + Vector2 vector2_10 = vector2_5 - vector2_9; + float num1 = 1f / Main.GameViewMatrix.Zoom.X; + float num2 = 1f; + Vector2 vector2_11 = vector2_1 - Main.screenPosition + vector2_6 * num1; + Vector2 vector2_12 = vector2_1 - Main.screenPosition + vector2_7 * num1; + Vector2 vector2_13 = vector2_1 + vector2_8 * num2; + Main.mouseX = (int) vector2_11.X; + Main.mouseY = (int) vector2_11.Y; + Main.lastMouseX = (int) vector2_12.X; + Main.lastMouseY = (int) vector2_12.Y; + Main.screenPosition = vector2_13; + Main.screenWidth = (int) ((double) PlayerInput._originalScreenWidth * (double) num2); + Main.screenHeight = (int) ((double) PlayerInput._originalScreenHeight * (double) num2); + } + + public static void SetZoom_MouseInWorld() + { + Vector2 vector2_1 = Main.screenPosition + new Vector2((float) Main.screenWidth, (float) Main.screenHeight) / 2f; + Vector2 vector2_2 = Main.screenPosition + new Vector2((float) PlayerInput._originalMouseX, (float) PlayerInput._originalMouseY); + Vector2 vector2_3 = Main.screenPosition + new Vector2((float) PlayerInput._originalLastMouseX, (float) PlayerInput._originalLastMouseY); + Vector2 vector2_4 = vector2_2 - vector2_1; + Vector2 vector2_5 = vector2_1; + Vector2 vector2_6 = vector2_3 - vector2_5; + float num = 1f / Main.GameViewMatrix.Zoom.X; + Vector2 vector2_7 = vector2_1 - Main.screenPosition + vector2_4 * num; + Main.mouseX = (int) vector2_7.X; + Main.mouseY = (int) vector2_7.Y; + Vector2 vector2_8 = vector2_1 - Main.screenPosition + vector2_6 * num; + Main.lastMouseX = (int) vector2_8.X; + Main.lastMouseY = (int) vector2_8.Y; + } + + public static void SetDesiredZoomContext(ZoomContext context) => PlayerInput._currentWantedZoom = context; + + public static void SetZoom_Context() + { + switch (PlayerInput._currentWantedZoom) + { + case ZoomContext.Unscaled: + PlayerInput.SetZoom_Unscaled(); + Main.SetRecommendedZoomContext(Matrix.Identity); + break; + case ZoomContext.World: + PlayerInput.SetZoom_World(); + Main.SetRecommendedZoomContext(Main.GameViewMatrix.ZoomMatrix); + break; + case ZoomContext.Unscaled_MouseInWorld: + PlayerInput.SetZoom_Unscaled(); + PlayerInput.SetZoom_MouseInWorld(); + Main.SetRecommendedZoomContext(Main.GameViewMatrix.ZoomMatrix); + break; + case ZoomContext.UI: + PlayerInput.SetZoom_UI(); + Main.SetRecommendedZoomContext(Main.UIScaleMatrix); + break; + } + } + + private static void SetZoom_Scaled(float scale) + { + Main.lastMouseX = (int) ((double) PlayerInput._originalLastMouseX * (double) scale); + Main.lastMouseY = (int) ((double) PlayerInput._originalLastMouseY * (double) scale); + Main.mouseX = (int) ((double) PlayerInput._originalMouseX * (double) scale); + Main.mouseY = (int) ((double) PlayerInput._originalMouseY * (double) scale); + Main.screenWidth = (int) ((double) PlayerInput._originalScreenWidth * (double) scale); + Main.screenHeight = (int) ((double) PlayerInput._originalScreenHeight * (double) scale); + } + + public class MiscSettingsTEMP + { + public static bool HotbarRadialShouldBeUsed = true; + } + } +} diff --git a/GameInput/PlayerInputProfile.cs b/GameInput/PlayerInputProfile.cs new file mode 100644 index 0000000..f9bd673 --- /dev/null +++ b/GameInput/PlayerInputProfile.cs @@ -0,0 +1,320 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameInput.PlayerInputProfile +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Input; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; + +namespace Terraria.GameInput +{ + public class PlayerInputProfile + { + public Dictionary InputModes = new Dictionary() + { + { + InputMode.Keyboard, + new KeyConfiguration() + }, + { + InputMode.KeyboardUI, + new KeyConfiguration() + }, + { + InputMode.XBoxGamepad, + new KeyConfiguration() + }, + { + InputMode.XBoxGamepadUI, + new KeyConfiguration() + } + }; + public string Name = ""; + public bool AllowEditting = true; + public int HotbarRadialHoldTimeRequired = 16; + public float TriggersDeadzone = 0.3f; + public float InterfaceDeadzoneX = 0.2f; + public float LeftThumbstickDeadzoneX = 0.25f; + public float LeftThumbstickDeadzoneY = 0.4f; + public float RightThumbstickDeadzoneX; + public float RightThumbstickDeadzoneY; + public bool LeftThumbstickInvertX; + public bool LeftThumbstickInvertY; + public bool RightThumbstickInvertX; + public bool RightThumbstickInvertY; + public int InventoryMoveCD = 6; + + public string ShowName => this.Name; + + public bool HotbarAllowsRadial => this.HotbarRadialHoldTimeRequired != -1; + + public PlayerInputProfile(string name) => this.Name = name; + + public void Initialize(PresetProfiles style) + { + foreach (KeyValuePair inputMode in this.InputModes) + { + inputMode.Value.SetupKeys(); + PlayerInput.Reset(inputMode.Value, style, inputMode.Key); + } + } + + public bool Load(Dictionary dict) + { + int num = 0; + object obj; + if (dict.TryGetValue("Last Launched Version", out obj)) + num = (int) (long) obj; + if (dict.TryGetValue("Mouse And Keyboard", out obj)) + this.InputModes[InputMode.Keyboard].ReadPreferences(JsonConvert.DeserializeObject>>(((object) (JObject) obj).ToString())); + if (dict.TryGetValue("Gamepad", out obj)) + this.InputModes[InputMode.XBoxGamepad].ReadPreferences(JsonConvert.DeserializeObject>>(((object) (JObject) obj).ToString())); + if (dict.TryGetValue("Mouse And Keyboard UI", out obj)) + this.InputModes[InputMode.KeyboardUI].ReadPreferences(JsonConvert.DeserializeObject>>(((object) (JObject) obj).ToString())); + if (dict.TryGetValue("Gamepad UI", out obj)) + this.InputModes[InputMode.XBoxGamepadUI].ReadPreferences(JsonConvert.DeserializeObject>>(((object) (JObject) obj).ToString())); + if (num < 190) + { + this.InputModes[InputMode.Keyboard].KeyStatus["ViewZoomIn"] = new List(); + this.InputModes[InputMode.Keyboard].KeyStatus["ViewZoomIn"].AddRange((IEnumerable) PlayerInput.OriginalProfiles["Redigit's Pick"].InputModes[InputMode.Keyboard].KeyStatus["ViewZoomIn"]); + this.InputModes[InputMode.Keyboard].KeyStatus["ViewZoomOut"] = new List(); + this.InputModes[InputMode.Keyboard].KeyStatus["ViewZoomOut"].AddRange((IEnumerable) PlayerInput.OriginalProfiles["Redigit's Pick"].InputModes[InputMode.Keyboard].KeyStatus["ViewZoomOut"]); + } + if (num < 218) + { + this.InputModes[InputMode.Keyboard].KeyStatus["ToggleCreativeMenu"] = new List(); + this.InputModes[InputMode.Keyboard].KeyStatus["ToggleCreativeMenu"].AddRange((IEnumerable) PlayerInput.OriginalProfiles["Redigit's Pick"].InputModes[InputMode.Keyboard].KeyStatus["ToggleCreativeMenu"]); + } + if (num < 227) + { + List keyStatu = this.InputModes[InputMode.KeyboardUI].KeyStatus["MouseLeft"]; + string str = "Mouse1"; + if (!keyStatu.Contains(str)) + keyStatu.Add(str); + } + if (dict.TryGetValue("Settings", out obj)) + { + Dictionary dictionary = JsonConvert.DeserializeObject>(((object) (JObject) obj).ToString()); + if (dictionary.TryGetValue("Edittable", out obj)) + this.AllowEditting = (bool) obj; + if (dictionary.TryGetValue("Gamepad - HotbarRadialHoldTime", out obj)) + this.HotbarRadialHoldTimeRequired = (int) (long) obj; + if (dictionary.TryGetValue("Gamepad - LeftThumbstickDeadzoneX", out obj)) + this.LeftThumbstickDeadzoneX = (float) (double) obj; + if (dictionary.TryGetValue("Gamepad - LeftThumbstickDeadzoneY", out obj)) + this.LeftThumbstickDeadzoneY = (float) (double) obj; + if (dictionary.TryGetValue("Gamepad - RightThumbstickDeadzoneX", out obj)) + this.RightThumbstickDeadzoneX = (float) (double) obj; + if (dictionary.TryGetValue("Gamepad - RightThumbstickDeadzoneY", out obj)) + this.RightThumbstickDeadzoneY = (float) (double) obj; + if (dictionary.TryGetValue("Gamepad - LeftThumbstickInvertX", out obj)) + this.LeftThumbstickInvertX = (bool) obj; + if (dictionary.TryGetValue("Gamepad - LeftThumbstickInvertY", out obj)) + this.LeftThumbstickInvertY = (bool) obj; + if (dictionary.TryGetValue("Gamepad - RightThumbstickInvertX", out obj)) + this.RightThumbstickInvertX = (bool) obj; + if (dictionary.TryGetValue("Gamepad - RightThumbstickInvertY", out obj)) + this.RightThumbstickInvertY = (bool) obj; + if (dictionary.TryGetValue("Gamepad - TriggersDeadzone", out obj)) + this.TriggersDeadzone = (float) (double) obj; + if (dictionary.TryGetValue("Gamepad - InterfaceDeadzoneX", out obj)) + this.InterfaceDeadzoneX = (float) (double) obj; + if (dictionary.TryGetValue("Gamepad - InventoryMoveCD", out obj)) + this.InventoryMoveCD = (int) (long) obj; + } + return true; + } + + public Dictionary Save() + { + Dictionary dictionary1 = new Dictionary(); + Dictionary dictionary2 = new Dictionary(); + dictionary1.Add("Last Launched Version", (object) 230); + dictionary2.Add("Edittable", (object) this.AllowEditting); + dictionary2.Add("Gamepad - HotbarRadialHoldTime", (object) this.HotbarRadialHoldTimeRequired); + dictionary2.Add("Gamepad - LeftThumbstickDeadzoneX", (object) this.LeftThumbstickDeadzoneX); + dictionary2.Add("Gamepad - LeftThumbstickDeadzoneY", (object) this.LeftThumbstickDeadzoneY); + dictionary2.Add("Gamepad - RightThumbstickDeadzoneX", (object) this.RightThumbstickDeadzoneX); + dictionary2.Add("Gamepad - RightThumbstickDeadzoneY", (object) this.RightThumbstickDeadzoneY); + dictionary2.Add("Gamepad - LeftThumbstickInvertX", (object) this.LeftThumbstickInvertX); + dictionary2.Add("Gamepad - LeftThumbstickInvertY", (object) this.LeftThumbstickInvertY); + dictionary2.Add("Gamepad - RightThumbstickInvertX", (object) this.RightThumbstickInvertX); + dictionary2.Add("Gamepad - RightThumbstickInvertY", (object) this.RightThumbstickInvertY); + dictionary2.Add("Gamepad - TriggersDeadzone", (object) this.TriggersDeadzone); + dictionary2.Add("Gamepad - InterfaceDeadzoneX", (object) this.InterfaceDeadzoneX); + dictionary2.Add("Gamepad - InventoryMoveCD", (object) this.InventoryMoveCD); + dictionary1.Add("Settings", (object) dictionary2); + dictionary1.Add("Mouse And Keyboard", (object) this.InputModes[InputMode.Keyboard].WritePreferences()); + dictionary1.Add("Gamepad", (object) this.InputModes[InputMode.XBoxGamepad].WritePreferences()); + dictionary1.Add("Mouse And Keyboard UI", (object) this.InputModes[InputMode.KeyboardUI].WritePreferences()); + dictionary1.Add("Gamepad UI", (object) this.InputModes[InputMode.XBoxGamepadUI].WritePreferences()); + return dictionary1; + } + + public void ConditionalAddProfile( + Dictionary dicttouse, + string k, + InputMode nm, + Dictionary> dict) + { + if (PlayerInput.OriginalProfiles.ContainsKey(this.Name)) + { + foreach (KeyValuePair> writePreference in PlayerInput.OriginalProfiles[this.Name].InputModes[nm].WritePreferences()) + { + bool flag = true; + List stringList; + if (dict.TryGetValue(writePreference.Key, out stringList)) + { + if (stringList.Count != writePreference.Value.Count) + flag = false; + if (!flag) + { + for (int index = 0; index < stringList.Count; ++index) + { + if (stringList[index] != writePreference.Value[index]) + { + flag = false; + break; + } + } + } + } + else + flag = false; + if (flag) + dict.Remove(writePreference.Key); + } + } + if (dict.Count <= 0) + return; + dicttouse.Add(k, (object) dict); + } + + public void ConditionalAdd( + Dictionary dicttouse, + string a, + object b, + Func check) + { + if (PlayerInput.OriginalProfiles.ContainsKey(this.Name) && check(PlayerInput.OriginalProfiles[this.Name])) + return; + dicttouse.Add(a, b); + } + + public void CopyGameplaySettingsFrom(PlayerInputProfile profile, InputMode mode) + { + string[] keysToCopy = new string[19] + { + "MouseLeft", + "MouseRight", + "Up", + "Down", + "Left", + "Right", + "Jump", + "Grapple", + "SmartSelect", + "SmartCursor", + "QuickMount", + "QuickHeal", + "QuickMana", + "QuickBuff", + "Throw", + "Inventory", + "ViewZoomIn", + "ViewZoomOut", + "ToggleCreativeMenu" + }; + this.CopyKeysFrom(profile, mode, keysToCopy); + } + + public void CopyHotbarSettingsFrom(PlayerInputProfile profile, InputMode mode) + { + string[] keysToCopy = new string[12] + { + "HotbarMinus", + "HotbarPlus", + "Hotbar1", + "Hotbar2", + "Hotbar3", + "Hotbar4", + "Hotbar5", + "Hotbar6", + "Hotbar7", + "Hotbar8", + "Hotbar9", + "Hotbar10" + }; + this.CopyKeysFrom(profile, mode, keysToCopy); + } + + public void CopyMapSettingsFrom(PlayerInputProfile profile, InputMode mode) + { + string[] keysToCopy = new string[6] + { + "MapZoomIn", + "MapZoomOut", + "MapAlphaUp", + "MapAlphaDown", + "MapFull", + "MapStyle" + }; + this.CopyKeysFrom(profile, mode, keysToCopy); + } + + public void CopyGamepadSettingsFrom(PlayerInputProfile profile, InputMode mode) + { + string[] keysToCopy = new string[10] + { + "RadialHotbar", + "RadialQuickbar", + "DpadSnap1", + "DpadSnap2", + "DpadSnap3", + "DpadSnap4", + "DpadRadial1", + "DpadRadial2", + "DpadRadial3", + "DpadRadial4" + }; + this.CopyKeysFrom(profile, InputMode.XBoxGamepad, keysToCopy); + this.CopyKeysFrom(profile, InputMode.XBoxGamepadUI, keysToCopy); + } + + public void CopyGamepadAdvancedSettingsFrom(PlayerInputProfile profile, InputMode mode) + { + this.TriggersDeadzone = profile.TriggersDeadzone; + this.InterfaceDeadzoneX = profile.InterfaceDeadzoneX; + this.LeftThumbstickDeadzoneX = profile.LeftThumbstickDeadzoneX; + this.LeftThumbstickDeadzoneY = profile.LeftThumbstickDeadzoneY; + this.RightThumbstickDeadzoneX = profile.RightThumbstickDeadzoneX; + this.RightThumbstickDeadzoneY = profile.RightThumbstickDeadzoneY; + this.LeftThumbstickInvertX = profile.LeftThumbstickInvertX; + this.LeftThumbstickInvertY = profile.LeftThumbstickInvertY; + this.RightThumbstickInvertX = profile.RightThumbstickInvertX; + this.RightThumbstickInvertY = profile.RightThumbstickInvertY; + this.InventoryMoveCD = profile.InventoryMoveCD; + } + + private void CopyKeysFrom(PlayerInputProfile profile, InputMode mode, string[] keysToCopy) + { + for (int index = 0; index < keysToCopy.Length; ++index) + { + List stringList; + if (profile.InputModes[mode].KeyStatus.TryGetValue(keysToCopy[index], out stringList)) + { + this.InputModes[mode].KeyStatus[keysToCopy[index]].Clear(); + this.InputModes[mode].KeyStatus[keysToCopy[index]].AddRange((IEnumerable) stringList); + } + } + } + + public bool UsingDpadHotbar() => this.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadRadial1"].Contains(Buttons.DPadUp.ToString()) && this.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadRadial2"].Contains(Buttons.DPadRight.ToString()) && this.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadRadial3"].Contains(Buttons.DPadDown.ToString()) && this.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadRadial4"].Contains(Buttons.DPadLeft.ToString()) && this.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadRadial1"].Contains(Buttons.DPadUp.ToString()) && this.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadRadial2"].Contains(Buttons.DPadRight.ToString()) && this.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadRadial3"].Contains(Buttons.DPadDown.ToString()) && this.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadRadial4"].Contains(Buttons.DPadLeft.ToString()); + + public bool UsingDpadMovekeys() => this.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadSnap1"].Contains(Buttons.DPadUp.ToString()) && this.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadSnap2"].Contains(Buttons.DPadRight.ToString()) && this.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadSnap3"].Contains(Buttons.DPadDown.ToString()) && this.InputModes[InputMode.XBoxGamepad].KeyStatus["DpadSnap4"].Contains(Buttons.DPadLeft.ToString()) && this.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadSnap1"].Contains(Buttons.DPadUp.ToString()) && this.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadSnap2"].Contains(Buttons.DPadRight.ToString()) && this.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadSnap3"].Contains(Buttons.DPadDown.ToString()) && this.InputModes[InputMode.XBoxGamepadUI].KeyStatus["DpadSnap4"].Contains(Buttons.DPadLeft.ToString()); + } +} diff --git a/GameInput/PresetProfiles.cs b/GameInput/PresetProfiles.cs new file mode 100644 index 0000000..61bb24e --- /dev/null +++ b/GameInput/PresetProfiles.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameInput.PresetProfiles +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameInput +{ + public enum PresetProfiles + { + None, + Redigit, + Yoraiz0r, + ConsolePS, + ConsoleXBox, + } +} diff --git a/GameInput/SmartSelectGamepadPointer.cs b/GameInput/SmartSelectGamepadPointer.cs new file mode 100644 index 0000000..b878430 --- /dev/null +++ b/GameInput/SmartSelectGamepadPointer.cs @@ -0,0 +1,51 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameInput.SmartSelectGamepadPointer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; + +namespace Terraria.GameInput +{ + public class SmartSelectGamepadPointer + { + private Vector2 _size; + private Vector2 _center; + private Vector2 _distUniform = new Vector2(80f, 64f); + + public bool ShouldBeUsed() => PlayerInput.UsingGamepad && Main.LocalPlayer.controlTorch && Main.SmartCursorEnabled; + + public void SmartSelectLookup_GetTargetTile(Player player, out int tX, out int tY) + { + tX = (int) (((double) Main.mouseX + (double) Main.screenPosition.X) / 16.0); + tY = (int) (((double) Main.mouseY + (double) Main.screenPosition.Y) / 16.0); + if ((double) player.gravDir == -1.0) + tY = (int) (((double) Main.screenPosition.Y + (double) Main.screenHeight - (double) Main.mouseY) / 16.0); + if (!this.ShouldBeUsed()) + return; + Point point = this.GetPointerPosition().ToPoint(); + tX = (int) (((double) point.X + (double) Main.screenPosition.X) / 16.0); + tY = (int) (((double) point.Y + (double) Main.screenPosition.Y) / 16.0); + if ((double) player.gravDir != -1.0) + return; + tY = (int) (((double) Main.screenPosition.Y + (double) Main.screenHeight - (double) point.Y) / 16.0); + } + + public void UpdateSize(Vector2 size) => this._size = size; + + public void UpdateCenter(Vector2 center) => this._center = center; + + public Vector2 GetPointerPosition() + { + Vector2 vector2 = (new Vector2((float) Main.mouseX, (float) Main.mouseY) - this._center) / this._size; + float num = Math.Abs(vector2.X); + if ((double) num < (double) Math.Abs(vector2.Y)) + num = Math.Abs(vector2.Y); + if ((double) num > 1.0) + vector2 /= num; + return vector2 * Main.GameViewMatrix.Zoom.X * this._distUniform + this._center; + } + } +} diff --git a/GameInput/TriggerNames.cs b/GameInput/TriggerNames.cs new file mode 100644 index 0000000..d6ad41c --- /dev/null +++ b/GameInput/TriggerNames.cs @@ -0,0 +1,64 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameInput.TriggerNames +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.GameInput +{ + public class TriggerNames + { + public const string MouseLeft = "MouseLeft"; + public const string MouseRight = "MouseRight"; + public const string Up = "Up"; + public const string Down = "Down"; + public const string Left = "Left"; + public const string Right = "Right"; + public const string Jump = "Jump"; + public const string Throw = "Throw"; + public const string Inventory = "Inventory"; + public const string Grapple = "Grapple"; + public const string SmartSelect = "SmartSelect"; + public const string SmartCursor = "SmartCursor"; + public const string QuickMount = "QuickMount"; + public const string QuickHeal = "QuickHeal"; + public const string QuickMana = "QuickMana"; + public const string QuickBuff = "QuickBuff"; + public const string MapZoomIn = "MapZoomIn"; + public const string MapZoomOut = "MapZoomOut"; + public const string MapAlphaUp = "MapAlphaUp"; + public const string MapAlphaDown = "MapAlphaDown"; + public const string MapFull = "MapFull"; + public const string MapStyle = "MapStyle"; + public const string Hotbar1 = "Hotbar1"; + public const string Hotbar2 = "Hotbar2"; + public const string Hotbar3 = "Hotbar3"; + public const string Hotbar4 = "Hotbar4"; + public const string Hotbar5 = "Hotbar5"; + public const string Hotbar6 = "Hotbar6"; + public const string Hotbar7 = "Hotbar7"; + public const string Hotbar8 = "Hotbar8"; + public const string Hotbar9 = "Hotbar9"; + public const string Hotbar10 = "Hotbar10"; + public const string HotbarMinus = "HotbarMinus"; + public const string HotbarPlus = "HotbarPlus"; + public const string DpadRadial1 = "DpadRadial1"; + public const string DpadRadial2 = "DpadRadial2"; + public const string DpadRadial3 = "DpadRadial3"; + public const string DpadRadial4 = "DpadRadial4"; + public const string DpadMouseSnap1 = "DpadSnap1"; + public const string DpadMouseSnap2 = "DpadSnap2"; + public const string DpadMouseSnap3 = "DpadSnap3"; + public const string DpadMouseSnap4 = "DpadSnap4"; + public const string MenuUp = "MenuUp"; + public const string MenuDown = "MenuDown"; + public const string MenuLeft = "MenuLeft"; + public const string MenuRight = "MenuRight"; + public const string RadialHotbar = "RadialHotbar"; + public const string RadialQuickbar = "RadialQuickbar"; + public const string LockOn = "LockOn"; + public const string ViewZoomIn = "ViewZoomIn"; + public const string ViewZoomOut = "ViewZoomOut"; + public const string ToggleCreativeMenu = "ToggleCreativeMenu"; + } +} diff --git a/GameInput/TriggersPack.cs b/GameInput/TriggersPack.cs new file mode 100644 index 0000000..cd3aa3a --- /dev/null +++ b/GameInput/TriggersPack.cs @@ -0,0 +1,45 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameInput.TriggersPack +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Linq; + +namespace Terraria.GameInput +{ + public class TriggersPack + { + public TriggersSet Current = new TriggersSet(); + public TriggersSet Old = new TriggersSet(); + public TriggersSet JustPressed = new TriggersSet(); + public TriggersSet JustReleased = new TriggersSet(); + + public void Initialize() + { + this.Current.SetupKeys(); + this.Old.SetupKeys(); + this.JustPressed.SetupKeys(); + this.JustReleased.SetupKeys(); + } + + public void Reset() + { + this.Old = this.Current.Clone(); + this.Current.Reset(); + } + + public void Update() + { + this.CompareDiffs(this.JustPressed, this.Old, this.Current); + this.CompareDiffs(this.JustReleased, this.Current, this.Old); + } + + public void CompareDiffs(TriggersSet Bearer, TriggersSet oldset, TriggersSet newset) + { + Bearer.Reset(); + foreach (string key in Bearer.KeyStatus.Keys.ToList()) + Bearer.KeyStatus[key] = newset.KeyStatus[key] && !oldset.KeyStatus[key]; + } + } +} diff --git a/GameInput/TriggersSet.cs b/GameInput/TriggersSet.cs new file mode 100644 index 0000000..7fe8223 --- /dev/null +++ b/GameInput/TriggersSet.cs @@ -0,0 +1,443 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GameInput.TriggersSet +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using System.Linq; + +namespace Terraria.GameInput +{ + public class TriggersSet + { + public Dictionary KeyStatus = new Dictionary(); + public bool UsedMovementKey = true; + public int HotbarScrollCD; + public int HotbarHoldTime; + + public bool MouseLeft + { + get => this.KeyStatus[nameof (MouseLeft)]; + set => this.KeyStatus[nameof (MouseLeft)] = value; + } + + public bool MouseRight + { + get => this.KeyStatus[nameof (MouseRight)]; + set => this.KeyStatus[nameof (MouseRight)] = value; + } + + public bool Up + { + get => this.KeyStatus[nameof (Up)]; + set => this.KeyStatus[nameof (Up)] = value; + } + + public bool Down + { + get => this.KeyStatus[nameof (Down)]; + set => this.KeyStatus[nameof (Down)] = value; + } + + public bool Left + { + get => this.KeyStatus[nameof (Left)]; + set => this.KeyStatus[nameof (Left)] = value; + } + + public bool Right + { + get => this.KeyStatus[nameof (Right)]; + set => this.KeyStatus[nameof (Right)] = value; + } + + public bool Jump + { + get => this.KeyStatus[nameof (Jump)]; + set => this.KeyStatus[nameof (Jump)] = value; + } + + public bool Throw + { + get => this.KeyStatus[nameof (Throw)]; + set => this.KeyStatus[nameof (Throw)] = value; + } + + public bool Inventory + { + get => this.KeyStatus[nameof (Inventory)]; + set => this.KeyStatus[nameof (Inventory)] = value; + } + + public bool Grapple + { + get => this.KeyStatus[nameof (Grapple)]; + set => this.KeyStatus[nameof (Grapple)] = value; + } + + public bool SmartSelect + { + get => this.KeyStatus[nameof (SmartSelect)]; + set => this.KeyStatus[nameof (SmartSelect)] = value; + } + + public bool SmartCursor + { + get => this.KeyStatus[nameof (SmartCursor)]; + set => this.KeyStatus[nameof (SmartCursor)] = value; + } + + public bool QuickMount + { + get => this.KeyStatus[nameof (QuickMount)]; + set => this.KeyStatus[nameof (QuickMount)] = value; + } + + public bool QuickHeal + { + get => this.KeyStatus[nameof (QuickHeal)]; + set => this.KeyStatus[nameof (QuickHeal)] = value; + } + + public bool QuickMana + { + get => this.KeyStatus[nameof (QuickMana)]; + set => this.KeyStatus[nameof (QuickMana)] = value; + } + + public bool QuickBuff + { + get => this.KeyStatus[nameof (QuickBuff)]; + set => this.KeyStatus[nameof (QuickBuff)] = value; + } + + public bool MapZoomIn + { + get => this.KeyStatus[nameof (MapZoomIn)]; + set => this.KeyStatus[nameof (MapZoomIn)] = value; + } + + public bool MapZoomOut + { + get => this.KeyStatus[nameof (MapZoomOut)]; + set => this.KeyStatus[nameof (MapZoomOut)] = value; + } + + public bool MapAlphaUp + { + get => this.KeyStatus[nameof (MapAlphaUp)]; + set => this.KeyStatus[nameof (MapAlphaUp)] = value; + } + + public bool MapAlphaDown + { + get => this.KeyStatus[nameof (MapAlphaDown)]; + set => this.KeyStatus[nameof (MapAlphaDown)] = value; + } + + public bool MapFull + { + get => this.KeyStatus[nameof (MapFull)]; + set => this.KeyStatus[nameof (MapFull)] = value; + } + + public bool MapStyle + { + get => this.KeyStatus[nameof (MapStyle)]; + set => this.KeyStatus[nameof (MapStyle)] = value; + } + + public bool Hotbar1 + { + get => this.KeyStatus[nameof (Hotbar1)]; + set => this.KeyStatus[nameof (Hotbar1)] = value; + } + + public bool Hotbar2 + { + get => this.KeyStatus[nameof (Hotbar2)]; + set => this.KeyStatus[nameof (Hotbar2)] = value; + } + + public bool Hotbar3 + { + get => this.KeyStatus[nameof (Hotbar3)]; + set => this.KeyStatus[nameof (Hotbar3)] = value; + } + + public bool Hotbar4 + { + get => this.KeyStatus[nameof (Hotbar4)]; + set => this.KeyStatus[nameof (Hotbar4)] = value; + } + + public bool Hotbar5 + { + get => this.KeyStatus[nameof (Hotbar5)]; + set => this.KeyStatus[nameof (Hotbar5)] = value; + } + + public bool Hotbar6 + { + get => this.KeyStatus[nameof (Hotbar6)]; + set => this.KeyStatus[nameof (Hotbar6)] = value; + } + + public bool Hotbar7 + { + get => this.KeyStatus[nameof (Hotbar7)]; + set => this.KeyStatus[nameof (Hotbar7)] = value; + } + + public bool Hotbar8 + { + get => this.KeyStatus[nameof (Hotbar8)]; + set => this.KeyStatus[nameof (Hotbar8)] = value; + } + + public bool Hotbar9 + { + get => this.KeyStatus[nameof (Hotbar9)]; + set => this.KeyStatus[nameof (Hotbar9)] = value; + } + + public bool Hotbar10 + { + get => this.KeyStatus[nameof (Hotbar10)]; + set => this.KeyStatus[nameof (Hotbar10)] = value; + } + + public bool HotbarMinus + { + get => this.KeyStatus[nameof (HotbarMinus)]; + set => this.KeyStatus[nameof (HotbarMinus)] = value; + } + + public bool HotbarPlus + { + get => this.KeyStatus[nameof (HotbarPlus)]; + set => this.KeyStatus[nameof (HotbarPlus)] = value; + } + + public bool DpadRadial1 + { + get => this.KeyStatus[nameof (DpadRadial1)]; + set => this.KeyStatus[nameof (DpadRadial1)] = value; + } + + public bool DpadRadial2 + { + get => this.KeyStatus[nameof (DpadRadial2)]; + set => this.KeyStatus[nameof (DpadRadial2)] = value; + } + + public bool DpadRadial3 + { + get => this.KeyStatus[nameof (DpadRadial3)]; + set => this.KeyStatus[nameof (DpadRadial3)] = value; + } + + public bool DpadRadial4 + { + get => this.KeyStatus[nameof (DpadRadial4)]; + set => this.KeyStatus[nameof (DpadRadial4)] = value; + } + + public bool RadialHotbar + { + get => this.KeyStatus[nameof (RadialHotbar)]; + set => this.KeyStatus[nameof (RadialHotbar)] = value; + } + + public bool RadialQuickbar + { + get => this.KeyStatus[nameof (RadialQuickbar)]; + set => this.KeyStatus[nameof (RadialQuickbar)] = value; + } + + public bool DpadMouseSnap1 + { + get => this.KeyStatus["DpadSnap1"]; + set => this.KeyStatus["DpadSnap1"] = value; + } + + public bool DpadMouseSnap2 + { + get => this.KeyStatus["DpadSnap2"]; + set => this.KeyStatus["DpadSnap2"] = value; + } + + public bool DpadMouseSnap3 + { + get => this.KeyStatus["DpadSnap3"]; + set => this.KeyStatus["DpadSnap3"] = value; + } + + public bool DpadMouseSnap4 + { + get => this.KeyStatus["DpadSnap4"]; + set => this.KeyStatus["DpadSnap4"] = value; + } + + public bool MenuUp + { + get => this.KeyStatus[nameof (MenuUp)]; + set => this.KeyStatus[nameof (MenuUp)] = value; + } + + public bool MenuDown + { + get => this.KeyStatus[nameof (MenuDown)]; + set => this.KeyStatus[nameof (MenuDown)] = value; + } + + public bool MenuLeft + { + get => this.KeyStatus[nameof (MenuLeft)]; + set => this.KeyStatus[nameof (MenuLeft)] = value; + } + + public bool MenuRight + { + get => this.KeyStatus[nameof (MenuRight)]; + set => this.KeyStatus[nameof (MenuRight)] = value; + } + + public bool LockOn + { + get => this.KeyStatus[nameof (LockOn)]; + set => this.KeyStatus[nameof (LockOn)] = value; + } + + public bool ViewZoomIn + { + get => this.KeyStatus[nameof (ViewZoomIn)]; + set => this.KeyStatus[nameof (ViewZoomIn)] = value; + } + + public bool ViewZoomOut + { + get => this.KeyStatus[nameof (ViewZoomOut)]; + set => this.KeyStatus[nameof (ViewZoomOut)] = value; + } + + public bool OpenCreativePowersMenu + { + get => this.KeyStatus["ToggleCreativeMenu"]; + set => this.KeyStatus["ToggleCreativeMenu"] = value; + } + + public void Reset() + { + foreach (string key in this.KeyStatus.Keys.ToArray()) + this.KeyStatus[key] = false; + } + + public TriggersSet Clone() + { + TriggersSet triggersSet = new TriggersSet(); + foreach (string key in this.KeyStatus.Keys) + triggersSet.KeyStatus.Add(key, this.KeyStatus[key]); + triggersSet.UsedMovementKey = this.UsedMovementKey; + triggersSet.HotbarScrollCD = this.HotbarScrollCD; + triggersSet.HotbarHoldTime = this.HotbarHoldTime; + return triggersSet; + } + + public void SetupKeys() + { + this.KeyStatus.Clear(); + foreach (string knownTrigger in PlayerInput.KnownTriggers) + this.KeyStatus.Add(knownTrigger, false); + } + + public Vector2 DirectionsRaw => new Vector2((float) (this.Right.ToInt() - this.Left.ToInt()), (float) (this.Down.ToInt() - this.Up.ToInt())); + + public Vector2 GetNavigatorDirections() + { + bool flag1 = Main.gameMenu || Main.ingameOptionsWindow || Main.editChest || Main.editSign || (Main.playerInventory || Main.LocalPlayer.talkNPC != -1) && PlayerInput.CurrentProfile.UsingDpadMovekeys(); + bool flag2 = this.Up || flag1 && this.MenuUp; + int num = this.Right ? 1 : (!flag1 ? 0 : (this.MenuRight ? 1 : 0)); + bool flag3 = this.Down || flag1 && this.MenuDown; + bool flag4 = this.Left || flag1 && this.MenuLeft; + return new Vector2((float) ((num != 0).ToInt() - flag4.ToInt()), (float) (flag3.ToInt() - flag2.ToInt())); + } + + public void CopyInto(Player p) + { + if (PlayerInput.CurrentInputMode != InputMode.XBoxGamepadUI && !PlayerInput.CursorIsBusy) + { + p.controlUp = this.Up; + p.controlDown = this.Down; + p.controlLeft = this.Left; + p.controlRight = this.Right; + p.controlJump = this.Jump; + p.controlHook = this.Grapple; + p.controlTorch = this.SmartSelect; + p.controlSmart = this.SmartCursor; + p.controlMount = this.QuickMount; + p.controlQuickHeal = this.QuickHeal; + p.controlQuickMana = this.QuickMana; + p.controlCreativeMenu = this.OpenCreativePowersMenu; + if (this.QuickBuff) + p.QuickBuff(); + } + p.controlInv = this.Inventory; + p.controlThrow = this.Throw; + p.mapZoomIn = this.MapZoomIn; + p.mapZoomOut = this.MapZoomOut; + p.mapAlphaUp = this.MapAlphaUp; + p.mapAlphaDown = this.MapAlphaDown; + p.mapFullScreen = this.MapFull; + p.mapStyle = this.MapStyle; + if (this.MouseLeft) + { + if (!Main.blockMouse && !p.mouseInterface) + p.controlUseItem = true; + } + else + Main.blockMouse = false; + if (!this.MouseRight && !Main.playerInventory) + PlayerInput.LockGamepadTileUseButton = false; + if (this.MouseRight && !p.mouseInterface && !Main.blockMouse && !this.ShouldLockTileUsage() && !PlayerInput.InBuildingMode) + p.controlUseTile = true; + if (PlayerInput.InBuildingMode && this.MouseRight) + p.controlInv = true; + bool flag = PlayerInput.Triggers.Current.HotbarPlus || PlayerInput.Triggers.Current.HotbarMinus; + if (flag) + ++this.HotbarHoldTime; + else + this.HotbarHoldTime = 0; + if (this.HotbarScrollCD <= 0 || this.HotbarScrollCD == 1 & flag && PlayerInput.CurrentProfile.HotbarRadialHoldTimeRequired > 0) + return; + --this.HotbarScrollCD; + } + + public void CopyIntoDuringChat(Player p) + { + if (this.MouseLeft) + { + if (!Main.blockMouse && !p.mouseInterface) + p.controlUseItem = true; + } + else + Main.blockMouse = false; + if (!this.MouseRight && !Main.playerInventory) + PlayerInput.LockGamepadTileUseButton = false; + if (this.MouseRight && !p.mouseInterface && !Main.blockMouse && !this.ShouldLockTileUsage() && !PlayerInput.InBuildingMode) + p.controlUseTile = true; + bool flag = PlayerInput.Triggers.Current.HotbarPlus || PlayerInput.Triggers.Current.HotbarMinus; + if (flag) + ++this.HotbarHoldTime; + else + this.HotbarHoldTime = 0; + if (this.HotbarScrollCD <= 0 || this.HotbarScrollCD == 1 & flag && PlayerInput.CurrentProfile.HotbarRadialHoldTimeRequired > 0) + return; + --this.HotbarScrollCD; + } + + private bool ShouldLockTileUsage() => PlayerInput.LockGamepadTileUseButton && PlayerInput.UsingGamepad; + } +} diff --git a/GetItemSettings.cs b/GetItemSettings.cs new file mode 100644 index 0000000..b319bab --- /dev/null +++ b/GetItemSettings.cs @@ -0,0 +1,47 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.GetItemSettings +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Terraria +{ + public struct GetItemSettings + { + public static GetItemSettings InventoryEntityToPlayerInventorySettings = new GetItemSettings(NoText: true); + public static GetItemSettings NPCEntityToPlayerInventorySettings = new GetItemSettings(true); + public static GetItemSettings LootAllSettings = new GetItemSettings(); + public static GetItemSettings PickupItemFromWorld = new GetItemSettings(CanGoIntoVoidVault: true); + public static GetItemSettings GetItemInDropItemCheck = new GetItemSettings(NoText: true); + public static GetItemSettings InventoryUIToInventorySettings = new GetItemSettings(); + public static GetItemSettings InventoryUIToInventorySettingsShowAsNew = new GetItemSettings(NoText: true, StepAfterHandlingSlotNormally: new Action(GetItemSettings.MakeNewAndShiny)); + public static GetItemSettings ItemCreatedFromItemUsage = new GetItemSettings(); + public readonly bool LongText; + public readonly bool NoText; + public readonly bool CanGoIntoVoidVault; + public readonly Action StepAfterHandlingSlotNormally; + + public GetItemSettings( + bool LongText = false, + bool NoText = false, + bool CanGoIntoVoidVault = false, + Action StepAfterHandlingSlotNormally = null) + { + this.LongText = LongText; + this.NoText = NoText; + this.CanGoIntoVoidVault = CanGoIntoVoidVault; + this.StepAfterHandlingSlotNormally = StepAfterHandlingSlotNormally; + } + + public void HandlePostAction(Item item) + { + if (this.StepAfterHandlingSlotNormally == null) + return; + this.StepAfterHandlingSlotNormally(item); + } + + private static void MakeNewAndShiny(Item item) => item.newAndShiny = true; + } +} diff --git a/Gore.cs b/Gore.cs new file mode 100644 index 0000000..ca688fd --- /dev/null +++ b/Gore.cs @@ -0,0 +1,1177 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Gore +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.GameContent.Shaders; +using Terraria.Graphics.Effects; +using Terraria.ID; +using Terraria.Utilities; + +namespace Terraria +{ + public class Gore + { + public static int goreTime = 600; + public Vector2 position; + public Vector2 velocity; + public float rotation; + public float scale; + public int alpha; + public int type; + public float light; + public bool active; + public bool sticky = true; + public int timeLeft = Gore.goreTime; + public bool behindTiles; + public byte frameCounter; + public SpriteFrame Frame = new SpriteFrame((byte) 1, (byte) 1); + + public float Width => TextureAssets.Gore[this.type].IsLoaded ? this.scale * (float) this.Frame.GetSourceRectangle(TextureAssets.Gore[this.type].Value).Width : 1f; + + public float Height => TextureAssets.Gore[this.type].IsLoaded ? this.scale * (float) this.Frame.GetSourceRectangle(TextureAssets.Gore[this.type].Value).Height : 1f; + + public Rectangle AABBRectangle + { + get + { + if (!TextureAssets.Gore[this.type].IsLoaded) + return new Rectangle(0, 0, 1, 1); + Rectangle sourceRectangle = this.Frame.GetSourceRectangle(TextureAssets.Gore[this.type].Value); + return new Rectangle((int) this.position.X, (int) this.position.Y, (int) ((double) sourceRectangle.Width * (double) this.scale), (int) ((double) sourceRectangle.Height * (double) this.scale)); + } + } + + [Obsolete("Please use Frame instead.")] + public byte frame + { + get => this.Frame.CurrentRow; + set => this.Frame.CurrentRow = value; + } + + [Obsolete("Please use Frame instead.")] + public byte numFrames + { + get => this.Frame.RowCount; + set => this.Frame = new SpriteFrame(this.Frame.ColumnCount, value) + { + CurrentColumn = this.Frame.CurrentColumn, + CurrentRow = this.Frame.CurrentRow + }; + } + + private void UpdateAmbientFloorCloud() + { + this.timeLeft -= GoreID.Sets.DisappearSpeed[this.type]; + if (this.timeLeft <= 0) + { + this.active = false; + } + else + { + bool flag = false; + Point tileCoordinates = (this.position + new Vector2(15f, 0.0f)).ToTileCoordinates(); + Tile testTile1 = Main.tile[tileCoordinates.X, tileCoordinates.Y]; + Tile testTile2 = Main.tile[tileCoordinates.X, tileCoordinates.Y + 1]; + Tile testTile3 = Main.tile[tileCoordinates.X, tileCoordinates.Y + 2]; + if (testTile1 == null || testTile2 == null || testTile3 == null) + { + this.active = false; + } + else + { + if (WorldGen.SolidTile(testTile1) || !WorldGen.SolidTile(testTile2) && !WorldGen.SolidTile(testTile3)) + flag = true; + if (this.timeLeft <= 30) + flag = true; + this.velocity.X = 0.4f * Main.WindForVisuals; + if (!flag) + { + if (this.alpha > 220) + --this.alpha; + } + else + { + ++this.alpha; + if (this.alpha >= (int) byte.MaxValue) + { + this.active = false; + return; + } + } + this.position += this.velocity; + } + } + } + + private void UpdateAmbientAirborneCloud() + { + this.timeLeft -= GoreID.Sets.DisappearSpeed[this.type]; + if (this.timeLeft <= 0) + { + this.active = false; + } + else + { + bool flag = false; + Point tileCoordinates = (this.position + new Vector2(15f, 0.0f)).ToTileCoordinates(); + this.rotation = this.velocity.ToRotation(); + Tile testTile = Main.tile[tileCoordinates.X, tileCoordinates.Y]; + if (testTile == null) + { + this.active = false; + } + else + { + if (WorldGen.SolidTile(testTile)) + flag = true; + if (this.timeLeft <= 60) + flag = true; + if (!flag) + { + if (this.alpha > 240 && Main.rand.Next(5) == 0) + --this.alpha; + } + else + { + if (Main.rand.Next(5) == 0) + ++this.alpha; + if (this.alpha >= (int) byte.MaxValue) + { + this.active = false; + return; + } + } + this.position += this.velocity; + } + } + } + + private void UpdateFogMachineCloud() + { + this.timeLeft -= GoreID.Sets.DisappearSpeed[this.type]; + if (this.timeLeft <= 0) + { + this.active = false; + } + else + { + bool flag = false; + Point tileCoordinates = (this.position + new Vector2(15f, 0.0f)).ToTileCoordinates(); + if (WorldGen.SolidTile(Main.tile[tileCoordinates.X, tileCoordinates.Y])) + flag = true; + if (this.timeLeft <= 240) + flag = true; + if (!flag) + { + if (this.alpha > 225 && Main.rand.Next(2) == 0) + --this.alpha; + } + else + { + if (Main.rand.Next(2) == 0) + ++this.alpha; + if (this.alpha >= (int) byte.MaxValue) + { + this.active = false; + return; + } + } + this.position += this.velocity; + } + } + + private void UpdateLightningBunnySparks() + { + if (this.frameCounter == (byte) 0) + { + this.frameCounter = (byte) 1; + this.Frame.CurrentRow = (byte) Main.rand.Next(3); + } + this.timeLeft -= GoreID.Sets.DisappearSpeed[this.type]; + if (this.timeLeft <= 0) + { + this.active = false; + } + else + { + this.alpha = (int) MathHelper.Lerp((float) byte.MaxValue, 0.0f, (float) this.timeLeft / 15f); + float num = (float) (((double) byte.MaxValue - (double) this.alpha) / (double) byte.MaxValue) * this.scale; + Lighting.AddLight(this.position + new Vector2(this.Width / 2f, this.Height / 2f), num * 0.4f, num, num); + this.position += this.velocity; + } + } + + private float ChumFloatingChunk_GetWaterLine(int X, int Y) + { + float num = this.position.Y + this.Height; + if (Main.tile[X, Y - 1] == null) + Main.tile[X, Y - 1] = new Tile(); + if (Main.tile[X, Y] == null) + Main.tile[X, Y] = new Tile(); + if (Main.tile[X, Y + 1] == null) + Main.tile[X, Y + 1] = new Tile(); + if (Main.tile[X, Y - 1].liquid > (byte) 0) + num = (float) (Y * 16) - (float) ((int) Main.tile[X, Y - 1].liquid / 16); + else if (Main.tile[X, Y].liquid > (byte) 0) + num = (float) ((Y + 1) * 16) - (float) ((int) Main.tile[X, Y].liquid / 16); + else if (Main.tile[X, Y + 1].liquid > (byte) 0) + num = (float) ((Y + 2) * 16) - (float) ((int) Main.tile[X, Y + 1].liquid / 16); + return num; + } + + public void Update() + { + if (Main.netMode == 2 || !this.active) + return; + switch (GoreID.Sets.SpecialAI[this.type]) + { + case 4: + this.UpdateAmbientFloorCloud(); + break; + case 5: + this.UpdateAmbientAirborneCloud(); + break; + case 6: + this.UpdateFogMachineCloud(); + break; + case 7: + this.UpdateLightningBunnySparks(); + break; + default: + if ((this.type == 1217 || this.type == 1218) && this.frameCounter == (byte) 0) + { + this.frameCounter = (byte) 1; + this.Frame.CurrentRow = (byte) Main.rand.Next(3); + } + bool flag1 = this.type >= 1024 && this.type <= 1026; + if (this.type >= 276 && this.type <= 282) + { + this.velocity.X *= 0.98f; + this.velocity.Y *= 0.98f; + if ((double) this.velocity.Y < (double) this.scale) + this.velocity.Y += 0.05f; + if ((double) this.velocity.Y > 0.1) + { + if ((double) this.velocity.X > 0.0) + this.rotation += 0.01f; + else + this.rotation -= 0.01f; + } + } + if (this.type >= 570 && this.type <= 572) + { + this.scale -= 1f / 1000f; + if ((double) this.scale <= 0.01) + { + this.scale = 0.01f; + this.timeLeft = 0; + } + this.sticky = false; + this.rotation = this.velocity.X * 0.1f; + } + else if (this.type >= 706 && this.type <= 717 || this.type == 943 || this.type == 1147 || this.type >= 1160 && this.type <= 1162) + { + this.alpha = this.type == 943 || this.type >= 1160 && this.type <= 1162 ? 0 : ((double) this.position.Y >= Main.worldSurface * 16.0 + 8.0 ? 100 : 0); + int num1 = 4; + ++this.frameCounter; + if (this.frame <= (byte) 4) + { + int x = (int) ((double) this.position.X / 16.0); + int y = (int) ((double) this.position.Y / 16.0) - 1; + if (WorldGen.InWorld(x, y) && !Main.tile[x, y].active()) + this.active = false; + if (this.frame == (byte) 0) + num1 = 24 + Main.rand.Next(256); + if (this.frame == (byte) 1) + num1 = 24 + Main.rand.Next(256); + if (this.frame == (byte) 2) + num1 = 24 + Main.rand.Next(256); + if (this.frame == (byte) 3) + num1 = 24 + Main.rand.Next(96); + if (this.frame == (byte) 5) + num1 = 16 + Main.rand.Next(64); + if (this.type == 716) + num1 *= 2; + if (this.type == 717) + num1 *= 4; + if ((this.type == 943 || this.type >= 1160 && this.type <= 1162) && this.frame < (byte) 6) + num1 = 4; + if ((int) this.frameCounter >= num1) + { + this.frameCounter = (byte) 0; + ++this.frame; + if (this.frame == (byte) 5) + { + int index = Gore.NewGore(this.position, this.velocity, this.type); + Main.gore[index].frame = (byte) 9; + Main.gore[index].velocity *= 0.0f; + } + } + } + else if (this.frame <= (byte) 6) + { + int num2 = 8; + if (this.type == 716) + num2 *= 2; + if (this.type == 717) + num2 *= 3; + if ((int) this.frameCounter >= num2) + { + this.frameCounter = (byte) 0; + ++this.frame; + if (this.frame == (byte) 7) + this.active = false; + } + } + else if (this.frame <= (byte) 9) + { + int num3 = 6; + if (this.type == 716) + { + num3 = (int) ((double) num3 * 1.5); + this.velocity.Y += 0.175f; + } + else if (this.type == 717) + { + num3 *= 2; + this.velocity.Y += 0.15f; + } + else if (this.type == 943) + { + num3 = (int) ((double) num3 * 1.5); + this.velocity.Y += 0.2f; + } + else + this.velocity.Y += 0.2f; + if ((double) this.velocity.Y < 0.5) + this.velocity.Y = 0.5f; + if ((double) this.velocity.Y > 12.0) + this.velocity.Y = 12f; + if ((int) this.frameCounter >= num3) + { + this.frameCounter = (byte) 0; + ++this.frame; + } + if (this.frame > (byte) 9) + this.frame = (byte) 7; + } + else + { + if (this.type == 716) + num1 *= 2; + else if (this.type == 717) + num1 *= 6; + this.velocity.Y += 0.1f; + if ((int) this.frameCounter >= num1) + { + this.frameCounter = (byte) 0; + ++this.frame; + } + this.velocity *= 0.0f; + if (this.frame > (byte) 14) + this.active = false; + } + } + else if (this.type == 11 || this.type == 12 || this.type == 13 || this.type == 61 || this.type == 62 || this.type == 63 || this.type == 99 || this.type == 220 || this.type == 221 || this.type == 222 || this.type >= 375 && this.type <= 377 || this.type >= 435 && this.type <= 437 || this.type >= 861 && this.type <= 862) + { + this.velocity.Y *= 0.98f; + this.velocity.X *= 0.98f; + this.scale -= 0.007f; + if ((double) this.scale < 0.1) + { + this.scale = 0.1f; + this.alpha = (int) byte.MaxValue; + } + } + else if (this.type == 16 || this.type == 17) + { + this.velocity.Y *= 0.98f; + this.velocity.X *= 0.98f; + this.scale -= 0.01f; + if ((double) this.scale < 0.1) + { + this.scale = 0.1f; + this.alpha = (int) byte.MaxValue; + } + } + else if (this.type == 1201) + { + if (this.frameCounter == (byte) 0) + { + this.frameCounter = (byte) 1; + this.Frame.CurrentRow = (byte) Main.rand.Next(4); + } + this.scale -= 1f / 500f; + if ((double) this.scale < 0.1) + { + this.scale = 0.1f; + this.alpha = (int) byte.MaxValue; + } + this.rotation += this.velocity.X * 0.1f; + int index1 = (int) ((double) this.position.X + 6.0) / 16; + int index2 = (int) ((double) this.position.Y - 6.0) / 16; + if ((Main.tile[index1, index2] == null ? 0 : (Main.tile[index1, index2].liquid > (byte) 0 ? 1 : 0)) == 0) + { + this.velocity.Y += 0.2f; + if ((double) this.velocity.Y < 0.0) + this.velocity *= 0.92f; + } + else + { + this.velocity.Y += 0.005f; + float num = this.velocity.Length(); + if ((double) num > 1.0) + this.velocity *= 0.1f; + else if ((double) num > 0.100000001490116) + this.velocity *= 0.98f; + } + } + else if (this.type == 1208) + { + if (this.frameCounter == (byte) 0) + { + this.frameCounter = (byte) 1; + this.Frame.CurrentRow = (byte) Main.rand.Next(4); + } + Vector2 vector2 = this.position + new Vector2(this.Width, this.Height) / 2f; + int index3 = (int) vector2.X / 16; + int index4 = (int) vector2.Y / 16; + bool flag2 = Main.tile[index3, index4] != null && Main.tile[index3, index4].liquid > (byte) 0; + this.scale -= 0.0005f; + if ((double) this.scale < 0.1) + { + this.scale = 0.1f; + this.alpha = (int) byte.MaxValue; + } + this.rotation += this.velocity.X * 0.1f; + if (flag2) + { + this.velocity.X *= 0.9f; + int index5 = (int) vector2.X / 16; + int index6 = (int) ((double) vector2.Y / 16.0); + double num = (double) this.position.Y / 16.0; + int index7 = (int) (((double) this.position.Y + (double) this.Height) / 16.0); + if (Main.tile[index5, index6] == null) + Main.tile[index5, index6] = new Tile(); + if (Main.tile[index5, index7] == null) + Main.tile[index5, index7] = new Tile(); + if ((double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.5f; + float waterLine = this.ChumFloatingChunk_GetWaterLine((int) ((double) vector2.X / 16.0), (int) ((double) vector2.Y / 16.0)); + if ((double) vector2.Y > (double) waterLine) + { + this.velocity.Y -= 0.1f; + if ((double) this.velocity.Y < -8.0) + this.velocity.Y = -8f; + if ((double) vector2.Y + (double) this.velocity.Y < (double) waterLine) + this.velocity.Y = waterLine - vector2.Y; + } + else + this.velocity.Y = waterLine - vector2.Y; + bool flag3 = !flag2 && (double) this.velocity.Length() < 0.800000011920929; + int maxValue = flag2 ? 270 : 15; + if (Main.rand.Next(maxValue) == 0 && !flag3) + { + Gore gore = Gore.NewGoreDirect(this.position + Vector2.UnitY * 6f, Vector2.Zero, 1201, this.scale * 0.7f); + if (flag2) + gore.velocity = Vector2.UnitX * Main.rand.NextFloatDirection() * 0.5f + Vector2.UnitY * Main.rand.NextFloat(); + else if ((double) gore.velocity.Y < 0.0) + gore.velocity.Y = -gore.velocity.Y; + } + } + else + { + if ((double) this.velocity.Y == 0.0) + this.velocity.X *= 0.95f; + this.velocity.X *= 0.98f; + this.velocity.Y += 0.3f; + if ((double) this.velocity.Y > 15.8999996185303) + this.velocity.Y = 15.9f; + } + } + else if (this.type == 331) + { + this.alpha += 5; + this.velocity.Y *= 0.95f; + this.velocity.X *= 0.95f; + this.rotation = this.velocity.X * 0.1f; + } + else if (GoreID.Sets.SpecialAI[this.type] == 3) + { + if (++this.frameCounter >= (byte) 8 && (double) this.velocity.Y > 0.200000002980232) + { + this.frameCounter = (byte) 0; + int num = (int) this.Frame.CurrentRow / 4; + if ((int) ++this.Frame.CurrentRow >= 4 + num * 4) + this.Frame.CurrentRow = (byte) (num * 4); + } + } + else if (GoreID.Sets.SpecialAI[this.type] != 1 && GoreID.Sets.SpecialAI[this.type] != 2) + { + if (this.type >= 907 && this.type <= 909) + { + this.rotation = 0.0f; + this.velocity.X *= 0.98f; + if ((double) this.velocity.Y > 0.0 && (double) this.velocity.Y < 1.0 / 1000.0) + this.velocity.Y = (float) ((double) Main.rand.NextFloat() * -3.0 - 0.5); + if ((double) this.velocity.Y > -1.0) + this.velocity.Y -= 0.1f; + if ((double) this.scale < 1.0) + this.scale += 0.1f; + if (++this.frameCounter >= (byte) 8) + { + this.frameCounter = (byte) 0; + if (++this.frame >= (byte) 3) + this.frame = (byte) 0; + } + } + else if (this.type == 1218) + { + if (this.timeLeft > 8) + this.timeLeft = 8; + this.velocity.X *= 0.95f; + if ((double) Math.Abs(this.velocity.X) <= 0.100000001490116) + this.velocity.X = 0.0f; + if (this.alpha < 100 && (double) this.velocity.Length() > 0.0 && Main.rand.Next(5) == 0) + { + int Type = 246; + switch (this.Frame.CurrentRow) + { + case 0: + Type = 246; + break; + case 1: + Type = 245; + break; + case 2: + Type = 244; + break; + } + int index = Dust.NewDust(this.position + new Vector2(6f, 4f), 4, 4, Type); + Main.dust[index].alpha = (int) byte.MaxValue; + Main.dust[index].scale = 0.8f; + Main.dust[index].velocity = Vector2.Zero; + } + this.velocity.Y += 0.2f; + this.rotation = 0.0f; + } + else if (this.type < 411 || this.type > 430) + { + this.velocity.Y += 0.2f; + this.rotation += this.velocity.X * 0.05f; + } + else if (GoreID.Sets.SpecialAI[this.type] != 3) + this.rotation += this.velocity.X * 0.1f; + } + if (this.type >= 580 && this.type <= 582) + { + this.rotation = 0.0f; + this.velocity.X *= 0.95f; + } + if (GoreID.Sets.SpecialAI[this.type] == 2) + { + if (this.timeLeft < 60) + this.alpha += Main.rand.Next(1, 7); + else if (this.alpha > 100) + this.alpha -= Main.rand.Next(1, 4); + if (this.alpha < 0) + this.alpha = 0; + if (this.alpha > (int) byte.MaxValue) + this.timeLeft = 0; + this.velocity.X = (float) (((double) this.velocity.X * 50.0 + (double) Main.WindForVisuals * 2.0 + (double) Main.rand.Next(-10, 11) * 0.100000001490116) / 51.0); + float num4 = 0.0f; + if ((double) this.velocity.X < 0.0) + num4 = this.velocity.X * 0.2f; + this.velocity.Y = (float) (((double) this.velocity.Y * 50.0 - 0.349999994039536 + (double) num4 + (double) Main.rand.Next(-10, 11) * 0.200000002980232) / 51.0); + this.rotation = this.velocity.X * 0.6f; + float num5 = -1f; + if (TextureAssets.Gore[this.type].IsLoaded) + { + Rectangle rectangle1 = new Rectangle((int) this.position.X, (int) this.position.Y, (int) ((double) TextureAssets.Gore[this.type].Width() * (double) this.scale), (int) ((double) TextureAssets.Gore[this.type].Height() * (double) this.scale)); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && !Main.player[index].dead) + { + Rectangle rectangle2 = new Rectangle((int) Main.player[index].position.X, (int) Main.player[index].position.Y, Main.player[index].width, Main.player[index].height); + if (rectangle1.Intersects(rectangle2)) + { + this.timeLeft = 0; + num5 = Main.player[index].velocity.Length(); + break; + } + } + } + } + if (this.timeLeft > 0) + { + if (Main.rand.Next(2) == 0) + --this.timeLeft; + if (Main.rand.Next(50) == 0) + this.timeLeft -= 5; + if (Main.rand.Next(100) == 0) + this.timeLeft -= 10; + } + else + { + this.alpha = (int) byte.MaxValue; + if (TextureAssets.Gore[this.type].IsLoaded && (double) num5 != -1.0) + { + float num6 = (float) ((double) TextureAssets.Gore[this.type].Width() * (double) this.scale * 0.800000011920929); + float x = this.position.X; + float y = this.position.Y; + float num7 = (float) TextureAssets.Gore[this.type].Width() * this.scale; + float num8 = (float) TextureAssets.Gore[this.type].Height() * this.scale; + int Type = 31; + for (int index8 = 0; (double) index8 < (double) num6; ++index8) + { + int index9 = Dust.NewDust(new Vector2(x, y), (int) num7, (int) num8, Type); + Main.dust[index9].velocity *= (float) ((1.0 + (double) num5) / 3.0); + Main.dust[index9].noGravity = true; + Main.dust[index9].alpha = 100; + Main.dust[index9].scale = this.scale; + } + } + } + } + if (this.type >= 411 && this.type <= 430) + { + this.alpha = 50; + this.velocity.X = (float) (((double) this.velocity.X * 50.0 + (double) Main.WindForVisuals * 2.0 + (double) Main.rand.Next(-10, 11) * 0.100000001490116) / 51.0); + this.velocity.Y = (float) (((double) this.velocity.Y * 50.0 - 0.25 + (double) Main.rand.Next(-10, 11) * 0.200000002980232) / 51.0); + this.rotation = this.velocity.X * 0.3f; + if (TextureAssets.Gore[this.type].IsLoaded) + { + Rectangle rectangle3 = new Rectangle((int) this.position.X, (int) this.position.Y, (int) ((double) TextureAssets.Gore[this.type].Width() * (double) this.scale), (int) ((double) TextureAssets.Gore[this.type].Height() * (double) this.scale)); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && !Main.player[index].dead) + { + Rectangle rectangle4 = new Rectangle((int) Main.player[index].position.X, (int) Main.player[index].position.Y, Main.player[index].width, Main.player[index].height); + if (rectangle3.Intersects(rectangle4)) + this.timeLeft = 0; + } + } + if (Collision.SolidCollision(this.position, (int) ((double) TextureAssets.Gore[this.type].Width() * (double) this.scale), (int) ((double) TextureAssets.Gore[this.type].Height() * (double) this.scale))) + this.timeLeft = 0; + } + if (this.timeLeft > 0) + { + if (Main.rand.Next(2) == 0) + --this.timeLeft; + if (Main.rand.Next(50) == 0) + this.timeLeft -= 5; + if (Main.rand.Next(100) == 0) + this.timeLeft -= 10; + } + else + { + this.alpha = (int) byte.MaxValue; + if (TextureAssets.Gore[this.type].IsLoaded) + { + float num9 = (float) ((double) TextureAssets.Gore[this.type].Width() * (double) this.scale * 0.800000011920929); + float x = this.position.X; + float y = this.position.Y; + float num10 = (float) TextureAssets.Gore[this.type].Width() * this.scale; + float num11 = (float) TextureAssets.Gore[this.type].Height() * this.scale; + int Type = 176; + if (this.type >= 416 && this.type <= 420) + Type = 177; + if (this.type >= 421 && this.type <= 425) + Type = 178; + if (this.type >= 426 && this.type <= 430) + Type = 179; + for (int index10 = 0; (double) index10 < (double) num9; ++index10) + { + int index11 = Dust.NewDust(new Vector2(x, y), (int) num10, (int) num11, Type); + Main.dust[index11].noGravity = true; + Main.dust[index11].alpha = 100; + Main.dust[index11].scale = this.scale; + } + } + } + } + else if (GoreID.Sets.SpecialAI[this.type] != 3 && GoreID.Sets.SpecialAI[this.type] != 1) + { + if (this.type >= 706 && this.type <= 717 || this.type == 943 || this.type == 1147 || this.type >= 1160 && this.type <= 1162) + { + if (this.type == 716) + { + float num12 = 0.6f; + float num13 = this.frame != (byte) 0 ? (this.frame != (byte) 1 ? (this.frame != (byte) 2 ? (this.frame != (byte) 3 ? (this.frame != (byte) 4 ? (this.frame != (byte) 5 ? (this.frame != (byte) 6 ? (this.frame > (byte) 9 ? (this.frame != (byte) 10 ? (this.frame != (byte) 11 ? (this.frame != (byte) 12 ? (this.frame != (byte) 13 ? (this.frame != (byte) 14 ? 0.0f : num12 * 0.1f) : num12 * 0.2f) : num12 * 0.3f) : num12 * 0.4f) : num12 * 0.5f) : num12 * 0.5f) : num12 * 0.2f) : num12 * 0.4f) : num12 * 0.5f) : num12 * 0.4f) : num12 * 0.3f) : num12 * 0.2f) : num12 * 0.1f; + Lighting.AddLight(this.position + new Vector2(8f, 8f), 1f * num13, 0.5f * num13, 0.1f * num13); + } + Vector2 velocity = this.velocity; + this.velocity = Collision.TileCollision(this.position, this.velocity, 16, 14); + if (this.velocity != velocity) + { + if (this.frame < (byte) 10) + { + this.frame = (byte) 10; + this.frameCounter = (byte) 0; + if (this.type != 716 && this.type != 717 && this.type != 943 && (this.type < 1160 || this.type > 1162)) + SoundEngine.PlaySound(39, (int) this.position.X + 8, (int) this.position.Y + 8, Main.rand.Next(2)); + } + } + else if (Collision.WetCollision(this.position + this.velocity, 16, 14)) + { + if (this.frame < (byte) 10) + { + this.frame = (byte) 10; + this.frameCounter = (byte) 0; + if (this.type != 716 && this.type != 717 && this.type != 943 && (this.type < 1160 || this.type > 1162)) + SoundEngine.PlaySound(39, (int) this.position.X + 8, (int) this.position.Y + 8, 2); + ((WaterShaderData) Filters.Scene["WaterDistortion"].GetShader()).QueueRipple(this.position + new Vector2(8f, 8f)); + } + int index12 = (int) ((double) this.position.X + 8.0) / 16; + int index13 = (int) ((double) this.position.Y + 14.0) / 16; + if (Main.tile[index12, index13] != null && Main.tile[index12, index13].liquid > (byte) 0) + { + this.velocity *= 0.0f; + this.position.Y = (float) (index13 * 16 - (int) Main.tile[index12, index13].liquid / 16); + } + } + } + else if (this.sticky) + { + int num14 = 32; + if (TextureAssets.Gore[this.type].IsLoaded) + { + num14 = TextureAssets.Gore[this.type].Width(); + if (TextureAssets.Gore[this.type].Height() < num14) + num14 = TextureAssets.Gore[this.type].Height(); + } + if (flag1) + num14 = 4; + int num15 = (int) ((double) num14 * 0.899999976158142); + Vector2 velocity = this.velocity; + this.velocity = Collision.TileCollision(this.position, this.velocity, (int) ((double) num15 * (double) this.scale), (int) ((double) num15 * (double) this.scale)); + if ((double) this.velocity.Y == 0.0) + { + if (flag1) + this.velocity.X *= 0.94f; + else + this.velocity.X *= 0.97f; + if ((double) this.velocity.X > -0.01 && (double) this.velocity.X < 0.01) + this.velocity.X = 0.0f; + } + if (this.timeLeft > 0) + this.timeLeft -= GoreID.Sets.DisappearSpeed[this.type]; + else + this.alpha += GoreID.Sets.DisappearSpeedAlpha[this.type]; + } + else + this.alpha += 2 * GoreID.Sets.DisappearSpeedAlpha[this.type]; + } + if (this.type >= 907 && this.type <= 909) + { + int num16 = 32; + if (TextureAssets.Gore[this.type].IsLoaded) + { + num16 = TextureAssets.Gore[this.type].Width(); + if (TextureAssets.Gore[this.type].Height() < num16) + num16 = TextureAssets.Gore[this.type].Height(); + } + int num17 = (int) ((double) num16 * 0.899999976158142); + Vector4 vector4 = Collision.SlopeCollision(this.position, this.velocity, num17, num17, fall: true); + this.position.X = vector4.X; + this.position.Y = vector4.Y; + this.velocity.X = vector4.Z; + this.velocity.Y = vector4.W; + } + if (GoreID.Sets.SpecialAI[this.type] == 1) + this.Gore_UpdateSail(); + else if (GoreID.Sets.SpecialAI[this.type] == 3) + this.Gore_UpdateLeaf(); + else + this.position += this.velocity; + if (this.alpha >= (int) byte.MaxValue) + this.active = false; + if ((double) this.light <= 0.0) + break; + float r = this.light * this.scale; + float g = this.light * this.scale; + float b = this.light * this.scale; + if (this.type == 16) + { + b *= 0.3f; + g *= 0.8f; + } + else if (this.type == 17) + { + g *= 0.6f; + r *= 0.3f; + } + if (TextureAssets.Gore[this.type].IsLoaded) + { + Lighting.AddLight((int) (((double) this.position.X + (double) TextureAssets.Gore[this.type].Width() * (double) this.scale / 2.0) / 16.0), (int) (((double) this.position.Y + (double) TextureAssets.Gore[this.type].Height() * (double) this.scale / 2.0) / 16.0), r, g, b); + break; + } + Lighting.AddLight((int) (((double) this.position.X + 32.0 * (double) this.scale / 2.0) / 16.0), (int) (((double) this.position.Y + 32.0 * (double) this.scale / 2.0) / 16.0), r, g, b); + break; + } + } + + private void Gore_UpdateLeaf() + { + Vector2 Position = this.position + new Vector2(12f) / 2f - new Vector2(4f) / 2f; + Position.Y -= 4f; + Vector2 vector2_1 = this.position - Position; + if ((double) this.velocity.Y < 0.0) + { + Vector2 vector2_2 = new Vector2(this.velocity.X, -0.2f); + int num1 = (int) (4.0 * 0.899999976158142); + Point tileCoordinates = (new Vector2((float) num1, (float) num1) / 2f + Position).ToTileCoordinates(); + if (!WorldGen.InWorld(tileCoordinates.X, tileCoordinates.Y)) + { + this.active = false; + } + else + { + Tile tile = Main.tile[tileCoordinates.X, tileCoordinates.Y]; + if (tile == null) + { + this.active = false; + } + else + { + int num2 = 6; + Rectangle rectangle1 = new Rectangle(tileCoordinates.X * 16, tileCoordinates.Y * 16 + (int) tile.liquid / 16, 16, 16 - (int) tile.liquid / 16); + Rectangle rectangle2 = new Rectangle((int) Position.X, (int) Position.Y + num2, num1, num1); + bool flag = tile != null && tile.liquid > (byte) 0 && rectangle1.Intersects(rectangle2); + if (flag) + { + if (tile.honey()) + vector2_2.X = 0.0f; + else if (tile.lava()) + { + this.active = false; + for (int index = 0; index < 5; ++index) + Dust.NewDust(this.position, num1, num1, 31, SpeedY: -0.2f); + } + else + vector2_2.X = Main.WindForVisuals; + if ((double) this.position.Y > Main.worldSurface * 16.0) + vector2_2.X = 0.0f; + } + if (!WorldGen.SolidTile(tileCoordinates.X, tileCoordinates.Y + 1) && !flag) + { + this.velocity.Y = 0.1f; + this.timeLeft = 0; + this.alpha += 20; + } + vector2_2 = Collision.TileCollision(Position, vector2_2, num1, num1); + if (flag) + this.rotation = vector2_2.ToRotation() + 1.570796f; + vector2_2.X *= 0.94f; + if (!flag || (double) vector2_2.X > -0.01 && (double) vector2_2.X < 0.01) + vector2_2.X = 0.0f; + if (this.timeLeft > 0) + this.timeLeft -= GoreID.Sets.DisappearSpeed[this.type]; + else + this.alpha += GoreID.Sets.DisappearSpeedAlpha[this.type]; + this.velocity.X = vector2_2.X; + this.position.X += this.velocity.X; + } + } + } + else + { + this.velocity.Y += (float) Math.PI / 180f; + Vector2 vector2_3 = new Vector2(Vector2.UnitY.RotatedBy((double) this.velocity.Y).X * 1f, Math.Abs(Vector2.UnitY.RotatedBy((double) this.velocity.Y).Y) * 1f); + int num3 = 4; + if ((double) this.position.Y < Main.worldSurface * 16.0) + vector2_3.X += Main.WindForVisuals * 4f; + Vector2 vector2_4 = vector2_3; + vector2_3 = Collision.TileCollision(Position, vector2_3, num3, num3); + Vector4 vector4 = Collision.SlopeCollision(Position, vector2_3, num3, num3, 1f); + this.position.X = vector4.X; + this.position.Y = vector4.Y; + vector2_3.X = vector4.Z; + vector2_3.Y = vector4.W; + this.position += vector2_1; + if (vector2_3 != vector2_4) + this.velocity.Y = -1f; + Point tileCoordinates = (new Vector2(this.Width, this.Height) * 0.5f + this.position).ToTileCoordinates(); + if (!WorldGen.InWorld(tileCoordinates.X, tileCoordinates.Y)) + { + this.active = false; + } + else + { + Tile tile = Main.tile[tileCoordinates.X, tileCoordinates.Y]; + if (tile == null) + { + this.active = false; + } + else + { + int num4 = 6; + Rectangle rectangle3 = new Rectangle(tileCoordinates.X * 16, tileCoordinates.Y * 16 + (int) tile.liquid / 16, 16, 16 - (int) tile.liquid / 16); + Rectangle rectangle4 = new Rectangle((int) Position.X, (int) Position.Y + num4, num3, num3); + if (tile != null && tile.liquid > (byte) 0 && rectangle3.Intersects(rectangle4)) + this.velocity.Y = -1f; + this.position += vector2_3; + this.rotation = vector2_3.ToRotation() + 1.570796f; + if (this.timeLeft > 0) + this.timeLeft -= GoreID.Sets.DisappearSpeed[this.type]; + else + this.alpha += GoreID.Sets.DisappearSpeedAlpha[this.type]; + } + } + } + } + + private void Gore_UpdateSail() + { + if ((double) this.velocity.Y < 0.0) + { + Vector2 Velocity = new Vector2(this.velocity.X, 0.6f); + int num1 = 32; + if (TextureAssets.Gore[this.type].IsLoaded) + { + num1 = TextureAssets.Gore[this.type].Width(); + if (TextureAssets.Gore[this.type].Height() < num1) + num1 = TextureAssets.Gore[this.type].Height(); + } + int num2 = (int) ((double) num1 * 0.899999976158142); + Vector2 vector2 = Collision.TileCollision(this.position, Velocity, (int) ((double) num2 * (double) this.scale), (int) ((double) num2 * (double) this.scale)); + vector2.X *= 0.97f; + if ((double) vector2.X > -0.01 && (double) vector2.X < 0.01) + vector2.X = 0.0f; + if (this.timeLeft > 0) + --this.timeLeft; + else + ++this.alpha; + this.velocity.X = vector2.X; + } + else + { + this.velocity.Y += (float) Math.PI / 60f; + Vector2 Velocity = new Vector2(Vector2.UnitY.RotatedBy((double) this.velocity.Y).X * 2f, Math.Abs(Vector2.UnitY.RotatedBy((double) this.velocity.Y).Y) * 3f) * 2f; + int num = 32; + if (TextureAssets.Gore[this.type].IsLoaded) + { + num = TextureAssets.Gore[this.type].Width(); + if (TextureAssets.Gore[this.type].Height() < num) + num = TextureAssets.Gore[this.type].Height(); + } + Vector2 vector2 = Velocity; + Vector2 v = Collision.TileCollision(this.position, Velocity, (int) ((double) num * (double) this.scale), (int) ((double) num * (double) this.scale)); + if (v != vector2) + this.velocity.Y = -1f; + this.position += v; + this.rotation = v.ToRotation() + 3.141593f; + if (this.timeLeft > 0) + --this.timeLeft; + else + ++this.alpha; + } + } + + public static Gore NewGorePerfect( + Vector2 Position, + Vector2 Velocity, + int Type, + float Scale = 1f) + { + Gore gore = Gore.NewGoreDirect(Position, Velocity, Type, Scale); + gore.position = Position; + gore.velocity = Velocity; + return gore; + } + + public static Gore NewGoreDirect( + Vector2 Position, + Vector2 Velocity, + int Type, + float Scale = 1f) + { + return Main.gore[Gore.NewGore(Position, Velocity, Type, Scale)]; + } + + public static int NewGore(Vector2 Position, Vector2 Velocity, int Type, float Scale = 1f) + { + if (Main.netMode == 2 || Main.gamePaused || WorldGen.gen) + return 600; + if (Main.rand == null) + Main.rand = new UnifiedRandom(); + int index1 = 600; + for (int index2 = 0; index2 < 600; ++index2) + { + if (!Main.gore[index2].active) + { + index1 = index2; + break; + } + } + if (index1 == 600) + return index1; + Main.gore[index1].Frame = new SpriteFrame((byte) 1, (byte) 1); + Main.gore[index1].frameCounter = (byte) 0; + Main.gore[index1].behindTiles = false; + Main.gore[index1].light = 0.0f; + Main.gore[index1].position = Position; + Main.gore[index1].velocity = Velocity; + Main.gore[index1].velocity.Y -= (float) Main.rand.Next(10, 31) * 0.1f; + Main.gore[index1].velocity.X += (float) Main.rand.Next(-20, 21) * 0.1f; + Main.gore[index1].type = Type; + Main.gore[index1].active = true; + Main.gore[index1].alpha = 0; + Main.gore[index1].rotation = 0.0f; + Main.gore[index1].scale = Scale; + if (!ChildSafety.Disabled && ChildSafety.DangerousGore(Type)) + { + Main.gore[index1].type = Main.rand.Next(11, 14); + Main.gore[index1].scale = (float) ((double) Main.rand.NextFloat() * 0.5 + 0.5); + Main.gore[index1].velocity /= 2f; + } + if (Gore.goreTime == 0 || Type == 11 || Type == 12 || Type == 13 || Type == 16 || Type == 17 || Type == 61 || Type == 62 || Type == 63 || Type == 99 || Type == 220 || Type == 221 || Type == 222 || Type == 435 || Type == 436 || Type == 437 || Type >= 861 && Type <= 862) + Main.gore[index1].sticky = false; + else if (Type >= 375 && Type <= 377) + { + Main.gore[index1].sticky = false; + Main.gore[index1].alpha = 100; + } + else + { + Main.gore[index1].sticky = true; + Main.gore[index1].timeLeft = Gore.goreTime; + } + if (Type >= 706 && Type <= 717 || Type == 943 || Type == 1147 || Type >= 1160 && Type <= 1162) + { + Main.gore[index1].numFrames = (byte) 15; + Main.gore[index1].behindTiles = true; + Main.gore[index1].timeLeft = Gore.goreTime * 3; + } + if (Type == 16 || Type == 17) + { + Main.gore[index1].alpha = 100; + Main.gore[index1].scale = 0.7f; + Main.gore[index1].light = 1f; + } + if (Type >= 570 && Type <= 572) + Main.gore[index1].velocity = Velocity; + if (Type == 1201 || Type == 1208) + Main.gore[index1].Frame = new SpriteFrame((byte) 1, (byte) 4); + if (Type == 1217 || Type == 1218) + Main.gore[index1].Frame = new SpriteFrame((byte) 1, (byte) 3); + if (Type == 1225) + { + Main.gore[index1].Frame = new SpriteFrame((byte) 1, (byte) 3); + Main.gore[index1].timeLeft = 10 + Main.rand.Next(6); + Main.gore[index1].sticky = false; + if (TextureAssets.Gore[Type].IsLoaded) + { + Main.gore[index1].position.X = Position.X - (float) (TextureAssets.Gore[Type].Width() / 2) * Scale; + Main.gore[index1].position.Y = Position.Y - (float) ((double) TextureAssets.Gore[Type].Height() * (double) Scale / 2.0); + } + } + int num1 = GoreID.Sets.SpecialAI[Type]; + if (num1 == 3) + { + Main.gore[index1].velocity = new Vector2((float) (((double) Main.rand.NextFloat() - 0.5) * 1.0), Main.rand.NextFloat() * 6.283185f); + bool flag = Type >= 910 && Type <= 925 || Type >= 1113 && Type <= 1121 || Type >= 1248 && Type <= 1255 || Type >= 1257; + Main.gore[index1].Frame = new SpriteFrame(flag ? (byte) 32 : (byte) 1, (byte) 8) + { + CurrentRow = (byte) Main.rand.Next(8) + }; + Main.gore[index1].frameCounter = (byte) Main.rand.Next(8); + } + if (num1 == 1) + Main.gore[index1].velocity = new Vector2((float) (((double) Main.rand.NextFloat() - 0.5) * 3.0), Main.rand.NextFloat() * 6.283185f); + if (Type >= 411 && Type <= 430 && TextureAssets.Gore[Type].IsLoaded) + { + Main.gore[index1].position.X = Position.X - (float) (TextureAssets.Gore[Type].Width() / 2) * Scale; + Main.gore[index1].position.Y = Position.Y - (float) TextureAssets.Gore[Type].Height() * Scale; + Main.gore[index1].velocity.Y *= (float) Main.rand.Next(90, 150) * 0.01f; + Main.gore[index1].velocity.X *= (float) Main.rand.Next(40, 90) * 0.01f; + int num2 = Main.rand.Next(4) * 5; + Main.gore[index1].type += num2; + Main.gore[index1].timeLeft = Main.rand.Next(Gore.goreTime / 2, Gore.goreTime * 2); + Main.gore[index1].sticky = true; + if (Gore.goreTime == 0) + Main.gore[index1].timeLeft = Main.rand.Next(150, 600); + } + if (Type >= 907 && Type <= 909) + { + Main.gore[index1].sticky = true; + Main.gore[index1].numFrames = (byte) 3; + Main.gore[index1].frame = (byte) Main.rand.Next(3); + Main.gore[index1].frameCounter = (byte) Main.rand.Next(5); + Main.gore[index1].rotation = 0.0f; + } + if (num1 == 2) + { + Main.gore[index1].sticky = false; + if (TextureAssets.Gore[Type].IsLoaded) + { + Main.gore[index1].alpha = 150; + Main.gore[index1].velocity = Velocity; + Main.gore[index1].position.X = Position.X - (float) (TextureAssets.Gore[Type].Width() / 2) * Scale; + Main.gore[index1].position.Y = Position.Y - (float) ((double) TextureAssets.Gore[Type].Height() * (double) Scale / 2.0); + Main.gore[index1].timeLeft = Main.rand.Next(Gore.goreTime / 2, Gore.goreTime + 1); + } + } + if (num1 == 4) + { + Main.gore[index1].alpha = 254; + Main.gore[index1].timeLeft = 300; + } + if (num1 == 5) + { + Main.gore[index1].alpha = 254; + Main.gore[index1].timeLeft = 240; + } + if (num1 == 6) + { + Main.gore[index1].alpha = 254; + Main.gore[index1].timeLeft = 480; + } + return index1; + } + + public Color GetAlpha(Color newColor) + { + float num1 = (float) ((int) byte.MaxValue - this.alpha) / (float) byte.MaxValue; + int r; + int g; + int b; + if (this.type == 16 || this.type == 17) + { + r = (int) newColor.R; + g = (int) newColor.G; + b = (int) newColor.B; + } + else + { + if (this.type == 716) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 200); + if (this.type >= 570 && this.type <= 572) + { + byte num2 = (byte) ((int) byte.MaxValue - this.alpha); + return new Color((int) num2, (int) num2, (int) num2, (int) num2 / 2); + } + if (this.type == 331) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 50); + if (this.type == 1225) + return new Color(num1, num1, num1, num1); + r = (int) ((double) newColor.R * (double) num1); + g = (int) ((double) newColor.G * (double) num1); + b = (int) ((double) newColor.B * (double) num1); + } + int a = (int) newColor.A - this.alpha; + if (a < 0) + a = 0; + if (a > (int) byte.MaxValue) + a = (int) byte.MaxValue; + return this.type >= 1202 && this.type <= 1204 ? new Color(r, g, b, a < 20 ? a : 20) : new Color(r, g, b, a); + } + } +} diff --git a/Graphics/Camera.cs b/Graphics/Camera.cs new file mode 100644 index 0000000..5fd853b --- /dev/null +++ b/Graphics/Camera.cs @@ -0,0 +1,32 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Camera +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.Graphics +{ + public class Camera + { + public Vector2 UnscaledPosition => Main.screenPosition; + + public Vector2 UnscaledSize => new Vector2((float) Main.screenWidth, (float) Main.screenHeight); + + public Vector2 ScaledPosition => this.UnscaledPosition + this.GameViewMatrix.Translation; + + public Vector2 ScaledSize => this.UnscaledSize - this.GameViewMatrix.Translation * 2f; + + public RasterizerState Rasterizer => Main.Rasterizer; + + public SamplerState Sampler => Main.DefaultSamplerState; + + public SpriteViewMatrix GameViewMatrix => Main.GameViewMatrix; + + public SpriteBatch SpriteBatch => Main.spriteBatch; + + public Vector2 Center => this.UnscaledPosition + this.UnscaledSize * 0.5f; + } +} diff --git a/Graphics/Capture/CaptureBiome.cs b/Graphics/Capture/CaptureBiome.cs new file mode 100644 index 0000000..1f30d30 --- /dev/null +++ b/Graphics/Capture/CaptureBiome.cs @@ -0,0 +1,188 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Capture.CaptureBiome +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Graphics.Capture +{ + public class CaptureBiome + { + public static readonly CaptureBiome DefaultPurity = new CaptureBiome(0, 0); + public static CaptureBiome[] BiomesByWaterStyle = new CaptureBiome[15] + { + null, + null, + new CaptureBiome(1, 2, CaptureBiome.TileColorStyle.Corrupt), + new CaptureBiome(3, 3, CaptureBiome.TileColorStyle.Jungle), + new CaptureBiome(6, 4), + new CaptureBiome(7, 5), + new CaptureBiome(2, 6), + new CaptureBiome(0, 7), + new CaptureBiome(0, 8), + new CaptureBiome(0, 9), + new CaptureBiome(8, 10, CaptureBiome.TileColorStyle.Crimson), + null, + new CaptureBiome(2, 12), + new CaptureBiome(4, 0), + new CaptureBiome(9, 7, CaptureBiome.TileColorStyle.Mushroom) + }; + public readonly int WaterStyle; + public readonly int BackgroundIndex; + public readonly CaptureBiome.TileColorStyle TileColor; + + public CaptureBiome( + int backgroundIndex, + int waterStyle, + CaptureBiome.TileColorStyle tileColorStyle = CaptureBiome.TileColorStyle.Normal) + { + this.BackgroundIndex = backgroundIndex; + this.WaterStyle = waterStyle; + this.TileColor = tileColorStyle; + } + + public static CaptureBiome GetCaptureBiome(int biomeChoice) + { + switch (biomeChoice) + { + case 1: + return CaptureBiome.GetPurityForPlayer(); + case 2: + return CaptureBiome.Styles.Corruption; + case 3: + return CaptureBiome.Styles.Jungle; + case 4: + return CaptureBiome.Styles.Hallow; + case 5: + return CaptureBiome.Styles.Snow; + case 6: + return CaptureBiome.Styles.Desert; + case 7: + return CaptureBiome.Styles.DirtLayer; + case 8: + return CaptureBiome.Styles.RockLayer; + case 9: + return CaptureBiome.Styles.BloodMoon; + case 10: + return CaptureBiome.Styles.UndergroundDesert; + case 11: + return CaptureBiome.Styles.Ocean; + case 12: + return CaptureBiome.Styles.Mushroom; + default: + return CaptureBiome.GetBiomeByLocation() ?? CaptureBiome.GetBiomeByWater() ?? CaptureBiome.GetPurityForPlayer(); + } + } + + private static CaptureBiome GetBiomeByWater() + { + int waterStyle = Main.CalculateWaterStyle(true); + for (int index = 0; index < CaptureBiome.BiomesByWaterStyle.Length; ++index) + { + CaptureBiome captureBiome = CaptureBiome.BiomesByWaterStyle[index]; + if (captureBiome != null && captureBiome.WaterStyle == waterStyle) + return captureBiome; + } + return (CaptureBiome) null; + } + + private static CaptureBiome GetBiomeByLocation() + { + switch (Main.GetPreferredBGStyleForPlayer()) + { + case 0: + return CaptureBiome.Styles.Purity; + case 1: + return CaptureBiome.Styles.Corruption; + case 2: + return CaptureBiome.Styles.Desert; + case 3: + return CaptureBiome.Styles.Jungle; + case 4: + return CaptureBiome.Styles.Ocean; + case 5: + return CaptureBiome.Styles.Desert; + case 6: + return CaptureBiome.Styles.Hallow; + case 7: + return CaptureBiome.Styles.Snow; + case 8: + return CaptureBiome.Styles.Crimson; + case 9: + return CaptureBiome.Styles.Mushroom; + case 10: + return CaptureBiome.Styles.Purity2; + case 11: + return CaptureBiome.Styles.Purity3; + case 12: + return CaptureBiome.Styles.Purity4; + default: + return (CaptureBiome) null; + } + } + + private static CaptureBiome GetPurityForPlayer() + { + int num = (int) Main.LocalPlayer.Center.X / 16; + if (num < Main.treeX[0]) + return CaptureBiome.Styles.Purity; + if (num < Main.treeX[1]) + return CaptureBiome.Styles.Purity2; + return num < Main.treeX[2] ? CaptureBiome.Styles.Purity3 : CaptureBiome.Styles.Purity4; + } + + public enum TileColorStyle + { + Normal, + Jungle, + Crimson, + Corrupt, + Mushroom, + } + + public class Sets + { + public class WaterStyles + { + public const int BloodMoon = 9; + } + } + + public class Styles + { + public static CaptureBiome Purity = new CaptureBiome(0, 0); + public static CaptureBiome Purity2 = new CaptureBiome(10, 0); + public static CaptureBiome Purity3 = new CaptureBiome(11, 0); + public static CaptureBiome Purity4 = new CaptureBiome(12, 0); + public static CaptureBiome Corruption = new CaptureBiome(1, 2, CaptureBiome.TileColorStyle.Corrupt); + public static CaptureBiome Jungle = new CaptureBiome(3, 3, CaptureBiome.TileColorStyle.Jungle); + public static CaptureBiome Hallow = new CaptureBiome(6, 4); + public static CaptureBiome Snow = new CaptureBiome(7, 5); + public static CaptureBiome Desert = new CaptureBiome(2, 6); + public static CaptureBiome DirtLayer = new CaptureBiome(0, 7); + public static CaptureBiome RockLayer = new CaptureBiome(0, 8); + public static CaptureBiome BloodMoon = new CaptureBiome(0, 9); + public static CaptureBiome Crimson = new CaptureBiome(8, 10, CaptureBiome.TileColorStyle.Crimson); + public static CaptureBiome UndergroundDesert = new CaptureBiome(2, 12); + public static CaptureBiome Ocean = new CaptureBiome(4, 0); + public static CaptureBiome Mushroom = new CaptureBiome(9, 7, CaptureBiome.TileColorStyle.Mushroom); + } + + private enum BiomeChoiceIndex + { + AutomatedForPlayer = -1, // 0xFFFFFFFF + Purity = 1, + Corruption = 2, + Jungle = 3, + Hallow = 4, + Snow = 5, + Desert = 6, + DirtLayer = 7, + RockLayer = 8, + BloodMoon = 9, + UndergroundDesert = 10, // 0x0000000A + Ocean = 11, // 0x0000000B + Mushroom = 12, // 0x0000000C + } + } +} diff --git a/Graphics/Capture/CaptureCamera.cs b/Graphics/Capture/CaptureCamera.cs new file mode 100644 index 0000000..b2d302c --- /dev/null +++ b/Graphics/Capture/CaptureCamera.cs @@ -0,0 +1,351 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Capture.CaptureCamera +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Imaging; +using System.IO; +using System.Runtime.InteropServices; +using System.Threading; +using Terraria.GameContent.Drawing; +using Terraria.Graphics.Effects; +using Terraria.Localization; + +namespace Terraria.Graphics.Capture +{ + internal class CaptureCamera + { + private static bool CameraExists; + public const int CHUNK_SIZE = 128; + public const int FRAMEBUFFER_PIXEL_SIZE = 2048; + public const int INNER_CHUNK_SIZE = 126; + public const int MAX_IMAGE_SIZE = 4096; + public const string CAPTURE_DIRECTORY = "Captures"; + private RenderTarget2D _frameBuffer; + private RenderTarget2D _scaledFrameBuffer; + private RenderTarget2D _filterFrameBuffer1; + private RenderTarget2D _filterFrameBuffer2; + private GraphicsDevice _graphics; + private readonly object _captureLock = new object(); + private bool _isDisposed; + private CaptureSettings _activeSettings; + private Queue _renderQueue = new Queue(); + private SpriteBatch _spriteBatch; + private byte[] _scaledFrameData; + private byte[] _outputData; + private Size _outputImageSize; + private SamplerState _downscaleSampleState; + private float _tilesProcessed; + private float _totalTiles; + + public bool IsCapturing + { + get + { + Monitor.Enter(this._captureLock); + int num = this._activeSettings != null ? 1 : 0; + Monitor.Exit(this._captureLock); + return num != 0; + } + } + + public CaptureCamera(GraphicsDevice graphics) + { + CaptureCamera.CameraExists = true; + this._graphics = graphics; + this._spriteBatch = new SpriteBatch(graphics); + try + { + this._frameBuffer = new RenderTarget2D(graphics, 2048, 2048, false, graphics.PresentationParameters.BackBufferFormat, DepthFormat.None); + this._filterFrameBuffer1 = new RenderTarget2D(graphics, 2048, 2048, false, graphics.PresentationParameters.BackBufferFormat, DepthFormat.None); + this._filterFrameBuffer2 = new RenderTarget2D(graphics, 2048, 2048, false, graphics.PresentationParameters.BackBufferFormat, DepthFormat.None); + } + catch + { + Main.CaptureModeDisabled = true; + return; + } + this._downscaleSampleState = SamplerState.AnisotropicClamp; + } + + ~CaptureCamera() => this.Dispose(); + + public void Capture(CaptureSettings settings) + { + Main.GlobalTimerPaused = true; + Monitor.Enter(this._captureLock); + this._activeSettings = this._activeSettings == null ? settings : throw new InvalidOperationException("Capture called while another capture was already active."); + Microsoft.Xna.Framework.Rectangle area = settings.Area; + float num1 = 1f; + if (settings.UseScaling) + { + if (area.Width * 16 > 4096) + num1 = 4096f / (float) (area.Width * 16); + if (area.Height * 16 > 4096) + num1 = Math.Min(num1, 4096f / (float) (area.Height * 16)); + num1 = Math.Min(1f, num1); + this._outputImageSize = new Size((int) MathHelper.Clamp((float) (int) ((double) num1 * (double) (area.Width * 16)), 1f, 4096f), (int) MathHelper.Clamp((float) (int) ((double) num1 * (double) (area.Height * 16)), 1f, 4096f)); + this._outputData = new byte[4 * this._outputImageSize.Width * this._outputImageSize.Height]; + int num2 = (int) Math.Floor((double) num1 * 2048.0); + this._scaledFrameData = new byte[4 * num2 * num2]; + this._scaledFrameBuffer = new RenderTarget2D(this._graphics, num2, num2, false, this._graphics.PresentationParameters.BackBufferFormat, DepthFormat.None); + } + else + this._outputData = new byte[16777216]; + this._tilesProcessed = 0.0f; + this._totalTiles = (float) (area.Width * area.Height); + for (int x1 = area.X; x1 < area.X + area.Width; x1 += 126) + { + for (int y1 = area.Y; y1 < area.Y + area.Height; y1 += 126) + { + int width1 = Math.Min(128, area.X + area.Width - x1); + int height1 = Math.Min(128, area.Y + area.Height - y1); + int width2 = (int) Math.Floor((double) num1 * (double) (width1 * 16)); + int height2 = (int) Math.Floor((double) num1 * (double) (height1 * 16)); + int x2 = (int) Math.Floor((double) num1 * (double) ((x1 - area.X) * 16)); + int y2 = (int) Math.Floor((double) num1 * (double) ((y1 - area.Y) * 16)); + this._renderQueue.Enqueue(new CaptureCamera.CaptureChunk(new Microsoft.Xna.Framework.Rectangle(x1, y1, width1, height1), new Microsoft.Xna.Framework.Rectangle(x2, y2, width2, height2))); + } + } + Monitor.Exit(this._captureLock); + } + + public void DrawTick() + { + Monitor.Enter(this._captureLock); + if (this._activeSettings == null) + return; + bool notRetro = Lighting.NotRetro; + if (this._renderQueue.Count > 0) + { + CaptureCamera.CaptureChunk captureChunk = this._renderQueue.Dequeue(); + this._graphics.SetRenderTarget((RenderTarget2D) null); + this._graphics.Clear(Microsoft.Xna.Framework.Color.Transparent); + TileDrawing tilesRenderer = Main.instance.TilesRenderer; + Microsoft.Xna.Framework.Rectangle area = captureChunk.Area; + int left = area.Left; + area = captureChunk.Area; + int right = area.Right; + area = captureChunk.Area; + int top = area.Top; + area = captureChunk.Area; + int bottom = area.Bottom; + tilesRenderer.PrepareForAreaDrawing(left, right, top, bottom, false); + Main.instance.TilePaintSystem.PrepareAllRequests(); + this._graphics.SetRenderTarget(this._frameBuffer); + this._graphics.Clear(Microsoft.Xna.Framework.Color.Transparent); + if (notRetro) + { + Microsoft.Xna.Framework.Color clearColor = this._activeSettings.CaptureBackground ? Microsoft.Xna.Framework.Color.Black : Microsoft.Xna.Framework.Color.Transparent; + Filters.Scene.BeginCapture(this._filterFrameBuffer1, clearColor); + Main.instance.DrawCapture(captureChunk.Area, this._activeSettings); + Filters.Scene.EndCapture(this._frameBuffer, this._filterFrameBuffer1, this._filterFrameBuffer2, clearColor); + } + else + Main.instance.DrawCapture(captureChunk.Area, this._activeSettings); + if (this._activeSettings.UseScaling) + { + this._graphics.SetRenderTarget(this._scaledFrameBuffer); + this._graphics.Clear(Microsoft.Xna.Framework.Color.Transparent); + this._spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, this._downscaleSampleState, DepthStencilState.Default, RasterizerState.CullNone); + this._spriteBatch.Draw((Texture2D) this._frameBuffer, new Microsoft.Xna.Framework.Rectangle(0, 0, this._scaledFrameBuffer.Width, this._scaledFrameBuffer.Height), Microsoft.Xna.Framework.Color.White); + this._spriteBatch.End(); + this._graphics.SetRenderTarget((RenderTarget2D) null); + this._scaledFrameBuffer.GetData(this._scaledFrameData, 0, this._scaledFrameBuffer.Width * this._scaledFrameBuffer.Height * 4); + this.DrawBytesToBuffer(this._scaledFrameData, this._outputData, this._scaledFrameBuffer.Width, this._outputImageSize.Width, captureChunk.ScaledArea); + } + else + { + this._graphics.SetRenderTarget((RenderTarget2D) null); + this.SaveImage((Texture2D) this._frameBuffer, captureChunk.ScaledArea.Width, captureChunk.ScaledArea.Height, ImageFormat.Png, this._activeSettings.OutputName, captureChunk.Area.X.ToString() + "-" + (object) captureChunk.Area.Y + ".png"); + } + this._tilesProcessed += (float) (captureChunk.Area.Width * captureChunk.Area.Height); + } + if (this._renderQueue.Count == 0) + this.FinishCapture(); + Monitor.Exit(this._captureLock); + } + + private unsafe void DrawBytesToBuffer( + byte[] sourceBuffer, + byte[] destinationBuffer, + int sourceBufferWidth, + int destinationBufferWidth, + Microsoft.Xna.Framework.Rectangle area) + { + fixed (byte* numPtr1 = &destinationBuffer[0]) + fixed (byte* numPtr2 = &sourceBuffer[0]) + { + byte* numPtr3 = numPtr2; + byte* numPtr4 = numPtr1 + (destinationBufferWidth * area.Y + area.X << 2); + for (int index1 = 0; index1 < area.Height; ++index1) + { + for (int index2 = 0; index2 < area.Width; ++index2) + { + numPtr4[2] = *numPtr3; + numPtr4[1] = numPtr3[1]; + *numPtr4 = numPtr3[2]; + numPtr4[3] = numPtr3[3]; + numPtr3 += 4; + numPtr4 += 4; + } + numPtr3 += sourceBufferWidth - area.Width << 2; + numPtr4 += destinationBufferWidth - area.Width << 2; + } + } + } + + public float GetProgress() => this._tilesProcessed / this._totalTiles; + + private bool SaveImage(int width, int height, ImageFormat imageFormat, string filename) + { + string savePath = Main.SavePath; + char directorySeparatorChar = Path.DirectorySeparatorChar; + string str1 = directorySeparatorChar.ToString(); + directorySeparatorChar = Path.DirectorySeparatorChar; + string str2 = directorySeparatorChar.ToString(); + if (!Utils.TryCreatingDirectory(savePath + str1 + "Captures" + str2)) + return false; + try + { + using (Bitmap bitmap = new Bitmap(width, height)) + { + System.Drawing.Rectangle rect = new System.Drawing.Rectangle(0, 0, width, height); + BitmapData bitmapdata = bitmap.LockBits(rect, ImageLockMode.WriteOnly, PixelFormat.Format32bppPArgb); + Marshal.Copy(this._outputData, 0, bitmapdata.Scan0, width * height * 4); + bitmap.UnlockBits(bitmapdata); + bitmap.Save(filename, imageFormat); + bitmap.Dispose(); + } + return true; + } + catch (Exception ex) + { + Console.WriteLine((object) ex); + return false; + } + } + + private void SaveImage( + Texture2D texture, + int width, + int height, + ImageFormat imageFormat, + string foldername, + string filename) + { + string str = Main.SavePath + Path.DirectorySeparatorChar.ToString() + "Captures" + Path.DirectorySeparatorChar.ToString() + foldername; + string filename1 = Path.Combine(str, filename); + if (!Utils.TryCreatingDirectory(str)) + return; + using (Bitmap bitmap = new Bitmap(width, height)) + { + System.Drawing.Rectangle rect = new System.Drawing.Rectangle(0, 0, width, height); + int elementCount = texture.Width * texture.Height * 4; + texture.GetData(this._outputData, 0, elementCount); + int index1 = 0; + int index2 = 0; + for (int index3 = 0; index3 < height; ++index3) + { + for (int index4 = 0; index4 < width; ++index4) + { + byte num = this._outputData[index1 + 2]; + this._outputData[index2 + 2] = this._outputData[index1]; + this._outputData[index2] = num; + this._outputData[index2 + 1] = this._outputData[index1 + 1]; + this._outputData[index2 + 3] = this._outputData[index1 + 3]; + index1 += 4; + index2 += 4; + } + index1 += texture.Width - width << 2; + } + BitmapData bitmapdata = bitmap.LockBits(rect, ImageLockMode.WriteOnly, PixelFormat.Format32bppPArgb); + Marshal.Copy(this._outputData, 0, bitmapdata.Scan0, width * height * 4); + bitmap.UnlockBits(bitmapdata); + bitmap.Save(filename1, imageFormat); + } + } + + private void FinishCapture() + { + if (this._activeSettings.UseScaling) + { + int num = 0; + do + { + int width = this._outputImageSize.Width; + int height = this._outputImageSize.Height; + ImageFormat png = ImageFormat.Png; + string[] strArray = new string[6]; + strArray[0] = Main.SavePath; + char directorySeparatorChar = Path.DirectorySeparatorChar; + strArray[1] = directorySeparatorChar.ToString(); + strArray[2] = "Captures"; + directorySeparatorChar = Path.DirectorySeparatorChar; + strArray[3] = directorySeparatorChar.ToString(); + strArray[4] = this._activeSettings.OutputName; + strArray[5] = ".png"; + string filename = string.Concat(strArray); + if (!this.SaveImage(width, height, png, filename)) + { + GC.Collect(); + Thread.Sleep(5); + ++num; + Console.WriteLine(Language.GetTextValue("Error.CaptureError")); + } + else + goto label_5; + } + while (num <= 5); + Console.WriteLine(Language.GetTextValue("Error.UnableToCapture")); + } +label_5: + this._outputData = (byte[]) null; + this._scaledFrameData = (byte[]) null; + Main.GlobalTimerPaused = false; + CaptureInterface.EndCamera(); + if (this._scaledFrameBuffer != null) + { + this._scaledFrameBuffer.Dispose(); + this._scaledFrameBuffer = (RenderTarget2D) null; + } + this._activeSettings = (CaptureSettings) null; + } + + public void Dispose() + { + Monitor.Enter(this._captureLock); + if (this._isDisposed) + return; + this._frameBuffer.Dispose(); + this._filterFrameBuffer1.Dispose(); + this._filterFrameBuffer2.Dispose(); + if (this._scaledFrameBuffer != null) + { + this._scaledFrameBuffer.Dispose(); + this._scaledFrameBuffer = (RenderTarget2D) null; + } + CaptureCamera.CameraExists = false; + this._isDisposed = true; + Monitor.Exit(this._captureLock); + } + + private class CaptureChunk + { + public readonly Microsoft.Xna.Framework.Rectangle Area; + public readonly Microsoft.Xna.Framework.Rectangle ScaledArea; + + public CaptureChunk(Microsoft.Xna.Framework.Rectangle area, Microsoft.Xna.Framework.Rectangle scaledArea) + { + this.Area = area; + this.ScaledArea = scaledArea; + } + } + } +} diff --git a/Graphics/Capture/CaptureInterface.cs b/Graphics/Capture/CaptureInterface.cs new file mode 100644 index 0000000..b661cb7 --- /dev/null +++ b/Graphics/Capture/CaptureInterface.cs @@ -0,0 +1,1360 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Capture.CaptureInterface +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Input; +using System; +using System.Collections.Generic; +using System.IO; +using Terraria.Audio; +using Terraria.GameContent; +using Terraria.GameContent.UI; +using Terraria.GameInput; +using Terraria.UI.Chat; + +namespace Terraria.Graphics.Capture +{ + public class CaptureInterface + { + private static Dictionary Modes = CaptureInterface.FillModes(); + public bool Active; + public static bool JustActivated; + private const Keys KeyToggleActive = Keys.F1; + private bool KeyToggleActiveHeld; + public int SelectedMode; + public int HoveredMode; + public static bool EdgeAPinned; + public static bool EdgeBPinned; + public static Point EdgeA; + public static Point EdgeB; + public static bool CameraLock; + private static float CameraFrame; + private static float CameraWaiting; + private const float CameraMaxFrame = 5f; + private const float CameraMaxWait = 60f; + private static CaptureSettings CameraSettings; + + private static Dictionary FillModes() => new Dictionary() + { + { + 0, + (CaptureInterface.CaptureInterfaceMode) new CaptureInterface.ModeEdgeSelection() + }, + { + 1, + (CaptureInterface.CaptureInterfaceMode) new CaptureInterface.ModeDragBounds() + }, + { + 2, + (CaptureInterface.CaptureInterfaceMode) new CaptureInterface.ModeChangeSettings() + } + }; + + public static Rectangle GetArea() + { + int x = Math.Min(CaptureInterface.EdgeA.X, CaptureInterface.EdgeB.X); + int num1 = Math.Min(CaptureInterface.EdgeA.Y, CaptureInterface.EdgeB.Y); + int num2 = Math.Abs(CaptureInterface.EdgeA.X - CaptureInterface.EdgeB.X); + int num3 = Math.Abs(CaptureInterface.EdgeA.Y - CaptureInterface.EdgeB.Y); + int y = num1; + int width = num2 + 1; + int height = num3 + 1; + return new Rectangle(x, y, width, height); + } + + public void Update() + { + PlayerInput.SetZoom_UI(); + this.UpdateCamera(); + if (CaptureInterface.CameraLock) + return; + bool flag = Main.keyState.IsKeyDown(Keys.F1); + if (flag && !this.KeyToggleActiveHeld && (Main.mouseItem.type == 0 || this.Active) && !Main.CaptureModeDisabled && !Main.player[Main.myPlayer].dead && !Main.player[Main.myPlayer].ghost) + this.ToggleCamera(!this.Active); + this.KeyToggleActiveHeld = flag; + if (!this.Active) + return; + Main.blockMouse = true; + if (CaptureInterface.JustActivated && Main.mouseLeftRelease && !Main.mouseLeft) + CaptureInterface.JustActivated = false; + if (this.UpdateButtons(new Vector2((float) Main.mouseX, (float) Main.mouseY)) && Main.mouseLeft) + return; + foreach (KeyValuePair mode in CaptureInterface.Modes) + { + mode.Value.Selected = mode.Key == this.SelectedMode; + mode.Value.Update(); + } + PlayerInput.SetZoom_Unscaled(); + } + + public void Draw(SpriteBatch sb) + { + if (!this.Active) + return; + sb.End(); + sb.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, Main.UIScaleMatrix); + PlayerInput.SetZoom_UI(); + foreach (CaptureInterface.CaptureInterfaceMode captureInterfaceMode in CaptureInterface.Modes.Values) + captureInterfaceMode.Draw(sb); + sb.End(); + sb.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, Main.UIScaleMatrix); + PlayerInput.SetZoom_UI(); + Main.mouseText = false; + Main.instance.GUIBarsDraw(); + this.DrawButtons(sb); + Main.instance.DrawMouseOver(); + Utils.DrawBorderStringBig(sb, Lang.inter[81].Value, new Vector2((float) Main.screenWidth * 0.5f, 100f), Color.White, anchorx: 0.5f, anchory: 0.5f); + Utils.DrawCursorSingle(sb, Main.cursorColor, scale: Main.cursorScale); + this.DrawCameraLock(sb); + sb.End(); + sb.Begin(); + } + + public void ToggleCamera(bool On = true) + { + if (CaptureInterface.CameraLock) + return; + bool active = this.Active; + this.Active = CaptureInterface.Modes.ContainsKey(this.SelectedMode) & On; + if (active != this.Active) + SoundEngine.PlaySound(On ? 10 : 11); + foreach (KeyValuePair mode in CaptureInterface.Modes) + mode.Value.ToggleActive(this.Active && mode.Key == this.SelectedMode); + if (!On || active) + return; + CaptureInterface.JustActivated = true; + } + + private bool UpdateButtons(Vector2 mouse) + { + this.HoveredMode = -1; + bool flag1 = !Main.graphics.IsFullScreen; + int num1 = 9; + for (int index = 0; index < num1; ++index) + { + if (new Rectangle(24 + 46 * index, 24, 42, 42).Contains(mouse.ToPoint())) + { + this.HoveredMode = index; + bool flag2 = Main.mouseLeft && Main.mouseLeftRelease; + int num2 = 0; + int num3 = index; + int num4 = num2; + int num5 = num4 + 1; + if (num3 == num4 && flag2) + CaptureInterface.QuickScreenshot(); + int num6 = index; + int num7 = num5; + int num8 = num7 + 1; + if (num6 == num7 && flag2 && CaptureInterface.EdgeAPinned && CaptureInterface.EdgeBPinned) + CaptureInterface.StartCamera(new CaptureSettings() + { + Area = CaptureInterface.GetArea(), + Biome = CaptureBiome.GetCaptureBiome(CaptureInterface.Settings.BiomeChoiceIndex), + CaptureBackground = !CaptureInterface.Settings.TransparentBackground, + CaptureEntities = CaptureInterface.Settings.IncludeEntities, + UseScaling = CaptureInterface.Settings.PackImage, + CaptureMech = WiresUI.Settings.DrawWires + }); + int num9 = index; + int num10 = num8; + int num11 = num10 + 1; + if (num9 == num10 && flag2 && this.SelectedMode != 0) + { + SoundEngine.PlaySound(12); + this.SelectedMode = 0; + this.ToggleCamera(); + } + int num12 = index; + int num13 = num11; + int num14 = num13 + 1; + if (num12 == num13 && flag2 && this.SelectedMode != 1) + { + SoundEngine.PlaySound(12); + this.SelectedMode = 1; + this.ToggleCamera(); + } + int num15 = index; + int num16 = num14; + int num17 = num16 + 1; + if (num15 == num16 && flag2) + { + SoundEngine.PlaySound(12); + CaptureInterface.ResetFocus(); + } + int num18 = index; + int num19 = num17; + int num20 = num19 + 1; + if (num18 == num19 && flag2 && Main.mapEnabled) + { + SoundEngine.PlaySound(12); + Main.mapFullscreen = !Main.mapFullscreen; + } + int num21 = index; + int num22 = num20; + int num23 = num22 + 1; + if (num21 == num22 && flag2 && this.SelectedMode != 2) + { + SoundEngine.PlaySound(12); + this.SelectedMode = 2; + this.ToggleCamera(); + } + int num24 = index; + int num25 = num23; + int num26 = num25 + 1; + if (num24 == num25 && flag2 & flag1) + { + SoundEngine.PlaySound(12); + Utils.OpenFolder(Path.Combine(Main.SavePath, "Captures")); + } + int num27 = index; + int num28 = num26; + int num29 = num28 + 1; + if (num27 == num28 && flag2) + { + this.ToggleCamera(false); + Main.blockMouse = true; + Main.mouseLeftRelease = false; + } + return true; + } + } + return false; + } + + public static void QuickScreenshot() + { + Point tileCoordinates1 = Main.ViewPosition.ToTileCoordinates(); + Point tileCoordinates2 = (Main.ViewPosition + Main.ViewSize).ToTileCoordinates(); + CaptureInterface.StartCamera(new CaptureSettings() + { + Area = new Rectangle(tileCoordinates1.X, tileCoordinates1.Y, tileCoordinates2.X - tileCoordinates1.X + 1, tileCoordinates2.Y - tileCoordinates1.Y + 1), + Biome = CaptureBiome.GetCaptureBiome(CaptureInterface.Settings.BiomeChoiceIndex), + CaptureBackground = !CaptureInterface.Settings.TransparentBackground, + CaptureEntities = CaptureInterface.Settings.IncludeEntities, + UseScaling = CaptureInterface.Settings.PackImage, + CaptureMech = WiresUI.Settings.DrawWires + }); + } + + private void DrawButtons(SpriteBatch sb) + { + Vector2 vector2 = new Vector2((float) Main.mouseX, (float) Main.mouseY); + int num = 9; + for (int index = 0; index < num; ++index) + { + Texture2D texture2D = TextureAssets.InventoryBack.Value; + float scale = 0.8f; + Vector2 position = new Vector2((float) (24 + 46 * index), 24f); + Color color = Main.inventoryBack * 0.8f; + if (this.SelectedMode == 0 && index == 2) + texture2D = TextureAssets.InventoryBack14.Value; + else if (this.SelectedMode == 1 && index == 3) + texture2D = TextureAssets.InventoryBack14.Value; + else if (this.SelectedMode == 2 && index == 6) + texture2D = TextureAssets.InventoryBack14.Value; + else if (index >= 2 && index <= 3) + texture2D = TextureAssets.InventoryBack2.Value; + sb.Draw(texture2D, position, new Rectangle?(), color, 0.0f, new Vector2(), scale, SpriteEffects.None, 0.0f); + switch (index) + { + case 0: + texture2D = TextureAssets.Camera[7].Value; + break; + case 1: + texture2D = TextureAssets.Camera[0].Value; + break; + case 2: + case 3: + case 4: + texture2D = TextureAssets.Camera[index].Value; + break; + case 5: + texture2D = Main.mapFullscreen ? TextureAssets.MapIcon[0].Value : TextureAssets.MapIcon[4].Value; + break; + case 6: + texture2D = TextureAssets.Camera[1].Value; + break; + case 7: + texture2D = TextureAssets.Camera[6].Value; + break; + case 8: + texture2D = TextureAssets.Camera[5].Value; + break; + } + sb.Draw(texture2D, position + new Vector2(26f) * scale, new Rectangle?(), Color.White, 0.0f, texture2D.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + bool flag = false; + if (index != 1) + { + if (index != 5) + { + if (index == 7 && Main.graphics.IsFullScreen) + flag = true; + } + else if (!Main.mapEnabled) + flag = true; + } + else if (!CaptureInterface.EdgeAPinned || !CaptureInterface.EdgeBPinned) + flag = true; + if (flag) + sb.Draw(TextureAssets.Cd.Value, position + new Vector2(26f) * scale, new Rectangle?(), Color.White * 0.65f, 0.0f, TextureAssets.Cd.Value.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + } + string cursorText = ""; + switch (this.HoveredMode) + { + case -1: + switch (this.HoveredMode) + { + case 1: + if (!CaptureInterface.EdgeAPinned || !CaptureInterface.EdgeBPinned) + { + cursorText = cursorText + "\n" + Lang.inter[112].Value; + break; + } + break; + case 5: + if (!Main.mapEnabled) + { + cursorText = cursorText + "\n" + Lang.inter[114].Value; + break; + } + break; + case 7: + if (Main.graphics.IsFullScreen) + { + cursorText = cursorText + "\n" + Lang.inter[113].Value; + break; + } + break; + } + if (!(cursorText != "")) + break; + Main.instance.MouseText(cursorText); + break; + case 0: + cursorText = Lang.inter[111].Value; + goto case -1; + case 1: + cursorText = Lang.inter[67].Value; + goto case -1; + case 2: + cursorText = Lang.inter[69].Value; + goto case -1; + case 3: + cursorText = Lang.inter[70].Value; + goto case -1; + case 4: + cursorText = Lang.inter[78].Value; + goto case -1; + case 5: + cursorText = Main.mapFullscreen ? Lang.inter[109].Value : Lang.inter[108].Value; + goto case -1; + case 6: + cursorText = Lang.inter[68].Value; + goto case -1; + case 7: + cursorText = Lang.inter[110].Value; + goto case -1; + case 8: + cursorText = Lang.inter[71].Value; + goto case -1; + default: + cursorText = "???"; + goto case -1; + } + } + + private static bool GetMapCoords(int PinX, int PinY, int Goal, out Point result) + { + if (!Main.mapFullscreen) + { + result = new Point(-1, -1); + return false; + } + float num1 = 0.0f; + float num2 = 0.0f; + float num3 = 2f; + int num4 = Main.maxTilesX / Main.textureMaxWidth; + int num5 = Main.maxTilesY / Main.textureMaxHeight; + float num6 = 10f; + float num7 = 10f; + float num8 = (float) (Main.maxTilesX - 10); + float num9 = (float) (Main.maxTilesY - 10); + num1 = 200f; + num2 = 300f; + num3 = Main.mapFullscreenScale; + float num10 = (float) ((double) Main.screenWidth / (double) Main.maxTilesX * 0.800000011920929); + if ((double) Main.mapFullscreenScale < (double) num10) + Main.mapFullscreenScale = num10; + if ((double) Main.mapFullscreenScale > 16.0) + Main.mapFullscreenScale = 16f; + float mapFullscreenScale = Main.mapFullscreenScale; + if ((double) Main.mapFullscreenPos.X < (double) num6) + Main.mapFullscreenPos.X = num6; + if ((double) Main.mapFullscreenPos.X > (double) num8) + Main.mapFullscreenPos.X = num8; + if ((double) Main.mapFullscreenPos.Y < (double) num7) + Main.mapFullscreenPos.Y = num7; + if ((double) Main.mapFullscreenPos.Y > (double) num9) + Main.mapFullscreenPos.Y = num9; + double x1 = (double) Main.mapFullscreenPos.X; + float y1 = Main.mapFullscreenPos.Y; + double num11 = (double) mapFullscreenScale; + double num12 = x1 * num11; + float num13 = y1 * mapFullscreenScale; + float num14 = (float) -num12 + (float) (Main.screenWidth / 2); + float num15 = -num13 + (float) (Main.screenHeight / 2); + float x2 = num14 + num6 * mapFullscreenScale; + float y2 = num15 + num7 * mapFullscreenScale; + float num16 = (float) (Main.maxTilesX / 840) * Main.mapFullscreenScale; + float num17 = x2; + float num18 = y2; + float num19 = (float) TextureAssets.Map.Width(); + float num20 = (float) TextureAssets.Map.Height(); + float num21; + float num22; + float num23; + float num24; + switch (Main.maxTilesX) + { + case 4200: + float num25 = num16 * 0.998f; + num21 = num17 - 37.3f * num25; + num22 = num18 - 1.7f * num25; + num23 = (num19 - 16f) * num25; + num24 = (num20 - 8.31f) * num25; + break; + case 6300: + float num26 = num16 * 1.09f; + num21 = num17 - 39.8f * num26; + num22 = y2 - 4.08f * num26; + num23 = (num19 - 26.69f) * num26; + float num27 = (num20 - 6.92f) * num26; + if ((double) num26 < 1.2) + { + num24 = num27 + 2f; + break; + } + break; + case 6400: + float num28 = num16 * 1.09f; + num21 = num17 - 38.8f * num28; + num22 = y2 - 3.85f * num28; + num23 = (num19 - 13.6f) * num28; + float num29 = (num20 - 6.92f) * num28; + if ((double) num28 < 1.2) + { + num24 = num29 + 2f; + break; + } + break; + case 8400: + float num30 = num16 * 0.999f; + num21 = num17 - 40.6f * num30; + num22 = y2 - 5f * num30; + num23 = (num19 - 8.045f) * num30; + float num31 = (num20 + 0.12f) * num30; + if ((double) num30 < 1.2) + { + num24 = num31 + 1f; + break; + } + break; + } + switch (Goal) + { + case 0: + int x3 = (int) ((-(double) x2 + (double) PinX) / (double) mapFullscreenScale + (double) num6); + int y3 = (int) ((-(double) y2 + (double) PinY) / (double) mapFullscreenScale + (double) num7); + bool flag = false; + if ((double) x3 < (double) num6) + flag = true; + if ((double) x3 >= (double) num8) + flag = true; + if ((double) y3 < (double) num7) + flag = true; + if ((double) y3 >= (double) num9) + flag = true; + if (!flag) + { + result = new Point(x3, y3); + return true; + } + result = new Point(-1, -1); + return false; + case 1: + Vector2 vector2_1 = new Vector2(x2, y2); + Vector2 vector2_2 = new Vector2((float) PinX, (float) PinY) * mapFullscreenScale - new Vector2(10f * mapFullscreenScale); + result = (vector2_1 + vector2_2).ToPoint(); + return true; + default: + result = new Point(-1, -1); + return false; + } + } + + private static void ConstraintPoints() + { + int offScreenTiles = Lighting.OffScreenTiles; + if (CaptureInterface.EdgeAPinned) + CaptureInterface.PointWorldClamp(ref CaptureInterface.EdgeA, offScreenTiles); + if (!CaptureInterface.EdgeBPinned) + return; + CaptureInterface.PointWorldClamp(ref CaptureInterface.EdgeB, offScreenTiles); + } + + private static void PointWorldClamp(ref Point point, int fluff) + { + if (point.X < fluff) + point.X = fluff; + if (point.X > Main.maxTilesX - 1 - fluff) + point.X = Main.maxTilesX - 1 - fluff; + if (point.Y < fluff) + point.Y = fluff; + if (point.Y <= Main.maxTilesY - 1 - fluff) + return; + point.Y = Main.maxTilesY - 1 - fluff; + } + + public bool UsingMap() => CaptureInterface.CameraLock || CaptureInterface.Modes[this.SelectedMode].UsingMap(); + + public static void ResetFocus() + { + CaptureInterface.EdgeAPinned = false; + CaptureInterface.EdgeBPinned = false; + CaptureInterface.EdgeA = new Point(-1, -1); + CaptureInterface.EdgeB = new Point(-1, -1); + } + + public void Scrolling() + { + int num = PlayerInput.ScrollWheelDelta / 120 % 30; + if (num < 0) + num += 30; + int selectedMode = this.SelectedMode; + this.SelectedMode -= num; + while (this.SelectedMode < 0) + this.SelectedMode += 2; + while (this.SelectedMode > 2) + this.SelectedMode -= 2; + if (this.SelectedMode == selectedMode) + return; + SoundEngine.PlaySound(12); + } + + private void UpdateCamera() + { + if (CaptureInterface.CameraLock && (double) CaptureInterface.CameraFrame == 4.0) + CaptureManager.Instance.Capture(CaptureInterface.CameraSettings); + CaptureInterface.CameraFrame += (float) CaptureInterface.CameraLock.ToDirectionInt(); + if ((double) CaptureInterface.CameraFrame < 0.0) + CaptureInterface.CameraFrame = 0.0f; + if ((double) CaptureInterface.CameraFrame > 5.0) + CaptureInterface.CameraFrame = 5f; + if ((double) CaptureInterface.CameraFrame == 5.0) + ++CaptureInterface.CameraWaiting; + if ((double) CaptureInterface.CameraWaiting <= 60.0) + return; + CaptureInterface.CameraWaiting = 60f; + } + + private void DrawCameraLock(SpriteBatch sb) + { + if ((double) CaptureInterface.CameraFrame == 0.0) + return; + sb.Draw(TextureAssets.MagicPixel.Value, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), new Rectangle?(new Rectangle(0, 0, 1, 1)), Color.Black * (CaptureInterface.CameraFrame / 5f)); + if ((double) CaptureInterface.CameraFrame != 5.0) + return; + float num1 = (float) ((double) CaptureInterface.CameraWaiting - 60.0 + 5.0); + if ((double) num1 <= 0.0) + return; + float num2 = num1 / 5f; + float num3 = CaptureManager.Instance.GetProgress() * 100f; + if ((double) num3 > 100.0) + num3 = 100f; + string text1 = num3.ToString("##") + " "; + string text2 = "/ 100%"; + Vector2 vector2_1 = FontAssets.DeathText.Value.MeasureString(text1); + Vector2 vector2_2 = FontAssets.DeathText.Value.MeasureString(text2); + Vector2 vector2_3 = new Vector2(-vector2_1.X, (float) (-(double) vector2_1.Y / 2.0)); + Vector2 vector2_4 = new Vector2(0.0f, (float) (-(double) vector2_2.Y / 2.0)); + ChatManager.DrawColorCodedStringWithShadow(sb, FontAssets.DeathText.Value, text1, new Vector2((float) Main.screenWidth, (float) Main.screenHeight) / 2f + vector2_3, Color.White * num2, 0.0f, Vector2.Zero, Vector2.One); + ChatManager.DrawColorCodedStringWithShadow(sb, FontAssets.DeathText.Value, text2, new Vector2((float) Main.screenWidth, (float) Main.screenHeight) / 2f + vector2_4, Color.White * num2, 0.0f, Vector2.Zero, Vector2.One); + } + + public static void StartCamera(CaptureSettings settings) + { + SoundEngine.PlaySound(40); + CaptureInterface.CameraSettings = settings; + CaptureInterface.CameraLock = true; + CaptureInterface.CameraWaiting = 0.0f; + } + + public static void EndCamera() => CaptureInterface.CameraLock = false; + + public static class Settings + { + public static bool PackImage = true; + public static bool IncludeEntities = true; + public static bool TransparentBackground; + public static int BiomeChoiceIndex = -1; + public static int ScreenAnchor = 0; + public static Color MarkedAreaColor = new Color(0.8f, 0.8f, 0.8f, 0.0f) * 0.3f; + } + + private abstract class CaptureInterfaceMode + { + public bool Selected; + + public abstract void Update(); + + public abstract void Draw(SpriteBatch sb); + + public abstract void ToggleActive(bool tickedOn); + + public abstract bool UsingMap(); + } + + private class ModeEdgeSelection : CaptureInterface.CaptureInterfaceMode + { + public override void Update() + { + if (!this.Selected) + return; + PlayerInput.SetZoom_Context(); + this.EdgePlacement(new Vector2((float) Main.mouseX, (float) Main.mouseY)); + } + + public override void Draw(SpriteBatch sb) + { + if (!this.Selected) + return; + sb.End(); + sb.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, Main.CurrentWantedZoomMatrix); + PlayerInput.SetZoom_Context(); + this.DrawMarkedArea(sb); + this.DrawCursors(sb); + sb.End(); + sb.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, Main.UIScaleMatrix); + PlayerInput.SetZoom_UI(); + } + + public override void ToggleActive(bool tickedOn) + { + } + + public override bool UsingMap() => true; + + private void EdgePlacement(Vector2 mouse) + { + if (CaptureInterface.JustActivated) + return; + if (!Main.mapFullscreen) + { + if (Main.mouseLeft) + { + CaptureInterface.EdgeAPinned = true; + CaptureInterface.EdgeA = Main.MouseWorld.ToTileCoordinates(); + } + if (Main.mouseRight) + { + CaptureInterface.EdgeBPinned = true; + CaptureInterface.EdgeB = Main.MouseWorld.ToTileCoordinates(); + } + } + else + { + Point result; + if (CaptureInterface.GetMapCoords((int) mouse.X, (int) mouse.Y, 0, out result)) + { + if (Main.mouseLeft) + { + CaptureInterface.EdgeAPinned = true; + CaptureInterface.EdgeA = result; + } + if (Main.mouseRight) + { + CaptureInterface.EdgeBPinned = true; + CaptureInterface.EdgeB = result; + } + } + } + CaptureInterface.ConstraintPoints(); + } + + private void DrawMarkedArea(SpriteBatch sb) + { + if (!CaptureInterface.EdgeAPinned || !CaptureInterface.EdgeBPinned) + return; + int PinX = Math.Min(CaptureInterface.EdgeA.X, CaptureInterface.EdgeB.X); + int PinY = Math.Min(CaptureInterface.EdgeA.Y, CaptureInterface.EdgeB.Y); + int num1 = Math.Abs(CaptureInterface.EdgeA.X - CaptureInterface.EdgeB.X); + int num2 = Math.Abs(CaptureInterface.EdgeA.Y - CaptureInterface.EdgeB.Y); + if (!Main.mapFullscreen) + { + Rectangle rectangle1 = Main.ReverseGravitySupport(new Rectangle(PinX * 16, PinY * 16, (num1 + 1) * 16, (num2 + 1) * 16)); + Rectangle rectangle2 = Main.ReverseGravitySupport(new Rectangle((int) Main.screenPosition.X, (int) Main.screenPosition.Y, Main.screenWidth + 1, Main.screenHeight + 1)); + Rectangle result; + Rectangle.Intersect(ref rectangle2, ref rectangle1, out result); + if (result.Width == 0 || result.Height == 0) + return; + result.Offset(-rectangle2.X, -rectangle2.Y); + sb.Draw(TextureAssets.MagicPixel.Value, result, CaptureInterface.Settings.MarkedAreaColor); + for (int index = 0; index < 2; ++index) + { + sb.Draw(TextureAssets.MagicPixel.Value, new Rectangle(result.X, result.Y + (index == 1 ? result.Height : -2), result.Width, 2), Color.White); + sb.Draw(TextureAssets.MagicPixel.Value, new Rectangle(result.X + (index == 1 ? result.Width : -2), result.Y, 2, result.Height), Color.White); + } + } + else + { + Point result1; + CaptureInterface.GetMapCoords(PinX, PinY, 1, out result1); + Point result2; + CaptureInterface.GetMapCoords(PinX + num1 + 1, PinY + num2 + 1, 1, out result2); + Rectangle rectangle3 = new Rectangle(result1.X, result1.Y, result2.X - result1.X, result2.Y - result1.Y); + Rectangle rectangle4 = new Rectangle(0, 0, Main.screenWidth + 1, Main.screenHeight + 1); + Rectangle result3; + Rectangle.Intersect(ref rectangle4, ref rectangle3, out result3); + if (result3.Width == 0 || result3.Height == 0) + return; + result3.Offset(-rectangle4.X, -rectangle4.Y); + sb.Draw(TextureAssets.MagicPixel.Value, result3, CaptureInterface.Settings.MarkedAreaColor); + for (int index = 0; index < 2; ++index) + { + sb.Draw(TextureAssets.MagicPixel.Value, new Rectangle(result3.X, result3.Y + (index == 1 ? result3.Height : -2), result3.Width, 2), Color.White); + sb.Draw(TextureAssets.MagicPixel.Value, new Rectangle(result3.X + (index == 1 ? result3.Width : -2), result3.Y, 2, result3.Height), Color.White); + } + } + } + + private void DrawCursors(SpriteBatch sb) + { + float num1 = 1f / Main.cursorScale; + float num2 = 0.8f / num1; + Vector2 min = Main.screenPosition + new Vector2(30f); + Vector2 max = min + new Vector2((float) Main.screenWidth, (float) Main.screenHeight) - new Vector2(60f); + if (Main.mapFullscreen) + { + min -= Main.screenPosition; + max -= Main.screenPosition; + } + Vector3 hsl = Main.rgbToHsl(Main.cursorColor); + Main.hslToRgb((float) (((double) hsl.X + 0.330000013113022) % 1.0), hsl.Y, hsl.Z); + Main.hslToRgb((float) (((double) hsl.X - 0.330000013113022) % 1.0), hsl.Y, hsl.Z); + Color white; + Color color = white = Color.White; + bool flag = (double) Main.player[Main.myPlayer].gravDir == -1.0; + if (!CaptureInterface.EdgeAPinned) + { + Utils.DrawCursorSingle(sb, color, 3.926991f, Main.cursorScale * num1 * num2, new Vector2((float) ((double) Main.mouseX - 5.0 + 12.0), (float) ((double) Main.mouseY + 2.5 + 12.0)), 4); + } + else + { + int specialMode = 0; + float num3 = 0.0f; + Vector2 vector2_1 = Vector2.Zero; + if (!Main.mapFullscreen) + { + Vector2 vector2_2 = CaptureInterface.EdgeA.ToVector2() * 16f; + float num4; + Vector2 vector2_3; + if (!CaptureInterface.EdgeBPinned) + { + specialMode = 1; + Vector2 vector2_4 = vector2_2 + Vector2.One * 8f; + vector2_1 = vector2_4; + num4 = (-vector2_4 + Main.ReverseGravitySupport(new Vector2((float) Main.mouseX, (float) Main.mouseY)) + Main.screenPosition).ToRotation(); + if (flag) + num4 = -num4; + vector2_3 = Vector2.Clamp(vector2_4, min, max); + if (vector2_3 != vector2_4) + num4 = (vector2_4 - vector2_3).ToRotation(); + } + else + { + Vector2 vector2_5 = new Vector2((float) ((CaptureInterface.EdgeA.X > CaptureInterface.EdgeB.X).ToInt() * 16), (float) ((CaptureInterface.EdgeA.Y > CaptureInterface.EdgeB.Y).ToInt() * 16)); + Vector2 vector2_6 = vector2_2 + vector2_5; + vector2_3 = Vector2.Clamp(vector2_6, min, max); + num4 = (CaptureInterface.EdgeB.ToVector2() * 16f + new Vector2(16f) - vector2_5 - vector2_3).ToRotation(); + if (vector2_3 != vector2_6) + { + num4 = (vector2_6 - vector2_3).ToRotation(); + specialMode = 1; + } + if (flag) + num4 *= -1f; + } + Utils.DrawCursorSingle(sb, color, num4 - 1.570796f, Main.cursorScale * num1, Main.ReverseGravitySupport(vector2_3 - Main.screenPosition), 4, specialMode); + } + else + { + Point result1 = CaptureInterface.EdgeA; + if (CaptureInterface.EdgeBPinned) + { + int num5 = (CaptureInterface.EdgeA.X > CaptureInterface.EdgeB.X).ToInt(); + int num6 = (CaptureInterface.EdgeA.Y > CaptureInterface.EdgeB.Y).ToInt(); + result1.X += num5; + result1.Y += num6; + CaptureInterface.GetMapCoords(result1.X, result1.Y, 1, out result1); + Point result2 = CaptureInterface.EdgeB; + result2.X += 1 - num5; + result2.Y += 1 - num6; + CaptureInterface.GetMapCoords(result2.X, result2.Y, 1, out result2); + Vector2 vector2_7 = Vector2.Clamp(result1.ToVector2(), min, max); + num3 = (result2.ToVector2() - vector2_7).ToRotation(); + } + else + CaptureInterface.GetMapCoords(result1.X, result1.Y, 1, out result1); + Utils.DrawCursorSingle(sb, color, num3 - 1.570796f, Main.cursorScale * num1, result1.ToVector2(), 4); + } + } + if (!CaptureInterface.EdgeBPinned) + { + Utils.DrawCursorSingle(sb, white, 0.7853981f, Main.cursorScale * num1 * num2, new Vector2((float) ((double) Main.mouseX + 2.5 + 12.0), (float) ((double) Main.mouseY - 5.0 + 12.0)), 5); + } + else + { + int specialMode = 0; + float num7 = 0.0f; + Vector2 vector2_8 = Vector2.Zero; + if (!Main.mapFullscreen) + { + Vector2 vector2_9 = CaptureInterface.EdgeB.ToVector2() * 16f; + float num8; + Vector2 vector2_10; + if (!CaptureInterface.EdgeAPinned) + { + specialMode = 1; + Vector2 vector2_11 = vector2_9 + Vector2.One * 8f; + vector2_8 = vector2_11; + num8 = (-vector2_11 + Main.ReverseGravitySupport(new Vector2((float) Main.mouseX, (float) Main.mouseY)) + Main.screenPosition).ToRotation(); + if (flag) + num8 = -num8; + vector2_10 = Vector2.Clamp(vector2_11, min, max); + if (vector2_10 != vector2_11) + num8 = (vector2_11 - vector2_10).ToRotation(); + } + else + { + Vector2 vector2_12 = new Vector2((float) ((CaptureInterface.EdgeB.X >= CaptureInterface.EdgeA.X).ToInt() * 16), (float) ((CaptureInterface.EdgeB.Y >= CaptureInterface.EdgeA.Y).ToInt() * 16)); + Vector2 vector2_13 = vector2_9 + vector2_12; + vector2_10 = Vector2.Clamp(vector2_13, min, max); + num8 = (CaptureInterface.EdgeA.ToVector2() * 16f + new Vector2(16f) - vector2_12 - vector2_10).ToRotation(); + if (vector2_10 != vector2_13) + { + num8 = (vector2_13 - vector2_10).ToRotation(); + specialMode = 1; + } + if (flag) + num8 *= -1f; + } + Utils.DrawCursorSingle(sb, white, num8 - 1.570796f, Main.cursorScale * num1, Main.ReverseGravitySupport(vector2_10 - Main.screenPosition), 5, specialMode); + } + else + { + Point result3 = CaptureInterface.EdgeB; + if (CaptureInterface.EdgeAPinned) + { + int num9 = (CaptureInterface.EdgeB.X >= CaptureInterface.EdgeA.X).ToInt(); + int num10 = (CaptureInterface.EdgeB.Y >= CaptureInterface.EdgeA.Y).ToInt(); + result3.X += num9; + result3.Y += num10; + CaptureInterface.GetMapCoords(result3.X, result3.Y, 1, out result3); + Point result4 = CaptureInterface.EdgeA; + result4.X += 1 - num9; + result4.Y += 1 - num10; + CaptureInterface.GetMapCoords(result4.X, result4.Y, 1, out result4); + Vector2 vector2_14 = Vector2.Clamp(result3.ToVector2(), min, max); + num7 = (result4.ToVector2() - vector2_14).ToRotation(); + } + else + CaptureInterface.GetMapCoords(result3.X, result3.Y, 1, out result3); + Utils.DrawCursorSingle(sb, white, num7 - 1.570796f, Main.cursorScale * num1, result3.ToVector2(), 5); + } + } + } + } + + private class ModeDragBounds : CaptureInterface.CaptureInterfaceMode + { + public int currentAim = -1; + private bool dragging; + private int caughtEdge = -1; + private bool inMap; + + public override void Update() + { + if (!this.Selected || CaptureInterface.JustActivated) + return; + PlayerInput.SetZoom_Context(); + this.DragBounds(new Vector2((float) Main.mouseX, (float) Main.mouseY)); + } + + public override void Draw(SpriteBatch sb) + { + if (!this.Selected) + return; + sb.End(); + sb.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, Main.CurrentWantedZoomMatrix); + PlayerInput.SetZoom_Context(); + this.DrawMarkedArea(sb); + sb.End(); + sb.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, Main.UIScaleMatrix); + PlayerInput.SetZoom_UI(); + } + + public override void ToggleActive(bool tickedOn) + { + if (tickedOn) + return; + this.currentAim = -1; + } + + public override bool UsingMap() => this.caughtEdge != -1; + + private void DragBounds(Vector2 mouse) + { + if (!CaptureInterface.EdgeAPinned || !CaptureInterface.EdgeBPinned) + { + bool flag1 = false; + if (Main.mouseLeft) + flag1 = true; + if (flag1) + { + bool flag2 = true; + Point result; + if (!Main.mapFullscreen) + result = (Main.screenPosition + mouse).ToTileCoordinates(); + else + flag2 = CaptureInterface.GetMapCoords((int) mouse.X, (int) mouse.Y, 0, out result); + if (flag2) + { + if (!CaptureInterface.EdgeAPinned) + { + CaptureInterface.EdgeAPinned = true; + CaptureInterface.EdgeA = result; + } + if (!CaptureInterface.EdgeBPinned) + { + CaptureInterface.EdgeBPinned = true; + CaptureInterface.EdgeB = result; + } + } + this.currentAim = 3; + this.caughtEdge = 1; + } + } + int PinX = Math.Min(CaptureInterface.EdgeA.X, CaptureInterface.EdgeB.X); + int PinY = Math.Min(CaptureInterface.EdgeA.Y, CaptureInterface.EdgeB.Y); + int num1 = Math.Abs(CaptureInterface.EdgeA.X - CaptureInterface.EdgeB.X); + int num2 = Math.Abs(CaptureInterface.EdgeA.Y - CaptureInterface.EdgeB.Y); + bool flag = (double) Main.player[Main.myPlayer].gravDir == -1.0; + int num3 = 1 - flag.ToInt(); + int num4 = flag.ToInt(); + Rectangle rectangle1; + Rectangle rectangle2; + if (!Main.mapFullscreen) + { + rectangle1 = Main.ReverseGravitySupport(new Rectangle(PinX * 16, PinY * 16, (num1 + 1) * 16, (num2 + 1) * 16)); + rectangle2 = Main.ReverseGravitySupport(new Rectangle((int) Main.screenPosition.X, (int) Main.screenPosition.Y, Main.screenWidth + 1, Main.screenHeight + 1)); + Rectangle result; + Rectangle.Intersect(ref rectangle2, ref rectangle1, out result); + if (result.Width == 0 || result.Height == 0) + return; + result.Offset(-rectangle2.X, -rectangle2.Y); + } + else + { + Point result1; + CaptureInterface.GetMapCoords(PinX, PinY, 1, out result1); + Point result2; + CaptureInterface.GetMapCoords(PinX + num1 + 1, PinY + num2 + 1, 1, out result2); + rectangle1 = new Rectangle(result1.X, result1.Y, result2.X - result1.X, result2.Y - result1.Y); + rectangle2 = new Rectangle(0, 0, Main.screenWidth + 1, Main.screenHeight + 1); + Rectangle result3; + Rectangle.Intersect(ref rectangle2, ref rectangle1, out result3); + if (result3.Width == 0 || result3.Height == 0) + return; + result3.Offset(-rectangle2.X, -rectangle2.Y); + } + this.dragging = false; + if (!Main.mouseLeft) + this.currentAim = -1; + if (this.currentAim != -1) + { + this.dragging = true; + Point point1 = new Point(); + Point point2; + if (!Main.mapFullscreen) + { + point2 = Main.MouseWorld.ToTileCoordinates(); + } + else + { + Point result; + if (!CaptureInterface.GetMapCoords((int) mouse.X, (int) mouse.Y, 0, out result)) + return; + point2 = result; + } + switch (this.currentAim) + { + case 0: + case 1: + if (this.caughtEdge == 0) + CaptureInterface.EdgeA.Y = point2.Y; + if (this.caughtEdge == 1) + { + CaptureInterface.EdgeB.Y = point2.Y; + break; + } + break; + case 2: + case 3: + if (this.caughtEdge == 0) + CaptureInterface.EdgeA.X = point2.X; + if (this.caughtEdge == 1) + { + CaptureInterface.EdgeB.X = point2.X; + break; + } + break; + } + } + else + { + this.caughtEdge = -1; + Rectangle drawbox = rectangle1; + drawbox.Offset(-rectangle2.X, -rectangle2.Y); + this.inMap = drawbox.Contains(mouse.ToPoint()); + for (int boundIndex = 0; boundIndex < 4; ++boundIndex) + { + Rectangle bound = this.GetBound(drawbox, boundIndex); + bound.Inflate(8, 8); + if (bound.Contains(mouse.ToPoint())) + { + this.currentAim = boundIndex; + switch (boundIndex) + { + case 0: + this.caughtEdge = CaptureInterface.EdgeA.Y >= CaptureInterface.EdgeB.Y ? num3 : num4; + goto label_46; + case 1: + this.caughtEdge = CaptureInterface.EdgeA.Y < CaptureInterface.EdgeB.Y ? num3 : num4; + goto label_46; + case 2: + this.caughtEdge = CaptureInterface.EdgeA.X >= CaptureInterface.EdgeB.X ? 1 : 0; + goto label_46; + case 3: + this.caughtEdge = CaptureInterface.EdgeA.X < CaptureInterface.EdgeB.X ? 1 : 0; + goto label_46; + default: + goto label_46; + } + } + } + } +label_46: + CaptureInterface.ConstraintPoints(); + } + + private Rectangle GetBound(Rectangle drawbox, int boundIndex) + { + switch (boundIndex) + { + case 0: + return new Rectangle(drawbox.X, drawbox.Y - 2, drawbox.Width, 2); + case 1: + return new Rectangle(drawbox.X, drawbox.Y + drawbox.Height, drawbox.Width, 2); + case 2: + return new Rectangle(drawbox.X - 2, drawbox.Y, 2, drawbox.Height); + case 3: + return new Rectangle(drawbox.X + drawbox.Width, drawbox.Y, 2, drawbox.Height); + default: + return Rectangle.Empty; + } + } + + public void DrawMarkedArea(SpriteBatch sb) + { + if (!CaptureInterface.EdgeAPinned || !CaptureInterface.EdgeBPinned) + return; + int PinX = Math.Min(CaptureInterface.EdgeA.X, CaptureInterface.EdgeB.X); + int PinY = Math.Min(CaptureInterface.EdgeA.Y, CaptureInterface.EdgeB.Y); + int num1 = Math.Abs(CaptureInterface.EdgeA.X - CaptureInterface.EdgeB.X); + int num2 = Math.Abs(CaptureInterface.EdgeA.Y - CaptureInterface.EdgeB.Y); + Rectangle result1; + if (!Main.mapFullscreen) + { + Rectangle rectangle1 = Main.ReverseGravitySupport(new Rectangle(PinX * 16, PinY * 16, (num1 + 1) * 16, (num2 + 1) * 16)); + Rectangle rectangle2 = Main.ReverseGravitySupport(new Rectangle((int) Main.screenPosition.X, (int) Main.screenPosition.Y, Main.screenWidth + 1, Main.screenHeight + 1)); + Rectangle.Intersect(ref rectangle2, ref rectangle1, out result1); + if (result1.Width == 0 || result1.Height == 0) + return; + result1.Offset(-rectangle2.X, -rectangle2.Y); + } + else + { + Point result2; + CaptureInterface.GetMapCoords(PinX, PinY, 1, out result2); + Point result3; + CaptureInterface.GetMapCoords(PinX + num1 + 1, PinY + num2 + 1, 1, out result3); + Rectangle rectangle3 = new Rectangle(result2.X, result2.Y, result3.X - result2.X, result3.Y - result2.Y); + Rectangle rectangle4 = new Rectangle(0, 0, Main.screenWidth + 1, Main.screenHeight + 1); + Rectangle.Intersect(ref rectangle4, ref rectangle3, out result1); + if (result1.Width == 0 || result1.Height == 0) + return; + result1.Offset(-rectangle4.X, -rectangle4.Y); + } + sb.Draw(TextureAssets.MagicPixel.Value, result1, CaptureInterface.Settings.MarkedAreaColor); + Rectangle r = Rectangle.Empty; + for (int index = 0; index < 2; ++index) + { + if (this.currentAim != index) + this.DrawBound(sb, new Rectangle(result1.X, result1.Y + (index == 1 ? result1.Height : -2), result1.Width, 2), 0); + else + r = new Rectangle(result1.X, result1.Y + (index == 1 ? result1.Height : -2), result1.Width, 2); + if (this.currentAim != index + 2) + this.DrawBound(sb, new Rectangle(result1.X + (index == 1 ? result1.Width : -2), result1.Y, 2, result1.Height), 0); + else + r = new Rectangle(result1.X + (index == 1 ? result1.Width : -2), result1.Y, 2, result1.Height); + } + if (!(r != Rectangle.Empty)) + return; + this.DrawBound(sb, r, 1 + this.dragging.ToInt()); + } + + private void DrawBound(SpriteBatch sb, Rectangle r, int mode) + { + switch (mode) + { + case 0: + sb.Draw(TextureAssets.MagicPixel.Value, r, Color.Silver); + break; + case 1: + Rectangle destinationRectangle1 = new Rectangle(r.X - 2, r.Y, r.Width + 4, r.Height); + sb.Draw(TextureAssets.MagicPixel.Value, destinationRectangle1, Color.White); + destinationRectangle1 = new Rectangle(r.X, r.Y - 2, r.Width, r.Height + 4); + sb.Draw(TextureAssets.MagicPixel.Value, destinationRectangle1, Color.White); + sb.Draw(TextureAssets.MagicPixel.Value, r, Color.White); + break; + case 2: + Rectangle destinationRectangle2 = new Rectangle(r.X - 2, r.Y, r.Width + 4, r.Height); + sb.Draw(TextureAssets.MagicPixel.Value, destinationRectangle2, Color.Gold); + destinationRectangle2 = new Rectangle(r.X, r.Y - 2, r.Width, r.Height + 4); + sb.Draw(TextureAssets.MagicPixel.Value, destinationRectangle2, Color.Gold); + sb.Draw(TextureAssets.MagicPixel.Value, r, Color.Gold); + break; + } + } + } + + private class ModeChangeSettings : CaptureInterface.CaptureInterfaceMode + { + private const int ButtonsCount = 7; + private int hoveredButton = -1; + private bool inUI; + + private Rectangle GetRect() + { + Rectangle rectangle = new Rectangle(0, 0, 224, 170); + if (CaptureInterface.Settings.ScreenAnchor == 0) + { + rectangle.X = 227 - rectangle.Width / 2; + rectangle.Y = 80; + } + return rectangle; + } + + private void ButtonDraw(int button, ref string key, ref string value) + { + switch (button) + { + case 0: + key = Lang.inter[74].Value; + value = Lang.inter[73 - CaptureInterface.Settings.PackImage.ToInt()].Value; + break; + case 1: + key = Lang.inter[75].Value; + value = Lang.inter[73 - CaptureInterface.Settings.IncludeEntities.ToInt()].Value; + break; + case 2: + key = Lang.inter[76].Value; + value = Lang.inter[73 - (!CaptureInterface.Settings.TransparentBackground).ToInt()].Value; + break; + case 6: + key = " " + Lang.menu[86].Value; + value = ""; + break; + } + } + + private void PressButton(int button) + { + bool flag = false; + switch (button) + { + case 0: + CaptureInterface.Settings.PackImage = !CaptureInterface.Settings.PackImage; + flag = true; + break; + case 1: + CaptureInterface.Settings.IncludeEntities = !CaptureInterface.Settings.IncludeEntities; + flag = true; + break; + case 2: + CaptureInterface.Settings.TransparentBackground = !CaptureInterface.Settings.TransparentBackground; + flag = true; + break; + case 6: + CaptureInterface.Settings.PackImage = true; + CaptureInterface.Settings.IncludeEntities = true; + CaptureInterface.Settings.TransparentBackground = false; + CaptureInterface.Settings.BiomeChoiceIndex = -1; + flag = true; + break; + } + if (!flag) + return; + SoundEngine.PlaySound(12); + } + + private void DrawWaterChoices(SpriteBatch spritebatch, Point start, Point mouse) + { + Rectangle r = new Rectangle(0, 0, 20, 20); + for (int index1 = 0; index1 < 2; ++index1) + { + for (int index2 = 0; index2 < 7; ++index2) + { + if (index1 != 1 || index2 != 6) + { + int num1 = index2 + index1 * 7; + r.X = start.X + 24 * index2 + 12 * index1; + r.Y = start.Y + 24 * index1; + int num2 = num1; + int num3 = 0; + if (r.Contains(mouse)) + { + if (Main.mouseLeft && Main.mouseLeftRelease) + { + SoundEngine.PlaySound(12); + CaptureInterface.Settings.BiomeChoiceIndex = num2; + } + ++num3; + } + if (CaptureInterface.Settings.BiomeChoiceIndex == num2) + num3 += 2; + Texture2D texture = TextureAssets.Extra[130].Value; + int x = num1 * 18; + Color white = Color.White; + float num4 = 1f; + if (num3 < 2) + num4 *= 0.5f; + if (num3 % 2 == 1) + spritebatch.Draw(TextureAssets.MagicPixel.Value, r.TopLeft(), new Rectangle?(new Rectangle(0, 0, 1, 1)), Color.Gold, 0.0f, Vector2.Zero, new Vector2(20f), SpriteEffects.None, 0.0f); + else + spritebatch.Draw(TextureAssets.MagicPixel.Value, r.TopLeft(), new Rectangle?(new Rectangle(0, 0, 1, 1)), Color.White * num4, 0.0f, Vector2.Zero, new Vector2(20f), SpriteEffects.None, 0.0f); + spritebatch.Draw(texture, r.TopLeft() + new Vector2(2f), new Rectangle?(new Rectangle(x, 0, 16, 16)), Color.White * num4); + } + } + } + } + + private int UnnecessaryBiomeSelectionTypeConversion(int index) + { + switch (index) + { + case 0: + return -1; + case 1: + return 0; + case 2: + return 2; + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + return index; + case 9: + return 10; + case 10: + return 12; + case 11: + return 13; + case 12: + return 14; + default: + return 0; + } + } + + public override void Update() + { + if (!this.Selected || CaptureInterface.JustActivated) + return; + PlayerInput.SetZoom_UI(); + Point point = new Point(Main.mouseX, Main.mouseY); + this.hoveredButton = -1; + Rectangle rect = this.GetRect(); + this.inUI = rect.Contains(point); + rect.Inflate(-20, -20); + rect.Height = 16; + int y = rect.Y; + for (int index = 0; index < 7; ++index) + { + rect.Y = y + index * 20; + if (rect.Contains(point)) + { + this.hoveredButton = index; + break; + } + } + if (!Main.mouseLeft || !Main.mouseLeftRelease || this.hoveredButton == -1) + return; + this.PressButton(this.hoveredButton); + } + + public override void Draw(SpriteBatch sb) + { + if (!this.Selected) + return; + sb.End(); + sb.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, Main.CurrentWantedZoomMatrix); + PlayerInput.SetZoom_Context(); + ((CaptureInterface.ModeDragBounds) CaptureInterface.Modes[1]).currentAim = -1; + ((CaptureInterface.ModeDragBounds) CaptureInterface.Modes[1]).DrawMarkedArea(sb); + sb.End(); + sb.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, Main.UIScaleMatrix); + PlayerInput.SetZoom_UI(); + Rectangle rect = this.GetRect(); + Utils.DrawInvBG(sb, rect, new Color(63, 65, 151, (int) byte.MaxValue) * 0.485f); + for (int button = 0; button < 7; ++button) + { + string key = ""; + string text = ""; + this.ButtonDraw(button, ref key, ref text); + Color baseColor = Color.White; + if (button == this.hoveredButton) + baseColor = Color.Gold; + ChatManager.DrawColorCodedStringWithShadow(sb, FontAssets.ItemStack.Value, key, rect.TopLeft() + new Vector2(20f, (float) (20 + 20 * button)), baseColor, 0.0f, Vector2.Zero, Vector2.One); + ChatManager.DrawColorCodedStringWithShadow(sb, FontAssets.ItemStack.Value, text, rect.TopRight() + new Vector2(-20f, (float) (20 + 20 * button)), baseColor, 0.0f, FontAssets.ItemStack.Value.MeasureString(text) * Vector2.UnitX, Vector2.One); + } + this.DrawWaterChoices(sb, (rect.TopLeft() + new Vector2((float) (rect.Width / 2 - 84), 90f)).ToPoint(), Main.MouseScreen.ToPoint()); + } + + public override void ToggleActive(bool tickedOn) + { + if (!tickedOn) + return; + this.hoveredButton = -1; + } + + public override bool UsingMap() => this.inUI; + } + } +} diff --git a/Graphics/Capture/CaptureManager.cs b/Graphics/Capture/CaptureManager.cs new file mode 100644 index 0000000..5745a06 --- /dev/null +++ b/Graphics/Capture/CaptureManager.cs @@ -0,0 +1,57 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Capture.CaptureManager +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.Graphics.Capture +{ + public class CaptureManager + { + public static CaptureManager Instance = new CaptureManager(); + private CaptureInterface _interface; + private CaptureCamera _camera; + + public bool IsCapturing => this._camera.IsCapturing; + + public CaptureManager() + { + this._interface = new CaptureInterface(); + this._camera = new CaptureCamera(Main.instance.GraphicsDevice); + } + + public bool Active + { + get => this._interface.Active; + set + { + if (Main.CaptureModeDisabled || this._interface.Active == value) + return; + this._interface.ToggleCamera(value); + } + } + + public bool UsingMap => this.Active && this._interface.UsingMap(); + + public void Scrolling() => this._interface.Scrolling(); + + public void Update() => this._interface.Update(); + + public void Draw(SpriteBatch sb) => this._interface.Draw(sb); + + public float GetProgress() => this._camera.GetProgress(); + + public void Capture() => this.Capture(new CaptureSettings() + { + Area = new Rectangle(2660, 100, 1000, 1000), + UseScaling = false + }); + + public void Capture(CaptureSettings settings) => this._camera.Capture(settings); + + public void DrawTick() => this._camera.DrawTick(); + } +} diff --git a/Graphics/Capture/CaptureSettings.cs b/Graphics/Capture/CaptureSettings.cs new file mode 100644 index 0000000..b3363c1 --- /dev/null +++ b/Graphics/Capture/CaptureSettings.cs @@ -0,0 +1,28 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Capture.CaptureSettings +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; + +namespace Terraria.Graphics.Capture +{ + public class CaptureSettings + { + public Rectangle Area; + public bool UseScaling = true; + public string OutputName; + public bool CaptureEntities = true; + public CaptureBiome Biome = CaptureBiome.DefaultPurity; + public bool CaptureMech; + public bool CaptureBackground; + + public CaptureSettings() + { + DateTime localTime = DateTime.Now.ToLocalTime(); + this.OutputName = "Capture " + localTime.Year.ToString("D4") + "-" + localTime.Month.ToString("D2") + "-" + localTime.Day.ToString("D2") + " " + localTime.Hour.ToString("D2") + "_" + localTime.Minute.ToString("D2") + "_" + localTime.Second.ToString("D2"); + } + } +} diff --git a/Graphics/Effects/CustomSky.cs b/Graphics/Effects/CustomSky.cs new file mode 100644 index 0000000..c43f615 --- /dev/null +++ b/Graphics/Effects/CustomSky.cs @@ -0,0 +1,28 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.CustomSky +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.Graphics.Effects +{ + public abstract class CustomSky : GameEffect + { + public abstract void Update(GameTime gameTime); + + public abstract void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth); + + public abstract bool IsActive(); + + public abstract void Reset(); + + public virtual Color OnTileColor(Color inColor) => inColor; + + public virtual float GetCloudAlpha() => 1f; + + public override bool IsVisible() => true; + } +} diff --git a/Graphics/Effects/EffectManager`1.cs b/Graphics/Effects/EffectManager`1.cs new file mode 100644 index 0000000..bcfc996 --- /dev/null +++ b/Graphics/Effects/EffectManager`1.cs @@ -0,0 +1,69 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.EffectManager`1 +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; + +namespace Terraria.Graphics.Effects +{ + public abstract class EffectManager where T : GameEffect + { + protected bool _isLoaded; + protected Dictionary _effects = new Dictionary(); + + public bool IsLoaded => this._isLoaded; + + public T this[string key] + { + get + { + T obj; + return this._effects.TryGetValue(key, out obj) ? obj : default (T); + } + set => this.Bind(key, value); + } + + public void Bind(string name, T effect) + { + this._effects[name] = effect; + if (!this._isLoaded) + return; + effect.Load(); + } + + public void Load() + { + if (this._isLoaded) + return; + this._isLoaded = true; + foreach (T obj in this._effects.Values) + obj.Load(); + } + + public T Activate(string name, Vector2 position = default (Vector2), params object[] args) + { + T effect = this._effects.ContainsKey(name) ? this._effects[name] : throw new MissingEffectException("Unable to find effect named: " + name + ". Type: " + (object) typeof (T) + "."); + this.OnActivate(effect, position); + effect.Activate(position, args); + return effect; + } + + public void Deactivate(string name, params object[] args) + { + T effect = this._effects.ContainsKey(name) ? this._effects[name] : throw new MissingEffectException("Unable to find effect named: " + name + ". Type: " + (object) typeof (T) + "."); + this.OnDeactivate(effect); + effect.Deactivate(args); + } + + public virtual void OnActivate(T effect, Vector2 position) + { + } + + public virtual void OnDeactivate(T effect) + { + } + } +} diff --git a/Graphics/Effects/EffectPriority.cs b/Graphics/Effects/EffectPriority.cs new file mode 100644 index 0000000..1b8bbba --- /dev/null +++ b/Graphics/Effects/EffectPriority.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.EffectPriority +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Graphics.Effects +{ + public enum EffectPriority + { + VeryLow, + Low, + Medium, + High, + VeryHigh, + } +} diff --git a/Graphics/Effects/Filter.cs b/Graphics/Effects/Filter.cs new file mode 100644 index 0000000..a078e36 --- /dev/null +++ b/Graphics/Effects/Filter.cs @@ -0,0 +1,49 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.Filter +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.Graphics.Shaders; + +namespace Terraria.Graphics.Effects +{ + public class Filter : GameEffect + { + public bool Active; + private ScreenShaderData _shader; + public bool IsHidden; + + public Filter(ScreenShaderData shader, EffectPriority priority = EffectPriority.VeryLow) + { + this._shader = shader; + this._priority = priority; + } + + public void Update(GameTime gameTime) + { + this._shader.UseGlobalOpacity(this.Opacity); + this._shader.Update(gameTime); + } + + public void Apply() => this._shader.Apply(); + + public ScreenShaderData GetShader() => this._shader; + + public override void Activate(Vector2 position, params object[] args) + { + this._shader.UseGlobalOpacity(this.Opacity); + this._shader.UseTargetPosition(position); + this.Active = true; + } + + public override void Deactivate(params object[] args) => this.Active = false; + + public bool IsInUse() => this.Active || (double) this.Opacity > 0.0; + + public bool IsActive() => this.Active; + + public override bool IsVisible() => (double) this.GetShader().CombinedOpacity > 0.0 && !this.IsHidden; + } +} diff --git a/Graphics/Effects/FilterManager.cs b/Graphics/Effects/FilterManager.cs new file mode 100644 index 0000000..0cd44f0 --- /dev/null +++ b/Graphics/Effects/FilterManager.cs @@ -0,0 +1,197 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.FilterManager +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using Terraria.IO; + +namespace Terraria.Graphics.Effects +{ + public class FilterManager : EffectManager + { + private const float OPACITY_RATE = 1f; + private LinkedList _activeFilters = new LinkedList(); + private int _filterLimit = 16; + private EffectPriority _priorityThreshold; + private int _activeFilterCount; + private bool _captureThisFrame; + + public event Action OnPostDraw; + + public FilterManager() + { + Main.Configuration.OnLoad += (Action) (preferences => + { + this._filterLimit = preferences.Get("FilterLimit", 16); + EffectPriority result; + if (!Enum.TryParse(preferences.Get("FilterPriorityThreshold", "VeryLow"), out result)) + return; + this._priorityThreshold = result; + }); + Main.Configuration.OnSave += (Action) (preferences => + { + preferences.Put("FilterLimit", (object) this._filterLimit); + preferences.Put("FilterPriorityThreshold", (object) Enum.GetName(typeof (EffectPriority), (object) this._priorityThreshold)); + }); + } + + public override void OnActivate(Filter effect, Vector2 position) + { + if (this._activeFilters.Contains(effect)) + { + if (effect.Active) + return; + if (effect.Priority >= this._priorityThreshold) + --this._activeFilterCount; + this._activeFilters.Remove(effect); + } + else + effect.Opacity = 0.0f; + if (effect.Priority >= this._priorityThreshold) + ++this._activeFilterCount; + if (this._activeFilters.Count == 0) + { + this._activeFilters.AddLast(effect); + } + else + { + for (LinkedListNode node = this._activeFilters.First; node != null; node = node.Next) + { + Filter filter = node.Value; + if (effect.Priority <= filter.Priority) + { + this._activeFilters.AddAfter(node, effect); + return; + } + } + this._activeFilters.AddLast(effect); + } + } + + public void BeginCapture(RenderTarget2D screenTarget1, Color clearColor) + { + if (this._activeFilterCount == 0 && this.OnPostDraw == null) + { + this._captureThisFrame = false; + } + else + { + this._captureThisFrame = true; + Main.instance.GraphicsDevice.SetRenderTarget(screenTarget1); + Main.instance.GraphicsDevice.Clear(clearColor); + } + } + + public void Update(GameTime gameTime) + { + LinkedListNode node = this._activeFilters.First; + int count = this._activeFilters.Count; + int num = 0; + LinkedListNode next; + for (; node != null; node = next) + { + Filter filter = node.Value; + next = node.Next; + bool flag = false; + if (filter.Priority >= this._priorityThreshold) + { + ++num; + if (num > this._activeFilterCount - this._filterLimit) + { + filter.Update(gameTime); + flag = true; + } + } + if (filter.Active & flag) + filter.Opacity = Math.Min(filter.Opacity + (float) (gameTime.ElapsedGameTime.TotalSeconds * 1.0), 1f); + else + filter.Opacity = Math.Max(filter.Opacity - (float) (gameTime.ElapsedGameTime.TotalSeconds * 1.0), 0.0f); + if (!filter.Active && (double) filter.Opacity == 0.0) + { + if (filter.Priority >= this._priorityThreshold) + --this._activeFilterCount; + this._activeFilters.Remove(node); + } + } + } + + public void EndCapture( + RenderTarget2D finalTexture, + RenderTarget2D screenTarget1, + RenderTarget2D screenTarget2, + Color clearColor) + { + if (!this._captureThisFrame) + return; + LinkedListNode linkedListNode = this._activeFilters.First; + int count = this._activeFilters.Count; + Filter filter1 = (Filter) null; + RenderTarget2D renderTarget2D = screenTarget1; + GraphicsDevice graphicsDevice = Main.instance.GraphicsDevice; + int num = 0; + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + { + RenderTarget2D renderTarget = screenTarget2; + graphicsDevice.SetRenderTarget(renderTarget); + graphicsDevice.Clear(clearColor); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.Default, RasterizerState.CullNone, (Effect) null, Matrix.Invert(Main.GameViewMatrix.EffectMatrix)); + Main.spriteBatch.Draw((Texture2D) renderTarget2D, Vector2.Zero, Color.White); + Main.spriteBatch.End(); + renderTarget2D = screenTarget2; + } + LinkedListNode next; + for (; linkedListNode != null; linkedListNode = next) + { + Filter filter2 = linkedListNode.Value; + next = linkedListNode.Next; + if (filter2.Priority >= this._priorityThreshold) + { + ++num; + if (num > this._activeFilterCount - this._filterLimit && filter2.IsVisible()) + { + if (filter1 != null) + { + RenderTarget2D renderTarget = renderTarget2D != screenTarget1 ? screenTarget1 : screenTarget2; + graphicsDevice.SetRenderTarget(renderTarget); + graphicsDevice.Clear(clearColor); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend); + filter1.Apply(); + Main.spriteBatch.Draw((Texture2D) renderTarget2D, Vector2.Zero, Main.ColorOfTheSkies); + Main.spriteBatch.End(); + renderTarget2D = renderTarget2D != screenTarget1 ? screenTarget1 : screenTarget2; + } + filter1 = filter2; + } + } + } + graphicsDevice.SetRenderTarget(finalTexture); + graphicsDevice.Clear(clearColor); + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.Default, RasterizerState.CullNone, (Effect) null, Main.GameViewMatrix.EffectMatrix); + else + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend); + if (filter1 != null) + { + filter1.Apply(); + Main.spriteBatch.Draw((Texture2D) renderTarget2D, Vector2.Zero, Main.ColorOfTheSkies); + } + else + Main.spriteBatch.Draw((Texture2D) renderTarget2D, Vector2.Zero, Color.White); + Main.spriteBatch.End(); + for (int index = 0; index < 8; ++index) + graphicsDevice.Textures[index] = (Texture) null; + if (this.OnPostDraw == null) + return; + this.OnPostDraw(); + } + + public bool HasActiveFilter() => (uint) this._activeFilters.Count > 0U; + + public bool CanCapture() => this.HasActiveFilter() || this.OnPostDraw != null; + } +} diff --git a/Graphics/Effects/Filters.cs b/Graphics/Effects/Filters.cs new file mode 100644 index 0000000..7597e17 --- /dev/null +++ b/Graphics/Effects/Filters.cs @@ -0,0 +1,13 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.Filters +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Graphics.Effects +{ + public static class Filters + { + public static FilterManager Scene = new FilterManager(); + } +} diff --git a/Graphics/Effects/GameEffect.cs b/Graphics/Effects/GameEffect.cs new file mode 100644 index 0000000..87d3cee --- /dev/null +++ b/Graphics/Effects/GameEffect.cs @@ -0,0 +1,39 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.GameEffect +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.Graphics.Effects +{ + public abstract class GameEffect + { + public float Opacity; + protected bool _isLoaded; + protected EffectPriority _priority; + + public bool IsLoaded => this._isLoaded; + + public EffectPriority Priority => this._priority; + + public void Load() + { + if (this._isLoaded) + return; + this._isLoaded = true; + this.OnLoad(); + } + + public virtual void OnLoad() + { + } + + public abstract bool IsVisible(); + + public abstract void Activate(Vector2 position, params object[] args); + + public abstract void Deactivate(params object[] args); + } +} diff --git a/Graphics/Effects/MissingEffectException.cs b/Graphics/Effects/MissingEffectException.cs new file mode 100644 index 0000000..f2e562b --- /dev/null +++ b/Graphics/Effects/MissingEffectException.cs @@ -0,0 +1,18 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.MissingEffectException +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Terraria.Graphics.Effects +{ + public class MissingEffectException : Exception + { + public MissingEffectException(string text) + : base(text) + { + } + } +} diff --git a/Graphics/Effects/Overlay.cs b/Graphics/Effects/Overlay.cs new file mode 100644 index 0000000..8e2f1e3 --- /dev/null +++ b/Graphics/Effects/Overlay.cs @@ -0,0 +1,29 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.Overlay +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.Graphics.Effects +{ + public abstract class Overlay : GameEffect + { + public OverlayMode Mode = OverlayMode.Inactive; + private RenderLayers _layer = RenderLayers.All; + + public RenderLayers Layer => this._layer; + + public Overlay(EffectPriority priority, RenderLayers layer) + { + this._priority = priority; + this._layer = layer; + } + + public abstract void Draw(SpriteBatch spriteBatch); + + public abstract void Update(GameTime gameTime); + } +} diff --git a/Graphics/Effects/OverlayManager.cs b/Graphics/Effects/OverlayManager.cs new file mode 100644 index 0000000..a59142e --- /dev/null +++ b/Graphics/Effects/OverlayManager.cs @@ -0,0 +1,113 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.OverlayManager +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; + +namespace Terraria.Graphics.Effects +{ + public class OverlayManager : EffectManager + { + private const float OPACITY_RATE = 1f; + private LinkedList[] _activeOverlays = new LinkedList[Enum.GetNames(typeof (EffectPriority)).Length]; + private int _overlayCount; + + public OverlayManager() + { + for (int index = 0; index < this._activeOverlays.Length; ++index) + this._activeOverlays[index] = new LinkedList(); + } + + public override void OnActivate(Overlay overlay, Vector2 position) + { + LinkedList activeOverlay = this._activeOverlays[(int) overlay.Priority]; + if (overlay.Mode == OverlayMode.FadeIn || overlay.Mode == OverlayMode.Active) + return; + if (overlay.Mode == OverlayMode.FadeOut) + { + activeOverlay.Remove(overlay); + --this._overlayCount; + } + else + overlay.Opacity = 0.0f; + if (activeOverlay.Count != 0) + { + foreach (Overlay overlay1 in activeOverlay) + overlay1.Mode = OverlayMode.FadeOut; + } + activeOverlay.AddLast(overlay); + ++this._overlayCount; + } + + public void Update(GameTime gameTime) + { + LinkedListNode next; + for (int index = 0; index < this._activeOverlays.Length; ++index) + { + for (LinkedListNode node = this._activeOverlays[index].First; node != null; node = next) + { + Overlay overlay = node.Value; + next = node.Next; + overlay.Update(gameTime); + switch (overlay.Mode) + { + case OverlayMode.FadeIn: + overlay.Opacity += (float) (gameTime.ElapsedGameTime.TotalSeconds * 1.0); + if ((double) overlay.Opacity >= 1.0) + { + overlay.Opacity = 1f; + overlay.Mode = OverlayMode.Active; + break; + } + break; + case OverlayMode.Active: + overlay.Opacity = Math.Min(1f, overlay.Opacity + (float) (gameTime.ElapsedGameTime.TotalSeconds * 1.0)); + break; + case OverlayMode.FadeOut: + overlay.Opacity -= (float) (gameTime.ElapsedGameTime.TotalSeconds * 1.0); + if ((double) overlay.Opacity <= 0.0) + { + overlay.Opacity = 0.0f; + overlay.Mode = OverlayMode.Inactive; + this._activeOverlays[index].Remove(node); + --this._overlayCount; + break; + } + break; + } + } + } + } + + public void Draw(SpriteBatch spriteBatch, RenderLayers layer) + { + if (this._overlayCount == 0) + return; + bool flag = false; + for (int index = 0; index < this._activeOverlays.Length; ++index) + { + for (LinkedListNode linkedListNode = this._activeOverlays[index].First; linkedListNode != null; linkedListNode = linkedListNode.Next) + { + Overlay overlay = linkedListNode.Value; + if (overlay.Layer == layer && overlay.IsVisible()) + { + if (!flag) + { + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.Default, RasterizerState.CullNone, (Effect) null, Main.Transform); + flag = true; + } + overlay.Draw(spriteBatch); + } + } + } + if (!flag) + return; + spriteBatch.End(); + } + } +} diff --git a/Graphics/Effects/OverlayMode.cs b/Graphics/Effects/OverlayMode.cs new file mode 100644 index 0000000..c7c5ffc --- /dev/null +++ b/Graphics/Effects/OverlayMode.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.OverlayMode +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Graphics.Effects +{ + public enum OverlayMode + { + FadeIn, + Active, + FadeOut, + Inactive, + } +} diff --git a/Graphics/Effects/Overlays.cs b/Graphics/Effects/Overlays.cs new file mode 100644 index 0000000..1e37768 --- /dev/null +++ b/Graphics/Effects/Overlays.cs @@ -0,0 +1,14 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.Overlays +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Graphics.Effects +{ + public static class Overlays + { + public static OverlayManager Scene = new OverlayManager(); + public static OverlayManager FilterFallback = new OverlayManager(); + } +} diff --git a/Graphics/Effects/RenderLayers.cs b/Graphics/Effects/RenderLayers.cs new file mode 100644 index 0000000..6f6b6fc --- /dev/null +++ b/Graphics/Effects/RenderLayers.cs @@ -0,0 +1,22 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.RenderLayers +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Graphics.Effects +{ + public enum RenderLayers + { + Sky, + Landscape, + Background, + InWorldUI, + BackgroundWater, + Walls, + TilesAndNPCs, + Entities, + ForegroundWater, + All, + } +} diff --git a/Graphics/Effects/SimpleOverlay.cs b/Graphics/Effects/SimpleOverlay.cs new file mode 100644 index 0000000..8a3a6dc --- /dev/null +++ b/Graphics/Effects/SimpleOverlay.cs @@ -0,0 +1,64 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.SimpleOverlay +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.Graphics.Shaders; + +namespace Terraria.Graphics.Effects +{ + public class SimpleOverlay : Overlay + { + private Asset _texture; + private ScreenShaderData _shader; + public Vector2 TargetPosition = Vector2.Zero; + + public SimpleOverlay( + string textureName, + ScreenShaderData shader, + EffectPriority priority = EffectPriority.VeryLow, + RenderLayers layer = RenderLayers.All) + : base(priority, layer) + { + this._texture = Main.Assets.Request(textureName == null ? "" : textureName, (AssetRequestMode) 1); + this._shader = shader; + } + + public SimpleOverlay( + string textureName, + string shaderName = "Default", + EffectPriority priority = EffectPriority.VeryLow, + RenderLayers layer = RenderLayers.All) + : base(priority, layer) + { + this._texture = Main.Assets.Request(textureName == null ? "" : textureName, (AssetRequestMode) 1); + this._shader = new ScreenShaderData(Main.ScreenShaderRef, shaderName); + } + + public ScreenShaderData GetShader() => this._shader; + + public override void Draw(SpriteBatch spriteBatch) + { + this._shader.UseGlobalOpacity(this.Opacity); + this._shader.UseTargetPosition(this.TargetPosition); + this._shader.Apply(); + spriteBatch.Draw(this._texture.Value, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Main.ColorOfTheSkies); + } + + public override void Update(GameTime gameTime) => this._shader.Update(gameTime); + + public override void Activate(Vector2 position, params object[] args) + { + this.TargetPosition = position; + this.Mode = OverlayMode.FadeIn; + } + + public override void Deactivate(params object[] args) => this.Mode = OverlayMode.FadeOut; + + public override bool IsVisible() => (double) this._shader.CombinedOpacity > 0.0; + } +} diff --git a/Graphics/Effects/SkyManager.cs b/Graphics/Effects/SkyManager.cs new file mode 100644 index 0000000..3d16156 --- /dev/null +++ b/Graphics/Effects/SkyManager.cs @@ -0,0 +1,89 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Effects.SkyManager +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; + +namespace Terraria.Graphics.Effects +{ + public class SkyManager : EffectManager + { + public static SkyManager Instance = new SkyManager(); + private float _lastDepth; + private LinkedList _activeSkies = new LinkedList(); + + public void Reset() + { + foreach (CustomSky customSky in this._effects.Values) + customSky.Reset(); + this._activeSkies.Clear(); + } + + public void Update(GameTime gameTime) + { + LinkedListNode next; + for (int index = 0; index < Main.dayRate; ++index) + { + for (LinkedListNode node = this._activeSkies.First; node != null; node = next) + { + CustomSky customSky = node.Value; + next = node.Next; + customSky.Update(gameTime); + if (!customSky.IsActive()) + this._activeSkies.Remove(node); + } + } + } + + public void Draw(SpriteBatch spriteBatch) => this.DrawDepthRange(spriteBatch, float.MinValue, float.MaxValue); + + public void DrawToDepth(SpriteBatch spriteBatch, float minDepth) + { + if ((double) this._lastDepth <= (double) minDepth) + return; + this.DrawDepthRange(spriteBatch, minDepth, this._lastDepth); + this._lastDepth = minDepth; + } + + public void DrawDepthRange(SpriteBatch spriteBatch, float minDepth, float maxDepth) + { + foreach (CustomSky activeSky in this._activeSkies) + activeSky.Draw(spriteBatch, minDepth, maxDepth); + } + + public void DrawRemainingDepth(SpriteBatch spriteBatch) + { + this.DrawDepthRange(spriteBatch, float.MinValue, this._lastDepth); + this._lastDepth = float.MinValue; + } + + public void ResetDepthTracker() => this._lastDepth = float.MaxValue; + + public void SetStartingDepth(float depth) => this._lastDepth = depth; + + public override void OnActivate(CustomSky effect, Vector2 position) + { + this._activeSkies.Remove(effect); + this._activeSkies.AddLast(effect); + } + + public Color ProcessTileColor(Color color) + { + foreach (CustomSky activeSky in this._activeSkies) + color = activeSky.OnTileColor(color); + return color; + } + + public float ProcessCloudAlpha() + { + float num = 1f; + foreach (CustomSky activeSky in this._activeSkies) + num *= activeSky.GetCloudAlpha(); + return MathHelper.Clamp(num, 0.0f, 1f); + } + } +} diff --git a/Graphics/EmpressBladeDrawer.cs b/Graphics/EmpressBladeDrawer.cs new file mode 100644 index 0000000..4ee1d76 --- /dev/null +++ b/Graphics/EmpressBladeDrawer.cs @@ -0,0 +1,41 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.EmpressBladeDrawer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.DataStructures; +using Terraria.Graphics.Shaders; + +namespace Terraria.Graphics +{ + public struct EmpressBladeDrawer + { + public const int TotalIllusions = 1; + public const int FramesPerImportantTrail = 60; + private static VertexStrip _vertexStrip = new VertexStrip(); + public Color ColorStart; + public Color ColorEnd; + + public void Draw(Projectile proj) + { + double num = (double) proj.ai[1]; + MiscShaderData miscShaderData = GameShaders.Misc["EmpressBlade"]; + miscShaderData.UseShaderSpecificData(new Vector4(1f, 0.0f, 0.0f, 0.6f)); + miscShaderData.Apply(new DrawData?()); + EmpressBladeDrawer._vertexStrip.PrepareStrip(proj.oldPos, proj.oldRot, new VertexStrip.StripColorFunction(this.StripColors), new VertexStrip.StripHalfWidthFunction(this.StripWidth), -Main.screenPosition + proj.Size / 2f, new int?(proj.oldPos.Length), true); + EmpressBladeDrawer._vertexStrip.DrawTrail(); + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + } + + private Color StripColors(float progressOnStrip) + { + Color color = Color.Lerp(this.ColorStart, this.ColorEnd, Utils.GetLerpValue(0.0f, 0.7f, progressOnStrip, true)) * (1f - Utils.GetLerpValue(0.0f, 0.98f, progressOnStrip, true)); + color.A /= (byte) 2; + return color; + } + + private float StripWidth(float progressOnStrip) => 36f; + } +} diff --git a/Graphics/FinalFractalHelper.cs b/Graphics/FinalFractalHelper.cs new file mode 100644 index 0000000..70804c0 --- /dev/null +++ b/Graphics/FinalFractalHelper.cs @@ -0,0 +1,201 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.FinalFractalHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using Terraria.DataStructures; +using Terraria.Graphics.Shaders; + +namespace Terraria.Graphics +{ + [StructLayout(LayoutKind.Sequential, Size = 1)] + public struct FinalFractalHelper + { + public const int TotalIllusions = 4; + public const int FramesPerImportantTrail = 15; + private static VertexStrip _vertexStrip = new VertexStrip(); + private static Dictionary _fractalProfiles = new Dictionary() + { + { + 65, + new FinalFractalHelper.FinalFractalProfile(48f, new Color(236, 62, 192)) + }, + { + 1123, + new FinalFractalHelper.FinalFractalProfile(48f, Main.OurFavoriteColor) + }, + { + 46, + new FinalFractalHelper.FinalFractalProfile(48f, new Color(122, 66, 191)) + }, + { + 121, + new FinalFractalHelper.FinalFractalProfile(76f, new Color(254, 158, 35)) + }, + { + 190, + new FinalFractalHelper.FinalFractalProfile(70f, new Color(107, 203, 0)) + }, + { + 368, + new FinalFractalHelper.FinalFractalProfile(70f, new Color(236, 200, 19)) + }, + { + 674, + new FinalFractalHelper.FinalFractalProfile(70f, new Color(236, 200, 19)) + }, + { + 273, + new FinalFractalHelper.FinalFractalProfile(70f, new Color(179, 54, 201)) + }, + { + 675, + new FinalFractalHelper.FinalFractalProfile(70f, new Color(179, 54, 201)) + }, + { + 2880, + new FinalFractalHelper.FinalFractalProfile(70f, new Color(84, 234, 245)) + }, + { + 989, + new FinalFractalHelper.FinalFractalProfile(48f, new Color(91, 158, 232)) + }, + { + 1826, + new FinalFractalHelper.FinalFractalProfile(76f, new Color(252, 95, 4)) + }, + { + 3063, + new FinalFractalHelper.FinalFractalProfile(76f, new Color(254, 194, 250)) + }, + { + 3065, + new FinalFractalHelper.FinalFractalProfile(70f, new Color(237, 63, 133)) + }, + { + 757, + new FinalFractalHelper.FinalFractalProfile(70f, new Color(80, 222, 122)) + }, + { + 155, + new FinalFractalHelper.FinalFractalProfile(70f, new Color(56, 78, 210)) + }, + { + 795, + new FinalFractalHelper.FinalFractalProfile(70f, new Color(237, 28, 36)) + }, + { + 3018, + new FinalFractalHelper.FinalFractalProfile(80f, new Color(143, 215, 29)) + }, + { + 4144, + new FinalFractalHelper.FinalFractalProfile(45f, new Color(178, (int) byte.MaxValue, 180)) + }, + { + 3507, + new FinalFractalHelper.FinalFractalProfile(45f, new Color(235, 166, 135)) + }, + { + 4956, + new FinalFractalHelper.FinalFractalProfile(86f, new Color(178, (int) byte.MaxValue, 180)) + } + }; + private static FinalFractalHelper.FinalFractalProfile _defaultProfile = new FinalFractalHelper.FinalFractalProfile(50f, Color.White); + + public static int GetRandomProfileIndex() + { + List list = FinalFractalHelper._fractalProfiles.Keys.ToList(); + int index = Main.rand.Next(list.Count); + if (list[index] == 4956) + { + list.RemoveAt(index); + index = Main.rand.Next(list.Count); + } + return list[index]; + } + + public void Draw(Projectile proj) + { + FinalFractalHelper.FinalFractalProfile finalFractalProfile = FinalFractalHelper.GetFinalFractalProfile((int) proj.ai[1]); + MiscShaderData miscShaderData = GameShaders.Misc["FinalFractal"]; + miscShaderData.UseShaderSpecificData(new Vector4(4f, 0.0f, 0.0f, 4f)); + miscShaderData.UseImage0("Images/Extra_" + (object) (short) 201); + miscShaderData.UseImage1("Images/Extra_" + (object) (short) 193); + miscShaderData.Apply(new DrawData?()); + FinalFractalHelper._vertexStrip.PrepareStrip(proj.oldPos, proj.oldRot, finalFractalProfile.colorMethod, finalFractalProfile.widthMethod, -Main.screenPosition + proj.Size / 2f, new int?(proj.oldPos.Length), true); + FinalFractalHelper._vertexStrip.DrawTrail(); + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + } + + public static FinalFractalHelper.FinalFractalProfile GetFinalFractalProfile( + int usedSwordId) + { + FinalFractalHelper.FinalFractalProfile defaultProfile; + if (!FinalFractalHelper._fractalProfiles.TryGetValue(usedSwordId, out defaultProfile)) + defaultProfile = FinalFractalHelper._defaultProfile; + return defaultProfile; + } + + private Color StripColors(float progressOnStrip) + { + Color color = Color.Lerp(Color.White, Color.Violet, Utils.GetLerpValue(0.0f, 0.7f, progressOnStrip, true)) * (1f - Utils.GetLerpValue(0.0f, 0.98f, progressOnStrip, false)); + color.A /= (byte) 2; + return color; + } + + private float StripWidth(float progressOnStrip) => 50f; + + public delegate void SpawnDustMethod(Vector2 centerPosition, float rotation, Vector2 velocity); + + public struct FinalFractalProfile + { + public float trailWidth; + public Color trailColor; + public FinalFractalHelper.SpawnDustMethod dustMethod; + public VertexStrip.StripColorFunction colorMethod; + public VertexStrip.StripHalfWidthFunction widthMethod; + + public FinalFractalProfile(float fullBladeLength, Color color) + { + this.trailWidth = fullBladeLength / 2f; + this.trailColor = color; + this.widthMethod = (VertexStrip.StripHalfWidthFunction) null; + this.colorMethod = (VertexStrip.StripColorFunction) null; + this.dustMethod = (FinalFractalHelper.SpawnDustMethod) null; + this.widthMethod = new VertexStrip.StripHalfWidthFunction(this.StripWidth); + this.colorMethod = new VertexStrip.StripColorFunction(this.StripColors); + this.dustMethod = new FinalFractalHelper.SpawnDustMethod(this.StripDust); + } + + private void StripDust(Vector2 centerPosition, float rotation, Vector2 velocity) + { + if (Main.rand.Next(9) != 0) + return; + int num = Main.rand.Next(1, 4); + for (int index = 0; index < num; ++index) + { + Dust dust = Dust.NewDustPerfect(centerPosition, 278, Alpha: 100, newColor: Color.Lerp(this.trailColor, Color.White, Main.rand.NextFloat() * 0.3f)); + dust.scale = 0.4f; + dust.fadeIn = (float) (0.400000005960464 + (double) Main.rand.NextFloat() * 0.300000011920929); + dust.noGravity = true; + dust.velocity += rotation.ToRotationVector2() * (float) (3.0 + (double) Main.rand.NextFloat() * 4.0); + } + } + + private Color StripColors(float progressOnStrip) + { + Color color = this.trailColor * (1f - Utils.GetLerpValue(0.0f, 0.98f, progressOnStrip, false)); + color.A /= (byte) 2; + return color; + } + + private float StripWidth(float progressOnStrip) => this.trailWidth; + } + } +} diff --git a/Graphics/FlameLashDrawer.cs b/Graphics/FlameLashDrawer.cs new file mode 100644 index 0000000..0a414c8 --- /dev/null +++ b/Graphics/FlameLashDrawer.cs @@ -0,0 +1,45 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.FlameLashDrawer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.DataStructures; +using Terraria.Graphics.Shaders; + +namespace Terraria.Graphics +{ + public struct FlameLashDrawer + { + private static VertexStrip _vertexStrip = new VertexStrip(); + private float transitToDark; + + public void Draw(Projectile proj) + { + this.transitToDark = Utils.GetLerpValue(0.0f, 6f, proj.localAI[0], true); + MiscShaderData miscShaderData = GameShaders.Misc["FlameLash"]; + miscShaderData.UseSaturation(-2f); + miscShaderData.UseOpacity(MathHelper.Lerp(4f, 8f, this.transitToDark)); + miscShaderData.Apply(new DrawData?()); + FlameLashDrawer._vertexStrip.PrepareStripWithProceduralPadding(proj.oldPos, proj.oldRot, new VertexStrip.StripColorFunction(this.StripColors), new VertexStrip.StripHalfWidthFunction(this.StripWidth), -Main.screenPosition + proj.Size / 2f); + FlameLashDrawer._vertexStrip.DrawTrail(); + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + } + + private Color StripColors(float progressOnStrip) + { + float lerpValue = Utils.GetLerpValue((float) (0.0 - 0.100000001490116 * (double) this.transitToDark), (float) (0.699999988079071 - 0.200000002980232 * (double) this.transitToDark), progressOnStrip, true); + Color color = Color.Lerp(Color.Lerp(Color.White, Color.Orange, this.transitToDark * 0.5f), Color.Red, lerpValue) * (1f - Utils.GetLerpValue(0.0f, 0.98f, progressOnStrip, false)); + color.A /= (byte) 8; + return color; + } + + private float StripWidth(float progressOnStrip) + { + float lerpValue = Utils.GetLerpValue(0.0f, (float) (0.0599999986588955 + (double) this.transitToDark * 0.00999999977648258), progressOnStrip, true); + float num = (float) (1.0 - (1.0 - (double) lerpValue) * (1.0 - (double) lerpValue)); + return MathHelper.Lerp((float) (24.0 + (double) this.transitToDark * 16.0), 8f, Utils.GetLerpValue(0.0f, 1f, progressOnStrip, true)) * num; + } + } +} diff --git a/Graphics/Light/ILightingEngine.cs b/Graphics/Light/ILightingEngine.cs new file mode 100644 index 0000000..46aaa85 --- /dev/null +++ b/Graphics/Light/ILightingEngine.cs @@ -0,0 +1,23 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Light.ILightingEngine +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.Graphics.Light +{ + public interface ILightingEngine + { + void Rebuild(); + + void AddLight(int x, int y, Vector3 color); + + void ProcessArea(Rectangle area); + + Vector3 GetColor(int x, int y); + + void Clear(); + } +} diff --git a/Graphics/Light/LegacyLighting.cs b/Graphics/Light/LegacyLighting.cs new file mode 100644 index 0000000..cedaf1a --- /dev/null +++ b/Graphics/Light/LegacyLighting.cs @@ -0,0 +1,1258 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Light.LegacyLighting +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Threading; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using Terraria.DataStructures; +using Terraria.Utilities; + +namespace Terraria.Graphics.Light +{ + public class LegacyLighting : ILightingEngine + { + public static int RenderPhases = 4; + private bool _rgb = true; + private int _offScreenTiles2 = 35; + private float _oldSkyColor; + private float _skyColor; + private int _requestedRectLeft; + private int _requestedRectRight; + private int _requestedRectTop; + private int _requestedRectBottom; + private LegacyLighting.LightingState[][] _states; + private LegacyLighting.LightingState[][] _axisFlipStates; + private LegacyLighting.LightingSwipeData _swipe; + private LegacyLighting.LightingSwipeData[] _threadSwipes; + private int _scrX; + private int _scrY; + private int _minX; + private int _maxX; + private int _minY; + private int _maxY; + private const int MAX_TEMP_LIGHTS = 2000; + private Dictionary _tempLights; + private int _expandedRectLeft; + private int _expandedRectTop; + private int _expandedRectRight; + private int _expandedRectBottom; + private float _negLight = 0.04f; + private float _negLight2 = 0.16f; + private float _wetLightR = 0.16f; + private float _wetLightG = 0.16f; + private float _wetLightB = 0.16f; + private float _honeyLightR = 0.16f; + private float _honeyLightG = 0.16f; + private float _honeyLightB = 0.16f; + private float _blueWave = 1f; + private int _blueDir = 1; + private LegacyLighting.RectArea _minBoundArea; + private LegacyLighting.RectArea _requestedArea; + private LegacyLighting.RectArea _expandedArea; + private LegacyLighting.RectArea _offScreenTiles2ExpandedArea; + private TileLightScanner _tileScanner; + private readonly Camera _camera; + private World _world; + private static FastRandom _swipeRandom = FastRandom.CreateWithRandomSeed(); + private LightMap _lightMap = new LightMap(); + + public int Mode { get; set; } + + public bool IsColorOrWhiteMode => this.Mode < 2; + + public LegacyLighting(Camera camera, World world) + { + this._camera = camera; + this._world = world; + this._tileScanner = new TileLightScanner(world); + } + + public Vector3 GetColor(int x, int y) + { + int index1 = x - this._requestedRectLeft + Lighting.OffScreenTiles; + int index2 = y - this._requestedRectTop + Lighting.OffScreenTiles; + Vector2 unscaledSize = this._camera.UnscaledSize; + if (index1 < 0 || index2 < 0 || (double) index1 >= (double) unscaledSize.X / 16.0 + (double) (Lighting.OffScreenTiles * 2) + 10.0 || (double) index2 >= (double) unscaledSize.Y / 16.0 + (double) (Lighting.OffScreenTiles * 2)) + return Vector3.Zero; + LegacyLighting.LightingState lightingState = this._states[index1][index2]; + return new Vector3(lightingState.R, lightingState.G, lightingState.B); + } + + public void Rebuild() + { + this._tempLights = new Dictionary(); + this._swipe = new LegacyLighting.LightingSwipeData(); + this._threadSwipes = new LegacyLighting.LightingSwipeData[Environment.ProcessorCount]; + for (int index = 0; index < this._threadSwipes.Length; ++index) + this._threadSwipes[index] = new LegacyLighting.LightingSwipeData(); + int width = (int) this._camera.UnscaledSize.X / 16 + 90 + 10; + int height = (int) this._camera.UnscaledSize.Y / 16 + 90 + 10; + this._lightMap.SetSize(width, height); + if (this._states != null && this._states.Length >= width && this._states[0].Length >= height) + return; + this._states = new LegacyLighting.LightingState[width][]; + this._axisFlipStates = new LegacyLighting.LightingState[height][]; + for (int index = 0; index < height; ++index) + this._axisFlipStates[index] = new LegacyLighting.LightingState[width]; + for (int index1 = 0; index1 < width; ++index1) + { + LegacyLighting.LightingState[] lightingStateArray = new LegacyLighting.LightingState[height]; + for (int index2 = 0; index2 < height; ++index2) + { + LegacyLighting.LightingState lightingState = new LegacyLighting.LightingState(); + lightingStateArray[index2] = lightingState; + this._axisFlipStates[index2][index1] = lightingState; + } + this._states[index1] = lightingStateArray; + } + } + + public void AddLight(int x, int y, Vector3 color) + { + float x1 = color.X; + float y1 = color.Y; + float z = color.Z; + if (x - this._requestedRectLeft + Lighting.OffScreenTiles < 0 || (double) (x - this._requestedRectLeft + Lighting.OffScreenTiles) >= (double) this._camera.UnscaledSize.X / 16.0 + (double) (Lighting.OffScreenTiles * 2) + 10.0 || y - this._requestedRectTop + Lighting.OffScreenTiles < 0 || (double) (y - this._requestedRectTop + Lighting.OffScreenTiles) >= (double) this._camera.UnscaledSize.Y / 16.0 + (double) (Lighting.OffScreenTiles * 2) + 10.0 || this._tempLights.Count == 2000) + return; + Point16 key = new Point16(x, y); + LegacyLighting.ColorTriplet colorTriplet; + if (this._tempLights.TryGetValue(key, out colorTriplet)) + { + if (this._rgb) + { + if ((double) colorTriplet.R < (double) x1) + colorTriplet.R = x1; + if ((double) colorTriplet.G < (double) y1) + colorTriplet.G = y1; + if ((double) colorTriplet.B < (double) z) + colorTriplet.B = z; + this._tempLights[key] = colorTriplet; + } + else + { + float averageColor = (float) (((double) x1 + (double) y1 + (double) z) / 3.0); + if ((double) colorTriplet.R >= (double) averageColor) + return; + this._tempLights[key] = new LegacyLighting.ColorTriplet(averageColor); + } + } + else + { + colorTriplet = !this._rgb ? new LegacyLighting.ColorTriplet((float) (((double) x1 + (double) y1 + (double) z) / 3.0)) : new LegacyLighting.ColorTriplet(x1, y1, z); + this._tempLights.Add(key, colorTriplet); + } + } + + public void ProcessArea(Rectangle area) + { + this._oldSkyColor = this._skyColor; + float tileR = (float) Main.tileColor.R / (float) byte.MaxValue; + float tileG = (float) Main.tileColor.G / (float) byte.MaxValue; + float tileB = (float) Main.tileColor.B / (float) byte.MaxValue; + this._skyColor = (float) (((double) tileR + (double) tileG + (double) tileB) / 3.0); + if (this.IsColorOrWhiteMode) + { + this._offScreenTiles2 = 34; + Lighting.OffScreenTiles = 40; + } + else + { + this._offScreenTiles2 = 18; + Lighting.OffScreenTiles = 23; + } + this._requestedRectLeft = area.Left; + this._requestedRectRight = area.Right; + this._requestedRectTop = area.Top; + this._requestedRectBottom = area.Bottom; + this._expandedRectLeft = this._requestedRectLeft - Lighting.OffScreenTiles; + this._expandedRectTop = this._requestedRectTop - Lighting.OffScreenTiles; + this._expandedRectRight = this._requestedRectRight + Lighting.OffScreenTiles; + this._expandedRectBottom = this._requestedRectBottom + Lighting.OffScreenTiles; + ++Main.renderCount; + int maxLightArrayX = (int) this._camera.UnscaledSize.X / 16 + Lighting.OffScreenTiles * 2; + int maxLightArrayY = (int) this._camera.UnscaledSize.Y / 16 + Lighting.OffScreenTiles * 2; + if (Main.renderCount < 3) + this.DoColors(); + if (Main.renderCount == 2) + this.CopyFullyProcessedDataOver(maxLightArrayX, maxLightArrayY); + else if (!Main.renderNow) + { + this.ShiftUnProcessedDataOver(maxLightArrayX, maxLightArrayY); + if (Netplay.Connection.StatusMax > 0) + Main.mapTime = 1; + if (Main.mapDelay > 0) + --Main.mapDelay; + else if (Main.mapTime == 0 && Main.mapEnabled) + { + if (Main.renderCount == 3) + { + try + { + this.TryUpdatingMapWithLight(); + } + catch + { + } + } + } + if ((double) this._oldSkyColor != (double) this._skyColor) + this.UpdateLightToSkyColor(tileR, tileG, tileB); + } + if (Main.renderCount <= LegacyLighting.RenderPhases) + return; + this.PreRenderPhase(); + } + + private void TryUpdatingMapWithLight() + { + Main.mapTime = Main.mapTimeMax; + Main.updateMap = true; + int blackEdgeWidth = Main.Map.BlackEdgeWidth; + Vector2 unscaledPosition = this._camera.UnscaledPosition; + float x = this._camera.UnscaledSize.X; + float y = this._camera.UnscaledSize.Y; + float num1 = (float) (int) ((double) x / (double) Main.GameViewMatrix.Zoom.X); + float num2 = (float) (int) ((double) y / (double) Main.GameViewMatrix.Zoom.Y); + Vector2 translation = Main.GameViewMatrix.Translation; + Vector2 vector2 = unscaledPosition + translation; + int num3 = (int) Math.Floor((double) vector2.X / 16.0); + int num4 = (int) Math.Floor(((double) vector2.X + (double) num1) / 16.0) + 1; + int num5 = (int) Math.Floor((double) vector2.Y / 16.0); + int num6 = (int) Math.Floor(((double) vector2.Y + (double) num2) / 16.0) + 1; + int min1 = Utils.Clamp(num3, Lighting.OffScreenTiles, Main.maxTilesX - Lighting.OffScreenTiles); + int max1 = Utils.Clamp(num4, Lighting.OffScreenTiles, Main.maxTilesX - Lighting.OffScreenTiles); + int min2 = Utils.Clamp(num5, Lighting.OffScreenTiles, Main.maxTilesY - Lighting.OffScreenTiles); + int max2 = Utils.Clamp(num6, Lighting.OffScreenTiles, Main.maxTilesY - Lighting.OffScreenTiles); + Main.mapMinX = Utils.Clamp(this._requestedRectLeft, blackEdgeWidth, this._world.TileColumns - blackEdgeWidth); + Main.mapMaxX = Utils.Clamp(this._requestedRectRight, blackEdgeWidth, this._world.TileColumns - blackEdgeWidth); + Main.mapMinY = Utils.Clamp(this._requestedRectTop, blackEdgeWidth, this._world.TileRows - blackEdgeWidth); + Main.mapMaxY = Utils.Clamp(this._requestedRectBottom, blackEdgeWidth, this._world.TileRows - blackEdgeWidth); + Main.mapMinX = Utils.Clamp(Main.mapMinX, min1, max1); + Main.mapMaxX = Utils.Clamp(Main.mapMaxX, min1, max1); + Main.mapMinY = Utils.Clamp(Main.mapMinY, min2, max2); + Main.mapMaxY = Utils.Clamp(Main.mapMaxY, min2, max2); + int offScreenTiles = Lighting.OffScreenTiles; + for (int mapMinX = Main.mapMinX; mapMinX < Main.mapMaxX; ++mapMinX) + { + LegacyLighting.LightingState[] state = this._states[mapMinX - this._requestedRectLeft + offScreenTiles]; + for (int mapMinY = Main.mapMinY; mapMinY < Main.mapMaxY; ++mapMinY) + { + LegacyLighting.LightingState lightingState = state[mapMinY - this._requestedRectTop + offScreenTiles]; + Tile tile = Main.tile[mapMinX, mapMinY]; + float num7 = 0.0f; + if ((double) lightingState.R > (double) num7) + num7 = lightingState.R; + if ((double) lightingState.G > (double) num7) + num7 = lightingState.G; + if ((double) lightingState.B > (double) num7) + num7 = lightingState.B; + if (this.IsColorOrWhiteMode) + num7 *= 1.5f; + byte light = (byte) Math.Min((float) byte.MaxValue, num7 * (float) byte.MaxValue); + if ((double) mapMinY < Main.worldSurface && !tile.active() && tile.wall == (ushort) 0 && tile.liquid == (byte) 0) + light = (byte) 22; + if (light > (byte) 18 || Main.Map[mapMinX, mapMinY].Light > (byte) 0) + { + if (light < (byte) 22) + light = (byte) 22; + Main.Map.UpdateLighting(mapMinX, mapMinY, light); + } + } + } + } + + private void UpdateLightToSkyColor(float tileR, float tileG, float tileB) + { + int num1 = Utils.Clamp(this._expandedRectLeft, 0, this._world.TileColumns - 1); + int num2 = Utils.Clamp(this._expandedRectRight, 0, this._world.TileColumns - 1); + int num3 = Utils.Clamp(this._expandedRectTop, 0, this._world.TileRows - 1); + int num4 = Utils.Clamp(this._expandedRectBottom, 0, (int) Main.worldSurface - 1); + if ((double) num3 >= Main.worldSurface) + return; + for (int index1 = num1; index1 < num2; ++index1) + { + LegacyLighting.LightingState[] state = this._states[index1 - this._expandedRectLeft]; + for (int index2 = num3; index2 < num4; ++index2) + { + LegacyLighting.LightingState lightingState = state[index2 - this._expandedRectTop]; + Tile tile = Main.tile[index1, index2]; + if (tile == null) + { + tile = new Tile(); + Main.tile[index1, index2] = tile; + } + if ((!tile.active() || !Main.tileNoSunLight[(int) tile.type]) && (double) lightingState.R < (double) this._skyColor && tile.liquid < (byte) 200 && (Main.wallLight[(int) tile.wall] || tile.wall == (ushort) 73)) + { + lightingState.R = tileR; + if ((double) lightingState.G < (double) this._skyColor) + lightingState.G = tileG; + if ((double) lightingState.B < (double) this._skyColor) + lightingState.B = tileB; + } + } + } + } + + private void ShiftUnProcessedDataOver(int maxLightArrayX, int maxLightArrayY) + { + Vector2 screenLastPosition = Main.screenLastPosition; + Vector2 unscaledPosition = this._camera.UnscaledPosition; + int num1 = (int) Math.Floor((double) unscaledPosition.X / 16.0) - (int) Math.Floor((double) screenLastPosition.X / 16.0); + if (num1 > 5 || num1 < -5) + num1 = 0; + int num2; + int num3; + int num4; + if (num1 < 0) + { + num2 = -1; + num1 *= -1; + num3 = maxLightArrayX; + num4 = num1; + } + else + { + num2 = 1; + num3 = 0; + num4 = maxLightArrayX - num1; + } + int num5 = (int) Math.Floor((double) unscaledPosition.Y / 16.0) - (int) Math.Floor((double) screenLastPosition.Y / 16.0); + if (num5 > 5 || num5 < -5) + num5 = 0; + int num6; + int num7; + int num8; + if (num5 < 0) + { + num6 = -1; + num5 *= -1; + num7 = maxLightArrayY; + num8 = num5; + } + else + { + num6 = 1; + num7 = 0; + num8 = maxLightArrayY - num5; + } + if (num1 == 0 && num5 == 0) + return; + for (int index1 = num3; index1 != num4; index1 += num2) + { + LegacyLighting.LightingState[] state1 = this._states[index1]; + LegacyLighting.LightingState[] state2 = this._states[index1 + num1 * num2]; + for (int index2 = num7; index2 != num8; index2 += num6) + { + LegacyLighting.LightingState lightingState1 = state1[index2]; + LegacyLighting.LightingState lightingState2 = state2[index2 + num5 * num6]; + lightingState1.R = lightingState2.R; + lightingState1.G = lightingState2.G; + lightingState1.B = lightingState2.B; + } + } + } + + private void CopyFullyProcessedDataOver(int maxLightArrayX, int maxLightArrayY) + { + Vector2 unscaledPosition = this._camera.UnscaledPosition; + int num1 = (int) Math.Floor((double) unscaledPosition.X / 16.0) - this._scrX; + int num2 = (int) Math.Floor((double) unscaledPosition.Y / 16.0) - this._scrY; + if (num1 > 16) + num1 = 0; + if (num2 > 16) + num2 = 0; + int num3 = 0; + int num4 = maxLightArrayX; + int num5 = 0; + int num6 = maxLightArrayY; + if (num1 < 0) + num3 -= num1; + else + num4 -= num1; + if (num2 < 0) + num5 -= num2; + else + num6 -= num2; + if (this._rgb) + { + int num7 = maxLightArrayX; + if (this._states.Length <= num7 + num1) + num7 = this._states.Length - num1 - 1; + for (int index1 = num3; index1 < num7; ++index1) + { + LegacyLighting.LightingState[] state1 = this._states[index1]; + LegacyLighting.LightingState[] state2 = this._states[index1 + num1]; + int num8 = num6; + if (state2.Length <= num8 + num1) + num8 = state2.Length - num2 - 1; + for (int index2 = num5; index2 < num8; ++index2) + { + LegacyLighting.LightingState lightingState1 = state1[index2]; + LegacyLighting.LightingState lightingState2 = state2[index2 + num2]; + lightingState1.R = lightingState2.R2; + lightingState1.G = lightingState2.G2; + lightingState1.B = lightingState2.B2; + } + } + } + else + { + int num9 = num4; + if (this._states.Length <= num9 + num1) + num9 = this._states.Length - num1 - 1; + for (int index3 = num3; index3 < num9; ++index3) + { + LegacyLighting.LightingState[] state3 = this._states[index3]; + LegacyLighting.LightingState[] state4 = this._states[index3 + num1]; + int num10 = num6; + if (state4.Length <= num10 + num1) + num10 = state4.Length - num2 - 1; + for (int index4 = num5; index4 < num10; ++index4) + { + LegacyLighting.LightingState lightingState3 = state3[index4]; + LegacyLighting.LightingState lightingState4 = state4[index4 + num2]; + lightingState3.R = lightingState4.R2; + lightingState3.G = lightingState4.R2; + lightingState3.B = lightingState4.R2; + } + } + } + } + + public void Clear() + { + int num1 = (int) this._camera.UnscaledSize.X / 16 + Lighting.OffScreenTiles * 2; + int num2 = (int) this._camera.UnscaledSize.Y / 16 + Lighting.OffScreenTiles * 2; + for (int index1 = 0; index1 < num1; ++index1) + { + if (index1 < this._states.Length) + { + LegacyLighting.LightingState[] state = this._states[index1]; + for (int index2 = 0; index2 < num2; ++index2) + { + if (index2 < state.Length) + { + LegacyLighting.LightingState lightingState = state[index2]; + lightingState.R = 0.0f; + lightingState.G = 0.0f; + lightingState.B = 0.0f; + } + } + } + } + } + + private void PreRenderPhase() + { + double num1 = (double) Main.tileColor.R / (double) byte.MaxValue; + double num2 = (double) Main.tileColor.G / (double) byte.MaxValue; + double num3 = (double) Main.tileColor.B / (double) byte.MaxValue; + Stopwatch stopwatch = new Stopwatch(); + stopwatch.Start(); + int num4 = 0; + int num5 = (int) this._camera.UnscaledSize.X / 16 + Lighting.OffScreenTiles * 2 + 10; + int num6 = 0; + int num7 = (int) this._camera.UnscaledSize.Y / 16 + Lighting.OffScreenTiles * 2 + 10; + this._minX = num5; + this._maxX = num4; + this._minY = num7; + this._maxY = num6; + this._rgb = this.Mode == 0 || this.Mode == 3; + for (int index1 = num4; index1 < num5; ++index1) + { + LegacyLighting.LightingState[] state = this._states[index1]; + for (int index2 = num6; index2 < num7; ++index2) + { + LegacyLighting.LightingState lightingState = state[index2]; + lightingState.R2 = 0.0f; + lightingState.G2 = 0.0f; + lightingState.B2 = 0.0f; + lightingState.StopLight = false; + lightingState.WetLight = false; + lightingState.HoneyLight = false; + } + } + if (Main.wofNPCIndex >= 0) + { + if (Main.player[Main.myPlayer].gross) + { + try + { + int num8 = (int) this._camera.UnscaledPosition.Y / 16 - 10; + int num9 = (int) ((double) this._camera.UnscaledPosition.Y + (double) this._camera.UnscaledSize.Y) / 16 + 10; + int num10 = (int) Main.npc[Main.wofNPCIndex].position.X / 16; + int num11 = Main.npc[Main.wofNPCIndex].direction <= 0 ? num10 + 2 : num10 - 3; + int num12 = num11 + 8; + float num13 = (float) (0.5 * (double) Main.demonTorch + 1.0 * (1.0 - (double) Main.demonTorch)); + float num14 = 0.3f; + float num15 = (float) (1.0 * (double) Main.demonTorch + 0.5 * (1.0 - (double) Main.demonTorch)); + float num16 = num13 * 0.2f; + float num17 = num14 * 0.1f; + float num18 = num15 * 0.3f; + for (int index3 = num11; index3 <= num12; ++index3) + { + LegacyLighting.LightingState[] state = this._states[index3 - num11]; + for (int index4 = num8; index4 <= num9; ++index4) + { + LegacyLighting.LightingState lightingState = state[index4 - this._expandedRectTop]; + if ((double) lightingState.R2 < (double) num16) + lightingState.R2 = num16; + if ((double) lightingState.G2 < (double) num17) + lightingState.G2 = num17; + if ((double) lightingState.B2 < (double) num18) + lightingState.B2 = num18; + } + } + } + catch + { + } + } + } + int x = Utils.Clamp(this._expandedRectLeft, 5, this._world.TileColumns - 1); + int num19 = Utils.Clamp(this._expandedRectRight, 5, this._world.TileColumns - 1); + int y = Utils.Clamp(this._expandedRectTop, 5, this._world.TileRows - 1); + int num20 = Utils.Clamp(this._expandedRectBottom, 5, this._world.TileRows - 1); + Main.SceneMetrics.ScanAndExportToMain(new SceneMetricsScanSettings() + { + VisualScanArea = new Rectangle?(new Rectangle(x, y, num19 - x, num20 - y)), + BiomeScanCenterPositionInWorld = new Vector2?(Main.LocalPlayer.Center), + ScanOreFinderData = Main.LocalPlayer.accOreFinder + }); + this._tileScanner.Update(); + this._tileScanner.ExportTo(new Rectangle(x, y, num19 - x, num20 - y), this._lightMap); + for (int index5 = x; index5 < num19; ++index5) + { + LegacyLighting.LightingState[] state = this._states[index5 - this._expandedRectLeft]; + for (int index6 = y; index6 < num20; ++index6) + { + LegacyLighting.LightingState lightingState = state[index6 - this._expandedRectTop]; + if (Main.tile[index5, index6] == null) + { + Tile tile = new Tile(); + Main.tile[index5, index6] = tile; + } + Vector3 color; + this._lightMap.GetLight(index5 - x, index6 - y, out color); + if (this._rgb) + { + lightingState.R2 = color.X; + lightingState.G2 = color.Y; + lightingState.B2 = color.Z; + } + else + { + float num21 = (float) (((double) color.X + (double) color.Y + (double) color.Z) / 3.0); + lightingState.R2 = num21; + lightingState.G2 = num21; + lightingState.B2 = num21; + } + switch (this._lightMap.GetMask(index5 - x, index6 - y)) + { + case LightMaskMode.Solid: + lightingState.StopLight = true; + break; + case LightMaskMode.Water: + lightingState.WetLight = true; + break; + case LightMaskMode.Honey: + lightingState.WetLight = true; + lightingState.HoneyLight = true; + break; + } + if ((double) lightingState.R2 > 0.0 || this._rgb && ((double) lightingState.G2 > 0.0 || (double) lightingState.B2 > 0.0)) + { + int num22 = index5 - this._expandedRectLeft; + int num23 = index6 - this._expandedRectTop; + if (this._minX > num22) + this._minX = num22; + if (this._maxX < num22 + 1) + this._maxX = num22 + 1; + if (this._minY > num23) + this._minY = num23; + if (this._maxY < num23 + 1) + this._maxY = num23 + 1; + } + } + } + foreach (KeyValuePair tempLight in this._tempLights) + { + int index7 = (int) tempLight.Key.X - this._requestedRectLeft + Lighting.OffScreenTiles; + int index8 = (int) tempLight.Key.Y - this._requestedRectTop + Lighting.OffScreenTiles; + if (index7 >= 0 && (double) index7 < (double) this._camera.UnscaledSize.X / 16.0 + (double) (Lighting.OffScreenTiles * 2) + 10.0 && index8 >= 0 && (double) index8 < (double) this._camera.UnscaledSize.Y / 16.0 + (double) (Lighting.OffScreenTiles * 2) + 10.0) + { + LegacyLighting.LightingState lightingState = this._states[index7][index8]; + if ((double) lightingState.R2 < (double) tempLight.Value.R) + lightingState.R2 = tempLight.Value.R; + if ((double) lightingState.G2 < (double) tempLight.Value.G) + lightingState.G2 = tempLight.Value.G; + if ((double) lightingState.B2 < (double) tempLight.Value.B) + lightingState.B2 = tempLight.Value.B; + if (this._minX > index7) + this._minX = index7; + if (this._maxX < index7 + 1) + this._maxX = index7 + 1; + if (this._minY > index8) + this._minY = index8; + if (this._maxY < index8 + 1) + this._maxY = index8 + 1; + } + } + if (!Main.gamePaused) + this._tempLights.Clear(); + this._minX += this._expandedRectLeft; + this._maxX += this._expandedRectLeft; + this._minY += this._expandedRectTop; + this._maxY += this._expandedRectTop; + this._minBoundArea.Set(this._minX, this._maxX, this._minY, this._maxY); + this._requestedArea.Set(this._requestedRectLeft, this._requestedRectRight, this._requestedRectTop, this._requestedRectBottom); + this._expandedArea.Set(this._expandedRectLeft, this._expandedRectRight, this._expandedRectTop, this._expandedRectBottom); + this._offScreenTiles2ExpandedArea.Set(this._requestedRectLeft - this._offScreenTiles2, this._requestedRectRight + this._offScreenTiles2, this._requestedRectTop - this._offScreenTiles2, this._requestedRectBottom + this._offScreenTiles2); + this._scrX = (int) Math.Floor((double) this._camera.UnscaledPosition.X / 16.0); + this._scrY = (int) Math.Floor((double) this._camera.UnscaledPosition.Y / 16.0); + Main.renderCount = 0; + TimeLogger.LightingTime(0, stopwatch.Elapsed.TotalMilliseconds); + this.DoColors(); + } + + private void DoColors() + { + if (this.IsColorOrWhiteMode) + { + this._blueWave += (float) this._blueDir * 0.0001f; + if ((double) this._blueWave > 1.0) + { + this._blueWave = 1f; + this._blueDir = -1; + } + else if ((double) this._blueWave < 0.970000028610229) + { + this._blueWave = 0.97f; + this._blueDir = 1; + } + if (this._rgb) + { + this._negLight = 0.91f; + this._negLight2 = 0.56f; + this._honeyLightG = 0.7f * this._negLight * this._blueWave; + this._honeyLightR = 0.75f * this._negLight * this._blueWave; + this._honeyLightB = 0.6f * this._negLight * this._blueWave; + switch (Main.waterStyle) + { + case 0: + case 1: + case 7: + case 8: + this._wetLightG = 0.96f * this._negLight * this._blueWave; + this._wetLightR = 0.88f * this._negLight * this._blueWave; + this._wetLightB = 1.015f * this._negLight * this._blueWave; + break; + case 2: + this._wetLightG = 0.85f * this._negLight * this._blueWave; + this._wetLightR = 0.94f * this._negLight * this._blueWave; + this._wetLightB = 1.01f * this._negLight * this._blueWave; + break; + case 3: + this._wetLightG = 0.95f * this._negLight * this._blueWave; + this._wetLightR = 0.84f * this._negLight * this._blueWave; + this._wetLightB = 1.015f * this._negLight * this._blueWave; + break; + case 4: + this._wetLightG = 0.86f * this._negLight * this._blueWave; + this._wetLightR = 0.9f * this._negLight * this._blueWave; + this._wetLightB = 1.01f * this._negLight * this._blueWave; + break; + case 5: + this._wetLightG = 0.99f * this._negLight * this._blueWave; + this._wetLightR = 0.84f * this._negLight * this._blueWave; + this._wetLightB = 1.01f * this._negLight * this._blueWave; + break; + case 6: + this._wetLightR = 0.83f * this._negLight * this._blueWave; + this._wetLightG = 0.93f * this._negLight * this._blueWave; + this._wetLightB = 0.98f * this._negLight * this._blueWave; + break; + case 9: + this._wetLightG = 0.88f * this._negLight * this._blueWave; + this._wetLightR = 1f * this._negLight * this._blueWave; + this._wetLightB = 0.84f * this._negLight * this._blueWave; + break; + case 10: + this._wetLightG = 1f * this._negLight * this._blueWave; + this._wetLightR = 0.83f * this._negLight * this._blueWave; + this._wetLightB = 1f * this._negLight * this._blueWave; + break; + case 12: + this._wetLightG = 0.98f * this._negLight * this._blueWave; + this._wetLightR = 0.95f * this._negLight * this._blueWave; + this._wetLightB = 0.85f * this._negLight * this._blueWave; + break; + default: + this._wetLightG = 0.0f; + this._wetLightR = 0.0f; + this._wetLightB = 0.0f; + break; + } + } + else + { + this._negLight = 0.9f; + this._negLight2 = 0.54f; + this._wetLightR = 0.95f * this._negLight * this._blueWave; + } + if (Main.player[Main.myPlayer].nightVision) + { + this._negLight *= 1.03f; + this._negLight2 *= 1.03f; + } + if (Main.player[Main.myPlayer].blind) + { + this._negLight *= 0.95f; + this._negLight2 *= 0.95f; + } + if (Main.player[Main.myPlayer].blackout) + { + this._negLight *= 0.85f; + this._negLight2 *= 0.85f; + } + if (Main.player[Main.myPlayer].headcovered) + { + this._negLight *= 0.85f; + this._negLight2 *= 0.85f; + } + } + else + { + this._negLight = 0.04f; + this._negLight2 = 0.16f; + if (Main.player[Main.myPlayer].nightVision) + { + this._negLight -= 0.013f; + this._negLight2 -= 0.04f; + } + if (Main.player[Main.myPlayer].blind) + { + this._negLight += 0.03f; + this._negLight2 += 0.06f; + } + if (Main.player[Main.myPlayer].blackout) + { + this._negLight += 0.09f; + this._negLight2 += 0.18f; + } + if (Main.player[Main.myPlayer].headcovered) + { + this._negLight += 0.09f; + this._negLight2 += 0.18f; + } + this._wetLightR = this._negLight * 1.2f; + this._wetLightG = this._negLight * 1.1f; + } + int num1; + int num2; + switch (Main.renderCount) + { + case 0: + num1 = 0; + num2 = 1; + break; + case 1: + num1 = 1; + num2 = 3; + break; + case 2: + num1 = 3; + num2 = 4; + break; + default: + num1 = 0; + num2 = 0; + break; + } + Stopwatch stopwatch = new Stopwatch(); + int left = this._expandedArea.Left; + int top = this._expandedArea.Top; + for (int index = num1; index < num2; ++index) + { + stopwatch.Restart(); + int num3 = 0; + int num4 = 0; + switch (index) + { + case 0: + this._swipe.InnerLoop1Start = this._minBoundArea.Top - top; + this._swipe.InnerLoop2Start = this._minBoundArea.Bottom - top; + this._swipe.InnerLoop1End = this._requestedArea.Bottom + LegacyLighting.RenderPhases - top; + this._swipe.InnerLoop2End = this._requestedArea.Top - LegacyLighting.RenderPhases - top; + num3 = this._minBoundArea.Left - left; + num4 = this._minBoundArea.Right - left; + this._swipe.JaggedArray = this._states; + break; + case 1: + this._swipe.InnerLoop1Start = this._minBoundArea.Left - left; + this._swipe.InnerLoop2Start = this._minBoundArea.Right - left; + this._swipe.InnerLoop1End = this._requestedArea.Right + LegacyLighting.RenderPhases - left; + this._swipe.InnerLoop2End = this._requestedArea.Left - LegacyLighting.RenderPhases - left; + num3 = this._minBoundArea.Top - top; + num4 = this._minBoundArea.Bottom - top; + this._swipe.JaggedArray = this._axisFlipStates; + break; + case 2: + this._swipe.InnerLoop1Start = this._offScreenTiles2ExpandedArea.Top - top; + this._swipe.InnerLoop2Start = this._offScreenTiles2ExpandedArea.Bottom - top; + this._swipe.InnerLoop1End = this._requestedArea.Bottom + LegacyLighting.RenderPhases - top; + this._swipe.InnerLoop2End = this._requestedArea.Top - LegacyLighting.RenderPhases - top; + num3 = this._offScreenTiles2ExpandedArea.Left - left; + num4 = this._offScreenTiles2ExpandedArea.Right - left; + this._swipe.JaggedArray = this._states; + break; + case 3: + this._swipe.InnerLoop1Start = this._offScreenTiles2ExpandedArea.Left - left; + this._swipe.InnerLoop2Start = this._offScreenTiles2ExpandedArea.Right - left; + this._swipe.InnerLoop1End = this._requestedArea.Right + LegacyLighting.RenderPhases - left; + this._swipe.InnerLoop2End = this._requestedArea.Left - LegacyLighting.RenderPhases - left; + num3 = this._offScreenTiles2ExpandedArea.Top - top; + num4 = this._offScreenTiles2ExpandedArea.Bottom - top; + this._swipe.JaggedArray = this._axisFlipStates; + break; + } + if (this._swipe.InnerLoop1Start > this._swipe.InnerLoop1End) + this._swipe.InnerLoop1Start = this._swipe.InnerLoop1End; + if (this._swipe.InnerLoop2Start < this._swipe.InnerLoop2End) + this._swipe.InnerLoop2Start = this._swipe.InnerLoop2End; + if (num3 > num4) + num3 = num4; + ParallelForAction parallelForAction; + switch (this.Mode) + { + case 0: + // ISSUE: method pointer + parallelForAction = new ParallelForAction((object) this, __methodptr(doColors_Mode0_Swipe)); + break; + case 1: + // ISSUE: method pointer + parallelForAction = new ParallelForAction((object) this, __methodptr(doColors_Mode1_Swipe)); + break; + case 2: + // ISSUE: method pointer + parallelForAction = new ParallelForAction((object) this, __methodptr(doColors_Mode2_Swipe)); + break; + case 3: + // ISSUE: method pointer + parallelForAction = new ParallelForAction((object) this, __methodptr(doColors_Mode3_Swipe)); + break; + default: + // ISSUE: method pointer + parallelForAction = new ParallelForAction((object) this, __methodptr(doColors_Mode0_Swipe)); + break; + } + FastParallel.For(num3, num4, parallelForAction, (object) this._swipe); + LegacyLighting._swipeRandom.NextSeed(); + TimeLogger.LightingTime(index + 1, stopwatch.Elapsed.TotalMilliseconds); + } + } + + private void doColors_Mode0_Swipe(int outerLoopStart, int outerLoopEnd, object context) + { + LegacyLighting.LightingSwipeData lightingSwipeData = context as LegacyLighting.LightingSwipeData; + FastRandom fastRandom = new FastRandom(); + try + { + bool flag1 = true; + while (true) + { + int num1; + int val2_1; + int val2_2; + if (flag1) + { + num1 = 1; + val2_1 = lightingSwipeData.InnerLoop1Start; + val2_2 = lightingSwipeData.InnerLoop1End; + } + else + { + num1 = -1; + val2_1 = lightingSwipeData.InnerLoop2Start; + val2_2 = lightingSwipeData.InnerLoop2End; + } + int num2 = outerLoopStart; + int num3 = outerLoopEnd; + for (int index1 = num2; index1 < num3; ++index1) + { + LegacyLighting.LightingState[] jagged = lightingSwipeData.JaggedArray[index1]; + float num4 = 0.0f; + float num5 = 0.0f; + float num6 = 0.0f; + int num7 = Math.Min(jagged.Length - 1, Math.Max(0, val2_1)); + int num8 = Math.Min(jagged.Length - 1, Math.Max(0, val2_2)); + for (int index2 = num7; index2 != num8; index2 += num1) + { + LegacyLighting.LightingState lightingState1 = jagged[index2]; + LegacyLighting.LightingState lightingState2 = jagged[index2 + num1]; + bool flag2; + bool flag3 = flag2 = false; + if ((double) lightingState1.R2 > (double) num4) + num4 = lightingState1.R2; + else if ((double) num4 <= 0.0185) + flag3 = true; + else if ((double) lightingState1.R2 < (double) num4) + lightingState1.R2 = num4; + if (lightingState1.WetLight) + fastRandom = LegacyLighting._swipeRandom.WithModifier((ulong) (index1 * 1000 + index2)); + if (!flag3 && (double) lightingState2.R2 <= (double) num4) + { + if (lightingState1.StopLight) + num4 *= this._negLight2; + else if (lightingState1.WetLight) + { + if (lightingState1.HoneyLight) + num4 *= (float) ((double) this._honeyLightR * (double) fastRandom.Next(98, 100) * 0.00999999977648258); + else + num4 *= (float) ((double) this._wetLightR * (double) fastRandom.Next(98, 100) * 0.00999999977648258); + } + else + num4 *= this._negLight; + } + if ((double) lightingState1.G2 > (double) num5) + num5 = lightingState1.G2; + else if ((double) num5 <= 0.0185) + flag2 = true; + else + lightingState1.G2 = num5; + if (!flag2 && (double) lightingState2.G2 <= (double) num5) + { + if (lightingState1.StopLight) + num5 *= this._negLight2; + else if (lightingState1.WetLight) + { + if (lightingState1.HoneyLight) + num5 *= (float) ((double) this._honeyLightG * (double) fastRandom.Next(97, 100) * 0.00999999977648258); + else + num5 *= (float) ((double) this._wetLightG * (double) fastRandom.Next(97, 100) * 0.00999999977648258); + } + else + num5 *= this._negLight; + } + if ((double) lightingState1.B2 > (double) num6) + num6 = lightingState1.B2; + else if ((double) num6 > 0.0185) + lightingState1.B2 = num6; + else + continue; + if ((double) lightingState2.B2 < (double) num6) + { + if (lightingState1.StopLight) + num6 *= this._negLight2; + else if (lightingState1.WetLight) + { + if (lightingState1.HoneyLight) + num6 *= (float) ((double) this._honeyLightB * (double) fastRandom.Next(97, 100) * 0.00999999977648258); + else + num6 *= (float) ((double) this._wetLightB * (double) fastRandom.Next(97, 100) * 0.00999999977648258); + } + else + num6 *= this._negLight; + } + } + } + if (flag1) + flag1 = false; + else + break; + } + } + catch + { + } + } + + private void doColors_Mode1_Swipe(int outerLoopStart, int outerLoopEnd, object context) + { + LegacyLighting.LightingSwipeData lightingSwipeData = context as LegacyLighting.LightingSwipeData; + FastRandom fastRandom1 = new FastRandom(); + try + { + bool flag = true; + while (true) + { + int num1; + int num2; + int num3; + if (flag) + { + num1 = 1; + num2 = lightingSwipeData.InnerLoop1Start; + num3 = lightingSwipeData.InnerLoop1End; + } + else + { + num1 = -1; + num2 = lightingSwipeData.InnerLoop2Start; + num3 = lightingSwipeData.InnerLoop2End; + } + for (int index1 = outerLoopStart; index1 < outerLoopEnd; ++index1) + { + LegacyLighting.LightingState[] jagged = lightingSwipeData.JaggedArray[index1]; + float num4 = 0.0f; + for (int index2 = num2; index2 != num3; index2 += num1) + { + LegacyLighting.LightingState lightingState = jagged[index2]; + if ((double) lightingState.R2 > (double) num4) + num4 = lightingState.R2; + else if ((double) num4 > 0.0185) + { + if ((double) lightingState.R2 < (double) num4) + lightingState.R2 = num4; + } + else + continue; + if ((double) jagged[index2 + num1].R2 <= (double) num4) + { + if (lightingState.StopLight) + num4 *= this._negLight2; + else if (lightingState.WetLight) + { + FastRandom fastRandom2 = LegacyLighting._swipeRandom.WithModifier((ulong) (index1 * 1000 + index2)); + if (lightingState.HoneyLight) + num4 *= (float) ((double) this._honeyLightR * (double) fastRandom2.Next(98, 100) * 0.00999999977648258); + else + num4 *= (float) ((double) this._wetLightR * (double) fastRandom2.Next(98, 100) * 0.00999999977648258); + } + else + num4 *= this._negLight; + } + } + } + if (flag) + flag = false; + else + break; + } + } + catch + { + } + } + + private void doColors_Mode2_Swipe(int outerLoopStart, int outerLoopEnd, object context) + { + LegacyLighting.LightingSwipeData lightingSwipeData = context as LegacyLighting.LightingSwipeData; + try + { + bool flag = true; + while (true) + { + int num1; + int num2; + int num3; + if (flag) + { + num1 = 1; + num2 = lightingSwipeData.InnerLoop1Start; + num3 = lightingSwipeData.InnerLoop1End; + } + else + { + num1 = -1; + num2 = lightingSwipeData.InnerLoop2Start; + num3 = lightingSwipeData.InnerLoop2End; + } + for (int index1 = outerLoopStart; index1 < outerLoopEnd; ++index1) + { + LegacyLighting.LightingState[] jagged = lightingSwipeData.JaggedArray[index1]; + float num4 = 0.0f; + for (int index2 = num2; index2 != num3; index2 += num1) + { + LegacyLighting.LightingState lightingState = jagged[index2]; + if ((double) lightingState.R2 > (double) num4) + num4 = lightingState.R2; + else if ((double) num4 > 0.0) + lightingState.R2 = num4; + else + continue; + if (lightingState.StopLight) + num4 -= this._negLight2; + else if (lightingState.WetLight) + num4 -= this._wetLightR; + else + num4 -= this._negLight; + } + } + if (flag) + flag = false; + else + break; + } + } + catch + { + } + } + + private void doColors_Mode3_Swipe(int outerLoopStart, int outerLoopEnd, object context) + { + LegacyLighting.LightingSwipeData lightingSwipeData = context as LegacyLighting.LightingSwipeData; + try + { + bool flag1 = true; + while (true) + { + int num1; + int num2; + int num3; + if (flag1) + { + num1 = 1; + num2 = lightingSwipeData.InnerLoop1Start; + num3 = lightingSwipeData.InnerLoop1End; + } + else + { + num1 = -1; + num2 = lightingSwipeData.InnerLoop2Start; + num3 = lightingSwipeData.InnerLoop2End; + } + for (int index1 = outerLoopStart; index1 < outerLoopEnd; ++index1) + { + LegacyLighting.LightingState[] jagged = lightingSwipeData.JaggedArray[index1]; + float num4 = 0.0f; + float num5 = 0.0f; + float num6 = 0.0f; + for (int index2 = num2; index2 != num3; index2 += num1) + { + LegacyLighting.LightingState lightingState = jagged[index2]; + bool flag2; + bool flag3 = flag2 = false; + if ((double) lightingState.R2 > (double) num4) + num4 = lightingState.R2; + else if ((double) num4 <= 0.0) + flag3 = true; + else + lightingState.R2 = num4; + if (!flag3) + { + if (lightingState.StopLight) + num4 -= this._negLight2; + else if (lightingState.WetLight) + num4 -= this._wetLightR; + else + num4 -= this._negLight; + } + if ((double) lightingState.G2 > (double) num5) + num5 = lightingState.G2; + else if ((double) num5 <= 0.0) + flag2 = true; + else + lightingState.G2 = num5; + if (!flag2) + { + if (lightingState.StopLight) + num5 -= this._negLight2; + else if (lightingState.WetLight) + num5 -= this._wetLightG; + else + num5 -= this._negLight; + } + if ((double) lightingState.B2 > (double) num6) + num6 = lightingState.B2; + else if ((double) num6 > 0.0) + lightingState.B2 = num6; + else + continue; + if (lightingState.StopLight) + num6 -= this._negLight2; + else + num6 -= this._negLight; + } + } + if (flag1) + flag1 = false; + else + break; + } + } + catch + { + } + } + + public struct RectArea + { + public int Left; + public int Right; + public int Top; + public int Bottom; + + public void Set(int left, int right, int top, int bottom) + { + this.Left = left; + this.Right = right; + this.Top = top; + this.Bottom = bottom; + } + } + + private class LightingSwipeData + { + public int InnerLoop1Start; + public int InnerLoop1End; + public int InnerLoop2Start; + public int InnerLoop2End; + public LegacyLighting.LightingState[][] JaggedArray; + + public LightingSwipeData() + { + this.InnerLoop1Start = 0; + this.InnerLoop1End = 0; + this.InnerLoop2Start = 0; + this.InnerLoop2End = 0; + } + + public void CopyFrom(LegacyLighting.LightingSwipeData from) + { + this.InnerLoop1Start = from.InnerLoop1Start; + this.InnerLoop1End = from.InnerLoop1End; + this.InnerLoop2Start = from.InnerLoop2Start; + this.InnerLoop2End = from.InnerLoop2End; + this.JaggedArray = from.JaggedArray; + } + } + + private class LightingState + { + public float R; + public float R2; + public float G; + public float G2; + public float B; + public float B2; + public bool StopLight; + public bool WetLight; + public bool HoneyLight; + + public Vector3 ToVector3() => new Vector3(this.R, this.G, this.B); + } + + private struct ColorTriplet + { + public float R; + public float G; + public float B; + + public ColorTriplet(float R, float G, float B) + { + this.R = R; + this.G = G; + this.B = B; + } + + public ColorTriplet(float averageColor) => this.R = this.G = this.B = averageColor; + } + } +} diff --git a/Graphics/Light/LightMap.cs b/Graphics/Light/LightMap.cs new file mode 100644 index 0000000..1ba4cf5 --- /dev/null +++ b/Graphics/Light/LightMap.cs @@ -0,0 +1,198 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Light.LightMap +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Threading; +using Terraria.Utilities; + +namespace Terraria.Graphics.Light +{ + public class LightMap + { + private Vector3[] _colors; + private LightMaskMode[] _mask; + private FastRandom _random = FastRandom.CreateWithRandomSeed(); + private const int DEFAULT_WIDTH = 203; + private const int DEFAULT_HEIGHT = 203; + + public int NonVisiblePadding { get; set; } + + public int Width { get; private set; } + + public int Height { get; private set; } + + public float LightDecayThroughAir { get; set; } + + public float LightDecayThroughSolid { get; set; } + + public Vector3 LightDecayThroughWater { get; set; } + + public Vector3 LightDecayThroughHoney { get; set; } + + public Vector3 this[int x, int y] + { + get => this._colors[this.IndexOf(x, y)]; + set => this._colors[this.IndexOf(x, y)] = value; + } + + public LightMap() + { + this.LightDecayThroughAir = 0.91f; + this.LightDecayThroughSolid = 0.56f; + this.LightDecayThroughWater = new Vector3(0.88f, 0.96f, 1.015f) * 0.91f; + this.LightDecayThroughHoney = new Vector3(0.75f, 0.7f, 0.6f) * 0.91f; + this.Width = 203; + this.Height = 203; + this._colors = new Vector3[41209]; + this._mask = new LightMaskMode[41209]; + } + + public void GetLight(int x, int y, out Vector3 color) => color = this._colors[this.IndexOf(x, y)]; + + public LightMaskMode GetMask(int x, int y) => this._mask[this.IndexOf(x, y)]; + + public void Clear() + { + for (int index = 0; index < this._colors.Length; ++index) + { + this._colors[index].X = 0.0f; + this._colors[index].Y = 0.0f; + this._colors[index].Z = 0.0f; + this._mask[index] = LightMaskMode.None; + } + } + + public void SetMaskAt(int x, int y, LightMaskMode mode) => this._mask[this.IndexOf(x, y)] = mode; + + public void Blur() + { + this.BlurPass(); + this.BlurPass(); + this._random.NextSeed(); + } + + private void BlurPass() + { + // ISSUE: method pointer + FastParallel.For(0, this.Width, new ParallelForAction((object) this, __methodptr(\u003CBlurPass\u003Eb__42_0)), (object) null); + // ISSUE: method pointer + FastParallel.For(0, this.Height, new ParallelForAction((object) this, __methodptr(\u003CBlurPass\u003Eb__42_1)), (object) null); + } + + private void BlurLine(int startIndex, int endIndex, int stride) + { + Vector3 zero = Vector3.Zero; + bool flag1 = false; + bool flag2 = false; + bool flag3 = false; + for (int index = startIndex; index != endIndex + stride; index += stride) + { + if ((double) zero.X < (double) this._colors[index].X) + { + zero.X = this._colors[index].X; + flag1 = false; + } + else if (!flag1) + { + if ((double) zero.X < 0.0185000002384186) + flag1 = true; + else + this._colors[index].X = zero.X; + } + if ((double) zero.Y < (double) this._colors[index].Y) + { + zero.Y = this._colors[index].Y; + flag2 = false; + } + else if (!flag2) + { + if ((double) zero.Y < 0.0185000002384186) + flag2 = true; + else + this._colors[index].Y = zero.Y; + } + if ((double) zero.Z < (double) this._colors[index].Z) + { + zero.Z = this._colors[index].Z; + flag3 = false; + } + else if (!flag3) + { + if ((double) zero.Z < 0.0185000002384186) + flag3 = true; + else + this._colors[index].Z = zero.Z; + } + if (!(flag1 & flag3 & flag2)) + { + switch (this._mask[index]) + { + case LightMaskMode.None: + if (!flag1) + zero.X *= this.LightDecayThroughAir; + if (!flag2) + zero.Y *= this.LightDecayThroughAir; + if (!flag3) + { + zero.Z *= this.LightDecayThroughAir; + continue; + } + continue; + case LightMaskMode.Solid: + if (!flag1) + zero.X *= this.LightDecayThroughSolid; + if (!flag2) + zero.Y *= this.LightDecayThroughSolid; + if (!flag3) + { + zero.Z *= this.LightDecayThroughSolid; + continue; + } + continue; + case LightMaskMode.Water: + float num = (float) this._random.WithModifier((ulong) index).Next(98, 100) / 100f; + if (!flag1) + zero.X *= this.LightDecayThroughWater.X * num; + if (!flag2) + zero.Y *= this.LightDecayThroughWater.Y * num; + if (!flag3) + { + zero.Z *= this.LightDecayThroughWater.Z * num; + continue; + } + continue; + case LightMaskMode.Honey: + if (!flag1) + zero.X *= this.LightDecayThroughHoney.X; + if (!flag2) + zero.Y *= this.LightDecayThroughHoney.Y; + if (!flag3) + { + zero.Z *= this.LightDecayThroughHoney.Z; + continue; + } + continue; + default: + continue; + } + } + } + } + + private int IndexOf(int x, int y) => x * this.Height + y; + + public void SetSize(int width, int height) + { + if (width * height > this._colors.Length) + { + this._colors = new Vector3[width * height]; + this._mask = new LightMaskMode[width * height]; + } + this.Width = width; + this.Height = height; + } + } +} diff --git a/Graphics/Light/LightMaskMode.cs b/Graphics/Light/LightMaskMode.cs new file mode 100644 index 0000000..7359e3a --- /dev/null +++ b/Graphics/Light/LightMaskMode.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Light.LightMaskMode +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Graphics.Light +{ + public enum LightMaskMode : byte + { + None, + Solid, + Water, + Honey, + } +} diff --git a/Graphics/Light/LightMode.cs b/Graphics/Light/LightMode.cs new file mode 100644 index 0000000..d54cbdb --- /dev/null +++ b/Graphics/Light/LightMode.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Light.LightMode +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Graphics.Light +{ + public enum LightMode + { + White, + Retro, + Trippy, + Color, + } +} diff --git a/Graphics/Light/LightingEngine.cs b/Graphics/Light/LightingEngine.cs new file mode 100644 index 0000000..6be6e31 --- /dev/null +++ b/Graphics/Light/LightingEngine.cs @@ -0,0 +1,249 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Light.LightingEngine +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Threading; +using System.Collections.Generic; +using System.Diagnostics; + +namespace Terraria.Graphics.Light +{ + public class LightingEngine : ILightingEngine + { + private const int AREA_PADDING = 28; + private const int NON_VISIBLE_PADDING = 18; + private readonly List _perFrameLights = new List(); + private TileLightScanner _tileScanner; + private LightMap _activeLightMap = new LightMap(); + private Rectangle _activeProcessedArea; + private LightMap _workingLightMap = new LightMap(); + private Rectangle _workingProcessedArea; + private readonly Stopwatch _timer = new Stopwatch(); + private LightingEngine.EngineState _state; + + public LightingEngine(World world) => this.SetWorld(world); + + public void AddLight(int x, int y, Vector3 color) => this._perFrameLights.Add(new LightingEngine.PerFrameLight(new Point(x, y), color)); + + public void Clear() + { + this._activeLightMap.Clear(); + this._workingLightMap.Clear(); + this._perFrameLights.Clear(); + } + + public Vector3 GetColor(int x, int y) + { + if (!this._activeProcessedArea.Contains(x, y)) + return Vector3.Zero; + x -= this._activeProcessedArea.X; + y -= this._activeProcessedArea.Y; + return this._activeLightMap[x, y]; + } + + public void ProcessArea(Rectangle area) + { + Main.renderCount = (Main.renderCount + 1) % 4; + this._timer.Start(); + TimeLogger.LightingTime(0, 0.0); + switch (this._state) + { + case LightingEngine.EngineState.MinimapUpdate: + if (Main.mapDelay > 0) + --Main.mapDelay; + else + this.ExportToMiniMap(); + TimeLogger.LightingTime(1, this._timer.Elapsed.TotalMilliseconds); + break; + case LightingEngine.EngineState.ExportMetrics: + area.Inflate(28, 28); + Main.SceneMetrics.ScanAndExportToMain(new SceneMetricsScanSettings() + { + VisualScanArea = new Rectangle?(area), + BiomeScanCenterPositionInWorld = new Vector2?(Main.LocalPlayer.Center), + ScanOreFinderData = Main.LocalPlayer.accOreFinder + }); + TimeLogger.LightingTime(2, this._timer.Elapsed.TotalMilliseconds); + break; + case LightingEngine.EngineState.Scan: + this.ProcessScan(area); + TimeLogger.LightingTime(3, this._timer.Elapsed.TotalMilliseconds); + break; + case LightingEngine.EngineState.Blur: + this.ProcessBlur(); + this.Present(); + TimeLogger.LightingTime(4, this._timer.Elapsed.TotalMilliseconds); + break; + } + this.IncrementState(); + this._timer.Reset(); + } + + private void IncrementState() => this._state = (LightingEngine.EngineState) ((int) (this._state + 1) % 4); + + private void ProcessScan(Rectangle area) + { + area.Inflate(28, 28); + this._workingProcessedArea = area; + this._workingLightMap.SetSize(area.Width, area.Height); + this._workingLightMap.NonVisiblePadding = 18; + this._tileScanner.Update(); + this._tileScanner.ExportTo(area, this._workingLightMap); + } + + private void ProcessBlur() + { + this.UpdateLightDecay(); + this.ApplyPerFrameLights(); + this._workingLightMap.Blur(); + } + + private void Present() + { + Utils.Swap(ref this._activeLightMap, ref this._workingLightMap); + Utils.Swap(ref this._activeProcessedArea, ref this._workingProcessedArea); + } + + private void UpdateLightDecay() + { + LightMap workingLightMap = this._workingLightMap; + workingLightMap.LightDecayThroughAir = 0.91f; + workingLightMap.LightDecayThroughSolid = 0.56f; + workingLightMap.LightDecayThroughHoney = new Vector3(0.75f, 0.7f, 0.6f) * 0.91f; + switch (Main.waterStyle) + { + case 0: + case 1: + case 7: + case 8: + workingLightMap.LightDecayThroughWater = new Vector3(0.88f, 0.96f, 1.015f) * 0.91f; + break; + case 2: + workingLightMap.LightDecayThroughWater = new Vector3(0.94f, 0.85f, 1.01f) * 0.91f; + break; + case 3: + workingLightMap.LightDecayThroughWater = new Vector3(0.84f, 0.95f, 1.015f) * 0.91f; + break; + case 4: + workingLightMap.LightDecayThroughWater = new Vector3(0.9f, 0.86f, 1.01f) * 0.91f; + break; + case 5: + workingLightMap.LightDecayThroughWater = new Vector3(0.84f, 0.99f, 1.01f) * 0.91f; + break; + case 6: + workingLightMap.LightDecayThroughWater = new Vector3(0.83f, 0.93f, 0.98f) * 0.91f; + break; + case 9: + workingLightMap.LightDecayThroughWater = new Vector3(1f, 0.88f, 0.84f) * 0.91f; + break; + case 10: + workingLightMap.LightDecayThroughWater = new Vector3(0.83f, 1f, 1f) * 0.91f; + break; + case 12: + workingLightMap.LightDecayThroughWater = new Vector3(0.95f, 0.98f, 0.85f) * 0.91f; + break; + } + if (Main.player[Main.myPlayer].nightVision) + { + workingLightMap.LightDecayThroughAir *= 1.03f; + workingLightMap.LightDecayThroughSolid *= 1.03f; + } + if (Main.player[Main.myPlayer].blind) + { + workingLightMap.LightDecayThroughAir *= 0.95f; + workingLightMap.LightDecayThroughSolid *= 0.95f; + } + if (Main.player[Main.myPlayer].blackout) + { + workingLightMap.LightDecayThroughAir *= 0.85f; + workingLightMap.LightDecayThroughSolid *= 0.85f; + } + if (!Main.player[Main.myPlayer].headcovered) + return; + workingLightMap.LightDecayThroughAir *= 0.85f; + workingLightMap.LightDecayThroughSolid *= 0.85f; + } + + private void ApplyPerFrameLights() + { + for (int index = 0; index < this._perFrameLights.Count; ++index) + { + Point position = this._perFrameLights[index].Position; + if (this._workingProcessedArea.Contains(position)) + { + Vector3 result = this._perFrameLights[index].Color; + Vector3 workingLight = this._workingLightMap[position.X - this._workingProcessedArea.X, position.Y - this._workingProcessedArea.Y]; + Vector3.Max(ref workingLight, ref result, out result); + this._workingLightMap[position.X - this._workingProcessedArea.X, position.Y - this._workingProcessedArea.Y] = result; + } + } + this._perFrameLights.Clear(); + } + + public void Rebuild() + { + this._activeProcessedArea = Rectangle.Empty; + this._workingProcessedArea = Rectangle.Empty; + this._state = LightingEngine.EngineState.MinimapUpdate; + this._activeLightMap = new LightMap(); + this._workingLightMap = new LightMap(); + } + + private void SetWorld(World world) => this._tileScanner = new TileLightScanner(world); + + private void ExportToMiniMap() + { + // ISSUE: object of a compiler-generated type is created + // ISSUE: variable of a compiler-generated type + LightingEngine.\u003C\u003Ec__DisplayClass24_0 cDisplayClass240 = new LightingEngine.\u003C\u003Ec__DisplayClass24_0(); + // ISSUE: reference to a compiler-generated field + cDisplayClass240.\u003C\u003E4__this = this; + if (!Main.mapEnabled || this._activeProcessedArea.Width <= 0 || this._activeProcessedArea.Height <= 0) + return; + // ISSUE: reference to a compiler-generated field + cDisplayClass240.area = new Rectangle(this._activeProcessedArea.X + 28, this._activeProcessedArea.Y + 28, this._activeProcessedArea.Width - 56, this._activeProcessedArea.Height - 56); + Rectangle rectangle = new Rectangle(0, 0, Main.maxTilesX, Main.maxTilesY); + rectangle.Inflate(-Main.Map.BlackEdgeWidth, -Main.Map.BlackEdgeWidth); + // ISSUE: reference to a compiler-generated field + // ISSUE: reference to a compiler-generated field + cDisplayClass240.area = Rectangle.Intersect(cDisplayClass240.area, rectangle); + // ISSUE: reference to a compiler-generated field + Main.mapMinX = cDisplayClass240.area.Left; + // ISSUE: reference to a compiler-generated field + Main.mapMinY = cDisplayClass240.area.Top; + // ISSUE: reference to a compiler-generated field + Main.mapMaxX = cDisplayClass240.area.Right; + // ISSUE: reference to a compiler-generated field + Main.mapMaxY = cDisplayClass240.area.Bottom; + // ISSUE: reference to a compiler-generated field + // ISSUE: reference to a compiler-generated field + // ISSUE: method pointer + FastParallel.For(cDisplayClass240.area.Left, cDisplayClass240.area.Right, new ParallelForAction((object) cDisplayClass240, __methodptr(\u003CExportToMiniMap\u003Eb__0)), (object) null); + Main.updateMap = true; + } + + private enum EngineState + { + MinimapUpdate, + ExportMetrics, + Scan, + Blur, + Max, + } + + private struct PerFrameLight + { + public readonly Point Position; + public readonly Vector3 Color; + + public PerFrameLight(Point position, Vector3 color) + { + this.Position = position; + this.Color = color; + } + } + } +} diff --git a/Graphics/Light/TileLightScanner.cs b/Graphics/Light/TileLightScanner.cs new file mode 100644 index 0000000..a572433 --- /dev/null +++ b/Graphics/Light/TileLightScanner.cs @@ -0,0 +1,2170 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Light.TileLightScanner +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Threading; +using System; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.Utilities; + +namespace Terraria.Graphics.Light +{ + public class TileLightScanner + { + private readonly World _world; + private FastRandom _random = FastRandom.CreateWithRandomSeed(); + + public TileLightScanner(World world) => this._world = world; + + public void ExportTo(Rectangle area, LightMap outputMap) + { + // ISSUE: object of a compiler-generated type is created + // ISSUE: variable of a compiler-generated type + TileLightScanner.\u003C\u003Ec__DisplayClass3_0 cDisplayClass30 = new TileLightScanner.\u003C\u003Ec__DisplayClass3_0(); + // ISSUE: reference to a compiler-generated field + cDisplayClass30.area = area; + // ISSUE: reference to a compiler-generated field + cDisplayClass30.\u003C\u003E4__this = this; + // ISSUE: reference to a compiler-generated field + cDisplayClass30.outputMap = outputMap; + // ISSUE: reference to a compiler-generated field + // ISSUE: reference to a compiler-generated field + // ISSUE: method pointer + FastParallel.For(cDisplayClass30.area.Left, cDisplayClass30.area.Right, new ParallelForAction((object) cDisplayClass30, __methodptr(\u003CExportTo\u003Eb__0)), (object) null); + } + + private bool IsTileNullOrTouchingNull(int x, int y) => !WorldGen.InWorld(x, y, 1) || this._world.Tiles[x, y] == null || this._world.Tiles[x + 1, y] == null || this._world.Tiles[x - 1, y] == null || this._world.Tiles[x, y - 1] == null || this._world.Tiles[x, y + 1] == null; + + public void Update() => this._random.NextSeed(); + + public LightMaskMode GetMaskMode(int x, int y) => TileLightScanner.GetTileMask(this._world.Tiles[x, y]); + + private static LightMaskMode GetTileMask(Tile tile) + { + if ((!tile.active() || !Main.tileBlockLight[(int) tile.type] || tile.type == (ushort) 131 || tile.inActive() ? 0 : (tile.slope() == (byte) 0 ? 1 : 0)) != 0) + return LightMaskMode.Solid; + if (tile.lava() || tile.liquid <= (byte) 128) + return LightMaskMode.None; + return !tile.honey() ? LightMaskMode.Water : LightMaskMode.Honey; + } + + public void GetTileLight(int x, int y, out Vector3 outputColor) + { + outputColor = Vector3.Zero; + Tile tile = this._world.Tiles[x, y]; + FastRandom localRandom = this._random.WithModifier(x, y); + if (y < (int) Main.worldSurface) + this.ApplySurfaceLight(tile, x, y, ref outputColor); + else if (y > Main.UnderworldLayer) + this.ApplyHellLight(tile, x, y, ref outputColor); + TileLightScanner.ApplyWallLight(tile, x, y, ref localRandom, ref outputColor); + if (tile.active()) + this.ApplyTileLight(tile, x, y, ref localRandom, ref outputColor); + TileLightScanner.ApplyLavaLight(tile, ref outputColor); + } + + private static void ApplyLavaLight(Tile tile, ref Vector3 lightColor) + { + if (!tile.lava() || tile.liquid <= (byte) 0) + return; + float num = 0.55f + (float) (270 - (int) Main.mouseTextColor) / 900f; + if ((double) lightColor.X < (double) num) + lightColor.X = num; + if ((double) lightColor.Y < (double) num) + lightColor.Y = num * 0.6f; + if ((double) lightColor.Z >= (double) num) + return; + lightColor.Z = num * 0.2f; + } + + private static void ApplyWallLight( + Tile tile, + int x, + int y, + ref FastRandom localRandom, + ref Vector3 lightColor) + { + float num1 = 0.0f; + float num2 = 0.0f; + float num3 = 0.0f; + switch (tile.wall) + { + case 33: + if (!tile.active() || !Main.tileBlockLight[(int) tile.type]) + { + num1 = 0.09f; + num2 = 0.0525f; + num3 = 0.24f; + break; + } + break; + case 44: + if (!tile.active() || !Main.tileBlockLight[(int) tile.type]) + { + num1 = (float) ((double) Main.DiscoR / (double) byte.MaxValue * 0.150000005960464); + num2 = (float) ((double) Main.DiscoG / (double) byte.MaxValue * 0.150000005960464); + num3 = (float) ((double) Main.DiscoB / (double) byte.MaxValue * 0.150000005960464); + break; + } + break; + case 137: + if (!tile.active() || !Main.tileBlockLight[(int) tile.type]) + { + float num4 = 0.4f + (float) (270 - (int) Main.mouseTextColor) / 1500f + (float) localRandom.Next(0, 50) * 0.0005f; + num1 = 1f * num4; + num2 = 0.5f * num4; + num3 = 0.1f * num4; + break; + } + break; + case 153: + num1 = 0.6f; + num2 = 0.3f; + break; + case 154: + num1 = 0.6f; + num3 = 0.6f; + break; + case 155: + num1 = 0.6f; + num2 = 0.6f; + num3 = 0.6f; + break; + case 156: + num2 = 0.6f; + break; + case 164: + num1 = 0.6f; + break; + case 165: + num3 = 0.6f; + break; + case 166: + num1 = 0.6f; + num2 = 0.6f; + break; + case 174: + if (!tile.active() || !Main.tileBlockLight[(int) tile.type]) + { + num1 = 0.2975f; + break; + } + break; + case 175: + if (!tile.active() || !Main.tileBlockLight[(int) tile.type]) + { + num1 = 0.075f; + num2 = 0.15f; + num3 = 0.4f; + break; + } + break; + case 176: + if (!tile.active() || !Main.tileBlockLight[(int) tile.type]) + { + num1 = 0.1f; + num2 = 0.1f; + num3 = 0.1f; + break; + } + break; + case 182: + if (!tile.active() || !Main.tileBlockLight[(int) tile.type]) + { + num1 = 0.24f; + num2 = 0.12f; + num3 = 0.09f; + break; + } + break; + } + if ((double) lightColor.X < (double) num1) + lightColor.X = num1; + if ((double) lightColor.Y < (double) num2) + lightColor.Y = num2; + if ((double) lightColor.Z >= (double) num3) + return; + lightColor.Z = num3; + } + + private void ApplyTileLight( + Tile tile, + int x, + int y, + ref FastRandom localRandom, + ref Vector3 lightColor) + { + float R = 0.0f; + float G = 0.0f; + float B = 0.0f; + if (Main.tileLighted[(int) tile.type]) + { + switch (tile.type) + { + case 4: + if (tile.frameX < (short) 66) + { + TorchID.TorchColor((int) tile.frameY / 22, out R, out G, out B); + break; + } + break; + case 17: + case 133: + case 302: + R = 0.83f; + G = 0.6f; + B = 0.5f; + break; + case 22: + case 140: + R = 0.12f; + G = 0.07f; + B = 0.32f; + break; + case 26: + case 31: + if (tile.type == (ushort) 31 && tile.frameX >= (short) 36 || tile.type == (ushort) 26 && tile.frameX >= (short) 54) + { + float num = (float) localRandom.Next(-5, 6) * (1f / 400f); + R = (float) (0.5 + (double) num * 2.0); + G = 0.2f + num; + B = 0.1f; + break; + } + float num1 = (float) localRandom.Next(-5, 6) * (1f / 400f); + R = 0.31f + num1; + G = 0.1f; + B = (float) (0.439999997615814 + (double) num1 * 2.0); + break; + case 27: + if (tile.frameY < (short) 36) + { + R = 0.3f; + G = 0.27f; + break; + } + break; + case 33: + if (tile.frameX == (short) 0) + { + switch ((int) tile.frameY / 22) + { + case 0: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 1: + R = 0.55f; + G = 0.85f; + B = 0.35f; + break; + case 2: + R = 0.65f; + G = 0.95f; + B = 0.5f; + break; + case 3: + R = 0.2f; + G = 0.75f; + B = 1f; + break; + case 5: + R = 0.85f; + G = 0.6f; + B = 1f; + break; + case 7: + case 8: + R = 0.75f; + G = 0.85f; + B = 1f; + break; + case 9: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 10: + R = 1f; + G = 0.97f; + B = 0.85f; + break; + case 14: + R = 1f; + G = 1f; + B = 0.6f; + break; + case 15: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 18: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 19: + R = 0.37f; + G = 0.8f; + B = 1f; + break; + case 20: + R = 0.0f; + G = 0.9f; + B = 1f; + break; + case 21: + R = 0.25f; + G = 0.7f; + B = 1f; + break; + case 23: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 24: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 25: + R = (float) (0.5 * (double) Main.demonTorch + 1.0 * (1.0 - (double) Main.demonTorch)); + G = 0.3f; + B = (float) (1.0 * (double) Main.demonTorch + 0.5 * (1.0 - (double) Main.demonTorch)); + break; + case 28: + R = 0.9f; + G = 0.75f; + B = 1f; + break; + case 29: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 30: + Vector3 vector3_1 = Main.hslToRgb((float) ((double) Main.demonTorch * 0.119999997317791 + 0.689999997615814), 1f, 0.75f).ToVector3() * 1.2f; + R = vector3_1.X; + G = vector3_1.Y; + B = vector3_1.Z; + break; + case 31: + R = 1f; + G = 0.97f; + B = 0.85f; + break; + case 32: + R = 0.55f; + G = 0.45f; + B = 0.95f; + break; + case 33: + R = 1f; + G = 0.6f; + B = 0.1f; + break; + case 34: + R = 0.3f; + G = 0.75f; + B = 0.55f; + break; + case 35: + R = 0.9f; + G = 0.55f; + B = 0.7f; + break; + case 36: + R = 0.55f; + G = 0.85f; + B = 1f; + break; + case 37: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 38: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + default: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + } + } + else + break; + break; + case 34: + if ((int) tile.frameX % 108 < 54) + { + switch ((int) tile.frameY / 54 + 37 * ((int) tile.frameX / 108)) + { + case 7: + R = 0.95f; + G = 0.95f; + B = 0.5f; + break; + case 8: + R = 0.85f; + G = 0.6f; + B = 1f; + break; + case 9: + R = 1f; + G = 0.6f; + B = 0.6f; + break; + case 11: + case 12: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 13: + R = 1f; + G = 0.97f; + B = 0.85f; + break; + case 15: + R = 1f; + G = 1f; + B = 0.7f; + break; + case 16: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 17: + R = 0.75f; + G = 0.85f; + B = 1f; + break; + case 18: + R = 1f; + G = 1f; + B = 0.6f; + break; + case 19: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 23: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 24: + R = 0.37f; + G = 0.8f; + B = 1f; + break; + case 25: + R = 0.0f; + G = 0.9f; + B = 1f; + break; + case 26: + R = 0.25f; + G = 0.7f; + B = 1f; + break; + case 27: + R = 0.55f; + G = 0.85f; + B = 0.35f; + break; + case 28: + R = 0.65f; + G = 0.95f; + B = 0.5f; + break; + case 29: + R = 0.2f; + G = 0.75f; + B = 1f; + break; + case 30: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 32: + R = (float) (0.5 * (double) Main.demonTorch + 1.0 * (1.0 - (double) Main.demonTorch)); + G = 0.3f; + B = (float) (1.0 * (double) Main.demonTorch + 0.5 * (1.0 - (double) Main.demonTorch)); + break; + case 35: + R = 0.9f; + G = 0.75f; + B = 1f; + break; + case 36: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 37: + Vector3 vector3_2 = Main.hslToRgb((float) ((double) Main.demonTorch * 0.119999997317791 + 0.689999997615814), 1f, 0.75f).ToVector3() * 1.2f; + R = vector3_2.X; + G = vector3_2.Y; + B = vector3_2.Z; + break; + case 38: + R = 1f; + G = 0.97f; + B = 0.85f; + break; + case 39: + R = 0.55f; + G = 0.45f; + B = 0.95f; + break; + case 40: + R = 1f; + G = 0.6f; + B = 0.1f; + break; + case 41: + R = 0.3f; + G = 0.75f; + B = 0.55f; + break; + case 42: + R = 0.9f; + G = 0.55f; + B = 0.7f; + break; + case 43: + R = 0.55f; + G = 0.85f; + B = 1f; + break; + case 44: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 45: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + default: + R = 1f; + G = 0.95f; + B = 0.8f; + break; + } + } + else + break; + break; + case 35: + if (tile.frameX < (short) 36) + { + R = 0.75f; + G = 0.6f; + B = 0.3f; + break; + } + break; + case 37: + R = 0.56f; + G = 0.43f; + B = 0.15f; + break; + case 42: + if (tile.frameX == (short) 0) + { + switch ((int) tile.frameY / 36) + { + case 0: + R = 0.7f; + G = 0.65f; + B = 0.55f; + break; + case 1: + R = 0.9f; + G = 0.75f; + B = 0.6f; + break; + case 2: + R = 0.8f; + G = 0.6f; + B = 0.6f; + break; + case 3: + R = 0.65f; + G = 0.5f; + B = 0.2f; + break; + case 4: + R = 0.5f; + G = 0.7f; + B = 0.4f; + break; + case 5: + R = 0.9f; + G = 0.4f; + B = 0.2f; + break; + case 6: + R = 0.7f; + G = 0.75f; + B = 0.3f; + break; + case 7: + float num2 = Main.demonTorch * 0.2f; + R = 0.9f - num2; + G = 0.9f - num2; + B = 0.7f + num2; + break; + case 8: + R = 0.75f; + G = 0.6f; + B = 0.3f; + break; + case 9: + float num3 = 1f; + float num4 = 0.3f; + B = 0.5f + Main.demonTorch * 0.2f; + R = num3 - Main.demonTorch * 0.1f; + G = num4 - Main.demonTorch * 0.2f; + break; + case 11: + R = 0.85f; + G = 0.6f; + B = 1f; + break; + case 14: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 15: + case 16: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 17: + R = 1f; + G = 0.97f; + B = 0.85f; + break; + case 18: + R = 0.75f; + G = 0.85f; + B = 1f; + break; + case 21: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 22: + R = 1f; + G = 1f; + B = 0.6f; + break; + case 23: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 27: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 28: + R = 0.37f; + G = 0.8f; + B = 1f; + break; + case 29: + R = 0.0f; + G = 0.9f; + B = 1f; + break; + case 30: + R = 0.25f; + G = 0.7f; + B = 1f; + break; + case 32: + R = (float) (0.5 * (double) Main.demonTorch + 1.0 * (1.0 - (double) Main.demonTorch)); + G = 0.3f; + B = (float) (1.0 * (double) Main.demonTorch + 0.5 * (1.0 - (double) Main.demonTorch)); + break; + case 35: + R = 0.7f; + G = 0.6f; + B = 0.9f; + break; + case 36: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 37: + Vector3 vector3_3 = Main.hslToRgb((float) ((double) Main.demonTorch * 0.119999997317791 + 0.689999997615814), 1f, 0.75f).ToVector3() * 1.2f; + R = vector3_3.X; + G = vector3_3.Y; + B = vector3_3.Z; + break; + case 38: + R = 1f; + G = 0.97f; + B = 0.85f; + break; + case 39: + R = 0.55f; + G = 0.45f; + B = 0.95f; + break; + case 40: + R = 1f; + G = 0.6f; + B = 0.1f; + break; + case 41: + R = 0.3f; + G = 0.75f; + B = 0.55f; + break; + case 42: + R = 0.9f; + G = 0.55f; + B = 0.7f; + break; + case 43: + R = 0.55f; + G = 0.85f; + B = 1f; + break; + case 44: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 45: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + default: + R = 1f; + G = 1f; + B = 1f; + break; + } + } + else + break; + break; + case 49: + if (tile.frameX == (short) 0) + { + R = 0.0f; + G = 0.35f; + B = 0.8f; + break; + } + break; + case 61: + if (tile.frameX == (short) 144) + { + float num5 = (float) (1.0 + (double) (270 - (int) Main.mouseTextColor) / 400.0); + float num6 = (float) (0.800000011920929 - (double) (270 - (int) Main.mouseTextColor) / 400.0); + R = 0.42f * num6; + G = 0.81f * num5; + B = 0.52f * num6; + break; + } + break; + case 70: + case 71: + case 72: + case 190: + case 348: + case 349: + case 528: + case 578: + if (tile.type != (ushort) 349 || tile.frameX >= (short) 36) + { + float num7 = (float) localRandom.Next(28, 42) * 0.005f + (float) (270 - (int) Main.mouseTextColor) / 1000f; + R = 0.0f; + G = (float) (0.200000002980232 + (double) num7 / 2.0); + B = 1f; + break; + } + break; + case 77: + R = 0.75f; + G = 0.45f; + B = 0.25f; + break; + case 83: + if (tile.frameX == (short) 18 && !Main.dayTime) + { + R = 0.1f; + G = 0.4f; + B = 0.6f; + } + if (tile.frameX == (short) 90 && !Main.raining && Main.time > 40500.0) + { + R = 0.9f; + G = 0.72f; + B = 0.18f; + break; + } + break; + case 84: + switch ((int) tile.frameX / 18) + { + case 2: + float num8 = (float) (270 - (int) Main.mouseTextColor) / 800f; + if ((double) num8 > 1.0) + num8 = 1f; + else if ((double) num8 < 0.0) + num8 = 0.0f; + R = num8 * 0.7f; + G = num8; + B = num8 * 0.1f; + break; + case 5: + float num9 = 0.9f; + R = num9; + G = num9 * 0.8f; + B = num9 * 0.2f; + break; + case 6: + float num10 = 0.08f; + G = num10 * 0.8f; + B = num10; + break; + } + break; + case 92: + if (tile.frameY <= (short) 18 && tile.frameX == (short) 0) + { + R = 1f; + G = 1f; + B = 1f; + break; + } + break; + case 93: + if (tile.frameX == (short) 0) + { + switch ((int) tile.frameY / 54) + { + case 1: + R = 0.95f; + G = 0.95f; + B = 0.5f; + break; + case 2: + R = 0.85f; + G = 0.6f; + B = 1f; + break; + case 3: + R = 0.75f; + G = 1f; + B = 0.6f; + break; + case 4: + case 5: + R = 0.75f; + G = 0.85f; + B = 1f; + break; + case 6: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 7: + R = 1f; + G = 0.97f; + B = 0.85f; + break; + case 9: + R = 1f; + G = 1f; + B = 0.7f; + break; + case 10: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 12: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 13: + R = 1f; + G = 1f; + B = 0.6f; + break; + case 14: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 18: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 19: + R = 0.37f; + G = 0.8f; + B = 1f; + break; + case 20: + R = 0.0f; + G = 0.9f; + B = 1f; + break; + case 21: + R = 0.25f; + G = 0.7f; + B = 1f; + break; + case 23: + R = (float) (0.5 * (double) Main.demonTorch + 1.0 * (1.0 - (double) Main.demonTorch)); + G = 0.3f; + B = (float) (1.0 * (double) Main.demonTorch + 0.5 * (1.0 - (double) Main.demonTorch)); + break; + case 24: + R = 0.35f; + G = 0.5f; + B = 0.3f; + break; + case 25: + R = 0.34f; + G = 0.4f; + B = 0.31f; + break; + case 26: + R = 0.25f; + G = 0.32f; + B = 0.5f; + break; + case 29: + R = 0.9f; + G = 0.75f; + B = 1f; + break; + case 30: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 31: + Vector3 vector3_4 = Main.hslToRgb((float) ((double) Main.demonTorch * 0.119999997317791 + 0.689999997615814), 1f, 0.75f).ToVector3() * 1.2f; + R = vector3_4.X; + G = vector3_4.Y; + B = vector3_4.Z; + break; + case 32: + R = 1f; + G = 0.97f; + B = 0.85f; + break; + case 33: + R = 0.55f; + G = 0.45f; + B = 0.95f; + break; + case 34: + R = 1f; + G = 0.6f; + B = 0.1f; + break; + case 35: + R = 0.3f; + G = 0.75f; + B = 0.55f; + break; + case 36: + R = 0.9f; + G = 0.55f; + B = 0.7f; + break; + case 37: + R = 0.55f; + G = 0.85f; + B = 1f; + break; + case 38: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 39: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + default: + R = 1f; + G = 0.97f; + B = 0.85f; + break; + } + } + else + break; + break; + case 95: + if (tile.frameX < (short) 36) + { + R = 1f; + G = 0.95f; + B = 0.8f; + break; + } + break; + case 96: + if (tile.frameX >= (short) 36) + { + R = 0.5f; + G = 0.35f; + B = 0.1f; + break; + } + break; + case 98: + if (tile.frameY == (short) 0) + { + R = 1f; + G = 0.97f; + B = 0.85f; + break; + } + break; + case 100: + case 173: + if (tile.frameX < (short) 36) + { + switch ((int) tile.frameY / 36) + { + case 1: + R = 0.95f; + G = 0.95f; + B = 0.5f; + break; + case 2: + R = 0.85f; + G = 0.6f; + B = 1f; + break; + case 3: + R = 1f; + G = 0.6f; + B = 0.6f; + break; + case 5: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 6: + case 7: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 8: + R = 1f; + G = 0.97f; + B = 0.85f; + break; + case 9: + R = 0.75f; + G = 0.85f; + B = 1f; + break; + case 11: + R = 1f; + G = 1f; + B = 0.7f; + break; + case 12: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 13: + R = 1f; + G = 1f; + B = 0.6f; + break; + case 14: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 18: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 19: + R = 0.37f; + G = 0.8f; + B = 1f; + break; + case 20: + R = 0.0f; + G = 0.9f; + B = 1f; + break; + case 21: + R = 0.25f; + G = 0.7f; + B = 1f; + break; + case 22: + R = 0.35f; + G = 0.5f; + B = 0.3f; + break; + case 23: + R = 0.34f; + G = 0.4f; + B = 0.31f; + break; + case 24: + R = 0.25f; + G = 0.32f; + B = 0.5f; + break; + case 25: + R = (float) (0.5 * (double) Main.demonTorch + 1.0 * (1.0 - (double) Main.demonTorch)); + G = 0.3f; + B = (float) (1.0 * (double) Main.demonTorch + 0.5 * (1.0 - (double) Main.demonTorch)); + break; + case 29: + R = 0.9f; + G = 0.75f; + B = 1f; + break; + case 30: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 31: + Vector3 vector3_5 = Main.hslToRgb((float) ((double) Main.demonTorch * 0.119999997317791 + 0.689999997615814), 1f, 0.75f).ToVector3() * 1.2f; + R = vector3_5.X; + G = vector3_5.Y; + B = vector3_5.Z; + break; + case 32: + R = 1f; + G = 0.97f; + B = 0.85f; + break; + case 33: + R = 0.55f; + G = 0.45f; + B = 0.95f; + break; + case 34: + R = 1f; + G = 0.6f; + B = 0.1f; + break; + case 35: + R = 0.3f; + G = 0.75f; + B = 0.55f; + break; + case 36: + R = 0.9f; + G = 0.55f; + B = 0.7f; + break; + case 37: + R = 0.55f; + G = 0.85f; + B = 1f; + break; + case 38: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + case 39: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + default: + R = 1f; + G = 0.95f; + B = 0.65f; + break; + } + } + else + break; + break; + case 125: + float num11 = (float) localRandom.Next(28, 42) * 0.01f + (float) (270 - (int) Main.mouseTextColor) / 800f; + G = lightColor.Y = 0.3f * num11; + B = lightColor.Z = 0.6f * num11; + break; + case 126: + if (tile.frameX < (short) 36) + { + R = (float) Main.DiscoR / (float) byte.MaxValue; + G = (float) Main.DiscoG / (float) byte.MaxValue; + B = (float) Main.DiscoB / (float) byte.MaxValue; + break; + } + break; + case 129: + switch ((int) tile.frameX / 18 % 3) + { + case 0: + R = 0.0f; + G = 0.05f; + B = 0.25f; + break; + case 1: + R = 0.2f; + G = 0.0f; + B = 0.15f; + break; + case 2: + R = 0.1f; + G = 0.0f; + B = 0.2f; + break; + } + break; + case 149: + if (tile.frameX <= (short) 36) + { + switch ((int) tile.frameX / 18) + { + case 0: + R = 0.1f; + G = 0.2f; + B = 0.5f; + break; + case 1: + R = 0.5f; + G = 0.1f; + B = 0.1f; + break; + case 2: + R = 0.2f; + G = 0.5f; + B = 0.1f; + break; + } + R *= (float) localRandom.Next(970, 1031) * (1f / 1000f); + G *= (float) localRandom.Next(970, 1031) * (1f / 1000f); + B *= (float) localRandom.Next(970, 1031) * (1f / 1000f); + break; + } + break; + case 160: + R = (float) ((double) Main.DiscoR / (double) byte.MaxValue * 0.25); + G = (float) ((double) Main.DiscoG / (double) byte.MaxValue * 0.25); + B = (float) ((double) Main.DiscoB / (double) byte.MaxValue * 0.25); + break; + case 171: + if (tile.frameX < (short) 10) + { + x -= (int) tile.frameX; + y -= (int) tile.frameY; + } + switch (((int) this._world.Tiles[x, y].frameY & 15360) >> 10) + { + case 1: + R = 0.1f; + G = 0.1f; + B = 0.1f; + break; + case 2: + R = 0.2f; + break; + case 3: + G = 0.2f; + break; + case 4: + B = 0.2f; + break; + case 5: + R = 0.125f; + G = 0.125f; + break; + case 6: + R = 0.2f; + G = 0.1f; + break; + case 7: + R = 0.125f; + G = 0.125f; + break; + case 8: + R = 0.08f; + G = 0.175f; + break; + case 9: + G = 0.125f; + B = 0.125f; + break; + case 10: + R = 0.125f; + B = 0.125f; + break; + case 11: + R = 0.1f; + G = 0.1f; + B = 0.2f; + break; + default: + double num12; + B = (float) (num12 = 0.0); + G = (float) num12; + R = (float) num12; + break; + } + R *= 0.5f; + G *= 0.5f; + B *= 0.5f; + break; + case 174: + if (tile.frameX == (short) 0) + { + R = 1f; + G = 0.95f; + B = 0.65f; + break; + } + break; + case 184: + if (tile.frameX == (short) 110) + { + R = 0.25f; + G = 0.1f; + B = 0.0f; + } + if (tile.frameX == (short) 132) + { + R = 0.0f; + G = 0.25f; + B = 0.0f; + } + if (tile.frameX == (short) 154) + { + R = 0.0f; + G = 0.16f; + B = 0.34f; + } + if (tile.frameX == (short) 176) + { + R = 0.3f; + G = 0.0f; + B = 0.17f; + break; + } + break; + case 204: + case 347: + R = 0.35f; + break; + case 209: + if (tile.frameX == (short) 234 || tile.frameX == (short) 252) + { + Vector3 vector3_6 = PortalHelper.GetPortalColor(Main.myPlayer, 0).ToVector3() * 0.65f; + R = vector3_6.X; + G = vector3_6.Y; + B = vector3_6.Z; + break; + } + if (tile.frameX == (short) 306 || tile.frameX == (short) 324) + { + Vector3 vector3_7 = PortalHelper.GetPortalColor(Main.myPlayer, 1).ToVector3() * 0.65f; + R = vector3_7.X; + G = vector3_7.Y; + B = vector3_7.Z; + break; + } + break; + case 215: + if (tile.frameY < (short) 36) + { + float num13 = (float) localRandom.Next(28, 42) * 0.005f + (float) (270 - (int) Main.mouseTextColor) / 700f; + float num14; + float num15; + float num16; + switch ((int) tile.frameX / 54) + { + case 1: + num14 = 0.7f; + num15 = 1f; + num16 = 0.5f; + break; + case 2: + num14 = (float) (0.5 * (double) Main.demonTorch + 1.0 * (1.0 - (double) Main.demonTorch)); + num15 = 0.3f; + num16 = (float) (1.0 * (double) Main.demonTorch + 0.5 * (1.0 - (double) Main.demonTorch)); + break; + case 3: + num14 = 0.45f; + num15 = 0.75f; + num16 = 1f; + break; + case 4: + num14 = 1.15f; + num15 = 1.15f; + num16 = 0.5f; + break; + case 5: + num14 = (float) Main.DiscoR / (float) byte.MaxValue; + num15 = (float) Main.DiscoG / (float) byte.MaxValue; + num16 = (float) Main.DiscoB / (float) byte.MaxValue; + break; + case 6: + num14 = 0.75f; + num15 = 1.2825f; + num16 = 1.2f; + break; + case 7: + num14 = 0.95f; + num15 = 0.65f; + num16 = 1.3f; + break; + case 8: + num14 = 1.4f; + num15 = 0.85f; + num16 = 0.55f; + break; + case 9: + num14 = 0.25f; + num15 = 1.3f; + num16 = 0.8f; + break; + case 10: + num14 = 0.95f; + num15 = 0.4f; + num16 = 1.4f; + break; + case 11: + num14 = 1.4f; + num15 = 0.7f; + num16 = 0.5f; + break; + case 12: + num14 = 1.25f; + num15 = 0.6f; + num16 = 1.2f; + break; + case 13: + num14 = 0.75f; + num15 = 1.45f; + num16 = 0.9f; + break; + default: + num14 = 0.9f; + num15 = 0.3f; + num16 = 0.1f; + break; + } + R = num14 + num13; + G = num15 + num13; + B = num16 + num13; + break; + } + break; + case 235: + if ((double) lightColor.X < 0.6) + lightColor.X = 0.6f; + if ((double) lightColor.Y < 0.6) + { + lightColor.Y = 0.6f; + break; + } + break; + case 237: + R = 0.1f; + G = 0.1f; + break; + case 238: + if ((double) lightColor.X < 0.5) + lightColor.X = 0.5f; + if ((double) lightColor.Z < 0.5) + { + lightColor.Z = 0.5f; + break; + } + break; + case 262: + R = 0.75f; + B = 0.75f; + break; + case 263: + R = 0.75f; + G = 0.75f; + break; + case 264: + B = 0.75f; + break; + case 265: + G = 0.75f; + break; + case 266: + R = 0.75f; + break; + case 267: + R = 0.75f; + G = 0.75f; + B = 0.75f; + break; + case 268: + R = 0.75f; + G = 0.375f; + break; + case 270: + R = 0.73f; + G = 1f; + B = 0.41f; + break; + case 271: + R = 0.45f; + G = 0.95f; + B = 1f; + break; + case 286: + case 619: + R = 0.1f; + G = 0.2f; + B = 0.7f; + break; + case 316: + case 317: + case 318: + int index = (x - (int) tile.frameX / 18) / 2 * ((y - (int) tile.frameY / 18) / 3) % Main.cageFrames; + bool flag1 = Main.jellyfishCageMode[(int) tile.type - 316, index] == (byte) 2; + if (tile.type == (ushort) 316) + { + if (flag1) + { + R = 0.2f; + G = 0.3f; + B = 0.8f; + } + else + { + R = 0.1f; + G = 0.2f; + B = 0.5f; + } + } + if (tile.type == (ushort) 317) + { + if (flag1) + { + R = 0.2f; + G = 0.7f; + B = 0.3f; + } + else + { + R = 0.05f; + G = 0.45f; + B = 0.1f; + } + } + if (tile.type == (ushort) 318) + { + if (flag1) + { + R = 0.7f; + G = 0.2f; + B = 0.5f; + break; + } + R = 0.4f; + G = 0.1f; + B = 0.25f; + break; + } + break; + case 327: + float num17 = 0.5f + (float) (270 - (int) Main.mouseTextColor) / 1500f + (float) localRandom.Next(0, 50) * 0.0005f; + R = 1f * num17; + G = 0.5f * num17; + B = 0.1f * num17; + break; + case 336: + R = 0.85f; + G = 0.5f; + B = 0.3f; + break; + case 340: + R = 0.45f; + G = 1f; + B = 0.45f; + break; + case 341: + R = (float) (0.400000005960464 * (double) Main.demonTorch + 0.600000023841858 * (1.0 - (double) Main.demonTorch)); + G = 0.35f; + B = (float) (1.0 * (double) Main.demonTorch + 0.600000023841858 * (1.0 - (double) Main.demonTorch)); + break; + case 342: + R = 0.5f; + G = 0.5f; + B = 1.1f; + break; + case 343: + R = 0.85f; + G = 0.85f; + B = 0.3f; + break; + case 344: + R = 0.6f; + G = 1.026f; + B = 0.96f; + break; + case 350: + double num18 = Main.timeForVisualEffects * 0.08; + double num19; + R = (float) (num19 = -Math.Cos((int) (num18 / 6.283) % 3 == 1 ? num18 : 0.0) * 0.1 + 0.1); + G = (float) num19; + B = (float) num19; + break; + case 354: + R = 0.65f; + G = 0.35f; + B = 0.15f; + break; + case 370: + R = 0.32f; + G = 0.16f; + B = 0.12f; + break; + case 372: + if (tile.frameX == (short) 0) + { + R = 0.9f; + G = 0.1f; + B = 0.75f; + break; + } + break; + case 381: + case 517: + R = 0.25f; + G = 0.1f; + B = 0.0f; + break; + case 390: + R = 0.4f; + G = 0.2f; + B = 0.1f; + break; + case 391: + R = 0.3f; + G = 0.1f; + B = 0.25f; + break; + case 405: + if (tile.frameX < (short) 54) + { + float num20 = (float) localRandom.Next(28, 42) * 0.005f + (float) (270 - (int) Main.mouseTextColor) / 700f; + float num21; + float num22; + float num23; + switch ((int) tile.frameX / 54) + { + case 1: + num21 = 0.7f; + num22 = 1f; + num23 = 0.5f; + break; + case 2: + num21 = (float) (0.5 * (double) Main.demonTorch + 1.0 * (1.0 - (double) Main.demonTorch)); + num22 = 0.3f; + num23 = (float) (1.0 * (double) Main.demonTorch + 0.5 * (1.0 - (double) Main.demonTorch)); + break; + case 3: + num21 = 0.45f; + num22 = 0.75f; + num23 = 1f; + break; + case 4: + num21 = 1.15f; + num22 = 1.15f; + num23 = 0.5f; + break; + case 5: + num21 = (float) Main.DiscoR / (float) byte.MaxValue; + num22 = (float) Main.DiscoG / (float) byte.MaxValue; + num23 = (float) Main.DiscoB / (float) byte.MaxValue; + break; + default: + num21 = 0.9f; + num22 = 0.3f; + num23 = 0.1f; + break; + } + R = num21 + num20; + G = num22 + num20; + B = num23 + num20; + break; + } + break; + case 415: + R = 0.7f; + G = 0.5f; + B = 0.1f; + break; + case 416: + R = 0.0f; + G = 0.6f; + B = 0.7f; + break; + case 417: + R = 0.6f; + G = 0.2f; + B = 0.6f; + break; + case 418: + R = 0.6f; + G = 0.6f; + B = 0.9f; + break; + case 429: + int num24 = (int) tile.frameX / 18; + bool flag2 = num24 % 2 >= 1; + bool flag3 = num24 % 4 >= 2; + bool flag4 = num24 % 8 >= 4; + int num25 = num24 % 16 >= 8 ? 1 : 0; + if (flag2) + R += 0.5f; + if (flag3) + G += 0.5f; + if (flag4) + B += 0.5f; + if (num25 != 0) + { + R += 0.2f; + G += 0.2f; + break; + } + break; + case 463: + R = 0.2f; + G = 0.4f; + B = 0.8f; + break; + case 491: + R = 0.5f; + G = 0.4f; + B = 0.7f; + break; + case 500: + R = 0.525f; + G = 0.375f; + B = 0.075f; + break; + case 501: + R = 0.0f; + G = 0.45f; + B = 0.525f; + break; + case 502: + R = 0.45f; + G = 0.15f; + B = 0.45f; + break; + case 503: + R = 0.45f; + G = 0.45f; + B = 0.675f; + break; + case 519: + if (tile.frameY == (short) 90) + { + float num26 = (float) localRandom.Next(28, 42) * 0.005f + (float) (270 - (int) Main.mouseTextColor) / 1000f; + R = 0.1f; + G = (float) (0.200000002980232 + (double) num26 / 2.0); + B = 0.7f + num26; + break; + } + break; + case 534: + case 535: + R = 0.0f; + G = 0.25f; + B = 0.0f; + break; + case 536: + case 537: + R = 0.0f; + G = 0.16f; + B = 0.34f; + break; + case 539: + case 540: + R = 0.3f; + G = 0.0f; + B = 0.17f; + break; + case 548: + if ((int) tile.frameX / 54 >= 7) + { + R = 0.7f; + G = 0.3f; + B = 0.2f; + break; + } + break; + case 564: + if (tile.frameX < (short) 36) + { + R = 0.05f; + G = 0.3f; + B = 0.55f; + break; + } + break; + case 568: + R = 1f; + G = 0.61f; + B = 0.65f; + break; + case 569: + R = 0.12f; + G = 1f; + B = 0.66f; + break; + case 570: + R = 0.57f; + G = 0.57f; + B = 1f; + break; + case 572: + switch ((int) tile.frameY / 36) + { + case 0: + R = 0.9f; + G = 0.5f; + B = 0.7f; + break; + case 1: + R = 0.7f; + G = 0.55f; + B = 0.96f; + break; + case 2: + R = 0.45f; + G = 0.96f; + B = 0.95f; + break; + case 3: + R = 0.5f; + G = 0.96f; + B = 0.62f; + break; + case 4: + R = 0.47f; + G = 0.69f; + B = 0.95f; + break; + case 5: + R = 0.92f; + G = 0.57f; + B = 0.51f; + break; + } + break; + case 580: + R = 0.7f; + G = 0.3f; + B = 0.2f; + break; + case 581: + R = 1f; + G = 0.75f; + B = 0.5f; + break; + case 582: + case 598: + R = 0.7f; + G = 0.2f; + B = 0.1f; + break; + case 592: + if (tile.frameY > (short) 0) + { + float num27 = (float) localRandom.Next(28, 42) * 0.005f + (float) (270 - (int) Main.mouseTextColor) / 700f; + float num28 = 1.35f; + float num29 = 0.45f; + float num30 = 0.15f; + R = num28 + num27; + G = num29 + num27; + B = num30 + num27; + break; + } + break; + case 593: + if (tile.frameX < (short) 18) + { + R = 0.8f; + G = 0.3f; + B = 0.1f; + break; + } + break; + case 594: + if (tile.frameX < (short) 36) + { + R = 0.8f; + G = 0.3f; + B = 0.1f; + break; + } + break; + case 597: + switch ((int) tile.frameX / 54) + { + case 0: + R = 0.05f; + G = 0.8f; + B = 0.3f; + break; + case 1: + R = 0.7f; + G = 0.8f; + B = 0.05f; + break; + case 2: + R = 0.7f; + G = 0.5f; + B = 0.9f; + break; + case 3: + R = 0.6f; + G = 0.6f; + B = 0.8f; + break; + case 4: + R = 0.4f; + G = 0.4f; + B = 1.15f; + break; + case 5: + R = 0.85f; + G = 0.45f; + B = 0.1f; + break; + case 6: + R = 0.8f; + G = 0.8f; + B = 1f; + break; + case 7: + R = 0.5f; + G = 0.8f; + B = 1.2f; + break; + } + R *= 0.75f; + G *= 0.75f; + B *= 0.75f; + break; + case 613: + case 614: + R = 0.7f; + G = 0.3f; + B = 0.2f; + break; + case 620: + Color color = new Color(230, 230, 230, 0).MultiplyRGBA(Main.hslToRgb((float) ((double) Main.GlobalTimeWrappedHourly * 0.5 % 1.0), 1f, 0.5f)) * 0.4f; + R = (float) color.R / (float) byte.MaxValue; + G = (float) color.G / (float) byte.MaxValue; + B = (float) color.B / (float) byte.MaxValue; + break; + } + } + if ((double) lightColor.X < (double) R) + lightColor.X = R; + if ((double) lightColor.Y < (double) G) + lightColor.Y = G; + if ((double) lightColor.Z >= (double) B) + return; + lightColor.Z = B; + } + + private void ApplySurfaceLight(Tile tile, int x, int y, ref Vector3 lightColor) + { + float num1 = 0.0f; + float num2 = 0.0f; + float num3 = 0.0f; + float num4 = (float) Main.tileColor.R / (float) byte.MaxValue; + float num5 = (float) Main.tileColor.G / (float) byte.MaxValue; + float num6 = (float) Main.tileColor.B / (float) byte.MaxValue; + float num7 = (float) (((double) num4 + (double) num5 + (double) num6) / 3.0); + if (tile.active() && TileID.Sets.AllowLightInWater[(int) tile.type]) + { + if ((double) lightColor.X < (double) num7 && (Main.wallLight[(int) tile.wall] || tile.wall == (ushort) 73 || tile.wall == (ushort) 227)) + { + num1 = num4; + num2 = num5; + num3 = num6; + } + } + else if ((!tile.active() || !Main.tileNoSunLight[(int) tile.type] || (tile.slope() != (byte) 0 || tile.halfBrick()) && this._world.Tiles[x, y - 1].liquid == (byte) 0 && this._world.Tiles[x, y + 1].liquid == (byte) 0 && this._world.Tiles[x - 1, y].liquid == (byte) 0 && this._world.Tiles[x + 1, y].liquid == (byte) 0) && (double) lightColor.X < (double) num7 && (Main.wallLight[(int) tile.wall] || tile.wall == (ushort) 73 || tile.wall == (ushort) 227) && tile.liquid < (byte) 200 && (!tile.halfBrick() || this._world.Tiles[x, y - 1].liquid < (byte) 200)) + { + num1 = num4; + num2 = num5; + num3 = num6; + } + if ((!tile.active() || tile.halfBrick() || !Main.tileNoSunLight[(int) tile.type]) && (tile.wall >= (ushort) 88 && tile.wall <= (ushort) 93 || tile.wall == (ushort) 241) && tile.liquid < byte.MaxValue) + { + num1 = num4; + num2 = num5; + num3 = num6; + int num8 = (int) tile.wall - 88; + if (tile.wall == (ushort) 241) + num8 = 6; + switch (num8) + { + case 0: + num1 *= 0.9f; + num2 *= 0.15f; + num3 *= 0.9f; + break; + case 1: + num1 *= 0.9f; + num2 *= 0.9f; + num3 *= 0.15f; + break; + case 2: + num1 *= 0.15f; + num2 *= 0.15f; + num3 *= 0.9f; + break; + case 3: + num1 *= 0.15f; + num2 *= 0.9f; + num3 *= 0.15f; + break; + case 4: + num1 *= 0.9f; + num2 *= 0.15f; + num3 *= 0.15f; + break; + case 5: + float num9 = 0.2f; + float num10 = 0.7f - num9; + num1 *= num10 + (float) Main.DiscoR / (float) byte.MaxValue * num9; + num2 *= num10 + (float) Main.DiscoG / (float) byte.MaxValue * num9; + num3 *= num10 + (float) Main.DiscoB / (float) byte.MaxValue * num9; + break; + case 6: + num1 *= 0.9f; + num2 *= 0.5f; + num3 *= 0.0f; + break; + } + } + if ((double) lightColor.X < (double) num1) + lightColor.X = num1; + if ((double) lightColor.Y < (double) num2) + lightColor.Y = num2; + if ((double) lightColor.Z >= (double) num3) + return; + lightColor.Z = num3; + } + + private void ApplyHellLight(Tile tile, int x, int y, ref Vector3 lightColor) + { + float num1 = 0.0f; + float num2 = 0.0f; + float num3 = 0.0f; + float num4 = (float) (0.550000011920929 + Math.Sin((double) Main.GlobalTimeWrappedHourly * 2.0) * 0.0799999982118607); + if ((!tile.active() || !Main.tileNoSunLight[(int) tile.type] || (tile.slope() != (byte) 0 || tile.halfBrick()) && this._world.Tiles[x, y - 1].liquid == (byte) 0 && this._world.Tiles[x, y + 1].liquid == (byte) 0 && this._world.Tiles[x - 1, y].liquid == (byte) 0 && this._world.Tiles[x + 1, y].liquid == (byte) 0) && (double) lightColor.X < (double) num4 && (Main.wallLight[(int) tile.wall] || tile.wall == (ushort) 73 || tile.wall == (ushort) 227) && tile.liquid < (byte) 200 && (!tile.halfBrick() || this._world.Tiles[x, y - 1].liquid < (byte) 200)) + { + num1 = num4; + num2 = num4 * 0.6f; + num3 = num4 * 0.2f; + } + if ((!tile.active() || tile.halfBrick() || !Main.tileNoSunLight[(int) tile.type]) && tile.wall >= (ushort) 88 && tile.wall <= (ushort) 93 && tile.liquid < byte.MaxValue) + { + num1 = num4; + num2 = num4 * 0.6f; + num3 = num4 * 0.2f; + switch (tile.wall) + { + case 88: + num1 *= 0.9f; + num2 *= 0.15f; + num3 *= 0.9f; + break; + case 89: + num1 *= 0.9f; + num2 *= 0.9f; + num3 *= 0.15f; + break; + case 90: + num1 *= 0.15f; + num2 *= 0.15f; + num3 *= 0.9f; + break; + case 91: + num1 *= 0.15f; + num2 *= 0.9f; + num3 *= 0.15f; + break; + case 92: + num1 *= 0.9f; + num2 *= 0.15f; + num3 *= 0.15f; + break; + case 93: + float num5 = 0.2f; + float num6 = 0.7f - num5; + num1 *= num6 + (float) Main.DiscoR / (float) byte.MaxValue * num5; + num2 *= num6 + (float) Main.DiscoG / (float) byte.MaxValue * num5; + num3 *= num6 + (float) Main.DiscoB / (float) byte.MaxValue * num5; + break; + } + } + if ((double) lightColor.X < (double) num1) + lightColor.X = num1; + if ((double) lightColor.Y < (double) num2) + lightColor.Y = num2; + if ((double) lightColor.Z >= (double) num3) + return; + lightColor.Z = num3; + } + } +} diff --git a/Graphics/MagicMissileDrawer.cs b/Graphics/MagicMissileDrawer.cs new file mode 100644 index 0000000..5344bb9 --- /dev/null +++ b/Graphics/MagicMissileDrawer.cs @@ -0,0 +1,39 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.MagicMissileDrawer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Runtime.InteropServices; +using Terraria.DataStructures; +using Terraria.Graphics.Shaders; + +namespace Terraria.Graphics +{ + [StructLayout(LayoutKind.Sequential, Size = 1)] + public struct MagicMissileDrawer + { + private static VertexStrip _vertexStrip = new VertexStrip(); + + public void Draw(Projectile proj) + { + MiscShaderData miscShaderData = GameShaders.Misc["MagicMissile"]; + miscShaderData.UseSaturation(-2.8f); + miscShaderData.UseOpacity(2f); + miscShaderData.Apply(new DrawData?()); + MagicMissileDrawer._vertexStrip.PrepareStripWithProceduralPadding(proj.oldPos, proj.oldRot, new VertexStrip.StripColorFunction(this.StripColors), new VertexStrip.StripHalfWidthFunction(this.StripWidth), -Main.screenPosition + proj.Size / 2f); + MagicMissileDrawer._vertexStrip.DrawTrail(); + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + } + + private Color StripColors(float progressOnStrip) + { + Color color = Color.Lerp(Color.White, Color.Violet, Utils.GetLerpValue(0.0f, 0.7f, progressOnStrip, true)) * (1f - Utils.GetLerpValue(0.0f, 0.98f, progressOnStrip, false)); + color.A /= (byte) 2; + return color; + } + + private float StripWidth(float progressOnStrip) => MathHelper.Lerp(26f, 32f, Utils.GetLerpValue(0.0f, 0.2f, progressOnStrip, true)) * Utils.GetLerpValue(0.0f, 0.07f, progressOnStrip, true); + } +} diff --git a/Graphics/RainbowRodDrawer.cs b/Graphics/RainbowRodDrawer.cs new file mode 100644 index 0000000..b4b9667 --- /dev/null +++ b/Graphics/RainbowRodDrawer.cs @@ -0,0 +1,44 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.RainbowRodDrawer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Runtime.InteropServices; +using Terraria.DataStructures; +using Terraria.Graphics.Shaders; + +namespace Terraria.Graphics +{ + [StructLayout(LayoutKind.Sequential, Size = 1)] + public struct RainbowRodDrawer + { + private static VertexStrip _vertexStrip = new VertexStrip(); + + public void Draw(Projectile proj) + { + MiscShaderData miscShaderData = GameShaders.Misc["RainbowRod"]; + miscShaderData.UseSaturation(-2.8f); + miscShaderData.UseOpacity(4f); + miscShaderData.Apply(new DrawData?()); + RainbowRodDrawer._vertexStrip.PrepareStripWithProceduralPadding(proj.oldPos, proj.oldRot, new VertexStrip.StripColorFunction(this.StripColors), new VertexStrip.StripHalfWidthFunction(this.StripWidth), -Main.screenPosition + proj.Size / 2f); + RainbowRodDrawer._vertexStrip.DrawTrail(); + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + } + + private Color StripColors(float progressOnStrip) + { + Color color = Color.Lerp(Color.White, Main.hslToRgb((float) (((double) progressOnStrip * 1.60000002384186 - (double) Main.GlobalTimeWrappedHourly) % 1.0), 1f, 0.5f), Utils.GetLerpValue(-0.2f, 0.5f, progressOnStrip, true)) * (1f - Utils.GetLerpValue(0.0f, 0.98f, progressOnStrip, false)); + color.A = (byte) 0; + return color; + } + + private float StripWidth(float progressOnStrip) + { + float num = 1f; + float lerpValue = Utils.GetLerpValue(0.0f, 0.2f, progressOnStrip, true); + return MathHelper.Lerp(0.0f, 32f, num * (float) (1.0 - (1.0 - (double) lerpValue) * (1.0 - (double) lerpValue))); + } + } +} diff --git a/Graphics/Renderers/ABasicParticle.cs b/Graphics/Renderers/ABasicParticle.cs new file mode 100644 index 0000000..e1e8061 --- /dev/null +++ b/Graphics/Renderers/ABasicParticle.cs @@ -0,0 +1,88 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Renderers.ABasicParticle +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; + +namespace Terraria.Graphics.Renderers +{ + public abstract class ABasicParticle : IPooledParticle, IParticle + { + public Vector2 AccelerationPerFrame; + public Vector2 Velocity; + public Vector2 LocalPosition; + protected Asset _texture; + protected Rectangle _frame; + protected Vector2 _origin; + public float Rotation; + public float RotationVelocity; + public float RotationAcceleration; + public Vector2 Scale; + public Vector2 ScaleVelocity; + public Vector2 ScaleAcceleration; + + public bool ShouldBeRemovedFromRenderer { get; protected set; } + + public ABasicParticle() + { + this._texture = (Asset) null; + this._frame = Rectangle.Empty; + this._origin = Vector2.Zero; + this.Velocity = Vector2.Zero; + this.LocalPosition = Vector2.Zero; + this.ShouldBeRemovedFromRenderer = false; + } + + public virtual void SetBasicInfo( + Asset textureAsset, + Rectangle? frame, + Vector2 initialVelocity, + Vector2 initialLocalPosition) + { + this._texture = textureAsset; + this._frame = frame.HasValue ? frame.Value : this._texture.Frame(); + this._origin = this._frame.Size() / 2f; + this.Velocity = initialVelocity; + this.LocalPosition = initialLocalPosition; + this.ShouldBeRemovedFromRenderer = false; + } + + public virtual void Update(ref ParticleRendererSettings settings) + { + this.Velocity += this.AccelerationPerFrame; + this.LocalPosition += this.Velocity; + this.RotationVelocity += this.RotationAcceleration; + this.Rotation += this.RotationVelocity; + this.ScaleVelocity += this.ScaleAcceleration; + this.Scale += this.ScaleVelocity; + } + + public abstract void Draw(ref ParticleRendererSettings settings, SpriteBatch spritebatch); + + public bool IsRestingInPool { get; private set; } + + public void RestInPool() => this.IsRestingInPool = true; + + public virtual void FetchFromPool() + { + this.IsRestingInPool = false; + this.ShouldBeRemovedFromRenderer = false; + this.AccelerationPerFrame = Vector2.Zero; + this.Velocity = Vector2.Zero; + this.LocalPosition = Vector2.Zero; + this._texture = (Asset) null; + this._frame = Rectangle.Empty; + this._origin = Vector2.Zero; + this.Rotation = 0.0f; + this.RotationVelocity = 0.0f; + this.RotationAcceleration = 0.0f; + this.Scale = Vector2.Zero; + this.ScaleVelocity = Vector2.Zero; + this.ScaleAcceleration = Vector2.Zero; + } + } +} diff --git a/Graphics/Renderers/CreativeSacrificeParticle.cs b/Graphics/Renderers/CreativeSacrificeParticle.cs new file mode 100644 index 0000000..380d5bd --- /dev/null +++ b/Graphics/Renderers/CreativeSacrificeParticle.cs @@ -0,0 +1,59 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Renderers.CreativeSacrificeParticle +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; + +namespace Terraria.Graphics.Renderers +{ + public class CreativeSacrificeParticle : IParticle + { + public Vector2 AccelerationPerFrame; + public Vector2 Velocity; + public Vector2 LocalPosition; + public float ScaleOffsetPerFrame; + public float StopWhenBelowXScale; + private Asset _texture; + private Rectangle _frame; + private Vector2 _origin; + private float _scale; + + public bool ShouldBeRemovedFromRenderer { get; private set; } + + public CreativeSacrificeParticle( + Asset textureAsset, + Rectangle? frame, + Vector2 initialVelocity, + Vector2 initialLocalPosition) + { + this._texture = textureAsset; + this._frame = frame.HasValue ? frame.Value : this._texture.Frame(); + this._origin = this._frame.Size() / 2f; + this.Velocity = initialVelocity; + this.LocalPosition = initialLocalPosition; + this.StopWhenBelowXScale = 0.0f; + this.ShouldBeRemovedFromRenderer = false; + this._scale = 0.6f; + } + + public void Update(ref ParticleRendererSettings settings) + { + this.Velocity += this.AccelerationPerFrame; + this.LocalPosition += this.Velocity; + this._scale += this.ScaleOffsetPerFrame; + if ((double) this._scale > (double) this.StopWhenBelowXScale) + return; + this.ShouldBeRemovedFromRenderer = true; + } + + public void Draw(ref ParticleRendererSettings settings, SpriteBatch spritebatch) + { + Color color = Color.Lerp(Color.White, new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), Utils.GetLerpValue(0.1f, 0.5f, this._scale, false)); + spritebatch.Draw(this._texture.Value, settings.AnchorPosition + this.LocalPosition, new Rectangle?(this._frame), color, 0.0f, this._origin, this._scale, SpriteEffects.None, 0.0f); + } + } +} diff --git a/Graphics/Renderers/FadingParticle.cs b/Graphics/Renderers/FadingParticle.cs new file mode 100644 index 0000000..0877ba4 --- /dev/null +++ b/Graphics/Renderers/FadingParticle.cs @@ -0,0 +1,47 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Renderers.FadingParticle +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.Graphics.Renderers +{ + public class FadingParticle : ABasicParticle + { + public float FadeInNormalizedTime; + public float FadeOutNormalizedTime = 1f; + public Color ColorTint = Color.White; + private float _timeTolive; + private float _timeSinceSpawn; + + public override void FetchFromPool() + { + base.FetchFromPool(); + this.FadeInNormalizedTime = 0.0f; + this.FadeOutNormalizedTime = 1f; + this.ColorTint = Color.White; + this._timeTolive = 0.0f; + this._timeSinceSpawn = 0.0f; + } + + public void SetTypeInfo(float timeToLive) => this._timeTolive = timeToLive; + + public override void Update(ref ParticleRendererSettings settings) + { + base.Update(ref settings); + ++this._timeSinceSpawn; + if ((double) this._timeSinceSpawn < (double) this._timeTolive) + return; + this.ShouldBeRemovedFromRenderer = true; + } + + public override void Draw(ref ParticleRendererSettings settings, SpriteBatch spritebatch) + { + Color color = this.ColorTint * Utils.GetLerpValue(0.0f, this.FadeInNormalizedTime, this._timeSinceSpawn / this._timeTolive, true) * Utils.GetLerpValue(1f, this.FadeOutNormalizedTime, this._timeSinceSpawn / this._timeTolive, true); + spritebatch.Draw(this._texture.Value, settings.AnchorPosition + this.LocalPosition, new Rectangle?(this._frame), color, this.Rotation, this._origin, this.Scale, SpriteEffects.None, 0.0f); + } + } +} diff --git a/Graphics/Renderers/FlameParticle.cs b/Graphics/Renderers/FlameParticle.cs new file mode 100644 index 0000000..6a9ce21 --- /dev/null +++ b/Graphics/Renderers/FlameParticle.cs @@ -0,0 +1,77 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Renderers.FlameParticle +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.DataStructures; + +namespace Terraria.Graphics.Renderers +{ + public class FlameParticle : ABasicParticle + { + public float FadeOutNormalizedTime = 1f; + private float _timeTolive; + private float _timeSinceSpawn; + private int _indexOfPlayerWhoSpawnedThis; + private int _packedShaderIndex; + + public override void FetchFromPool() + { + base.FetchFromPool(); + this.FadeOutNormalizedTime = 1f; + this._timeTolive = 0.0f; + this._timeSinceSpawn = 0.0f; + this._indexOfPlayerWhoSpawnedThis = 0; + this._packedShaderIndex = 0; + } + + public override void SetBasicInfo( + Asset textureAsset, + Rectangle? frame, + Vector2 initialVelocity, + Vector2 initialLocalPosition) + { + base.SetBasicInfo(textureAsset, frame, initialVelocity, initialLocalPosition); + this._origin = new Vector2((float) (this._frame.Width / 2), (float) (this._frame.Height - 2)); + } + + public void SetTypeInfo(float timeToLive, int indexOfPlayerWhoSpawnedIt, int packedShaderIndex) + { + this._timeTolive = timeToLive; + this._indexOfPlayerWhoSpawnedThis = indexOfPlayerWhoSpawnedIt; + this._packedShaderIndex = packedShaderIndex; + } + + public override void Update(ref ParticleRendererSettings settings) + { + base.Update(ref settings); + ++this._timeSinceSpawn; + if ((double) this._timeSinceSpawn < (double) this._timeTolive) + return; + this.ShouldBeRemovedFromRenderer = true; + } + + public override void Draw(ref ParticleRendererSettings settings, SpriteBatch spritebatch) + { + Color color = new Color(120, 120, 120, 60) * Utils.GetLerpValue(1f, this.FadeOutNormalizedTime, this._timeSinceSpawn / this._timeTolive, true); + Vector2 vector2_1 = settings.AnchorPosition + this.LocalPosition; + ulong seed = Main.TileFrameSeed ^ ((ulong) this.LocalPosition.X << 32 | (ulong) (uint) this.LocalPosition.Y); + Player player = Main.player[this._indexOfPlayerWhoSpawnedThis]; + for (int index = 0; index < 4; ++index) + { + Vector2 vector2_2 = new Vector2((float) Utils.RandomInt(ref seed, -2, 3), (float) Utils.RandomInt(ref seed, -2, 3)); + DrawData cdd = new DrawData(this._texture.Value, vector2_1 + vector2_2 * this.Scale, new Rectangle?(this._frame), color, this.Rotation, this._origin, this.Scale, SpriteEffects.None, 0) + { + shader = this._packedShaderIndex + }; + PlayerDrawHelper.SetShaderForData(player, 0, ref cdd); + cdd.Draw(spritebatch); + } + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + } + } +} diff --git a/Graphics/Renderers/IParticle.cs b/Graphics/Renderers/IParticle.cs new file mode 100644 index 0000000..fb7e61e --- /dev/null +++ b/Graphics/Renderers/IParticle.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Renderers.IParticle +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.Graphics.Renderers +{ + public interface IParticle + { + bool ShouldBeRemovedFromRenderer { get; } + + void Update(ref ParticleRendererSettings settings); + + void Draw(ref ParticleRendererSettings settings, SpriteBatch spritebatch); + } +} diff --git a/Graphics/Renderers/IPlayerRenderer.cs b/Graphics/Renderers/IPlayerRenderer.cs new file mode 100644 index 0000000..0b16740 --- /dev/null +++ b/Graphics/Renderers/IPlayerRenderer.cs @@ -0,0 +1,33 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Renderers.IPlayerRenderer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; + +namespace Terraria.Graphics.Renderers +{ + public interface IPlayerRenderer + { + void DrawPlayers(Camera camera, IEnumerable players); + + void DrawPlayerHead( + Camera camera, + Player drawPlayer, + Vector2 position, + float alpha = 1f, + float scale = 1f, + Color borderColor = default (Color)); + + void DrawPlayer( + Camera camera, + Player drawPlayer, + Vector2 position, + float rotation, + Vector2 rotationOrigin, + float shadow = 0.0f, + float scale = 1f); + } +} diff --git a/Graphics/Renderers/IPooledParticle.cs b/Graphics/Renderers/IPooledParticle.cs new file mode 100644 index 0000000..7b717ef --- /dev/null +++ b/Graphics/Renderers/IPooledParticle.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Renderers.IPooledParticle +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Graphics.Renderers +{ + public interface IPooledParticle : IParticle + { + bool IsRestingInPool { get; } + + void RestInPool(); + + void FetchFromPool(); + } +} diff --git a/Graphics/Renderers/LegacyPlayerRenderer.cs b/Graphics/Renderers/LegacyPlayerRenderer.cs new file mode 100644 index 0000000..23977dd --- /dev/null +++ b/Graphics/Renderers/LegacyPlayerRenderer.cs @@ -0,0 +1,453 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Renderers.LegacyPlayerRenderer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.ID; + +namespace Terraria.Graphics.Renderers +{ + public class LegacyPlayerRenderer : IPlayerRenderer + { + private readonly List _drawData = new List(); + private readonly List _dust = new List(); + private readonly List _gore = new List(); + + public static SamplerState MountedSamplerState => !Main.drawToScreen ? SamplerState.AnisotropicClamp : SamplerState.LinearClamp; + + public void DrawPlayers(Camera camera, IEnumerable players) + { + foreach (Player player in players) + this.DrawPlayerFull(camera, player); + } + + public void DrawPlayerHead( + Camera camera, + Player drawPlayer, + Vector2 position, + float alpha = 1f, + float scale = 1f, + Color borderColor = default (Color)) + { + this._drawData.Clear(); + this._dust.Clear(); + this._gore.Clear(); + PlayerDrawHeadSet drawinfo = new PlayerDrawHeadSet(); + drawinfo.BoringSetup(drawPlayer, this._drawData, this._dust, this._gore, position.X, position.Y, alpha, scale); + PlayerDrawHeadLayers.DrawPlayer_00_BackHelmet(ref drawinfo); + PlayerDrawHeadLayers.DrawPlayer_01_FaceSkin(ref drawinfo); + PlayerDrawHeadLayers.DrawPlayer_02_DrawArmorWithFullHair(ref drawinfo); + PlayerDrawHeadLayers.DrawPlayer_03_HelmetHair(ref drawinfo); + PlayerDrawHeadLayers.DrawPlayer_04_JungleRose(ref drawinfo); + PlayerDrawHeadLayers.DrawPlayer_05_TallHats(ref drawinfo); + PlayerDrawHeadLayers.DrawPlayer_06_NormalHats(ref drawinfo); + PlayerDrawHeadLayers.DrawPlayer_07_JustHair(ref drawinfo); + PlayerDrawHeadLayers.DrawPlayer_08_FaceAcc(ref drawinfo); + this.CreateOutlines(alpha, scale, borderColor); + PlayerDrawHeadLayers.DrawPlayer_RenderAllLayers(ref drawinfo); + } + + private void CreateOutlines(float alpha, float scale, Color borderColor) + { + if (!(borderColor != Color.Transparent)) + return; + List drawDataList1 = new List((IEnumerable) this._drawData); + List drawDataList2 = new List((IEnumerable) this._drawData); + float num1 = 2f * scale; + Color color1 = borderColor * (alpha * alpha); + Color color2 = Color.Black * (alpha * alpha); + int colorOnlyShaderIndex = ContentSamples.CommonlyUsedContentSamples.ColorOnlyShaderIndex; + for (int index = 0; index < drawDataList2.Count; ++index) + { + DrawData drawData = drawDataList2[index]; + drawData.shader = colorOnlyShaderIndex; + drawData.color = color2; + drawDataList2[index] = drawData; + } + int num2 = 2; + for (int index1 = -num2; index1 <= num2; ++index1) + { + for (int index2 = -num2; index2 <= num2; ++index2) + { + if (Math.Abs(index1) + Math.Abs(index2) == num2) + { + Vector2 vector2 = new Vector2((float) index1 * num1, (float) index2 * num1); + for (int index3 = 0; index3 < drawDataList2.Count; ++index3) + { + DrawData drawData = drawDataList2[index3]; + drawData.position += vector2; + this._drawData.Add(drawData); + } + } + } + } + for (int index = 0; index < drawDataList2.Count; ++index) + { + DrawData drawData = drawDataList2[index]; + drawData.shader = colorOnlyShaderIndex; + drawData.color = color1; + drawDataList2[index] = drawData; + } + Vector2 vector2_1 = Vector2.Zero; + int num3 = 1; + for (int index4 = -num3; index4 <= num3; ++index4) + { + for (int index5 = -num3; index5 <= num3; ++index5) + { + if (Math.Abs(index4) + Math.Abs(index5) == num3) + { + vector2_1 = new Vector2((float) index4 * num1, (float) index5 * num1); + for (int index6 = 0; index6 < drawDataList2.Count; ++index6) + { + DrawData drawData = drawDataList2[index6]; + drawData.position += vector2_1; + this._drawData.Add(drawData); + } + } + } + } + this._drawData.AddRange((IEnumerable) drawDataList1); + } + + public void DrawPlayer( + Camera camera, + Player drawPlayer, + Vector2 position, + float rotation, + Vector2 rotationOrigin, + float shadow = 0.0f, + float scale = 1f) + { + if (drawPlayer.ShouldNotDraw) + return; + PlayerDrawSet drawinfo = new PlayerDrawSet(); + this._drawData.Clear(); + this._dust.Clear(); + this._gore.Clear(); + drawinfo.BoringSetup(drawPlayer, this._drawData, this._dust, this._gore, position, shadow, rotation, rotationOrigin); + PlayerDrawLayers.DrawPlayer_extra_TorsoPlus(ref drawinfo); + PlayerDrawLayers.DrawPlayer_01_BackHair(ref drawinfo); + PlayerDrawLayers.DrawPlayer_01_2_JimsCloak(ref drawinfo); + PlayerDrawLayers.DrawPlayer_01_3_BackHead(ref drawinfo); + PlayerDrawLayers.DrawPlayer_extra_TorsoMinus(ref drawinfo); + PlayerDrawLayers.DrawPlayer_02_MountBehindPlayer(ref drawinfo); + PlayerDrawLayers.DrawPlayer_03_Carpet(ref drawinfo); + PlayerDrawLayers.DrawPlayer_03_PortableStool(ref drawinfo); + PlayerDrawLayers.DrawPlayer_extra_TorsoPlus(ref drawinfo); + PlayerDrawLayers.DrawPlayer_04_ElectrifiedDebuffBack(ref drawinfo); + PlayerDrawLayers.DrawPlayer_05_ForbiddenSetRing(ref drawinfo); + PlayerDrawLayers.DrawPlayer_05_2_SafemanSun(ref drawinfo); + PlayerDrawLayers.DrawPlayer_06_WebbedDebuffBack(ref drawinfo); + PlayerDrawLayers.DrawPlayer_07_LeinforsHairShampoo(ref drawinfo); + PlayerDrawLayers.DrawPlayer_extra_TorsoMinus(ref drawinfo); + PlayerDrawLayers.DrawPlayer_08_Backpacks(ref drawinfo); + PlayerDrawLayers.DrawPlayer_09_BackAc(ref drawinfo); + PlayerDrawLayers.DrawPlayer_10_Wings(ref drawinfo); + PlayerDrawLayers.DrawPlayer_11_Balloons(ref drawinfo); + if (drawinfo.weaponDrawOrder == WeaponDrawOrder.BehindBackArm) + PlayerDrawLayers.DrawPlayer_27_HeldItem(ref drawinfo); + PlayerDrawLayers.DrawPlayer_12_Skin(ref drawinfo); + if (drawinfo.drawPlayer.wearsRobe && drawinfo.drawPlayer.body != 166) + { + PlayerDrawLayers.DrawPlayer_14_Shoes(ref drawinfo); + PlayerDrawLayers.DrawPlayer_13_Leggings(ref drawinfo); + } + else + { + PlayerDrawLayers.DrawPlayer_13_Leggings(ref drawinfo); + PlayerDrawLayers.DrawPlayer_14_Shoes(ref drawinfo); + } + PlayerDrawLayers.DrawPlayer_extra_TorsoPlus(ref drawinfo); + PlayerDrawLayers.DrawPlayer_15_SkinLongCoat(ref drawinfo); + PlayerDrawLayers.DrawPlayer_16_ArmorLongCoat(ref drawinfo); + PlayerDrawLayers.DrawPlayer_17_Torso(ref drawinfo); + PlayerDrawLayers.DrawPlayer_18_OffhandAcc(ref drawinfo); + PlayerDrawLayers.DrawPlayer_19_WaistAcc(ref drawinfo); + PlayerDrawLayers.DrawPlayer_20_NeckAcc(ref drawinfo); + PlayerDrawLayers.DrawPlayer_21_Head(ref drawinfo); + PlayerDrawLayers.DrawPlayer_22_FaceAcc(ref drawinfo); + if (drawinfo.drawFrontAccInNeckAccLayer) + { + PlayerDrawLayers.DrawPlayer_extra_TorsoMinus(ref drawinfo); + PlayerDrawLayers.DrawPlayer_32_FrontAcc(ref drawinfo); + PlayerDrawLayers.DrawPlayer_extra_TorsoPlus(ref drawinfo); + } + PlayerDrawLayers.DrawPlayer_23_MountFront(ref drawinfo); + PlayerDrawLayers.DrawPlayer_24_Pulley(ref drawinfo); + PlayerDrawLayers.DrawPlayer_25_Shield(ref drawinfo); + PlayerDrawLayers.DrawPlayer_extra_MountPlus(ref drawinfo); + PlayerDrawLayers.DrawPlayer_26_SolarShield(ref drawinfo); + PlayerDrawLayers.DrawPlayer_extra_MountMinus(ref drawinfo); + if (drawinfo.weaponDrawOrder == WeaponDrawOrder.BehindFrontArm) + PlayerDrawLayers.DrawPlayer_27_HeldItem(ref drawinfo); + PlayerDrawLayers.DrawPlayer_28_ArmOverItem(ref drawinfo); + PlayerDrawLayers.DrawPlayer_29_OnhandAcc(ref drawinfo); + PlayerDrawLayers.DrawPlayer_30_BladedGlove(ref drawinfo); + PlayerDrawLayers.DrawPlayer_extra_TorsoMinus(ref drawinfo); + if (!drawinfo.drawFrontAccInNeckAccLayer) + PlayerDrawLayers.DrawPlayer_32_FrontAcc(ref drawinfo); + if (drawinfo.weaponDrawOrder == WeaponDrawOrder.OverFrontArm) + PlayerDrawLayers.DrawPlayer_27_HeldItem(ref drawinfo); + PlayerDrawLayers.DrawPlayer_31_ProjectileOverArm(ref drawinfo); + PlayerDrawLayers.DrawPlayer_33_FrozenOrWebbedDebuff(ref drawinfo); + PlayerDrawLayers.DrawPlayer_34_ElectrifiedDebuffFront(ref drawinfo); + PlayerDrawLayers.DrawPlayer_35_IceBarrier(ref drawinfo); + PlayerDrawLayers.DrawPlayer_36_CTG(ref drawinfo); + PlayerDrawLayers.DrawPlayer_37_BeetleBuff(ref drawinfo); + PlayerDrawLayers.DrawPlayer_MakeIntoFirstFractalAfterImage(ref drawinfo); + PlayerDrawLayers.DrawPlayer_TransformDrawData(ref drawinfo); + if ((double) scale != 1.0) + PlayerDrawLayers.DrawPlayer_ScaleDrawData(ref drawinfo, scale); + PlayerDrawLayers.DrawPlayer_RenderAllLayers(ref drawinfo); + if (!drawinfo.drawPlayer.mount.Active || drawinfo.drawPlayer.mount.Type != 11) + return; + for (int i = 0; i < 1000; ++i) + { + if (Main.projectile[i].active && Main.projectile[i].owner == drawinfo.drawPlayer.whoAmI && Main.projectile[i].type == 591) + Main.instance.DrawProj(i); + } + } + + private void DrawPlayerFull(Camera camera, Player drawPlayer) + { + SpriteBatch spriteBatch = camera.SpriteBatch; + SamplerState samplerState = camera.Sampler; + if (drawPlayer.mount.Active && (double) drawPlayer.fullRotation != 0.0) + samplerState = LegacyPlayerRenderer.MountedSamplerState; + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, samplerState, DepthStencilState.None, camera.Rasterizer, (Effect) null, camera.GameViewMatrix.TransformationMatrix); + if (Main.gamePaused) + drawPlayer.PlayerFrame(); + if (drawPlayer.ghost) + { + for (int index = 0; index < 3; ++index) + { + Vector2 shadowPo = drawPlayer.shadowPos[index]; + Vector2 position = drawPlayer.position - drawPlayer.velocity * (float) (2 + index * 2); + this.DrawGhost(camera, drawPlayer, position, (float) (0.5 + 0.200000002980232 * (double) index)); + } + this.DrawGhost(camera, drawPlayer, drawPlayer.position); + } + else + { + if (drawPlayer.inventory[drawPlayer.selectedItem].flame || drawPlayer.head == 137 || drawPlayer.wings == 22) + { + --drawPlayer.itemFlameCount; + if (drawPlayer.itemFlameCount <= 0) + { + drawPlayer.itemFlameCount = 5; + for (int index = 0; index < 7; ++index) + { + drawPlayer.itemFlamePos[index].X = (float) Main.rand.Next(-10, 11) * 0.15f; + drawPlayer.itemFlamePos[index].Y = (float) Main.rand.Next(-10, 1) * 0.35f; + } + } + } + if (drawPlayer.armorEffectDrawShadowEOCShield) + { + int num = drawPlayer.eocDash / 4; + if (num > 3) + num = 3; + for (int index = 0; index < num; ++index) + this.DrawPlayer(camera, drawPlayer, drawPlayer.shadowPos[index], drawPlayer.shadowRotation[index], drawPlayer.shadowOrigin[index], (float) (0.5 + 0.200000002980232 * (double) index), 1f); + } + Vector2 position1; + if (drawPlayer.invis) + { + drawPlayer.armorEffectDrawOutlines = false; + drawPlayer.armorEffectDrawShadow = false; + drawPlayer.armorEffectDrawShadowSubtle = false; + position1 = drawPlayer.position; + if (drawPlayer.aggro <= -750) + { + this.DrawPlayer(camera, drawPlayer, position1, drawPlayer.fullRotation, drawPlayer.fullRotationOrigin, 1f, 1f); + } + else + { + drawPlayer.invis = false; + this.DrawPlayer(camera, drawPlayer, position1, drawPlayer.fullRotation, drawPlayer.fullRotationOrigin, 0.0f, 1f); + drawPlayer.invis = true; + } + } + if (drawPlayer.armorEffectDrawOutlines) + { + Vector2 position2 = drawPlayer.position; + if (!Main.gamePaused) + drawPlayer.ghostFade += drawPlayer.ghostDir * 0.075f; + if ((double) drawPlayer.ghostFade < 0.1) + { + drawPlayer.ghostDir = 1f; + drawPlayer.ghostFade = 0.1f; + } + else if ((double) drawPlayer.ghostFade > 0.9) + { + drawPlayer.ghostDir = -1f; + drawPlayer.ghostFade = 0.9f; + } + float num1 = drawPlayer.ghostFade * 5f; + for (int index = 0; index < 4; ++index) + { + float num2; + float num3; + switch (index) + { + case 1: + num2 = -num1; + num3 = 0.0f; + break; + case 2: + num2 = 0.0f; + num3 = num1; + break; + case 3: + num2 = 0.0f; + num3 = -num1; + break; + default: + num2 = num1; + num3 = 0.0f; + break; + } + position1 = new Vector2(drawPlayer.position.X + num2, drawPlayer.position.Y + drawPlayer.gfxOffY + num3); + this.DrawPlayer(camera, drawPlayer, position1, drawPlayer.fullRotation, drawPlayer.fullRotationOrigin, drawPlayer.ghostFade, 1f); + } + } + if (drawPlayer.armorEffectDrawOutlinesForbidden) + { + Vector2 position3 = drawPlayer.position; + if (!Main.gamePaused) + drawPlayer.ghostFade += drawPlayer.ghostDir * 0.025f; + if ((double) drawPlayer.ghostFade < 0.1) + { + drawPlayer.ghostDir = 1f; + drawPlayer.ghostFade = 0.1f; + } + else if ((double) drawPlayer.ghostFade > 0.9) + { + drawPlayer.ghostDir = -1f; + drawPlayer.ghostFade = 0.9f; + } + float num4 = drawPlayer.ghostFade * 5f; + for (int index = 0; index < 4; ++index) + { + float num5; + float num6; + switch (index) + { + case 1: + num5 = -num4; + num6 = 0.0f; + break; + case 2: + num5 = 0.0f; + num6 = num4; + break; + case 3: + num5 = 0.0f; + num6 = -num4; + break; + default: + num5 = num4; + num6 = 0.0f; + break; + } + position1 = new Vector2(drawPlayer.position.X + num5, drawPlayer.position.Y + drawPlayer.gfxOffY + num6); + this.DrawPlayer(camera, drawPlayer, position1, drawPlayer.fullRotation, drawPlayer.fullRotationOrigin, drawPlayer.ghostFade, 1f); + } + } + if (drawPlayer.armorEffectDrawShadowBasilisk) + { + int num = (int) ((double) drawPlayer.basiliskCharge * 3.0); + for (int index = 0; index < num; ++index) + this.DrawPlayer(camera, drawPlayer, drawPlayer.shadowPos[index], drawPlayer.shadowRotation[index], drawPlayer.shadowOrigin[index], (float) (0.5 + 0.200000002980232 * (double) index), 1f); + } + else if (drawPlayer.armorEffectDrawShadow) + { + for (int index = 0; index < 3; ++index) + this.DrawPlayer(camera, drawPlayer, drawPlayer.shadowPos[index], drawPlayer.shadowRotation[index], drawPlayer.shadowOrigin[index], (float) (0.5 + 0.200000002980232 * (double) index), 1f); + } + if (drawPlayer.armorEffectDrawShadowLokis) + { + for (int index = 0; index < 3; ++index) + this.DrawPlayer(camera, drawPlayer, Vector2.Lerp(drawPlayer.shadowPos[index], drawPlayer.position + new Vector2(0.0f, drawPlayer.gfxOffY), 0.5f), drawPlayer.shadowRotation[index], drawPlayer.shadowOrigin[index], MathHelper.Lerp(1f, (float) (0.5 + 0.200000002980232 * (double) index), 0.5f), 1f); + } + if (drawPlayer.armorEffectDrawShadowSubtle) + { + for (int index = 0; index < 4; ++index) + { + position1.X = drawPlayer.position.X + (float) Main.rand.Next(-20, 21) * 0.1f; + position1.Y = drawPlayer.position.Y + (float) Main.rand.Next(-20, 21) * 0.1f + drawPlayer.gfxOffY; + this.DrawPlayer(camera, drawPlayer, position1, drawPlayer.fullRotation, drawPlayer.fullRotationOrigin, 0.9f, 1f); + } + } + if (drawPlayer.shadowDodge) + { + ++drawPlayer.shadowDodgeCount; + if ((double) drawPlayer.shadowDodgeCount > 30.0) + drawPlayer.shadowDodgeCount = 30f; + } + else + { + --drawPlayer.shadowDodgeCount; + if ((double) drawPlayer.shadowDodgeCount < 0.0) + drawPlayer.shadowDodgeCount = 0.0f; + } + if ((double) drawPlayer.shadowDodgeCount > 0.0) + { + Vector2 position4 = drawPlayer.position; + position1.X = drawPlayer.position.X + drawPlayer.shadowDodgeCount; + position1.Y = drawPlayer.position.Y + drawPlayer.gfxOffY; + this.DrawPlayer(camera, drawPlayer, position1, drawPlayer.fullRotation, drawPlayer.fullRotationOrigin, (float) (0.5 + (double) Main.rand.Next(-10, 11) * 0.00499999988824129), 1f); + position1.X = drawPlayer.position.X - drawPlayer.shadowDodgeCount; + this.DrawPlayer(camera, drawPlayer, position1, drawPlayer.fullRotation, drawPlayer.fullRotationOrigin, (float) (0.5 + (double) Main.rand.Next(-10, 11) * 0.00499999988824129), 1f); + } + if (drawPlayer.brainOfConfusionDodgeAnimationCounter > 0) + { + Vector2 vector2 = drawPlayer.position + new Vector2(0.0f, drawPlayer.gfxOffY); + float lerpValue = Utils.GetLerpValue(300f, 270f, (float) drawPlayer.brainOfConfusionDodgeAnimationCounter, false); + float y = MathHelper.Lerp(2f, 120f, lerpValue); + if ((double) lerpValue >= 0.0 && (double) lerpValue <= 1.0) + { + for (float num = 0.0f; (double) num < 6.28318548202515; num += 1.047198f) + { + position1 = vector2 + new Vector2(0.0f, y).RotatedBy(6.28318548202515 * (double) lerpValue * 0.5 + (double) num); + this.DrawPlayer(camera, drawPlayer, position1, drawPlayer.fullRotation, drawPlayer.fullRotationOrigin, lerpValue, 1f); + } + } + } + position1 = drawPlayer.position; + position1.Y += drawPlayer.gfxOffY; + if (drawPlayer.stoned) + this.DrawPlayerStoned(camera, drawPlayer, position1); + else if (!drawPlayer.invis) + this.DrawPlayer(camera, drawPlayer, position1, drawPlayer.fullRotation, drawPlayer.fullRotationOrigin, 0.0f, 1f); + } + spriteBatch.End(); + } + + private void DrawPlayerStoned(Camera camera, Player drawPlayer, Vector2 position) + { + if (drawPlayer.dead) + return; + SpriteEffects effects = drawPlayer.direction != 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + camera.SpriteBatch.Draw(TextureAssets.Extra[37].Value, new Vector2((float) (int) ((double) position.X - (double) camera.UnscaledPosition.X - (double) (drawPlayer.bodyFrame.Width / 2) + (double) (drawPlayer.width / 2)), (float) (int) ((double) position.Y - (double) camera.UnscaledPosition.Y + (double) drawPlayer.height - (double) drawPlayer.bodyFrame.Height + 8.0)) + drawPlayer.bodyPosition + new Vector2((float) (drawPlayer.bodyFrame.Width / 2), (float) (drawPlayer.bodyFrame.Height / 2)), new Rectangle?(), Lighting.GetColor((int) ((double) position.X + (double) drawPlayer.width * 0.5) / 16, (int) ((double) position.Y + (double) drawPlayer.height * 0.5) / 16, Color.White), 0.0f, new Vector2((float) (TextureAssets.Extra[37].Width() / 2), (float) (TextureAssets.Extra[37].Height() / 2)), 1f, effects, 0.0f); + } + + private void DrawGhost(Camera camera, Player drawPlayer, Vector2 position, float shadow = 0.0f) + { + byte mouseTextColor = Main.mouseTextColor; + SpriteEffects effects = drawPlayer.direction == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + Color immuneAlpha = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int) ((double) drawPlayer.position.X + (double) drawPlayer.width * 0.5) / 16, (int) ((double) drawPlayer.position.Y + (double) drawPlayer.height * 0.5) / 16, new Color((int) mouseTextColor / 2 + 100, (int) mouseTextColor / 2 + 100, (int) mouseTextColor / 2 + 100, (int) mouseTextColor / 2 + 100)), shadow); + immuneAlpha.A = (byte) ((double) immuneAlpha.A * (1.0 - (double) Math.Max(0.5f, shadow - 0.5f))); + Rectangle rectangle = new Rectangle(0, TextureAssets.Ghost.Height() / 4 * drawPlayer.ghostFrame, TextureAssets.Ghost.Width(), TextureAssets.Ghost.Height() / 4); + Vector2 origin = new Vector2((float) rectangle.Width * 0.5f, (float) rectangle.Height * 0.5f); + camera.SpriteBatch.Draw(TextureAssets.Ghost.Value, new Vector2((float) (int) ((double) position.X - (double) camera.UnscaledPosition.X + (double) (rectangle.Width / 2)), (float) (int) ((double) position.Y - (double) camera.UnscaledPosition.Y + (double) (rectangle.Height / 2))), new Rectangle?(rectangle), immuneAlpha, 0.0f, origin, 1f, effects, 0.0f); + } + } +} diff --git a/Graphics/Renderers/MapHeadRenderer.cs b/Graphics/Renderers/MapHeadRenderer.cs new file mode 100644 index 0000000..cfcb225 --- /dev/null +++ b/Graphics/Renderers/MapHeadRenderer.cs @@ -0,0 +1,141 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Renderers.MapHeadRenderer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.ID; + +namespace Terraria.Graphics.Renderers +{ + public class MapHeadRenderer : INeedRenderTargetContent + { + private bool _anyDirty; + private PlayerHeadDrawRenderTargetContent[] _playerRenders = new PlayerHeadDrawRenderTargetContent[(int) byte.MaxValue]; + private readonly List _drawData = new List(); + + public MapHeadRenderer() + { + for (int index = 0; index < this._playerRenders.Length; ++index) + this._playerRenders[index] = new PlayerHeadDrawRenderTargetContent(); + } + + public void DrawPlayerHead( + Camera camera, + Player drawPlayer, + Vector2 position, + float alpha = 1f, + float scale = 1f, + Color borderColor = default (Color)) + { + PlayerHeadDrawRenderTargetContent playerRender = this._playerRenders[drawPlayer.whoAmI]; + playerRender.UsePlayer(drawPlayer); + playerRender.UseColor(borderColor); + playerRender.Request(); + this._anyDirty = true; + this._drawData.Clear(); + if (!playerRender.IsReady) + return; + RenderTarget2D target = playerRender.GetTarget(); + this._drawData.Add(new DrawData((Texture2D) target, position, new Rectangle?(), Color.White, 0.0f, target.Size() / 2f, scale, SpriteEffects.None, 0)); + this.RenderDrawData(drawPlayer); + } + + private void RenderDrawData(Player drawPlayer) + { + Effect pixelShader = Main.pixelShader; + Projectile[] projectile = Main.projectile; + SpriteBatch spriteBatch = Main.spriteBatch; + for (int index = 0; index < this._drawData.Count; ++index) + { + DrawData cdd = this._drawData[index]; + if (!cdd.sourceRect.HasValue) + cdd.sourceRect = new Rectangle?(cdd.texture.Frame()); + PlayerDrawHelper.SetShaderForData(drawPlayer, drawPlayer.cHead, ref cdd); + if (cdd.texture != null) + cdd.Draw(spriteBatch); + } + pixelShader.CurrentTechnique.Passes[0].Apply(); + } + + public bool IsReady => !this._anyDirty; + + public void PrepareRenderTarget(GraphicsDevice device, SpriteBatch spriteBatch) + { + if (!this._anyDirty) + return; + for (int index = 0; index < this._playerRenders.Length; ++index) + this._playerRenders[index].PrepareRenderTarget(device, spriteBatch); + this._anyDirty = false; + } + + private void CreateOutlines(float alpha, float scale, Color borderColor) + { + if (!(borderColor != Color.Transparent)) + return; + List drawDataList1 = new List((IEnumerable) this._drawData); + List drawDataList2 = new List((IEnumerable) this._drawData); + this._drawData.Clear(); + float num1 = 2f * scale; + Color color1 = borderColor * (alpha * alpha); + Color color2 = Color.Black * (alpha * alpha); + int colorOnlyShaderIndex = ContentSamples.CommonlyUsedContentSamples.ColorOnlyShaderIndex; + for (int index = 0; index < drawDataList2.Count; ++index) + { + DrawData drawData = drawDataList2[index]; + drawData.shader = colorOnlyShaderIndex; + drawData.color = color2; + drawDataList2[index] = drawData; + } + int num2 = 2; + for (int index1 = -num2; index1 <= num2; ++index1) + { + for (int index2 = -num2; index2 <= num2; ++index2) + { + if (Math.Abs(index1) + Math.Abs(index2) == num2) + { + Vector2 vector2 = new Vector2((float) index1 * num1, (float) index2 * num1); + for (int index3 = 0; index3 < drawDataList2.Count; ++index3) + { + DrawData drawData = drawDataList2[index3]; + drawData.position += vector2; + this._drawData.Add(drawData); + } + } + } + } + for (int index = 0; index < drawDataList2.Count; ++index) + { + DrawData drawData = drawDataList2[index]; + drawData.shader = colorOnlyShaderIndex; + drawData.color = color1; + drawDataList2[index] = drawData; + } + Vector2 vector2_1 = Vector2.Zero; + int num3 = 1; + for (int index4 = -num3; index4 <= num3; ++index4) + { + for (int index5 = -num3; index5 <= num3; ++index5) + { + if (Math.Abs(index4) + Math.Abs(index5) == num3) + { + vector2_1 = new Vector2((float) index4 * num1, (float) index5 * num1); + for (int index6 = 0; index6 < drawDataList2.Count; ++index6) + { + DrawData drawData = drawDataList2[index6]; + drawData.position += vector2_1; + this._drawData.Add(drawData); + } + } + } + } + this._drawData.AddRange((IEnumerable) drawDataList1); + } + } +} diff --git a/Graphics/Renderers/NPCHeadRenderer.cs b/Graphics/Renderers/NPCHeadRenderer.cs new file mode 100644 index 0000000..0916191 --- /dev/null +++ b/Graphics/Renderers/NPCHeadRenderer.cs @@ -0,0 +1,60 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Renderers.NPCHeadRenderer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.GameContent; + +namespace Terraria.Graphics.Renderers +{ + public class NPCHeadRenderer : INeedRenderTargetContent + { + private NPCHeadDrawRenderTargetContent[] _contents; + private Asset[] _matchingArray; + + public NPCHeadRenderer(Asset[] matchingArray) + { + this._matchingArray = matchingArray; + this._contents = new NPCHeadDrawRenderTargetContent[matchingArray.Length]; + } + + public void DrawWithOutlines( + Entity entity, + int headId, + Vector2 position, + Color color, + float rotation, + float scale, + SpriteEffects effects) + { + if (this._contents[headId] == null) + { + this._contents[headId] = new NPCHeadDrawRenderTargetContent(); + this._contents[headId].SetTexture(this._matchingArray[headId].Value); + } + NPCHeadDrawRenderTargetContent content = this._contents[headId]; + if (content.IsReady) + { + RenderTarget2D target = content.GetTarget(); + Main.spriteBatch.Draw((Texture2D) target, position, new Rectangle?(), color, rotation, target.Size() / 2f, scale, effects, 0.0f); + } + else + content.Request(); + } + + public bool IsReady => false; + + public void PrepareRenderTarget(GraphicsDevice device, SpriteBatch spriteBatch) + { + for (int index = 0; index < this._contents.Length; ++index) + { + if (this._contents[index] != null && !this._contents[index].IsReady) + this._contents[index].PrepareRenderTarget(device, spriteBatch); + } + } + } +} diff --git a/Graphics/Renderers/ParticlePool`1.cs b/Graphics/Renderers/ParticlePool`1.cs new file mode 100644 index 0000000..c579276 --- /dev/null +++ b/Graphics/Renderers/ParticlePool`1.cs @@ -0,0 +1,43 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Renderers.ParticlePool`1 +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.Graphics.Renderers +{ + public class ParticlePool where T : IPooledParticle + { + private ParticlePool.ParticleInstantiator _instantiator; + private List _particles; + + public ParticlePool(int initialPoolSize, ParticlePool.ParticleInstantiator instantiator) + { + this._particles = new List(initialPoolSize); + this._instantiator = instantiator; + } + + public T RequestParticle() + { + int count = this._particles.Count; + for (int index = 0; index < count; ++index) + { + T particle = this._particles[index]; + if (particle.IsRestingInPool) + { + particle = this._particles[index]; + particle.FetchFromPool(); + return this._particles[index]; + } + } + T obj = this._instantiator(); + this._particles.Add(obj); + obj.FetchFromPool(); + return obj; + } + + public delegate T ParticleInstantiator() where T : IPooledParticle; + } +} diff --git a/Graphics/Renderers/ParticleRenderer.cs b/Graphics/Renderers/ParticleRenderer.cs new file mode 100644 index 0000000..42d7584 --- /dev/null +++ b/Graphics/Renderers/ParticleRenderer.cs @@ -0,0 +1,46 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Renderers.ParticleRenderer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; + +namespace Terraria.Graphics.Renderers +{ + public class ParticleRenderer + { + public ParticleRendererSettings Settings; + public List Particles = new List(); + + public ParticleRenderer() => this.Settings = new ParticleRendererSettings(); + + public void Add(IParticle particle) => this.Particles.Add(particle); + + public void Update() + { + for (int index = 0; index < this.Particles.Count; ++index) + { + if (this.Particles[index].ShouldBeRemovedFromRenderer) + { + if (this.Particles[index] is IPooledParticle particle3) + particle3.RestInPool(); + this.Particles.RemoveAt(index); + --index; + } + else + this.Particles[index].Update(ref this.Settings); + } + } + + public void Draw(SpriteBatch spriteBatch) + { + for (int index = 0; index < this.Particles.Count; ++index) + { + if (!this.Particles[index].ShouldBeRemovedFromRenderer) + this.Particles[index].Draw(ref this.Settings, spriteBatch); + } + } + } +} diff --git a/Graphics/Renderers/ParticleRendererSettings.cs b/Graphics/Renderers/ParticleRendererSettings.cs new file mode 100644 index 0000000..1282d1b --- /dev/null +++ b/Graphics/Renderers/ParticleRendererSettings.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Renderers.ParticleRendererSettings +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.Graphics.Renderers +{ + public struct ParticleRendererSettings + { + public Vector2 AnchorPosition; + } +} diff --git a/Graphics/Renderers/PrettySparkleParticle.cs b/Graphics/Renderers/PrettySparkleParticle.cs new file mode 100644 index 0000000..23c33dc --- /dev/null +++ b/Graphics/Renderers/PrettySparkleParticle.cs @@ -0,0 +1,59 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Renderers.PrettySparkleParticle +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.GameContent; + +namespace Terraria.Graphics.Renderers +{ + public class PrettySparkleParticle : ABasicParticle + { + public Color ColorTint; + public float Opacity; + private float _timeSinceSpawn; + + public override void FetchFromPool() + { + base.FetchFromPool(); + this.ColorTint = Color.Transparent; + this._timeSinceSpawn = 0.0f; + this.Opacity = 0.0f; + } + + public override void Update(ref ParticleRendererSettings settings) + { + base.Update(ref settings); + ++this._timeSinceSpawn; + this.Opacity = Utils.GetLerpValue(0.0f, 0.05f, this._timeSinceSpawn / 60f, true) * Utils.GetLerpValue(1f, 0.9f, this._timeSinceSpawn / 60f, true); + if ((double) this._timeSinceSpawn < 60.0) + return; + this.ShouldBeRemovedFromRenderer = true; + } + + public override void Draw(ref ParticleRendererSettings settings, SpriteBatch spritebatch) + { + Color color1 = Color.White * this.Opacity * 0.9f; + color1.A /= (byte) 2; + Texture2D texture2D = TextureAssets.Extra[98].Value; + Color color2 = this.ColorTint * this.Opacity * 0.5f; + color2.A = (byte) 0; + Vector2 origin = texture2D.Size() / 2f; + Color color3 = color1 * 0.5f; + float num = Utils.GetLerpValue(0.0f, 20f, this._timeSinceSpawn, true) * Utils.GetLerpValue(45f, 30f, this._timeSinceSpawn, true); + Vector2 scale1 = new Vector2(0.3f, 2f) * num * this.Scale; + Vector2 scale2 = new Vector2(0.3f, 1f) * num * this.Scale; + Color color4 = color2 * num; + Color color5 = color3 * num; + Vector2 position = settings.AnchorPosition + this.LocalPosition; + SpriteEffects effects = SpriteEffects.None; + spritebatch.Draw(texture2D, position, new Rectangle?(), color4, 1.570796f + this.Rotation, origin, scale1, effects, 0.0f); + spritebatch.Draw(texture2D, position, new Rectangle?(), color4, 0.0f + this.Rotation, origin, scale2, effects, 0.0f); + spritebatch.Draw(texture2D, position, new Rectangle?(), color5, 1.570796f + this.Rotation, origin, scale1 * 0.6f, effects, 0.0f); + spritebatch.Draw(texture2D, position, new Rectangle?(), color5, 0.0f + this.Rotation, origin, scale2 * 0.6f, effects, 0.0f); + } + } +} diff --git a/Graphics/Renderers/RandomizedFrameParticle.cs b/Graphics/Renderers/RandomizedFrameParticle.cs new file mode 100644 index 0000000..877627d --- /dev/null +++ b/Graphics/Renderers/RandomizedFrameParticle.cs @@ -0,0 +1,71 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Renderers.RandomizedFrameParticle +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.Graphics.Renderers +{ + public class RandomizedFrameParticle : ABasicParticle + { + public float FadeInNormalizedTime; + public float FadeOutNormalizedTime = 1f; + public Color ColorTint = Color.White; + public int AnimationFramesAmount; + public int GameFramesPerAnimationFrame; + private float _timeTolive; + private float _timeSinceSpawn; + private int _gameFramesCounted; + + public override void FetchFromPool() + { + base.FetchFromPool(); + this.FadeInNormalizedTime = 0.0f; + this.FadeOutNormalizedTime = 1f; + this.ColorTint = Color.White; + this.AnimationFramesAmount = 0; + this.GameFramesPerAnimationFrame = 0; + this._timeTolive = 0.0f; + this._timeSinceSpawn = 0.0f; + this._gameFramesCounted = 0; + } + + public void SetTypeInfo( + int animationFramesAmount, + int gameFramesPerAnimationFrame, + float timeToLive) + { + this._timeTolive = timeToLive; + this.GameFramesPerAnimationFrame = gameFramesPerAnimationFrame; + this.AnimationFramesAmount = animationFramesAmount; + this.RandomizeFrame(); + } + + private void RandomizeFrame() + { + this._frame = this._texture.Frame(verticalFrames: this.AnimationFramesAmount, frameY: Main.rand.Next(this.AnimationFramesAmount)); + this._origin = this._frame.Size() / 2f; + } + + public override void Update(ref ParticleRendererSettings settings) + { + base.Update(ref settings); + ++this._timeSinceSpawn; + if ((double) this._timeSinceSpawn >= (double) this._timeTolive) + this.ShouldBeRemovedFromRenderer = true; + if (++this._gameFramesCounted < this.GameFramesPerAnimationFrame) + return; + this._gameFramesCounted = 0; + this.RandomizeFrame(); + } + + public override void Draw(ref ParticleRendererSettings settings, SpriteBatch spritebatch) + { + Color color = this.ColorTint * Utils.GetLerpValue(0.0f, this.FadeInNormalizedTime, this._timeSinceSpawn / this._timeTolive, true) * Utils.GetLerpValue(1f, this.FadeOutNormalizedTime, this._timeSinceSpawn / this._timeTolive, true); + spritebatch.Draw(this._texture.Value, settings.AnchorPosition + this.LocalPosition, new Rectangle?(this._frame), color, this.Rotation, this._origin, this.Scale, SpriteEffects.None, 0.0f); + } + } +} diff --git a/Graphics/Renderers/ReturnGatePlayerRenderer.cs b/Graphics/Renderers/ReturnGatePlayerRenderer.cs new file mode 100644 index 0000000..1bd6a8f --- /dev/null +++ b/Graphics/Renderers/ReturnGatePlayerRenderer.cs @@ -0,0 +1,87 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Renderers.ReturnGatePlayerRenderer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.GameContent.ObjectInteractions; + +namespace Terraria.Graphics.Renderers +{ + internal class ReturnGatePlayerRenderer : IPlayerRenderer + { + private List _voidLensData = new List(); + private PotionOfReturnGateInteractionChecker _interactionChecker = new PotionOfReturnGateInteractionChecker(); + + public void DrawPlayers(Camera camera, IEnumerable players) + { + foreach (Player player in players) + this.DrawReturnGateInWorld(camera, player); + } + + public void DrawPlayerHead( + Camera camera, + Player drawPlayer, + Vector2 position, + float alpha = 1f, + float scale = 1f, + Color borderColor = default (Color)) + { + this.DrawReturnGateInMap(camera, drawPlayer); + } + + public void DrawPlayer( + Camera camera, + Player drawPlayer, + Vector2 position, + float rotation, + Vector2 rotationOrigin, + float shadow = 0.0f, + float scale = 1f) + { + this.DrawReturnGateInWorld(camera, drawPlayer); + } + + private void DrawReturnGateInMap(Camera camera, Player player) + { + } + + private void DrawReturnGateInWorld(Camera camera, Player player) + { + Rectangle homeHitbox = Rectangle.Empty; + if (!PotionOfReturnHelper.TryGetGateHitbox(player, out homeHitbox)) + return; + if (player == Main.LocalPlayer) + { + int num = (int) this._interactionChecker.AttemptInteraction(player, homeHitbox); + } + int selectionMode = 0; + if (!player.PotionOfReturnOriginalUsePosition.HasValue) + return; + SpriteBatch spriteBatch = camera.SpriteBatch; + SamplerState sampler = camera.Sampler; + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, sampler, DepthStencilState.None, camera.Rasterizer, (Effect) null, camera.GameViewMatrix.TransformationMatrix); + float opacity = player.whoAmI == Main.myPlayer ? 1f : 0.1f; + Vector2 worldPosition = player.PotionOfReturnOriginalUsePosition.Value + new Vector2(0.0f, (float) (-player.height / 2)); + Vector2 vector2 = homeHitbox.Center.ToVector2(); + PotionOfReturnGateHelper returnGateHelper1 = new PotionOfReturnGateHelper(PotionOfReturnGateHelper.GateType.ExitPoint, worldPosition, opacity); + PotionOfReturnGateHelper returnGateHelper2 = new PotionOfReturnGateHelper(PotionOfReturnGateHelper.GateType.EntryPoint, vector2, opacity); + if (!Main.gamePaused) + { + returnGateHelper1.Update(); + returnGateHelper2.Update(); + } + this._voidLensData.Clear(); + returnGateHelper1.DrawToDrawData(this._voidLensData, 0); + returnGateHelper2.DrawToDrawData(this._voidLensData, selectionMode); + foreach (DrawData drawData in this._voidLensData) + drawData.Draw(spriteBatch); + spriteBatch.End(); + } + } +} diff --git a/Graphics/Shaders/ArmorShaderData.cs b/Graphics/Shaders/ArmorShaderData.cs new file mode 100644 index 0000000..457e9b3 --- /dev/null +++ b/Graphics/Shaders/ArmorShaderData.cs @@ -0,0 +1,118 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Shaders.ArmorShaderData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.DataStructures; + +namespace Terraria.Graphics.Shaders +{ + public class ArmorShaderData : ShaderData + { + private Vector3 _uColor = Vector3.One; + private Vector3 _uSecondaryColor = Vector3.One; + private float _uSaturation = 1f; + private float _uOpacity = 1f; + private Asset _uImage; + private Vector2 _uTargetPosition = Vector2.One; + + public ArmorShaderData(Ref shader, string passName) + : base(shader, passName) + { + } + + public virtual void Apply(Entity entity, DrawData? drawData = null) + { + this.Shader.Parameters["uColor"].SetValue(this._uColor); + this.Shader.Parameters["uSaturation"].SetValue(this._uSaturation); + this.Shader.Parameters["uSecondaryColor"].SetValue(this._uSecondaryColor); + this.Shader.Parameters["uTime"].SetValue(Main.GlobalTimeWrappedHourly); + this.Shader.Parameters["uOpacity"].SetValue(this._uOpacity); + this.Shader.Parameters["uTargetPosition"].SetValue(this._uTargetPosition); + if (drawData.HasValue) + { + DrawData drawData1 = drawData.Value; + Vector4 vector4 = !drawData1.sourceRect.HasValue ? new Vector4(0.0f, 0.0f, (float) drawData1.texture.Width, (float) drawData1.texture.Height) : new Vector4((float) drawData1.sourceRect.Value.X, (float) drawData1.sourceRect.Value.Y, (float) drawData1.sourceRect.Value.Width, (float) drawData1.sourceRect.Value.Height); + this.Shader.Parameters["uSourceRect"].SetValue(vector4); + this.Shader.Parameters["uLegacyArmorSourceRect"].SetValue(vector4); + this.Shader.Parameters["uWorldPosition"].SetValue(Main.screenPosition + drawData1.position); + this.Shader.Parameters["uImageSize0"].SetValue(new Vector2((float) drawData1.texture.Width, (float) drawData1.texture.Height)); + this.Shader.Parameters["uLegacyArmorSheetSize"].SetValue(new Vector2((float) drawData1.texture.Width, (float) drawData1.texture.Height)); + this.Shader.Parameters["uRotation"].SetValue(drawData1.rotation * (drawData1.effect.HasFlag((Enum) SpriteEffects.FlipHorizontally) ? -1f : 1f)); + this.Shader.Parameters["uDirection"].SetValue(drawData1.effect.HasFlag((Enum) SpriteEffects.FlipHorizontally) ? -1 : 1); + } + else + { + Vector4 vector4 = new Vector4(0.0f, 0.0f, 4f, 4f); + this.Shader.Parameters["uSourceRect"].SetValue(vector4); + this.Shader.Parameters["uLegacyArmorSourceRect"].SetValue(vector4); + this.Shader.Parameters["uRotation"].SetValue(0.0f); + } + if (this._uImage != null) + { + Main.graphics.GraphicsDevice.Textures[1] = (Texture) this._uImage.Value; + this.Shader.Parameters["uImageSize1"].SetValue(new Vector2((float) this._uImage.Width(), (float) this._uImage.Height())); + } + if (entity != null) + this.Shader.Parameters["uDirection"].SetValue((float) entity.direction); + if (entity is Player player) + { + Rectangle bodyFrame = player.bodyFrame; + this.Shader.Parameters["uLegacyArmorSourceRect"].SetValue(new Vector4((float) bodyFrame.X, (float) bodyFrame.Y, (float) bodyFrame.Width, (float) bodyFrame.Height)); + this.Shader.Parameters["uLegacyArmorSheetSize"].SetValue(new Vector2(40f, 1120f)); + } + this.Apply(); + } + + public ArmorShaderData UseColor(float r, float g, float b) => this.UseColor(new Vector3(r, g, b)); + + public ArmorShaderData UseColor(Color color) => this.UseColor(color.ToVector3()); + + public ArmorShaderData UseColor(Vector3 color) + { + this._uColor = color; + return this; + } + + public ArmorShaderData UseImage(string path) + { + this._uImage = Main.Assets.Request(path, (AssetRequestMode) 1); + return this; + } + + public ArmorShaderData UseOpacity(float alpha) + { + this._uOpacity = alpha; + return this; + } + + public ArmorShaderData UseTargetPosition(Vector2 position) + { + this._uTargetPosition = position; + return this; + } + + public ArmorShaderData UseSecondaryColor(float r, float g, float b) => this.UseSecondaryColor(new Vector3(r, g, b)); + + public ArmorShaderData UseSecondaryColor(Color color) => this.UseSecondaryColor(color.ToVector3()); + + public ArmorShaderData UseSecondaryColor(Vector3 color) + { + this._uSecondaryColor = color; + return this; + } + + public ArmorShaderData UseSaturation(float saturation) + { + this._uSaturation = saturation; + return this; + } + + public virtual ArmorShaderData GetSecondaryShader(Entity entity) => this; + } +} diff --git a/Graphics/Shaders/ArmorShaderDataSet.cs b/Graphics/Shaders/ArmorShaderDataSet.cs new file mode 100644 index 0000000..525b46c --- /dev/null +++ b/Graphics/Shaders/ArmorShaderDataSet.cs @@ -0,0 +1,47 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Shaders.ArmorShaderDataSet +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using Terraria.DataStructures; + +namespace Terraria.Graphics.Shaders +{ + public class ArmorShaderDataSet + { + protected List _shaderData = new List(); + protected Dictionary _shaderLookupDictionary = new Dictionary(); + protected int _shaderDataCount; + + public T BindShader(int itemId, T shaderData) where T : ArmorShaderData + { + this._shaderLookupDictionary[itemId] = ++this._shaderDataCount; + this._shaderData.Add((ArmorShaderData) shaderData); + return shaderData; + } + + public void Apply(int shaderId, Entity entity, DrawData? drawData = null) + { + if (shaderId >= 1 && shaderId <= this._shaderDataCount) + this._shaderData[shaderId - 1].Apply(entity, drawData); + else + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + } + + public void ApplySecondary(int shaderId, Entity entity, DrawData? drawData = null) + { + if (shaderId >= 1 && shaderId <= this._shaderDataCount) + this._shaderData[shaderId - 1].GetSecondaryShader(entity).Apply(entity, drawData); + else + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + } + + public ArmorShaderData GetShaderFromItemId(int type) => this._shaderLookupDictionary.ContainsKey(type) ? this._shaderData[this._shaderLookupDictionary[type] - 1] : (ArmorShaderData) null; + + public int GetShaderIdFromItemId(int type) => this._shaderLookupDictionary.ContainsKey(type) ? this._shaderLookupDictionary[type] : 0; + + public ArmorShaderData GetSecondaryShader(int id, Player player) => id != 0 && id <= this._shaderDataCount && this._shaderData[id - 1] != null ? this._shaderData[id - 1].GetSecondaryShader((Entity) player) : (ArmorShaderData) null; + } +} diff --git a/Graphics/Shaders/GameShaders.cs b/Graphics/Shaders/GameShaders.cs new file mode 100644 index 0000000..59976c7 --- /dev/null +++ b/Graphics/Shaders/GameShaders.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Shaders.GameShaders +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.Graphics.Shaders +{ + public class GameShaders + { + public static ArmorShaderDataSet Armor = new ArmorShaderDataSet(); + public static HairShaderDataSet Hair = new HairShaderDataSet(); + public static Dictionary Misc = new Dictionary(); + } +} diff --git a/Graphics/Shaders/HairShaderData.cs b/Graphics/Shaders/HairShaderData.cs new file mode 100644 index 0000000..f52af00 --- /dev/null +++ b/Graphics/Shaders/HairShaderData.cs @@ -0,0 +1,106 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Shaders.HairShaderData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.DataStructures; + +namespace Terraria.Graphics.Shaders +{ + public class HairShaderData : ShaderData + { + protected Vector3 _uColor = Vector3.One; + protected Vector3 _uSecondaryColor = Vector3.One; + protected float _uSaturation = 1f; + protected float _uOpacity = 1f; + protected Asset _uImage; + protected bool _shaderDisabled; + private Vector2 _uTargetPosition = Vector2.One; + + public bool ShaderDisabled => this._shaderDisabled; + + public HairShaderData(Ref shader, string passName) + : base(shader, passName) + { + } + + public virtual void Apply(Player player, DrawData? drawData = null) + { + if (this._shaderDisabled) + return; + this.Shader.Parameters["uColor"].SetValue(this._uColor); + this.Shader.Parameters["uSaturation"].SetValue(this._uSaturation); + this.Shader.Parameters["uSecondaryColor"].SetValue(this._uSecondaryColor); + this.Shader.Parameters["uTime"].SetValue(Main.GlobalTimeWrappedHourly); + this.Shader.Parameters["uOpacity"].SetValue(this._uOpacity); + this.Shader.Parameters["uTargetPosition"].SetValue(this._uTargetPosition); + if (drawData.HasValue) + { + DrawData drawData1 = drawData.Value; + this.Shader.Parameters["uSourceRect"].SetValue(new Vector4((float) drawData1.sourceRect.Value.X, (float) drawData1.sourceRect.Value.Y, (float) drawData1.sourceRect.Value.Width, (float) drawData1.sourceRect.Value.Height)); + this.Shader.Parameters["uWorldPosition"].SetValue(Main.screenPosition + drawData1.position); + this.Shader.Parameters["uImageSize0"].SetValue(new Vector2((float) drawData1.texture.Width, (float) drawData1.texture.Height)); + } + else + this.Shader.Parameters["uSourceRect"].SetValue(new Vector4(0.0f, 0.0f, 4f, 4f)); + if (this._uImage != null) + { + Main.graphics.GraphicsDevice.Textures[1] = (Texture) this._uImage.Value; + this.Shader.Parameters["uImageSize1"].SetValue(new Vector2((float) this._uImage.Width(), (float) this._uImage.Height())); + } + if (player != null) + this.Shader.Parameters["uDirection"].SetValue((float) player.direction); + this.Apply(); + } + + public virtual Color GetColor(Player player, Color lightColor) => new Color(lightColor.ToVector4() * player.hairColor.ToVector4()); + + public HairShaderData UseColor(float r, float g, float b) => this.UseColor(new Vector3(r, g, b)); + + public HairShaderData UseColor(Color color) => this.UseColor(color.ToVector3()); + + public HairShaderData UseColor(Vector3 color) + { + this._uColor = color; + return this; + } + + public HairShaderData UseImage(string path) + { + this._uImage = Main.Assets.Request(path, (AssetRequestMode) 1); + return this; + } + + public HairShaderData UseOpacity(float alpha) + { + this._uOpacity = alpha; + return this; + } + + public HairShaderData UseSecondaryColor(float r, float g, float b) => this.UseSecondaryColor(new Vector3(r, g, b)); + + public HairShaderData UseSecondaryColor(Color color) => this.UseSecondaryColor(color.ToVector3()); + + public HairShaderData UseSecondaryColor(Vector3 color) + { + this._uSecondaryColor = color; + return this; + } + + public HairShaderData UseSaturation(float saturation) + { + this._uSaturation = saturation; + return this; + } + + public HairShaderData UseTargetPosition(Vector2 position) + { + this._uTargetPosition = position; + return this; + } + } +} diff --git a/Graphics/Shaders/HairShaderDataSet.cs b/Graphics/Shaders/HairShaderDataSet.cs new file mode 100644 index 0000000..0095c47 --- /dev/null +++ b/Graphics/Shaders/HairShaderDataSet.cs @@ -0,0 +1,43 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Shaders.HairShaderDataSet +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.DataStructures; + +namespace Terraria.Graphics.Shaders +{ + public class HairShaderDataSet + { + protected List _shaderData = new List(); + protected Dictionary _shaderLookupDictionary = new Dictionary(); + protected byte _shaderDataCount; + + public T BindShader(int itemId, T shaderData) where T : HairShaderData + { + if (this._shaderDataCount == byte.MaxValue) + throw new Exception("Too many shaders bound."); + this._shaderLookupDictionary[itemId] = (short) ++this._shaderDataCount; + this._shaderData.Add((HairShaderData) shaderData); + return shaderData; + } + + public void Apply(short shaderId, Player player, DrawData? drawData = null) + { + if (shaderId != (short) 0 && (int) shaderId <= (int) this._shaderDataCount) + this._shaderData[(int) shaderId - 1].Apply(player, drawData); + else + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + } + + public Color GetColor(short shaderId, Player player, Color lightColor) => shaderId != (short) 0 && (int) shaderId <= (int) this._shaderDataCount ? this._shaderData[(int) shaderId - 1].GetColor(player, lightColor) : new Color(lightColor.ToVector4() * player.hairColor.ToVector4()); + + public HairShaderData GetShaderFromItemId(int type) => this._shaderLookupDictionary.ContainsKey(type) ? this._shaderData[(int) this._shaderLookupDictionary[type] - 1] : (HairShaderData) null; + + public short GetShaderIdFromItemId(int type) => this._shaderLookupDictionary.ContainsKey(type) ? this._shaderLookupDictionary[type] : (short) -1; + } +} diff --git a/Graphics/Shaders/MiscShaderData.cs b/Graphics/Shaders/MiscShaderData.cs new file mode 100644 index 0000000..e4d8367 --- /dev/null +++ b/Graphics/Shaders/MiscShaderData.cs @@ -0,0 +1,138 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Shaders.MiscShaderData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.DataStructures; + +namespace Terraria.Graphics.Shaders +{ + public class MiscShaderData : ShaderData + { + private Vector3 _uColor = Vector3.One; + private Vector3 _uSecondaryColor = Vector3.One; + private float _uSaturation = 1f; + private float _uOpacity = 1f; + private Asset _uImage0; + private Asset _uImage1; + private Asset _uImage2; + private bool _useProjectionMatrix; + private Vector4 _shaderSpecificData = Vector4.Zero; + + public MiscShaderData(Ref shader, string passName) + : base(shader, passName) + { + } + + public virtual void Apply(DrawData? drawData = null) + { + this.Shader.Parameters["uColor"].SetValue(this._uColor); + this.Shader.Parameters["uSaturation"].SetValue(this._uSaturation); + this.Shader.Parameters["uSecondaryColor"].SetValue(this._uSecondaryColor); + this.Shader.Parameters["uTime"].SetValue(Main.GlobalTimeWrappedHourly); + this.Shader.Parameters["uOpacity"].SetValue(this._uOpacity); + this.Shader.Parameters["uShaderSpecificData"].SetValue(this._shaderSpecificData); + if (drawData.HasValue) + { + DrawData drawData1 = drawData.Value; + Vector4 vector4 = Vector4.Zero; + if (drawData.Value.sourceRect.HasValue) + vector4 = new Vector4((float) drawData1.sourceRect.Value.X, (float) drawData1.sourceRect.Value.Y, (float) drawData1.sourceRect.Value.Width, (float) drawData1.sourceRect.Value.Height); + this.Shader.Parameters["uSourceRect"].SetValue(vector4); + this.Shader.Parameters["uWorldPosition"].SetValue(Main.screenPosition + drawData1.position); + this.Shader.Parameters["uImageSize0"].SetValue(new Vector2((float) drawData1.texture.Width, (float) drawData1.texture.Height)); + } + else + this.Shader.Parameters["uSourceRect"].SetValue(new Vector4(0.0f, 0.0f, 4f, 4f)); + if (this._uImage0 != null) + { + Main.graphics.GraphicsDevice.Textures[0] = (Texture) this._uImage0.Value; + Main.graphics.GraphicsDevice.SamplerStates[0] = SamplerState.LinearWrap; + this.Shader.Parameters["uImageSize0"].SetValue(new Vector2((float) this._uImage0.Width(), (float) this._uImage0.Height())); + } + if (this._uImage1 != null) + { + Main.graphics.GraphicsDevice.Textures[1] = (Texture) this._uImage1.Value; + Main.graphics.GraphicsDevice.SamplerStates[1] = SamplerState.LinearWrap; + this.Shader.Parameters["uImageSize1"].SetValue(new Vector2((float) this._uImage1.Width(), (float) this._uImage1.Height())); + } + if (this._uImage2 != null) + { + Main.graphics.GraphicsDevice.Textures[2] = (Texture) this._uImage2.Value; + Main.graphics.GraphicsDevice.SamplerStates[2] = SamplerState.LinearWrap; + this.Shader.Parameters["uImageSize2"].SetValue(new Vector2((float) this._uImage2.Width(), (float) this._uImage2.Height())); + } + if (this._useProjectionMatrix) + this.Shader.Parameters["uMatrixTransform0"].SetValue(Main.GameViewMatrix.NormalizedTransformationmatrix); + this.Apply(); + } + + public MiscShaderData UseColor(float r, float g, float b) => this.UseColor(new Vector3(r, g, b)); + + public MiscShaderData UseColor(Color color) => this.UseColor(color.ToVector3()); + + public MiscShaderData UseColor(Vector3 color) + { + this._uColor = color; + return this; + } + + public MiscShaderData UseImage0(string path) + { + this._uImage0 = Main.Assets.Request(path, (AssetRequestMode) 1); + return this; + } + + public MiscShaderData UseImage1(string path) + { + this._uImage1 = Main.Assets.Request(path, (AssetRequestMode) 1); + return this; + } + + public MiscShaderData UseImage2(string path) + { + this._uImage2 = Main.Assets.Request(path, (AssetRequestMode) 1); + return this; + } + + public MiscShaderData UseOpacity(float alpha) + { + this._uOpacity = alpha; + return this; + } + + public MiscShaderData UseSecondaryColor(float r, float g, float b) => this.UseSecondaryColor(new Vector3(r, g, b)); + + public MiscShaderData UseSecondaryColor(Color color) => this.UseSecondaryColor(color.ToVector3()); + + public MiscShaderData UseSecondaryColor(Vector3 color) + { + this._uSecondaryColor = color; + return this; + } + + public MiscShaderData UseProjectionMatrix(bool doUse) + { + this._useProjectionMatrix = doUse; + return this; + } + + public MiscShaderData UseSaturation(float saturation) + { + this._uSaturation = saturation; + return this; + } + + public virtual MiscShaderData GetSecondaryShader(Entity entity) => this; + + public MiscShaderData UseShaderSpecificData(Vector4 specificData) + { + this._shaderSpecificData = specificData; + return this; + } + } +} diff --git a/Graphics/Shaders/ScreenShaderData.cs b/Graphics/Shaders/ScreenShaderData.cs new file mode 100644 index 0000000..a891955 --- /dev/null +++ b/Graphics/Shaders/ScreenShaderData.cs @@ -0,0 +1,179 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Shaders.ScreenShaderData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; + +namespace Terraria.Graphics.Shaders +{ + public class ScreenShaderData : ShaderData + { + private Vector3 _uColor = Vector3.One; + private Vector3 _uSecondaryColor = Vector3.One; + private float _uOpacity = 1f; + private float _globalOpacity = 1f; + private float _uIntensity = 1f; + private Vector2 _uTargetPosition = Vector2.One; + private Vector2 _uDirection = new Vector2(0.0f, 1f); + private float _uProgress; + private Vector2 _uImageOffset = Vector2.Zero; + private Asset[] _uAssetImages = new Asset[3]; + private Texture2D[] _uCustomImages = new Texture2D[3]; + private SamplerState[] _samplerStates = new SamplerState[3]; + private Vector2[] _imageScales = new Vector2[3] + { + Vector2.One, + Vector2.One, + Vector2.One + }; + + public float Intensity => this._uIntensity; + + public float CombinedOpacity => this._uOpacity * this._globalOpacity; + + public ScreenShaderData(string passName) + : base(Main.ScreenShaderRef, passName) + { + } + + public ScreenShaderData(Ref shader, string passName) + : base(shader, passName) + { + } + + public virtual void Update(GameTime gameTime) + { + } + + public override void Apply() + { + Vector2 vector2_1 = new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange); + Vector2 vector2_2 = new Vector2((float) Main.screenWidth, (float) Main.screenHeight) / Main.GameViewMatrix.Zoom; + Vector2 vector2_3 = new Vector2((float) Main.screenWidth, (float) Main.screenHeight) * 0.5f; + Vector2 vector2_4 = Main.screenPosition + vector2_3 * (Vector2.One - Vector2.One / Main.GameViewMatrix.Zoom); + this.Shader.Parameters["uColor"].SetValue(this._uColor); + this.Shader.Parameters["uOpacity"].SetValue(this.CombinedOpacity); + this.Shader.Parameters["uSecondaryColor"].SetValue(this._uSecondaryColor); + this.Shader.Parameters["uTime"].SetValue(Main.GlobalTimeWrappedHourly); + this.Shader.Parameters["uScreenResolution"].SetValue(vector2_2); + this.Shader.Parameters["uScreenPosition"].SetValue(vector2_4 - vector2_1); + this.Shader.Parameters["uTargetPosition"].SetValue(this._uTargetPosition - vector2_1); + this.Shader.Parameters["uImageOffset"].SetValue(this._uImageOffset); + this.Shader.Parameters["uIntensity"].SetValue(this._uIntensity); + this.Shader.Parameters["uProgress"].SetValue(this._uProgress); + this.Shader.Parameters["uDirection"].SetValue(this._uDirection); + this.Shader.Parameters["uZoom"].SetValue(Main.GameViewMatrix.Zoom); + for (int index = 0; index < this._uAssetImages.Length; ++index) + { + Texture2D uCustomImage = this._uCustomImages[index]; + if (this._uAssetImages[index] != null && this._uAssetImages[index].IsLoaded) + uCustomImage = this._uAssetImages[index].Value; + if (uCustomImage != null) + { + Main.graphics.GraphicsDevice.Textures[index + 1] = (Texture) uCustomImage; + int width = uCustomImage.Width; + int height = uCustomImage.Height; + Main.graphics.GraphicsDevice.SamplerStates[index + 1] = this._samplerStates[index] == null ? (!Utils.IsPowerOfTwo(width) || !Utils.IsPowerOfTwo(height) ? SamplerState.AnisotropicClamp : SamplerState.LinearWrap) : this._samplerStates[index]; + this.Shader.Parameters["uImageSize" + (object) (index + 1)].SetValue(new Vector2((float) width, (float) height) * this._imageScales[index]); + } + } + base.Apply(); + } + + public ScreenShaderData UseImageOffset(Vector2 offset) + { + this._uImageOffset = offset; + return this; + } + + public ScreenShaderData UseIntensity(float intensity) + { + this._uIntensity = intensity; + return this; + } + + public ScreenShaderData UseColor(float r, float g, float b) => this.UseColor(new Vector3(r, g, b)); + + public ScreenShaderData UseProgress(float progress) + { + this._uProgress = progress; + return this; + } + + public ScreenShaderData UseImage( + Texture2D image, + int index = 0, + SamplerState samplerState = null) + { + this._samplerStates[index] = samplerState; + this._uAssetImages[index] = (Asset) null; + this._uCustomImages[index] = image; + return this; + } + + public ScreenShaderData UseImage( + string path, + int index = 0, + SamplerState samplerState = null) + { + this._uAssetImages[index] = Main.Assets.Request(path, (AssetRequestMode) 1); + this._uCustomImages[index] = (Texture2D) null; + this._samplerStates[index] = samplerState; + return this; + } + + public ScreenShaderData UseColor(Color color) => this.UseColor(color.ToVector3()); + + public ScreenShaderData UseColor(Vector3 color) + { + this._uColor = color; + return this; + } + + public ScreenShaderData UseDirection(Vector2 direction) + { + this._uDirection = direction; + return this; + } + + public ScreenShaderData UseGlobalOpacity(float opacity) + { + this._globalOpacity = opacity; + return this; + } + + public ScreenShaderData UseTargetPosition(Vector2 position) + { + this._uTargetPosition = position; + return this; + } + + public ScreenShaderData UseSecondaryColor(float r, float g, float b) => this.UseSecondaryColor(new Vector3(r, g, b)); + + public ScreenShaderData UseSecondaryColor(Color color) => this.UseSecondaryColor(color.ToVector3()); + + public ScreenShaderData UseSecondaryColor(Vector3 color) + { + this._uSecondaryColor = color; + return this; + } + + public ScreenShaderData UseOpacity(float opacity) + { + this._uOpacity = opacity; + return this; + } + + public ScreenShaderData UseImageScale(Vector2 scale, int index = 0) + { + this._imageScales[index] = scale; + return this; + } + + public virtual ScreenShaderData GetSecondaryShader(Player player) => this; + } +} diff --git a/Graphics/Shaders/ShaderData.cs b/Graphics/Shaders/ShaderData.cs new file mode 100644 index 0000000..e8d2223 --- /dev/null +++ b/Graphics/Shaders/ShaderData.cs @@ -0,0 +1,40 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.Shaders.ShaderData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.Graphics.Shaders +{ + public class ShaderData + { + private readonly Ref _shader; + private string _passName; + private EffectPass _effectPass; + + public Effect Shader => this._shader != null ? this._shader.Value : (Effect) null; + + public ShaderData(Ref shader, string passName) + { + this._passName = passName; + this._shader = shader; + } + + public void SwapProgram(string passName) + { + this._passName = passName; + if (passName == null) + return; + this._effectPass = this.Shader.CurrentTechnique.Passes[passName]; + } + + public virtual void Apply() + { + if (this._shader != null && this.Shader != null && this._passName != null) + this._effectPass = this.Shader.CurrentTechnique.Passes[this._passName]; + this._effectPass.Apply(); + } + } +} diff --git a/Graphics/SpriteRenderTargetHelper.cs b/Graphics/SpriteRenderTargetHelper.cs new file mode 100644 index 0000000..cb0508d --- /dev/null +++ b/Graphics/SpriteRenderTargetHelper.cs @@ -0,0 +1,79 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.SpriteRenderTargetHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using Terraria.DataStructures; + +namespace Terraria.Graphics +{ + [StructLayout(LayoutKind.Sequential, Size = 1)] + public struct SpriteRenderTargetHelper + { + public static void GetDrawBoundary( + List playerDrawData, + out Vector2 lowest, + out Vector2 highest) + { + lowest = Vector2.Zero; + highest = Vector2.Zero; + for (int index = 0; index <= playerDrawData.Count; ++index) + { + if (index != playerDrawData.Count) + { + DrawData cdd = playerDrawData[index]; + if (index == 0) + { + lowest = cdd.position; + highest = cdd.position; + } + SpriteRenderTargetHelper.GetHighsAndLowsOf(ref lowest, ref highest, ref cdd); + } + } + } + + public static void GetHighsAndLowsOf(ref Vector2 lowest, ref Vector2 highest, ref DrawData cdd) + { + Vector2 origin = cdd.origin; + Rectangle rectangle = cdd.destinationRectangle; + if (cdd.sourceRect.HasValue) + rectangle = cdd.sourceRect.Value; + if (!cdd.sourceRect.HasValue) + rectangle = cdd.texture.Frame(); + rectangle.X = 0; + rectangle.Y = 0; + Vector2 position = cdd.position; + SpriteRenderTargetHelper.GetHighsAndLowsOf(ref lowest, ref highest, ref cdd, ref position, ref origin, new Vector2(0.0f, 0.0f)); + SpriteRenderTargetHelper.GetHighsAndLowsOf(ref lowest, ref highest, ref cdd, ref position, ref origin, new Vector2((float) rectangle.Width, 0.0f)); + SpriteRenderTargetHelper.GetHighsAndLowsOf(ref lowest, ref highest, ref cdd, ref position, ref origin, new Vector2(0.0f, (float) rectangle.Height)); + SpriteRenderTargetHelper.GetHighsAndLowsOf(ref lowest, ref highest, ref cdd, ref position, ref origin, new Vector2((float) rectangle.Width, (float) rectangle.Height)); + } + + public static void GetHighsAndLowsOf( + ref Vector2 lowest, + ref Vector2 highest, + ref DrawData cdd, + ref Vector2 pos, + ref Vector2 origin, + Vector2 corner) + { + Vector2 corner1 = SpriteRenderTargetHelper.GetCorner(ref cdd, ref pos, ref origin, corner); + lowest = Vector2.Min(lowest, corner1); + highest = Vector2.Max(highest, corner1); + } + + public static Vector2 GetCorner( + ref DrawData cdd, + ref Vector2 pos, + ref Vector2 origin, + Vector2 corner) + { + Vector2 spinningpoint = corner - origin; + return pos + spinningpoint.RotatedBy((double) cdd.rotation) * cdd.scale; + } + } +} diff --git a/Graphics/SpriteViewMatrix.cs b/Graphics/SpriteViewMatrix.cs new file mode 100644 index 0000000..fe3613f --- /dev/null +++ b/Graphics/SpriteViewMatrix.cs @@ -0,0 +1,141 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.SpriteViewMatrix +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; + +namespace Terraria.Graphics +{ + public class SpriteViewMatrix + { + private Vector2 _zoom = Vector2.One; + private Vector2 _translation = Vector2.Zero; + private Matrix _zoomMatrix = Matrix.Identity; + private Matrix _transformationMatrix = Matrix.Identity; + private Matrix _normalizedTransformationMatrix = Matrix.Identity; + private SpriteEffects _effects; + private Matrix _effectMatrix; + private GraphicsDevice _graphicsDevice; + private Viewport _viewport; + private bool _overrideSystemViewport; + private bool _needsRebuild = true; + + public Vector2 Zoom + { + get => this._zoom; + set + { + if (!(this._zoom != value)) + return; + this._zoom = value; + this._needsRebuild = true; + } + } + + public Vector2 Translation + { + get + { + if (this.ShouldRebuild()) + this.Rebuild(); + return this._translation; + } + } + + public Matrix ZoomMatrix + { + get + { + if (this.ShouldRebuild()) + this.Rebuild(); + return this._zoomMatrix; + } + } + + public Matrix TransformationMatrix + { + get + { + if (this.ShouldRebuild()) + this.Rebuild(); + return this._transformationMatrix; + } + } + + public Matrix NormalizedTransformationmatrix + { + get + { + if (this.ShouldRebuild()) + this.Rebuild(); + return this._normalizedTransformationMatrix; + } + } + + public SpriteEffects Effects + { + get => this._effects; + set + { + if (this._effects == value) + return; + this._effects = value; + this._needsRebuild = true; + } + } + + public Matrix EffectMatrix + { + get + { + if (this.ShouldRebuild()) + this.Rebuild(); + return this._effectMatrix; + } + } + + public SpriteViewMatrix(GraphicsDevice graphicsDevice) => this._graphicsDevice = graphicsDevice; + + private void Rebuild() + { + if (!this._overrideSystemViewport) + this._viewport = this._graphicsDevice.Viewport; + Vector2 vector2_1 = new Vector2((float) this._viewport.Width, (float) this._viewport.Height); + Matrix identity = Matrix.Identity; + if (this._effects.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + identity *= Matrix.CreateScale(-1f, 1f, 1f) * Matrix.CreateTranslation(vector2_1.X, 0.0f, 0.0f); + if (this._effects.HasFlag((Enum) SpriteEffects.FlipVertically)) + identity *= Matrix.CreateScale(1f, -1f, 1f) * Matrix.CreateTranslation(0.0f, vector2_1.Y, 0.0f); + Vector2 vector2_2 = vector2_1 * 0.5f; + Vector2 vector2_3 = vector2_2 - vector2_2 / this._zoom; + Matrix orthographicOffCenter = Matrix.CreateOrthographicOffCenter(0.0f, vector2_1.X, vector2_1.Y, 0.0f, 0.0f, 1f); + this._translation = vector2_3; + this._zoomMatrix = Matrix.CreateTranslation(-vector2_3.X, -vector2_3.Y, 0.0f) * Matrix.CreateScale(this._zoom.X, this._zoom.Y, 1f); + this._effectMatrix = identity; + this._transformationMatrix = identity * this._zoomMatrix; + this._normalizedTransformationMatrix = Matrix.Invert(identity) * this._zoomMatrix * orthographicOffCenter; + this._needsRebuild = false; + } + + public void SetViewportOverride(Viewport viewport) + { + this._viewport = viewport; + this._overrideSystemViewport = true; + } + + public void ClearViewportOverride() => this._overrideSystemViewport = false; + + private bool ShouldRebuild() + { + if (this._needsRebuild) + return true; + if (this._overrideSystemViewport) + return false; + return this._graphicsDevice.Viewport.Width != this._viewport.Width || this._graphicsDevice.Viewport.Height != this._viewport.Height; + } + } +} diff --git a/Graphics/TileBatch.cs b/Graphics/TileBatch.cs new file mode 100644 index 0000000..224aa68 --- /dev/null +++ b/Graphics/TileBatch.cs @@ -0,0 +1,368 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.TileBatch +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; + +namespace Terraria.Graphics +{ + public class TileBatch + { + private static readonly float[] CORNER_OFFSET_X = new float[4] + { + 0.0f, + 1f, + 1f, + 0.0f + }; + private static readonly float[] CORNER_OFFSET_Y = new float[4] + { + 0.0f, + 0.0f, + 1f, + 1f + }; + private GraphicsDevice _graphicsDevice; + private TileBatch.SpriteData[] _spriteDataQueue = new TileBatch.SpriteData[2048]; + private Texture2D[] _spriteTextures; + private int _queuedSpriteCount; + private SpriteBatch _spriteBatch; + private static Vector2 _vector2Zero; + private static Rectangle? _nullRectangle; + private DynamicVertexBuffer _vertexBuffer; + private DynamicIndexBuffer _indexBuffer; + private short[] _fallbackIndexData; + private VertexPositionColorTexture[] _vertices = new VertexPositionColorTexture[8192]; + private int _vertexBufferPosition; + + public TileBatch(GraphicsDevice graphicsDevice) + { + this._graphicsDevice = graphicsDevice; + this._spriteBatch = new SpriteBatch(graphicsDevice); + this.Allocate(); + } + + private void Allocate() + { + if (this._vertexBuffer == null || this._vertexBuffer.IsDisposed) + { + this._vertexBuffer = new DynamicVertexBuffer(this._graphicsDevice, typeof (VertexPositionColorTexture), 8192, BufferUsage.WriteOnly); + this._vertexBufferPosition = 0; + this._vertexBuffer.ContentLost += (EventHandler) ((_param1, _param2) => this._vertexBufferPosition = 0); + } + if (this._indexBuffer != null && !this._indexBuffer.IsDisposed) + return; + if (this._fallbackIndexData == null) + { + this._fallbackIndexData = new short[12288]; + for (int index = 0; index < 2048; ++index) + { + this._fallbackIndexData[index * 6] = (short) (index * 4); + this._fallbackIndexData[index * 6 + 1] = (short) (index * 4 + 1); + this._fallbackIndexData[index * 6 + 2] = (short) (index * 4 + 2); + this._fallbackIndexData[index * 6 + 3] = (short) (index * 4); + this._fallbackIndexData[index * 6 + 4] = (short) (index * 4 + 2); + this._fallbackIndexData[index * 6 + 5] = (short) (index * 4 + 3); + } + } + this._indexBuffer = new DynamicIndexBuffer(this._graphicsDevice, typeof (short), 12288, BufferUsage.WriteOnly); + this._indexBuffer.SetData(this._fallbackIndexData); + this._indexBuffer.ContentLost += (EventHandler) ((_param1, _param2) => this._indexBuffer.SetData(this._fallbackIndexData)); + } + + private void FlushRenderState() + { + this.Allocate(); + this._graphicsDevice.SetVertexBuffer((VertexBuffer) this._vertexBuffer); + this._graphicsDevice.Indices = (IndexBuffer) this._indexBuffer; + this._graphicsDevice.SamplerStates[0] = SamplerState.PointClamp; + } + + public void Dispose() + { + if (this._vertexBuffer != null) + this._vertexBuffer.Dispose(); + if (this._indexBuffer == null) + return; + this._indexBuffer.Dispose(); + } + + public void Begin(Matrix transformation) + { + this._spriteBatch.Begin(SpriteSortMode.Deferred, (BlendState) null, (SamplerState) null, (DepthStencilState) null, (RasterizerState) null, (Effect) null, transformation); + this._spriteBatch.End(); + } + + public void Begin() + { + this._spriteBatch.Begin(); + this._spriteBatch.End(); + } + + public void Draw(Texture2D texture, Vector2 position, VertexColors colors) => this.InternalDraw(texture, ref new Vector4() + { + X = position.X, + Y = position.Y, + Z = 1f, + W = 1f + }, true, ref TileBatch._nullRectangle, ref colors, ref TileBatch._vector2Zero, SpriteEffects.None, 0.0f); + + public void Draw( + Texture2D texture, + Vector2 position, + Rectangle? sourceRectangle, + VertexColors colors, + Vector2 origin, + float scale, + SpriteEffects effects) + { + this.InternalDraw(texture, ref new Vector4() + { + X = position.X, + Y = position.Y, + Z = scale, + W = scale + }, true, ref sourceRectangle, ref colors, ref origin, effects, 0.0f); + } + + public void Draw(Texture2D texture, Vector4 destination, VertexColors colors) => this.InternalDraw(texture, ref destination, false, ref TileBatch._nullRectangle, ref colors, ref TileBatch._vector2Zero, SpriteEffects.None, 0.0f); + + public void Draw(Texture2D texture, Vector2 position, VertexColors colors, Vector2 scale) => this.InternalDraw(texture, ref new Vector4() + { + X = position.X, + Y = position.Y, + Z = scale.X, + W = scale.Y + }, true, ref TileBatch._nullRectangle, ref colors, ref TileBatch._vector2Zero, SpriteEffects.None, 0.0f); + + public void Draw( + Texture2D texture, + Vector4 destination, + Rectangle? sourceRectangle, + VertexColors colors) + { + this.InternalDraw(texture, ref destination, false, ref sourceRectangle, ref colors, ref TileBatch._vector2Zero, SpriteEffects.None, 0.0f); + } + + public void Draw( + Texture2D texture, + Vector4 destination, + Rectangle? sourceRectangle, + VertexColors colors, + Vector2 origin, + SpriteEffects effects, + float rotation) + { + this.InternalDraw(texture, ref destination, false, ref sourceRectangle, ref colors, ref origin, effects, rotation); + } + + public void Draw( + Texture2D texture, + Rectangle destinationRectangle, + Rectangle? sourceRectangle, + VertexColors colors) + { + this.InternalDraw(texture, ref new Vector4() + { + X = (float) destinationRectangle.X, + Y = (float) destinationRectangle.Y, + Z = (float) destinationRectangle.Width, + W = (float) destinationRectangle.Height + }, false, ref sourceRectangle, ref colors, ref TileBatch._vector2Zero, SpriteEffects.None, 0.0f); + } + + private static short[] CreateIndexData() + { + short[] numArray = new short[12288]; + for (int index = 0; index < 2048; ++index) + { + numArray[index * 6] = (short) (index * 4); + numArray[index * 6 + 1] = (short) (index * 4 + 1); + numArray[index * 6 + 2] = (short) (index * 4 + 2); + numArray[index * 6 + 3] = (short) (index * 4); + numArray[index * 6 + 4] = (short) (index * 4 + 2); + numArray[index * 6 + 5] = (short) (index * 4 + 3); + } + return numArray; + } + + private unsafe void InternalDraw( + Texture2D texture, + ref Vector4 destination, + bool scaleDestination, + ref Rectangle? sourceRectangle, + ref VertexColors colors, + ref Vector2 origin, + SpriteEffects effects, + float rotation) + { + if (this._queuedSpriteCount >= this._spriteDataQueue.Length) + Array.Resize(ref this._spriteDataQueue, this._spriteDataQueue.Length << 1); + fixed (TileBatch.SpriteData* spriteDataPtr = &this._spriteDataQueue[this._queuedSpriteCount]) + { + float z = destination.Z; + float w = destination.W; + if (sourceRectangle.HasValue) + { + Rectangle rectangle = sourceRectangle.Value; + spriteDataPtr->Source.X = (float) rectangle.X; + spriteDataPtr->Source.Y = (float) rectangle.Y; + spriteDataPtr->Source.Z = (float) rectangle.Width; + spriteDataPtr->Source.W = (float) rectangle.Height; + if (scaleDestination) + { + z *= (float) rectangle.Width; + w *= (float) rectangle.Height; + } + } + else + { + float width = (float) texture.Width; + float height = (float) texture.Height; + spriteDataPtr->Source.X = 0.0f; + spriteDataPtr->Source.Y = 0.0f; + spriteDataPtr->Source.Z = width; + spriteDataPtr->Source.W = height; + if (scaleDestination) + { + z *= width; + w *= height; + } + } + spriteDataPtr->Destination.X = destination.X; + spriteDataPtr->Destination.Y = destination.Y; + spriteDataPtr->Destination.Z = z; + spriteDataPtr->Destination.W = w; + spriteDataPtr->Origin.X = origin.X; + spriteDataPtr->Origin.Y = origin.Y; + spriteDataPtr->Effects = effects; + spriteDataPtr->Colors = colors; + spriteDataPtr->Rotation = rotation; + } + if (this._spriteTextures == null || this._spriteTextures.Length != this._spriteDataQueue.Length) + Array.Resize(ref this._spriteTextures, this._spriteDataQueue.Length); + this._spriteTextures[this._queuedSpriteCount++] = texture; + } + + public void End() + { + if (this._queuedSpriteCount == 0) + return; + this.FlushRenderState(); + this.Flush(); + } + + private void Flush() + { + Texture2D texture = (Texture2D) null; + int offset = 0; + for (int index = 0; index < this._queuedSpriteCount; ++index) + { + if (this._spriteTextures[index] != texture) + { + if (index > offset) + this.RenderBatch(texture, this._spriteDataQueue, offset, index - offset); + offset = index; + texture = this._spriteTextures[index]; + } + } + this.RenderBatch(texture, this._spriteDataQueue, offset, this._queuedSpriteCount - offset); + Array.Clear((Array) this._spriteTextures, 0, this._queuedSpriteCount); + this._queuedSpriteCount = 0; + } + + private unsafe void RenderBatch( + Texture2D texture, + TileBatch.SpriteData[] sprites, + int offset, + int count) + { + this._graphicsDevice.Textures[0] = (Texture) texture; + float num1 = 1f / (float) texture.Width; + float num2 = 1f / (float) texture.Height; + int num3; + for (; count > 0; count -= num3) + { + SetDataOptions options = SetDataOptions.NoOverwrite; + num3 = count; + if (num3 > 2048 - this._vertexBufferPosition) + { + num3 = 2048 - this._vertexBufferPosition; + if (num3 < 256) + { + this._vertexBufferPosition = 0; + options = SetDataOptions.Discard; + num3 = count; + if (num3 > 2048) + num3 = 2048; + } + } + fixed (TileBatch.SpriteData* spriteDataPtr1 = &sprites[offset]) + fixed (VertexPositionColorTexture* positionColorTexturePtr1 = &this._vertices[0]) + { + TileBatch.SpriteData* spriteDataPtr2 = spriteDataPtr1; + VertexPositionColorTexture* positionColorTexturePtr2 = positionColorTexturePtr1; + for (int index1 = 0; index1 < num3; ++index1) + { + float num4; + float num5; + if ((double) spriteDataPtr2->Rotation != 0.0) + { + num4 = (float) Math.Cos((double) spriteDataPtr2->Rotation); + num5 = (float) Math.Sin((double) spriteDataPtr2->Rotation); + } + else + { + num4 = 1f; + num5 = 0.0f; + } + float num6 = spriteDataPtr2->Origin.X / spriteDataPtr2->Source.Z; + float num7 = spriteDataPtr2->Origin.Y / spriteDataPtr2->Source.W; + positionColorTexturePtr2->Color = spriteDataPtr2->Colors.TopLeftColor; + positionColorTexturePtr2[1].Color = spriteDataPtr2->Colors.TopRightColor; + positionColorTexturePtr2[2].Color = spriteDataPtr2->Colors.BottomRightColor; + positionColorTexturePtr2[3].Color = spriteDataPtr2->Colors.BottomLeftColor; + for (int index2 = 0; index2 < 4; ++index2) + { + float num8 = TileBatch.CORNER_OFFSET_X[index2]; + float num9 = TileBatch.CORNER_OFFSET_Y[index2]; + float num10 = (num8 - num6) * spriteDataPtr2->Destination.Z; + float num11 = (num9 - num7) * spriteDataPtr2->Destination.W; + float num12 = (float) ((double) spriteDataPtr2->Destination.X + (double) num10 * (double) num4 - (double) num11 * (double) num5); + float num13 = (float) ((double) spriteDataPtr2->Destination.Y + (double) num10 * (double) num5 + (double) num11 * (double) num4); + if ((spriteDataPtr2->Effects & SpriteEffects.FlipVertically) != SpriteEffects.None) + num8 = 1f - num8; + if ((spriteDataPtr2->Effects & SpriteEffects.FlipHorizontally) != SpriteEffects.None) + num9 = 1f - num9; + positionColorTexturePtr2->Position.X = num12; + positionColorTexturePtr2->Position.Y = num13; + positionColorTexturePtr2->Position.Z = 0.0f; + positionColorTexturePtr2->TextureCoordinate.X = (spriteDataPtr2->Source.X + num8 * spriteDataPtr2->Source.Z) * num1; + positionColorTexturePtr2->TextureCoordinate.Y = (spriteDataPtr2->Source.Y + num9 * spriteDataPtr2->Source.W) * num2; + ++positionColorTexturePtr2; + } + ++spriteDataPtr2; + } + } + this._vertexBuffer.SetData(this._vertexBufferPosition * sizeof (VertexPositionColorTexture) * 4, this._vertices, 0, num3 * 4, sizeof (VertexPositionColorTexture), options); + this._graphicsDevice.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, this._vertexBufferPosition * 4, num3 * 4, this._vertexBufferPosition * 6, num3 * 2); + this._vertexBufferPosition += num3; + offset += num3; + } + } + + private struct SpriteData + { + public Vector4 Source; + public Vector4 Destination; + public Vector2 Origin; + public SpriteEffects Effects; + public VertexColors Colors; + public float Rotation; + } + } +} diff --git a/Graphics/VertexColors.cs b/Graphics/VertexColors.cs new file mode 100644 index 0000000..d82eca6 --- /dev/null +++ b/Graphics/VertexColors.cs @@ -0,0 +1,34 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.VertexColors +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.Graphics +{ + public struct VertexColors + { + public Color TopLeftColor; + public Color TopRightColor; + public Color BottomLeftColor; + public Color BottomRightColor; + + public VertexColors(Color color) + { + this.TopLeftColor = color; + this.TopRightColor = color; + this.BottomRightColor = color; + this.BottomLeftColor = color; + } + + public VertexColors(Color topLeft, Color topRight, Color bottomRight, Color bottomLeft) + { + this.TopLeftColor = topLeft; + this.TopRightColor = topRight; + this.BottomLeftColor = bottomLeft; + this.BottomRightColor = bottomRight; + } + } +} diff --git a/Graphics/VertexStrip.cs b/Graphics/VertexStrip.cs new file mode 100644 index 0000000..30c97d3 --- /dev/null +++ b/Graphics/VertexStrip.cs @@ -0,0 +1,194 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.VertexStrip +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; + +namespace Terraria.Graphics +{ + public class VertexStrip + { + private VertexStrip.CustomVertexInfo[] _vertices = new VertexStrip.CustomVertexInfo[1]; + private int _vertexAmountCurrentlyMaintained; + private short[] _indices = new short[1]; + private int _indicesAmountCurrentlyMaintained; + private List _temporaryPositionsCache = new List(); + private List _temporaryRotationsCache = new List(); + + public void PrepareStrip( + Vector2[] positions, + float[] rotations, + VertexStrip.StripColorFunction colorFunction, + VertexStrip.StripHalfWidthFunction widthFunction, + Vector2 offsetForAllPositions = default (Vector2), + int? expectedVertexPairsAmount = null, + bool includeBacksides = false) + { + int vertexPaidsAdded = positions.Length; + int newSize = vertexPaidsAdded * 2; + this._vertexAmountCurrentlyMaintained = newSize; + if (this._vertices.Length < newSize) + Array.Resize(ref this._vertices, newSize); + int num = vertexPaidsAdded; + if (expectedVertexPairsAmount.HasValue) + num = expectedVertexPairsAmount.Value; + for (int index = 0; index < vertexPaidsAdded; ++index) + { + if (positions[index] == Vector2.Zero) + { + vertexPaidsAdded = index - 1; + this._vertexAmountCurrentlyMaintained = vertexPaidsAdded * 2; + break; + } + Vector2 pos = positions[index] + offsetForAllPositions; + float rot = MathHelper.WrapAngle(rotations[index]); + int indexOnVertexArray = index * 2; + float progressOnStrip = (float) index / (float) (num - 1); + this.AddVertex(colorFunction, widthFunction, pos, rot, indexOnVertexArray, progressOnStrip); + } + this.PrepareIndices(vertexPaidsAdded, includeBacksides); + } + + public void PrepareStripWithProceduralPadding( + Vector2[] positions, + float[] rotations, + VertexStrip.StripColorFunction colorFunction, + VertexStrip.StripHalfWidthFunction widthFunction, + Vector2 offsetForAllPositions = default (Vector2), + bool includeBacksides = false) + { + int length = positions.Length; + this._temporaryPositionsCache.Clear(); + this._temporaryRotationsCache.Clear(); + for (int index = 0; index < length && !(positions[index] == Vector2.Zero); ++index) + { + Vector2 position1 = positions[index]; + float f1 = MathHelper.WrapAngle(rotations[index]); + this._temporaryPositionsCache.Add(position1); + this._temporaryRotationsCache.Add(f1); + if (index + 1 < length && positions[index + 1] != Vector2.Zero) + { + Vector2 position2 = positions[index + 1]; + float f2 = MathHelper.WrapAngle(rotations[index + 1]); + int num1 = (int) ((double) Math.Abs(MathHelper.WrapAngle(f2 - f1)) / 0.261799395084381); + if (num1 != 0) + { + float num2 = position1.Distance(position2); + Vector2 vector2_1 = position1 + f1.ToRotationVector2() * num2; + Vector2 vector2_2 = position2 + f2.ToRotationVector2() * -num2; + float num3 = 1f / (float) (num1 + 2); + Vector2 Target = position1; + for (float amount = num3; (double) amount < 1.0; amount += num3) + { + Vector2 Origin = Vector2.CatmullRom(vector2_1, position1, position2, vector2_2, amount); + float num4 = MathHelper.WrapAngle(Origin.DirectionTo(Target).ToRotation()); + this._temporaryPositionsCache.Add(Origin); + this._temporaryRotationsCache.Add(num4); + Target = Origin; + } + } + } + } + int count = this._temporaryPositionsCache.Count; + for (int index = 0; index < count; ++index) + { + Vector2 pos = this._temporaryPositionsCache[index] + offsetForAllPositions; + float rot = this._temporaryRotationsCache[index]; + int indexOnVertexArray = index * 2; + float progressOnStrip = (float) index / (float) (count - 1); + this.AddVertex(colorFunction, widthFunction, pos, rot, indexOnVertexArray, progressOnStrip); + } + this._vertexAmountCurrentlyMaintained = count * 2; + this.PrepareIndices(count, includeBacksides); + } + + private void PrepareIndices(int vertexPaidsAdded, bool includeBacksides) + { + int num1 = vertexPaidsAdded - 1; + int num2 = 6 + includeBacksides.ToInt() * 6; + int newSize = num1 * num2; + this._indicesAmountCurrentlyMaintained = newSize; + if (this._indices.Length < newSize) + Array.Resize(ref this._indices, newSize); + for (short index = 0; (int) index < num1; ++index) + { + short num3 = (short) ((int) index * num2); + int num4 = (int) index * 2; + this._indices[(int) num3] = (short) num4; + this._indices[(int) num3 + 1] = (short) (num4 + 1); + this._indices[(int) num3 + 2] = (short) (num4 + 2); + this._indices[(int) num3 + 3] = (short) (num4 + 2); + this._indices[(int) num3 + 4] = (short) (num4 + 1); + this._indices[(int) num3 + 5] = (short) (num4 + 3); + if (includeBacksides) + { + this._indices[(int) num3 + 6] = (short) (num4 + 2); + this._indices[(int) num3 + 7] = (short) (num4 + 1); + this._indices[(int) num3 + 8] = (short) num4; + this._indices[(int) num3 + 9] = (short) (num4 + 2); + this._indices[(int) num3 + 10] = (short) (num4 + 3); + this._indices[(int) num3 + 11] = (short) (num4 + 1); + } + } + } + + private void AddVertex( + VertexStrip.StripColorFunction colorFunction, + VertexStrip.StripHalfWidthFunction widthFunction, + Vector2 pos, + float rot, + int indexOnVertexArray, + float progressOnStrip) + { + while (indexOnVertexArray + 1 >= this._vertices.Length) + Array.Resize(ref this._vertices, this._vertices.Length * 2); + Color color = colorFunction(progressOnStrip); + float num = widthFunction(progressOnStrip); + Vector2 vector2 = MathHelper.WrapAngle(rot - 1.570796f).ToRotationVector2() * num; + this._vertices[indexOnVertexArray].Position = pos + vector2; + this._vertices[indexOnVertexArray + 1].Position = pos - vector2; + this._vertices[indexOnVertexArray].TexCoord = new Vector3(progressOnStrip, num, num); + this._vertices[indexOnVertexArray + 1].TexCoord = new Vector3(progressOnStrip, 0.0f, num); + this._vertices[indexOnVertexArray].Color = color; + this._vertices[indexOnVertexArray + 1].Color = color; + } + + public void DrawTrail() + { + if (this._vertexAmountCurrentlyMaintained < 3) + return; + Main.instance.GraphicsDevice.DrawUserIndexedPrimitives(PrimitiveType.TriangleList, this._vertices, 0, this._vertexAmountCurrentlyMaintained, this._indices, 0, this._indicesAmountCurrentlyMaintained / 3); + } + + public delegate Color StripColorFunction(float progressOnStrip); + + public delegate float StripHalfWidthFunction(float progressOnStrip); + + private struct CustomVertexInfo : IVertexType + { + public Vector2 Position; + public Color Color; + public Vector3 TexCoord; + private static VertexDeclaration _vertexDeclaration = new VertexDeclaration(new VertexElement[3] + { + new VertexElement(0, VertexElementFormat.Vector2, VertexElementUsage.Position, 0), + new VertexElement(8, VertexElementFormat.Color, VertexElementUsage.Color, 0), + new VertexElement(12, VertexElementFormat.Vector3, VertexElementUsage.TextureCoordinate, 0) + }); + + public CustomVertexInfo(Vector2 position, Color color, Vector3 texCoord) + { + this.Position = position; + this.Color = color; + this.TexCoord = texCoord; + } + + public VertexDeclaration VertexDeclaration => VertexStrip.CustomVertexInfo._vertexDeclaration; + } + } +} diff --git a/Graphics/VirtualCamera.cs b/Graphics/VirtualCamera.cs new file mode 100644 index 0000000..2e2a0c7 --- /dev/null +++ b/Graphics/VirtualCamera.cs @@ -0,0 +1,23 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.VirtualCamera +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.Graphics +{ + public struct VirtualCamera + { + public readonly Player Player; + + public VirtualCamera(Player player) => this.Player = player; + + public Vector2 Position => this.Center - this.Size * 0.5f; + + public Vector2 Size => new Vector2((float) Main.maxScreenW, (float) Main.maxScreenH); + + public Vector2 Center => this.Player.Center; + } +} diff --git a/Graphics/WindowStateController.cs b/Graphics/WindowStateController.cs new file mode 100644 index 0000000..f52520e --- /dev/null +++ b/Graphics/WindowStateController.cs @@ -0,0 +1,55 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Graphics.WindowStateController +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Drawing; +using System.Windows.Forms; + +namespace Terraria.Graphics +{ + public class WindowStateController + { + public bool CanMoveWindowAcrossScreens => true; + + public string ScreenDeviceName => Main.instance.Window.ScreenDeviceName; + + public void TryMovingToScreen(string screenDeviceName) + { + Rectangle bounds; + if (!this.CanMoveWindowAcrossScreens || !this.TryGetBounds(screenDeviceName, out bounds) || !this.IsVisibleOnAnyScreen(bounds)) + return; + Form form = (Form) Control.FromHandle(Main.instance.Window.Handle); + if (!this.WouldViewFitInScreen(form.Bounds, bounds)) + return; + form.Location = new Point(bounds.Width / 2 - form.Width / 2 + bounds.X, bounds.Height / 2 - form.Height / 2 + bounds.Y); + } + + private bool TryGetBounds(string screenDeviceName, out Rectangle bounds) + { + bounds = new Rectangle(); + foreach (Screen allScreen in Screen.AllScreens) + { + if (allScreen.DeviceName == screenDeviceName) + { + bounds = allScreen.Bounds; + return true; + } + } + return false; + } + + private bool WouldViewFitInScreen(Rectangle view, Rectangle screen) => view.Width <= screen.Width && view.Height <= screen.Height; + + private bool IsVisibleOnAnyScreen(Rectangle rect) + { + foreach (Screen allScreen in Screen.AllScreens) + { + if (allScreen.WorkingArea.IntersectsWith(rect)) + return true; + } + return false; + } + } +} diff --git a/HitTile.cs b/HitTile.cs new file mode 100644 index 0000000..dd852bb --- /dev/null +++ b/HitTile.cs @@ -0,0 +1,369 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.HitTile +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria.GameContent; +using Terraria.Utilities; + +namespace Terraria +{ + public class HitTile + { + internal const int UNUSED = 0; + internal const int TILE = 1; + internal const int WALL = 2; + internal const int MAX_HITTILES = 500; + internal const int TIMETOLIVE = 60; + private static UnifiedRandom rand; + private static int lastCrack = -1; + public HitTile.HitTileObject[] data; + private int[] order; + private int bufferLocation; + + public static void ClearAllTilesAtThisLocation(int x, int y) + { + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active) + Main.player[index].hitTile.ClearThisTile(x, y); + } + } + + public void ClearThisTile(int x, int y) + { + for (int tileId = 0; tileId <= 500; ++tileId) + { + HitTile.HitTileObject hitTileObject = this.data[this.order[tileId]]; + if (hitTileObject.X == x && hitTileObject.Y == y) + { + this.Clear(tileId); + this.Prune(); + } + } + } + + public HitTile() + { + HitTile.rand = new UnifiedRandom(); + this.data = new HitTile.HitTileObject[501]; + this.order = new int[501]; + for (int index = 0; index <= 500; ++index) + { + this.data[index] = new HitTile.HitTileObject(); + this.order[index] = index; + } + this.bufferLocation = 0; + } + + public int TryFinding(int x, int y, int hitType) + { + for (int index1 = 0; index1 <= 500; ++index1) + { + int index2 = this.order[index1]; + HitTile.HitTileObject hitTileObject = this.data[index2]; + if (hitTileObject.type == hitType) + { + if (hitTileObject.X == x && hitTileObject.Y == y) + return index2; + } + else if (index1 != 0 && hitTileObject.type == 0) + break; + } + return -1; + } + + public void TryClearingAndPruning(int x, int y, int hitType) + { + int tileId = this.TryFinding(x, y, hitType); + if (tileId == -1) + return; + this.Clear(tileId); + this.Prune(); + } + + public int HitObject(int x, int y, int hitType) + { + for (int index1 = 0; index1 <= 500; ++index1) + { + int index2 = this.order[index1]; + HitTile.HitTileObject hitTileObject = this.data[index2]; + if (hitTileObject.type == hitType) + { + if (hitTileObject.X == x && hitTileObject.Y == y) + return index2; + } + else if (index1 != 0 && hitTileObject.type == 0) + break; + } + HitTile.HitTileObject hitTileObject1 = this.data[this.bufferLocation]; + hitTileObject1.X = x; + hitTileObject1.Y = y; + hitTileObject1.type = hitType; + return this.bufferLocation; + } + + public void UpdatePosition(int tileId, int x, int y) + { + if (tileId < 0 || tileId > 500) + return; + HitTile.HitTileObject hitTileObject = this.data[tileId]; + hitTileObject.X = x; + hitTileObject.Y = y; + } + + public int AddDamage(int tileId, int damageAmount, bool updateAmount = true) + { + if (tileId < 0 || tileId > 500 || tileId == this.bufferLocation && damageAmount == 0) + return 0; + HitTile.HitTileObject hitTileObject = this.data[tileId]; + if (!updateAmount) + return hitTileObject.damage + damageAmount; + hitTileObject.damage += damageAmount; + hitTileObject.timeToLive = 60; + hitTileObject.animationTimeElapsed = 0; + hitTileObject.animationDirection = (Main.rand.NextFloat() * 6.283185f).ToRotationVector2() * 2f; + this.SortSlots(tileId); + return hitTileObject.damage; + } + + private void SortSlots(int tileId) + { + if (tileId == this.bufferLocation) + { + this.bufferLocation = this.order[500]; + if (tileId != this.bufferLocation) + this.data[this.bufferLocation].Clear(); + for (int index = 500; index > 0; --index) + this.order[index] = this.order[index - 1]; + this.order[0] = this.bufferLocation; + } + else + { + int index = 0; + while (index <= 500 && this.order[index] != tileId) + ++index; + for (; index > 1; --index) + { + int num = this.order[index - 1]; + this.order[index - 1] = this.order[index]; + this.order[index] = num; + } + this.order[1] = tileId; + } + } + + public void Clear(int tileId) + { + if (tileId < 0 || tileId > 500) + return; + this.data[tileId].Clear(); + int index = 0; + while (index < 500 && this.order[index] != tileId) + ++index; + for (; index < 500; ++index) + this.order[index] = this.order[index + 1]; + this.order[500] = tileId; + } + + public void Prune() + { + bool flag = false; + for (int index = 0; index <= 500; ++index) + { + HitTile.HitTileObject hitTileObject = this.data[index]; + if (hitTileObject.type != 0) + { + Tile tile = Main.tile[hitTileObject.X, hitTileObject.Y]; + if (hitTileObject.timeToLive <= 1) + { + hitTileObject.Clear(); + flag = true; + } + else + { + --hitTileObject.timeToLive; + if ((double) hitTileObject.timeToLive < 12.0) + hitTileObject.damage -= 10; + else if ((double) hitTileObject.timeToLive < 24.0) + hitTileObject.damage -= 7; + else if ((double) hitTileObject.timeToLive < 36.0) + hitTileObject.damage -= 5; + else if ((double) hitTileObject.timeToLive < 48.0) + hitTileObject.damage -= 2; + if (hitTileObject.damage < 0) + { + hitTileObject.Clear(); + flag = true; + } + else if (hitTileObject.type == 1) + { + if (!tile.active()) + { + hitTileObject.Clear(); + flag = true; + } + } + else if (tile.wall == (ushort) 0) + { + hitTileObject.Clear(); + flag = true; + } + } + } + } + if (!flag) + return; + int num1 = 1; + while (flag) + { + flag = false; + for (int index = num1; index < 500; ++index) + { + if (this.data[this.order[index]].type == 0 && this.data[this.order[index + 1]].type != 0) + { + int num2 = this.order[index]; + this.order[index] = this.order[index + 1]; + this.order[index + 1] = num2; + flag = true; + } + } + } + } + + public void DrawFreshAnimations(SpriteBatch spriteBatch) + { + for (int index = 0; index < this.data.Length; ++index) + ++this.data[index].animationTimeElapsed; + if (!Main.SettingsEnabled_MinersWobble) + return; + int num1 = 1; + Vector2 vector2_1 = new Vector2((float) Main.offScreenRange); + if (Main.drawToScreen) + vector2_1 = Vector2.Zero; + vector2_1 = Vector2.Zero; + for (int index = 0; index < this.data.Length; ++index) + { + if (this.data[index].type == num1) + { + int damage = this.data[index].damage; + if (damage >= 20) + { + int x = this.data[index].X; + int y = this.data[index].Y; + if (WorldGen.InWorld(x, y)) + { + bool flag1 = Main.tile[x, y] != null; + if (flag1 && num1 == 1) + flag1 = flag1 && Main.tile[x, y].active() && Main.tileSolid[(int) Main.tile[x, y].type]; + if (flag1 && num1 == 2) + flag1 = flag1 && Main.tile[x, y].wall > (ushort) 0; + if (flag1) + { + bool flag2 = false; + bool flag3 = false; + if (Main.tile[x, y].type == (ushort) 10) + flag2 = false; + else if (Main.tileSolid[(int) Main.tile[x, y].type] && !Main.tileSolidTop[(int) Main.tile[x, y].type]) + flag2 = true; + else if (WorldGen.IsTreeType((int) Main.tile[x, y].type)) + { + flag3 = true; + int num2 = (int) Main.tile[x, y].frameX / 22; + int num3 = (int) Main.tile[x, y].frameY / 22; + if (num3 < 9) + flag2 = (num2 != 1 && num2 != 2 || num3 < 6 || num3 > 8) && (num2 != 3 || num3 > 2) && (num2 != 4 || num3 < 3 || num3 > 5) && (num2 != 5 || num3 < 6 || num3 > 8); + } + else if (Main.tile[x, y].type == (ushort) 72) + { + flag3 = true; + if (Main.tile[x, y].frameX <= (short) 34) + flag2 = true; + } + if (flag2 && Main.tile[x, y].slope() == (byte) 0 && !Main.tile[x, y].halfBrick()) + { + int num4 = 0; + if (damage >= 80) + num4 = 3; + else if (damage >= 60) + num4 = 2; + else if (damage >= 40) + num4 = 1; + else if (damage >= 20) + num4 = 0; + Rectangle rectangle = new Rectangle(this.data[index].crackStyle * 18, num4 * 18, 16, 16); + rectangle.Inflate(-2, -2); + if (flag3) + rectangle.X = (4 + this.data[index].crackStyle / 2) * 18; + int animationTimeElapsed = this.data[index].animationTimeElapsed; + if ((double) animationTimeElapsed < 10.0) + { + double num5 = (double) animationTimeElapsed / 10.0; + Color color1 = Lighting.GetColor(x, y); + float rotation = 0.0f; + Vector2 zero = Vector2.Zero; + float num6 = 0.5f; + float num7 = (float) num5 % num6 * (1f / num6); + if ((int) (num5 / (double) num6) % 2 == 1) + num7 = 1f - num7; + Tile tileSafely = Framing.GetTileSafely(x, y); + Tile tile = tileSafely; + Texture2D requestIfNotReady = Main.instance.TilePaintSystem.TryGetTileAndRequestIfNotReady((int) tileSafely.type, 0, (int) tileSafely.color()); + if (requestIfNotReady != null) + { + Vector2 origin = new Vector2(8f); + Vector2 vector2_2 = new Vector2(1f); + double num8 = (double) num7 * 0.200000002980232 + 1.0; + float num9 = 1f - num7; + float num10 = 1f; + Color color2 = color1 * (float) ((double) num10 * (double) num10 * 0.800000011920929); + Vector2 vector2_3 = vector2_2; + Vector2 scale = (float) num8 * vector2_3; + Vector2 position = (new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + vector2_1 + origin + zero).Floor(); + spriteBatch.Draw(requestIfNotReady, position, new Rectangle?(new Rectangle((int) tile.frameX, (int) tile.frameY, 16, 16)), color2, rotation, origin, scale, SpriteEffects.None, 0.0f); + color2.A = (byte) 180; + spriteBatch.Draw(TextureAssets.TileCrack.Value, position, new Rectangle?(rectangle), color2, rotation, origin, scale, SpriteEffects.None, 0.0f); + } + } + } + } + } + } + } + } + } + + public class HitTileObject + { + public int X; + public int Y; + public int damage; + public int type; + public int timeToLive; + public int crackStyle; + public int animationTimeElapsed; + public Vector2 animationDirection; + + public HitTileObject() => this.Clear(); + + public void Clear() + { + this.X = 0; + this.Y = 0; + this.damage = 0; + this.type = 0; + this.timeToLive = 0; + if (HitTile.rand == null) + HitTile.rand = new UnifiedRandom((int) DateTime.Now.Ticks); + this.crackStyle = HitTile.rand.Next(4); + while (this.crackStyle == HitTile.lastCrack) + this.crackStyle = HitTile.rand.Next(4); + HitTile.lastCrack = this.crackStyle; + } + } + } +} diff --git a/ID/AchievementHelperID.cs b/ID/AchievementHelperID.cs new file mode 100644 index 0000000..76d2b82 --- /dev/null +++ b/ID/AchievementHelperID.cs @@ -0,0 +1,59 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.AchievementHelperID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public class AchievementHelperID + { + public class Events + { + public const int NightStart = 0; + public const int DayStart = 1; + public const int EclipseStart = 2; + public const int EclipseEnd = 3; + public const int BloodMoonStart = 4; + public const int BloodMoonEnd = 5; + public const int SmashDemonAltar = 6; + public const int SmashShadowOrb = 7; + public const int NPCMovedIn = 8; + public const int StartHardmode = 9; + public const int InvasionDefeatedGoblins = 10; + public const int InvasionDefeatedPirates = 11; + public const int InvasionDefeatedSnowman = 12; + public const int InvasionDefeatedMartians = 13; + public const int FrostMoonWave15 = 14; + public const int PumpkinMoonWave15 = 15; + public const int SurvivedSlimeRain = 16; + public const int HousedAllNPCs = 17; + public const int TruffleMovedIn = 18; + public const int UnlockedGoldenChest = 19; + public const int UnlockedBiomeChest = 20; + public const int DefeatedMechaMayhem = 21; + public const int TempleRaider = 22; + } + + public class Special + { + public const int ConsumeHeart = 0; + public const int ConsumeStar = 1; + public const int ConsumeFruit = 2; + public const int NotTheBees = 3; + public const int HitByTrap = 4; + public const int RainbowShoot = 5; + public const int MinionArmy = 6; + public const int SwingYoyo = 7; + public const int SurviveHugeFall = 8; + public const int Roadkill = 9; + public const int ReachWorldBottom = 10; + public const int ReachWorldTop = 11; + public const int FoundBeeHive = 12; + public const int FoundSpiderCave = 13; + public const int FoundHell = 14; + public const int FoundGlowshroomOverworld = 15; + public const int PeekInGoldenChest = 16; + } + } +} diff --git a/ID/AmmoID.cs b/ID/AmmoID.cs new file mode 100644 index 0000000..b8815f2 --- /dev/null +++ b/ID/AmmoID.cs @@ -0,0 +1,308 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.AmmoID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; + +namespace Terraria.ID +{ + public static class AmmoID + { + public static int None = 0; + public static int Gel = 23; + public static int Arrow = 40; + public static int Coin = 71; + public static int FallenStar = 75; + public static int Bullet = 97; + public static int Sand = 169; + public static int Dart = 283; + public static int Rocket = 771; + public static int Solution = 780; + public static int Flare = 931; + public static int Snowball = 949; + public static int StyngerBolt = 1261; + public static int CandyCorn = 1783; + public static int JackOLantern = 1785; + public static int Stake = 1836; + public static int NailFriendly = 3108; + + public class Sets + { + public static Dictionary> SpecificLauncherAmmoProjectileMatches = new Dictionary>() + { + { + 759, + new Dictionary() + { + { + 771, + 134 + }, + { + 772, + 137 + }, + { + 773, + 140 + }, + { + 774, + 143 + }, + { + 4445, + 776 + }, + { + 4446, + 780 + }, + { + 4457, + 793 + }, + { + 4458, + 796 + }, + { + 4459, + 799 + }, + { + 4447, + 784 + }, + { + 4448, + 787 + }, + { + 4449, + 790 + } + } + }, + { + 758, + new Dictionary() + { + { + 771, + 133 + }, + { + 772, + 136 + }, + { + 773, + 139 + }, + { + 774, + 142 + }, + { + 4445, + 777 + }, + { + 4446, + 781 + }, + { + 4457, + 794 + }, + { + 4458, + 797 + }, + { + 4459, + 800 + }, + { + 4447, + 785 + }, + { + 4448, + 788 + }, + { + 4449, + 791 + } + } + }, + { + 760, + new Dictionary() + { + { + 771, + 135 + }, + { + 772, + 138 + }, + { + 773, + 141 + }, + { + 774, + 144 + }, + { + 4445, + 778 + }, + { + 4446, + 782 + }, + { + 4457, + 795 + }, + { + 4458, + 798 + }, + { + 4459, + 801 + }, + { + 4447, + 786 + }, + { + 4448, + 789 + }, + { + 4449, + 792 + } + } + }, + { + 1946, + new Dictionary() + { + { + 771, + 338 + }, + { + 772, + 339 + }, + { + 773, + 340 + }, + { + 774, + 341 + }, + { + 4445, + 803 + }, + { + 4446, + 804 + }, + { + 4457, + 808 + }, + { + 4458, + 809 + }, + { + 4459, + 810 + }, + { + 4447, + 805 + }, + { + 4448, + 806 + }, + { + 4449, + 807 + } + } + }, + { + 3930, + new Dictionary() + { + { + 771, + 715 + }, + { + 772, + 716 + }, + { + 773, + 717 + }, + { + 774, + 718 + }, + { + 4445, + 717 + }, + { + 4446, + 718 + }, + { + 4457, + 717 + }, + { + 4458, + 718 + }, + { + 4459, + 717 + }, + { + 4447, + 717 + }, + { + 4448, + 717 + }, + { + 4449, + 717 + } + } + } + }; + } + } +} diff --git a/ID/AnimationID.cs b/ID/AnimationID.cs new file mode 100644 index 0000000..9f53f94 --- /dev/null +++ b/ID/AnimationID.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.AnimationID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public class AnimationID + { + public const short MushroomStatueTurningOn = 0; + public const short MushroomStatueTurningOff = 1; + public const short FakeChestOpening = 2; + public const short VolcanosTurningOn = 3; + public const short VolcanosTurningOff = 4; + } +} diff --git a/ID/ArmorIDs.cs b/ID/ArmorIDs.cs new file mode 100644 index 0000000..99cd9fe --- /dev/null +++ b/ID/ArmorIDs.cs @@ -0,0 +1,1019 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.ArmorIDs +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using Terraria.DataStructures; + +namespace Terraria.ID +{ + public class ArmorIDs + { + public class Head + { + public const int FamiliarWig = 0; + public const int CopperHelmet = 1; + public const int IronHelmet = 2; + public const int SilverHelmet = 3; + public const int GoldHelmet = 4; + public const int ShadowHelmet = 5; + public const int MeteorHelmet = 6; + public const int NecroHelmet = 7; + public const int JungleHat = 8; + public const int MoltenHelmet = 9; + public const int Goggles = 10; + public const int MiningHelmet = 11; + public const int Sunglasses = 12; + public const int EmptyBucket = 13; + public const int WizardHat = 14; + public const int TopHat = 15; + public const int SummerHat = 16; + public const int BunnyHood = 17; + public const int PlumbersHat = 18; + public const int HerosHat = 19; + public const int FishBowl = 20; + public const int ArchaeologistsHat = 21; + public const int NinjaHood = 22; + public const int JungleRose = 23; + public const int RedHat = 24; + public const int RobotHat = 25; + public const int GoldCrown = 26; + public const int DivingHelmet = 27; + public const int MimeMask = 28; + public const int CobaltHat = 29; + public const int CobaltHelmet = 30; + public const int CobaltMask = 31; + public const int MythrilHood = 32; + public const int MythrilHelmet = 33; + public const int MythrilHat = 34; + public const int AdamantiteHeadgear = 35; + public const int AdamantiteHelmet = 36; + public const int AdamantiteMask = 37; + public const int Werewolf = 38; + public const int Merman = 39; + public const int ClownHat = 40; + public const int HallowedHelmet = 41; + public const int HallowedHeadgear = 42; + public const int HallowedMask = 43; + public const int SantaHat = 44; + public const int RedsHelmet = 45; + public const int FrostHelmet = 46; + public const int TinHelmet = 47; + public const int LeadHelmet = 48; + public const int TungstenHelmet = 49; + public const int PlatinumHelmet = 50; + public const int PlatinumCrown = 51; + public const int WoodHelmet = 52; + public const int EbonwoodHelmet = 53; + public const int RichMahoganyHelmet = 54; + public const int PearlwoodHelmet = 55; + public const int RuneHat = 56; + public const int CrimsonHelmet = 57; + public const int EskimoHood = 58; + public const int SteampunkHat = 59; + public const int BeeHat = 60; + public const int PharaohsMask = 61; + public const int Tiara = 62; + public const int GreenCap = 63; + public const int MushroomCap = 64; + public const int TamOShanter = 65; + public const int MummyMask = 66; + public const int CowboyHat = 67; + public const int PirateHat = 68; + public const int VikingHelmet = 69; + public const int CactusHelmet = 70; + public const int ShadewoodHelmet = 71; + public const int AncientIronHelmet = 72; + public const int AncientGoldHelmet = 73; + public const int AncientShadowHelmet = 74; + public const int AncientNecroHelmet = 75; + public const int AncientCobaltHelmet = 76; + public const int PinkEskimoHood = 77; + public const int ChlorophyteMask = 78; + public const int ChlorophyteHelmet = 79; + public const int ChlorophyteHeadgear = 80; + public const int RainHat = 81; + public const int TikiMask = 82; + public const int PalladiumMask = 83; + public const int PalladiumHelmet = 84; + public const int PalladiumHeadgear = 85; + public const int OrichalcumMask = 86; + public const int OrichalcumHelmet = 87; + public const int OrichalcumHeadgear = 88; + public const int TitaniumMask = 89; + public const int TitaniumHelmet = 90; + public const int TitaniumHeadgear = 91; + public const int UmbrellaHat = 92; + public const int Skull = 93; + public const int BallaHat = 94; + public const int GangstaHat = 95; + public const int SailorHat = 96; + public const int EyePatch = 97; + public const int SkeletronMask = 98; + public const int TurtleHelmet = 99; + public const int Beanie = 100; + public const int SpectreHood = 101; + public const int SWATHelmet = 102; + public const int ShroomiteHeadgear = 103; + public const int ShroomiteMask = 104; + public const int ShroomiteHelmet = 105; + public const int CenxsTiara = 106; + public const int CrownosMask = 107; + public const int WillsHelmet = 108; + public const int JimsHelmet = 109; + public const int AaronsHelmet = 110; + public const int DTownsHelmet = 111; + public const int PumpkinHelmet = 112; + public const int NurseHat = 113; + public const int WizardsHat = 114; + public const int GuyFawkesMask = 115; + public const int SteampunkGoggles = 116; + public const int CyborgHelmet = 117; + public const int CreeperMask = 118; + public const int CatMask = 119; + public const int GhostMask = 120; + public const int PumpkinMask = 121; + public const int RobotMask = 122; + public const int UnicornMask = 123; + public const int VampireMask = 124; + public const int WitchHat = 125; + public const int LeprechaunHat = 126; + public const int PrincessHat = 127; + public const int BrideofFrankensteinMask = 128; + public const int KarateTortoiseMask = 129; + public const int ScarecrowHat = 130; + public const int ReaperHood = 131; + public const int FoxMask = 132; + public const int CatEars = 133; + public const int SpookyHelmet = 134; + public const int SpaceCreatureMask = 135; + public const int WolfMask = 136; + public const int JackOLanternMask = 137; + public const int GiantBow = 138; + public const int ReindeerAntlers = 139; + public const int MrsClausHat = 140; + public const int TreeMask = 141; + public const int ParkaHood = 142; + public const int SnowHat = 143; + public const int ElfHat = 144; + public const int Fez = 145; + public const int BrainofCthulhuMask = 146; + public const int WallofFleshMask = 147; + public const int TwinMask = 148; + public const int SkeletronPrimeMask = 149; + public const int QueenBeeMask = 150; + public const int PlanteraMask = 151; + public const int GolemMask = 152; + public const int EaterofWorldsMask = 153; + public const int EyeofCthulhuMask = 154; + public const int DestroyerMask = 155; + public const int SpectreMask = 156; + public const int BeetleHelmet = 157; + public const int PeddlersHat = 158; + public const int MagicHat = 159; + public const int BeeHeadgear = 160; + public const int AnglerHat = 161; + public const int SpiderMask = 162; + public const int SeashellHairpin = 163; + public const int KingSlimeMask = 164; + public const int FishCostumeMask = 165; + public const int BorealWoodHelmet = 166; + public const int PalmWoodHelmet = 167; + public const int DukeFishronMask = 168; + public const int VortexHelmet = 169; + public const int NebulaHelmet = 170; + public const int SolarFlareHelmet = 171; + public const int MoonMask = 172; + public const int SunMask = 173; + public const int MartianCostumeMask = 174; + public const int MartianUniformHelmet = 175; + public const int SolarCultistHood = 176; + public const int LunarCultistHood = 177; + public const int HiTekSunglasses = 178; + public const int NightVisionHelmet = 179; + public const int GladiatorHelmet = 180; + public const int LazuresValkyrieCirclet = 181; + public const int TaxCollectorsHat = 182; + public const int DyeTradersTurban = 183; + public const int BuccaneerBandana = 184; + public const int ObsidianOutlawHat = 185; + public const int AncientCultistMask = 186; + public const int MoonLordMask = 187; + public const int FossilHelmet = 188; + public const int StardustHelmet = 189; + public const int WeddingVeil = 190; + public const int Yoraiz0rsRecoloredGoggles = 191; + public const int SkiphssMask = 192; + public const int LokisHelmet = 193; + public const int EngineeringHelmet = 194; + public const int PartyHat = 195; + public const int SillySunflowerPetals = 196; + public const int PedguinsHood = 197; + public const int _0x33sAviators = 198; + public const int AncientArmor = 199; + public const int AncientBattleArmor = 200; + public const int LamiaMale = 201; + public const int LamiaFemale = 202; + public const int ApprenticeHat = 203; + public const int SquireGreatHelm = 204; + public const int HuntressWig = 205; + public const int MonkBrows = 206; + public const int MaskBetsy = 207; + public const int MaskDarkMage = 208; + public const int MaskOgre = 209; + public const int ValhallaKnight = 210; + public const int ApprenticeDark = 211; + public const int RedRidingHuntress = 212; + public const int ShinobiInfiltrator = 213; + public const int ArkhalisHat = 214; + public const int LeinforsHat = 215; + public const int UltraBrightHelmet = 216; + public const int Maid = 217; + public const int MaidAlt = 218; + public const int GolfHat = 219; + public const int GolfVisor = 220; + public const int GoldGoldfishBowl = 221; + public const int StarPrincessCrown = 222; + public const int DemonHorns = 223; + public const int BunnyEars = 224; + public const int DevilHorns = 225; + public const int Fedora = 226; + public const int ChefHat = 227; + public const int StarHairpin = 228; + public const int HeartHairpin = 229; + public const int SuperHeroMask = 230; + public const int UndertakerHat = 231; + public const int PrettyPinkRibbon = 232; + public const int FuneralHat = 233; + public const int VictorianGothHat = 234; + public const int GhostarSkullPin = 235; + public const int DrManFlyMask = 236; + public const int ButcherMask = 237; + public const int SafemanSunHair = 238; + public const int FoodBarbarianHelm = 239; + public const int GroxTheGreatHelm = 240; + public const int RockGolemHead = 241; + public const int DogEars = 242; + public const int FoxEars = 243; + public const int LizardEars = 244; + public const int PandaEars = 245; + public const int DogEarsBack = 246; + public const int FoxEarsBack = 247; + public const int LizardEarsBack = 248; + public const int PandaEarsBack = 249; + public const int MushroomHat = 250; + public const int FairyQueenMask = 251; + public const int CatEarsBack = 252; + public const int BunnyEarsBack = 253; + public const int HallowedHood = 254; + public const int AncientHallowedMask = 255; + public const int AncientHallowedHelmet = 256; + public const int AncientHallowedHeadgear = 257; + public const int AncientHallowedHood = 258; + public const int RabbitOrder = 259; + public const int QueenSlimeMask = 260; + public const int CrystalNinjaHelmet = 261; + public const int GraduationCapBlue = 262; + public const int GraduationCapMaroon = 263; + public const int GraduationCapBlack = 264; + public const int BadgersHat = 265; + public const int Count = 266; + + public class Sets + { + public static SetFactory Factory = new SetFactory(266); + public static int[] FrontToBackID = ArmorIDs.Head.Sets.Factory.CreateIntSet(-1, 242, 246, 243, 247, 244, 248, 245, 249, 133, 252, 224, 253); + } + } + + public class Body + { + public const int FamiliarShirt = 0; + public const int CopperChainmail = 1; + public const int IronChainmail = 2; + public const int SilverChainmail = 3; + public const int GoldChainmail = 4; + public const int ShadowScalemail = 5; + public const int MeteorSuit = 6; + public const int NecroBreastplate = 7; + public const int JungleShirt = 8; + public const int MoltenBreastplate = 9; + public const int TuxedoShirt = 10; + public const int PlumbersShirt = 11; + public const int HerosShirt = 12; + public const int ArchaeologistsJacket = 13; + public const int NinjaShirt = 14; + public const int Robe = 15; + public const int TheDoctorsShirt = 16; + public const int CobaltBreastplate = 17; + public const int MythrilChainmail = 18; + public const int AdamantiteBreastplate = 19; + public const int MiningShirt = 20; + public const int Werewolf = 21; + public const int Merfolk = 22; + public const int ClownShirt = 23; + public const int HallowedPlateMail = 24; + public const int SantaShirt = 25; + public const int RedsBreastplate = 26; + public const int FrostBreastplate = 27; + public const int TinChainmail = 28; + public const int LeadChainmail = 29; + public const int TungstenChainmail = 30; + public const int PlatinumChainmail = 31; + public const int WoodBreastplate = 32; + public const int EbonwoodBreastplate = 33; + public const int RichMahoganyBreastplate = 34; + public const int PearlwoodBreastplate = 35; + public const int RuneRobe = 36; + public const int CrimsonScalemail = 37; + public const int EskimoCoat = 38; + public const int SteampunkShirt = 39; + public const int BeeShirt = 40; + public const int PrincessCostume = 41; + public const int PharaohsRobe = 42; + public const int MummyShirt = 43; + public const int CowboyJacket = 44; + public const int PirateShirt = 45; + public const int CactusBreastplate = 46; + public const int ShadewoodBreastplate = 47; + public const int AncientShadowScalemail = 48; + public const int AncientCobaltBreastplate = 49; + public const int PinkEskimoCoat = 50; + public const int ChlorophytePlateMail = 51; + public const int RainCoat = 52; + public const int TikiShirt = 53; + public const int PalladiumBreastplate = 54; + public const int OrichalcumBreastplate = 55; + public const int TitaniumBreastplate = 56; + public const int SailorShirt = 57; + public const int AmethystRobe = 58; + public const int TopazRobe = 59; + public const int SapphireRobe = 60; + public const int EmeraldRobe = 61; + public const int RubyRobe = 62; + public const int DiamondRobe = 63; + public const int WhiteTuxedoShirt = 64; + public const int TurtleScaleMail = 65; + public const int SpectreRobe = 66; + public const int ShroomiteBreastplate = 67; + public const int CenxsBreastplate = 68; + public const int CrownosBreastplate = 69; + public const int WillsBreastplate = 70; + public const int JimsBreastplate = 71; + public const int AaronsBreastplate = 72; + public const int DTownsBreastplate = 73; + public const int CenxsDress = 74; + public const int PumpkinBreastplate = 75; + public const int NurseShirt = 76; + public const int DyeTraderRobe = 77; + public const int CyborgShirt = 78; + public const int CreeperShirt = 79; + public const int CatShirt = 80; + public const int GhostShirt = 81; + public const int PumpkinShirt = 82; + public const int RobotShirt = 83; + public const int UnicornShirt = 84; + public const int VampireShirt = 85; + public const int LeprechaunShirt = 86; + public const int PixieShirt = 87; + public const int PrincessDress = 88; + public const int WitchDress = 89; + public const int BrideofFrankensteinDress = 90; + public const int KarateTortoiseShirt = 91; + public const int ScarecrowShirt = 92; + public const int ReaperRobe = 93; + public const int FoxShirt = 94; + public const int SpookyBreastplate = 95; + public const int SpaceCreatureShirt = 96; + public const int WolfShirt = 97; + public const int TreasureHunterShirt = 98; + public const int DryadCoverings = 99; + public const int MrsClausShirt = 100; + public const int TreeShirt = 101; + public const int ParkaCoat = 102; + public const int UglySweater = 103; + public const int ElfShirt = 104; + public const int BeetleScaleMail = 105; + public const int BeetleShell = 106; + public const int Gi = 165; + public const int Kimono = 166; + public const int GypsyRobe = 167; + public const int BeeBreastplate = 168; + public const int AnglerVest = 169; + public const int SpiderBreastplate = 170; + public const int MermaidAdornment = 171; + public const int FishCostumeShirt = 172; + public const int BorealWoodBreastplate = 173; + public const int PalmWoodBreastplate = 174; + public const int VortexBreastplate = 175; + public const int NebulaBreastplate = 176; + public const int SolarFlareBreastplate = 177; + public const int MartianCostumeShirt = 178; + public const int MartianUniformTorso = 179; + public const int SolarCultistRobe = 180; + public const int LunarCultistRobe = 181; + public const int GladiatorBreastplate = 182; + public const int LazuresValkyrieCloak = 183; + public const int TaxCollectorsSuit = 184; + public const int ClothiersJacket = 185; + public const int BuccaneerTunic = 186; + public const int ObsidianLongcoat = 187; + public const int FallenTuxedoShirt = 188; + public const int FossilPlate = 189; + public const int StardustPlate = 190; + public const int WeddingDress = 191; + public const int Yoraiz0rsUniform = 192; + public const int SkiphssSkin = 193; + public const int LokisBreastplate = 194; + public const int SillySunflowerTops = 195; + public const int PedguinsJacket = 196; + public const int AncientArmor = 197; + public const int AncientBattleArmor = 198; + public const int Lamia = 199; + public const int ApprenticeRobe = 200; + public const int SquirePlating = 201; + public const int HuntressJerkin = 202; + public const int MonkShirt = 203; + public const int ValhallaKnight = 204; + public const int ApprenticeDark = 205; + public const int RedRidingHuntress = 206; + public const int ShinobiInfiltrator = 207; + public const int ArkhalisShirt = 208; + public const int LeinforsShirt = 209; + public const int Maid = 210; + public const int MaidAlt = 211; + public const int Golf = 212; + public const int AmberRobe = 213; + public const int GameMasterShirt = 214; + public const int StarPrincessDress = 215; + public const int ChefOutfit = 216; + public const int SuperHeroCostume = 217; + public const int PrettyPinkDress = 218; + public const int UndertakerCoat = 219; + public const int FuneralCoat = 220; + public const int VictorianGothDress = 221; + public const int GhostarShirt = 222; + public const int DrManFlyLabCoat = 223; + public const int ButcherApron = 224; + public const int SafemanSunDress = 225; + public const int FoodBarbarianArmor = 226; + public const int GroxTheGreatArmor = 227; + public const int MushroomVest = 228; + public const int AncientHallowedPlateMail = 229; + public const int CrystalNinjaChestplate = 230; + public const int GraduationGownBlue = 231; + public const int GraduationGownMaroon = 232; + public const int GraduationGownBlack = 233; + public const int DeadMansSweater = 234; + public const int Count = 235; + + public class Sets + { + public static SetFactory Factory = new SetFactory(235); + public static bool[] NeedsToDrawArm = ArmorIDs.Body.Sets.Factory.CreateBoolSet(false, 200, 202, 201, 203, 195, 205, 207, 206, 228); + public static int[] IncludedCapeBack = ArmorIDs.Body.Sets.Factory.CreateIntSet(-1, 207, 13, 206, 12, 205, 11, 185, 17, 96, 18, 94, 19, 80, 21, 217, 22, 24, 29); + public static int[] IncludedCapeBackFemale = ArmorIDs.Body.Sets.Factory.CreateIntSet(-1, 207, 13, 206, 12, 205, 11, 185, 17, 96, 18, 94, 19, 80, 21, 217, 23, 24, 29); + public static int[] IncludedCapeFront = ArmorIDs.Body.Sets.Factory.CreateIntSet(-1, 184, 6); + public static ArmorIDs.Body.Sets.IncludeCapeFrontAndBackInfo[] IncludeCapeFrontAndBack = ArmorIDs.Body.Sets.Factory.CreateCustomSet(new ArmorIDs.Body.Sets.IncludeCapeFrontAndBackInfo() + { + backCape = (sbyte) -1, + frontCape = (sbyte) -1 + }, (object) 85, (object) new ArmorIDs.Body.Sets.IncludeCapeFrontAndBackInfo() + { + backCape = (sbyte) 20, + frontCape = (sbyte) 7 + }); + public static bool[] UsesNewFramingCode = ArmorIDs.Body.Sets.Factory.CreateBoolSet(false, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234); + public static bool[] showsShouldersWhileJumping = ArmorIDs.Body.Sets.Factory.CreateBoolSet(177, 190, 95, 46, 73, 92, 24, 54, 55, 56, 65, 66, 67, 69, 70, 71, 75, 105, 106, 175, 176, 182, 183, 187, 194, 197, 198, 201, 204, 226, 227, 229); + public static bool[] shouldersAreAlwaysInTheBack = ArmorIDs.Body.Sets.Factory.CreateBoolSet(190); + + public struct IncludeCapeFrontAndBackInfo + { + public sbyte frontCape; + public sbyte backCape; + + public bool Invalid => this.frontCape == (sbyte) -1 && this.backCape == (sbyte) -1; + } + } + } + + public class Legs + { + public const int FamiliarPants = 0; + public const int CopperGreaves = 1; + public const int IronGreaves = 2; + public const int SilverGreaves = 3; + public const int GoldGreaves = 4; + public const int ShadowGreaves = 5; + public const int MeteorLeggings = 6; + public const int NecroGreaves = 7; + public const int JunglePants = 8; + public const int MoltenGreaves = 9; + public const int TuxedoPants = 10; + public const int PlumbersPants = 11; + public const int HerosPants = 12; + public const int ArchaeologistsPants = 13; + public const int NinjaPants = 14; + public const int TheDoctorsPants = 15; + public const int CobaltLeggings = 16; + public const int MythrilGreaves = 17; + public const int AdamantiteLeggings = 18; + public const int MiningPants = 19; + public const int ClownPants = 22; + public const int HallowedGreaves = 23; + public const int SantaPants = 24; + public const int RedsLeggings = 25; + public const int FrostLeggings = 26; + public const int TinGreaves = 27; + public const int LeadGreaves = 28; + public const int TungstenGreaves = 29; + public const int PlatinumGreaves = 30; + public const int WoodGreaves = 31; + public const int EbonwoodGreaves = 32; + public const int RichMahoganyGreaves = 33; + public const int PearlwoodGreaves = 34; + public const int CrimsonGreaves = 35; + public const int EskimoPants = 36; + public const int SteampunkPants = 37; + public const int BeePants = 38; + public const int MummyPants = 39; + public const int CowboyPants = 40; + public const int PiratePants = 41; + public const int CactusLeggings = 42; + public const int ShadewoodGreaves = 43; + public const int AncientShadowGreaves = 44; + public const int AncientCobaltLeggings = 45; + public const int PinkEskimoPants = 46; + public const int ChlorophyteGreaves = 47; + public const int TikiPants = 48; + public const int PalladiumLeggings = 49; + public const int OrichalcumLeggings = 50; + public const int TitaniumLeggings = 51; + public const int SailorPants = 52; + public const int WhiteTuxedoPants = 53; + public const int TurtleLeggings = 54; + public const int SpectrePants = 55; + public const int ShroomiteLeggings = 56; + public const int CenxsLeggings = 57; + public const int CrownosLeggings = 58; + public const int WillsLeggings = 59; + public const int JimsLeggings = 60; + public const int AaronsLeggings = 61; + public const int DTownsLeggings = 62; + public const int CenxsDressPants = 63; + public const int PumpkinLeggings = 64; + public const int NursePants = 65; + public const int CyborgPants = 66; + public const int CreeperPants = 67; + public const int CatPants = 68; + public const int PumpkinPants = 69; + public const int RobotPants = 70; + public const int UnicornPants = 71; + public const int VampirePants = 72; + public const int LeprechaunPants = 73; + public const int PixiePants = 74; + public const int WitchBoots = 75; + public const int KarateTortoisePants = 76; + public const int ScarecrowPants = 77; + public const int FoxPants = 78; + public const int SpookyLeggings = 79; + public const int SpaceCreaturePants = 80; + public const int WolfPants = 81; + public const int TreasureHunterPants = 82; + public const int DryadLoincloth = 83; + public const int MrsClausHeels = 84; + public const int TreeTrunks = 85; + public const int ParkaPants = 86; + public const int ElfPants = 87; + public const int BeetleLeggings = 98; + public const int BeeGreaves = 103; + public const int AnglerPants = 104; + public const int SpiderGreaves = 105; + public const int MermaidTail = 106; + public const int FishCostumeFinskirt = 107; + public const int BorealWoodGreaves = 108; + public const int PalmWoodGreaves = 109; + public const int VortexLeggings = 110; + public const int NebulaLeggings = 111; + public const int SolarFlareLeggings = 112; + public const int MartianCostumePants = 113; + public const int MartianUniformPants = 114; + public const int GladiatorLeggings = 122; + public const int TaxCollectorsPants = 124; + public const int ClothiersPants = 125; + public const int BuccaneerPantaloons = 126; + public const int ObsidianPants = 127; + public const int FallenTuxedoPants = 128; + public const int FossilGreaves = 129; + public const int StardustLeggings = 130; + public const int Yoraiz0rsSkirt = 132; + public const int SkiphssBearButt = 133; + public const int LokisGreaves = 134; + public const int SillySunflowerBottoms = 138; + public const int PedguinsTrousers = 139; + public const int DjinnsCurse = 140; + public const int AncientArmor = 141; + public const int AncientBattleArmor = 142; + public const int Lamia = 143; + public const int ApprenticeTrousers = 144; + public const int SquireGreaves = 145; + public const int HuntressPantsMale = 146; + public const int HuntressPantsFemale = 147; + public const int MonkPants = 148; + public const int ApprenticeRobeExtension = 149; + public const int SquirePlatingExtension = 150; + public const int HuntressJerkinExtension = 151; + public const int ValhallaKnight = 152; + public const int ApprenticeDark = 153; + public const int RedRidingHuntress = 154; + public const int RedRidingHuntress_Male = 155; + public const int ShinobiInfiltrator = 156; + public const int ArkhalisPants_Male = 157; + public const int ArkhalisPants_Female = 158; + public const int LeinforsPants = 159; + public const int LeinforsPantsCoat = 160; + public const int ShinobiInfiltratorBodyExtension = 161; + public const int ForbiddenArmorBodyExtension = 162; + public const int GladiatorBreastplateBodyExtension = 163; + public const int BeeBreastplateBodyExtension = 164; + public const int ReaperRobe = 165; + public const int BrideOfFrankensteinDress = 166; + public const int WitchDress = 167; + public const int PrincessDress = 168; + public const int GhostShirt = 169; + public const int DTownBreastplateBodyExtension = 170; + public const int RaincoatMaleBodyExtension = 171; + public const int RaincoatFemaleBodyExtension = 172; + public const int ObsidianLongcoatBodyExtension = 173; + public const int ApprenticeDarkBodyExtension = 174; + public const int TikiShirtBodyExtensionMale = 175; + public const int TikiShirtBodyExtensionFemale = 176; + public const int MaidBodyExtensionFemale = 177; + public const int MaidBodyExtensionMale = 178; + public const int MaidFemale = 179; + public const int MaidMale = 180; + public const int MaidAltBodyExtensionFemale = 181; + public const int MaidAltBodyExtensionMale = 182; + public const int MaidAltFemale = 183; + public const int MaidAltMale = 184; + public const int Golf = 185; + public const int WitchDressBodyExtension = 186; + public const int AmberRobe = 187; + public const int GameMasterPants = 188; + public const int StarPrincessDress = 189; + public const int ChefPants = 190; + public const int SuperHeroTightsMale = 191; + public const int SuperHeroTightsFemale = 192; + public const int PrettyPinkDressPantsMale = 193; + public const int PrettyPinkDressPantsFemale = 194; + public const int PrettyPinkDressSkirt = 195; + public const int UndertakerCoat = 196; + public const int FuneralPantsMale = 197; + public const int FuneralPantsFemale = 198; + public const int VictorianGothDressExtension = 199; + public const int GhostarShirtExtensionFemale = 200; + public const int GhostarShirtExtensionMale = 201; + public const int GhostarLegsFemale = 202; + public const int GhostarLegsMale = 203; + public const int DrManFlyLabCoatLegs = 204; + public const int ButcherPants = 205; + public const int SafemanSunDressExtension = 206; + public const int SafemanDressLeggingsFemale = 207; + public const int SafemanDressLeggingsMale = 208; + public const int FoodBarbarianGreaves = 209; + public const int GroxTheGreatGreaves = 210; + public const int MushroomPants = 211; + public const int AncientHallowedGreaves = 212; + public const int CrystalNinjaLeggings = 213; + public const int GraduationGownBlueExtension = 214; + public const int GraduationGownMaroonExtension = 215; + public const int GraduationGownBlackExtension = 216; + public const int MoonLordLegs = 217; + public const int Count = 218; + + public class Sets + { + public static SetFactory Factory = new SetFactory(218); + public static List MannequinIncompatible = new List(); + } + } + + public class HandOn + { + public const sbyte ManaRegenerationBand = 1; + public const sbyte BandofRegeneration = 2; + public const sbyte BandofStarpower = 3; + public const sbyte CharmofMyths = 4; + public const sbyte FeralClaws = 5; + public const sbyte FireGauntlet = 6; + public const sbyte HandWarmer = 7; + public const sbyte MagicCuffs = 8; + public const sbyte MechanicalGlove = 9; + public const sbyte PowerGlove = 10; + public const sbyte MasterNinjaGear = 11; + public const sbyte TigerClimbingGear = 11; + public const sbyte ClimbingClaws = 11; + public const sbyte Shackle = 12; + public const sbyte SunStone = 13; + public const sbyte MoonStone = 14; + public const sbyte TitanGlove = 15; + public const sbyte DiamondRing = 16; + public const sbyte CelestialCuffs = 17; + public const sbyte YoyoGlove = 18; + public const sbyte HuntressBuckler = 19; + public const sbyte BersekerGlove = 20; + public const sbyte FrogWebbing = 21; + public const int Count = 22; + + public class Sets + { + public static SetFactory Factory = new SetFactory(22); + public static bool[] UsesNewFramingCode = ArmorIDs.HandOn.Sets.Factory.CreateBoolSet(false, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 17, 18, 19, 20, 21); + public static bool[] UsesOldFramingTexturesForWalking = ArmorIDs.HandOn.Sets.Factory.CreateBoolSet(false, 12, 8, 17); + } + } + + public class HandOff + { + public const sbyte FireGauntlet = 1; + public const sbyte HandWarmer = 2; + public const sbyte MagicCuffs = 3; + public const sbyte MechanicalGlove = 4; + public const sbyte PowerGlove = 5; + public const sbyte MasterNinjaGear = 6; + public const sbyte TigerClimbingGear = 6; + public const sbyte ClimbingClaws = 6; + public const sbyte Shackle = 7; + public const sbyte TitanGlove = 8; + public const sbyte FeralClaws = 9; + public const sbyte CelestialCuffs = 10; + public const sbyte YoyoGlove = 11; + public const sbyte BersekerGlove = 12; + public const sbyte FrogWebbing = 13; + public const int Count = 14; + + public class Sets + { + public static SetFactory Factory = new SetFactory(14); + public static bool[] UsesNewFramingCode = ArmorIDs.HandOff.Sets.Factory.CreateBoolSet(false, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13); + } + } + + public class Back + { + public const sbyte BeeCloak = 1; + public const sbyte StarCloak = 2; + public const sbyte CrimsonCloak = 3; + public const sbyte MysteriousCape = 4; + public const sbyte RedCape = 5; + public const sbyte WinterCape = 6; + public const sbyte MagicQuiver = 7; + public const sbyte ArchitectGizmoPack = 8; + public const sbyte HivePack = 9; + public const sbyte AnglerTackleBag = 10; + public const sbyte ApprenticeDark = 11; + public const sbyte RedRidingHuntress = 12; + public const sbyte ShinobiInfiltrator = 13; + public const sbyte ManaCloak = 14; + public const sbyte MoltenQuiver = 15; + public const sbyte StalkersQuiver = 16; + public const sbyte ClothiersJacket = 17; + public const sbyte SpaceCreatureShirt = 18; + public const sbyte FoxShirt = 19; + public const sbyte VampireShirt = 20; + public const sbyte CatShirt = 21; + public const sbyte SuperHeroCostumeMale = 22; + public const sbyte SuperHeroCostumeFemale = 23; + public const sbyte HunterCloak = 24; + public const sbyte DogTail = 25; + public const sbyte FoxTail = 26; + public const sbyte LizardTail = 27; + public const sbyte BunnyTail = 28; + public const sbyte HallowedCape = 29; + public const int Count = 30; + } + + public class Front + { + public const sbyte CrimsonCloak = 1; + public const sbyte MysteriousCape = 2; + public const sbyte RedCape = 3; + public const sbyte WinterCape = 4; + public const sbyte ManaCloak = 5; + public const sbyte TaxCollectorsSuit = 6; + public const sbyte VampireShirt = 7; + public const sbyte HunterCloak = 8; + public const int Count = 9; + + public class Sets + { + public static SetFactory Factory = new SetFactory(9); + public static bool[] DrawsInNeckLayer = ArmorIDs.Front.Sets.Factory.CreateBoolSet(false, 6); + } + } + + public class Shoe + { + public const sbyte Flipper = 1; + public const sbyte WaterWalkingBoots = 2; + public const sbyte Tabi = 3; + public const sbyte TigerClimbingGear = 4; + public const sbyte ShoeSpikes = 4; + public const sbyte FlurryBoots = 5; + public const sbyte HermesBoots = 6; + public const sbyte IceSkates = 7; + public const sbyte LavaWaders = 8; + public const sbyte FrostsparkBoots = 9; + public const sbyte LightningBoots = 10; + public const sbyte ObsidianWaterWalkingBoots = 11; + public const sbyte RocketBoots = 12; + public const sbyte SpectreBoots = 13; + public const sbyte MasterNinjaGear = 14; + public const sbyte FrogLeg = 15; + public const sbyte FlowerBoots = 16; + public const sbyte SailfishBoots = 17; + public const sbyte AmphibianBoots = 18; + public const sbyte FairyBoots = 19; + public const sbyte FrogFlipper = 20; + public const sbyte SandBoots = 21; + public const sbyte FlameWakerBoots = 22; + public const sbyte HellfireTreads = 23; + public const sbyte TerrasparkBoots = 24; + public const int Count = 25; + } + + public class Waist + { + public const sbyte CloudinaBottle = 1; + public const sbyte CopperWatch = 2; + public const sbyte GoldWatch = 3; + public const sbyte PlatinumWatch = 4; + public const sbyte Toolbelt = 5; + public const sbyte ManaFlower = 6; + public const sbyte SilverWatch = 7; + public const sbyte TinWatch = 8; + public const sbyte TungstenWatch = 9; + public const sbyte MasterNinjaGear = 10; + public const sbyte BlackBelt = 10; + public const sbyte TsunamiinaBottle = 11; + public const sbyte MonkBelt = 12; + public const sbyte BlizzardinaBottle = 13; + public const sbyte FartinaJar = 14; + public const sbyte SandstorminaBottle = 15; + public const sbyte TreasureMagnet = 16; + public const int Count = 17; + + public class Sets + { + public static SetFactory Factory = new SetFactory(17); + public static bool[] UsesTorsoFraming = ArmorIDs.Waist.Sets.Factory.CreateBoolSet(false, 5, 10, 10, 12); + } + } + + public class Wing + { + public const sbyte DemonWings = 1; + public const sbyte AngelWings = 2; + public const sbyte RedsWings = 3; + public const sbyte Jetpack = 4; + public const sbyte ButterflyWings = 5; + public const sbyte FairyWings = 6; + public const sbyte HarpyWings = 7; + public const sbyte BoneWings = 8; + public const sbyte FlameWings = 9; + public const sbyte FrozenWings = 10; + public const sbyte SpectreWings = 11; + public const sbyte SteampunkWings = 12; + public const sbyte LeafWings = 13; + public const sbyte BatWings = 14; + public const sbyte BeeWings = 15; + public const sbyte DTownsWings = 16; + public const sbyte WillsWings = 17; + public const sbyte CrownosWings = 18; + public const sbyte CenxsWings = 19; + public const sbyte TatteredFairyWings = 20; + public const sbyte SpookyWings = 21; + public const sbyte Hoverboard = 22; + public const sbyte FestiveWings = 23; + public const sbyte BeetleWings = 24; + public const sbyte FinWings = 25; + public const sbyte FishronWings = 26; + public const sbyte MothronWings = 27; + public const sbyte LazuresBarrierPlatform = 28; + public const sbyte SolarWings = 29; + public const sbyte VortexBooster = 30; + public const sbyte NebulaMantle = 31; + public const sbyte StardustWings = 32; + public const sbyte Yoraiz0rsSpell = 33; + public const sbyte JimsWings = 34; + public const sbyte SkiphssPaws = 35; + public const sbyte LokisWings = 36; + public const sbyte BetsyWings = 37; + public const sbyte ArkhalisWings = 38; + public const sbyte LeinforsWings = 39; + public const sbyte GhostarsWings = 40; + public const sbyte SafemanWings = 41; + public const sbyte FoodBarbarianWings = 42; + public const sbyte GroxTheGreatWings = 43; + public const sbyte RainbowWings = 44; + public const sbyte LongTrailRainbowWings = 45; + public const sbyte CreativeWings = 46; + public const int Count = 47; + + public class Sets + { + public static WingStats[] Stats; + } + } + + public class Shield + { + public const sbyte CobaltShield = 1; + public const sbyte PaladinsShield = 2; + public const sbyte ObsidianShield = 3; + public const sbyte AnkhShield = 4; + public const sbyte ShieldofCthulhu = 5; + public const sbyte SquireShield = 6; + public const sbyte Frozen = 7; + public const sbyte Hero = 8; + public const sbyte BouncingShield = 9; + public const int Count = 10; + } + + public class Neck + { + public const sbyte JellyfishNecklace = 1; + public const sbyte CrossNecklace = 2; + public const sbyte PanicNecklace = 3; + public const sbyte PygmyNecklace = 4; + public const sbyte StarVeil = 5; + public const sbyte SweetheartNecklace = 6; + public const sbyte SharkToothNecklace = 7; + public const sbyte WormScarf = 8; + public const sbyte ApprenticeScarf = 9; + public const sbyte Stinger = 10; + public const int Count = 11; + } + + public class Face + { + public const sbyte NaturesGift = 1; + public const sbyte ArcticDivingGear = 2; + public const sbyte JellyfishDivingGear = 3; + public const sbyte DivingGear = 4; + public const sbyte Blindfold = 5; + public const sbyte ObsidianRose = 6; + public const sbyte AngelHalo = 7; + public const sbyte GingerBeard = 8; + public const sbyte ArcaneFlower = 9; + public const sbyte LavaSkull = 10; + public const sbyte MoltenSkullRose = 11; + public const sbyte ObsidianSkull = 12; + public const sbyte ObsidianSkullRose = 13; + public const sbyte SpectreGoggles = 14; + [Obsolete("Deprecated.")] + public const sbyte UnusedID = 15; + public const sbyte Count = 16; + + public class Sets + { + public static SetFactory Factory = new SetFactory(16); + public static bool[] PreventHairDraw = ArmorIDs.Face.Sets.Factory.CreateBoolSet(false, 2, 3, 4, 10, 11, 12, 13); + } + } + + public class Balloon + { + public const sbyte BlizzardinaBalloon = 1; + public const sbyte BlueHorseshoeBalloon = 2; + public const sbyte BundleofBalloons = 3; + public const sbyte CloudinaBalloon = 4; + public const sbyte FartinaBalloon = 5; + public const sbyte SandstorminaBalloon = 6; + public const sbyte HoneyBalloon = 7; + public const sbyte ShinyRedBalloon = 8; + public const sbyte WhiteHorseshoeBalloon = 9; + public const sbyte YellowHorseshoeBalloon = 10; + public const sbyte BalloonPufferfish = 11; + public const sbyte SharkronBalloon = 12; + public const sbyte GreenHorseshoeBalloon = 13; + public const sbyte AmberHorseshoeBalloon = 14; + public const sbyte PinkHorseshoeBalloon = 15; + public const sbyte BundledPartyBalloons = 16; + public const sbyte BalloonAnimal = 17; + public const int Count = 18; + } + + public class RocketBoots + { + public const int None = 0; + public const int SimpleRocketBoots = 1; + public const int SpectreBoots = 2; + public const int FrostsparkBoots = 3; + public const int TerrasparkBoots = 4; + } + } +} diff --git a/ID/BiomeID.cs b/ID/BiomeID.cs new file mode 100644 index 0000000..44002c6 --- /dev/null +++ b/ID/BiomeID.cs @@ -0,0 +1,23 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.BiomeID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + internal class BiomeID + { + public const int Forest = 0; + public const int NormalUnderground = 1; + public const int Snow = 2; + public const int Desert = 3; + public const int Jungle = 4; + public const int Ocean = 5; + public const int Hallow = 6; + public const int Mushroom = 7; + public const int Dungeon = 8; + public const int Corruption = 9; + public const int Crimson = 10; + } +} diff --git a/ID/BuffID.cs b/ID/BuffID.cs new file mode 100644 index 0000000..f02cd93 --- /dev/null +++ b/ID/BuffID.cs @@ -0,0 +1,551 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.BuffID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public class BuffID + { + public const int ObsidianSkin = 1; + public const int Regeneration = 2; + public const int Swiftness = 3; + public const int Gills = 4; + public const int Ironskin = 5; + public const int ManaRegeneration = 6; + public const int MagicPower = 7; + public const int Featherfall = 8; + public const int Spelunker = 9; + public const int Invisibility = 10; + public const int Shine = 11; + public const int NightOwl = 12; + public const int Battle = 13; + public const int Thorns = 14; + public const int WaterWalking = 15; + public const int Archery = 16; + public const int Hunter = 17; + public const int Gravitation = 18; + public const int ShadowOrb = 19; + public const int Poisoned = 20; + public const int PotionSickness = 21; + public const int Darkness = 22; + public const int Cursed = 23; + public const int OnFire = 24; + public const int Tipsy = 25; + public const int WellFed = 26; + public const int FairyBlue = 27; + public const int Werewolf = 28; + public const int Clairvoyance = 29; + public const int Bleeding = 30; + public const int Confused = 31; + public const int Slow = 32; + public const int Weak = 33; + public const int Merfolk = 34; + public const int Silenced = 35; + public const int BrokenArmor = 36; + public const int Horrified = 37; + public const int TheTongue = 38; + public const int CursedInferno = 39; + public const int PetBunny = 40; + public const int BabyPenguin = 41; + public const int PetTurtle = 42; + public const int PaladinsShield = 43; + public const int Frostburn = 44; + public const int BabyEater = 45; + public const int Chilled = 46; + public const int Frozen = 47; + public const int Honey = 48; + public const int Pygmies = 49; + public const int BabySkeletronHead = 50; + public const int BabyHornet = 51; + public const int TikiSpirit = 52; + public const int PetLizard = 53; + public const int PetParrot = 54; + public const int BabyTruffle = 55; + public const int PetSapling = 56; + public const int Wisp = 57; + public const int RapidHealing = 58; + public const int ShadowDodge = 59; + public const int LeafCrystal = 60; + public const int BabyDinosaur = 61; + public const int IceBarrier = 62; + public const int Panic = 63; + public const int BabySlime = 64; + public const int EyeballSpring = 65; + public const int BabySnowman = 66; + public const int Burning = 67; + public const int Suffocation = 68; + public const int Ichor = 69; + public const int Venom = 70; + public const int WeaponImbueVenom = 71; + public const int Midas = 72; + public const int WeaponImbueCursedFlames = 73; + public const int WeaponImbueFire = 74; + public const int WeaponImbueGold = 75; + public const int WeaponImbueIchor = 76; + public const int WeaponImbueNanites = 77; + public const int WeaponImbueConfetti = 78; + public const int WeaponImbuePoison = 79; + public const int Blackout = 80; + public const int PetSpider = 81; + public const int Squashling = 82; + public const int Ravens = 83; + public const int BlackCat = 84; + public const int CursedSapling = 85; + public const int WaterCandle = 86; + public const int Campfire = 87; + public const int ChaosState = 88; + public const int HeartLamp = 89; + public const int Rudolph = 90; + public const int Puppy = 91; + public const int BabyGrinch = 92; + public const int AmmoBox = 93; + public const int ManaSickness = 94; + public const int BeetleEndurance1 = 95; + public const int BeetleEndurance2 = 96; + public const int BeetleEndurance3 = 97; + public const int BeetleMight1 = 98; + public const int BeetleMight2 = 99; + public const int BeetleMight3 = 100; + public const int FairyRed = 101; + public const int FairyGreen = 102; + public const int Wet = 103; + public const int Mining = 104; + public const int Heartreach = 105; + public const int Calm = 106; + public const int Builder = 107; + public const int Titan = 108; + public const int Flipper = 109; + public const int Summoning = 110; + public const int Dangersense = 111; + public const int AmmoReservation = 112; + public const int Lifeforce = 113; + public const int Endurance = 114; + public const int Rage = 115; + public const int Inferno = 116; + public const int Wrath = 117; + public const int MinecartLeft = 118; + public const int Lovestruck = 119; + public const int Stinky = 120; + public const int Fishing = 121; + public const int Sonar = 122; + public const int Crate = 123; + public const int Warmth = 124; + public const int HornetMinion = 125; + public const int ImpMinion = 126; + public const int ZephyrFish = 127; + public const int BunnyMount = 128; + public const int PigronMount = 129; + public const int SlimeMount = 130; + public const int TurtleMount = 131; + public const int BeeMount = 132; + public const int SpiderMinion = 133; + public const int TwinEyesMinion = 134; + public const int PirateMinion = 135; + public const int MiniMinotaur = 136; + public const int Slimed = 137; + public const int MinecartRight = 138; + public const int SharknadoMinion = 139; + public const int UFOMinion = 140; + public const int UFOMount = 141; + public const int DrillMount = 142; + public const int ScutlixMount = 143; + public const int Electrified = 144; + public const int MoonLeech = 145; + public const int Sunflower = 146; + public const int MonsterBanner = 147; + public const int Rabies = 148; + public const int Webbed = 149; + public const int Bewitched = 150; + public const int SoulDrain = 151; + public const int MagicLantern = 152; + public const int ShadowFlame = 153; + public const int BabyFaceMonster = 154; + public const int CrimsonHeart = 155; + public const int Stoned = 156; + public const int PeaceCandle = 157; + public const int StarInBottle = 158; + public const int Sharpened = 159; + public const int Dazed = 160; + public const int DeadlySphere = 161; + public const int UnicornMount = 162; + public const int Obstructed = 163; + public const int VortexDebuff = 164; + public const int DryadsWard = 165; + public const int MinecartRightMech = 166; + public const int MinecartLeftMech = 167; + public const int CuteFishronMount = 168; + public const int BoneJavelin = 169; + public const int SolarShield1 = 170; + public const int SolarShield2 = 171; + public const int SolarShield3 = 172; + public const int NebulaUpLife1 = 173; + public const int NebulaUpLife2 = 174; + public const int NebulaUpLife3 = 175; + public const int NebulaUpMana1 = 176; + public const int NebulaUpMana2 = 177; + public const int NebulaUpMana3 = 178; + public const int NebulaUpDmg1 = 179; + public const int NebulaUpDmg2 = 180; + public const int NebulaUpDmg3 = 181; + public const int StardustMinion = 182; + public const int StardustMinionBleed = 183; + public const int MinecartLeftWood = 184; + public const int MinecartRightWood = 185; + public const int DryadsWardDebuff = 186; + public const int StardustGuardianMinion = 187; + public const int StardustDragonMinion = 188; + public const int Daybreak = 189; + public const int SuspiciousTentacle = 190; + public const int CompanionCube = 191; + public const int SugarRush = 192; + public const int BasiliskMount = 193; + public const int WindPushed = 194; + public const int WitheredArmor = 195; + public const int WitheredWeapon = 196; + public const int OgreSpit = 197; + public const int ParryDamageBuff = 198; + public const int NoBuilding = 199; + public const int PetDD2Gato = 200; + public const int PetDD2Ghost = 201; + public const int PetDD2Dragon = 202; + public const int BetsysCurse = 203; + public const int Oiled = 204; + public const int BallistaPanic = 205; + public const int WellFed2 = 206; + public const int WellFed3 = 207; + public const int DesertMinecartRight = 208; + public const int DesertMinecartLeft = 209; + public const int FishMinecartRight = 210; + public const int FishMinecartLeft = 211; + public const int GolfCartMount = 212; + public const int BatOfLight = 213; + public const int VampireFrog = 214; + public const int CatBast = 215; + public const int BabyBird = 216; + public const int UpbeatStar = 217; + public const int SugarGlider = 218; + public const int SharkPup = 219; + public const int BeeMinecartRight = 220; + public const int BeeMinecartLeft = 221; + public const int LadybugMinecartRight = 222; + public const int LadybugMinecartLeft = 223; + public const int PigronMinecartRight = 224; + public const int PigronMinecartLeft = 225; + public const int SunflowerMinecartRight = 226; + public const int SunflowerMinecartLeft = 227; + public const int HellMinecartRight = 228; + public const int HellMinecartLeft = 229; + public const int WitchBroom = 230; + public const int ShroomMinecartRight = 231; + public const int ShroomMinecartLeft = 232; + public const int AmethystMinecartRight = 233; + public const int AmethystMinecartLeft = 234; + public const int TopazMinecartRight = 235; + public const int TopazMinecartLeft = 236; + public const int SapphireMinecartRight = 237; + public const int SapphireMinecartLeft = 238; + public const int EmeraldMinecartRight = 239; + public const int EmeraldMinecartLeft = 240; + public const int RubyMinecartRight = 241; + public const int RubyMinecartLeft = 242; + public const int DiamondMinecartRight = 243; + public const int DiamondMinecartLeft = 244; + public const int AmberMinecartRight = 245; + public const int AmberMinecartLeft = 246; + public const int BeetleMinecartRight = 247; + public const int BeetleMinecartLeft = 248; + public const int MeowmereMinecartRight = 249; + public const int MeowmereMinecartLeft = 250; + public const int PartyMinecartRight = 251; + public const int PartyMinecartLeft = 252; + public const int PirateMinecartRight = 253; + public const int PirateMinecartLeft = 254; + public const int SteampunkMinecartRight = 255; + public const int SteampunkMinecartLeft = 256; + public const int Lucky = 257; + public const int LilHarpy = 258; + public const int FennecFox = 259; + public const int GlitteryButterfly = 260; + public const int BabyImp = 261; + public const int BabyRedPanda = 262; + public const int StormTiger = 263; + public const int Plantero = 264; + public const int Flamingo = 265; + public const int DynamiteKitten = 266; + public const int BabyWerewolf = 267; + public const int ShadowMimic = 268; + public const int CoffinMinecartRight = 269; + public const int CoffinMinecartLeft = 270; + public const int Smolstar = 271; + public const int DiggingMoleMinecartRight = 272; + public const int DiggingMoleMinecartLeft = 273; + public const int VoltBunny = 274; + public const int PaintedHorseMount = 275; + public const int MajesticHorseMount = 276; + public const int DarkHorseMount = 277; + public const int PogoStickMount = 278; + public const int PirateShipMount = 279; + public const int SpookyWoodMount = 280; + public const int SantankMount = 281; + public const int WallOfFleshGoatMount = 282; + public const int DarkMageBookMount = 283; + public const int KingSlimePet = 284; + public const int EyeOfCthulhuPet = 285; + public const int EaterOfWorldsPet = 286; + public const int BrainOfCthulhuPet = 287; + public const int SkeletronPet = 288; + public const int QueenBeePet = 289; + public const int DestroyerPet = 290; + public const int TwinsPet = 291; + public const int SkeletronPrimePet = 292; + public const int PlanteraPet = 293; + public const int GolemPet = 294; + public const int DukeFishronPet = 295; + public const int LunaticCultistPet = 296; + public const int MoonLordPet = 297; + public const int FairyQueenPet = 298; + public const int PumpkingPet = 299; + public const int EverscreamPet = 300; + public const int IceQueenPet = 301; + public const int MartianPet = 302; + public const int DD2OgrePet = 303; + public const int DD2BetsyPet = 304; + public const int LavaSharkMount = 305; + public const int TitaniumStorm = 306; + public const int BlandWhipEnemyDebuff = 307; + public const int SwordWhipPlayerBuff = 308; + public const int SwordWhipNPCDebuff = 309; + public const int ScytheWhipEnemyDebuff = 310; + public const int ScytheWhipPlayerBuff = 311; + public const int CoolWhipPlayerBuff = 312; + public const int FlameWhipEnemyDebuff = 313; + public const int ThornWhipPlayerBuff = 314; + public const int ThornWhipNPCDebuff = 315; + public const int RainbowWhipNPCDebuff = 316; + public const int QueenSlimePet = 317; + public const int QueenSlimeMount = 318; + public const int MaceWhipNPCDebuff = 319; + public const int GelBalloonBuff = 320; + public const int BrainOfConfusionBuff = 321; + public const int EmpressBlade = 322; + public const int Count = 323; + + public class Sets + { + public static SetFactory Factory = new SetFactory(323); + public static bool[] IsWellFed = BuffID.Sets.Factory.CreateBoolSet(26, 206, 207); + public static bool[] TimeLeftDoesNotDecrease = BuffID.Sets.Factory.CreateBoolSet(28); + public static bool[] CanBeRemovedByNetMessage = BuffID.Sets.Factory.CreateBoolSet(313); + public static bool[] IsAFlaskBuff = BuffID.Sets.Factory.CreateBoolSet(71, 72, 73, 74, 75, 76, 77, 78, 79); + public static BuffID.Sets.BuffMountData[] BasicMountData = BuffID.Sets.Factory.CreateCustomSet((BuffID.Sets.BuffMountData) null, (object) 118, (object) new BuffID.Sets.BuffMountData() + { + mountID = 6, + faceLeft = true + }, (object) 138, (object) new BuffID.Sets.BuffMountData() + { + mountID = 6, + faceLeft = false + }, (object) 184, (object) new BuffID.Sets.BuffMountData() + { + mountID = 13, + faceLeft = true + }, (object) 185, (object) new BuffID.Sets.BuffMountData() + { + mountID = 13, + faceLeft = false + }, (object) 211, (object) new BuffID.Sets.BuffMountData() + { + mountID = 16, + faceLeft = true + }, (object) 210, (object) new BuffID.Sets.BuffMountData() + { + mountID = 16, + faceLeft = false + }, (object) 209, (object) new BuffID.Sets.BuffMountData() + { + mountID = 15, + faceLeft = true + }, (object) 208, (object) new BuffID.Sets.BuffMountData() + { + mountID = 15, + faceLeft = false + }, (object) 221, (object) new BuffID.Sets.BuffMountData() + { + mountID = 18, + faceLeft = true + }, (object) 220, (object) new BuffID.Sets.BuffMountData() + { + mountID = 18, + faceLeft = false + }, (object) 223, (object) new BuffID.Sets.BuffMountData() + { + mountID = 19, + faceLeft = true + }, (object) 222, (object) new BuffID.Sets.BuffMountData() + { + mountID = 19, + faceLeft = false + }, (object) 225, (object) new BuffID.Sets.BuffMountData() + { + mountID = 20, + faceLeft = true + }, (object) 224, (object) new BuffID.Sets.BuffMountData() + { + mountID = 20, + faceLeft = false + }, (object) 227, (object) new BuffID.Sets.BuffMountData() + { + mountID = 21, + faceLeft = true + }, (object) 226, (object) new BuffID.Sets.BuffMountData() + { + mountID = 21, + faceLeft = false + }, (object) 229, (object) new BuffID.Sets.BuffMountData() + { + mountID = 22, + faceLeft = true + }, (object) 228, (object) new BuffID.Sets.BuffMountData() + { + mountID = 22, + faceLeft = false + }, (object) 232, (object) new BuffID.Sets.BuffMountData() + { + mountID = 24, + faceLeft = true + }, (object) 231, (object) new BuffID.Sets.BuffMountData() + { + mountID = 24, + faceLeft = false + }, (object) 234, (object) new BuffID.Sets.BuffMountData() + { + mountID = 25, + faceLeft = true + }, (object) 233, (object) new BuffID.Sets.BuffMountData() + { + mountID = 25, + faceLeft = false + }, (object) 236, (object) new BuffID.Sets.BuffMountData() + { + mountID = 26, + faceLeft = true + }, (object) 235, (object) new BuffID.Sets.BuffMountData() + { + mountID = 26, + faceLeft = false + }, (object) 238, (object) new BuffID.Sets.BuffMountData() + { + mountID = 27, + faceLeft = true + }, (object) 237, (object) new BuffID.Sets.BuffMountData() + { + mountID = 27, + faceLeft = false + }, (object) 240, (object) new BuffID.Sets.BuffMountData() + { + mountID = 28, + faceLeft = true + }, (object) 239, (object) new BuffID.Sets.BuffMountData() + { + mountID = 28, + faceLeft = false + }, (object) 242, (object) new BuffID.Sets.BuffMountData() + { + mountID = 29, + faceLeft = true + }, (object) 241, (object) new BuffID.Sets.BuffMountData() + { + mountID = 29, + faceLeft = false + }, (object) 244, (object) new BuffID.Sets.BuffMountData() + { + mountID = 30, + faceLeft = true + }, (object) 243, (object) new BuffID.Sets.BuffMountData() + { + mountID = 30, + faceLeft = false + }, (object) 246, (object) new BuffID.Sets.BuffMountData() + { + mountID = 31, + faceLeft = true + }, (object) 245, (object) new BuffID.Sets.BuffMountData() + { + mountID = 31, + faceLeft = false + }, (object) 248, (object) new BuffID.Sets.BuffMountData() + { + mountID = 32, + faceLeft = true + }, (object) 247, (object) new BuffID.Sets.BuffMountData() + { + mountID = 32, + faceLeft = false + }, (object) 250, (object) new BuffID.Sets.BuffMountData() + { + mountID = 33, + faceLeft = true + }, (object) 249, (object) new BuffID.Sets.BuffMountData() + { + mountID = 33, + faceLeft = false + }, (object) 252, (object) new BuffID.Sets.BuffMountData() + { + mountID = 34, + faceLeft = true + }, (object) 251, (object) new BuffID.Sets.BuffMountData() + { + mountID = 34, + faceLeft = false + }, (object) 254, (object) new BuffID.Sets.BuffMountData() + { + mountID = 35, + faceLeft = true + }, (object) 253, (object) new BuffID.Sets.BuffMountData() + { + mountID = 35, + faceLeft = false + }, (object) 256, (object) new BuffID.Sets.BuffMountData() + { + mountID = 36, + faceLeft = true + }, (object) (int) byte.MaxValue, (object) new BuffID.Sets.BuffMountData() + { + mountID = 36, + faceLeft = false + }, (object) 270, (object) new BuffID.Sets.BuffMountData() + { + mountID = 38, + faceLeft = true + }, (object) 269, (object) new BuffID.Sets.BuffMountData() + { + mountID = 38, + faceLeft = false + }, (object) 273, (object) new BuffID.Sets.BuffMountData() + { + mountID = 39, + faceLeft = true + }, (object) 272, (object) new BuffID.Sets.BuffMountData() + { + mountID = 39, + faceLeft = false + }, (object) 167, (object) new BuffID.Sets.BuffMountData() + { + mountID = 11, + faceLeft = true + }, (object) 166, (object) new BuffID.Sets.BuffMountData() + { + mountID = 11, + faceLeft = false + }); + + public class BuffMountData + { + public int mountID; + public bool faceLeft; + } + } + } +} diff --git a/ID/ChainID.cs b/ID/ChainID.cs new file mode 100644 index 0000000..befd5bb --- /dev/null +++ b/ID/ChainID.cs @@ -0,0 +1,30 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.ChainID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public static class ChainID + { + public const short TendonHook = 0; + public const short ThornHook = 1; + public const short IlluminantHook = 2; + public const short Wormhook = 3; + public const short SilkRope = 4; + public const short SilkRope2 = 5; + public const short WebRope = 6; + public const short WebRope2 = 7; + public const short LunarSolar = 8; + public const short LunarVortex = 9; + public const short LunarNebula = 10; + public const short LunarStardust = 11; + public const short LunarSolarGlow = 12; + public const short LunarVortexGlow = 13; + public const short LunarNebulaGlow = 14; + public const short LunarStardustGlow = 15; + public const short StaticHook = 16; + public const short Count = 17; + } +} diff --git a/ID/CloudID.cs b/ID/CloudID.cs new file mode 100644 index 0000000..9ba114b --- /dev/null +++ b/ID/CloudID.cs @@ -0,0 +1,50 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.CloudID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public static class CloudID + { + public const int Regular1 = 0; + public const int Regular2 = 1; + public const int Regular3 = 2; + public const int Regular4 = 3; + public const int CirroCumulus1 = 4; + public const int CirroCumulus2 = 5; + public const int CirroCumulus3 = 6; + public const int CirroCumulus4 = 7; + public const int CirroCumulus5 = 8; + public const int Cirrus1 = 9; + public const int Cirrus2 = 10; + public const int Cirrus3 = 11; + public const int Cirrus4 = 12; + public const int Cirrus5 = 13; + public const int Cummulus1 = 14; + public const int Cummulus2 = 15; + public const int Cummulus3 = 16; + public const int Cummulus4 = 17; + public const int Cumulonimbus1 = 18; + public const int Cumulonimbus2 = 19; + public const int Cumulonimbus3 = 20; + public const int Cumulonimbus4 = 21; + public const int Rare_Bird = 22; + public const int Rare_Bunny = 23; + public const int Rare_Eater = 24; + public const int Rare_EOC1 = 25; + public const int Rare_EOC2 = 26; + public const int Rare_Goldfish = 27; + public const int Rare_Redigit = 28; + public const int Rare_Heart = 29; + public const int Rare_Pumpking = 30; + public const int Rare_Skeletron = 31; + public const int Rare_Star = 32; + public const int Rare_Sword = 33; + public const int Rare_Tree = 34; + public const int Rare_Wyvern = 35; + public const int Rare_BOC = 36; + public const int Count = 37; + } +} diff --git a/ID/Colors.cs b/ID/Colors.cs new file mode 100644 index 0000000..a8ab99a --- /dev/null +++ b/ID/Colors.cs @@ -0,0 +1,111 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.Colors +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.ID +{ + public static class Colors + { + public static readonly Color RarityAmber = new Color((int) byte.MaxValue, 175, 0); + public static readonly Color RarityTrash = new Color(130, 130, 130); + public static readonly Color RarityNormal = Color.White; + public static readonly Color RarityBlue = new Color(150, 150, (int) byte.MaxValue); + public static readonly Color RarityGreen = new Color(150, (int) byte.MaxValue, 150); + public static readonly Color RarityOrange = new Color((int) byte.MaxValue, 200, 150); + public static readonly Color RarityRed = new Color((int) byte.MaxValue, 150, 150); + public static readonly Color RarityPink = new Color((int) byte.MaxValue, 150, (int) byte.MaxValue); + public static readonly Color RarityPurple = new Color(210, 160, (int) byte.MaxValue); + public static readonly Color RarityLime = new Color(150, (int) byte.MaxValue, 10); + public static readonly Color RarityYellow = new Color((int) byte.MaxValue, (int) byte.MaxValue, 10); + public static readonly Color RarityCyan = new Color(5, 200, (int) byte.MaxValue); + public static readonly Color CoinPlatinum = new Color(220, 220, 198); + public static readonly Color CoinGold = new Color(224, 201, 92); + public static readonly Color CoinSilver = new Color(181, 192, 193); + public static readonly Color CoinCopper = new Color(246, 138, 96); + public static readonly Color AmbientNPCGastropodLight = new Color(102, 0, 63); + public static readonly Color JourneyMode = Color.Lerp(Color.HotPink, Color.White, 0.1f); + public static readonly Color Mediumcore = new Color(1f, 0.6f, 0.0f); + public static readonly Color Hardcore = new Color(1f, 0.15f, 0.1f); + public static readonly Color LanternBG = new Color(120, 50, 20); + public static readonly Color[] _waterfallColors; + public static readonly Color[] _liquidColors; + public static readonly Color FancyUIFatButtonMouseOver; + public static readonly Color InventoryDefaultColor; + public static readonly Color InventoryDefaultColorWithOpacity; + + public static Color CurrentLiquidColor + { + get + { + Color color = Color.Transparent; + bool flag = true; + for (int index = 0; index < 11; ++index) + { + if ((double) Main.liquidAlpha[index] > 0.0) + { + if (flag) + { + flag = false; + color = Colors._liquidColors[index]; + } + else + color = Color.Lerp(color, Colors._liquidColors[index], Main.liquidAlpha[index]); + } + } + return color; + } + } + + public static Color AlphaDarken(Color input) => input * ((float) Main.mouseTextColor / (float) byte.MaxValue); + + public static Color GetSelectionGlowColor(bool isTileSelected, int averageTileLighting) => !isTileSelected ? new Color(averageTileLighting / 2, averageTileLighting / 2, averageTileLighting / 2, averageTileLighting) : new Color(averageTileLighting, averageTileLighting, averageTileLighting / 3, averageTileLighting); + + static Colors() + { + Color[] colorArray = new Color[22]; + colorArray[0] = new Color(9, 61, 191); + colorArray[1] = new Color(253, 32, 3); + colorArray[2] = new Color(143, 143, 143); + colorArray[3] = new Color(59, 29, 131); + colorArray[4] = new Color(7, 145, 142); + colorArray[5] = new Color(171, 11, 209); + colorArray[6] = new Color(9, 137, 191); + colorArray[7] = new Color(168, 106, 32); + colorArray[8] = new Color(36, 60, 148); + colorArray[9] = new Color(65, 59, 101); + colorArray[10] = new Color(200, 0, 0); + colorArray[13] = new Color(177, 54, 79); + colorArray[14] = new Color((int) byte.MaxValue, 156, 12); + colorArray[15] = new Color(91, 34, 104); + colorArray[16] = new Color(102, 104, 34); + colorArray[17] = new Color(34, 43, 104); + colorArray[18] = new Color(34, 104, 38); + colorArray[19] = new Color(104, 34, 34); + colorArray[20] = new Color(76, 79, 102); + colorArray[21] = new Color(104, 61, 34); + Colors._waterfallColors = colorArray; + Colors._liquidColors = new Color[12] + { + new Color(9, 61, 191), + new Color(253, 32, 3), + new Color(59, 29, 131), + new Color(7, 145, 142), + new Color(171, 11, 209), + new Color(9, 137, 191), + new Color(168, 106, 32), + new Color(36, 60, 148), + new Color(65, 59, 101), + new Color(200, 0, 0), + new Color(177, 54, 79), + new Color((int) byte.MaxValue, 156, 12) + }; + Colors.FancyUIFatButtonMouseOver = Main.OurFavoriteColor; + Colors.InventoryDefaultColor = new Color(63, 65, 151, (int) byte.MaxValue); + Colors.InventoryDefaultColorWithOpacity = new Color(63, 65, 151, (int) byte.MaxValue) * 0.785f; + } + } +} diff --git a/ID/ContentSamples.cs b/ID/ContentSamples.cs new file mode 100644 index 0000000..20495e2 --- /dev/null +++ b/ID/ContentSamples.cs @@ -0,0 +1,887 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.ContentSamples +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.GameContent.Bestiary; +using Terraria.Graphics.Shaders; + +namespace Terraria.ID +{ + public static class ContentSamples + { + public static Dictionary NpcsByNetId = new Dictionary(); + public static Dictionary ProjectilesByType = new Dictionary(); + public static Dictionary ItemsByType = new Dictionary(); + public static Dictionary ItemNetIdsByPersistentIds = new Dictionary(); + public static Dictionary ItemPersistentIdsByNetIds = new Dictionary(); + public static Dictionary NpcNetIdsByPersistentIds = new Dictionary(); + public static Dictionary NpcPersistentIdsByNetIds = new Dictionary(); + public static Dictionary NpcBestiarySortingId = new Dictionary(); + public static Dictionary NpcBestiaryRarityStars = new Dictionary(); + public static Dictionary NpcBestiaryCreditIdsByNpcNetIds = new Dictionary(); + public static Dictionary ItemCreativeSortingId = new Dictionary(); + + public static void Initialize() + { + ContentSamples.NpcsByNetId.Clear(); + ContentSamples.NpcNetIdsByPersistentIds.Clear(); + ContentSamples.NpcPersistentIdsByNetIds.Clear(); + ContentSamples.NpcBestiarySortingId.Clear(); + for (int index = -65; index < 663; ++index) + { + NPC npc = new NPC(); + npc.SetDefaults(index); + ContentSamples.NpcsByNetId[index] = npc; + string name = NPCID.Search.GetName(npc.netID); + ContentSamples.NpcPersistentIdsByNetIds[index] = name; + ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[index] = name; + ContentSamples.NpcNetIdsByPersistentIds[name] = index; + } + ContentSamples.ModifyNPCIds(); + ContentSamples.ProjectilesByType.Clear(); + for (int index = 0; index < 950; ++index) + { + Projectile projectile = new Projectile(); + projectile.SetDefaults(index); + ContentSamples.ProjectilesByType[index] = projectile; + } + ContentSamples.ItemsByType.Clear(); + for (int index = 0; index < 5045; ++index) + { + Item obj = new Item(); + obj.SetDefaults(index); + ContentSamples.ItemsByType[index] = obj; + string name = ItemID.Search.GetName(obj.netID); + ContentSamples.ItemPersistentIdsByNetIds[index] = name; + ContentSamples.ItemNetIdsByPersistentIds[name] = index; + } + foreach (int num in ItemID.Sets.ItemsThatAreProcessedAfterNormalContentSample) + { + Item obj = new Item(); + obj.SetDefaults(num); + ContentSamples.ItemsByType[num] = obj; + string name = ItemID.Search.GetName(obj.netID); + ContentSamples.ItemPersistentIdsByNetIds[num] = name; + ContentSamples.ItemNetIdsByPersistentIds[name] = num; + } + ContentSamples.FillNpcRarities(); + } + + public static void FixItemsAfterRecipesAreAdded() + { + foreach (KeyValuePair keyValuePair in ContentSamples.ItemsByType) + keyValuePair.Value.material = ItemID.Sets.IsAMaterial[keyValuePair.Key]; + } + + public static void RebuildBestiarySortingIDsByBestiaryDatabaseContents(BestiaryDatabase database) + { + ContentSamples.NpcBestiarySortingId.Clear(); + ContentSamples.CreateBestiarySortingIds(database); + } + + public static void RebuildItemCreativeSortingIDsAfterRecipesAreSetUp() + { + ContentSamples.ItemCreativeSortingId.Clear(); + ContentSamples.CreateCreativeItemSortingIds(); + } + + private static void ModifyNPCIds() + { + Dictionary creditIdsByNpcNetIds = ContentSamples.NpcBestiaryCreditIdsByNpcNetIds; + creditIdsByNpcNetIds[-65] = creditIdsByNpcNetIds[42]; + creditIdsByNpcNetIds[-64] = creditIdsByNpcNetIds[42]; + creditIdsByNpcNetIds[-63] = creditIdsByNpcNetIds[42]; + creditIdsByNpcNetIds[-62] = creditIdsByNpcNetIds[42]; + creditIdsByNpcNetIds[-61] = creditIdsByNpcNetIds[42]; + creditIdsByNpcNetIds[-60] = creditIdsByNpcNetIds[42]; + creditIdsByNpcNetIds[-59] = creditIdsByNpcNetIds[42]; + creditIdsByNpcNetIds[-58] = creditIdsByNpcNetIds[42]; + creditIdsByNpcNetIds[-57] = creditIdsByNpcNetIds[42]; + creditIdsByNpcNetIds[-56] = creditIdsByNpcNetIds[42]; + creditIdsByNpcNetIds[-55] = creditIdsByNpcNetIds[223]; + creditIdsByNpcNetIds[-54] = creditIdsByNpcNetIds[223]; + creditIdsByNpcNetIds[-53] = creditIdsByNpcNetIds[21]; + creditIdsByNpcNetIds[-52] = creditIdsByNpcNetIds[21]; + creditIdsByNpcNetIds[-51] = creditIdsByNpcNetIds[21]; + creditIdsByNpcNetIds[-50] = creditIdsByNpcNetIds[21]; + creditIdsByNpcNetIds[-49] = creditIdsByNpcNetIds[21]; + creditIdsByNpcNetIds[-48] = creditIdsByNpcNetIds[21]; + creditIdsByNpcNetIds[-47] = creditIdsByNpcNetIds[21]; + creditIdsByNpcNetIds[-46] = creditIdsByNpcNetIds[21]; + creditIdsByNpcNetIds[-45] = creditIdsByNpcNetIds[3]; + creditIdsByNpcNetIds[-44] = creditIdsByNpcNetIds[3]; + creditIdsByNpcNetIds[-43] = creditIdsByNpcNetIds[2]; + creditIdsByNpcNetIds[-42] = creditIdsByNpcNetIds[2]; + creditIdsByNpcNetIds[-41] = creditIdsByNpcNetIds[2]; + creditIdsByNpcNetIds[-40] = creditIdsByNpcNetIds[2]; + creditIdsByNpcNetIds[-39] = creditIdsByNpcNetIds[2]; + creditIdsByNpcNetIds[-38] = creditIdsByNpcNetIds[2]; + creditIdsByNpcNetIds[-37] = creditIdsByNpcNetIds[3]; + creditIdsByNpcNetIds[-36] = creditIdsByNpcNetIds[3]; + creditIdsByNpcNetIds[-35] = creditIdsByNpcNetIds[3]; + creditIdsByNpcNetIds[-34] = creditIdsByNpcNetIds[3]; + creditIdsByNpcNetIds[-33] = creditIdsByNpcNetIds[3]; + creditIdsByNpcNetIds[-32] = creditIdsByNpcNetIds[3]; + creditIdsByNpcNetIds[-31] = creditIdsByNpcNetIds[186]; + creditIdsByNpcNetIds[-30] = creditIdsByNpcNetIds[186]; + creditIdsByNpcNetIds[-27] = creditIdsByNpcNetIds[3]; + creditIdsByNpcNetIds[-26] = creditIdsByNpcNetIds[3]; + creditIdsByNpcNetIds[-23] = creditIdsByNpcNetIds[173]; + creditIdsByNpcNetIds[-22] = creditIdsByNpcNetIds[173]; + creditIdsByNpcNetIds[-25] = creditIdsByNpcNetIds[183]; + creditIdsByNpcNetIds[-24] = creditIdsByNpcNetIds[183]; + creditIdsByNpcNetIds[-21] = creditIdsByNpcNetIds[176]; + creditIdsByNpcNetIds[-20] = creditIdsByNpcNetIds[176]; + creditIdsByNpcNetIds[-19] = creditIdsByNpcNetIds[176]; + creditIdsByNpcNetIds[-18] = creditIdsByNpcNetIds[176]; + creditIdsByNpcNetIds[-17] = creditIdsByNpcNetIds[42]; + creditIdsByNpcNetIds[-16] = creditIdsByNpcNetIds[42]; + creditIdsByNpcNetIds[-15] = creditIdsByNpcNetIds[77]; + creditIdsByNpcNetIds[-14] = creditIdsByNpcNetIds[31]; + creditIdsByNpcNetIds[-13] = creditIdsByNpcNetIds[31]; + creditIdsByNpcNetIds[-12] = creditIdsByNpcNetIds[6]; + creditIdsByNpcNetIds[-11] = creditIdsByNpcNetIds[6]; + creditIdsByNpcNetIds[497] = creditIdsByNpcNetIds[496]; + creditIdsByNpcNetIds[495] = creditIdsByNpcNetIds[494]; + short num = 499; + for (int key = 498; key <= 506; ++key) + creditIdsByNpcNetIds[key] = creditIdsByNpcNetIds[(int) num]; + creditIdsByNpcNetIds[591] = creditIdsByNpcNetIds[590]; + creditIdsByNpcNetIds[430] = creditIdsByNpcNetIds[3]; + creditIdsByNpcNetIds[436] = creditIdsByNpcNetIds[200]; + creditIdsByNpcNetIds[431] = creditIdsByNpcNetIds[161]; + creditIdsByNpcNetIds[432] = creditIdsByNpcNetIds[186]; + creditIdsByNpcNetIds[433] = creditIdsByNpcNetIds[187]; + creditIdsByNpcNetIds[434] = creditIdsByNpcNetIds[188]; + creditIdsByNpcNetIds[435] = creditIdsByNpcNetIds[189]; + creditIdsByNpcNetIds[164] = creditIdsByNpcNetIds[165]; + creditIdsByNpcNetIds[236] = creditIdsByNpcNetIds[237]; + creditIdsByNpcNetIds[163] = creditIdsByNpcNetIds[238]; + creditIdsByNpcNetIds[239] = creditIdsByNpcNetIds[240]; + creditIdsByNpcNetIds[530] = creditIdsByNpcNetIds[531]; + creditIdsByNpcNetIds[449] = creditIdsByNpcNetIds[21]; + creditIdsByNpcNetIds[450] = creditIdsByNpcNetIds[201]; + creditIdsByNpcNetIds[451] = creditIdsByNpcNetIds[202]; + creditIdsByNpcNetIds[452] = creditIdsByNpcNetIds[203]; + creditIdsByNpcNetIds[595] = creditIdsByNpcNetIds[599]; + creditIdsByNpcNetIds[596] = creditIdsByNpcNetIds[599]; + creditIdsByNpcNetIds[597] = creditIdsByNpcNetIds[599]; + creditIdsByNpcNetIds[598] = creditIdsByNpcNetIds[599]; + creditIdsByNpcNetIds[600] = creditIdsByNpcNetIds[599]; + creditIdsByNpcNetIds[230] = creditIdsByNpcNetIds[55]; + creditIdsByNpcNetIds[593] = creditIdsByNpcNetIds[592]; + creditIdsByNpcNetIds[-2] = creditIdsByNpcNetIds[121]; + creditIdsByNpcNetIds[195] = creditIdsByNpcNetIds[196]; + creditIdsByNpcNetIds[198] = creditIdsByNpcNetIds[199]; + creditIdsByNpcNetIds[158] = creditIdsByNpcNetIds[159]; + creditIdsByNpcNetIds[568] = creditIdsByNpcNetIds[569]; + creditIdsByNpcNetIds[566] = creditIdsByNpcNetIds[567]; + creditIdsByNpcNetIds[576] = creditIdsByNpcNetIds[577]; + creditIdsByNpcNetIds[558] = creditIdsByNpcNetIds[560]; + creditIdsByNpcNetIds[559] = creditIdsByNpcNetIds[560]; + creditIdsByNpcNetIds[552] = creditIdsByNpcNetIds[554]; + creditIdsByNpcNetIds[553] = creditIdsByNpcNetIds[554]; + creditIdsByNpcNetIds[564] = creditIdsByNpcNetIds[565]; + creditIdsByNpcNetIds[570] = creditIdsByNpcNetIds[571]; + creditIdsByNpcNetIds[555] = creditIdsByNpcNetIds[557]; + creditIdsByNpcNetIds[556] = creditIdsByNpcNetIds[557]; + creditIdsByNpcNetIds[574] = creditIdsByNpcNetIds[575]; + creditIdsByNpcNetIds[561] = creditIdsByNpcNetIds[563]; + creditIdsByNpcNetIds[562] = creditIdsByNpcNetIds[563]; + creditIdsByNpcNetIds[572] = creditIdsByNpcNetIds[573]; + creditIdsByNpcNetIds[14] = creditIdsByNpcNetIds[13]; + creditIdsByNpcNetIds[15] = creditIdsByNpcNetIds[13]; + } + + private static void CreateBestiarySortingIds(BestiaryDatabase database) + { + List> bestiaryEntriesList = ContentSamples.BestiaryHelper.GetSortedBestiaryEntriesList(database); + int num = 1; + foreach (KeyValuePair keyValuePair in bestiaryEntriesList) + { + ContentSamples.NpcBestiarySortingId[keyValuePair.Key] = num; + ++num; + } + } + + private static void FillNpcRarities() + { + NPCSpawnParams spawnparams = new NPCSpawnParams() + { + gameModeData = Main.RegisterdGameModes[0] + }; + for (int index = -65; index < 663; ++index) + { + NPC npc = new NPC(); + npc.SetDefaults(index, spawnparams); + ContentSamples.NpcBestiaryRarityStars[index] = ContentSamples.GetNPCBestiaryRarityStarsCount(npc); + } + ContentSamples.NpcBestiaryRarityStars[22] = 1; + ContentSamples.NpcBestiaryRarityStars[17] = 1; + ContentSamples.NpcBestiaryRarityStars[18] = 1; + ContentSamples.NpcBestiaryRarityStars[38] = 1; + ContentSamples.NpcBestiaryRarityStars[369] = 2; + ContentSamples.NpcBestiaryRarityStars[20] = 3; + ContentSamples.NpcBestiaryRarityStars[19] = 1; + ContentSamples.NpcBestiaryRarityStars[227] = 2; + ContentSamples.NpcBestiaryRarityStars[353] = 2; + ContentSamples.NpcBestiaryRarityStars[550] = 2; + ContentSamples.NpcBestiaryRarityStars[588] = 2; + ContentSamples.NpcBestiaryRarityStars[107] = 3; + ContentSamples.NpcBestiaryRarityStars[228] = 2; + ContentSamples.NpcBestiaryRarityStars[124] = 2; + ContentSamples.NpcBestiaryRarityStars[54] = 2; + ContentSamples.NpcBestiaryRarityStars[108] = 3; + ContentSamples.NpcBestiaryRarityStars[178] = 3; + ContentSamples.NpcBestiaryRarityStars[216] = 3; + ContentSamples.NpcBestiaryRarityStars[160] = 5; + ContentSamples.NpcBestiaryRarityStars[441] = 5; + ContentSamples.NpcBestiaryRarityStars[209] = 3; + ContentSamples.NpcBestiaryRarityStars[208] = 4; + ContentSamples.NpcBestiaryRarityStars[142] = 5; + ContentSamples.NpcBestiaryRarityStars[368] = 3; + ContentSamples.NpcBestiaryRarityStars[453] = 4; + ContentSamples.NpcBestiaryRarityStars[37] = 2; + ContentSamples.NpcBestiaryRarityStars[633] = 5; + ContentSamples.NpcBestiaryRarityStars[638] = 3; + ContentSamples.NpcBestiaryRarityStars[637] = 3; + ContentSamples.NpcBestiaryRarityStars[656] = 3; + ContentSamples.NpcBestiaryRarityStars[484] = 5; + ContentSamples.NpcBestiaryRarityStars[614] = 4; + ContentSamples.NpcBestiaryRarityStars[303] = 4; + ContentSamples.NpcBestiaryRarityStars[337] = 4; + ContentSamples.NpcBestiaryRarityStars[360] = 3; + ContentSamples.NpcBestiaryRarityStars[655] = 2; + ContentSamples.NpcBestiaryRarityStars[374] = 3; + ContentSamples.NpcBestiaryRarityStars[661] = 3; + ContentSamples.NpcBestiaryRarityStars[362] = 2; + ContentSamples.NpcBestiaryRarityStars[364] = 2; + ContentSamples.NpcBestiaryRarityStars[616] = 2; + ContentSamples.NpcBestiaryRarityStars[298] = 2; + ContentSamples.NpcBestiaryRarityStars[599] = 3; + ContentSamples.NpcBestiaryRarityStars[355] = 2; + ContentSamples.NpcBestiaryRarityStars[358] = 3; + ContentSamples.NpcBestiaryRarityStars[654] = 3; + ContentSamples.NpcBestiaryRarityStars[653] = 2; + ContentSamples.NpcBestiaryRarityStars[540] = 2; + ContentSamples.NpcBestiaryRarityStars[604] = 3; + ContentSamples.NpcBestiaryRarityStars[611] = 3; + ContentSamples.NpcBestiaryRarityStars[612] = 2; + ContentSamples.NpcBestiaryRarityStars[608] = 2; + ContentSamples.NpcBestiaryRarityStars[607] = 2; + ContentSamples.NpcBestiaryRarityStars[615] = 3; + ContentSamples.NpcBestiaryRarityStars[626] = 2; + ContentSamples.NpcBestiaryRarityStars[485] = 2; + ContentSamples.NpcBestiaryRarityStars[487] = 3; + ContentSamples.NpcBestiaryRarityStars[149] = 2; + ContentSamples.NpcBestiaryRarityStars[366] = 2; + ContentSamples.NpcBestiaryRarityStars[47] = 3; + ContentSamples.NpcBestiaryRarityStars[57] = 3; + ContentSamples.NpcBestiaryRarityStars[168] = 3; + ContentSamples.NpcBestiaryRarityStars[464] = 3; + ContentSamples.NpcBestiaryRarityStars[465] = 3; + ContentSamples.NpcBestiaryRarityStars[470] = 3; + ContentSamples.NpcBestiaryRarityStars[301] = 2; + ContentSamples.NpcBestiaryRarityStars[316] = 3; + ContentSamples.NpcBestiaryRarityStars[546] = 2; + ContentSamples.NpcBestiaryRarityStars[170] = 3; + ContentSamples.NpcBestiaryRarityStars[180] = 3; + ContentSamples.NpcBestiaryRarityStars[171] = 3; + ContentSamples.NpcBestiaryRarityStars[29] = 2; + ContentSamples.NpcBestiaryRarityStars[471] = 4; + ContentSamples.NpcBestiaryRarityStars[66] = 3; + ContentSamples.NpcBestiaryRarityStars[223] = 2; + ContentSamples.NpcBestiaryRarityStars[161] = 2; + ContentSamples.NpcBestiaryRarityStars[491] = 4; + ContentSamples.NpcBestiaryRarityStars[-9] = 3; + ContentSamples.NpcBestiaryRarityStars[594] = 2; + ContentSamples.NpcBestiaryRarityStars[628] = 2; + ContentSamples.NpcBestiaryRarityStars[225] = 2; + ContentSamples.NpcBestiaryRarityStars[224] = 2; + ContentSamples.NpcBestiaryRarityStars[250] = 3; + ContentSamples.NpcBestiaryRarityStars[16] = 2; + ContentSamples.NpcBestiaryRarityStars[481] = 2; + ContentSamples.NpcBestiaryRarityStars[483] = 2; + ContentSamples.NpcBestiaryRarityStars[184] = 2; + ContentSamples.NpcBestiaryRarityStars[185] = 3; + ContentSamples.NpcBestiaryRarityStars[206] = 3; + ContentSamples.NpcBestiaryRarityStars[541] = 4; + ContentSamples.NpcBestiaryRarityStars[537] = 2; + ContentSamples.NpcBestiaryRarityStars[205] = 4; + ContentSamples.NpcBestiaryRarityStars[499] = 2; + ContentSamples.NpcBestiaryRarityStars[494] = 2; + ContentSamples.NpcBestiaryRarityStars[496] = 2; + ContentSamples.NpcBestiaryRarityStars[302] = 3; + ContentSamples.NpcBestiaryRarityStars[317] = 3; + ContentSamples.NpcBestiaryRarityStars[318] = 3; + ContentSamples.NpcBestiaryRarityStars[319] = 3; + ContentSamples.NpcBestiaryRarityStars[320] = 3; + ContentSamples.NpcBestiaryRarityStars[321] = 3; + ContentSamples.NpcBestiaryRarityStars[331] = 3; + ContentSamples.NpcBestiaryRarityStars[332] = 3; + ContentSamples.NpcBestiaryRarityStars[322] = 3; + ContentSamples.NpcBestiaryRarityStars[323] = 3; + ContentSamples.NpcBestiaryRarityStars[324] = 3; + ContentSamples.NpcBestiaryRarityStars[335] = 3; + ContentSamples.NpcBestiaryRarityStars[336] = 3; + ContentSamples.NpcBestiaryRarityStars[333] = 3; + ContentSamples.NpcBestiaryRarityStars[334] = 3; + ContentSamples.NpcBestiaryRarityStars[4] = 2; + ContentSamples.NpcBestiaryRarityStars[50] = 2; + ContentSamples.NpcBestiaryRarityStars[35] = 3; + ContentSamples.NpcBestiaryRarityStars[13] = 3; + ContentSamples.NpcBestiaryRarityStars[134] = 4; + ContentSamples.NpcBestiaryRarityStars[262] = 4; + } + + private static int GetNPCBestiaryRarityStarsCount(NPC npc) + { + float num1 = 1f + (float) npc.rarity; + if (npc.rarity == 1) + ++num1; + else if (npc.rarity == 2) + num1 += 1.5f; + else if (npc.rarity == 3) + num1 += 2f; + else if (npc.rarity == 4) + num1 += 2.5f; + else if (npc.rarity == 5) + num1 += 3f; + else if (npc.rarity > 0) + num1 += 3.5f; + if (npc.boss) + num1 += 0.5f; + int num2 = npc.damage + npc.defense + npc.lifeMax / 4; + if (num2 > 10000) + num1 += 3.5f; + else if (num2 > 5000) + num1 += 3f; + else if (num2 > 1000) + num1 += 2.5f; + else if (num2 > 500) + num1 += 2f; + else if (num2 > 150) + num1 += 1.5f; + else if (num2 > 50) + ++num1; + if ((double) num1 > 5.0) + num1 = 5f; + return (int) num1; + } + + private static void CreateCreativeItemSortingIds() => ContentSamples.CreativeHelper.SetCreativeMenuOrder(); + + public static class CommonlyUsedContentSamples + { + public static int TeamDyeShaderIndex = -1; + public static int ColorOnlyShaderIndex = -1; + + public static void PrepareAfterEverythingElseLoaded() + { + ContentSamples.CommonlyUsedContentSamples.TeamDyeShaderIndex = (int) GameShaders.Hair.GetShaderIdFromItemId(1984); + ContentSamples.CommonlyUsedContentSamples.ColorOnlyShaderIndex = GameShaders.Armor.GetShaderIdFromItemId(3978); + } + } + + public static class CreativeHelper + { + private static List _manualEventItemsOrder = new List() + { + 361, + 1315, + 2767, + 602, + 1844, + 1958 + }; + private static List _manualBossSpawnItemsOrder = new List() + { + 43, + 560, + 70, + 1331, + 1133, + 1307, + 267, + 4988, + 544, + 557, + 556, + 1293, + 2673, + 4961, + 3601 + }; + private static List _manualGolfItemsOrder = new List() + { + 4095, + 4596, + 4597, + 4595, + 4598, + 4592, + 4593, + 4591, + 4594, + 4092, + 4093, + 4039, + 4094, + 4588, + 4589, + 4587, + 4590, + 3989, + 4242, + 4243, + 4244, + 4245, + 4246, + 4247, + 4248, + 4249, + 4250, + 4251, + 4252, + 4253, + 4254, + 4255, + 4040, + 4086, + 4085, + 4088, + 4084, + 4083, + 4087 + }; + + public static ContentSamples.CreativeHelper.ItemGroup GetItemGroup( + Item item, + out int orderInGroup) + { + orderInGroup = 0; + int num1 = ContentSamples.CreativeHelper._manualGolfItemsOrder.IndexOf(item.type); + if (num1 != -1) + { + orderInGroup = num1; + return ContentSamples.CreativeHelper.ItemGroup.Golf; + } + int num2 = ItemID.Sets.SortingPriorityWiring[item.type]; + if (num2 != -1) + { + orderInGroup = -num2; + return ContentSamples.CreativeHelper.ItemGroup.Wiring; + } + if (item.type == 3620) + return ContentSamples.CreativeHelper.ItemGroup.Wiring; + if (item.type == 327 || item.type == 329 || item.type == 1141 || item.type == 1533 || item.type == 1537 || item.type == 1536 || item.type == 1534 || item.type == 1535 || item.type == 3092 || item.type == 3091 || item.type == 4714) + { + orderInGroup = -item.rare; + return ContentSamples.CreativeHelper.ItemGroup.Keys; + } + if (item.type == 985 || item.type == 3079 || item.type == 3005 || item.type == 3080) + return ContentSamples.CreativeHelper.ItemGroup.Rope; + if (item.type == 781 || item.type == 783 || item.type == 780 || item.type == 782 || item.type == 784) + return ContentSamples.CreativeHelper.ItemGroup.Solutions; + if (item.type == 282 || item.type == 3112 || item.type == 4776 || item.type == 3002 || item.type == 286) + { + if (item.type == 282) + orderInGroup = -1; + return ContentSamples.CreativeHelper.ItemGroup.Glowsticks; + } + if (item.type == 166 || item.type == 3115 || item.type == 235 || item.type == 167 || item.type == 3547 || item.type == 2896 || item.type == 3196 || item.type == 4908 || item.type == 4909 || item.type == 4827 || item.type == 4826 || item.type == 4825 || item.type == 4423 || item.type == 4824) + return ContentSamples.CreativeHelper.ItemGroup.Bombs; + if (item.createTile == 376) + return ContentSamples.CreativeHelper.ItemGroup.Crates; + if (item.type == 1774 || item.type == 1869 || item.type == 4345 || item.type == 3093 || item.type == 4410) + return ContentSamples.CreativeHelper.ItemGroup.GoodieBags; + if (item.type >= 3318 && item.type <= 3332 || item.type >= 3860 && item.type <= 3862 || item.type == 4782 || item.type == 4957) + return ContentSamples.CreativeHelper.ItemGroup.BossBags; + if (item.type == 1115 || item.type == 1114 || item.type == 1110 || item.type == 1112 || item.type == 1108 || item.type == 1107 || item.type == 1116 || item.type == 1109 || item.type == 1111 || item.type == 1118 || item.type == 1117 || item.type == 1113 || item.type == 1119) + return ContentSamples.CreativeHelper.ItemGroup.DyeMaterial; + if (item.type == 3385 || item.type == 3386 || item.type == 3387 || item.type == 3388) + { + orderInGroup = -1; + return ContentSamples.CreativeHelper.ItemGroup.DyeMaterial; + } + if (item.dye != (byte) 0) + return ContentSamples.CreativeHelper.ItemGroup.Dye; + if (item.hairDye != (short) -1) + return ContentSamples.CreativeHelper.ItemGroup.HairDye; + if (item.IsACoin) + { + if (item.type == 71) + orderInGroup = 4; + else if (item.type == 72) + orderInGroup = 3; + else if (item.type == 73) + orderInGroup = 2; + else if (item.type == 74) + orderInGroup = 1; + return ContentSamples.CreativeHelper.ItemGroup.Coin; + } + if (item.createWall > 0) + return ContentSamples.CreativeHelper.ItemGroup.Walls; + if (item.createTile == 82) + return ContentSamples.CreativeHelper.ItemGroup.AlchemySeeds; + if (item.type == 315 || item.type == 313 || item.type == 316 || item.type == 318 || item.type == 314 || item.type == 2358 || item.type == 317) + return ContentSamples.CreativeHelper.ItemGroup.AlchemyPlants; + if (item.createTile == 30 || item.createTile == 321 || item.createTile == 322 || item.createTile == 157 || item.createTile == 158 || item.createTile == 208 || item.createTile == 159 || item.createTile == 253 || item.createTile == 311) + { + orderInGroup = item.createTile != 30 ? (item.createTile != 311 ? 50 : 100) : 0; + return ContentSamples.CreativeHelper.ItemGroup.Wood; + } + if (item.createTile >= 0) + { + if (item.type == 213) + { + orderInGroup = -1; + return ContentSamples.CreativeHelper.ItemGroup.Pickaxe; + } + if (item.tileWand >= 0) + return ContentSamples.CreativeHelper.ItemGroup.Wands; + if (item.createTile == 213 || item.createTile == 353 || item.createTile == 365 || item.createTile == 366 || item.createTile == 214) + return ContentSamples.CreativeHelper.ItemGroup.Rope; + if (!Main.tileSolid[item.createTile] || Main.tileSolidTop[item.createTile] || item.createTile == 10) + { + if (item.createTile == 4) + { + orderInGroup = item.placeStyle != 0 ? 10 : 5; + return ContentSamples.CreativeHelper.ItemGroup.Torches; + } + orderInGroup = item.createTile != 178 ? (item.createTile != 239 ? (item.type == 27 || item.type == 4857 || item.type == 4852 || item.type == 4856 || item.type == 4854 || item.type == 4855 || item.type == 4853 || item.type == 4851 ? 8 : (!TileID.Sets.Platforms[item.createTile] ? (item.createTile != 18 ? (item.createTile == 16 || item.createTile == 134 ? (item.placeStyle != 0 ? 40 : 39) : (item.createTile == 133 || item.createTile == 17 ? (item.placeStyle != 0 ? 50 : 49) : (item.createTile != 10 ? (item.createTile != 15 ? (item.createTile != 497 ? (item.createTile != 79 ? (item.createTile != 14 ? (item.createTile != 469 ? (item.createTile != 21 ? (item.createTile != 467 ? (item.createTile != 441 ? (item.createTile != 468 ? item.createTile + 1000 : 130) : 120) : 110) : (item.placeStyle != 0 ? 100 : 99)) : 90) : (item.placeStyle != 0 ? 80 : 79)) : (item.placeStyle != 0 ? 75 : 74)) : 72) : (item.placeStyle != 0 ? 70 : 69)) : (item.placeStyle != 0 ? 60 : 59)))) : (item.placeStyle != 0 ? 30 : 29)) : (item.placeStyle != 0 ? 20 : 19))) : 7) : 5; + return ContentSamples.CreativeHelper.ItemGroup.PlacableObjects; + } + orderInGroup = TileID.Sets.Conversion.Grass[item.createTile] || item.type == 194 ? 5 : 10000; + if (item.type == 2) + orderInGroup = 10; + else if (item.type == 3) + orderInGroup = 20; + else if (item.type == 133) + orderInGroup = 30; + else if (item.type == 424) + orderInGroup = 40; + else if (item.type == 1103) + orderInGroup = 50; + else if (item.type == 169) + orderInGroup = 60; + else if (item.type == 170) + orderInGroup = 70; + else if (item.type == 176) + orderInGroup = 80; + else if (item.type == 276) + orderInGroup = 80; + return ContentSamples.CreativeHelper.ItemGroup.Blocks; + } + if (item.mountType != -1) + return MountID.Sets.Cart[item.mountType] ? ContentSamples.CreativeHelper.ItemGroup.Minecart : ContentSamples.CreativeHelper.ItemGroup.Mount; + if (item.bait > 0) + { + orderInGroup = -item.bait; + return ContentSamples.CreativeHelper.ItemGroup.FishingBait; + } + if (item.makeNPC > (short) 0) + return ContentSamples.CreativeHelper.ItemGroup.Critters; + if (item.fishingPole > 1) + { + orderInGroup = -item.fishingPole; + return ContentSamples.CreativeHelper.ItemGroup.FishingRods; + } + if (item.questItem) + return ContentSamples.CreativeHelper.ItemGroup.FishingQuestFish; + if (item.type >= 2297 && item.type <= 2321 || item.type == 4402 || item.type == 4401 || item.type == 2290) + { + orderInGroup = -item.rare; + return ContentSamples.CreativeHelper.ItemGroup.FishingQuestFish; + } + int num3 = ItemID.Sets.SortingPriorityPainting[item.type]; + if (num3 != -1 || item.paint != (byte) 0) + { + orderInGroup = -num3; + return ContentSamples.CreativeHelper.ItemGroup.Paint; + } + int num4 = ContentSamples.CreativeHelper._manualBossSpawnItemsOrder.IndexOf(item.type); + if (num4 != -1) + { + orderInGroup = num4; + return ContentSamples.CreativeHelper.ItemGroup.BossItem; + } + int num5 = ContentSamples.CreativeHelper._manualEventItemsOrder.IndexOf(item.type); + if (num5 != -1) + { + orderInGroup = num5; + return ContentSamples.CreativeHelper.ItemGroup.EventItem; + } + if (item.shoot != 0 && Main.projHook[item.shoot]) + return ContentSamples.CreativeHelper.ItemGroup.Hook; + if (item.type == 2756 || item.type == 2351 || item.type == 4870 || item.type == 2350 || item.type == 2997 || item.type == 2352 || item.type == 2353) + return ContentSamples.CreativeHelper.ItemGroup.BuffPotion; + if (item.buffType != 0) + { + if (BuffID.Sets.IsWellFed[item.buffType]) + { + orderInGroup = -item.buffType * 10000000 - item.buffTime; + return ContentSamples.CreativeHelper.ItemGroup.Food; + } + if (BuffID.Sets.IsAFlaskBuff[item.buffType]) + return ContentSamples.CreativeHelper.ItemGroup.Flask; + if (Main.vanityPet[item.buffType] || Main.lightPet[item.buffType]) + return ContentSamples.CreativeHelper.ItemGroup.VanityPet; + if (item.damage == -1) + return ContentSamples.CreativeHelper.ItemGroup.BuffPotion; + } + if (item.headSlot >= 0) + { + orderInGroup = -item.defense; + orderInGroup -= item.rare * 1000; + if (item.vanity) + orderInGroup += 100000; + return ContentSamples.CreativeHelper.ItemGroup.Headgear; + } + if (item.bodySlot >= 0) + { + orderInGroup = -item.defense; + orderInGroup -= item.rare * 1000; + if (item.vanity) + orderInGroup += 100000; + return ContentSamples.CreativeHelper.ItemGroup.Torso; + } + if (item.legSlot >= 0) + { + orderInGroup = -item.defense; + orderInGroup -= item.rare * 1000; + if (item.vanity) + orderInGroup += 100000; + return ContentSamples.CreativeHelper.ItemGroup.Pants; + } + if (item.accessory) + { + orderInGroup = item.vanity.ToInt() - item.expert.ToInt(); + if (item.type >= 3293 && item.type <= 3308) + orderInGroup -= 200000; + else if (item.type >= 3309 && item.type <= 3314) + orderInGroup -= 100000; + orderInGroup -= item.rare * 10000; + if (item.vanity) + orderInGroup += 100000; + return ContentSamples.CreativeHelper.ItemGroup.Accessories; + } + if (item.pick > 0) + { + orderInGroup = -item.pick; + return ContentSamples.CreativeHelper.ItemGroup.Pickaxe; + } + if (item.axe > 0) + { + orderInGroup = -item.axe; + return ContentSamples.CreativeHelper.ItemGroup.Axe; + } + if (item.hammer > 0) + { + orderInGroup = -item.hammer; + return ContentSamples.CreativeHelper.ItemGroup.Hammer; + } + if (item.healLife > 0) + { + orderInGroup = item.type != 3544 ? (item.type != 499 ? (item.type != 188 ? (item.type != 28 ? -item.healLife + 1000 : 3) : 2) : 1) : 0; + return ContentSamples.CreativeHelper.ItemGroup.LifePotions; + } + if (item.healMana > 0) + { + orderInGroup = -item.healMana; + return ContentSamples.CreativeHelper.ItemGroup.ManaPotions; + } + if (item.ammo != AmmoID.None && !item.notAmmo && item.type != 23 && item.type != 75) + { + orderInGroup = -item.ammo * 10000; + orderInGroup += -item.damage; + return ContentSamples.CreativeHelper.ItemGroup.Ammo; + } + if (item.consumable) + { + if (item.damage > 0) + { + orderInGroup = item.type == 422 || item.type == 423 || item.type == 3477 ? -100000 : -item.damage; + return ContentSamples.CreativeHelper.ItemGroup.ConsumableThatDamages; + } + if (item.type == 4910 || item.type == 4829 || item.type == 4830) + orderInGroup = 10; + else if (item.type == 66 || item.type == 2886 || item.type == 67) + orderInGroup = -10; + else if (item.type >= 1874 && item.type <= 1905) + orderInGroup = 5; + return ContentSamples.CreativeHelper.ItemGroup.ConsumableThatDoesNotDamage; + } + if (item.damage > 0) + { + orderInGroup = -item.damage; + if (item.melee) + return ContentSamples.CreativeHelper.ItemGroup.MeleeWeapon; + if (item.ranged) + return ContentSamples.CreativeHelper.ItemGroup.RangedWeapon; + if (item.magic) + return ContentSamples.CreativeHelper.ItemGroup.MagicWeapon; + if (item.summon) + return ContentSamples.CreativeHelper.ItemGroup.SummonWeapon; + } + orderInGroup = -item.rare; + if (item.useStyle > 0) + return ContentSamples.CreativeHelper.ItemGroup.RemainingUseItems; + return item.material ? ContentSamples.CreativeHelper.ItemGroup.Material : ContentSamples.CreativeHelper.ItemGroup.EverythingElse; + } + + public static void SetCreativeMenuOrder() + { + List source1 = new List(); + for (int Type = 1; Type < 5045; ++Type) + { + Item obj = new Item(); + obj.SetDefaults(Type); + source1.Add(obj); + } + IOrderedEnumerable> source2 = source1.Select((Func) (x => new ContentSamples.CreativeHelper.ItemGroupAndOrderInGroup(x))).GroupBy((Func) (x => x.Group)).OrderBy, int>((Func, int>) (group => (int) group.Key)); + foreach (IEnumerable groupAndOrderInGroups in (IEnumerable>) source2) + { + foreach (ContentSamples.CreativeHelper.ItemGroupAndOrderInGroup groupAndOrderInGroup in groupAndOrderInGroups) + ContentSamples.ItemCreativeSortingId[groupAndOrderInGroup.ItemType] = groupAndOrderInGroup; + } + source2.SelectMany, ContentSamples.CreativeHelper.ItemGroupAndOrderInGroup>((Func, IEnumerable>) (group => (IEnumerable) group.ToList())).ToList(); + } + + public static bool ShouldRemoveFromList(Item item) => ItemID.Sets.Deprecated[item.type]; + + public enum ItemGroup + { + Coin = 10, // 0x0000000A + Torches = 20, // 0x00000014 + Glowsticks = 25, // 0x00000019 + Wood = 30, // 0x0000001E + Bombs = 40, // 0x00000028 + LifePotions = 50, // 0x00000032 + ManaPotions = 51, // 0x00000033 + BuffPotion = 52, // 0x00000034 + Flask = 53, // 0x00000035 + Food = 54, // 0x00000036 + Crates = 60, // 0x0000003C + BossBags = 70, // 0x00000046 + GoodieBags = 80, // 0x00000050 + AlchemyPlants = 83, // 0x00000053 + AlchemySeeds = 84, // 0x00000054 + DyeMaterial = 87, // 0x00000057 + BossItem = 90, // 0x0000005A + EventItem = 91, // 0x0000005B + ConsumableThatDoesNotDamage = 94, // 0x0000005E + Solutions = 95, // 0x0000005F + Ammo = 96, // 0x00000060 + ConsumableThatDamages = 97, // 0x00000061 + PlacableObjects = 100, // 0x00000064 + Blocks = 120, // 0x00000078 + Wands = 130, // 0x00000082 + Rope = 140, // 0x0000008C + Walls = 150, // 0x00000096 + Wiring = 200, // 0x000000C8 + Pickaxe = 500, // 0x000001F4 + Axe = 510, // 0x000001FE + Hammer = 520, // 0x00000208 + MeleeWeapon = 530, // 0x00000212 + RangedWeapon = 540, // 0x0000021C + MagicWeapon = 550, // 0x00000226 + SummonWeapon = 560, // 0x00000230 + Headgear = 600, // 0x00000258 + Torso = 610, // 0x00000262 + Pants = 620, // 0x0000026C + Accessories = 630, // 0x00000276 + Hook = 700, // 0x000002BC + Mount = 710, // 0x000002C6 + Minecart = 720, // 0x000002D0 + VanityPet = 800, // 0x00000320 + LightPet = 810, // 0x0000032A + Golf = 900, // 0x00000384 + Dye = 910, // 0x0000038E + HairDye = 920, // 0x00000398 + Paint = 930, // 0x000003A2 + FishingRods = 1000, // 0x000003E8 + FishingQuestFish = 1010, // 0x000003F2 + Fish = 1015, // 0x000003F7 + FishingBait = 1020, // 0x000003FC + Critters = 1030, // 0x00000406 + Keys = 2000, // 0x000007D0 + RemainingUseItems = 5000, // 0x00001388 + Material = 10000, // 0x00002710 + EverythingElse = 11000, // 0x00002AF8 + } + + public struct ItemGroupAndOrderInGroup + { + public int ItemType; + public ContentSamples.CreativeHelper.ItemGroup Group; + public int OrderInGroup; + + public ItemGroupAndOrderInGroup(Item item) + { + this.ItemType = item.type; + this.Group = ContentSamples.CreativeHelper.GetItemGroup(item, out this.OrderInGroup); + } + } + } + + public static class BestiaryHelper + { + public static List> GetSortedBestiaryEntriesList( + BestiaryDatabase database) + { + List commonFilters = BestiaryDatabaseNPCsPopulator.CommonTags.GetCommonInfoElementsForFilters(); + List> list = ContentSamples.NpcsByNetId.ToList>().OrderBy, int>((Func, int>) (x => ContentSamples.BestiaryHelper.GetBestiaryTownPriority(x.Value))).ThenBy, bool>((Func, bool>) (x => !x.Value.isLikeATownNPC)).ThenBy, int>((Func, int>) (x => ContentSamples.BestiaryHelper.GetBestiaryNormalGoldCritterPriority(x.Value))).ThenBy, bool>((Func, bool>) (x => !x.Value.CountsAsACritter)).ThenBy, int>((Func, int>) (x => ContentSamples.BestiaryHelper.GetBestiaryBossPriority(x.Value))).ThenBy, bool>((Func, bool>) (x => x.Value.boss || NPCID.Sets.ShouldBeCountedAsBoss[x.Value.type])).ThenBy, int>((Func, int>) (x => ContentSamples.BestiaryHelper.GetLowestBiomeGroupIndex(x.Value, database, commonFilters))).ThenBy, int>((Func, int>) (x => x.Value.aiStyle)).ThenBy, float>((Func, float>) (x => ContentSamples.BestiaryHelper.GetBestiaryPowerLevel(x.Value))).ThenBy, int>((Func, int>) (x => ContentSamples.BestiaryHelper.GetBestiaryStarsPriority(x.Value))).ToList>(); + list.RemoveAll((Predicate>) (x => ContentSamples.BestiaryHelper.ShouldHideBestiaryEntry(x.Value))); + return list; + } + + public static int GetLowestBiomeGroupIndex( + NPC npc, + BestiaryDatabase database, + List commonElements) + { + List info = database.FindEntryByNPCID(npc.netID).Info; + for (int index = commonElements.Count - 1; index >= 0; --index) + { + if (info.IndexOf(commonElements[index]) != -1) + return index; + } + return int.MaxValue; + } + + public static bool ShouldHideBestiaryEntry(NPC npc) + { + NPCID.Sets.NPCBestiaryDrawModifiers bestiaryDrawModifiers; + return NPCID.Sets.NPCBestiaryDrawOffset.TryGetValue(npc.netID, out bestiaryDrawModifiers) && bestiaryDrawModifiers.Hide; + } + + public static float GetBestiaryPowerLevel(NPC npc) => (float) (npc.damage + npc.defense + npc.lifeMax / 4); + + public static int GetBestiaryTownPriority(NPC npc) + { + int num = NPCID.Sets.TownNPCBestiaryPriority.IndexOf(npc.netID); + if (num == -1) + num = int.MaxValue; + return num; + } + + public static int GetBestiaryNormalGoldCritterPriority(NPC npc) + { + int num = NPCID.Sets.NormalGoldCritterBestiaryPriority.IndexOf(npc.netID); + if (num == -1) + num = int.MaxValue; + return num; + } + + public static int GetBestiaryBossPriority(NPC npc) => NPCID.Sets.BossBestiaryPriority.IndexOf(npc.netID); + + public static int GetBestiaryStarsPriority(NPC npc) => ContentSamples.NpcBestiaryRarityStars[npc.type]; + } + } +} diff --git a/ID/CustomCurrencyID.cs b/ID/CustomCurrencyID.cs new file mode 100644 index 0000000..f91e7e2 --- /dev/null +++ b/ID/CustomCurrencyID.cs @@ -0,0 +1,14 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.CustomCurrencyID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public class CustomCurrencyID + { + public const int None = -1; + public static int DefenderMedals = -1; + } +} diff --git a/ID/DustID.cs b/ID/DustID.cs new file mode 100644 index 0000000..cbb0395 --- /dev/null +++ b/ID/DustID.cs @@ -0,0 +1,160 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.DustID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public static class DustID + { + public const short Dirt = 0; + public const short Stone = 1; + public const short Grass = 2; + public const short GrassBlades = 3; + public const short TintableDust = 4; + public const short Blood = 5; + public const short Torch = 6; + public const short Iron = 8; + public const short Copper = 9; + public const short Gold = 10; + public const short Silver = 11; + public const short Cloud = 16; + public const short CorruptPlants = 17; + public const short CorruptGibs = 18; + public const short Bone = 26; + public const short Shadowflame = 27; + public const short WaterCandle = 29; + public const short Web = 30; + public const short Smoke = 31; + public const short Sand = 32; + public const short Lava = 35; + public const short JunglePlants = 40; + public const short TintableDustLighted = 43; + public const short HallowedPlants = 47; + public const short BlueTorch = 59; + public const short RedTorch = 60; + public const short GreenTorch = 61; + public const short PurpleTorch = 62; + public const short WhiteTorch = 63; + public const short YellowTorch = 64; + public const short DemonTorch = 65; + public const short RainbowTorch = 66; + public const short BlueCrystalShard = 68; + public const short PinkCrystalShard = 69; + public const short PurpleCrystalShard = 70; + public const short CursedTorch = 75; + public const short Ice = 80; + public const short Tin = 81; + public const short Lead = 82; + public const short Tungsten = 83; + public const short Platinum = 84; + public const short GreenMoss = 93; + public const short BrownMoss = 94; + public const short RedMoss = 95; + public const short BlueMoss = 96; + public const short PurpleMoss = 97; + public const short CrimsonPlants = 125; + public const short IceTorch = 135; + public const short Confetti = 139; + public const short Honey = 152; + public const short UltraBrightTorch = 156; + public const short OrangeTorch = 158; + public const short IchorTorch = 169; + public const short Fireworks = 219; + public const short Electric = 226; + public const short GoldFlame = 228; + public const short Vortex = 229; + public const short BoneTorch = 234; + public const short Marble = 236; + public const short Mothron = 237; + public const short MothronEgg = 238; + public const short Silk = 239; + public const short Granite = 240; + public const short MarblePot = 241; + public const short PinkTorch = 242; + public const short PinkSlime = 243; + public const short CopperCoin = 244; + public const short SilverCoin = 245; + public const short GoldCoin = 246; + public const short PlatinumCoin = 247; + public const short EnchantedNightcrawler = 248; + public const short Grubby = 249; + public const short Sluggy = 250; + public const short Buggy = 251; + public const short CrystalPulse = 254; + public const short CrystalPulse2 = 255; + public const short ToxicBubble = 256; + public const short BubbleBlock = 257; + public const short LavaMoss = 258; + public const short SolarFlare = 259; + public const short SparksMech = 260; + public const short AncientLight = 261; + public const short AmberBolt = 262; + public const short PortalBolt = 263; + public const short PortalBoltTrail = 264; + public const short LunarOre = 265; + public const short SomethingRed = 266; + public const short RainbowMk2 = 267; + public const short Sandstorm = 268; + public const short Sandnado = 269; + public const short FlameBurst = 270; + public const short HealingPlus = 271; + public const short WitherLightning = 272; + public const short GreenBlood = 273; + public const short ApprenticeStorm = 274; + public const short DungeonBlue = 275; + public const short DungeonGreen = 276; + public const short DungeonPink = 277; + public const short FireworksRGB = 278; + public const short SilverFlame = 279; + public const short BeachShell = 280; + public const short RedStarfish = 281; + public const short PinkStarfish = 282; + public const short YellowStarfish = 283; + public const short FoodPiece = 284; + public const short GolfPaticle = 285; + public const short OrangeStainedGlass = 286; + public const short DesertPot = 287; + public const short DesertWater2 = 288; + public const short SeaOatsOasis = 289; + public const short SeaOatsBeach = 290; + public const short OasisCactus = 291; + public const short YellowStarDust = 292; + public const short DesertTorch = 293; + public const short CoralTorch = 294; + public const short CorruptTorch = 295; + public const short CrimsonTorch = 296; + public const short HallowedTorch = 297; + public const short JungleTorch = 298; + public const short KryptonMoss = 299; + public const short XenonMoss = 300; + public const short ArgonMoss = 301; + public const short Terragrim = 302; + public const short SteampunkSteam = 303; + public const short Count = 304; + public const short t_BorealWood = 214; + public const short t_Slime = 4; + public const short t_SteampunkMetal = 8; + public const short t_LivingWood = 78; + public const short t_Honey = 147; + public const short t_Cactus = 40; + public const short t_Martian = 226; + public const short t_Meteor = 23; + public const short t_Granite = 240; + public const short t_Marble = 236; + public const short t_Crystal = 68; + public const short t_Golden = 10; + public const short t_PearlWood = 78; + public const short t_Lihzahrd = 148; + public const short t_Flesh = 5; + public const short t_Frozen = 80; + public const short GemAmethyst = 86; + public const short GemTopaz = 87; + public const short GemSapphire = 88; + public const short GemEmerald = 89; + public const short GemRuby = 90; + public const short GemDiamond = 91; + public const short GemAmber = 138; + } +} diff --git a/ID/ExtrasID.cs b/ID/ExtrasID.cs new file mode 100644 index 0000000..d38e592 --- /dev/null +++ b/ID/ExtrasID.cs @@ -0,0 +1,225 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.ExtrasID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public static class ExtrasID + { + public const short BrainScrambler = 0; + public const short Raygun = 1; + public const short LaserRuler = 2; + public const short AntiGravityHookChain = 3; + public const short SaucerDeathrayCap = 4; + public const short BGMartianUFOSmall = 5; + public const short BGMartianUFOBig = 6; + public const short EventIconSnowLegion = 7; + public const short EventIconFrostMoon = 8; + public const short EventIconGoblinArmy = 9; + public const short EventIconMartianMadness = 10; + public const short EventIconPirateInvasion = 11; + public const short EventIconPumpkinMoon = 12; + public const short MoonLordRibs = 13; + public const short MoonLordBackarm = 14; + public const short MoonLordForearm = 15; + public const short MoonLordCoreMoss = 16; + public const short MoonLordEyeWhiteHand = 17; + public const short MoonLordEyeWhiteHead = 18; + public const short MoonLordEye = 19; + public const short MartianProbeDiode = 20; + public const short PhantasmalDeathrayBody = 21; + public const short PhantasmalDeathrayEnd = 22; + public const short MoonLeechBody = 23; + public const short MoonLeechTail = 24; + public const short MoonLordMouth = 25; + public const short MoonLordHandMouth = 26; + public const short MartianProbeScanWave = 27; + public const short TEMPORARYChestOpen = 28; + public const short MoonLordEyeMouth = 29; + public const short CultistBossShadow = 30; + public const short WebbedFloor = 31; + public const short WebbedAir = 32; + public const short CultistLightingArc = 33; + public const short CultistRitual = 34; + public const short CultistIceshard = 35; + public const short StarWrath = 36; + public const short PlayerStoned = 37; + public const short BejeweledValkyrieWing = 38; + public const short KingSlimeCrown = 39; + public const short PirateShipFlag = 40; + public const short PirateShipOar = 41; + public const short PirateShipSail1 = 42; + public const short PirateShipSail2 = 43; + public const short PirateShipSail3 = 44; + public const short PirateShipSail4 = 45; + public const short StardustJellyfishSmall = 46; + public const short StardustTowerMark = 47; + public const short EmoteBubble = 48; + public const short ScreenObfuscation = 49; + public const short VortexBlack = 50; + public const short MagicAura = 51; + public const short GuideFrontal = 52; + public const short TravellingMerchantFrontal = 53; + public const short EquipIcons = 54; + public const short MeteorHeadFlame = 55; + public const short MartianWalkerCannon = 56; + public const short AncientLight = 57; + public const short DefenseShield = 58; + public const short PortalGateHalo = 59; + public const short PortalGateHalo2 = 60; + public const short SolarBlaze = 61; + public const short SolarBlaze2 = 62; + public const short SolarBlaze3 = 63; + public const short NebulaArcanumItemHold = 64; + public const short PhantasmMuzzle = 65; + public const short SuspiciousTentacle = 66; + public const short Yoraiz0rDarkness = 67; + public const short LaserGrid2 = 68; + public const short PartyBalloonsSmall = 69; + public const short PartyBalloonsBig = 70; + public const short PartyBalloonsTriplet = 71; + public const short TownNPCHats = 72; + public const short DjinnsCurse = 73; + public const short ForbiddenSign = 74; + public const short BlackBolt = 75; + public const short Tumbleweed = 76; + public const short ElfEars = 77; + public const short DD2ElderEye = 78; + public const short EventIconOldOnesArmy = 79; + public const short DD2SkeletonFlame = 80; + public const short DD2BetsyWingFront = 81; + public const short DD2BetsyWingBack = 82; + public const short DD2BallistraTowerT1 = 83; + public const short DD2BallistraTowerT2 = 84; + public const short DD2BallistraTowerT3 = 85; + public const short DD2LightningAuraT1 = 86; + public const short DD2LightningAuraT2 = 87; + public const short DD2LightningAuraT3 = 88; + public const short ThePerfectGlow = 89; + public const short ArkhalisMask = 90; + public const short FallingStar = 91; + public const short LawnMower = 92; + public const short VoidLensOutline = 93; + public const short MoneyTroughOutline = 94; + public const short AmberHookChain = 95; + public const short GolfCartBody = 96; + public const short GolfCartWheels = 97; + public const short SharpTears = 98; + public const short DripplerFlail = 99; + public const short BirdNestHead = 100; + public const short TombstoneGlow = 101; + public const short PortableStool = 102; + public const short KiteRibbons = 103; + public const short KiteRibbonsWyvern = 104; + public const short FloatingTube = 105; + public const short GolemLights4 = 106; + public const short GolemLights5 = 107; + public const short BeeMinecart = 108; + public const short LadybugMinecart = 109; + public const short PigronMinecart = 110; + public const short SunflowerMinecart = 111; + public const short HellMinecart = 112; + public const short WitchBroom = 113; + public const short WitchBroomTrinket = 114; + public const short ShroomMinecart = 115; + public const short ShroomMinecartGlow = 116; + public const short AmethystMinecart = 117; + public const short TopazMinecart = 118; + public const short SapphireMinecart = 119; + public const short EmeraldMinecart = 120; + public const short RubyMinecart = 121; + public const short DiamondMinecart = 122; + public const short AmberMinecart = 123; + public const short BeetleMinecart = 124; + public const short MeowmereMinecart = 125; + public const short PartyMinecart = 126; + public const short PirateMinecart = 127; + public const short SteampunkMinecart = 128; + public const short BloodNautilusMouth = 129; + public const short MapBiomeIcons = 130; + public const short BloodNautilusCallForHelp = 131; + public const short KiteRibbonsBoneSerpent = 132; + public const short KiteRibbonsWorldFeeder = 133; + public const short LanternSkyLanterns = 134; + public const short KiteRibbonsManEater = 135; + public const short KiteRibbonsJellyfishBlue = 136; + public const short KiteRibbonsJellyfishPink = 137; + public const short KiteRibbonsShark = 138; + public const short KiteRibbonsSandShark = 139; + public const short KiteRibbonsGoldfish = 140; + public const short PartyCartBalloons = 141; + public const short PirateMinecartFlag = 142; + public const short PlayerUnicornHorn = 143; + public const short KiteRibbonsAngryTrapper = 144; + public const short KiteRibbonsKoi = 145; + public const short KiteRibbonsCrawltipede = 146; + public const short KiteRibbonsSpectrum = 147; + public const short KiteRibbonsEyeball = 148; + public const short FlamingoMount = 149; + public const short CoffinMinecart = 150; + public const short CoffinMinecartLid = 151; + public const short SafemanSun = 152; + public const short JimCloak = 153; + public const short SquirrelHookChain = 154; + public const short DiggingMoleMinecart = 155; + public const short HallowBossGradient = 156; + public const short HallowBossWings = 157; + public const short HallowBossArmsLeft = 158; + public const short HallowBossWingsBack = 159; + public const short HallowBossArmsRight = 160; + public const short PaintedHorseMount = 161; + public const short MajesticHorseMount = 162; + public const short DarkHorseMount = 163; + public const short PogoStickMount = 164; + public const short DiggingMoleMinecartArm = 165; + public const short PirateShipMount = 166; + public const short SpookyWoodMount = 167; + public const short SantankMount = 168; + public const short WallOfFleshGoatMount = 169; + public const short DarkMageBookMount = 170; + public const short PlayerRainbowWings = 171; + public const short LavaSharkMount = 172; + public const short PotionOfReturnMinimapIcon = 173; + public const short KeybrandRing = 174; + public const short PotionOfReturnMinimapHome = 175; + public const short GolfBallMinimapOutline = 176; + public const short QueenSlimeCrown = 177; + public const short FairyQueenLance = 178; + public const short Voronoi = 179; + public const short QueenSlimeGradient = 180; + public const short PylonCrystals = 181; + public const short PylonMapIcons = 182; + public const short PotionOfReturnGateIn = 183; + public const short PotionOfReturnGateOut = 184; + public const short QueenSlimeWing = 185; + public const short QueenSlimeCrystalCore = 186; + public const short HallowBossTentacles = 187; + public const short HallowBossSkirt = 188; + public const short FlameLashTrailShape = 189; + public const short FlameLashTrailErosion = 190; + public const short FlameLashTrailColorGradient = 191; + public const short MagicMissileTrailColorGradient = 192; + public const short MagicMissileTrailErosion = 193; + public const short MagicMissileTrailShape = 194; + public const short RainbowRodTrailColorGradient = 195; + public const short RainbowRodTrailErosion = 196; + public const short RainbowRodTrailShape = 197; + public const short MasterTrophyHeads = 198; + public const short WhipMarkers = 199; + public const short IceWhipSlicerBody = 200; + public const short FinalFractal = 201; + public const short EmpressButterflyJar = 202; + public const short SlimeQueenHookChain = 203; + public const short QueenSlimeMount = 204; + public const short QueenSlimeSaddle = 205; + public const short QueenSlimeWingFront = 206; + public const short QueenSlimeWingBack = 207; + public const short QueenSlimeHookRope = 208; + public const short EmpressBladeTrail = 209; + public const short EmpressBladeErosion = 210; + public const short BiomeTorchIconUI = 211; + public const short Count = 212; + } +} diff --git a/ID/GameEventClearedID.cs b/ID/GameEventClearedID.cs new file mode 100644 index 0000000..1ca5cc9 --- /dev/null +++ b/ID/GameEventClearedID.cs @@ -0,0 +1,37 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.GameEventClearedID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public class GameEventClearedID + { + public const int DefeatedGoblinArmy = 0; + public const int DefeatedFrostArmy = 1; + public const int DefeatedPirates = 2; + public const int DefeatedMartians = 3; + public const int DefeatedHalloweenTree = 4; + public const int DefeatedHalloweenKing = 5; + public const int DefeatedGolem = 6; + public const int DefeatedFishron = 7; + public const int DefeatedQueenBee = 8; + public const int DefeatedAncientCultist = 9; + public const int DefeatedMoonlord = 10; + public const int DefeatedSlimeKing = 11; + public const int DefeatedPlantera = 12; + public const int DefeatedEyeOfCthulu = 13; + public const int DefeatedEaterOfWorldsOrBrainOfChtulu = 14; + public const int DefeatedSkeletron = 15; + public const int DefeatedDestroyer = 16; + public const int DefeatedTheTwins = 17; + public const int DefeatedSkeletronPrime = 18; + public const int DefeatedWallOfFleshAndStartedHardmode = 19; + public const int DefeatedIceQueen = 20; + public const int DefeatedChristmassTree = 21; + public const int DefeatedSantank = 22; + public const int DefeatedEmpressOfLight = 23; + public const int DefeatedQueenSlime = 24; + } +} diff --git a/ID/GameModeID.cs b/ID/GameModeID.cs new file mode 100644 index 0000000..72a512e --- /dev/null +++ b/ID/GameModeID.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.GameModeID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + internal class GameModeID + { + public const short Normal = 0; + public const short Expert = 1; + public const short Master = 2; + public const short Creative = 3; + } +} diff --git a/ID/GlowMaskID.cs b/ID/GlowMaskID.cs new file mode 100644 index 0000000..9b7819c --- /dev/null +++ b/ID/GlowMaskID.cs @@ -0,0 +1,316 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.GlowMaskID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public static class GlowMaskID + { + public const short FakeUser = -2; + public const short None = -1; + public const short UFOMinion = 0; + public const short VortexAxe = 1; + public const short VortexChainsawProjectile = 2; + public const short VortexDrillProjectile = 3; + public const short VortexHammer = 4; + public const short VortexPickaxe = 5; + public const short NebulaAxe = 6; + public const short NebulaChainsawProjectile = 7; + public const short NebulaDrillProjectile = 8; + public const short NebulaHammer = 9; + public const short NebulaPickaxe = 10; + public const short MartianOfficer = 11; + public const short NebulaArmorArm = 12; + public const short VortexArmorBody = 13; + public const short NebulaArmorBody = 14; + public const short VortexArmorHead = 15; + public const short NebulaArmorHead = 16; + public const short NebulaArmorLegs = 17; + public const short VortexArmorBodyFemale = 18; + public const short NebulaArmorBodyFemale = 19; + public const short VortexChainsawItem = 20; + public const short VortexDrillItem = 21; + public const short NebulaChainsawItem = 22; + public const short NebulaDrillItem = 23; + public const short BrainScrambler = 24; + public const short Electrified = 25; + public const short VortexItemHead = 26; + public const short VortexItemBody = 27; + public const short NebulaItemHead = 28; + public const short NebulaItemBody = 29; + public const short NebulaItemLegs = 30; + public const short MartianEngineer = 31; + public const short MartianTurret = 32; + public const short MartianDrone = 33; + public const short GigaZapper = 34; + public const short LaserMachinegun = 35; + public const short ElectrosphereLauncher = 36; + public const short ElectrosphereMissile = 37; + public const short Xenopopper = 38; + public const short LaserDrill = 39; + public const short LaserDrillTip = 40; + public const short MartianUniformArmorHead = 41; + public const short MartianUniformArmorBody = 42; + public const short MartianUniformArmorBodyFemale = 43; + public const short MartianUniformArmorArms = 44; + public const short MartianUnifromTorso = 45; + public const short MartianUniformHelmet = 46; + public const short LaserMachinegunItem = 47; + public const short MartianSaucer = 48; + public const short MartianSaucerCore = 49; + public const short MartianSaucerCannon = 50; + public const short MartianAstroClock = 51; + public const short MartianBathtub = 52; + public const short MartianBed = 53; + public const short MartianHoverChair = 54; + public const short MartianChandelier = 55; + public const short MartianChest = 56; + public const short MartianDoorClosed = 57; + public const short MartianDoorOpen = 58; + public const short MartianDresser = 59; + public const short MartianHolobookcase = 60; + public const short MartianHoverCandle = 61; + public const short MartianLamppost = 62; + public const short MartianLantern = 63; + public const short MartianPiano = 64; + public const short MartianPlatform = 65; + public const short MartianSofa = 66; + public const short MartianTable = 67; + public const short MartianTableLamp = 68; + public const short MartianWorkBench = 69; + public const short MartianAstroClockItem = 70; + public const short MartianBathtubItem = 71; + public const short MartianBedItem = 72; + public const short MartianHoverChairItem = 73; + public const short MartianChandelierItem = 74; + public const short MartianChestItem = 75; + public const short MartianDoorItem = 76; + public const short MartianDresserItem = 77; + public const short MartianHolobookcaseItem = 78; + public const short MartianHoverCandleItem = 79; + public const short MartianLamppostItem = 80; + public const short MartianLanternItem = 81; + public const short MartianPianoItem = 82; + public const short MartianPlatformItem = 83; + public const short MartianSofaItem = 84; + public const short MartianTableItem = 85; + public const short MartianTableLampItem = 86; + public const short MartianWorkBenchItem = 87; + public const short MartianSink = 88; + public const short MartianSinkItem = 89; + public const short BGMartianUFOSmall = 90; + public const short BGMartianUFOBig = 91; + public const short MothronWings = 92; + public const short MartianConduitPlatingItem = 93; + public const short MartianConduitPlatingTile = 94; + public const short MartianConduitWallItem = 95; + public const short HiTekSunglasses = 96; + public const short HiTekSunglassesItem = 97; + public const short MartianHairDye = 98; + public const short MartianArmorDye = 99; + public const short MartianProbe = 100; + public const short MartianProbeDiode = 101; + public const short ChargedBlasterCannon = 102; + public const short ChlorophyteDye = 103; + public const short PixieDye = 104; + public const short WispDye = 105; + public const short InfernalWispDye = 106; + public const short UnicornWispDye = 107; + public const short CultistTabletFront = 108; + public const short CultistTabletBack = 109; + public const short ShadowflameApparation = 110; + public const short MeteorBrick = 111; + public const short MeteorPlatform = 112; + public const short MeteorBathtub = 113; + public const short MeteorBed = 114; + public const short MeteorBookcase = 115; + public const short MeteorChair = 116; + public const short MeteorChest = 117; + public const short MeteorClock = 118; + public const short MeteorDoorOpen = 119; + public const short MeteorDresser = 120; + public const short MeteorPiano = 121; + public const short MeteorSink = 122; + public const short MeteorSofa = 123; + public const short MeteorTable = 124; + public const short MeteorWorkbench = 125; + public const short LavaMoss = 126; + public const short LongLavaMoss = 127; + public const short DeadlySphere = 128; + public const short LavaLamp = 129; + public const short LavaLampTile = 130; + public const short EnchantedNightcrawler = 131; + public const short LunarTowerStardust = 132; + public const short StardustWormBody = 133; + public const short StardustWormTail = 134; + public const short StardustWormHead = 135; + public const short StardustSoldier = 136; + public const short StardustSpiderSmall = 137; + public const short StardustSpiderBig = 138; + public const short StardustJellyfishBig = 139; + public const short StardustJellyfishSmall = 140; + public const short StardustCellBig = 141; + public const short StardustCellSmall = 142; + public const short LunarTowerNebula = 143; + public const short NebulaSoldier = 144; + public const short NebulaBeast = 145; + public const short NebulaHeadcrab = 146; + public const short NebulaBrain = 147; + public const short NebulaEye = 148; + public const short LunarTowerVortex = 149; + public const short VortexRifleman = 150; + public const short VortexSoldier = 151; + public const short VortexHornet = 152; + public const short VortexHornetQueen = 153; + public const short SolarSolenian = 154; + public const short SolarDrakoMire = 155; + public const short SolarDrakoMireRider = 156; + public const short SolarCrawltipedeHead = 157; + public const short SolarCrawltipedeBody = 158; + public const short SolarCrawltipedeTail = 159; + public const short SolarSroller = 160; + public const short SolarCorite = 161; + public const short LunarTowerSolar = 162; + public const short SolarSpearman = 163; + public const short MartianWalker = 164; + public const short MartianWalkerCannon = 165; + public const short Truffle = 166; + public const short Cyborg = 167; + public const short TruffleSpore = 168; + public const short DesertGhoulCorruption = 169; + public const short DesertGhoulCrimson = 170; + public const short DesertGhoulHallow = 171; + public const short DesertDjinn = 172; + public const short PortalGunProj = 173; + public const short StardustAxeItem = 174; + public const short StardustChainsawItem = 175; + public const short StardustDrillItem = 176; + public const short StardustHammerItem = 177; + public const short StardustPickaxeItem = 178; + public const short StardustChainsawProjectile = 179; + public const short StardustDrillProjectile = 180; + public const short WingsVortex = 181; + public const short WingsNebula = 182; + public const short WingsStardust = 183; + public const short ArmorStardustHead = 184; + public const short ArmorStardustBodyMale = 185; + public const short ArmorStardustBodyFemale = 186; + public const short ArmorStardustLegs = 187; + public const short ArmorStardustArm = 188; + public const short StardustCellMinion = 189; + public const short StardustCellMinionShot = 190; + public const short VortexBeaterItem = 191; + public const short VortexBeaterProj = 192; + public const short VortexBeaterRocket = 193; + public const short NebulaArcanumItem = 194; + public const short NebulaArcanumItemHold = 195; + public const short LunarHamaxeVortex = 196; + public const short LunarHamaxeNebula = 197; + public const short LunarHamaxeStardust = 198; + public const short VortexArmorLegs = 199; + public const short Phantasm = 200; + public const short LunarMonolith = 201; + public const short LunarCraftingStation = 202; + public const short LunarHookSolar = 203; + public const short LunarHookVortex = 204; + public const short LunarHookNebula = 205; + public const short LunarHookStardust = 206; + public const short NebulaBlaze = 207; + public const short JimsHead = 208; + public const short LokisHelm = 209; + public const short LokisBody = 210; + public const short LokisArm = 211; + public const short LokisLegs = 212; + public const short LokisWings = 213; + public const short WireBulb = 214; + public const short CannonTile = 215; + public const short SandElemental = 216; + public const short ForbiddenSign = 217; + public const short SpiritFlameItem = 218; + public const short BlackBolt = 219; + public const short BlackBoltEye = 220; + public const short DD2FlameBurstTowerT1 = 221; + public const short DD2FlameBurstTowerT2 = 222; + public const short DD2FlameBurstTowerT3 = 223; + public const short DD2WitherBeast = 224; + public const short DD2DarkMage = 225; + public const short DD2Betsy = 226; + public const short DD2SquireBetsySword = 227; + public const short DD2LightningAuraT1 = 228; + public const short DD2LightningAuraT2 = 229; + public const short DD2LightningAuraT3 = 230; + public const short MonkStaffT2 = 231; + public const short MonkStaffT3 = 232; + public const short MonkStaffT3Item = 233; + public const short BetsyBow = 234; + public const short DD2ExplosiveTrapT1 = 235; + public const short DD2ExplosiveTrapT2 = 236; + public const short DD2ExplosiveTrapT3 = 237; + public const short BetsysWrath = 238; + public const short DD2CrystalOrb = 239; + public const short ApprenticeDarkArmFlame = 240; + public const short ApprenticeDarkHeadFlame = 241; + public const short ValhallaKnightHead = 242; + public const short DefendersForge = 243; + public const short DefendersForgeItem = 244; + public const short ArkhalisHat = 245; + public const short ArkhalisShirt_Male = 246; + public const short ArkhalisShirt_Female = 247; + public const short ArkhalisShirt_Arm = 248; + public const short ArkhalisPants_Male = 249; + public const short ArkhalisPants_Female = 250; + public const short ArkhalisWings = 251; + public const short BoulderStaffOfEarth = 252; + public const short Everscream = 253; + public const short Santank = 254; + public const short HeadlessHorseman = 255; + public const short UltraBrightHelmet = 256; + public const short JackOLantern = 257; + public const short LavaMossBrick = 258; + public const short KryptonMoss = 259; + public const short KryptonMossBrick = 260; + public const short XenonMoss = 261; + public const short XenonMossBrick = 262; + public const short ArgonMoss = 263; + public const short ArgonMossBrick = 264; + public const short VoidMonolith = 265; + public const short ScarabBomb = 266; + public const short PlasmaLamp = 267; + public const short PinkFairyJar = 268; + public const short GreenFairyJar = 269; + public const short BlueFairyJar = 270; + public const short FirstFractal = 271; + public const short GroxTheGreatWings = 272; + public const short GroxTheGreatHelm = 273; + public const short GroxTheGreatGreaves = 274; + public const short DestroyerPet = 275; + public const short SkeletronPrimePet = 276; + public const short GolemPet = 277; + public const short PumpkingPet = 278; + public const short EverscreamPet = 279; + public const short FairyQueenPet = 280; + public const short MartianPet = 281; + public const short MoonLordPet = 282; + public const short SpookyWoodMount = 283; + public const short WallOfFleshGoatMount = 284; + public const short LavaSharkMount = 285; + public const short GemSquirrel = 286; + public const short GemBunny = 287; + public const short HellButterfly = 288; + public const short HellButterflyJar = 289; + public const short Lavafly = 290; + public const short LavaflyinaBottle = 291; + public const short MagmaSnail = 292; + public const short MagmaSnailCage = 293; + public const short BrazierSuspended = 294; + public const short VolcanoSmall = 295; + public const short VolcanoLarge = 296; + public const short PottedPlants2 = 297; + public const short PottedLavaPlants = 298; + public const short PottedLavaPlantTendrils = 299; + public const short TruffleWormCage = 300; + public const short Count = 301; + } +} diff --git a/ID/GoreID.cs b/ID/GoreID.cs new file mode 100644 index 0000000..bbbf78c --- /dev/null +++ b/ID/GoreID.cs @@ -0,0 +1,637 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.GoreID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public static class GoreID + { + public const int Smoke1 = 61; + public const int Smoke2 = 62; + public const int Smoke3 = 63; + public const int ChargedBlasterRing = 618; + public const int MoonLordHeart1 = 619; + public const int MoonLordHeart2 = 620; + public const int MoonLordHeart3 = 621; + public const int MoonLordHeart4 = 622; + public const int GoblinArcherHead = 623; + public const int GoblinArcherHand = 624; + public const int GoblinArcherLeg = 625; + public const int GoblinPeonHead = 626; + public const int GoblinPeonHand = 627; + public const int GoblinPeonLeg = 628; + public const int GoblinScoutHead = 629; + public const int GoblinScoutHand = 630; + public const int GoblinScoutLeg = 631; + public const int GoblinThiefHead = 632; + public const int GoblinThiefHand = 633; + public const int GoblinThiefLeg = 634; + public const int GoblinWarriorHead = 635; + public const int GoblinWarriorHand = 636; + public const int GoblinWarriorLeg = 637; + public const int SkeletonMerchantHead = 638; + public const int SkeletonMerchantBag = 639; + public const int SkeletonMerchantChunk1 = 640; + public const int SkeletonMerchantChunk2 = 641; + public const int SkeletonMerchantChunk3 = 642; + public const int ButcherHead = 643; + public const int ButcherSaw = 644; + public const int ButcherArm = 645; + public const int ButcherLeg = 646; + public const int CreatureFromTheDeepHead = 647; + public const int CreatureFromTheDeepArm = 648; + public const int CreatureFromTheDeepLeg = 649; + public const int FritzHead = 650; + public const int FritzArm = 651; + public const int FritzLeg = 652; + public const int NailheadHead = 653; + public const int NailheadArm = 654; + public const int NailheadLeg = 655; + public const int PsychoHead = 656; + public const int PsychoArm = 657; + public const int PsychoLeg = 658; + public const int PsychoKnife = 659; + public const int DeadlySphere1 = 660; + public const int DeadlySphere2 = 661; + public const int DrManFlyHead = 662; + public const int DrManFlyArm = 663; + public const int DrManFlyLeg = 664; + public const int ThePossessedHead = 665; + public const int ThePossessedArm = 666; + public const int ThePossessedLeg = 667; + public const int CrimsonBunnyHead = 668; + public const int CrimsonBunnyLeg = 669; + public const int CrimsonGoldfishHead = 670; + public const int CrimsonGoldfishTail = 671; + public const int CrimsonPenguinBody = 672; + public const int CrimsonPenguinHead = 673; + public const int CrimsonPenguinLeg = 674; + public const int GoblinSummonerHead = 675; + public const int GoblinSummonerArm = 676; + public const int GoblinSummonerItem = 677; + public const int GoblinSummonerLeg = 678; + public const int ShadowflameApparation = 679; + public const int ShadowflameApparation2 = 680; + public const int MothronSpawn1 = 681; + public const int MothronSpawn2 = 682; + public const int MothronSpawn3 = 683; + public const int MothronEgg1 = 684; + public const int MothronEgg2 = 685; + public const int MothronEgg3 = 686; + public const int Mothron1 = 687; + public const int Mothron2 = 688; + public const int Mothron3 = 689; + public const int Mothron4 = 690; + public const int Mothron5 = 691; + public const int MedusaHead = 692; + public const int MedusaArm = 693; + public const int MedusaLeg = 694; + public const int GreekSkeletonHead = 695; + public const int GreekSkeletonArm = 696; + public const int GreekSkeletonLeg = 697; + public const int GreekPot1 = 698; + public const int GreekPot2 = 699; + public const int GreekPot3 = 700; + public const int GreekPot4 = 701; + public const int GreekPot5 = 702; + public const int GreekPot6 = 703; + public const int ToxicFlask = 704; + public const int ToxicFlask2 = 705; + public const int WaterDrip = 706; + public const int WaterDripCorrupt = 707; + public const int WaterDripJungle = 708; + public const int WaterDripHallow = 709; + public const int WaterDripIce = 710; + public const int WaterDripDesert = 711; + public const int WaterDripUnderground = 712; + public const int WaterDripCavern = 713; + public const int WaterDripBlood = 714; + public const int WaterDripCrimson = 715; + public const int LavaDrip = 716; + public const int HoneyDrip = 717; + public const int GraniteGolemHead = 718; + public const int GraniteGolemBody = 719; + public const int GraniteGolemArm = 720; + public const int GraniteGolemLeg = 721; + public const int BloodZombieHead = 722; + public const int BloodZombieChunk = 723; + public const int BloodZombieChunk2 = 724; + public const int DripplerChunk = 725; + public const int DripplerChunk2 = 726; + public const int DripplerChunk3 = 727; + public const int LunarTablet1 = 728; + public const int LunarTablet2 = 729; + public const int LunarTablet3 = 730; + public const int LunarTablet4 = 731; + public const int LunarTablet5 = 732; + public const int LunarTablet6 = 733; + public const int KingSlimeCrown = 734; + public const int CrawDadClaw = 735; + public const int CrawDadEye = 736; + public const int CrawDad2Claw = 737; + public const int CrawDad2Eye = 738; + public const int GiantShelly = 739; + public const int GiantShelly2 = 740; + public const int SalamanderArm = 741; + public const int SalamanderHead = 750; + public const int SalamanderLeg = 759; + public const int TaxCollectorHead = 768; + public const int TaxCollectorArm = 769; + public const int TaxCollectorCane = 770; + public const int TaxCollectorLeg = 771; + public const int StardustSoldier1 = 772; + public const int StardustSoldier2 = 773; + public const int StardustSoldier3 = 774; + public const int StardustSpider1 = 775; + public const int StardustSpider2 = 776; + public const int StardustSpider3 = 777; + public const int StardustJellyfish1 = 778; + public const int StardustJellyfish2 = 779; + public const int StardustJellyfish3 = 780; + public const int StardustJellyfish4 = 781; + public const int NebulaBrain1 = 782; + public const int NebulaBrain2 = 783; + public const int NebulaBrain3 = 784; + public const int NebulaHeadcrab1 = 785; + public const int NebulaHeadcrab2 = 786; + public const int NebulaHeadcrab3 = 787; + public const int NebulaEye1 = 788; + public const int NebulaEye2 = 789; + public const int NebulaBeast1 = 790; + public const int NebulaBeast2 = 791; + public const int NebulaBeast3 = 792; + public const int NebulaSoldier1 = 793; + public const int NebulaSoldier2 = 794; + public const int NebulaSoldier3 = 795; + public const int VortexRifleman1 = 796; + public const int VortexRifleman2 = 797; + public const int VortexRifleman3 = 798; + public const int VortexHornetQueen1 = 799; + public const int VortexHornetQueen2 = 800; + public const int VortexHornetQueen3 = 801; + public const int VortexHornet1 = 802; + public const int VortexHornet2 = 803; + public const int VortexHornet3 = 804; + public const int VortexHornet4 = 805; + public const int VortexLarva1 = 806; + public const int VortexLarve2 = 807; + public const int VortexSoldier1 = 808; + public const int VortexSoldier2 = 809; + public const int VortexSoldier3 = 810; + public const int GiantWalkingAntlion1 = 811; + public const int GiantWalkingAntlion2 = 812; + public const int GiantWalkingAntlion3 = 813; + public const int GiantWalkingAntlion4 = 814; + public const int GiantFlyingAntlion1 = 815; + public const int GiantFlyingAntlion2 = 816; + public const int GiantFlyingAntlion3 = 817; + public const int GiantFlyingAntlion4 = 818; + public const int DuneSplicerHead = 819; + public const int DuneSplicerBody = 820; + public const int DuneSplicerTail = 821; + public const int TombCrawlerHead = 822; + public const int TombCrawlerBody = 823; + public const int TombCrawlerTail = 824; + public const int ChimneySmoke1 = 825; + public const int ChimneySmoke2 = 826; + public const int ChimneySmoke3 = 827; + public const int SolarWormHead = 828; + public const int SolarWormBody = 829; + public const int SolarWormTail = 830; + public const int SolarBeast1 = 831; + public const int SolarBeast2 = 832; + public const int SolarBeast3 = 833; + public const int SolarBeast4 = 834; + public const int SolarSpearman1 = 835; + public const int SolarSpearman2 = 836; + public const int SolarRoller1 = 837; + public const int SolarRoller2 = 838; + public const int SolarRoller3 = 839; + public const int SolarRoller4 = 840; + public const int SolarMeteor1 = 841; + public const int SolarMeteor2 = 842; + public const int SolarMeteor3 = 843; + public const int SolarSoldier1 = 844; + public const int SolarSoldier2 = 845; + public const int SolarSoldier3 = 846; + public const int SolarSoldier4 = 847; + public const int MartianWalker1 = 848; + public const int MartianWalker2 = 849; + public const int MartianWalker3 = 850; + public const int MartianWalker4 = 851; + public const int MartianWalker5 = 852; + public const int PirateShip1 = 853; + public const int PirateShip2 = 854; + public const int PirateShip3 = 855; + public const int PirateShip4 = 856; + public const int PirateShip5 = 857; + public const int PirateShip6 = 858; + public const int PirateShip7 = 859; + public const int PirateShip8 = 860; + public const int PirateShip9 = 861; + public const int PirateShip10 = 862; + public const int DesertGhoul1 = 863; + public const int DesertGhoul2 = 864; + public const int DesertGhoul3 = 865; + public const int DesertGhoul4 = 866; + public const int DesertGhoulCorruption1 = 867; + public const int DesertGhoulCorruption2 = 868; + public const int DesertGhoulCorruption3 = 869; + public const int DesertGhoulCorruption4 = 870; + public const int DesertGhoulCrimson1 = 871; + public const int DesertGhoulCrimson2 = 872; + public const int DesertGhoulCrimson3 = 873; + public const int DesertGhoulCrimson4 = 874; + public const int DesertLamia1 = 875; + public const int DesertLamia2 = 876; + public const int DesertLamia3 = 877; + public const int DesertLamia4 = 878; + public const int DesertGhoulHallow1 = 879; + public const int DesertGhoulHallow2 = 880; + public const int DesertGhoulHallow3 = 881; + public const int DesertGhoulHallow4 = 882; + public const int DesertScorpion1 = 883; + public const int DesertScorpion2 = 884; + public const int DesertScorpion3 = 885; + public const int DesertScorpion4 = 886; + public const int DesertScorpion5 = 887; + public const int DesertBeast1 = 888; + public const int DesertBeast2 = 889; + public const int DesertBeast3 = 890; + public const int DesertBeast4 = 891; + public const int PirateShip11 = 892; + public const int PirateShip12 = 893; + public const int DemonTaxCollectorHead = 894; + public const int DemonTaxCollectorArm = 895; + public const int DemonTaxCollectorLeg = 896; + public const int SquirrelRed = 897; + public const int MartianProbe1 = 898; + public const int MartianProbe2 = 899; + public const int Cultist1 = 900; + public const int Cultist2 = 901; + public const int CultistBoss1 = 902; + public const int CultistBoss2 = 903; + public const int GigaZapperHead = 904; + public const int GigaZapperHand = 905; + public const int GigaZapperLeg = 906; + public const int SillyBallonPink = 907; + public const int SillyBalloonPurple = 908; + public const int SillyBalloonGreen = 909; + public const int TreeLeaf_Normal = 910; + public const int TreeLeaf_Palm = 911; + public const int TreeLeaf_Mushroom = 912; + public const int TreeLeaf_Boreal = 913; + public const int TreeLeaf_Jungle = 914; + public const int TreeLeaf_Corruption = 915; + public const int TreeLeaf_Crimson = 916; + public const int TreeLeaf_Hallow = 917; + public const int TreeLeaf_HallowLast = 925; + public const int PartyHatBlue = 926; + public const int PartyHatDemolitionist = 927; + public const int PartyHatDyeTrader = 928; + public const int PartyHatMerchant = 929; + public const int PartyHatNurse = 930; + public const int PartyHatPainter = 931; + public const int PartyHatPirate = 932; + public const int PartyHatSanta = 933; + public const int PartyHatSkeletonMerchant = 934; + public const int PartyHatSteampunker = 935; + public const int PartyHatStylist = 936; + public const int PartyHatTravellingMerchant = 937; + public const int PartyHatWizard = 938; + public const int PartyHatPink = 939; + public const int PartyHatCyan = 940; + public const int PartyHatPurple = 941; + public const int PartyHatWhite = 942; + public const int SandDrip = 943; + public const int Sandshark1 = 944; + public const int Sandshark2 = 945; + public const int Sandshark3 = 946; + public const int Sandshark4 = 947; + public const int Sandshark1Corrupt = 948; + public const int Sandshark2Corrupt = 949; + public const int Sandshark3Corrupt = 950; + public const int Sandshark4Corrupt = 951; + public const int Sandshark1Crimson = 952; + public const int Sandshark2Crimson = 953; + public const int Sandshark3Crimson = 954; + public const int Sandshark4Crimson = 955; + public const int Sandshark1Hallowed = 956; + public const int Sandshark2Hallowed = 957; + public const int Sandshark3Hallowed = 958; + public const int Sandshark4Hallowed = 959; + public const int SandElemental1 = 960; + public const int SandElemental2 = 961; + public const int SandElemental3 = 962; + public const int SandElemental4 = 963; + public const int Tumbleweed1 = 964; + public const int Tumbleweed2 = 965; + public const int Tumbleweed3 = 966; + public const int Bartender1 = 967; + public const int Bartender2 = 968; + public const int Bartender3 = 969; + public const int DD2Skeleton1 = 970; + public const int DD2Skeleton2 = 971; + public const int DD2Skeleton3 = 972; + public const int DD2Skeleton4 = 973; + public const int DD2WyvernT1_1 = 974; + public const int DD2WyvernT1_2 = 975; + public const int DD2WyvernT1_3 = 976; + public const int DD2WyvernT1_4 = 977; + public const int DD2WyvernT1_5 = 978; + public const int DD2DrakinT3_1 = 979; + public const int DD2DrakinT3_2 = 980; + public const int DD2DrakinT3_3 = 981; + public const int DD2DrakinT3_4 = 982; + public const int DD2GoblinT1_1 = 983; + public const int DD2GoblinT1_2 = 984; + public const int DD2GoblinT1_3 = 985; + public const int DD2GoblinT1_4 = 986; + public const int DD2JavelinThrowerT1_1 = 987; + public const int DD2JavelinThrowerT1_2 = 988; + public const int DD2JavelinThrowerT1_3 = 989; + public const int DD2JavelinThrowerT1_4 = 990; + public const int DD2JavelinThrowerT1_5 = 991; + public const int DD2JavelinThrowerT1_6 = 992; + public const int DD2Kobold1 = 993; + public const int DD2Kobold2 = 994; + public const int DD2Kobold3 = 995; + public const int DD2Kobold4 = 996; + public const int LightningBugT3_1 = 997; + public const int LightningBugT3_2 = 998; + public const int LightningBugT3_3 = 999; + public const int DD2Ogre1 = 1000; + public const int DD2Ogre2 = 1001; + public const int DD2Ogre3 = 1002; + public const int DD2Ogre4 = 1003; + public const int DD2Ogre5 = 1004; + public const int DD2Ogre6 = 1005; + public const int DD2Ogre6Alt = 1006; + public const int Pages = 1007; + public const int PageScrap = 1008; + public const int DD2DarkMageT1_1 = 1009; + public const int DD2DarkMageT1_2 = 1010; + public const int DD2DarkMageT1_3 = 1011; + public const int DD2DarkMageT1_4 = 1012; + public const int DD2DarkMageT1_5 = 1013; + public const int DD2DarkMageT1_6 = 1014; + public const int DD2DarkMageT1_7 = 1015; + public const int DD2DarkMageT1_8 = 1016; + public const int DD2DarkMageT1_9 = 1017; + public const int DD2DarkMageT1_10 = 1018; + public const int DD2DarkMageT1_11 = 1019; + public const int DD2WitherBeast1 = 1020; + public const int DD2WitherBeast2 = 1021; + public const int DD2WitherBeast3 = 1022; + public const int DD2WitherBeast4 = 1023; + public const int OgreSpit1 = 1024; + public const int OgreSpit2 = 1025; + public const int OgreSpit3 = 1026; + public const int DD2Crystal1 = 1027; + public const int DD2Crystal2 = 1028; + public const int DD2Crystal3 = 1029; + public const int DD2Crystal4 = 1030; + public const int DD2GoblinBomberT1_1 = 1031; + public const int DD2GoblinBomberT1_2 = 1032; + public const int DD2GoblinBomberT1_3 = 1033; + public const int DD2GoblinBomberT2_1 = 1034; + public const int DD2GoblinBomberT2_2 = 1035; + public const int DD2GoblinBomberT2_3 = 1036; + public const int DD2GoblinBomberT3_1 = 1037; + public const int DD2GoblinBomberT3_2 = 1038; + public const int DD2GoblinBomberT3_3 = 1039; + public const int DD2WyvernT2_1 = 1040; + public const int DD2WyvernT2_2 = 1041; + public const int DD2WyvernT2_3 = 1042; + public const int DD2WyvernT2_4 = 1043; + public const int DD2WyvernT2_5 = 1044; + public const int DD2WyvernT3_1 = 1045; + public const int DD2WyvernT3_2 = 1046; + public const int DD2WyvernT3_3 = 1047; + public const int DD2WyvernT3_4 = 1048; + public const int DD2WyvernT3_5 = 1049; + public const int DD2KoboldFlyerT2_1 = 1050; + public const int DD2KoboldFlyerT2_2 = 1051; + public const int DD2KoboldFlyerT2_3 = 1052; + public const int DD2KoboldFlyerT2_4 = 1053; + public const int DD2KoboldFlyerT2_5 = 1054; + public const int DD2JavelinThrowerT2_1 = 1055; + public const int DD2JavelinThrowerT2_2 = 1056; + public const int DD2JavelinThrowerT2_3 = 1057; + public const int DD2JavelinThrowerT2_4 = 1058; + public const int DD2JavelinThrowerT2_5 = 1059; + public const int DD2JavelinThrowerT2_6 = 1060; + public const int DD2JavelinThrowerT3_1 = 1061; + public const int DD2JavelinThrowerT3_2 = 1062; + public const int DD2JavelinThrowerT3_3 = 1063; + public const int DD2JavelinThrowerT3_4 = 1064; + public const int DD2JavelinThrowerT3_5 = 1065; + public const int DD2JavelinThrowerT3_6 = 1066; + public const int DD2GoblinT2_1 = 1067; + public const int DD2GoblinT2_2 = 1068; + public const int DD2GoblinT2_3 = 1069; + public const int DD2GoblinT2_4 = 1070; + public const int DD2GoblinT3_1 = 1071; + public const int DD2GoblinT3_2 = 1072; + public const int DD2GoblinT3_3 = 1073; + public const int DD2GoblinT3_4 = 1074; + public const int DD2DrakinT2_1 = 1075; + public const int DD2DrakinT2_2 = 1076; + public const int DD2DrakinT2_3 = 1077; + public const int DD2DrakinT2_4 = 1078; + public const int DD2BetsyTail = 1079; + public const int DD2BetsyFoot = 1080; + public const int DD2BetsyHead = 1081; + public const int DD2BetsyBody = 1082; + public const int DD2BetsyWing1 = 1083; + public const int DD2BetsyWing2 = 1084; + public const int DD2BetsyHand = 1085; + public const int DD2BetsyButt = 1086; + public const int AmbientFloorCloud1 = 1087; + public const int AmbientFloorCloud2 = 1088; + public const int AmbientFloorCloud3 = 1089; + public const int AmbientFloorCloud4 = 1090; + public const int AmbientAirborneCloud1 = 1091; + public const int AmbientAirborneCloud2 = 1092; + public const int AmbientAirborneCloud3 = 1093; + public const int WalkingAntlion1 = 1094; + public const int WalkingAntlion2 = 1095; + public const int WalkingAntlion3 = 1096; + public const int WalkingAntlion4 = 1097; + public const int FlyingAntlion1 = 1098; + public const int FlyingAntlion2 = 1099; + public const int FlyingAntlion3 = 1100; + public const int FlyingAntlion4 = 1101; + public const int LarvaeAntlion1 = 1102; + public const int LarvaeAntlion2 = 1103; + public const short EyeballFlyingFish1 = 1104; + public const short EyeballFlyingFish2 = 1105; + public const short ZombieMerman1 = 1106; + public const short ZombieMerman2 = 1107; + public const short ZombieMerman3 = 1108; + public const short Golfer1 = 1109; + public const short Golfer2 = 1110; + public const short Golfer3 = 1111; + public const short Golfer4 = 1112; + public const int TreeLeaf_HallowJim = 1113; + public const int TreeLeaf_HallowLastJim = 1121; + public const short DesertPot1 = 1122; + public const short DesertPot2 = 1123; + public const short DesertPot3 = 1124; + public const short Balloon_White_1 = 1125; + public const short Balloon_White_2 = 1126; + public const short Balloon_White_3 = 1127; + public const short Balloon_Red_1 = 1128; + public const short Balloon_Red_2 = 1129; + public const short Balloon_Red_3 = 1130; + public const short Balloon_Orange_1 = 1131; + public const short Balloon_Orange_2 = 1132; + public const short Balloon_Orange_3 = 1133; + public const short Balloon_Yellow_1 = 1134; + public const short Balloon_Yellow_2 = 1135; + public const short Balloon_Yellow_3 = 1136; + public const short Balloon_Green_1 = 1137; + public const short Balloon_Green_2 = 1138; + public const short Balloon_Green_3 = 1139; + public const short Balloon_Blue_1 = 1140; + public const short Balloon_Blue_2 = 1141; + public const short Balloon_Blue_3 = 1142; + public const short Balloon_Purple_1 = 1143; + public const short Balloon_Purple_2 = 1144; + public const short Balloon_Purple_3 = 1145; + public const short Balloon_String = 1146; + public const int WaterDripDesert2 = 1147; + public const int Ladybug1 = 1148; + public const int Ladybug2 = 1149; + public const int Seagull1 = 1150; + public const int Seagull2 = 1151; + public const int Pupfish1 = 1152; + public const int Pupfish2 = 1153; + public const int Grebe1 = 1154; + public const int Grebe2 = 1155; + public const int Grebe3 = 1156; + public const int Rat1 = 1157; + public const int Rat2 = 1158; + public const int Rat3 = 1159; + public const int EbonsandDrip = 1160; + public const int CrimsandDrip = 1161; + public const int PearlsandDrip = 1162; + public const int LittleRat1 = 1163; + public const int Owl1 = 1164; + public const int Owl2 = 1165; + public const short Turtle1 = 1166; + public const short Turtle2 = 1167; + public const short Turtle3 = 1168; + public const short TurtleJungle1 = 1169; + public const short TurtleJungle2 = 1170; + public const short TurtleJungle3 = 1171; + public const short BloodNautilus1 = 1172; + public const short BloodNautilus2 = 1173; + public const short BloodNautilus3 = 1174; + public const short BloodNautilus4 = 1175; + public const short BloodNautilus5 = 1176; + public const short BloodNautilus6 = 1177; + public const short BloodNautilus7 = 1178; + public const short BloodSquid1 = 1179; + public const short BloodSquid2 = 1180; + public const short BloodSquid3 = 1181; + public const short BloodSquid4 = 1182; + public const short GoblinShark1 = 1183; + public const short GoblinShark2 = 1184; + public const short GoblinShark3 = 1185; + public const short GoblinShark4 = 1186; + public const short BloodEel1 = 1187; + public const short BloodEel2 = 1188; + public const short BloodEel3 = 1189; + public const short Gnome1 = 1190; + public const short Gnome2 = 1191; + public const short Gnome3 = 1192; + public const short Gnome4 = 1193; + public const short SeaTurtle1 = 1194; + public const short SeaTurtle2 = 1195; + public const short SeaTurtle3 = 1196; + public const short Seahorse1 = 1197; + public const short Dolphin1 = 1198; + public const short Dolphin2 = 1199; + public const short Dolphin3 = 1200; + public const short ChumBucket = 1201; + public const int FogMachineCloud1 = 1202; + public const int FogMachineCloud2 = 1203; + public const int FogMachineCloud3 = 1204; + public const int Dandelion1 = 1205; + public const int Dandelion2 = 1206; + public const int Dandelion3 = 1207; + public const int ChumBucketFloatingChunks = 1208; + public const int SparkleGuitar = 1209; + public const int RockGolem1 = 1210; + public const int RockGolem2 = 1211; + public const int RockGolem3 = 1212; + public const int RockGolem4 = 1213; + public const int MaggotZombie1 = 1214; + public const int MaggotZombie2 = 1215; + public const int MaggotZombie3 = 1216; + public const int MaggotZombieMaggotPieces = 1217; + public const int ShadowMimicCoins = 1218; + public const int BestiaryGirl1 = 1219; + public const int BestiaryGirl2 = 1220; + public const int BestiaryGirl3 = 1221; + public const int BestiaryGirl4 = 1222; + public const int BestiaryGirlFox1 = 1223; + public const int BestiaryGirlFox2 = 1224; + public const int LightningBunnySparks = 1225; + public const int KingSlimePetCrown = 1226; + public const int GemSquirrelAmethyst = 1227; + public const int GemSquirrelTopaz = 1228; + public const int GemSquirrelSapphire = 1229; + public const int GemSquirrelEmerald = 1230; + public const int GemSquirrelRuby = 1231; + public const int GemSquirrelDiamond = 1232; + public const int GemSquirrelAmber = 1233; + public const int GemBunnyAmethystHead = 1234; + public const int GemBunnyAmethystBack = 1235; + public const int GemBunnyTopazHead = 1236; + public const int GemBunnyTopazBack = 1237; + public const int GemBunnySapphireHead = 1238; + public const int GemBunnySapphireBack = 1239; + public const int GemBunnyEmeraldHead = 1240; + public const int GemBunnyEmeraldBack = 1241; + public const int GemBunnyRubyHead = 1242; + public const int GemBunnyRubyBack = 1243; + public const int GemBunnyDiamondHead = 1244; + public const int GemBunnyDiamondBack = 1245; + public const int GemBunnyAmberHead = 1246; + public const int GemBunnyAmberBack = 1247; + public const int TreeLeaf_VanityTreeSakura = 1248; + public const int TreeLeaf_GemTreeTopaz = 1249; + public const int TreeLeaf_GemTreeAmethyst = 1250; + public const int TreeLeaf_GemTreeSapphire = 1251; + public const int TreeLeaf_GemTreeEmerald = 1252; + public const int TreeLeaf_GemTreeRuby = 1253; + public const int TreeLeaf_GemTreeDiamond = 1254; + public const int TreeLeaf_GemTreeAmber = 1255; + public const int MagmaSnailShell = 1256; + public const int TreeLeaf_VanityTreeYellowWillow = 1257; + public const int QueenSlimeCrown = 1258; + public const int QueenSlimeWing = 1259; + public const int QueenSlimeMinionPurpleWing = 1260; + public const int QueenSlimePetCrown = 1261; + public const int HallowBoss1 = 1262; + public const int HallowBoss2 = 1263; + public const int HallowBoss3 = 1264; + public const int HallowBoss4 = 1265; + public const int HallowBoss5 = 1266; + public const int HallowBoss6 = 1267; + public const int HallowBoss7 = 1268; + public const short Count = 1269; + + public static class Sets + { + public static SetFactory Factory = new SetFactory(1269); + public static int[] SpecialAI = GoreID.Sets.Factory.CreateIntSet(0, 860, 1, 892, 1, 893, 1, 825, 2, 826, 2, 827, 2, 1014, 1, 1015, 1, 1016, 1, 910, 3, 911, 3, 912, 3, 913, 3, 914, 3, 915, 3, 916, 3, 917, 3, 918, 3, 919, 3, 920, 3, 921, 3, 922, 3, 923, 3, 924, 3, 925, 3, 1113, 3, 1114, 3, 1115, 3, 1116, 3, 1117, 3, 1118, 3, 1119, 3, 1120, 3, 1121, 3, 1248, 3, 1249, 3, 1250, 3, 1251, 3, 1252, 3, 1253, 3, 1254, 3, 1255, 3, 1257, 3, 1007, 3, 1008, 3, 1087, 4, 1088, 4, 1089, 4, 1090, 4, 1091, 5, 1092, 5, 1093, 5, 1202, 6, 1203, 6, 1204, 6, 1225, 7); + public static int[] DisappearSpeed = GoreID.Sets.Factory.CreateIntSet(1, 1007, 3, 1008, 10, 1024, 7, 1025, 7, 1026, 7); + public static int[] DisappearSpeedAlpha = GoreID.Sets.Factory.CreateIntSet(1, 1007, 3, 1008, 10, 1024, 7, 1025, 7, 1026, 7, 1218, 3); + } + } +} diff --git a/ID/HousingCategoryID.cs b/ID/HousingCategoryID.cs new file mode 100644 index 0000000..5ede5b0 --- /dev/null +++ b/ID/HousingCategoryID.cs @@ -0,0 +1,14 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.HousingCategoryID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public class HousingCategoryID + { + public const int CommonNPCs = 0; + public const int PetNPCs = 1; + } +} diff --git a/ID/InvasionID.cs b/ID/InvasionID.cs new file mode 100644 index 0000000..5c3e56d --- /dev/null +++ b/ID/InvasionID.cs @@ -0,0 +1,22 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.InvasionID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public static class InvasionID + { + public const short CachedInvasions = 3; + public const short CachedFrostMoon = 1; + public const short CachedPumpkinMoon = 2; + public const short CachedOldOnesArmy = 3; + public const short None = 0; + public const short GoblinArmy = 1; + public const short SnowLegion = 2; + public const short PirateInvasion = 3; + public const short MartianMadness = 4; + public const short Count = 5; + } +} diff --git a/ID/ItemAlternativeFunctionID.cs b/ID/ItemAlternativeFunctionID.cs new file mode 100644 index 0000000..a8d3882 --- /dev/null +++ b/ID/ItemAlternativeFunctionID.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.ItemAlternativeFunctionID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public static class ItemAlternativeFunctionID + { + public const int None = 0; + public const int ShouldBeActivated = 1; + public const int ActivatedAndUsed = 2; + } +} diff --git a/ID/ItemHoldStyleID.cs b/ID/ItemHoldStyleID.cs new file mode 100644 index 0000000..ef26a4a --- /dev/null +++ b/ID/ItemHoldStyleID.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.ItemHoldStyleID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public class ItemHoldStyleID + { + public const int None = 0; + public const int HoldFront = 1; + public const int HoldUp = 2; + public const int HoldHeavy = 3; + public const int HoldGolfClub = 4; + public const int HoldGuitar = 5; + public const int HoldLamp = 6; + } +} diff --git a/ID/ItemID.cs b/ID/ItemID.cs new file mode 100644 index 0000000..50bffb8 --- /dev/null +++ b/ID/ItemID.cs @@ -0,0 +1,8897 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.ItemID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Reflection; +using System.Collections.Generic; +using Terraria.DataStructures; + +namespace Terraria.ID +{ + public class ItemID + { + private static Dictionary _legacyItemLookup; + public static readonly IdDictionary Search = IdDictionary.Create(); + public const short YellowPhasesaberOld = -24; + public const short WhitePhasesaberOld = -23; + public const short PurplePhasesaberOld = -22; + public const short GreenPhasesaberOld = -21; + public const short RedPhasesaberOld = -20; + public const short BluePhasesaberOld = -19; + public const short PlatinumBowOld = -48; + public const short PlatinumHammerOld = -47; + public const short PlatinumAxeOld = -46; + public const short PlatinumShortswordOld = -45; + public const short PlatinumBroadswordOld = -44; + public const short PlatinumPickaxeOld = -43; + public const short TungstenBowOld = -42; + public const short TungstenHammerOld = -41; + public const short TungstenAxeOld = -40; + public const short TungstenShortswordOld = -39; + public const short TungstenBroadswordOld = -38; + public const short TungstenPickaxeOld = -37; + public const short LeadBowOld = -36; + public const short LeadHammerOld = -35; + public const short LeadAxeOld = -34; + public const short LeadShortswordOld = -33; + public const short LeadBroadswordOld = -32; + public const short LeadPickaxeOld = -31; + public const short TinBowOld = -30; + public const short TinHammerOld = -29; + public const short TinAxeOld = -28; + public const short TinShortswordOld = -27; + public const short TinBroadswordOld = -26; + public const short TinPickaxeOld = -25; + public const short CopperBowOld = -18; + public const short CopperHammerOld = -17; + public const short CopperAxeOld = -16; + public const short CopperShortswordOld = -15; + public const short CopperBroadswordOld = -14; + public const short CopperPickaxeOld = -13; + public const short SilverBowOld = -12; + public const short SilverHammerOld = -11; + public const short SilverAxeOld = -10; + public const short SilverShortswordOld = -9; + public const short SilverBroadswordOld = -8; + public const short SilverPickaxeOld = -7; + public const short GoldBowOld = -6; + public const short GoldHammerOld = -5; + public const short GoldAxeOld = -4; + public const short GoldShortswordOld = -3; + public const short GoldBroadswordOld = -2; + public const short GoldPickaxeOld = -1; + public const short None = 0; + public const short IronPickaxe = 1; + public const short DirtBlock = 2; + public const short StoneBlock = 3; + public const short IronBroadsword = 4; + public const short Mushroom = 5; + public const short IronShortsword = 6; + public const short IronHammer = 7; + public const short Torch = 8; + public const short Wood = 9; + public const short IronAxe = 10; + public const short IronOre = 11; + public const short CopperOre = 12; + public const short GoldOre = 13; + public const short SilverOre = 14; + public const short CopperWatch = 15; + public const short SilverWatch = 16; + public const short GoldWatch = 17; + public const short DepthMeter = 18; + public const short GoldBar = 19; + public const short CopperBar = 20; + public const short SilverBar = 21; + public const short IronBar = 22; + public const short Gel = 23; + public const short WoodenSword = 24; + public const short WoodenDoor = 25; + public const short StoneWall = 26; + public const short Acorn = 27; + public const short LesserHealingPotion = 28; + public const short LifeCrystal = 29; + public const short DirtWall = 30; + public const short Bottle = 31; + public const short WoodenTable = 32; + public const short Furnace = 33; + public const short WoodenChair = 34; + public const short IronAnvil = 35; + public const short WorkBench = 36; + public const short Goggles = 37; + public const short Lens = 38; + public const short WoodenBow = 39; + public const short WoodenArrow = 40; + public const short FlamingArrow = 41; + public const short Shuriken = 42; + public const short SuspiciousLookingEye = 43; + public const short DemonBow = 44; + public const short WarAxeoftheNight = 45; + public const short LightsBane = 46; + public const short UnholyArrow = 47; + public const short Chest = 48; + public const short BandofRegeneration = 49; + public const short MagicMirror = 50; + public const short JestersArrow = 51; + public const short AngelStatue = 52; + public const short CloudinaBottle = 53; + public const short HermesBoots = 54; + public const short EnchantedBoomerang = 55; + public const short DemoniteOre = 56; + public const short DemoniteBar = 57; + public const short Heart = 58; + public const short CorruptSeeds = 59; + public const short VileMushroom = 60; + public const short EbonstoneBlock = 61; + public const short GrassSeeds = 62; + public const short Sunflower = 63; + public const short Vilethorn = 64; + public const short Starfury = 65; + public const short PurificationPowder = 66; + public const short VilePowder = 67; + public const short RottenChunk = 68; + public const short WormTooth = 69; + public const short WormFood = 70; + public const short CopperCoin = 71; + public const short SilverCoin = 72; + public const short GoldCoin = 73; + public const short PlatinumCoin = 74; + public const short FallenStar = 75; + public const short CopperGreaves = 76; + public const short IronGreaves = 77; + public const short SilverGreaves = 78; + public const short GoldGreaves = 79; + public const short CopperChainmail = 80; + public const short IronChainmail = 81; + public const short SilverChainmail = 82; + public const short GoldChainmail = 83; + public const short GrapplingHook = 84; + public const short Chain = 85; + public const short ShadowScale = 86; + public const short PiggyBank = 87; + public const short MiningHelmet = 88; + public const short CopperHelmet = 89; + public const short IronHelmet = 90; + public const short SilverHelmet = 91; + public const short GoldHelmet = 92; + public const short WoodWall = 93; + public const short WoodPlatform = 94; + public const short FlintlockPistol = 95; + public const short Musket = 96; + public const short MusketBall = 97; + public const short Minishark = 98; + public const short IronBow = 99; + public const short ShadowGreaves = 100; + public const short ShadowScalemail = 101; + public const short ShadowHelmet = 102; + public const short NightmarePickaxe = 103; + public const short TheBreaker = 104; + public const short Candle = 105; + public const short CopperChandelier = 106; + public const short SilverChandelier = 107; + public const short GoldChandelier = 108; + public const short ManaCrystal = 109; + public const short LesserManaPotion = 110; + public const short BandofStarpower = 111; + public const short FlowerofFire = 112; + public const short MagicMissile = 113; + public const short DirtRod = 114; + public const short ShadowOrb = 115; + public const short Meteorite = 116; + public const short MeteoriteBar = 117; + public const short Hook = 118; + public const short Flamarang = 119; + public const short MoltenFury = 120; + public const short FieryGreatsword = 121; + public const short MoltenPickaxe = 122; + public const short MeteorHelmet = 123; + public const short MeteorSuit = 124; + public const short MeteorLeggings = 125; + public const short BottledWater = 126; + public const short SpaceGun = 127; + public const short RocketBoots = 128; + public const short GrayBrick = 129; + public const short GrayBrickWall = 130; + public const short RedBrick = 131; + public const short RedBrickWall = 132; + public const short ClayBlock = 133; + public const short BlueBrick = 134; + public const short BlueBrickWall = 135; + public const short ChainLantern = 136; + public const short GreenBrick = 137; + public const short GreenBrickWall = 138; + public const short PinkBrick = 139; + public const short PinkBrickWall = 140; + public const short GoldBrick = 141; + public const short GoldBrickWall = 142; + public const short SilverBrick = 143; + public const short SilverBrickWall = 144; + public const short CopperBrick = 145; + public const short CopperBrickWall = 146; + public const short Spike = 147; + public const short WaterCandle = 148; + public const short Book = 149; + public const short Cobweb = 150; + public const short NecroHelmet = 151; + public const short NecroBreastplate = 152; + public const short NecroGreaves = 153; + public const short Bone = 154; + public const short Muramasa = 155; + public const short CobaltShield = 156; + public const short AquaScepter = 157; + public const short LuckyHorseshoe = 158; + public const short ShinyRedBalloon = 159; + public const short Harpoon = 160; + public const short SpikyBall = 161; + public const short BallOHurt = 162; + public const short BlueMoon = 163; + public const short Handgun = 164; + public const short WaterBolt = 165; + public const short Bomb = 166; + public const short Dynamite = 167; + public const short Grenade = 168; + public const short SandBlock = 169; + public const short Glass = 170; + public const short Sign = 171; + public const short AshBlock = 172; + public const short Obsidian = 173; + public const short Hellstone = 174; + public const short HellstoneBar = 175; + public const short MudBlock = 176; + public const short Sapphire = 177; + public const short Ruby = 178; + public const short Emerald = 179; + public const short Topaz = 180; + public const short Amethyst = 181; + public const short Diamond = 182; + public const short GlowingMushroom = 183; + public const short Star = 184; + public const short IvyWhip = 185; + public const short BreathingReed = 186; + public const short Flipper = 187; + public const short HealingPotion = 188; + public const short ManaPotion = 189; + public const short BladeofGrass = 190; + public const short ThornChakram = 191; + public const short ObsidianBrick = 192; + public const short ObsidianSkull = 193; + public const short MushroomGrassSeeds = 194; + public const short JungleGrassSeeds = 195; + public const short WoodenHammer = 196; + public const short StarCannon = 197; + public const short BluePhaseblade = 198; + public const short RedPhaseblade = 199; + public const short GreenPhaseblade = 200; + public const short PurplePhaseblade = 201; + public const short WhitePhaseblade = 202; + public const short YellowPhaseblade = 203; + public const short MeteorHamaxe = 204; + public const short EmptyBucket = 205; + public const short WaterBucket = 206; + public const short LavaBucket = 207; + public const short JungleRose = 208; + public const short Stinger = 209; + public const short Vine = 210; + public const short FeralClaws = 211; + public const short AnkletoftheWind = 212; + public const short StaffofRegrowth = 213; + public const short HellstoneBrick = 214; + public const short WhoopieCushion = 215; + public const short Shackle = 216; + public const short MoltenHamaxe = 217; + public const short Flamelash = 218; + public const short PhoenixBlaster = 219; + public const short Sunfury = 220; + public const short Hellforge = 221; + public const short ClayPot = 222; + public const short NaturesGift = 223; + public const short Bed = 224; + public const short Silk = 225; + public const short LesserRestorationPotion = 226; + public const short RestorationPotion = 227; + public const short JungleHat = 228; + public const short JungleShirt = 229; + public const short JunglePants = 230; + public const short MoltenHelmet = 231; + public const short MoltenBreastplate = 232; + public const short MoltenGreaves = 233; + public const short MeteorShot = 234; + public const short StickyBomb = 235; + public const short BlackLens = 236; + public const short Sunglasses = 237; + public const short WizardHat = 238; + public const short TopHat = 239; + public const short TuxedoShirt = 240; + public const short TuxedoPants = 241; + public const short SummerHat = 242; + public const short BunnyHood = 243; + public const short PlumbersHat = 244; + public const short PlumbersShirt = 245; + public const short PlumbersPants = 246; + public const short HerosHat = 247; + public const short HerosShirt = 248; + public const short HerosPants = 249; + public const short FishBowl = 250; + public const short ArchaeologistsHat = 251; + public const short ArchaeologistsJacket = 252; + public const short ArchaeologistsPants = 253; + public const short BlackThread = 254; + public const short GreenThread = 255; + public const short NinjaHood = 256; + public const short NinjaShirt = 257; + public const short NinjaPants = 258; + public const short Leather = 259; + public const short RedHat = 260; + public const short Goldfish = 261; + public const short Robe = 262; + public const short RobotHat = 263; + public const short GoldCrown = 264; + public const short HellfireArrow = 265; + public const short Sandgun = 266; + public const short GuideVoodooDoll = 267; + public const short DivingHelmet = 268; + public const short FamiliarShirt = 269; + public const short FamiliarPants = 270; + public const short FamiliarWig = 271; + public const short DemonScythe = 272; + public const short NightsEdge = 273; + public const short DarkLance = 274; + public const short Coral = 275; + public const short Cactus = 276; + public const short Trident = 277; + public const short SilverBullet = 278; + public const short ThrowingKnife = 279; + public const short Spear = 280; + public const short Blowpipe = 281; + public const short Glowstick = 282; + public const short Seed = 283; + public const short WoodenBoomerang = 284; + public const short Aglet = 285; + public const short StickyGlowstick = 286; + public const short PoisonedKnife = 287; + public const short ObsidianSkinPotion = 288; + public const short RegenerationPotion = 289; + public const short SwiftnessPotion = 290; + public const short GillsPotion = 291; + public const short IronskinPotion = 292; + public const short ManaRegenerationPotion = 293; + public const short MagicPowerPotion = 294; + public const short FeatherfallPotion = 295; + public const short SpelunkerPotion = 296; + public const short InvisibilityPotion = 297; + public const short ShinePotion = 298; + public const short NightOwlPotion = 299; + public const short BattlePotion = 300; + public const short ThornsPotion = 301; + public const short WaterWalkingPotion = 302; + public const short ArcheryPotion = 303; + public const short HunterPotion = 304; + public const short GravitationPotion = 305; + public const short GoldChest = 306; + public const short DaybloomSeeds = 307; + public const short MoonglowSeeds = 308; + public const short BlinkrootSeeds = 309; + public const short DeathweedSeeds = 310; + public const short WaterleafSeeds = 311; + public const short FireblossomSeeds = 312; + public const short Daybloom = 313; + public const short Moonglow = 314; + public const short Blinkroot = 315; + public const short Deathweed = 316; + public const short Waterleaf = 317; + public const short Fireblossom = 318; + public const short SharkFin = 319; + public const short Feather = 320; + public const short Tombstone = 321; + public const short MimeMask = 322; + public const short AntlionMandible = 323; + public const short IllegalGunParts = 324; + public const short TheDoctorsShirt = 325; + public const short TheDoctorsPants = 326; + public const short GoldenKey = 327; + public const short ShadowChest = 328; + public const short ShadowKey = 329; + public const short ObsidianBrickWall = 330; + public const short JungleSpores = 331; + public const short Loom = 332; + public const short Piano = 333; + public const short Dresser = 334; + public const short Bench = 335; + public const short Bathtub = 336; + public const short RedBanner = 337; + public const short GreenBanner = 338; + public const short BlueBanner = 339; + public const short YellowBanner = 340; + public const short LampPost = 341; + public const short TikiTorch = 342; + public const short Barrel = 343; + public const short ChineseLantern = 344; + public const short CookingPot = 345; + public const short Safe = 346; + public const short SkullLantern = 347; + public const short TrashCan = 348; + public const short Candelabra = 349; + public const short PinkVase = 350; + public const short Mug = 351; + public const short Keg = 352; + public const short Ale = 353; + public const short Bookcase = 354; + public const short Throne = 355; + public const short Bowl = 356; + public const short BowlofSoup = 357; + public const short Toilet = 358; + public const short GrandfatherClock = 359; + public const short ArmorStatue = 360; + public const short GoblinBattleStandard = 361; + public const short TatteredCloth = 362; + public const short Sawmill = 363; + public const short CobaltOre = 364; + public const short MythrilOre = 365; + public const short AdamantiteOre = 366; + public const short Pwnhammer = 367; + public const short Excalibur = 368; + public const short HallowedSeeds = 369; + public const short EbonsandBlock = 370; + public const short CobaltHat = 371; + public const short CobaltHelmet = 372; + public const short CobaltMask = 373; + public const short CobaltBreastplate = 374; + public const short CobaltLeggings = 375; + public const short MythrilHood = 376; + public const short MythrilHelmet = 377; + public const short MythrilHat = 378; + public const short MythrilChainmail = 379; + public const short MythrilGreaves = 380; + public const short CobaltBar = 381; + public const short MythrilBar = 382; + public const short CobaltChainsaw = 383; + public const short MythrilChainsaw = 384; + public const short CobaltDrill = 385; + public const short MythrilDrill = 386; + public const short AdamantiteChainsaw = 387; + public const short AdamantiteDrill = 388; + public const short DaoofPow = 389; + public const short MythrilHalberd = 390; + public const short AdamantiteBar = 391; + public const short GlassWall = 392; + public const short Compass = 393; + public const short DivingGear = 394; + public const short GPS = 395; + public const short ObsidianHorseshoe = 396; + public const short ObsidianShield = 397; + public const short TinkerersWorkshop = 398; + public const short CloudinaBalloon = 399; + public const short AdamantiteHeadgear = 400; + public const short AdamantiteHelmet = 401; + public const short AdamantiteMask = 402; + public const short AdamantiteBreastplate = 403; + public const short AdamantiteLeggings = 404; + public const short SpectreBoots = 405; + public const short AdamantiteGlaive = 406; + public const short Toolbelt = 407; + public const short PearlsandBlock = 408; + public const short PearlstoneBlock = 409; + public const short MiningShirt = 410; + public const short MiningPants = 411; + public const short PearlstoneBrick = 412; + public const short IridescentBrick = 413; + public const short MudstoneBlock = 414; + public const short CobaltBrick = 415; + public const short MythrilBrick = 416; + public const short PearlstoneBrickWall = 417; + public const short IridescentBrickWall = 418; + public const short MudstoneBrickWall = 419; + public const short CobaltBrickWall = 420; + public const short MythrilBrickWall = 421; + public const short HolyWater = 422; + public const short UnholyWater = 423; + public const short SiltBlock = 424; + public const short FairyBell = 425; + public const short BreakerBlade = 426; + public const short BlueTorch = 427; + public const short RedTorch = 428; + public const short GreenTorch = 429; + public const short PurpleTorch = 430; + public const short WhiteTorch = 431; + public const short YellowTorch = 432; + public const short DemonTorch = 433; + public const short ClockworkAssaultRifle = 434; + public const short CobaltRepeater = 435; + public const short MythrilRepeater = 436; + public const short DualHook = 437; + public const short StarStatue = 438; + public const short SwordStatue = 439; + public const short SlimeStatue = 440; + public const short GoblinStatue = 441; + public const short ShieldStatue = 442; + public const short BatStatue = 443; + public const short FishStatue = 444; + public const short BunnyStatue = 445; + public const short SkeletonStatue = 446; + public const short ReaperStatue = 447; + public const short WomanStatue = 448; + public const short ImpStatue = 449; + public const short GargoyleStatue = 450; + public const short GloomStatue = 451; + public const short HornetStatue = 452; + public const short BombStatue = 453; + public const short CrabStatue = 454; + public const short HammerStatue = 455; + public const short PotionStatue = 456; + public const short SpearStatue = 457; + public const short CrossStatue = 458; + public const short JellyfishStatue = 459; + public const short BowStatue = 460; + public const short BoomerangStatue = 461; + public const short BootStatue = 462; + public const short ChestStatue = 463; + public const short BirdStatue = 464; + public const short AxeStatue = 465; + public const short CorruptStatue = 466; + public const short TreeStatue = 467; + public const short AnvilStatue = 468; + public const short PickaxeStatue = 469; + public const short MushroomStatue = 470; + public const short EyeballStatue = 471; + public const short PillarStatue = 472; + public const short HeartStatue = 473; + public const short PotStatue = 474; + public const short SunflowerStatue = 475; + public const short KingStatue = 476; + public const short QueenStatue = 477; + public const short PiranhaStatue = 478; + public const short PlankedWall = 479; + public const short WoodenBeam = 480; + public const short AdamantiteRepeater = 481; + public const short AdamantiteSword = 482; + public const short CobaltSword = 483; + public const short MythrilSword = 484; + public const short MoonCharm = 485; + public const short Ruler = 486; + public const short CrystalBall = 487; + public const short DiscoBall = 488; + public const short SorcererEmblem = 489; + public const short WarriorEmblem = 490; + public const short RangerEmblem = 491; + public const short DemonWings = 492; + public const short AngelWings = 493; + public const short MagicalHarp = 494; + public const short RainbowRod = 495; + public const short IceRod = 496; + public const short NeptunesShell = 497; + public const short Mannequin = 498; + public const short GreaterHealingPotion = 499; + public const short GreaterManaPotion = 500; + public const short PixieDust = 501; + public const short CrystalShard = 502; + public const short ClownHat = 503; + public const short ClownShirt = 504; + public const short ClownPants = 505; + public const short Flamethrower = 506; + public const short Bell = 507; + public const short Harp = 508; + public const short Wrench = 509; + public const short WireCutter = 510; + public const short ActiveStoneBlock = 511; + public const short InactiveStoneBlock = 512; + public const short Lever = 513; + public const short LaserRifle = 514; + public const short CrystalBullet = 515; + public const short HolyArrow = 516; + public const short MagicDagger = 517; + public const short CrystalStorm = 518; + public const short CursedFlames = 519; + public const short SoulofLight = 520; + public const short SoulofNight = 521; + public const short CursedFlame = 522; + public const short CursedTorch = 523; + public const short AdamantiteForge = 524; + public const short MythrilAnvil = 525; + public const short UnicornHorn = 526; + public const short DarkShard = 527; + public const short LightShard = 528; + public const short RedPressurePlate = 529; + public const short Wire = 530; + public const short SpellTome = 531; + public const short StarCloak = 532; + public const short Megashark = 533; + public const short Shotgun = 534; + public const short PhilosophersStone = 535; + public const short TitanGlove = 536; + public const short CobaltNaginata = 537; + public const short Switch = 538; + public const short DartTrap = 539; + public const short Boulder = 540; + public const short GreenPressurePlate = 541; + public const short GrayPressurePlate = 542; + public const short BrownPressurePlate = 543; + public const short MechanicalEye = 544; + public const short CursedArrow = 545; + public const short CursedBullet = 546; + public const short SoulofFright = 547; + public const short SoulofMight = 548; + public const short SoulofSight = 549; + public const short Gungnir = 550; + public const short HallowedPlateMail = 551; + public const short HallowedGreaves = 552; + public const short HallowedHelmet = 553; + public const short CrossNecklace = 554; + public const short ManaFlower = 555; + public const short MechanicalWorm = 556; + public const short MechanicalSkull = 557; + public const short HallowedHeadgear = 558; + public const short HallowedMask = 559; + public const short SlimeCrown = 560; + public const short LightDisc = 561; + public const short MusicBoxOverworldDay = 562; + public const short MusicBoxEerie = 563; + public const short MusicBoxNight = 564; + public const short MusicBoxTitle = 565; + public const short MusicBoxUnderground = 566; + public const short MusicBoxBoss1 = 567; + public const short MusicBoxJungle = 568; + public const short MusicBoxCorruption = 569; + public const short MusicBoxUndergroundCorruption = 570; + public const short MusicBoxTheHallow = 571; + public const short MusicBoxBoss2 = 572; + public const short MusicBoxUndergroundHallow = 573; + public const short MusicBoxBoss3 = 574; + public const short SoulofFlight = 575; + public const short MusicBox = 576; + public const short DemoniteBrick = 577; + public const short HallowedRepeater = 578; + public const short Drax = 579; + public const short Explosives = 580; + public const short InletPump = 581; + public const short OutletPump = 582; + public const short Timer1Second = 583; + public const short Timer3Second = 584; + public const short Timer5Second = 585; + public const short CandyCaneBlock = 586; + public const short CandyCaneWall = 587; + public const short SantaHat = 588; + public const short SantaShirt = 589; + public const short SantaPants = 590; + public const short GreenCandyCaneBlock = 591; + public const short GreenCandyCaneWall = 592; + public const short SnowBlock = 593; + public const short SnowBrick = 594; + public const short SnowBrickWall = 595; + public const short BlueLight = 596; + public const short RedLight = 597; + public const short GreenLight = 598; + public const short BluePresent = 599; + public const short GreenPresent = 600; + public const short YellowPresent = 601; + public const short SnowGlobe = 602; + public const short Carrot = 603; + public const short AdamantiteBeam = 604; + public const short AdamantiteBeamWall = 605; + public const short DemoniteBrickWall = 606; + public const short SandstoneBrick = 607; + public const short SandstoneBrickWall = 608; + public const short EbonstoneBrick = 609; + public const short EbonstoneBrickWall = 610; + public const short RedStucco = 611; + public const short YellowStucco = 612; + public const short GreenStucco = 613; + public const short GrayStucco = 614; + public const short RedStuccoWall = 615; + public const short YellowStuccoWall = 616; + public const short GreenStuccoWall = 617; + public const short GrayStuccoWall = 618; + public const short Ebonwood = 619; + public const short RichMahogany = 620; + public const short Pearlwood = 621; + public const short EbonwoodWall = 622; + public const short RichMahoganyWall = 623; + public const short PearlwoodWall = 624; + public const short EbonwoodChest = 625; + public const short RichMahoganyChest = 626; + public const short PearlwoodChest = 627; + public const short EbonwoodChair = 628; + public const short RichMahoganyChair = 629; + public const short PearlwoodChair = 630; + public const short EbonwoodPlatform = 631; + public const short RichMahoganyPlatform = 632; + public const short PearlwoodPlatform = 633; + public const short BonePlatform = 634; + public const short EbonwoodWorkBench = 635; + public const short RichMahoganyWorkBench = 636; + public const short PearlwoodWorkBench = 637; + public const short EbonwoodTable = 638; + public const short RichMahoganyTable = 639; + public const short PearlwoodTable = 640; + public const short EbonwoodPiano = 641; + public const short RichMahoganyPiano = 642; + public const short PearlwoodPiano = 643; + public const short EbonwoodBed = 644; + public const short RichMahoganyBed = 645; + public const short PearlwoodBed = 646; + public const short EbonwoodDresser = 647; + public const short RichMahoganyDresser = 648; + public const short PearlwoodDresser = 649; + public const short EbonwoodDoor = 650; + public const short RichMahoganyDoor = 651; + public const short PearlwoodDoor = 652; + public const short EbonwoodSword = 653; + public const short EbonwoodHammer = 654; + public const short EbonwoodBow = 655; + public const short RichMahoganySword = 656; + public const short RichMahoganyHammer = 657; + public const short RichMahoganyBow = 658; + public const short PearlwoodSword = 659; + public const short PearlwoodHammer = 660; + public const short PearlwoodBow = 661; + public const short RainbowBrick = 662; + public const short RainbowBrickWall = 663; + public const short IceBlock = 664; + public const short RedsWings = 665; + public const short RedsHelmet = 666; + public const short RedsBreastplate = 667; + public const short RedsLeggings = 668; + public const short Fish = 669; + public const short IceBoomerang = 670; + public const short Keybrand = 671; + public const short Cutlass = 672; + public const short BorealWoodWorkBench = 673; + public const short TrueExcalibur = 674; + public const short TrueNightsEdge = 675; + public const short Frostbrand = 676; + public const short BorealWoodTable = 677; + public const short RedPotion = 678; + public const short TacticalShotgun = 679; + public const short IvyChest = 680; + public const short IceChest = 681; + public const short Marrow = 682; + public const short UnholyTrident = 683; + public const short FrostHelmet = 684; + public const short FrostBreastplate = 685; + public const short FrostLeggings = 686; + public const short TinHelmet = 687; + public const short TinChainmail = 688; + public const short TinGreaves = 689; + public const short LeadHelmet = 690; + public const short LeadChainmail = 691; + public const short LeadGreaves = 692; + public const short TungstenHelmet = 693; + public const short TungstenChainmail = 694; + public const short TungstenGreaves = 695; + public const short PlatinumHelmet = 696; + public const short PlatinumChainmail = 697; + public const short PlatinumGreaves = 698; + public const short TinOre = 699; + public const short LeadOre = 700; + public const short TungstenOre = 701; + public const short PlatinumOre = 702; + public const short TinBar = 703; + public const short LeadBar = 704; + public const short TungstenBar = 705; + public const short PlatinumBar = 706; + public const short TinWatch = 707; + public const short TungstenWatch = 708; + public const short PlatinumWatch = 709; + public const short TinChandelier = 710; + public const short TungstenChandelier = 711; + public const short PlatinumChandelier = 712; + public const short PlatinumCandle = 713; + public const short PlatinumCandelabra = 714; + public const short PlatinumCrown = 715; + public const short LeadAnvil = 716; + public const short TinBrick = 717; + public const short TungstenBrick = 718; + public const short PlatinumBrick = 719; + public const short TinBrickWall = 720; + public const short TungstenBrickWall = 721; + public const short PlatinumBrickWall = 722; + public const short BeamSword = 723; + public const short IceBlade = 724; + public const short IceBow = 725; + public const short FrostStaff = 726; + public const short WoodHelmet = 727; + public const short WoodBreastplate = 728; + public const short WoodGreaves = 729; + public const short EbonwoodHelmet = 730; + public const short EbonwoodBreastplate = 731; + public const short EbonwoodGreaves = 732; + public const short RichMahoganyHelmet = 733; + public const short RichMahoganyBreastplate = 734; + public const short RichMahoganyGreaves = 735; + public const short PearlwoodHelmet = 736; + public const short PearlwoodBreastplate = 737; + public const short PearlwoodGreaves = 738; + public const short AmethystStaff = 739; + public const short TopazStaff = 740; + public const short SapphireStaff = 741; + public const short EmeraldStaff = 742; + public const short RubyStaff = 743; + public const short DiamondStaff = 744; + public const short GrassWall = 745; + public const short JungleWall = 746; + public const short FlowerWall = 747; + public const short Jetpack = 748; + public const short ButterflyWings = 749; + public const short CactusWall = 750; + public const short Cloud = 751; + public const short CloudWall = 752; + public const short Seaweed = 753; + public const short RuneHat = 754; + public const short RuneRobe = 755; + public const short MushroomSpear = 756; + public const short TerraBlade = 757; + public const short GrenadeLauncher = 758; + public const short RocketLauncher = 759; + public const short ProximityMineLauncher = 760; + public const short FairyWings = 761; + public const short SlimeBlock = 762; + public const short FleshBlock = 763; + public const short MushroomWall = 764; + public const short RainCloud = 765; + public const short BoneBlock = 766; + public const short FrozenSlimeBlock = 767; + public const short BoneBlockWall = 768; + public const short SlimeBlockWall = 769; + public const short FleshBlockWall = 770; + public const short RocketI = 771; + public const short RocketII = 772; + public const short RocketIII = 773; + public const short RocketIV = 774; + public const short AsphaltBlock = 775; + public const short CobaltPickaxe = 776; + public const short MythrilPickaxe = 777; + public const short AdamantitePickaxe = 778; + public const short Clentaminator = 779; + public const short GreenSolution = 780; + public const short BlueSolution = 781; + public const short PurpleSolution = 782; + public const short DarkBlueSolution = 783; + public const short RedSolution = 784; + public const short HarpyWings = 785; + public const short BoneWings = 786; + public const short Hammush = 787; + public const short NettleBurst = 788; + public const short AnkhBanner = 789; + public const short SnakeBanner = 790; + public const short OmegaBanner = 791; + public const short CrimsonHelmet = 792; + public const short CrimsonScalemail = 793; + public const short CrimsonGreaves = 794; + public const short BloodButcherer = 795; + public const short TendonBow = 796; + public const short FleshGrinder = 797; + public const short DeathbringerPickaxe = 798; + public const short BloodLustCluster = 799; + public const short TheUndertaker = 800; + public const short TheMeatball = 801; + public const short TheRottedFork = 802; + public const short EskimoHood = 803; + public const short EskimoCoat = 804; + public const short EskimoPants = 805; + public const short LivingWoodChair = 806; + public const short CactusChair = 807; + public const short BoneChair = 808; + public const short FleshChair = 809; + public const short MushroomChair = 810; + public const short BoneWorkBench = 811; + public const short CactusWorkBench = 812; + public const short FleshWorkBench = 813; + public const short MushroomWorkBench = 814; + public const short SlimeWorkBench = 815; + public const short CactusDoor = 816; + public const short FleshDoor = 817; + public const short MushroomDoor = 818; + public const short LivingWoodDoor = 819; + public const short BoneDoor = 820; + public const short FlameWings = 821; + public const short FrozenWings = 822; + public const short GhostWings = 823; + public const short SunplateBlock = 824; + public const short DiscWall = 825; + public const short SkywareChair = 826; + public const short BoneTable = 827; + public const short FleshTable = 828; + public const short LivingWoodTable = 829; + public const short SkywareTable = 830; + public const short LivingWoodChest = 831; + public const short LivingWoodWand = 832; + public const short PurpleIceBlock = 833; + public const short PinkIceBlock = 834; + public const short RedIceBlock = 835; + public const short CrimstoneBlock = 836; + public const short SkywareDoor = 837; + public const short SkywareChest = 838; + public const short SteampunkHat = 839; + public const short SteampunkShirt = 840; + public const short SteampunkPants = 841; + public const short BeeHat = 842; + public const short BeeShirt = 843; + public const short BeePants = 844; + public const short WorldBanner = 845; + public const short SunBanner = 846; + public const short GravityBanner = 847; + public const short PharaohsMask = 848; + public const short Actuator = 849; + public const short BlueWrench = 850; + public const short GreenWrench = 851; + public const short BluePressurePlate = 852; + public const short YellowPressurePlate = 853; + public const short DiscountCard = 854; + public const short LuckyCoin = 855; + public const short UnicornonaStick = 856; + public const short SandstorminaBottle = 857; + public const short BorealWoodSofa = 858; + public const short BeachBall = 859; + public const short CharmofMyths = 860; + public const short MoonShell = 861; + public const short StarVeil = 862; + public const short WaterWalkingBoots = 863; + public const short Tiara = 864; + public const short PrincessDress = 865; + public const short PharaohsRobe = 866; + public const short GreenCap = 867; + public const short MushroomCap = 868; + public const short TamOShanter = 869; + public const short MummyMask = 870; + public const short MummyShirt = 871; + public const short MummyPants = 872; + public const short CowboyHat = 873; + public const short CowboyJacket = 874; + public const short CowboyPants = 875; + public const short PirateHat = 876; + public const short PirateShirt = 877; + public const short PiratePants = 878; + public const short VikingHelmet = 879; + public const short CrimtaneOre = 880; + public const short CactusSword = 881; + public const short CactusPickaxe = 882; + public const short IceBrick = 883; + public const short IceBrickWall = 884; + public const short AdhesiveBandage = 885; + public const short ArmorPolish = 886; + public const short Bezoar = 887; + public const short Blindfold = 888; + public const short FastClock = 889; + public const short Megaphone = 890; + public const short Nazar = 891; + public const short Vitamins = 892; + public const short TrifoldMap = 893; + public const short CactusHelmet = 894; + public const short CactusBreastplate = 895; + public const short CactusLeggings = 896; + public const short PowerGlove = 897; + public const short LightningBoots = 898; + public const short SunStone = 899; + public const short MoonStone = 900; + public const short ArmorBracing = 901; + public const short MedicatedBandage = 902; + public const short ThePlan = 903; + public const short CountercurseMantra = 904; + public const short CoinGun = 905; + public const short LavaCharm = 906; + public const short ObsidianWaterWalkingBoots = 907; + public const short LavaWaders = 908; + public const short PureWaterFountain = 909; + public const short DesertWaterFountain = 910; + public const short Shadewood = 911; + public const short ShadewoodDoor = 912; + public const short ShadewoodPlatform = 913; + public const short ShadewoodChest = 914; + public const short ShadewoodChair = 915; + public const short ShadewoodWorkBench = 916; + public const short ShadewoodTable = 917; + public const short ShadewoodDresser = 918; + public const short ShadewoodPiano = 919; + public const short ShadewoodBed = 920; + public const short ShadewoodSword = 921; + public const short ShadewoodHammer = 922; + public const short ShadewoodBow = 923; + public const short ShadewoodHelmet = 924; + public const short ShadewoodBreastplate = 925; + public const short ShadewoodGreaves = 926; + public const short ShadewoodWall = 927; + public const short Cannon = 928; + public const short Cannonball = 929; + public const short FlareGun = 930; + public const short Flare = 931; + public const short BoneWand = 932; + public const short LeafWand = 933; + public const short FlyingCarpet = 934; + public const short AvengerEmblem = 935; + public const short MechanicalGlove = 936; + public const short LandMine = 937; + public const short PaladinsShield = 938; + public const short WebSlinger = 939; + public const short JungleWaterFountain = 940; + public const short IcyWaterFountain = 941; + public const short CorruptWaterFountain = 942; + public const short CrimsonWaterFountain = 943; + public const short HallowedWaterFountain = 944; + public const short BloodWaterFountain = 945; + public const short Umbrella = 946; + public const short ChlorophyteOre = 947; + public const short SteampunkWings = 948; + public const short Snowball = 949; + public const short IceSkates = 950; + public const short SnowballLauncher = 951; + public const short WebCoveredChest = 952; + public const short ClimbingClaws = 953; + public const short AncientIronHelmet = 954; + public const short AncientGoldHelmet = 955; + public const short AncientShadowHelmet = 956; + public const short AncientShadowScalemail = 957; + public const short AncientShadowGreaves = 958; + public const short AncientNecroHelmet = 959; + public const short AncientCobaltHelmet = 960; + public const short AncientCobaltBreastplate = 961; + public const short AncientCobaltLeggings = 962; + public const short BlackBelt = 963; + public const short Boomstick = 964; + public const short Rope = 965; + public const short Campfire = 966; + public const short Marshmallow = 967; + public const short MarshmallowonaStick = 968; + public const short CookedMarshmallow = 969; + public const short RedRocket = 970; + public const short GreenRocket = 971; + public const short BlueRocket = 972; + public const short YellowRocket = 973; + public const short IceTorch = 974; + public const short ShoeSpikes = 975; + public const short TigerClimbingGear = 976; + public const short Tabi = 977; + public const short PinkEskimoHood = 978; + public const short PinkEskimoCoat = 979; + public const short PinkEskimoPants = 980; + public const short PinkThread = 981; + public const short ManaRegenerationBand = 982; + public const short SandstorminaBalloon = 983; + public const short MasterNinjaGear = 984; + public const short RopeCoil = 985; + public const short Blowgun = 986; + public const short BlizzardinaBottle = 987; + public const short FrostburnArrow = 988; + public const short EnchantedSword = 989; + public const short PickaxeAxe = 990; + public const short CobaltWaraxe = 991; + public const short MythrilWaraxe = 992; + public const short AdamantiteWaraxe = 993; + public const short EatersBone = 994; + public const short BlendOMatic = 995; + public const short MeatGrinder = 996; + public const short Extractinator = 997; + public const short Solidifier = 998; + public const short Amber = 999; + public const short ConfettiGun = 1000; + public const short ChlorophyteMask = 1001; + public const short ChlorophyteHelmet = 1002; + public const short ChlorophyteHeadgear = 1003; + public const short ChlorophytePlateMail = 1004; + public const short ChlorophyteGreaves = 1005; + public const short ChlorophyteBar = 1006; + public const short RedDye = 1007; + public const short OrangeDye = 1008; + public const short YellowDye = 1009; + public const short LimeDye = 1010; + public const short GreenDye = 1011; + public const short TealDye = 1012; + public const short CyanDye = 1013; + public const short SkyBlueDye = 1014; + public const short BlueDye = 1015; + public const short PurpleDye = 1016; + public const short VioletDye = 1017; + public const short PinkDye = 1018; + public const short RedandBlackDye = 1019; + public const short OrangeandBlackDye = 1020; + public const short YellowandBlackDye = 1021; + public const short LimeandBlackDye = 1022; + public const short GreenandBlackDye = 1023; + public const short TealandBlackDye = 1024; + public const short CyanandBlackDye = 1025; + public const short SkyBlueandBlackDye = 1026; + public const short BlueandBlackDye = 1027; + public const short PurpleandBlackDye = 1028; + public const short VioletandBlackDye = 1029; + public const short PinkandBlackDye = 1030; + public const short FlameDye = 1031; + public const short FlameAndBlackDye = 1032; + public const short GreenFlameDye = 1033; + public const short GreenFlameAndBlackDye = 1034; + public const short BlueFlameDye = 1035; + public const short BlueFlameAndBlackDye = 1036; + public const short SilverDye = 1037; + public const short BrightRedDye = 1038; + public const short BrightOrangeDye = 1039; + public const short BrightYellowDye = 1040; + public const short BrightLimeDye = 1041; + public const short BrightGreenDye = 1042; + public const short BrightTealDye = 1043; + public const short BrightCyanDye = 1044; + public const short BrightSkyBlueDye = 1045; + public const short BrightBlueDye = 1046; + public const short BrightPurpleDye = 1047; + public const short BrightVioletDye = 1048; + public const short BrightPinkDye = 1049; + public const short BlackDye = 1050; + public const short RedandSilverDye = 1051; + public const short OrangeandSilverDye = 1052; + public const short YellowandSilverDye = 1053; + public const short LimeandSilverDye = 1054; + public const short GreenandSilverDye = 1055; + public const short TealandSilverDye = 1056; + public const short CyanandSilverDye = 1057; + public const short SkyBlueandSilverDye = 1058; + public const short BlueandSilverDye = 1059; + public const short PurpleandSilverDye = 1060; + public const short VioletandSilverDye = 1061; + public const short PinkandSilverDye = 1062; + public const short IntenseFlameDye = 1063; + public const short IntenseGreenFlameDye = 1064; + public const short IntenseBlueFlameDye = 1065; + public const short RainbowDye = 1066; + public const short IntenseRainbowDye = 1067; + public const short YellowGradientDye = 1068; + public const short CyanGradientDye = 1069; + public const short VioletGradientDye = 1070; + public const short Paintbrush = 1071; + public const short PaintRoller = 1072; + public const short RedPaint = 1073; + public const short OrangePaint = 1074; + public const short YellowPaint = 1075; + public const short LimePaint = 1076; + public const short GreenPaint = 1077; + public const short TealPaint = 1078; + public const short CyanPaint = 1079; + public const short SkyBluePaint = 1080; + public const short BluePaint = 1081; + public const short PurplePaint = 1082; + public const short VioletPaint = 1083; + public const short PinkPaint = 1084; + public const short DeepRedPaint = 1085; + public const short DeepOrangePaint = 1086; + public const short DeepYellowPaint = 1087; + public const short DeepLimePaint = 1088; + public const short DeepGreenPaint = 1089; + public const short DeepTealPaint = 1090; + public const short DeepCyanPaint = 1091; + public const short DeepSkyBluePaint = 1092; + public const short DeepBluePaint = 1093; + public const short DeepPurplePaint = 1094; + public const short DeepVioletPaint = 1095; + public const short DeepPinkPaint = 1096; + public const short BlackPaint = 1097; + public const short WhitePaint = 1098; + public const short GrayPaint = 1099; + public const short PaintScraper = 1100; + public const short LihzahrdBrick = 1101; + public const short LihzahrdBrickWall = 1102; + public const short SlushBlock = 1103; + public const short PalladiumOre = 1104; + public const short OrichalcumOre = 1105; + public const short TitaniumOre = 1106; + public const short TealMushroom = 1107; + public const short GreenMushroom = 1108; + public const short SkyBlueFlower = 1109; + public const short YellowMarigold = 1110; + public const short BlueBerries = 1111; + public const short LimeKelp = 1112; + public const short PinkPricklyPear = 1113; + public const short OrangeBloodroot = 1114; + public const short RedHusk = 1115; + public const short CyanHusk = 1116; + public const short VioletHusk = 1117; + public const short PurpleMucos = 1118; + public const short BlackInk = 1119; + public const short DyeVat = 1120; + public const short BeeGun = 1121; + public const short PossessedHatchet = 1122; + public const short BeeKeeper = 1123; + public const short Hive = 1124; + public const short HoneyBlock = 1125; + public const short HiveWall = 1126; + public const short CrispyHoneyBlock = 1127; + public const short HoneyBucket = 1128; + public const short HiveWand = 1129; + public const short Beenade = 1130; + public const short GravityGlobe = 1131; + public const short HoneyComb = 1132; + public const short Abeemination = 1133; + public const short BottledHoney = 1134; + public const short RainHat = 1135; + public const short RainCoat = 1136; + public const short LihzahrdDoor = 1137; + public const short DungeonDoor = 1138; + public const short LeadDoor = 1139; + public const short IronDoor = 1140; + public const short TempleKey = 1141; + public const short LihzahrdChest = 1142; + public const short LihzahrdChair = 1143; + public const short LihzahrdTable = 1144; + public const short LihzahrdWorkBench = 1145; + public const short SuperDartTrap = 1146; + public const short FlameTrap = 1147; + public const short SpikyBallTrap = 1148; + public const short SpearTrap = 1149; + public const short WoodenSpike = 1150; + public const short LihzahrdPressurePlate = 1151; + public const short LihzahrdStatue = 1152; + public const short LihzahrdWatcherStatue = 1153; + public const short LihzahrdGuardianStatue = 1154; + public const short WaspGun = 1155; + public const short PiranhaGun = 1156; + public const short PygmyStaff = 1157; + public const short PygmyNecklace = 1158; + public const short TikiMask = 1159; + public const short TikiShirt = 1160; + public const short TikiPants = 1161; + public const short LeafWings = 1162; + public const short BlizzardinaBalloon = 1163; + public const short BundleofBalloons = 1164; + public const short BatWings = 1165; + public const short BoneSword = 1166; + public const short HerculesBeetle = 1167; + public const short SmokeBomb = 1168; + public const short BoneKey = 1169; + public const short Nectar = 1170; + public const short TikiTotem = 1171; + public const short LizardEgg = 1172; + public const short GraveMarker = 1173; + public const short CrossGraveMarker = 1174; + public const short Headstone = 1175; + public const short Gravestone = 1176; + public const short Obelisk = 1177; + public const short LeafBlower = 1178; + public const short ChlorophyteBullet = 1179; + public const short ParrotCracker = 1180; + public const short StrangeGlowingMushroom = 1181; + public const short Seedling = 1182; + public const short WispinaBottle = 1183; + public const short PalladiumBar = 1184; + public const short PalladiumSword = 1185; + public const short PalladiumPike = 1186; + public const short PalladiumRepeater = 1187; + public const short PalladiumPickaxe = 1188; + public const short PalladiumDrill = 1189; + public const short PalladiumChainsaw = 1190; + public const short OrichalcumBar = 1191; + public const short OrichalcumSword = 1192; + public const short OrichalcumHalberd = 1193; + public const short OrichalcumRepeater = 1194; + public const short OrichalcumPickaxe = 1195; + public const short OrichalcumDrill = 1196; + public const short OrichalcumChainsaw = 1197; + public const short TitaniumBar = 1198; + public const short TitaniumSword = 1199; + public const short TitaniumTrident = 1200; + public const short TitaniumRepeater = 1201; + public const short TitaniumPickaxe = 1202; + public const short TitaniumDrill = 1203; + public const short TitaniumChainsaw = 1204; + public const short PalladiumMask = 1205; + public const short PalladiumHelmet = 1206; + public const short PalladiumHeadgear = 1207; + public const short PalladiumBreastplate = 1208; + public const short PalladiumLeggings = 1209; + public const short OrichalcumMask = 1210; + public const short OrichalcumHelmet = 1211; + public const short OrichalcumHeadgear = 1212; + public const short OrichalcumBreastplate = 1213; + public const short OrichalcumLeggings = 1214; + public const short TitaniumMask = 1215; + public const short TitaniumHelmet = 1216; + public const short TitaniumHeadgear = 1217; + public const short TitaniumBreastplate = 1218; + public const short TitaniumLeggings = 1219; + public const short OrichalcumAnvil = 1220; + public const short TitaniumForge = 1221; + public const short PalladiumWaraxe = 1222; + public const short OrichalcumWaraxe = 1223; + public const short TitaniumWaraxe = 1224; + public const short HallowedBar = 1225; + public const short ChlorophyteClaymore = 1226; + public const short ChlorophyteSaber = 1227; + public const short ChlorophytePartisan = 1228; + public const short ChlorophyteShotbow = 1229; + public const short ChlorophytePickaxe = 1230; + public const short ChlorophyteDrill = 1231; + public const short ChlorophyteChainsaw = 1232; + public const short ChlorophyteGreataxe = 1233; + public const short ChlorophyteWarhammer = 1234; + public const short ChlorophyteArrow = 1235; + public const short AmethystHook = 1236; + public const short TopazHook = 1237; + public const short SapphireHook = 1238; + public const short EmeraldHook = 1239; + public const short RubyHook = 1240; + public const short DiamondHook = 1241; + public const short AmberMosquito = 1242; + public const short UmbrellaHat = 1243; + public const short NimbusRod = 1244; + public const short OrangeTorch = 1245; + public const short CrimsandBlock = 1246; + public const short BeeCloak = 1247; + public const short EyeoftheGolem = 1248; + public const short HoneyBalloon = 1249; + public const short BlueHorseshoeBalloon = 1250; + public const short WhiteHorseshoeBalloon = 1251; + public const short YellowHorseshoeBalloon = 1252; + public const short FrozenTurtleShell = 1253; + public const short SniperRifle = 1254; + public const short VenusMagnum = 1255; + public const short CrimsonRod = 1256; + public const short CrimtaneBar = 1257; + public const short Stynger = 1258; + public const short FlowerPow = 1259; + public const short RainbowGun = 1260; + public const short StyngerBolt = 1261; + public const short ChlorophyteJackhammer = 1262; + public const short Teleporter = 1263; + public const short FlowerofFrost = 1264; + public const short Uzi = 1265; + public const short MagnetSphere = 1266; + public const short PurpleStainedGlass = 1267; + public const short YellowStainedGlass = 1268; + public const short BlueStainedGlass = 1269; + public const short GreenStainedGlass = 1270; + public const short RedStainedGlass = 1271; + public const short MulticoloredStainedGlass = 1272; + public const short SkeletronHand = 1273; + public const short Skull = 1274; + public const short BallaHat = 1275; + public const short GangstaHat = 1276; + public const short SailorHat = 1277; + public const short EyePatch = 1278; + public const short SailorShirt = 1279; + public const short SailorPants = 1280; + public const short SkeletronMask = 1281; + public const short AmethystRobe = 1282; + public const short TopazRobe = 1283; + public const short SapphireRobe = 1284; + public const short EmeraldRobe = 1285; + public const short RubyRobe = 1286; + public const short DiamondRobe = 1287; + public const short WhiteTuxedoShirt = 1288; + public const short WhiteTuxedoPants = 1289; + public const short PanicNecklace = 1290; + public const short LifeFruit = 1291; + public const short LihzahrdAltar = 1292; + public const short LihzahrdPowerCell = 1293; + public const short Picksaw = 1294; + public const short HeatRay = 1295; + public const short StaffofEarth = 1296; + public const short GolemFist = 1297; + public const short WaterChest = 1298; + public const short Binoculars = 1299; + public const short RifleScope = 1300; + public const short DestroyerEmblem = 1301; + public const short HighVelocityBullet = 1302; + public const short JellyfishNecklace = 1303; + public const short ZombieArm = 1304; + public const short TheAxe = 1305; + public const short IceSickle = 1306; + public const short ClothierVoodooDoll = 1307; + public const short PoisonStaff = 1308; + public const short SlimeStaff = 1309; + public const short PoisonDart = 1310; + public const short EyeSpring = 1311; + public const short ToySled = 1312; + public const short BookofSkulls = 1313; + public const short KOCannon = 1314; + public const short PirateMap = 1315; + public const short TurtleHelmet = 1316; + public const short TurtleScaleMail = 1317; + public const short TurtleLeggings = 1318; + public const short SnowballCannon = 1319; + public const short BonePickaxe = 1320; + public const short MagicQuiver = 1321; + public const short MagmaStone = 1322; + public const short ObsidianRose = 1323; + public const short Bananarang = 1324; + public const short ChainKnife = 1325; + public const short RodofDiscord = 1326; + public const short DeathSickle = 1327; + public const short TurtleShell = 1328; + public const short TissueSample = 1329; + public const short Vertebrae = 1330; + public const short BloodySpine = 1331; + public const short Ichor = 1332; + public const short IchorTorch = 1333; + public const short IchorArrow = 1334; + public const short IchorBullet = 1335; + public const short GoldenShower = 1336; + public const short BunnyCannon = 1337; + public const short ExplosiveBunny = 1338; + public const short VialofVenom = 1339; + public const short FlaskofVenom = 1340; + public const short VenomArrow = 1341; + public const short VenomBullet = 1342; + public const short FireGauntlet = 1343; + public const short Cog = 1344; + public const short Confetti = 1345; + public const short Nanites = 1346; + public const short ExplosivePowder = 1347; + public const short GoldDust = 1348; + public const short PartyBullet = 1349; + public const short NanoBullet = 1350; + public const short ExplodingBullet = 1351; + public const short GoldenBullet = 1352; + public const short FlaskofCursedFlames = 1353; + public const short FlaskofFire = 1354; + public const short FlaskofGold = 1355; + public const short FlaskofIchor = 1356; + public const short FlaskofNanites = 1357; + public const short FlaskofParty = 1358; + public const short FlaskofPoison = 1359; + public const short EyeofCthulhuTrophy = 1360; + public const short EaterofWorldsTrophy = 1361; + public const short BrainofCthulhuTrophy = 1362; + public const short SkeletronTrophy = 1363; + public const short QueenBeeTrophy = 1364; + public const short WallofFleshTrophy = 1365; + public const short DestroyerTrophy = 1366; + public const short SkeletronPrimeTrophy = 1367; + public const short RetinazerTrophy = 1368; + public const short SpazmatismTrophy = 1369; + public const short PlanteraTrophy = 1370; + public const short GolemTrophy = 1371; + public const short BloodMoonRising = 1372; + public const short TheHangedMan = 1373; + public const short GloryoftheFire = 1374; + public const short BoneWarp = 1375; + public const short WallSkeleton = 1376; + public const short HangingSkeleton = 1377; + public const short BlueSlabWall = 1378; + public const short BlueTiledWall = 1379; + public const short PinkSlabWall = 1380; + public const short PinkTiledWall = 1381; + public const short GreenSlabWall = 1382; + public const short GreenTiledWall = 1383; + public const short BlueBrickPlatform = 1384; + public const short PinkBrickPlatform = 1385; + public const short GreenBrickPlatform = 1386; + public const short MetalShelf = 1387; + public const short BrassShelf = 1388; + public const short WoodShelf = 1389; + public const short BrassLantern = 1390; + public const short CagedLantern = 1391; + public const short CarriageLantern = 1392; + public const short AlchemyLantern = 1393; + public const short DiablostLamp = 1394; + public const short OilRagSconse = 1395; + public const short BlueDungeonChair = 1396; + public const short BlueDungeonTable = 1397; + public const short BlueDungeonWorkBench = 1398; + public const short GreenDungeonChair = 1399; + public const short GreenDungeonTable = 1400; + public const short GreenDungeonWorkBench = 1401; + public const short PinkDungeonChair = 1402; + public const short PinkDungeonTable = 1403; + public const short PinkDungeonWorkBench = 1404; + public const short BlueDungeonCandle = 1405; + public const short GreenDungeonCandle = 1406; + public const short PinkDungeonCandle = 1407; + public const short BlueDungeonVase = 1408; + public const short GreenDungeonVase = 1409; + public const short PinkDungeonVase = 1410; + public const short BlueDungeonDoor = 1411; + public const short GreenDungeonDoor = 1412; + public const short PinkDungeonDoor = 1413; + public const short BlueDungeonBookcase = 1414; + public const short GreenDungeonBookcase = 1415; + public const short PinkDungeonBookcase = 1416; + public const short Catacomb = 1417; + public const short DungeonShelf = 1418; + public const short SkellingtonJSkellingsworth = 1419; + public const short TheCursedMan = 1420; + public const short TheEyeSeestheEnd = 1421; + public const short SomethingEvilisWatchingYou = 1422; + public const short TheTwinsHaveAwoken = 1423; + public const short TheScreamer = 1424; + public const short GoblinsPlayingPoker = 1425; + public const short Dryadisque = 1426; + public const short Sunflowers = 1427; + public const short TerrarianGothic = 1428; + public const short Beanie = 1429; + public const short ImbuingStation = 1430; + public const short StarinaBottle = 1431; + public const short EmptyBullet = 1432; + public const short Impact = 1433; + public const short PoweredbyBirds = 1434; + public const short TheDestroyer = 1435; + public const short ThePersistencyofEyes = 1436; + public const short UnicornCrossingtheHallows = 1437; + public const short GreatWave = 1438; + public const short StarryNight = 1439; + public const short GuidePicasso = 1440; + public const short TheGuardiansGaze = 1441; + public const short FatherofSomeone = 1442; + public const short NurseLisa = 1443; + public const short ShadowbeamStaff = 1444; + public const short InfernoFork = 1445; + public const short SpectreStaff = 1446; + public const short WoodenFence = 1447; + public const short LeadFence = 1448; + public const short BubbleMachine = 1449; + public const short BubbleWand = 1450; + public const short MarchingBonesBanner = 1451; + public const short NecromanticSign = 1452; + public const short RustedCompanyStandard = 1453; + public const short RaggedBrotherhoodSigil = 1454; + public const short MoltenLegionFlag = 1455; + public const short DiabolicSigil = 1456; + public const short ObsidianPlatform = 1457; + public const short ObsidianDoor = 1458; + public const short ObsidianChair = 1459; + public const short ObsidianTable = 1460; + public const short ObsidianWorkBench = 1461; + public const short ObsidianVase = 1462; + public const short ObsidianBookcase = 1463; + public const short HellboundBanner = 1464; + public const short HellHammerBanner = 1465; + public const short HelltowerBanner = 1466; + public const short LostHopesofManBanner = 1467; + public const short ObsidianWatcherBanner = 1468; + public const short LavaEruptsBanner = 1469; + public const short BlueDungeonBed = 1470; + public const short GreenDungeonBed = 1471; + public const short PinkDungeonBed = 1472; + public const short ObsidianBed = 1473; + public const short Waldo = 1474; + public const short Darkness = 1475; + public const short DarkSoulReaper = 1476; + public const short Land = 1477; + public const short TrappedGhost = 1478; + public const short DemonsEye = 1479; + public const short FindingGold = 1480; + public const short FirstEncounter = 1481; + public const short GoodMorning = 1482; + public const short UndergroundReward = 1483; + public const short ThroughtheWindow = 1484; + public const short PlaceAbovetheClouds = 1485; + public const short DoNotStepontheGrass = 1486; + public const short ColdWatersintheWhiteLand = 1487; + public const short LightlessChasms = 1488; + public const short TheLandofDeceivingLooks = 1489; + public const short Daylight = 1490; + public const short SecretoftheSands = 1491; + public const short DeadlandComesAlive = 1492; + public const short EvilPresence = 1493; + public const short SkyGuardian = 1494; + public const short AmericanExplosive = 1495; + public const short Discover = 1496; + public const short HandEarth = 1497; + public const short OldMiner = 1498; + public const short Skelehead = 1499; + public const short FacingtheCerebralMastermind = 1500; + public const short LakeofFire = 1501; + public const short TrioSuperHeroes = 1502; + public const short SpectreHood = 1503; + public const short SpectreRobe = 1504; + public const short SpectrePants = 1505; + public const short SpectrePickaxe = 1506; + public const short SpectreHamaxe = 1507; + public const short Ectoplasm = 1508; + public const short GothicChair = 1509; + public const short GothicTable = 1510; + public const short GothicWorkBench = 1511; + public const short GothicBookcase = 1512; + public const short PaladinsHammer = 1513; + public const short SWATHelmet = 1514; + public const short BeeWings = 1515; + public const short GiantHarpyFeather = 1516; + public const short BoneFeather = 1517; + public const short FireFeather = 1518; + public const short IceFeather = 1519; + public const short BrokenBatWing = 1520; + public const short TatteredBeeWing = 1521; + public const short LargeAmethyst = 1522; + public const short LargeTopaz = 1523; + public const short LargeSapphire = 1524; + public const short LargeEmerald = 1525; + public const short LargeRuby = 1526; + public const short LargeDiamond = 1527; + public const short JungleChest = 1528; + public const short CorruptionChest = 1529; + public const short CrimsonChest = 1530; + public const short HallowedChest = 1531; + public const short FrozenChest = 1532; + public const short JungleKey = 1533; + public const short CorruptionKey = 1534; + public const short CrimsonKey = 1535; + public const short HallowedKey = 1536; + public const short FrozenKey = 1537; + public const short ImpFace = 1538; + public const short OminousPresence = 1539; + public const short ShiningMoon = 1540; + public const short LivingGore = 1541; + public const short FlowingMagma = 1542; + public const short SpectrePaintbrush = 1543; + public const short SpectrePaintRoller = 1544; + public const short SpectrePaintScraper = 1545; + public const short ShroomiteHeadgear = 1546; + public const short ShroomiteMask = 1547; + public const short ShroomiteHelmet = 1548; + public const short ShroomiteBreastplate = 1549; + public const short ShroomiteLeggings = 1550; + public const short Autohammer = 1551; + public const short ShroomiteBar = 1552; + public const short SDMG = 1553; + public const short CenxsTiara = 1554; + public const short CenxsBreastplate = 1555; + public const short CenxsLeggings = 1556; + public const short CrownosMask = 1557; + public const short CrownosBreastplate = 1558; + public const short CrownosLeggings = 1559; + public const short WillsHelmet = 1560; + public const short WillsBreastplate = 1561; + public const short WillsLeggings = 1562; + public const short JimsHelmet = 1563; + public const short JimsBreastplate = 1564; + public const short JimsLeggings = 1565; + public const short AaronsHelmet = 1566; + public const short AaronsBreastplate = 1567; + public const short AaronsLeggings = 1568; + public const short VampireKnives = 1569; + public const short BrokenHeroSword = 1570; + public const short ScourgeoftheCorruptor = 1571; + public const short StaffoftheFrostHydra = 1572; + public const short TheCreationoftheGuide = 1573; + public const short TheMerchant = 1574; + public const short CrownoDevoursHisLunch = 1575; + public const short RareEnchantment = 1576; + public const short GloriousNight = 1577; + public const short SweetheartNecklace = 1578; + public const short FlurryBoots = 1579; + public const short DTownsHelmet = 1580; + public const short DTownsBreastplate = 1581; + public const short DTownsLeggings = 1582; + public const short DTownsWings = 1583; + public const short WillsWings = 1584; + public const short CrownosWings = 1585; + public const short CenxsWings = 1586; + public const short CenxsDress = 1587; + public const short CenxsDressPants = 1588; + public const short PalladiumColumn = 1589; + public const short PalladiumColumnWall = 1590; + public const short BubblegumBlock = 1591; + public const short BubblegumBlockWall = 1592; + public const short TitanstoneBlock = 1593; + public const short TitanstoneBlockWall = 1594; + public const short MagicCuffs = 1595; + public const short MusicBoxSnow = 1596; + public const short MusicBoxSpace = 1597; + public const short MusicBoxCrimson = 1598; + public const short MusicBoxBoss4 = 1599; + public const short MusicBoxAltOverworldDay = 1600; + public const short MusicBoxRain = 1601; + public const short MusicBoxIce = 1602; + public const short MusicBoxDesert = 1603; + public const short MusicBoxOcean = 1604; + public const short MusicBoxDungeon = 1605; + public const short MusicBoxPlantera = 1606; + public const short MusicBoxBoss5 = 1607; + public const short MusicBoxTemple = 1608; + public const short MusicBoxEclipse = 1609; + public const short MusicBoxMushrooms = 1610; + public const short ButterflyDust = 1611; + public const short AnkhCharm = 1612; + public const short AnkhShield = 1613; + public const short BlueFlare = 1614; + public const short AnglerFishBanner = 1615; + public const short AngryNimbusBanner = 1616; + public const short AnomuraFungusBanner = 1617; + public const short AntlionBanner = 1618; + public const short ArapaimaBanner = 1619; + public const short ArmoredSkeletonBanner = 1620; + public const short BatBanner = 1621; + public const short BirdBanner = 1622; + public const short BlackRecluseBanner = 1623; + public const short BloodFeederBanner = 1624; + public const short BloodJellyBanner = 1625; + public const short BloodCrawlerBanner = 1626; + public const short BoneSerpentBanner = 1627; + public const short BunnyBanner = 1628; + public const short ChaosElementalBanner = 1629; + public const short MimicBanner = 1630; + public const short ClownBanner = 1631; + public const short CorruptBunnyBanner = 1632; + public const short CorruptGoldfishBanner = 1633; + public const short CrabBanner = 1634; + public const short CrimeraBanner = 1635; + public const short CrimsonAxeBanner = 1636; + public const short CursedHammerBanner = 1637; + public const short DemonBanner = 1638; + public const short DemonEyeBanner = 1639; + public const short DerplingBanner = 1640; + public const short EaterofSoulsBanner = 1641; + public const short EnchantedSwordBanner = 1642; + public const short ZombieEskimoBanner = 1643; + public const short FaceMonsterBanner = 1644; + public const short FloatyGrossBanner = 1645; + public const short FlyingFishBanner = 1646; + public const short FlyingSnakeBanner = 1647; + public const short FrankensteinBanner = 1648; + public const short FungiBulbBanner = 1649; + public const short FungoFishBanner = 1650; + public const short GastropodBanner = 1651; + public const short GoblinThiefBanner = 1652; + public const short GoblinSorcererBanner = 1653; + public const short GoblinPeonBanner = 1654; + public const short GoblinScoutBanner = 1655; + public const short GoblinWarriorBanner = 1656; + public const short GoldfishBanner = 1657; + public const short HarpyBanner = 1658; + public const short HellbatBanner = 1659; + public const short HerplingBanner = 1660; + public const short HornetBanner = 1661; + public const short IceElementalBanner = 1662; + public const short IcyMermanBanner = 1663; + public const short FireImpBanner = 1664; + public const short JellyfishBanner = 1665; + public const short JungleCreeperBanner = 1666; + public const short LihzahrdBanner = 1667; + public const short ManEaterBanner = 1668; + public const short MeteorHeadBanner = 1669; + public const short MothBanner = 1670; + public const short MummyBanner = 1671; + public const short MushiLadybugBanner = 1672; + public const short ParrotBanner = 1673; + public const short PigronBanner = 1674; + public const short PiranhaBanner = 1675; + public const short PirateBanner = 1676; + public const short PixieBanner = 1677; + public const short RaincoatZombieBanner = 1678; + public const short ReaperBanner = 1679; + public const short SharkBanner = 1680; + public const short SkeletonBanner = 1681; + public const short SkeletonMageBanner = 1682; + public const short SlimeBanner = 1683; + public const short SnowFlinxBanner = 1684; + public const short SpiderBanner = 1685; + public const short SporeZombieBanner = 1686; + public const short SwampThingBanner = 1687; + public const short TortoiseBanner = 1688; + public const short ToxicSludgeBanner = 1689; + public const short UmbrellaSlimeBanner = 1690; + public const short UnicornBanner = 1691; + public const short VampireBanner = 1692; + public const short VultureBanner = 1693; + public const short NypmhBanner = 1694; + public const short WerewolfBanner = 1695; + public const short WolfBanner = 1696; + public const short WorldFeederBanner = 1697; + public const short WormBanner = 1698; + public const short WraithBanner = 1699; + public const short WyvernBanner = 1700; + public const short ZombieBanner = 1701; + public const short GlassPlatform = 1702; + public const short GlassChair = 1703; + public const short GoldenChair = 1704; + public const short GoldenToilet = 1705; + public const short BarStool = 1706; + public const short HoneyChair = 1707; + public const short SteampunkChair = 1708; + public const short GlassDoor = 1709; + public const short GoldenDoor = 1710; + public const short HoneyDoor = 1711; + public const short SteampunkDoor = 1712; + public const short GlassTable = 1713; + public const short BanquetTable = 1714; + public const short Bar = 1715; + public const short GoldenTable = 1716; + public const short HoneyTable = 1717; + public const short SteampunkTable = 1718; + public const short GlassBed = 1719; + public const short GoldenBed = 1720; + public const short HoneyBed = 1721; + public const short SteampunkBed = 1722; + public const short LivingWoodWall = 1723; + public const short FartinaJar = 1724; + public const short Pumpkin = 1725; + public const short PumpkinWall = 1726; + public const short Hay = 1727; + public const short HayWall = 1728; + public const short SpookyWood = 1729; + public const short SpookyWoodWall = 1730; + public const short PumpkinHelmet = 1731; + public const short PumpkinBreastplate = 1732; + public const short PumpkinLeggings = 1733; + public const short CandyApple = 1734; + public const short SoulCake = 1735; + public const short NurseHat = 1736; + public const short NurseShirt = 1737; + public const short NursePants = 1738; + public const short WizardsHat = 1739; + public const short GuyFawkesMask = 1740; + public const short DyeTraderRobe = 1741; + public const short SteampunkGoggles = 1742; + public const short CyborgHelmet = 1743; + public const short CyborgShirt = 1744; + public const short CyborgPants = 1745; + public const short CreeperMask = 1746; + public const short CreeperShirt = 1747; + public const short CreeperPants = 1748; + public const short CatMask = 1749; + public const short CatShirt = 1750; + public const short CatPants = 1751; + public const short GhostMask = 1752; + public const short GhostShirt = 1753; + public const short PumpkinMask = 1754; + public const short PumpkinShirt = 1755; + public const short PumpkinPants = 1756; + public const short RobotMask = 1757; + public const short RobotShirt = 1758; + public const short RobotPants = 1759; + public const short UnicornMask = 1760; + public const short UnicornShirt = 1761; + public const short UnicornPants = 1762; + public const short VampireMask = 1763; + public const short VampireShirt = 1764; + public const short VampirePants = 1765; + public const short WitchHat = 1766; + public const short LeprechaunHat = 1767; + public const short LeprechaunShirt = 1768; + public const short LeprechaunPants = 1769; + public const short PixieShirt = 1770; + public const short PixiePants = 1771; + public const short PrincessHat = 1772; + public const short PrincessDressNew = 1773; + public const short GoodieBag = 1774; + public const short WitchDress = 1775; + public const short WitchBoots = 1776; + public const short BrideofFrankensteinMask = 1777; + public const short BrideofFrankensteinDress = 1778; + public const short KarateTortoiseMask = 1779; + public const short KarateTortoiseShirt = 1780; + public const short KarateTortoisePants = 1781; + public const short CandyCornRifle = 1782; + public const short CandyCorn = 1783; + public const short JackOLanternLauncher = 1784; + public const short ExplosiveJackOLantern = 1785; + public const short Sickle = 1786; + public const short PumpkinPie = 1787; + public const short ScarecrowHat = 1788; + public const short ScarecrowShirt = 1789; + public const short ScarecrowPants = 1790; + public const short Cauldron = 1791; + public const short PumpkinChair = 1792; + public const short PumpkinDoor = 1793; + public const short PumpkinTable = 1794; + public const short PumpkinWorkBench = 1795; + public const short PumpkinPlatform = 1796; + public const short TatteredFairyWings = 1797; + public const short SpiderEgg = 1798; + public const short MagicalPumpkinSeed = 1799; + public const short BatHook = 1800; + public const short BatScepter = 1801; + public const short RavenStaff = 1802; + public const short JungleKeyMold = 1803; + public const short CorruptionKeyMold = 1804; + public const short CrimsonKeyMold = 1805; + public const short HallowedKeyMold = 1806; + public const short FrozenKeyMold = 1807; + public const short HangingJackOLantern = 1808; + public const short RottenEgg = 1809; + public const short UnluckyYarn = 1810; + public const short BlackFairyDust = 1811; + public const short Jackelier = 1812; + public const short JackOLantern = 1813; + public const short SpookyChair = 1814; + public const short SpookyDoor = 1815; + public const short SpookyTable = 1816; + public const short SpookyWorkBench = 1817; + public const short SpookyPlatform = 1818; + public const short ReaperHood = 1819; + public const short ReaperRobe = 1820; + public const short FoxMask = 1821; + public const short FoxShirt = 1822; + public const short FoxPants = 1823; + public const short CatEars = 1824; + public const short BloodyMachete = 1825; + public const short TheHorsemansBlade = 1826; + public const short BladedGlove = 1827; + public const short PumpkinSeed = 1828; + public const short SpookyHook = 1829; + public const short SpookyWings = 1830; + public const short SpookyTwig = 1831; + public const short SpookyHelmet = 1832; + public const short SpookyBreastplate = 1833; + public const short SpookyLeggings = 1834; + public const short StakeLauncher = 1835; + public const short Stake = 1836; + public const short CursedSapling = 1837; + public const short SpaceCreatureMask = 1838; + public const short SpaceCreatureShirt = 1839; + public const short SpaceCreaturePants = 1840; + public const short WolfMask = 1841; + public const short WolfShirt = 1842; + public const short WolfPants = 1843; + public const short PumpkinMoonMedallion = 1844; + public const short NecromanticScroll = 1845; + public const short JackingSkeletron = 1846; + public const short BitterHarvest = 1847; + public const short BloodMoonCountess = 1848; + public const short HallowsEve = 1849; + public const short MorbidCuriosity = 1850; + public const short TreasureHunterShirt = 1851; + public const short TreasureHunterPants = 1852; + public const short DryadCoverings = 1853; + public const short DryadLoincloth = 1854; + public const short MourningWoodTrophy = 1855; + public const short PumpkingTrophy = 1856; + public const short JackOLanternMask = 1857; + public const short SniperScope = 1858; + public const short HeartLantern = 1859; + public const short JellyfishDivingGear = 1860; + public const short ArcticDivingGear = 1861; + public const short FrostsparkBoots = 1862; + public const short FartInABalloon = 1863; + public const short PapyrusScarab = 1864; + public const short CelestialStone = 1865; + public const short Hoverboard = 1866; + public const short CandyCane = 1867; + public const short SugarPlum = 1868; + public const short Present = 1869; + public const short RedRyder = 1870; + public const short FestiveWings = 1871; + public const short PineTreeBlock = 1872; + public const short ChristmasTree = 1873; + public const short StarTopper1 = 1874; + public const short StarTopper2 = 1875; + public const short StarTopper3 = 1876; + public const short BowTopper = 1877; + public const short WhiteGarland = 1878; + public const short WhiteAndRedGarland = 1879; + public const short RedGardland = 1880; + public const short RedAndGreenGardland = 1881; + public const short GreenGardland = 1882; + public const short GreenAndWhiteGarland = 1883; + public const short MulticoloredBulb = 1884; + public const short RedBulb = 1885; + public const short YellowBulb = 1886; + public const short GreenBulb = 1887; + public const short RedAndGreenBulb = 1888; + public const short YellowAndGreenBulb = 1889; + public const short RedAndYellowBulb = 1890; + public const short WhiteBulb = 1891; + public const short WhiteAndRedBulb = 1892; + public const short WhiteAndYellowBulb = 1893; + public const short WhiteAndGreenBulb = 1894; + public const short MulticoloredLights = 1895; + public const short RedLights = 1896; + public const short GreenLights = 1897; + public const short BlueLights = 1898; + public const short YellowLights = 1899; + public const short RedAndYellowLights = 1900; + public const short RedAndGreenLights = 1901; + public const short YellowAndGreenLights = 1902; + public const short BlueAndGreenLights = 1903; + public const short RedAndBlueLights = 1904; + public const short BlueAndYellowLights = 1905; + public const short GiantBow = 1906; + public const short ReindeerAntlers = 1907; + public const short Holly = 1908; + public const short CandyCaneSword = 1909; + public const short EldMelter = 1910; + public const short ChristmasPudding = 1911; + public const short Eggnog = 1912; + public const short StarAnise = 1913; + public const short ReindeerBells = 1914; + public const short CandyCaneHook = 1915; + public const short ChristmasHook = 1916; + public const short CnadyCanePickaxe = 1917; + public const short FruitcakeChakram = 1918; + public const short SugarCookie = 1919; + public const short GingerbreadCookie = 1920; + public const short HandWarmer = 1921; + public const short Coal = 1922; + public const short Toolbox = 1923; + public const short PineDoor = 1924; + public const short PineChair = 1925; + public const short PineTable = 1926; + public const short DogWhistle = 1927; + public const short ChristmasTreeSword = 1928; + public const short ChainGun = 1929; + public const short Razorpine = 1930; + public const short BlizzardStaff = 1931; + public const short MrsClauseHat = 1932; + public const short MrsClauseShirt = 1933; + public const short MrsClauseHeels = 1934; + public const short ParkaHood = 1935; + public const short ParkaCoat = 1936; + public const short ParkaPants = 1937; + public const short SnowHat = 1938; + public const short UglySweater = 1939; + public const short TreeMask = 1940; + public const short TreeShirt = 1941; + public const short TreeTrunks = 1942; + public const short ElfHat = 1943; + public const short ElfShirt = 1944; + public const short ElfPants = 1945; + public const short SnowmanCannon = 1946; + public const short NorthPole = 1947; + public const short ChristmasTreeWallpaper = 1948; + public const short OrnamentWallpaper = 1949; + public const short CandyCaneWallpaper = 1950; + public const short FestiveWallpaper = 1951; + public const short StarsWallpaper = 1952; + public const short SquigglesWallpaper = 1953; + public const short SnowflakeWallpaper = 1954; + public const short KrampusHornWallpaper = 1955; + public const short BluegreenWallpaper = 1956; + public const short GrinchFingerWallpaper = 1957; + public const short NaughtyPresent = 1958; + public const short BabyGrinchMischiefWhistle = 1959; + public const short IceQueenTrophy = 1960; + public const short SantaNK1Trophy = 1961; + public const short EverscreamTrophy = 1962; + public const short MusicBoxPumpkinMoon = 1963; + public const short MusicBoxAltUnderground = 1964; + public const short MusicBoxFrostMoon = 1965; + public const short BrownPaint = 1966; + public const short ShadowPaint = 1967; + public const short NegativePaint = 1968; + public const short TeamDye = 1969; + public const short AmethystGemsparkBlock = 1970; + public const short TopazGemsparkBlock = 1971; + public const short SapphireGemsparkBlock = 1972; + public const short EmeraldGemsparkBlock = 1973; + public const short RubyGemsparkBlock = 1974; + public const short DiamondGemsparkBlock = 1975; + public const short AmberGemsparkBlock = 1976; + public const short LifeHairDye = 1977; + public const short ManaHairDye = 1978; + public const short DepthHairDye = 1979; + public const short MoneyHairDye = 1980; + public const short TimeHairDye = 1981; + public const short TeamHairDye = 1982; + public const short BiomeHairDye = 1983; + public const short PartyHairDye = 1984; + public const short RainbowHairDye = 1985; + public const short SpeedHairDye = 1986; + public const short AngelHalo = 1987; + public const short Fez = 1988; + public const short Womannquin = 1989; + public const short HairDyeRemover = 1990; + public const short BugNet = 1991; + public const short Firefly = 1992; + public const short FireflyinaBottle = 1993; + public const short MonarchButterfly = 1994; + public const short PurpleEmperorButterfly = 1995; + public const short RedAdmiralButterfly = 1996; + public const short UlyssesButterfly = 1997; + public const short SulphurButterfly = 1998; + public const short TreeNymphButterfly = 1999; + public const short ZebraSwallowtailButterfly = 2000; + public const short JuliaButterfly = 2001; + public const short Worm = 2002; + public const short Mouse = 2003; + public const short LightningBug = 2004; + public const short LightningBuginaBottle = 2005; + public const short Snail = 2006; + public const short GlowingSnail = 2007; + public const short FancyGreyWallpaper = 2008; + public const short IceFloeWallpaper = 2009; + public const short MusicWallpaper = 2010; + public const short PurpleRainWallpaper = 2011; + public const short RainbowWallpaper = 2012; + public const short SparkleStoneWallpaper = 2013; + public const short StarlitHeavenWallpaper = 2014; + public const short Bird = 2015; + public const short BlueJay = 2016; + public const short Cardinal = 2017; + public const short Squirrel = 2018; + public const short Bunny = 2019; + public const short CactusBookcase = 2020; + public const short EbonwoodBookcase = 2021; + public const short FleshBookcase = 2022; + public const short HoneyBookcase = 2023; + public const short SteampunkBookcase = 2024; + public const short GlassBookcase = 2025; + public const short RichMahoganyBookcase = 2026; + public const short PearlwoodBookcase = 2027; + public const short SpookyBookcase = 2028; + public const short SkywareBookcase = 2029; + public const short LihzahrdBookcase = 2030; + public const short FrozenBookcase = 2031; + public const short CactusLantern = 2032; + public const short EbonwoodLantern = 2033; + public const short FleshLantern = 2034; + public const short HoneyLantern = 2035; + public const short SteampunkLantern = 2036; + public const short GlassLantern = 2037; + public const short RichMahoganyLantern = 2038; + public const short PearlwoodLantern = 2039; + public const short FrozenLantern = 2040; + public const short LihzahrdLantern = 2041; + public const short SkywareLantern = 2042; + public const short SpookyLantern = 2043; + public const short FrozenDoor = 2044; + public const short CactusCandle = 2045; + public const short EbonwoodCandle = 2046; + public const short FleshCandle = 2047; + public const short GlassCandle = 2048; + public const short FrozenCandle = 2049; + public const short RichMahoganyCandle = 2050; + public const short PearlwoodCandle = 2051; + public const short LihzahrdCandle = 2052; + public const short SkywareCandle = 2053; + public const short PumpkinCandle = 2054; + public const short CactusChandelier = 2055; + public const short EbonwoodChandelier = 2056; + public const short FleshChandelier = 2057; + public const short HoneyChandelier = 2058; + public const short FrozenChandelier = 2059; + public const short RichMahoganyChandelier = 2060; + public const short PearlwoodChandelier = 2061; + public const short LihzahrdChandelier = 2062; + public const short SkywareChandelier = 2063; + public const short SpookyChandelier = 2064; + public const short GlassChandelier = 2065; + public const short CactusBed = 2066; + public const short FleshBed = 2067; + public const short FrozenBed = 2068; + public const short LihzahrdBed = 2069; + public const short SkywareBed = 2070; + public const short SpookyBed = 2071; + public const short CactusBathtub = 2072; + public const short EbonwoodBathtub = 2073; + public const short FleshBathtub = 2074; + public const short GlassBathtub = 2075; + public const short FrozenBathtub = 2076; + public const short RichMahoganyBathtub = 2077; + public const short PearlwoodBathtub = 2078; + public const short LihzahrdBathtub = 2079; + public const short SkywareBathtub = 2080; + public const short SpookyBathtub = 2081; + public const short CactusLamp = 2082; + public const short EbonwoodLamp = 2083; + public const short FleshLamp = 2084; + public const short GlassLamp = 2085; + public const short FrozenLamp = 2086; + public const short RichMahoganyLamp = 2087; + public const short PearlwoodLamp = 2088; + public const short LihzahrdLamp = 2089; + public const short SkywareLamp = 2090; + public const short SpookyLamp = 2091; + public const short CactusCandelabra = 2092; + public const short EbonwoodCandelabra = 2093; + public const short FleshCandelabra = 2094; + public const short HoneyCandelabra = 2095; + public const short SteampunkCandelabra = 2096; + public const short GlassCandelabra = 2097; + public const short RichMahoganyCandelabra = 2098; + public const short PearlwoodCandelabra = 2099; + public const short FrozenCandelabra = 2100; + public const short LihzahrdCandelabra = 2101; + public const short SkywareCandelabra = 2102; + public const short SpookyCandelabra = 2103; + public const short BrainMask = 2104; + public const short FleshMask = 2105; + public const short TwinMask = 2106; + public const short SkeletronPrimeMask = 2107; + public const short BeeMask = 2108; + public const short PlanteraMask = 2109; + public const short GolemMask = 2110; + public const short EaterMask = 2111; + public const short EyeMask = 2112; + public const short DestroyerMask = 2113; + public const short BlacksmithRack = 2114; + public const short CarpentryRack = 2115; + public const short HelmetRack = 2116; + public const short SpearRack = 2117; + public const short SwordRack = 2118; + public const short StoneSlab = 2119; + public const short SandstoneSlab = 2120; + public const short Frog = 2121; + public const short MallardDuck = 2122; + public const short Duck = 2123; + public const short HoneyBathtub = 2124; + public const short SteampunkBathtub = 2125; + public const short LivingWoodBathtub = 2126; + public const short ShadewoodBathtub = 2127; + public const short BoneBathtub = 2128; + public const short HoneyLamp = 2129; + public const short SteampunkLamp = 2130; + public const short LivingWoodLamp = 2131; + public const short ShadewoodLamp = 2132; + public const short GoldenLamp = 2133; + public const short BoneLamp = 2134; + public const short LivingWoodBookcase = 2135; + public const short ShadewoodBookcase = 2136; + public const short GoldenBookcase = 2137; + public const short BoneBookcase = 2138; + public const short LivingWoodBed = 2139; + public const short BoneBed = 2140; + public const short LivingWoodChandelier = 2141; + public const short ShadewoodChandelier = 2142; + public const short GoldenChandelier = 2143; + public const short BoneChandelier = 2144; + public const short LivingWoodLantern = 2145; + public const short ShadewoodLantern = 2146; + public const short GoldenLantern = 2147; + public const short BoneLantern = 2148; + public const short LivingWoodCandelabra = 2149; + public const short ShadewoodCandelabra = 2150; + public const short GoldenCandelabra = 2151; + public const short BoneCandelabra = 2152; + public const short LivingWoodCandle = 2153; + public const short ShadewoodCandle = 2154; + public const short GoldenCandle = 2155; + public const short BlackScorpion = 2156; + public const short Scorpion = 2157; + public const short BubbleWallpaper = 2158; + public const short CopperPipeWallpaper = 2159; + public const short DuckyWallpaper = 2160; + public const short FrostCore = 2161; + public const short BunnyCage = 2162; + public const short SquirrelCage = 2163; + public const short MallardDuckCage = 2164; + public const short DuckCage = 2165; + public const short BirdCage = 2166; + public const short BlueJayCage = 2167; + public const short CardinalCage = 2168; + public const short WaterfallWall = 2169; + public const short LavafallWall = 2170; + public const short CrimsonSeeds = 2171; + public const short HeavyWorkBench = 2172; + public const short CopperPlating = 2173; + public const short SnailCage = 2174; + public const short GlowingSnailCage = 2175; + public const short ShroomiteDiggingClaw = 2176; + public const short AmmoBox = 2177; + public const short MonarchButterflyJar = 2178; + public const short PurpleEmperorButterflyJar = 2179; + public const short RedAdmiralButterflyJar = 2180; + public const short UlyssesButterflyJar = 2181; + public const short SulphurButterflyJar = 2182; + public const short TreeNymphButterflyJar = 2183; + public const short ZebraSwallowtailButterflyJar = 2184; + public const short JuliaButterflyJar = 2185; + public const short ScorpionCage = 2186; + public const short BlackScorpionCage = 2187; + public const short VenomStaff = 2188; + public const short SpectreMask = 2189; + public const short FrogCage = 2190; + public const short MouseCage = 2191; + public const short BoneWelder = 2192; + public const short FleshCloningVaat = 2193; + public const short GlassKiln = 2194; + public const short LihzahrdFurnace = 2195; + public const short LivingLoom = 2196; + public const short SkyMill = 2197; + public const short IceMachine = 2198; + public const short BeetleHelmet = 2199; + public const short BeetleScaleMail = 2200; + public const short BeetleShell = 2201; + public const short BeetleLeggings = 2202; + public const short SteampunkBoiler = 2203; + public const short HoneyDispenser = 2204; + public const short Penguin = 2205; + public const short PenguinCage = 2206; + public const short WormCage = 2207; + public const short Terrarium = 2208; + public const short SuperManaPotion = 2209; + public const short EbonwoodFence = 2210; + public const short RichMahoganyFence = 2211; + public const short PearlwoodFence = 2212; + public const short ShadewoodFence = 2213; + public const short BrickLayer = 2214; + public const short ExtendoGrip = 2215; + public const short PaintSprayer = 2216; + public const short PortableCementMixer = 2217; + public const short BeetleHusk = 2218; + public const short CelestialMagnet = 2219; + public const short CelestialEmblem = 2220; + public const short CelestialCuffs = 2221; + public const short PeddlersHat = 2222; + public const short PulseBow = 2223; + public const short DynastyChandelier = 2224; + public const short DynastyLamp = 2225; + public const short DynastyLantern = 2226; + public const short DynastyCandelabra = 2227; + public const short DynastyChair = 2228; + public const short DynastyWorkBench = 2229; + public const short DynastyChest = 2230; + public const short DynastyBed = 2231; + public const short DynastyBathtub = 2232; + public const short DynastyBookcase = 2233; + public const short DynastyCup = 2234; + public const short DynastyBowl = 2235; + public const short DynastyCandle = 2236; + public const short DynastyClock = 2237; + public const short GoldenClock = 2238; + public const short GlassClock = 2239; + public const short HoneyClock = 2240; + public const short SteampunkClock = 2241; + public const short FancyDishes = 2242; + public const short GlassBowl = 2243; + public const short WineGlass = 2244; + public const short LivingWoodPiano = 2245; + public const short FleshPiano = 2246; + public const short FrozenPiano = 2247; + public const short FrozenTable = 2248; + public const short HoneyChest = 2249; + public const short SteampunkChest = 2250; + public const short HoneyWorkBench = 2251; + public const short FrozenWorkBench = 2252; + public const short SteampunkWorkBench = 2253; + public const short GlassPiano = 2254; + public const short HoneyPiano = 2255; + public const short SteampunkPiano = 2256; + public const short HoneyCup = 2257; + public const short SteampunkCup = 2258; + public const short DynastyTable = 2259; + public const short DynastyWood = 2260; + public const short RedDynastyShingles = 2261; + public const short BlueDynastyShingles = 2262; + public const short WhiteDynastyWall = 2263; + public const short BlueDynastyWall = 2264; + public const short DynastyDoor = 2265; + public const short Sake = 2266; + public const short PadThai = 2267; + public const short Pho = 2268; + public const short Revolver = 2269; + public const short Gatligator = 2270; + public const short ArcaneRuneWall = 2271; + public const short WaterGun = 2272; + public const short Katana = 2273; + public const short UltrabrightTorch = 2274; + public const short MagicHat = 2275; + public const short DiamondRing = 2276; + public const short Gi = 2277; + public const short Kimono = 2278; + public const short GypsyRobe = 2279; + public const short BeetleWings = 2280; + public const short TigerSkin = 2281; + public const short LeopardSkin = 2282; + public const short ZebraSkin = 2283; + public const short CrimsonCloak = 2284; + public const short MysteriousCape = 2285; + public const short RedCape = 2286; + public const short WinterCape = 2287; + public const short FrozenChair = 2288; + public const short WoodFishingPole = 2289; + public const short Bass = 2290; + public const short ReinforcedFishingPole = 2291; + public const short FiberglassFishingPole = 2292; + public const short FisherofSouls = 2293; + public const short GoldenFishingRod = 2294; + public const short MechanicsRod = 2295; + public const short SittingDucksFishingRod = 2296; + public const short Trout = 2297; + public const short Salmon = 2298; + public const short AtlanticCod = 2299; + public const short Tuna = 2300; + public const short RedSnapper = 2301; + public const short NeonTetra = 2302; + public const short ArmoredCavefish = 2303; + public const short Damselfish = 2304; + public const short CrimsonTigerfish = 2305; + public const short FrostMinnow = 2306; + public const short PrincessFish = 2307; + public const short GoldenCarp = 2308; + public const short SpecularFish = 2309; + public const short Prismite = 2310; + public const short VariegatedLardfish = 2311; + public const short FlarefinKoi = 2312; + public const short DoubleCod = 2313; + public const short Honeyfin = 2314; + public const short Obsidifish = 2315; + public const short Shrimp = 2316; + public const short ChaosFish = 2317; + public const short Ebonkoi = 2318; + public const short Hemopiranha = 2319; + public const short Rockfish = 2320; + public const short Stinkfish = 2321; + public const short MiningPotion = 2322; + public const short HeartreachPotion = 2323; + public const short CalmingPotion = 2324; + public const short BuilderPotion = 2325; + public const short TitanPotion = 2326; + public const short FlipperPotion = 2327; + public const short SummoningPotion = 2328; + public const short TrapsightPotion = 2329; + public const short PurpleClubberfish = 2330; + public const short ObsidianSwordfish = 2331; + public const short Swordfish = 2332; + public const short IronFence = 2333; + public const short WoodenCrate = 2334; + public const short IronCrate = 2335; + public const short GoldenCrate = 2336; + public const short OldShoe = 2337; + public const short FishingSeaweed = 2338; + public const short TinCan = 2339; + public const short MinecartTrack = 2340; + public const short ReaverShark = 2341; + public const short SawtoothShark = 2342; + public const short Minecart = 2343; + public const short AmmoReservationPotion = 2344; + public const short LifeforcePotion = 2345; + public const short EndurancePotion = 2346; + public const short RagePotion = 2347; + public const short InfernoPotion = 2348; + public const short WrathPotion = 2349; + public const short RecallPotion = 2350; + public const short TeleportationPotion = 2351; + public const short LovePotion = 2352; + public const short StinkPotion = 2353; + public const short FishingPotion = 2354; + public const short SonarPotion = 2355; + public const short CratePotion = 2356; + public const short ShiverthornSeeds = 2357; + public const short Shiverthorn = 2358; + public const short WarmthPotion = 2359; + public const short FishHook = 2360; + public const short BeeHeadgear = 2361; + public const short BeeBreastplate = 2362; + public const short BeeGreaves = 2363; + public const short HornetStaff = 2364; + public const short ImpStaff = 2365; + public const short QueenSpiderStaff = 2366; + public const short AnglerHat = 2367; + public const short AnglerVest = 2368; + public const short AnglerPants = 2369; + public const short SpiderMask = 2370; + public const short SpiderBreastplate = 2371; + public const short SpiderGreaves = 2372; + public const short HighTestFishingLine = 2373; + public const short AnglerEarring = 2374; + public const short TackleBox = 2375; + public const short BlueDungeonPiano = 2376; + public const short GreenDungeonPiano = 2377; + public const short PinkDungeonPiano = 2378; + public const short GoldenPiano = 2379; + public const short ObsidianPiano = 2380; + public const short BonePiano = 2381; + public const short CactusPiano = 2382; + public const short SpookyPiano = 2383; + public const short SkywarePiano = 2384; + public const short LihzahrdPiano = 2385; + public const short BlueDungeonDresser = 2386; + public const short GreenDungeonDresser = 2387; + public const short PinkDungeonDresser = 2388; + public const short GoldenDresser = 2389; + public const short ObsidianDresser = 2390; + public const short BoneDresser = 2391; + public const short CactusDresser = 2392; + public const short SpookyDresser = 2393; + public const short SkywareDresser = 2394; + public const short HoneyDresser = 2395; + public const short LihzahrdDresser = 2396; + public const short Sofa = 2397; + public const short EbonwoodSofa = 2398; + public const short RichMahoganySofa = 2399; + public const short PearlwoodSofa = 2400; + public const short ShadewoodSofa = 2401; + public const short BlueDungeonSofa = 2402; + public const short GreenDungeonSofa = 2403; + public const short PinkDungeonSofa = 2404; + public const short GoldenSofa = 2405; + public const short ObsidianSofa = 2406; + public const short BoneSofa = 2407; + public const short CactusSofa = 2408; + public const short SpookySofa = 2409; + public const short SkywareSofa = 2410; + public const short HoneySofa = 2411; + public const short SteampunkSofa = 2412; + public const short MushroomSofa = 2413; + public const short GlassSofa = 2414; + public const short PumpkinSofa = 2415; + public const short LihzahrdSofa = 2416; + public const short SeashellHairpin = 2417; + public const short MermaidAdornment = 2418; + public const short MermaidTail = 2419; + public const short ZephyrFish = 2420; + public const short Fleshcatcher = 2421; + public const short HotlineFishingHook = 2422; + public const short FrogLeg = 2423; + public const short Anchor = 2424; + public const short CookedFish = 2425; + public const short CookedShrimp = 2426; + public const short Sashimi = 2427; + public const short FuzzyCarrot = 2428; + public const short ScalyTruffle = 2429; + public const short SlimySaddle = 2430; + public const short BeeWax = 2431; + public const short CopperPlatingWall = 2432; + public const short StoneSlabWall = 2433; + public const short Sail = 2434; + public const short CoralstoneBlock = 2435; + public const short BlueJellyfish = 2436; + public const short GreenJellyfish = 2437; + public const short PinkJellyfish = 2438; + public const short BlueJellyfishJar = 2439; + public const short GreenJellyfishJar = 2440; + public const short PinkJellyfishJar = 2441; + public const short LifePreserver = 2442; + public const short ShipsWheel = 2443; + public const short CompassRose = 2444; + public const short WallAnchor = 2445; + public const short GoldfishTrophy = 2446; + public const short BunnyfishTrophy = 2447; + public const short SwordfishTrophy = 2448; + public const short SharkteethTrophy = 2449; + public const short Batfish = 2450; + public const short BumblebeeTuna = 2451; + public const short Catfish = 2452; + public const short Cloudfish = 2453; + public const short Cursedfish = 2454; + public const short Dirtfish = 2455; + public const short DynamiteFish = 2456; + public const short EaterofPlankton = 2457; + public const short FallenStarfish = 2458; + public const short TheFishofCthulu = 2459; + public const short Fishotron = 2460; + public const short Harpyfish = 2461; + public const short Hungerfish = 2462; + public const short Ichorfish = 2463; + public const short Jewelfish = 2464; + public const short MirageFish = 2465; + public const short MutantFlinxfin = 2466; + public const short Pengfish = 2467; + public const short Pixiefish = 2468; + public const short Spiderfish = 2469; + public const short TundraTrout = 2470; + public const short UnicornFish = 2471; + public const short GuideVoodooFish = 2472; + public const short Wyverntail = 2473; + public const short ZombieFish = 2474; + public const short AmanitaFungifin = 2475; + public const short Angelfish = 2476; + public const short BloodyManowar = 2477; + public const short Bonefish = 2478; + public const short Bunnyfish = 2479; + public const short CapnTunabeard = 2480; + public const short Clownfish = 2481; + public const short DemonicHellfish = 2482; + public const short Derpfish = 2483; + public const short Fishron = 2484; + public const short InfectedScabbardfish = 2485; + public const short Mudfish = 2486; + public const short Slimefish = 2487; + public const short TropicalBarracuda = 2488; + public const short KingSlimeTrophy = 2489; + public const short ShipInABottle = 2490; + public const short HardySaddle = 2491; + public const short PressureTrack = 2492; + public const short KingSlimeMask = 2493; + public const short FinWings = 2494; + public const short TreasureMap = 2495; + public const short SeaweedPlanter = 2496; + public const short PillaginMePixels = 2497; + public const short FishCostumeMask = 2498; + public const short FishCostumeShirt = 2499; + public const short FishCostumeFinskirt = 2500; + public const short GingerBeard = 2501; + public const short HoneyedGoggles = 2502; + public const short BorealWood = 2503; + public const short PalmWood = 2504; + public const short BorealWoodWall = 2505; + public const short PalmWoodWall = 2506; + public const short BorealWoodFence = 2507; + public const short PalmWoodFence = 2508; + public const short BorealWoodHelmet = 2509; + public const short BorealWoodBreastplate = 2510; + public const short BorealWoodGreaves = 2511; + public const short PalmWoodHelmet = 2512; + public const short PalmWoodBreastplate = 2513; + public const short PalmWoodGreaves = 2514; + public const short PalmWoodBow = 2515; + public const short PalmWoodHammer = 2516; + public const short PalmWoodSword = 2517; + public const short PalmWoodPlatform = 2518; + public const short PalmWoodBathtub = 2519; + public const short PalmWoodBed = 2520; + public const short PalmWoodBench = 2521; + public const short PalmWoodCandelabra = 2522; + public const short PalmWoodCandle = 2523; + public const short PalmWoodChair = 2524; + public const short PalmWoodChandelier = 2525; + public const short PalmWoodChest = 2526; + public const short PalmWoodSofa = 2527; + public const short PalmWoodDoor = 2528; + public const short PalmWoodDresser = 2529; + public const short PalmWoodLantern = 2530; + public const short PalmWoodPiano = 2531; + public const short PalmWoodTable = 2532; + public const short PalmWoodLamp = 2533; + public const short PalmWoodWorkBench = 2534; + public const short OpticStaff = 2535; + public const short PalmWoodBookcase = 2536; + public const short MushroomBathtub = 2537; + public const short MushroomBed = 2538; + public const short MushroomBench = 2539; + public const short MushroomBookcase = 2540; + public const short MushroomCandelabra = 2541; + public const short MushroomCandle = 2542; + public const short MushroomChandelier = 2543; + public const short MushroomChest = 2544; + public const short MushroomDresser = 2545; + public const short MushroomLantern = 2546; + public const short MushroomLamp = 2547; + public const short MushroomPiano = 2548; + public const short MushroomPlatform = 2549; + public const short MushroomTable = 2550; + public const short SpiderStaff = 2551; + public const short BorealWoodBathtub = 2552; + public const short BorealWoodBed = 2553; + public const short BorealWoodBookcase = 2554; + public const short BorealWoodCandelabra = 2555; + public const short BorealWoodCandle = 2556; + public const short BorealWoodChair = 2557; + public const short BorealWoodChandelier = 2558; + public const short BorealWoodChest = 2559; + public const short BorealWoodClock = 2560; + public const short BorealWoodDoor = 2561; + public const short BorealWoodDresser = 2562; + public const short BorealWoodLamp = 2563; + public const short BorealWoodLantern = 2564; + public const short BorealWoodPiano = 2565; + public const short BorealWoodPlatform = 2566; + public const short SlimeBathtub = 2567; + public const short SlimeBed = 2568; + public const short SlimeBookcase = 2569; + public const short SlimeCandelabra = 2570; + public const short SlimeCandle = 2571; + public const short SlimeChair = 2572; + public const short SlimeChandelier = 2573; + public const short SlimeChest = 2574; + public const short SlimeClock = 2575; + public const short SlimeDoor = 2576; + public const short SlimeDresser = 2577; + public const short SlimeLamp = 2578; + public const short SlimeLantern = 2579; + public const short SlimePiano = 2580; + public const short SlimePlatform = 2581; + public const short SlimeSofa = 2582; + public const short SlimeTable = 2583; + public const short PirateStaff = 2584; + public const short SlimeHook = 2585; + public const short StickyGrenade = 2586; + public const short TartarSauce = 2587; + public const short DukeFishronMask = 2588; + public const short DukeFishronTrophy = 2589; + public const short MolotovCocktail = 2590; + public const short BoneClock = 2591; + public const short CactusClock = 2592; + public const short EbonwoodClock = 2593; + public const short FrozenClock = 2594; + public const short LihzahrdClock = 2595; + public const short LivingWoodClock = 2596; + public const short RichMahoganyClock = 2597; + public const short FleshClock = 2598; + public const short MushroomClock = 2599; + public const short ObsidianClock = 2600; + public const short PalmWoodClock = 2601; + public const short PearlwoodClock = 2602; + public const short PumpkinClock = 2603; + public const short ShadewoodClock = 2604; + public const short SpookyClock = 2605; + public const short SkywareClock = 2606; + public const short SpiderFang = 2607; + public const short FalconBlade = 2608; + public const short FishronWings = 2609; + public const short SlimeGun = 2610; + public const short Flairon = 2611; + public const short GreenDungeonChest = 2612; + public const short PinkDungeonChest = 2613; + public const short BlueDungeonChest = 2614; + public const short BoneChest = 2615; + public const short CactusChest = 2616; + public const short FleshChest = 2617; + public const short ObsidianChest = 2618; + public const short PumpkinChest = 2619; + public const short SpookyChest = 2620; + public const short TempestStaff = 2621; + public const short RazorbladeTyphoon = 2622; + public const short BubbleGun = 2623; + public const short Tsunami = 2624; + public const short Seashell = 2625; + public const short Starfish = 2626; + public const short SteampunkPlatform = 2627; + public const short SkywarePlatform = 2628; + public const short LivingWoodPlatform = 2629; + public const short HoneyPlatform = 2630; + public const short SkywareWorkbench = 2631; + public const short GlassWorkBench = 2632; + public const short LivingWoodWorkBench = 2633; + public const short FleshSofa = 2634; + public const short FrozenSofa = 2635; + public const short LivingWoodSofa = 2636; + public const short PumpkinDresser = 2637; + public const short SteampunkDresser = 2638; + public const short GlassDresser = 2639; + public const short FleshDresser = 2640; + public const short PumpkinLantern = 2641; + public const short ObsidianLantern = 2642; + public const short PumpkinLamp = 2643; + public const short ObsidianLamp = 2644; + public const short BlueDungeonLamp = 2645; + public const short GreenDungeonLamp = 2646; + public const short PinkDungeonLamp = 2647; + public const short HoneyCandle = 2648; + public const short SteampunkCandle = 2649; + public const short SpookyCandle = 2650; + public const short ObsidianCandle = 2651; + public const short BlueDungeonChandelier = 2652; + public const short GreenDungeonChandelier = 2653; + public const short PinkDungeonChandelier = 2654; + public const short SteampunkChandelier = 2655; + public const short PumpkinChandelier = 2656; + public const short ObsidianChandelier = 2657; + public const short BlueDungeonBathtub = 2658; + public const short GreenDungeonBathtub = 2659; + public const short PinkDungeonBathtub = 2660; + public const short PumpkinBathtub = 2661; + public const short ObsidianBathtub = 2662; + public const short GoldenBathtub = 2663; + public const short BlueDungeonCandelabra = 2664; + public const short GreenDungeonCandelabra = 2665; + public const short PinkDungeonCandelabra = 2666; + public const short ObsidianCandelabra = 2667; + public const short PumpkinCandelabra = 2668; + public const short PumpkinBed = 2669; + public const short PumpkinBookcase = 2670; + public const short PumpkinPiano = 2671; + public const short SharkStatue = 2672; + public const short TruffleWorm = 2673; + public const short ApprenticeBait = 2674; + public const short JourneymanBait = 2675; + public const short MasterBait = 2676; + public const short AmberGemsparkWall = 2677; + public const short AmberGemsparkWallOff = 2678; + public const short AmethystGemsparkWall = 2679; + public const short AmethystGemsparkWallOff = 2680; + public const short DiamondGemsparkWall = 2681; + public const short DiamondGemsparkWallOff = 2682; + public const short EmeraldGemsparkWall = 2683; + public const short EmeraldGemsparkWallOff = 2684; + public const short RubyGemsparkWall = 2685; + public const short RubyGemsparkWallOff = 2686; + public const short SapphireGemsparkWall = 2687; + public const short SapphireGemsparkWallOff = 2688; + public const short TopazGemsparkWall = 2689; + public const short TopazGemsparkWallOff = 2690; + public const short TinPlatingWall = 2691; + public const short TinPlating = 2692; + public const short WaterfallBlock = 2693; + public const short LavafallBlock = 2694; + public const short ConfettiBlock = 2695; + public const short ConfettiWall = 2696; + public const short ConfettiBlockBlack = 2697; + public const short ConfettiWallBlack = 2698; + public const short WeaponRack = 2699; + public const short FireworksBox = 2700; + public const short LivingFireBlock = 2701; + public const short AlphabetStatue0 = 2702; + public const short AlphabetStatue1 = 2703; + public const short AlphabetStatue2 = 2704; + public const short AlphabetStatue3 = 2705; + public const short AlphabetStatue4 = 2706; + public const short AlphabetStatue5 = 2707; + public const short AlphabetStatue6 = 2708; + public const short AlphabetStatue7 = 2709; + public const short AlphabetStatue8 = 2710; + public const short AlphabetStatue9 = 2711; + public const short AlphabetStatueA = 2712; + public const short AlphabetStatueB = 2713; + public const short AlphabetStatueC = 2714; + public const short AlphabetStatueD = 2715; + public const short AlphabetStatueE = 2716; + public const short AlphabetStatueF = 2717; + public const short AlphabetStatueG = 2718; + public const short AlphabetStatueH = 2719; + public const short AlphabetStatueI = 2720; + public const short AlphabetStatueJ = 2721; + public const short AlphabetStatueK = 2722; + public const short AlphabetStatueL = 2723; + public const short AlphabetStatueM = 2724; + public const short AlphabetStatueN = 2725; + public const short AlphabetStatueO = 2726; + public const short AlphabetStatueP = 2727; + public const short AlphabetStatueQ = 2728; + public const short AlphabetStatueR = 2729; + public const short AlphabetStatueS = 2730; + public const short AlphabetStatueT = 2731; + public const short AlphabetStatueU = 2732; + public const short AlphabetStatueV = 2733; + public const short AlphabetStatueW = 2734; + public const short AlphabetStatueX = 2735; + public const short AlphabetStatueY = 2736; + public const short AlphabetStatueZ = 2737; + public const short FireworkFountain = 2738; + public const short BoosterTrack = 2739; + public const short Grasshopper = 2740; + public const short GrasshopperCage = 2741; + public const short MusicBoxUndergroundCrimson = 2742; + public const short CactusTable = 2743; + public const short CactusPlatform = 2744; + public const short BorealWoodSword = 2745; + public const short BorealWoodHammer = 2746; + public const short BorealWoodBow = 2747; + public const short GlassChest = 2748; + public const short XenoStaff = 2749; + public const short MeteorStaff = 2750; + public const short LivingCursedFireBlock = 2751; + public const short LivingDemonFireBlock = 2752; + public const short LivingFrostFireBlock = 2753; + public const short LivingIchorBlock = 2754; + public const short LivingUltrabrightFireBlock = 2755; + public const short GenderChangePotion = 2756; + public const short VortexHelmet = 2757; + public const short VortexBreastplate = 2758; + public const short VortexLeggings = 2759; + public const short NebulaHelmet = 2760; + public const short NebulaBreastplate = 2761; + public const short NebulaLeggings = 2762; + public const short SolarFlareHelmet = 2763; + public const short SolarFlareBreastplate = 2764; + public const short SolarFlareLeggings = 2765; + public const short LunarTabletFragment = 2766; + public const short SolarTablet = 2767; + public const short DrillContainmentUnit = 2768; + public const short CosmicCarKey = 2769; + public const short MothronWings = 2770; + public const short BrainScrambler = 2771; + public const short VortexAxe = 2772; + public const short VortexChainsaw = 2773; + public const short VortexDrill = 2774; + public const short VortexHammer = 2775; + public const short VortexPickaxe = 2776; + public const short NebulaAxe = 2777; + public const short NebulaChainsaw = 2778; + public const short NebulaDrill = 2779; + public const short NebulaHammer = 2780; + public const short NebulaPickaxe = 2781; + public const short SolarFlareAxe = 2782; + public const short SolarFlareChainsaw = 2783; + public const short SolarFlareDrill = 2784; + public const short SolarFlareHammer = 2785; + public const short SolarFlarePickaxe = 2786; + public const short HoneyfallBlock = 2787; + public const short HoneyfallWall = 2788; + public const short ChlorophyteBrickWall = 2789; + public const short CrimtaneBrickWall = 2790; + public const short ShroomitePlatingWall = 2791; + public const short ChlorophyteBrick = 2792; + public const short CrimtaneBrick = 2793; + public const short ShroomitePlating = 2794; + public const short LaserMachinegun = 2795; + public const short ElectrosphereLauncher = 2796; + public const short Xenopopper = 2797; + public const short LaserDrill = 2798; + public const short LaserRuler = 2799; + public const short AntiGravityHook = 2800; + public const short MoonMask = 2801; + public const short SunMask = 2802; + public const short MartianCostumeMask = 2803; + public const short MartianCostumeShirt = 2804; + public const short MartianCostumePants = 2805; + public const short MartianUniformHelmet = 2806; + public const short MartianUniformTorso = 2807; + public const short MartianUniformPants = 2808; + public const short MartianAstroClock = 2809; + public const short MartianBathtub = 2810; + public const short MartianBed = 2811; + public const short MartianHoverChair = 2812; + public const short MartianChandelier = 2813; + public const short MartianChest = 2814; + public const short MartianDoor = 2815; + public const short MartianDresser = 2816; + public const short MartianHolobookcase = 2817; + public const short MartianHoverCandle = 2818; + public const short MartianLamppost = 2819; + public const short MartianLantern = 2820; + public const short MartianPiano = 2821; + public const short MartianPlatform = 2822; + public const short MartianSofa = 2823; + public const short MartianTable = 2824; + public const short MartianTableLamp = 2825; + public const short MartianWorkBench = 2826; + public const short WoodenSink = 2827; + public const short EbonwoodSink = 2828; + public const short RichMahoganySink = 2829; + public const short PearlwoodSink = 2830; + public const short BoneSink = 2831; + public const short FleshSink = 2832; + public const short LivingWoodSink = 2833; + public const short SkywareSink = 2834; + public const short ShadewoodSink = 2835; + public const short LihzahrdSink = 2836; + public const short BlueDungeonSink = 2837; + public const short GreenDungeonSink = 2838; + public const short PinkDungeonSink = 2839; + public const short ObsidianSink = 2840; + public const short MetalSink = 2841; + public const short GlassSink = 2842; + public const short GoldenSink = 2843; + public const short HoneySink = 2844; + public const short SteampunkSink = 2845; + public const short PumpkinSink = 2846; + public const short SpookySink = 2847; + public const short FrozenSink = 2848; + public const short DynastySink = 2849; + public const short PalmWoodSink = 2850; + public const short MushroomSink = 2851; + public const short BorealWoodSink = 2852; + public const short SlimeSink = 2853; + public const short CactusSink = 2854; + public const short MartianSink = 2855; + public const short WhiteLunaticHood = 2856; + public const short BlueLunaticHood = 2857; + public const short WhiteLunaticRobe = 2858; + public const short BlueLunaticRobe = 2859; + public const short MartianConduitPlating = 2860; + public const short MartianConduitWall = 2861; + public const short HiTekSunglasses = 2862; + public const short MartianHairDye = 2863; + public const short MartianArmorDye = 2864; + public const short PaintingCastleMarsberg = 2865; + public const short PaintingMartiaLisa = 2866; + public const short PaintingTheTruthIsUpThere = 2867; + public const short SmokeBlock = 2868; + public const short LivingFlameDye = 2869; + public const short LivingRainbowDye = 2870; + public const short ShadowDye = 2871; + public const short NegativeDye = 2872; + public const short LivingOceanDye = 2873; + public const short BrownDye = 2874; + public const short BrownAndBlackDye = 2875; + public const short BrightBrownDye = 2876; + public const short BrownAndSilverDye = 2877; + public const short WispDye = 2878; + public const short PixieDye = 2879; + public const short InfluxWaver = 2880; + public const short PhasicWarpEjector = 2881; + public const short ChargedBlasterCannon = 2882; + public const short ChlorophyteDye = 2883; + public const short UnicornWispDye = 2884; + public const short InfernalWispDye = 2885; + public const short ViciousPowder = 2886; + public const short ViciousMushroom = 2887; + public const short BeesKnees = 2888; + public const short GoldBird = 2889; + public const short GoldBunny = 2890; + public const short GoldButterfly = 2891; + public const short GoldFrog = 2892; + public const short GoldGrasshopper = 2893; + public const short GoldMouse = 2894; + public const short GoldWorm = 2895; + public const short StickyDynamite = 2896; + public const short AngryTrapperBanner = 2897; + public const short ArmoredVikingBanner = 2898; + public const short BlackSlimeBanner = 2899; + public const short BlueArmoredBonesBanner = 2900; + public const short BlueCultistArcherBanner = 2901; + public const short BlueCultistCasterBanner = 2902; + public const short BlueCultistFighterBanner = 2903; + public const short BoneLeeBanner = 2904; + public const short ClingerBanner = 2905; + public const short CochinealBeetleBanner = 2906; + public const short CorruptPenguinBanner = 2907; + public const short CorruptSlimeBanner = 2908; + public const short CorruptorBanner = 2909; + public const short CrimslimeBanner = 2910; + public const short CursedSkullBanner = 2911; + public const short CyanBeetleBanner = 2912; + public const short DevourerBanner = 2913; + public const short DiablolistBanner = 2914; + public const short DoctorBonesBanner = 2915; + public const short DungeonSlimeBanner = 2916; + public const short DungeonSpiritBanner = 2917; + public const short ElfArcherBanner = 2918; + public const short ElfCopterBanner = 2919; + public const short EyezorBanner = 2920; + public const short FlockoBanner = 2921; + public const short GhostBanner = 2922; + public const short GiantBatBanner = 2923; + public const short GiantCursedSkullBanner = 2924; + public const short GiantFlyingFoxBanner = 2925; + public const short GingerbreadManBanner = 2926; + public const short GoblinArcherBanner = 2927; + public const short GreenSlimeBanner = 2928; + public const short HeadlessHorsemanBanner = 2929; + public const short HellArmoredBonesBanner = 2930; + public const short HellhoundBanner = 2931; + public const short HoppinJackBanner = 2932; + public const short IceBatBanner = 2933; + public const short IceGolemBanner = 2934; + public const short IceSlimeBanner = 2935; + public const short IchorStickerBanner = 2936; + public const short IlluminantBatBanner = 2937; + public const short IlluminantSlimeBanner = 2938; + public const short JungleBatBanner = 2939; + public const short JungleSlimeBanner = 2940; + public const short KrampusBanner = 2941; + public const short LacBeetleBanner = 2942; + public const short LavaBatBanner = 2943; + public const short LavaSlimeBanner = 2944; + public const short MartianBrainscramblerBanner = 2945; + public const short MartianDroneBanner = 2946; + public const short MartianEngineerBanner = 2947; + public const short MartianGigazapperBanner = 2948; + public const short MartianGreyGruntBanner = 2949; + public const short MartianOfficerBanner = 2950; + public const short MartianRaygunnerBanner = 2951; + public const short MartianScutlixGunnerBanner = 2952; + public const short MartianTeslaTurretBanner = 2953; + public const short MisterStabbyBanner = 2954; + public const short MotherSlimeBanner = 2955; + public const short NecromancerBanner = 2956; + public const short NutcrackerBanner = 2957; + public const short PaladinBanner = 2958; + public const short PenguinBanner = 2959; + public const short PinkyBanner = 2960; + public const short PoltergeistBanner = 2961; + public const short PossessedArmorBanner = 2962; + public const short PresentMimicBanner = 2963; + public const short PurpleSlimeBanner = 2964; + public const short RaggedCasterBanner = 2965; + public const short RainbowSlimeBanner = 2966; + public const short RavenBanner = 2967; + public const short RedSlimeBanner = 2968; + public const short RuneWizardBanner = 2969; + public const short RustyArmoredBonesBanner = 2970; + public const short ScarecrowBanner = 2971; + public const short ScutlixBanner = 2972; + public const short SkeletonArcherBanner = 2973; + public const short SkeletonCommandoBanner = 2974; + public const short SkeletonSniperBanner = 2975; + public const short SlimerBanner = 2976; + public const short SnatcherBanner = 2977; + public const short SnowBallaBanner = 2978; + public const short SnowmanGangstaBanner = 2979; + public const short SpikedIceSlimeBanner = 2980; + public const short SpikedJungleSlimeBanner = 2981; + public const short SplinterlingBanner = 2982; + public const short SquidBanner = 2983; + public const short TacticalSkeletonBanner = 2984; + public const short TheGroomBanner = 2985; + public const short TimBanner = 2986; + public const short UndeadMinerBanner = 2987; + public const short UndeadVikingBanner = 2988; + public const short WhiteCultistArcherBanner = 2989; + public const short WhiteCultistCasterBanner = 2990; + public const short WhiteCultistFighterBanner = 2991; + public const short YellowSlimeBanner = 2992; + public const short YetiBanner = 2993; + public const short ZombieElfBanner = 2994; + public const short SparkyPainting = 2995; + public const short VineRope = 2996; + public const short WormholePotion = 2997; + public const short SummonerEmblem = 2998; + public const short BewitchingTable = 2999; + public const short AlchemyTable = 3000; + public const short StrangeBrew = 3001; + public const short SpelunkerGlowstick = 3002; + public const short BoneArrow = 3003; + public const short BoneTorch = 3004; + public const short VineRopeCoil = 3005; + public const short SoulDrain = 3006; + public const short DartPistol = 3007; + public const short DartRifle = 3008; + public const short CrystalDart = 3009; + public const short CursedDart = 3010; + public const short IchorDart = 3011; + public const short ChainGuillotines = 3012; + public const short FetidBaghnakhs = 3013; + public const short ClingerStaff = 3014; + public const short PutridScent = 3015; + public const short FleshKnuckles = 3016; + public const short FlowerBoots = 3017; + public const short Seedler = 3018; + public const short HellwingBow = 3019; + public const short TendonHook = 3020; + public const short ThornHook = 3021; + public const short IlluminantHook = 3022; + public const short WormHook = 3023; + public const short DevDye = 3024; + public const short PurpleOozeDye = 3025; + public const short ReflectiveSilverDye = 3026; + public const short ReflectiveGoldDye = 3027; + public const short BlueAcidDye = 3028; + public const short DaedalusStormbow = 3029; + public const short FlyingKnife = 3030; + public const short BottomlessBucket = 3031; + public const short SuperAbsorbantSponge = 3032; + public const short GoldRing = 3033; + public const short CoinRing = 3034; + public const short GreedyRing = 3035; + public const short FishFinder = 3036; + public const short WeatherRadio = 3037; + public const short HadesDye = 3038; + public const short TwilightDye = 3039; + public const short AcidDye = 3040; + public const short MushroomDye = 3041; + public const short PhaseDye = 3042; + public const short MagicLantern = 3043; + public const short MusicBoxLunarBoss = 3044; + public const short RainbowTorch = 3045; + public const short CursedCampfire = 3046; + public const short DemonCampfire = 3047; + public const short FrozenCampfire = 3048; + public const short IchorCampfire = 3049; + public const short RainbowCampfire = 3050; + public const short CrystalVileShard = 3051; + public const short ShadowFlameBow = 3052; + public const short ShadowFlameHexDoll = 3053; + public const short ShadowFlameKnife = 3054; + public const short PaintingAcorns = 3055; + public const short PaintingColdSnap = 3056; + public const short PaintingCursedSaint = 3057; + public const short PaintingSnowfellas = 3058; + public const short PaintingTheSeason = 3059; + public const short BoneRattle = 3060; + public const short ArchitectGizmoPack = 3061; + public const short CrimsonHeart = 3062; + public const short Meowmere = 3063; + public const short Sundial = 3064; + public const short StarWrath = 3065; + public const short MarbleBlock = 3066; + public const short HellstoneBrickWall = 3067; + public const short CordageGuide = 3068; + public const short WandofSparking = 3069; + public const short GoldBirdCage = 3070; + public const short GoldBunnyCage = 3071; + public const short GoldButterflyCage = 3072; + public const short GoldFrogCage = 3073; + public const short GoldGrasshopperCage = 3074; + public const short GoldMouseCage = 3075; + public const short GoldWormCage = 3076; + public const short SilkRope = 3077; + public const short WebRope = 3078; + public const short SilkRopeCoil = 3079; + public const short WebRopeCoil = 3080; + public const short Marble = 3081; + public const short MarbleWall = 3082; + public const short MarbleBlockWall = 3083; + public const short Radar = 3084; + public const short LockBox = 3085; + public const short Granite = 3086; + public const short GraniteBlock = 3087; + public const short GraniteWall = 3088; + public const short GraniteBlockWall = 3089; + public const short RoyalGel = 3090; + public const short NightKey = 3091; + public const short LightKey = 3092; + public const short HerbBag = 3093; + public const short Javelin = 3094; + public const short TallyCounter = 3095; + public const short Sextant = 3096; + public const short EoCShield = 3097; + public const short ButchersChainsaw = 3098; + public const short Stopwatch = 3099; + public const short MeteoriteBrick = 3100; + public const short MeteoriteBrickWall = 3101; + public const short MetalDetector = 3102; + public const short EndlessQuiver = 3103; + public const short EndlessMusketPouch = 3104; + public const short ToxicFlask = 3105; + public const short PsychoKnife = 3106; + public const short NailGun = 3107; + public const short Nail = 3108; + public const short NightVisionHelmet = 3109; + public const short CelestialShell = 3110; + public const short PinkGel = 3111; + public const short BouncyGlowstick = 3112; + public const short PinkSlimeBlock = 3113; + public const short PinkTorch = 3114; + public const short BouncyBomb = 3115; + public const short BouncyGrenade = 3116; + public const short PeaceCandle = 3117; + public const short LifeformAnalyzer = 3118; + public const short DPSMeter = 3119; + public const short FishermansGuide = 3120; + public const short GoblinTech = 3121; + public const short REK = 3122; + public const short PDA = 3123; + public const short CellPhone = 3124; + public const short GraniteChest = 3125; + public const short MeteoriteClock = 3126; + public const short MarbleClock = 3127; + public const short GraniteClock = 3128; + public const short MeteoriteDoor = 3129; + public const short MarbleDoor = 3130; + public const short GraniteDoor = 3131; + public const short MeteoriteDresser = 3132; + public const short MarbleDresser = 3133; + public const short GraniteDresser = 3134; + public const short MeteoriteLamp = 3135; + public const short MarbleLamp = 3136; + public const short GraniteLamp = 3137; + public const short MeteoriteLantern = 3138; + public const short MarbleLantern = 3139; + public const short GraniteLantern = 3140; + public const short MeteoritePiano = 3141; + public const short MarblePiano = 3142; + public const short GranitePiano = 3143; + public const short MeteoritePlatform = 3144; + public const short MarblePlatform = 3145; + public const short GranitePlatform = 3146; + public const short MeteoriteSink = 3147; + public const short MarbleSink = 3148; + public const short GraniteSink = 3149; + public const short MeteoriteSofa = 3150; + public const short MarbleSofa = 3151; + public const short GraniteSofa = 3152; + public const short MeteoriteTable = 3153; + public const short MarbleTable = 3154; + public const short GraniteTable = 3155; + public const short MeteoriteWorkBench = 3156; + public const short MarbleWorkBench = 3157; + public const short GraniteWorkBench = 3158; + public const short MeteoriteBathtub = 3159; + public const short MarbleBathtub = 3160; + public const short GraniteBathtub = 3161; + public const short MeteoriteBed = 3162; + public const short MarbleBed = 3163; + public const short GraniteBed = 3164; + public const short MeteoriteBookcase = 3165; + public const short MarbleBookcase = 3166; + public const short GraniteBookcase = 3167; + public const short MeteoriteCandelabra = 3168; + public const short MarbleCandelabra = 3169; + public const short GraniteCandelabra = 3170; + public const short MeteoriteCandle = 3171; + public const short MarbleCandle = 3172; + public const short GraniteCandle = 3173; + public const short MeteoriteChair = 3174; + public const short MarbleChair = 3175; + public const short GraniteChair = 3176; + public const short MeteoriteChandelier = 3177; + public const short MarbleChandelier = 3178; + public const short GraniteChandelier = 3179; + public const short MeteoriteChest = 3180; + public const short MarbleChest = 3181; + public const short MagicWaterDropper = 3182; + public const short GoldenBugNet = 3183; + public const short MagicLavaDropper = 3184; + public const short MagicHoneyDropper = 3185; + public const short EmptyDropper = 3186; + public const short GladiatorHelmet = 3187; + public const short GladiatorBreastplate = 3188; + public const short GladiatorLeggings = 3189; + public const short ReflectiveDye = 3190; + public const short EnchantedNightcrawler = 3191; + public const short Grubby = 3192; + public const short Sluggy = 3193; + public const short Buggy = 3194; + public const short GrubSoup = 3195; + public const short BombFish = 3196; + public const short FrostDaggerfish = 3197; + public const short SharpeningStation = 3198; + public const short IceMirror = 3199; + public const short SailfishBoots = 3200; + public const short TsunamiInABottle = 3201; + public const short TargetDummy = 3202; + public const short CorruptFishingCrate = 3203; + public const short CrimsonFishingCrate = 3204; + public const short DungeonFishingCrate = 3205; + public const short FloatingIslandFishingCrate = 3206; + public const short HallowedFishingCrate = 3207; + public const short JungleFishingCrate = 3208; + public const short CrystalSerpent = 3209; + public const short Toxikarp = 3210; + public const short Bladetongue = 3211; + public const short SharkToothNecklace = 3212; + public const short MoneyTrough = 3213; + public const short Bubble = 3214; + public const short DayBloomPlanterBox = 3215; + public const short MoonglowPlanterBox = 3216; + public const short CorruptPlanterBox = 3217; + public const short CrimsonPlanterBox = 3218; + public const short BlinkrootPlanterBox = 3219; + public const short WaterleafPlanterBox = 3220; + public const short ShiverthornPlanterBox = 3221; + public const short FireBlossomPlanterBox = 3222; + public const short BrainOfConfusion = 3223; + public const short WormScarf = 3224; + public const short BalloonPufferfish = 3225; + public const short BejeweledValkyrieHead = 3226; + public const short BejeweledValkyrieBody = 3227; + public const short BejeweledValkyrieWing = 3228; + public const short RichGravestone1 = 3229; + public const short RichGravestone2 = 3230; + public const short RichGravestone3 = 3231; + public const short RichGravestone4 = 3232; + public const short RichGravestone5 = 3233; + public const short CrystalBlock = 3234; + public const short MusicBoxMartians = 3235; + public const short MusicBoxPirates = 3236; + public const short MusicBoxHell = 3237; + public const short CrystalBlockWall = 3238; + public const short Trapdoor = 3239; + public const short TallGate = 3240; + public const short SharkronBalloon = 3241; + public const short TaxCollectorHat = 3242; + public const short TaxCollectorSuit = 3243; + public const short TaxCollectorPants = 3244; + public const short BoneGlove = 3245; + public const short ClothierJacket = 3246; + public const short ClothierPants = 3247; + public const short DyeTraderTurban = 3248; + public const short DeadlySphereStaff = 3249; + public const short BalloonHorseshoeFart = 3250; + public const short BalloonHorseshoeHoney = 3251; + public const short BalloonHorseshoeSharkron = 3252; + public const short LavaLamp = 3253; + public const short CageEnchantedNightcrawler = 3254; + public const short CageBuggy = 3255; + public const short CageGrubby = 3256; + public const short CageSluggy = 3257; + public const short SlapHand = 3258; + public const short TwilightHairDye = 3259; + public const short BlessedApple = 3260; + public const short SpectreBar = 3261; + public const short Code1 = 3262; + public const short BuccaneerBandana = 3263; + public const short BuccaneerShirt = 3264; + public const short BuccaneerPants = 3265; + public const short ObsidianHelm = 3266; + public const short ObsidianShirt = 3267; + public const short ObsidianPants = 3268; + public const short MedusaHead = 3269; + public const short ItemFrame = 3270; + public const short Sandstone = 3271; + public const short HardenedSand = 3272; + public const short SandstoneWall = 3273; + public const short CorruptHardenedSand = 3274; + public const short CrimsonHardenedSand = 3275; + public const short CorruptSandstone = 3276; + public const short CrimsonSandstone = 3277; + public const short WoodYoyo = 3278; + public const short CorruptYoyo = 3279; + public const short CrimsonYoyo = 3280; + public const short JungleYoyo = 3281; + public const short Cascade = 3282; + public const short Chik = 3283; + public const short Code2 = 3284; + public const short Rally = 3285; + public const short Yelets = 3286; + public const short RedsYoyo = 3287; + public const short ValkyrieYoyo = 3288; + public const short Amarok = 3289; + public const short HelFire = 3290; + public const short Kraken = 3291; + public const short TheEyeOfCthulhu = 3292; + public const short RedString = 3293; + public const short OrangeString = 3294; + public const short YellowString = 3295; + public const short LimeString = 3296; + public const short GreenString = 3297; + public const short TealString = 3298; + public const short CyanString = 3299; + public const short SkyBlueString = 3300; + public const short BlueString = 3301; + public const short PurpleString = 3302; + public const short VioletString = 3303; + public const short PinkString = 3304; + public const short BrownString = 3305; + public const short WhiteString = 3306; + public const short RainbowString = 3307; + public const short BlackString = 3308; + public const short BlackCounterweight = 3309; + public const short BlueCounterweight = 3310; + public const short GreenCounterweight = 3311; + public const short PurpleCounterweight = 3312; + public const short RedCounterweight = 3313; + public const short YellowCounterweight = 3314; + public const short FormatC = 3315; + public const short Gradient = 3316; + public const short Valor = 3317; + public const short KingSlimeBossBag = 3318; + public const short EyeOfCthulhuBossBag = 3319; + public const short EaterOfWorldsBossBag = 3320; + public const short BrainOfCthulhuBossBag = 3321; + public const short QueenBeeBossBag = 3322; + public const short SkeletronBossBag = 3323; + public const short WallOfFleshBossBag = 3324; + public const short DestroyerBossBag = 3325; + public const short TwinsBossBag = 3326; + public const short SkeletronPrimeBossBag = 3327; + public const short PlanteraBossBag = 3328; + public const short GolemBossBag = 3329; + public const short FishronBossBag = 3330; + public const short CultistBossBag = 3331; + public const short MoonLordBossBag = 3332; + public const short HiveBackpack = 3333; + public const short YoYoGlove = 3334; + public const short DemonHeart = 3335; + public const short SporeSac = 3336; + public const short ShinyStone = 3337; + public const short HallowHardenedSand = 3338; + public const short HallowSandstone = 3339; + public const short HardenedSandWall = 3340; + public const short CorruptHardenedSandWall = 3341; + public const short CrimsonHardenedSandWall = 3342; + public const short HallowHardenedSandWall = 3343; + public const short CorruptSandstoneWall = 3344; + public const short CrimsonSandstoneWall = 3345; + public const short HallowSandstoneWall = 3346; + public const short DesertFossil = 3347; + public const short DesertFossilWall = 3348; + public const short DyeTradersScimitar = 3349; + public const short PainterPaintballGun = 3350; + public const short TaxCollectorsStickOfDoom = 3351; + public const short StylistKilLaKillScissorsIWish = 3352; + public const short MinecartMech = 3353; + public const short MechanicalWheelPiece = 3354; + public const short MechanicalWagonPiece = 3355; + public const short MechanicalBatteryPiece = 3356; + public const short AncientCultistTrophy = 3357; + public const short MartianSaucerTrophy = 3358; + public const short FlyingDutchmanTrophy = 3359; + public const short LivingMahoganyWand = 3360; + public const short LivingMahoganyLeafWand = 3361; + public const short FallenTuxedoShirt = 3362; + public const short FallenTuxedoPants = 3363; + public const short Fireplace = 3364; + public const short Chimney = 3365; + public const short YoyoBag = 3366; + public const short ShrimpyTruffle = 3367; + public const short Arkhalis = 3368; + public const short ConfettiCannon = 3369; + public const short MusicBoxTowers = 3370; + public const short MusicBoxGoblins = 3371; + public const short BossMaskCultist = 3372; + public const short BossMaskMoonlord = 3373; + public const short FossilHelm = 3374; + public const short FossilShirt = 3375; + public const short FossilPants = 3376; + public const short AmberStaff = 3377; + public const short BoneJavelin = 3378; + public const short BoneDagger = 3379; + public const short FossilOre = 3380; + public const short StardustHelmet = 3381; + public const short StardustBreastplate = 3382; + public const short StardustLeggings = 3383; + public const short PortalGun = 3384; + public const short StrangePlant1 = 3385; + public const short StrangePlant2 = 3386; + public const short StrangePlant3 = 3387; + public const short StrangePlant4 = 3388; + public const short Terrarian = 3389; + public const short GoblinSummonerBanner = 3390; + public const short SalamanderBanner = 3391; + public const short GiantShellyBanner = 3392; + public const short CrawdadBanner = 3393; + public const short FritzBanner = 3394; + public const short CreatureFromTheDeepBanner = 3395; + public const short DrManFlyBanner = 3396; + public const short MothronBanner = 3397; + public const short SeveredHandBanner = 3398; + public const short ThePossessedBanner = 3399; + public const short ButcherBanner = 3400; + public const short PsychoBanner = 3401; + public const short DeadlySphereBanner = 3402; + public const short NailheadBanner = 3403; + public const short PoisonousSporeBanner = 3404; + public const short MedusaBanner = 3405; + public const short GreekSkeletonBanner = 3406; + public const short GraniteFlyerBanner = 3407; + public const short GraniteGolemBanner = 3408; + public const short BloodZombieBanner = 3409; + public const short DripplerBanner = 3410; + public const short TombCrawlerBanner = 3411; + public const short DuneSplicerBanner = 3412; + public const short FlyingAntlionBanner = 3413; + public const short WalkingAntlionBanner = 3414; + public const short DesertGhoulBanner = 3415; + public const short DesertLamiaBanner = 3416; + public const short DesertDjinnBanner = 3417; + public const short DesertBasiliskBanner = 3418; + public const short RavagerScorpionBanner = 3419; + public const short StardustSoldierBanner = 3420; + public const short StardustWormBanner = 3421; + public const short StardustJellyfishBanner = 3422; + public const short StardustSpiderBanner = 3423; + public const short StardustSmallCellBanner = 3424; + public const short StardustLargeCellBanner = 3425; + public const short SolarCoriteBanner = 3426; + public const short SolarSrollerBanner = 3427; + public const short SolarCrawltipedeBanner = 3428; + public const short SolarDrakomireRiderBanner = 3429; + public const short SolarDrakomireBanner = 3430; + public const short SolarSolenianBanner = 3431; + public const short NebulaSoldierBanner = 3432; + public const short NebulaHeadcrabBanner = 3433; + public const short NebulaBrainBanner = 3434; + public const short NebulaBeastBanner = 3435; + public const short VortexLarvaBanner = 3436; + public const short VortexHornetQueenBanner = 3437; + public const short VortexHornetBanner = 3438; + public const short VortexSoldierBanner = 3439; + public const short VortexRiflemanBanner = 3440; + public const short PirateCaptainBanner = 3441; + public const short PirateDeadeyeBanner = 3442; + public const short PirateCorsairBanner = 3443; + public const short PirateCrossbowerBanner = 3444; + public const short MartianWalkerBanner = 3445; + public const short RedDevilBanner = 3446; + public const short PinkJellyfishBanner = 3447; + public const short GreenJellyfishBanner = 3448; + public const short DarkMummyBanner = 3449; + public const short LightMummyBanner = 3450; + public const short AngryBonesBanner = 3451; + public const short IceTortoiseBanner = 3452; + public const short NebulaPickup1 = 3453; + public const short NebulaPickup2 = 3454; + public const short NebulaPickup3 = 3455; + public const short FragmentVortex = 3456; + public const short FragmentNebula = 3457; + public const short FragmentSolar = 3458; + public const short FragmentStardust = 3459; + public const short LunarOre = 3460; + public const short LunarBrick = 3461; + public const short StardustAxe = 3462; + public const short StardustChainsaw = 3463; + public const short StardustDrill = 3464; + public const short StardustHammer = 3465; + public const short StardustPickaxe = 3466; + public const short LunarBar = 3467; + public const short WingsSolar = 3468; + public const short WingsVortex = 3469; + public const short WingsNebula = 3470; + public const short WingsStardust = 3471; + public const short LunarBrickWall = 3472; + public const short SolarEruption = 3473; + public const short StardustCellStaff = 3474; + public const short VortexBeater = 3475; + public const short NebulaArcanum = 3476; + public const short BloodWater = 3477; + public const short TheBrideHat = 3478; + public const short TheBrideDress = 3479; + public const short PlatinumBow = 3480; + public const short PlatinumHammer = 3481; + public const short PlatinumAxe = 3482; + public const short PlatinumShortsword = 3483; + public const short PlatinumBroadsword = 3484; + public const short PlatinumPickaxe = 3485; + public const short TungstenBow = 3486; + public const short TungstenHammer = 3487; + public const short TungstenAxe = 3488; + public const short TungstenShortsword = 3489; + public const short TungstenBroadsword = 3490; + public const short TungstenPickaxe = 3491; + public const short LeadBow = 3492; + public const short LeadHammer = 3493; + public const short LeadAxe = 3494; + public const short LeadShortsword = 3495; + public const short LeadBroadsword = 3496; + public const short LeadPickaxe = 3497; + public const short TinBow = 3498; + public const short TinHammer = 3499; + public const short TinAxe = 3500; + public const short TinShortsword = 3501; + public const short TinBroadsword = 3502; + public const short TinPickaxe = 3503; + public const short CopperBow = 3504; + public const short CopperHammer = 3505; + public const short CopperAxe = 3506; + public const short CopperShortsword = 3507; + public const short CopperBroadsword = 3508; + public const short CopperPickaxe = 3509; + public const short SilverBow = 3510; + public const short SilverHammer = 3511; + public const short SilverAxe = 3512; + public const short SilverShortsword = 3513; + public const short SilverBroadsword = 3514; + public const short SilverPickaxe = 3515; + public const short GoldBow = 3516; + public const short GoldHammer = 3517; + public const short GoldAxe = 3518; + public const short GoldShortsword = 3519; + public const short GoldBroadsword = 3520; + public const short GoldPickaxe = 3521; + public const short LunarHamaxeSolar = 3522; + public const short LunarHamaxeVortex = 3523; + public const short LunarHamaxeNebula = 3524; + public const short LunarHamaxeStardust = 3525; + public const short SolarDye = 3526; + public const short NebulaDye = 3527; + public const short VortexDye = 3528; + public const short StardustDye = 3529; + public const short VoidDye = 3530; + public const short StardustDragonStaff = 3531; + public const short Bacon = 3532; + public const short ShiftingSandsDye = 3533; + public const short MirageDye = 3534; + public const short ShiftingPearlSandsDye = 3535; + public const short VortexMonolith = 3536; + public const short NebulaMonolith = 3537; + public const short StardustMonolith = 3538; + public const short SolarMonolith = 3539; + public const short Phantasm = 3540; + public const short LastPrism = 3541; + public const short NebulaBlaze = 3542; + public const short DayBreak = 3543; + public const short SuperHealingPotion = 3544; + public const short Detonator = 3545; + public const short FireworksLauncher = 3546; + public const short BouncyDynamite = 3547; + public const short PartyGirlGrenade = 3548; + public const short LunarCraftingStation = 3549; + public const short FlameAndSilverDye = 3550; + public const short GreenFlameAndSilverDye = 3551; + public const short BlueFlameAndSilverDye = 3552; + public const short ReflectiveCopperDye = 3553; + public const short ReflectiveObsidianDye = 3554; + public const short ReflectiveMetalDye = 3555; + public const short MidnightRainbowDye = 3556; + public const short BlackAndWhiteDye = 3557; + public const short BrightSilverDye = 3558; + public const short SilverAndBlackDye = 3559; + public const short RedAcidDye = 3560; + public const short GelDye = 3561; + public const short PinkGelDye = 3562; + public const short SquirrelRed = 3563; + public const short SquirrelGold = 3564; + public const short SquirrelOrangeCage = 3565; + public const short SquirrelGoldCage = 3566; + public const short MoonlordBullet = 3567; + public const short MoonlordArrow = 3568; + public const short MoonlordTurretStaff = 3569; + public const short LunarFlareBook = 3570; + public const short RainbowCrystalStaff = 3571; + public const short LunarHook = 3572; + public const short LunarBlockSolar = 3573; + public const short LunarBlockVortex = 3574; + public const short LunarBlockNebula = 3575; + public const short LunarBlockStardust = 3576; + public const short SuspiciousLookingTentacle = 3577; + public const short Yoraiz0rShirt = 3578; + public const short Yoraiz0rPants = 3579; + public const short Yoraiz0rWings = 3580; + public const short Yoraiz0rDarkness = 3581; + public const short JimsWings = 3582; + public const short Yoraiz0rHead = 3583; + public const short LivingLeafWall = 3584; + public const short SkiphsHelm = 3585; + public const short SkiphsShirt = 3586; + public const short SkiphsPants = 3587; + public const short SkiphsWings = 3588; + public const short LokisHelm = 3589; + public const short LokisShirt = 3590; + public const short LokisPants = 3591; + public const short LokisWings = 3592; + public const short SandSlimeBanner = 3593; + public const short SeaSnailBanner = 3594; + public const short MoonLordTrophy = 3595; + public const short MoonLordPainting = 3596; + public const short BurningHadesDye = 3597; + public const short GrimDye = 3598; + public const short LokisDye = 3599; + public const short ShadowflameHadesDye = 3600; + public const short CelestialSigil = 3601; + public const short LogicGateLamp_Off = 3602; + public const short LogicGate_AND = 3603; + public const short LogicGate_OR = 3604; + public const short LogicGate_NAND = 3605; + public const short LogicGate_NOR = 3606; + public const short LogicGate_XOR = 3607; + public const short LogicGate_NXOR = 3608; + public const short ConveyorBeltLeft = 3609; + public const short ConveyorBeltRight = 3610; + public const short WireKite = 3611; + public const short YellowWrench = 3612; + public const short LogicSensor_Sun = 3613; + public const short LogicSensor_Moon = 3614; + public const short LogicSensor_Above = 3615; + public const short WirePipe = 3616; + public const short AnnouncementBox = 3617; + public const short LogicGateLamp_On = 3618; + public const short MechanicalLens = 3619; + public const short ActuationRod = 3620; + public const short TeamBlockRed = 3621; + public const short TeamBlockRedPlatform = 3622; + public const short StaticHook = 3623; + public const short ActuationAccessory = 3624; + public const short MulticolorWrench = 3625; + public const short WeightedPressurePlatePink = 3626; + public const short EngineeringHelmet = 3627; + public const short CompanionCube = 3628; + public const short WireBulb = 3629; + public const short WeightedPressurePlateOrange = 3630; + public const short WeightedPressurePlatePurple = 3631; + public const short WeightedPressurePlateCyan = 3632; + public const short TeamBlockGreen = 3633; + public const short TeamBlockBlue = 3634; + public const short TeamBlockYellow = 3635; + public const short TeamBlockPink = 3636; + public const short TeamBlockWhite = 3637; + public const short TeamBlockGreenPlatform = 3638; + public const short TeamBlockBluePlatform = 3639; + public const short TeamBlockYellowPlatform = 3640; + public const short TeamBlockPinkPlatform = 3641; + public const short TeamBlockWhitePlatform = 3642; + public const short LargeAmber = 3643; + public const short GemLockRuby = 3644; + public const short GemLockSapphire = 3645; + public const short GemLockEmerald = 3646; + public const short GemLockTopaz = 3647; + public const short GemLockAmethyst = 3648; + public const short GemLockDiamond = 3649; + public const short GemLockAmber = 3650; + public const short SquirrelStatue = 3651; + public const short ButterflyStatue = 3652; + public const short WormStatue = 3653; + public const short FireflyStatue = 3654; + public const short ScorpionStatue = 3655; + public const short SnailStatue = 3656; + public const short GrasshopperStatue = 3657; + public const short MouseStatue = 3658; + public const short DuckStatue = 3659; + public const short PenguinStatue = 3660; + public const short FrogStatue = 3661; + public const short BuggyStatue = 3662; + public const short LogicGateLamp_Faulty = 3663; + public const short PortalGunStation = 3664; + public const short Fake_Chest = 3665; + public const short Fake_GoldChest = 3666; + public const short Fake_ShadowChest = 3667; + public const short Fake_EbonwoodChest = 3668; + public const short Fake_RichMahoganyChest = 3669; + public const short Fake_PearlwoodChest = 3670; + public const short Fake_IvyChest = 3671; + public const short Fake_IceChest = 3672; + public const short Fake_LivingWoodChest = 3673; + public const short Fake_SkywareChest = 3674; + public const short Fake_ShadewoodChest = 3675; + public const short Fake_WebCoveredChest = 3676; + public const short Fake_LihzahrdChest = 3677; + public const short Fake_WaterChest = 3678; + public const short Fake_JungleChest = 3679; + public const short Fake_CorruptionChest = 3680; + public const short Fake_CrimsonChest = 3681; + public const short Fake_HallowedChest = 3682; + public const short Fake_FrozenChest = 3683; + public const short Fake_DynastyChest = 3684; + public const short Fake_HoneyChest = 3685; + public const short Fake_SteampunkChest = 3686; + public const short Fake_PalmWoodChest = 3687; + public const short Fake_MushroomChest = 3688; + public const short Fake_BorealWoodChest = 3689; + public const short Fake_SlimeChest = 3690; + public const short Fake_GreenDungeonChest = 3691; + public const short Fake_PinkDungeonChest = 3692; + public const short Fake_BlueDungeonChest = 3693; + public const short Fake_BoneChest = 3694; + public const short Fake_CactusChest = 3695; + public const short Fake_FleshChest = 3696; + public const short Fake_ObsidianChest = 3697; + public const short Fake_PumpkinChest = 3698; + public const short Fake_SpookyChest = 3699; + public const short Fake_GlassChest = 3700; + public const short Fake_MartianChest = 3701; + public const short Fake_MeteoriteChest = 3702; + public const short Fake_GraniteChest = 3703; + public const short Fake_MarbleChest = 3704; + public const short Fake_newchest1 = 3705; + public const short Fake_newchest2 = 3706; + public const short ProjectilePressurePad = 3707; + public const short WallCreeperStatue = 3708; + public const short UnicornStatue = 3709; + public const short DripplerStatue = 3710; + public const short WraithStatue = 3711; + public const short BoneSkeletonStatue = 3712; + public const short UndeadVikingStatue = 3713; + public const short MedusaStatue = 3714; + public const short HarpyStatue = 3715; + public const short PigronStatue = 3716; + public const short HopliteStatue = 3717; + public const short GraniteGolemStatue = 3718; + public const short ZombieArmStatue = 3719; + public const short BloodZombieStatue = 3720; + public const short AnglerTackleBag = 3721; + public const short GeyserTrap = 3722; + public const short UltraBrightCampfire = 3723; + public const short BoneCampfire = 3724; + public const short PixelBox = 3725; + public const short LogicSensor_Water = 3726; + public const short LogicSensor_Lava = 3727; + public const short LogicSensor_Honey = 3728; + public const short LogicSensor_Liquid = 3729; + public const short PartyBundleOfBalloonsAccessory = 3730; + public const short PartyBalloonAnimal = 3731; + public const short PartyHat = 3732; + public const short FlowerBoyHat = 3733; + public const short FlowerBoyShirt = 3734; + public const short FlowerBoyPants = 3735; + public const short SillyBalloonPink = 3736; + public const short SillyBalloonPurple = 3737; + public const short SillyBalloonGreen = 3738; + public const short SillyStreamerBlue = 3739; + public const short SillyStreamerGreen = 3740; + public const short SillyStreamerPink = 3741; + public const short SillyBalloonMachine = 3742; + public const short SillyBalloonTiedPink = 3743; + public const short SillyBalloonTiedPurple = 3744; + public const short SillyBalloonTiedGreen = 3745; + public const short Pigronata = 3746; + public const short PartyMonolith = 3747; + public const short PartyBundleOfBalloonTile = 3748; + public const short PartyPresent = 3749; + public const short SliceOfCake = 3750; + public const short CogWall = 3751; + public const short SandFallWall = 3752; + public const short SnowFallWall = 3753; + public const short SandFallBlock = 3754; + public const short SnowFallBlock = 3755; + public const short SnowCloudBlock = 3756; + public const short PedguinHat = 3757; + public const short PedguinShirt = 3758; + public const short PedguinPants = 3759; + public const short SillyBalloonPinkWall = 3760; + public const short SillyBalloonPurpleWall = 3761; + public const short SillyBalloonGreenWall = 3762; + public const short AviatorSunglasses = 3763; + public const short BluePhasesaber = 3764; + public const short RedPhasesaber = 3765; + public const short GreenPhasesaber = 3766; + public const short PurplePhasesaber = 3767; + public const short WhitePhasesaber = 3768; + public const short YellowPhasesaber = 3769; + public const short DjinnsCurse = 3770; + public const short AncientHorn = 3771; + public const short AntlionClaw = 3772; + public const short AncientArmorHat = 3773; + public const short AncientArmorShirt = 3774; + public const short AncientArmorPants = 3775; + public const short AncientBattleArmorHat = 3776; + public const short AncientBattleArmorShirt = 3777; + public const short AncientBattleArmorPants = 3778; + public const short SpiritFlame = 3779; + public const short SandElementalBanner = 3780; + public const short PocketMirror = 3781; + public const short MagicSandDropper = 3782; + public const short AncientBattleArmorMaterial = 3783; + public const short LamiaPants = 3784; + public const short LamiaShirt = 3785; + public const short LamiaHat = 3786; + public const short SkyFracture = 3787; + public const short OnyxBlaster = 3788; + public const short SandsharkBanner = 3789; + public const short SandsharkCorruptBanner = 3790; + public const short SandsharkCrimsonBanner = 3791; + public const short SandsharkHallowedBanner = 3792; + public const short TumbleweedBanner = 3793; + public const short AncientCloth = 3794; + public const short DjinnLamp = 3795; + public const short MusicBoxSandstorm = 3796; + public const short ApprenticeHat = 3797; + public const short ApprenticeRobe = 3798; + public const short ApprenticeTrousers = 3799; + public const short SquireGreatHelm = 3800; + public const short SquirePlating = 3801; + public const short SquireGreaves = 3802; + public const short HuntressWig = 3803; + public const short HuntressJerkin = 3804; + public const short HuntressPants = 3805; + public const short MonkBrows = 3806; + public const short MonkShirt = 3807; + public const short MonkPants = 3808; + public const short ApprenticeScarf = 3809; + public const short SquireShield = 3810; + public const short HuntressBuckler = 3811; + public const short MonkBelt = 3812; + public const short DefendersForge = 3813; + public const short WarTable = 3814; + public const short WarTableBanner = 3815; + public const short DD2ElderCrystalStand = 3816; + public const short DefenderMedal = 3817; + public const short DD2FlameburstTowerT1Popper = 3818; + public const short DD2FlameburstTowerT2Popper = 3819; + public const short DD2FlameburstTowerT3Popper = 3820; + public const short AleThrowingGlove = 3821; + public const short DD2EnergyCrystal = 3822; + public const short DD2SquireDemonSword = 3823; + public const short DD2BallistraTowerT1Popper = 3824; + public const short DD2BallistraTowerT2Popper = 3825; + public const short DD2BallistraTowerT3Popper = 3826; + public const short DD2SquireBetsySword = 3827; + public const short DD2ElderCrystal = 3828; + public const short DD2LightningAuraT1Popper = 3829; + public const short DD2LightningAuraT2Popper = 3830; + public const short DD2LightningAuraT3Popper = 3831; + public const short DD2ExplosiveTrapT1Popper = 3832; + public const short DD2ExplosiveTrapT2Popper = 3833; + public const short DD2ExplosiveTrapT3Popper = 3834; + public const short MonkStaffT1 = 3835; + public const short MonkStaffT2 = 3836; + public const short DD2GoblinBomberBanner = 3837; + public const short DD2GoblinBanner = 3838; + public const short DD2SkeletonBanner = 3839; + public const short DD2DrakinBanner = 3840; + public const short DD2KoboldFlyerBanner = 3841; + public const short DD2KoboldBanner = 3842; + public const short DD2WitherBeastBanner = 3843; + public const short DD2WyvernBanner = 3844; + public const short DD2JavelinThrowerBanner = 3845; + public const short DD2LightningBugBanner = 3846; + public const short OgreMask = 3847; + public const short GoblinMask = 3848; + public const short GoblinBomberCap = 3849; + public const short EtherianJavelin = 3850; + public const short KoboldDynamiteBackpack = 3851; + public const short BookStaff = 3852; + public const short BoringBow = 3853; + public const short DD2PhoenixBow = 3854; + public const short DD2PetGato = 3855; + public const short DD2PetGhost = 3856; + public const short DD2PetDragon = 3857; + public const short MonkStaffT3 = 3858; + public const short DD2BetsyBow = 3859; + public const short BossBagBetsy = 3860; + public const short BossBagOgre = 3861; + public const short BossBagDarkMage = 3862; + public const short BossMaskBetsy = 3863; + public const short BossMaskDarkMage = 3864; + public const short BossMaskOgre = 3865; + public const short BossTrophyBetsy = 3866; + public const short BossTrophyDarkmage = 3867; + public const short BossTrophyOgre = 3868; + public const short MusicBoxDD2 = 3869; + public const short ApprenticeStaffT3 = 3870; + public const short SquireAltHead = 3871; + public const short SquireAltShirt = 3872; + public const short SquireAltPants = 3873; + public const short ApprenticeAltHead = 3874; + public const short ApprenticeAltShirt = 3875; + public const short ApprenticeAltPants = 3876; + public const short HuntressAltHead = 3877; + public const short HuntressAltShirt = 3878; + public const short HuntressAltPants = 3879; + public const short MonkAltHead = 3880; + public const short MonkAltShirt = 3881; + public const short MonkAltPants = 3882; + public const short BetsyWings = 3883; + public const short CrystalChest = 3884; + public const short GoldenChest = 3885; + public const short Fake_CrystalChest = 3886; + public const short Fake_GoldenChest = 3887; + public const short CrystalDoor = 3888; + public const short CrystalChair = 3889; + public const short CrystalCandle = 3890; + public const short CrystalLantern = 3891; + public const short CrystalLamp = 3892; + public const short CrystalCandelabra = 3893; + public const short CrystalChandelier = 3894; + public const short CrystalBathtub = 3895; + public const short CrystalSink = 3896; + public const short CrystalBed = 3897; + public const short CrystalClock = 3898; + public const short SkywareClock2 = 3899; + public const short DungeonClockBlue = 3900; + public const short DungeonClockGreen = 3901; + public const short DungeonClockPink = 3902; + public const short CrystalPlatform = 3903; + public const short GoldenPlatform = 3904; + public const short DynastyPlatform = 3905; + public const short LihzahrdPlatform = 3906; + public const short FleshPlatform = 3907; + public const short FrozenPlatform = 3908; + public const short CrystalWorkbench = 3909; + public const short GoldenWorkbench = 3910; + public const short CrystalDresser = 3911; + public const short DynastyDresser = 3912; + public const short FrozenDresser = 3913; + public const short LivingWoodDresser = 3914; + public const short CrystalPiano = 3915; + public const short DynastyPiano = 3916; + public const short CrystalBookCase = 3917; + public const short CrystalSofaHowDoesThatEvenWork = 3918; + public const short DynastySofa = 3919; + public const short CrystalTable = 3920; + public const short ArkhalisHat = 3921; + public const short ArkhalisShirt = 3922; + public const short ArkhalisPants = 3923; + public const short ArkhalisWings = 3924; + public const short LeinforsHat = 3925; + public const short LeinforsShirt = 3926; + public const short LeinforsPants = 3927; + public const short LeinforsWings = 3928; + public const short LeinforsAccessory = 3929; + public const short Celeb2 = 3930; + public const short SpiderBathtub = 3931; + public const short SpiderBed = 3932; + public const short SpiderBookcase = 3933; + public const short SpiderDresser = 3934; + public const short SpiderCandelabra = 3935; + public const short SpiderCandle = 3936; + public const short SpiderChair = 3937; + public const short SpiderChandelier = 3938; + public const short SpiderChest = 3939; + public const short SpiderClock = 3940; + public const short SpiderDoor = 3941; + public const short SpiderLamp = 3942; + public const short SpiderLantern = 3943; + public const short SpiderPiano = 3944; + public const short SpiderPlatform = 3945; + public const short SpiderSinkSpiderSinkDoesWhateverASpiderSinkDoes = 3946; + public const short SpiderSofa = 3947; + public const short SpiderTable = 3948; + public const short SpiderWorkbench = 3949; + public const short Fake_SpiderChest = 3950; + public const short IronBrick = 3951; + public const short IronBrickWall = 3952; + public const short LeadBrick = 3953; + public const short LeadBrickWall = 3954; + public const short LesionBlock = 3955; + public const short LesionBlockWall = 3956; + public const short LesionPlatform = 3957; + public const short LesionBathtub = 3958; + public const short LesionBed = 3959; + public const short LesionBookcase = 3960; + public const short LesionCandelabra = 3961; + public const short LesionCandle = 3962; + public const short LesionChair = 3963; + public const short LesionChandelier = 3964; + public const short LesionChest = 3965; + public const short LesionClock = 3966; + public const short LesionDoor = 3967; + public const short LesionDresser = 3968; + public const short LesionLamp = 3969; + public const short LesionLantern = 3970; + public const short LesionPiano = 3971; + public const short LesionSink = 3972; + public const short LesionSofa = 3973; + public const short LesionTable = 3974; + public const short LesionWorkbench = 3975; + public const short Fake_LesionChest = 3976; + public const short HatRack = 3977; + public const short ColorOnlyDye = 3978; + public const short WoodenCrateHard = 3979; + public const short IronCrateHard = 3980; + public const short GoldenCrateHard = 3981; + public const short CorruptFishingCrateHard = 3982; + public const short CrimsonFishingCrateHard = 3983; + public const short DungeonFishingCrateHard = 3984; + public const short FloatingIslandFishingCrateHard = 3985; + public const short HallowedFishingCrateHard = 3986; + public const short JungleFishingCrateHard = 3987; + public const short DeadMansChest = 3988; + public const short GolfBall = 3989; + public const short AmphibianBoots = 3990; + public const short ArcaneFlower = 3991; + public const short BerserkerGlove = 3992; + public const short FairyBoots = 3993; + public const short FrogFlipper = 3994; + public const short FrogGear = 3995; + public const short FrogWebbing = 3996; + public const short FrozenShield = 3997; + public const short HeroShield = 3998; + public const short LavaSkull = 3999; + public const short MagnetFlower = 4000; + public const short ManaCloak = 4001; + public const short MoltenQuiver = 4002; + public const short MoltenSkullRose = 4003; + public const short ObsidianSkullRose = 4004; + public const short ReconScope = 4005; + public const short StalkersQuiver = 4006; + public const short StingerNecklace = 4007; + public const short UltrabrightHelmet = 4008; + public const short Apple = 4009; + public const short ApplePieSlice = 4010; + public const short ApplePie = 4011; + public const short BananaSplit = 4012; + public const short BBQRibs = 4013; + public const short BunnyStew = 4014; + public const short Burger = 4015; + public const short ChickenNugget = 4016; + public const short ChocolateChipCookie = 4017; + public const short CreamSoda = 4018; + public const short Escargot = 4019; + public const short FriedEgg = 4020; + public const short Fries = 4021; + public const short GoldenDelight = 4022; + public const short Grapes = 4023; + public const short GrilledSquirrel = 4024; + public const short Hotdog = 4025; + public const short IceCream = 4026; + public const short Milkshake = 4027; + public const short Nachos = 4028; + public const short Pizza = 4029; + public const short PotatoChips = 4030; + public const short RoastedBird = 4031; + public const short RoastedDuck = 4032; + public const short SauteedFrogLegs = 4033; + public const short SeafoodDinner = 4034; + public const short ShrimpPoBoy = 4035; + public const short Spaghetti = 4036; + public const short Steak = 4037; + public const short MoltenCharm = 4038; + public const short GolfClubIron = 4039; + public const short GolfCup = 4040; + public const short FlowerPacketBlue = 4041; + public const short FlowerPacketMagenta = 4042; + public const short FlowerPacketPink = 4043; + public const short FlowerPacketRed = 4044; + public const short FlowerPacketYellow = 4045; + public const short FlowerPacketViolet = 4046; + public const short FlowerPacketWhite = 4047; + public const short FlowerPacketTallGrass = 4048; + public const short LawnMower = 4049; + public const short CrimstoneBrick = 4050; + public const short SmoothSandstone = 4051; + public const short CrimstoneBrickWall = 4052; + public const short SmoothSandstoneWall = 4053; + public const short BloodMoonMonolith = 4054; + public const short SandBoots = 4055; + public const short AncientChisel = 4056; + public const short CarbonGuitar = 4057; + public const short SkeletonBow = 4058; + public const short FossilPickaxe = 4059; + public const short SuperStarCannon = 4060; + public const short ThunderSpear = 4061; + public const short ThunderStaff = 4062; + public const short DrumSet = 4063; + public const short PicnicTable = 4064; + public const short PicnicTableWithCloth = 4065; + public const short DesertMinecart = 4066; + public const short FishMinecart = 4067; + public const short FairyCritterPink = 4068; + public const short FairyCritterGreen = 4069; + public const short FairyCritterBlue = 4070; + public const short JunoniaShell = 4071; + public const short LightningWhelkShell = 4072; + public const short TulipShell = 4073; + public const short PinWheel = 4074; + public const short WeatherVane = 4075; + public const short VoidVault = 4076; + public const short MusicBoxOceanAlt = 4077; + public const short MusicBoxSlimeRain = 4078; + public const short MusicBoxSpaceAlt = 4079; + public const short MusicBoxTownDay = 4080; + public const short MusicBoxTownNight = 4081; + public const short MusicBoxWindyDay = 4082; + public const short GolfCupFlagWhite = 4083; + public const short GolfCupFlagRed = 4084; + public const short GolfCupFlagGreen = 4085; + public const short GolfCupFlagBlue = 4086; + public const short GolfCupFlagYellow = 4087; + public const short GolfCupFlagPurple = 4088; + public const short GolfTee = 4089; + public const short ShellPileBlock = 4090; + public const short AntiPortalBlock = 4091; + public const short GolfClubPutter = 4092; + public const short GolfClubWedge = 4093; + public const short GolfClubDriver = 4094; + public const short GolfWhistle = 4095; + public const short ToiletEbonyWood = 4096; + public const short ToiletRichMahogany = 4097; + public const short ToiletPearlwood = 4098; + public const short ToiletLivingWood = 4099; + public const short ToiletCactus = 4100; + public const short ToiletBone = 4101; + public const short ToiletFlesh = 4102; + public const short ToiletMushroom = 4103; + public const short ToiletSunplate = 4104; + public const short ToiletShadewood = 4105; + public const short ToiletLihzhard = 4106; + public const short ToiletDungeonBlue = 4107; + public const short ToiletDungeonGreen = 4108; + public const short ToiletDungeonPink = 4109; + public const short ToiletObsidian = 4110; + public const short ToiletFrozen = 4111; + public const short ToiletGlass = 4112; + public const short ToiletHoney = 4113; + public const short ToiletSteampunk = 4114; + public const short ToiletPumpkin = 4115; + public const short ToiletSpooky = 4116; + public const short ToiletDynasty = 4117; + public const short ToiletPalm = 4118; + public const short ToiletBoreal = 4119; + public const short ToiletSlime = 4120; + public const short ToiletMartian = 4121; + public const short ToiletGranite = 4122; + public const short ToiletMarble = 4123; + public const short ToiletCrystal = 4124; + public const short ToiletSpider = 4125; + public const short ToiletLesion = 4126; + public const short ToiletDiamond = 4127; + public const short MaidHead = 4128; + public const short MaidShirt = 4129; + public const short MaidPants = 4130; + public const short VoidLens = 4131; + public const short MaidHead2 = 4132; + public const short MaidShirt2 = 4133; + public const short MaidPants2 = 4134; + public const short GolfHat = 4135; + public const short GolfShirt = 4136; + public const short GolfPants = 4137; + public const short GolfVisor = 4138; + public const short SpiderBlock = 4139; + public const short SpiderWall = 4140; + public const short ToiletMeteor = 4141; + public const short LesionStation = 4142; + public const short ManaCloakStar = 4143; + public const short Terragrim = 4144; + public const short SolarBathtub = 4145; + public const short SolarBed = 4146; + public const short SolarBookcase = 4147; + public const short SolarDresser = 4148; + public const short SolarCandelabra = 4149; + public const short SolarCandle = 4150; + public const short SolarChair = 4151; + public const short SolarChandelier = 4152; + public const short SolarChest = 4153; + public const short SolarClock = 4154; + public const short SolarDoor = 4155; + public const short SolarLamp = 4156; + public const short SolarLantern = 4157; + public const short SolarPiano = 4158; + public const short SolarPlatform = 4159; + public const short SolarSink = 4160; + public const short SolarSofa = 4161; + public const short SolarTable = 4162; + public const short SolarWorkbench = 4163; + public const short Fake_SolarChest = 4164; + public const short SolarToilet = 4165; + public const short VortexBathtub = 4166; + public const short VortexBed = 4167; + public const short VortexBookcase = 4168; + public const short VortexDresser = 4169; + public const short VortexCandelabra = 4170; + public const short VortexCandle = 4171; + public const short VortexChair = 4172; + public const short VortexChandelier = 4173; + public const short VortexChest = 4174; + public const short VortexClock = 4175; + public const short VortexDoor = 4176; + public const short VortexLamp = 4177; + public const short VortexLantern = 4178; + public const short VortexPiano = 4179; + public const short VortexPlatform = 4180; + public const short VortexSink = 4181; + public const short VortexSofa = 4182; + public const short VortexTable = 4183; + public const short VortexWorkbench = 4184; + public const short Fake_VortexChest = 4185; + public const short VortexToilet = 4186; + public const short NebulaBathtub = 4187; + public const short NebulaBed = 4188; + public const short NebulaBookcase = 4189; + public const short NebulaDresser = 4190; + public const short NebulaCandelabra = 4191; + public const short NebulaCandle = 4192; + public const short NebulaChair = 4193; + public const short NebulaChandelier = 4194; + public const short NebulaChest = 4195; + public const short NebulaClock = 4196; + public const short NebulaDoor = 4197; + public const short NebulaLamp = 4198; + public const short NebulaLantern = 4199; + public const short NebulaPiano = 4200; + public const short NebulaPlatform = 4201; + public const short NebulaSink = 4202; + public const short NebulaSofa = 4203; + public const short NebulaTable = 4204; + public const short NebulaWorkbench = 4205; + public const short Fake_NebulaChest = 4206; + public const short NebulaToilet = 4207; + public const short StardustBathtub = 4208; + public const short StardustBed = 4209; + public const short StardustBookcase = 4210; + public const short StardustDresser = 4211; + public const short StardustCandelabra = 4212; + public const short StardustCandle = 4213; + public const short StardustChair = 4214; + public const short StardustChandelier = 4215; + public const short StardustChest = 4216; + public const short StardustClock = 4217; + public const short StardustDoor = 4218; + public const short StardustLamp = 4219; + public const short StardustLantern = 4220; + public const short StardustPiano = 4221; + public const short StardustPlatform = 4222; + public const short StardustSink = 4223; + public const short StardustSofa = 4224; + public const short StardustTable = 4225; + public const short StardustWorkbench = 4226; + public const short Fake_StardustChest = 4227; + public const short StardustToilet = 4228; + public const short SolarBrick = 4229; + public const short VortexBrick = 4230; + public const short NebulaBrick = 4231; + public const short StardustBrick = 4232; + public const short SolarBrickWall = 4233; + public const short VortexBrickWall = 4234; + public const short NebulaBrickWall = 4235; + public const short StardustBrickWall = 4236; + public const short MusicBoxDayRemix = 4237; + public const short CrackedBlueBrick = 4238; + public const short CrackedGreenBrick = 4239; + public const short CrackedPinkBrick = 4240; + public const short FlowerPacketWild = 4241; + public const short GolfBallDyedBlack = 4242; + public const short GolfBallDyedBlue = 4243; + public const short GolfBallDyedBrown = 4244; + public const short GolfBallDyedCyan = 4245; + public const short GolfBallDyedGreen = 4246; + public const short GolfBallDyedLimeGreen = 4247; + public const short GolfBallDyedOrange = 4248; + public const short GolfBallDyedPink = 4249; + public const short GolfBallDyedPurple = 4250; + public const short GolfBallDyedRed = 4251; + public const short GolfBallDyedSkyBlue = 4252; + public const short GolfBallDyedTeal = 4253; + public const short GolfBallDyedViolet = 4254; + public const short GolfBallDyedYellow = 4255; + public const short AmberRobe = 4256; + public const short AmberHook = 4257; + public const short OrangePhaseblade = 4258; + public const short OrangePhasesaber = 4259; + public const short OrangeStainedGlass = 4260; + public const short OrangePressurePlate = 4261; + public const short MysticCoilSnake = 4262; + public const short MagicConch = 4263; + public const short GolfCart = 4264; + public const short GolfChest = 4265; + public const short Fake_GolfChest = 4266; + public const short DesertChest = 4267; + public const short Fake_DesertChest = 4268; + public const short SanguineStaff = 4269; + public const short SharpTears = 4270; + public const short BloodMoonStarter = 4271; + public const short DripplerFlail = 4272; + public const short VampireFrogStaff = 4273; + public const short GoldGoldfish = 4274; + public const short GoldGoldfishBowl = 4275; + public const short CatBast = 4276; + public const short GoldStarryGlassBlock = 4277; + public const short BlueStarryGlassBlock = 4278; + public const short GoldStarryGlassWall = 4279; + public const short BlueStarryGlassWall = 4280; + public const short BabyBirdStaff = 4281; + public const short Apricot = 4282; + public const short Banana = 4283; + public const short BlackCurrant = 4284; + public const short BloodOrange = 4285; + public const short Cherry = 4286; + public const short Coconut = 4287; + public const short Dragonfruit = 4288; + public const short Elderberry = 4289; + public const short Grapefruit = 4290; + public const short Lemon = 4291; + public const short Mango = 4292; + public const short Peach = 4293; + public const short Pineapple = 4294; + public const short Plum = 4295; + public const short Rambutan = 4296; + public const short Starfruit = 4297; + public const short SandstoneBathtub = 4298; + public const short SandstoneBed = 4299; + public const short SandstoneBookcase = 4300; + public const short SandstoneDresser = 4301; + public const short SandstoneCandelabra = 4302; + public const short SandstoneCandle = 4303; + public const short SandstoneChair = 4304; + public const short SandstoneChandelier = 4305; + public const short SandstoneClock = 4306; + public const short SandstoneDoor = 4307; + public const short SandstoneLamp = 4308; + public const short SandstoneLantern = 4309; + public const short SandstonePiano = 4310; + public const short SandstonePlatform = 4311; + public const short SandstoneSink = 4312; + public const short SandstoneSofa = 4313; + public const short SandstoneTable = 4314; + public const short SandstoneWorkbench = 4315; + public const short SandstoneToilet = 4316; + public const short BloodHamaxe = 4317; + public const short VoidMonolith = 4318; + public const short ArrowSign = 4319; + public const short PaintedArrowSign = 4320; + public const short GameMasterShirt = 4321; + public const short GameMasterPants = 4322; + public const short StarPrincessCrown = 4323; + public const short StarPrincessDress = 4324; + public const short BloodFishingRod = 4325; + public const short FoodPlatter = 4326; + public const short BlackDragonflyJar = 4327; + public const short BlueDragonflyJar = 4328; + public const short GreenDragonflyJar = 4329; + public const short OrangeDragonflyJar = 4330; + public const short RedDragonflyJar = 4331; + public const short YellowDragonflyJar = 4332; + public const short GoldDragonflyJar = 4333; + public const short BlackDragonfly = 4334; + public const short BlueDragonfly = 4335; + public const short GreenDragonfly = 4336; + public const short OrangeDragonfly = 4337; + public const short RedDragonfly = 4338; + public const short YellowDragonfly = 4339; + public const short GoldDragonfly = 4340; + public const short PortableStool = 4341; + public const short DragonflyStatue = 4342; + public const short PaperAirplaneA = 4343; + public const short PaperAirplaneB = 4344; + public const short CanOfWorms = 4345; + public const short EncumberingStone = 4346; + public const short ZapinatorGray = 4347; + public const short ZapinatorOrange = 4348; + public const short GreenMoss = 4349; + public const short BrownMoss = 4350; + public const short RedMoss = 4351; + public const short BlueMoss = 4352; + public const short PurpleMoss = 4353; + public const short LavaMoss = 4354; + public const short BoulderStatue = 4355; + public const short MusicBoxTitleAlt = 4356; + public const short MusicBoxStorm = 4357; + public const short MusicBoxGraveyard = 4358; + public const short Seagull = 4359; + public const short SeagullStatue = 4360; + public const short LadyBug = 4361; + public const short GoldLadyBug = 4362; + public const short Maggot = 4363; + public const short MaggotCage = 4364; + public const short CelestialWand = 4365; + public const short EucaluptusSap = 4366; + public const short KiteBlue = 4367; + public const short KiteBlueAndYellow = 4368; + public const short KiteRed = 4369; + public const short KiteRedAndYellow = 4370; + public const short KiteYellow = 4371; + public const short IvyGuitar = 4372; + public const short Pupfish = 4373; + public const short Grebe = 4374; + public const short Rat = 4375; + public const short RatCage = 4376; + public const short KryptonMoss = 4377; + public const short XenonMoss = 4378; + public const short KiteWyvern = 4379; + public const short LadybugCage = 4380; + public const short BloodRainBow = 4381; + public const short CombatBook = 4382; + public const short DesertTorch = 4383; + public const short CoralTorch = 4384; + public const short CorruptTorch = 4385; + public const short CrimsonTorch = 4386; + public const short HallowedTorch = 4387; + public const short JungleTorch = 4388; + public const short ArgonMoss = 4389; + public const short RollingCactus = 4390; + public const short ThinIce = 4391; + public const short EchoBlock = 4392; + public const short ScarabFish = 4393; + public const short ScorpioFish = 4394; + public const short Owl = 4395; + public const short OwlCage = 4396; + public const short OwlStatue = 4397; + public const short PupfishBowl = 4398; + public const short GoldLadybugCage = 4399; + public const short Geode = 4400; + public const short Flounder = 4401; + public const short RockLobster = 4402; + public const short LobsterTail = 4403; + public const short FloatingTube = 4404; + public const short FrozenCrate = 4405; + public const short FrozenCrateHard = 4406; + public const short OasisCrate = 4407; + public const short OasisCrateHard = 4408; + public const short SpectreGoggles = 4409; + public const short Oyster = 4410; + public const short ShuckedOyster = 4411; + public const short WhitePearl = 4412; + public const short BlackPearl = 4413; + public const short PinkPearl = 4414; + public const short StoneDoor = 4415; + public const short StonePlatform = 4416; + public const short OasisFountain = 4417; + public const short WaterStrider = 4418; + public const short GoldWaterStrider = 4419; + public const short LawnFlamingo = 4420; + public const short MusicBoxUndergroundJungle = 4421; + public const short Grate = 4422; + public const short ScarabBomb = 4423; + public const short WroughtIronFence = 4424; + public const short SharkBait = 4425; + public const short BeeMinecart = 4426; + public const short LadybugMinecart = 4427; + public const short PigronMinecart = 4428; + public const short SunflowerMinecart = 4429; + public const short PottedForestCedar = 4430; + public const short PottedJungleCedar = 4431; + public const short PottedHallowCedar = 4432; + public const short PottedForestTree = 4433; + public const short PottedJungleTree = 4434; + public const short PottedHallowTree = 4435; + public const short PottedForestPalm = 4436; + public const short PottedJunglePalm = 4437; + public const short PottedHallowPalm = 4438; + public const short PottedForestBamboo = 4439; + public const short PottedJungleBamboo = 4440; + public const short PottedHallowBamboo = 4441; + public const short ScarabFishingRod = 4442; + public const short HellMinecart = 4443; + public const short WitchBroom = 4444; + public const short ClusterRocketI = 4445; + public const short ClusterRocketII = 4446; + public const short WetRocket = 4447; + public const short LavaRocket = 4448; + public const short HoneyRocket = 4449; + public const short ShroomMinecart = 4450; + public const short AmethystMinecart = 4451; + public const short TopazMinecart = 4452; + public const short SapphireMinecart = 4453; + public const short EmeraldMinecart = 4454; + public const short RubyMinecart = 4455; + public const short DiamondMinecart = 4456; + public const short MiniNukeI = 4457; + public const short MiniNukeII = 4458; + public const short DryRocket = 4459; + public const short SandcastleBucket = 4460; + public const short TurtleCage = 4461; + public const short TurtleJungleCage = 4462; + public const short Gladius = 4463; + public const short Turtle = 4464; + public const short TurtleJungle = 4465; + public const short TurtleStatue = 4466; + public const short AmberMinecart = 4467; + public const short BeetleMinecart = 4468; + public const short MeowmereMinecart = 4469; + public const short PartyMinecart = 4470; + public const short PirateMinecart = 4471; + public const short SteampunkMinecart = 4472; + public const short GrebeCage = 4473; + public const short SeagullCage = 4474; + public const short WaterStriderCage = 4475; + public const short GoldWaterStriderCage = 4476; + public const short LuckPotionLesser = 4477; + public const short LuckPotion = 4478; + public const short LuckPotionGreater = 4479; + public const short Seahorse = 4480; + public const short SeahorseCage = 4481; + public const short GoldSeahorse = 4482; + public const short GoldSeahorseCage = 4483; + public const short TimerOneHalfSecond = 4484; + public const short TimerOneFourthSecond = 4485; + public const short EbonstoneEcho = 4486; + public const short MudWallEcho = 4487; + public const short PearlstoneEcho = 4488; + public const short SnowWallEcho = 4489; + public const short AmethystEcho = 4490; + public const short TopazEcho = 4491; + public const short SapphireEcho = 4492; + public const short EmeraldEcho = 4493; + public const short RubyEcho = 4494; + public const short DiamondEcho = 4495; + public const short Cave1Echo = 4496; + public const short Cave2Echo = 4497; + public const short Cave3Echo = 4498; + public const short Cave4Echo = 4499; + public const short Cave5Echo = 4500; + public const short Cave6Echo = 4501; + public const short Cave7Echo = 4502; + public const short SpiderEcho = 4503; + public const short CorruptGrassEcho = 4504; + public const short HallowedGrassEcho = 4505; + public const short IceEcho = 4506; + public const short ObsidianBackEcho = 4507; + public const short CrimsonGrassEcho = 4508; + public const short CrimstoneEcho = 4509; + public const short CaveWall1Echo = 4510; + public const short CaveWall2Echo = 4511; + public const short Cave8Echo = 4512; + public const short Corruption1Echo = 4513; + public const short Corruption2Echo = 4514; + public const short Corruption3Echo = 4515; + public const short Corruption4Echo = 4516; + public const short Crimson1Echo = 4517; + public const short Crimson2Echo = 4518; + public const short Crimson3Echo = 4519; + public const short Crimson4Echo = 4520; + public const short Dirt1Echo = 4521; + public const short Dirt2Echo = 4522; + public const short Dirt3Echo = 4523; + public const short Dirt4Echo = 4524; + public const short Hallow1Echo = 4525; + public const short Hallow2Echo = 4526; + public const short Hallow3Echo = 4527; + public const short Hallow4Echo = 4528; + public const short Jungle1Echo = 4529; + public const short Jungle2Echo = 4530; + public const short Jungle3Echo = 4531; + public const short Jungle4Echo = 4532; + public const short Lava1Echo = 4533; + public const short Lava2Echo = 4534; + public const short Lava3Echo = 4535; + public const short Lava4Echo = 4536; + public const short Rocks1Echo = 4537; + public const short Rocks2Echo = 4538; + public const short Rocks3Echo = 4539; + public const short Rocks4Echo = 4540; + public const short TheBrideBanner = 4541; + public const short ZombieMermanBanner = 4542; + public const short EyeballFlyingFishBanner = 4543; + public const short BloodSquidBanner = 4544; + public const short BloodEelBanner = 4545; + public const short GoblinSharkBanner = 4546; + public const short LargeBambooBlock = 4547; + public const short LargeBambooBlockWall = 4548; + public const short DemonHorns = 4549; + public const short BambooLeaf = 4550; + public const short HellCake = 4551; + public const short FogMachine = 4552; + public const short PlasmaLamp = 4553; + public const short MarbleColumn = 4554; + public const short ChefHat = 4555; + public const short ChefShirt = 4556; + public const short ChefPants = 4557; + public const short StarHairpin = 4558; + public const short HeartHairpin = 4559; + public const short BunnyEars = 4560; + public const short DevilHorns = 4561; + public const short Fedora = 4562; + public const short UnicornHornHat = 4563; + public const short BambooBlock = 4564; + public const short BambooBlockWall = 4565; + public const short BambooBathtub = 4566; + public const short BambooBed = 4567; + public const short BambooBookcase = 4568; + public const short BambooDresser = 4569; + public const short BambooCandelabra = 4570; + public const short BambooCandle = 4571; + public const short BambooChair = 4572; + public const short BambooChandelier = 4573; + public const short BambooChest = 4574; + public const short BambooClock = 4575; + public const short BambooDoor = 4576; + public const short BambooLamp = 4577; + public const short BambooLantern = 4578; + public const short BambooPiano = 4579; + public const short BambooPlatform = 4580; + public const short BambooSink = 4581; + public const short BambooSofa = 4582; + public const short BambooTable = 4583; + public const short BambooWorkbench = 4584; + public const short Fake_BambooChest = 4585; + public const short BambooToilet = 4586; + public const short GolfClubStoneIron = 4587; + public const short GolfClubRustyPutter = 4588; + public const short GolfClubBronzeWedge = 4589; + public const short GolfClubWoodDriver = 4590; + public const short GolfClubMythrilIron = 4591; + public const short GolfClubLeadPutter = 4592; + public const short GolfClubGoldWedge = 4593; + public const short GolfClubPearlwoodDriver = 4594; + public const short GolfClubTitaniumIron = 4595; + public const short GolfClubShroomitePutter = 4596; + public const short GolfClubDiamondWedge = 4597; + public const short GolfClubChlorophyteDriver = 4598; + public const short GolfTrophyBronze = 4599; + public const short GolfTrophySilver = 4600; + public const short GolfTrophyGold = 4601; + public const short BloodNautilusBanner = 4602; + public const short BirdieRattle = 4603; + public const short ExoticEasternChewToy = 4604; + public const short BedazzledNectar = 4605; + public const short MusicBoxJungleNight = 4606; + public const short StormTigerStaff = 4607; + public const short ChumBucket = 4608; + public const short GardenGnome = 4609; + public const short KiteBoneSerpent = 4610; + public const short KiteWorldFeeder = 4611; + public const short KiteBunny = 4612; + public const short KitePigron = 4613; + public const short AppleJuice = 4614; + public const short GrapeJuice = 4615; + public const short Lemonade = 4616; + public const short BananaDaiquiri = 4617; + public const short PeachSangria = 4618; + public const short PinaColada = 4619; + public const short TropicalSmoothie = 4620; + public const short BloodyMoscato = 4621; + public const short SmoothieofDarkness = 4622; + public const short PrismaticPunch = 4623; + public const short FruitJuice = 4624; + public const short FruitSalad = 4625; + public const short AndrewSphinx = 4626; + public const short WatchfulAntlion = 4627; + public const short BurningSpirit = 4628; + public const short JawsOfDeath = 4629; + public const short TheSandsOfSlime = 4630; + public const short SnakesIHateSnakes = 4631; + public const short LifeAboveTheSand = 4632; + public const short Oasis = 4633; + public const short PrehistoryPreserved = 4634; + public const short AncientTablet = 4635; + public const short Uluru = 4636; + public const short VisitingThePyramids = 4637; + public const short BandageBoy = 4638; + public const short DivineEye = 4639; + public const short AmethystStoneBlock = 4640; + public const short TopazStoneBlock = 4641; + public const short SapphireStoneBlock = 4642; + public const short EmeraldStoneBlock = 4643; + public const short RubyStoneBlock = 4644; + public const short DiamondStoneBlock = 4645; + public const short AmberStoneBlock = 4646; + public const short AmberStoneWallEcho = 4647; + public const short KiteManEater = 4648; + public const short KiteJellyfishBlue = 4649; + public const short KiteJellyfishPink = 4650; + public const short KiteShark = 4651; + public const short SuperHeroMask = 4652; + public const short SuperHeroCostume = 4653; + public const short SuperHeroTights = 4654; + public const short PinkFairyJar = 4655; + public const short GreenFairyJar = 4656; + public const short BlueFairyJar = 4657; + public const short GolfPainting1 = 4658; + public const short GolfPainting2 = 4659; + public const short GolfPainting3 = 4660; + public const short GolfPainting4 = 4661; + public const short FogboundDye = 4662; + public const short BloodbathDye = 4663; + public const short PrettyPinkDressSkirt = 4664; + public const short PrettyPinkDressPants = 4665; + public const short PrettyPinkRibbon = 4666; + public const short BambooFence = 4667; + public const short GlowPaint = 4668; + public const short KiteSandShark = 4669; + public const short KiteBunnyCorrupt = 4670; + public const short KiteBunnyCrimson = 4671; + public const short BlandWhip = 4672; + public const short DrumStick = 4673; + public const short KiteGoldfish = 4674; + public const short KiteAngryTrapper = 4675; + public const short KiteKoi = 4676; + public const short KiteCrawltipede = 4677; + public const short SwordWhip = 4678; + public const short MaceWhip = 4679; + public const short ScytheWhip = 4680; + public const short KiteSpectrum = 4681; + public const short ReleaseDoves = 4682; + public const short KiteWanderingEye = 4683; + public const short KiteUnicorn = 4684; + public const short UndertakerHat = 4685; + public const short UndertakerCoat = 4686; + public const short DandelionBanner = 4687; + public const short GnomeBanner = 4688; + public const short DesertCampfire = 4689; + public const short CoralCampfire = 4690; + public const short CorruptCampfire = 4691; + public const short CrimsonCampfire = 4692; + public const short HallowedCampfire = 4693; + public const short JungleCampfire = 4694; + public const short SoulBottleLight = 4695; + public const short SoulBottleNight = 4696; + public const short SoulBottleFlight = 4697; + public const short SoulBottleSight = 4698; + public const short SoulBottleMight = 4699; + public const short SoulBottleFright = 4700; + public const short MudBud = 4701; + public const short ReleaseLantern = 4702; + public const short QuadBarrelShotgun = 4703; + public const short FuneralHat = 4704; + public const short FuneralCoat = 4705; + public const short FuneralPants = 4706; + public const short TragicUmbrella = 4707; + public const short VictorianGothHat = 4708; + public const short VictorianGothDress = 4709; + public const short TatteredWoodSign = 4710; + public const short GravediggerShovel = 4711; + public const short DungeonDesertChest = 4712; + public const short Fake_DungeonDesertChest = 4713; + public const short DungeonDesertKey = 4714; + public const short SparkleGuitar = 4715; + public const short MolluskWhistle = 4716; + public const short BorealBeam = 4717; + public const short RichMahoganyBeam = 4718; + public const short GraniteColumn = 4719; + public const short SandstoneColumn = 4720; + public const short MushroomBeam = 4721; + public const short FirstFractal = 4722; + public const short Nevermore = 4723; + public const short Reborn = 4724; + public const short Graveyard = 4725; + public const short GhostManifestation = 4726; + public const short WickedUndead = 4727; + public const short BloodyGoblet = 4728; + public const short StillLife = 4729; + public const short GhostarsWings = 4730; + public const short TerraToilet = 4731; + public const short GhostarSkullPin = 4732; + public const short GhostarShirt = 4733; + public const short GhostarPants = 4734; + public const short BallOfFuseWire = 4735; + public const short FullMoonSqueakyToy = 4736; + public const short OrnateShadowKey = 4737; + public const short DrManFlyMask = 4738; + public const short DrManFlyLabCoat = 4739; + public const short ButcherMask = 4740; + public const short ButcherApron = 4741; + public const short ButcherPants = 4742; + public const short Football = 4743; + public const short HunterCloak = 4744; + public const short CoffinMinecart = 4745; + public const short SafemanWings = 4746; + public const short SafemanSunHair = 4747; + public const short SafemanSunDress = 4748; + public const short SafemanDressLeggings = 4749; + public const short FoodBarbarianWings = 4750; + public const short FoodBarbarianHelm = 4751; + public const short FoodBarbarianArmor = 4752; + public const short FoodBarbarianGreaves = 4753; + public const short GroxTheGreatWings = 4754; + public const short GroxTheGreatHelm = 4755; + public const short GroxTheGreatArmor = 4756; + public const short GroxTheGreatGreaves = 4757; + public const short Smolstar = 4758; + public const short SquirrelHook = 4759; + public const short BouncingShield = 4760; + public const short RockGolemHead = 4761; + public const short CritterShampoo = 4762; + public const short DiggingMoleMinecart = 4763; + public const short Shroomerang = 4764; + public const short TreeGlobe = 4765; + public const short WorldGlobe = 4766; + public const short DontHurtCrittersBook = 4767; + public const short DogEars = 4768; + public const short DogTail = 4769; + public const short FoxEars = 4770; + public const short FoxTail = 4771; + public const short LizardEars = 4772; + public const short LizardTail = 4773; + public const short PandaEars = 4774; + public const short BunnyTail = 4775; + public const short FairyGlowstick = 4776; + public const short LightningCarrot = 4777; + public const short HallowBossDye = 4778; + public const short MushroomHat = 4779; + public const short MushroomVest = 4780; + public const short MushroomPants = 4781; + public const short FairyQueenBossBag = 4782; + public const short FairyQueenTrophy = 4783; + public const short FairyQueenMask = 4784; + public const short PaintedHorseSaddle = 4785; + public const short MajesticHorseSaddle = 4786; + public const short DarkHorseSaddle = 4787; + public const short JoustingLance = 4788; + public const short ShadowJoustingLance = 4789; + public const short HallowJoustingLance = 4790; + public const short PogoStick = 4791; + public const short PirateShipMountItem = 4792; + public const short SpookyWoodMountItem = 4793; + public const short SantankMountItem = 4794; + public const short WallOfFleshGoatMountItem = 4795; + public const short DarkMageBookMountItem = 4796; + public const short KingSlimePetItem = 4797; + public const short EyeOfCthulhuPetItem = 4798; + public const short EaterOfWorldsPetItem = 4799; + public const short BrainOfCthulhuPetItem = 4800; + public const short SkeletronPetItem = 4801; + public const short QueenBeePetItem = 4802; + public const short DestroyerPetItem = 4803; + public const short TwinsPetItem = 4804; + public const short SkeletronPrimePetItem = 4805; + public const short PlanteraPetItem = 4806; + public const short GolemPetItem = 4807; + public const short DukeFishronPetItem = 4808; + public const short LunaticCultistPetItem = 4809; + public const short MoonLordPetItem = 4810; + public const short FairyQueenPetItem = 4811; + public const short PumpkingPetItem = 4812; + public const short EverscreamPetItem = 4813; + public const short IceQueenPetItem = 4814; + public const short MartianPetItem = 4815; + public const short DD2OgrePetItem = 4816; + public const short DD2BetsyPetItem = 4817; + public const short CombatWrench = 4818; + public const short DemonConch = 4819; + public const short BottomlessLavaBucket = 4820; + public const short FireproofBugNet = 4821; + public const short FlameWakerBoots = 4822; + public const short RainbowWings = 4823; + public const short WetBomb = 4824; + public const short LavaBomb = 4825; + public const short HoneyBomb = 4826; + public const short DryBomb = 4827; + public const short SuperheatedBlood = 4828; + public const short LicenseCat = 4829; + public const short LicenseDog = 4830; + public const short GemSquirrelAmethyst = 4831; + public const short GemSquirrelTopaz = 4832; + public const short GemSquirrelSapphire = 4833; + public const short GemSquirrelEmerald = 4834; + public const short GemSquirrelRuby = 4835; + public const short GemSquirrelDiamond = 4836; + public const short GemSquirrelAmber = 4837; + public const short GemBunnyAmethyst = 4838; + public const short GemBunnyTopaz = 4839; + public const short GemBunnySapphire = 4840; + public const short GemBunnyEmerald = 4841; + public const short GemBunnyRuby = 4842; + public const short GemBunnyDiamond = 4843; + public const short GemBunnyAmber = 4844; + public const short HellButterfly = 4845; + public const short HellButterflyJar = 4846; + public const short Lavafly = 4847; + public const short LavaflyinaBottle = 4848; + public const short MagmaSnail = 4849; + public const short MagmaSnailCage = 4850; + public const short GemTreeTopazSeed = 4851; + public const short GemTreeAmethystSeed = 4852; + public const short GemTreeSapphireSeed = 4853; + public const short GemTreeEmeraldSeed = 4854; + public const short GemTreeRubySeed = 4855; + public const short GemTreeDiamondSeed = 4856; + public const short GemTreeAmberSeed = 4857; + public const short PotSuspended = 4858; + public const short PotSuspendedDaybloom = 4859; + public const short PotSuspendedMoonglow = 4860; + public const short PotSuspendedWaterleaf = 4861; + public const short PotSuspendedShiverthorn = 4862; + public const short PotSuspendedBlinkroot = 4863; + public const short PotSuspendedDeathweedCorrupt = 4864; + public const short PotSuspendedDeathweedCrimson = 4865; + public const short PotSuspendedFireblossom = 4866; + public const short BrazierSuspended = 4867; + public const short VolcanoSmall = 4868; + public const short VolcanoLarge = 4869; + public const short PotionOfReturn = 4870; + public const short VanityTreeSakuraSeed = 4871; + public const short LavaAbsorbantSponge = 4872; + public const short HallowedHood = 4873; + public const short HellfireTreads = 4874; + public const short TeleportationPylonJungle = 4875; + public const short TeleportationPylonPurity = 4876; + public const short LavaCrate = 4877; + public const short LavaCrateHard = 4878; + public const short ObsidianLockbox = 4879; + public const short LavaFishbowl = 4880; + public const short LavaFishingHook = 4881; + public const short AmethystBunnyCage = 4882; + public const short TopazBunnyCage = 4883; + public const short SapphireBunnyCage = 4884; + public const short EmeraldBunnyCage = 4885; + public const short RubyBunnyCage = 4886; + public const short DiamondBunnyCage = 4887; + public const short AmberBunnyCage = 4888; + public const short AmethystSquirrelCage = 4889; + public const short TopazSquirrelCage = 4890; + public const short SapphireSquirrelCage = 4891; + public const short EmeraldSquirrelCage = 4892; + public const short RubySquirrelCage = 4893; + public const short DiamondSquirrelCage = 4894; + public const short AmberSquirrelCage = 4895; + public const short AncientHallowedMask = 4896; + public const short AncientHallowedHelmet = 4897; + public const short AncientHallowedHeadgear = 4898; + public const short AncientHallowedHood = 4899; + public const short AncientHallowedPlateMail = 4900; + public const short AncientHallowedGreaves = 4901; + public const short PottedLavaPlantPalm = 4902; + public const short PottedLavaPlantBush = 4903; + public const short PottedLavaPlantBramble = 4904; + public const short PottedLavaPlantBulb = 4905; + public const short PottedLavaPlantTendrils = 4906; + public const short VanityTreeYellowWillowSeed = 4907; + public const short DirtBomb = 4908; + public const short DirtStickyBomb = 4909; + public const short LicenseBunny = 4910; + public const short CoolWhip = 4911; + public const short FireWhip = 4912; + public const short ThornWhip = 4913; + public const short RainbowWhip = 4914; + public const short TungstenBullet = 4915; + public const short TeleportationPylonHallow = 4916; + public const short TeleportationPylonUnderground = 4917; + public const short TeleportationPylonOcean = 4918; + public const short TeleportationPylonDesert = 4919; + public const short TeleportationPylonSnow = 4920; + public const short TeleportationPylonMushroom = 4921; + public const short CavernFountain = 4922; + public const short PiercingStarlight = 4923; + public const short EyeofCthulhuMasterTrophy = 4924; + public const short EaterofWorldsMasterTrophy = 4925; + public const short BrainofCthulhuMasterTrophy = 4926; + public const short SkeletronMasterTrophy = 4927; + public const short QueenBeeMasterTrophy = 4928; + public const short KingSlimeMasterTrophy = 4929; + public const short WallofFleshMasterTrophy = 4930; + public const short TwinsMasterTrophy = 4931; + public const short DestroyerMasterTrophy = 4932; + public const short SkeletronPrimeMasterTrophy = 4933; + public const short PlanteraMasterTrophy = 4934; + public const short GolemMasterTrophy = 4935; + public const short DukeFishronMasterTrophy = 4936; + public const short LunaticCultistMasterTrophy = 4937; + public const short MoonLordMasterTrophy = 4938; + public const short UFOMasterTrophy = 4939; + public const short FlyingDutchmanMasterTrophy = 4940; + public const short MourningWoodMasterTrophy = 4941; + public const short PumpkingMasterTrophy = 4942; + public const short IceQueenMasterTrophy = 4943; + public const short EverscreamMasterTrophy = 4944; + public const short SantankMasterTrophy = 4945; + public const short DarkMageMasterTrophy = 4946; + public const short OgreMasterTrophy = 4947; + public const short BetsyMasterTrophy = 4948; + public const short FairyQueenMasterTrophy = 4949; + public const short QueenSlimeMasterTrophy = 4950; + public const short TeleportationPylonVictory = 4951; + public const short FairyQueenMagicItem = 4952; + public const short FairyQueenRangedItem = 4953; + public const short LongRainbowTrailWings = 4954; + public const short RabbitOrder = 4955; + public const short Zenith = 4956; + public const short QueenSlimeBossBag = 4957; + public const short QueenSlimeTrophy = 4958; + public const short QueenSlimeMask = 4959; + public const short QueenSlimePetItem = 4960; + public const short EmpressButterfly = 4961; + public const short AccentSlab = 4962; + public const short TruffleWormCage = 4963; + public const short EmpressButterflyJar = 4964; + public const short RockGolemBanner = 4965; + public const short BloodMummyBanner = 4966; + public const short SporeSkeletonBanner = 4967; + public const short SporeBatBanner = 4968; + public const short LarvaeAntlionBanner = 4969; + public const short CrimsonBunnyBanner = 4970; + public const short CrimsonGoldfishBanner = 4971; + public const short CrimsonPenguinBanner = 4972; + public const short BigMimicCorruptionBanner = 4973; + public const short BigMimicCrimsonBanner = 4974; + public const short BigMimicHallowBanner = 4975; + public const short MossHornetBanner = 4976; + public const short WanderingEyeBanner = 4977; + public const short CreativeWings = 4978; + public const short MusicBoxQueenSlime = 4979; + public const short QueenSlimeHook = 4980; + public const short QueenSlimeMountSaddle = 4981; + public const short CrystalNinjaHelmet = 4982; + public const short CrystalNinjaChestplate = 4983; + public const short CrystalNinjaLeggings = 4984; + public const short MusicBoxEmpressOfLight = 4985; + public const short GelBalloon = 4986; + public const short VolatileGelatin = 4987; + public const short QueenSlimeCrystal = 4988; + public const short EmpressFlightBooster = 4989; + public const short MusicBoxDukeFishron = 4990; + public const short MusicBoxMorningRain = 4991; + public const short MusicBoxConsoleTitle = 4992; + public const short ChippysCouch = 4993; + public const short GraduationCapBlue = 4994; + public const short GraduationCapMaroon = 4995; + public const short GraduationCapBlack = 4996; + public const short GraduationGownBlue = 4997; + public const short GraduationGownMaroon = 4998; + public const short GraduationGownBlack = 4999; + public const short TerrasparkBoots = 5000; + public const short MoonLordLegs = 5001; + public const short OceanCrate = 5002; + public const short OceanCrateHard = 5003; + public const short BadgersHat = 5004; + public const short EmpressBlade = 5005; + public const short MusicBoxUndergroundDesert = 5006; + public const short DeadMansSweater = 5007; + public const short TeaKettle = 5008; + public const short Teacup = 5009; + public const short TreasureMagnet = 5010; + public const short Mace = 5011; + public const short FlamingMace = 5012; + public const short SleepingIcon = 5013; + public const short MusicBoxOWRain = 5014; + public const short MusicBoxOWDay = 5015; + public const short MusicBoxOWNight = 5016; + public const short MusicBoxOWUnderground = 5017; + public const short MusicBoxOWDesert = 5018; + public const short MusicBoxOWOcean = 5019; + public const short MusicBoxOWMushroom = 5020; + public const short MusicBoxOWDungeon = 5021; + public const short MusicBoxOWSpace = 5022; + public const short MusicBoxOWUnderworld = 5023; + public const short MusicBoxOWSnow = 5024; + public const short MusicBoxOWCorruption = 5025; + public const short MusicBoxOWUndergroundCorruption = 5026; + public const short MusicBoxOWCrimson = 5027; + public const short MusicBoxOWUndergroundCrimson = 5028; + public const short MusicBoxOWUndergroundSnow = 5029; + public const short MusicBoxOWUndergroundHallow = 5030; + public const short MusicBoxOWBloodMoon = 5031; + public const short MusicBoxOWBoss2 = 5032; + public const short MusicBoxOWBoss1 = 5033; + public const short MusicBoxOWInvasion = 5034; + public const short MusicBoxOWTowers = 5035; + public const short MusicBoxOWMoonLord = 5036; + public const short MusicBoxOWPlantera = 5037; + public const short MusicBoxOWJungle = 5038; + public const short MusicBoxOWWallOfFlesh = 5039; + public const short MusicBoxOWHallow = 5040; + public const short MilkCarton = 5041; + public const short CoffeeCup = 5042; + public const short TorchGodsFavor = 5043; + public const short MusicBoxCredits = 5044; + public const short Count = 5045; + + private static Dictionary GenerateLegacyItemDictionary() => new Dictionary() + { + { + "Iron Pickaxe", + (short) 1 + }, + { + "Dirt Block", + (short) 2 + }, + { + "Stone Block", + (short) 3 + }, + { + "Iron Broadsword", + (short) 4 + }, + { + "Mushroom", + (short) 5 + }, + { + "Iron Shortsword", + (short) 6 + }, + { + "Iron Hammer", + (short) 7 + }, + { + "Torch", + (short) 8 + }, + { + "Wood", + (short) 9 + }, + { + "Iron Axe", + (short) 10 + }, + { + "Iron Ore", + (short) 11 + }, + { + "Copper Ore", + (short) 12 + }, + { + "Gold Ore", + (short) 13 + }, + { + "Silver Ore", + (short) 14 + }, + { + "Copper Watch", + (short) 15 + }, + { + "Silver Watch", + (short) 16 + }, + { + "Gold Watch", + (short) 17 + }, + { + "Depth Meter", + (short) 18 + }, + { + "Gold Bar", + (short) 19 + }, + { + "Copper Bar", + (short) 20 + }, + { + "Silver Bar", + (short) 21 + }, + { + "Iron Bar", + (short) 22 + }, + { + "Gel", + (short) 23 + }, + { + "Wooden Sword", + (short) 24 + }, + { + "Wooden Door", + (short) 25 + }, + { + "Stone Wall", + (short) 26 + }, + { + "Acorn", + (short) 27 + }, + { + "Lesser Healing Potion", + (short) 28 + }, + { + "Life Crystal", + (short) 29 + }, + { + "Dirt Wall", + (short) 30 + }, + { + "Bottle", + (short) 31 + }, + { + "Wooden Table", + (short) 32 + }, + { + "Furnace", + (short) 33 + }, + { + "Wooden Chair", + (short) 34 + }, + { + "Iron Anvil", + (short) 35 + }, + { + "Work Bench", + (short) 36 + }, + { + "Goggles", + (short) 37 + }, + { + "Lens", + (short) 38 + }, + { + "Wooden Bow", + (short) 39 + }, + { + "Wooden Arrow", + (short) 40 + }, + { + "Flaming Arrow", + (short) 41 + }, + { + "Shuriken", + (short) 42 + }, + { + "Suspicious Looking Eye", + (short) 43 + }, + { + "Demon Bow", + (short) 44 + }, + { + "War Axe of the Night", + (short) 45 + }, + { + "Light's Bane", + (short) 46 + }, + { + "Unholy Arrow", + (short) 47 + }, + { + "Chest", + (short) 48 + }, + { + "Band of Regeneration", + (short) 49 + }, + { + "Magic Mirror", + (short) 50 + }, + { + "Jester's Arrow", + (short) 51 + }, + { + "Angel Statue", + (short) 52 + }, + { + "Cloud in a Bottle", + (short) 53 + }, + { + "Hermes Boots", + (short) 54 + }, + { + "Enchanted Boomerang", + (short) 55 + }, + { + "Demonite Ore", + (short) 56 + }, + { + "Demonite Bar", + (short) 57 + }, + { + "Heart", + (short) 58 + }, + { + "Corrupt Seeds", + (short) 59 + }, + { + "Vile Mushroom", + (short) 60 + }, + { + "Ebonstone Block", + (short) 61 + }, + { + "Grass Seeds", + (short) 62 + }, + { + "Sunflower", + (short) 63 + }, + { + "Vilethorn", + (short) 64 + }, + { + "Starfury", + (short) 65 + }, + { + "Purification Powder", + (short) 66 + }, + { + "Vile Powder", + (short) 67 + }, + { + "Rotten Chunk", + (short) 68 + }, + { + "Worm Tooth", + (short) 69 + }, + { + "Worm Food", + (short) 70 + }, + { + "Copper Coin", + (short) 71 + }, + { + "Silver Coin", + (short) 72 + }, + { + "Gold Coin", + (short) 73 + }, + { + "Platinum Coin", + (short) 74 + }, + { + "Fallen Star", + (short) 75 + }, + { + "Copper Greaves", + (short) 76 + }, + { + "Iron Greaves", + (short) 77 + }, + { + "Silver Greaves", + (short) 78 + }, + { + "Gold Greaves", + (short) 79 + }, + { + "Copper Chainmail", + (short) 80 + }, + { + "Iron Chainmail", + (short) 81 + }, + { + "Silver Chainmail", + (short) 82 + }, + { + "Gold Chainmail", + (short) 83 + }, + { + "Grappling Hook", + (short) 84 + }, + { + "Chain", + (short) 85 + }, + { + "Shadow Scale", + (short) 86 + }, + { + "Piggy Bank", + (short) 87 + }, + { + "Mining Helmet", + (short) 88 + }, + { + "Copper Helmet", + (short) 89 + }, + { + "Iron Helmet", + (short) 90 + }, + { + "Silver Helmet", + (short) 91 + }, + { + "Gold Helmet", + (short) 92 + }, + { + "Wood Wall", + (short) 93 + }, + { + "Wood Platform", + (short) 94 + }, + { + "Flintlock Pistol", + (short) 95 + }, + { + "Musket", + (short) 96 + }, + { + "Musket Ball", + (short) 97 + }, + { + "Minishark", + (short) 98 + }, + { + "Iron Bow", + (short) 99 + }, + { + "Shadow Greaves", + (short) 100 + }, + { + "Shadow Scalemail", + (short) 101 + }, + { + "Shadow Helmet", + (short) 102 + }, + { + "Nightmare Pickaxe", + (short) 103 + }, + { + "The Breaker", + (short) 104 + }, + { + "Candle", + (short) 105 + }, + { + "Copper Chandelier", + (short) 106 + }, + { + "Silver Chandelier", + (short) 107 + }, + { + "Gold Chandelier", + (short) 108 + }, + { + "Mana Crystal", + (short) 109 + }, + { + "Lesser Mana Potion", + (short) 110 + }, + { + "Band of Starpower", + (short) 111 + }, + { + "Flower of Fire", + (short) 112 + }, + { + "Magic Missile", + (short) 113 + }, + { + "Dirt Rod", + (short) 114 + }, + { + "Shadow Orb", + (short) 115 + }, + { + "Meteorite", + (short) 116 + }, + { + "Meteorite Bar", + (short) 117 + }, + { + "Hook", + (short) 118 + }, + { + "Flamarang", + (short) 119 + }, + { + "Molten Fury", + (short) 120 + }, + { + "Fiery Greatsword", + (short) 121 + }, + { + "Molten Pickaxe", + (short) 122 + }, + { + "Meteor Helmet", + (short) 123 + }, + { + "Meteor Suit", + (short) 124 + }, + { + "Meteor Leggings", + (short) 125 + }, + { + "Bottled Water", + (short) 126 + }, + { + "Space Gun", + (short) sbyte.MaxValue + }, + { + "Rocket Boots", + (short) 128 + }, + { + "Gray Brick", + (short) 129 + }, + { + "Gray Brick Wall", + (short) 130 + }, + { + "Red Brick", + (short) 131 + }, + { + "Red Brick Wall", + (short) 132 + }, + { + "Clay Block", + (short) 133 + }, + { + "Blue Brick", + (short) 134 + }, + { + "Blue Brick Wall", + (short) 135 + }, + { + "Chain Lantern", + (short) 136 + }, + { + "Green Brick", + (short) 137 + }, + { + "Green Brick Wall", + (short) 138 + }, + { + "Pink Brick", + (short) 139 + }, + { + "Pink Brick Wall", + (short) 140 + }, + { + "Gold Brick", + (short) 141 + }, + { + "Gold Brick Wall", + (short) 142 + }, + { + "Silver Brick", + (short) 143 + }, + { + "Silver Brick Wall", + (short) 144 + }, + { + "Copper Brick", + (short) 145 + }, + { + "Copper Brick Wall", + (short) 146 + }, + { + "Spike", + (short) 147 + }, + { + "Water Candle", + (short) 148 + }, + { + "Book", + (short) 149 + }, + { + "Cobweb", + (short) 150 + }, + { + "Necro Helmet", + (short) 151 + }, + { + "Necro Breastplate", + (short) 152 + }, + { + "Necro Greaves", + (short) 153 + }, + { + "Bone", + (short) 154 + }, + { + "Muramasa", + (short) 155 + }, + { + "Cobalt Shield", + (short) 156 + }, + { + "Aqua Scepter", + (short) 157 + }, + { + "Lucky Horseshoe", + (short) 158 + }, + { + "Shiny Red Balloon", + (short) 159 + }, + { + "Harpoon", + (short) 160 + }, + { + "Spiky Ball", + (short) 161 + }, + { + "Ball O' Hurt", + (short) 162 + }, + { + "Blue Moon", + (short) 163 + }, + { + "Handgun", + (short) 164 + }, + { + "Water Bolt", + (short) 165 + }, + { + "Bomb", + (short) 166 + }, + { + "Dynamite", + (short) 167 + }, + { + "Grenade", + (short) 168 + }, + { + "Sand Block", + (short) 169 + }, + { + "Glass", + (short) 170 + }, + { + "Sign", + (short) 171 + }, + { + "Ash Block", + (short) 172 + }, + { + "Obsidian", + (short) 173 + }, + { + "Hellstone", + (short) 174 + }, + { + "Hellstone Bar", + (short) 175 + }, + { + "Mud Block", + (short) 176 + }, + { + "Sapphire", + (short) 177 + }, + { + "Ruby", + (short) 178 + }, + { + "Emerald", + (short) 179 + }, + { + "Topaz", + (short) 180 + }, + { + "Amethyst", + (short) 181 + }, + { + "Diamond", + (short) 182 + }, + { + "Glowing Mushroom", + (short) 183 + }, + { + "Star", + (short) 184 + }, + { + "Ivy Whip", + (short) 185 + }, + { + "Breathing Reed", + (short) 186 + }, + { + "Flipper", + (short) 187 + }, + { + "Healing Potion", + (short) 188 + }, + { + "Mana Potion", + (short) 189 + }, + { + "Blade of Grass", + (short) 190 + }, + { + "Thorn Chakram", + (short) 191 + }, + { + "Obsidian Brick", + (short) 192 + }, + { + "Obsidian Skull", + (short) 193 + }, + { + "Mushroom Grass Seeds", + (short) 194 + }, + { + "Jungle Grass Seeds", + (short) 195 + }, + { + "Wooden Hammer", + (short) 196 + }, + { + "Star Cannon", + (short) 197 + }, + { + "Blue Phaseblade", + (short) 198 + }, + { + "Red Phaseblade", + (short) 199 + }, + { + "Green Phaseblade", + (short) 200 + }, + { + "Purple Phaseblade", + (short) 201 + }, + { + "White Phaseblade", + (short) 202 + }, + { + "Yellow Phaseblade", + (short) 203 + }, + { + "Meteor Hamaxe", + (short) 204 + }, + { + "Empty Bucket", + (short) 205 + }, + { + "Water Bucket", + (short) 206 + }, + { + "Lava Bucket", + (short) 207 + }, + { + "Jungle Rose", + (short) 208 + }, + { + "Stinger", + (short) 209 + }, + { + "Vine", + (short) 210 + }, + { + "Feral Claws", + (short) 211 + }, + { + "Anklet of the Wind", + (short) 212 + }, + { + "Staff of Regrowth", + (short) 213 + }, + { + "Hellstone Brick", + (short) 214 + }, + { + "Whoopie Cushion", + (short) 215 + }, + { + "Shackle", + (short) 216 + }, + { + "Molten Hamaxe", + (short) 217 + }, + { + "Flamelash", + (short) 218 + }, + { + "Phoenix Blaster", + (short) 219 + }, + { + "Sunfury", + (short) 220 + }, + { + "Hellforge", + (short) 221 + }, + { + "Clay Pot", + (short) 222 + }, + { + "Nature's Gift", + (short) 223 + }, + { + "Bed", + (short) 224 + }, + { + "Silk", + (short) 225 + }, + { + "Lesser Restoration Potion", + (short) 226 + }, + { + "Restoration Potion", + (short) 227 + }, + { + "Jungle Hat", + (short) 228 + }, + { + "Jungle Shirt", + (short) 229 + }, + { + "Jungle Pants", + (short) 230 + }, + { + "Molten Helmet", + (short) 231 + }, + { + "Molten Breastplate", + (short) 232 + }, + { + "Molten Greaves", + (short) 233 + }, + { + "Meteor Shot", + (short) 234 + }, + { + "Sticky Bomb", + (short) 235 + }, + { + "Black Lens", + (short) 236 + }, + { + "Sunglasses", + (short) 237 + }, + { + "Wizard Hat", + (short) 238 + }, + { + "Top Hat", + (short) 239 + }, + { + "Tuxedo Shirt", + (short) 240 + }, + { + "Tuxedo Pants", + (short) 241 + }, + { + "Summer Hat", + (short) 242 + }, + { + "Bunny Hood", + (short) 243 + }, + { + "Plumber's Hat", + (short) 244 + }, + { + "Plumber's Shirt", + (short) 245 + }, + { + "Plumber's Pants", + (short) 246 + }, + { + "Hero's Hat", + (short) 247 + }, + { + "Hero's Shirt", + (short) 248 + }, + { + "Hero's Pants", + (short) 249 + }, + { + "Fish Bowl", + (short) 250 + }, + { + "Archaeologist's Hat", + (short) 251 + }, + { + "Archaeologist's Jacket", + (short) 252 + }, + { + "Archaeologist's Pants", + (short) 253 + }, + { + "Black Thread", + (short) 254 + }, + { + "Green Thread", + (short) byte.MaxValue + }, + { + "Ninja Hood", + (short) 256 + }, + { + "Ninja Shirt", + (short) 257 + }, + { + "Ninja Pants", + (short) 258 + }, + { + "Leather", + (short) 259 + }, + { + "Red Hat", + (short) 260 + }, + { + "Goldfish", + (short) 261 + }, + { + "Robe", + (short) 262 + }, + { + "Robot Hat", + (short) 263 + }, + { + "Gold Crown", + (short) 264 + }, + { + "Hellfire Arrow", + (short) 265 + }, + { + "Sandgun", + (short) 266 + }, + { + "Guide Voodoo Doll", + (short) 267 + }, + { + "Diving Helmet", + (short) 268 + }, + { + "Familiar Shirt", + (short) 269 + }, + { + "Familiar Pants", + (short) 270 + }, + { + "Familiar Wig", + (short) 271 + }, + { + "Demon Scythe", + (short) 272 + }, + { + "Night's Edge", + (short) 273 + }, + { + "Dark Lance", + (short) 274 + }, + { + "Coral", + (short) 275 + }, + { + "Cactus", + (short) 276 + }, + { + "Trident", + (short) 277 + }, + { + "Silver Bullet", + (short) 278 + }, + { + "Throwing Knife", + (short) 279 + }, + { + "Spear", + (short) 280 + }, + { + "Blowpipe", + (short) 281 + }, + { + "Glowstick", + (short) 282 + }, + { + "Seed", + (short) 283 + }, + { + "Wooden Boomerang", + (short) 284 + }, + { + "Aglet", + (short) 285 + }, + { + "Sticky Glowstick", + (short) 286 + }, + { + "Poisoned Knife", + (short) 287 + }, + { + "Obsidian Skin Potion", + (short) 288 + }, + { + "Regeneration Potion", + (short) 289 + }, + { + "Swiftness Potion", + (short) 290 + }, + { + "Gills Potion", + (short) 291 + }, + { + "Ironskin Potion", + (short) 292 + }, + { + "Mana Regeneration Potion", + (short) 293 + }, + { + "Magic Power Potion", + (short) 294 + }, + { + "Featherfall Potion", + (short) 295 + }, + { + "Spelunker Potion", + (short) 296 + }, + { + "Invisibility Potion", + (short) 297 + }, + { + "Shine Potion", + (short) 298 + }, + { + "Night Owl Potion", + (short) 299 + }, + { + "Battle Potion", + (short) 300 + }, + { + "Thorns Potion", + (short) 301 + }, + { + "Water Walking Potion", + (short) 302 + }, + { + "Archery Potion", + (short) 303 + }, + { + "Hunter Potion", + (short) 304 + }, + { + "Gravitation Potion", + (short) 305 + }, + { + "Gold Chest", + (short) 306 + }, + { + "Daybloom Seeds", + (short) 307 + }, + { + "Moonglow Seeds", + (short) 308 + }, + { + "Blinkroot Seeds", + (short) 309 + }, + { + "Deathweed Seeds", + (short) 310 + }, + { + "Waterleaf Seeds", + (short) 311 + }, + { + "Fireblossom Seeds", + (short) 312 + }, + { + "Daybloom", + (short) 313 + }, + { + "Moonglow", + (short) 314 + }, + { + "Blinkroot", + (short) 315 + }, + { + "Deathweed", + (short) 316 + }, + { + "Waterleaf", + (short) 317 + }, + { + "Fireblossom", + (short) 318 + }, + { + "Shark Fin", + (short) 319 + }, + { + "Feather", + (short) 320 + }, + { + "Tombstone", + (short) 321 + }, + { + "Mime Mask", + (short) 322 + }, + { + "Antlion Mandible", + (short) 323 + }, + { + "Illegal Gun Parts", + (short) 324 + }, + { + "The Doctor's Shirt", + (short) 325 + }, + { + "The Doctor's Pants", + (short) 326 + }, + { + "Golden Key", + (short) 327 + }, + { + "Shadow Chest", + (short) 328 + }, + { + "Shadow Key", + (short) 329 + }, + { + "Obsidian Brick Wall", + (short) 330 + }, + { + "Jungle Spores", + (short) 331 + }, + { + "Loom", + (short) 332 + }, + { + "Piano", + (short) 333 + }, + { + "Dresser", + (short) 334 + }, + { + "Bench", + (short) 335 + }, + { + "Bathtub", + (short) 336 + }, + { + "Red Banner", + (short) 337 + }, + { + "Green Banner", + (short) 338 + }, + { + "Blue Banner", + (short) 339 + }, + { + "Yellow Banner", + (short) 340 + }, + { + "Lamp Post", + (short) 341 + }, + { + "Tiki Torch", + (short) 342 + }, + { + "Barrel", + (short) 343 + }, + { + "Chinese Lantern", + (short) 344 + }, + { + "Cooking Pot", + (short) 345 + }, + { + "Safe", + (short) 346 + }, + { + "Skull Lantern", + (short) 347 + }, + { + "Trash Can", + (short) 348 + }, + { + "Candelabra", + (short) 349 + }, + { + "Pink Vase", + (short) 350 + }, + { + "Mug", + (short) 351 + }, + { + "Keg", + (short) 352 + }, + { + "Ale", + (short) 353 + }, + { + "Bookcase", + (short) 354 + }, + { + "Throne", + (short) 355 + }, + { + "Bowl", + (short) 356 + }, + { + "Bowl of Soup", + (short) 357 + }, + { + "Toilet", + (short) 358 + }, + { + "Grandfather Clock", + (short) 359 + }, + { + "Armor Statue", + (short) 360 + }, + { + "Goblin Battle Standard", + (short) 361 + }, + { + "Tattered Cloth", + (short) 362 + }, + { + "Sawmill", + (short) 363 + }, + { + "Cobalt Ore", + (short) 364 + }, + { + "Mythril Ore", + (short) 365 + }, + { + "Adamantite Ore", + (short) 366 + }, + { + "Pwnhammer", + (short) 367 + }, + { + "Excalibur", + (short) 368 + }, + { + "Hallowed Seeds", + (short) 369 + }, + { + "Ebonsand Block", + (short) 370 + }, + { + "Cobalt Hat", + (short) 371 + }, + { + "Cobalt Helmet", + (short) 372 + }, + { + "Cobalt Mask", + (short) 373 + }, + { + "Cobalt Breastplate", + (short) 374 + }, + { + "Cobalt Leggings", + (short) 375 + }, + { + "Mythril Hood", + (short) 376 + }, + { + "Mythril Helmet", + (short) 377 + }, + { + "Mythril Hat", + (short) 378 + }, + { + "Mythril Chainmail", + (short) 379 + }, + { + "Mythril Greaves", + (short) 380 + }, + { + "Cobalt Bar", + (short) 381 + }, + { + "Mythril Bar", + (short) 382 + }, + { + "Cobalt Chainsaw", + (short) 383 + }, + { + "Mythril Chainsaw", + (short) 384 + }, + { + "Cobalt Drill", + (short) 385 + }, + { + "Mythril Drill", + (short) 386 + }, + { + "Adamantite Chainsaw", + (short) 387 + }, + { + "Adamantite Drill", + (short) 388 + }, + { + "Dao of Pow", + (short) 389 + }, + { + "Mythril Halberd", + (short) 390 + }, + { + "Adamantite Bar", + (short) 391 + }, + { + "Glass Wall", + (short) 392 + }, + { + "Compass", + (short) 393 + }, + { + "Diving Gear", + (short) 394 + }, + { + "GPS", + (short) 395 + }, + { + "Obsidian Horseshoe", + (short) 396 + }, + { + "Obsidian Shield", + (short) 397 + }, + { + "Tinkerer's Workshop", + (short) 398 + }, + { + "Cloud in a Balloon", + (short) 399 + }, + { + "Adamantite Headgear", + (short) 400 + }, + { + "Adamantite Helmet", + (short) 401 + }, + { + "Adamantite Mask", + (short) 402 + }, + { + "Adamantite Breastplate", + (short) 403 + }, + { + "Adamantite Leggings", + (short) 404 + }, + { + "Spectre Boots", + (short) 405 + }, + { + "Adamantite Glaive", + (short) 406 + }, + { + "Toolbelt", + (short) 407 + }, + { + "Pearlsand Block", + (short) 408 + }, + { + "Pearlstone Block", + (short) 409 + }, + { + "Mining Shirt", + (short) 410 + }, + { + "Mining Pants", + (short) 411 + }, + { + "Pearlstone Brick", + (short) 412 + }, + { + "Iridescent Brick", + (short) 413 + }, + { + "Mudstone Brick", + (short) 414 + }, + { + "Cobalt Brick", + (short) 415 + }, + { + "Mythril Brick", + (short) 416 + }, + { + "Pearlstone Brick Wall", + (short) 417 + }, + { + "Iridescent Brick Wall", + (short) 418 + }, + { + "Mudstone Brick Wall", + (short) 419 + }, + { + "Cobalt Brick Wall", + (short) 420 + }, + { + "Mythril Brick Wall", + (short) 421 + }, + { + "Holy Water", + (short) 422 + }, + { + "Unholy Water", + (short) 423 + }, + { + "Silt Block", + (short) 424 + }, + { + "Fairy Bell", + (short) 425 + }, + { + "Breaker Blade", + (short) 426 + }, + { + "Blue Torch", + (short) 427 + }, + { + "Red Torch", + (short) 428 + }, + { + "Green Torch", + (short) 429 + }, + { + "Purple Torch", + (short) 430 + }, + { + "White Torch", + (short) 431 + }, + { + "Yellow Torch", + (short) 432 + }, + { + "Demon Torch", + (short) 433 + }, + { + "Clockwork Assault Rifle", + (short) 434 + }, + { + "Cobalt Repeater", + (short) 435 + }, + { + "Mythril Repeater", + (short) 436 + }, + { + "Dual Hook", + (short) 437 + }, + { + "Star Statue", + (short) 438 + }, + { + "Sword Statue", + (short) 439 + }, + { + "Slime Statue", + (short) 440 + }, + { + "Goblin Statue", + (short) 441 + }, + { + "Shield Statue", + (short) 442 + }, + { + "Bat Statue", + (short) 443 + }, + { + "Fish Statue", + (short) 444 + }, + { + "Bunny Statue", + (short) 445 + }, + { + "Skeleton Statue", + (short) 446 + }, + { + "Reaper Statue", + (short) 447 + }, + { + "Woman Statue", + (short) 448 + }, + { + "Imp Statue", + (short) 449 + }, + { + "Gargoyle Statue", + (short) 450 + }, + { + "Gloom Statue", + (short) 451 + }, + { + "Hornet Statue", + (short) 452 + }, + { + "Bomb Statue", + (short) 453 + }, + { + "Crab Statue", + (short) 454 + }, + { + "Hammer Statue", + (short) 455 + }, + { + "Potion Statue", + (short) 456 + }, + { + "Spear Statue", + (short) 457 + }, + { + "Cross Statue", + (short) 458 + }, + { + "Jellyfish Statue", + (short) 459 + }, + { + "Bow Statue", + (short) 460 + }, + { + "Boomerang Statue", + (short) 461 + }, + { + "Boot Statue", + (short) 462 + }, + { + "Chest Statue", + (short) 463 + }, + { + "Bird Statue", + (short) 464 + }, + { + "Axe Statue", + (short) 465 + }, + { + "Corrupt Statue", + (short) 466 + }, + { + "Tree Statue", + (short) 467 + }, + { + "Anvil Statue", + (short) 468 + }, + { + "Pickaxe Statue", + (short) 469 + }, + { + "Mushroom Statue", + (short) 470 + }, + { + "Eyeball Statue", + (short) 471 + }, + { + "Pillar Statue", + (short) 472 + }, + { + "Heart Statue", + (short) 473 + }, + { + "Pot Statue", + (short) 474 + }, + { + "Sunflower Statue", + (short) 475 + }, + { + "King Statue", + (short) 476 + }, + { + "Queen Statue", + (short) 477 + }, + { + "Piranha Statue", + (short) 478 + }, + { + "Planked Wall", + (short) 479 + }, + { + "Wooden Beam", + (short) 480 + }, + { + "Adamantite Repeater", + (short) 481 + }, + { + "Adamantite Sword", + (short) 482 + }, + { + "Cobalt Sword", + (short) 483 + }, + { + "Mythril Sword", + (short) 484 + }, + { + "Moon Charm", + (short) 485 + }, + { + "Ruler", + (short) 486 + }, + { + "Crystal Ball", + (short) 487 + }, + { + "Disco Ball", + (short) 488 + }, + { + "Sorcerer Emblem", + (short) 489 + }, + { + "Warrior Emblem", + (short) 490 + }, + { + "Ranger Emblem", + (short) 491 + }, + { + "Demon Wings", + (short) 492 + }, + { + "Angel Wings", + (short) 493 + }, + { + "Magical Harp", + (short) 494 + }, + { + "Rainbow Rod", + (short) 495 + }, + { + "Ice Rod", + (short) 496 + }, + { + "Neptune's Shell", + (short) 497 + }, + { + "Mannequin", + (short) 498 + }, + { + "Greater Healing Potion", + (short) 499 + }, + { + "Greater Mana Potion", + (short) 500 + }, + { + "Pixie Dust", + (short) 501 + }, + { + "Crystal Shard", + (short) 502 + }, + { + "Clown Hat", + (short) 503 + }, + { + "Clown Shirt", + (short) 504 + }, + { + "Clown Pants", + (short) 505 + }, + { + "Flamethrower", + (short) 506 + }, + { + "Bell", + (short) 507 + }, + { + "Harp", + (short) 508 + }, + { + "Red Wrench", + (short) 509 + }, + { + "Wire Cutter", + (short) 510 + }, + { + "Active Stone Block", + (short) 511 + }, + { + "Inactive Stone Block", + (short) 512 + }, + { + "Lever", + (short) 513 + }, + { + "Laser Rifle", + (short) 514 + }, + { + "Crystal Bullet", + (short) 515 + }, + { + "Holy Arrow", + (short) 516 + }, + { + "Magic Dagger", + (short) 517 + }, + { + "Crystal Storm", + (short) 518 + }, + { + "Cursed Flames", + (short) 519 + }, + { + "Soul of Light", + (short) 520 + }, + { + "Soul of Night", + (short) 521 + }, + { + "Cursed Flame", + (short) 522 + }, + { + "Cursed Torch", + (short) 523 + }, + { + "Adamantite Forge", + (short) 524 + }, + { + "Mythril Anvil", + (short) 525 + }, + { + "Unicorn Horn", + (short) 526 + }, + { + "Dark Shard", + (short) 527 + }, + { + "Light Shard", + (short) 528 + }, + { + "Red Pressure Plate", + (short) 529 + }, + { + "Wire", + (short) 530 + }, + { + "Spell Tome", + (short) 531 + }, + { + "Star Cloak", + (short) 532 + }, + { + "Megashark", + (short) 533 + }, + { + "Shotgun", + (short) 534 + }, + { + "Philosopher's Stone", + (short) 535 + }, + { + "Titan Glove", + (short) 536 + }, + { + "Cobalt Naginata", + (short) 537 + }, + { + "Switch", + (short) 538 + }, + { + "Dart Trap", + (short) 539 + }, + { + "Boulder", + (short) 540 + }, + { + "Green Pressure Plate", + (short) 541 + }, + { + "Gray Pressure Plate", + (short) 542 + }, + { + "Brown Pressure Plate", + (short) 543 + }, + { + "Mechanical Eye", + (short) 544 + }, + { + "Cursed Arrow", + (short) 545 + }, + { + "Cursed Bullet", + (short) 546 + }, + { + "Soul of Fright", + (short) 547 + }, + { + "Soul of Might", + (short) 548 + }, + { + "Soul of Sight", + (short) 549 + }, + { + "Gungnir", + (short) 550 + }, + { + "Hallowed Plate Mail", + (short) 551 + }, + { + "Hallowed Greaves", + (short) 552 + }, + { + "Hallowed Helmet", + (short) 553 + }, + { + "Cross Necklace", + (short) 554 + }, + { + "Mana Flower", + (short) 555 + }, + { + "Mechanical Worm", + (short) 556 + }, + { + "Mechanical Skull", + (short) 557 + }, + { + "Hallowed Headgear", + (short) 558 + }, + { + "Hallowed Mask", + (short) 559 + }, + { + "Slime Crown", + (short) 560 + }, + { + "Light Disc", + (short) 561 + }, + { + "Music Box (Overworld Day)", + (short) 562 + }, + { + "Music Box (Eerie)", + (short) 563 + }, + { + "Music Box (Night)", + (short) 564 + }, + { + "Music Box (Title)", + (short) 565 + }, + { + "Music Box (Underground)", + (short) 566 + }, + { + "Music Box (Boss 1)", + (short) 567 + }, + { + "Music Box (Jungle)", + (short) 568 + }, + { + "Music Box (Corruption)", + (short) 569 + }, + { + "Music Box (Underground Corruption)", + (short) 570 + }, + { + "Music Box (The Hallow)", + (short) 571 + }, + { + "Music Box (Boss 2)", + (short) 572 + }, + { + "Music Box (Underground Hallow)", + (short) 573 + }, + { + "Music Box (Boss 3)", + (short) 574 + }, + { + "Soul of Flight", + (short) 575 + }, + { + "Music Box", + (short) 576 + }, + { + "Demonite Brick", + (short) 577 + }, + { + "Hallowed Repeater", + (short) 578 + }, + { + "Drax", + (short) 579 + }, + { + "Explosives", + (short) 580 + }, + { + "Inlet Pump", + (short) 581 + }, + { + "Outlet Pump", + (short) 582 + }, + { + "1 Second Timer", + (short) 583 + }, + { + "3 Second Timer", + (short) 584 + }, + { + "5 Second Timer", + (short) 585 + }, + { + "Candy Cane Block", + (short) 586 + }, + { + "Candy Cane Wall", + (short) 587 + }, + { + "Santa Hat", + (short) 588 + }, + { + "Santa Shirt", + (short) 589 + }, + { + "Santa Pants", + (short) 590 + }, + { + "Green Candy Cane Block", + (short) 591 + }, + { + "Green Candy Cane Wall", + (short) 592 + }, + { + "Snow Block", + (short) 593 + }, + { + "Snow Brick", + (short) 594 + }, + { + "Snow Brick Wall", + (short) 595 + }, + { + "Blue Light", + (short) 596 + }, + { + "Red Light", + (short) 597 + }, + { + "Green Light", + (short) 598 + }, + { + "Blue Present", + (short) 599 + }, + { + "Green Present", + (short) 600 + }, + { + "Yellow Present", + (short) 601 + }, + { + "Snow Globe", + (short) 602 + }, + { + "Carrot", + (short) 603 + }, + { + "Yellow Phasesaber", + (short) 3769 + }, + { + "White Phasesaber", + (short) 3768 + }, + { + "Purple Phasesaber", + (short) 3767 + }, + { + "Green Phasesaber", + (short) 3766 + }, + { + "Red Phasesaber", + (short) 3765 + }, + { + "Blue Phasesaber", + (short) 3764 + }, + { + "Platinum Bow", + (short) 3480 + }, + { + "Platinum Hammer", + (short) 3481 + }, + { + "Platinum Axe", + (short) 3482 + }, + { + "Platinum Shortsword", + (short) 3483 + }, + { + "Platinum Broadsword", + (short) 3484 + }, + { + "Platinum Pickaxe", + (short) 3485 + }, + { + "Tungsten Bow", + (short) 3486 + }, + { + "Tungsten Hammer", + (short) 3487 + }, + { + "Tungsten Axe", + (short) 3488 + }, + { + "Tungsten Shortsword", + (short) 3489 + }, + { + "Tungsten Broadsword", + (short) 3490 + }, + { + "Tungsten Pickaxe", + (short) 3491 + }, + { + "Lead Bow", + (short) 3492 + }, + { + "Lead Hammer", + (short) 3493 + }, + { + "Lead Axe", + (short) 3494 + }, + { + "Lead Shortsword", + (short) 3495 + }, + { + "Lead Broadsword", + (short) 3496 + }, + { + "Lead Pickaxe", + (short) 3497 + }, + { + "Tin Bow", + (short) 3498 + }, + { + "Tin Hammer", + (short) 3499 + }, + { + "Tin Axe", + (short) 3500 + }, + { + "Tin Shortsword", + (short) 3501 + }, + { + "Tin Broadsword", + (short) 3502 + }, + { + "Tin Pickaxe", + (short) 3503 + }, + { + "Copper Bow", + (short) 3504 + }, + { + "Copper Hammer", + (short) 3505 + }, + { + "Copper Axe", + (short) 3506 + }, + { + "Copper Shortsword", + (short) 3507 + }, + { + "Copper Broadsword", + (short) 3508 + }, + { + "Copper Pickaxe", + (short) 3509 + }, + { + "Silver Bow", + (short) 3510 + }, + { + "Silver Hammer", + (short) 3511 + }, + { + "Silver Axe", + (short) 3512 + }, + { + "Silver Shortsword", + (short) 3513 + }, + { + "Silver Broadsword", + (short) 3514 + }, + { + "Silver Pickaxe", + (short) 3515 + }, + { + "Gold Bow", + (short) 3516 + }, + { + "Gold Hammer", + (short) 3517 + }, + { + "Gold Axe", + (short) 3518 + }, + { + "Gold Shortsword", + (short) 3519 + }, + { + "Gold Broadsword", + (short) 3520 + }, + { + "Gold Pickaxe", + (short) 3521 + } + }; + + public static short FromNetId(short id) + { + switch (id) + { + case -48: + return 3480; + case -47: + return 3481; + case -46: + return 3482; + case -45: + return 3483; + case -44: + return 3484; + case -43: + return 3485; + case -42: + return 3486; + case -41: + return 3487; + case -40: + return 3488; + case -39: + return 3489; + case -38: + return 3490; + case -37: + return 3491; + case -36: + return 3492; + case -35: + return 3493; + case -34: + return 3494; + case -33: + return 3495; + case -32: + return 3496; + case -31: + return 3497; + case -30: + return 3498; + case -29: + return 3499; + case -28: + return 3500; + case -27: + return 3501; + case -26: + return 3502; + case -25: + return 3503; + case -24: + return 3769; + case -23: + return 3768; + case -22: + return 3767; + case -21: + return 3766; + case -20: + return 3765; + case -19: + return 3764; + case -18: + return 3504; + case -17: + return 3505; + case -16: + return 3506; + case -15: + return 3507; + case -14: + return 3508; + case -13: + return 3509; + case -12: + return 3510; + case -11: + return 3511; + case -10: + return 3512; + case -9: + return 3513; + case -8: + return 3514; + case -7: + return 3515; + case -6: + return 3516; + case -5: + return 3517; + case -4: + return 3518; + case -3: + return 3519; + case -2: + return 3520; + case -1: + return 3521; + default: + return id; + } + } + + public static short FromLegacyName(string name, int release) + { + if (ItemID._legacyItemLookup == null) + ItemID._legacyItemLookup = ItemID.GenerateLegacyItemDictionary(); + if (release <= 4) + { + if (name == "Cobalt Helmet") + name = "Jungle Hat"; + else if (name == "Cobalt Breastplate") + name = "Jungle Shirt"; + else if (name == "Cobalt Greaves") + name = "Jungle Pants"; + } + if (release <= 13 && name == "Jungle Rose") + name = "Jungle Spores"; + if (release <= 20) + { + if (name == "Gills potion") + name = "Gills Potion"; + else if (name == "Thorn Chakrum") + name = "Thorn Chakram"; + else if (name == "Ball 'O Hurt") + name = "Ball O' Hurt"; + } + if (release <= 41 && name == "Iron Chain") + name = "Chain"; + if (release <= 44 && name == "Orb of Light") + name = "Shadow Orb"; + if (release <= 46) + { + if (name == "Black Dye") + name = "Black Thread"; + if (name == "Green Dye") + name = "Green Thread"; + } + short num; + return ItemID._legacyItemLookup.TryGetValue(name, out num) ? num : (short) 0; + } + + public struct BannerEffect + { + public static readonly ItemID.BannerEffect None = new ItemID.BannerEffect(0.0f); + public readonly float NormalDamageDealt; + public readonly float ExpertDamageDealt; + public readonly float NormalDamageReceived; + public readonly float ExpertDamageReceived; + public readonly bool Enabled; + + public BannerEffect(float strength = 1f) + { + this.NormalDamageDealt = (float) (1.0 + (double) strength * 0.5); + this.ExpertDamageDealt = 1f + strength; + this.ExpertDamageReceived = (float) (1.0 / ((double) strength + 1.0)); + this.NormalDamageReceived = (float) (1.0 - (1.0 - (double) this.ExpertDamageReceived) * 0.5); + this.Enabled = (double) strength != 0.0; + } + + public BannerEffect( + float normalDamageDealt, + float expertDamageDealt, + float normalDamageReceived, + float expertDamageReceived) + { + this.NormalDamageDealt = normalDamageDealt; + this.ExpertDamageDealt = expertDamageDealt; + this.NormalDamageReceived = normalDamageReceived; + this.ExpertDamageReceived = expertDamageReceived; + this.Enabled = true; + } + } + + public class Sets + { + public static SetFactory Factory = new SetFactory(5045); + public static List ItemsThatAreProcessedAfterNormalContentSample = new List() + { + 1533, + 1534, + 1535, + 1536, + 1537 + }; + public static bool[] ItemsThatAllowRepeatedRightClick = ItemID.Sets.Factory.CreateBoolSet(false, 3384, 3858, 3852); + public static bool[] ItemsThatCountAsBombsForDemolitionistToSpawn = ItemID.Sets.Factory.CreateBoolSet(false, 168, 2586, 3116, 166, 235, 3115, 167, 2896, 3547, 3196, 4423, 1130, 1168, 4824, 4825, 4826, 4827, 4908, 4909); + public static int[] NewItemSpawnPriority = ItemID.Sets.Factory.CreateIntSet(0, 2, 200, 3, 150, 61, 150, 836, 150, 409, 150, 593, 200, 664, 100, 834, 100, 833, 100, 835, 100, 169, 100, 370, 100, 1246, 100, 408, 100, 3271, 150, 3277, 150, 3339, 150, 3276, 150, 3272, 150, 3274, 150, 3275, 150, 3338, 150, 176, 100, 172, 200, 424, 50, 1103, 50, 3087, 100, 3066, 100); + public static bool?[] CanBeQuickusedOnGamepad = ItemID.Sets.Factory.CreateCustomSet(new bool?(), (object) (short) 50, (object) true, (object) (short) 3199, (object) true, (object) (short) 3124, (object) true, (object) (short) 2350, (object) true, (object) (short) 2351, (object) true, (object) (short) 29, (object) true, (object) (short) 109, (object) true, (object) (short) 1291, (object) true, (object) (short) 4870, (object) true); + public static bool?[] ForcesBreaksSleeping = ItemID.Sets.Factory.CreateCustomSet(new bool?(), (object) (short) 1991, (object) true, (object) (short) 4821, (object) true, (object) (short) 3183, (object) true); + public static bool[] SkipsInitialUseSound = ItemID.Sets.Factory.CreateBoolSet(false, 2350, 4870); + public static bool[] UsesCursedByPlanteraTooltip = ItemID.Sets.Factory.CreateBoolSet(false, 1533, 1534, 1535, 1536, 1537, 4714); + public static bool[] IsAKite = ItemID.Sets.Factory.CreateBoolSet(false, 4367, 4368, 4369, 4370, 4371, 4379, 4610, 4611, 4612, 4613, 4648, 4649, 4650, 4651, 4669, 4670, 4671, 4674, 4675, 4676, 4677, 4681, 4683, 4684); + public static bool?[] ForceConsumption = ItemID.Sets.Factory.CreateCustomSet(new bool?(), (object) (short) 2350, (object) false, (object) (short) 4870, (object) false, (object) (short) 2351, (object) false, (object) (short) 2756, (object) false, (object) (short) 4343, (object) true, (object) (short) 4344, (object) true); + public static bool[] HasAProjectileThatHasAUsabilityCheck = ItemID.Sets.Factory.CreateBoolSet(false, 4367, 4368, 4369, 4370, 4371, 4379, 4610, 4611, 4612, 4613, 4648, 4649, 4650, 4651, 4669, 4670, 4671, 4674, 4675, 4676, 4677, 4681, 4683, 4684); + public static bool[] CanGetPrefixes = ItemID.Sets.Factory.CreateBoolSet(true, 267, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 576, 1307, 1596, 1597, 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610); + public static List NonColorfulDyeItems = new List() + { + 3599, + 3530, + 3534 + }; + public static bool[] ColorfulDyeValues = new bool[0]; + public static FlowerPacketInfo[] flowerPacketInfo = ItemID.Sets.Factory.CreateCustomSet((FlowerPacketInfo) null, (object) (short) 4041, (object) new FlowerPacketInfo() + { + stylesOnPurity = { + 9, + 16, + 20 + } + }, (object) (short) 4042, (object) new FlowerPacketInfo() + { + stylesOnPurity = { + 6, + 30, + 31, + 32 + } + }, (object) (short) 4043, (object) new FlowerPacketInfo() + { + stylesOnPurity = { + 7, + 17, + 33, + 34, + 35 + } + }, (object) (short) 4044, (object) new FlowerPacketInfo() + { + stylesOnPurity = { + 19, + 21, + 22, + 23, + 39, + 40, + 41 + } + }, (object) (short) 4045, (object) new FlowerPacketInfo() + { + stylesOnPurity = { + 10, + 11, + 13, + 18, + 24, + 25, + 26 + } + }, (object) (short) 4046, (object) new FlowerPacketInfo() + { + stylesOnPurity = { + 12, + 42, + 43, + 44 + } + }, (object) (short) 4047, (object) new FlowerPacketInfo() + { + stylesOnPurity = { + 14, + 15, + 27, + 28, + 29, + 36, + 37, + 38 + } + }, (object) (short) 4241, (object) new FlowerPacketInfo() + { + stylesOnPurity = { + 6, + 7, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44 + } + }, (object) (short) 4048, (object) new FlowerPacketInfo() + { + stylesOnPurity = { + 0, + 1, + 2, + 3, + 4, + 5 + } + }); + public static bool[] IsAMaterial = ItemID.Sets.Factory.CreateBoolSet(); + public static bool[] IgnoresEncumberingStone = ItemID.Sets.Factory.CreateBoolSet(58, 184, 1734, 1735, 1867, 1868, 3453, 3454, 3455, 4143); + public static float[] ToolTipDamageMultiplier = ItemID.Sets.Factory.CreateFloatSet(1f, 162f, 2f, 801f, 2f, 163f, 2f, 220f, 2f, 389f, 2f, 1259f, 2f, 4272f, 2f, 5011f, 2f, 5012f, 2f); + public static bool[] IsAPickup = ItemID.Sets.Factory.CreateBoolSet(58, 184, 1734, 1735, 1867, 1868, 3453, 3454, 3455); + public static bool[] IsDrill = ItemID.Sets.Factory.CreateBoolSet(388, 1231, 385, 386, 2779, 1196, 1189, 2784, 3464, 1203, 2774, 579); + public static bool[] IsChainsaw = ItemID.Sets.Factory.CreateBoolSet(387, 3098, 1232, 383, 384, 2778, 1197, 1190, 2783, 3463, 1204, 2773, 2342, 579); + public static bool[] IsPaintScraper = ItemID.Sets.Factory.CreateBoolSet(1100, 1545); + public static bool[] SummonerWeaponThatScalesWithAttackSpeed = ItemID.Sets.Factory.CreateBoolSet(4672, 4679, 4680, 4678, 4913, 4912, 4911, 4914); + public static bool[] IsFood = ItemID.Sets.Factory.CreateBoolSet(353, 357, 1787, 1911, 1912, 1919, 1920, 2266, 2267, 2268, 2425, 2426, 2427, 3195, 3532, 4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, 4019, 4020, 4021, 4022, 4023, 4024, 4025, 4026, 4027, 4028, 4029, 4030, 4031, 4032, 4033, 4034, 4035, 4036, 4037, 967, 969, 4282, 4283, 4284, 4285, 4286, 4287, 4288, 4289, 4290, 4291, 4292, 4293, 4294, 4295, 4296, 4297, 4403, 4411, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 5009, 5042, 5041); + public static Color[][] FoodParticleColors = ItemID.Sets.Factory.CreateCustomSet(new Color[0], (object) (short) 357, (object) new Color[2] + { + new Color(253, 209, 77), + new Color(253, 178, 78) + }, (object) (short) 1787, (object) new Color[3] + { + new Color(215, 146, 96), + new Color(250, 160, 15), + new Color(226, 130, 33) + }, (object) (short) 1911, (object) new Color[4] + { + new Color(219, 219, 213), + new Color((int) byte.MaxValue, 228, 133), + new Color(237, 159, 85), + new Color(207, 32, 51) + }, (object) (short) 1919, (object) new Color[4] + { + new Color(206, 168, 119), + new Color(73, 182, 126), + new Color(230, 89, 92), + new Color(228, 238, 241) + }, (object) (short) 1920, (object) new Color[4] + { + new Color(218, 167, 69), + new Color(204, 209, 219), + new Color(204, 22, 40), + new Color(0, 212, 47) + }, (object) (short) 2267, (object) new Color[3] + { + new Color(229, 129, 82), + new Color((int) byte.MaxValue, 223, 126), + new Color(190, 226, 65) + }, (object) (short) 2268, (object) new Color[3] + { + new Color(250, 232, 220), + new Color(216, 189, 157), + new Color(190, 226, 65) + }, (object) (short) 2425, (object) new Color[4] + { + new Color(199, 166, 129), + new Color((int) sbyte.MaxValue, 105, 81), + new Color(128, 151, 43), + new Color(193, 14, 7) + }, (object) (short) 2426, (object) new Color[2] + { + new Color(246, 187, 165), + new Color((int) byte.MaxValue, 134, 86) + }, (object) (short) 2427, (object) new Color[3] + { + new Color(235, 122, 128), + new Color(216, 193, 186), + new Color(252, 108, 40) + }, (object) (short) 3195, (object) new Color[4] + { + new Color(139, 86, 218), + new Color(218, 86, 104), + new Color(218, 182, 86), + new Color(36, 203, 185) + }, (object) (short) 3532, (object) new Color[2] + { + new Color(218, 113, 90), + new Color(183, 65, 68) + }, (object) (short) 4009, (object) new Color[2] + { + new Color(221, 67, 87), + new Color((int) byte.MaxValue, 252, 217) + }, (object) (short) 4011, (object) new Color[2] + { + new Color(224, 143, 91), + new Color(214, 170, 105) + }, (object) (short) 4012, (object) new Color[4] + { + new Color((int) byte.MaxValue, 236, 184), + new Color(242, 183, 236), + new Color(215, 137, 122), + new Color(242, 70, 88) + }, (object) (short) 4013, (object) new Color[2] + { + new Color(216, 93, 61), + new Color(159, 48, 28) + }, (object) (short) 4014, (object) new Color[3] + { + new Color(216, 93, 61), + new Color(205, 150, 71), + new Color(123, 72, 27) + }, (object) (short) 4015, (object) new Color[4] + { + new Color(197, 136, 85), + new Color(143, 86, 59), + new Color(100, 156, 58), + new Color(216, 93, 61) + }, (object) (short) 4016, (object) new Color[2] + { + new Color(241, 167, 70), + new Color(215, 121, 64) + }, (object) (short) 4017, (object) new Color[3] + { + new Color(200, 133, 84), + new Color(141, 71, 19), + new Color(103, 54, 18) + }, (object) (short) 4019, (object) new Color[3] + { + new Color(248, 234, 196), + new Color(121, 92, 18), + new Color(128, 151, 43) + }, (object) (short) 4020, (object) new Color[2] + { + new Color(237, 243, 248), + new Color((int) byte.MaxValue, 200, 82) + }, (object) (short) 4021, (object) new Color[3] + { + new Color((int) byte.MaxValue, 221, 119), + new Color(241, 167, 70), + new Color(215, 121, 64) + }, (object) (short) 4022, (object) new Color[3] + { + new Color((int) byte.MaxValue, 249, 181), + new Color(203, 179, 73), + new Color(216, 93, 61) + }, (object) (short) 4023, (object) new Color[2] + { + new Color(189, 0, 107) * 0.5f, + new Color(123, 0, 57) * 0.5f + }, (object) (short) 4024, (object) new Color[2] + { + new Color(217, 134, 83), + new Color(179, 80, 54) + }, (object) (short) 4025, (object) new Color[3] + { + new Color(229, 114, 63), + new Color((int) byte.MaxValue, 184, 51), + new Color(197, 136, 85) + }, (object) (short) 4026, (object) new Color[4] + { + new Color(245, 247, 250), + new Color(142, 96, 60), + new Color(204, 209, 219), + new Color(234, 85, 79) + }, (object) (short) 4028, (object) new Color[3] + { + new Color((int) byte.MaxValue, 250, 184), + new Color(217, 123, 0), + new Color(209, 146, 33) + }, (object) (short) 4029, (object) new Color[4] + { + new Color((int) byte.MaxValue, 250, 184), + new Color(167, 57, 68), + new Color(209, 146, 33), + new Color(220, 185, 152) + }, (object) (short) 4030, (object) new Color[3] + { + new Color(247, 237, (int) sbyte.MaxValue), + new Color(215, 187, 59), + new Color(174, 139, 43) + }, (object) (short) 4031, (object) new Color[3] + { + new Color((int) byte.MaxValue, 198, 134), + new Color(219, 109, 68), + new Color(160, 83, 63) + }, (object) (short) 4032, (object) new Color[3] + { + new Color(228, 152, 107), + new Color(170, 81, 57), + new Color(128, 49, 49) + }, (object) (short) 4033, (object) new Color[3] + { + new Color(190, 226, 65), + new Color(63, 69, 15), + new Color(173, 50, 37) + }, (object) (short) 4034, (object) new Color[4] + { + new Color((int) byte.MaxValue, 134, 86), + new Color(193, 57, 37), + new Color(186, 155, 130), + new Color(178, 206, 46) + }, (object) (short) 4035, (object) new Color[4] + { + new Color(234, 244, 82), + new Color((int) byte.MaxValue, 182, 121), + new Color(205, 89, 0), + new Color(240, 157, 81) + }, (object) (short) 4036, (object) new Color[4] + { + new Color(223, 207, 74), + new Color(189, 158, 36), + new Color(226, 45, 38), + new Color(131, 9, 0) + }, (object) (short) 4037, (object) new Color[3] + { + new Color(195, 109, 68), + new Color(162, 69, 59), + new Color(209, 194, 189) + }, (object) (short) 4282, (object) new Color[2] + { + new Color(237, 169, 78), + new Color(211, 106, 62) + }, (object) (short) 4283, (object) new Color[3] + { + new Color(242, 235, 172), + new Color(254, 247, 177), + new Color((int) byte.MaxValue, 230, 122) + }, (object) (short) 4284, (object) new Color[3] + { + new Color(59, 81, 114), + new Color(105, 62, 118), + new Color(35, 22, 57) + }, (object) (short) 4285, (object) new Color[3] + { + new Color(231, 115, 68), + new Color(212, 42, 55), + new Color(168, 16, 37) + }, (object) (short) 4286, (object) new Color[2] + { + new Color(185, 27, 68), + new Color(124, 17, 53) + }, (object) (short) 4287, (object) new Color[3] + { + new Color(199, 163, 121), + new Color(250, 245, 218), + new Color(252, 250, 235) + }, (object) (short) 4288, (object) new Color[4] + { + new Color(209, 44, 90), + new Color(83, 83, 83), + new Color(245, 245, 245), + new Color(250, 250, 250) + }, (object) (short) 4289, (object) new Color[3] + { + new Color(59, 81, 114), + new Color(105, 62, 118), + new Color(35, 22, 57) + }, (object) (short) 4290, (object) new Color[3] + { + new Color(247, 178, 52), + new Color(221, 60, 96), + new Color(225, 83, 115) + }, (object) (short) 4291, (object) new Color[2] + { + new Color(254, 231, 67), + new Color(253, 239, 117) + }, (object) (short) 4292, (object) new Color[3] + { + new Color(231, 121, 68), + new Color(216, 139, 33), + new Color(251, 220, 77) + }, (object) (short) 4293, (object) new Color[2] + { + new Color(242, 153, 80), + new Color(248, 208, 52) + }, (object) (short) 4294, (object) new Color[2] + { + new Color(253, 208, 17), + new Color(253, 239, 117) + }, (object) (short) 4295, (object) new Color[3] + { + new Color(192, 47, 129), + new Color(247, 178, 52), + new Color(251, 220, 77) + }, (object) (short) 4296, (object) new Color[3] + { + new Color(212, 42, 55), + new Color(250, 245, 218), + new Color(252, 250, 235) + }, (object) (short) 4297, (object) new Color[2] + { + new Color(253, 239, 117), + new Color(254, 247, 177) + }, (object) (short) 4403, (object) new Color[4] + { + new Color((int) byte.MaxValue, 134, 86), + new Color(193, 57, 37), + new Color(242, 202, 174), + new Color(128, 151, 43) + }, (object) (short) 4411, (object) new Color[2] + { + new Color(191, 157, 174), + new Color(222, 196, 197) + }, (object) (short) 4625, (object) new Color[3] + { + new Color((int) byte.MaxValue, 230, 122), + new Color(216, 69, 33), + new Color(128, 151, 43) + }); + public static Color[][] DrinkParticleColors = ItemID.Sets.Factory.CreateCustomSet(new Color[0], (object) (short) 28, (object) new Color[3] + { + new Color(164, 16, 47), + new Color(246, 34, 79), + new Color((int) byte.MaxValue, 95, 129) + }, (object) (short) 110, (object) new Color[3] + { + new Color(16, 45, 152), + new Color(11, 61, 245), + new Color(93, (int) sbyte.MaxValue, (int) byte.MaxValue) + }, (object) (short) 126, (object) new Color[3] + { + new Color(9, 61, 191), + new Color(30, 84, 220), + new Color(51, 107, 249) + }, (object) (short) 188, (object) new Color[3] + { + new Color(164, 16, 47), + new Color(246, 34, 79), + new Color((int) byte.MaxValue, 95, 129) + }, (object) (short) 189, (object) new Color[3] + { + new Color(16, 45, 152), + new Color(11, 61, 245), + new Color(93, (int) sbyte.MaxValue, (int) byte.MaxValue) + }, (object) (short) 226, (object) new Color[3] + { + new Color(200, 25, 116), + new Color(229, 30, 202), + new Color(254, 149, 210) + }, (object) (short) 227, (object) new Color[3] + { + new Color(200, 25, 116), + new Color(229, 30, 202), + new Color(254, 149, 210) + }, (object) (short) 288, (object) new Color[3] + { + new Color(58, 48, 102), + new Color(90, 72, 168), + new Color(132, 116, 199) + }, (object) (short) 289, (object) new Color[3] + { + new Color(174, 13, 97), + new Color((int) byte.MaxValue, 156, 209), + new Color((int) byte.MaxValue, 56, 162) + }, (object) (short) 290, (object) new Color[3] + { + new Color(83, 137, 13), + new Color(100, 164, 16), + new Color(134, 230, 10) + }, (object) (short) 291, (object) new Color[3] + { + new Color(13, 74, 137), + new Color(16, 89, 164), + new Color(10, 119, 230) + }, (object) (short) 292, (object) new Color[3] + { + new Color(164, 159, 16), + new Color(230, 222, 10), + new Color((int) byte.MaxValue, 252, 159) + }, (object) (short) 293, (object) new Color[3] + { + new Color(137, 13, 86), + new Color(230, 10, 139), + new Color((int) byte.MaxValue, 144, 210) + }, (object) (short) 294, (object) new Color[3] + { + new Color(66, 13, 137), + new Color(103, 10, 230), + new Color(163, 95, (int) byte.MaxValue) + }, (object) (short) 295, (object) new Color[3] + { + new Color(13, 106, 137), + new Color(10, 176, 230), + new Color(146, 229, (int) byte.MaxValue) + }, (object) (short) 296, (object) new Color[3] + { + new Color(146, 102, 14), + new Color(225, 185, 22), + new Color(250, 213, 64) + }, (object) (short) 297, (object) new Color[3] + { + new Color(9, 101, 110), + new Color(15, 164, 177), + new Color(34, 229, 246) + }, (object) (short) 298, (object) new Color[3] + { + new Color(133, 137, 13), + new Color(222, 230, 10), + new Color(252, 254, 161) + }, (object) (short) 299, (object) new Color[3] + { + new Color(92, 137, 13), + new Color(121, 184, 11), + new Color(189, (int) byte.MaxValue, 73) + }, (object) (short) 300, (object) new Color[3] + { + new Color(81, 60, 120), + new Color((int) sbyte.MaxValue, 96, 184), + new Color(165, 142, 208) + }, (object) (short) 301, (object) new Color[3] + { + new Color(112, 137, 13), + new Color(163, 202, 7), + new Color(204, 246, 34) + }, (object) (short) 302, (object) new Color[3] + { + new Color(12, 63, 131), + new Color(16, 79, 164), + new Color(34, 124, 246) + }, (object) (short) 303, (object) new Color[3] + { + new Color(164, 96, 16), + new Color(230, 129, 10), + new Color((int) byte.MaxValue, 200, 134) + }, (object) (short) 304, (object) new Color[3] + { + new Color(137, 63, 13), + new Color(197, 87, 13), + new Color(230, 98, 10) + }, (object) (short) 305, (object) new Color[3] + { + new Color(69, 13, 131), + new Color(134, 34, 246), + new Color(170, 95, (int) byte.MaxValue) + }, (object) (short) 499, (object) new Color[3] + { + new Color(164, 16, 47), + new Color(246, 34, 79), + new Color((int) byte.MaxValue, 95, 129) + }, (object) (short) 500, (object) new Color[3] + { + new Color(16, 45, 152), + new Color(11, 61, 245), + new Color(93, (int) sbyte.MaxValue, (int) byte.MaxValue) + }, (object) (short) 678, (object) new Color[2] + { + new Color(254, 0, 38), + new Color(199, 29, 15) + }, (object) (short) 967, (object) new Color[2] + { + new Color(221, 226, 229), + new Color(180, 189, 194) + }, (object) (short) 969, (object) new Color[3] + { + new Color(150, 99, 69), + new Color(219, 170, 132), + new Color(251, 244, 240) + }, (object) (short) 1134, (object) new Color[3] + { + new Color(235, 144, 10), + new Color(254, 194, 20), + new Color(254, 246, 37) + }, (object) (short) 1340, (object) new Color[3] + { + new Color(151, 79, 162), + new Color(185, 128, 193), + new Color(240, 185, 217) + }, (object) (short) 1353, (object) new Color[3] + { + new Color(77, 227, 45), + new Color(218, 253, 9), + new Color(96, 248, 2) + }, (object) (short) 1354, (object) new Color[3] + { + new Color(235, 36, 1), + new Color((int) byte.MaxValue, (int) sbyte.MaxValue, 39), + new Color((int) byte.MaxValue, 203, 83) + }, (object) (short) 1355, (object) new Color[3] + { + new Color(148, 126, 24), + new Color(233, 207, 137), + new Color((int) byte.MaxValue, 249, 183) + }, (object) (short) 1356, (object) new Color[3] + { + new Color(253, 152, 0), + new Color(254, 202, 80), + new Color((int) byte.MaxValue, 251, 166) + }, (object) (short) 1357, (object) new Color[3] + { + new Color(106, 107, 134), + new Color(118, 134, 207), + new Color(120, 200, 226) + }, (object) (short) 1358, (object) new Color[3] + { + new Color(202, 0, 147), + new Color((int) byte.MaxValue, 66, 222), + new Color((int) byte.MaxValue, 170, 253) + }, (object) (short) 1359, (object) new Color[3] + { + new Color(45, 174, 76), + new Color(112, 218, 138), + new Color(182, 236, 195) + }, (object) (short) 1977, (object) new Color[3] + { + new Color(221, 0, 0), + new Color(146, 17, 17), + new Color(51, 21, 21) + }, (object) (short) 1978, (object) new Color[3] + { + new Color(24, 92, 248), + new Color(97, 112, 169), + new Color(228, 228, 228) + }, (object) (short) 1979, (object) new Color[4] + { + new Color(128, 128, 128), + new Color(151, 107, 75), + new Color(13, 101, 36), + new Color(28, 216, 94) + }, (object) (short) 1980, (object) new Color[3] + { + new Color(122, 92, 10), + new Color(185, 164, 23), + new Color(241, 227, 75) + }, (object) (short) 1981, (object) new Color[2] + { + new Color((int) byte.MaxValue, 186, 0), + new Color(87, 20, 170) + }, (object) (short) 1982, (object) new Color[4] + { + new Color(218, 183, 59), + new Color(59, 218, 85), + new Color(59, 149, 218), + new Color(218, 59, 59) + }, (object) (short) 1983, (object) new Color[4] + { + new Color(208, 80, 80), + new Color(109, 106, 174), + new Color(143, 215, 29), + new Color(30, 150, 72) + }, (object) (short) 1984, (object) new Color[4] + { + new Color((int) byte.MaxValue, 9, 172), + new Color(219, 4, 121), + new Color(111, 218, 171), + new Color(72, 175, 130) + }, (object) (short) 1985, (object) new Color[4] + { + new Color(176, 101, 239), + new Color(101, 238, 239), + new Color(221, 0, 0), + new Color(62, 235, 137) + }, (object) (short) 1986, (object) new Color[3] + { + new Color(55, 246, 211), + new Color(20, 223, 168), + new Color(0, 181, 128) + }, (object) (short) 1990, (object) new Color[3] + { + new Color(254, 254, 254), + new Color(214, 232, 240), + new Color(234, 242, 246) + }, (object) (short) 2209, (object) new Color[3] + { + new Color(16, 45, 152), + new Color(11, 61, 245), + new Color(93, (int) sbyte.MaxValue, (int) byte.MaxValue) + }, (object) (short) 2322, (object) new Color[3] + { + new Color(55, 92, 95), + new Color(84, 149, 154), + new Color(149, 196, 200) + }, (object) (short) 2323, (object) new Color[3] + { + new Color(91, 8, 106), + new Color(184, 9, 131), + new Color(250, 64, 188) + }, (object) (short) 2324, (object) new Color[3] + { + new Color(21, 40, 138), + new Color(102, 101, 201), + new Color(122, 147, 196) + }, (object) (short) 2325, (object) new Color[3] + { + new Color(100, 67, 50), + new Color(141, 93, 68), + new Color(182, 126, 97) + }, (object) (short) 2326, (object) new Color[3] + { + new Color(159, 224, 124), + new Color(92, 175, 46), + new Color(51, 95, 27) + }, (object) (short) 2327, (object) new Color[3] + { + new Color(95, 194, (int) byte.MaxValue), + new Color(12, 109, 167), + new Color(13, 76, 115) + }, (object) (short) 2328, (object) new Color[3] + { + new Color(215, 241, 109), + new Color(150, 178, 31), + new Color(105, 124, 25) + }, (object) (short) 2329, (object) new Color[3] + { + new Color(251, 105, 29), + new Color(220, 73, 4), + new Color(140, 33, 10) + }, (object) (short) 2344, (object) new Color[3] + { + new Color(166, 166, 166), + new Color((int) byte.MaxValue, 186, 0), + new Color(165, 58, 0) + }, (object) (short) 2345, (object) new Color[3] + { + new Color(239, 17, 0), + new Color(209, 15, 0), + new Color(136, 9, 0) + }, (object) (short) 2346, (object) new Color[3] + { + new Color(156, 157, 153), + new Color(99, 99, 99), + new Color(63, 62, 58) + }, (object) (short) 2347, (object) new Color[3] + { + new Color(243, 11, 11), + new Color((int) byte.MaxValue, 188, 55), + new Color(252, 136, 58) + }, (object) (short) 2348, (object) new Color[3] + { + new Color((int) byte.MaxValue, 227, 0), + new Color((int) byte.MaxValue, 135, 0), + new Color(226, 56, 0) + }, (object) (short) 2349, (object) new Color[3] + { + new Color(120, 36, 30), + new Color(216, 73, 63), + new Color(233, 125, 117) + }, (object) (short) 2351, (object) new Color[3] + { + new Color((int) byte.MaxValue, 95, 252), + new Color(147, 0, 240), + new Color(67, 0, 150) + }, (object) (short) 2354, (object) new Color[3] + { + new Color(117, 233, 164), + new Color(40, 199, 103), + new Color(30, 120, 66) + }, (object) (short) 2355, (object) new Color[3] + { + new Color(217, 254, 161), + new Color(69, 110, 9), + new Color(135, 219, 11) + }, (object) (short) 2356, (object) new Color[3] + { + new Color(233, 175, 117), + new Color(199, 120, 40), + new Color(143, 89, 36) + }, (object) (short) 2359, (object) new Color[3] + { + new Color((int) byte.MaxValue, 51, 0), + new Color(248, 184, 0), + new Color((int) byte.MaxValue, 215, 0) + }, (object) (short) 2756, (object) new Color[4] + { + new Color(178, 236, (int) byte.MaxValue), + new Color(92, 214, (int) byte.MaxValue), + new Color(184, 96, 163), + new Color((int) byte.MaxValue, 78, 178) + }, (object) (short) 2863, (object) new Color[3] + { + new Color(97, 199, 224), + new Color(98, 152, 177), + new Color(26, 232, 249) + }, (object) (short) 3001, (object) new Color[3] + { + new Color(104, 25, 103), + new Color(155, 32, 154), + new Color(190, 138, 223) + }, (object) (short) 3259, (object) new Color[4] + { + new Color(40, 20, 66), + new Color(186, 68, (int) byte.MaxValue), + new Color(26, 8, 49), + new Color((int) byte.MaxValue, 122, (int) byte.MaxValue) + }, (object) (short) 3544, (object) new Color[3] + { + new Color(164, 16, 47), + new Color(246, 34, 79), + new Color((int) byte.MaxValue, 95, 129) + }, (object) (short) 353, (object) new Color[3] + { + new Color(205, 152, 2) * 0.5f, + new Color(240, 208, 88) * 0.5f, + new Color(251, 243, 215) * 0.5f + }, (object) (short) 1912, (object) new Color[3] + { + new Color(237, 159, 85), + new Color((int) byte.MaxValue, 228, 133), + new Color(149, 97, 45) + }, (object) (short) 2266, (object) new Color[1] + { + new Color(233, 233, 218) * 0.3f + }, (object) (short) 4018, (object) new Color[2] + { + new Color(214, 170, 105) * 0.5f, + new Color(180, 132, 73) * 0.5f + }, (object) (short) 4027, (object) new Color[4] + { + new Color(242, 183, 236), + new Color(245, 242, 193), + new Color(226, 133, 217), + new Color(242, 70, 88) + }, (object) (short) 4477, (object) new Color[2] + { + new Color(161, 192, 220), + new Color(143, 154, 201) + }, (object) (short) 4478, (object) new Color[2] + { + new Color(40, 60, 70), + new Color(26, 27, 36) + }, (object) (short) 4479, (object) new Color[2] + { + new Color(224, 0, 152), + new Color(137, 13, 126) + }, (object) (short) 4614, (object) new Color[2] + { + new Color(153, 62, 2), + new Color(208, 166, 59) + }, (object) (short) 4615, (object) new Color[2] + { + new Color(164, 88, 178), + new Color(124, 64, 152) + }, (object) (short) 4616, (object) new Color[2] + { + new Color((int) byte.MaxValue, 245, 109), + new Color(235, 210, 89) + }, (object) (short) 4617, (object) new Color[2] + { + new Color(245, 247, 250), + new Color((int) byte.MaxValue, 250, 133) + }, (object) (short) 4618, (object) new Color[2] + { + new Color((int) byte.MaxValue, 175, 133), + new Color(237, 93, 85) + }, (object) (short) 4619, (object) new Color[2] + { + new Color(247, 245, 224), + new Color(232, 214, 179) + }, (object) (short) 4620, (object) new Color[2] + { + new Color(181, 215, 0), + new Color((int) byte.MaxValue, 112, 4) + }, (object) (short) 4621, (object) new Color[2] + { + new Color(242, 134, 81), + new Color(153, 2, 42) + }, (object) (short) 4622, (object) new Color[2] + { + new Color(90, 62, 123), + new Color(59, 49, 104) + }, (object) (short) 4623, (object) new Color[3] + { + new Color((int) byte.MaxValue, 175, 152), + new Color(147, (int) byte.MaxValue, 228), + new Color(231, 247, 150) + }, (object) (short) 4624, (object) new Color[2] + { + new Color(155, 0, 67), + new Color(208, 124, 59) + }, (object) (short) 5009, (object) new Color[2] + { + new Color(210, 130, 10), + new Color((int) byte.MaxValue, 195, 20) + }, (object) (short) 5041, (object) new Color[2] + { + new Color(221, 226, 229), + new Color(180, 189, 194) + }, (object) (short) 5042, (object) new Color[2] + { + new Color(70, 43, 21), + new Color(142, 96, 60) + }); + private static ItemID.BannerEffect DD2BannerEffect = ItemID.BannerEffect.None; + public static ItemID.BannerEffect[] BannerStrength = ItemID.Sets.Factory.CreateCustomSet(new ItemID.BannerEffect(), (object) (short) 3838, (object) ItemID.Sets.DD2BannerEffect, (object) (short) 3845, (object) ItemID.Sets.DD2BannerEffect, (object) (short) 3837, (object) ItemID.Sets.DD2BannerEffect, (object) (short) 3844, (object) ItemID.Sets.DD2BannerEffect, (object) (short) 3843, (object) ItemID.Sets.DD2BannerEffect, (object) (short) 3839, (object) ItemID.Sets.DD2BannerEffect, (object) (short) 3840, (object) ItemID.Sets.DD2BannerEffect, (object) (short) 3842, (object) ItemID.Sets.DD2BannerEffect, (object) (short) 3841, (object) ItemID.Sets.DD2BannerEffect, (object) (short) 3846, (object) ItemID.Sets.DD2BannerEffect); + public static int[] KillsToBanner = ItemID.Sets.Factory.CreateIntSet(50, 3838, 1000, 3845, 200, 3837, 500, 3844, 200, 3843, 50, 3839, 200, 3840, 100, 3842, 200, 3841, 100, 3846, 50, 2971, 200, 2982, 100, 2994, 100); + public static bool[] CanFishInLava = ItemID.Sets.Factory.CreateBoolSet(2422); + public static bool[] IsLavaBait = ItemID.Sets.Factory.CreateBoolSet(4849, 4845, 4847); + private const int healingItemsDecayRate = 4; + public static int[] ItemSpawnDecaySpeed = ItemID.Sets.Factory.CreateIntSet(1, 58, 4, 184, 4, 1867, 4, 1868, 4, 1734, 4, 1735, 4); + public static bool[] IsFishingCrate = ItemID.Sets.Factory.CreateBoolSet(2334, 2335, 2336, 3203, 3204, 3205, 3206, 3207, 3208, 4405, 4407, 4877, 5002, 3979, 3980, 3981, 3982, 3983, 3984, 3985, 3986, 3987, 4406, 4408, 4878, 5003); + public static bool[] IsFishingCrateHardmode = ItemID.Sets.Factory.CreateBoolSet(3979, 3980, 3981, 3982, 3983, 3984, 3985, 3986, 3987, 4406, 4408, 4878, 5003); + public static bool[] CanBePlacedOnWeaponRacks = ItemID.Sets.Factory.CreateBoolSet(3196, 166, 235, 3115, 167, 2896, 3547, 580, 937, 4423, 4824, 4825, 4908, 4909, 4094, 4039, 4092, 4093, 4587, 4588, 4589, 4590, 4591, 4592, 4593, 4594, 4595, 4596, 4597, 4598, 905, 1326, 3225, 2303, 2299, 2290, 2317, 2305, 2304, 2313, 2318, 2312, 2306, 2308, 2319, 2314, 2302, 2315, 2307, 2310, 2301, 2298, 2316, 2309, 2321, 2297, 2300, 2311, 2420, 2438, 2437, 2436, 4401, 4402, 2475, 2476, 2450, 2477, 2478, 2451, 2479, 2480, 2452, 2453, 2481, 2454, 2482, 2483, 2455, 2456, 2457, 2458, 2459, 2460, 2484, 2472, 2461, 2462, 2463, 2485, 2464, 2465, 2486, 2466, 2467, 2468, 2487, 2469, 2488, 2470, 2471, 2473, 2474, 4393, 4394); + public static int[] TextureCopyLoad = ItemID.Sets.Factory.CreateIntSet(-1, 3665, 48, 3666, 306, 3667, 328, 3668, 625, 3669, 626, 3670, 627, 3671, 680, 3672, 681, 3673, 831, 3674, 838, 3675, 914, 3676, 952, 3677, 1142, 3678, 1298, 3679, 1528, 3680, 1529, 3681, 1530, 3682, 1531, 3683, 1532, 3684, 2230, 3685, 2249, 3686, 2250, 3687, 2526, 3688, 2544, 3689, 2559, 3690, 2574, 3691, 2612, 3692, 2613, 3693, 2614, 3694, 2615, 3695, 2616, 3696, 2617, 3697, 2618, 3698, 2619, 3699, 2620, 3700, 2748, 3701, 2814, 3703, 3125, 3702, 3180, 3704, 3181, 3705, 3665, 3706, 3665, 4713, 4712); + public static bool[] TrapSigned = ItemID.Sets.Factory.CreateBoolSet(false, 3665, 3666, 3667, 3668, 3669, 3670, 3671, 3672, 3673, 3674, 3675, 3676, 3677, 3678, 3679, 3680, 3681, 3682, 3683, 3684, 3685, 3686, 3687, 3688, 3689, 3690, 3691, 3692, 3693, 3694, 3695, 3696, 3697, 3698, 3699, 3700, 3701, 3703, 3702, 3704, 3705, 3706, 3886, 3887, 3950, 3976, 4164, 4185, 4206, 4227, 4266, 4268, 4585, 4713); + public static bool[] Deprecated = ItemID.Sets.Factory.CreateBoolSet(2783, 2785, 2782, 2773, 2775, 2772, 2778, 2780, 2777, 3463, 3465, 3462, 2881, 3847, 3848, 3849, 3850, 3851, 3850, 3861, 3862, 4010, 4058, 5013, 4722, 3978); + public static bool[] NeverAppearsAsNewInInventory = ItemID.Sets.Factory.CreateBoolSet(71, 72, 73, 74); + public static bool[] CommonCoin = ItemID.Sets.Factory.CreateBoolSet(71, 72, 73, 74); + public static bool[] ItemIconPulse = ItemID.Sets.Factory.CreateBoolSet(520, 521, 575, 549, 548, 547, 3456, 3457, 3458, 3459, 3580, 3581); + public static bool[] ItemNoGravity = ItemID.Sets.Factory.CreateBoolSet(520, 521, 575, 549, 548, 547, 3453, 3454, 3455, 3456, 3457, 3458, 3459, 3580, 3581, 4143); + public static int[] ExtractinatorMode = ItemID.Sets.Factory.CreateIntSet(-1, 424, 0, 1103, 0, 3347, 1); + public static int[] StaffMinionSlotsRequired = ItemID.Sets.Factory.CreateIntSet(1); + public static bool[] ExoticPlantsForDyeTrade = ItemID.Sets.Factory.CreateBoolSet(3385, 3386, 3387, 3388); + public static bool[] NebulaPickup = ItemID.Sets.Factory.CreateBoolSet(3453, 3454, 3455); + public static bool[] AnimatesAsSoul = ItemID.Sets.Factory.CreateBoolSet(575, 547, 520, 548, 521, 549, 3580, 3581); + public static bool[] gunProj = ItemID.Sets.Factory.CreateBoolSet(3475, 3540, 3854, 3930); + public static int[] SortingPriorityBossSpawns = ItemID.Sets.Factory.CreateIntSet(-1, 43, 1, 560, 2, 70, 3, 1331, 3, 361, 4, 1133, 5, 4988, 5, 544, 6, 556, 7, 557, 8, 2495, 9, 2673, 10, 602, 11, 1844, 12, 1958, 13, 1293, 14, 2767, 15, 4271, 15, 3601, 16, 1291, 17, 109, 18, 29, 19, 50, 20, 3199, 20, 3124, 21); + public static int[] SortingPriorityWiring = ItemID.Sets.Factory.CreateIntSet(-1, 510, 103, 3625, 102, 509, 101, 851, 100, 850, 99, 3612, 98, 849, 97, 4485, 96, 4484, 95, 583, 94, 584, 93, 585, 92, 538, 91, 513, 90, 3545, 90, 853, 89, 541, 88, 529, 88, 1151, 87, 852, 87, 543, 87, 542, 87, 3707, 87, 2492, 86, 530, 85, 581, 84, 582, 84, 1263, 83); + public static int[] SortingPriorityMaterials = ItemID.Sets.Factory.CreateIntSet(-1, 3467, 100, 3460, 99, 3458, 98, 3456, 97, 3457, 96, 3459, 95, 3261, 94, 1508, 93, 1552, 92, 1006, 91, 947, 90, 1225, 89, 1198, 88, 1106, 87, 391, 86, 366, 85, 1191, 84, 1105, 83, 382, 82, 365, 81, 1184, 80, 1104, 79, 381, 78, 364, 77, 548, 76, 547, 75, 549, 74, 575, 73, 521, 72, 520, 71, 175, 70, 174, 69, 3380, 68, 1329, 67, 1257, 66, 880, 65, 86, 64, 57, 63, 56, 62, 117, 61, 116, 60, 706, 59, 702, 58, 19, 57, 13, 56, 705, 55, 701, 54, 21, 53, 14, 52, 704, 51, 700, 50, 22, 49, 11, 48, 703, 47, 699, 46, 20, 45, 12, 44, 999, 43, 182, 42, 178, 41, 179, 40, 177, 39, 180, 38, 181, 37); + public static int[] SortingPriorityExtractibles = ItemID.Sets.Factory.CreateIntSet(-1, 997, 4, 3347, 3, 1103, 2, 424, 1); + public static int[] SortingPriorityRopes = ItemID.Sets.Factory.CreateIntSet(-1, 965, 1, 85, 1, 210, 1, 3077, 1, 3078, 1); + public static int[] SortingPriorityPainting = ItemID.Sets.Factory.CreateIntSet(-1, 1543, 100, 1544, 99, 1545, 98, 1071, 97, 1072, 96, 1100, 95); + public static int[] SortingPriorityTerraforming = ItemID.Sets.Factory.CreateIntSet(-1, 779, 100, 780, 99, 783, 98, 781, 97, 782, 96, 784, 95, 422, 94, 423, 93, 3477, 92, 66, 91, 67, 90, 2886, 89); + public static int[] GamepadExtraRange = ItemID.Sets.Factory.CreateIntSet(0, 2797, 20, 3278, 4, 3285, 6, 3279, 8, 3280, 8, 3281, 9, 3262, 10, 3317, 10, 3282, 10, 3315, 10, 3316, 11, 3283, 12, 3290, 13, 3289, 11, 3284, 13, 3286, 13, 3287, 18, 3288, 18, 3291, 17, 3292, 18, 3389, 21); + public static bool[] GamepadWholeScreenUseRange = ItemID.Sets.Factory.CreateBoolSet(1326, 1256, 1244, 3014, 113, 218, 495, 114, 496, 2796, 494, 3006, 65, 1931, 3570, 2750, 3065, 3029, 3030, 4381, 1309, 2364, 2365, 2551, 2535, 2584, 1157, 2749, 1802, 2621, 3249, 3531, 3474, 2366, 1572, 3569, 3571, 4269, 4273, 4281, 3611, 1299, 1254); + public static float[] BonusMeleeSpeedMultiplier = ItemID.Sets.Factory.CreateFloatSet(1f, 1827f, 0.5f, 3013f, 0.25f, 3106f, 0.33f); + public static bool[] GamepadSmartQuickReach = ItemID.Sets.Factory.CreateBoolSet(2798, 2797, 3030, 3262, 3278, 3279, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288, 3289, 3290, 3291, 3292, 3315, 3316, 3317, 3389, 2798, 65, 1931, 3570, 2750, 3065, 3029, 1256, 1244, 3014, 113, 218, 495); + public static bool[] Yoyo = ItemID.Sets.Factory.CreateBoolSet(3262, 3278, 3279, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288, 3289, 3290, 3291, 3292, 3315, 3316, 3317, 3389); + public static bool[] AlsoABuildingItem = ItemID.Sets.Factory.CreateBoolSet(3031, 205, 1128, 207, 206, 3032, 849, 3620, 509, 851, 850, 3625, 510, 1071, 1543, 1072, 1544, 1100, 1545, 4820, 4872); + public static bool[] LockOnIgnoresCollision = ItemID.Sets.Factory.CreateBoolSet(64, 3570, 1327, 3006, 1227, 788, 756, 1228, 65, 3065, 3473, 3051, 1309, 2364, 2365, 2551, 2535, 2584, 1157, 2749, 1802, 2621, 3249, 3531, 3474, 2366, 1572, 4269, 4273, 4281, 4607, 3014, 3569, 3571); + public static int[] LockOnAimAbove = ItemID.Sets.Factory.CreateIntSet(0, 1256, 15, 1244, 15, 3014, 15, 3569, 15, 3571, 15); + public static float?[] LockOnAimCompensation = ItemID.Sets.Factory.CreateCustomSet(new float?(), (object) (short) 1336, (object) 0.2f, (object) (short) 157, (object) 0.29f, (object) (short) 2590, (object) 0.4f, (object) (short) 3821, (object) 0.4f, (object) (short) 160, (object) 0.4f); + public static bool[] SingleUseInGamepad = ItemID.Sets.Factory.CreateBoolSet(8, 427, 3004, 523, 433, 429, 974, 1333, 1245, 3114, 430, 3045, 428, 2274, 431, 432, 4383, 4384, 4385, 4386, 4387, 4388); + public static bool[] Torches = ItemID.Sets.Factory.CreateBoolSet(8, 427, 3004, 523, 433, 429, 974, 1333, 1245, 3114, 430, 3045, 428, 2274, 431, 432, 4383, 4384, 4385, 4386, 4387, 4388); + public static bool[] WaterTorches = ItemID.Sets.Factory.CreateBoolSet(523, 1333, 4384); + public static short[] Workbenches = new short[41] + { + (short) 36, + (short) 635, + (short) 636, + (short) 637, + (short) 673, + (short) 811, + (short) 812, + (short) 813, + (short) 814, + (short) 815, + (short) 916, + (short) 1145, + (short) 1398, + (short) 1401, + (short) 1404, + (short) 1461, + (short) 1511, + (short) 1795, + (short) 1817, + (short) 2229, + (short) 2251, + (short) 2252, + (short) 2253, + (short) 2534, + (short) 2631, + (short) 2632, + (short) 2633, + (short) 2826, + (short) 3156, + (short) 3157, + (short) 3158, + (short) 3909, + (short) 3910, + (short) 3949, + (short) 3975, + (short) 4163, + (short) 4184, + (short) 4205, + (short) 4226, + (short) 4315, + (short) 4584 + }; + } + } +} diff --git a/ID/ItemUseStyleID.cs b/ID/ItemUseStyleID.cs new file mode 100644 index 0000000..6b01a03 --- /dev/null +++ b/ID/ItemUseStyleID.cs @@ -0,0 +1,27 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.ItemUseStyleID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public class ItemUseStyleID + { + public const int None = 0; + public const int Swing = 1; + public const int DrinkOld = 7; + public const int Thrust = 3; + public const int HoldUp = 4; + public const int Shoot = 5; + public const int DrinkLong = 6; + public const int EatFood = 2; + public const int GolfPlay = 8; + public const int DrinkLiquid = 9; + public const int HiddenAnimation = 10; + public const int MowTheLawn = 11; + public const int Guitar = 12; + public const int Rapier = 13; + public const int RaiseLamp = 14; + } +} diff --git a/ID/MenuID.cs b/ID/MenuID.cs new file mode 100644 index 0000000..8b28818 --- /dev/null +++ b/ID/MenuID.cs @@ -0,0 +1,67 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.MenuID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public static class MenuID + { + public const int None = -1; + public const int LanguageSelectFirstRun = 1212; + public const int LanguageSelect = 1213; + public const int ServerPasswordRequested = 31; + public const int MultiplayerJoining = 14; + public const int SteamMultiplayer = 882; + public const int ServerPasswordSet = 30; + public const int SteamMultiplayerOptions = 889; + public const int Error = 15; + public const int LoadFailedWithBackup = 200; + public const int LoadFailedNoBackup = 201; + public const int Status = 10; + public const int AutomaticServerConnect = 100; + public const int Title = 0; + public const int CharacterSelect = 1; + public const int CharacterCreation = 2; + public const int HardcoreOption = 222; + public const int ClothesSelect = 20; + public const int HairColor = 17; + public const int EyeColor = 18; + public const int SkinColor = 19; + public const int ShirtColor = 21; + public const int UndershirtColor = 22; + public const int PantsColor = 23; + public const int ShoeColor = 24; + public const int CharacterName = 3; + public const int CharacterDeletion = 4; + public const int CharacterDeletionConfirmation = 5; + public const int WorldSelect = 6; + public const int WorldExpert = -7; + public const int WorldEvil = -71; + public const int WorldName = 7; + public const int WorldSeed = 5000; + public const int WorldDeletion = 8; + public const int WorldDeletionConfirmation = 9; + public const int Settings = 11; + public const int GeneralSettings = 112; + public const int UISettings = 1112; + public const int VideoSettings = 1111; + public const int EffectsSettings = 2008; + public const int FullscreenSettings = 111; + public const int CursorSettings = 1125; + public const int CursorColor = 25; + public const int CursorEdgeColor = 252; + public const int VolumeSettings = 26; + public const int BackgroundScrollSettings = 28; + public const int MapKeybindSettings = 272727; + public const int KeybindSettings = 27; + public const int ControlSettings = 1127; + public const int Multiplayer = 12; + public const int ServerIP = 13; + public const int ServerPort = 131; + public const int WorldSize = 16; + public const int FancyUI = 888; + public const int RejectedWorld = 1000000; + } +} diff --git a/ID/MessageID.cs b/ID/MessageID.cs new file mode 100644 index 0000000..a608966 --- /dev/null +++ b/ID/MessageID.cs @@ -0,0 +1,160 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.MessageID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Terraria.ID +{ + public class MessageID + { + public const byte NeverCalled = 0; + public const byte Hello = 1; + public const byte Kick = 2; + public const byte PlayerInfo = 3; + public const byte SyncPlayer = 4; + public const byte SyncEquipment = 5; + public const byte RequestWorldData = 6; + public const byte WorldData = 7; + public const byte SpawnTileData = 8; + public const byte StatusTextSize = 9; + public const byte TileSection = 10; + public const byte TileFrameSection = 11; + public const byte PlayerSpawn = 12; + public const byte PlayerControls = 13; + public const byte PlayerActive = 14; + [Obsolete("Deprecated.")] + public const byte Unknown15 = 15; + public const byte PlayerLifeMana = 16; + public const byte TileManipulation = 17; + public const byte SetTime = 18; + public const byte ToggleDoorState = 19; + public const byte Unknown20 = 20; + public const byte SyncItem = 21; + public const byte ItemOwner = 22; + public const byte SyncNPC = 23; + public const byte UnusedMeleeStrike = 24; + [Obsolete("Deprecated. Use NetTextModule instead.")] + public const byte Unused25 = 25; + [Obsolete("Deprecated.")] + public const byte Unused26 = 26; + public const byte SyncProjectile = 27; + public const byte DamageNPC = 28; + public const byte KillProjectile = 29; + public const byte TogglePVP = 30; + public const byte RequestChestOpen = 31; + public const byte SyncChestItem = 32; + public const byte SyncPlayerChest = 33; + public const byte ChestUpdates = 34; + public const byte PlayerHeal = 35; + public const byte SyncPlayerZone = 36; + public const byte RequestPassword = 37; + public const byte SendPassword = 38; + public const byte ReleaseItemOwnership = 39; + public const byte SyncTalkNPC = 40; + public const byte Unknown41 = 41; + public const byte Unknown42 = 42; + public const byte Unknown43 = 43; + [Obsolete("Deprecated.")] + public const byte Unknown44 = 44; + public const byte Unknown45 = 45; + public const byte Unknown46 = 46; + public const byte Unknown47 = 47; + [Obsolete("Deprecated. Use NetLiquidModule instead.")] + public const byte LiquidUpdate = 48; + public const byte Unknown49 = 49; + public const byte Unknown50 = 50; + public const byte Unknown51 = 51; + public const byte Unknown52 = 52; + public const byte Unknown53 = 53; + public const byte Unknown54 = 54; + public const byte AddPlayerBuff = 55; + public const byte UniqueTownNPCInfoSyncRequest = 56; + public const byte Unknown57 = 57; + public const byte InstrumentSound = 58; + public const byte HitSwitch = 59; + public const byte Unknown60 = 60; + public const byte Unknown61 = 61; + public const byte Unknown62 = 62; + public const byte Unknown63 = 63; + public const byte Unknown64 = 64; + public const byte TeleportEntity = 65; + public const byte Unknown66 = 66; + public const byte Unknown67 = 67; + public const byte Unknown68 = 68; + public const byte ChestName = 69; + public const byte BugCatching = 70; + public const byte BugReleasing = 71; + public const byte TravelMerchantItems = 72; + public const byte RequestTeleportationByServer = 73; + public const byte AnglerQuest = 74; + public const byte AnglerQuestFinished = 75; + public const byte QuestsCountSync = 76; + public const byte TemporaryAnimation = 77; + public const byte InvasionProgressReport = 78; + public const byte PlaceObject = 79; + public const byte SyncPlayerChestIndex = 80; + public const byte CombatTextInt = 81; + public const byte NetModules = 82; + public const byte NPCKillCountDeathTally = 83; + public const byte PlayerStealth = 84; + public const byte QuickStackChests = 85; + public const byte TileEntitySharing = 86; + public const byte TileEntityPlacement = 87; + public const byte ItemTweaker = 88; + public const byte ItemFrameTryPlacing = 89; + public const byte InstancedItem = 90; + public const byte SyncEmoteBubble = 91; + public const byte SyncExtraValue = 92; + public const byte SocialHandshake = 93; + public const byte Deprecated1 = 94; + public const byte MurderSomeoneElsesPortal = 95; + public const byte TeleportPlayerThroughPortal = 96; + public const byte AchievementMessageNPCKilled = 97; + public const byte AchievementMessageEventHappened = 98; + public const byte MinionRestTargetUpdate = 99; + public const byte TeleportNPCThroughPortal = 100; + public const byte UpdateTowerShieldStrengths = 101; + public const byte NebulaLevelupRequest = 102; + public const byte MoonlordHorror = 103; + public const byte ShopOverride = 104; + public const byte GemLockToggle = 105; + public const byte PoofOfSmoke = 106; + public const byte SmartTextMessage = 107; + public const byte WiredCannonShot = 108; + public const byte MassWireOperation = 109; + public const byte MassWireOperationPay = 110; + public const byte ToggleParty = 111; + public const byte SpecialFX = 112; + public const byte CrystalInvasionStart = 113; + public const byte CrystalInvasionWipeAllTheThingsss = 114; + public const byte MinionAttackTargetUpdate = 115; + public const byte CrystalInvasionSendWaitTime = 116; + public const byte PlayerHurtV2 = 117; + public const byte PlayerDeathV2 = 118; + public const byte CombatTextString = 119; + public const byte Emoji = 120; + public const byte TEDisplayDollItemSync = 121; + public const byte RequestTileEntityInteraction = 122; + public const byte WeaponsRackTryPlacing = 123; + public const byte TEHatRackItemSync = 124; + public const byte SyncTilePicking = 125; + public const byte SyncRevengeMarker = 126; + public const byte RemoveRevengeMarker = 127; + public const byte LandGolfBallInCup = 128; + public const byte FinishedConnectingToServer = 129; + public const byte FishOutNPC = 130; + public const byte TamperWithNPC = 131; + public const byte PlayLegacySound = 132; + public const byte FoodPlatterTryPlacing = 133; + public const byte UpdatePlayerLuckFactors = 134; + public const byte DeadPlayer = 135; + public const byte SyncCavernMonsterType = 136; + public const byte RequestNPCBuffRemoval = 137; + public const byte ClientSyncedInventory = 138; + public const byte SetCountsAsHostForGameplay = 139; + public const byte Count = 140; + } +} diff --git a/ID/MountID.cs b/ID/MountID.cs new file mode 100644 index 0000000..ef4d2bc --- /dev/null +++ b/ID/MountID.cs @@ -0,0 +1,72 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.MountID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public static class MountID + { + public const int None = -1; + public const int Rudolph = 0; + public const int Bunny = 1; + public const int Pigron = 2; + public const int Slime = 3; + public const int Turtle = 4; + public const int Bee = 5; + public const int Minecart = 6; + public const int UFO = 7; + public const int Drill = 8; + public const int Scutlix = 9; + public const int Unicorn = 10; + public const int MinecartMech = 11; + public const int CuteFishron = 12; + public const int MinecartWood = 13; + public const int Basilisk = 14; + public const int DesertMinecart = 15; + public const int FishMinecart = 16; + public const int GolfCartSomebodySaveMe = 17; + public const int BeeMinecart = 18; + public const int LadybugMinecart = 19; + public const int PigronMinecart = 20; + public const int SunflowerMinecart = 21; + public const int HellMinecart = 22; + public const int WitchBroom = 23; + public const int ShroomMinecart = 24; + public const int AmethystMinecart = 25; + public const int TopazMinecart = 26; + public const int SapphireMinecart = 27; + public const int EmeraldMinecart = 28; + public const int RubyMinecart = 29; + public const int DiamondMinecart = 30; + public const int AmberMinecart = 31; + public const int BeetleMinecart = 32; + public const int MeowmereMinecart = 33; + public const int PartyMinecart = 34; + public const int PirateMinecart = 35; + public const int SteampunkMinecart = 36; + public const int Flamingo = 37; + public const int CoffinMinecart = 38; + public const int DiggingMoleMinecart = 39; + public const int PaintedHorse = 40; + public const int MajesticHorse = 41; + public const int DarkHorse = 42; + public const int PogoStick = 43; + public const int PirateShip = 44; + public const int SpookyWood = 45; + public const int Santank = 46; + public const int WallOfFleshGoat = 47; + public const int DarkMageBook = 48; + public const int LavaShark = 49; + public const int QueenSlime = 50; + public static int Count = 51; + + public static class Sets + { + public static SetFactory Factory = new SetFactory(MountID.Count); + public static bool[] Cart = MountID.Sets.Factory.CreateBoolSet(6, 11, 13, 15, 16, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 38, 39); + public static bool[] FacePlayersVelocity = MountID.Sets.Factory.CreateBoolSet(15, 16, 11, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 38, 39); + } + } +} diff --git a/ID/NPCHeadID.cs b/ID/NPCHeadID.cs new file mode 100644 index 0000000..7fc1e54 --- /dev/null +++ b/ID/NPCHeadID.cs @@ -0,0 +1,64 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.NPCHeadID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public class NPCHeadID + { + public const int HousingQuery = 0; + public const int Guide = 1; + public const int Merchant = 2; + public const int Nurse = 3; + public const int Demolitionist = 4; + public const int Dryad = 5; + public const int ArmsDealer = 6; + public const int Clothier = 7; + public const int Mechanic = 8; + public const int GoblinTinkerer = 9; + public const int Wizard = 10; + public const int SantaClaus = 11; + public const int Truffle = 12; + public const int Steampunker = 13; + public const int DyeTrader = 14; + public const int PartyGirl = 15; + public const int Cyborg = 16; + public const int Painter = 17; + public const int WitchDoctor = 18; + public const int Pirate = 19; + public const int Stylist = 20; + public const int TravellingMerchant = 21; + public const int Angler = 22; + public const int TaxCollector = 23; + public const int DD2Bartender = 24; + public const int Golfer = 25; + public const int BestiaryGirl = 26; + public const int CatSiamese = 27; + public const int CatBlack = 28; + public const int CatOrangeTabby = 29; + public const int CatRussianBlue = 30; + public const int CatSilver = 31; + public const int CatWhite = 32; + public const int DogLabrador = 33; + public const int DogPitBull = 34; + public const int DogBeagle = 35; + public const int DogCorgi = 36; + public const int DogDalmation = 37; + public const int DogHusky = 38; + public const int BunnyWhite = 39; + public const int BunnyAngora = 40; + public const int BunnyDutch = 41; + public const int BunnyFlemish = 42; + public const int BunnyLop = 43; + public const int BunnySilver = 44; + public const int Count = 45; + + public static class Sets + { + public static SetFactory Factory = new SetFactory(45); + public static bool[] CannotBeDrawnInHousingUI = NPCHeadID.Sets.Factory.CreateBoolSet(21); + } + } +} diff --git a/ID/NPCID.cs b/ID/NPCID.cs new file mode 100644 index 0000000..228d93b --- /dev/null +++ b/ID/NPCID.cs @@ -0,0 +1,5902 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.NPCID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Reflection; +using System.Collections.Generic; + +namespace Terraria.ID +{ + public class NPCID + { + private static readonly int[] NetIdMap = new int[65] + { + 81, + 81, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 6, + 6, + 31, + 31, + 77, + 42, + 42, + 176, + 176, + 176, + 176, + 173, + 173, + 183, + 183, + 3, + 3, + 132, + 132, + 186, + 186, + 187, + 187, + 188, + 188, + 189, + 189, + 190, + 191, + 192, + 193, + 194, + 2, + 200, + 200, + 21, + 21, + 201, + 201, + 202, + 202, + 203, + 203, + 223, + 223, + 231, + 231, + 232, + 232, + 233, + 233, + 234, + 234, + 235, + 235 + }; + private static readonly Dictionary LegacyNameToIdMap = new Dictionary() + { + { + nameof (Slimeling), + -1 + }, + { + nameof (Slimer2), + -2 + }, + { + "Green Slime", + -3 + }, + { + nameof (Pinky), + -4 + }, + { + "Baby Slime", + -5 + }, + { + "Black Slime", + -6 + }, + { + "Purple Slime", + -7 + }, + { + "Red Slime", + -8 + }, + { + "Yellow Slime", + -9 + }, + { + "Jungle Slime", + -10 + }, + { + "Little Eater", + -11 + }, + { + "Big Eater", + -12 + }, + { + "Short Bones", + -13 + }, + { + "Big Boned", + -14 + }, + { + "Heavy Skeleton", + -15 + }, + { + "Little Stinger", + -16 + }, + { + "Big Stinger", + -17 + }, + { + "Tiny Moss Hornet", + -18 + }, + { + "Little Moss Hornet", + -19 + }, + { + "Big Moss Hornet", + -20 + }, + { + "Giant Moss Hornet", + -21 + }, + { + "Little Crimera", + -22 + }, + { + "Big Crimera", + -23 + }, + { + "Little Crimslime", + -24 + }, + { + "Big Crimslime", + -25 + }, + { + "Small Zombie", + -26 + }, + { + "Big Zombie", + -27 + }, + { + "Small Bald Zombie", + -28 + }, + { + "Big Bald Zombie", + -29 + }, + { + "Small Pincushion Zombie", + -30 + }, + { + "Big Pincushion Zombie", + -31 + }, + { + "Small Slimed Zombie", + -32 + }, + { + "Big Slimed Zombie", + -33 + }, + { + "Small Swamp Zombie", + -34 + }, + { + "Big Swamp Zombie", + -35 + }, + { + "Small Twiggy Zombie", + -36 + }, + { + "Big Twiggy Zombie", + -37 + }, + { + "Cataract Eye 2", + -38 + }, + { + "Sleepy Eye 2", + -39 + }, + { + "Dialated Eye 2", + -40 + }, + { + "Green Eye 2", + -41 + }, + { + "Purple Eye 2", + -42 + }, + { + "Demon Eye 2", + -43 + }, + { + "Small Female Zombie", + -44 + }, + { + "Big Female Zombie", + -45 + }, + { + "Small Skeleton", + -46 + }, + { + "Big Skeleton", + -47 + }, + { + "Small Headache Skeleton", + -48 + }, + { + "Big Headache Skeleton", + -49 + }, + { + "Small Misassembled Skeleton", + -50 + }, + { + "Big Misassembled Skeleton", + -51 + }, + { + "Small Pantless Skeleton", + -52 + }, + { + "Big Pantless Skeleton", + -53 + }, + { + "Small Rain Zombie", + -54 + }, + { + "Big Rain Zombie", + -55 + }, + { + "Little Hornet Fatty", + -56 + }, + { + "Big Hornet Fatty", + -57 + }, + { + "Little Hornet Honey", + -58 + }, + { + "Big Hornet Honey", + -59 + }, + { + "Little Hornet Leafy", + -60 + }, + { + "Big Hornet Leafy", + -61 + }, + { + "Little Hornet Spikey", + -62 + }, + { + "Big Hornet Spikey", + -63 + }, + { + "Little Hornet Stingy", + -64 + }, + { + "Big Hornet Stingy", + -65 + }, + { + "Blue Slime", + 1 + }, + { + "Demon Eye", + 2 + }, + { + nameof (Zombie), + 3 + }, + { + "Eye of Cthulhu", + 4 + }, + { + "Servant of Cthulhu", + 5 + }, + { + "Eater of Souls", + 6 + }, + { + "Devourer", + 7 + }, + { + "Giant Worm", + 10 + }, + { + "Eater of Worlds", + 13 + }, + { + "Mother Slime", + 16 + }, + { + nameof (Merchant), + 17 + }, + { + nameof (Nurse), + 18 + }, + { + "Arms Dealer", + 19 + }, + { + nameof (Dryad), + 20 + }, + { + nameof (Skeleton), + 21 + }, + { + nameof (Guide), + 22 + }, + { + "Meteor Head", + 23 + }, + { + "Fire Imp", + 24 + }, + { + "Burning Sphere", + 25 + }, + { + "Goblin Peon", + 26 + }, + { + "Goblin Thief", + 27 + }, + { + "Goblin Warrior", + 28 + }, + { + "Goblin Sorcerer", + 29 + }, + { + "Chaos Ball", + 30 + }, + { + "Angry Bones", + 31 + }, + { + "Dark Caster", + 32 + }, + { + "Water Sphere", + 33 + }, + { + "Cursed Skull", + 34 + }, + { + "Skeletron", + 35 + }, + { + "Old Man", + 37 + }, + { + nameof (Demolitionist), + 38 + }, + { + "Bone Serpent", + 39 + }, + { + nameof (Hornet), + 42 + }, + { + "Man Eater", + 43 + }, + { + "Undead Miner", + 44 + }, + { + nameof (Tim), + 45 + }, + { + nameof (Bunny), + 46 + }, + { + "Corrupt Bunny", + 47 + }, + { + nameof (Harpy), + 48 + }, + { + "Cave Bat", + 49 + }, + { + "King Slime", + 50 + }, + { + "Jungle Bat", + 51 + }, + { + "Doctor Bones", + 52 + }, + { + "The Groom", + 53 + }, + { + nameof (Clothier), + 54 + }, + { + nameof (Goldfish), + 55 + }, + { + nameof (Snatcher), + 56 + }, + { + "Corrupt Goldfish", + 57 + }, + { + nameof (Piranha), + 58 + }, + { + "Lava Slime", + 59 + }, + { + nameof (Hellbat), + 60 + }, + { + nameof (Vulture), + 61 + }, + { + nameof (Demon), + 62 + }, + { + "Blue Jellyfish", + 63 + }, + { + "Pink Jellyfish", + 64 + }, + { + nameof (Shark), + 65 + }, + { + "Voodoo Demon", + 66 + }, + { + nameof (Crab), + 67 + }, + { + "Dungeon Guardian", + 68 + }, + { + nameof (Antlion), + 69 + }, + { + "Spike Ball", + 70 + }, + { + "Dungeon Slime", + 71 + }, + { + "Blazing Wheel", + 72 + }, + { + "Goblin Scout", + 73 + }, + { + nameof (Bird), + 74 + }, + { + nameof (Pixie), + 75 + }, + { + "Armored Skeleton", + 77 + }, + { + nameof (Mummy), + 78 + }, + { + "Dark Mummy", + 79 + }, + { + "Light Mummy", + 80 + }, + { + "Corrupt Slime", + 81 + }, + { + nameof (Wraith), + 82 + }, + { + "Cursed Hammer", + 83 + }, + { + "Enchanted Sword", + 84 + }, + { + nameof (Mimic), + 85 + }, + { + nameof (Unicorn), + 86 + }, + { + "Wyvern", + 87 + }, + { + "Giant Bat", + 93 + }, + { + nameof (Corruptor), + 94 + }, + { + "Digger", + 95 + }, + { + "World Feeder", + 98 + }, + { + nameof (Clinger), + 101 + }, + { + "Angler Fish", + 102 + }, + { + "Green Jellyfish", + 103 + }, + { + nameof (Werewolf), + 104 + }, + { + "Bound Goblin", + 105 + }, + { + "Bound Wizard", + 106 + }, + { + "Goblin Tinkerer", + 107 + }, + { + nameof (Wizard), + 108 + }, + { + nameof (Clown), + 109 + }, + { + "Skeleton Archer", + 110 + }, + { + "Goblin Archer", + 111 + }, + { + "Vile Spit", + 112 + }, + { + "Wall of Flesh", + 113 + }, + { + "The Hungry", + 115 + }, + { + "Leech", + 117 + }, + { + "Chaos Elemental", + 120 + }, + { + nameof (Slimer), + 121 + }, + { + nameof (Gastropod), + 122 + }, + { + "Bound Mechanic", + 123 + }, + { + nameof (Mechanic), + 124 + }, + { + nameof (Retinazer), + 125 + }, + { + nameof (Spazmatism), + 126 + }, + { + "Skeletron Prime", + (int) sbyte.MaxValue + }, + { + "Prime Cannon", + 128 + }, + { + "Prime Saw", + 129 + }, + { + "Prime Vice", + 130 + }, + { + "Prime Laser", + 131 + }, + { + "Wandering Eye", + 133 + }, + { + "The Destroyer", + 134 + }, + { + "Illuminant Bat", + 137 + }, + { + "Illuminant Slime", + 138 + }, + { + nameof (Probe), + 139 + }, + { + "Possessed Armor", + 140 + }, + { + "Toxic Sludge", + 141 + }, + { + "Santa Claus", + 142 + }, + { + "Snowman Gangsta", + 143 + }, + { + "Mister Stabby", + 144 + }, + { + "Snow Balla", + 145 + }, + { + "Ice Slime", + 147 + }, + { + nameof (Penguin), + 148 + }, + { + "Ice Bat", + 150 + }, + { + "Lava Bat", + 151 + }, + { + "Giant Flying Fox", + 152 + }, + { + "Giant Tortoise", + 153 + }, + { + "Ice Tortoise", + 154 + }, + { + nameof (Wolf), + 155 + }, + { + "Red Devil", + 156 + }, + { + nameof (Arapaima), + 157 + }, + { + nameof (Vampire), + 158 + }, + { + nameof (Truffle), + 160 + }, + { + "Zombie Eskimo", + 161 + }, + { + nameof (Frankenstein), + 162 + }, + { + "Black Recluse", + 163 + }, + { + "Wall Creeper", + 164 + }, + { + "Swamp Thing", + 166 + }, + { + "Undead Viking", + 167 + }, + { + "Corrupt Penguin", + 168 + }, + { + "Ice Elemental", + 169 + }, + { + "Pigron", + 170 + }, + { + "Rune Wizard", + 172 + }, + { + nameof (Crimera), + 173 + }, + { + nameof (Herpling), + 174 + }, + { + "Angry Trapper", + 175 + }, + { + "Moss Hornet", + 176 + }, + { + nameof (Derpling), + 177 + }, + { + nameof (Steampunker), + 178 + }, + { + "Crimson Axe", + 179 + }, + { + "Face Monster", + 181 + }, + { + "Floaty Gross", + 182 + }, + { + nameof (Crimslime), + 183 + }, + { + "Spiked Ice Slime", + 184 + }, + { + "Snow Flinx", + 185 + }, + { + "Lost Girl", + 195 + }, + { + nameof (Nymph), + 196 + }, + { + "Armored Viking", + 197 + }, + { + nameof (Lihzahrd), + 198 + }, + { + "Spiked Jungle Slime", + 204 + }, + { + nameof (Moth), + 205 + }, + { + "Icy Merman", + 206 + }, + { + "Dye Trader", + 207 + }, + { + "Party Girl", + 208 + }, + { + nameof (Cyborg), + 209 + }, + { + nameof (Bee), + 210 + }, + { + "Pirate Deckhand", + 212 + }, + { + "Pirate Corsair", + 213 + }, + { + "Pirate Deadeye", + 214 + }, + { + "Pirate Crossbower", + 215 + }, + { + "Pirate Captain", + 216 + }, + { + "Cochineal Beetle", + 217 + }, + { + "Cyan Beetle", + 218 + }, + { + "Lac Beetle", + 219 + }, + { + "Sea Snail", + 220 + }, + { + nameof (Squid), + 221 + }, + { + "Queen Bee", + 222 + }, + { + "Raincoat Zombie", + 223 + }, + { + "Flying Fish", + 224 + }, + { + "Umbrella Slime", + 225 + }, + { + "Flying Snake", + 226 + }, + { + nameof (Painter), + 227 + }, + { + "Witch Doctor", + 228 + }, + { + nameof (Pirate), + 229 + }, + { + "Jungle Creeper", + 236 + }, + { + "Blood Crawler", + 239 + }, + { + "Blood Feeder", + 241 + }, + { + "Blood Jelly", + 242 + }, + { + "Ice Golem", + 243 + }, + { + "Rainbow Slime", + 244 + }, + { + nameof (Golem), + 245 + }, + { + "Golem Head", + 246 + }, + { + "Golem Fist", + 247 + }, + { + "Angry Nimbus", + 250 + }, + { + nameof (Eyezor), + 251 + }, + { + nameof (Parrot), + 252 + }, + { + nameof (Reaper), + 253 + }, + { + "Spore Zombie", + 254 + }, + { + "Fungo Fish", + 256 + }, + { + "Anomura Fungus", + 257 + }, + { + "Mushi Ladybug", + 258 + }, + { + "Fungi Bulb", + 259 + }, + { + "Giant Fungi Bulb", + 260 + }, + { + "Fungi Spore", + 261 + }, + { + nameof (Plantera), + 262 + }, + { + "Plantera's Hook", + 263 + }, + { + "Plantera's Tentacle", + 264 + }, + { + nameof (Spore), + 265 + }, + { + "Brain of Cthulhu", + 266 + }, + { + nameof (Creeper), + 267 + }, + { + "Ichor Sticker", + 268 + }, + { + "Rusty Armored Bones", + 269 + }, + { + "Blue Armored Bones", + 273 + }, + { + "Hell Armored Bones", + 277 + }, + { + "Ragged Caster", + 281 + }, + { + nameof (Necromancer), + 283 + }, + { + "Diabolist", + 285 + }, + { + "Bone Lee", + 287 + }, + { + "Dungeon Spirit", + 288 + }, + { + "Giant Cursed Skull", + 289 + }, + { + nameof (Paladin), + 290 + }, + { + "Skeleton Sniper", + 291 + }, + { + "Tactical Skeleton", + 292 + }, + { + "Skeleton Commando", + 293 + }, + { + "Blue Jay", + 297 + }, + { + "Cardinal", + 298 + }, + { + nameof (Squirrel), + 299 + }, + { + nameof (Mouse), + 300 + }, + { + nameof (Raven), + 301 + }, + { + "Slime", + 302 + }, + { + "Hoppin' Jack", + 304 + }, + { + "Scarecrow", + 305 + }, + { + "Headless Horseman", + 315 + }, + { + nameof (Ghost), + 316 + }, + { + "Mourning Wood", + 325 + }, + { + nameof (Splinterling), + 326 + }, + { + nameof (Pumpking), + 327 + }, + { + nameof (Hellhound), + 329 + }, + { + nameof (Poltergeist), + 330 + }, + { + "Zombie Elf", + 338 + }, + { + "Present Mimic", + 341 + }, + { + "Gingerbread Man", + 342 + }, + { + nameof (Yeti), + 343 + }, + { + nameof (Everscream), + 344 + }, + { + "Ice Queen", + 345 + }, + { + "Santa", + 346 + }, + { + "Elf Copter", + 347 + }, + { + nameof (Nutcracker), + 348 + }, + { + "Elf Archer", + 350 + }, + { + nameof (Krampus), + 351 + }, + { + nameof (Flocko), + 352 + }, + { + nameof (Stylist), + 353 + }, + { + "Webbed Stylist", + 354 + }, + { + nameof (Firefly), + 355 + }, + { + nameof (Butterfly), + 356 + }, + { + nameof (Worm), + 357 + }, + { + "Lightning Bug", + 358 + }, + { + nameof (Snail), + 359 + }, + { + "Glowing Snail", + 360 + }, + { + nameof (Frog), + 361 + }, + { + nameof (Duck), + 362 + }, + { + nameof (Scorpion), + 366 + }, + { + "Traveling Merchant", + 368 + }, + { + nameof (Angler), + 369 + }, + { + "Duke Fishron", + 370 + }, + { + "Detonating Bubble", + 371 + }, + { + nameof (Sharkron), + 372 + }, + { + "Truffle Worm", + 374 + }, + { + "Sleeping Angler", + 376 + }, + { + nameof (Grasshopper), + 377 + }, + { + "Chattering Teeth Bomb", + 378 + }, + { + "Blue Cultist Archer", + 379 + }, + { + "White Cultist Archer", + 380 + }, + { + "Brain Scrambler", + 381 + }, + { + "Ray Gunner", + 382 + }, + { + "Martian Officer", + 383 + }, + { + "Bubble Shield", + 384 + }, + { + "Gray Grunt", + 385 + }, + { + "Martian Engineer", + 386 + }, + { + "Tesla Turret", + 387 + }, + { + "Martian Drone", + 388 + }, + { + "Gigazapper", + 389 + }, + { + "Scutlix Gunner", + 390 + }, + { + nameof (Scutlix), + 391 + }, + { + "Martian Saucer", + 392 + }, + { + "Martian Saucer Turret", + 393 + }, + { + "Martian Saucer Cannon", + 394 + }, + { + "Moon Lord", + 396 + }, + { + "Moon Lord's Hand", + 397 + }, + { + "Moon Lord's Core", + 398 + }, + { + "Martian Probe", + 399 + }, + { + "Milkyway Weaver", + 402 + }, + { + "Star Cell", + 405 + }, + { + "Flow Invader", + 407 + }, + { + "Twinkle Popper", + 409 + }, + { + "Twinkle", + 410 + }, + { + "Stargazer", + 411 + }, + { + "Crawltipede", + 412 + }, + { + "Drakomire", + 415 + }, + { + "Drakomire Rider", + 416 + }, + { + "Sroller", + 417 + }, + { + "Corite", + 418 + }, + { + "Selenian", + 419 + }, + { + "Nebula Floater", + 420 + }, + { + "Brain Suckler", + 421 + }, + { + "Vortex Pillar", + 422 + }, + { + "Evolution Beast", + 423 + }, + { + "Predictor", + 424 + }, + { + "Storm Diver", + 425 + }, + { + "Alien Queen", + 426 + }, + { + "Alien Hornet", + 427 + }, + { + "Alien Larva", + 428 + }, + { + "Vortexian", + 429 + }, + { + "Mysterious Tablet", + 437 + }, + { + "Lunatic Devote", + 438 + }, + { + "Lunatic Cultist", + 439 + }, + { + "Tax Collector", + 441 + }, + { + "Gold Bird", + 442 + }, + { + "Gold Bunny", + 443 + }, + { + "Gold Butterfly", + 444 + }, + { + "Gold Frog", + 445 + }, + { + "Gold Grasshopper", + 446 + }, + { + "Gold Mouse", + 447 + }, + { + "Gold Worm", + 448 + }, + { + "Phantasm Dragon", + 454 + }, + { + nameof (Butcher), + 460 + }, + { + "Creature from the Deep", + 461 + }, + { + nameof (Fritz), + 462 + }, + { + nameof (Nailhead), + 463 + }, + { + "Crimtane Bunny", + 464 + }, + { + "Crimtane Goldfish", + 465 + }, + { + nameof (Psycho), + 466 + }, + { + "Deadly Sphere", + 467 + }, + { + "Dr. Man Fly", + 468 + }, + { + "The Possessed", + 469 + }, + { + "Vicious Penguin", + 470 + }, + { + "Goblin Summoner", + 471 + }, + { + "Shadowflame Apparation", + 472 + }, + { + "Corrupt Mimic", + 473 + }, + { + "Crimson Mimic", + 474 + }, + { + "Hallowed Mimic", + 475 + }, + { + "Jungle Mimic", + 476 + }, + { + nameof (Mothron), + 477 + }, + { + "Mothron Egg", + 478 + }, + { + "Baby Mothron", + 479 + }, + { + nameof (Medusa), + 480 + }, + { + "Hoplite", + 481 + }, + { + "Granite Golem", + 482 + }, + { + "Granite Elemental", + 483 + }, + { + "Enchanted Nightcrawler", + 484 + }, + { + nameof (Grubby), + 485 + }, + { + nameof (Sluggy), + 486 + }, + { + nameof (Buggy), + 487 + }, + { + "Target Dummy", + 488 + }, + { + "Blood Zombie", + 489 + }, + { + nameof (Drippler), + 490 + }, + { + "Stardust Pillar", + 493 + }, + { + nameof (Crawdad), + 494 + }, + { + "Giant Shelly", + 496 + }, + { + nameof (Salamander), + 498 + }, + { + "Nebula Pillar", + 507 + }, + { + "Antlion Charger", + 508 + }, + { + "Antlion Swarmer", + 509 + }, + { + "Dune Splicer", + 510 + }, + { + "Tomb Crawler", + 513 + }, + { + "Solar Flare", + 516 + }, + { + "Solar Pillar", + 517 + }, + { + "Drakanian", + 518 + }, + { + "Solar Fragment", + 519 + }, + { + "Martian Walker", + 520 + }, + { + "Ancient Vision", + 521 + }, + { + "Ancient Light", + 522 + }, + { + "Ancient Doom", + 523 + }, + { + "Ghoul", + 524 + }, + { + "Vile Ghoul", + 525 + }, + { + "Tainted Ghoul", + 526 + }, + { + "Dreamer Ghoul", + 527 + }, + { + "Lamia", + 528 + }, + { + "Sand Poacher", + 530 + }, + { + "Basilisk", + 532 + }, + { + "Desert Spirit", + 533 + }, + { + "Tortured Soul", + 534 + }, + { + "Spiked Slime", + 535 + }, + { + "The Bride", + 536 + }, + { + "Sand Slime", + 537 + }, + { + "Red Squirrel", + 538 + }, + { + "Gold Squirrel", + 539 + }, + { + "Sand Elemental", + 541 + }, + { + "Sand Shark", + 542 + }, + { + "Bone Biter", + 543 + }, + { + "Flesh Reaver", + 544 + }, + { + "Crystal Thresher", + 545 + }, + { + "Angry Tumbler", + 546 + }, + { + "???", + 547 + }, + { + "Eternia Crystal", + 548 + }, + { + "Mysterious Portal", + 549 + }, + { + "Tavernkeep", + 550 + }, + { + "Betsy", + 551 + }, + { + "Etherian Goblin", + 552 + }, + { + "Etherian Goblin Bomber", + 555 + }, + { + "Etherian Wyvern", + 558 + }, + { + "Etherian Javelin Thrower", + 561 + }, + { + "Dark Mage", + 564 + }, + { + "Old One's Skeleton", + 566 + }, + { + "Wither Beast", + 568 + }, + { + "Drakin", + 570 + }, + { + "Kobold", + 572 + }, + { + "Kobold Glider", + 574 + }, + { + "Ogre", + 576 + }, + { + "Etherian Lightning Bug", + 578 + } + }; + public static readonly IdDictionary Search = IdDictionary.Create(); + public const short NegativeIDCount = -66; + public const short BigHornetStingy = -65; + public const short LittleHornetStingy = -64; + public const short BigHornetSpikey = -63; + public const short LittleHornetSpikey = -62; + public const short BigHornetLeafy = -61; + public const short LittleHornetLeafy = -60; + public const short BigHornetHoney = -59; + public const short LittleHornetHoney = -58; + public const short BigHornetFatty = -57; + public const short LittleHornetFatty = -56; + public const short BigRainZombie = -55; + public const short SmallRainZombie = -54; + public const short BigPantlessSkeleton = -53; + public const short SmallPantlessSkeleton = -52; + public const short BigMisassembledSkeleton = -51; + public const short SmallMisassembledSkeleton = -50; + public const short BigHeadacheSkeleton = -49; + public const short SmallHeadacheSkeleton = -48; + public const short BigSkeleton = -47; + public const short SmallSkeleton = -46; + public const short BigFemaleZombie = -45; + public const short SmallFemaleZombie = -44; + public const short DemonEye2 = -43; + public const short PurpleEye2 = -42; + public const short GreenEye2 = -41; + public const short DialatedEye2 = -40; + public const short SleepyEye2 = -39; + public const short CataractEye2 = -38; + public const short BigTwiggyZombie = -37; + public const short SmallTwiggyZombie = -36; + public const short BigSwampZombie = -35; + public const short SmallSwampZombie = -34; + public const short BigSlimedZombie = -33; + public const short SmallSlimedZombie = -32; + public const short BigPincushionZombie = -31; + public const short SmallPincushionZombie = -30; + public const short BigBaldZombie = -29; + public const short SmallBaldZombie = -28; + public const short BigZombie = -27; + public const short SmallZombie = -26; + public const short BigCrimslime = -25; + public const short LittleCrimslime = -24; + public const short BigCrimera = -23; + public const short LittleCrimera = -22; + public const short GiantMossHornet = -21; + public const short BigMossHornet = -20; + public const short LittleMossHornet = -19; + public const short TinyMossHornet = -18; + public const short BigStinger = -17; + public const short LittleStinger = -16; + public const short HeavySkeleton = -15; + public const short BigBoned = -14; + public const short ShortBones = -13; + public const short BigEater = -12; + public const short LittleEater = -11; + public const short JungleSlime = -10; + public const short YellowSlime = -9; + public const short RedSlime = -8; + public const short PurpleSlime = -7; + public const short BlackSlime = -6; + public const short BabySlime = -5; + public const short Pinky = -4; + public const short GreenSlime = -3; + public const short Slimer2 = -2; + public const short Slimeling = -1; + public const short None = 0; + public const short BlueSlime = 1; + public const short DemonEye = 2; + public const short Zombie = 3; + public const short EyeofCthulhu = 4; + public const short ServantofCthulhu = 5; + public const short EaterofSouls = 6; + public const short DevourerHead = 7; + public const short DevourerBody = 8; + public const short DevourerTail = 9; + public const short GiantWormHead = 10; + public const short GiantWormBody = 11; + public const short GiantWormTail = 12; + public const short EaterofWorldsHead = 13; + public const short EaterofWorldsBody = 14; + public const short EaterofWorldsTail = 15; + public const short MotherSlime = 16; + public const short Merchant = 17; + public const short Nurse = 18; + public const short ArmsDealer = 19; + public const short Dryad = 20; + public const short Skeleton = 21; + public const short Guide = 22; + public const short MeteorHead = 23; + public const short FireImp = 24; + public const short BurningSphere = 25; + public const short GoblinPeon = 26; + public const short GoblinThief = 27; + public const short GoblinWarrior = 28; + public const short GoblinSorcerer = 29; + public const short ChaosBall = 30; + public const short AngryBones = 31; + public const short DarkCaster = 32; + public const short WaterSphere = 33; + public const short CursedSkull = 34; + public const short SkeletronHead = 35; + public const short SkeletronHand = 36; + public const short OldMan = 37; + public const short Demolitionist = 38; + public const short BoneSerpentHead = 39; + public const short BoneSerpentBody = 40; + public const short BoneSerpentTail = 41; + public const short Hornet = 42; + public const short ManEater = 43; + public const short UndeadMiner = 44; + public const short Tim = 45; + public const short Bunny = 46; + public const short CorruptBunny = 47; + public const short Harpy = 48; + public const short CaveBat = 49; + public const short KingSlime = 50; + public const short JungleBat = 51; + public const short DoctorBones = 52; + public const short TheGroom = 53; + public const short Clothier = 54; + public const short Goldfish = 55; + public const short Snatcher = 56; + public const short CorruptGoldfish = 57; + public const short Piranha = 58; + public const short LavaSlime = 59; + public const short Hellbat = 60; + public const short Vulture = 61; + public const short Demon = 62; + public const short BlueJellyfish = 63; + public const short PinkJellyfish = 64; + public const short Shark = 65; + public const short VoodooDemon = 66; + public const short Crab = 67; + public const short DungeonGuardian = 68; + public const short Antlion = 69; + public const short SpikeBall = 70; + public const short DungeonSlime = 71; + public const short BlazingWheel = 72; + public const short GoblinScout = 73; + public const short Bird = 74; + public const short Pixie = 75; + public const short None2 = 76; + public const short ArmoredSkeleton = 77; + public const short Mummy = 78; + public const short DarkMummy = 79; + public const short LightMummy = 80; + public const short CorruptSlime = 81; + public const short Wraith = 82; + public const short CursedHammer = 83; + public const short EnchantedSword = 84; + public const short Mimic = 85; + public const short Unicorn = 86; + public const short WyvernHead = 87; + public const short WyvernLegs = 88; + public const short WyvernBody = 89; + public const short WyvernBody2 = 90; + public const short WyvernBody3 = 91; + public const short WyvernTail = 92; + public const short GiantBat = 93; + public const short Corruptor = 94; + public const short DiggerHead = 95; + public const short DiggerBody = 96; + public const short DiggerTail = 97; + public const short SeekerHead = 98; + public const short SeekerBody = 99; + public const short SeekerTail = 100; + public const short Clinger = 101; + public const short AnglerFish = 102; + public const short GreenJellyfish = 103; + public const short Werewolf = 104; + public const short BoundGoblin = 105; + public const short BoundWizard = 106; + public const short GoblinTinkerer = 107; + public const short Wizard = 108; + public const short Clown = 109; + public const short SkeletonArcher = 110; + public const short GoblinArcher = 111; + public const short VileSpit = 112; + public const short WallofFlesh = 113; + public const short WallofFleshEye = 114; + public const short TheHungry = 115; + public const short TheHungryII = 116; + public const short LeechHead = 117; + public const short LeechBody = 118; + public const short LeechTail = 119; + public const short ChaosElemental = 120; + public const short Slimer = 121; + public const short Gastropod = 122; + public const short BoundMechanic = 123; + public const short Mechanic = 124; + public const short Retinazer = 125; + public const short Spazmatism = 126; + public const short SkeletronPrime = 127; + public const short PrimeCannon = 128; + public const short PrimeSaw = 129; + public const short PrimeVice = 130; + public const short PrimeLaser = 131; + public const short BaldZombie = 132; + public const short WanderingEye = 133; + public const short TheDestroyer = 134; + public const short TheDestroyerBody = 135; + public const short TheDestroyerTail = 136; + public const short IlluminantBat = 137; + public const short IlluminantSlime = 138; + public const short Probe = 139; + public const short PossessedArmor = 140; + public const short ToxicSludge = 141; + public const short SantaClaus = 142; + public const short SnowmanGangsta = 143; + public const short MisterStabby = 144; + public const short SnowBalla = 145; + public const short None3 = 146; + public const short IceSlime = 147; + public const short Penguin = 148; + public const short PenguinBlack = 149; + public const short IceBat = 150; + public const short Lavabat = 151; + public const short GiantFlyingFox = 152; + public const short GiantTortoise = 153; + public const short IceTortoise = 154; + public const short Wolf = 155; + public const short RedDevil = 156; + public const short Arapaima = 157; + public const short VampireBat = 158; + public const short Vampire = 159; + public const short Truffle = 160; + public const short ZombieEskimo = 161; + public const short Frankenstein = 162; + public const short BlackRecluse = 163; + public const short WallCreeper = 164; + public const short WallCreeperWall = 165; + public const short SwampThing = 166; + public const short UndeadViking = 167; + public const short CorruptPenguin = 168; + public const short IceElemental = 169; + public const short PigronCorruption = 170; + public const short PigronHallow = 171; + public const short RuneWizard = 172; + public const short Crimera = 173; + public const short Herpling = 174; + public const short AngryTrapper = 175; + public const short MossHornet = 176; + public const short Derpling = 177; + public const short Steampunker = 178; + public const short CrimsonAxe = 179; + public const short PigronCrimson = 180; + public const short FaceMonster = 181; + public const short FloatyGross = 182; + public const short Crimslime = 183; + public const short SpikedIceSlime = 184; + public const short SnowFlinx = 185; + public const short PincushionZombie = 186; + public const short SlimedZombie = 187; + public const short SwampZombie = 188; + public const short TwiggyZombie = 189; + public const short CataractEye = 190; + public const short SleepyEye = 191; + public const short DialatedEye = 192; + public const short GreenEye = 193; + public const short PurpleEye = 194; + public const short LostGirl = 195; + public const short Nymph = 196; + public const short ArmoredViking = 197; + public const short Lihzahrd = 198; + public const short LihzahrdCrawler = 199; + public const short FemaleZombie = 200; + public const short HeadacheSkeleton = 201; + public const short MisassembledSkeleton = 202; + public const short PantlessSkeleton = 203; + public const short SpikedJungleSlime = 204; + public const short Moth = 205; + public const short IcyMerman = 206; + public const short DyeTrader = 207; + public const short PartyGirl = 208; + public const short Cyborg = 209; + public const short Bee = 210; + public const short BeeSmall = 211; + public const short PirateDeckhand = 212; + public const short PirateCorsair = 213; + public const short PirateDeadeye = 214; + public const short PirateCrossbower = 215; + public const short PirateCaptain = 216; + public const short CochinealBeetle = 217; + public const short CyanBeetle = 218; + public const short LacBeetle = 219; + public const short SeaSnail = 220; + public const short Squid = 221; + public const short QueenBee = 222; + public const short ZombieRaincoat = 223; + public const short FlyingFish = 224; + public const short UmbrellaSlime = 225; + public const short FlyingSnake = 226; + public const short Painter = 227; + public const short WitchDoctor = 228; + public const short Pirate = 229; + public const short GoldfishWalker = 230; + public const short HornetFatty = 231; + public const short HornetHoney = 232; + public const short HornetLeafy = 233; + public const short HornetSpikey = 234; + public const short HornetStingy = 235; + public const short JungleCreeper = 236; + public const short JungleCreeperWall = 237; + public const short BlackRecluseWall = 238; + public const short BloodCrawler = 239; + public const short BloodCrawlerWall = 240; + public const short BloodFeeder = 241; + public const short BloodJelly = 242; + public const short IceGolem = 243; + public const short RainbowSlime = 244; + public const short Golem = 245; + public const short GolemHead = 246; + public const short GolemFistLeft = 247; + public const short GolemFistRight = 248; + public const short GolemHeadFree = 249; + public const short AngryNimbus = 250; + public const short Eyezor = 251; + public const short Parrot = 252; + public const short Reaper = 253; + public const short ZombieMushroom = 254; + public const short ZombieMushroomHat = 255; + public const short FungoFish = 256; + public const short AnomuraFungus = 257; + public const short MushiLadybug = 258; + public const short FungiBulb = 259; + public const short GiantFungiBulb = 260; + public const short FungiSpore = 261; + public const short Plantera = 262; + public const short PlanterasHook = 263; + public const short PlanterasTentacle = 264; + public const short Spore = 265; + public const short BrainofCthulhu = 266; + public const short Creeper = 267; + public const short IchorSticker = 268; + public const short RustyArmoredBonesAxe = 269; + public const short RustyArmoredBonesFlail = 270; + public const short RustyArmoredBonesSword = 271; + public const short RustyArmoredBonesSwordNoArmor = 272; + public const short BlueArmoredBones = 273; + public const short BlueArmoredBonesMace = 274; + public const short BlueArmoredBonesNoPants = 275; + public const short BlueArmoredBonesSword = 276; + public const short HellArmoredBones = 277; + public const short HellArmoredBonesSpikeShield = 278; + public const short HellArmoredBonesMace = 279; + public const short HellArmoredBonesSword = 280; + public const short RaggedCaster = 281; + public const short RaggedCasterOpenCoat = 282; + public const short Necromancer = 283; + public const short NecromancerArmored = 284; + public const short DiabolistRed = 285; + public const short DiabolistWhite = 286; + public const short BoneLee = 287; + public const short DungeonSpirit = 288; + public const short GiantCursedSkull = 289; + public const short Paladin = 290; + public const short SkeletonSniper = 291; + public const short TacticalSkeleton = 292; + public const short SkeletonCommando = 293; + public const short AngryBonesBig = 294; + public const short AngryBonesBigMuscle = 295; + public const short AngryBonesBigHelmet = 296; + public const short BirdBlue = 297; + public const short BirdRed = 298; + public const short Squirrel = 299; + public const short Mouse = 300; + public const short Raven = 301; + public const short SlimeMasked = 302; + public const short BunnySlimed = 303; + public const short HoppinJack = 304; + public const short Scarecrow1 = 305; + public const short Scarecrow2 = 306; + public const short Scarecrow3 = 307; + public const short Scarecrow4 = 308; + public const short Scarecrow5 = 309; + public const short Scarecrow6 = 310; + public const short Scarecrow7 = 311; + public const short Scarecrow8 = 312; + public const short Scarecrow9 = 313; + public const short Scarecrow10 = 314; + public const short HeadlessHorseman = 315; + public const short Ghost = 316; + public const short DemonEyeOwl = 317; + public const short DemonEyeSpaceship = 318; + public const short ZombieDoctor = 319; + public const short ZombieSuperman = 320; + public const short ZombiePixie = 321; + public const short SkeletonTopHat = 322; + public const short SkeletonAstonaut = 323; + public const short SkeletonAlien = 324; + public const short MourningWood = 325; + public const short Splinterling = 326; + public const short Pumpking = 327; + public const short PumpkingBlade = 328; + public const short Hellhound = 329; + public const short Poltergeist = 330; + public const short ZombieXmas = 331; + public const short ZombieSweater = 332; + public const short SlimeRibbonWhite = 333; + public const short SlimeRibbonYellow = 334; + public const short SlimeRibbonGreen = 335; + public const short SlimeRibbonRed = 336; + public const short BunnyXmas = 337; + public const short ZombieElf = 338; + public const short ZombieElfBeard = 339; + public const short ZombieElfGirl = 340; + public const short PresentMimic = 341; + public const short GingerbreadMan = 342; + public const short Yeti = 343; + public const short Everscream = 344; + public const short IceQueen = 345; + public const short SantaNK1 = 346; + public const short ElfCopter = 347; + public const short Nutcracker = 348; + public const short NutcrackerSpinning = 349; + public const short ElfArcher = 350; + public const short Krampus = 351; + public const short Flocko = 352; + public const short Stylist = 353; + public const short WebbedStylist = 354; + public const short Firefly = 355; + public const short Butterfly = 356; + public const short Worm = 357; + public const short LightningBug = 358; + public const short Snail = 359; + public const short GlowingSnail = 360; + public const short Frog = 361; + public const short Duck = 362; + public const short Duck2 = 363; + public const short DuckWhite = 364; + public const short DuckWhite2 = 365; + public const short ScorpionBlack = 366; + public const short Scorpion = 367; + public const short TravellingMerchant = 368; + public const short Angler = 369; + public const short DukeFishron = 370; + public const short DetonatingBubble = 371; + public const short Sharkron = 372; + public const short Sharkron2 = 373; + public const short TruffleWorm = 374; + public const short TruffleWormDigger = 375; + public const short SleepingAngler = 376; + public const short Grasshopper = 377; + public const short ChatteringTeethBomb = 378; + public const short CultistArcherBlue = 379; + public const short CultistArcherWhite = 380; + public const short BrainScrambler = 381; + public const short RayGunner = 382; + public const short MartianOfficer = 383; + public const short ForceBubble = 384; + public const short GrayGrunt = 385; + public const short MartianEngineer = 386; + public const short MartianTurret = 387; + public const short MartianDrone = 388; + public const short GigaZapper = 389; + public const short ScutlixRider = 390; + public const short Scutlix = 391; + public const short MartianSaucer = 392; + public const short MartianSaucerTurret = 393; + public const short MartianSaucerCannon = 394; + public const short MartianSaucerCore = 395; + public const short MoonLordHead = 396; + public const short MoonLordHand = 397; + public const short MoonLordCore = 398; + public const short MartianProbe = 399; + public const short MoonLordFreeEye = 400; + public const short MoonLordLeechBlob = 401; + public const short StardustWormHead = 402; + public const short StardustWormBody = 403; + public const short StardustWormTail = 404; + public const short StardustCellBig = 405; + public const short StardustCellSmall = 406; + public const short StardustJellyfishBig = 407; + public const short StardustJellyfishSmall = 408; + public const short StardustSpiderBig = 409; + public const short StardustSpiderSmall = 410; + public const short StardustSoldier = 411; + public const short SolarCrawltipedeHead = 412; + public const short SolarCrawltipedeBody = 413; + public const short SolarCrawltipedeTail = 414; + public const short SolarDrakomire = 415; + public const short SolarDrakomireRider = 416; + public const short SolarSroller = 417; + public const short SolarCorite = 418; + public const short SolarSolenian = 419; + public const short NebulaBrain = 420; + public const short NebulaHeadcrab = 421; + public const short NebulaBeast = 423; + public const short NebulaSoldier = 424; + public const short VortexRifleman = 425; + public const short VortexHornetQueen = 426; + public const short VortexHornet = 427; + public const short VortexLarva = 428; + public const short VortexSoldier = 429; + public const short ArmedZombie = 430; + public const short ArmedZombieEskimo = 431; + public const short ArmedZombiePincussion = 432; + public const short ArmedZombieSlimed = 433; + public const short ArmedZombieSwamp = 434; + public const short ArmedZombieTwiggy = 435; + public const short ArmedZombieCenx = 436; + public const short CultistTablet = 437; + public const short CultistDevote = 438; + public const short CultistBoss = 439; + public const short CultistBossClone = 440; + public const short GoldBird = 442; + public const short GoldBunny = 443; + public const short GoldButterfly = 444; + public const short GoldFrog = 445; + public const short GoldGrasshopper = 446; + public const short GoldMouse = 447; + public const short GoldWorm = 448; + public const short BoneThrowingSkeleton = 449; + public const short BoneThrowingSkeleton2 = 450; + public const short BoneThrowingSkeleton3 = 451; + public const short BoneThrowingSkeleton4 = 452; + public const short SkeletonMerchant = 453; + public const short CultistDragonHead = 454; + public const short CultistDragonBody1 = 455; + public const short CultistDragonBody2 = 456; + public const short CultistDragonBody3 = 457; + public const short CultistDragonBody4 = 458; + public const short CultistDragonTail = 459; + public const short Butcher = 460; + public const short CreatureFromTheDeep = 461; + public const short Fritz = 462; + public const short Nailhead = 463; + public const short CrimsonBunny = 464; + public const short CrimsonGoldfish = 465; + public const short Psycho = 466; + public const short DeadlySphere = 467; + public const short DrManFly = 468; + public const short ThePossessed = 469; + public const short CrimsonPenguin = 470; + public const short GoblinSummoner = 471; + public const short ShadowFlameApparition = 472; + public const short BigMimicCorruption = 473; + public const short BigMimicCrimson = 474; + public const short BigMimicHallow = 475; + public const short BigMimicJungle = 476; + public const short Mothron = 477; + public const short MothronEgg = 478; + public const short MothronSpawn = 479; + public const short Medusa = 480; + public const short GreekSkeleton = 481; + public const short GraniteGolem = 482; + public const short GraniteFlyer = 483; + public const short EnchantedNightcrawler = 484; + public const short Grubby = 485; + public const short Sluggy = 486; + public const short Buggy = 487; + public const short TargetDummy = 488; + public const short BloodZombie = 489; + public const short Drippler = 490; + public const short PirateShip = 491; + public const short PirateShipCannon = 492; + public const short LunarTowerStardust = 493; + public const short Crawdad = 494; + public const short Crawdad2 = 495; + public const short GiantShelly = 496; + public const short GiantShelly2 = 497; + public const short Salamander = 498; + public const short Salamander2 = 499; + public const short Salamander3 = 500; + public const short Salamander4 = 501; + public const short Salamander5 = 502; + public const short Salamander6 = 503; + public const short Salamander7 = 504; + public const short Salamander8 = 505; + public const short Salamander9 = 506; + public const short LunarTowerNebula = 507; + public const short LunarTowerVortex = 422; + public const short TaxCollector = 441; + public const short GiantWalkingAntlion = 508; + public const short GiantFlyingAntlion = 509; + public const short DuneSplicerHead = 510; + public const short DuneSplicerBody = 511; + public const short DuneSplicerTail = 512; + public const short TombCrawlerHead = 513; + public const short TombCrawlerBody = 514; + public const short TombCrawlerTail = 515; + public const short SolarFlare = 516; + public const short LunarTowerSolar = 517; + public const short SolarSpearman = 518; + public const short SolarGoop = 519; + public const short MartianWalker = 520; + public const short AncientCultistSquidhead = 521; + public const short AncientLight = 522; + public const short AncientDoom = 523; + public const short DesertGhoul = 524; + public const short DesertGhoulCorruption = 525; + public const short DesertGhoulCrimson = 526; + public const short DesertGhoulHallow = 527; + public const short DesertLamiaLight = 528; + public const short DesertLamiaDark = 529; + public const short DesertScorpionWalk = 530; + public const short DesertScorpionWall = 531; + public const short DesertBeast = 532; + public const short DesertDjinn = 533; + public const short DemonTaxCollector = 534; + public const short SlimeSpiked = 535; + public const short TheBride = 536; + public const short SandSlime = 537; + public const short SquirrelRed = 538; + public const short SquirrelGold = 539; + public const short PartyBunny = 540; + public const short SandElemental = 541; + public const short SandShark = 542; + public const short SandsharkCorrupt = 543; + public const short SandsharkCrimson = 544; + public const short SandsharkHallow = 545; + public const short Tumbleweed = 546; + public const short DD2AttackerTest = 547; + public const short DD2EterniaCrystal = 548; + public const short DD2LanePortal = 549; + public const short DD2Bartender = 550; + public const short DD2Betsy = 551; + public const short DD2GoblinT1 = 552; + public const short DD2GoblinT2 = 553; + public const short DD2GoblinT3 = 554; + public const short DD2GoblinBomberT1 = 555; + public const short DD2GoblinBomberT2 = 556; + public const short DD2GoblinBomberT3 = 557; + public const short DD2WyvernT1 = 558; + public const short DD2WyvernT2 = 559; + public const short DD2WyvernT3 = 560; + public const short DD2JavelinstT1 = 561; + public const short DD2JavelinstT2 = 562; + public const short DD2JavelinstT3 = 563; + public const short DD2DarkMageT1 = 564; + public const short DD2DarkMageT3 = 565; + public const short DD2SkeletonT1 = 566; + public const short DD2SkeletonT3 = 567; + public const short DD2WitherBeastT2 = 568; + public const short DD2WitherBeastT3 = 569; + public const short DD2DrakinT2 = 570; + public const short DD2DrakinT3 = 571; + public const short DD2KoboldWalkerT2 = 572; + public const short DD2KoboldWalkerT3 = 573; + public const short DD2KoboldFlyerT2 = 574; + public const short DD2KoboldFlyerT3 = 575; + public const short DD2OgreT2 = 576; + public const short DD2OgreT3 = 577; + public const short DD2LightningBugT3 = 578; + public const short BartenderUnconscious = 579; + public const short WalkingAntlion = 580; + public const short FlyingAntlion = 581; + public const short LarvaeAntlion = 582; + public const short FairyCritterPink = 583; + public const short FairyCritterGreen = 584; + public const short FairyCritterBlue = 585; + public const short ZombieMerman = 586; + public const short EyeballFlyingFish = 587; + public const short Golfer = 588; + public const short GolferRescue = 589; + public const short TorchZombie = 590; + public const short ArmedTorchZombie = 591; + public const short GoldGoldfish = 592; + public const short GoldGoldfishWalker = 593; + public const short WindyBalloon = 594; + public const short BlackDragonfly = 595; + public const short BlueDragonfly = 596; + public const short GreenDragonfly = 597; + public const short OrangeDragonfly = 598; + public const short RedDragonfly = 599; + public const short YellowDragonfly = 600; + public const short GoldDragonfly = 601; + public const short Seagull = 602; + public const short Seagull2 = 603; + public const short LadyBug = 604; + public const short GoldLadyBug = 605; + public const short Maggot = 606; + public const short Pupfish = 607; + public const short Grebe = 608; + public const short Grebe2 = 609; + public const short Rat = 610; + public const short Owl = 611; + public const short WaterStrider = 612; + public const short GoldWaterStrider = 613; + public const short ExplosiveBunny = 614; + public const short Dolphin = 615; + public const short Turtle = 616; + public const short TurtleJungle = 617; + public const short BloodNautilus = 618; + public const short BloodSquid = 619; + public const short GoblinShark = 620; + public const short BloodEelHead = 621; + public const short BloodEelBody = 622; + public const short BloodEelTail = 623; + public const short Gnome = 624; + public const short SeaTurtle = 625; + public const short Seahorse = 626; + public const short GoldSeahorse = 627; + public const short Dandelion = 628; + public const short IceMimic = 629; + public const short BloodMummy = 630; + public const short RockGolem = 631; + public const short MaggotZombie = 632; + public const short BestiaryGirl = 633; + public const short SporeBat = 634; + public const short SporeSkeleton = 635; + public const short HallowBoss = 636; + public const short TownCat = 637; + public const short TownDog = 638; + public const short GemSquirrelAmethyst = 639; + public const short GemSquirrelTopaz = 640; + public const short GemSquirrelSapphire = 641; + public const short GemSquirrelEmerald = 642; + public const short GemSquirrelRuby = 643; + public const short GemSquirrelDiamond = 644; + public const short GemSquirrelAmber = 645; + public const short GemBunnyAmethyst = 646; + public const short GemBunnyTopaz = 647; + public const short GemBunnySapphire = 648; + public const short GemBunnyEmerald = 649; + public const short GemBunnyRuby = 650; + public const short GemBunnyDiamond = 651; + public const short GemBunnyAmber = 652; + public const short HellButterfly = 653; + public const short Lavafly = 654; + public const short MagmaSnail = 655; + public const short TownBunny = 656; + public const short QueenSlimeBoss = 657; + public const short QueenSlimeMinionBlue = 658; + public const short QueenSlimeMinionPink = 659; + public const short QueenSlimeMinionPurple = 660; + public const short EmpressButterfly = 661; + public const short PirateGhost = 662; + public const short Count = 663; + + public static int FromLegacyName(string name) + { + int num; + return NPCID.LegacyNameToIdMap.TryGetValue(name, out num) ? num : 0; + } + + public static int FromNetId(int id) => id < 0 ? NPCID.NetIdMap[-id - 1] : id; + + public static class Sets + { + public static SetFactory Factory = new SetFactory(663); + public static Dictionary SpecialSpawningRules = new Dictionary() + { + { + 259, + 0 + }, + { + 260, + 0 + }, + { + 175, + 0 + }, + { + 43, + 0 + }, + { + 56, + 0 + }, + { + 101, + 0 + } + }; + public static Dictionary NPCBestiaryDrawOffset = NPCID.Sets.NPCBestiaryDrawOffsetCreation(); + public static List NormalGoldCritterBestiaryPriority = new List() + { + 46, + 540, + 614, + 303, + 337, + 443, + 74, + 297, + 298, + 442, + 55, + 230, + 592, + 593, + 299, + 538, + 539, + 300, + 447, + 361, + 445, + 377, + 446, + 356, + 444, + 357, + 448, + 595, + 596, + 597, + 598, + 599, + 600, + 601, + 626, + 627, + 612, + 613, + 604, + 605 + }; + public static List BossBestiaryPriority = new List() + { + 4, + 5, + 50, + 535, + 13, + 14, + 15, + 266, + 267, + 35, + 36, + 222, + 113, + 114, + 117, + 115, + 116, + 657, + 658, + 659, + 660, + 125, + 126, + 134, + 135, + 136, + 139, + (int) sbyte.MaxValue, + 128, + 131, + 129, + 130, + 262, + 263, + 264, + 636, + 245, + 246, + 249, + 247, + 248, + 370, + 372, + 373, + 439, + 438, + 379, + 380, + 440, + 521, + 454, + 507, + 517, + 422, + 493, + 398, + 396, + 397, + 400, + 401 + }; + public static List TownNPCBestiaryPriority = new List() + { + 22, + 17, + 18, + 38, + 369, + 20, + 19, + 207, + 227, + 353, + 633, + 550, + 588, + 107, + 228, + 124, + 54, + 108, + 178, + 229, + 160, + 441, + 209, + 208, + 142, + 637, + 638, + 656, + 368, + 453, + 37 + }; + public static bool[] DontDoHardmodeScaling = NPCID.Sets.Factory.CreateBoolSet(5, 13, 14, 15, 267, 113, 114, 115, 116, 117, 118, 119, 658, 659, 660, 400); + public static bool[] IsTownPet = NPCID.Sets.Factory.CreateBoolSet(637, 638, 656); + public static List GoldCrittersCollection = new List() + { + 443, + 442, + 592, + 444, + 601, + 445, + 446, + 605, + 447, + 627, + 613, + 448, + 539 + }; + public static bool[] CantTakeLunchMoney = NPCID.Sets.Factory.CreateBoolSet(394, 393, 392, 492, 491, 662, 384, 478, 658, 659, 660, 128, 131, 129, 130, 139, 267, 247, 248, 246, 249, 245, 397, 396, 401, 400, 440, 68); + public static Dictionary RespawnEnemyID = new Dictionary() + { + { + 492, + 0 + }, + { + 491, + 0 + }, + { + 394, + 0 + }, + { + 393, + 0 + }, + { + 392, + 0 + }, + { + 13, + 0 + }, + { + 14, + 0 + }, + { + 15, + 0 + }, + { + 412, + 0 + }, + { + 413, + 0 + }, + { + 414, + 0 + }, + { + 134, + 0 + }, + { + 135, + 0 + }, + { + 136, + 0 + }, + { + 454, + 0 + }, + { + 455, + 0 + }, + { + 456, + 0 + }, + { + 457, + 0 + }, + { + 458, + 0 + }, + { + 459, + 0 + }, + { + 8, + 7 + }, + { + 9, + 7 + }, + { + 11, + 10 + }, + { + 12, + 10 + }, + { + 40, + 39 + }, + { + 41, + 39 + }, + { + 96, + 95 + }, + { + 97, + 95 + }, + { + 99, + 98 + }, + { + 100, + 98 + }, + { + 88, + 87 + }, + { + 89, + 87 + }, + { + 90, + 87 + }, + { + 91, + 87 + }, + { + 92, + 87 + }, + { + 118, + 117 + }, + { + 119, + 117 + }, + { + 514, + 513 + }, + { + 515, + 513 + }, + { + 511, + 510 + }, + { + 512, + 510 + }, + { + 622, + 621 + }, + { + 623, + 621 + } + }; + public static int[] TrailingMode = NPCID.Sets.Factory.CreateIntSet(-1, 439, 0, 440, 0, 370, 1, 372, 1, 373, 1, 396, 1, 400, 1, 401, 1, 473, 2, 474, 2, 475, 2, 476, 2, 4, 3, 471, 3, 477, 3, 479, 3, 120, 4, 137, 4, 138, 4, 94, 5, 125, 6, 126, 6, (int) sbyte.MaxValue, 6, 128, 6, 129, 6, 130, 6, 131, 6, 139, 6, 140, 6, 407, 6, 420, 6, 425, 6, 427, 6, 426, 6, 581, 6, 516, 6, 542, 6, 543, 6, 544, 6, 545, 6, 402, 7, 417, 7, 419, 7, 418, 7, 574, 7, 575, 7, 519, 7, 521, 7, 522, 7, 546, 7, 558, 7, 559, 7, 560, 7, 551, 7, 620, 7, 657, 6, 636, 7); + public static bool[] IsDragonfly = NPCID.Sets.Factory.CreateBoolSet(595, 596, 597, 598, 599, 600, 601); + public static bool[] BelongsToInvasionOldOnesArmy = NPCID.Sets.Factory.CreateBoolSet(552, 553, 554, 561, 562, 563, 555, 556, 557, 558, 559, 560, 576, 577, 568, 569, 566, 567, 570, 571, 572, 573, 548, 549, 564, 565, 574, 575, 551, 578); + public static bool[] TeleportationImmune = NPCID.Sets.Factory.CreateBoolSet(552, 553, 554, 561, 562, 563, 555, 556, 557, 558, 559, 560, 576, 577, 568, 569, 566, 567, 570, 571, 572, 573, 548, 549, 564, 565, 574, 575, 551, 578); + public static bool[] UsesNewTargetting = NPCID.Sets.Factory.CreateBoolSet(547, 552, 553, 554, 561, 562, 563, 555, 556, 557, 558, 559, 560, 576, 577, 568, 569, 566, 567, 570, 571, 572, 573, 564, 565, 574, 575, 551, 578, 210, 211, 620); + public static bool[] TakesDamageFromHostilesWithoutBeingFriendly = NPCID.Sets.Factory.CreateBoolSet(46, 55, 74, 148, 149, 230, 297, 298, 299, 303, 355, 356, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 377, 357, 374, 442, 443, 444, 445, 446, 448, 538, 539, 337, 540, 484, 485, 486, 487, 592, 593, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 611, 612, 613, 614, 615, 616, 617, 625, 626, 627, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 583, 584, 585); + public static bool[] AllNPCs = NPCID.Sets.Factory.CreateBoolSet(true); + public static bool[] HurtingBees = NPCID.Sets.Factory.CreateBoolSet(210, 211, 222); + public static bool[] FighterUsesDD2PortalAppearEffect = NPCID.Sets.Factory.CreateBoolSet(552, 553, 554, 561, 562, 563, 555, 556, 557, 576, 577, 568, 569, 570, 571, 572, 573, 564, 565); + public static float[] StatueSpawnedDropRarity = NPCID.Sets.Factory.CreateCustomSet(-1f, (object) (short) 480, (object) 0.05f, (object) (short) 82, (object) 0.05f, (object) (short) 86, (object) 0.05f, (object) (short) 48, (object) 0.05f, (object) (short) 490, (object) 0.05f, (object) (short) 489, (object) 0.05f, (object) (short) 170, (object) 0.05f, (object) (short) 180, (object) 0.05f, (object) (short) 171, (object) 0.05f, (object) (short) 167, (object) 0.25f, (object) (short) 73, (object) 0.01f, (object) (short) 24, (object) 0.05f, (object) (short) 481, (object) 0.05f, (object) (short) 42, (object) 0.05f, (object) (short) 6, (object) 0.05f, (object) (short) 2, (object) 0.05f, (object) (short) 49, (object) 0.2f, (object) (short) 3, (object) 0.2f, (object) (short) 58, (object) 0.2f, (object) (short) 21, (object) 0.2f, (object) (short) 65, (object) 0.2f, (object) (short) 449, (object) 0.2f, (object) (short) 482, (object) 0.2f, (object) (short) 103, (object) 0.2f, (object) (short) 64, (object) 0.2f, (object) (short) 63, (object) 0.2f, (object) (short) 85, (object) 0.0f); + public static bool[] NoEarlymodeLootWhenSpawnedFromStatue = NPCID.Sets.Factory.CreateBoolSet(480, 82, 86, 170, 180, 171); + public static bool[] NeedsExpertScaling = NPCID.Sets.Factory.CreateBoolSet(25, 30, 33, 112, 261, 265, 371, 516, 519, 522, 397, 396, 398, 491); + public static bool[] ProjectileNPC = NPCID.Sets.Factory.CreateBoolSet(25, 30, 33, 112, 261, 265, 371, 516, 519, 522); + public static bool[] SavesAndLoads = NPCID.Sets.Factory.CreateBoolSet(422, 507, 517, 493); + public static int[] TrailCacheLength = NPCID.Sets.Factory.CreateIntSet(10, 402, 36, 519, 20, 522, 20, 620, 20); + public static bool[] NoMultiplayerSmoothingByType = NPCID.Sets.Factory.CreateBoolSet(113, 114, 50, 657, 120, 245, 247, 248, 246, 370, 222); + public static bool[] NoMultiplayerSmoothingByAI = NPCID.Sets.Factory.CreateBoolSet(6, 8, 37); + public static bool[] MPAllowedEnemies = NPCID.Sets.Factory.CreateBoolSet(4, 13, 50, 126, 125, 134, (int) sbyte.MaxValue, 128, 131, 129, 130, 222, 245, 266, 370, 657); + public static bool[] TownCritter = NPCID.Sets.Factory.CreateBoolSet(46, 148, 149, 230, 299, 300, 303, 337, 361, 362, 364, 366, 367, 443, 445, 447, 538, 539, 540, 583, 584, 585, 592, 593, 602, 607, 608, 610, 616, 617, 625, 626, 627, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652); + public static bool[] CountsAsCritter = NPCID.Sets.Factory.CreateBoolSet(46, 303, 337, 540, 443, 74, 297, 298, 442, 611, 377, 446, 612, 613, 356, 444, 595, 596, 597, 598, 599, 600, 601, 604, 605, 357, 448, 374, 484, 355, 358, 606, 359, 360, 485, 486, 487, 148, 149, 55, 230, 592, 593, 299, 538, 539, 300, 447, 361, 445, 362, 363, 364, 365, 367, 366, 583, 584, 585, 602, 603, 607, 608, 609, 610, 616, 617, 625, 626, 627, 615, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 661); + public static bool[] HasNoPartyText = NPCID.Sets.Factory.CreateBoolSet(441, 453); + public static int[] HatOffsetY = NPCID.Sets.Factory.CreateIntSet(0, 227, 4, 107, 2, 108, 2, 229, 4, 17, 2, 38, 8, 160, -10, 208, 2, 142, 2, 124, 2, 453, 2, 37, 4, 54, 4, 209, 4, 369, 6, 441, 6, 353, -2, 633, -2, 550, -2, 588, 2, 637, 0, 638, 0, 656, 4); + public static int[] FaceEmote = NPCID.Sets.Factory.CreateIntSet(0, 17, 101, 18, 102, 19, 103, 20, 104, 22, 105, 37, 106, 38, 107, 54, 108, 107, 109, 108, 110, 124, 111, 142, 112, 160, 113, 178, 114, 207, 115, 208, 116, 209, 117, 227, 118, 228, 119, 229, 120, 353, 121, 368, 122, 369, 123, 453, 124, 441, 125, 588, 140, 633, 141); + public static int[] ExtraFramesCount = NPCID.Sets.Factory.CreateIntSet(0, 17, 9, 18, 9, 19, 9, 20, 7, 22, 10, 37, 5, 38, 9, 54, 7, 107, 9, 108, 7, 124, 9, 142, 9, 160, 7, 178, 9, 207, 9, 208, 9, 209, 10, 227, 9, 228, 10, 229, 10, 353, 9, 633, 9, 368, 10, 369, 9, 453, 9, 441, 9, 550, 9, 588, 9, 637, 18, 638, 11, 656, 20); + public static int[] AttackFrameCount = NPCID.Sets.Factory.CreateIntSet(0, 17, 4, 18, 4, 19, 4, 20, 2, 22, 5, 37, 0, 38, 4, 54, 2, 107, 4, 108, 2, 124, 4, 142, 4, 160, 2, 178, 4, 207, 4, 208, 4, 209, 5, 227, 4, 228, 5, 229, 5, 353, 4, 633, 4, 368, 5, 369, 4, 453, 4, 441, 4, 550, 4, 588, 4, 637, 0, 638, 0, 656, 0); + public static int[] DangerDetectRange = NPCID.Sets.Factory.CreateIntSet(-1, 38, 300, 17, 320, 107, 300, 19, 900, 22, 700, 124, 800, 228, 800, 178, 900, 18, 300, 229, 1000, 209, 1000, 54, 700, 108, 700, 160, 700, 20, 1200, 369, 300, 453, 300, 368, 900, 207, 60, 227, 800, 208, 400, 142, 500, 441, 50, 353, 60, 633, 100, 550, 120, 588, 120, 638, 250, 637, 250, 656, 250); + public static int[] AttackTime = NPCID.Sets.Factory.CreateIntSet(-1, 38, 34, 17, 34, 107, 60, 19, 40, 22, 30, 124, 34, 228, 40, 178, 24, 18, 34, 229, 60, 209, 60, 54, 60, 108, 30, 160, 60, 20, 600, 369, 34, 453, 34, 368, 60, 207, 15, 227, 60, 208, 34, 142, 34, 441, 15, 353, 12, 633, 12, 550, 34, 588, 20, 638, -1, 637, -1, 656, -1); + public static int[] AttackAverageChance = NPCID.Sets.Factory.CreateIntSet(1, 38, 40, 17, 30, 107, 60, 19, 30, 22, 30, 124, 30, 228, 50, 178, 50, 18, 60, 229, 40, 209, 30, 54, 30, 108, 30, 160, 60, 20, 60, 369, 50, 453, 30, 368, 40, 207, 1, 227, 30, 208, 50, 142, 50, 441, 1, 353, 1, 633, 1, 550, 40, 588, 20, 638, 1, 637, 1, 656, 1); + public static int[] AttackType = NPCID.Sets.Factory.CreateIntSet(-1, 38, 0, 17, 0, 107, 0, 19, 1, 22, 1, 124, 0, 228, 1, 178, 1, 18, 0, 229, 1, 209, 1, 54, 2, 108, 2, 160, 2, 20, 2, 369, 0, 453, 0, 368, 1, 207, 3, 227, 1, 208, 0, 142, 0, 441, 3, 353, 3, 633, 0, 550, 0, 588, 0, 638, -1, 637, -1, 656, -1); + public static int[] PrettySafe = NPCID.Sets.Factory.CreateIntSet(-1, 19, 300, 22, 200, 124, 200, 228, 300, 178, 300, 229, 300, 209, 300, 54, 100, 108, 100, 160, 100, 20, 200, 368, 200, 227, 200); + public static Color[] MagicAuraColor = NPCID.Sets.Factory.CreateCustomSet(Color.White, (object) (short) 54, (object) new Color(100, 4, 227, (int) sbyte.MaxValue), (object) (short) 108, (object) new Color((int) byte.MaxValue, 80, 60, (int) sbyte.MaxValue), (object) (short) 160, (object) new Color(40, 80, (int) byte.MaxValue, (int) sbyte.MaxValue), (object) (short) 20, (object) new Color(40, (int) byte.MaxValue, 80, (int) sbyte.MaxValue)); + public static bool[] DemonEyes = NPCID.Sets.Factory.CreateBoolSet(2, 190, 192, 193, 191, 194, 317, 318); + public static bool[] Zombies = NPCID.Sets.Factory.CreateBoolSet(3, 132, 186, 187, 188, 189, 200, 223, 161, 254, (int) byte.MaxValue, 52, 53, 536, 319, 320, 321, 332, 436, 431, 432, 433, 434, 435, 331, 430, 590); + public static bool[] Skeletons = NPCID.Sets.Factory.CreateBoolSet(77, 449, 450, 451, 452, 481, 201, 202, 203, 21, 324, 110, 323, 293, 291, 322, 292, 197, 167, 44, 635); + public static int[] BossHeadTextures = NPCID.Sets.Factory.CreateIntSet(-1, 4, 0, 13, 2, 344, 3, 370, 4, 246, 5, 249, 5, 345, 6, 50, 7, 396, 8, 395, 9, 325, 10, 262, 11, 327, 13, 222, 14, 125, 15, 126, 20, 346, 17, (int) sbyte.MaxValue, 18, 35, 19, 68, 19, 113, 22, 266, 23, 439, 24, 440, 24, 134, 25, 491, 26, 517, 27, 422, 28, 507, 29, 493, 30, 549, 35, 564, 32, 565, 32, 576, 33, 577, 33, 551, 34, 548, 36, 636, 37, 657, 38); + public static bool[] PositiveNPCTypesExcludedFromDeathTally = NPCID.Sets.Factory.CreateBoolSet(121, 384, 406, 478, 479, 410); + public static bool[] ShouldBeCountedAsBoss = NPCID.Sets.Factory.CreateBoolSet(false, 517, 422, 507, 493, 13); + public static bool[] DangerThatPreventsOtherDangers = NPCID.Sets.Factory.CreateBoolSet(517, 422, 507, 493, 399); + public static bool[] MustAlwaysDraw = NPCID.Sets.Factory.CreateBoolSet(113, 114, 115, 116, 126, 125); + public static int[] ExtraTextureCount = NPCID.Sets.Factory.CreateIntSet(0, 38, 1, 17, 1, 107, 0, 19, 0, 22, 0, 124, 1, 228, 0, 178, 1, 18, 1, 229, 1, 209, 1, 54, 1, 108, 1, 160, 0, 20, 0, 369, 1, 453, 1, 368, 1, 207, 1, 227, 1, 208, 0, 142, 1, 441, 1, 353, 1, 633, 1, 550, 0, 588, 1, 633, 2, 638, 0, 637, 0, 656, 0); + public static int[] NPCFramingGroup = NPCID.Sets.Factory.CreateIntSet(0, 18, 1, 20, 1, 208, 1, 178, 1, 124, 1, 353, 1, 633, 1, 369, 2, 160, 3, 637, 4, 638, 5, 656, 6); + public static int[][] TownNPCsFramingGroups = new int[7][] + { + new int[26] + { + 0, + 0, + 0, + -2, + -2, + -2, + 0, + 0, + 0, + 0, + -2, + -2, + -2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + }, + new int[25] + { + 0, + 0, + 0, + -2, + -2, + -2, + 0, + 0, + 0, + -2, + -2, + -2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + }, + new int[25] + { + 0, + 0, + 0, + -2, + -2, + -2, + 0, + 0, + -2, + -2, + -2, + -2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + }, + new int[23] + { + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -2, + -2, + -2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 6 + }, + new int[28] + { + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 2, + 4, + 6, + 4, + 2, + 2, + -2, + -4, + -6, + -4, + -2, + -4, + -4, + -6, + -6, + -6, + -4 + }, + new int[28] + { + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + -2, + -2, + -2, + 0, + 0, + -2, + -2, + 0, + 0, + 4, + 6, + 6, + 6, + 6, + 4, + 4, + 4, + 4, + 4, + 4 + }, + new int[26] + { + 0, + 0, + -2, + -4, + -4, + -2, + 0, + -2, + 0, + 0, + 2, + 4, + 6, + 4, + 2, + 0, + -2, + -4, + -6, + -6, + -6, + -6, + -6, + -6, + -4, + -2 + } + }; + + public static Dictionary NPCBestiaryDrawOffsetCreation() + { + Dictionary redigitEntries = NPCID.Sets.GetRedigitEntries(); + Dictionary leinforsEntries = NPCID.Sets.GetLeinforsEntries(); + Dictionary groxEntries = NPCID.Sets.GetGroxEntries(); + Dictionary dictionary = new Dictionary(); + foreach (KeyValuePair keyValuePair in groxEntries) + dictionary[keyValuePair.Key] = keyValuePair.Value; + foreach (KeyValuePair keyValuePair in leinforsEntries) + dictionary[keyValuePair.Key] = keyValuePair.Value; + foreach (KeyValuePair keyValuePair in redigitEntries) + dictionary[keyValuePair.Key] = keyValuePair.Value; + return dictionary; + } + + private static Dictionary GetRedigitEntries() + { + Dictionary dictionary = new Dictionary(); + NPCID.Sets.NPCBestiaryDrawModifiers bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(430, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(431, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(432, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(433, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(434, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(435, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(436, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(591, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(449, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(450, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(451, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(452, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(595, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(596, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(597, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(598, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(600, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(495, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(497, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(498, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(500, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(501, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(502, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(503, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(504, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(505, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(506, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(230, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(593, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(158, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-2, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(440, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(568, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(566, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(576, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(558, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(559, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(552, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(553, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(564, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(570, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(555, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(556, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(574, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(561, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(562, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(572, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(535, bestiaryDrawModifiers); + return dictionary; + } + + private static Dictionary GetGroxEntries() => new Dictionary(); + + private static Dictionary GetLeinforsEntries() + { + Dictionary dictionary = new Dictionary(); + NPCID.Sets.NPCBestiaryDrawModifiers bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-65, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-64, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-63, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-62, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, 4f); + bestiaryDrawModifiers.Scale = 1.1f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-61, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(1f, 3f); + bestiaryDrawModifiers.Scale = 0.9f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-60, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-59, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-58, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-57, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-56, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 1.1f; + dictionary.Add(-55, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 0.9f; + dictionary.Add(-54, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 1.1f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-53, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 0.9f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-52, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 1.1f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-51, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 0.9f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-50, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 1.1f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-49, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 0.9f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-48, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 1.1f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-47, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 0.9f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-46, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 1.1f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-45, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 0.9f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-44, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, -15f); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-43, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, -15f); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-42, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, -15f); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-41, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, -15f); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-40, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, -15f); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-39, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, -15f); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-38, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 1.1f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-37, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 0.9f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-36, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 1.1f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-35, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 0.9f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-34, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 1.1f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-33, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 0.9f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-32, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 1.1f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-31, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 0.9f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-30, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 1.1f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-29, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 0.9f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-28, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 1.1f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-27, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 0.9f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-26, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, -9f); + bestiaryDrawModifiers.Rotation = 0.75f; + bestiaryDrawModifiers.Scale = 1.2f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-23, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, -9f); + bestiaryDrawModifiers.Rotation = 0.75f; + bestiaryDrawModifiers.Scale = 0.8f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-22, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-25, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-24, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, 5f); + bestiaryDrawModifiers.Scale = 1.2f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-21, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, 4f); + bestiaryDrawModifiers.Scale = 1.1f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-20, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(1f, 3f); + bestiaryDrawModifiers.Scale = 0.9f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-19, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 2f); + bestiaryDrawModifiers.Scale = 0.8f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-18, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 3f); + bestiaryDrawModifiers.Scale = 1.2f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-17, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, 3f); + bestiaryDrawModifiers.Scale = 0.8f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-16, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 1.2f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-15, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 1.1f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-14, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Scale = 0.9f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-13, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, -9f); + bestiaryDrawModifiers.Rotation = 0.75f; + bestiaryDrawModifiers.Scale = 1.2f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-12, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, -9f); + bestiaryDrawModifiers.Rotation = 0.75f; + bestiaryDrawModifiers.Scale = 0.8f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(-11, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(6f, -15f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-35f); + dictionary.Add(2, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(2f); + dictionary.Add(3, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(25f, -30f); + bestiaryDrawModifiers.Rotation = 0.7f; + bestiaryDrawModifiers.Frame = new int?(4); + dictionary.Add(4, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(3f, 4f); + bestiaryDrawModifiers.Rotation = 1.5f; + dictionary.Add(5, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, -9f); + bestiaryDrawModifiers.Rotation = 0.75f; + dictionary.Add(6, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_7"; + bestiaryDrawModifiers.Position = new Vector2(20f, 29f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(10f); + dictionary.Add(7, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(8, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(9, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_10"; + bestiaryDrawModifiers.Position = new Vector2(2f, 24f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(10f); + dictionary.Add(10, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(11, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(12, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_13"; + bestiaryDrawModifiers.Position = new Vector2(40f, 22f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(10f); + dictionary.Add(13, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(14, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(15, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(17, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(2f); + dictionary.Add(18, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(19, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(2f); + dictionary.Add(20, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(22, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(25, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(26, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(27, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(28, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(30, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(31, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(33, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Direction = new int?(1); + dictionary.Add(34, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(21, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, -12f); + bestiaryDrawModifiers.Scale = 0.9f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(-1f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-3f); + dictionary.Add(35, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(36, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(38, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(37, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_39"; + bestiaryDrawModifiers.Position = new Vector2(40f, 23f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(10f); + dictionary.Add(39, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(40, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(41, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(4f, -6f); + bestiaryDrawModifiers.Rotation = 2.356194f; + dictionary.Add(43, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(44, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(46, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(47, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, -14f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-30f); + dictionary.Add(48, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, -13f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-30f); + dictionary.Add(49, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 90f); + bestiaryDrawModifiers.PortraitScale = new float?(1.1f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(70f); + dictionary.Add(50, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, -13f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-30f); + dictionary.Add(51, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(52, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(53, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(54, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 6f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(7f); + bestiaryDrawModifiers.IsWet = true; + dictionary.Add(55, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(4f, -6f); + bestiaryDrawModifiers.Rotation = 2.356194f; + dictionary.Add(56, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 6f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(6f); + bestiaryDrawModifiers.IsWet = true; + dictionary.Add(57, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 6f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(6f); + bestiaryDrawModifiers.IsWet = true; + dictionary.Add(58, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, -19f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-36f); + dictionary.Add(60, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 0.05f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-15f); + dictionary.Add(61, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, -10f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-25f); + dictionary.Add(62, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(35f, 4f); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(5f); + bestiaryDrawModifiers.IsWet = true; + dictionary.Add(65, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, -6f); + bestiaryDrawModifiers.Scale = 0.9f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-15f); + dictionary.Add(66, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-1f, -12f); + bestiaryDrawModifiers.Scale = 0.9f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-3f); + dictionary.Add(68, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(70, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(72, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(73, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(1f, -14f); + bestiaryDrawModifiers.Velocity = 0.05f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-30f); + dictionary.Add(74, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 6f); + dictionary.Add(75, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(76, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(77, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 0.5f; + dictionary.Add(78, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 0.5f; + dictionary.Add(79, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 0.5f; + dictionary.Add(80, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-4f, -4f); + bestiaryDrawModifiers.Scale = 0.9f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-25f); + dictionary.Add(83, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(6f, -11f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-28f); + dictionary.Add(84, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(20f, 6f); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(2f); + dictionary.Add(86, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_87"; + bestiaryDrawModifiers.Position = new Vector2(55f, 15f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(4f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(10f); + dictionary.Add(87, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(88, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(89, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(90, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(91, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(92, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(4f, -11f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-30f); + dictionary.Add(93, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(8f, 0.0f); + bestiaryDrawModifiers.Rotation = 0.75f; + dictionary.Add(94, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_95"; + bestiaryDrawModifiers.Position = new Vector2(20f, 28f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(10f); + dictionary.Add(95, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(96, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(97, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_98"; + bestiaryDrawModifiers.Position = new Vector2(40f, 24f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(12f); + dictionary.Add(98, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(99, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(100, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-2f, 6f); + bestiaryDrawModifiers.Rotation = 2.356194f; + dictionary.Add(101, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 6f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(6f); + bestiaryDrawModifiers.IsWet = true; + dictionary.Add(102, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(104, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(105, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(106, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(107, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(108, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 35f); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + dictionary.Add(109, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 3f; + dictionary.Add(110, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 3f; + dictionary.Add(111, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(112, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_113"; + bestiaryDrawModifiers.Position = new Vector2(56f, 5f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(10f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + dictionary.Add(113, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(114, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_115"; + bestiaryDrawModifiers.Position = new Vector2(56f, 3f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(55f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + dictionary.Add(115, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(3f, -5f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(4f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-26f); + dictionary.Add(116, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_117"; + bestiaryDrawModifiers.Position = new Vector2(10f, 20f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + dictionary.Add(117, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(118, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(119, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(120, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(123, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(2f); + dictionary.Add(124, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-2f, -4f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-20f); + dictionary.Add(121, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 4f); + dictionary.Add(122, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-28f, -23f); + bestiaryDrawModifiers.Rotation = -0.75f; + dictionary.Add(125, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(28f, 30f); + bestiaryDrawModifiers.Rotation = 2.25f; + dictionary.Add(126, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_127"; + bestiaryDrawModifiers.Position = new Vector2(0.0f, 0.0f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(1f); + dictionary.Add((int) sbyte.MaxValue, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-6f, -2f); + bestiaryDrawModifiers.Rotation = -0.75f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(128, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(4f, 4f); + bestiaryDrawModifiers.Rotation = 0.75f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(129, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(6f, 8f); + bestiaryDrawModifiers.Rotation = 2.25f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(130, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-8f, 8f); + bestiaryDrawModifiers.Rotation = -2.25f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(131, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(132, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, -5f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-25f); + dictionary.Add(133, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_134"; + bestiaryDrawModifiers.Position = new Vector2(60f, 8f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(3f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + dictionary.Add(134, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(135, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(136, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(4f, -11f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-30f); + dictionary.Add(137, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(140, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(1f); + dictionary.Add(142, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(146, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(148, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(149, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, -11f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-30f); + dictionary.Add(150, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, -11f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-30f); + dictionary.Add(151, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, -11f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-30f); + dictionary.Add(152, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(20f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + dictionary.Add(153, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(20f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + dictionary.Add(154, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(15f, 0.0f); + bestiaryDrawModifiers.Velocity = 3f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + dictionary.Add(155, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-15f); + dictionary.Add(156, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(20f, 5f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(5f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(10f); + bestiaryDrawModifiers.IsWet = true; + dictionary.Add(157, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(160, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, -11f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-30f); + dictionary.Add(158, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(159, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(161, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(162, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(163, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(164, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Rotation = -1.6f; + bestiaryDrawModifiers.Velocity = 2f; + dictionary.Add(165, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(167, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(168, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(10f, 5f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-12f); + dictionary.Add(170, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(10f, 5f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-12f); + dictionary.Add(171, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Rotation = 0.75f; + bestiaryDrawModifiers.Position = new Vector2(0.0f, -5f); + dictionary.Add(173, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, -5f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(174, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(4f, -2f); + bestiaryDrawModifiers.Rotation = 2.356194f; + dictionary.Add(175, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 5f); + dictionary.Add(176, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(10f, 15f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(-4f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(1f); + bestiaryDrawModifiers.Frame = new int?(0); + dictionary.Add(177, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(2f); + dictionary.Add(178, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-5f, 12f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-7f); + dictionary.Add(179, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(10f, 5f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-12f); + dictionary.Add(180, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(181, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(185, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(186, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(187, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(188, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(189, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(6f, -15f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-35f); + dictionary.Add(190, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(6f, -15f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-35f); + dictionary.Add(191, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(6f, -15f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-35f); + dictionary.Add(192, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, -15f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-35f); + dictionary.Add(193, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, -15f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-35f); + dictionary.Add(194, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(196, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(197, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(198, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(199, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(2f); + dictionary.Add(200, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(201, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(202, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(203, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 2f; + dictionary.Add(206, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(207, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(2f); + dictionary.Add(208, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(209, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(212, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(213, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 3f; + dictionary.Add(214, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 3f; + dictionary.Add(215, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 3f; + dictionary.Add(216, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 5f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(221, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(10f, 55f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(40f); + dictionary.Add(222, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(223, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, -10f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-30f); + dictionary.Add(224, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, 3f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-15f); + dictionary.Add(226, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(-3f); + dictionary.Add(227, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(-5f); + dictionary.Add(228, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(229, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, 0.0f); + dictionary.Add(225, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(230, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 5f); + dictionary.Add(231, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 5f); + dictionary.Add(232, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 5f); + dictionary.Add(233, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 5f); + dictionary.Add(234, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 5f); + dictionary.Add(235, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(236, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Rotation = -1.6f; + bestiaryDrawModifiers.Velocity = 2f; + dictionary.Add(237, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Rotation = -1.6f; + bestiaryDrawModifiers.Velocity = 2f; + dictionary.Add(238, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(239, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Rotation = -1.6f; + bestiaryDrawModifiers.Velocity = 2f; + dictionary.Add(240, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 6f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(6f); + bestiaryDrawModifiers.IsWet = true; + dictionary.Add(241, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 10f); + dictionary.Add(242, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 60f); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(15f); + dictionary.Add(243, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_245"; + bestiaryDrawModifiers.Position = new Vector2(2f, 48f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(24f); + dictionary.Add(245, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(246, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(247, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(248, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(249, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, -6f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-26f); + dictionary.Add(250, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(251, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(3f, 3f); + bestiaryDrawModifiers.Velocity = 0.05f; + dictionary.Add(252, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 5f); + dictionary.Add(253, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(254, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(-2f); + dictionary.Add((int) byte.MaxValue, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 5f); + dictionary.Add(256, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(257, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(258, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_259"; + bestiaryDrawModifiers.Position = new Vector2(0.0f, 25f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(8f); + dictionary.Add(259, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_260"; + bestiaryDrawModifiers.Position = new Vector2(0.0f, 25f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(1f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(4f); + dictionary.Add(260, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(261, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 20f); + bestiaryDrawModifiers.Scale = 0.8f; + dictionary.Add(262, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(264, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(263, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(265, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, 5f); + bestiaryDrawModifiers.Frame = new int?(4); + dictionary.Add(266, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, -5f); + dictionary.Add(268, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-5f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(269, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-5f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(270, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-2f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(271, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-5f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(272, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-5f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(273, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-3f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(274, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-3f, 2f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(3f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(275, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-5f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(276, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-5f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(277, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-2f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(278, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-5f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(279, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-3f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(280, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(287, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, 10f); + bestiaryDrawModifiers.Direction = new int?(1); + dictionary.Add(289, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(4f, 6f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(290, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(291, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(292, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(293, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(294, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(295, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(296, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(1f, -14f); + bestiaryDrawModifiers.Velocity = 0.05f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-30f); + dictionary.Add(297, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(1f, -14f); + bestiaryDrawModifiers.Velocity = 0.05f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-30f); + dictionary.Add(298, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(299, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-20f); + bestiaryDrawModifiers.Direction = new int?(-1); + bestiaryDrawModifiers.SpriteDirection = new int?(1); + bestiaryDrawModifiers.Velocity = 0.05f; + dictionary.Add(301, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(303, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 0.05f; + dictionary.Add(305, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 0.05f; + dictionary.Add(306, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 0.05f; + dictionary.Add(307, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 0.05f; + dictionary.Add(308, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 0.05f; + dictionary.Add(309, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(310, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(311, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(312, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(313, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(314, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(14f, 26f); + bestiaryDrawModifiers.Velocity = 2f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + dictionary.Add(315, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 4f); + dictionary.Add(316, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, -15f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-35f); + dictionary.Add(317, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, -13f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-31f); + dictionary.Add(318, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(319, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(320, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(2f); + dictionary.Add(321, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(322, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(323, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(324, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 36f); + dictionary.Add(325, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(326, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, -8f); + dictionary.Add(327, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(328, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 2f; + dictionary.Add(329, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, 14f); + dictionary.Add(330, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(331, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(332, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(337, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(338, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(339, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(340, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(342, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, 25f); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + dictionary.Add(343, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 90f); + dictionary.Add(344, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-1f, 90f); + dictionary.Add(345, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(30f, 80f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(60f); + dictionary.Add(346, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 4f); + dictionary.Add(347, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(348, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-3f, 18f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + dictionary.Add(349, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(3f, 0.0f); + bestiaryDrawModifiers.Velocity = 2f; + dictionary.Add(350, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(6f, 60f); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(30f); + dictionary.Add(351, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(2f); + dictionary.Add(353, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(2f); + dictionary.Add(633, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(354, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(1f, 2f); + dictionary.Add(355, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, 3f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(1f); + dictionary.Add(356, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 2f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(357, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(1f, 2f); + dictionary.Add(358, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 18f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(40f); + dictionary.Add(359, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(1f, 17f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(39f); + dictionary.Add(360, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(3f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(362, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(363, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(3f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(364, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Hide = true; + dictionary.Add(365, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(1f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(366, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(367, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(368, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(2f); + dictionary.Add(369, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(56f, -4f); + bestiaryDrawModifiers.Direction = new int?(1); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + dictionary.Add(370, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(371, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(35f, 4f); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(10f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-3f); + dictionary.Add(372, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(373, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(374, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(375, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(376, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(379, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(380, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-2f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(381, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-2f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(382, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-2f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(383, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(384, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-2f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(385, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-2f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(386, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, 0.0f); + bestiaryDrawModifiers.Velocity = 3f; + dictionary.Add(387, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Direction = new int?(1); + dictionary.Add(388, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-6f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(389, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(12f, 0.0f); + bestiaryDrawModifiers.Direction = new int?(-1); + bestiaryDrawModifiers.SpriteDirection = new int?(1); + bestiaryDrawModifiers.Velocity = 2f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-12f); + dictionary.Add(390, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(16f, 12f); + bestiaryDrawModifiers.Direction = new int?(-1); + bestiaryDrawModifiers.SpriteDirection = new int?(1); + bestiaryDrawModifiers.Velocity = 2f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(3f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + dictionary.Add(391, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(392, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_395"; + bestiaryDrawModifiers.Position = new Vector2(-1f, 18f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(1f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + dictionary.Add(395, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(393, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(394, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(396, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(397, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_398"; + bestiaryDrawModifiers.Position = new Vector2(0.0f, 5f); + bestiaryDrawModifiers.Scale = 0.4f; + bestiaryDrawModifiers.PortraitScale = new float?(0.7f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + dictionary.Add(398, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(400, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(401, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_402"; + bestiaryDrawModifiers.Position = new Vector2(42f, 15f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + dictionary.Add(402, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(403, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(404, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(408, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(410, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Direction = new int?(-1); + bestiaryDrawModifiers.SpriteDirection = new int?(1); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(411, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_412"; + bestiaryDrawModifiers.Position = new Vector2(50f, 28f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(4f); + dictionary.Add(412, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(413, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(414, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(26f, 0.0f); + bestiaryDrawModifiers.Velocity = 3f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(5f); + dictionary.Add(415, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(6f, 20f); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + dictionary.Add(416, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-2f, 8f); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + dictionary.Add(417, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, 4f); + dictionary.Add(418, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-2f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(419, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 4f); + bestiaryDrawModifiers.Direction = new int?(1); + dictionary.Add(420, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(1f, -1f); + dictionary.Add(421, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(1f, 44f); + bestiaryDrawModifiers.Scale = 0.4f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(2f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(134f); + dictionary.Add(422, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Direction = new int?(-1); + bestiaryDrawModifiers.SpriteDirection = new int?(1); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(423, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(4f, 0.0f); + bestiaryDrawModifiers.Direction = new int?(-1); + bestiaryDrawModifiers.SpriteDirection = new int?(1); + bestiaryDrawModifiers.Velocity = 2f; + dictionary.Add(424, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(4f, 0.0f); + bestiaryDrawModifiers.Direction = new int?(-1); + bestiaryDrawModifiers.SpriteDirection = new int?(1); + bestiaryDrawModifiers.Velocity = 2f; + dictionary.Add(425, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, 8f); + bestiaryDrawModifiers.Velocity = 2f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + dictionary.Add(426, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-4f); + dictionary.Add(427, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(428, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(429, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(430, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(431, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(432, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(433, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(434, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(435, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(436, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(437, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(439, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(440, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(441, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(1f, -14f); + bestiaryDrawModifiers.Velocity = 0.05f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-30f); + dictionary.Add(442, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(443, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, 2f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + dictionary.Add(444, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(448, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(449, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(450, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(451, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(452, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(453, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_454"; + bestiaryDrawModifiers.Position = new Vector2(57f, 10f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(5f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + dictionary.Add(454, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(455, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(456, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(457, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(458, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(459, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(460, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-2f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(461, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(462, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(463, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(464, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 6f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(6f); + bestiaryDrawModifiers.IsWet = true; + dictionary.Add(465, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(466, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(467, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(468, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(469, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(470, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(471, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-30f); + bestiaryDrawModifiers.SpriteDirection = new int?(-1); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(472, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(476, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(25f, 6f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(10f); + dictionary.Add(477, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(478, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, 4f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-15f); + dictionary.Add(479, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(481, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(482, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, -10f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-30f); + dictionary.Add(483, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(484, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 0.5f; + dictionary.Add(487, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 0.5f; + dictionary.Add(486, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 0.5f; + dictionary.Add(485, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(489, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_491"; + bestiaryDrawModifiers.Position = new Vector2(30f, -5f); + bestiaryDrawModifiers.Scale = 0.8f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(1f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-1f); + dictionary.Add(491, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(492, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(1f, 44f); + bestiaryDrawModifiers.Scale = 0.4f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(2f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(134f); + dictionary.Add(493, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(494, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-4f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(495, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 0.5f; + dictionary.Add(496, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 0.5f; + dictionary.Add(497, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(498, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(499, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(500, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(501, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(502, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(503, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(504, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(505, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(506, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(1f, 44f); + bestiaryDrawModifiers.Scale = 0.4f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(2f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(134f); + dictionary.Add(507, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Position = new Vector2(10f, 0.0f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + dictionary.Add(508, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(6f, 0.0f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(-10f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-20f); + dictionary.Add(509, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_510"; + bestiaryDrawModifiers.Position = new Vector2(55f, 18f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(10f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(12f); + dictionary.Add(510, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(512, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(511, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_513"; + bestiaryDrawModifiers.Position = new Vector2(37f, 24f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(10f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(17f); + dictionary.Add(513, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(514, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(515, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(516, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(1f, 44f); + bestiaryDrawModifiers.Scale = 0.4f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(2f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(135f); + dictionary.Add(517, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-17f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(518, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(519, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 56f); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(10f); + dictionary.Add(520, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(5f, 5f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-10f); + bestiaryDrawModifiers.SpriteDirection = new int?(-1); + bestiaryDrawModifiers.Velocity = 0.05f; + dictionary.Add(521, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(522, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(523, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(524, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(525, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(526, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(527, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(528, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(529, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(530, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 4f); + bestiaryDrawModifiers.Velocity = 2f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(10f); + dictionary.Add(531, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(6f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(532, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(3f, 5f); + dictionary.Add(533, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(534, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-2f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(536, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(538, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(539, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(540, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 30f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + dictionary.Add(541, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(35f, -3f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + dictionary.Add(542, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(35f, -3f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + dictionary.Add(543, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(35f, -3f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + dictionary.Add(544, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(35f, -3f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + dictionary.Add(545, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, -3f); + bestiaryDrawModifiers.Direction = new int?(1); + dictionary.Add(546, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(547, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(548, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(549, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(-2f); + dictionary.Add(550, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(95f, -4f); + dictionary.Add(551, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(552, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(553, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(554, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(555, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(556, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(557, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(3f, -2f); + dictionary.Add(558, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(3f, -2f); + dictionary.Add(559, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(3f, -2f); + dictionary.Add(560, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(561, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(562, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(563, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-3f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(566, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-3f, 0.0f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(567, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(568, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(569, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(10f, 5f); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(2f); + dictionary.Add(570, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(10f, 5f); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(2f); + dictionary.Add(571, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(572, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(573, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 4f); + dictionary.Add(578, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(16f, 6f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(574, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(16f, 6f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(575, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(20f, 70f); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(10f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitScale = new float?(0.75f); + dictionary.Add(576, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(20f, 70f); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(10f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + bestiaryDrawModifiers.PortraitScale = new float?(0.75f); + dictionary.Add(577, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 0.0f); + bestiaryDrawModifiers.Scale = 0.9f; + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(580, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, -8f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-30f); + dictionary.Add(581, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(582, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 1f); + bestiaryDrawModifiers.Direction = new int?(1); + dictionary.Add(585, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 1f); + bestiaryDrawModifiers.Direction = new int?(1); + dictionary.Add(584, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 1f); + bestiaryDrawModifiers.Direction = new int?(1); + dictionary.Add(583, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(586, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(579, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(1f); + dictionary.Add(588, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, -14f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-30f); + dictionary.Add(587, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(9f, 0.0f); + dictionary.Add(591, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(2f); + dictionary.Add(590, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 6f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(7f); + bestiaryDrawModifiers.IsWet = true; + dictionary.Add(592, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(593, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_594"; + bestiaryDrawModifiers.Scale = 0.8f; + dictionary.Add(594, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(589, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(602, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(603, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, 22f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(41f); + dictionary.Add(604, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, 22f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(41f); + dictionary.Add(605, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(606, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 6f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(7f); + bestiaryDrawModifiers.IsWet = true; + dictionary.Add(607, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(608, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(609, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 0.0f); + bestiaryDrawModifiers.Direction = new int?(-1); + bestiaryDrawModifiers.SpriteDirection = new int?(1); + dictionary.Add(611, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(612, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(613, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(614, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 10f); + bestiaryDrawModifiers.Scale = 0.88f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(20f); + bestiaryDrawModifiers.IsWet = true; + dictionary.Add(615, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(616, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(617, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(12f, -5f); + bestiaryDrawModifiers.Scale = 0.9f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(0.0f); + dictionary.Add(618, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(1f, 7f); + bestiaryDrawModifiers.Scale = 0.85f; + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(10f); + dictionary.Add(619, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(6f, 5f); + bestiaryDrawModifiers.Scale = 0.78f; + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(620, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.CustomTexturePath = "Images/UI/Bestiary/NPCs/NPC_621"; + bestiaryDrawModifiers.Position = new Vector2(46f, 20f); + bestiaryDrawModifiers.PortraitPositionXOverride = new float?(10f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(17f); + dictionary.Add(621, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(622, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(623, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 2f; + dictionary.Add(624, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, -12f); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(625, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, -16f); + dictionary.Add(626, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, -16f); + dictionary.Add(627, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Direction = new int?(1); + dictionary.Add(628, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 0.5f; + dictionary.Add(630, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(632, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 0.75f; + dictionary.Add(631, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + bestiaryDrawModifiers.Position = new Vector2(0.0f, -13f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-30f); + dictionary.Add(634, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(635, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 50f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(30f); + dictionary.Add(636, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(639, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(640, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(641, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(642, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(643, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(644, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(645, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(646, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(647, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(648, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(649, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(650, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(651, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(652, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 0.25f; + dictionary.Add(637, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(638, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, 3f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(1f); + dictionary.Add(653, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(1f, 2f); + dictionary.Add(654, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(1f, 17f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(39f); + dictionary.Add(655, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Velocity = 1f; + dictionary.Add(656, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(0.0f, 60f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(40f); + dictionary.Add(657, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(-2f, -4f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(-20f); + dictionary.Add(660, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Position = new Vector2(2f, 3f); + bestiaryDrawModifiers.PortraitPositionYOverride = new float?(1f); + dictionary.Add(661, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(662, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(0, bestiaryDrawModifiers); + bestiaryDrawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers(0); + bestiaryDrawModifiers.Hide = true; + dictionary.Add(488, bestiaryDrawModifiers); + return dictionary; + } + + public struct NPCBestiaryDrawModifiers + { + public Vector2 Position; + public float? PortraitPositionXOverride; + public float? PortraitPositionYOverride; + public float Rotation; + public float Scale; + public float? PortraitScale; + public bool Hide; + public bool IsWet; + public int? Frame; + public int? Direction; + public int? SpriteDirection; + public float Velocity; + public string CustomTexturePath; + + public NPCBestiaryDrawModifiers( + int seriouslyWhyCantStructsHaveParameterlessConstructors) + { + this.Position = new Vector2(); + this.Rotation = 0.0f; + this.Scale = 1f; + this.PortraitScale = new float?(1f); + this.Hide = false; + this.IsWet = false; + this.Frame = new int?(); + this.Direction = new int?(); + this.SpriteDirection = new int?(); + this.Velocity = 0.0f; + this.PortraitPositionXOverride = new float?(); + this.PortraitPositionYOverride = new float?(); + this.CustomTexturePath = (string) null; + } + } + } + } +} diff --git a/ID/PaintID.cs b/ID/PaintID.cs new file mode 100644 index 0000000..a1d17a2 --- /dev/null +++ b/ID/PaintID.cs @@ -0,0 +1,13 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.PaintID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public static class PaintID + { + public const byte GLOW_PAINT = 31; + } +} diff --git a/ID/PlayerDifficultyID.cs b/ID/PlayerDifficultyID.cs new file mode 100644 index 0000000..d32f9ee --- /dev/null +++ b/ID/PlayerDifficultyID.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.PlayerDifficultyID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public class PlayerDifficultyID + { + public const byte SoftCore = 0; + public const byte MediumCore = 1; + public const byte Hardcore = 2; + public const byte Creative = 3; + } +} diff --git a/ID/PlayerTextureID.cs b/ID/PlayerTextureID.cs new file mode 100644 index 0000000..daea5f6 --- /dev/null +++ b/ID/PlayerTextureID.cs @@ -0,0 +1,29 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.PlayerTextureID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public static class PlayerTextureID + { + public const int Head = 0; + public const int EyeWhites = 1; + public const int Eyes = 2; + public const int TorsoSkin = 3; + public const int Undershirt = 4; + public const int Hands = 5; + public const int Shirt = 6; + public const int ArmSkin = 7; + public const int ArmUndershirt = 8; + public const int ArmHand = 9; + public const int LegSkin = 10; + public const int Pants = 11; + public const int Shoes = 12; + public const int ArmShirt = 13; + public const int Extra = 14; + public const int EyeBlink = 15; + public const int Count = 16; + } +} diff --git a/ID/PlayerVariantID.cs b/ID/PlayerVariantID.cs new file mode 100644 index 0000000..5a70a5a --- /dev/null +++ b/ID/PlayerVariantID.cs @@ -0,0 +1,50 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.PlayerVariantID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public static class PlayerVariantID + { + public static SetFactory Factory = new SetFactory(12); + public const int MaleStarter = 0; + public const int MaleSticker = 1; + public const int MaleGangster = 2; + public const int MaleCoat = 3; + public const int FemaleStarter = 4; + public const int FemaleSticker = 5; + public const int FemaleGangster = 6; + public const int FemaleCoat = 7; + public const int MaleDress = 8; + public const int FemaleDress = 9; + public const int MaleDisplayDoll = 10; + public const int FemaleDisplayDoll = 11; + public const int Count = 12; + + public class Sets + { + public static bool[] Male = PlayerVariantID.Factory.CreateBoolSet(0, 1, 2, 3, 8, 10); + public static int[] AltGenderReference = PlayerVariantID.Factory.CreateIntSet(0, 0, 4, 4, 0, 1, 5, 5, 1, 2, 6, 6, 2, 3, 7, 7, 3, 8, 9, 9, 8, 10, 11, 11, 10); + public static int[] VariantOrderMale = new int[6] + { + 0, + 1, + 2, + 3, + 8, + 10 + }; + public static int[] VariantOrderFemale = new int[6] + { + 4, + 5, + 6, + 7, + 9, + 11 + }; + } + } +} diff --git a/ID/PrefixID.cs b/ID/PrefixID.cs new file mode 100644 index 0000000..3d6674f --- /dev/null +++ b/ID/PrefixID.cs @@ -0,0 +1,97 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.PrefixID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public class PrefixID + { + public const int Large = 1; + public const int Massive = 2; + public const int Dangerous = 3; + public const int Savage = 4; + public const int Sharp = 5; + public const int Pointy = 6; + public const int Tiny = 7; + public const int Terrible = 8; + public const int Small = 9; + public const int Dull = 10; + public const int Unhappy = 11; + public const int Bulky = 12; + public const int Shameful = 13; + public const int Heavy = 14; + public const int Light = 15; + public const int Sighted = 16; + public const int Rapid = 17; + public const int Hasty = 18; + public const int Intimidating = 19; + public const int Deadly = 20; + public const int Staunch = 21; + public const int Awful = 22; + public const int Lethargic = 23; + public const int Awkward = 24; + public const int Powerful = 25; + public const int Mystic = 26; + public const int Adept = 27; + public const int Masterful = 28; + public const int Inept = 29; + public const int Ignorant = 30; + public const int Deranged = 31; + public const int Intense = 32; + public const int Taboo = 33; + public const int Celestial = 34; + public const int Furious = 35; + public const int Keen = 36; + public const int Superior = 37; + public const int Forceful = 38; + public const int Broken = 39; + public const int Damaged = 40; + public const int Shoddy = 41; + public const int Quick = 42; + public const int Deadly2 = 43; + public const int Agile = 44; + public const int Nimble = 45; + public const int Murderous = 46; + public const int Slow = 47; + public const int Sluggish = 48; + public const int Lazy = 49; + public const int Annoying = 50; + public const int Nasty = 51; + public const int Manic = 52; + public const int Hurtful = 53; + public const int Strong = 54; + public const int Unpleasant = 55; + public const int Weak = 56; + public const int Ruthless = 57; + public const int Frenzying = 58; + public const int Godly = 59; + public const int Demonic = 60; + public const int Zealous = 61; + public const int Hard = 62; + public const int Guarding = 63; + public const int Armored = 64; + public const int Warding = 65; + public const int Arcane = 66; + public const int Precise = 67; + public const int Lucky = 68; + public const int Jagged = 69; + public const int Spiked = 70; + public const int Angry = 71; + public const int Menacing = 72; + public const int Brisk = 73; + public const int Fleeting = 74; + public const int Hasty2 = 75; + public const int Quick2 = 76; + public const int Wild = 77; + public const int Rash = 78; + public const int Intrepid = 79; + public const int Violent = 80; + public const int Legendary = 81; + public const int Unreal = 82; + public const int Mythical = 83; + public const int Legendary2 = 84; + public const int Count = 85; + } +} diff --git a/ID/ProjectileID.cs b/ID/ProjectileID.cs new file mode 100644 index 0000000..574a8fa --- /dev/null +++ b/ID/ProjectileID.cs @@ -0,0 +1,1008 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.ProjectileID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.WorldBuilding; + +namespace Terraria.ID +{ + public class ProjectileID + { + public const short None = 0; + public const short WoodenArrowFriendly = 1; + public const short FireArrow = 2; + public const short Shuriken = 3; + public const short UnholyArrow = 4; + public const short JestersArrow = 5; + public const short EnchantedBoomerang = 6; + public const short VilethornBase = 7; + public const short VilethornTip = 8; + public const short Starfury = 9; + public const short PurificationPowder = 10; + public const short VilePowder = 11; + public const short FallingStar = 12; + public const short Hook = 13; + public const short Bullet = 14; + public const short BallofFire = 15; + public const short MagicMissile = 16; + public const short DirtBall = 17; + public const short ShadowOrb = 18; + public const short Flamarang = 19; + public const short GreenLaser = 20; + public const short Bone = 21; + public const short WaterStream = 22; + public const short Harpoon = 23; + public const short SpikyBall = 24; + public const short BallOHurt = 25; + public const short BlueMoon = 26; + public const short WaterBolt = 27; + public const short Bomb = 28; + public const short Dynamite = 29; + public const short Grenade = 30; + public const short SandBallFalling = 31; + public const short IvyWhip = 32; + public const short ThornChakram = 33; + public const short Flamelash = 34; + public const short Sunfury = 35; + public const short MeteorShot = 36; + public const short StickyBomb = 37; + public const short HarpyFeather = 38; + public const short MudBall = 39; + public const short AshBallFalling = 40; + public const short HellfireArrow = 41; + public const short SandBallGun = 42; + public const short Tombstone = 43; + public const short DemonSickle = 44; + public const short DemonScythe = 45; + public const short DarkLance = 46; + public const short Trident = 47; + public const short ThrowingKnife = 48; + public const short Spear = 49; + public const short Glowstick = 50; + public const short Seed = 51; + public const short WoodenBoomerang = 52; + public const short StickyGlowstick = 53; + public const short PoisonedKnife = 54; + public const short Stinger = 55; + public const short EbonsandBallFalling = 56; + public const short CobaltChainsaw = 57; + public const short MythrilChainsaw = 58; + public const short CobaltDrill = 59; + public const short MythrilDrill = 60; + public const short AdamantiteChainsaw = 61; + public const short AdamantiteDrill = 62; + public const short TheDaoofPow = 63; + public const short MythrilHalberd = 64; + public const short EbonsandBallGun = 65; + public const short AdamantiteGlaive = 66; + public const short PearlSandBallFalling = 67; + public const short PearlSandBallGun = 68; + public const short HolyWater = 69; + public const short UnholyWater = 70; + public const short SiltBall = 71; + public const short BlueFairy = 72; + public const short DualHookBlue = 73; + public const short DualHookRed = 74; + public const short HappyBomb = 75; + public const short QuarterNote = 76; + public const short EighthNote = 77; + public const short TiedEighthNote = 78; + public const short RainbowRodBullet = 79; + public const short IceBlock = 80; + public const short WoodenArrowHostile = 81; + public const short FlamingArrow = 82; + public const short EyeLaser = 83; + public const short PinkLaser = 84; + public const short Flames = 85; + public const short PinkFairy = 86; + public const short GreenFairy = 87; + public const short PurpleLaser = 88; + public const short CrystalBullet = 89; + public const short CrystalShard = 90; + public const short HolyArrow = 91; + public const short HallowStar = 92; + public const short MagicDagger = 93; + public const short CrystalStorm = 94; + public const short CursedFlameFriendly = 95; + public const short CursedFlameHostile = 96; + public const short CobaltNaginata = 97; + public const short PoisonDart = 98; + public const short Boulder = 99; + public const short DeathLaser = 100; + public const short EyeFire = 101; + public const short BombSkeletronPrime = 102; + public const short CursedArrow = 103; + public const short CursedBullet = 104; + public const short Gungnir = 105; + public const short LightDisc = 106; + public const short Hamdrax = 107; + public const short Explosives = 108; + public const short SnowBallHostile = 109; + public const short BulletSnowman = 110; + public const short Bunny = 111; + public const short Penguin = 112; + public const short IceBoomerang = 113; + public const short UnholyTridentFriendly = 114; + public const short UnholyTridentHostile = 115; + public const short SwordBeam = 116; + public const short BoneArrow = 117; + public const short IceBolt = 118; + public const short FrostBoltSword = 119; + public const short FrostArrow = 120; + public const short AmethystBolt = 121; + public const short TopazBolt = 122; + public const short SapphireBolt = 123; + public const short EmeraldBolt = 124; + public const short RubyBolt = 125; + public const short DiamondBolt = 126; + public const short Turtle = 127; + public const short FrostBlastHostile = 128; + public const short RuneBlast = 129; + public const short MushroomSpear = 130; + public const short Mushroom = 131; + public const short TerraBeam = 132; + public const short GrenadeI = 133; + public const short RocketI = 134; + public const short ProximityMineI = 135; + public const short GrenadeII = 136; + public const short RocketII = 137; + public const short ProximityMineII = 138; + public const short GrenadeIII = 139; + public const short RocketIII = 140; + public const short ProximityMineIII = 141; + public const short GrenadeIV = 142; + public const short RocketIV = 143; + public const short ProximityMineIV = 144; + public const short PureSpray = 145; + public const short HallowSpray = 146; + public const short CorruptSpray = 147; + public const short MushroomSpray = 148; + public const short CrimsonSpray = 149; + public const short NettleBurstRight = 150; + public const short NettleBurstLeft = 151; + public const short NettleBurstEnd = 152; + public const short TheRottedFork = 153; + public const short TheMeatball = 154; + public const short BeachBall = 155; + public const short LightBeam = 156; + public const short NightBeam = 157; + public const short CopperCoin = 158; + public const short SilverCoin = 159; + public const short GoldCoin = 160; + public const short PlatinumCoin = 161; + public const short CannonballFriendly = 162; + public const short Flare = 163; + public const short Landmine = 164; + public const short Web = 165; + public const short SnowBallFriendly = 166; + public const short RocketFireworkRed = 167; + public const short RocketFireworkGreen = 168; + public const short RocketFireworkBlue = 169; + public const short RocketFireworkYellow = 170; + public const short RopeCoil = 171; + public const short FrostburnArrow = 172; + public const short EnchantedBeam = 173; + public const short IceSpike = 174; + public const short BabyEater = 175; + public const short JungleSpike = 176; + public const short IcewaterSpit = 177; + public const short ConfettiGun = 178; + public const short SlushBall = 179; + public const short BulletDeadeye = 180; + public const short Bee = 181; + public const short PossessedHatchet = 182; + public const short Beenade = 183; + public const short PoisonDartTrap = 184; + public const short SpikyBallTrap = 185; + public const short SpearTrap = 186; + public const short FlamethrowerTrap = 187; + public const short FlamesTrap = 188; + public const short Wasp = 189; + public const short MechanicalPiranha = 190; + public const short Pygmy = 191; + public const short Pygmy2 = 192; + public const short Pygmy3 = 193; + public const short Pygmy4 = 194; + public const short PygmySpear = 195; + public const short SmokeBomb = 196; + public const short BabySkeletronHead = 197; + public const short BabyHornet = 198; + public const short TikiSpirit = 199; + public const short PetLizard = 200; + public const short GraveMarker = 201; + public const short CrossGraveMarker = 202; + public const short Headstone = 203; + public const short Gravestone = 204; + public const short Obelisk = 205; + public const short Leaf = 206; + public const short ChlorophyteBullet = 207; + public const short Parrot = 208; + public const short Truffle = 209; + public const short Sapling = 210; + public const short Wisp = 211; + public const short PalladiumPike = 212; + public const short PalladiumDrill = 213; + public const short PalladiumChainsaw = 214; + public const short OrichalcumHalberd = 215; + public const short OrichalcumDrill = 216; + public const short OrichalcumChainsaw = 217; + public const short TitaniumTrident = 218; + public const short TitaniumDrill = 219; + public const short TitaniumChainsaw = 220; + public const short FlowerPetal = 221; + public const short ChlorophytePartisan = 222; + public const short ChlorophyteDrill = 223; + public const short ChlorophyteChainsaw = 224; + public const short ChlorophyteArrow = 225; + public const short CrystalLeaf = 226; + public const short CrystalLeafShot = 227; + public const short SporeCloud = 228; + public const short ChlorophyteOrb = 229; + public const short GemHookAmethyst = 230; + public const short GemHookTopaz = 231; + public const short GemHookSapphire = 232; + public const short GemHookEmerald = 233; + public const short GemHookRuby = 234; + public const short GemHookDiamond = 235; + public const short BabyDino = 236; + public const short RainCloudMoving = 237; + public const short RainCloudRaining = 238; + public const short RainFriendly = 239; + public const short CannonballHostile = 240; + public const short CrimsandBallFalling = 241; + public const short BulletHighVelocity = 242; + public const short BloodCloudMoving = 243; + public const short BloodCloudRaining = 244; + public const short BloodRain = 245; + public const short Stynger = 246; + public const short FlowerPow = 247; + public const short FlowerPowPetal = 248; + public const short StyngerShrapnel = 249; + public const short RainbowFront = 250; + public const short RainbowBack = 251; + public const short ChlorophyteJackhammer = 252; + public const short BallofFrost = 253; + public const short MagnetSphereBall = 254; + public const short MagnetSphereBolt = 255; + public const short SkeletronHand = 256; + public const short FrostBeam = 257; + public const short Fireball = 258; + public const short EyeBeam = 259; + public const short HeatRay = 260; + public const short BoulderStaffOfEarth = 261; + public const short GolemFist = 262; + public const short IceSickle = 263; + public const short RainNimbus = 264; + public const short PoisonFang = 265; + public const short BabySlime = 266; + public const short PoisonDartBlowgun = 267; + public const short EyeSpring = 268; + public const short BabySnowman = 269; + public const short Skull = 270; + public const short BoxingGlove = 271; + public const short Bananarang = 272; + public const short ChainKnife = 273; + public const short DeathSickle = 274; + public const short SeedPlantera = 275; + public const short PoisonSeedPlantera = 276; + public const short ThornBall = 277; + public const short IchorArrow = 278; + public const short IchorBullet = 279; + public const short GoldenShowerFriendly = 280; + public const short ExplosiveBunny = 281; + public const short VenomArrow = 282; + public const short VenomBullet = 283; + public const short PartyBullet = 284; + public const short NanoBullet = 285; + public const short ExplosiveBullet = 286; + public const short GoldenBullet = 287; + public const short GoldenShowerHostile = 288; + public const short ConfettiMelee = 289; + public const short ShadowBeamHostile = 290; + public const short InfernoHostileBolt = 291; + public const short InfernoHostileBlast = 292; + public const short LostSoulHostile = 293; + public const short ShadowBeamFriendly = 294; + public const short InfernoFriendlyBolt = 295; + public const short InfernoFriendlyBlast = 296; + public const short LostSoulFriendly = 297; + public const short SpiritHeal = 298; + public const short Shadowflames = 299; + public const short PaladinsHammerHostile = 300; + public const short PaladinsHammerFriendly = 301; + public const short SniperBullet = 302; + public const short RocketSkeleton = 303; + public const short VampireKnife = 304; + public const short VampireHeal = 305; + public const short EatersBite = 306; + public const short TinyEater = 307; + public const short FrostHydra = 308; + public const short FrostBlastFriendly = 309; + public const short BlueFlare = 310; + public const short CandyCorn = 311; + public const short JackOLantern = 312; + public const short Spider = 313; + public const short Squashling = 314; + public const short BatHook = 315; + public const short Bat = 316; + public const short Raven = 317; + public const short RottenEgg = 318; + public const short BlackCat = 319; + public const short BloodyMachete = 320; + public const short FlamingJack = 321; + public const short WoodHook = 322; + public const short Stake = 323; + public const short CursedSapling = 324; + public const short FlamingWood = 325; + public const short GreekFire1 = 326; + public const short GreekFire2 = 327; + public const short GreekFire3 = 328; + public const short FlamingScythe = 329; + public const short StarAnise = 330; + public const short CandyCaneHook = 331; + public const short ChristmasHook = 332; + public const short FruitcakeChakram = 333; + public const short Puppy = 334; + public const short OrnamentFriendly = 335; + public const short PineNeedleFriendly = 336; + public const short Blizzard = 337; + public const short RocketSnowmanI = 338; + public const short RocketSnowmanII = 339; + public const short RocketSnowmanIII = 340; + public const short RocketSnowmanIV = 341; + public const short NorthPoleWeapon = 342; + public const short NorthPoleSpear = 343; + public const short NorthPoleSnowflake = 344; + public const short PineNeedleHostile = 345; + public const short OrnamentHostile = 346; + public const short OrnamentHostileShrapnel = 347; + public const short FrostWave = 348; + public const short FrostShard = 349; + public const short Missile = 350; + public const short Present = 351; + public const short Spike = 352; + public const short BabyGrinch = 353; + public const short CrimsandBallGun = 354; + public const short VenomFang = 355; + public const short SpectreWrath = 356; + public const short PulseBolt = 357; + public const short WaterGun = 358; + public const short FrostBoltStaff = 359; + public const short BobberWooden = 360; + public const short BobberReinforced = 361; + public const short BobberFiberglass = 362; + public const short BobberFisherOfSouls = 363; + public const short BobberGolden = 364; + public const short BobberMechanics = 365; + public const short BobbersittingDuck = 366; + public const short ObsidianSwordfish = 367; + public const short Swordfish = 368; + public const short SawtoothShark = 369; + public const short LovePotion = 370; + public const short FoulPotion = 371; + public const short FishHook = 372; + public const short Hornet = 373; + public const short HornetStinger = 374; + public const short FlyingImp = 375; + public const short ImpFireball = 376; + public const short SpiderHiver = 377; + public const short SpiderEgg = 378; + public const short BabySpider = 379; + public const short ZephyrFish = 380; + public const short BobberFleshcatcher = 381; + public const short BobberHotline = 382; + public const short Anchor = 383; + public const short Sharknado = 384; + public const short SharknadoBolt = 385; + public const short Cthulunado = 386; + public const short Retanimini = 387; + public const short Spazmamini = 388; + public const short MiniRetinaLaser = 389; + public const short VenomSpider = 390; + public const short JumperSpider = 391; + public const short DangerousSpider = 392; + public const short OneEyedPirate = 393; + public const short SoulscourgePirate = 394; + public const short PirateCaptain = 395; + public const short SlimeHook = 396; + public const short StickyGrenade = 397; + public const short MiniMinotaur = 398; + public const short MolotovCocktail = 399; + public const short MolotovFire = 400; + public const short MolotovFire2 = 401; + public const short MolotovFire3 = 402; + public const short TrackHook = 403; + public const short Flairon = 404; + public const short FlaironBubble = 405; + public const short SlimeGun = 406; + public const short Tempest = 407; + public const short MiniSharkron = 408; + public const short Typhoon = 409; + public const short Bubble = 410; + public const short CopperCoinsFalling = 411; + public const short SilverCoinsFalling = 412; + public const short GoldCoinsFalling = 413; + public const short PlatinumCoinsFalling = 414; + public const short RocketFireworksBoxRed = 415; + public const short RocketFireworksBoxGreen = 416; + public const short RocketFireworksBoxBlue = 417; + public const short RocketFireworksBoxYellow = 418; + public const short FireworkFountainYellow = 419; + public const short FireworkFountainRed = 420; + public const short FireworkFountainBlue = 421; + public const short FireworkFountainRainbow = 422; + public const short UFOMinion = 423; + public const short Meteor1 = 424; + public const short Meteor2 = 425; + public const short Meteor3 = 426; + public const short VortexChainsaw = 427; + public const short VortexDrill = 428; + public const short NebulaChainsaw = 429; + public const short NebulaDrill = 430; + public const short SolarFlareChainsaw = 431; + public const short SolarFlareDrill = 432; + public const short UFOLaser = 433; + public const short ScutlixLaserFriendly = 434; + public const short MartianTurretBolt = 435; + public const short BrainScramblerBolt = 436; + public const short GigaZapperSpear = 437; + public const short RayGunnerLaser = 438; + public const short LaserMachinegun = 439; + public const short LaserMachinegunLaser = 440; + public const short ScutlixLaserCrosshair = 441; + public const short ElectrosphereMissile = 442; + public const short Electrosphere = 443; + public const short Xenopopper = 444; + public const short LaserDrill = 445; + public const short AntiGravityHook = 446; + public const short SaucerDeathray = 447; + public const short SaucerMissile = 448; + public const short SaucerLaser = 449; + public const short SaucerScrap = 450; + public const short InfluxWaver = 451; + public const short PhantasmalEye = 452; + public const short DrillMountCrosshair = 453; + public const short PhantasmalSphere = 454; + public const short PhantasmalDeathray = 455; + public const short MoonLeech = 456; + public const short PhasicWarpEjector = 457; + public const short PhasicWarpDisc = 458; + public const short ChargedBlasterOrb = 459; + public const short ChargedBlasterCannon = 460; + public const short ChargedBlasterLaser = 461; + public const short PhantasmalBolt = 462; + public const short ViciousPowder = 463; + public const short CultistBossIceMist = 464; + public const short CultistBossLightningOrb = 465; + public const short CultistBossLightningOrbArc = 466; + public const short CultistBossFireBall = 467; + public const short CultistBossFireBallClone = 468; + public const short BeeArrow = 469; + public const short StickyDynamite = 470; + public const short SkeletonBone = 471; + public const short WebSpit = 472; + public const short SpelunkerGlowstick = 473; + public const short BoneArrowFromMerchant = 474; + public const short VineRopeCoil = 475; + public const short SoulDrain = 476; + public const short CrystalDart = 477; + public const short CursedDart = 478; + public const short IchorDart = 479; + public const short CursedDartFlame = 480; + public const short ChainGuillotine = 481; + public const short ClingerStaff = 482; + public const short SeedlerNut = 483; + public const short SeedlerThorn = 484; + public const short Hellwing = 485; + public const short TendonHook = 486; + public const short ThornHook = 487; + public const short IlluminantHook = 488; + public const short WormHook = 489; + public const short CultistRitual = 490; + public const short FlyingKnife = 491; + public const short MagicLantern = 492; + public const short CrystalVileShardHead = 493; + public const short CrystalVileShardShaft = 494; + public const short ShadowFlameArrow = 495; + public const short ShadowFlame = 496; + public const short ShadowFlameKnife = 497; + public const short Nail = 498; + public const short BabyFaceMonster = 499; + public const short CrimsonHeart = 500; + public const short DrManFlyFlask = 501; + public const short Meowmere = 502; + public const short StarWrath = 503; + public const short Spark = 504; + public const short SilkRopeCoil = 505; + public const short WebRopeCoil = 506; + public const short JavelinFriendly = 507; + public const short JavelinHostile = 508; + public const short ButchersChainsaw = 509; + public const short ToxicFlask = 510; + public const short ToxicCloud = 511; + public const short ToxicCloud2 = 512; + public const short ToxicCloud3 = 513; + public const short NailFriendly = 514; + public const short BouncyGlowstick = 515; + public const short BouncyBomb = 516; + public const short BouncyGrenade = 517; + public const short CoinPortal = 518; + public const short BombFish = 519; + public const short FrostDaggerfish = 520; + public const short CrystalPulse = 521; + public const short CrystalPulse2 = 522; + public const short ToxicBubble = 523; + public const short IchorSplash = 524; + public const short FlyingPiggyBank = 525; + public const short CultistBossParticle = 526; + public const short RichGravestone1 = 527; + public const short RichGravestone2 = 528; + public const short RichGravestone3 = 529; + public const short RichGravestone4 = 530; + public const short RichGravestone5 = 531; + public const short BoneGloveProj = 532; + public const short DeadlySphere = 533; + public const short Code1 = 534; + public const short MedusaHead = 535; + public const short MedusaHeadRay = 536; + public const short StardustSoldierLaser = 537; + public const short Twinkle = 538; + public const short StardustJellyfishSmall = 539; + public const short StardustTowerMark = 540; + public const short WoodYoyo = 541; + public const short CorruptYoyo = 542; + public const short CrimsonYoyo = 543; + public const short JungleYoyo = 544; + public const short Cascade = 545; + public const short Chik = 546; + public const short Code2 = 547; + public const short Rally = 548; + public const short Yelets = 549; + public const short RedsYoyo = 550; + public const short ValkyrieYoyo = 551; + public const short Amarok = 552; + public const short HelFire = 553; + public const short Kraken = 554; + public const short TheEyeOfCthulhu = 555; + public const short BlackCounterweight = 556; + public const short BlueCounterweight = 557; + public const short GreenCounterweight = 558; + public const short PurpleCounterweight = 559; + public const short RedCounterweight = 560; + public const short YellowCounterweight = 561; + public const short FormatC = 562; + public const short Gradient = 563; + public const short Valor = 564; + public const short BrainOfConfusion = 565; + public const short GiantBee = 566; + public const short SporeTrap = 567; + public const short SporeTrap2 = 568; + public const short SporeGas = 569; + public const short SporeGas2 = 570; + public const short SporeGas3 = 571; + public const short SalamanderSpit = 572; + public const short NebulaBolt = 573; + public const short NebulaEye = 574; + public const short NebulaSphere = 575; + public const short NebulaLaser = 576; + public const short VortexLaser = 577; + public const short VortexVortexLightning = 578; + public const short VortexVortexPortal = 579; + public const short VortexLightning = 580; + public const short VortexAcid = 581; + public const short MechanicWrench = 582; + public const short NurseSyringeHurt = 583; + public const short NurseSyringeHeal = 584; + public const short ClothiersCurse = 585; + public const short DryadsWardCircle = 586; + public const short PainterPaintball = 587; + public const short PartyGirlGrenade = 588; + public const short SantaBombs = 589; + public const short TruffleSpore = 590; + public const short MinecartMechLaser = 591; + public const short MartianWalkerLaser = 592; + public const short AncientDoomProjectile = 593; + public const short BlowupSmoke = 594; + public const short Arkhalis = 595; + public const short DesertDjinnCurse = 596; + public const short AmberBolt = 597; + public const short BoneJavelin = 598; + public const short BoneDagger = 599; + public const short PortalGun = 600; + public const short PortalGunBolt = 601; + public const short PortalGunGate = 602; + public const short Terrarian = 603; + public const short TerrarianBeam = 604; + public const short SpikedSlimeSpike = 605; + public const short ScutlixLaser = 606; + public const short SolarFlareRay = 607; + public const short SolarCounter = 608; + public const short StardustDrill = 609; + public const short StardustChainsaw = 610; + public const short SolarWhipSword = 611; + public const short SolarWhipSwordExplosion = 612; + public const short StardustCellMinion = 613; + public const short StardustCellMinionShot = 614; + public const short VortexBeater = 615; + public const short VortexBeaterRocket = 616; + public const short NebulaArcanum = 617; + public const short NebulaArcanumSubshot = 618; + public const short NebulaArcanumExplosionShot = 619; + public const short NebulaArcanumExplosionShotShard = 620; + public const short BloodWater = 621; + public const short BlowupSmokeMoonlord = 622; + public const short StardustGuardian = 623; + public const short StardustGuardianExplosion = 624; + public const short StardustDragon1 = 625; + public const short StardustDragon2 = 626; + public const short StardustDragon3 = 627; + public const short StardustDragon4 = 628; + public const short TowerDamageBolt = 629; + public const short Phantasm = 630; + public const short PhantasmArrow = 631; + public const short LastPrismLaser = 632; + public const short LastPrism = 633; + public const short NebulaBlaze1 = 634; + public const short NebulaBlaze2 = 635; + public const short Daybreak = 636; + public const short BouncyDynamite = 637; + public const short MoonlordBullet = 638; + public const short MoonlordArrow = 639; + public const short MoonlordArrowTrail = 640; + public const short MoonlordTurret = 641; + public const short MoonlordTurretLaser = 642; + public const short RainbowCrystal = 643; + public const short RainbowCrystalExplosion = 644; + public const short LunarFlare = 645; + public const short LunarHookSolar = 646; + public const short LunarHookVortex = 647; + public const short LunarHookNebula = 648; + public const short LunarHookStardust = 649; + public const short SuspiciousTentacle = 650; + public const short WireKite = 651; + public const short StaticHook = 652; + public const short CompanionCube = 653; + public const short GeyserTrap = 654; + public const short BeeHive = 655; + public const short SandnadoFriendly = 656; + public const short SandnadoHostile = 657; + public const short SandnadoHostileMark = 658; + public const short SpiritFlame = 659; + public const short SkyFracture = 660; + public const short BlackBolt = 661; + public const short DD2JavelinHostile = 662; + public const short DD2FlameBurstTowerT1 = 663; + public const short DD2FlameBurstTowerT1Shot = 664; + public const short DD2FlameBurstTowerT2 = 665; + public const short DD2FlameBurstTowerT2Shot = 666; + public const short DD2FlameBurstTowerT3 = 667; + public const short DD2FlameBurstTowerT3Shot = 668; + public const short Ale = 669; + public const short DD2OgreStomp = 670; + public const short DD2DrakinShot = 671; + public const short DD2ElderWins = 672; + public const short DD2DarkMageRaise = 673; + public const short DD2DarkMageHeal = 674; + public const short DD2DarkMageBolt = 675; + public const short DD2OgreSpit = 676; + public const short DD2BallistraTowerT1 = 677; + public const short DD2BallistraTowerT2 = 678; + public const short DD2BallistraTowerT3 = 679; + public const short DD2BallistraProj = 680; + public const short DD2GoblinBomb = 681; + public const short DD2LightningBugZap = 682; + public const short DD2OgreSmash = 683; + public const short DD2SquireSonicBoom = 684; + public const short DD2JavelinHostileT3 = 685; + public const short DD2BetsyFireball = 686; + public const short DD2BetsyFlameBreath = 687; + public const short DD2LightningAuraT1 = 688; + public const short DD2LightningAuraT2 = 689; + public const short DD2LightningAuraT3 = 690; + public const short DD2ExplosiveTrapT1 = 691; + public const short DD2ExplosiveTrapT2 = 692; + public const short DD2ExplosiveTrapT3 = 693; + public const short DD2ExplosiveTrapT1Explosion = 694; + public const short DD2ExplosiveTrapT2Explosion = 695; + public const short DD2ExplosiveTrapT3Explosion = 696; + public const short MonkStaffT1 = 697; + public const short MonkStaffT1Explosion = 698; + public const short MonkStaffT2 = 699; + public const short MonkStaffT2Ghast = 700; + public const short DD2PetDragon = 701; + public const short DD2PetGhost = 702; + public const short DD2PetGato = 703; + public const short DD2ApprenticeStorm = 704; + public const short DD2PhoenixBow = 705; + public const short DD2PhoenixBowShot = 706; + public const short MonkStaffT3 = 707; + public const short MonkStaffT3_Alt = 708; + public const short MonkStaffT3_AltShot = 709; + public const short DD2BetsyArrow = 710; + public const short ApprenticeStaffT3Shot = 711; + public const short BookStaffShot = 712; + public const short DD2Win = 713; + public const short Celeb2Weapon = 714; + public const short Celeb2Rocket = 715; + public const short Celeb2RocketExplosive = 716; + public const short Celeb2RocketLarge = 717; + public const short Celeb2RocketExplosiveLarge = 718; + public const short QueenBeeStinger = 719; + public const short FallingStarSpawner = 720; + public const short DirtGolfBall = 721; + public const short GolfClubHelper = 722; + public const short ManaCloakStar = 723; + public const short BeeCloakStar = 724; + public const short StarVeilStar = 725; + public const short StarCloakStar = 726; + public const short RollingCactus = 727; + public const short SuperStar = 728; + public const short SuperStarSlash = 729; + public const short ThunderSpear = 730; + public const short ThunderStaffShot = 731; + public const short ThunderSpearShot = 732; + public const short ToiletEffect = 733; + public const short VoidLens = 734; + public const short Terragrim = 735; + public const short BlueDungeonDebris = 736; + public const short GreenDungeonDebris = 737; + public const short PinkDungeonDebris = 738; + public const short GolfBallDyedBlack = 739; + public const short GolfBallDyedBlue = 740; + public const short GolfBallDyedBrown = 741; + public const short GolfBallDyedCyan = 742; + public const short GolfBallDyedGreen = 743; + public const short GolfBallDyedLimeGreen = 744; + public const short GolfBallDyedOrange = 745; + public const short GolfBallDyedPink = 746; + public const short GolfBallDyedPurple = 747; + public const short GolfBallDyedRed = 748; + public const short GolfBallDyedSkyBlue = 749; + public const short GolfBallDyedTeal = 750; + public const short GolfBallDyedViolet = 751; + public const short GolfBallDyedYellow = 752; + public const short AmberHook = 753; + public const short MysticSnakeCoil = 754; + public const short BatOfLight = 755; + public const short SharpTears = 756; + public const short DripplerFlail = 757; + public const short VampireFrog = 758; + public const short BabyBird = 759; + public const short BobberBloody = 760; + public const short PaperAirplaneA = 761; + public const short PaperAirplaneB = 762; + public const short RollingCactusSpike = 763; + public const short UpbeatStar = 764; + public const short SugarGlider = 765; + public const short KiteBlue = 766; + public const short KiteBlueAndYellow = 767; + public const short KiteRed = 768; + public const short KiteRedAndYellow = 769; + public const short KiteYellow = 770; + public const short KiteWyvern = 771; + public const short Geode = 772; + public const short ScarabBomb = 773; + public const short SharkPup = 774; + public const short BobberScarab = 775; + public const short ClusterRocketI = 776; + public const short ClusterGrenadeI = 777; + public const short ClusterMineI = 778; + public const short ClusterFragmentsI = 779; + public const short ClusterRocketII = 780; + public const short ClusterGrenadeII = 781; + public const short ClusterMineII = 782; + public const short ClusterFragmentsII = 783; + public const short WetRocket = 784; + public const short WetGrenade = 785; + public const short WetMine = 786; + public const short LavaRocket = 787; + public const short LavaGrenade = 788; + public const short LavaMine = 789; + public const short HoneyRocket = 790; + public const short HoneyGrenade = 791; + public const short HoneyMine = 792; + public const short MiniNukeRocketI = 793; + public const short MiniNukeGrenadeI = 794; + public const short MiniNukeMineI = 795; + public const short MiniNukeRocketII = 796; + public const short MiniNukeGrenadeII = 797; + public const short MiniNukeMineII = 798; + public const short DryRocket = 799; + public const short DryGrenade = 800; + public const short DryMine = 801; + public const short GladiusStab = 802; + public const short ClusterSnowmanRocketI = 803; + public const short ClusterSnowmanRocketII = 804; + public const short WetSnowmanRocket = 805; + public const short LavaSnowmanRocket = 806; + public const short HoneySnowmanRocket = 807; + public const short MiniNukeSnowmanRocketI = 808; + public const short MiniNukeSnowmanRocketII = 809; + public const short DrySnowmanRocket = 810; + public const short BloodShot = 811; + public const short ShellPileFalling = 812; + public const short BloodNautilusTears = 813; + public const short BloodNautilusShot = 814; + public const short LilHarpy = 815; + public const short FennecFox = 816; + public const short GlitteryButterfly = 817; + public const short WhiteTigerPounce = 818; + public const short BloodArrow = 819; + public const short ChumBucket = 820; + public const short BabyImp = 821; + public const short KiteBoneSerpent = 822; + public const short KiteWorldFeeder = 823; + public const short KiteBunny = 824; + public const short BabyRedPanda = 825; + public const short KitePigron = 826; + public const short KiteManEater = 827; + public const short KiteJellyfishBlue = 828; + public const short KiteJellyfishPink = 829; + public const short KiteShark = 830; + public const short StormTigerGem = 831; + public const short StormTigerAttack = 832; + public const short StormTigerTier1 = 833; + public const short StormTigerTier2 = 834; + public const short StormTigerTier3 = 835; + public const short DandelionSeed = 836; + public const short BookOfSkullsSkull = 837; + public const short KiteSandShark = 838; + public const short KiteBunnyCorrupt = 839; + public const short KiteBunnyCrimson = 840; + public const short BlandWhip = 841; + public const short RulerStab = 842; + public const short KiteGoldfish = 843; + public const short KiteAngryTrapper = 844; + public const short KiteKoi = 845; + public const short KiteCrawltipede = 846; + public const short SwordWhip = 847; + public const short MaceWhip = 848; + public const short ScytheWhip = 849; + public const short KiteSpectrum = 850; + public const short ReleaseDoves = 851; + public const short KiteWanderingEye = 852; + public const short KiteUnicorn = 853; + public const short Plantero = 854; + public const short ReleaseLantern = 855; + public const short SparkleGuitar = 856; + public const short FirstFractal = 857; + public const short DynamiteKitten = 858; + public const short BabyWerewolf = 859; + public const short ShadowMimic = 860; + public const short Football = 861; + public const short ClusterSnowmanFragmentsI = 862; + public const short ClusterSnowmanFragmentsII = 863; + public const short Smolstar = 864; + public const short SquirrelHook = 865; + public const short BouncingShield = 866; + public const short Shroomerang = 867; + public const short TreeGlobe = 868; + public const short WorldGlobe = 869; + public const short FairyGlowstick = 870; + public const short HallowBossSplitShotCore = 871; + public const short HallowBossLastingRainbow = 872; + public const short HallowBossRainbowStreak = 873; + public const short HallowBossDeathAurora = 874; + public const short VoltBunny = 875; + public const short ZapinatorLaser = 876; + public const short JoustingLance = 877; + public const short ShadowJoustingLance = 878; + public const short HallowJoustingLance = 879; + public const short ZoologistStrikeGreen = 880; + public const short KingSlimePet = 881; + public const short EyeOfCthulhuPet = 882; + public const short EaterOfWorldsPet = 883; + public const short BrainOfCthulhuPet = 884; + public const short SkeletronPet = 885; + public const short QueenBeePet = 886; + public const short DestroyerPet = 887; + public const short TwinsPet = 888; + public const short SkeletronPrimePet = 889; + public const short PlanteraPet = 890; + public const short GolemPet = 891; + public const short DukeFishronPet = 892; + public const short LunaticCultistPet = 893; + public const short MoonLordPet = 894; + public const short FairyQueenPet = 895; + public const short PumpkingPet = 896; + public const short EverscreamPet = 897; + public const short IceQueenPet = 898; + public const short MartianPet = 899; + public const short DD2OgrePet = 900; + public const short DD2BetsyPet = 901; + public const short CombatWrench = 902; + public const short WetBomb = 903; + public const short LavaBomb = 904; + public const short HoneyBomb = 905; + public const short DryBomb = 906; + public const short OrnamentStar = 907; + public const short TitaniumStormShard = 908; + public const short RockGolemRock = 909; + public const short DirtBomb = 910; + public const short DirtStickyBomb = 911; + public const short CoolWhip = 912; + public const short FireWhip = 913; + public const short ThornWhip = 914; + public const short RainbowWhip = 915; + public const short ScytheWhipProj = 916; + public const short CoolWhipProj = 917; + public const short FireWhipProj = 918; + public const short FairyQueenLance = 919; + public const short QueenSlimeMinionBlueSpike = 920; + public const short QueenSlimeMinionPinkBall = 921; + public const short QueenSlimeSmash = 922; + public const short FairyQueenSunDance = 923; + public const short FairyQueenHymn = 924; + public const short StardustPunch = 925; + public const short QueenSlimeGelAttack = 926; + public const short PiercingStarlight = 927; + public const short DripplerFlailExtraBall = 928; + public const short ZoologistStrikeRed = 929; + public const short SantankMountRocket = 930; + public const short FairyQueenMagicItemShot = 931; + public const short FairyQueenRangedItemShot = 932; + public const short FinalFractal = 933; + public const short QueenSlimePet = 934; + public const short QueenSlimeHook = 935; + public const short GelBalloon = 936; + public const short VolatileGelatinBall = 937; + public const short CopperShortswordStab = 938; + public const short TinShortswordStab = 939; + public const short IronShortswordStab = 940; + public const short LeadShortswordStab = 941; + public const short SilverShortswordStab = 942; + public const short TungstenShortswordStab = 943; + public const short GoldShortswordStab = 944; + public const short PlatinumShortswordStab = 945; + public const short EmpressBlade = 946; + public const short Mace = 947; + public const short FlamingMace = 948; + public const short TorchGod = 949; + public const short Count = 950; + + public static class Sets + { + public static SetFactory Factory = new SetFactory(950); + public static bool[] DontApplyParryDamageBuff = ProjectileID.Sets.Factory.CreateBoolSet(false, 524, 321, 181, 566); + public static bool[] IsAWhip = ProjectileID.Sets.Factory.CreateBoolSet(false, 847, 841, 848, 849, 912, 913, 914, 915); + public static bool[] ImmediatelyUpdatesNPCBuffFlags = ProjectileID.Sets.Factory.CreateBoolSet(636); + public static bool?[] WindPhysicsImmunity = ProjectileID.Sets.Factory.CreateCustomSet(new bool?(), (object) (short) 20, (object) true, (object) (short) 27, (object) true, (object) (short) 83, (object) true, (object) (short) 84, (object) true, (object) (short) 88, (object) true, (object) (short) 100, (object) true, (object) (short) 359, (object) true, (object) (short) 119, (object) true, (object) (short) 121, (object) true, (object) (short) 122, (object) true, (object) (short) 123, (object) true, (object) (short) 124, (object) true, (object) (short) 125, (object) true, (object) (short) 126, (object) true, (object) (short) 309, (object) true, (object) (short) 128, (object) true, (object) (short) 129, (object) true, (object) (short) 257, (object) true, (object) (short) 258, (object) true, (object) (short) 259, (object) true, (object) (short) 299, (object) true, (object) (short) 496, (object) true, (object) (short) 302, (object) true, (object) (short) 306, (object) true, (object) (short) 337, (object) true, (object) (short) 344, (object) true, (object) (short) 343, (object) true, (object) (short) 342, (object) true, (object) (short) 348, (object) true, (object) (short) 349, (object) true, (object) (short) 389, (object) true, (object) (short) 436, (object) true, (object) (short) 435, (object) true, (object) (short) 437, (object) true, (object) (short) 439, (object) true, (object) (short) 592, (object) true, (object) (short) 449, (object) true, (object) (short) 442, (object) true, (object) (short) 459, (object) true, (object) (short) 462, (object) true, (object) (short) 467, (object) true, (object) (short) 468, (object) true, (object) (short) 538, (object) true, (object) (short) 576, (object) true, (object) (short) 577, (object) true, (object) (short) 584, (object) true, (object) (short) 583, (object) true, (object) (short) 594, (object) true, (object) (short) 622, (object) true, (object) (short) 597, (object) true, (object) (short) 601, (object) true, (object) (short) 617, (object) true, (object) (short) 619, (object) true, (object) (short) 620, (object) true, (object) (short) 618, (object) true, (object) (short) 634, (object) true, (object) (short) 635, (object) true, (object) (short) 640, (object) true, (object) (short) 639, (object) true, (object) (short) 645, (object) true, (object) (short) 660, (object) true, (object) (short) 661, (object) true, (object) (short) 675, (object) true, (object) (short) 684, (object) true, (object) (short) 709, (object) true, (object) (short) 593, (object) true, (object) (short) 606, (object) true, (object) (short) 732, (object) true, (object) (short) 731, (object) true); + public static bool[] RocketsSkipDamageForPlayers = ProjectileID.Sets.Factory.CreateBoolSet(338, 339, 340, 341, 803, 804, 862, 863, 805, 806, 807, 808, 809, 810, 930); + public static float[] YoyosLifeTimeMultiplier = ProjectileID.Sets.Factory.CreateFloatSet(-1f, 541f, 3f, 548f, 5f, 542f, 7f, 543f, 6f, 544f, 8f, 534f, 9f, 564f, 11f, 545f, 13f, 563f, 10f, 562f, 8f, 553f, 12f, 546f, 16f, 552f, 15f, 549f, 14f); + public static float[] YoyosMaximumRange = ProjectileID.Sets.Factory.CreateFloatSet(200f, 541f, 130f, 548f, 170f, 542f, 195f, 543f, 207f, 544f, 215f, 534f, 220f, 564f, 225f, 545f, 235f, 562f, 235f, 563f, 250f, 546f, 275f, 552f, 270f, 553f, 275f, 547f, 280f, 549f, 290f, 554f, 340f, 550f, 370f, 551f, 370f, 555f, 360f, 603f, 400f); + public static bool[] IsAGolfBall = ProjectileID.Sets.Factory.CreateBoolSet(false, 721, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752); + public static float[] YoyosTopSpeed = ProjectileID.Sets.Factory.CreateFloatSet(10f, 541f, 9f, 548f, 11f, 542f, 12.5f, 543f, 12f, 544f, 13f, 534f, 13f, 564f, 14f, 545f, 14f, 562f, 15f, 563f, 12f, 546f, 17f, 552f, 14f, 553f, 15f, 547f, 17f, 549f, 16f, 554f, 16f, 550f, 16f, 551f, 16f, 555f, 16.5f, 603f, 17.5f); + public static bool[] CanDistortWater = ProjectileID.Sets.Factory.CreateBoolSet(true, 7, 8, 152, 151, 150, 493, 494); + public static bool[] MinionShot = ProjectileID.Sets.Factory.CreateBoolSet(374, 376, 389, 195, 408, 433, 614); + public static bool[] SentryShot = ProjectileID.Sets.Factory.CreateBoolSet(680, 664, 666, 668, 694, 695, 696, 644, 642, 378, 379, 309); + public static bool?[] ForcePlateDetection = ProjectileID.Sets.Factory.CreateCustomSet(new bool?(), (object) (short) 397, (object) true, (object) (short) 37, (object) true, (object) (short) 470, (object) true, (object) (short) 53, (object) true, (object) (short) 911, (object) true, (object) (short) 773, (object) true, (object) (short) 519, (object) true, (object) (short) 171, (object) true, (object) (short) 505, (object) true, (object) (short) 475, (object) true, (object) (short) 506, (object) true, (object) (short) 186, (object) true, (object) (short) 80, (object) true, (object) (short) 40, (object) true, (object) (short) 241, (object) true, (object) (short) 411, (object) true, (object) (short) 56, (object) true, (object) (short) 413, (object) true, (object) (short) 67, (object) true, (object) (short) 414, (object) true, (object) (short) 31, (object) true, (object) (short) 412, (object) true, (object) (short) 812, (object) true, (object) (short) 17, (object) true, (object) (short) 166, (object) true, (object) (short) 109, (object) true, (object) (short) 354, (object) true, (object) (short) 65, (object) true, (object) (short) 68, (object) true, (object) (short) 42, (object) true, (object) (short) 99, (object) false, (object) (short) 727, (object) false, (object) (short) 655, (object) false); + public static int[] TrailingMode = ProjectileID.Sets.Factory.CreateIntSet(-1, 94, 0, 301, 0, 388, 0, 385, 0, 408, 0, 409, 0, 435, 0, 436, 0, 437, 0, 438, 0, 452, 0, 459, 0, 462, 0, 502, 0, 503, 0, 466, 1, 532, 0, 533, 0, 573, 0, 580, 1, 582, 0, 585, 0, 592, 0, 601, 0, 617, 0, 636, 0, 638, 0, 639, 0, 640, 0, 424, 0, 425, 0, 426, 0, 660, 0, 661, 0, 671, 2, 664, 0, 666, 0, 668, 0, 675, 0, 680, 2, 682, 0, 684, 0, 686, 2, 700, 0, 706, 0, 709, 0, 710, 2, 711, 2, 712, 0, 715, 2, 716, 2, 717, 2, 718, 2, 261, 0, 721, 0, 729, 2, 732, 0, 731, 0, 739, 0, 740, 0, 741, 0, 742, 0, 743, 0, 744, 0, 745, 0, 746, 0, 747, 0, 748, 0, 749, 0, 750, 0, 751, 0, 752, 0, 755, 2, 766, 2, 767, 2, 768, 2, 769, 2, 770, 2, 771, 2, 811, 2, 814, 2, 822, 2, 823, 2, 824, 2, 826, 2, 827, 2, 828, 2, 829, 2, 830, 2, 838, 2, 839, 2, 840, 2, 843, 2, 844, 2, 845, 2, 846, 2, 850, 2, 852, 2, 853, 2, 856, 0, 857, 0, 864, 2, 873, 2, 872, 2, 833, 2, 834, 2, 835, 2, 818, 2, 902, 0, 883, 0, 887, 0, 893, 0, 894, 0, 909, 0, 916, 2, 34, 3, 16, 3, 79, 3, 931, 2, 933, 4, 946, 2); + public static int[] TrailCacheLength = ProjectileID.Sets.Factory.CreateIntSet(10, 466, 20, 502, 25, 580, 20, 636, 20, 640, 20, 686, 20, 711, 20, 715, 20, 716, 20, 717, 20, 718, 20, 261, 20, 721, 20, 729, 20, 731, 20, 739, 20, 740, 20, 741, 20, 742, 20, 743, 20, 744, 20, 745, 20, 746, 20, 747, 20, 748, 20, 749, 20, 750, 20, 751, 20, 752, 20, 766, 60, 767, 60, 768, 60, 769, 60, 770, 60, 771, 80, 814, 40, 822, 80, 823, 80, 824, 60, 826, 60, 827, 65, 828, 60, 829, 60, 830, 80, 838, 80, 839, 60, 840, 60, 843, 60, 844, 65, 845, 80, 846, 80, 850, 80, 852, 60, 853, 60, 856, 2, 857, 2, 864, 60, 873, 60, 872, 120, 833, 20, 834, 20, 835, 20, 818, 20, 883, 41, 887, 51, 893, 71, 894, 10, 909, 10, 916, 20, 34, 30, 16, 30, 79, 60, 931, 20, 933, 60, 946, 20); + public static bool[] LightPet = ProjectileID.Sets.Factory.CreateBoolSet(18, 500, 72, 87, 86, 211, 492, 650, 702, 891, 896, 895); + public static bool[] CountsAsHoming = ProjectileID.Sets.Factory.CreateBoolSet(207, 182, 247, 338, 339, 340, 341, 191, 192, 193, 194, 266, 390, 391, 392, 307, 316, 190, 227, 226, 254, (int) byte.MaxValue, 297, 308, 317, 321, 407, 423, 375, 373, 376, 374, 379, 387, 408, 389, 388, 405, 409, 451, 535, 536, 483, 484, 477); + public static bool[] IsADD2Turret = ProjectileID.Sets.Factory.CreateBoolSet(663, 665, 667, 677, 678, 679, 688, 689, 690, 691, 692, 693); + public static bool[] TurretFeature = ProjectileID.Sets.Factory.CreateBoolSet(); + public static bool[] MinionTargettingFeature = ProjectileID.Sets.Factory.CreateBoolSet(191, 192, 193, 194, 266, 317, 373, 375, 387, 388, 390, 393, 407, 423, 533, 613, 625, 755, 758, 759, 831, 833, 834, 835, 864, 946, 377, 308, 643, 641, 663, 665, 667, 677, 678, 679, 688, 689, 690, 691, 692, 693); + public static bool[] MinionSacrificable = ProjectileID.Sets.Factory.CreateBoolSet(191, 192, 193, 194, 266, 317, 373, 375, 387, 388, 390, 393, 407, 423, 533, 613, 755, 758, 759, 831, 864, 946, 625, 626, 627, 628); + public static bool[] DontAttachHideToAlpha = ProjectileID.Sets.Factory.CreateBoolSet(598, 641, 617, 636, 579, 578, 625, 626, 627, 628, 759, 813, 525); + public static GenSearch[] ExtendedCanHitCheckSearch = ProjectileID.Sets.Factory.CreateCustomSet((GenSearch) null, (object) (short) 833, (object) new Searches.Up(3), (object) (short) 834, (object) new Searches.Up(3), (object) (short) 835, (object) new Searches.Up(3)); + public static float[] ExtendedCanHitCheckRange = ProjectileID.Sets.Factory.CreateFloatSet(0.0f, 833f, 48f, 834f, 48f, 835f, 48f); + public static bool[] NeedsUUID = ProjectileID.Sets.Factory.CreateBoolSet(625, 626, 627, 628); + public static bool[] StardustDragon = ProjectileID.Sets.Factory.CreateBoolSet(625, 626, 627, 628); + public static bool[] StormTiger = ProjectileID.Sets.Factory.CreateBoolSet(833, 834, 835); + public static int[] StormTigerIds = new int[3] + { + 833, + 834, + 835 + }; + public static bool[] IsARocketThatDealsDoubleDamageToPrimaryEnemy = ProjectileID.Sets.Factory.CreateBoolSet(134, 137, 140, 143, 776, 780, 793, 796, 799, 784, 787, 790, 246); + public static bool[] IsAMineThatDealsTripleDamageWhenStationary = ProjectileID.Sets.Factory.CreateBoolSet(135, 138, 141, 144, 778, 782, 795, 798, 801, 786, 789, 792); + public static bool[] NoLiquidDistortion = ProjectileID.Sets.Factory.CreateBoolSet(511, 512, 513); + public static bool[] DismountsPlayersOnHit = ProjectileID.Sets.Factory.CreateBoolSet(877, 878, 879); + public static int[] DrawScreenCheckFluff = ProjectileID.Sets.Factory.CreateIntSet(480, 461, 1600, 632, 1600, 447, 1600, 455, 2400, 754, 800, 872, 1600, 873, 1600, 871, 1600, 919, 2400, 923, 2400, 931, 960, 16, 960, 34, 960, 79, 960, 933, 480); + } + } +} diff --git a/ID/RecipeGroupID.cs b/ID/RecipeGroupID.cs new file mode 100644 index 0000000..a2e4148 --- /dev/null +++ b/ID/RecipeGroupID.cs @@ -0,0 +1,25 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.RecipeGroupID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public class RecipeGroupID + { + public static int Birds = 0; + public static int Scorpions = 1; + public static int Bugs = 2; + public static int Ducks = 3; + public static int Squirrels = 4; + public static int Butterflies = 5; + public static int Fireflies = 6; + public static int Snails = 7; + public static int FishForDinner = 8; + public static int GoldenCritter = 9; + public static int Dragonflies = 10; + public static int Turtles = 11; + public static int Fruit = 12; + } +} diff --git a/ID/SetFactory.cs b/ID/SetFactory.cs new file mode 100644 index 0000000..cb6b2e7 --- /dev/null +++ b/ID/SetFactory.cs @@ -0,0 +1,135 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.SetFactory +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; + +namespace Terraria.ID +{ + public class SetFactory + { + protected int _size; + private readonly Queue _intBufferCache = new Queue(); + private readonly Queue _ushortBufferCache = new Queue(); + private readonly Queue _boolBufferCache = new Queue(); + private readonly Queue _floatBufferCache = new Queue(); + private object _queueLock = new object(); + + public SetFactory(int size) => this._size = size; + + protected bool[] GetBoolBuffer() + { + lock (this._queueLock) + return this._boolBufferCache.Count == 0 ? new bool[this._size] : this._boolBufferCache.Dequeue(); + } + + protected int[] GetIntBuffer() + { + lock (this._queueLock) + return this._intBufferCache.Count == 0 ? new int[this._size] : this._intBufferCache.Dequeue(); + } + + protected ushort[] GetUshortBuffer() + { + lock (this._queueLock) + return this._ushortBufferCache.Count == 0 ? new ushort[this._size] : this._ushortBufferCache.Dequeue(); + } + + protected float[] GetFloatBuffer() + { + lock (this._queueLock) + return this._floatBufferCache.Count == 0 ? new float[this._size] : this._floatBufferCache.Dequeue(); + } + + public void Recycle(T[] buffer) + { + lock (this._queueLock) + { + if (typeof (T).Equals(typeof (bool))) + { + this._boolBufferCache.Enqueue((bool[]) buffer); + } + else + { + if (!typeof (T).Equals(typeof (int))) + return; + this._intBufferCache.Enqueue((int[]) buffer); + } + } + } + + public bool[] CreateBoolSet(params int[] types) => this.CreateBoolSet(false, types); + + public bool[] CreateBoolSet(bool defaultState, params int[] types) + { + bool[] boolBuffer = this.GetBoolBuffer(); + for (int index = 0; index < boolBuffer.Length; ++index) + boolBuffer[index] = defaultState; + for (int index = 0; index < types.Length; ++index) + boolBuffer[types[index]] = !defaultState; + return boolBuffer; + } + + public int[] CreateIntSet(int defaultState, params int[] inputs) + { + if (inputs.Length % 2 != 0) + throw new Exception("You have a bad length for inputs on CreateArraySet"); + int[] intBuffer = this.GetIntBuffer(); + for (int index = 0; index < intBuffer.Length; ++index) + intBuffer[index] = defaultState; + for (int index = 0; index < inputs.Length; index += 2) + intBuffer[inputs[index]] = inputs[index + 1]; + return intBuffer; + } + + public ushort[] CreateUshortSet(ushort defaultState, params ushort[] inputs) + { + if (inputs.Length % 2 != 0) + throw new Exception("You have a bad length for inputs on CreateArraySet"); + ushort[] ushortBuffer = this.GetUshortBuffer(); + for (int index = 0; index < ushortBuffer.Length; ++index) + ushortBuffer[index] = defaultState; + for (int index = 0; index < inputs.Length; index += 2) + ushortBuffer[(int) inputs[index]] = inputs[index + 1]; + return ushortBuffer; + } + + public float[] CreateFloatSet(float defaultState, params float[] inputs) + { + if (inputs.Length % 2 != 0) + throw new Exception("You have a bad length for inputs on CreateArraySet"); + float[] floatBuffer = this.GetFloatBuffer(); + for (int index = 0; index < floatBuffer.Length; ++index) + floatBuffer[index] = defaultState; + for (int index = 0; index < inputs.Length; index += 2) + floatBuffer[(int) inputs[index]] = inputs[index + 1]; + return floatBuffer; + } + + public T[] CreateCustomSet(T defaultState, params object[] inputs) + { + if (inputs.Length % 2 != 0) + throw new Exception("You have a bad length for inputs on CreateCustomSet"); + T[] objArray = new T[this._size]; + for (int index = 0; index < objArray.Length; ++index) + objArray[index] = defaultState; + if (inputs != null) + { + for (int index = 0; index < inputs.Length; index += 2) + { + T obj = !typeof (T).IsPrimitive ? (!typeof (T).IsGenericType || !(typeof (T).GetGenericTypeDefinition() == typeof (Nullable<>)) ? (!typeof (T).IsClass ? (T) Convert.ChangeType(inputs[index + 1], typeof (T)) : (T) inputs[index + 1]) : (T) inputs[index + 1]) : (T) inputs[index + 1]; + if (inputs[index] is ushort) + objArray[(int) (ushort) inputs[index]] = obj; + else if (inputs[index] is int) + objArray[(int) inputs[index]] = obj; + else + objArray[(int) (short) inputs[index]] = obj; + } + } + return objArray; + } + } +} diff --git a/ID/SoundID.cs b/ID/SoundID.cs new file mode 100644 index 0000000..b46daba --- /dev/null +++ b/ID/SoundID.cs @@ -0,0 +1,552 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.SoundID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using Terraria.Audio; + +namespace Terraria.ID +{ + public class SoundID + { + private static readonly SoundID.SoundStyleDefaults ItemDefaults = new SoundID.SoundStyleDefaults(1f, 0.06f); + public const int Dig = 0; + public const int PlayerHit = 1; + public const int Item = 2; + public const int NPCHit = 3; + public const int NPCKilled = 4; + public const int PlayerKilled = 5; + public const int Grass = 6; + public const int Grab = 7; + public const int DoorOpen = 8; + public const int DoorClosed = 9; + public const int MenuOpen = 10; + public const int MenuClose = 11; + public const int MenuTick = 12; + public const int Shatter = 13; + public const int ZombieMoan = 14; + public const int Roar = 15; + public const int DoubleJump = 16; + public const int Run = 17; + public const int Coins = 18; + public const int Splash = 19; + public const int FemaleHit = 20; + public const int Tink = 21; + public const int Unlock = 22; + public const int Drown = 23; + public const int Chat = 24; + public const int MaxMana = 25; + public const int Mummy = 26; + public const int Pixie = 27; + public const int Mech = 28; + public const int Zombie = 29; + public const int Duck = 30; + public const int Frog = 31; + public const int Bird = 32; + public const int Critter = 33; + public const int Waterfall = 34; + public const int Lavafall = 35; + public const int ForceRoar = 36; + public const int Meowmere = 37; + public const int CoinPickup = 38; + public const int Drip = 39; + public const int Camera = 40; + public const int MoonLord = 41; + public const int Trackable = 42; + public const int Thunder = 43; + public const int Seagull = 44; + public const int Dolphin = 45; + public const int Owl = 46; + public const int GuitarC = 47; + public const int GuitarD = 48; + public const int GuitarEm = 49; + public const int GuitarG = 50; + public const int GuitarAm = 51; + public const int GuitarF = 52; + public const int DrumHiHat = 53; + public const int DrumTomHigh = 54; + public const int DrumTomLow = 55; + public const int DrumTomMid = 56; + public const int DrumClosedHiHat = 57; + public const int DrumCymbal1 = 58; + public const int DrumCymbal2 = 59; + public const int DrumKick = 60; + public const int DrumTamaSnare = 61; + public const int DrumFloorTom = 62; + public const int Research = 63; + public const int ResearchComplete = 64; + public const int QueenSlime = 65; + public static readonly LegacySoundStyle NPCHit1 = new LegacySoundStyle(3, 1); + public static readonly LegacySoundStyle NPCHit2 = new LegacySoundStyle(3, 2); + public static readonly LegacySoundStyle NPCHit3 = new LegacySoundStyle(3, 3); + public static readonly LegacySoundStyle NPCHit4 = new LegacySoundStyle(3, 4); + public static readonly LegacySoundStyle NPCHit5 = new LegacySoundStyle(3, 5); + public static readonly LegacySoundStyle NPCHit6 = new LegacySoundStyle(3, 6); + public static readonly LegacySoundStyle NPCHit7 = new LegacySoundStyle(3, 7); + public static readonly LegacySoundStyle NPCHit8 = new LegacySoundStyle(3, 8); + public static readonly LegacySoundStyle NPCHit9 = new LegacySoundStyle(3, 9); + public static readonly LegacySoundStyle NPCHit10 = new LegacySoundStyle(3, 10); + public static readonly LegacySoundStyle NPCHit11 = new LegacySoundStyle(3, 11); + public static readonly LegacySoundStyle NPCHit12 = new LegacySoundStyle(3, 12); + public static readonly LegacySoundStyle NPCHit13 = new LegacySoundStyle(3, 13); + public static readonly LegacySoundStyle NPCHit14 = new LegacySoundStyle(3, 14); + public static readonly LegacySoundStyle NPCHit15 = new LegacySoundStyle(3, 15); + public static readonly LegacySoundStyle NPCHit16 = new LegacySoundStyle(3, 16); + public static readonly LegacySoundStyle NPCHit17 = new LegacySoundStyle(3, 17); + public static readonly LegacySoundStyle NPCHit18 = new LegacySoundStyle(3, 18); + public static readonly LegacySoundStyle NPCHit19 = new LegacySoundStyle(3, 19); + public static readonly LegacySoundStyle NPCHit20 = new LegacySoundStyle(3, 20); + public static readonly LegacySoundStyle NPCHit21 = new LegacySoundStyle(3, 21); + public static readonly LegacySoundStyle NPCHit22 = new LegacySoundStyle(3, 22); + public static readonly LegacySoundStyle NPCHit23 = new LegacySoundStyle(3, 23); + public static readonly LegacySoundStyle NPCHit24 = new LegacySoundStyle(3, 24); + public static readonly LegacySoundStyle NPCHit25 = new LegacySoundStyle(3, 25); + public static readonly LegacySoundStyle NPCHit26 = new LegacySoundStyle(3, 26); + public static readonly LegacySoundStyle NPCHit27 = new LegacySoundStyle(3, 27); + public static readonly LegacySoundStyle NPCHit28 = new LegacySoundStyle(3, 28); + public static readonly LegacySoundStyle NPCHit29 = new LegacySoundStyle(3, 29); + public static readonly LegacySoundStyle NPCHit30 = new LegacySoundStyle(3, 30); + public static readonly LegacySoundStyle NPCHit31 = new LegacySoundStyle(3, 31); + public static readonly LegacySoundStyle NPCHit32 = new LegacySoundStyle(3, 32); + public static readonly LegacySoundStyle NPCHit33 = new LegacySoundStyle(3, 33); + public static readonly LegacySoundStyle NPCHit34 = new LegacySoundStyle(3, 34); + public static readonly LegacySoundStyle NPCHit35 = new LegacySoundStyle(3, 35); + public static readonly LegacySoundStyle NPCHit36 = new LegacySoundStyle(3, 36); + public static readonly LegacySoundStyle NPCHit37 = new LegacySoundStyle(3, 37); + public static readonly LegacySoundStyle NPCHit38 = new LegacySoundStyle(3, 38); + public static readonly LegacySoundStyle NPCHit39 = new LegacySoundStyle(3, 39); + public static readonly LegacySoundStyle NPCHit40 = new LegacySoundStyle(3, 40); + public static readonly LegacySoundStyle NPCHit41 = new LegacySoundStyle(3, 41); + public static readonly LegacySoundStyle NPCHit42 = new LegacySoundStyle(3, 42); + public static readonly LegacySoundStyle NPCHit43 = new LegacySoundStyle(3, 43); + public static readonly LegacySoundStyle NPCHit44 = new LegacySoundStyle(3, 44); + public static readonly LegacySoundStyle NPCHit45 = new LegacySoundStyle(3, 45); + public static readonly LegacySoundStyle NPCHit46 = new LegacySoundStyle(3, 46); + public static readonly LegacySoundStyle NPCHit47 = new LegacySoundStyle(3, 47); + public static readonly LegacySoundStyle NPCHit48 = new LegacySoundStyle(3, 48); + public static readonly LegacySoundStyle NPCHit49 = new LegacySoundStyle(3, 49); + public static readonly LegacySoundStyle NPCHit50 = new LegacySoundStyle(3, 50); + public static readonly LegacySoundStyle NPCHit51 = new LegacySoundStyle(3, 51); + public static readonly LegacySoundStyle NPCHit52 = new LegacySoundStyle(3, 52); + public static readonly LegacySoundStyle NPCHit53 = new LegacySoundStyle(3, 53); + public static readonly LegacySoundStyle NPCHit54 = new LegacySoundStyle(3, 54); + public static readonly LegacySoundStyle NPCHit55 = new LegacySoundStyle(3, 55); + public static readonly LegacySoundStyle NPCHit56 = new LegacySoundStyle(3, 56); + public static readonly LegacySoundStyle NPCHit57 = new LegacySoundStyle(3, 57); + public static readonly LegacySoundStyle NPCDeath1 = new LegacySoundStyle(4, 1); + public static readonly LegacySoundStyle NPCDeath2 = new LegacySoundStyle(4, 2); + public static readonly LegacySoundStyle NPCDeath3 = new LegacySoundStyle(4, 3); + public static readonly LegacySoundStyle NPCDeath4 = new LegacySoundStyle(4, 4); + public static readonly LegacySoundStyle NPCDeath5 = new LegacySoundStyle(4, 5); + public static readonly LegacySoundStyle NPCDeath6 = new LegacySoundStyle(4, 6); + public static readonly LegacySoundStyle NPCDeath7 = new LegacySoundStyle(4, 7); + public static readonly LegacySoundStyle NPCDeath8 = new LegacySoundStyle(4, 8); + public static readonly LegacySoundStyle NPCDeath9 = new LegacySoundStyle(4, 9); + public static readonly LegacySoundStyle NPCDeath10 = new LegacySoundStyle(4, 10); + public static readonly LegacySoundStyle NPCDeath11 = new LegacySoundStyle(4, 11); + public static readonly LegacySoundStyle NPCDeath12 = new LegacySoundStyle(4, 12); + public static readonly LegacySoundStyle NPCDeath13 = new LegacySoundStyle(4, 13); + public static readonly LegacySoundStyle NPCDeath14 = new LegacySoundStyle(4, 14); + public static readonly LegacySoundStyle NPCDeath15 = new LegacySoundStyle(4, 15); + public static readonly LegacySoundStyle NPCDeath16 = new LegacySoundStyle(4, 16); + public static readonly LegacySoundStyle NPCDeath17 = new LegacySoundStyle(4, 17); + public static readonly LegacySoundStyle NPCDeath18 = new LegacySoundStyle(4, 18); + public static readonly LegacySoundStyle NPCDeath19 = new LegacySoundStyle(4, 19); + public static readonly LegacySoundStyle NPCDeath20 = new LegacySoundStyle(4, 20); + public static readonly LegacySoundStyle NPCDeath21 = new LegacySoundStyle(4, 21); + public static readonly LegacySoundStyle NPCDeath22 = new LegacySoundStyle(4, 22); + public static readonly LegacySoundStyle NPCDeath23 = new LegacySoundStyle(4, 23); + public static readonly LegacySoundStyle NPCDeath24 = new LegacySoundStyle(4, 24); + public static readonly LegacySoundStyle NPCDeath25 = new LegacySoundStyle(4, 25); + public static readonly LegacySoundStyle NPCDeath26 = new LegacySoundStyle(4, 26); + public static readonly LegacySoundStyle NPCDeath27 = new LegacySoundStyle(4, 27); + public static readonly LegacySoundStyle NPCDeath28 = new LegacySoundStyle(4, 28); + public static readonly LegacySoundStyle NPCDeath29 = new LegacySoundStyle(4, 29); + public static readonly LegacySoundStyle NPCDeath30 = new LegacySoundStyle(4, 30); + public static readonly LegacySoundStyle NPCDeath31 = new LegacySoundStyle(4, 31); + public static readonly LegacySoundStyle NPCDeath32 = new LegacySoundStyle(4, 32); + public static readonly LegacySoundStyle NPCDeath33 = new LegacySoundStyle(4, 33); + public static readonly LegacySoundStyle NPCDeath34 = new LegacySoundStyle(4, 34); + public static readonly LegacySoundStyle NPCDeath35 = new LegacySoundStyle(4, 35); + public static readonly LegacySoundStyle NPCDeath36 = new LegacySoundStyle(4, 36); + public static readonly LegacySoundStyle NPCDeath37 = new LegacySoundStyle(4, 37); + public static readonly LegacySoundStyle NPCDeath38 = new LegacySoundStyle(4, 38); + public static readonly LegacySoundStyle NPCDeath39 = new LegacySoundStyle(4, 39); + public static readonly LegacySoundStyle NPCDeath40 = new LegacySoundStyle(4, 40); + public static readonly LegacySoundStyle NPCDeath41 = new LegacySoundStyle(4, 41); + public static readonly LegacySoundStyle NPCDeath42 = new LegacySoundStyle(4, 42); + public static readonly LegacySoundStyle NPCDeath43 = new LegacySoundStyle(4, 43); + public static readonly LegacySoundStyle NPCDeath44 = new LegacySoundStyle(4, 44); + public static readonly LegacySoundStyle NPCDeath45 = new LegacySoundStyle(4, 45); + public static readonly LegacySoundStyle NPCDeath46 = new LegacySoundStyle(4, 46); + public static readonly LegacySoundStyle NPCDeath47 = new LegacySoundStyle(4, 47); + public static readonly LegacySoundStyle NPCDeath48 = new LegacySoundStyle(4, 48); + public static readonly LegacySoundStyle NPCDeath49 = new LegacySoundStyle(4, 49); + public static readonly LegacySoundStyle NPCDeath50 = new LegacySoundStyle(4, 50); + public static readonly LegacySoundStyle NPCDeath51 = new LegacySoundStyle(4, 51); + public static readonly LegacySoundStyle NPCDeath52 = new LegacySoundStyle(4, 52); + public static readonly LegacySoundStyle NPCDeath53 = new LegacySoundStyle(4, 53); + public static readonly LegacySoundStyle NPCDeath54 = new LegacySoundStyle(4, 54); + public static readonly LegacySoundStyle NPCDeath55 = new LegacySoundStyle(4, 55); + public static readonly LegacySoundStyle NPCDeath56 = new LegacySoundStyle(4, 56); + public static readonly LegacySoundStyle NPCDeath57 = new LegacySoundStyle(4, 57); + public static readonly LegacySoundStyle NPCDeath58 = new LegacySoundStyle(4, 58); + public static readonly LegacySoundStyle NPCDeath59 = new LegacySoundStyle(4, 59); + public static readonly LegacySoundStyle NPCDeath60 = new LegacySoundStyle(4, 60); + public static readonly LegacySoundStyle NPCDeath61 = new LegacySoundStyle(4, 61); + public static readonly LegacySoundStyle NPCDeath62 = new LegacySoundStyle(4, 62); + public static readonly LegacySoundStyle NPCDeath63 = new LegacySoundStyle(4, 63); + public static readonly LegacySoundStyle NPCDeath64 = new LegacySoundStyle(4, 64); + public static readonly LegacySoundStyle NPCDeath65 = new LegacySoundStyle(4, 65); + public static short NPCDeathCount = 66; + public static readonly LegacySoundStyle Item1 = new LegacySoundStyle(2, 1); + public static readonly LegacySoundStyle Item2 = new LegacySoundStyle(2, 2); + public static readonly LegacySoundStyle Item3 = new LegacySoundStyle(2, 3); + public static readonly LegacySoundStyle Item4 = new LegacySoundStyle(2, 4); + public static readonly LegacySoundStyle Item5 = new LegacySoundStyle(2, 5); + public static readonly LegacySoundStyle Item6 = new LegacySoundStyle(2, 6); + public static readonly LegacySoundStyle Item7 = new LegacySoundStyle(2, 7); + public static readonly LegacySoundStyle Item8 = new LegacySoundStyle(2, 8); + public static readonly LegacySoundStyle Item9 = new LegacySoundStyle(2, 9); + public static readonly LegacySoundStyle Item10 = new LegacySoundStyle(2, 10); + public static readonly LegacySoundStyle Item11 = new LegacySoundStyle(2, 11); + public static readonly LegacySoundStyle Item12 = new LegacySoundStyle(2, 12); + public static readonly LegacySoundStyle Item13 = new LegacySoundStyle(2, 13); + public static readonly LegacySoundStyle Item14 = new LegacySoundStyle(2, 14); + public static readonly LegacySoundStyle Item15 = new LegacySoundStyle(2, 15); + public static readonly LegacySoundStyle Item16 = new LegacySoundStyle(2, 16); + public static readonly LegacySoundStyle Item17 = new LegacySoundStyle(2, 17); + public static readonly LegacySoundStyle Item18 = new LegacySoundStyle(2, 18); + public static readonly LegacySoundStyle Item19 = new LegacySoundStyle(2, 19); + public static readonly LegacySoundStyle Item20 = new LegacySoundStyle(2, 20); + public static readonly LegacySoundStyle Item21 = new LegacySoundStyle(2, 21); + public static readonly LegacySoundStyle Item22 = new LegacySoundStyle(2, 22); + public static readonly LegacySoundStyle Item23 = new LegacySoundStyle(2, 23); + public static readonly LegacySoundStyle Item24 = new LegacySoundStyle(2, 24); + public static readonly LegacySoundStyle Item25 = new LegacySoundStyle(2, 25); + public static readonly LegacySoundStyle Item26 = new LegacySoundStyle(2, 26); + public static readonly LegacySoundStyle Item27 = new LegacySoundStyle(2, 27); + public static readonly LegacySoundStyle Item28 = new LegacySoundStyle(2, 28); + public static readonly LegacySoundStyle Item29 = new LegacySoundStyle(2, 29); + public static readonly LegacySoundStyle Item30 = new LegacySoundStyle(2, 30); + public static readonly LegacySoundStyle Item31 = new LegacySoundStyle(2, 31); + public static readonly LegacySoundStyle Item32 = new LegacySoundStyle(2, 32); + public static readonly LegacySoundStyle Item33 = new LegacySoundStyle(2, 33); + public static readonly LegacySoundStyle Item34 = new LegacySoundStyle(2, 34); + public static readonly LegacySoundStyle Item35 = new LegacySoundStyle(2, 35); + public static readonly LegacySoundStyle Item36 = new LegacySoundStyle(2, 36); + public static readonly LegacySoundStyle Item37 = new LegacySoundStyle(2, 37); + public static readonly LegacySoundStyle Item38 = new LegacySoundStyle(2, 38); + public static readonly LegacySoundStyle Item39 = new LegacySoundStyle(2, 39); + public static readonly LegacySoundStyle Item40 = new LegacySoundStyle(2, 40); + public static readonly LegacySoundStyle Item41 = new LegacySoundStyle(2, 41); + public static readonly LegacySoundStyle Item42 = new LegacySoundStyle(2, 42); + public static readonly LegacySoundStyle Item43 = new LegacySoundStyle(2, 43); + public static readonly LegacySoundStyle Item44 = new LegacySoundStyle(2, 44); + public static readonly LegacySoundStyle Item45 = new LegacySoundStyle(2, 45); + public static readonly LegacySoundStyle Item46 = new LegacySoundStyle(2, 46); + public static readonly LegacySoundStyle Item47 = new LegacySoundStyle(2, 47); + public static readonly LegacySoundStyle Item48 = new LegacySoundStyle(2, 48); + public static readonly LegacySoundStyle Item49 = new LegacySoundStyle(2, 49); + public static readonly LegacySoundStyle Item50 = new LegacySoundStyle(2, 50); + public static readonly LegacySoundStyle Item51 = new LegacySoundStyle(2, 51); + public static readonly LegacySoundStyle Item52 = new LegacySoundStyle(2, 52); + public static readonly LegacySoundStyle Item53 = new LegacySoundStyle(2, 53); + public static readonly LegacySoundStyle Item54 = new LegacySoundStyle(2, 54); + public static readonly LegacySoundStyle Item55 = new LegacySoundStyle(2, 55); + public static readonly LegacySoundStyle Item56 = new LegacySoundStyle(2, 56); + public static readonly LegacySoundStyle Item57 = new LegacySoundStyle(2, 57); + public static readonly LegacySoundStyle Item58 = new LegacySoundStyle(2, 58); + public static readonly LegacySoundStyle Item59 = new LegacySoundStyle(2, 59); + public static readonly LegacySoundStyle Item60 = new LegacySoundStyle(2, 60); + public static readonly LegacySoundStyle Item61 = new LegacySoundStyle(2, 61); + public static readonly LegacySoundStyle Item62 = new LegacySoundStyle(2, 62); + public static readonly LegacySoundStyle Item63 = new LegacySoundStyle(2, 63); + public static readonly LegacySoundStyle Item64 = new LegacySoundStyle(2, 64); + public static readonly LegacySoundStyle Item65 = new LegacySoundStyle(2, 65); + public static readonly LegacySoundStyle Item66 = new LegacySoundStyle(2, 66); + public static readonly LegacySoundStyle Item67 = new LegacySoundStyle(2, 67); + public static readonly LegacySoundStyle Item68 = new LegacySoundStyle(2, 68); + public static readonly LegacySoundStyle Item69 = new LegacySoundStyle(2, 69); + public static readonly LegacySoundStyle Item70 = new LegacySoundStyle(2, 70); + public static readonly LegacySoundStyle Item71 = new LegacySoundStyle(2, 71); + public static readonly LegacySoundStyle Item72 = new LegacySoundStyle(2, 72); + public static readonly LegacySoundStyle Item73 = new LegacySoundStyle(2, 73); + public static readonly LegacySoundStyle Item74 = new LegacySoundStyle(2, 74); + public static readonly LegacySoundStyle Item75 = new LegacySoundStyle(2, 75); + public static readonly LegacySoundStyle Item76 = new LegacySoundStyle(2, 76); + public static readonly LegacySoundStyle Item77 = new LegacySoundStyle(2, 77); + public static readonly LegacySoundStyle Item78 = new LegacySoundStyle(2, 78); + public static readonly LegacySoundStyle Item79 = new LegacySoundStyle(2, 79); + public static readonly LegacySoundStyle Item80 = new LegacySoundStyle(2, 80); + public static readonly LegacySoundStyle Item81 = new LegacySoundStyle(2, 81); + public static readonly LegacySoundStyle Item82 = new LegacySoundStyle(2, 82); + public static readonly LegacySoundStyle Item83 = new LegacySoundStyle(2, 83); + public static readonly LegacySoundStyle Item84 = new LegacySoundStyle(2, 84); + public static readonly LegacySoundStyle Item85 = new LegacySoundStyle(2, 85); + public static readonly LegacySoundStyle Item86 = new LegacySoundStyle(2, 86); + public static readonly LegacySoundStyle Item87 = new LegacySoundStyle(2, 87); + public static readonly LegacySoundStyle Item88 = new LegacySoundStyle(2, 88); + public static readonly LegacySoundStyle Item89 = new LegacySoundStyle(2, 89); + public static readonly LegacySoundStyle Item90 = new LegacySoundStyle(2, 90); + public static readonly LegacySoundStyle Item91 = new LegacySoundStyle(2, 91); + public static readonly LegacySoundStyle Item92 = new LegacySoundStyle(2, 92); + public static readonly LegacySoundStyle Item93 = new LegacySoundStyle(2, 93); + public static readonly LegacySoundStyle Item94 = new LegacySoundStyle(2, 94); + public static readonly LegacySoundStyle Item95 = new LegacySoundStyle(2, 95); + public static readonly LegacySoundStyle Item96 = new LegacySoundStyle(2, 96); + public static readonly LegacySoundStyle Item97 = new LegacySoundStyle(2, 97); + public static readonly LegacySoundStyle Item98 = new LegacySoundStyle(2, 98); + public static readonly LegacySoundStyle Item99 = new LegacySoundStyle(2, 99); + public static readonly LegacySoundStyle Item100 = new LegacySoundStyle(2, 100); + public static readonly LegacySoundStyle Item101 = new LegacySoundStyle(2, 101); + public static readonly LegacySoundStyle Item102 = new LegacySoundStyle(2, 102); + public static readonly LegacySoundStyle Item103 = new LegacySoundStyle(2, 103); + public static readonly LegacySoundStyle Item104 = new LegacySoundStyle(2, 104); + public static readonly LegacySoundStyle Item105 = new LegacySoundStyle(2, 105); + public static readonly LegacySoundStyle Item106 = new LegacySoundStyle(2, 106); + public static readonly LegacySoundStyle Item107 = new LegacySoundStyle(2, 107); + public static readonly LegacySoundStyle Item108 = new LegacySoundStyle(2, 108); + public static readonly LegacySoundStyle Item109 = new LegacySoundStyle(2, 109); + public static readonly LegacySoundStyle Item110 = new LegacySoundStyle(2, 110); + public static readonly LegacySoundStyle Item111 = new LegacySoundStyle(2, 111); + public static readonly LegacySoundStyle Item112 = new LegacySoundStyle(2, 112); + public static readonly LegacySoundStyle Item113 = new LegacySoundStyle(2, 113); + public static readonly LegacySoundStyle Item114 = new LegacySoundStyle(2, 114); + public static readonly LegacySoundStyle Item115 = new LegacySoundStyle(2, 115); + public static readonly LegacySoundStyle Item116 = new LegacySoundStyle(2, 116); + public static readonly LegacySoundStyle Item117 = new LegacySoundStyle(2, 117); + public static readonly LegacySoundStyle Item118 = new LegacySoundStyle(2, 118); + public static readonly LegacySoundStyle Item119 = new LegacySoundStyle(2, 119); + public static readonly LegacySoundStyle Item120 = new LegacySoundStyle(2, 120); + public static readonly LegacySoundStyle Item121 = new LegacySoundStyle(2, 121); + public static readonly LegacySoundStyle Item122 = new LegacySoundStyle(2, 122); + public static readonly LegacySoundStyle Item123 = new LegacySoundStyle(2, 123); + public static readonly LegacySoundStyle Item124 = new LegacySoundStyle(2, 124); + public static readonly LegacySoundStyle Item125 = new LegacySoundStyle(2, 125); + public static readonly LegacySoundStyle Item126 = new LegacySoundStyle(2, 126); + public static readonly LegacySoundStyle Item127 = new LegacySoundStyle(2, (int) sbyte.MaxValue); + public static readonly LegacySoundStyle Item128 = new LegacySoundStyle(2, 128); + public static readonly LegacySoundStyle Item129 = new LegacySoundStyle(2, 129); + public static readonly LegacySoundStyle Item130 = new LegacySoundStyle(2, 130); + public static readonly LegacySoundStyle Item131 = new LegacySoundStyle(2, 131); + public static readonly LegacySoundStyle Item132 = new LegacySoundStyle(2, 132); + public static readonly LegacySoundStyle Item133 = new LegacySoundStyle(2, 133); + public static readonly LegacySoundStyle Item134 = new LegacySoundStyle(2, 134); + public static readonly LegacySoundStyle Item135 = new LegacySoundStyle(2, 135); + public static readonly LegacySoundStyle Item136 = new LegacySoundStyle(2, 136); + public static readonly LegacySoundStyle Item137 = new LegacySoundStyle(2, 137); + public static readonly LegacySoundStyle Item138 = new LegacySoundStyle(2, 138); + public static readonly LegacySoundStyle Item139 = new LegacySoundStyle(2, 139); + public static readonly LegacySoundStyle Item140 = new LegacySoundStyle(2, 140); + public static readonly LegacySoundStyle Item141 = new LegacySoundStyle(2, 141); + public static readonly LegacySoundStyle Item142 = new LegacySoundStyle(2, 142); + public static readonly LegacySoundStyle Item143 = new LegacySoundStyle(2, 143); + public static readonly LegacySoundStyle Item144 = new LegacySoundStyle(2, 144); + public static readonly LegacySoundStyle Item145 = new LegacySoundStyle(2, 145); + public static readonly LegacySoundStyle Item146 = new LegacySoundStyle(2, 146); + public static readonly LegacySoundStyle Item147 = new LegacySoundStyle(2, 147); + public static readonly LegacySoundStyle Item148 = new LegacySoundStyle(2, 148); + public static readonly LegacySoundStyle Item149 = new LegacySoundStyle(2, 149); + public static readonly LegacySoundStyle Item150 = new LegacySoundStyle(2, 150); + public static readonly LegacySoundStyle Item151 = new LegacySoundStyle(2, 151); + public static readonly LegacySoundStyle Item152 = new LegacySoundStyle(2, 152); + public static readonly LegacySoundStyle Item153 = new LegacySoundStyle(2, 153); + public static readonly LegacySoundStyle Item154 = new LegacySoundStyle(2, 154); + public static readonly LegacySoundStyle Item155 = new LegacySoundStyle(2, 155); + public static readonly LegacySoundStyle Item156 = new LegacySoundStyle(2, 156); + public static readonly LegacySoundStyle Item157 = new LegacySoundStyle(2, 157); + public static readonly LegacySoundStyle Item158 = new LegacySoundStyle(2, 158); + public static readonly LegacySoundStyle Item159 = new LegacySoundStyle(2, 159); + public static readonly LegacySoundStyle Item160 = new LegacySoundStyle(2, 160); + public static readonly LegacySoundStyle Item161 = new LegacySoundStyle(2, 161); + public static readonly LegacySoundStyle Item162 = new LegacySoundStyle(2, 162); + public static readonly LegacySoundStyle Item163 = new LegacySoundStyle(2, 163); + public static readonly LegacySoundStyle Item164 = new LegacySoundStyle(2, 164); + public static readonly LegacySoundStyle Item165 = new LegacySoundStyle(2, 165); + public static readonly LegacySoundStyle Item166 = new LegacySoundStyle(2, 166); + public static readonly LegacySoundStyle Item167 = new LegacySoundStyle(2, 167); + public static readonly LegacySoundStyle Item168 = new LegacySoundStyle(2, 168); + public static readonly LegacySoundStyle Item169 = new LegacySoundStyle(2, 169); + public static readonly LegacySoundStyle Item170 = new LegacySoundStyle(2, 170); + public static readonly LegacySoundStyle Item171 = new LegacySoundStyle(2, 171); + public static readonly LegacySoundStyle Item172 = new LegacySoundStyle(2, 172); + public static short ItemSoundCount = 173; + public static readonly LegacySoundStyle DD2_GoblinBomb = new LegacySoundStyle(2, 14).WithVolume(0.5f); + public static readonly LegacySoundStyle AchievementComplete = SoundID.CreateTrackable("achievement_complete"); + public static readonly LegacySoundStyle BlizzardInsideBuildingLoop = SoundID.CreateTrackable("blizzard_inside_building_loop", SoundType.Ambient); + public static readonly LegacySoundStyle BlizzardStrongLoop = SoundID.CreateTrackable("blizzard_strong_loop", SoundType.Ambient).WithVolume(0.5f); + public static readonly LegacySoundStyle LiquidsHoneyWater = SoundID.CreateTrackable("liquids_honey_water", 3, SoundType.Ambient); + public static readonly LegacySoundStyle LiquidsHoneyLava = SoundID.CreateTrackable("liquids_honey_lava", 3, SoundType.Ambient); + public static readonly LegacySoundStyle LiquidsWaterLava = SoundID.CreateTrackable("liquids_water_lava", 3, SoundType.Ambient); + public static readonly LegacySoundStyle DD2_BallistaTowerShot = SoundID.CreateTrackable("dd2_ballista_tower_shot", 3); + public static readonly LegacySoundStyle DD2_ExplosiveTrapExplode = SoundID.CreateTrackable("dd2_explosive_trap_explode", 3); + public static readonly LegacySoundStyle DD2_FlameburstTowerShot = SoundID.CreateTrackable("dd2_flameburst_tower_shot", 3); + public static readonly LegacySoundStyle DD2_LightningAuraZap = SoundID.CreateTrackable("dd2_lightning_aura_zap", 4); + public static readonly LegacySoundStyle DD2_DefenseTowerSpawn = SoundID.CreateTrackable("dd2_defense_tower_spawn"); + public static readonly LegacySoundStyle DD2_BetsyDeath = SoundID.CreateTrackable("dd2_betsy_death", 3); + public static readonly LegacySoundStyle DD2_BetsyFireballShot = SoundID.CreateTrackable("dd2_betsy_fireball_shot", 3); + public static readonly LegacySoundStyle DD2_BetsyFireballImpact = SoundID.CreateTrackable("dd2_betsy_fireball_impact", 3); + public static readonly LegacySoundStyle DD2_BetsyFlameBreath = SoundID.CreateTrackable("dd2_betsy_flame_breath"); + public static readonly LegacySoundStyle DD2_BetsyFlyingCircleAttack = SoundID.CreateTrackable("dd2_betsy_flying_circle_attack"); + public static readonly LegacySoundStyle DD2_BetsyHurt = SoundID.CreateTrackable("dd2_betsy_hurt", 3); + public static readonly LegacySoundStyle DD2_BetsyScream = SoundID.CreateTrackable("dd2_betsy_scream"); + public static readonly LegacySoundStyle DD2_BetsySummon = SoundID.CreateTrackable("dd2_betsy_summon", 3); + public static readonly LegacySoundStyle DD2_BetsyWindAttack = SoundID.CreateTrackable("dd2_betsy_wind_attack", 3); + public static readonly LegacySoundStyle DD2_DarkMageAttack = SoundID.CreateTrackable("dd2_dark_mage_attack", 3); + public static readonly LegacySoundStyle DD2_DarkMageCastHeal = SoundID.CreateTrackable("dd2_dark_mage_cast_heal", 3); + public static readonly LegacySoundStyle DD2_DarkMageDeath = SoundID.CreateTrackable("dd2_dark_mage_death", 3); + public static readonly LegacySoundStyle DD2_DarkMageHealImpact = SoundID.CreateTrackable("dd2_dark_mage_heal_impact", 3); + public static readonly LegacySoundStyle DD2_DarkMageHurt = SoundID.CreateTrackable("dd2_dark_mage_hurt", 3); + public static readonly LegacySoundStyle DD2_DarkMageSummonSkeleton = SoundID.CreateTrackable("dd2_dark_mage_summon_skeleton", 3); + public static readonly LegacySoundStyle DD2_DrakinBreathIn = SoundID.CreateTrackable("dd2_drakin_breath_in", 3); + public static readonly LegacySoundStyle DD2_DrakinDeath = SoundID.CreateTrackable("dd2_drakin_death", 3); + public static readonly LegacySoundStyle DD2_DrakinHurt = SoundID.CreateTrackable("dd2_drakin_hurt", 3); + public static readonly LegacySoundStyle DD2_DrakinShot = SoundID.CreateTrackable("dd2_drakin_shot", 3); + public static readonly LegacySoundStyle DD2_GoblinDeath = SoundID.CreateTrackable("dd2_goblin_death", 3); + public static readonly LegacySoundStyle DD2_GoblinHurt = SoundID.CreateTrackable("dd2_goblin_hurt", 6); + public static readonly LegacySoundStyle DD2_GoblinScream = SoundID.CreateTrackable("dd2_goblin_scream", 3); + public static readonly LegacySoundStyle DD2_GoblinBomberDeath = SoundID.CreateTrackable("dd2_goblin_bomber_death", 3); + public static readonly LegacySoundStyle DD2_GoblinBomberHurt = SoundID.CreateTrackable("dd2_goblin_bomber_hurt", 3); + public static readonly LegacySoundStyle DD2_GoblinBomberScream = SoundID.CreateTrackable("dd2_goblin_bomber_scream", 3); + public static readonly LegacySoundStyle DD2_GoblinBomberThrow = SoundID.CreateTrackable("dd2_goblin_bomber_throw", 3); + public static readonly LegacySoundStyle DD2_JavelinThrowersAttack = SoundID.CreateTrackable("dd2_javelin_throwers_attack", 3); + public static readonly LegacySoundStyle DD2_JavelinThrowersDeath = SoundID.CreateTrackable("dd2_javelin_throwers_death", 3); + public static readonly LegacySoundStyle DD2_JavelinThrowersHurt = SoundID.CreateTrackable("dd2_javelin_throwers_hurt", 3); + public static readonly LegacySoundStyle DD2_JavelinThrowersTaunt = SoundID.CreateTrackable("dd2_javelin_throwers_taunt", 3); + public static readonly LegacySoundStyle DD2_KoboldDeath = SoundID.CreateTrackable("dd2_kobold_death", 3); + public static readonly LegacySoundStyle DD2_KoboldExplosion = SoundID.CreateTrackable("dd2_kobold_explosion", 3); + public static readonly LegacySoundStyle DD2_KoboldHurt = SoundID.CreateTrackable("dd2_kobold_hurt", 3); + public static readonly LegacySoundStyle DD2_KoboldIgnite = SoundID.CreateTrackable("dd2_kobold_ignite"); + public static readonly LegacySoundStyle DD2_KoboldIgniteLoop = SoundID.CreateTrackable("dd2_kobold_ignite_loop"); + public static readonly LegacySoundStyle DD2_KoboldScreamChargeLoop = SoundID.CreateTrackable("dd2_kobold_scream_charge_loop"); + public static readonly LegacySoundStyle DD2_KoboldFlyerChargeScream = SoundID.CreateTrackable("dd2_kobold_flyer_charge_scream", 3); + public static readonly LegacySoundStyle DD2_KoboldFlyerDeath = SoundID.CreateTrackable("dd2_kobold_flyer_death", 3); + public static readonly LegacySoundStyle DD2_KoboldFlyerHurt = SoundID.CreateTrackable("dd2_kobold_flyer_hurt", 3); + public static readonly LegacySoundStyle DD2_LightningBugDeath = SoundID.CreateTrackable("dd2_lightning_bug_death", 3); + public static readonly LegacySoundStyle DD2_LightningBugHurt = SoundID.CreateTrackable("dd2_lightning_bug_hurt", 3); + public static readonly LegacySoundStyle DD2_LightningBugZap = SoundID.CreateTrackable("dd2_lightning_bug_zap", 3); + public static readonly LegacySoundStyle DD2_OgreAttack = SoundID.CreateTrackable("dd2_ogre_attack", 3); + public static readonly LegacySoundStyle DD2_OgreDeath = SoundID.CreateTrackable("dd2_ogre_death", 3); + public static readonly LegacySoundStyle DD2_OgreGroundPound = SoundID.CreateTrackable("dd2_ogre_ground_pound"); + public static readonly LegacySoundStyle DD2_OgreHurt = SoundID.CreateTrackable("dd2_ogre_hurt", 3); + public static readonly LegacySoundStyle DD2_OgreRoar = SoundID.CreateTrackable("dd2_ogre_roar", 3); + public static readonly LegacySoundStyle DD2_OgreSpit = SoundID.CreateTrackable("dd2_ogre_spit"); + public static readonly LegacySoundStyle DD2_SkeletonDeath = SoundID.CreateTrackable("dd2_skeleton_death", 3); + public static readonly LegacySoundStyle DD2_SkeletonHurt = SoundID.CreateTrackable("dd2_skeleton_hurt", 3); + public static readonly LegacySoundStyle DD2_SkeletonSummoned = SoundID.CreateTrackable("dd2_skeleton_summoned"); + public static readonly LegacySoundStyle DD2_WitherBeastAuraPulse = SoundID.CreateTrackable("dd2_wither_beast_aura_pulse", 2); + public static readonly LegacySoundStyle DD2_WitherBeastCrystalImpact = SoundID.CreateTrackable("dd2_wither_beast_crystal_impact", 3); + public static readonly LegacySoundStyle DD2_WitherBeastDeath = SoundID.CreateTrackable("dd2_wither_beast_death", 3); + public static readonly LegacySoundStyle DD2_WitherBeastHurt = SoundID.CreateTrackable("dd2_wither_beast_hurt", 3); + public static readonly LegacySoundStyle DD2_WyvernDeath = SoundID.CreateTrackable("dd2_wyvern_death", 3); + public static readonly LegacySoundStyle DD2_WyvernHurt = SoundID.CreateTrackable("dd2_wyvern_hurt", 3); + public static readonly LegacySoundStyle DD2_WyvernScream = SoundID.CreateTrackable("dd2_wyvern_scream", 3); + public static readonly LegacySoundStyle DD2_WyvernDiveDown = SoundID.CreateTrackable("dd2_wyvern_dive_down", 3); + public static readonly LegacySoundStyle DD2_EtherianPortalDryadTouch = SoundID.CreateTrackable("dd2_etherian_portal_dryad_touch"); + public static readonly LegacySoundStyle DD2_EtherianPortalIdleLoop = SoundID.CreateTrackable("dd2_etherian_portal_idle_loop"); + public static readonly LegacySoundStyle DD2_EtherianPortalOpen = SoundID.CreateTrackable("dd2_etherian_portal_open"); + public static readonly LegacySoundStyle DD2_EtherianPortalSpawnEnemy = SoundID.CreateTrackable("dd2_etherian_portal_spawn_enemy", 3); + public static readonly LegacySoundStyle DD2_CrystalCartImpact = SoundID.CreateTrackable("dd2_crystal_cart_impact", 3); + public static readonly LegacySoundStyle DD2_DefeatScene = SoundID.CreateTrackable("dd2_defeat_scene"); + public static readonly LegacySoundStyle DD2_WinScene = SoundID.CreateTrackable("dd2_win_scene"); + public static readonly LegacySoundStyle DD2_BetsysWrathShot = SoundID.DD2_BetsyFireballShot.WithVolume(0.4f); + public static readonly LegacySoundStyle DD2_BetsysWrathImpact = SoundID.DD2_BetsyFireballImpact.WithVolume(0.4f); + public static readonly LegacySoundStyle DD2_BookStaffCast = SoundID.CreateTrackable("dd2_book_staff_cast", 3); + public static readonly LegacySoundStyle DD2_BookStaffTwisterLoop = SoundID.CreateTrackable("dd2_book_staff_twister_loop"); + public static readonly LegacySoundStyle DD2_GhastlyGlaiveImpactGhost = SoundID.CreateTrackable("dd2_ghastly_glaive_impact_ghost", 3); + public static readonly LegacySoundStyle DD2_GhastlyGlaivePierce = SoundID.CreateTrackable("dd2_ghastly_glaive_pierce", 3); + public static readonly LegacySoundStyle DD2_MonkStaffGroundImpact = SoundID.CreateTrackable("dd2_monk_staff_ground_impact", 3); + public static readonly LegacySoundStyle DD2_MonkStaffGroundMiss = SoundID.CreateTrackable("dd2_monk_staff_ground_miss", 3); + public static readonly LegacySoundStyle DD2_MonkStaffSwing = SoundID.CreateTrackable("dd2_monk_staff_swing", 4); + public static readonly LegacySoundStyle DD2_PhantomPhoenixShot = SoundID.CreateTrackable("dd2_phantom_phoenix_shot", 3); + public static readonly LegacySoundStyle DD2_SonicBoomBladeSlash = SoundID.CreateTrackable("dd2_sonic_boom_blade_slash", 3, SoundID.ItemDefaults).WithVolume(0.5f); + public static readonly LegacySoundStyle DD2_SkyDragonsFuryCircle = SoundID.CreateTrackable("dd2_sky_dragons_fury_circle", 3); + public static readonly LegacySoundStyle DD2_SkyDragonsFuryShot = SoundID.CreateTrackable("dd2_sky_dragons_fury_shot", 3); + public static readonly LegacySoundStyle DD2_SkyDragonsFurySwing = SoundID.CreateTrackable("dd2_sky_dragons_fury_swing", 4); + private static List _trackableLegacySoundPathList; + public static Dictionary SoundByName = (Dictionary) null; + public static Dictionary IndexByName = (Dictionary) null; + public static Dictionary SoundByIndex = (Dictionary) null; + + public static int TrackableLegacySoundCount => SoundID._trackableLegacySoundPathList.Count; + + public static string GetTrackableLegacySoundPath(int id) => SoundID._trackableLegacySoundPathList[id]; + + private static LegacySoundStyle CreateTrackable( + string name, + SoundID.SoundStyleDefaults defaults) + { + return SoundID.CreateTrackable(name, 1, defaults.Type).WithPitchVariance(defaults.PitchVariance).WithVolume(defaults.Volume); + } + + private static LegacySoundStyle CreateTrackable( + string name, + int variations, + SoundID.SoundStyleDefaults defaults) + { + return SoundID.CreateTrackable(name, variations, defaults.Type).WithPitchVariance(defaults.PitchVariance).WithVolume(defaults.Volume); + } + + private static LegacySoundStyle CreateTrackable(string name, SoundType type = SoundType.Sound) => SoundID.CreateTrackable(name, 1, type); + + private static LegacySoundStyle CreateTrackable( + string name, + int variations, + SoundType type = SoundType.Sound) + { + if (SoundID._trackableLegacySoundPathList == null) + SoundID._trackableLegacySoundPathList = new List(); + int count = SoundID._trackableLegacySoundPathList.Count; + if (variations == 1) + { + SoundID._trackableLegacySoundPathList.Add(name); + } + else + { + for (int index = 0; index < variations; ++index) + SoundID._trackableLegacySoundPathList.Add(name + "_" + (object) index); + } + return new LegacySoundStyle(42, count, variations, type); + } + + public static void FillAccessMap() + { + Dictionary ret = new Dictionary(); + Dictionary ret2 = new Dictionary(); + Dictionary ret3 = new Dictionary(); + ushort nextIndex = 0; + List list = ((IEnumerable) typeof (SoundID).GetFields(BindingFlags.Static | BindingFlags.Public)).Where((Func) (f => f.FieldType == typeof (LegacySoundStyle))).ToList(); + list.Sort((Comparison) ((a, b) => string.Compare(a.Name, b.Name))); + list.ForEach((Action) (field => + { + ret[field.Name] = (LegacySoundStyle) field.GetValue((object) null); + ret2[field.Name] = nextIndex; + ret3[nextIndex] = (LegacySoundStyle) field.GetValue((object) null); + ++nextIndex; + })); + SoundID.SoundByName = ret; + SoundID.IndexByName = ret2; + SoundID.SoundByIndex = ret3; + } + + private struct SoundStyleDefaults + { + public readonly float PitchVariance; + public readonly float Volume; + public readonly SoundType Type; + + public SoundStyleDefaults(float volume, float pitchVariance, SoundType type = SoundType.Sound) + { + this.PitchVariance = pitchVariance; + this.Volume = volume; + this.Type = type; + } + } + } +} diff --git a/ID/StatusID.cs b/ID/StatusID.cs new file mode 100644 index 0000000..4e00fb5 --- /dev/null +++ b/ID/StatusID.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.StatusID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public class StatusID + { + public const int Ok = 0; + public const int LaterVersion = 1; + public const int UnknownError = 2; + public const int EmptyFile = 3; + public const int DecryptionError = 4; + public const int BadSectionPointer = 5; + public const int BadFooter = 6; + } +} diff --git a/ID/SurfaceBackgroundID.cs b/ID/SurfaceBackgroundID.cs new file mode 100644 index 0000000..776c955 --- /dev/null +++ b/ID/SurfaceBackgroundID.cs @@ -0,0 +1,26 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.SurfaceBackgroundID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public static class SurfaceBackgroundID + { + public const int Forest1 = 0; + public const int Corruption = 1; + public const int Desert = 2; + public const int Jungle = 3; + public const int Ocean = 4; + public const int GoodEvilDesert = 5; + public const int Hallow = 6; + public const int Snow = 7; + public const int Crimson = 8; + public const int Mushroom = 9; + public const int Forest2 = 10; + public const int Forest3 = 11; + public const int Forest4 = 12; + public const int Empty = 13; + } +} diff --git a/ID/TeleportationSide.cs b/ID/TeleportationSide.cs new file mode 100644 index 0000000..b02b6ea --- /dev/null +++ b/ID/TeleportationSide.cs @@ -0,0 +1,14 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.TeleportationSide +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public enum TeleportationSide + { + Entry, + Exit, + } +} diff --git a/ID/TeleportationStyleID.cs b/ID/TeleportationStyleID.cs new file mode 100644 index 0000000..16bc05f --- /dev/null +++ b/ID/TeleportationStyleID.cs @@ -0,0 +1,23 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.TeleportationStyleID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public static class TeleportationStyleID + { + public const int TeleporterTile = 0; + public const int RodOfDiscord = 1; + public const int TeleportationPotion = 2; + public const int RecallPotion = 3; + public const int Portal = 4; + public const int MagicConch = 5; + public const int DebugTeleport = 6; + public const int DemonConch = 7; + public const int PotionOfReturn = 8; + public const int TeleportationPylon = 9; + public const int QueenSlimeHook = 10; + } +} diff --git a/ID/TileChangeType.cs b/ID/TileChangeType.cs new file mode 100644 index 0000000..987d5f4 --- /dev/null +++ b/ID/TileChangeType.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.TileChangeType +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public enum TileChangeType : byte + { + None, + LavaWater, + HoneyWater, + HoneyLava, + } +} diff --git a/ID/TileEntityID.cs b/ID/TileEntityID.cs new file mode 100644 index 0000000..0d2d185 --- /dev/null +++ b/ID/TileEntityID.cs @@ -0,0 +1,12 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.TileEntityID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public class TileEntityID + { + } +} diff --git a/ID/TileID.cs b/ID/TileID.cs new file mode 100644 index 0000000..6868993 --- /dev/null +++ b/ID/TileID.cs @@ -0,0 +1,825 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.TileID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using ReLogic.Reflection; + +namespace Terraria.ID +{ + public class TileID + { + public static readonly IdDictionary Search = IdDictionary.Create(); + public const ushort Dirt = 0; + public const ushort Stone = 1; + public const ushort Grass = 2; + public const ushort Plants = 3; + public const ushort Torches = 4; + public const ushort Trees = 5; + public const ushort Iron = 6; + public const ushort Copper = 7; + public const ushort Gold = 8; + public const ushort Silver = 9; + public const ushort ClosedDoor = 10; + public const ushort OpenDoor = 11; + public const ushort Heart = 12; + public const ushort Bottles = 13; + public const ushort Tables = 14; + public const ushort Chairs = 15; + public const ushort Anvils = 16; + public const ushort Furnaces = 17; + public const ushort WorkBenches = 18; + public const ushort Platforms = 19; + public const ushort Saplings = 20; + public const ushort Containers = 21; + public const ushort Demonite = 22; + public const ushort CorruptGrass = 23; + public const ushort CorruptPlants = 24; + public const ushort Ebonstone = 25; + public const ushort DemonAltar = 26; + public const ushort Sunflower = 27; + public const ushort Pots = 28; + public const ushort PiggyBank = 29; + public const ushort WoodBlock = 30; + public const ushort ShadowOrbs = 31; + public const ushort CorruptThorns = 32; + public const ushort Candles = 33; + public const ushort Chandeliers = 34; + public const ushort Jackolanterns = 35; + public const ushort Presents = 36; + public const ushort Meteorite = 37; + public const ushort GrayBrick = 38; + public const ushort RedBrick = 39; + public const ushort ClayBlock = 40; + public const ushort BlueDungeonBrick = 41; + public const ushort HangingLanterns = 42; + public const ushort GreenDungeonBrick = 43; + public const ushort PinkDungeonBrick = 44; + public const ushort GoldBrick = 45; + public const ushort SilverBrick = 46; + public const ushort CopperBrick = 47; + public const ushort Spikes = 48; + public const ushort WaterCandle = 49; + public const ushort Books = 50; + public const ushort Cobweb = 51; + public const ushort Vines = 52; + public const ushort Sand = 53; + public const ushort Glass = 54; + public const ushort Signs = 55; + public const ushort Obsidian = 56; + public const ushort Ash = 57; + public const ushort Hellstone = 58; + public const ushort Mud = 59; + public const ushort JungleGrass = 60; + public const ushort JunglePlants = 61; + public const ushort JungleVines = 62; + public const ushort Sapphire = 63; + public const ushort Ruby = 64; + public const ushort Emerald = 65; + public const ushort Topaz = 66; + public const ushort Amethyst = 67; + public const ushort Diamond = 68; + public const ushort JungleThorns = 69; + public const ushort MushroomGrass = 70; + public const ushort MushroomPlants = 71; + public const ushort MushroomTrees = 72; + public const ushort Plants2 = 73; + public const ushort JunglePlants2 = 74; + public const ushort ObsidianBrick = 75; + public const ushort HellstoneBrick = 76; + public const ushort Hellforge = 77; + public const ushort ClayPot = 78; + public const ushort Beds = 79; + public const ushort Cactus = 80; + public const ushort Coral = 81; + public const ushort ImmatureHerbs = 82; + public const ushort MatureHerbs = 83; + public const ushort BloomingHerbs = 84; + public const ushort Tombstones = 85; + public const ushort Loom = 86; + public const ushort Pianos = 87; + public const ushort Dressers = 88; + public const ushort Benches = 89; + public const ushort Bathtubs = 90; + public const ushort Banners = 91; + public const ushort Lampposts = 92; + public const ushort Lamps = 93; + public const ushort Kegs = 94; + public const ushort ChineseLanterns = 95; + public const ushort CookingPots = 96; + public const ushort Safes = 97; + public const ushort SkullLanterns = 98; + public const ushort TrashCan = 99; + public const ushort Candelabras = 100; + public const ushort Bookcases = 101; + public const ushort Thrones = 102; + public const ushort Bowls = 103; + public const ushort GrandfatherClocks = 104; + public const ushort Statues = 105; + public const ushort Sawmill = 106; + public const ushort Cobalt = 107; + public const ushort Mythril = 108; + public const ushort HallowedGrass = 109; + public const ushort HallowedPlants = 110; + public const ushort Adamantite = 111; + public const ushort Ebonsand = 112; + public const ushort HallowedPlants2 = 113; + public const ushort TinkerersWorkbench = 114; + public const ushort HallowedVines = 115; + public const ushort Pearlsand = 116; + public const ushort Pearlstone = 117; + public const ushort PearlstoneBrick = 118; + public const ushort IridescentBrick = 119; + public const ushort Mudstone = 120; + public const ushort CobaltBrick = 121; + public const ushort MythrilBrick = 122; + public const ushort Silt = 123; + public const ushort WoodenBeam = 124; + public const ushort CrystalBall = 125; + public const ushort DiscoBall = 126; + public const ushort MagicalIceBlock = 127; + public const ushort Mannequin = 128; + public const ushort Crystals = 129; + public const ushort ActiveStoneBlock = 130; + public const ushort InactiveStoneBlock = 131; + public const ushort Lever = 132; + public const ushort AdamantiteForge = 133; + public const ushort MythrilAnvil = 134; + public const ushort PressurePlates = 135; + public const ushort Switches = 136; + public const ushort Traps = 137; + public const ushort Boulder = 138; + public const ushort MusicBoxes = 139; + public const ushort DemoniteBrick = 140; + public const ushort Explosives = 141; + public const ushort InletPump = 142; + public const ushort OutletPump = 143; + public const ushort Timers = 144; + public const ushort CandyCaneBlock = 145; + public const ushort GreenCandyCaneBlock = 146; + public const ushort SnowBlock = 147; + public const ushort SnowBrick = 148; + public const ushort HolidayLights = 149; + public const ushort AdamantiteBeam = 150; + public const ushort SandstoneBrick = 151; + public const ushort EbonstoneBrick = 152; + public const ushort RedStucco = 153; + public const ushort YellowStucco = 154; + public const ushort GreenStucco = 155; + public const ushort GrayStucco = 156; + public const ushort Ebonwood = 157; + public const ushort RichMahogany = 158; + public const ushort Pearlwood = 159; + public const ushort RainbowBrick = 160; + public const ushort IceBlock = 161; + public const ushort BreakableIce = 162; + public const ushort CorruptIce = 163; + public const ushort HallowedIce = 164; + public const ushort Stalactite = 165; + public const ushort Tin = 166; + public const ushort Lead = 167; + public const ushort Tungsten = 168; + public const ushort Platinum = 169; + public const ushort PineTree = 170; + public const ushort ChristmasTree = 171; + public const ushort Sinks = 172; + public const ushort PlatinumCandelabra = 173; + public const ushort PlatinumCandle = 174; + public const ushort TinBrick = 175; + public const ushort TungstenBrick = 176; + public const ushort PlatinumBrick = 177; + public const ushort ExposedGems = 178; + public const ushort GreenMoss = 179; + public const ushort BrownMoss = 180; + public const ushort RedMoss = 181; + public const ushort BlueMoss = 182; + public const ushort PurpleMoss = 183; + public const ushort LongMoss = 184; + public const ushort SmallPiles = 185; + public const ushort LargePiles = 186; + public const ushort LargePiles2 = 187; + public const ushort CactusBlock = 188; + public const ushort Cloud = 189; + public const ushort MushroomBlock = 190; + public const ushort LivingWood = 191; + public const ushort LeafBlock = 192; + public const ushort SlimeBlock = 193; + public const ushort BoneBlock = 194; + public const ushort FleshBlock = 195; + public const ushort RainCloud = 196; + public const ushort FrozenSlimeBlock = 197; + public const ushort Asphalt = 198; + public const ushort CrimsonGrass = 199; + public const ushort FleshIce = 200; + public const ushort CrimsonPlants = 201; + public const ushort Sunplate = 202; + public const ushort Crimstone = 203; + public const ushort Crimtane = 204; + public const ushort CrimsonVines = 205; + public const ushort IceBrick = 206; + public const ushort WaterFountain = 207; + public const ushort Shadewood = 208; + public const ushort Cannon = 209; + public const ushort LandMine = 210; + public const ushort Chlorophyte = 211; + public const ushort SnowballLauncher = 212; + public const ushort Rope = 213; + public const ushort Chain = 214; + public const ushort Campfire = 215; + public const ushort Firework = 216; + public const ushort Blendomatic = 217; + public const ushort MeatGrinder = 218; + public const ushort Extractinator = 219; + public const ushort Solidifier = 220; + public const ushort Palladium = 221; + public const ushort Orichalcum = 222; + public const ushort Titanium = 223; + public const ushort Slush = 224; + public const ushort Hive = 225; + public const ushort LihzahrdBrick = 226; + public const ushort DyePlants = 227; + public const ushort DyeVat = 228; + public const ushort HoneyBlock = 229; + public const ushort CrispyHoneyBlock = 230; + public const ushort Larva = 231; + public const ushort WoodenSpikes = 232; + public const ushort PlantDetritus = 233; + public const ushort Crimsand = 234; + public const ushort Teleporter = 235; + public const ushort LifeFruit = 236; + public const ushort LihzahrdAltar = 237; + public const ushort PlanteraBulb = 238; + public const ushort MetalBars = 239; + public const ushort Painting3X3 = 240; + public const ushort Painting4X3 = 241; + public const ushort Painting6X4 = 242; + public const ushort ImbuingStation = 243; + public const ushort BubbleMachine = 244; + public const ushort Painting2X3 = 245; + public const ushort Painting3X2 = 246; + public const ushort Autohammer = 247; + public const ushort PalladiumColumn = 248; + public const ushort BubblegumBlock = 249; + public const ushort Titanstone = 250; + public const ushort PumpkinBlock = 251; + public const ushort HayBlock = 252; + public const ushort SpookyWood = 253; + public const ushort Pumpkins = 254; + public const ushort AmethystGemsparkOff = 255; + public const ushort TopazGemsparkOff = 256; + public const ushort SapphireGemsparkOff = 257; + public const ushort EmeraldGemsparkOff = 258; + public const ushort RubyGemsparkOff = 259; + public const ushort DiamondGemsparkOff = 260; + public const ushort AmberGemsparkOff = 261; + public const ushort AmethystGemspark = 262; + public const ushort TopazGemspark = 263; + public const ushort SapphireGemspark = 264; + public const ushort EmeraldGemspark = 265; + public const ushort RubyGemspark = 266; + public const ushort DiamondGemspark = 267; + public const ushort AmberGemspark = 268; + public const ushort Womannequin = 269; + public const ushort FireflyinaBottle = 270; + public const ushort LightningBuginaBottle = 271; + public const ushort Cog = 272; + public const ushort StoneSlab = 273; + public const ushort SandStoneSlab = 274; + public const ushort BunnyCage = 275; + public const ushort SquirrelCage = 276; + public const ushort MallardDuckCage = 277; + public const ushort DuckCage = 278; + public const ushort BirdCage = 279; + public const ushort BlueJay = 280; + public const ushort CardinalCage = 281; + public const ushort FishBowl = 282; + public const ushort HeavyWorkBench = 283; + public const ushort CopperPlating = 284; + public const ushort SnailCage = 285; + public const ushort GlowingSnailCage = 286; + public const ushort AmmoBox = 287; + public const ushort MonarchButterflyJar = 288; + public const ushort PurpleEmperorButterflyJar = 289; + public const ushort RedAdmiralButterflyJar = 290; + public const ushort UlyssesButterflyJar = 291; + public const ushort SulphurButterflyJar = 292; + public const ushort TreeNymphButterflyJar = 293; + public const ushort ZebraSwallowtailButterflyJar = 294; + public const ushort JuliaButterflyJar = 295; + public const ushort ScorpionCage = 296; + public const ushort BlackScorpionCage = 297; + public const ushort FrogCage = 298; + public const ushort MouseCage = 299; + public const ushort BoneWelder = 300; + public const ushort FleshCloningVat = 301; + public const ushort GlassKiln = 302; + public const ushort LihzahrdFurnace = 303; + public const ushort LivingLoom = 304; + public const ushort SkyMill = 305; + public const ushort IceMachine = 306; + public const ushort SteampunkBoiler = 307; + public const ushort HoneyDispenser = 308; + public const ushort PenguinCage = 309; + public const ushort WormCage = 310; + public const ushort DynastyWood = 311; + public const ushort RedDynastyShingles = 312; + public const ushort BlueDynastyShingles = 313; + public const ushort MinecartTrack = 314; + public const ushort Coralstone = 315; + public const ushort BlueJellyfishBowl = 316; + public const ushort GreenJellyfishBowl = 317; + public const ushort PinkJellyfishBowl = 318; + public const ushort ShipInABottle = 319; + public const ushort SeaweedPlanter = 320; + public const ushort BorealWood = 321; + public const ushort PalmWood = 322; + public const ushort PalmTree = 323; + public const ushort BeachPiles = 324; + public const ushort TinPlating = 325; + public const ushort Waterfall = 326; + public const ushort Lavafall = 327; + public const ushort Confetti = 328; + public const ushort ConfettiBlack = 329; + public const ushort CopperCoinPile = 330; + public const ushort SilverCoinPile = 331; + public const ushort GoldCoinPile = 332; + public const ushort PlatinumCoinPile = 333; + public const ushort WeaponsRack = 334; + public const ushort FireworksBox = 335; + public const ushort LivingFire = 336; + public const ushort AlphabetStatues = 337; + public const ushort FireworkFountain = 338; + public const ushort GrasshopperCage = 339; + public const ushort LivingCursedFire = 340; + public const ushort LivingDemonFire = 341; + public const ushort LivingFrostFire = 342; + public const ushort LivingIchor = 343; + public const ushort LivingUltrabrightFire = 344; + public const ushort Honeyfall = 345; + public const ushort ChlorophyteBrick = 346; + public const ushort CrimtaneBrick = 347; + public const ushort ShroomitePlating = 348; + public const ushort MushroomStatue = 349; + public const ushort MartianConduitPlating = 350; + public const ushort ChimneySmoke = 351; + public const ushort CrimsonThorns = 352; + public const ushort VineRope = 353; + public const ushort BewitchingTable = 354; + public const ushort AlchemyTable = 355; + public const ushort Sundial = 356; + public const ushort MarbleBlock = 357; + public const ushort GoldBirdCage = 358; + public const ushort GoldBunnyCage = 359; + public const ushort GoldButterflyCage = 360; + public const ushort GoldFrogCage = 361; + public const ushort GoldGrasshopperCage = 362; + public const ushort GoldMouseCage = 363; + public const ushort GoldWormCage = 364; + public const ushort SilkRope = 365; + public const ushort WebRope = 366; + public const ushort Marble = 367; + public const ushort Granite = 368; + public const ushort GraniteBlock = 369; + public const ushort MeteoriteBrick = 370; + public const ushort PinkSlimeBlock = 371; + public const ushort PeaceCandle = 372; + public const ushort WaterDrip = 373; + public const ushort LavaDrip = 374; + public const ushort HoneyDrip = 375; + public const ushort FishingCrate = 376; + public const ushort SharpeningStation = 377; + public const ushort TargetDummy = 378; + public const ushort Bubble = 379; + public const ushort PlanterBox = 380; + public const ushort LavaMoss = 381; + public const ushort VineFlowers = 382; + public const ushort LivingMahogany = 383; + public const ushort LivingMahoganyLeaves = 384; + public const ushort CrystalBlock = 385; + public const ushort TrapdoorOpen = 386; + public const ushort TrapdoorClosed = 387; + public const ushort TallGateClosed = 388; + public const ushort TallGateOpen = 389; + public const ushort LavaLamp = 390; + public const ushort CageEnchantedNightcrawler = 391; + public const ushort CageBuggy = 392; + public const ushort CageGrubby = 393; + public const ushort CageSluggy = 394; + public const ushort ItemFrame = 395; + public const ushort Sandstone = 396; + public const ushort HardenedSand = 397; + public const ushort CorruptHardenedSand = 398; + public const ushort CrimsonHardenedSand = 399; + public const ushort CorruptSandstone = 400; + public const ushort CrimsonSandstone = 401; + public const ushort HallowHardenedSand = 402; + public const ushort HallowSandstone = 403; + public const ushort DesertFossil = 404; + public const ushort Fireplace = 405; + public const ushort Chimney = 406; + public const ushort FossilOre = 407; + public const ushort LunarOre = 408; + public const ushort LunarBrick = 409; + public const ushort LunarMonolith = 410; + public const ushort Detonator = 411; + public const ushort LunarCraftingStation = 412; + public const ushort SquirrelOrangeCage = 413; + public const ushort SquirrelGoldCage = 414; + public const ushort LunarBlockSolar = 415; + public const ushort LunarBlockVortex = 416; + public const ushort LunarBlockNebula = 417; + public const ushort LunarBlockStardust = 418; + public const ushort LogicGateLamp = 419; + public const ushort LogicGate = 420; + public const ushort ConveyorBeltLeft = 421; + public const ushort ConveyorBeltRight = 422; + public const ushort LogicSensor = 423; + public const ushort WirePipe = 424; + public const ushort AnnouncementBox = 425; + public const ushort TeamBlockRed = 426; + public const ushort TeamBlockRedPlatform = 427; + public const ushort WeightedPressurePlate = 428; + public const ushort WireBulb = 429; + public const ushort TeamBlockGreen = 430; + public const ushort TeamBlockBlue = 431; + public const ushort TeamBlockYellow = 432; + public const ushort TeamBlockPink = 433; + public const ushort TeamBlockWhite = 434; + public const ushort TeamBlockGreenPlatform = 435; + public const ushort TeamBlockBluePlatform = 436; + public const ushort TeamBlockYellowPlatform = 437; + public const ushort TeamBlockPinkPlatform = 438; + public const ushort TeamBlockWhitePlatform = 439; + public const ushort GemLocks = 440; + public const ushort FakeContainers = 441; + public const ushort ProjectilePressurePad = 442; + public const ushort GeyserTrap = 443; + public const ushort BeeHive = 444; + public const ushort PixelBox = 445; + public const ushort SillyBalloonPink = 446; + public const ushort SillyBalloonPurple = 447; + public const ushort SillyBalloonGreen = 448; + public const ushort SillyStreamerBlue = 449; + public const ushort SillyStreamerGreen = 450; + public const ushort SillyStreamerPink = 451; + public const ushort SillyBalloonMachine = 452; + public const ushort SillyBalloonTile = 453; + public const ushort Pigronata = 454; + public const ushort PartyMonolith = 455; + public const ushort PartyBundleOfBalloonTile = 456; + public const ushort PartyPresent = 457; + public const ushort SandFallBlock = 458; + public const ushort SnowFallBlock = 459; + public const ushort SnowCloud = 460; + public const ushort SandDrip = 461; + public const ushort DjinnLamp = 462; + public const ushort DefendersForge = 463; + public const ushort WarTable = 464; + public const ushort WarTableBanner = 465; + public const ushort ElderCrystalStand = 466; + public const ushort Containers2 = 467; + public const ushort FakeContainers2 = 468; + public const ushort Tables2 = 469; + public const ushort DisplayDoll = 470; + public const ushort WeaponsRack2 = 471; + public const ushort IronBrick = 472; + public const ushort LeadBrick = 473; + public const ushort LesionBlock = 474; + public const ushort HatRack = 475; + public const ushort GolfHole = 476; + public const ushort GolfGrass = 477; + public const ushort CrimstoneBrick = 478; + public const ushort SmoothSandstone = 479; + public const ushort BloodMoonMonolith = 480; + public const ushort CrackedBlueDungeonBrick = 481; + public const ushort CrackedGreenDungeonBrick = 482; + public const ushort CrackedPinkDungeonBrick = 483; + public const ushort RollingCactus = 484; + public const ushort AntlionLarva = 485; + public const ushort DrumSet = 486; + public const ushort PicnicTable = 487; + public const ushort FallenLog = 488; + public const ushort PinWheel = 489; + public const ushort WeatherVane = 490; + public const ushort VoidVault = 491; + public const ushort GolfGrassHallowed = 492; + public const ushort GolfCupFlag = 493; + public const ushort GolfTee = 494; + public const ushort ShellPile = 495; + public const ushort AntiPortalBlock = 496; + public const ushort Toilets = 497; + public const ushort Spider = 498; + public const ushort LesionStation = 499; + public const ushort SolarBrick = 500; + public const ushort VortexBrick = 501; + public const ushort NebulaBrick = 502; + public const ushort StardustBrick = 503; + public const ushort MysticSnakeRope = 504; + public const ushort GoldGoldfishBowl = 505; + public const ushort CatBast = 506; + public const ushort GoldStarryGlassBlock = 507; + public const ushort BlueStarryGlassBlock = 508; + public const ushort VoidMonolith = 509; + public const ushort ArrowSign = 510; + public const ushort PaintedArrowSign = 511; + public const ushort GreenMossBrick = 512; + public const ushort BrownMossBrick = 513; + public const ushort RedMossBrick = 514; + public const ushort BlueMossBrick = 515; + public const ushort PurpleMossBrick = 516; + public const ushort LavaMossBrick = 517; + public const ushort LilyPad = 518; + public const ushort Cattail = 519; + public const ushort FoodPlatter = 520; + public const ushort BlackDragonflyJar = 521; + public const ushort BlueDragonflyJar = 522; + public const ushort GreenDragonflyJar = 523; + public const ushort OrangeDragonflyJar = 524; + public const ushort RedDragonflyJar = 525; + public const ushort YellowDragonflyJar = 526; + public const ushort GoldDragonflyJar = 527; + public const ushort MushroomVines = 528; + public const ushort SeaOats = 529; + public const ushort OasisPlants = 530; + public const ushort BoulderStatue = 531; + public const ushort MaggotCage = 532; + public const ushort RatCage = 533; + public const ushort KryptonMoss = 534; + public const ushort KryptonMossBrick = 535; + public const ushort XenonMoss = 536; + public const ushort XenonMossBrick = 537; + public const ushort LadybugCage = 538; + public const ushort ArgonMoss = 539; + public const ushort ArgonMossBrick = 540; + public const ushort EchoBlock = 541; + public const ushort OwlCage = 542; + public const ushort PupfishBowl = 543; + public const ushort GoldLadybugCage = 544; + public const ushort LawnFlamingo = 545; + public const ushort Grate = 546; + public const ushort PottedPlants1 = 547; + public const ushort PottedPlants2 = 548; + public const ushort Seaweed = 549; + public const ushort TurtleCage = 550; + public const ushort TurtleJungleCage = 551; + public const ushort Sandcastles = 552; + public const ushort GrebeCage = 553; + public const ushort SeagullCage = 554; + public const ushort WaterStriderCage = 555; + public const ushort GoldWaterStriderCage = 556; + public const ushort GrateClosed = 557; + public const ushort SeahorseCage = 558; + public const ushort GoldSeahorseCage = 559; + public const ushort GolfTrophies = 560; + public const ushort MarbleColumn = 561; + public const ushort BambooBlock = 562; + public const ushort LargeBambooBlock = 563; + public const ushort PlasmaLamp = 564; + public const ushort FogMachine = 565; + public const ushort AmberStoneBlock = 566; + public const ushort GardenGnome = 567; + public const ushort PinkFairyJar = 568; + public const ushort GreenFairyJar = 569; + public const ushort BlueFairyJar = 570; + public const ushort Bamboo = 571; + public const ushort SoulBottles = 572; + public const ushort TatteredWoodSign = 573; + public const ushort BorealBeam = 574; + public const ushort RichMahoganyBeam = 575; + public const ushort GraniteColumn = 576; + public const ushort SandstoneColumn = 577; + public const ushort MushroomBeam = 578; + public const ushort RockGolemHead = 579; + public const ushort HellButterflyJar = 580; + public const ushort LavaflyinaBottle = 581; + public const ushort MagmaSnailCage = 582; + public const ushort TreeTopaz = 583; + public const ushort TreeAmethyst = 584; + public const ushort TreeSapphire = 585; + public const ushort TreeEmerald = 586; + public const ushort TreeRuby = 587; + public const ushort TreeDiamond = 588; + public const ushort TreeAmber = 589; + public const ushort GemSaplings = 590; + public const ushort PotsSuspended = 591; + public const ushort BrazierSuspended = 592; + public const ushort VolcanoSmall = 593; + public const ushort VolcanoLarge = 594; + public const ushort VanityTreeSakuraSaplings = 595; + public const ushort VanityTreeSakura = 596; + public const ushort TeleportationPylon = 597; + public const ushort LavafishBowl = 598; + public const ushort AmethystBunnyCage = 599; + public const ushort TopazBunnyCage = 600; + public const ushort SapphireBunnyCage = 601; + public const ushort EmeraldBunnyCage = 602; + public const ushort RubyBunnyCage = 603; + public const ushort DiamondBunnyCage = 604; + public const ushort AmberBunnyCage = 605; + public const ushort AmethystSquirrelCage = 606; + public const ushort TopazSquirrelCage = 607; + public const ushort SapphireSquirrelCage = 608; + public const ushort EmeraldSquirrelCage = 609; + public const ushort RubySquirrelCage = 610; + public const ushort DiamondSquirrelCage = 611; + public const ushort AmberSquirrelCage = 612; + public const ushort PottedLavaPlants = 613; + public const ushort PottedLavaPlantTendrils = 614; + public const ushort VanityTreeWillowSaplings = 615; + public const ushort VanityTreeYellowWillow = 616; + public const ushort MasterTrophyBase = 617; + public const ushort AccentSlab = 618; + public const ushort TruffleWormCage = 619; + public const ushort EmpressButterflyJar = 620; + public const ushort SliceOfCake = 621; + public const ushort TeaKettle = 622; + public const ushort Count = 623; + + public static class Sets + { + public static SetFactory Factory = new SetFactory(623); + public static bool[] IsATreeTrunk = TileID.Sets.Factory.CreateBoolSet(false, 5, 72, 583, 584, 585, 586, 587, 588, 589, 596, 616); + public static bool[] IsShakeable = TileID.Sets.Factory.CreateBoolSet(false, 5, 72, 323, 583, 584, 585, 586, 587, 588, 589, 596, 616); + public static bool[] GetsDestroyedForMeteors = TileID.Sets.Factory.CreateBoolSet(false, 5, 32, 352, 583, 584, 585, 586, 587, 588, 589, 596, 616); + public static bool[] GetsCheckedForLeaves = TileID.Sets.Factory.CreateBoolSet(false, 5, 323, 72, 583, 584, 585, 586, 587, 588, 589, 596, 616); + public static bool[] PreventsTileRemovalIfOnTopOfIt = TileID.Sets.Factory.CreateBoolSet(false, 5, 323, 72, 488, 26, 583, 584, 585, 586, 587, 588, 589, 596, 616); + public static bool[] PreventsTileReplaceIfOnTopOfIt = TileID.Sets.Factory.CreateBoolSet(false, 5, 323, 72, 583, 584, 585, 586, 587, 588, 589, 596, 616); + public static bool[] CommonSapling = TileID.Sets.Factory.CreateBoolSet(false, 20, 590, 595, 615); + public static bool[] AllBlocksWithSmoothBordersToResolveHalfBlockIssue = TileID.Sets.Factory.CreateBoolSet(false, 321, 157, 208, 159, 190, 80, 251, 202, 229, 56, 38, 39, 152, 118, 151, 148, 206, 119, 175, 46, 176, 45, 140, 347, 370, 121, 122, 346, 160, 226, 54, 156, 155, 153, 154, 150, 250, 198, 273, 274, 325, 284, 348, 385, 327, 326, 345, 328, 329, 357, 369, 268, 261, 262, (int) byte.MaxValue, 267, 260, 265, 258, 266, 259, 264, 257, 263, 256, 311, 431, 426, 433, 430, 434, 432, 272, 145, 146, 350, (int) sbyte.MaxValue, 472, 473, 477, 478, 479, 492, 496, 507, 508, 563, 618); + public static bool[] CanBeDugByShovel = TileID.Sets.Factory.CreateBoolSet(false, 0, 59, 57, 123, 224, 147, 2, 109, 23, 199, 60, 70, 477, 492, 53, 116, 112, 234, 40, 495); + public static bool[] NonSolidSaveSlopes = TileID.Sets.Factory.CreateBoolSet(false, 131); + public static bool[] ResetsHalfBrickPlacementAttempt = TileID.Sets.Factory.CreateBoolSet(true, 2, 23, 60, 70, 199, 109, 477, 492, 179, 512, 180, 513, 181, 514, 182, 515, 183, 516, 381, 517, 534, 535, 536, 537, 539, 540); + public static bool[] CrackedBricks = TileID.Sets.Factory.CreateBoolSet(481, 482, 483); + public static bool[] ForcedDirtMerging = TileID.Sets.Factory.CreateBoolSet(75, 76, 508, 507, 226, 409, 273, 274, 459, 458, 326, 327, 345, 328, 329, 192, 384, 284, 325, 272, 268, 262, 267, 265, 266, 264, 263, 54); + public static bool[] Paintings = TileID.Sets.Factory.CreateBoolSet(245, 246, 240, 241, 242); + public static bool[] isDesertBiomeSand = TileID.Sets.Factory.CreateBoolSet(53, 397, 396, 400, 403, 401); + public static bool[] MergesWithClouds = TileID.Sets.Factory.CreateBoolSet(196, 460); + public static bool[] Boulders = TileID.Sets.Factory.CreateBoolSet(138, 484); + public static bool[] Clouds = TileID.Sets.Factory.CreateBoolSet(189, 196, 460); + public static int[] SmartCursorPickaxePriorityOverride = TileID.Sets.Factory.CreateIntSet(0, 12, 1); + public static bool[] IgnoreSmartCursorPriorityAxe = TileID.Sets.Factory.CreateBoolSet(false, 488); + public static bool[] CanBeSatOnForNPCs = TileID.Sets.Factory.CreateBoolSet(false, 15, 497); + public static bool[] CanBeSatOnForPlayers = TileID.Sets.Factory.CreateBoolSet(false, 15, 497, 89, 102, 487); + public static bool[] CanBeSleptIn = TileID.Sets.Factory.CreateBoolSet(false, 79); + public static bool[] IgnoresTileReplacementDropCheckWhenBeingPlaced = TileID.Sets.Factory.CreateBoolSet(false, 158, 30); + public static bool?[] DrawTileInSolidLayer = TileID.Sets.Factory.CreateCustomSet(new bool?(), (object) (ushort) 11, (object) true, (object) (ushort) 470, (object) true, (object) (ushort) 475, (object) true, (object) (ushort) 78, (object) true, (object) (ushort) 579, (object) true); + public static bool[] DoesntPlaceWithTileReplacement = TileID.Sets.Factory.CreateBoolSet(2, 70, 109, 199, 23); + public static bool[] DoesntGetReplacedWithTileReplacement = TileID.Sets.Factory.CreateBoolSet(58, 225, 171, (int) sbyte.MaxValue, 481, 482, 483); + public static bool[] IsVine = TileID.Sets.Factory.CreateBoolSet(52, 382, 62, 115, 205, 528); + public static bool[] IsBeam = TileID.Sets.Factory.CreateBoolSet(124, 561, 574, 575, 576, 577, 578); + public static bool[] Platforms = TileID.Sets.Factory.CreateBoolSet(19, 427, 435, 436, 437, 438, 439); + public static bool[] ReplaceTileBreakUp = TileID.Sets.Factory.CreateBoolSet(27, 20, 227, 24, 201, 110, 113, 61, 74, 71, 3, 73, 186, 187, 185, 233, 530, 236, 238, 254, 484, 485, 84, 82, 83, 529, 549, 590, 595, 615); + public static bool[] ReplaceTileBreakDown = TileID.Sets.Factory.CreateBoolSet(205, 115, 62, 52, 382, 444, 528); + public static bool[] SlowlyDiesInWater = TileID.Sets.Factory.CreateBoolSet(3, 20, 24, 27, 73, 201, 80, 110, 529, 530, 590, 595, 615); + public static bool[] DrawsWalls = TileID.Sets.Factory.CreateBoolSet(10, 54, 138, 484, 388, 191, 137, 328, 162, 387, 48, 232, (int) sbyte.MaxValue, 459, 541, 546); + public static ushort[] GemsparkFramingTypes = TileID.Sets.Factory.CreateUshortSet((ushort) 0, (ushort) 265, (ushort) 265, (ushort) 258, (ushort) 258, (ushort) 264, (ushort) 264, (ushort) 257, (ushort) 257, (ushort) 267, (ushort) 267, (ushort) 260, (ushort) 260, (ushort) 266, (ushort) 266, (ushort) 259, (ushort) 259, (ushort) 263, (ushort) 263, (ushort) 256, (ushort) 256, (ushort) 262, (ushort) 262, (ushort) byte.MaxValue, (ushort) byte.MaxValue, (ushort) 268, (ushort) 268, (ushort) 261, (ushort) 261, (ushort) 385, (ushort) 385, (ushort) 446, (ushort) 446, (ushort) 447, (ushort) 447, (ushort) 448, (ushort) 448); + public static bool[] TeamTiles = TileID.Sets.Factory.CreateBoolSet(426, 430, 431, 432, 433, 434, 427, 435, 436, 437, 438, 439); + public static int[] ConveyorDirection = TileID.Sets.Factory.CreateIntSet(0, 421, 1, 422, -1); + public static bool[] VineThreads = TileID.Sets.Factory.CreateBoolSet(382, 62, 115, 205, 52, 528); + public static bool[] ReverseVineThreads = TileID.Sets.Factory.CreateBoolSet(549); + public static bool[] HasSlopeFrames = TileID.Sets.Factory.CreateBoolSet(421, 422); + public static bool[] TileInteractRead = TileID.Sets.Factory.CreateBoolSet(55, 85, 425, 573); + public static bool[] IgnoresNearbyHalfbricksWhenDrawn = TileID.Sets.Factory.CreateBoolSet(380, 476, 235, 138, 137, 484, 421, 422); + public static bool[] SwaysInWindBasic = TileID.Sets.Factory.CreateBoolSet(3, 20, 24, 61, 71, 73, 74, 83, 84, 110, 113, 201, 227, 529, 590, 595, 615); + public static int[] DrawFlipMode = TileID.Sets.Factory.CreateIntSet(0, 3, 1, 13, 1, 20, 1, 24, 1, 49, 1, 372, 1, 50, 1, 52, 1, 61, 1, 62, 1, 71, 1, 73, 1, 74, 1, 81, 1, 82, 1, 83, 1, 84, 1, 91, 1, 92, 1, 93, 1, 110, 1, 113, 1, 115, 1, 135, 1, 141, 1, 165, 1, 174, 1, 201, 1, 205, 1, 227, 1, 270, 1, 271, 1, 382, 1, 184, 2, 185, 3, 528, 1, 529, 1, 590, 1, 595, 1, 615, 1); + public static bool[] HasOutlines = TileID.Sets.Factory.CreateBoolSet(10, 11, 15, 21, 29, 55, 79, 85, 88, 89, 97, 102, 104, 125, 132, 136, 139, 144, 207, 209, 212, 215, 216, 237, 287, 335, 338, 354, 356, 377, 386, 387, 388, 389, 410, 411, 425, 441, 455, 463, 467, 468, 470, 475, 487, 480, 494, 497, 509, 510, 511, 621); + public static bool[] AllTiles = TileID.Sets.Factory.CreateBoolSet(true); + public static bool[] Mud = TileID.Sets.Factory.CreateBoolSet(59); + public static bool[] Snow = TileID.Sets.Factory.CreateBoolSet(147); + public static bool[] Ices = TileID.Sets.Factory.CreateBoolSet(161, 200, 163, 164); + public static bool[] IcesSlush = TileID.Sets.Factory.CreateBoolSet(161, 200, 163, 164, 224); + public static bool[] IcesSnow = TileID.Sets.Factory.CreateBoolSet(161, 200, 163, 164, 147); + public static bool[] GrassSpecial = TileID.Sets.Factory.CreateBoolSet(70, 60); + public static bool[] JungleSpecial = TileID.Sets.Factory.CreateBoolSet(226, 225, 211); + public static bool[] HellSpecial = TileID.Sets.Factory.CreateBoolSet(58, 76, 75); + public static bool[] Leaves = TileID.Sets.Factory.CreateBoolSet(384, 192); + public static bool[] tileMossBrick = TileID.Sets.Factory.CreateBoolSet(false, 512, 513, 514, 515, 516, 517, 535, 537, 540); + public static bool[] GeneralPlacementTiles = TileID.Sets.Factory.CreateBoolSet(true, 225, 41, 481, 43, 482, 44, 483, 226, 203, 112, 25, 70, 151, 21, 31, 467, 12); + public static bool[] BasicChest = TileID.Sets.Factory.CreateBoolSet(21, 467); + public static bool[] BasicChestFake = TileID.Sets.Factory.CreateBoolSet(441, 468); + public static bool[] BasicDresser = TileID.Sets.Factory.CreateBoolSet(88); + public static bool[] CanBeClearedDuringGeneration = TileID.Sets.Factory.CreateBoolSet(true, 396, 400, 401, 397, 398, 399, 404, 368, 367, 226, 237); + public static bool[] Corrupt = TileID.Sets.Factory.CreateBoolSet(23, 25, 112, 163, 398, 400); + public static bool[] Hallow = TileID.Sets.Factory.CreateBoolSet(109, 117, 116, 164, 402, 403, 115); + public static bool[] Crimson = TileID.Sets.Factory.CreateBoolSet(199, 203, 234, 200, 399, 401, 205); + public static bool[] IsSkippedForNPCSpawningGroundTypeCheck = TileID.Sets.Factory.CreateBoolSet(false, 421, 422); + public static bool[] BlocksStairs = TileID.Sets.Factory.CreateBoolSet(386, 387, 54, 541); + public static bool[] BlocksStairsAbove = TileID.Sets.Factory.CreateBoolSet(386, 387); + public static bool[] NotReallySolid = TileID.Sets.Factory.CreateBoolSet(387, 388, 10); + public static bool[] BlocksWaterDrawingBehindSelf = TileID.Sets.Factory.CreateBoolSet(false, 54, 541, 328, 470); + public static bool[] AllowLightInWater = TileID.Sets.Factory.CreateBoolSet(false, 54, 541, 328); + public static bool[] NeedsGrassFraming = TileID.Sets.Factory.CreateBoolSet(); + public static int[] NeedsGrassFramingDirt = TileID.Sets.Factory.CreateIntSet(0); + public static bool[] ChecksForMerge = TileID.Sets.Factory.CreateBoolSet(0, 2, 60, 70, 199, 109, 477, 492, 57, 58, 75, 76, 147, 161, 164, 163, 200, 162, 189, 196, 460, 224, 191, 383, 211, 225, 59, 226, 396, 397, 398, 399, 402, 400, 401, 403, 404, 234, 112, 407); + public static bool[] FramesOnKillWall = TileID.Sets.Factory.CreateBoolSet(440, 240, 241, 242, 245, 246, 4, 136, 334, 132, 55, 395, 425, 440, 471, 510, 511, 573); + public static bool[] AvoidedByNPCs = TileID.Sets.Factory.CreateBoolSet(21, 467, 55, 85, 395, 88, 463, 334, 29, 97, 99, 356, 425, 440, 209, 441, 468, 471, 491, 510, 511, 520, 573); + public static bool[] InteractibleByNPCs = TileID.Sets.Factory.CreateBoolSet(17, 77, 133, 12, 26, 35, 36, 55, 395, 471, 21, 467, 29, 97, 88, 99, 463, 491, 33, 372, 174, 49, 100, 173, 78, 79, 94, 96, 101, 50, 103, 282, 106, 114, 125, 171, 172, 207, 215, 220, 219, 244, 228, 237, 247, 128, 269, 354, 355, 377, 287, 378, 390, 302, 405, 406, 411, 425, 209, 441, 468, 452, 454, 455, 457, 462, 470, 475, 494, 499, 505, 511, 510, 520, 543, 565, 573, 597, 598, 617, 621); + public static bool[] HousingWalls = TileID.Sets.Factory.CreateBoolSet(11, 389, 386); + public static bool[] BreakableWhenPlacing = TileID.Sets.Factory.CreateBoolSet(324, 186, 187, 185, 165, 530, 233, 227, 485, 81); + public static int[] TouchDamageVines = TileID.Sets.Factory.CreateIntSet(0, 32, 10, 69, 17, 80, 6, 352, 10); + public static int[] TouchDamageSands = TileID.Sets.Factory.CreateIntSet(0, 53, 15, 112, 15, 116, 15, 123, 15, 224, 15, 234, 15, 57, 15, 69, 15); + public static int[] TouchDamageHot = TileID.Sets.Factory.CreateIntSet(0, 37, 20, 58, 20, 76, 20); + public static int[] TouchDamageOther = TileID.Sets.Factory.CreateIntSet(0, 48, 40, 232, 60); + public static bool[] Falling = TileID.Sets.Factory.CreateBoolSet(53, 234, 112, 116, 224, 123, 330, 331, 332, 333, 495); + public static bool[] OreMergesWithMud = TileID.Sets.Factory.CreateBoolSet(7, 166, 6, 167, 9, 168, 8, 169, 22, 204, 37, 58, 107, 221, 108, 222, 111, 223); + public static bool[] Ore = TileID.Sets.Factory.CreateBoolSet(7, 166, 6, 167, 9, 168, 8, 169, 22, 204, 37, 58, 107, 221, 108, 222, 111, 223, 211); + public static bool[] IsAContainer = TileID.Sets.Factory.CreateBoolSet(21, 467, 88); + public static bool[] IsAMechanism = TileID.Sets.Factory.CreateBoolSet(137, 443, 105, 349, 141, 142, 143, 42, 34, 130, 131, 506, 546, 557, 593, 594); + public static bool[] IsATrigger = TileID.Sets.Factory.CreateBoolSet(135, 136, 132, 144, 411, 441, 468); + public static bool[] FriendlyFairyCanLureTo = TileID.Sets.Factory.CreateBoolSet(8, 169, 21, 467, 107, 108, 111, 221, 222, 223, 211, 12, 236, 227); + public static bool[] IgnoredInHouseScore = TileID.Sets.Factory.CreateBoolSet(4, 3, 73, 82, 83, 84); + public static bool[] SpreadOverground = TileID.Sets.Factory.CreateBoolSet(2, 23, 32, 60, 70, 109, 199, 352, 477, 492); + public static bool[] SpreadUnderground = TileID.Sets.Factory.CreateBoolSet(23, 109, 199, 60, 70); + + public static class Conversion + { + public static bool[] MergesWithDirtInASpecialWay = TileID.Sets.Factory.CreateBoolSet(2, 23, 109, 199, 477, 492); + public static bool[] Grass = TileID.Sets.Factory.CreateBoolSet(2, 23, 60, 199, 109, 477, 492); + public static bool[] GolfGrass = TileID.Sets.Factory.CreateBoolSet(477, 492); + public static bool[] Stone = TileID.Sets.Factory.CreateBoolSet(1, 25, 117, 203); + public static bool[] Ice = TileID.Sets.Factory.CreateBoolSet(161, 163, 164, 200); + public static bool[] Sand = TileID.Sets.Factory.CreateBoolSet(53, 112, 116, 234); + public static bool[] HardenedSand = TileID.Sets.Factory.CreateBoolSet(397, 398, 402, 399); + public static bool[] Sandstone = TileID.Sets.Factory.CreateBoolSet(396, 400, 403, 401); + public static bool[] Thorn = TileID.Sets.Factory.CreateBoolSet(32, 352, 69); + public static bool[] Moss = TileID.Sets.Factory.CreateBoolSet(182, 180, 179, 381, 183, 181, 534, 536, 539); + public static bool[] MossBrick = TileID.Sets.Factory.CreateBoolSet(512, 513, 514, 515, 516, 517, 535, 537, 540); + } + + public static class ForAdvancedCollision + { + public static bool[] ForSandshark = TileID.Sets.Factory.CreateBoolSet(397, 398, 402, 399, 396, 400, 403, 401, 53, 112, 116, 234, 407, 404); + } + + public static class RoomNeeds + { + public static int[] CountsAsChair = new int[6] + { + 15, + 79, + 89, + 102, + 487, + 497 + }; + public static int[] CountsAsTable = new int[11] + { + 14, + 18, + 87, + 88, + 90, + 101, + 354, + 355, + 464, + 469, + 487 + }; + public static int[] CountsAsTorch = new int[23] + { + 4, + 33, + 34, + 35, + 42, + 49, + 93, + 95, + 98, + 100, + 149, + 173, + 174, + 270, + 271, + 316, + 317, + 318, + 92, + 372, + 405, + 592, + 572 + }; + public static int[] CountsAsDoor = new int[13] + { + 10, + 11, + 19, + 387, + 386, + 388, + 389, + 436, + 435, + 438, + 427, + 439, + 437 + }; + } + } + } +} diff --git a/ID/TorchID.cs b/ID/TorchID.cs new file mode 100644 index 0000000..7963707 --- /dev/null +++ b/ID/TorchID.cs @@ -0,0 +1,139 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.TorchID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Runtime.InteropServices; + +namespace Terraria.ID +{ + public static class TorchID + { + public static int[] Dust = new int[22] + { + 6, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 75, + 135, + 158, + 169, + 156, + 234, + 66, + 242, + 293, + 294, + 295, + 296, + 297, + 298 + }; + private static TorchID.ITorchLightProvider[] _lights; + public const short Torch = 0; + public const short Blue = 1; + public const short Red = 2; + public const short Green = 3; + public const short Purple = 4; + public const short White = 5; + public const short Yellow = 6; + public const short Demon = 7; + public const short Cursed = 8; + public const short Ice = 9; + public const short Orange = 10; + public const short Ichor = 11; + public const short UltraBright = 12; + public const short Bone = 13; + public const short Rainbow = 14; + public const short Pink = 15; + public const short Desert = 16; + public const short Coral = 17; + public const short Corrupt = 18; + public const short Crimson = 19; + public const short Hallowed = 20; + public const short Jungle = 21; + public const short Count = 22; + + public static void Initialize() => TorchID._lights = new TorchID.ITorchLightProvider[22] + { + (TorchID.ITorchLightProvider) new TorchID.ConstantTorchLight(1f, 0.95f, 0.8f), + (TorchID.ITorchLightProvider) new TorchID.ConstantTorchLight(0.0f, 0.1f, 1.3f), + (TorchID.ITorchLightProvider) new TorchID.ConstantTorchLight(1f, 0.1f, 0.1f), + (TorchID.ITorchLightProvider) new TorchID.ConstantTorchLight(0.0f, 1f, 0.1f), + (TorchID.ITorchLightProvider) new TorchID.ConstantTorchLight(0.9f, 0.0f, 0.9f), + (TorchID.ITorchLightProvider) new TorchID.ConstantTorchLight(1.4f, 1.4f, 1.4f), + (TorchID.ITorchLightProvider) new TorchID.ConstantTorchLight(0.9f, 0.9f, 0.0f), + (TorchID.ITorchLightProvider) new TorchID.DemonTorchLight(), + (TorchID.ITorchLightProvider) new TorchID.ConstantTorchLight(1f, 1.6f, 0.5f), + (TorchID.ITorchLightProvider) new TorchID.ConstantTorchLight(0.75f, 0.85f, 1.4f), + (TorchID.ITorchLightProvider) new TorchID.ConstantTorchLight(1f, 0.5f, 0.0f), + (TorchID.ITorchLightProvider) new TorchID.ConstantTorchLight(1.4f, 1.4f, 0.7f), + (TorchID.ITorchLightProvider) new TorchID.ConstantTorchLight(0.75f, 1.35f, 1.5f), + (TorchID.ITorchLightProvider) new TorchID.ConstantTorchLight(0.95f, 0.75f, 1.3f), + (TorchID.ITorchLightProvider) new TorchID.DiscoTorchLight(), + (TorchID.ITorchLightProvider) new TorchID.ConstantTorchLight(1f, 0.0f, 1f), + (TorchID.ITorchLightProvider) new TorchID.ConstantTorchLight(1.4f, 0.85f, 0.55f), + (TorchID.ITorchLightProvider) new TorchID.ConstantTorchLight(0.25f, 1.3f, 0.8f), + (TorchID.ITorchLightProvider) new TorchID.ConstantTorchLight(0.95f, 0.4f, 1.4f), + (TorchID.ITorchLightProvider) new TorchID.ConstantTorchLight(1.4f, 0.7f, 0.5f), + (TorchID.ITorchLightProvider) new TorchID.ConstantTorchLight(1.25f, 0.6f, 1.2f), + (TorchID.ITorchLightProvider) new TorchID.ConstantTorchLight(0.75f, 1.45f, 0.9f) + }; + + public static void TorchColor(int torchID, out float R, out float G, out float B) => TorchID._lights[torchID].GetRGB(out R, out G, out B); + + private interface ITorchLightProvider + { + void GetRGB(out float r, out float g, out float b); + } + + private struct ConstantTorchLight : TorchID.ITorchLightProvider + { + public float R; + public float G; + public float B; + + public ConstantTorchLight(float Red, float Green, float Blue) + { + this.R = Red; + this.G = Green; + this.B = Blue; + } + + public void GetRGB(out float r, out float g, out float b) + { + r = this.R; + g = this.G; + b = this.B; + } + } + + [StructLayout(LayoutKind.Sequential, Size = 1)] + private struct DemonTorchLight : TorchID.ITorchLightProvider + { + public void GetRGB(out float r, out float g, out float b) + { + r = (float) (0.5 * (double) Main.demonTorch + (1.0 - (double) Main.demonTorch)); + g = 0.3f; + b = Main.demonTorch + (float) (0.5 * (1.0 - (double) Main.demonTorch)); + } + } + + [StructLayout(LayoutKind.Sequential, Size = 1)] + private struct DiscoTorchLight : TorchID.ITorchLightProvider + { + public void GetRGB(out float r, out float g, out float b) + { + r = (float) Main.DiscoR / (float) byte.MaxValue; + g = (float) Main.DiscoG / (float) byte.MaxValue; + b = (float) Main.DiscoB / (float) byte.MaxValue; + } + } + } +} diff --git a/ID/TreeTopID.cs b/ID/TreeTopID.cs new file mode 100644 index 0000000..195773d --- /dev/null +++ b/ID/TreeTopID.cs @@ -0,0 +1,13 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.TreeTopID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public static class TreeTopID + { + public const int GemRuby = 26; + } +} diff --git a/ID/WallID.cs b/ID/WallID.cs new file mode 100644 index 0000000..c8f1063 --- /dev/null +++ b/ID/WallID.cs @@ -0,0 +1,353 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.WallID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public class WallID + { + public const ushort None = 0; + public const ushort Stone = 1; + public const ushort DirtUnsafe = 2; + public const ushort EbonstoneUnsafe = 3; + public const ushort Wood = 4; + public const ushort GrayBrick = 5; + public const ushort RedBrick = 6; + public const ushort BlueDungeonUnsafe = 7; + public const ushort GreenDungeonUnsafe = 8; + public const ushort PinkDungeonUnsafe = 9; + public const ushort GoldBrick = 10; + public const ushort SilverBrick = 11; + public const ushort CopperBrick = 12; + public const ushort HellstoneBrickUnsafe = 13; + public const ushort ObsidianBrickUnsafe = 14; + public const ushort MudUnsafe = 15; + public const ushort Dirt = 16; + public const ushort BlueDungeon = 17; + public const ushort GreenDungeon = 18; + public const ushort PinkDungeon = 19; + public const ushort ObsidianBrick = 20; + public const ushort Glass = 21; + public const ushort PearlstoneBrick = 22; + public const ushort IridescentBrick = 23; + public const ushort MudstoneBrick = 24; + public const ushort CobaltBrick = 25; + public const ushort MythrilBrick = 26; + public const ushort Planked = 27; + public const ushort PearlstoneBrickUnsafe = 28; + public const ushort CandyCane = 29; + public const ushort GreenCandyCane = 30; + public const ushort SnowBrick = 31; + public const ushort AdamantiteBeam = 32; + public const ushort DemoniteBrick = 33; + public const ushort SandstoneBrick = 34; + public const ushort EbonstoneBrick = 35; + public const ushort RedStucco = 36; + public const ushort YellowStucco = 37; + public const ushort GreenStucco = 38; + public const ushort Gray = 39; + public const ushort SnowWallUnsafe = 40; + public const ushort Ebonwood = 41; + public const ushort RichMaogany = 42; + public const ushort Pearlwood = 43; + public const ushort RainbowBrick = 44; + public const ushort TinBrick = 45; + public const ushort TungstenBrick = 46; + public const ushort PlatinumBrick = 47; + public const ushort AmethystUnsafe = 48; + public const ushort TopazUnsafe = 49; + public const ushort SapphireUnsafe = 50; + public const ushort EmeraldUnsafe = 51; + public const ushort RubyUnsafe = 52; + public const ushort DiamondUnsafe = 53; + public const ushort CaveUnsafe = 54; + public const ushort Cave2Unsafe = 55; + public const ushort Cave3Unsafe = 56; + public const ushort Cave4Unsafe = 57; + public const ushort Cave5Unsafe = 58; + public const ushort Cave6Unsafe = 59; + public const ushort LivingLeaf = 60; + public const ushort Cave7Unsafe = 61; + public const ushort SpiderUnsafe = 62; + public const ushort GrassUnsafe = 63; + public const ushort JungleUnsafe = 64; + public const ushort FlowerUnsafe = 65; + public const ushort Grass = 66; + public const ushort Jungle = 67; + public const ushort Flower = 68; + public const ushort CorruptGrassUnsafe = 69; + public const ushort HallowedGrassUnsafe = 70; + public const ushort IceUnsafe = 71; + public const ushort Cactus = 72; + public const ushort Cloud = 73; + public const ushort Mushroom = 74; + public const ushort Bone = 75; + public const ushort Slime = 76; + public const ushort Flesh = 77; + public const ushort LivingWood = 78; + public const ushort ObsidianBackUnsafe = 79; + public const ushort MushroomUnsafe = 80; + public const ushort CrimsonGrassUnsafe = 81; + public const ushort DiscWall = 82; + public const ushort CrimstoneUnsafe = 83; + public const ushort IceBrick = 84; + public const ushort Shadewood = 85; + public const ushort HiveUnsafe = 86; + public const ushort LihzahrdBrickUnsafe = 87; + public const ushort PurpleStainedGlass = 88; + public const ushort YellowStainedGlass = 89; + public const ushort BlueStainedGlass = 90; + public const ushort GreenStainedGlass = 91; + public const ushort RedStainedGlass = 92; + public const ushort RainbowStainedGlass = 93; + public const ushort BlueDungeonSlabUnsafe = 94; + public const ushort BlueDungeonTileUnsafe = 95; + public const ushort PinkDungeonSlabUnsafe = 96; + public const ushort PinkDungeonTileUnsafe = 97; + public const ushort GreenDungeonSlabUnsafe = 98; + public const ushort GreenDungeonTileUnsafe = 99; + public const ushort BlueDungeonSlab = 100; + public const ushort BlueDungeonTile = 101; + public const ushort PinkDungeonSlab = 102; + public const ushort PinkDungeonTile = 103; + public const ushort GreenDungeonSlab = 104; + public const ushort GreenDungeonTile = 105; + public const ushort WoodenFence = 106; + public const ushort MetalFence = 107; + public const ushort Hive = 108; + public const ushort PalladiumColumn = 109; + public const ushort BubblegumBlock = 110; + public const ushort TitanstoneBlock = 111; + public const ushort LihzahrdBrick = 112; + public const ushort Pumpkin = 113; + public const ushort Hay = 114; + public const ushort SpookyWood = 115; + public const ushort ChristmasTreeWallpaper = 116; + public const ushort OrnamentWallpaper = 117; + public const ushort CandyCaneWallpaper = 118; + public const ushort FestiveWallpaper = 119; + public const ushort StarsWallpaper = 120; + public const ushort SquigglesWallpaper = 121; + public const ushort SnowflakeWallpaper = 122; + public const ushort KrampusHornWallpaper = 123; + public const ushort BluegreenWallpaper = 124; + public const ushort GrinchFingerWallpaper = 125; + public const ushort FancyGrayWallpaper = 126; + public const ushort IceFloeWallpaper = 127; + public const ushort MusicWallpaper = 128; + public const ushort PurpleRainWallpaper = 129; + public const ushort RainbowWallpaper = 130; + public const ushort SparkleStoneWallpaper = 131; + public const ushort StarlitHeavenWallpaper = 132; + public const ushort BubbleWallpaper = 133; + public const ushort CopperPipeWallpaper = 134; + public const ushort DuckyWallpaper = 135; + public const ushort Waterfall = 136; + public const ushort Lavafall = 137; + public const ushort EbonwoodFence = 138; + public const ushort RichMahoganyFence = 139; + public const ushort PearlwoodFence = 140; + public const ushort ShadewoodFence = 141; + public const ushort WhiteDynasty = 142; + public const ushort BlueDynasty = 143; + public const ushort ArcaneRunes = 144; + public const ushort IronFence = 145; + public const ushort CopperPlating = 146; + public const ushort StoneSlab = 147; + public const ushort Sail = 148; + public const ushort BorealWood = 149; + public const ushort BorealWoodFence = 150; + public const ushort PalmWood = 151; + public const ushort PalmWoodFence = 152; + public const ushort AmberGemspark = 153; + public const ushort AmethystGemspark = 154; + public const ushort DiamondGemspark = 155; + public const ushort EmeraldGemspark = 156; + public const ushort AmberGemsparkOff = 157; + public const ushort AmethystGemsparkOff = 158; + public const ushort DiamondGemsparkOff = 159; + public const ushort EmeraldGemsparkOff = 160; + public const ushort RubyGemsparkOff = 161; + public const ushort SapphireGemsparkOff = 162; + public const ushort TopazGemsparkOff = 163; + public const ushort RubyGemspark = 164; + public const ushort SapphireGemspark = 165; + public const ushort TopazGemspark = 166; + public const ushort TinPlating = 167; + public const ushort Confetti = 168; + public const ushort ConfettiBlack = 169; + public const ushort CaveWall = 170; + public const ushort CaveWall2 = 171; + public const ushort Honeyfall = 172; + public const ushort ChlorophyteBrick = 173; + public const ushort CrimtaneBrick = 174; + public const ushort ShroomitePlating = 175; + public const ushort MartianConduit = 176; + public const ushort HellstoneBrick = 177; + public const ushort MarbleUnsafe = 178; + public const ushort MarbleBlock = 179; + public const ushort GraniteUnsafe = 180; + public const ushort GraniteBlock = 181; + public const ushort MeteoriteBrick = 182; + public const ushort Marble = 183; + public const ushort Granite = 184; + public const ushort Cave8Unsafe = 185; + public const ushort Crystal = 186; + public const ushort Sandstone = 187; + public const ushort CorruptionUnsafe1 = 188; + public const ushort CorruptionUnsafe2 = 189; + public const ushort CorruptionUnsafe3 = 190; + public const ushort CorruptionUnsafe4 = 191; + public const ushort CrimsonUnsafe1 = 192; + public const ushort CrimsonUnsafe2 = 193; + public const ushort CrimsonUnsafe3 = 194; + public const ushort CrimsonUnsafe4 = 195; + public const ushort DirtUnsafe1 = 196; + public const ushort DirtUnsafe2 = 197; + public const ushort DirtUnsafe3 = 198; + public const ushort DirtUnsafe4 = 199; + public const ushort HallowUnsafe1 = 200; + public const ushort HallowUnsafe2 = 201; + public const ushort HallowUnsafe3 = 202; + public const ushort HallowUnsafe4 = 203; + public const ushort JungleUnsafe1 = 204; + public const ushort JungleUnsafe2 = 205; + public const ushort JungleUnsafe3 = 206; + public const ushort JungleUnsafe4 = 207; + public const ushort LavaUnsafe1 = 208; + public const ushort LavaUnsafe2 = 209; + public const ushort LavaUnsafe3 = 210; + public const ushort LavaUnsafe4 = 211; + public const ushort RocksUnsafe1 = 212; + public const ushort RocksUnsafe2 = 213; + public const ushort RocksUnsafe3 = 214; + public const ushort RocksUnsafe4 = 215; + public const ushort HardenedSand = 216; + public const ushort CorruptHardenedSand = 217; + public const ushort CrimsonHardenedSand = 218; + public const ushort HallowHardenedSand = 219; + public const ushort CorruptSandstone = 220; + public const ushort CrimsonSandstone = 221; + public const ushort HallowSandstone = 222; + public const ushort DesertFossil = 223; + public const ushort LunarBrickWall = 224; + public const ushort CogWall = 225; + public const ushort SandFall = 226; + public const ushort SnowFall = 227; + public const ushort SillyBalloonPinkWall = 228; + public const ushort SillyBalloonPurpleWall = 229; + public const ushort SillyBalloonGreenWall = 230; + public const ushort IronBrick = 231; + public const ushort LeadBrick = 232; + public const ushort LesionBlock = 233; + public const ushort CrimstoneBrick = 234; + public const ushort SmoothSandstone = 235; + public const ushort Spider = 236; + public const ushort SolarBrick = 237; + public const ushort VortexBrick = 238; + public const ushort NebulaBrick = 239; + public const ushort StardustBrick = 240; + public const ushort OrangeStainedGlass = 241; + public const ushort GoldStarryGlassWall = 242; + public const ushort BlueStarryGlassWall = 243; + public const ushort LivingWoodUnsafe = 244; + public const ushort WroughtIronFence = 245; + public const ushort EbonstoneEcho = 246; + public const ushort MudWallEcho = 247; + public const ushort PearlstoneEcho = 248; + public const ushort SnowWallEcho = 249; + public const ushort AmethystEcho = 250; + public const ushort TopazEcho = 251; + public const ushort SapphireEcho = 252; + public const ushort EmeraldEcho = 253; + public const ushort RubyEcho = 254; + public const ushort DiamondEcho = 255; + public const ushort Cave1Echo = 256; + public const ushort Cave2Echo = 257; + public const ushort Cave3Echo = 258; + public const ushort Cave4Echo = 259; + public const ushort Cave5Echo = 260; + public const ushort Cave6Echo = 261; + public const ushort Cave7Echo = 262; + public const ushort SpiderEcho = 263; + public const ushort CorruptGrassEcho = 264; + public const ushort HallowedGrassEcho = 265; + public const ushort IceEcho = 266; + public const ushort ObsidianBackEcho = 267; + public const ushort CrimsonGrassEcho = 268; + public const ushort CrimstoneEcho = 269; + public const ushort CaveWall1Echo = 270; + public const ushort CaveWall2Echo = 271; + public const ushort MarbleEchoUnused = 272; + public const ushort GraniteEchoUnused = 273; + public const ushort Cave8Echo = 274; + public const ushort SandstoneEcho = 275; + public const ushort Corruption1Echo = 276; + public const ushort Corruption2Echo = 277; + public const ushort Corruption3Echo = 278; + public const ushort Corruption4Echo = 279; + public const ushort Crimson1Echo = 280; + public const ushort Crimson2Echo = 281; + public const ushort Crimson3Echo = 282; + public const ushort Crimson4Echo = 283; + public const ushort Dirt1Echo = 284; + public const ushort Dirt2Echo = 285; + public const ushort Dirt3Echo = 286; + public const ushort Dirt4Echo = 287; + public const ushort Hallow1Echo = 288; + public const ushort Hallow2Echo = 289; + public const ushort Hallow3Echo = 290; + public const ushort Hallow4Echo = 291; + public const ushort Jungle1Echo = 292; + public const ushort Jungle2Echo = 293; + public const ushort Jungle3Echo = 294; + public const ushort Jungle4Echo = 295; + public const ushort Lava1Echo = 296; + public const ushort Lava2Echo = 297; + public const ushort Lava3Echo = 298; + public const ushort Lava4Echo = 299; + public const ushort Rocks1Echo = 300; + public const ushort Rocks2Echo = 301; + public const ushort Rocks3Echo = 302; + public const ushort Rocks4Echo = 303; + public const ushort HardenedSandEcho = 304; + public const ushort CorruptHardenedSandEcho = 305; + public const ushort CrimsonHardenedSandEcho = 306; + public const ushort HallowHardenedSandEcho = 307; + public const ushort CorruptSandstoneEcho = 308; + public const ushort CrimsonSandstoneEcho = 309; + public const ushort HallowSandstoneEcho = 310; + public const ushort DesertFossilEcho = 311; + public const ushort BambooBlockWall = 312; + public const ushort LargeBambooBlockWall = 313; + public const ushort AmberStoneWallEcho = 314; + public const ushort BambooFence = 315; + public const ushort Count = 316; + + public static class Sets + { + public static SetFactory Factory = new SetFactory(316); + public static bool[] CanBeConvertedToGlowingMushroom = WallID.Sets.Factory.CreateBoolSet(64, 67, 15, 247); + public static bool[] Transparent = WallID.Sets.Factory.CreateBoolSet(88, 89, 90, 91, 92, 241); + public static bool[] Corrupt = WallID.Sets.Factory.CreateBoolSet(69, 217, 220, 3); + public static bool[] Crimson = WallID.Sets.Factory.CreateBoolSet(83, 81, 218, 221); + public static bool[] Hallow = WallID.Sets.Factory.CreateBoolSet(70, 219, 222, 28); + public static bool[] AllowsWind = WallID.Sets.Factory.CreateBoolSet(0, 150, 138, 145, 107, 152, 140, 139, 141, 106, 245, 315); + + public static class Conversion + { + public static bool[] Grass = WallID.Sets.Factory.CreateBoolSet(63, 64, 65, 66, 67, 68, 69, 70, 81, 264, 265, 268); + public static bool[] Stone = WallID.Sets.Factory.CreateBoolSet(1, 61, 185, 3, 28, 83, 262, 274, 246, 248, 269); + public static bool[] Sandstone = WallID.Sets.Factory.CreateBoolSet(187, 220, 222, 221, 275, 308, 310, 309); + public static bool[] HardenedSand = WallID.Sets.Factory.CreateBoolSet(216, 217, 219, 218, 304, 305, 307, 306); + public static bool[] PureSand = WallID.Sets.Factory.CreateBoolSet(216, 187, 304, 275); + public static bool[] NewWall1 = WallID.Sets.Factory.CreateBoolSet(188, 192, 200, 204, 212, 276, 280, 288, 292, 300); + public static bool[] NewWall2 = WallID.Sets.Factory.CreateBoolSet(189, 193, 201, 205, 213, 277, 281, 289, 293, 301); + public static bool[] NewWall3 = WallID.Sets.Factory.CreateBoolSet(190, 194, 202, 206, 214, 278, 282, 290, 294, 302); + public static bool[] NewWall4 = WallID.Sets.Factory.CreateBoolSet(191, 195, 203, 207, 215, 279, 283, 291, 295, 303); + } + } + } +} diff --git a/ID/WaterStyleID.cs b/ID/WaterStyleID.cs new file mode 100644 index 0000000..5e1c70f --- /dev/null +++ b/ID/WaterStyleID.cs @@ -0,0 +1,26 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ID.WaterStyleID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.ID +{ + public static class WaterStyleID + { + public const int Purity = 0; + public const int Lava = 1; + public const int Corrupt = 2; + public const int Jungle = 3; + public const int Hallow = 4; + public const int Snow = 5; + public const int Desert = 6; + public const int Underground = 7; + public const int Cavern = 8; + public const int Bloodmoon = 9; + public const int Crimson = 10; + public const int Honey = 11; + public const int UndergroundDesert = 12; + public const int Count = 13; + } +} diff --git a/IO/Data/ResourcePacksDefaultInfo.tsv b/IO/Data/ResourcePacksDefaultInfo.tsv new file mode 100644 index 0000000..63a8226 Binary files /dev/null and b/IO/Data/ResourcePacksDefaultInfo.tsv differ diff --git a/IO/FavoritesFile.cs b/IO/FavoritesFile.cs new file mode 100644 index 0000000..481c369 --- /dev/null +++ b/IO/FavoritesFile.cs @@ -0,0 +1,89 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IO.FavoritesFile +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Text; +using Terraria.UI; +using Terraria.Utilities; + +namespace Terraria.IO +{ + public class FavoritesFile + { + public readonly string Path; + public readonly bool IsCloudSave; + private Dictionary> _data = new Dictionary>(); + + public FavoritesFile(string path, bool isCloud) + { + this.Path = path; + this.IsCloudSave = isCloud; + } + + public void SaveFavorite(FileData fileData) + { + if (!this._data.ContainsKey(fileData.Type)) + this._data.Add(fileData.Type, new Dictionary()); + this._data[fileData.Type][fileData.GetFileName()] = fileData.IsFavorite; + this.Save(); + } + + public void ClearEntry(FileData fileData) + { + if (!this._data.ContainsKey(fileData.Type)) + return; + this._data[fileData.Type].Remove(fileData.GetFileName()); + this.Save(); + } + + public bool IsFavorite(FileData fileData) + { + if (!this._data.ContainsKey(fileData.Type)) + return false; + string fileName = fileData.GetFileName(); + bool flag; + return this._data[fileData.Type].TryGetValue(fileName, out flag) && flag; + } + + public void Save() + { + try + { + FileUtilities.WriteAllBytes(this.Path, Encoding.ASCII.GetBytes(JsonConvert.SerializeObject((object) this._data, (Formatting) 1)), this.IsCloudSave); + } + catch (Exception ex) + { + string path = this.Path; + FancyErrorPrinter.ShowFileSavingFailError(ex, path); + throw; + } + } + + public void Load() + { + if (!FileUtilities.Exists(this.Path, this.IsCloudSave)) + { + this._data.Clear(); + } + else + { + try + { + this._data = JsonConvert.DeserializeObject>>(Encoding.ASCII.GetString(FileUtilities.ReadAllBytes(this.Path, this.IsCloudSave))); + if (this._data != null) + return; + this._data = new Dictionary>(); + } + catch (Exception ex) + { + Console.WriteLine("Unable to load favorites.json file ({0} : {1})", (object) this.Path, this.IsCloudSave ? (object) "Cloud Save" : (object) "Local Save"); + } + } + } + } +} diff --git a/IO/FileData.cs b/IO/FileData.cs new file mode 100644 index 0000000..87bf32a --- /dev/null +++ b/IO/FileData.cs @@ -0,0 +1,54 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IO.FileData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.Utilities; + +namespace Terraria.IO +{ + public abstract class FileData + { + protected string _path; + protected bool _isCloudSave; + public FileMetadata Metadata; + public string Name; + public readonly string Type; + protected bool _isFavorite; + + public string Path => this._path; + + public bool IsCloudSave => this._isCloudSave; + + public bool IsFavorite => this._isFavorite; + + protected FileData(string type) => this.Type = type; + + protected FileData(string type, string path, bool isCloud) + { + this.Type = type; + this._path = path; + this._isCloudSave = isCloud; + this._isFavorite = (isCloud ? Main.CloudFavoritesData : Main.LocalFavoriteData).IsFavorite(this); + } + + public void ToggleFavorite() => this.SetFavorite(!this.IsFavorite); + + public string GetFileName(bool includeExtension = true) => FileUtilities.GetFileName(this.Path, includeExtension); + + public void SetFavorite(bool favorite, bool saveChanges = true) + { + this._isFavorite = favorite; + if (!saveChanges) + return; + (this.IsCloudSave ? Main.CloudFavoritesData : Main.LocalFavoriteData).SaveFavorite(this); + } + + public abstract void SetAsActive(); + + public abstract void MoveToCloud(); + + public abstract void MoveToLocal(); + } +} diff --git a/IO/FileMetadata.cs b/IO/FileMetadata.cs new file mode 100644 index 0000000..c161a4b --- /dev/null +++ b/IO/FileMetadata.cs @@ -0,0 +1,74 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IO.FileMetadata +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.IO; + +namespace Terraria.IO +{ + public class FileMetadata + { + public const ulong MAGIC_NUMBER = 27981915666277746; + public const int SIZE = 20; + public FileType Type; + public uint Revision; + public bool IsFavorite; + + private FileMetadata() + { + } + + public void Write(BinaryWriter writer) + { + writer.Write((ulong) (27981915666277746L | (long) this.Type << 56)); + writer.Write(this.Revision); + writer.Write((ulong) (this.IsFavorite.ToInt() & 1 | 0)); + } + + public void IncrementAndWrite(BinaryWriter writer) + { + ++this.Revision; + this.Write(writer); + } + + public static FileMetadata FromCurrentSettings(FileType type) => new FileMetadata() + { + Type = type, + Revision = 0, + IsFavorite = false + }; + + public static FileMetadata Read(BinaryReader reader, FileType expectedType) + { + FileMetadata fileMetadata = new FileMetadata(); + fileMetadata.Read(reader); + if (fileMetadata.Type != expectedType) + throw new FileFormatException("Expected type \"" + Enum.GetName(typeof (FileType), (object) expectedType) + "\" but found \"" + Enum.GetName(typeof (FileType), (object) fileMetadata.Type) + "\"."); + return fileMetadata; + } + + private void Read(BinaryReader reader) + { + long num1 = (long) reader.ReadUInt64(); + if ((num1 & 72057594037927935L) != 27981915666277746L) + throw new FileFormatException("Expected Re-Logic file format."); + byte num2 = (byte) ((ulong) num1 >> 56 & (ulong) byte.MaxValue); + FileType fileType = FileType.None; + FileType[] values = (FileType[]) Enum.GetValues(typeof (FileType)); + for (int index = 0; index < values.Length; ++index) + { + if (values[index] == (FileType) num2) + { + fileType = values[index]; + break; + } + } + this.Type = fileType != FileType.None ? fileType : throw new FileFormatException("Found invalid file type."); + this.Revision = reader.ReadUInt32(); + this.IsFavorite = ((long) reader.ReadUInt64() & 1L) == 1L; + } + } +} diff --git a/IO/FileType.cs b/IO/FileType.cs new file mode 100644 index 0000000..9acb6c6 --- /dev/null +++ b/IO/FileType.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IO.FileType +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.IO +{ + public enum FileType : byte + { + None, + Map, + World, + Player, + } +} diff --git a/IO/GameConfiguration.cs b/IO/GameConfiguration.cs new file mode 100644 index 0000000..5a0c2f0 --- /dev/null +++ b/IO/GameConfiguration.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IO.GameConfiguration +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Newtonsoft.Json.Linq; + +namespace Terraria.IO +{ + public class GameConfiguration + { + private readonly JObject _root; + + public GameConfiguration(JObject configurationRoot) => this._root = configurationRoot; + + public T Get(string entry) => this._root[entry].ToObject(); + } +} diff --git a/IO/PlayerFileData.cs b/IO/PlayerFileData.cs new file mode 100644 index 0000000..f057511 --- /dev/null +++ b/IO/PlayerFileData.cs @@ -0,0 +1,156 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IO.PlayerFileData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Diagnostics; +using System.IO; +using System.Linq; +using Terraria.Social; +using Terraria.Utilities; + +namespace Terraria.IO +{ + public class PlayerFileData : FileData + { + private Player _player; + private TimeSpan _playTime = TimeSpan.Zero; + private readonly Stopwatch _timer = new Stopwatch(); + private bool _isTimerActive; + + public Player Player + { + get => this._player; + set + { + this._player = value; + if (value == null) + return; + this.Name = this._player.name; + } + } + + public PlayerFileData() + : base(nameof (Player)) + { + } + + public PlayerFileData(string path, bool cloudSave) + : base(nameof (Player), path, cloudSave) + { + } + + public static PlayerFileData CreateAndSave(Player player) + { + PlayerFileData playerFile = new PlayerFileData(); + playerFile.Metadata = FileMetadata.FromCurrentSettings(FileType.Player); + playerFile.Player = player; + playerFile._isCloudSave = SocialAPI.Cloud != null && SocialAPI.Cloud.EnabledByDefault; + playerFile._path = Main.GetPlayerPathFromName(player.name, playerFile.IsCloudSave); + (playerFile.IsCloudSave ? Main.CloudFavoritesData : Main.LocalFavoriteData).ClearEntry((FileData) playerFile); + Player.SavePlayer(playerFile, true); + return playerFile; + } + + public override void SetAsActive() + { + Main.ActivePlayerFileData = this; + Main.player[Main.myPlayer] = this.Player; + } + + public override void MoveToCloud() + { + if (this.IsCloudSave || SocialAPI.Cloud == null) + return; + string playerPathFromName = Main.GetPlayerPathFromName(this.Name, true); + if (!FileUtilities.MoveToCloud(this.Path, playerPathFromName)) + return; + string fileName = this.GetFileName(false); + string path = Main.PlayerPath + Path.DirectorySeparatorChar.ToString() + fileName + Path.DirectorySeparatorChar.ToString(); + if (Directory.Exists(path)) + { + string[] files = Directory.GetFiles(path); + for (int index = 0; index < files.Length; ++index) + { + string cloudPath = Main.CloudPlayerPath + "/" + fileName + "/" + FileUtilities.GetFileName(files[index]); + FileUtilities.MoveToCloud(files[index], cloudPath); + } + } + Main.LocalFavoriteData.ClearEntry((FileData) this); + this._isCloudSave = true; + this._path = playerPathFromName; + Main.CloudFavoritesData.SaveFavorite((FileData) this); + } + + public override void MoveToLocal() + { + if (!this.IsCloudSave || SocialAPI.Cloud == null) + return; + string playerPathFromName = Main.GetPlayerPathFromName(this.Name, false); + if (!FileUtilities.MoveToLocal(this.Path, playerPathFromName)) + return; + string fileName = this.GetFileName(false); + string mapPath = Path.Combine(Main.CloudPlayerPath, fileName); + foreach (string str in SocialAPI.Cloud.GetFiles().Where((Func) (path => path.StartsWith(mapPath, StringComparison.CurrentCultureIgnoreCase) && path.EndsWith(".map", StringComparison.CurrentCultureIgnoreCase)))) + { + string localPath = Path.Combine(Main.PlayerPath, fileName, FileUtilities.GetFileName(str)); + FileUtilities.MoveToLocal(str, localPath); + } + Main.CloudFavoritesData.ClearEntry((FileData) this); + this._isCloudSave = false; + this._path = playerPathFromName; + Main.LocalFavoriteData.SaveFavorite((FileData) this); + } + + public void UpdatePlayTimer() + { + bool flag1 = Main.gamePaused && !Main.hasFocus; + bool flag2 = Main.instance.IsActive && !flag1; + if (Main.gameMenu) + flag2 = false; + if (flag2) + this.StartPlayTimer(); + else + this.PausePlayTimer(); + } + + public void StartPlayTimer() + { + if (this._isTimerActive) + return; + this._isTimerActive = true; + if (this._timer.IsRunning) + return; + this._timer.Start(); + } + + public void PausePlayTimer() => this.StopPlayTimer(); + + public TimeSpan GetPlayTime() => this._timer.IsRunning ? this._playTime + this._timer.Elapsed : this._playTime; + + public void UpdatePlayTimerAndKeepState() + { + int num = this._timer.IsRunning ? 1 : 0; + this._playTime += this._timer.Elapsed; + this._timer.Reset(); + if (num == 0) + return; + this._timer.Start(); + } + + public void StopPlayTimer() + { + if (!this._isTimerActive) + return; + this._isTimerActive = false; + if (!this._timer.IsRunning) + return; + this._playTime += this._timer.Elapsed; + this._timer.Reset(); + } + + public void SetPlayTime(TimeSpan time) => this._playTime = time; + } +} diff --git a/IO/Preferences.cs b/IO/Preferences.cs new file mode 100644 index 0000000..9f26a47 --- /dev/null +++ b/IO/Preferences.cs @@ -0,0 +1,178 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IO.Preferences +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Newtonsoft.Json; +using Newtonsoft.Json.Bson; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Terraria.Localization; + +namespace Terraria.IO +{ + public class Preferences + { + private Dictionary _data = new Dictionary(); + private readonly string _path; + private readonly JsonSerializerSettings _serializerSettings; + public readonly bool UseBson; + private readonly object _lock = new object(); + public bool AutoSave; + + public event Action OnSave; + + public event Action OnLoad; + + public event Preferences.TextProcessAction OnProcessText; + + public Preferences(string path, bool parseAllTypes = false, bool useBson = false) + { + this._path = path; + this.UseBson = useBson; + if (parseAllTypes) + this._serializerSettings = new JsonSerializerSettings() + { + TypeNameHandling = (TypeNameHandling) 4, + MetadataPropertyHandling = (MetadataPropertyHandling) 1, + Formatting = (Formatting) 1 + }; + else + this._serializerSettings = new JsonSerializerSettings() + { + Formatting = (Formatting) 1 + }; + } + + public bool Load() + { + lock (this._lock) + { + if (!File.Exists(this._path)) + return false; + try + { + if (!this.UseBson) + { + this._data = JsonConvert.DeserializeObject>(File.ReadAllText(this._path), this._serializerSettings); + } + else + { + using (FileStream fileStream = File.OpenRead(this._path)) + { + using (BsonReader bsonReader = new BsonReader((Stream) fileStream)) + this._data = JsonSerializer.Create(this._serializerSettings).Deserialize>((JsonReader) bsonReader); + } + } + if (this._data == null) + this._data = new Dictionary(); + if (this.OnLoad != null) + this.OnLoad(this); + return true; + } + catch (Exception ex) + { + return false; + } + } + } + + public bool Save(bool canCreateFile = true) + { + lock (this._lock) + { + try + { + if (this.OnSave != null) + this.OnSave(this); + if (!canCreateFile && !File.Exists(this._path)) + return false; + Directory.GetParent(this._path).Create(); + if (File.Exists(this._path)) + File.SetAttributes(this._path, FileAttributes.Normal); + if (!this.UseBson) + { + string text = JsonConvert.SerializeObject((object) this._data, this._serializerSettings); + if (this.OnProcessText != null) + this.OnProcessText(ref text); + File.WriteAllText(this._path, text); + File.SetAttributes(this._path, FileAttributes.Normal); + } + else + { + using (FileStream fileStream = File.Create(this._path)) + { + using (BsonWriter bsonWriter = new BsonWriter((Stream) fileStream)) + { + File.SetAttributes(this._path, FileAttributes.Normal); + JsonSerializer.Create(this._serializerSettings).Serialize((JsonWriter) bsonWriter, (object) this._data); + } + } + } + } + catch (Exception ex) + { + Console.WriteLine(Language.GetTextValue("Error.UnableToWritePreferences", (object) this._path)); + Console.WriteLine(ex.ToString()); + return false; + } + return true; + } + } + + public void Clear() => this._data.Clear(); + + public void Put(string name, object value) + { + lock (this._lock) + { + this._data[name] = value; + if (!this.AutoSave) + return; + this.Save(); + } + } + + public bool Contains(string name) + { + lock (this._lock) + return this._data.ContainsKey(name); + } + + public T Get(string name, T defaultValue) + { + lock (this._lock) + { + try + { + object obj1; + if (!this._data.TryGetValue(name, out obj1)) + return defaultValue; + switch (obj1) + { + case T obj: + return obj; + case JObject _: + return JsonConvert.DeserializeObject(((object) (JObject) obj1).ToString()); + default: + return (T) Convert.ChangeType(obj1, typeof (T)); + } + } + catch + { + return defaultValue; + } + } + } + + public void Get(string name, ref T currentValue) => currentValue = this.Get(name, currentValue); + + public List GetAllKeys() => this._data.Keys.ToList(); + + public delegate void TextProcessAction(ref string text); + } +} diff --git a/IO/ResourcePack.cs b/IO/ResourcePack.cs new file mode 100644 index 0000000..fc3a7ca --- /dev/null +++ b/IO/ResourcePack.cs @@ -0,0 +1,119 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IO.ResourcePack +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Ionic.Zip; +using Microsoft.Xna.Framework.Graphics; +using Newtonsoft.Json.Linq; +using ReLogic.Content; +using ReLogic.Content.Sources; +using ReLogic.Utilities; +using System; +using System.Collections.Generic; +using System.IO; +using Terraria.GameContent; + +namespace Terraria.IO +{ + public class ResourcePack + { + public readonly string FullPath; + public readonly string FileName; + private readonly IServiceProvider _services; + private readonly bool _isCompressed; + private readonly ZipFile _zipFile; + private Texture2D _icon; + private IContentSource _contentSource; + private bool _needsReload = true; + private const string ICON_FILE_NAME = "icon.png"; + private const string PACK_FILE_NAME = "pack.json"; + + public Texture2D Icon + { + get + { + if (this._icon == null) + this._icon = this.CreateIcon(); + return this._icon; + } + } + + public string Name { get; private set; } + + public string Description { get; private set; } + + public string Author { get; private set; } + + public ResourcePackVersion Version { get; private set; } + + public bool IsEnabled { get; set; } + + public int SortingOrder { get; set; } + + public ResourcePack(IServiceProvider services, string path) + { + if (File.Exists(path)) + this._isCompressed = true; + else if (!Directory.Exists(path)) + throw new FileNotFoundException("Unable to find file or folder for resource pack at: " + path); + this.FileName = Path.GetFileName(path); + this._services = services; + this.FullPath = path; + if (this._isCompressed) + this._zipFile = ZipFile.Read(path); + this.LoadManifest(); + } + + public void Refresh() => this._needsReload = true; + + public IContentSource GetContentSource() + { + if (this._needsReload) + { + this._contentSource = !this._isCompressed ? (IContentSource) new FileSystemContentSource(Path.Combine(this.FullPath, "Content")) : (IContentSource) new ZipContentSource(this.FullPath, "Content"); + this._contentSource.ContentValidator = (IContentValidator) VanillaContentValidator.Instance; + this._needsReload = false; + } + return this._contentSource; + } + + private Texture2D CreateIcon() + { + if (!this.HasFile("icon.png")) + return XnaExtensions.Get(this._services).Request("Images/UI/DefaultResourcePackIcon", (AssetRequestMode) 1).Value; + using (Stream stream = this.OpenStream("icon.png")) + return XnaExtensions.Get(this._services).Read(stream, ".png"); + } + + private void LoadManifest() + { + if (!this.HasFile("pack.json")) + throw new FileNotFoundException(string.Format("Resource Pack at \"{0}\" must contain a {1} file.", (object) this.FullPath, (object) "pack.json")); + JObject jobject; + using (Stream stream = this.OpenStream("pack.json")) + { + using (StreamReader streamReader = new StreamReader(stream)) + jobject = JObject.Parse(streamReader.ReadToEnd()); + } + this.Name = Extensions.Value((IEnumerable) jobject["Name"]); + this.Description = Extensions.Value((IEnumerable) jobject["Description"]); + this.Author = Extensions.Value((IEnumerable) jobject["Author"]); + this.Version = jobject["Version"].ToObject(); + } + + private Stream OpenStream(string fileName) + { + if (!this._isCompressed) + return (Stream) File.OpenRead(Path.Combine(this.FullPath, fileName)); + ZipEntry zipEntry = this._zipFile[fileName]; + MemoryStream memoryStream = new MemoryStream((int) zipEntry.UncompressedSize); + zipEntry.Extract((Stream) memoryStream); + memoryStream.Position = 0L; + return (Stream) memoryStream; + } + + private bool HasFile(string fileName) => !this._isCompressed ? File.Exists(Path.Combine(this.FullPath, fileName)) : this._zipFile.ContainsEntry(fileName); + } +} diff --git a/IO/ResourcePackList.cs b/IO/ResourcePackList.cs new file mode 100644 index 0000000..fb81ba0 --- /dev/null +++ b/IO/ResourcePackList.cs @@ -0,0 +1,130 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IO.ResourcePackList +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; + +namespace Terraria.IO +{ + public class ResourcePackList + { + private readonly List _resourcePacks = new List(); + + public IEnumerable EnabledPacks => (IEnumerable) this._resourcePacks.Where((Func) (pack => pack.IsEnabled)).OrderBy((Func) (pack => pack.SortingOrder)).ThenBy((Func) (pack => pack.Name)).ThenBy((Func) (pack => pack.Version)).ThenBy((Func) (pack => pack.FileName)); + + public IEnumerable DisabledPacks => (IEnumerable) this._resourcePacks.Where((Func) (pack => !pack.IsEnabled)).OrderBy((Func) (pack => pack.Name)).ThenBy((Func) (pack => pack.Version)).ThenBy((Func) (pack => pack.FileName)); + + public IEnumerable AllPacks => (IEnumerable) this._resourcePacks.OrderBy((Func) (pack => pack.Name)).ThenBy((Func) (pack => pack.Version)).ThenBy((Func) (pack => pack.FileName)); + + public ResourcePackList() + { + } + + public ResourcePackList(IEnumerable resourcePacks) => this._resourcePacks.AddRange(resourcePacks); + + public JArray ToJson() + { + List resourcePackEntryList = new List(this._resourcePacks.Count); + resourcePackEntryList.AddRange(this._resourcePacks.Select((Func) (pack => new ResourcePackList.ResourcePackEntry(pack.FileName, pack.IsEnabled, pack.SortingOrder)))); + return JArray.FromObject((object) resourcePackEntryList); + } + + public static ResourcePackList FromJson( + JArray serializedState, + IServiceProvider services, + string searchPath) + { + if (!Directory.Exists(searchPath)) + return new ResourcePackList(); + List source = new List(); + foreach (ResourcePackList.ResourcePackEntry resourcePackEntry in ResourcePackList.CreatePackEntryListFromJson(serializedState)) + { + if (resourcePackEntry.FileName != null) + { + string path = Path.Combine(searchPath, resourcePackEntry.FileName); + try + { + if (!File.Exists(path)) + { + if (!Directory.Exists(path)) + continue; + } + ResourcePack resourcePack = new ResourcePack(services, path) + { + IsEnabled = resourcePackEntry.Enabled, + SortingOrder = resourcePackEntry.SortingOrder + }; + source.Add(resourcePack); + } + catch (Exception ex) + { + Console.WriteLine("Failed to read resource pack {0}: {1}", (object) path, (object) ex); + } + } + } + foreach (string file in Directory.GetFiles(searchPath, "*.zip")) + { + try + { + string fileName = Path.GetFileName(file); + if (source.All((Func) (pack => pack.FileName != fileName))) + source.Add(new ResourcePack(services, file)); + } + catch (Exception ex) + { + Console.WriteLine("Failed to read resource pack {0}: {1}", (object) file, (object) ex); + } + } + foreach (string directory in Directory.GetDirectories(searchPath)) + { + try + { + string folderName = Path.GetFileName(directory); + if (source.All((Func) (pack => pack.FileName != folderName))) + source.Add(new ResourcePack(services, directory)); + } + catch (Exception ex) + { + Console.WriteLine("Failed to read resource pack {0}: {1}", (object) directory, (object) ex); + } + } + return new ResourcePackList((IEnumerable) source); + } + + private static IEnumerable CreatePackEntryListFromJson( + JArray serializedState) + { + try + { + if (((JContainer) serializedState).Count != 0) + return (IEnumerable) ((JToken) serializedState).ToObject>(); + } + catch (JsonReaderException ex) + { + Console.WriteLine("Failed to parse configuration entry for resource pack list. {0}", (object) ex); + } + return (IEnumerable) new List(); + } + + private struct ResourcePackEntry + { + public string FileName; + public bool Enabled; + public int SortingOrder; + + public ResourcePackEntry(string name, bool enabled, int sortingOrder) + { + this.FileName = name; + this.Enabled = enabled; + this.SortingOrder = sortingOrder; + } + } + } +} diff --git a/IO/ResourcePackVersion.cs b/IO/ResourcePackVersion.cs new file mode 100644 index 0000000..a02da8c --- /dev/null +++ b/IO/ResourcePackVersion.cs @@ -0,0 +1,51 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IO.ResourcePackVersion +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Newtonsoft.Json; +using System; +using System.Diagnostics; + +namespace Terraria.IO +{ + [DebuggerDisplay("Version {Major}.{Minor}")] + public struct ResourcePackVersion : IComparable, IComparable + { + [JsonProperty("major")] + public int Major { get; private set; } + + [JsonProperty("minor")] + public int Minor { get; private set; } + + public int CompareTo(object obj) + { + if (obj == null) + return 1; + if (!(obj is ResourcePackVersion other)) + throw new ArgumentException("A RatingInformation object is required for comparison.", nameof (obj)); + return this.CompareTo(other); + } + + public int CompareTo(ResourcePackVersion other) + { + int num = this.Major.CompareTo(other.Major); + return num != 0 ? num : this.Minor.CompareTo(other.Minor); + } + + public static bool operator ==(ResourcePackVersion lhs, ResourcePackVersion rhs) => lhs.CompareTo(rhs) == 0; + + public static bool operator !=(ResourcePackVersion lhs, ResourcePackVersion rhs) => !(lhs == rhs); + + public static bool operator <(ResourcePackVersion lhs, ResourcePackVersion rhs) => lhs.CompareTo(rhs) < 0; + + public static bool operator >(ResourcePackVersion lhs, ResourcePackVersion rhs) => lhs.CompareTo(rhs) > 0; + + public override bool Equals(object obj) => obj is ResourcePackVersion other && this.CompareTo(other) == 0; + + public override int GetHashCode() => ((long) this.Major << 32 | (long) this.Minor).GetHashCode(); + + public string GetFormattedVersion() => this.Major.ToString() + "." + (object) this.Minor; + } +} diff --git a/IO/WorldFile.cs b/IO/WorldFile.cs new file mode 100644 index 0000000..d9466fd --- /dev/null +++ b/IO/WorldFile.cs @@ -0,0 +1,2682 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IO.WorldFile +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Threading; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.GameContent.Creative; +using Terraria.GameContent.Events; +using Terraria.GameContent.Tile_Entities; +using Terraria.ID; +using Terraria.Localization; +using Terraria.Social; +using Terraria.UI; +using Terraria.Utilities; + +namespace Terraria.IO +{ + public class WorldFile + { + private static readonly object IOLock = new object(); + private static double _tempTime = Main.time; + private static bool _tempRaining; + private static float _tempMaxRain; + private static int _tempRainTime; + private static bool _tempDayTime = Main.dayTime; + private static bool _tempBloodMoon = Main.bloodMoon; + private static bool _tempEclipse = Main.eclipse; + private static int _tempMoonPhase = Main.moonPhase; + private static int _tempCultistDelay = CultistRitual.delay; + private static int _versionNumber; + private static bool _isWorldOnCloud; + private static bool _tempPartyGenuine; + private static bool _tempPartyManual; + private static int _tempPartyCooldown; + private static readonly List TempPartyCelebratingNPCs = new List(); + private static bool _hasCache; + private static bool? _cachedDayTime; + private static double? _cachedTime; + private static int? _cachedMoonPhase; + private static bool? _cachedBloodMoon; + private static bool? _cachedEclipse; + private static int? _cachedCultistDelay; + private static bool? _cachedPartyGenuine; + private static bool? _cachedPartyManual; + private static int? _cachedPartyDaysOnCooldown; + private static readonly List CachedCelebratingNPCs = new List(); + private static bool? _cachedSandstormHappening; + private static bool _tempSandstormHappening; + private static int? _cachedSandstormTimeLeft; + private static int _tempSandstormTimeLeft; + private static float? _cachedSandstormSeverity; + private static float _tempSandstormSeverity; + private static float? _cachedSandstormIntendedSeverity; + private static float _tempSandstormIntendedSeverity; + private static bool _tempLanternNightGenuine; + private static bool _tempLanternNightManual; + private static bool _tempLanternNightNextNightIsGenuine; + private static int _tempLanternNightCooldown; + private static bool? _cachedLanternNightGenuine; + private static bool? _cachedLanternNightManual; + private static bool? _cachedLanternNightNextNightIsGenuine; + private static int? _cachedLanternNightCooldown; + public static Exception LastThrownLoadException; + + public static event Action OnWorldLoad; + + public static void CacheSaveTime() + { + WorldFile._hasCache = true; + WorldFile._cachedDayTime = new bool?(Main.dayTime); + WorldFile._cachedTime = new double?(Main.time); + WorldFile._cachedMoonPhase = new int?(Main.moonPhase); + WorldFile._cachedBloodMoon = new bool?(Main.bloodMoon); + WorldFile._cachedEclipse = new bool?(Main.eclipse); + WorldFile._cachedCultistDelay = new int?(CultistRitual.delay); + WorldFile._cachedPartyGenuine = new bool?(BirthdayParty.GenuineParty); + WorldFile._cachedPartyManual = new bool?(BirthdayParty.ManualParty); + WorldFile._cachedPartyDaysOnCooldown = new int?(BirthdayParty.PartyDaysOnCooldown); + WorldFile.CachedCelebratingNPCs.Clear(); + WorldFile.CachedCelebratingNPCs.AddRange((IEnumerable) BirthdayParty.CelebratingNPCs); + WorldFile._cachedSandstormHappening = new bool?(Sandstorm.Happening); + WorldFile._cachedSandstormTimeLeft = new int?(Sandstorm.TimeLeft); + WorldFile._cachedSandstormSeverity = new float?(Sandstorm.Severity); + WorldFile._cachedSandstormIntendedSeverity = new float?(Sandstorm.IntendedSeverity); + WorldFile._cachedLanternNightCooldown = new int?(LanternNight.LanternNightsOnCooldown); + WorldFile._cachedLanternNightGenuine = new bool?(LanternNight.GenuineLanterns); + WorldFile._cachedLanternNightManual = new bool?(LanternNight.ManualLanterns); + WorldFile._cachedLanternNightNextNightIsGenuine = new bool?(LanternNight.NextNightIsLanternNight); + } + + public static void SetOngoingToTemps() + { + Main.dayTime = WorldFile._tempDayTime; + Main.time = WorldFile._tempTime; + Main.moonPhase = WorldFile._tempMoonPhase; + Main.bloodMoon = WorldFile._tempBloodMoon; + Main.eclipse = WorldFile._tempEclipse; + Main.raining = WorldFile._tempRaining; + Main.rainTime = WorldFile._tempRainTime; + Main.maxRaining = WorldFile._tempMaxRain; + Main.cloudAlpha = WorldFile._tempMaxRain; + CultistRitual.delay = WorldFile._tempCultistDelay; + BirthdayParty.ManualParty = WorldFile._tempPartyManual; + BirthdayParty.GenuineParty = WorldFile._tempPartyGenuine; + BirthdayParty.PartyDaysOnCooldown = WorldFile._tempPartyCooldown; + BirthdayParty.CelebratingNPCs.Clear(); + BirthdayParty.CelebratingNPCs.AddRange((IEnumerable) WorldFile.TempPartyCelebratingNPCs); + Sandstorm.Happening = WorldFile._tempSandstormHappening; + Sandstorm.TimeLeft = WorldFile._tempSandstormTimeLeft; + Sandstorm.Severity = WorldFile._tempSandstormSeverity; + Sandstorm.IntendedSeverity = WorldFile._tempSandstormIntendedSeverity; + LanternNight.GenuineLanterns = WorldFile._tempLanternNightGenuine; + LanternNight.LanternNightsOnCooldown = WorldFile._tempLanternNightCooldown; + LanternNight.ManualLanterns = WorldFile._tempLanternNightManual; + LanternNight.NextNightIsLanternNight = WorldFile._tempLanternNightNextNightIsGenuine; + } + + public static bool IsValidWorld(string file, bool cloudSave) => WorldFile.GetFileMetadata(file, cloudSave) != null; + + public static WorldFileData GetAllMetadata(string file, bool cloudSave) + { + if (file == null || cloudSave && SocialAPI.Cloud == null) + return (WorldFileData) null; + WorldFileData worldFileData = new WorldFileData(file, cloudSave); + if (!FileUtilities.Exists(file, cloudSave)) + { + worldFileData.CreationTime = DateTime.Now; + worldFileData.Metadata = FileMetadata.FromCurrentSettings(FileType.World); + return worldFileData; + } + try + { + using (Stream input = cloudSave ? (Stream) new MemoryStream(SocialAPI.Cloud.Read(file)) : (Stream) new FileStream(file, FileMode.Open)) + { + using (BinaryReader reader = new BinaryReader(input)) + { + int num1 = reader.ReadInt32(); + if (num1 >= 135) + worldFileData.Metadata = FileMetadata.Read(reader, FileType.World); + else + worldFileData.Metadata = FileMetadata.FromCurrentSettings(FileType.World); + if (num1 <= 230) + { + int num2 = (int) reader.ReadInt16(); + input.Position = (long) reader.ReadInt32(); + worldFileData.Name = reader.ReadString(); + if (num1 >= 179) + { + string seedText = num1 != 179 ? reader.ReadString() : reader.ReadInt32().ToString(); + worldFileData.SetSeed(seedText); + worldFileData.WorldGeneratorVersion = reader.ReadUInt64(); + } + else + { + worldFileData.SetSeedToEmpty(); + worldFileData.WorldGeneratorVersion = 0UL; + } + worldFileData.UniqueId = num1 < 181 ? Guid.Empty : new Guid(reader.ReadBytes(16)); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadInt32(); + int y = reader.ReadInt32(); + int x = reader.ReadInt32(); + worldFileData.SetWorldSize(x, y); + if (num1 >= 209) + { + worldFileData.GameMode = reader.ReadInt32(); + if (num1 >= 222) + { + worldFileData.DrunkWorld = reader.ReadBoolean(); + if (num1 >= 227) + reader.ReadBoolean(); + } + } + else if (num1 >= 112) + worldFileData.GameMode = !reader.ReadBoolean() ? 0 : 1; + worldFileData.CreationTime = num1 < 141 ? (cloudSave ? DateTime.Now : File.GetCreationTime(file)) : DateTime.FromBinary(reader.ReadInt64()); + int num3 = (int) reader.ReadByte(); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadInt32(); + reader.ReadDouble(); + reader.ReadDouble(); + reader.ReadDouble(); + reader.ReadBoolean(); + reader.ReadInt32(); + reader.ReadBoolean(); + reader.ReadBoolean(); + reader.ReadInt32(); + reader.ReadInt32(); + worldFileData.HasCrimson = reader.ReadBoolean(); + reader.ReadBoolean(); + reader.ReadBoolean(); + reader.ReadBoolean(); + reader.ReadBoolean(); + reader.ReadBoolean(); + reader.ReadBoolean(); + reader.ReadBoolean(); + reader.ReadBoolean(); + reader.ReadBoolean(); + reader.ReadBoolean(); + int num4 = num1 < 118 ? 0 : (reader.ReadBoolean() ? 1 : 0); + reader.ReadBoolean(); + reader.ReadBoolean(); + reader.ReadBoolean(); + reader.ReadBoolean(); + reader.ReadBoolean(); + reader.ReadBoolean(); + reader.ReadBoolean(); + reader.ReadBoolean(); + reader.ReadBoolean(); + int num5 = (int) reader.ReadByte(); + reader.ReadInt32(); + worldFileData.IsHardMode = reader.ReadBoolean(); + return worldFileData; + } + } + } + } + catch (Exception ex) + { + } + return (WorldFileData) null; + } + + public static WorldFileData CreateMetadata( + string name, + bool cloudSave, + int GameMode) + { + WorldFileData worldFileData = new WorldFileData(Main.GetWorldPathFromName(name, cloudSave), cloudSave); + if (Main.autoGenFileLocation != null && Main.autoGenFileLocation != "") + { + worldFileData = new WorldFileData(Main.autoGenFileLocation, cloudSave); + Main.autoGenFileLocation = (string) null; + } + worldFileData.Name = name; + worldFileData.GameMode = GameMode; + worldFileData.CreationTime = DateTime.Now; + worldFileData.Metadata = FileMetadata.FromCurrentSettings(FileType.World); + worldFileData.SetFavorite(false); + worldFileData.WorldGeneratorVersion = 987842478081UL; + worldFileData.UniqueId = Guid.NewGuid(); + if (Main.DefaultSeed == "") + worldFileData.SetSeedToRandom(); + else + worldFileData.SetSeed(Main.DefaultSeed); + return worldFileData; + } + + public static void ResetTemps() + { + WorldFile._tempRaining = false; + WorldFile._tempMaxRain = 0.0f; + WorldFile._tempRainTime = 0; + WorldFile._tempDayTime = true; + WorldFile._tempBloodMoon = false; + WorldFile._tempEclipse = false; + WorldFile._tempMoonPhase = 0; + Main.anglerWhoFinishedToday.Clear(); + Main.anglerQuestFinished = false; + } + + private static void ClearTempTiles() + { + for (int i = 0; i < Main.maxTilesX; ++i) + { + for (int j = 0; j < Main.maxTilesY; ++j) + { + if (Main.tile[i, j].type == (ushort) sbyte.MaxValue || Main.tile[i, j].type == (ushort) 504) + WorldGen.KillTile(i, j); + } + } + } + + public static void LoadWorld(bool loadFromCloud) + { + Main.lockMenuBGChange = true; + WorldFile._isWorldOnCloud = loadFromCloud; + Main.checkXMas(); + Main.checkHalloween(); + bool flag = loadFromCloud && SocialAPI.Cloud != null; + if (!FileUtilities.Exists(Main.worldPathName, flag) && Main.autoGen) + { + if (!flag) + { + for (int index = Main.worldPathName.Length - 1; index >= 0; --index) + { + if (Main.worldPathName.Substring(index, 1) == (Path.DirectorySeparatorChar.ToString() ?? "")) + { + Utils.TryCreatingDirectory(Main.worldPathName.Substring(0, index)); + break; + } + } + } + WorldGen.clearWorld(); + Main.ActiveWorldFileData = WorldFile.CreateMetadata(Main.worldName == "" ? "World" : Main.worldName, flag, Main.GameMode); + string seedText = (Main.AutogenSeedName ?? "").Trim(); + if (seedText.Length == 0) + Main.ActiveWorldFileData.SetSeedToRandom(); + else + Main.ActiveWorldFileData.SetSeed(seedText); + WorldGen.GenerateWorld(Main.ActiveWorldFileData.Seed, Main.AutogenProgress); + WorldFile.SaveWorld(); + } + using (MemoryStream memoryStream = new MemoryStream(FileUtilities.ReadAllBytes(Main.worldPathName, flag))) + { + using (BinaryReader binaryReader = new BinaryReader((Stream) memoryStream)) + { + try + { + WorldGen.loadFailed = false; + WorldGen.loadSuccess = false; + int num1 = binaryReader.ReadInt32(); + WorldFile._versionNumber = num1; + if (WorldFile._versionNumber <= 0 || WorldFile._versionNumber > 230) + { + WorldGen.loadFailed = true; + return; + } + int num2 = num1 > 87 ? WorldFile.LoadWorld_Version2(binaryReader) : WorldFile.LoadWorld_Version1_Old_BeforeRelease88(binaryReader); + if (num1 < 141) + Main.ActiveWorldFileData.CreationTime = loadFromCloud ? DateTime.Now : File.GetCreationTime(Main.worldPathName); + WorldFile.CheckSavedOreTiers(); + binaryReader.Close(); + memoryStream.Close(); + if (num2 != 0) + WorldGen.loadFailed = true; + else + WorldGen.loadSuccess = true; + if (WorldGen.loadFailed || !WorldGen.loadSuccess) + return; + WorldFile.ConvertOldTileEntities(); + WorldFile.ClearTempTiles(); + WorldGen.gen = true; + WorldGen.waterLine = Main.maxTilesY; + Liquid.QuickWater(2); + WorldGen.WaterCheck(); + int num3 = 0; + Liquid.quickSettle = true; + int num4 = Liquid.numLiquid + LiquidBuffer.numLiquidBuffer; + float num5 = 0.0f; + while (Liquid.numLiquid > 0 && num3 < 100000) + { + ++num3; + float num6 = (float) (num4 - (Liquid.numLiquid + LiquidBuffer.numLiquidBuffer)) / (float) num4; + if (Liquid.numLiquid + LiquidBuffer.numLiquidBuffer > num4) + num4 = Liquid.numLiquid + LiquidBuffer.numLiquidBuffer; + if ((double) num6 > (double) num5) + num5 = num6; + else + num6 = num5; + Main.statusText = Lang.gen[27].Value + " " + (object) (int) ((double) num6 * 100.0 / 2.0 + 50.0) + "%"; + Liquid.UpdateLiquid(); + } + Liquid.quickSettle = false; + Main.weatherCounter = WorldGen.genRand.Next(3600, 18000); + Cloud.resetClouds(); + WorldGen.WaterCheck(); + WorldGen.gen = false; + NPC.setFireFlyChance(); + if (Main.slimeRainTime > 0.0) + Main.StartSlimeRain(false); + NPC.SetWorldSpecificMonstersByWorldID(); + } + catch (Exception ex) + { + WorldFile.LastThrownLoadException = ex; + WorldGen.loadFailed = true; + WorldGen.loadSuccess = false; + try + { + binaryReader.Close(); + memoryStream.Close(); + return; + } + catch + { + return; + } + } + } + } + if (WorldFile.OnWorldLoad == null) + return; + WorldFile.OnWorldLoad(); + } + + public static void CheckSavedOreTiers() + { + if (WorldGen.SavedOreTiers.Copper != -1 && WorldGen.SavedOreTiers.Iron != -1 && WorldGen.SavedOreTiers.Silver != -1 && WorldGen.SavedOreTiers.Gold != -1) + return; + int[] numArray = WorldGen.CountTileTypesInWorld(7, 166, 6, 167, 9, 168, 8, 169); + for (int index = 0; index < numArray.Length; index += 2) + { + int num1 = numArray[index]; + int num2 = numArray[index + 1]; + switch (index) + { + case 0: + WorldGen.SavedOreTiers.Copper = num1 <= num2 ? 166 : 7; + break; + case 2: + WorldGen.SavedOreTiers.Iron = num1 <= num2 ? 167 : 6; + break; + case 4: + WorldGen.SavedOreTiers.Silver = num1 <= num2 ? 168 : 9; + break; + case 6: + WorldGen.SavedOreTiers.Gold = num1 <= num2 ? 169 : 8; + break; + } + } + } + + public static void SaveWorld() + { + try + { + WorldFile.SaveWorld(WorldFile._isWorldOnCloud); + } + catch (Exception ex) + { + string worldPath = Main.WorldPath; + FancyErrorPrinter.ShowFileSavingFailError(ex, worldPath); + throw; + } + } + + public static void SaveWorld(bool useCloudSaving, bool resetTime = false) + { + if (useCloudSaving && SocialAPI.Cloud == null) + return; + if (Main.worldName == "") + Main.worldName = "World"; + while (WorldGen.IsGeneratingHardMode) + Main.statusText = Lang.gen[48].Value; + if (!Monitor.TryEnter(WorldFile.IOLock)) + return; + try + { + FileUtilities.ProtectedInvoke((Action) (() => WorldFile.InternalSaveWorld(useCloudSaving, resetTime))); + } + finally + { + Monitor.Exit(WorldFile.IOLock); + } + } + + private static void InternalSaveWorld(bool useCloudSaving, bool resetTime) + { + Utils.TryCreatingDirectory(Main.WorldPath); + if (Main.skipMenu) + return; + if (WorldFile._hasCache) + WorldFile.SetTempToCache(); + else + WorldFile.SetTempToOngoing(); + if (resetTime) + WorldFile.ResetTempsToDayTime(); + if (Main.worldPathName == null) + return; + new Stopwatch().Start(); + byte[] array; + int length; + using (MemoryStream memoryStream = new MemoryStream(7000000)) + { + using (BinaryWriter writer = new BinaryWriter((Stream) memoryStream)) + WorldFile.SaveWorld_Version2(writer); + array = memoryStream.ToArray(); + length = array.Length; + } + byte[] data = (byte[]) null; + if (FileUtilities.Exists(Main.worldPathName, useCloudSaving)) + data = FileUtilities.ReadAllBytes(Main.worldPathName, useCloudSaving); + FileUtilities.Write(Main.worldPathName, array, length, useCloudSaving); + byte[] buffer = FileUtilities.ReadAllBytes(Main.worldPathName, useCloudSaving); + string str = (string) null; + using (MemoryStream memoryStream = new MemoryStream(buffer, 0, length, false)) + { + using (BinaryReader fileIO = new BinaryReader((Stream) memoryStream)) + { + if (!Main.validateSaves || WorldFile.ValidateWorld(fileIO)) + { + if (data != null) + { + str = Main.worldPathName + ".bak"; + Main.statusText = Lang.gen[50].Value; + } + WorldFile.DoRollingBackups(str); + } + else + str = Main.worldPathName; + } + } + if (str == null || data == null) + return; + FileUtilities.WriteAllBytes(str, data, useCloudSaving); + } + + private static void DoRollingBackups(string backupWorldWritePath) + { + if (Main.WorldRollingBackupsCountToKeep <= 1) + return; + int num1 = Main.WorldRollingBackupsCountToKeep; + if (num1 > 9) + num1 = 9; + int num2 = 1; + for (int index = 1; index < num1; ++index) + { + string path = backupWorldWritePath + (object) index; + if (index == 1) + path = backupWorldWritePath; + if (FileUtilities.Exists(path, false)) + num2 = index + 1; + else + break; + } + for (int index = num2 - 1; index > 0; --index) + { + string str = backupWorldWritePath + (object) index; + if (index == 1) + str = backupWorldWritePath; + string destination = backupWorldWritePath + (object) (index + 1); + if (FileUtilities.Exists(str, false)) + FileUtilities.Move(str, destination, false); + } + } + + private static void ResetTempsToDayTime() + { + WorldFile._tempDayTime = true; + WorldFile._tempTime = 13500.0; + WorldFile._tempMoonPhase = 0; + WorldFile._tempBloodMoon = false; + WorldFile._tempEclipse = false; + WorldFile._tempCultistDelay = 86400; + WorldFile._tempPartyManual = false; + WorldFile._tempPartyGenuine = false; + WorldFile._tempPartyCooldown = 0; + WorldFile.TempPartyCelebratingNPCs.Clear(); + WorldFile._tempSandstormHappening = false; + WorldFile._tempSandstormTimeLeft = 0; + WorldFile._tempSandstormSeverity = 0.0f; + WorldFile._tempSandstormIntendedSeverity = 0.0f; + WorldFile._tempLanternNightCooldown = 0; + WorldFile._tempLanternNightGenuine = false; + WorldFile._tempLanternNightManual = false; + WorldFile._tempLanternNightNextNightIsGenuine = false; + } + + private static void SetTempToOngoing() + { + WorldFile._tempDayTime = Main.dayTime; + WorldFile._tempTime = Main.time; + WorldFile._tempMoonPhase = Main.moonPhase; + WorldFile._tempBloodMoon = Main.bloodMoon; + WorldFile._tempEclipse = Main.eclipse; + WorldFile._tempCultistDelay = CultistRitual.delay; + WorldFile._tempPartyManual = BirthdayParty.ManualParty; + WorldFile._tempPartyGenuine = BirthdayParty.GenuineParty; + WorldFile._tempPartyCooldown = BirthdayParty.PartyDaysOnCooldown; + WorldFile.TempPartyCelebratingNPCs.Clear(); + WorldFile.TempPartyCelebratingNPCs.AddRange((IEnumerable) BirthdayParty.CelebratingNPCs); + WorldFile._tempSandstormHappening = Sandstorm.Happening; + WorldFile._tempSandstormTimeLeft = Sandstorm.TimeLeft; + WorldFile._tempSandstormSeverity = Sandstorm.Severity; + WorldFile._tempSandstormIntendedSeverity = Sandstorm.IntendedSeverity; + WorldFile._tempRaining = Main.raining; + WorldFile._tempRainTime = Main.rainTime; + WorldFile._tempMaxRain = Main.maxRaining; + WorldFile._tempLanternNightCooldown = LanternNight.LanternNightsOnCooldown; + WorldFile._tempLanternNightGenuine = LanternNight.GenuineLanterns; + WorldFile._tempLanternNightManual = LanternNight.ManualLanterns; + WorldFile._tempLanternNightNextNightIsGenuine = LanternNight.NextNightIsLanternNight; + } + + private static void SetTempToCache() + { + WorldFile._hasCache = false; + WorldFile._tempDayTime = WorldFile._cachedDayTime.Value; + WorldFile._tempTime = WorldFile._cachedTime.Value; + WorldFile._tempMoonPhase = WorldFile._cachedMoonPhase.Value; + WorldFile._tempBloodMoon = WorldFile._cachedBloodMoon.Value; + WorldFile._tempEclipse = WorldFile._cachedEclipse.Value; + WorldFile._tempCultistDelay = WorldFile._cachedCultistDelay.Value; + WorldFile._tempPartyManual = WorldFile._cachedPartyManual.Value; + WorldFile._tempPartyGenuine = WorldFile._cachedPartyGenuine.Value; + WorldFile._tempPartyCooldown = WorldFile._cachedPartyDaysOnCooldown.Value; + WorldFile.TempPartyCelebratingNPCs.Clear(); + WorldFile.TempPartyCelebratingNPCs.AddRange((IEnumerable) WorldFile.CachedCelebratingNPCs); + WorldFile._tempSandstormHappening = WorldFile._cachedSandstormHappening.Value; + WorldFile._tempSandstormTimeLeft = WorldFile._cachedSandstormTimeLeft.Value; + WorldFile._tempSandstormSeverity = WorldFile._cachedSandstormSeverity.Value; + WorldFile._tempSandstormIntendedSeverity = WorldFile._cachedSandstormIntendedSeverity.Value; + WorldFile._tempRaining = Main.raining; + WorldFile._tempRainTime = Main.rainTime; + WorldFile._tempMaxRain = Main.maxRaining; + WorldFile._tempLanternNightCooldown = WorldFile._cachedLanternNightCooldown.Value; + WorldFile._tempLanternNightGenuine = WorldFile._cachedLanternNightGenuine.Value; + WorldFile._tempLanternNightManual = WorldFile._cachedLanternNightManual.Value; + WorldFile._tempLanternNightNextNightIsGenuine = WorldFile._cachedLanternNightNextNightIsGenuine.Value; + } + + private static void ConvertOldTileEntities() + { + List pointList1 = new List(); + List pointList2 = new List(); + for (int x = 0; x < Main.maxTilesX; ++x) + { + for (int y = 0; y < Main.maxTilesY; ++y) + { + Tile tile = Main.tile[x, y]; + if ((tile.type == (ushort) 128 || tile.type == (ushort) 269) && tile.frameY == (short) 0 && ((int) tile.frameX % 100 == 0 || (int) tile.frameX % 100 == 36)) + pointList1.Add(new Point(x, y)); + if (tile.type == (ushort) 334 && tile.frameY == (short) 0 && (int) tile.frameX % 54 == 0) + pointList2.Add(new Point(x, y)); + if (tile.type == (ushort) 49 && (tile.frameX == (short) -1 || tile.frameY == (short) -1)) + { + tile.frameX = (short) 0; + tile.frameY = (short) 0; + } + } + } + foreach (Point point in pointList1) + { + if (WorldGen.InWorld(point.X, point.Y, 5)) + { + int frameX1 = (int) Main.tile[point.X, point.Y].frameX; + int frameX2 = (int) Main.tile[point.X, point.Y + 1].frameX; + int frameX3 = (int) Main.tile[point.X, point.Y + 2].frameX; + for (int index1 = 0; index1 < 2; ++index1) + { + for (int index2 = 0; index2 < 3; ++index2) + { + Tile tile = Main.tile[point.X + index1, point.Y + index2]; + tile.frameX %= (short) 100; + if (tile.type == (ushort) 269) + tile.frameX += (short) 72; + tile.type = (ushort) 470; + } + } + int key = TEDisplayDoll.Place(point.X, point.Y); + if (key != -1) + (TileEntity.ByID[key] as TEDisplayDoll).SetInventoryFromMannequin(frameX1, frameX2, frameX3); + } + } + foreach (Point point in pointList2) + { + if (WorldGen.InWorld(point.X, point.Y, 5)) + { + bool flag1 = Main.tile[point.X, point.Y].frameX >= (short) 54; + int frameX4 = (int) Main.tile[point.X, point.Y + 1].frameX; + int frameX5 = (int) Main.tile[point.X + 1, point.Y + 1].frameX; + bool flag2 = frameX4 >= 5000; + int netid = frameX4 % 5000 - 100; + int prefix = frameX5 - (frameX5 >= 25000 ? 25000 : 10000); + for (int index3 = 0; index3 < 3; ++index3) + { + for (int index4 = 0; index4 < 3; ++index4) + { + Tile tile = Main.tile[point.X + index3, point.Y + index4]; + tile.type = (ushort) 471; + tile.frameX = (short) ((flag1 ? 54 : 0) + index3 * 18); + tile.frameY = (short) (index4 * 18); + } + } + if (TEWeaponsRack.Place(point.X, point.Y) != -1 & flag2) + TEWeaponsRack.TryPlacing(point.X, point.Y, netid, prefix, 1); + } + } + } + + private static void SaveWorld_Version2(BinaryWriter writer) + { + int[] pointers = new int[11] + { + WorldFile.SaveFileFormatHeader(writer), + WorldFile.SaveWorldHeader(writer), + WorldFile.SaveWorldTiles(writer), + WorldFile.SaveChests(writer), + WorldFile.SaveSigns(writer), + WorldFile.SaveNPCs(writer), + WorldFile.SaveTileEntities(writer), + WorldFile.SaveWeightedPressurePlates(writer), + WorldFile.SaveTownManager(writer), + WorldFile.SaveBestiary(writer), + WorldFile.SaveCreativePowers(writer) + }; + WorldFile.SaveFooter(writer); + WorldFile.SaveHeaderPointers(writer, pointers); + } + + private static int SaveFileFormatHeader(BinaryWriter writer) + { + short num1 = 623; + short num2 = 11; + writer.Write(230); + Main.WorldFileMetadata.IncrementAndWrite(writer); + writer.Write(num2); + for (int index = 0; index < (int) num2; ++index) + writer.Write(0); + writer.Write(num1); + byte num3 = 0; + byte num4 = 1; + for (int index = 0; index < (int) num1; ++index) + { + if (Main.tileFrameImportant[index]) + num3 |= num4; + if (num4 == (byte) 128) + { + writer.Write(num3); + num3 = (byte) 0; + num4 = (byte) 1; + } + else + num4 <<= 1; + } + if (num4 != (byte) 1) + writer.Write(num3); + return (int) writer.BaseStream.Position; + } + + private static int SaveHeaderPointers(BinaryWriter writer, int[] pointers) + { + writer.BaseStream.Position = 0L; + writer.Write(230); + writer.BaseStream.Position += 20L; + writer.Write((short) pointers.Length); + for (int index = 0; index < pointers.Length; ++index) + writer.Write(pointers[index]); + return (int) writer.BaseStream.Position; + } + + private static int SaveWorldHeader(BinaryWriter writer) + { + writer.Write(Main.worldName); + writer.Write(Main.ActiveWorldFileData.SeedText); + writer.Write(Main.ActiveWorldFileData.WorldGeneratorVersion); + writer.Write(Main.ActiveWorldFileData.UniqueId.ToByteArray()); + writer.Write(Main.worldID); + writer.Write((int) Main.leftWorld); + writer.Write((int) Main.rightWorld); + writer.Write((int) Main.topWorld); + writer.Write((int) Main.bottomWorld); + writer.Write(Main.maxTilesY); + writer.Write(Main.maxTilesX); + writer.Write(Main.GameMode); + writer.Write(Main.drunkWorld); + writer.Write(Main.getGoodWorld); + writer.Write(Main.ActiveWorldFileData.CreationTime.ToBinary()); + writer.Write((byte) Main.moonType); + writer.Write(Main.treeX[0]); + writer.Write(Main.treeX[1]); + writer.Write(Main.treeX[2]); + writer.Write(Main.treeStyle[0]); + writer.Write(Main.treeStyle[1]); + writer.Write(Main.treeStyle[2]); + writer.Write(Main.treeStyle[3]); + writer.Write(Main.caveBackX[0]); + writer.Write(Main.caveBackX[1]); + writer.Write(Main.caveBackX[2]); + writer.Write(Main.caveBackStyle[0]); + writer.Write(Main.caveBackStyle[1]); + writer.Write(Main.caveBackStyle[2]); + writer.Write(Main.caveBackStyle[3]); + writer.Write(Main.iceBackStyle); + writer.Write(Main.jungleBackStyle); + writer.Write(Main.hellBackStyle); + writer.Write(Main.spawnTileX); + writer.Write(Main.spawnTileY); + writer.Write(Main.worldSurface); + writer.Write(Main.rockLayer); + writer.Write(WorldFile._tempTime); + writer.Write(WorldFile._tempDayTime); + writer.Write(WorldFile._tempMoonPhase); + writer.Write(WorldFile._tempBloodMoon); + writer.Write(WorldFile._tempEclipse); + writer.Write(Main.dungeonX); + writer.Write(Main.dungeonY); + writer.Write(WorldGen.crimson); + writer.Write(NPC.downedBoss1); + writer.Write(NPC.downedBoss2); + writer.Write(NPC.downedBoss3); + writer.Write(NPC.downedQueenBee); + writer.Write(NPC.downedMechBoss1); + writer.Write(NPC.downedMechBoss2); + writer.Write(NPC.downedMechBoss3); + writer.Write(NPC.downedMechBossAny); + writer.Write(NPC.downedPlantBoss); + writer.Write(NPC.downedGolemBoss); + writer.Write(NPC.downedSlimeKing); + writer.Write(NPC.savedGoblin); + writer.Write(NPC.savedWizard); + writer.Write(NPC.savedMech); + writer.Write(NPC.downedGoblins); + writer.Write(NPC.downedClown); + writer.Write(NPC.downedFrost); + writer.Write(NPC.downedPirates); + writer.Write(WorldGen.shadowOrbSmashed); + writer.Write(WorldGen.spawnMeteor); + writer.Write((byte) WorldGen.shadowOrbCount); + writer.Write(WorldGen.altarCount); + writer.Write(Main.hardMode); + writer.Write(Main.invasionDelay); + writer.Write(Main.invasionSize); + writer.Write(Main.invasionType); + writer.Write(Main.invasionX); + writer.Write(Main.slimeRainTime); + writer.Write((byte) Main.sundialCooldown); + writer.Write(WorldFile._tempRaining); + writer.Write(WorldFile._tempRainTime); + writer.Write(WorldFile._tempMaxRain); + writer.Write(WorldGen.SavedOreTiers.Cobalt); + writer.Write(WorldGen.SavedOreTiers.Mythril); + writer.Write(WorldGen.SavedOreTiers.Adamantite); + writer.Write((byte) WorldGen.treeBG1); + writer.Write((byte) WorldGen.corruptBG); + writer.Write((byte) WorldGen.jungleBG); + writer.Write((byte) WorldGen.snowBG); + writer.Write((byte) WorldGen.hallowBG); + writer.Write((byte) WorldGen.crimsonBG); + writer.Write((byte) WorldGen.desertBG); + writer.Write((byte) WorldGen.oceanBG); + writer.Write((int) Main.cloudBGActive); + writer.Write((short) Main.numClouds); + writer.Write(Main.windSpeedTarget); + writer.Write(Main.anglerWhoFinishedToday.Count); + for (int index = 0; index < Main.anglerWhoFinishedToday.Count; ++index) + writer.Write(Main.anglerWhoFinishedToday[index]); + writer.Write(NPC.savedAngler); + writer.Write(Main.anglerQuest); + writer.Write(NPC.savedStylist); + writer.Write(NPC.savedTaxCollector); + writer.Write(NPC.savedGolfer); + writer.Write(Main.invasionSizeStart); + writer.Write(WorldFile._tempCultistDelay); + writer.Write((short) 663); + for (int index = 0; index < 663; ++index) + writer.Write(NPC.killCount[index]); + writer.Write(Main.fastForwardTime); + writer.Write(NPC.downedFishron); + writer.Write(NPC.downedMartians); + writer.Write(NPC.downedAncientCultist); + writer.Write(NPC.downedMoonlord); + writer.Write(NPC.downedHalloweenKing); + writer.Write(NPC.downedHalloweenTree); + writer.Write(NPC.downedChristmasIceQueen); + writer.Write(NPC.downedChristmasSantank); + writer.Write(NPC.downedChristmasTree); + writer.Write(NPC.downedTowerSolar); + writer.Write(NPC.downedTowerVortex); + writer.Write(NPC.downedTowerNebula); + writer.Write(NPC.downedTowerStardust); + writer.Write(NPC.TowerActiveSolar); + writer.Write(NPC.TowerActiveVortex); + writer.Write(NPC.TowerActiveNebula); + writer.Write(NPC.TowerActiveStardust); + writer.Write(NPC.LunarApocalypseIsUp); + writer.Write(WorldFile._tempPartyManual); + writer.Write(WorldFile._tempPartyGenuine); + writer.Write(WorldFile._tempPartyCooldown); + writer.Write(WorldFile.TempPartyCelebratingNPCs.Count); + for (int index = 0; index < WorldFile.TempPartyCelebratingNPCs.Count; ++index) + writer.Write(WorldFile.TempPartyCelebratingNPCs[index]); + writer.Write(WorldFile._tempSandstormHappening); + writer.Write(WorldFile._tempSandstormTimeLeft); + writer.Write(WorldFile._tempSandstormSeverity); + writer.Write(WorldFile._tempSandstormIntendedSeverity); + writer.Write(NPC.savedBartender); + DD2Event.Save(writer); + writer.Write((byte) WorldGen.mushroomBG); + writer.Write((byte) WorldGen.underworldBG); + writer.Write((byte) WorldGen.treeBG2); + writer.Write((byte) WorldGen.treeBG3); + writer.Write((byte) WorldGen.treeBG4); + writer.Write(NPC.combatBookWasUsed); + writer.Write(WorldFile._tempLanternNightCooldown); + writer.Write(WorldFile._tempLanternNightGenuine); + writer.Write(WorldFile._tempLanternNightManual); + writer.Write(WorldFile._tempLanternNightNextNightIsGenuine); + WorldGen.TreeTops.Save(writer); + writer.Write(Main.forceHalloweenForToday); + writer.Write(Main.forceXMasForToday); + writer.Write(WorldGen.SavedOreTiers.Copper); + writer.Write(WorldGen.SavedOreTiers.Iron); + writer.Write(WorldGen.SavedOreTiers.Silver); + writer.Write(WorldGen.SavedOreTiers.Gold); + writer.Write(NPC.boughtCat); + writer.Write(NPC.boughtDog); + writer.Write(NPC.boughtBunny); + writer.Write(NPC.downedEmpressOfLight); + writer.Write(NPC.downedQueenSlime); + return (int) writer.BaseStream.Position; + } + + private static int SaveWorldTiles(BinaryWriter writer) + { + byte[] buffer = new byte[15]; + for (int index1 = 0; index1 < Main.maxTilesX; ++index1) + { + float num1 = (float) index1 / (float) Main.maxTilesX; + Main.statusText = Lang.gen[49].Value + " " + (object) (int) ((double) num1 * 100.0 + 1.0) + "%"; + int num2; + for (int index2 = 0; index2 < Main.maxTilesY; index2 = num2 + 1) + { + Tile tile = Main.tile[index1, index2]; + int index3 = 3; + int num3; + byte num4 = (byte) (num3 = 0); + byte num5 = (byte) num3; + byte num6 = (byte) num3; + bool flag = false; + if (tile.active()) + flag = true; + if (flag) + { + num6 |= (byte) 2; + buffer[index3] = (byte) tile.type; + ++index3; + if (tile.type > (ushort) byte.MaxValue) + { + buffer[index3] = (byte) ((uint) tile.type >> 8); + ++index3; + num6 |= (byte) 32; + } + if (Main.tileFrameImportant[(int) tile.type]) + { + buffer[index3] = (byte) ((uint) tile.frameX & (uint) byte.MaxValue); + int index4 = index3 + 1; + buffer[index4] = (byte) (((int) tile.frameX & 65280) >> 8); + int index5 = index4 + 1; + buffer[index5] = (byte) ((uint) tile.frameY & (uint) byte.MaxValue); + int index6 = index5 + 1; + buffer[index6] = (byte) (((int) tile.frameY & 65280) >> 8); + index3 = index6 + 1; + } + if (tile.color() != (byte) 0) + { + num4 |= (byte) 8; + buffer[index3] = tile.color(); + ++index3; + } + } + if (tile.wall != (ushort) 0) + { + num6 |= (byte) 4; + buffer[index3] = (byte) tile.wall; + ++index3; + if (tile.wallColor() != (byte) 0) + { + num4 |= (byte) 16; + buffer[index3] = tile.wallColor(); + ++index3; + } + } + if (tile.liquid != (byte) 0) + { + if (tile.lava()) + num6 |= (byte) 16; + else if (tile.honey()) + num6 |= (byte) 24; + else + num6 |= (byte) 8; + buffer[index3] = tile.liquid; + ++index3; + } + if (tile.wire()) + num5 |= (byte) 2; + if (tile.wire2()) + num5 |= (byte) 4; + if (tile.wire3()) + num5 |= (byte) 8; + int num7 = !tile.halfBrick() ? (tile.slope() == (byte) 0 ? 0 : (int) tile.slope() + 1 << 4) : 16; + byte num8 = (byte) ((uint) num5 | (uint) (byte) num7); + if (tile.actuator()) + num4 |= (byte) 2; + if (tile.inActive()) + num4 |= (byte) 4; + if (tile.wire4()) + num4 |= (byte) 32; + if (tile.wall > (ushort) byte.MaxValue) + { + buffer[index3] = (byte) ((uint) tile.wall >> 8); + ++index3; + num4 |= (byte) 64; + } + int index7 = 2; + if (num4 != (byte) 0) + { + num8 |= (byte) 1; + buffer[index7] = num4; + --index7; + } + if (num8 != (byte) 0) + { + num6 |= (byte) 1; + buffer[index7] = num8; + --index7; + } + short num9 = 0; + int index8 = index2 + 1; + for (int index9 = Main.maxTilesY - index2 - 1; index9 > 0 && tile.isTheSameAs(Main.tile[index1, index8]); ++index8) + { + ++num9; + --index9; + } + num2 = index2 + (int) num9; + if (num9 > (short) 0) + { + buffer[index3] = (byte) ((uint) num9 & (uint) byte.MaxValue); + ++index3; + if (num9 > (short) byte.MaxValue) + { + num6 |= (byte) 128; + buffer[index3] = (byte) (((int) num9 & 65280) >> 8); + ++index3; + } + else + num6 |= (byte) 64; + } + buffer[index7] = num6; + writer.Write(buffer, index7, index3 - index7); + } + } + return (int) writer.BaseStream.Position; + } + + private static int SaveChests(BinaryWriter writer) + { + short num = 0; + for (int index = 0; index < 8000; ++index) + { + Chest chest = Main.chest[index]; + if (chest != null) + { + bool flag = false; + for (int x = chest.x; x <= chest.x + 1; ++x) + { + for (int y = chest.y; y <= chest.y + 1; ++y) + { + if (x < 0 || y < 0 || x >= Main.maxTilesX || y >= Main.maxTilesY) + { + flag = true; + break; + } + Tile tile = Main.tile[x, y]; + if (!tile.active() || !Main.tileContainer[(int) tile.type]) + { + flag = true; + break; + } + } + } + if (flag) + Main.chest[index] = (Chest) null; + else + ++num; + } + } + writer.Write(num); + writer.Write((short) 40); + for (int index1 = 0; index1 < 8000; ++index1) + { + Chest chest = Main.chest[index1]; + if (chest != null) + { + writer.Write(chest.x); + writer.Write(chest.y); + writer.Write(chest.name); + for (int index2 = 0; index2 < 40; ++index2) + { + Item obj = chest.item[index2]; + if (obj == null) + { + writer.Write((short) 0); + } + else + { + if (obj.stack > obj.maxStack) + obj.stack = obj.maxStack; + if (obj.stack < 0) + obj.stack = 1; + writer.Write((short) obj.stack); + if (obj.stack > 0) + { + writer.Write(obj.netID); + writer.Write(obj.prefix); + } + } + } + } + } + return (int) writer.BaseStream.Position; + } + + private static int SaveSigns(BinaryWriter writer) + { + short num = 0; + for (int index = 0; index < 1000; ++index) + { + Sign sign = Main.sign[index]; + if (sign != null && sign.text != null) + ++num; + } + writer.Write(num); + for (int index = 0; index < 1000; ++index) + { + Sign sign = Main.sign[index]; + if (sign != null && sign.text != null) + { + writer.Write(sign.text); + writer.Write(sign.x); + writer.Write(sign.y); + } + } + return (int) writer.BaseStream.Position; + } + + private static int SaveNPCs(BinaryWriter writer) + { + for (int index = 0; index < Main.npc.Length; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && npc.townNPC && npc.type != 368) + { + writer.Write(npc.active); + writer.Write(npc.netID); + writer.Write(npc.GivenName); + writer.Write(npc.position.X); + writer.Write(npc.position.Y); + writer.Write(npc.homeless); + writer.Write(npc.homeTileX); + writer.Write(npc.homeTileY); + BitsByte bitsByte = (BitsByte) (byte) 0; + bitsByte[0] = npc.townNPC; + writer.Write((byte) bitsByte); + if (bitsByte[0]) + writer.Write(npc.townNpcVariationIndex); + } + } + writer.Write(false); + for (int index = 0; index < Main.npc.Length; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && NPCID.Sets.SavesAndLoads[npc.type]) + { + writer.Write(npc.active); + writer.Write(npc.netID); + writer.WriteVector2(npc.position); + } + } + writer.Write(false); + return (int) writer.BaseStream.Position; + } + + private static int SaveFooter(BinaryWriter writer) + { + writer.Write(true); + writer.Write(Main.worldName); + writer.Write(Main.worldID); + return (int) writer.BaseStream.Position; + } + + private static int LoadWorld_Version2(BinaryReader reader) + { + reader.BaseStream.Position = 0L; + bool[] importance; + int[] positions; + if (!WorldFile.LoadFileFormatHeader(reader, out importance, out positions) || reader.BaseStream.Position != (long) positions[0]) + return 5; + WorldFile.LoadHeader(reader); + if (reader.BaseStream.Position != (long) positions[1]) + return 5; + WorldFile.LoadWorldTiles(reader, importance); + if (reader.BaseStream.Position != (long) positions[2]) + return 5; + WorldFile.LoadChests(reader); + if (reader.BaseStream.Position != (long) positions[3]) + return 5; + WorldFile.LoadSigns(reader); + if (reader.BaseStream.Position != (long) positions[4]) + return 5; + WorldFile.LoadNPCs(reader); + if (reader.BaseStream.Position != (long) positions[5]) + return 5; + if (WorldFile._versionNumber >= 116) + { + if (WorldFile._versionNumber < 122) + { + WorldFile.LoadDummies(reader); + if (reader.BaseStream.Position != (long) positions[6]) + return 5; + } + else + { + WorldFile.LoadTileEntities(reader); + if (reader.BaseStream.Position != (long) positions[6]) + return 5; + } + } + if (WorldFile._versionNumber >= 170) + { + WorldFile.LoadWeightedPressurePlates(reader); + if (reader.BaseStream.Position != (long) positions[7]) + return 5; + } + if (WorldFile._versionNumber >= 189) + { + WorldFile.LoadTownManager(reader); + if (reader.BaseStream.Position != (long) positions[8]) + return 5; + } + if (WorldFile._versionNumber >= 210) + { + WorldFile.LoadBestiary(reader, WorldFile._versionNumber); + if (reader.BaseStream.Position != (long) positions[9]) + return 5; + } + else + WorldFile.LoadBestiaryForVersionsBefore210(); + if (WorldFile._versionNumber >= 220) + { + WorldFile.LoadCreativePowers(reader, WorldFile._versionNumber); + if (reader.BaseStream.Position != (long) positions[10]) + return 5; + } + return WorldFile.LoadFooter(reader); + } + + private static bool LoadFileFormatHeader( + BinaryReader reader, + out bool[] importance, + out int[] positions) + { + importance = (bool[]) null; + positions = (int[]) null; + if ((WorldFile._versionNumber = reader.ReadInt32()) >= 135) + { + try + { + Main.WorldFileMetadata = FileMetadata.Read(reader, FileType.World); + } + catch (FileFormatException ex) + { + Console.WriteLine(Language.GetTextValue("Error.UnableToLoadWorld")); + Console.WriteLine((object) ex); + return false; + } + } + else + Main.WorldFileMetadata = FileMetadata.FromCurrentSettings(FileType.World); + short num1 = reader.ReadInt16(); + positions = new int[(int) num1]; + for (int index = 0; index < (int) num1; ++index) + positions[index] = reader.ReadInt32(); + short num2 = reader.ReadInt16(); + importance = new bool[(int) num2]; + byte num3 = 0; + byte num4 = 128; + for (int index = 0; index < (int) num2; ++index) + { + if (num4 == (byte) 128) + { + num3 = reader.ReadByte(); + num4 = (byte) 1; + } + else + num4 <<= 1; + if (((int) num3 & (int) num4) == (int) num4) + importance[index] = true; + } + return true; + } + + private static void LoadHeader(BinaryReader reader) + { + int versionNumber = WorldFile._versionNumber; + Main.worldName = reader.ReadString(); + if (versionNumber >= 179) + { + string seedText = versionNumber != 179 ? reader.ReadString() : reader.ReadInt32().ToString(); + Main.ActiveWorldFileData.SetSeed(seedText); + Main.ActiveWorldFileData.WorldGeneratorVersion = reader.ReadUInt64(); + } + Main.ActiveWorldFileData.UniqueId = versionNumber < 181 ? Guid.NewGuid() : new Guid(reader.ReadBytes(16)); + Main.worldID = reader.ReadInt32(); + Main.leftWorld = (float) reader.ReadInt32(); + Main.rightWorld = (float) reader.ReadInt32(); + Main.topWorld = (float) reader.ReadInt32(); + Main.bottomWorld = (float) reader.ReadInt32(); + Main.maxTilesY = reader.ReadInt32(); + Main.maxTilesX = reader.ReadInt32(); + WorldGen.clearWorld(); + if (versionNumber >= 209) + { + Main.GameMode = reader.ReadInt32(); + if (versionNumber >= 222) + Main.drunkWorld = reader.ReadBoolean(); + if (versionNumber >= 227) + Main.getGoodWorld = reader.ReadBoolean(); + } + else + { + Main.GameMode = versionNumber < 112 ? 0 : (reader.ReadBoolean() ? 1 : 0); + if (versionNumber == 208 && reader.ReadBoolean()) + Main.GameMode = 2; + } + if (versionNumber >= 141) + Main.ActiveWorldFileData.CreationTime = DateTime.FromBinary(reader.ReadInt64()); + Main.moonType = (int) reader.ReadByte(); + Main.treeX[0] = reader.ReadInt32(); + Main.treeX[1] = reader.ReadInt32(); + Main.treeX[2] = reader.ReadInt32(); + Main.treeStyle[0] = reader.ReadInt32(); + Main.treeStyle[1] = reader.ReadInt32(); + Main.treeStyle[2] = reader.ReadInt32(); + Main.treeStyle[3] = reader.ReadInt32(); + Main.caveBackX[0] = reader.ReadInt32(); + Main.caveBackX[1] = reader.ReadInt32(); + Main.caveBackX[2] = reader.ReadInt32(); + Main.caveBackStyle[0] = reader.ReadInt32(); + Main.caveBackStyle[1] = reader.ReadInt32(); + Main.caveBackStyle[2] = reader.ReadInt32(); + Main.caveBackStyle[3] = reader.ReadInt32(); + Main.iceBackStyle = reader.ReadInt32(); + Main.jungleBackStyle = reader.ReadInt32(); + Main.hellBackStyle = reader.ReadInt32(); + Main.spawnTileX = reader.ReadInt32(); + Main.spawnTileY = reader.ReadInt32(); + Main.worldSurface = reader.ReadDouble(); + Main.rockLayer = reader.ReadDouble(); + WorldFile._tempTime = reader.ReadDouble(); + WorldFile._tempDayTime = reader.ReadBoolean(); + WorldFile._tempMoonPhase = reader.ReadInt32(); + WorldFile._tempBloodMoon = reader.ReadBoolean(); + WorldFile._tempEclipse = reader.ReadBoolean(); + Main.eclipse = WorldFile._tempEclipse; + Main.dungeonX = reader.ReadInt32(); + Main.dungeonY = reader.ReadInt32(); + WorldGen.crimson = reader.ReadBoolean(); + NPC.downedBoss1 = reader.ReadBoolean(); + NPC.downedBoss2 = reader.ReadBoolean(); + NPC.downedBoss3 = reader.ReadBoolean(); + NPC.downedQueenBee = reader.ReadBoolean(); + NPC.downedMechBoss1 = reader.ReadBoolean(); + NPC.downedMechBoss2 = reader.ReadBoolean(); + NPC.downedMechBoss3 = reader.ReadBoolean(); + NPC.downedMechBossAny = reader.ReadBoolean(); + NPC.downedPlantBoss = reader.ReadBoolean(); + NPC.downedGolemBoss = reader.ReadBoolean(); + if (versionNumber >= 118) + NPC.downedSlimeKing = reader.ReadBoolean(); + NPC.savedGoblin = reader.ReadBoolean(); + NPC.savedWizard = reader.ReadBoolean(); + NPC.savedMech = reader.ReadBoolean(); + NPC.downedGoblins = reader.ReadBoolean(); + NPC.downedClown = reader.ReadBoolean(); + NPC.downedFrost = reader.ReadBoolean(); + NPC.downedPirates = reader.ReadBoolean(); + WorldGen.shadowOrbSmashed = reader.ReadBoolean(); + WorldGen.spawnMeteor = reader.ReadBoolean(); + WorldGen.shadowOrbCount = (int) reader.ReadByte(); + WorldGen.altarCount = reader.ReadInt32(); + Main.hardMode = reader.ReadBoolean(); + Main.invasionDelay = reader.ReadInt32(); + Main.invasionSize = reader.ReadInt32(); + Main.invasionType = reader.ReadInt32(); + Main.invasionX = reader.ReadDouble(); + if (versionNumber >= 118) + Main.slimeRainTime = reader.ReadDouble(); + if (versionNumber >= 113) + Main.sundialCooldown = (int) reader.ReadByte(); + WorldFile._tempRaining = reader.ReadBoolean(); + WorldFile._tempRainTime = reader.ReadInt32(); + WorldFile._tempMaxRain = reader.ReadSingle(); + WorldGen.SavedOreTiers.Cobalt = reader.ReadInt32(); + WorldGen.SavedOreTiers.Mythril = reader.ReadInt32(); + WorldGen.SavedOreTiers.Adamantite = reader.ReadInt32(); + WorldGen.setBG(0, (int) reader.ReadByte()); + WorldGen.setBG(1, (int) reader.ReadByte()); + WorldGen.setBG(2, (int) reader.ReadByte()); + WorldGen.setBG(3, (int) reader.ReadByte()); + WorldGen.setBG(4, (int) reader.ReadByte()); + WorldGen.setBG(5, (int) reader.ReadByte()); + WorldGen.setBG(6, (int) reader.ReadByte()); + WorldGen.setBG(7, (int) reader.ReadByte()); + Main.cloudBGActive = (float) reader.ReadInt32(); + Main.cloudBGAlpha = (double) Main.cloudBGActive < 1.0 ? 0.0f : 1f; + Main.cloudBGActive = (float) -WorldGen.genRand.Next(8640, 86400); + Main.numClouds = (int) reader.ReadInt16(); + Main.windSpeedTarget = reader.ReadSingle(); + Main.windSpeedCurrent = Main.windSpeedTarget; + if (versionNumber < 95) + return; + Main.anglerWhoFinishedToday.Clear(); + for (int index = reader.ReadInt32(); index > 0; --index) + Main.anglerWhoFinishedToday.Add(reader.ReadString()); + if (versionNumber < 99) + return; + NPC.savedAngler = reader.ReadBoolean(); + if (versionNumber < 101) + return; + Main.anglerQuest = reader.ReadInt32(); + if (versionNumber < 104) + return; + NPC.savedStylist = reader.ReadBoolean(); + if (versionNumber >= 129) + NPC.savedTaxCollector = reader.ReadBoolean(); + if (versionNumber >= 201) + NPC.savedGolfer = reader.ReadBoolean(); + if (versionNumber < 107) + { + if (Main.invasionType > 0 && Main.invasionSize > 0) + Main.FakeLoadInvasionStart(); + } + else + Main.invasionSizeStart = reader.ReadInt32(); + WorldFile._tempCultistDelay = versionNumber >= 108 ? reader.ReadInt32() : 86400; + if (versionNumber < 109) + return; + int num1 = (int) reader.ReadInt16(); + for (int index = 0; index < num1; ++index) + { + if (index < 663) + NPC.killCount[index] = reader.ReadInt32(); + else + reader.ReadInt32(); + } + if (versionNumber < 128) + return; + Main.fastForwardTime = reader.ReadBoolean(); + Main.UpdateTimeRate(); + if (versionNumber < 131) + return; + NPC.downedFishron = reader.ReadBoolean(); + NPC.downedMartians = reader.ReadBoolean(); + NPC.downedAncientCultist = reader.ReadBoolean(); + NPC.downedMoonlord = reader.ReadBoolean(); + NPC.downedHalloweenKing = reader.ReadBoolean(); + NPC.downedHalloweenTree = reader.ReadBoolean(); + NPC.downedChristmasIceQueen = reader.ReadBoolean(); + NPC.downedChristmasSantank = reader.ReadBoolean(); + NPC.downedChristmasTree = reader.ReadBoolean(); + if (versionNumber < 140) + return; + NPC.downedTowerSolar = reader.ReadBoolean(); + NPC.downedTowerVortex = reader.ReadBoolean(); + NPC.downedTowerNebula = reader.ReadBoolean(); + NPC.downedTowerStardust = reader.ReadBoolean(); + NPC.TowerActiveSolar = reader.ReadBoolean(); + NPC.TowerActiveVortex = reader.ReadBoolean(); + NPC.TowerActiveNebula = reader.ReadBoolean(); + NPC.TowerActiveStardust = reader.ReadBoolean(); + NPC.LunarApocalypseIsUp = reader.ReadBoolean(); + if (NPC.TowerActiveSolar) + NPC.ShieldStrengthTowerSolar = NPC.ShieldStrengthTowerMax; + if (NPC.TowerActiveVortex) + NPC.ShieldStrengthTowerVortex = NPC.ShieldStrengthTowerMax; + if (NPC.TowerActiveNebula) + NPC.ShieldStrengthTowerNebula = NPC.ShieldStrengthTowerMax; + if (NPC.TowerActiveStardust) + NPC.ShieldStrengthTowerStardust = NPC.ShieldStrengthTowerMax; + if (versionNumber < 170) + { + WorldFile._tempPartyManual = false; + WorldFile._tempPartyGenuine = false; + WorldFile._tempPartyCooldown = 0; + WorldFile.TempPartyCelebratingNPCs.Clear(); + } + else + { + WorldFile._tempPartyManual = reader.ReadBoolean(); + WorldFile._tempPartyGenuine = reader.ReadBoolean(); + WorldFile._tempPartyCooldown = reader.ReadInt32(); + int num2 = reader.ReadInt32(); + WorldFile.TempPartyCelebratingNPCs.Clear(); + for (int index = 0; index < num2; ++index) + WorldFile.TempPartyCelebratingNPCs.Add(reader.ReadInt32()); + } + if (versionNumber < 174) + { + WorldFile._tempSandstormHappening = false; + WorldFile._tempSandstormTimeLeft = 0; + WorldFile._tempSandstormSeverity = 0.0f; + WorldFile._tempSandstormIntendedSeverity = 0.0f; + } + else + { + WorldFile._tempSandstormHappening = reader.ReadBoolean(); + WorldFile._tempSandstormTimeLeft = reader.ReadInt32(); + WorldFile._tempSandstormSeverity = reader.ReadSingle(); + WorldFile._tempSandstormIntendedSeverity = reader.ReadSingle(); + } + DD2Event.Load(reader, versionNumber); + if (versionNumber > 194) + WorldGen.setBG(8, (int) reader.ReadByte()); + else + WorldGen.setBG(8, 0); + if (versionNumber >= 215) + WorldGen.setBG(9, (int) reader.ReadByte()); + else + WorldGen.setBG(9, 0); + if (versionNumber > 195) + { + WorldGen.setBG(10, (int) reader.ReadByte()); + WorldGen.setBG(11, (int) reader.ReadByte()); + WorldGen.setBG(12, (int) reader.ReadByte()); + } + else + { + WorldGen.setBG(10, WorldGen.treeBG1); + WorldGen.setBG(11, WorldGen.treeBG1); + WorldGen.setBG(12, WorldGen.treeBG1); + } + if (versionNumber >= 204) + NPC.combatBookWasUsed = reader.ReadBoolean(); + if (versionNumber < 207) + { + WorldFile._tempLanternNightCooldown = 0; + WorldFile._tempLanternNightGenuine = false; + WorldFile._tempLanternNightManual = false; + WorldFile._tempLanternNightNextNightIsGenuine = false; + } + else + { + WorldFile._tempLanternNightCooldown = reader.ReadInt32(); + WorldFile._tempLanternNightGenuine = reader.ReadBoolean(); + WorldFile._tempLanternNightManual = reader.ReadBoolean(); + WorldFile._tempLanternNightNextNightIsGenuine = reader.ReadBoolean(); + } + WorldGen.TreeTops.Load(reader, versionNumber); + if (versionNumber >= 212) + { + Main.forceHalloweenForToday = reader.ReadBoolean(); + Main.forceXMasForToday = reader.ReadBoolean(); + } + else + { + Main.forceHalloweenForToday = false; + Main.forceXMasForToday = false; + } + if (versionNumber >= 216) + { + WorldGen.SavedOreTiers.Copper = reader.ReadInt32(); + WorldGen.SavedOreTiers.Iron = reader.ReadInt32(); + WorldGen.SavedOreTiers.Silver = reader.ReadInt32(); + WorldGen.SavedOreTiers.Gold = reader.ReadInt32(); + } + else + { + WorldGen.SavedOreTiers.Copper = -1; + WorldGen.SavedOreTiers.Iron = -1; + WorldGen.SavedOreTiers.Silver = -1; + WorldGen.SavedOreTiers.Gold = -1; + } + if (versionNumber >= 217) + { + NPC.boughtCat = reader.ReadBoolean(); + NPC.boughtDog = reader.ReadBoolean(); + NPC.boughtBunny = reader.ReadBoolean(); + } + else + { + NPC.boughtCat = false; + NPC.boughtDog = false; + NPC.boughtBunny = false; + } + if (versionNumber >= 223) + { + NPC.downedEmpressOfLight = reader.ReadBoolean(); + NPC.downedQueenSlime = reader.ReadBoolean(); + } + else + { + NPC.downedEmpressOfLight = false; + NPC.downedQueenSlime = false; + } + } + + private static void LoadWorldTiles(BinaryReader reader, bool[] importance) + { + for (int index1 = 0; index1 < Main.maxTilesX; ++index1) + { + float num1 = (float) index1 / (float) Main.maxTilesX; + Main.statusText = Lang.gen[51].Value + " " + (object) (int) ((double) num1 * 100.0 + 1.0) + "%"; + for (int index2 = 0; index2 < Main.maxTilesY; ++index2) + { + int index3 = -1; + byte num2; + byte num3 = num2 = (byte) 0; + Tile from = Main.tile[index1, index2]; + byte num4 = reader.ReadByte(); + if (((int) num4 & 1) == 1) + { + num3 = reader.ReadByte(); + if (((int) num3 & 1) == 1) + num2 = reader.ReadByte(); + } + if (((int) num4 & 2) == 2) + { + from.active(true); + if (((int) num4 & 32) == 32) + { + byte num5 = reader.ReadByte(); + index3 = (int) reader.ReadByte() << 8 | (int) num5; + } + else + index3 = (int) reader.ReadByte(); + from.type = (ushort) index3; + if (importance[index3]) + { + from.frameX = reader.ReadInt16(); + from.frameY = reader.ReadInt16(); + if (from.type == (ushort) 144) + from.frameY = (short) 0; + } + else + { + from.frameX = (short) -1; + from.frameY = (short) -1; + } + if (((int) num2 & 8) == 8) + from.color(reader.ReadByte()); + } + if (((int) num4 & 4) == 4) + { + from.wall = (ushort) reader.ReadByte(); + if (from.wall >= (ushort) 316) + from.wall = (ushort) 0; + if (((int) num2 & 16) == 16) + from.wallColor(reader.ReadByte()); + } + byte num6 = (byte) (((int) num4 & 24) >> 3); + if (num6 != (byte) 0) + { + from.liquid = reader.ReadByte(); + if (num6 > (byte) 1) + { + if (num6 == (byte) 2) + from.lava(true); + else + from.honey(true); + } + } + if (num3 > (byte) 1) + { + if (((int) num3 & 2) == 2) + from.wire(true); + if (((int) num3 & 4) == 4) + from.wire2(true); + if (((int) num3 & 8) == 8) + from.wire3(true); + byte num7 = (byte) (((int) num3 & 112) >> 4); + if (num7 != (byte) 0 && (Main.tileSolid[(int) from.type] || TileID.Sets.NonSolidSaveSlopes[(int) from.type])) + { + if (num7 == (byte) 1) + from.halfBrick(true); + else + from.slope((byte) ((uint) num7 - 1U)); + } + } + if (num2 > (byte) 0) + { + if (((int) num2 & 2) == 2) + from.actuator(true); + if (((int) num2 & 4) == 4) + from.inActive(true); + if (((int) num2 & 32) == 32) + from.wire4(true); + if (((int) num2 & 64) == 64) + { + byte num8 = reader.ReadByte(); + from.wall = (ushort) ((uint) num8 << 8 | (uint) from.wall); + if (from.wall >= (ushort) 316) + from.wall = (ushort) 0; + } + } + int num9; + switch ((byte) (((int) num4 & 192) >> 6)) + { + case 0: + num9 = 0; + break; + case 1: + num9 = (int) reader.ReadByte(); + break; + default: + num9 = (int) reader.ReadInt16(); + break; + } + if (index3 != -1) + { + if ((double) index2 <= Main.worldSurface) + { + if ((double) (index2 + num9) <= Main.worldSurface) + { + WorldGen.tileCounts[index3] += (num9 + 1) * 5; + } + else + { + int num10 = (int) (Main.worldSurface - (double) index2 + 1.0); + int num11 = num9 + 1 - num10; + WorldGen.tileCounts[index3] += num10 * 5 + num11; + } + } + else + WorldGen.tileCounts[index3] += num9 + 1; + } + for (; num9 > 0; --num9) + { + ++index2; + Main.tile[index1, index2].CopyFrom(from); + } + } + } + WorldGen.AddUpAlignmentCounts(true); + if (WorldFile._versionNumber >= 105) + return; + WorldGen.FixHearts(); + } + + private static void LoadChests(BinaryReader reader) + { + int num1 = (int) reader.ReadInt16(); + int num2 = (int) reader.ReadInt16(); + int num3; + int num4; + if (num2 < 40) + { + num3 = num2; + num4 = 0; + } + else + { + num3 = 40; + num4 = num2 - 40; + } + int index1; + for (index1 = 0; index1 < num1; ++index1) + { + Chest chest = new Chest(); + chest.x = reader.ReadInt32(); + chest.y = reader.ReadInt32(); + chest.name = reader.ReadString(); + for (int index2 = 0; index2 < num3; ++index2) + { + short num5 = reader.ReadInt16(); + Item obj = new Item(); + if (num5 > (short) 0) + { + obj.netDefaults(reader.ReadInt32()); + obj.stack = (int) num5; + obj.Prefix((int) reader.ReadByte()); + } + else if (num5 < (short) 0) + { + obj.netDefaults(reader.ReadInt32()); + obj.Prefix((int) reader.ReadByte()); + obj.stack = 1; + } + chest.item[index2] = obj; + } + for (int index3 = 0; index3 < num4; ++index3) + { + if (reader.ReadInt16() > (short) 0) + { + reader.ReadInt32(); + int num6 = (int) reader.ReadByte(); + } + } + Main.chest[index1] = chest; + } + List point16List = new List(); + for (int index4 = 0; index4 < index1; ++index4) + { + if (Main.chest[index4] != null) + { + Point16 point16 = new Point16(Main.chest[index4].x, Main.chest[index4].y); + if (point16List.Contains(point16)) + Main.chest[index4] = (Chest) null; + else + point16List.Add(point16); + } + } + for (; index1 < 8000; ++index1) + Main.chest[index1] = (Chest) null; + if (WorldFile._versionNumber >= 115) + return; + WorldFile.FixDresserChests(); + } + + private static void LoadSigns(BinaryReader reader) + { + short num = reader.ReadInt16(); + int index1; + for (index1 = 0; index1 < (int) num; ++index1) + { + string str = reader.ReadString(); + int index2 = reader.ReadInt32(); + int index3 = reader.ReadInt32(); + Tile tile = Main.tile[index2, index3]; + Sign sign; + if (tile.active() && Main.tileSign[(int) tile.type]) + { + sign = new Sign(); + sign.text = str; + sign.x = index2; + sign.y = index3; + } + else + sign = (Sign) null; + Main.sign[index1] = sign; + } + List point16List = new List(); + for (int index4 = 0; index4 < 1000; ++index4) + { + if (Main.sign[index4] != null) + { + Point16 point16 = new Point16(Main.sign[index4].x, Main.sign[index4].y); + if (point16List.Contains(point16)) + Main.sign[index4] = (Sign) null; + else + point16List.Add(point16); + } + } + for (; index1 < 1000; ++index1) + Main.sign[index1] = (Sign) null; + } + + private static void LoadDummies(BinaryReader reader) + { + int num = reader.ReadInt32(); + for (int index = 0; index < num; ++index) + DeprecatedClassLeftInForLoading.dummies[index] = new DeprecatedClassLeftInForLoading((int) reader.ReadInt16(), (int) reader.ReadInt16()); + for (int index = num; index < 1000; ++index) + DeprecatedClassLeftInForLoading.dummies[index] = (DeprecatedClassLeftInForLoading) null; + } + + private static void LoadNPCs(BinaryReader reader) + { + int index = 0; + for (bool flag = reader.ReadBoolean(); flag; flag = reader.ReadBoolean()) + { + NPC npc = Main.npc[index]; + if (WorldFile._versionNumber >= 190) + npc.SetDefaults(reader.ReadInt32()); + else + npc.SetDefaults(NPCID.FromLegacyName(reader.ReadString())); + npc.GivenName = reader.ReadString(); + npc.position.X = reader.ReadSingle(); + npc.position.Y = reader.ReadSingle(); + npc.homeless = reader.ReadBoolean(); + npc.homeTileX = reader.ReadInt32(); + npc.homeTileY = reader.ReadInt32(); + if (WorldFile._versionNumber >= 213 && ((BitsByte) reader.ReadByte())[0]) + npc.townNpcVariationIndex = reader.ReadInt32(); + ++index; + } + if (WorldFile._versionNumber < 140) + return; + for (bool flag = reader.ReadBoolean(); flag; flag = reader.ReadBoolean()) + { + NPC npc = Main.npc[index]; + if (WorldFile._versionNumber >= 190) + npc.SetDefaults(reader.ReadInt32()); + else + npc.SetDefaults(NPCID.FromLegacyName(reader.ReadString())); + npc.position = reader.ReadVector2(); + ++index; + } + } + + private static void ValidateLoadNPCs(BinaryReader fileIO) + { + for (bool flag = fileIO.ReadBoolean(); flag; flag = fileIO.ReadBoolean()) + { + fileIO.ReadInt32(); + fileIO.ReadString(); + double num1 = (double) fileIO.ReadSingle(); + double num2 = (double) fileIO.ReadSingle(); + fileIO.ReadBoolean(); + fileIO.ReadInt32(); + fileIO.ReadInt32(); + if (((BitsByte) fileIO.ReadByte())[0]) + fileIO.ReadInt32(); + } + for (bool flag = fileIO.ReadBoolean(); flag; flag = fileIO.ReadBoolean()) + { + fileIO.ReadInt32(); + double num3 = (double) fileIO.ReadSingle(); + double num4 = (double) fileIO.ReadSingle(); + } + } + + private static int LoadFooter(BinaryReader reader) => !reader.ReadBoolean() || reader.ReadString() != Main.worldName || reader.ReadInt32() != Main.worldID ? 6 : 0; + + private static bool ValidateWorld(BinaryReader fileIO) + { + new Stopwatch().Start(); + try + { + Stream baseStream = fileIO.BaseStream; + int num1 = fileIO.ReadInt32(); + if (num1 == 0 || num1 > 230) + return false; + baseStream.Position = 0L; + bool[] importance; + int[] positions; + if (!WorldFile.LoadFileFormatHeader(fileIO, out importance, out positions)) + return false; + string str1 = fileIO.ReadString(); + if (num1 >= 179) + { + if (num1 == 179) + fileIO.ReadInt32(); + else + fileIO.ReadString(); + long num2 = (long) fileIO.ReadUInt64(); + } + if (num1 >= 181) + fileIO.ReadBytes(16); + int num3 = fileIO.ReadInt32(); + fileIO.ReadInt32(); + fileIO.ReadInt32(); + fileIO.ReadInt32(); + fileIO.ReadInt32(); + int num4 = fileIO.ReadInt32(); + int num5 = fileIO.ReadInt32(); + baseStream.Position = (long) positions[1]; + for (int index1 = 0; index1 < num5; ++index1) + { + float num6 = (float) index1 / (float) Main.maxTilesX; + Main.statusText = Lang.gen[73].Value + " " + (object) (int) ((double) num6 * 100.0 + 1.0) + "%"; + int num7; + for (int index2 = 0; index2 < num4; index2 = index2 + num7 + 1) + { + byte num8 = 0; + byte num9 = fileIO.ReadByte(); + if (((int) num9 & 1) == 1 && ((int) fileIO.ReadByte() & 1) == 1) + num8 = fileIO.ReadByte(); + if (((int) num9 & 2) == 2) + { + int index3; + if (((int) num9 & 32) == 32) + { + byte num10 = fileIO.ReadByte(); + index3 = (int) fileIO.ReadByte() << 8 | (int) num10; + } + else + index3 = (int) fileIO.ReadByte(); + if (importance[index3]) + { + int num11 = (int) fileIO.ReadInt16(); + int num12 = (int) fileIO.ReadInt16(); + } + if (((int) num8 & 8) == 8) + { + int num13 = (int) fileIO.ReadByte(); + } + } + if (((int) num9 & 4) == 4) + { + int num14 = (int) fileIO.ReadByte(); + if (((int) num8 & 16) == 16) + { + int num15 = (int) fileIO.ReadByte(); + } + } + if (((int) num9 & 24) >> 3 != 0) + { + int num16 = (int) fileIO.ReadByte(); + } + if (((int) num8 & 64) == 64) + { + int num17 = (int) fileIO.ReadByte(); + } + switch ((byte) (((int) num9 & 192) >> 6)) + { + case 0: + num7 = 0; + break; + case 1: + num7 = (int) fileIO.ReadByte(); + break; + default: + num7 = (int) fileIO.ReadInt16(); + break; + } + } + } + if (baseStream.Position != (long) positions[2]) + return false; + int num18 = (int) fileIO.ReadInt16(); + int num19 = (int) fileIO.ReadInt16(); + for (int index4 = 0; index4 < num18; ++index4) + { + fileIO.ReadInt32(); + fileIO.ReadInt32(); + fileIO.ReadString(); + for (int index5 = 0; index5 < num19; ++index5) + { + if (fileIO.ReadInt16() > (short) 0) + { + fileIO.ReadInt32(); + int num20 = (int) fileIO.ReadByte(); + } + } + } + if (baseStream.Position != (long) positions[3]) + return false; + int num21 = (int) fileIO.ReadInt16(); + for (int index = 0; index < num21; ++index) + { + fileIO.ReadString(); + fileIO.ReadInt32(); + fileIO.ReadInt32(); + } + if (baseStream.Position != (long) positions[4]) + return false; + WorldFile.ValidateLoadNPCs(fileIO); + if (baseStream.Position != (long) positions[5]) + return false; + if (WorldFile._versionNumber >= 116 && WorldFile._versionNumber <= 121) + { + int num22 = fileIO.ReadInt32(); + for (int index = 0; index < num22; ++index) + { + int num23 = (int) fileIO.ReadInt16(); + int num24 = (int) fileIO.ReadInt16(); + } + if (baseStream.Position != (long) positions[6]) + return false; + } + if (WorldFile._versionNumber >= 122) + { + int num25 = fileIO.ReadInt32(); + for (int index = 0; index < num25; ++index) + TileEntity.Read(fileIO); + } + if (WorldFile._versionNumber >= 170) + { + int num26 = fileIO.ReadInt32(); + for (int index = 0; index < num26; ++index) + fileIO.ReadInt64(); + } + if (WorldFile._versionNumber >= 189) + { + int num27 = fileIO.ReadInt32(); + fileIO.ReadBytes(12 * num27); + } + if (WorldFile._versionNumber >= 210) + Main.BestiaryTracker.ValidateWorld(fileIO, WorldFile._versionNumber); + if (WorldFile._versionNumber >= 220) + CreativePowerManager.Instance.ValidateWorld(fileIO, WorldFile._versionNumber); + int num28 = fileIO.ReadBoolean() ? 1 : 0; + string str2 = fileIO.ReadString(); + int num29 = fileIO.ReadInt32(); + bool flag = false; + if (num28 != 0 && (str2 == str1 || num29 == num3)) + flag = true; + return flag; + } + catch (Exception ex) + { + using (StreamWriter streamWriter = new StreamWriter("client-crashlog.txt", true)) + { + streamWriter.WriteLine((object) DateTime.Now); + streamWriter.WriteLine((object) ex); + streamWriter.WriteLine(""); + } + return false; + } + } + + private static FileMetadata GetFileMetadata(string file, bool cloudSave) + { + if (file == null) + return (FileMetadata) null; + try + { + byte[] buffer = (byte[]) null; + int num = !cloudSave ? 0 : (SocialAPI.Cloud != null ? 1 : 0); + if (num != 0) + { + int length = 24; + buffer = new byte[length]; + SocialAPI.Cloud.Read(file, buffer, length); + } + using (Stream input = num != 0 ? (Stream) new MemoryStream(buffer) : (Stream) new FileStream(file, FileMode.Open)) + { + using (BinaryReader reader = new BinaryReader(input)) + return reader.ReadInt32() >= 135 ? FileMetadata.Read(reader, FileType.World) : FileMetadata.FromCurrentSettings(FileType.World); + } + } + catch + { + } + return (FileMetadata) null; + } + + private static void FixDresserChests() + { + for (int X = 0; X < Main.maxTilesX; ++X) + { + for (int Y = 0; Y < Main.maxTilesY; ++Y) + { + Tile tile = Main.tile[X, Y]; + if (tile.active() && tile.type == (ushort) 88 && (int) tile.frameX % 54 == 0 && (int) tile.frameY % 36 == 0) + Chest.CreateChest(X, Y); + } + } + } + + private static int SaveTileEntities(BinaryWriter writer) + { + lock (TileEntity.ByID) + { + writer.Write(TileEntity.ByID.Count); + foreach (KeyValuePair keyValuePair in TileEntity.ByID) + TileEntity.Write(writer, keyValuePair.Value); + } + return (int) writer.BaseStream.Position; + } + + private static void LoadTileEntities(BinaryReader reader) + { + TileEntity.ByID.Clear(); + TileEntity.ByPosition.Clear(); + int num1 = reader.ReadInt32(); + int num2 = 0; + for (int index = 0; index < num1; ++index) + { + TileEntity tileEntity1 = TileEntity.Read(reader); + tileEntity1.ID = num2++; + TileEntity.ByID[tileEntity1.ID] = tileEntity1; + TileEntity tileEntity2; + if (TileEntity.ByPosition.TryGetValue(tileEntity1.Position, out tileEntity2)) + TileEntity.ByID.Remove(tileEntity2.ID); + TileEntity.ByPosition[tileEntity1.Position] = tileEntity1; + } + TileEntity.TileEntitiesNextID = num1; + List point16List = new List(); + foreach (KeyValuePair keyValuePair in TileEntity.ByPosition) + { + if (!WorldGen.InWorld((int) keyValuePair.Value.Position.X, (int) keyValuePair.Value.Position.Y, 1)) + point16List.Add(keyValuePair.Value.Position); + else if (!TileEntity.manager.CheckValidTile((int) keyValuePair.Value.type, (int) keyValuePair.Value.Position.X, (int) keyValuePair.Value.Position.Y)) + point16List.Add(keyValuePair.Value.Position); + } + try + { + foreach (Point16 key in point16List) + { + TileEntity tileEntity = TileEntity.ByPosition[key]; + if (TileEntity.ByID.ContainsKey(tileEntity.ID)) + TileEntity.ByID.Remove(tileEntity.ID); + if (TileEntity.ByPosition.ContainsKey(key)) + TileEntity.ByPosition.Remove(key); + } + } + catch + { + } + } + + private static int SaveWeightedPressurePlates(BinaryWriter writer) + { + lock (PressurePlateHelper.PressurePlatesPressed) + { + writer.Write(PressurePlateHelper.PressurePlatesPressed.Count); + foreach (KeyValuePair keyValuePair in PressurePlateHelper.PressurePlatesPressed) + { + writer.Write(keyValuePair.Key.X); + writer.Write(keyValuePair.Key.Y); + } + } + return (int) writer.BaseStream.Position; + } + + private static void LoadWeightedPressurePlates(BinaryReader reader) + { + PressurePlateHelper.Reset(); + PressurePlateHelper.NeedsFirstUpdate = true; + int num = reader.ReadInt32(); + for (int index = 0; index < num; ++index) + { + Point key = new Point(reader.ReadInt32(), reader.ReadInt32()); + PressurePlateHelper.PressurePlatesPressed.Add(key, new bool[(int) byte.MaxValue]); + } + } + + private static int SaveTownManager(BinaryWriter writer) + { + WorldGen.TownManager.Save(writer); + return (int) writer.BaseStream.Position; + } + + private static void LoadTownManager(BinaryReader reader) => WorldGen.TownManager.Load(reader); + + private static int SaveBestiary(BinaryWriter writer) + { + Main.BestiaryTracker.Save(writer); + return (int) writer.BaseStream.Position; + } + + private static void LoadBestiary(BinaryReader reader, int loadVersionNumber) => Main.BestiaryTracker.Load(reader, loadVersionNumber); + + private static void LoadBestiaryForVersionsBefore210() => Main.BestiaryTracker.FillBasedOnVersionBefore210(); + + private static int SaveCreativePowers(BinaryWriter writer) + { + CreativePowerManager.Instance.SaveToWorld(writer); + return (int) writer.BaseStream.Position; + } + + private static void LoadCreativePowers(BinaryReader reader, int loadVersionNumber) => CreativePowerManager.Instance.LoadFromWorld(reader, loadVersionNumber); + + private static int LoadWorld_Version1_Old_BeforeRelease88(BinaryReader fileIO) + { + Main.WorldFileMetadata = FileMetadata.FromCurrentSettings(FileType.World); + int versionNumber = WorldFile._versionNumber; + if (versionNumber > 230) + return 1; + Main.worldName = fileIO.ReadString(); + Main.worldID = fileIO.ReadInt32(); + Main.leftWorld = (float) fileIO.ReadInt32(); + Main.rightWorld = (float) fileIO.ReadInt32(); + Main.topWorld = (float) fileIO.ReadInt32(); + Main.bottomWorld = (float) fileIO.ReadInt32(); + Main.maxTilesY = fileIO.ReadInt32(); + Main.maxTilesX = fileIO.ReadInt32(); + Main.GameMode = versionNumber < 112 ? 0 : (fileIO.ReadBoolean() ? 1 : 0); + if (versionNumber >= 63) + Main.moonType = (int) fileIO.ReadByte(); + else + WorldGen.RandomizeMoonState(); + WorldGen.clearWorld(); + if (versionNumber >= 44) + { + Main.treeX[0] = fileIO.ReadInt32(); + Main.treeX[1] = fileIO.ReadInt32(); + Main.treeX[2] = fileIO.ReadInt32(); + Main.treeStyle[0] = fileIO.ReadInt32(); + Main.treeStyle[1] = fileIO.ReadInt32(); + Main.treeStyle[2] = fileIO.ReadInt32(); + Main.treeStyle[3] = fileIO.ReadInt32(); + } + if (versionNumber >= 60) + { + Main.caveBackX[0] = fileIO.ReadInt32(); + Main.caveBackX[1] = fileIO.ReadInt32(); + Main.caveBackX[2] = fileIO.ReadInt32(); + Main.caveBackStyle[0] = fileIO.ReadInt32(); + Main.caveBackStyle[1] = fileIO.ReadInt32(); + Main.caveBackStyle[2] = fileIO.ReadInt32(); + Main.caveBackStyle[3] = fileIO.ReadInt32(); + Main.iceBackStyle = fileIO.ReadInt32(); + if (versionNumber >= 61) + { + Main.jungleBackStyle = fileIO.ReadInt32(); + Main.hellBackStyle = fileIO.ReadInt32(); + } + } + else + WorldGen.RandomizeCaveBackgrounds(); + Main.spawnTileX = fileIO.ReadInt32(); + Main.spawnTileY = fileIO.ReadInt32(); + Main.worldSurface = fileIO.ReadDouble(); + Main.rockLayer = fileIO.ReadDouble(); + WorldFile._tempTime = fileIO.ReadDouble(); + WorldFile._tempDayTime = fileIO.ReadBoolean(); + WorldFile._tempMoonPhase = fileIO.ReadInt32(); + WorldFile._tempBloodMoon = fileIO.ReadBoolean(); + if (versionNumber >= 70) + { + WorldFile._tempEclipse = fileIO.ReadBoolean(); + Main.eclipse = WorldFile._tempEclipse; + } + Main.dungeonX = fileIO.ReadInt32(); + Main.dungeonY = fileIO.ReadInt32(); + WorldGen.crimson = versionNumber >= 56 && fileIO.ReadBoolean(); + NPC.downedBoss1 = fileIO.ReadBoolean(); + NPC.downedBoss2 = fileIO.ReadBoolean(); + NPC.downedBoss3 = fileIO.ReadBoolean(); + if (versionNumber >= 66) + NPC.downedQueenBee = fileIO.ReadBoolean(); + if (versionNumber >= 44) + { + NPC.downedMechBoss1 = fileIO.ReadBoolean(); + NPC.downedMechBoss2 = fileIO.ReadBoolean(); + NPC.downedMechBoss3 = fileIO.ReadBoolean(); + NPC.downedMechBossAny = fileIO.ReadBoolean(); + } + if (versionNumber >= 64) + { + NPC.downedPlantBoss = fileIO.ReadBoolean(); + NPC.downedGolemBoss = fileIO.ReadBoolean(); + } + if (versionNumber >= 29) + { + NPC.savedGoblin = fileIO.ReadBoolean(); + NPC.savedWizard = fileIO.ReadBoolean(); + if (versionNumber >= 34) + { + NPC.savedMech = fileIO.ReadBoolean(); + if (versionNumber >= 80) + NPC.savedStylist = fileIO.ReadBoolean(); + } + if (versionNumber >= 129) + NPC.savedTaxCollector = fileIO.ReadBoolean(); + if (versionNumber >= 201) + NPC.savedGolfer = fileIO.ReadBoolean(); + NPC.downedGoblins = fileIO.ReadBoolean(); + } + if (versionNumber >= 32) + NPC.downedClown = fileIO.ReadBoolean(); + if (versionNumber >= 37) + NPC.downedFrost = fileIO.ReadBoolean(); + if (versionNumber >= 56) + NPC.downedPirates = fileIO.ReadBoolean(); + WorldGen.shadowOrbSmashed = fileIO.ReadBoolean(); + WorldGen.spawnMeteor = fileIO.ReadBoolean(); + WorldGen.shadowOrbCount = (int) fileIO.ReadByte(); + if (versionNumber >= 23) + { + WorldGen.altarCount = fileIO.ReadInt32(); + Main.hardMode = fileIO.ReadBoolean(); + } + Main.invasionDelay = fileIO.ReadInt32(); + Main.invasionSize = fileIO.ReadInt32(); + Main.invasionType = fileIO.ReadInt32(); + Main.invasionX = fileIO.ReadDouble(); + if (versionNumber >= 113) + Main.sundialCooldown = (int) fileIO.ReadByte(); + if (versionNumber >= 53) + { + WorldFile._tempRaining = fileIO.ReadBoolean(); + WorldFile._tempRainTime = fileIO.ReadInt32(); + WorldFile._tempMaxRain = fileIO.ReadSingle(); + } + if (versionNumber >= 54) + { + WorldGen.SavedOreTiers.Cobalt = fileIO.ReadInt32(); + WorldGen.SavedOreTiers.Mythril = fileIO.ReadInt32(); + WorldGen.SavedOreTiers.Adamantite = fileIO.ReadInt32(); + } + else if (versionNumber >= 23 && WorldGen.altarCount == 0) + { + WorldGen.SavedOreTiers.Cobalt = -1; + WorldGen.SavedOreTiers.Mythril = -1; + WorldGen.SavedOreTiers.Adamantite = -1; + } + else + { + WorldGen.SavedOreTiers.Cobalt = 107; + WorldGen.SavedOreTiers.Mythril = 108; + WorldGen.SavedOreTiers.Adamantite = 111; + } + int style1 = 0; + int style2 = 0; + int style3 = 0; + int style4 = 0; + int style5 = 0; + int style6 = 0; + int style7 = 0; + int style8 = 0; + int style9 = 0; + int style10 = 0; + if (versionNumber >= 55) + { + style1 = (int) fileIO.ReadByte(); + style2 = (int) fileIO.ReadByte(); + style3 = (int) fileIO.ReadByte(); + } + if (versionNumber >= 60) + { + style4 = (int) fileIO.ReadByte(); + style5 = (int) fileIO.ReadByte(); + style6 = (int) fileIO.ReadByte(); + style7 = (int) fileIO.ReadByte(); + style8 = (int) fileIO.ReadByte(); + } + WorldGen.setBG(0, style1); + WorldGen.setBG(1, style2); + WorldGen.setBG(2, style3); + WorldGen.setBG(3, style4); + WorldGen.setBG(4, style5); + WorldGen.setBG(5, style6); + WorldGen.setBG(6, style7); + WorldGen.setBG(7, style8); + WorldGen.setBG(8, style9); + WorldGen.setBG(9, style10); + WorldGen.setBG(10, style1); + WorldGen.setBG(11, style1); + WorldGen.setBG(12, style1); + if (versionNumber >= 60) + { + Main.cloudBGActive = (float) fileIO.ReadInt32(); + Main.cloudBGAlpha = (double) Main.cloudBGActive < 1.0 ? 0.0f : 1f; + } + else + Main.cloudBGActive = (float) -WorldGen.genRand.Next(8640, 86400); + if (versionNumber >= 62) + { + Main.numClouds = (int) fileIO.ReadInt16(); + Main.windSpeedTarget = fileIO.ReadSingle(); + Main.windSpeedCurrent = Main.windSpeedTarget; + } + else + WorldGen.RandomizeWeather(); + for (int index1 = 0; index1 < Main.maxTilesX; ++index1) + { + float num1 = (float) index1 / (float) Main.maxTilesX; + Main.statusText = Lang.gen[51].Value + " " + (object) (int) ((double) num1 * 100.0 + 1.0) + "%"; + for (int index2 = 0; index2 < Main.maxTilesY; ++index2) + { + Tile tile = Main.tile[index1, index2]; + int index3 = -1; + tile.active(fileIO.ReadBoolean()); + if (tile.active()) + { + index3 = versionNumber <= 77 ? (int) fileIO.ReadByte() : (int) fileIO.ReadUInt16(); + tile.type = (ushort) index3; + if (tile.type == (ushort) sbyte.MaxValue || tile.type == (ushort) 504) + tile.active(false); + if (versionNumber < 72 && (tile.type == (ushort) 35 || tile.type == (ushort) 36 || tile.type == (ushort) 170 || tile.type == (ushort) 171 || tile.type == (ushort) 172)) + { + tile.frameX = fileIO.ReadInt16(); + tile.frameY = fileIO.ReadInt16(); + } + else if (Main.tileFrameImportant[index3]) + { + if (versionNumber < 28 && index3 == 4) + { + tile.frameX = (short) 0; + tile.frameY = (short) 0; + } + else if (versionNumber < 40 && tile.type == (ushort) 19) + { + tile.frameX = (short) 0; + tile.frameY = (short) 0; + } + else if (versionNumber < 195 && tile.type == (ushort) 49) + { + tile.frameX = (short) 0; + tile.frameY = (short) 0; + } + else + { + tile.frameX = fileIO.ReadInt16(); + tile.frameY = fileIO.ReadInt16(); + if (tile.type == (ushort) 144) + tile.frameY = (short) 0; + } + } + else + { + tile.frameX = (short) -1; + tile.frameY = (short) -1; + } + if (versionNumber >= 48 && fileIO.ReadBoolean()) + tile.color(fileIO.ReadByte()); + } + if (versionNumber <= 25) + fileIO.ReadBoolean(); + if (fileIO.ReadBoolean()) + { + tile.wall = (ushort) fileIO.ReadByte(); + if (tile.wall >= (ushort) 316) + tile.wall = (ushort) 0; + if (versionNumber >= 48 && fileIO.ReadBoolean()) + tile.wallColor(fileIO.ReadByte()); + } + if (fileIO.ReadBoolean()) + { + tile.liquid = fileIO.ReadByte(); + tile.lava(fileIO.ReadBoolean()); + if (versionNumber >= 51) + tile.honey(fileIO.ReadBoolean()); + } + if (versionNumber >= 33) + tile.wire(fileIO.ReadBoolean()); + if (versionNumber >= 43) + { + tile.wire2(fileIO.ReadBoolean()); + tile.wire3(fileIO.ReadBoolean()); + } + if (versionNumber >= 41) + { + tile.halfBrick(fileIO.ReadBoolean()); + if (!Main.tileSolid[(int) tile.type] && !TileID.Sets.NonSolidSaveSlopes[(int) tile.type]) + tile.halfBrick(false); + if (versionNumber >= 49) + { + tile.slope(fileIO.ReadByte()); + if (!Main.tileSolid[(int) tile.type] && !TileID.Sets.NonSolidSaveSlopes[(int) tile.type]) + tile.slope((byte) 0); + } + } + if (versionNumber >= 42) + { + tile.actuator(fileIO.ReadBoolean()); + tile.inActive(fileIO.ReadBoolean()); + } + int num2 = 0; + if (versionNumber >= 25) + num2 = (int) fileIO.ReadInt16(); + if (index3 != -1) + { + if ((double) index2 <= Main.worldSurface) + { + if ((double) (index2 + num2) <= Main.worldSurface) + { + WorldGen.tileCounts[index3] += (num2 + 1) * 5; + } + else + { + int num3 = (int) (Main.worldSurface - (double) index2 + 1.0); + int num4 = num2 + 1 - num3; + WorldGen.tileCounts[index3] += num3 * 5 + num4; + } + } + else + WorldGen.tileCounts[index3] += num2 + 1; + } + if (num2 > 0) + { + for (int index4 = index2 + 1; index4 < index2 + num2 + 1; ++index4) + Main.tile[index1, index4].CopyFrom(Main.tile[index1, index2]); + index2 += num2; + } + } + } + WorldGen.AddUpAlignmentCounts(true); + if (versionNumber < 67) + WorldGen.FixSunflowers(); + if (versionNumber < 72) + WorldGen.FixChands(); + int num5 = 40; + if (versionNumber < 58) + num5 = 20; + int num6 = 1000; + for (int index5 = 0; index5 < num6; ++index5) + { + if (fileIO.ReadBoolean()) + { + Main.chest[index5] = new Chest(); + Main.chest[index5].x = fileIO.ReadInt32(); + Main.chest[index5].y = fileIO.ReadInt32(); + if (versionNumber >= 85) + { + string str = fileIO.ReadString(); + if (str.Length > 20) + str = str.Substring(0, 20); + Main.chest[index5].name = str; + } + for (int index6 = 0; index6 < 40; ++index6) + { + Main.chest[index5].item[index6] = new Item(); + if (index6 < num5) + { + int num7 = versionNumber < 59 ? (int) fileIO.ReadByte() : (int) fileIO.ReadInt16(); + if (num7 > 0) + { + if (versionNumber >= 38) + { + Main.chest[index5].item[index6].netDefaults(fileIO.ReadInt32()); + } + else + { + short num8 = ItemID.FromLegacyName(fileIO.ReadString(), versionNumber); + Main.chest[index5].item[index6].SetDefaults((int) num8); + } + Main.chest[index5].item[index6].stack = num7; + if (versionNumber >= 36) + Main.chest[index5].item[index6].Prefix((int) fileIO.ReadByte()); + } + } + } + } + } + for (int index7 = 0; index7 < 1000; ++index7) + { + if (fileIO.ReadBoolean()) + { + string str = fileIO.ReadString(); + int index8 = fileIO.ReadInt32(); + int index9 = fileIO.ReadInt32(); + if (Main.tile[index8, index9].active() && (Main.tile[index8, index9].type == (ushort) 55 || Main.tile[index8, index9].type == (ushort) 85)) + { + Main.sign[index7] = new Sign(); + Main.sign[index7].x = index8; + Main.sign[index7].y = index9; + Main.sign[index7].text = str; + } + } + } + bool flag = fileIO.ReadBoolean(); + int index = 0; + while (flag) + { + if (versionNumber >= 190) + Main.npc[index].SetDefaults(fileIO.ReadInt32()); + else + Main.npc[index].SetDefaults(NPCID.FromLegacyName(fileIO.ReadString())); + if (versionNumber >= 83) + Main.npc[index].GivenName = fileIO.ReadString(); + Main.npc[index].position.X = fileIO.ReadSingle(); + Main.npc[index].position.Y = fileIO.ReadSingle(); + Main.npc[index].homeless = fileIO.ReadBoolean(); + Main.npc[index].homeTileX = fileIO.ReadInt32(); + Main.npc[index].homeTileY = fileIO.ReadInt32(); + flag = fileIO.ReadBoolean(); + ++index; + } + if (versionNumber >= 31 && versionNumber <= 83) + { + NPC.setNPCName(fileIO.ReadString(), 17, true); + NPC.setNPCName(fileIO.ReadString(), 18, true); + NPC.setNPCName(fileIO.ReadString(), 19, true); + NPC.setNPCName(fileIO.ReadString(), 20, true); + NPC.setNPCName(fileIO.ReadString(), 22, true); + NPC.setNPCName(fileIO.ReadString(), 54, true); + NPC.setNPCName(fileIO.ReadString(), 38, true); + NPC.setNPCName(fileIO.ReadString(), 107, true); + NPC.setNPCName(fileIO.ReadString(), 108, true); + if (versionNumber >= 35) + { + NPC.setNPCName(fileIO.ReadString(), 124, true); + if (versionNumber >= 65) + { + NPC.setNPCName(fileIO.ReadString(), 160, true); + NPC.setNPCName(fileIO.ReadString(), 178, true); + NPC.setNPCName(fileIO.ReadString(), 207, true); + NPC.setNPCName(fileIO.ReadString(), 208, true); + NPC.setNPCName(fileIO.ReadString(), 209, true); + NPC.setNPCName(fileIO.ReadString(), 227, true); + NPC.setNPCName(fileIO.ReadString(), 228, true); + NPC.setNPCName(fileIO.ReadString(), 229, true); + if (versionNumber >= 79) + NPC.setNPCName(fileIO.ReadString(), 353, true); + } + } + } + if (Main.invasionType > 0 && Main.invasionSize > 0) + Main.FakeLoadInvasionStart(); + if (versionNumber < 7) + return 0; + int num9 = fileIO.ReadBoolean() ? 1 : 0; + string str1 = fileIO.ReadString(); + int num10 = fileIO.ReadInt32(); + return num9 != 0 && (str1 == Main.worldName || num10 == Main.worldID) ? 0 : 2; + } + } +} diff --git a/IO/WorldFileData.cs b/IO/WorldFileData.cs new file mode 100644 index 0000000..6d0d996 --- /dev/null +++ b/IO/WorldFileData.cs @@ -0,0 +1,155 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IO.WorldFileData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using ReLogic.Utilities; +using System; +using System.IO; +using Terraria.Localization; +using Terraria.Utilities; + +namespace Terraria.IO +{ + public class WorldFileData : FileData + { + private const ulong GUID_IN_WORLD_FILE_VERSION = 777389080577; + public DateTime CreationTime; + public int WorldSizeX; + public int WorldSizeY; + public ulong WorldGeneratorVersion; + private string _seedText = ""; + private int _seed; + public bool IsValid = true; + public Guid UniqueId; + public LocalizedText _worldSizeName; + public int GameMode; + public bool DrunkWorld; + public bool HasCorruption = true; + public bool IsHardMode; + + public string SeedText => this._seedText; + + public int Seed => this._seed; + + public string WorldSizeName => this._worldSizeName.Value; + + public bool HasCrimson + { + get => !this.HasCorruption; + set => this.HasCorruption = !value; + } + + public bool HasValidSeed => this.WorldGeneratorVersion > 0UL; + + public bool UseGuidAsMapName => this.WorldGeneratorVersion >= 777389080577UL; + + public string GetFullSeedText() + { + int num1 = 0; + if (this.WorldSizeX == 4200 && this.WorldSizeY == 1200) + num1 = 1; + if (this.WorldSizeX == 6400 && this.WorldSizeY == 1800) + num1 = 2; + if (this.WorldSizeX == 8400 && this.WorldSizeY == 2400) + num1 = 3; + int num2 = 0; + if (this.HasCorruption) + num2 = 1; + if (this.HasCrimson) + num2 = 2; + int num3 = this.GameMode + 1; + return string.Format("{0}.{1}.{2}.{3}", (object) num1, (object) num3, (object) num2, (object) this._seedText); + } + + public WorldFileData() + : base("World") + { + } + + public WorldFileData(string path, bool cloudSave) + : base("World", path, cloudSave) + { + } + + public override void SetAsActive() => Main.ActiveWorldFileData = this; + + public void SetWorldSize(int x, int y) + { + this.WorldSizeX = x; + this.WorldSizeY = y; + switch (x) + { + case 4200: + this._worldSizeName = Language.GetText("UI.WorldSizeSmall"); + break; + case 6400: + this._worldSizeName = Language.GetText("UI.WorldSizeMedium"); + break; + case 8400: + this._worldSizeName = Language.GetText("UI.WorldSizeLarge"); + break; + default: + this._worldSizeName = Language.GetText("UI.WorldSizeUnknown"); + break; + } + } + + public static WorldFileData FromInvalidWorld(string path, bool cloudSave) + { + WorldFileData worldFileData = new WorldFileData(path, cloudSave); + worldFileData.GameMode = 0; + worldFileData.SetSeedToEmpty(); + worldFileData.WorldGeneratorVersion = 0UL; + worldFileData.Metadata = FileMetadata.FromCurrentSettings(FileType.World); + worldFileData.SetWorldSize(1, 1); + worldFileData.HasCorruption = true; + worldFileData.IsHardMode = false; + worldFileData.IsValid = false; + worldFileData.Name = FileUtilities.GetFileName(path, false); + worldFileData.UniqueId = Guid.Empty; + worldFileData.CreationTime = cloudSave ? DateTime.Now : File.GetCreationTime(path); + return worldFileData; + } + + public void SetSeedToEmpty() => this.SetSeed(""); + + public void SetSeed(string seedText) + { + this._seedText = seedText; + WorldGen.currentWorldSeed = seedText; + if (!int.TryParse(seedText, out this._seed)) + this._seed = Crc32.Calculate(seedText); + this._seed = this._seed == int.MinValue ? int.MaxValue : Math.Abs(this._seed); + } + + public void SetSeedToRandom() => this.SetSeed(new UnifiedRandom().Next().ToString()); + + public override void MoveToCloud() + { + if (this.IsCloudSave) + return; + string worldPathFromName = Main.GetWorldPathFromName(this.Name, true); + if (!FileUtilities.MoveToCloud(this.Path, worldPathFromName)) + return; + Main.LocalFavoriteData.ClearEntry((FileData) this); + this._isCloudSave = true; + this._path = worldPathFromName; + Main.CloudFavoritesData.SaveFavorite((FileData) this); + } + + public override void MoveToLocal() + { + if (!this.IsCloudSave) + return; + string worldPathFromName = Main.GetWorldPathFromName(this.Name, false); + if (!FileUtilities.MoveToLocal(this.Path, worldPathFromName)) + return; + Main.CloudFavoritesData.ClearEntry((FileData) this); + this._isCloudSave = false; + this._path = worldPathFromName; + Main.LocalFavoriteData.SaveFavorite((FileData) this); + } + } +} diff --git a/IngameOptions.cs b/IngameOptions.cs new file mode 100644 index 0000000..50a17e5 --- /dev/null +++ b/IngameOptions.cs @@ -0,0 +1,1320 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.IngameOptions +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.Audio; +using Terraria.GameContent; +using Terraria.GameContent.UI; +using Terraria.GameInput; +using Terraria.Localization; +using Terraria.Social; +using Terraria.UI; +using Terraria.UI.Gamepad; + +namespace Terraria +{ + public static class IngameOptions + { + public const int width = 670; + public const int height = 480; + public static float[] leftScale = new float[10] + { + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f + }; + public static float[] rightScale = new float[16] + { + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f, + 0.7f + }; + private static Dictionary _leftSideCategoryMapping = new Dictionary() + { + { + 0, + 0 + }, + { + 1, + 1 + }, + { + 2, + 2 + }, + { + 3, + 3 + } + }; + public static bool[] skipRightSlot = new bool[20]; + public static int leftHover = -1; + public static int rightHover = -1; + public static int oldLeftHover = -1; + public static int oldRightHover = -1; + public static int rightLock = -1; + public static bool inBar; + public static bool notBar; + public static bool noSound; + private static Rectangle _GUIHover; + public static int category; + public static Vector2 valuePosition = Vector2.Zero; + private static string _mouseOverText; + + public static void Open() + { + Main.ClosePlayerChat(); + Main.chatText = ""; + Main.playerInventory = false; + Main.editChest = false; + Main.npcChatText = ""; + SoundEngine.PlaySound(10); + Main.ingameOptionsWindow = true; + IngameOptions.category = 0; + for (int index = 0; index < IngameOptions.leftScale.Length; ++index) + IngameOptions.leftScale[index] = 0.0f; + for (int index = 0; index < IngameOptions.rightScale.Length; ++index) + IngameOptions.rightScale[index] = 0.0f; + IngameOptions.leftHover = -1; + IngameOptions.rightHover = -1; + IngameOptions.oldLeftHover = -1; + IngameOptions.oldRightHover = -1; + IngameOptions.rightLock = -1; + IngameOptions.inBar = false; + IngameOptions.notBar = false; + IngameOptions.noSound = false; + } + + public static void Close() + { + if (Main.setKey != -1) + return; + Main.ingameOptionsWindow = false; + SoundEngine.PlaySound(11); + Recipe.FindRecipes(); + Main.playerInventory = true; + Main.SaveSettings(); + } + + public static void Draw(Main mainInstance, SpriteBatch sb) + { + for (int index = 0; index < IngameOptions.skipRightSlot.Length; ++index) + IngameOptions.skipRightSlot[index] = false; + bool flag1 = GameCulture.FromCultureName(GameCulture.CultureName.Russian).IsActive || GameCulture.FromCultureName(GameCulture.CultureName.Portuguese).IsActive || GameCulture.FromCultureName(GameCulture.CultureName.Polish).IsActive || GameCulture.FromCultureName(GameCulture.CultureName.French).IsActive; + bool isActive1 = GameCulture.FromCultureName(GameCulture.CultureName.Polish).IsActive; + bool isActive2 = GameCulture.FromCultureName(GameCulture.CultureName.German).IsActive; + bool flag2 = GameCulture.FromCultureName(GameCulture.CultureName.Italian).IsActive || GameCulture.FromCultureName(GameCulture.CultureName.Spanish).IsActive; + bool flag3 = false; + int num1 = 70; + float scale = 0.75f; + float num2 = 60f; + float num3 = 300f; + if (flag1) + flag3 = true; + if (isActive1) + num3 = 200f; + Vector2 vector2_1 = new Vector2((float) Main.mouseX, (float) Main.mouseY); + bool flag4 = Main.mouseLeft && Main.mouseLeftRelease; + Vector2 vector2_2 = new Vector2((float) Main.screenWidth, (float) Main.screenHeight); + Vector2 vector2_3 = new Vector2(670f, 480f); + Vector2 vector2_4 = vector2_2 / 2f - vector2_3 / 2f; + int num4 = 20; + IngameOptions._GUIHover = new Rectangle((int) ((double) vector2_4.X - (double) num4), (int) ((double) vector2_4.Y - (double) num4), (int) ((double) vector2_3.X + (double) (num4 * 2)), (int) ((double) vector2_3.Y + (double) (num4 * 2))); + Utils.DrawInvBG(sb, vector2_4.X - (float) num4, vector2_4.Y - (float) num4, vector2_3.X + (float) (num4 * 2), vector2_3.Y + (float) (num4 * 2), new Color(33, 15, 91, (int) byte.MaxValue) * 0.685f); + if (new Rectangle((int) vector2_4.X - num4, (int) vector2_4.Y - num4, (int) vector2_3.X + num4 * 2, (int) vector2_3.Y + num4 * 2).Contains(new Point(Main.mouseX, Main.mouseY))) + Main.player[Main.myPlayer].mouseInterface = true; + Utils.DrawBorderString(sb, Language.GetTextValue("GameUI.SettingsMenu"), vector2_4 + vector2_3 * new Vector2(0.5f, 0.0f), Color.White, anchorx: 0.5f); + if (flag1) + { + Utils.DrawInvBG(sb, vector2_4.X + (float) (num4 / 2), vector2_4.Y + (float) (num4 * 5 / 2), vector2_3.X / 3f - (float) num4, vector2_3.Y - (float) (num4 * 3)); + Utils.DrawInvBG(sb, vector2_4.X + vector2_3.X / 3f + (float) num4, vector2_4.Y + (float) (num4 * 5 / 2), (float) ((double) vector2_3.X * 2.0 / 3.0) - (float) (num4 * 3 / 2), vector2_3.Y - (float) (num4 * 3)); + } + else + { + Utils.DrawInvBG(sb, vector2_4.X + (float) (num4 / 2), vector2_4.Y + (float) (num4 * 5 / 2), vector2_3.X / 2f - (float) num4, vector2_3.Y - (float) (num4 * 3)); + Utils.DrawInvBG(sb, vector2_4.X + vector2_3.X / 2f + (float) num4, vector2_4.Y + (float) (num4 * 5 / 2), vector2_3.X / 2f - (float) (num4 * 3 / 2), vector2_3.Y - (float) (num4 * 3)); + } + float num5 = 0.7f; + float num6 = 0.8f; + float num7 = 0.01f; + if (flag1) + { + num5 = 0.4f; + num6 = 0.44f; + } + if (isActive2) + { + num5 = 0.55f; + num6 = 0.6f; + } + if (IngameOptions.oldLeftHover != IngameOptions.leftHover && IngameOptions.leftHover != -1) + SoundEngine.PlaySound(12); + if (IngameOptions.oldRightHover != IngameOptions.rightHover && IngameOptions.rightHover != -1) + SoundEngine.PlaySound(12); + if (flag4 && IngameOptions.rightHover != -1 && !IngameOptions.noSound) + SoundEngine.PlaySound(12); + IngameOptions.oldLeftHover = IngameOptions.leftHover; + IngameOptions.oldRightHover = IngameOptions.rightHover; + IngameOptions.noSound = false; + bool flag5 = SocialAPI.Network != null && SocialAPI.Network.CanInvite(); + int num8 = 5 + (flag5 ? 1 : 0) + 2; + Vector2 anchor1 = new Vector2(vector2_4.X + vector2_3.X / 4f, vector2_4.Y + (float) (num4 * 5 / 2)); + Vector2 offset1 = new Vector2(0.0f, vector2_3.Y - (float) (num4 * 5)) / (float) (num8 + 1); + if (flag1) + anchor1.X -= 55f; + UILinkPointNavigator.Shortcuts.INGAMEOPTIONS_BUTTONS_LEFT = num8 + 1; + for (int key = 0; key <= num8; ++key) + { + bool flag6 = false; + int num9; + if (IngameOptions._leftSideCategoryMapping.TryGetValue(key, out num9)) + flag6 = IngameOptions.category == num9; + if (IngameOptions.leftHover == key | flag6) + IngameOptions.leftScale[key] += num7; + else + IngameOptions.leftScale[key] -= num7; + if ((double) IngameOptions.leftScale[key] < (double) num5) + IngameOptions.leftScale[key] = num5; + if ((double) IngameOptions.leftScale[key] > (double) num6) + IngameOptions.leftScale[key] = num6; + } + IngameOptions.leftHover = -1; + int category1 = IngameOptions.category; + int i1 = 0; + if (IngameOptions.DrawLeftSide(sb, Lang.menu[114].Value, i1, anchor1, offset1, IngameOptions.leftScale)) + { + IngameOptions.leftHover = i1; + if (flag4) + { + IngameOptions.category = 0; + SoundEngine.PlaySound(10); + } + } + int i2 = i1 + 1; + if (IngameOptions.DrawLeftSide(sb, Lang.menu[210].Value, i2, anchor1, offset1, IngameOptions.leftScale)) + { + IngameOptions.leftHover = i2; + if (flag4) + { + IngameOptions.category = 1; + SoundEngine.PlaySound(10); + } + } + int i3 = i2 + 1; + if (IngameOptions.DrawLeftSide(sb, Lang.menu[63].Value, i3, anchor1, offset1, IngameOptions.leftScale)) + { + IngameOptions.leftHover = i3; + if (flag4) + { + IngameOptions.category = 2; + SoundEngine.PlaySound(10); + } + } + int i4 = i3 + 1; + if (IngameOptions.DrawLeftSide(sb, Lang.menu[218].Value, i4, anchor1, offset1, IngameOptions.leftScale)) + { + IngameOptions.leftHover = i4; + if (flag4) + { + IngameOptions.category = 3; + SoundEngine.PlaySound(10); + } + } + int i5 = i4 + 1; + if (IngameOptions.DrawLeftSide(sb, Lang.menu[66].Value, i5, anchor1, offset1, IngameOptions.leftScale)) + { + IngameOptions.leftHover = i5; + if (flag4) + { + IngameOptions.Close(); + IngameFancyUI.OpenKeybinds(); + } + } + int i6 = i5 + 1; + if (flag5 && IngameOptions.DrawLeftSide(sb, Lang.menu[147].Value, i6, anchor1, offset1, IngameOptions.leftScale)) + { + IngameOptions.leftHover = i6; + if (flag4) + { + IngameOptions.Close(); + SocialAPI.Network.OpenInviteInterface(); + } + } + if (flag5) + ++i6; + if (IngameOptions.DrawLeftSide(sb, Lang.menu[131].Value, i6, anchor1, offset1, IngameOptions.leftScale)) + { + IngameOptions.leftHover = i6; + if (flag4) + { + IngameOptions.Close(); + IngameFancyUI.OpenAchievements(); + } + } + int i7 = i6 + 1; + if (IngameOptions.DrawLeftSide(sb, Lang.menu[118].Value, i7, anchor1, offset1, IngameOptions.leftScale)) + { + IngameOptions.leftHover = i7; + if (flag4) + IngameOptions.Close(); + } + int i8 = i7 + 1; + if (IngameOptions.DrawLeftSide(sb, Lang.inter[35].Value, i8, anchor1, offset1, IngameOptions.leftScale)) + { + IngameOptions.leftHover = i8; + if (flag4) + { + IngameOptions.Close(); + Main.menuMode = 10; + Main.gameMenu = true; + WorldGen.SaveAndQuit(); + } + } + int num10 = i8 + 1; + int category2 = IngameOptions.category; + if (category1 != category2) + { + for (int index = 0; index < IngameOptions.rightScale.Length; ++index) + IngameOptions.rightScale[index] = 0.0f; + } + int num11 = 0; + int num12 = 0; + switch (IngameOptions.category) + { + case 0: + num12 = 16; + num5 = 1f; + num6 = 1.001f; + num7 = 1f / 1000f; + break; + case 1: + num12 = 10; + num5 = 1f; + num6 = 1.001f; + num7 = 1f / 1000f; + break; + case 2: + num12 = 12; + num5 = 1f; + num6 = 1.001f; + num7 = 1f / 1000f; + break; + case 3: + num12 = 15; + num5 = 1f; + num6 = 1.001f; + num7 = 1f / 1000f; + break; + } + if (flag1) + { + num5 -= 0.1f; + num6 -= 0.1f; + } + if (isActive2 && IngameOptions.category == 3) + { + num5 -= 0.15f; + num6 -= 0.15f; + } + if (flag2 && (IngameOptions.category == 0 || IngameOptions.category == 3)) + { + num5 -= 0.2f; + num6 -= 0.2f; + } + UILinkPointNavigator.Shortcuts.INGAMEOPTIONS_BUTTONS_RIGHT = num12; + Vector2 anchor2 = new Vector2(vector2_4.X + (float) ((double) vector2_3.X * 3.0 / 4.0), vector2_4.Y + (float) (num4 * 5 / 2)); + Vector2 offset2 = new Vector2(0.0f, vector2_3.Y - (float) (num4 * 3)) / (float) (num12 + 1); + if (IngameOptions.category == 2) + offset2.Y -= 2f; + Vector2 vector2_5 = new Vector2(8f, 0.0f); + if (flag1) + anchor2.X = vector2_4.X + (float) ((double) vector2_3.X * 2.0 / 3.0); + for (int index = 0; index < IngameOptions.rightScale.Length; ++index) + { + if (IngameOptions.rightLock == index || IngameOptions.rightHover == index && IngameOptions.rightLock == -1) + IngameOptions.rightScale[index] += num7; + else + IngameOptions.rightScale[index] -= num7; + if ((double) IngameOptions.rightScale[index] < (double) num5) + IngameOptions.rightScale[index] = num5; + if ((double) IngameOptions.rightScale[index] > (double) num6) + IngameOptions.rightScale[index] = num6; + } + IngameOptions.inBar = false; + IngameOptions.rightHover = -1; + if (!Main.mouseLeft) + IngameOptions.rightLock = -1; + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = false; + if (IngameOptions.category == 0) + { + int i9 = 0; + IngameOptions.DrawRightSide(sb, Lang.menu[65].Value, i9, anchor2, offset2, IngameOptions.rightScale[i9], 1f); + IngameOptions.skipRightSlot[i9] = true; + int i10 = i9 + 1; + anchor2.X -= (float) num1; + if (IngameOptions.DrawRightSide(sb, Lang.menu[99].Value + " " + (object) Math.Round((double) Main.musicVolume * 100.0) + "%", i10, anchor2, offset2, IngameOptions.rightScale[i10], (float) (((double) IngameOptions.rightScale[i10] - (double) num5) / ((double) num6 - (double) num5)))) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.noSound = true; + IngameOptions.rightHover = i10; + } + IngameOptions.valuePosition.X = (float) ((double) vector2_4.X + (double) vector2_3.X - (double) (num4 / 2) - 20.0); + IngameOptions.valuePosition.Y -= 3f; + float num13 = IngameOptions.DrawValueBar(sb, scale, Main.musicVolume); + if ((IngameOptions.inBar || IngameOptions.rightLock == i10) && !IngameOptions.notBar) + { + IngameOptions.rightHover = i10; + if (Main.mouseLeft && IngameOptions.rightLock == i10) + Main.musicVolume = num13; + } + if ((double) Main.mouseX > (double) vector2_4.X + (double) vector2_3.X * 2.0 / 3.0 + (double) num4 && (double) Main.mouseX < (double) IngameOptions.valuePosition.X + 3.75 && (double) Main.mouseY > (double) IngameOptions.valuePosition.Y - 10.0 && (double) Main.mouseY <= (double) IngameOptions.valuePosition.Y + 10.0) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i10; + } + if (IngameOptions.rightHover == i10) + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 2; + int i11 = i10 + 1; + if (IngameOptions.DrawRightSide(sb, Lang.menu[98].Value + " " + (object) Math.Round((double) Main.soundVolume * 100.0) + "%", i11, anchor2, offset2, IngameOptions.rightScale[i11], (float) (((double) IngameOptions.rightScale[i11] - (double) num5) / ((double) num6 - (double) num5)))) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i11; + } + IngameOptions.valuePosition.X = (float) ((double) vector2_4.X + (double) vector2_3.X - (double) (num4 / 2) - 20.0); + IngameOptions.valuePosition.Y -= 3f; + float num14 = IngameOptions.DrawValueBar(sb, scale, Main.soundVolume); + if ((IngameOptions.inBar || IngameOptions.rightLock == i11) && !IngameOptions.notBar) + { + IngameOptions.rightHover = i11; + if (Main.mouseLeft && IngameOptions.rightLock == i11) + { + Main.soundVolume = num14; + IngameOptions.noSound = true; + } + } + if ((double) Main.mouseX > (double) vector2_4.X + (double) vector2_3.X * 2.0 / 3.0 + (double) num4 && (double) Main.mouseX < (double) IngameOptions.valuePosition.X + 3.75 && (double) Main.mouseY > (double) IngameOptions.valuePosition.Y - 10.0 && (double) Main.mouseY <= (double) IngameOptions.valuePosition.Y + 10.0) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i11; + } + if (IngameOptions.rightHover == i11) + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 3; + int i12 = i11 + 1; + if (IngameOptions.DrawRightSide(sb, Lang.menu[119].Value + " " + (object) Math.Round((double) Main.ambientVolume * 100.0) + "%", i12, anchor2, offset2, IngameOptions.rightScale[i12], (float) (((double) IngameOptions.rightScale[i12] - (double) num5) / ((double) num6 - (double) num5)))) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i12; + } + IngameOptions.valuePosition.X = (float) ((double) vector2_4.X + (double) vector2_3.X - (double) (num4 / 2) - 20.0); + IngameOptions.valuePosition.Y -= 3f; + float num15 = IngameOptions.DrawValueBar(sb, scale, Main.ambientVolume); + if ((IngameOptions.inBar || IngameOptions.rightLock == i12) && !IngameOptions.notBar) + { + IngameOptions.rightHover = i12; + if (Main.mouseLeft && IngameOptions.rightLock == i12) + { + Main.ambientVolume = num15; + IngameOptions.noSound = true; + } + } + if ((double) Main.mouseX > (double) vector2_4.X + (double) vector2_3.X * 2.0 / 3.0 + (double) num4 && (double) Main.mouseX < (double) IngameOptions.valuePosition.X + 3.75 && (double) Main.mouseY > (double) IngameOptions.valuePosition.Y - 10.0 && (double) Main.mouseY <= (double) IngameOptions.valuePosition.Y + 10.0) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i12; + } + if (IngameOptions.rightHover == i12) + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 4; + int i13 = i12 + 1; + anchor2.X += (float) num1; + IngameOptions.DrawRightSide(sb, "", i13, anchor2, offset2, IngameOptions.rightScale[i13], 1f); + IngameOptions.skipRightSlot[i13] = true; + int i14 = i13 + 1; + IngameOptions.DrawRightSide(sb, Language.GetTextValue("GameUI.ZoomCategory"), i14, anchor2, offset2, IngameOptions.rightScale[i14], 1f); + IngameOptions.skipRightSlot[i14] = true; + int i15 = i14 + 1; + anchor2.X -= (float) num1; + string txt1 = Language.GetTextValue("GameUI.GameZoom", (object) Math.Round((double) Main.GameZoomTarget * 100.0), (object) Math.Round((double) Main.GameViewMatrix.Zoom.X * 100.0)); + if (flag3) + txt1 = FontAssets.ItemStack.Value.CreateWrappedText(txt1, num3, Language.ActiveCulture.CultureInfo); + if (IngameOptions.DrawRightSide(sb, txt1, i15, anchor2, offset2, IngameOptions.rightScale[i15] * 0.85f, (float) (((double) IngameOptions.rightScale[i15] - (double) num5) / ((double) num6 - (double) num5)))) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i15; + } + IngameOptions.valuePosition.X = (float) ((double) vector2_4.X + (double) vector2_3.X - (double) (num4 / 2) - 20.0); + IngameOptions.valuePosition.Y -= 3f; + float num16 = IngameOptions.DrawValueBar(sb, scale, Main.GameZoomTarget - 1f); + if ((IngameOptions.inBar || IngameOptions.rightLock == i15) && !IngameOptions.notBar) + { + IngameOptions.rightHover = i15; + if (Main.mouseLeft && IngameOptions.rightLock == i15) + Main.GameZoomTarget = num16 + 1f; + } + if ((double) Main.mouseX > (double) vector2_4.X + (double) vector2_3.X * 2.0 / 3.0 + (double) num4 && (double) Main.mouseX < (double) IngameOptions.valuePosition.X + 3.75 && (double) Main.mouseY > (double) IngameOptions.valuePosition.Y - 10.0 && (double) Main.mouseY <= (double) IngameOptions.valuePosition.Y + 10.0) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i15; + } + if (IngameOptions.rightHover == i15) + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 10; + int i16 = i15 + 1; + bool flag7 = false; + if ((double) Main.temporaryGUIScaleSlider == -1.0) + Main.temporaryGUIScaleSlider = Main.UIScaleWanted; + string txt2 = Language.GetTextValue("GameUI.UIScale", (object) Math.Round((double) Main.temporaryGUIScaleSlider * 100.0), (object) Math.Round((double) Main.UIScale * 100.0)); + if (flag3) + txt2 = FontAssets.ItemStack.Value.CreateWrappedText(txt2, num3, Language.ActiveCulture.CultureInfo); + if (IngameOptions.DrawRightSide(sb, txt2, i16, anchor2, offset2, IngameOptions.rightScale[i16] * 0.75f, (float) (((double) IngameOptions.rightScale[i16] - (double) num5) / ((double) num6 - (double) num5)))) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i16; + } + IngameOptions.valuePosition.X = (float) ((double) vector2_4.X + (double) vector2_3.X - (double) (num4 / 2) - 20.0); + IngameOptions.valuePosition.Y -= 3f; + float num17 = IngameOptions.DrawValueBar(sb, scale, MathHelper.Clamp((float) (((double) Main.temporaryGUIScaleSlider - 0.5) / 1.5), 0.0f, 1f)); + if ((IngameOptions.inBar || IngameOptions.rightLock == i16) && !IngameOptions.notBar) + { + IngameOptions.rightHover = i16; + if (Main.mouseLeft && IngameOptions.rightLock == i16) + { + Main.temporaryGUIScaleSlider = (float) ((double) num17 * 1.5 + 0.5); + Main.temporaryGUIScaleSlider = (float) (int) ((double) Main.temporaryGUIScaleSlider * 100.0) / 100f; + Main.temporaryGUIScaleSliderUpdate = true; + flag7 = true; + } + } + if (!flag7 && Main.temporaryGUIScaleSliderUpdate && (double) Main.temporaryGUIScaleSlider != -1.0) + { + Main.UIScale = Main.temporaryGUIScaleSlider; + Main.temporaryGUIScaleSliderUpdate = false; + } + if ((double) Main.mouseX > (double) vector2_4.X + (double) vector2_3.X * 2.0 / 3.0 + (double) num4 && (double) Main.mouseX < (double) IngameOptions.valuePosition.X + 3.75 && (double) Main.mouseY > (double) IngameOptions.valuePosition.Y - 10.0 && (double) Main.mouseY <= (double) IngameOptions.valuePosition.Y + 10.0) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i16; + } + if (IngameOptions.rightHover == i16) + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 11; + int i17 = i16 + 1; + anchor2.X += (float) num1; + IngameOptions.DrawRightSide(sb, "", i17, anchor2, offset2, IngameOptions.rightScale[i17], 1f); + IngameOptions.skipRightSlot[i17] = true; + int i18 = i17 + 1; + IngameOptions.DrawRightSide(sb, Language.GetTextValue("GameUI.Gameplay"), i18, anchor2, offset2, IngameOptions.rightScale[i18], 1f); + IngameOptions.skipRightSlot[i18] = true; + int i19 = i18 + 1; + if (IngameOptions.DrawRightSide(sb, Main.autoSave ? Lang.menu[67].Value : Lang.menu[68].Value, i19, anchor2, offset2, IngameOptions.rightScale[i19], (float) (((double) IngameOptions.rightScale[i19] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i19; + if (flag4) + Main.autoSave = !Main.autoSave; + } + int i20 = i19 + 1; + if (IngameOptions.DrawRightSide(sb, Main.autoPause ? Lang.menu[69].Value : Lang.menu[70].Value, i20, anchor2, offset2, IngameOptions.rightScale[i20], (float) (((double) IngameOptions.rightScale[i20] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i20; + if (flag4) + Main.autoPause = !Main.autoPause; + } + int i21 = i20 + 1; + if (IngameOptions.DrawRightSide(sb, Main.ReversedUpDownArmorSetBonuses ? Lang.menu[220].Value : Lang.menu[221].Value, i21, anchor2, offset2, IngameOptions.rightScale[i21], (float) (((double) IngameOptions.rightScale[i21] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i21; + if (flag4) + Main.ReversedUpDownArmorSetBonuses = !Main.ReversedUpDownArmorSetBonuses; + } + int i22 = i21 + 1; + string textValue1; + switch (DoorOpeningHelper.PreferenceSettings) + { + case DoorOpeningHelper.DoorAutoOpeningPreference.EnabledForGamepadOnly: + textValue1 = Language.GetTextValue("UI.SmartDoorsGamepad"); + break; + case DoorOpeningHelper.DoorAutoOpeningPreference.EnabledForEverything: + textValue1 = Language.GetTextValue("UI.SmartDoorsEnabled"); + break; + default: + textValue1 = Language.GetTextValue("UI.SmartDoorsDisabled"); + break; + } + if (IngameOptions.DrawRightSide(sb, textValue1, i22, anchor2, offset2, IngameOptions.rightScale[i22], (float) (((double) IngameOptions.rightScale[i22] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i22; + if (flag4) + DoorOpeningHelper.CyclePreferences(); + } + int i23 = i22 + 1; + string textValue2; + if (Player.Settings.HoverControl != Player.Settings.HoverControlMode.Hold) + textValue2 = Language.GetTextValue("UI.HoverControlSettingIsClick"); + else + textValue2 = Language.GetTextValue("UI.HoverControlSettingIsHold"); + if (IngameOptions.DrawRightSide(sb, textValue2, i23, anchor2, offset2, IngameOptions.rightScale[i23], (float) (((double) IngameOptions.rightScale[i23] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i23; + if (flag4) + Player.Settings.CycleHoverControl(); + } + int i24 = i23 + 1; + IngameOptions.DrawRightSide(sb, "", i24, anchor2, offset2, IngameOptions.rightScale[i24], 1f); + IngameOptions.skipRightSlot[i24] = true; + int num18 = i24 + 1; + } + if (IngameOptions.category == 1) + { + int i25 = 0; + if (IngameOptions.DrawRightSide(sb, Main.showItemText ? Lang.menu[71].Value : Lang.menu[72].Value, i25, anchor2, offset2, IngameOptions.rightScale[i25], (float) (((double) IngameOptions.rightScale[i25] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i25; + if (flag4) + Main.showItemText = !Main.showItemText; + } + int i26 = i25 + 1; + if (IngameOptions.DrawRightSide(sb, Lang.menu[123].Value + " " + (object) Lang.menu[124 + Main.invasionProgressMode], i26, anchor2, offset2, IngameOptions.rightScale[i26], (float) (((double) IngameOptions.rightScale[i26] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i26; + if (flag4) + { + ++Main.invasionProgressMode; + if (Main.invasionProgressMode >= 3) + Main.invasionProgressMode = 0; + } + } + int i27 = i26 + 1; + if (IngameOptions.DrawRightSide(sb, Main.placementPreview ? Lang.menu[128].Value : Lang.menu[129].Value, i27, anchor2, offset2, IngameOptions.rightScale[i27], (float) (((double) IngameOptions.rightScale[i27] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i27; + if (flag4) + Main.placementPreview = !Main.placementPreview; + } + int i28 = i27 + 1; + if (IngameOptions.DrawRightSide(sb, ItemSlot.Options.HighlightNewItems ? Lang.inter[117].Value : Lang.inter[116].Value, i28, anchor2, offset2, IngameOptions.rightScale[i28], (float) (((double) IngameOptions.rightScale[i28] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i28; + if (flag4) + ItemSlot.Options.HighlightNewItems = !ItemSlot.Options.HighlightNewItems; + } + int i29 = i28 + 1; + if (IngameOptions.DrawRightSide(sb, Main.MouseShowBuildingGrid ? Lang.menu[229].Value : Lang.menu[230].Value, i29, anchor2, offset2, IngameOptions.rightScale[i29], (float) (((double) IngameOptions.rightScale[i29] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i29; + if (flag4) + Main.MouseShowBuildingGrid = !Main.MouseShowBuildingGrid; + } + int i30 = i29 + 1; + if (IngameOptions.DrawRightSide(sb, Main.GamepadDisableInstructionsDisplay ? Lang.menu[241].Value : Lang.menu[242].Value, i30, anchor2, offset2, IngameOptions.rightScale[i30], (float) (((double) IngameOptions.rightScale[i30] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i30; + if (flag4) + Main.GamepadDisableInstructionsDisplay = !Main.GamepadDisableInstructionsDisplay; + } + int i31 = i30 + 1; + string str1 = ""; + MinimapFrame minimapFrame1 = (MinimapFrame) null; + foreach (KeyValuePair minimapFrame2 in Main.MinimapFrames) + { + MinimapFrame minimapFrame3 = minimapFrame2.Value; + if (minimapFrame3 == Main.ActiveMinimapFrame) + { + str1 = Language.GetTextValue("UI.MinimapFrame_" + minimapFrame2.Key); + break; + } + minimapFrame1 = minimapFrame3; + } + if (minimapFrame1 == null) + minimapFrame1 = Main.MinimapFrames.Values.Last(); + if (IngameOptions.DrawRightSide(sb, Language.GetTextValue("UI.SelectMapBorder", (object) str1), i31, anchor2, offset2, IngameOptions.rightScale[i31], (float) (((double) IngameOptions.rightScale[i31] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i31; + if (flag4) + Main.ActiveMinimapFrame = minimapFrame1; + } + int i32 = i31 + 1; + anchor2.X -= (float) num1; + string txt = Language.GetTextValue("GameUI.MapScale", (object) Math.Round((double) Main.MapScale * 100.0)); + if (flag3) + txt = FontAssets.ItemStack.Value.CreateWrappedText(txt, num3, Language.ActiveCulture.CultureInfo); + if (IngameOptions.DrawRightSide(sb, txt, i32, anchor2, offset2, IngameOptions.rightScale[i32] * 0.85f, (float) (((double) IngameOptions.rightScale[i32] - (double) num5) / ((double) num6 - (double) num5)))) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i32; + } + IngameOptions.valuePosition.X = (float) ((double) vector2_4.X + (double) vector2_3.X - (double) (num4 / 2) - 20.0); + IngameOptions.valuePosition.Y -= 3f; + float num19 = IngameOptions.DrawValueBar(sb, scale, (float) (((double) Main.MapScale - 0.5) / 0.5)); + if ((IngameOptions.inBar || IngameOptions.rightLock == i32) && !IngameOptions.notBar) + { + IngameOptions.rightHover = i32; + if (Main.mouseLeft && IngameOptions.rightLock == i32) + Main.MapScale = (float) ((double) num19 * 0.5 + 0.5); + } + if ((double) Main.mouseX > (double) vector2_4.X + (double) vector2_3.X * 2.0 / 3.0 + (double) num4 && (double) Main.mouseX < (double) IngameOptions.valuePosition.X + 3.75 && (double) Main.mouseY > (double) IngameOptions.valuePosition.Y - 10.0 && (double) Main.mouseY <= (double) IngameOptions.valuePosition.Y + 10.0) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i32; + } + if (IngameOptions.rightHover == i32) + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 12; + int i33 = i32 + 1; + anchor2.X += (float) num1; + string str2 = ""; + IPlayerResourcesDisplaySet resourcesDisplaySet1 = (IPlayerResourcesDisplaySet) null; + foreach (KeyValuePair playerResourcesSet in Main.PlayerResourcesSets) + { + IPlayerResourcesDisplaySet resourcesDisplaySet2 = playerResourcesSet.Value; + if (resourcesDisplaySet2 == Main.ActivePlayerResourcesSet) + { + str2 = Language.GetTextValue("UI.HealthManaStyle_" + playerResourcesSet.Key); + break; + } + resourcesDisplaySet1 = resourcesDisplaySet2; + } + if (resourcesDisplaySet1 == null) + resourcesDisplaySet1 = Main.PlayerResourcesSets.Values.Last(); + if (IngameOptions.DrawRightSide(sb, Language.GetTextValue("UI.SelectHealthStyle", (object) str2), i33, anchor2, offset2, IngameOptions.rightScale[i33], (float) (((double) IngameOptions.rightScale[i33] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i33; + if (flag4) + Main.ActivePlayerResourcesSet = resourcesDisplaySet1; + } + int i34 = i33 + 1; + if (IngameOptions.DrawRightSide(sb, Main.SettingsEnabled_OpaqueBoxBehindTooltips ? Language.GetTextValue("GameUI.HoverTextBoxesOn") : Language.GetTextValue("GameUI.HoverTextBoxesOff"), i34, anchor2, offset2, IngameOptions.rightScale[i34], (float) (((double) IngameOptions.rightScale[i34] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i34; + if (flag4) + Main.SettingsEnabled_OpaqueBoxBehindTooltips = !Main.SettingsEnabled_OpaqueBoxBehindTooltips; + } + int num20 = i34 + 1; + } + if (IngameOptions.category == 2) + { + int i35 = 0; + if (IngameOptions.DrawRightSide(sb, Main.graphics.IsFullScreen ? Lang.menu[49].Value : Lang.menu[50].Value, i35, anchor2, offset2, IngameOptions.rightScale[i35], (float) (((double) IngameOptions.rightScale[i35] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i35; + if (flag4) + Main.ToggleFullScreen(); + } + int i36 = i35 + 1; + if (IngameOptions.DrawRightSide(sb, Lang.menu[51].Value + ": " + (object) Main.PendingResolutionWidth + "x" + (object) Main.PendingResolutionHeight, i36, anchor2, offset2, IngameOptions.rightScale[i36], (float) (((double) IngameOptions.rightScale[i36] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i36; + if (flag4) + { + int num21 = 0; + for (int index = 0; index < Main.numDisplayModes; ++index) + { + if (Main.displayWidth[index] == Main.PendingResolutionWidth && Main.displayHeight[index] == Main.PendingResolutionHeight) + { + num21 = index; + break; + } + } + int index1 = num21 + 1; + if (index1 >= Main.numDisplayModes) + index1 = 0; + Main.PendingResolutionWidth = Main.displayWidth[index1]; + Main.PendingResolutionHeight = Main.displayHeight[index1]; + Main.SetResolution(Main.PendingResolutionWidth, Main.PendingResolutionHeight); + } + } + int i37 = i36 + 1; + anchor2.X -= (float) num1; + if (IngameOptions.DrawRightSide(sb, Lang.menu[52].Value + ": " + (object) Main.bgScroll + "%", i37, anchor2, offset2, IngameOptions.rightScale[i37], (float) (((double) IngameOptions.rightScale[i37] - (double) num5) / ((double) num6 - (double) num5)))) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.noSound = true; + IngameOptions.rightHover = i37; + } + IngameOptions.valuePosition.X = (float) ((double) vector2_4.X + (double) vector2_3.X - (double) (num4 / 2) - 20.0); + IngameOptions.valuePosition.Y -= 3f; + float num22 = IngameOptions.DrawValueBar(sb, scale, (float) Main.bgScroll / 100f); + if ((IngameOptions.inBar || IngameOptions.rightLock == i37) && !IngameOptions.notBar) + { + IngameOptions.rightHover = i37; + if (Main.mouseLeft && IngameOptions.rightLock == i37) + { + Main.bgScroll = (int) ((double) num22 * 100.0); + Main.caveParallax = (float) (1.0 - (double) Main.bgScroll / 500.0); + } + } + if ((double) Main.mouseX > (double) vector2_4.X + (double) vector2_3.X * 2.0 / 3.0 + (double) num4 && (double) Main.mouseX < (double) IngameOptions.valuePosition.X + 3.75 && (double) Main.mouseY > (double) IngameOptions.valuePosition.Y - 10.0 && (double) Main.mouseY <= (double) IngameOptions.valuePosition.Y + 10.0) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i37; + } + if (IngameOptions.rightHover == i37) + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 1; + int i38 = i37 + 1; + anchor2.X += (float) num1; + if (IngameOptions.DrawRightSide(sb, Lang.menu[247 + Main.FrameSkipMode].Value, i38, anchor2, offset2, IngameOptions.rightScale[i38], (float) (((double) IngameOptions.rightScale[i38] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i38; + if (flag4) + { + ++Main.FrameSkipMode; + if (Main.FrameSkipMode < 0 || Main.FrameSkipMode > 2) + Main.FrameSkipMode = 0; + } + } + int i39 = i38 + 1; + if (IngameOptions.DrawRightSide(sb, Language.GetTextValue("UI.LightMode_" + (object) Lighting.Mode), i39, anchor2, offset2, IngameOptions.rightScale[i39], (float) (((double) IngameOptions.rightScale[i39] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i39; + if (flag4) + Lighting.NextLightMode(); + } + int i40 = i39 + 1; + if (IngameOptions.DrawRightSide(sb, Lang.menu[59 + Main.qaStyle].Value, i40, anchor2, offset2, IngameOptions.rightScale[i40], (float) (((double) IngameOptions.rightScale[i40] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i40; + if (flag4) + { + ++Main.qaStyle; + if (Main.qaStyle > 3) + Main.qaStyle = 0; + } + } + int i41 = i40 + 1; + if (IngameOptions.DrawRightSide(sb, Main.BackgroundEnabled ? Lang.menu[100].Value : Lang.menu[101].Value, i41, anchor2, offset2, IngameOptions.rightScale[i41], (float) (((double) IngameOptions.rightScale[i41] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i41; + if (flag4) + Main.BackgroundEnabled = !Main.BackgroundEnabled; + } + int i42 = i41 + 1; + if (IngameOptions.DrawRightSide(sb, ChildSafety.Disabled ? Lang.menu[132].Value : Lang.menu[133].Value, i42, anchor2, offset2, IngameOptions.rightScale[i42], (float) (((double) IngameOptions.rightScale[i42] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i42; + if (flag4) + ChildSafety.Disabled = !ChildSafety.Disabled; + } + int i43 = i42 + 1; + if (IngameOptions.DrawRightSide(sb, Language.GetTextValue("GameUI.HeatDistortion", Main.UseHeatDistortion ? (object) Language.GetTextValue("GameUI.Enabled") : (object) Language.GetTextValue("GameUI.Disabled")), i43, anchor2, offset2, IngameOptions.rightScale[i43], (float) (((double) IngameOptions.rightScale[i43] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i43; + if (flag4) + Main.UseHeatDistortion = !Main.UseHeatDistortion; + } + int i44 = i43 + 1; + if (IngameOptions.DrawRightSide(sb, Language.GetTextValue("GameUI.StormEffects", Main.UseStormEffects ? (object) Language.GetTextValue("GameUI.Enabled") : (object) Language.GetTextValue("GameUI.Disabled")), i44, anchor2, offset2, IngameOptions.rightScale[i44], (float) (((double) IngameOptions.rightScale[i44] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i44; + if (flag4) + Main.UseStormEffects = !Main.UseStormEffects; + } + int i45 = i44 + 1; + string textValue; + switch (Main.WaveQuality) + { + case 1: + textValue = Language.GetTextValue("GameUI.QualityLow"); + break; + case 2: + textValue = Language.GetTextValue("GameUI.QualityMedium"); + break; + case 3: + textValue = Language.GetTextValue("GameUI.QualityHigh"); + break; + default: + textValue = Language.GetTextValue("GameUI.QualityOff"); + break; + } + if (IngameOptions.DrawRightSide(sb, Language.GetTextValue("GameUI.WaveQuality", (object) textValue), i45, anchor2, offset2, IngameOptions.rightScale[i45], (float) (((double) IngameOptions.rightScale[i45] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i45; + if (flag4) + Main.WaveQuality = (Main.WaveQuality + 1) % 4; + } + int i46 = i45 + 1; + if (IngameOptions.DrawRightSide(sb, Language.GetTextValue("UI.TilesSwayInWind" + (Main.SettingsEnabled_TilesSwayInWind ? "On" : "Off")), i46, anchor2, offset2, IngameOptions.rightScale[i46], (float) (((double) IngameOptions.rightScale[i46] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i46; + if (flag4) + Main.SettingsEnabled_TilesSwayInWind = !Main.SettingsEnabled_TilesSwayInWind; + } + int num23 = i46 + 1; + } + if (IngameOptions.category == 3) + { + int i47 = 0; + float num24 = (float) num1; + if (flag1) + num2 = 126f; + Vector3 hslVector1 = Main.mouseColorSlider.GetHSLVector(); + Main.mouseColorSlider.ApplyToMainLegacyBars(); + IngameOptions.DrawRightSide(sb, Lang.menu[64].Value, i47, anchor2, offset2, IngameOptions.rightScale[i47], 1f); + IngameOptions.skipRightSlot[i47] = true; + int i48 = i47 + 1; + anchor2.X -= num24; + if (IngameOptions.DrawRightSide(sb, "", i48, anchor2, offset2, IngameOptions.rightScale[i48], (float) (((double) IngameOptions.rightScale[i48] - (double) num5) / ((double) num6 - (double) num5)))) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i48; + } + IngameOptions.valuePosition.X = (float) ((double) vector2_4.X + (double) vector2_3.X - (double) (num4 / 2) - 20.0); + IngameOptions.valuePosition.Y -= 3f; + IngameOptions.valuePosition.X -= num2; + DelegateMethods.v3_1 = hslVector1; + float num25 = IngameOptions.DrawValueBar(sb, scale, hslVector1.X, colorMethod: new Utils.ColorLerpMethod(DelegateMethods.ColorLerp_HSL_H)); + if ((IngameOptions.inBar || IngameOptions.rightLock == i48) && !IngameOptions.notBar) + { + IngameOptions.rightHover = i48; + if (Main.mouseLeft && IngameOptions.rightLock == i48) + { + hslVector1.X = num25; + IngameOptions.noSound = true; + } + } + if ((double) Main.mouseX > (double) vector2_4.X + (double) vector2_3.X * 2.0 / 3.0 + (double) num4 && (double) Main.mouseX < (double) IngameOptions.valuePosition.X + 3.75 && (double) Main.mouseY > (double) IngameOptions.valuePosition.Y - 10.0 && (double) Main.mouseY <= (double) IngameOptions.valuePosition.Y + 10.0) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i48; + } + if (IngameOptions.rightHover == i48) + { + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 5; + Main.menuMode = 25; + } + int i49 = i48 + 1; + if (IngameOptions.DrawRightSide(sb, "", i49, anchor2, offset2, IngameOptions.rightScale[i49], (float) (((double) IngameOptions.rightScale[i49] - (double) num5) / ((double) num6 - (double) num5)))) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i49; + } + IngameOptions.valuePosition.X = (float) ((double) vector2_4.X + (double) vector2_3.X - (double) (num4 / 2) - 20.0); + IngameOptions.valuePosition.Y -= 3f; + IngameOptions.valuePosition.X -= num2; + DelegateMethods.v3_1 = hslVector1; + float num26 = IngameOptions.DrawValueBar(sb, scale, hslVector1.Y, colorMethod: new Utils.ColorLerpMethod(DelegateMethods.ColorLerp_HSL_S)); + if ((IngameOptions.inBar || IngameOptions.rightLock == i49) && !IngameOptions.notBar) + { + IngameOptions.rightHover = i49; + if (Main.mouseLeft && IngameOptions.rightLock == i49) + { + hslVector1.Y = num26; + IngameOptions.noSound = true; + } + } + if ((double) Main.mouseX > (double) vector2_4.X + (double) vector2_3.X * 2.0 / 3.0 + (double) num4 && (double) Main.mouseX < (double) IngameOptions.valuePosition.X + 3.75 && (double) Main.mouseY > (double) IngameOptions.valuePosition.Y - 10.0 && (double) Main.mouseY <= (double) IngameOptions.valuePosition.Y + 10.0) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i49; + } + if (IngameOptions.rightHover == i49) + { + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 6; + Main.menuMode = 25; + } + int i50 = i49 + 1; + if (IngameOptions.DrawRightSide(sb, "", i50, anchor2, offset2, IngameOptions.rightScale[i50], (float) (((double) IngameOptions.rightScale[i50] - (double) num5) / ((double) num6 - (double) num5)))) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i50; + } + IngameOptions.valuePosition.X = (float) ((double) vector2_4.X + (double) vector2_3.X - (double) (num4 / 2) - 20.0); + IngameOptions.valuePosition.Y -= 3f; + IngameOptions.valuePosition.X -= num2; + DelegateMethods.v3_1 = hslVector1; + DelegateMethods.v3_1.Z = Utils.GetLerpValue(0.15f, 1f, DelegateMethods.v3_1.Z, true); + float num27 = IngameOptions.DrawValueBar(sb, scale, DelegateMethods.v3_1.Z, colorMethod: new Utils.ColorLerpMethod(DelegateMethods.ColorLerp_HSL_L)); + if ((IngameOptions.inBar || IngameOptions.rightLock == i50) && !IngameOptions.notBar) + { + IngameOptions.rightHover = i50; + if (Main.mouseLeft && IngameOptions.rightLock == i50) + { + hslVector1.Z = (float) ((double) num27 * 0.850000023841858 + 0.150000005960464); + IngameOptions.noSound = true; + } + } + if ((double) Main.mouseX > (double) vector2_4.X + (double) vector2_3.X * 2.0 / 3.0 + (double) num4 && (double) Main.mouseX < (double) IngameOptions.valuePosition.X + 3.75 && (double) Main.mouseY > (double) IngameOptions.valuePosition.Y - 10.0 && (double) Main.mouseY <= (double) IngameOptions.valuePosition.Y + 10.0) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i50; + } + if (IngameOptions.rightHover == i50) + { + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 7; + Main.menuMode = 25; + } + int i51 = i50 + 1; + if ((double) hslVector1.Z < 0.150000005960464) + hslVector1.Z = 0.15f; + Main.mouseColorSlider.SetHSL(hslVector1); + Main.mouseColor = Main.mouseColorSlider.GetColor(); + anchor2.X += num24; + IngameOptions.DrawRightSide(sb, "", i51, anchor2, offset2, IngameOptions.rightScale[i51], 1f); + IngameOptions.skipRightSlot[i51] = true; + int i52 = i51 + 1; + Vector3 hslVector2 = Main.mouseBorderColorSlider.GetHSLVector(); + if (PlayerInput.UsingGamepad && IngameOptions.rightHover == -1) + Main.mouseBorderColorSlider.ApplyToMainLegacyBars(); + IngameOptions.DrawRightSide(sb, Lang.menu[217].Value, i52, anchor2, offset2, IngameOptions.rightScale[i52], 1f); + IngameOptions.skipRightSlot[i52] = true; + int i53 = i52 + 1; + anchor2.X -= num24; + if (IngameOptions.DrawRightSide(sb, "", i53, anchor2, offset2, IngameOptions.rightScale[i53], (float) (((double) IngameOptions.rightScale[i53] - (double) num5) / ((double) num6 - (double) num5)))) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i53; + } + IngameOptions.valuePosition.X = (float) ((double) vector2_4.X + (double) vector2_3.X - (double) (num4 / 2) - 20.0); + IngameOptions.valuePosition.Y -= 3f; + IngameOptions.valuePosition.X -= num2; + DelegateMethods.v3_1 = hslVector2; + float num28 = IngameOptions.DrawValueBar(sb, scale, hslVector2.X, colorMethod: new Utils.ColorLerpMethod(DelegateMethods.ColorLerp_HSL_H)); + if ((IngameOptions.inBar || IngameOptions.rightLock == i53) && !IngameOptions.notBar) + { + IngameOptions.rightHover = i53; + if (Main.mouseLeft && IngameOptions.rightLock == i53) + { + hslVector2.X = num28; + IngameOptions.noSound = true; + } + } + if ((double) Main.mouseX > (double) vector2_4.X + (double) vector2_3.X * 2.0 / 3.0 + (double) num4 && (double) Main.mouseX < (double) IngameOptions.valuePosition.X + 3.75 && (double) Main.mouseY > (double) IngameOptions.valuePosition.Y - 10.0 && (double) Main.mouseY <= (double) IngameOptions.valuePosition.Y + 10.0) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i53; + } + if (IngameOptions.rightHover == i53) + { + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 5; + Main.menuMode = 252; + } + int i54 = i53 + 1; + if (IngameOptions.DrawRightSide(sb, "", i54, anchor2, offset2, IngameOptions.rightScale[i54], (float) (((double) IngameOptions.rightScale[i54] - (double) num5) / ((double) num6 - (double) num5)))) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i54; + } + IngameOptions.valuePosition.X = (float) ((double) vector2_4.X + (double) vector2_3.X - (double) (num4 / 2) - 20.0); + IngameOptions.valuePosition.Y -= 3f; + IngameOptions.valuePosition.X -= num2; + DelegateMethods.v3_1 = hslVector2; + float num29 = IngameOptions.DrawValueBar(sb, scale, hslVector2.Y, colorMethod: new Utils.ColorLerpMethod(DelegateMethods.ColorLerp_HSL_S)); + if ((IngameOptions.inBar || IngameOptions.rightLock == i54) && !IngameOptions.notBar) + { + IngameOptions.rightHover = i54; + if (Main.mouseLeft && IngameOptions.rightLock == i54) + { + hslVector2.Y = num29; + IngameOptions.noSound = true; + } + } + if ((double) Main.mouseX > (double) vector2_4.X + (double) vector2_3.X * 2.0 / 3.0 + (double) num4 && (double) Main.mouseX < (double) IngameOptions.valuePosition.X + 3.75 && (double) Main.mouseY > (double) IngameOptions.valuePosition.Y - 10.0 && (double) Main.mouseY <= (double) IngameOptions.valuePosition.Y + 10.0) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i54; + } + if (IngameOptions.rightHover == i54) + { + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 6; + Main.menuMode = 252; + } + int i55 = i54 + 1; + if (IngameOptions.DrawRightSide(sb, "", i55, anchor2, offset2, IngameOptions.rightScale[i55], (float) (((double) IngameOptions.rightScale[i55] - (double) num5) / ((double) num6 - (double) num5)))) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i55; + } + IngameOptions.valuePosition.X = (float) ((double) vector2_4.X + (double) vector2_3.X - (double) (num4 / 2) - 20.0); + IngameOptions.valuePosition.Y -= 3f; + IngameOptions.valuePosition.X -= num2; + DelegateMethods.v3_1 = hslVector2; + float num30 = IngameOptions.DrawValueBar(sb, scale, hslVector2.Z, colorMethod: new Utils.ColorLerpMethod(DelegateMethods.ColorLerp_HSL_L)); + if ((IngameOptions.inBar || IngameOptions.rightLock == i55) && !IngameOptions.notBar) + { + IngameOptions.rightHover = i55; + if (Main.mouseLeft && IngameOptions.rightLock == i55) + { + hslVector2.Z = num30; + IngameOptions.noSound = true; + } + } + if ((double) Main.mouseX > (double) vector2_4.X + (double) vector2_3.X * 2.0 / 3.0 + (double) num4 && (double) Main.mouseX < (double) IngameOptions.valuePosition.X + 3.75 && (double) Main.mouseY > (double) IngameOptions.valuePosition.Y - 10.0 && (double) Main.mouseY <= (double) IngameOptions.valuePosition.Y + 10.0) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i55; + } + if (IngameOptions.rightHover == i55) + { + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 7; + Main.menuMode = 252; + } + int i56 = i55 + 1; + if (IngameOptions.DrawRightSide(sb, "", i56, anchor2, offset2, IngameOptions.rightScale[i56], (float) (((double) IngameOptions.rightScale[i56] - (double) num5) / ((double) num6 - (double) num5)))) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i56; + } + IngameOptions.valuePosition.X = (float) ((double) vector2_4.X + (double) vector2_3.X - (double) (num4 / 2) - 20.0); + IngameOptions.valuePosition.Y -= 3f; + IngameOptions.valuePosition.X -= num2; + DelegateMethods.v3_1 = hslVector2; + float perc = Main.mouseBorderColorSlider.Alpha; + float num31 = IngameOptions.DrawValueBar(sb, scale, perc, colorMethod: new Utils.ColorLerpMethod(DelegateMethods.ColorLerp_HSL_O)); + if ((IngameOptions.inBar || IngameOptions.rightLock == i56) && !IngameOptions.notBar) + { + IngameOptions.rightHover = i56; + if (Main.mouseLeft && IngameOptions.rightLock == i56) + { + perc = num31; + IngameOptions.noSound = true; + } + } + if ((double) Main.mouseX > (double) vector2_4.X + (double) vector2_3.X * 2.0 / 3.0 + (double) num4 && (double) Main.mouseX < (double) IngameOptions.valuePosition.X + 3.75 && (double) Main.mouseY > (double) IngameOptions.valuePosition.Y - 10.0 && (double) Main.mouseY <= (double) IngameOptions.valuePosition.Y + 10.0) + { + if (IngameOptions.rightLock == -1) + IngameOptions.notBar = true; + IngameOptions.rightHover = i56; + } + if (IngameOptions.rightHover == i56) + { + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 8; + Main.menuMode = 252; + } + int i57 = i56 + 1; + Main.mouseBorderColorSlider.SetHSL(hslVector2); + Main.mouseBorderColorSlider.Alpha = perc; + Main.MouseBorderColor = Main.mouseBorderColorSlider.GetColor(); + anchor2.X += num24; + IngameOptions.DrawRightSide(sb, "", i57, anchor2, offset2, IngameOptions.rightScale[i57], 1f); + IngameOptions.skipRightSlot[i57] = true; + int i58 = i57 + 1; + string txt = ""; + switch (LockOnHelper.UseMode) + { + case LockOnHelper.LockOnMode.FocusTarget: + txt = Lang.menu[232].Value; + break; + case LockOnHelper.LockOnMode.TargetClosest: + txt = Lang.menu[233].Value; + break; + case LockOnHelper.LockOnMode.ThreeDS: + txt = Lang.menu[234].Value; + break; + } + if (IngameOptions.DrawRightSide(sb, txt, i58, anchor2, offset2, IngameOptions.rightScale[i58] * 0.9f, (float) (((double) IngameOptions.rightScale[i58] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i58; + if (flag4) + LockOnHelper.CycleUseModes(); + } + int i59 = i58 + 1; + if (IngameOptions.DrawRightSide(sb, Player.SmartCursorSettings.SmartBlocksEnabled ? Lang.menu[215].Value : Lang.menu[216].Value, i59, anchor2, offset2, IngameOptions.rightScale[i59] * 0.9f, (float) (((double) IngameOptions.rightScale[i59] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i59; + if (flag4) + Player.SmartCursorSettings.SmartBlocksEnabled = !Player.SmartCursorSettings.SmartBlocksEnabled; + } + int i60 = i59 + 1; + if (IngameOptions.DrawRightSide(sb, Main.cSmartCursorModeIsToggleAndNotHold ? Lang.menu[121].Value : Lang.menu[122].Value, i60, anchor2, offset2, IngameOptions.rightScale[i60], (float) (((double) IngameOptions.rightScale[i60] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i60; + if (flag4) + Main.cSmartCursorModeIsToggleAndNotHold = !Main.cSmartCursorModeIsToggleAndNotHold; + } + int i61 = i60 + 1; + if (IngameOptions.DrawRightSide(sb, Player.SmartCursorSettings.SmartAxeAfterPickaxe ? Lang.menu[214].Value : Lang.menu[213].Value, i61, anchor2, offset2, IngameOptions.rightScale[i61] * 0.9f, (float) (((double) IngameOptions.rightScale[i61] - (double) num5) / ((double) num6 - (double) num5)))) + { + IngameOptions.rightHover = i61; + if (flag4) + Player.SmartCursorSettings.SmartAxeAfterPickaxe = !Player.SmartCursorSettings.SmartAxeAfterPickaxe; + } + int num32 = i61 + 1; + } + if (IngameOptions.rightHover != -1 && IngameOptions.rightLock == -1) + IngameOptions.rightLock = IngameOptions.rightHover; + for (int index = 0; index < num8 + 1; ++index) + UILinkPointNavigator.SetPosition(2900 + index, anchor1 + offset1 * (float) (index + 1)); + Vector2 zero = Vector2.Zero; + if (flag1) + zero.X = -40f; + for (int index = 0; index < num12; ++index) + { + if (!IngameOptions.skipRightSlot[index]) + { + UILinkPointNavigator.SetPosition(2930 + num11, anchor2 + zero + offset2 * (float) (index + 1)); + ++num11; + } + } + UILinkPointNavigator.Shortcuts.INGAMEOPTIONS_BUTTONS_RIGHT = num11; + Main.DrawInterface_29_SettingsButton(); + Main.DrawGamepadInstructions(); + Main.mouseText = false; + Main.instance.GUIBarsDraw(); + Main.instance.DrawMouseOver(); + Main.DrawCursor(Main.DrawThickCursor()); + } + + public static void MouseOver() + { + if (!Main.ingameOptionsWindow) + return; + if (IngameOptions._GUIHover.Contains(Main.MouseScreen.ToPoint())) + Main.mouseText = true; + if (IngameOptions._mouseOverText != null) + Main.instance.MouseText(IngameOptions._mouseOverText); + IngameOptions._mouseOverText = (string) null; + } + + public static bool DrawLeftSide( + SpriteBatch sb, + string txt, + int i, + Vector2 anchor, + Vector2 offset, + float[] scales, + float minscale = 0.7f, + float maxscale = 0.8f, + float scalespeed = 0.01f) + { + bool flag = false; + int num; + if (IngameOptions._leftSideCategoryMapping.TryGetValue(i, out num)) + flag = IngameOptions.category == num; + Color color = Color.Lerp(Color.Gray, Color.White, (float) (((double) scales[i] - (double) minscale) / ((double) maxscale - (double) minscale))); + if (flag) + color = Color.Gold; + Vector2 vector2 = Utils.DrawBorderStringBig(sb, txt, anchor + offset * (float) (1 + i), color, scales[i], 0.5f, 0.5f); + return new Rectangle((int) anchor.X - (int) vector2.X / 2, (int) anchor.Y + (int) ((double) offset.Y * (double) (1 + i)) - (int) vector2.Y / 2, (int) vector2.X, (int) vector2.Y).Contains(new Point(Main.mouseX, Main.mouseY)); + } + + public static bool DrawRightSide( + SpriteBatch sb, + string txt, + int i, + Vector2 anchor, + Vector2 offset, + float scale, + float colorScale, + Color over = default (Color)) + { + Color color = Color.Lerp(Color.Gray, Color.White, colorScale); + if (over != new Color()) + color = over; + Vector2 vector2 = Utils.DrawBorderString(sb, txt, anchor + offset * (float) (1 + i), color, scale, 0.5f, 0.5f); + IngameOptions.valuePosition = anchor + offset * (float) (1 + i) + vector2 * new Vector2(0.5f, 0.0f); + return new Rectangle((int) anchor.X - (int) vector2.X / 2, (int) anchor.Y + (int) ((double) offset.Y * (double) (1 + i)) - (int) vector2.Y / 2, (int) vector2.X, (int) vector2.Y).Contains(new Point(Main.mouseX, Main.mouseY)); + } + + public static Rectangle GetExpectedRectangleForNotification( + int itemIndex, + Vector2 anchor, + Vector2 offset, + int areaWidth) + { + return Utils.CenteredRectangle(anchor + offset * (float) (1 + itemIndex), new Vector2((float) areaWidth, offset.Y - 4f)); + } + + public static bool DrawValue(SpriteBatch sb, string txt, int i, float scale, Color over = default (Color)) + { + Color color = Color.Gray; + Vector2 vector2 = FontAssets.MouseText.Value.MeasureString(txt) * scale; + int num = new Rectangle((int) IngameOptions.valuePosition.X, (int) IngameOptions.valuePosition.Y - (int) vector2.Y / 2, (int) vector2.X, (int) vector2.Y).Contains(new Point(Main.mouseX, Main.mouseY)) ? 1 : 0; + if (num != 0) + color = Color.White; + if (over != new Color()) + color = over; + Utils.DrawBorderString(sb, txt, IngameOptions.valuePosition, color, scale, anchory: 0.5f); + IngameOptions.valuePosition.X += vector2.X; + return num != 0; + } + + public static float DrawValueBar( + SpriteBatch sb, + float scale, + float perc, + int lockState = 0, + Utils.ColorLerpMethod colorMethod = null) + { + if (colorMethod == null) + colorMethod = new Utils.ColorLerpMethod(Utils.ColorLerp_BlackToWhite); + Texture2D texture = TextureAssets.ColorBar.Value; + Vector2 vector2 = new Vector2((float) texture.Width, (float) texture.Height) * scale; + IngameOptions.valuePosition.X -= (float) (int) vector2.X; + Rectangle destinationRectangle1 = new Rectangle((int) IngameOptions.valuePosition.X, (int) IngameOptions.valuePosition.Y - (int) vector2.Y / 2, (int) vector2.X, (int) vector2.Y); + Rectangle destinationRectangle2 = destinationRectangle1; + sb.Draw(texture, destinationRectangle1, Color.White); + int num1 = 167; + float num2 = (float) destinationRectangle1.X + 5f * scale; + float y = (float) destinationRectangle1.Y + 4f * scale; + for (float num3 = 0.0f; (double) num3 < (double) num1; ++num3) + { + float percent = num3 / (float) num1; + sb.Draw(TextureAssets.ColorBlip.Value, new Vector2(num2 + num3 * scale, y), new Rectangle?(), colorMethod(percent), 0.0f, Vector2.Zero, scale, SpriteEffects.None, 0.0f); + } + destinationRectangle1.Inflate((int) (-5.0 * (double) scale), 0); + bool flag = destinationRectangle1.Contains(new Point(Main.mouseX, Main.mouseY)); + if (lockState == 2) + flag = false; + if (flag || lockState == 1) + sb.Draw(TextureAssets.ColorHighlight.Value, destinationRectangle2, Main.OurFavoriteColor); + sb.Draw(TextureAssets.ColorSlider.Value, new Vector2(num2 + 167f * scale * perc, y + 4f * scale), new Rectangle?(), Color.White, 0.0f, new Vector2(0.5f * (float) TextureAssets.ColorSlider.Width(), 0.5f * (float) TextureAssets.ColorSlider.Height()), scale, SpriteEffects.None, 0.0f); + if (Main.mouseX >= destinationRectangle1.X && Main.mouseX <= destinationRectangle1.X + destinationRectangle1.Width) + { + IngameOptions.inBar = flag; + return (float) (Main.mouseX - destinationRectangle1.X) / (float) destinationRectangle1.Width; + } + IngameOptions.inBar = false; + return destinationRectangle1.X >= Main.mouseX ? 0.0f : 1f; + } + } +} diff --git a/Initializers/AchievementInitializer.cs b/Initializers/AchievementInitializer.cs new file mode 100644 index 0000000..157f16b --- /dev/null +++ b/Initializers/AchievementInitializer.cs @@ -0,0 +1,767 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Initializers.AchievementInitializer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.Achievements; +using Terraria.Audio; +using Terraria.GameContent.Achievements; +using Terraria.GameContent.UI.Chat; +using Terraria.ID; +using Terraria.Localization; + +namespace Terraria.Initializers +{ + public class AchievementInitializer + { + public static void Load() + { + if (Main.netMode == 2) + return; + Achievement achievement1 = new Achievement("TIMBER"); + achievement1.AddCondition(ItemPickupCondition.Create((short) 9, (short) 619, (short) 2504, (short) 620, (short) 2503, (short) 2260, (short) 621, (short) 911, (short) 1729)); + Main.Achievements.Register(achievement1); + Achievement achievement2 = new Achievement("BENCHED"); + achievement2.AddCondition(ItemCraftCondition.Create(ItemID.Sets.Workbenches)); + Main.Achievements.Register(achievement2); + Achievement achievement3 = new Achievement("NO_HOBO"); + achievement3.AddCondition((AchievementCondition) ProgressionEventCondition.Create(8)); + Main.Achievements.Register(achievement3); + Achievement achievement4 = new Achievement("OBTAIN_HAMMER"); + achievement4.AddCondition(ItemPickupCondition.Create((short) 2775, (short) 2746, (short) 3505, (short) 654, (short) 3517, (short) 7, (short) 3493, (short) 2780, (short) 1513, (short) 2516, (short) 660, (short) 3481, (short) 657, (short) 922, (short) 3511, (short) 2785, (short) 3499, (short) 3487, (short) 196, (short) 367, (short) 104, (short) 797, (short) 2320, (short) 787, (short) 1234, (short) 1262, (short) 3465, (short) 204, (short) 217, (short) 1507, (short) 3524, (short) 3522, (short) 3525, (short) 3523, (short) 4317, (short) 1305)); + Main.Achievements.Register(achievement4); + Achievement achievement5 = new Achievement("OOO_SHINY"); + achievement5.AddCondition(TileDestroyedCondition.Create((ushort) 7, (ushort) 6, (ushort) 9, (ushort) 8, (ushort) 166, (ushort) 167, (ushort) 168, (ushort) 169, (ushort) 22, (ushort) 204, (ushort) 58, (ushort) 107, (ushort) 108, (ushort) 111, (ushort) 221, (ushort) 222, (ushort) 223, (ushort) 211)); + Main.Achievements.Register(achievement5); + Achievement achievement6 = new Achievement("HEART_BREAKER"); + achievement6.AddCondition(TileDestroyedCondition.Create((ushort) 12)); + Main.Achievements.Register(achievement6); + Achievement achievement7 = new Achievement("HEAVY_METAL"); + achievement7.AddCondition(ItemPickupCondition.Create((short) 35, (short) 716)); + Main.Achievements.Register(achievement7); + Achievement achievement8 = new Achievement("I_AM_LOOT"); + achievement8.AddCondition(CustomFlagCondition.Create("Peek")); + Main.Achievements.Register(achievement8); + Achievement achievement9 = new Achievement("STAR_POWER"); + achievement9.AddCondition(CustomFlagCondition.Create("Use")); + Main.Achievements.Register(achievement9); + Achievement achievement10 = new Achievement("HOLD_ON_TIGHT"); + achievement10.AddCondition(CustomFlagCondition.Create("Equip")); + Main.Achievements.Register(achievement10); + Achievement achievement11 = new Achievement("EYE_ON_YOU"); + achievement11.AddCondition(NPCKilledCondition.Create((short) 4)); + Main.Achievements.Register(achievement11); + Achievement achievement12 = new Achievement("SMASHING_POPPET"); + achievement12.AddCondition((AchievementCondition) ProgressionEventCondition.Create(7)); + Main.Achievements.Register(achievement12); + Achievement achievement13 = new Achievement("WORM_FODDER"); + achievement13.AddCondition(NPCKilledCondition.Create((short) 13, (short) 14, (short) 15)); + Main.Achievements.Register(achievement13); + Achievement achievement14 = new Achievement("MASTERMIND"); + achievement14.AddCondition(NPCKilledCondition.Create((short) 266)); + Main.Achievements.Register(achievement14); + Achievement achievement15 = new Achievement("WHERES_MY_HONEY"); + achievement15.AddCondition(CustomFlagCondition.Create("Reach")); + Main.Achievements.Register(achievement15); + Achievement achievement16 = new Achievement("STING_OPERATION"); + achievement16.AddCondition(NPCKilledCondition.Create((short) 222)); + Main.Achievements.Register(achievement16); + Achievement achievement17 = new Achievement("BONED"); + achievement17.AddCondition(NPCKilledCondition.Create((short) 35)); + Main.Achievements.Register(achievement17); + Achievement achievement18 = new Achievement("DUNGEON_HEIST"); + achievement18.AddCondition(ItemPickupCondition.Create((short) 327)); + achievement18.AddCondition((AchievementCondition) ProgressionEventCondition.Create(19)); + Main.Achievements.Register(achievement18); + Achievement achievement19 = new Achievement("ITS_GETTING_HOT_IN_HERE"); + achievement19.AddCondition(CustomFlagCondition.Create("Reach")); + Main.Achievements.Register(achievement19); + Achievement achievement20 = new Achievement("MINER_FOR_FIRE"); + achievement20.AddCondition(ItemCraftCondition.Create((short) 122)); + Main.Achievements.Register(achievement20); + Achievement achievement21 = new Achievement("STILL_HUNGRY"); + achievement21.AddCondition(NPCKilledCondition.Create((short) 113, (short) 114)); + Main.Achievements.Register(achievement21); + Achievement achievement22 = new Achievement("ITS_HARD"); + achievement22.AddCondition((AchievementCondition) ProgressionEventCondition.Create(9)); + Main.Achievements.Register(achievement22); + Achievement achievement23 = new Achievement("BEGONE_EVIL"); + achievement23.AddCondition((AchievementCondition) ProgressionEventCondition.Create(6)); + Main.Achievements.Register(achievement23); + Achievement achievement24 = new Achievement("EXTRA_SHINY"); + achievement24.AddCondition(TileDestroyedCondition.Create((ushort) 107, (ushort) 108, (ushort) 111, (ushort) 221, (ushort) 222, (ushort) 223)); + Main.Achievements.Register(achievement24); + Achievement achievement25 = new Achievement("HEAD_IN_THE_CLOUDS"); + achievement25.AddCondition(CustomFlagCondition.Create("Equip")); + Main.Achievements.Register(achievement25); + Achievement achievement26 = new Achievement("LIKE_A_BOSS"); + achievement26.AddCondition(ItemPickupCondition.Create((short) 1133, (short) 1331, (short) 1307, (short) 267, (short) 1293, (short) 557, (short) 544, (short) 556, (short) 560, (short) 43, (short) 70)); + Main.Achievements.Register(achievement26); + Achievement achievement27 = new Achievement("BUCKETS_OF_BOLTS"); + achievement27.AddCondition(NPCKilledCondition.Create((short) 125, (short) 126)); + achievement27.AddConditions(NPCKilledCondition.CreateMany((short) sbyte.MaxValue, (short) 134)); + achievement27.UseConditionsCompletedTracker(); + Main.Achievements.Register(achievement27); + Achievement achievement28 = new Achievement("DRAX_ATTAX"); + achievement28.AddCondition(ItemCraftCondition.Create((short) 579, (short) 990)); + Main.Achievements.Register(achievement28); + Achievement achievement29 = new Achievement("PHOTOSYNTHESIS"); + achievement29.AddCondition(TileDestroyedCondition.Create((ushort) 211)); + Main.Achievements.Register(achievement29); + Achievement achievement30 = new Achievement("GET_A_LIFE"); + achievement30.AddCondition(CustomFlagCondition.Create("Use")); + Main.Achievements.Register(achievement30); + Achievement achievement31 = new Achievement("THE_GREAT_SOUTHERN_PLANTKILL"); + achievement31.AddCondition(NPCKilledCondition.Create((short) 262)); + Main.Achievements.Register(achievement31); + Achievement achievement32 = new Achievement("TEMPLE_RAIDER"); + achievement32.AddCondition((AchievementCondition) ProgressionEventCondition.Create(22)); + Main.Achievements.Register(achievement32); + Achievement achievement33 = new Achievement("LIHZAHRDIAN_IDOL"); + achievement33.AddCondition(NPCKilledCondition.Create((short) 245)); + Main.Achievements.Register(achievement33); + Achievement achievement34 = new Achievement("ROBBING_THE_GRAVE"); + achievement34.AddCondition(ItemPickupCondition.Create((short) 1513, (short) 938, (short) 963, (short) 977, (short) 1300, (short) 1254, (short) 1514, (short) 679, (short) 759, (short) 1446, (short) 1445, (short) 1444, (short) 1183, (short) 1266, (short) 671, (short) 3291, (short) 4679)); + Main.Achievements.Register(achievement34); + Achievement achievement35 = new Achievement("BIG_BOOTY"); + achievement35.AddCondition((AchievementCondition) ProgressionEventCondition.Create(20)); + Main.Achievements.Register(achievement35); + Achievement achievement36 = new Achievement("FISH_OUT_OF_WATER"); + achievement36.AddCondition(NPCKilledCondition.Create((short) 370)); + Main.Achievements.Register(achievement36); + Achievement achievement37 = new Achievement("OBSESSIVE_DEVOTION"); + achievement37.AddCondition(NPCKilledCondition.Create((short) 439)); + Main.Achievements.Register(achievement37); + Achievement achievement38 = new Achievement("STAR_DESTROYER"); + achievement38.AddConditions(NPCKilledCondition.CreateMany((short) 517, (short) 422, (short) 507, (short) 493)); + Main.Achievements.Register(achievement38); + Achievement achievement39 = new Achievement("CHAMPION_OF_TERRARIA"); + achievement39.AddCondition(NPCKilledCondition.Create((short) 398)); + Main.Achievements.Register(achievement39); + Achievement achievement40 = new Achievement("BLOODBATH"); + achievement40.AddCondition((AchievementCondition) ProgressionEventCondition.Create(5)); + Main.Achievements.Register(achievement40); + Achievement achievement41 = new Achievement("SLIPPERY_SHINOBI"); + achievement41.AddCondition(NPCKilledCondition.Create((short) 50)); + Main.Achievements.Register(achievement41); + Achievement achievement42 = new Achievement("GOBLIN_PUNTER"); + achievement42.AddCondition((AchievementCondition) ProgressionEventCondition.Create(10)); + Main.Achievements.Register(achievement42); + Achievement achievement43 = new Achievement("WALK_THE_PLANK"); + achievement43.AddCondition((AchievementCondition) ProgressionEventCondition.Create(11)); + Main.Achievements.Register(achievement43); + Achievement achievement44 = new Achievement("KILL_THE_SUN"); + achievement44.AddCondition((AchievementCondition) ProgressionEventCondition.Create(3)); + Main.Achievements.Register(achievement44); + Achievement achievement45 = new Achievement("DO_YOU_WANT_TO_SLAY_A_SNOWMAN"); + achievement45.AddCondition((AchievementCondition) ProgressionEventCondition.Create(12)); + Main.Achievements.Register(achievement45); + Achievement achievement46 = new Achievement("TIN_FOIL_HATTER"); + achievement46.AddCondition((AchievementCondition) ProgressionEventCondition.Create(13)); + Main.Achievements.Register(achievement46); + Achievement achievement47 = new Achievement("BALEFUL_HARVEST"); + achievement47.AddCondition((AchievementCondition) ProgressionEventCondition.Create(15)); + Main.Achievements.Register(achievement47); + Achievement achievement48 = new Achievement("ICE_SCREAM"); + achievement48.AddCondition((AchievementCondition) ProgressionEventCondition.Create(14)); + Main.Achievements.Register(achievement48); + Achievement achievement49 = new Achievement("STICKY_SITUATION"); + achievement49.AddCondition((AchievementCondition) ProgressionEventCondition.Create(16)); + Main.Achievements.Register(achievement49); + Achievement achievement50 = new Achievement("REAL_ESTATE_AGENT"); + achievement50.AddCondition((AchievementCondition) ProgressionEventCondition.Create(17)); + Main.Achievements.Register(achievement50); + Achievement achievement51 = new Achievement("NOT_THE_BEES"); + achievement51.AddCondition(CustomFlagCondition.Create("Use")); + Main.Achievements.Register(achievement51); + Achievement achievement52 = new Achievement("JEEPERS_CREEPERS"); + achievement52.AddCondition(CustomFlagCondition.Create("Reach")); + Main.Achievements.Register(achievement52); + Achievement achievement53 = new Achievement("FUNKYTOWN"); + achievement53.AddCondition(CustomFlagCondition.Create("Reach")); + Main.Achievements.Register(achievement53); + Achievement achievement54 = new Achievement("INTO_ORBIT"); + achievement54.AddCondition(CustomFlagCondition.Create("Reach")); + Main.Achievements.Register(achievement54); + Achievement achievement55 = new Achievement("ROCK_BOTTOM"); + achievement55.AddCondition(CustomFlagCondition.Create("Reach")); + Main.Achievements.Register(achievement55); + Achievement achievement56 = new Achievement("MECHA_MAYHEM"); + achievement56.AddCondition((AchievementCondition) ProgressionEventCondition.Create(21)); + Main.Achievements.Register(achievement56); + Achievement achievement57 = new Achievement("GELATIN_WORLD_TOUR"); + achievement57.AddConditions(NPCKilledCondition.CreateMany((short) -5, (short) -6, (short) 1, (short) 81, (short) 71, (short) -3, (short) 147, (short) 138, (short) -10, (short) 50, (short) 59, (short) 16, (short) -7, (short) 244, (short) -8, (short) -1, (short) -2, (short) 184, (short) 204, (short) 225, (short) -9, (short) 141, (short) 183, (short) -4)); + achievement57.UseConditionsCompletedTracker(); + Main.Achievements.Register(achievement57); + Achievement achievement58 = new Achievement("FASHION_STATEMENT"); + achievement58.AddCondition(CustomFlagCondition.Create("Equip")); + Main.Achievements.Register(achievement58); + Achievement achievement59 = new Achievement("VEHICULAR_MANSLAUGHTER"); + achievement59.AddCondition(CustomFlagCondition.Create("Hit")); + Main.Achievements.Register(achievement59); + Achievement achievement60 = new Achievement("BULLDOZER"); + achievement60.AddCondition(CustomIntCondition.Create("Pick", 10000)); + achievement60.UseTrackerFromCondition("Pick"); + Main.Achievements.Register(achievement60); + Achievement achievement61 = new Achievement("THERE_ARE_SOME_WHO_CALL_HIM"); + achievement61.AddCondition(NPCKilledCondition.Create((short) 45)); + Main.Achievements.Register(achievement61); + Achievement achievement62 = new Achievement("DECEIVER_OF_FOOLS"); + achievement62.AddCondition(NPCKilledCondition.Create((short) 196)); + Main.Achievements.Register(achievement62); + Achievement achievement63 = new Achievement("SWORD_OF_THE_HERO"); + achievement63.AddCondition(ItemPickupCondition.Create((short) 757)); + Main.Achievements.Register(achievement63); + Achievement achievement64 = new Achievement("LUCKY_BREAK"); + achievement64.AddCondition(CustomFlagCondition.Create("Hit")); + Main.Achievements.Register(achievement64); + Achievement achievement65 = new Achievement("THROWING_LINES"); + achievement65.AddCondition(CustomFlagCondition.Create("Use")); + Main.Achievements.Register(achievement65); + Achievement achievement66 = new Achievement("DYE_HARD"); + achievement66.AddCondition(CustomFlagCondition.Create("Equip")); + Main.Achievements.Register(achievement66); + Achievement achievement67 = new Achievement("SICK_THROW"); + achievement67.AddCondition(ItemPickupCondition.Create((short) 3389)); + Main.Achievements.Register(achievement67); + Achievement achievement68 = new Achievement("FREQUENT_FLYER"); + achievement68.AddCondition(CustomFloatCondition.Create("Pay", 10000f)); + achievement68.UseTrackerFromCondition("Pay"); + Main.Achievements.Register(achievement68); + Achievement achievement69 = new Achievement("THE_CAVALRY"); + achievement69.AddCondition(CustomFlagCondition.Create("Equip")); + Main.Achievements.Register(achievement69); + Achievement achievement70 = new Achievement("COMPLETELY_AWESOME"); + achievement70.AddCondition(ItemPickupCondition.Create((short) 98)); + Main.Achievements.Register(achievement70); + Achievement achievement71 = new Achievement("TIL_DEATH"); + achievement71.AddCondition(NPCKilledCondition.Create((short) 53)); + Main.Achievements.Register(achievement71); + Achievement achievement72 = new Achievement("ARCHAEOLOGIST"); + achievement72.AddCondition(NPCKilledCondition.Create((short) 52)); + Main.Achievements.Register(achievement72); + Achievement achievement73 = new Achievement("PRETTY_IN_PINK"); + achievement73.AddCondition(NPCKilledCondition.Create((short) -4)); + Main.Achievements.Register(achievement73); + Achievement achievement74 = new Achievement("RAINBOWS_AND_UNICORNS"); + achievement74.AddCondition(CustomFlagCondition.Create("Use")); + Main.Achievements.Register(achievement74); + Achievement achievement75 = new Achievement("YOU_AND_WHAT_ARMY"); + achievement75.AddCondition(CustomFlagCondition.Create("Spawn")); + Main.Achievements.Register(achievement75); + Achievement achievement76 = new Achievement("PRISMANCER"); + achievement76.AddCondition(ItemPickupCondition.Create((short) 495)); + Main.Achievements.Register(achievement76); + Achievement achievement77 = new Achievement("IT_CAN_TALK"); + achievement77.AddCondition((AchievementCondition) ProgressionEventCondition.Create(18)); + Main.Achievements.Register(achievement77); + Achievement achievement78 = new Achievement("WATCH_YOUR_STEP"); + achievement78.AddCondition(CustomFlagCondition.Create("Hit")); + Main.Achievements.Register(achievement78); + Achievement achievement79 = new Achievement("MARATHON_MEDALIST"); + achievement79.AddCondition(CustomFloatCondition.Create("Move", 1106688f)); + achievement79.UseTrackerFromCondition("Move"); + Main.Achievements.Register(achievement79); + Achievement achievement80 = new Achievement("GLORIOUS_GOLDEN_POLE"); + achievement80.AddCondition(ItemPickupCondition.Create((short) 2294)); + Main.Achievements.Register(achievement80); + Achievement achievement81 = new Achievement("SERVANT_IN_TRAINING"); + achievement81.AddCondition(CustomFlagCondition.Create("Finish")); + Main.Achievements.Register(achievement81); + Achievement achievement82 = new Achievement("GOOD_LITTLE_SLAVE"); + achievement82.AddCondition(CustomIntCondition.Create("Finish", 10)); + achievement82.UseTrackerFromCondition("Finish"); + Main.Achievements.Register(achievement82); + Achievement achievement83 = new Achievement("TROUT_MONKEY"); + achievement83.AddCondition(CustomIntCondition.Create("Finish", 25)); + achievement83.UseTrackerFromCondition("Finish"); + Main.Achievements.Register(achievement83); + Achievement achievement84 = new Achievement("FAST_AND_FISHIOUS"); + achievement84.AddCondition(CustomIntCondition.Create("Finish", 50)); + achievement84.UseTrackerFromCondition("Finish"); + Main.Achievements.Register(achievement84); + Achievement achievement85 = new Achievement("SUPREME_HELPER_MINION"); + achievement85.AddCondition(CustomIntCondition.Create("Finish", 200)); + achievement85.UseTrackerFromCondition("Finish"); + Main.Achievements.Register(achievement85); + Achievement achievement86 = new Achievement("TOPPED_OFF"); + achievement86.AddCondition(CustomFlagCondition.Create("Use")); + Main.Achievements.Register(achievement86); + Achievement achievement87 = new Achievement("SLAYER_OF_WORLDS"); + achievement87.AddCondition(NPCKilledCondition.Create((short) 13, (short) 14, (short) 15)); + achievement87.AddCondition(NPCKilledCondition.Create((short) 113, (short) 114)); + achievement87.AddCondition(NPCKilledCondition.Create((short) 125, (short) 126)); + achievement87.AddConditions(NPCKilledCondition.CreateMany((short) 4, (short) 266, (short) 35, (short) 50, (short) 222, (short) 134, (short) sbyte.MaxValue, (short) 262, (short) 245, (short) 439, (short) 398, (short) 370)); + achievement87.UseConditionsCompletedTracker(); + Main.Achievements.Register(achievement87); + Achievement achievement88 = new Achievement("YOU_CAN_DO_IT"); + achievement88.AddCondition((AchievementCondition) ProgressionEventCondition.Create(1)); + Main.Achievements.Register(achievement88); + Achievement achievement89 = new Achievement("MATCHING_ATTIRE"); + achievement89.AddCondition(CustomFlagCondition.Create("Equip")); + Main.Achievements.Register(achievement89); + int num1 = 0; + AchievementManager achievements1 = Main.Achievements; + int iconIndex1 = num1; + int num2 = iconIndex1 + 1; + achievements1.RegisterIconIndex("TIMBER", iconIndex1); + AchievementManager achievements2 = Main.Achievements; + int iconIndex2 = num2; + int num3 = iconIndex2 + 1; + achievements2.RegisterIconIndex("NO_HOBO", iconIndex2); + AchievementManager achievements3 = Main.Achievements; + int iconIndex3 = num3; + int num4 = iconIndex3 + 1; + achievements3.RegisterIconIndex("OBTAIN_HAMMER", iconIndex3); + AchievementManager achievements4 = Main.Achievements; + int iconIndex4 = num4; + int num5 = iconIndex4 + 1; + achievements4.RegisterIconIndex("HEART_BREAKER", iconIndex4); + AchievementManager achievements5 = Main.Achievements; + int iconIndex5 = num5; + int num6 = iconIndex5 + 1; + achievements5.RegisterIconIndex("OOO_SHINY", iconIndex5); + AchievementManager achievements6 = Main.Achievements; + int iconIndex6 = num6; + int num7 = iconIndex6 + 1; + achievements6.RegisterIconIndex("HEAVY_METAL", iconIndex6); + AchievementManager achievements7 = Main.Achievements; + int iconIndex7 = num7; + int num8 = iconIndex7 + 1; + achievements7.RegisterIconIndex("I_AM_LOOT", iconIndex7); + AchievementManager achievements8 = Main.Achievements; + int iconIndex8 = num8; + int num9 = iconIndex8 + 1; + achievements8.RegisterIconIndex("STAR_POWER", iconIndex8); + AchievementManager achievements9 = Main.Achievements; + int iconIndex9 = num9; + int num10 = iconIndex9 + 1; + achievements9.RegisterIconIndex("HOLD_ON_TIGHT", iconIndex9); + AchievementManager achievements10 = Main.Achievements; + int iconIndex10 = num10; + int num11 = iconIndex10 + 1; + achievements10.RegisterIconIndex("EYE_ON_YOU", iconIndex10); + AchievementManager achievements11 = Main.Achievements; + int iconIndex11 = num11; + int num12 = iconIndex11 + 1; + achievements11.RegisterIconIndex("SMASHING_POPPET", iconIndex11); + AchievementManager achievements12 = Main.Achievements; + int iconIndex12 = num12; + int num13 = iconIndex12 + 1; + achievements12.RegisterIconIndex("WORM_FODDER", iconIndex12); + AchievementManager achievements13 = Main.Achievements; + int iconIndex13 = num13; + int num14 = iconIndex13 + 1; + achievements13.RegisterIconIndex("MASTERMIND", iconIndex13); + AchievementManager achievements14 = Main.Achievements; + int iconIndex14 = num14; + int num15 = iconIndex14 + 1; + achievements14.RegisterIconIndex("WHERES_MY_HONEY", iconIndex14); + AchievementManager achievements15 = Main.Achievements; + int iconIndex15 = num15; + int num16 = iconIndex15 + 1; + achievements15.RegisterIconIndex("STING_OPERATION", iconIndex15); + AchievementManager achievements16 = Main.Achievements; + int iconIndex16 = num16; + int num17 = iconIndex16 + 1; + achievements16.RegisterIconIndex("BONED", iconIndex16); + AchievementManager achievements17 = Main.Achievements; + int iconIndex17 = num17; + int num18 = iconIndex17 + 1; + achievements17.RegisterIconIndex("DUNGEON_HEIST", iconIndex17); + AchievementManager achievements18 = Main.Achievements; + int iconIndex18 = num18; + int num19 = iconIndex18 + 1; + achievements18.RegisterIconIndex("ITS_GETTING_HOT_IN_HERE", iconIndex18); + AchievementManager achievements19 = Main.Achievements; + int iconIndex19 = num19; + int num20 = iconIndex19 + 1; + achievements19.RegisterIconIndex("MINER_FOR_FIRE", iconIndex19); + AchievementManager achievements20 = Main.Achievements; + int iconIndex20 = num20; + int num21 = iconIndex20 + 1; + achievements20.RegisterIconIndex("STILL_HUNGRY", iconIndex20); + AchievementManager achievements21 = Main.Achievements; + int iconIndex21 = num21; + int num22 = iconIndex21 + 1; + achievements21.RegisterIconIndex("ITS_HARD", iconIndex21); + AchievementManager achievements22 = Main.Achievements; + int iconIndex22 = num22; + int num23 = iconIndex22 + 1; + achievements22.RegisterIconIndex("BEGONE_EVIL", iconIndex22); + AchievementManager achievements23 = Main.Achievements; + int iconIndex23 = num23; + int num24 = iconIndex23 + 1; + achievements23.RegisterIconIndex("EXTRA_SHINY", iconIndex23); + AchievementManager achievements24 = Main.Achievements; + int iconIndex24 = num24; + int num25 = iconIndex24 + 1; + achievements24.RegisterIconIndex("HEAD_IN_THE_CLOUDS", iconIndex24); + AchievementManager achievements25 = Main.Achievements; + int iconIndex25 = num25; + int num26 = iconIndex25 + 1; + achievements25.RegisterIconIndex("LIKE_A_BOSS", iconIndex25); + AchievementManager achievements26 = Main.Achievements; + int iconIndex26 = num26; + int num27 = iconIndex26 + 1; + achievements26.RegisterIconIndex("BUCKETS_OF_BOLTS", iconIndex26); + AchievementManager achievements27 = Main.Achievements; + int iconIndex27 = num27; + int num28 = iconIndex27 + 1; + achievements27.RegisterIconIndex("DRAX_ATTAX", iconIndex27); + AchievementManager achievements28 = Main.Achievements; + int iconIndex28 = num28; + int num29 = iconIndex28 + 1; + achievements28.RegisterIconIndex("PHOTOSYNTHESIS", iconIndex28); + AchievementManager achievements29 = Main.Achievements; + int iconIndex29 = num29; + int num30 = iconIndex29 + 1; + achievements29.RegisterIconIndex("GET_A_LIFE", iconIndex29); + AchievementManager achievements30 = Main.Achievements; + int iconIndex30 = num30; + int num31 = iconIndex30 + 1; + achievements30.RegisterIconIndex("THE_GREAT_SOUTHERN_PLANTKILL", iconIndex30); + AchievementManager achievements31 = Main.Achievements; + int iconIndex31 = num31; + int num32 = iconIndex31 + 1; + achievements31.RegisterIconIndex("TEMPLE_RAIDER", iconIndex31); + AchievementManager achievements32 = Main.Achievements; + int iconIndex32 = num32; + int num33 = iconIndex32 + 1; + achievements32.RegisterIconIndex("LIHZAHRDIAN_IDOL", iconIndex32); + AchievementManager achievements33 = Main.Achievements; + int iconIndex33 = num33; + int num34 = iconIndex33 + 1; + achievements33.RegisterIconIndex("ROBBING_THE_GRAVE", iconIndex33); + AchievementManager achievements34 = Main.Achievements; + int iconIndex34 = num34; + int num35 = iconIndex34 + 1; + achievements34.RegisterIconIndex("BIG_BOOTY", iconIndex34); + AchievementManager achievements35 = Main.Achievements; + int iconIndex35 = num35; + int num36 = iconIndex35 + 1; + achievements35.RegisterIconIndex("FISH_OUT_OF_WATER", iconIndex35); + AchievementManager achievements36 = Main.Achievements; + int iconIndex36 = num36; + int num37 = iconIndex36 + 1; + achievements36.RegisterIconIndex("OBSESSIVE_DEVOTION", iconIndex36); + AchievementManager achievements37 = Main.Achievements; + int iconIndex37 = num37; + int num38 = iconIndex37 + 1; + achievements37.RegisterIconIndex("STAR_DESTROYER", iconIndex37); + AchievementManager achievements38 = Main.Achievements; + int iconIndex38 = num38; + int num39 = iconIndex38 + 1; + achievements38.RegisterIconIndex("CHAMPION_OF_TERRARIA", iconIndex38); + AchievementManager achievements39 = Main.Achievements; + int iconIndex39 = num39; + int num40 = iconIndex39 + 1; + achievements39.RegisterIconIndex("BLOODBATH", iconIndex39); + AchievementManager achievements40 = Main.Achievements; + int iconIndex40 = num40; + int num41 = iconIndex40 + 1; + achievements40.RegisterIconIndex("GOBLIN_PUNTER", iconIndex40); + AchievementManager achievements41 = Main.Achievements; + int iconIndex41 = num41; + int num42 = iconIndex41 + 1; + achievements41.RegisterIconIndex("KILL_THE_SUN", iconIndex41); + AchievementManager achievements42 = Main.Achievements; + int iconIndex42 = num42; + int num43 = iconIndex42 + 1; + achievements42.RegisterIconIndex("WALK_THE_PLANK", iconIndex42); + AchievementManager achievements43 = Main.Achievements; + int iconIndex43 = num43; + int num44 = iconIndex43 + 1; + achievements43.RegisterIconIndex("DO_YOU_WANT_TO_SLAY_A_SNOWMAN", iconIndex43); + AchievementManager achievements44 = Main.Achievements; + int iconIndex44 = num44; + int num45 = iconIndex44 + 1; + achievements44.RegisterIconIndex("TIN_FOIL_HATTER", iconIndex44); + AchievementManager achievements45 = Main.Achievements; + int iconIndex45 = num45; + int num46 = iconIndex45 + 1; + achievements45.RegisterIconIndex("BALEFUL_HARVEST", iconIndex45); + AchievementManager achievements46 = Main.Achievements; + int iconIndex46 = num46; + int num47 = iconIndex46 + 1; + achievements46.RegisterIconIndex("ICE_SCREAM", iconIndex46); + AchievementManager achievements47 = Main.Achievements; + int iconIndex47 = num47; + int num48 = iconIndex47 + 1; + achievements47.RegisterIconIndex("SLIPPERY_SHINOBI", iconIndex47); + AchievementManager achievements48 = Main.Achievements; + int iconIndex48 = num48; + int num49 = iconIndex48 + 1; + achievements48.RegisterIconIndex("STICKY_SITUATION", iconIndex48); + AchievementManager achievements49 = Main.Achievements; + int iconIndex49 = num49; + int num50 = iconIndex49 + 1; + achievements49.RegisterIconIndex("REAL_ESTATE_AGENT", iconIndex49); + AchievementManager achievements50 = Main.Achievements; + int iconIndex50 = num50; + int num51 = iconIndex50 + 1; + achievements50.RegisterIconIndex("NOT_THE_BEES", iconIndex50); + AchievementManager achievements51 = Main.Achievements; + int iconIndex51 = num51; + int num52 = iconIndex51 + 1; + achievements51.RegisterIconIndex("JEEPERS_CREEPERS", iconIndex51); + AchievementManager achievements52 = Main.Achievements; + int iconIndex52 = num52; + int num53 = iconIndex52 + 1; + achievements52.RegisterIconIndex("FUNKYTOWN", iconIndex52); + AchievementManager achievements53 = Main.Achievements; + int iconIndex53 = num53; + int num54 = iconIndex53 + 1; + achievements53.RegisterIconIndex("INTO_ORBIT", iconIndex53); + AchievementManager achievements54 = Main.Achievements; + int iconIndex54 = num54; + int num55 = iconIndex54 + 1; + achievements54.RegisterIconIndex("ROCK_BOTTOM", iconIndex54); + AchievementManager achievements55 = Main.Achievements; + int iconIndex55 = num55; + int num56 = iconIndex55 + 1; + achievements55.RegisterIconIndex("MECHA_MAYHEM", iconIndex55); + AchievementManager achievements56 = Main.Achievements; + int iconIndex56 = num56; + int num57 = iconIndex56 + 1; + achievements56.RegisterIconIndex("GELATIN_WORLD_TOUR", iconIndex56); + AchievementManager achievements57 = Main.Achievements; + int iconIndex57 = num57; + int num58 = iconIndex57 + 1; + achievements57.RegisterIconIndex("FASHION_STATEMENT", iconIndex57); + AchievementManager achievements58 = Main.Achievements; + int iconIndex58 = num58; + int num59 = iconIndex58 + 1; + achievements58.RegisterIconIndex("VEHICULAR_MANSLAUGHTER", iconIndex58); + AchievementManager achievements59 = Main.Achievements; + int iconIndex59 = num59; + int num60 = iconIndex59 + 1; + achievements59.RegisterIconIndex("BULLDOZER", iconIndex59); + AchievementManager achievements60 = Main.Achievements; + int iconIndex60 = num60; + int num61 = iconIndex60 + 1; + achievements60.RegisterIconIndex("THERE_ARE_SOME_WHO_CALL_HIM", iconIndex60); + AchievementManager achievements61 = Main.Achievements; + int iconIndex61 = num61; + int num62 = iconIndex61 + 1; + achievements61.RegisterIconIndex("DECEIVER_OF_FOOLS", iconIndex61); + AchievementManager achievements62 = Main.Achievements; + int iconIndex62 = num62; + int num63 = iconIndex62 + 1; + achievements62.RegisterIconIndex("SWORD_OF_THE_HERO", iconIndex62); + AchievementManager achievements63 = Main.Achievements; + int iconIndex63 = num63; + int num64 = iconIndex63 + 1; + achievements63.RegisterIconIndex("LUCKY_BREAK", iconIndex63); + AchievementManager achievements64 = Main.Achievements; + int iconIndex64 = num64; + int num65 = iconIndex64 + 1; + achievements64.RegisterIconIndex("THROWING_LINES", iconIndex64); + AchievementManager achievements65 = Main.Achievements; + int iconIndex65 = num65; + int num66 = iconIndex65 + 1; + achievements65.RegisterIconIndex("DYE_HARD", iconIndex65); + AchievementManager achievements66 = Main.Achievements; + int iconIndex66 = num66; + int num67 = iconIndex66 + 1; + achievements66.RegisterIconIndex("FREQUENT_FLYER", iconIndex66); + AchievementManager achievements67 = Main.Achievements; + int iconIndex67 = num67; + int num68 = iconIndex67 + 1; + achievements67.RegisterIconIndex("THE_CAVALRY", iconIndex67); + AchievementManager achievements68 = Main.Achievements; + int iconIndex68 = num68; + int num69 = iconIndex68 + 1; + achievements68.RegisterIconIndex("COMPLETELY_AWESOME", iconIndex68); + AchievementManager achievements69 = Main.Achievements; + int iconIndex69 = num69; + int num70 = iconIndex69 + 1; + achievements69.RegisterIconIndex("TIL_DEATH", iconIndex69); + AchievementManager achievements70 = Main.Achievements; + int iconIndex70 = num70; + int num71 = iconIndex70 + 1; + achievements70.RegisterIconIndex("ARCHAEOLOGIST", iconIndex70); + AchievementManager achievements71 = Main.Achievements; + int iconIndex71 = num71; + int num72 = iconIndex71 + 1; + achievements71.RegisterIconIndex("PRETTY_IN_PINK", iconIndex71); + AchievementManager achievements72 = Main.Achievements; + int iconIndex72 = num72; + int num73 = iconIndex72 + 1; + achievements72.RegisterIconIndex("RAINBOWS_AND_UNICORNS", iconIndex72); + AchievementManager achievements73 = Main.Achievements; + int iconIndex73 = num73; + int num74 = iconIndex73 + 1; + achievements73.RegisterIconIndex("YOU_AND_WHAT_ARMY", iconIndex73); + AchievementManager achievements74 = Main.Achievements; + int iconIndex74 = num74; + int num75 = iconIndex74 + 1; + achievements74.RegisterIconIndex("PRISMANCER", iconIndex74); + AchievementManager achievements75 = Main.Achievements; + int iconIndex75 = num75; + int num76 = iconIndex75 + 1; + achievements75.RegisterIconIndex("IT_CAN_TALK", iconIndex75); + AchievementManager achievements76 = Main.Achievements; + int iconIndex76 = num76; + int num77 = iconIndex76 + 1; + achievements76.RegisterIconIndex("WATCH_YOUR_STEP", iconIndex76); + AchievementManager achievements77 = Main.Achievements; + int iconIndex77 = num77; + int num78 = iconIndex77 + 1; + achievements77.RegisterIconIndex("MARATHON_MEDALIST", iconIndex77); + AchievementManager achievements78 = Main.Achievements; + int iconIndex78 = num78; + int num79 = iconIndex78 + 1; + achievements78.RegisterIconIndex("GLORIOUS_GOLDEN_POLE", iconIndex78); + AchievementManager achievements79 = Main.Achievements; + int iconIndex79 = num79; + int num80 = iconIndex79 + 1; + achievements79.RegisterIconIndex("SERVANT_IN_TRAINING", iconIndex79); + AchievementManager achievements80 = Main.Achievements; + int iconIndex80 = num80; + int num81 = iconIndex80 + 1; + achievements80.RegisterIconIndex("GOOD_LITTLE_SLAVE", iconIndex80); + AchievementManager achievements81 = Main.Achievements; + int iconIndex81 = num81; + int num82 = iconIndex81 + 1; + achievements81.RegisterIconIndex("TROUT_MONKEY", iconIndex81); + AchievementManager achievements82 = Main.Achievements; + int iconIndex82 = num82; + int num83 = iconIndex82 + 1; + achievements82.RegisterIconIndex("FAST_AND_FISHIOUS", iconIndex82); + AchievementManager achievements83 = Main.Achievements; + int iconIndex83 = num83; + int num84 = iconIndex83 + 1; + achievements83.RegisterIconIndex("SUPREME_HELPER_MINION", iconIndex83); + AchievementManager achievements84 = Main.Achievements; + int iconIndex84 = num84; + int num85 = iconIndex84 + 1; + achievements84.RegisterIconIndex("TOPPED_OFF", iconIndex84); + AchievementManager achievements85 = Main.Achievements; + int iconIndex85 = num85; + int num86 = iconIndex85 + 1; + achievements85.RegisterIconIndex("SLAYER_OF_WORLDS", iconIndex85); + AchievementManager achievements86 = Main.Achievements; + int iconIndex86 = num86; + int num87 = iconIndex86 + 1; + achievements86.RegisterIconIndex("YOU_CAN_DO_IT", iconIndex86); + AchievementManager achievements87 = Main.Achievements; + int iconIndex87 = num87; + int num88 = iconIndex87 + 1; + achievements87.RegisterIconIndex("SICK_THROW", iconIndex87); + AchievementManager achievements88 = Main.Achievements; + int iconIndex88 = num88; + int num89 = iconIndex88 + 1; + achievements88.RegisterIconIndex("MATCHING_ATTIRE", iconIndex88); + AchievementManager achievements89 = Main.Achievements; + int iconIndex89 = num89; + int num90 = iconIndex89 + 1; + achievements89.RegisterIconIndex("BENCHED", iconIndex89); + AchievementCategory category1 = AchievementCategory.Slayer; + Main.Achievements.RegisterAchievementCategory("EYE_ON_YOU", category1); + Main.Achievements.RegisterAchievementCategory("SLIPPERY_SHINOBI", category1); + Main.Achievements.RegisterAchievementCategory("WORM_FODDER", category1); + Main.Achievements.RegisterAchievementCategory("MASTERMIND", category1); + Main.Achievements.RegisterAchievementCategory("STING_OPERATION", category1); + Main.Achievements.RegisterAchievementCategory("BONED", category1); + Main.Achievements.RegisterAchievementCategory("STILL_HUNGRY", category1); + Main.Achievements.RegisterAchievementCategory("BUCKETS_OF_BOLTS", category1); + Main.Achievements.RegisterAchievementCategory("THE_GREAT_SOUTHERN_PLANTKILL", category1); + Main.Achievements.RegisterAchievementCategory("LIHZAHRDIAN_IDOL", category1); + Main.Achievements.RegisterAchievementCategory("FISH_OUT_OF_WATER", category1); + Main.Achievements.RegisterAchievementCategory("OBSESSIVE_DEVOTION", category1); + Main.Achievements.RegisterAchievementCategory("STAR_DESTROYER", category1); + Main.Achievements.RegisterAchievementCategory("CHAMPION_OF_TERRARIA", category1); + Main.Achievements.RegisterAchievementCategory("GOBLIN_PUNTER", category1); + Main.Achievements.RegisterAchievementCategory("DO_YOU_WANT_TO_SLAY_A_SNOWMAN", category1); + Main.Achievements.RegisterAchievementCategory("WALK_THE_PLANK", category1); + Main.Achievements.RegisterAchievementCategory("BALEFUL_HARVEST", category1); + Main.Achievements.RegisterAchievementCategory("ICE_SCREAM", category1); + Main.Achievements.RegisterAchievementCategory("TIN_FOIL_HATTER", category1); + Main.Achievements.RegisterAchievementCategory("TIL_DEATH", category1); + Main.Achievements.RegisterAchievementCategory("THERE_ARE_SOME_WHO_CALL_HIM", category1); + Main.Achievements.RegisterAchievementCategory("ARCHAEOLOGIST", category1); + Main.Achievements.RegisterAchievementCategory("PRETTY_IN_PINK", category1); + Main.Achievements.RegisterAchievementCategory("DECEIVER_OF_FOOLS", category1); + Main.Achievements.RegisterAchievementCategory("VEHICULAR_MANSLAUGHTER", category1); + AchievementCategory category2 = AchievementCategory.Explorer; + Main.Achievements.RegisterAchievementCategory("SMASHING_POPPET", category2); + Main.Achievements.RegisterAchievementCategory("BEGONE_EVIL", category2); + Main.Achievements.RegisterAchievementCategory("ITS_HARD", category2); + Main.Achievements.RegisterAchievementCategory("FUNKYTOWN", category2); + Main.Achievements.RegisterAchievementCategory("WATCH_YOUR_STEP", category2); + Main.Achievements.RegisterAchievementCategory("YOU_CAN_DO_IT", category2); + Main.Achievements.RegisterAchievementCategory("BLOODBATH", category2); + Main.Achievements.RegisterAchievementCategory("KILL_THE_SUN", category2); + Main.Achievements.RegisterAchievementCategory("STICKY_SITUATION", category2); + Main.Achievements.RegisterAchievementCategory("NO_HOBO", category2); + Main.Achievements.RegisterAchievementCategory("IT_CAN_TALK", category2); + Main.Achievements.RegisterAchievementCategory("HEART_BREAKER", category2); + Main.Achievements.RegisterAchievementCategory("I_AM_LOOT", category2); + Main.Achievements.RegisterAchievementCategory("ROBBING_THE_GRAVE", category2); + Main.Achievements.RegisterAchievementCategory("GET_A_LIFE", category2); + Main.Achievements.RegisterAchievementCategory("JEEPERS_CREEPERS", category2); + Main.Achievements.RegisterAchievementCategory("WHERES_MY_HONEY", category2); + Main.Achievements.RegisterAchievementCategory("DUNGEON_HEIST", category2); + Main.Achievements.RegisterAchievementCategory("BIG_BOOTY", category2); + Main.Achievements.RegisterAchievementCategory("ITS_GETTING_HOT_IN_HERE", category2); + Main.Achievements.RegisterAchievementCategory("INTO_ORBIT", category2); + Main.Achievements.RegisterAchievementCategory("ROCK_BOTTOM", category2); + Main.Achievements.RegisterAchievementCategory("OOO_SHINY", category2); + Main.Achievements.RegisterAchievementCategory("EXTRA_SHINY", category2); + Main.Achievements.RegisterAchievementCategory("PHOTOSYNTHESIS", category2); + AchievementCategory category3 = AchievementCategory.Challenger; + Main.Achievements.RegisterAchievementCategory("GELATIN_WORLD_TOUR", category3); + Main.Achievements.RegisterAchievementCategory("SLAYER_OF_WORLDS", category3); + Main.Achievements.RegisterAchievementCategory("REAL_ESTATE_AGENT", category3); + Main.Achievements.RegisterAchievementCategory("YOU_AND_WHAT_ARMY", category3); + Main.Achievements.RegisterAchievementCategory("TOPPED_OFF", category3); + Main.Achievements.RegisterAchievementCategory("MECHA_MAYHEM", category3); + Main.Achievements.RegisterAchievementCategory("BULLDOZER", category3); + Main.Achievements.RegisterAchievementCategory("NOT_THE_BEES", category3); + Main.Achievements.RegisterAchievementCategory("RAINBOWS_AND_UNICORNS", category3); + Main.Achievements.RegisterAchievementCategory("THROWING_LINES", category3); + Main.Achievements.RegisterAchievementCategory("FREQUENT_FLYER", category3); + Main.Achievements.RegisterAchievementCategory("LUCKY_BREAK", category3); + Main.Achievements.RegisterAchievementCategory("MARATHON_MEDALIST", category3); + Main.Achievements.RegisterAchievementCategory("SERVANT_IN_TRAINING", category3); + Main.Achievements.RegisterAchievementCategory("GOOD_LITTLE_SLAVE", category3); + Main.Achievements.RegisterAchievementCategory("TROUT_MONKEY", category3); + Main.Achievements.RegisterAchievementCategory("FAST_AND_FISHIOUS", category3); + Main.Achievements.RegisterAchievementCategory("SUPREME_HELPER_MINION", category3); + AchievementCategory category4 = AchievementCategory.Collector; + Main.Achievements.RegisterAchievementCategory("OBTAIN_HAMMER", category4); + Main.Achievements.RegisterAchievementCategory("BENCHED", category4); + Main.Achievements.RegisterAchievementCategory("HEAVY_METAL", category4); + Main.Achievements.RegisterAchievementCategory("STAR_POWER", category4); + Main.Achievements.RegisterAchievementCategory("MINER_FOR_FIRE", category4); + Main.Achievements.RegisterAchievementCategory("HEAD_IN_THE_CLOUDS", category4); + Main.Achievements.RegisterAchievementCategory("DRAX_ATTAX", category4); + Main.Achievements.RegisterAchievementCategory("PRISMANCER", category4); + Main.Achievements.RegisterAchievementCategory("SWORD_OF_THE_HERO", category4); + Main.Achievements.RegisterAchievementCategory("HOLD_ON_TIGHT", category4); + Main.Achievements.RegisterAchievementCategory("THE_CAVALRY", category4); + Main.Achievements.RegisterAchievementCategory("DYE_HARD", category4); + Main.Achievements.RegisterAchievementCategory("MATCHING_ATTIRE", category4); + Main.Achievements.RegisterAchievementCategory("FASHION_STATEMENT", category4); + Main.Achievements.RegisterAchievementCategory("COMPLETELY_AWESOME", category4); + Main.Achievements.RegisterAchievementCategory("TIMBER", category4); + Main.Achievements.RegisterAchievementCategory("SICK_THROW", category4); + Main.Achievements.RegisterAchievementCategory("GLORIOUS_GOLDEN_POLE", category4); + Main.Achievements.RegisterAchievementCategory("TEMPLE_RAIDER", category4); + Main.Achievements.RegisterAchievementCategory("LIKE_A_BOSS", category4); + Main.Achievements.Load(); + Main.Achievements.OnAchievementCompleted += new Achievement.AchievementCompleted(AchievementInitializer.OnAchievementCompleted); + AchievementsHelper.Initialize(); + } + + private static void OnAchievementCompleted(Achievement achievement) + { + Main.NewText(Language.GetTextValue("Achievements.Completed", (object) AchievementTagHandler.GenerateTag(achievement))); + if (SoundEngine.FindActiveSound((SoundStyle) SoundID.AchievementComplete) != null) + return; + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.AchievementComplete); + } + } +} diff --git a/Initializers/AssetInitializer.cs b/Initializers/AssetInitializer.cs new file mode 100644 index 0000000..55c3ff8 --- /dev/null +++ b/Initializers/AssetInitializer.cs @@ -0,0 +1,549 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Initializers.AssetInitializer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Newtonsoft.Json.Linq; +using ReLogic.Content; +using ReLogic.Content.Readers; +using ReLogic.Graphics; +using ReLogic.Utilities; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Terraria.Audio; +using Terraria.GameContent; +using Terraria.GameContent.UI; +using Terraria.ID; +using Terraria.IO; +using Terraria.Utilities; + +namespace Terraria.Initializers +{ + public static class AssetInitializer + { + public static void CreateAssetServices(GameServiceContainer services) + { + AssetReaderCollection readerCollection = new AssetReaderCollection(); + readerCollection.RegisterReader((IAssetReader) new PngReader(XnaExtensions.Get((IServiceProvider) services).GraphicsDevice), new string[1] + { + ".png" + }); + readerCollection.RegisterReader((IAssetReader) new XnbReader((IServiceProvider) services), new string[1] + { + ".xnb" + }); + AsyncAssetLoader asyncAssetLoader = new AsyncAssetLoader(readerCollection, 20); + asyncAssetLoader.RequireTypeCreationOnTransfer(typeof (Texture2D)); + asyncAssetLoader.RequireTypeCreationOnTransfer(typeof (DynamicSpriteFont)); + asyncAssetLoader.RequireTypeCreationOnTransfer(typeof (SpriteFont)); + IAssetRepository iassetRepository = (IAssetRepository) new AssetRepository((IAssetLoader) new AssetLoader(readerCollection), (IAsyncAssetLoader) asyncAssetLoader); + services.AddService(typeof (AssetReaderCollection), (object) readerCollection); + services.AddService(typeof (IAssetRepository), (object) iassetRepository); + } + + public static ResourcePackList CreateResourcePackList(IServiceProvider services) + { + JArray resourcePackJson; + string resourcePackFolder; + AssetInitializer.GetResourcePacksFolderPathAndConfirmItExists(out resourcePackJson, out resourcePackFolder); + return ResourcePackList.FromJson(resourcePackJson, services, resourcePackFolder); + } + + public static void GetResourcePacksFolderPathAndConfirmItExists( + out JArray resourcePackJson, + out string resourcePackFolder) + { + resourcePackJson = Main.Configuration.Get("ResourcePacks", new JArray()); + resourcePackFolder = Path.Combine(Main.SavePath, "ResourcePacks"); + Utils.TryCreatingDirectory(resourcePackFolder); + } + + public static void LoadSplashAssets(bool asyncLoadForSounds) + { + TextureAssets.SplashTexture16x9 = AssetInitializer.LoadAsset("Images\\SplashScreens\\Splash_1", (AssetRequestMode) 1); + TextureAssets.SplashTexture4x3 = AssetInitializer.LoadAsset("Images\\logo_" + (object) new UnifiedRandom().Next(1, 9), (AssetRequestMode) 1); + TextureAssets.SplashTextureLegoResonanace = AssetInitializer.LoadAsset("Images\\SplashScreens\\ResonanceArray", (AssetRequestMode) 1); + int num = new UnifiedRandom().Next(1, 10); + TextureAssets.SplashTextureLegoBack = AssetInitializer.LoadAsset("Images\\SplashScreens\\Splash_" + (object) num + "_0", (AssetRequestMode) 1); + TextureAssets.SplashTextureLegoTree = AssetInitializer.LoadAsset("Images\\SplashScreens\\Splash_" + (object) num + "_1", (AssetRequestMode) 1); + TextureAssets.SplashTextureLegoFront = AssetInitializer.LoadAsset("Images\\SplashScreens\\Splash_" + (object) num + "_2", (AssetRequestMode) 1); + TextureAssets.Item[75] = AssetInitializer.LoadAsset("Images\\Item_" + (object) (short) 75, (AssetRequestMode) 1); + TextureAssets.LoadingSunflower = AssetInitializer.LoadAsset("Images\\UI\\Sunflower_Loading", (AssetRequestMode) 1); + } + + public static void LoadAssetsWhileInInitialBlackScreen() + { + AssetInitializer.LoadFonts((AssetRequestMode) 1); + AssetInitializer.LoadTextures((AssetRequestMode) 1); + AssetInitializer.LoadRenderTargetAssets((AssetRequestMode) 1); + AssetInitializer.LoadSounds((AssetRequestMode) 1); + } + + public static void Load(bool asyncLoad) + { + } + + private static void LoadFonts(AssetRequestMode mode) + { + FontAssets.ItemStack = AssetInitializer.LoadAsset("Fonts/Item_Stack", mode); + FontAssets.MouseText = AssetInitializer.LoadAsset("Fonts/Mouse_Text", mode); + FontAssets.DeathText = AssetInitializer.LoadAsset("Fonts/Death_Text", mode); + FontAssets.CombatText[0] = AssetInitializer.LoadAsset("Fonts/Combat_Text", mode); + FontAssets.CombatText[1] = AssetInitializer.LoadAsset("Fonts/Combat_Crit", mode); + } + + private static void LoadSounds(AssetRequestMode mode) => SoundEngine.Load((IServiceProvider) Main.instance.Services); + + private static void LoadRenderTargetAssets(AssetRequestMode mode) + { + AssetInitializer.RegisterRenderTargetAsset((INeedRenderTargetContent) (TextureAssets.RenderTargets.PlayerRainbowWings = new PlayerRainbowWingsTextureContent())); + AssetInitializer.RegisterRenderTargetAsset((INeedRenderTargetContent) (TextureAssets.RenderTargets.PlayerTitaniumStormBuff = new PlayerTitaniumStormBuffTextureContent())); + AssetInitializer.RegisterRenderTargetAsset((INeedRenderTargetContent) (TextureAssets.RenderTargets.QueenSlimeMount = new PlayerQueenSlimeMountTextureContent())); + } + + private static void RegisterRenderTargetAsset(INeedRenderTargetContent content) => Main.ContentThatNeedsRenderTargets.Add(content); + + private static void LoadTextures(AssetRequestMode mode) + { + for (int index1 = 0; index1 < TextureAssets.Item.Length; ++index1) + { + int index2 = ItemID.Sets.TextureCopyLoad[index1]; + TextureAssets.Item[index1] = index2 == -1 ? AssetInitializer.LoadAsset("Images/Item_" + (object) index1, (AssetRequestMode) 0) : TextureAssets.Item[index2]; + } + for (int index = 0; index < TextureAssets.Npc.Length; ++index) + TextureAssets.Npc[index] = AssetInitializer.LoadAsset("Images/NPC_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.Projectile.Length; ++index) + TextureAssets.Projectile[index] = AssetInitializer.LoadAsset("Images/Projectile_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.Gore.Length; ++index) + TextureAssets.Gore[index] = AssetInitializer.LoadAsset("Images/Gore_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.Wall.Length; ++index) + TextureAssets.Wall[index] = AssetInitializer.LoadAsset("Images/Wall_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.Tile.Length; ++index) + TextureAssets.Tile[index] = AssetInitializer.LoadAsset("Images/Tiles_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.ItemFlame.Length; ++index) + TextureAssets.ItemFlame[index] = AssetInitializer.LoadAsset("Images/ItemFlame_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.Wings.Length; ++index) + TextureAssets.Wings[index] = AssetInitializer.LoadAsset("Images/Wings_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.PlayerHair.Length; ++index) + TextureAssets.PlayerHair[index] = AssetInitializer.LoadAsset("Images/Player_Hair_" + (object) (index + 1), (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.PlayerHairAlt.Length; ++index) + TextureAssets.PlayerHairAlt[index] = AssetInitializer.LoadAsset("Images/Player_HairAlt_" + (object) (index + 1), (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.ArmorHead.Length; ++index) + TextureAssets.ArmorHead[index] = AssetInitializer.LoadAsset("Images/Armor_Head_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.FemaleBody.Length; ++index) + TextureAssets.FemaleBody[index] = AssetInitializer.LoadAsset("Images/Female_Body_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.ArmorBody.Length; ++index) + TextureAssets.ArmorBody[index] = AssetInitializer.LoadAsset("Images/Armor_Body_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.ArmorBodyComposite.Length; ++index) + TextureAssets.ArmorBodyComposite[index] = AssetInitializer.LoadAsset("Images/Armor/Armor_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.ArmorArm.Length; ++index) + TextureAssets.ArmorArm[index] = AssetInitializer.LoadAsset("Images/Armor_Arm_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.ArmorLeg.Length; ++index) + TextureAssets.ArmorLeg[index] = AssetInitializer.LoadAsset("Images/Armor_Legs_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.AccHandsOn.Length; ++index) + TextureAssets.AccHandsOn[index] = AssetInitializer.LoadAsset("Images/Acc_HandsOn_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.AccHandsOff.Length; ++index) + TextureAssets.AccHandsOff[index] = AssetInitializer.LoadAsset("Images/Acc_HandsOff_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.AccHandsOnComposite.Length; ++index) + TextureAssets.AccHandsOnComposite[index] = AssetInitializer.LoadAsset("Images/Accessories/Acc_HandsOn_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.AccHandsOffComposite.Length; ++index) + TextureAssets.AccHandsOffComposite[index] = AssetInitializer.LoadAsset("Images/Accessories/Acc_HandsOff_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.AccBack.Length; ++index) + TextureAssets.AccBack[index] = AssetInitializer.LoadAsset("Images/Acc_Back_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.AccFront.Length; ++index) + TextureAssets.AccFront[index] = AssetInitializer.LoadAsset("Images/Acc_Front_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.AccShoes.Length; ++index) + TextureAssets.AccShoes[index] = AssetInitializer.LoadAsset("Images/Acc_Shoes_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.AccWaist.Length; ++index) + TextureAssets.AccWaist[index] = AssetInitializer.LoadAsset("Images/Acc_Waist_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.AccShield.Length; ++index) + TextureAssets.AccShield[index] = AssetInitializer.LoadAsset("Images/Acc_Shield_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.AccNeck.Length; ++index) + TextureAssets.AccNeck[index] = AssetInitializer.LoadAsset("Images/Acc_Neck_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.AccFace.Length; ++index) + TextureAssets.AccFace[index] = AssetInitializer.LoadAsset("Images/Acc_Face_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.AccBalloon.Length; ++index) + TextureAssets.AccBalloon[index] = AssetInitializer.LoadAsset("Images/Acc_Balloon_" + (object) index, (AssetRequestMode) 0); + for (int index = 0; index < TextureAssets.Background.Length; ++index) + TextureAssets.Background[index] = AssetInitializer.LoadAsset("Images/Background_" + (object) index, (AssetRequestMode) 0); + TextureAssets.FlameRing = AssetInitializer.LoadAsset("Images/FlameRing", (AssetRequestMode) 0); + TextureAssets.TileCrack = AssetInitializer.LoadAsset("Images\\TileCracks", mode); + TextureAssets.ChestStack[0] = AssetInitializer.LoadAsset("Images\\ChestStack_0", mode); + TextureAssets.ChestStack[1] = AssetInitializer.LoadAsset("Images\\ChestStack_1", mode); + TextureAssets.SmartDig = AssetInitializer.LoadAsset("Images\\SmartDig", mode); + TextureAssets.IceBarrier = AssetInitializer.LoadAsset("Images\\IceBarrier", mode); + TextureAssets.Frozen = AssetInitializer.LoadAsset("Images\\Frozen", mode); + for (int index = 0; index < TextureAssets.Pvp.Length; ++index) + TextureAssets.Pvp[index] = AssetInitializer.LoadAsset("Images\\UI\\PVP_" + (object) index, mode); + for (int index = 0; index < TextureAssets.EquipPage.Length; ++index) + TextureAssets.EquipPage[index] = AssetInitializer.LoadAsset("Images\\UI\\DisplaySlots_" + (object) index, mode); + TextureAssets.HouseBanner = AssetInitializer.LoadAsset("Images\\UI\\House_Banner", mode); + for (int index = 0; index < TextureAssets.CraftToggle.Length; ++index) + TextureAssets.CraftToggle[index] = AssetInitializer.LoadAsset("Images\\UI\\Craft_Toggle_" + (object) index, mode); + for (int index = 0; index < TextureAssets.InventorySort.Length; ++index) + TextureAssets.InventorySort[index] = AssetInitializer.LoadAsset("Images\\UI\\Sort_" + (object) index, mode); + for (int index = 0; index < TextureAssets.TextGlyph.Length; ++index) + TextureAssets.TextGlyph[index] = AssetInitializer.LoadAsset("Images\\UI\\Glyphs_" + (object) index, mode); + for (int index = 0; index < TextureAssets.HotbarRadial.Length; ++index) + TextureAssets.HotbarRadial[index] = AssetInitializer.LoadAsset("Images\\UI\\HotbarRadial_" + (object) index, mode); + for (int index = 0; index < TextureAssets.InfoIcon.Length; ++index) + TextureAssets.InfoIcon[index] = AssetInitializer.LoadAsset("Images\\UI\\InfoIcon_" + (object) index, mode); + for (int index = 0; index < TextureAssets.Reforge.Length; ++index) + TextureAssets.Reforge[index] = AssetInitializer.LoadAsset("Images\\UI\\Reforge_" + (object) index, mode); + for (int index = 0; index < TextureAssets.Camera.Length; ++index) + TextureAssets.Camera[index] = AssetInitializer.LoadAsset("Images\\UI\\Camera_" + (object) index, mode); + for (int index = 0; index < TextureAssets.WireUi.Length; ++index) + TextureAssets.WireUi[index] = AssetInitializer.LoadAsset("Images\\UI\\Wires_" + (object) index, mode); + TextureAssets.BuilderAcc = AssetInitializer.LoadAsset("Images\\UI\\BuilderIcons", mode); + TextureAssets.QuicksIcon = AssetInitializer.LoadAsset("Images\\UI\\UI_quickicon1", mode); + TextureAssets.CraftUpButton = AssetInitializer.LoadAsset("Images\\RecUp", mode); + TextureAssets.CraftDownButton = AssetInitializer.LoadAsset("Images\\RecDown", mode); + TextureAssets.ScrollLeftButton = AssetInitializer.LoadAsset("Images\\RecLeft", mode); + TextureAssets.ScrollRightButton = AssetInitializer.LoadAsset("Images\\RecRight", mode); + TextureAssets.OneDropLogo = AssetInitializer.LoadAsset("Images\\OneDropLogo", mode); + TextureAssets.Pulley = AssetInitializer.LoadAsset("Images\\PlayerPulley", mode); + TextureAssets.Timer = AssetInitializer.LoadAsset("Images\\Timer", mode); + TextureAssets.EmoteMenuButton = AssetInitializer.LoadAsset("Images\\UI\\Emotes", mode); + TextureAssets.BestiaryMenuButton = AssetInitializer.LoadAsset("Images\\UI\\Bestiary", mode); + TextureAssets.Wof = AssetInitializer.LoadAsset("Images\\WallOfFlesh", mode); + TextureAssets.WallOutline = AssetInitializer.LoadAsset("Images\\Wall_Outline", mode); + TextureAssets.Fade = AssetInitializer.LoadAsset("Images\\fade-out", mode); + TextureAssets.Ghost = AssetInitializer.LoadAsset("Images\\Ghost", mode); + TextureAssets.EvilCactus = AssetInitializer.LoadAsset("Images\\Evil_Cactus", mode); + TextureAssets.GoodCactus = AssetInitializer.LoadAsset("Images\\Good_Cactus", mode); + TextureAssets.CrimsonCactus = AssetInitializer.LoadAsset("Images\\Crimson_Cactus", mode); + TextureAssets.WraithEye = AssetInitializer.LoadAsset("Images\\Wraith_Eyes", mode); + TextureAssets.Firefly = AssetInitializer.LoadAsset("Images\\Firefly", mode); + TextureAssets.FireflyJar = AssetInitializer.LoadAsset("Images\\FireflyJar", mode); + TextureAssets.Lightningbug = AssetInitializer.LoadAsset("Images\\LightningBug", mode); + TextureAssets.LightningbugJar = AssetInitializer.LoadAsset("Images\\LightningBugJar", mode); + for (int index = 1; index <= 3; ++index) + TextureAssets.JellyfishBowl[index - 1] = AssetInitializer.LoadAsset("Images\\jellyfishBowl" + (object) index, mode); + TextureAssets.GlowSnail = AssetInitializer.LoadAsset("Images\\GlowSnail", mode); + TextureAssets.IceQueen = AssetInitializer.LoadAsset("Images\\IceQueen", mode); + TextureAssets.SantaTank = AssetInitializer.LoadAsset("Images\\SantaTank", mode); + TextureAssets.JackHat = AssetInitializer.LoadAsset("Images\\JackHat", mode); + TextureAssets.TreeFace = AssetInitializer.LoadAsset("Images\\TreeFace", mode); + TextureAssets.PumpkingFace = AssetInitializer.LoadAsset("Images\\PumpkingFace", mode); + TextureAssets.ReaperEye = AssetInitializer.LoadAsset("Images\\Reaper_Eyes", mode); + TextureAssets.MapDeath = AssetInitializer.LoadAsset("Images\\MapDeath", mode); + TextureAssets.DukeFishron = AssetInitializer.LoadAsset("Images\\DukeFishron", mode); + TextureAssets.MiniMinotaur = AssetInitializer.LoadAsset("Images\\MiniMinotaur", mode); + TextureAssets.Map = AssetInitializer.LoadAsset("Images\\Map", mode); + for (int index = 0; index < TextureAssets.MapBGs.Length; ++index) + TextureAssets.MapBGs[index] = AssetInitializer.LoadAsset("Images\\MapBG" + (object) (index + 1), mode); + TextureAssets.Hue = AssetInitializer.LoadAsset("Images\\Hue", mode); + TextureAssets.ColorSlider = AssetInitializer.LoadAsset("Images\\ColorSlider", mode); + TextureAssets.ColorBar = AssetInitializer.LoadAsset("Images\\ColorBar", mode); + TextureAssets.ColorBlip = AssetInitializer.LoadAsset("Images\\ColorBlip", mode); + TextureAssets.ColorHighlight = AssetInitializer.LoadAsset("Images\\UI\\Slider_Highlight", mode); + TextureAssets.LockOnCursor = AssetInitializer.LoadAsset("Images\\UI\\LockOn_Cursor", mode); + TextureAssets.Rain = AssetInitializer.LoadAsset("Images\\Rain", mode); + for (int index = 0; index < 301; ++index) + TextureAssets.GlowMask[index] = AssetInitializer.LoadAsset("Images\\Glow_" + (object) index, mode); + for (int index = 0; index < TextureAssets.HighlightMask.Length; ++index) + { + if (TileID.Sets.HasOutlines[index]) + TextureAssets.HighlightMask[index] = AssetInitializer.LoadAsset("Images\\Misc\\TileOutlines\\Tiles_" + (object) index, mode); + } + for (int index = 0; index < 212; ++index) + TextureAssets.Extra[index] = AssetInitializer.LoadAsset("Images\\Extra_" + (object) index, mode); + for (int index = 0; index < 4; ++index) + TextureAssets.Coin[index] = AssetInitializer.LoadAsset("Images\\Coin_" + (object) index, mode); + TextureAssets.MagicPixel = AssetInitializer.LoadAsset("Images\\MagicPixel", mode); + TextureAssets.SettingsPanel = AssetInitializer.LoadAsset("Images\\UI\\Settings_Panel", mode); + TextureAssets.SettingsPanel2 = AssetInitializer.LoadAsset("Images\\UI\\Settings_Panel_2", mode); + for (int index = 0; index < TextureAssets.XmasTree.Length; ++index) + TextureAssets.XmasTree[index] = AssetInitializer.LoadAsset("Images\\Xmas_" + (object) index, mode); + for (int index = 0; index < 6; ++index) + TextureAssets.Clothes[index] = AssetInitializer.LoadAsset("Images\\Clothes_" + (object) index, mode); + for (int index = 0; index < TextureAssets.Flames.Length; ++index) + TextureAssets.Flames[index] = AssetInitializer.LoadAsset("Images\\Flame_" + (object) index, mode); + for (int index = 0; index < 8; ++index) + TextureAssets.MapIcon[index] = AssetInitializer.LoadAsset("Images\\Map_" + (object) index, mode); + for (int index = 0; index < TextureAssets.Underworld.Length; ++index) + TextureAssets.Underworld[index] = AssetInitializer.LoadAsset("Images/Backgrounds/Underworld " + (object) index, (AssetRequestMode) 0); + TextureAssets.Dest[0] = AssetInitializer.LoadAsset("Images\\Dest1", mode); + TextureAssets.Dest[1] = AssetInitializer.LoadAsset("Images\\Dest2", mode); + TextureAssets.Dest[2] = AssetInitializer.LoadAsset("Images\\Dest3", mode); + TextureAssets.Actuator = AssetInitializer.LoadAsset("Images\\Actuator", mode); + TextureAssets.Wire = AssetInitializer.LoadAsset("Images\\Wires", mode); + TextureAssets.Wire2 = AssetInitializer.LoadAsset("Images\\Wires2", mode); + TextureAssets.Wire3 = AssetInitializer.LoadAsset("Images\\Wires3", mode); + TextureAssets.Wire4 = AssetInitializer.LoadAsset("Images\\Wires4", mode); + TextureAssets.WireNew = AssetInitializer.LoadAsset("Images\\WiresNew", mode); + TextureAssets.FlyingCarpet = AssetInitializer.LoadAsset("Images\\FlyingCarpet", mode); + TextureAssets.Hb1 = AssetInitializer.LoadAsset("Images\\HealthBar1", mode); + TextureAssets.Hb2 = AssetInitializer.LoadAsset("Images\\HealthBar2", mode); + for (int index = 0; index < TextureAssets.NpcHead.Length; ++index) + TextureAssets.NpcHead[index] = AssetInitializer.LoadAsset("Images\\NPC_Head_" + (object) index, mode); + for (int index = 0; index < TextureAssets.NpcHeadBoss.Length; ++index) + TextureAssets.NpcHeadBoss[index] = AssetInitializer.LoadAsset("Images\\NPC_Head_Boss_" + (object) index, mode); + for (int index = 1; index < TextureAssets.BackPack.Length; ++index) + TextureAssets.BackPack[index] = AssetInitializer.LoadAsset("Images\\BackPack_" + (object) index, mode); + for (int index = 1; index < 323; ++index) + TextureAssets.Buff[index] = AssetInitializer.LoadAsset("Images\\Buff_" + (object) index, mode); + Main.instance.LoadBackground(0); + Main.instance.LoadBackground(49); + TextureAssets.MinecartMount = AssetInitializer.LoadAsset("Images\\Mount_Minecart", mode); + for (int index = 0; index < TextureAssets.RudolphMount.Length; ++index) + TextureAssets.RudolphMount[index] = AssetInitializer.LoadAsset("Images\\Rudolph_" + (object) index, mode); + TextureAssets.BunnyMount = AssetInitializer.LoadAsset("Images\\Mount_Bunny", mode); + TextureAssets.PigronMount = AssetInitializer.LoadAsset("Images\\Mount_Pigron", mode); + TextureAssets.SlimeMount = AssetInitializer.LoadAsset("Images\\Mount_Slime", mode); + TextureAssets.TurtleMount = AssetInitializer.LoadAsset("Images\\Mount_Turtle", mode); + TextureAssets.UnicornMount = AssetInitializer.LoadAsset("Images\\Mount_Unicorn", mode); + TextureAssets.BasiliskMount = AssetInitializer.LoadAsset("Images\\Mount_Basilisk", mode); + TextureAssets.MinecartMechMount[0] = AssetInitializer.LoadAsset("Images\\Mount_MinecartMech", mode); + TextureAssets.MinecartMechMount[1] = AssetInitializer.LoadAsset("Images\\Mount_MinecartMechGlow", mode); + TextureAssets.CuteFishronMount[0] = AssetInitializer.LoadAsset("Images\\Mount_CuteFishron1", mode); + TextureAssets.CuteFishronMount[1] = AssetInitializer.LoadAsset("Images\\Mount_CuteFishron2", mode); + TextureAssets.MinecartWoodMount = AssetInitializer.LoadAsset("Images\\Mount_MinecartWood", mode); + TextureAssets.DesertMinecartMount = AssetInitializer.LoadAsset("Images\\Mount_MinecartDesert", mode); + TextureAssets.FishMinecartMount = AssetInitializer.LoadAsset("Images\\Mount_MinecartMineCarp", mode); + TextureAssets.BeeMount[0] = AssetInitializer.LoadAsset("Images\\Mount_Bee", mode); + TextureAssets.BeeMount[1] = AssetInitializer.LoadAsset("Images\\Mount_BeeWings", mode); + TextureAssets.UfoMount[0] = AssetInitializer.LoadAsset("Images\\Mount_UFO", mode); + TextureAssets.UfoMount[1] = AssetInitializer.LoadAsset("Images\\Mount_UFOGlow", mode); + TextureAssets.DrillMount[0] = AssetInitializer.LoadAsset("Images\\Mount_DrillRing", mode); + TextureAssets.DrillMount[1] = AssetInitializer.LoadAsset("Images\\Mount_DrillSeat", mode); + TextureAssets.DrillMount[2] = AssetInitializer.LoadAsset("Images\\Mount_DrillDiode", mode); + TextureAssets.DrillMount[3] = AssetInitializer.LoadAsset("Images\\Mount_Glow_DrillRing", mode); + TextureAssets.DrillMount[4] = AssetInitializer.LoadAsset("Images\\Mount_Glow_DrillSeat", mode); + TextureAssets.DrillMount[5] = AssetInitializer.LoadAsset("Images\\Mount_Glow_DrillDiode", mode); + TextureAssets.ScutlixMount[0] = AssetInitializer.LoadAsset("Images\\Mount_Scutlix", mode); + TextureAssets.ScutlixMount[1] = AssetInitializer.LoadAsset("Images\\Mount_ScutlixEyes", mode); + TextureAssets.ScutlixMount[2] = AssetInitializer.LoadAsset("Images\\Mount_ScutlixEyeGlow", mode); + for (int index = 0; index < TextureAssets.Gem.Length; ++index) + TextureAssets.Gem[index] = AssetInitializer.LoadAsset("Images\\Gem_" + (object) index, mode); + for (int index = 0; index < 37; ++index) + TextureAssets.Cloud[index] = AssetInitializer.LoadAsset("Images\\Cloud_" + (object) index, mode); + for (int index = 0; index < 4; ++index) + TextureAssets.Star[index] = AssetInitializer.LoadAsset("Images\\Star_" + (object) index, mode); + for (int index = 0; index < 13; ++index) + { + TextureAssets.Liquid[index] = AssetInitializer.LoadAsset("Images\\Liquid_" + (object) index, mode); + TextureAssets.LiquidSlope[index] = AssetInitializer.LoadAsset("Images\\LiquidSlope_" + (object) index, mode); + } + Main.instance.waterfallManager.LoadContent(); + TextureAssets.NpcToggle[0] = AssetInitializer.LoadAsset("Images\\House_1", mode); + TextureAssets.NpcToggle[1] = AssetInitializer.LoadAsset("Images\\House_2", mode); + TextureAssets.HbLock[0] = AssetInitializer.LoadAsset("Images\\Lock_0", mode); + TextureAssets.HbLock[1] = AssetInitializer.LoadAsset("Images\\Lock_1", mode); + TextureAssets.blockReplaceIcon[0] = AssetInitializer.LoadAsset("Images\\UI\\BlockReplace_0", mode); + TextureAssets.blockReplaceIcon[1] = AssetInitializer.LoadAsset("Images\\UI\\BlockReplace_1", mode); + TextureAssets.Grid = AssetInitializer.LoadAsset("Images\\Grid", mode); + TextureAssets.Trash = AssetInitializer.LoadAsset("Images\\Trash", mode); + TextureAssets.Cd = AssetInitializer.LoadAsset("Images\\CoolDown", mode); + TextureAssets.Logo = AssetInitializer.LoadAsset("Images\\Logo", mode); + TextureAssets.Logo2 = AssetInitializer.LoadAsset("Images\\Logo2", mode); + TextureAssets.Logo3 = AssetInitializer.LoadAsset("Images\\Logo3", mode); + TextureAssets.Logo4 = AssetInitializer.LoadAsset("Images\\Logo4", mode); + TextureAssets.Dust = AssetInitializer.LoadAsset("Images\\Dust", mode); + TextureAssets.Sun = AssetInitializer.LoadAsset("Images\\Sun", mode); + TextureAssets.Sun2 = AssetInitializer.LoadAsset("Images\\Sun2", mode); + TextureAssets.Sun3 = AssetInitializer.LoadAsset("Images\\Sun3", mode); + TextureAssets.BlackTile = AssetInitializer.LoadAsset("Images\\Black_Tile", mode); + TextureAssets.Heart = AssetInitializer.LoadAsset("Images\\Heart", mode); + TextureAssets.Heart2 = AssetInitializer.LoadAsset("Images\\Heart2", mode); + TextureAssets.Bubble = AssetInitializer.LoadAsset("Images\\Bubble", mode); + TextureAssets.Flame = AssetInitializer.LoadAsset("Images\\Flame", mode); + TextureAssets.Mana = AssetInitializer.LoadAsset("Images\\Mana", mode); + for (int index = 0; index < TextureAssets.Cursors.Length; ++index) + TextureAssets.Cursors[index] = AssetInitializer.LoadAsset("Images\\UI\\Cursor_" + (object) index, mode); + TextureAssets.CursorRadial = AssetInitializer.LoadAsset("Images\\UI\\Radial", mode); + TextureAssets.Ninja = AssetInitializer.LoadAsset("Images\\Ninja", mode); + TextureAssets.AntLion = AssetInitializer.LoadAsset("Images\\AntlionBody", mode); + TextureAssets.SpikeBase = AssetInitializer.LoadAsset("Images\\Spike_Base", mode); + TextureAssets.Wood[0] = AssetInitializer.LoadAsset("Images\\Tiles_5_0", mode); + TextureAssets.Wood[1] = AssetInitializer.LoadAsset("Images\\Tiles_5_1", mode); + TextureAssets.Wood[2] = AssetInitializer.LoadAsset("Images\\Tiles_5_2", mode); + TextureAssets.Wood[3] = AssetInitializer.LoadAsset("Images\\Tiles_5_3", mode); + TextureAssets.Wood[4] = AssetInitializer.LoadAsset("Images\\Tiles_5_4", mode); + TextureAssets.Wood[5] = AssetInitializer.LoadAsset("Images\\Tiles_5_5", mode); + TextureAssets.Wood[6] = AssetInitializer.LoadAsset("Images\\Tiles_5_6", mode); + TextureAssets.SmileyMoon = AssetInitializer.LoadAsset("Images\\Moon_Smiley", mode); + TextureAssets.PumpkinMoon = AssetInitializer.LoadAsset("Images\\Moon_Pumpkin", mode); + TextureAssets.SnowMoon = AssetInitializer.LoadAsset("Images\\Moon_Snow", mode); + for (int index = 0; index < TextureAssets.Moon.Length; ++index) + TextureAssets.Moon[index] = AssetInitializer.LoadAsset("Images\\Moon_" + (object) index, mode); + for (int index = 0; index < TextureAssets.TreeTop.Length; ++index) + TextureAssets.TreeTop[index] = AssetInitializer.LoadAsset("Images\\Tree_Tops_" + (object) index, mode); + for (int index = 0; index < TextureAssets.TreeBranch.Length; ++index) + TextureAssets.TreeBranch[index] = AssetInitializer.LoadAsset("Images\\Tree_Branches_" + (object) index, mode); + TextureAssets.ShroomCap = AssetInitializer.LoadAsset("Images\\Shroom_Tops", mode); + TextureAssets.InventoryBack = AssetInitializer.LoadAsset("Images\\Inventory_Back", mode); + TextureAssets.InventoryBack2 = AssetInitializer.LoadAsset("Images\\Inventory_Back2", mode); + TextureAssets.InventoryBack3 = AssetInitializer.LoadAsset("Images\\Inventory_Back3", mode); + TextureAssets.InventoryBack4 = AssetInitializer.LoadAsset("Images\\Inventory_Back4", mode); + TextureAssets.InventoryBack5 = AssetInitializer.LoadAsset("Images\\Inventory_Back5", mode); + TextureAssets.InventoryBack6 = AssetInitializer.LoadAsset("Images\\Inventory_Back6", mode); + TextureAssets.InventoryBack7 = AssetInitializer.LoadAsset("Images\\Inventory_Back7", mode); + TextureAssets.InventoryBack8 = AssetInitializer.LoadAsset("Images\\Inventory_Back8", mode); + TextureAssets.InventoryBack9 = AssetInitializer.LoadAsset("Images\\Inventory_Back9", mode); + TextureAssets.InventoryBack10 = AssetInitializer.LoadAsset("Images\\Inventory_Back10", mode); + TextureAssets.InventoryBack11 = AssetInitializer.LoadAsset("Images\\Inventory_Back11", mode); + TextureAssets.InventoryBack12 = AssetInitializer.LoadAsset("Images\\Inventory_Back12", mode); + TextureAssets.InventoryBack13 = AssetInitializer.LoadAsset("Images\\Inventory_Back13", mode); + TextureAssets.InventoryBack14 = AssetInitializer.LoadAsset("Images\\Inventory_Back14", mode); + TextureAssets.InventoryBack15 = AssetInitializer.LoadAsset("Images\\Inventory_Back15", mode); + TextureAssets.InventoryBack16 = AssetInitializer.LoadAsset("Images\\Inventory_Back16", mode); + TextureAssets.InventoryBack17 = AssetInitializer.LoadAsset("Images\\Inventory_Back17", mode); + TextureAssets.InventoryBack18 = AssetInitializer.LoadAsset("Images\\Inventory_Back18", mode); + TextureAssets.HairStyleBack = AssetInitializer.LoadAsset("Images\\HairStyleBack", mode); + TextureAssets.ClothesStyleBack = AssetInitializer.LoadAsset("Images\\ClothesStyleBack", mode); + TextureAssets.InventoryTickOff = AssetInitializer.LoadAsset("Images\\Inventory_Tick_Off", mode); + TextureAssets.InventoryTickOn = AssetInitializer.LoadAsset("Images\\Inventory_Tick_On", mode); + TextureAssets.TextBack = AssetInitializer.LoadAsset("Images\\Text_Back", mode); + TextureAssets.Chat = AssetInitializer.LoadAsset("Images\\Chat", mode); + TextureAssets.Chat2 = AssetInitializer.LoadAsset("Images\\Chat2", mode); + TextureAssets.ChatBack = AssetInitializer.LoadAsset("Images\\Chat_Back", mode); + TextureAssets.Team = AssetInitializer.LoadAsset("Images\\Team", mode); + PlayerDataInitializer.Load(); + TextureAssets.Chaos = AssetInitializer.LoadAsset("Images\\Chaos", mode); + TextureAssets.EyeLaser = AssetInitializer.LoadAsset("Images\\Eye_Laser", mode); + TextureAssets.BoneEyes = AssetInitializer.LoadAsset("Images\\Bone_Eyes", mode); + TextureAssets.BoneLaser = AssetInitializer.LoadAsset("Images\\Bone_Laser", mode); + TextureAssets.LightDisc = AssetInitializer.LoadAsset("Images\\Light_Disc", mode); + TextureAssets.Confuse = AssetInitializer.LoadAsset("Images\\Confuse", mode); + TextureAssets.Probe = AssetInitializer.LoadAsset("Images\\Probe", mode); + TextureAssets.SunOrb = AssetInitializer.LoadAsset("Images\\SunOrb", mode); + TextureAssets.SunAltar = AssetInitializer.LoadAsset("Images\\SunAltar", mode); + TextureAssets.XmasLight = AssetInitializer.LoadAsset("Images\\XmasLight", mode); + TextureAssets.Beetle = AssetInitializer.LoadAsset("Images\\BeetleOrb", mode); + for (int index = 0; index < 17; ++index) + TextureAssets.Chains[index] = AssetInitializer.LoadAsset("Images\\Chains_" + (object) index, mode); + TextureAssets.Chain20 = AssetInitializer.LoadAsset("Images\\Chain20", mode); + TextureAssets.FishingLine = AssetInitializer.LoadAsset("Images\\FishingLine", mode); + TextureAssets.Chain = AssetInitializer.LoadAsset("Images\\Chain", mode); + TextureAssets.Chain2 = AssetInitializer.LoadAsset("Images\\Chain2", mode); + TextureAssets.Chain3 = AssetInitializer.LoadAsset("Images\\Chain3", mode); + TextureAssets.Chain4 = AssetInitializer.LoadAsset("Images\\Chain4", mode); + TextureAssets.Chain5 = AssetInitializer.LoadAsset("Images\\Chain5", mode); + TextureAssets.Chain6 = AssetInitializer.LoadAsset("Images\\Chain6", mode); + TextureAssets.Chain7 = AssetInitializer.LoadAsset("Images\\Chain7", mode); + TextureAssets.Chain8 = AssetInitializer.LoadAsset("Images\\Chain8", mode); + TextureAssets.Chain9 = AssetInitializer.LoadAsset("Images\\Chain9", mode); + TextureAssets.Chain10 = AssetInitializer.LoadAsset("Images\\Chain10", mode); + TextureAssets.Chain11 = AssetInitializer.LoadAsset("Images\\Chain11", mode); + TextureAssets.Chain12 = AssetInitializer.LoadAsset("Images\\Chain12", mode); + TextureAssets.Chain13 = AssetInitializer.LoadAsset("Images\\Chain13", mode); + TextureAssets.Chain14 = AssetInitializer.LoadAsset("Images\\Chain14", mode); + TextureAssets.Chain15 = AssetInitializer.LoadAsset("Images\\Chain15", mode); + TextureAssets.Chain16 = AssetInitializer.LoadAsset("Images\\Chain16", mode); + TextureAssets.Chain17 = AssetInitializer.LoadAsset("Images\\Chain17", mode); + TextureAssets.Chain18 = AssetInitializer.LoadAsset("Images\\Chain18", mode); + TextureAssets.Chain19 = AssetInitializer.LoadAsset("Images\\Chain19", mode); + TextureAssets.Chain20 = AssetInitializer.LoadAsset("Images\\Chain20", mode); + TextureAssets.Chain21 = AssetInitializer.LoadAsset("Images\\Chain21", mode); + TextureAssets.Chain22 = AssetInitializer.LoadAsset("Images\\Chain22", mode); + TextureAssets.Chain23 = AssetInitializer.LoadAsset("Images\\Chain23", mode); + TextureAssets.Chain24 = AssetInitializer.LoadAsset("Images\\Chain24", mode); + TextureAssets.Chain25 = AssetInitializer.LoadAsset("Images\\Chain25", mode); + TextureAssets.Chain26 = AssetInitializer.LoadAsset("Images\\Chain26", mode); + TextureAssets.Chain27 = AssetInitializer.LoadAsset("Images\\Chain27", mode); + TextureAssets.Chain28 = AssetInitializer.LoadAsset("Images\\Chain28", mode); + TextureAssets.Chain29 = AssetInitializer.LoadAsset("Images\\Chain29", mode); + TextureAssets.Chain30 = AssetInitializer.LoadAsset("Images\\Chain30", mode); + TextureAssets.Chain31 = AssetInitializer.LoadAsset("Images\\Chain31", mode); + TextureAssets.Chain32 = AssetInitializer.LoadAsset("Images\\Chain32", mode); + TextureAssets.Chain33 = AssetInitializer.LoadAsset("Images\\Chain33", mode); + TextureAssets.Chain34 = AssetInitializer.LoadAsset("Images\\Chain34", mode); + TextureAssets.Chain35 = AssetInitializer.LoadAsset("Images\\Chain35", mode); + TextureAssets.Chain36 = AssetInitializer.LoadAsset("Images\\Chain36", mode); + TextureAssets.Chain37 = AssetInitializer.LoadAsset("Images\\Chain37", mode); + TextureAssets.Chain38 = AssetInitializer.LoadAsset("Images\\Chain38", mode); + TextureAssets.Chain39 = AssetInitializer.LoadAsset("Images\\Chain39", mode); + TextureAssets.Chain40 = AssetInitializer.LoadAsset("Images\\Chain40", mode); + TextureAssets.Chain41 = AssetInitializer.LoadAsset("Images\\Chain41", mode); + TextureAssets.Chain42 = AssetInitializer.LoadAsset("Images\\Chain42", mode); + TextureAssets.Chain43 = AssetInitializer.LoadAsset("Images\\Chain43", mode); + TextureAssets.EyeLaserSmall = AssetInitializer.LoadAsset("Images\\Eye_Laser_Small", mode); + TextureAssets.BoneArm = AssetInitializer.LoadAsset("Images\\Arm_Bone", mode); + TextureAssets.PumpkingArm = AssetInitializer.LoadAsset("Images\\PumpkingArm", mode); + TextureAssets.PumpkingCloak = AssetInitializer.LoadAsset("Images\\PumpkingCloak", mode); + TextureAssets.BoneArm2 = AssetInitializer.LoadAsset("Images\\Arm_Bone_2", mode); + for (int index = 1; index < TextureAssets.GemChain.Length; ++index) + TextureAssets.GemChain[index] = AssetInitializer.LoadAsset("Images\\GemChain_" + (object) index, mode); + for (int index = 1; index < TextureAssets.Golem.Length; ++index) + TextureAssets.Golem[index] = AssetInitializer.LoadAsset("Images\\GolemLights" + (object) index, mode); + TextureAssets.GolfSwingBarFill = AssetInitializer.LoadAsset("Images\\UI\\GolfSwingBarFill", mode); + TextureAssets.GolfSwingBarPanel = AssetInitializer.LoadAsset("Images\\UI\\GolfSwingBarPanel", mode); + TextureAssets.SpawnPoint = AssetInitializer.LoadAsset("Images\\UI\\SpawnPoint", mode); + TextureAssets.SpawnBed = AssetInitializer.LoadAsset("Images\\UI\\SpawnBed", mode); + TextureAssets.MapPing = AssetInitializer.LoadAsset("Images\\UI\\MapPing", mode); + TextureAssets.GolfBallArrow = AssetInitializer.LoadAsset("Images\\UI\\GolfBall_Arrow", mode); + TextureAssets.GolfBallArrowShadow = AssetInitializer.LoadAsset("Images\\UI\\GolfBall_Arrow_Shadow", mode); + TextureAssets.GolfBallOutline = AssetInitializer.LoadAsset("Images\\Misc\\GolfBallOutline", mode); + AssetInitializer.LoadMinimapFrames(mode); + AssetInitializer.LoadPlayerResourceSets(mode); + Main.AchievementAdvisor.LoadContent(); + } + + private static void LoadMinimapFrames(AssetRequestMode mode) + { + float num1 = 2f; + float num2 = 6f; + AssetInitializer.LoadMinimap("Default", new Vector2(-8f, -15f), new Vector2(148f + num1, 234f + num2), new Vector2(200f + num1, 234f + num2), new Vector2(174f + num1, 234f + num2), mode); + AssetInitializer.LoadMinimap("Golden", new Vector2(-10f, -10f), new Vector2(136f, 248f), new Vector2(96f, 248f), new Vector2(116f, 248f), mode); + AssetInitializer.LoadMinimap("Remix", new Vector2(-10f, -10f), new Vector2(200f, 234f), new Vector2(148f, 234f), new Vector2(174f, 234f), mode); + AssetInitializer.LoadMinimap("Sticks", new Vector2(-10f, -10f), new Vector2(148f, 234f), new Vector2(200f, 234f), new Vector2(174f, 234f), mode); + AssetInitializer.LoadMinimap("StoneGold", new Vector2(-15f, -15f), new Vector2(220f, 244f), new Vector2(244f, 188f), new Vector2(244f, 216f), mode); + AssetInitializer.LoadMinimap("TwigLeaf", new Vector2(-20f, -20f), new Vector2(206f, 242f), new Vector2(162f, 242f), new Vector2(184f, 242f), mode); + AssetInitializer.LoadMinimap("Leaf", new Vector2(-20f, -20f), new Vector2(212f, 244f), new Vector2(168f, 246f), new Vector2(190f, 246f), mode); + AssetInitializer.LoadMinimap("Retro", new Vector2(-10f, -10f), new Vector2(150f, 236f), new Vector2(202f, 236f), new Vector2(176f, 236f), mode); + AssetInitializer.LoadMinimap("Valkyrie", new Vector2(-10f, -10f), new Vector2(154f, 242f), new Vector2(206f, 240f), new Vector2(180f, 244f), mode); + string frameName = Main.Configuration.Get("MinimapFrame", "Default"); + Main.ActiveMinimapFrame = Main.MinimapFrames.FirstOrDefault>((Func, bool>) (pair => pair.Key == frameName)).Value; + if (Main.ActiveMinimapFrame == null) + Main.ActiveMinimapFrame = Main.MinimapFrames.Values.First(); + Main.Configuration.OnSave += new Action(AssetInitializer.Configuration_OnSave_MinimapFrame); + } + + private static void Configuration_OnSave_MinimapFrame(Preferences obj) + { + string str = Main.MinimapFrames.FirstOrDefault>((Func, bool>) (pair => pair.Value == Main.ActiveMinimapFrame)).Key ?? "Default"; + obj.Put("MinimapFrame", (object) str); + } + + private static void LoadMinimap( + string name, + Vector2 frameOffset, + Vector2 resetPosition, + Vector2 zoomInPosition, + Vector2 zoomOutPosition, + AssetRequestMode mode) + { + MinimapFrame minimapFrame = new MinimapFrame(AssetInitializer.LoadAsset("Images\\UI\\Minimap\\" + name + "\\MinimapFrame", mode), frameOffset); + minimapFrame.SetResetButton(AssetInitializer.LoadAsset("Images\\UI\\Minimap\\" + name + "\\MinimapButton_Reset", mode), resetPosition); + minimapFrame.SetZoomOutButton(AssetInitializer.LoadAsset("Images\\UI\\Minimap\\" + name + "\\MinimapButton_ZoomOut", mode), zoomOutPosition); + minimapFrame.SetZoomInButton(AssetInitializer.LoadAsset("Images\\UI\\Minimap\\" + name + "\\MinimapButton_ZoomIn", mode), zoomInPosition); + Main.MinimapFrames[name] = minimapFrame; + } + + private static void LoadPlayerResourceSets(AssetRequestMode mode) + { + Main.PlayerResourcesSets["Default"] = (IPlayerResourcesDisplaySet) new ClassicPlayerResourcesDisplaySet(); + Main.PlayerResourcesSets["New"] = (IPlayerResourcesDisplaySet) new FancyClassicPlayerResourcesDisplaySet("FancyClassic", mode); + Main.PlayerResourcesSets["HorizontalBars"] = (IPlayerResourcesDisplaySet) new HorizontalBarsPlayerReosurcesDisplaySet("HorizontalBars", mode); + string frameName = Main.Configuration.Get("PlayerResourcesSet", "New"); + Main.ActivePlayerResourcesSet = Main.PlayerResourcesSets.FirstOrDefault>((Func, bool>) (pair => pair.Key == frameName)).Value; + if (Main.ActivePlayerResourcesSet == null) + Main.ActivePlayerResourcesSet = Main.PlayerResourcesSets.Values.First(); + Main.Configuration.OnSave += new Action(AssetInitializer.Configuration_OnSave_PlayerResourcesSet); + } + + private static void Configuration_OnSave_PlayerResourcesSet(Preferences obj) + { + string str = Main.PlayerResourcesSets.FirstOrDefault>((Func, bool>) (pair => pair.Value == Main.ActivePlayerResourcesSet)).Key ?? "New"; + obj.Put("PlayerResourcesSet", (object) str); + } + + private static Asset LoadAsset(string assetName, AssetRequestMode mode) where T : class => Main.Assets.Request(assetName, mode); + } +} diff --git a/Initializers/ChatInitializer.cs b/Initializers/ChatInitializer.cs new file mode 100644 index 0000000..828a2cd --- /dev/null +++ b/Initializers/ChatInitializer.cs @@ -0,0 +1,33 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Initializers.ChatInitializer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.Chat.Commands; +using Terraria.GameContent.UI; +using Terraria.GameContent.UI.Chat; +using Terraria.Localization; +using Terraria.UI.Chat; + +namespace Terraria.Initializers +{ + public static class ChatInitializer + { + public static void Load() + { + ChatManager.Register("c", "color"); + ChatManager.Register("i", "item"); + ChatManager.Register("n", "name"); + ChatManager.Register("a", "achievement"); + ChatManager.Register("g", "glyph"); + ChatManager.Commands.AddCommand().AddCommand().AddCommand().AddCommand().AddCommand().AddCommand().AddCommand().AddDefaultCommand(); + for (int index = 0; index < 145; ++index) + { + string name = EmoteID.Search.GetName(index); + string key = "EmojiCommand." + name; + ChatManager.Commands.AddAlias(Language.GetText(key), NetworkText.FromFormattable("{0} {1}", (object) Language.GetText("ChatCommand.Emoji_1"), (object) Language.GetText("EmojiName." + name))); + } + } + } +} diff --git a/Initializers/ChromaInitializer.cs b/Initializers/ChromaInitializer.cs new file mode 100644 index 0000000..2e24814 --- /dev/null +++ b/Initializers/ChromaInitializer.cs @@ -0,0 +1,161 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Initializers.ChromaInitializer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Graphics; +using ReLogic.Peripherals.RGB; +using ReLogic.Peripherals.RGB.Corsair; +using ReLogic.Peripherals.RGB.Logitech; +using ReLogic.Peripherals.RGB.Razer; +using System; +using System.Diagnostics; +using Terraria.GameContent.RGB; +using Terraria.Graphics.Effects; +using Terraria.IO; + +namespace Terraria.Initializers +{ + public static class ChromaInitializer + { + private static ChromaEngine _engine; + + private static void AddDevices() + { + VendorColorProfile razerColorProfile = Main.Configuration.Get("RazerColorProfile", new VendorColorProfile(new Vector3(1f, 0.765f, 0.568f))); + VendorColorProfile corsairColorProfile = Main.Configuration.Get("CorsairColorProfile", new VendorColorProfile()); + VendorColorProfile logitechColorProfile = Main.Configuration.Get("LogitechColorProfile", new VendorColorProfile()); + ChromaInitializer._engine.AddDeviceGroup("Razer", (RgbDeviceGroup) new RazerDeviceGroup(razerColorProfile)); + ChromaInitializer._engine.AddDeviceGroup("Corsair", (RgbDeviceGroup) new CorsairDeviceGroup(corsairColorProfile)); + ChromaInitializer._engine.AddDeviceGroup("Logitech", (RgbDeviceGroup) new LogitechDeviceGroup(logitechColorProfile)); + bool useRazer = Main.Configuration.Get("UseRazerRGB", true); + bool useCorsair = Main.Configuration.Get("UseCorsairRGB", true); + bool useLogitech = Main.Configuration.Get("UseLogitechRGB", true); + float rgbUpdateRate = Main.Configuration.Get("RGBUpdatesPerSecond", 45f); + if ((double) rgbUpdateRate <= 1.0000000116861E-07) + rgbUpdateRate = 45f; + ChromaInitializer._engine.FrameTimeInSeconds = 1f / rgbUpdateRate; + Main.Configuration.OnSave += (Action) (config => + { + config.Put("UseRazerRGB", (object) useRazer); + config.Put("UseCorsairRGB", (object) useCorsair); + config.Put("UseLogitechRGB", (object) useLogitech); + config.Put("RazerColorProfile", (object) razerColorProfile); + config.Put("CorsairColorProfile", (object) corsairColorProfile); + config.Put("LogitechColorProfile", (object) logitechColorProfile); + config.Put("RGBUpdatesPerSecond", (object) rgbUpdateRate); + }); + if (useRazer) + ChromaInitializer._engine.EnableDeviceGroup("Razer"); + if (useCorsair) + ChromaInitializer._engine.EnableDeviceGroup("Corsair"); + if (useLogitech) + ChromaInitializer._engine.EnableDeviceGroup("Logitech"); + AppDomain.CurrentDomain.ProcessExit += new EventHandler(ChromaInitializer.OnProcessExit); + } + + private static void OnProcessExit(object sender, EventArgs e) => ChromaInitializer._engine.DisableAllDeviceGroups(); + + public static void Load() + { + ChromaInitializer._engine = Main.Chroma; + ChromaInitializer.AddDevices(); + Color color = new Color(46, 23, 12); + ChromaInitializer.RegisterShader("Base", (ChromaShader) new SurfaceBiomeShader(Color.Green, color), CommonConditions.InMenu, (ShaderLayer) 9); + ChromaInitializer.RegisterShader("Surface Mushroom", (ChromaShader) new SurfaceBiomeShader(Color.DarkBlue, new Color(33, 31, 27)), CommonConditions.DrunkMenu, (ShaderLayer) 9); + ChromaInitializer.RegisterShader("Sky", (ChromaShader) new SkyShader(new Color(34, 51, 128), new Color(5, 5, 5)), CommonConditions.Depth.Sky, (ShaderLayer) 1); + ChromaInitializer.RegisterShader("Surface", (ChromaShader) new SurfaceBiomeShader(Color.Green, color), CommonConditions.Depth.Surface, (ShaderLayer) 1); + ChromaInitializer.RegisterShader("Vines", (ChromaShader) new VineShader(), CommonConditions.Depth.Vines, (ShaderLayer) 1); + ChromaInitializer.RegisterShader("Underground", (ChromaShader) new CavernShader(new Color(122, 62, 32), new Color(25, 13, 7), 0.5f), CommonConditions.Depth.Underground, (ShaderLayer) 1); + ChromaInitializer.RegisterShader("Caverns", (ChromaShader) new CavernShader(color, new Color(25, 25, 25), 0.5f), CommonConditions.Depth.Caverns, (ShaderLayer) 1); + ChromaInitializer.RegisterShader("Magma", (ChromaShader) new CavernShader(new Color(181, 17, 0), new Color(25, 25, 25), 0.5f), CommonConditions.Depth.Magma, (ShaderLayer) 1); + ChromaInitializer.RegisterShader("Underworld", (ChromaShader) new UnderworldShader(Color.Red, new Color(1f, 0.5f, 0.0f), 1f), CommonConditions.Depth.Underworld, (ShaderLayer) 1); + ChromaInitializer.RegisterShader("Surface Desert", (ChromaShader) new SurfaceBiomeShader(new Color(84, 49, 0), new Color(245, 225, 33)), CommonConditions.SurfaceBiome.Desert, (ShaderLayer) 2); + ChromaInitializer.RegisterShader("Surface Jungle", (ChromaShader) new SurfaceBiomeShader(Color.Green, Color.Teal), CommonConditions.SurfaceBiome.Jungle, (ShaderLayer) 2); + ChromaInitializer.RegisterShader("Surface Ocean", (ChromaShader) new SurfaceBiomeShader(Color.SkyBlue, Color.Blue), CommonConditions.SurfaceBiome.Ocean, (ShaderLayer) 2); + ChromaInitializer.RegisterShader("Surface Snow", (ChromaShader) new SurfaceBiomeShader(new Color(0, 10, 50), new Color(0.5f, 0.75f, 1f)), CommonConditions.SurfaceBiome.Snow, (ShaderLayer) 2); + ChromaInitializer.RegisterShader("Surface Mushroom", (ChromaShader) new SurfaceBiomeShader(Color.DarkBlue, new Color(33, 31, 27)), CommonConditions.SurfaceBiome.Mushroom, (ShaderLayer) 2); + ChromaInitializer.RegisterShader("Surface Hallow", (ChromaShader) new HallowSurfaceShader(), CommonConditions.SurfaceBiome.Hallow, (ShaderLayer) 3); + ChromaInitializer.RegisterShader("Surface Crimson", (ChromaShader) new CorruptSurfaceShader(Color.Red, new Color(25, 25, 40)), CommonConditions.SurfaceBiome.Crimson, (ShaderLayer) 3); + ChromaInitializer.RegisterShader("Surface Corruption", (ChromaShader) new CorruptSurfaceShader(new Color(73, 0, (int) byte.MaxValue), new Color(15, 15, 27)), CommonConditions.SurfaceBiome.Corruption, (ShaderLayer) 3); + ChromaInitializer.RegisterShader("Hive", (ChromaShader) new DrippingShader(new Color(0.05f, 0.01f, 0.0f), new Color((int) byte.MaxValue, 150, 0), 0.5f), CommonConditions.UndergroundBiome.Hive, (ShaderLayer) 3); + ChromaInitializer.RegisterShader("Underground Mushroom", (ChromaShader) new UndergroundMushroomShader(), CommonConditions.UndergroundBiome.Mushroom, (ShaderLayer) 2); + ChromaInitializer.RegisterShader("Underground Corrutpion", (ChromaShader) new UndergroundCorruptionShader(), CommonConditions.UndergroundBiome.Corrupt, (ShaderLayer) 2); + ChromaInitializer.RegisterShader("Underground Crimson", (ChromaShader) new DrippingShader(new Color(0.05f, 0.0f, 0.0f), new Color((int) byte.MaxValue, 0, 0)), CommonConditions.UndergroundBiome.Crimson, (ShaderLayer) 2); + ChromaInitializer.RegisterShader("Underground Hallow", (ChromaShader) new UndergroundHallowShader(), CommonConditions.UndergroundBiome.Hallow, (ShaderLayer) 2); + ChromaInitializer.RegisterShader("Meteorite", (ChromaShader) new MeteoriteShader(), CommonConditions.MiscBiome.Meteorite, (ShaderLayer) 3); + ChromaInitializer.RegisterShader("Temple", (ChromaShader) new TempleShader(), CommonConditions.UndergroundBiome.Temple, (ShaderLayer) 3); + ChromaInitializer.RegisterShader("Dungeon", (ChromaShader) new DungeonShader(), CommonConditions.UndergroundBiome.Dungeon, (ShaderLayer) 3); + ChromaInitializer.RegisterShader("Granite", (ChromaShader) new CavernShader(new Color(14, 19, 46), new Color(5, 0, 30), 0.5f), CommonConditions.UndergroundBiome.Granite, (ShaderLayer) 3); + ChromaInitializer.RegisterShader("Marble", (ChromaShader) new CavernShader(new Color(100, 100, 100), new Color(20, 20, 20), 0.5f), CommonConditions.UndergroundBiome.Marble, (ShaderLayer) 3); + ChromaInitializer.RegisterShader("Gem Cave", (ChromaShader) new GemCaveShader(color, new Color(25, 25, 25)), CommonConditions.UndergroundBiome.GemCave, (ShaderLayer) 3); + ChromaInitializer.RegisterShader("Underground Jungle", (ChromaShader) new JungleShader(), CommonConditions.UndergroundBiome.Jungle, (ShaderLayer) 2); + ChromaInitializer.RegisterShader("Underground Ice", (ChromaShader) new IceShader(new Color(0, 10, 50), new Color(0.5f, 0.75f, 1f)), CommonConditions.UndergroundBiome.Ice, (ShaderLayer) 2); + ChromaInitializer.RegisterShader("Corrupt Ice", (ChromaShader) new IceShader(new Color(5, 0, 25), new Color(152, 102, (int) byte.MaxValue)), CommonConditions.UndergroundBiome.CorruptIce, (ShaderLayer) 3); + ChromaInitializer.RegisterShader("Crimson Ice", (ChromaShader) new IceShader(new Color(0.1f, 0.0f, 0.0f), new Color(1f, 0.45f, 0.4f)), CommonConditions.UndergroundBiome.CrimsonIce, (ShaderLayer) 3); + ChromaInitializer.RegisterShader("Hallow Ice", (ChromaShader) new IceShader(new Color(0.2f, 0.0f, 0.1f), new Color(1f, 0.7f, 0.7f)), CommonConditions.UndergroundBiome.HallowIce, (ShaderLayer) 3); + ChromaInitializer.RegisterShader("Underground Desert", (ChromaShader) new DesertShader(new Color(60, 10, 0), new Color((int) byte.MaxValue, 165, 0)), CommonConditions.UndergroundBiome.Desert, (ShaderLayer) 2); + ChromaInitializer.RegisterShader("Corrupt Desert", (ChromaShader) new DesertShader(new Color(15, 0, 15), new Color(116, 103, (int) byte.MaxValue)), CommonConditions.UndergroundBiome.CorruptDesert, (ShaderLayer) 3); + ChromaInitializer.RegisterShader("Crimson Desert", (ChromaShader) new DesertShader(new Color(20, 10, 0), new Color(195, 0, 0)), CommonConditions.UndergroundBiome.CrimsonDesert, (ShaderLayer) 3); + ChromaInitializer.RegisterShader("Hallow Desert", (ChromaShader) new DesertShader(new Color(29, 0, 56), new Color((int) byte.MaxValue, 221, (int) byte.MaxValue)), CommonConditions.UndergroundBiome.HallowDesert, (ShaderLayer) 3); + ChromaInitializer.RegisterShader("Pumpkin Moon", (ChromaShader) new MoonShader(new Color(13, 0, 26), Color.Orange), CommonConditions.Events.PumpkinMoon, (ShaderLayer) 4); + ChromaInitializer.RegisterShader("Blood Moon", (ChromaShader) new MoonShader(new Color(10, 0, 0), Color.Red, Color.Red, new Color((int) byte.MaxValue, 150, 125)), CommonConditions.Events.BloodMoon, (ShaderLayer) 4); + ChromaInitializer.RegisterShader("Frost Moon", (ChromaShader) new MoonShader(new Color(0, 4, 13), new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue)), CommonConditions.Events.FrostMoon, (ShaderLayer) 4); + ChromaInitializer.RegisterShader("Solar Eclipse", (ChromaShader) new MoonShader(new Color(0.02f, 0.02f, 0.02f), Color.Orange, Color.Black), CommonConditions.Events.SolarEclipse, (ShaderLayer) 4); + ChromaInitializer.RegisterShader("Pirate Invasion", (ChromaShader) new PirateInvasionShader(new Color(173, 173, 173), new Color(101, 101, (int) byte.MaxValue), Color.Blue, Color.Black), CommonConditions.Events.PirateInvasion, (ShaderLayer) 4); + ChromaInitializer.RegisterShader("DD2 Event", (ChromaShader) new DD2Shader(new Color(222, 94, 245), Color.White), CommonConditions.Events.DD2Event, (ShaderLayer) 4); + ChromaInitializer.RegisterShader("Goblin Army", (ChromaShader) new GoblinArmyShader(new Color(14, 0, 79), new Color(176, 0, 144)), CommonConditions.Events.GoblinArmy, (ShaderLayer) 4); + ChromaInitializer.RegisterShader("Frost Legion", (ChromaShader) new FrostLegionShader(Color.White, new Color(27, 80, 201)), CommonConditions.Events.FrostLegion, (ShaderLayer) 4); + ChromaInitializer.RegisterShader("Martian Madness", (ChromaShader) new MartianMadnessShader(new Color(64, 64, 64), new Color(64, 113, 122), new Color((int) byte.MaxValue, (int) byte.MaxValue, 0), new Color(3, 3, 18)), CommonConditions.Events.MartianMadness, (ShaderLayer) 4); + ChromaInitializer.RegisterShader("Solar Pillar", (ChromaShader) new PillarShader(Color.Red, Color.Orange), CommonConditions.Events.SolarPillar, (ShaderLayer) 4); + ChromaInitializer.RegisterShader("Nebula Pillar", (ChromaShader) new PillarShader(new Color((int) byte.MaxValue, 144, 209), new Color(100, 0, 76)), CommonConditions.Events.NebulaPillar, (ShaderLayer) 4); + ChromaInitializer.RegisterShader("Vortex Pillar", (ChromaShader) new PillarShader(Color.Green, Color.Black), CommonConditions.Events.VortexPillar, (ShaderLayer) 4); + ChromaInitializer.RegisterShader("Stardust Pillar", (ChromaShader) new PillarShader(new Color(46, 63, (int) byte.MaxValue), Color.White), CommonConditions.Events.StardustPillar, (ShaderLayer) 4); + ChromaInitializer.RegisterShader("Eater of Worlds", (ChromaShader) new WormShader(new Color(14, 0, 15), new Color(47, 51, 59), new Color(20, 25, 11)), CommonConditions.Boss.EaterOfWorlds, (ShaderLayer) 5); + ChromaInitializer.RegisterShader("Eye of Cthulhu", (ChromaShader) new EyeOfCthulhuShader(new Color(145, 145, 126), new Color(138, 0, 0), new Color(3, 3, 18)), CommonConditions.Boss.EyeOfCthulhu, (ShaderLayer) 5); + ChromaInitializer.RegisterShader("Skeletron", (ChromaShader) new SkullShader(new Color(110, 92, 47), new Color(36, 32, 51), new Color(0, 0, 0)), CommonConditions.Boss.Skeletron, (ShaderLayer) 5); + ChromaInitializer.RegisterShader("Brain Of Cthulhu", (ChromaShader) new BrainShader(new Color(54, 0, 0), new Color(186, 137, 139)), CommonConditions.Boss.BrainOfCthulhu, (ShaderLayer) 5); + ChromaInitializer.RegisterShader("Empress of Light", (ChromaShader) new EmpressShader(), CommonConditions.Boss.Empress, (ShaderLayer) 5); + ChromaInitializer.RegisterShader("Queen Slime", (ChromaShader) new QueenSlimeShader(new Color(72, 41, 130), new Color(126, 220, (int) byte.MaxValue)), CommonConditions.Boss.QueenSlime, (ShaderLayer) 5); + ChromaInitializer.RegisterShader("King Slime", (ChromaShader) new KingSlimeShader(new Color(41, 70, 130), Color.White), CommonConditions.Boss.KingSlime, (ShaderLayer) 5); + ChromaInitializer.RegisterShader("Queen Bee", (ChromaShader) new QueenBeeShader(new Color(5, 5, 0), new Color((int) byte.MaxValue, 235, 0)), CommonConditions.Boss.QueenBee, (ShaderLayer) 5); + ChromaInitializer.RegisterShader("Wall of Flesh", (ChromaShader) new WallOfFleshShader(new Color(112, 48, 60), new Color(5, 0, 0)), CommonConditions.Boss.WallOfFlesh, (ShaderLayer) 5); + ChromaInitializer.RegisterShader("Destroyer", (ChromaShader) new WormShader(new Color(25, 25, 25), new Color(192, 0, 0), new Color(10, 0, 0)), CommonConditions.Boss.Destroyer, (ShaderLayer) 5); + ChromaInitializer.RegisterShader("Skeletron Prime", (ChromaShader) new SkullShader(new Color(110, 92, 47), new Color(79, 0, 0), new Color((int) byte.MaxValue, 29, 0)), CommonConditions.Boss.SkeletronPrime, (ShaderLayer) 5); + ChromaInitializer.RegisterShader("The Twins", (ChromaShader) new TwinsShader(new Color(145, 145, 126), new Color(138, 0, 0), new Color(138, 0, 0), new Color(20, 20, 20), new Color(65, 140, 0), new Color(3, 3, 18)), CommonConditions.Boss.TheTwins, (ShaderLayer) 5); + ChromaInitializer.RegisterShader("Duke Fishron", (ChromaShader) new DukeFishronShader(new Color(0, 0, 122), new Color(100, 254, 194)), CommonConditions.Boss.DukeFishron, (ShaderLayer) 5); + ChromaInitializer.RegisterShader("Plantera", (ChromaShader) new PlanteraShader(new Color((int) byte.MaxValue, 0, 220), new Color(0, (int) byte.MaxValue, 0), new Color(12, 4, 0)), CommonConditions.Boss.Plantera, (ShaderLayer) 5); + ChromaInitializer.RegisterShader("Golem", (ChromaShader) new GolemShader(new Color((int) byte.MaxValue, 144, 0), new Color((int) byte.MaxValue, 198, 0), new Color(10, 10, 0)), CommonConditions.Boss.Golem, (ShaderLayer) 5); + ChromaInitializer.RegisterShader("Cultist", (ChromaShader) new CultistShader(), CommonConditions.Boss.Cultist, (ShaderLayer) 5); + ChromaInitializer.RegisterShader("Moon Lord", (ChromaShader) new EyeballShader(false), CommonConditions.Boss.MoonLord, (ShaderLayer) 5); + ChromaInitializer.RegisterShader("Rain", (ChromaShader) new RainShader(), CommonConditions.Weather.Rain, (ShaderLayer) 6); + ChromaInitializer.RegisterShader("Snowstorm", (ChromaShader) new BlizzardShader(), CommonConditions.Weather.Blizzard, (ShaderLayer) 6); + ChromaInitializer.RegisterShader("Sandstorm", (ChromaShader) new SandstormShader(), CommonConditions.Weather.Sandstorm, (ShaderLayer) 6); + ChromaInitializer.RegisterShader("Slime Rain", (ChromaShader) new SlimeRainShader(), CommonConditions.Weather.SlimeRain, (ShaderLayer) 6); + ChromaInitializer.RegisterShader("Drowning", (ChromaShader) new DrowningShader(), CommonConditions.Alert.Drowning, (ShaderLayer) 7); + ChromaInitializer.RegisterShader("Keybinds", (ChromaShader) new KeybindsMenuShader(), CommonConditions.Alert.Keybinds, (ShaderLayer) 7); + ChromaInitializer.RegisterShader("Lava Indicator", (ChromaShader) new LavaIndicatorShader(Color.Black, Color.Red, new Color((int) byte.MaxValue, 188, 0)), CommonConditions.Alert.LavaIndicator, (ShaderLayer) 7); + ChromaInitializer.RegisterShader("Moon Lord Spawn", (ChromaShader) new EyeballShader(true), CommonConditions.Alert.MoonlordComing, (ShaderLayer) 7); + ChromaInitializer.RegisterShader("Low Life", (ChromaShader) new LowLifeShader(), CommonConditions.CriticalAlert.LowLife, (ShaderLayer) 8); + ChromaInitializer.RegisterShader("Death", (ChromaShader) new DeathShader(new Color(36, 0, 10), new Color(158, 28, 53)), CommonConditions.CriticalAlert.Death, (ShaderLayer) 8); + } + + private static void RegisterShader( + string name, + ChromaShader shader, + ChromaCondition condition, + ShaderLayer layer) + { + ChromaInitializer._engine.RegisterShader(shader, condition, layer); + } + + [Conditional("DEBUG")] + private static void AddDebugDraw() + { + BasicDebugDrawer basicDebugDrawer = new BasicDebugDrawer(Main.instance.GraphicsDevice); + Filters.Scene.OnPostDraw += (Action) (() => { }); + } + } +} diff --git a/Initializers/DyeInitializer.cs b/Initializers/DyeInitializer.cs new file mode 100644 index 0000000..b16a6c2 --- /dev/null +++ b/Initializers/DyeInitializer.cs @@ -0,0 +1,467 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Initializers.DyeInitializer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria.GameContent.Dyes; +using Terraria.Graphics.Shaders; +using Terraria.ID; + +namespace Terraria.Initializers +{ + public static class DyeInitializer + { + private static void LoadBasicColorDye( + int baseDyeItem, + int blackDyeItem, + int brightDyeItem, + int silverDyeItem, + float r, + float g, + float b, + float saturation = 1f, + int oldShader = 1) + { + Ref pixelShaderRef = Main.PixelShaderRef; + GameShaders.Armor.BindShader(baseDyeItem, new ArmorShaderData(pixelShaderRef, "ArmorColored")).UseColor(r, g, b).UseSaturation(saturation); + GameShaders.Armor.BindShader(blackDyeItem, new ArmorShaderData(pixelShaderRef, "ArmorColoredAndBlack")).UseColor(r, g, b).UseSaturation(saturation); + GameShaders.Armor.BindShader(brightDyeItem, new ArmorShaderData(pixelShaderRef, "ArmorColored")).UseColor((float) ((double) r * 0.5 + 0.5), (float) ((double) g * 0.5 + 0.5), (float) ((double) b * 0.5 + 0.5)).UseSaturation(saturation); + GameShaders.Armor.BindShader(silverDyeItem, new ArmorShaderData(pixelShaderRef, "ArmorColoredAndSilverTrim")).UseColor(r, g, b).UseSaturation(saturation); + } + + private static void LoadBasicColorDye( + int baseDyeItem, + float r, + float g, + float b, + float saturation = 1f, + int oldShader = 1) + { + DyeInitializer.LoadBasicColorDye(baseDyeItem, baseDyeItem + 12, baseDyeItem + 31, baseDyeItem + 44, r, g, b, saturation, oldShader); + } + + private static void LoadBasicColorDyes() + { + DyeInitializer.LoadBasicColorDye(1007, 1f, 0.0f, 0.0f, 1.2f); + DyeInitializer.LoadBasicColorDye(1008, 1f, 0.5f, 0.0f, 1.2f, 2); + DyeInitializer.LoadBasicColorDye(1009, 1f, 1f, 0.0f, 1.2f, 3); + DyeInitializer.LoadBasicColorDye(1010, 0.5f, 1f, 0.0f, 1.2f, 4); + DyeInitializer.LoadBasicColorDye(1011, 0.0f, 1f, 0.0f, 1.2f, 5); + DyeInitializer.LoadBasicColorDye(1012, 0.0f, 1f, 0.5f, 1.2f, 6); + DyeInitializer.LoadBasicColorDye(1013, 0.0f, 1f, 1f, 1.2f, 7); + DyeInitializer.LoadBasicColorDye(1014, 0.2f, 0.5f, 1f, 1.2f, 8); + DyeInitializer.LoadBasicColorDye(1015, 0.0f, 0.0f, 1f, 1.2f, 9); + DyeInitializer.LoadBasicColorDye(1016, 0.5f, 0.0f, 1f, 1.2f, 10); + DyeInitializer.LoadBasicColorDye(1017, 1f, 0.0f, 1f, 1.2f, 11); + DyeInitializer.LoadBasicColorDye(1018, 1f, 0.1f, 0.5f, 1.3f, 12); + DyeInitializer.LoadBasicColorDye(2874, 2875, 2876, 2877, 0.4f, 0.2f, 0.0f); + } + + private static void LoadArmorDyes() + { + Ref pixelShaderRef = Main.PixelShaderRef; + DyeInitializer.LoadBasicColorDyes(); + GameShaders.Armor.BindShader(1050, new ArmorShaderData(pixelShaderRef, "ArmorBrightnessColored")).UseColor(0.6f, 0.6f, 0.6f); + GameShaders.Armor.BindShader(1037, new ArmorShaderData(pixelShaderRef, "ArmorBrightnessColored")).UseColor(1f, 1f, 1f); + GameShaders.Armor.BindShader(3558, new ArmorShaderData(pixelShaderRef, "ArmorBrightnessColored")).UseColor(1.5f, 1.5f, 1.5f); + GameShaders.Armor.BindShader(2871, new ArmorShaderData(pixelShaderRef, "ArmorBrightnessColored")).UseColor(0.05f, 0.05f, 0.05f); + GameShaders.Armor.BindShader(3559, new ArmorShaderData(pixelShaderRef, "ArmorColoredAndBlack")).UseColor(1f, 1f, 1f).UseSaturation(1.2f); + GameShaders.Armor.BindShader(1031, new ArmorShaderData(pixelShaderRef, "ArmorColoredGradient")).UseColor(1f, 0.0f, 0.0f).UseSecondaryColor(1f, 1f, 0.0f).UseSaturation(1.2f); + GameShaders.Armor.BindShader(1032, new ArmorShaderData(pixelShaderRef, "ArmorColoredAndBlackGradient")).UseColor(1f, 0.0f, 0.0f).UseSecondaryColor(1f, 1f, 0.0f).UseSaturation(1.5f); + GameShaders.Armor.BindShader(3550, new ArmorShaderData(pixelShaderRef, "ArmorColoredAndSilverTrimGradient")).UseColor(1f, 0.0f, 0.0f).UseSecondaryColor(1f, 1f, 0.0f).UseSaturation(1.5f); + GameShaders.Armor.BindShader(1063, new ArmorShaderData(pixelShaderRef, "ArmorBrightnessGradient")).UseColor(1f, 0.0f, 0.0f).UseSecondaryColor(1f, 1f, 0.0f); + GameShaders.Armor.BindShader(1035, new ArmorShaderData(pixelShaderRef, "ArmorColoredGradient")).UseColor(0.0f, 0.0f, 1f).UseSecondaryColor(0.0f, 1f, 1f).UseSaturation(1.2f); + GameShaders.Armor.BindShader(1036, new ArmorShaderData(pixelShaderRef, "ArmorColoredAndBlackGradient")).UseColor(0.0f, 0.0f, 1f).UseSecondaryColor(0.0f, 1f, 1f).UseSaturation(1.5f); + GameShaders.Armor.BindShader(3552, new ArmorShaderData(pixelShaderRef, "ArmorColoredAndSilverTrimGradient")).UseColor(0.0f, 0.0f, 1f).UseSecondaryColor(0.0f, 1f, 1f).UseSaturation(1.5f); + GameShaders.Armor.BindShader(1065, new ArmorShaderData(pixelShaderRef, "ArmorBrightnessGradient")).UseColor(0.0f, 0.0f, 1f).UseSecondaryColor(0.0f, 1f, 1f); + GameShaders.Armor.BindShader(1033, new ArmorShaderData(pixelShaderRef, "ArmorColoredGradient")).UseColor(0.0f, 1f, 0.0f).UseSecondaryColor(1f, 1f, 0.0f).UseSaturation(1.2f); + GameShaders.Armor.BindShader(1034, new ArmorShaderData(pixelShaderRef, "ArmorColoredAndBlackGradient")).UseColor(0.0f, 1f, 0.0f).UseSecondaryColor(1f, 1f, 0.0f).UseSaturation(1.5f); + GameShaders.Armor.BindShader(3551, new ArmorShaderData(pixelShaderRef, "ArmorColoredAndSilverTrimGradient")).UseColor(0.0f, 1f, 0.0f).UseSecondaryColor(1f, 1f, 0.0f).UseSaturation(1.5f); + GameShaders.Armor.BindShader(1064, new ArmorShaderData(pixelShaderRef, "ArmorBrightnessGradient")).UseColor(0.0f, 1f, 0.0f).UseSecondaryColor(1f, 1f, 0.0f); + GameShaders.Armor.BindShader(1068, new ArmorShaderData(pixelShaderRef, "ArmorColoredGradient")).UseColor(0.5f, 1f, 0.0f).UseSecondaryColor(1f, 0.5f, 0.0f).UseSaturation(1.5f); + GameShaders.Armor.BindShader(1069, new ArmorShaderData(pixelShaderRef, "ArmorColoredGradient")).UseColor(0.0f, 1f, 0.5f).UseSecondaryColor(0.0f, 0.5f, 1f).UseSaturation(1.5f); + GameShaders.Armor.BindShader(1070, new ArmorShaderData(pixelShaderRef, "ArmorColoredGradient")).UseColor(1f, 0.0f, 0.5f).UseSecondaryColor(0.5f, 0.0f, 1f).UseSaturation(1.5f); + GameShaders.Armor.BindShader(1066, new ArmorShaderData(pixelShaderRef, "ArmorColoredRainbow")); + GameShaders.Armor.BindShader(1067, new ArmorShaderData(pixelShaderRef, "ArmorBrightnessRainbow")); + GameShaders.Armor.BindShader(3556, new ArmorShaderData(pixelShaderRef, "ArmorMidnightRainbow")); + GameShaders.Armor.BindShader(2869, new ArmorShaderData(pixelShaderRef, "ArmorLivingFlame")).UseColor(1f, 0.9f, 0.0f).UseSecondaryColor(1f, 0.2f, 0.0f); + GameShaders.Armor.BindShader(2870, new ArmorShaderData(pixelShaderRef, "ArmorLivingRainbow")); + GameShaders.Armor.BindShader(2873, new ArmorShaderData(pixelShaderRef, "ArmorLivingOcean")); + GameShaders.Armor.BindShader(3026, new ReflectiveArmorShaderData(pixelShaderRef, "ArmorReflectiveColor")).UseColor(1f, 1f, 1f); + GameShaders.Armor.BindShader(3027, new ReflectiveArmorShaderData(pixelShaderRef, "ArmorReflectiveColor")).UseColor(1.5f, 1.2f, 0.5f); + GameShaders.Armor.BindShader(3553, new ReflectiveArmorShaderData(pixelShaderRef, "ArmorReflectiveColor")).UseColor(1.35f, 0.7f, 0.4f); + GameShaders.Armor.BindShader(3554, new ReflectiveArmorShaderData(pixelShaderRef, "ArmorReflectiveColor")).UseColor(0.25f, 0.0f, 0.7f); + GameShaders.Armor.BindShader(3555, new ReflectiveArmorShaderData(pixelShaderRef, "ArmorReflectiveColor")).UseColor(0.4f, 0.4f, 0.4f); + GameShaders.Armor.BindShader(3190, new ReflectiveArmorShaderData(pixelShaderRef, "ArmorReflective")); + GameShaders.Armor.BindShader(1969, new TeamArmorShaderData(pixelShaderRef, "ArmorColored")); + GameShaders.Armor.BindShader(2864, new ArmorShaderData(pixelShaderRef, "ArmorMartian")).UseColor(0.0f, 2f, 3f); + GameShaders.Armor.BindShader(2872, new ArmorShaderData(pixelShaderRef, "ArmorInvert")); + GameShaders.Armor.BindShader(2878, new ArmorShaderData(pixelShaderRef, "ArmorWisp")).UseColor(0.7f, 1f, 0.9f).UseSecondaryColor(0.35f, 0.85f, 0.8f); + GameShaders.Armor.BindShader(2879, new ArmorShaderData(pixelShaderRef, "ArmorWisp")).UseColor(1f, 1.2f, 0.0f).UseSecondaryColor(1f, 0.6f, 0.3f); + GameShaders.Armor.BindShader(2885, new ArmorShaderData(pixelShaderRef, "ArmorWisp")).UseColor(1.2f, 0.8f, 0.0f).UseSecondaryColor(0.8f, 0.2f, 0.0f); + GameShaders.Armor.BindShader(2884, new ArmorShaderData(pixelShaderRef, "ArmorWisp")).UseColor(1f, 0.0f, 1f).UseSecondaryColor(1f, 0.3f, 0.6f); + GameShaders.Armor.BindShader(2883, new ArmorShaderData(pixelShaderRef, "ArmorHighContrastGlow")).UseColor(0.0f, 1f, 0.0f); + GameShaders.Armor.BindShader(3025, new ArmorShaderData(pixelShaderRef, "ArmorFlow")).UseColor(1f, 0.5f, 1f).UseSecondaryColor(0.6f, 0.1f, 1f); + GameShaders.Armor.BindShader(3039, new TwilightDyeShaderData(pixelShaderRef, "ArmorTwilight")).UseImage("Images/Misc/noise").UseColor(0.5f, 0.1f, 1f); + GameShaders.Armor.BindShader(3040, new ArmorShaderData(pixelShaderRef, "ArmorAcid")).UseColor(0.5f, 1f, 0.3f); + GameShaders.Armor.BindShader(3041, new ArmorShaderData(pixelShaderRef, "ArmorMushroom")).UseColor(0.05f, 0.2f, 1f); + GameShaders.Armor.BindShader(3042, new ArmorShaderData(pixelShaderRef, "ArmorPhase")).UseImage("Images/Misc/noise").UseColor(0.4f, 0.2f, 1.5f); + GameShaders.Armor.BindShader(3560, new ArmorShaderData(pixelShaderRef, "ArmorAcid")).UseColor(0.9f, 0.2f, 0.2f); + GameShaders.Armor.BindShader(3561, new ArmorShaderData(pixelShaderRef, "ArmorGel")).UseImage("Images/Misc/noise").UseColor(0.4f, 0.7f, 1.4f).UseSecondaryColor(0.0f, 0.0f, 0.1f); + GameShaders.Armor.BindShader(3562, new ArmorShaderData(pixelShaderRef, "ArmorGel")).UseImage("Images/Misc/noise").UseColor(1.4f, 0.75f, 1f).UseSecondaryColor(0.45f, 0.1f, 0.3f); + GameShaders.Armor.BindShader(3024, new ArmorShaderData(pixelShaderRef, "ArmorGel")).UseImage("Images/Misc/noise").UseColor(-0.5f, -1f, 0.0f).UseSecondaryColor(1.5f, 1f, 2.2f); + GameShaders.Armor.BindShader(4663, new ArmorShaderData(pixelShaderRef, "ArmorGel")).UseImage("Images/Misc/noise").UseColor(2.6f, 0.6f, 0.6f).UseSecondaryColor(0.2f, -0.2f, -0.2f); + GameShaders.Armor.BindShader(4662, new ArmorShaderData(pixelShaderRef, "ArmorFog")).UseImage("Images/Misc/noise").UseColor(0.95f, 0.95f, 0.95f).UseSecondaryColor(0.3f, 0.3f, 0.3f); + GameShaders.Armor.BindShader(4778, new ArmorShaderData(pixelShaderRef, "ArmorHallowBoss")).UseImage("Images/Extra_" + (object) (short) 156); + GameShaders.Armor.BindShader(3534, new ArmorShaderData(pixelShaderRef, "ArmorMirage")); + GameShaders.Armor.BindShader(3028, new ArmorShaderData(pixelShaderRef, "ArmorAcid")).UseColor(0.5f, 0.7f, 1.5f); + GameShaders.Armor.BindShader(3557, new ArmorShaderData(pixelShaderRef, "ArmorPolarized")); + GameShaders.Armor.BindShader(3978, new ArmorShaderData(pixelShaderRef, "ColorOnly")); + GameShaders.Armor.BindShader(3038, new ArmorShaderData(pixelShaderRef, "ArmorHades")).UseColor(0.5f, 0.7f, 1.3f).UseSecondaryColor(0.5f, 0.7f, 1.3f); + GameShaders.Armor.BindShader(3600, new ArmorShaderData(pixelShaderRef, "ArmorHades")).UseColor(0.7f, 0.4f, 1.5f).UseSecondaryColor(0.7f, 0.4f, 1.5f); + GameShaders.Armor.BindShader(3597, new ArmorShaderData(pixelShaderRef, "ArmorHades")).UseColor(1.5f, 0.6f, 0.4f).UseSecondaryColor(1.5f, 0.6f, 0.4f); + GameShaders.Armor.BindShader(3598, new ArmorShaderData(pixelShaderRef, "ArmorHades")).UseColor(0.1f, 0.1f, 0.1f).UseSecondaryColor(0.4f, 0.05f, 0.025f); + GameShaders.Armor.BindShader(3599, new ArmorShaderData(pixelShaderRef, "ArmorLoki")).UseColor(0.1f, 0.1f, 0.1f); + GameShaders.Armor.BindShader(3533, new ArmorShaderData(pixelShaderRef, "ArmorShiftingSands")).UseImage("Images/Misc/noise").UseColor(1.1f, 1f, 0.5f).UseSecondaryColor(0.7f, 0.5f, 0.3f); + GameShaders.Armor.BindShader(3535, new ArmorShaderData(pixelShaderRef, "ArmorShiftingPearlsands")).UseImage("Images/Misc/noise").UseColor(1.1f, 0.8f, 0.9f).UseSecondaryColor(0.35f, 0.25f, 0.44f); + GameShaders.Armor.BindShader(3526, new ArmorShaderData(pixelShaderRef, "ArmorSolar")).UseColor(1f, 0.0f, 0.0f).UseSecondaryColor(1f, 1f, 0.0f); + GameShaders.Armor.BindShader(3527, new ArmorShaderData(pixelShaderRef, "ArmorNebula")).UseImage("Images/Misc/noise").UseColor(1f, 0.0f, 1f).UseSecondaryColor(1f, 1f, 1f).UseSaturation(1f); + GameShaders.Armor.BindShader(3528, new ArmorShaderData(pixelShaderRef, "ArmorVortex")).UseImage("Images/Misc/noise").UseColor(0.1f, 0.5f, 0.35f).UseSecondaryColor(1f, 1f, 1f).UseSaturation(1f); + GameShaders.Armor.BindShader(3529, new ArmorShaderData(pixelShaderRef, "ArmorStardust")).UseImage("Images/Misc/noise").UseColor(0.4f, 0.6f, 1f).UseSecondaryColor(1f, 1f, 1f).UseSaturation(1f); + GameShaders.Armor.BindShader(3530, new ArmorShaderData(pixelShaderRef, "ArmorVoid")); + DyeInitializer.FixRecipes(); + } + + private static void LoadHairDyes() + { + Ref pixelShaderRef = Main.PixelShaderRef; + DyeInitializer.LoadLegacyHairdyes(); + GameShaders.Hair.BindShader(3259, new TwilightHairDyeShaderData(pixelShaderRef, "ArmorTwilight")).UseImage("Images/Misc/noise").UseColor(0.5f, 0.1f, 1f); + } + + private static void LoadLegacyHairdyes() + { + Ref pixelShaderRef = Main.PixelShaderRef; + GameShaders.Hair.BindShader(1977, new LegacyHairShaderData().UseLegacyMethod((LegacyHairShaderData.ColorProcessingMethod) ((Player player, Color newColor, ref bool lighting) => + { + newColor.R = (byte) ((double) player.statLife / (double) player.statLifeMax2 * 235.0 + 20.0); + newColor.B = (byte) 20; + newColor.G = (byte) 20; + return newColor; + }))); + GameShaders.Hair.BindShader(1978, new LegacyHairShaderData().UseLegacyMethod((LegacyHairShaderData.ColorProcessingMethod) ((Player player, Color newColor, ref bool lighting) => + { + newColor.R = (byte) ((1.0 - (double) player.statMana / (double) player.statManaMax2) * 200.0 + 50.0); + newColor.B = byte.MaxValue; + newColor.G = (byte) ((1.0 - (double) player.statMana / (double) player.statManaMax2) * 180.0 + 75.0); + return newColor; + }))); + GameShaders.Hair.BindShader(1979, new LegacyHairShaderData().UseLegacyMethod((LegacyHairShaderData.ColorProcessingMethod) ((Player player, Color newColor, ref bool lighting) => + { + float num1 = (float) (Main.worldSurface * 0.45) * 16f; + float num2 = (float) (Main.worldSurface + Main.rockLayer) * 8f; + float num3 = ((float) Main.rockLayer + (float) Main.maxTilesY) * 8f; + float num4 = (float) (Main.maxTilesY - 150) * 16f; + Vector2 center = player.Center; + if ((double) center.Y < (double) num1) + { + float num5 = center.Y / num1; + float num6 = 1f - num5; + newColor.R = (byte) (116.0 * (double) num6 + 28.0 * (double) num5); + newColor.G = (byte) (160.0 * (double) num6 + 216.0 * (double) num5); + newColor.B = (byte) (249.0 * (double) num6 + 94.0 * (double) num5); + } + else if ((double) center.Y < (double) num2) + { + float num7 = num1; + float num8 = (float) (((double) center.Y - (double) num7) / ((double) num2 - (double) num7)); + float num9 = 1f - num8; + newColor.R = (byte) (28.0 * (double) num9 + 151.0 * (double) num8); + newColor.G = (byte) (216.0 * (double) num9 + 107.0 * (double) num8); + newColor.B = (byte) (94.0 * (double) num9 + 75.0 * (double) num8); + } + else if ((double) center.Y < (double) num3) + { + float num10 = num2; + float num11 = (float) (((double) center.Y - (double) num10) / ((double) num3 - (double) num10)); + float num12 = 1f - num11; + newColor.R = (byte) (151.0 * (double) num12 + 128.0 * (double) num11); + newColor.G = (byte) (107.0 * (double) num12 + 128.0 * (double) num11); + newColor.B = (byte) (75.0 * (double) num12 + 128.0 * (double) num11); + } + else if ((double) center.Y < (double) num4) + { + float num13 = num3; + float num14 = (float) (((double) center.Y - (double) num13) / ((double) num4 - (double) num13)); + float num15 = 1f - num14; + newColor.R = (byte) (128.0 * (double) num15 + (double) byte.MaxValue * (double) num14); + newColor.G = (byte) (128.0 * (double) num15 + 50.0 * (double) num14); + newColor.B = (byte) (128.0 * (double) num15 + 15.0 * (double) num14); + } + else + { + newColor.R = byte.MaxValue; + newColor.G = (byte) 50; + newColor.B = (byte) 10; + } + return newColor; + }))); + GameShaders.Hair.BindShader(1980, new LegacyHairShaderData().UseLegacyMethod((LegacyHairShaderData.ColorProcessingMethod) ((Player player, Color newColor, ref bool lighting) => + { + int num16 = 0; + for (int index = 0; index < 54; ++index) + { + if (player.inventory[index].type == 71) + num16 += player.inventory[index].stack; + if (player.inventory[index].type == 72) + num16 += player.inventory[index].stack * 100; + if (player.inventory[index].type == 73) + num16 += player.inventory[index].stack * 10000; + if (player.inventory[index].type == 74) + num16 += player.inventory[index].stack * 1000000; + } + float num17 = (float) Item.buyPrice(gold: 5); + float num18 = (float) Item.buyPrice(gold: 50); + float num19 = (float) Item.buyPrice(2); + Color color1 = new Color(226, 118, 76); + Color color2 = new Color(174, 194, 196); + Color color3 = new Color(204, 181, 72); + Color color4 = new Color(161, 172, 173); + if ((double) num16 < (double) num17) + { + float num20 = (float) num16 / num17; + float num21 = 1f - num20; + newColor.R = (byte) ((double) color1.R * (double) num21 + (double) color2.R * (double) num20); + newColor.G = (byte) ((double) color1.G * (double) num21 + (double) color2.G * (double) num20); + newColor.B = (byte) ((double) color1.B * (double) num21 + (double) color2.B * (double) num20); + } + else if ((double) num16 < (double) num18) + { + float num22 = num17; + float num23 = (float) (((double) num16 - (double) num22) / ((double) num18 - (double) num22)); + float num24 = 1f - num23; + newColor.R = (byte) ((double) color2.R * (double) num24 + (double) color3.R * (double) num23); + newColor.G = (byte) ((double) color2.G * (double) num24 + (double) color3.G * (double) num23); + newColor.B = (byte) ((double) color2.B * (double) num24 + (double) color3.B * (double) num23); + } + else if ((double) num16 < (double) num19) + { + float num25 = num18; + float num26 = (float) (((double) num16 - (double) num25) / ((double) num19 - (double) num25)); + float num27 = 1f - num26; + newColor.R = (byte) ((double) color3.R * (double) num27 + (double) color4.R * (double) num26); + newColor.G = (byte) ((double) color3.G * (double) num27 + (double) color4.G * (double) num26); + newColor.B = (byte) ((double) color3.B * (double) num27 + (double) color4.B * (double) num26); + } + else + newColor = color4; + return newColor; + }))); + GameShaders.Hair.BindShader(1981, new LegacyHairShaderData().UseLegacyMethod((LegacyHairShaderData.ColorProcessingMethod) ((Player player, Color newColor, ref bool lighting) => + { + Color color5 = new Color(1, 142, (int) byte.MaxValue); + Color color6 = new Color((int) byte.MaxValue, (int) byte.MaxValue, 0); + Color color7 = new Color(211, 45, (int) sbyte.MaxValue); + Color color8 = new Color(67, 44, 118); + if (Main.dayTime) + { + if (Main.time < 27000.0) + { + float num28 = (float) (Main.time / 27000.0); + float num29 = 1f - num28; + newColor.R = (byte) ((double) color5.R * (double) num29 + (double) color6.R * (double) num28); + newColor.G = (byte) ((double) color5.G * (double) num29 + (double) color6.G * (double) num28); + newColor.B = (byte) ((double) color5.B * (double) num29 + (double) color6.B * (double) num28); + } + else + { + float num30 = 27000f; + float num31 = (float) ((Main.time - (double) num30) / (54000.0 - (double) num30)); + float num32 = 1f - num31; + newColor.R = (byte) ((double) color6.R * (double) num32 + (double) color7.R * (double) num31); + newColor.G = (byte) ((double) color6.G * (double) num32 + (double) color7.G * (double) num31); + newColor.B = (byte) ((double) color6.B * (double) num32 + (double) color7.B * (double) num31); + } + } + else if (Main.time < 16200.0) + { + float num33 = (float) (Main.time / 16200.0); + float num34 = 1f - num33; + newColor.R = (byte) ((double) color7.R * (double) num34 + (double) color8.R * (double) num33); + newColor.G = (byte) ((double) color7.G * (double) num34 + (double) color8.G * (double) num33); + newColor.B = (byte) ((double) color7.B * (double) num34 + (double) color8.B * (double) num33); + } + else + { + float num35 = 16200f; + float num36 = (float) ((Main.time - (double) num35) / (32400.0 - (double) num35)); + float num37 = 1f - num36; + newColor.R = (byte) ((double) color8.R * (double) num37 + (double) color5.R * (double) num36); + newColor.G = (byte) ((double) color8.G * (double) num37 + (double) color5.G * (double) num36); + newColor.B = (byte) ((double) color8.B * (double) num37 + (double) color5.B * (double) num36); + } + return newColor; + }))); + GameShaders.Hair.BindShader(1982, new LegacyHairShaderData().UseLegacyMethod((LegacyHairShaderData.ColorProcessingMethod) ((Player player, Color newColor, ref bool lighting) => + { + if (player.team >= 0 && player.team < Main.teamColor.Length) + newColor = Main.teamColor[player.team]; + return newColor; + }))); + GameShaders.Hair.BindShader(1983, new LegacyHairShaderData().UseLegacyMethod((LegacyHairShaderData.ColorProcessingMethod) ((Player player, Color newColor, ref bool lighting) => + { + Color color9 = new Color(); + switch (Main.waterStyle) + { + case 2: + color9 = new Color(124, 118, 242); + break; + case 3: + color9 = new Color(143, 215, 29); + break; + case 4: + color9 = new Color(78, 193, 227); + break; + case 5: + color9 = new Color(189, 231, (int) byte.MaxValue); + break; + case 6: + color9 = new Color(230, 219, 100); + break; + case 7: + color9 = new Color(151, 107, 75); + break; + case 8: + color9 = new Color(128, 128, 128); + break; + case 9: + color9 = new Color(200, 0, 0); + break; + case 10: + color9 = new Color(208, 80, 80); + break; + case 12: + color9 = new Color(230, 219, 100); + break; + default: + color9 = new Color(28, 216, 94); + break; + } + Color color10 = player.hairDyeColor; + if (color10.A == (byte) 0) + color10 = color9; + if ((int) color10.R > (int) color9.R) + --color10.R; + if ((int) color10.R < (int) color9.R) + ++color10.R; + if ((int) color10.G > (int) color9.G) + --color10.G; + if ((int) color10.G < (int) color9.G) + ++color10.G; + if ((int) color10.B > (int) color9.B) + --color10.B; + if ((int) color10.B < (int) color9.B) + ++color10.B; + newColor = color10; + return newColor; + }))); + GameShaders.Hair.BindShader(1984, new LegacyHairShaderData().UseLegacyMethod((LegacyHairShaderData.ColorProcessingMethod) ((Player player, Color newColor, ref bool lighting) => + { + newColor = new Color(244, 22, 175); + return newColor; + }))); + GameShaders.Hair.BindShader(1985, new LegacyHairShaderData().UseLegacyMethod((LegacyHairShaderData.ColorProcessingMethod) ((Player player, Color newColor, ref bool lighting) => + { + newColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB); + return newColor; + }))); + GameShaders.Hair.BindShader(1986, new LegacyHairShaderData().UseLegacyMethod((LegacyHairShaderData.ColorProcessingMethod) ((Player player, Color newColor, ref bool lighting) => + { + float num38 = Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y); + float num39 = 10f; + if ((double) num38 > (double) num39) + num38 = num39; + float num40 = num38 / num39; + float num41 = 1f - num40; + newColor.R = (byte) (75.0 * (double) num40 + (double) player.hairColor.R * (double) num41); + newColor.G = (byte) ((double) byte.MaxValue * (double) num40 + (double) player.hairColor.G * (double) num41); + newColor.B = (byte) (200.0 * (double) num40 + (double) player.hairColor.B * (double) num41); + return newColor; + }))); + GameShaders.Hair.BindShader(2863, new LegacyHairShaderData().UseLegacyMethod((LegacyHairShaderData.ColorProcessingMethod) ((Player player, Color newColor, ref bool lighting) => + { + lighting = false; + Color color = Lighting.GetColor((int) ((double) player.position.X + (double) player.width * 0.5) / 16, (int) (((double) player.position.Y + (double) player.height * 0.25) / 16.0)); + newColor.R = (byte) ((int) color.R + (int) newColor.R >> 1); + newColor.G = (byte) ((int) color.G + (int) newColor.G >> 1); + newColor.B = (byte) ((int) color.B + (int) newColor.B >> 1); + return newColor; + }))); + } + + private static void LoadMisc() + { + Ref pixelShaderRef = Main.PixelShaderRef; + GameShaders.Misc["ForceField"] = new MiscShaderData(pixelShaderRef, "ForceField"); + GameShaders.Misc["WaterProcessor"] = new MiscShaderData(pixelShaderRef, "WaterProcessor"); + GameShaders.Misc["WaterDistortionObject"] = new MiscShaderData(pixelShaderRef, "WaterDistortionObject"); + GameShaders.Misc["WaterDebugDraw"] = new MiscShaderData(Main.ScreenShaderRef, "WaterDebugDraw"); + GameShaders.Misc["HallowBoss"] = new MiscShaderData(pixelShaderRef, "HallowBoss"); + GameShaders.Misc["HallowBoss"].UseImage1("Images/Extra_" + (object) (short) 156); + GameShaders.Misc["QueenSlime"] = new MiscShaderData(pixelShaderRef, "QueenSlime"); + GameShaders.Misc["QueenSlime"].UseImage1("Images/Extra_" + (object) (short) 180); + GameShaders.Misc["QueenSlime"].UseImage2("Images/Extra_" + (object) (short) 179); + int type = 3530; + bool[] flagArray = new bool[GameShaders.Armor.GetShaderIdFromItemId(type) + 1]; + for (int index = 0; index < flagArray.Length; ++index) + flagArray[index] = true; + foreach (int nonColorfulDyeItem in ItemID.Sets.NonColorfulDyeItems) + flagArray[GameShaders.Armor.GetShaderIdFromItemId(nonColorfulDyeItem)] = false; + ItemID.Sets.ColorfulDyeValues = flagArray; + DyeInitializer.LoadMiscVertexShaders(); + } + + private static void LoadMiscVertexShaders() + { + Ref vertexPixelShaderRef = Main.VertexPixelShaderRef; + GameShaders.Misc["MagicMissile"] = new MiscShaderData(vertexPixelShaderRef, "MagicMissile").UseProjectionMatrix(true); + GameShaders.Misc["MagicMissile"].UseImage0("Images/Extra_" + (object) (short) 192); + GameShaders.Misc["MagicMissile"].UseImage1("Images/Extra_" + (object) (short) 194); + GameShaders.Misc["MagicMissile"].UseImage2("Images/Extra_" + (object) (short) 193); + GameShaders.Misc["FlameLash"] = new MiscShaderData(vertexPixelShaderRef, "MagicMissile").UseProjectionMatrix(true); + GameShaders.Misc["FlameLash"].UseImage0("Images/Extra_" + (object) (short) 191); + GameShaders.Misc["FlameLash"].UseImage1("Images/Extra_" + (object) (short) 189); + GameShaders.Misc["FlameLash"].UseImage2("Images/Extra_" + (object) (short) 190); + GameShaders.Misc["RainbowRod"] = new MiscShaderData(vertexPixelShaderRef, "MagicMissile").UseProjectionMatrix(true); + GameShaders.Misc["RainbowRod"].UseImage0("Images/Extra_" + (object) (short) 195); + GameShaders.Misc["RainbowRod"].UseImage1("Images/Extra_" + (object) (short) 197); + GameShaders.Misc["RainbowRod"].UseImage2("Images/Extra_" + (object) (short) 196); + GameShaders.Misc["FinalFractal"] = new MiscShaderData(vertexPixelShaderRef, "FinalFractalVertex").UseProjectionMatrix(true); + GameShaders.Misc["FinalFractal"].UseImage0("Images/Extra_" + (object) (short) 195); + GameShaders.Misc["FinalFractal"].UseImage1("Images/Extra_" + (object) (short) 197); + GameShaders.Misc["EmpressBlade"] = new MiscShaderData(vertexPixelShaderRef, "FinalFractalVertex").UseProjectionMatrix(true); + GameShaders.Misc["EmpressBlade"].UseImage0("Images/Extra_" + (object) (short) 209); + GameShaders.Misc["EmpressBlade"].UseImage1("Images/Extra_" + (object) (short) 210); + } + + public static void Load() + { + DyeInitializer.LoadArmorDyes(); + DyeInitializer.LoadHairDyes(); + DyeInitializer.LoadMisc(); + } + + private static void FixRecipes() + { + for (int index = 0; index < Recipe.maxRecipes; ++index) + { + Main.recipe[index].createItem.dye = (byte) GameShaders.Armor.GetShaderIdFromItemId(Main.recipe[index].createItem.type); + Main.recipe[index].createItem.hairDye = GameShaders.Hair.GetShaderIdFromItemId(Main.recipe[index].createItem.type); + } + } + } +} diff --git a/Initializers/LaunchInitializer.cs b/Initializers/LaunchInitializer.cs new file mode 100644 index 0000000..5257fb2 --- /dev/null +++ b/Initializers/LaunchInitializer.cs @@ -0,0 +1,210 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Initializers.LaunchInitializer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Diagnostics; +using Terraria.Localization; +using Terraria.Social; + +namespace Terraria.Initializers +{ + public static class LaunchInitializer + { + public static void LoadParameters(Main game) + { + LaunchInitializer.LoadSharedParameters(game); + LaunchInitializer.LoadClientParameters(game); + } + + private static void LoadSharedParameters(Main game) + { + string[] strArray1 = new string[1]{ "-loadlib" }; + string path; + if ((path = LaunchInitializer.TryParameter(strArray1)) != null) + game.loadLib(path); + string[] strArray2 = new string[2]{ "-p", "-port" }; + string s; + int result; + if ((s = LaunchInitializer.TryParameter(strArray2)) == null || !int.TryParse(s, out result)) + return; + Netplay.ListenPort = result; + } + + private static void LoadClientParameters(Main game) + { + string[] strArray1 = new string[2]{ "-j", "-join" }; + string IP; + if ((IP = LaunchInitializer.TryParameter(strArray1)) != null) + game.AutoJoin(IP); + string[] strArray2 = new string[2] + { + "-pass", + "-password" + }; + string str; + if ((str = LaunchInitializer.TryParameter(strArray2)) != null) + { + Netplay.ServerPassword = Main.ConvertFromSafeArgument(str); + game.AutoPass(); + } + if (!LaunchInitializer.HasParameter("-host")) + return; + game.AutoHost(); + } + + private static void LoadServerParameters(Main game) + { + try + { + string[] strArray = new string[1] + { + "-forcepriority" + }; + string s; + if ((s = LaunchInitializer.TryParameter(strArray)) != null) + { + Process currentProcess = Process.GetCurrentProcess(); + int result; + if (int.TryParse(s, out result)) + { + switch (result) + { + case 0: + currentProcess.PriorityClass = ProcessPriorityClass.RealTime; + break; + case 1: + currentProcess.PriorityClass = ProcessPriorityClass.High; + break; + case 2: + currentProcess.PriorityClass = ProcessPriorityClass.AboveNormal; + break; + case 3: + currentProcess.PriorityClass = ProcessPriorityClass.Normal; + break; + case 4: + currentProcess.PriorityClass = ProcessPriorityClass.BelowNormal; + break; + case 5: + currentProcess.PriorityClass = ProcessPriorityClass.Idle; + break; + default: + currentProcess.PriorityClass = ProcessPriorityClass.High; + break; + } + } + else + currentProcess.PriorityClass = ProcessPriorityClass.High; + } + else + Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.High; + } + catch + { + } + string[] strArray1 = new string[2] + { + "-maxplayers", + "-players" + }; + string s1; + int result1; + if ((s1 = LaunchInitializer.TryParameter(strArray1)) != null && int.TryParse(s1, out result1)) + game.SetNetPlayers(result1); + string[] strArray2 = new string[2] + { + "-pass", + "-password" + }; + string str1; + if ((str1 = LaunchInitializer.TryParameter(strArray2)) != null) + Netplay.ServerPassword = Main.ConvertFromSafeArgument(str1); + string[] strArray3 = new string[1]{ "-lang" }; + string s2; + int result2; + if ((s2 = LaunchInitializer.TryParameter(strArray3)) != null && int.TryParse(s2, out result2)) + LanguageManager.Instance.SetLanguage(result2); + string[] strArray4 = new string[1]{ "-language" }; + string cultureName; + if ((cultureName = LaunchInitializer.TryParameter(strArray4)) != null) + LanguageManager.Instance.SetLanguage(cultureName); + string[] strArray5 = new string[1]{ "-worldname" }; + string world1; + if ((world1 = LaunchInitializer.TryParameter(strArray5)) != null) + game.SetWorldName(world1); + string[] strArray6 = new string[1]{ "-motd" }; + string newMOTD; + if ((newMOTD = LaunchInitializer.TryParameter(strArray6)) != null) + game.NewMOTD(newMOTD); + string[] strArray7 = new string[1]{ "-banlist" }; + string str2; + if ((str2 = LaunchInitializer.TryParameter(strArray7)) != null) + Netplay.BanFilePath = str2; + if (LaunchInitializer.HasParameter("-autoshutdown")) + game.EnableAutoShutdown(); + if (LaunchInitializer.HasParameter("-secure")) + Netplay.SpamCheck = true; + string[] strArray8 = new string[1] + { + "-worldrollbackstokeep" + }; + string rollBacksToKeep; + if ((rollBacksToKeep = LaunchInitializer.TryParameter(strArray8)) != null) + game.setServerWorldRollbacks(rollBacksToKeep); + string[] strArray9 = new string[1]{ "-autocreate" }; + string worldSize; + if ((worldSize = LaunchInitializer.TryParameter(strArray9)) != null) + game.autoCreate(worldSize); + if (LaunchInitializer.HasParameter("-noupnp")) + Netplay.UseUPNP = false; + if (LaunchInitializer.HasParameter("-experimental")) + Main.UseExperimentalFeatures = true; + string[] strArray10 = new string[1]{ "-world" }; + string world2; + if ((world2 = LaunchInitializer.TryParameter(strArray10)) != null) + game.SetWorld(world2, false); + else if (SocialAPI.Mode == SocialMode.Steam) + { + string[] strArray11 = new string[1]{ "-cloudworld" }; + string world3; + if ((world3 = LaunchInitializer.TryParameter(strArray11)) != null) + game.SetWorld(world3, true); + } + string[] strArray12 = new string[1]{ "-config" }; + string configPath; + if ((configPath = LaunchInitializer.TryParameter(strArray12)) != null) + game.LoadDedConfig(configPath); + string[] strArray13 = new string[1]{ "-seed" }; + string str3; + if ((str3 = LaunchInitializer.TryParameter(strArray13)) == null) + return; + Main.AutogenSeedName = str3; + } + + private static bool HasParameter(params string[] keys) + { + for (int index = 0; index < keys.Length; ++index) + { + if (Program.LaunchParameters.ContainsKey(keys[index])) + return true; + } + return false; + } + + private static string TryParameter(params string[] keys) + { + for (int index = 0; index < keys.Length; ++index) + { + string str; + if (Program.LaunchParameters.TryGetValue(keys[index], out str)) + { + if (str == null) + str = ""; + return str; + } + } + return (string) null; + } + } +} diff --git a/Initializers/NetworkInitializer.cs b/Initializers/NetworkInitializer.cs new file mode 100644 index 0000000..e2bfdd6 --- /dev/null +++ b/Initializers/NetworkInitializer.cs @@ -0,0 +1,29 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Initializers.NetworkInitializer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.GameContent.NetModules; +using Terraria.Net; + +namespace Terraria.Initializers +{ + public static class NetworkInitializer + { + public static void Load() + { + NetManager.Instance.Register(); + NetManager.Instance.Register(); + NetManager.Instance.Register(); + NetManager.Instance.Register(); + NetManager.Instance.Register(); + NetManager.Instance.Register(); + NetManager.Instance.Register(); + NetManager.Instance.Register(); + NetManager.Instance.Register(); + NetManager.Instance.Register(); + NetManager.Instance.Register(); + } + } +} diff --git a/Initializers/PlayerDataInitializer.cs b/Initializers/PlayerDataInitializer.cs new file mode 100644 index 0000000..03bb9b2 --- /dev/null +++ b/Initializers/PlayerDataInitializer.cs @@ -0,0 +1,249 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Initializers.PlayerDataInitializer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.GameContent; + +namespace Terraria.Initializers +{ + public static class PlayerDataInitializer + { + public static void Load() + { + TextureAssets.Players = new Asset[12, 16]; + PlayerDataInitializer.LoadStarterMale(); + PlayerDataInitializer.LoadStarterFemale(); + PlayerDataInitializer.LoadStickerMale(); + PlayerDataInitializer.LoadStickerFemale(); + PlayerDataInitializer.LoadGangsterMale(); + PlayerDataInitializer.LoadGangsterFemale(); + PlayerDataInitializer.LoadCoatMale(); + PlayerDataInitializer.LoadDressFemale(); + PlayerDataInitializer.LoadDressMale(); + PlayerDataInitializer.LoadCoatFemale(); + PlayerDataInitializer.LoadDisplayDollMale(); + PlayerDataInitializer.LoadDisplayDollFemale(); + } + + private static void LoadVariant(int ID, int[] pieceIDs) + { + for (int index = 0; index < pieceIDs.Length; ++index) + TextureAssets.Players[ID, pieceIDs[index]] = Main.Assets.Request("Images/Player_" + (object) ID + "_" + (object) pieceIDs[index], (AssetRequestMode) 2); + } + + private static void CopyVariant(int to, int from) + { + for (int index = 0; index < 16; ++index) + TextureAssets.Players[to, index] = TextureAssets.Players[from, index]; + } + + private static void LoadStarterMale() + { + PlayerDataInitializer.LoadVariant(0, new int[15] + { + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 15 + }); + TextureAssets.Players[0, 14] = (Asset) Asset.Empty; + } + + private static void LoadStickerMale() + { + PlayerDataInitializer.CopyVariant(1, 0); + PlayerDataInitializer.LoadVariant(1, new int[6] + { + 4, + 6, + 8, + 11, + 12, + 13 + }); + } + + private static void LoadGangsterMale() + { + PlayerDataInitializer.CopyVariant(2, 0); + PlayerDataInitializer.LoadVariant(2, new int[6] + { + 4, + 6, + 8, + 11, + 12, + 13 + }); + } + + private static void LoadCoatMale() + { + PlayerDataInitializer.CopyVariant(3, 0); + PlayerDataInitializer.LoadVariant(3, new int[7] + { + 4, + 6, + 8, + 11, + 12, + 13, + 14 + }); + } + + private static void LoadDressMale() + { + PlayerDataInitializer.CopyVariant(8, 0); + PlayerDataInitializer.LoadVariant(8, new int[7] + { + 4, + 6, + 8, + 11, + 12, + 13, + 14 + }); + } + + private static void LoadStarterFemale() + { + PlayerDataInitializer.CopyVariant(4, 0); + PlayerDataInitializer.LoadVariant(4, new int[11] + { + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13 + }); + } + + private static void LoadStickerFemale() + { + PlayerDataInitializer.CopyVariant(5, 4); + PlayerDataInitializer.LoadVariant(5, new int[6] + { + 4, + 6, + 8, + 11, + 12, + 13 + }); + } + + private static void LoadGangsterFemale() + { + PlayerDataInitializer.CopyVariant(6, 4); + PlayerDataInitializer.LoadVariant(6, new int[6] + { + 4, + 6, + 8, + 11, + 12, + 13 + }); + } + + private static void LoadCoatFemale() + { + PlayerDataInitializer.CopyVariant(7, 4); + PlayerDataInitializer.LoadVariant(7, new int[7] + { + 4, + 6, + 8, + 11, + 12, + 13, + 14 + }); + } + + private static void LoadDressFemale() + { + PlayerDataInitializer.CopyVariant(9, 4); + PlayerDataInitializer.LoadVariant(9, new int[6] + { + 4, + 6, + 8, + 11, + 12, + 13 + }); + } + + private static void LoadDisplayDollMale() + { + PlayerDataInitializer.CopyVariant(10, 0); + PlayerDataInitializer.LoadVariant(10, new int[7] + { + 0, + 2, + 3, + 5, + 7, + 9, + 10 + }); + Asset player = TextureAssets.Players[10, 2]; + TextureAssets.Players[10, 2] = player; + TextureAssets.Players[10, 1] = player; + TextureAssets.Players[10, 4] = player; + TextureAssets.Players[10, 6] = player; + TextureAssets.Players[10, 11] = player; + TextureAssets.Players[10, 12] = player; + TextureAssets.Players[10, 13] = player; + TextureAssets.Players[10, 8] = player; + TextureAssets.Players[10, 15] = player; + } + + private static void LoadDisplayDollFemale() + { + PlayerDataInitializer.CopyVariant(11, 10); + PlayerDataInitializer.LoadVariant(11, new int[5] + { + 3, + 5, + 7, + 9, + 10 + }); + Asset player = TextureAssets.Players[10, 2]; + TextureAssets.Players[11, 2] = player; + TextureAssets.Players[11, 1] = player; + TextureAssets.Players[11, 4] = player; + TextureAssets.Players[11, 6] = player; + TextureAssets.Players[11, 11] = player; + TextureAssets.Players[11, 12] = player; + TextureAssets.Players[11, 13] = player; + TextureAssets.Players[11, 8] = player; + TextureAssets.Players[11, 15] = player; + } + } +} diff --git a/Initializers/ScreenEffectInitializer.cs b/Initializers/ScreenEffectInitializer.cs new file mode 100644 index 0000000..e27f7c3 --- /dev/null +++ b/Initializers/ScreenEffectInitializer.cs @@ -0,0 +1,73 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Initializers.ScreenEffectInitializer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.GameContent.Shaders; +using Terraria.GameContent.Skies; +using Terraria.Graphics.Effects; +using Terraria.Graphics.Shaders; + +namespace Terraria.Initializers +{ + public static class ScreenEffectInitializer + { + public static void Load() + { + Filters.Scene["Nebula"] = new Filter(new ScreenShaderData("FilterTower").UseColor(1f, 0.0f, 0.9f).UseOpacity(0.35f), EffectPriority.High); + Filters.Scene["Solar"] = new Filter(new ScreenShaderData("FilterTower").UseColor(1f, 0.7f, 0.0f).UseOpacity(0.3f), EffectPriority.High); + Filters.Scene["Stardust"] = new Filter(new ScreenShaderData("FilterTower").UseColor(0.0f, 0.5f, 1f).UseOpacity(0.5f), EffectPriority.High); + Filters.Scene["Vortex"] = new Filter(new ScreenShaderData("FilterTower").UseColor(0.0f, 0.7f, 0.7f).UseOpacity(0.5f), EffectPriority.High); + Filters.Scene["MonolithNebula"] = new Filter(new ScreenShaderData("FilterMiniTower").UseColor(1f, 0.0f, 0.9f).UseOpacity(0.35f), EffectPriority.Medium); + Filters.Scene["MonolithSolar"] = new Filter(new ScreenShaderData("FilterMiniTower").UseColor(1f, 0.7f, 0.0f).UseOpacity(0.3f), EffectPriority.Medium); + Filters.Scene["MonolithStardust"] = new Filter(new ScreenShaderData("FilterMiniTower").UseColor(0.0f, 0.5f, 1f).UseOpacity(0.5f), EffectPriority.Medium); + Filters.Scene["MonolithVortex"] = new Filter(new ScreenShaderData("FilterMiniTower").UseColor(0.0f, 0.7f, 0.7f).UseOpacity(0.5f), EffectPriority.Medium); + Filters.Scene["MoonLord"] = new Filter((ScreenShaderData) new MoonLordScreenShaderData("FilterMoonLord", false), EffectPriority.VeryHigh); + Filters.Scene["MoonLordShake"] = new Filter((ScreenShaderData) new MoonLordScreenShaderData("FilterMoonLordShake", false), EffectPriority.VeryHigh); + Filters.Scene["MonolithMoonLord"] = new Filter((ScreenShaderData) new MoonLordScreenShaderData("FilterMoonLord", true), EffectPriority.Medium); + Filters.Scene["Graveyard"] = new Filter(new ScreenShaderData("FilterGraveyard"), EffectPriority.Medium); + Filters.Scene["testInvert"] = new Filter(new ScreenShaderData("FilterInvert"), EffectPriority.VeryHigh); + Filters.Scene["BloodMoon"] = new Filter(new BloodMoonScreenShaderData("FilterBloodMoon").UseColor(2f, -0.8f, -0.6f), EffectPriority.Medium); + Filters.Scene["Sandstorm"] = new Filter(new SandstormShaderData("FilterSandstormForeground").UseColor(1.1f, 1f, 0.5f).UseSecondaryColor(0.7f, 0.5f, 0.3f).UseImage("Images/Misc/noise").UseIntensity(0.4f), EffectPriority.High); + Overlays.Scene["Sandstorm"] = (Overlay) new SimpleOverlay("Images/Misc/noise", new SandstormShaderData("FilterSandstormBackground").UseColor(1.1f, 1f, 0.5f).UseSecondaryColor(0.7f, 0.5f, 0.3f).UseImage("Images/Misc/noise").UseIntensity(0.4f), EffectPriority.High, RenderLayers.Landscape); + Filters.Scene["Blizzard"] = new Filter(new BlizzardShaderData("FilterBlizzardForeground").UseColor(1f, 1f, 1f).UseSecondaryColor(0.7f, 0.7f, 1f).UseImage("Images/Misc/noise").UseIntensity(0.4f).UseImageScale(new Vector2(3f, 0.75f)), EffectPriority.High); + Overlays.Scene["Blizzard"] = (Overlay) new SimpleOverlay("Images/Misc/noise", new BlizzardShaderData("FilterBlizzardBackground").UseColor(1f, 1f, 1f).UseSecondaryColor(0.7f, 0.7f, 1f).UseImage("Images/Misc/noise").UseIntensity(0.4f).UseImageScale(new Vector2(3f, 0.75f)), EffectPriority.High, RenderLayers.Landscape); + Filters.Scene["HeatDistortion"] = new Filter(new ScreenShaderData("FilterHeatDistortion").UseImage("Images/Misc/noise").UseIntensity(4f), EffectPriority.Low); + Filters.Scene["WaterDistortion"] = new Filter(new WaterShaderData("FilterWaterDistortion").UseIntensity(1f).UseImage("Images/Misc/noise"), EffectPriority.VeryHigh); + Filters.Scene["CrystalDestructionColor"] = new Filter(new ScreenShaderData("FilterCrystalDestructionColor").UseColor(1f, 0.0f, 0.75f).UseIntensity(1f).UseOpacity(0.8f), EffectPriority.VeryHigh); + Filters.Scene["CrystalDestructionVortex"] = new Filter(new ScreenShaderData("FilterCrystalDestructionVortex").UseImage("Images/Misc/noise"), EffectPriority.VeryHigh); + Filters.Scene["CrystalWin"] = new Filter(new ScreenShaderData("FilterCrystalWin"), EffectPriority.VeryHigh); + Filters.Scene["Test"] = new Filter(new ScreenShaderData("FilterTest"), EffectPriority.VeryHigh); + Filters.Scene["Test2"] = new Filter(new ScreenShaderData("FilterTest2"), EffectPriority.VeryHigh); + Filters.Scene["Test3"] = new Filter(new ScreenShaderData("FilterTest3").UseImage("Images/Extra_" + (object) (short) 156), EffectPriority.VeryHigh); + Overlays.Scene.Load(); + Filters.Scene.Load(); + ScreenEffectInitializer.LoadSkies(); + } + + private static void LoadSkies() + { + SkyManager.Instance["Party"] = (CustomSky) new PartySky(); + SkyManager.Instance["Martian"] = (CustomSky) new MartianSky(); + SkyManager.Instance["Nebula"] = (CustomSky) new NebulaSky(); + SkyManager.Instance["Stardust"] = (CustomSky) new StardustSky(); + SkyManager.Instance["Vortex"] = (CustomSky) new VortexSky(); + SkyManager.Instance["Solar"] = (CustomSky) new SolarSky(); + SkyManager.Instance["Slime"] = (CustomSky) new SlimeSky(); + SkyManager.Instance["MoonLord"] = (CustomSky) new MoonLordSky(false); + SkyManager.Instance["CreditsRoll"] = (CustomSky) new CreditsRollSky(); + SkyManager.Instance["MonolithNebula"] = (CustomSky) new NebulaSky(); + SkyManager.Instance["MonolithStardust"] = (CustomSky) new StardustSky(); + SkyManager.Instance["MonolithVortex"] = (CustomSky) new VortexSky(); + SkyManager.Instance["MonolithSolar"] = (CustomSky) new SolarSky(); + SkyManager.Instance["MonolithMoonLord"] = (CustomSky) new MoonLordSky(true); + SkyManager.Instance["Sandstorm"] = (CustomSky) new SandstormSky(); + SkyManager.Instance["Blizzard"] = (CustomSky) new BlizzardSky(); + SkyManager.Instance["Ambience"] = (CustomSky) new AmbientSky(); + SkyManager.Instance["Lantern"] = (CustomSky) new LanternSky(); + SkyManager.Instance.Load(); + } + } +} diff --git a/Initializers/UILinksInitializer.cs b/Initializers/UILinksInitializer.cs new file mode 100644 index 0000000..5e14406 --- /dev/null +++ b/Initializers/UILinksInitializer.cs @@ -0,0 +1,1691 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Initializers.UILinksInitializer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.GameContent.Tile_Entities; +using Terraria.GameContent.UI.States; +using Terraria.GameInput; +using Terraria.UI; +using Terraria.UI.Gamepad; + +namespace Terraria.Initializers +{ + public class UILinksInitializer + { + public static bool NothingMoreImportantThanNPCChat() => !Main.hairWindow && Main.npcShop == 0 && Main.player[Main.myPlayer].chest == -1; + + public static float HandleSliderHorizontalInput( + float currentValue, + float min, + float max, + float deadZone = 0.2f, + float sensitivity = 0.5f) + { + float x = PlayerInput.GamepadThumbstickLeft.X; + float num = (double) x < -(double) deadZone || (double) x > (double) deadZone ? MathHelper.Lerp(0.0f, sensitivity / 60f, (float) (((double) Math.Abs(x) - (double) deadZone) / (1.0 - (double) deadZone))) * (float) Math.Sign(x) : 0.0f; + return MathHelper.Clamp((float) (((double) currentValue - (double) min) / ((double) max - (double) min)) + num, 0.0f, 1f) * (max - min) + min; + } + + public static float HandleSliderVerticalInput( + float currentValue, + float min, + float max, + float deadZone = 0.2f, + float sensitivity = 0.5f) + { + float num1 = -PlayerInput.GamepadThumbstickLeft.Y; + float num2 = (double) num1 < -(double) deadZone || (double) num1 > (double) deadZone ? MathHelper.Lerp(0.0f, sensitivity / 60f, (float) (((double) Math.Abs(num1) - (double) deadZone) / (1.0 - (double) deadZone))) * (float) Math.Sign(num1) : 0.0f; + return MathHelper.Clamp((float) (((double) currentValue - (double) min) / ((double) max - (double) min)) + num2, 0.0f, 1f) * (max - min) + min; + } + + public static void Load() + { + Func func1 = (Func) (() => PlayerInput.BuildCommand(Lang.misc[53].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"])); + UILinkPage page1 = new UILinkPage(); + page1.UpdateEvent += (Action) (() => PlayerInput.GamepadAllowScrolling = true); + for (int index = 0; index < 20; ++index) + page1.LinkMap.Add(2000 + index, new UILinkPoint(2000 + index, true, -3, -4, -1, -2)); + page1.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[53].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]) + PlayerInput.BuildCommand(Lang.misc[82].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"])); + page1.UpdateEvent += (Action) (() => + { + if (PlayerInput.Triggers.JustPressed.Inventory) + UILinksInitializer.FancyExit(); + UILinkPointNavigator.Shortcuts.BackButtonInUse = PlayerInput.Triggers.JustPressed.Inventory; + UILinksInitializer.HandleOptionsSpecials(); + }); + page1.IsValidEvent += (Func) (() => Main.gameMenu && !Main.MenuUI.IsVisible); + page1.CanEnterEvent += (Func) (() => Main.gameMenu && !Main.MenuUI.IsVisible); + UILinkPointNavigator.RegisterPage(page1, 1000); + UILinkPage cp1 = new UILinkPage(); + cp1.LinkMap.Add(2500, new UILinkPoint(2500, true, -3, 2501, -1, -2)); + cp1.LinkMap.Add(2501, new UILinkPoint(2501, true, 2500, 2502, -1, -2)); + cp1.LinkMap.Add(2502, new UILinkPoint(2502, true, 2501, 2503, -1, -2)); + cp1.LinkMap.Add(2503, new UILinkPoint(2503, true, 2502, -4, -1, -2)); + cp1.UpdateEvent += (Action) (() => + { + cp1.LinkMap[2501].Right = UILinkPointNavigator.Shortcuts.NPCCHAT_ButtonsRight ? 2502 : -4; + if (cp1.LinkMap[2501].Right == -4 && UILinkPointNavigator.Shortcuts.NPCCHAT_ButtonsRight2) + cp1.LinkMap[2501].Right = 2503; + cp1.LinkMap[2502].Right = UILinkPointNavigator.Shortcuts.NPCCHAT_ButtonsRight2 ? 2503 : -4; + cp1.LinkMap[2503].Left = UILinkPointNavigator.Shortcuts.NPCCHAT_ButtonsRight ? 2502 : 2501; + }); + cp1.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[53].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]) + PlayerInput.BuildCommand(Lang.misc[56].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"])); + cp1.IsValidEvent += (Func) (() => (Main.player[Main.myPlayer].talkNPC != -1 || Main.player[Main.myPlayer].sign != -1) && UILinksInitializer.NothingMoreImportantThanNPCChat()); + cp1.CanEnterEvent += (Func) (() => (Main.player[Main.myPlayer].talkNPC != -1 || Main.player[Main.myPlayer].sign != -1) && UILinksInitializer.NothingMoreImportantThanNPCChat()); + cp1.EnterEvent += (Action) (() => Main.player[Main.myPlayer].releaseInventory = false); + cp1.LeaveEvent += (Action) (() => + { + Main.npcChatRelease = false; + Main.player[Main.myPlayer].LockGamepadTileInteractions(); + }); + UILinkPointNavigator.RegisterPage(cp1, 1003); + UILinkPage cp2 = new UILinkPage(); + cp2.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + Func func2 = (Func) (() => + { + int currentPoint = UILinkPointNavigator.CurrentPoint; + return ItemSlot.GetGamepadInstructions(Main.player[Main.myPlayer].inventory, slot: currentPoint); + }); + Func func3 = (Func) (() => ItemSlot.GetGamepadInstructions(ref Main.player[Main.myPlayer].trashItem, 6)); + for (int index = 0; index <= 49; ++index) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index, true, index - 1, index + 1, index - 10, index + 10); + uiLinkPoint.OnSpecialInteracts += func2; + int num = index; + if (num < 10) + uiLinkPoint.Up = -1; + if (num >= 40) + uiLinkPoint.Down = -2; + if (num % 10 == 9) + uiLinkPoint.Right = -4; + if (num % 10 == 0) + uiLinkPoint.Left = -3; + cp2.LinkMap.Add(index, uiLinkPoint); + } + cp2.LinkMap[9].Right = 0; + cp2.LinkMap[19].Right = 50; + cp2.LinkMap[29].Right = 51; + cp2.LinkMap[39].Right = 52; + cp2.LinkMap[49].Right = 53; + cp2.LinkMap[0].Left = 9; + cp2.LinkMap[10].Left = 54; + cp2.LinkMap[20].Left = 55; + cp2.LinkMap[30].Left = 56; + cp2.LinkMap[40].Left = 57; + cp2.LinkMap.Add(300, new UILinkPoint(300, true, 309, 310, 49, -2)); + cp2.LinkMap.Add(309, new UILinkPoint(309, true, 310, 300, 302, 54)); + cp2.LinkMap.Add(310, new UILinkPoint(310, true, 300, 309, 301, 50)); + cp2.LinkMap.Add(301, new UILinkPoint(301, true, 300, 302, 53, 50)); + cp2.LinkMap.Add(302, new UILinkPoint(302, true, 301, 310, 57, 54)); + cp2.LinkMap.Add(311, new UILinkPoint(311, true, -3, -4, 40, -2)); + cp2.LinkMap[301].OnSpecialInteracts += func1; + cp2.LinkMap[302].OnSpecialInteracts += func1; + cp2.LinkMap[309].OnSpecialInteracts += func1; + cp2.LinkMap[310].OnSpecialInteracts += func1; + cp2.LinkMap[300].OnSpecialInteracts += func3; + cp2.UpdateEvent += (Action) (() => + { + bool inReforgeMenu = Main.InReforgeMenu; + bool flag1 = Main.player[Main.myPlayer].chest != -1; + bool flag2 = (uint) Main.npcShop > 0U; + TileEntity tileEntity = Main.LocalPlayer.tileEntityAnchor.GetTileEntity(); + bool flag3 = tileEntity is TEHatRack; + bool flag4 = tileEntity is TEDisplayDoll; + for (int key = 40; key <= 49; ++key) + cp2.LinkMap[key].Down = !inReforgeMenu ? (!flag1 ? (!flag2 ? (key != 40 ? -2 : 311) : 2700 + key - 40) : 400 + key - 40) : (key < 45 ? 303 : 304); + if (flag4) + { + for (int key = 40; key <= 47; ++key) + cp2.LinkMap[key].Down = 5100 + key - 40; + } + if (flag3) + { + for (int key = 44; key <= 45; ++key) + cp2.LinkMap[key].Down = 5000 + key - 44; + } + if (flag1) + { + cp2.LinkMap[300].Up = 439; + cp2.LinkMap[300].Right = -4; + cp2.LinkMap[300].Left = 309; + cp2.LinkMap[309].Up = 438; + cp2.LinkMap[309].Right = 300; + cp2.LinkMap[309].Left = 310; + cp2.LinkMap[310].Up = 437; + cp2.LinkMap[310].Right = 309; + cp2.LinkMap[310].Left = -3; + } + else if (flag2) + { + cp2.LinkMap[300].Up = 2739; + cp2.LinkMap[300].Right = -4; + cp2.LinkMap[300].Left = 309; + cp2.LinkMap[309].Up = 2738; + cp2.LinkMap[309].Right = 300; + cp2.LinkMap[309].Left = 310; + cp2.LinkMap[310].Up = 2737; + cp2.LinkMap[310].Right = 309; + cp2.LinkMap[310].Left = -3; + } + else + { + cp2.LinkMap[49].Down = 300; + cp2.LinkMap[48].Down = 309; + cp2.LinkMap[47].Down = 310; + cp2.LinkMap[300].Up = 49; + cp2.LinkMap[300].Right = 301; + cp2.LinkMap[300].Left = 309; + cp2.LinkMap[309].Up = 48; + cp2.LinkMap[309].Right = 300; + cp2.LinkMap[309].Left = 310; + cp2.LinkMap[310].Up = 47; + cp2.LinkMap[310].Right = 309; + cp2.LinkMap[310].Left = 302; + } + cp2.LinkMap[0].Left = 9; + cp2.LinkMap[10].Left = 54; + cp2.LinkMap[20].Left = 55; + cp2.LinkMap[30].Left = 56; + cp2.LinkMap[40].Left = 57; + if (UILinkPointNavigator.Shortcuts.BUILDERACCCOUNT > 0) + cp2.LinkMap[0].Left = 6000; + if (UILinkPointNavigator.Shortcuts.BUILDERACCCOUNT > 2) + cp2.LinkMap[10].Left = 6002; + if (UILinkPointNavigator.Shortcuts.BUILDERACCCOUNT > 4) + cp2.LinkMap[20].Left = 6004; + if (UILinkPointNavigator.Shortcuts.BUILDERACCCOUNT > 6) + cp2.LinkMap[30].Left = 6006; + if (UILinkPointNavigator.Shortcuts.BUILDERACCCOUNT > 8) + cp2.LinkMap[40].Left = 6008; + cp2.PageOnLeft = 9; + if (Main.CreativeMenu.Enabled) + cp2.PageOnLeft = 1005; + if (!Main.InReforgeMenu) + return; + cp2.PageOnLeft = 5; + }); + cp2.IsValidEvent += (Func) (() => Main.playerInventory); + cp2.PageOnLeft = 9; + cp2.PageOnRight = 2; + UILinkPointNavigator.RegisterPage(cp2, 0); + UILinkPage cp3 = new UILinkPage(); + cp3.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + Func func4 = (Func) (() => + { + int currentPoint = UILinkPointNavigator.CurrentPoint; + return ItemSlot.GetGamepadInstructions(Main.player[Main.myPlayer].inventory, 1, currentPoint); + }); + for (int index = 50; index <= 53; ++index) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index, true, -3, -4, index - 1, index + 1); + uiLinkPoint.OnSpecialInteracts += func4; + cp3.LinkMap.Add(index, uiLinkPoint); + } + cp3.LinkMap[50].Left = 19; + cp3.LinkMap[51].Left = 29; + cp3.LinkMap[52].Left = 39; + cp3.LinkMap[53].Left = 49; + cp3.LinkMap[50].Right = 54; + cp3.LinkMap[51].Right = 55; + cp3.LinkMap[52].Right = 56; + cp3.LinkMap[53].Right = 57; + cp3.LinkMap[50].Up = -1; + cp3.LinkMap[53].Down = -2; + cp3.UpdateEvent += (Action) (() => + { + if (Main.player[Main.myPlayer].chest == -1 && Main.npcShop == 0) + { + cp3.LinkMap[50].Up = 301; + cp3.LinkMap[53].Down = 301; + } + else + { + cp3.LinkMap[50].Up = 504; + cp3.LinkMap[53].Down = 500; + } + }); + cp3.IsValidEvent += (Func) (() => Main.playerInventory); + cp3.PageOnLeft = 0; + cp3.PageOnRight = 2; + UILinkPointNavigator.RegisterPage(cp3, 1); + UILinkPage cp4 = new UILinkPage(); + cp4.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + Func func5 = (Func) (() => + { + int currentPoint = UILinkPointNavigator.CurrentPoint; + return ItemSlot.GetGamepadInstructions(Main.player[Main.myPlayer].inventory, 2, currentPoint); + }); + for (int index = 54; index <= 57; ++index) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index, true, -3, -4, index - 1, index + 1); + uiLinkPoint.OnSpecialInteracts += func5; + cp4.LinkMap.Add(index, uiLinkPoint); + } + cp4.LinkMap[54].Left = 50; + cp4.LinkMap[55].Left = 51; + cp4.LinkMap[56].Left = 52; + cp4.LinkMap[57].Left = 53; + cp4.LinkMap[54].Right = 10; + cp4.LinkMap[55].Right = 20; + cp4.LinkMap[56].Right = 30; + cp4.LinkMap[57].Right = 40; + cp4.LinkMap[54].Up = -1; + cp4.LinkMap[57].Down = -2; + cp4.UpdateEvent += (Action) (() => + { + if (Main.player[Main.myPlayer].chest == -1 && Main.npcShop == 0) + { + cp4.LinkMap[54].Up = 302; + cp4.LinkMap[57].Down = 302; + } + else + { + cp4.LinkMap[54].Up = 504; + cp4.LinkMap[57].Down = 500; + } + }); + cp4.PageOnLeft = 0; + cp4.PageOnRight = 8; + UILinkPointNavigator.RegisterPage(cp4, 2); + UILinkPage cp5 = new UILinkPage(); + cp5.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + Func func6 = (Func) (() => + { + int slot = UILinkPointNavigator.CurrentPoint - 100; + return ItemSlot.GetGamepadInstructions(Main.player[Main.myPlayer].armor, slot < 10 ? 8 : 9, slot); + }); + Func func7 = (Func) (() => + { + int slot = UILinkPointNavigator.CurrentPoint - 120; + return ItemSlot.GetGamepadInstructions(Main.player[Main.myPlayer].dye, 12, slot); + }); + for (int index = 100; index <= 119; ++index) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index, true, index + 10, index - 10, index - 1, index + 1); + uiLinkPoint.OnSpecialInteracts += func6; + int num = index - 100; + if (num == 0) + uiLinkPoint.Up = 305; + if (num == 10) + uiLinkPoint.Up = 306; + if (num == 9 || num == 19) + uiLinkPoint.Down = -2; + if (num >= 10) + uiLinkPoint.Left = 120 + num % 10; + else + uiLinkPoint.Right = -4; + cp5.LinkMap.Add(index, uiLinkPoint); + } + for (int index = 120; index <= 129; ++index) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index, true, -3, index - 10, index - 1, index + 1); + uiLinkPoint.OnSpecialInteracts += func7; + int num = index - 120; + if (num == 0) + uiLinkPoint.Up = 307; + if (num == 9) + { + uiLinkPoint.Down = 308; + uiLinkPoint.Left = 1557; + } + if (num == 8) + uiLinkPoint.Left = 1570; + cp5.LinkMap.Add(index, uiLinkPoint); + } + cp5.IsValidEvent += (Func) (() => Main.playerInventory && Main.EquipPage == 0); + cp5.UpdateEvent += (Action) (() => + { + int num1 = 107; + int accessorySlotsToShow = Main.player[Main.myPlayer].GetAmountOfExtraAccessorySlotsToShow(); + for (int index = 0; index < accessorySlotsToShow; ++index) + { + cp5.LinkMap[num1 + index].Down = num1 + index + 1; + cp5.LinkMap[num1 - 100 + 120 + index].Down = num1 - 100 + 120 + index + 1; + cp5.LinkMap[num1 + 10 + index].Down = num1 + 10 + index + 1; + } + cp5.LinkMap[num1 + accessorySlotsToShow].Down = 308; + cp5.LinkMap[num1 + 10 + accessorySlotsToShow].Down = 308; + cp5.LinkMap[num1 - 100 + 120 + accessorySlotsToShow].Down = 308; + bool shouldPvpDraw = Main.ShouldPVPDraw; + for (int key = 120; key <= 129; ++key) + { + UILinkPoint link = cp5.LinkMap[key]; + int num2 = key - 120; + link.Left = -3; + if (num2 == 0) + link.Left = shouldPvpDraw ? 1550 : -3; + if (num2 == 1) + link.Left = shouldPvpDraw ? 1552 : -3; + if (num2 == 2) + link.Left = shouldPvpDraw ? 1556 : -3; + if (num2 == 3) + link.Left = UILinkPointNavigator.Shortcuts.INFOACCCOUNT >= 1 ? 1558 : -3; + if (num2 == 4) + link.Left = UILinkPointNavigator.Shortcuts.INFOACCCOUNT >= 5 ? 1562 : -3; + if (num2 == 5) + link.Left = UILinkPointNavigator.Shortcuts.INFOACCCOUNT >= 9 ? 1566 : -3; + } + cp5.LinkMap[num1 - 100 + 120 + accessorySlotsToShow].Left = 1557; + cp5.LinkMap[num1 - 100 + 120 + accessorySlotsToShow - 1].Left = 1570; + }); + cp5.PageOnLeft = 8; + cp5.PageOnRight = 8; + UILinkPointNavigator.RegisterPage(cp5, 3); + UILinkPage page2 = new UILinkPage(); + page2.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + Func func8 = (Func) (() => + { + int slot = UILinkPointNavigator.CurrentPoint - 400; + int context = 4; + Item[] inv = Main.player[Main.myPlayer].bank.item; + switch (Main.player[Main.myPlayer].chest) + { + case -5: + inv = Main.player[Main.myPlayer].bank4.item; + goto case -2; + case -4: + inv = Main.player[Main.myPlayer].bank3.item; + goto case -2; + case -3: + inv = Main.player[Main.myPlayer].bank2.item; + goto case -2; + case -2: + return ItemSlot.GetGamepadInstructions(inv, context, slot); + case -1: + return ""; + default: + inv = Main.chest[Main.player[Main.myPlayer].chest].item; + context = 3; + goto case -2; + } + }); + for (int index = 400; index <= 439; ++index) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index, true, index - 1, index + 1, index - 10, index + 10); + uiLinkPoint.OnSpecialInteracts += func8; + int num = index - 400; + if (num < 10) + uiLinkPoint.Up = 40 + num; + if (num >= 30) + uiLinkPoint.Down = -2; + if (num % 10 == 9) + uiLinkPoint.Right = -4; + if (num % 10 == 0) + uiLinkPoint.Left = -3; + page2.LinkMap.Add(index, uiLinkPoint); + } + page2.LinkMap.Add(500, new UILinkPoint(500, true, 409, -4, 53, 501)); + page2.LinkMap.Add(501, new UILinkPoint(501, true, 419, -4, 500, 502)); + page2.LinkMap.Add(502, new UILinkPoint(502, true, 429, -4, 501, 503)); + page2.LinkMap.Add(503, new UILinkPoint(503, true, 439, -4, 502, 505)); + page2.LinkMap.Add(505, new UILinkPoint(505, true, 439, -4, 503, 504)); + page2.LinkMap.Add(504, new UILinkPoint(504, true, 439, -4, 505, 50)); + page2.LinkMap.Add(506, new UILinkPoint(506, true, 439, -4, 505, 50)); + page2.LinkMap[500].OnSpecialInteracts += func1; + page2.LinkMap[501].OnSpecialInteracts += func1; + page2.LinkMap[502].OnSpecialInteracts += func1; + page2.LinkMap[503].OnSpecialInteracts += func1; + page2.LinkMap[504].OnSpecialInteracts += func1; + page2.LinkMap[505].OnSpecialInteracts += func1; + page2.LinkMap[506].OnSpecialInteracts += func1; + page2.LinkMap[409].Right = 500; + page2.LinkMap[419].Right = 501; + page2.LinkMap[429].Right = 502; + page2.LinkMap[439].Right = 503; + page2.LinkMap[439].Down = 300; + page2.LinkMap[438].Down = 309; + page2.LinkMap[437].Down = 310; + page2.PageOnLeft = 0; + page2.PageOnRight = 0; + page2.DefaultPoint = 400; + UILinkPointNavigator.RegisterPage(page2, 4, false); + page2.IsValidEvent += (Func) (() => Main.playerInventory && Main.player[Main.myPlayer].chest != -1); + UILinkPage page3 = new UILinkPage(); + page3.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + Func func9 = (Func) (() => + { + int slot = UILinkPointNavigator.CurrentPoint - 5100; + return !(Main.LocalPlayer.tileEntityAnchor.GetTileEntity() is TEDisplayDoll tileEntity2) ? "" : tileEntity2.GetItemGamepadInstructions(slot); + }); + for (int index = 5100; index <= 5115; ++index) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index, true, index - 1, index + 1, index - 8, index + 8); + uiLinkPoint.OnSpecialInteracts += func9; + int num = index - 5100; + if (num < 8) + uiLinkPoint.Up = 40 + num; + if (num >= 8) + uiLinkPoint.Down = -2; + if (num % 8 == 7) + uiLinkPoint.Right = -4; + if (num % 8 == 0) + uiLinkPoint.Left = -3; + page3.LinkMap.Add(index, uiLinkPoint); + } + page3.PageOnLeft = 0; + page3.PageOnRight = 0; + page3.DefaultPoint = 5100; + UILinkPointNavigator.RegisterPage(page3, 20, false); + page3.IsValidEvent += (Func) (() => Main.playerInventory && Main.LocalPlayer.tileEntityAnchor.GetTileEntity() is TEDisplayDoll); + UILinkPage page4 = new UILinkPage(); + page4.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + Func func10 = (Func) (() => + { + int slot = UILinkPointNavigator.CurrentPoint - 5000; + return !(Main.LocalPlayer.tileEntityAnchor.GetTileEntity() is TEHatRack tileEntity4) ? "" : tileEntity4.GetItemGamepadInstructions(slot); + }); + for (int index = 5000; index <= 5003; ++index) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index, true, index - 1, index + 1, index - 2, index + 2); + uiLinkPoint.OnSpecialInteracts += func10; + int num = index - 5000; + if (num < 2) + uiLinkPoint.Up = 44 + num; + if (num >= 2) + uiLinkPoint.Down = -2; + if (num % 2 == 1) + uiLinkPoint.Right = -4; + if (num % 2 == 0) + uiLinkPoint.Left = -3; + page4.LinkMap.Add(index, uiLinkPoint); + } + page4.PageOnLeft = 0; + page4.PageOnRight = 0; + page4.DefaultPoint = 5000; + UILinkPointNavigator.RegisterPage(page4, 21, false); + page4.IsValidEvent += (Func) (() => Main.playerInventory && Main.LocalPlayer.tileEntityAnchor.GetTileEntity() is TEHatRack); + UILinkPage page5 = new UILinkPage(); + page5.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + Func func11 = (Func) (() => + { + if (Main.npcShop == 0) + return ""; + int slot = UILinkPointNavigator.CurrentPoint - 2700; + return ItemSlot.GetGamepadInstructions(Main.instance.shop[Main.npcShop].item, 15, slot); + }); + for (int index = 2700; index <= 2739; ++index) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index, true, index - 1, index + 1, index - 10, index + 10); + uiLinkPoint.OnSpecialInteracts += func11; + int num = index - 2700; + if (num < 10) + uiLinkPoint.Up = 40 + num; + if (num >= 30) + uiLinkPoint.Down = -2; + if (num % 10 == 9) + uiLinkPoint.Right = -4; + if (num % 10 == 0) + uiLinkPoint.Left = -3; + page5.LinkMap.Add(index, uiLinkPoint); + } + page5.LinkMap[2739].Down = 300; + page5.LinkMap[2738].Down = 309; + page5.LinkMap[2737].Down = 310; + page5.PageOnLeft = 0; + page5.PageOnRight = 0; + UILinkPointNavigator.RegisterPage(page5, 13); + page5.IsValidEvent += (Func) (() => Main.playerInventory && (uint) Main.npcShop > 0U); + UILinkPage cp6 = new UILinkPage(); + cp6.LinkMap.Add(303, new UILinkPoint(303, true, 304, 304, 40, -2)); + cp6.LinkMap.Add(304, new UILinkPoint(304, true, 303, 303, 40, -2)); + cp6.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + Func func12 = (Func) (() => ItemSlot.GetGamepadInstructions(ref Main.reforgeItem, 5)); + cp6.LinkMap[303].OnSpecialInteracts += func12; + cp6.LinkMap[304].OnSpecialInteracts += (Func) (() => Lang.misc[53].Value); + cp6.UpdateEvent += (Action) (() => + { + if (Main.reforgeItem.type > 0) + { + cp6.LinkMap[303].Left = cp6.LinkMap[303].Right = 304; + } + else + { + if (UILinkPointNavigator.OverridePoint == -1 && cp6.CurrentPoint == 304) + UILinkPointNavigator.ChangePoint(303); + cp6.LinkMap[303].Left = -3; + cp6.LinkMap[303].Right = -4; + } + }); + cp6.IsValidEvent += (Func) (() => Main.playerInventory && Main.InReforgeMenu); + cp6.PageOnLeft = 0; + cp6.PageOnRight = 0; + UILinkPointNavigator.RegisterPage(cp6, 5); + UILinkPage cp7 = new UILinkPage(); + cp7.OnSpecialInteracts += (Func) (() => + { + bool flag5 = UILinkPointNavigator.CurrentPoint == 600; + bool flag6 = !flag5 && WorldGen.IsNPCEvictable(UILinkPointNavigator.Shortcuts.NPCS_LastHovered); + if (PlayerInput.Triggers.JustPressed.Grapple) + { + Point tileCoordinates = Main.player[Main.myPlayer].Center.ToTileCoordinates(); + if (flag5) + { + if (WorldGen.MoveTownNPC(tileCoordinates.X, tileCoordinates.Y, -1)) + Main.NewText(Lang.inter[39].Value, G: (byte) 240, B: (byte) 20); + SoundEngine.PlaySound(12); + } + else if (WorldGen.MoveTownNPC(tileCoordinates.X, tileCoordinates.Y, UILinkPointNavigator.Shortcuts.NPCS_LastHovered)) + { + WorldGen.moveRoom(tileCoordinates.X, tileCoordinates.Y, UILinkPointNavigator.Shortcuts.NPCS_LastHovered); + SoundEngine.PlaySound(12); + } + } + if (PlayerInput.Triggers.JustPressed.SmartSelect) + UILinkPointNavigator.Shortcuts.NPCS_IconsDisplay = !UILinkPointNavigator.Shortcuts.NPCS_IconsDisplay; + if (flag6 && PlayerInput.Triggers.JustPressed.MouseRight) + WorldGen.kickOut(UILinkPointNavigator.Shortcuts.NPCS_LastHovered); + string[] strArray = new string[5] + { + PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]), + PlayerInput.BuildCommand(Lang.misc[64].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"]), + PlayerInput.BuildCommand(Lang.misc[70].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Grapple"]), + PlayerInput.BuildCommand(Lang.misc[69].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["SmartSelect"]), + null + }; + string str; + if (!flag6) + str = ""; + else + str = PlayerInput.BuildCommand("Evict", false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseRight"]); + strArray[4] = str; + return string.Concat(strArray); + }); + for (int index = 600; index <= 650; ++index) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index, true, index + 10, index - 10, index - 1, index + 1); + cp7.LinkMap.Add(index, uiLinkPoint); + } + cp7.UpdateEvent += (Action) (() => + { + int num = UILinkPointNavigator.Shortcuts.NPCS_IconsPerColumn; + if (num == 0) + num = 100; + for (int index = 0; index < 50; ++index) + { + cp7.LinkMap[600 + index].Up = index % num == 0 ? -1 : 600 + index - 1; + if (cp7.LinkMap[600 + index].Up == -1) + cp7.LinkMap[600 + index].Up = index < num * 2 ? (index < num ? 305 : 306) : 307; + cp7.LinkMap[600 + index].Down = (index + 1) % num == 0 || index == UILinkPointNavigator.Shortcuts.NPCS_IconsTotal - 1 ? 308 : 600 + index + 1; + cp7.LinkMap[600 + index].Left = index < UILinkPointNavigator.Shortcuts.NPCS_IconsTotal - num ? 600 + index + num : -3; + cp7.LinkMap[600 + index].Right = index < num ? -4 : 600 + index - num; + } + }); + cp7.IsValidEvent += (Func) (() => Main.playerInventory && Main.EquipPage == 1); + cp7.PageOnLeft = 8; + cp7.PageOnRight = 8; + UILinkPointNavigator.RegisterPage(cp7, 6); + UILinkPage cp8 = new UILinkPage(); + cp8.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + Func func13 = (Func) (() => + { + int slot = UILinkPointNavigator.CurrentPoint - 180; + return ItemSlot.GetGamepadInstructions(Main.player[Main.myPlayer].miscEquips, 20, slot); + }); + Func func14 = (Func) (() => + { + int slot = UILinkPointNavigator.CurrentPoint - 180; + return ItemSlot.GetGamepadInstructions(Main.player[Main.myPlayer].miscEquips, 19, slot); + }); + Func func15 = (Func) (() => + { + int slot = UILinkPointNavigator.CurrentPoint - 180; + return ItemSlot.GetGamepadInstructions(Main.player[Main.myPlayer].miscEquips, 18, slot); + }); + Func func16 = (Func) (() => + { + int slot = UILinkPointNavigator.CurrentPoint - 180; + return ItemSlot.GetGamepadInstructions(Main.player[Main.myPlayer].miscEquips, 17, slot); + }); + Func func17 = (Func) (() => + { + int slot = UILinkPointNavigator.CurrentPoint - 180; + return ItemSlot.GetGamepadInstructions(Main.player[Main.myPlayer].miscEquips, 16, slot); + }); + Func func18 = (Func) (() => + { + int slot = UILinkPointNavigator.CurrentPoint - 185; + return ItemSlot.GetGamepadInstructions(Main.player[Main.myPlayer].miscDyes, 12, slot); + }); + for (int index = 180; index <= 184; ++index) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index, true, 185 + index - 180, -4, index - 1, index + 1); + int num = index - 180; + if (num == 0) + uiLinkPoint.Up = 305; + if (num == 4) + uiLinkPoint.Down = 308; + cp8.LinkMap.Add(index, uiLinkPoint); + switch (index) + { + case 180: + uiLinkPoint.OnSpecialInteracts += func14; + break; + case 181: + uiLinkPoint.OnSpecialInteracts += func13; + break; + case 182: + uiLinkPoint.OnSpecialInteracts += func15; + break; + case 183: + uiLinkPoint.OnSpecialInteracts += func16; + break; + case 184: + uiLinkPoint.OnSpecialInteracts += func17; + break; + } + } + for (int index = 185; index <= 189; ++index) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index, true, -3, index - 5, index - 1, index + 1); + uiLinkPoint.OnSpecialInteracts += func18; + int num = index - 185; + if (num == 0) + uiLinkPoint.Up = 306; + if (num == 4) + uiLinkPoint.Down = 308; + cp8.LinkMap.Add(index, uiLinkPoint); + } + cp8.UpdateEvent += (Action) (() => + { + cp8.LinkMap[184].Down = UILinkPointNavigator.Shortcuts.BUFFS_DRAWN > 0 ? 9000 : 308; + cp8.LinkMap[189].Down = UILinkPointNavigator.Shortcuts.BUFFS_DRAWN > 0 ? 9000 : 308; + }); + cp8.IsValidEvent += (Func) (() => Main.playerInventory && Main.EquipPage == 2); + cp8.PageOnLeft = 8; + cp8.PageOnRight = 8; + UILinkPointNavigator.RegisterPage(cp8, 7); + UILinkPage cp9 = new UILinkPage(); + cp9.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + cp9.LinkMap.Add(305, new UILinkPoint(305, true, 306, -4, 308, -2)); + cp9.LinkMap.Add(306, new UILinkPoint(306, true, 307, 305, 308, -2)); + cp9.LinkMap.Add(307, new UILinkPoint(307, true, -3, 306, 308, -2)); + cp9.LinkMap.Add(308, new UILinkPoint(308, true, -3, -4, -1, 305)); + cp9.LinkMap[305].OnSpecialInteracts += func1; + cp9.LinkMap[306].OnSpecialInteracts += func1; + cp9.LinkMap[307].OnSpecialInteracts += func1; + cp9.LinkMap[308].OnSpecialInteracts += func1; + cp9.UpdateEvent += (Action) (() => + { + switch (Main.EquipPage) + { + case 0: + cp9.LinkMap[305].Down = 100; + cp9.LinkMap[306].Down = 110; + cp9.LinkMap[307].Down = 120; + cp9.LinkMap[308].Up = 108 + Main.player[Main.myPlayer].GetAmountOfExtraAccessorySlotsToShow() - 1; + break; + case 1: + cp9.LinkMap[305].Down = 600; + cp9.LinkMap[306].Down = UILinkPointNavigator.Shortcuts.NPCS_IconsTotal / UILinkPointNavigator.Shortcuts.NPCS_IconsPerColumn > 0 ? 600 + UILinkPointNavigator.Shortcuts.NPCS_IconsPerColumn : -2; + cp9.LinkMap[307].Down = UILinkPointNavigator.Shortcuts.NPCS_IconsTotal / UILinkPointNavigator.Shortcuts.NPCS_IconsPerColumn > 1 ? 600 + UILinkPointNavigator.Shortcuts.NPCS_IconsPerColumn * 2 : -2; + int num = UILinkPointNavigator.Shortcuts.NPCS_IconsPerColumn; + if (num == 0) + num = 100; + if (num == 100) + num = UILinkPointNavigator.Shortcuts.NPCS_IconsTotal; + cp9.LinkMap[308].Up = 600 + num - 1; + break; + case 2: + cp9.LinkMap[305].Down = 180; + cp9.LinkMap[306].Down = 185; + cp9.LinkMap[307].Down = -2; + cp9.LinkMap[308].Up = UILinkPointNavigator.Shortcuts.BUFFS_DRAWN > 0 ? 9000 : 184; + break; + } + cp9.PageOnRight = UILinksInitializer.GetCornerWrapPageIdFromRightToLeft(); + }); + cp9.IsValidEvent += (Func) (() => Main.playerInventory); + cp9.PageOnLeft = 0; + cp9.PageOnRight = 0; + UILinkPointNavigator.RegisterPage(cp9, 8); + UILinkPage cp10 = new UILinkPage(); + cp10.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + Func func19 = (Func) (() => ItemSlot.GetGamepadInstructions(ref Main.guideItem, 7)); + Func HandleItem2 = (Func) (() => Main.mouseItem.type < 1 ? "" : ItemSlot.GetGamepadInstructions(ref Main.mouseItem, 22)); + for (int index = 1500; index < 1550; ++index) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index, true, index, index, -1, -2); + if (index != 1500) + uiLinkPoint.OnSpecialInteracts += HandleItem2; + cp10.LinkMap.Add(index, uiLinkPoint); + } + cp10.LinkMap[1500].OnSpecialInteracts += func19; + cp10.UpdateEvent += (Action) (() => + { + int num3 = UILinkPointNavigator.Shortcuts.CRAFT_CurrentIngridientsCount; + int num4 = num3; + if (Main.numAvailableRecipes > 0) + num4 += 2; + if (num3 < num4) + num3 = num4; + if (UILinkPointNavigator.OverridePoint == -1 && cp10.CurrentPoint > 1500 + num3) + UILinkPointNavigator.ChangePoint(1500); + if (UILinkPointNavigator.OverridePoint == -1 && cp10.CurrentPoint == 1500 && !Main.InGuideCraftMenu) + UILinkPointNavigator.ChangePoint(1501); + for (int index = 1; index < num3; ++index) + { + cp10.LinkMap[1500 + index].Left = 1500 + index - 1; + cp10.LinkMap[1500 + index].Right = index == num3 - 2 ? -4 : 1500 + index + 1; + } + cp10.LinkMap[1501].Left = -3; + if (num3 > 0) + cp10.LinkMap[1500 + num3 - 1].Right = -4; + cp10.LinkMap[1500].Down = num3 >= 2 ? 1502 : -2; + cp10.LinkMap[1500].Left = num3 >= 1 ? 1501 : -3; + cp10.LinkMap[1502].Up = Main.InGuideCraftMenu ? 1500 : -1; + }); + cp10.LinkMap[1501].OnSpecialInteracts += (Func) (() => + { + if (Main.InGuideCraftMenu) + return ""; + string str = ""; + Player player = Main.player[Main.myPlayer]; + bool flag7 = false; + Item createItem = Main.recipe[Main.availableRecipe[Main.focusRecipe]].createItem; + if (Main.mouseItem.type == 0 && createItem.maxStack > 1 && player.ItemSpace(createItem).CanTakeItemToPersonalInventory && !player.HasLockedInventory()) + { + flag7 = true; + if (PlayerInput.Triggers.Current.Grapple && Main.stackSplit <= 1) + { + if (PlayerInput.Triggers.JustPressed.Grapple) + UILinksInitializer.SomeVarsForUILinkers.SequencedCraftingCurrent = Main.recipe[Main.availableRecipe[Main.focusRecipe]]; + ItemSlot.RefreshStackSplitCooldown(); + Main.preventStackSplitReset = true; + if (UILinksInitializer.SomeVarsForUILinkers.SequencedCraftingCurrent == Main.recipe[Main.availableRecipe[Main.focusRecipe]]) + { + Main.CraftItem(Main.recipe[Main.availableRecipe[Main.focusRecipe]]); + Main.mouseItem = player.GetItem(player.whoAmI, Main.mouseItem, new GetItemSettings(NoText: true)); + } + } + } + else if (Main.mouseItem.type > 0 && Main.mouseItem.maxStack == 1 && ItemSlot.Equippable(ref Main.mouseItem)) + { + str += PlayerInput.BuildCommand(Lang.misc[67].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Grapple"]); + if (PlayerInput.Triggers.JustPressed.Grapple) + { + ItemSlot.SwapEquip(ref Main.mouseItem); + if (Main.player[Main.myPlayer].ItemSpace(Main.mouseItem).CanTakeItemToPersonalInventory) + Main.mouseItem = player.GetItem(player.whoAmI, Main.mouseItem, GetItemSettings.InventoryUIToInventorySettings); + } + } + bool flag8 = Main.mouseItem.stack <= 0; + if (flag8 || Main.mouseItem.type == createItem.type && Main.mouseItem.stack < Main.mouseItem.maxStack) + { + if (flag8) + str += PlayerInput.BuildCommand(Lang.misc[72].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"], PlayerInput.ProfileGamepadUI.KeyStatus["MouseRight"]); + else + str += PlayerInput.BuildCommand(Lang.misc[72].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + } + if (!flag8 && Main.mouseItem.type == createItem.type && Main.mouseItem.stack < Main.mouseItem.maxStack) + str += PlayerInput.BuildCommand(Lang.misc[93].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseRight"]); + if (flag7) + str += PlayerInput.BuildCommand(Lang.misc[71].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Grapple"]); + return str + HandleItem2(); + }); + cp10.ReachEndEvent += (Action) ((current, next) => + { + switch (current) + { + case 1500: + break; + case 1501: + switch (next) + { + case -2: + if (Main.focusRecipe >= Main.numAvailableRecipes - 1) + return; + ++Main.focusRecipe; + return; + case -1: + if (Main.focusRecipe <= 0) + return; + --Main.focusRecipe; + return; + default: + return; + } + default: + switch (next) + { + case -2: + if (Main.focusRecipe >= Main.numAvailableRecipes - 1) + return; + UILinkPointNavigator.ChangePoint(1501); + ++Main.focusRecipe; + return; + case -1: + if (Main.focusRecipe <= 0) + return; + UILinkPointNavigator.ChangePoint(1501); + --Main.focusRecipe; + return; + default: + return; + } + } + }); + cp10.EnterEvent += (Action) (() => Main.recBigList = false); + cp10.CanEnterEvent += (Func) (() => + { + if (!Main.playerInventory) + return false; + return Main.numAvailableRecipes > 0 || Main.InGuideCraftMenu; + }); + cp10.IsValidEvent += (Func) (() => + { + if (!Main.playerInventory) + return false; + return Main.numAvailableRecipes > 0 || Main.InGuideCraftMenu; + }); + cp10.PageOnLeft = 10; + cp10.PageOnRight = 0; + UILinkPointNavigator.RegisterPage(cp10, 9); + UILinkPage cp11 = new UILinkPage(); + cp11.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + for (int index1 = 700; index1 < 1500; ++index1) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index1, true, index1, index1, index1, index1); + int IHateLambda = index1; + uiLinkPoint.OnSpecialInteracts += (Func) (() => + { + string str5 = ""; + bool flag = false; + Player player = Main.player[Main.myPlayer]; + if (IHateLambda + Main.recStart < Main.numAvailableRecipes) + { + int index = Main.recStart + IHateLambda - 700; + if (Main.mouseItem.type == 0 && Main.recipe[Main.availableRecipe[index]].createItem.maxStack > 1 && player.ItemSpace(Main.recipe[Main.availableRecipe[index]].createItem).CanTakeItemToPersonalInventory && !player.HasLockedInventory()) + { + flag = true; + if (PlayerInput.Triggers.JustPressed.Grapple) + UILinksInitializer.SomeVarsForUILinkers.SequencedCraftingCurrent = Main.recipe[Main.availableRecipe[index]]; + if (PlayerInput.Triggers.Current.Grapple && Main.stackSplit <= 1) + { + ItemSlot.RefreshStackSplitCooldown(); + if (UILinksInitializer.SomeVarsForUILinkers.SequencedCraftingCurrent == Main.recipe[Main.availableRecipe[index]]) + { + Main.CraftItem(Main.recipe[Main.availableRecipe[index]]); + Main.mouseItem = player.GetItem(player.whoAmI, Main.mouseItem, GetItemSettings.InventoryUIToInventorySettings); + } + } + } + } + string str6 = str5 + PlayerInput.BuildCommand(Lang.misc[73].Value, (!flag ? 1 : 0) != 0, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + if (flag) + str6 += PlayerInput.BuildCommand(Lang.misc[71].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["Grapple"]); + return str6; + }); + cp11.LinkMap.Add(index1, uiLinkPoint); + } + cp11.UpdateEvent += (Action) (() => + { + int num5 = UILinkPointNavigator.Shortcuts.CRAFT_IconsPerRow; + int craftIconsPerColumn = UILinkPointNavigator.Shortcuts.CRAFT_IconsPerColumn; + if (num5 == 0) + num5 = 100; + int num6 = num5 * craftIconsPerColumn; + if (num6 > 800) + num6 = 800; + if (num6 > Main.numAvailableRecipes) + num6 = Main.numAvailableRecipes; + for (int index = 0; index < num6; ++index) + { + cp11.LinkMap[700 + index].Left = index % num5 == 0 ? -3 : 700 + index - 1; + cp11.LinkMap[700 + index].Right = (index + 1) % num5 == 0 || index == Main.numAvailableRecipes - 1 ? -4 : 700 + index + 1; + cp11.LinkMap[700 + index].Down = index < num6 - num5 ? 700 + index + num5 : -2; + cp11.LinkMap[700 + index].Up = index < num5 ? -1 : 700 + index - num5; + } + cp11.PageOnLeft = UILinksInitializer.GetCornerWrapPageIdFromLeftToRight(); + }); + cp11.ReachEndEvent += (Action) ((current, next) => + { + int craftIconsPerRow = UILinkPointNavigator.Shortcuts.CRAFT_IconsPerRow; + switch (next) + { + case -2: + Main.recStart += craftIconsPerRow; + SoundEngine.PlaySound(12); + if (Main.recStart <= Main.numAvailableRecipes - craftIconsPerRow) + break; + Main.recStart = Main.numAvailableRecipes - craftIconsPerRow; + break; + case -1: + Main.recStart -= craftIconsPerRow; + if (Main.recStart >= 0) + break; + Main.recStart = 0; + break; + } + }); + cp11.EnterEvent += (Action) (() => Main.recBigList = true); + cp11.LeaveEvent += (Action) (() => Main.recBigList = false); + cp11.CanEnterEvent += (Func) (() => Main.playerInventory && Main.numAvailableRecipes > 0); + cp11.IsValidEvent += (Func) (() => Main.playerInventory && Main.recBigList && Main.numAvailableRecipes > 0); + cp11.PageOnLeft = 0; + cp11.PageOnRight = 9; + UILinkPointNavigator.RegisterPage(cp11, 10); + UILinkPage cp12 = new UILinkPage(); + cp12.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + for (int index = 2605; index < 2620; ++index) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index, true, index, index, index, index); + uiLinkPoint.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[73].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"])); + cp12.LinkMap.Add(index, uiLinkPoint); + } + cp12.UpdateEvent += (Action) (() => + { + int num7 = 5; + int num8 = 3; + int num9 = num7 * num8; + int count = Main.Hairstyles.AvailableHairstyles.Count; + for (int index = 0; index < num9; ++index) + { + cp12.LinkMap[2605 + index].Left = index % num7 == 0 ? -3 : 2605 + index - 1; + cp12.LinkMap[2605 + index].Right = (index + 1) % num7 == 0 || index == count - 1 ? -4 : 2605 + index + 1; + cp12.LinkMap[2605 + index].Down = index < num9 - num7 ? 2605 + index + num7 : -2; + cp12.LinkMap[2605 + index].Up = index < num7 ? -1 : 2605 + index - num7; + } + }); + cp12.ReachEndEvent += (Action) ((current, next) => + { + int num = 5; + if (next == -1) + { + Main.hairStart -= num; + SoundEngine.PlaySound(12); + } + else + { + if (next != -2) + return; + Main.hairStart += num; + SoundEngine.PlaySound(12); + } + }); + cp12.CanEnterEvent += (Func) (() => Main.hairWindow); + cp12.IsValidEvent += (Func) (() => Main.hairWindow); + cp12.PageOnLeft = 12; + cp12.PageOnRight = 12; + UILinkPointNavigator.RegisterPage(cp12, 11); + UILinkPage page6 = new UILinkPage(); + page6.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + page6.LinkMap.Add(2600, new UILinkPoint(2600, true, -3, -4, -1, 2601)); + page6.LinkMap.Add(2601, new UILinkPoint(2601, true, -3, -4, 2600, 2602)); + page6.LinkMap.Add(2602, new UILinkPoint(2602, true, -3, -4, 2601, 2603)); + page6.LinkMap.Add(2603, new UILinkPoint(2603, true, -3, 2604, 2602, -2)); + page6.LinkMap.Add(2604, new UILinkPoint(2604, true, 2603, -4, 2602, -2)); + page6.UpdateEvent += (Action) (() => + { + Vector3 hsl = Main.rgbToHsl(Main.selColor); + float interfaceDeadzoneX = PlayerInput.CurrentProfile.InterfaceDeadzoneX; + float x = PlayerInput.GamepadThumbstickLeft.X; + float num = (double) x < -(double) interfaceDeadzoneX || (double) x > (double) interfaceDeadzoneX ? MathHelper.Lerp(0.0f, 0.008333334f, (float) (((double) Math.Abs(x) - (double) interfaceDeadzoneX) / (1.0 - (double) interfaceDeadzoneX))) * (float) Math.Sign(x) : 0.0f; + int currentPoint = UILinkPointNavigator.CurrentPoint; + if (currentPoint == 2600) + Main.hBar = MathHelper.Clamp(Main.hBar + num, 0.0f, 1f); + if (currentPoint == 2601) + Main.sBar = MathHelper.Clamp(Main.sBar + num, 0.0f, 1f); + if (currentPoint == 2602) + Main.lBar = MathHelper.Clamp(Main.lBar + num, 0.15f, 1f); + Vector3 zero = Vector3.Zero; + Vector3 one = Vector3.One; + Vector3.Clamp(hsl, zero, one); + if ((double) num == 0.0) + return; + if (Main.hairWindow) + Main.player[Main.myPlayer].hairColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + SoundEngine.PlaySound(12); + }); + page6.CanEnterEvent += (Func) (() => Main.hairWindow); + page6.IsValidEvent += (Func) (() => Main.hairWindow); + page6.PageOnLeft = 11; + page6.PageOnRight = 11; + UILinkPointNavigator.RegisterPage(page6, 12); + UILinkPage cp13 = new UILinkPage(); + for (int index = 0; index < 30; ++index) + { + cp13.LinkMap.Add(2900 + index, new UILinkPoint(2900 + index, true, -3, -4, -1, -2)); + cp13.LinkMap[2900 + index].OnSpecialInteracts += func1; + } + cp13.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + cp13.TravelEvent += (Action) (() => + { + if (UILinkPointNavigator.CurrentPage != cp13.ID) + return; + int num = cp13.CurrentPoint - 2900; + if (num >= 5) + return; + IngameOptions.category = num; + }); + cp13.UpdateEvent += (Action) (() => + { + int num10 = UILinkPointNavigator.Shortcuts.INGAMEOPTIONS_BUTTONS_LEFT; + if (num10 == 0) + num10 = 5; + if (UILinkPointNavigator.OverridePoint == -1 && cp13.CurrentPoint < 2930 && cp13.CurrentPoint > 2900 + num10 - 1) + UILinkPointNavigator.ChangePoint(2900); + for (int key = 2900; key < 2900 + num10; ++key) + { + cp13.LinkMap[key].Up = key - 1; + cp13.LinkMap[key].Down = key + 1; + } + cp13.LinkMap[2900].Up = 2900 + num10 - 1; + cp13.LinkMap[2900 + num10 - 1].Down = 2900; + int num11 = cp13.CurrentPoint - 2900; + if (num11 >= 5 || !PlayerInput.Triggers.JustPressed.MouseLeft) + return; + IngameOptions.category = num11; + UILinkPointNavigator.ChangePage(1002); + }); + cp13.EnterEvent += (Action) (() => cp13.CurrentPoint = 2900 + IngameOptions.category); + cp13.PageOnLeft = cp13.PageOnRight = 1002; + cp13.IsValidEvent += (Func) (() => Main.ingameOptionsWindow && !Main.InGameUI.IsVisible); + cp13.CanEnterEvent += (Func) (() => Main.ingameOptionsWindow && !Main.InGameUI.IsVisible); + UILinkPointNavigator.RegisterPage(cp13, 1001); + UILinkPage cp14 = new UILinkPage(); + for (int index = 0; index < 30; ++index) + { + cp14.LinkMap.Add(2930 + index, new UILinkPoint(2930 + index, true, -3, -4, -1, -2)); + cp14.LinkMap[2930 + index].OnSpecialInteracts += func1; + } + cp14.EnterEvent += (Action) (() => Main.mouseLeftRelease = false); + cp14.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + cp14.UpdateEvent += (Action) (() => + { + int num12 = UILinkPointNavigator.Shortcuts.INGAMEOPTIONS_BUTTONS_RIGHT; + if (num12 == 0) + num12 = 5; + if (UILinkPointNavigator.OverridePoint == -1 && cp14.CurrentPoint >= 2930 && cp14.CurrentPoint > 2930 + num12 - 1) + UILinkPointNavigator.ChangePoint(2930); + for (int key = 2930; key < 2930 + num12; ++key) + { + cp14.LinkMap[key].Up = key - 1; + cp14.LinkMap[key].Down = key + 1; + } + cp14.LinkMap[2930].Up = -1; + cp14.LinkMap[2930 + num12 - 1].Down = -2; + int num13 = PlayerInput.Triggers.JustPressed.Inventory ? 1 : 0; + UILinksInitializer.HandleOptionsSpecials(); + }); + cp14.PageOnLeft = cp14.PageOnRight = 1001; + cp14.IsValidEvent += (Func) (() => Main.ingameOptionsWindow); + cp14.CanEnterEvent += (Func) (() => Main.ingameOptionsWindow); + UILinkPointNavigator.RegisterPage(cp14, 1002); + UILinkPage cp15 = new UILinkPage(); + cp15.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + for (int index = 1550; index < 1558; ++index) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index, true, -3, -4, -1, -2); + switch (index - 1550) + { + case 1: + case 3: + case 5: + uiLinkPoint.Up = uiLinkPoint.ID - 2; + uiLinkPoint.Down = uiLinkPoint.ID + 2; + uiLinkPoint.Right = uiLinkPoint.ID + 1; + break; + case 2: + case 4: + case 6: + uiLinkPoint.Up = uiLinkPoint.ID - 2; + uiLinkPoint.Down = uiLinkPoint.ID + 2; + uiLinkPoint.Left = uiLinkPoint.ID - 1; + break; + } + cp15.LinkMap.Add(index, uiLinkPoint); + } + cp15.LinkMap[1550].Down = 1551; + cp15.LinkMap[1550].Right = 120; + cp15.LinkMap[1550].Up = 307; + cp15.LinkMap[1551].Up = 1550; + cp15.LinkMap[1552].Up = 1550; + cp15.LinkMap[1552].Right = 121; + cp15.LinkMap[1554].Right = 121; + cp15.LinkMap[1555].Down = 1570; + cp15.LinkMap[1556].Down = 1570; + cp15.LinkMap[1556].Right = 122; + cp15.LinkMap[1557].Up = 1570; + cp15.LinkMap[1557].Down = 308; + cp15.LinkMap[1557].Right = (int) sbyte.MaxValue; + cp15.LinkMap.Add(1570, new UILinkPoint(1570, true, -3, -4, -1, -2)); + cp15.LinkMap[1570].Up = 1555; + cp15.LinkMap[1570].Down = 1557; + cp15.LinkMap[1570].Right = 126; + for (int index = 0; index < 7; ++index) + cp15.LinkMap[1550 + index].OnSpecialInteracts += func1; + cp15.UpdateEvent += (Action) (() => + { + if (!Main.ShouldPVPDraw) + { + if (UILinkPointNavigator.OverridePoint == -1 && cp15.CurrentPoint != 1557 && cp15.CurrentPoint != 1570) + UILinkPointNavigator.ChangePoint(1557); + cp15.LinkMap[1570].Up = -1; + cp15.LinkMap[1557].Down = 308; + cp15.LinkMap[1557].Right = (int) sbyte.MaxValue; + } + else + { + cp15.LinkMap[1570].Up = 1555; + cp15.LinkMap[1557].Down = 308; + cp15.LinkMap[1557].Right = (int) sbyte.MaxValue; + } + int infoacccount = UILinkPointNavigator.Shortcuts.INFOACCCOUNT; + if (infoacccount > 0) + cp15.LinkMap[1570].Up = 1558 + (infoacccount - 1) / 2 * 2; + if (!Main.ShouldPVPDraw) + return; + if (infoacccount >= 1) + { + cp15.LinkMap[1555].Down = 1558; + cp15.LinkMap[1556].Down = 1558; + } + else + { + cp15.LinkMap[1555].Down = 1570; + cp15.LinkMap[1556].Down = 1570; + } + if (infoacccount >= 2) + cp15.LinkMap[1556].Down = 1559; + else + cp15.LinkMap[1556].Down = 1570; + }); + cp15.IsValidEvent += (Func) (() => Main.playerInventory); + cp15.PageOnLeft = 8; + cp15.PageOnRight = 8; + UILinkPointNavigator.RegisterPage(cp15, 16); + UILinkPage cp16 = new UILinkPage(); + cp16.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + for (int index = 1558; index < 1570; ++index) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index, true, -3, -4, -1, -2); + uiLinkPoint.OnSpecialInteracts += func1; + switch (index - 1558) + { + case 1: + case 3: + case 5: + uiLinkPoint.Up = uiLinkPoint.ID - 2; + uiLinkPoint.Down = uiLinkPoint.ID + 2; + uiLinkPoint.Right = uiLinkPoint.ID + 1; + break; + case 2: + case 4: + case 6: + uiLinkPoint.Up = uiLinkPoint.ID - 2; + uiLinkPoint.Down = uiLinkPoint.ID + 2; + uiLinkPoint.Left = uiLinkPoint.ID - 1; + break; + } + cp16.LinkMap.Add(index, uiLinkPoint); + } + cp16.UpdateEvent += (Action) (() => + { + int infoacccount = UILinkPointNavigator.Shortcuts.INFOACCCOUNT; + if (UILinkPointNavigator.OverridePoint == -1 && cp16.CurrentPoint - 1558 >= infoacccount) + UILinkPointNavigator.ChangePoint(1558 + infoacccount - 1); + for (int index = 0; index < infoacccount; ++index) + { + bool flag = index % 2 == 0; + int key = index + 1558; + cp16.LinkMap[key].Down = index < infoacccount - 2 ? key + 2 : 1570; + cp16.LinkMap[key].Up = index > 1 ? key - 2 : (Main.ShouldPVPDraw ? (flag ? 1555 : 1556) : -1); + cp16.LinkMap[key].Right = !flag || index + 1 >= infoacccount ? 123 + index / 4 : key + 1; + cp16.LinkMap[key].Left = flag ? -3 : key - 1; + } + }); + cp16.IsValidEvent += (Func) (() => Main.playerInventory && UILinkPointNavigator.Shortcuts.INFOACCCOUNT > 0); + cp16.PageOnLeft = 8; + cp16.PageOnRight = 8; + UILinkPointNavigator.RegisterPage(cp16, 17); + UILinkPage cp17 = new UILinkPage(); + cp17.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + for (int index = 6000; index < 6012; ++index) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index, true, -3, -4, -1, -2); + switch (index - 6000) + { + case 0: + uiLinkPoint.Right = 0; + break; + case 1: + case 2: + uiLinkPoint.Right = 10; + break; + case 3: + case 4: + uiLinkPoint.Right = 20; + break; + case 5: + case 6: + uiLinkPoint.Right = 30; + break; + default: + uiLinkPoint.Right = 40; + break; + } + cp17.LinkMap.Add(index, uiLinkPoint); + } + cp17.UpdateEvent += (Action) (() => + { + int builderacccount = UILinkPointNavigator.Shortcuts.BUILDERACCCOUNT; + if (UILinkPointNavigator.OverridePoint == -1 && cp17.CurrentPoint - 6000 >= builderacccount) + UILinkPointNavigator.ChangePoint(6000 + builderacccount - 1); + for (int index = 0; index < builderacccount; ++index) + { + int num = index % 2; + int key = index + 6000; + cp17.LinkMap[key].Down = index < builderacccount - 1 ? key + 1 : -2; + cp17.LinkMap[key].Up = index > 0 ? key - 1 : -1; + } + }); + cp17.IsValidEvent += (Func) (() => Main.playerInventory && UILinkPointNavigator.Shortcuts.BUILDERACCCOUNT > 0); + cp17.PageOnLeft = 8; + cp17.PageOnRight = 8; + UILinkPointNavigator.RegisterPage(cp17, 18); + UILinkPage page7 = new UILinkPage(); + page7.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + page7.LinkMap.Add(2806, new UILinkPoint(2806, true, 2805, 2807, -1, 2808)); + page7.LinkMap.Add(2807, new UILinkPoint(2807, true, 2806, 2810, -1, 2809)); + page7.LinkMap.Add(2808, new UILinkPoint(2808, true, 2805, 2809, 2806, -2)); + page7.LinkMap.Add(2809, new UILinkPoint(2809, true, 2808, 2811, 2807, -2)); + page7.LinkMap.Add(2810, new UILinkPoint(2810, true, 2807, -4, -1, 2811)); + page7.LinkMap.Add(2811, new UILinkPoint(2811, true, 2809, -4, 2810, -2)); + page7.LinkMap.Add(2805, new UILinkPoint(2805, true, -3, 2806, -1, -2)); + page7.LinkMap[2806].OnSpecialInteracts += func1; + page7.LinkMap[2807].OnSpecialInteracts += func1; + page7.LinkMap[2808].OnSpecialInteracts += func1; + page7.LinkMap[2809].OnSpecialInteracts += func1; + page7.LinkMap[2805].OnSpecialInteracts += func1; + page7.CanEnterEvent += (Func) (() => Main.clothesWindow); + page7.IsValidEvent += (Func) (() => Main.clothesWindow); + page7.EnterEvent += (Action) (() => Main.player[Main.myPlayer].releaseInventory = false); + page7.LeaveEvent += (Action) (() => Main.player[Main.myPlayer].LockGamepadTileInteractions()); + page7.PageOnLeft = 15; + page7.PageOnRight = 15; + UILinkPointNavigator.RegisterPage(page7, 14); + UILinkPage page8 = new UILinkPage(); + page8.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, true, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + page8.LinkMap.Add(2800, new UILinkPoint(2800, true, -3, -4, -1, 2801)); + page8.LinkMap.Add(2801, new UILinkPoint(2801, true, -3, -4, 2800, 2802)); + page8.LinkMap.Add(2802, new UILinkPoint(2802, true, -3, -4, 2801, 2803)); + page8.LinkMap.Add(2803, new UILinkPoint(2803, true, -3, 2804, 2802, -2)); + page8.LinkMap.Add(2804, new UILinkPoint(2804, true, 2803, -4, 2802, -2)); + page8.LinkMap[2800].OnSpecialInteracts += func1; + page8.LinkMap[2801].OnSpecialInteracts += func1; + page8.LinkMap[2802].OnSpecialInteracts += func1; + page8.LinkMap[2803].OnSpecialInteracts += func1; + page8.LinkMap[2804].OnSpecialInteracts += func1; + page8.UpdateEvent += (Action) (() => + { + Vector3 hsl = Main.rgbToHsl(Main.selColor); + float interfaceDeadzoneX = PlayerInput.CurrentProfile.InterfaceDeadzoneX; + float x = PlayerInput.GamepadThumbstickLeft.X; + float num = (double) x < -(double) interfaceDeadzoneX || (double) x > (double) interfaceDeadzoneX ? MathHelper.Lerp(0.0f, 0.008333334f, (float) (((double) Math.Abs(x) - (double) interfaceDeadzoneX) / (1.0 - (double) interfaceDeadzoneX))) * (float) Math.Sign(x) : 0.0f; + int currentPoint = UILinkPointNavigator.CurrentPoint; + if (currentPoint == 2800) + Main.hBar = MathHelper.Clamp(Main.hBar + num, 0.0f, 1f); + if (currentPoint == 2801) + Main.sBar = MathHelper.Clamp(Main.sBar + num, 0.0f, 1f); + if (currentPoint == 2802) + Main.lBar = MathHelper.Clamp(Main.lBar + num, 0.15f, 1f); + Vector3 zero = Vector3.Zero; + Vector3 one = Vector3.One; + Vector3.Clamp(hsl, zero, one); + if ((double) num == 0.0) + return; + if (Main.clothesWindow) + { + Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + switch (Main.selClothes) + { + case 0: + Main.player[Main.myPlayer].shirtColor = Main.selColor; + break; + case 1: + Main.player[Main.myPlayer].underShirtColor = Main.selColor; + break; + case 2: + Main.player[Main.myPlayer].pantsColor = Main.selColor; + break; + case 3: + Main.player[Main.myPlayer].shoeColor = Main.selColor; + break; + } + } + SoundEngine.PlaySound(12); + }); + page8.CanEnterEvent += (Func) (() => Main.clothesWindow); + page8.IsValidEvent += (Func) (() => Main.clothesWindow); + page8.EnterEvent += (Action) (() => Main.player[Main.myPlayer].releaseInventory = false); + page8.LeaveEvent += (Action) (() => Main.player[Main.myPlayer].LockGamepadTileInteractions()); + page8.PageOnLeft = 14; + page8.PageOnRight = 14; + UILinkPointNavigator.RegisterPage(page8, 15); + UILinkPage cp18 = new UILinkPage(); + cp18.UpdateEvent += (Action) (() => PlayerInput.GamepadAllowScrolling = true); + for (int index = 3000; index <= 4999; ++index) + cp18.LinkMap.Add(index, new UILinkPoint(index, true, -3, -4, -1, -2)); + cp18.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[53].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]) + PlayerInput.BuildCommand(Lang.misc[82].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + UILinksInitializer.FancyUISpecialInstructions()); + cp18.UpdateEvent += (Action) (() => + { + if (PlayerInput.Triggers.JustPressed.Inventory) + UILinksInitializer.FancyExit(); + UILinkPointNavigator.Shortcuts.BackButtonInUse = false; + }); + cp18.EnterEvent += (Action) (() => cp18.CurrentPoint = 3002); + cp18.CanEnterEvent += (Func) (() => Main.MenuUI.IsVisible || Main.InGameUI.IsVisible); + cp18.IsValidEvent += (Func) (() => Main.MenuUI.IsVisible || Main.InGameUI.IsVisible); + cp18.OnPageMoveAttempt += new Action(UILinksInitializer.OnFancyUIPageMoveAttempt); + UILinkPointNavigator.RegisterPage(cp18, 1004); + UILinkPage cp19 = new UILinkPage(); + cp19.UpdateEvent += (Action) (() => PlayerInput.GamepadAllowScrolling = true); + for (int index = 10000; index <= 11000; ++index) + cp19.LinkMap.Add(index, new UILinkPoint(index, true, -3, -4, -1, -2)); + for (int index = 15000; index <= 15000; ++index) + cp19.LinkMap.Add(index, new UILinkPoint(index, true, -3, -4, -1, -2)); + cp19.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[53].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]) + PlayerInput.BuildCommand(Lang.misc[82].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + UILinksInitializer.FancyUISpecialInstructions()); + cp19.UpdateEvent += (Action) (() => + { + if (PlayerInput.Triggers.JustPressed.Inventory) + UILinksInitializer.FancyExit(); + UILinkPointNavigator.Shortcuts.BackButtonInUse = false; + }); + cp19.EnterEvent += (Action) (() => cp19.CurrentPoint = 10000); + cp19.CanEnterEvent += new Func(UILinksInitializer.CanEnterCreativeMenu); + cp19.IsValidEvent += new Func(UILinksInitializer.CanEnterCreativeMenu); + cp19.OnPageMoveAttempt += new Action(UILinksInitializer.OnFancyUIPageMoveAttempt); + cp19.PageOnLeft = 8; + cp19.PageOnRight = 0; + UILinkPointNavigator.RegisterPage(cp19, 1005); + UILinkPage cp20 = new UILinkPage(); + cp20.OnSpecialInteracts += (Func) (() => PlayerInput.BuildCommand(Lang.misc[56].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Inventory"]) + PlayerInput.BuildCommand(Lang.misc[64].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"], PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"])); + Func func20 = (Func) (() => PlayerInput.BuildCommand(Lang.misc[94].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"])); + for (int index = 9000; index <= 9050; ++index) + { + UILinkPoint uiLinkPoint = new UILinkPoint(index, true, index + 10, index - 10, index - 1, index + 1); + cp20.LinkMap.Add(index, uiLinkPoint); + uiLinkPoint.OnSpecialInteracts += func20; + } + cp20.UpdateEvent += (Action) (() => + { + int num = UILinkPointNavigator.Shortcuts.BUFFS_PER_COLUMN; + if (num == 0) + num = 100; + for (int index = 0; index < 50; ++index) + { + cp20.LinkMap[9000 + index].Up = index % num == 0 ? -1 : 9000 + index - 1; + if (cp20.LinkMap[9000 + index].Up == -1) + cp20.LinkMap[9000 + index].Up = index < num ? 189 : 184; + cp20.LinkMap[9000 + index].Down = (index + 1) % num == 0 || index == UILinkPointNavigator.Shortcuts.BUFFS_DRAWN - 1 ? 308 : 9000 + index + 1; + cp20.LinkMap[9000 + index].Left = index < UILinkPointNavigator.Shortcuts.BUFFS_DRAWN - num ? 9000 + index + num : -3; + cp20.LinkMap[9000 + index].Right = index < num ? -4 : 9000 + index - num; + } + }); + cp20.IsValidEvent += (Func) (() => Main.playerInventory && Main.EquipPage == 2 && UILinkPointNavigator.Shortcuts.BUFFS_DRAWN > 0); + cp20.PageOnLeft = 8; + cp20.PageOnRight = 8; + UILinkPointNavigator.RegisterPage(cp20, 19); + UILinkPage page9 = UILinkPointNavigator.Pages[UILinkPointNavigator.CurrentPage]; + page9.CurrentPoint = page9.DefaultPoint; + page9.Enter(); + } + + private static bool CanEnterCreativeMenu() => Main.LocalPlayer.chest == -1 && Main.LocalPlayer.talkNPC == -1 && Main.playerInventory && Main.CreativeMenu.Enabled; + + private static int GetCornerWrapPageIdFromLeftToRight() => 8; + + private static int GetCornerWrapPageIdFromRightToLeft() => Main.CreativeMenu.Enabled ? 1005 : 10; + + private static void OnFancyUIPageMoveAttempt(int direction) + { + if (Main.MenuUI.CurrentState is UICharacterCreation currentState1) + currentState1.TryMovingCategory(direction); + if (!(UserInterface.ActiveInstance.CurrentState is UIBestiaryTest currentState2)) + return; + currentState2.TryMovingPages(direction); + } + + public static void FancyExit() + { + switch (UILinkPointNavigator.Shortcuts.BackButtonCommand) + { + case 1: + SoundEngine.PlaySound(11); + Main.menuMode = 0; + break; + case 2: + SoundEngine.PlaySound(11); + Main.menuMode = Main.menuMultiplayer ? 12 : 1; + break; + case 3: + Main.menuMode = 0; + IngameFancyUI.Close(); + break; + case 4: + SoundEngine.PlaySound(11); + Main.menuMode = 11; + break; + case 5: + SoundEngine.PlaySound(11); + Main.menuMode = 11; + break; + case 6: + UIVirtualKeyboard.Cancel(); + break; + } + } + + public static string FancyUISpecialInstructions() + { + string str1 = ""; + if (UILinkPointNavigator.Shortcuts.FANCYUI_SPECIAL_INSTRUCTIONS == 1) + { + if (PlayerInput.Triggers.JustPressed.HotbarMinus) + UIVirtualKeyboard.CycleSymbols(); + string str2 = str1 + PlayerInput.BuildCommand(Lang.menu[235].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarMinus"]); + if (PlayerInput.Triggers.JustPressed.MouseRight) + UIVirtualKeyboard.BackSpace(); + string str3 = str2 + PlayerInput.BuildCommand(Lang.menu[236].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseRight"]); + if (PlayerInput.Triggers.JustPressed.SmartCursor) + UIVirtualKeyboard.Write(" "); + str1 = str3 + PlayerInput.BuildCommand(Lang.menu[238].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["SmartCursor"]); + if (UIVirtualKeyboard.CanSubmit) + { + if (PlayerInput.Triggers.JustPressed.HotbarPlus) + UIVirtualKeyboard.Submit(); + str1 += PlayerInput.BuildCommand(Lang.menu[237].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["HotbarPlus"]); + } + } + return str1; + } + + public static void HandleOptionsSpecials() + { + switch (UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE) + { + case 1: + Main.bgScroll = (int) UILinksInitializer.HandleSliderHorizontalInput((float) Main.bgScroll, 0.0f, 100f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 1f); + Main.caveParallax = (float) (1.0 - (double) Main.bgScroll / 500.0); + break; + case 2: + Main.musicVolume = UILinksInitializer.HandleSliderHorizontalInput(Main.musicVolume, 0.0f, 1f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.35f); + break; + case 3: + Main.soundVolume = UILinksInitializer.HandleSliderHorizontalInput(Main.soundVolume, 0.0f, 1f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.35f); + break; + case 4: + Main.ambientVolume = UILinksInitializer.HandleSliderHorizontalInput(Main.ambientVolume, 0.0f, 1f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.35f); + break; + case 5: + double hBar = (double) Main.hBar; + float num1 = Main.hBar = UILinksInitializer.HandleSliderHorizontalInput((float) hBar, 0.0f, 1f); + if (hBar == (double) num1) + break; + switch (Main.menuMode) + { + case 17: + Main.player[Main.myPlayer].hairColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 18: + Main.player[Main.myPlayer].eyeColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 19: + Main.player[Main.myPlayer].skinColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 21: + Main.player[Main.myPlayer].shirtColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 22: + Main.player[Main.myPlayer].underShirtColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 23: + Main.player[Main.myPlayer].pantsColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 24: + Main.player[Main.myPlayer].shoeColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 25: + Main.mouseColorSlider.Hue = num1; + break; + case 252: + Main.mouseBorderColorSlider.Hue = num1; + break; + } + SoundEngine.PlaySound(12); + break; + case 6: + double sBar = (double) Main.sBar; + float num2 = Main.sBar = UILinksInitializer.HandleSliderHorizontalInput((float) sBar, 0.0f, 1f, PlayerInput.CurrentProfile.InterfaceDeadzoneX); + if (sBar == (double) num2) + break; + switch (Main.menuMode) + { + case 17: + Main.player[Main.myPlayer].hairColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 18: + Main.player[Main.myPlayer].eyeColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 19: + Main.player[Main.myPlayer].skinColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 21: + Main.player[Main.myPlayer].shirtColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 22: + Main.player[Main.myPlayer].underShirtColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 23: + Main.player[Main.myPlayer].pantsColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 24: + Main.player[Main.myPlayer].shoeColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 25: + Main.mouseColorSlider.Saturation = num2; + break; + case 252: + Main.mouseBorderColorSlider.Saturation = num2; + break; + } + SoundEngine.PlaySound(12); + break; + case 7: + double lBar1 = (double) Main.lBar; + float min = 0.15f; + if (Main.menuMode == 252) + min = 0.0f; + Main.lBar = UILinksInitializer.HandleSliderHorizontalInput((float) lBar1, min, 1f, PlayerInput.CurrentProfile.InterfaceDeadzoneX); + float lBar2 = Main.lBar; + if (lBar1 == (double) lBar2) + break; + switch (Main.menuMode) + { + case 17: + Main.player[Main.myPlayer].hairColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 18: + Main.player[Main.myPlayer].eyeColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 19: + Main.player[Main.myPlayer].skinColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 21: + Main.player[Main.myPlayer].shirtColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 22: + Main.player[Main.myPlayer].underShirtColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 23: + Main.player[Main.myPlayer].pantsColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 24: + Main.player[Main.myPlayer].shoeColor = Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + break; + case 25: + Main.mouseColorSlider.Luminance = lBar2; + break; + case 252: + Main.mouseBorderColorSlider.Luminance = lBar2; + break; + } + SoundEngine.PlaySound(12); + break; + case 8: + double aBar = (double) Main.aBar; + float num3 = Main.aBar = UILinksInitializer.HandleSliderHorizontalInput((float) aBar, 0.0f, 1f, PlayerInput.CurrentProfile.InterfaceDeadzoneX); + if (aBar == (double) num3) + break; + if (Main.menuMode == 252) + Main.mouseBorderColorSlider.Alpha = num3; + SoundEngine.PlaySound(12); + break; + case 9: + bool left = PlayerInput.Triggers.Current.Left; + bool right = PlayerInput.Triggers.Current.Right; + if (PlayerInput.Triggers.JustPressed.Left || PlayerInput.Triggers.JustPressed.Right) + UILinksInitializer.SomeVarsForUILinkers.HairMoveCD = 0; + else if (UILinksInitializer.SomeVarsForUILinkers.HairMoveCD > 0) + --UILinksInitializer.SomeVarsForUILinkers.HairMoveCD; + if (UILinksInitializer.SomeVarsForUILinkers.HairMoveCD == 0 && left | right) + { + if (left) + --Main.PendingPlayer.hair; + if (right) + ++Main.PendingPlayer.hair; + UILinksInitializer.SomeVarsForUILinkers.HairMoveCD = 12; + } + int num4 = 51; + if (Main.PendingPlayer.hair >= num4) + Main.PendingPlayer.hair = 0; + if (Main.PendingPlayer.hair >= 0) + break; + Main.PendingPlayer.hair = num4 - 1; + break; + case 10: + Main.GameZoomTarget = UILinksInitializer.HandleSliderHorizontalInput(Main.GameZoomTarget, 1f, 2f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.35f); + break; + case 11: + Main.UIScale = UILinksInitializer.HandleSliderHorizontalInput(Main.UIScaleWanted, 0.5f, 2f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.35f); + Main.temporaryGUIScaleSlider = Main.UIScaleWanted; + break; + case 12: + Main.MapScale = UILinksInitializer.HandleSliderHorizontalInput(Main.MapScale, 0.5f, 1f, PlayerInput.CurrentProfile.InterfaceDeadzoneX, 0.7f); + break; + } + } + + public class SomeVarsForUILinkers + { + public static Recipe SequencedCraftingCurrent; + public static int HairMoveCD; + } + } +} diff --git a/Initializers/WingStatsInitializer.cs b/Initializers/WingStatsInitializer.cs new file mode 100644 index 0000000..8301781 --- /dev/null +++ b/Initializers/WingStatsInitializer.cs @@ -0,0 +1,85 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Initializers.WingStatsInitializer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.DataStructures; +using Terraria.ID; + +namespace Terraria.Initializers +{ + public class WingStatsInitializer + { + public static void Load() + { + WingStats[] wingStatsArray = new WingStats[47]; + float flySpeedOverride1 = 3f; + float flySpeedOverride2 = 6f; + float flySpeedOverride3 = 6.25f; + float flySpeedOverride4 = 6.5f; + float flySpeedOverride5 = 6.75f; + float flySpeedOverride6 = 7f; + float flySpeedOverride7 = 7.5f; + float flySpeedOverride8 = 8f; + float flySpeedOverride9 = 9f; + int flyTime1 = 25; + int flyTime2 = 100; + int flyTime3 = 130; + int flyTime4 = 150; + int flyTime5 = 160; + int flyTime6 = 170; + int flyTime7 = 180; + int flyTime8 = 150; + wingStatsArray[46] = new WingStats(flyTime1, flySpeedOverride1); + wingStatsArray[1] = new WingStats(flyTime2, flySpeedOverride3); + wingStatsArray[2] = new WingStats(flyTime2, flySpeedOverride3); + wingStatsArray[13] = new WingStats(flyTime2, flySpeedOverride3); + wingStatsArray[25] = new WingStats(flyTime3, flySpeedOverride5); + wingStatsArray[7] = new WingStats(flyTime3, flySpeedOverride5); + wingStatsArray[6] = new WingStats(flyTime3, flySpeedOverride5); + wingStatsArray[10] = new WingStats(flyTime3, flySpeedOverride5); + wingStatsArray[4] = new WingStats(flyTime4, flySpeedOverride4); + wingStatsArray[15] = new WingStats(flyTime5, flySpeedOverride7); + wingStatsArray[5] = new WingStats(flyTime5, flySpeedOverride7); + wingStatsArray[14] = new WingStats(flyTime5, flySpeedOverride7); + wingStatsArray[9] = new WingStats(flyTime5, flySpeedOverride7); + wingStatsArray[11] = new WingStats(flyTime6, flySpeedOverride7); + wingStatsArray[8] = new WingStats(flyTime6, flySpeedOverride7); + wingStatsArray[27] = new WingStats(flyTime6, flySpeedOverride7); + wingStatsArray[24] = new WingStats(flyTime6, flySpeedOverride7); + wingStatsArray[22] = new WingStats(flyTime6, flySpeedOverride4, hasHoldDownHoverFeatures: true, hoverFlySpeedOverride: 10f, hoverAccelerationMultiplier: 10f); + wingStatsArray[21] = new WingStats(flyTime7, flySpeedOverride7); + wingStatsArray[20] = new WingStats(flyTime7, flySpeedOverride7); + wingStatsArray[12] = new WingStats(flyTime7, flySpeedOverride7); + wingStatsArray[23] = new WingStats(flyTime7, flySpeedOverride7); + wingStatsArray[26] = new WingStats(flyTime7, flySpeedOverride8, 2f); + wingStatsArray[45] = new WingStats(flyTime7, flySpeedOverride8, 4.5f, true, 16f, 16f); + wingStatsArray[37] = new WingStats(flyTime4, flySpeedOverride6, 2.5f, true, 12f, 12f); + wingStatsArray[44] = new WingStats(flyTime4, flySpeedOverride8, 2f); + WingStats wingStats1 = new WingStats(flyTime4, flySpeedOverride2, 2.5f, true, 12f, 12f); + wingStatsArray[29] = new WingStats(flyTime7, flySpeedOverride9, 2.5f); + wingStatsArray[32] = new WingStats(flyTime7, flySpeedOverride9, 2.5f); + wingStatsArray[30] = new WingStats(flyTime7, flySpeedOverride4, 1.5f, true, 12f, 12f); + wingStatsArray[31] = new WingStats(flyTime7, flySpeedOverride4, 1.5f, true, 12f, 12f); + WingStats wingStats2 = new WingStats(flyTime8, flySpeedOverride6); + wingStatsArray[3] = wingStats2; + wingStatsArray[16] = wingStats2; + wingStatsArray[17] = wingStats2; + wingStatsArray[18] = wingStats2; + wingStatsArray[19] = wingStats2; + wingStatsArray[28] = wingStats2; + wingStatsArray[33] = wingStats2; + wingStatsArray[34] = wingStats2; + wingStatsArray[35] = wingStats2; + wingStatsArray[36] = wingStats2; + wingStatsArray[38] = wingStats2; + wingStatsArray[39] = wingStats2; + wingStatsArray[40] = wingStats2; + wingStatsArray[42] = wingStats2; + wingStatsArray[41] = wingStats2; + wingStatsArray[43] = wingStats2; + ArmorIDs.Wing.Sets.Stats = wingStatsArray; + } + } +} diff --git a/Item.cs b/Item.cs new file mode 100644 index 0000000..6e71981 --- /dev/null +++ b/Item.cs @@ -0,0 +1,45567 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Item +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.IO; +using Terraria.Audio; +using Terraria.Enums; +using Terraria.GameContent; +using Terraria.GameContent.Events; +using Terraria.GameContent.UI; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.UI; +using Terraria.Utilities; + +namespace Terraria +{ + public class Item : Entity + { + private string _nameOverride; + public const int luckPotionDuration1 = 10800; + public const int luckPotionDuration2 = 18000; + public const int luckPotionDuration3 = 36000; + public const int flaskTime = 72000; + public const int copper = 1; + public const int silver = 100; + public const int gold = 10000; + public const int platinum = 1000000; + public const int goldCritterRarityColor = 3; + private readonly int shadowOrbPrice = Item.sellPrice(gold: 1, silver: 50); + private readonly int dungeonPrice = Item.sellPrice(gold: 1, silver: 75); + private readonly int queenBeePrice = Item.sellPrice(gold: 2); + private readonly int hellPrice = Item.sellPrice(gold: 2, silver: 50); + private readonly int eclipsePrice = Item.sellPrice(gold: 7, silver: 50); + private readonly int eclipsePostPlanteraPrice = Item.sellPrice(gold: 10); + private readonly int eclipseMothronPrice = Item.sellPrice(gold: 12, silver: 50); + public static int[] cachedItemSpawnsByType = ItemID.Sets.Factory.CreateIntSet(-1); + public static int potionDelay = 3600; + public static int restorationDelay = 2700; + public bool questItem; + public static int[] headType = new int[266]; + public static int[] bodyType = new int[235]; + public static int[] legType = new int[218]; + public static bool[] staff = new bool[5045]; + public static bool[] claw = new bool[5045]; + public bool flame; + public bool mech; + public int noGrabDelay; + public bool beingGrabbed; + public int timeSinceItemSpawned; + public int tileWand = -1; + public bool wornArmor; + public int tooltipContext = -1; + public byte dye; + public int fishingPole = 1; + public int bait; + public static int coinGrabRange = 350; + public static int manaGrabRange = 300; + public static int lifeGrabRange = 250; + public static int treasureGrabRange = 150; + public short makeNPC; + public bool expertOnly; + public bool expert; + public bool isAShopItem; + public short hairDye = -1; + public byte paint; + public bool instanced; + public int ownIgnore = -1; + public int ownTime; + public int keepTime; + public int type; + public bool favorited; + public int holdStyle; + public int useStyle; + public bool channel; + public bool accessory; + public int useAnimation; + public int useTime; + public int stack; + public int maxStack; + public int pick; + public int axe; + public int hammer; + public int tileBoost; + public int createTile = -1; + public int createWall = -1; + public int placeStyle; + public int damage; + public float knockBack; + public int healLife; + public int healMana; + public bool potion; + public bool consumable; + public bool autoReuse; + public bool useTurn; + public Color color; + public int alpha; + public short glowMask; + public float scale = 1f; + public LegacySoundStyle UseSound; + public int defense; + public int headSlot = -1; + public int bodySlot = -1; + public int legSlot = -1; + public sbyte handOnSlot = -1; + public sbyte handOffSlot = -1; + public sbyte backSlot = -1; + public sbyte frontSlot = -1; + public sbyte shoeSlot = -1; + public sbyte waistSlot = -1; + public sbyte wingSlot = -1; + public sbyte shieldSlot = -1; + public sbyte neckSlot = -1; + public sbyte faceSlot = -1; + public sbyte balloonSlot = -1; + public int stringColor; + public ItemTooltip ToolTip; + public string BestiaryNotes; + public int playerIndexTheItemIsReservedFor = (int) byte.MaxValue; + public int rare; + public int shoot; + public float shootSpeed; + public int ammo = AmmoID.None; + public bool notAmmo; + public int useAmmo = AmmoID.None; + public int lifeRegen; + public int manaIncrease; + public bool buyOnce; + public int mana; + public bool noUseGraphic; + public bool noMelee; + public int timeSinceTheItemHasBeenReservedForSomeone; + public int value; + public bool buy; + public bool social; + public bool vanity; + public bool material; + public bool noWet; + public int buffType; + public int buffTime; + public int mountType = -1; + public bool cartTrack; + public bool uniqueStack; + public int shopSpecialCurrency = -1; + public int? shopCustomPrice; + public bool DD2Summon; + public int netID; + public int crit; + public byte prefix; + public bool melee; + public bool magic; + public bool ranged; + public bool summon; + public bool sentry; + public int reuseDelay; + public bool newAndShiny; + public bool canBePlacedInVanityRegardlessOfConditions; + public const int WALL_PLACEMENT_USETIME = 7; + public static int numberOfNewItems = 0; + + public string Name => this._nameOverride ?? Lang.GetItemNameValue(this.type); + + public string HoverName + { + get + { + string str = this.AffixName(); + if (this.stack > 1) + str = str + " (" + (object) this.stack + ")"; + return str; + } + } + + public static void StartCachingType(int t) + { + if (Item.cachedItemSpawnsByType[t] != -1) + return; + Item.cachedItemSpawnsByType[t] = 0; + } + + public static void DropCache(Vector2 pos, Vector2 spread, int t, bool stopCaching = true) + { + if (Item.cachedItemSpawnsByType[t] == -1) + return; + int num = Item.cachedItemSpawnsByType[t]; + Item.cachedItemSpawnsByType[t] = stopCaching ? -1 : 0; + Item obj = new Item(); + obj.SetDefaults(t); + int Stack; + for (; num > 0; num -= Stack) + { + Stack = obj.maxStack; + if (num < Stack) + Stack = num; + Item.NewItem((int) pos.X, (int) pos.Y, (int) spread.X, (int) spread.Y, t, Stack); + } + } + + public bool FitsAccessoryVanitySlot => this.canBePlacedInVanityRegardlessOfConditions || this.handOnSlot != (sbyte) -1 || this.handOffSlot != (sbyte) -1 || this.backSlot != (sbyte) -1 || this.frontSlot != (sbyte) -1 || this.shoeSlot != (sbyte) -1 || this.waistSlot != (sbyte) -1 || this.wingSlot != (sbyte) -1 || this.shieldSlot != (sbyte) -1 || this.neckSlot != (sbyte) -1 || this.faceSlot != (sbyte) -1 || this.balloonSlot != (sbyte) -1; + + public int OriginalRarity => ContentSamples.ItemsByType[this.type].rare; + + public int OriginalDamage => ContentSamples.ItemsByType[this.type].damage; + + public int OriginalDefense => ContentSamples.ItemsByType[this.type].defense; + + public override string ToString() => string.Format("{{Name: \"{0}\" NetID: {1} Stack: {2}", (object) this.Name, (object) this.netID, (object) this.stack); + + public bool Prefix(int pre) + { + if (!WorldGen.gen && Main.rand == null) + Main.rand = new UnifiedRandom(); + if (pre == 0 || this.type == 0) + return false; + UnifiedRandom unifiedRandom = WorldGen.gen ? WorldGen.genRand : Main.rand; + int num1 = pre; + float num2 = 1f; + float num3 = 1f; + float num4 = 1f; + float num5 = 1f; + float num6 = 1f; + float num7 = 1f; + int num8 = 0; + bool flag = true; + while (flag) + { + num2 = 1f; + num3 = 1f; + num4 = 1f; + num5 = 1f; + num6 = 1f; + num7 = 1f; + num8 = 0; + flag = false; + if (num1 == -1 && unifiedRandom.Next(4) == 0) + num1 = 0; + if (pre < -1) + num1 = -1; + if (num1 == -1 || num1 == -2 || num1 == -3) + { + if (this.type == 1 || this.type == 4 || this.type == 6 || this.type == 7 || this.type == 10 || this.type == 24 || this.type == 45 || this.type == 46 || this.type == 65 || this.type == 103 || this.type == 104 || this.type == 121 || this.type == 122 || this.type == 155 || this.type == 190 || this.type == 196 || this.type == 198 || this.type == 199 || this.type == 200 || this.type == 201 || this.type == 202 || this.type == 203 || this.type == 4258 || this.type == 204 || this.type == 213 || this.type == 217 || this.type == 273 || this.type == 367 || this.type == 368 || this.type == 426 || this.type == 482 || this.type == 483 || this.type == 484 || this.type == 653 || this.type == 654 || this.type == 656 || this.type == 657 || this.type == 659 || this.type == 660 || this.type == 671 || this.type == 672 || this.type == 674 || this.type == 675 || this.type == 676 || this.type == 723 || this.type == 724 || this.type == 757 || this.type == 776 || this.type == 777 || this.type == 778 || this.type == 787 || this.type == 795 || this.type == 797 || this.type == 798 || this.type == 799 || this.type == 881 || this.type == 882 || this.type == 921 || this.type == 922 || this.type == 989 || this.type == 990 || this.type == 991 || this.type == 992 || this.type == 993 || this.type == 1123 || this.type == 1166 || this.type == 1185 || this.type == 1188 || this.type == 1192 || this.type == 1195 || this.type == 1199 || this.type == 1202 || this.type == 1222 || this.type == 1223 || this.type == 1224 || this.type == 1226 || this.type == 1227 || this.type == 1230 || this.type == 1233 || this.type == 1234 || this.type == 1294 || this.type == 1304 || this.type == 1305 || this.type == 1306 || this.type == 1320 || this.type == 1327 || this.type == 1506 || this.type == 1507 || this.type == 1786 || this.type == 1826 || this.type == 1827 || this.type == 1909 || this.type == 1917 || this.type == 1928 || this.type == 2176 || this.type == 2273 || this.type == 2608 || this.type == 2341 || this.type == 2330 || this.type == 2320 || this.type == 2516 || this.type == 2517 || this.type == 2746 || this.type == 2745 || this.type == 3063 || this.type == 3018 || this.type == 3211 || this.type == 3013 || this.type == 3258 || this.type == 3106 || this.type == 3065 || this.type == 2880 || this.type == 3481 || this.type == 3482 || this.type == 3483 || this.type == 3484 || this.type == 3485 || this.type == 3487 || this.type == 3488 || this.type == 3489 || this.type == 3490 || this.type == 3491 || this.type == 3493 || this.type == 3494 || this.type == 3495 || this.type == 3496 || this.type == 3497 || this.type == 3499 || this.type == 3500 || this.type == 3501 || this.type == 3502 || this.type == 3503 || this.type == 3505 || this.type == 3506 || this.type == 3507 || this.type == 3508 || this.type == 3509 || this.type == 3511 || this.type == 3512 || this.type == 3513 || this.type == 3514 || this.type == 3515 || this.type == 3517 || this.type == 3518 || this.type == 3519 || this.type == 3520 || this.type == 3521 || this.type == 3522 || this.type == 3523 || this.type == 3524 || this.type == 3525 || this.type >= 3462 && this.type <= 3466 || this.type >= 2772 && this.type <= 2786 || this.type == 3349 || this.type == 3352 || this.type == 3351 || this.type >= 3764 && this.type <= 3769 || this.type == 4259 || this.type == 3772 || this.type == 3823 || this.type == 3827 || this.type == 186 || this.type == 946 || this.type == 4059 || this.type == 4317 || this.type == 4463 || this.type == 486 || this.type == 4707 || this.type == 4711 || this.type == 4956 || this.type == 4923 || this.type == 4788 || this.type == 4790 || this.type == 4789 || this.type == 4672 || this.type == 4913 || this.type == 4912 || this.type == 4911 || this.type == 4678 || this.type == 4679 || this.type == 4680 || this.type == 4914) + { + int num9 = unifiedRandom.Next(40); + if (num9 == 0) + num1 = 1; + if (num9 == 1) + num1 = 2; + if (num9 == 2) + num1 = 3; + if (num9 == 3) + num1 = 4; + if (num9 == 4) + num1 = 5; + if (num9 == 5) + num1 = 6; + if (num9 == 6) + num1 = 7; + if (num9 == 7) + num1 = 8; + if (num9 == 8) + num1 = 9; + if (num9 == 9) + num1 = 10; + if (num9 == 10) + num1 = 11; + if (num9 == 11) + num1 = 12; + if (num9 == 12) + num1 = 13; + if (num9 == 13) + num1 = 14; + if (num9 == 14) + num1 = 15; + if (num9 == 15) + num1 = 36; + if (num9 == 16) + num1 = 37; + if (num9 == 17) + num1 = 38; + if (num9 == 18) + num1 = 53; + if (num9 == 19) + num1 = 54; + if (num9 == 20) + num1 = 55; + if (num9 == 21) + num1 = 39; + if (num9 == 22) + num1 = 40; + if (num9 == 23) + num1 = 56; + if (num9 == 24) + num1 = 41; + if (num9 == 25) + num1 = 57; + if (num9 == 26) + num1 = 42; + if (num9 == 27) + num1 = 43; + if (num9 == 28) + num1 = 44; + if (num9 == 29) + num1 = 45; + if (num9 == 30) + num1 = 46; + if (num9 == 31) + num1 = 47; + if (num9 == 32) + num1 = 48; + if (num9 == 33) + num1 = 49; + if (num9 == 34) + num1 = 50; + if (num9 == 35) + num1 = 51; + if (num9 == 36) + num1 = 59; + if (num9 == 37) + num1 = 60; + if (num9 == 38) + num1 = 61; + if (num9 == 39) + num1 = 81; + } + else if (this.type == 162 || this.type == 5011 || this.type == 5012 || this.type == 160 || this.type == 163 || this.type == 220 || this.type == 274 || this.type == 277 || this.type == 280 || this.type == 383 || this.type == 384 || this.type == 385 || this.type == 386 || this.type == 387 || this.type == 388 || this.type == 389 || this.type == 390 || this.type == 406 || this.type == 537 || this.type == 550 || this.type == 579 || this.type == 756 || this.type == 759 || this.type == 801 || this.type == 802 || this.type == 1186 || this.type == 1189 || this.type == 1190 || this.type == 1193 || this.type == 1196 || this.type == 1197 || this.type == 1200 || this.type == 1203 || this.type == 1204 || this.type == 1228 || this.type == 1231 || this.type == 1232 || this.type == 1259 || this.type == 1262 || this.type == 1297 || this.type == 1314 || this.type == 1325 || this.type == 1947 || this.type == 2332 || this.type == 2331 || this.type == 2342 || this.type == 2424 || this.type == 2611 || this.type == 2798 || this.type == 3012 || this.type == 3473 || this.type == 3098 || this.type == 3368 || this.type == 3835 || this.type == 3836 || this.type == 3858 || this.type == 4061 || this.type == 4144 || this.type == 4272 || this.type == 2774 || this.type == 2773 || this.type == 2779 || this.type == 2778 || this.type == 2784 || this.type == 2783 || this.type == 3464 || this.type == 3463) + { + int num10 = unifiedRandom.Next(14); + if (num10 == 0) + num1 = 36; + if (num10 == 1) + num1 = 37; + if (num10 == 2) + num1 = 38; + if (num10 == 3) + num1 = 53; + if (num10 == 4) + num1 = 54; + if (num10 == 5) + num1 = 55; + if (num10 == 6) + num1 = 39; + if (num10 == 7) + num1 = 40; + if (num10 == 8) + num1 = 56; + if (num10 == 9) + num1 = 41; + if (num10 == 10) + num1 = 57; + if (num10 == 11) + num1 = 59; + if (num10 == 12) + num1 = 60; + if (num10 == 13) + num1 = 61; + } + else if (this.type == 39 || this.type == 44 || this.type == 95 || this.type == 96 || this.type == 98 || this.type == 99 || this.type == 120 || this.type == 164 || this.type == 197 || this.type == 219 || this.type == 266 || this.type == 281 || this.type == 434 || this.type == 435 || this.type == 436 || this.type == 481 || this.type == 506 || this.type == 533 || this.type == 534 || this.type == 578 || this.type == 655 || this.type == 658 || this.type == 661 || this.type == 679 || this.type == 682 || this.type == 725 || this.type == 758 || this.type == 759 || this.type == 760 || this.type == 796 || this.type == 800 || this.type == 905 || this.type == 923 || this.type == 964 || this.type == 986 || this.type == 1156 || this.type == 1187 || this.type == 1194 || this.type == 1201 || this.type == 1229 || this.type == 1254 || this.type == 1255 || this.type == 1258 || this.type == 1265 || this.type == 1319 || this.type == 1553 || this.type == 1782 || this.type == 1784 || this.type == 1835 || this.type == 1870 || this.type == 1910 || this.type == 1929 || this.type == 1946 || this.type == 2223 || this.type == 2269 || this.type == 2270 || this.type == 2624 || this.type == 2515 || this.type == 2747 || this.type == 2796 || this.type == 2797 || this.type == 3052 || this.type == 2888 || this.type == 3019 || this.type == 3029 || this.type == 3007 || this.type == 3008 || this.type == 3210 || this.type == 3107 || this.type == 3245 || this.type == 3475 || this.type == 3540 || this.type == 3854 || this.type == 3859 || this.type == 3821 || this.type == 3930 || this.type == 3480 || this.type == 3486 || this.type == 3492 || this.type == 3498 || this.type == 3504 || this.type == 3510 || this.type == 3516 || this.type == 3350 || this.type == 3546 || this.type == 3788 || this.type == 4058 || this.type == 4060 || this.type == 4381 || this.type == 4703 || this.type == 4953) + { + int num11 = unifiedRandom.Next(35); + if (num11 == 0) + num1 = 16; + if (num11 == 1) + num1 = 17; + if (num11 == 2) + num1 = 18; + if (num11 == 3) + num1 = 19; + if (num11 == 4) + num1 = 20; + if (num11 == 5) + num1 = 21; + if (num11 == 6) + num1 = 22; + if (num11 == 7) + num1 = 23; + if (num11 == 8) + num1 = 24; + if (num11 == 9) + num1 = 25; + if (num11 == 10) + num1 = 58; + if (num11 == 11) + num1 = 36; + if (num11 == 12) + num1 = 37; + if (num11 == 13) + num1 = 38; + if (num11 == 14) + num1 = 53; + if (num11 == 15) + num1 = 54; + if (num11 == 16) + num1 = 55; + if (num11 == 17) + num1 = 39; + if (num11 == 18) + num1 = 40; + if (num11 == 19) + num1 = 56; + if (num11 == 20) + num1 = 41; + if (num11 == 21) + num1 = 57; + if (num11 == 22) + num1 = 43; + if (num11 == 23) + num1 = 44; + if (num11 == 24) + num1 = 45; + if (num11 == 25) + num1 = 46; + if (num11 == 26) + num1 = 47; + if (num11 == 27) + num1 = 48; + if (num11 == 28) + num1 = 49; + if (num11 == 29) + num1 = 50; + if (num11 == 30) + num1 = 51; + if (num11 == 31) + num1 = 59; + if (num11 == 32) + num1 = 60; + if (num11 == 33) + num1 = 61; + if (num11 == 34) + num1 = 82; + } + else if (this.type == 64 || this.type == 112 || this.type == 113 || this.type == (int) sbyte.MaxValue || this.type == 157 || this.type == 165 || this.type == 218 || this.type == 272 || this.type == 494 || this.type == 495 || this.type == 496 || this.type == 514 || this.type == 517 || this.type == 518 || this.type == 519 || this.type == 683 || this.type == 726 || this.type == 739 || this.type == 740 || this.type == 741 || this.type == 742 || this.type == 743 || this.type == 744 || this.type == 788 || this.type == 1121 || this.type == 1155 || this.type == 1157 || this.type == 1178 || this.type == 1244 || this.type == 1256 || this.type == 1260 || this.type == 1264 || this.type == 1266 || this.type == 1295 || this.type == 1296 || this.type == 1308 || this.type == 1309 || this.type == 1313 || this.type == 1336 || this.type == 1444 || this.type == 1445 || this.type == 1446 || this.type == 1572 || this.type == 1801 || this.type == 1802 || this.type == 1930 || this.type == 1931 || this.type == 2188 || this.type == 2622 || this.type == 2621 || this.type == 2584 || this.type == 2551 || this.type == 2366 || this.type == 2535 || this.type == 2365 || this.type == 2364 || this.type == 2623 || this.type == 2750 || this.type == 2795 || this.type == 3053 || this.type == 3051 || this.type == 3209 || this.type == 3014 || this.type == 3105 || this.type == 2882 || this.type == 3269 || this.type == 3006 || this.type == 3377 || this.type == 3069 || this.type == 2749 || this.type == 3249 || this.type == 3476 || this.type == 3474 || this.type == 3531 || this.type == 3541 || this.type == 3542 || this.type == 3569 || this.type == 3570 || this.type == 3571 || this.type == 3779 || this.type == 3787 || this.type == 3531 || this.type == 3852 || this.type == 3870 || this.type == 4269 || this.type == 4273 || this.type == 4281 || this.type == 4347 || this.type == 4348 || this.type == 4270 || this.type == 4758 || this.type == 4715 || this.type == 4952 || this.type == 4607 || this.type == 5005 || this.type == 3824 || this.type == 3818 || this.type == 3829 || this.type == 3832 || this.type == 3825 || this.type == 3819 || this.type == 3830 || this.type == 3833 || this.type == 3826 || this.type == 3820 || this.type == 3831 || this.type == 3834 || this.type == 4062) + { + int num12 = unifiedRandom.Next(36); + if (num12 == 0) + num1 = 26; + if (num12 == 1) + num1 = 27; + if (num12 == 2) + num1 = 28; + if (num12 == 3) + num1 = 29; + if (num12 == 4) + num1 = 30; + if (num12 == 5) + num1 = 31; + if (num12 == 6) + num1 = 32; + if (num12 == 7) + num1 = 33; + if (num12 == 8) + num1 = 34; + if (num12 == 9) + num1 = 35; + if (num12 == 10) + num1 = 52; + if (num12 == 11) + num1 = 36; + if (num12 == 12) + num1 = 37; + if (num12 == 13) + num1 = 38; + if (num12 == 14) + num1 = 53; + if (num12 == 15) + num1 = 54; + if (num12 == 16) + num1 = 55; + if (num12 == 17) + num1 = 39; + if (num12 == 18) + num1 = 40; + if (num12 == 19) + num1 = 56; + if (num12 == 20) + num1 = 41; + if (num12 == 21) + num1 = 57; + if (num12 == 22) + num1 = 42; + if (num12 == 23) + num1 = 43; + if (num12 == 24) + num1 = 44; + if (num12 == 25) + num1 = 45; + if (num12 == 26) + num1 = 46; + if (num12 == 27) + num1 = 47; + if (num12 == 28) + num1 = 48; + if (num12 == 29) + num1 = 49; + if (num12 == 30) + num1 = 50; + if (num12 == 31) + num1 = 51; + if (num12 == 32) + num1 = 59; + if (num12 == 33) + num1 = 60; + if (num12 == 34) + num1 = 61; + if (num12 == 35) + num1 = 83; + } + else if (this.type == 55 || this.type == 119 || this.type == 191 || this.type == 284 || this.type == 670 || this.type == 1122 || this.type == 1513 || this.type == 1569 || this.type == 1571 || this.type == 1825 || this.type == 1918 || this.type == 3054 || this.type == 3262 || this.type >= 3278 && this.type <= 3292 || this.type >= 3315 && this.type <= 3317 || this.type == 3389 || this.type == 3030 || this.type == 3543 || this.type == 4764 || this.type == 4818 || this.type == 4760) + { + int num13 = unifiedRandom.Next(14); + if (this.type == 3389) + num13 = unifiedRandom.Next(15); + if (num13 == 0) + num1 = 36; + if (num13 == 1) + num1 = 37; + if (num13 == 2) + num1 = 38; + if (num13 == 3) + num1 = 53; + if (num13 == 4) + num1 = 54; + if (num13 == 5) + num1 = 55; + if (num13 == 6) + num1 = 39; + if (num13 == 7) + num1 = 40; + if (num13 == 8) + num1 = 56; + if (num13 == 9) + num1 = 41; + if (num13 == 10) + num1 = 57; + if (num13 == 11) + num1 = 59; + if (num13 == 12) + num1 = 60; + if (num13 == 13) + num1 = 61; + if (num13 == 14) + num1 = 84; + } + else + { + if (!this.IsAPrefixableAccessory()) + return false; + num1 = unifiedRandom.Next(62, 81); + } + } + switch (pre) + { + case -3: + return true; + case -1: + if ((num1 == 7 || num1 == 8 || num1 == 9 || num1 == 10 || num1 == 11 || num1 == 22 || num1 == 23 || num1 == 24 || num1 == 29 || num1 == 30 || num1 == 31 || num1 == 39 || num1 == 40 || num1 == 56 || num1 == 41 || num1 == 47 || num1 == 48 || num1 == 49) && unifiedRandom.Next(3) != 0) + { + num1 = 0; + break; + } + break; + } + switch (num1) + { + case 1: + num5 = 1.12f; + break; + case 2: + num5 = 1.18f; + break; + case 3: + num2 = 1.05f; + num8 = 2; + num5 = 1.05f; + break; + case 4: + num2 = 1.1f; + num5 = 1.1f; + num3 = 1.1f; + break; + case 5: + num2 = 1.15f; + break; + case 6: + num2 = 1.1f; + break; + case 7: + num5 = 0.82f; + break; + case 8: + num3 = 0.85f; + num2 = 0.85f; + num5 = 0.87f; + break; + case 9: + num5 = 0.9f; + break; + case 10: + num2 = 0.85f; + break; + case 11: + num4 = 1.1f; + num3 = 0.9f; + num5 = 0.9f; + break; + case 12: + num3 = 1.1f; + num2 = 1.05f; + num5 = 1.1f; + num4 = 1.15f; + break; + case 13: + num3 = 0.8f; + num2 = 0.9f; + num5 = 1.1f; + break; + case 14: + num3 = 1.15f; + num4 = 1.1f; + break; + case 15: + num3 = 0.9f; + num4 = 0.85f; + break; + case 16: + num2 = 1.1f; + num8 = 3; + break; + case 17: + num4 = 0.85f; + num6 = 1.1f; + break; + case 18: + num4 = 0.9f; + num6 = 1.15f; + break; + case 19: + num3 = 1.15f; + num6 = 1.05f; + break; + case 20: + num3 = 1.05f; + num6 = 1.05f; + num2 = 1.1f; + num4 = 0.95f; + num8 = 2; + break; + case 21: + num3 = 1.15f; + num2 = 1.1f; + break; + case 22: + num3 = 0.9f; + num6 = 0.9f; + num2 = 0.85f; + break; + case 23: + num4 = 1.15f; + num6 = 0.9f; + break; + case 24: + num4 = 1.1f; + num3 = 0.8f; + break; + case 25: + num4 = 1.1f; + num2 = 1.15f; + num8 = 1; + break; + case 26: + num7 = 0.85f; + num2 = 1.1f; + break; + case 27: + num7 = 0.85f; + break; + case 28: + num7 = 0.85f; + num2 = 1.15f; + num3 = 1.05f; + break; + case 29: + num7 = 1.1f; + break; + case 30: + num7 = 1.2f; + num2 = 0.9f; + break; + case 31: + num3 = 0.9f; + num2 = 0.9f; + break; + case 32: + num7 = 1.15f; + num2 = 1.1f; + break; + case 33: + num7 = 1.1f; + num3 = 1.1f; + num4 = 0.9f; + break; + case 34: + num7 = 0.9f; + num3 = 1.1f; + num4 = 1.1f; + num2 = 1.1f; + break; + case 35: + num7 = 1.2f; + num2 = 1.15f; + num3 = 1.15f; + break; + case 36: + num8 = 3; + break; + case 37: + num2 = 1.1f; + num8 = 3; + num3 = 1.1f; + break; + case 38: + num3 = 1.15f; + break; + case 39: + num2 = 0.7f; + num3 = 0.8f; + break; + case 40: + num2 = 0.85f; + break; + case 41: + num3 = 0.85f; + num2 = 0.9f; + break; + case 42: + num4 = 0.9f; + break; + case 43: + num2 = 1.1f; + num4 = 0.9f; + break; + case 44: + num4 = 0.9f; + num8 = 3; + break; + case 45: + num4 = 0.95f; + break; + case 46: + num8 = 3; + num4 = 0.94f; + num2 = 1.07f; + break; + case 47: + num4 = 1.15f; + break; + case 48: + num4 = 1.2f; + break; + case 49: + num4 = 1.08f; + break; + case 50: + num2 = 0.8f; + num4 = 1.15f; + break; + case 51: + num3 = 0.9f; + num4 = 0.9f; + num2 = 1.05f; + num8 = 2; + break; + case 52: + num7 = 0.9f; + num2 = 0.9f; + num4 = 0.9f; + break; + case 53: + num2 = 1.1f; + break; + case 54: + num3 = 1.15f; + break; + case 55: + num3 = 1.15f; + num2 = 1.05f; + break; + case 56: + num3 = 0.8f; + break; + case 57: + num3 = 0.9f; + num2 = 1.18f; + break; + case 58: + num4 = 0.85f; + num2 = 0.85f; + break; + case 59: + num3 = 1.15f; + num2 = 1.15f; + num8 = 5; + break; + case 60: + num2 = 1.15f; + num8 = 5; + break; + case 61: + num8 = 5; + break; + case 81: + num3 = 1.15f; + num2 = 1.15f; + num8 = 5; + num4 = 0.9f; + num5 = 1.1f; + break; + case 82: + num3 = 1.15f; + num2 = 1.15f; + num8 = 5; + num4 = 0.9f; + num6 = 1.1f; + break; + case 83: + num3 = 1.15f; + num2 = 1.15f; + num8 = 5; + num4 = 0.9f; + num7 = 0.9f; + break; + case 84: + num3 = 1.17f; + num2 = 1.17f; + num8 = 8; + break; + } + if ((double) num2 != 1.0 && Math.Round((double) this.damage * (double) num2) == (double) this.damage) + { + flag = true; + num1 = -1; + } + if ((double) num4 != 1.0 && Math.Round((double) this.useAnimation * (double) num4) == (double) this.useAnimation) + { + flag = true; + num1 = -1; + } + if ((double) num7 != 1.0 && Math.Round((double) this.mana * (double) num7) == (double) this.mana) + { + flag = true; + num1 = -1; + } + if ((double) num3 != 1.0 && (double) this.knockBack == 0.0) + { + flag = true; + num1 = -1; + } + if (pre == -2 && num1 == 0) + { + num1 = -1; + flag = true; + } + } + this.damage = (int) Math.Round((double) this.damage * (double) num2); + this.useAnimation = (int) Math.Round((double) this.useAnimation * (double) num4); + this.useTime = (int) Math.Round((double) this.useTime * (double) num4); + this.reuseDelay = (int) Math.Round((double) this.reuseDelay * (double) num4); + this.mana = (int) Math.Round((double) this.mana * (double) num7); + this.knockBack *= num3; + this.scale *= num5; + this.shootSpeed *= num6; + this.crit += num8; + float num14 = (float) (1.0 * (double) num2 * (2.0 - (double) num4) * (2.0 - (double) num7) * (double) num5 * (double) num3 * (double) num6 * (1.0 + (double) num8 * 0.0199999995529652)); + if (num1 == 62 || num1 == 69 || num1 == 73 || num1 == 77) + num14 *= 1.05f; + if (num1 == 63 || num1 == 70 || num1 == 74 || num1 == 78 || num1 == 67) + num14 *= 1.1f; + if (num1 == 64 || num1 == 71 || num1 == 75 || num1 == 79 || num1 == 66) + num14 *= 1.15f; + if (num1 == 65 || num1 == 72 || num1 == 76 || num1 == 80 || num1 == 68) + num14 *= 1.2f; + if ((double) num14 >= 1.2) + this.rare += 2; + else if ((double) num14 >= 1.05) + ++this.rare; + else if ((double) num14 <= 0.8) + this.rare -= 2; + else if ((double) num14 <= 0.95) + --this.rare; + if (this.rare > -11) + { + if (this.rare < -1) + this.rare = -1; + if (this.rare > 11) + this.rare = 11; + } + this.value = (int) ((double) this.value * (double) (num14 * num14)); + this.prefix = (byte) num1; + return true; + } + + private bool IsAPrefixableAccessory() => this.accessory && !this.vanity && ItemID.Sets.CanGetPrefixes[this.type]; + + public string AffixName() + { + if (this.prefix < (byte) 0 || (int) this.prefix >= Lang.prefix.Length) + return this.Name; + string str = Lang.prefix[(int) this.prefix].Value; + if (str == "") + return this.Name; + return str.StartsWith("(") ? this.Name + " " + str : str + " " + this.Name; + } + + public void RebuildTooltip() + { + if (this.type < 0) + return; + this.ToolTip = Lang.GetTooltip(this.netID); + } + + public Rectangle getRect() => new Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height); + + public bool checkMat() + { + if (this.type >= 71 && this.type <= 74) + { + this.material = false; + return false; + } + switch (this.type) + { + case 529: + case 541: + case 542: + case 543: + case 852: + case 853: + case 1151: + case 3272: + case 3274: + case 3275: + case 3338: + case 4261: + case 4282: + case 4286: + case 4290: + case 4295: + this.material = true; + return true; + case 4076: + case 4131: + this.material = false; + return false; + default: + for (int index1 = 0; index1 < Recipe.numRecipes; ++index1) + { + for (int index2 = 0; Main.recipe[index1].requiredItem[index2].type > 0; ++index2) + { + if (this.netID == Main.recipe[index1].requiredItem[index2].netID) + { + this.material = true; + return true; + } + } + } + this.material = false; + return false; + } + } + + public void netDefaults(int type) + { + if (type < 0) + { + switch (type) + { + case -48: + this.SetDefaults(3480); + break; + case -47: + this.SetDefaults(3481); + break; + case -46: + this.SetDefaults(3482); + break; + case -45: + this.SetDefaults(3483); + break; + case -44: + this.SetDefaults(3484); + break; + case -43: + this.SetDefaults(3485); + break; + case -42: + this.SetDefaults(3486); + break; + case -41: + this.SetDefaults(3487); + break; + case -40: + this.SetDefaults(3488); + break; + case -39: + this.SetDefaults(3489); + break; + case -38: + this.SetDefaults(3490); + break; + case -37: + this.SetDefaults(3491); + break; + case -36: + this.SetDefaults(3492); + break; + case -35: + this.SetDefaults(3493); + break; + case -34: + this.SetDefaults(3494); + break; + case -33: + this.SetDefaults(3495); + break; + case -32: + this.SetDefaults(3496); + break; + case -31: + this.SetDefaults(3497); + break; + case -30: + this.SetDefaults(3498); + break; + case -29: + this.SetDefaults(3499); + break; + case -28: + this.SetDefaults(3500); + break; + case -27: + this.SetDefaults(3501); + break; + case -26: + this.SetDefaults(3502); + break; + case -25: + this.SetDefaults(3503); + break; + case -24: + this.SetDefaults(3769); + break; + case -23: + this.SetDefaults(3768); + break; + case -22: + this.SetDefaults(3767); + break; + case -21: + this.SetDefaults(3766); + break; + case -20: + this.SetDefaults(3765); + break; + case -19: + this.SetDefaults(3764); + break; + case -18: + this.SetDefaults(3504); + break; + case -17: + this.SetDefaults(3505); + break; + case -16: + this.SetDefaults(3506); + break; + case -15: + this.SetDefaults(3507); + break; + case -14: + this.SetDefaults(3508); + break; + case -13: + this.SetDefaults(3509); + break; + case -12: + this.SetDefaults(3510); + break; + case -11: + this.SetDefaults(3511); + break; + case -10: + this.SetDefaults(3512); + break; + case -9: + this.SetDefaults(3513); + break; + case -8: + this.SetDefaults(3514); + break; + case -7: + this.SetDefaults(3515); + break; + case -6: + this.SetDefaults(3516); + break; + case -5: + this.SetDefaults(3517); + break; + case -4: + this.SetDefaults(3518); + break; + case -3: + this.SetDefaults(3519); + break; + case -2: + this.SetDefaults(3520); + break; + case -1: + this.SetDefaults(3521); + break; + } + } + else + this.SetDefaults(type); + } + + public static int BannerToItem(int banner) => banner < 276 ? (banner < 274 ? (banner != 273 ? (banner < 267 ? (banner < 257 ? (banner < 252 ? (banner != 251 ? (banner < 249 ? (banner < 186 ? (banner < 88 ? 1615 + banner - 1 : 2897 + banner - 88) : 3390 + banner - 186) : 3593 + banner - 249) : 3780) : 3789 + banner - 252) : 3837 + banner - 257) : 4541 + banner - 267) : 4602) : 4687 + banner - 274) : 4965 + banner - 276; + + public static int NPCtoBanner(int i) + { + switch (i) + { + case -10: + return 131; + case -9: + return 183; + case -8: + return 159; + case -7: + return 155; + case -6: + return 90; + case -5: + case 16: + return 146; + case -4: + return 151; + case -3: + return 119; + case -2: + case 121: + return 167; + case -1: + case 81: + return 99; + case 1: + case 302: + case 333: + case 334: + case 335: + case 336: + return 69; + case 2: + case 190: + case 191: + case 192: + case 193: + case 194: + case 317: + case 318: + return 25; + case 3: + case 132: + case 186: + case 187: + case 188: + case 189: + case 200: + case 319: + case 320: + case 321: + case 331: + case 332: + case 430: + case 432: + case 433: + case 434: + case 435: + case 436: + case 590: + case 591: + case 632: + return 87; + case 6: + return 27; + case 7: + return 104; + case 10: + case 11: + case 12: + case 95: + case 96: + case 97: + return 84; + case 21: + case 201: + case 202: + case 203: + case 449: + case 450: + case 451: + case 452: + return 67; + case 23: + return 55; + case 24: + return 50; + case 26: + return 40; + case 27: + return 38; + case 28: + return 42; + case 29: + return 39; + case 31: + case 294: + case 295: + case 296: + return 247; + case 32: + return 68; + case 34: + return 102; + case 39: + case 40: + case 41: + return 13; + case 42: + case 231: + case 232: + case 233: + case 234: + case 235: + return 47; + case 43: + return 54; + case 44: + return 178; + case 45: + return 177; + case 46: + case 303: + case 337: + case 540: + return 14; + case 47: + return 18; + case 48: + return 44; + case 49: + return 7; + case 51: + return 130; + case 52: + return 106; + case 53: + return 176; + case 55: + case 230: + return 43; + case 56: + return 168; + case 57: + return 19; + case 58: + return 61; + case 59: + return 135; + case 60: + return 45; + case 61: + return 79; + case 62: + case 66: + return 24; + case 63: + return 51; + case 64: + return 243; + case 65: + return 66; + case 67: + return 20; + case 69: + return 4; + case 71: + return 107; + case 73: + return 41; + case 74: + return 8; + case 75: + return 63; + case 77: + return 6; + case 78: + return 57; + case 79: + return 245; + case 80: + return 246; + case 82: + return 85; + case 83: + return 23; + case 84: + return 28; + case 85: + case 629: + return 16; + case 86: + return 77; + case 87: + case 88: + case 89: + case 90: + case 91: + case 92: + return 86; + case 93: + return 114; + case 94: + return 100; + case 98: + case 99: + case 100: + return 83; + case 101: + return 96; + case 102: + return 1; + case 103: + return 244; + case 104: + return 81; + case 109: + return 17; + case 110: + return 164; + case 111: + return 118; + case 120: + return 15; + case 122: + return 37; + case 133: + return 288; + case 137: + return 128; + case 138: + return 129; + case 140: + return 153; + case 141: + return 75; + case 143: + return 170; + case 144: + return 145; + case 145: + return 169; + case 147: + return 126; + case 148: + case 149: + return 150; + case 150: + return 124; + case 151: + return 134; + case 152: + return 116; + case 153: + return 74; + case 154: + return 248; + case 155: + return 82; + case 156: + return 242; + case 157: + return 5; + case 158: + case 159: + return 78; + case 161: + case 431: + return 29; + case 162: + return 34; + case 163: + case 238: + return 9; + case 164: + case 165: + return 71; + case 166: + return 73; + case 167: + return 179; + case 168: + return 98; + case 169: + return 48; + case 170: + case 171: + case 180: + return 60; + case 172: + return 160; + case 173: + return 21; + case 174: + return 46; + case 175: + return 88; + case 176: + return 287; + case 177: + return 26; + case 179: + return 22; + case 181: + return 30; + case 182: + return 31; + case 183: + return 101; + case 184: + return 171; + case 185: + return 70; + case 195: + case 196: + return 80; + case 197: + return 89; + case 198: + case 199: + return 53; + case 204: + return 172; + case 205: + return 56; + case 206: + return 49; + case 212: + return 62; + case 213: + return 239; + case 214: + return 238; + case 215: + return 240; + case 216: + return 237; + case 217: + return 97; + case 218: + return 103; + case 219: + return 133; + case 220: + return 250; + case 221: + return 174; + case 223: + return 64; + case 224: + return 32; + case 225: + return 76; + case 226: + return 33; + case 236: + case 237: + return 52; + case 239: + case 240: + return 12; + case 241: + return 10; + case 242: + return 11; + case 243: + return 125; + case 244: + return 157; + case 250: + return 2; + case 251: + return 111; + case 252: + return 59; + case 253: + return 65; + case 254: + case (int) byte.MaxValue: + return 72; + case 256: + return 36; + case 257: + return 3; + case 258: + return 58; + case 259: + case 260: + return 35; + case 268: + return (int) sbyte.MaxValue; + case 269: + case 270: + case 271: + case 272: + return 161; + case 273: + case 274: + case 275: + case 276: + return 91; + case 277: + case 278: + case 279: + case 280: + return 121; + case 281: + case 282: + return 156; + case 283: + case 284: + return 147; + case 285: + case 286: + return 105; + case 287: + return 95; + case 288: + return 108; + case 289: + return 115; + case 290: + return 149; + case 291: + return 166; + case 292: + return 175; + case 293: + return 165; + case 301: + return 158; + case 304: + return 123; + case 305: + case 306: + case 307: + case 308: + case 309: + case 310: + case 311: + case 312: + case 313: + case 314: + return 162; + case 315: + return 120; + case 316: + return 113; + case 326: + return 173; + case 329: + return 122; + case 330: + return 152; + case 338: + case 339: + case 340: + return 185; + case 341: + return 154; + case 342: + return 117; + case 343: + return 184; + case 347: + return 110; + case 348: + case 349: + return 148; + case 350: + return 109; + case 351: + return 132; + case 352: + return 112; + case 379: + return 92; + case 380: + return 180; + case 381: + return 136; + case 382: + return 142; + case 383: + case 384: + return 141; + case 385: + return 140; + case 386: + return 138; + case 387: + return 144; + case 388: + return 137; + case 389: + return 139; + case 390: + return 143; + case 391: + return 163; + case 402: + case 403: + case 404: + return 217; + case 405: + case 406: + return 221; + case 407: + case 408: + return 218; + case 409: + case 410: + return 219; + case 411: + return 216; + case 412: + case 413: + case 414: + return 224; + case 415: + return 226; + case 416: + case 518: + return 225; + case 417: + return 223; + case 418: + return 222; + case 419: + return 227; + case 420: + return 230; + case 421: + return 229; + case 423: + return 231; + case 424: + return 228; + case 425: + return 236; + case 426: + return 233; + case 427: + return 234; + case 428: + return 232; + case 429: + return 235; + case 438: + return 93; + case 460: + return 196; + case 461: + return 191; + case 462: + return 190; + case 463: + return 199; + case 464: + return 281; + case 465: + return 282; + case 466: + return 197; + case 467: + return 198; + case 468: + return 192; + case 469: + return 195; + case 470: + return 283; + case 471: + return 186; + case 473: + return 284; + case 474: + return 285; + case 475: + return 286; + case 477: + case 478: + case 479: + return 193; + case 480: + return 201; + case 481: + return 202; + case 482: + return 204; + case 483: + return 203; + case 489: + return 205; + case 490: + return 206; + case 494: + case 495: + return 189; + case 496: + case 497: + return 188; + case 498: + case 499: + case 500: + case 501: + case 502: + case 503: + case 504: + case 505: + case 506: + return 187; + case 508: + case 580: + return 210; + case 509: + case 581: + return 209; + case 510: + case 511: + case 512: + return 208; + case 513: + case 514: + case 515: + return 207; + case 520: + return 241; + case 524: + case 525: + case 526: + case 527: + return 211; + case 528: + case 529: + return 212; + case 530: + case 531: + return 215; + case 532: + return 214; + case 533: + return 213; + case 536: + return 267; + case 537: + return 249; + case 541: + return 251; + case 542: + return 252; + case 543: + return 253; + case 544: + return 254; + case 545: + return (int) byte.MaxValue; + case 546: + return 256; + case 552: + case 553: + case 554: + return 258; + case 555: + case 556: + case 557: + return 257; + case 558: + case 559: + case 560: + return 264; + case 561: + case 562: + case 563: + return 265; + case 566: + case 567: + return 259; + case 568: + case 569: + return 263; + case 570: + case 571: + return 260; + case 572: + case 573: + return 262; + case 574: + case 575: + return 261; + case 578: + return 266; + case 582: + return 280; + case 586: + return 268; + case 587: + return 269; + case 618: + return 273; + case 619: + return 270; + case 620: + return 272; + case 621: + case 622: + case 623: + return 271; + case 624: + return 275; + case 628: + return 274; + case 630: + return 277; + case 631: + return 276; + case 634: + return 279; + case 635: + return 278; + default: + return 0; + } + } + + public static int BannerToNPC(int i) + { + switch (i) + { + case 1: + return 102; + case 2: + return 250; + case 3: + return 257; + case 4: + return 69; + case 5: + return 157; + case 6: + return 77; + case 7: + return 49; + case 8: + return 74; + case 9: + return 163; + case 10: + return 241; + case 11: + return 242; + case 12: + return 239; + case 13: + return 39; + case 14: + return 46; + case 15: + return 120; + case 16: + return 85; + case 17: + return 109; + case 18: + return 47; + case 19: + return 57; + case 20: + return 67; + case 21: + return 173; + case 22: + return 179; + case 23: + return 83; + case 24: + return 62; + case 25: + return 2; + case 26: + return 177; + case 27: + return 6; + case 28: + return 84; + case 29: + return 161; + case 30: + return 181; + case 31: + return 182; + case 32: + return 224; + case 33: + return 226; + case 34: + return 162; + case 35: + return 259; + case 36: + return 256; + case 37: + return 122; + case 38: + return 27; + case 39: + return 29; + case 40: + return 26; + case 41: + return 73; + case 42: + return 28; + case 43: + return 55; + case 44: + return 48; + case 45: + return 60; + case 46: + return 174; + case 47: + return 42; + case 48: + return 169; + case 49: + return 206; + case 50: + return 24; + case 51: + return 63; + case 52: + return 236; + case 53: + return 199; + case 54: + return 43; + case 55: + return 23; + case 56: + return 205; + case 57: + return 78; + case 58: + return 258; + case 59: + return 252; + case 60: + return 170; + case 61: + return 58; + case 62: + return 212; + case 63: + return 75; + case 64: + return 223; + case 65: + return 253; + case 66: + return 65; + case 67: + return 21; + case 68: + return 32; + case 69: + return 1; + case 70: + return 185; + case 71: + return 164; + case 72: + return 254; + case 73: + return 166; + case 74: + return 153; + case 75: + return 141; + case 76: + return 225; + case 77: + return 86; + case 78: + return 158; + case 79: + return 61; + case 80: + return 196; + case 81: + return 104; + case 82: + return 155; + case 83: + return 98; + case 84: + return 10; + case 85: + return 82; + case 86: + return 87; + case 87: + return 3; + case 88: + return 175; + case 89: + return 197; + case 90: + return -6; + case 91: + return 273; + case 92: + return 379; + case 93: + return 438; + case 95: + return 287; + case 96: + return 101; + case 97: + return 217; + case 98: + return 168; + case 99: + return 81; + case 100: + return 94; + case 101: + return 183; + case 102: + return 34; + case 103: + return 218; + case 104: + return 7; + case 105: + return 285; + case 106: + return 52; + case 107: + return 71; + case 108: + return 288; + case 109: + return 350; + case 110: + return 347; + case 111: + return 251; + case 112: + return 352; + case 113: + return 316; + case 114: + return 93; + case 115: + return 289; + case 116: + return 152; + case 117: + return 342; + case 118: + return 111; + case 119: + return -3; + case 120: + return 315; + case 121: + return 277; + case 122: + return 329; + case 123: + return 304; + case 124: + return 150; + case 125: + return 243; + case 126: + return 147; + case (int) sbyte.MaxValue: + return 268; + case 128: + return 137; + case 129: + return 138; + case 130: + return 51; + case 131: + return -10; + case 132: + return 351; + case 133: + return 219; + case 134: + return 151; + case 135: + return 59; + case 136: + return 381; + case 137: + return 388; + case 138: + return 386; + case 139: + return 389; + case 140: + return 385; + case 141: + return 383; + case 142: + return 382; + case 143: + return 390; + case 144: + return 387; + case 145: + return 144; + case 146: + return 16; + case 147: + return 283; + case 148: + return 348; + case 149: + return 290; + case 150: + return 148; + case 151: + return -4; + case 152: + return 330; + case 153: + return 140; + case 154: + return 341; + case 155: + return -7; + case 156: + return 281; + case 157: + return 244; + case 158: + return 301; + case 159: + return -8; + case 160: + return 172; + case 161: + return 269; + case 162: + return 305; + case 163: + return 391; + case 164: + return 110; + case 165: + return 293; + case 166: + return 291; + case 167: + return 121; + case 168: + return 56; + case 169: + return 145; + case 170: + return 143; + case 171: + return 184; + case 172: + return 204; + case 173: + return 326; + case 174: + return 221; + case 175: + return 292; + case 176: + return 53; + case 177: + return 45; + case 178: + return 44; + case 179: + return 167; + case 180: + return 380; + case 183: + return -9; + case 184: + return 343; + case 185: + return 338; + case 186: + return 471; + case 187: + return 498; + case 188: + return 496; + case 189: + return 494; + case 190: + return 462; + case 191: + return 461; + case 192: + return 468; + case 193: + return 477; + case 195: + return 469; + case 196: + return 460; + case 197: + return 466; + case 198: + return 467; + case 199: + return 463; + case 201: + return 480; + case 202: + return 481; + case 203: + return 483; + case 204: + return 482; + case 205: + return 489; + case 206: + return 490; + case 207: + return 513; + case 208: + return 510; + case 209: + return 581; + case 210: + return 580; + case 211: + return 524; + case 212: + return 529; + case 213: + return 533; + case 214: + return 532; + case 215: + return 530; + case 216: + return 411; + case 217: + return 402; + case 218: + return 407; + case 219: + return 409; + case 221: + return 405; + case 222: + return 418; + case 223: + return 417; + case 224: + return 412; + case 225: + return 416; + case 226: + return 415; + case 227: + return 419; + case 228: + return 424; + case 229: + return 421; + case 230: + return 420; + case 231: + return 423; + case 232: + return 428; + case 233: + return 426; + case 234: + return 427; + case 235: + return 429; + case 236: + return 425; + case 237: + return 216; + case 238: + return 214; + case 239: + return 213; + case 240: + return 215; + case 241: + return 520; + case 242: + return 156; + case 243: + return 64; + case 244: + return 103; + case 245: + return 79; + case 246: + return 80; + case 247: + return 31; + case 248: + return 154; + case 249: + return 537; + case 250: + return 220; + case 251: + return 541; + case 252: + return 542; + case 253: + return 543; + case 254: + return 544; + case (int) byte.MaxValue: + return 545; + case 256: + return 546; + case 257: + return 555; + case 258: + return 552; + case 259: + return 566; + case 260: + return 570; + case 261: + return 574; + case 262: + return 572; + case 263: + return 568; + case 264: + return 558; + case 265: + return 561; + case 266: + return 578; + case 267: + return 536; + case 268: + return 586; + case 269: + return 587; + case 270: + return 619; + case 271: + return 621; + case 272: + return 620; + case 273: + return 618; + case 274: + return 628; + case 275: + return 624; + case 276: + return 631; + case 277: + return 630; + case 278: + return 635; + case 279: + return 634; + case 280: + return 582; + case 281: + return 464; + case 282: + return 465; + case 283: + return 470; + case 284: + return 473; + case 285: + return 474; + case 286: + return 475; + case 287: + return 176; + case 288: + return 133; + default: + return 0; + } + } + + public bool FitsAmmoSlot() => (this.type == 0 || this.ammo > 0 || this.bait > 0 || this.type == 530 || this.type == 849 || this.paint > (byte) 0) && !this.notAmmo || this.type == 353; + + public bool CanFillEmptyAmmoSlot() => this.bait <= 0 && this.paint == (byte) 0 && this.type != 353 && this.type != 849 && this.type != 169 && this.type != 75 && this.type != 23 && this.type != 408 && this.type != 370 && this.type != 1246 && this.type != 154 && !this.notAmmo; + + public void SetDefaults1(int type) + { + if (type == 1) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 20; + this.useTime = 13; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.damage = 5; + this.pick = 40; + this.UseSound = SoundID.Item1; + this.knockBack = 2f; + this.value = 2000; + this.melee = true; + } + else if (type == 2) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 0; + this.width = 12; + this.height = 12; + } + else if (type == 3) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 1; + this.width = 12; + this.height = 12; + } + else if (type == 4) + { + this.useStyle = 1; + this.useTurn = false; + this.useAnimation = 21; + this.useTime = 21; + this.width = 24; + this.height = 28; + this.damage = 10; + this.knockBack = 5f; + this.UseSound = SoundID.Item1; + this.scale = 1f; + this.value = 1800; + this.melee = true; + } + else if (type == 5) + { + this.useStyle = 2; + this.UseSound = SoundID.Item2; + this.useTurn = false; + this.useAnimation = 17; + this.useTime = 17; + this.width = 16; + this.height = 18; + this.healLife = 15; + this.maxStack = 99; + this.consumable = true; + this.potion = true; + this.value = Item.sellPrice(silver: 2, copper: 50); + } + else if (type == 6) + { + this.autoReuse = false; + this.useStyle = 13; + this.useAnimation = 12; + this.useTime = 12; + this.width = 50; + this.height = 18; + this.shoot = 940; + this.UseSound = SoundID.Item1; + this.damage = 8; + this.knockBack = 4f; + this.shootSpeed = 2.1f; + this.noMelee = true; + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(silver: 2, copper: 80)); + this.melee = true; + this.noUseGraphic = true; + } + else if (type == 7) + { + this.autoReuse = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 30; + this.useTime = 20; + this.hammer = 40; + this.width = 24; + this.height = 28; + this.damage = 7; + this.knockBack = 5.5f; + this.scale = 1.2f; + this.UseSound = SoundID.Item1; + this.value = 1600; + this.melee = true; + } + else if (type == 8) + { + this.flame = true; + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.holdStyle = 1; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 4; + this.width = 10; + this.height = 12; + this.value = 50; + } + else if (type == 9) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 30; + this.width = 8; + this.height = 10; + } + else if (type == 10) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 27; + this.knockBack = 4.5f; + this.useTime = 19; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.damage = 5; + this.axe = 9; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.value = 1600; + this.melee = true; + } + else if (type == 11) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 6; + this.width = 12; + this.height = 12; + this.value = 500; + } + else if (type == 12) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 7; + this.width = 12; + this.height = 12; + this.value = 250; + } + else if (type == 13) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 8; + this.width = 12; + this.height = 12; + this.value = Item.sellPrice(silver: 3); + } + else if (type == 14) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 9; + this.width = 12; + this.height = 12; + this.value = Item.sellPrice(silver: 1, copper: 50); + } + else if (type == 15) + { + this.width = 24; + this.height = 28; + this.accessory = true; + this.value = 1000; + this.waistSlot = (sbyte) 2; + } + else if (type == 16) + { + this.width = 24; + this.height = 28; + this.accessory = true; + this.value = 5000; + this.waistSlot = (sbyte) 7; + } + else if (type == 17) + { + this.width = 24; + this.height = 28; + this.accessory = true; + this.rare = 1; + this.value = 10000; + this.waistSlot = (sbyte) 3; + } + else if (type == 18) + { + this.width = 24; + this.height = 18; + this.accessory = true; + this.rare = 1; + this.value = Item.sellPrice(silver: 25); + } + else if (type == 19) + { + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.value = 6000; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 6; + } + else if (type == 20) + { + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.value = 750; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 0; + } + else if (type == 21) + { + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.value = 3000; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 4; + } + else if (type == 22) + { + this.color = new Color(160, 145, 130, 110); + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.value = 1500; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 2; + } + else if (type == 23) + { + this.width = 10; + this.height = 12; + this.maxStack = 999; + this.alpha = 175; + this.ammo = AmmoID.Gel; + this.color = new Color(0, 80, (int) byte.MaxValue, 100); + this.value = 5; + this.consumable = true; + } + else if (type == 24) + { + this.useStyle = 1; + this.useTurn = false; + this.useAnimation = 25; + this.width = 24; + this.height = 28; + this.damage = 7; + this.knockBack = 4f; + this.scale = 0.95f; + this.UseSound = SoundID.Item1; + this.value = 100; + this.melee = true; + } + else if (type == 25) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.width = 14; + this.height = 28; + this.value = 200; + } + else if (type == 26) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 1; + this.width = 12; + this.height = 12; + } + else if (type == 27) + { + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.autoReuse = true; + this.createTile = 20; + this.width = 18; + this.height = 18; + this.value = 10; + } + else if (type == 28) + { + this.UseSound = SoundID.Item3; + this.healLife = 50; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.potion = true; + this.value = 300; + } + else if (type == 29) + { + this.maxStack = 99; + this.consumable = true; + this.width = 18; + this.height = 18; + this.useStyle = 4; + this.useTime = 30; + this.UseSound = SoundID.Item4; + this.useAnimation = 30; + this.rare = 2; + this.value = 75000; + } + else if (type == 30) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 16; + this.width = 12; + this.height = 12; + } + else if (type == 31) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 13; + this.width = 16; + this.height = 24; + this.value = 20; + } + else if (type == 32) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.width = 26; + this.height = 20; + this.value = 300; + } + else if (type == 33) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 17; + this.width = 26; + this.height = 24; + this.value = 300; + } + else if (type == 34) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.width = 12; + this.height = 30; + this.value = 150; + } + else if (type == 35) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 16; + this.width = 28; + this.height = 14; + this.value = 5000; + } + else if (type == 36) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.width = 28; + this.height = 14; + this.value = 150; + } + else if (type == 37) + { + this.width = 28; + this.height = 12; + this.defense = 1; + this.headSlot = 10; + this.value = 1000; + } + else if (type == 38) + { + this.width = 12; + this.height = 20; + this.maxStack = 99; + this.value = 500; + } + else if (type == 39) + { + this.useStyle = 5; + this.useAnimation = 30; + this.useTime = 30; + this.width = 12; + this.height = 28; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 4; + this.shootSpeed = 6.1f; + this.noMelee = true; + this.value = 100; + this.ranged = true; + } + else if (type == 40) + { + this.shootSpeed = 3f; + this.shoot = 1; + this.damage = 5; + this.width = 10; + this.height = 28; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Arrow; + this.knockBack = 2f; + this.value = 5; + this.ranged = true; + } + else if (type == 41) + { + this.shootSpeed = 3.5f; + this.shoot = 2; + this.damage = 7; + this.width = 10; + this.height = 28; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Arrow; + this.knockBack = 2f; + this.value = 10; + this.ranged = true; + } + else if (type == 42) + { + this.useStyle = 1; + this.shootSpeed = 9f; + this.shoot = 3; + this.damage = 10; + this.width = 18; + this.height = 20; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 15; + this.ranged = true; + } + else if (type == 43) + { + this.useStyle = 4; + this.width = 22; + this.height = 14; + this.consumable = true; + this.useAnimation = 45; + this.useTime = 45; + this.maxStack = 20; + this.rare = 1; + } + else if (type == 44) + { + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 25; + this.width = 12; + this.height = 28; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 14; + this.shootSpeed = 6.7f; + this.knockBack = 1f; + this.alpha = 30; + this.rare = 1; + this.noMelee = true; + this.value = 18000; + this.ranged = true; + } + else if (type == 45) + { + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 30; + this.knockBack = 6f; + this.useTime = 15; + this.width = 24; + this.height = 28; + this.damage = 20; + this.axe = 15; + this.scale = 1.2f; + this.UseSound = SoundID.Item1; + this.rare = 1; + this.value = 13500; + this.melee = true; + } + else if (type == 46) + { + this.useStyle = 1; + this.useAnimation = 20; + this.knockBack = 5f; + this.width = 24; + this.height = 28; + this.damage = 17; + this.scale = 1.4f; + this.UseSound = SoundID.Item1; + this.rare = 1; + this.value = 13500; + this.melee = true; + } + else if (type == 47) + { + this.shootSpeed = 3.4f; + this.shoot = 4; + this.damage = 12; + this.width = 10; + this.height = 28; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Arrow; + this.knockBack = 3f; + this.alpha = 30; + this.rare = 1; + this.value = 40; + this.ranged = true; + } + else if (type == 48) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.width = 26; + this.height = 22; + this.value = 500; + } + else if (type == 49) + { + this.width = 22; + this.height = 22; + this.accessory = true; + this.lifeRegen = 1; + this.rare = 1; + this.value = 50000; + this.handOnSlot = (sbyte) 2; + } + else if (type == 50) + { + this.useTurn = true; + this.width = 20; + this.height = 20; + this.useStyle = 4; + this.useTime = 90; + this.UseSound = SoundID.Item6; + this.useAnimation = 90; + this.rare = 1; + this.value = 50000; + } + else if (type == 51) + { + this.shootSpeed = 0.5f; + this.shoot = 5; + this.damage = 10; + this.width = 10; + this.height = 28; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Arrow; + this.knockBack = 4f; + this.rare = 1; + this.value = 100; + this.ranged = true; + } + else if (type == 52) + { + type = 52; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 1; + } + else if (type == 53) + { + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 1; + this.value = 50000; + this.waistSlot = (sbyte) 1; + } + else if (type == 54) + { + this.width = 28; + this.height = 24; + this.accessory = true; + this.rare = 1; + this.value = 50000; + this.shoeSlot = (sbyte) 6; + } + else if (type == 55) + { + this.noMelee = true; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 6; + this.damage = 13; + this.knockBack = 8f; + this.width = 14; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.rare = 1; + this.value = 50000; + this.melee = true; + } + else if (type == 56) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 22; + this.width = 12; + this.height = 12; + this.rare = 1; + this.value = Item.sellPrice(silver: 10); + } + else if (type == 57) + { + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.rare = 1; + this.value = Item.sellPrice(silver: 30); + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 8; + } + else if (type == 58) + { + this.width = 12; + this.height = 12; + } + else if (type == 59) + { + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.createTile = 23; + this.width = 14; + this.height = 14; + this.value = 500; + this.autoReuse = true; + } + else if (type == 60) + { + this.width = 16; + this.height = 18; + this.maxStack = 99; + this.value = 50; + } + else if (type == 61) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 25; + this.width = 12; + this.height = 12; + } + else if (type == 62) + { + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.createTile = 2; + this.width = 14; + this.height = 14; + this.value = 20; + this.autoReuse = true; + } + else if (type == 63) + { + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 27; + this.width = 26; + this.height = 26; + this.value = Item.buyPrice(silver: 50); + } + else if (type == 64) + { + this.mana = 10; + this.damage = 10; + this.useStyle = 1; + this.shootSpeed = 32f; + this.shoot = 7; + this.width = 26; + this.height = 28; + this.useAnimation = 28; + this.useTime = 28; + this.rare = 1; + this.noMelee = true; + this.knockBack = 1f; + this.value = this.shadowOrbPrice; + this.magic = true; + } + else if (type == 65) + { + this.knockBack = 5f; + this.alpha = 100; + this.color = new Color(150, 150, 150, 0); + this.damage = 22; + this.useStyle = 1; + this.scale = 1.25f; + this.shootSpeed = 20f; + this.shoot = 9; + this.width = 14; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 40; + this.rare = 2; + this.value = 50000; + this.melee = true; + } + else if (type == 66) + { + this.useStyle = 1; + this.shootSpeed = 4f; + this.shoot = 10; + this.width = 16; + this.height = 24; + this.maxStack = 99; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noMelee = true; + this.value = 75; + } + else if (type == 67) + { + this.damage = 0; + this.useStyle = 1; + this.shootSpeed = 4f; + this.shoot = 11; + this.width = 16; + this.height = 24; + this.maxStack = 99; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noMelee = true; + this.value = 100; + } + else if (type == 68) + { + this.width = 18; + this.height = 20; + this.maxStack = 99; + this.value = 10; + } + else if (type == 69) + { + this.width = 8; + this.height = 20; + this.maxStack = 99; + this.value = 100; + } + else if (type == 70) + { + this.useStyle = 4; + this.consumable = true; + this.useAnimation = 45; + this.useTime = 45; + this.width = 28; + this.height = 28; + this.maxStack = 20; + this.rare = 1; + } + else if (type == 71) + { + this.width = 10; + this.height = 10; + this.maxStack = 100; + this.value = 5; + this.ammo = AmmoID.Coin; + this.shoot = 158; + this.notAmmo = true; + this.damage = 25; + this.shootSpeed = 1f; + this.ranged = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 330; + this.noMelee = true; + } + else if (type == 72) + { + this.width = 10; + this.height = 12; + this.maxStack = 100; + this.value = 500; + this.ammo = AmmoID.Coin; + this.notAmmo = true; + this.damage = 50; + this.shoot = 159; + this.shootSpeed = 2f; + this.ranged = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 331; + this.noMelee = true; + } + else if (type == 73) + { + this.width = 10; + this.height = 14; + this.maxStack = 100; + this.value = 50000; + this.ammo = AmmoID.Coin; + this.notAmmo = true; + this.damage = 100; + this.shoot = 160; + this.shootSpeed = 3f; + this.ranged = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 332; + this.noMelee = true; + } + else if (type == 74) + { + this.width = 12; + this.height = 14; + this.maxStack = 999; + this.value = 5000000; + this.ammo = AmmoID.Coin; + this.notAmmo = true; + this.damage = 200; + this.shoot = 161; + this.shootSpeed = 4f; + this.ranged = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 333; + this.noMelee = true; + } + else if (type == 75) + { + this.width = 18; + this.height = 18; + this.maxStack = 999; + this.alpha = 75; + this.ammo = AmmoID.FallenStar; + this.value = Item.sellPrice(silver: 5); + this.useStyle = 4; + this.UseSound = SoundID.Item4; + this.useTurn = false; + this.useAnimation = 17; + this.useTime = 17; + this.consumable = true; + this.rare = 1; + } + else if (type == 76) + { + this.width = 18; + this.height = 18; + this.defense = 1; + this.legSlot = 1; + this.value = 1000; + } + else if (type == 77) + { + this.width = 18; + this.height = 18; + this.defense = 2; + this.legSlot = 2; + this.value = 4000; + } + else if (type == 78) + { + this.width = 18; + this.height = 18; + this.defense = 3; + this.legSlot = 3; + this.value = 10000; + } + else if (type == 79) + { + this.width = 18; + this.height = 18; + this.defense = 4; + this.legSlot = 4; + this.value = 20000; + } + else if (type == 80) + { + this.width = 18; + this.height = 18; + this.defense = 2; + this.bodySlot = 1; + this.value = 1250; + } + else if (type == 81) + { + this.width = 18; + this.height = 18; + this.defense = 3; + this.bodySlot = 2; + this.value = 5000; + } + else if (type == 82) + { + this.width = 18; + this.height = 18; + this.defense = 4; + this.bodySlot = 3; + this.value = 12500; + } + else if (type == 83) + { + this.width = 18; + this.height = 18; + this.defense = 5; + this.bodySlot = 4; + this.value = 25000; + } + else if (type == 84) + { + this.noUseGraphic = true; + this.damage = 0; + this.knockBack = 7f; + this.useStyle = 5; + this.shootSpeed = 11.5f; + this.shoot = 13; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 1; + this.noMelee = true; + this.value = 20000; + } + else if (type == 85) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 8; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 214; + this.width = 12; + this.height = 12; + this.value = 200; + this.tileBoost += 3; + } + else if (type == 86) + { + this.width = 14; + this.height = 18; + this.maxStack = 999; + this.rare = 1; + this.value = 500; + } + else if (type == 87) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 29; + this.width = 20; + this.height = 12; + this.value = 10000; + } + else if (type == 88) + { + this.width = 22; + this.height = 16; + this.defense = 1; + this.headSlot = 11; + this.rare = 1; + this.value = Item.buyPrice(gold: 4); + } + else if (type == 89) + { + this.width = 18; + this.height = 18; + this.defense = 1; + this.headSlot = 1; + this.value = 750; + } + else if (type == 90) + { + this.width = 18; + this.height = 18; + this.defense = 2; + this.headSlot = 2; + this.value = 3000; + } + else if (type == 91) + { + this.width = 18; + this.height = 18; + this.defense = 3; + this.headSlot = 3; + this.value = 7500; + } + else if (type == 92) + { + this.width = 18; + this.height = 18; + this.defense = 4; + this.headSlot = 4; + this.value = 15000; + } + else if (type == 93) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 4; + this.width = 12; + this.height = 12; + } + else if (type == 94) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.width = 8; + this.height = 10; + } + else if (type == 95) + { + this.useStyle = 5; + this.useAnimation = 16; + this.useTime = 16; + this.width = 24; + this.height = 28; + this.shoot = 14; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item11; + this.damage = 10; + this.shootSpeed = 5f; + this.noMelee = true; + this.value = 50000; + this.scale = 0.9f; + this.rare = 1; + this.ranged = true; + } + else if (type == 96) + { + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 36; + this.useTime = 36; + this.width = 44; + this.height = 14; + this.shoot = 10; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item11; + this.damage = 31; + this.shootSpeed = 9f; + this.noMelee = true; + this.value = this.shadowOrbPrice; + this.knockBack = 5.25f; + this.rare = 1; + this.ranged = true; + this.crit = 7; + } + else if (type == 97) + { + this.shootSpeed = 4f; + this.shoot = 14; + this.damage = 7; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Bullet; + this.knockBack = 2f; + this.value = 7; + this.ranged = true; + } + else if (type == 98) + { + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 8; + this.useTime = 8; + this.width = 50; + this.height = 18; + this.shoot = 10; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item11; + this.damage = 6; + this.shootSpeed = 7f; + this.noMelee = true; + this.value = 350000; + this.rare = 2; + this.ranged = true; + } + else if (type == 99) + { + this.useStyle = 5; + this.useAnimation = 28; + this.useTime = 28; + this.width = 12; + this.height = 28; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 8; + this.shootSpeed = 6.6f; + this.noMelee = true; + this.value = 1400; + this.ranged = true; + } + else if (type == 100) + { + this.width = 18; + this.height = 18; + this.defense = 6; + this.legSlot = 5; + this.rare = 1; + this.value = 22500; + } + else if (type == 101) + { + this.width = 18; + this.height = 18; + this.defense = 7; + this.bodySlot = 5; + this.rare = 1; + this.value = 30000; + } + else if (type == 102) + { + this.width = 18; + this.height = 18; + this.defense = 6; + this.headSlot = 5; + this.rare = 1; + this.value = 37500; + } + else if (type == 103) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 20; + this.useTime = 15; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.damage = 9; + this.pick = 65; + this.UseSound = SoundID.Item1; + this.knockBack = 3f; + this.rare = 1; + this.value = 18000; + this.scale = 1.15f; + this.melee = true; + } + else if (type == 104) + { + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 45; + this.useTime = 19; + this.hammer = 55; + this.width = 24; + this.height = 28; + this.damage = 24; + this.knockBack = 6f; + this.scale = 1.3f; + this.UseSound = SoundID.Item1; + this.rare = 1; + this.value = 15000; + this.melee = true; + } + else if (type == 105) + { + this.flame = true; + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 33; + this.width = 8; + this.height = 18; + this.value = Item.sellPrice(silver: 3); + this.holdStyle = 1; + } + else if (type == 106) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 34; + this.width = 26; + this.height = 26; + this.value = 3000; + } + else if (type == 107) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 34; + this.placeStyle = 1; + this.width = 26; + this.height = 26; + this.value = 12000; + } + else if (type == 108) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 34; + this.placeStyle = 2; + this.width = 26; + this.height = 26; + this.value = 24000; + } + else if (type == 109) + { + this.maxStack = 99; + this.consumable = true; + this.width = 18; + this.height = 18; + this.useStyle = 4; + this.useTime = 30; + this.UseSound = SoundID.Item29; + this.useAnimation = 30; + this.rare = 2; + } + else if (type == 110) + { + this.UseSound = SoundID.Item3; + this.healMana = 50; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 50; + this.consumable = true; + this.width = 14; + this.height = 24; + this.value = Item.buyPrice(silver: 1); + } + else if (type == 111) + { + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 1; + this.value = this.shadowOrbPrice; + this.handOnSlot = (sbyte) 3; + } + else if (type == 112) + { + this.mana = 15; + this.damage = 48; + this.useStyle = 1; + this.shootSpeed = 6f; + this.shoot = 15; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item20; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.knockBack = 5.5f; + this.value = this.hellPrice; + this.magic = true; + } + else if (type == 113) + { + this.mana = 12; + this.channel = true; + this.damage = 27; + this.useStyle = 1; + this.shootSpeed = 6f; + this.shoot = 16; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item9; + this.useAnimation = 18; + this.useTime = 18; + this.rare = 2; + this.noMelee = true; + this.knockBack = 7.5f; + this.value = this.dungeonPrice; + this.magic = true; + } + else if (type == 114) + { + this.channel = true; + this.knockBack = 5f; + this.useStyle = 1; + this.shoot = 17; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item8; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 1; + this.noMelee = true; + this.value = Item.buyPrice(gold: 5); + } + else if (type == 115) + { + this.channel = true; + this.damage = 0; + this.useStyle = 4; + this.shoot = 18; + this.width = 24; + this.height = 24; + this.UseSound = SoundID.Item8; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 1; + this.noMelee = true; + this.value = this.shadowOrbPrice; + this.buffType = 19; + } + else if (type == 116) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 37; + this.width = 12; + this.height = 12; + this.value = 1000; + } + else if (type == 117) + { + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.rare = 1; + this.value = 7000; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 9; + } + else if (type == 118) + { + this.maxStack = 99; + this.width = 18; + this.height = 18; + this.value = 1000; + } + else if (type == 119) + { + this.noMelee = true; + this.useStyle = 1; + this.shootSpeed = 11f; + this.shoot = 19; + this.damage = 32; + this.knockBack = 8f; + this.width = 14; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.rare = 3; + this.value = 100000; + this.melee = true; + } + else if (type == 120) + { + this.useStyle = 5; + this.useAnimation = 22; + this.useTime = 22; + this.width = 14; + this.height = 32; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 31; + this.shootSpeed = 8f; + this.knockBack = 2f; + this.alpha = 30; + this.rare = 3; + this.noMelee = true; + this.scale = 1.1f; + this.value = 27000; + this.ranged = true; + } + else if (type == 121) + { + this.useStyle = 1; + this.useAnimation = 30; + this.knockBack = 6.5f; + this.width = 24; + this.height = 28; + this.damage = 36; + this.scale = 1.3f; + this.UseSound = SoundID.Item1; + this.rare = 3; + this.value = 27000; + this.melee = true; + } + if (type == 122) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 23; + this.useTime = 18; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.damage = 12; + this.pick = 100; + this.scale = 1.15f; + this.UseSound = SoundID.Item1; + this.knockBack = 2f; + this.rare = 3; + this.value = 27000; + this.melee = true; + } + else if (type == 123) + { + this.width = 18; + this.height = 18; + this.defense = 5; + this.headSlot = 6; + this.rare = 1; + this.value = 45000; + } + else if (type == 124) + { + this.width = 18; + this.height = 18; + this.defense = 6; + this.bodySlot = 6; + this.rare = 1; + this.value = 30000; + } + else if (type == 125) + { + this.width = 18; + this.height = 18; + this.defense = 5; + this.legSlot = 6; + this.rare = 1; + this.value = 30000; + } + else if (type == 126) + { + this.UseSound = SoundID.Item3; + this.healLife = 20; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 999; + this.consumable = true; + this.width = 14; + this.height = 24; + this.potion = true; + this.value = 20; + } + else if (type == (int) sbyte.MaxValue) + { + this.autoReuse = true; + this.useStyle = 5; + this.useAnimation = 17; + this.useTime = 17; + this.width = 24; + this.height = 28; + this.shoot = 20; + this.mana = 7; + this.UseSound = SoundID.Item157; + this.knockBack = 0.75f; + this.damage = 19; + this.shootSpeed = 10f; + this.noMelee = true; + this.scale = 0.8f; + this.rare = 1; + this.magic = true; + this.value = 20000; + } + else if (type == 128) + { + this.width = 28; + this.height = 24; + this.accessory = true; + this.rare = 3; + this.value = 50000; + this.shoeSlot = (sbyte) 12; + } + else if (type == 129) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 38; + this.width = 12; + this.height = 12; + } + else if (type == 130) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 5; + this.width = 12; + this.height = 12; + } + else if (type == 131) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 39; + this.width = 12; + this.height = 12; + } + else if (type == 132) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 6; + this.width = 12; + this.height = 12; + } + else if (type == 133) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 40; + this.width = 12; + this.height = 12; + } + else if (type == 134) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 41; + this.width = 12; + this.height = 12; + } + else if (type == 135) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 17; + this.width = 12; + this.height = 12; + } + else if (type == 136) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.value = Item.sellPrice(copper: 30); + } + else if (type == 137) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 43; + this.width = 12; + this.height = 12; + } + else if (type == 138) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 18; + this.width = 12; + this.height = 12; + } + else if (type == 139) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 44; + this.width = 12; + this.height = 12; + } + else if (type == 140) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 19; + this.width = 12; + this.height = 12; + } + else if (type == 141) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 45; + this.width = 12; + this.height = 12; + } + else if (type == 142) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 10; + this.width = 12; + this.height = 12; + } + else if (type == 143) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 46; + this.width = 12; + this.height = 12; + } + else if (type == 144) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 11; + this.width = 12; + this.height = 12; + } + else if (type == 145) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 47; + this.width = 12; + this.height = 12; + } + else if (type == 146) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 12; + this.width = 12; + this.height = 12; + } + else if (type == 147) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 48; + this.width = 12; + this.height = 12; + } + else if (type == 148) + { + this.flame = true; + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 49; + this.width = 8; + this.height = 18; + this.value = Item.sellPrice(silver: 1); + this.holdStyle = 1; + this.rare = 1; + } + else if (type == 149) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 50; + this.width = 24; + this.height = 28; + this.value = Item.sellPrice(copper: 75); + } + else if (type == 150) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 51; + this.width = 20; + this.height = 24; + this.alpha = 100; + } + else if (type == 151) + { + this.width = 18; + this.height = 18; + this.defense = 5; + this.headSlot = 7; + this.rare = 2; + this.value = 45000; + } + else if (type == 152) + { + this.width = 18; + this.height = 18; + this.defense = 6; + this.bodySlot = 7; + this.rare = 2; + this.value = 30000; + } + else if (type == 153) + { + this.width = 18; + this.height = 18; + this.defense = 5; + this.legSlot = 7; + this.rare = 2; + this.value = 30000; + } + else if (type == 154) + { + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 14; + this.value = 50; + this.useAnimation = 12; + this.useTime = 12; + this.useStyle = 1; + this.UseSound = SoundID.Item1; + this.shootSpeed = 8f; + this.noUseGraphic = true; + this.noMelee = true; + this.damage = 20; + this.knockBack = 2.3f; + this.shoot = 21; + this.ranged = true; + this.ammo = 154; + } + else if (type == 155) + { + this.autoReuse = true; + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 18; + this.width = 40; + this.height = 40; + this.damage = 21; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.rare = 2; + this.value = this.dungeonPrice; + this.knockBack = 2.5f; + this.melee = true; + } + else if (type == 156) + { + this.width = 24; + this.height = 28; + this.rare = 2; + this.value = this.dungeonPrice; + this.accessory = true; + this.defense = 1; + this.shieldSlot = (sbyte) 1; + } + else if (type == 157) + { + this.mana = 6; + this.autoReuse = true; + this.useStyle = 5; + this.useAnimation = 16; + this.useTime = 8; + this.knockBack = 5f; + this.width = 38; + this.height = 10; + this.damage = 16; + this.scale = 1f; + this.shoot = 22; + this.shootSpeed = 12.5f; + this.UseSound = SoundID.Item13; + this.noMelee = true; + this.rare = 2; + this.value = this.dungeonPrice; + this.magic = true; + } + else if (type == 158) + { + this.width = 20; + this.height = 22; + this.rare = 1; + this.value = 27000; + this.accessory = true; + } + else if (type == 159) + { + this.width = 14; + this.height = 28; + this.rare = 1; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.accessory = true; + this.balloonSlot = (sbyte) 8; + } + else if (type == 160) + { + this.autoReuse = true; + this.noMelee = true; + this.useStyle = 5; + this.useAnimation = 30; + this.useTime = 30; + this.knockBack = 6f; + this.width = 30; + this.height = 10; + this.damage = 25; + this.scale = 1.1f; + this.shoot = 23; + this.shootSpeed = 11f; + this.UseSound = SoundID.Item10; + this.rare = 2; + this.value = 27000; + this.ranged = true; + } + else if (type == 161) + { + this.useStyle = 1; + this.shootSpeed = 5f; + this.shoot = 24; + this.knockBack = 1f; + this.damage = 15; + this.width = 10; + this.height = 10; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 80; + this.ranged = true; + } + else if (type == 162) + { + this.useStyle = 5; + this.useAnimation = 45; + this.useTime = 45; + this.knockBack = 5.5f; + this.width = 30; + this.height = 10; + this.damage = 15; + this.scale = 1.1f; + this.noUseGraphic = true; + this.shoot = 25; + this.shootSpeed = 12f; + this.UseSound = SoundID.Item1; + this.rare = 1; + this.value = this.shadowOrbPrice; + this.melee = true; + this.channel = true; + this.noMelee = true; + } + else if (type == 163) + { + this.noMelee = true; + this.useStyle = 5; + this.useAnimation = 45; + this.useTime = 45; + this.knockBack = 6f; + this.width = 30; + this.height = 10; + this.damage = 27; + this.scale = 1.1f; + this.noUseGraphic = true; + this.shoot = 26; + this.shootSpeed = 12f; + this.UseSound = SoundID.Item1; + this.rare = 2; + this.value = this.dungeonPrice; + this.melee = true; + this.channel = true; + } + else if (type == 164) + { + this.autoReuse = false; + this.useStyle = 5; + this.useAnimation = 10; + this.useTime = 10; + this.width = 24; + this.height = 24; + this.shoot = 14; + this.knockBack = 3f; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item41; + this.damage = 17; + this.shootSpeed = 10f; + this.noMelee = true; + this.value = this.dungeonPrice; + this.scale = 0.85f; + this.rare = 2; + this.ranged = true; + } + else if (type == 165) + { + this.autoReuse = true; + this.rare = 2; + this.mana = 10; + this.UseSound = SoundID.Item21; + this.noMelee = true; + this.useStyle = 5; + this.damage = 19; + this.useAnimation = 17; + this.useTime = 17; + this.width = 24; + this.height = 28; + this.shoot = 27; + this.scale = 0.9f; + this.shootSpeed = 4.5f; + this.knockBack = 5f; + this.magic = true; + this.value = Item.sellPrice(gold: 1, silver: 50); + } + else if (type == 166) + { + this.useStyle = 1; + this.shootSpeed = 5f; + this.shoot = 28; + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 25; + this.useTime = 25; + this.noUseGraphic = true; + this.noMelee = true; + this.value = Item.buyPrice(silver: 3); + this.damage = 0; + } + else if (type == 167) + { + this.useStyle = 1; + this.shootSpeed = 4f; + this.shoot = 29; + this.width = 8; + this.height = 28; + this.maxStack = 99; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 40; + this.useTime = 40; + this.noUseGraphic = true; + this.noMelee = true; + this.value = Item.buyPrice(silver: 20); + this.rare = 1; + } + else if (type == 168) + { + this.useStyle = 5; + this.shootSpeed = 5.5f; + this.shoot = 30; + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 45; + this.useTime = 45; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 75; + this.damage = 60; + this.knockBack = 8f; + this.ranged = true; + } + else if (type == 169) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 53; + this.width = 12; + this.height = 12; + this.ammo = AmmoID.Sand; + this.notAmmo = true; + } + else if (type == 170) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 54; + this.width = 12; + this.height = 12; + } + else if (type == 171) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 55; + this.width = 28; + this.height = 28; + } + else if (type == 172) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 57; + this.width = 12; + this.height = 12; + } + else if (type == 173) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 56; + this.width = 12; + this.height = 12; + } + else if (type == 174) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 58; + this.width = 12; + this.height = 12; + this.rare = 2; + this.value = Item.sellPrice(silver: 2, copper: 50); + } + else if (type == 175) + { + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.rare = 2; + this.value = 20000; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 10; + } + else if (type == 176) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 59; + this.width = 12; + this.height = 12; + } + else if (type == 181) + { + this.createTile = 178; + this.placeStyle = 0; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.alpha = 50; + this.width = 10; + this.height = 14; + this.value = 1875; + } + else if (type == 180) + { + this.createTile = 178; + this.placeStyle = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.alpha = 50; + this.width = 10; + this.height = 14; + this.value = 3750; + } + else if (type == 177) + { + this.createTile = 178; + this.placeStyle = 2; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.alpha = 50; + this.width = 10; + this.height = 14; + this.value = 5625; + } + else if (type == 179) + { + this.createTile = 178; + this.placeStyle = 3; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.alpha = 50; + this.width = 10; + this.height = 14; + this.value = 7500; + } + else if (type == 178) + { + this.createTile = 178; + this.placeStyle = 4; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.alpha = 50; + this.width = 10; + this.height = 14; + this.value = 11250; + } + else if (type == 182) + { + this.createTile = 178; + this.placeStyle = 5; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.alpha = 50; + this.width = 10; + this.height = 14; + this.value = 15000; + } + else if (type == 183) + { + this.width = 16; + this.height = 18; + this.value = 50; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 190; + } + else if (type == 184) + { + this.width = 12; + this.height = 12; + } + else if (type == 185) + { + this.noUseGraphic = true; + this.damage = 0; + this.knockBack = 7f; + this.useStyle = 5; + this.shootSpeed = 13f; + this.shoot = 32; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.value = 20000; + } + else if (type == 186) + { + this.width = 44; + this.height = 44; + this.rare = 1; + this.value = 10000; + this.holdStyle = 2; + this.useStyle = 1; + this.useAnimation = 27; + this.useTime = 19; + this.knockBack = 4f; + this.damage = 10; + this.UseSound = SoundID.Item1; + this.melee = true; + } + else if (type == 187) + { + this.width = 28; + this.height = 28; + this.rare = 1; + this.value = 10000; + this.accessory = true; + this.shoeSlot = (sbyte) 1; + } + else if (type == 188) + { + this.UseSound = SoundID.Item3; + this.healLife = 100; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.rare = 1; + this.potion = true; + this.value = 1000; + } + else if (type == 189) + { + this.UseSound = SoundID.Item3; + this.healMana = 100; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 75; + this.consumable = true; + this.width = 14; + this.height = 24; + this.rare = 1; + this.value = Item.buyPrice(silver: 2, copper: 50); + } + else if (type == 190) + { + this.useStyle = 1; + this.useAnimation = 30; + this.knockBack = 3f; + this.width = 40; + this.height = 40; + this.damage = 28; + this.scale = 1.4f; + this.UseSound = SoundID.Item1; + this.rare = 3; + this.value = 27000; + this.melee = true; + } + else if (type == 191) + { + this.noMelee = true; + this.useStyle = 1; + this.shootSpeed = 11f; + this.shoot = 33; + this.damage = 25; + this.knockBack = 8f; + this.width = 14; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.rare = 3; + this.value = 50000; + this.melee = true; + } + else if (type == 192) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 75; + this.width = 12; + this.height = 12; + } + else if (type == 193) + { + this.width = 20; + this.height = 22; + this.rare = 2; + this.value = 27000; + this.accessory = true; + this.faceSlot = (sbyte) 12; + this.defense = 1; + } + else if (type == 194) + { + this.autoReuse = true; + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.createTile = 70; + this.width = 14; + this.height = 14; + this.value = 150; + } + else if (type == 195) + { + this.autoReuse = true; + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.createTile = 60; + this.width = 14; + this.height = 14; + this.value = 150; + } + else if (type == 196) + { + this.autoReuse = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 37; + this.useTime = 25; + this.hammer = 25; + this.width = 24; + this.height = 28; + this.damage = 2; + this.knockBack = 5.5f; + this.scale = 1.2f; + this.UseSound = SoundID.Item1; + this.tileBoost = -1; + this.value = 50; + this.melee = true; + } + else if (type == 197) + { + this.autoReuse = true; + this.useStyle = 5; + this.useAnimation = 12; + this.useTime = 12; + this.width = 50; + this.height = 18; + this.shoot = 12; + this.useAmmo = AmmoID.FallenStar; + this.UseSound = SoundID.Item9; + this.damage = 55; + this.shootSpeed = 14f; + this.noMelee = true; + this.value = 500000; + this.rare = 2; + this.ranged = true; + } + else if (type == 198) + { + this.useStyle = 1; + this.useAnimation = 25; + this.knockBack = 3f; + this.width = 40; + this.height = 40; + this.damage = 21; + this.scale = 1f; + this.UseSound = SoundID.Item15; + this.rare = 1; + this.value = 27000; + this.melee = true; + } + else if (type == 199) + { + this.useStyle = 1; + this.useAnimation = 25; + this.knockBack = 3f; + this.width = 40; + this.height = 40; + this.damage = 21; + this.scale = 1f; + this.UseSound = SoundID.Item15; + this.rare = 1; + this.value = 27000; + this.melee = true; + } + else if (type == 200) + { + this.useStyle = 1; + this.useAnimation = 25; + this.knockBack = 3f; + this.width = 40; + this.height = 40; + this.damage = 21; + this.scale = 1f; + this.UseSound = SoundID.Item15; + this.rare = 1; + this.value = 27000; + this.melee = true; + } + else if (type == 201) + { + this.useStyle = 1; + this.useAnimation = 25; + this.knockBack = 3f; + this.width = 40; + this.height = 40; + this.damage = 21; + this.scale = 1f; + this.UseSound = SoundID.Item15; + this.rare = 1; + this.value = 27000; + this.melee = true; + } + else if (type == 202) + { + this.useStyle = 1; + this.useAnimation = 25; + this.knockBack = 3f; + this.width = 40; + this.height = 40; + this.damage = 21; + this.scale = 1f; + this.UseSound = SoundID.Item15; + this.rare = 1; + this.value = 27000; + this.melee = true; + } + else if (type == 203) + { + this.useStyle = 1; + this.useAnimation = 25; + this.knockBack = 3f; + this.width = 40; + this.height = 40; + this.damage = 21; + this.scale = 1f; + this.UseSound = SoundID.Item15; + this.rare = 1; + this.value = 27000; + this.melee = true; + } + else if (type == 204) + { + this.useTurn = true; + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 30; + this.useTime = 16; + this.hammer = 60; + this.axe = 20; + this.width = 24; + this.height = 28; + this.damage = 20; + this.knockBack = 7f; + this.scale = 1.2f; + this.UseSound = SoundID.Item1; + this.rare = 1; + this.value = 15000; + this.melee = true; + } + else if (type == 205) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.width = 20; + this.height = 20; + this.headSlot = 13; + this.defense = 1; + this.maxStack = 99; + this.autoReuse = true; + } + else if (type == 206) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.autoReuse = true; + } + else if (type == 207) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.autoReuse = true; + } + else if (type == 208) + { + this.width = 20; + this.height = 20; + this.value = 100; + this.headSlot = 23; + this.vanity = true; + } + else if (type == 209) + { + this.width = 16; + this.height = 18; + this.maxStack = 99; + this.value = 200; + } + else if (type == 210) + { + this.width = 14; + this.height = 20; + this.maxStack = 99; + this.value = 1000; + } + else if (type == 211) + { + this.width = 20; + this.height = 20; + this.accessory = true; + this.rare = 3; + this.value = 50000; + this.handOnSlot = (sbyte) 5; + this.handOffSlot = (sbyte) 9; + } + else if (type == 212) + { + this.width = 20; + this.height = 20; + this.accessory = true; + this.rare = 3; + this.value = 50000; + } + else if (type == 213) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 25; + this.useTime = 13; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.damage = 7; + this.createTile = 2; + this.UseSound = SoundID.Item1; + this.knockBack = 3f; + this.rare = 3; + this.value = 2000; + this.melee = true; + } + else if (type == 214) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 76; + this.width = 12; + this.height = 12; + } + else if (type == 215) + { + this.width = 18; + this.height = 18; + this.useTurn = true; + this.useTime = 30; + this.useAnimation = 30; + this.noUseGraphic = true; + this.useStyle = 10; + this.UseSound = SoundID.Item16; + this.rare = 2; + this.value = 100; + } + else if (type == 216) + { + this.width = 20; + this.height = 20; + this.rare = 1; + this.value = Item.sellPrice(silver: 20); + this.accessory = true; + this.defense = 1; + this.handOffSlot = (sbyte) 7; + this.handOnSlot = (sbyte) 12; + } + else if (type == 217) + { + this.useTurn = true; + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 27; + this.useTime = 14; + this.hammer = 70; + this.axe = 30; + this.width = 24; + this.height = 28; + this.damage = 20; + this.knockBack = 7f; + this.scale = 1.4f; + this.UseSound = SoundID.Item1; + this.rare = 3; + this.value = 27000; + this.melee = true; + } + else if (type == 218) + { + this.mana = 18; + this.channel = true; + this.damage = 36; + this.useStyle = 1; + this.shootSpeed = 6f; + this.shoot = 34; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item20; + this.useAnimation = 30; + this.useTime = 30; + this.rare = 3; + this.noMelee = true; + this.knockBack = 6.5f; + this.value = this.hellPrice; + this.magic = true; + } + else if (type == 219) + { + this.autoReuse = false; + this.useStyle = 5; + this.useAnimation = 11; + this.useTime = 11; + this.width = 24; + this.height = 22; + this.shoot = 14; + this.knockBack = 2f; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item41; + this.damage = 24; + this.shootSpeed = 13f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 3, silver: 50); + this.scale = 0.85f; + this.rare = 3; + this.ranged = true; + } + else if (type == 220) + { + this.noMelee = true; + this.useStyle = 5; + this.useAnimation = 45; + this.useTime = 45; + this.knockBack = 6.75f; + this.width = 30; + this.height = 10; + this.damage = 35; + this.crit = 7; + this.scale = 1.1f; + this.noUseGraphic = true; + this.shoot = 35; + this.shootSpeed = 12f; + this.UseSound = SoundID.Item1; + this.rare = 3; + this.value = this.hellPrice; + this.melee = true; + this.channel = true; + } + else if (type == 221) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 77; + this.width = 26; + this.height = 24; + this.value = 3000; + } + else if (type == 222) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 78; + this.width = 14; + this.height = 14; + this.value = 100; + } + else if (type == 223) + { + this.width = 20; + this.height = 22; + this.rare = 3; + this.value = 27000; + this.accessory = true; + this.faceSlot = (sbyte) 1; + } + else if (type == 224) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 79; + this.width = 28; + this.height = 20; + this.value = 2000; + } + else if (type == 225) + { + this.maxStack = 999; + this.width = 22; + this.height = 22; + this.value = 1000; + } + else if (type == 226 || type == 227) + { + this.type = 227; + this.UseSound = SoundID.Item3; + this.healLife = 90; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.potion = true; + this.value = 1500; + this.rare = 1; + } + else + { + switch (type) + { + case 228: + this.width = 18; + this.height = 18; + this.defense = 5; + this.headSlot = 8; + this.rare = 3; + this.value = 45000; + break; + case 229: + this.width = 18; + this.height = 18; + this.defense = 6; + this.bodySlot = 8; + this.rare = 3; + this.value = 30000; + break; + case 230: + this.width = 18; + this.height = 18; + this.defense = 6; + this.legSlot = 8; + this.rare = 3; + this.value = 30000; + break; + case 231: + this.width = 18; + this.height = 18; + this.defense = 8; + this.headSlot = 9; + this.rare = 3; + this.value = 45000; + break; + case 232: + this.width = 18; + this.height = 18; + this.defense = 9; + this.bodySlot = 9; + this.rare = 3; + this.value = 30000; + break; + case 233: + this.width = 18; + this.height = 18; + this.defense = 8; + this.legSlot = 9; + this.rare = 3; + this.value = 30000; + break; + case 234: + this.shootSpeed = 3f; + this.shoot = 36; + this.damage = 9; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Bullet; + this.knockBack = 1f; + this.value = 8; + this.rare = 1; + this.ranged = true; + break; + case 235: + this.useStyle = 1; + this.shootSpeed = 5f; + this.shoot = 37; + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 25; + this.useTime = 25; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 500; + this.damage = 0; + break; + case 236: + this.width = 12; + this.height = 20; + this.maxStack = 99; + this.value = 5000; + break; + case 237: + this.width = 28; + this.height = 12; + this.headSlot = 12; + this.rare = 2; + this.value = 10000; + this.vanity = true; + break; + case 238: + this.width = 28; + this.height = 20; + this.headSlot = 14; + this.rare = 2; + this.value = 10000; + this.defense = 2; + break; + case 239: + this.width = 18; + this.height = 18; + this.headSlot = 15; + this.value = 10000; + this.vanity = true; + break; + case 240: + this.width = 18; + this.height = 18; + this.bodySlot = 10; + this.value = 5000; + this.vanity = true; + break; + case 241: + this.width = 18; + this.height = 18; + this.legSlot = 10; + this.value = 5000; + this.vanity = true; + break; + case 242: + this.width = 18; + this.height = 18; + this.headSlot = 16; + this.value = 10000; + this.vanity = true; + break; + case 243: + this.width = 18; + this.height = 18; + this.headSlot = 17; + this.value = 20000; + this.vanity = true; + break; + case 244: + this.width = 18; + this.height = 12; + this.headSlot = 18; + this.value = 10000; + this.vanity = true; + break; + case 245: + this.width = 18; + this.height = 18; + this.bodySlot = 11; + this.value = 250000; + this.vanity = true; + break; + case 246: + this.width = 18; + this.height = 18; + this.legSlot = 11; + this.value = 250000; + this.vanity = true; + break; + case 247: + this.width = 18; + this.height = 12; + this.headSlot = 19; + this.value = 10000; + this.vanity = true; + break; + case 248: + this.width = 18; + this.height = 18; + this.bodySlot = 12; + this.value = 5000; + this.vanity = true; + break; + case 249: + this.width = 18; + this.height = 18; + this.legSlot = 12; + this.value = 5000; + this.vanity = true; + break; + case 250: + this.width = 18; + this.height = 18; + this.headSlot = 20; + this.value = 10000; + this.vanity = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 282; + this.width = 12; + this.height = 12; + break; + case 251: + this.width = 18; + this.height = 12; + this.headSlot = 21; + this.value = 10000; + this.vanity = true; + break; + case 252: + this.width = 18; + this.height = 18; + this.bodySlot = 13; + this.value = 5000; + this.vanity = true; + break; + case 253: + this.width = 18; + this.height = 18; + this.legSlot = 13; + this.value = 5000; + this.vanity = true; + break; + case 254: + this.maxStack = 99; + this.width = 12; + this.height = 20; + this.value = 10000; + break; + case (int) byte.MaxValue: + this.maxStack = 99; + this.width = 12; + this.height = 20; + this.value = 2000; + break; + case 256: + this.width = 18; + this.height = 12; + this.headSlot = 22; + this.value = 10000; + this.defense = 2; + this.rare = 1; + break; + case 257: + this.width = 18; + this.height = 18; + this.bodySlot = 14; + this.value = 5000; + this.defense = 4; + this.rare = 1; + break; + case 258: + this.width = 18; + this.height = 18; + this.legSlot = 14; + this.value = 5000; + this.defense = 3; + this.rare = 1; + break; + case 259: + this.width = 18; + this.height = 20; + this.maxStack = 99; + this.value = 50; + break; + case 260: + this.width = 18; + this.height = 14; + this.headSlot = 24; + this.value = 1000; + this.vanity = true; + break; + case 261: + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.noUseGraphic = true; + this.makeNPC = (short) 55; + break; + case 262: + this.width = 18; + this.height = 14; + this.bodySlot = 15; + this.value = 2000; + this.vanity = true; + break; + case 263: + this.width = 18; + this.height = 18; + this.headSlot = 25; + this.value = 10000; + this.vanity = true; + break; + case 264: + this.width = 18; + this.height = 18; + this.headSlot = 26; + this.value = 10000; + this.vanity = true; + break; + case 265: + this.shootSpeed = 6.5f; + this.shoot = 41; + this.damage = 13; + this.width = 10; + this.height = 28; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Arrow; + this.knockBack = 8f; + this.value = 100; + this.rare = 2; + this.ranged = true; + break; + case 266: + this.useStyle = 5; + this.useAnimation = 16; + this.useTime = 16; + this.autoReuse = true; + this.width = 40; + this.height = 20; + this.shoot = 42; + this.useAmmo = AmmoID.Sand; + this.UseSound = SoundID.Item11; + this.damage = 30; + this.shootSpeed = 12f; + this.noMelee = true; + this.knockBack = 5f; + this.value = 10000; + this.rare = 2; + this.ranged = true; + break; + case 267: + this.accessory = true; + this.width = 14; + this.height = 26; + this.value = 1000; + break; + case 268: + this.headSlot = 27; + this.defense = 2; + this.width = 20; + this.height = 20; + this.value = 1000; + this.rare = 2; + break; + case 269: + this.bodySlot = 0; + this.width = 20; + this.height = 20; + this.value = 10000; + this.color = Main.player[Main.myPlayer].shirtColor; + this.vanity = true; + break; + case 270: + this.legSlot = 0; + this.width = 20; + this.height = 20; + this.value = 10000; + this.color = Main.player[Main.myPlayer].pantsColor; + this.vanity = true; + break; + case 271: + this.headSlot = 0; + this.width = 20; + this.height = 20; + this.value = 10000; + this.color = Main.player[Main.myPlayer].hairColor; + this.vanity = true; + break; + case 272: + this.mana = 14; + this.damage = 35; + this.useStyle = 5; + this.shootSpeed = 0.2f; + this.shoot = 45; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item8; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.knockBack = 5f; + this.scale = 0.9f; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.magic = true; + break; + case 273: + this.useStyle = 1; + this.useAnimation = 27; + this.useTime = 27; + this.knockBack = 4.5f; + this.width = 40; + this.height = 40; + this.damage = 42; + this.scale = 1.15f; + this.UseSound = SoundID.Item1; + this.rare = 3; + this.value = Item.sellPrice(gold: 4); + this.melee = true; + break; + case 274: + this.useStyle = 5; + this.useAnimation = 22; + this.useTime = 22; + this.shootSpeed = 6f; + this.knockBack = 5f; + this.width = 40; + this.height = 40; + this.damage = 29; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.shoot = 46; + this.rare = 3; + this.value = this.hellPrice; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + break; + case 275: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 81; + this.width = 20; + this.height = 22; + this.value = Item.sellPrice(silver: 2); + break; + case 276: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 188; + this.width = 12; + this.height = 12; + this.value = 10; + break; + case 277: + this.useStyle = 5; + this.useAnimation = 31; + this.useTime = 31; + this.shootSpeed = 4f; + this.knockBack = 6f; + this.width = 40; + this.height = 40; + this.damage = 14; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.shoot = 47; + this.rare = 1; + this.value = 10000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + break; + case 278: + this.shootSpeed = 4.5f; + this.shoot = 14; + this.damage = 9; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Bullet; + this.knockBack = 3f; + this.value = 15; + this.ranged = true; + break; + case 279: + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 48; + this.damage = 12; + this.width = 18; + this.height = 20; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 50; + this.knockBack = 2f; + this.ranged = true; + break; + case 280: + this.useStyle = 5; + this.useAnimation = 31; + this.useTime = 31; + this.shootSpeed = 3.7f; + this.knockBack = 6.5f; + this.width = 32; + this.height = 32; + this.damage = 8; + this.scale = 1f; + this.UseSound = SoundID.Item1; + this.shoot = 49; + this.value = 1000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + break; + case 281: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 45; + this.useTime = 45; + this.width = 38; + this.height = 6; + this.shoot = 10; + this.useAmmo = AmmoID.Dart; + this.UseSound = SoundID.Item63; + this.damage = 9; + this.shootSpeed = 11f; + this.noMelee = true; + this.value = 10000; + this.knockBack = 3.5f; + this.ranged = true; + break; + case 282: + this.color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + this.useStyle = 1; + this.shootSpeed = 6f; + this.shoot = 50; + this.width = 12; + this.height = 12; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noMelee = true; + this.value = 10; + this.holdStyle = 1; + break; + case 283: + this.shoot = 51; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.ammo = AmmoID.Dart; + this.damage = 3; + this.ranged = true; + this.consumable = true; + break; + case 284: + this.noMelee = true; + this.useStyle = 1; + this.shootSpeed = 6.5f; + this.shoot = 52; + this.damage = 8; + this.knockBack = 5f; + this.width = 14; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 16; + this.useTime = 16; + this.noUseGraphic = true; + this.value = 5000; + this.melee = true; + break; + case 285: + this.width = 24; + this.height = 8; + this.accessory = true; + this.value = Item.sellPrice(silver: 50); + break; + case 286: + this.color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + this.useStyle = 1; + this.shootSpeed = 6f; + this.shoot = 53; + this.width = 12; + this.height = 12; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noMelee = true; + this.value = 20; + this.holdStyle = 1; + break; + case 287: + this.crit = 4; + this.useStyle = 1; + this.shootSpeed = 12f; + this.shoot = 54; + this.damage = 14; + this.autoReuse = true; + this.width = 18; + this.height = 20; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 60; + this.knockBack = 2.4f; + this.ranged = true; + break; + case 288: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 1; + this.buffTime = 21600; + this.value = 1000; + this.rare = 1; + break; + case 289: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 2; + this.buffTime = 28800; + this.value = 1000; + this.rare = 1; + break; + case 290: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 3; + this.buffTime = 28800; + this.value = 1000; + this.rare = 1; + break; + case 291: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 4; + this.buffTime = 14400; + this.value = 1000; + this.rare = 1; + break; + case 292: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 5; + this.buffTime = 28800; + this.value = 1000; + this.rare = 1; + break; + case 293: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 6; + this.buffTime = 28800; + this.value = 1000; + this.rare = 1; + break; + case 294: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 7; + this.buffTime = 14400; + this.value = 1000; + this.rare = 1; + break; + case 295: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 8; + this.buffTime = 36000; + this.value = 1000; + this.rare = 1; + break; + case 296: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 9; + this.buffTime = 18000; + this.value = 1000; + this.rare = 1; + break; + case 297: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 10; + this.buffTime = 10800; + this.value = 1000; + this.rare = 1; + break; + case 298: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 11; + this.buffTime = 36000; + this.value = 1000; + this.rare = 1; + break; + case 299: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 12; + this.buffTime = 36000; + this.value = 1000; + this.rare = 1; + break; + case 300: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 13; + this.buffTime = 25200; + this.value = 1000; + this.rare = 1; + break; + case 301: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 14; + this.buffTime = 28800; + this.value = 1000; + this.rare = 1; + break; + case 302: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 15; + this.buffTime = 36000; + this.value = 1000; + this.rare = 1; + break; + case 303: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 16; + this.buffTime = 28800; + this.value = 1000; + this.rare = 1; + break; + case 304: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 17; + this.buffTime = 28800; + this.value = 1000; + this.rare = 1; + break; + case 305: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 18; + this.buffTime = 10800; + this.value = 1000; + this.rare = 1; + break; + case 306: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 1; + this.width = 26; + this.height = 22; + this.value = 5000; + break; + case 307: + this.autoReuse = true; + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.createTile = 82; + this.placeStyle = 0; + this.width = 12; + this.height = 14; + this.value = 80; + break; + case 308: + this.autoReuse = true; + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.createTile = 82; + this.placeStyle = 1; + this.width = 12; + this.height = 14; + this.value = 80; + break; + case 309: + this.autoReuse = true; + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.createTile = 82; + this.placeStyle = 2; + this.width = 12; + this.height = 14; + this.value = 80; + break; + case 310: + this.autoReuse = true; + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.createTile = 82; + this.placeStyle = 3; + this.width = 12; + this.height = 14; + this.value = 80; + break; + case 311: + this.autoReuse = true; + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.createTile = 82; + this.placeStyle = 4; + this.width = 12; + this.height = 14; + this.value = 80; + break; + case 312: + this.autoReuse = true; + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.createTile = 82; + this.placeStyle = 5; + this.width = 12; + this.height = 14; + this.value = 80; + break; + case 313: + this.maxStack = 999; + this.width = 12; + this.height = 14; + this.value = 100; + break; + case 314: + this.maxStack = 999; + this.width = 12; + this.height = 14; + this.value = 100; + break; + case 315: + this.maxStack = 999; + this.width = 12; + this.height = 14; + this.value = 100; + break; + case 316: + this.maxStack = 999; + this.width = 12; + this.height = 14; + this.value = 100; + break; + case 317: + this.maxStack = 999; + this.width = 12; + this.height = 14; + this.value = 100; + break; + case 318: + this.maxStack = 999; + this.width = 12; + this.height = 14; + this.value = 100; + break; + case 319: + this.maxStack = 99; + this.width = 16; + this.height = 14; + this.value = 200; + this.color = new Color(123, 167, 163, (int) byte.MaxValue); + break; + case 320: + this.maxStack = 99; + this.width = 16; + this.height = 14; + this.value = 50; + break; + case 321: + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 85; + this.width = 20; + this.height = 20; + break; + case 322: + this.headSlot = 28; + this.width = 20; + this.height = 20; + this.value = 20000; + this.vanity = true; + break; + case 323: + this.width = 10; + this.height = 20; + this.maxStack = 99; + this.value = 50; + break; + case 324: + this.width = 10; + this.height = 20; + this.maxStack = 99; + this.value = 200000; + break; + case 325: + this.width = 18; + this.height = 18; + this.bodySlot = 16; + this.value = 200000; + this.vanity = true; + break; + case 326: + this.width = 18; + this.height = 18; + this.legSlot = 15; + this.value = 200000; + this.vanity = true; + break; + case 327: + this.width = 14; + this.height = 20; + this.maxStack = 99; + break; + case 328: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 3; + this.width = 26; + this.height = 22; + this.value = 5000; + break; + case 329: + this.width = 14; + this.height = 20; + this.maxStack = 1; + this.value = this.dungeonPrice; + break; + case 330: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 20; + this.width = 12; + this.height = 12; + break; + case 331: + this.width = 18; + this.height = 16; + this.maxStack = 99; + this.value = 100; + break; + case 332: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 86; + this.width = 20; + this.height = 20; + this.value = 300; + break; + case 333: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 87; + this.width = 20; + this.height = 20; + this.value = 300; + break; + case 334: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 88; + this.width = 20; + this.height = 20; + this.value = 300; + break; + case 335: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 89; + this.width = 20; + this.height = 20; + this.value = 300; + break; + case 336: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 90; + this.width = 20; + this.height = 20; + this.value = 300; + break; + case 337: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 0; + this.width = 10; + this.height = 24; + this.value = 500; + break; + case 338: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 1; + this.width = 10; + this.height = 24; + this.value = 500; + break; + case 339: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 2; + this.width = 10; + this.height = 24; + this.value = 500; + break; + case 340: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 3; + this.width = 10; + this.height = 24; + this.value = 500; + break; + case 341: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 92; + this.width = 10; + this.height = 24; + this.value = 500; + break; + case 342: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 93; + this.width = 10; + this.height = 24; + this.value = 500; + break; + case 343: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 5; + this.width = 20; + this.height = 20; + this.value = 500; + break; + case 344: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 95; + this.width = 20; + this.height = 20; + this.value = 500; + break; + case 345: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 96; + this.width = 20; + this.height = 20; + this.value = 500; + break; + case 346: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 97; + this.width = 20; + this.height = 20; + this.value = 200000; + break; + case 347: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 98; + this.width = 20; + this.height = 20; + this.value = 500; + break; + case 348: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 6; + this.width = 20; + this.height = 20; + this.value = 1000; + break; + case 349: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 100; + this.width = 20; + this.height = 20; + this.value = 1500; + break; + case 350: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 13; + this.placeStyle = 3; + this.width = 16; + this.height = 24; + this.value = 70; + break; + case 351: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 13; + this.placeStyle = 4; + this.width = 16; + this.height = 24; + this.value = 20; + break; + case 352: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 94; + this.width = 24; + this.height = 24; + this.value = 600; + break; + case 354: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + break; + case 355: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 102; + this.width = 20; + this.height = 20; + this.value = 300; + break; + case 356: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 103; + this.width = 16; + this.height = 24; + this.value = 20; + break; + case 358: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 1; + this.width = 12; + this.height = 30; + this.value = 150; + break; + case 359: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 104; + this.width = 20; + this.height = 20; + this.value = 300; + break; + case 360: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + break; + case 361: + this.useStyle = 4; + this.consumable = true; + this.useAnimation = 45; + this.useTime = 45; + this.width = 28; + this.height = 28; + this.maxStack = 20; + break; + case 362: + this.maxStack = 99; + this.width = 24; + this.height = 24; + this.value = 30; + break; + case 363: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 106; + this.width = 20; + this.height = 20; + this.value = 300; + break; + case 364: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 107; + this.width = 12; + this.height = 12; + this.value = 3500; + this.rare = 3; + break; + case 365: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 108; + this.width = 12; + this.height = 12; + this.value = 5500; + this.rare = 3; + break; + case 366: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 111; + this.width = 12; + this.height = 12; + this.value = 7500; + this.rare = 3; + break; + case 367: + this.useTurn = true; + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 27; + this.useTime = 14; + this.hammer = 80; + this.width = 24; + this.height = 28; + this.damage = 26; + this.knockBack = 7.5f; + this.scale = 1.2f; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 39000; + this.melee = true; + break; + case 368: + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 20; + this.useTime = 20; + this.knockBack = 4.5f; + this.width = 40; + this.height = 40; + this.damage = 66; + this.scale = 1.15f; + this.UseSound = SoundID.Item1; + this.rare = 5; + this.value = 230000; + this.melee = true; + break; + case 369: + this.autoReuse = true; + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.createTile = 109; + this.width = 14; + this.height = 14; + this.value = 2000; + this.rare = 3; + break; + case 370: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 112; + this.width = 12; + this.height = 12; + this.ammo = AmmoID.Sand; + this.notAmmo = true; + break; + case 371: + this.width = 18; + this.height = 18; + this.defense = 2; + this.headSlot = 29; + this.rare = 4; + this.value = 75000; + break; + case 372: + this.width = 18; + this.height = 18; + this.defense = 11; + this.headSlot = 30; + this.rare = 4; + this.value = 75000; + break; + case 373: + this.width = 18; + this.height = 18; + this.defense = 4; + this.headSlot = 31; + this.rare = 4; + this.value = 75000; + break; + case 374: + this.width = 18; + this.height = 18; + this.defense = 8; + this.bodySlot = 17; + this.rare = 4; + this.value = 60000; + break; + case 375: + this.width = 18; + this.height = 18; + this.defense = 7; + this.legSlot = 16; + this.rare = 4; + this.value = 45000; + break; + case 376: + this.width = 18; + this.height = 18; + this.defense = 3; + this.headSlot = 32; + this.rare = 4; + this.value = 112500; + break; + case 377: + this.width = 18; + this.height = 18; + this.defense = 16; + this.headSlot = 33; + this.rare = 4; + this.value = 112500; + break; + case 378: + this.width = 18; + this.height = 18; + this.defense = 6; + this.headSlot = 34; + this.rare = 4; + this.value = 112500; + break; + case 379: + this.width = 18; + this.height = 18; + this.defense = 12; + this.bodySlot = 18; + this.rare = 4; + this.value = 90000; + break; + case 380: + this.width = 18; + this.height = 18; + this.defense = 9; + this.legSlot = 17; + this.rare = 4; + this.value = 67500; + break; + case 381: + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.value = 10500; + this.rare = 3; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 11; + break; + case 382: + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.value = 22000; + this.rare = 3; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 13; + break; + case 383: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 13; + this.shootSpeed = 40f; + this.knockBack = 2.75f; + this.width = 20; + this.height = 12; + this.damage = 23; + this.axe = 14; + this.UseSound = SoundID.Item23; + this.shoot = 57; + this.rare = 4; + this.value = 54000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + break; + case 384: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 10; + this.shootSpeed = 40f; + this.knockBack = 3f; + this.width = 20; + this.height = 12; + this.damage = 29; + this.axe = 17; + this.UseSound = SoundID.Item23; + this.shoot = 58; + this.rare = 4; + this.value = 81000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + break; + case 385: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 13; + this.shootSpeed = 32f; + this.knockBack = 0.0f; + this.width = 20; + this.height = 12; + this.damage = 10; + this.pick = 110; + this.UseSound = SoundID.Item23; + this.shoot = 59; + this.rare = 4; + this.value = 54000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + break; + case 386: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 10; + this.shootSpeed = 32f; + this.knockBack = 0.0f; + this.width = 20; + this.height = 12; + this.damage = 15; + this.pick = 150; + this.UseSound = SoundID.Item23; + this.shoot = 60; + this.rare = 4; + this.value = 81000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + break; + case 387: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 8; + this.shootSpeed = 40f; + this.knockBack = 4.5f; + this.width = 20; + this.height = 12; + this.damage = 33; + this.axe = 20; + this.UseSound = SoundID.Item23; + this.shoot = 61; + this.rare = 4; + this.value = 108000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + break; + case 388: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 8; + this.shootSpeed = 32f; + this.knockBack = 0.0f; + this.width = 20; + this.height = 12; + this.damage = 20; + this.pick = 180; + this.UseSound = SoundID.Item23; + this.shoot = 62; + this.rare = 4; + this.value = 108000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + break; + case 389: + this.noMelee = true; + this.useStyle = 5; + this.useAnimation = 45; + this.useTime = 45; + this.knockBack = 6f; + this.width = 30; + this.height = 10; + this.damage = 50; + this.scale = 1.1f; + this.noUseGraphic = true; + this.shoot = 63; + this.shootSpeed = 15f; + this.UseSound = SoundID.Item1; + this.rare = 5; + this.value = 144000; + this.melee = true; + this.channel = true; + break; + case 390: + this.useStyle = 5; + this.useAnimation = 26; + this.useTime = 26; + this.shootSpeed = 4.5f; + this.knockBack = 5f; + this.width = 40; + this.height = 40; + this.damage = 35; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.shoot = 64; + this.rare = 4; + this.value = 67500; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + break; + case 391: + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.value = 37500; + this.rare = 3; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 15; + break; + case 392: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 21; + this.width = 12; + this.height = 12; + break; + case 393: + this.width = 24; + this.height = 28; + this.rare = 1; + this.value = Item.sellPrice(silver: 25); + this.accessory = true; + break; + case 394: + this.width = 24; + this.height = 28; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.faceSlot = (sbyte) 4; + break; + case 395: + this.width = 24; + this.height = 28; + this.rare = 3; + this.value = Item.sellPrice(gold: 3); + this.accessory = true; + break; + case 396: + this.width = 24; + this.height = 28; + this.rare = 4; + this.value = Item.buyPrice(gold: 6); + this.accessory = true; + break; + case 397: + this.width = 24; + this.height = 28; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.defense = 2; + this.shieldSlot = (sbyte) 3; + break; + case 398: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 114; + this.width = 26; + this.height = 20; + this.value = 100000; + break; + case 399: + this.width = 14; + this.height = 28; + this.rare = 4; + this.value = 150000; + this.accessory = true; + this.balloonSlot = (sbyte) 4; + break; + case 400: + this.width = 18; + this.height = 18; + this.defense = 4; + this.headSlot = 35; + this.rare = 4; + this.value = 150000; + break; + case 401: + this.width = 18; + this.height = 18; + this.defense = 22; + this.headSlot = 36; + this.rare = 4; + this.value = 150000; + break; + case 402: + this.width = 18; + this.height = 18; + this.defense = 8; + this.headSlot = 37; + this.rare = 4; + this.value = 150000; + break; + case 403: + this.width = 18; + this.height = 18; + this.defense = 16; + this.bodySlot = 19; + this.rare = 4; + this.value = 120000; + break; + case 404: + this.width = 18; + this.height = 18; + this.defense = 12; + this.legSlot = 18; + this.rare = 4; + this.value = 90000; + break; + case 405: + this.width = 28; + this.height = 24; + this.accessory = true; + this.rare = 4; + this.value = 100000; + this.shoeSlot = (sbyte) 13; + break; + case 406: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 25; + this.shootSpeed = 5f; + this.knockBack = 6f; + this.width = 40; + this.height = 40; + this.damage = 38; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.shoot = 66; + this.rare = 4; + this.value = 90000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + break; + case 407: + this.width = 28; + this.height = 24; + this.accessory = true; + this.rare = 3; + this.value = 100000; + this.waistSlot = (sbyte) 5; + break; + case 408: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 116; + this.width = 12; + this.height = 12; + this.ammo = AmmoID.Sand; + this.notAmmo = true; + break; + case 409: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 117; + this.width = 12; + this.height = 12; + break; + case 410: + this.width = 18; + this.height = 18; + this.defense = 1; + this.bodySlot = 20; + this.value = 5000; + this.rare = 1; + break; + case 411: + this.width = 18; + this.height = 18; + this.defense = 1; + this.legSlot = 19; + this.value = 5000; + this.rare = 1; + break; + case 412: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 118; + this.width = 12; + this.height = 12; + break; + case 413: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 119; + this.width = 12; + this.height = 12; + break; + case 414: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 120; + this.width = 12; + this.height = 12; + break; + case 415: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 121; + this.width = 12; + this.height = 12; + break; + case 416: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 122; + this.width = 12; + this.height = 12; + break; + case 417: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 22; + this.width = 12; + this.height = 12; + break; + case 418: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 23; + this.width = 12; + this.height = 12; + break; + case 419: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 24; + this.width = 12; + this.height = 12; + break; + case 420: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 25; + this.width = 12; + this.height = 12; + break; + case 421: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 26; + this.width = 12; + this.height = 12; + break; + case 422: + this.useStyle = 1; + this.shootSpeed = 9f; + this.rare = 3; + this.damage = 20; + this.shoot = 69; + this.width = 18; + this.height = 20; + this.maxStack = 999; + this.consumable = true; + this.knockBack = 3f; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 200; + break; + case 423: + this.useStyle = 1; + this.shootSpeed = 9f; + this.rare = 3; + this.damage = 20; + this.shoot = 70; + this.width = 18; + this.height = 20; + this.maxStack = 999; + this.consumable = true; + this.knockBack = 3f; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 100; + break; + case 424: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 123; + this.width = 12; + this.height = 12; + break; + case 425: + this.channel = true; + this.damage = 0; + this.useStyle = 1; + this.width = 24; + this.height = 24; + this.UseSound = SoundID.Item25; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 5; + this.noMelee = true; + this.value = this.value = 250000; + this.buffType = 27; + break; + case 426: + this.useStyle = 1; + this.useAnimation = 29; + this.knockBack = 8f; + this.width = 60; + this.height = 70; + this.damage = 43; + this.scale = 1.05f; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 150000; + this.melee = true; + break; + case 427: + this.flame = true; + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.holdStyle = 1; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 4; + this.placeStyle = 1; + this.width = 10; + this.height = 12; + this.value = 200; + break; + case 428: + this.flame = true; + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.holdStyle = 1; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 4; + this.placeStyle = 2; + this.width = 10; + this.height = 12; + this.value = 200; + break; + case 429: + this.flame = true; + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.holdStyle = 1; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 4; + this.placeStyle = 3; + this.width = 10; + this.height = 12; + this.value = 200; + break; + case 430: + this.flame = true; + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.holdStyle = 1; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 4; + this.placeStyle = 4; + this.width = 10; + this.height = 12; + this.value = 200; + break; + case 431: + this.flame = true; + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.holdStyle = 1; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 4; + this.placeStyle = 5; + this.width = 10; + this.height = 12; + this.value = 500; + break; + case 432: + this.flame = true; + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.holdStyle = 1; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 4; + this.placeStyle = 6; + this.width = 10; + this.height = 12; + this.value = 200; + break; + case 433: + this.flame = true; + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.holdStyle = 1; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 4; + this.placeStyle = 7; + this.width = 10; + this.height = 12; + this.value = 300; + break; + case 434: + this.autoReuse = true; + this.useStyle = 5; + this.useAnimation = 12; + this.useTime = 4; + this.reuseDelay = 14; + this.width = 50; + this.height = 18; + this.shoot = 10; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item31; + this.damage = 17; + this.shootSpeed = 7.75f; + this.noMelee = true; + this.value = 150000; + this.rare = 4; + this.ranged = true; + break; + case 435: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 24; + this.useTime = 24; + this.width = 50; + this.height = 18; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 32; + this.shootSpeed = 9f; + this.noMelee = true; + this.value = 60000; + this.ranged = true; + this.rare = 4; + this.knockBack = 1.5f; + break; + case 436: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 22; + this.useTime = 22; + this.width = 50; + this.height = 18; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 36; + this.shootSpeed = 9.5f; + this.noMelee = true; + this.value = 90000; + this.ranged = true; + this.rare = 4; + this.knockBack = 2f; + break; + case 437: + this.noUseGraphic = true; + this.damage = 0; + this.knockBack = 7f; + this.useStyle = 5; + this.shootSpeed = 14f; + this.shoot = 73; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 4; + this.noMelee = true; + this.value = Item.buyPrice(gold: 15); + break; + case 438: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 2; + break; + case 439: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 3; + break; + case 440: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 4; + break; + case 441: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 5; + break; + case 442: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 6; + break; + case 443: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 7; + break; + case 444: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 8; + break; + case 445: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 9; + break; + case 446: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 10; + break; + case 447: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 11; + break; + case 448: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 12; + break; + case 449: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 13; + break; + case 450: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 14; + break; + case 451: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 15; + break; + case 452: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 16; + break; + case 453: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 17; + break; + case 454: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 18; + break; + case 455: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 19; + break; + case 456: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 20; + break; + case 457: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 21; + break; + case 458: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 22; + break; + case 459: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 23; + break; + case 460: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 24; + break; + case 461: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 25; + break; + case 462: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 26; + break; + case 463: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 27; + break; + case 464: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 28; + break; + case 465: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 29; + break; + case 466: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 30; + break; + case 467: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 31; + break; + case 468: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 32; + break; + case 469: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 33; + break; + case 470: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 349; + this.width = 20; + this.height = 20; + this.value = 300; + break; + case 471: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 35; + break; + case 472: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 36; + break; + case 473: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 37; + break; + case 474: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 38; + break; + case 475: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 39; + break; + case 476: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 40; + break; + case 477: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 41; + break; + case 478: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 42; + break; + case 479: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 27; + this.width = 12; + this.height = 12; + break; + case 480: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 124; + this.width = 12; + this.height = 12; + break; + case 481: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 19; + this.useTime = 19; + this.width = 50; + this.height = 18; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 40; + this.shootSpeed = 10f; + this.noMelee = true; + this.value = 120000; + this.ranged = true; + this.rare = 4; + this.knockBack = 2.5f; + break; + case 482: + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 26; + this.useTime = 26; + this.knockBack = 6f; + this.width = 40; + this.height = 40; + this.damage = 56; + this.scale = 1.2f; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 138000; + this.melee = true; + break; + case 483: + this.useTurn = true; + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 23; + this.useTime = 23; + this.knockBack = 3.85f; + this.width = 40; + this.height = 40; + this.damage = 39; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 69000; + this.melee = true; + break; + case 484: + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 26; + this.useTime = 26; + this.knockBack = 6f; + this.width = 40; + this.height = 40; + this.damage = 49; + this.scale = 1.15f; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 103500; + this.melee = true; + break; + case 485: + this.rare = 4; + this.width = 24; + this.height = 28; + this.accessory = true; + this.value = 150000; + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 486: + this.autoReuse = true; + this.useStyle = 13; + this.useAnimation = 20; + this.useTime = 5; + this.reuseDelay = 10; + this.width = 40; + this.height = 18; + this.shoot = 842; + this.UseSound = SoundID.Item1; + this.damage = 12; + this.shootSpeed = 2.4f; + this.noMelee = true; + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(silver: 10)); + this.melee = true; + this.knockBack = 0.5f; + this.noUseGraphic = true; + break; + case 487: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 125; + this.width = 22; + this.height = 22; + this.value = 100000; + this.rare = 3; + break; + case 488: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 126; + this.width = 22; + this.height = 26; + this.value = 10000; + break; + case 489: + this.width = 24; + this.height = 24; + this.accessory = true; + this.value = 100000; + this.rare = 4; + break; + case 490: + this.width = 24; + this.height = 24; + this.accessory = true; + this.value = 100000; + this.rare = 4; + break; + case 491: + this.width = 24; + this.height = 24; + this.accessory = true; + this.value = 100000; + this.rare = 4; + break; + case 492: + this.width = 24; + this.height = 8; + this.accessory = true; + this.value = 400000; + this.rare = 5; + this.wingSlot = (sbyte) 1; + break; + case 493: + this.width = 24; + this.height = 8; + this.accessory = true; + this.value = 400000; + this.rare = 5; + this.wingSlot = (sbyte) 2; + break; + case 494: + this.rare = 5; + this.useStyle = 5; + this.useAnimation = 12; + this.useTime = 12; + this.width = 12; + this.height = 28; + this.shoot = 76; + this.holdStyle = 3; + this.autoReuse = true; + this.damage = 32; + this.shootSpeed = 4.5f; + this.noMelee = true; + this.value = 200000; + this.mana = 4; + this.magic = true; + break; + case 495: + this.rare = 5; + this.mana = 21; + this.channel = true; + this.damage = 50; + this.useStyle = 1; + this.shootSpeed = 6f; + this.shoot = 79; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item28; + this.useAnimation = 25; + this.useTime = 25; + this.noMelee = true; + this.knockBack = 6f; + this.value = 200000; + this.magic = true; + break; + case 496: + this.rare = 4; + this.mana = 6; + this.damage = 28; + this.useStyle = 1; + this.shootSpeed = 12f; + this.shoot = 80; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item28; + this.useAnimation = 9; + this.useTime = 9; + this.rare = 4; + this.autoReuse = true; + this.noMelee = true; + this.knockBack = 0.0f; + this.value = Item.buyPrice(gold: 50); + this.magic = true; + this.knockBack = 2f; + break; + case 497: + this.width = 24; + this.height = 28; + this.accessory = true; + this.value = this.eclipsePrice; + this.rare = 5; + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 498: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 128; + this.width = 12; + this.height = 12; + this.createTile = 470; + this.placeStyle = 0; + break; + case 499: + this.UseSound = SoundID.Item3; + this.healLife = 150; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.rare = 3; + this.potion = true; + this.value = 5000; + break; + case 500: + this.UseSound = SoundID.Item3; + this.healMana = 200; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 75; + this.consumable = true; + this.width = 14; + this.height = 24; + this.rare = 3; + this.value = Item.buyPrice(silver: 5); + break; + case 501: + this.width = 16; + this.height = 14; + this.maxStack = 99; + this.value = 500; + this.rare = 1; + break; + case 502: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 129; + this.width = 24; + this.height = 24; + this.value = 8000; + this.rare = 1; + break; + case 503: + this.width = 18; + this.height = 18; + this.headSlot = 40; + this.value = 20000; + this.vanity = true; + this.rare = 2; + break; + case 504: + this.width = 18; + this.height = 18; + this.bodySlot = 23; + this.value = 10000; + this.vanity = true; + this.rare = 2; + break; + case 505: + this.width = 18; + this.height = 18; + this.legSlot = 22; + this.value = 10000; + this.vanity = true; + this.rare = 2; + break; + case 506: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 30; + this.useTime = 6; + this.width = 50; + this.height = 18; + this.shoot = 85; + this.useAmmo = AmmoID.Gel; + this.UseSound = SoundID.Item34; + this.damage = 35; + this.knockBack = 0.3f; + this.shootSpeed = 7f; + this.noMelee = true; + this.value = 500000; + this.rare = 5; + this.ranged = true; + break; + case 507: + this.rare = 3; + this.useStyle = 1; + this.useAnimation = 12; + this.useTime = 12; + this.width = 12; + this.height = 28; + this.autoReuse = true; + this.noMelee = true; + this.value = 10000; + break; + case 508: + this.rare = 3; + this.useStyle = 5; + this.useAnimation = 12; + this.useTime = 12; + this.width = 12; + this.height = 28; + this.autoReuse = true; + this.noMelee = true; + this.value = 10000; + break; + case 509: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 5; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.rare = 1; + this.value = 20000; + this.mech = true; + this.tileBoost = 20; + break; + case 510: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 5; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.rare = 1; + this.value = 20000; + this.mech = true; + this.tileBoost = 20; + break; + case 511: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 130; + this.width = 12; + this.height = 12; + this.value = 1000; + this.mech = true; + break; + case 512: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 131; + this.width = 12; + this.height = 12; + this.value = 1000; + this.mech = true; + break; + case 513: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 132; + this.width = 24; + this.height = 24; + this.value = 3000; + this.mech = true; + break; + case 514: + this.autoReuse = true; + this.useStyle = 5; + this.useAnimation = 12; + this.useTime = 12; + this.width = 36; + this.height = 22; + this.shoot = 88; + this.mana = 8; + this.UseSound = SoundID.Item12; + this.knockBack = 2.5f; + this.damage = 29; + this.shootSpeed = 17f; + this.noMelee = true; + this.rare = 4; + this.magic = true; + this.value = 150000; + break; + case 515: + this.shootSpeed = 5f; + this.shoot = 89; + this.damage = 9; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Bullet; + this.knockBack = 1f; + this.value = 30; + this.ranged = true; + this.rare = 3; + break; + case 516: + this.shootSpeed = 3.5f; + this.shoot = 91; + this.damage = 13; + this.width = 10; + this.height = 28; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Arrow; + this.knockBack = 2f; + this.value = 80; + this.ranged = true; + this.rare = 3; + break; + case 517: + this.useStyle = 1; + this.shootSpeed = 12f; + this.shoot = 93; + this.damage = 40; + this.width = 18; + this.height = 20; + this.mana = 6; + this.UseSound = SoundID.Item1; + this.useAnimation = 8; + this.useTime = 8; + this.noUseGraphic = true; + this.noMelee = true; + this.value = Item.sellPrice(gold: 5); + this.knockBack = 3.75f; + this.magic = true; + this.rare = 4; + break; + case 518: + this.autoReuse = true; + this.rare = 4; + this.mana = 5; + this.UseSound = SoundID.Item9; + this.noMelee = true; + this.useStyle = 5; + this.damage = 32; + this.useAnimation = 7; + this.useTime = 7; + this.width = 24; + this.height = 28; + this.shoot = 94; + this.scale = 0.9f; + this.shootSpeed = 16f; + this.knockBack = 5f; + this.magic = true; + this.value = Item.sellPrice(gold: 4); + break; + case 519: + this.autoReuse = true; + this.rare = 4; + this.mana = 9; + this.UseSound = SoundID.Item20; + this.noMelee = true; + this.useStyle = 5; + this.damage = 50; + this.useAnimation = 15; + this.useTime = 15; + this.width = 24; + this.height = 28; + this.shoot = 95; + this.scale = 0.9f; + this.shootSpeed = 10f; + this.knockBack = 6.5f; + this.magic = true; + this.value = Item.sellPrice(gold: 4); + break; + case 520: + this.width = 18; + this.height = 18; + this.maxStack = 999; + this.value = 1000; + this.rare = 3; + break; + case 521: + this.width = 18; + this.height = 18; + this.maxStack = 999; + this.value = 1000; + this.rare = 3; + break; + case 522: + this.width = 12; + this.height = 14; + this.maxStack = 99; + this.value = 4000; + this.rare = 3; + break; + case 523: + this.flame = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.holdStyle = 1; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 4; + this.placeStyle = 8; + this.width = 10; + this.height = 12; + this.value = 150; + this.rare = 1; + break; + case 524: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 133; + this.width = 44; + this.height = 30; + this.value = 50000; + this.rare = 3; + break; + case 525: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 134; + this.width = 28; + this.height = 14; + this.value = 25000; + this.rare = 3; + break; + case 526: + this.width = 14; + this.height = 14; + this.maxStack = 99; + this.value = 15000; + this.rare = 1; + break; + case 527: + this.width = 14; + this.height = 14; + this.maxStack = 99; + this.value = 4500; + this.rare = 2; + break; + case 528: + this.width = 14; + this.height = 14; + this.maxStack = 99; + this.value = 4500; + this.rare = 2; + break; + case 529: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 135; + this.width = 12; + this.height = 12; + this.placeStyle = 0; + this.mech = true; + this.value = 5000; + this.mech = true; + break; + case 530: + this.width = 12; + this.height = 18; + this.maxStack = 999; + this.value = 500; + this.mech = true; + break; + case 531: + this.width = 12; + this.height = 18; + this.maxStack = 99; + this.value = 50000; + this.rare = 1; + break; + case 532: + this.width = 20; + this.height = 24; + this.value = 100000; + this.accessory = true; + this.rare = 4; + this.backSlot = (sbyte) 2; + break; + case 533: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 7; + this.useTime = 7; + this.width = 50; + this.height = 18; + this.shoot = 10; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item11; + this.damage = 25; + this.shootSpeed = 10f; + this.noMelee = true; + this.value = Item.buyPrice(gold: 35); + this.rare = 5; + this.knockBack = 1f; + this.ranged = true; + break; + case 534: + this.knockBack = 6.5f; + this.useStyle = 5; + this.useAnimation = 45; + this.useTime = 45; + this.width = 50; + this.height = 14; + this.shoot = 10; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item36; + this.damage = 24; + this.shootSpeed = 7f; + this.noMelee = true; + this.value = 250000; + this.rare = 4; + this.ranged = true; + break; + case 535: + this.width = 12; + this.height = 18; + this.value = 100000; + this.accessory = true; + this.rare = 4; + break; + case 536: + this.width = 12; + this.height = 18; + this.value = 100000; + this.rare = 4; + this.accessory = true; + this.handOnSlot = (sbyte) 15; + this.handOffSlot = (sbyte) 8; + break; + case 537: + this.useStyle = 5; + this.useAnimation = 28; + this.useTime = 28; + this.shootSpeed = 4.3f; + this.knockBack = 4f; + this.width = 40; + this.height = 40; + this.damage = 29; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.shoot = 97; + this.rare = 4; + this.value = 45000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + break; + case 538: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 136; + this.width = 12; + this.height = 12; + this.value = 2000; + this.mech = true; + break; + case 539: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 137; + this.width = 12; + this.height = 12; + this.value = 10000; + this.mech = true; + break; + case 540: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 138; + this.width = 12; + this.height = 12; + this.mech = true; + break; + case 541: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 135; + this.width = 12; + this.height = 12; + this.placeStyle = 1; + this.mech = true; + this.value = 5000; + break; + case 542: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 135; + this.width = 12; + this.height = 12; + this.placeStyle = 2; + this.mech = true; + this.value = 5000; + break; + case 543: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 135; + this.width = 12; + this.height = 12; + this.placeStyle = 3; + this.mech = true; + this.value = 5000; + break; + case 544: + this.useStyle = 4; + this.width = 22; + this.height = 14; + this.consumable = true; + this.useAnimation = 45; + this.useTime = 45; + this.maxStack = 20; + this.rare = 3; + break; + case 545: + this.shootSpeed = 4f; + this.shoot = 103; + this.damage = 17; + this.width = 10; + this.height = 28; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Arrow; + this.knockBack = 3f; + this.value = 40; + this.ranged = true; + this.rare = 3; + break; + case 546: + this.shootSpeed = 5f; + this.shoot = 104; + this.damage = 12; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Bullet; + this.knockBack = 4f; + this.value = 30; + this.rare = 1; + this.ranged = true; + this.rare = 3; + break; + case 547: + this.width = 18; + this.height = 18; + this.maxStack = 999; + this.value = 40000; + this.rare = 5; + break; + case 548: + this.width = 18; + this.height = 18; + this.maxStack = 999; + this.value = 40000; + this.rare = 5; + break; + case 549: + this.width = 18; + this.height = 18; + this.maxStack = 999; + this.value = 40000; + this.rare = 5; + break; + case 550: + this.useStyle = 5; + this.useAnimation = 22; + this.useTime = 22; + this.shootSpeed = 5.6f; + this.knockBack = 6.4f; + this.width = 40; + this.height = 40; + this.damage = 42; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.shoot = 105; + this.rare = 5; + this.value = 230000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + break; + case 551: + this.width = 18; + this.height = 18; + this.defense = 15; + this.bodySlot = 24; + this.rare = 5; + this.value = 200000; + break; + case 552: + this.width = 18; + this.height = 18; + this.defense = 11; + this.legSlot = 23; + this.rare = 5; + this.value = 150000; + break; + case 553: + this.width = 18; + this.height = 18; + this.defense = 9; + this.headSlot = 41; + this.rare = 5; + this.value = 250000; + break; + case 554: + this.width = 20; + this.height = 24; + this.value = Item.buyPrice(gold: 10); + this.accessory = true; + this.rare = 4; + this.neckSlot = (sbyte) 2; + break; + case 555: + this.width = 20; + this.height = 24; + this.value = 50000; + this.accessory = true; + this.rare = 4; + this.waistSlot = (sbyte) 6; + break; + case 556: + this.useStyle = 4; + this.width = 22; + this.height = 14; + this.consumable = true; + this.useAnimation = 45; + this.useTime = 45; + this.maxStack = 20; + this.rare = 3; + break; + case 557: + this.useStyle = 4; + this.width = 22; + this.height = 14; + this.consumable = true; + this.useAnimation = 45; + this.useTime = 45; + this.maxStack = 20; + this.rare = 3; + break; + case 558: + this.width = 18; + this.height = 18; + this.defense = 5; + this.headSlot = 42; + this.rare = 5; + this.value = 250000; + break; + case 559: + this.width = 18; + this.height = 18; + this.defense = 24; + this.headSlot = 43; + this.rare = 5; + this.value = 250000; + break; + case 560: + this.useStyle = 4; + this.width = 22; + this.height = 14; + this.consumable = true; + this.useAnimation = 45; + this.useTime = 45; + this.maxStack = 20; + this.rare = 1; + break; + case 561: + this.melee = true; + this.autoReuse = true; + this.noMelee = true; + this.useStyle = 1; + this.shootSpeed = 13f; + this.shoot = 106; + this.damage = 57; + this.knockBack = 8f; + this.width = 24; + this.height = 24; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.rare = 5; + this.maxStack = 5; + this.value = Item.sellPrice(gold: 6); + break; + case 562: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 0; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 563: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 1; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 564: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 2; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 565: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 3; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 566: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 4; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 567: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 5; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 568: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 6; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 569: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 7; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 570: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 8; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 571: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 9; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 572: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 10; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 573: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 11; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 574: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 12; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 575: + this.width = 18; + this.height = 18; + this.maxStack = 999; + this.value = 1000; + this.rare = 3; + break; + case 576: + this.width = 24; + this.height = 24; + this.rare = 3; + this.value = 100000; + this.accessory = true; + break; + case 577: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 140; + this.width = 12; + this.height = 12; + break; + case 578: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 16; + this.useTime = 16; + this.width = 50; + this.height = 18; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 53; + this.shootSpeed = 11f; + this.noMelee = true; + this.value = 200000; + this.ranged = true; + this.rare = 4; + this.knockBack = 2.5f; + break; + case 579: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 7; + this.shootSpeed = 36f; + this.knockBack = 4.75f; + this.width = 20; + this.height = 12; + this.damage = 35; + this.pick = 200; + this.axe = 22; + this.UseSound = SoundID.Item23; + this.shoot = 107; + this.rare = 4; + this.value = 220000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + break; + case 580: + this.mech = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 141; + this.width = 12; + this.height = 12; + this.value = Item.sellPrice(silver: 10); + break; + case 581: + this.mech = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 142; + this.width = 12; + this.height = 12; + break; + case 582: + this.mech = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 143; + this.width = 12; + this.height = 12; + break; + case 583: + this.mech = true; + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 144; + this.placeStyle = 0; + this.width = 10; + this.height = 12; + this.value = 50; + break; + case 584: + this.mech = true; + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 144; + this.placeStyle = 1; + this.width = 10; + this.height = 12; + this.value = 50; + break; + case 585: + this.mech = true; + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 144; + this.placeStyle = 2; + this.width = 10; + this.height = 12; + this.value = 50; + break; + case 586: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 145; + this.width = 12; + this.height = 12; + break; + case 587: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 29; + this.width = 12; + this.height = 12; + break; + case 588: + this.width = 18; + this.height = 12; + this.headSlot = 44; + this.value = 150000; + this.vanity = true; + break; + case 589: + this.width = 18; + this.height = 18; + this.bodySlot = 25; + this.value = 150000; + this.vanity = true; + break; + case 590: + this.width = 18; + this.height = 18; + this.legSlot = 24; + this.value = 150000; + this.vanity = true; + break; + case 591: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 146; + this.width = 12; + this.height = 12; + break; + case 592: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 30; + this.width = 12; + this.height = 12; + break; + case 593: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 147; + this.width = 12; + this.height = 12; + break; + case 594: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 148; + this.width = 12; + this.height = 12; + break; + case 595: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 31; + this.width = 12; + this.height = 12; + break; + case 596: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 149; + this.placeStyle = 0; + this.width = 12; + this.height = 12; + this.value = 500; + break; + case 597: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 149; + this.placeStyle = 1; + this.width = 12; + this.height = 12; + this.value = 500; + break; + case 598: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 149; + this.placeStyle = 2; + this.width = 12; + this.height = 12; + this.value = 500; + break; + case 599: + this.width = 12; + this.height = 12; + this.rare = 1; + break; + case 600: + this.width = 12; + this.height = 12; + this.rare = 1; + break; + case 601: + this.width = 12; + this.height = 12; + this.rare = 1; + break; + case 602: + this.useStyle = 4; + this.consumable = true; + this.useAnimation = 45; + this.useTime = 45; + this.width = 28; + this.height = 28; + this.rare = 2; + this.maxStack = 20; + break; + case 603: + this.damage = 0; + this.useStyle = 1; + this.shoot = 111; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.value = 0; + this.buffType = 40; + break; + case 604: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 150; + this.width = 12; + this.height = 12; + break; + case 605: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 32; + this.width = 12; + this.height = 12; + break; + case 606: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 33; + this.width = 12; + this.height = 12; + break; + case 607: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 151; + this.width = 12; + this.height = 12; + break; + case 608: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 34; + this.width = 12; + this.height = 12; + break; + case 609: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 152; + this.width = 12; + this.height = 12; + break; + case 610: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 35; + this.width = 12; + this.height = 12; + break; + case 611: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 153; + this.width = 12; + this.height = 12; + break; + case 612: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 154; + this.width = 12; + this.height = 12; + break; + case 613: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 155; + this.width = 12; + this.height = 12; + break; + case 614: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 156; + this.width = 12; + this.height = 12; + break; + case 615: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 36; + this.width = 12; + this.height = 12; + break; + case 616: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 37; + this.width = 12; + this.height = 12; + break; + case 617: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 38; + this.width = 12; + this.height = 12; + break; + case 618: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 39; + this.width = 12; + this.height = 12; + break; + case 619: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 157; + this.width = 8; + this.height = 10; + break; + case 620: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 158; + this.width = 8; + this.height = 10; + break; + case 621: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 159; + this.width = 8; + this.height = 10; + break; + case 622: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 41; + this.width = 12; + this.height = 12; + break; + case 623: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 42; + this.width = 12; + this.height = 12; + break; + case 624: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 43; + this.width = 12; + this.height = 12; + break; + case 625: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 7; + this.width = 26; + this.height = 22; + this.value = 500; + break; + case 626: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 8; + this.width = 26; + this.height = 22; + this.value = 500; + break; + case 627: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 9; + this.width = 26; + this.height = 22; + this.value = 500; + break; + case 628: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 2; + this.width = 12; + this.height = 30; + this.value = 150; + break; + case 629: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 3; + this.width = 12; + this.height = 30; + this.value = 150; + break; + case 630: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 4; + this.width = 12; + this.height = 30; + this.value = 150; + break; + case 631: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 1; + this.width = 8; + this.height = 10; + break; + case 632: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 2; + this.width = 8; + this.height = 10; + break; + case 633: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 3; + this.width = 8; + this.height = 10; + break; + case 634: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 4; + this.width = 8; + this.height = 10; + break; + case 635: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 1; + this.width = 28; + this.height = 14; + this.value = 150; + break; + case 636: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 2; + this.width = 28; + this.height = 14; + this.value = 150; + break; + case 637: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 3; + this.width = 28; + this.height = 14; + this.value = 150; + break; + case 638: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 1; + this.width = 26; + this.height = 20; + this.value = 300; + break; + case 639: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 2; + this.width = 26; + this.height = 20; + this.value = 300; + break; + case 640: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 3; + this.width = 26; + this.height = 20; + this.value = 300; + break; + case 641: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 87; + this.placeStyle = 1; + this.width = 20; + this.height = 20; + this.value = 300; + break; + case 642: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 87; + this.placeStyle = 2; + this.width = 20; + this.height = 20; + this.value = 300; + break; + case 643: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 87; + this.placeStyle = 3; + this.width = 20; + this.height = 20; + this.value = 300; + break; + case 644: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 79; + this.placeStyle = 1; + this.width = 28; + this.height = 20; + this.value = 2000; + break; + case 645: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 79; + this.placeStyle = 2; + this.width = 28; + this.height = 20; + this.value = 2000; + break; + case 646: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 79; + this.placeStyle = 3; + this.width = 28; + this.height = 20; + this.value = 2000; + break; + case 647: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 88; + this.placeStyle = 1; + this.width = 20; + this.height = 20; + this.value = 300; + break; + case 648: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 88; + this.placeStyle = 2; + this.width = 20; + this.height = 20; + this.value = 300; + break; + case 649: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 88; + this.placeStyle = 3; + this.width = 20; + this.height = 20; + this.value = 300; + break; + case 650: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 1; + this.width = 14; + this.height = 28; + this.value = 200; + break; + case 651: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 2; + this.width = 14; + this.height = 28; + this.value = 200; + break; + case 652: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 3; + this.width = 14; + this.height = 28; + this.value = 200; + break; + case 653: + this.useStyle = 1; + this.useTurn = false; + this.useAnimation = 21; + this.useTime = 21; + this.width = 24; + this.height = 28; + this.damage = 10; + this.knockBack = 5f; + this.UseSound = SoundID.Item1; + this.scale = 1f; + this.value = 100; + this.melee = true; + break; + case 654: + this.autoReuse = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 30; + this.useTime = 20; + this.hammer = 40; + this.width = 24; + this.height = 28; + this.damage = 7; + this.knockBack = 5.5f; + this.scale = 1.2f; + this.UseSound = SoundID.Item1; + this.value = 50; + this.melee = true; + break; + case 655: + this.useStyle = 5; + this.useAnimation = 28; + this.useTime = 28; + this.width = 12; + this.height = 28; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 8; + this.shootSpeed = 6.6f; + this.noMelee = true; + this.value = 100; + this.ranged = true; + break; + case 656: + this.useStyle = 1; + this.useTurn = false; + this.useAnimation = 23; + this.useTime = 23; + this.width = 24; + this.height = 28; + this.damage = 8; + this.knockBack = 5f; + this.UseSound = SoundID.Item1; + this.scale = 1f; + this.value = 100; + this.melee = true; + break; + case 657: + this.autoReuse = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 33; + this.useTime = 23; + this.hammer = 35; + this.width = 24; + this.height = 28; + this.damage = 4; + this.knockBack = 5.5f; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.value = 50; + this.melee = true; + break; + case 658: + this.useStyle = 5; + this.useAnimation = 29; + this.useTime = 29; + this.width = 12; + this.height = 28; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 6; + this.shootSpeed = 6.6f; + this.noMelee = true; + this.value = 100; + this.ranged = true; + break; + case 659: + this.useStyle = 1; + this.useTurn = false; + this.useAnimation = 21; + this.useTime = 21; + this.width = 24; + this.height = 28; + this.damage = 11; + this.knockBack = 5f; + this.UseSound = SoundID.Item1; + this.scale = 1f; + this.value = 100; + this.melee = true; + break; + case 660: + this.autoReuse = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 29; + this.useTime = 19; + this.hammer = 45; + this.width = 24; + this.height = 28; + this.damage = 9; + this.knockBack = 5.5f; + this.scale = 1.25f; + this.UseSound = SoundID.Item1; + this.value = 50; + this.melee = true; + break; + case 661: + this.useStyle = 5; + this.useAnimation = 27; + this.useTime = 27; + this.width = 12; + this.height = 28; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 9; + this.shootSpeed = 6.6f; + this.noMelee = true; + this.value = 100; + this.ranged = true; + break; + case 662: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 160; + this.width = 12; + this.height = 12; + this.rare = 1; + break; + case 663: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 44; + this.width = 12; + this.height = 12; + this.rare = 1; + break; + case 664: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 161; + this.width = 12; + this.height = 12; + break; + case 665: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 9; + this.wingSlot = (sbyte) 3; + this.value = 400000; + break; + case 666: + this.width = 18; + this.height = 18; + this.headSlot = 45; + this.rare = 9; + this.vanity = true; + this.value = Item.sellPrice(gold: 5); + break; + case 667: + this.width = 18; + this.height = 18; + this.bodySlot = 26; + this.rare = 9; + this.vanity = true; + this.value = Item.sellPrice(gold: 5); + break; + case 668: + this.width = 18; + this.height = 18; + this.legSlot = 25; + this.rare = 9; + this.vanity = true; + this.value = Item.sellPrice(gold: 5); + break; + case 669: + this.damage = 0; + this.useStyle = 1; + this.shoot = 112; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.buffType = 41; + this.value = Item.sellPrice(gold: 2); + break; + case 670: + this.crit = 2; + this.noMelee = true; + this.useStyle = 1; + this.shootSpeed = 11.5f; + this.shoot = 113; + this.damage = 16; + this.knockBack = 8.5f; + this.width = 14; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.rare = 1; + this.value = 50000; + this.melee = true; + break; + case 671: + this.crit = 13; + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 20; + this.useTime = 20; + this.knockBack = 6.5f; + this.width = 40; + this.height = 40; + this.damage = 85; + this.scale = 1.2f; + this.UseSound = SoundID.Item1; + this.rare = 8; + this.value = Item.buyPrice(gold: 20); + this.melee = true; + break; + case 672: + this.useStyle = 1; + this.useAnimation = 18; + this.knockBack = 4f; + this.width = 24; + this.height = 28; + this.damage = 49; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 180000; + this.melee = true; + this.autoReuse = true; + this.useTurn = true; + break; + case 673: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 23; + this.width = 28; + this.height = 14; + this.value = 150; + break; + case 674: + this.useStyle = 1; + this.useAnimation = 16; + this.useTime = 16; + this.shoot = 156; + this.shootSpeed = 11f; + this.knockBack = 4.5f; + this.width = 40; + this.height = 40; + this.damage = 66; + this.scale = 1.05f; + this.UseSound = SoundID.Item1; + this.rare = 8; + this.value = Item.sellPrice(gold: 10); + this.melee = true; + break; + case 675: + this.useStyle = 1; + this.useAnimation = 26; + this.useTime = 26; + this.shoot = 157; + this.shootSpeed = 10f; + this.knockBack = 4.75f; + this.width = 40; + this.height = 40; + this.damage = 105; + this.scale = 1.15f; + this.UseSound = SoundID.Item1; + this.rare = 8; + this.value = Item.sellPrice(gold: 10); + this.melee = true; + break; + case 676: + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 23; + this.useTime = 55; + this.knockBack = 4.5f; + this.width = 24; + this.height = 28; + this.damage = 49; + this.scale = 1.15f; + this.UseSound = SoundID.Item1; + this.rare = 5; + this.shoot = 119; + this.shootSpeed = 12f; + this.value = 250000; + this.melee = true; + break; + case 677: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 28; + this.width = 26; + this.height = 20; + this.value = 300; + break; + case 678: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.rare = 4; + break; + case 679: + this.autoReuse = true; + this.knockBack = 7f; + this.useStyle = 5; + this.useAnimation = 34; + this.useTime = 34; + this.width = 50; + this.height = 14; + this.shoot = 10; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item38; + this.damage = 29; + this.shootSpeed = 6f; + this.noMelee = true; + this.value = Item.buyPrice(gold: 40); + this.rare = 8; + this.ranged = true; + break; + case 680: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 10; + this.width = 26; + this.height = 22; + this.value = 5000; + break; + case 681: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 11; + this.width = 26; + this.height = 22; + this.value = 5000; + break; + case 682: + this.useStyle = 5; + this.useAnimation = 19; + this.useTime = 19; + this.width = 14; + this.height = 32; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 50; + this.shootSpeed = 11f; + this.knockBack = 4.7f; + this.rare = 5; + this.crit = 5; + this.noMelee = true; + this.scale = 1.1f; + this.value = 27000; + this.ranged = true; + break; + case 683: + this.autoReuse = true; + this.rare = 6; + this.mana = 19; + this.UseSound = SoundID.Item20; + this.noMelee = true; + this.useStyle = 5; + this.damage = 73; + this.useAnimation = 17; + this.useTime = 17; + this.width = 30; + this.height = 30; + this.shoot = 114; + this.shootSpeed = 13f; + this.knockBack = 6.5f; + this.magic = true; + this.value = 500000; + break; + case 684: + this.width = 18; + this.height = 18; + this.defense = 10; + this.headSlot = 46; + this.rare = 5; + this.value = 250000; + break; + case 685: + this.width = 18; + this.height = 18; + this.defense = 20; + this.bodySlot = 27; + this.rare = 5; + this.value = 200000; + break; + case 686: + this.width = 18; + this.height = 18; + this.defense = 13; + this.legSlot = 26; + this.rare = 5; + this.value = 150000; + break; + case 687: + this.width = 18; + this.height = 18; + this.defense = 2; + this.headSlot = 47; + this.value = 1125; + break; + case 688: + this.width = 18; + this.height = 18; + this.defense = 2; + this.bodySlot = 28; + this.value = 1875; + break; + case 689: + this.width = 18; + this.height = 18; + this.defense = 1; + this.legSlot = 27; + this.value = 1500; + break; + case 690: + this.width = 18; + this.height = 18; + this.defense = 3; + this.headSlot = 48; + this.value = 4500; + break; + case 691: + this.width = 18; + this.height = 18; + this.defense = 3; + this.bodySlot = 29; + this.value = 7500; + break; + case 692: + this.width = 18; + this.height = 18; + this.defense = 2; + this.legSlot = 28; + this.value = 6000; + break; + case 693: + this.width = 18; + this.height = 18; + this.defense = 4; + this.headSlot = 49; + this.value = 11250; + break; + case 694: + this.width = 18; + this.height = 18; + this.defense = 5; + this.bodySlot = 30; + this.value = 18750; + break; + case 695: + this.width = 18; + this.height = 18; + this.defense = 3; + this.legSlot = 29; + this.value = 15000; + break; + case 696: + this.width = 18; + this.height = 18; + this.defense = 5; + this.headSlot = 50; + this.value = 22500; + break; + case 697: + this.width = 18; + this.height = 18; + this.defense = 6; + this.bodySlot = 31; + this.value = 37500; + break; + case 698: + this.width = 18; + this.height = 18; + this.defense = 5; + this.legSlot = 30; + this.value = 30000; + break; + case 699: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 166; + this.width = 12; + this.height = 12; + this.value = 375; + break; + case 700: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 167; + this.width = 12; + this.height = 12; + this.value = 750; + break; + case 701: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 168; + this.width = 12; + this.height = 12; + this.value = Item.sellPrice(silver: 2, copper: 25); + break; + case 702: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 169; + this.width = 12; + this.height = 12; + this.value = Item.sellPrice(silver: 4, copper: 50); + break; + case 703: + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.value = 1125; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 1; + break; + case 704: + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.value = 2250; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 3; + break; + case 705: + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.value = 4500; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 5; + break; + case 706: + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.value = 9000; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 7; + break; + case 707: + this.width = 24; + this.height = 28; + this.accessory = true; + this.value = 1500; + this.waistSlot = (sbyte) 8; + break; + case 708: + this.width = 24; + this.height = 28; + this.accessory = true; + this.value = 7500; + this.waistSlot = (sbyte) 9; + break; + case 709: + this.width = 24; + this.height = 28; + this.accessory = true; + this.rare = 1; + this.value = 15000; + this.waistSlot = (sbyte) 4; + break; + case 710: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 34; + this.placeStyle = 3; + this.width = 26; + this.height = 26; + this.value = 4500; + break; + case 711: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 34; + this.placeStyle = 4; + this.width = 26; + this.height = 26; + this.value = 18000; + break; + case 712: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 34; + this.placeStyle = 5; + this.width = 26; + this.height = 26; + this.value = 36000; + break; + case 713: + this.flame = true; + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 174; + this.width = 8; + this.height = 18; + this.value = Item.sellPrice(silver: 3); + this.holdStyle = 1; + break; + case 714: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 173; + this.width = 20; + this.height = 20; + this.value = Item.buyPrice(silver: 15); + break; + case 715: + this.width = 18; + this.height = 18; + this.headSlot = 51; + this.value = 15000; + this.vanity = true; + break; + case 716: + this.placeStyle = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 16; + this.width = 28; + this.height = 14; + this.value = 7500; + break; + case 717: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 175; + this.width = 12; + this.height = 12; + break; + case 718: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 176; + this.width = 12; + this.height = 12; + break; + case 719: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 177; + this.width = 12; + this.height = 12; + break; + case 720: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 45; + this.width = 12; + this.height = 12; + break; + case 721: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 46; + this.width = 12; + this.height = 12; + break; + case 722: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 47; + this.width = 12; + this.height = 12; + break; + case 723: + this.rare = 4; + this.UseSound = SoundID.Item1; + this.useStyle = 1; + this.damage = 52; + this.useAnimation = 20; + this.useTime = 60; + this.width = 30; + this.height = 30; + this.shoot = 116; + this.shootSpeed = 11f; + this.knockBack = 6.5f; + this.melee = true; + this.value = Item.sellPrice(gold: 3); + break; + case 724: + this.autoReuse = true; + this.crit = 2; + this.rare = 1; + this.UseSound = SoundID.Item1; + this.useStyle = 1; + this.damage = 17; + this.useAnimation = 20; + this.useTime = 55; + this.width = 30; + this.height = 30; + this.shoot = 118; + this.shootSpeed = 9.5f; + this.knockBack = 4.75f; + this.melee = true; + this.value = 20000; + break; + case 725: + this.useStyle = 5; + this.useAnimation = 16; + this.useTime = 16; + this.width = 12; + this.height = 28; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 39; + this.shootSpeed = 10f; + this.knockBack = 4.5f; + this.alpha = 30; + this.rare = 5; + this.noMelee = true; + this.value = Item.sellPrice(gold: 5); + this.ranged = true; + this.channel = true; + this.autoReuse = true; + break; + case 726: + this.autoReuse = true; + this.rare = 5; + this.mana = 12; + this.UseSound = SoundID.Item20; + this.useStyle = 5; + this.damage = 46; + this.useAnimation = 16; + this.useTime = 16; + this.width = 30; + this.height = 30; + this.shoot = 359; + this.shootSpeed = 16f; + this.knockBack = 5f; + this.magic = true; + this.value = Item.sellPrice(gold: 4); + this.noMelee = true; + break; + case 727: + this.width = 18; + this.height = 18; + this.defense = 1; + this.headSlot = 52; + break; + case 728: + this.width = 18; + this.height = 18; + this.defense = 1; + this.bodySlot = 32; + break; + case 729: + this.width = 18; + this.height = 18; + this.defense = 0; + this.legSlot = 31; + break; + case 730: + this.width = 18; + this.height = 18; + this.defense = 1; + this.headSlot = 53; + break; + case 731: + this.width = 18; + this.height = 18; + this.defense = 2; + this.bodySlot = 33; + break; + case 732: + this.width = 18; + this.height = 18; + this.defense = 1; + this.legSlot = 32; + break; + case 733: + this.width = 18; + this.height = 18; + this.defense = 1; + this.headSlot = 54; + break; + case 734: + this.width = 18; + this.height = 18; + this.defense = 1; + this.bodySlot = 34; + break; + case 735: + this.width = 18; + this.height = 18; + this.defense = 1; + this.legSlot = 33; + break; + case 736: + this.width = 18; + this.height = 18; + this.defense = 2; + this.headSlot = 55; + break; + case 737: + this.width = 18; + this.height = 18; + this.defense = 3; + this.bodySlot = 35; + break; + case 738: + this.width = 18; + this.height = 18; + this.defense = 2; + this.legSlot = 34; + break; + case 739: + this.mana = 3; + this.UseSound = SoundID.Item43; + this.useStyle = 5; + this.damage = 14; + this.useAnimation = 40; + this.useTime = 40; + this.width = 40; + this.height = 40; + this.shoot = 121; + this.shootSpeed = 6f; + this.knockBack = 3.25f; + this.value = 2000; + this.magic = true; + this.noMelee = true; + break; + case 740: + this.mana = 4; + this.UseSound = SoundID.Item43; + this.useStyle = 5; + this.damage = 15; + this.useAnimation = 38; + this.useTime = 38; + this.width = 40; + this.height = 40; + this.shoot = 122; + this.shootSpeed = 6.5f; + this.knockBack = 3.5f; + this.value = 3000; + this.magic = true; + this.noMelee = true; + break; + case 741: + this.mana = 5; + this.UseSound = SoundID.Item43; + this.useStyle = 5; + this.damage = 17; + this.useAnimation = 34; + this.useTime = 34; + this.width = 40; + this.height = 40; + this.shoot = 123; + this.shootSpeed = 7.5f; + this.knockBack = 4f; + this.value = 10000; + this.magic = true; + this.rare = 1; + this.noMelee = true; + break; + case 742: + this.mana = 6; + this.UseSound = SoundID.Item43; + this.useStyle = 5; + this.damage = 19; + this.useAnimation = 32; + this.useTime = 32; + this.width = 40; + this.height = 40; + this.shoot = 124; + this.shootSpeed = 8f; + this.knockBack = 4.25f; + this.magic = true; + this.autoReuse = true; + this.value = 15000; + this.rare = 1; + this.noMelee = true; + break; + case 743: + this.mana = 7; + this.UseSound = SoundID.Item43; + this.useStyle = 5; + this.damage = 21; + this.useAnimation = 28; + this.useTime = 28; + this.width = 40; + this.height = 40; + this.shoot = 125; + this.shootSpeed = 9f; + this.knockBack = 4.75f; + this.magic = true; + this.autoReuse = true; + this.value = 20000; + this.rare = 1; + this.noMelee = true; + break; + case 744: + this.mana = 8; + this.UseSound = SoundID.Item43; + this.useStyle = 5; + this.damage = 23; + this.useAnimation = 26; + this.useTime = 26; + this.width = 40; + this.height = 40; + this.shoot = 126; + this.shootSpeed = 9.5f; + this.knockBack = 5.5f; + this.magic = true; + this.autoReuse = true; + this.value = 30000; + this.rare = 2; + this.noMelee = true; + break; + case 745: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 66; + this.width = 12; + this.height = 12; + this.value = 10; + break; + case 746: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 67; + this.width = 12; + this.height = 12; + this.value = 10; + break; + case 747: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 68; + this.width = 12; + this.height = 12; + this.value = 10; + break; + case 748: + this.width = 24; + this.height = 8; + this.accessory = true; + this.value = 400000; + this.rare = 5; + this.wingSlot = (sbyte) 4; + break; + case 749: + this.width = 24; + this.height = 8; + this.accessory = true; + this.value = 400000; + this.rare = 5; + this.wingSlot = (sbyte) 5; + break; + case 750: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 72; + this.width = 12; + this.height = 12; + break; + case 751: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 189; + this.width = 12; + this.height = 12; + break; + case 752: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 73; + this.width = 12; + this.height = 12; + break; + case 753: + this.damage = 0; + this.useStyle = 1; + this.shoot = (int) sbyte.MaxValue; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.value = Item.sellPrice(gold: 2); + this.buffType = 42; + break; + case 754: + this.width = 28; + this.height = 20; + this.headSlot = 56; + this.rare = 5; + this.value = 50000; + this.vanity = true; + break; + case 755: + this.width = 18; + this.height = 14; + this.bodySlot = 36; + this.value = 50000; + this.vanity = true; + this.rare = 5; + break; + case 756: + this.rare = 7; + this.useStyle = 5; + this.useAnimation = 40; + this.useTime = 40; + this.shootSpeed = 5.5f; + this.knockBack = 6.2f; + this.width = 32; + this.height = 32; + this.damage = 60; + this.scale = 1f; + this.UseSound = SoundID.Item1; + this.shoot = 130; + this.value = Item.buyPrice(gold: 70); + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + break; + case 757: + this.rare = 8; + this.UseSound = SoundID.Item1; + this.useStyle = 1; + this.damage = 95; + this.useAnimation = 16; + this.useTime = 16; + this.width = 30; + this.height = 30; + this.shoot = 132; + this.scale = 1.1f; + this.shootSpeed = 12f; + this.knockBack = 6.5f; + this.melee = true; + this.value = Item.sellPrice(gold: 20); + this.autoReuse = true; + break; + case 758: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 20; + this.useTime = 20; + this.useAmmo = AmmoID.Rocket; + this.width = 50; + this.height = 20; + this.shoot = 133; + this.UseSound = SoundID.Item61; + this.damage = 60; + this.shootSpeed = 10f; + this.noMelee = true; + this.value = Item.buyPrice(gold: 35); + this.knockBack = 4f; + this.rare = 8; + this.ranged = true; + break; + case 759: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 30; + this.useTime = 30; + this.useAmmo = AmmoID.Rocket; + this.width = 50; + this.height = 20; + this.shoot = 134; + this.UseSound = SoundID.Item11; + this.damage = 45; + this.shootSpeed = 5f; + this.noMelee = true; + this.value = Item.buyPrice(gold: 40); + this.knockBack = 4f; + this.rare = 8; + this.ranged = true; + break; + case 760: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 50; + this.useTime = 50; + this.useAmmo = AmmoID.Rocket; + this.width = 50; + this.height = 20; + this.shoot = 135; + this.UseSound = SoundID.Item11; + this.damage = 80; + this.shootSpeed = 12f; + this.noMelee = true; + this.value = Item.buyPrice(gold: 35); + this.knockBack = 4f; + this.rare = 8; + this.ranged = true; + break; + case 761: + this.width = 24; + this.height = 8; + this.accessory = true; + this.value = 400000; + this.rare = 5; + this.wingSlot = (sbyte) 6; + break; + case 762: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 193; + this.width = 12; + this.height = 12; + break; + case 763: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 195; + this.width = 12; + this.height = 12; + break; + case 764: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 74; + this.width = 12; + this.height = 12; + break; + case 765: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 196; + this.width = 12; + this.height = 12; + break; + case 766: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 194; + this.width = 12; + this.height = 12; + break; + case 767: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 197; + this.width = 12; + this.height = 12; + break; + case 768: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 75; + this.width = 12; + this.height = 12; + break; + case 769: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 76; + this.width = 12; + this.height = 12; + break; + case 770: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 77; + this.width = 12; + this.height = 12; + break; + case 771: + this.shoot = 0; + this.damage = 40; + this.width = 20; + this.height = 14; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Rocket; + this.knockBack = 4f; + this.value = Item.buyPrice(copper: 50); + this.ranged = true; + break; + case 772: + this.shoot = 3; + this.damage = 40; + this.width = 20; + this.height = 14; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Rocket; + this.knockBack = 4f; + this.value = Item.buyPrice(silver: 2, copper: 50); + this.ranged = true; + this.rare = 1; + break; + case 773: + this.shoot = 6; + this.damage = 65; + this.width = 20; + this.height = 14; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Rocket; + this.knockBack = 6f; + this.value = Item.buyPrice(silver: 1); + this.ranged = true; + this.rare = 1; + break; + case 774: + this.shoot = 9; + this.damage = 65; + this.width = 20; + this.height = 14; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Rocket; + this.knockBack = 6f; + this.value = this.value = Item.buyPrice(silver: 5); + this.ranged = true; + this.rare = 2; + break; + case 775: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 198; + this.width = 12; + this.height = 12; + break; + case 776: + this.useStyle = 1; + this.useTurn = true; + this.autoReuse = true; + this.useAnimation = 25; + this.useTime = 13; + this.knockBack = 5f; + this.width = 20; + this.height = 12; + this.damage = 10; + this.pick = 110; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 54000; + this.melee = true; + this.scale = 1.15f; + break; + case 777: + this.useStyle = 1; + this.useAnimation = 25; + this.useTime = 10; + this.knockBack = 5f; + this.useTurn = true; + this.autoReuse = true; + this.width = 20; + this.height = 12; + this.damage = 15; + this.pick = 150; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 81000; + this.melee = true; + this.scale = 1.15f; + break; + case 778: + this.useStyle = 1; + this.useAnimation = 25; + this.useTime = 8; + this.knockBack = 5f; + this.useTurn = true; + this.autoReuse = true; + this.width = 20; + this.height = 12; + this.damage = 20; + this.pick = 180; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 108000; + this.melee = true; + this.scale = 1.15f; + break; + case 779: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 30; + this.useTime = 5; + this.width = 50; + this.height = 18; + this.shoot = 145; + this.useAmmo = AmmoID.Solution; + this.UseSound = SoundID.Item34; + this.knockBack = 0.3f; + this.shootSpeed = 7f; + this.noMelee = true; + this.value = Item.buyPrice(2); + this.rare = 5; + break; + case 780: + this.shoot = 0; + this.ammo = AmmoID.Solution; + this.width = 10; + this.height = 12; + this.value = Item.buyPrice(silver: 25); + this.rare = 3; + this.maxStack = 999; + this.consumable = true; + break; + case 781: + this.shoot = 1; + this.ammo = AmmoID.Solution; + this.width = 10; + this.height = 12; + this.value = Item.buyPrice(silver: 25); + this.rare = 3; + this.maxStack = 999; + this.consumable = true; + break; + case 782: + this.shoot = 2; + this.ammo = AmmoID.Solution; + this.width = 10; + this.height = 12; + this.value = Item.buyPrice(silver: 25); + this.rare = 3; + this.maxStack = 999; + this.consumable = true; + break; + case 783: + this.shoot = 3; + this.ammo = AmmoID.Solution; + this.width = 10; + this.height = 12; + this.value = Item.buyPrice(silver: 25); + this.rare = 3; + this.maxStack = 999; + this.consumable = true; + break; + case 784: + this.shoot = 4; + this.ammo = AmmoID.Solution; + this.width = 10; + this.height = 12; + this.value = Item.buyPrice(silver: 25); + this.rare = 3; + this.maxStack = 999; + this.consumable = true; + break; + case 785: + this.width = 24; + this.height = 8; + this.accessory = true; + this.value = 400000; + this.rare = 5; + this.wingSlot = (sbyte) 7; + break; + case 786: + this.width = 24; + this.height = 8; + this.accessory = true; + this.value = 400000; + this.rare = 5; + this.wingSlot = (sbyte) 8; + break; + case 787: + this.useTurn = true; + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 27; + this.useTime = 14; + this.hammer = 85; + this.width = 24; + this.height = 28; + this.damage = 26; + this.knockBack = 7.5f; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.rare = 7; + this.value = Item.buyPrice(gold: 40); + this.melee = true; + break; + case 788: + this.mana = 12; + this.damage = 35; + this.useStyle = 5; + this.shootSpeed = 32f; + this.shoot = 150; + this.width = 26; + this.height = 28; + this.useAnimation = 25; + this.useTime = 25; + this.autoReuse = true; + this.rare = 7; + this.noMelee = true; + this.knockBack = 1f; + this.value = 200000; + this.magic = true; + break; + case 789: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 4; + this.width = 10; + this.height = 24; + this.value = 5000; + break; + case 790: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 5; + this.width = 10; + this.height = 24; + this.value = 5000; + break; + case 791: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 6; + this.width = 10; + this.height = 24; + this.value = 5000; + break; + case 792: + this.width = 18; + this.height = 18; + this.defense = 6; + this.headSlot = 57; + this.value = 50000; + this.rare = 1; + break; + case 793: + this.width = 18; + this.height = 18; + this.defense = 7; + this.bodySlot = 37; + this.value = 40000; + this.rare = 1; + break; + case 794: + this.width = 18; + this.height = 18; + this.defense = 6; + this.legSlot = 35; + this.value = 30000; + this.rare = 1; + break; + case 795: + this.useStyle = 1; + this.useAnimation = 25; + this.knockBack = 5f; + this.width = 24; + this.height = 28; + this.damage = 22; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.rare = 1; + this.value = 13500; + this.melee = true; + break; + case 796: + this.useStyle = 5; + this.useAnimation = 30; + this.useTime = 30; + this.width = 12; + this.height = 28; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 19; + this.shootSpeed = 6.7f; + this.knockBack = 1f; + this.alpha = 30; + this.rare = 1; + this.noMelee = true; + this.value = 18000; + this.ranged = true; + break; + case 797: + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 40; + this.useTime = 19; + this.hammer = 55; + this.width = 24; + this.height = 28; + this.damage = 23; + this.knockBack = 6f; + this.scale = 1.2f; + this.UseSound = SoundID.Item1; + this.rare = 1; + this.value = 15000; + this.melee = true; + break; + case 798: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 22; + this.useTime = 14; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.damage = 12; + this.pick = 70; + this.UseSound = SoundID.Item1; + this.knockBack = 3.5f; + this.rare = 1; + this.value = 18000; + this.scale = 1.15f; + this.melee = true; + break; + case 799: + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 32; + this.knockBack = 6f; + this.useTime = 15; + this.width = 24; + this.height = 28; + this.damage = 22; + this.axe = 15; + this.scale = 1.2f; + this.UseSound = SoundID.Item1; + this.rare = 1; + this.value = 13500; + this.melee = true; + break; + case 800: + this.useStyle = 5; + this.useAnimation = 23; + this.useTime = 23; + this.width = 24; + this.height = 28; + this.shoot = 14; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item11; + this.damage = 15; + this.shootSpeed = 6f; + this.noMelee = true; + this.knockBack = 1f; + this.value = this.shadowOrbPrice; + this.scale = 0.9f; + this.rare = 1; + this.ranged = true; + break; + case 801: + this.useStyle = 5; + this.useAnimation = 45; + this.useTime = 45; + this.knockBack = 5.5f; + this.width = 30; + this.height = 10; + this.damage = 17; + this.scale = 1.1f; + this.noUseGraphic = true; + this.shoot = 154; + this.shootSpeed = 12f; + this.UseSound = SoundID.Item1; + this.rare = 1; + this.value = 27000; + this.melee = true; + this.channel = true; + this.noMelee = true; + break; + case 802: + this.useStyle = 5; + this.useAnimation = 31; + this.useTime = 31; + this.shootSpeed = 4f; + this.knockBack = 5f; + this.width = 40; + this.height = 40; + this.damage = 14; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.shoot = 153; + this.rare = 1; + this.value = this.shadowOrbPrice; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + break; + case 803: + this.width = 18; + this.height = 18; + this.headSlot = 58; + this.value = 50000; + this.defense = 1; + break; + case 804: + this.width = 18; + this.height = 18; + this.bodySlot = 38; + this.value = 40000; + this.defense = 2; + break; + case 805: + this.width = 18; + this.height = 18; + this.legSlot = 36; + this.value = 30000; + this.defense = 1; + break; + case 806: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 5; + this.width = 12; + this.height = 30; + this.value = 150; + break; + case 807: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 6; + this.width = 12; + this.height = 30; + this.value = 150; + break; + case 808: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 7; + this.width = 12; + this.height = 30; + this.value = 150; + break; + case 809: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 8; + this.width = 12; + this.height = 30; + this.value = 150; + break; + case 810: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 9; + this.width = 12; + this.height = 30; + this.value = 150; + break; + case 811: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 4; + this.width = 28; + this.height = 14; + this.value = 150; + break; + case 812: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 5; + this.width = 28; + this.height = 14; + this.value = 150; + break; + case 813: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 6; + this.width = 28; + this.height = 14; + this.value = 150; + break; + case 814: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 7; + this.width = 28; + this.height = 14; + this.value = 150; + break; + case 815: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 8; + this.width = 28; + this.height = 14; + this.value = 150; + break; + case 816: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 4; + this.width = 14; + this.height = 28; + this.value = 200; + break; + case 817: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 5; + this.width = 14; + this.height = 28; + this.value = 200; + break; + case 818: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 6; + this.width = 14; + this.height = 28; + this.value = 200; + break; + case 819: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 7; + this.width = 14; + this.height = 28; + this.value = 200; + break; + case 820: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 8; + this.width = 14; + this.height = 28; + this.value = 200; + break; + case 821: + this.width = 24; + this.height = 8; + this.accessory = true; + this.value = 400000; + this.rare = 5; + this.wingSlot = (sbyte) 9; + break; + case 822: + this.width = 24; + this.height = 8; + this.accessory = true; + this.value = 400000; + this.rare = 5; + this.wingSlot = (sbyte) 10; + break; + case 823: + this.color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + this.alpha = (int) byte.MaxValue; + this.width = 24; + this.height = 8; + this.accessory = true; + this.value = 400000; + this.rare = 8; + this.wingSlot = (sbyte) 11; + break; + case 824: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 202; + this.width = 12; + this.height = 12; + break; + case 825: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 82; + this.width = 12; + this.height = 12; + break; + case 826: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 10; + this.width = 12; + this.height = 30; + this.value = 150; + break; + case 827: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 4; + this.width = 26; + this.height = 20; + this.value = 300; + break; + case 828: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 5; + this.width = 26; + this.height = 20; + this.value = 300; + break; + case 829: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 6; + this.width = 26; + this.height = 20; + this.value = 300; + break; + case 830: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 7; + this.width = 26; + this.height = 20; + this.value = 300; + break; + case 831: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 12; + this.width = 26; + this.height = 22; + this.value = 5000; + break; + case 832: + this.tileWand = 9; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.createTile = 191; + this.width = 8; + this.height = 10; + this.rare = 1; + this.value = Item.sellPrice(silver: 25); + break; + case 833: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 163; + this.width = 12; + this.height = 12; + break; + case 834: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 164; + this.width = 12; + this.height = 12; + break; + case 835: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 200; + this.width = 12; + this.height = 12; + break; + case 836: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 203; + this.width = 12; + this.height = 12; + break; + case 837: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 9; + this.width = 14; + this.height = 28; + this.value = 200; + break; + case 838: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 13; + this.width = 26; + this.height = 22; + this.value = 5000; + break; + case 839: + this.width = 28; + this.height = 20; + this.headSlot = 59; + this.rare = 2; + this.vanity = true; + this.value = Item.buyPrice(gold: 1, silver: 50); + break; + case 840: + this.width = 18; + this.height = 14; + this.bodySlot = 39; + this.rare = 2; + this.vanity = true; + this.value = Item.buyPrice(gold: 1, silver: 50); + break; + case 841: + this.width = 18; + this.height = 14; + this.legSlot = 37; + this.rare = 2; + this.vanity = true; + this.value = Item.buyPrice(gold: 1, silver: 50); + break; + case 842: + this.width = 28; + this.height = 20; + this.headSlot = 60; + this.rare = 1; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 843: + this.width = 18; + this.height = 14; + this.bodySlot = 40; + this.rare = 1; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 844: + this.width = 18; + this.height = 14; + this.legSlot = 38; + this.rare = 1; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 845: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 7; + this.width = 10; + this.height = 24; + this.value = 5000; + break; + case 846: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 8; + this.width = 10; + this.height = 24; + this.value = 5000; + break; + case 847: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 9; + this.width = 10; + this.height = 24; + this.value = 5000; + break; + case 848: + this.width = 28; + this.height = 20; + this.headSlot = 61; + this.rare = 1; + this.vanity = true; + break; + case 849: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.maxStack = 999; + this.mech = true; + this.value = Item.buyPrice(silver: 10); + break; + case 850: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 5; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.rare = 1; + this.value = 20000; + this.mech = true; + this.tileBoost = 20; + break; + case 851: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 5; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.rare = 1; + this.value = 20000; + this.mech = true; + this.tileBoost = 20; + break; + case 852: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 135; + this.width = 12; + this.height = 12; + this.placeStyle = 4; + this.mech = true; + this.value = 5000; + break; + case 853: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 135; + this.width = 12; + this.height = 12; + this.placeStyle = 5; + this.mech = true; + this.value = 5000; + break; + case 854: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 5; + this.value = 50000; + break; + case 855: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 5; + this.value = 50000; + break; + case 856: + this.noWet = true; + this.holdStyle = 1; + this.width = 30; + this.height = 30; + this.value = 500; + this.rare = 2; + this.vanity = true; + break; + case 857: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 2; + this.value = 50000; + this.waistSlot = (sbyte) 15; + break; + case 858: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 89; + this.placeStyle = 24; + this.width = 20; + this.height = 20; + this.value = 300; + break; + case 859: + this.useStyle = 1; + this.shootSpeed = 6f; + this.shoot = 155; + this.width = 44; + this.height = 44; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 20; + break; + case 860: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 6; + this.lifeRegen = 1; + this.value = Item.buyPrice(gold: 20); + this.handOnSlot = (sbyte) 4; + break; + case 861: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 6; + this.value = Item.buyPrice(gold: 40); + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 862: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 6; + this.value = Item.buyPrice(gold: 10); + this.neckSlot = (sbyte) 5; + break; + case 863: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 4; + this.value = 200000; + this.shoeSlot = (sbyte) 2; + break; + case 864: + this.width = 28; + this.height = 20; + this.headSlot = 62; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 25); + break; + case 865: + this.width = 18; + this.height = 14; + this.bodySlot = 41; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 10); + break; + case 866: + this.width = 18; + this.height = 14; + this.bodySlot = 42; + this.rare = 1; + this.vanity = true; + break; + case 867: + this.width = 28; + this.height = 20; + this.headSlot = 63; + this.rare = 1; + this.defense = 2; + this.value = Item.sellPrice(silver: 50); + break; + case 868: + this.width = 28; + this.height = 20; + this.headSlot = 64; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 2); + break; + case 869: + this.width = 28; + this.height = 20; + this.headSlot = 65; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 2, silver: 50); + break; + case 870: + this.width = 28; + this.height = 20; + this.headSlot = 66; + this.rare = 1; + this.vanity = true; + break; + case 871: + this.width = 28; + this.height = 20; + this.bodySlot = 43; + this.rare = 1; + this.vanity = true; + break; + case 872: + this.width = 28; + this.height = 20; + this.legSlot = 39; + this.rare = 1; + this.vanity = true; + break; + case 873: + this.width = 28; + this.height = 20; + this.headSlot = 67; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 5); + break; + case 874: + this.width = 28; + this.height = 20; + this.bodySlot = 44; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 5); + break; + case 875: + this.width = 28; + this.height = 20; + this.legSlot = 40; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 5); + break; + case 876: + this.width = 28; + this.height = 20; + this.headSlot = 68; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 5); + break; + case 877: + this.width = 28; + this.height = 20; + this.bodySlot = 45; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 5); + break; + case 878: + this.width = 28; + this.height = 20; + this.legSlot = 41; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 5); + break; + case 879: + this.width = 28; + this.height = 20; + this.headSlot = 69; + this.rare = 1; + this.defense = 4; + this.value = Item.sellPrice(silver: 50); + break; + case 880: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 204; + this.width = 12; + this.height = 12; + this.rare = 1; + this.value = Item.sellPrice(silver: 13); + break; + case 881: + this.useStyle = 1; + this.useTurn = false; + this.useAnimation = 32; + this.useTime = 32; + this.width = 24; + this.height = 28; + this.damage = 8; + this.knockBack = 4.5f; + this.UseSound = SoundID.Item1; + this.scale = 1f; + this.value = 1800; + this.melee = true; + break; + case 882: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 25; + this.useTime = 16; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.damage = 4; + this.pick = 35; + this.UseSound = SoundID.Item1; + this.knockBack = 2f; + this.value = 2000; + this.melee = true; + break; + case 883: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 206; + this.width = 12; + this.height = 12; + break; + case 884: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 84; + this.width = 12; + this.height = 12; + break; + case 885: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 4; + this.value = 100000; + break; + case 886: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 4; + this.value = 100000; + break; + case 887: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 4; + this.value = 100000; + break; + case 888: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 4; + this.value = 100000; + this.faceSlot = (sbyte) 5; + break; + case 889: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 4; + this.value = 100000; + break; + case 890: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 4; + this.value = 100000; + break; + case 891: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 2; + this.value = 100000; + break; + case 892: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 4; + this.value = 100000; + break; + case 893: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 4; + this.value = 100000; + break; + case 894: + this.width = 18; + this.height = 18; + this.defense = 1; + this.headSlot = 70; + this.value = Item.sellPrice(copper: 40); + break; + case 895: + this.width = 18; + this.height = 18; + this.defense = 1; + this.bodySlot = 46; + this.value = Item.sellPrice(copper: 60); + break; + case 896: + this.width = 18; + this.height = 18; + this.defense = 1; + this.legSlot = 42; + this.value = Item.sellPrice(copper: 50); + break; + case 897: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 5; + this.value = Item.buyPrice(gold: 20); + this.handOffSlot = (sbyte) 5; + this.handOnSlot = (sbyte) 10; + break; + case 898: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 5; + this.value = 300000; + this.shoeSlot = (sbyte) 10; + break; + case 899: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 7; + this.value = 300000; + this.handOnSlot = (sbyte) 13; + break; + case 900: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 5; + this.value = this.eclipsePrice; + this.handOnSlot = (sbyte) 14; + break; + case 901: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 5; + this.value = 100000; + break; + case 902: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 5; + this.value = 100000; + break; + case 903: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 5; + this.value = 100000; + break; + case 904: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 5; + this.value = 100000; + break; + case 905: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 8; + this.useTime = 8; + this.width = 50; + this.height = 18; + this.shoot = 158; + this.useAmmo = AmmoID.Coin; + this.UseSound = SoundID.Item11; + this.damage = 0; + this.shootSpeed = 10f; + this.noMelee = true; + this.value = 300000; + this.rare = 6; + this.knockBack = 2f; + this.ranged = true; + break; + case 906: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 3; + this.value = 300000; + break; + case 907: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 4; + this.value = Item.buyPrice(gold: 30); + this.shoeSlot = (sbyte) 11; + break; + case 908: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 7; + this.value = 500000; + this.shoeSlot = (sbyte) 8; + break; + case 909: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 207; + this.placeStyle = 0; + this.width = 26; + this.height = 36; + this.value = Item.buyPrice(gold: 4); + this.rare = 1; + break; + case 910: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 207; + this.placeStyle = 1; + this.width = 26; + this.height = 36; + this.value = Item.buyPrice(gold: 4); + this.rare = 1; + break; + case 911: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 208; + this.width = 8; + this.height = 10; + break; + case 912: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 10; + this.width = 14; + this.height = 28; + this.value = 200; + break; + case 913: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 5; + this.width = 8; + this.height = 10; + break; + case 914: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 14; + this.width = 26; + this.height = 22; + this.value = 500; + break; + case 915: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 11; + this.width = 12; + this.height = 30; + this.value = 150; + break; + case 916: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 9; + this.width = 28; + this.height = 14; + this.value = 150; + break; + case 917: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 8; + this.width = 26; + this.height = 20; + this.value = 300; + break; + case 918: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 88; + this.placeStyle = 4; + this.width = 20; + this.height = 20; + this.value = 300; + break; + case 919: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 87; + this.placeStyle = 4; + this.width = 20; + this.height = 20; + this.value = 300; + break; + case 920: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 79; + this.placeStyle = 4; + this.width = 28; + this.height = 20; + this.value = 2000; + break; + case 921: + this.useStyle = 1; + this.useTurn = false; + this.useAnimation = 21; + this.useTime = 21; + this.width = 24; + this.height = 28; + this.damage = 10; + this.knockBack = 5f; + this.UseSound = SoundID.Item1; + this.scale = 1f; + this.value = 100; + this.melee = true; + break; + case 922: + this.autoReuse = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 30; + this.useTime = 20; + this.hammer = 40; + this.width = 24; + this.height = 28; + this.damage = 7; + this.knockBack = 5.5f; + this.scale = 1.2f; + this.UseSound = SoundID.Item1; + this.value = 50; + this.melee = true; + break; + case 923: + this.useStyle = 5; + this.useAnimation = 28; + this.useTime = 28; + this.width = 12; + this.height = 28; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 8; + this.shootSpeed = 6.6f; + this.noMelee = true; + this.value = 100; + this.ranged = true; + break; + case 924: + this.width = 18; + this.height = 18; + this.defense = 1; + this.headSlot = 71; + break; + case 925: + this.width = 18; + this.height = 18; + this.defense = 2; + this.bodySlot = 47; + break; + case 926: + this.width = 18; + this.height = 18; + this.defense = 1; + this.legSlot = 43; + break; + case 927: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 85; + this.width = 12; + this.height = 12; + break; + case 928: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 209; + this.width = 12; + this.height = 12; + this.rare = 3; + this.value = Item.buyPrice(gold: 25); + break; + case 929: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 20; + this.useTime = 20; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.damage = 300; + this.noMelee = true; + this.value = Item.buyPrice(silver: 15); + break; + case 930: + this.useStyle = 5; + this.useAnimation = 18; + this.useTime = 18; + this.width = 24; + this.height = 28; + this.shoot = 163; + this.useAmmo = AmmoID.Flare; + this.UseSound = SoundID.Item11; + this.damage = 2; + this.shootSpeed = 6f; + this.noMelee = true; + this.value = 50000; + this.scale = 0.9f; + this.rare = 1; + this.holdStyle = 1; + break; + case 931: + this.shootSpeed = 6f; + this.shoot = 163; + this.damage = 1; + this.width = 12; + this.height = 12; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Flare; + this.knockBack = 1.5f; + this.value = 7; + this.ranged = true; + break; + case 932: + this.tileWand = 154; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.createTile = 194; + this.width = 8; + this.height = 10; + this.rare = 1; + this.value = Item.sellPrice(silver: 50); + break; + case 933: + this.tileWand = 9; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.createTile = 192; + this.width = 8; + this.height = 10; + this.rare = 1; + this.value = Item.sellPrice(silver: 25); + break; + case 934: + this.width = 34; + this.height = 12; + this.accessory = true; + this.rare = 2; + this.value = 50000; + break; + case 935: + this.width = 24; + this.height = 24; + this.accessory = true; + this.value = 300000; + this.rare = 5; + break; + case 936: + this.width = 24; + this.height = 24; + this.accessory = true; + this.rare = 6; + this.value = Item.buyPrice(gold: 25); + this.handOffSlot = (sbyte) 4; + this.handOnSlot = (sbyte) 9; + break; + case 937: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 210; + this.width = 12; + this.height = 12; + this.placeStyle = 0; + this.mech = true; + this.value = 50000; + this.mech = true; + break; + case 938: + this.width = 24; + this.height = 24; + this.accessory = true; + this.rare = 8; + this.defense = 6; + this.value = 300000; + this.shieldSlot = (sbyte) 2; + break; + case 939: + this.noUseGraphic = true; + this.damage = 0; + this.knockBack = 7f; + this.useStyle = 5; + this.shootSpeed = 10f; + this.shoot = 165; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 2; + this.noMelee = true; + this.value = 20000; + break; + case 940: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 207; + this.placeStyle = 2; + this.width = 26; + this.height = 36; + this.value = Item.buyPrice(gold: 4); + this.rare = 1; + break; + case 941: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 207; + this.placeStyle = 3; + this.width = 26; + this.height = 36; + this.value = Item.buyPrice(gold: 4); + this.rare = 1; + break; + case 942: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 207; + this.placeStyle = 4; + this.width = 26; + this.height = 36; + this.value = Item.buyPrice(gold: 4); + this.rare = 1; + break; + case 943: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 207; + this.placeStyle = 5; + this.width = 26; + this.height = 36; + this.value = Item.buyPrice(gold: 4); + this.rare = 1; + break; + case 944: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 207; + this.placeStyle = 6; + this.width = 26; + this.height = 36; + this.value = Item.buyPrice(gold: 4); + this.rare = 1; + break; + case 945: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 207; + this.placeStyle = 7; + this.width = 26; + this.height = 36; + this.value = Item.buyPrice(gold: 4); + this.rare = 1; + break; + case 946: + this.width = 44; + this.height = 44; + this.rare = 1; + this.value = 10000; + this.holdStyle = 2; + this.useStyle = 3; + this.useAnimation = 22; + this.useTime = 22; + this.damage = 10; + this.knockBack = 5f; + this.UseSound = SoundID.Item1; + this.melee = true; + break; + case 947: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 211; + this.width = 12; + this.height = 12; + this.rare = 7; + this.value = Item.sellPrice(silver: 15); + break; + case 948: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 8; + this.wingSlot = (sbyte) 12; + this.value = Item.buyPrice(3); + break; + case 949: + this.useStyle = 1; + this.shootSpeed = 7f; + this.shoot = 166; + this.ammo = AmmoID.Snowball; + this.damage = 8; + this.width = 18; + this.height = 20; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 19; + this.useTime = 19; + this.noUseGraphic = true; + this.noMelee = true; + this.ranged = true; + this.knockBack = 5.75f; + break; + case 950: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 1; + this.value = 50000; + this.shoeSlot = (sbyte) 7; + break; + case 951: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 212; + this.width = 20; + this.height = 20; + this.value = 50000; + this.rare = 2; + break; + case 952: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 15; + this.width = 26; + this.height = 22; + this.value = 500; + break; + case 953: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 1; + this.value = Item.sellPrice(silver: 50); + this.handOnSlot = (sbyte) 11; + this.handOffSlot = (sbyte) 6; + break; + case 954: + this.width = 18; + this.height = 18; + this.defense = 2; + this.headSlot = 72; + this.value = 5000; + break; + case 955: + this.width = 18; + this.height = 18; + this.defense = 4; + this.headSlot = 73; + this.value = 25000; + break; + case 956: + this.width = 18; + this.height = 18; + this.defense = 6; + this.headSlot = 74; + this.rare = 1; + this.value = 37500; + break; + case 957: + this.width = 18; + this.height = 18; + this.defense = 7; + this.bodySlot = 48; + this.rare = 1; + this.value = 30000; + break; + case 958: + this.width = 18; + this.height = 18; + this.defense = 6; + this.legSlot = 44; + this.rare = 1; + this.value = 22500; + break; + case 959: + this.width = 18; + this.height = 18; + this.defense = 5; + this.headSlot = 75; + this.rare = 2; + this.value = 45000; + break; + case 960: + this.width = 18; + this.height = 18; + this.defense = 5; + this.headSlot = 76; + this.rare = 3; + this.value = 45000; + break; + case 961: + this.width = 18; + this.height = 18; + this.defense = 6; + this.bodySlot = 49; + this.rare = 3; + this.value = 30000; + break; + case 962: + this.width = 18; + this.height = 18; + this.defense = 6; + this.legSlot = 45; + this.rare = 3; + this.value = 30000; + break; + case 963: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 7; + this.value = Item.buyPrice(gold: 15); + this.waistSlot = (sbyte) 10; + break; + case 964: + this.knockBack = 5.75f; + this.useStyle = 5; + this.useAnimation = 40; + this.useTime = 40; + this.width = 50; + this.height = 14; + this.shoot = 10; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item36; + this.damage = 14; + this.shootSpeed = 5.35f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 2); + this.rare = 2; + this.ranged = true; + break; + case 965: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 8; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 213; + this.width = 12; + this.height = 12; + this.value = 10; + this.tileBoost += 3; + break; + case 966: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 215; + this.width = 12; + this.height = 12; + break; + case 967: + this.width = 12; + this.height = 12; + this.maxStack = 99; + this.value = 100; + break; + case 968: + this.holdStyle = 1; + this.width = 12; + this.height = 12; + this.value = 200; + break; + case 970: + this.createTile = 216; + this.placeStyle = 0; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.width = 12; + this.height = 30; + this.value = 1500; + this.mech = true; + break; + case 971: + this.createTile = 216; + this.placeStyle = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.width = 12; + this.height = 30; + this.value = 1500; + this.mech = true; + break; + case 972: + this.createTile = 216; + this.placeStyle = 2; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.width = 12; + this.height = 30; + this.value = 1500; + this.mech = true; + break; + case 973: + this.createTile = 216; + this.placeStyle = 3; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.width = 12; + this.height = 30; + this.value = 1500; + this.mech = true; + break; + case 974: + this.flame = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.holdStyle = 1; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 4; + this.placeStyle = 9; + this.width = 10; + this.height = 12; + this.value = 60; + this.noWet = true; + break; + case 975: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 1; + this.value = 50000; + this.shoeSlot = (sbyte) 4; + break; + case 976: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 2; + this.value = 50000; + this.shoeSlot = (sbyte) 4; + this.handOnSlot = (sbyte) 11; + this.handOffSlot = (sbyte) 6; + break; + case 977: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 7; + this.value = Item.buyPrice(gold: 15); + this.shoeSlot = (sbyte) 3; + break; + case 978: + this.width = 18; + this.height = 18; + this.headSlot = 77; + this.value = 50000; + this.defense = 1; + break; + case 979: + this.width = 18; + this.height = 18; + this.bodySlot = 50; + this.value = 40000; + this.defense = 2; + break; + case 980: + this.width = 18; + this.height = 18; + this.legSlot = 46; + this.value = 30000; + this.defense = 1; + break; + case 981: + this.maxStack = 99; + this.width = 12; + this.height = 20; + this.value = 10000; + break; + case 982: + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 1; + this.value = 50000; + this.handOnSlot = (sbyte) 1; + break; + case 983: + this.width = 14; + this.height = 28; + this.rare = 4; + this.value = 150000; + this.accessory = true; + this.balloonSlot = (sbyte) 6; + break; + case 984: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 8; + this.value = 500000; + this.handOnSlot = (sbyte) 11; + this.handOffSlot = (sbyte) 6; + this.shoeSlot = (sbyte) 14; + this.waistSlot = (sbyte) 10; + break; + case 985: + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 171; + this.damage = 0; + this.width = 18; + this.height = 20; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 100; + break; + case 986: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 35; + this.useTime = 35; + this.width = 38; + this.height = 6; + this.shoot = 10; + this.useAmmo = AmmoID.Dart; + this.UseSound = SoundID.Item64; + this.damage = 27; + this.shootSpeed = 13f; + this.noMelee = true; + this.value = Item.buyPrice(gold: 5); + this.knockBack = 4f; + this.useAmmo = AmmoID.Dart; + this.ranged = true; + this.rare = 3; + break; + case 987: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 1; + this.value = 50000; + this.waistSlot = (sbyte) 13; + break; + case 988: + this.shootSpeed = 3.75f; + this.shoot = 172; + this.damage = 9; + this.width = 10; + this.height = 28; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Arrow; + this.knockBack = 2.2f; + this.value = 15; + this.ranged = true; + break; + case 989: + this.autoReuse = true; + this.rare = 2; + this.UseSound = SoundID.Item1; + this.useStyle = 1; + this.damage = 23; + this.useAnimation = 21; + this.useTime = 45; + this.scale = 1.1f; + this.width = 30; + this.height = 30; + this.shoot = 173; + this.shootSpeed = 9.5f; + this.knockBack = 4.25f; + this.melee = true; + this.value = Item.sellPrice(gold: 3); + break; + case 990: + this.useTurn = true; + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 25; + this.useTime = 7; + this.knockBack = 4.75f; + this.width = 20; + this.height = 12; + this.damage = 35; + this.pick = 200; + this.axe = 22; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 220000; + this.melee = true; + this.scale = 1.1f; + break; + case 991: + this.useTurn = true; + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 35; + this.useTime = 13; + this.knockBack = 5f; + this.width = 20; + this.height = 12; + this.damage = 33; + this.axe = 14; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 54000; + this.melee = true; + this.scale = 1.1f; + break; + case 992: + this.useTurn = true; + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 35; + this.useTime = 10; + this.knockBack = 6f; + this.width = 20; + this.height = 12; + this.damage = 39; + this.axe = 17; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 81000; + this.melee = true; + this.scale = 1.1f; + break; + case 993: + this.useTurn = true; + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 35; + this.useTime = 8; + this.knockBack = 7f; + this.width = 20; + this.height = 12; + this.damage = 43; + this.axe = 20; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 108000; + this.melee = true; + this.scale = 1.1f; + break; + case 994: + this.damage = 0; + this.useStyle = 1; + this.shoot = 175; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.value = Item.sellPrice(gold: 7, silver: 50); + this.buffType = 45; + break; + case 995: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 217; + this.width = 26; + this.height = 20; + this.value = 100000; + break; + case 996: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 218; + this.width = 26; + this.height = 20; + this.value = 100000; + break; + case 997: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 219; + this.width = 26; + this.height = 20; + this.value = 100000; + break; + case 998: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 220; + this.width = 26; + this.height = 20; + this.value = 100000; + break; + case 999: + this.createTile = 178; + this.placeStyle = 6; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.alpha = 50; + this.width = 10; + this.height = 14; + this.value = 15000; + break; + case 1000: + this.useStyle = 5; + this.shootSpeed = 10f; + this.shoot = 178; + this.damage = 0; + this.width = 18; + this.height = 20; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item11; + this.useAnimation = 15; + this.useTime = 15; + this.noMelee = true; + this.value = 100; + this.ranged = true; + break; + } + } + } + + public void SetDefaults2(int type) + { + switch (type) + { + case 1001: + this.width = 18; + this.height = 18; + this.defense = 20; + this.headSlot = 78; + this.rare = 7; + this.value = 300000; + break; + case 1002: + this.width = 18; + this.height = 18; + this.defense = 13; + this.headSlot = 79; + this.rare = 7; + this.value = 300000; + break; + case 1003: + this.width = 18; + this.height = 18; + this.defense = 7; + this.headSlot = 80; + this.rare = 7; + this.value = 300000; + break; + case 1004: + this.width = 18; + this.height = 18; + this.defense = 18; + this.bodySlot = 51; + this.rare = 7; + this.value = 240000; + break; + case 1005: + this.width = 18; + this.height = 18; + this.defense = 13; + this.legSlot = 47; + this.rare = 7; + this.value = 180000; + break; + case 1006: + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.value = Item.sellPrice(silver: 90); + this.rare = 7; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 17; + break; + case 1007: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1008: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1009: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1010: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1011: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1012: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1013: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1014: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1015: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1016: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1017: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1018: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1019: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1020: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1021: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1022: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1023: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1024: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1025: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1026: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1027: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1028: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1029: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1030: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1031: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1032: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1033: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1034: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1035: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1036: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1037: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1038: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1039: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1040: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1041: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1042: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1043: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1044: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1045: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1046: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1047: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1048: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1049: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1050: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1051: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1052: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1053: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1054: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1055: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1056: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1057: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1058: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1059: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1060: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1061: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1062: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1063: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1064: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1065: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1066: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1067: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1068: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1069: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1070: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1071: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.width = 24; + this.height = 24; + this.value = 10000; + break; + case 1072: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.width = 24; + this.height = 24; + this.value = 10000; + break; + case 1073: + this.paint = (byte) 1; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1074: + this.paint = (byte) 2; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1075: + this.paint = (byte) 3; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1076: + this.paint = (byte) 4; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1077: + this.paint = (byte) 5; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1078: + this.paint = (byte) 6; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1079: + this.paint = (byte) 7; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1080: + this.paint = (byte) 8; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1081: + this.paint = (byte) 9; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1082: + this.paint = (byte) 10; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1083: + this.paint = (byte) 11; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1084: + this.paint = (byte) 12; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1085: + this.paint = (byte) 13; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1086: + this.paint = (byte) 14; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1087: + this.paint = (byte) 15; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1088: + this.paint = (byte) 16; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1089: + this.paint = (byte) 17; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1090: + this.paint = (byte) 18; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1091: + this.paint = (byte) 19; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1092: + this.paint = (byte) 20; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1093: + this.paint = (byte) 21; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1094: + this.paint = (byte) 22; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1095: + this.paint = (byte) 23; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1096: + this.paint = (byte) 24; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1097: + this.paint = (byte) 25; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1098: + this.paint = (byte) 26; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1099: + this.paint = (byte) 27; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + break; + case 1100: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.width = 24; + this.height = 24; + this.value = 10000; + break; + case 1101: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 226; + this.width = 12; + this.height = 12; + break; + case 1102: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 112; + this.width = 12; + this.height = 12; + break; + case 1103: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 224; + this.width = 12; + this.height = 12; + break; + case 1104: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 221; + this.width = 12; + this.height = 12; + this.value = 4500; + this.rare = 3; + break; + case 1105: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 222; + this.width = 12; + this.height = 12; + this.value = 6500; + this.rare = 3; + break; + case 1106: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 223; + this.width = 12; + this.height = 12; + this.value = 8500; + this.rare = 3; + break; + case 1107: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + this.placeStyle = 0; + this.createTile = 227; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + break; + case 1108: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + this.placeStyle = 1; + this.createTile = 227; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + break; + case 1109: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + this.placeStyle = 2; + this.createTile = 227; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + break; + case 1110: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + this.placeStyle = 3; + this.createTile = 227; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + break; + case 1111: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + this.placeStyle = 4; + this.createTile = 227; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + break; + case 1112: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + this.placeStyle = 5; + this.createTile = 227; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + break; + case 1113: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1114: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + this.placeStyle = 7; + this.createTile = 227; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + break; + case 1115: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1116: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1117: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1118: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1119: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + break; + case 1120: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 228; + this.width = 26; + this.height = 20; + this.value = Item.buyPrice(gold: 5); + break; + case 1121: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 12; + this.useTime = 12; + this.mana = 5; + this.width = 50; + this.height = 18; + this.shoot = 181; + this.UseSound = SoundID.Item11; + this.damage = 9; + this.shootSpeed = 8f; + this.noMelee = true; + this.value = this.queenBeePrice; + this.rare = 2; + this.magic = true; + this.scale = 0.8f; + break; + case 1122: + this.autoReuse = true; + this.useStyle = 1; + this.shootSpeed = 12f; + this.shoot = 182; + this.damage = 80; + this.width = 18; + this.height = 20; + this.UseSound = SoundID.Item1; + this.useAnimation = 14; + this.useTime = 14; + this.noUseGraphic = true; + this.noMelee = true; + this.value = Item.buyPrice(gold: 35); + this.knockBack = 5f; + this.melee = true; + this.rare = 7; + break; + case 1123: + this.useStyle = 1; + this.useAnimation = 22; + this.knockBack = 5f; + this.width = 40; + this.height = 40; + this.damage = 24; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.rare = 3; + this.value = this.queenBeePrice; + this.melee = true; + break; + case 1124: + this.width = 12; + this.height = 12; + this.maxStack = 999; + break; + case 1125: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 229; + this.width = 12; + this.height = 12; + break; + case 1126: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 108; + this.width = 12; + this.height = 12; + break; + case 1127: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 230; + this.width = 12; + this.height = 12; + break; + case 1128: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.autoReuse = true; + break; + case 1129: + this.tileWand = 1124; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.createTile = 225; + this.width = 8; + this.height = 10; + this.rare = 1; + this.value = Item.sellPrice(silver: 50); + break; + case 1130: + this.useStyle = 1; + this.shootSpeed = 6f; + this.shoot = 183; + this.knockBack = 1f; + this.damage = 14; + this.width = 10; + this.height = 10; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 200; + this.ranged = true; + break; + case 1131: + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 8; + this.value = Item.sellPrice(gold: 40); + this.expert = true; + break; + case 1132: + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 2; + this.value = 100000; + break; + case 1133: + this.useStyle = 4; + this.consumable = true; + this.useAnimation = 45; + this.useTime = 45; + this.width = 28; + this.height = 28; + this.maxStack = 20; + this.rare = 1; + break; + case 1134: + this.UseSound = SoundID.Item3; + this.healLife = 80; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.potion = true; + this.value = 40; + break; + case 1135: + this.width = 18; + this.height = 18; + this.headSlot = 81; + this.value = 1000; + this.defense = 1; + break; + case 1136: + this.width = 18; + this.height = 18; + this.bodySlot = 52; + this.value = 1000; + this.defense = 2; + break; + case 1137: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 12; + this.width = 14; + this.height = 28; + this.value = 200; + break; + case 1138: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 13; + this.width = 14; + this.height = 28; + this.value = 200; + break; + case 1139: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 14; + this.width = 14; + this.height = 28; + this.value = 200; + break; + case 1140: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 15; + this.width = 14; + this.height = 28; + this.value = 200; + break; + case 1141: + this.width = 14; + this.height = 20; + this.maxStack = 99; + this.rare = 7; + break; + case 1142: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 16; + this.width = 26; + this.height = 22; + this.value = 500; + break; + case 1143: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 12; + this.width = 12; + this.height = 30; + this.value = 150; + break; + case 1144: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 9; + this.width = 26; + this.height = 20; + this.value = 300; + break; + case 1145: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 10; + this.width = 28; + this.height = 14; + this.value = 150; + break; + case 1146: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 137; + this.placeStyle = 1; + this.width = 12; + this.height = 12; + this.value = 10000; + this.mech = true; + break; + case 1147: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 137; + this.placeStyle = 2; + this.width = 12; + this.height = 12; + this.value = 10000; + this.mech = true; + break; + case 1148: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 137; + this.placeStyle = 3; + this.width = 12; + this.height = 12; + this.value = 10000; + this.mech = true; + break; + case 1149: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 137; + this.placeStyle = 4; + this.width = 12; + this.height = 12; + this.value = 10000; + this.mech = true; + break; + case 1150: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 232; + this.width = 12; + this.height = 12; + break; + case 1151: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 135; + this.width = 12; + this.height = 12; + this.placeStyle = 6; + this.mech = true; + this.value = 5000; + break; + case 1152: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 43; + break; + case 1153: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 44; + break; + case 1154: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 45; + break; + case 1155: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 18; + this.useTime = 18; + this.mana = 10; + this.width = 50; + this.height = 18; + this.shoot = 189; + this.UseSound = SoundID.Item11; + this.damage = 31; + this.shootSpeed = 9f; + this.noMelee = true; + this.value = 500000; + this.rare = 8; + this.magic = true; + break; + case 1156: + this.channel = true; + this.useStyle = 5; + this.useAnimation = 30; + this.useTime = 30; + this.knockBack = 1f; + this.width = 30; + this.height = 10; + this.damage = 38; + this.scale = 1.1f; + this.shoot = 190; + this.shootSpeed = 14f; + this.UseSound = SoundID.Item10; + this.rare = 8; + this.value = Item.sellPrice(gold: 20); + this.ranged = true; + this.noMelee = true; + break; + case 1157: + this.mana = 10; + this.damage = 34; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 191; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item44; + this.useAnimation = 28; + this.useTime = 28; + this.rare = 7; + this.noMelee = true; + this.knockBack = 3f; + this.buffType = 49; + this.value = Item.buyPrice(gold: 35); + this.summon = true; + break; + case 1158: + this.rare = 7; + this.width = 24; + this.height = 28; + this.accessory = true; + this.value = Item.buyPrice(gold: 40); + this.neckSlot = (sbyte) 4; + break; + case 1159: + this.width = 18; + this.height = 18; + this.defense = 6; + this.headSlot = 82; + this.rare = 7; + this.value = Item.buyPrice(gold: 50); + break; + case 1160: + this.width = 18; + this.height = 18; + this.defense = 17; + this.bodySlot = 53; + this.rare = 7; + this.value = Item.buyPrice(gold: 50); + break; + case 1161: + this.width = 18; + this.height = 18; + this.defense = 12; + this.legSlot = 48; + this.rare = 7; + this.value = Item.buyPrice(gold: 50); + break; + case 1162: + this.width = 24; + this.height = 8; + this.accessory = true; + this.value = Item.buyPrice(gold: 75); + this.wingSlot = (sbyte) 13; + this.rare = 5; + break; + case 1163: + this.width = 14; + this.height = 28; + this.rare = 4; + this.value = 150000; + this.accessory = true; + this.balloonSlot = (sbyte) 1; + break; + case 1164: + this.width = 14; + this.height = 28; + this.rare = 8; + this.value = 150000; + this.accessory = true; + this.balloonSlot = (sbyte) 3; + break; + case 1165: + this.width = 24; + this.height = 8; + this.accessory = true; + this.value = 400000; + this.rare = 5; + this.wingSlot = (sbyte) 14; + break; + case 1166: + this.useStyle = 1; + this.useAnimation = 22; + this.knockBack = 4.5f; + this.width = 24; + this.height = 28; + this.damage = 16; + this.scale = 1.05f; + this.UseSound = SoundID.Item1; + this.rare = 3; + this.value = 9000; + this.melee = true; + break; + case 1167: + this.rare = 7; + this.width = 24; + this.height = 28; + this.accessory = true; + this.value = Item.buyPrice(gold: 40); + break; + case 1168: + this.useStyle = 1; + this.shootSpeed = 6f; + this.shoot = 196; + this.width = 18; + this.height = 20; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 20; + break; + case 1169: + this.damage = 0; + this.useStyle = 1; + this.shoot = 197; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.value = Item.sellPrice(gold: 5); + this.buffType = 50; + break; + case 1170: + this.damage = 0; + this.useStyle = 1; + this.shoot = 198; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.value = Item.sellPrice(gold: 3); + this.buffType = 51; + break; + case 1171: + this.damage = 0; + this.useStyle = 1; + this.shoot = 199; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.buffType = 52; + this.value = Item.buyPrice(2); + break; + case 1172: + this.damage = 0; + this.useStyle = 1; + this.shoot = 200; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.value = Item.sellPrice(gold: 2); + this.buffType = 53; + break; + case 1173: + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 85; + this.placeStyle = 1; + this.width = 20; + this.height = 20; + break; + case 1174: + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 85; + this.placeStyle = 2; + this.width = 20; + this.height = 20; + break; + case 1175: + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 85; + this.placeStyle = 3; + this.width = 20; + this.height = 20; + break; + case 1176: + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 85; + this.placeStyle = 4; + this.width = 20; + this.height = 20; + break; + case 1177: + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 85; + this.placeStyle = 5; + this.width = 20; + this.height = 20; + break; + case 1178: + this.useStyle = 5; + this.mana = 4; + this.autoReuse = true; + this.useAnimation = 7; + this.useTime = 7; + this.width = 24; + this.height = 18; + this.shoot = 206; + this.UseSound = SoundID.Item7; + this.damage = 48; + this.shootSpeed = 11f; + this.noMelee = true; + this.value = 300000; + this.knockBack = 4f; + this.rare = 7; + this.magic = true; + break; + case 1179: + this.shootSpeed = 5f; + this.shoot = 207; + this.damage = 10; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Bullet; + this.knockBack = 4.5f; + this.value = 50; + this.ranged = true; + this.rare = 7; + break; + case 1180: + this.damage = 0; + this.useStyle = 1; + this.shoot = 208; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.buffType = 54; + this.value = Item.sellPrice(gold: 75); + break; + case 1181: + this.damage = 0; + this.useStyle = 1; + this.shoot = 209; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.value = Item.buyPrice(gold: 45); + this.buffType = 55; + break; + case 1182: + this.damage = 0; + this.useStyle = 1; + this.shoot = 210; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.value = Item.sellPrice(gold: 2); + this.buffType = 56; + break; + case 1183: + this.damage = 0; + this.useStyle = 1; + this.shoot = 211; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 8; + this.noMelee = true; + this.value = Item.sellPrice(gold: 5, silver: 50); + this.buffType = 57; + break; + case 1184: + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.value = 13500; + this.rare = 3; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 12; + break; + case 1185: + this.useTurn = true; + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 25; + this.useTime = 25; + this.knockBack = 4.75f; + this.width = 40; + this.height = 40; + this.damage = 45; + this.scale = 1.125f; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 92000; + this.melee = true; + break; + case 1186: + this.useStyle = 5; + this.useAnimation = 27; + this.useTime = 27; + this.shootSpeed = 4.4f; + this.knockBack = 4.5f; + this.width = 40; + this.height = 40; + this.damage = 32; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.shoot = 212; + this.rare = 4; + this.value = 60000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + break; + case 1187: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 23; + this.useTime = 23; + this.width = 50; + this.height = 18; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 34; + this.shootSpeed = 9.25f; + this.noMelee = true; + this.value = 80000; + this.ranged = true; + this.rare = 4; + this.knockBack = 1.75f; + break; + case 1188: + this.useStyle = 1; + this.useTurn = true; + this.autoReuse = true; + this.useAnimation = 25; + this.useTime = 12; + this.knockBack = 5f; + this.width = 20; + this.height = 12; + this.damage = 12; + this.pick = 130; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 72000; + this.melee = true; + this.scale = 1.15f; + break; + case 1189: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 12; + this.shootSpeed = 32f; + this.knockBack = 0.0f; + this.width = 20; + this.height = 12; + this.damage = 12; + this.pick = 130; + this.UseSound = SoundID.Item23; + this.shoot = 213; + this.rare = 4; + this.value = 72000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + break; + case 1190: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 12; + this.shootSpeed = 40f; + this.knockBack = 2.9f; + this.width = 20; + this.height = 12; + this.damage = 26; + this.axe = 15; + this.UseSound = SoundID.Item23; + this.shoot = 214; + this.rare = 4; + this.value = 72000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + break; + case 1191: + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.value = Item.sellPrice(silver: 52); + this.rare = 3; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 14; + break; + case 1192: + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 25; + this.useTime = 25; + this.knockBack = 6f; + this.width = 40; + this.height = 40; + this.damage = 50; + this.scale = 1.17f; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 126500; + this.melee = true; + break; + case 1193: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 25; + this.shootSpeed = 4.5f; + this.knockBack = 5.5f; + this.width = 40; + this.height = 40; + this.damage = 36; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.shoot = 215; + this.rare = 4; + this.value = 82500; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + break; + case 1194: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 21; + this.useTime = 21; + this.width = 50; + this.height = 18; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 38; + this.shootSpeed = 9.75f; + this.noMelee = true; + this.value = 110000; + this.ranged = true; + this.rare = 4; + this.knockBack = 2f; + break; + case 1195: + this.useStyle = 1; + this.useAnimation = 25; + this.useTime = 9; + this.knockBack = 5f; + this.useTurn = true; + this.autoReuse = true; + this.width = 20; + this.height = 12; + this.damage = 17; + this.pick = 165; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 99000; + this.melee = true; + this.scale = 1.15f; + break; + case 1196: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 9; + this.shootSpeed = 32f; + this.knockBack = 0.0f; + this.width = 20; + this.height = 12; + this.damage = 17; + this.pick = 165; + this.UseSound = SoundID.Item23; + this.shoot = 216; + this.rare = 4; + this.value = 99000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + break; + case 1197: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 9; + this.shootSpeed = 40f; + this.knockBack = 3.75f; + this.width = 20; + this.height = 12; + this.damage = 31; + this.axe = 18; + this.UseSound = SoundID.Item23; + this.shoot = 217; + this.rare = 4; + this.value = 99000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + break; + case 1198: + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.value = Item.sellPrice(silver: 85); + this.rare = 3; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 16; + break; + case 1199: + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 25; + this.useTime = 25; + this.knockBack = 6f; + this.width = 40; + this.height = 40; + this.damage = 58; + this.scale = 1.2f; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 161000; + this.melee = true; + break; + case 1200: + this.useStyle = 5; + this.useAnimation = 23; + this.useTime = 23; + this.shootSpeed = 5f; + this.knockBack = 6.2f; + this.width = 40; + this.height = 40; + this.damage = 40; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.shoot = 218; + this.rare = 4; + this.value = 105000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + break; + case 1201: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 18; + this.useTime = 18; + this.width = 50; + this.height = 18; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 41; + this.shootSpeed = 10.5f; + this.noMelee = true; + this.value = 140000; + this.ranged = true; + this.rare = 4; + this.knockBack = 2.5f; + break; + case 1202: + this.useStyle = 1; + this.useAnimation = 25; + this.useTime = 7; + this.knockBack = 5f; + this.useTurn = true; + this.autoReuse = true; + this.width = 20; + this.height = 12; + this.damage = 27; + this.pick = 190; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 126000; + this.melee = true; + this.scale = 1.15f; + break; + case 1203: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 7; + this.shootSpeed = 32f; + this.knockBack = 0.0f; + this.width = 20; + this.height = 12; + this.damage = 27; + this.pick = 190; + this.UseSound = SoundID.Item23; + this.shoot = 219; + this.rare = 4; + this.value = 126000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + break; + case 1204: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 7; + this.shootSpeed = 40f; + this.knockBack = 4.6f; + this.width = 20; + this.height = 12; + this.damage = 34; + this.axe = 21; + this.UseSound = SoundID.Item23; + this.shoot = 220; + this.rare = 4; + this.value = 126000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + break; + case 1205: + this.width = 18; + this.height = 18; + this.defense = 14; + this.headSlot = 83; + this.rare = 4; + this.value = 75000; + break; + case 1206: + this.width = 18; + this.height = 18; + this.defense = 5; + this.headSlot = 84; + this.rare = 4; + this.value = 75000; + break; + case 1207: + this.width = 18; + this.height = 18; + this.defense = 3; + this.headSlot = 85; + this.rare = 4; + this.value = 75000; + break; + case 1208: + this.width = 18; + this.height = 18; + this.defense = 10; + this.bodySlot = 54; + this.rare = 4; + this.value = 60000; + break; + case 1209: + this.width = 18; + this.height = 18; + this.defense = 8; + this.legSlot = 49; + this.rare = 4; + this.value = 45000; + break; + case 1210: + this.width = 18; + this.height = 18; + this.defense = 19; + this.headSlot = 86; + this.rare = 4; + this.value = 112500; + break; + case 1211: + this.width = 18; + this.height = 18; + this.defense = 7; + this.headSlot = 87; + this.rare = 4; + this.value = 112500; + break; + case 1212: + this.width = 18; + this.height = 18; + this.defense = 4; + this.headSlot = 88; + this.rare = 4; + this.value = 112500; + break; + case 1213: + this.width = 18; + this.height = 18; + this.defense = 13; + this.bodySlot = 55; + this.rare = 4; + this.value = 90000; + break; + case 1214: + this.width = 18; + this.height = 18; + this.defense = 10; + this.legSlot = 50; + this.rare = 4; + this.value = 67500; + break; + case 1215: + this.width = 18; + this.height = 18; + this.defense = 23; + this.headSlot = 89; + this.rare = 4; + this.value = 150000; + break; + case 1216: + this.width = 18; + this.height = 18; + this.defense = 8; + this.headSlot = 90; + this.rare = 4; + this.value = 150000; + break; + case 1217: + this.width = 18; + this.height = 18; + this.defense = 4; + this.headSlot = 91; + this.rare = 4; + this.value = 150000; + break; + case 1218: + this.width = 18; + this.height = 18; + this.defense = 15; + this.bodySlot = 56; + this.rare = 4; + this.value = 120000; + break; + case 1219: + this.width = 18; + this.height = 18; + this.defense = 11; + this.legSlot = 51; + this.rare = 4; + this.value = 90000; + break; + case 1220: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 134; + this.placeStyle = 1; + this.width = 28; + this.height = 14; + this.value = 25000; + this.rare = 3; + break; + case 1221: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 133; + this.placeStyle = 1; + this.width = 44; + this.height = 30; + this.value = 50000; + this.rare = 3; + break; + case 1222: + this.useTurn = true; + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 35; + this.useTime = 12; + this.knockBack = 5.5f; + this.width = 20; + this.height = 12; + this.damage = 36; + this.axe = 15; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 72000; + this.melee = true; + this.scale = 1.1f; + break; + case 1223: + this.useTurn = true; + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 35; + this.useTime = 9; + this.knockBack = 6.5f; + this.width = 20; + this.height = 12; + this.damage = 41; + this.axe = 18; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 99000; + this.melee = true; + this.scale = 1.1f; + break; + case 1224: + this.useTurn = true; + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 35; + this.useTime = 7; + this.knockBack = 7.5f; + this.width = 20; + this.height = 12; + this.damage = 44; + this.axe = 21; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 126000; + this.melee = true; + this.scale = 1.1f; + break; + case 1225: + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.value = Item.sellPrice(silver: 40); + this.rare = 4; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 18; + break; + case 1226: + this.useStyle = 1; + this.useAnimation = 26; + this.useTime = 60; + this.shoot = 229; + this.shootSpeed = 8f; + this.knockBack = 6f; + this.width = 40; + this.height = 40; + this.damage = 80; + this.UseSound = SoundID.Item1; + this.rare = 7; + this.value = 276000; + this.scale = 1.25f; + this.melee = true; + break; + case 1227: + this.autoReuse = true; + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 16; + this.useTime = 42; + this.shoot = 228; + this.shootSpeed = 8f; + this.knockBack = 4f; + this.width = 40; + this.height = 40; + this.damage = 48; + this.UseSound = SoundID.Item1; + this.rare = 7; + this.value = 276000; + this.melee = true; + break; + case 1228: + this.useStyle = 5; + this.useAnimation = 23; + this.useTime = 23; + this.shootSpeed = 5f; + this.knockBack = 6.2f; + this.width = 40; + this.height = 40; + this.damage = 49; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.shoot = 222; + this.rare = 7; + this.value = 180000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + break; + case 1229: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 19; + this.useTime = 19; + this.width = 50; + this.height = 18; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 34; + this.shootSpeed = 11.5f; + this.noMelee = true; + this.value = 240000; + this.ranged = true; + this.rare = 7; + this.knockBack = 2.75f; + break; + case 1230: + this.useStyle = 1; + this.useAnimation = 25; + this.useTime = 7; + this.knockBack = 5f; + this.useTurn = true; + this.autoReuse = true; + this.width = 20; + this.height = 12; + this.damage = 40; + this.pick = 200; + this.UseSound = SoundID.Item1; + this.rare = 7; + this.value = 216000; + this.melee = true; + this.scale = 1.15f; + ++this.tileBoost; + break; + case 1231: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 7; + this.shootSpeed = 40f; + this.knockBack = 1f; + this.width = 20; + this.height = 12; + this.damage = 35; + this.pick = 200; + this.UseSound = SoundID.Item23; + this.shoot = 223; + this.rare = 7; + this.value = 216000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + ++this.tileBoost; + break; + case 1232: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 7; + this.shootSpeed = 46f; + this.knockBack = 4.6f; + this.width = 20; + this.height = 12; + this.damage = 50; + this.axe = 23; + this.UseSound = SoundID.Item23; + this.shoot = 224; + this.rare = 7; + this.value = 216000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + ++this.tileBoost; + break; + case 1233: + this.useTurn = true; + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 30; + this.useTime = 7; + this.knockBack = 7f; + this.width = 20; + this.height = 12; + this.damage = 70; + this.axe = 23; + this.UseSound = SoundID.Item1; + this.rare = 7; + this.value = 216000; + this.melee = true; + this.scale = 1.15f; + ++this.tileBoost; + break; + case 1234: + this.useTurn = true; + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 35; + this.useTime = 14; + this.hammer = 90; + this.width = 24; + this.height = 28; + this.damage = 80; + this.knockBack = 8f; + this.scale = 1.25f; + this.UseSound = SoundID.Item1; + this.rare = 7; + this.value = 216000; + this.melee = true; + ++this.tileBoost; + break; + case 1235: + this.shootSpeed = 4.5f; + this.shoot = 225; + this.damage = 16; + this.width = 10; + this.height = 28; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Arrow; + this.knockBack = 3.5f; + this.value = 100; + this.ranged = true; + this.rare = 7; + break; + case 1236: + this.noUseGraphic = true; + this.damage = 0; + this.knockBack = 7f; + this.useStyle = 5; + this.shootSpeed = 10f; + this.shoot = 230; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 1; + this.noMelee = true; + this.value = 20000; + break; + case 1237: + this.noUseGraphic = true; + this.damage = 0; + this.knockBack = 7f; + this.useStyle = 5; + this.shootSpeed = 10.5f; + this.shoot = 231; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 1; + this.noMelee = true; + this.value = 20000; + break; + case 1238: + this.noUseGraphic = true; + this.damage = 0; + this.knockBack = 7f; + this.useStyle = 5; + this.shootSpeed = 11f; + this.shoot = 232; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 1; + this.noMelee = true; + this.value = 20000; + break; + case 1239: + this.noUseGraphic = true; + this.damage = 0; + this.knockBack = 7f; + this.useStyle = 5; + this.shootSpeed = 11.5f; + this.shoot = 233; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 1; + this.noMelee = true; + this.value = 20000; + break; + case 1240: + this.noUseGraphic = true; + this.damage = 0; + this.knockBack = 7f; + this.useStyle = 5; + this.shootSpeed = 12f; + this.shoot = 234; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 1; + this.noMelee = true; + this.value = 20000; + break; + case 1241: + this.noUseGraphic = true; + this.damage = 0; + this.knockBack = 7f; + this.useStyle = 5; + this.shootSpeed = 12.5f; + this.shoot = 235; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 1; + this.noMelee = true; + this.value = 20000; + break; + case 1242: + this.damage = 0; + this.useStyle = 1; + this.shoot = 236; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.value = Item.sellPrice(gold: 7, silver: 50); + this.buffType = 61; + break; + case 1243: + this.width = 28; + this.height = 20; + this.headSlot = 92; + this.rare = 1; + this.vanity = true; + break; + case 1244: + this.mana = 10; + this.damage = 36; + this.useStyle = 1; + this.shootSpeed = 16f; + this.shoot = 237; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item66; + this.useAnimation = 22; + this.useTime = 22; + this.rare = 6; + this.noMelee = true; + this.knockBack = 0.0f; + this.value = Item.sellPrice(gold: 3, silver: 50); + this.magic = true; + break; + case 1245: + this.flame = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.holdStyle = 1; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 4; + this.placeStyle = 10; + this.width = 10; + this.height = 12; + this.value = 60; + this.noWet = true; + break; + case 1246: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 234; + this.width = 12; + this.height = 12; + this.ammo = AmmoID.Sand; + this.notAmmo = true; + break; + case 1247: + this.width = 20; + this.height = 24; + this.value = 150000; + this.accessory = true; + this.rare = 4; + this.backSlot = (sbyte) 1; + break; + case 1248: + this.width = 24; + this.height = 24; + this.accessory = true; + this.value = Item.buyPrice(gold: 25); + this.rare = 7; + break; + case 1249: + this.width = 14; + this.height = 28; + this.rare = 2; + this.value = Item.sellPrice(gold: 2); + this.accessory = true; + this.balloonSlot = (sbyte) 7; + break; + case 1250: + this.width = 20; + this.height = 22; + this.rare = 4; + this.value = Item.buyPrice(gold: 15); + this.accessory = true; + this.balloonSlot = (sbyte) 2; + break; + case 1251: + this.width = 20; + this.height = 22; + this.rare = 4; + this.value = Item.buyPrice(gold: 15); + this.accessory = true; + this.balloonSlot = (sbyte) 9; + break; + case 1252: + this.width = 20; + this.height = 22; + this.rare = 4; + this.value = Item.buyPrice(gold: 15); + this.accessory = true; + this.balloonSlot = (sbyte) 10; + break; + case 1253: + this.width = 20; + this.height = 24; + this.value = 225000; + this.accessory = true; + this.rare = 5; + break; + case 1254: + this.useStyle = 5; + this.useAnimation = 36; + this.useTime = 36; + this.crit += 25; + this.width = 44; + this.height = 14; + this.shoot = 10; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item40; + this.damage = 185; + this.shootSpeed = 16f; + this.noMelee = true; + this.value = Item.buyPrice(gold: 40); + this.knockBack = 8f; + this.rare = 8; + this.ranged = true; + break; + case 1255: + this.autoReuse = false; + this.useStyle = 5; + this.useAnimation = 8; + this.useTime = 8; + this.width = 24; + this.height = 22; + this.shoot = 14; + this.knockBack = 5.5f; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item41; + this.damage = 50; + this.shootSpeed = 13.5f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 5); + this.scale = 0.85f; + this.rare = 7; + this.ranged = true; + break; + case 1256: + this.mana = 10; + this.damage = 12; + this.useStyle = 1; + this.shootSpeed = 12f; + this.shoot = 243; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item8; + this.useAnimation = 24; + this.useTime = 24; + this.rare = 1; + this.noMelee = true; + this.knockBack = 0.0f; + this.value = this.shadowOrbPrice; + this.magic = true; + break; + case 1257: + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.rare = 1; + this.value = Item.sellPrice(silver: 39); + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 19; + break; + case 1258: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 22; + this.useTime = 22; + this.width = 50; + this.height = 18; + this.shoot = 246; + this.useAmmo = AmmoID.StyngerBolt; + this.UseSound = SoundID.Item11; + this.damage = 45; + this.knockBack = 5f; + this.shootSpeed = 9f; + this.noMelee = true; + this.value = Item.buyPrice(gold: 35); + this.rare = 7; + this.ranged = true; + break; + case 1259: + this.noMelee = true; + this.useStyle = 5; + this.useAnimation = 40; + this.useTime = 40; + this.knockBack = 6.5f; + this.width = 30; + this.height = 10; + this.damage = 65; + this.scale = 1.1f; + this.noUseGraphic = true; + this.shoot = 247; + this.shootSpeed = 15.9f; + this.UseSound = SoundID.Item1; + this.rare = 7; + this.value = Item.sellPrice(gold: 6); + this.melee = true; + this.channel = true; + break; + case 1260: + this.useStyle = 5; + this.useAnimation = 40; + this.useTime = 40; + this.width = 50; + this.height = 18; + this.shoot = 250; + this.UseSound = SoundID.Item67; + this.damage = 45; + this.knockBack = 2.5f; + this.shootSpeed = 16f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 20); + this.rare = 8; + this.magic = true; + this.mana = 20; + break; + case 1261: + this.shootSpeed = 2f; + this.shoot = 246; + this.damage = 17; + this.width = 10; + this.height = 28; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.StyngerBolt; + this.knockBack = 1f; + this.value = 75; + this.rare = 5; + this.ranged = true; + break; + case 1262: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 7; + this.shootSpeed = 46f; + this.knockBack = 5.2f; + this.width = 20; + this.height = 12; + this.damage = 45; + this.hammer = 90; + this.UseSound = SoundID.Item23; + this.shoot = 252; + this.rare = 7; + this.value = 216000; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + ++this.tileBoost; + break; + case 1263: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 235; + this.width = 12; + this.height = 12; + this.value = Item.buyPrice(gold: 2, silver: 50); + this.mech = true; + break; + case 1264: + this.mana = 11; + this.damage = 60; + this.useStyle = 1; + this.shootSpeed = 7f; + this.shoot = 253; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item20; + this.useAnimation = 12; + this.useTime = 12; + this.rare = 5; + this.noMelee = true; + this.knockBack = 6.5f; + this.value = Item.sellPrice(gold: 5); + this.magic = true; + break; + case 1265: + this.autoReuse = true; + this.useStyle = 5; + this.useAnimation = 9; + this.useTime = 9; + this.width = 24; + this.height = 22; + this.shoot = 14; + this.knockBack = 3.5f; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item11; + this.damage = 30; + this.shootSpeed = 13f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 7); + this.scale = 0.75f; + this.rare = 7; + this.ranged = true; + break; + case 1266: + this.rare = 8; + this.mana = 14; + this.UseSound = SoundID.Item20; + this.noMelee = true; + this.useStyle = 5; + this.damage = 48; + this.knockBack = 6f; + this.useAnimation = 20; + this.useTime = 20; + this.width = 24; + this.height = 28; + this.shoot = 254; + this.shootSpeed = 1.2f; + this.magic = true; + this.value = 500000; + break; + case 1267: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 88; + this.width = 12; + this.height = 12; + this.value = Item.sellPrice(silver: 5); + break; + case 1268: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 89; + this.width = 12; + this.height = 12; + this.value = Item.sellPrice(silver: 5); + break; + case 1269: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 90; + this.width = 12; + this.height = 12; + this.value = Item.sellPrice(silver: 5); + break; + case 1270: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 91; + this.width = 12; + this.height = 12; + this.value = Item.sellPrice(silver: 5); + break; + case 1271: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 92; + this.width = 12; + this.height = 12; + this.value = Item.sellPrice(silver: 5); + break; + case 1272: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 93; + this.width = 12; + this.height = 12; + this.value = Item.sellPrice(silver: 5); + break; + case 1273: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 25; + this.width = 30; + this.height = 10; + this.noUseGraphic = true; + this.shoot = 256; + this.shootSpeed = 15f; + this.UseSound = SoundID.Item1; + this.rare = 2; + this.value = 45000; + break; + case 1274: + this.width = 28; + this.height = 20; + this.headSlot = 93; + this.rare = 1; + this.vanity = true; + break; + case 1275: + this.width = 28; + this.height = 20; + this.headSlot = 94; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 1); + break; + case 1276: + this.width = 28; + this.height = 20; + this.headSlot = 95; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 1); + break; + case 1277: + this.width = 28; + this.height = 20; + this.headSlot = 96; + this.rare = 1; + this.vanity = true; + break; + case 1278: + this.width = 28; + this.height = 20; + this.headSlot = 97; + this.rare = 1; + this.vanity = true; + break; + case 1279: + this.width = 28; + this.height = 20; + this.bodySlot = 57; + this.rare = 1; + this.vanity = true; + break; + case 1280: + this.width = 28; + this.height = 20; + this.legSlot = 52; + this.rare = 1; + this.vanity = true; + break; + case 1281: + this.width = 28; + this.height = 20; + this.headSlot = 98; + this.rare = 1; + this.value = Item.sellPrice(silver: 75); + this.vanity = true; + break; + case 1282: + this.width = 18; + this.height = 14; + this.bodySlot = 58; + this.value = Item.sellPrice(silver: 50); + break; + case 1283: + this.width = 18; + this.height = 14; + this.bodySlot = 59; + this.defense = 1; + this.value = Item.sellPrice(silver: 50) * 2; + break; + case 1284: + this.width = 18; + this.height = 14; + this.bodySlot = 60; + this.defense = 1; + this.value = Item.sellPrice(silver: 50) * 3; + this.rare = 1; + break; + case 1285: + this.width = 18; + this.height = 14; + this.bodySlot = 61; + this.defense = 2; + this.value = Item.sellPrice(silver: 50) * 4; + this.rare = 1; + break; + case 1286: + this.width = 18; + this.height = 14; + this.bodySlot = 62; + this.defense = 2; + this.value = Item.sellPrice(silver: 50) * 5; + this.rare = 1; + break; + case 1287: + this.defense = 3; + this.width = 18; + this.height = 14; + this.bodySlot = 63; + this.value = Item.sellPrice(silver: 50) * 6; + this.rare = 2; + break; + case 1288: + this.width = 28; + this.height = 20; + this.bodySlot = 64; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 25); + break; + case 1289: + this.width = 28; + this.height = 20; + this.legSlot = 53; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 25); + break; + case 1290: + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 1; + this.value = this.shadowOrbPrice; + this.neckSlot = (sbyte) 3; + break; + case 1291: + this.maxStack = 99; + this.consumable = true; + this.width = 18; + this.height = 18; + this.useStyle = 4; + this.useTime = 30; + this.UseSound = SoundID.Item4; + this.useAnimation = 30; + this.rare = 7; + this.value = Item.sellPrice(gold: 2); + break; + case 1292: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 237; + this.width = 26; + this.height = 20; + this.value = 300; + break; + case 1293: + this.maxStack = 99; + this.consumable = true; + this.width = 22; + this.height = 10; + this.value = Item.sellPrice(gold: 1); + break; + case 1294: + this.useStyle = 1; + this.useAnimation = 16; + this.useTime = 6; + this.knockBack = 5.5f; + this.useTurn = true; + this.autoReuse = true; + this.width = 20; + this.height = 12; + this.damage = 34; + this.pick = 210; + this.axe = 25; + this.UseSound = SoundID.Item1; + this.rare = 7; + this.value = 216000; + this.melee = true; + this.scale = 1.15f; + ++this.tileBoost; + break; + case 1295: + this.mana = 8; + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 10; + this.useTime = 10; + this.width = 24; + this.height = 18; + this.shoot = 260; + this.UseSound = SoundID.Item12; + this.damage = 80; + this.shootSpeed = 15f; + this.noMelee = true; + this.value = 350000; + this.knockBack = 3f; + this.rare = 7; + this.magic = true; + break; + case 1296: + this.mana = 18; + this.damage = 125; + this.useStyle = 5; + this.crit = 20; + this.shootSpeed = 12f; + this.shoot = 261; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item69; + this.useAnimation = this.useTime = 24; + this.rare = 7; + this.noMelee = true; + this.knockBack = 7.5f; + this.value = Item.buyPrice(gold: 35); + this.magic = true; + break; + case 1297: + this.autoReuse = true; + this.useStyle = 5; + this.useAnimation = 24; + this.useTime = 24; + this.knockBack = 12f; + this.width = 30; + this.height = 10; + this.damage = 90; + this.scale = 0.9f; + this.shoot = 262; + this.shootSpeed = 14f; + this.UseSound = SoundID.Item10; + this.rare = 7; + this.value = Item.buyPrice(gold: 35); + this.melee = true; + this.noMelee = true; + break; + case 1298: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 17; + this.width = 26; + this.height = 22; + this.value = 500; + break; + case 1299: + this.width = 14; + this.height = 28; + this.rare = 4; + this.value = 150000; + break; + case 1300: + this.width = 14; + this.height = 28; + this.rare = 4; + this.value = 150000; + this.accessory = true; + break; + case 1301: + this.width = 24; + this.height = 24; + this.accessory = true; + this.value = 300000; + this.rare = 7; + break; + case 1302: + this.shootSpeed = 4f; + this.shoot = 242; + this.damage = 10; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Bullet; + this.knockBack = 4f; + this.value = 40; + this.ranged = true; + this.rare = 3; + break; + case 1303: + this.width = 24; + this.height = 24; + this.accessory = true; + this.value = Item.sellPrice(gold: 1); + this.rare = 2; + this.neckSlot = (sbyte) 1; + break; + case 1304: + this.useStyle = 1; + this.useTurn = false; + this.useAnimation = 23; + this.useTime = 23; + this.width = 24; + this.height = 28; + this.damage = 12; + this.knockBack = 4.25f; + this.UseSound = SoundID.Item1; + this.scale = 1f; + this.value = 2000; + this.melee = true; + break; + case 1305: + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 23; + this.knockBack = 7.25f; + this.useTime = 7; + this.width = 24; + this.height = 28; + this.damage = 72; + this.axe = 35; + this.hammer = 100; + this.tileBoost = 1; + this.scale = 1.15f; + this.rare = 8; + this.value = Item.sellPrice(gold: 10); + this.melee = true; + break; + case 1306: + this.useStyle = 1; + this.useAnimation = 25; + this.useTime = 25; + this.knockBack = 5.5f; + this.width = 24; + this.height = 28; + this.damage = 42; + this.scale = 1.15f; + this.UseSound = SoundID.Item1; + this.rare = 5; + this.shoot = 263; + this.shootSpeed = 8f; + this.value = 250000; + this.melee = true; + break; + case 1307: + this.accessory = true; + this.width = 14; + this.height = 26; + this.value = 1000; + this.rare = 1; + break; + case 1308: + this.mana = 22; + this.UseSound = SoundID.Item43; + this.useStyle = 5; + this.damage = 43; + this.useAnimation = 36; + this.useTime = 36; + this.width = 40; + this.height = 40; + this.shoot = 265; + this.shootSpeed = 13.5f; + this.knockBack = 5.6f; + this.magic = true; + this.autoReuse = true; + this.rare = 6; + this.noMelee = true; + this.value = Item.sellPrice(gold: 4); + break; + case 1309: + this.mana = 10; + this.damage = 8; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 266; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item44; + this.useAnimation = 28; + this.useTime = 28; + this.rare = 4; + this.noMelee = true; + this.knockBack = 2f; + this.buffType = 64; + this.value = 100000; + this.summon = true; + break; + case 1310: + this.shoot = 267; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.ammo = AmmoID.Dart; + this.damage = 10; + this.knockBack = 2f; + this.shootSpeed = 2f; + this.ranged = true; + this.rare = 2; + this.consumable = true; + break; + case 1311: + this.damage = 0; + this.useStyle = 1; + this.shoot = 268; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 6; + this.noMelee = true; + this.value = Item.sellPrice(gold: 3); + this.buffType = 65; + break; + case 1312: + this.damage = 0; + this.useStyle = 1; + this.shoot = 269; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 6; + this.noMelee = true; + this.value = Item.sellPrice(gold: 2, silver: 50); + this.buffType = 66; + break; + case 1313: + this.autoReuse = true; + this.rare = 2; + this.mana = 18; + this.UseSound = SoundID.Item8; + this.noMelee = true; + this.useStyle = 5; + this.damage = 29; + this.useAnimation = 26; + this.useTime = 26; + this.width = 24; + this.height = 28; + this.shoot = 837; + this.scale = 0.9f; + this.shootSpeed = 3.5f; + this.knockBack = 3.5f; + this.magic = true; + this.value = Item.sellPrice(gold: 1, silver: 50); + break; + case 1314: + this.autoReuse = true; + this.useStyle = 5; + this.useAnimation = 28; + this.useTime = 28; + this.knockBack = 6.5f; + this.width = 30; + this.height = 10; + this.damage = 40; + this.scale = 0.9f; + this.shoot = 271; + this.shootSpeed = 15f; + this.UseSound = SoundID.Item10; + this.rare = 4; + this.value = Item.sellPrice(gold: 3, silver: 50); + this.melee = true; + this.noMelee = true; + break; + case 1315: + this.useStyle = 4; + this.consumable = true; + this.useAnimation = 45; + this.useTime = 45; + this.width = 28; + this.height = 28; + this.maxStack = 20; + break; + case 1316: + this.width = 18; + this.height = 18; + this.defense = 21; + this.headSlot = 99; + this.rare = 8; + this.value = 300000; + break; + case 1317: + this.width = 18; + this.height = 18; + this.defense = 27; + this.bodySlot = 65; + this.rare = 8; + this.value = 240000; + break; + case 1318: + this.width = 18; + this.height = 18; + this.defense = 17; + this.legSlot = 54; + this.rare = 8; + this.value = 180000; + break; + case 1319: + this.autoReuse = true; + this.useStyle = 5; + this.useAnimation = 19; + this.useTime = 19; + this.width = 44; + this.height = 14; + this.shoot = 166; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item11; + this.damage = 10; + this.shootSpeed = 11f; + this.noMelee = true; + this.value = 100000; + this.knockBack = 1f; + this.rare = 1; + this.ranged = true; + this.useAmmo = AmmoID.Snowball; + this.shoot = 166; + break; + case 1320: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 19; + this.useTime = 11; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.damage = 8; + this.pick = 55; + this.UseSound = SoundID.Item1; + this.knockBack = 3f; + this.rare = 1; + this.value = Item.buyPrice(gold: 1, silver: 50); + this.scale = 1.15f; + this.melee = true; + break; + case 1321: + this.width = 24; + this.height = 28; + this.accessory = true; + this.value = Item.sellPrice(gold: 5); + this.rare = 4; + this.backSlot = (sbyte) 7; + break; + case 1322: + this.width = 24; + this.height = 28; + this.accessory = true; + this.value = Item.sellPrice(gold: 2); + this.rare = 3; + break; + case 1323: + this.width = 24; + this.height = 28; + this.accessory = true; + this.value = Item.sellPrice(gold: 2); + this.rare = 3; + this.faceSlot = (sbyte) 6; + break; + case 1324: + this.autoReuse = true; + this.noMelee = true; + this.useStyle = 1; + this.shootSpeed = 14f; + this.shoot = 272; + this.damage = 55; + this.knockBack = 6.5f; + this.width = 14; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 14; + this.useTime = 14; + this.noUseGraphic = true; + this.rare = 5; + this.value = 75000; + this.melee = true; + this.maxStack = 10; + break; + case 1325: + this.autoReuse = false; + this.useStyle = 5; + this.useAnimation = 20; + this.useTime = 20; + this.knockBack = 3.5f; + this.width = 30; + this.height = 10; + this.damage = 12; + this.shoot = 273; + this.shootSpeed = 12f; + this.UseSound = SoundID.Item1; + this.rare = 1; + this.value = Item.sellPrice(silver: 25); + this.melee = true; + this.noUseGraphic = true; + break; + case 1326: + this.autoReuse = false; + this.useStyle = 1; + this.useAnimation = 20; + this.useTime = 20; + this.width = 20; + this.height = 20; + this.UseSound = SoundID.Item8; + this.rare = 7; + this.value = Item.sellPrice(gold: 10); + break; + case 1327: + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 25; + this.useTime = 25; + this.knockBack = 7f; + this.width = 24; + this.height = 28; + this.damage = 57; + this.scale = 1.15f; + this.UseSound = SoundID.Item71; + this.rare = 6; + this.shoot = 274; + this.shootSpeed = 9f; + this.value = this.eclipsePrice; + this.melee = true; + break; + case 1328: + this.width = 14; + this.height = 18; + this.maxStack = 99; + this.rare = 7; + this.value = 5000; + break; + case 1329: + this.width = 14; + this.height = 18; + this.maxStack = 999; + this.rare = 1; + this.value = 750; + break; + case 1330: + this.width = 18; + this.height = 20; + this.maxStack = 99; + this.value = 12; + break; + case 1331: + this.useStyle = 4; + this.consumable = true; + this.useAnimation = 45; + this.useTime = 45; + this.width = 28; + this.height = 28; + this.maxStack = 20; + this.rare = 1; + break; + case 1332: + this.width = 12; + this.height = 14; + this.maxStack = 99; + this.value = 4500; + this.rare = 3; + break; + case 1333: + this.flame = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.holdStyle = 1; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 4; + this.placeStyle = 11; + this.width = 10; + this.height = 12; + this.value = 160; + this.rare = 1; + break; + case 1334: + this.shootSpeed = 4.25f; + this.shoot = 278; + this.damage = 16; + this.width = 10; + this.height = 28; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Arrow; + this.knockBack = 3f; + this.value = 40; + this.ranged = true; + this.rare = 3; + break; + case 1335: + this.shootSpeed = 5.25f; + this.shoot = 279; + this.damage = 13; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Bullet; + this.knockBack = 4f; + this.value = 30; + this.ranged = true; + this.rare = 3; + break; + case 1336: + this.mana = 7; + this.autoReuse = true; + this.useStyle = 5; + this.useAnimation = 18; + this.useTime = 6; + this.knockBack = 4f; + this.width = 38; + this.height = 10; + this.damage = 21; + this.shoot = 280; + this.shootSpeed = 10f; + this.UseSound = SoundID.Item13; + this.rare = 4; + this.value = Item.sellPrice(gold: 4); + this.magic = true; + this.noMelee = true; + break; + case 1337: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 209; + this.placeStyle = 1; + this.width = 12; + this.height = 12; + this.value = Item.buyPrice(gold: 50); + break; + case 1338: + this.noUseGraphic = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 20; + this.useTime = 20; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.damage = 350; + this.noMelee = true; + this.value = Item.buyPrice(silver: 35); + this.makeNPC = (short) 614; + break; + case 1339: + this.width = 12; + this.height = 20; + this.maxStack = 99; + this.value = Item.buyPrice(silver: 15); + break; + case 1340: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 71; + this.buffTime = 72000; + this.value = Item.sellPrice(silver: 5); + this.rare = 4; + break; + case 1341: + this.shootSpeed = 4.3f; + this.shoot = 282; + this.damage = 19; + this.width = 10; + this.height = 28; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Arrow; + this.knockBack = 4.2f; + this.value = 90; + this.ranged = true; + this.rare = 3; + break; + case 1342: + this.shootSpeed = 5.3f; + this.shoot = 283; + this.damage = 15; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Bullet; + this.knockBack = 4.1f; + this.value = 40; + this.ranged = true; + this.rare = 3; + break; + case 1343: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 7; + this.value = 300000; + this.handOffSlot = (sbyte) 1; + this.handOnSlot = (sbyte) 6; + break; + case 1344: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 272; + this.width = 12; + this.height = 12; + this.value = Item.buyPrice(silver: 7); + break; + case 1345: + this.width = 12; + this.height = 20; + this.maxStack = 99; + this.value = Item.buyPrice(silver: 2); + this.noMelee = true; + this.useStyle = 1; + this.useAnimation = this.useTime = 20; + this.autoReuse = true; + this.consumable = true; + break; + case 1346: + this.width = 12; + this.height = 20; + this.maxStack = 99; + this.value = Item.buyPrice(silver: 15); + break; + case 1347: + this.width = 12; + this.height = 20; + this.maxStack = 99; + this.value = Item.buyPrice(silver: 12); + break; + case 1348: + this.width = 12; + this.height = 20; + this.maxStack = 99; + this.value = Item.buyPrice(silver: 17); + break; + case 1349: + this.shootSpeed = 5.1f; + this.shoot = 284; + this.damage = 10; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Bullet; + this.knockBack = 5f; + this.value = 10; + this.ranged = true; + this.rare = 3; + break; + case 1350: + this.shootSpeed = 4.6f; + this.shoot = 285; + this.damage = 15; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Bullet; + this.knockBack = 3.6f; + this.value = 40; + this.ranged = true; + this.rare = 3; + break; + case 1351: + this.shootSpeed = 4.7f; + this.shoot = 286; + this.damage = 10; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Bullet; + this.knockBack = 6.6f; + this.value = 40; + this.ranged = true; + this.rare = 3; + break; + case 1352: + this.shootSpeed = 4.6f; + this.shoot = 287; + this.damage = 10; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Bullet; + this.knockBack = 3.6f; + this.value = 40; + this.ranged = true; + this.rare = 3; + break; + case 1353: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 73; + this.buffTime = 72000; + this.value = Item.sellPrice(silver: 5); + this.rare = 4; + break; + case 1354: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 74; + this.buffTime = 72000; + this.value = Item.sellPrice(silver: 5); + this.rare = 4; + break; + case 1355: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 75; + this.buffTime = 72000; + this.value = Item.sellPrice(silver: 5); + this.rare = 4; + break; + case 1356: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 76; + this.buffTime = 72000; + this.value = Item.sellPrice(silver: 5); + this.rare = 4; + break; + case 1357: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 77; + this.buffTime = 72000; + this.value = Item.sellPrice(silver: 5); + this.rare = 4; + break; + case 1358: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 78; + this.buffTime = 72000; + this.value = Item.sellPrice(silver: 3); + this.rare = 4; + break; + case 1359: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 79; + this.buffTime = 72000; + this.value = Item.sellPrice(silver: 5); + this.rare = 4; + break; + case 1360: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.placeStyle = 0; + this.rare = 1; + break; + case 1361: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.placeStyle = 1; + this.rare = 1; + break; + case 1362: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.placeStyle = 2; + this.rare = 1; + break; + case 1363: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.placeStyle = 3; + this.rare = 1; + break; + case 1364: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.placeStyle = 4; + this.rare = 1; + break; + case 1365: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.placeStyle = 5; + this.rare = 1; + break; + case 1366: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.placeStyle = 6; + this.rare = 1; + break; + case 1367: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.placeStyle = 7; + this.rare = 1; + break; + case 1368: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.placeStyle = 8; + this.rare = 1; + break; + case 1369: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.placeStyle = 9; + this.rare = 1; + break; + case 1370: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.placeStyle = 10; + this.rare = 1; + break; + case 1371: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.placeStyle = 11; + this.rare = 1; + break; + case 1372: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 12; + break; + case 1373: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 13; + break; + case 1374: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 14; + break; + case 1375: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 15; + break; + case 1376: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.placeStyle = 16; + break; + case 1377: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.placeStyle = 17; + break; + case 1378: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 100; + this.width = 12; + this.height = 12; + break; + case 1379: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 101; + this.width = 12; + this.height = 12; + break; + case 1380: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 102; + this.width = 12; + this.height = 12; + break; + case 1381: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 103; + this.width = 12; + this.height = 12; + break; + case 1382: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 104; + this.width = 12; + this.height = 12; + break; + case 1383: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 105; + this.width = 12; + this.height = 12; + break; + case 1384: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 6; + this.width = 8; + this.height = 10; + break; + case 1385: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 7; + this.width = 8; + this.height = 10; + break; + case 1386: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 8; + this.width = 8; + this.height = 10; + break; + case 1387: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 9; + this.width = 8; + this.height = 10; + break; + case 1388: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 10; + this.width = 8; + this.height = 10; + break; + case 1389: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 11; + this.width = 8; + this.height = 10; + break; + case 1390: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.value = Item.sellPrice(copper: 30); + this.placeStyle = 1; + break; + case 1391: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.value = Item.sellPrice(copper: 30); + this.placeStyle = 2; + break; + case 1392: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.value = Item.sellPrice(copper: 30); + this.placeStyle = 3; + break; + case 1393: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.value = Item.sellPrice(copper: 30); + this.placeStyle = 4; + break; + case 1394: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.value = Item.sellPrice(copper: 30); + this.placeStyle = 5; + break; + case 1395: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.value = Item.sellPrice(copper: 30); + this.placeStyle = 6; + break; + case 1396: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 13; + this.width = 12; + this.height = 30; + this.value = 150; + break; + case 1397: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 10; + this.width = 26; + this.height = 20; + this.value = 300; + break; + case 1398: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 11; + this.width = 28; + this.height = 14; + this.value = 150; + break; + case 1399: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 14; + this.width = 12; + this.height = 30; + this.value = 150; + break; + case 1400: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 11; + this.width = 26; + this.height = 20; + this.value = 300; + break; + case 1401: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 12; + this.width = 28; + this.height = 14; + this.value = 150; + break; + case 1402: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 15; + this.width = 12; + this.height = 30; + this.value = 150; + break; + case 1403: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 12; + this.width = 26; + this.height = 20; + this.value = 300; + break; + case 1404: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 13; + this.width = 28; + this.height = 14; + this.value = 150; + break; + case 1405: + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 33; + this.width = 8; + this.height = 18; + this.value = Item.sellPrice(copper: 60); + this.placeStyle = 1; + break; + case 1406: + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 33; + this.width = 8; + this.height = 18; + this.value = Item.sellPrice(copper: 60); + this.placeStyle = 2; + break; + case 1407: + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 33; + this.width = 8; + this.height = 18; + this.value = Item.sellPrice(copper: 60); + this.placeStyle = 3; + break; + case 1408: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 46; + break; + case 1409: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 47; + break; + case 1410: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 48; + break; + case 1411: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 16; + this.width = 14; + this.height = 28; + this.value = 200; + break; + case 1412: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 17; + this.width = 14; + this.height = 28; + this.value = 200; + break; + case 1413: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 18; + this.width = 14; + this.height = 28; + this.value = 200; + break; + case 1414: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 1; + break; + case 1415: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 2; + break; + case 1416: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 3; + break; + case 1417: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 241; + this.placeStyle = 0; + this.width = 30; + this.height = 30; + break; + case 1418: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 12; + this.width = 8; + this.height = 10; + break; + case 1419: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 18; + break; + case 1420: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 19; + break; + case 1421: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 0; + break; + case 1422: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 1; + break; + case 1423: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 2; + break; + case 1424: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 3; + break; + case 1425: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 4; + break; + case 1426: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 5; + break; + case 1427: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 20; + break; + case 1428: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 21; + break; + case 1429: + this.width = 18; + this.height = 18; + this.headSlot = 100; + this.vanity = true; + this.value = Item.buyPrice(gold: 1); + break; + case 1430: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 243; + this.width = 26; + this.height = 20; + this.value = Item.buyPrice(gold: 7); + this.rare = 2; + break; + case 1431: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.value = Item.sellPrice(silver: 5); + this.placeStyle = 7; + break; + case 1432: + this.width = 12; + this.height = 20; + this.maxStack = 999; + this.value = Item.buyPrice(copper: 5); + break; + case 1433: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 6; + break; + case 1434: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 7; + break; + case 1435: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 8; + break; + case 1436: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 9; + break; + case 1437: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 10; + break; + case 1438: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 11; + break; + case 1439: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 12; + break; + case 1440: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 22; + break; + case 1441: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 23; + break; + case 1442: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 24; + break; + case 1443: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 25; + break; + case 1444: + this.mana = 7; + this.UseSound = SoundID.Item72; + this.useStyle = 5; + this.damage = 53; + this.useAnimation = 16; + this.useTime = 16; + this.autoReuse = true; + this.width = 40; + this.height = 40; + this.shoot = 294; + this.shootSpeed = 6f; + this.knockBack = 3.25f; + this.value = Item.sellPrice(gold: 6); + this.magic = true; + this.rare = 8; + this.noMelee = true; + break; + case 1445: + this.mana = 18; + this.UseSound = SoundID.Item73; + this.useStyle = 5; + this.damage = 65; + this.useAnimation = 30; + this.useTime = 30; + this.width = 40; + this.height = 40; + this.shoot = 295; + this.shootSpeed = 8f; + this.knockBack = 8f; + this.value = Item.sellPrice(gold: 6); + this.magic = true; + this.noMelee = true; + this.rare = 8; + break; + case 1446: + this.mana = 15; + this.UseSound = SoundID.Item43; + this.useStyle = 5; + this.damage = 65; + this.autoReuse = true; + this.useAnimation = 24; + this.useTime = 24; + this.width = 40; + this.height = 40; + this.shoot = 297; + this.shootSpeed = 6f; + this.knockBack = 6f; + this.value = Item.sellPrice(gold: 6); + this.magic = true; + this.noMelee = true; + this.rare = 8; + break; + case 1447: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 106; + this.width = 12; + this.height = 12; + break; + case 1448: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 107; + this.width = 12; + this.height = 12; + break; + case 1449: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 244; + this.width = 26; + this.height = 20; + this.value = Item.buyPrice(gold: 4); + this.rare = 1; + break; + case 1450: + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = false; + this.useAnimation = 25; + this.useTime = 25; + this.width = 24; + this.height = 28; + this.scale = 1f; + this.value = Item.buyPrice(gold: 5); + this.noMelee = true; + this.rare = 1; + break; + case 1451: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 10; + this.width = 10; + this.height = 24; + this.value = 1000; + break; + case 1452: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 11; + this.width = 10; + this.height = 24; + this.value = 1000; + break; + case 1453: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 12; + this.width = 10; + this.height = 24; + this.value = 1000; + break; + case 1454: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 13; + this.width = 10; + this.height = 24; + this.value = 1000; + break; + case 1455: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 14; + this.width = 10; + this.height = 24; + this.value = 1000; + break; + case 1456: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 15; + this.width = 10; + this.height = 24; + this.value = 1000; + break; + case 1457: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 13; + this.width = 8; + this.height = 10; + break; + case 1458: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 19; + this.width = 14; + this.height = 28; + this.value = 200; + break; + case 1459: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 16; + this.width = 12; + this.height = 30; + this.value = 150; + break; + case 1460: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 13; + this.width = 26; + this.height = 20; + this.value = 300; + break; + case 1461: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 14; + this.width = 28; + this.height = 14; + this.value = 150; + break; + case 1462: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 49; + break; + case 1463: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 4; + break; + case 1464: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 16; + this.width = 10; + this.height = 24; + this.value = 1000; + break; + case 1465: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 17; + this.width = 10; + this.height = 24; + this.value = 1000; + break; + case 1466: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 18; + this.width = 10; + this.height = 24; + this.value = 1000; + break; + case 1467: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 19; + this.width = 10; + this.height = 24; + this.value = 1000; + break; + case 1468: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 20; + this.width = 10; + this.height = 24; + this.value = 1000; + break; + case 1469: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 21; + this.width = 10; + this.height = 24; + this.value = 1000; + break; + case 1470: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 79; + this.placeStyle = 5; + this.width = 28; + this.height = 20; + this.value = 2000; + break; + case 1471: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 79; + this.placeStyle = 6; + this.width = 28; + this.height = 20; + this.value = 2000; + break; + case 1472: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 79; + this.placeStyle = 7; + this.width = 28; + this.height = 20; + this.value = 2000; + break; + case 1473: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 79; + this.placeStyle = 8; + this.width = 28; + this.height = 20; + this.value = 2000; + break; + default: + if (type >= 1474 && type <= 1478) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 245; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = type - 1474; + break; + } + if (type >= 1479 && type <= 1494) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 246; + this.width = 30; + this.height = 30; + this.value = type < 1481 || type > 1494 ? Item.sellPrice(silver: 10) : Item.buyPrice(gold: 1); + this.placeStyle = type - 1479; + break; + } + if (type == 1495) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 245; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 5; + break; + } + if (type >= 1496 && type <= 1499) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 26 + type - 1496; + break; + } + if (type >= 1500 && type <= 1502) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 13 + type - 1500; + break; + } + switch (type) + { + case 1503: + this.width = 18; + this.height = 18; + this.defense = 6; + this.headSlot = 101; + this.rare = 8; + this.value = 375000; + return; + case 1504: + this.width = 18; + this.height = 18; + this.defense = 14; + this.bodySlot = 66; + this.rare = 8; + this.value = 300000; + return; + case 1505: + this.width = 18; + this.height = 18; + this.defense = 10; + this.legSlot = 55; + this.rare = 8; + this.value = 225000; + return; + case 1506: + this.useStyle = 1; + this.useAnimation = 24; + this.useTime = 10; + this.knockBack = 5.25f; + this.useTurn = true; + this.autoReuse = true; + this.width = 20; + this.height = 12; + this.damage = 32; + this.pick = 200; + this.UseSound = SoundID.Item1; + this.rare = 8; + this.value = 216000; + this.melee = true; + this.scale = 1.15f; + this.tileBoost += 3; + return; + case 1507: + this.useTurn = true; + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 28; + this.useTime = 8; + this.knockBack = 7f; + this.width = 20; + this.height = 12; + this.damage = 60; + this.axe = 30; + this.hammer = 90; + this.UseSound = SoundID.Item1; + this.rare = 8; + this.value = 216000; + this.melee = true; + this.scale = 1.05f; + this.tileBoost += 3; + return; + case 1508: + this.maxStack = 99; + this.width = 16; + this.height = 14; + this.value = Item.sellPrice(silver: 50); + this.rare = 8; + return; + case 1509: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 17; + this.width = 12; + this.height = 30; + this.value = 150; + return; + case 1510: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 14; + this.width = 26; + this.height = 20; + this.value = 300; + return; + case 1511: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 15; + this.width = 28; + this.height = 14; + this.value = 150; + return; + case 1512: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 5; + return; + case 1513: + this.noMelee = true; + this.useStyle = 1; + this.shootSpeed = 14f; + this.shoot = 301; + this.damage = 90; + this.knockBack = 9f; + this.width = 14; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.rare = 8; + this.value = Item.sellPrice(gold: 10); + this.melee = true; + return; + case 1514: + this.width = 18; + this.height = 18; + this.headSlot = 102; + this.rare = 1; + this.value = Item.sellPrice(gold: 1); + this.vanity = true; + return; + case 1515: + this.width = 24; + this.height = 8; + this.accessory = true; + this.value = 400000; + this.rare = 5; + this.wingSlot = (sbyte) 15; + return; + default: + if (type >= 1516 && type <= 1521) + { + this.maxStack = 99; + this.width = 16; + this.height = 14; + this.value = Item.sellPrice(gold: 2, silver: 50); + this.rare = 5; + return; + } + if (type >= 1522 && type <= 1527) + { + this.width = 20; + this.height = 20; + this.rare = 1; + return; + } + if (type >= 1528 && type <= 1532) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 18 + type - 1528; + this.width = 26; + this.height = 22; + this.value = 2500; + return; + } + if (type >= 1533 && type <= 1537) + { + this.width = 14; + this.height = 20; + this.maxStack = 99; + this.rare = 8; + return; + } + if (type >= 1538 && type <= 1540) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 30 + type - 1538; + return; + } + if (type >= 1541 && type <= 1542) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 246; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 16 + type - 1541; + return; + } + if (type >= 1543 && type <= 1545) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.width = 24; + this.height = 24; + this.value = Item.sellPrice(gold: 6); + this.tileBoost += 3; + return; + } + switch (type) + { + case 1546: + this.width = 18; + this.height = 18; + this.defense = 11; + this.headSlot = 103; + this.rare = 8; + this.value = 375000; + return; + case 1547: + this.width = 18; + this.height = 18; + this.defense = 11; + this.headSlot = 104; + this.rare = 8; + this.value = 375000; + return; + case 1548: + this.width = 18; + this.height = 18; + this.defense = 11; + this.headSlot = 105; + this.rare = 8; + this.value = 375000; + return; + case 1549: + this.width = 18; + this.height = 18; + this.defense = 24; + this.bodySlot = 67; + this.rare = 8; + this.value = 300000; + return; + case 1550: + this.width = 18; + this.height = 18; + this.defense = 16; + this.legSlot = 56; + this.rare = 8; + this.value = 225000; + return; + case 1551: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 247; + this.width = 26; + this.height = 24; + this.value = Item.buyPrice(1); + return; + case 1552: + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.rare = 7; + this.value = Item.sellPrice(gold: 1); + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 20; + return; + case 1553: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 5; + this.useTime = 5; + this.crit += 10; + this.width = 60; + this.height = 26; + this.shoot = 10; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item40; + this.damage = 85; + this.shootSpeed = 12f; + this.noMelee = true; + this.value = 750000; + this.rare = 10; + this.knockBack = 2.5f; + this.ranged = true; + return; + case 1554: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.headSlot = 106; + this.value = Item.sellPrice(gold: 5); + return; + case 1555: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.bodySlot = 68; + this.value = Item.sellPrice(gold: 5); + return; + case 1556: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.legSlot = 57; + this.value = Item.sellPrice(gold: 5); + return; + case 1557: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.headSlot = 107; + this.value = Item.sellPrice(gold: 5); + return; + case 1558: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.bodySlot = 69; + this.value = Item.sellPrice(gold: 5); + return; + case 1559: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.legSlot = 58; + this.value = Item.sellPrice(gold: 5); + return; + case 1560: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.headSlot = 108; + this.value = Item.sellPrice(gold: 5); + return; + case 1561: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.bodySlot = 70; + this.value = Item.sellPrice(gold: 5); + return; + case 1562: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.legSlot = 59; + this.value = Item.sellPrice(gold: 5); + return; + case 1563: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.headSlot = 109; + this.value = Item.sellPrice(gold: 5); + return; + case 1564: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.bodySlot = 71; + this.value = Item.sellPrice(gold: 5); + return; + case 1565: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.legSlot = 60; + this.value = Item.sellPrice(gold: 5); + return; + case 1566: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.headSlot = 110; + this.value = Item.sellPrice(gold: 5); + return; + case 1567: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.bodySlot = 72; + this.value = Item.sellPrice(gold: 5); + return; + case 1568: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.legSlot = 61; + this.value = Item.sellPrice(gold: 5); + return; + case 1569: + this.autoReuse = true; + this.useStyle = 1; + this.shootSpeed = 15f; + this.shoot = 304; + this.damage = 29; + this.width = 18; + this.height = 20; + this.UseSound = SoundID.Item39; + this.useAnimation = 16; + this.useTime = 16; + this.noUseGraphic = true; + this.noMelee = true; + this.value = Item.sellPrice(gold: 20); + this.knockBack = 2.75f; + this.melee = true; + this.rare = 8; + return; + case 1570: + this.width = 14; + this.height = 18; + this.maxStack = 99; + this.rare = 8; + this.value = this.eclipsePrice; + return; + case 1571: + this.autoReuse = true; + this.useStyle = 5; + this.shootSpeed = 14f; + this.shoot = 306; + this.damage = 64; + this.width = 18; + this.height = 20; + this.UseSound = SoundID.Item39; + this.useAnimation = 20; + this.useTime = 20; + this.noUseGraphic = true; + this.noMelee = true; + this.value = Item.sellPrice(gold: 20); + this.knockBack = 5f; + this.melee = true; + this.rare = 8; + return; + case 1572: + this.useStyle = 1; + this.shootSpeed = 14f; + this.shoot = 308; + this.damage = 100; + this.width = 18; + this.height = 20; + this.UseSound = SoundID.Item1; + this.useAnimation = 30; + this.useTime = 30; + this.noMelee = true; + this.value = Item.sellPrice(gold: 20); + this.knockBack = 7.5f; + this.rare = 8; + this.summon = true; + this.mana = 20; + this.sentry = true; + return; + case 1573: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 16; + return; + default: + if (type >= 1574 && type <= 1576) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 33 + type - 1574; + return; + } + switch (type) + { + case 1577: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 245; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 6; + return; + case 1578: + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 3; + this.value = 100000; + this.neckSlot = (sbyte) 6; + return; + case 1579: + this.width = 28; + this.height = 24; + this.accessory = true; + this.rare = 1; + this.value = 50000; + this.shoeSlot = (sbyte) 5; + return; + case 1580: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.headSlot = 111; + this.value = Item.sellPrice(gold: 5); + return; + case 1581: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.bodySlot = 73; + this.value = Item.sellPrice(gold: 5); + return; + case 1582: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.legSlot = 62; + this.value = Item.sellPrice(gold: 5); + return; + case 1583: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 9; + this.wingSlot = (sbyte) 16; + this.value = 400000; + return; + case 1584: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 9; + this.wingSlot = (sbyte) 17; + this.value = 400000; + return; + case 1585: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 9; + this.wingSlot = (sbyte) 18; + this.value = 400000; + return; + case 1586: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 9; + this.wingSlot = (sbyte) 19; + this.value = 400000; + return; + case 1587: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.bodySlot = 74; + this.value = Item.sellPrice(gold: 5); + return; + case 1588: + this.width = 18; + this.height = 18; + this.rare = 9; + this.vanity = true; + this.legSlot = 63; + this.value = Item.sellPrice(gold: 5); + return; + case 1589: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 248; + this.width = 12; + this.height = 12; + return; + case 1590: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 109; + this.width = 12; + this.height = 12; + return; + case 1591: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 249; + this.width = 12; + this.height = 12; + return; + case 1592: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 110; + this.width = 12; + this.height = 12; + return; + case 1593: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 250; + this.width = 12; + this.height = 12; + return; + case 1594: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 111; + this.width = 12; + this.height = 12; + return; + case 1595: + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 2; + this.value = 100000; + this.handOffSlot = (sbyte) 3; + this.handOnSlot = (sbyte) 8; + return; + default: + if (type >= 1596 && type <= 1610) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = type - 1596 + 13; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + return; + } + switch (type) + { + case 1611: + this.maxStack = 99; + this.width = 16; + this.height = 14; + this.value = Item.sellPrice(gold: 2, silver: 50); + this.rare = 5; + return; + case 1612: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 6; + this.value = Item.sellPrice(gold: 3); + return; + case 1613: + this.width = 24; + this.height = 28; + this.rare = 7; + this.value = Item.sellPrice(gold: 5); + this.accessory = true; + this.defense = 4; + this.shieldSlot = (sbyte) 4; + return; + case 1614: + this.shootSpeed = 6f; + this.shoot = 310; + this.damage = 1; + this.width = 12; + this.height = 12; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Flare; + this.knockBack = 1.5f; + this.value = 7; + this.ranged = true; + return; + default: + if (type >= 1615 && type <= 1701) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 22 + type - 1615; + this.width = 10; + this.height = 24; + this.value = 1000; + this.rare = 1; + return; + } + if (type == 1702) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 14; + this.width = 8; + this.height = 10; + return; + } + if (type >= 1703 && type <= 1708) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 18 + type - 1703; + this.width = 12; + this.height = 30; + this.value = 150; + return; + } + if (type >= 1709 && type <= 1712) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 20 + type - 1709; + this.width = 14; + this.height = 28; + this.value = 200; + return; + } + if (type >= 1713 && type <= 1718) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 15 + type - 1713; + this.width = 26; + this.height = 20; + this.value = 300; + return; + } + if (type >= 1719 && type <= 1722) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 79; + this.placeStyle = 9 + type - 1719; + this.width = 28; + this.height = 20; + this.value = 2000; + return; + } + switch (type) + { + case 1723: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 78; + this.width = 12; + this.height = 12; + return; + case 1724: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 2; + this.value = 50000; + this.waistSlot = (sbyte) 14; + return; + case 1725: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 251; + this.width = 8; + this.height = 10; + this.value = Item.sellPrice(copper: 25); + return; + case 1726: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 113; + this.width = 12; + this.height = 12; + return; + case 1727: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 252; + this.width = 8; + this.height = 10; + return; + case 1728: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 114; + this.width = 12; + this.height = 12; + return; + case 1729: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 253; + this.width = 8; + this.height = 10; + return; + case 1730: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 115; + this.width = 12; + this.height = 12; + return; + case 1731: + this.width = 18; + this.height = 18; + this.defense = 2; + this.headSlot = 112; + return; + case 1732: + this.width = 18; + this.height = 18; + this.defense = 3; + this.bodySlot = 75; + return; + case 1733: + this.width = 18; + this.height = 18; + this.defense = 2; + this.legSlot = 64; + return; + case 1734: + this.width = 12; + this.height = 12; + return; + case 1735: + this.width = 12; + this.height = 12; + return; + case 1736: + this.width = 18; + this.height = 18; + this.headSlot = 113; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1737: + this.width = 18; + this.height = 18; + this.bodySlot = 76; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1738: + this.width = 18; + this.height = 18; + this.legSlot = 65; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1739: + this.width = 18; + this.height = 18; + this.headSlot = 114; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1740: + this.width = 18; + this.height = 18; + this.headSlot = 115; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1741: + this.width = 18; + this.height = 18; + this.bodySlot = 77; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1742: + this.width = 18; + this.height = 18; + this.headSlot = 116; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1743: + this.width = 18; + this.height = 18; + this.headSlot = 117; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1744: + this.width = 18; + this.height = 18; + this.bodySlot = 78; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1745: + this.width = 18; + this.height = 18; + this.legSlot = 66; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1746: + this.width = 18; + this.height = 18; + this.headSlot = 118; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1747: + this.width = 18; + this.height = 18; + this.bodySlot = 79; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1748: + this.width = 18; + this.height = 18; + this.legSlot = 67; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1749: + this.width = 18; + this.height = 18; + this.headSlot = 119; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1750: + this.width = 18; + this.height = 18; + this.bodySlot = 80; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1751: + this.width = 18; + this.height = 18; + this.legSlot = 68; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1752: + this.width = 18; + this.height = 18; + this.headSlot = 120; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1753: + this.width = 18; + this.height = 18; + this.bodySlot = 81; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1754: + this.width = 18; + this.height = 18; + this.headSlot = 121; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1755: + this.width = 18; + this.height = 18; + this.bodySlot = 82; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1756: + this.width = 18; + this.height = 18; + this.legSlot = 69; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1757: + this.width = 18; + this.height = 18; + this.headSlot = 122; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1758: + this.width = 18; + this.height = 18; + this.bodySlot = 83; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1759: + this.width = 18; + this.height = 18; + this.legSlot = 70; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1760: + this.width = 18; + this.height = 18; + this.headSlot = 123; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1761: + this.width = 18; + this.height = 18; + this.bodySlot = 84; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1762: + this.width = 18; + this.height = 18; + this.legSlot = 71; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1763: + this.width = 18; + this.height = 18; + this.headSlot = 124; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1764: + this.width = 18; + this.height = 18; + this.bodySlot = 85; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1765: + this.width = 18; + this.height = 18; + this.legSlot = 72; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1766: + this.width = 18; + this.height = 18; + this.headSlot = 125; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1767: + this.width = 18; + this.height = 18; + this.headSlot = 126; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1768: + this.width = 18; + this.height = 18; + this.bodySlot = 86; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1769: + this.width = 18; + this.height = 18; + this.legSlot = 73; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1770: + this.width = 18; + this.height = 18; + this.bodySlot = 87; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1771: + this.width = 18; + this.height = 18; + this.legSlot = 74; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1772: + this.width = 18; + this.height = 18; + this.headSlot = (int) sbyte.MaxValue; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1773: + this.width = 18; + this.height = 18; + this.bodySlot = 88; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1774: + this.width = 12; + this.height = 12; + this.rare = 3; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1); + return; + case 1775: + this.width = 18; + this.height = 18; + this.bodySlot = 89; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1776: + this.width = 18; + this.height = 18; + this.legSlot = 75; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1777: + this.width = 18; + this.height = 18; + this.headSlot = 128; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1778: + this.width = 18; + this.height = 18; + this.bodySlot = 90; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1779: + this.width = 18; + this.height = 18; + this.headSlot = 129; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1780: + this.width = 18; + this.height = 18; + this.bodySlot = 91; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1781: + this.width = 18; + this.height = 18; + this.legSlot = 76; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1782: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 9; + this.useTime = 9; + this.crit += 6; + this.width = 60; + this.height = 26; + this.shoot = 311; + this.useAmmo = AmmoID.CandyCorn; + this.UseSound = SoundID.Item11; + this.damage = 44; + this.shootSpeed = 10f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 10); + this.rare = 8; + this.knockBack = 2f; + this.ranged = true; + return; + case 1783: + this.shootSpeed = 4f; + this.shoot = 311; + this.damage = 9; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.CandyCorn; + this.knockBack = 1.5f; + this.value = 5; + this.ranged = true; + return; + case 1784: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 30; + this.useTime = 30; + this.crit += 6; + this.width = 60; + this.height = 26; + this.shoot = 312; + this.useAmmo = AmmoID.JackOLantern; + this.UseSound = SoundID.Item11; + this.damage = 65; + this.shootSpeed = 7f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 10); + this.rare = 8; + this.knockBack = 5f; + this.ranged = true; + return; + case 1785: + this.shootSpeed = 4f; + this.shoot = 312; + this.damage = 30; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.JackOLantern; + this.knockBack = 3f; + this.value = 15; + this.ranged = true; + return; + case 1786: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 24; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.damage = 9; + this.UseSound = SoundID.Item1; + this.knockBack = 2.25f; + this.value = Item.buyPrice(silver: 60); + this.melee = true; + return; + case 1788: + this.width = 18; + this.height = 18; + this.headSlot = 130; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1789: + this.width = 18; + this.height = 18; + this.bodySlot = 92; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1790: + this.width = 18; + this.height = 18; + this.legSlot = 77; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1791: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 96; + this.placeStyle = 1; + this.width = 20; + this.height = 20; + this.value = Item.buyPrice(gold: 1, silver: 50); + return; + case 1792: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 24; + this.width = 12; + this.height = 30; + this.value = 150; + return; + case 1793: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 24; + this.width = 14; + this.height = 28; + this.value = 200; + return; + case 1794: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 21; + this.width = 26; + this.height = 20; + this.value = 300; + return; + case 1795: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 16; + this.width = 28; + this.height = 14; + this.value = 150; + return; + case 1796: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 15; + this.width = 8; + this.height = 10; + return; + case 1797: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 7; + this.value = 400000; + this.wingSlot = (sbyte) 20; + return; + case 1798: + this.damage = 0; + this.useStyle = 1; + this.shoot = 313; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.buffType = 81; + this.value = Item.sellPrice(gold: 2); + return; + case 1799: + this.damage = 0; + this.useStyle = 1; + this.shoot = 314; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.buffType = 82; + this.value = Item.sellPrice(gold: 2); + return; + case 1800: + this.noUseGraphic = true; + this.damage = 0; + this.knockBack = 7f; + this.useStyle = 5; + this.shootSpeed = 13.5f; + this.shoot = 315; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.value = Item.sellPrice(gold: 1, silver: 50); + return; + case 1801: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 12; + this.useTime = 12; + this.mana = 6; + this.width = 50; + this.height = 18; + this.shoot = 316; + this.UseSound = SoundID.Item32; + this.damage = 45; + this.shootSpeed = 10f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 10); + this.rare = 8; + this.magic = true; + this.knockBack = 3f; + return; + case 1802: + this.mana = 10; + this.damage = 55; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 317; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item44; + this.useAnimation = 28; + this.useTime = 28; + this.rare = 8; + this.noMelee = true; + this.knockBack = 3f; + this.buffType = 83; + this.value = Item.sellPrice(gold: 10); + this.summon = true; + return; + default: + if (type >= 1803 && type <= 1807) + return; + switch (type) + { + case 1808: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 8; + return; + case 1809: + this.useStyle = 1; + this.shootSpeed = 9f; + this.shoot = 318; + this.damage = 13; + this.width = 18; + this.height = 20; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 19; + this.useTime = 19; + this.noUseGraphic = true; + this.noMelee = true; + this.ranged = true; + this.knockBack = 6.5f; + return; + case 1810: + this.damage = 0; + this.useStyle = 1; + this.shoot = 319; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.buffType = 84; + this.value = Item.sellPrice(gold: 2); + return; + case 1811: + this.maxStack = 99; + this.width = 16; + this.height = 14; + this.value = Item.sellPrice(gold: 2, silver: 50); + this.rare = 5; + return; + case 1812: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 34; + this.placeStyle = 6; + this.width = 26; + this.height = 26; + return; + case 1813: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 35; + this.width = 26; + this.height = 26; + return; + case 1814: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 25; + this.width = 12; + this.height = 30; + this.value = 150; + return; + case 1815: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 25; + this.width = 14; + this.height = 28; + this.value = 200; + return; + case 1816: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 22; + this.width = 26; + this.height = 20; + this.value = 300; + return; + case 1817: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 17; + this.width = 28; + this.height = 14; + this.value = 150; + return; + case 1818: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 16; + this.width = 8; + this.height = 10; + return; + case 1819: + this.width = 18; + this.height = 18; + this.headSlot = 131; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1820: + this.width = 18; + this.height = 18; + this.bodySlot = 93; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1821: + this.width = 18; + this.height = 18; + this.headSlot = 132; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1822: + this.width = 18; + this.height = 18; + this.bodySlot = 94; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1823: + this.width = 18; + this.height = 18; + this.legSlot = 78; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1824: + this.width = 18; + this.height = 18; + this.headSlot = 133; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1825: + this.noMelee = true; + this.useStyle = 1; + this.shootSpeed = 15f; + this.shoot = 320; + this.damage = 15; + this.knockBack = 5f; + this.width = 34; + this.height = 34; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.rare = 2; + this.value = 50000; + this.melee = true; + return; + case 1826: + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 26; + this.knockBack = 7.5f; + this.width = 40; + this.height = 40; + this.damage = 75; + this.scale = 1.15f; + this.UseSound = SoundID.Item1; + this.rare = 8; + this.value = Item.sellPrice(gold: 10); + this.melee = true; + return; + case 1827: + this.useStyle = 1; + this.useTurn = true; + this.autoReuse = true; + this.useAnimation = 8; + this.useTime = 8; + this.width = 24; + this.height = 28; + this.damage = 12; + this.knockBack = 4f; + this.UseSound = SoundID.Item1; + this.scale = 1.35f; + this.melee = true; + this.rare = 2; + this.value = 50000; + this.melee = true; + return; + case 1828: + this.autoReuse = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 254; + this.width = 8; + this.height = 10; + this.value = Item.buyPrice(silver: 2, copper: 50); + return; + case 1829: + this.noUseGraphic = true; + this.damage = 0; + this.knockBack = 7f; + this.useStyle = 5; + this.shootSpeed = 15.5f; + this.shoot = 322; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 7; + this.noMelee = true; + this.value = Item.sellPrice(gold: 4); + return; + case 1830: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 7; + this.value = 400000; + this.wingSlot = (sbyte) 21; + return; + case 1831: + this.maxStack = 99; + this.width = 16; + this.height = 14; + this.value = Item.sellPrice(gold: 2, silver: 50); + this.rare = 5; + return; + case 1832: + this.width = 18; + this.height = 18; + this.headSlot = 134; + this.value = Item.sellPrice(gold: 1); + this.defense = 9; + this.rare = 8; + return; + case 1833: + this.width = 18; + this.height = 18; + this.bodySlot = 95; + this.value = Item.sellPrice(gold: 1); + this.defense = 11; + this.rare = 8; + return; + case 1834: + this.width = 18; + this.height = 18; + this.legSlot = 79; + this.value = Item.sellPrice(gold: 1); + this.defense = 10; + this.rare = 8; + return; + case 1835: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 26; + this.useTime = 26; + this.crit += 10; + this.width = 40; + this.height = 26; + this.shoot = 323; + this.useAmmo = AmmoID.Stake; + this.UseSound = SoundID.Item5; + this.damage = 75; + this.shootSpeed = 9f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 10); + this.rare = 8; + this.knockBack = 6.5f; + this.ranged = true; + return; + case 1836: + this.shootSpeed = 3f; + this.shoot = 323; + this.damage = 25; + this.width = 20; + this.height = 14; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Stake; + this.knockBack = 4.5f; + this.value = 15; + this.ranged = true; + return; + case 1837: + this.useStyle = 1; + this.shoot = 324; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.buffType = 85; + this.value = Item.sellPrice(gold: 2); + return; + case 1838: + this.width = 18; + this.height = 18; + this.headSlot = 135; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + return; + case 1839: + this.width = 18; + this.height = 18; + this.bodySlot = 96; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + return; + case 1840: + this.width = 18; + this.height = 18; + this.legSlot = 80; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + return; + case 1841: + this.width = 18; + this.height = 18; + this.headSlot = 136; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + return; + case 1842: + this.width = 18; + this.height = 18; + this.bodySlot = 97; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + return; + case 1843: + this.width = 18; + this.height = 18; + this.legSlot = 81; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + return; + case 1844: + this.useStyle = 4; + this.width = 22; + this.height = 14; + this.consumable = true; + this.useAnimation = 45; + this.useTime = 45; + this.maxStack = 20; + this.rare = 8; + return; + case 1845: + this.rare = 8; + this.width = 24; + this.height = 28; + this.accessory = true; + this.value = Item.buyPrice(gold: 20); + return; + default: + if (type >= 1846 && type <= 1850) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 17 + type - 1846; + return; + } + switch (type) + { + case 1851: + this.width = 18; + this.height = 18; + this.bodySlot = 98; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + return; + case 1852: + this.width = 18; + this.height = 18; + this.legSlot = 82; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + return; + case 1853: + this.width = 18; + this.height = 18; + this.bodySlot = 99; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + return; + case 1854: + this.width = 18; + this.height = 18; + this.legSlot = 83; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + return; + default: + if (type == 1855 || type == 1856) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.rare = 1; + this.placeStyle = 36 + type - 1855; + return; + } + switch (type) + { + case 1857: + this.width = 18; + this.height = 18; + this.headSlot = 137; + this.value = Item.sellPrice(gold: 5); + this.vanity = true; + this.rare = 3; + return; + case 1858: + this.width = 14; + this.height = 28; + this.rare = 7; + this.value = 300000; + this.accessory = true; + return; + case 1859: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 9; + this.value = 75000; + this.rare = 2; + return; + case 1860: + this.width = 24; + this.height = 28; + this.rare = 5; + this.value = 150000; + this.accessory = true; + this.faceSlot = (sbyte) 3; + return; + case 1861: + this.width = 24; + this.height = 28; + this.rare = 6; + this.value = 250000; + this.accessory = true; + this.faceSlot = (sbyte) 2; + return; + case 1862: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 7; + this.value = 350000; + this.shoeSlot = (sbyte) 9; + return; + case 1863: + this.width = 14; + this.height = 28; + this.rare = 4; + this.value = 150000; + this.accessory = true; + this.balloonSlot = (sbyte) 5; + return; + case 1864: + this.rare = 8; + this.width = 24; + this.height = 28; + this.accessory = true; + this.value = Item.buyPrice(gold: 25); + return; + case 1865: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 7; + this.value = 400000; + return; + case 1866: + this.width = 24; + this.height = 8; + this.accessory = true; + this.value = 400000; + this.rare = 5; + this.wingSlot = (sbyte) 22; + return; + case 1867: + this.width = 12; + this.height = 12; + return; + case 1868: + this.width = 12; + this.height = 12; + return; + case 1869: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 36; + this.width = 12; + this.height = 28; + this.rare = 1; + return; + case 1870: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 38; + this.useTime = 38; + this.width = 44; + this.height = 14; + this.shoot = 10; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item11; + this.damage = 20; + this.shootSpeed = 8f; + this.noMelee = true; + this.value = 100000; + this.knockBack = 3.75f; + this.rare = 1; + this.ranged = true; + return; + case 1871: + this.width = 24; + this.height = 8; + this.accessory = true; + this.value = 400000; + this.rare = 5; + this.wingSlot = (sbyte) 23; + return; + case 1872: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 170; + this.width = 12; + this.height = 12; + return; + case 1873: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 171; + this.width = 12; + this.height = 12; + this.value = Item.buyPrice(silver: 25); + return; + default: + if (type >= 1874 && type <= 1905) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.noMelee = true; + this.value = Item.buyPrice(silver: 5); + return; + } + switch (type) + { + case 1906: + this.width = 18; + this.height = 18; + this.headSlot = 138; + this.vanity = true; + this.value = Item.buyPrice(gold: 1); + return; + case 1907: + this.width = 18; + this.height = 18; + this.headSlot = 139; + this.vanity = true; + this.value = Item.buyPrice(gold: 1); + return; + case 1908: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 246; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 18; + return; + case 1909: + this.useStyle = 1; + this.useAnimation = 27; + this.knockBack = 5.3f; + this.width = 24; + this.height = 28; + this.damage = 16; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.rare = 1; + this.value = 13500; + this.melee = true; + return; + case 1910: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 30; + this.useTime = 5; + this.width = 50; + this.height = 18; + this.shoot = 85; + this.useAmmo = AmmoID.Gel; + this.UseSound = SoundID.Item34; + this.damage = 60; + this.knockBack = 0.425f; + this.shootSpeed = 8.5f; + this.noMelee = true; + this.value = 500000; + this.rare = 8; + this.ranged = true; + return; + case 1912: + this.UseSound = SoundID.Item3; + this.healLife = 80; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.potion = true; + this.value = 40; + this.rare = 1; + return; + case 1913: + this.useStyle = 1; + this.shootSpeed = 12f; + this.shoot = 330; + this.damage = 14; + this.width = 18; + this.height = 20; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 25; + this.ranged = true; + return; + case 1914: + this.useStyle = 1; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item25; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 8; + this.noMelee = true; + this.mountType = 0; + this.value = Item.sellPrice(gold: 5); + return; + case 1915: + this.noUseGraphic = true; + this.damage = 0; + this.knockBack = 7f; + this.useStyle = 5; + this.shootSpeed = 11.5f; + this.shoot = 331; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 7; + this.noMelee = true; + this.value = Item.sellPrice(gold: 2); + return; + case 1916: + this.noUseGraphic = true; + this.damage = 0; + this.knockBack = 7f; + this.useStyle = 5; + this.shootSpeed = 15.5f; + this.shoot = 332; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 7; + this.noMelee = true; + this.value = Item.sellPrice(gold: 4); + return; + case 1917: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 20; + this.useTime = 16; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.damage = 7; + this.pick = 55; + this.UseSound = SoundID.Item1; + this.knockBack = 2.5f; + this.value = 10000; + this.melee = true; + return; + case 1918: + this.noMelee = true; + this.useStyle = 1; + this.shootSpeed = 11f; + this.shoot = 333; + this.damage = 14; + this.knockBack = 8f; + this.width = 14; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.rare = 1; + this.value = 50000; + this.melee = true; + return; + case 1921: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 2; + this.value = 50000; + this.handOffSlot = (sbyte) 2; + this.handOnSlot = (sbyte) 7; + return; + case 1922: + this.width = 16; + this.height = 24; + return; + case 1923: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 2; + this.value = 50000; + return; + case 1924: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 26; + this.width = 14; + this.height = 28; + this.value = 200; + return; + case 1925: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 26; + this.width = 12; + this.height = 30; + this.value = 150; + return; + case 1926: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 23; + this.width = 26; + this.height = 20; + this.value = 300; + return; + case 1927: + this.useStyle = 1; + this.shoot = 334; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.value = 0; + this.buffType = 91; + return; + case 1928: + this.useStyle = 1; + this.autoReuse = true; + this.useAnimation = 23; + this.useTime = 23; + this.knockBack = 7f; + this.width = 40; + this.height = 40; + this.damage = 86; + this.scale = 1.1f; + this.shoot = 907; + this.shootSpeed = 5f; + this.UseSound = SoundID.Item1; + this.rare = 8; + this.value = Item.sellPrice(gold: 10); + this.melee = true; + return; + case 1929: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 4; + this.useTime = 4; + this.width = 50; + this.height = 18; + this.shoot = 10; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item41; + this.damage = 31; + this.shootSpeed = 14f; + this.noMelee = true; + this.value = Item.buyPrice(gold: 45); + this.rare = 8; + this.knockBack = 1.75f; + this.ranged = true; + return; + case 1930: + this.autoReuse = true; + this.mana = 5; + this.UseSound = SoundID.Item39; + this.useStyle = 5; + this.damage = 48; + this.useAnimation = 8; + this.useTime = 8; + this.width = 40; + this.height = 40; + this.shoot = 336; + this.shootSpeed = 12f; + this.knockBack = 3.25f; + this.value = Item.buyPrice(gold: 45); + this.magic = true; + this.rare = 8; + this.noMelee = true; + return; + case 1931: + this.autoReuse = true; + this.mana = 9; + this.useStyle = 5; + this.damage = 58; + this.useAnimation = 10; + this.useTime = 5; + this.width = 40; + this.height = 40; + this.shoot = 337; + this.shootSpeed = 10f; + this.knockBack = 4.5f; + this.value = Item.buyPrice(gold: 45); + this.magic = true; + this.rare = 8; + this.noMelee = true; + return; + case 1932: + this.width = 18; + this.height = 18; + this.headSlot = 140; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1933: + this.width = 18; + this.height = 18; + this.bodySlot = 100; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1934: + this.width = 18; + this.height = 18; + this.legSlot = 84; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1935: + this.width = 18; + this.height = 18; + this.headSlot = 142; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1936: + this.width = 18; + this.height = 18; + this.bodySlot = 102; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1937: + this.width = 18; + this.height = 18; + this.legSlot = 86; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1938: + this.width = 18; + this.height = 18; + this.headSlot = 143; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1939: + this.width = 18; + this.height = 18; + this.bodySlot = 103; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1940: + this.width = 18; + this.height = 18; + this.headSlot = 141; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1941: + this.width = 18; + this.height = 18; + this.bodySlot = 101; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1942: + this.width = 18; + this.height = 18; + this.legSlot = 85; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1943: + this.width = 18; + this.height = 18; + this.headSlot = 144; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1944: + this.width = 18; + this.height = 18; + this.bodySlot = 104; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1945: + this.width = 18; + this.height = 18; + this.legSlot = 87; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + return; + case 1946: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 15; + this.useTime = 15; + this.useAmmo = AmmoID.Rocket; + this.width = 50; + this.height = 20; + this.shoot = 338; + this.UseSound = SoundID.Item11; + this.damage = 67; + this.shootSpeed = 15f; + this.noMelee = true; + this.value = Item.buyPrice(gold: 45); + this.knockBack = 4f; + this.rare = 8; + this.ranged = true; + return; + case 1947: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 25; + this.shootSpeed = 4.75f; + this.knockBack = 6.7f; + this.width = 40; + this.height = 40; + this.damage = 73; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.shoot = 342; + this.rare = 7; + this.value = Item.buyPrice(gold: 45); + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + return; + default: + if (type >= 1948 && type <= 1957) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 116 + type - 1948; + this.width = 12; + this.height = 12; + this.value = Item.buyPrice(silver: 1); + return; + } + if (type == 1958) + { + this.useStyle = 4; + this.width = 22; + this.height = 14; + this.consumable = true; + this.useAnimation = 45; + this.useTime = 45; + this.maxStack = 20; + this.rare = 8; + return; + } + if (type == 1959) + { + this.useStyle = 1; + this.shoot = 353; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.value = 0; + this.buffType = 92; + return; + } + if (type == 1960 || type == 1961 || type == 1962) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.rare = 1; + this.placeStyle = 38 + type - 1960; + return; + } + switch (type) + { + case 1963: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 28; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + return; + case 1964: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 29; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + return; + case 1965: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 30; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + return; + case 1966: + this.paint = (byte) 28; + this.width = 24; + this.height = 24; + this.value = 25; + this.maxStack = 999; + return; + case 1967: + this.paint = (byte) 29; + this.width = 24; + this.height = 24; + this.value = 50; + this.maxStack = 999; + return; + case 1968: + this.paint = (byte) 30; + this.width = 24; + this.height = 24; + this.value = 75; + this.maxStack = 999; + return; + case 1969: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + return; + default: + if (type >= 1970 && type <= 1976) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 262 + type - 1970; + this.width = 12; + this.height = 12; + return; + } + if (type >= 1977 && type <= 1986) + { + this.width = 20; + this.height = 26; + this.maxStack = 99; + this.value = Item.buyPrice(gold: 5); + this.rare = 2; + if (type == 1980) + this.value = Item.buyPrice(gold: 10); + if (type == 1984) + this.value = Item.buyPrice(gold: 7, silver: 50); + if (type == 1985) + this.value = Item.buyPrice(gold: 15); + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.consumable = true; + return; + } + switch (type) + { + case 1987: + this.width = 18; + this.height = 12; + this.maxStack = 1; + this.value = Item.buyPrice(gold: 40); + this.rare = 5; + this.accessory = true; + this.faceSlot = (sbyte) 7; + this.vanity = true; + return; + case 1988: + this.width = 20; + this.height = 14; + this.maxStack = 1; + this.value = Item.buyPrice(gold: 3, silver: 50); + this.vanity = true; + this.headSlot = 145; + return; + case 1989: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 269; + this.width = 22; + this.height = 32; + this.createTile = 470; + this.placeStyle = 2; + return; + case 1990: + this.width = 20; + this.height = 26; + this.maxStack = 99; + this.value = Item.buyPrice(gold: 2); + this.rare = 2; + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.hairDye = (short) 0; + this.useAnimation = 17; + this.useTime = 17; + this.consumable = true; + return; + case 1991: + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 25; + this.width = 24; + this.height = 28; + this.UseSound = SoundID.Item1; + this.value = Item.buyPrice(silver: 25); + this.autoReuse = true; + return; + case 1992: + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.makeNPC = (short) 355; + this.noUseGraphic = true; + this.bait = 20; + return; + case 1993: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 270; + this.width = 12; + this.height = 28; + return; + default: + if (type < 1994 || type > 2001) + return; + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.makeNPC = (short) 356; + this.placeStyle = 1 + type - 1994; + this.noUseGraphic = true; + int num = type - 1994; + if (num == 0) + this.bait = 5; + if (num == 4) + this.bait = 10; + if (num == 6) + this.bait = 15; + if (num == 3) + this.bait = 20; + if (num == 7) + this.bait = 25; + if (num == 2) + this.bait = 30; + if (num == 1) + this.bait = 35; + if (num != 5) + return; + this.bait = 50; + return; + } + } + } + } + } + } + } + } + } + } + } + } + } + + public void SetDefaults3(int type) + { + switch (type) + { + case 2002: + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.makeNPC = (short) 357; + this.noUseGraphic = true; + this.bait = 25; + break; + case 2003: + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.makeNPC = (short) 300; + this.noUseGraphic = true; + break; + case 2004: + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.makeNPC = (short) 358; + this.noUseGraphic = true; + this.bait = 35; + break; + case 2005: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 271; + this.width = 12; + this.height = 28; + break; + case 2006: + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.makeNPC = (short) 359; + this.noUseGraphic = true; + this.bait = 10; + break; + case 2007: + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.makeNPC = (short) 360; + this.noUseGraphic = true; + this.bait = 15; + break; + default: + if (type >= 2008 && type <= 2014) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 126 + type - 2008; + this.width = 12; + this.height = 12; + this.value = Item.buyPrice(silver: 1); + break; + } + if (type >= 2015 && type <= 2019) + { + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.noUseGraphic = true; + if (type == 2015) + this.makeNPC = (short) 74; + if (type == 2016) + this.makeNPC = (short) 297; + if (type == 2017) + this.makeNPC = (short) 298; + if (type == 2018) + this.makeNPC = (short) 299; + if (type != 2019) + break; + this.makeNPC = (short) 46; + break; + } + switch (type) + { + case 2020: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 6; + return; + case 2021: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 7; + return; + case 2022: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 8; + return; + case 2023: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 9; + return; + case 2024: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 10; + return; + case 2025: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 11; + return; + case 2026: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 12; + return; + case 2027: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 13; + return; + case 2028: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 14; + return; + case 2029: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 15; + return; + case 2030: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 16; + return; + case 2031: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 17; + return; + case 2032: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 10; + this.value = 150; + return; + case 2033: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 11; + this.value = 150; + return; + case 2034: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 12; + this.value = 150; + return; + case 2035: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 13; + this.value = 150; + return; + case 2036: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 14; + this.value = 150; + return; + case 2037: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 15; + this.value = 150; + return; + case 2038: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 16; + this.value = 150; + return; + case 2039: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 17; + this.value = 150; + return; + case 2040: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 18; + this.value = 150; + return; + case 2041: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 19; + this.value = 150; + return; + case 2042: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 20; + this.value = 150; + return; + case 2043: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 21; + this.value = 150; + return; + case 2044: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 27; + this.width = 14; + this.height = 28; + this.value = 200; + return; + default: + if (type >= 2045 && type <= 2054) + { + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 33; + this.width = 8; + this.height = 18; + this.value = Item.sellPrice(copper: 60); + this.placeStyle = 4 + type - 2045; + return; + } + if (type >= 2055 && type <= 2065) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 34; + this.placeStyle = 7 + type - 2055; + this.width = 26; + this.height = 26; + this.value = 3000; + return; + } + if (type >= 2066 && type <= 2071) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.autoReuse = true; + this.createTile = 79; + this.placeStyle = 13 + type - 2066; + this.width = 28; + this.height = 20; + this.value = 2000; + return; + } + if (type >= 2072 && type <= 2081) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 90; + this.placeStyle = type + 1 - 2072; + this.width = 20; + this.height = 20; + this.value = 300; + return; + } + if (type >= 2082 && type <= 2091) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 93; + this.placeStyle = type + 1 - 2082; + this.width = 10; + this.height = 24; + this.value = 500; + return; + } + if (type >= 2092 && type <= 2103) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 100; + this.placeStyle = type + 1 - 2092; + this.width = 20; + this.height = 20; + this.value = 1500; + return; + } + if (type >= 2104 && type <= 2113) + { + this.width = 28; + this.height = 20; + this.headSlot = type + 146 - 2104; + this.rare = 1; + this.value = Item.sellPrice(silver: 75); + this.vanity = true; + return; + } + if (type >= 2114 && type <= 2118) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 5); + this.placeStyle = 41 + type - 2114; + this.maxStack = 99; + return; + } + switch (type) + { + case 2119: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 273; + this.width = 12; + this.height = 12; + return; + case 2120: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 274; + this.width = 12; + this.height = 12; + return; + case 2121: + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.makeNPC = (short) 361; + this.noUseGraphic = true; + return; + case 2122: + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.makeNPC = (short) 362; + this.noUseGraphic = true; + return; + case 2123: + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.makeNPC = (short) 364; + this.noUseGraphic = true; + return; + default: + if (type >= 2124 && type <= 2128) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 90; + this.placeStyle = type + 11 - 2124; + this.width = 20; + this.height = 20; + this.value = 300; + return; + } + if (type >= 2129 && type <= 2134) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 93; + this.placeStyle = type + 11 - 2129; + this.width = 10; + this.height = 24; + this.value = 500; + return; + } + if (type >= 2135 && type <= 2138) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 18 + type - 2135; + return; + } + if (type == 2139) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.autoReuse = true; + this.createTile = 79; + this.placeStyle = 19; + this.width = 28; + this.height = 20; + this.value = 2000; + return; + } + if (type == 2140) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.autoReuse = true; + this.createTile = 79; + this.placeStyle = 20; + this.width = 28; + this.height = 20; + this.value = 2000; + return; + } + if (type >= 2141 && type <= 2144) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 34; + this.placeStyle = 18 + type - 2141; + this.width = 26; + this.height = 26; + this.value = 3000; + return; + } + if (type >= 2145 && type <= 2148) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 22 + type - 2145; + this.value = 150; + return; + } + if (type >= 2149 && type <= 2152) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 100; + this.placeStyle = type + 13 - 2149; + this.width = 20; + this.height = 20; + this.value = 1500; + return; + } + if (type >= 2153 && type <= 2155) + { + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 33; + this.width = 8; + this.height = 18; + this.value = Item.sellPrice(copper: 60); + this.placeStyle = 14 + type - 2153; + return; + } + if (type == 2156) + { + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.makeNPC = (short) 366; + this.noUseGraphic = true; + this.bait = 15; + return; + } + if (type == 2157) + { + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.makeNPC = (short) 367; + this.noUseGraphic = true; + this.bait = 10; + return; + } + if (type >= 2158 && type <= 2160) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 133 + type - 2158; + this.width = 12; + this.height = 12; + this.value = Item.buyPrice(silver: 1); + return; + } + if (type == 2161) + { + this.width = 18; + this.height = 18; + this.maxStack = 999; + this.value = 50000; + this.rare = 5; + return; + } + if (type >= 2162 && type <= 2168) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 275 + type - 2162; + this.width = 12; + this.height = 12; + return; + } + switch (type) + { + case 2169: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 136; + this.width = 12; + this.height = 12; + return; + case 2170: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 137; + this.width = 12; + this.height = 12; + return; + case 2171: + this.autoReuse = true; + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.createTile = 199; + this.width = 14; + this.height = 14; + this.value = 500; + return; + case 2172: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 283; + this.width = 28; + this.height = 14; + this.value = 500; + return; + case 2173: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 284; + this.width = 12; + this.height = 12; + return; + default: + if (type >= 2174 && type <= 2175) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 285 + type - 2174; + this.width = 12; + this.height = 12; + return; + } + if (type == 2176) + { + this.useStyle = 1; + this.useAnimation = 12; + this.useTime = 4; + this.knockBack = 6f; + this.useTurn = true; + this.autoReuse = true; + this.width = 20; + this.height = 12; + this.damage = 45; + this.pick = 200; + this.axe = 25; + this.UseSound = SoundID.Item1; + this.rare = 8; + this.value = Item.sellPrice(gold: 4); + this.melee = true; + --this.tileBoost; + return; + } + if (type == 2177) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 287; + this.width = 22; + this.height = 22; + this.value = Item.buyPrice(gold: 15); + this.rare = 6; + return; + } + if (type >= 2178 && type <= 2187) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 288 + type - 2178; + this.width = 12; + this.height = 12; + return; + } + if (type == 2189) + { + this.width = 18; + this.height = 18; + this.defense = 18; + this.headSlot = 156; + this.rare = 8; + this.value = 375000; + return; + } + if (type == 2188) + { + this.mana = 25; + this.UseSound = SoundID.Item43; + this.useStyle = 5; + this.damage = 44; + this.useAnimation = 30; + this.useTime = 30; + this.width = 40; + this.height = 40; + this.shoot = 355; + this.shootSpeed = 14f; + this.knockBack = 7f; + this.magic = true; + this.autoReuse = true; + this.rare = 7; + this.noMelee = true; + this.value = Item.sellPrice(gold: 7); + return; + } + if (type >= 2190 && type <= 2191) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 298 + type - 2190; + this.width = 12; + this.height = 12; + return; + } + if (type >= 2192 && type <= 2198 || type == 2203 || type == 2204) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = type != 2203 ? (type != 2204 ? 300 + type - 2192 : 308) : 307; + this.width = 12; + this.height = 12; + this.value = Item.buyPrice(gold: 10); + return; + } + switch (type) + { + case 2199: + this.width = 18; + this.height = 18; + this.defense = 23; + this.headSlot = 157; + this.rare = 8; + this.value = 300000; + return; + case 2200: + this.width = 18; + this.height = 18; + this.defense = 20; + this.bodySlot = 105; + this.rare = 8; + this.value = 240000; + return; + case 2201: + this.width = 18; + this.height = 18; + this.defense = 32; + this.bodySlot = 106; + this.rare = 8; + this.value = 240000; + return; + case 2202: + this.width = 18; + this.height = 18; + this.defense = 18; + this.legSlot = 98; + this.rare = 8; + this.value = 180000; + return; + case 2205: + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.makeNPC = (short) 148; + this.noUseGraphic = true; + return; + default: + if (type == 2206 || type == 2207) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 309 + type - 2206; + this.width = 12; + this.height = 12; + return; + } + if (type == 2208) + { + this.width = 18; + this.height = 20; + this.maxStack = 99; + return; + } + if (type == 2209) + { + this.UseSound = SoundID.Item3; + this.healMana = 300; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 99; + this.consumable = true; + this.width = 14; + this.height = 24; + this.rare = 4; + this.value = 1500; + return; + } + if (type >= 2210 && type <= 2213) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 138 + type - 2210; + this.width = 12; + this.height = 12; + return; + } + if (type >= 2214 && type <= 2217) + { + this.width = 30; + this.height = 30; + this.accessory = true; + this.rare = 3; + this.value = Item.buyPrice(gold: 10); + return; + } + switch (type) + { + case 2218: + this.width = 14; + this.height = 18; + this.maxStack = 99; + this.rare = 8; + this.value = Item.sellPrice(silver: 50); + return; + case 2219: + this.width = 24; + this.height = 24; + this.accessory = true; + this.value = Item.buyPrice(gold: 15); + this.rare = 4; + return; + case 2220: + this.width = 24; + this.height = 24; + this.accessory = true; + this.value = Item.buyPrice(gold: 16); + this.rare = 5; + return; + case 2221: + this.width = 24; + this.height = 24; + this.accessory = true; + this.rare = 5; + this.value = Item.buyPrice(gold: 16); + this.handOffSlot = (sbyte) 10; + this.handOnSlot = (sbyte) 17; + return; + case 2222: + this.width = 18; + this.height = 18; + this.headSlot = 158; + this.vanity = true; + this.value = Item.sellPrice(silver: 25); + return; + case 2223: + this.autoReuse = true; + this.useStyle = 5; + this.useAnimation = 20; + this.useTime = 20; + this.width = 50; + this.height = 18; + this.shoot = 10; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item75; + this.crit = 7; + this.damage = 85; + this.knockBack = 3f; + this.shootSpeed = 7.75f; + this.noMelee = true; + this.value = Item.buyPrice(gold: 45); + this.rare = 8; + this.ranged = true; + return; + case 2224: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 34; + this.placeStyle = 22; + this.width = 26; + this.height = 26; + this.value = 160; + return; + case 2225: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 93; + this.placeStyle = 17; + this.width = 10; + this.height = 24; + this.value = 120; + return; + case 2226: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 26; + this.value = 200; + return; + case 2227: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 100; + this.placeStyle = 17; + this.width = 20; + this.height = 20; + this.value = 120; + return; + case 2228: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 27; + this.width = 12; + this.height = 30; + this.value = 150; + return; + case 2229: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 18; + this.width = 28; + this.height = 14; + this.value = 150; + return; + case 2230: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 28; + this.width = 26; + this.height = 22; + this.value = 320; + return; + case 2231: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.autoReuse = true; + this.createTile = 79; + this.placeStyle = 21; + this.width = 28; + this.height = 20; + this.value = 600; + return; + case 2232: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 90; + this.placeStyle = 16; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2233: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 22; + return; + case 2234: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 13; + this.placeStyle = 5; + this.width = 16; + this.height = 24; + this.value = 20; + return; + case 2235: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 103; + this.placeStyle = 1; + this.width = 16; + this.height = 24; + this.value = 20; + return; + case 2236: + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 33; + this.width = 8; + this.height = 18; + this.value = Item.sellPrice(copper: 60); + this.placeStyle = 17; + return; + default: + if (type >= 2237 && type <= 2241) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 104; + this.placeStyle = 1 + type - 2237; + this.width = 20; + this.height = 20; + this.value = 300; + return; + } + if (type == 2242 || type == 2243) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 103; + this.placeStyle = 2 + type - 2242; + this.width = 16; + this.height = 24; + this.value = 20; + if (type != 2242) + return; + this.value = Item.buyPrice(silver: 20); + return; + } + if (type == 2244) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 13; + this.placeStyle = 6; + this.width = 16; + this.height = 24; + this.value = 20; + return; + } + if (type >= 2245 && type <= 2247) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 87; + this.placeStyle = 5 + type - 2245; + this.width = 20; + this.height = 20; + this.value = 300; + return; + } + if (type == 2248) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 24; + this.width = 26; + this.height = 20; + this.value = 300; + return; + } + if (type == 2249 || type == 2250) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 29 + type - 2249; + this.width = 26; + this.height = 22; + this.value = 2500; + return; + } + if (type >= 2251 && type <= 2253) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 19 + type - 2251; + this.width = 28; + this.height = 14; + this.value = 150; + return; + } + if (type >= 2254 && type <= 2256) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 87; + this.placeStyle = 8 + type - 2254; + this.width = 20; + this.height = 20; + this.value = 300; + return; + } + if (type == 2257 || type == 2258) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 13; + this.placeStyle = 7 + type - 2257; + this.width = 16; + this.height = 24; + this.value = 20; + if (type != 2258) + return; + this.value = Item.buyPrice(silver: 50); + return; + } + if (type == 2259) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 25; + this.width = 26; + this.height = 20; + this.value = 300; + return; + } + if (type >= 2260 && type <= 2262) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 311 + type - 2260; + this.width = 12; + this.height = 12; + this.value = Item.buyPrice(copper: 50); + return; + } + if (type >= 2263 && type <= 2264) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 142 + type - 2263; + this.width = 12; + this.height = 12; + return; + } + switch (type) + { + case 2265: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 28; + this.width = 14; + this.height = 28; + this.value = 200; + return; + case 2266: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 10; + this.height = 10; + this.buffType = 25; + this.buffTime = 14400; + this.rare = 1; + this.value = Item.buyPrice(silver: 5); + return; + case 2269: + this.autoReuse = false; + this.useStyle = 5; + this.useAnimation = 22; + this.useTime = 22; + this.width = 24; + this.height = 24; + this.shoot = 14; + this.knockBack = 4f; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item41; + this.damage = 20; + this.shootSpeed = 16f; + this.noMelee = true; + this.value = Item.buyPrice(gold: 10); + this.scale = 0.85f; + this.rare = 2; + this.ranged = true; + this.crit = 5; + return; + case 2270: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 7; + this.useTime = 7; + this.width = 50; + this.height = 18; + this.shoot = 10; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item41; + this.damage = 21; + this.shootSpeed = 8f; + this.noMelee = true; + this.value = Item.buyPrice(gold: 35); + this.knockBack = 1.5f; + this.rare = 4; + this.ranged = true; + return; + case 2271: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 144; + this.width = 12; + this.height = 12; + this.value = Item.buyPrice(silver: 2, copper: 50); + return; + case 2272: + this.useStyle = 5; + this.useAnimation = 20; + this.useTime = 20; + this.width = 38; + this.height = 10; + this.damage = 0; + this.scale = 0.9f; + this.shoot = 358; + this.shootSpeed = 11f; + this.value = Item.buyPrice(gold: 1, silver: 50); + return; + case 2273: + this.autoReuse = true; + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 22; + this.knockBack = 3.5f; + this.width = 34; + this.height = 34; + this.damage = 16; + this.crit = 15; + this.scale = 1f; + this.UseSound = SoundID.Item1; + this.rare = 1; + this.value = Item.buyPrice(gold: 10); + this.melee = true; + return; + case 2274: + this.flame = true; + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.holdStyle = 1; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 4; + this.placeStyle = 12; + this.width = 10; + this.height = 12; + this.value = Item.buyPrice(silver: 3); + return; + case 2275: + this.width = 18; + this.height = 18; + this.headSlot = 159; + this.value = Item.buyPrice(gold: 3); + this.defense = 2; + this.rare = 2; + return; + case 2276: + this.width = 24; + this.height = 24; + this.accessory = true; + this.vanity = true; + this.rare = 8; + this.value = Item.buyPrice(2); + this.handOnSlot = (sbyte) 16; + return; + case 2277: + this.width = 18; + this.height = 14; + this.bodySlot = 165; + this.value = Item.buyPrice(gold: 2); + this.defense = 4; + this.rare = 1; + return; + case 2278: + this.width = 18; + this.height = 14; + this.bodySlot = 166; + this.vanity = true; + this.value = Item.buyPrice(gold: 1); + return; + case 2279: + this.width = 18; + this.height = 14; + this.bodySlot = 167; + this.value = Item.buyPrice(gold: 3, silver: 50); + this.defense = 2; + this.rare = 1; + return; + case 2280: + this.width = 22; + this.height = 20; + this.accessory = true; + this.value = 400000; + this.rare = 7; + this.wingSlot = (sbyte) 24; + return; + default: + if (type >= 2281 && type <= 2283) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.buyPrice(gold: 1); + this.placeStyle = 22 + type - 2281; + return; + } + if (type >= 2284 && type <= 2287) + { + this.width = 26; + this.height = 30; + this.maxStack = 1; + this.value = Item.buyPrice(gold: 5); + this.rare = 5; + this.accessory = true; + this.backSlot = (sbyte) (3 + type - 2284); + this.frontSlot = (sbyte) (1 + type - 2284); + this.vanity = true; + return; + } + if (type == 2288) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 28; + this.width = 12; + this.height = 30; + this.value = 150; + return; + } + if (type == 2289 || type >= 2291 && type <= 2296) + { + this.useStyle = 1; + this.useAnimation = 8; + this.useTime = 8; + this.width = 24; + this.height = 28; + this.UseSound = SoundID.Item1; + this.shoot = 361 + type - 2291; + switch (type) + { + case 2289: + this.fishingPole = 5; + this.shootSpeed = 9f; + this.shoot = 360; + this.value = Item.sellPrice(copper: 60); + return; + case 2291: + this.fishingPole = 15; + this.shootSpeed = 11f; + this.value = Item.sellPrice(silver: 24); + return; + case 2292: + this.fishingPole = 27; + this.shootSpeed = 14f; + this.rare = 2; + this.value = Item.sellPrice(gold: 1); + return; + case 2293: + this.fishingPole = 20; + this.shootSpeed = 13f; + this.rare = 1; + this.value = Item.sellPrice(gold: 2, silver: 40); + return; + case 2294: + this.fishingPole = 50; + this.shootSpeed = 17f; + this.rare = 3; + this.value = Item.sellPrice(gold: 20); + return; + case 2295: + this.fishingPole = 30; + this.shootSpeed = 15f; + this.rare = 2; + this.value = Item.buyPrice(gold: 20); + return; + case 2296: + this.fishingPole = 40; + this.shootSpeed = 16f; + this.rare = 2; + this.value = Item.buyPrice(gold: 35); + return; + default: + return; + } + } + else + { + if (type >= 2421 && type <= 2422) + { + this.useStyle = 1; + this.useAnimation = 8; + this.useTime = 8; + this.width = 24; + this.height = 28; + this.UseSound = SoundID.Item1; + this.shoot = 381 + type - 2421; + if (type == 2421) + { + this.fishingPole = 22; + this.shootSpeed = 13.5f; + this.rare = 1; + this.value = Item.sellPrice(gold: 3, silver: 12); + return; + } + this.fishingPole = 45; + this.shootSpeed = 16.5f; + this.rare = 3; + this.value = Item.sellPrice(gold: 10); + return; + } + if (type == 2320) + { + this.autoReuse = true; + this.width = 26; + this.height = 26; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.useStyle = 1; + this.useAnimation = 24; + this.useTime = 14; + this.hammer = 70; + this.knockBack = 6f; + this.damage = 24; + this.scale = 1.05f; + this.UseSound = SoundID.Item1; + this.rare = 3; + this.melee = true; + return; + } + if (type == 2314) + { + this.maxStack = 30; + this.width = 26; + this.height = 26; + this.value = Item.sellPrice(silver: 15); + this.rare = 1; + this.UseSound = SoundID.Item3; + this.healLife = 120; + this.useStyle = 2; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.consumable = true; + this.potion = true; + return; + } + if (type >= 2290 && type <= 2321) + { + this.maxStack = 999; + this.width = 26; + this.height = 26; + this.value = Item.sellPrice(silver: 5); + if (type == 2308) + { + this.value = Item.sellPrice(gold: 10); + this.rare = 4; + } + if (type == 2312) + { + this.value = Item.sellPrice(silver: 50); + this.rare = 2; + } + if (type == 2317) + { + this.value = Item.sellPrice(gold: 3); + this.rare = 4; + } + if (type == 2310) + { + this.value = Item.sellPrice(gold: 1); + this.rare = 3; + } + if (type == 2321) + { + this.value = Item.sellPrice(silver: 25); + this.rare = 1; + } + if (type == 2315) + { + this.value = Item.sellPrice(silver: 15); + this.rare = 2; + } + if (type == 2303) + { + this.value = Item.sellPrice(silver: 15); + this.rare = 1; + } + if (type == 2304) + { + this.value = Item.sellPrice(silver: 30); + this.rare = 1; + } + if (type == 2316) + this.value = Item.sellPrice(silver: 15); + if (type == 2311) + { + this.value = Item.sellPrice(silver: 15); + this.rare = 1; + } + if (type == 2313) + { + this.value = Item.sellPrice(silver: 15); + this.rare = 1; + } + if (type == 2306) + { + this.value = Item.sellPrice(silver: 15); + this.rare = 1; + } + if (type == 2307) + { + this.value = Item.sellPrice(silver: 25); + this.rare = 2; + } + if (type == 2319) + { + this.value = Item.sellPrice(silver: 15); + this.rare = 1; + } + if (type == 2318) + { + this.value = Item.sellPrice(silver: 15); + this.rare = 1; + } + if (type == 2298) + this.value = Item.sellPrice(silver: 7, copper: 50); + if (type == 2309) + { + this.value = Item.sellPrice(silver: 7, copper: 50); + this.rare = 1; + } + if (type == 2300) + this.value = Item.sellPrice(silver: 7, copper: 50); + if (type == 2301) + this.value = Item.sellPrice(silver: 7, copper: 50); + if (type == 2302) + this.value = Item.sellPrice(silver: 15); + if (type == 2299) + this.value = Item.sellPrice(silver: 7, copper: 50); + if (type != 2305) + return; + this.value = Item.sellPrice(silver: 7, copper: 50); + this.rare = 1; + return; + } + switch (type) + { + case 2322: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 104; + this.buffTime = 36000; + this.value = 1000; + this.rare = 1; + return; + case 2323: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 105; + this.buffTime = 28800; + this.value = 1000; + this.rare = 1; + return; + case 2324: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 106; + this.buffTime = 28800; + this.value = 1000; + this.rare = 1; + return; + case 2325: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 107; + this.buffTime = 162000; + this.value = 1000; + this.rare = 1; + return; + case 2326: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 108; + this.buffTime = 28800; + this.value = 1000; + this.rare = 1; + return; + case 2327: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 109; + this.buffTime = 28800; + this.value = 1000; + this.rare = 1; + return; + case 2328: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 110; + this.buffTime = 28800; + this.value = 1000; + this.rare = 1; + return; + case 2329: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 111; + this.buffTime = 36000; + this.value = 1000; + this.rare = 1; + return; + case 2330: + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 35; + this.width = 24; + this.height = 28; + this.damage = 24; + this.knockBack = 7f; + this.scale = 1.15f; + this.UseSound = SoundID.Item1; + this.rare = 1; + this.value = Item.sellPrice(gold: 1); + this.melee = true; + return; + case 2331: + this.useStyle = 5; + this.useAnimation = 20; + this.useTime = 20; + this.shootSpeed = 4f; + this.knockBack = 6.5f; + this.width = 40; + this.height = 40; + this.damage = 70; + this.crit = 20; + this.UseSound = SoundID.Item1; + this.shoot = 367; + this.rare = 7; + this.value = Item.sellPrice(gold: 1); + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + return; + case 2332: + this.useStyle = 5; + this.useAnimation = 20; + this.useTime = 20; + this.shootSpeed = 4f; + this.knockBack = 4.25f; + this.width = 40; + this.height = 40; + this.damage = 19; + this.UseSound = SoundID.Item1; + this.shoot = 368; + this.rare = 2; + this.value = Item.sellPrice(silver: 50); + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + return; + case 2333: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 145; + this.width = 12; + this.height = 12; + return; + case 2334: + this.width = 12; + this.height = 12; + this.rare = 1; + this.maxStack = 99; + this.value = Item.sellPrice(silver: 10); + this.createTile = 376; + this.placeStyle = 0; + this.useAnimation = 15; + this.useTime = 15; + this.autoReuse = true; + this.useStyle = 1; + this.consumable = true; + return; + case 2335: + this.width = 12; + this.height = 12; + this.rare = 2; + this.maxStack = 99; + this.value = Item.sellPrice(silver: 50); + this.createTile = 376; + this.placeStyle = 1; + this.useAnimation = 15; + this.useTime = 15; + this.autoReuse = true; + this.useStyle = 1; + this.consumable = true; + return; + case 2336: + this.width = 12; + this.height = 12; + this.rare = 3; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 2); + this.createTile = 376; + this.placeStyle = 2; + this.useAnimation = 15; + this.useTime = 15; + this.autoReuse = true; + this.useStyle = 1; + this.consumable = true; + return; + default: + if (type >= 2337 && type <= 2339) + { + this.width = 12; + this.height = 12; + this.rare = -1; + this.maxStack = 99; + return; + } + switch (type) + { + case 2340: + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 7; + this.useTurn = true; + this.autoReuse = true; + this.width = 16; + this.height = 16; + this.maxStack = 999; + this.createTile = 314; + this.placeStyle = 0; + this.consumable = true; + this.cartTrack = true; + this.tileBoost = 5; + return; + case 2341: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 22; + this.useTime = 18; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.damage = 16; + this.pick = 59; + this.scale = 1.15f; + this.UseSound = SoundID.Item1; + this.knockBack = 3f; + this.rare = 3; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.melee = true; + return; + case 2342: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 8; + this.shootSpeed = 48f; + this.knockBack = 2.25f; + this.width = 20; + this.height = 12; + this.damage = 13; + this.axe = 14; + this.UseSound = SoundID.Item23; + this.shoot = 369; + this.rare = 3; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + return; + case 2343: + this.width = 48; + this.height = 28; + this.mountType = 6; + this.rare = 1; + this.value = Item.sellPrice(silver: 2); + return; + case 2344: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 112; + this.buffTime = 28800; + this.value = 1000; + this.rare = 1; + return; + case 2345: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 113; + this.buffTime = 28800; + this.value = 1000; + this.rare = 1; + return; + case 2346: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 114; + this.buffTime = 14400; + this.value = 1000; + this.rare = 1; + return; + case 2347: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 115; + this.buffTime = 14400; + this.value = 1000; + this.rare = 1; + return; + case 2348: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 116; + this.buffTime = 14400; + this.value = 1000; + this.rare = 1; + return; + case 2349: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 117; + this.buffTime = 14400; + this.value = 1000; + this.rare = 1; + return; + case 2350: + this.UseSound = SoundID.Item6; + this.useStyle = 6; + this.useTurn = true; + this.useTime = this.useAnimation = 30; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.value = 1000; + this.rare = 1; + return; + case 2351: + this.UseSound = SoundID.Item6; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.value = 1000; + this.rare = 1; + return; + case 2352: + this.useStyle = 1; + this.shootSpeed = 9f; + this.shoot = 370; + this.width = 18; + this.height = 20; + this.maxStack = 99; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 200; + return; + case 2353: + this.useStyle = 1; + this.shootSpeed = 9f; + this.shoot = 371; + this.width = 18; + this.height = 20; + this.maxStack = 99; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 200; + return; + case 2354: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 121; + this.buffTime = 28800; + this.rare = 1; + this.value = 1000; + return; + case 2355: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 122; + this.buffTime = 28800; + this.value = 1000; + this.rare = 1; + return; + case 2356: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 123; + this.buffTime = 10800; + this.value = 1000; + this.rare = 1; + return; + case 2357: + this.autoReuse = true; + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.createTile = 82; + this.placeStyle = 6; + this.width = 12; + this.height = 14; + this.value = 80; + return; + case 2358: + this.maxStack = 999; + this.width = 12; + this.height = 14; + this.value = 100; + return; + case 2359: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 124; + this.buffTime = 54000; + this.value = 1000; + this.rare = 1; + return; + case 2360: + this.noUseGraphic = true; + this.damage = 0; + this.useStyle = 5; + this.shootSpeed = 13f; + this.shoot = 372; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.value = 20000; + return; + case 2361: + this.width = 18; + this.height = 18; + this.defense = 4; + this.headSlot = 160; + this.rare = 3; + this.value = 45000; + return; + case 2362: + this.width = 18; + this.height = 18; + this.defense = 5; + this.bodySlot = 168; + this.rare = 3; + this.value = 30000; + return; + case 2363: + this.width = 18; + this.height = 18; + this.defense = 4; + this.legSlot = 103; + this.rare = 3; + this.value = 30000; + return; + case 2364: + this.mana = 10; + this.damage = 9; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 373; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item76; + this.useAnimation = 22; + this.useTime = 22; + this.rare = 3; + this.noMelee = true; + this.knockBack = 2f; + this.buffType = 125; + this.value = 10000; + this.summon = true; + return; + case 2365: + this.mana = 10; + this.damage = 17; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 375; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item77; + this.useAnimation = 36; + this.useTime = 36; + this.rare = 3; + this.noMelee = true; + this.knockBack = 2f; + this.buffType = 126; + this.value = 10000; + this.summon = true; + return; + case 2366: + this.mana = 10; + this.damage = 26; + this.useStyle = 1; + this.shootSpeed = 14f; + this.shoot = 377; + this.width = 18; + this.height = 20; + this.UseSound = SoundID.Item78; + this.useAnimation = 30; + this.useTime = 30; + this.noMelee = true; + this.value = Item.sellPrice(gold: 5); + this.knockBack = 7.5f; + this.rare = 4; + this.summon = true; + this.sentry = true; + return; + case 2367: + this.width = 18; + this.height = 18; + this.defense = 1; + this.headSlot = 161; + this.rare = 1; + this.value = Item.sellPrice(gold: 1); + return; + case 2368: + this.width = 18; + this.height = 18; + this.bodySlot = 169; + this.defense = 2; + this.rare = 1; + this.value = Item.sellPrice(gold: 1); + return; + case 2369: + this.width = 18; + this.height = 18; + this.legSlot = 104; + this.defense = 1; + this.rare = 1; + this.value = Item.sellPrice(gold: 1); + return; + case 2370: + this.width = 18; + this.height = 18; + this.headSlot = 162; + this.rare = 4; + this.value = Item.sellPrice(silver: 75); + this.defense = 5; + return; + case 2371: + this.width = 18; + this.height = 18; + this.bodySlot = 170; + this.rare = 4; + this.value = Item.sellPrice(silver: 75); + this.defense = 8; + return; + case 2372: + this.width = 18; + this.height = 18; + this.legSlot = 105; + this.rare = 4; + this.value = Item.sellPrice(silver: 75); + this.defense = 7; + return; + default: + if (type >= 2373 && type <= 2375) + { + this.width = 26; + this.height = 30; + this.maxStack = 1; + this.value = Item.sellPrice(gold: 1); + this.rare = 1; + this.accessory = true; + return; + } + if (type >= 2376 && type <= 2385) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 87; + this.placeStyle = 11 + type - 2376; + this.width = 20; + this.height = 20; + this.value = 300; + if (type != 2379) + return; + this.value = Item.buyPrice(gold: 10); + return; + } + if (type >= 2386 && type <= 2396) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 88; + this.placeStyle = 5 + type - 2386; + this.width = 20; + this.height = 20; + this.value = 300; + if (type != 2389) + return; + this.value = Item.buyPrice(gold: 10); + return; + } + if (type >= 2397 && type <= 2416) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 89; + this.placeStyle = 1 + type - 2397; + this.width = 20; + this.height = 20; + this.value = 300; + return; + } + switch (type) + { + case 2417: + this.width = 18; + this.height = 18; + this.headSlot = 163; + this.vanity = true; + this.value = Item.sellPrice(gold: 1); + return; + case 2418: + this.width = 18; + this.height = 18; + this.bodySlot = 171; + this.vanity = true; + this.value = Item.sellPrice(gold: 1); + return; + case 2419: + this.width = 18; + this.height = 18; + this.legSlot = 106; + this.vanity = true; + this.value = Item.sellPrice(gold: 1); + return; + case 2420: + this.damage = 0; + this.useStyle = 1; + this.shoot = 380; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.value = Item.sellPrice(gold: 3); + this.buffType = (int) sbyte.MaxValue; + return; + case 2423: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 1; + this.value = 50000; + this.shoeSlot = (sbyte) 15; + return; + case 2424: + this.noMelee = true; + this.useStyle = 1; + this.shootSpeed = 20f; + this.shoot = 383; + this.damage = 55; + this.knockBack = 5f; + this.width = 34; + this.height = 34; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.noUseGraphic = true; + this.rare = 3; + this.value = 50000; + this.melee = true; + return; + case 2428: + this.useStyle = 1; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item79; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 8; + this.noMelee = true; + this.mountType = 1; + this.value = Item.sellPrice(gold: 5); + return; + case 2429: + this.useStyle = 1; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item80; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 8; + this.noMelee = true; + this.mountType = 2; + this.value = Item.sellPrice(gold: 5); + return; + case 2430: + this.useStyle = 1; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item81; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 8; + this.noMelee = true; + this.mountType = 3; + this.value = Item.sellPrice(gold: 5); + return; + case 2431: + this.width = 18; + this.height = 16; + this.maxStack = 99; + this.value = 100; + return; + default: + if (type >= 2432 && type <= 2434) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 146 + type - 2432; + this.width = 12; + this.height = 12; + if (type != 2434) + return; + this.value = Item.buyPrice(copper: 50); + return; + } + if (type == 2435) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 315; + this.width = 12; + this.height = 12; + this.value = Item.buyPrice(copper: 50); + return; + } + if (type >= 2436 && type <= 2438) + { + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.noUseGraphic = true; + this.bait = 20; + this.value = Item.sellPrice(gold: 3, silver: 50); + return; + } + if (type >= 2439 && type <= 2441) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 316 + type - 2439; + this.width = 12; + this.height = 12; + return; + } + if (type >= 2442 && type <= 2449) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 50); + this.placeStyle = 46 + type - 2442; + return; + } + if (type >= 2450 && type <= 2488) + { + this.DefaultToQuestFish(); + return; + } + switch (type) + { + case 2413: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 89; + this.placeStyle = 23; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2489: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.placeStyle = 54; + this.rare = 1; + return; + case 2490: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 319; + this.width = 12; + this.height = 12; + this.value = Item.sellPrice(gold: 3); + return; + case 2491: + this.useStyle = 1; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item25; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 8; + this.noMelee = true; + this.mountType = 4; + this.value = Item.sellPrice(gold: 5); + return; + case 2492: + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 7; + this.useTurn = true; + this.autoReuse = true; + this.width = 16; + this.height = 16; + this.maxStack = 99; + this.createTile = 314; + this.placeStyle = 1; + this.consumable = true; + this.cartTrack = true; + this.mech = true; + this.tileBoost = 2; + this.value = Item.sellPrice(silver: 10); + return; + case 2493: + this.width = 28; + this.height = 20; + this.headSlot = 164; + this.rare = 1; + this.value = Item.sellPrice(silver: 75); + this.vanity = true; + return; + case 2494: + this.width = 22; + this.height = 20; + this.accessory = true; + this.value = Item.buyPrice(gold: 40); + this.rare = 4; + this.wingSlot = (sbyte) 25; + return; + case 2495: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.placeStyle = 25; + return; + case 2496: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 320; + this.placeStyle = 0; + this.width = 22; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + return; + case 2497: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 50); + this.placeStyle = 26; + return; + case 2498: + this.width = 18; + this.height = 18; + this.headSlot = 165; + this.vanity = true; + this.value = Item.sellPrice(gold: 1); + return; + case 2499: + this.width = 18; + this.height = 18; + this.bodySlot = 172; + this.vanity = true; + this.value = Item.sellPrice(gold: 1); + return; + case 2500: + this.width = 18; + this.height = 18; + this.legSlot = 107; + this.vanity = true; + this.value = Item.sellPrice(gold: 1); + return; + case 2501: + this.width = 18; + this.height = 12; + this.maxStack = 1; + this.value = Item.sellPrice(gold: 1); + this.rare = 5; + this.accessory = true; + this.faceSlot = (sbyte) 8; + this.vanity = true; + return; + case 2502: + this.useStyle = 1; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item25; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 8; + this.noMelee = true; + this.mountType = 5; + this.value = Item.sellPrice(gold: 5); + return; + case 2503: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 321; + this.width = 8; + this.height = 10; + return; + case 2504: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 322; + this.width = 8; + this.height = 10; + return; + case 2505: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 149; + this.width = 12; + this.height = 12; + return; + case 2506: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 151; + this.width = 12; + this.height = 12; + return; + case 2507: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 150; + this.width = 12; + this.height = 12; + return; + case 2508: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 152; + this.width = 12; + this.height = 12; + return; + case 2509: + this.width = 18; + this.height = 18; + this.defense = 1; + this.headSlot = 166; + return; + case 2510: + this.width = 18; + this.height = 18; + this.defense = 1; + this.bodySlot = 173; + return; + case 2511: + this.width = 18; + this.height = 18; + this.defense = 1; + this.legSlot = 108; + return; + case 2512: + this.width = 18; + this.height = 18; + this.defense = 1; + this.headSlot = 167; + return; + case 2513: + this.width = 18; + this.height = 18; + this.defense = 1; + this.bodySlot = 174; + return; + case 2514: + this.width = 18; + this.height = 18; + this.defense = 1; + this.legSlot = 109; + return; + case 2515: + this.useStyle = 5; + this.useAnimation = 29; + this.useTime = 29; + this.width = 12; + this.height = 28; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 6; + this.shootSpeed = 6.6f; + this.noMelee = true; + this.value = 100; + this.ranged = true; + return; + case 2516: + this.autoReuse = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 33; + this.useTime = 23; + this.hammer = 35; + this.width = 24; + this.height = 28; + this.damage = 4; + this.knockBack = 5.5f; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.value = 50; + this.melee = true; + return; + case 2517: + this.useStyle = 1; + this.useTurn = false; + this.useAnimation = 23; + this.useTime = 23; + this.width = 24; + this.height = 28; + this.damage = 8; + this.knockBack = 5f; + this.UseSound = SoundID.Item1; + this.scale = 1f; + this.value = 100; + this.melee = true; + return; + case 2518: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 17; + this.width = 8; + this.height = 10; + return; + case 2519: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 90; + this.placeStyle = 17; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2520: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.autoReuse = true; + this.createTile = 79; + this.placeStyle = 22; + this.width = 28; + this.height = 20; + this.value = 2000; + return; + case 2521: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 89; + this.placeStyle = 21; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2522: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 100; + this.placeStyle = 18; + this.width = 20; + this.height = 20; + this.value = 1500; + return; + case 2523: + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 33; + this.placeStyle = 18; + this.width = 8; + this.value = Item.sellPrice(copper: 60); + this.height = 18; + return; + case 2524: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 29; + this.width = 12; + this.height = 30; + this.value = 150; + return; + case 2525: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 34; + this.placeStyle = 23; + this.width = 26; + this.height = 26; + this.value = 3000; + return; + case 2526: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 31; + this.width = 26; + this.height = 22; + this.value = 500; + return; + case 2527: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 89; + this.placeStyle = 22; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2528: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 29; + this.width = 14; + this.height = 28; + this.value = 200; + return; + case 2529: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 88; + this.placeStyle = 16; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2530: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 27; + this.value = 150; + return; + case 2531: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 87; + this.placeStyle = 21; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2532: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 26; + this.width = 26; + this.height = 20; + this.value = 300; + return; + case 2533: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 93; + this.placeStyle = 18; + this.width = 10; + this.height = 24; + this.value = 500; + return; + case 2534: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 22; + this.width = 28; + this.height = 14; + this.value = 150; + return; + case 2535: + this.mana = 10; + this.damage = 30; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 387; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item82; + this.useAnimation = 36; + this.useTime = 36; + this.rare = 5; + this.noMelee = true; + this.knockBack = 2f; + this.buffType = 134; + this.value = Item.buyPrice(gold: 10); + this.summon = true; + return; + case 2536: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 23; + return; + case 2537: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 90; + this.placeStyle = 18; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2538: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.autoReuse = true; + this.createTile = 79; + this.placeStyle = 23; + this.width = 28; + this.height = 20; + this.value = 2000; + return; + case 2539: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 89; + this.placeStyle = 23; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2540: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 24; + return; + case 2541: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 100; + this.placeStyle = 19; + this.width = 20; + this.height = 20; + this.value = 1500; + return; + case 2542: + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 33; + this.placeStyle = 19; + this.width = 8; + this.value = Item.sellPrice(copper: 60); + this.height = 18; + return; + case 2543: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 34; + this.placeStyle = 24; + this.width = 26; + this.height = 26; + this.value = 3000; + return; + case 2544: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 32; + this.width = 26; + this.height = 22; + this.value = 500; + return; + case 2545: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 88; + this.placeStyle = 17; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2546: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 28; + this.value = 150; + return; + case 2547: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 93; + this.placeStyle = 19; + this.width = 10; + this.height = 24; + this.value = 500; + return; + case 2548: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 87; + this.placeStyle = 22; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2549: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 18; + this.width = 8; + this.height = 10; + return; + case 2550: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 27; + this.width = 26; + this.height = 20; + this.value = 300; + return; + case 2551: + this.mana = 10; + this.damage = 26; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 390; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item83; + this.useAnimation = 36; + this.useTime = 36; + this.rare = 4; + this.noMelee = true; + this.knockBack = 3f; + this.buffType = 133; + this.value = Item.buyPrice(gold: 5); + this.summon = true; + return; + case 2552: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 90; + this.placeStyle = 19; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2553: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.autoReuse = true; + this.createTile = 79; + this.placeStyle = 24; + this.width = 28; + this.height = 20; + this.value = 2000; + return; + case 2554: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 25; + return; + case 2555: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 100; + this.placeStyle = 20; + this.width = 20; + this.height = 20; + this.value = 1500; + return; + case 2556: + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 33; + this.placeStyle = 20; + this.width = 8; + this.value = Item.sellPrice(copper: 60); + this.height = 18; + return; + case 2557: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 30; + this.width = 12; + this.height = 30; + this.value = 150; + return; + case 2558: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 34; + this.placeStyle = 25; + this.width = 26; + this.height = 26; + this.value = 3000; + return; + case 2559: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 33; + this.width = 26; + this.height = 22; + this.value = 500; + return; + case 2560: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 104; + this.placeStyle = 6; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2561: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 30; + this.width = 14; + this.height = 28; + this.value = 200; + return; + case 2562: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 88; + this.placeStyle = 18; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2563: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 93; + this.placeStyle = 20; + this.width = 10; + this.height = 24; + this.value = 500; + return; + case 2564: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.placeStyle = 29; + this.width = 12; + this.height = 28; + this.value = 150; + return; + case 2565: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 87; + this.placeStyle = 23; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2566: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 19; + this.width = 8; + this.height = 10; + return; + case 2567: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 90; + this.placeStyle = 20; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2568: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.autoReuse = true; + this.createTile = 79; + this.placeStyle = 25; + this.width = 28; + this.height = 20; + this.value = 2000; + return; + case 2569: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.placeStyle = 26; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2570: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 100; + this.placeStyle = 21; + this.width = 20; + this.height = 20; + this.value = 1500; + return; + case 2571: + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 33; + this.placeStyle = 21; + this.width = 8; + this.value = Item.sellPrice(copper: 60); + this.height = 18; + return; + case 2572: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 31; + this.width = 12; + this.height = 30; + this.value = 150; + return; + case 2573: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 34; + this.placeStyle = 26; + this.width = 26; + this.height = 26; + this.value = 3000; + return; + case 2574: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 34; + this.width = 26; + this.height = 22; + this.value = 500; + return; + case 2575: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 104; + this.placeStyle = 7; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2576: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 31; + this.width = 14; + this.height = 28; + this.value = 200; + return; + case 2577: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 88; + this.placeStyle = 19; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2578: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 93; + this.placeStyle = 21; + this.width = 10; + this.height = 24; + this.value = 500; + return; + case 2579: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.placeStyle = 30; + this.width = 12; + this.height = 28; + this.value = 150; + return; + case 2580: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 87; + this.placeStyle = 24; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2581: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 20; + this.width = 8; + this.height = 10; + return; + case 2582: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 89; + this.placeStyle = 25; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2583: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 29; + this.width = 26; + this.height = 20; + this.value = 300; + return; + case 2584: + this.mana = 10; + this.damage = 40; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 393; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item44; + this.useAnimation = 36; + this.useTime = 36; + this.rare = 5; + this.noMelee = true; + this.knockBack = 6f; + this.buffType = 135; + this.value = Item.buyPrice(gold: 5); + this.summon = true; + return; + case 2585: + this.noUseGraphic = true; + this.damage = 0; + this.useStyle = 5; + this.shootSpeed = 13f; + this.shoot = 396; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.value = 20000; + return; + case 2586: + this.useStyle = 5; + this.shootSpeed = 5.5f; + this.shoot = 397; + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 45; + this.useTime = 45; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 75; + this.damage = 60; + this.knockBack = 8f; + this.ranged = true; + return; + case 2587: + this.damage = 0; + this.useStyle = 1; + this.shoot = 398; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.buffType = 136; + this.value = Item.sellPrice(gold: 2); + return; + case 2588: + this.width = 28; + this.height = 20; + this.headSlot = 168; + this.rare = 1; + this.value = Item.sellPrice(silver: 75); + this.vanity = true; + return; + case 2589: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.placeStyle = 55; + this.rare = 1; + return; + case 2590: + this.useStyle = 5; + this.shootSpeed = 6.5f; + this.shoot = 399; + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 40; + this.useTime = 40; + this.noUseGraphic = true; + this.noMelee = true; + this.value = Item.sellPrice(silver: 1); + this.damage = 23; + this.knockBack = 7f; + this.ranged = true; + this.rare = 1; + return; + default: + if (type >= 2591 && type <= 2606) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 104; + this.placeStyle = 8 + type - 2591; + this.width = 20; + this.height = 20; + this.value = 300; + return; + } + switch (type) + { + case 2607: + this.maxStack = 99; + this.width = 12; + this.height = 12; + this.rare = 4; + this.value = Item.sellPrice(silver: 5); + return; + case 2608: + this.autoReuse = true; + this.scale = 1.05f; + this.useStyle = 1; + this.useAnimation = 20; + this.knockBack = 6f; + this.width = 24; + this.height = 28; + this.damage = 25; + this.scale = 1.05f; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = 10000; + this.melee = true; + return; + case 2609: + this.width = 22; + this.height = 20; + this.accessory = true; + this.value = Item.buyPrice(gold: 40); + this.rare = 8; + this.wingSlot = (sbyte) 26; + return; + case 2610: + this.useStyle = 5; + this.useAnimation = 12; + this.useTime = 12; + this.width = 38; + this.height = 10; + this.damage = 0; + this.scale = 0.9f; + this.shoot = 406; + this.shootSpeed = 8f; + this.autoReuse = true; + this.value = Item.buyPrice(gold: 1, silver: 50); + return; + case 2611: + this.autoReuse = false; + this.useStyle = 5; + this.useAnimation = 20; + this.useTime = 20; + this.autoReuse = true; + this.knockBack = 4.5f; + this.width = 30; + this.height = 10; + this.damage = 66; + this.shoot = 404; + this.shootSpeed = 14f; + this.UseSound = SoundID.Item1; + this.rare = 8; + this.value = Item.sellPrice(gold: 5); + this.melee = true; + this.noUseGraphic = true; + return; + default: + if (type >= 2612 && type <= 2620) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = type > 2614 ? 41 + type - 2615 : 35 + (type - 2612) * 2; + this.width = 26; + this.height = 22; + this.value = 500; + return; + } + switch (type) + { + case 2621: + this.mana = 10; + this.damage = 50; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 407; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item44; + this.useAnimation = 36; + this.useTime = 36; + this.rare = 8; + this.noMelee = true; + this.knockBack = 2f; + this.buffType = 139; + this.value = Item.sellPrice(gold: 5); + this.summon = true; + return; + case 2622: + this.mana = 16; + this.damage = 60; + this.useStyle = 5; + this.shootSpeed = 6f; + this.shoot = 409; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item84; + this.useAnimation = 40; + this.useTime = 20; + this.autoReuse = true; + this.rare = 8; + this.noMelee = true; + this.knockBack = 5f; + this.scale = 0.9f; + this.value = Item.sellPrice(gold: 5); + this.magic = true; + return; + case 2624: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 24; + this.useTime = 24; + this.width = 50; + this.height = 18; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 60; + this.shootSpeed = 10f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 5); + this.ranged = true; + this.rare = 8; + this.knockBack = 2f; + return; + default: + if (type == 2625 || type == 2626) + { + this.DefaultToSeaShelll(); + return; + } + if (type >= 2627 && type <= 2630) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 21 + type - 2627; + this.width = 8; + this.height = 10; + return; + } + if (type >= 2631 && type <= 2633) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 24 + type - 2631; + this.width = 28; + this.height = 14; + this.value = 150; + return; + } + if (type >= 2634 && type <= 2636) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 89; + this.placeStyle = 26 + type - 2634; + this.width = 20; + this.height = 20; + this.value = 300; + return; + } + if (type == 2623) + { + this.autoReuse = true; + this.mana = 4; + this.UseSound = SoundID.Item85; + this.useStyle = 5; + this.damage = 70; + this.useAnimation = 9; + this.useTime = 9; + this.width = 40; + this.height = 40; + this.shoot = 410; + this.shootSpeed = 11f; + this.knockBack = 3f; + this.value = Item.sellPrice(gold: 5); + this.magic = true; + this.rare = 8; + this.noMelee = true; + return; + } + if (type >= 2637 && type <= 2640) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 88; + this.placeStyle = 20 + type - 2637; + this.width = 20; + this.height = 20; + this.value = 300; + return; + } + if (type == 2641 || type == 2642) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.placeStyle = type != 2641 ? 32 : 31; + this.width = 12; + this.height = 28; + this.value = 150; + return; + } + if (type >= 2643 && type <= 2647) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 93; + this.placeStyle = 22 + type - 2643; + this.width = 10; + this.height = 24; + this.value = 500; + return; + } + if (type >= 2648 && type <= 2651) + { + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 33; + this.width = 8; + this.height = 18; + this.value = Item.sellPrice(copper: 60); + this.placeStyle = 22 + type - 2648; + return; + } + if (type >= 2652 && type <= 2657) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 34; + this.placeStyle = 27 + type - 2652; + this.width = 26; + this.height = 26; + this.value = 3000; + return; + } + if (type >= 2658 && type <= 2663) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 90; + this.placeStyle = 21 + type - 2658; + this.width = 20; + this.height = 20; + this.value = 300; + return; + } + if (type >= 2664 && type <= 2668) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 100; + this.placeStyle = 22 + type - 2664; + this.width = 20; + this.height = 20; + this.value = 1500; + return; + } + switch (type) + { + case 2669: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.autoReuse = true; + this.createTile = 79; + this.placeStyle = 26; + this.width = 28; + this.height = 20; + this.value = 2000; + return; + case 2670: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 27; + return; + case 2671: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 87; + this.placeStyle = 25; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2672: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 50; + return; + case 2673: + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.makeNPC = (short) 374; + this.noUseGraphic = true; + this.bait = 666; + return; + default: + if (type >= 2674 && type <= 2676) + { + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + if (type == 2675) + { + this.bait = 30; + this.value = Item.sellPrice(silver: 3); + return; + } + if (type == 2676) + { + this.bait = 50; + this.value = Item.sellPrice(silver: 10); + return; + } + this.bait = 15; + this.value = Item.sellPrice(silver: 1); + return; + } + if (type >= 2677 && type <= 2690) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + switch (type) + { + case 2677: + this.createWall = 153; + break; + case 2678: + this.createWall = 157; + break; + case 2679: + this.createWall = 154; + break; + case 2680: + this.createWall = 158; + break; + case 2681: + this.createWall = 155; + break; + case 2682: + this.createWall = 159; + break; + case 2683: + this.createWall = 156; + break; + case 2684: + this.createWall = 160; + break; + case 2685: + this.createWall = 164; + break; + case 2686: + this.createWall = 161; + break; + case 2687: + this.createWall = 165; + break; + case 2688: + this.createWall = 162; + break; + case 2689: + this.createWall = 166; + break; + case 2690: + this.createWall = 163; + break; + } + this.width = 12; + this.height = 12; + return; + } + switch (type) + { + case 2691: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 167; + this.width = 12; + this.height = 12; + return; + case 2692: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 325; + this.width = 12; + this.height = 12; + return; + case 2693: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 326; + this.width = 12; + this.height = 12; + return; + case 2694: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 327; + this.width = 12; + this.height = 12; + return; + case 2695: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 328; + this.width = 12; + this.height = 12; + return; + case 2696: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 168; + this.width = 12; + this.height = 12; + return; + case 2697: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 329; + this.width = 12; + this.height = 12; + return; + case 2698: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 169; + this.width = 12; + this.height = 12; + return; + case 2699: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 471; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(copper: 50); + return; + case 2700: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 335; + this.width = 26; + this.height = 22; + this.value = Item.buyPrice(gold: 5); + this.mech = true; + return; + case 2701: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 336; + this.width = 12; + this.height = 12; + return; + default: + if (type >= 2702 && type <= 2737) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 337; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = type - 2702; + return; + } + switch (type) + { + case 2738: + this.createTile = 338; + this.placeStyle = 0; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.width = 12; + this.height = 30; + this.value = Item.buyPrice(gold: 3); + this.mech = true; + return; + case 2739: + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 7; + this.useTurn = true; + this.autoReuse = true; + this.width = 16; + this.height = 16; + this.maxStack = 99; + this.createTile = 314; + this.placeStyle = 2; + this.consumable = true; + this.cartTrack = true; + this.mech = true; + this.tileBoost = 2; + this.value = Item.buyPrice(silver: 50); + return; + case 2740: + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.makeNPC = (short) 377; + this.noUseGraphic = true; + this.bait = 10; + return; + case 2741: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 339; + this.width = 12; + this.height = 12; + return; + case 2742: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 31; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + return; + case 2743: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 30; + this.width = 26; + this.height = 20; + this.value = 300; + return; + case 2744: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 25; + this.width = 8; + this.height = 10; + return; + case 2745: + this.useStyle = 1; + this.useTurn = false; + this.useAnimation = 23; + this.useTime = 23; + this.width = 24; + this.height = 28; + this.damage = 8; + this.knockBack = 5f; + this.UseSound = SoundID.Item1; + this.scale = 1f; + this.value = 100; + this.melee = true; + return; + case 2746: + this.autoReuse = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 33; + this.useTime = 23; + this.hammer = 35; + this.width = 24; + this.height = 28; + this.damage = 4; + this.knockBack = 5.5f; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.value = 50; + this.melee = true; + return; + case 2747: + this.useStyle = 5; + this.useAnimation = 29; + this.useTime = 29; + this.width = 12; + this.height = 28; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 6; + this.shootSpeed = 6.6f; + this.noMelee = true; + this.value = 100; + this.ranged = true; + return; + case 2748: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 47; + this.width = 26; + this.height = 22; + this.value = 500; + return; + case 2749: + this.mana = 10; + this.damage = 36; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 423; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item44; + this.useAnimation = 36; + this.useTime = 36; + this.rare = 8; + this.noMelee = true; + this.knockBack = 2f; + this.buffType = 140; + this.value = Item.sellPrice(gold: 10); + this.summon = true; + return; + case 2750: + this.autoReuse = true; + this.mana = 13; + this.useStyle = 5; + this.damage = 50; + this.useAnimation = 10; + this.useTime = 10; + this.width = 40; + this.height = 40; + this.shoot = 424; + this.shootSpeed = 10f; + this.knockBack = 4.5f; + this.value = Item.sellPrice(gold: 2); + this.magic = true; + this.rare = 5; + this.noMelee = true; + this.UseSound = SoundID.Item88; + return; + default: + if (type >= 2751 && type <= 2755) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 340 + type - 2751; + this.width = 12; + this.height = 12; + return; + } + switch (type) + { + case 2756: + this.UseSound = SoundID.Item6; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.value = 1000; + this.rare = 1; + return; + case 2757: + this.width = 18; + this.height = 18; + this.defense = 14; + this.headSlot = 169; + this.glowMask = (short) 26; + this.rare = 10; + this.value = Item.sellPrice(gold: 7); + return; + case 2758: + this.width = 18; + this.height = 18; + this.defense = 28; + this.bodySlot = 175; + this.glowMask = (short) 27; + this.rare = 10; + this.value = Item.sellPrice(gold: 7) * 2; + return; + case 2759: + this.width = 18; + this.height = 18; + this.defense = 20; + this.legSlot = 110; + this.rare = 10; + this.value = (int) ((double) Item.sellPrice(gold: 7) * 1.5); + return; + case 2760: + this.width = 18; + this.height = 18; + this.defense = 14; + this.headSlot = 170; + this.glowMask = (short) 28; + this.rare = 10; + this.value = Item.sellPrice(gold: 7); + return; + case 2761: + this.width = 18; + this.height = 18; + this.defense = 18; + this.bodySlot = 176; + this.glowMask = (short) 29; + this.rare = 10; + this.value = Item.sellPrice(gold: 7) * 2; + return; + case 2762: + this.width = 18; + this.height = 18; + this.defense = 14; + this.legSlot = 111; + this.glowMask = (short) 30; + this.rare = 10; + this.value = (int) ((double) Item.sellPrice(gold: 7) * 1.5); + return; + case 2763: + this.width = 18; + this.height = 18; + this.defense = 24; + this.headSlot = 171; + this.rare = 10; + this.value = Item.sellPrice(gold: 7); + return; + case 2764: + this.width = 18; + this.height = 18; + this.defense = 34; + this.bodySlot = 177; + this.rare = 10; + this.value = Item.sellPrice(gold: 7) * 2; + return; + case 2765: + this.width = 18; + this.height = 18; + this.defense = 20; + this.legSlot = 112; + this.rare = 10; + this.value = (int) ((double) Item.sellPrice(gold: 7) * 1.5); + return; + case 2766: + this.width = 22; + this.height = 14; + this.maxStack = 99; + this.rare = 8; + return; + case 2767: + this.useStyle = 4; + this.width = 22; + this.height = 14; + this.consumable = true; + this.useAnimation = 45; + this.useTime = 45; + this.maxStack = 20; + this.rare = 8; + return; + case 2768: + this.useStyle = 1; + this.width = 32; + this.height = 30; + this.UseSound = SoundID.Item25; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 8; + this.noMelee = true; + this.mountType = 8; + this.value = Item.sellPrice(gold: 5); + return; + case 2769: + this.useStyle = 1; + this.width = 32; + this.height = 30; + this.UseSound = SoundID.Item25; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 8; + this.noMelee = true; + this.mountType = 7; + this.value = Item.sellPrice(gold: 5); + return; + case 2770: + this.width = 22; + this.height = 20; + this.accessory = true; + this.value = this.eclipseMothronPrice; + this.rare = 8; + this.wingSlot = (sbyte) 27; + return; + case 2771: + this.useStyle = 1; + this.channel = true; + this.width = 34; + this.height = 34; + this.UseSound = SoundID.Item90; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 8; + this.noMelee = true; + this.mountType = 9; + this.value = Item.sellPrice(gold: 5); + return; + case 2772: + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 25; + this.knockBack = 6f; + this.useTime = 7; + this.width = 54; + this.height = 54; + this.damage = 100; + this.axe = 27; + this.UseSound = SoundID.Item1; + this.rare = 10; + this.scale = 1.05f; + this.value = Item.sellPrice(gold: 6); + this.melee = true; + this.glowMask = (short) 1; + this.tileBoost += 4; + return; + case 2773: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 7; + this.shootSpeed = 28f; + this.knockBack = 4f; + this.width = 56; + this.height = 22; + this.damage = 80; + this.axe = 27; + this.UseSound = SoundID.Item23; + this.shoot = 427; + this.rare = 10; + this.value = Item.sellPrice(gold: 6); + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + this.glowMask = (short) 20; + this.tileBoost += 4; + return; + case 2774: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 4; + this.shootSpeed = 32f; + this.knockBack = 0.0f; + this.width = 54; + this.height = 26; + this.damage = 50; + this.pick = 225; + this.UseSound = SoundID.Item23; + this.shoot = 428; + this.rare = 10; + this.value = Item.sellPrice(gold: 7); + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + this.glowMask = (short) 21; + this.tileBoost += 3; + return; + case 2775: + this.useTurn = true; + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 30; + this.useTime = 7; + this.knockBack = 7f; + this.width = 44; + this.height = 42; + this.damage = 110; + this.hammer = 100; + this.UseSound = SoundID.Item1; + this.rare = 10; + this.value = Item.sellPrice(gold: 8); + this.melee = true; + this.scale = 1.1f; + this.glowMask = (short) 4; + this.tileBoost += 4; + return; + case 2776: + this.useStyle = 1; + this.useAnimation = 12; + this.useTime = 6; + this.knockBack = 5.5f; + this.useTurn = true; + this.autoReuse = true; + this.width = 36; + this.height = 36; + this.damage = 80; + this.pick = 225; + this.UseSound = SoundID.Item1; + this.rare = 10; + this.value = Item.sellPrice(gold: 7); + this.melee = true; + this.glowMask = (short) 5; + this.tileBoost += 4; + return; + case 2777: + this.SetDefaults3(2772); + type = 2777; + this.glowMask = (short) 6; + return; + case 2778: + this.SetDefaults3(2773); + type = 2778; + this.shoot = 429; + this.glowMask = (short) 22; + return; + case 2779: + this.SetDefaults3(2774); + type = 2779; + this.shoot = 430; + this.glowMask = (short) 23; + return; + case 2780: + this.SetDefaults3(2775); + type = 2780; + this.glowMask = (short) 9; + return; + case 2781: + this.SetDefaults3(2776); + type = 2781; + this.glowMask = (short) 10; + return; + case 2782: + this.SetDefaults3(2772); + type = 2782; + this.glowMask = (short) -1; + return; + case 2783: + this.SetDefaults3(2773); + type = 2783; + this.shoot = 431; + this.glowMask = (short) -1; + return; + case 2784: + this.SetDefaults3(2774); + type = 2784; + this.shoot = 432; + this.glowMask = (short) -1; + return; + case 2785: + this.SetDefaults3(2775); + type = 2785; + this.glowMask = (short) -1; + return; + case 2786: + this.SetDefaults3(2776); + type = 2786; + this.glowMask = (short) -1; + return; + case 2787: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 345; + this.width = 12; + this.height = 12; + return; + case 2788: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 172; + this.width = 12; + this.height = 12; + return; + default: + if (type >= 2789 && type <= 2791) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 173 + type - 2789; + this.width = 12; + this.height = 12; + return; + } + if (type >= 2792 && type <= 2794) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 346 + type - 2792; + this.width = 12; + this.height = 12; + return; + } + switch (type) + { + case 2795: + this.useStyle = 5; + this.useAnimation = 20; + this.useTime = 20; + this.shootSpeed = 20f; + this.knockBack = 2f; + this.width = 20; + this.height = 12; + this.damage = 60; + this.shoot = 439; + this.mana = 6; + this.rare = 8; + this.value = Item.sellPrice(gold: 10); + this.noMelee = true; + this.noUseGraphic = true; + this.magic = true; + this.channel = true; + this.glowMask = (short) 47; + return; + case 2796: + this.useStyle = 5; + this.useAnimation = 12; + this.useTime = 12; + this.width = 50; + this.height = 18; + this.shoot = 442; + this.useAmmo = 771; + this.glowMask = (short) 36; + this.UseSound = SoundID.Item92; + this.damage = 40; + this.shootSpeed = 12f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 10); + this.ranged = true; + this.rare = 8; + this.knockBack = 2f; + return; + case 2797: + this.useStyle = 5; + this.useAnimation = 21; + this.useTime = 21; + this.autoReuse = true; + this.width = 50; + this.height = 18; + this.shoot = 444; + this.useAmmo = AmmoID.Bullet; + this.glowMask = (short) 38; + this.UseSound = SoundID.Item95; + this.damage = 45; + this.shootSpeed = 12f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 10); + this.ranged = true; + this.rare = 8; + this.knockBack = 3f; + return; + case 2798: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 6; + this.shootSpeed = 36f; + this.knockBack = 4.75f; + this.width = 20; + this.height = 12; + this.damage = 35; + this.pick = 230; + this.shoot = 445; + this.rare = 8; + this.value = Item.sellPrice(gold: 10); + this.tileBoost = 11; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + this.glowMask = (short) 39; + return; + case 2799: + this.width = 10; + this.height = 26; + this.accessory = true; + this.value = Item.buyPrice(gold: 1); + this.rare = 1; + return; + case 2800: + this.noUseGraphic = true; + this.damage = 0; + this.knockBack = 7f; + this.useStyle = 5; + this.shootSpeed = 14f; + this.shoot = 446; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 7; + this.noMelee = true; + this.value = Item.sellPrice(gold: 2, silver: 50); + return; + case 2801: + this.width = 28; + this.height = 20; + this.headSlot = 172; + this.rare = 1; + this.vanity = true; + return; + case 2802: + this.width = 28; + this.height = 20; + this.headSlot = 173; + this.rare = 1; + this.vanity = true; + return; + case 2803: + this.width = 18; + this.height = 18; + this.headSlot = 174; + this.vanity = true; + this.value = Item.sellPrice(gold: 1); + return; + case 2804: + this.width = 18; + this.height = 18; + this.bodySlot = 178; + this.vanity = true; + this.value = Item.sellPrice(gold: 1); + return; + case 2805: + this.width = 18; + this.height = 18; + this.legSlot = 113; + this.vanity = true; + this.value = Item.sellPrice(gold: 1); + return; + case 2806: + this.width = 18; + this.height = 18; + this.headSlot = 175; + this.vanity = true; + this.value = Item.sellPrice(gold: 1); + this.glowMask = (short) 46; + return; + case 2807: + this.width = 18; + this.height = 18; + this.bodySlot = 179; + this.vanity = true; + this.value = Item.sellPrice(gold: 1); + this.glowMask = (short) 45; + return; + case 2808: + this.width = 18; + this.height = 18; + this.legSlot = 114; + this.vanity = true; + this.value = Item.sellPrice(gold: 1); + return; + case 2809: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 104; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 24; + return; + case 2810: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 90; + this.placeStyle = 27; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2811: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.autoReuse = true; + this.createTile = 79; + this.placeStyle = 27; + this.width = 28; + this.height = 20; + this.value = 2000; + return; + case 2812: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.placeStyle = 32; + this.width = 12; + this.height = 30; + this.value = 150; + return; + case 2813: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 34; + this.placeStyle = 33; + this.width = 26; + this.height = 26; + this.value = 3000; + return; + case 2814: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.placeStyle = 48; + this.width = 26; + this.height = 22; + this.value = 500; + return; + case 2815: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.placeStyle = 32; + this.width = 14; + this.height = 28; + this.value = 200; + return; + case 2816: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 88; + this.placeStyle = 24; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2817: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 28; + return; + case 2818: + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 33; + this.placeStyle = 26; + this.width = 8; + this.value = Item.sellPrice(copper: 60); + this.height = 18; + return; + case 2819: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 93; + this.placeStyle = 27; + this.width = 10; + this.height = 24; + this.value = 500; + return; + case 2820: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 33; + this.value = 150; + return; + case 2821: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 87; + this.placeStyle = 26; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2822: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.placeStyle = 26; + this.width = 8; + this.height = 10; + return; + case 2823: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 89; + this.placeStyle = 29; + this.width = 20; + this.height = 20; + this.value = 300; + return; + case 2824: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.placeStyle = 31; + this.width = 26; + this.height = 20; + this.value = 300; + return; + case 2825: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 100; + this.placeStyle = 27; + this.width = 20; + this.height = 20; + this.value = 1500; + return; + case 2826: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.placeStyle = 27; + this.width = 28; + this.height = 14; + this.value = 150; + return; + default: + if (type >= 2827 && type <= 2855) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 172; + this.placeStyle = type - 2827; + this.width = 20; + this.height = 20; + this.value = 300; + if (type != 2843) + return; + this.value = Item.buyPrice(gold: 10); + return; + } + switch (type) + { + case 2856: + this.width = 28; + this.height = 20; + this.headSlot = 176; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 10); + return; + case 2857: + this.width = 28; + this.height = 20; + this.headSlot = 177; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 10); + return; + case 2858: + this.width = 18; + this.height = 14; + this.bodySlot = 180; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 10); + return; + case 2859: + this.width = 18; + this.height = 14; + this.bodySlot = 181; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 10); + return; + case 2860: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.glowMask = (short) 93; + this.createTile = 350; + this.width = 12; + this.height = 12; + return; + case 2861: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.glowMask = (short) 95; + this.createWall = 176; + this.width = 12; + this.height = 12; + return; + case 2862: + this.width = 28; + this.height = 12; + this.headSlot = 178; + this.rare = 3; + this.value = Item.sellPrice(gold: 1); + this.vanity = true; + this.glowMask = (short) 97; + return; + case 2863: + this.width = 20; + this.height = 26; + this.maxStack = 99; + this.rare = 3; + this.glowMask = (short) 98; + this.value = Item.buyPrice(gold: 30); + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.consumable = true; + return; + case 2864: + this.glowMask = (short) 99; + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + return; + case 2865: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.buyPrice(gold: 2); + this.placeStyle = 27; + return; + case 2866: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.buyPrice(gold: 2); + this.placeStyle = 28; + return; + case 2867: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.buyPrice(gold: 2); + this.placeStyle = 29; + return; + case 2868: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 351; + this.width = 12; + this.height = 12; + this.value = Item.buyPrice(silver: 1); + return; + case 2869: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + return; + case 2870: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + return; + case 2871: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(silver: 75); + this.rare = 2; + return; + case 2872: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(silver: 75); + this.rare = 2; + return; + case 2873: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + return; + case 2874: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + return; + case 2875: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + return; + case 2876: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + return; + case 2877: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + return; + case 2878: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + this.glowMask = (short) 105; + return; + case 2879: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + this.glowMask = (short) 104; + return; + case 2880: + this.useStyle = 1; + this.useAnimation = 20; + this.useTime = 20; + this.autoReuse = true; + this.shoot = 451; + this.shootSpeed = 11f; + this.knockBack = 4.5f; + this.width = 40; + this.height = 40; + this.damage = 110; + this.scale = 1.05f; + this.UseSound = SoundID.Item1; + this.rare = 8; + this.value = Item.sellPrice(gold: 10); + this.melee = true; + return; + case 2882: + this.useStyle = 5; + this.useAnimation = 20; + this.useTime = 20; + this.shootSpeed = 14f; + this.knockBack = 2f; + this.width = 16; + this.height = 16; + this.damage = 100; + this.UseSound = SoundID.Item75; + this.shoot = 460; + this.mana = 14; + this.rare = 8; + this.value = Item.sellPrice(gold: 10); + this.noMelee = true; + this.noUseGraphic = true; + this.magic = true; + this.channel = true; + this.glowMask = (short) 102; + return; + case 2883: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + this.glowMask = (short) 103; + return; + case 2884: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + this.glowMask = (short) 107; + return; + case 2885: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + this.glowMask = (short) 106; + return; + case 2886: + this.damage = 0; + this.useStyle = 1; + this.shootSpeed = 4f; + this.shoot = 463; + this.width = 16; + this.height = 24; + this.maxStack = 99; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noMelee = true; + this.value = 100; + return; + case 2887: + this.width = 16; + this.height = 18; + this.maxStack = 99; + this.value = 50; + return; + case 2888: + this.useStyle = 5; + this.useAnimation = 24; + this.useTime = 23; + this.width = 12; + this.height = 28; + this.shoot = 469; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item97; + this.damage = 23; + this.shootSpeed = 8f; + this.knockBack = 3f; + this.rare = 3; + this.noMelee = true; + this.value = this.queenBeePrice; + this.ranged = true; + return; + default: + if (type >= 2889 && type <= 2895) + { + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.makeNPC = (short) (442 + type - 2889); + this.noUseGraphic = true; + this.value = Item.sellPrice(gold: 10); + this.rare = 3; + if (type != 2895 && type != 2893 && type != 2891) + return; + this.bait = 50; + return; + } + if (type == 2896) + { + this.useStyle = 1; + this.shootSpeed = 4f; + this.shoot = 470; + this.width = 8; + this.height = 28; + this.maxStack = 99; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 40; + this.useTime = 40; + this.noUseGraphic = true; + this.noMelee = true; + this.value = Item.buyPrice(silver: 20); + this.rare = 1; + return; + } + if (type >= 2897 && type <= 2994) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 109 + type - 2897; + this.width = 10; + this.height = 24; + this.value = 1000; + this.rare = 1; + return; + } + switch (type) + { + case 2995: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 30; + return; + case 2996: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 8; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 353; + this.width = 12; + this.height = 12; + this.tileBoost += 3; + return; + case 2997: + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.value = 1000; + this.rare = 1; + return; + case 2998: + this.width = 24; + this.height = 24; + this.accessory = true; + this.value = 100000; + this.rare = 4; + return; + case 2999: + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 354; + this.width = 12; + this.height = 12; + this.value = 100000; + return; + case 3000: + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 355; + this.width = 12; + this.height = 12; + this.value = 100000; + return; + default: + return; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + + private void DefaultToQuestFish() + { + this.questItem = true; + this.maxStack = 1; + this.width = 26; + this.height = 26; + this.uniqueStack = true; + this.rare = -11; + } + + public void SetDefaults4(int type) + { + switch (type) + { + case 3001: + this.rare = 1; + this.UseSound = SoundID.Item3; + this.healLife = 80; + this.healMana = 400; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.potion = true; + this.value = Item.buyPrice(silver: 5); + break; + case 3002: + this.alpha = 0; + this.color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + this.rare = 1; + this.useStyle = 1; + this.shootSpeed = 6f; + this.shoot = 473; + this.width = 12; + this.height = 12; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noMelee = true; + this.value = Item.buyPrice(silver: 1, copper: 50); + this.holdStyle = 1; + break; + case 3003: + this.shootSpeed = 3.5f; + this.shoot = 474; + this.damage = 6; + this.width = 10; + this.height = 28; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Arrow; + this.knockBack = 2.5f; + this.value = Item.buyPrice(copper: 15); + this.ranged = true; + break; + case 3004: + this.flame = true; + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.holdStyle = 1; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 4; + this.placeStyle = 13; + this.width = 10; + this.height = 12; + this.value = Item.buyPrice(silver: 1); + break; + case 3005: + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 475; + this.damage = 0; + this.width = 18; + this.height = 20; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.noUseGraphic = true; + this.noMelee = true; + break; + case 3006: + this.mana = 10; + this.autoReuse = true; + this.damage = 30; + this.useStyle = 5; + this.shootSpeed = 10f; + this.shoot = 476; + this.width = 26; + this.height = 28; + this.useAnimation = 12; + this.useTime = 12; + this.rare = 5; + this.noMelee = true; + this.knockBack = 2.5f; + this.value = Item.sellPrice(gold: 8); + this.magic = true; + break; + case 3007: + this.autoReuse = true; + this.useStyle = 5; + this.useAnimation = 22; + this.useTime = 22; + this.width = 38; + this.height = 6; + this.shoot = 10; + this.useAmmo = AmmoID.Dart; + this.UseSound = SoundID.Item98; + this.damage = 33; + this.shootSpeed = 13f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 8); + this.knockBack = 3.5f; + this.useAmmo = AmmoID.Dart; + this.ranged = true; + this.rare = 5; + this.scale = 0.9f; + break; + case 3008: + this.autoReuse = true; + this.useStyle = 5; + this.useAnimation = 38; + this.useTime = 38; + this.width = 38; + this.height = 6; + this.shoot = 10; + this.useAmmo = AmmoID.Dart; + this.UseSound = SoundID.Item99; + this.damage = 62; + this.shootSpeed = 14.5f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 8); + this.knockBack = 5.5f; + this.useAmmo = AmmoID.Dart; + this.ranged = true; + this.rare = 5; + this.scale = 1f; + break; + case 3009: + this.shoot = 477; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.ammo = AmmoID.Dart; + this.damage = 14; + this.knockBack = 3.5f; + this.shootSpeed = 1f; + this.ranged = true; + this.rare = 3; + this.value = Item.sellPrice(copper: 6); + this.consumable = true; + break; + case 3010: + this.shoot = 478; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.ammo = AmmoID.Dart; + this.damage = 10; + this.knockBack = 2.2f; + this.shootSpeed = 3f; + this.ranged = true; + this.rare = 3; + this.value = Item.sellPrice(copper: 6); + this.consumable = true; + break; + case 3011: + this.shoot = 479; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.ammo = AmmoID.Dart; + this.damage = 12; + this.knockBack = 2.5f; + this.shootSpeed = 3f; + this.ranged = true; + this.rare = 3; + this.value = Item.sellPrice(copper: 6); + this.consumable = true; + break; + case 3012: + this.autoReuse = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 14; + this.useTime = 14; + this.knockBack = 3.25f; + this.width = 30; + this.height = 10; + this.damage = 43; + this.shoot = 481; + this.shootSpeed = 14f; + this.UseSound = SoundID.Item1; + this.rare = 5; + this.value = Item.sellPrice(gold: 8); + this.melee = true; + this.noUseGraphic = true; + this.noMelee = true; + break; + case 3013: + this.useStyle = 1; + this.useTurn = true; + this.autoReuse = true; + this.useAnimation = 8; + this.useTime = 8; + this.width = 24; + this.height = 28; + this.damage = 60; + this.knockBack = 6f; + this.UseSound = SoundID.Item1; + this.scale = 1.35f; + this.melee = true; + this.rare = 5; + this.value = Item.sellPrice(gold: 8); + this.melee = true; + break; + case 3014: + this.mana = 40; + this.autoReuse = true; + this.damage = 43; + this.useStyle = 1; + this.shootSpeed = 15f; + this.shoot = 482; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item100; + this.useAnimation = 24; + this.useTime = 24; + this.rare = 5; + this.noMelee = true; + this.knockBack = 8f; + this.value = Item.sellPrice(gold: 8); + this.magic = true; + break; + case 3015: + this.width = 24; + this.height = 24; + this.accessory = true; + this.value = Item.sellPrice(gold: 8); + this.rare = 6; + break; + case 3016: + this.width = 24; + this.height = 24; + this.accessory = true; + this.defense = 7; + this.value = Item.sellPrice(gold: 8); + this.rare = 5; + break; + case 3017: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 7; + this.value = Item.sellPrice(gold: 6); + this.shoeSlot = (sbyte) 16; + break; + case 3018: + this.useStyle = 1; + this.autoReuse = true; + this.useAnimation = 23; + this.useTime = 23; + this.width = 50; + this.height = 20; + this.shoot = 483; + this.UseSound = SoundID.Item1; + this.damage = 50; + this.shootSpeed = 12f; + this.value = Item.sellPrice(gold: 10); + this.knockBack = 6f; + this.rare = 5; + this.melee = true; + break; + case 3019: + this.autoReuse = true; + this.useStyle = 5; + this.useAnimation = 13; + this.useTime = 13; + this.width = 18; + this.height = 46; + this.shoot = 485; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 22; + this.knockBack = 5.5f; + this.shootSpeed = 6f; + this.noMelee = true; + this.value = this.hellPrice; + this.rare = 3; + this.ranged = true; + break; + case 3024: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.rare = 9; + this.value = Item.sellPrice(gold: 3); + break; + case 3061: + this.width = 30; + this.height = 30; + this.accessory = true; + this.rare = 5; + this.value = Item.buyPrice(gold: 20); + this.backSlot = (sbyte) 8; + break; + case 3599: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.rare = 9; + this.value = Item.sellPrice(gold: 3); + break; + default: + if (type >= 3020 && type <= 3023) + { + this.noUseGraphic = true; + this.damage = 0; + this.useStyle = 5; + this.shootSpeed = 15f; + this.shoot = 486 + type - 3020; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 6; + this.noMelee = true; + this.value = Item.sellPrice(gold: 6); + if (type != 3021) + break; + this.shootSpeed = 16f; + break; + } + switch (type) + { + case 3025: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(silver: 75); + this.rare = 2; + return; + case 3026: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(silver: 75); + this.rare = 2; + return; + case 3027: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(silver: 75); + this.rare = 2; + return; + case 3029: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 19; + this.useTime = 19; + this.width = 28; + this.height = 60; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 38; + this.shootSpeed = 12.5f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 8); + this.ranged = true; + this.rare = 6; + this.knockBack = 2.25f; + return; + case 3030: + this.channel = true; + this.damage = 40; + this.useStyle = 1; + this.shootSpeed = 17f; + this.shoot = 491; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.rare = 6; + this.noMelee = true; + this.knockBack = 4.5f; + this.value = Item.sellPrice(gold: 8); + this.melee = true; + this.noUseGraphic = true; + return; + case 3038: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + return; + case 3190: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(silver: 75); + this.rare = 2; + return; + case 3597: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + return; + case 3598: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + return; + case 3600: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + return; + default: + if (type == 3031 || type == 3032) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 12; + this.useTime = 5; + this.width = 20; + this.height = 20; + this.autoReuse = true; + this.rare = 7; + this.value = Item.sellPrice(gold: 10); + this.tileBoost += 2; + return; + } + switch (type) + { + case 3028: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(silver: 75); + this.rare = 2; + return; + case 3033: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 5; + this.value = 50000; + return; + case 3034: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 5; + this.value = 100000; + return; + case 3035: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 6; + this.value = 150000; + return; + case 3036: + this.width = 24; + this.height = 28; + this.rare = 3; + this.value = Item.sellPrice(gold: 3); + this.accessory = true; + return; + case 3037: + this.width = 24; + this.height = 28; + this.rare = 1; + this.value = Item.sellPrice(gold: 1); + this.accessory = true; + return; + case 3039: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + return; + case 3040: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(silver: 75); + this.rare = 2; + return; + case 3041: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(silver: 75); + this.rare = 2; + return; + case 3042: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + return; + case 3043: + this.damage = 0; + this.useStyle = 1; + this.shoot = 492; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item25; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.value = Item.buyPrice(gold: 10); + this.buffType = 152; + return; + case 3044: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 32; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + return; + case 3045: + this.flame = true; + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.holdStyle = 1; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 4; + this.placeStyle = 14; + this.width = 10; + this.height = 12; + this.value = 250; + this.rare = 1; + return; + default: + if (type >= 3046 && type <= 3050) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 215; + this.placeStyle = 1 + type - 3046; + this.width = 12; + this.height = 12; + return; + } + switch (type) + { + case 3051: + this.mana = 13; + this.damage = 25; + this.useStyle = 5; + this.shootSpeed = 32f; + this.shoot = 494; + this.width = 26; + this.height = 28; + this.useAnimation = 33; + this.useTime = 33; + this.rare = 5; + this.noMelee = true; + this.knockBack = 3f; + this.value = Item.sellPrice(gold: 8); + this.magic = true; + this.autoReuse = true; + return; + case 3052: + this.autoReuse = true; + this.useStyle = 5; + this.useAnimation = 20; + this.useTime = 20; + this.width = 14; + this.height = 32; + this.shoot = 495; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item102; + this.damage = 47; + this.shootSpeed = 11f; + this.knockBack = 4.5f; + this.rare = 5; + this.crit = 3; + this.noMelee = true; + this.value = Item.sellPrice(gold: 2); + this.ranged = true; + return; + case 3053: + this.autoReuse = true; + this.rare = 5; + this.mana = 6; + this.UseSound = SoundID.Item103; + this.useStyle = 5; + this.damage = 40; + this.useAnimation = 21; + this.useTime = 7; + this.width = 24; + this.height = 28; + this.shoot = 496; + this.shootSpeed = 9f; + this.knockBack = 3.75f; + this.magic = true; + this.value = Item.sellPrice(gold: 2); + this.noMelee = true; + this.noUseGraphic = true; + this.crit = 3; + return; + case 3054: + this.crit = 3; + this.autoReuse = true; + this.useStyle = 1; + this.shootSpeed = 13f; + this.shoot = 497; + this.damage = 38; + this.width = 18; + this.height = 20; + this.UseSound = SoundID.Item1; + this.useAnimation = 12; + this.useTime = 12; + this.noUseGraphic = true; + this.noMelee = true; + this.value = Item.sellPrice(gold: 2); + this.knockBack = 5.75f; + this.melee = true; + this.rare = 5; + return; + default: + if (type >= 3055 && type <= 3059) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 31 + type - 3055; + return; + } + switch (type) + { + case 3060: + this.damage = 0; + this.useStyle = 1; + this.shoot = 499; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.value = Item.sellPrice(gold: 7, silver: 50); + this.buffType = 154; + return; + case 3062: + this.channel = true; + this.damage = 0; + this.useStyle = 4; + this.shoot = 500; + this.width = 24; + this.height = 24; + this.UseSound = SoundID.Item8; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 1; + this.noMelee = true; + this.value = this.shadowOrbPrice; + this.buffType = 155; + return; + case 3063: + this.rare = 10; + this.UseSound = SoundID.Item1; + this.useStyle = 1; + this.damage = 200; + this.useAnimation = 16; + this.useTime = 16; + this.width = 30; + this.height = 30; + this.shoot = 502; + this.scale = 1.1f; + this.shootSpeed = 12f; + this.knockBack = 6.5f; + this.melee = true; + this.value = Item.sellPrice(gold: 20); + this.autoReuse = true; + return; + case 3064: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 356; + this.width = 18; + this.height = 34; + this.value = Item.sellPrice(gold: 3); + this.rare = 7; + return; + case 3065: + this.rare = 9; + this.UseSound = SoundID.Item105; + this.useStyle = 1; + this.damage = 110; + this.useAnimation = 16; + this.useTime = 16; + this.width = 30; + this.height = 30; + this.shoot = 503; + this.scale = 1.1f; + this.shootSpeed = 8f; + this.knockBack = 6.5f; + this.melee = true; + this.value = Item.sellPrice(gold: 20); + this.autoReuse = true; + return; + case 3066: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 357; + this.width = 12; + this.height = 12; + return; + case 3067: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 177; + this.width = 12; + this.height = 12; + return; + case 3068: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 1; + this.value = Item.sellPrice(silver: 50); + return; + case 3069: + this.mana = 2; + this.damage = 14; + this.useStyle = 1; + this.shootSpeed = 7f; + this.shoot = 504; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item8; + this.useAnimation = 26; + this.useTime = 26; + this.rare = 1; + this.noMelee = true; + this.value = 5000; + this.magic = true; + this.crit = 10; + return; + default: + if (type >= 3070 && type <= 3076) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 358 + type - 3070; + this.width = 12; + this.height = 12; + this.value = Item.sellPrice(gold: 10); + this.rare = 3; + return; + } + switch (type) + { + case 3077: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 8; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 365; + this.width = 12; + this.height = 12; + this.value = 10; + this.tileBoost += 3; + return; + case 3078: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 8; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 366; + this.width = 12; + this.height = 12; + this.value = 10; + this.tileBoost += 3; + return; + case 3079: + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 505; + this.damage = 0; + this.width = 18; + this.height = 20; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 100; + return; + case 3080: + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 506; + this.damage = 0; + this.width = 18; + this.height = 20; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 100; + return; + case 3081: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 367; + this.width = 12; + this.height = 12; + return; + case 3082: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 183; + this.width = 12; + this.height = 12; + return; + case 3083: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 179; + this.width = 12; + this.height = 12; + return; + case 3084: + this.width = 24; + this.height = 18; + this.accessory = true; + this.rare = 1; + this.value = Item.sellPrice(silver: 50); + return; + case 3085: + this.width = 12; + this.height = 12; + this.rare = 2; + this.maxStack = 99; + this.value = Item.buyPrice(gold: 2); + return; + case 3086: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 368; + this.width = 12; + this.height = 12; + return; + case 3087: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 369; + this.width = 12; + this.height = 12; + return; + case 3088: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 184; + this.width = 12; + this.height = 12; + return; + case 3089: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 181; + this.width = 12; + this.height = 12; + return; + case 3090: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 2; + this.value = 100000; + this.expert = true; + return; + default: + if (type == 3091 || type == 3092) + { + this.width = 14; + this.height = 20; + this.maxStack = 99; + this.useAnimation = 20; + this.useTime = 20; + return; + } + switch (type) + { + case 3093: + this.width = 12; + this.height = 12; + this.rare = 1; + this.maxStack = 99; + this.value = Item.sellPrice(silver: 10); + return; + case 3094: + this.useStyle = 1; + this.shootSpeed = 11.5f; + this.shoot = 507; + this.damage = 17; + this.width = 30; + this.height = 30; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 24; + this.useTime = 24; + this.noUseGraphic = true; + this.noMelee = true; + this.knockBack = 4.75f; + this.value = Item.sellPrice(copper: 5); + this.ranged = true; + return; + case 3095: + this.width = 24; + this.height = 18; + this.accessory = true; + this.rare = 1; + this.value = Item.sellPrice(gold: 1); + return; + case 3097: + this.melee = true; + this.damage = 30; + this.width = 24; + this.height = 28; + this.rare = 1; + this.value = Item.sellPrice(gold: 2); + this.accessory = true; + this.defense = 2; + this.shieldSlot = (sbyte) 5; + this.knockBack = 9f; + this.expert = true; + return; + case 3098: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 8; + this.shootSpeed = 48f; + this.knockBack = 8f; + this.width = 54; + this.height = 20; + this.damage = 120; + this.axe = 30; + this.UseSound = SoundID.Item23; + this.shoot = 509; + this.rare = 8; + this.value = this.eclipsePostPlanteraPrice; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.channel = true; + return; + case 3099: + this.width = 24; + this.height = 18; + this.accessory = true; + this.rare = 1; + this.value = Item.sellPrice(gold: 1); + return; + case 3100: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 370; + this.width = 12; + this.height = 12; + return; + case 3101: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 182; + this.width = 12; + this.height = 12; + return; + case 3102: + this.width = 24; + this.height = 18; + this.accessory = true; + this.rare = 1; + this.value = Item.sellPrice(gold: 1); + return; + case 3103: + this.shootSpeed = 3f; + this.shoot = 1; + this.damage = 5; + this.width = 26; + this.height = 26; + this.ammo = AmmoID.Arrow; + this.knockBack = 2f; + this.value = Item.sellPrice(gold: 1); + this.ranged = true; + this.rare = 2; + return; + case 3104: + this.shootSpeed = 4f; + this.shoot = 14; + this.damage = 7; + this.width = 26; + this.height = 26; + this.ammo = AmmoID.Bullet; + this.knockBack = 2f; + this.value = Item.sellPrice(gold: 1); + this.ranged = true; + this.rare = 2; + return; + case 3105: + this.magic = true; + this.mana = 30; + this.useStyle = 1; + this.shootSpeed = 9f; + this.rare = 8; + this.damage = 46; + this.shoot = 510; + this.width = 18; + this.height = 20; + this.knockBack = 4f; + this.UseSound = SoundID.Item106; + this.useAnimation = 28; + this.useTime = 28; + this.noUseGraphic = true; + this.noMelee = true; + this.value = this.eclipsePostPlanteraPrice; + return; + case 3106: + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 8; + this.useTime = 8; + this.knockBack = 3.5f; + this.width = 30; + this.height = 30; + this.damage = 85; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.rare = 8; + this.value = this.eclipsePostPlanteraPrice; + this.melee = true; + return; + case 3107: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 15; + this.useTime = 15; + this.width = 50; + this.height = 18; + this.shoot = 514; + this.useAmmo = AmmoID.NailFriendly; + this.UseSound = SoundID.Item108; + this.damage = 85; + this.shootSpeed = 10f; + this.noMelee = true; + this.value = this.eclipsePostPlanteraPrice; + this.rare = 8; + this.ranged = true; + return; + case 3108: + this.shootSpeed = 6f; + this.shoot = 514; + this.damage = 30; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.NailFriendly; + this.knockBack = 3f; + this.value = Item.buyPrice(silver: 1); + this.ranged = true; + this.rare = 8; + return; + case 3109: + this.width = 22; + this.height = 22; + this.defense = 4; + this.headSlot = 179; + this.rare = 2; + this.value = Item.sellPrice(gold: 1); + return; + case 3110: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 8; + this.value = 700000; + this.canBePlacedInVanityRegardlessOfConditions = true; + return; + case 3111: + this.width = 10; + this.height = 12; + this.maxStack = 999; + this.alpha = 100; + this.value = 15; + return; + case 3112: + this.color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + this.useStyle = 1; + this.shootSpeed = 6f; + this.shoot = 515; + this.width = 12; + this.height = 12; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noMelee = true; + this.value = 10; + this.holdStyle = 1; + return; + case 3113: + this.createTile = 371; + this.width = 12; + this.height = 12; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + return; + case 3114: + this.flame = true; + this.noWet = true; + this.holdStyle = 1; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 4; + this.placeStyle = 15; + this.width = 10; + this.height = 12; + this.value = 80; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + return; + case 3115: + this.useStyle = 1; + this.shootSpeed = 5f; + this.shoot = 516; + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 25; + this.useTime = 25; + this.noUseGraphic = true; + this.noMelee = true; + this.value = Item.buyPrice(silver: 4); + this.damage = 0; + return; + case 3116: + this.useStyle = 5; + this.shootSpeed = 6.5f; + this.shoot = 517; + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 40; + this.useTime = 40; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 100; + this.damage = 65; + this.knockBack = 8f; + this.ranged = true; + return; + case 3117: + this.flame = true; + this.noWet = true; + this.createTile = 372; + this.width = 8; + this.height = 18; + this.holdStyle = 1; + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.value = Item.sellPrice(silver: 1); + this.consumable = true; + return; + default: + if (type >= 3203 && type <= 3208) + { + this.width = 12; + this.height = 12; + this.rare = 2; + this.maxStack = 99; + this.createTile = 376; + this.placeStyle = 3 + type - 3203; + this.useAnimation = 15; + this.useTime = 15; + this.autoReuse = true; + this.useStyle = 1; + this.consumable = true; + this.value = Item.sellPrice(gold: 1); + return; + } + switch (type) + { + case 3096: + this.width = 24; + this.height = 18; + this.accessory = true; + this.rare = 1; + this.value = Item.sellPrice(gold: 1); + return; + case 3118: + this.width = 24; + this.height = 18; + this.accessory = true; + this.rare = 1; + this.value = Item.sellPrice(gold: 1); + return; + case 3119: + this.width = 24; + this.height = 18; + this.accessory = true; + this.rare = 1; + this.value = Item.sellPrice(gold: 1); + return; + case 3120: + this.width = 24; + this.height = 28; + this.rare = 1; + this.value = Item.sellPrice(gold: 1); + this.accessory = true; + return; + case 3121: + this.width = 24; + this.height = 28; + this.rare = 3; + this.value = Item.sellPrice(gold: 3); + this.accessory = true; + return; + case 3122: + this.width = 24; + this.height = 28; + this.rare = 3; + this.value = Item.sellPrice(gold: 3); + this.accessory = true; + return; + case 3123: + this.width = 24; + this.height = 28; + this.rare = 5; + this.value = Item.sellPrice(gold: 5); + this.accessory = true; + return; + case 3124: + this.width = 24; + this.height = 28; + this.rare = 7; + this.value = Item.sellPrice(gold: 8); + this.useTurn = true; + this.useStyle = 4; + this.useTime = 90; + this.UseSound = SoundID.Item6; + this.useAnimation = 90; + return; + case 3209: + this.mana = 9; + this.UseSound = SoundID.Item109; + this.useStyle = 5; + this.damage = 40; + this.useAnimation = 29; + this.useTime = 29; + this.width = 36; + this.height = 40; + this.shoot = 521; + this.shootSpeed = 13f; + this.knockBack = 4.4f; + this.magic = true; + this.autoReuse = true; + this.value = Item.sellPrice(gold: 4); + this.rare = 5; + this.noMelee = true; + return; + case 3210: + this.UseSound = SoundID.Item111; + this.useStyle = 5; + this.damage = 43; + this.useAnimation = 10; + this.useTime = 10; + this.width = 30; + this.height = 28; + this.shoot = 523; + this.shootSpeed = 8.5f; + this.knockBack = 3f; + this.ranged = true; + this.autoReuse = true; + this.value = Item.sellPrice(gold: 4); + this.rare = 5; + this.noMelee = true; + return; + case 3211: + this.useStyle = 1; + this.useAnimation = 28; + this.useTime = 28; + this.knockBack = 5.75f; + this.width = 40; + this.height = 40; + this.damage = 55; + this.scale = 1.125f; + this.UseSound = SoundID.Item1; + this.rare = 5; + this.autoReuse = true; + this.value = Item.sellPrice(gold: 4); + this.melee = true; + return; + case 3212: + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 1; + this.value = Item.sellPrice(gold: 1); + this.neckSlot = (sbyte) 7; + return; + case 3213: + this.useStyle = 1; + this.shootSpeed = 4f; + this.shoot = 525; + this.width = 26; + this.height = 24; + this.UseSound = SoundID.Item59; + this.useAnimation = 28; + this.useTime = 28; + this.rare = 3; + this.value = Item.sellPrice(gold: 2); + return; + default: + if (type == 3159 || type == 3160 || type == 3161) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 90; + switch (type) + { + case 3159: + this.placeStyle = 28; + break; + case 3160: + this.placeStyle = 30; + break; + case 3161: + this.placeStyle = 29; + break; + } + this.width = 20; + this.height = 20; + this.value = 300; + return; + } + if (type == 3162 || type == 3163 || type == 3164) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.autoReuse = true; + this.createTile = 79; + this.width = 28; + this.height = 20; + this.value = 2000; + switch (type) + { + case 3162: + this.placeStyle = 28; + return; + case 3163: + this.placeStyle = 30; + return; + case 3164: + this.placeStyle = 29; + return; + default: + return; + } + } + else if (type == 3165 || type == 3166 || type == 3167) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + switch (type) + { + case 3165: + this.placeStyle = 29; + return; + case 3166: + this.placeStyle = 31; + return; + case 3167: + this.placeStyle = 30; + return; + default: + return; + } + } + else if (type == 3168 || type == 3169 || type == 3170) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 100; + this.width = 20; + this.height = 20; + this.value = 1500; + switch (type) + { + case 3168: + this.placeStyle = 28; + return; + case 3169: + this.placeStyle = 30; + return; + case 3170: + this.placeStyle = 29; + return; + default: + return; + } + } + else if (type == 3171 || type == 3172 || type == 3173) + { + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 33; + this.width = 8; + this.height = 18; + this.value = Item.sellPrice(copper: 60); + switch (type) + { + case 3171: + this.placeStyle = 27; + return; + case 3172: + this.placeStyle = 29; + return; + case 3173: + this.placeStyle = 28; + return; + default: + return; + } + } + else if (type == 3174 || type == 3175 || type == 3176) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.width = 12; + this.height = 30; + this.value = 150; + switch (type) + { + case 3174: + this.placeStyle = 33; + return; + case 3175: + this.placeStyle = 35; + return; + case 3176: + this.placeStyle = 34; + return; + default: + return; + } + } + else if (type == 3177 || type == 3178 || type == 3179) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 34; + this.width = 26; + this.height = 26; + this.value = 3000; + switch (type) + { + case 3177: + this.placeStyle = 34; + return; + case 3178: + this.placeStyle = 36; + return; + case 3179: + this.placeStyle = 35; + return; + default: + return; + } + } + else if (type == 3180 || type == 3181 || type == 3125) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 21; + this.width = 26; + this.height = 22; + this.value = 500; + switch (type) + { + case 3125: + this.placeStyle = 50; + return; + case 3180: + this.placeStyle = 49; + return; + case 3181: + this.placeStyle = 51; + return; + default: + return; + } + } + else if (type == 3126 || type == 3127 || type == 3128) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 104; + this.width = 20; + this.height = 20; + this.value = 300; + switch (type) + { + case 3126: + this.placeStyle = 25; + return; + case 3127: + this.placeStyle = 27; + return; + case 3128: + this.placeStyle = 26; + return; + default: + return; + } + } + else if (type == 3129 || type == 3130 || type == 3131) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.width = 14; + this.height = 28; + this.value = 200; + switch (type) + { + case 3129: + this.placeStyle = 33; + return; + case 3130: + this.placeStyle = 35; + return; + case 3131: + this.placeStyle = 34; + return; + default: + return; + } + } + else if (type == 3132 || type == 3133 || type == 3134) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 88; + this.width = 20; + this.height = 20; + this.value = 300; + switch (type) + { + case 3132: + this.placeStyle = 25; + return; + case 3133: + this.placeStyle = 27; + return; + case 3134: + this.placeStyle = 26; + return; + default: + return; + } + } + else if (type == 3135 || type == 3136 || type == 3137) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 93; + this.width = 10; + this.height = 24; + this.value = 500; + switch (type) + { + case 3135: + this.placeStyle = 28; + return; + case 3136: + this.placeStyle = 30; + return; + case 3137: + this.placeStyle = 29; + return; + default: + return; + } + } + else + { + if (type == 3138 || type == 3139 || type == 3140) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + switch (type) + { + case 3138: + this.placeStyle = 34; + break; + case 3139: + this.placeStyle = 36; + break; + case 3140: + this.placeStyle = 35; + break; + } + this.value = 150; + return; + } + if (type == 3141 || type == 3142 || type == 3143) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 87; + this.width = 20; + this.height = 20; + this.value = 300; + switch (type) + { + case 3141: + this.placeStyle = 27; + return; + case 3142: + this.placeStyle = 29; + return; + case 3143: + this.placeStyle = 28; + return; + default: + return; + } + } + else if (type == 3144 || type == 3145 || type == 3146) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.width = 8; + this.height = 10; + switch (type) + { + case 3144: + this.placeStyle = 27; + return; + case 3145: + this.placeStyle = 29; + return; + case 3146: + this.placeStyle = 28; + return; + default: + return; + } + } + else if (type == 3147 || type == 3148 || type == 3149) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 172; + this.width = 20; + this.height = 20; + this.value = 300; + switch (type) + { + case 3147: + this.placeStyle = 29; + return; + case 3148: + this.placeStyle = 31; + return; + case 3149: + this.placeStyle = 30; + return; + default: + return; + } + } + else if (type == 3150 || type == 3151 || type == 3152) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 89; + this.width = 20; + this.height = 20; + this.value = 300; + switch (type) + { + case 3150: + this.placeStyle = 30; + return; + case 3151: + this.placeStyle = 32; + return; + case 3152: + this.placeStyle = 31; + return; + default: + return; + } + } + else if (type == 3153 || type == 3154 || type == 3155) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 14; + this.width = 26; + this.height = 20; + this.value = 300; + switch (type) + { + case 3153: + this.placeStyle = 32; + return; + case 3154: + this.placeStyle = 34; + return; + case 3155: + this.placeStyle = 33; + return; + default: + return; + } + } + else if (type == 3156 || type == 3157 || type == 3158) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.width = 28; + this.height = 14; + this.value = 150; + switch (type) + { + case 3156: + this.placeStyle = 28; + return; + case 3157: + this.placeStyle = 30; + return; + case 3158: + this.placeStyle = 29; + return; + default: + return; + } + } + else + { + switch (type) + { + case 3182: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 373; + this.width = 24; + this.height = 24; + this.value = Item.sellPrice(copper: 40); + return; + case 3183: + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 18; + this.width = 24; + this.height = 28; + this.UseSound = SoundID.Item1; + this.value = Item.sellPrice(gold: 5); + this.autoReuse = true; + this.rare = 4; + this.scale = 1.15f; + return; + case 3184: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 374; + this.width = 24; + this.height = 24; + this.value = Item.sellPrice(copper: 40); + return; + case 3185: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 375; + this.width = 24; + this.height = 24; + this.value = Item.sellPrice(copper: 40); + return; + case 3186: + this.maxStack = 999; + this.width = 24; + this.height = 24; + this.value = Item.buyPrice(silver: 1); + return; + case 3187: + this.width = 18; + this.height = 18; + this.defense = 3; + this.headSlot = 180; + this.value = 17500; + return; + case 3188: + this.width = 18; + this.height = 18; + this.defense = 4; + this.bodySlot = 182; + this.value = 14000; + return; + case 3189: + this.width = 18; + this.height = 18; + this.defense = 3; + this.legSlot = 122; + this.value = 10500; + return; + default: + if (type >= 3191 && type <= 3194) + { + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.makeNPC = (short) (484 + type - 3191); + this.noUseGraphic = true; + switch (type) + { + case 3192: + this.bait = 15; + return; + case 3193: + this.bait = 25; + return; + case 3194: + this.bait = 40; + return; + default: + this.bait = 35; + return; + } + } + else + { + switch (type) + { + case 3196: + this.useStyle = 1; + this.shootSpeed = 6f; + this.shoot = 519; + this.width = 26; + this.height = 26; + this.maxStack = 99; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 25; + this.useTime = 25; + this.noUseGraphic = true; + this.noMelee = true; + this.value = Item.sellPrice(silver: 2); + this.damage = 0; + this.rare = 1; + return; + case 3197: + this.rare = 1; + this.useStyle = 1; + this.shootSpeed = 12.5f; + this.shoot = 520; + this.damage = 17; + this.width = 28; + this.height = 28; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 13; + this.useTime = 13; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 80; + this.knockBack = 3.5f; + this.ranged = true; + return; + case 3198: + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 377; + this.width = 28; + this.height = 22; + this.value = 100000; + return; + case 3199: + this.useTurn = true; + this.width = 20; + this.height = 20; + this.useStyle = 4; + this.useTime = 90; + this.UseSound = SoundID.Item6; + this.useAnimation = 90; + this.rare = 1; + this.value = 50000; + return; + case 3200: + this.width = 28; + this.height = 24; + this.accessory = true; + this.rare = 1; + this.value = 50000; + this.shoeSlot = (sbyte) 17; + return; + case 3201: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 1; + this.value = 50000; + this.waistSlot = (sbyte) 11; + return; + case 3202: + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 378; + this.width = 20; + this.height = 30; + this.value = Item.sellPrice(silver: 1); + return; + case 3214: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 379; + this.width = 12; + this.height = 12; + this.value = Item.buyPrice(silver: 2); + return; + default: + if (type >= 3215 && type <= 3222) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 380; + this.placeStyle = type - 3215; + this.width = 24; + this.height = 20; + this.value = Item.buyPrice(silver: 1); + return; + } + switch (type) + { + case 3223: + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 1; + this.value = 100000; + this.expert = true; + return; + case 3224: + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 1; + this.value = 100000; + this.neckSlot = (sbyte) 8; + this.expert = true; + return; + case 3225: + this.width = 14; + this.height = 28; + this.rare = 1; + this.value = Item.sellPrice(gold: 2, silver: 50); + this.accessory = true; + this.balloonSlot = (sbyte) 11; + return; + case 3226: + this.width = 28; + this.height = 20; + this.headSlot = 181; + this.rare = 9; + this.vanity = true; + this.value = Item.sellPrice(gold: 5); + return; + case 3227: + this.width = 18; + this.height = 14; + this.bodySlot = 183; + this.rare = 9; + this.vanity = true; + this.value = Item.sellPrice(gold: 5); + return; + case 3228: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 9; + this.wingSlot = (sbyte) 28; + this.value = 400000; + return; + default: + if (type >= 3229 && type <= 3233) + { + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 85; + this.placeStyle = 6 + type - 3229; + this.width = 20; + this.height = 20; + return; + } + if (type == 3234) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 385; + this.width = 12; + this.height = 12; + return; + } + if (type >= 3235 && type <= 3237) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 33 + type - 3235; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + return; + } + switch (type) + { + case 3238: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 186; + this.width = 12; + this.height = 12; + return; + case 3239: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 387; + this.width = 20; + this.height = 12; + return; + case 3240: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 388; + this.width = 18; + this.height = 26; + return; + case 3241: + this.width = 14; + this.height = 28; + this.rare = 1; + this.value = Item.sellPrice(gold: 3); + this.accessory = true; + this.balloonSlot = (sbyte) 12; + return; + case 3242: + this.width = 18; + this.height = 18; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + this.headSlot = 182; + return; + case 3243: + this.width = 18; + this.height = 18; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + this.bodySlot = 184; + return; + case 3244: + this.width = 18; + this.height = 18; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + this.legSlot = 124; + return; + case 3245: + this.width = 16; + this.height = 16; + this.value = Item.sellPrice(gold: 2); + this.useAnimation = 17; + this.useTime = 17; + this.useStyle = 1; + this.UseSound = SoundID.Item1; + this.noMelee = true; + this.shootSpeed = 1f; + this.damage = 11; + this.knockBack = 1.8f; + this.shoot = 21; + this.ranged = true; + this.rare = 2; + this.useAmmo = 154; + this.noUseGraphic = true; + this.expert = true; + return; + case 3246: + this.width = 18; + this.height = 18; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + this.bodySlot = 185; + return; + case 3247: + this.width = 18; + this.height = 18; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + this.legSlot = 125; + return; + case 3248: + this.width = 18; + this.height = 18; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + this.headSlot = 183; + return; + case 3249: + this.mana = 10; + this.damage = 50; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 533; + this.buffType = 161; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item113; + this.useAnimation = 36; + this.useTime = 36; + this.rare = 8; + this.noMelee = true; + this.knockBack = 2f; + this.value = this.eclipsePostPlanteraPrice; + this.summon = true; + return; + default: + if (type == 3250 || type == 3251 || type == 3252) + { + this.width = 20; + this.height = 22; + this.rare = 4; + this.value = Item.buyPrice(gold: 15); + this.accessory = true; + this.balloonSlot = (sbyte) (13 + type - 3250); + return; + } + if (type == 3253) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 390; + this.width = 12; + this.height = 30; + this.value = Item.buyPrice(gold: 2); + this.rare = 1; + this.glowMask = (short) 129; + return; + } + if (type >= 3254 && type <= 3257) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 391 + type - 3254; + this.width = 12; + this.height = 12; + return; + } + switch (type) + { + case 3258: + this.useStyle = 1; + this.useAnimation = 21; + this.useTime = 21; + this.autoReuse = true; + this.knockBack = 20f; + this.width = 36; + this.height = 36; + this.damage = 35; + this.scale = 1.1f; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = Item.buyPrice(gold: 25); + this.melee = true; + this.crit = 15; + return; + case 3259: + this.width = 20; + this.height = 26; + this.maxStack = 99; + this.rare = 3; + this.value = Item.buyPrice(gold: 30); + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.consumable = true; + return; + case 3260: + this.useStyle = 4; + this.channel = true; + this.width = 34; + this.height = 34; + this.UseSound = SoundID.Item25; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 8; + this.noMelee = true; + this.mountType = 10; + this.value = Item.sellPrice(gold: 5); + return; + case 3261: + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.rare = 7; + this.value = Item.sellPrice(gold: 1); + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 21; + return; + default: + if (type == 3262 || type >= 3278 && type <= 3292 || type >= 3315 && type <= 3317) + { + this.useStyle = 5; + this.width = 24; + this.height = 24; + this.noUseGraphic = true; + this.UseSound = SoundID.Item1; + this.melee = true; + this.channel = true; + this.noMelee = true; + this.shoot = 541 + type - 3278; + this.useAnimation = 25; + this.useTime = 25; + this.shootSpeed = 16f; + switch (type) + { + case 3262: + this.knockBack = 3.25f; + this.damage = 21; + this.value = Item.buyPrice(gold: 5); + this.rare = 2; + this.shoot = 534; + return; + case 3278: + this.knockBack = 2.5f; + this.damage = 9; + this.value = Item.sellPrice(silver: 1); + this.rare = 0; + return; + case 3279: + this.knockBack = 4.5f; + this.damage = 16; + this.value = Item.sellPrice(gold: 1); + this.rare = 1; + return; + case 3280: + this.knockBack = 4f; + this.damage = 17; + this.value = Item.sellPrice(gold: 1); + this.rare = 1; + return; + case 3281: + this.knockBack = 3.75f; + this.damage = 18; + this.value = Item.sellPrice(gold: 1, silver: 30); + this.rare = 3; + return; + case 3282: + this.knockBack = 4.3f; + this.damage = 27; + this.value = Item.sellPrice(gold: 1, silver: 80); + this.rare = 3; + return; + case 3283: + this.knockBack = 3.3f; + this.damage = 38; + this.value = Item.sellPrice(gold: 4); + this.rare = 4; + return; + case 3284: + this.knockBack = 3.8f; + this.damage = 54; + this.value = Item.buyPrice(gold: 25); + this.rare = 5; + return; + case 3285: + this.knockBack = 3.5f; + this.damage = 14; + this.value = Item.sellPrice(silver: 50); + this.rare = 1; + return; + case 3286: + this.knockBack = 3.1f; + this.damage = 60; + this.value = Item.sellPrice(gold: 5); + this.rare = 7; + return; + case 3289: + this.knockBack = 2.8f; + this.damage = 47; + this.value = Item.sellPrice(gold: 4); + this.rare = 4; + return; + case 3290: + this.knockBack = 4.5f; + this.damage = 45; + this.value = Item.sellPrice(gold: 4); + this.rare = 4; + return; + case 3291: + this.knockBack = 4.3f; + this.damage = 95; + this.value = Item.sellPrice(gold: 11); + this.rare = 8; + this.crit += 10; + return; + case 3315: + this.knockBack = 3.25f; + this.damage = 35; + this.value = Item.sellPrice(gold: 4); + this.rare = 3; + this.shoot = 562; + return; + case 3316: + this.knockBack = 3.8f; + this.damage = 44; + this.value = Item.sellPrice(gold: 4); + this.rare = 3; + this.shoot = 563; + return; + case 3317: + this.knockBack = 3.85f; + this.damage = 22; + this.value = this.dungeonPrice; + this.rare = 3; + this.shoot = 564; + return; + default: + if (type == 3288 || type == 3287) + { + this.knockBack = 4.5f; + this.damage = 70; + this.rare = 9; + this.value = Item.sellPrice(gold: 4); + return; + } + if (type == 3292) + { + this.knockBack = 3.5f; + this.damage = 115; + this.value = this.eclipseMothronPrice; + this.rare = 8; + return; + } + this.knockBack = 4f; + this.damage = 15; + this.rare = 2; + this.value = Item.sellPrice(gold: 1); + return; + } + } + else + { + if (type == 3389) + { + this.useStyle = 5; + this.width = 24; + this.height = 24; + this.noUseGraphic = true; + this.UseSound = SoundID.Item1; + this.melee = true; + this.channel = true; + this.noMelee = true; + this.shoot = 603; + this.useAnimation = 25; + this.useTime = 25; + this.shootSpeed = 16f; + this.damage = 190; + this.knockBack = 6.5f; + this.value = Item.sellPrice(gold: 10); + this.crit = 10; + this.rare = 10; + return; + } + if (type >= 3293 && type <= 3308) + { + this.width = 24; + this.height = 24; + this.rare = 1; + this.value = Item.sellPrice(silver: 3); + this.accessory = true; + this.stringColor = type != 3307 ? (type != 3306 ? (type != 3308 ? (type != 3305 ? 1 + type - 3293 : 28) : 13) : 14) : 27; + this.canBePlacedInVanityRegardlessOfConditions = true; + return; + } + if (type >= 3309 && type <= 3314) + { + this.width = 24; + this.height = 24; + this.rare = 2; + this.value = Item.buyPrice(gold: 5); + this.accessory = true; + return; + } + switch (type) + { + case 3263: + this.width = 18; + this.height = 18; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + this.headSlot = 184; + return; + case 3264: + this.width = 18; + this.height = 18; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + this.bodySlot = 186; + return; + case 3265: + this.width = 18; + this.height = 18; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + this.legSlot = 126; + return; + case 3266: + this.width = 18; + this.height = 18; + this.value = 4500; + this.headSlot = 185; + this.defense = 4; + return; + case 3267: + this.width = 18; + this.height = 18; + this.value = 4500; + this.bodySlot = 187; + this.defense = 5; + return; + case 3268: + this.width = 18; + this.height = 18; + this.value = 4500; + this.legSlot = (int) sbyte.MaxValue; + this.defense = 4; + return; + case 3269: + this.useStyle = 4; + this.useAnimation = 20; + this.useTime = 20; + this.autoReuse = true; + this.reuseDelay = 10; + this.shootSpeed = 1f; + this.knockBack = 2f; + this.width = 16; + this.height = 16; + this.damage = 40; + this.UseSound = (LegacySoundStyle) null; + this.shoot = 535; + this.mana = 15; + this.rare = 4; + this.value = Item.sellPrice(gold: 4); + this.noMelee = true; + this.noUseGraphic = true; + this.magic = true; + this.channel = true; + return; + case 3270: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 395; + this.width = 28; + this.height = 28; + return; + case 3271: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 396; + this.width = 12; + this.height = 12; + return; + case 3272: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 397; + this.width = 12; + this.height = 12; + return; + case 3273: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 275; + this.width = 12; + this.height = 12; + return; + case 3274: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 398; + this.width = 12; + this.height = 12; + return; + case 3275: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 399; + this.width = 12; + this.height = 12; + return; + case 3276: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 400; + this.width = 12; + this.height = 12; + return; + case 3277: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 401; + this.width = 12; + this.height = 12; + return; + case 3338: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 402; + this.width = 12; + this.height = 12; + return; + case 3339: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 403; + this.width = 12; + this.height = 12; + return; + case 3340: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 304; + this.width = 12; + this.height = 12; + return; + case 3341: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 305; + this.width = 12; + this.height = 12; + return; + case 3342: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 306; + this.width = 12; + this.height = 12; + return; + case 3343: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 307; + this.width = 12; + this.height = 12; + return; + case 3344: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 308; + this.width = 12; + this.height = 12; + return; + case 3345: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 309; + this.width = 12; + this.height = 12; + return; + case 3346: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 310; + this.width = 12; + this.height = 12; + return; + case 3347: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 404; + this.width = 12; + this.height = 12; + return; + case 3348: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 311; + this.width = 12; + this.height = 12; + return; + default: + if (type >= 3318 && type <= 3332) + { + this.maxStack = 999; + this.consumable = true; + this.width = 24; + this.height = 24; + this.rare = 1; + if (type == 3320) + this.rare = 2; + if (type == 3321) + this.rare = 2; + if (type == 3322) + this.rare = 3; + if (type == 3323) + this.rare = 3; + if (type == 3324) + this.rare = 4; + if (type == 3325) + this.rare = 5; + if (type == 3326) + this.rare = 5; + if (type == 3327) + this.rare = 5; + if (type == 3328) + this.rare = 6; + if (type == 3329) + this.rare = 7; + if (type == 3330) + this.rare = 7; + if (type == 3331) + this.rare = 8; + if (type == 3332) + this.rare = 8; + this.expert = true; + return; + } + switch (type) + { + case 3333: + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 3; + this.value = Item.sellPrice(gold: 2); + this.backSlot = (sbyte) 9; + this.expert = true; + return; + case 3334: + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 4; + this.value = Item.buyPrice(gold: 50); + this.handOffSlot = (sbyte) 11; + this.handOnSlot = (sbyte) 18; + return; + case 3335: + this.maxStack = 99; + this.consumable = true; + this.width = 18; + this.height = 18; + this.useStyle = 4; + this.useTime = 30; + this.UseSound = SoundID.Item4; + this.useAnimation = 30; + this.rare = 4; + this.value = Item.sellPrice(gold: 2); + this.expert = true; + return; + case 3336: + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 8; + this.value = Item.sellPrice(gold: 4); + this.expert = true; + return; + case 3337: + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 8; + this.value = Item.sellPrice(gold: 5); + this.expert = true; + return; + case 3353: + this.width = 36; + this.height = 26; + this.mountType = 11; + this.rare = 6; + this.value = Item.sellPrice(gold: 3); + this.expert = true; + return; + default: + if (type == 3355 || type == 3354 || type == 3356) + { + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.rare = 5; + this.value = Item.sellPrice(silver: 50); + this.expert = true; + return; + } + if (type == 3357 || type == 3358 || type == 3359) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.placeStyle = 56 + type - 3357; + this.rare = 1; + return; + } + switch (type) + { + case 3360: + this.tileWand = 620; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.createTile = 383; + this.width = 8; + this.height = 10; + this.rare = 1; + this.value = Item.sellPrice(silver: 25); + return; + case 3361: + this.tileWand = 620; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.createTile = 384; + this.width = 8; + this.height = 10; + this.rare = 1; + this.value = Item.sellPrice(silver: 25); + return; + case 3362: + this.width = 28; + this.height = 20; + this.bodySlot = 188; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 25); + return; + case 3363: + this.width = 28; + this.height = 20; + this.legSlot = 128; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 25); + return; + case 3364: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 405; + this.width = 28; + this.height = 28; + this.rare = 1; + return; + case 3365: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 406; + this.width = 28; + this.height = 28; + this.rare = 1; + return; + case 3366: + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = Item.buyPrice(gold: 50); + this.accessory = true; + return; + case 3367: + this.useStyle = 4; + this.channel = true; + this.width = 34; + this.height = 34; + this.UseSound = SoundID.Item25; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 8; + this.noMelee = true; + this.mountType = 12; + this.value = Item.sellPrice(gold: 5); + this.expert = true; + return; + case 3368: + this.width = 14; + this.height = 38; + this.useAnimation = 25; + this.useTime = 15; + this.useStyle = 5; + this.rare = 9; + this.noUseGraphic = true; + this.channel = true; + this.noMelee = true; + this.damage = 20; + this.knockBack = 4f; + this.autoReuse = false; + this.noMelee = true; + this.melee = true; + this.shoot = 595; + this.shootSpeed = 15f; + this.value = Item.sellPrice(gold: 5); + return; + case 3369: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 209; + this.placeStyle = 2; + this.width = 12; + this.height = 12; + this.rare = 3; + this.value = Item.buyPrice(gold: 25); + return; + case 3370: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 36; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + return; + case 3371: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 37; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + return; + default: + if (type >= 3372 && type <= 3373) + { + this.width = 28; + this.height = 20; + this.headSlot = type + 186 - 3372; + this.rare = 1; + this.value = Item.sellPrice(silver: 75); + this.vanity = true; + return; + } + switch (type) + { + case 3374: + this.width = 18; + this.height = 18; + this.defense = 2; + this.headSlot = 188; + this.rare = 1; + this.value = Item.sellPrice(silver: 30); + return; + case 3375: + this.width = 18; + this.height = 18; + this.defense = 4; + this.bodySlot = 189; + this.rare = 1; + this.value = Item.sellPrice(silver: 50); + return; + case 3376: + this.width = 18; + this.height = 18; + this.defense = 2; + this.legSlot = 129; + this.rare = 1; + this.value = Item.sellPrice(silver: 40); + return; + case 3377: + this.mana = 7; + this.UseSound = SoundID.Item43; + this.useStyle = 5; + this.damage = 21; + this.useAnimation = 28; + this.useTime = 28; + this.width = 40; + this.height = 40; + this.shoot = 597; + this.shootSpeed = 9f; + this.knockBack = 4.75f; + this.magic = true; + this.autoReuse = true; + this.value = 20000; + this.rare = 1; + this.noMelee = true; + return; + case 3378: + this.shoot = 598; + this.shootSpeed = 10f; + this.damage = 20; + this.knockBack = 5f; + this.ranged = true; + this.useStyle = 1; + this.UseSound = SoundID.Item1; + this.useAnimation = 25; + this.useTime = 25; + this.width = 30; + this.height = 30; + this.maxStack = 999; + this.consumable = true; + this.noUseGraphic = true; + this.noMelee = true; + this.autoReuse = true; + this.value = 50; + this.rare = 1; + return; + case 3379: + this.autoReuse = true; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 599; + this.damage = 14; + this.width = 18; + this.height = 20; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 14; + this.useTime = 14; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 50; + this.knockBack = 1.5f; + this.ranged = true; + this.rare = 1; + return; + case 3380: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 407; + this.width = 12; + this.height = 12; + this.rare = 1; + return; + case 3381: + this.width = 18; + this.height = 18; + this.defense = 10; + this.headSlot = 189; + this.rare = 10; + this.value = Item.sellPrice(gold: 7); + return; + case 3382: + this.width = 18; + this.height = 18; + this.defense = 16; + this.bodySlot = 190; + this.rare = 10; + this.value = Item.sellPrice(gold: 7) * 2; + return; + case 3383: + this.width = 18; + this.height = 18; + this.defense = 12; + this.legSlot = 130; + this.rare = 10; + this.value = (int) ((double) Item.sellPrice(gold: 7) * 1.5); + return; + case 3384: + this.useStyle = 5; + this.useAnimation = 20; + this.useTime = 20; + this.shootSpeed = 24f; + this.knockBack = 2f; + this.width = 16; + this.height = 16; + this.UseSound = (LegacySoundStyle) null; + this.shoot = 600; + this.rare = 8; + this.value = Item.sellPrice(gold: 10); + this.noMelee = true; + this.noUseGraphic = true; + this.channel = true; + this.autoReuse = true; + return; + default: + if (type >= 3385 && type <= 3388) + { + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = -11; + this.placeStyle = type - 3385 + 8; + this.createTile = 227; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + return; + } + if (type >= 3390 && type <= 3452) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 207 + type - 3390; + this.width = 10; + this.height = 24; + this.value = 1000; + this.rare = 1; + return; + } + if (type >= 3453 && type <= 3455) + { + this.width = 12; + this.height = 12; + switch (type) + { + case 3453: + this.buffType = 179; + return; + case 3454: + this.buffType = 173; + return; + case 3455: + this.buffType = 176; + return; + default: + return; + } + } + else + { + if (type >= 3456 && type <= 3459) + { + this.width = 18; + this.height = 18; + this.maxStack = 999; + this.value = Item.sellPrice(silver: 20); + this.rare = 9; + return; + } + switch (type) + { + case 3460: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 408; + this.width = 12; + this.height = 12; + this.rare = 10; + this.value = Item.sellPrice(gold: 1, silver: 20) / 4; + return; + case 3461: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 409; + this.width = 12; + this.height = 12; + return; + case 3462: + this.SetDefaults3(2772); + type = 3462; + this.glowMask = (short) 174; + return; + case 3463: + this.SetDefaults3(2773); + type = 3463; + this.shoot = 610; + this.glowMask = (short) 175; + return; + case 3464: + this.SetDefaults3(2774); + type = 3464; + this.shoot = 609; + this.glowMask = (short) 176; + return; + case 3465: + this.SetDefaults3(2775); + type = 3465; + this.glowMask = (short) 177; + return; + case 3466: + this.SetDefaults3(2776); + type = 3466; + this.glowMask = (short) 178; + return; + case 3467: + this.width = 20; + this.height = 20; + this.maxStack = 999; + this.rare = 10; + this.value = Item.sellPrice(gold: 1, silver: 20); + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 239; + this.placeStyle = 22; + return; + default: + if (type >= 3468 && type <= 3471) + { + this.width = 22; + this.height = 20; + this.accessory = true; + this.value = Item.buyPrice(gold: 40); + this.rare = 10; + this.wingSlot = (sbyte) (29 + type - 3468); + return; + } + switch (type) + { + case 3472: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 224; + this.width = 12; + this.height = 12; + return; + case 3473: + this.useStyle = 5; + this.useAnimation = 20; + this.useTime = 20; + this.shootSpeed = 24f; + this.knockBack = 2f; + this.width = 16; + this.height = 16; + this.shoot = 611; + this.rare = 10; + this.value = Item.sellPrice(gold: 10); + this.noMelee = true; + this.noUseGraphic = true; + this.channel = true; + this.autoReuse = true; + this.melee = true; + this.damage = 105; + return; + case 3474: + this.mana = 10; + this.damage = 60; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 613; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item44; + this.useAnimation = 36; + this.useTime = 36; + this.rare = 10; + this.noMelee = true; + this.knockBack = 2f; + this.buffType = 182; + this.value = Item.sellPrice(gold: 10); + this.summon = true; + return; + case 3475: + this.useStyle = 5; + this.useAnimation = 20; + this.useTime = 20; + this.shootSpeed = 20f; + this.knockBack = 2f; + this.width = 20; + this.height = 12; + this.damage = 50; + this.UseSound = (LegacySoundStyle) null; + this.shoot = 615; + this.rare = 10; + this.value = Item.sellPrice(gold: 10); + this.noMelee = true; + this.noUseGraphic = true; + this.ranged = true; + this.channel = true; + this.glowMask = (short) 191; + this.useAmmo = AmmoID.Bullet; + this.autoReuse = true; + return; + case 3476: + this.mana = 30; + this.damage = 70; + this.useStyle = 5; + this.shootSpeed = 7f; + this.shoot = 617; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item117; + this.useAnimation = 30; + this.useTime = 30; + this.autoReuse = true; + this.noMelee = true; + this.knockBack = 5f; + this.rare = 10; + this.value = Item.sellPrice(gold: 10); + this.magic = true; + this.glowMask = (short) 194; + this.holdStyle = 1; + return; + case 3477: + this.useStyle = 1; + this.shootSpeed = 9f; + this.rare = 3; + this.damage = 20; + this.shoot = 621; + this.width = 18; + this.height = 20; + this.maxStack = 999; + this.consumable = true; + this.knockBack = 3f; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 100; + return; + case 3478: + this.width = 18; + this.height = 18; + this.headSlot = 190; + this.value = 5000; + this.vanity = true; + return; + case 3479: + this.width = 18; + this.height = 18; + this.bodySlot = 191; + this.value = 5000; + this.vanity = true; + return; + default: + if (type >= 3522 && type <= 3525) + { + this.useTurn = true; + this.autoReuse = true; + this.useStyle = 1; + this.useAnimation = 28; + this.useTime = 7; + this.knockBack = 7f; + this.width = 42; + this.height = 42; + this.damage = 60; + this.axe = 30; + this.hammer = 100; + this.UseSound = SoundID.Item1; + this.rare = 10; + this.value = Item.sellPrice(gold: 5); + this.melee = true; + this.tileBoost += 4; + switch (type) + { + case 3522: + return; + case 3523: + this.glowMask = (short) 196; + return; + case 3524: + this.glowMask = (short) 197; + return; + case 3525: + this.glowMask = (short) 198; + return; + default: + return; + } + } + else + { + switch (type) + { + case 3349: + this.SetDefaults1(4); + this.type = type; + this.useAnimation = 18; + this.useTime = 18; + this.damage = 20; + this.width = this.height = 32; + this.knockBack = 4.25f; + this.rare = 2; + this.value = Item.sellPrice(silver: 50); + return; + case 3350: + this.useStyle = 5; + this.useAnimation = 24; + this.useTime = 9; + this.width = 24; + this.height = 14; + this.shoot = 587; + this.UseSound = (LegacySoundStyle) null; + this.damage = 12; + this.shootSpeed = 10f; + this.noMelee = true; + this.value = Item.sellPrice(silver: 50); + this.knockBack = 1.25f; + this.scale = 0.85f; + this.rare = 2; + this.ranged = true; + this.crit = 7; + return; + case 3351: + this.SetDefaults1(4); + this.type = type; + this.useAnimation = 15; + this.useTime = 15; + this.damage = 16; + this.width = this.height = 28; + this.knockBack = 3.5f; + this.rare = 2; + this.value = Item.sellPrice(silver: 50); + return; + case 3352: + this.SetDefaults1(4); + this.type = type; + this.useAnimation = 12; + this.useTime = 12; + this.damage = 14; + this.width = this.height = 32; + this.knockBack = 5f; + this.rare = 2; + this.value = Item.sellPrice(silver: 50); + return; + case 3480: + this.SetDefaults1(99); + this.type = type; + this.useAnimation = 25; + this.useTime = 25; + this.damage = 13; + this.value = 10500; + return; + case 3481: + this.SetDefaults1(7); + this.type = type; + this.useAnimation = 27; + this.useTime = 21; + this.scale = 1.275f; + this.damage = 10; + this.hammer = 59; + this.value = 12000; + return; + case 3482: + this.SetDefaults1(10); + this.type = type; + this.useTime = 17; + this.axe = 12; + this.useAnimation = 25; + this.scale = 1.175f; + this.damage = 8; + this.value = 12000; + return; + case 3483: + this.SetDefaults1(6); + this.type = type; + this.damage = 13; + this.useAnimation = 10; + this.useTime = 10; + this.knockBack = 5f; + this.shoot = 945; + this.scale = 0.975f; + this.value = 10500; + return; + case 3484: + this.SetDefaults1(4); + this.type = type; + this.useAnimation = 19; + this.damage = 15; + this.scale = 1.075f; + this.value = 13500; + return; + case 3485: + this.SetDefaults1(1); + this.type = type; + this.useTime = 15; + this.pick = 59; + this.useAnimation = 19; + this.scale = 1.05f; + this.damage = 7; + this.value = 15000; + return; + case 3486: + this.SetDefaults1(99); + this.type = type; + this.useAnimation = 26; + this.useTime = 26; + this.damage = 10; + this.value = 5250; + return; + case 3487: + this.SetDefaults1(7); + this.type = type; + this.useAnimation = 28; + this.useTime = 25; + this.scale = 1.25f; + this.damage = 9; + this.hammer = 50; + this.value = 6000; + return; + case 3488: + this.SetDefaults1(10); + this.type = type; + this.useTime = 18; + this.axe = 11; + this.useAnimation = 26; + this.scale = 1.15f; + this.damage = 7; + this.value = 6000; + return; + case 3489: + this.SetDefaults1(6); + this.type = type; + this.damage = 10; + this.useAnimation = 11; + this.useTime = 11; + this.knockBack = 4f; + this.shoot = 943; + this.scale = 0.95f; + this.value = 5250; + return; + case 3490: + this.SetDefaults1(4); + this.type = type; + this.useAnimation = 20; + this.damage = 12; + this.scale *= 1.025f; + this.value = 6750; + return; + case 3491: + this.SetDefaults1(1); + this.type = type; + this.useTime = 19; + this.pick = 50; + this.useAnimation = 21; + this.scale = 1.05f; + this.damage = 6; + this.value = 7500; + return; + case 3492: + this.SetDefaults1(99); + this.type = type; + this.useAnimation = 27; + this.useTime = 27; + this.damage = 9; + this.value = 2100; + return; + case 3493: + this.SetDefaults1(7); + this.type = type; + this.useAnimation = 29; + this.useTime = 19; + this.scale = 1.225f; + this.damage = 8; + this.hammer = 43; + this.value = 2400; + return; + case 3494: + this.SetDefaults1(10); + this.type = type; + this.useTime = 19; + this.axe = 10; + this.useAnimation = 28; + this.scale = 1.125f; + this.damage = 6; + this.value = 2400; + return; + case 3495: + this.SetDefaults1(6); + this.type = type; + this.damage = 9; + this.useAnimation = 12; + this.useTime = 12; + this.knockBack = 4f; + this.shoot = 941; + this.scale = 0.925f; + this.value = 2100; + return; + case 3496: + this.SetDefaults1(4); + this.type = type; + this.useAnimation = 21; + this.damage = 11; + this.value = 2700; + return; + case 3497: + this.SetDefaults1(1); + this.type = type; + this.useTime = 12; + this.pick = 43; + this.useAnimation = 19; + this.damage = 6; + this.scale = 1.025f; + this.value = 3000; + return; + case 3498: + this.SetDefaults1(99); + this.type = type; + this.useAnimation = 28; + this.useTime = 28; + this.damage = 7; + this.value = 525; + return; + case 3499: + this.SetDefaults1(7); + this.type = type; + this.useAnimation = 31; + this.useTime = 21; + this.scale = 1.15f; + this.damage = 6; + this.hammer = 38; + this.value = 600; + return; + case 3500: + this.SetDefaults1(10); + this.type = type; + this.useTime = 20; + this.axe = 8; + this.useAnimation = 28; + this.scale = 1.05f; + this.damage = 4; + this.value = 600; + return; + case 3501: + this.SetDefaults1(6); + this.type = type; + this.damage = 7; + this.useAnimation = 12; + this.useTime = 12; + this.knockBack = 4f; + this.shoot = 939; + this.scale = 0.85f; + this.value = 525; + return; + case 3502: + this.SetDefaults1(4); + this.type = type; + this.useAnimation = 22; + this.damage = 9; + this.value = 675; + return; + case 3503: + this.SetDefaults1(1); + this.type = type; + this.useTime = 14; + this.pick = 35; + this.useAnimation = 21; + this.damage = 5; + this.scale = 0.95f; + this.value = 750; + return; + case 3504: + this.SetDefaults1(99); + this.type = type; + this.useAnimation = 29; + this.useTime = 29; + this.damage = 6; + this.value = 350; + return; + case 3505: + this.SetDefaults1(7); + this.type = type; + this.useAnimation = 33; + this.useTime = 23; + this.scale = 1.1f; + this.damage = 4; + this.hammer = 35; + this.tileBoost = -1; + this.value = 400; + return; + case 3506: + this.SetDefaults1(10); + this.type = type; + this.useTime = 21; + this.axe = 7; + this.useAnimation = 30; + this.scale = 1f; + this.damage = 3; + this.tileBoost = -1; + this.value = 400; + return; + case 3507: + this.SetDefaults1(6); + this.type = type; + this.damage = 5; + this.useAnimation = 13; + this.useTime = 13; + this.knockBack = 4f; + this.shoot = 938; + this.scale = 0.8f; + this.value = 350; + return; + case 3508: + this.SetDefaults1(4); + this.type = type; + this.useAnimation = 23; + this.damage = 8; + this.value = 450; + return; + case 3509: + this.SetDefaults1(1); + this.type = type; + this.useTime = 15; + this.pick = 35; + this.useAnimation = 23; + this.damage = 4; + this.scale = 0.9f; + this.tileBoost = -1; + this.value = 500; + return; + case 3510: + this.SetDefaults1(99); + this.type = type; + this.useAnimation = 27; + this.useTime = 27; + this.damage = 9; + this.value = 3500; + return; + case 3511: + this.SetDefaults1(7); + this.type = type; + this.useAnimation = 29; + this.useTime = 19; + this.scale = 1.25f; + this.damage = 9; + this.hammer = 45; + this.value = 4000; + return; + case 3512: + this.SetDefaults1(10); + this.type = type; + this.useTime = 18; + this.axe = 10; + this.useAnimation = 26; + this.scale = 1.15f; + this.damage = 6; + this.value = 4000; + return; + case 3513: + this.SetDefaults1(6); + this.type = type; + this.damage = 9; + this.useAnimation = 12; + this.useTime = 12; + this.knockBack = 4f; + this.shoot = 942; + this.scale = 0.95f; + this.value = 3500; + return; + case 3514: + this.SetDefaults1(4); + this.type = type; + this.useAnimation = 21; + this.damage = 11; + this.value = 4500; + return; + case 3515: + this.SetDefaults1(1); + this.type = type; + this.useTime = 11; + this.pick = 45; + this.useAnimation = 19; + this.scale = 1.05f; + this.damage = 6; + this.value = 5000; + return; + case 3516: + this.SetDefaults1(99); + this.type = type; + this.useAnimation = 26; + this.useTime = 26; + this.damage = 11; + this.value = 7000; + return; + case 3517: + this.SetDefaults1(7); + this.type = type; + this.useAnimation = 28; + this.useTime = 23; + this.scale = 1.25f; + this.damage = 9; + this.hammer = 55; + this.value = 8000; + return; + case 3518: + this.SetDefaults1(10); + this.type = type; + this.useTime = 18; + this.axe = 11; + this.useAnimation = 26; + this.scale = 1.15f; + this.damage = 7; + this.value = 8000; + return; + case 3519: + this.SetDefaults1(6); + this.type = type; + this.damage = 12; + this.useAnimation = 11; + this.useTime = 11; + this.knockBack = 5f; + this.shoot = 944; + this.scale = 0.95f; + this.value = 7000; + return; + case 3520: + this.SetDefaults1(4); + this.type = type; + this.useAnimation = 20; + this.damage = 13; + this.scale = 1.05f; + this.value = 9000; + return; + case 3521: + this.SetDefaults1(1); + this.type = type; + this.useTime = 17; + this.pick = 55; + this.useAnimation = 20; + this.scale = 1.05f; + this.damage = 6; + this.value = 10000; + return; + case 3526: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 2, silver: 50); + this.rare = 4; + return; + case 3527: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 2, silver: 50); + this.rare = 4; + return; + case 3528: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 2, silver: 50); + this.rare = 4; + return; + case 3529: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 2, silver: 50); + this.rare = 4; + return; + case 3530: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 2, silver: 50); + this.rare = 4; + return; + case 3531: + this.mana = 10; + this.damage = 40; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 625; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item44; + this.useAnimation = 36; + this.useTime = 36; + this.rare = 10; + this.noMelee = true; + this.knockBack = 2f; + this.buffType = 188; + this.value = Item.sellPrice(gold: 10); + this.summon = true; + return; + case 3533: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + return; + case 3534: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(silver: 75); + this.rare = 2; + return; + case 3535: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + return; + case 3536: + this.width = 22; + this.height = 32; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 410; + this.placeStyle = 0; + this.rare = 9; + this.value = Item.buyPrice(1); + return; + case 3537: + this.width = 22; + this.height = 32; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 410; + this.placeStyle = 1; + this.rare = 9; + this.value = Item.buyPrice(1); + return; + case 3538: + this.width = 22; + this.height = 32; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 410; + this.placeStyle = 2; + this.rare = 9; + this.value = Item.buyPrice(1); + return; + case 3539: + this.width = 22; + this.height = 32; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 410; + this.placeStyle = 3; + this.rare = 9; + this.value = Item.buyPrice(1); + return; + case 3540: + this.useStyle = 5; + this.useAnimation = 12; + this.useTime = 12; + this.shootSpeed = 20f; + this.knockBack = 2f; + this.width = 20; + this.height = 12; + this.damage = 50; + this.UseSound = SoundID.Item5; + this.shoot = 630; + this.rare = 10; + this.value = Item.sellPrice(gold: 10); + this.noMelee = true; + this.noUseGraphic = true; + this.ranged = true; + this.channel = true; + this.glowMask = (short) 200; + this.useAmmo = AmmoID.Arrow; + this.autoReuse = true; + return; + case 3541: + this.useStyle = 5; + this.useAnimation = 10; + this.useTime = 10; + this.reuseDelay = 5; + this.shootSpeed = 30f; + this.knockBack = 0.0f; + this.width = 16; + this.height = 16; + this.damage = 100; + this.UseSound = (LegacySoundStyle) null; + this.shoot = 633; + this.mana = 12; + this.rare = 10; + this.value = Item.sellPrice(gold: 10); + this.noMelee = true; + this.noUseGraphic = true; + this.magic = true; + this.channel = true; + return; + case 3542: + this.useStyle = 5; + this.useAnimation = 12; + this.useTime = 12; + this.shootSpeed = 6f; + this.knockBack = 0.0f; + this.width = 16; + this.height = 16; + this.damage = 130; + this.UseSound = SoundID.Item20; + this.shoot = 634; + this.mana = 12; + this.rare = 10; + this.value = Item.sellPrice(gold: 10); + this.noMelee = true; + this.magic = true; + this.autoReuse = true; + this.noUseGraphic = true; + this.glowMask = (short) 207; + return; + case 3543: + this.shoot = 636; + this.shootSpeed = 10f; + this.damage = 150; + this.knockBack = 5f; + this.melee = true; + this.useStyle = 1; + this.UseSound = SoundID.Item1; + this.useAnimation = 16; + this.useTime = 16; + this.width = 30; + this.height = 30; + this.noUseGraphic = true; + this.noMelee = true; + this.autoReuse = true; + this.value = Item.sellPrice(gold: 10); + this.rare = 10; + return; + case 3544: + this.UseSound = SoundID.Item3; + this.healLife = 200; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.potion = true; + this.width = 14; + this.height = 24; + this.rare = 7; + this.value = Item.sellPrice(silver: 30); + return; + case 3545: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 411; + this.width = 28; + this.height = 28; + this.rare = 1; + this.mech = true; + this.value = Item.sellPrice(silver: 20); + return; + case 3546: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 30; + this.useTime = 30; + this.useAmmo = AmmoID.Rocket; + this.width = 50; + this.height = 20; + this.shoot = 134; + this.UseSound = SoundID.Item156; + this.damage = 25; + this.shootSpeed = 15f; + this.noMelee = true; + this.value = Item.buyPrice(gold: 80); + this.knockBack = 4f; + this.rare = 8; + this.ranged = true; + return; + case 3547: + this.useStyle = 1; + this.shootSpeed = 4f; + this.shoot = 637; + this.width = 8; + this.height = 28; + this.maxStack = 99; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 40; + this.useTime = 40; + this.noUseGraphic = true; + this.noMelee = true; + this.value = Item.buyPrice(silver: 20); + this.rare = 1; + return; + case 3548: + this.useStyle = 5; + this.shootSpeed = 6f; + this.shoot = 588; + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.noUseGraphic = true; + this.noMelee = true; + this.value = Item.sellPrice(copper: 50); + this.damage = 30; + this.knockBack = 6f; + this.rare = 2; + this.ranged = true; + return; + case 3549: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 412; + this.width = 28; + this.height = 28; + this.rare = 10; + return; + case 3550: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + return; + case 3551: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + return; + case 3552: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + return; + case 3553: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(silver: 75); + this.rare = 2; + return; + case 3554: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(silver: 75); + this.rare = 2; + return; + case 3555: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(silver: 75); + this.rare = 2; + return; + case 3556: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + return; + case 3557: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + return; + case 3558: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + return; + case 3559: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 1; + return; + case 3560: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = 10000; + this.rare = 2; + return; + case 3561: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + return; + case 3562: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + return; + case 3563: + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.noUseGraphic = true; + this.makeNPC = (short) 538; + return; + case 3564: + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.makeNPC = (short) 539; + this.noUseGraphic = true; + this.value = Item.sellPrice(gold: 10); + this.rare = 3; + return; + case 3565: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 413; + this.width = 12; + this.height = 12; + return; + case 3566: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 414; + this.width = 12; + this.height = 12; + this.value = Item.sellPrice(gold: 10); + this.rare = 3; + return; + case 3567: + this.shootSpeed = 2f; + this.shoot = 638; + this.damage = 20; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Bullet; + this.knockBack = 3f; + this.value = 7; + this.ranged = true; + this.rare = 9; + this.value = Item.sellPrice(copper: 2); + return; + case 3568: + this.shootSpeed = 3f; + this.shoot = 639; + this.damage = 15; + this.width = 10; + this.height = 28; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Arrow; + this.knockBack = 3.5f; + this.value = 5; + this.ranged = true; + this.rare = 9; + this.value = Item.sellPrice(copper: 2); + return; + case 3569: + this.mana = 10; + this.damage = 50; + this.useStyle = 1; + this.shootSpeed = 14f; + this.shoot = 641; + this.width = 18; + this.height = 20; + this.UseSound = SoundID.Item78; + this.useAnimation = 30; + this.useTime = 30; + this.noMelee = true; + this.value = Item.sellPrice(gold: 10); + this.knockBack = 7.5f; + this.rare = 10; + this.summon = true; + this.sentry = true; + return; + case 3570: + this.autoReuse = true; + this.mana = 13; + this.useStyle = 5; + this.damage = 100; + this.useAnimation = 10; + this.useTime = 10; + this.width = 40; + this.height = 40; + this.shoot = 645; + this.shootSpeed = 10f; + this.knockBack = 4.5f; + this.value = Item.sellPrice(gold: 10); + this.magic = true; + this.rare = 10; + this.noMelee = true; + this.UseSound = SoundID.Item88; + return; + case 3571: + this.mana = 10; + this.damage = 80; + this.useStyle = 1; + this.shootSpeed = 14f; + this.shoot = 643; + this.width = 18; + this.height = 20; + this.UseSound = SoundID.Item78; + this.useAnimation = 30; + this.useTime = 30; + this.noMelee = true; + this.value = Item.sellPrice(gold: 10); + this.knockBack = 7.5f; + this.rare = 10; + this.summon = true; + this.sentry = true; + return; + case 3572: + this.noUseGraphic = true; + this.damage = 0; + this.useStyle = 5; + this.shootSpeed = 18f; + this.shoot = 646; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 10; + this.noMelee = true; + this.value = Item.sellPrice(gold: 10); + return; + default: + if (type >= 3573 && type <= 3576) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 415 + type - 3573; + this.width = 12; + this.height = 12; + return; + } + switch (type) + { + case 3577: + this.channel = true; + this.damage = 0; + this.useStyle = 4; + this.shoot = 650; + this.width = 24; + this.height = 24; + this.UseSound = SoundID.Item8; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 10; + this.noMelee = true; + this.value = Item.sellPrice(gold: 10); + this.buffType = 190; + this.expert = true; + return; + case 3578: + this.width = 28; + this.height = 20; + this.bodySlot = 192; + this.rare = 9; + this.value = Item.sellPrice(gold: 5); + this.vanity = true; + return; + case 3579: + this.width = 18; + this.height = 14; + this.legSlot = 132; + this.rare = 9; + this.value = Item.sellPrice(gold: 5); + this.vanity = true; + return; + case 3580: + this.width = 18; + this.height = 14; + this.wingSlot = (sbyte) 33; + this.rare = 9; + this.accessory = true; + this.value = 400000; + return; + case 3581: + this.width = 18; + this.height = 14; + this.rare = 9; + this.vanity = true; + this.value = Item.sellPrice(gold: 5); + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + return; + case 3582: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 9; + this.wingSlot = (sbyte) 34; + this.value = 400000; + return; + case 3583: + this.width = 28; + this.height = 20; + this.headSlot = 191; + this.rare = 9; + this.value = Item.sellPrice(gold: 5); + this.vanity = true; + return; + case 3584: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 60; + this.width = 12; + this.height = 12; + return; + case 3585: + this.width = 28; + this.height = 20; + this.headSlot = 192; + this.rare = 9; + this.value = Item.sellPrice(gold: 5); + this.vanity = true; + return; + case 3586: + this.width = 28; + this.height = 20; + this.bodySlot = 193; + this.rare = 9; + this.value = Item.sellPrice(gold: 5); + this.vanity = true; + return; + case 3587: + this.width = 18; + this.height = 14; + this.legSlot = 133; + this.rare = 9; + this.value = Item.sellPrice(gold: 5); + this.vanity = true; + return; + case 3588: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 9; + this.wingSlot = (sbyte) 35; + this.value = 400000; + return; + case 3589: + this.width = 28; + this.height = 20; + this.headSlot = 193; + this.rare = 9; + this.value = Item.sellPrice(gold: 5); + this.vanity = true; + return; + case 3590: + this.width = 28; + this.height = 20; + this.bodySlot = 194; + this.rare = 9; + this.value = Item.sellPrice(gold: 5); + this.vanity = true; + return; + case 3591: + this.width = 18; + this.height = 14; + this.legSlot = 134; + this.rare = 9; + this.value = Item.sellPrice(gold: 5); + this.vanity = true; + return; + case 3592: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 9; + this.wingSlot = (sbyte) 36; + this.value = 400000; + return; + default: + if (type >= 3593 && type <= 3594) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 270 + type - 3593; + this.width = 10; + this.height = 24; + this.value = 1000; + this.rare = 1; + return; + } + switch (type) + { + case 3595: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.placeStyle = 59; + this.rare = 1; + return; + case 3596: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.buyPrice(gold: 3); + this.placeStyle = 36; + return; + case 3601: + this.useStyle = 4; + this.width = 22; + this.height = 14; + this.consumable = true; + this.useAnimation = 45; + this.useTime = 45; + this.maxStack = 20; + this.rare = 10; + return; + case 3602: + this.createTile = 419; + this.width = 16; + this.height = 16; + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.mech = true; + this.value = Item.buyPrice(silver: 10); + return; + default: + if (type >= 3603 && type <= 3608) + { + this.createTile = 420; + this.width = 16; + this.height = 16; + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.placeStyle = type - 3603; + this.mech = true; + this.value = Item.buyPrice(gold: 2); + return; + } + switch (type) + { + case 3609: + this.createTile = 421; + this.width = 16; + this.height = 16; + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.value = Item.buyPrice(silver: 5); + return; + case 3610: + this.createTile = 422; + this.width = 16; + this.height = 16; + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.value = Item.buyPrice(silver: 5); + return; + case 3611: + this.useStyle = 5; + this.useAnimation = 10; + this.useTime = 10; + this.width = 20; + this.height = 20; + this.shoot = 651; + this.channel = true; + this.shootSpeed = 10f; + this.value = Item.sellPrice(gold: 4); + this.rare = 2; + this.UseSound = SoundID.Item64; + this.mech = true; + return; + case 3612: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 5; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.rare = 1; + this.value = 20000; + this.tileBoost = 20; + this.mech = true; + return; + default: + if (type >= 3613 && type <= 3615) + { + this.createTile = 423; + this.width = 16; + this.height = 16; + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.placeStyle = type - 3613; + this.mech = true; + return; + } + switch (type) + { + case 3616: + this.createTile = 424; + this.width = 16; + this.height = 16; + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.mech = true; + this.value = Item.buyPrice(silver: 2); + return; + case 3617: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 425; + this.width = 28; + this.height = 28; + this.mech = true; + return; + case 3618: + this.createTile = 419; + this.placeStyle = 1; + this.width = 16; + this.height = 16; + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.mech = true; + this.value = Item.buyPrice(silver: 10); + return; + case 3619: + this.width = 24; + this.height = 28; + this.rare = 3; + this.value = Item.buyPrice(gold: 1); + this.accessory = true; + return; + case 3620: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 5; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.rare = 1; + this.value = 20000; + this.tileBoost = 20; + this.mech = true; + return; + case 3621: + this.createTile = 426; + this.width = 16; + this.height = 16; + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.value = Item.buyPrice(silver: 1); + return; + case 3622: + this.createTile = 427; + this.width = 16; + this.height = 16; + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.value = Item.buyPrice(silver: 1); + return; + case 3623: + this.noUseGraphic = true; + this.damage = 0; + this.useStyle = 5; + this.shootSpeed = 16f; + this.shoot = 652; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 10; + this.noMelee = true; + this.value = Item.sellPrice(gold: 10); + return; + case 3624: + this.width = 30; + this.height = 30; + this.accessory = true; + this.rare = 3; + this.value = Item.buyPrice(gold: 10); + return; + case 3625: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 5; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.rare = 1; + this.value = Item.buyPrice(gold: 12); + this.tileBoost = 20; + this.mech = true; + return; + case 3626: + this.createTile = 428; + this.width = 16; + this.height = 16; + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.placeStyle = 3; + this.mech = true; + return; + case 3627: + this.width = 18; + this.height = 18; + this.headSlot = 194; + this.value = Item.buyPrice(gold: 1); + this.vanity = true; + return; + case 3628: + this.channel = true; + this.damage = 0; + this.useStyle = 4; + this.shoot = 653; + this.width = 24; + this.height = 24; + this.UseSound = SoundID.Item8; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 1; + this.noMelee = true; + this.value = Item.buyPrice(5); + this.buffType = 191; + return; + case 3629: + this.createTile = 429; + this.width = 16; + this.height = 16; + this.rare = 2; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.mech = true; + this.value = Item.buyPrice(gold: 5); + return; + case 3630: + this.createTile = 428; + this.width = 16; + this.height = 16; + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.placeStyle = 0; + this.mech = true; + return; + case 3631: + this.createTile = 428; + this.width = 16; + this.height = 16; + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.placeStyle = 2; + this.mech = true; + return; + case 3632: + this.createTile = 428; + this.width = 16; + this.height = 16; + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.placeStyle = 1; + this.mech = true; + return; + default: + if (type >= 3633 && type <= 3637) + { + this.createTile = 430 + (type - 3633); + this.width = 16; + this.height = 16; + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.value = Item.buyPrice(silver: 1); + return; + } + if (type >= 3638 && type <= 3642) + { + this.createTile = 435 + (type - 3638); + this.width = 16; + this.height = 16; + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.value = Item.buyPrice(silver: 1); + return; + } + if (type == 3643) + { + this.width = 20; + this.height = 20; + this.rare = 1; + return; + } + if (type >= 3644 && type <= 3650) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 440; + this.placeStyle = type - 3644; + this.width = 22; + this.height = 22; + this.value = Item.sellPrice(silver: 1); + return; + } + if (type >= 3651 && type <= 3662) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 51 + type - 3651; + return; + } + if (type == 3663) + { + this.createTile = 419; + this.width = 16; + this.height = 16; + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.mech = true; + this.placeStyle = 2; + this.value = Item.buyPrice(gold: 2); + return; + } + if (type == 3664) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 209; + this.placeStyle = 3; + this.width = 12; + this.height = 12; + this.rare = 3; + this.value = Item.buyPrice(gold: 10); + return; + } + if (type >= 3665 && type <= 3706) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 441; + this.placeStyle = type - 3665 + (type > 3666).ToInt() + (type > 3667).ToInt() * 3 + (type > 3683).ToInt() * 5 + (type > 3691).ToInt() + (type > 3692).ToInt() + (type > 3693).ToInt(); + this.width = 26; + this.height = 22; + this.value = 500; + return; + } + if (type == 3707) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 442; + this.width = 12; + this.height = 12; + this.placeStyle = 0; + this.mech = true; + this.value = Item.buyPrice(gold: 2); + this.mech = true; + return; + } + if (type >= 3708 && type <= 3720) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 105; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 63 + type - 3708; + return; + } + if (type == 3721) + { + this.width = 26; + this.height = 30; + this.maxStack = 1; + this.value = Item.sellPrice(gold: 3); + this.rare = 3; + this.accessory = true; + this.backSlot = (sbyte) 10; + return; + } + if (type == 3722) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 443; + this.width = 20; + this.height = 12; + this.value = 10000; + this.mech = true; + return; + } + if (type >= 3723 && type <= 3724) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 215; + this.placeStyle = 6 + type - 3723; + this.width = 12; + this.height = 12; + return; + } + if (type == 3725) + { + this.createTile = 445; + this.width = 16; + this.height = 16; + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.mech = true; + this.value = Item.buyPrice(silver: 2); + return; + } + if (type >= 3726 && type <= 3729) + { + this.createTile = 423; + this.width = 16; + this.height = 16; + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.placeStyle = type - 3726 + 3; + this.mech = true; + return; + } + if (type == 3730 || type == 3731) + { + this.width = 20; + this.height = 22; + this.rare = 1; + this.value = Item.buyPrice(gold: 2); + this.accessory = true; + this.vanity = true; + this.balloonSlot = (sbyte) (16 + type - 3730); + return; + } + switch (type) + { + case 3732: + this.width = 18; + this.height = 18; + this.headSlot = 195; + this.value = Item.buyPrice(gold: 1); + this.vanity = true; + return; + case 3733: + this.width = 18; + this.height = 18; + this.headSlot = 196; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + return; + case 3734: + this.width = 28; + this.height = 20; + this.bodySlot = 195; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + return; + case 3735: + this.width = 18; + this.height = 14; + this.legSlot = 138; + this.value = Item.buyPrice(gold: 3); + this.vanity = true; + return; + default: + if (type >= 3736 && type <= 3738) + { + this.createTile = 446 + (type - 3736); + this.width = 16; + this.height = 16; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.value = Item.buyPrice(silver: 1); + return; + } + if (type >= 3739 && type <= 3741) + { + this.createTile = 449 + (type - 3739); + this.width = 16; + this.height = 16; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.value = Item.buyPrice(copper: 50); + this.tileBoost += 3; + return; + } + if (type == 3742) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 452; + this.width = 26; + this.height = 20; + this.value = Item.buyPrice(gold: 5); + this.rare = 1; + return; + } + if (type >= 3743 && type <= 3745) + { + this.createTile = 453; + this.placeStyle = type - 3743; + if (3744 == type) + this.placeStyle = 0; + if (3745 == type) + this.placeStyle = 2; + if (3743 == type) + this.placeStyle = 4; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.width = 12; + this.height = 30; + this.value = Item.buyPrice(silver: 10); + return; + } + switch (type) + { + case 3746: + this.createTile = 454; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.width = 12; + this.height = 30; + this.value = Item.buyPrice(gold: 1); + return; + case 3747: + this.createTile = 455; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.width = 12; + this.height = 30; + this.value = Item.buyPrice(gold: 20); + this.rare = 3; + return; + case 3748: + this.createTile = 456; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.width = 12; + this.height = 30; + this.value = Item.buyPrice(silver: 20); + return; + case 3749: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 457; + this.width = 26; + this.height = 20; + this.value = Item.buyPrice(silver: 20); + this.rare = 1; + return; + case 3750: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 621; + this.width = 22; + this.height = 22; + this.value = Item.sellPrice(silver: 50); + this.rare = 3; + return; + case 3751: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 225; + this.width = 12; + this.height = 12; + return; + case 3752: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 226; + this.width = 12; + this.height = 12; + return; + case 3753: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 227; + this.width = 12; + this.height = 12; + return; + case 3754: + this.createTile = 458; + this.width = 16; + this.height = 16; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.value = Item.buyPrice(copper: 5); + return; + case 3755: + this.createTile = 459; + this.width = 16; + this.height = 16; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + return; + case 3756: + this.createTile = 460; + this.width = 16; + this.height = 16; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + return; + case 3757: + this.width = 18; + this.height = 18; + this.headSlot = 197; + this.value = Item.sellPrice(silver: 30); + this.vanity = true; + this.rare = 9; + return; + case 3758: + this.width = 28; + this.height = 20; + this.bodySlot = 196; + this.value = Item.sellPrice(silver: 30); + this.vanity = true; + this.rare = 9; + return; + case 3759: + this.width = 18; + this.height = 14; + this.legSlot = 139; + this.value = Item.sellPrice(silver: 30); + this.vanity = true; + this.rare = 9; + return; + default: + if (type >= 3760 && type <= 3762) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 228 + (type - 3760); + this.width = 12; + this.height = 12; + return; + } + if (type == 3763) + { + this.width = 18; + this.height = 18; + this.headSlot = 198; + this.value = Item.sellPrice(gold: 1); + this.vanity = true; + this.rare = 9; + return; + } + if (type >= 3764 && type <= 3769) + { + this.SetDefaults(198); + this.type = type; + this.damage = 42; + this.useTime = 20; + this.useAnimation = 20; + this.scale = 1.15f; + this.autoReuse = true; + this.useTurn = true; + this.rare = 4; + this.value = Item.sellPrice(gold: 1); + return; + } + switch (type) + { + case 3770: + this.width = 18; + this.height = 14; + this.legSlot = 140; + this.value = Item.sellPrice(gold: 1); + this.vanity = true; + this.rare = 4; + return; + case 3771: + this.useStyle = 4; + this.channel = true; + this.width = 34; + this.height = 34; + this.UseSound = SoundID.Item25; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 8; + this.noMelee = true; + this.mountType = 14; + this.value = Item.sellPrice(gold: 5); + return; + case 3772: + this.useStyle = 1; + this.useTurn = true; + this.autoReuse = true; + this.useAnimation = 18; + this.useTime = 18; + this.width = 28; + this.height = 28; + this.damage = 14; + this.knockBack = 4.5f; + this.UseSound = SoundID.Item1; + this.scale = 1f; + this.melee = true; + this.value = Item.sellPrice(silver: 10); + this.rare = 2; + return; + case 3773: + this.width = 18; + this.height = 18; + this.headSlot = 199; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + return; + case 3774: + this.width = 18; + this.height = 18; + this.bodySlot = 197; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + return; + case 3775: + this.width = 18; + this.height = 18; + this.legSlot = 141; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + return; + case 3776: + this.width = 18; + this.height = 18; + this.defense = 6; + this.headSlot = 200; + this.rare = 5; + this.value = 250000; + return; + case 3777: + this.width = 18; + this.height = 18; + this.defense = 12; + this.bodySlot = 198; + this.rare = 5; + this.value = 200000; + return; + case 3778: + this.width = 18; + this.height = 18; + this.defense = 8; + this.legSlot = 142; + this.rare = 5; + this.value = 150000; + return; + case 3779: + this.mana = 14; + this.damage = 85; + this.useStyle = 5; + this.shootSpeed = 3f; + this.shoot = 659; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item117; + this.useAnimation = 22; + this.useTime = 22; + this.autoReuse = true; + this.noMelee = true; + this.knockBack = 5f; + this.rare = 4; + this.value = Item.sellPrice(gold: 1); + this.magic = true; + this.glowMask = (short) 218; + return; + case 3780: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 272; + this.width = 10; + this.height = 24; + this.value = 1000; + this.rare = 1; + return; + case 3781: + this.width = 24; + this.height = 28; + this.rare = 3; + this.value = 100000; + this.accessory = true; + return; + case 3782: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 461; + this.width = 24; + this.height = 24; + this.value = Item.sellPrice(copper: 40); + return; + case 3783: + this.width = 18; + this.height = 18; + this.maxStack = 999; + this.value = 50000; + this.rare = 5; + return; + case 3784: + this.width = 18; + this.height = 18; + this.legSlot = 143; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + return; + case 3785: + this.width = 18; + this.height = 18; + this.bodySlot = 199; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + return; + case 3786: + this.width = 18; + this.height = 18; + this.headSlot = 201; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + return; + case 3787: + this.useStyle = 5; + this.useAnimation = 12; + this.useTime = 4; + this.reuseDelay = this.useAnimation + 6; + this.shootSpeed = 14f; + this.knockBack = 6f; + this.width = 16; + this.height = 16; + this.damage = 38; + this.UseSound = SoundID.Item9; + this.crit = 20; + this.shoot = 660; + this.mana = 17; + this.rare = 4; + this.value = 300000; + this.noMelee = true; + this.magic = true; + this.autoReuse = true; + return; + case 3788: + this.knockBack = 6.5f; + this.useStyle = 5; + this.useAnimation = 45; + this.useTime = 45; + this.width = 50; + this.height = 14; + this.shoot = 10; + this.useAmmo = AmmoID.Bullet; + this.UseSound = SoundID.Item36; + this.damage = 28; + this.shootSpeed = 7f; + this.noMelee = true; + this.value = 250000; + this.rare = 4; + this.ranged = true; + return; + default: + if (type >= 3789 && type <= 3793) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 273 + type - 3789; + this.width = 10; + this.height = 24; + this.value = 1000; + this.rare = 1; + return; + } + switch (type) + { + case 3794: + this.width = 18; + this.height = 18; + this.maxStack = 999; + this.value = Item.sellPrice(silver: 1); + this.rare = 1; + return; + case 3795: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 462; + this.width = 26; + this.height = 18; + this.value = Item.sellPrice(silver: 50); + this.rare = 3; + return; + case 3796: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 38; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + return; + case 3797: + this.width = 18; + this.height = 18; + this.headSlot = 203; + this.rare = 8; + this.defense = 7; + this.value = Item.sellPrice(gold: 3); + return; + case 3798: + this.width = 18; + this.height = 18; + this.bodySlot = 200; + this.rare = 8; + this.defense = 15; + this.value = Item.sellPrice(gold: 3); + return; + case 3799: + this.width = 18; + this.height = 18; + this.legSlot = 144; + this.rare = 8; + this.defense = 10; + this.value = Item.sellPrice(gold: 3); + return; + case 3800: + this.width = 18; + this.height = 18; + this.headSlot = 204; + this.rare = 8; + this.defense = 13; + this.value = Item.sellPrice(gold: 3); + return; + case 3801: + this.width = 18; + this.height = 18; + this.bodySlot = 201; + this.rare = 8; + this.defense = 27; + this.value = Item.sellPrice(gold: 3); + return; + case 3802: + this.width = 18; + this.height = 18; + this.legSlot = 145; + this.rare = 8; + this.defense = 18; + this.value = Item.sellPrice(gold: 3); + return; + case 3803: + this.width = 18; + this.height = 18; + this.headSlot = 205; + this.rare = 8; + this.defense = 7; + this.value = Item.sellPrice(gold: 3); + return; + case 3804: + this.width = 18; + this.height = 18; + this.bodySlot = 202; + this.rare = 8; + this.defense = 17; + this.value = Item.sellPrice(gold: 3); + return; + case 3805: + this.width = 18; + this.height = 18; + this.legSlot = 146; + this.rare = 8; + this.defense = 12; + this.value = Item.sellPrice(gold: 3); + return; + case 3806: + this.width = 18; + this.height = 18; + this.headSlot = 206; + this.rare = 8; + this.defense = 8; + this.value = Item.sellPrice(gold: 3); + return; + case 3807: + this.width = 18; + this.height = 18; + this.bodySlot = 203; + this.rare = 8; + this.defense = 22; + this.value = Item.sellPrice(gold: 3); + return; + case 3808: + this.width = 18; + this.height = 18; + this.legSlot = 148; + this.rare = 8; + this.defense = 16; + this.value = Item.sellPrice(gold: 3); + return; + case 3809: + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 5; + this.value = Item.sellPrice(gold: 3); + this.neckSlot = (sbyte) 9; + return; + case 3810: + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 5; + this.value = Item.sellPrice(gold: 3); + this.shieldSlot = (sbyte) 6; + return; + case 3811: + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 5; + this.value = Item.sellPrice(gold: 3); + this.handOnSlot = (sbyte) 19; + return; + case 3812: + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 5; + this.value = Item.sellPrice(gold: 3); + this.waistSlot = (sbyte) 12; + return; + case 3813: + this.rare = 3; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 463; + this.width = 12; + this.height = 12; + this.value = 100000; + this.glowMask = (short) 244; + return; + case 3814: + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 464; + this.width = 12; + this.height = 12; + this.value = 100000; + return; + case 3815: + this.rare = 1; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 465; + this.width = 12; + this.height = 12; + this.value = 100000; + return; + case 3816: + this.rare = 3; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 466; + this.width = 12; + this.height = 12; + this.value = Item.buyPrice(gold: 1); + return; + case 3817: + this.width = 12; + this.height = 12; + this.maxStack = 999; + this.value = 0; + this.rare = 3; + return; + default: + if (type == 3818 || type == 3819 || type == 3820 || type == 3824 || type == 3825 || type == 3826 || type == 3829 || type == 3830 || type == 3831 || type == 3832 || type == 3833 || type == 3834) + { + this.width = 18; + this.height = 20; + this.UseSound = SoundID.DD2_DefenseTowerSpawn; + this.useStyle = 1; + this.useAnimation = 30; + this.useTime = 30; + this.shootSpeed = 1f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 1); + this.rare = 3; + this.shoot = 663; + this.summon = true; + this.damage = 17; + this.knockBack = 3f; + this.mana = 5; + this.DD2Summon = true; + this.sentry = true; + switch (type) + { + case 3819: + this.shoot = 665; + this.damage = 42; + this.rare = 5; + this.mana = 10; + this.value = Item.sellPrice(gold: 5); + return; + case 3820: + this.shoot = 667; + this.damage = 88; + this.rare = 8; + this.mana = 15; + this.value = Item.sellPrice(gold: 15); + return; + case 3821: + return; + case 3822: + return; + case 3823: + return; + case 3824: + this.shoot = 677; + this.damage = 27; + this.knockBack = 4.5f; + return; + case 3825: + this.shoot = 678; + this.damage = 67; + this.rare = 5; + this.mana = 10; + this.knockBack = 4.5f; + this.value = Item.sellPrice(gold: 5); + return; + case 3826: + this.shoot = 679; + this.damage = 140; + this.rare = 8; + this.mana = 15; + this.knockBack = 4.5f; + this.value = Item.sellPrice(gold: 15); + return; + case 3827: + return; + case 3828: + return; + case 3829: + this.shoot = 688; + this.damage = 4; + this.knockBack = 0.0f; + return; + case 3830: + this.shoot = 689; + this.damage = 11; + this.rare = 5; + this.mana = 10; + this.knockBack = 0.0f; + this.value = Item.sellPrice(gold: 5); + return; + case 3831: + this.shoot = 690; + this.damage = 34; + this.rare = 8; + this.mana = 15; + this.knockBack = 0.0f; + this.value = Item.sellPrice(gold: 15); + return; + case 3832: + this.shoot = 691; + this.damage = 24; + this.knockBack = 0.0f; + return; + case 3833: + this.shoot = 692; + this.damage = 59; + this.rare = 5; + this.mana = 10; + this.knockBack = 0.0f; + this.value = Item.sellPrice(gold: 5); + return; + case 3834: + this.shoot = 693; + this.damage = 126; + this.rare = 8; + this.mana = 15; + this.knockBack = 0.0f; + this.value = Item.sellPrice(gold: 15); + return; + default: + return; + } + } + else + { + switch (type) + { + case 3821: + this.shootSpeed = 6.5f; + this.shoot = 669; + this.width = 20; + this.height = 20; + this.maxStack = 1; + this.UseSound = SoundID.Item1; + this.useStyle = 5; + this.useAnimation = 40; + this.useTime = 40; + this.noUseGraphic = true; + this.noMelee = true; + this.value = Item.sellPrice(silver: 1); + this.damage = 20; + this.knockBack = 7f; + this.ranged = true; + this.rare = 1; + this.useAmmo = 353; + return; + case 3822: + this.width = 12; + this.height = 12; + this.maxStack = 999; + this.value = 0; + return; + case 3823: + this.UseSound = SoundID.Item1; + this.useStyle = 1; + this.damage = 85; + this.useAnimation = 25; + this.useTime = 25; + this.width = 34; + this.height = 34; + this.scale = 1.15f; + this.knockBack = 6.5f; + this.melee = true; + this.rare = 5; + this.value = Item.sellPrice(gold: 1); + this.autoReuse = true; + this.flame = true; + this.useTurn = true; + return; + case 3828: + this.rare = 3; + this.maxStack = 99; + this.consumable = true; + this.width = 22; + this.height = 18; + this.value = Item.buyPrice(silver: 25); + return; + case 3835: + this.useStyle = 5; + this.useAnimation = 30; + this.useTime = 30; + this.shootSpeed = 24f; + this.knockBack = 7f; + this.width = 16; + this.height = 16; + this.UseSound = SoundID.DD2_MonkStaffSwing; + this.shoot = 697; + this.rare = 5; + this.value = Item.sellPrice(gold: 1); + this.noMelee = true; + this.noUseGraphic = true; + this.channel = true; + this.autoReuse = true; + this.melee = true; + this.damage = 40; + return; + case 3836: + this.useStyle = 5; + this.useAnimation = 27; + this.useTime = 27; + this.shootSpeed = 42f; + this.knockBack = 7f; + this.width = 16; + this.height = 16; + this.UseSound = SoundID.DD2_GhastlyGlaivePierce; + this.shoot = 699; + this.rare = 5; + this.value = Item.sellPrice(gold: 1); + this.noMelee = true; + this.noUseGraphic = true; + this.channel = true; + this.melee = true; + this.damage = 45; + return; + default: + if (type >= 3837 && type <= 3846) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 278 + type - 3837; + this.width = 10; + this.height = 24; + this.value = 1000; + this.rare = 1; + return; + } + if (type == 3855 || type == 3856 || type == 3857) + { + this.damage = 0; + this.useStyle = 1; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.value = Item.sellPrice(gold: 2); + this.buffType = 200; + this.shoot = 703; + if (type != 3856) + { + if (type != 3857) + return; + this.buffType = 202; + this.shoot = 701; + return; + } + this.buffType = 201; + this.shoot = 702; + return; + } + switch (type) + { + case 3827: + this.rare = 8; + this.UseSound = SoundID.DD2_SonicBoomBladeSlash; + this.useStyle = 1; + this.damage = 90; + this.useAnimation = 25; + this.useTime = 25; + this.width = 30; + this.height = 30; + this.knockBack = 5.5f; + this.melee = true; + this.value = Item.sellPrice(gold: 5); + this.autoReuse = true; + this.useTurn = false; + this.glowMask = (short) 227; + this.shoot = 684; + this.shootSpeed = 17f; + return; + case 3852: + this.useStyle = 5; + this.useAnimation = 25; + this.useTime = 3; + this.shootSpeed = 11f; + this.knockBack = 9f; + this.width = 16; + this.height = 16; + this.damage = 32; + this.UseSound = SoundID.DD2_BookStaffCast; + this.shoot = 712; + this.mana = 20; + this.rare = 5; + this.value = Item.sellPrice(gold: 1); + this.noMelee = true; + this.magic = true; + this.autoReuse = true; + return; + case 3854: + this.useStyle = 5; + this.useAnimation = 18; + this.useTime = 18; + this.shootSpeed = 20f; + this.knockBack = 2f; + this.width = 20; + this.height = 12; + this.damage = 32; + this.UseSound = SoundID.Item5; + this.shoot = 705; + this.rare = 5; + this.value = Item.sellPrice(gold: 1); + this.noMelee = true; + this.noUseGraphic = true; + this.ranged = true; + this.channel = true; + this.useAmmo = AmmoID.Arrow; + this.autoReuse = true; + return; + case 3858: + this.useStyle = 5; + this.useAnimation = 30; + this.useTime = 30; + this.shootSpeed = 24f; + this.knockBack = 5f; + this.width = 16; + this.height = 16; + this.UseSound = SoundID.DD2_SkyDragonsFurySwing; + this.shoot = 707; + this.rare = 8; + this.value = Item.sellPrice(gold: 5); + this.noMelee = true; + this.noUseGraphic = true; + this.channel = true; + this.autoReuse = true; + this.melee = true; + this.damage = 70; + return; + case 3859: + this.autoReuse = true; + this.useStyle = 5; + this.useAnimation = 30; + this.useTime = 30; + this.width = 14; + this.height = 32; + this.shoot = 495; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item102; + this.damage = 55; + this.shootSpeed = 11f; + this.knockBack = 4.5f; + this.rare = 8; + this.crit = 3; + this.noMelee = true; + this.value = Item.sellPrice(gold: 5); + this.ranged = true; + this.glowMask = (short) 234; + return; + default: + if (type == 3860 || type == 3862 || type == 3861) + { + this.maxStack = 999; + this.consumable = true; + this.width = 24; + this.height = 24; + this.rare = 1; + if (type == 3860) + this.rare = 8; + if (type == 3862) + this.rare = 3; + if (type == 3861) + this.rare = 5; + this.expert = true; + return; + } + if (type >= 3863 && type <= 3865) + { + this.width = 28; + this.height = 20; + this.rare = 1; + this.vanity = true; + this.value = Item.sellPrice(silver: 75); + switch (type) + { + case 3863: + this.headSlot = 207; + return; + case 3864: + this.headSlot = 208; + return; + case 3865: + this.headSlot = 209; + return; + default: + return; + } + } + else + { + if (type == 3866 || type == 3867 || type == 3868) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.placeStyle = 60; + if (type == 3866) + this.placeStyle = 61; + if (type == 3868) + this.placeStyle = 62; + this.rare = 1; + return; + } + switch (type) + { + case 3869: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = 39; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + return; + case 3870: + this.useStyle = 5; + this.useAnimation = 20; + this.useTime = 20; + this.reuseDelay = 10; + this.shootSpeed = 14f; + this.knockBack = 7f; + this.width = 16; + this.height = 16; + this.damage = 65; + this.UseSound = SoundID.DD2_BetsysWrathShot; + this.shoot = 711; + this.mana = 14; + this.rare = 8; + this.value = Item.sellPrice(gold: 5); + this.noMelee = true; + this.magic = true; + this.autoReuse = true; + this.glowMask = (short) 238; + return; + case 3871: + this.width = 18; + this.height = 18; + this.rare = 8; + this.defense = 20; + this.value = Item.sellPrice(gold: 3); + this.headSlot = 210; + return; + case 3872: + this.width = 18; + this.height = 18; + this.rare = 8; + this.defense = 24; + this.value = Item.sellPrice(gold: 3); + this.bodySlot = 204; + return; + case 3873: + this.width = 18; + this.height = 18; + this.rare = 8; + this.defense = 24; + this.value = Item.sellPrice(gold: 3); + this.legSlot = 152; + return; + case 3874: + this.width = 18; + this.height = 18; + this.rare = 8; + this.defense = 7; + this.value = Item.sellPrice(gold: 3); + this.headSlot = 211; + return; + case 3875: + this.width = 18; + this.height = 18; + this.rare = 8; + this.defense = 21; + this.value = Item.sellPrice(gold: 3); + this.bodySlot = 205; + return; + case 3876: + this.width = 18; + this.height = 18; + this.rare = 8; + this.defense = 14; + this.value = Item.sellPrice(gold: 3); + this.legSlot = 153; + return; + case 3877: + this.width = 18; + this.height = 18; + this.rare = 8; + this.defense = 8; + this.value = Item.sellPrice(gold: 3); + this.headSlot = 212; + return; + case 3878: + this.width = 18; + this.height = 18; + this.rare = 8; + this.defense = 24; + this.value = Item.sellPrice(gold: 3); + this.bodySlot = 206; + return; + case 3879: + this.width = 18; + this.height = 18; + this.rare = 8; + this.defense = 16; + this.value = Item.sellPrice(gold: 3); + this.legSlot = 154; + return; + case 3880: + this.width = 18; + this.height = 18; + this.rare = 8; + this.defense = 10; + this.value = Item.sellPrice(gold: 3); + this.headSlot = 213; + return; + case 3881: + this.width = 18; + this.height = 18; + this.rare = 8; + this.defense = 26; + this.value = Item.sellPrice(gold: 3); + this.bodySlot = 207; + return; + case 3882: + this.width = 18; + this.height = 18; + this.rare = 8; + this.defense = 18; + this.value = Item.sellPrice(gold: 3); + this.legSlot = 156; + return; + case 3883: + this.width = 22; + this.height = 20; + this.accessory = true; + this.value = Item.buyPrice(gold: 40); + this.rare = 8; + this.wingSlot = (sbyte) 37; + return; + case 3884: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 467; + this.width = 26; + this.height = 22; + this.value = 500; + this.placeStyle = 0; + return; + case 3885: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 467; + this.width = 26; + this.height = 22; + this.value = Item.buyPrice(gold: 10); + this.placeStyle = 1; + return; + case 3886: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 468; + this.width = 26; + this.height = 22; + this.value = 500; + this.placeStyle = 0; + return; + case 3887: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 468; + this.width = 26; + this.height = 22; + this.value = 500; + this.placeStyle = 1; + return; + case 3888: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.width = 14; + this.height = 28; + this.value = 200; + this.placeStyle = 36; + return; + case 3889: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.width = 12; + this.height = 30; + this.placeStyle = 36; + this.value = 150; + return; + case 3890: + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 33; + this.width = 8; + this.height = 18; + this.value = Item.sellPrice(copper: 60); + this.placeStyle = 30; + return; + case 3891: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 37; + this.value = 150; + return; + case 3892: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 93; + this.width = 10; + this.height = 24; + this.value = 500; + this.placeStyle = 31; + return; + case 3893: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 100; + this.width = 20; + this.height = 20; + this.value = 1500; + this.placeStyle = 31; + return; + case 3894: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 34; + this.width = 26; + this.height = 26; + this.value = 3000; + this.placeStyle = 37; + return; + case 3895: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 90; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 31; + return; + case 3896: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 172; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 32; + return; + case 3897: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.autoReuse = true; + this.createTile = 79; + this.width = 28; + this.height = 20; + this.value = 2000; + this.placeStyle = 31; + return; + default: + if (type >= 3898 && type <= 3902) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 104; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 28 + type - 3898; + return; + } + if (type >= 3903 && type <= 3908) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.width = 8; + this.height = 10; + this.placeStyle = 30 + type - 3903; + return; + } + if (type == 3909) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.width = 28; + this.height = 14; + this.value = 150; + this.placeStyle = 31; + return; + } + if (type == 3910) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.width = 28; + this.height = 14; + this.value = Item.buyPrice(gold: 10); + this.placeStyle = 32; + return; + } + if (type >= 3911 && type <= 3914) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 88; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 28 + type - 3911; + return; + } + if (type >= 3915 && type <= 3916) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 87; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 30 + type - 3915; + return; + } + switch (type) + { + case 3917: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 32; + return; + case 3918: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 89; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 33; + return; + case 3919: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 89; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 34; + return; + case 3920: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 469; + this.width = 26; + this.height = 20; + this.value = 300; + this.placeStyle = 0; + return; + case 3921: + this.width = 28; + this.height = 20; + this.headSlot = 214; + this.rare = 9; + this.value = Item.sellPrice(gold: 5); + this.vanity = true; + return; + case 3922: + this.width = 28; + this.height = 20; + this.bodySlot = 208; + this.rare = 9; + this.value = Item.sellPrice(gold: 5); + this.vanity = true; + return; + case 3923: + this.width = 18; + this.height = 14; + this.legSlot = 158; + this.rare = 9; + this.value = Item.sellPrice(gold: 5); + this.vanity = true; + return; + case 3924: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 9; + this.wingSlot = (sbyte) 38; + this.value = 400000; + return; + case 3925: + this.width = 28; + this.height = 20; + this.headSlot = 215; + this.rare = 9; + this.value = Item.sellPrice(gold: 5); + this.vanity = true; + return; + case 3926: + this.width = 28; + this.height = 20; + this.bodySlot = 209; + this.rare = 9; + this.value = Item.sellPrice(gold: 5); + this.vanity = true; + return; + case 3927: + this.width = 18; + this.height = 14; + this.legSlot = 159; + this.rare = 9; + this.value = Item.sellPrice(gold: 5); + this.vanity = true; + return; + case 3928: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 9; + this.wingSlot = (sbyte) 39; + this.value = 400000; + return; + case 3929: + this.width = 18; + this.height = 14; + this.rare = 9; + this.vanity = true; + this.value = Item.sellPrice(gold: 5); + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + return; + case 3930: + this.useStyle = 5; + this.useAnimation = 6; + this.useTime = 6; + this.shootSpeed = 17f; + this.knockBack = 10f; + this.width = 20; + this.height = 12; + this.damage = 40; + this.UseSound = (LegacySoundStyle) null; + this.shoot = 714; + this.rare = 10; + this.value = Item.sellPrice(gold: 10); + this.noMelee = true; + this.noUseGraphic = true; + this.ranged = true; + this.channel = true; + this.autoReuse = true; + this.useAmmo = AmmoID.Rocket; + return; + case 3931: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 90; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 32; + return; + case 3932: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.autoReuse = true; + this.createTile = 79; + this.width = 28; + this.height = 20; + this.value = 2000; + this.placeStyle = 32; + return; + case 3933: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 33; + return; + case 3934: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 88; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 32; + return; + case 3935: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 100; + this.width = 20; + this.height = 20; + this.value = 1500; + this.placeStyle = 32; + return; + case 3936: + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 33; + this.width = 8; + this.height = 18; + this.value = Item.sellPrice(copper: 60); + this.placeStyle = 31; + return; + case 3937: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.width = 12; + this.height = 30; + this.placeStyle = 37; + this.value = 150; + return; + case 3938: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 34; + this.width = 26; + this.height = 26; + this.value = 3000; + this.placeStyle = 38; + return; + case 3939: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 467; + this.width = 26; + this.height = 22; + this.value = 500; + this.placeStyle = 2; + return; + case 3940: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 104; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 33; + return; + case 3941: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.width = 14; + this.height = 28; + this.value = 200; + this.placeStyle = 37; + return; + case 3942: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 93; + this.width = 10; + this.height = 24; + this.value = 500; + this.placeStyle = 32; + return; + case 3943: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 38; + this.value = 150; + return; + case 3944: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 87; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 32; + return; + case 3945: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.width = 8; + this.height = 10; + this.placeStyle = 36; + return; + case 3946: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 172; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 33; + return; + case 3947: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 89; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 35; + return; + case 3948: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 469; + this.width = 26; + this.height = 20; + this.value = 300; + this.placeStyle = 1; + return; + case 3949: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.width = 28; + this.height = 14; + this.value = 150; + this.placeStyle = 33; + return; + case 3950: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 468; + this.width = 26; + this.height = 22; + this.value = 500; + this.placeStyle = 2; + return; + case 3951: + this.createTile = 472; + this.width = 16; + this.height = 16; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + return; + case 3952: + this.createWall = 231; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + return; + case 3953: + this.createTile = 473; + this.width = 16; + this.height = 16; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + return; + case 3954: + this.createWall = 232; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + return; + case 3955: + this.createTile = 474; + this.width = 16; + this.height = 16; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + return; + case 3956: + this.createWall = 233; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + return; + case 3957: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 19; + this.width = 8; + this.height = 10; + this.placeStyle = 37; + return; + case 3958: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 90; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 33; + return; + case 3959: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.autoReuse = true; + this.createTile = 79; + this.width = 28; + this.height = 20; + this.value = 2000; + this.placeStyle = 33; + return; + case 3960: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 101; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 34; + return; + case 3961: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 100; + this.width = 20; + this.height = 20; + this.value = 1500; + this.placeStyle = 33; + return; + case 3962: + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 33; + this.width = 8; + this.height = 18; + this.value = Item.sellPrice(copper: 60); + this.placeStyle = 32; + return; + case 3963: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 15; + this.width = 12; + this.height = 30; + this.placeStyle = 38; + this.value = 150; + return; + case 3964: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 34; + this.width = 26; + this.height = 26; + this.value = 3000; + this.placeStyle = 39; + return; + case 3965: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 467; + this.width = 26; + this.height = 22; + this.value = 500; + this.placeStyle = 3; + return; + case 3966: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 104; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 34; + return; + case 3967: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 99; + this.consumable = true; + this.createTile = 10; + this.width = 14; + this.height = 28; + this.value = 200; + this.placeStyle = 38; + return; + case 3968: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 88; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 33; + return; + case 3969: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 93; + this.width = 10; + this.height = 24; + this.value = 500; + this.placeStyle = 33; + return; + case 3970: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 42; + this.width = 12; + this.height = 28; + this.placeStyle = 39; + this.value = 150; + return; + case 3971: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 87; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 33; + return; + case 3972: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 172; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 34; + return; + case 3973: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 89; + this.width = 20; + this.height = 20; + this.value = 300; + this.placeStyle = 36; + return; + case 3974: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 469; + this.width = 26; + this.height = 20; + this.value = 300; + this.placeStyle = 2; + return; + case 3975: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 18; + this.width = 28; + this.height = 14; + this.value = 150; + this.placeStyle = 34; + return; + case 3976: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 468; + this.width = 26; + this.height = 22; + this.value = 500; + this.placeStyle = 3; + return; + case 3977: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 269; + this.width = 22; + this.height = 32; + this.createTile = 475; + return; + case 3978: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + return; + case 3979: + this.width = 12; + this.height = 12; + this.rare = 1; + this.maxStack = 99; + this.value = Item.sellPrice(silver: 10); + this.createTile = 376; + this.placeStyle = 9; + this.useAnimation = 15; + this.useTime = 15; + this.autoReuse = true; + this.useStyle = 1; + this.consumable = true; + return; + case 3980: + this.width = 12; + this.height = 12; + this.rare = 2; + this.maxStack = 99; + this.value = Item.sellPrice(silver: 50); + this.createTile = 376; + this.placeStyle = 10; + this.useAnimation = 15; + this.useTime = 15; + this.autoReuse = true; + this.useStyle = 1; + this.consumable = true; + return; + case 3981: + this.width = 12; + this.height = 12; + this.rare = 3; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 2); + this.createTile = 376; + this.placeStyle = 11; + this.useAnimation = 15; + this.useTime = 15; + this.autoReuse = true; + this.useStyle = 1; + this.consumable = true; + return; + default: + if (type >= 3982 && type <= 3987) + { + this.width = 12; + this.height = 12; + this.rare = 2; + this.maxStack = 99; + this.createTile = 376; + this.placeStyle = 12 + type - 3982; + this.useAnimation = 15; + this.useTime = 15; + this.autoReuse = true; + this.useStyle = 1; + this.consumable = true; + this.value = Item.sellPrice(gold: 1); + return; + } + if (type == 3988) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 467; + this.width = 26; + this.height = 22; + this.value = 500; + this.placeStyle = 4; + return; + } + if (type != 3989) + return; + this.DefaultToGolfBall(721); + return; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + + private void DefaultToGolfBall(int projid) + { + this.shoot = projid; + this.useStyle = 1; + this.shootSpeed = 12f; + this.width = 18; + this.height = 20; + this.maxStack = 1; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 0; + this.accessory = true; + this.SetShopValues(ItemRarityColor.Green2, Item.buyPrice(gold: 1)); + this.canBePlacedInVanityRegardlessOfConditions = true; + } + + public void SetDefaults5(int type) + { + switch (type) + { + case 3990: + this.DefaultToAccessory(36, 28); + this.shoeSlot = (sbyte) 18; + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 2)); + break; + case 3991: + this.DefaultToAccessory(30, 42); + this.faceSlot = (sbyte) 9; + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 10)); + break; + case 3992: + this.defense = 7; + this.DefaultToAccessory(20, 40); + this.handOnSlot = (sbyte) 20; + this.handOffSlot = (sbyte) 12; + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 15)); + break; + case 3993: + this.DefaultToAccessory(34, 30); + this.shoeSlot = (sbyte) 19; + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 10)); + break; + case 3994: + this.DefaultToAccessory(newheight: 30); + this.shoeSlot = (sbyte) 20; + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 2)); + break; + case 3995: + this.DefaultToAccessory(34, 32); + this.handOnSlot = (sbyte) 21; + this.handOffSlot = (sbyte) 13; + this.shoeSlot = (sbyte) 20; + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 5)); + break; + case 3996: + this.DefaultToAccessory(28, 30); + this.handOnSlot = (sbyte) 21; + this.handOffSlot = (sbyte) 13; + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 2)); + break; + case 3997: + this.defense = 6; + this.DefaultToAccessory(36, 38); + this.shieldSlot = (sbyte) 7; + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 10)); + break; + case 3998: + this.defense = 7; + this.DefaultToAccessory(36, 40); + this.shieldSlot = (sbyte) 8; + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 15)); + break; + case 3999: + this.DefaultToAccessory(22, 32); + this.faceSlot = (sbyte) 10; + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 2, silver: 50)); + break; + case 4000: + this.DefaultToAccessory(28, 32); + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 4)); + break; + case 4001: + this.DefaultToAccessory(26, 36); + this.backSlot = (sbyte) 14; + this.frontSlot = (sbyte) 5; + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 3)); + break; + case 4002: + this.DefaultToAccessory(34, 36); + this.backSlot = (sbyte) 15; + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 7, silver: 50)); + break; + case 4003: + this.DefaultToAccessory(30, 34); + this.faceSlot = (sbyte) 11; + this.SetShopValues(ItemRarityColor.LightPurple6, Item.sellPrice(gold: 5)); + break; + case 4004: + this.DefaultToAccessory(30, 32); + this.faceSlot = (sbyte) 13; + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 3)); + break; + case 4005: + this.DefaultToAccessory(30, 30); + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 15)); + break; + case 4006: + this.DefaultToAccessory(36, 38); + this.backSlot = (sbyte) 16; + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 15)); + break; + case 4007: + this.DefaultToAccessory(26, 30); + this.neckSlot = (sbyte) 10; + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 3)); + break; + case 4008: + this.defense = 4; + this.DefaultToHeadgear(24, 22, 216); + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 2)); + break; + case 4038: + this.DefaultToAccessory(28, 34); + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 7, silver: 50)); + break; + case 4039: + this.DefaultToGolfClub(20, 20); + this.SetShopValues(ItemRarityColor.Green2, Item.buyPrice(gold: 1)); + break; + case 4040: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 476; + this.width = 12; + this.height = 12; + this.SetShopValues(ItemRarityColor.Green2, Item.buyPrice(gold: 1)); + break; + case 4041: + case 4042: + case 4043: + case 4044: + case 4045: + case 4046: + case 4047: + case 4048: + case 4241: + this.DefaultToPlacableTile((ushort) 3, 0); + this.SetShopValues(ItemRarityColor.White0, Item.buyPrice(silver: 5)); + this.autoReuse = false; + this.useTime = this.useAnimation; + break; + case 4049: + this.DefaultToLawnMower(20, 20); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4050: + this.DefaultToPlacableTile((ushort) 478, 0); + break; + case 4051: + this.DefaultToPlacableTile((ushort) 479, 0); + break; + case 4052: + this.DefaultToPlacableWall((ushort) 234); + break; + case 4053: + this.DefaultToPlacableWall((ushort) 235); + break; + case 4054: + this.DefaultToPlacableTile((ushort) 480, 0); + this.width = 22; + this.height = 32; + this.rare = 3; + this.value = Item.sellPrice(gold: 1); + break; + case 4055: + this.DefaultToAccessory(34, 30); + this.shoeSlot = (sbyte) 21; + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 1)); + break; + case 4056: + this.DefaultToAccessory(30, 30); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 1)); + break; + case 4057: + this.SetShopValues(ItemRarityColor.Orange3, Item.buyPrice(gold: 1)); + this.DefaultToGuitar(); + break; + case 4058: + this.SetShopValues(ItemRarityColor.Orange3, Item.buyPrice(gold: 10)); + this.DefaultToBow(17, 11f); + this.SetWeaponValues(8, 5f); + break; + case 4059: + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(silver: 30)); + this.SetWeaponValues(8, 4f); + this.melee = true; + this.autoReuse = true; + this.useTurn = true; + this.useTime = 14; + this.useAnimation = 18; + this.useStyle = 1; + this.pick = 55; + this.UseSound = SoundID.Item1; + break; + case 4060: + this.width = 42; + this.height = 20; + this.SetShopValues(ItemRarityColor.Orange3, Item.buyPrice(gold: 50)); + this.DefaultToRangedWeapon(728, AmmoID.FallenStar, 12, 20f, true); + this.SetWeaponValues(70, 5f); + break; + case 4061: + this.DefaultToSpear(730, 3.5f, 28); + this.SetWeaponValues(12, 6f); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(silver: 30)); + break; + case 4062: + this.DefaultToStaff(731, 8f, 17, 5); + this.SetWeaponValues(12, 2f); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(silver: 30)); + break; + case 4063: + this.DefaultToPlacableTile((ushort) 486, 0); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 10)); + break; + case 4064: + this.DefaultToPlacableTile((ushort) 487, 0); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(copper: 80)); + break; + case 4065: + this.DefaultToPlacableTile((ushort) 487, 1); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(silver: 1)); + break; + case 4066: + this.DefaultToMount(15); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(silver: 50)); + break; + case 4067: + this.DefaultToMount(16); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 1)); + break; + case 4068: + this.DefaultToCapturedCritter((short) 583); + this.rare = 1; + this.value = Item.sellPrice(gold: 1); + break; + case 4069: + this.DefaultToCapturedCritter((short) 584); + this.rare = 1; + this.value = Item.sellPrice(gold: 1); + break; + case 4070: + this.DefaultToCapturedCritter((short) 585); + this.rare = 1; + this.value = Item.sellPrice(gold: 1); + break; + case 4071: + case 4072: + case 4073: + this.DefaultToSeaShelll(); + break; + case 4074: + this.DefaultToPlacableTile((ushort) 489, 0); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(silver: 20)); + break; + case 4075: + this.DefaultToPlacableTile((ushort) 490, 0); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(silver: 10)); + break; + case 4076: + this.rare = 3; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 491; + this.width = 12; + this.height = 12; + this.value = 100000; + break; + case 4077: + this.DefaultToMusicBox(43); + break; + case 4078: + this.DefaultToMusicBox(41); + break; + case 4079: + this.DefaultToMusicBox(42); + break; + case 4080: + this.DefaultToMusicBox(44); + break; + case 4081: + this.DefaultToMusicBox(45); + break; + case 4082: + this.DefaultToMusicBox(40); + break; + case 4083: + case 4084: + case 4085: + case 4086: + case 4087: + case 4088: + this.DefaultToPlacableTile((ushort) 493, type - 4083); + this.SetShopValues(ItemRarityColor.White0, Item.buyPrice(silver: 20)); + break; + case 4089: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 494; + this.width = 12; + this.height = 12; + this.SetShopValues(ItemRarityColor.Green2, Item.buyPrice(gold: 1)); + break; + case 4090: + this.DefaultToPlacableTile((ushort) 495, 0); + this.SetShopValues(ItemRarityColor.White0, 0); + break; + case 4091: + this.DefaultToPlacableTile((ushort) 496, 0); + this.SetShopValues(ItemRarityColor.White0, Item.buyPrice(silver: 1)); + break; + case 4092: + this.DefaultToGolfClub(20, 20); + this.SetShopValues(ItemRarityColor.Green2, Item.buyPrice(gold: 1)); + break; + case 4093: + this.DefaultToGolfClub(20, 20); + this.SetShopValues(ItemRarityColor.Green2, Item.buyPrice(gold: 1)); + break; + case 4094: + this.DefaultToGolfClub(20, 20); + this.SetShopValues(ItemRarityColor.Green2, Item.buyPrice(gold: 1)); + break; + case 4095: + this.maxStack = 1; + this.consumable = false; + this.width = 18; + this.height = 18; + this.useStyle = 4; + this.useTime = 10; + this.UseSound = SoundID.Item128; + this.useAnimation = 10; + this.rare = 4; + this.value = Item.sellPrice(gold: 2); + break; + case 4096: + case 4097: + case 4098: + case 4099: + case 4100: + case 4101: + case 4102: + case 4103: + case 4104: + case 4105: + case 4106: + case 4107: + case 4108: + case 4109: + case 4110: + case 4111: + case 4112: + case 4113: + case 4114: + case 4115: + case 4116: + case 4117: + case 4118: + case 4119: + case 4120: + case 4121: + case 4122: + case 4123: + case 4124: + case 4125: + case 4126: + this.DefaultToPlacableTile((ushort) 497, type - 4096); + this.maxStack = 99; + this.value = 150; + break; + case 4127: + this.DefaultToPlacableTile((ushort) 497, type - 4096); + this.maxStack = 99; + this.value = 100000; + break; + case 4128: + this.width = 18; + this.height = 18; + this.headSlot = 217; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4129: + this.width = 18; + this.height = 18; + this.bodySlot = 210; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4130: + this.width = 18; + this.height = 18; + this.legSlot = 180; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4131: + this.useStyle = 1; + this.shootSpeed = 4f; + this.shoot = 734; + this.width = 26; + this.height = 24; + this.UseSound = SoundID.Item130; + this.useAnimation = 28; + this.useTime = 28; + this.rare = 3; + this.value = Item.sellPrice(gold: 2); + break; + case 4132: + this.width = 18; + this.height = 18; + this.headSlot = 218; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4133: + this.width = 18; + this.height = 18; + this.bodySlot = 211; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4134: + this.width = 18; + this.height = 18; + this.legSlot = 184; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4135: + this.width = 18; + this.height = 18; + this.headSlot = 219; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4136: + this.width = 18; + this.height = 18; + this.bodySlot = 212; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4137: + this.width = 18; + this.height = 18; + this.legSlot = 185; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4138: + this.width = 18; + this.height = 18; + this.headSlot = 220; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4139: + this.DefaultToPlacableTile((ushort) 498, 0); + this.SetShopValues(ItemRarityColor.White0, 0); + break; + case 4140: + this.DefaultToPlacableWall((ushort) 236); + this.SetShopValues(ItemRarityColor.White0, 0); + break; + case 4141: + this.DefaultToPlacableTile((ushort) 497, 32); + this.maxStack = 99; + this.value = 150; + break; + case 4142: + this.DefaultToPlacableTile((ushort) 499, 0); + this.maxStack = 99; + this.SetShopValues(ItemRarityColor.White0, 100000); + break; + case 4143: + this.width = 12; + this.height = 12; + break; + case 4144: + this.width = 14; + this.height = 38; + this.useAnimation = 25; + this.useTime = 15; + this.useStyle = 5; + this.rare = 2; + this.noUseGraphic = true; + this.channel = true; + this.noMelee = true; + this.damage = 17; + this.knockBack = 3f; + this.autoReuse = false; + this.noMelee = true; + this.melee = true; + this.shoot = 735; + this.shootSpeed = 15f; + this.value = Item.sellPrice(gold: 5); + break; + case 4145: + this.DefaultToPlacableTile((ushort) 90, 34); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4146: + this.DefaultToPlacableTile((ushort) 79, 34); + this.SetShopValues(ItemRarityColor.White0, 2000); + this.maxStack = 99; + this.width = 28; + this.height = 20; + break; + case 4147: + this.DefaultToPlacableTile((ushort) 101, 35); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4148: + this.DefaultToPlacableTile((ushort) 88, 34); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4149: + this.DefaultToPlacableTile((ushort) 100, 34); + this.SetShopValues(ItemRarityColor.White0, 1500); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4150: + this.DefaultToPlacableTile((ushort) 33, 33); + this.SetShopValues(ItemRarityColor.White0, 0); + this.maxStack = 99; + this.width = 8; + this.height = 18; + this.value = Item.sellPrice(copper: 60); + this.noWet = true; + break; + case 4151: + this.DefaultToPlacableTile((ushort) 15, 39); + this.SetShopValues(ItemRarityColor.White0, 150); + this.maxStack = 99; + this.width = 12; + this.height = 30; + break; + case 4152: + this.DefaultToPlacableTile((ushort) 34, 40); + this.SetShopValues(ItemRarityColor.White0, 3000); + this.maxStack = 99; + this.width = 26; + this.height = 26; + break; + case 4153: + this.DefaultToPlacableTile((ushort) 467, 5); + this.SetShopValues(ItemRarityColor.White0, 500); + this.maxStack = 99; + this.width = 26; + this.height = 22; + break; + case 4154: + this.DefaultToPlacableTile((ushort) 104, 35); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4155: + this.DefaultToPlacableTile((ushort) 10, 39); + this.SetShopValues(ItemRarityColor.White0, 200); + this.maxStack = 99; + this.width = 14; + this.height = 28; + break; + case 4156: + this.DefaultToPlacableTile((ushort) 93, 34); + this.SetShopValues(ItemRarityColor.White0, 500); + this.maxStack = 99; + this.width = 10; + this.height = 24; + break; + case 4157: + this.DefaultToPlacableTile((ushort) 42, 40); + this.SetShopValues(ItemRarityColor.White0, 150); + this.maxStack = 99; + this.width = 12; + this.height = 28; + break; + case 4158: + this.DefaultToPlacableTile((ushort) 87, 34); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4159: + this.DefaultToPlacableTile((ushort) 19, 38); + this.SetShopValues(ItemRarityColor.White0, 0); + this.width = 8; + this.height = 10; + break; + case 4160: + this.DefaultToPlacableTile((ushort) 172, 35); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4161: + this.DefaultToPlacableTile((ushort) 89, 37); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4162: + this.DefaultToPlacableTile((ushort) 469, 3); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 26; + this.height = 20; + break; + case 4163: + this.DefaultToPlacableTile((ushort) 18, 35); + this.SetShopValues(ItemRarityColor.White0, 150); + this.maxStack = 99; + this.width = 28; + this.height = 14; + break; + case 4164: + this.DefaultToPlacableTile((ushort) 468, 5); + this.SetShopValues(ItemRarityColor.White0, 500); + this.maxStack = 99; + this.width = 26; + this.height = 22; + break; + case 4165: + this.DefaultToPlacableTile((ushort) 497, 33); + this.maxStack = 99; + this.value = 150; + break; + case 4166: + this.DefaultToPlacableTile((ushort) 90, 35); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4167: + this.DefaultToPlacableTile((ushort) 79, 35); + this.SetShopValues(ItemRarityColor.White0, 2000); + this.maxStack = 99; + this.width = 28; + this.height = 20; + break; + case 4168: + this.DefaultToPlacableTile((ushort) 101, 36); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4169: + this.DefaultToPlacableTile((ushort) 88, 35); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4170: + this.DefaultToPlacableTile((ushort) 100, 35); + this.SetShopValues(ItemRarityColor.White0, 1500); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4171: + this.DefaultToPlacableTile((ushort) 33, 34); + this.SetShopValues(ItemRarityColor.White0, 0); + this.maxStack = 99; + this.width = 8; + this.height = 18; + this.value = Item.sellPrice(copper: 60); + this.noWet = true; + break; + case 4172: + this.DefaultToPlacableTile((ushort) 15, 40); + this.SetShopValues(ItemRarityColor.White0, 150); + this.maxStack = 99; + this.width = 12; + this.height = 30; + break; + case 4173: + this.DefaultToPlacableTile((ushort) 34, 41); + this.SetShopValues(ItemRarityColor.White0, 3000); + this.maxStack = 99; + this.width = 26; + this.height = 26; + break; + case 4174: + this.DefaultToPlacableTile((ushort) 467, 6); + this.SetShopValues(ItemRarityColor.White0, 500); + this.maxStack = 99; + this.width = 26; + this.height = 22; + break; + case 4175: + this.DefaultToPlacableTile((ushort) 104, 36); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4176: + this.DefaultToPlacableTile((ushort) 10, 40); + this.SetShopValues(ItemRarityColor.White0, 200); + this.maxStack = 99; + this.width = 14; + this.height = 28; + break; + case 4177: + this.DefaultToPlacableTile((ushort) 93, 35); + this.SetShopValues(ItemRarityColor.White0, 500); + this.maxStack = 99; + this.width = 10; + this.height = 24; + break; + case 4178: + this.DefaultToPlacableTile((ushort) 42, 41); + this.SetShopValues(ItemRarityColor.White0, 150); + this.maxStack = 99; + this.width = 12; + this.height = 28; + break; + case 4179: + this.DefaultToPlacableTile((ushort) 87, 35); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4180: + this.DefaultToPlacableTile((ushort) 19, 39); + this.SetShopValues(ItemRarityColor.White0, 0); + this.width = 8; + this.height = 10; + break; + case 4181: + this.DefaultToPlacableTile((ushort) 172, 36); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4182: + this.DefaultToPlacableTile((ushort) 89, 38); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4183: + this.DefaultToPlacableTile((ushort) 469, 4); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 26; + this.height = 20; + break; + case 4184: + this.DefaultToPlacableTile((ushort) 18, 36); + this.SetShopValues(ItemRarityColor.White0, 150); + this.maxStack = 99; + this.width = 28; + this.height = 14; + break; + case 4185: + this.DefaultToPlacableTile((ushort) 468, 6); + this.SetShopValues(ItemRarityColor.White0, 500); + this.maxStack = 99; + this.width = 26; + this.height = 22; + break; + case 4186: + this.DefaultToPlacableTile((ushort) 497, 34); + this.maxStack = 99; + this.value = 150; + break; + case 4187: + this.DefaultToPlacableTile((ushort) 90, 36); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4188: + this.DefaultToPlacableTile((ushort) 79, 36); + this.SetShopValues(ItemRarityColor.White0, 2000); + this.maxStack = 99; + this.width = 28; + this.height = 20; + break; + case 4189: + this.DefaultToPlacableTile((ushort) 101, 37); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4190: + this.DefaultToPlacableTile((ushort) 88, 36); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4191: + this.DefaultToPlacableTile((ushort) 100, 36); + this.SetShopValues(ItemRarityColor.White0, 1500); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4192: + this.DefaultToPlacableTile((ushort) 33, 35); + this.SetShopValues(ItemRarityColor.White0, 0); + this.maxStack = 99; + this.width = 8; + this.height = 18; + this.value = Item.sellPrice(copper: 60); + this.noWet = true; + break; + case 4193: + this.DefaultToPlacableTile((ushort) 15, 41); + this.SetShopValues(ItemRarityColor.White0, 150); + this.maxStack = 99; + this.width = 12; + this.height = 30; + break; + case 4194: + this.DefaultToPlacableTile((ushort) 34, 42); + this.SetShopValues(ItemRarityColor.White0, 3000); + this.maxStack = 99; + this.width = 26; + this.height = 26; + break; + case 4195: + this.DefaultToPlacableTile((ushort) 467, 7); + this.SetShopValues(ItemRarityColor.White0, 500); + this.maxStack = 99; + this.width = 26; + this.height = 22; + break; + case 4196: + this.DefaultToPlacableTile((ushort) 104, 37); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4197: + this.DefaultToPlacableTile((ushort) 10, 41); + this.SetShopValues(ItemRarityColor.White0, 200); + this.maxStack = 99; + this.width = 14; + this.height = 28; + break; + case 4198: + this.DefaultToPlacableTile((ushort) 93, 36); + this.SetShopValues(ItemRarityColor.White0, 500); + this.maxStack = 99; + this.width = 10; + this.height = 24; + break; + case 4199: + this.DefaultToPlacableTile((ushort) 42, 42); + this.SetShopValues(ItemRarityColor.White0, 150); + this.maxStack = 99; + this.width = 12; + this.height = 28; + break; + case 4200: + this.DefaultToPlacableTile((ushort) 87, 36); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4201: + this.DefaultToPlacableTile((ushort) 19, 40); + this.SetShopValues(ItemRarityColor.White0, 0); + this.width = 8; + this.height = 10; + break; + case 4202: + this.DefaultToPlacableTile((ushort) 172, 37); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4203: + this.DefaultToPlacableTile((ushort) 89, 39); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4204: + this.DefaultToPlacableTile((ushort) 469, 5); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 26; + this.height = 20; + break; + case 4205: + this.DefaultToPlacableTile((ushort) 18, 37); + this.SetShopValues(ItemRarityColor.White0, 150); + this.maxStack = 99; + this.width = 28; + this.height = 14; + break; + case 4206: + this.DefaultToPlacableTile((ushort) 468, 7); + this.SetShopValues(ItemRarityColor.White0, 500); + this.maxStack = 99; + this.width = 26; + this.height = 22; + break; + case 4207: + this.DefaultToPlacableTile((ushort) 497, 35); + this.maxStack = 99; + this.value = 150; + break; + case 4208: + this.DefaultToPlacableTile((ushort) 90, 37); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4209: + this.DefaultToPlacableTile((ushort) 79, 37); + this.SetShopValues(ItemRarityColor.White0, 2000); + this.maxStack = 99; + this.width = 28; + this.height = 20; + break; + case 4210: + this.DefaultToPlacableTile((ushort) 101, 38); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4211: + this.DefaultToPlacableTile((ushort) 88, 37); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4212: + this.DefaultToPlacableTile((ushort) 100, 37); + this.SetShopValues(ItemRarityColor.White0, 1500); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4213: + this.DefaultToPlacableTile((ushort) 33, 36); + this.SetShopValues(ItemRarityColor.White0, 0); + this.maxStack = 99; + this.width = 8; + this.height = 18; + this.value = Item.sellPrice(copper: 60); + this.noWet = true; + break; + case 4214: + this.DefaultToPlacableTile((ushort) 15, 42); + this.SetShopValues(ItemRarityColor.White0, 150); + this.maxStack = 99; + this.width = 12; + this.height = 30; + break; + case 4215: + this.DefaultToPlacableTile((ushort) 34, 43); + this.SetShopValues(ItemRarityColor.White0, 3000); + this.maxStack = 99; + this.width = 26; + this.height = 26; + break; + case 4216: + this.DefaultToPlacableTile((ushort) 467, 8); + this.SetShopValues(ItemRarityColor.White0, 500); + this.maxStack = 99; + this.width = 26; + this.height = 22; + break; + case 4217: + this.DefaultToPlacableTile((ushort) 104, 38); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4218: + this.DefaultToPlacableTile((ushort) 10, 42); + this.SetShopValues(ItemRarityColor.White0, 200); + this.maxStack = 99; + this.width = 14; + this.height = 28; + break; + case 4219: + this.DefaultToPlacableTile((ushort) 93, 37); + this.SetShopValues(ItemRarityColor.White0, 500); + this.maxStack = 99; + this.width = 10; + this.height = 24; + break; + case 4220: + this.DefaultToPlacableTile((ushort) 42, 43); + this.SetShopValues(ItemRarityColor.White0, 150); + this.maxStack = 99; + this.width = 12; + this.height = 28; + break; + case 4221: + this.DefaultToPlacableTile((ushort) 87, 37); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4222: + this.DefaultToPlacableTile((ushort) 19, 41); + this.SetShopValues(ItemRarityColor.White0, 0); + this.width = 8; + this.height = 10; + break; + case 4223: + this.DefaultToPlacableTile((ushort) 172, 38); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4224: + this.DefaultToPlacableTile((ushort) 89, 40); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4225: + this.DefaultToPlacableTile((ushort) 469, 6); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 26; + this.height = 20; + break; + case 4226: + this.DefaultToPlacableTile((ushort) 18, 38); + this.SetShopValues(ItemRarityColor.White0, 150); + this.maxStack = 99; + this.width = 28; + this.height = 14; + break; + case 4227: + this.DefaultToPlacableTile((ushort) 468, 8); + this.SetShopValues(ItemRarityColor.White0, 500); + this.maxStack = 99; + this.width = 26; + this.height = 22; + break; + case 4228: + this.DefaultToPlacableTile((ushort) 497, 36); + this.maxStack = 99; + this.value = 150; + break; + case 4229: + this.DefaultToPlacableTile((ushort) 500, 0); + break; + case 4230: + this.DefaultToPlacableTile((ushort) 501, 0); + break; + case 4231: + this.DefaultToPlacableTile((ushort) 502, 0); + break; + case 4232: + this.DefaultToPlacableTile((ushort) 503, 0); + break; + case 4233: + this.DefaultToPlacableWall((ushort) 237); + break; + case 4234: + this.DefaultToPlacableWall((ushort) 238); + break; + case 4235: + this.DefaultToPlacableWall((ushort) 239); + break; + case 4236: + this.DefaultToPlacableWall((ushort) 240); + break; + case 4237: + this.DefaultToMusicBox(46); + break; + case 4238: + this.DefaultToPlacableTile((ushort) 481, 0); + break; + case 4239: + this.DefaultToPlacableTile((ushort) 482, 0); + break; + case 4240: + this.DefaultToPlacableTile((ushort) 483, 0); + break; + case 4242: + this.DefaultToGolfBall(739); + break; + case 4243: + this.DefaultToGolfBall(740); + break; + case 4244: + this.DefaultToGolfBall(741); + break; + case 4245: + this.DefaultToGolfBall(742); + break; + case 4246: + this.DefaultToGolfBall(743); + break; + case 4247: + this.DefaultToGolfBall(744); + break; + case 4248: + this.DefaultToGolfBall(745); + break; + case 4249: + this.DefaultToGolfBall(746); + break; + case 4250: + this.DefaultToGolfBall(747); + break; + case 4251: + this.DefaultToGolfBall(748); + break; + case 4252: + this.DefaultToGolfBall(749); + break; + case 4253: + this.DefaultToGolfBall(750); + break; + case 4254: + this.DefaultToGolfBall(751); + break; + case 4255: + this.DefaultToGolfBall(752); + break; + case 4256: + this.defense = 3; + this.width = 18; + this.height = 14; + this.bodySlot = 213; + this.value = Item.sellPrice(silver: 50) * 6; + this.rare = 2; + break; + case 4257: + this.noUseGraphic = true; + this.damage = 0; + this.knockBack = 7f; + this.useStyle = 5; + this.shootSpeed = 12.5f; + this.shoot = 753; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 1; + this.noMelee = true; + this.value = 20000; + break; + case 4258: + this.useStyle = 1; + this.useAnimation = 25; + this.knockBack = 3f; + this.width = 40; + this.height = 40; + this.damage = 21; + this.scale = 1f; + this.UseSound = SoundID.Item15; + this.rare = 1; + this.value = 27000; + this.melee = true; + break; + case 4259: + this.SetDefaults(198); + this.type = type; + this.damage = 42; + this.useTime = 20; + this.useAnimation = 20; + this.scale = 1.15f; + this.autoReuse = true; + this.useTurn = true; + this.rare = 4; + this.value = Item.sellPrice(gold: 1); + break; + case 4260: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = 241; + this.width = 12; + this.height = 12; + this.value = Item.sellPrice(silver: 5); + break; + case 4261: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 135; + this.width = 12; + this.height = 12; + this.placeStyle = 7; + this.mech = true; + this.value = 5000; + break; + case 4262: + this.useTurn = true; + this.width = 20; + this.height = 20; + this.useStyle = 5; + this.useTime = 90; + this.UseSound = SoundID.Item151; + this.useAnimation = 90; + this.rare = 1; + this.value = 50000; + this.shoot = 754; + break; + case 4263: + this.useTurn = true; + this.width = 20; + this.height = 20; + this.useStyle = 4; + this.useTime = 90; + this.UseSound = SoundID.Item6; + this.useAnimation = 90; + this.rare = 1; + this.value = 50000; + break; + case 4264: + this.useStyle = 4; + this.channel = true; + this.width = 34; + this.height = 34; + this.UseSound = SoundID.Item25; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 8; + this.noMelee = true; + this.mountType = 17; + this.value = Item.sellPrice(gold: 10); + break; + case 4265: + this.DefaultToPlacableTile((ushort) 467, 9); + this.SetShopValues(ItemRarityColor.White0, Item.buyPrice(gold: 3)); + this.maxStack = 99; + this.width = 26; + this.height = 22; + break; + case 4266: + this.DefaultToPlacableTile((ushort) 468, 9); + this.SetShopValues(ItemRarityColor.White0, 500); + this.maxStack = 99; + this.width = 26; + this.height = 22; + break; + case 4267: + this.DefaultToPlacableTile((ushort) 467, 10); + this.SetShopValues(ItemRarityColor.White0, 500); + this.maxStack = 99; + this.width = 26; + this.height = 22; + break; + case 4268: + this.DefaultToPlacableTile((ushort) 468, 10); + this.SetShopValues(ItemRarityColor.White0, 500); + this.maxStack = 99; + this.width = 26; + this.height = 22; + break; + case 4269: + this.mana = 10; + this.damage = 35; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 755; + this.buffType = 213; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item113; + this.useAnimation = 36; + this.useTime = 36; + this.rare = 4; + this.noMelee = true; + this.knockBack = 8f; + this.value = Item.sellPrice(gold: 5); + this.summon = true; + break; + case 4270: + this.mana = 20; + this.damage = 29; + this.useStyle = 4; + this.shootSpeed = 32f; + this.shoot = 756; + this.width = 26; + this.height = 28; + this.useAnimation = 21; + this.useTime = 7; + this.rare = 4; + this.noMelee = true; + this.knockBack = 1f; + this.value = Item.sellPrice(gold: 4); + this.magic = true; + this.autoReuse = true; + break; + case 4271: + this.useStyle = 4; + this.width = 22; + this.height = 14; + this.consumable = true; + this.useAnimation = 45; + this.useTime = 45; + this.maxStack = 20; + this.rare = 2; + break; + case 4272: + this.noMelee = true; + this.useStyle = 5; + this.useAnimation = 40; + this.useTime = 40; + this.knockBack = 6.5f; + this.width = 30; + this.height = 10; + this.damage = 55; + this.scale = 1.1f; + this.noUseGraphic = true; + this.shoot = 757; + this.shootSpeed = 15.9f; + this.UseSound = SoundID.Item1; + this.rare = 4; + this.value = Item.sellPrice(gold: 4); + this.melee = true; + this.channel = true; + break; + case 4273: + this.mana = 10; + this.damage = 11; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 758; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item44; + this.useAnimation = 36; + this.useTime = 36; + this.noMelee = true; + this.knockBack = 5f; + this.buffType = 214; + this.value = Item.sellPrice(gold: 1); + this.rare = 3; + this.summon = true; + break; + case 4274: + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.noUseGraphic = true; + this.value = Item.sellPrice(gold: 10); + this.rare = 3; + this.makeNPC = (short) 592; + break; + case 4275: + this.width = 18; + this.height = 18; + this.headSlot = 221; + this.value = Item.sellPrice(gold: 10); + this.rare = 3; + this.vanity = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 505; + this.width = 12; + this.height = 12; + break; + case 4276: + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 10)); + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 506; + this.width = 20; + this.height = 20; + break; + case 4277: + this.DefaultToPlacableTile((ushort) 507, 0); + break; + case 4278: + this.DefaultToPlacableTile((ushort) 508, 0); + break; + case 4279: + this.DefaultToPlacableWall((ushort) 242); + break; + case 4280: + this.DefaultToPlacableWall((ushort) 243); + break; + case 4281: + this.mana = 10; + this.damage = 7; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 759; + this.buffType = 216; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item113; + this.useAnimation = 36; + this.useTime = 36; + this.rare = 1; + this.noMelee = true; + this.knockBack = 4f; + this.value = Item.sellPrice(gold: 1); + this.summon = true; + break; + case 4298: + this.DefaultToPlacableTile((ushort) 90, 38); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4299: + this.DefaultToPlacableTile((ushort) 79, 38); + this.SetShopValues(ItemRarityColor.White0, 2000); + this.maxStack = 99; + this.width = 28; + this.height = 20; + break; + case 4300: + this.DefaultToPlacableTile((ushort) 101, 39); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4301: + this.DefaultToPlacableTile((ushort) 88, 38); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4302: + this.DefaultToPlacableTile((ushort) 100, 38); + this.SetShopValues(ItemRarityColor.White0, 1500); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4303: + this.DefaultToPlacableTile((ushort) 33, 37); + this.SetShopValues(ItemRarityColor.White0, 0); + this.maxStack = 99; + this.width = 8; + this.height = 18; + this.value = Item.sellPrice(copper: 60); + this.noWet = true; + break; + case 4304: + this.DefaultToPlacableTile((ushort) 15, 43); + this.SetShopValues(ItemRarityColor.White0, 150); + this.maxStack = 99; + this.width = 12; + this.height = 30; + break; + case 4305: + this.DefaultToPlacableTile((ushort) 34, 44); + this.SetShopValues(ItemRarityColor.White0, 3000); + this.maxStack = 99; + this.width = 26; + this.height = 26; + break; + case 4306: + this.DefaultToPlacableTile((ushort) 104, 39); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4307: + this.DefaultToPlacableTile((ushort) 10, 43); + this.SetShopValues(ItemRarityColor.White0, 200); + this.maxStack = 99; + this.width = 14; + this.height = 28; + break; + case 4308: + this.DefaultToPlacableTile((ushort) 93, 38); + this.SetShopValues(ItemRarityColor.White0, 500); + this.maxStack = 99; + this.width = 10; + this.height = 24; + break; + case 4309: + this.DefaultToPlacableTile((ushort) 42, 44); + this.SetShopValues(ItemRarityColor.White0, 150); + this.maxStack = 99; + this.width = 12; + this.height = 28; + break; + case 4310: + this.DefaultToPlacableTile((ushort) 87, 38); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4311: + this.DefaultToPlacableTile((ushort) 19, 42); + this.SetShopValues(ItemRarityColor.White0, 0); + this.width = 8; + this.height = 10; + break; + case 4312: + this.DefaultToPlacableTile((ushort) 172, 39); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4313: + this.DefaultToPlacableTile((ushort) 89, 41); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4314: + this.DefaultToPlacableTile((ushort) 469, 7); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 26; + this.height = 20; + break; + case 4315: + this.DefaultToPlacableTile((ushort) 18, 39); + this.SetShopValues(ItemRarityColor.White0, 150); + this.maxStack = 99; + this.width = 28; + this.height = 14; + break; + case 4316: + this.DefaultToPlacableTile((ushort) 497, 37); + this.maxStack = 99; + this.value = 150; + break; + case 4317: + this.SetShopValues(ItemRarityColor.LightRed4, Item.sellPrice(gold: 2)); + this.SetWeaponValues(30, 7f); + this.melee = true; + this.autoReuse = true; + this.useTime = 11; + this.useAnimation = 27; + this.useStyle = 1; + this.hammer = 80; + this.axe = 30; + this.UseSound = SoundID.Item1; + this.width = 20; + this.height = 20; + break; + case 4318: + this.DefaultToPlacableTile((ushort) 509, 0); + this.width = 22; + this.height = 32; + this.rare = 9; + this.value = Item.sellPrice(gold: 25); + break; + case 4319: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 510; + this.width = 28; + this.height = 28; + this.SetShopValues(ItemRarityColor.White0, Item.buyPrice(silver: 20)); + break; + case 4320: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 511; + this.width = 28; + this.height = 28; + this.SetShopValues(ItemRarityColor.White0, Item.buyPrice(silver: 20)); + break; + case 4321: + this.width = 18; + this.height = 18; + this.bodySlot = 214; + this.rare = 3; + this.vanity = true; + this.value = Item.buyPrice(gold: 5); + break; + case 4322: + this.width = 18; + this.height = 18; + this.legSlot = 188; + this.rare = 3; + this.vanity = true; + this.value = Item.buyPrice(gold: 5); + break; + case 4323: + this.width = 18; + this.height = 18; + this.headSlot = 222; + this.rare = 3; + this.vanity = true; + this.value = Item.buyPrice(gold: 50); + break; + case 4324: + this.width = 18; + this.height = 14; + this.bodySlot = 215; + this.value = Item.buyPrice(gold: 50); + this.rare = 3; + this.vanity = true; + break; + case 4325: + this.useStyle = 1; + this.useAnimation = 8; + this.useTime = 8; + this.width = 24; + this.height = 28; + this.UseSound = SoundID.Item1; + this.shoot = 760; + this.fishingPole = 25; + this.shootSpeed = 15f; + this.rare = 2; + this.value = Item.sellPrice(gold: 2); + break; + case 4326: + this.DefaultToPlacableTile((ushort) 520, 0); + this.maxStack = 99; + this.value = 150; + break; + case 4327: + case 4328: + case 4329: + case 4330: + case 4331: + case 4332: + this.DefaultToPlacableTile((ushort) (type - 4327 + 521), 0); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4333: + this.DefaultToPlacableTile((ushort) 527, 0); + this.value = Item.sellPrice(gold: 10); + this.rare = 3; + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4334: + case 4335: + case 4336: + case 4337: + case 4338: + case 4339: + this.DefaultToCapturedCritter((short) (type - 4334 + 595)); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(silver: 10)); + this.width = 20; + this.height = 20; + this.bait = 20; + break; + case 4340: + this.DefaultToCapturedCritter((short) 601); + this.value = Item.sellPrice(gold: 10); + this.rare = 3; + this.width = 20; + this.height = 20; + this.bait = 50; + break; + case 4341: + this.DefaultToAccessory(30, 30); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 1)); + break; + case 4342: + this.DefaultToPlacableTile((ushort) 105, 78); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(copper: 60)); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4343: + this.width = 22; + this.height = 16; + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(silver: 10)); + this.DefaultToThrownWeapon(761, 17, 5f); + this.SetWeaponValues(4, 2f); + break; + case 4344: + this.width = 22; + this.height = 16; + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(silver: 10)); + this.DefaultToThrownWeapon(762, 17, 5f); + this.SetWeaponValues(4, 2f); + break; + case 4345: + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(silver: 5)); + this.maxStack = 99; + this.width = 12; + this.height = 12; + break; + case 4346: + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 5)); + this.width = 30; + this.height = 30; + break; + case 4347: + this.SetShopValues(ItemRarityColor.Green2, Item.buyPrice(gold: 17)); + this.DefaultToMagicWeapon(876, 37, 15f); + this.mana = 16; + this.width = 40; + this.height = 40; + this.knockBack = 6f; + this.scale = 0.75f; + this.damage = 42; + this.UseSound = SoundID.Item158; + break; + case 4348: + this.SetShopValues(ItemRarityColor.Pink5, Item.buyPrice(gold: 50)); + this.DefaultToMagicWeapon(876, 37, 15f); + this.mana = 16; + this.width = 40; + this.height = 40; + this.knockBack = 6f; + this.scale = 0.75f; + this.damage = 100; + this.UseSound = SoundID.Item158; + break; + case 4349: + case 4350: + case 4351: + case 4352: + case 4353: + this.DefaultToPlacableTile(179 + type - 4349); + break; + case 4354: + this.DefaultToPlacableTile((ushort) 381, 0); + break; + case 4355: + this.DefaultToPlacableTile((ushort) 531, 0); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(copper: 60)); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4356: + this.DefaultToMusicBox(47); + break; + case 4357: + this.DefaultToMusicBox(48); + break; + case 4358: + this.DefaultToMusicBox(49); + break; + case 4359: + this.DefaultToCapturedCritter((short) 602); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(silver: 7, copper: 50)); + this.width = 20; + this.height = 20; + break; + case 4360: + this.DefaultToPlacableTile((ushort) 105, 77); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(copper: 60)); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4361: + this.DefaultToCapturedCritter((short) 604); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(silver: 10)); + this.width = 20; + this.height = 20; + this.bait = 17; + break; + case 4362: + this.DefaultToCapturedCritter((short) 605); + this.value = Item.sellPrice(gold: 10); + this.rare = 3; + this.width = 20; + this.height = 20; + this.bait = 50; + break; + case 4363: + this.DefaultToCapturedCritter((short) 606); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(silver: 5)); + this.width = 12; + this.height = 12; + this.bait = 22; + break; + case 4364: + this.DefaultToPlacableTile((ushort) 532, 0); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4365: + this.DefaultToVanitypet(764, 217); + this.SetShopValues(ItemRarityColor.Pink5, Item.buyPrice(1)); + break; + case 4366: + this.DefaultToVanitypet(765, 218); + break; + case 4367: + case 4368: + case 4369: + case 4370: + case 4371: + this.DefaultTokite(type - 4367 + 766); + break; + case 4372: + this.SetShopValues(ItemRarityColor.Orange3, Item.buyPrice(gold: 1)); + this.DefaultToGuitar(); + break; + case 4373: + this.DefaultToCapturedCritter((short) 607); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(silver: 7, copper: 50)); + this.width = 12; + this.height = 12; + break; + case 4374: + this.DefaultToCapturedCritter((short) 608); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(silver: 7, copper: 50)); + this.width = 12; + this.height = 12; + break; + case 4375: + this.DefaultToCapturedCritter((short) 610); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(silver: 10)); + this.width = 12; + this.height = 12; + break; + case 4376: + this.DefaultToPlacableTile((ushort) 533, 0); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4377: + this.DefaultToPlacableTile((ushort) 534, 0); + this.rare = 1; + break; + case 4378: + this.DefaultToPlacableTile((ushort) 536, 0); + this.rare = 1; + break; + case 4379: + this.DefaultTokite(771); + break; + case 4380: + this.DefaultToPlacableTile((ushort) 538, 0); + this.maxStack = 99; + break; + case 4381: + this.DefaultToBow(19, 9f, true); + this.SetWeaponValues(14, 3f); + this.value = Item.sellPrice(gold: 1); + this.rare = 3; + break; + case 4382: + this.useStyle = 4; + this.consumable = true; + this.useAnimation = 45; + this.useTime = 45; + this.UseSound = SoundID.Item92; + this.width = 28; + this.height = 28; + this.maxStack = 20; + this.rare = 2; + break; + case 4383: + this.DefaultToTorch(16); + break; + case 4384: + this.DefaultToTorch(17, true); + break; + case 4385: + this.DefaultToTorch(18); + break; + case 4386: + this.DefaultToTorch(19); + break; + case 4387: + this.DefaultToTorch(20); + break; + case 4388: + this.DefaultToTorch(21); + break; + case 4389: + this.DefaultToPlacableTile((ushort) 539, 0); + this.rare = 1; + break; + case 4390: + this.DefaultToPlacableTile((ushort) 484, 0); + break; + case 4391: + this.DefaultToPlacableTile((ushort) 162, 0); + break; + case 4392: + this.DefaultToPlacableTile((ushort) 541, 0); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(silver: 10)); + break; + case 4393: + case 4394: + this.DefaultToQuestFish(); + break; + case 4395: + this.DefaultToCapturedCritter((short) 611); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(silver: 10)); + this.width = 12; + this.height = 12; + break; + case 4396: + this.DefaultToPlacableTile((ushort) 542, 0); + this.maxStack = 99; + break; + case 4397: + this.DefaultToPlacableTile((ushort) 105, 76); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(copper: 60)); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4398: + this.DefaultToPlacableTile((ushort) 543, 0); + this.maxStack = 99; + this.width = 20; + this.height = 20; + this.value = Item.sellPrice(silver: 20); + break; + case 4399: + this.DefaultToPlacableTile((ushort) 544, 0); + this.value = Item.sellPrice(gold: 10); + this.rare = 3; + this.maxStack = 99; + break; + case 4400: + this.useStyle = 1; + this.shootSpeed = 7f; + this.shoot = 772; + this.width = 22; + this.height = 22; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.noUseGraphic = true; + this.useTime = 15; + this.rare = 2; + this.value = Item.sellPrice(silver: 5); + this.consumable = true; + this.maxStack = 999; + break; + case 4401: + this.SetShopValues(ItemRarityColor.White0, Item.buyPrice(silver: 7, copper: 50)); + this.maxStack = 999; + this.width = 26; + this.height = 26; + break; + case 4402: + this.SetShopValues(ItemRarityColor.White0, Item.buyPrice(gold: 1)); + this.maxStack = 999; + this.width = 26; + this.height = 26; + break; + case 4404: + this.DefaultToAccessory(20, 12); + this.SetShopValues(ItemRarityColor.White0, Item.buyPrice(gold: 1)); + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 4405: + case 4406: + case 4407: + case 4408: + this.DefaultToPlacableTile((ushort) 376, 18 + type - 4405); + this.SetShopValues(ItemRarityColor.Green2, Item.sellPrice(gold: 1)); + this.maxStack = 99; + break; + case 4409: + this.DefaultToAccessory(28); + this.faceSlot = (sbyte) 14; + this.SetShopValues(ItemRarityColor.Pink5, Item.buyPrice(gold: 10)); + break; + case 4410: + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(silver: 1)); + this.maxStack = 99; + this.width = 32; + this.height = 22; + break; + case 4412: + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 1)); + this.maxStack = 999; + this.width = 22; + this.height = 22; + break; + case 4413: + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 5)); + this.maxStack = 999; + this.width = 22; + this.height = 22; + break; + case 4414: + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 25)); + this.maxStack = 999; + this.width = 22; + this.height = 22; + break; + case 4415: + this.DefaultToPlacableTile((ushort) 10, 44); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(copper: 40)); + this.maxStack = 99; + this.width = 14; + this.height = 28; + break; + case 4416: + this.DefaultToPlacableTile((ushort) 19, 43); + this.SetShopValues(ItemRarityColor.White0, 0); + this.width = 8; + this.height = 10; + break; + case 4417: + this.DefaultToPlacableTile((ushort) 207, 9); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 4)); + this.width = 8; + this.height = 10; + break; + case 4418: + this.DefaultToCapturedCritter((short) 612); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(silver: 10)); + this.width = 20; + this.height = 20; + this.bait = 17; + break; + case 4419: + this.DefaultToCapturedCritter((short) 613); + this.value = Item.sellPrice(gold: 10); + this.rare = 3; + this.width = 20; + this.height = 20; + this.bait = 50; + break; + case 4420: + this.DefaultToPlacableTile((ushort) 545, 0); + this.SetShopValues(ItemRarityColor.White0, Item.buyPrice(gold: 5)); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4421: + this.DefaultToMusicBox(50); + break; + case 4422: + this.DefaultToPlacableTile((ushort) 546, 0); + break; + case 4423: + this.useStyle = 1; + this.shootSpeed = 5f; + this.shoot = 773; + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.UseSound = SoundID.Item1; + this.consumable = true; + this.useAnimation = 25; + this.noUseGraphic = true; + this.useTime = 25; + this.value = Item.sellPrice(silver: 3); + this.rare = 1; + break; + case 4424: + this.DefaultToPlacableWall((ushort) 245); + break; + case 4425: + this.DefaultToVanitypet(774, 219); + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 1)); + break; + case 4426: + this.DefaultToMount(18); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 1)); + break; + case 4427: + this.DefaultToMount(19); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(silver: 50)); + break; + case 4428: + this.DefaultToMount(20); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 1)); + break; + case 4429: + this.DefaultToMount(21); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(silver: 50)); + break; + case 4430: + this.DefaultToPlacableTile((ushort) 547, 0); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 3)); + break; + case 4431: + this.DefaultToPlacableTile((ushort) 547, 1); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 3)); + break; + case 4432: + this.DefaultToPlacableTile((ushort) 547, 2); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 3)); + break; + case 4433: + this.DefaultToPlacableTile((ushort) 547, 3); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 3)); + break; + case 4434: + this.DefaultToPlacableTile((ushort) 547, 4); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 3)); + break; + case 4435: + this.DefaultToPlacableTile((ushort) 548, 0); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 3)); + break; + case 4436: + this.DefaultToPlacableTile((ushort) 548, 1); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 3)); + break; + case 4437: + this.DefaultToPlacableTile((ushort) 548, 2); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 3)); + break; + case 4438: + this.DefaultToPlacableTile((ushort) 548, 3); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 3)); + break; + case 4439: + this.DefaultToPlacableTile((ushort) 548, 4); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 3)); + break; + case 4440: + this.DefaultToPlacableTile((ushort) 548, 5); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 3)); + break; + case 4441: + this.DefaultToPlacableTile((ushort) 548, 6); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 3)); + break; + case 4442: + this.useStyle = 1; + this.useAnimation = 8; + this.useTime = 8; + this.width = 24; + this.height = 28; + this.UseSound = SoundID.Item1; + this.shoot = 775; + this.fishingPole = 25; + this.shootSpeed = 15f; + this.rare = 1; + this.value = Item.sellPrice(gold: 2); + break; + case 4443: + this.DefaultToMount(22); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 1)); + break; + case 4444: + this.useStyle = 4; + this.channel = true; + this.width = 34; + this.height = 34; + this.UseSound = SoundID.Item25; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 8; + this.noMelee = true; + this.mountType = 23; + this.value = Item.sellPrice(gold: 5); + this.expert = true; + break; + case 4445: + this.damage = 50; + this.width = 20; + this.height = 14; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Rocket; + this.knockBack = 4f; + this.value = Item.buyPrice(silver: 7, copper: 50); + this.ranged = true; + break; + case 4446: + this.damage = 50; + this.width = 20; + this.height = 14; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Rocket; + this.knockBack = 4f; + this.value = Item.buyPrice(silver: 15); + this.ranged = true; + break; + case 4447: + this.damage = 40; + this.width = 20; + this.height = 14; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Rocket; + this.knockBack = 4f; + this.value = Item.sellPrice(silver: 10); + this.ranged = true; + break; + case 4448: + this.damage = 40; + this.width = 20; + this.height = 14; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Rocket; + this.knockBack = 4f; + this.value = Item.sellPrice(silver: 10); + this.ranged = true; + break; + case 4449: + this.damage = 40; + this.width = 20; + this.height = 14; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Rocket; + this.knockBack = 4f; + this.value = Item.sellPrice(silver: 10); + this.ranged = true; + break; + case 4450: + this.DefaultToMount(24); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 1)); + break; + case 4451: + this.DefaultToMount(25); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 1)); + break; + case 4452: + this.DefaultToMount(26); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 1)); + break; + case 4453: + this.DefaultToMount(27); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 1)); + break; + case 4454: + this.DefaultToMount(28); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 1)); + break; + case 4455: + this.DefaultToMount(29); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 1)); + break; + case 4456: + this.DefaultToMount(30); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 1)); + break; + case 4457: + this.damage = 75; + this.width = 20; + this.height = 14; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Rocket; + this.knockBack = 4f; + this.value = Item.buyPrice(silver: 5); + this.ranged = true; + break; + case 4458: + this.damage = 75; + this.width = 20; + this.height = 14; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Rocket; + this.knockBack = 4f; + this.value = Item.buyPrice(silver: 10); + this.ranged = true; + break; + case 4459: + this.damage = 40; + this.width = 20; + this.height = 14; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Rocket; + this.knockBack = 4f; + this.value = Item.buyPrice(silver: 50); + this.ranged = true; + break; + case 4460: + this.tileWand = 169; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.createTile = 552; + this.width = 8; + this.height = 10; + this.rare = 1; + this.value = Item.sellPrice(gold: 1); + break; + case 4461: + this.DefaultToPlacableTile((ushort) 550, 0); + this.maxStack = 99; + break; + case 4462: + this.DefaultToPlacableTile((ushort) 551, 0); + this.maxStack = 99; + break; + case 4463: + this.autoReuse = false; + this.useStyle = 13; + this.useAnimation = 21; + this.useTime = 7; + this.reuseDelay = 14; + this.width = 50; + this.height = 18; + this.shoot = 802; + this.UseSound = SoundID.Item1; + this.damage = 15; + this.shootSpeed = 2.4f; + this.noMelee = true; + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(silver: 30)); + this.melee = true; + this.knockBack = 0.5f; + this.noUseGraphic = true; + break; + case 4464: + this.DefaultToCapturedCritter((short) 616); + this.value = Item.sellPrice(silver: 10); + break; + case 4465: + this.DefaultToCapturedCritter((short) 617); + this.value = Item.sellPrice(silver: 10); + break; + case 4466: + this.DefaultToPlacableTile((ushort) 105, 79); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(copper: 60)); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4467: + this.DefaultToMount(31); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 1)); + break; + case 4468: + this.DefaultToMount(32); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 4)); + break; + case 4469: + this.DefaultToMount(33); + this.SetShopValues(ItemRarityColor.StrongRed10, Item.sellPrice(gold: 10)); + break; + case 4470: + this.DefaultToMount(34); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 10)); + break; + case 4471: + this.DefaultToMount(35); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 1)); + break; + case 4472: + this.DefaultToMount(36); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 10)); + break; + case 4473: + this.DefaultToPlacableTile((ushort) 553, 0); + this.maxStack = 99; + break; + case 4474: + this.DefaultToPlacableTile((ushort) 554, 0); + this.maxStack = 99; + break; + case 4475: + this.DefaultToPlacableTile((ushort) 555, 0); + this.maxStack = 99; + break; + case 4476: + this.DefaultToPlacableTile((ushort) 556, 0); + this.maxStack = 99; + this.value = Item.sellPrice(gold: 10); + this.rare = 3; + break; + case 4477: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 257; + this.buffTime = 10800; + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 1)); + break; + case 4478: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 257; + this.buffTime = 18000; + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 5)); + break; + case 4479: + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = 17; + this.useTime = 17; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.buffType = 257; + this.buffTime = 36000; + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 25)); + break; + case 4480: + this.DefaultToCapturedCritter((short) 626); + this.value = Item.sellPrice(silver: 15); + break; + case 4481: + this.DefaultToPlacableTile((ushort) 558, 0); + this.maxStack = 99; + break; + case 4482: + this.DefaultToCapturedCritter((short) 627); + this.value = Item.sellPrice(gold: 10); + this.rare = 3; + break; + case 4483: + this.DefaultToPlacableTile((ushort) 559, 0); + this.value = Item.sellPrice(gold: 10); + this.rare = 3; + this.maxStack = 99; + break; + case 4484: + case 4485: + this.mech = true; + this.noWet = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 144; + this.placeStyle = type - 4484 + 3; + this.width = 10; + this.height = 12; + this.SetShopValues(ItemRarityColor.White0, Item.buyPrice(gold: 2)); + break; + case 4486: + case 4487: + case 4488: + case 4489: + case 4490: + case 4491: + case 4492: + case 4493: + case 4494: + case 4495: + case 4496: + case 4497: + case 4498: + case 4499: + case 4500: + case 4501: + case 4502: + case 4503: + this.DefaultToPlacableWall((ushort) (246 + type - 4486)); + break; + case 4504: + case 4505: + this.DefaultToPlacableWall((ushort) (264 + type - 4504)); + this.value = 250; + break; + case 4506: + case 4507: + this.DefaultToPlacableWall((ushort) (266 + type - 4506)); + break; + case 4508: + this.DefaultToPlacableWall((ushort) (268 + type - 4508)); + this.value = 250; + break; + case 4509: + case 4510: + case 4511: + this.DefaultToPlacableWall((ushort) (269 + type - 4509)); + break; + case 4512: + this.DefaultToPlacableWall((ushort) 274); + break; + case 4513: + case 4514: + case 4515: + case 4516: + case 4517: + case 4518: + case 4519: + case 4520: + case 4521: + case 4522: + case 4523: + case 4524: + case 4525: + case 4526: + case 4527: + case 4528: + case 4529: + case 4530: + case 4531: + case 4532: + case 4533: + case 4534: + case 4535: + case 4536: + case 4537: + case 4538: + case 4539: + case 4540: + this.DefaultToPlacableWall((ushort) (276 + type - 4513)); + break; + case 4541: + case 4542: + case 4543: + case 4544: + case 4545: + case 4546: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 288 + (type - 4541); + this.width = 10; + this.height = 24; + this.value = 1000; + this.rare = 1; + break; + case 4547: + this.DefaultToPlacableTile((ushort) 563, 0); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(copper: 20)); + break; + case 4548: + this.DefaultToPlacableWall((ushort) 313); + break; + case 4549: + this.width = 18; + this.height = 18; + this.headSlot = 223; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4550: + this.DefaultToVanitypet(825, 262); + this.SetShopValues(ItemRarityColor.Orange3, Item.buyPrice(1)); + break; + case 4551: + this.DefaultToVanitypet(821, 261); + break; + case 4552: + this.DefaultToPlacableTile((ushort) 565, 0); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 4)); + break; + case 4553: + this.DefaultToPlacableTile((ushort) 564, 0); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 2)); + break; + case 4554: + this.DefaultToPlacableTile((ushort) 561, 0); + break; + case 4555: + this.width = 18; + this.height = 18; + this.headSlot = 227; + this.rare = 0; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4556: + this.width = 18; + this.height = 18; + this.bodySlot = 216; + this.rare = 0; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4557: + this.width = 18; + this.height = 18; + this.legSlot = 190; + this.rare = 0; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4558: + this.width = 18; + this.height = 18; + this.headSlot = 228; + this.rare = 3; + this.vanity = true; + this.value = Item.buyPrice(gold: 2); + break; + case 4559: + this.width = 18; + this.height = 18; + this.headSlot = 229; + this.rare = 3; + this.vanity = true; + this.value = Item.buyPrice(gold: 2); + break; + case 4560: + this.width = 18; + this.height = 18; + this.headSlot = 224; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + break; + case 4561: + this.width = 18; + this.height = 18; + this.headSlot = 225; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4562: + this.width = 18; + this.height = 18; + this.headSlot = 226; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4563: + this.DefaultToAccessory(18, 18); + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 4564: + this.DefaultToPlacableTile((ushort) 562, 0); + this.SetShopValues(ItemRarityColor.White0, Item.buyPrice(silver: 1)); + break; + case 4565: + this.DefaultToPlacableWall((ushort) 312); + break; + case 4566: + this.DefaultToPlacableTile((ushort) 90, 39); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4567: + this.DefaultToPlacableTile((ushort) 79, 39); + this.SetShopValues(ItemRarityColor.White0, 2000); + this.maxStack = 99; + this.width = 28; + this.height = 20; + break; + case 4568: + this.DefaultToPlacableTile((ushort) 101, 40); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4569: + this.DefaultToPlacableTile((ushort) 88, 39); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4570: + this.DefaultToPlacableTile((ushort) 100, 39); + this.SetShopValues(ItemRarityColor.White0, 1500); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4571: + this.DefaultToPlacableTile((ushort) 33, 38); + this.SetShopValues(ItemRarityColor.White0, 0); + this.maxStack = 99; + this.width = 8; + this.height = 18; + this.value = Item.sellPrice(copper: 60); + this.noWet = true; + break; + case 4572: + this.DefaultToPlacableTile((ushort) 15, 44); + this.SetShopValues(ItemRarityColor.White0, 150); + this.maxStack = 99; + this.width = 12; + this.height = 30; + break; + case 4573: + this.DefaultToPlacableTile((ushort) 34, 45); + this.SetShopValues(ItemRarityColor.White0, 2000); + this.maxStack = 99; + this.width = 26; + this.height = 26; + break; + case 4574: + this.DefaultToPlacableTile((ushort) 467, 11); + this.SetShopValues(ItemRarityColor.White0, 500); + this.maxStack = 99; + this.width = 26; + this.height = 22; + break; + case 4575: + this.DefaultToPlacableTile((ushort) 104, 40); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4576: + this.DefaultToPlacableTile((ushort) 10, 45); + this.SetShopValues(ItemRarityColor.White0, 200); + this.maxStack = 99; + this.width = 14; + this.height = 28; + break; + case 4577: + this.DefaultToPlacableTile((ushort) 93, 39); + this.SetShopValues(ItemRarityColor.White0, 500); + this.maxStack = 99; + this.width = 10; + this.height = 24; + break; + case 4578: + this.DefaultToPlacableTile((ushort) 42, 45); + this.SetShopValues(ItemRarityColor.White0, 150); + this.maxStack = 99; + this.width = 12; + this.height = 28; + break; + case 4579: + this.DefaultToPlacableTile((ushort) 87, 39); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4580: + this.DefaultToPlacableTile((ushort) 19, 44); + this.SetShopValues(ItemRarityColor.White0, 0); + this.width = 8; + this.height = 10; + break; + case 4581: + this.DefaultToPlacableTile((ushort) 172, 40); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4582: + this.DefaultToPlacableTile((ushort) 89, 42); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4583: + this.DefaultToPlacableTile((ushort) 469, 8); + this.SetShopValues(ItemRarityColor.White0, 300); + this.maxStack = 99; + this.width = 26; + this.height = 20; + break; + case 4584: + this.DefaultToPlacableTile((ushort) 18, 40); + this.SetShopValues(ItemRarityColor.White0, 150); + this.maxStack = 99; + this.width = 28; + this.height = 14; + break; + case 4585: + this.DefaultToPlacableTile((ushort) 468, 11); + this.SetShopValues(ItemRarityColor.White0, 500); + this.maxStack = 99; + this.width = 26; + this.height = 22; + break; + case 4586: + this.DefaultToPlacableTile((ushort) 497, 38); + this.maxStack = 99; + this.value = 150; + break; + case 4587: + case 4588: + case 4589: + case 4590: + this.DefaultToGolfClub(20, 20); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(silver: 10)); + break; + case 4591: + case 4592: + case 4593: + case 4594: + this.DefaultToGolfClub(20, 20); + this.SetShopValues(ItemRarityColor.Orange3, Item.buyPrice(gold: 10)); + break; + case 4595: + case 4596: + case 4597: + case 4598: + this.DefaultToGolfClub(20, 20); + this.SetShopValues(ItemRarityColor.LightRed4, Item.buyPrice(gold: 25)); + break; + case 4599: + case 4600: + case 4601: + this.DefaultToPlacableTile((ushort) 560, type - 4599); + this.SetShopValues(ItemRarityColor.Orange3, Item.buyPrice(gold: 1)); + this.maxStack = 99; + break; + case 4602: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 294; + this.width = 10; + this.height = 24; + this.value = 1000; + this.rare = 1; + break; + case 4603: + this.DefaultToVanitypet(815, 258); + this.SetShopValues(ItemRarityColor.Orange3, Item.buyPrice(1)); + break; + case 4604: + this.DefaultToVanitypet(816, 259); + this.SetShopValues(ItemRarityColor.Orange3, Item.buyPrice(1)); + break; + case 4605: + this.DefaultToVanitypet(817, 260); + this.SetShopValues(ItemRarityColor.Orange3, Item.buyPrice(1)); + break; + case 4606: + this.DefaultToMusicBox(51); + break; + case 4607: + this.mana = 10; + this.damage = 33; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 831; + this.buffType = 263; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item113; + this.useAnimation = 36; + this.useTime = 36; + this.rare = 8; + this.noMelee = true; + this.knockBack = 4f; + this.value = Item.sellPrice(gold: 20); + this.summon = true; + break; + case 4608: + this.useStyle = 1; + this.shootSpeed = 7f; + this.shoot = 820; + this.width = 18; + this.height = 20; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 19; + this.useTime = 19; + this.noMelee = true; + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(silver: 5)); + break; + case 4609: + this.DefaultToPlacableTile((ushort) 567, 0); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 1)); + break; + case 4610: + this.DefaultTokite(822); + break; + case 4611: + this.DefaultTokite(823); + break; + case 4612: + this.DefaultTokite(824); + break; + case 4613: + this.DefaultTokite(826); + break; + case 4626: + case 4627: + case 4628: + case 4629: + case 4630: + case 4631: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 63 + (type - 4626); + break; + case 4632: + case 4633: + case 4634: + case 4635: + case 4636: + case 4637: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 37 + (type - 4632); + break; + case 4638: + case 4639: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 245; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 10); + this.placeStyle = 7 + (type - 4638); + break; + case 4640: + this.DefaultToPlacableTile((ushort) 67, 0); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(silver: 1)); + break; + case 4641: + this.DefaultToPlacableTile((ushort) 66, 0); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(silver: 1)); + break; + case 4642: + this.DefaultToPlacableTile((ushort) 63, 0); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(silver: 1)); + break; + case 4643: + this.DefaultToPlacableTile((ushort) 65, 0); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(silver: 1)); + break; + case 4644: + this.DefaultToPlacableTile((ushort) 64, 0); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(silver: 1)); + break; + case 4645: + this.DefaultToPlacableTile((ushort) 68, 0); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(silver: 1)); + break; + case 4646: + this.DefaultToPlacableTile((ushort) 566, 0); + this.SetShopValues(ItemRarityColor.White0, Item.sellPrice(silver: 1)); + break; + case 4647: + this.DefaultToPlacableWall((ushort) 314); + break; + case 4648: + case 4649: + case 4650: + case 4651: + this.DefaultTokite(827 + (type - 4648)); + break; + case 4652: + this.width = 18; + this.height = 18; + this.headSlot = 230; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4653: + this.width = 18; + this.height = 18; + this.bodySlot = 217; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4654: + this.width = 18; + this.height = 18; + this.legSlot = 191; + this.rare = 3; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4655: + this.DefaultToPlacableTile((ushort) 568, 0); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4656: + this.DefaultToPlacableTile((ushort) 569, 0); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4657: + this.DefaultToPlacableTile((ushort) 570, 0); + this.maxStack = 99; + this.width = 20; + this.height = 20; + break; + case 4658: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 20); + this.placeStyle = 43; + break; + case 4659: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 245; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 20); + this.placeStyle = 9; + break; + case 4660: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 20); + this.placeStyle = 69; + break; + case 4661: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 246; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 20); + this.placeStyle = 19; + break; + case 4662: + case 4663: + case 4778: + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.value = Item.sellPrice(gold: 1, silver: 50); + this.rare = 3; + break; + case 4664: + this.width = 18; + this.height = 18; + this.bodySlot = 218; + this.rare = 3; + this.vanity = true; + this.value = Item.buyPrice(gold: 20); + break; + case 4665: + this.width = 18; + this.height = 18; + this.legSlot = 193; + this.rare = 3; + this.vanity = true; + this.value = Item.buyPrice(gold: 20); + break; + case 4666: + this.width = 18; + this.height = 18; + this.headSlot = 232; + this.rare = 3; + this.vanity = true; + this.value = Item.buyPrice(gold: 15); + break; + case 4667: + this.DefaultToPlacableWall((ushort) 315); + break; + case 4668: + this.paint = (byte) 31; + this.width = 24; + this.height = 24; + this.value = Item.buyPrice(silver: 2); + this.maxStack = 999; + break; + case 4669: + this.DefaultTokite(838); + break; + case 4670: + this.DefaultTokite(839); + break; + case 4671: + this.DefaultTokite(840); + break; + case 4672: + this.DefaultToWhip(841, 14, 0.5f, 4f); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 15)); + break; + case 4673: + this.autoReuse = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 12; + this.useTime = 12; + this.width = 16; + this.height = 16; + this.scale = 1f; + this.value = Item.buyPrice(silver: 50); + break; + case 4674: + this.DefaultTokite(843); + break; + case 4675: + this.DefaultTokite(844); + break; + case 4676: + this.DefaultTokite(845); + this.value = Item.buyPrice(gold: 2); + break; + case 4677: + this.DefaultTokite(846); + break; + case 4678: + this.DefaultToWhip(847, 55, 2f, 4f); + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 4, silver: 60)); + break; + case 4679: + this.DefaultToWhip(848, 180, 11f, 4f, 45); + this.SetShopValues(ItemRarityColor.Yellow8, Item.sellPrice(gold: 6)); + this.crit = 10; + break; + case 4680: + this.DefaultToWhip(849, 100, 3f, 4f); + this.SetShopValues(ItemRarityColor.Yellow8, Item.sellPrice(gold: 10)); + break; + case 4681: + this.DefaultTokite(850); + this.value = Item.buyPrice(gold: 2); + break; + case 4682: + this.width = 20; + this.height = 24; + this.DefaultToThrownWeapon(851, 25, 4f); + this.value = Item.buyPrice(silver: 1); + this.ranged = false; + this.noUseGraphic = true; + break; + case 4683: + this.DefaultTokite(852); + break; + case 4684: + this.DefaultTokite(853); + break; + case 4685: + this.width = 18; + this.height = 18; + this.headSlot = 231; + this.vanity = true; + this.value = Item.buyPrice(gold: 10); + break; + case 4686: + this.width = 18; + this.height = 18; + this.bodySlot = 219; + this.vanity = true; + this.value = Item.buyPrice(gold: 10); + break; + case 4687: + case 4688: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 295 + (type - 4687); + this.width = 10; + this.height = 24; + this.value = 1000; + this.rare = 1; + break; + case 4689: + case 4690: + case 4691: + case 4692: + case 4693: + case 4694: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 215; + this.placeStyle = 8 + type - 4689; + this.width = 12; + this.height = 12; + break; + case 4695: + case 4696: + case 4697: + case 4698: + case 4699: + case 4700: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 572; + this.placeStyle = type - 4695; + this.width = 12; + this.height = 28; + if (type >= 4695 && type <= 4697) + { + this.value = 1000; + break; + } + this.value = 40000; + break; + case 4701: + this.DefaultToVanitypet(854, 264); + this.SetShopValues(ItemRarityColor.Orange3, Item.buyPrice(gold: 50)); + break; + case 4702: + this.width = 20; + this.height = 24; + this.DefaultToThrownWeapon(855, 25, 4f); + this.value = Item.buyPrice(silver: 1); + this.ranged = false; + this.noUseGraphic = true; + break; + case 4703: + this.DefaultToRangedWeapon(14, AmmoID.Bullet, 45, 7f); + this.knockBack = 6.5f; + this.width = 50; + this.height = 14; + this.UseSound = SoundID.Item36; + this.damage = 24; + this.value = Item.buyPrice(gold: 35); + this.rare = 3; + break; + case 4704: + this.width = 18; + this.height = 18; + this.headSlot = 233; + this.vanity = true; + this.value = Item.buyPrice(gold: 10); + break; + case 4705: + this.width = 18; + this.height = 18; + this.bodySlot = 220; + this.vanity = true; + this.value = Item.buyPrice(gold: 10); + break; + case 4706: + this.width = 18; + this.height = 18; + this.legSlot = 197; + this.vanity = true; + this.value = Item.buyPrice(gold: 10); + break; + case 4707: + this.width = 44; + this.height = 44; + this.rare = 2; + this.value = Item.buyPrice(gold: 10); + this.holdStyle = 2; + this.useStyle = 3; + this.useAnimation = 22; + this.useTime = 22; + this.damage = 15; + this.knockBack = 5f; + this.UseSound = SoundID.Item1; + this.melee = true; + break; + case 4708: + this.width = 18; + this.height = 18; + this.headSlot = 234; + this.vanity = true; + this.value = Item.buyPrice(gold: 10); + break; + case 4709: + this.width = 18; + this.height = 18; + this.bodySlot = 221; + this.vanity = true; + this.value = Item.buyPrice(gold: 10); + break; + case 4710: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 573; + this.width = 28; + this.height = 28; + break; + case 4711: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 22; + this.useTime = 14; + this.autoReuse = true; + this.width = 24; + this.height = 28; + this.damage = 12; + this.UseSound = SoundID.Item1; + this.knockBack = 3.5f; + this.rare = 1; + this.value = Item.sellPrice(silver: 10); + this.melee = true; + break; + case 4712: + this.DefaultToPlacableTile((ushort) 467, 12); + this.SetShopValues(ItemRarityColor.White0, Item.buyPrice(silver: 25)); + this.maxStack = 99; + this.width = 26; + this.height = 22; + break; + case 4713: + this.DefaultToPlacableTile((ushort) 468, 12); + this.SetShopValues(ItemRarityColor.White0, Item.buyPrice(silver: 5)); + this.maxStack = 99; + this.width = 26; + this.height = 22; + break; + case 4714: + this.width = 14; + this.height = 20; + this.maxStack = 99; + this.rare = 8; + break; + case 4715: + this.SetShopValues(ItemRarityColor.Pink5, Item.buyPrice(gold: 50)); + this.DefaultToGuitar(); + this.useAnimation = this.useTime = 12; + this.useTime /= 2; + this.shoot = 856; + this.damage = 75; + this.magic = true; + this.shootSpeed = 1f; + this.crit = 20; + this.mana = 12; + this.noMelee = true; + break; + case 4716: + this.useStyle = 4; + this.channel = true; + this.width = 34; + this.height = 34; + this.UseSound = SoundID.Item43; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 8; + this.noMelee = true; + this.mountType = 37; + this.value = Item.buyPrice(gold: 20); + break; + case 4717: + case 4718: + case 4719: + case 4720: + case 4721: + this.DefaultToPlacableTile(574 + type - 4717); + break; + case 4722: + this.useStyle = 5; + this.width = 24; + this.height = 24; + this.noUseGraphic = true; + this.UseSound = SoundID.Item1; + this.autoReuse = true; + this.melee = true; + this.channel = true; + this.noMelee = true; + this.shoot = 857; + this.useAnimation = 35; + this.useTime = this.useAnimation / 5; + this.shootSpeed = 16f; + this.damage = 190; + this.knockBack = 6.5f; + this.value = Item.sellPrice(gold: 20); + this.crit = 10; + this.rare = 10; + this.glowMask = (short) 271; + break; + case 4723: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 20); + this.placeStyle = 70; + break; + case 4724: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 20); + this.placeStyle = 71; + break; + case 4725: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 242; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 20); + this.placeStyle = 44; + break; + case 4726: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 245; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 20); + this.placeStyle = 10; + break; + case 4727: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 245; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 20); + this.placeStyle = 11; + break; + case 4728: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 245; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 20); + this.placeStyle = 12; + break; + case 4729: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 246; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(silver: 20); + this.placeStyle = 20; + break; + case 4730: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 9; + this.wingSlot = (sbyte) 40; + this.value = 400000; + break; + case 4731: + this.DefaultToPlacableTile((ushort) 497, 39); + this.maxStack = 99; + this.value = 150; + this.rare = 8; + break; + case 4732: + this.width = 18; + this.height = 18; + this.headSlot = 235; + this.rare = 9; + this.vanity = true; + this.value = Item.sellPrice(gold: 5); + break; + case 4733: + this.width = 18; + this.height = 18; + this.bodySlot = 222; + this.rare = 9; + this.vanity = true; + this.value = Item.sellPrice(gold: 5); + break; + case 4734: + this.width = 18; + this.height = 18; + this.legSlot = 203; + this.rare = 9; + this.vanity = true; + this.value = Item.sellPrice(gold: 5); + break; + case 4735: + this.DefaultToVanitypet(858, 266); + this.value = Item.buyPrice(gold: 50); + break; + case 4736: + this.DefaultToVanitypet(859, 267); + this.value = Item.buyPrice(gold: 30); + break; + case 4737: + this.DefaultToVanitypet(860, 268); + break; + case 4738: + this.width = 18; + this.height = 18; + this.headSlot = 236; + this.rare = 2; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4739: + this.width = 18; + this.height = 18; + this.bodySlot = 223; + this.rare = 2; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4740: + this.width = 18; + this.height = 18; + this.headSlot = 237; + this.rare = 2; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4741: + this.width = 18; + this.height = 18; + this.bodySlot = 224; + this.rare = 2; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4742: + this.width = 18; + this.height = 18; + this.legSlot = 205; + this.rare = 2; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4743: + this.useStyle = 1; + this.shootSpeed = 11f; + this.shoot = 861; + this.damage = 0; + this.width = 10; + this.height = 10; + this.maxStack = 1; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 20; + break; + case 4744: + this.DefaultToAccessory(26, 36); + this.backSlot = (sbyte) 24; + this.frontSlot = (sbyte) 8; + this.SetShopValues(ItemRarityColor.Pink5, Item.sellPrice(gold: 3)); + this.vanity = true; + break; + case 4745: + this.DefaultToMount(38); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(silver: 2)); + break; + case 4746: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 9; + this.wingSlot = (sbyte) 41; + this.value = 400000; + break; + case 4747: + this.width = 18; + this.height = 18; + this.headSlot = 238; + this.rare = 9; + this.vanity = true; + this.value = Item.sellPrice(gold: 5); + break; + case 4748: + this.width = 18; + this.height = 18; + this.bodySlot = 225; + this.rare = 9; + this.vanity = true; + this.value = Item.sellPrice(gold: 5); + break; + case 4749: + this.width = 18; + this.height = 18; + this.legSlot = 208; + this.rare = 9; + this.vanity = true; + this.value = Item.sellPrice(gold: 5); + break; + case 4750: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 9; + this.wingSlot = (sbyte) 42; + this.value = 400000; + break; + case 4751: + this.width = 18; + this.height = 18; + this.headSlot = 239; + this.rare = 9; + this.vanity = true; + this.value = Item.sellPrice(gold: 5); + break; + case 4752: + this.width = 18; + this.height = 18; + this.bodySlot = 226; + this.rare = 9; + this.vanity = true; + this.value = Item.sellPrice(gold: 5); + break; + case 4753: + this.width = 18; + this.height = 18; + this.legSlot = 209; + this.rare = 9; + this.vanity = true; + this.value = Item.sellPrice(gold: 5); + break; + case 4754: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 9; + this.wingSlot = (sbyte) 43; + this.value = 400000; + break; + case 4755: + this.width = 18; + this.height = 18; + this.headSlot = 240; + this.rare = 9; + this.vanity = true; + this.value = Item.sellPrice(gold: 5); + break; + case 4756: + this.width = 18; + this.height = 18; + this.bodySlot = 227; + this.rare = 9; + this.vanity = true; + this.value = Item.sellPrice(gold: 5); + break; + case 4757: + this.width = 18; + this.height = 18; + this.legSlot = 210; + this.rare = 9; + this.vanity = true; + this.value = Item.sellPrice(gold: 5); + break; + case 4758: + this.mana = 10; + this.damage = 6; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 864; + this.buffType = 271; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item113; + this.useAnimation = 36; + this.useTime = 36; + this.rare = 5; + this.noMelee = true; + this.knockBack = 0.0f; + this.value = Item.sellPrice(gold: 1); + this.summon = true; + break; + case 4759: + this.noUseGraphic = true; + this.damage = 0; + this.knockBack = 7f; + this.useStyle = 5; + this.shootSpeed = 11.5f; + this.shoot = 865; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 1; + this.noMelee = true; + this.value = 20000; + break; + case 4760: + this.damage = 60; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 866; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 36; + this.useTime = 36; + this.rare = 5; + this.noMelee = true; + this.value = Item.buyPrice(gold: 35); + this.melee = true; + this.noUseGraphic = true; + break; + case 4761: + this.width = 12; + this.height = 12; + this.headSlot = 241; + this.rare = 3; + this.vanity = true; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 579; + break; + case 4762: + this.width = 24; + this.height = 24; + this.accessory = true; + this.vanity = true; + this.rare = 1; + this.value = Item.buyPrice(gold: 10); + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 4763: + this.DefaultToMount(39); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 50)); + break; + case 4764: + this.noMelee = true; + this.useStyle = 1; + this.shootSpeed = 10.5f; + this.shoot = 867; + this.damage = 14; + this.knockBack = 7f; + this.width = 14; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.rare = 1; + this.value = 30000; + this.melee = true; + break; + case 4765: + case 4766: + this.DefaultToThrownWeapon(type - 4765 + 868, 20, 8f); + this.UseSound = SoundID.Item106; + this.SetShopValues(ItemRarityColor.Green2, Item.buyPrice(gold: 3)); + break; + case 4767: + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 5)); + this.width = 30; + this.height = 30; + break; + case 4768: + this.width = 18; + this.height = 18; + this.headSlot = 242; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + break; + case 4769: + this.DefaultToAccessory(18, 18); + this.backSlot = (sbyte) 25; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + break; + case 4770: + this.width = 18; + this.height = 18; + this.headSlot = 243; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + break; + case 4771: + this.DefaultToAccessory(18, 18); + this.backSlot = (sbyte) 26; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + break; + case 4772: + this.width = 18; + this.height = 18; + this.headSlot = 244; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + break; + case 4773: + this.DefaultToAccessory(18, 18); + this.backSlot = (sbyte) 27; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + break; + case 4774: + this.width = 18; + this.height = 18; + this.headSlot = 245; + this.rare = 1; + this.vanity = true; + this.value = Item.sellPrice(silver: 50); + break; + case 4775: + this.DefaultToAccessory(18, 18); + this.backSlot = (sbyte) 28; + this.rare = 1; + this.vanity = true; + this.value = Item.buyPrice(gold: 3); + break; + case 4776: + this.color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + this.useStyle = 1; + this.shootSpeed = 6f; + this.shoot = 870; + this.width = 12; + this.height = 12; + this.maxStack = 999; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noMelee = true; + this.rare = 1; + this.value = Item.buyPrice(copper: 75); + this.holdStyle = 1; + break; + case 4777: + this.DefaultToVanitypet(875, 274); + this.value = Item.buyPrice(gold: 50); + break; + case 4779: + this.width = 18; + this.height = 18; + this.headSlot = 250; + this.rare = 1; + this.vanity = true; + break; + case 4780: + this.width = 18; + this.height = 18; + this.bodySlot = 228; + this.rare = 1; + this.vanity = true; + break; + case 4781: + this.width = 18; + this.height = 18; + this.legSlot = 211; + this.rare = 1; + this.vanity = true; + break; + case 4782: + this.maxStack = 999; + this.consumable = true; + this.width = 24; + this.height = 24; + this.rare = 6; + this.expert = true; + break; + case 4783: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.rare = 1; + this.placeStyle = 72; + break; + case 4784: + this.width = 18; + this.height = 18; + this.headSlot = 251; + this.rare = 1; + this.value = Item.sellPrice(silver: 75); + this.vanity = true; + break; + case 4785: + case 4786: + case 4787: + this.useStyle = 4; + this.channel = true; + this.width = 34; + this.height = 34; + this.UseSound = SoundID.Item76; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 8; + this.noMelee = true; + this.mountType = 40 + (type - 4785); + this.value = Item.sellPrice(gold: 5); + break; + case 4788: + this.DefaultToSpear(877, 3.5f, 24); + this.SetWeaponValues(56, 12f); + this.SetShopValues(ItemRarityColor.LightRed4, Item.buyPrice(gold: 6)); + this.channel = true; + break; + case 4789: + this.DefaultToSpear(878, 3.5f, 24); + this.SetWeaponValues(108, 14f); + this.SetShopValues(ItemRarityColor.Yellow8, Item.sellPrice(gold: 10)); + this.channel = true; + break; + case 4790: + this.DefaultToSpear(879, 3.5f, 24); + this.SetWeaponValues(78, 13f); + this.SetShopValues(ItemRarityColor.Pink5, 230000); + this.channel = true; + break; + case 4791: + this.useStyle = 4; + this.channel = true; + this.width = 10; + this.height = 32; + this.UseSound = SoundID.Item25; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 8; + this.noMelee = true; + this.noUseGraphic = true; + this.mountType = 43; + this.value = Item.sellPrice(gold: 5); + break; + case 4792: + case 4793: + case 4794: + case 4795: + case 4796: + this.useStyle = 4; + this.channel = true; + this.width = 10; + this.height = 32; + this.UseSound = SoundID.Item25; + this.useAnimation = 20; + this.useTime = 20; + this.rare = -13; + this.noMelee = true; + this.noUseGraphic = true; + this.mountType = 44 + type - 4792; + this.value = Item.sellPrice(gold: 5); + break; + case 4797: + case 4798: + case 4799: + case 4800: + case 4801: + case 4802: + case 4803: + case 4804: + case 4805: + case 4806: + case 4807: + case 4808: + case 4809: + case 4810: + case 4811: + case 4812: + case 4813: + case 4814: + case 4815: + case 4816: + case 4817: + this.DefaultToVanitypet(881 + type - 4797, 284 + type - 4797); + this.value = Item.buyPrice(gold: 25); + this.rare = -13; + break; + case 4818: + this.noMelee = true; + this.useStyle = 1; + this.shootSpeed = 8.5f; + this.shoot = 902; + this.damage = 25; + this.knockBack = 3.5f; + this.width = 14; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.rare = 2; + this.value = Item.sellPrice(silver: 50); + this.melee = true; + break; + case 4819: + this.useTurn = true; + this.width = 20; + this.height = 20; + this.useStyle = 4; + this.useTime = 90; + this.UseSound = SoundID.Item6; + this.useAnimation = 90; + this.SetShopValues(ItemRarityColor.LightRed4, Item.buyPrice(gold: 5)); + break; + case 4820: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 12; + this.useTime = 5; + this.width = 20; + this.height = 20; + this.autoReuse = true; + this.rare = 7; + this.value = Item.sellPrice(gold: 10); + this.tileBoost += 2; + break; + case 4821: + this.useTurn = true; + this.useStyle = 1; + this.useAnimation = 21; + this.width = 24; + this.height = 28; + this.UseSound = SoundID.Item1; + this.value = Item.sellPrice(gold: 5); + this.autoReuse = true; + this.rare = 3; + this.scale = 0.85f; + break; + case 4822: + this.DefaultToAccessory(34, 30); + this.shoeSlot = (sbyte) 22; + this.SetShopValues(ItemRarityColor.Orange3, Item.sellPrice(gold: 2)); + this.vanity = true; + break; + case 4823: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 9; + this.wingSlot = (sbyte) 44; + this.value = Item.buyPrice(gold: 40); + break; + case 4824: + case 4825: + case 4826: + case 4827: + this.useStyle = 1; + this.shootSpeed = 5f; + this.shoot = 903 + (type - 4824); + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.UseSound = SoundID.Item1; + this.consumable = true; + this.useAnimation = 25; + this.noUseGraphic = true; + this.useTime = 25; + this.value = Item.sellPrice(silver: 5); + this.rare = 1; + break; + case 4828: + this.useStyle = 4; + this.channel = true; + this.width = 10; + this.height = 32; + this.UseSound = SoundID.Item25; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 8; + this.noMelee = true; + this.noUseGraphic = true; + this.mountType = 49; + this.value = Item.sellPrice(gold: 5); + break; + case 4829: + case 4830: + this.useStyle = 4; + this.consumable = true; + this.useAnimation = 45; + this.useTime = 45; + this.UseSound = SoundID.Item92; + this.width = 28; + this.height = 28; + this.maxStack = 20; + this.SetShopValues(ItemRarityColor.Green2, Item.buyPrice(gold: 5)); + break; + case 4831: + case 4832: + case 4833: + case 4834: + case 4835: + case 4836: + case 4837: + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.noUseGraphic = true; + this.value = Item.sellPrice(silver: 10); + this.makeNPC = (short) (639 + (type - 4831)); + break; + case 4838: + case 4839: + case 4840: + case 4841: + case 4842: + case 4843: + case 4844: + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.noUseGraphic = true; + this.value = Item.sellPrice(silver: 10); + this.makeNPC = (short) (646 + (type - 4838)); + break; + case 4845: + this.DefaultToCapturedCritter((short) 653); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(silver: 20)); + this.width = 12; + this.height = 12; + this.bait = 15; + break; + case 4846: + this.DefaultToPlacableTile((ushort) 580, 0); + this.maxStack = 99; + break; + case 4847: + this.DefaultToCapturedCritter((short) 654); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(silver: 20)); + this.width = 12; + this.height = 12; + this.bait = 25; + break; + case 4848: + this.DefaultToPlacableTile((ushort) 581, 0); + this.maxStack = 99; + break; + case 4849: + this.DefaultToCapturedCritter((short) 655); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(silver: 50)); + this.width = 12; + this.height = 12; + this.bait = 35; + break; + case 4850: + this.DefaultToPlacableTile((ushort) 582, 0); + this.maxStack = 99; + break; + case 4851: + this.DefaultToPlacableTile((ushort) 590, 0); + this.value = Item.sellPrice(silver: 7, copper: 50); + break; + case 4852: + this.DefaultToPlacableTile((ushort) 590, 1); + this.value = Item.sellPrice(silver: 3, copper: 75); + break; + case 4853: + this.DefaultToPlacableTile((ushort) 590, 2); + this.value = Item.sellPrice(silver: 11, copper: 25); + break; + case 4854: + this.DefaultToPlacableTile((ushort) 590, 3); + this.value = Item.sellPrice(silver: 15); + break; + case 4855: + this.DefaultToPlacableTile((ushort) 590, 4); + this.value = Item.sellPrice(silver: 22, copper: 50); + break; + case 4856: + this.DefaultToPlacableTile((ushort) 590, 5); + this.value = Item.sellPrice(silver: 30); + break; + case 4857: + this.DefaultToPlacableTile((ushort) 590, 6); + this.value = Item.sellPrice(silver: 30); + break; + case 4858: + case 4859: + case 4860: + case 4861: + case 4862: + case 4863: + case 4864: + case 4865: + case 4866: + this.DefaultToPlacableTile((ushort) 591, type - 4858); + this.value = Item.sellPrice(silver: 25); + break; + case 4867: + this.DefaultToPlacableTile((ushort) 592, 0); + this.value = Item.sellPrice(silver: 25); + break; + case 4868: + case 4869: + this.DefaultToPlacableTile(593 + (type - 4868)); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 2)); + break; + case 4870: + this.UseSound = SoundID.Item6; + this.useStyle = 6; + this.useTurn = true; + this.useTime = this.useAnimation = 30; + this.maxStack = 30; + this.consumable = true; + this.width = 14; + this.height = 24; + this.value = 1000; + this.rare = 1; + break; + case 4871: + this.DefaultToPlacableTile((ushort) 595, 0); + this.value = Item.buyPrice(gold: 3); + break; + case 4872: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 12; + this.useTime = 5; + this.width = 20; + this.height = 20; + this.autoReuse = true; + this.rare = 7; + this.value = Item.sellPrice(gold: 10); + this.tileBoost += 2; + break; + case 4873: + this.width = 18; + this.height = 18; + this.defense = 1; + this.headSlot = 254; + this.rare = 5; + this.value = 250000; + break; + case 4874: + this.DefaultToAccessory(34, 30); + this.shoeSlot = (sbyte) 23; + this.SetShopValues(ItemRarityColor.Lime7, Item.sellPrice(gold: 12)); + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 4875: + this.DefaultToPlacableTile((ushort) 597, 1); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 10)); + break; + case 4876: + this.DefaultToPlacableTile((ushort) 597, 0); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 10)); + break; + case 4877: + case 4878: + this.DefaultToPlacableTile((ushort) 376, 22 + type - 4877); + this.SetShopValues(ItemRarityColor.Green2, Item.sellPrice(gold: 1)); + this.maxStack = 99; + break; + case 4879: + this.width = 12; + this.height = 12; + this.rare = 2; + this.maxStack = 99; + this.value = Item.buyPrice(gold: 2); + break; + case 4880: + this.DefaultToPlacableTile((ushort) 598, 0); + this.maxStack = 99; + this.width = 20; + this.height = 20; + this.value = Item.sellPrice(silver: 20); + break; + case 4881: + this.DefaultToAccessory(34, 30); + this.SetShopValues(ItemRarityColor.Lime7, Item.sellPrice(gold: 2)); + break; + case 4882: + case 4883: + case 4884: + case 4885: + case 4886: + case 4887: + case 4888: + case 4889: + case 4890: + case 4891: + case 4892: + case 4893: + case 4894: + case 4895: + this.DefaultToPlacableTile(599 + (type - 4882)); + this.maxStack = 99; + break; + case 4896: + this.width = 18; + this.height = 18; + this.defense = 24; + this.headSlot = (int) byte.MaxValue; + this.rare = 5; + this.value = 250000; + break; + case 4897: + this.width = 18; + this.height = 18; + this.defense = 9; + this.headSlot = 256; + this.rare = 5; + this.value = 250000; + break; + case 4898: + this.width = 18; + this.height = 18; + this.defense = 5; + this.headSlot = 257; + this.rare = 5; + this.value = 250000; + break; + case 4899: + this.width = 18; + this.height = 18; + this.defense = 1; + this.headSlot = 258; + this.rare = 5; + this.value = 250000; + break; + case 4900: + this.width = 18; + this.height = 18; + this.defense = 15; + this.bodySlot = 229; + this.rare = 5; + this.value = 200000; + break; + case 4901: + this.width = 18; + this.height = 18; + this.defense = 11; + this.legSlot = 212; + this.rare = 5; + this.value = 150000; + break; + case 4902: + this.DefaultToPlacableTile((ushort) 548, 7); + this.SetShopValues(ItemRarityColor.Orange3, Item.buyPrice(gold: 3)); + break; + case 4903: + this.DefaultToPlacableTile((ushort) 548, 8); + this.SetShopValues(ItemRarityColor.Orange3, Item.buyPrice(gold: 3)); + break; + case 4904: + this.DefaultToPlacableTile((ushort) 613, 0); + this.SetShopValues(ItemRarityColor.Orange3, Item.buyPrice(gold: 3)); + break; + case 4905: + this.DefaultToPlacableTile((ushort) 613, 1); + this.SetShopValues(ItemRarityColor.Orange3, Item.buyPrice(gold: 3)); + break; + case 4906: + this.DefaultToPlacableTile((ushort) 614, 0); + this.SetShopValues(ItemRarityColor.Orange3, Item.buyPrice(gold: 3)); + break; + case 4907: + this.DefaultToPlacableTile((ushort) 615, 0); + this.value = Item.buyPrice(gold: 3); + break; + case 4908: + case 4909: + this.useStyle = 1; + this.shootSpeed = 5f; + this.shoot = 910 + (type - 4908); + this.width = 20; + this.height = 20; + this.maxStack = 99; + this.UseSound = SoundID.Item1; + this.consumable = true; + this.useAnimation = 25; + this.noUseGraphic = true; + this.useTime = 25; + this.value = Item.sellPrice(silver: 1); + this.rare = 1; + break; + case 4910: + this.useStyle = 4; + this.consumable = true; + this.useAnimation = 45; + this.useTime = 45; + this.UseSound = SoundID.Item92; + this.width = 28; + this.height = 28; + this.maxStack = 20; + this.SetShopValues(ItemRarityColor.Green2, Item.buyPrice(gold: 5)); + break; + case 4911: + this.DefaultToWhip(912, 50, 1.5f, 4f); + this.SetShopValues(ItemRarityColor.LightRed4, Item.sellPrice(gold: 4)); + break; + case 4912: + this.DefaultToWhip(913, 40, 2f, 4f); + this.SetShopValues(ItemRarityColor.LightRed4, Item.sellPrice(gold: 3)); + break; + case 4913: + this.DefaultToWhip(914, 18, 1f, 4f); + this.SetShopValues(ItemRarityColor.Orange3, Item.sellPrice(gold: 1)); + break; + case 4914: + this.DefaultToWhip(915, 165, 4f, 4f); + this.SetShopValues(ItemRarityColor.Yellow8, Item.sellPrice(gold: 5)); + break; + case 4915: + this.shootSpeed = 4.5f; + this.shoot = 14; + this.damage = 9; + this.width = 8; + this.height = 8; + this.maxStack = 999; + this.consumable = true; + this.ammo = AmmoID.Bullet; + this.knockBack = 4f; + this.value = 18; + this.ranged = true; + break; + case 4916: + this.DefaultToPlacableTile((ushort) 597, 2); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 10)); + break; + case 4917: + this.DefaultToPlacableTile((ushort) 597, 3); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 10)); + break; + case 4918: + this.DefaultToPlacableTile((ushort) 597, 4); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 10)); + break; + case 4919: + this.DefaultToPlacableTile((ushort) 597, 5); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 10)); + break; + case 4920: + this.DefaultToPlacableTile((ushort) 597, 6); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 10)); + break; + case 4921: + this.DefaultToPlacableTile((ushort) 597, 7); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 10)); + break; + case 4922: + this.DefaultToPlacableTile((ushort) 207, 8); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 4)); + this.width = 8; + this.height = 10; + break; + case 4923: + this.width = 14; + this.height = 38; + this.rare = 8; + this.noUseGraphic = true; + this.channel = true; + this.noMelee = true; + this.damage = 70; + this.knockBack = 4f; + this.autoReuse = false; + this.noMelee = true; + this.melee = true; + this.shoot = 927; + this.shootSpeed = 15f; + this.value = Item.sellPrice(gold: 5); + this.useStyle = 13; + this.useAnimation = 18; + this.useTime = 6; + break; + case 4924: + case 4925: + case 4926: + case 4927: + case 4928: + case 4929: + case 4930: + case 4931: + case 4932: + case 4933: + case 4934: + case 4935: + case 4936: + case 4937: + case 4938: + case 4939: + case 4940: + case 4941: + case 4942: + case 4943: + case 4944: + case 4945: + case 4946: + case 4947: + case 4948: + case 4949: + case 4950: + this.DefaultToPlacableTile((ushort) 617, type - 4924); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 5)); + this.rare = -13; + this.maxStack = 99; + break; + case 4951: + this.DefaultToPlacableTile((ushort) 597, 8); + this.SetShopValues(ItemRarityColor.Cyan9, Item.buyPrice(1)); + break; + case 4952: + this.autoReuse = true; + this.useStyle = 14; + this.holdStyle = 6; + this.scale = 0.7f; + this.useAnimation = 36; + this.useTime = 2; + this.width = 36; + this.height = 22; + this.shoot = 931; + this.mana = 26; + this.UseSound = SoundID.Item82; + this.knockBack = 2.5f; + this.damage = 50; + this.shootSpeed = 17f; + this.noMelee = true; + this.rare = 8; + this.magic = true; + this.value = Item.sellPrice(gold: 5); + this.flame = true; + break; + case 4953: + this.useStyle = 5; + this.autoReuse = true; + this.useAnimation = 30; + this.useTime = 2; + this.width = 50; + this.height = 18; + this.shoot = 1; + this.useAmmo = AmmoID.Arrow; + this.UseSound = SoundID.Item5; + this.damage = 50; + this.shootSpeed = 10f; + this.noMelee = true; + this.value = Item.sellPrice(gold: 5); + this.ranged = true; + this.rare = 8; + this.knockBack = 2f; + break; + case 4954: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 9; + this.wingSlot = (sbyte) 45; + this.value = Item.sellPrice(gold: 10); + this.expert = true; + break; + case 4955: + this.width = 18; + this.height = 18; + this.headSlot = 259; + this.value = Item.buyPrice(gold: 15); + this.rare = 5; + this.vanity = true; + break; + case 4956: + this.useStyle = 1; + this.width = 24; + this.height = 24; + this.UseSound = SoundID.Item169; + this.autoReuse = true; + this.melee = true; + this.melee = true; + this.shoot = 933; + this.useAnimation = 30; + this.useTime = this.useAnimation / 3; + this.shootSpeed = 16f; + this.damage = 190; + this.knockBack = 6.5f; + this.value = Item.sellPrice(gold: 20); + this.crit = 10; + this.rare = 10; + this.noUseGraphic = true; + this.noMelee = true; + break; + case 4957: + this.maxStack = 999; + this.consumable = true; + this.width = 24; + this.height = 24; + this.rare = 6; + this.expert = true; + break; + case 4958: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 240; + this.width = 30; + this.height = 30; + this.value = Item.sellPrice(gold: 1); + this.rare = 1; + this.placeStyle = 73; + break; + case 4959: + this.width = 18; + this.height = 18; + this.headSlot = 260; + this.rare = 1; + this.value = Item.sellPrice(silver: 75); + this.vanity = true; + break; + case 4960: + this.DefaultToVanitypet(934, 317); + this.value = Item.buyPrice(gold: 25); + this.rare = -13; + break; + case 4961: + this.DefaultToCapturedCritter((short) 661); + this.SetShopValues(ItemRarityColor.Orange3, Item.sellPrice(gold: 5)); + this.width = 12; + this.height = 12; + break; + case 4962: + this.DefaultToPlacableTile((ushort) 618, 0); + break; + case 4963: + this.DefaultToPlacableTile((ushort) 619, 0); + this.maxStack = 99; + break; + case 4964: + this.DefaultToPlacableTile((ushort) 620, 0); + this.maxStack = 99; + break; + case 4965: + case 4966: + case 4967: + case 4968: + case 4969: + case 4970: + case 4971: + case 4972: + case 4973: + case 4974: + case 4975: + case 4976: + case 4977: + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.maxStack = 99; + this.consumable = true; + this.createTile = 91; + this.placeStyle = 297 + (type - 4965); + this.width = 10; + this.height = 24; + this.value = 1000; + this.rare = 1; + break; + case 4978: + this.width = 24; + this.height = 8; + this.accessory = true; + this.rare = 0; + this.wingSlot = (sbyte) 46; + this.value = 2000; + break; + case 4979: + this.DefaultToMusicBox(52); + break; + case 4980: + this.noUseGraphic = true; + this.damage = 0; + this.knockBack = 7f; + this.useStyle = 5; + this.shootSpeed = 4f; + this.shoot = 935; + this.width = 18; + this.height = 28; + this.UseSound = SoundID.Item1; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 5; + this.noMelee = true; + this.value = Item.sellPrice(gold: 5); + break; + case 4981: + this.useStyle = 4; + this.channel = true; + this.width = 10; + this.height = 32; + this.UseSound = SoundID.Item25; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 8; + this.noMelee = true; + this.noUseGraphic = true; + this.mountType = 50; + this.value = Item.sellPrice(gold: 5); + break; + case 4982: + this.width = 18; + this.height = 18; + this.defense = 12; + this.headSlot = 261; + this.rare = 5; + this.value = Item.sellPrice(gold: 2); + break; + case 4983: + this.width = 18; + this.height = 18; + this.defense = 14; + this.bodySlot = 230; + this.rare = 5; + this.value = Item.sellPrice(gold: 2); + break; + case 4984: + this.width = 18; + this.height = 18; + this.defense = 10; + this.legSlot = 213; + this.rare = 5; + this.value = Item.sellPrice(gold: 2); + break; + case 4985: + this.DefaultToMusicBox(53); + break; + case 4986: + this.useStyle = 1; + this.shootSpeed = 9f; + this.shoot = 936; + this.width = 18; + this.height = 20; + this.maxStack = 99; + this.consumable = true; + this.UseSound = SoundID.Item1; + this.useAnimation = 15; + this.useTime = 15; + this.noUseGraphic = true; + this.noMelee = true; + this.value = 200; + break; + case 4987: + this.width = 16; + this.height = 24; + this.accessory = true; + this.rare = 6; + this.value = Item.sellPrice(gold: 5); + this.expert = true; + break; + case 4988: + this.useStyle = 4; + this.width = 20; + this.height = 20; + this.consumable = true; + this.useAnimation = 45; + this.useTime = 45; + this.maxStack = 20; + this.rare = 6; + this.value = Item.sellPrice(gold: 1); + break; + case 4989: + this.width = 22; + this.height = 22; + this.accessory = true; + this.rare = 1; + this.value = Item.sellPrice(gold: 10); + this.expert = true; + break; + case 4990: + this.DefaultToMusicBox(54); + break; + case 4991: + this.DefaultToMusicBox(55); + break; + case 4992: + this.DefaultToMusicBox(56); + break; + case 4993: + this.DefaultToPlacableTile((ushort) 89, 43); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(silver: 50)); + this.maxStack = 99; + this.width = 20; + this.height = 20; + this.rare = 9; + break; + case 4994: + this.width = 18; + this.height = 14; + this.headSlot = 262; + this.rare = 2; + this.value = Item.buyPrice(gold: 10); + this.vanity = true; + break; + case 4995: + this.width = 18; + this.height = 14; + this.headSlot = 263; + this.rare = 2; + this.value = Item.buyPrice(gold: 10); + this.vanity = true; + break; + case 4996: + this.width = 18; + this.height = 14; + this.headSlot = 264; + this.rare = 2; + this.value = Item.buyPrice(gold: 10); + this.vanity = true; + break; + case 4997: + this.width = 18; + this.height = 14; + this.vanity = true; + this.bodySlot = 231; + this.value = Item.buyPrice(gold: 10); + this.rare = 2; + break; + case 4998: + this.width = 18; + this.height = 14; + this.vanity = true; + this.bodySlot = 232; + this.value = Item.buyPrice(gold: 10); + this.rare = 2; + break; + case 4999: + this.width = 18; + this.height = 14; + this.vanity = true; + this.bodySlot = 233; + this.value = Item.buyPrice(gold: 10); + this.rare = 2; + break; + case 5000: + this.DefaultToAccessory(34, 30); + this.shoeSlot = (sbyte) 24; + this.SetShopValues(ItemRarityColor.Lime7, Item.sellPrice(gold: 15)); + this.canBePlacedInVanityRegardlessOfConditions = true; + break; + case 5001: + this.width = 18; + this.height = 14; + this.defense = 3; + this.legSlot = 217; + this.value = Item.buyPrice(gold: 10); + this.rare = 2; + break; + case 5002: + case 5003: + this.DefaultToPlacableTile((ushort) 376, 24 + type - 5002); + this.SetShopValues(ItemRarityColor.Green2, Item.sellPrice(gold: 1)); + this.maxStack = 99; + break; + case 5004: + this.width = 18; + this.height = 14; + this.headSlot = 265; + this.rare = 9; + this.value = Item.sellPrice(silver: 30); + this.vanity = true; + break; + case 5005: + this.mana = 10; + this.damage = 90; + this.useStyle = 1; + this.shootSpeed = 10f; + this.shoot = 946; + this.buffType = 322; + this.width = 26; + this.height = 28; + this.UseSound = SoundID.Item113; + this.useAnimation = 36; + this.useTime = 36; + this.rare = 5; + this.noMelee = true; + this.knockBack = 4f; + this.value = Item.sellPrice(gold: 20); + this.summon = true; + break; + case 5006: + this.DefaultToMusicBox(57); + break; + case 5007: + this.width = 18; + this.height = 18; + this.bodySlot = 234; + this.rare = 2; + this.value = Item.sellPrice(silver: 20); + this.vanity = true; + break; + case 5008: + this.DefaultToPlacableTile((ushort) 622, 0); + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(silver: 2)); + break; + case 5010: + this.DefaultToAccessory(34, 30); + this.waistSlot = (sbyte) 16; + this.SetShopValues(ItemRarityColor.Blue1, Item.sellPrice(gold: 5)); + break; + case 5011: + case 5012: + this.noMelee = true; + this.useStyle = 5; + this.useAnimation = 45; + this.useTime = 45; + this.knockBack = 4.6f; + this.width = 28; + this.height = 28; + this.damage = 9; + this.scale = 1f; + this.noUseGraphic = true; + this.shoot = 947; + if (type == 5012) + this.shoot = 948; + this.shootSpeed = 11f; + this.UseSound = SoundID.Item1; + this.rare = 1; + this.value = Item.sellPrice(gold: 2); + this.melee = true; + this.channel = true; + break; + case 5014: + this.DefaultToMusicBox(58); + break; + case 5015: + this.DefaultToMusicBox(59); + break; + case 5016: + this.DefaultToMusicBox(60); + break; + case 5017: + this.DefaultToMusicBox(61); + break; + case 5018: + this.DefaultToMusicBox(62); + break; + case 5019: + this.DefaultToMusicBox(63); + break; + case 5020: + this.DefaultToMusicBox(64); + break; + case 5021: + this.DefaultToMusicBox(65); + break; + case 5022: + this.DefaultToMusicBox(66); + break; + case 5023: + this.DefaultToMusicBox(67); + break; + case 5024: + this.DefaultToMusicBox(68); + break; + case 5025: + this.DefaultToMusicBox(69); + break; + case 5026: + this.DefaultToMusicBox(70); + break; + case 5027: + this.DefaultToMusicBox(71); + break; + case 5028: + this.DefaultToMusicBox(72); + break; + case 5029: + this.DefaultToMusicBox(73); + break; + case 5030: + this.DefaultToMusicBox(74); + break; + case 5031: + this.DefaultToMusicBox(75); + break; + case 5032: + this.DefaultToMusicBox(76); + break; + case 5033: + this.DefaultToMusicBox(77); + break; + case 5034: + this.DefaultToMusicBox(78); + break; + case 5035: + this.DefaultToMusicBox(79); + break; + case 5036: + this.DefaultToMusicBox(80); + break; + case 5037: + this.DefaultToMusicBox(81); + break; + case 5038: + this.DefaultToMusicBox(82); + break; + case 5039: + this.DefaultToMusicBox(83); + break; + case 5040: + this.DefaultToMusicBox(84); + break; + case 5043: + this.maxStack = 99; + this.consumable = true; + this.width = 18; + this.height = 18; + this.useStyle = 4; + this.useTime = 30; + this.UseSound = SoundID.Item4; + this.useAnimation = 30; + this.rare = 4; + this.value = Item.sellPrice(gold: 2); + break; + case 5044: + this.DefaultToMusicBox(85); + break; + } + } + + private void DefaultToWhip( + int projectileId, + int dmg, + float kb, + float shootspeed, + int animationTotalTime = 30) + { + this.autoReuse = false; + this.useStyle = 1; + this.useAnimation = animationTotalTime; + this.useTime = animationTotalTime; + this.width = 18; + this.height = 18; + this.shoot = projectileId; + this.UseSound = SoundID.Item152; + this.noMelee = true; + this.summon = true; + this.noUseGraphic = true; + this.damage = dmg; + this.knockBack = kb; + this.shootSpeed = shootspeed; + } + + public void DefaultTokite(int projId) + { + this.width = 20; + this.height = 28; + this.DefaultToThrownWeapon(projId, 30, 2f); + this.consumable = false; + this.ranged = false; + this.noUseGraphic = true; + this.maxStack = 1; + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 2)); + } + + public void DefaultToVanitypet(int projId, int buffID) + { + this.damage = 0; + this.useStyle = 1; + this.width = 16; + this.height = 30; + this.UseSound = SoundID.Item2; + this.useAnimation = 20; + this.useTime = 20; + this.rare = 3; + this.noMelee = true; + this.value = Item.sellPrice(gold: 2); + this.buffType = buffID; + this.shoot = projId; + } + + public bool IsACoin + { + get + { + switch (this.type) + { + case 71: + case 72: + case 73: + case 74: + return true; + default: + return false; + } + } + } + + public static bool IsAGolfingItem(Item item) + { + if (ProjectileID.Sets.IsAGolfBall[item.shoot]) + return true; + int type = item.type; + switch (type) + { + case 4039: + case 4092: + case 4093: + case 4094: + case 4095: + return true; + default: + if ((uint) (type - 4587) > 11U) + return false; + goto case 4039; + } + } + + private void DefaultToSeaShelll() + { + this.useStyle = 1; + this.autoReuse = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.createTile = 324; + this.width = 22; + this.height = 22; + switch (this.type) + { + case 2626: + this.placeStyle = 1; + this.value = Item.sellPrice(silver: 10); + break; + case 4071: + this.placeStyle = 4; + this.value = Item.sellPrice(gold: 1); + break; + case 4072: + this.placeStyle = 2; + this.value = Item.sellPrice(silver: 20); + break; + case 4073: + this.placeStyle = 3; + this.value = Item.sellPrice(silver: 20); + break; + default: + this.value = Item.sellPrice(silver: 5); + break; + } + } + + private void DefaultToCapturedCritter(short npcIdToSpawnOnUse) + { + this.useStyle = 1; + this.autoReuse = true; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.consumable = true; + this.width = 12; + this.height = 12; + this.noUseGraphic = true; + this.makeNPC = npcIdToSpawnOnUse; + } + + private void DefaultToStaff( + int projType, + float pushForwardSpeed, + int singleShotTime, + int manaPerShot) + { + this.DefaultToMagicWeapon(projType, singleShotTime, pushForwardSpeed, true); + this.mana = manaPerShot; + this.width = 40; + this.height = 40; + this.UseSound = SoundID.Item43; + } + + private void DefaultToSpear(int projType, float pushForwardSpeed, int animationTime) + { + this.useStyle = 5; + this.useAnimation = 31; + this.useTime = 31; + this.shootSpeed = pushForwardSpeed; + this.width = 32; + this.height = 32; + this.UseSound = SoundID.Item1; + this.shoot = projType; + this.noMelee = true; + this.noUseGraphic = true; + this.melee = true; + this.useAnimation = this.useTime = animationTime; + } + + private void SetFoodDefaults(int type) + { + switch (type) + { + case 353: + this.DefaultToFood(22, 22, 25, 7200, true); + this.SetShopValues(ItemRarityColor.White0, 100); + this.maxStack = 99; + this.holdStyle = 1; + this.ammo = 353; + this.notAmmo = true; + break; + case 357: + this.DefaultToFood(22, 22, 206, 28800, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 967: + this.DefaultToFood(12, 12, 26, 3600); + this.SetShopValues(ItemRarityColor.White0, Item.buyPrice(silver: 1)); + this.useStyle = 9; + break; + case 969: + this.DefaultToFood(12, 12, 26, 36000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(silver: 2)); + this.useStyle = 9; + break; + case 1787: + this.DefaultToFood(22, 22, 206, 28800); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(silver: 10)); + break; + case 1911: + this.DefaultToFood(22, 22, 207, 14400, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(silver: 10)); + break; + case 1912: + this.DefaultToHealingPotion(22, 22, 80); + this.SetShopValues(ItemRarityColor.Blue1, 40); + break; + case 1919: + this.DefaultToFood(22, 22, 207, 14400); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(silver: 25)); + break; + case 1920: + this.DefaultToFood(22, 22, 207, 14400); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(silver: 25)); + break; + case 2266: + this.DefaultToFood(22, 22, 25, 14400, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(silver: 5)); + break; + case 2267: + this.DefaultToFood(22, 22, 206, 28800); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(silver: 30)); + break; + case 2268: + this.DefaultToFood(22, 22, 206, 36000, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(silver: 50)); + break; + case 2425: + this.DefaultToFood(22, 22, 26, 28800); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(silver: 25)); + break; + case 2426: + this.DefaultToFood(22, 22, 206, 36000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(silver: 75)); + break; + case 2427: + this.DefaultToFood(22, 22, 206, 28800); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(silver: 25)); + break; + case 3195: + this.DefaultToFood(22, 22, 206, 36000, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 3532: + this.DefaultToFood(22, 22, 207, 86400); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 5)); + break; + case 4009: + this.DefaultToFood(22, 22, 26, 18000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4011: + this.DefaultToFood(22, 22, 207, 57600); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 3)); + break; + case 4012: + this.DefaultToFood(22, 22, 206, 36000, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4013: + this.DefaultToFood(22, 22, 207, 86400); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 5)); + break; + case 4014: + this.DefaultToFood(22, 22, 26, 36000, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4015: + this.DefaultToFood(22, 22, 207, 28800); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 2)); + break; + case 4016: + this.DefaultToFood(22, 22, 206, 50400); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 2)); + break; + case 4017: + this.DefaultToFood(22, 22, 206, 72000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 3)); + break; + case 4018: + this.DefaultToFood(22, 22, 206, 57600, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 2)); + break; + case 4019: + this.DefaultToFood(22, 22, 206, 36000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4020: + this.DefaultToFood(22, 22, 206, 50400); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 2)); + break; + case 4021: + this.DefaultToFood(22, 22, 206, 36000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4022: + this.DefaultToFood(22, 22, 207, 172800); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 50)); + break; + case 4023: + this.DefaultToFood(22, 22, 206, 57600); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 2)); + break; + case 4024: + this.DefaultToFood(22, 22, 26, 36000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4025: + this.DefaultToFood(22, 22, 206, 72000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 3)); + break; + case 4026: + this.DefaultToFood(22, 22, 206, 50400, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 2)); + break; + case 4027: + this.DefaultToFood(22, 22, 207, 57600, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 3)); + break; + case 4028: + this.DefaultToFood(22, 22, 206, 57600); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 2)); + break; + case 4029: + this.DefaultToFood(22, 22, 207, 28800); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 2)); + break; + case 4030: + this.DefaultToFood(22, 22, 26, 64800); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1, silver: 50)); + break; + case 4031: + this.DefaultToFood(22, 22, 26, 36000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4032: + this.DefaultToFood(22, 22, 206, 36000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4033: + this.DefaultToFood(22, 22, 206, 36000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4034: + this.DefaultToFood(22, 22, 207, 14400); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(silver: 50)); + break; + case 4035: + this.DefaultToFood(22, 22, 206, 64800); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 2, silver: 50)); + break; + case 4036: + this.DefaultToFood(22, 22, 207, 28800); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 2)); + break; + case 4037: + this.DefaultToFood(22, 22, 207, 57600); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 3)); + break; + case 4282: + this.DefaultToFood(22, 22, 26, 18000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4283: + this.DefaultToFood(22, 22, 26, 18000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4284: + this.DefaultToFood(22, 22, 26, 18000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4285: + this.DefaultToFood(22, 22, 26, 18000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4286: + this.DefaultToFood(22, 22, 26, 18000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4287: + this.DefaultToFood(22, 22, 26, 18000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4288: + this.DefaultToFood(22, 22, 206, 18000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4289: + this.DefaultToFood(22, 22, 26, 18000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4290: + this.DefaultToFood(22, 22, 26, 18000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4291: + this.DefaultToFood(22, 22, 26, 18000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4292: + this.DefaultToFood(22, 22, 26, 18000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4293: + this.DefaultToFood(22, 22, 26, 18000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4294: + this.DefaultToFood(22, 22, 26, 18000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4295: + this.DefaultToFood(22, 22, 26, 18000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4296: + this.DefaultToFood(22, 22, 26, 18000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4297: + this.DefaultToFood(22, 22, 206, 18000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4403: + this.DefaultToFood(22, 22, 206, 36000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4411: + this.DefaultToFood(22, 22, 26, 36000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4614: + this.DefaultToFood(22, 22, 26, 36000, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4615: + this.DefaultToFood(22, 22, 207, 57600, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 4)); + break; + case 4616: + this.DefaultToFood(22, 22, 26, 36000, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4617: + this.DefaultToFood(22, 22, 26, 54000, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4618: + this.DefaultToFood(22, 22, 26, 36000, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 4619: + this.DefaultToFood(22, 22, 26, 72000, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 2)); + break; + case 4620: + this.DefaultToFood(22, 22, 26, 72000, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 2)); + break; + case 4621: + this.DefaultToFood(22, 22, 26, 72000, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 2)); + break; + case 4622: + this.DefaultToFood(22, 22, 26, 72000, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 2)); + break; + case 4623: + this.DefaultToFood(22, 22, 206, 72000, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 2)); + break; + case 4624: + this.DefaultToFood(22, 22, 26, 54000, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 2)); + break; + case 4625: + this.DefaultToFood(22, 22, 26, 90000); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 3)); + break; + case 5009: + this.DefaultToFood(22, 22, 26, 18000, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(copper: 20)); + break; + case 5041: + this.DefaultToFood(22, 22, 26, 54000, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + case 5042: + this.DefaultToFood(22, 22, 206, 36000, true); + this.SetShopValues(ItemRarityColor.Blue1, Item.buyPrice(gold: 1)); + break; + } + float num = 0.0f; + this.rare = (int) ((double) ((this.buffType != 207 ? (this.buffType != 206 ? num + 3f : num + 8f) : num + 12f) + (float) (this.buffTime / 14400)) / 4.0); + } + + private void DefaultToMount(int mount) + { + this.width = 36; + this.height = 26; + this.mountType = mount; + } + + private void DefaultToPlacableWall(ushort wallToPlace) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 7; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createWall = (int) wallToPlace; + this.width = 12; + this.height = 12; + } + + private void SetWeaponValues(int dmg, float knockback, int bonusCritChance = 0) + { + this.damage = dmg; + this.knockBack = knockback; + this.crit = bonusCritChance; + } + + private void DefaultToBow(int singleShotTime, float shotVelocity, bool hasAutoReuse = false) + { + this.DefaultToRangedWeapon(1, AmmoID.Arrow, singleShotTime, shotVelocity, hasAutoReuse); + this.width = 14; + this.height = 30; + this.UseSound = SoundID.Item5; + } + + private void DefaultToMagicWeapon( + int projType, + int singleShotTime, + float shotVelocity, + bool hasAutoReuse = false) + { + this.autoReuse = hasAutoReuse; + this.useStyle = 5; + this.useAnimation = singleShotTime; + this.useTime = singleShotTime; + this.shoot = projType; + this.shootSpeed = shotVelocity; + this.noMelee = true; + this.magic = true; + } + + private void DefaultToRangedWeapon( + int baseProjType, + int ammoID, + int singleShotTime, + float shotVelocity, + bool hasAutoReuse = false) + { + this.autoReuse = hasAutoReuse; + this.useStyle = 5; + this.useAnimation = singleShotTime; + this.useTime = singleShotTime; + this.shoot = baseProjType; + this.useAmmo = ammoID; + this.shootSpeed = shotVelocity; + this.noMelee = true; + this.ranged = true; + } + + private void DefaultToThrownWeapon( + int baseProjType, + int singleShotTime, + float shotVelocity, + bool hasAutoReuse = false) + { + this.autoReuse = hasAutoReuse; + this.useStyle = 1; + this.useAnimation = singleShotTime; + this.useTime = singleShotTime; + this.shoot = baseProjType; + this.shootSpeed = shotVelocity; + this.noMelee = true; + this.ranged = true; + this.consumable = true; + this.maxStack = 999; + } + + private void DefaultToTorch(int tileStyleToPlace, bool allowWaterPlacement = false) + { + this.flame = true; + this.noWet = !allowWaterPlacement; + this.holdStyle = 1; + this.autoReuse = true; + this.maxStack = 999; + this.consumable = true; + this.createTile = 4; + this.placeStyle = tileStyleToPlace; + this.width = 10; + this.height = 12; + this.value = 60; + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + } + + private void DefaultToPlacableTile(int tileIDToPlace, int tileStyleToPlace = 0) => this.DefaultToPlacableTile((ushort) tileIDToPlace, tileStyleToPlace); + + private void DefaultToPlacableTile(ushort tileIDToPlace, int tileStyleToPlace = 0) + { + this.createTile = (int) tileIDToPlace; + this.placeStyle = tileStyleToPlace; + this.width = 14; + this.height = 14; + this.useStyle = 1; + this.useAnimation = 15; + this.useTime = 10; + this.maxStack = 999; + this.useTurn = true; + this.autoReuse = true; + this.consumable = true; + } + + private void DefaultToGolfClub(int newwidth, int newheight) + { + this.width = newwidth; + this.height = newheight; + this.channel = true; + this.useStyle = 8; + this.holdStyle = 4; + this.shootSpeed = 6f; + this.shoot = 722; + this.UseSound = (LegacySoundStyle) null; + this.useAnimation = this.useTime = 12; + this.noMelee = true; + } + + private void DefaultToLawnMower(int newwidth, int newheight) + { + this.width = newwidth; + this.height = newheight; + this.holdStyle = 1; + this.useStyle = 11; + this.useAnimation = 30; + this.useTime = 10; + this.UseSound = SoundID.Item23; + this.autoReuse = true; + } + + private void DefaultToFood( + int newwidth, + int newheight, + int foodbuff, + int foodbuffduration, + bool useGulpSound = false, + int animationTime = 17) + { + this.UseSound = !useGulpSound ? SoundID.Item2 : SoundID.Item3; + this.useStyle = !useGulpSound ? 2 : 9; + this.useTurn = true; + this.useAnimation = this.useTime = animationTime; + this.maxStack = 30; + this.consumable = true; + this.width = newwidth; + this.height = newheight; + this.buffType = foodbuff; + this.buffTime = foodbuffduration; + this.rare = 1; + this.value = Item.buyPrice(silver: 20); + } + + private void DefaultToHealingPotion( + int newwidth, + int newheight, + int healingAmount, + int animationTime = 17) + { + this.UseSound = SoundID.Item3; + this.useStyle = 9; + this.useTurn = true; + this.useAnimation = this.useTime = animationTime; + this.maxStack = 30; + this.consumable = true; + this.width = newwidth; + this.height = newheight; + this.rare = 1; + this.value = Item.buyPrice(silver: 20); + this.potion = true; + this.healLife = healingAmount; + } + + private void SetShopValues(ItemRarityColor rarity, int coinValue) + { + this.rare = (int) rarity; + this.value = coinValue; + } + + private void DefaultToHeadgear(int newwidth, int newheight, int helmetArtID) + { + this.width = newwidth; + this.height = newheight; + this.headSlot = helmetArtID; + } + + private void DefaultToAccessory(int newwidth = 24, int newheight = 24) + { + this.width = newwidth; + this.height = newheight; + this.accessory = true; + } + + private void DefaultToGuitar(int newwidth = 24, int newheight = 24) + { + this.width = newwidth; + this.height = newheight; + this.autoReuse = true; + this.holdStyle = 5; + this.useStyle = 12; + this.useAnimation = this.useTime = 12; + } + + private void DefaultToMusicBox(int style) + { + this.useStyle = 1; + this.useTurn = true; + this.useAnimation = 15; + this.useTime = 10; + this.autoReuse = true; + this.consumable = true; + this.createTile = 139; + this.placeStyle = style; + this.width = 24; + this.height = 24; + this.rare = 4; + this.value = 100000; + this.accessory = true; + this.canBePlacedInVanityRegardlessOfConditions = true; + } + + public void SetDefaults(int Type = 0) => this.SetDefaults(Type, false); + + public void SetDefaults(int Type, bool noMatCheck = false) + { + if (Type < 0) + { + this.netDefaults(Type); + } + else + { + this.playerIndexTheItemIsReservedFor = Main.netMode == 1 || Main.netMode == 2 ? (int) byte.MaxValue : Main.myPlayer; + this.ResetStats(Type); + if (this.type >= 5045) + this.type = 0; + if (this.type == 0) + { + this.netID = 0; + this.stack = 0; + } + else if (ItemID.Sets.IsFood[this.type]) + this.SetFoodDefaults(this.type); + else if (this.type <= 1000) + this.SetDefaults1(this.type); + else if (this.type <= 2001) + this.SetDefaults2(this.type); + else if (this.type <= 3000) + this.SetDefaults3(this.type); + else if (this.type <= 3989) + this.SetDefaults4(this.type); + else + this.SetDefaults5(this.type); + this.dye = (byte) GameShaders.Armor.GetShaderIdFromItemId(this.type); + if (this.hairDye != (short) 0) + this.hairDye = GameShaders.Hair.GetShaderIdFromItemId(this.type); + if (this.type == 2015) + this.value = Item.sellPrice(silver: 5); + if (this.type == 2016) + this.value = Item.sellPrice(silver: 7, copper: 50); + if (this.type == 2017) + this.value = Item.sellPrice(silver: 7, copper: 50); + if (this.type == 2019) + this.value = Item.sellPrice(silver: 5); + if (this.type == 2018) + this.value = Item.sellPrice(silver: 5); + if (this.type == 3563) + this.value = Item.sellPrice(silver: 5); + if (this.type == 261) + this.value = Item.sellPrice(silver: 7, copper: 50); + if (this.type == 2205) + this.value = Item.sellPrice(silver: 12, copper: 50); + if (this.type == 2123) + this.value = Item.sellPrice(silver: 7, copper: 50); + if (this.type == 2122) + this.value = Item.sellPrice(silver: 7, copper: 50); + if (this.type == 2003) + this.value = Item.sellPrice(silver: 10); + if (this.type == 2156) + this.value = Item.sellPrice(silver: 15); + if (this.type == 2157) + this.value = Item.sellPrice(silver: 15); + if (this.type == 2121) + this.value = Item.sellPrice(silver: 15); + if (this.type == 1992) + this.value = Item.sellPrice(silver: 3); + if (this.type == 2004) + this.value = Item.sellPrice(silver: 5); + if (this.type == 2002) + this.value = Item.sellPrice(silver: 5); + if (this.type == 2740) + this.value = Item.sellPrice(silver: 2, copper: 50); + if (this.type == 2006) + this.value = Item.sellPrice(silver: 10); + if (this.type == 3191) + this.value = Item.sellPrice(silver: 20); + if (this.type == 3192) + this.value = Item.sellPrice(silver: 2, copper: 50); + if (this.type == 3193) + this.value = Item.sellPrice(silver: 5); + if (this.type == 3194) + this.value = Item.sellPrice(silver: 10); + if (this.type == 2007) + this.value = Item.sellPrice(silver: 50); + if (this.type == 2673) + this.value = Item.sellPrice(gold: 10); + if (this.bait > 0) + { + if (this.bait >= 50) + this.rare = 3; + else if (this.bait >= 30) + this.rare = 2; + else if (this.bait >= 15) + this.rare = 1; + } + if (this.type >= 1994 && this.type <= 2001) + { + int num = this.type - 1994; + if (num == 0) + this.value = Item.sellPrice(silver: 5); + if (num == 4) + this.value = Item.sellPrice(silver: 10); + if (num == 6) + this.value = Item.sellPrice(silver: 15); + if (num == 3) + this.value = Item.sellPrice(silver: 20); + if (num == 7) + this.value = Item.sellPrice(silver: 30); + if (num == 2) + this.value = Item.sellPrice(silver: 40); + if (num == 1) + this.value = Item.sellPrice(silver: 75); + if (num == 5) + this.value = Item.sellPrice(gold: 1); + } + if (this.type == 2663 || this.type == 1720 || this.type == 2137 || this.type == 2155 || this.type == 2151 || this.type == 1704 || this.type == 2143 || this.type == 1710 || this.type == 2238 || this.type == 2133 || this.type == 2147 || this.type == 2405 || this.type == 1716 || this.type == 1705) + this.value = Item.sellPrice(gold: 2); + if (Main.projHook[this.shoot]) + { + this.useStyle = 0; + this.useTime = 0; + this.useAnimation = 0; + } + if (ItemID.Sets.IsDrill[this.type] || ItemID.Sets.IsChainsaw[this.type]) + { + this.useTime = (int) ((double) this.useTime * 0.6); + if (this.useTime < 1) + this.useTime = 1; + this.useAnimation = (int) ((double) this.useAnimation * 0.6); + if (this.useAnimation < 1) + this.useAnimation = 1; + --this.tileBoost; + } + if (ItemID.Sets.IsFood[this.type]) + this.holdStyle = 1; + if (this.type >= 1803 && this.type <= 1807) + this.SetDefaults(1533 + this.type - 1803); + if (this.dye > (byte) 0) + this.maxStack = 99; + if (this.createTile == 19) + this.maxStack = 999; + this.netID = this.type; + if (!noMatCheck) + this.material = ItemID.Sets.IsAMaterial[this.type]; + this.RebuildTooltip(); + if (this.type <= 0 || this.type >= 5045 || !ItemID.Sets.Deprecated[this.type]) + return; + this.netID = 0; + this.type = 0; + this.stack = 0; + } + } + + public void ResetStats(int Type) + { + this.tooltipContext = -1; + this.BestiaryNotes = (string) null; + this.sentry = false; + this.canBePlacedInVanityRegardlessOfConditions = false; + this.DD2Summon = false; + this.shopSpecialCurrency = -1; + this.shopCustomPrice = new int?(); + this.expert = false; + this.isAShopItem = false; + this.expertOnly = false; + this.instanced = false; + this.questItem = false; + this.fishingPole = 0; + this.bait = 0; + this.hairDye = (short) -1; + this.makeNPC = (short) 0; + this.dye = (byte) 0; + this.paint = (byte) 0; + this.tileWand = -1; + this.notAmmo = false; + this.netID = 0; + this.prefix = (byte) 0; + this.crit = 0; + this.mech = false; + this.flame = false; + this.reuseDelay = 0; + this.melee = false; + this.magic = false; + this.ranged = false; + this.summon = false; + this.placeStyle = 0; + this.buffTime = 0; + this.buffType = 0; + this.mountType = -1; + this.cartTrack = false; + this.material = false; + this.noWet = false; + this.vanity = false; + this.mana = 0; + this.wet = false; + this.wetCount = (byte) 0; + this.lavaWet = false; + this.channel = false; + this.manaIncrease = 0; + this.timeSinceTheItemHasBeenReservedForSomeone = 0; + this.noMelee = false; + this.noUseGraphic = false; + this.lifeRegen = 0; + this.shootSpeed = 0.0f; + this.active = true; + this.alpha = 0; + this.ammo = AmmoID.None; + this.useAmmo = AmmoID.None; + this.autoReuse = false; + this.accessory = false; + this.axe = 0; + this.healMana = 0; + this.bodySlot = -1; + this.legSlot = -1; + this.headSlot = -1; + this.potion = false; + this.color = new Color(); + this.glowMask = (short) -1; + this.consumable = false; + this.createTile = -1; + this.createWall = -1; + this.damage = -1; + this.defense = 0; + this.hammer = 0; + this.healLife = 0; + this.holdStyle = 0; + this.knockBack = 0.0f; + this.maxStack = 1; + this.pick = 0; + this.rare = 0; + this.scale = 1f; + this.shoot = 0; + this.stack = 1; + this.ToolTip = (ItemTooltip) null; + this.tileBoost = 0; + this.useStyle = 0; + this.UseSound = (LegacySoundStyle) null; + this.useTime = 100; + this.useAnimation = 100; + this.value = 0; + this.useTurn = false; + this.buy = false; + this.handOnSlot = (sbyte) -1; + this.handOffSlot = (sbyte) -1; + this.backSlot = (sbyte) -1; + this.frontSlot = (sbyte) -1; + this.shoeSlot = (sbyte) -1; + this.waistSlot = (sbyte) -1; + this.wingSlot = (sbyte) -1; + this.shieldSlot = (sbyte) -1; + this.neckSlot = (sbyte) -1; + this.faceSlot = (sbyte) -1; + this.balloonSlot = (sbyte) -1; + this.uniqueStack = false; + this.favorited = false; + this.type = Type; + } + + public Color GetAlpha(Color newColor) + { + int type = this.type; + if (type <= 1572) + { + if (type <= 549) + { + if (type <= 184) + { + if (type <= 58) + { + if (type == 51) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + if (type == 58) + goto label_64; + else + goto label_92; + } + else if (type != 75) + { + if ((uint) (type - 119) > 3U) + { + if (type == 184) + goto label_64; + else + goto label_92; + } + } + else + goto label_59; + } + else if (type <= 501) + { + if ((uint) (type - 198) <= 5U) + return Color.White; + if ((uint) (type - 217) > 3U) + { + if (type == 501) + return new Color(200, 200, 200, 50); + goto label_92; + } + } + else + { + if (type == 502) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 150); + if ((uint) (type - 520) <= 2U || (uint) (type - 547) <= 2U) + goto label_63; + else + goto label_92; + } + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + } + if (type <= 1306) + { + if (type <= 757) + { + if (type != 575) + { + if (type == 757) + goto label_62; + else + goto label_92; + } + else + goto label_63; + } + else + { + if (type == 787) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 175); + if (type == 1260) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 175); + if (type == 1306) + goto label_62; + else + goto label_92; + } + } + else + { + if (type <= 1507) + { + if (type != 1332) + { + if (type != 1446 && (uint) (type - 1506) > 1U) + goto label_92; + } + else + goto label_63; + } + else + { + if (type == 1508) + return new Color(200, 200, 200, 0); + if ((uint) (type - 1543) > 2U) + { + if (type == 1572) + return new Color(200, 200, (int) byte.MaxValue, 125); + goto label_92; + } + } + return new Color((int) newColor.R, (int) newColor.G, (int) newColor.B, (int) Main.gFade); + } + } + else + { + if (type <= 3522) + { + if (type <= 2786) + { + if (type <= 1826) + { + if ((uint) (type - 1734) > 1U) + { + if (type == 1826) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 200); + goto label_92; + } + else + goto label_64; + } + else if ((uint) (type - 1867) > 1U) + { + if ((uint) (type - 2763) > 2U && (uint) (type - 2782) > 4U) + goto label_92; + } + else + goto label_64; + } + else if (type <= 3332) + { + if (type != 3065) + { + if (type == 3191) + return new Color(250, 250, 250, 200); + if ((uint) (type - 3318) <= 14U) + goto label_56; + else + goto label_92; + } + else + goto label_58; + } + else if ((uint) (type - 3453) > 2U) + { + if ((uint) (type - 3456) > 3U) + { + if (type != 3522) + goto label_92; + } + else + goto label_62; + } + else + goto label_63; + return new Color(250, 250, 250, (int) byte.MaxValue - this.alpha); + } + if (type <= 4354) + { + if (type <= 3858) + { + if (type != 3580) + { + if (type == 3822) + return Color.Lerp(Color.White, newColor, 0.5f) * (float) (((double) byte.MaxValue - (double) this.alpha) / (double) byte.MaxValue); + if (type == 3858) + goto label_59; + else + goto label_92; + } + else + goto label_63; + } + else if ((uint) (type - 3860) > 2U) + { + if (type == 4143) + return Color.Lerp(Color.White, newColor, 0.0f) * (float) (((double) byte.MaxValue - (double) this.alpha) / (double) byte.MaxValue); + if (type != 4354) + goto label_92; + } + else + goto label_56; + } + else if (type <= 4782) + { + if ((uint) (type - 4377) > 1U && type != 4389) + { + if (type == 4782) + goto label_56; + else + goto label_92; + } + } + else if (type != 4956) + { + if (type != 4957) + { + if (type == 5043) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) newColor.A - this.alpha); + goto label_92; + } + else + goto label_56; + } + else + goto label_58; + Color color = new Color(); + switch (this.type) + { + case 4377: + color = new Color(50, (int) byte.MaxValue, 50, 200); + break; + case 4378: + color = new Color(50, 200, (int) byte.MaxValue, (int) byte.MaxValue); + break; + case 4389: + color = new Color((int) byte.MaxValue, 50, 125, 200); + break; + default: + color = new Color((int) byte.MaxValue, 150, 150, 200); + break; + } + if ((int) newColor.R > (int) color.R) + color.R = newColor.R; + if ((int) newColor.G > (int) color.G) + color.G = newColor.G; + if ((int) newColor.B > (int) color.B) + color.B = newColor.B; + if ((int) newColor.A > (int) color.A) + color.A = newColor.A; + return color; +label_56: + return Color.Lerp(newColor, Color.White, 0.4f); +label_58: + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) newColor.A - this.alpha); + } +label_59: + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); +label_62: + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 200); +label_63: + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 50); +label_64: + return new Color(200, 200, 200, 200); +label_92: + float num1 = (float) ((int) byte.MaxValue - this.alpha) / (float) byte.MaxValue; + int r = (int) ((double) newColor.R * (double) num1); + int num2 = (int) ((double) newColor.G * (double) num1); + int num3 = (int) ((double) newColor.B * (double) num1); + int num4 = (int) newColor.A - this.alpha; + if (num4 < 0) + num4 = 0; + if (num4 > (int) byte.MaxValue) + num4 = (int) byte.MaxValue; + int g = num2; + int b = num3; + int a = num4; + return new Color(r, g, b, a); + } + + public Color GetColor(Color newColor) + { + int r = (int) this.color.R - ((int) byte.MaxValue - (int) newColor.R); + int g = (int) this.color.G - ((int) byte.MaxValue - (int) newColor.G); + int b = (int) this.color.B - ((int) byte.MaxValue - (int) newColor.B); + int a = (int) this.color.A - ((int) byte.MaxValue - (int) newColor.A); + if (r < 0) + r = 0; + if (r > (int) byte.MaxValue) + r = (int) byte.MaxValue; + if (g < 0) + g = 0; + if (g > (int) byte.MaxValue) + g = (int) byte.MaxValue; + if (b < 0) + b = 0; + if (b > (int) byte.MaxValue) + b = (int) byte.MaxValue; + if (a < 0) + a = 0; + if (a > (int) byte.MaxValue) + a = (int) byte.MaxValue; + return new Color(r, g, b, a); + } + + public static bool MechSpawn(float x, float y, int type) + { + int num1 = 0; + int num2 = 0; + int num3 = 0; + for (int index = 0; index < 200; ++index) + { + if (Main.item[index].active && Main.item[index].type == type) + { + ++num1; + Vector2 vector2 = new Vector2(x, y); + double num4 = (double) Main.item[index].position.X - (double) vector2.X; + float num5 = Main.item[index].position.Y - vector2.Y; + double num6 = Math.Sqrt(num4 * num4 + (double) num5 * (double) num5); + if (num6 < 300.0) + ++num2; + if (num6 < 800.0) + ++num3; + } + } + return num2 < 3 && num3 < 6 && num1 < 10; + } + + public static int buyPrice(int platinum = 0, int gold = 0, int silver = 0, int copper = 0) => copper + silver * 100 + gold * 100 * 100 + platinum * 100 * 100 * 100; + + public static int sellPrice(int platinum = 0, int gold = 0, int silver = 0, int copper = 0) => (copper + silver * 100 + gold * 100 * 100 + platinum * 100 * 100 * 100) * 5; + + public void UpdateItem(int i) + { + if (Main.timeItemSlotCannotBeReusedFor[i] > 0) + { + if (Main.netMode == 2) + { + --Main.timeItemSlotCannotBeReusedFor[i]; + return; + } + Main.timeItemSlotCannotBeReusedFor[i] = 0; + } + if (!this.active) + return; + if (this.instanced) + { + if (Main.netMode == 2) + { + this.active = false; + return; + } + this.keepTime = 6000; + this.ownTime = 0; + this.noGrabDelay = 0; + this.playerIndexTheItemIsReservedFor = Main.myPlayer; + } + if (Main.netMode == 0) + this.playerIndexTheItemIsReservedFor = Main.myPlayer; + float gravity = 0.1f; + float maxFallSpeed = 7f; + if (Main.netMode == 1) + { + int index1 = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int index2 = (int) ((double) this.position.Y + (double) (this.height / 2)) / 16; + if (index1 >= 0 && index2 >= 0 && index1 < Main.maxTilesX && index2 < Main.maxTilesY && Main.tile[index1, index2] == null) + { + gravity = 0.0f; + this.velocity.X = 0.0f; + this.velocity.Y = 0.0f; + } + } + if (this.honeyWet) + { + gravity = 0.05f; + maxFallSpeed = 3f; + } + else if (this.wet) + { + maxFallSpeed = 5f; + gravity = 0.08f; + } + if (this.ownTime > 0) + --this.ownTime; + else + this.ownIgnore = -1; + if (this.keepTime > 0) + --this.keepTime; + Vector2 wetVelocity = this.velocity * 0.5f; + if (!this.beingGrabbed) + { + this.TryCombiningIntoNearbyItems(i); + if (Main.netMode != 2 && Main.expertMode && this.playerIndexTheItemIsReservedFor == Main.myPlayer && this.type >= 71 && this.type <= 74) + this.GetPickedUpByMonsters(i); + this.MoveInWorld(gravity, maxFallSpeed, ref wetVelocity); + if (this.lavaWet) + this.CheckLavaDeath(i); + this.DespawnIfMeetingConditions(i); + } + else + this.beingGrabbed = false; + this.UpdateItem_VisualEffects(); + if (this.timeSinceItemSpawned < 2147483547) + this.timeSinceItemSpawned += ItemID.Sets.ItemSpawnDecaySpeed[this.type]; + if (Main.netMode == 2 && this.playerIndexTheItemIsReservedFor != Main.myPlayer) + { + ++this.timeSinceTheItemHasBeenReservedForSomeone; + if (this.timeSinceTheItemHasBeenReservedForSomeone >= 300) + { + this.timeSinceTheItemHasBeenReservedForSomeone = 0; + NetMessage.SendData(39, this.playerIndexTheItemIsReservedFor, number: i); + } + } + if (this.wet) + this.position = this.position + wetVelocity; + else + this.position = this.position + this.velocity; + if (this.noGrabDelay <= 0) + return; + --this.noGrabDelay; + } + + private void DespawnIfMeetingConditions(int i) + { + if (this.type == 75 && Main.dayTime) + { + for (int index = 0; index < 10; ++index) + Dust.NewDust(this.position, this.width, this.height, 15, this.velocity.X, this.velocity.Y, 150, Scale: 1.2f); + for (int index = 0; index < 3; ++index) + Gore.NewGore(this.position, new Vector2(this.velocity.X, this.velocity.Y), Main.rand.Next(16, 18)); + this.active = false; + this.type = 0; + this.stack = 0; + if (Main.netMode == 2) + NetMessage.SendData(21, number: i); + } + if (this.type == 4143 && this.timeSinceItemSpawned > 300) + { + for (int index = 0; index < 20; ++index) + Dust.NewDust(this.position, this.width, this.height, 15, this.velocity.X, this.velocity.Y, 150, Color.Lerp(Color.CornflowerBlue, Color.Indigo, Main.rand.NextFloat()), 1.2f); + this.active = false; + this.type = 0; + this.stack = 0; + if (Main.netMode == 2) + NetMessage.SendData(21, number: i); + } + if (this.type != 3822 || DD2Event.Ongoing) + return; + int num = Main.rand.Next(18, 24); + for (int index1 = 0; index1 < num; ++index1) + { + int index2 = Dust.NewDust(this.Center, 0, 0, 61, Scale: 1.7f); + Main.dust[index2].velocity *= 8f; + --Main.dust[index2].velocity.Y; + Main.dust[index2].position = Vector2.Lerp(Main.dust[index2].position, this.Center, 0.5f); + Main.dust[index2].noGravity = true; + Main.dust[index2].noLight = true; + } + this.active = false; + this.type = 0; + this.stack = 0; + if (Main.netMode != 2) + return; + NetMessage.SendData(21, number: i); + } + + public void TryCombiningIntoNearbyItems(int i) + { + bool flag = true; + switch (this.type) + { + case 71: + case 72: + case 73: + case 74: + flag = false; + break; + } + if (ItemID.Sets.NebulaPickup[this.type]) + flag = false; + if (!(this.playerIndexTheItemIsReservedFor == Main.myPlayer & flag)) + return; + this.CombineWithNearbyItems(i); + } + + private void CheckLavaDeath(int i) + { + if (this.type == 267) + { + if (Main.netMode == 1) + return; + this.active = false; + this.type = 0; + this.stack = 0; + for (int number = 0; number < 200; ++number) + { + if (Main.npc[number].active && Main.npc[number].type == 22) + { + if (Main.netMode == 2) + NetMessage.SendData(28, number: number, number2: 9999f, number3: 10f, number4: ((float) -Main.npc[number].direction)); + Main.npc[number].StrikeNPCNoInteraction(9999, 10f, -Main.npc[number].direction); + NPC.SpawnWOF(this.position); + } + } + NetMessage.SendData(21, number: i); + } + else + { + if (this.playerIndexTheItemIsReservedFor != Main.myPlayer || this.type == 312 || this.type == 318 || this.type == 173 || this.type == 174 || this.type == 4422 || this.type == 175 || this.type == 2701 || this.rare != 0) + return; + this.active = false; + this.type = 0; + this.stack = 0; + if (Main.netMode == 0) + return; + NetMessage.SendData(21, number: i); + } + } + + private void MoveInWorld(float gravity, float maxFallSpeed, ref Vector2 wetVelocity) + { + if (ItemID.Sets.ItemNoGravity[this.type]) + { + this.velocity.X *= 0.95f; + if ((double) this.velocity.X < 0.1 && (double) this.velocity.X > -0.1) + this.velocity.X = 0.0f; + this.velocity.Y *= 0.95f; + if ((double) this.velocity.Y < 0.1 && (double) this.velocity.Y > -0.1) + this.velocity.Y = 0.0f; + } + else + { + this.velocity.Y += gravity; + if ((double) this.velocity.Y > (double) maxFallSpeed) + this.velocity.Y = maxFallSpeed; + this.velocity.X *= 0.95f; + if ((double) this.velocity.X < 0.1 && (double) this.velocity.X > -0.1) + this.velocity.X = 0.0f; + } + bool flag = Collision.LavaCollision(this.position, this.width, this.height); + if (flag) + this.lavaWet = true; + int num = Collision.WetCollision(this.position, this.width, this.height) ? 1 : 0; + if (Collision.honey) + this.honeyWet = true; + if (num != 0) + { + if (!this.wet) + { + if (this.wetCount == (byte) 0) + { + this.wetCount = (byte) 20; + if (!flag) + { + if (this.honeyWet) + { + for (int index1 = 0; index1 < 5; ++index1) + { + int index2 = Dust.NewDust(new Vector2(this.position.X - 6f, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width + 12, 24, 152); + --Main.dust[index2].velocity.Y; + Main.dust[index2].velocity.X *= 2.5f; + Main.dust[index2].scale = 1.3f; + Main.dust[index2].alpha = 100; + Main.dust[index2].noGravity = true; + } + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + else + { + for (int index3 = 0; index3 < 10; ++index3) + { + int index4 = Dust.NewDust(new Vector2(this.position.X - 6f, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width + 12, 24, Dust.dustWater()); + Main.dust[index4].velocity.Y -= 4f; + Main.dust[index4].velocity.X *= 2.5f; + Main.dust[index4].scale *= 0.8f; + Main.dust[index4].alpha = 100; + Main.dust[index4].noGravity = true; + } + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + } + else + { + for (int index5 = 0; index5 < 5; ++index5) + { + int index6 = Dust.NewDust(new Vector2(this.position.X - 6f, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width + 12, 24, 35); + Main.dust[index6].velocity.Y -= 1.5f; + Main.dust[index6].velocity.X *= 2.5f; + Main.dust[index6].scale = 1.3f; + Main.dust[index6].alpha = 100; + Main.dust[index6].noGravity = true; + } + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + } + this.wet = true; + } + } + else if (this.wet) + { + this.wet = false; + int wetCount = (int) this.wetCount; + } + if (!this.wet) + { + this.lavaWet = false; + this.honeyWet = false; + } + if (this.wetCount > (byte) 0) + --this.wetCount; + if (this.wet) + { + if (this.wet) + { + Vector2 velocity = this.velocity; + this.velocity = Collision.TileCollision(this.position, this.velocity, this.width, this.height); + if ((double) this.velocity.X != (double) velocity.X) + wetVelocity.X = this.velocity.X; + if ((double) this.velocity.Y != (double) velocity.Y) + wetVelocity.Y = this.velocity.Y; + } + } + else + this.velocity = Collision.TileCollision(this.position, this.velocity, this.width, this.height); + Vector4 vector4 = Collision.SlopeCollision(this.position, this.velocity, this.width, this.height, gravity); + this.position.X = vector4.X; + this.position.Y = vector4.Y; + this.velocity.X = vector4.Z; + this.velocity.Y = vector4.W; + Collision.StepConveyorBelt((Entity) this, 1f); + } + + private void GetPickedUpByMonsters(int i) + { + Rectangle rectangle1 = new Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height); + for (int index1 = 0; index1 < 200; ++index1) + { + if (Main.npc[index1].active && Main.npc[index1].lifeMax > 5 && !Main.npc[index1].friendly && !Main.npc[index1].immortal && !Main.npc[index1].dontTakeDamage && !NPCID.Sets.CantTakeLunchMoney[Main.npc[index1].type]) + { + float stack = (float) this.stack; + float num1 = 1f; + if (this.type == 72) + num1 = 100f; + if (this.type == 73) + num1 = 10000f; + if (this.type == 74) + num1 = 1000000f; + float num2 = stack * num1; + float extraValue = (float) Main.npc[index1].extraValue; + int index2 = Main.npc[index1].realLife; + if (index2 >= 0 && Main.npc[index2].active) + extraValue = (float) Main.npc[index2].extraValue; + else + index2 = -1; + if ((double) extraValue < (double) num2 && (double) extraValue + (double) num2 < 999000000.0) + { + Rectangle rectangle2 = new Rectangle((int) Main.npc[index1].position.X, (int) Main.npc[index1].position.Y, Main.npc[index1].width, Main.npc[index1].height); + if (rectangle1.Intersects(rectangle2)) + { + float num3 = (float) Main.rand.Next(50, 76) * 0.01f; + if (this.type == 71) + num3 += (float) Main.rand.Next(51) * 0.01f; + if (this.type == 72) + num3 += (float) Main.rand.Next(26) * 0.01f; + if ((double) num3 > 1.0) + num3 = 1f; + int num4 = (int) ((double) this.stack * (double) num3); + if (num4 < 1) + num4 = 1; + if (num4 > this.stack) + num4 = this.stack; + this.stack -= num4; + int num5 = (int) ((double) num4 * (double) num1); + int number = index1; + if (index2 >= 0) + number = index2; + Main.npc[number].extraValue += num5; + if (Main.netMode == 0) + Main.npc[number].moneyPing(this.position); + else + NetMessage.SendData(92, number: number, number2: ((float) num5), number3: this.position.X, number4: this.position.Y); + if (this.stack <= 0) + { + this.SetDefaults(); + this.active = false; + } + NetMessage.SendData(21, number: i); + } + } + } + } + } + + private void CombineWithNearbyItems(int myItemIndex) + { + if (!this.CanCombineStackInWorld() || this.stack >= this.maxStack) + return; + for (int number = myItemIndex + 1; number < 400; ++number) + { + Item obj = Main.item[number]; + if (obj.active && obj.type == this.type && obj.stack > 0 && obj.playerIndexTheItemIsReservedFor == this.playerIndexTheItemIsReservedFor) + { + double num1 = (double) Math.Abs((float) ((double) this.position.X + (double) (this.width / 2) - ((double) obj.position.X + (double) (obj.width / 2)))) + (double) Math.Abs((float) ((double) this.position.Y + (double) (this.height / 2) - ((double) obj.position.Y + (double) (obj.height / 2)))); + int num2 = 30; + if ((double) Item.numberOfNewItems > 40.0) + num2 *= 2; + if ((double) Item.numberOfNewItems > 80.0) + num2 *= 2; + if ((double) Item.numberOfNewItems > 120.0) + num2 *= 2; + if ((double) Item.numberOfNewItems > 160.0) + num2 *= 2; + if ((double) Item.numberOfNewItems > 200.0) + num2 *= 2; + if ((double) Item.numberOfNewItems > 240.0) + num2 *= 2; + double num3 = (double) num2; + if (num1 < num3) + { + this.position = (this.position + obj.position) / 2f; + this.velocity = (this.velocity + obj.velocity) / 2f; + int num4 = obj.stack; + if (num4 > this.maxStack - this.stack) + num4 = this.maxStack - this.stack; + obj.stack -= num4; + this.stack += num4; + if (obj.stack <= 0) + { + obj.SetDefaults(); + obj.active = false; + } + if (Main.netMode != 0 && this.playerIndexTheItemIsReservedFor == Main.myPlayer) + { + NetMessage.SendData(21, number: myItemIndex); + NetMessage.SendData(21, number: number); + } + } + } + } + } + + public bool CanCombineStackInWorld() + { + if (this.type == 75) + return false; + return this.createTile >= 0 || this.createWall > 0 || this.ammo > 0 && !this.notAmmo || this.consumable || this.type >= 205 && this.type <= 207 || this.type == 1128 || this.type == 530 || this.dye > (byte) 0 || this.paint > (byte) 0 || this.material; + } + + private void UpdateItem_VisualEffects() + { + if (this.type == 5043) + { + float num = (float) Main.rand.Next(90, 111) * 0.01f * (float) (((double) Main.essScale + 0.5) / 2.0); + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.25f * num, 0.25f * num, 0.25f * num); + } + else if (this.type == 3191) + { + float num = (float) Main.rand.Next(90, 111) * 0.01f * (float) (((double) Main.essScale + 0.5) / 2.0); + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.3f * num, 0.1f * num, 0.25f * num); + } + else if (this.type == 520 || this.type == 3454) + { + float num = (float) Main.rand.Next(90, 111) * 0.01f * Main.essScale; + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.5f * num, 0.1f * num, 0.25f * num); + } + else if (this.type == 521 || this.type == 3455) + { + float num = (float) Main.rand.Next(90, 111) * 0.01f * Main.essScale; + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.25f * num, 0.1f * num, 0.5f * num); + } + else if (this.type == 547 || this.type == 3453) + { + float num = (float) Main.rand.Next(90, 111) * 0.01f * Main.essScale; + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.5f * num, 0.3f * num, 0.05f * num); + } + else if (this.type == 548) + { + float num = (float) Main.rand.Next(90, 111) * 0.01f * Main.essScale; + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.1f * num, 0.1f * num, 0.6f * num); + } + else if (this.type == 575) + { + float num = (float) Main.rand.Next(90, 111) * 0.01f * Main.essScale; + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.1f * num, 0.3f * num, 0.5f * num); + } + else if (this.type == 549) + { + float num = (float) Main.rand.Next(90, 111) * 0.01f * Main.essScale; + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.1f * num, 0.5f * num, 0.2f * num); + } + else if (this.type == 58 || this.type == 1734 || this.type == 1867) + { + float num = (float) Main.rand.Next(90, 111) * 0.01f * (Main.essScale * 0.5f); + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.5f * num, 0.1f * num, 0.1f * num); + } + else if (this.type == 184 || this.type == 1735 || this.type == 1868 || this.type == 4143) + { + float num = (float) Main.rand.Next(90, 111) * 0.01f * (Main.essScale * 0.5f); + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.1f * num, 0.1f * num, 0.5f * num); + } + else if (this.type == 522) + { + float num = (float) Main.rand.Next(90, 111) * 0.01f * (Main.essScale * 0.2f); + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.5f * num, 1f * num, 0.1f * num); + } + else if (this.type == 1332) + { + float num = (float) Main.rand.Next(90, 111) * 0.01f * (Main.essScale * 0.2f); + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 1f * num, 1f * num, 0.1f * num); + } + else if (this.type == 3456) + Lighting.AddLight(this.Center, new Vector3(0.2f, 0.4f, 0.5f) * Main.essScale); + else if (this.type == 3457) + Lighting.AddLight(this.Center, new Vector3(0.4f, 0.2f, 0.5f) * Main.essScale); + else if (this.type == 3458) + Lighting.AddLight(this.Center, new Vector3(0.5f, 0.4f, 0.2f) * Main.essScale); + else if (this.type == 3459) + Lighting.AddLight(this.Center, new Vector3(0.2f, 0.2f, 0.5f) * Main.essScale); + else if (this.type == 501) + { + if (Main.rand.Next(6) != 0) + return; + int index = Dust.NewDust(this.position, this.width, this.height, 55, Alpha: 200, newColor: this.color); + Main.dust[index].velocity *= 0.3f; + Main.dust[index].scale *= 0.5f; + } + else if (this.type == 3822) + Lighting.AddLight(this.Center, 0.1f, 0.3f, 0.1f); + else if (this.type == 1970) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.75f, 0.0f, 0.75f); + else if (this.type == 1972) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.0f, 0.0f, 0.75f); + else if (this.type == 1971) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.75f, 0.75f, 0.0f); + else if (this.type == 1973) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.0f, 0.75f, 0.0f); + else if (this.type == 1974) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.75f, 0.0f, 0.0f); + else if (this.type == 1975) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.75f, 0.75f, 0.75f); + else if (this.type == 1976) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.75f, 0.375f, 0.0f); + else if (this.type == 2679) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.6f, 0.0f, 0.6f); + else if (this.type == 2687) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.0f, 0.0f, 0.6f); + else if (this.type == 2689) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.6f, 0.6f, 0.0f); + else if (this.type == 2683) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.0f, 0.6f, 0.0f); + else if (this.type == 2685) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.6f, 0.0f, 0.0f); + else if (this.type == 2681) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.6f, 0.6f, 0.6f); + else if (this.type == 2677) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.6f, 0.375f, 0.0f); + else if (this.type == 105) + { + if (this.wet) + return; + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 1f, 0.95f, 0.8f); + } + else if (this.type == 2701) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.7f, 0.65f, 0.55f); + else if (this.createTile == 4) + { + int placeStyle = this.placeStyle; + if ((this.wet || !ItemID.Sets.Torches[this.type]) && !ItemID.Sets.WaterTorches[this.type]) + return; + Lighting.AddLight(this.Center, placeStyle); + } + else if (this.type == 3114) + { + if (this.wet) + return; + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 1f, 0.0f, 1f); + } + else if (this.type == 1245) + { + if (this.wet) + return; + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 1f, 0.5f, 0.0f); + } + else if (this.type == 433) + { + if (this.wet) + return; + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), (float) (0.5 * (double) Main.demonTorch + 1.0 * (1.0 - (double) Main.demonTorch)), 0.3f, (float) (1.0 * (double) Main.demonTorch + 0.5 * (1.0 - (double) Main.demonTorch))); + } + else if (this.type == 523) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.85f, 1.2f, 0.7f); + else if (this.type == 974) + { + if (this.wet) + return; + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.75f, 0.85f, 1.4f); + } + else if (this.type == 1333) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 1.25f, 1.25f, 0.7f); + else if (this.type == 4383) + { + if (this.wet) + return; + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 1.4f, 0.85f, 0.55f); + } + else if (this.type == 4384) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.25f, 1.3f, 0.8f); + else if (this.type == 3045) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), (float) Main.DiscoR / (float) byte.MaxValue, (float) Main.DiscoG / (float) byte.MaxValue, (float) Main.DiscoB / (float) byte.MaxValue); + else if (this.type == 3004) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.95f, 0.65f, 1.3f); + else if (this.type == 2274) + { + float r = 0.75f; + float g = 1.35f; + float b = 1.5f; + if (this.wet) + return; + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), r, g, b); + } + else if (this.type >= 427 && this.type <= 432) + { + if (this.wet) + return; + float r = 0.0f; + float g = 0.0f; + float b = 0.0f; + int num = this.type - 426; + if (num == 1) + { + r = 0.1f; + g = 0.2f; + b = 1.1f; + } + if (num == 2) + { + r = 1f; + g = 0.1f; + b = 0.1f; + } + if (num == 3) + { + r = 0.0f; + g = 1f; + b = 0.1f; + } + if (num == 4) + { + r = 0.9f; + g = 0.0f; + b = 0.9f; + } + if (num == 5) + { + r = 1.3f; + g = 1.3f; + b = 1.3f; + } + if (num == 6) + { + r = 0.9f; + g = 0.9f; + b = 0.0f; + } + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), r, g, b); + } + else if (this.type == 2777 || this.type == 2778 || this.type == 2779 || this.type == 2780 || this.type == 2781 || this.type == 2760 || this.type == 2761 || this.type == 2762 || this.type == 3524) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.4f, 0.16f, 0.36f); + else if (this.type == 2772 || this.type == 2773 || this.type == 2774 || this.type == 2775 || this.type == 2776 || this.type == 2757 || this.type == 2758 || this.type == 2759 || this.type == 3523) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.0f, 0.36f, 0.4f); + else if (this.type == 2782 || this.type == 2783 || this.type == 2784 || this.type == 2785 || this.type == 2786 || this.type == 2763 || this.type == 2764 || this.type == 2765 || this.type == 3522) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.5f, 0.25f, 0.05f); + else if (this.type == 3462 || this.type == 3463 || this.type == 3464 || this.type == 3465 || this.type == 3466 || this.type == 3381 || this.type == 3382 || this.type == 3383 || this.type == 3525) + Lighting.AddLight(this.Center, 0.3f, 0.3f, 0.2f); + else if (this.type == 41) + { + if (this.wet) + return; + Lighting.AddLight((int) (((double) this.position.X + (double) this.width) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 1f, 0.75f, 0.55f); + } + else if (this.type == 988) + { + if (this.wet) + return; + Lighting.AddLight((int) (((double) this.position.X + (double) this.width) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.35f, 0.65f, 1f); + } + else if (this.type == 282) + Lighting.AddLight((int) (((double) this.position.X + (double) this.width) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.7f, 1f, 0.8f); + else if (this.type == 286) + Lighting.AddLight((int) (((double) this.position.X + (double) this.width) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.7f, 0.8f, 1f); + else if (this.type == 3112) + Lighting.AddLight((int) (((double) this.position.X + (double) this.width) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 1f, 0.6f, 0.85f); + else if (this.type == 4776) + Lighting.AddLight((int) (((double) this.position.X + (double) this.width) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.7f, 0.0f, 1f); + else if (this.type == 3002) + Lighting.AddLight((int) (((double) this.position.X + (double) this.width) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 1.05f, 0.95f, 0.55f); + else if (this.type == 331) + Lighting.AddLight((int) (((double) this.position.X + (double) this.width) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.55f, 0.75f, 0.6f); + else if (this.type == 183) + Lighting.AddLight((int) (((double) this.position.X + (double) this.width) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.15f, 0.45f, 0.9f); + else if (this.type == 75) + { + Lighting.AddLight((int) (((double) this.position.X + (double) this.width) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.8f, 0.7f, 0.1f); + if (this.timeSinceItemSpawned % 12 != 0) + return; + Dust dust = Dust.NewDustPerfect(this.Center + new Vector2(0.0f, (float) this.height * 0.2f) + Main.rand.NextVector2CircularEdge((float) this.width, (float) this.height * 0.6f) * (float) (0.300000011920929 + (double) Main.rand.NextFloat() * 0.5), 228, new Vector2?(new Vector2(0.0f, (float) (-(double) Main.rand.NextFloat() * 0.300000011920929 - 1.5))), (int) sbyte.MaxValue); + dust.scale = 0.5f; + dust.fadeIn = 1.1f; + dust.noGravity = true; + dust.noLight = true; + } + else + { + if ((this.type < 3318 || this.type > 3332) && this.type != 3860 && this.type != 3862 && this.type != 3861 && this.type != 4782 && this.type != 4957) + return; + Lighting.AddLight((int) (((double) this.position.X + (double) this.width) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.4f, 0.4f, 0.4f); + if (this.timeSinceItemSpawned % 12 != 0) + return; + Dust dust = Dust.NewDustPerfect(this.Center + new Vector2(0.0f, (float) this.height * -0.1f) + Main.rand.NextVector2CircularEdge((float) this.width * 0.6f, (float) this.height * 0.6f) * (float) (0.300000011920929 + (double) Main.rand.NextFloat() * 0.5), 279, new Vector2?(new Vector2(0.0f, (float) (-(double) Main.rand.NextFloat() * 0.300000011920929 - 1.5))), (int) sbyte.MaxValue); + dust.scale = 0.5f; + dust.fadeIn = 1.1f; + dust.noGravity = true; + dust.noLight = true; + dust.alpha = 0; + } + } + + public static Rectangle GetDrawHitbox(int type, Player user) + { + Main.instance.LoadItem(type); + if (ItemID.Sets.IsFood[type]) + return TextureAssets.Item[type].Frame(verticalFrames: 3, frameY: 1); + switch (type) + { + case 75: + return TextureAssets.Item[type].Frame(verticalFrames: 8); + case 520: + case 521: + case 547: + case 548: + case 549: + case 575: + case 3453: + case 3454: + case 3455: + case 3580: + case 3581: + case 4068: + case 4069: + case 4070: + return TextureAssets.Item[type].Frame(verticalFrames: 4); + default: + return TextureAssets.Item[type].Frame(); + } + } + + public static int NewItem( + Vector2 pos, + Vector2 randomBox, + int Type, + int Stack = 1, + bool noBroadcast = false, + int prefixGiven = 0, + bool noGrabDelay = false, + bool reverseLookup = false) + { + return Item.NewItem((int) pos.X, (int) pos.Y, (int) randomBox.X, (int) randomBox.Y, Type, Stack, noBroadcast, prefixGiven, noGrabDelay, reverseLookup); + } + + public static int NewItem( + Vector2 pos, + int Width, + int Height, + int Type, + int Stack = 1, + bool noBroadcast = false, + int prefixGiven = 0, + bool noGrabDelay = false, + bool reverseLookup = false) + { + return Item.NewItem((int) pos.X, (int) pos.Y, Width, Height, Type, Stack, noBroadcast, prefixGiven, noGrabDelay, reverseLookup); + } + + public static int NewItem( + int X, + int Y, + int Width, + int Height, + int Type, + int Stack = 1, + bool noBroadcast = false, + int pfix = 0, + bool noGrabDelay = false, + bool reverseLookup = false) + { + if (WorldGen.gen) + return 0; + if (Main.rand == null) + Main.rand = new UnifiedRandom(); + if (Main.halloween) + { + if (Type == 58) + Type = 1734; + if (Type == 184) + Type = 1735; + } + if (Main.xMas) + { + if (Type == 58) + Type = 1867; + if (Type == 184) + Type = 1868; + } + if (Type > 0 && Item.cachedItemSpawnsByType[Type] != -1) + { + Item.cachedItemSpawnsByType[Type] += Stack; + return 400; + } + Main.item[400] = new Item(); + int index = 400; + if (Main.netMode != 1) + index = Item.PickAnItemSlotToSpawnItemOn(reverseLookup, index); + Main.timeItemSlotCannotBeReusedFor[index] = 0; + Main.item[index] = new Item(); + Item obj1 = Main.item[index]; + obj1.SetDefaults(Type); + obj1.Prefix(pfix); + obj1.stack = Stack; + obj1.position.X = (float) (X + Width / 2 - obj1.width / 2); + obj1.position.Y = (float) (Y + Height / 2 - obj1.height / 2); + obj1.wet = Collision.WetCollision(obj1.position, obj1.width, obj1.height); + obj1.velocity.X = (float) Main.rand.Next(-30, 31) * 0.1f; + obj1.velocity.Y = (float) Main.rand.Next(-40, -15) * 0.1f; + if (Type == 859 || Type == 4743) + { + Item obj2 = obj1; + obj2.velocity = obj2.velocity * 0.0f; + } + if (Type == 520 || Type == 521 || obj1.type >= 0 && ItemID.Sets.NebulaPickup[obj1.type]) + { + obj1.velocity.X = (float) Main.rand.Next(-30, 31) * 0.1f; + obj1.velocity.Y = (float) Main.rand.Next(-30, 31) * 0.1f; + } + obj1.active = true; + obj1.timeSinceItemSpawned = ItemID.Sets.NewItemSpawnPriority[obj1.type]; + ++Item.numberOfNewItems; + if (ItemSlot.Options.HighlightNewItems && obj1.type >= 0 && !ItemID.Sets.NeverAppearsAsNewInInventory[obj1.type]) + obj1.newAndShiny = true; + if (Main.netMode == 2 && !noBroadcast) + NetMessage.SendData(21, number: index, number2: ((float) noGrabDelay.ToInt())); + else if (Main.netMode == 0) + obj1.playerIndexTheItemIsReservedFor = Main.myPlayer; + return index; + } + + private static int PickAnItemSlotToSpawnItemOn(bool reverseLookup, int nextItem) + { + int num1 = 0; + int num2 = 400; + int num3 = 1; + if (reverseLookup) + { + num1 = 399; + num2 = -1; + num3 = -1; + } + bool flag = false; + for (int index = num1; index != num2; index += num3) + { + if (!Main.item[index].active && Main.timeItemSlotCannotBeReusedFor[index] == 0) + { + nextItem = index; + flag = true; + break; + } + } + if (!flag) + { + int num4 = 0; + for (int index = 0; index < 400; ++index) + { + if (Main.timeItemSlotCannotBeReusedFor[index] == 0 && !Main.item[index].instanced && Main.item[index].timeSinceItemSpawned > num4) + { + num4 = Main.item[index].timeSinceItemSpawned; + nextItem = index; + flag = true; + } + } + if (!flag) + { + for (int index = 0; index < 400; ++index) + { + if (Main.item[index].timeSinceItemSpawned - Main.timeItemSlotCannotBeReusedFor[index] > num4) + { + num4 = Main.item[index].timeSinceItemSpawned - Main.timeItemSlotCannotBeReusedFor[index]; + nextItem = index; + } + } + } + } + return nextItem; + } + + public void FindOwner(int whoAmI) + { + if (this.keepTime > 0) + return; + int itemIsReservedFor = this.playerIndexTheItemIsReservedFor; + this.playerIndexTheItemIsReservedFor = (int) byte.MaxValue; + bool flag = true; + if (this.type == 267 && this.ownIgnore != -1) + flag = false; + if (flag) + { + float num1 = (float) NPC.sWidth; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (this.ownIgnore != index) + { + Player player = Main.player[index]; + if (player.active) + { + Player.ItemSpaceStatus status = player.ItemSpace(Main.item[whoAmI]); + if (player.CanPullItem(Main.item[whoAmI], status)) + { + float num2 = Math.Abs(player.position.X + (float) (player.width / 2) - this.position.X - (float) (this.width / 2)) + Math.Abs(player.position.Y + (float) (player.height / 2) - this.position.Y - (float) this.height); + if (player.manaMagnet && (this.type == 184 || this.type == 1735 || this.type == 1868)) + num2 -= (float) Item.manaGrabRange; + if (player.lifeMagnet && (this.type == 58 || this.type == 1734 || this.type == 1867)) + num2 -= (float) Item.lifeGrabRange; + if (this.type == 4143) + num2 -= (float) Item.manaGrabRange; + if ((double) num1 > (double) num2) + { + num1 = num2; + this.playerIndexTheItemIsReservedFor = index; + } + } + } + } + } + } + if (this.playerIndexTheItemIsReservedFor == itemIsReservedFor || (itemIsReservedFor != Main.myPlayer || Main.netMode != 1) && (itemIsReservedFor != (int) byte.MaxValue || Main.netMode != 2) && (itemIsReservedFor == (int) byte.MaxValue || Main.player[itemIsReservedFor].active)) + return; + NetMessage.SendData(21, number: whoAmI); + if (!this.active) + return; + NetMessage.SendData(22, number: whoAmI); + } + + public Item Clone() => (Item) this.MemberwiseClone(); + + public Item DeepClone() => (Item) this.MemberwiseClone(); + + public bool IsTheSameAs(Item compareItem) => this.netID == compareItem.netID && this.type == compareItem.type; + + public bool IsNotTheSameAs(Item compareItem) => this.netID != compareItem.netID || this.stack != compareItem.stack || (int) this.prefix != (int) compareItem.prefix; + + public void SetNameOverride(string name) => this._nameOverride = name; + + public void ClearNameOverride() => this._nameOverride = (string) null; + + public bool IsAir => this.type <= 0 || this.stack <= 0; + + public void TurnToAir() + { + this.type = 0; + this.stack = 0; + this.netID = 0; + this.dye = (byte) 0; + this.shoot = 0; + this.mountType = -1; + } + + public void OnPurchase(Item item) + { + if (!item.shopCustomPrice.HasValue) + return; + item.shopSpecialCurrency = -1; + item.shopCustomPrice = new int?(); + } + + public int GetStoreValue() => this.shopCustomPrice.HasValue ? this.shopCustomPrice.Value : this.value; + + public void Serialize(BinaryWriter writer, ItemSerializationContext context) + { + if (context != ItemSerializationContext.SavingAndLoading) + return; + writer.Write(this.netID); + writer.Write(this.stack); + writer.Write(this.prefix); + } + + public void DeserializeFrom(BinaryReader reader, ItemSerializationContext context) + { + if (context == ItemSerializationContext.SavingAndLoading) + { + this.netDefaults(reader.ReadInt32()); + this.stack = reader.ReadInt32(); + this.Prefix((int) reader.ReadByte()); + } + if (this.type < 5045) + return; + this.TurnToAir(); + } + + public bool IsCurrency => this.type >= 71 && this.type <= 74 || CustomCurrencyManager.IsCustomCurrency(this); + + public void Refresh() + { + bool favorited = this.favorited; + int stack = this.stack; + int netId = this.netID; + int prefix = (int) this.prefix; + this.netDefaults(netId); + this.Prefix(prefix); + this.stack = stack; + this.favorited = favorited; + } + + public bool CanBeQuickUsed + { + get + { + if (this.IsAir) + return false; + bool? nullable = ItemID.Sets.CanBeQuickusedOnGamepad[this.type]; + if (nullable.HasValue) + return nullable.Value; + return this.healLife > 0 || this.healMana > 0 || this.buffType > 0 && this.buffTime > 0; + } + } + } +} diff --git a/ItemSerializationContext.cs b/ItemSerializationContext.cs new file mode 100644 index 0000000..de20bdc --- /dev/null +++ b/ItemSerializationContext.cs @@ -0,0 +1,14 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ItemSerializationContext +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria +{ + public enum ItemSerializationContext + { + SavingAndLoading, + Syncing, + } +} diff --git a/Lang.cs b/Lang.cs new file mode 100644 index 0000000..0635b1f --- /dev/null +++ b/Lang.cs @@ -0,0 +1,936 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Lang +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using Terraria.GameContent.Events; +using Terraria.GameContent.UI; +using Terraria.GameInput; +using Terraria.ID; +using Terraria.Localization; +using Terraria.Map; +using Terraria.UI; + +namespace Terraria +{ + public class Lang + { + [Obsolete("Lang arrays have been replaced with the new Language.GetText system.")] + public static LocalizedText[] menu = new LocalizedText[253]; + [Obsolete("Lang arrays have been replaced with the new Language.GetText system.")] + public static LocalizedText[] gen = new LocalizedText[91]; + [Obsolete("Lang arrays have been replaced with the new Language.GetText system.")] + public static LocalizedText[] misc = new LocalizedText[201]; + [Obsolete("Lang arrays have been replaced with the new Language.GetText system.")] + public static LocalizedText[] inter = new LocalizedText[129]; + [Obsolete("Lang arrays have been replaced with the new Language.GetText system.")] + public static LocalizedText[] tip = new LocalizedText[61]; + [Obsolete("Lang arrays have been replaced with the new Language.GetText system.")] + public static LocalizedText[] mp = new LocalizedText[23]; + [Obsolete("Lang arrays have been replaced with the new Language.GetText system.")] + public static LocalizedText[] chestType = new LocalizedText[52]; + [Obsolete("Lang arrays have been replaced with the new Language.GetText system.")] + public static LocalizedText[] dresserType = new LocalizedText[40]; + [Obsolete("Lang arrays have been replaced with the new Language.GetText system.")] + public static LocalizedText[] chestType2 = new LocalizedText[14]; + public static LocalizedText[] prefix = new LocalizedText[85]; + public static LocalizedText[] _mapLegendCache; + private static LocalizedText[] _itemNameCache = new LocalizedText[5045]; + private static LocalizedText[] _projectileNameCache = new LocalizedText[950]; + private static LocalizedText[] _npcNameCache = new LocalizedText[663]; + private static LocalizedText[] _negativeNpcNameCache = new LocalizedText[65]; + private static LocalizedText[] _buffNameCache = new LocalizedText[323]; + private static LocalizedText[] _buffDescriptionCache = new LocalizedText[323]; + private static ItemTooltip[] _itemTooltipCache = new ItemTooltip[5045]; + private static LocalizedText[] _emojiNameCache = new LocalizedText[145]; + + public static string GetMapObjectName(int id) => Lang._mapLegendCache != null ? Lang._mapLegendCache[id].Value : string.Empty; + + public static object CreateDialogSubstitutionObject(NPC npc = null) => (object) new + { + Nurse = NPC.GetFirstNPCNameOrNull(18), + Merchant = NPC.GetFirstNPCNameOrNull(17), + ArmsDealer = NPC.GetFirstNPCNameOrNull(19), + Dryad = NPC.GetFirstNPCNameOrNull(20), + Demolitionist = NPC.GetFirstNPCNameOrNull(38), + Clothier = NPC.GetFirstNPCNameOrNull(54), + Guide = NPC.GetFirstNPCNameOrNull(22), + Wizard = NPC.GetFirstNPCNameOrNull(108), + GoblinTinkerer = NPC.GetFirstNPCNameOrNull(107), + Mechanic = NPC.GetFirstNPCNameOrNull(124), + Truffle = NPC.GetFirstNPCNameOrNull(160), + Steampunker = NPC.GetFirstNPCNameOrNull(178), + DyeTrader = NPC.GetFirstNPCNameOrNull(207), + PartyGirl = NPC.GetFirstNPCNameOrNull(208), + Cyborg = NPC.GetFirstNPCNameOrNull(209), + Painter = NPC.GetFirstNPCNameOrNull(227), + WitchDoctor = NPC.GetFirstNPCNameOrNull(228), + Pirate = NPC.GetFirstNPCNameOrNull(229), + Stylist = NPC.GetFirstNPCNameOrNull(353), + TravelingMerchant = NPC.GetFirstNPCNameOrNull(368), + Angler = NPC.GetFirstNPCNameOrNull(369), + Bartender = NPC.GetFirstNPCNameOrNull(550), + WorldName = Main.worldName, + Day = Main.dayTime, + BloodMoon = Main.bloodMoon, + Eclipse = Main.eclipse, + MoonLordDefeated = NPC.downedMoonlord, + HardMode = Main.hardMode, + Homeless = (npc != null && npc.homeless), + InventoryKey = Main.cInv, + PlayerName = Main.player[Main.myPlayer].name, + GolfGuy = NPC.GetFirstNPCNameOrNull(588), + TaxCollector = NPC.GetFirstNPCNameOrNull(441), + Rain = Main.raining, + Graveyard = Main.LocalPlayer.ZoneGraveyard, + AnglerCompletedQuestsCount = Main.LocalPlayer.anglerQuestsFinished, + InputTriggerUI_BuildFromInventory = PlayerInput.GenerateInputTag_ForCurrentGamemode(false, "QuickMount"), + InputTriggerUI_SellItem = PlayerInput.GenerateInputTag_ForCurrentGamemode(false, "SmartSelect"), + InputTriggerUI_Trash = PlayerInput.GenerateInputTag_ForCurrentGamemode_WithHacks(false, "SmartSelect"), + InputTriggerUI_FavoriteItem = PlayerInput.GenerateInputTag_ForCurrentGamemode_WithHacks(false, "SmartCursor"), + InputTrigger_QuickEquip = PlayerInput.GenerateInputTag_ForCurrentGamemode(false, "Grapple"), + InputTrigger_LockOn = PlayerInput.GenerateInputTag_ForCurrentGamemode(true, "LockOn"), + InputTrigger_RadialQuickbar = PlayerInput.GenerateInputTag_ForCurrentGamemode(true, "HotbarMinus"), + InputTrigger_RadialHotbar = PlayerInput.GenerateInputTag_ForCurrentGamemode(true, "HotbarPlus"), + InputTrigger_SmartCursor = PlayerInput.GenerateInputTag_ForCurrentGamemode(true, "SmartCursor"), + InputTrigger_UseOrAttack = PlayerInput.GenerateInputTag_ForCurrentGamemode(true, "MouseLeft"), + InputTrigger_InteractWithTile = PlayerInput.GenerateInputTag_ForCurrentGamemode(true, "MouseRight"), + InputTrigger_SmartSelect = PlayerInput.GenerateInputTag_ForCurrentGamemode(true, "SmartSelect") + }; + + [Obsolete("dialog is deprecated. Please use Language.GetText instead.")] + public static string dialog(int l, bool english = false) => Language.GetTextValueWith("LegacyDialog." + (object) l, Lang.CreateDialogSubstitutionObject()); + + public static string GetNPCNameValue(int netID) => Lang.GetNPCName(netID).Value; + + public static LocalizedText GetNPCName(int netID) + { + if (netID > 0 && netID < 663) + return Lang._npcNameCache[netID]; + return netID < 0 && -netID - 1 < Lang._negativeNpcNameCache.Length ? Lang._negativeNpcNameCache[-netID - 1] : LocalizedText.Empty; + } + + public static ItemTooltip GetTooltip(int itemId) => Lang._itemTooltipCache[itemId]; + + public static LocalizedText GetItemName(int id) + { + id = (int) ItemID.FromNetId((short) id); + return id > 0 && id < 5045 && Lang._itemNameCache[id] != null ? Lang._itemNameCache[id] : LocalizedText.Empty; + } + + public static LocalizedText GetEmojiName(int id) => id >= 0 && id < 145 && Lang._emojiNameCache[id] != null ? Lang._emojiNameCache[id] : LocalizedText.Empty; + + public static string GetItemNameValue(int id) => Lang.GetItemName(id).Value; + + public static string GetBuffName(int id) => Lang._buffNameCache[id].Value; + + public static string GetBuffDescription(int id) => Lang._buffDescriptionCache[id].Value; + + public static string GetDryadWorldStatusDialog() + { + int tGood = (int) WorldGen.tGood; + int tEvil = (int) WorldGen.tEvil; + int tBlood = (int) WorldGen.tBlood; + string textValue; + if (tGood > 0 && tEvil > 0 && tBlood > 0) + textValue = Language.GetTextValue("DryadSpecialText.WorldStatusAll", (object) Main.worldName, (object) tGood, (object) tEvil, (object) tBlood); + else if (tGood > 0 && tEvil > 0) + textValue = Language.GetTextValue("DryadSpecialText.WorldStatusHallowCorrupt", (object) Main.worldName, (object) tGood, (object) tEvil); + else if (tGood > 0 && tBlood > 0) + textValue = Language.GetTextValue("DryadSpecialText.WorldStatusHallowCrimson", (object) Main.worldName, (object) tGood, (object) tBlood); + else if (tEvil > 0 && tBlood > 0) + textValue = Language.GetTextValue("DryadSpecialText.WorldStatusCorruptCrimson", (object) Main.worldName, (object) tEvil, (object) tBlood); + else if (tEvil > 0) + textValue = Language.GetTextValue("DryadSpecialText.WorldStatusCorrupt", (object) Main.worldName, (object) tEvil); + else if (tBlood > 0) + { + textValue = Language.GetTextValue("DryadSpecialText.WorldStatusCrimson", (object) Main.worldName, (object) tBlood); + } + else + { + if (tGood <= 0) + return Language.GetTextValue("DryadSpecialText.WorldStatusPure", (object) Main.worldName); + textValue = Language.GetTextValue("DryadSpecialText.WorldStatusHallow", (object) Main.worldName, (object) tGood); + } + string str = (double) tGood * 1.2 < (double) (tEvil + tBlood) || (double) tGood * 0.8 > (double) (tEvil + tBlood) ? (tGood < tEvil + tBlood ? (tEvil + tBlood <= tGood + 20 ? (tEvil + tBlood <= 5 ? Language.GetTextValue("DryadSpecialText.WorldDescriptionClose") : Language.GetTextValue("DryadSpecialText.WorldDescriptionWork")) : Language.GetTextValue("DryadSpecialText.WorldDescriptionGrim")) : Language.GetTextValue("DryadSpecialText.WorldDescriptionFairyTale")) : Language.GetTextValue("DryadSpecialText.WorldDescriptionBalanced"); + return string.Format("{0} {1}", (object) textValue, (object) str); + } + + public static string GetRandomGameTitle() => Language.RandomFromCategory("GameTitle").Value; + + public static string DyeTraderQuestChat(bool gotDye = false) + { + object substitutionObject = Lang.CreateDialogSubstitutionObject(); + LocalizedText[] all = Language.FindAll(Lang.CreateDialogFilter(gotDye ? "DyeTraderSpecialText.HasPlant" : "DyeTraderSpecialText.NoPlant", substitutionObject)); + return all[Main.rand.Next(all.Length)].FormatWith(substitutionObject); + } + + public static string AnglerQuestCountChat(NPC npc) + { + object substitutionObject = Lang.CreateDialogSubstitutionObject(npc); + return Language.SelectRandom(Lang.CreateDialogFilter("AnglerQuestChatter.", substitutionObject)).FormatWith(substitutionObject); + } + + public static string BartenderHelpText(NPC npc) + { + object substitutionObject = Lang.CreateDialogSubstitutionObject(npc); + Player player = Main.player[Main.myPlayer]; + if (player.bartenderQuestLog == 0) + { + ++player.bartenderQuestLog; + Item newItem = new Item(); + newItem.SetDefaults(3817); + newItem.stack = 5; + newItem.position = player.Center; + Item obj = player.GetItem(player.whoAmI, newItem, GetItemSettings.NPCEntityToPlayerInventorySettings); + if (obj.stack > 0) + { + int number = Item.NewItem((int) player.position.X, (int) player.position.Y, player.width, player.height, obj.type, obj.stack, noGrabDelay: true); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + } + return Language.GetTextValueWith("BartenderSpecialText.FirstHelp", substitutionObject); + } + LocalizedText[] all = Language.FindAll(Lang.CreateDialogFilter("BartenderHelpText.", substitutionObject)); + if (Main.BartenderHelpTextIndex >= all.Length) + Main.BartenderHelpTextIndex = 0; + return all[Main.BartenderHelpTextIndex++].FormatWith(substitutionObject); + } + + public static string BartenderChat(NPC npc) + { + object substitutionObject = Lang.CreateDialogSubstitutionObject(npc); + return Main.rand.Next(5) == 0 ? Language.GetTextValueWith(!DD2Event.DownedInvasionT3 ? (!DD2Event.DownedInvasionT2 ? (!DD2Event.DownedInvasionT1 ? "BartenderSpecialText.BeforeDD2Tier1" : "BartenderSpecialText.AfterDD2Tier1") : "BartenderSpecialText.AfterDD2Tier2") : "BartenderSpecialText.AfterDD2Tier3", substitutionObject) : Language.SelectRandom(Lang.CreateDialogFilter("BartenderChatter.", substitutionObject)).FormatWith(substitutionObject); + } + + public static string GolferChat(NPC npc) + { + object substitutionObject = Lang.CreateDialogSubstitutionObject(npc); + return Language.SelectRandom(Lang.CreateDialogFilter("GolferChatter.", substitutionObject)).FormatWith(substitutionObject); + } + + public static string BestiaryGirlChat(NPC npc) + { + object substitutionObject = Lang.CreateDialogSubstitutionObject(npc); + string startsWith = "BestiaryGirlChatter."; + if (npc.ShouldBestiaryGirlBeLycantrope()) + startsWith = "BestiaryGirlLycantropeChatter."; + return Language.SelectRandom(Lang.CreateDialogFilter(startsWith, substitutionObject)).FormatWith(substitutionObject); + } + + public static string CatChat(NPC npc) + { + object substitutionObject = Lang.CreateDialogSubstitutionObject(npc); + return Language.SelectRandom(Lang.CreateDialogFilter("CatChatter.", substitutionObject)).FormatWith(substitutionObject); + } + + public static string DogChat(NPC npc) + { + object substitutionObject = Lang.CreateDialogSubstitutionObject(npc); + return Language.SelectRandom(Lang.CreateDialogFilter("DogChatter.", substitutionObject)).FormatWith(substitutionObject); + } + + public static string BunnyChat(NPC npc) + { + object substitutionObject = Lang.CreateDialogSubstitutionObject(npc); + return Language.SelectRandom(Lang.CreateDialogFilter("BunnyChatter.", substitutionObject)).FormatWith(substitutionObject); + } + + public static string GetNPCHouseBannerText(NPC npc, int bannerStyle) => bannerStyle == 1 ? Language.GetTextValue("Game.ReservedForNPC", (object) npc.FullName) : npc.FullName; + + public static LanguageSearchFilter CreateDialogFilter( + string startsWith, + object substitutions) + { + return (LanguageSearchFilter) ((key, text) => key.StartsWith(startsWith) && text.CanFormatWith(substitutions)); + } + + public static LanguageSearchFilter CreateDialogFilter(string startsWith) => (LanguageSearchFilter) ((key, text) => key.StartsWith(startsWith)); + + public static string AnglerQuestChat(bool turnIn = false) + { + object substitutionObject = Lang.CreateDialogSubstitutionObject(); + if (turnIn) + return Language.SelectRandom(Lang.CreateDialogFilter("AnglerQuestText.TurnIn_", substitutionObject)).FormatWith(substitutionObject); + if (Main.anglerQuestFinished) + return Language.SelectRandom(Lang.CreateDialogFilter("AnglerQuestText.NoQuest_", substitutionObject)).FormatWith(substitutionObject); + int anglerQuestItemNetId = Main.anglerQuestItemNetIDs[Main.anglerQuest]; + Main.npcChatCornerItem = anglerQuestItemNetId; + return Language.GetTextValueWith("AnglerQuestText.Quest_" + ItemID.Search.GetName(anglerQuestItemNetId), substitutionObject); + } + + public static LocalizedText GetProjectileName(int type) => type >= 0 && type < Lang._projectileNameCache.Length && Lang._projectileNameCache[type] != null ? Lang._projectileNameCache[type] : LocalizedText.Empty; + + private static void FillNameCacheArray( + string category, + LocalizedText[] nameCache, + bool leaveMissingEntriesBlank = false) + where IdType : IConvertible + { + for (int index = 0; index < nameCache.Length; ++index) + nameCache[index] = LocalizedText.Empty; + ((IEnumerable) typeof (IdClass).GetFields(BindingFlags.Static | BindingFlags.Public)).Where((Func) (f => f.FieldType == typeof (IdType))).ToList().ForEach((Action) (field => + { + long int64 = Convert.ToInt64((object) (IdType) field.GetValue((object) null)); + if (int64 >= 0L && int64 < (long) nameCache.Length) + { + nameCache[(IntPtr) int64] = !leaveMissingEntriesBlank || Language.Exists(category + "." + field.Name) ? Language.GetText(category + "." + field.Name) : LocalizedText.Empty; + } + else + { + if (!(field.Name == "None")) + return; + nameCache[int64] = LocalizedText.Empty; + } + })); + } + + public static void InitializeLegacyLocalization() + { + Lang.FillNameCacheArray("Prefix", Lang.prefix); + for (int index = 0; index < Lang.gen.Length; ++index) + Lang.gen[index] = Language.GetText("LegacyWorldGen." + (object) index); + for (int index = 0; index < Lang.menu.Length; ++index) + Lang.menu[index] = Language.GetText("LegacyMenu." + (object) index); + for (int index = 0; index < Lang.inter.Length; ++index) + Lang.inter[index] = Language.GetText("LegacyInterface." + (object) index); + for (int index = 0; index < Lang.misc.Length; ++index) + Lang.misc[index] = Language.GetText("LegacyMisc." + (object) index); + for (int index = 0; index < Lang.mp.Length; ++index) + Lang.mp[index] = Language.GetText("LegacyMultiplayer." + (object) index); + for (int index = 0; index < Lang.tip.Length; ++index) + Lang.tip[index] = Language.GetText("LegacyTooltip." + (object) index); + for (int index = 0; index < Lang.chestType.Length; ++index) + Lang.chestType[index] = Language.GetText("LegacyChestType." + (object) index); + for (int index = 0; index < Lang.chestType2.Length; ++index) + Lang.chestType2[index] = Language.GetText("LegacyChestType2." + (object) index); + for (int index = 0; index < Lang.dresserType.Length; ++index) + Lang.dresserType[index] = Language.GetText("LegacyDresserType." + (object) index); + Lang.FillNameCacheArray("ItemName", Lang._itemNameCache); + Lang.FillNameCacheArray("ProjectileName", Lang._projectileNameCache); + Lang.FillNameCacheArray("NPCName", Lang._npcNameCache); + Lang.FillNameCacheArray("BuffName", Lang._buffNameCache); + Lang.FillNameCacheArray("BuffDescription", Lang._buffDescriptionCache); + Lang.FillNameCacheArray("EmojiName", Lang._emojiNameCache, true); + for (int id = -65; id < 0; ++id) + Lang._negativeNpcNameCache[-id - 1] = Lang._npcNameCache[NPCID.FromNetId(id)]; + Lang._negativeNpcNameCache[0] = Language.GetText("NPCName.Slimeling"); + Lang._negativeNpcNameCache[1] = Language.GetText("NPCName.Slimer2"); + Lang._negativeNpcNameCache[2] = Language.GetText("NPCName.GreenSlime"); + Lang._negativeNpcNameCache[3] = Language.GetText("NPCName.Pinky"); + Lang._negativeNpcNameCache[4] = Language.GetText("NPCName.BabySlime"); + Lang._negativeNpcNameCache[5] = Language.GetText("NPCName.BlackSlime"); + Lang._negativeNpcNameCache[6] = Language.GetText("NPCName.PurpleSlime"); + Lang._negativeNpcNameCache[7] = Language.GetText("NPCName.RedSlime"); + Lang._negativeNpcNameCache[8] = Language.GetText("NPCName.YellowSlime"); + Lang._negativeNpcNameCache[9] = Language.GetText("NPCName.JungleSlime"); + Lang._negativeNpcNameCache[53] = Language.GetText("NPCName.SmallRainZombie"); + Lang._negativeNpcNameCache[54] = Language.GetText("NPCName.BigRainZombie"); + ItemTooltip.AddGlobalProcessor((TooltipProcessor) (tooltip => + { + if (tooltip.Contains("")) + { + InputMode key = InputMode.XBoxGamepad; + if (PlayerInput.UsingGamepad) + key = InputMode.XBoxGamepadUI; + if (key == InputMode.XBoxGamepadUI) + { + string newValue = PlayerInput.BuildCommand("", true, PlayerInput.CurrentProfile.InputModes[key].KeyStatus["MouseRight"]).Replace(": ", ""); + tooltip = tooltip.Replace("", newValue); + } + else + tooltip = tooltip.Replace("", Language.GetTextValue("Controls.RightClick")); + } + if (tooltip.Contains("")) + { + InputMode key = InputMode.XBoxGamepad; + if (PlayerInput.UsingGamepad) + key = InputMode.XBoxGamepadUI; + if (key == InputMode.XBoxGamepadUI) + { + string newValue = PlayerInput.BuildCommand("", true, PlayerInput.CurrentProfile.InputModes[key].KeyStatus["MouseLeft"]).Replace(": ", ""); + tooltip = tooltip.Replace("", newValue); + } + else + tooltip = tooltip.Replace("", Language.GetTextValue("Controls.LeftClick")); + } + return tooltip; + })); + for (int index = 0; index < Lang._itemTooltipCache.Length; ++index) + Lang._itemTooltipCache[index] = ItemTooltip.None; + ((IEnumerable) typeof (ItemID).GetFields(BindingFlags.Static | BindingFlags.Public)).Where((Func) (f => f.FieldType == typeof (short))).ToList().ForEach((Action) (field => + { + short num = (short) field.GetValue((object) null); + if (num <= (short) 0 || (int) num >= Lang._itemTooltipCache.Length) + return; + Lang._itemTooltipCache[(int) num] = ItemTooltip.FromLanguageKey("ItemTooltip." + field.Name); + })); + } + + public static void BuildMapAtlas() + { + Lang._mapLegendCache = new LocalizedText[MapHelper.LookupCount()]; + for (int index = 0; index < Lang._mapLegendCache.Length; ++index) + Lang._mapLegendCache[index] = LocalizedText.Empty; + for (int tileType = 0; tileType < TileID.Sets.IsATreeTrunk.Length; ++tileType) + { + if (TileID.Sets.IsATreeTrunk[tileType]) + Lang._mapLegendCache[MapHelper.TileToLookup(tileType, 0)] = Language.GetText("MapObject.Tree"); + } + Lang._mapLegendCache[MapHelper.TileToLookup(4, 0)] = Lang._itemNameCache[8]; + Lang._mapLegendCache[MapHelper.TileToLookup(4, 1)] = Lang._itemNameCache[8]; + Lang._mapLegendCache[MapHelper.TileToLookup(6, 0)] = Language.GetText("MapObject.Iron"); + Lang._mapLegendCache[MapHelper.TileToLookup(7, 0)] = Language.GetText("MapObject.Copper"); + Lang._mapLegendCache[MapHelper.TileToLookup(8, 0)] = Language.GetText("MapObject.Gold"); + Lang._mapLegendCache[MapHelper.TileToLookup(9, 0)] = Language.GetText("MapObject.Silver"); + Lang._mapLegendCache[MapHelper.TileToLookup(10, 0)] = Language.GetText("MapObject.Door"); + Lang._mapLegendCache[MapHelper.TileToLookup(11, 0)] = Language.GetText("MapObject.Door"); + Lang._mapLegendCache[MapHelper.TileToLookup(12, 0)] = Lang._itemNameCache[29]; + Lang._mapLegendCache[MapHelper.TileToLookup(13, 0)] = Lang._itemNameCache[31]; + Lang._mapLegendCache[MapHelper.TileToLookup(14, 0)] = Language.GetText("MapObject.Table"); + Lang._mapLegendCache[MapHelper.TileToLookup(469, 0)] = Language.GetText("MapObject.Table"); + Lang._mapLegendCache[MapHelper.TileToLookup(486, 0)] = Lang._itemNameCache[4063]; + Lang._mapLegendCache[MapHelper.TileToLookup(487, 0)] = Lang._itemNameCache[4064]; + Lang._mapLegendCache[MapHelper.TileToLookup(487, 1)] = Lang._itemNameCache[4065]; + Lang._mapLegendCache[MapHelper.TileToLookup(489, 0)] = Lang._itemNameCache[4074]; + Lang._mapLegendCache[MapHelper.TileToLookup(490, 0)] = Lang._itemNameCache[4075]; + Lang._mapLegendCache[MapHelper.TileToLookup(15, 0)] = Language.GetText("MapObject.Chair"); + Lang._mapLegendCache[MapHelper.TileToLookup(15, 1)] = Language.GetText("MapObject.Toilet"); + Lang._mapLegendCache[MapHelper.TileToLookup(16, 0)] = Language.GetText("MapObject.Anvil"); + Lang._mapLegendCache[MapHelper.TileToLookup(17, 0)] = Lang._itemNameCache[33]; + Lang._mapLegendCache[MapHelper.TileToLookup(18, 0)] = Lang._itemNameCache[36]; + Lang._mapLegendCache[MapHelper.TileToLookup(20, 0)] = Language.GetText("MapObject.Sapling"); + Lang._mapLegendCache[MapHelper.TileToLookup(590, 0)] = Language.GetText("MapObject.Sapling"); + Lang._mapLegendCache[MapHelper.TileToLookup(595, 0)] = Language.GetText("MapObject.Sapling"); + Lang._mapLegendCache[MapHelper.TileToLookup(615, 0)] = Language.GetText("MapObject.Sapling"); + Lang._mapLegendCache[MapHelper.TileToLookup(21, 0)] = Lang._itemNameCache[48]; + Lang._mapLegendCache[MapHelper.TileToLookup(467, 0)] = Lang._itemNameCache[48]; + Lang._mapLegendCache[MapHelper.TileToLookup(22, 0)] = Language.GetText("MapObject.Demonite"); + Lang._mapLegendCache[MapHelper.TileToLookup(26, 0)] = Language.GetText("MapObject.DemonAltar"); + Lang._mapLegendCache[MapHelper.TileToLookup(26, 1)] = Language.GetText("MapObject.CrimsonAltar"); + Lang._mapLegendCache[MapHelper.TileToLookup(27, 0)] = Lang._itemNameCache[63]; + Lang._mapLegendCache[MapHelper.TileToLookup(407, 0)] = Language.GetText("MapObject.Fossil"); + Lang._mapLegendCache[MapHelper.TileToLookup(412, 0)] = Lang._itemNameCache[3549]; + Lang._mapLegendCache[MapHelper.TileToLookup(441, 0)] = Lang._itemNameCache[48]; + Lang._mapLegendCache[MapHelper.TileToLookup(468, 0)] = Lang._itemNameCache[48]; + Lang._mapLegendCache[MapHelper.TileToLookup(404, 0)] = Language.GetText("MapObject.DesertFossil"); + for (int option = 0; option < 9; ++option) + Lang._mapLegendCache[MapHelper.TileToLookup(28, option)] = Language.GetText("MapObject.Pot"); + Lang._mapLegendCache[MapHelper.TileToLookup(37, 0)] = Lang._itemNameCache[116]; + Lang._mapLegendCache[MapHelper.TileToLookup(29, 0)] = Lang._itemNameCache[87]; + Lang._mapLegendCache[MapHelper.TileToLookup(31, 0)] = Lang._itemNameCache[115]; + Lang._mapLegendCache[MapHelper.TileToLookup(31, 1)] = Lang._itemNameCache[3062]; + Lang._mapLegendCache[MapHelper.TileToLookup(32, 0)] = Language.GetText("MapObject.Thorns"); + Lang._mapLegendCache[MapHelper.TileToLookup(33, 0)] = Lang._itemNameCache[105]; + Lang._mapLegendCache[MapHelper.TileToLookup(34, 0)] = Language.GetText("MapObject.Chandelier"); + Lang._mapLegendCache[MapHelper.TileToLookup(35, 0)] = Lang._itemNameCache[1813]; + Lang._mapLegendCache[MapHelper.TileToLookup(36, 0)] = Lang._itemNameCache[1869]; + Lang._mapLegendCache[MapHelper.TileToLookup(476, 0)] = Lang._itemNameCache[4040]; + Lang._mapLegendCache[MapHelper.TileToLookup(42, 0)] = Language.GetText("MapObject.Lantern"); + Lang._mapLegendCache[MapHelper.TileToLookup(48, 0)] = Lang._itemNameCache[147]; + Lang._mapLegendCache[MapHelper.TileToLookup(49, 0)] = Lang._itemNameCache[148]; + Lang._mapLegendCache[MapHelper.TileToLookup(50, 0)] = Lang._itemNameCache[149]; + Lang._mapLegendCache[MapHelper.TileToLookup(51, 0)] = Language.GetText("MapObject.Web"); + Lang._mapLegendCache[MapHelper.TileToLookup(55, 0)] = Lang._itemNameCache[171]; + Lang._mapLegendCache[MapHelper.TileToLookup(454, 0)] = Lang._itemNameCache[3746]; + Lang._mapLegendCache[MapHelper.TileToLookup(455, 0)] = Lang._itemNameCache[3747]; + Lang._mapLegendCache[MapHelper.TileToLookup(452, 0)] = Lang._itemNameCache[3742]; + Lang._mapLegendCache[MapHelper.TileToLookup(456, 0)] = Lang._itemNameCache[3748]; + Lang._mapLegendCache[MapHelper.TileToLookup(453, 0)] = Lang._itemNameCache[3744]; + Lang._mapLegendCache[MapHelper.TileToLookup(453, 1)] = Lang._itemNameCache[3745]; + Lang._mapLegendCache[MapHelper.TileToLookup(453, 2)] = Lang._itemNameCache[3743]; + Lang._mapLegendCache[MapHelper.TileToLookup(573, 0)] = Lang._itemNameCache[4710]; + Lang._mapLegendCache[MapHelper.TileToLookup(63, 0)] = Lang._itemNameCache[177]; + Lang._mapLegendCache[MapHelper.TileToLookup(64, 0)] = Lang._itemNameCache[178]; + Lang._mapLegendCache[MapHelper.TileToLookup(65, 0)] = Lang._itemNameCache[179]; + Lang._mapLegendCache[MapHelper.TileToLookup(66, 0)] = Lang._itemNameCache[180]; + Lang._mapLegendCache[MapHelper.TileToLookup(67, 0)] = Lang._itemNameCache[181]; + Lang._mapLegendCache[MapHelper.TileToLookup(68, 0)] = Lang._itemNameCache[182]; + Lang._mapLegendCache[MapHelper.TileToLookup(566, 0)] = Lang._itemNameCache[999]; + Lang._mapLegendCache[MapHelper.TileToLookup(69, 0)] = Language.GetText("MapObject.Thorn"); + Lang._mapLegendCache[MapHelper.TileToLookup(72, 0)] = Language.GetText("MapObject.GiantMushroom"); + Lang._mapLegendCache[MapHelper.TileToLookup(77, 0)] = Lang._itemNameCache[221]; + Lang._mapLegendCache[MapHelper.TileToLookup(78, 0)] = Lang._itemNameCache[222]; + Lang._mapLegendCache[MapHelper.TileToLookup(79, 0)] = Lang._itemNameCache[224]; + Lang._mapLegendCache[MapHelper.TileToLookup(80, 0)] = Lang._itemNameCache[276]; + Lang._mapLegendCache[MapHelper.TileToLookup(81, 0)] = Lang._itemNameCache[275]; + Lang._mapLegendCache[MapHelper.TileToLookup(82, 0)] = Lang._itemNameCache[313]; + Lang._mapLegendCache[MapHelper.TileToLookup(82, 1)] = Lang._itemNameCache[314]; + Lang._mapLegendCache[MapHelper.TileToLookup(82, 2)] = Lang._itemNameCache[315]; + Lang._mapLegendCache[MapHelper.TileToLookup(82, 3)] = Lang._itemNameCache[316]; + Lang._mapLegendCache[MapHelper.TileToLookup(82, 4)] = Lang._itemNameCache[317]; + Lang._mapLegendCache[MapHelper.TileToLookup(82, 5)] = Lang._itemNameCache[318]; + Lang._mapLegendCache[MapHelper.TileToLookup(82, 6)] = Lang._itemNameCache[2358]; + Lang._mapLegendCache[MapHelper.TileToLookup(83, 0)] = Lang._itemNameCache[313]; + Lang._mapLegendCache[MapHelper.TileToLookup(83, 1)] = Lang._itemNameCache[314]; + Lang._mapLegendCache[MapHelper.TileToLookup(83, 2)] = Lang._itemNameCache[315]; + Lang._mapLegendCache[MapHelper.TileToLookup(83, 3)] = Lang._itemNameCache[316]; + Lang._mapLegendCache[MapHelper.TileToLookup(83, 4)] = Lang._itemNameCache[317]; + Lang._mapLegendCache[MapHelper.TileToLookup(83, 5)] = Lang._itemNameCache[318]; + Lang._mapLegendCache[MapHelper.TileToLookup(83, 6)] = Lang._itemNameCache[2358]; + Lang._mapLegendCache[MapHelper.TileToLookup(84, 0)] = Lang._itemNameCache[313]; + Lang._mapLegendCache[MapHelper.TileToLookup(84, 1)] = Lang._itemNameCache[314]; + Lang._mapLegendCache[MapHelper.TileToLookup(84, 2)] = Lang._itemNameCache[315]; + Lang._mapLegendCache[MapHelper.TileToLookup(84, 3)] = Lang._itemNameCache[316]; + Lang._mapLegendCache[MapHelper.TileToLookup(84, 4)] = Lang._itemNameCache[317]; + Lang._mapLegendCache[MapHelper.TileToLookup(84, 5)] = Lang._itemNameCache[318]; + Lang._mapLegendCache[MapHelper.TileToLookup(84, 6)] = Lang._itemNameCache[2358]; + Lang._mapLegendCache[MapHelper.TileToLookup(85, 0)] = Lang._itemNameCache[321]; + Lang._mapLegendCache[MapHelper.TileToLookup(86, 0)] = Lang._itemNameCache[332]; + Lang._mapLegendCache[MapHelper.TileToLookup(87, 0)] = Lang._itemNameCache[333]; + Lang._mapLegendCache[MapHelper.TileToLookup(88, 0)] = Lang._itemNameCache[334]; + Lang._mapLegendCache[MapHelper.TileToLookup(89, 0)] = Lang._itemNameCache[335]; + Lang._mapLegendCache[MapHelper.TileToLookup(90, 0)] = Lang._itemNameCache[336]; + Lang._mapLegendCache[MapHelper.TileToLookup(91, 0)] = Language.GetText("MapObject.Banner"); + Lang._mapLegendCache[MapHelper.TileToLookup(92, 0)] = Lang._itemNameCache[341]; + Lang._mapLegendCache[MapHelper.TileToLookup(93, 0)] = Language.GetText("MapObject.FloorLamp"); + Lang._mapLegendCache[MapHelper.TileToLookup(94, 0)] = Lang._itemNameCache[352]; + Lang._mapLegendCache[MapHelper.TileToLookup(95, 0)] = Lang._itemNameCache[344]; + Lang._mapLegendCache[MapHelper.TileToLookup(96, 0)] = Lang._itemNameCache[345]; + Lang._mapLegendCache[MapHelper.TileToLookup(97, 0)] = Lang._itemNameCache[346]; + Lang._mapLegendCache[MapHelper.TileToLookup(98, 0)] = Lang._itemNameCache[347]; + Lang._mapLegendCache[MapHelper.TileToLookup(100, 0)] = Lang._itemNameCache[349]; + Lang._mapLegendCache[MapHelper.TileToLookup(101, 0)] = Lang._itemNameCache[354]; + Lang._mapLegendCache[MapHelper.TileToLookup(102, 0)] = Lang._itemNameCache[355]; + Lang._mapLegendCache[MapHelper.TileToLookup(103, 0)] = Lang._itemNameCache[356]; + Lang._mapLegendCache[MapHelper.TileToLookup(104, 0)] = Lang._itemNameCache[359]; + Lang._mapLegendCache[MapHelper.TileToLookup(105, 0)] = Language.GetText("MapObject.Statue"); + Lang._mapLegendCache[MapHelper.TileToLookup(105, 2)] = Language.GetText("MapObject.Vase"); + Lang._mapLegendCache[MapHelper.TileToLookup(106, 0)] = Lang._itemNameCache[363]; + Lang._mapLegendCache[MapHelper.TileToLookup(107, 0)] = Language.GetText("MapObject.Cobalt"); + Lang._mapLegendCache[MapHelper.TileToLookup(108, 0)] = Language.GetText("MapObject.Mythril"); + Lang._mapLegendCache[MapHelper.TileToLookup(111, 0)] = Language.GetText("MapObject.Adamantite"); + Lang._mapLegendCache[MapHelper.TileToLookup(114, 0)] = Lang._itemNameCache[398]; + Lang._mapLegendCache[MapHelper.TileToLookup(125, 0)] = Lang._itemNameCache[487]; + Lang._mapLegendCache[MapHelper.TileToLookup(128, 0)] = Lang._itemNameCache[498]; + Lang._mapLegendCache[MapHelper.TileToLookup(129, 0)] = Lang._itemNameCache[502]; + Lang._mapLegendCache[MapHelper.TileToLookup(132, 0)] = Lang._itemNameCache[513]; + Lang._mapLegendCache[MapHelper.TileToLookup(411, 0)] = Lang._itemNameCache[3545]; + Lang._mapLegendCache[MapHelper.TileToLookup(133, 0)] = Lang._itemNameCache[524]; + Lang._mapLegendCache[MapHelper.TileToLookup(133, 1)] = Lang._itemNameCache[1221]; + Lang._mapLegendCache[MapHelper.TileToLookup(134, 0)] = Lang._itemNameCache[525]; + Lang._mapLegendCache[MapHelper.TileToLookup(134, 1)] = Lang._itemNameCache[1220]; + Lang._mapLegendCache[MapHelper.TileToLookup(136, 0)] = Lang._itemNameCache[538]; + Lang._mapLegendCache[MapHelper.TileToLookup(137, 0)] = Language.GetText("MapObject.Trap"); + Lang._mapLegendCache[MapHelper.TileToLookup(138, 0)] = Lang._itemNameCache[540]; + Lang._mapLegendCache[MapHelper.TileToLookup(139, 0)] = Lang._itemNameCache[576]; + Lang._mapLegendCache[MapHelper.TileToLookup(142, 0)] = Lang._itemNameCache[581]; + Lang._mapLegendCache[MapHelper.TileToLookup(143, 0)] = Lang._itemNameCache[582]; + Lang._mapLegendCache[MapHelper.TileToLookup(144, 0)] = Language.GetText("MapObject.Timer"); + Lang._mapLegendCache[MapHelper.TileToLookup(149, 0)] = Language.GetText("MapObject.ChristmasLight"); + Lang._mapLegendCache[MapHelper.TileToLookup(166, 0)] = Language.GetText("MapObject.Tin"); + Lang._mapLegendCache[MapHelper.TileToLookup(167, 0)] = Language.GetText("MapObject.Lead"); + Lang._mapLegendCache[MapHelper.TileToLookup(168, 0)] = Language.GetText("MapObject.Tungsten"); + Lang._mapLegendCache[MapHelper.TileToLookup(169, 0)] = Language.GetText("MapObject.Platinum"); + Lang._mapLegendCache[MapHelper.TileToLookup(170, 0)] = Language.GetText("MapObject.PineTree"); + Lang._mapLegendCache[MapHelper.TileToLookup(171, 0)] = Lang._itemNameCache[1873]; + Lang._mapLegendCache[MapHelper.TileToLookup(172, 0)] = Language.GetText("MapObject.Sink"); + Lang._mapLegendCache[MapHelper.TileToLookup(173, 0)] = Lang._itemNameCache[349]; + Lang._mapLegendCache[MapHelper.TileToLookup(174, 0)] = Lang._itemNameCache[713]; + Lang._mapLegendCache[MapHelper.TileToLookup(178, 0)] = Lang._itemNameCache[181]; + Lang._mapLegendCache[MapHelper.TileToLookup(178, 1)] = Lang._itemNameCache[180]; + Lang._mapLegendCache[MapHelper.TileToLookup(178, 2)] = Lang._itemNameCache[177]; + Lang._mapLegendCache[MapHelper.TileToLookup(178, 3)] = Lang._itemNameCache[179]; + Lang._mapLegendCache[MapHelper.TileToLookup(178, 4)] = Lang._itemNameCache[178]; + Lang._mapLegendCache[MapHelper.TileToLookup(178, 5)] = Lang._itemNameCache[182]; + Lang._mapLegendCache[MapHelper.TileToLookup(178, 6)] = Lang._itemNameCache[999]; + Lang._mapLegendCache[MapHelper.TileToLookup(191, 0)] = Language.GetText("MapObject.LivingWood"); + Lang._mapLegendCache[MapHelper.TileToLookup(204, 0)] = Language.GetText("MapObject.Crimtane"); + Lang._mapLegendCache[MapHelper.TileToLookup(207, 0)] = Language.GetText("MapObject.WaterFountain"); + Lang._mapLegendCache[MapHelper.TileToLookup(209, 0)] = Lang._itemNameCache[928]; + Lang._mapLegendCache[MapHelper.TileToLookup(211, 0)] = Language.GetText("MapObject.Chlorophyte"); + Lang._mapLegendCache[MapHelper.TileToLookup(212, 0)] = Language.GetText("MapObject.Turret"); + Lang._mapLegendCache[MapHelper.TileToLookup(213, 0)] = Lang._itemNameCache[965]; + Lang._mapLegendCache[MapHelper.TileToLookup(214, 0)] = Lang._itemNameCache[85]; + Lang._mapLegendCache[MapHelper.TileToLookup(215, 0)] = Lang._itemNameCache[966]; + Lang._mapLegendCache[MapHelper.TileToLookup(216, 0)] = Language.GetText("MapObject.Rocket"); + Lang._mapLegendCache[MapHelper.TileToLookup(217, 0)] = Lang._itemNameCache[995]; + Lang._mapLegendCache[MapHelper.TileToLookup(218, 0)] = Lang._itemNameCache[996]; + Lang._mapLegendCache[MapHelper.TileToLookup(219, 0)] = Language.GetText("MapObject.SiltExtractinator"); + Lang._mapLegendCache[MapHelper.TileToLookup(220, 0)] = Lang._itemNameCache[998]; + Lang._mapLegendCache[MapHelper.TileToLookup(221, 0)] = Language.GetText("MapObject.Palladium"); + Lang._mapLegendCache[MapHelper.TileToLookup(222, 0)] = Language.GetText("MapObject.Orichalcum"); + Lang._mapLegendCache[MapHelper.TileToLookup(223, 0)] = Language.GetText("MapObject.Titanium"); + Lang._mapLegendCache[MapHelper.TileToLookup(227, 0)] = Lang._itemNameCache[1107]; + Lang._mapLegendCache[MapHelper.TileToLookup(227, 1)] = Lang._itemNameCache[1108]; + Lang._mapLegendCache[MapHelper.TileToLookup(227, 2)] = Lang._itemNameCache[1109]; + Lang._mapLegendCache[MapHelper.TileToLookup(227, 3)] = Lang._itemNameCache[1110]; + Lang._mapLegendCache[MapHelper.TileToLookup(227, 4)] = Lang._itemNameCache[1111]; + Lang._mapLegendCache[MapHelper.TileToLookup(227, 5)] = Lang._itemNameCache[1112]; + Lang._mapLegendCache[MapHelper.TileToLookup(227, 6)] = Lang._itemNameCache[1113]; + Lang._mapLegendCache[MapHelper.TileToLookup(227, 7)] = Lang._itemNameCache[1114]; + Lang._mapLegendCache[MapHelper.TileToLookup(227, 8)] = Lang._itemNameCache[3385]; + Lang._mapLegendCache[MapHelper.TileToLookup(227, 9)] = Lang._itemNameCache[3386]; + Lang._mapLegendCache[MapHelper.TileToLookup(227, 10)] = Lang._itemNameCache[3387]; + Lang._mapLegendCache[MapHelper.TileToLookup(227, 11)] = Lang._itemNameCache[3388]; + Lang._mapLegendCache[MapHelper.TileToLookup(228, 0)] = Lang._itemNameCache[1120]; + Lang._mapLegendCache[MapHelper.TileToLookup(231, 0)] = Language.GetText("MapObject.Larva"); + Lang._mapLegendCache[MapHelper.TileToLookup(232, 0)] = Lang._itemNameCache[1150]; + Lang._mapLegendCache[MapHelper.TileToLookup(235, 0)] = Lang._itemNameCache[1263]; + Lang._mapLegendCache[MapHelper.TileToLookup(236, 0)] = Lang._itemNameCache[1291]; + Lang._mapLegendCache[MapHelper.TileToLookup(237, 0)] = Lang._itemNameCache[1292]; + Lang._mapLegendCache[MapHelper.TileToLookup(238, 0)] = Language.GetText("MapObject.PlanterasBulb"); + Lang._mapLegendCache[MapHelper.TileToLookup(239, 0)] = Language.GetText("MapObject.MetalBar"); + Lang._mapLegendCache[MapHelper.TileToLookup(240, 0)] = Language.GetText("MapObject.Trophy"); + Lang._mapLegendCache[MapHelper.TileToLookup(240, 1)] = Language.GetText("MapObject.Painting"); + Lang._mapLegendCache[MapHelper.TileToLookup(240, 2)] = Lang._npcNameCache[21]; + Lang._mapLegendCache[MapHelper.TileToLookup(240, 3)] = Language.GetText("MapObject.ItemRack"); + Lang._mapLegendCache[MapHelper.TileToLookup(240, 4)] = Lang._itemNameCache[2442]; + Lang._mapLegendCache[MapHelper.TileToLookup(241, 0)] = Lang._itemNameCache[1417]; + Lang._mapLegendCache[MapHelper.TileToLookup(242, 0)] = Language.GetText("MapObject.Painting"); + Lang._mapLegendCache[MapHelper.TileToLookup(242, 1)] = Language.GetText("MapObject.AnimalSkin"); + Lang._mapLegendCache[MapHelper.TileToLookup(243, 0)] = Lang._itemNameCache[1430]; + Lang._mapLegendCache[MapHelper.TileToLookup(244, 0)] = Lang._itemNameCache[1449]; + Lang._mapLegendCache[MapHelper.TileToLookup(245, 0)] = Language.GetText("MapObject.Picture"); + Lang._mapLegendCache[MapHelper.TileToLookup(246, 0)] = Language.GetText("MapObject.Picture"); + Lang._mapLegendCache[MapHelper.TileToLookup(247, 0)] = Lang._itemNameCache[1551]; + Lang._mapLegendCache[MapHelper.TileToLookup(254, 0)] = Lang._itemNameCache[1725]; + Lang._mapLegendCache[MapHelper.TileToLookup(269, 0)] = Lang._itemNameCache[1989]; + Lang._mapLegendCache[MapHelper.TileToLookup(475, 0)] = Lang._itemNameCache[3977]; + Lang._mapLegendCache[MapHelper.TileToLookup(597, 0)] = Lang._itemNameCache[4876]; + Lang._mapLegendCache[MapHelper.TileToLookup(597, 1)] = Lang._itemNameCache[4875]; + Lang._mapLegendCache[MapHelper.TileToLookup(597, 2)] = Lang._itemNameCache[4916]; + Lang._mapLegendCache[MapHelper.TileToLookup(597, 3)] = Lang._itemNameCache[4917]; + Lang._mapLegendCache[MapHelper.TileToLookup(597, 4)] = Lang._itemNameCache[4918]; + Lang._mapLegendCache[MapHelper.TileToLookup(597, 5)] = Lang._itemNameCache[4919]; + Lang._mapLegendCache[MapHelper.TileToLookup(597, 6)] = Lang._itemNameCache[4920]; + Lang._mapLegendCache[MapHelper.TileToLookup(597, 7)] = Lang._itemNameCache[4921]; + Lang._mapLegendCache[MapHelper.TileToLookup(597, 8)] = Lang._itemNameCache[4951]; + Lang._mapLegendCache[MapHelper.TileToLookup(617, 0)] = Language.GetText("MapObject.Relic"); + Lang._mapLegendCache[MapHelper.TileToLookup(621, 0)] = Lang._itemNameCache[3750]; + Lang._mapLegendCache[MapHelper.TileToLookup(622, 0)] = Lang._itemNameCache[5008]; + Lang._mapLegendCache[MapHelper.TileToLookup(270, 0)] = Lang._itemNameCache[1993]; + Lang._mapLegendCache[MapHelper.TileToLookup(271, 0)] = Lang._itemNameCache[2005]; + Lang._mapLegendCache[MapHelper.TileToLookup(581, 0)] = Lang._itemNameCache[4848]; + Lang._mapLegendCache[MapHelper.TileToLookup(275, 0)] = Lang._itemNameCache[2162]; + Lang._mapLegendCache[MapHelper.TileToLookup(276, 0)] = Lang._itemNameCache[2163]; + Lang._mapLegendCache[MapHelper.TileToLookup(277, 0)] = Lang._itemNameCache[2164]; + Lang._mapLegendCache[MapHelper.TileToLookup(278, 0)] = Lang._itemNameCache[2165]; + Lang._mapLegendCache[MapHelper.TileToLookup(279, 0)] = Lang._itemNameCache[2166]; + Lang._mapLegendCache[MapHelper.TileToLookup(280, 0)] = Lang._itemNameCache[2167]; + Lang._mapLegendCache[MapHelper.TileToLookup(281, 0)] = Lang._itemNameCache[2168]; + Lang._mapLegendCache[MapHelper.TileToLookup(282, 0)] = Lang._itemNameCache[250]; + Lang._mapLegendCache[MapHelper.TileToLookup(543, 0)] = Lang._itemNameCache[4398]; + Lang._mapLegendCache[MapHelper.TileToLookup(598, 0)] = Lang._itemNameCache[4880]; + Lang._mapLegendCache[MapHelper.TileToLookup(413, 0)] = Language.GetText("MapObject.OrangeSquirrelCage"); + Lang._mapLegendCache[MapHelper.TileToLookup(283, 0)] = Lang._itemNameCache[2172]; + Lang._mapLegendCache[MapHelper.TileToLookup(285, 0)] = Lang._itemNameCache[2174]; + Lang._mapLegendCache[MapHelper.TileToLookup(286, 0)] = Lang._itemNameCache[2175]; + Lang._mapLegendCache[MapHelper.TileToLookup(582, 0)] = Lang._itemNameCache[4850]; + Lang._mapLegendCache[MapHelper.TileToLookup(287, 0)] = Lang._itemNameCache[2177]; + Lang._mapLegendCache[MapHelper.TileToLookup(288, 0)] = Lang._itemNameCache[2178]; + Lang._mapLegendCache[MapHelper.TileToLookup(289, 0)] = Lang._itemNameCache[2179]; + Lang._mapLegendCache[MapHelper.TileToLookup(290, 0)] = Lang._itemNameCache[2180]; + Lang._mapLegendCache[MapHelper.TileToLookup(291, 0)] = Lang._itemNameCache[2181]; + Lang._mapLegendCache[MapHelper.TileToLookup(292, 0)] = Lang._itemNameCache[2182]; + Lang._mapLegendCache[MapHelper.TileToLookup(293, 0)] = Lang._itemNameCache[2183]; + Lang._mapLegendCache[MapHelper.TileToLookup(294, 0)] = Lang._itemNameCache[2184]; + Lang._mapLegendCache[MapHelper.TileToLookup(295, 0)] = Lang._itemNameCache[2185]; + Lang._mapLegendCache[MapHelper.TileToLookup(580, 0)] = Lang._itemNameCache[4846]; + Lang._mapLegendCache[MapHelper.TileToLookup(620, 0)] = Lang._itemNameCache[4964]; + Lang._mapLegendCache[MapHelper.TileToLookup(619, 0)] = Lang._itemNameCache[4963]; + Lang._mapLegendCache[MapHelper.TileToLookup(296, 0)] = Lang._itemNameCache[2186]; + Lang._mapLegendCache[MapHelper.TileToLookup(297, 0)] = Lang._itemNameCache[2187]; + Lang._mapLegendCache[MapHelper.TileToLookup(298, 0)] = Lang._itemNameCache[2190]; + Lang._mapLegendCache[MapHelper.TileToLookup(299, 0)] = Lang._itemNameCache[2191]; + Lang._mapLegendCache[MapHelper.TileToLookup(300, 0)] = Lang._itemNameCache[2192]; + Lang._mapLegendCache[MapHelper.TileToLookup(301, 0)] = Lang._itemNameCache[2193]; + Lang._mapLegendCache[MapHelper.TileToLookup(302, 0)] = Lang._itemNameCache[2194]; + Lang._mapLegendCache[MapHelper.TileToLookup(303, 0)] = Lang._itemNameCache[2195]; + Lang._mapLegendCache[MapHelper.TileToLookup(304, 0)] = Lang._itemNameCache[2196]; + Lang._mapLegendCache[MapHelper.TileToLookup(305, 0)] = Lang._itemNameCache[2197]; + Lang._mapLegendCache[MapHelper.TileToLookup(306, 0)] = Lang._itemNameCache[2198]; + Lang._mapLegendCache[MapHelper.TileToLookup(307, 0)] = Lang._itemNameCache[2203]; + Lang._mapLegendCache[MapHelper.TileToLookup(308, 0)] = Lang._itemNameCache[2204]; + Lang._mapLegendCache[MapHelper.TileToLookup(309, 0)] = Lang._itemNameCache[2206]; + Lang._mapLegendCache[MapHelper.TileToLookup(310, 0)] = Lang._itemNameCache[2207]; + Lang._mapLegendCache[MapHelper.TileToLookup(391, 0)] = Lang._itemNameCache[3254]; + Lang._mapLegendCache[MapHelper.TileToLookup(316, 0)] = Lang._itemNameCache[2439]; + Lang._mapLegendCache[MapHelper.TileToLookup(317, 0)] = Lang._itemNameCache[2440]; + Lang._mapLegendCache[MapHelper.TileToLookup(318, 0)] = Lang._itemNameCache[2441]; + Lang._mapLegendCache[MapHelper.TileToLookup(319, 0)] = Lang._itemNameCache[2490]; + Lang._mapLegendCache[MapHelper.TileToLookup(320, 0)] = Lang._itemNameCache[2496]; + Lang._mapLegendCache[MapHelper.TileToLookup(323, 0)] = Language.GetText("MapObject.PalmTree"); + Lang._mapLegendCache[MapHelper.TileToLookup(314, 0)] = Lang._itemNameCache[2340]; + Lang._mapLegendCache[MapHelper.TileToLookup(353, 0)] = Lang._itemNameCache[2996]; + Lang._mapLegendCache[MapHelper.TileToLookup(354, 0)] = Lang._itemNameCache[2999]; + Lang._mapLegendCache[MapHelper.TileToLookup(355, 0)] = Lang._itemNameCache[3000]; + Lang._mapLegendCache[MapHelper.TileToLookup(356, 0)] = Lang._itemNameCache[3064]; + Lang._mapLegendCache[MapHelper.TileToLookup(358, 0)] = Lang._itemNameCache[3070]; + Lang._mapLegendCache[MapHelper.TileToLookup(359, 0)] = Lang._itemNameCache[3071]; + Lang._mapLegendCache[MapHelper.TileToLookup(360, 0)] = Lang._itemNameCache[3072]; + Lang._mapLegendCache[MapHelper.TileToLookup(361, 0)] = Lang._itemNameCache[3073]; + Lang._mapLegendCache[MapHelper.TileToLookup(362, 0)] = Lang._itemNameCache[3074]; + Lang._mapLegendCache[MapHelper.TileToLookup(363, 0)] = Lang._itemNameCache[3075]; + Lang._mapLegendCache[MapHelper.TileToLookup(364, 0)] = Lang._itemNameCache[3076]; + Lang._mapLegendCache[MapHelper.TileToLookup(414, 0)] = Lang._itemNameCache[3566]; + Lang._mapLegendCache[MapHelper.TileToLookup(521, 0)] = Lang._itemNameCache[4327]; + Lang._mapLegendCache[MapHelper.TileToLookup(522, 0)] = Lang._itemNameCache[4328]; + Lang._mapLegendCache[MapHelper.TileToLookup(523, 0)] = Lang._itemNameCache[4329]; + Lang._mapLegendCache[MapHelper.TileToLookup(524, 0)] = Lang._itemNameCache[4330]; + Lang._mapLegendCache[MapHelper.TileToLookup(525, 0)] = Lang._itemNameCache[4331]; + Lang._mapLegendCache[MapHelper.TileToLookup(526, 0)] = Lang._itemNameCache[4332]; + Lang._mapLegendCache[MapHelper.TileToLookup(527, 0)] = Lang._itemNameCache[4333]; + Lang._mapLegendCache[MapHelper.TileToLookup(542, 0)] = Lang._itemNameCache[4396]; + Lang._mapLegendCache[MapHelper.TileToLookup(365, 0)] = Lang._itemNameCache[3077]; + Lang._mapLegendCache[MapHelper.TileToLookup(366, 0)] = Lang._itemNameCache[3078]; + Lang._mapLegendCache[MapHelper.TileToLookup(373, 0)] = Language.GetText("MapObject.DrippingWater"); + Lang._mapLegendCache[MapHelper.TileToLookup(374, 0)] = Language.GetText("MapObject.DrippingLava"); + Lang._mapLegendCache[MapHelper.TileToLookup(375, 0)] = Language.GetText("MapObject.DrippingHoney"); + Lang._mapLegendCache[MapHelper.TileToLookup(461, 0)] = Language.GetText("MapObject.SandFlow"); + Lang._mapLegendCache[MapHelper.TileToLookup(461, 1)] = Language.GetText("MapObject.SandFlow"); + Lang._mapLegendCache[MapHelper.TileToLookup(461, 2)] = Language.GetText("MapObject.SandFlow"); + Lang._mapLegendCache[MapHelper.TileToLookup(461, 3)] = Language.GetText("MapObject.SandFlow"); + Lang._mapLegendCache[MapHelper.TileToLookup(377, 0)] = Lang._itemNameCache[3198]; + Lang._mapLegendCache[MapHelper.TileToLookup(372, 0)] = Lang._itemNameCache[3117]; + Lang._mapLegendCache[MapHelper.TileToLookup(425, 0)] = Lang._itemNameCache[3617]; + Lang._mapLegendCache[MapHelper.TileToLookup(420, 0)] = Lang._itemNameCache[3603]; + Lang._mapLegendCache[MapHelper.TileToLookup(420, 1)] = Lang._itemNameCache[3604]; + Lang._mapLegendCache[MapHelper.TileToLookup(420, 2)] = Lang._itemNameCache[3605]; + Lang._mapLegendCache[MapHelper.TileToLookup(420, 3)] = Lang._itemNameCache[3606]; + Lang._mapLegendCache[MapHelper.TileToLookup(420, 4)] = Lang._itemNameCache[3607]; + Lang._mapLegendCache[MapHelper.TileToLookup(420, 5)] = Lang._itemNameCache[3608]; + Lang._mapLegendCache[MapHelper.TileToLookup(423, 0)] = Lang._itemNameCache[3613]; + Lang._mapLegendCache[MapHelper.TileToLookup(423, 1)] = Lang._itemNameCache[3614]; + Lang._mapLegendCache[MapHelper.TileToLookup(423, 2)] = Lang._itemNameCache[3615]; + Lang._mapLegendCache[MapHelper.TileToLookup(423, 3)] = Lang._itemNameCache[3726]; + Lang._mapLegendCache[MapHelper.TileToLookup(423, 4)] = Lang._itemNameCache[3727]; + Lang._mapLegendCache[MapHelper.TileToLookup(423, 5)] = Lang._itemNameCache[3728]; + Lang._mapLegendCache[MapHelper.TileToLookup(423, 6)] = Lang._itemNameCache[3729]; + Lang._mapLegendCache[MapHelper.TileToLookup(440, 0)] = Lang._itemNameCache[3644]; + Lang._mapLegendCache[MapHelper.TileToLookup(440, 1)] = Lang._itemNameCache[3645]; + Lang._mapLegendCache[MapHelper.TileToLookup(440, 2)] = Lang._itemNameCache[3646]; + Lang._mapLegendCache[MapHelper.TileToLookup(440, 3)] = Lang._itemNameCache[3647]; + Lang._mapLegendCache[MapHelper.TileToLookup(440, 4)] = Lang._itemNameCache[3648]; + Lang._mapLegendCache[MapHelper.TileToLookup(440, 5)] = Lang._itemNameCache[3649]; + Lang._mapLegendCache[MapHelper.TileToLookup(440, 6)] = Lang._itemNameCache[3650]; + Lang._mapLegendCache[MapHelper.TileToLookup(443, 0)] = Lang._itemNameCache[3722]; + Lang._mapLegendCache[MapHelper.TileToLookup(429, 0)] = Lang._itemNameCache[3629]; + Lang._mapLegendCache[MapHelper.TileToLookup(424, 0)] = Lang._itemNameCache[3616]; + Lang._mapLegendCache[MapHelper.TileToLookup(444, 0)] = Language.GetText("MapObject.BeeHive"); + Lang._mapLegendCache[MapHelper.TileToLookup(466, 0)] = Lang._itemNameCache[3816]; + Lang._mapLegendCache[MapHelper.TileToLookup(463, 0)] = Lang._itemNameCache[3813]; + Lang._mapLegendCache[MapHelper.TileToLookup(491, 0)] = Lang._itemNameCache[4076]; + Lang._mapLegendCache[MapHelper.TileToLookup(494, 0)] = Lang._itemNameCache[4089]; + Lang._mapLegendCache[MapHelper.TileToLookup(499, 0)] = Lang._itemNameCache[4142]; + Lang._mapLegendCache[MapHelper.TileToLookup(488, 0)] = Language.GetText("MapObject.FallenLog"); + Lang._mapLegendCache[MapHelper.TileToLookup(505, 0)] = Lang._itemNameCache[4275]; + Lang._mapLegendCache[MapHelper.TileToLookup(521, 0)] = Lang._itemNameCache[4327]; + Lang._mapLegendCache[MapHelper.TileToLookup(522, 0)] = Lang._itemNameCache[4328]; + Lang._mapLegendCache[MapHelper.TileToLookup(523, 0)] = Lang._itemNameCache[4329]; + Lang._mapLegendCache[MapHelper.TileToLookup(524, 0)] = Lang._itemNameCache[4330]; + Lang._mapLegendCache[MapHelper.TileToLookup(525, 0)] = Lang._itemNameCache[4331]; + Lang._mapLegendCache[MapHelper.TileToLookup(526, 0)] = Lang._itemNameCache[4332]; + Lang._mapLegendCache[MapHelper.TileToLookup(527, 0)] = Lang._itemNameCache[4333]; + Lang._mapLegendCache[MapHelper.TileToLookup(531, 0)] = Language.GetText("MapObject.Statue"); + Lang._mapLegendCache[MapHelper.TileToLookup(349, 0)] = Language.GetText("MapObject.Statue"); + Lang._mapLegendCache[MapHelper.TileToLookup(532, 0)] = Lang._itemNameCache[4364]; + Lang._mapLegendCache[MapHelper.TileToLookup(538, 0)] = Lang._itemNameCache[4380]; + Lang._mapLegendCache[MapHelper.TileToLookup(544, 0)] = Lang._itemNameCache[4399]; + Lang._mapLegendCache[MapHelper.TileToLookup(506, 0)] = Lang._itemNameCache[4276]; + Lang._mapLegendCache[MapHelper.TileToLookup(545, 0)] = Lang._itemNameCache[4420]; + Lang._mapLegendCache[MapHelper.TileToLookup(550, 0)] = Lang._itemNameCache[4461]; + Lang._mapLegendCache[MapHelper.TileToLookup(551, 0)] = Lang._itemNameCache[4462]; + Lang._mapLegendCache[MapHelper.TileToLookup(533, 0)] = Lang._itemNameCache[4376]; + Lang._mapLegendCache[MapHelper.TileToLookup(553, 0)] = Lang._itemNameCache[4473]; + Lang._mapLegendCache[MapHelper.TileToLookup(554, 0)] = Lang._itemNameCache[4474]; + Lang._mapLegendCache[MapHelper.TileToLookup(555, 0)] = Lang._itemNameCache[4475]; + Lang._mapLegendCache[MapHelper.TileToLookup(556, 0)] = Lang._itemNameCache[4476]; + Lang._mapLegendCache[MapHelper.TileToLookup(558, 0)] = Lang._itemNameCache[4481]; + Lang._mapLegendCache[MapHelper.TileToLookup(559, 0)] = Lang._itemNameCache[4483]; + Lang._mapLegendCache[MapHelper.TileToLookup(599, 0)] = Lang._itemNameCache[4882]; + Lang._mapLegendCache[MapHelper.TileToLookup(600, 0)] = Lang._itemNameCache[4883]; + Lang._mapLegendCache[MapHelper.TileToLookup(601, 0)] = Lang._itemNameCache[4884]; + Lang._mapLegendCache[MapHelper.TileToLookup(602, 0)] = Lang._itemNameCache[4885]; + Lang._mapLegendCache[MapHelper.TileToLookup(603, 0)] = Lang._itemNameCache[4886]; + Lang._mapLegendCache[MapHelper.TileToLookup(604, 0)] = Lang._itemNameCache[4887]; + Lang._mapLegendCache[MapHelper.TileToLookup(605, 0)] = Lang._itemNameCache[4888]; + Lang._mapLegendCache[MapHelper.TileToLookup(606, 0)] = Lang._itemNameCache[4889]; + Lang._mapLegendCache[MapHelper.TileToLookup(607, 0)] = Lang._itemNameCache[4890]; + Lang._mapLegendCache[MapHelper.TileToLookup(608, 0)] = Lang._itemNameCache[4891]; + Lang._mapLegendCache[MapHelper.TileToLookup(609, 0)] = Lang._itemNameCache[4892]; + Lang._mapLegendCache[MapHelper.TileToLookup(610, 0)] = Lang._itemNameCache[4893]; + Lang._mapLegendCache[MapHelper.TileToLookup(611, 0)] = Lang._itemNameCache[4894]; + Lang._mapLegendCache[MapHelper.TileToLookup(612, 0)] = Lang._itemNameCache[4895]; + Lang._mapLegendCache[MapHelper.TileToLookup(560, 0)] = Lang._itemNameCache[4599]; + Lang._mapLegendCache[MapHelper.TileToLookup(560, 1)] = Lang._itemNameCache[4600]; + Lang._mapLegendCache[MapHelper.TileToLookup(560, 2)] = Lang._itemNameCache[4601]; + Lang._mapLegendCache[MapHelper.TileToLookup(568, 0)] = Lang._itemNameCache[4655]; + Lang._mapLegendCache[MapHelper.TileToLookup(569, 0)] = Lang._itemNameCache[4656]; + Lang._mapLegendCache[MapHelper.TileToLookup(570, 0)] = Lang._itemNameCache[4657]; + Lang._mapLegendCache[MapHelper.TileToLookup(572, 0)] = Lang._itemNameCache[4695]; + Lang._mapLegendCache[MapHelper.TileToLookup(572, 1)] = Lang._itemNameCache[4696]; + Lang._mapLegendCache[MapHelper.TileToLookup(572, 2)] = Lang._itemNameCache[4697]; + Lang._mapLegendCache[MapHelper.TileToLookup(572, 3)] = Lang._itemNameCache[4698]; + Lang._mapLegendCache[MapHelper.TileToLookup(572, 4)] = Lang._itemNameCache[4699]; + Lang._mapLegendCache[MapHelper.TileToLookup(572, 5)] = Lang._itemNameCache[4700]; + Lang._mapLegendCache[MapHelper.TileToLookup(497, 0)] = Language.GetText("MapObject.Toilet"); + } + + public static NetworkText CreateDeathMessage( + string deadPlayerName, + int plr = -1, + int npc = -1, + int proj = -1, + int other = -1, + int projType = 0, + int plrItemType = 0) + { + NetworkText networkText1 = NetworkText.Empty; + NetworkText networkText2 = NetworkText.Empty; + NetworkText networkText3 = NetworkText.Empty; + NetworkText networkText4 = NetworkText.Empty; + if (proj >= 0) + networkText1 = NetworkText.FromKey(Lang.GetProjectileName(projType).Key); + if (npc >= 0) + networkText2 = Main.npc[npc].GetGivenOrTypeNetName(); + if (plr >= 0 && plr < (int) byte.MaxValue) + networkText3 = NetworkText.FromLiteral(Main.player[plr].name); + if (plrItemType >= 0) + networkText4 = NetworkText.FromKey(Lang.GetItemName(plrItemType).Key); + bool flag1 = networkText1 != NetworkText.Empty; + bool flag2 = plr >= 0 && plr < (int) byte.MaxValue; + bool flag3 = networkText2 != NetworkText.Empty; + NetworkText networkText5 = NetworkText.Empty; + NetworkText empty = NetworkText.Empty; + NetworkText networkText6 = NetworkText.FromKey(Language.RandomFromCategory("DeathTextGeneric").Key, (object) deadPlayerName, (object) Main.worldName); + if (flag2) + networkText5 = NetworkText.FromKey("DeathSource.Player", (object) networkText6, (object) networkText3, flag1 ? (object) networkText1 : (object) networkText4); + else if (flag3) + networkText5 = NetworkText.FromKey("DeathSource.NPC", (object) networkText6, (object) networkText2); + else if (flag1) + { + networkText5 = NetworkText.FromKey("DeathSource.Projectile", (object) networkText6, (object) networkText1); + } + else + { + switch (other) + { + case 0: + networkText5 = NetworkText.FromKey("DeathText.Fell_" + (object) (Main.rand.Next(2) + 1), (object) deadPlayerName); + break; + case 1: + networkText5 = NetworkText.FromKey("DeathText.Drowned_" + (object) (Main.rand.Next(4) + 1), (object) deadPlayerName); + break; + case 2: + networkText5 = NetworkText.FromKey("DeathText.Lava_" + (object) (Main.rand.Next(4) + 1), (object) deadPlayerName); + break; + case 3: + networkText5 = NetworkText.FromKey("DeathText.Default", (object) networkText6); + break; + case 4: + networkText5 = NetworkText.FromKey("DeathText.Slain", (object) deadPlayerName); + break; + case 5: + networkText5 = NetworkText.FromKey("DeathText.Petrified_" + (object) (Main.rand.Next(4) + 1), (object) deadPlayerName); + break; + case 6: + networkText5 = NetworkText.FromKey("DeathText.Stabbed", (object) deadPlayerName); + break; + case 7: + networkText5 = NetworkText.FromKey("DeathText.Suffocated", (object) deadPlayerName); + break; + case 8: + networkText5 = NetworkText.FromKey("DeathText.Burned", (object) deadPlayerName); + break; + case 9: + networkText5 = NetworkText.FromKey("DeathText.Poisoned", (object) deadPlayerName); + break; + case 10: + networkText5 = NetworkText.FromKey("DeathText.Electrocuted", (object) deadPlayerName); + break; + case 11: + networkText5 = NetworkText.FromKey("DeathText.TriedToEscape", (object) deadPlayerName); + break; + case 12: + networkText5 = NetworkText.FromKey("DeathText.WasLicked", (object) deadPlayerName); + break; + case 13: + networkText5 = NetworkText.FromKey("DeathText.Teleport_1", (object) deadPlayerName); + break; + case 14: + networkText5 = NetworkText.FromKey("DeathText.Teleport_2_Male", (object) deadPlayerName); + break; + case 15: + networkText5 = NetworkText.FromKey("DeathText.Teleport_2_Female", (object) deadPlayerName); + break; + case 16: + networkText5 = NetworkText.FromKey("DeathText.Inferno", (object) deadPlayerName); + break; + case 254: + networkText5 = NetworkText.Empty; + break; + case (int) byte.MaxValue: + networkText5 = NetworkText.FromKey("DeathText.Slain", (object) deadPlayerName); + break; + } + } + return networkText5; + } + + public static NetworkText GetInvasionWaveText(int wave, params short[] npcIds) + { + NetworkText[] networkTextArray = new NetworkText[npcIds.Length + 1]; + for (int index = 0; index < npcIds.Length; ++index) + networkTextArray[index + 1] = NetworkText.FromKey(Lang.GetNPCName((int) npcIds[index]).Key); + switch (wave) + { + case -1: + networkTextArray[0] = NetworkText.FromKey("Game.FinalWave"); + break; + case 1: + networkTextArray[0] = NetworkText.FromKey("Game.FirstWave"); + break; + default: + networkTextArray[0] = NetworkText.FromKey("Game.Wave", (object) wave); + break; + } + return NetworkText.FromKey("Game.InvasionWave_Type" + (object) npcIds.Length, (object[]) networkTextArray); + } + + public static string LocalizedDuration( + TimeSpan time, + bool abbreviated, + bool showAllAvailableUnits) + { + string str1 = ""; + abbreviated |= !GameCulture.FromCultureName(GameCulture.CultureName.English).IsActive; + if (time.Days > 0) + { + int days = time.Days; + if (!showAllAvailableUnits && time > TimeSpan.FromDays(1.0)) + ++days; + string str2 = str1 + (object) days + (abbreviated ? (object) (" " + Language.GetTextValue("Misc.ShortDays")) : (days == 1 ? (object) " day" : (object) " days")); + if (!showAllAvailableUnits) + return str2; + str1 = str2 + " "; + } + if (time.Hours > 0) + { + int hours = time.Hours; + if (!showAllAvailableUnits && time > TimeSpan.FromHours(1.0)) + ++hours; + string str3 = str1 + (object) hours + (abbreviated ? (object) (" " + Language.GetTextValue("Misc.ShortHours")) : (hours == 1 ? (object) " hour" : (object) " hours")); + if (!showAllAvailableUnits) + return str3; + str1 = str3 + " "; + } + if (time.Minutes > 0) + { + int minutes = time.Minutes; + if (!showAllAvailableUnits && time > TimeSpan.FromMinutes(1.0)) + ++minutes; + string str4 = str1 + (object) minutes + (abbreviated ? (object) (" " + Language.GetTextValue("Misc.ShortMinutes")) : (minutes == 1 ? (object) " minute" : (object) " minutes")); + if (!showAllAvailableUnits) + return str4; + str1 = str4 + " "; + } + return str1 + (object) time.Seconds + (abbreviated ? (object) (" " + Language.GetTextValue("Misc.ShortSeconds")) : (time.Seconds == 1 ? (object) " second" : (object) " seconds")); + } + } +} diff --git a/Libraries/DotNetZip/Ionic/Zip/CF.dll b/Libraries/DotNetZip/Ionic/Zip/CF.dll new file mode 100644 index 0000000..61a974e Binary files /dev/null and b/Libraries/DotNetZip/Ionic/Zip/CF.dll differ diff --git a/Libraries/JSON/NET/Newtonsoft/Json.dll b/Libraries/JSON/NET/Newtonsoft/Json.dll new file mode 100644 index 0000000..9c83621 Binary files /dev/null and b/Libraries/JSON/NET/Newtonsoft/Json.dll differ diff --git a/Libraries/RailSDK/Windows/RailSDK/Net.dll b/Libraries/RailSDK/Windows/RailSDK/Net.dll new file mode 100644 index 0000000..e0aa636 Binary files /dev/null and b/Libraries/RailSDK/Windows/RailSDK/Net.dll differ diff --git a/Libraries/ReLogic/ReLogic.dll b/Libraries/ReLogic/ReLogic.dll new file mode 100644 index 0000000..4a6035f Binary files /dev/null and b/Libraries/ReLogic/ReLogic.dll differ diff --git a/Libraries/Steamworks/NET/Windows/Steamworks/NET.dll b/Libraries/Steamworks/NET/Windows/Steamworks/NET.dll new file mode 100644 index 0000000..66920e7 Binary files /dev/null and b/Libraries/Steamworks/NET/Windows/Steamworks/NET.dll differ diff --git a/Lighting.cs b/Lighting.cs new file mode 100644 index 0000000..f044776 --- /dev/null +++ b/Lighting.cs @@ -0,0 +1,423 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Lighting +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using Terraria.Graphics; +using Terraria.Graphics.Light; +using Terraria.ID; + +namespace Terraria +{ + public class Lighting + { + private const float DEFAULT_GLOBAL_BRIGHTNESS = 1.2f; + private const float BLIND_GLOBAL_BRIGHTNESS = 1f; + [Obsolete] + public static int OffScreenTiles = 45; + private static LightMode _mode = LightMode.Color; + private static readonly LightingEngine NewEngine = new LightingEngine(Main.ActiveWorld); + private static readonly LegacyLighting LegacyEngine = new LegacyLighting(Main.Camera, Main.ActiveWorld); + private static ILightingEngine _activeEngine; + + public static float GlobalBrightness { get; set; } + + public static LightMode Mode + { + get => Lighting._mode; + set + { + Lighting._mode = value; + switch (Lighting._mode) + { + case LightMode.White: + Lighting._activeEngine = (ILightingEngine) Lighting.LegacyEngine; + Lighting.LegacyEngine.Mode = 1; + break; + case LightMode.Retro: + Lighting._activeEngine = (ILightingEngine) Lighting.LegacyEngine; + Lighting.LegacyEngine.Mode = 2; + break; + case LightMode.Trippy: + Lighting._activeEngine = (ILightingEngine) Lighting.LegacyEngine; + Lighting.LegacyEngine.Mode = 3; + break; + case LightMode.Color: + Lighting._activeEngine = (ILightingEngine) Lighting.NewEngine; + Lighting.LegacyEngine.Mode = 0; + Lighting.OffScreenTiles = 35; + break; + } + Main.renderCount = 0; + Main.renderNow = false; + } + } + + public static bool NotRetro => Lighting.Mode != LightMode.Retro && Lighting.Mode != LightMode.Trippy; + + public static bool UsingNewLighting => Lighting.Mode == LightMode.Color; + + public static bool UpdateEveryFrame => Main.LightingEveryFrame && !Main.RenderTargetsRequired && !Lighting.NotRetro; + + public static void Initialize() + { + Lighting.GlobalBrightness = 1.2f; + Lighting.NewEngine.Rebuild(); + Lighting.LegacyEngine.Rebuild(); + if (Lighting._activeEngine != null) + return; + Lighting.Mode = LightMode.Color; + } + + public static void LightTiles(int firstX, int lastX, int firstY, int lastY) + { + Main.render = true; + Lighting.UpdateGlobalBrightness(); + Lighting._activeEngine.ProcessArea(new Rectangle(firstX, firstY, lastX - firstX, lastY - firstY)); + } + + private static void UpdateGlobalBrightness() + { + Lighting.GlobalBrightness = 1.2f; + if (!Main.player[Main.myPlayer].blind) + return; + Lighting.GlobalBrightness = 1f; + } + + public static float Brightness(int x, int y) + { + Vector3 color = Lighting._activeEngine.GetColor(x, y); + return (float) ((double) Lighting.GlobalBrightness * ((double) color.X + (double) color.Y + (double) color.Z) / 3.0); + } + + public static Vector3 GetSubLight(Vector2 position) + { + Vector2 vector2_1 = position / 16f - new Vector2(0.5f, 0.5f); + Vector2 vector2_2 = new Vector2(vector2_1.X % 1f, vector2_1.Y % 1f); + int x1 = (int) vector2_1.X; + int y = (int) vector2_1.Y; + Vector3 color1 = Lighting._activeEngine.GetColor(x1, y); + Vector3 color2 = Lighting._activeEngine.GetColor(x1 + 1, y); + Vector3 color3 = Lighting._activeEngine.GetColor(x1, y + 1); + Vector3 color4 = Lighting._activeEngine.GetColor(x1 + 1, y + 1); + Vector3 vector3 = color2; + double x2 = (double) vector2_2.X; + return Vector3.Lerp(Vector3.Lerp(color1, vector3, (float) x2), Vector3.Lerp(color3, color4, vector2_2.X), vector2_2.Y); + } + + public static void AddLight(Vector2 position, Vector3 rgb) => Lighting.AddLight((int) ((double) position.X / 16.0), (int) ((double) position.Y / 16.0), rgb.X, rgb.Y, rgb.Z); + + public static void AddLight(Vector2 position, float r, float g, float b) => Lighting.AddLight((int) ((double) position.X / 16.0), (int) ((double) position.Y / 16.0), r, g, b); + + public static void AddLight(int i, int j, int torchID, float lightAmount) + { + float R; + float G; + float B; + TorchID.TorchColor(torchID, out R, out G, out B); + Lighting._activeEngine.AddLight(i, j, new Vector3(R * lightAmount, G * lightAmount, B * lightAmount)); + } + + public static void AddLight(Vector2 position, int torchID) + { + float R; + float G; + float B; + TorchID.TorchColor(torchID, out R, out G, out B); + Lighting.AddLight((int) position.X / 16, (int) position.Y / 16, R, G, B); + } + + public static void AddLight(int i, int j, float r, float g, float b) + { + if (Main.gamePaused || Main.netMode == 2) + return; + Lighting._activeEngine.AddLight(i, j, new Vector3(r, g, b)); + } + + public static void NextLightMode() + { + ++Lighting.Mode; + if (!Enum.IsDefined(typeof (LightMode), (object) Lighting.Mode)) + Lighting.Mode = LightMode.White; + Lighting.Clear(); + } + + public static void Clear() => Lighting._activeEngine.Clear(); + + public static Color GetColor(Point tileCoords) => Main.gameMenu ? Color.White : new Color(Lighting._activeEngine.GetColor(tileCoords.X, tileCoords.Y) * Lighting.GlobalBrightness); + + public static Color GetColor(Point tileCoords, Color originalColor) => Main.gameMenu ? originalColor : new Color(Lighting._activeEngine.GetColor(tileCoords.X, tileCoords.Y) * originalColor.ToVector3()); + + public static Color GetColor(int x, int y, Color oldColor) => Main.gameMenu ? oldColor : new Color(Lighting._activeEngine.GetColor(x, y) * oldColor.ToVector3()); + + public static Color GetColor(int x, int y) + { + if (Main.gameMenu) + return Color.White; + Color color1 = new Color(); + Vector3 color2 = Lighting._activeEngine.GetColor(x, y); + float num1 = Lighting.GlobalBrightness * (float) byte.MaxValue; + int num2 = (int) ((double) color2.X * (double) num1); + int num3 = (int) ((double) color2.Y * (double) num1); + int num4 = (int) ((double) color2.Z * (double) num1); + if (num2 > (int) byte.MaxValue) + num2 = (int) byte.MaxValue; + if (num3 > (int) byte.MaxValue) + num3 = (int) byte.MaxValue; + if (num4 > (int) byte.MaxValue) + num4 = (int) byte.MaxValue; + int num5 = num4 << 16; + int num6 = num3 << 8; + color1.PackedValue = (uint) (num2 | num6 | num5 | -16777216); + return color1; + } + + public static void GetColor9Slice(int centerX, int centerY, ref Color[] slices) + { + int index = 0; + for (int x = centerX - 1; x <= centerX + 1; ++x) + { + for (int y = centerY - 1; y <= centerY + 1; ++y) + { + Vector3 color = Lighting._activeEngine.GetColor(x, y); + int num1 = (int) ((double) byte.MaxValue * (double) color.X * (double) Lighting.GlobalBrightness); + int num2 = (int) ((double) byte.MaxValue * (double) color.Y * (double) Lighting.GlobalBrightness); + int num3 = (int) ((double) byte.MaxValue * (double) color.Z * (double) Lighting.GlobalBrightness); + if (num1 > (int) byte.MaxValue) + num1 = (int) byte.MaxValue; + if (num2 > (int) byte.MaxValue) + num2 = (int) byte.MaxValue; + if (num3 > (int) byte.MaxValue) + num3 = (int) byte.MaxValue; + int num4 = num3 << 16; + int num5 = num2 << 8; + slices[index].PackedValue = (uint) (num1 | num5 | num4 | -16777216); + index += 3; + } + index -= 8; + } + } + + public static void GetColor9Slice(int x, int y, ref Vector3[] slices) + { + slices[0] = Lighting._activeEngine.GetColor(x - 1, y - 1) * Lighting.GlobalBrightness; + slices[3] = Lighting._activeEngine.GetColor(x - 1, y) * Lighting.GlobalBrightness; + slices[6] = Lighting._activeEngine.GetColor(x - 1, y + 1) * Lighting.GlobalBrightness; + slices[1] = Lighting._activeEngine.GetColor(x, y - 1) * Lighting.GlobalBrightness; + slices[4] = Lighting._activeEngine.GetColor(x, y) * Lighting.GlobalBrightness; + slices[7] = Lighting._activeEngine.GetColor(x, y + 1) * Lighting.GlobalBrightness; + slices[2] = Lighting._activeEngine.GetColor(x + 1, y - 1) * Lighting.GlobalBrightness; + slices[5] = Lighting._activeEngine.GetColor(x + 1, y) * Lighting.GlobalBrightness; + slices[8] = Lighting._activeEngine.GetColor(x + 1, y + 1) * Lighting.GlobalBrightness; + } + + public static void GetCornerColors( + int centerX, + int centerY, + out VertexColors vertices, + float scale = 1f) + { + vertices = new VertexColors(); + int x = centerX; + int y = centerY; + Vector3 color1 = Lighting._activeEngine.GetColor(x, y); + Vector3 color2 = Lighting._activeEngine.GetColor(x, y - 1); + Vector3 color3 = Lighting._activeEngine.GetColor(x, y + 1); + Vector3 color4 = Lighting._activeEngine.GetColor(x - 1, y); + Vector3 color5 = Lighting._activeEngine.GetColor(x + 1, y); + Vector3 color6 = Lighting._activeEngine.GetColor(x - 1, y - 1); + Vector3 color7 = Lighting._activeEngine.GetColor(x + 1, y - 1); + Vector3 color8 = Lighting._activeEngine.GetColor(x - 1, y + 1); + Vector3 color9 = Lighting._activeEngine.GetColor(x + 1, y + 1); + float num1 = (float) ((double) Lighting.GlobalBrightness * (double) scale * 63.75); + int num2 = (int) (((double) color2.X + (double) color6.X + (double) color4.X + (double) color1.X) * (double) num1); + int num3 = (int) (((double) color2.Y + (double) color6.Y + (double) color4.Y + (double) color1.Y) * (double) num1); + int num4 = (int) (((double) color2.Z + (double) color6.Z + (double) color4.Z + (double) color1.Z) * (double) num1); + if (num2 > (int) byte.MaxValue) + num2 = (int) byte.MaxValue; + if (num3 > (int) byte.MaxValue) + num3 = (int) byte.MaxValue; + if (num4 > (int) byte.MaxValue) + num4 = (int) byte.MaxValue; + int num5 = num3 << 8; + int num6 = num4 << 16; + vertices.TopLeftColor.PackedValue = (uint) (num2 | num5 | num6 | -16777216); + int num7 = (int) (((double) color2.X + (double) color7.X + (double) color5.X + (double) color1.X) * (double) num1); + int num8 = (int) (((double) color2.Y + (double) color7.Y + (double) color5.Y + (double) color1.Y) * (double) num1); + int num9 = (int) (((double) color2.Z + (double) color7.Z + (double) color5.Z + (double) color1.Z) * (double) num1); + if (num7 > (int) byte.MaxValue) + num7 = (int) byte.MaxValue; + if (num8 > (int) byte.MaxValue) + num8 = (int) byte.MaxValue; + if (num9 > (int) byte.MaxValue) + num9 = (int) byte.MaxValue; + int num10 = num8 << 8; + int num11 = num9 << 16; + vertices.TopRightColor.PackedValue = (uint) (num7 | num10 | num11 | -16777216); + int num12 = (int) (((double) color3.X + (double) color8.X + (double) color4.X + (double) color1.X) * (double) num1); + int num13 = (int) (((double) color3.Y + (double) color8.Y + (double) color4.Y + (double) color1.Y) * (double) num1); + int num14 = (int) (((double) color3.Z + (double) color8.Z + (double) color4.Z + (double) color1.Z) * (double) num1); + if (num12 > (int) byte.MaxValue) + num12 = (int) byte.MaxValue; + if (num13 > (int) byte.MaxValue) + num13 = (int) byte.MaxValue; + if (num14 > (int) byte.MaxValue) + num14 = (int) byte.MaxValue; + int num15 = num13 << 8; + int num16 = num14 << 16; + vertices.BottomLeftColor.PackedValue = (uint) (num12 | num15 | num16 | -16777216); + int num17 = (int) (((double) color3.X + (double) color9.X + (double) color5.X + (double) color1.X) * (double) num1); + int num18 = (int) (((double) color3.Y + (double) color9.Y + (double) color5.Y + (double) color1.Y) * (double) num1); + int num19 = (int) (((double) color3.Z + (double) color9.Z + (double) color5.Z + (double) color1.Z) * (double) num1); + if (num17 > (int) byte.MaxValue) + num17 = (int) byte.MaxValue; + if (num18 > (int) byte.MaxValue) + num18 = (int) byte.MaxValue; + if (num19 > (int) byte.MaxValue) + num19 = (int) byte.MaxValue; + int num20 = num18 << 8; + int num21 = num19 << 16; + vertices.BottomRightColor.PackedValue = (uint) (num17 | num20 | num21 | -16777216); + } + + public static void GetColor4Slice(int centerX, int centerY, ref Color[] slices) + { + int x = centerX; + int y = centerY; + Vector3 color1 = Lighting._activeEngine.GetColor(x, y - 1); + Vector3 color2 = Lighting._activeEngine.GetColor(x, y + 1); + Vector3 color3 = Lighting._activeEngine.GetColor(x - 1, y); + Vector3 color4 = Lighting._activeEngine.GetColor(x + 1, y); + double num1 = (double) color1.X + (double) color1.Y + (double) color1.Z; + float num2 = color2.X + color2.Y + color2.Z; + float num3 = color4.X + color4.Y + color4.Z; + float num4 = color3.X + color3.Y + color3.Z; + if (num1 >= (double) num4) + { + int num5 = (int) ((double) byte.MaxValue * (double) color3.X * (double) Lighting.GlobalBrightness); + int num6 = (int) ((double) byte.MaxValue * (double) color3.Y * (double) Lighting.GlobalBrightness); + int num7 = (int) ((double) byte.MaxValue * (double) color3.Z * (double) Lighting.GlobalBrightness); + if (num5 > (int) byte.MaxValue) + num5 = (int) byte.MaxValue; + if (num6 > (int) byte.MaxValue) + num6 = (int) byte.MaxValue; + if (num7 > (int) byte.MaxValue) + num7 = (int) byte.MaxValue; + slices[0] = new Color((int) (byte) num5, (int) (byte) num6, (int) (byte) num7, (int) byte.MaxValue); + } + else + { + int num8 = (int) ((double) byte.MaxValue * (double) color1.X * (double) Lighting.GlobalBrightness); + int num9 = (int) ((double) byte.MaxValue * (double) color1.Y * (double) Lighting.GlobalBrightness); + int num10 = (int) ((double) byte.MaxValue * (double) color1.Z * (double) Lighting.GlobalBrightness); + if (num8 > (int) byte.MaxValue) + num8 = (int) byte.MaxValue; + if (num9 > (int) byte.MaxValue) + num9 = (int) byte.MaxValue; + if (num10 > (int) byte.MaxValue) + num10 = (int) byte.MaxValue; + slices[0] = new Color((int) (byte) num8, (int) (byte) num9, (int) (byte) num10, (int) byte.MaxValue); + } + if (num1 >= (double) num3) + { + int num11 = (int) ((double) byte.MaxValue * (double) color4.X * (double) Lighting.GlobalBrightness); + int num12 = (int) ((double) byte.MaxValue * (double) color4.Y * (double) Lighting.GlobalBrightness); + int num13 = (int) ((double) byte.MaxValue * (double) color4.Z * (double) Lighting.GlobalBrightness); + if (num11 > (int) byte.MaxValue) + num11 = (int) byte.MaxValue; + if (num12 > (int) byte.MaxValue) + num12 = (int) byte.MaxValue; + if (num13 > (int) byte.MaxValue) + num13 = (int) byte.MaxValue; + slices[1] = new Color((int) (byte) num11, (int) (byte) num12, (int) (byte) num13, (int) byte.MaxValue); + } + else + { + int num14 = (int) ((double) byte.MaxValue * (double) color1.X * (double) Lighting.GlobalBrightness); + int num15 = (int) ((double) byte.MaxValue * (double) color1.Y * (double) Lighting.GlobalBrightness); + int num16 = (int) ((double) byte.MaxValue * (double) color1.Z * (double) Lighting.GlobalBrightness); + if (num14 > (int) byte.MaxValue) + num14 = (int) byte.MaxValue; + if (num15 > (int) byte.MaxValue) + num15 = (int) byte.MaxValue; + if (num16 > (int) byte.MaxValue) + num16 = (int) byte.MaxValue; + slices[1] = new Color((int) (byte) num14, (int) (byte) num15, (int) (byte) num16, (int) byte.MaxValue); + } + if ((double) num2 >= (double) num4) + { + int num17 = (int) ((double) byte.MaxValue * (double) color3.X * (double) Lighting.GlobalBrightness); + int num18 = (int) ((double) byte.MaxValue * (double) color3.Y * (double) Lighting.GlobalBrightness); + int num19 = (int) ((double) byte.MaxValue * (double) color3.Z * (double) Lighting.GlobalBrightness); + if (num17 > (int) byte.MaxValue) + num17 = (int) byte.MaxValue; + if (num18 > (int) byte.MaxValue) + num18 = (int) byte.MaxValue; + if (num19 > (int) byte.MaxValue) + num19 = (int) byte.MaxValue; + slices[2] = new Color((int) (byte) num17, (int) (byte) num18, (int) (byte) num19, (int) byte.MaxValue); + } + else + { + int num20 = (int) ((double) byte.MaxValue * (double) color2.X * (double) Lighting.GlobalBrightness); + int num21 = (int) ((double) byte.MaxValue * (double) color2.Y * (double) Lighting.GlobalBrightness); + int num22 = (int) ((double) byte.MaxValue * (double) color2.Z * (double) Lighting.GlobalBrightness); + if (num20 > (int) byte.MaxValue) + num20 = (int) byte.MaxValue; + if (num21 > (int) byte.MaxValue) + num21 = (int) byte.MaxValue; + if (num22 > (int) byte.MaxValue) + num22 = (int) byte.MaxValue; + slices[2] = new Color((int) (byte) num20, (int) (byte) num21, (int) (byte) num22, (int) byte.MaxValue); + } + if ((double) num2 >= (double) num3) + { + int num23 = (int) ((double) byte.MaxValue * (double) color4.X * (double) Lighting.GlobalBrightness); + int num24 = (int) ((double) byte.MaxValue * (double) color4.Y * (double) Lighting.GlobalBrightness); + int num25 = (int) ((double) byte.MaxValue * (double) color4.Z * (double) Lighting.GlobalBrightness); + if (num23 > (int) byte.MaxValue) + num23 = (int) byte.MaxValue; + if (num24 > (int) byte.MaxValue) + num24 = (int) byte.MaxValue; + if (num25 > (int) byte.MaxValue) + num25 = (int) byte.MaxValue; + slices[3] = new Color((int) (byte) num23, (int) (byte) num24, (int) (byte) num25, (int) byte.MaxValue); + } + else + { + int num26 = (int) ((double) byte.MaxValue * (double) color2.X * (double) Lighting.GlobalBrightness); + int num27 = (int) ((double) byte.MaxValue * (double) color2.Y * (double) Lighting.GlobalBrightness); + int num28 = (int) ((double) byte.MaxValue * (double) color2.Z * (double) Lighting.GlobalBrightness); + if (num26 > (int) byte.MaxValue) + num26 = (int) byte.MaxValue; + if (num27 > (int) byte.MaxValue) + num27 = (int) byte.MaxValue; + if (num28 > (int) byte.MaxValue) + num28 = (int) byte.MaxValue; + slices[3] = new Color((int) (byte) num26, (int) (byte) num27, (int) (byte) num28, (int) byte.MaxValue); + } + } + + public static void GetColor4Slice(int x, int y, ref Vector3[] slices) + { + Vector3 color1 = Lighting._activeEngine.GetColor(x, y - 1); + Vector3 color2 = Lighting._activeEngine.GetColor(x, y + 1); + Vector3 color3 = Lighting._activeEngine.GetColor(x - 1, y); + Vector3 color4 = Lighting._activeEngine.GetColor(x + 1, y); + double num1 = (double) color1.X + (double) color1.Y + (double) color1.Z; + float num2 = color2.X + color2.Y + color2.Z; + float num3 = color4.X + color4.Y + color4.Z; + float num4 = color3.X + color3.Y + color3.Z; + slices[0] = num1 < (double) num4 ? color1 * Lighting.GlobalBrightness : color3 * Lighting.GlobalBrightness; + slices[1] = num1 < (double) num3 ? color1 * Lighting.GlobalBrightness : color4 * Lighting.GlobalBrightness; + slices[2] = (double) num2 < (double) num4 ? color2 * Lighting.GlobalBrightness : color3 * Lighting.GlobalBrightness; + if ((double) num2 >= (double) num3) + slices[3] = color4 * Lighting.GlobalBrightness; + else + slices[3] = color2 * Lighting.GlobalBrightness; + } + } +} diff --git a/Liquid.cs b/Liquid.cs new file mode 100644 index 0000000..3a132a5 --- /dev/null +++ b/Liquid.cs @@ -0,0 +1,1215 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Liquid +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.Audio; +using Terraria.GameContent.NetModules; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ObjectData; + +namespace Terraria +{ + public class Liquid + { + public const int maxLiquidBuffer = 50000; + public static int maxLiquid = 25000; + public static int skipCount; + public static int stuckCount; + public static int stuckAmount; + public static int cycles = 10; + public static int curMaxLiquid = 0; + public static int numLiquid; + public static bool stuck; + public static bool quickFall; + public static bool quickSettle; + private static int wetCounter; + public static int panicCounter; + public static bool panicMode; + public static int panicY; + public int x; + public int y; + public int kill; + public int delay; + private static HashSet _netChangeSet = new HashSet(); + private static HashSet _swapNetChangeSet = new HashSet(); + + public static void NetSendLiquid(int x, int y) + { + if (WorldGen.gen) + return; + lock (Liquid._netChangeSet) + Liquid._netChangeSet.Add((x & (int) ushort.MaxValue) << 16 | y & (int) ushort.MaxValue); + } + + public static void tilesIgnoreWater(bool ignoreSolids) + { + Main.tileSolid[138] = !ignoreSolids; + Main.tileSolid[484] = !ignoreSolids; + Main.tileSolid[546] = !ignoreSolids; + } + + public static void worldGenTilesIgnoreWater(bool ignoreSolids) + { + Main.tileSolid[10] = !ignoreSolids; + Main.tileSolid[192] = !ignoreSolids; + Main.tileSolid[191] = !ignoreSolids; + Main.tileSolid[190] = !ignoreSolids; + } + + public static void ReInit() + { + Liquid.skipCount = 0; + Liquid.stuckCount = 0; + Liquid.stuckAmount = 0; + Liquid.cycles = 10; + Liquid.curMaxLiquid = Liquid.maxLiquid; + Liquid.numLiquid = 0; + Liquid.stuck = false; + Liquid.quickFall = false; + Liquid.quickSettle = false; + Liquid.wetCounter = 0; + Liquid.panicCounter = 0; + Liquid.panicMode = false; + Liquid.panicY = 0; + if (!Main.Setting_UseReducedMaxLiquids) + return; + Liquid.curMaxLiquid = 5000; + } + + public static void QuickWater(int verbose = 0, int minY = -1, int maxY = -1) + { + Main.tileSolid[379] = true; + Liquid.tilesIgnoreWater(true); + if (minY == -1) + minY = 3; + if (maxY == -1) + maxY = Main.maxTilesY - 3; + for (int index = maxY; index >= minY; --index) + { + Liquid.UpdateProgressDisplay(verbose, minY, maxY, index); + for (int originX = 4; originX < Main.maxTilesX - 4; ++originX) + { + if (Main.tile[originX, index].liquid != (byte) 0) + Liquid.SettleWaterAt(originX, index); + } + } + Liquid.tilesIgnoreWater(false); + } + + private static void SettleWaterAt(int originX, int originY) + { + Tile tile1 = Main.tile[originX, originY]; + Liquid.tilesIgnoreWater(true); + if (tile1.liquid == (byte) 0) + return; + int X = originX; + int Y = originY; + bool tileAtXYHasLava = tile1.lava(); + bool tileAtXYHasHoney = tile1.honey(); + int liquid = (int) tile1.liquid; + byte num1 = tile1.liquidType(); + tile1.liquid = (byte) 0; + bool flag1 = true; + while (true) + { + Tile tile2 = Main.tile[X, Y + 1]; + bool flag2 = false; + for (; Y < Main.maxTilesY - 5 && tile2.liquid == (byte) 0 && (!tile2.nactive() || !Main.tileSolid[(int) tile2.type] || Main.tileSolidTop[(int) tile2.type]); tile2 = Main.tile[X, Y + 1]) + { + ++Y; + flag2 = true; + flag1 = false; + } + if (flag2 && WorldGen.gen && !tileAtXYHasHoney && Y > WorldGen.waterLine) + num1 = (byte) 1; + int num2 = -1; + int num3 = 0; + int num4 = -1; + int num5 = 0; + bool flag3 = false; + bool flag4 = false; + bool flag5 = false; + while (true) + { + if (Main.tile[X + num3 * num2, Y].liquid == (byte) 0) + { + num4 = num2; + num5 = num3; + } + if (num2 == -1 && X + num3 * num2 < 5) + flag4 = true; + else if (num2 == 1 && X + num3 * num2 > Main.maxTilesX - 5) + flag3 = true; + Tile tile3 = Main.tile[X + num3 * num2, Y + 1]; + if (tile3.liquid != (byte) 0 && tile3.liquid != byte.MaxValue && (int) tile3.liquidType() == (int) num1) + { + int num6 = (int) byte.MaxValue - (int) tile3.liquid; + if (num6 > liquid) + num6 = liquid; + tile3.liquid += (byte) num6; + liquid -= num6; + if (liquid == 0) + goto label_34; + } + if (Y >= Main.maxTilesY - 5 || tile3.liquid != (byte) 0 || tile3.nactive() && Main.tileSolid[(int) tile3.type] && !Main.tileSolidTop[(int) tile3.type]) + { + Tile tile4 = Main.tile[X + (num3 + 1) * num2, Y]; + if (tile4.liquid != (byte) 0 && (!flag1 || num2 != 1) || tile4.nactive() && Main.tileSolid[(int) tile4.type] && !Main.tileSolidTop[(int) tile4.type]) + { + if (num2 == 1) + flag3 = true; + else + flag4 = true; + } + if (!(flag4 & flag3)) + { + if (flag3) + { + num2 = -1; + ++num3; + } + else if (flag4) + { + if (num2 == 1) + ++num3; + num2 = 1; + } + else + { + if (num2 == 1) + ++num3; + num2 = -num2; + } + } + else + goto label_34; + } + else + break; + } + flag5 = true; +label_34: + X += num5 * num4; + if (liquid != 0 && flag5) + ++Y; + else + break; + } + Main.tile[X, Y].liquid = (byte) liquid; + Main.tile[X, Y].liquidType((int) num1); + if (Main.tile[X, Y].liquid > (byte) 0) + { + Liquid.AttemptToMoveLava(X, Y, tileAtXYHasLava); + Liquid.AttemptToMoveHoney(X, Y, tileAtXYHasHoney); + } + Liquid.tilesIgnoreWater(false); + } + + private static void AttemptToMoveHoney(int X, int Y, bool tileAtXYHasHoney) + { + if (Main.tile[X - 1, Y].liquid > (byte) 0 && Main.tile[X - 1, Y].honey() != tileAtXYHasHoney) + { + if (tileAtXYHasHoney) + Liquid.HoneyCheck(X, Y); + else + Liquid.HoneyCheck(X - 1, Y); + } + else if (Main.tile[X + 1, Y].liquid > (byte) 0 && Main.tile[X + 1, Y].honey() != tileAtXYHasHoney) + { + if (tileAtXYHasHoney) + Liquid.HoneyCheck(X, Y); + else + Liquid.HoneyCheck(X + 1, Y); + } + else if (Main.tile[X, Y - 1].liquid > (byte) 0 && Main.tile[X, Y - 1].honey() != tileAtXYHasHoney) + { + if (tileAtXYHasHoney) + Liquid.HoneyCheck(X, Y); + else + Liquid.HoneyCheck(X, Y - 1); + } + else + { + if (Main.tile[X, Y + 1].liquid <= (byte) 0 || Main.tile[X, Y + 1].honey() == tileAtXYHasHoney) + return; + if (tileAtXYHasHoney) + Liquid.HoneyCheck(X, Y); + else + Liquid.HoneyCheck(X, Y + 1); + } + } + + private static void AttemptToMoveLava(int X, int Y, bool tileAtXYHasLava) + { + if (Main.tile[X - 1, Y].liquid > (byte) 0 && Main.tile[X - 1, Y].lava() != tileAtXYHasLava) + { + if (tileAtXYHasLava) + Liquid.LavaCheck(X, Y); + else + Liquid.LavaCheck(X - 1, Y); + } + else if (Main.tile[X + 1, Y].liquid > (byte) 0 && Main.tile[X + 1, Y].lava() != tileAtXYHasLava) + { + if (tileAtXYHasLava) + Liquid.LavaCheck(X, Y); + else + Liquid.LavaCheck(X + 1, Y); + } + else if (Main.tile[X, Y - 1].liquid > (byte) 0 && Main.tile[X, Y - 1].lava() != tileAtXYHasLava) + { + if (tileAtXYHasLava) + Liquid.LavaCheck(X, Y); + else + Liquid.LavaCheck(X, Y - 1); + } + else + { + if (Main.tile[X, Y + 1].liquid <= (byte) 0 || Main.tile[X, Y + 1].lava() == tileAtXYHasLava) + return; + if (tileAtXYHasLava) + Liquid.LavaCheck(X, Y); + else + Liquid.LavaCheck(X, Y + 1); + } + } + + private static void UpdateProgressDisplay(int verbose, int minY, int maxY, int y) + { + if (verbose > 0) + { + float num = (float) (maxY - y) / (float) (maxY - minY + 1) / (float) verbose; + Main.statusText = Lang.gen[27].Value + " " + (object) (int) ((double) num * 100.0 + 1.0) + "%"; + } + else + { + if (verbose >= 0) + return; + float num = (float) (maxY - y) / (float) (maxY - minY + 1) / (float) -verbose; + Main.statusText = Lang.gen[18].Value + " " + (object) (int) ((double) num * 100.0 + 1.0) + "%"; + } + } + + public void Update() + { + Main.tileSolid[379] = true; + Tile tile1 = Main.tile[this.x - 1, this.y]; + Tile tile2 = Main.tile[this.x + 1, this.y]; + Tile tile3 = Main.tile[this.x, this.y - 1]; + Tile tile4 = Main.tile[this.x, this.y + 1]; + Tile tile5 = Main.tile[this.x, this.y]; + if (tile5.nactive() && Main.tileSolid[(int) tile5.type] && !Main.tileSolidTop[(int) tile5.type]) + { + int type = (int) tile5.type; + this.kill = 999; + } + else + { + byte liquid = tile5.liquid; + if (this.y > Main.UnderworldLayer && tile5.liquidType() == (byte) 0 && tile5.liquid > (byte) 0) + { + byte num = 2; + if ((int) tile5.liquid < (int) num) + num = tile5.liquid; + tile5.liquid -= num; + } + if (tile5.liquid == (byte) 0) + { + this.kill = 999; + } + else + { + if (tile5.lava()) + { + Liquid.LavaCheck(this.x, this.y); + if (!Liquid.quickFall) + { + if (this.delay < 5) + { + ++this.delay; + return; + } + this.delay = 0; + } + } + else + { + if (tile1.lava()) + Liquid.AddWater(this.x - 1, this.y); + if (tile2.lava()) + Liquid.AddWater(this.x + 1, this.y); + if (tile3.lava()) + Liquid.AddWater(this.x, this.y - 1); + if (tile4.lava()) + Liquid.AddWater(this.x, this.y + 1); + if (tile5.honey()) + { + Liquid.HoneyCheck(this.x, this.y); + if (!Liquid.quickFall) + { + if (this.delay < 10) + { + ++this.delay; + return; + } + this.delay = 0; + } + } + else + { + if (tile1.honey()) + Liquid.AddWater(this.x - 1, this.y); + if (tile2.honey()) + Liquid.AddWater(this.x + 1, this.y); + if (tile3.honey()) + Liquid.AddWater(this.x, this.y - 1); + if (tile4.honey()) + Liquid.AddWater(this.x, this.y + 1); + } + } + if ((!tile4.nactive() || !Main.tileSolid[(int) tile4.type] || Main.tileSolidTop[(int) tile4.type]) && (tile4.liquid <= (byte) 0 || (int) tile4.liquidType() == (int) tile5.liquidType()) && tile4.liquid < byte.MaxValue) + { + bool flag = false; + float num = (float) ((int) byte.MaxValue - (int) tile4.liquid); + if ((double) num > (double) tile5.liquid) + num = (float) tile5.liquid; + if ((double) num == 1.0 && tile5.liquid == byte.MaxValue) + flag = true; + if (!flag) + tile5.liquid -= (byte) num; + tile4.liquid += (byte) num; + tile4.liquidType((int) tile5.liquidType()); + Liquid.AddWater(this.x, this.y + 1); + tile4.skipLiquid(true); + tile5.skipLiquid(true); + if (Liquid.quickSettle && tile5.liquid > (byte) 250) + tile5.liquid = byte.MaxValue; + else if (!flag) + { + Liquid.AddWater(this.x - 1, this.y); + Liquid.AddWater(this.x + 1, this.y); + } + } + if (tile5.liquid > (byte) 0) + { + bool flag1 = true; + bool flag2 = true; + bool flag3 = true; + bool flag4 = true; + if (tile1.nactive() && Main.tileSolid[(int) tile1.type] && !Main.tileSolidTop[(int) tile1.type]) + flag1 = false; + else if (tile1.liquid > (byte) 0 && (int) tile1.liquidType() != (int) tile5.liquidType()) + flag1 = false; + else if (Main.tile[this.x - 2, this.y].nactive() && Main.tileSolid[(int) Main.tile[this.x - 2, this.y].type] && !Main.tileSolidTop[(int) Main.tile[this.x - 2, this.y].type]) + flag3 = false; + else if (Main.tile[this.x - 2, this.y].liquid == (byte) 0) + flag3 = false; + else if (Main.tile[this.x - 2, this.y].liquid > (byte) 0 && (int) Main.tile[this.x - 2, this.y].liquidType() != (int) tile5.liquidType()) + flag3 = false; + if (tile2.nactive() && Main.tileSolid[(int) tile2.type] && !Main.tileSolidTop[(int) tile2.type]) + flag2 = false; + else if (tile2.liquid > (byte) 0 && (int) tile2.liquidType() != (int) tile5.liquidType()) + flag2 = false; + else if (Main.tile[this.x + 2, this.y].nactive() && Main.tileSolid[(int) Main.tile[this.x + 2, this.y].type] && !Main.tileSolidTop[(int) Main.tile[this.x + 2, this.y].type]) + flag4 = false; + else if (Main.tile[this.x + 2, this.y].liquid == (byte) 0) + flag4 = false; + else if (Main.tile[this.x + 2, this.y].liquid > (byte) 0 && (int) Main.tile[this.x + 2, this.y].liquidType() != (int) tile5.liquidType()) + flag4 = false; + int num1 = 0; + if (tile5.liquid < (byte) 3) + num1 = -1; + if (tile5.liquid > (byte) 250) + { + flag3 = false; + flag4 = false; + } + if (flag1 & flag2) + { + if (flag3 & flag4) + { + bool flag5 = true; + bool flag6 = true; + if (Main.tile[this.x - 3, this.y].nactive() && Main.tileSolid[(int) Main.tile[this.x - 3, this.y].type] && !Main.tileSolidTop[(int) Main.tile[this.x - 3, this.y].type]) + flag5 = false; + else if (Main.tile[this.x - 3, this.y].liquid == (byte) 0) + flag5 = false; + else if ((int) Main.tile[this.x - 3, this.y].liquidType() != (int) tile5.liquidType()) + flag5 = false; + if (Main.tile[this.x + 3, this.y].nactive() && Main.tileSolid[(int) Main.tile[this.x + 3, this.y].type] && !Main.tileSolidTop[(int) Main.tile[this.x + 3, this.y].type]) + flag6 = false; + else if (Main.tile[this.x + 3, this.y].liquid == (byte) 0) + flag6 = false; + else if ((int) Main.tile[this.x + 3, this.y].liquidType() != (int) tile5.liquidType()) + flag6 = false; + if (flag5 & flag6) + { + float num2 = (float) Math.Round((double) ((int) tile1.liquid + (int) tile2.liquid + (int) Main.tile[this.x - 2, this.y].liquid + (int) Main.tile[this.x + 2, this.y].liquid + (int) Main.tile[this.x - 3, this.y].liquid + (int) Main.tile[this.x + 3, this.y].liquid + (int) tile5.liquid + num1) / 7.0); + int num3 = 0; + tile1.liquidType((int) tile5.liquidType()); + if ((int) tile1.liquid != (int) (byte) num2) + { + tile1.liquid = (byte) num2; + Liquid.AddWater(this.x - 1, this.y); + } + else + ++num3; + tile2.liquidType((int) tile5.liquidType()); + if ((int) tile2.liquid != (int) (byte) num2) + { + tile2.liquid = (byte) num2; + Liquid.AddWater(this.x + 1, this.y); + } + else + ++num3; + Main.tile[this.x - 2, this.y].liquidType((int) tile5.liquidType()); + if ((int) Main.tile[this.x - 2, this.y].liquid != (int) (byte) num2) + { + Main.tile[this.x - 2, this.y].liquid = (byte) num2; + Liquid.AddWater(this.x - 2, this.y); + } + else + ++num3; + Main.tile[this.x + 2, this.y].liquidType((int) tile5.liquidType()); + if ((int) Main.tile[this.x + 2, this.y].liquid != (int) (byte) num2) + { + Main.tile[this.x + 2, this.y].liquid = (byte) num2; + Liquid.AddWater(this.x + 2, this.y); + } + else + ++num3; + Main.tile[this.x - 3, this.y].liquidType((int) tile5.liquidType()); + if ((int) Main.tile[this.x - 3, this.y].liquid != (int) (byte) num2) + { + Main.tile[this.x - 3, this.y].liquid = (byte) num2; + Liquid.AddWater(this.x - 3, this.y); + } + else + ++num3; + Main.tile[this.x + 3, this.y].liquidType((int) tile5.liquidType()); + if ((int) Main.tile[this.x + 3, this.y].liquid != (int) (byte) num2) + { + Main.tile[this.x + 3, this.y].liquid = (byte) num2; + Liquid.AddWater(this.x + 3, this.y); + } + else + ++num3; + if ((int) tile1.liquid != (int) (byte) num2 || (int) tile5.liquid != (int) (byte) num2) + Liquid.AddWater(this.x - 1, this.y); + if ((int) tile2.liquid != (int) (byte) num2 || (int) tile5.liquid != (int) (byte) num2) + Liquid.AddWater(this.x + 1, this.y); + if ((int) Main.tile[this.x - 2, this.y].liquid != (int) (byte) num2 || (int) tile5.liquid != (int) (byte) num2) + Liquid.AddWater(this.x - 2, this.y); + if ((int) Main.tile[this.x + 2, this.y].liquid != (int) (byte) num2 || (int) tile5.liquid != (int) (byte) num2) + Liquid.AddWater(this.x + 2, this.y); + if ((int) Main.tile[this.x - 3, this.y].liquid != (int) (byte) num2 || (int) tile5.liquid != (int) (byte) num2) + Liquid.AddWater(this.x - 3, this.y); + if ((int) Main.tile[this.x + 3, this.y].liquid != (int) (byte) num2 || (int) tile5.liquid != (int) (byte) num2) + Liquid.AddWater(this.x + 3, this.y); + if (num3 != 6 || tile3.liquid <= (byte) 0) + tile5.liquid = (byte) num2; + } + else + { + int num4 = 0; + float num5 = (float) Math.Round((double) ((int) tile1.liquid + (int) tile2.liquid + (int) Main.tile[this.x - 2, this.y].liquid + (int) Main.tile[this.x + 2, this.y].liquid + (int) tile5.liquid + num1) / 5.0); + tile1.liquidType((int) tile5.liquidType()); + if ((int) tile1.liquid != (int) (byte) num5) + { + tile1.liquid = (byte) num5; + Liquid.AddWater(this.x - 1, this.y); + } + else + ++num4; + tile2.liquidType((int) tile5.liquidType()); + if ((int) tile2.liquid != (int) (byte) num5) + { + tile2.liquid = (byte) num5; + Liquid.AddWater(this.x + 1, this.y); + } + else + ++num4; + Main.tile[this.x - 2, this.y].liquidType((int) tile5.liquidType()); + if ((int) Main.tile[this.x - 2, this.y].liquid != (int) (byte) num5) + { + Main.tile[this.x - 2, this.y].liquid = (byte) num5; + Liquid.AddWater(this.x - 2, this.y); + } + else + ++num4; + Main.tile[this.x + 2, this.y].liquidType((int) tile5.liquidType()); + if ((int) Main.tile[this.x + 2, this.y].liquid != (int) (byte) num5) + { + Main.tile[this.x + 2, this.y].liquid = (byte) num5; + Liquid.AddWater(this.x + 2, this.y); + } + else + ++num4; + if ((int) tile1.liquid != (int) (byte) num5 || (int) tile5.liquid != (int) (byte) num5) + Liquid.AddWater(this.x - 1, this.y); + if ((int) tile2.liquid != (int) (byte) num5 || (int) tile5.liquid != (int) (byte) num5) + Liquid.AddWater(this.x + 1, this.y); + if ((int) Main.tile[this.x - 2, this.y].liquid != (int) (byte) num5 || (int) tile5.liquid != (int) (byte) num5) + Liquid.AddWater(this.x - 2, this.y); + if ((int) Main.tile[this.x + 2, this.y].liquid != (int) (byte) num5 || (int) tile5.liquid != (int) (byte) num5) + Liquid.AddWater(this.x + 2, this.y); + if (num4 != 4 || tile3.liquid <= (byte) 0) + tile5.liquid = (byte) num5; + } + } + else if (flag3) + { + float num6 = (float) Math.Round((double) ((int) tile1.liquid + (int) tile2.liquid + (int) Main.tile[this.x - 2, this.y].liquid + (int) tile5.liquid + num1) / 4.0); + tile1.liquidType((int) tile5.liquidType()); + if ((int) tile1.liquid != (int) (byte) num6 || (int) tile5.liquid != (int) (byte) num6) + { + tile1.liquid = (byte) num6; + Liquid.AddWater(this.x - 1, this.y); + } + tile2.liquidType((int) tile5.liquidType()); + if ((int) tile2.liquid != (int) (byte) num6 || (int) tile5.liquid != (int) (byte) num6) + { + tile2.liquid = (byte) num6; + Liquid.AddWater(this.x + 1, this.y); + } + Main.tile[this.x - 2, this.y].liquidType((int) tile5.liquidType()); + if ((int) Main.tile[this.x - 2, this.y].liquid != (int) (byte) num6 || (int) tile5.liquid != (int) (byte) num6) + { + Main.tile[this.x - 2, this.y].liquid = (byte) num6; + Liquid.AddWater(this.x - 2, this.y); + } + tile5.liquid = (byte) num6; + } + else if (flag4) + { + float num7 = (float) Math.Round((double) ((int) tile1.liquid + (int) tile2.liquid + (int) Main.tile[this.x + 2, this.y].liquid + (int) tile5.liquid + num1) / 4.0); + tile1.liquidType((int) tile5.liquidType()); + if ((int) tile1.liquid != (int) (byte) num7 || (int) tile5.liquid != (int) (byte) num7) + { + tile1.liquid = (byte) num7; + Liquid.AddWater(this.x - 1, this.y); + } + tile2.liquidType((int) tile5.liquidType()); + if ((int) tile2.liquid != (int) (byte) num7 || (int) tile5.liquid != (int) (byte) num7) + { + tile2.liquid = (byte) num7; + Liquid.AddWater(this.x + 1, this.y); + } + Main.tile[this.x + 2, this.y].liquidType((int) tile5.liquidType()); + if ((int) Main.tile[this.x + 2, this.y].liquid != (int) (byte) num7 || (int) tile5.liquid != (int) (byte) num7) + { + Main.tile[this.x + 2, this.y].liquid = (byte) num7; + Liquid.AddWater(this.x + 2, this.y); + } + tile5.liquid = (byte) num7; + } + else + { + float num8 = (float) Math.Round((double) ((int) tile1.liquid + (int) tile2.liquid + (int) tile5.liquid + num1) / 3.0); + if ((double) num8 == 254.0 && WorldGen.genRand.Next(30) == 0) + num8 = (float) byte.MaxValue; + tile1.liquidType((int) tile5.liquidType()); + if ((int) tile1.liquid != (int) (byte) num8) + { + tile1.liquid = (byte) num8; + Liquid.AddWater(this.x - 1, this.y); + } + tile2.liquidType((int) tile5.liquidType()); + if ((int) tile2.liquid != (int) (byte) num8) + { + tile2.liquid = (byte) num8; + Liquid.AddWater(this.x + 1, this.y); + } + tile5.liquid = (byte) num8; + } + } + else if (flag1) + { + float num9 = (float) Math.Round((double) ((int) tile1.liquid + (int) tile5.liquid + num1) / 2.0); + if ((int) tile1.liquid != (int) (byte) num9) + tile1.liquid = (byte) num9; + tile1.liquidType((int) tile5.liquidType()); + if ((int) tile5.liquid != (int) (byte) num9 || (int) tile1.liquid != (int) (byte) num9) + Liquid.AddWater(this.x - 1, this.y); + tile5.liquid = (byte) num9; + } + else if (flag2) + { + float num10 = (float) Math.Round((double) ((int) tile2.liquid + (int) tile5.liquid + num1) / 2.0); + if ((int) tile2.liquid != (int) (byte) num10) + tile2.liquid = (byte) num10; + tile2.liquidType((int) tile5.liquidType()); + if ((int) tile5.liquid != (int) (byte) num10 || (int) tile2.liquid != (int) (byte) num10) + Liquid.AddWater(this.x + 1, this.y); + tile5.liquid = (byte) num10; + } + } + if ((int) tile5.liquid != (int) liquid) + { + if (tile5.liquid == (byte) 254 && liquid == byte.MaxValue) + { + if (Liquid.quickSettle) + { + tile5.liquid = byte.MaxValue; + ++this.kill; + } + else + ++this.kill; + } + else + { + Liquid.AddWater(this.x, this.y - 1); + this.kill = 0; + } + } + else + ++this.kill; + } + } + } + + public static void StartPanic() + { + if (Liquid.panicMode) + return; + WorldGen.waterLine = Main.maxTilesY; + Liquid.numLiquid = 0; + LiquidBuffer.numLiquidBuffer = 0; + Liquid.panicCounter = 0; + Liquid.panicMode = true; + Liquid.panicY = Main.maxTilesY - 3; + if (!Main.dedServ) + return; + Console.WriteLine(Language.GetTextValue("Misc.ForceWaterSettling")); + } + + public static void UpdateLiquid() + { + int num1 = 8; + Liquid.tilesIgnoreWater(true); + if (Main.netMode == 2) + { + int num2 = 0; + for (int index = 0; index < 15; ++index) + { + if (Main.player[index].active) + ++num2; + } + Liquid.cycles = 10 + num2 / 3; + Liquid.curMaxLiquid = Liquid.maxLiquid - num2 * 250; + num1 = 10 + num2 / 3; + if (Main.Setting_UseReducedMaxLiquids) + Liquid.curMaxLiquid = 5000; + } + if (!WorldGen.gen) + { + if (!Liquid.panicMode) + { + if ((double) LiquidBuffer.numLiquidBuffer >= 45000.0) + { + ++Liquid.panicCounter; + if (Liquid.panicCounter > 3600) + Liquid.StartPanic(); + } + else + Liquid.panicCounter = 0; + } + if (Liquid.panicMode) + { + int num3 = 0; + while (Liquid.panicY >= 3 && num3 < 5) + { + ++num3; + Liquid.QuickWater(minY: Liquid.panicY, maxY: Liquid.panicY); + --Liquid.panicY; + if (Liquid.panicY < 3) + { + Console.WriteLine(Language.GetTextValue("Misc.WaterSettled")); + Liquid.panicCounter = 0; + Liquid.panicMode = false; + WorldGen.WaterCheck(); + if (Main.netMode == 2) + { + for (int index1 = 0; index1 < (int) byte.MaxValue; ++index1) + { + for (int index2 = 0; index2 < Main.maxSectionsX; ++index2) + { + for (int index3 = 0; index3 < Main.maxSectionsY; ++index3) + Netplay.Clients[index1].TileSections[index2, index3] = false; + } + } + } + } + } + return; + } + } + bool quickSettle = Liquid.quickSettle; + if (Main.Setting_UseReducedMaxLiquids) + quickSettle |= Liquid.numLiquid > 2000; + Liquid.quickFall = quickSettle; + ++Liquid.wetCounter; + int num4 = Liquid.curMaxLiquid / Liquid.cycles; + int num5 = num4 * (Liquid.wetCounter - 1); + int num6 = num4 * Liquid.wetCounter; + if (Liquid.wetCounter == Liquid.cycles) + num6 = Liquid.numLiquid; + if (num6 > Liquid.numLiquid) + { + num6 = Liquid.numLiquid; + int netMode = Main.netMode; + Liquid.wetCounter = Liquid.cycles; + } + if (Liquid.quickFall) + { + for (int index = num5; index < num6; ++index) + { + Main.liquid[index].delay = 10; + Main.liquid[index].Update(); + Main.tile[Main.liquid[index].x, Main.liquid[index].y].skipLiquid(false); + } + } + else + { + for (int index = num5; index < num6; ++index) + { + if (!Main.tile[Main.liquid[index].x, Main.liquid[index].y].skipLiquid()) + Main.liquid[index].Update(); + else + Main.tile[Main.liquid[index].x, Main.liquid[index].y].skipLiquid(false); + } + } + if (Liquid.wetCounter >= Liquid.cycles) + { + Liquid.wetCounter = 0; + for (int l = Liquid.numLiquid - 1; l >= 0; --l) + { + if (Main.liquid[l].kill >= num1) + { + if (Main.tile[Main.liquid[l].x, Main.liquid[l].y].liquid == (byte) 254) + Main.tile[Main.liquid[l].x, Main.liquid[l].y].liquid = byte.MaxValue; + Liquid.DelWater(l); + } + } + int num7 = Liquid.curMaxLiquid - (Liquid.curMaxLiquid - Liquid.numLiquid); + if (num7 > LiquidBuffer.numLiquidBuffer) + num7 = LiquidBuffer.numLiquidBuffer; + for (int index = 0; index < num7; ++index) + { + Main.tile[Main.liquidBuffer[0].x, Main.liquidBuffer[0].y].checkingLiquid(false); + Liquid.AddWater(Main.liquidBuffer[0].x, Main.liquidBuffer[0].y); + LiquidBuffer.DelBuffer(0); + } + if (Liquid.numLiquid > 0 && Liquid.numLiquid > Liquid.stuckAmount - 50 && Liquid.numLiquid < Liquid.stuckAmount + 50) + { + ++Liquid.stuckCount; + if (Liquid.stuckCount >= 10000) + { + Liquid.stuck = true; + for (int l = Liquid.numLiquid - 1; l >= 0; --l) + Liquid.DelWater(l); + Liquid.stuck = false; + Liquid.stuckCount = 0; + } + } + else + { + Liquid.stuckCount = 0; + Liquid.stuckAmount = Liquid.numLiquid; + } + } + if (!WorldGen.gen && Main.netMode == 2 && Liquid._netChangeSet.Count > 0) + { + Utils.Swap>(ref Liquid._netChangeSet, ref Liquid._swapNetChangeSet); + NetLiquidModule.CreateAndBroadcastByChunk(Liquid._swapNetChangeSet); + Liquid._swapNetChangeSet.Clear(); + } + Liquid.tilesIgnoreWater(false); + } + + public static void AddWater(int x, int y) + { + Tile checkTile = Main.tile[x, y]; + if (Main.tile[x, y] == null || checkTile.checkingLiquid() || x >= Main.maxTilesX - 5 || y >= Main.maxTilesY - 5 || x < 5 || y < 5 || checkTile.liquid == (byte) 0 || checkTile.nactive() && Main.tileSolid[(int) checkTile.type] && checkTile.type != (ushort) 546 && !Main.tileSolidTop[(int) checkTile.type]) + return; + if (Liquid.numLiquid >= Liquid.curMaxLiquid - 1) + { + LiquidBuffer.AddBuffer(x, y); + } + else + { + checkTile.checkingLiquid(true); + checkTile.skipLiquid(false); + Main.liquid[Liquid.numLiquid].kill = 0; + Main.liquid[Liquid.numLiquid].x = x; + Main.liquid[Liquid.numLiquid].y = y; + Main.liquid[Liquid.numLiquid].delay = 0; + ++Liquid.numLiquid; + if (Main.netMode == 2) + Liquid.NetSendLiquid(x, y); + if (!checkTile.active() || WorldGen.gen) + return; + bool flag = false; + if (checkTile.lava()) + { + if (TileObjectData.CheckLavaDeath(checkTile)) + flag = true; + } + else if (TileObjectData.CheckWaterDeath(checkTile)) + flag = true; + if (!flag) + return; + WorldGen.KillTile(x, y); + if (Main.netMode != 2) + return; + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y)); + } + } + + private static bool UnderGroundDesertCheck(int x, int y) + { + int num = 3; + for (int x1 = x - num; x1 <= x + num; ++x1) + { + for (int y1 = y - num; y1 <= y + num; ++y1) + { + if (WorldGen.InWorld(x1, y1) && (Main.tile[x1, y1].wall == (ushort) 187 || Main.tile[x1, y1].wall == (ushort) 216)) + return true; + } + } + return false; + } + + public static void LavaCheck(int x, int y) + { + if (WorldGen.generatingWorld && Liquid.UnderGroundDesertCheck(x, y)) + { + for (int index1 = x - 3; index1 <= x + 3; ++index1) + { + for (int index2 = y - 3; index2 <= y + 3; ++index2) + Main.tile[index1, index2].lava(true); + } + } + if (WorldGen.SolidTile(x, y)) + return; + Tile tile1 = Main.tile[x - 1, y]; + Tile tile2 = Main.tile[x + 1, y]; + Tile tile3 = Main.tile[x, y - 1]; + Tile tile4 = Main.tile[x, y + 1]; + Tile tile5 = Main.tile[x, y]; + if (tile1.liquid > (byte) 0 && !tile1.lava() || tile2.liquid > (byte) 0 && !tile2.lava() || tile3.liquid > (byte) 0 && !tile3.lava()) + { + int num = 0; + int Type = 56; + if (!tile1.lava()) + { + num += (int) tile1.liquid; + tile1.liquid = (byte) 0; + } + if (!tile2.lava()) + { + num += (int) tile2.liquid; + tile2.liquid = (byte) 0; + } + if (!tile3.lava()) + { + num += (int) tile3.liquid; + tile3.liquid = (byte) 0; + } + if (tile1.honey() || tile2.honey() || tile3.honey()) + Type = 230; + if (num < 24) + return; + if (tile5.active() && Main.tileObsidianKill[(int) tile5.type]) + { + WorldGen.KillTile(x, y); + if (Main.netMode == 2) + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y)); + } + if (WorldGen.getGoodWorldGen) + { + if (!tile1.lava() && !tile2.lava() && !tile3.lava()) + tile5.lava(false); + else + tile5.lava(true); + } + else + { + if (tile5.active()) + return; + tile5.liquid = (byte) 0; + tile5.lava(false); + if (!WorldGen.gen) + { + if (Type == 56) + SoundEngine.PlaySound(SoundID.LiquidsWaterLava, new Vector2((float) (x * 16 + 8), (float) (y * 16 + 8))); + else + SoundEngine.PlaySound(SoundID.LiquidsHoneyLava, new Vector2((float) (x * 16 + 8), (float) (y * 16 + 8))); + } + WorldGen.PlaceTile(x, y, Type, true, true); + WorldGen.SquareTileFrame(x, y); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, x - 1, y - 1, 3, Type == 56 ? TileChangeType.LavaWater : TileChangeType.HoneyLava); + } + } + else + { + if (tile4.liquid <= (byte) 0 || tile4.lava()) + return; + bool flag = false; + if (tile5.active() && TileID.Sets.IsAContainer[(int) tile5.type] && !TileID.Sets.IsAContainer[(int) tile4.type]) + flag = true; + if (Main.tileCut[(int) tile4.type]) + { + WorldGen.KillTile(x, y + 1); + if (Main.netMode == 2) + NetMessage.SendData(17, number2: ((float) x), number3: ((float) (y + 1))); + } + else if (tile4.active() && Main.tileObsidianKill[(int) tile4.type]) + { + WorldGen.KillTile(x, y + 1); + if (Main.netMode == 2) + NetMessage.SendData(17, number2: ((float) x), number3: ((float) (y + 1))); + } + if (!(!tile4.active() | flag)) + return; + if (tile5.liquid < (byte) 24) + { + tile5.liquid = (byte) 0; + tile5.liquidType(0); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, x - 1, y, 3); + } + else if (WorldGen.getGoodWorldGen) + { + if (!tile4.lava()) + tile5.lava(false); + else + tile5.lava(true); + } + else + { + int Type = 56; + if (tile4.honey()) + Type = 230; + tile5.liquid = (byte) 0; + tile5.lava(false); + tile4.liquid = (byte) 0; + if (Type == 56) + SoundEngine.PlaySound(SoundID.LiquidsWaterLava, new Vector2((float) (x * 16 + 8), (float) (y * 16 + 8))); + else + SoundEngine.PlaySound(SoundID.LiquidsHoneyLava, new Vector2((float) (x * 16 + 8), (float) (y * 16 + 8))); + WorldGen.PlaceTile(x, y + 1, Type, true, true); + WorldGen.SquareTileFrame(x, y + 1); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, x - 1, y, 3, Type == 56 ? TileChangeType.LavaWater : TileChangeType.HoneyLava); + } + } + } + + public static void HoneyCheck(int x, int y) + { + if (WorldGen.SolidTile(x, y)) + return; + Tile tile1 = Main.tile[x - 1, y]; + Tile tile2 = Main.tile[x + 1, y]; + Tile tile3 = Main.tile[x, y - 1]; + Tile tile4 = Main.tile[x, y + 1]; + Tile tile5 = Main.tile[x, y]; + bool flag = false; + if (tile1.liquid > (byte) 0 && tile1.liquidType() == (byte) 0 || tile2.liquid > (byte) 0 && tile2.liquidType() == (byte) 0 || tile3.liquid > (byte) 0 && tile3.liquidType() == (byte) 0) + { + int num = 0; + if (tile1.liquidType() == (byte) 0) + { + num += (int) tile1.liquid; + tile1.liquid = (byte) 0; + } + if (tile2.liquidType() == (byte) 0) + { + num += (int) tile2.liquid; + tile2.liquid = (byte) 0; + } + if (tile3.liquidType() == (byte) 0) + { + num += (int) tile3.liquid; + tile3.liquid = (byte) 0; + } + if (tile1.lava() || tile2.lava() || tile3.lava()) + flag = true; + if (num < 32) + return; + if (tile5.active() && Main.tileObsidianKill[(int) tile5.type]) + { + WorldGen.KillTile(x, y); + if (Main.netMode == 2) + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y)); + } + if (tile5.active()) + return; + tile5.liquid = (byte) 0; + tile5.liquidType(0); + WorldGen.PlaceTile(x, y, 229, true, true); + if (flag) + SoundEngine.PlaySound(SoundID.LiquidsHoneyLava, new Vector2((float) (x * 16 + 8), (float) (y * 16 + 8))); + else + SoundEngine.PlaySound(SoundID.LiquidsHoneyWater, new Vector2((float) (x * 16 + 8), (float) (y * 16 + 8))); + WorldGen.SquareTileFrame(x, y); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, x - 1, y - 1, 3, flag ? TileChangeType.HoneyLava : TileChangeType.HoneyWater); + } + else + { + if (tile4.liquid <= (byte) 0 || tile4.liquidType() != (byte) 0) + return; + if (Main.tileCut[(int) tile4.type]) + { + WorldGen.KillTile(x, y + 1); + if (Main.netMode == 2) + NetMessage.SendData(17, number2: ((float) x), number3: ((float) (y + 1))); + } + else if (tile4.active() && Main.tileObsidianKill[(int) tile4.type]) + { + WorldGen.KillTile(x, y + 1); + if (Main.netMode == 2) + NetMessage.SendData(17, number2: ((float) x), number3: ((float) (y + 1))); + } + if (tile4.active()) + return; + if (tile5.liquid < (byte) 32) + { + tile5.liquid = (byte) 0; + tile5.liquidType(0); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, x - 1, y, 3); + } + else + { + if (tile4.lava()) + flag = true; + tile5.liquid = (byte) 0; + tile5.liquidType(0); + tile4.liquid = (byte) 0; + tile4.liquidType(0); + if (flag) + SoundEngine.PlaySound(SoundID.LiquidsHoneyLava, new Vector2((float) (x * 16 + 8), (float) (y * 16 + 8))); + else + SoundEngine.PlaySound(SoundID.LiquidsHoneyWater, new Vector2((float) (x * 16 + 8), (float) (y * 16 + 8))); + WorldGen.PlaceTile(x, y + 1, 229, true, true); + WorldGen.SquareTileFrame(x, y + 1); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, x - 1, y, 3, flag ? TileChangeType.HoneyLava : TileChangeType.HoneyWater); + } + } + } + + public static void DelWater(int l) + { + int x = Main.liquid[l].x; + int y = Main.liquid[l].y; + Tile tile1 = Main.tile[x - 1, y]; + Tile tile2 = Main.tile[x + 1, y]; + Tile tile3 = Main.tile[x, y + 1]; + Tile tile4 = Main.tile[x, y]; + byte num = 2; + if ((int) tile4.liquid < (int) num) + { + tile4.liquid = (byte) 0; + if ((int) tile1.liquid < (int) num) + tile1.liquid = (byte) 0; + else + Liquid.AddWater(x - 1, y); + if ((int) tile2.liquid < (int) num) + tile2.liquid = (byte) 0; + else + Liquid.AddWater(x + 1, y); + } + else if (tile4.liquid < (byte) 20) + { + if ((int) tile1.liquid < (int) tile4.liquid && (!tile1.nactive() || !Main.tileSolid[(int) tile1.type] || Main.tileSolidTop[(int) tile1.type]) || (int) tile2.liquid < (int) tile4.liquid && (!tile2.nactive() || !Main.tileSolid[(int) tile2.type] || Main.tileSolidTop[(int) tile2.type]) || tile3.liquid < byte.MaxValue && (!tile3.nactive() || !Main.tileSolid[(int) tile3.type] || Main.tileSolidTop[(int) tile3.type])) + tile4.liquid = (byte) 0; + } + else if (tile3.liquid < byte.MaxValue && (!tile3.nactive() || !Main.tileSolid[(int) tile3.type] || Main.tileSolidTop[(int) tile3.type]) && !Liquid.stuck && (!Main.tile[x, y].nactive() || !Main.tileSolid[(int) Main.tile[x, y].type] || Main.tileSolidTop[(int) Main.tile[x, y].type])) + { + Main.liquid[l].kill = 0; + return; + } + if (tile4.liquid < (byte) 250 && Main.tile[x, y - 1].liquid > (byte) 0) + Liquid.AddWater(x, y - 1); + if (tile4.liquid == (byte) 0) + { + tile4.liquidType(0); + } + else + { + if (tile2.liquid > (byte) 0 && tile2.liquid < (byte) 250 && (!tile2.nactive() || !Main.tileSolid[(int) tile2.type] || Main.tileSolidTop[(int) tile2.type]) && (int) tile4.liquid != (int) tile2.liquid) + Liquid.AddWater(x + 1, y); + if (tile1.liquid > (byte) 0 && tile1.liquid < (byte) 250 && (!tile1.nactive() || !Main.tileSolid[(int) tile1.type] || Main.tileSolidTop[(int) tile1.type]) && (int) tile4.liquid != (int) tile1.liquid) + Liquid.AddWater(x - 1, y); + if (tile4.lava()) + { + Liquid.LavaCheck(x, y); + for (int i = x - 1; i <= x + 1; ++i) + { + for (int j = y - 1; j <= y + 1; ++j) + { + Tile tile5 = Main.tile[i, j]; + if (tile5.active()) + { + if (tile5.type == (ushort) 2 || tile5.type == (ushort) 23 || tile5.type == (ushort) 109 || tile5.type == (ushort) 199 || tile5.type == (ushort) 477 || tile5.type == (ushort) 492) + { + tile5.type = (ushort) 0; + WorldGen.SquareTileFrame(i, j); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, x, y, 3); + } + else if (tile5.type == (ushort) 60 || tile5.type == (ushort) 70) + { + tile5.type = (ushort) 59; + WorldGen.SquareTileFrame(i, j); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, x, y, 3); + } + } + } + } + } + else if (tile4.honey()) + Liquid.HoneyCheck(x, y); + } + if (Main.netMode == 2) + Liquid.NetSendLiquid(x, y); + --Liquid.numLiquid; + Main.tile[Main.liquid[l].x, Main.liquid[l].y].checkingLiquid(false); + Main.liquid[l].x = Main.liquid[Liquid.numLiquid].x; + Main.liquid[l].y = Main.liquid[Liquid.numLiquid].y; + Main.liquid[l].kill = Main.liquid[Liquid.numLiquid].kill; + if (Main.tileAlch[(int) tile4.type]) + { + WorldGen.CheckAlch(x, y); + } + else + { + if (tile4.type != (ushort) 518) + return; + if (Liquid.quickFall) + WorldGen.CheckLilyPad(x, y); + else if (Main.tile[x, y + 1].liquid < byte.MaxValue || Main.tile[x, y - 1].liquid > (byte) 0) + WorldGen.SquareTileFrame(x, y); + else + WorldGen.CheckLilyPad(x, y); + } + } + } +} diff --git a/LiquidBuffer.cs b/LiquidBuffer.cs new file mode 100644 index 0000000..bc93059 --- /dev/null +++ b/LiquidBuffer.cs @@ -0,0 +1,32 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.LiquidBuffer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria +{ + public class LiquidBuffer + { + public static int numLiquidBuffer; + public int x; + public int y; + + public static void AddBuffer(int x, int y) + { + if (LiquidBuffer.numLiquidBuffer >= 49998 || Main.tile[x, y].checkingLiquid()) + return; + Main.tile[x, y].checkingLiquid(true); + Main.liquidBuffer[LiquidBuffer.numLiquidBuffer].x = x; + Main.liquidBuffer[LiquidBuffer.numLiquidBuffer].y = y; + ++LiquidBuffer.numLiquidBuffer; + } + + public static void DelBuffer(int l) + { + --LiquidBuffer.numLiquidBuffer; + Main.liquidBuffer[l].x = Main.liquidBuffer[LiquidBuffer.numLiquidBuffer].x; + Main.liquidBuffer[l].y = Main.liquidBuffer[LiquidBuffer.numLiquidBuffer].y; + } + } +} diff --git a/Localization/Content/de-DE.json b/Localization/Content/de-DE.json new file mode 100644 index 0000000..8d21266 --- /dev/null +++ b/Localization/Content/de-DE.json @@ -0,0 +1,697 @@ +{ + "GameTitle": { + "0": "Terraria: Grab, Arbeiter, grab!", + "1": "Terraria: Epischer Schmutz", + "10": "Terraria: Digger T' Blöcke", + "11": "Terraria: Es gibt keine Kuh-Schicht", + "12": "Terraria: Verdächtig aussehende Augäpfel", + "13": "Terraria: Lila Gras!", + "14": "Terraria: Niemand wird beim Graben zurückgelassen!", + "15": "Terraria: Der Wasserfall der Contents!", + "16": "Terraria: Erdgebunden", + "17": "Terraria: Beim Graben kann mir keiner was", + "18": "Terraria: Erz gut, alles gut", + "19": "Terraria: Lehm der Abrechnung", + "2": "Terraria: Adaman-TIGHT!", + "20": "Terraria: Terrestrialer Ärger", + "21": "Terraria: Zwangsneurose Entdeckungssimulator", + "22": "Terraria: Red Dev Redemption", + "23": "Terraria: Aufstand des Schleims", + "24": "Terraria: Jetzt mit noch mehr Dingen, die dich töten!", + "25": "Terraria: Gerüchte über den Tod des Fremdenführers waren stark übertrieben", + "26": "Terraria: Ich habe Mitleid mit den Werkzeugen ...", + "27": "Terraria: Der Höhlenforscher sagt ‚Was‘?", + "28": "Terraria: Und dann sag ich: Irgendwas mit nem PC-Update ...", + "29": "Terraria: Mögen die Blöcke mit dir sein", + "3": "Terraria: Sand ist zu stark", + "30": "Terraria: Besser als Leben", + "31": "Terraria: Terraria: Terraria:", + "32": "Terraria: Jetzt in 1D", + "33": "Terraria: Bald auf einem Computer in deiner Nähe", + "34": "Terraria: Teilen durch Null", + "35": "Terraria: Jetzt mit SOUND", + "36": "Terraria: Drücke Alt-F4", + "37": "Terraria: Ich habe Mitleid mit den Werkzeugen", + "38": "Terraria: Du Sand oder was?", + "39": "Terraria: Ein guter Tag zum Graben", + "4": "Terraria Teil 3: Die Rückkehr des Fremdenführers", + "40": "Terraria: Can You Re-Dig-It?", + "41": "Terraria: Ich weiß es nicht-- aaaah!", + "42": "Terraria: Was ist das für ein lila Stachelding?", + "43": "Terraria: Ich will der Fremdenführer sein", + "44": "Terraria: Cthulhu ist irre... und ihm fehlt ein Auge!", + "45": "Terraria: NICHT DIE BIENEN!", + "46": "Terraria: Legende von Maxx", + "47": "Terraria: Kult von Cenx", + "48": "Terraria 2: Electric Boogaloo", + "49": "Terraria: Und probier auch Minecraft aus!", + "5": "Terraria: Die Geschichte eines Häschens", + "51": "Terraria: Ich will bloß wissen, wo das Gold ist!", + "52": "Terraria: Jetzt mit mehr Enten!", + "53": "Terraria: 9 + 1 = 11", + "54": "Terraria: Infinite Plantera", + "6": "Terraria: Dr. Bones und der Tempel des Blutmonds", + "7": "Terraria: Schleimeassic Park", + "8": "Terraria: Auf dieser Seite ist das Gras grüner", + "9": "Terraria: Kleine Blöcke, nicht für Kinder unter 5 Jahren geeignet", + "55": "Terraria: Sei still und grabe, Gaiden!" + }, + "Achievements": { + "ARCHAEOLOGIST_Description": "Töte Doktor Bones.", + "ARCHAEOLOGIST_Name": "Archäologe", + "BALEFUL_HARVEST_Description": "Erreiche die 15. Welle des Kürbismonds, wo das Böse in der Herbsternte lauert.", + "BALEFUL_HARVEST_Name": "Unheilvolle Ernte", + "BEGONE_EVIL_Description": "Zerschlage einen Dämonen- oder Purpuraltar mit einem mächtigen, heiligen Hammer.", + "BEGONE_EVIL_Name": "Fort mit dir, Böses!", + "BEHIND_THE_MASK_Description": "Besiege den wahnsinnigen Kultisten, einen irreren Magier mit mächtigen Zaubern.", + "BEHIND_THE_MASK_Name": "Hinter der Maske", + "BIG_BOOTY_Description": "Schalte eine der großen, mysteriösen Truhen im Verlies mit einem besonderen Schlüssel frei.", + "BIG_BOOTY_Name": "Große Beute", + "BLOODBATH_Description": "Überlebe einen Blutmond, das nächtliche Event, bei dem die Flüsse sich in Blut verwandeln und überall Monster sind.", + "BLOODBATH_Name": "Blutbad", + "BONED_Description": "Besiege Skeletron, den verfluchten Wächter des Verlieses.", + "BONED_Name": "Knochenbrecher", + "BUCKETS_OF_BOLTS_Description": "Besiege die drei nächtlichen mechanischen Bedrohungen: die Zwillinge, den Zerstörer und Skeletron Prime.", + "BUCKETS_OF_BOLTS_Name": "Eimer voller Bolzen", + "BULLDOZER_Description": "Zerstöre insgesamt 10.000 Felder.", + "BULLDOZER_Name": "Bulldozer", + "ChallengerCategory": "Herausforderer", + "CHAMPION_OF_TERRARIA_Description": "Besiege den Mondherrn.", + "CHAMPION_OF_TERRARIA_Name": "Champion von Terraria", + "CollectorCategory": "Sammler", + "Completed": "Erfolg erreicht! {0}", + "COMPLETELY_AWESOME_Description": "Erhalte einen Minihai.", + "COMPLETELY_AWESOME_Name": "Absolut toll", + "DAVY_JONES_LOCKER_Description": "Besiege den Fliegenden Holländer, das Segel des plündernden Himmels.", + "DAVY_JONES_LOCKER_Name": "Nasses Grab", + "DECEIVER_OF_FOOLS_Description": "Töte eine Nymphe.", + "DECEIVER_OF_FOOLS_Name": "Täuscher der Narren", + "DO_YOU_WANT_TO_SLAY_A_SNOWMAN_Description": "Triumphiere über die Frostlegion, eine freundliche Familie absolut irrer Schneemann-Gangster.", + "DO_YOU_WANT_TO_SLAY_A_SNOWMAN_Name": "Willst du einen Schneemann besiegen?", + "DRAX_ATTAX_Description": "Stelle einen Drax oder eine Spitzhacke mit geheiligten Barren und den Seelen von drei mechanischen Bossen her.", + "DRAX_ATTAX_Name": "Drax Attax", + "DUNGEON_HEIST_Description": "Stehle einen Schlüssel von den untoten Bewohnern des Verlieses und öffne eine ihrer wertvollen goldenen Truhen.", + "DUNGEON_HEIST_Name": "Verliesüberfall", + "DYE_HARD_Description": "Rüste in jedem möglichen Farbstoff-Slot einen Farbstoff aus.", + "DYE_HARD_Name": "Stirb mit Farbe", + "ExplorerCategory": "Entdecker", + "EXTRA_SHINY_Description": "Baue mächtiges Erz ab, mit dem deine Welt neu gesegnet wurden.", + "EXTRA_SHINY_Name": "Besonders glänzend!", + "EYE_ON_YOU_Description": "Besiege das Auge Cthulhus, ein okulares Übel, das nur nachts erscheint.", + "EYE_ON_YOU_Name": "Ich hab ein Auge auf dich", + "FASHION_STATEMENT_Description": "Rüste Rüstung oder modische Kleidung in allen drei sozialen Slots aus.", + "FASHION_STATEMENT_Name": "Fashion Statement", + "FAST_AND_FISHIOUS_Description": "Schließe deine 50. Quest für den Angler ab.", + "FAST_AND_FISHIOUS_Name": "Schnell und fischig", + "FISH_OUT_OF_WATER_Description": "Besiege Herzog Firschron, Mutantenschreck des Meeres.", + "FISH_OUT_OF_WATER_Name": "Wie ein Fisch aus dem Wasser", + "FREQUENT_FLYER_Description": "Gib mehr als 1 Gold aus, um von der Krankenschwester behandelt zu werden.", + "FREQUENT_FLYER_Name": "Flugmeilen", + "FUNKYTOWN_Description": "Baue ein leuchtendes Pilzfeld auf der Oberfläche oder stoße auf eins.", + "FUNKYTOWN_Name": "Funkytown", + "GELATIN_WORLD_TOUR_Description": "Besiege jede Art von Schleim, die es gibt!", + "GELATIN_WORLD_TOUR_Name": "Gelantine-Welttournee", + "GET_A_LIFE_Description": "Iss eine Lebensfrucht, die tief im unterirdischen Dschungelgras wächst.", + "GET_A_LIFE_Name": "Du brauchst ein Leben", + "GLORIOUS_GOLDEN_POLE_Description": "Erhalte eine goldene Angel.", + "GLORIOUS_GOLDEN_POLE_Name": "Prächtiger goldener Stab", + "GOBLIN_PUNTER_Description": "Triuphiere über eine Goblininvasion, eine wilde Mischung raubeiniger, barbarischer, spitzohriger Kriege und ihren Schattenflammenzauberern.", + "GOBLIN_PUNTER_Name": "Goblinklatschen", + "GOOD_LITTLE_SLAVE_Description": "Schließe deine 10. Quest für den Angler ab.", + "GOOD_LITTLE_SLAVE_Name": "Braver kleiner Sklave", + "HEAD_IN_THE_CLOUDS_Description": "Rüste ein Paar Flügel aus.", + "HEAD_IN_THE_CLOUDS_Name": "Kopf in den Wolken", + "HEART_BREAKER_Description": "Entdecke deinen ersten Herzkristall im Untergrund und zerschlage ihn.", + "HEART_BREAKER_Name": "Herzensbrecher", + "HEAVY_METAL_Description": "Erhalte einen Amboss aus Eisen oder Blei.", + "HEAVY_METAL_Name": "Heavy Metal", + "HEX_EDUCATION_Description": "Besiege einen Goblin-Beschwörer, Rufer der dunkelsten Flammen.", + "HEX_EDUCATION_Name": "Hexenschule", + "HOLD_ON_TIGHT_Description": "Rüste deinen ersten Enterhaken aus.", + "HOLD_ON_TIGHT_Name": "Gut festhalten!", + "ICE_SCREAM_Description": "Erreiche die 15. Welle des Frostmonds, wo die festliche Jahreszeit sich schnell in reinen Irrsinn verwandelt.", + "ICE_SCREAM_Name": "Ice Scream", + "INDEPENDENCE_DAY_Description": "Besiege ein Mutterschiff, die Herrenköpfe der Marsianer.", + "INDEPENDENCE_DAY_Name": "Tag der Unabhängigkeit", + "INTO_ORBIT_Description": "Von hier geht es nur noch runter!", + "INTO_ORBIT_Name": "In den Orbit", + "ITS_GETTING_HOT_IN_HERE_Description": "Geh tief genug auf Erkundungstour, um die geschmolzene Unterwelt zu erreichen.", + "ITS_GETTING_HOT_IN_HERE_Name": "It's Getting Hot in Here", + "ITS_HARD_Description": "Entfessle die alten Geister von Licht und Dunkelheit in deiner Welt, so dass noch stärkere Gegner erscheinen und die Welt mit glitzernden Schätzen (und Regenbogen!) überziehen.", + "ITS_HARD_Name": "Das ist nicht leicht!", + "IT_CAN_TALK_Description": "Baue ein Haus in einem Pilz-Biom und lass Trüffel einziehen.", + "IT_CAN_TALK_Name": "Kann es sprechen?!", + "I_AM_LOOT_Description": "Entdecke eine goldene Truhe im Untergrund und sieh dir an, was drin ist.", + "I_AM_LOOT_Name": "Ich bin Beute!", + "JEEPERS_CREEPERS_Description": "Lande im Untergrund in einer Spinnenhöhle.", + "JEEPERS_CREEPERS_Name": "Jeepers Creepers", + "KILL_THE_SUN_Description": "Überlebe eine Sonnenfinsternis, einen Tag, der dunkler ist als die Nacht und voller Horrorkreaturen ist.", + "KILL_THE_SUN_Name": "Töte die Sonne", + "LIHZAHRDIAN_IDOL_Description": "Besiege Golem, den steingesichtigen ritualistischen Götzen des Lihzard-Stamms.", + "LIHZAHRDIAN_IDOL_Name": "Lihzahrd-Götze", + "LIKE_A_BOSS_Description": "Erhalte ein Item, das einen Boss beschwört.", + "LIKE_A_BOSS_Name": "Wie ein Boss", + "LUCKY_BREAK_Description": "Überlebe einen langen Fall mit nur einem Körnchen Leben.", + "LUCKY_BREAK_Name": "Glück gehabt", + "MARATHON_MEDALIST_Description": "Lege insgesamt 26.2 Meilen zu Fuß zurück.", + "MARATHON_MEDALIST_Name": "Marathon-Medaillengewinner", + "MASTERMIND_Description": "Besiege das Gehirn Cthulhus, ein riesiges Dämonenhirn, das das kriechende Purpur heimsucht.", + "MASTERMIND_Name": "Superhirn", + "MATCHING_ATTIRE_Description": "Rüste in allen drei Rüstungsslots Rüstung aus: Kopf, Brust, Füße.", + "MATCHING_ATTIRE_Name": "Passende Kleidung", + "MECHA_MAYHEM_Description": "Kämpfe gegen die Zwillinge, den Zerstörer und Skeletron Prime gleichzeitig und besiege sie.", + "MECHA_MAYHEM_Name": "Mecha Mayhem", + "MINER_FOR_FIRE_Description": "Stelle eine geschmolzene Spitzhacke her, indem du nur die heißesten Materialien benutzt.", + "MINER_FOR_FIRE_Name": "Feuerbergarbeiter", + "NoCategory": "Keine", + "NOT_THE_BEES_Description": "Feuere eine Bienenpistole ab, während du ein ganzes Set aus Bienenrüstung trägst.", + "NOT_THE_BEES_Name": "Nicht die Bienen!", + "NO_HOBO_Description": "Baue ein Haus, das richtig für deinen ersten Stadt-NPC ist, wie zum Beispiel den Fremdenführer, damit er einziehen kann.", + "NO_HOBO_Name": "Keine Penner", + "OBSESSIVE_DEVOTION_Description": "Besiege den uralten Kultisten, den fanatischen Anführer des Verliesordens.", + "OBSESSIVE_DEVOTION_Name": "Zwanghafte Aufopferung", + "OBTAIN_HAMMER_Description": "Erhalte deinen ersten Hammer durch Herstellung oder anderweitig.", + "OBTAIN_HAMMER_Name": "Stopp! Hammer Time!", + "OOO_SHINY_Description": "Baue dein erstes Erznugget mit einer Spitzhacke ab.", + "OOO_SHINY_Name": "Oooh! Hübsch!", + "PHOTOSYNTHESIS_Description": "Baue Grünalgen ab, ein organisches Erz, das du tief in der dichtesten Flora findest.", + "PHOTOSYNTHESIS_Name": "Photosynthese", + "PRETTY_IN_PINK_Description": "Töte Pinky.", + "PRETTY_IN_PINK_Name": "Pretty in Pink", + "PRISMANCER_Description": "Erhalte eine Regenbogenrute.", + "PRISMANCER_Name": "Prismatiker", + "PUMPKIN_SMASHER_Description": "Besiege den Kürbiskönig, den grusligen Lord vom Abend vor Allerheiligen.", + "PUMPKIN_SMASHER_Name": "Kürbiszerklopfer", + "RAINBOWS_AND_UNICORNS_Description": "Feuere ein Regenbogengewehr ab, während du auf einem Einhorn reitest.", + "RAINBOWS_AND_UNICORNS_Name": "Regenbogen und Einhörner", + "REAL_ESTATE_AGENT_Description": "Alle möglichen Stadt-NPCs leben in deiner Welt.", + "REAL_ESTATE_AGENT_Name": "Immobilienmakler", + "ROBBING_THE_GRAVE_Description": "Erhalte einen seltenen Schatz von einem schwierigen Monster im Verlies.", + "ROBBING_THE_GRAVE_Name": "Grabräuber", + "ROCK_BOTTOM_Description": "Es geht nur nach oben!", + "ROCK_BOTTOM_Name": "Absoluter Tiefpunkt", + "SERVANT_IN_TRAINING_Description": "Schließe deine 1. Quest für den Angler ab.", + "SERVANT_IN_TRAINING_Name": "Diener in Ausbildung", + "SICK_THROW_Description": "Erhalte den Terraner.", + "SICK_THROW_Name": "Mega-Wurf", + "SlayerCategory": "Schlächter", + "SLAYER_OF_WORLDS_Description": "Besiege jeden Boss in Terraria.", + "SLAYER_OF_WORLDS_Name": "Schlächter der Welten", + "SLIPPERY_SHINOBI_Description": "Besiege den Schleimkönig, Herr über alles Schleimige.", + "SLIPPERY_SHINOBI_Name": "Rutschiger Shinobi", + "SMASHING_POPPET_Description": "Verwende Sprengstoff oder deinen treuen Hammer, um eine Schattenkugel oder ein Purpurherz in den bösen Teilen deiner Welt zu zerstören.", + "SMASHING_POPPET_Name": "Hammermäßig!", + "STAR_DESTROYER_Description": "Besiege die vier himmlischen Türme des Monds.", + "STAR_DESTROYER_Name": "Sternenzerstörer", + "STAR_POWER_Description": "Stelle einen Manakristall aus Sternschnuppen her und brauche ihn auf.", + "STAR_POWER_Name": "Sternenmacht", + "STICKY_SITUATION_Description": "Überlebe den Schleimregen, bei dem gelantineartige Organismen haufenweise vom Himmel fallen.", + "STICKY_SITUATION_Name": "Klebrige Situation", + "STILL_HUNGRY_Description": "Besiege die Fleischwand, den Meister und Kern der Welt, der nach einem großen Brandopfer aufersteht.", + "STILL_HUNGRY_Name": "Immer noch hungrig", + "STING_OPERATION_Description": "Besiege die Bienenkönigin, Herrscherin über die Dschungelbienenstöcke.", + "STING_OPERATION_Name": "Flotte Bienen", + "SUPREME_HELPER_MINION_Description": "Schließe insgesamt 200 Quests für den Angler ab.", + "SUPREME_HELPER_MINION_Name": "Oberster Helfergünstling!", + "SWORD_OF_THE_HERO_Description": "Erhalte eine Terraklinge, die aus den feinsten Klingen aus Licht und Dunkelheit geschmiedet wurde.", + "SWORD_OF_THE_HERO_Name": "Schwert des Helden", + "TEMPLE_RAIDER_Description": "Durchbrich die undurchdringlichen Wände des Dschungeltempels.", + "TEMPLE_RAIDER_Name": "Tempelräuber", + "THERE_ARE_SOME_WHO_CALL_HIM_Description": "Töte Tim.", + "THERE_ARE_SOME_WHO_CALL_HIM_Name": "Einige nennen ihn ...", + "THE_CAVALRY_Description": "Rüste ein Reittier aus.", + "THE_CAVALRY_Name": "Die Kavallerie", + "THE_GREAT_SOUTHERN_PLANTKILL_Description": "Besiege Plantera, die überwachsene Monstrosität in den Tiefen des Dschungels.", + "THE_GREAT_SOUTHERN_PLANTKILL_Name": "Das große Pflanzenjäten im Süden", + "THROWING_LINES_Description": "Wirf ein Jojo.", + "THROWING_LINES_Name": "Rund um die Welt", + "TIL_DEATH_Description": "Töte den Bräutigam.", + "TIL_DEATH_Name": "Für alle Zeit", + "TIMBER_Description": "Fälle deinen ersten Baum.", + "TIMBER_Name": "Holz!!!", + "TIN_FOIL_HATTER_Description": "Kämpfe gegen die Invasion vom Mars an, denn diese Außerirdischen kommen, um dein Gehirn zu verwirren und dir Sonden an unangenehme Stellen zu stecken.", + "TIN_FOIL_HATTER_Name": "Alufolienirrer", + "TOPPED_OFF_Name": "Oberkante Unterlippe", + "TROUT_MONKEY_Description": "Schließe deine 25. Quest für den Angler ab.", + "TROUT_MONKEY_Name": "Forellenaffe", + "VEHICULAR_MANSLAUGHTER_Description": "Besiege einen Gegner, indem du ihn mit einer Lore überfährst.", + "VEHICULAR_MANSLAUGHTER_Name": "Fahrlässige Tötung", + "WALK_THE_PLANK_Description": "Triumphiere über eine Pirateninvasion, eine Gruppe Plünderer aus den Meeren, die deine Beute wollen ... und dein Leben!", + "WALK_THE_PLANK_Name": "Über die Planke gehen", + "WATCH_YOUR_STEP_Description": "Falle einer gemeinen Falle im Untergrund zum Opfer.", + "WATCH_YOUR_STEP_Name": "Vorsicht, wo du hintrittst!", + "WHERES_MY_HONEY_Description": "Entdecke einen großen Bienenstock mitten im Dschungel.", + "WHERES_MY_HONEY_Name": "Wo ist mein Honig?", + "WINTERHEARTED_Description": "Besiege die Eiskönigin, die böse Hexe der kältesten Nächte.", + "WINTERHEARTED_Name": "Herz des Winters", + "WORM_FODDER_Name": "Wurmfutter", + "YOU_AND_WHAT_ARMY_Description": "Befehlige neun beschworene Günstlinge gleichzeitig.", + "YOU_AND_WHAT_ARMY_Name": "Du und welche Armee?", + "YOU_CAN_DO_IT_Description": "Überlebe die erste ganze Nacht deines Charakters.", + "YOU_CAN_DO_IT_Name": "Du schaffst es!" + }, + "CLI": { + "AutomaticPortForward": "Port automatisch weiterleiten? (j/n): ", + "AvailableCommands": "Verfügbare Befehle:", + "BanMessage": "Vom Server verbannt", + "Ban_Command": "sperren", + "Ban_Description": "Verbannt einen Spieler vom Server.", + "Ban_Example": " sperren", + "Ban_Usage": "Verwendung: sperren", + "ChooseDifficulty": "Schwierigkeitsstufe auswählen: ", + "ChooseEvil": "Wähle das Böse in der Welt: ", + "ChooseSize": "Größe wählen: ", + "ChooseWorld": "Welt wählen: ", + "Clear_Command": "löschen", + "Clear_Description": "Lösch das Konsolenfenster.", + "ClientWasBooted": "{0} wurde gebootet: {1}", + "Corrupt": "Verdorben", + "Crimson": "Purpur", + "Dawn_Command": "Morgengrauen", + "Dawn_Description": "Ändere die Zeit zu Morgengrauen.", + "DeleteConfirmation": "{0} wirklich löschen?", + "DeleteWorld_Command": "T", + "DeleteWorld_Description": "Welt löschen", + "DeleteWorld_Example": "T ", + "Dusk_Command": "Dämmerung", + "Dusk_Description": "Ändere die Zeit zu Dämmerung", + "EnterServerPassword": "Server-Passwort (wenn keines vorhanden ist, drücke auf Eingabe): ", + "EnterWorldName": "Welt-Name eingeben: ", + "ExitNoSave_Command": "verlassen-nichtspeichern", + "ExitNoSave_Description": "Schließt den Server ohne zu speichern.", + "Exit_Command": "verlassen", + "Exit_Description": "Schließt den Server und speichert.", + "FPS_Command": "fps", + "HelpHint": "Gib ‚Hilfe‘ ein, um eine Liste mit Befehlen aufzurufen.", + "Help_Command": "hilfe", + "Help_Description": "Zeigt eine Liste mit Befehlen an.", + "InvalidCommand": "Ungültiger Befehl.", + "KickMessage": "Vom Server geworfen.", + "Kick_Command": "rauswerfen", + "Kick_Description": "Wirft einen Spieler vom Server.", + "Kick_Example": " rauswerfen", + "Kick_Usage": "Verwendung: rauswerfen", + "ListeningOnPort": "Zuhören auf Port {0}", + "MaxPlayers_Command": "maxspieler", + "MaxPlayers_Description": "Druckt die maximale Anzahl an Spielern.", + "Midnight_Command": "mitternacht", + "Midnight_Description": "Ändere die Zeit zu Mitternacht", + "MOTD": "MDT: {0}", + "MOTD_Command": "motd", + "MOTD_Description": "MDT ausdrucken.", + "NewWorld_Command": "n", + "NewWorld_Description": "Neue Welt", + "No": "nein", + "NoMOTD": "Willkommen zu {0}!", + "Noon_Command": "mittag", + "Noon_Description": "Ändere die Zeit zu Mittag", + "NoPassword": "Kein Passwort eingestellt.", + "NoPlayers": "Keine Spieler verbunden.", + "OnePlayerConnected": "1 Spieler verbunden.", + "Password": "Passwort: {0}", + "PasswordDisabled": "Passwort deaktiviert.", + "PasswordSet": "Passwort: {0}", + "Password_Command": "passwort", + "Password_Description": "Passwort anzeigen.", + "PlayerLimit": "Spielerlimit: {0}", + "PlayersConnected": "{0} Spieler verbunden.", + "Playing_Command": "spielt", + "Playing_Description": "Liste der Spieler anzeigen.", + "Port": "Port: {0}", + "Port_Command": "port", + "Port_Description": "Drücke den Zuhörport aus.", + "Random": "Zufall", + "Save_Command": "speichern", + "Save_Description": "Speichere die Spielwelt.", + "Say_Command": "sagen", + "Say_Description": "Schicke eine Nachricht.", + "Say_Example": "Sage ", + "Say_Usage": "Verwendung: Sage ", + "Server": "Terraria-Server {0}", + "ServerMessage": " {0}", + "ServerStarted": "Server gestartet", + "SetInitialPort": "Server-Port (drücke Eingabe für 7777): ", + "SetMOTD_Command": "motd", + "SetMOTD_Description": "MOTD ändern.", + "SetMOTD_Example": "motd ", + "SetPassword_Command": "passwort", + "SetPassword_Description": "Passwort ändern.", + "SetPassword_Example": "passwort ", + "Settle_Command": "absetzen", + "Settle_Description": "Alles Wasser setzt sich in der Endposition ab.", + "ShortNo": "n", + "ShortYes": "j", + "Time": "Zeit: {0}", + "Time_Command": "zeit", + "Time_Description": "Zeigt die Spielzeit an.", + "Version_Command": "version", + "Version_Description": "Druckt die Versionsnummer.", + "WaterIsAlreadySettling": "Das Wasser setzt sich bereits ab.", + "Yes": "ja", + "DisplaySeed": "Weltseed: {0}", + "EnterSeed": "Gib Seed ein (für Zufallsseed freilassen):", + "NoValidSeed": "Diese Welt wurde in einer älteren Version erstellt, die keine Seeds unterstützt.", + "Seed_Command": "Seed", + "Seed_Description": "Zeigt den Welt-Seed an." + }, + "Controls": { + "RightClick": "Rechts klicken" + }, + "Currency": { + "Copper": "Kupfer", + "DefenderMedals": "Verteidigermedaille", + "Gold": "Gold", + "Platinum": "Platin", + "Silver": "Silber" + }, + "Enemies": { + "MoonLord": "Mondherr", + "TheTwins": "Die Zwillinge" + }, + "Error": { + "BadHeaderBufferOverflow": "Fehlerhafter Header hat zu Overflow beim Lesebuffer geführt.", + "DataSentAfterConnectionLost": "Hat versucht, nach getrennter Verbindung Daten an den Client zu schicken", + "Error": "Fehler", + "ExceptionNormal": " Normale Ausnahme: {0}", + "LaunchFromSteam": "Bitte starte das Spiel vom Steam-Client aus.", + "LoadFailed": "Laden fehlgeschlagen!", + "LoadFailedNoBackup": "Laden fehlgeschlagen! Kein Backup gefunden.", + "NetMessageError": "Fehler bei Nachricht {0}", + "ServerCrash": "Serverabsturz: {0}\n{1}\nBitte schicke crashlog.txt an support@terraria.org", + "TriedToRunServerTwice": "Es wurde versucht, zwei Server auf dem gleichen PC laufen zu lassen", + "UnableToCapture": "Aufnahme nicht möglich.", + "UnableToLoadWorld": "Welt konnte nicht geladen werden:", + "UnableToWritePreferences": "Datei konnte nicht geschrieben werden unter: {0}", + "InvalidLobbyFlag": "-lobby flag used without \"{0}\" or \"{1}\". Ignorier es einfach." + }, + "Game": { + "Actuators": "Aktoren", + "BallBounceResult": "{0} wurde {1} Mal getroffen, bevor er den Boden berührte!", + "BedObstructed": "Dein Bett ist versperrt", + "BlueWires": "Blaue Kabel", + "DroppedCoins": "{0} fallen gelassen", + "EnemiesDefeatedAnnouncement": "Der {0}. {1} wurde besiegt!", + "EnemiesDefeatedByAnnouncement": "{0} hat den {1}. {2} besiegt!", + "FinalWave": "Letzte Welle", + "FirstWave": "Erste Welle", + "GreenWires": "Grüne Kabel", + "HasTeleportedTo": "{0} hat sich nach {1} teleportiert", + "HouseChair": "ein Stuhl", + "HouseDoor": "eine Tür", + "HouseLightSource": "eine Lichtquelle", + "HouseMissing_1": "Diesem Haus fehlt {0}.", + "HouseMissing_2": "Diesem Haus fehlt {0} und {1}.", + "HouseMissing_3": "Diesem Haus fehlt {0}, {1} und {2}.", + "HouseMissing_4": "Diesem Haus fehlt {0}, {1}, {2} und {3}.", + "HouseTable": "ein Tisch", + "InvasionPoints": "{0} Punkte", + "InvasionWave_Type1": "{0}: {1}", + "InvasionWave_Type2": "{0}: {1} und {2}", + "InvasionWave_Type3": "{0}: {1}, {2} und {3}", + "InvasionWave_Type4": "{0}: {1}, {2}, {3} und {4}", + "InvasionWave_Type5": "{0}: {1}, {2}, {3}, {4} und {5}", + "InvasionWave_Type6": "{0}: {1}, {2}, {3}, {4}, {5} und {6}", + "InvasionWave_Type7": "{0}: {1}, {2}, {3}, {4}, {5}, {6} und {7}", + "InvasionWave_Type8": "{0}: {1}, {2}, {3}, {4}, {5}, {6}, {7} und {8}", + "JoinGreeting": "Aktuelle Spieler: {0}.", + "NPCTitle": "{0} der {1}", + "PlayerDeathTime": "{0} ist vor {1} gestorben", + "PvPFlag": "(PvP)", + "RedWires": "Rote Kabel", + "SpawnPointRemoved": "Spawnpoint entfernt!", + "SpawnPointSet": "Spawnpoint gesetzt!", + "TeleportTo": "Teleportieren nach {0}", + "Time": "Zeit: {0}", + "Wave": "Welle: {0}", + "WaveCleared": "{0} geschafft", + "WaveMessage": "Welle {0}: {1}", + "YellowWires": "Gelbe Kabel", + "BirthdayParty_1": "Sieht so aus, als würde {0} eine Party schmeißen", + "BirthdayParty_2": "Sieht so aus, als würden {0} & {1} eine Party schmeißen", + "BirthdayParty_3": "Sieht so aus, als würden {0}, {1} und {2} eine Party schmeißen", + "RespawnInPrefix": "", + "RespawnInSuffix": "{0}" + }, + "GameUI": { + "ActuationDeviceOff": "Aktuatoraparat AUS", + "ActuationDeviceOn": "Aktuatoraparat EIN", + "BaitPower": "{0}% Köderkraft", + "BaitRequired": "Benötigt Köder, um Fische zu fangen", + "Bright": "Hell", + "Buy": "Kaufen", + "BuyWithValue": "({0}) kaufen", + "Cancel": "Abbrechen", + "Change": "Ändern", + "Clear": "Wolkenlos", + "Cloudy": "Wolkig", + "CompassCenter": "Zentral", + "CompassEast": "{0}' Ost", + "CompassWest": "{0}' West", + "Depth": "{0}'", + "DepthLevel": "Level", + "Disabled": "Deaktiviert", + "DPS": "{0} Schaden pro Sekunde", + "EastWind": " ({0} mph O)", + "Enabled": "Aktiviert", + "EnemiesNearby": "{0} Feinde in der Nähe", + "Expert": "Experte", + "Faded": "Verblasst", + "FirstQuarter": "Erstes Viertel", + "FishingPower": "{0} Angelkraft", + "FishingWarning": "Warnung!", + "FullFishingPower": "{0} ({1}%) Angelkraft", + "FullMoon": "Vollmond", + "HairStyle": "Frisur", + "HeatDistortion": "Wärmeverteilung: {0}", + "HeavyRain": "Schwerer Regen", + "Hidden": "Verborgen", + "LayerCaverns": "Höhlen", + "LayerSpace": "Leertaste", + "LayerSurface": "Oberfläche", + "LayerUnderground": "Untergrund", + "LayerUnderworld": "Unterwelt", + "LightRain": "Nieselregen", + "MechanicalRulerOff": "Mechanisches Lineal AUS", + "MechanicalRulerOn": "Mechanisches Lineal EIN", + "MostlyCloudy": "Stark bewölkt", + "NewMoon": "Neumond", + "NoDPS": "K/A", + "NoEnemiesNearby": "Keine Feinde in der Nähe", + "NoKillCount": "Kill-Count nicht verfügbar", + "NoRareCreatures": "Keine seltenen Kreaturen in der Nähe", + "Normal": "Normal", + "NotEnoughWater": "Nicht genug Wasser!", + "NoTreasureNearby": "Keine Schätze in der Nähe", + "OneEnemyNearby": "1 Feind in der Nähe!", + "OreDetected": "{0} in der Nähe gefunden", + "Overcast": "Bewölkt", + "PaintSprayerOff": "Farbensprüher AUS", + "PaintSprayerOn": "Farbensprüher EIN", + "PartlyCloudy": "Teils bewölkt", + "PlayerDistance": "({0} ft)", + "PrecentFishingPower": "{0}% Angelkraft", + "Rain": "Regen", + "RulerOff": "Lineal AUS", + "RulerOn": "Lineal EIN", + "SettingsMenu": "Einstellungsmenü", + "OpenFileFolder": "{$LegacyInterface.110}", + "Speed": "{0} mph", + "StormEffects": "Sturmeffekte: {0}", + "ThirdQuarter": "Drittes Viertel", + "WaningCrescent": "Letztes Viertel", + "WaningGibbous": "Abnehmender Dreiviertelmond", + "WaxingCrescent": "Zunehmender Sichelmond", + "WaxingGibbous": "Zunehmender Dreiviertelmond", + "WestWind": " ({0} mph W)", + "WireModeForced": "Mechanische Anzeige: Gezwungen", + "WireModeNormal": "Mechanische Anzeige: Normal", + "Gameplay": "Gameplay", + "GameZoom": "Zoom: {0}% ({1}%)", + "LightingUpdateEveryFrameOff": "Rapid Lighting Off", + "LightingUpdateEveryFrameOn": "Rapid Lighting On", + "Misc": "Verschiedenes", + "QualityHigh": "Hoch", + "QualityLow": "Niedrig", + "QualityMedium": "Mittel", + "QualityOff": "Aus", + "UIScale": "UI-Skala: {0}% ({1}%)", + "WaveQuality": "Wellenqualität: {0}", + "ZoomCategory": "Zoom" + }, + "Misc": { + "ForceWaterSettling": "Wasser wird gezwungen, sich abzusetzen.", + "ResolutionChanged": "Auflösung geändert zu: {0}x{1}.", + "ShortDays": "T", + "ShortHours": "St.", + "ShortMinutes": "M", + "ShortSeconds": "S", + "WaterSettled": "Wasser hat sich abgesetzt." + }, + "Net": { + "CheatingInvalid": "Betrugsversuch festgestellt: Ungültiger Rauswurf", + "CheatingLiquidSpam": "Betrugsversuch festgestellt: Ständiger Spam", + "CheatingProjectileSpam": "Betrugsversuch festgestellt: Gezielter Spam", + "CheatingTileRemovalSpam": "Betrugsversuch festgestellt: Feldspam entfernen", + "CheatingTileSpam": "Betrugsversuch festgestellt: Feldspam hinzufügen", + "ClientConnecting": "{0} stellt eine Verbindung her ...", + "ClientPlaying": "({0}) {1} spielt", + "ClientRequestedWorldInfo": "({0}) {1} hat Informationen über die Welt angefordert", + "ClientsConnected": "{0} Clients verbunden.", + "ClientSendingData": "({0}) {1} schickt Spielerdaten ...", + "ClientStatusComplete": "({0}) {1} {2}: Fertig!", + "ConnectingTo": "Verbindung mit {0} wird hergestellt", + "EmptyName": "Leerer Name.", + "FoundServer": "Server gefunden", + "IsReceivingTileData": "erhält Felddaten", + "LostConnection": "Verbindung abgebrochen", + "NameTooLong": "Name ist zu lang.", + "RequestingTileData": "Felddaten werden angefordert", + "RequestingWorldInformation": "Informationen über die Welt werden angefordert", + "SendingPlayerData": "Spielerdaten werden verschickt", + "ServerAutoShutdown": "Lokaler Spieler ist gegangen. Automatischer Shutdown beginnt.", + "StatusComplete": "{0}: Fertig!", + "WaitingForClients": "Auf Clients warten ..." + }, + "Social": { + "Joining": "Beitreten ...", + "JoiningFriend": "{0} beitreten ...", + "StatusInGame": "Online spielen.", + "StatusJoining": "Spiel beitreten." + }, + "UI": { + "Achievements": "Erfolge", + "Back": "Zurück", + "Cancel": "Abbrechen", + "Delete": "Löschen", + "Effects": "Effekte", + "EnterButton": "Eingabe", + "EnterMessage": "Nachricht eingeben:", + "EnterNewName": "Neuen Namen eingeben:", + "Expert": "Experte", + "ExpertDescription": "(Sehr viel größere Schwierigkeitsstufe & Beute)", + "ExpertDescriptionFlavor": "Reichtum & Ruhm, Kleiner.", + "Favorite": "Favorit", + "Hardcore": "Hardcore", + "Keybindings": "Tastaturbelegung", + "Mediumcore": "Mediumcore", + "More": "mehr", + "MoveOffCloud": "Von Wolke weg", + "MoveToCloud": "Zu Wolke hin", + "New": "Neu", + "Normal": "Normal", + "LightMode_White": "{$LegacyMenu.56}", + "LightMode_Color": "{$LegacyMenu.55}", + "Play": "Spielen", + "RestoreButton": "Wiederherstellen", + "Save": "Speichern", + "SelectPlayer": "Spieler auswählen", + "SelectWorld": "Welt auswählen", + "Softcore": "Softcore", + "SpaceButton": "Leertaste", + "Submit": "Absenden", + "Unfavorite": "Als Favorit löschen", + "WorldCreatedFormat": "Erstellt: {0}", + "WorldSizeFormat": "{0} Welt", + "WorldSizeLarge": "Groß", + "WorldSizeMedium": "Mittel", + "WorldSizeSmall": "Klein", + "WorldSizeUnknown": "Unbekannt", + "BartenderHelp": "Eternia-Kristall", + "CopySeed": "Seed kopieren: {0}", + "EnterSeed": "Gib Seed ein (für Zufallsseed freilassen)", + "LoadingCode": "Wird geladen:", + "SeedCopied": "Seed kopiert", + "ZoomIn": "{$LegacyMenu.168}", + "ZoomOut": "{$LegacyMenu.169}", + "Ellipsis": "...", + "LightMode_Retro": "{$LegacyMenu.57}", + "LightMode_Trippy": "{$LegacyMenu.58}", + "PlayerEmptyName": "{$Net.EmptyName}" + }, + "DeathSource": { + "NPC": "{0} von {1}.", + "Player": "{0} von {1}s {2}.", + "Projectile": "{0} von {1}." + }, + "DeathText": { + "Burned": "{0} konnte das Feuer nicht löschen.", + "Default": "{0}.", + "Drowned_1": "{0} hat vergessen zu atmen.", + "Drowned_2": "{0} schläft jetzt bei den Fischen.", + "Drowned_3": "{0} ist ertrunken.", + "Drowned_4": "{0} ist jetzt Haifischfutter.", + "Electrocuted": "{0} konnte die Watt nicht aushalten.", + "Fell_1": "{0} ist zu Tode gestürzt.", + "Fell_2": "{0} ist nicht abgeprallt.", + "Lava_1": "{0} ist geschmolzen.", + "Lava_2": "{0} wurde verbrannt.", + "Lava_3": "{0} hat versucht, in Lava zu schwimmen.", + "Lava_4": "{0} spielt gerne in Magma.", + "Petrified_1": "{0} ist in Stücke zerfallen.", + "Petrified_3": "{0} muss mit dem Besen aufgekehrt werden.", + "Petrified_4": "{0} ist zum Dreckhaufen verkommen.", + "Poisoned": "{0} konnte das Gegenmittel nicht finden.", + "Slain": "{0} wurde getötet ...", + "Stabbed": "{0} wurde erstochen.", + "Suffocated": "{0} konnte nicht atmen.", + "Teleport_1": "{0} wurde nicht materialisiert.", + "Teleport_2_Female": "{0}s Beine sind da aufgetaucht, wo ihr Kopf sein sollte.", + "Teleport_2_Male": "{0}s Beine sind da aufgetaucht, wo sein Kopf sein sollte.", + "TriedToEscape": "{0} versuchte zu fliehen.", + "WasLicked": "{0} wurde abgeleckt." + }, + "DeathTextGeneric": { + "ArmTornOff": "{0} wurden die Arme ausgerissen.", + "Chopped": "{0} wurde zerkleinert.", + "Cut": "{0} wurde in der Mittel durchgesäbelt.", + "Decapitated": "{0} wurde geköpft.", + "Destroyed": "{0} wurde zerstört.", + "Dissected": "{0} wurde brutal seziert.", + "EntrailsRippedOut": "{0}s Innereien wurden herausgerissen.", + "Eviscerated": "{0} wurde vernichtet.", + "ExtremitiesDetached": "{0} ließ sich den Kopf wegreißen.", + "FaceTornOff": "{0}s Gesicht wurde abgerissen.", + "Flailing": "{0} hörte endlich zu zucken auf.", + "HeadRemoved": "{0} wurde der Kopf abgenommen.", + "Impaled": "{0} wurde aufgespießt.", + "InnardsBecameOutards": "{0} sah dabei zu, wie die eigenen Eingeweide herausquollen.", + "Mangled": "{0}s Körper wurde verstümmelt.", + "Massacred": "{0} wurde massakriert.", + "Murdered": "{0} wurde ermordet", + "PileOfFlesh": "{0} hat sich in einen unansehnlichen Fleischhaufen verwandelt.", + "Plead": "{0}s Bitte um den Tod wurde erhört.", + "Removed": "{0} wurde aus {1} entfernt.", + "Ripped": "{0}s Fleisch wurde von den Knochen gerissen.", + "Ruptured": "{0} lebensnotwendige Organe wurden zerfetzt.", + "SkullCrushed": "{0}s Schädel wurde eingeschlagen", + "Slain": "{0} wurde ermordet.", + "Snapped": "{0} wurde in zwei Teile geteilt.", + "TornInHalf": "{0} wurde in zwei Hälften gerissen." + }, + "DungeonDefenders2": { + "BartenderWarning": "Der Eternia-Kristall sträubt sich gegen dieses Gebiet und teleportiert sich sofort weg. Der Tavernenwirt hatte erwähnt, dass er in einem großen, flachen und offenen Gebiet aufgestellt werden sollte ...", + "CantSummonTower": "It doesn't seem to work without an Etheria Crystal nearby...", + "InvasionProgressTitle": "Armee des Alten", + "InvasionStart": "Die Armee des Alten nähert sich!", + "InvasionWin": "Die Armee des Alten wurde besiegt!", + "WaveComplete": "Welle abgeschlossen!" + }, + "Key": { + "DOWN": "RUNTER", + "UP": "HOCH" + }, + "Language": { + "English": "English (Englisch)", + "German": "Deutsch", + "Italian": "Italiano (Italienisch)", + "French": "Français (Französisch)", + "Spanish": "Español (Spanisch)", + "Russian": "Русский (Russisch)", + "Chinese": "简体中文 (Vereinfachtes Chinesisch)", + "Portuguese": "Português brasileiro (Portugiesisch (Brasilien))", + "Polish": "Polski (Polnisch)" + }, + "RandomWorldName_Composition": { + "6": "{Adjective} {Location}" + } +} \ No newline at end of file diff --git a/Localization/Content/de-DE/Game.json b/Localization/Content/de-DE/Game.json new file mode 100644 index 0000000..ff9e356 --- /dev/null +++ b/Localization/Content/de-DE/Game.json @@ -0,0 +1,780 @@ +{ + "Announcement": { + "HasBeenDefeated_Plural": "{0} wurden besiegt!", + "HasBeenDefeated_Single": "{0} wurde besiegt!", + "HasAwoken": "{0} ist erwacht!", + "HasArrived": "{0} ist angekommen!" + }, + "ArmorSetBonus": { + "MetalTier1": "2 Abwehr", + "MetalTier2": "3 Abwehr", + "CobaltRanged": "20% Chance, keine Munition zu verbrauchen", + "MythrilCaster": "Um 17% reduzierte Mananutzung", + "MythrilMelee": "Um 5% erhöhte kritische Nahkampf-Trefferchance", + "MythrilRanged": "20% Chance, keine Munition zu verbrauchen", + "AdamantiteCaster": "Um 19% reduzierte Mananutzung", + "AdamantiteMelee": "Um 18% erhöhtes Nahkampf-und Bewegungstempo", + "AdamantiteRanged": "25% Chance, keine Munition zu verbrauchen", + "ShadowScale": "Um 15% erhöhte Bewegungsgeschwindigkeit", + "Wood": "1 Abwehr", + "Crimson": "Erhöht Lebensregeneration deutlich", + "Frost": "Nah- und Fernkampfangriffe verursachen Frostbrand", + "Tiki": "Erhöht die maximale Anzahl deiner Günstlinge", + "Palladium": "Erhöht nach Angriff auf Gegner Lebensregeneration deutlich", + "Orichalcum": "Blumenblätter regnen auf dein Ziel und richten Zusatzschaden an", + "Titanium": "Werde immun nach dem Angriff auf einen Gegner", + "Chlorophyte": "Beschwört einen mächtigen Blattkristall mit dem du auf Gegner in der Nähe schießen kannst", + "Wizard": "Um 10% erhöhte kritische Magie-Trefferchance", + "Meteor": "Weltraumpistole kostet 0 Mana", + "SpectreHealing": "Magieschaden bei Gegnern heilen den Spieler mit der niedrigsten Gesundheit", + "Shroomite": "Stillstehen tarnt dich, erhöht deine Fernkampffähigkeiten\nund verringert die Chance, dass Gegner auf dich zielen", + "Platinum": "4 Abwehr", + "Pumpkin": "Um 10% erhöhter Schaden", + "Spooky": "Erhöht Günstlingschaden um 25%", + "SpectreDamage": "Angerichteter Magieschaden fügt Gegnern in der Nähe zusätzlichen Schaden zu", + "MagicHat": "Erhöht das Höchstmana um 60", + "BeetleDefense": "Käfer beschützen dich vor Schaden", + "BeetleDamage": "Käfer erhöhen deinen Nahkampfschaden und -geschwindigkeit", + "Bee": "Erhöht Günstlingschaden um 10%", + "Spider": "Erhöht Günstlingschaden um 12%", + "Vortex": "Doppeltes Antippen {0} um Tarnung an- oder auszuschalten,\ndie Fernkampffähigkeiten zu erhöhen und die Chance zu verringern, dass Feinde auf dich zielen. Verringert allerdings auch Bewegungsgeschwindigkeit.", + "Stardust": "Doppeltes Antippen {0}, um deinen Wächter an einen Ort zu lenken.", + "Forbidden": "Doppeltes Antippen {0}, um einen alten Sturm über der Postion des Cursors zu beschwören", + "Jungle": "Um 16% reduzierte Mananutzung", + "Molten": "17% extra Nahkampfschaden", + "Mining": "Um 30% erhöhtes Abbautempo", + "CobaltCaster": "Um 14% reduzierte Mananutzung", + "CobaltMelee": "Um 15% erhöhtes Nahkampftempo", + "ApprenticeTier2": "Erhöht die Höchstanzahl deiner Wächter\nSichtfeld und Reichweite von Flammenstoß sind massiv erhöht", + "ApprenticeTier3": "Erhöht die Höchstanzahl deiner Wächter\nVerbessert die Wirksamkeit von Flammenstoß stark", + "HuntressTier2": "Erhöht die Höchstanzahl deiner Wächter\nSprengfallen laden schneller und übergießen Feinde mit Öl\nSetze eingeölte Gegner in Brand, um extra Schaden zu verursachen", + "HuntressTier3": "Erhöht die Höchstanzahl deiner Wächter\nVerbessert die Wirksamkeit von Sprengfallen stark", + "MonkTier2": "Erhöht die Höchstanzahl deiner Wächter\nBlitzaura kann jetzt kritischen Schaden zufügen und schneller zuschlagen ", + "MonkTier3": "Erhöht die Höchstanzahl deiner Wächter\nVerbessert die Wirksamkeit von Blitzaura stark", + "SquireTier2": "Erhöht die Höchstanzahl deiner Wächter\nBallista durchdringt mehr Ziele und verfällt in Panik, wenn du Schaden erleidest", + "SquireTier3": "Erhöht die Höchstanzahl deiner Wächter\nVerbessert die Wirksamkeit der Ballista stark" + }, + "BuffDescription": { + "AmmoBox": "20% Chance, keine Munition zu verbrauchen", + "AmmoReservation": "20% Chance, keine Munition zu verbrauchen", + "Archery": "Um 20% erhöhter Pfeilschaden und -tempo", + "BabyDinosaur": "Ein Babydinosaurier folgt dir", + "BabyEater": "Ein Baby-Seelenfresser folgt dir", + "BabyFaceMonster": "Ein Babygesichtmonster folgt dir", + "BabyGrinch": "Ein Baby-Grinch folgt dir", + "BabyHornet": "Es hält dich für seine Mutter", + "BabyPenguin": "Ich glaube, es will deinen Fisch", + "BabySkeletronHead": "Frag lieber nicht ...", + "BabySlime": "Das Schleimbaby kämpft für dich", + "BabySnowman": "Ein Babyschneemann folgt dir", + "BabyTruffle": "Ist er nicht einfach süüüüß?", + "BallistaPanic": "Deine Ballistae schießen panisch schnell nacheinander!", + "BasiliskMount": "Crashe in alle ... und JEDEN!", + "Battle": "Erhöhte Feind-Spawnrate", + "BeeMount": "BzzzBzzBZZZZBzzz", + "BeetleEndurance1": "Erlittener Schaden wird um 15% reduziert", + "BeetleEndurance2": "Erlittener Schaden wird um 30% reduziert", + "BeetleEndurance3": "Erlittener Schaden wird um 45% reduziert", + "BeetleMight1": "Nahkampfschaden und Geschwindigkeit erhöht um 10%", + "BeetleMight2": "Nahkampfschaden und Geschwindigkeit erhöht um 20%", + "BeetleMight3": "Nahkampfschaden und Geschwindigkeit erhöht um 30%", + "BetsysCurse": "Abwehr wurde verringert", + "Bewitched": "Erhöhte maximale Anzahl deiner Günstlinge", + "BlackCat": "Ein schwarzes Kätzchen folgt dir", + "Blackout": "Lichtsicht wird erheblich reduziert", + "Bleeding": "Leben kann nicht regeneriert werden", + "BoneJavelin": "Verbluten", + "BrokenArmor": "Abwehr ist halbiert", + "Builder": "Platzierungstempo und Reichweite erhöht", + "BunnyMount": "Du hast Schmacht nach Karotten", + "Burning": "Verlust an Leben und verlangsamte Bewegung", + "DesertMinecartRight": "{$BuffDescription.MinecartRight}", + "Campfire": "Lebensregeneration verbessert sich leicht", + "ChaosState": "Die Rute der Zwietracht kostet Leben", + "Chilled": "Deine Bewegungsgeschwindigkeit wurde verlangsamt", + "Clairvoyance": "Magiekräfte werden erhöht", + "CompanionCube": "Droht niemals, dich zu erstechen, und kann nicht mal reden", + "Confused": "Bewegt sich in die falsche Richtung", + "Crate": "Größere Chance, eine Kiste zu angeln", + "CrimsonHeart": "Eine magische Kugel, die Licht verströmt", + "Cursed": "Kann keine Items verwenden", + "CursedInferno": "Leben geht verloren", + "CursedSapling": "Ein verwünschter Schößling folgt dir", + "CuteFishronMount": "Bring ihn bloß nicht zum Krabbeln.", + "Dangersense": "Du kannst Gefahren in der Nähe erkennen", + "Darkness": "Schlechtere Sicht durch weniger Licht", + "Daybreak": "Von Sonnenstrahlen zu Asche verbrannt", + "Dazed": "Bewegung ist stark reduziert", + "DeadlySphere": "Die Tödliche Sphäre kämpft für dich", + "DrillMount": "Reiten auf einem fliegenden Bohrer", + "DryadsWard": "Die Macht der Natur beschützt dich", + "DryadsWardDebuff": "Die Macht der Natur zwingt dich", + "Electrified": "Du kannst dich nicht bewegen", + "Endurance": "Um 10% verringerter Schaden", + "EyeballSpring": "Eine Augapfelfeder folgt dir", + "FairyBlue": "Eine Fee folgt dir", + "FairyGreen": "Eine Fee folgt dir", + "FairyRed": "Eine Fee folgt dir", + "Featherfall": "Zur Kontrolle der Sinkgeschwindigkeit Hoch oder Runter drücken", + "DesertMinecartLeft": "{$BuffDescription.MinecartLeft}", + "Flipper": "Ganz normal in Wasser bewegen", + "Frostburn": "Ist entweder richtig kalt oder richtig heiß. Auf jeden Fall tut's WEH!", + "Frozen": "Du kannst dich nicht bewegen!", + "Gills": "Wasser statt Luft atmen", + "Gravitation": "Zum Umkehren der Schwerkraft HOCH drücken", + "HeartLamp": "Lebensregeneration erhöht", + "Heartreach": "Erhöhte Herzsammelreichweite", + "Honey": "Lebensregeneration verbessert sich", + "HornetMinion": "Die Hornisse kämpft für dich", + "Horrified": "Du hast etwas Schlimmes gesehen. Da gibt es keinen Weg dran vorbei.", + "Hunter": "Zeigt die Position von Feinden", + "IceBarrier": "Erlittener Schaden wird um 25% reduziert", + "Ichor": "Reduzierte Abwehr", + "ImpMinion": "Der Kobold kämpft für dich", + "Inferno": "Gegner in der Nähe fangen Feuer", + "Invisibility": "Macht unsichtbar", + "Ironskin": "Erhöht die Abwehr um 8", + "LeafCrystal": "Verschießt Kristallblätter auf Gegner in der Nähe", + "Lifeforce": "Erhöht maximale Lebensspanne um 20%", + "Lovestruck": "Du bist verliebt!", + "MagicLantern": "Eine verzauberte Laterne erleuchtet deinen Weg", + "MagicPower": "Um 20% erhöhter magischer Schaden", + "ManaRegeneration": "Erhöhte Mana-Wiederherstellung", + "ManaSickness": "Magieschaden reduziert um ", + "Merfolk": "Können unter Wasser leicht atmen und sich bewegen ", + "Midas": "Lässt beim Tod mehr Geld fallen", + "MinecartLeft": "Fahren in einer Lore", + "MinecartLeftMech": "Fahren in einer Lore", + "MinecartLeftWood": "Fahren in einer Lore", + "MinecartRight": "Fahren in einer Lore", + "MinecartRightMech": "Fahren in einer Lore", + "MinecartRightWood": "Fahren in einer Lore", + "MiniMinotaur": "Wie besiegt man einen Mini-Minotaurus?", + "Mining": "Um 25% erhöhtes Abbautempo", + "MonsterBanner": "Erhöhter Schaden und Abwehr bei den folgenden:", + "MoonLeech": "Du kannst Heileffekte nicht absorbieren", + "NebulaUpDmg1": "Um 15% erhöhter Schaden", + "NebulaUpDmg2": "Um 30% erhöhter Schaden", + "NebulaUpDmg3": "Um 45% erhöhter Schaden", + "NebulaUpLife1": "Erhöht Lebensregeneration", + "NebulaUpLife2": "Erhöht Lebensregeneration", + "NebulaUpLife3": "Erhöht Lebensregeneration", + "NebulaUpMana1": "Erhöhte Mana-Wiederherstellung", + "NebulaUpMana2": "Erhöhte Mana-Wiederherstellung", + "NebulaUpMana3": "Erhöhte Mana-Wiederherstellung", + "NightOwl": "Erhöhte Nachtsicht", + "NoBuilding": "Du hast die Macht der Schöpfung verloren!", + "ObsidianSkin": "Immun gegen Lava", + "Obstructed": "Du siehst nichts!", + "OgreSpit": "Deine Bewegung ist bedeutend reduziert", + "Oiled": "Du erleidest mehr Schaden, wenn du brennst", + "OnFire": "Langsam entweicht das Leben", + "PaladinsShield": "25% des Schadens wird an andere Spieler weitergegeben", + "Panic": "Bewegungsgeschwindigkeit erhöht sich", + "ParryDamageBuff": "Um 500% erhöhter Schaden für den nächsten Nahkampfangriff ", + "PeaceCandle": "Verringerte Monsterspawnrate", + "PetBunny": "Ich glaube, es will deine Karotte", + "PetDD2Dragon": "Ein Hoardragon folgt dir", + "PetDD2Gato": "Ein Propeller-Gato folgt dir", + "PetDD2Ghost": "Ein Flackerdocht folgt dir", + "PetLizard": "Abchillen wie ein Reptil", + "FishMinecartRight": "{$BuffDescription.MinecartRight}", + "PetSapling": "Ein kleiner Schößling folgt dir", + "PetSpider": "Eine Spinne folgt dir", + "PetTurtle": "Frohe Schildkrötenzeit!", + "PigronMount": "Jetzt siehst du mich ...", + "PirateMinion": "Der Pirat kämpft für dich", + "Poisoned": "Langsam entweicht das Leben", + "PotionSickness": "Kann keine Heil-Items mehr verbrauchen", + "Puppy": "Ein Welpe folgt dir", + "Pygmies": "Die Pygmäen kämpfen für dich", + "Rabies": "Erhöhter Schaden, verringerte Lebensregeneration verursacht Statuseffekte", + "Rage": "Kritische Trefferchance um 10% erhöht", + "RapidHealing": "Lebensregeneration verbessert sich deutlich", + "Ravens": "Die Raben greifen deine Gegner an", + "Regeneration": "Belebt wieder", + "Rudolph": "Auf dem Rücken des rotnasigen Rentiers", + "ScutlixMount": "Pamm Pamm", + "ShadowDodge": "Du weichst dem nächsten Angriff aus", + "ShadowFlame": "Leben geht verloren", + "ShadowOrb": "Eine magische Kugel, die Licht verströmt", + "SharknadoMinion": "Der Hainado kämpft für dich", + "Sharpened": "Nahkampfwaffen durchdringen Rüstung", + "Shine": "Strahlt Licht aus", + "Silenced": "Kann keine Items nutzen, die Mana erfordern", + "Slimed": "Du bist schleimig und klebrig", + "SlimeMount": "BOOOIIINNNG!", + "Slow": "Bewegungstempo ist herabgesetzt", + "SolarShield1": "Erhaltener Schaden wird um 30% reduziert, Feinde werden zurückgeworfen, wenn sie Schaden erleiden", + "SolarShield2": "Erhaltener Schaden wird um 30% reduziert, Feinde werden zurückgeworfen, wenn sie Schaden erleiden", + "SolarShield3": "Erhaltener Schaden wird um 30% reduziert, Feinde werden zurückgeworfen, wenn sie Schaden erleiden", + "Sonar": "Du kannst sehen, was angebissen hat", + "SoulDrain": "Erhöht Lebensregeneration", + "Spelunker": "Zeigt den Fundort von Schätzen und Erz", + "SpiderMinion": "Die Spinne kämpft für dich", + "Squashling": "Ein Kürbisling folgt dir", + "StardustDragonMinion": "Der Sternenstaubdrache beschützt dich", + "StardustGuardianMinion": "Der Sternenstaub-Wächter beschützt dich", + "StardustMinion": "Die Sternenstaubzelle kämpft für dich", + "StardustMinionBleed": "being eaten by cells", + "StarInBottle": "Erhöhte Mana-Wiederherstellung", + "Stinky": "Du riechst fürchterlich", + "Stoned": "Du bist völlig versteinert!", + "Suffocation": "Leben geht verloren", + "Summoning": "Erhöhte maximale Anzahl deiner Günstlinge", + "Sunflower": "Bewegungsgeschwindigkeit ist erhöht und Monsterspawns verringert", + "SuspiciousTentacle": "Ruft ein verdächtig aussehendes Auge, das dir Licht gibt", + "Swiftness": "Um 25% erhöhte Bewegungsgeschwindigkeit", + "TheTongue": "Du wirst in den Mund gesogen", + "Thorns": "Auch die Angreifer erleiden Schaden", + "TikiSpirit": "Ein freundlicher Geist folgt dir", + "Tipsy": "Erhöhte Nahkampffähigkeiten, verminderte Abwehr", + "Titan": "Verbesserter Rückstoß", + "TurtleMount": "Langsam über Land, aber husch über See", + "TwinEyesMinion": "Die Zwillinge kämpfen für dich", + "UFOMinion": "Das UFO kämpft für dich", + "UFOMount": "Ein Glück, dass du einen MAC hattest", + "UnicornMount": "Stürme voran ... mit Stil!", + "Venom": "Leben geht verloren", + "VortexDebuff": "Schwerkraft um dich herum ist verzerrt", + "Warmth": "Verringerter Schaden aus kalten Quellen", + "WaterCandle": "Erhöhte Monsterspawnrate", + "WaterWalking": "HINUNTER drücken, um aufs Wasser zu gehen", + "Weak": "Körperliche Leistungsfähigkeit ist reduziert", + "WeaponImbueConfetti": "Nahkampfangriffe lassen Konfetti regnen", + "WeaponImbueCursedFlames": "Nahkampfangriffe richten bei Gegnern Schaden mit verfluchten Flammen an", + "WeaponImbueFire": "Nahkampfangriffe setzen Gegner in Brand", + "WeaponImbueGold": "Bei Nahkampfangriffen lassen Gegner mehr Gold fallen", + "WeaponImbueIchor": "Nahkampfangriffe verringern Abwehr von Gegnern", + "WeaponImbueNanites": "Nahkampfangriffe verwirren Feinde", + "WeaponImbuePoison": "Nahkampfangriffe vergiften Feinde", + "WeaponImbueVenom": "Nahkampfangriffe fügen Zielen Giftschaden zu", + "Webbed": "Du steckst fest", + "FishMinecartLeft": "{$BuffDescription.MinecartLeft}", + "Werewolf": "Körperliche Leistungsfähigkeit ist erhöht", + "Wet": "Du verlierst Wasser", + "WindPushed": "Der Wind schiebt dich herum!", + "Wisp": "Ein Irrlicht folgt dir", + "WitheredArmor": "Deine Rüstung ist verringert!", + "WitheredWeapon": "Deine Angriffe sind schwächer!", + "Wrath": "Um 10% erhöhter Schaden", + "ZephyrFish": "Schwimmt gern um dich herum", + "BeeMinecartRight": "{$BuffDescription.MinecartRight}", + "BeeMinecartLeft": "{$BuffDescription.MinecartLeft}", + "LadybugMinecartRight": "{$BuffDescription.MinecartRight}", + "LadybugMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PigronMinecartRight": "{$BuffDescription.MinecartRight}", + "PigronMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SunflowerMinecartRight": "{$BuffDescription.MinecartRight}", + "SunflowerMinecartLeft": "{$BuffDescription.MinecartLeft}", + "HellMinecartRight": "{$BuffDescription.MinecartRight}", + "HellMinecartLeft": "{$BuffDescription.MinecartLeft}", + "ShroomMinecartRight": "{$BuffDescription.MinecartRight}", + "ShroomMinecartLeft": "{$BuffDescription.MinecartLeft}", + "AmethystMinecartRight": "{$BuffDescription.MinecartRight}", + "AmethystMinecartLeft": "{$BuffDescription.MinecartLeft}", + "TopazMinecartRight": "{$BuffDescription.MinecartRight}", + "TopazMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SapphireMinecartRight": "{$BuffDescription.MinecartRight}", + "SapphireMinecartLeft": "{$BuffDescription.MinecartLeft}", + "EmeraldMinecartRight": "{$BuffDescription.MinecartRight}", + "EmeraldMinecartLeft": "{$BuffDescription.MinecartLeft}", + "RubyMinecartRight": "{$BuffDescription.MinecartRight}", + "RubyMinecartLeft": "{$BuffDescription.MinecartLeft}", + "DiamondMinecartRight": "{$BuffDescription.MinecartRight}", + "DiamondMinecartLeft": "{$BuffDescription.MinecartLeft}", + "AmberMinecartRight": "{$BuffDescription.MinecartRight}", + "AmberMinecartLeft": "{$BuffDescription.MinecartLeft}", + "BeetleMinecartRight": "{$BuffDescription.MinecartRight}", + "BeetleMinecartLeft": "{$BuffDescription.MinecartLeft}", + "MeowmereMinecartRight": "{$BuffDescription.MinecartRight}", + "MeowmereMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PartyMinecartRight": "{$BuffDescription.MinecartRight}", + "PartyMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PirateMinecartRight": "{$BuffDescription.MinecartRight}", + "PirateMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SteampunkMinecartRight": "{$BuffDescription.MinecartRight}", + "SteampunkMinecartLeft": "{$BuffDescription.MinecartLeft}", + "CoffinMinecartRight": "{$BuffDescription.MinecartRight}", + "CoffinMinecartLeft": "{$BuffDescription.MinecartLeft}" + }, + "BuffName": { + "AmmoBox": "Munitionskiste", + "AmmoReservation": "Munitioneinsparung", + "Archery": "Bogenschießen", + "BabyDinosaur": "Babydinosaurier", + "BabyEater": "Babyfresser", + "BabyFaceMonster": "Babygesichtmonster", + "BabyGrinch": "Baby-Grinch", + "BabyHornet": "Baby-Hornisse", + "BabyPenguin": "Babypinguin", + "BabySkeletronHead": "Baby-Skeletron-Kopf", + "BabySlime": "Babyschleim", + "BabySnowman": "Babyschneemann", + "BabyTruffle": "Babytrüffel", + "BallistaPanic": "Ballistapanik!", + "BasiliskMount": "Basilisken-Reittier", + "Battle": "Kampf", + "BeeMount": "Bienen-Reittier", + "BeetleEndurance1": "Käferausdauer", + "BeetleEndurance2": "Käferausdauer", + "BeetleEndurance3": "Käferausdauer", + "BeetleMight1": "Käfermacht", + "BeetleMight2": "Käfermacht", + "BeetleMight3": "Käfermacht", + "BetsysCurse": "Betsys Fluch", + "Bewitched": "Verhext", + "BlackCat": "Schwarze Katze", + "Blackout": "Kurzschluss", + "Bleeding": "Blutet", + "BoneJavelin": "Durchdrungen", + "BrokenArmor": "Beschädigte Rüstung", + "Builder": "Erbauer", + "BunnyMount": "Häschen-Reittier", + "Burning": "Verbrennung", + "Calm": "Still", + "Campfire": "Gemütliches Feuer", + "ChaosState": "Absolutes Chaos", + "Chilled": "Erkältet", + "Clairvoyance": "Hellsehen", + "CompanionCube": "Gefährtenwürfel", + "Confused": "Verwirrt", + "Crate": "Kiste", + "CrimsonHeart": "Purpurherz", + "Cursed": "Verflucht", + "CursedInferno": "Verfluchtes Inferno", + "CursedSapling": "Verfluchter Schößling", + "CuteFishronMount": "Niedliches Fischron-Reittier", + "Dangersense": "Gefahrensinn", + "Darkness": "Dunkelheit", + "Daybreak": "Tagesanbruch", + "Dazed": "Benommen", + "DeadlySphere": "Tödliche Sphäre", + "DrillMount": "Bohrer-Reittier", + "DryadsWard": "Dyradensegen", + "DryadsWardDebuff": "Dyradenschrecken", + "Electrified": "Elektrisiert", + "Endurance": "Ausdauer", + "EyeballSpring": "Augapfelfeder", + "FairyBlue": "Fee", + "FairyGreen": "Fee", + "FairyRed": "Fee", + "Featherfall": "Federsturz", + "Fishing": "Angeln", + "Flipper": "Flosse", + "Frostburn": "Frostbrand", + "Frozen": "Eingefroren", + "Gills": "Kiemen", + "Gravitation": "Gravitation", + "HeartLamp": "Herzlampe", + "Heartreach": "Herzreich", + "Honey": "Honig", + "HornetMinion": "Hornisse", + "Horrified": "Entsetzt", + "Hunter": "Jäger", + "IceBarrier": "Eisbarriere", + "Ichor": "Ichor", + "ImpMinion": "Kobold", + "Inferno": "Inferno", + "Invisibility": "Unsichtbarkeit", + "Ironskin": "Eisenhaut", + "LeafCrystal": "Blattkristall", + "Lifeforce": "Lebenskraft", + "Lovestruck": "Verliebt", + "MagicLantern": "Magielaterne", + "MagicPower": "Magiekraft", + "ManaRegeneration": "Mana-Wiederherstellung", + "ManaSickness": "Manakrankheit", + "Merfolk": "Meermenschen", + "Midas": "Midas", + "MinecartLeft": "Lore", + "MinecartLeftMech": "Lore", + "MinecartLeftWood": "Lore", + "MinecartRight": "Lore", + "MinecartRightMech": "Lore", + "MinecartRightWood": "Lore", + "MiniMinotaur": "Mini-Minotaurus", + "Mining": "Bergbau", + "MonsterBanner": "Banner", + "MoonLeech": "Mondbiss", + "NebulaUpDmg1": "Schadensnebula", + "NebulaUpDmg2": "Schadensnebula", + "NebulaUpDmg3": "Schadensnebula", + "NebulaUpLife1": "Lebensnebula", + "NebulaUpLife2": "Lebensnebula", + "NebulaUpLife3": "Lebensnebula", + "NebulaUpMana1": "Mana-Nebula", + "NebulaUpMana2": "Mana-Nebula", + "NebulaUpMana3": "Mana-Nebula", + "NightOwl": "Nachteule", + "NoBuilding": "Kreativer Schock", + "ObsidianSkin": "Obsidianhaut", + "Obstructed": "Versperrt", + "OgreSpit": "Gesickert", + "Oiled": "Eingelölt", + "OnFire": "Flammenmeer!", + "PaladinsShield": "Paladinschild", + "Panic": "Panik!", + "ParryDamageBuff": "Treffender Moment", + "PeaceCandle": "Friedenskerze", + "PetBunny": "Zahmes Häschen", + "PetDD2Dragon": "Hoardagron", + "PetDD2Gato": "Propeller-Gato", + "PetDD2Ghost": "Flackerdocht", + "PetLizard": "Zahme Echse", + "PetParrot": "Zahmer Papagei", + "PetSapling": "Zahmer Schößling", + "PetSpider": "Zahme Spinne", + "PetTurtle": "Zahme Schildkröte", + "PigronMount": "Schwarchen-Reittier", + "PirateMinion": "Pirat", + "Poisoned": "Vergiftet", + "PotionSickness": "Krankheitstrank", + "Puppy": "Welpe", + "Pygmies": "Pygmäen", + "Rabies": "Wilder Biss", + "Rage": "Wut", + "RapidHealing": "Schnelle Heilung", + "Ravens": "Raben", + "Regeneration": "Wiederbelebung", + "Rudolph": "Rudolph", + "ScutlixMount": "Scutlix-Reittier", + "DesertMinecartRight": "{$BuffName.MinecartRight}", + "ShadowFlame": "Schattenflamme", + "ShadowOrb": "Schattenkugel", + "SharknadoMinion": "Hainado", + "Sharpened": "Geschärft", + "Shine": "Glanz", + "Silenced": "Zum Schweigen gebracht", + "Slimed": "Schleim", + "SlimeMount": "Schleim-Reittier", + "Slow": "Langsam", + "SolarShield1": "Sonnen-Aufflammen", + "SolarShield2": "Sonnen-Aufflammen", + "SolarShield3": "Sonnen-Aufflammen", + "Sonar": "Sonar", + "SoulDrain": "Lebensabfluss", + "Spelunker": "Höhlenforscher", + "SpiderMinion": "Spinne", + "Squashling": "Kürbisling", + "StardustDragonMinion": "Sternenstaub-Drache", + "StardustGuardianMinion": "Sternenstaub-Wächter", + "StardustMinion": "Sternenstaubzelle", + "StardustMinionBleed": "Gekammert", + "StarInBottle": "Stern in der Flasche", + "Stinky": "Stinkig", + "Stoned": "Bekifft", + "Suffocation": "Erstickung", + "Summoning": "Beschwören", + "Sunflower": "Fröhlich!", + "SuspiciousTentacle": "Verdächtig aussehendes Auge", + "Swiftness": "Flinkheit", + "TheTongue": "Die Zunge", + "Thorns": "Dornen", + "TikiSpirit": "Tikigeist", + "Tipsy": "Beschwipst", + "Titan": "Titan", + "TurtleMount": "Schildkröten-Reittier", + "TwinEyesMinion": "Zwillinge", + "UFOMinion": "UFO", + "UFOMount": "UFO-Reittier", + "UnicornMount": "Einhorn-Reittier", + "Venom": "Toxikum", + "VortexDebuff": "Verzerrt", + "Warmth": "Wärme", + "WaterCandle": "Wasserkerze", + "WaterWalking": "Wasserlaufen", + "Weak": "Schwach", + "WeaponImbueConfetti": "Waffentränkung: Konfetti", + "WeaponImbueCursedFlames": "Waffentränkung: Verfluchte Flammen", + "WeaponImbueFire": "Waffentränkung: Feuer", + "WeaponImbueGold": "Waffentränkung: Gold", + "WeaponImbueIchor": "Waffentränkung: Ichor", + "WeaponImbueNanites": "Waffentränkung: Naniten", + "WeaponImbuePoison": "Waffentränkung: Gift", + "WeaponImbueVenom": "Waffentränkung: Toxikum", + "Webbed": "Netzartig", + "WellFed": "Kleine Stärkung", + "Werewolf": "Werwolf", + "Wet": "Nass", + "WindPushed": "Mächtiger Wind", + "Wisp": "Irrlicht", + "WitheredArmor": "Vertrocknete Rüstung", + "WitheredWeapon": "Vertrocknete Waffe", + "Wrath": "Zorn", + "ZephyrFish": "Zephyrfisch", + "DesertMinecartLeft": "{$BuffName.MinecartLeft}", + "FishMinecartRight": "{$BuffName.MinecartRight}", + "FishMinecartLeft": "{$BuffName.MinecartLeft}", + "BeeMinecartRight": "{$BuffName.MinecartRight}", + "BeeMinecartLeft": "{$BuffName.MinecartLeft}", + "LadybugMinecartRight": "{$BuffName.MinecartRight}", + "LadybugMinecartLeft": "{$BuffName.MinecartLeft}", + "PigronMinecartRight": "{$BuffName.MinecartRight}", + "PigronMinecartLeft": "{$BuffName.MinecartLeft}", + "SunflowerMinecartRight": "{$BuffName.MinecartRight}", + "SunflowerMinecartLeft": "{$BuffName.MinecartLeft}", + "HellMinecartRight": "{$BuffName.MinecartRight}", + "HellMinecartLeft": "{$BuffName.MinecartLeft}", + "ShroomMinecartRight": "{$BuffName.MinecartRight}", + "ShroomMinecartLeft": "{$BuffName.MinecartLeft}", + "AmethystMinecartRight": "{$BuffName.MinecartRight}", + "AmethystMinecartLeft": "{$BuffName.MinecartLeft}", + "TopazMinecartRight": "{$BuffName.MinecartRight}", + "TopazMinecartLeft": "{$BuffName.MinecartLeft}", + "SapphireMinecartRight": "{$BuffName.MinecartRight}", + "SapphireMinecartLeft": "{$BuffName.MinecartLeft}", + "EmeraldMinecartRight": "{$BuffName.MinecartRight}", + "EmeraldMinecartLeft": "{$BuffName.MinecartLeft}", + "RubyMinecartRight": "{$BuffName.MinecartRight}", + "RubyMinecartLeft": "{$BuffName.MinecartLeft}", + "DiamondMinecartRight": "{$BuffName.MinecartRight}", + "DiamondMinecartLeft": "{$BuffName.MinecartLeft}", + "AmberMinecartRight": "{$BuffName.MinecartRight}", + "AmberMinecartLeft": "{$BuffName.MinecartLeft}", + "BeetleMinecartRight": "{$BuffName.MinecartRight}", + "BeetleMinecartLeft": "{$BuffName.MinecartLeft}", + "MeowmereMinecartRight": "{$BuffName.MinecartRight}", + "MeowmereMinecartLeft": "{$BuffName.MinecartLeft}", + "PartyMinecartRight": "{$BuffName.MinecartRight}", + "PartyMinecartLeft": "{$BuffName.MinecartLeft}", + "PirateMinecartRight": "{$BuffName.MinecartRight}", + "PirateMinecartLeft": "{$BuffName.MinecartLeft}", + "SteampunkMinecartRight": "{$BuffName.MinecartRight}", + "SteampunkMinecartLeft": "{$BuffName.MinecartLeft}", + "CoffinMinecartRight": "{$BuffName.MinecartRight}", + "CoffinMinecartLeft": "{$BuffName.MinecartLeft}" + }, + "MapObject": { + "Adamantite": "Adamantit", + "AnimalSkin": "Tierhaut", + "Anvil": "Amboss", + "Banner": "Banner", + "BeeHive": "Bienenstock", + "Chair": "Stuhl", + "Chandelier": "Kronleuchter", + "Chlorophyte": "Grünalge", + "ChristmasLight": "Weihnachtslicht", + "Cobalt": "Kobalt", + "Copper": "Kupfer", + "CrimsonAltar": "Purpur-Altar", + "Crimtane": "Purpurtan", + "DemonAltar": "Dämonenaltar", + "Demonite": "Dämonit", + "Door": "Tür", + "DrippingHoney": "Tropfender Honig", + "DrippingLava": "Tropfende Lava", + "DrippingWater": "Tropfendes Wasser", + "FloorLamp": "Bodenlampe", + "Fossil": "Fossil", + "GiantMushroom": "Riesenpilz", + "Gold": "Gold", + "Iron": "Eisen", + "ItemRack": "Item-Regal", + "Lantern": "Laterne", + "Larva": "Larve", + "Lead": "Blei", + "LivingWood": "Lebendes Holz", + "MetalBar": "Metallstange", + "Mythril": "Mithril", + "OrangeSquirrelCage": "Orangeeichhörnchenkäfig", + "Orichalcum": "Oreichalkos", + "Painting": "Malerei", + "Palladium": "Palladium", + "PalmTree": "Palme", + "Picture": "Bild", + "PineTree": "Kiefer", + "PlanterasBulb": "Planteras Birne", + "Platinum": "Platin", + "Pot": "Gras", + "Rocket": "Rakete", + "SandFlow": "Sandfluss", + "Sapling": "Schößling", + "SiltExtractinator": "Schlick-Extraktinator", + "Silver": "Silber", + "Sink": "Waschbecken", + "Statue": "Statue", + "Table": "Tisch", + "Thorn": "Dorn", + "Thorns": "Dornen", + "Timer": "Timer", + "Tin": "Zinn", + "Titanium": "Titan", + "Trap": "Falle", + "Tree": "Baum", + "Trophy": "Trophäe", + "Tungsten": "Wolfram", + "Turret": "Türmchen", + "Vase": "Vase", + "WaterFountain": "Wasserbrunnen", + "Web": "Netz" + }, + "ChatCommand": { + "Playing_0": "{$LegacyMultiplayer.6}", + "Playing_1": "{$LegacyMultiplayer.21}", + "Roll": "{$LegacyMultiplayer.8}", + "Party": "/g", + "Emote": "/ich" + }, + "Bestiary_ItemDropConditions": { + "NotExpert": "", + "NotMasterMode": "", + "LegacyHack_IsBossAndNotExpert": "", + "IsCrimsonAndNotExpert": "", + "IsCorruptionAndNotExpert": "", + "NotFromStatue": "" + }, + "Bestiary_FlavorText": { + "npc_JungleSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_YellowSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_RedSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_PurpleSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_BlackSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_GreenSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_BlueSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_DemonEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_Zombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_Skeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_AngryBones": "{$CommonBestiaryFlavor.AngryBones}", + "npc_Hornet": "{$CommonBestiaryFlavor.Hornet}", + "npc_Hellbat": "{$CommonBestiaryFlavor.LavaBat}", + "npc_BlueJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_PinkJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_Mummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_DarkMummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_LightMummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_Mimic": "{$CommonBestiaryFlavor.Mimic}", + "npc_GreenJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_BaldZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_WanderingEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_Penguin": "{$CommonBestiaryFlavor.Penguin}", + "npc_PenguinBlack": "{$CommonBestiaryFlavor.Penguin}", + "npc_Lavabat": "{$CommonBestiaryFlavor.LavaBat}", + "npc_PigronCorruption": "{$CommonBestiaryFlavor.Pigron}", + "npc_PigronHallow": "{$CommonBestiaryFlavor.Pigron}", + "npc_PigronCrimson": "{$CommonBestiaryFlavor.Pigron}", + "npc_PincushionZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_SwampZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_TwiggyZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_CataractEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_SleepyEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_DialatedEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_GreenEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_PurpleEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_FemaleZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_HeadacheSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_MisassembledSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_PantlessSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_HornetFatty": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetHoney": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetLeafy": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetSpikey": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetStingy": "{$CommonBestiaryFlavor.Hornet}", + "npc_ZombieMushroom": "{$CommonBestiaryFlavor.MushroomZombie}", + "npc_ZombieMushroomHat": "{$CommonBestiaryFlavor.MushroomZombie}", + "npc_FungiBulb": "{$CommonBestiaryFlavor.FungiBulb}", + "npc_GiantFungiBulb": "{$CommonBestiaryFlavor.FungiBulb}", + "npc_RustyArmoredBonesAxe": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesFlail": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesSword": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesSwordNoArmor": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_BlueArmoredBones": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesMace": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesNoPants": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesSword": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_HellArmoredBones": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesSpikeShield": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesMace": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesSword": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_RaggedCaster": "{$CommonBestiaryFlavor.RaggedCaster}", + "npc_RaggedCasterOpenCoat": "{$CommonBestiaryFlavor.RaggedCaster}", + "npc_Necromancer": "{$CommonBestiaryFlavor.Necromancer}", + "npc_NecromancerArmored": "{$CommonBestiaryFlavor.Necromancer}", + "npc_DiabolistRed": "{$CommonBestiaryFlavor.Diabolist}", + "npc_DiabolistWhite": "{$CommonBestiaryFlavor.Diabolist}", + "npc_AngryBonesBig": "{$CommonBestiaryFlavor.AngryBones}", + "npc_AngryBonesBigMuscle": "{$CommonBestiaryFlavor.AngryBones}", + "npc_AngryBonesBigHelmet": "{$CommonBestiaryFlavor.AngryBones}", + "npc_Scarecrow1": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow2": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow3": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow4": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow5": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow6": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow7": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow8": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow9": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow10": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_DemonEyeOwl": "{$CommonBestiaryFlavor.CostumeDemonEye}", + "npc_DemonEyeSpaceship": "{$CommonBestiaryFlavor.CostumeDemonEye}", + "npc_ZombieDoctor": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_ZombieSuperman": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_ZombiePixie": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_SkeletonTopHat": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_SkeletonAstonaut": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_SkeletonAlien": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_ZombieXmas": "{$CommonBestiaryFlavor.ZombieXmas}", + "npc_ZombieSweater": "{$CommonBestiaryFlavor.ZombieXmas}", + "npc_SlimeRibbonWhite": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonYellow": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonGreen": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonRed": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_ZombieElf": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ZombieElfBeard": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ZombieElfGirl": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ArmedZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombiePincushion": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieSwamp": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieTwiggy": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieCenx": "{$CommonBestiaryFlavor.Zombie}", + "npc_GoldBird": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldBunny": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldButterfly": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldFrog": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldGrasshopper": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldMouse": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldWorm": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_BoneThrowingSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton2": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton3": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton4": "{$CommonBestiaryFlavor.Skeleton}", + "npc_GiantWalkingAntlion": "{$CommonBestiaryFlavor.AntlionCharger}", + "npc_GiantFlyingAntlion": "{$CommonBestiaryFlavor.AntlionSwarmer}", + "npc_DesertLamiaLight": "{$CommonBestiaryFlavor.Lamia}", + "npc_DesertLamiaDark": "{$CommonBestiaryFlavor.Lamia}", + "npc_SquirrelGold": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_SandShark": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkCorrupt": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkCrimson": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkHallow": "{$CommonBestiaryFlavor.Sandshark}", + "npc_WalkingAntlion": "{$CommonBestiaryFlavor.AntlionCharger}", + "npc_FlyingAntlion": "{$CommonBestiaryFlavor.AntlionSwarmer}", + "npc_GoldGoldfish": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldGoldfishWalker": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_BlackDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_BlueDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_GreenDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_OrangeDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_RedDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_YellowDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_GoldDragonfly": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldLadyBug": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldWaterStrider": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldSeahorse": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_IceMimic": "{$CommonBestiaryFlavor.Mimic}", + "npc_GemSquirrelAmethyst": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelTopaz": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelSapphire": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelEmerald": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelRuby": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelDiamond": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelAmber": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemBunnyAmethyst": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyTopaz": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnySapphire": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyEmerald": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyRuby": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyDiamond": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyAmber": "{$CommonBestiaryFlavor.GemBunny}" + } +} \ No newline at end of file diff --git a/Localization/Content/de-DE/Items.json b/Localization/Content/de-DE/Items.json new file mode 100644 index 0000000..3b740d3 --- /dev/null +++ b/Localization/Content/de-DE/Items.json @@ -0,0 +1,5511 @@ +{ + "PaintingArtist": { + "Crowno": "'V. Costa Moura'", + "Garner": "'W. Garner'", + "Moosdijk": "'R. Moosdijk'", + "Lazure": "'J. Hayes'", + "Myhre": "'J. T. Myhre'", + "Burczyk": "'C. Burczyk'", + "Craig": "'A. Craig'", + "Kolf": "'A. G. Kolf'", + "Wright": "'K. Wright'", + "Phelps": "'D. Phelps'", + "Duncan": "'M. J. Duncan'", + "Ness": "'C. J. Ness'" + }, + "Prefix": { + "Dull": "(Stumpf)", + "Unhappy": "(Unglücklich)", + "Bulky": "(Sperrig)", + "Shameful": "(Beschämend)", + "Heavy": "(Schwer)", + "Light": "(Leicht)", + "Sighted": "(Gesichtet)", + "Rapid": "(Schnell)", + "Hasty": "(Hastig)", + "Intimidating": "(Einschüchternd)", + "Large": "(Groß)", + "Deadly": "(Tödlich)", + "Staunch": "(Unerschütterlich)", + "Awful": "(Schrecklich)", + "Lethargic": "(Lethargisch)", + "Awkward": "(Unbeholfen)", + "Powerful": "(Mächtig)", + "Mystic": "(Mystisch)", + "Adept": "(Geschickt)", + "Masterful": "(Meisterhaft)", + "Inept": "(Ungeschickt)", + "Massive": "(Riesig)", + "Ignorant": "(Unwissend)", + "Deranged": "(Gestört)", + "Intense": "(Intensiv)", + "Taboo": "(Tabu)", + "Celestial": "(Himmlisch)", + "Furious": "(Wütend)", + "Keen": "(Scharf)", + "Superior": "(Überlegen)", + "Forceful": "(Kraftvoll)", + "Broken": "(Gebrochen)", + "Dangerous": "(Gefährlich)", + "Damaged": "(Beschädigt)", + "Shoddy": "(Schäbig)", + "Quick": "(Rasch)", + "Deadly2": "(Tödlich)", + "Agile": "(Agil)", + "Nimble": "(Wendig)", + "Murderous": "(Mörderisch)", + "Slow": "(Langsam)", + "Sluggish": "(Träge)", + "Lazy": "(Faul)", + "Savage": "(Barbarisch)", + "Annoying": "(Lästig)", + "Nasty": "(Böse)", + "Manic": "(Manisch)", + "Hurtful": "(Verletzend)", + "Strong": "(Stark)", + "Unpleasant": "(Unangenehm)", + "Weak": "(Schwach)", + "Ruthless": "(Rücksichtslos)", + "Frenzying": "(Rasend)", + "Godly": "(Fromm)", + "Sharp": "(Scharf)", + "Demonic": "(Dämonisch)", + "Zealous": "(Eifrig)", + "Hard": "(Schwer)", + "Guarding": "(Schützend)", + "Armored": "(Gepanzert)", + "Warding": "(Abwehrend)", + "Arcane": "(Geheimnisvoll)", + "Precise": "(Präzise)", + "Lucky": "(Glücklich)", + "Jagged": "(Gezackt)", + "Pointy": "(Spitz)", + "Spiked": "(Stachelig)", + "Angry": "(Wütend)", + "Menacing": "(Bedrohlich)", + "Brisk": "(Rege)", + "Fleeting": "(Flüchtig)", + "Hasty2": "(Hastig)", + "Quick2": "(Rasch)", + "Wild": "(Wild)", + "Rash": "(Voreilig)", + "Intrepid": "(Unerschrocken)", + "Tiny": "(Winzig)", + "Violent": "(Gewalttätig)", + "Legendary": "(Legendär)", + "Unreal": "(Unwirklich)", + "Mythical": "(Mythisch)", + "Terrible": "(Schrecklich)", + "Small": "(Klein)" + }, + "ItemName": { + "IronPickaxe": "Eisenspitzhacke", + "IronAxe": "Eisenaxt", + "ShadowGreaves": "Schattenbeinschützer", + "ConfettiGun": "Konfettipistole", + "ChlorophyteMask": "Grünalgenmaske", + "ChlorophyteHelmet": "Grünalgenhelm", + "ChlorophyteHeadgear": "Grünalgenkopfschutz", + "ChlorophytePlateMail": "Grünalgenplattenpanzer", + "ChlorophyteGreaves": "Grünalgengamaschen", + "ChlorophyteBar": "Grünalgenbarren", + "RedDye": "Roter Farbstoff", + "OrangeDye": "Orangener Farbstoff", + "YellowDye": "Gelber Farbstoff", + "ShadowScalemail": "Schattenschuppenhemd", + "LimeDye": "Limonenfarbiger Farbstoff", + "GreenDye": "Grüner Farbstoff", + "TealDye": "Blaugrüner Farbstoff", + "CyanDye": "Zyan Farbstoff", + "SkyBlueDye": "Himmelblauer Farbstoff", + "BlueDye": "Blauer Farbstoff", + "PurpleDye": "Lila Farbstoff", + "VioletDye": "Violetter Farbstoff", + "PinkDye": "Rosa Farbstoff", + "RedandBlackDye": "Roter und Schwarzer Farbstoff", + "ShadowHelmet": "Schattenhelm", + "OrangeandBlackDye": "Orangener und Schwarzer Farbstoff", + "YellowandBlackDye": "Gelber und Schwarzer Farbstoff", + "LimeandBlackDye": "Limonenfarbiger und Schwarzer Farbstoff", + "GreenandBlackDye": "Grüner und Schwarzer Farbstoff", + "TealandBlackDye": "Blaugrüner und Schwarzer Farbstoff", + "CyanandBlackDye": "Zyan und Schwarzer Farbstoff", + "SkyBlueandBlackDye": "Himmelblauer und Schwarzer Farbstoff", + "BlueandBlackDye": "Blauer und Schwarzer Farbstoff", + "PurpleandBlackDye": "Lila und Schwarzer Farbstoff", + "VioletandBlackDye": "Violetter und Schwarzer Farbstoff", + "NightmarePickaxe": "Albtraum-Spitzhacke", + "PinkandBlackDye": "Rosa und Schwarzer Farbstoff", + "FlameDye": "Flammen-Farbstoff", + "FlameAndBlackDye": "Flammen- und Schwarzer Farbstoff", + "GreenFlameDye": "Grüner Flammen-Farbstoff", + "GreenFlameAndBlackDye": "Grüner Flammen- und Schwarzer Farbstoff", + "BlueFlameDye": "Blauer Flammen-Farbstoff", + "BlueFlameAndBlackDye": "Blauer Flammen- und Schwarzer Farbstoff", + "SilverDye": "Silberner Farbstoff", + "BrightRedDye": "Hellroter Farbstoff", + "BrightOrangeDye": "Helloranger Farbstoff", + "TheBreaker": "Zerschmetterer", + "BrightYellowDye": "Hellgelber Farbstoff", + "BrightLimeDye": "Heller Limonenfarbiger Farbstoff", + "BrightGreenDye": "Hellgrüner Farbstoff", + "BrightTealDye": "Hellblaugrüner Farbstoff", + "BrightCyanDye": "Heller Zyan Farbstoff", + "BrightSkyBlueDye": "Heller Himmelblauer Farbstoff", + "BrightBlueDye": "Hellblauer Farbstoff", + "BrightPurpleDye": "Helllila Farbstoff", + "BrightVioletDye": "Hellvioletter Farbstoff", + "BrightPinkDye": "Hellrosa Farbstoff", + "Candle": "Kerze", + "BlackDye": "Schwarzer Farbstoff", + "RedandSilverDye": "Roter und Silberner Farbstoff", + "OrangeandSilverDye": "Orangener und Silberner Farbstoff", + "YellowandSilverDye": "Gelber und Silberner Farbstoff", + "LimeandSilverDye": "Limonenfarbiger und Silberner Farbstoff", + "GreenandSilverDye": "Grüner und Silberner Farbstoff", + "TealandSilverDye": "Blaugrüner und Silberner Farbstoff", + "CyanandSilverDye": "Zyan und Silberner Farbstoff", + "SkyBlueandSilverDye": "Himmelblauer und Silberner Farbstoff", + "BlueandSilverDye": "Blauer und Silberner Farbstoff", + "CopperChandelier": "Kupferkronleuchter", + "PurpleandSilverDye": "Lila und Silber Farbstoff", + "VioletandSilverDye": "Violetter und Silberner Farbstoff", + "PinkandSilverDye": "Rosa und Silberner Farbstoff", + "IntenseFlameDye": "Intensiver Flammen-Farbstoff", + "IntenseGreenFlameDye": "Intensiver Grüner Flammen-Farbstoff", + "IntenseBlueFlameDye": "Intensiver Blauer Flammen-Farbstoff", + "RainbowDye": "Regenbogen-Farbstoff", + "IntenseRainbowDye": "Intensiver Regenbogen-Farbstoff", + "YellowGradientDye": "Gelber Gradient-Farbstoff", + "CyanGradientDye": "Zyan Gradient-Farbstoff", + "SilverChandelier": "Silberkronleuchter", + "VioletGradientDye": "Violetter Gradient-Farbstoff", + "Paintbrush": "Farbinsel", + "PaintRoller": "Farbroller", + "RedPaint": "Rote Farbe", + "OrangePaint": "Orange Farbe", + "YellowPaint": "Gelbe Farbe", + "LimePaint": "Limonenfarbige Farbe", + "GreenPaint": "Grüne Farbe", + "TealPaint": "Blaugrüne Farbe", + "CyanPaint": "Zyan Farbe", + "GoldChandelier": "Goldkronleuchter", + "SkyBluePaint": "Himmelblaue Farbe", + "BluePaint": "Blaue Farbe", + "PurplePaint": "Lila Farbe", + "VioletPaint": "Violette Farbe", + "PinkPaint": "Rosa Farbe", + "DeepRedPaint": "Dunkelrote Farbe", + "DeepOrangePaint": "Dunkelorange Farbe", + "DeepYellowPaint": "Dunkelgelbe Farbe", + "DeepLimePaint": "Dunkle Limonenfarbige Farbe", + "DeepGreenPaint": "Dunkelgrüne Farbe", + "ManaCrystal": "Mana-Kristall", + "DeepTealPaint": "Dunkelblaugrüne Farbe", + "DeepCyanPaint": "Dunkle Zyan Farbe", + "DeepSkyBluePaint": "Dunkle Himmelblaue Farbe", + "DeepBluePaint": "Dunkelblaue Farbe", + "DeepPurplePaint": "Dunkellila Farbe", + "DeepVioletPaint": "Dunkelviolett Farbe", + "DeepPinkPaint": "Dunkelrosa Farbe", + "BlackPaint": "Schwarze Farbe", + "WhitePaint": "Weiße Farbe", + "GrayPaint": "Graue Farbe", + "IronOre": "Eisenerz", + "LesserManaPotion": "Schwacher Manatrank", + "PaintScraper": "Spachtel", + "LihzahrdBrick": "Lihzahrdziegel", + "LihzahrdBrickWall": "Lihzahrd-Ziegelwand", + "SlushBlock": "Schlackeblock", + "PalladiumOre": "Palladiumerz", + "OrichalcumOre": "Oreichalkoserz", + "TitaniumOre": "Titanerz", + "TealMushroom": "Blaugrüner Pilz", + "GreenMushroom": "Grüner Pilz", + "SkyBlueFlower": "Himmelblaue Blume", + "BandofStarpower": "Sternenkraftband", + "YellowMarigold": "Gelbe Ringelblume", + "BlueBerries": "Blaubeeren", + "LimeKelp": "Limonenfarbiger Seetang", + "PinkPricklyPear": "Rosa Kaktusfeige", + "OrangeBloodroot": "Orangenes Blutkraut", + "RedHusk": "Rote Hülse", + "CyanHusk": "Zyan Hülse", + "VioletHusk": "Violette Hülse", + "BlackInk": "Schwarze Tinte", + "FlowerofFire": "Feuerblume", + "DyeVat": "Färbebottich", + "BeeGun": "Bienenpistole", + "PossessedHatchet": "Besessenes Beil", + "BeeKeeper": "Imker", + "Hive": "Bienenstock", + "HoneyBlock": "Honigblock", + "HiveWall": "Bienenstockwand", + "CrispyHoneyBlock": "Knuspriger Honigblock", + "HoneyBucket": "Honigeimer", + "HiveWand": "Bienenstockwand", + "MagicMissile": "Magische Rakete", + "Beenade": "Bienate", + "GravityGlobe": "Schwerkraftglobus", + "HoneyComb": "Bienenwabe", + "Abeemination": "Abiescheulichkeit", + "BottledHoney": "Abgefüllter Honig", + "RainHat": "Regenhut", + "RainCoat": "Regenmantel", + "LihzahrdDoor": "Lihzahrdtür", + "DungeonDoor": "Verliestür", + "LeadDoor": "Bleitür", + "DirtRod": "Dreckrute", + "IronDoor": "Eisentür", + "TempleKey": "Tempelschlüssel", + "LihzahrdChest": "Lihzahrdtruhe", + "LihzahrdChair": "Lihzahrdstuhl", + "LihzahrdTable": "Lihzahrdtisch", + "LihzahrdWorkBench": "Lihzahrdwerkbank", + "SuperDartTrap": "Super-Pfeilfalle", + "FlameTrap": "Flammenfalle", + "SpikyBallTrap": "Stachelkugelfalle", + "SpearTrap": "Speerfalle", + "ShadowOrb": "Schattenkugel", + "WoodenSpike": "Holzstachel", + "LihzahrdPressurePlate": "Lihzahrd-Druckplatte", + "LihzahrdStatue": "Lihzahrdstatue", + "LihzahrdWatcherStatue": "Lihzahrd-Beobachterstatue", + "LihzahrdGuardianStatue": "Lihzahrd-Wächter-Statue", + "WaspGun": "Wespenpistole", + "PiranhaGun": "Piranhapistole", + "PygmyStaff": "Pygmäenstab", + "PygmyNecklace": "Pygmäenhalsband", + "TikiMask": "Tikimaske", + "Meteorite": "Meteorit", + "TikiShirt": "Tikihemd", + "TikiPants": "Tikihose", + "LeafWings": "Blattflügel", + "BlizzardinaBalloon": "Schneesturm im Ballon", + "BundleofBalloons": "Ballonbündel", + "BatWings": "Fledermausflügel", + "BoneSword": "Knochenschwert", + "HerculesBeetle": "Herkuleskäfer", + "SmokeBomb": "Rauchbombe", + "BoneKey": "Knochenschlüssel", + "MeteoriteBar": "Meteoritenbarren", + "Nectar": "Nektar", + "TikiTotem": "Tikitotem", + "LizardEgg": "Echsenei", + "GraveMarker": "Grabmal", + "CrossGraveMarker": "Grabkreuz", + "Headstone": "Leichenstein", + "Gravestone": "Grabstein", + "Obelisk": "Obelisk", + "LeafBlower": "Laubsauger", + "ChlorophyteBullet": "Grünalgenkugel", + "Hook": "Haken", + "ParrotCracker": "Papageienkräcker", + "StrangeGlowingMushroom": "Seltsam leuchtender Pilz", + "Seedling": "Setzling", + "WispinaBottle": "Irrlicht aus der Flasche", + "PalladiumBar": "Palladiumbarren", + "PalladiumSword": "Palladiumschwert", + "PalladiumPike": "Palladiumspieß", + "PalladiumRepeater": "Palladiumrepetierer", + "PalladiumPickaxe": "Palladiumspitzhacke", + "PalladiumDrill": "Palladiumbohrer", + "Flamarang": "Flammarang", + "PalladiumChainsaw": "Palladiumkettensäge", + "OrichalcumBar": "Oreichalkosbarren", + "OrichalcumSword": "Oreichalkosschwert", + "OrichalcumHalberd": "Oreichalkoshellebarde", + "OrichalcumRepeater": "Oreichalkosrepetierer", + "OrichalcumPickaxe": "Oreichalkosspitzhacke", + "OrichalcumDrill": "Oreichalkosbohrer", + "OrichalcumChainsaw": "Oreichalkoskettensäge", + "TitaniumBar": "Titanbarren", + "TitaniumSword": "Titanschwert", + "CopperOre": "Kupfererz", + "MoltenFury": "Geschmolzene Wut", + "TitaniumTrident": "Titandreizack", + "TitaniumRepeater": "Titanrepetierer", + "TitaniumPickaxe": "Titanspitzhacke", + "TitaniumDrill": "Titanbohrer", + "TitaniumChainsaw": "Titankettensäge", + "PalladiumMask": "Palladiummaske", + "PalladiumHelmet": "Palladiumhelm", + "PalladiumHeadgear": "Palladiumkopfschutz", + "PalladiumBreastplate": "Palladiumbrustplatte", + "PalladiumLeggings": "Palladiumgamaschen", + "FieryGreatsword": "Feuriges Großschwert", + "OrichalcumMask": "Oreichalkosmaske", + "OrichalcumHelmet": "Oreichalkoshelm", + "OrichalcumHeadgear": "Oreichalkoskopfschutz", + "OrichalcumBreastplate": "Oreichalkosbrustplatte", + "OrichalcumLeggings": "Oreichalkosgamaschen", + "TitaniumMask": "Titanmaske", + "TitaniumHelmet": "Titanhelm", + "TitaniumHeadgear": "Titankopfschutz", + "TitaniumBreastplate": "Titanbrustplatte", + "TitaniumLeggings": "Titangamaschen", + "MoltenPickaxe": "Geschmolzene Spitzhacke", + "OrichalcumAnvil": "Oreichalkosamboss", + "TitaniumForge": "Titanschmiede", + "PalladiumWaraxe": "Palladiumkriegsaxt", + "OrichalcumWaraxe": "Oreichalkoskriegsaxt", + "TitaniumWaraxe": "Titankriegsaxt", + "HallowedBar": "Geheiligter Barren", + "ChlorophyteClaymore": "Grünalgenclaymore", + "ChlorophyteSaber": "Grünalgensäbel", + "ChlorophytePartisan": "Grünalgenpartisane", + "ChlorophyteShotbow": "Grünalgenschussbogen", + "MeteorHelmet": "Meteorhelm", + "ChlorophytePickaxe": "Grünalgenspitzhacke", + "ChlorophyteDrill": "Grünalgenbohrer", + "ChlorophyteChainsaw": "Grünalgenkettensäge", + "ChlorophyteGreataxe": "Grünalgengroßaxt", + "ChlorophyteWarhammer": "Grünalgenkriegshammer", + "ChlorophyteArrow": "Grünalgenpfeil", + "AmethystHook": "Amethysthaken", + "TopazHook": "Topashaken", + "SapphireHook": "Saphirhaken", + "EmeraldHook": "Smaragdhaken", + "MeteorSuit": "Meteoranzug", + "RubyHook": "Rubinhaken", + "DiamondHook": "Diamanthaken", + "AmberMosquito": "Bernsteinmoskito", + "UmbrellaHat": "Regenschirmhut", + "NimbusRod": "Nimbusrute", + "OrangeTorch": "Orange Fackel", + "CrimsandBlock": "Purpursandblock", + "BeeCloak": "Bienenumhang", + "EyeoftheGolem": "Golemauge", + "HoneyBalloon": "Honigballon", + "MeteorLeggings": "Meteorgamaschen", + "BlueHorseshoeBalloon": "Blauer Hufeisenballon", + "WhiteHorseshoeBalloon": "Weißer Hufeisenballon", + "YellowHorseshoeBalloon": "Gelber Hufeisenballon", + "FrozenTurtleShell": "Gefrorener Schildkrötenpanzer", + "SniperRifle": "Snipergewehr", + "VenusMagnum": "Venus-Magnum", + "CrimsonRod": "Purpurne Rute", + "CrimtaneBar": "Purpurtanbarren", + "Stynger": "Stachler", + "FlowerPow": "Blumenpeng", + "BottledWater": "Flaschenwasser", + "RainbowGun": "Regenbogengewehr", + "StyngerBolt": "Stachlerbolzen", + "ChlorophyteJackhammer": "Grünalgendrucklufthammer", + "Teleporter": "Teleporter", + "FlowerofFrost": "Frostblume", + "Uzi": "Uzi", + "MagnetSphere": "Magnetsphäre", + "PurpleStainedGlass": "Lila Buntglas", + "YellowStainedGlass": "Gelbes Buntglas", + "BlueStainedGlass": "Blaues Buntglas", + "SpaceGun": "Weltraumpistole", + "GreenStainedGlass": "Grünes Buntglas", + "RedStainedGlass": "Rotes Buntglas", + "MulticoloredStainedGlass": "Mehrfarbiges Buntglas", + "SkeletronHand": "Skeletronhand", + "Skull": "Schädel", + "BallaHat": "Balla-Hut", + "GangstaHat": "Gangsta-Hut", + "SailorHat": "Matrosenmütze", + "EyePatch": "Augenklappe", + "SailorShirt": "Matrosenhemd", + "RocketBoots": "Raketenstiefel", + "SailorPants": "Matrosenhose", + "SkeletronMask": "Skeletronmaske", + "AmethystRobe": "Amethystrobe", + "TopazRobe": "Topasrobe", + "SapphireRobe": "Saphirrobe", + "EmeraldRobe": "Smaragdrobe", + "RubyRobe": "Rubinrobe", + "DiamondRobe": "Diamantrobe", + "WhiteTuxedoShirt": "Weißes Smokinghemd", + "WhiteTuxedoPants": "Weiße Smokinghose", + "GrayBrick": "Grauer Ziegel", + "PanicNecklace": "Panikhalskette", + "LifeFruit": "Lebensfrucht", + "LihzahrdAltar": "Lihzahrdaltar", + "LihzahrdPowerCell": "Lihzahrd-Energiezelle", + "Picksaw": "Spitzsäge", + "HeatRay": "Hitzestrahl", + "StaffofEarth": "Stab der Erde", + "GolemFist": "Golemfaust", + "WaterChest": "Wassertruhe", + "Binoculars": "Fernglas", + "GoldOre": "Golderz", + "GrayBrickWall": "Graue Ziegelwand", + "RifleScope": "Zielfernrohr", + "DestroyerEmblem": "Zerstöreremblem", + "HighVelocityBullet": "Hochgeschwindigkeitskugel", + "JellyfishNecklace": "Quallenhalskette", + "ZombieArm": "Zombiearm", + "TheAxe": "Die Axt", + "IceSickle": "Eissichel", + "ClothierVoodooDoll": "Schneider-Voodoopuppe", + "PoisonStaff": "Giftstab", + "SlimeStaff": "Schleimstab", + "RedBrick": "Roter Ziegel", + "PoisonDart": "Giftpfeil", + "EyeSpring": "Augenfeder", + "ToySled": "Spielzeugschlitten", + "BookofSkulls": "Buch der Schädel", + "KOCannon": "K.O.-Kanone", + "PirateMap": "Piratenkarte", + "TurtleHelmet": "Schildkrötenhelm", + "TurtleScaleMail": "Schildkrötenschuppenpanzer", + "TurtleLeggings": "Schildkrötengamaschen", + "SnowballCannon": "Schneeballkanone", + "RedBrickWall": "Rote Ziegelwand", + "BonePickaxe": "Knochenspitzhacke", + "MagicQuiver": "Zauberköcher", + "MagmaStone": "Magmastein", + "ObsidianRose": "Obsidianrose", + "Bananarang": "Bananarang", + "ChainKnife": "Kettenmesser", + "RodofDiscord": "Rute der Zwietracht", + "DeathSickle": "Todessichel", + "TurtleShell": "Schildkrötenpanzer", + "TissueSample": "Gewebeprobe", + "ClayBlock": "Lehmblock", + "Vertebrae": "Wirbel", + "BloodySpine": "Blutige Wirbelsäule", + "Ichor": "Ichor", + "IchorTorch": "Ichorfackel", + "IchorArrow": "Ichorpfeil", + "IchorBullet": "Ichorkugel", + "GoldenShower": "Goldener Schauer", + "BunnyCannon": "Häschenkanone", + "ExplosiveBunny": "Explosives Häschen", + "VialofVenom": "Phiole mit Toxikum", + "BlueBrick": "Blauer Ziegel", + "FlaskofVenom": "Fläschchen mit Toxikum", + "VenomArrow": "Toxikumpfeil", + "VenomBullet": "Toxikumkugel", + "FireGauntlet": "Feuerfehdehandschuh", + "Cog": "Zahnrad", + "Confetti": "Konfetti", + "Nanites": "Naniten", + "ExplosivePowder": "Sprengpulver", + "GoldDust": "Goldstaub", + "PartyBullet": "Partykugel", + "BlueBrickWall": "Blaue Ziegelwand", + "NanoBullet": "Nanokugel", + "ExplodingBullet": "Explodierende Kugel", + "GoldenBullet": "Goldene Kugel", + "FlaskofCursedFlames": "Fläschchen mit Verfluchten Flammen", + "FlaskofFire": "Fläschchen mit Feuer", + "FlaskofGold": "Fläschchen mit Gold", + "FlaskofIchor": "Fläschchen mit Ichor", + "FlaskofNanites": "Fläschchen mit Naniten", + "FlaskofParty": "Fläschchen mit Party", + "FlaskofPoison": "Fläschchen mit Gift", + "ChainLantern": "Kettenlaterne", + "EyeofCthulhuTrophy": "Auge-von-Cthulhu-Trophäe", + "EaterofWorldsTrophy": "Weltenfressertrophäe", + "BrainofCthulhuTrophy": "Gehirn-von-Cthulhu-Trophäe", + "SkeletronTrophy": "Skeletrontrophäe", + "QueenBeeTrophy": "Bienenkönigintrophäe", + "WallofFleshTrophy": "Wand-aus-Fleisch-Trophäe", + "DestroyerTrophy": "Zerstörertrophäe", + "SkeletronPrimeTrophy": "Skeletron-Prime-Trophäe", + "RetinazerTrophy": "Retinazertrophäe", + "SpazmatismTrophy": "Spazmatismtrophäe", + "GreenBrick": "Grüner Ziegel", + "PlanteraTrophy": "Planteratrophäe", + "GolemTrophy": "Golemtrophäe", + "BloodMoonRising": "Aufgehender Blutmond", + "TheHangedMan": "Der gehängte Mann", + "GloryoftheFire": "Ruhm des Feuers", + "BoneWarp": "Knochenbruch", + "WallSkeleton": "Wandskelett", + "HangingSkeleton": "Hängendes Skelett", + "BlueSlabWall": "Blau getäfelte Wand", + "BlueTiledWall": "Blau gekachelte Wand", + "GreenBrickWall": "Grüne Ziegelwand", + "PinkSlabWall": "Rosa getäfelte Wand", + "PinkTiledWall": "Rosa gekachelte Wand", + "GreenSlabWall": "Grün getäfelte Wand", + "GreenTiledWall": "Grün gekachelte Wand", + "BlueBrickPlatform": "Blaue Ziegelklappe", + "PinkBrickPlatform": "Rosa Ziegelklappe", + "GreenBrickPlatform": "Grüne Ziegelklappe", + "MetalShelf": "Metallregal", + "BrassShelf": "Messingregal", + "WoodShelf": "Holzregal", + "PinkBrick": "Rosa Ziegel", + "BrassLantern": "Messinglaterne", + "CagedLantern": "Eingefasste Laterne", + "CarriageLantern": "Kutschlaterne", + "AlchemyLantern": "Alchemielaterne", + "DiablostLamp": "Diablostlampe", + "BlueDungeonChair": "Blauer Verliesstuhl", + "BlueDungeonTable": "Blauer Verliestisch", + "BlueDungeonWorkBench": "Blaue Verlieswerkbank", + "GreenDungeonChair": "Grüner Verliesstuhl", + "SilverOre": "Silbererz", + "PinkBrickWall": "Rosa Ziegelwand", + "GreenDungeonTable": "Grüner Verliestisch", + "GreenDungeonWorkBench": "Grüne Verlieswerkbank", + "PinkDungeonChair": "Rosa Verliesstuhl", + "PinkDungeonTable": "Rosa Verliestisch", + "PinkDungeonWorkBench": "Rosa Verlieswerkbank", + "BlueDungeonCandle": "Blaue Verlieskerze", + "GreenDungeonCandle": "Grüne Verlieskerze", + "PinkDungeonCandle": "Rosa Verlieskerze", + "BlueDungeonVase": "Blaue Verliesvase", + "GreenDungeonVase": "Grüne Verliesvase", + "GoldBrick": "Goldziegel", + "PinkDungeonVase": "Rosa Verliesvase", + "BlueDungeonDoor": "Blaue Verliestür", + "GreenDungeonDoor": "Grüne Verliestür", + "PinkDungeonDoor": "Rosa Verliestür", + "BlueDungeonBookcase": "Blauer Verliesbücherschrank", + "GreenDungeonBookcase": "Grüner Verliesbücherschrank", + "PinkDungeonBookcase": "Rosa Verliesbücherschrank", + "Catacomb": "Katakombe", + "DungeonShelf": "Verliesregal", + "SkellingtonJSkellingsworth": "Skellington J. Skellingsworth", + "GoldBrickWall": "Goldene Ziegelwand", + "TheCursedMan": "Der verfluchte Mann", + "TheEyeSeestheEnd": "Die Augen sehen das Ende", + "SomethingEvilisWatchingYou": "Etwas Böses wacht über dich", + "TheTwinsHaveAwoken": "Die Zwillinge sind erwacht", + "TheScreamer": "Der Schreihals", + "GoblinsPlayingPoker": "Goblins spielen Poker", + "Dryadisque": "Dryadisque", + "Sunflowers": "Sonnenblumen", + "TerrarianGothic": "Terrarianische Gotik", + "Beanie": "Beanie", + "SilverBrick": "Silberziegel", + "ImbuingStation": "Tränkungsstation", + "StarinaBottle": "Stern in der Flasche", + "EmptyBullet": "Leere Kugel", + "Impact": "Kollision", + "PoweredbyBirds": "Angetrieben von Vögeln", + "TheDestroyer": "Der Zerstörer", + "ThePersistencyofEyes": "Die Beharrlichkeit der Augen", + "UnicornCrossingtheHallows": "Einhorn durchquert das Heilige", + "GreatWave": "Große Welle", + "StarryNight": "Sternennacht", + "SilverBrickWall": "Silberne Ziegelwand", + "GuidePicasso": "Fremdenführer-Picasso", + "TheGuardiansGaze": "Des Wächters Blick", + "FatherofSomeone": "Jemandes Vater", + "NurseLisa": "Krankenschwester Lisa", + "ShadowbeamStaff": "Schattenstrahlstab", + "InfernoFork": "Infernogabel", + "SpectreStaff": "Gespensterstab", + "WoodenFence": "Holzzaun", + "LeadFence": "Bleizaun", + "BubbleMachine": "Blasenmaschine", + "CopperBrick": "Kupferziegel", + "BubbleWand": "Blasenzauberstab", + "MarchingBonesBanner": "Banner der Marschierenden Knochen", + "NecromanticSign": "Nekromantisches Zeichen", + "RustedCompanyStandard": "Standarte der Verrosteten Gesellschaft", + "RaggedBrotherhoodSigil": "Siegel der Zerlumpten Bruderschaft", + "MoltenLegionFlag": "Flagge der Geschmolzenen Legion", + "DiabolicSigil": "Diabolisches Siegel", + "ObsidianPlatform": "Obsidianklappe", + "ObsidianDoor": "Obsidiantür", + "ObsidianChair": "Obsidianstuhl", + "CopperBrickWall": "Kupferne Ziegelwand", + "ObsidianTable": "Obsidiantisch", + "ObsidianWorkBench": "Obsidianwerkbank", + "ObsidianVase": "Obsidianvase", + "ObsidianBookcase": "Obsidianbücherschrank", + "HellboundBanner": "Banner der Zur Hölle Fahrenden", + "HellHammerBanner": "Banner des Höllenhammers", + "HelltowerBanner": "Banner des Höllenturms", + "LostHopesofManBanner": "Banner der Verlorenen Hoffnung des Menschen", + "ObsidianWatcherBanner": "Banner des Obsidianwächters", + "LavaEruptsBanner": "Banner Lava bricht aus", + "Spike": "Stachel", + "BlueDungeonBed": "Blaues Verliesbett", + "GreenDungeonBed": "Grünes Verliesbett", + "PinkDungeonBed": "Rosa Verliesbett", + "ObsidianBed": "Osidianverliesbett", + "Waldo": "Waldo", + "Darkness": "Dunkelheit", + "DarkSoulReaper": "Dunkler Seelensensenmann", + "Land": "Land", + "TrappedGhost": "Gefangener Geist", + "DemonsEye": "Dämonenauge", + "WaterCandle": "Wasserkerze", + "FindingGold": "Gold finden", + "FirstEncounter": "Erstes Aufeinandertreffen", + "GoodMorning": "Guten Morgen", + "UndergroundReward": "Untergrund-Belohnung", + "ThroughtheWindow": "Durch das Fenster", + "PlaceAbovetheClouds": "Ein Platz über den Wolken", + "DoNotStepontheGrass": "Den Rasen nicht betreten", + "ColdWatersintheWhiteLand": "Kalte Gewässer im Weißen Land", + "LightlessChasms": "Lichtlose Abgründe", + "TheLandofDeceivingLooks": "Das Land der Täuschenden Eindrücke", + "Book": "Buch", + "Daylight": "Tageslicht", + "SecretoftheSands": "Geheimnis der Sände", + "DeadlandComesAlive": "Todesland erwacht zum Leben", + "EvilPresence": "Böse Präsenz", + "SkyGuardian": "Himmelswächter", + "AmericanExplosive": "American Explosive", + "Discover": "Entdecke", + "HandEarth": "Erdhand", + "OldMiner": "Alter Bergarbeiter", + "Skelehead": "Skelekopf", + "CopperWatch": "Kupferuhr", + "Cobweb": "Spinnennetz", + "FacingtheCerebralMastermind": "Das zerebrale Meisterhirn", + "LakeofFire": "Feuersee", + "TrioSuperHeroes": "Superheldentrio", + "SpectreHood": "Gespensterkapuze", + "SpectreRobe": "Gespensterrobe", + "SpectrePants": "Gespensterhose", + "SpectrePickaxe": "Gespensterspitzhacke", + "SpectreHamaxe": "Gespensterhammaxt", + "Ectoplasm": "Ektoplasma", + "GothicChair": "Gothic-Stuhl", + "NecroHelmet": "Nekrohelm", + "GothicTable": "Gothic-Tisch", + "GothicWorkBench": "Gothic-Werkbank", + "GothicBookcase": "Gothic-Bücherschrank", + "PaladinsHammer": "Paladins Hammer", + "SWATHelmet": "SWAT-Helm", + "BeeWings": "Bienenflügel", + "GiantHarpyFeather": "Riesige Harpyienfeder", + "BoneFeather": "Knochenfeder", + "FireFeather": "Feuerfeder", + "IceFeather": "Eisfeder", + "NecroBreastplate": "Nekro-Brustplatte", + "BrokenBatWing": "Gebrochener Fledermausflügel", + "TatteredBeeWing": "Ramponierter Bienenflügel", + "LargeAmethyst": "Großer Amethyst", + "LargeTopaz": "Großer Topas", + "LargeSapphire": "Großer Saphir", + "LargeEmerald": "Großer Smaragd", + "LargeRuby": "Großer Rubin", + "LargeDiamond": "Großer Diamant", + "JungleChest": "Dschungeltruhe", + "CorruptionChest": "Verdorbene Truhe", + "NecroGreaves": "Nekro-Beinschützer", + "CrimsonChest": "Purpurne Truhe", + "HallowedChest": "Heilige Truhe", + "JungleKey": "Dschungelschlüssel", + "CorruptionKey": "Verdorbener Schlüssel", + "CrimsonKey": "Purpurner Schlüssel", + "HallowedKey": "Heiliger Schlüssel", + "FrozenKey": "Gefrorener Schlüssel", + "ImpFace": "Koboldgesicht", + "OminousPresence": "Ominöse Präsenz", + "Bone": "Knochen", + "ShiningMoon": "Leuchtender Mond", + "LivingGore": "Lebendiges Blut", + "FlowingMagma": "Fließendes Magma", + "SpectrePaintbrush": "Geisterfarbpinsel", + "SpectrePaintRoller": "Geisterfarbroller", + "SpectrePaintScraper": "Geisterspachtel", + "ShroomiteHeadgear": "Pilzmitkopfschutz", + "ShroomiteMask": "Pilzmitmaske", + "ShroomiteHelmet": "Pilzmithelm", + "ShroomiteBreastplate": "Pilzmitbrustplatte", + "Muramasa": "Muramasa", + "ShroomiteLeggings": "Pilzmitgamaschen", + "Autohammer": "Autohammer", + "ShroomiteBar": "Pilzmitbarren", + "SDMG": "W.D.M.G.", + "CenxsTiara": "Cenx' Tiara", + "CenxsBreastplate": "Cenx' Brustplatte", + "CenxsLeggings": "Cenx' Gamaschen", + "CrownosMask": "Crownos Maske", + "CrownosBreastplate": "Crownos Brustplatte", + "CrownosLeggings": "Crownos Gamaschen", + "CobaltShield": "Kobaltschild", + "WillsHelmet": "Wills Helm", + "WillsBreastplate": "Wills Brustplatte", + "WillsLeggings": "Wills Gamaschen", + "JimsHelmet": "Jims Helm", + "JimsBreastplate": "Jims Brustplatte", + "JimsLeggings": "Jims Gamaschen", + "AaronsHelmet": "Aarons Helm", + "AaronsBreastplate": "Aarons Brustplatte", + "AaronsLeggings": "Aarons Gamaschen", + "VampireKnives": "Vampirmesser", + "AquaScepter": "Aqua-Zepter", + "BrokenHeroSword": "Zerbrochenes Heldenschwert", + "ScourgeoftheCorruptor": "Geißel des Zersetzers", + "StaffoftheFrostHydra": "Stab der Eishydra", + "TheCreationoftheGuide": "Die Schöpfung des Fremdenführers", + "TheMerchant": "Der Händler", + "CrownoDevoursHisLunch": "Crowno verschlingt sein Mittagessen", + "RareEnchantment": "Seltene Verzauberung", + "GloriousNight": "Herrliche Nacht", + "SweetheartNecklace": "Des Lieblings Halskette", + "FlurryBoots": "Unruhige Stiefel", + "LuckyHorseshoe": "Glückshufeisen", + "DTownsHelmet": "D-Towns Helm", + "DTownsBreastplate": "D-Towns Brustplatte", + "DTownsLeggings": "D-Towns Gamaschen", + "DTownsWings": "D-Towns Flügel", + "WillsWings": "Wills Flügel", + "CrownosWings": "Crownos Flügel", + "CenxsWings": "Cenx' Flügel", + "CenxsDress": "Cenx' Tracht", + "CenxsDressPants": "Cenx' Trachtenhose", + "PalladiumColumn": "Palladiumsäule", + "ShinyRedBalloon": "Leuchtend roter Ballon", + "PalladiumColumnWall": "Palladiumsäulenwand", + "BubblegumBlock": "Kaugummiblock", + "BubblegumBlockWall": "Kaugummiblockwand", + "TitanstoneBlock": "Titansteinwand", + "TitanstoneBlockWall": "Titansteinblockwand", + "MagicCuffs": "Magische Handschellen", + "MusicBoxSnow": "Spieluhr (Schnee)", + "MusicBoxCrimson": "Spieluhr (Purpur)", + "MusicBoxBoss4": "Spieluhr (Boss 4)", + "SilverWatch": "Silberuhr", + "Harpoon": "Harpune", + "MusicBoxAltOverworldDay": "Spieluhr (Alternativer Tag in der Oberwelt)", + "MusicBoxRain": "Spieluhr (Regen)", + "MusicBoxIce": "Spieluhr (Eis)", + "MusicBoxDesert": "Spieluhr (Wüste)", + "MusicBoxDungeon": "Spieluhr (Verlies)", + "MusicBoxPlantera": "Spieluhr (Plantera)", + "MusicBoxBoss5": "Spieluhr (Boss 5)", + "MusicBoxTemple": "Spieluhr (Tempel)", + "MusicBoxEclipse": "Spieluhr (Sonnenfinsternis)", + "SpikyBall": "Dornenball", + "MusicBoxMushrooms": "Spieluhr (Pilze)", + "ButterflyDust": "Schmetterlingsstaub", + "AnkhCharm": "Anchzauber", + "AnkhShield": "Anchschild", + "BlueFlare": "Blaue Leuchtkugel", + "AnglerFishBanner": "Anglerfischbanner", + "AngryNimbusBanner": "Zorniger-Nimbus-Banner", + "AnomuraFungusBanner": "Anomurapilzbanner", + "AntlionBanner": "Ameisenlöwenbanner", + "ArapaimaBanner": "Arapaimabanner", + "BallOHurt": "Schmerzball", + "ArmoredSkeletonBanner": "Gepanzertes-Skelett-Banner", + "BatBanner": "Leuchtfledermausbanner", + "BirdBanner": "Vogelbanner", + "BlackRecluseBanner": "Schwarze-Einsiedlerin-Banner", + "BloodFeederBanner": "Blutsaugerbanner", + "BloodJellyBanner": "Blutgeleebanner", + "BloodCrawlerBanner": "Blutkriecherbanner", + "BoneSerpentBanner": "Kochenschlangenbanner", + "BunnyBanner": "Häschenbanner", + "ChaosElementalBanner": "Chaos-Elemental-Banner", + "BlueMoon": "Blauer Mond", + "MimicBanner": "Mimicbanner", + "ClownBanner": "Clownbanner", + "CorruptBunnyBanner": "Verdorbenes-Häschen-Banner", + "CorruptGoldfishBanner": "Verdorbener-Goldfisch-Banner", + "CrabBanner": "Krabbenbanner", + "CrimeraBanner": "Purmerenbanner", + "CrimsonAxeBanner": "Purpurne-Axt-Banner", + "CursedHammerBanner": "Verfluchter-Hammer-Banner", + "DemonBanner": "Dämonenbanner", + "DemonEyeBanner": "Dämonenaugenbanner", + "Handgun": "Pistole", + "DerplingBanner": "Derplingbanner", + "EaterofSoulsBanner": "Seelenfresserbanner", + "EnchantedSwordBanner": "Verzaubertes-Schwert-Banner", + "FaceMonsterBanner": "Gesichtsmonsterbanner", + "FloatyGrossBanner": "Schwebender-Ekel-Banner", + "FlyingFishBanner": "Fliegender-Fisch-Banner", + "FlyingSnakeBanner": "Fliegende-Schlange-Banner", + "FrankensteinBanner": "Frankensteinbanner", + "FungiBulbBanner": "Pilzbirnenbanner", + "WaterBolt": "Wasserbolzen", + "FungoFishBanner": "Fungofischbanner", + "GastropodBanner": "Bauchfüßlerbanner", + "GoblinThiefBanner": "Goblin-Dieb-Banner", + "GoblinSorcererBanner": "Goblin-Hexer-Banner", + "GoblinPeonBanner": "Goblin-Arbeiter-Banner", + "GoblinScoutBanner": "Goblin-Späher-Banner", + "GoblinWarriorBanner": "Goblin-Krieger-Banner", + "GoldfishBanner": "Goldfischbanner", + "HarpyBanner": "Harpyienbanner", + "HellbatBanner": "Höllenfledermausbanner", + "Bomb": "Bombe", + "HerplingBanner": "Herplingbanner", + "HornetBanner": "Hornissenbanner", + "IceElementalBanner": "Eis-Elementar-Banner", + "IcyMermanBanner": "Eiswassermannbanner", + "FireImpBanner": "Feuerkoboldbanner", + "JellyfishBanner": "Rosa-Quallen-Banner", + "JungleCreeperBanner": "Dschungelkriecherbanner", + "LihzahrdBanner": "Lihzahrdbanner", + "ManEaterBanner": "Menschenfresserbanner", + "MeteorHeadBanner": "Meteorenkopfbanner", + "Dynamite": "Dynamit", + "MothBanner": "Mottenbanner", + "MummyBanner": "Mumienbanner", + "MushiLadybugBanner": "Mushi-Marienkäfer-Banner", + "ParrotBanner": "Papageienbanner", + "PigronBanner": "Schwrachenbanner", + "PiranhaBanner": "Piranhabanner", + "PirateBanner": "Piratenmatrosenbanner", + "PixieBanner": "Pixiebanner", + "RaincoatZombieBanner": "Regenmantelzombiebanner", + "ReaperBanner": "Sensenmannbanner", + "Grenade": "Granate", + "SharkBanner": "Haibanner", + "SkeletonBanner": "Skelettbanner", + "SkeletonMageBanner": "Düstermagier-Banner", + "SlimeBanner": "Blauer Schleim-Banner", + "SnowFlinxBanner": "Schneeflinxbanner", + "SpiderBanner": "Wandkriecherbanner", + "SporeZombieBanner": "Sporenzombiebanner", + "SwampThingBanner": "Das-Ding-aus-dem-Sumpf-Banner", + "TortoiseBanner": "Riesenschildkrötenbanner", + "ToxicSludgeBanner": "Giftiger-Schlamm-Bammer", + "SandBlock": "Sandblock", + "UmbrellaSlimeBanner": "Regenschirmschleimbanner", + "UnicornBanner": "Einhornbanner", + "VampireBanner": "Vampirbanner", + "VultureBanner": "Geierbanner", + "NypmhBanner": "Nymphenbanner", + "WerewolfBanner": "Werwolfbanner", + "WolfBanner": "Wolfbanner", + "WorldFeederBanner": "Weltenfresserbanner", + "WormBanner": "Wurmbanner", + "WraithBanner": "Monstergeistbanner", + "GoldWatch": "Golduhr", + "Glass": "Glas", + "WyvernBanner": "Lindwurmbanner", + "ZombieBanner": "Zombiebanner", + "GlassPlatform": "Glasklappe", + "GlassChair": "Glasstuhl", + "GoldenChair": "Goldener Stuhl", + "GoldenToilet": "Goldene Toilette", + "BarStool": "Barhocker", + "HoneyChair": "Honigstuhl", + "SteampunkChair": "Steampunk-Stuhl", + "GlassDoor": "Glastür", + "Sign": "Spruchschild", + "GoldenDoor": "Goldene Tür", + "HoneyDoor": "Honigtür", + "SteampunkDoor": "Steampunk-Tür", + "GlassTable": "Glastisch", + "BanquetTable": "Banketttisch", + "Bar": "Bar", + "GoldenTable": "Goldener Tisch", + "HoneyTable": "Honigtisch", + "SteampunkTable": "Steampunk-Tisch", + "GlassBed": "Glassbett", + "AshBlock": "Aschenblock", + "GoldenBed": "Goldenes Bett", + "HoneyBed": "Honigbett", + "SteampunkBed": "Steampunk-Bett", + "LivingWoodWall": "Lebendes-Holz-Wand", + "FartinaJar": "Furz im Glas", + "Pumpkin": "Kürbis", + "PumpkinWall": "Kürbiswand", + "Hay": "Heu", + "HayWall": "Heuwand", + "SpookyWood": "Schauriges Holz", + "Obsidian": "Obsidian", + "SpookyWoodWall": "Schauriges-Holz-Wand", + "PumpkinHelmet": "Kürbishelm", + "PumpkinBreastplate": "Kürbisbrustplatte", + "PumpkinLeggings": "Kürbisgamaschen", + "CandyApple": "Liebesapfel", + "SoulCake": "Seelenkuchen", + "NurseHat": "Krankenschwesternhut", + "NurseShirt": "Krankenschwesternbluse", + "NursePants": "Krankenschwesternhose", + "WizardsHat": "Zauberhut", + "Hellstone": "Höllenstein", + "GuyFawkesMask": "Guy-Fawkes-Maske", + "DyeTraderRobe": "Farbstoffhändlerrobe", + "SteampunkGoggles": "Steampunk-Schutzbrille", + "CyborgHelmet": "Cyborghelm", + "CyborgShirt": "Cyborghemd", + "CyborgPants": "Cyborghose", + "CreeperMask": "Kriechermaske", + "CreeperShirt": "Kriecherhemd", + "CreeperPants": "Kriecherhose", + "CatMask": "Katzenmaske", + "HellstoneBar": "Höllenstein-Barren", + "CatShirt": "Katzenhemd", + "CatPants": "Katzenhose", + "GhostMask": "Geistermaske", + "GhostShirt": "Geisterhemd", + "PumpkinMask": "Kürbismaske", + "PumpkinShirt": "Kürbishemd", + "PumpkinPants": "Kürbishose", + "RobotMask": "Robotermaske", + "RobotShirt": "Roboterhemd", + "RobotPants": "Roboterhose", + "MudBlock": "Schlammblock", + "UnicornMask": "Einhornmaske", + "UnicornShirt": "Einhornhemd", + "UnicornPants": "Einhornhose", + "VampireMask": "Vampirmaske", + "VampireShirt": "Vampirhemd", + "VampirePants": "Vampirhose", + "WitchHat": "Hexenhut", + "LeprechaunHat": "Leprechaunhut", + "LeprechaunShirt": "Leprechaunhemd", + "LeprechaunPants": "Leprechaunhose", + "Sapphire": "Saphir", + "PixieShirt": "Pixiehemd", + "PixiePants": "Pixiehose", + "PrincessHat": "Prinzessinnenhut", + "PrincessDressNew": "Prinzessinnenkleid", + "GoodieBag": "Wundertüte", + "WitchDress": "Hexenkleid", + "WitchBoots": "Hexenstiefel", + "BrideofFrankensteinMask": "Frankensteins-Braut-Maske", + "BrideofFrankensteinDress": "Frankensteins-Braut-Kleid", + "KarateTortoiseMask": "Karate-Schildkröten-Maske", + "Ruby": "Rubin", + "KarateTortoiseShirt": "Karate-Schildkröten-Hemd", + "KarateTortoisePants": "Karate-Schildkröten-Hose", + "CandyCornRifle": "Bonbonmaisgewehr", + "CandyCorn": "Bonbonmais", + "JackOLanternLauncher": "Kürbislaternenwerfer", + "ExplosiveJackOLantern": "Explosive Kürbislaterne", + "Sickle": "Sichel", + "PumpkinPie": "Kürbiskuchen", + "ScarecrowHat": "Vogelscheuchenhut", + "ScarecrowShirt": "Vogelscheuchenhemd", + "Emerald": "Smaragd", + "ScarecrowPants": "Vogelscheuchenhose", + "Cauldron": "Kessel", + "PumpkinChair": "Kürbistuhl", + "PumpkinDoor": "Kürbistür", + "PumpkinTable": "Kürbistisch", + "PumpkinWorkBench": "Kürbiswerkbank", + "PumpkinPlatform": "Kürbisklappe", + "TatteredFairyWings": "Ramponierte Feenflügel", + "SpiderEgg": "Spinnenei", + "MagicalPumpkinSeed": "Magische Kürbissamen", + "DepthMeter": "Taucheruhr", + "Topaz": "Topas", + "BatHook": "Fledermaushaken", + "BatScepter": "Fledermauszepter", + "RavenStaff": "Rabenstab", + "JungleKeyMold": "Dschungel-Schlüsselform", + "CorruptionKeyMold": "Verderben-Schlüsselform", + "CrimsonKeyMold": "Purpur-Schlüsselform", + "HallowedKeyMold": "Heiliges-Schlüsselform", + "FrozenKeyMold": "Gefrorene Schlüsselform", + "HangingJackOLantern": "Hängende Kürbislaterne", + "RottenEgg": "Faules Ei", + "Amethyst": "Amethyst", + "UnluckyYarn": "Unglücksfaden", + "BlackFairyDust": "Schwarzer Feenstaub", + "Jackelier": "Kürbisleuchter", + "JackOLantern": "Kürbislaterne", + "SpookyChair": "Schauriger Stuhl", + "SpookyDoor": "Schaurige Tür", + "SpookyTable": "Schauriger Tisch", + "SpookyWorkBench": "Schaurige Werkbank", + "ReaperHood": "Sensenmannkapuze", + "Diamond": "Diamant", + "ReaperRobe": "Sensenmannrobe", + "FoxMask": "Fuchsmaske", + "FoxShirt": "Fuchshemd", + "FoxPants": "Fuchshose", + "CatEars": "Katzenohren", + "BloodyMachete": "Blutige Machete", + "TheHorsemansBlade": "Des Reitersmannes Klinge", + "BladedGlove": "Klingenhandschuh", + "PumpkinSeed": "Kürbissamen", + "SpookyHook": "Schauriger Haken", + "GlowingMushroom": "Glühender Pilz", + "SpookyWings": "Schaurige Flügel", + "SpookyTwig": "Schauriger Zweig", + "SpookyHelmet": "Schauriger Helm", + "SpookyBreastplate": "Schaurige Brustplatte", + "SpookyLeggings": "Schaurige Gamaschen", + "StakeLauncher": "Pflockwerfer", + "Stake": "Pflock", + "CursedSapling": "Verfluchter Schößling", + "SpaceCreatureMask": "Weltraumwesenmaske", + "SpaceCreatureShirt": "Weltraumwesenhemd", + "Star": "Stern", + "SpaceCreaturePants": "Weltraumwesenhose", + "WolfMask": "Wolfsmaske", + "WolfShirt": "Wolfshemd", + "WolfPants": "Wolfshose", + "PumpkinMoonMedallion": "Kürbismondmedaillon", + "NecromanticScroll": "Nekromantische Schriftrolle", + "JackingSkeletron": "Jacking Skeletron", + "BitterHarvest": "Bittere Ernte", + "BloodMoonCountess": "Blutmondgräfin", + "HallowsEve": "Abend vor Allerheiligen", + "IvyWhip": "Efeupeitsche", + "MorbidCuriosity": "Tödliche Neugierde", + "TreasureHunterShirt": "Schätzjägerhemd", + "TreasureHunterPants": "Schatzjägerhose", + "DryadCoverings": "Dryadenbedeckung", + "DryadLoincloth": "Dryadenlendenschurz", + "MourningWoodTrophy": "Trauernde Holztrophäe", + "PumpkingTrophy": "Kürbiskönigtrophäe", + "JackOLanternMask": "Kürbislaternenmaske", + "SniperScope": "Sniper-Zielfernrohr", + "HeartLantern": "Herzlaterne", + "BreathingReed": "Schilfrohr", + "JellyfishDivingGear": "Quallentaucherausrüstung", + "ArcticDivingGear": "Arktische Taucherausrüstung", + "FrostsparkBoots": "Frostfunkenstiefel", + "FartInABalloon": "Furz im Ballon", + "PapyrusScarab": "Papyrusskarabäus", + "CelestialStone": "Himmlischer Stein", + "Hoverboard": "Hoverboard", + "CandyCane": "Zuckerstange", + "SugarPlum": "Zuckerpflaume", + "Present": "Geschenk", + "Flipper": "Flosse", + "RedRyder": "Red Ryder", + "FestiveWings": "Festliche Flügel", + "PineTreeBlock": "Kiefernblock", + "ChristmasTree": "Weihnachtsbaum", + "StarTopper1": "Sternspitze 1", + "StarTopper2": "Sternspitze 2", + "StarTopper3": "Sternspitze 3", + "BowTopper": "Schleifenspitze", + "WhiteGarland": "Weißer Kranz", + "WhiteAndRedGarland": "Weißroter Kranz", + "HealingPotion": "Heiltrank", + "RedGardland": "Roter Kranz", + "RedAndGreenGardland": "Rotgrüner Kranz", + "GreenGardland": "Grüner Kranz", + "GreenAndWhiteGarland": "Grünweißer Kranz", + "MulticoloredBulb": "Bunte Glühbirne", + "RedBulb": "Rote Glühbirne", + "YellowBulb": "Gelbe Glühbirne", + "GreenBulb": "Grüne Glühbirne", + "RedAndGreenBulb": "Rotgrüne Glühbirne", + "YellowAndGreenBulb": "Gelbgrüne Glühbirne", + "ManaPotion": "Manatrank", + "RedAndYellowBulb": "Rotgelbe Glühbirne", + "WhiteBulb": "Weiße Glühbirne", + "WhiteAndRedBulb": "Weißrote Glühbirne", + "WhiteAndYellowBulb": "Weißgelbe Glühbirne", + "WhiteAndGreenBulb": "Weißgrüne Glühbirne", + "MulticoloredLights": "Bunte Lichter", + "RedLights": "Rote Lichter", + "GreenLights": "Grüne Lichter", + "BlueLights": "Blaue Lichter", + "YellowLights": "Gelbe Lichter", + "GoldBar": "Goldbarren", + "BladeofGrass": "Grasklinge", + "RedAndYellowLights": "Rotgelbe Lichter", + "RedAndGreenLights": "Rotgrüne Lichter", + "YellowAndGreenLights": "Gelbgrüne Lichter", + "BlueAndGreenLights": "Blaugrüne Lichter", + "RedAndBlueLights": "Rotblaue Lichter", + "BlueAndYellowLights": "Blaugelbe Lichter", + "GiantBow": "Riesige Schleife", + "ReindeerAntlers": "Rentiergeweih", + "Holly": "Holly", + "CandyCaneSword": "Zuckerstangen-Schwert", + "ThornChakram": "Dornen-Chakram", + "EldMelter": "Elfenschmelzer", + "ChristmasPudding": "Weihnachtspudding", + "Eggnog": "Eierpunch", + "StarAnise": "Zuckerkeks", + "ReindeerBells": "Rentierglocken", + "CandyCaneHook": "Zuckerstangen-Haken", + "ChristmasHook": "Weihnachtshaken", + "CnadyCanePickaxe": "Zuckerstangen-Spitzhacke", + "FruitcakeChakram": "Früchtebrot-Chakram", + "SugarCookie": "Zuckerkeks", + "ObsidianBrick": "Obsidianziegel", + "GingerbreadCookie": "Lebkuchenkeks", + "HandWarmer": "Handwärmer", + "Coal": "Kohle", + "Toolbox": "Werkzeugkiste", + "PineDoor": "Kieferntür", + "PineChair": "Kiefernstuhl", + "PineTable": "Kieferntisch", + "DogWhistle": "Hundepfeife", + "ChristmasTreeSword": "Weihnachtsbaum-Schwert", + "ChainGun": "Kettenkanone", + "ObsidianSkull": "Obsidianschädel", + "Razorpine": "Rasierfichte", + "BlizzardStaff": "Schneesturmstab", + "MrsClauseHat": "Weihnachtsfrau-Mütze", + "MrsClauseShirt": "Weihnachtsfrau-Shirt", + "MrsClauseHeels": "Weihnachtsfrau-Stiefel", + "ParkaHood": "Parka-Kapuze", + "ParkaCoat": "Parka-Mantel", + "ParkaPants": "Parka-Hose", + "SnowHat": "Schneemütze", + "UglySweater": "Hässlicher Pullover", + "MushroomGrassSeeds": "Pilzgras-Saat", + "TreeMask": "Baummaske", + "TreeShirt": "Baumshirt", + "TreeTrunks": "Baumstämme", + "ElfHat": "Elfenmütze", + "ElfShirt": "Elfenshirt", + "ElfPants": "Elfenhose", + "SnowmanCannon": "Schneemannkanone", + "NorthPole": "Nordpol", + "ChristmasTreeWallpaper": "Weihnachtsbaum-Tapete", + "OrnamentWallpaper": "Weihnachtsschmuck-Tapete", + "JungleGrassSeeds": "Dschungelgras-Saat", + "CandyCaneWallpaper": "Zuckerstangen-Tapete", + "FestiveWallpaper": "Festliche Tapete", + "StarsWallpaper": "Sternen-Tapete", + "SquigglesWallpaper": "Schnörkel-Tapete", + "SnowflakeWallpaper": "Schneeflocken-Tapete", + "KrampusHornWallpaper": "Krampushorn-Tapete", + "BluegreenWallpaper": "Blaugrüne Tapete", + "GrinchFingerWallpaper": "Grinchfinger-Tapete", + "NaughtyPresent": "Unartiges Geschenk", + "BabyGrinchMischiefWhistle": "Baby-Grinchs Unfugflöte", + "WoodenHammer": "Holzhammer", + "IceQueenTrophy": "Eiskönigin-Trophäe", + "SantaNK1Trophy": "Weihnachtsmann-NK1-Trophäe", + "EverscreamTrophy": "Immerschrei-Trophäe", + "MusicBoxPumpkinMoon": "Spieluhr (Kürbismond)", + "MusicBoxAltUnderground": "Spieluhr (Alternativer Untergrund)", + "MusicBoxFrostMoon": "Spieluhr (Frostmond)", + "BrownPaint": "Braune Farbe", + "ShadowPaint": "Schattenfarbe", + "NegativePaint": "Negativfarbe", + "TeamDye": "Team-Farbstoff", + "StarCannon": "Sternenkanone", + "AmethystGemsparkBlock": "Amethyst-Funkenedelstein-Block", + "TopazGemsparkBlock": "Topas-Funkenedelstein-Block", + "SapphireGemsparkBlock": "Saphir-Funkenedelstein-Block", + "EmeraldGemsparkBlock": "Smaragd-Funkenedelstein-Block", + "RubyGemsparkBlock": "Rubin-Funkenedelstein-Block", + "DiamondGemsparkBlock": "Diamant-Funkenedelstein-Block", + "AmberGemsparkBlock": "Bernstein-Funkenedelstein-Block", + "LifeHairDye": "Leben-Haarfärbemittel", + "ManaHairDye": "Mana-Haarfärbemittel", + "DepthHairDye": "Tiefen-Haarfärbemittel", + "BluePhaseblade": "Blaue Laserklinge", + "MoneyHairDye": "Geld-Haarfärbemittel", + "TimeHairDye": "Zeit-Haarfärbemittel", + "TeamHairDye": "Team-Haarfärbemittel", + "BiomeHairDye": "Biom-Haarfärbemittel", + "PartyHairDye": "Party-Haarfärbemittel", + "RainbowHairDye": "Regenbogen-Haarfärbemittel", + "SpeedHairDye": "Tempo-Haarfärbemittel", + "AngelHalo": "Engelsheiligenschein", + "Fez": "Fes", + "Womannquin": "Womannequin", + "RedPhaseblade": "Rote Laserklinge", + "HairDyeRemover": "Haarfärbemittelentferner", + "BugNet": "Fliegennetz", + "Firefly": "Glühwürmchen", + "FireflyinaBottle": "Glühwürmchen in der Flasche", + "MonarchButterfly": "Monarchfalter", + "PurpleEmperorButterfly": "Lila Edelfalter", + "RedAdmiralButterfly": "Roter Admiralfalter", + "UlyssesButterfly": "Odysseusfalter", + "SulphurButterfly": "Schwefelfalter", + "TreeNymphButterfly": "Baumnymphenfalter", + "DirtBlock": "Dreckblock", + "CopperBar": "Kupferbarren", + "GreenPhaseblade": "Grüne Laserklinge", + "ZebraSwallowtailButterfly": "Ritterfalter", + "JuliaButterfly": "Juliafalter", + "Worm": "Wurm", + "Mouse": "Maus", + "LightningBug": "Leuchtkäfer", + "LightningBuginaBottle": "Leuchtkäfer in der Flasche", + "Snail": "Schnecke", + "GlowingSnail": "Leuchtende Schnecke", + "FancyGreyWallpaper": "Schicke graue Tapete", + "IceFloeWallpaper": "Eisschollen-Tapete", + "PurplePhaseblade": "Lila Laserklinge", + "MusicWallpaper": "Musik-Tapete", + "PurpleRainWallpaper": "Lila-Regen-Tapete", + "RainbowWallpaper": "Regenbogen-Tapete", + "SparkleStoneWallpaper": "Leuchtende-Stein-Tapete", + "StarlitHeavenWallpaper": "Sternenklarer-Himmel-Tapete", + "Bird": "Vogel", + "BlueJay": "Blauhäher", + "Cardinal": "Kardinal", + "Squirrel": "Eichhörnchen", + "Bunny": "Hase", + "WhitePhaseblade": "Weiße Laserklinge", + "YellowPhaseblade": "Gelbe Laserklinge", + "MeteorHamaxe": "Meteor-Hamaxt", + "EmptyBucket": "Leerer Eimer", + "WaterBucket": "Wassereimer", + "LavaBucket": "Lavaeimer", + "JungleRose": "Dschungelrose", + "Stinger": "Stachel", + "SilverBar": "Silberbarren", + "Vine": "Weinrebe", + "FeralClaws": "Wilde Klauen", + "BlacksmithRack": "Schmiedregal", + "CarpentryRack": "Zimmermannsregal", + "HelmetRack": "Helmregal", + "SpearRack": "Speerregal", + "SwordRack": "Schwertregal", + "StoneSlab": "Steinblock", + "AnkletoftheWind": "Fusskette des Windes", + "SandstoneSlab": "Sandsteinblock", + "Frog": "Frosch", + "MallardDuck": "Stockente", + "Duck": "Ente", + "StaffofRegrowth": "Stab des Nachwachsens", + "HellstoneBrick": "Höllensteinziegel", + "WhoopieCushion": "Furzkissen", + "BlackScorpion": "Schwarzer Skorpion", + "Scorpion": "Skorpion", + "BubbleWallpaper": "Blasen-Tapete", + "CopperPipeWallpaper": "Kupferrohr-Tapete", + "Shackle": "Fessel", + "DuckyWallpaper": "Enten-Tapete", + "FrostCore": "Frostkern", + "BunnyCage": "Hasenkäfig", + "SquirrelCage": "Eichhörnchenkäfig", + "MallardDuckCage": "Stockentenkäfig", + "DuckCage": "Entenkäfig", + "BirdCage": "Vogelkäfig", + "BlueJayCage": "Blauhäherkäfig", + "CardinalCage": "Kardinalkäfig", + "WaterfallWall": "Wasserfallwand", + "MoltenHamaxe": "Geschmolzene Hamaxt", + "LavafallWall": "Lavastromwand", + "CrimsonSeeds": "Purpune Saat", + "HeavyWorkBench": "Schwere Werkbank", + "CopperPlating": "Kupferüberzug", + "SnailCage": "Schneckenkäfig", + "GlowingSnailCage": "Leuchtende-Schnecken-Käfig", + "ShroomiteDiggingClaw": "Pilzmitgrabeforke", + "AmmoBox": "Munitionskiste", + "MonarchButterflyJar": "Monarchfalter-Glas", + "PurpleEmperorButterflyJar": "Lila-Edelfalter-Glas", + "Flamelash": "Flammenpeitsche", + "RedAdmiralButterflyJar": "Roter-Admiralfalter-Glas", + "UlyssesButterflyJar": "Odysseusfalter-Glas", + "SulphurButterflyJar": "Schwefelfalter-Glas", + "TreeNymphButterflyJar": "Baumnymphenfalter-Glas", + "ZebraSwallowtailButterflyJar": "Ritterfalter-Glas", + "JuliaButterflyJar": "Juliafalter-Glas", + "ScorpionCage": "Skorpionkäfig", + "BlackScorpionCage": "Schwarzer-Skorpion-Käfig", + "VenomStaff": "Toxikumstab", + "SpectreMask": "Geistermaske", + "PhoenixBlaster": "Phoenix-Blaster", + "FrogCage": "Froschkäfig", + "MouseCage": "Mäusekäfig", + "BoneWelder": "Knochenschweißer", + "FleshCloningVaat": "Bottich zum Fleischklonen", + "GlassKiln": "Glasmeiler", + "LihzahrdFurnace": "Lihzahrd-Schmelzofen", + "LivingLoom": "Lebender Webstuhl", + "SkyMill": "Himmelsmühle", + "IceMachine": "Eismaschine", + "BeetleHelmet": "Käferhelm", + "IronBar": "Eisenbarren", + "Sunfury": "Sonnenzorn", + "BeetleScaleMail": "Käferschuppenpanzer", + "BeetleShell": "Käferpanzer", + "BeetleLeggings": "Käfergamaschen", + "SteampunkBoiler": "Steampunkbücherschrank", + "HoneyDispenser": "Honigspender", + "Penguin": "Pinguin", + "PenguinCage": "Pinguinkäfig", + "WormCage": "Wurmkäfig", + "Terrarium": "Terrarium", + "SuperManaPotion": "Supermanatrank", + "Hellforge": "Höllenschmiede", + "EbonwoodFence": "Ebenholzzaun", + "RichMahoganyFence": "Reicher Mahagonizaun", + "PearlwoodFence": "Perlholzzaun", + "ShadewoodFence": "Schattenholzzaun", + "BrickLayer": "Maurer", + "ExtendoGrip": "Langer Arm", + "PaintSprayer": "Farbensprüher", + "PortableCementMixer": "Tragbarer Zementmischer", + "BeetleHusk": "Käferpanzer", + "CelestialMagnet": "Himmlischer Magnet", + "ClayPot": "Tontopf", + "CelestialEmblem": "Himmlisches Abzeichen", + "CelestialCuffs": "Himmlische Handschellen", + "PeddlersHat": "Verkäuferhut", + "PulseBow": "Pulsbogen", + "NaturesGift": "Geschenk der Natur", + "Bed": "Bett", + "Silk": "Seide", + "DynastyTable": "Dynastietisch", + "LesserRestorationPotion": "Schwacher Wiederherstellungstrank", + "DynastyWood": "Dynastieholz", + "RedDynastyShingles": "Rote Dynastieschindeln", + "BlueDynastyShingles": "Blaue Dynastieschindeln", + "WhiteDynastyWall": "Weiße Dynastiewand", + "BlueDynastyWall": "Blaue Dynastiewand", + "DynastyDoor": "Dynastietür", + "Sake": "Sake", + "PadThai": "Pad Thai", + "Pho": "Pho", + "Revolver": "Revolver", + "RestorationPotion": "Wiederherstellungstrank", + "Gatligator": "Gatligator", + "ArcaneRuneWall": "Geheimnisvolle Runenwand", + "WaterGun": "Wasserpistole", + "Katana": "Katana", + "UltrabrightTorch": "Ultrahelle Fackel", + "MagicHat": "Zauberhut", + "DiamondRing": "Diamantring", + "Gi": "Gi", + "Kimono": "Kimono", + "GypsyRobe": "Zigeunerrobe", + "JungleHat": "Dschungelhut", + "BeetleWings": "Käferflügel", + "TigerSkin": "Tigerfell", + "LeopardSkin": "Leopardenfell", + "ZebraSkin": "Zebrafell", + "CrimsonCloak": "Purpurner Umhang", + "MysteriousCape": "Geheimnisvoller Umhang", + "RedCape": "Roter Umhang", + "WinterCape": "Winterumhang", + "WoodFishingPole": "Holzangel", + "JungleShirt": "Dschungelhemd", + "Bass": "Barsch", + "ReinforcedFishingPole": "Verstärkte Angel", + "FiberglassFishingPole": "Glasfaserangel", + "FisherofSouls": "Seelenfischer", + "GoldenFishingRod": "Goldene Angel", + "MechanicsRod": "Mechanikerrute", + "SittingDucksFishingRod": "Lahme-Ente-Angel", + "Trout": "Forelle", + "Salmon": "Lachs", + "AtlanticCod": "Kabeljau", + "Gel": "Glibber", + "JunglePants": "Dschungelhosen", + "Tuna": "Tunfisch", + "RedSnapper": "Roter Schnapper", + "NeonTetra": "Neonsalmler", + "ArmoredCavefish": "Gepanzerter Blindfisch", + "Damselfish": "Demoisellefisch", + "CrimsonTigerfish": "Purpurner Tigerfisch", + "FrostMinnow": "Frostelritze", + "PrincessFish": "Prinzessinnenfisch", + "GoldenCarp": "Goldkarpfen", + "SpecularFish": "Spiegelfisch", + "MoltenHelmet": "Geschmolzener Helm", + "Prismite": "Prismit", + "VariegatedLardfish": "Bunter Schmalzfisch", + "FlarefinKoi": "Leuchtflossenkoi", + "DoubleCod": "Doppeldorsch", + "Honeyfin": "Honigflosse", + "Obsidifish": "Obsidifisch", + "Shrimp": "Shrimp", + "ChaosFish": "Chaosfisch", + "Ebonkoi": "Ebenkoi", + "Hemopiranha": "Hämopriranha", + "MoltenBreastplate": "Geschmolzene Brustplatte", + "Rockfish": "Steinfisch", + "Stinkfish": "Stinkfisch", + "MiningPotion": "Bergbautrank", + "HeartreachPotion": "Herzreichtrank", + "CalmingPotion": "Beruhigungstrank", + "BuilderPotion": "Erbauertrank", + "TitanPotion": "Titantrank", + "FlipperPotion": "Flossentrank", + "SummoningPotion": "Beschwörungstrank", + "TrapsightPotion": "Gefahrensinntrank", + "MoltenGreaves": "Geschmolzene Beinschützer", + "PurpleClubberfish": "Lila Keulenfisch", + "ObsidianSwordfish": "Osidianschwertfisch", + "Swordfish": "Schwertfisch", + "IronFence": "Eisenzaun", + "WoodenCrate": "Holzkiste", + "IronCrate": "Eisenkiste", + "GoldenCrate": "Goldene Kiste", + "OldShoe": "Alter Schuh", + "FishingSeaweed": "Seetang", + "TinCan": "Blechdose", + "MeteorShot": "Meteorenschuss", + "ReaverShark": "Räuberhai", + "SawtoothShark": "Sägezahnhai", + "Minecart": "Lore", + "AmmoReservationPotion": "Munitioneinsparungstrank", + "LifeforcePotion": "Lebenskrafttrank", + "EndurancePotion": "Ausdauertrank", + "RagePotion": "Wuttrank", + "InfernoPotion": "Infernotrank", + "WrathPotion": "Zorntrank", + "StickyBomb": "Haftbombe", + "RecallPotion": "Rückruftrank", + "TeleportationPotion": "Teleporttrank", + "LovePotion": "Liebestrank", + "StinkPotion": "Stinktrank", + "FishingPotion": "Angelertrank", + "SonarPotion": "Sonartrank", + "CratePotion": "Kistentrank", + "ShiverthornSeeds": "Zitterdorn-Saat", + "Shiverthorn": "Zitterdorn", + "WarmthPotion": "Wärmetrank", + "BlackLens": "Schwarze Linsen", + "FishHook": "Angelhaken", + "BeeHeadgear": "Bienenkopfschutz", + "BeeBreastplate": "Bienenbrustpanzer", + "BeeGreaves": "Bienenbeinschützer", + "HornetStaff": "Hornissenstab", + "ImpStaff": "Koboldstab", + "QueenSpiderStaff": "Spinnenköniginnenstab", + "AnglerHat": "Anglerhut", + "AnglerVest": "Anglerweste", + "AnglerPants": "Anglerhose", + "Sunglasses": "Sonnenbrille", + "SpiderMask": "Spinnenmaske", + "SpiderBreastplate": "Spinnenbrustpanzer", + "SpiderGreaves": "Spinnenbeinschützer", + "HighTestFishingLine": "Geprüfte Angelschnur", + "AnglerEarring": "Anglerohrring", + "TackleBox": "Köderkiste", + "BlueDungeonPiano": "Blaues Verliesklavier", + "GreenDungeonPiano": "Grünes Verliesklavier", + "PinkDungeonPiano": "Rosa Verliesklavier", + "GoldenPiano": "Goldenes Klavier", + "WizardHat": "Zaubererhut", + "ObsidianPiano": "Obsidianklavier", + "BonePiano": "Knochenklavier", + "CactusPiano": "Kaktusklavier", + "SpookyPiano": "Schauriges Klavier", + "SkywarePiano": "Himmelswarenklavier", + "LihzahrdPiano": "Lihzahrdklavier", + "BlueDungeonDresser": "Blaue Verlieskommode", + "GreenDungeonDresser": "Grüne Verlieskommode", + "PinkDungeonDresser": "Rosa Verlieskommode", + "GoldenDresser": "Goldene Verlieskommode", + "TopHat": "Zylinderhut", + "ObsidianDresser": "Obsidianverlieskommode", + "BoneDresser": "Knochenkommode", + "CactusDresser": "Kaktuskommode", + "SpookyDresser": "Schaurige Kommode", + "SkywareDresser": "Himmelswarenkommode", + "HoneyDresser": "Honigkommode", + "LihzahrdDresser": "Lihzahrdkommode", + "Sofa": "Sofa", + "EbonwoodSofa": "Ebenholzsofa", + "RichMahoganySofa": "Reiches Mahagonisofa", + "WoodenSword": "Holzschwert", + "TuxedoShirt": "Smokinghemd", + "PearlwoodSofa": "Perlholzsofa", + "ShadewoodSofa": "Schattenholzsofa", + "BlueDungeonSofa": "Blaues Verliessofa", + "GreenDungeonSofa": "Grünes Verliessofa", + "PinkDungeonSofa": "Rosa Verliessofa", + "GoldenSofa": "Goldenes Sofa", + "ObsidianSofa": "Obsidiansofa", + "BoneSofa": "Knochensofa", + "CactusSofa": "Kaktussofa", + "SpookySofa": "Schauriges Sofa", + "TuxedoPants": "Smokinghosen", + "SkywareSofa": "Himmelswarensofa", + "HoneySofa": "Honigsofa", + "SteampunkSofa": "Steampunk-Sofa", + "MushroomSofa": "Pilzsofa", + "GlassSofa": "Glassofa", + "PumpkinSofa": "Kürbissofa", + "LihzahrdSofa": "Lihzahrdsofa", + "SeashellHairpin": "Seemuschelhaarnadel", + "MermaidAdornment": "Meerjungfrauenschmuck", + "MermaidTail": "Meerjungsfrauenschwanzflosse", + "SummerHat": "Sommerhut", + "ZephyrFish": "Zephyrfisch", + "Fleshcatcher": "Fleischfänger", + "HotlineFishingHook": "Heißschnurangel", + "FrogLeg": "Froschschenkel", + "Anchor": "Anker", + "CookedFish": "Gekochter Fisch", + "CookedShrimp": "Gekochter Shrimp", + "Sashimi": "Sashimi", + "BunnyHood": "Hasenkapuze", + "BeeWax": "Bienenwachs", + "CopperPlatingWall": "Kupferüberzugwand", + "StoneSlabWall": "Steingetäfelte Wand", + "Sail": "Segel", + "CoralstoneBlock": "Korallensteinblock", + "BlueJellyfish": "Blauqualle", + "GreenJellyfish": "Grüne Qualle", + "PinkJellyfish": "Pinkqualle", + "BlueJellyfishJar": "Blaue-Quallen-Glas", + "PlumbersHat": "Klempnerhut", + "GreenJellyfishJar": "Grüne-Quallen-Glas", + "PinkJellyfishJar": "Rosa-Quallen-Glas", + "PlumbersShirt": "Klempnerhemd", + "Batfish": "Fledermausfisch", + "BumblebeeTuna": "Hummeltunfisch", + "Catfish": "Katzenfisch", + "Cloudfish": "Wolkenfisch", + "Cursedfish": "Fluchfisch", + "Dirtfish": "Dreckfisch", + "DynamiteFish": "Dynamitfisch", + "EaterofPlankton": "Planktonfresser", + "FallenStarfish": "Sternschnuppenfisch", + "TheFishofCthulu": "Der Fisch von Cthulhu", + "PlumbersPants": "Klempnerhosen", + "Fishotron": "Fischotron", + "Harpyfish": "Harpyienfisch", + "Hungerfish": "Hungerfisch", + "Ichorfish": "Ichorfisch", + "Jewelfish": "Juwelenfisch", + "MirageFish": "Trugbildfisch", + "MutantFlinxfin": "Mutantenflinxflosse", + "Pengfish": "Pengfisch", + "Pixiefish": "Pixiefisch", + "Spiderfish": "Spinnenfisch", + "HerosHat": "Heldenhut", + "TundraTrout": "Tundraforelle", + "UnicornFish": "Einhornfisch", + "GuideVoodooFish": "Fremdenführer-Vodoofisch", + "Wyverntail": "Lindwurmschwanz", + "ZombieFish": "Zombiefisch", + "AmanitaFungifin": "Amanita-Pilzflosse", + "Angelfish": "Engelsfisch", + "BloodyManowar": "Blutige Galeere", + "Bonefish": "Knochenfisch", + "Bunnyfish": "Hasenfisch", + "HerosShirt": "Heldenhemd", + "CapnTunabeard": "Käpt‘n Tunfischbart", + "Clownfish": "Clownfisch", + "DemonicHellfish": "Dämonischer Höllenfisch", + "Derpfish": "Derpfisch", + "Fishron": "Fischron", + "InfectedScabbardfish": "Infizierter Schneidefisch", + "Mudfish": "Schlickfisch", + "Slimefish": "Schleimfisch", + "TropicalBarracuda": "Tropischer Barrakuda", + "KingSlimeTrophy": "Königsschleimtrophäe", + "HerosPants": "Heldenhosen", + "ShipInABottle": "Buddelschiff", + "KingSlimeMask": "Königsschleimmaske", + "FinWings": "Flossenflügel", + "TreasureMap": "Schatzkarte", + "SeaweedPlanter": "Seetangtopf", + "PillaginMePixels": "Pixelplunder", + "FishCostumeMask": "Fischkostüm-Maske", + "FishCostumeShirt": "Fischkostüm-Hemd", + "WoodenDoor": "Holztür", + "FishBowl": "Fischglas", + "FishCostumeFinskirt": "Fischkostüm-Flossenrock", + "GingerBeard": "Ingwerbart", + "ArchaeologistsHat": "Archäologenhut", + "ArchaeologistsJacket": "Archäologenjacke", + "ArchaeologistsPants": "Archäologenhosen", + "OpticStaff": "Optischer Stab", + "BlackThread": "Schwarzer Faden", + "GreenThread": "Grüner Faden", + "NinjaHood": "Ninja-Kapuze", + "NinjaShirt": "Ninjahemd", + "NinjaPants": "Ninjahosen", + "Leather": "Leder", + "StoneWall": "Steinwand", + "RedHat": "Roter Hut", + "Goldfish": "Goldfisch", + "Robe": "Robe", + "RobotHat": "Roboterhut", + "GoldCrown": "Goldkrone", + "HellfireArrow": "Höllenfeuerpfeil", + "Sandgun": "Sandgewehr", + "GuideVoodooDoll": "Fremdenführer-Voodoopuppe", + "DivingHelmet": "Taucherhelm", + "FamiliarShirt": "Vertrautes Hemd", + "Acorn": "Eichel", + "FamiliarPants": "Vertraute Hose", + "FamiliarWig": "Vertraute Frisur", + "DemonScythe": "Dämonensense", + "NightsEdge": "Klinge der Nacht", + "DarkLance": "Finstere Lanze", + "Coral": "Koralle", + "Cactus": "Kaktus", + "Trident": "Dreizack", + "SilverBullet": "Silbergeschoss", + "ThrowingKnife": "Wurfmesser", + "LesserHealingPotion": "Schwacher Heiltrank", + "Spear": "Speer", + "Blowpipe": "Blasrohr", + "Glowstick": "Leuchtstab", + "Seed": "Samen", + "WoodenBoomerang": "Holzbumerang", + "Aglet": "Schnürsenkelkappe", + "StickyGlowstick": "Klebriger Leuchtstab", + "PoisonedKnife": "Vergiftetes Messer", + "ObsidianSkinPotion": "Obsidianhaut-Trank", + "RegenerationPotion": "Wiederbelebungstrank", + "AngryTrapperBanner": "Wütender-Trapper-Banner", + "ArmoredVikingBanner": "Gepanzerter-Wikinger-Banner", + "BlackSlimeBanner": "Schwarzer-Schleim-Banner", + "LifeCrystal": "Lebenskristall", + "SwiftnessPotion": "Flinkheitstrank", + "BlueArmoredBonesBanner": "Blaue-Gepanzerte-Knochen-Banner", + "BlueCultistArcherBanner": "Blauer-Kultistenbogenschütze-Banner", + "ManaCloakStar": "", + "BlueCultistFighterBanner": "Blauer-Kultistenkrieger-Banner", + "BoneLeeBanner": "Bone Lee-Banner", + "ClingerBanner": "Klettenbanner", + "CochinealBeetleBanner": "Koschenillenkäfer-Banner", + "CorruptPenguinBanner": "Verderbter-Pinguin-Banner", + "CorruptSlimeBanner": "Verderbter-Schleim-Banner", + "CorruptorBanner": "Verderberbanner", + "GillsPotion": "Kiementrank", + "CrimslimeBanner": "Purpurschleimbanner", + "CursedSkullBanner": "Verfluchter-Schädel-Banner", + "CyanBeetleBanner": "Zyankäfer-Banner", + "DevourerBanner": "Verschlingerbanner", + "DiablolistBanner": "Satanistbanner", + "DoctorBonesBanner": "Doktor-Bones-Banner", + "DungeonSlimeBanner": "Verliesschleim-Banner", + "DungeonSpiritBanner": "Verliesgeistbanner", + "ElfArcherBanner": "Elfenbogenschützen-Banner", + "ElfCopterBanner": "Elfkopter-Banner", + "IronskinPotion": "Eisenhaut-Trank", + "EyezorBanner": "Schandfleckbanner", + "FlockoBanner": "Flockobanner", + "GhostBanner": "Geisterbanner", + "GiantBatBanner": "Riesenfledermausbanner", + "GiantCursedSkullBanner": "Riesiger-Verfluchter-Schädel-Banner", + "GiantFlyingFoxBanner": "Riesiger-Fliegender-Fuchs-Banner", + "GingerbreadManBanner": "Lebkuchenmann-Banner", + "GoblinArcherBanner": "Goblin-Bogenschützen-Banner", + "GreenSlimeBanner": "Grüner-Schleim-Banner", + "HeadlessHorsemanBanner": "Kopfloser-Reiter-Banner", + "ManaRegenerationPotion": "Mana-Wiederherstellungstrank", + "HellArmoredBonesBanner": "Höllisch-Gepanzerte-Knochen-Banner", + "HellhoundBanner": "Höllenhundbanner", + "HoppinJackBanner": "Hüpfender-Kürbis-Banner", + "IceBatBanner": "Eisfledermausbanner", + "IceGolemBanner": "Eisgolembanner", + "IceSlimeBanner": "Eisschleimbanner", + "IchorStickerBanner": "Ichor-Sticker-Banner", + "IlluminantBatBanner": "Leuchtfledermausbanner", + "IlluminantSlimeBanner": "Leuchtender-Schleim-Banner", + "JungleBatBanner": "Dschungelfledermausbanner", + "MagicPowerPotion": "Magiekraft-Trank", + "JungleSlimeBanner": "Dschungelschleimbanner", + "KrampusBanner": "Krampusbanner", + "LacBeetleBanner": "Lackkäfer-Banner", + "LavaBatBanner": "Lavafledermausbanner", + "LavaSlimeBanner": "Lavaschleimbanner", + "MartianBrainscramblerBanner": "Marsianer-Verwirrer-Banner", + "MartianDroneBanner": "Marsianer-Drohne-Banner", + "MartianEngineerBanner": "Marsianer-Ingenieur-Banner", + "MartianGigazapperBanner": "Marsianer-Gigazapper-Banner", + "MartianGreyGruntBanner": "Marsianer-Graugrunzer-Banner", + "FeatherfallPotion": "Federsturz-Trank", + "MartianOfficerBanner": "Marsianer-Offizier-Banner", + "MartianRaygunnerBanner": "Marsianer-Strahlenschütze-Banner", + "MartianScutlixGunnerBanner": "Marsianer-Scutlixschütze-Banner", + "MartianTeslaTurretBanner": "Marsianer-Teslakanonenturm-Banner", + "MisterStabbyBanner": "Herr-Stabby-Banner", + "MotherSlimeBanner": "Mutterschleimbanner", + "NecromancerBanner": "Totenbeschwörerbanner", + "NutcrackerBanner": "Nussknackerbanner", + "PaladinBanner": "Paladinbanner", + "PenguinBanner": "Pinguinbanner", + "SpelunkerPotion": "Höhlenforschertrank", + "PinkyBanner": "Pinky-Banner", + "PoltergeistBanner": "Poltergeistbanner", + "PossessedArmorBanner": "Geisterrüstungbanner", + "PresentMimicBanner": "Geschenk-Mimic-Banner", + "PurpleSlimeBanner": "Lila-Schleim-Banner", + "RaggedCasterBanner": "Zerlumpter-Zauberer-Banner", + "RainbowSlimeBanner": "Regenbogenschleimbanner", + "RavenBanner": "Rabenbanner", + "RedSlimeBanner": "Roter-Schleim-Banner", + "RuneWizardBanner": "Runenzaubererbanner", + "InvisibilityPotion": "Unsichtbarkeitstrank", + "RustyArmoredBonesBanner": "Rostige-Gepanzerte-Knochen-Banner", + "ScarecrowBanner": "Vogelscheuchenbanner", + "ScutlixBanner": "Scutlix-Banner", + "SkeletonArcherBanner": "Skelettbogenschützenbanner", + "SkeletonCommandoBanner": "Skelettkommandobanner", + "SkeletonSniperBanner": "Skelettsniperbanner", + "SlimerBanner": "Schleimerbanner", + "SnatcherBanner": "Schnapperbanner", + "SnowBallaBanner": "Schnee-Balla-Banner", + "SnowmanGangstaBanner": "Ganster-Schneemann-Banner", + "ShinePotion": "Strahlentrank", + "SpikedIceSlimeBanner": "Gespickter-Eisschleim-Banner", + "SpikedJungleSlimeBanner": "Gespickter-Dschungelchleim-Banner", + "SplinterlingBanner": "Splitterlingbanner", + "SquidBanner": "Tintenfischbanner", + "TacticalSkeletonBanner": "Taktisches-Skelett-Banner", + "TheGroomBanner": "Bräutigambanner", + "TimBanner": "Tim-Banner", + "UndeadMinerBanner": "Untoter-Minenarbeiter-Banner", + "UndeadVikingBanner": "Untoter-Wikinger-Banner", + "WhiteCultistArcherBanner": "Weißer-Kultistenbogenschütze-Banner", + "NightOwlPotion": "Nachteulentrank", + "WhiteCultistCasterBanner": "Weißer-Kultistenmagier-Banner", + "WhiteCultistFighterBanner": "Weißer-Kultistenkämpfer-Banner", + "YellowSlimeBanner": "Gelber-Schleim-Banner", + "YetiBanner": "Yetibanner", + "ZombieElfBanner": "Zombie-Elf-Banner", + "StoneBlock": "Steinblock", + "DirtWall": "Dreckwand", + "BattlePotion": "Kampftrank", + "ThornsPotion": "Dornentrank", + "WaterWalkingPotion": "Wasserlauftrank", + "ArcheryPotion": "Bogenschießtrank", + "HunterPotion": "Jägertrank", + "GravitationPotion": "Gravitationstrank", + "GoldChest": "Goldtruhe", + "DaybloomSeeds": "Tagesblumen-Saat", + "MoonglowSeeds": "Mondschein-Saat", + "BlinkrootSeeds": "Leuchtwurzel-Saat", + "Bottle": "Flasche", + "DeathweedSeeds": "Todeskraut-Saat", + "WaterleafSeeds": "Wasserblatt-Saat", + "FireblossomSeeds": "Feuerblüten-Saat", + "Daybloom": "Tagesblume", + "Moonglow": "Mondglanz", + "Blinkroot": "Leuchtwurzel", + "Deathweed": "Todeskraut", + "Waterleaf": "Wasserblatt", + "Fireblossom": "Feuerblüte", + "SharkFin": "Haifinne", + "WoodenTable": "Holztisch", + "Feather": "Feder", + "Tombstone": "Grabstein", + "MimeMask": "Pantomimen-Maske", + "AntlionMandible": "Ameisenlöwenkiefer", + "IllegalGunParts": "Illegale Gewehrteile", + "TheDoctorsShirt": "Hemd des Arztes", + "TheDoctorsPants": "Hosen des Arztes", + "GoldenKey": "Goldener Schlüssel", + "ShadowChest": "Schattentruhe", + "ShadowKey": "Schattenschlüssel", + "Furnace": "Schmelzofen", + "ObsidianBrickWall": "Obsidianziegelwand", + "JungleSpores": "Dschungelsporen", + "Loom": "Webstuhl", + "Piano": "Piano", + "Dresser": "Kommode", + "Bench": "Sitzbank", + "Bathtub": "Badewanne", + "RedBanner": "Rotes Banner", + "GreenBanner": "Grünes Banner", + "BlueBanner": "Blaues Banner", + "WoodenChair": "Holzstuhl", + "YellowBanner": "Gelbes Banner", + "LampPost": "Laternenpfahl", + "TikiTorch": "Petroleumfackel", + "Barrel": "Fass", + "ChineseLantern": "Chinesische Laterne", + "CookingPot": "Kochtopf", + "Safe": "Tresor", + "SkullLantern": "Schädellaterne", + "TrashCan": "Mülleimer", + "PlatinumBow": "Platinbogen", + "PlatinumHammer": "Platinhammer", + "PlatinumAxe": "Platinaxt", + "PlatinumShortsword": "Platinkurzschwert", + "PlatinumBroadsword": "Platinbreitschwert", + "PlatinumPickaxe": "Platinspitzhacke", + "TungstenBow": "Wolframbogen", + "TungstenHammer": "Wolframhammer", + "TungstenAxe": "Wolframaxt", + "TungstenShortsword": "Wolframkurzschwert", + "Candelabra": "Kandelaber", + "TungstenBroadsword": "Wolframbreitschwert", + "TungstenPickaxe": "Wolframspitzhacke", + "LeadBow": "Bleibogen", + "LeadHammer": "Bleihammer", + "LeadAxe": "Bleiaxt", + "LeadShortsword": "Bleikurzschwert", + "LeadBroadsword": "Bleibreitschwert", + "LeadPickaxe": "Bleispitzhacke", + "TinBow": "Zinnbogen", + "TinHammer": "Zinnhammer", + "IronAnvil": "Eisenamboss", + "PinkVase": "Rosa Vase", + "TinAxe": "Zinnaxt", + "TinShortsword": "Zinnkurzschwert", + "TinBroadsword": "Zinnbreitschwert", + "TinPickaxe": "Zinnspitzhacke", + "CopperBow": "Kupferbogen", + "CopperHammer": "Kupferhammer", + "CopperAxe": "Kupferaxt", + "CopperShortsword": "Kupferkurzschwert", + "CopperBroadsword": "Kupferbreitschwert", + "CopperPickaxe": "Kupferspitzhacke", + "Mug": "Krug", + "SilverBow": "Silberbogen", + "SilverHammer": "Silberhammer", + "SilverAxe": "Silberaxt", + "SilverShortsword": "Silberkurzschwert", + "SilverBroadsword": "Silberbreitschwert", + "SilverPickaxe": "Silberspitzhacke", + "GoldBow": "Goldbogen", + "GoldHammer": "Goldhammer", + "GoldAxe": "Goldaxt", + "GoldShortsword": "Goldkurzschwert", + "Keg": "Gärbottich", + "GoldBroadsword": "Goldbreitschwert", + "GoldPickaxe": "Goldspitzhacke", + "Ale": "Bier", + "Bookcase": "Bücherregal", + "Throne": "Thron", + "Bowl": "Schüssel", + "BowlofSoup": "Schüssel mit Suppe", + "Toilet": "Toilette", + "GrandfatherClock": "Standuhr", + "WorkBench": "Werkbank", + "ArmorStatue": "Rüstungsstatue", + "GoblinBattleStandard": "Goblin-Kampfstandarte", + "TatteredCloth": "Zerfetzter Stoff", + "Sawmill": "Sägewerk", + "CobaltOre": "Kobalterz", + "MythrilOre": "Mithrilerz", + "AdamantiteOre": "Adamantiterz", + "Pwnhammer": "Pwnhammer", + "Excalibur": "Excalibur", + "HallowedSeeds": "Heilige Saat", + "Goggles": "Schutzbrille", + "EbonsandBlock": "Ebensandblock", + "CobaltHat": "Kobalthut", + "CobaltHelmet": "Kobalthelm", + "CobaltMask": "Kobalt-Maske", + "CobaltBreastplate": "Kobalt-Brustplatte", + "CobaltLeggings": "Kobalt-Gamaschen", + "MythrilHood": "Mithril-Kapuze", + "MythrilHelmet": "Mithril-Helm", + "MythrilHat": "Mithrilhut", + "MythrilChainmail": "Mithril-Kettenhemd", + "Lens": "Linse", + "MythrilGreaves": "Mithril-Beinschützer", + "CobaltBar": "Kobaltbarren", + "MythrilBar": "Mithrilbarren", + "CobaltChainsaw": "Kobalt-Kettensäge", + "MythrilChainsaw": "Mythrill-Kettensäge", + "CobaltDrill": "Kobalt-Bohrer", + "MythrilDrill": "Mythrill-Bohrer", + "AdamantiteChainsaw": "Adamant-Kettensäge", + "AdamantiteDrill": "Adamant-Bohrer", + "DaoofPow": "Dao von Pow", + "WoodenBow": "Holzbogen", + "MythrilHalberd": "Mythrill-Hellebarde", + "AdamantiteBar": "Adamantitbarren", + "GlassWall": "Glaswand", + "Compass": "Kompass", + "DivingGear": "Tauchausrüstung", + "GPS": "GPS", + "ObsidianHorseshoe": "Obsidian-Hufeisen", + "ObsidianShield": "Obsidianschild", + "TinkerersWorkshop": "Tüftler-Werkstatt", + "CloudinaBalloon": "Wolke in einem Ballon", + "IronBroadsword": "Eisenbreitschwert", + "WoodenArrow": "Holzpfeil", + "AdamantiteHeadgear": "Adamantit-Kopfschutz", + "AdamantiteHelmet": "Adamantit-Helm", + "AdamantiteMask": "Adamantit-Maske", + "AdamantiteBreastplate": "Adamantit-Brustplatte", + "AdamantiteLeggings": "Adamantit-Gamaschen", + "SpectreBoots": "Geisterstiefel", + "AdamantiteGlaive": "Adamant-Glefe", + "Toolbelt": "Werkzeuggürtel", + "PearlsandBlock": "Perlsandblock", + "PearlstoneBlock": "Perlsteinblock", + "FlamingArrow": "Flammenpfeil", + "MiningShirt": "Bergbauhemd", + "MiningPants": "Bergbauhosen", + "PearlstoneBrick": "Perlsteinziegel", + "IridescentBrick": "Schillernder Ziegel", + "MudstoneBlock": "Schlammsteinziegel", + "CobaltBrick": "Kobaltziegel", + "MythrilBrick": "Mithrilziegel", + "PearlstoneBrickWall": "Perlstein-Ziegelwand", + "IridescentBrickWall": "Schillernde Ziegelwand", + "MudstoneBrickWall": "Schlammstein-Ziegelwand", + "Shuriken": "Wurfstern", + "CobaltBrickWall": "Kobalt-Ziegelwand", + "MythrilBrickWall": "Mithril-Ziegelwand", + "HolyWater": "Heiliges Wasser", + "UnholyWater": "Unheiliges Wasser", + "SiltBlock": "Schlickblock", + "FairyBell": "Feenglocke", + "BreakerBlade": "Schmetterklinge", + "BlueTorch": "Blaue Fackel", + "RedTorch": "Rote Fackel", + "GreenTorch": "Grüne Fackel", + "SuspiciousLookingEye": "Verdächtig aussehendes Auge", + "PurpleTorch": "Lila Fackel", + "WhiteTorch": "Weiße Fackel", + "YellowTorch": "Gelbe Fackel", + "DemonTorch": "Dämonenfackel", + "ClockworkAssaultRifle": "Automatiksturmwaffe", + "CobaltRepeater": "Kobaltrepetierer", + "MythrilRepeater": "Mithrilrepetierer", + "DualHook": "Doppel-Greifhaken", + "StarStatue": "Sternstatue", + "SwordStatue": "Schwertstatue", + "DemonBow": "Dämonenbogen", + "SlimeStatue": "Schleimstatue", + "GoblinStatue": "Goblinstatue", + "ShieldStatue": "Schildstatue", + "BatStatue": "Fledermausstatue", + "FishStatue": "Fischstatue", + "BunnyStatue": "Hasenstatue", + "SkeletonStatue": "Skelettstatue", + "ReaperStatue": "Sensenmannstatue", + "WomanStatue": "Frauenstatue", + "ImpStatue": "Koboldstatue", + "WarAxeoftheNight": "Kriegsaxt der Nacht", + "GargoyleStatue": "Wasserspeier-Statue", + "GloomStatue": "Vanitasstatue", + "HornetStatue": "Hornissenstatue", + "BombStatue": "Bombenstatue", + "CrabStatue": "Krabbenstatue", + "HammerStatue": "Hammerstatue", + "PotionStatue": "Trankstatue", + "SpearStatue": "Speerstatue", + "CrossStatue": "Kreuzstatue", + "JellyfishStatue": "Quallenstatue", + "LightsBane": "Schrecken des Tages", + "BowStatue": "Bogenstatue", + "BoomerangStatue": "Bumerangstatue", + "BootStatue": "Stiefelstatue", + "ChestStatue": "Truhenstatue", + "BirdStatue": "Vogelstatue", + "AxeStatue": "Axtstatue", + "CorruptStatue": "Verderbnisstatue", + "TreeStatue": "Baumstatue", + "AnvilStatue": "Amboss-Statue", + "PickaxeStatue": "Spitzhackenstatue", + "UnholyArrow": "Unheiliger Pfeil", + "MushroomStatue": "Pilzstatue", + "EyeballStatue": "Augapfelstatue", + "PillarStatue": "Säulenstatue", + "HeartStatue": "Herzstatue", + "PotStatue": "Topfstatue", + "SunflowerStatue": "Sonnenblumenstatue", + "KingStatue": "Königstatue", + "QueenStatue": "Königinstatue", + "PiranhaStatue": "Piranhastatue", + "PlankedWall": "Plankenwand", + "Chest": "Truhe", + "WoodenBeam": "Holzbalken", + "AdamantiteRepeater": "Adamantitrepetierer", + "AdamantiteSword": "Adamantitschwert", + "CobaltSword": "Kobaltschwert", + "MythrilSword": "Mithrilschwert", + "MoonCharm": "Mondzauber", + "Ruler": "Lineal", + "CrystalBall": "Kristallkugel", + "DiscoBall": "Diskokugel", + "SorcererEmblem": "Siegel des Magiers", + "BandofRegeneration": "Wiederbelebungsband", + "WarriorEmblem": "Siegel des Kriegers", + "RangerEmblem": "Siegel des Bogenschützen", + "DemonWings": "Dämonenflügel", + "AngelWings": "Engelsflügel", + "MagicalHarp": "Magische Harfe", + "RainbowRod": "Regenbogenrute", + "IceRod": "Eisrute", + "NeptunesShell": "Neptuns Muschel", + "Mannequin": "Schaufensterpuppe", + "GreaterHealingPotion": "Großer Heiltrank", + "Mushroom": "Pilz", + "MagicMirror": "Magischer Spiegel", + "GreaterManaPotion": "Großer Manatrank", + "PixieDust": "Pixie-Staub", + "CrystalShard": "Kristallsplitter", + "ClownHat": "Clownshut", + "ClownShirt": "Clownshemd", + "ClownPants": "Clownshosen", + "Flamethrower": "Flammenwerfer", + "Bell": "Glocke", + "Harp": "Harfe", + "Wrench": "Roter Schraubenschlüssel", + "JestersArrow": "Narrenpfeil", + "WireCutter": "Kabelcutter", + "ActiveStoneBlock": "Aktiver Steinblock", + "InactiveStoneBlock": "Inaktiver Steinblock", + "Lever": "Hebel", + "LaserRifle": "Lasergewehr", + "CrystalBullet": "Kristallpatrone", + "HolyArrow": "Heiliger Pfeil", + "MagicDagger": "Magischer Dolch", + "CrystalStorm": "Kristallsturm", + "CursedFlames": "Verfluchte Flammen", + "AngelStatue": "Engelsstatue", + "SoulofLight": "Seele des Lichts", + "SoulofNight": "Seele der Nacht", + "CursedFlame": "Verfluchte Flamme", + "CursedTorch": "Verfluchte Fackel", + "AdamantiteForge": "Adamantitschmiede", + "MythrilAnvil": "Mithrilamboss", + "UnicornHorn": "Horn des Einhorns", + "DarkShard": "Dunkle Scherbe", + "LightShard": "Lichtscherbe", + "RedPressurePlate": "Rote Druckplatte", + "CloudinaBottle": "Wolke in einer Flasche", + "Wire": "Kabel", + "SpellTome": "Buch der Flüche", + "StarCloak": "Sternenumhang", + "Megashark": "Maxihai", + "Shotgun": "Schrotflinte", + "PhilosophersStone": "Stein der Weisen", + "TitanGlove": "Titanhandschuh", + "CobaltNaginata": "Kobalt-Naginata", + "Switch": "Schalter", + "DartTrap": "Pfeilfalle", + "HermesBoots": "Hermes-Stiefel", + "Boulder": "Felsen", + "GreenPressurePlate": "Grüne Druckplatte", + "GrayPressurePlate": "Graue Druckplatte", + "BrownPressurePlate": "Braune Druckplatte", + "MechanicalEye": "Mechanisches Auge", + "CursedArrow": "Verfluchter Pfeil", + "CursedBullet": "Verfluchte Patrone", + "SoulofFright": "Seele des Schreckens", + "SoulofMight": "Seele der Macht", + "SoulofSight": "Seele der Einsicht", + "EnchantedBoomerang": "Verzauberter Bumerang", + "Gungnir": "Gungnir", + "HallowedPlateMail": "Heiliger Plattenpanzer", + "HallowedGreaves": "Heilige Beinschützer", + "HallowedHelmet": "Heiliger Helm", + "CrossNecklace": "Kreuzhalskette", + "ManaFlower": "Mana-Blume", + "MechanicalWorm": "Mechanischer Wurm", + "MechanicalSkull": "Mechanischer Schädel", + "HallowedHeadgear": "Heiliger Kopfschutz", + "HallowedMask": "Heilige Maske", + "DemoniteOre": "Dämoniterz", + "SlimeCrown": "Schleimkrone", + "LightDisc": "Lichtscheibe", + "MusicBoxOverworldDay": "Spieluhr (Tag in der Oberwelt)", + "MusicBoxEerie": "Spieluhr (Gespenstisch)", + "MusicBoxNight": "Spieluhr (Nacht)", + "MusicBoxTitle": "Spieluhr (Titel)", + "MusicBoxUnderground": "Spieluhr (Untergrund)", + "MusicBoxBoss1": "Spieluhr (Boss 1)", + "MusicBoxJungle": "Spieluhr (Dschungel)", + "MusicBoxCorruption": "Spieluhr (Verderben)", + "DemoniteBar": "Dämonitbarren", + "MusicBoxUndergroundCorruption": "Spieluhr (Untergrund-Verderben)", + "MusicBoxTheHallow": "Spieluhr (Das Heilige)", + "MusicBoxBoss2": "Spieluhr (Boss 2)", + "MusicBoxUndergroundHallow": "Spieluhr (Untergrund-Heiliges)", + "MusicBoxBoss3": "Spieluhr (Boss 3)", + "SoulofFlight": "Seele des Flugs", + "MusicBox": "Spieluhr", + "DemoniteBrick": "Dämonitziegel", + "HallowedRepeater": "Heiliger Repetierer", + "Drax": "Drax", + "Heart": "Herz", + "Explosives": "Sprengstoff", + "InletPump": "Einlasspumpe", + "OutletPump": "Auslasspumpe", + "Timer1Second": "1-Sekunden-Timer", + "Timer3Second": "3-Sekunden-Timer", + "Timer5Second": "5-Sekunden-Timer", + "CandyCaneBlock": "Candy Cane-Block", + "CandyCaneWall": "Candy Cane-Wand", + "SantaHat": "Weihnachtsmütze", + "SantaShirt": "Weihnachtshemd", + "CorruptSeeds": "Verderbte Saat", + "SantaPants": "Weihnachtshose", + "GreenCandyCaneBlock": "Grüner Candy Cane-Block", + "GreenCandyCaneWall": "Grüne Candy Cane-Wand", + "SnowBlock": "Schnee-Block", + "SnowBrick": "Schneeziegel", + "SnowBrickWall": "Schnee-Ziegelwand", + "BlueLight": "Blaues Licht", + "RedLight": "Rotes Licht", + "GreenLight": "Grünes Licht", + "BluePresent": "Blaues Geschenk", + "IronShortsword": "Eisenkurzschwert", + "VileMushroom": "Ekelpilz", + "GreenPresent": "Grünes Geschenk", + "YellowPresent": "Gelbes Geschenk", + "SnowGlobe": "Schneekugel", + "Carrot": "Karotte", + "AdamantiteBeam": "Adamantitbalken", + "AdamantiteBeamWall": "Adamantit-Balkenwand", + "DemoniteBrickWall": "Dämonit-Ziegelwand", + "SandstoneBrick": "Sandsteinziegel", + "SandstoneBrickWall": "Sandstein-Ziegelwand", + "EbonstoneBrick": "Ebensteinziegel", + "EbonstoneBlock": "Ebensteinblock", + "EbonstoneBrickWall": "Ebenstein-Ziegelwand", + "RedStucco": "Roter Stuck", + "YellowStucco": "Gelber Stuck", + "GreenStucco": "Grüner Stuck", + "GrayStucco": "Grauer Stuck", + "RedStuccoWall": "Rote Stuckwand", + "YellowStuccoWall": "Gelbe Stuckwand", + "GreenStuccoWall": "Grüne Stuckwand", + "GrayStuccoWall": "Graue Stuckwand", + "Ebonwood": "Ebenholz", + "GrassSeeds": "Grassaat", + "RichMahogany": "Reiches Mahagoni", + "Pearlwood": "Perlholz", + "EbonwoodWall": "Ebenholzwand", + "RichMahoganyWall": "Reiche Mahagoniwand", + "PearlwoodWall": "Perlholzwand", + "EbonwoodChest": "Ebenholztruhe", + "RichMahoganyChest": "Reiche Mahagonitruhe", + "PearlwoodChest": "Perlholztruhe", + "EbonwoodChair": "Ebenholzstuhl", + "RichMahoganyChair": "Reicher Mahagonistuhl", + "Sunflower": "Sonnenblume", + "PearlwoodChair": "Perlholzstuhl", + "EbonwoodPlatform": "Ebenholzklappe", + "RichMahoganyPlatform": "Reiche Mahagoniklappe", + "PearlwoodPlatform": "Perlholzklappe", + "BonePlatform": "Knochenklappe", + "EbonwoodWorkBench": "Ebenholzwerkbank", + "RichMahoganyWorkBench": "Reiche Mahagoniwerkbank", + "PearlwoodWorkBench": "Perlholzwerkbank", + "EbonwoodTable": "Ebenholztisch", + "RichMahoganyTable": "Reicher Mahagonitisch", + "Vilethorn": "Ekeldorn", + "PearlwoodTable": "Perlholztisch", + "EbonwoodPiano": "Ebenholzklavier", + "RichMahoganyPiano": "Reiches Mahagoniklavier", + "PearlwoodPiano": "Perlholzklavier", + "EbonwoodBed": "Ebenholzbett", + "RichMahoganyBed": "Reiches Mahagonibett", + "PearlwoodBed": "Perlholzbett", + "EbonwoodDresser": "Ebenholzkommode", + "RichMahoganyDresser": "Reiche Mahagonikommode", + "PearlwoodDresser": "Perlholzkommode", + "Starfury": "Sternenwut", + "EbonwoodDoor": "Ebenholztür", + "RichMahoganyDoor": "Reiche Mahagonitür", + "PearlwoodDoor": "Perlholztür", + "EbonwoodSword": "Ebenholzschwert", + "EbonwoodHammer": "Ebenholzhammer", + "EbonwoodBow": "Ebenholzbogen", + "RichMahoganySword": "Reiches Mahagonischwert", + "RichMahoganyHammer": "Reicher Mahagonihammer", + "RichMahoganyBow": "Reicher Mahagonibogen", + "PearlwoodSword": "Perlholzschwert", + "PurificationPowder": "Läuterungspulver", + "PearlwoodHammer": "Perlholzhammer", + "PearlwoodBow": "Perlholzbogen", + "RainbowBrick": "Regenbogenziegel", + "RainbowBrickWall": "Regenbogen-Ziegelwand", + "IceBlock": "Eisklotz", + "RedsWings": "Reds Flügel", + "RedsHelmet": "Reds Helm", + "RedsBreastplate": "Reds Brustplatte", + "RedsLeggings": "Reds Gamaschen", + "Fish": "Fisch", + "VilePowder": "Ekelpulver", + "IceBoomerang": "Eisbumerang", + "Keybrand": "Schlüsselbrand", + "Cutlass": "Entermesser", + "TrueExcalibur": "Das wahre Excalibur", + "TrueNightsEdge": "Die wahre Klinge der Nacht", + "Frostbrand": "Gefrierbrand", + "RedPotion": "Roter Trank", + "TacticalShotgun": "Taktische Schrotflinte", + "RottenChunk": "Verfaulter Fleischbrocken", + "IvyChest": "Efeutruhe", + "Marrow": "Mark", + "UnholyTrident": "Unheiliger Dreizack", + "FrostHelmet": "Frosthelm", + "FrostBreastplate": "Frost-Brustplatte", + "FrostLeggings": "Frostgamaschen", + "TinHelmet": "Zinnhelm", + "TinChainmail": "Zinnkettenhemd", + "TinGreaves": "Zinnbeinschützer", + "WormTooth": "Wurmzahn", + "LeadHelmet": "Bleihelm", + "LeadChainmail": "Bleikettenhemd", + "LeadGreaves": "Bleibeinschützer", + "TungstenHelmet": "Wolframhelm", + "TungstenChainmail": "Wolframkettenhemd", + "TungstenGreaves": "Wolframbeinschützer", + "PlatinumHelmet": "Platinhelm", + "PlatinumChainmail": "Platinkettenhemd", + "PlatinumGreaves": "Platinbeinschützer", + "TinOre": "Zinnerz", + "IronHammer": "Eisenhammer", + "WormFood": "Wurmköder", + "LeadOre": "Bleierz", + "TungstenOre": "Wolframerz", + "PlatinumOre": "Platinerz", + "TinBar": "Zinnbarren", + "LeadBar": "Bleibarren", + "TungstenBar": "Wolframbarren", + "PlatinumBar": "Platinbarren", + "TinWatch": "Zinnuhr", + "TungstenWatch": "Wolframuhr", + "PlatinumWatch": "Platinuhr", + "CopperCoin": "Kupfermünze", + "TinChandelier": "Zinnkronleuchter", + "TungstenChandelier": "Wolframkronleuchter", + "PlatinumChandelier": "Platinkronleuchter", + "PlatinumCandle": "Platinkerze", + "PlatinumCandelabra": "Platinkandelaber", + "PlatinumCrown": "Platinkrone", + "LeadAnvil": "Bleiamboss", + "TinBrick": "Zinnziegel", + "TungstenBrick": "Wolframziegel", + "PlatinumBrick": "Platinziegel", + "SilverCoin": "Silbermünze", + "TinBrickWall": "Zinn-Ziegelwand", + "TungstenBrickWall": "Wolfram-Ziegelwand", + "PlatinumBrickWall": "Platin-Ziegelwand", + "BeamSword": "Strahlenschwert", + "IceBlade": "Eisklinge", + "IceBow": "Eisbogen", + "FrostStaff": "Froststab", + "WoodHelmet": "Holz-Helm", + "WoodBreastplate": "Holz-Brustpanzer", + "WoodGreaves": "Holz-Beinschienen", + "GoldCoin": "Goldmünze", + "EbonwoodHelmet": "Ebenholzhelm", + "EbonwoodBreastplate": "Ebenholzbrustplatte", + "EbonwoodGreaves": "Ebenholzgamaschen", + "RichMahoganyHelmet": "Reicher Mahagonihelm", + "RichMahoganyBreastplate": "Reiche Mahagonibrustplatte", + "RichMahoganyGreaves": "Reiche Mahagonigamaschen", + "PearlwoodHelmet": "Perlholzhelm", + "PearlwoodBreastplate": "Perlholzbrustplatte", + "PearlwoodGreaves": "Perlholzgamaschen", + "AmethystStaff": "Amethyststab", + "PlatinumCoin": "Platinmünze", + "TopazStaff": "Topasstab", + "SapphireStaff": "Saphirstab", + "EmeraldStaff": "Smaragdstab", + "RubyStaff": "Rubinstab", + "DiamondStaff": "Diamantstab", + "GrassWall": "Graswand", + "JungleWall": "Dschungelwand", + "FlowerWall": "Blumenwand", + "Jetpack": "Jetpack", + "ButterflyWings": "Schmetterlingsflügel", + "FallenStar": "Sternschnuppe", + "CactusWall": "Kaktuswand", + "Cloud": "Wolke", + "CloudWall": "Wolkenwand", + "Seaweed": "Seetang", + "RuneHat": "Runenhut", + "RuneRobe": "Runenrobe", + "MushroomSpear": "Pilzspeer", + "TerraBlade": "Terraklinge", + "GrenadeLauncher": "Granatwerfer", + "RocketLauncher": "Raketenwerfer", + "CopperGreaves": "Kupferbeinschützer", + "ProximityMineLauncher": "Landminenwerfer", + "FairyWings": "Feenflügel", + "SlimeBlock": "Schleimblock", + "FleshBlock": "Fleischblock", + "MushroomWall": "Pilzwand", + "RainCloud": "Regenwolke", + "BoneBlock": "Knochenblock", + "FrozenSlimeBlock": "Gefrorener Schleimblock", + "BoneBlockWall": "Knochen-Ziegelwand", + "SlimeBlockWall": "Schleimblockwand", + "IronGreaves": "Eisenbeinschützer", + "FleshBlockWall": "Fleischblockwand", + "RocketI": "Rakete I", + "RocketII": "Rakete II", + "RocketIII": "Rakete III", + "RocketIV": "Rakete IV", + "AsphaltBlock": "Asphaltblock", + "CobaltPickaxe": "Kobaltspitzhacke", + "MythrilPickaxe": "Mithrilspitzhacke", + "AdamantitePickaxe": "Adamantitspitzhacke", + "Clentaminator": "Clentaminator", + "SilverGreaves": "Silberbeinschützer", + "GreenSolution": "Grüne Lösung", + "BlueSolution": "Blue Solution", + "PurpleSolution": "Lila Lösung", + "DarkBlueSolution": "Dunkelblaue Lösung", + "RedSolution": "Rote Lösung", + "HarpyWings": "Harpyienflügel", + "BoneWings": "Knochenflügel", + "Hammush": "Hammpilz", + "NettleBurst": "Nesselstoß", + "AnkhBanner": "Anchbanner", + "GoldGreaves": "Goldbeinschützer", + "SnakeBanner": "Schlangenbanner", + "OmegaBanner": "Omegabanner", + "CrimsonHelmet": "Purpurner Helm", + "CrimsonScalemail": "Purpurnes Schuppenhemd", + "CrimsonGreaves": "Purpurne Gamaschen", + "BloodButcherer": "Blutschlächter", + "TendonBow": "Sehnenbogen", + "FleshGrinder": "Hackfleischmacher", + "DeathbringerPickaxe": "Todbringerspitzhacke", + "BloodLustCluster": "Blutrauschkluster", + "Torch": "Fackel", + "CopperChainmail": "Kupferkettenhemd", + "TheUndertaker": "Der Leichenbestatter", + "TheMeatball": "Der Fleischklops", + "TheRottedFork": "Die verwittere Gabel", + "LivingWoodChair": "Lebendes-Holz-Stuhl", + "CactusChair": "Kaktusstuhl", + "BoneChair": "Knochenstuhl", + "FleshChair": "Fleischstuhl", + "IronChainmail": "Eisenkettenhemd", + "MushroomChair": "Pilzstuhl", + "BoneWorkBench": "Knochenwerkbank", + "CactusWorkBench": "Kaktuswerkbank", + "FleshWorkBench": "Fleischwerkbank", + "MushroomWorkBench": "Pilzwerkbank", + "SlimeWorkBench": "Schleimwerkbank", + "CactusDoor": "Kaktustür", + "FleshDoor": "Fleischtür", + "MushroomDoor": "Pilztür", + "LivingWoodDoor": "Lebendes-Holz-Tür", + "SilverChainmail": "Silberkettenhemd", + "BoneDoor": "Knochentür", + "FlameWings": "Flammenflügel", + "FrozenWings": "Gefrorene Flügel", + "GhostWings": "Geisterflügel", + "SunplateBlock": "Sonnenplattenblock", + "DiscWall": "Scheibenwand", + "SkywareChair": "Himmelswarenstuhl", + "BoneTable": "Knochentisch", + "FleshTable": "Fleischtisch", + "LivingWoodTable": "Lebendes-Holz-Tisch", + "GoldChainmail": "Goldkettenhemd", + "SkywareTable": "Himmelswarentisch", + "LivingWoodChest": "Lebendes-Holz-Truhe", + "LivingWoodWand": "Lebendes-Holz-Wand", + "PurpleIceBlock": "Lila Eisblock", + "PinkIceBlock": "Rosa Eisblock", + "RedIceBlock": "Roter Eisblock", + "CrimstoneBlock": "Purpursteinblock", + "SkywareDoor": "Himmelswarentür", + "SkywareChest": "Himmelswarentruhe", + "SteampunkHat": "Steampunkhut", + "GrapplingHook": "Enterhaken", + "SteampunkShirt": "Steampunkshirt", + "SteampunkPants": "Steampunkhose", + "BeeHat": "Bienenhut", + "BeeShirt": "Bienenhemd", + "BeePants": "Bienenhose", + "WorldBanner": "Weltbanner", + "SunBanner": "Sonnenbanner", + "GravityBanner": "Schwerkraftbanner", + "PharaohsMask": "Pharaonenmaske", + "Actuator": "Aktor", + "Chain": "Kette", + "BlueWrench": "Blauer Schraubenschlüssel", + "GreenWrench": "Grüner Schraubenschlüssel", + "BluePressurePlate": "Blaue Druckplatte", + "YellowPressurePlate": "Gelbe Druckplatte", + "DiscountCard": "Kundenkarte", + "LuckyCoin": "Glücksmünze", + "UnicornonaStick": "Hoppe-Reiter-Einhorn", + "SandstorminaBottle": "Sandsturm in der Flasche", + "BeachBall": "Wasserball", + "ShadowScale": "Schattenschuppe", + "CharmofMyths": "Märchenzauber", + "MoonShell": "Mondmuschel", + "StarVeil": "Sternenschleier", + "WaterWalkingBoots": "Wasserwandelstiefel", + "Tiara": "Tiara", + "PrincessDress": "Prinzessinnenkleid", + "PharaohsRobe": "Pharaorobe", + "GreenCap": "Grüne Mütze", + "MushroomCap": "Pilzmütze", + "TamOShanter": "Tam O' Shanter", + "PiggyBank": "Sparschwein", + "MummyMask": "Mumienmaske", + "MummyShirt": "Mumienhemd", + "MummyPants": "Mumienhose", + "CowboyHat": "Cowboyhut", + "CowboyJacket": "Cowboyjacke", + "CowboyPants": "Cowboyhose", + "PirateHat": "Piratenhut", + "PirateShirt": "Piratenhemd", + "PiratePants": "Piratenhose", + "VikingHelmet": "Wikingerhelm", + "MiningHelmet": "Bergmannshelm", + "CrimtaneOre": "Purpurtanerz", + "CactusSword": "Kaktus-Schwert", + "CactusPickaxe": "Kaktus-Spitzhacke", + "IceBrick": "Eisziegel", + "IceBrickWall": "Eis-Ziegelwand", + "AdhesiveBandage": "Wundschnellverband", + "ArmorPolish": "Rüstungspolitur", + "Bezoar": "Bezoar", + "Blindfold": "Augenbinde", + "FastClock": "Vorgehender Wecker", + "CopperHelmet": "Kupferhelm", + "Megaphone": "Megafon", + "Nazar": "Nazar", + "Vitamins": "Vitamine", + "TrifoldMap": "Dreifachkarte", + "CactusHelmet": "Kaktus-Helm", + "CactusBreastplate": "Kaktus-Brustpanzer", + "CactusLeggings": "Kaktusgamaschen", + "PowerGlove": "Powerhandschuh", + "LightningBoots": "Blitzstiefel", + "SunStone": "Sonnenstein", + "Wood": "Holz", + "IronHelmet": "Eisenhelm", + "MoonStone": "Mondstein", + "ArmorBracing": "Rüstungskorsett", + "MedicatedBandage": "Imprägnierter Verband", + "ThePlan": "Der Plan", + "CountercurseMantra": "Gegenfluch-Mantra", + "CoinGun": "Münzgewehr", + "LavaCharm": "Lavazauber", + "ObsidianWaterWalkingBoots": "Obsidian-Wasserwandelstiefel", + "LavaWaders": "Lavawatstiefel", + "PureWaterFountain": "Reiner Springbrunnen", + "SilverHelmet": "Silberhelm", + "DesertWaterFountain": "Wüsten-Springbrunnen", + "Shadewood": "Schattenholz", + "ShadewoodDoor": "Schattenholztür", + "ShadewoodPlatform": "Schattenholzklappe", + "ShadewoodChest": "Schattenholztruhe", + "ShadewoodChair": "Schattenholzstuhl", + "ShadewoodWorkBench": "Schattenholzwerkbank", + "ShadewoodTable": "Schattenholztisch", + "ShadewoodDresser": "Schattenholzkommode", + "ShadewoodPiano": "Schattenholzklavier", + "GoldHelmet": "Goldhelm", + "ShadewoodBed": "Schattenholzbett", + "ShadewoodSword": "Schattenholzschwert", + "ShadewoodHammer": "Schattenholzhammer", + "ShadewoodBow": "Schattenholzbogen", + "ShadewoodHelmet": "Schattenholzhelm", + "ShadewoodBreastplate": "Schattenholzbrustplatte", + "ShadewoodGreaves": "Schattenholzgamaschen", + "ShadewoodWall": "Schattenholzwand", + "Cannon": "Kanone", + "Cannonball": "Kanonenkugel", + "WoodWall": "Holzwand", + "FlareGun": "Leuchtpistole", + "Flare": "Leuchtkugel", + "BoneWand": "Knochenwand", + "LeafWand": "Laubwand", + "FlyingCarpet": "Fliegender Teppich", + "AvengerEmblem": "Rächer-Symbol", + "MechanicalGlove": "Mechanischer Handschuh", + "LandMine": "Landmine", + "PaladinsShield": "Paladinschild", + "WebSlinger": "Netzschleuder", + "WoodPlatform": "Holzklappe", + "JungleWaterFountain": "Dschungel-Wasserbrunnen", + "IcyWaterFountain": "Eiswasserbrunnen", + "CorruptWaterFountain": "Verdorbener Wasserbrunnen", + "CrimsonWaterFountain": "Purpurner Wasserbrunnen", + "HallowedWaterFountain": "Geheiligter Wasserbrunnen", + "BloodWaterFountain": "Blutwasserbrunnen", + "Umbrella": "Regenschirm", + "ChlorophyteOre": "Grünalgenerz", + "SteampunkWings": "Steampunkflügel", + "Snowball": "Schneeball", + "FlintlockPistol": "Steinschlosspistole", + "IceSkates": "Schlittschuhe", + "SnowballLauncher": "Schneeballwerfer", + "WebCoveredChest": "Eingesponnene Truhe", + "ClimbingClaws": "Kletterklauen", + "AncientIronHelmet": "Uralter Eisenhelm", + "AncientGoldHelmet": "Uralter Goldhelm", + "AncientShadowHelmet": "Uralter Schattenhelm", + "AncientShadowScalemail": "Uraltes Schattenschuppenhemd", + "AncientShadowGreaves": "Uralte Schattengamaschen", + "AncientNecroHelmet": "Uralter Nekrohelm", + "Musket": "Muskete", + "AncientCobaltHelmet": "Uralter Kobalthelm", + "AncientCobaltBreastplate": "Uralte Kobaltbrustplatte", + "AncientCobaltLeggings": "Uralte Kobaltgamaschen", + "BlackBelt": "Schwarzer Gürtel", + "Boomstick": "Donnerstock", + "Rope": "Seil", + "Campfire": "Lagerfeuer", + "Marshmallow": "Marshmallow", + "MarshmallowonaStick": "Marshmallow am Stock", + "CookedMarshmallow": "Gerösteter Marshmallow", + "MusketBall": "Musketenkugel", + "RedRocket": "Rote Rakete", + "GreenRocket": "Grüne Rakete", + "BlueRocket": "Blaue Rakete", + "YellowRocket": "Gelbe Rakete", + "IceTorch": "Eisfackel", + "ShoeSpikes": "Schuhspikes", + "TigerClimbingGear": "Tiger-Kletterausrüstung", + "Tabi": "Tabi", + "Minishark": "Minihai", + "PinkThread": "Rosa Faden", + "ManaRegenerationBand": "Mana-Regenerationsband", + "SandstorminaBalloon": "Sandsturm im Ballon", + "MasterNinjaGear": "Meister-Ninjaausrüstung", + "RopeCoil": "Spiralseil", + "Blowgun": "Blasrohr", + "BlizzardinaBottle": "Schneesturm in der Flasche", + "FrostburnArrow": "Gefrierbrandpfeil", + "EnchantedSword": "Verzaubertes Schwert", + "IronBow": "Eisenbogen", + "PickaxeAxe": "Spitzhackenaxt", + "CobaltWaraxe": "Kobaltkriegsaxt", + "MythrilWaraxe": "Mithrilkriegsaxt", + "AdamantiteWaraxe": "Adamantitkriegsaxt", + "EatersBone": "Fresserknochen", + "BlendOMatic": "Misch-O-Matik", + "MeatGrinder": "Fleischwolf", + "Extractinator": "Extraktinator", + "Solidifier": "Festiger", + "Amber": "Bernstein", + "AcidDye": "Säurefarbstoff", + "ActuationAccessory": "Druckerator", + "ActuationRod": "Antriebsstab", + "AlchemyTable": "Alchemietisch", + "AlphabetStatue0": "'0'-Statue", + "AlphabetStatue1": "'1'-Statue", + "AlphabetStatue2": "'2'-Statue", + "AlphabetStatue3": "'3'-Statue", + "AlphabetStatue4": "'4'-Statue", + "AlphabetStatue5": "'5'-Statue", + "AlphabetStatue6": "'6'-Statue", + "AlphabetStatue7": "'7'-Statue", + "AlphabetStatue8": "'8'-Statue", + "AlphabetStatue9": "'9'-Statue", + "AlphabetStatueA": "'A'-Statue", + "AlphabetStatueB": "'B'-Statue", + "AlphabetStatueC": "'C'-Statue", + "AlphabetStatueD": "'D'-Statue", + "AlphabetStatueE": "'E'-Statue", + "AlphabetStatueF": "'F'-Statue", + "AlphabetStatueG": "'G'-Statue", + "AlphabetStatueH": "'H'-Statue", + "AlphabetStatueI": "'I'-Statue", + "AlphabetStatueJ": "'J'-Statue", + "AlphabetStatueK": "'K'-Statue", + "AlphabetStatueL": "'L'-Statue", + "AlphabetStatueM": "'M'-Statue", + "AlphabetStatueN": "'N'-Statue", + "AlphabetStatueO": "'O'-Statue", + "AlphabetStatueP": "'P'-Statue", + "AlphabetStatueQ": "'Q'-Statue", + "AlphabetStatueR": "'R'-Statue", + "AlphabetStatueS": "'S'-Statue", + "AlphabetStatueT": "'T'-Statue", + "AlphabetStatueU": "'U'-Statue", + "AlphabetStatueV": "'V'-Statue", + "AlphabetStatueW": "'W'-Statue", + "AlphabetStatueX": "'X'-Statue", + "AlphabetStatueY": "'Y'-Statue", + "AlphabetStatueZ": "'Z'-Statue", + "Amarok": "Amarok", + "AmberGemsparkWall": "Bernstein-Funkenedelstein-Wand", + "AmberGemsparkWallOff": "Offline-Bernstein-Funkenedelstein-Wand", + "AmberStaff": "Bernsteinstab", + "AmethystGemsparkWall": "Amethyst-Funkenedelstein-Wand", + "AmethystGemsparkWallOff": "Offline-Amethyst-Funkenedelstein-Wand", + "AncientArmorHat": "Uralte Kopfbedeckung", + "AncientArmorPants": "Uralte Hose", + "AncientArmorShirt": "Uralte Kleider", + "AncientBattleArmorHat": "Verbotene Maske", + "AncientBattleArmorMaterial": "Verbotenes Fragment", + "AncientBattleArmorPants": "Verbotene Fäden", + "AncientBattleArmorShirt": "Verbotene Roben", + "AncientCloth": "Uralter Stoff", + "AncientHorn": "Uraltes Horn", + "AnglerTackleBag": "Anglerkasten", + "AngryBonesBanner": "Wütende-Knochen-Banner", + "AnnouncementBox": "Ankündigungsbox", + "AntiGravityHook": "Antischwerkrafthaken", + "AntlionClaw": "Unterkieferknochenklinge", + "ApprenticeBait": "Lehrlingsköder", + "ApprenticeHat": "Lehrlingshut", + "ApprenticeRobe": "Lehrlingsrobe", + "ApprenticeScarf": "Lehrlingsschal", + "ApprenticeTrousers": "Lehrlingshose", + "ArchitectGizmoPack": "Architekten-Gizmo-Paket", + "Arkhalis": "Arkhalis", + "AviatorSunglasses": "0x33s Flieger", + "Bacon": "Schweinespeck", + "BalloonHorseshoeFart": "Grüner Hufeisenballon", + "BalloonHorseshoeHoney": "Bernstein-Hufeisenballon", + "BalloonHorseshoeSharkron": "Rosa Hufeisenballon", + "BalloonPufferfish": "Ballonkugelfisch", + "BeeMask": "Bienenköniginmaske", + "BeesKnees": "Die Knie der Biene", + "BejeweledValkyrieBody": "Lazures Walkürenmantel", + "BejeweledValkyrieHead": "Lazures Walkürendiadem", + "BejeweledValkyrieWing": "Lazures Barrierenklappe", + "BewitchingTable": "Verhexter Tisch", + "BlackAndWhiteDye": "Schwarzweißer Farbstoff", + "BlackCounterweight": "Schwarzes Gegengewicht", + "BlackString": "Schwarzer Faden", + "Bladetongue": "Klingenzunge", + "BlessedApple": "Gesegneter Apfel", + "BlinkrootPlanterBox": "Leuchtwurzel-Pflanzkasten", + "BloodWater": "Blutwasser", + "BloodZombieBanner": "Blutzombiebanner", + "BloodZombieStatue": "Blutzombiestatue", + "BlueAcidDye": "Blauer Säurefarbstoff", + "BlueCounterweight": "Blaues Gegengewicht", + "BlueDungeonBathtub": "Blaue Verliesbadewanne", + "BlueDungeonCandelabra": "Blauer Verlieskandelaber", + "BlueDungeonChandelier": "Blauer Verlieskronleuchter", + "BlueDungeonChest": "Blaue Verliestruhe", + "BlueDungeonLamp": "Blaue Verlieslampe", + "BlueDungeonSink": "Blaues Verlieswaschbecken", + "BlueFlameAndSilverDye": "Blauer Flammen- und Silberner Farbstoff", + "BlueLunaticHood": "Mondkultistenkapuze", + "BlueLunaticRobe": "Mondkultistenrobe", + "BluePhasesaber": "Blaues Laserschwert", + "BlueString": "Blauer Faden", + "BombFish": "Bombenfisch", + "BoneArrow": "Knochenpfeil", + "BoneBathtub": "Knochenbadewanne", + "BoneBed": "Knochenbett", + "BoneBookcase": "Knochenbücherschrank", + "BoneCampfire": "Knochenlagerfeuer", + "BoneCandelabra": "Knochenkandelaber", + "BoneChandelier": "Knochenkronleuchter", + "BoneChest": "Knochentruhe", + "BoneClock": "Knochenuhr", + "BoneDagger": "Wurfmesser", + "BoneGlove": "Knochenhandschuh", + "BoneJavelin": "Knochenwurfspeer", + "BoneLamp": "Knochenlampe", + "BoneLantern": "Knochenlaterne", + "BoneRattle": "Knochenrassel", + "BoneSink": "Knochenwaschbecken", + "BoneSkeletonStatue": "Knochen-Skelettstatue", + "BoneTorch": "Knochenfackel", + "BoosterTrack": "Boostergleis", + "BorealWood": "Borealholz", + "BorealWoodBathtub": "Borealholzbadewanne", + "BorealWoodBed": "Borealholzbett", + "BorealWoodBookcase": "Borealholzbücherschrank", + "BorealWoodBow": "Borealholzbogen", + "BorealWoodBreastplate": "Borealholzbrustpanzer", + "BorealWoodCandelabra": "Borealholzkandelaber", + "BorealWoodCandle": "Borealholzkerze", + "BorealWoodChair": "Borealholzstuhl", + "BorealWoodChandelier": "Borealholzkronleuchter", + "BorealWoodChest": "Borealholztruhe", + "BorealWoodClock": "Borealholzuhr", + "BorealWoodDoor": "Borealholztür", + "BorealWoodDresser": "Borealholzkommode", + "BorealWoodFence": "Borealholzzaun", + "BorealWoodGreaves": "Borealholzbeinschützer", + "BorealWoodHammer": "Borealholzhammer", + "BorealWoodHelmet": "Borealholzhelm", + "BorealWoodLamp": "Borealholzlampe", + "BorealWoodLantern": "Borealholzlaterne", + "BorealWoodPiano": "Borealholzklavier", + "BorealWoodPlatform": "Borealholzklappe", + "BorealWoodSink": "Borealholzwaschbecken", + "BorealWoodSofa": "Borealholzsofa", + "BorealWoodSword": "Borealholzschwert", + "BorealWoodTable": "Borealholztisch", + "BorealWoodWall": "Borealholzwand", + "BorealWoodWorkBench": "Borealholzwerkbank", + "BossMaskMoonlord": "Mondherrenmaske", + "BottomlessBucket": "Bodenloser Wassereimer", + "BouncyBomb": "Federnde Bombe", + "BouncyDynamite": "Federndes Dynamit", + "BouncyGlowstick": "Federnder Leuchtstab", + "BouncyGrenade": "Federnde Granate", + "BrainMask": "Gehirn-von-Cthulhu-Maske", + "BrainOfConfusion": "Gehirn der Verwirrung", + "BrainOfCthulhuBossBag": "Schatzbeutel", + "BrainScrambler": "Gehirnverwirrer", + "BrightBrownDye": "Hellbrauner Farbstoff", + "BrightSilverDye": "Hellsilberner Farbstoff", + "BrownAndBlackDye": "Brauner und Schwarzer Farbstoff", + "BrownAndSilverDye": "Brauner und Silberner Farbstoff", + "BrownDye": "Brauner Farbstoff", + "BrownString": "Brauner Faden", + "Bubble": "Blase", + "BubbleGun": "Kaugummi", + "BuccaneerBandana": "Freibeuterkopftuch", + "BuccaneerPants": "Freibeuterhose", + "BuccaneerShirt": "Freubeutertunika", + "Buggy": "Buggy", + "BuggyStatue": "Buggy-Statue", + "BunnyfishTrophy": "Hasenfischtrophäe", + "BurningHadesDye": "Verbrennender-Hades-Farbstoff", + "ButcherBanner": "Schlachter-Banner", + "ButchersChainsaw": "Kettensäge des Schlachters", + "ButterflyStatue": "Schmetterlingsstatue", + "CactusBathtub": "Kaktusbadewanne", + "CactusBed": "Kaktusbett", + "CactusBookcase": "Kaktusbücherschrank", + "CactusCandelabra": "Kaktuskandelaber", + "CactusCandle": "Kaktuskerze", + "CactusChandelier": "Kaktuskronleuchter", + "CactusChest": "Kaktustruhe", + "CactusClock": "Kaktusuhr", + "CactusLamp": "Kaktuslampe", + "CactusLantern": "Kaktuslaterne", + "CactusPlatform": "Kaktusklappe", + "CactusSink": "Kaktuswaschbecken", + "CactusTable": "Kaktustisch", + "CageBuggy": "Buggy-Käfig", + "CageEnchantedNightcrawler": "Verzauberter Nachtkriecherkäfig", + "CageGrubby": "Grubby-Käfig", + "CageSluggy": "Sluggy-Käfig", + "Cascade": "Kaskade", + "CelestialShell": "Himmlische Hülle", + "CelestialSigil": "Himmlisches Siegel", + "CellPhone": "Handy", + "ChainGuillotines": "Kettenguillotinen", + "ChargedBlasterCannon": "Aufgeladene Blasterkanone", + "Chik": "Chik", + "Chimney": "Schornstein", + "ChlorophyteBrick": "Grünalgenziegel", + "ChlorophyteBrickWall": "Grünalgen-Ziegelwand", + "ChlorophyteDye": "Grünalgenfarbstoff", + "ClingerStaff": "Klettenstab", + "ClothierJacket": "Schneiderjacke", + "ClothierPants": "Schneiderhose", + "Code1": "Code 1", + "Code2": "Code 2", + "CogWall": "Zahnradwand", + "CoinRing": "Münzenring", + "CompanionCube": "Gefährtenwürfel", + "CompassRose": "Kompassrose", + "ConfettiBlock": "Konfettiblock", + "ConfettiBlockBlack": "Mitternachtskonfettiblock", + "ConfettiCannon": "Konfettikanone", + "ConfettiWall": "Konfettiwand", + "ConfettiWallBlack": "Mitternachtskonfettiwand", + "ConveyorBeltLeft": "Förderband (im Uhrzeigersinn)", + "ConveyorBeltRight": "Förderband (gegen den Uhrzeigersinn)", + "CordageGuide": "Anleitung für Pflanzenfasertaus", + "CorruptFishingCrate": "Verdorbene Kiste", + "CorruptHardenedSand": "Verhärteter Ebensandblock", + "CorruptHardenedSandWall": "Verhärtete Ebensandwand", + "CorruptPlanterBox": "Todeskraut-Pflanzkasten", + "CorruptSandstone": "Ebensandsteinblock", + "CorruptSandstoneWall": "Ebensandsteinwand", + "CorruptYoyo": "Malaise", + "CosmicCarKey": "Kosmische Autoschlüssel ", + "CrawdadBanner": "Flusskrebs-Banner", + "CreatureFromTheDeepBanner": "Kreatur aus der Tiefe-Banner", + "CrimsonFishingCrate": "Purpurkiste", + "CrimsonHardenedSand": "Verhärteter Purpursandblock", + "CrimsonHardenedSandWall": "Verhärtete Purpursandwand", + "CrimsonHeart": "Purpurherz", + "CrimsonPlanterBox": "Todeskraut-Pflanzkasten", + "CrimsonSandstone": "Purpursandsteinblock", + "CrimsonSandstoneWall": "Purpursandsteinwand", + "CrimsonYoyo": "Arterie", + "CrimtaneBrick": "Purpurtan-Ziegel", + "CrimtaneBrickWall": "Purpurtan-Ziegelwand", + "CrystalBlock": "Kristallblock", + "CrystalBlockWall": "Kristallblockwand", + "CrystalDart": "Kristallwurfpfeil", + "CrystalSerpent": "Kristallschlange", + "CrystalVileShard": "Böser Kristallsplitter", + "CultistBossBag": "Schatzbeutel", + "CursedCampfire": "Verfluchtes Lagerfeuer", + "CursedDart": "Verfluchter Wurfpfeil", + "CyanString": "Zyan Faden", + "DaedalusStormbow": "Daedalus Sturmbogen", + "DarkMummyBanner": "Dunkle-Mumie-Banner", + "DartPistol": "Pfeilpistole", + "DartRifle": "Pfeilgewehr", + "DayBloomPlanterBox": "Tagesblume-Pflanzkasten", + "DayBreak": "Tagesanbruch", + "DeadlySphereBanner": "Tödliche Sphäre-Banner", + "DeadlySphereStaff": "Tödliche Sphäre-Stab", + "DefenderMedal": "Verteidigermedaille", + "DefendersForge": "Verteidigerschmiede", + "DemonCampfire": "Dämonenlagerfeuer", + "DemonHeart": "Dämonenherz", + "DesertBasiliskBanner": "Basikiskenbanner", + "DesertDjinnBanner": "Wüstengeistbanner", + "DesertFossil": "Wüstenfossil", + "DesertFossilWall": "Wüstenfossilwand", + "DesertGhoulBanner": "Ghoul-Banner", + "DesertLamiaBanner": "Lamia-Banner", + "DestroyerBossBag": "Schatzbeutel", + "DestroyerMask": "Zerstörermaske", + "Detonator": "Sprengzünder", + "DiamondGemsparkWall": "Diamant-Funkenedelstein-Wand", + "DiamondGemsparkWallOff": "Offline-Diamant-Funkenedelstein-Wand", + "DjinnLamp": "Wüstengeistlampe", + "DjinnsCurse": "Dschinns Fluch", + "DPSMeter": "SPS-Meter", + "DrillContainmentUnit": "Bohrdämmungseinheit", + "DripplerBanner": "Tropfer-Banner", + "DripplerStatue": "Tropfer-Statue", + "DrManFlyBanner": "Dr. Mann-Fliege-Banner", + "DuckStatue": "Entenstatue", + "DukeFishronMask": "Herzog-Fischron-Maske", + "DukeFishronTrophy": "Herzog-Fischron-Trophäe", + "DuneSplicerBanner": "Dünenstecher-Banner", + "DungeonFishingCrate": "Verlieskiste", + "DyeTradersScimitar": "Exotischer Krummsäbel", + "DyeTraderTurban": "Farbstoffhändlerturban", + "DynastyBathtub": "Dynastiebadewanne", + "DynastyBed": "Dynastiebett", + "DynastyBookcase": "Dynastiebücherschrank", + "DynastyBowl": "Dynastieschale", + "DynastyCandelabra": "Große Dynastiekerze", + "DynastyCandle": "Dynastiekerze", + "DynastyChair": "Dynastiestuhl", + "DynastyChandelier": "Große Dynastielaterne", + "DynastyChest": "Dynastietruhe", + "DynastyClock": "Dynastieuhr", + "DynastyCup": "Dynastiebecher", + "DynastyLamp": "Dynastielampe", + "DynastyLantern": "Dynastielaterne", + "DynastySink": "Dynastiewaschbecken", + "DynastyWorkBench": "Dynastiewerkbank", + "EaterMask": "Weltenfressermaske", + "EaterOfWorldsBossBag": "Schatzbeutel", + "EbonwoodBathtub": "Ebenholzbadewanne", + "EbonwoodBookcase": "Ebenholzbücherschrank", + "EbonwoodCandelabra": "Ebenholzkandelaber", + "EbonwoodCandle": "Ebenholzkerze", + "EbonwoodChandelier": "Ebenholzkronleuchter", + "EbonwoodClock": "Ebenholzuhr", + "EbonwoodLamp": "Ebenholzlampe", + "EbonwoodLantern": "Ebenholzlaterne", + "EbonwoodSink": "Ebenholzwaschbecken", + "ElectrosphereLauncher": "Elektrosphärenraketenwerfer", + "EmeraldGemsparkWall": "Smaragd-Funkenedelstein-Wand", + "EmeraldGemsparkWallOff": "Offline-Smaragd-Funkenedelstein-Wand", + "EmptyDropper": "Leerer Dropper", + "EnchantedNightcrawler": "Verzauberter Nachtkriecher", + "EndlessMusketPouch": "Endloser Musketenbeutel", + "EndlessQuiver": "Endloser Köcher", + "EngineeringHelmet": "Ingenieurshelm", + "EoCShield": "Schild von Cthulhu", + "EyeMask": "Auge-von-Cthulhu-Maske", + "EyeOfCthulhuBossBag": "Schatzbeutel", + "Fake_BlueDungeonChest": "Gefangen Blaue Verliestruhe", + "Fake_BoneChest": "Gefangen Knochentruhe", + "Fake_BorealWoodChest": "Gefangen Borealholztruhe", + "Fake_CactusChest": "Gefangen Kaktustruhe", + "Fake_Chest": "Gefangen Truhe", + "Fake_CorruptionChest": "Gefangen Verdorbene Truhe", + "Fake_CrimsonChest": "Gefangen Purpurne Truhe", + "Fake_DynastyChest": "Gefangen Dynastietruhe", + "Fake_EbonwoodChest": "Gefangen Ebenholztruhe", + "Fake_FleshChest": "Gefangen Fleischtruhe", + "Fake_GlassChest": "Gefangen Glastruhe", + "Fake_GoldChest": "Gefangen Goldtruhe", + "Fake_GraniteChest": "Gefangen Granittruhe", + "Fake_GreenDungeonChest": "Gefangen Grüne Verliestruhe", + "Fake_HallowedChest": "Gefangen Heilige Truhe", + "Fake_HoneyChest": "Gefangen Honigtruhe", + "Fake_IvyChest": "Gefangen Efeutruhe", + "Fake_JungleChest": "Gefangen Dschungeltruhe", + "Fake_LihzahrdChest": "Gefangen Lihzahrdtruhe", + "Fake_LivingWoodChest": "Gefangen Lebendes-Holz-Truhe", + "Fake_MarbleChest": "Gefangen Marmortruhe", + "Fake_MartianChest": "Gefangen Marsianer-Truhe", + "Fake_MeteoriteChest": "Gefangen Meteoriten-Truhe", + "Fake_MushroomChest": "Gefangen Pilztruhe", + "Fake_ObsidianChest": "Gefangen Obsidiantruhe", + "Fake_PalmWoodChest": "Gefangen Palmholztruhe", + "Fake_PearlwoodChest": "Gefangen Perlholztruhe", + "Fake_PinkDungeonChest": "Gefangen Rosa Verliestruhe", + "Fake_PumpkinChest": "Gefangen Kürbistruhe", + "Fake_RichMahoganyChest": "Gefangen Reiche Mahagonitruhe", + "Fake_ShadewoodChest": "Gefangen Schattenholztruhe", + "Fake_ShadowChest": "Gefangen Schattentruhe", + "Fake_SkywareChest": "Gefangen Himmelswarentruhe", + "Fake_SlimeChest": "Gefangen Schleimtruhe", + "Fake_SpookyChest": "Gefangen Schaurige Truhe", + "Fake_SteampunkChest": "Gefangen Steampunk-Truhe", + "Fake_WaterChest": "Gefangen Wassertruhe", + "Fake_WebCoveredChest": "Gefangen Eingesponnene Truhe", + "FalconBlade": "Falkenschneide", + "FallenTuxedoPants": "Gefallenen-Smokinghose", + "FallenTuxedoShirt": "Gefallenen-Smokinghemd", + "FancyDishes": "Schickes Geschirr", + "FetidBaghnakhs": "Stinkende Tigerkrallen", + "FireBlossomPlanterBox": "Feuerblüte-Pflanzkasten", + "FireflyStatue": "Glühwürmchenstatue", + "Fireplace": "Kamin", + "FireworkFountain": "Feuerwerksbrunnen", + "FireworksBox": "Feuerwerkkarton", + "FireworksLauncher": "Feier", + "FishermansGuide": "Handbuch für Angler", + "FishFinder": "Fischsucher", + "FishronBossBag": "Schatzbeutel", + "FishronWings": "Fischronflügel", + "Flairon": "Flairon", + "FlameAndSilverDye": "Flammen- und Silberner Farbstoff", + "FleshBathtub": "Fleischbadewanne", + "FleshBed": "Fleischbett", + "FleshBookcase": "Fleischbücherschrank", + "FleshCandelabra": "Fleischkandelaber", + "FleshCandle": "Fleischkerze", + "FleshChandelier": "Fleischkronleuchter", + "FleshChest": "Fleischtruhe", + "FleshClock": "Fleischuhr", + "FleshDresser": "Fleischkommode", + "FleshKnuckles": "Fleischknöchel", + "FleshLamp": "Fleischlampe", + "FleshLantern": "Fleischlaterne", + "FleshMask": "Fleischwandmaske", + "FleshPiano": "Fleischklavier", + "FleshSink": "Fleischwaschbecken", + "FleshSofa": "Fleischsofa", + "FloatingIslandFishingCrate": "Himmelskiste", + "FlowerBoots": "Blumenstiefel", + "FlowerBoyHat": "Alberne Sonnenblumenblüten", + "FlowerBoyPants": "Alberne Sonnenblumenhöschen", + "FlowerBoyShirt": "Alberne Sonnenblumenoberteile", + "FlyingAntlionBanner": "Ameisenlöwenschwarmbanner", + "FlyingDutchmanTrophy": "Fliegender Holländer-Trophäe", + "FlyingKnife": "Fliegendes Messer", + "FormatC": "Format:C", + "FossilHelm": "Fossilienhelm", + "FossilOre": "Widerstandsfähiges Fossil", + "FossilPants": "Fossilbeinschützer", + "FossilShirt": "Fossilplatte", + "FragmentNebula": "Nebula-Fragment", + "FragmentSolar": "Sonnenfragment", + "FragmentStardust": "Sternenstaubfragment", + "FragmentVortex": "Vortex-Fragment", + "FritzBanner": "Fritz-Banner", + "FrogStatue": "Froschstatue", + "FrostDaggerfish": "Frost-Dolchfisch", + "FrozenBathtub": "Gefrorene Badewanne", + "FrozenBed": "Gefrorenes Bett", + "FrozenBookcase": "Gefrorener Bücherschrank", + "FrozenCampfire": "Gefrorenes Lagerfeuer", + "FrozenCandelabra": "Gefrorener Kandelaber", + "FrozenCandle": "Gefrorene Kerze", + "FrozenChair": "Gefrorener Stuhl", + "FrozenChandelier": "Gefrorener Kronleuchter", + "FrozenClock": "Gefrorene Uhr", + "FrozenDoor": "Gefrorene Tür", + "FrozenLamp": "Gefrorene Lampe", + "FrozenLantern": "Gefrorene Laterne", + "FrozenPiano": "Gefrorenes Klavier", + "FrozenSink": "Gefrorenes Waschbecken", + "FrozenSofa": "Gefrorenes Sofa", + "FrozenTable": "Gefrorener Tisch", + "FrozenWorkBench": "Gefrorene Werkbank", + "FuzzyCarrot": "Flaumkarotte", + "GelDye": "Gelfarbe", + "GemLockAmber": "Bernstein-Edelsteinschloss", + "GemLockAmethyst": "Amethyst-Edelsteinschloss", + "GemLockDiamond": "Diamant-Edelsteinschloss", + "GemLockEmerald": "Smaragd-Edelsteinschloss", + "GemLockRuby": "Rubin-Edelsteinschloss", + "GemLockSapphire": "Saphir-Edelsteinschloss", + "GemLockTopaz": "Topas-Edelsteinschloss", + "GenderChangePotion": "Geschlechtsumwandlungstrank", + "GeyserTrap": "Geysir", + "GiantShellyBanner": "Riesen-Shelly-Banner", + "GladiatorBreastplate": "Gladiatorenbrustplatte", + "GladiatorHelmet": "Gladiatorenhelm", + "GladiatorLeggings": "Gladiatorengamaschen", + "GlassBathtub": "Glasbadewanne", + "GlassBookcase": "Glasbücherschrank", + "GlassBowl": "Glasschale", + "GlassCandelabra": "Glaskandelaber", + "GlassCandle": "Glaskerze", + "GlassChandelier": "Glaskronleuchter", + "GlassChest": "Glastruhe", + "GlassClock": "Glasuhr", + "GlassDresser": "Glaskommode", + "GlassLamp": "Glaslampe", + "GlassLantern": "Glas-Laterne", + "GlassPiano": "Glasklavier", + "GlassSink": "Glaswaschbecken", + "GlassWorkBench": "Glaswerkbank", + "GoblinSummonerBanner": "Goblin-Beschwörer-Banner", + "GoblinTech": "Goblin-Techniker", + "GoldBird": "Goldvogel", + "GoldBirdCage": "Goldvogelkäfig", + "GoldBunny": "Goldhase", + "GoldBunnyCage": "Goldhasenkäfig", + "GoldButterfly": "Goldschmetterling", + "GoldButterflyCage": "Goldschmetterlingglas", + "GoldenBathtub": "Goldene Badewanne", + "GoldenBookcase": "Goldener Bücherschrank", + "GoldenBugNet": "Goldenes Fliegennetz", + "GoldenCandelabra": "Goldener Kandelaber", + "GoldenCandle": "Goldene Kerze", + "GoldenChandelier": "Goldener Kronleuchter", + "GoldenClock": "Golduhr", + "GoldenLamp": "Goldene Lampe", + "GoldenLantern": "Goldene Laterne", + "GoldenSink": "Goldenes Waschbecken", + "GoldfishTrophy": "Goldfischtrophäe", + "GoldFrog": "Goldfrosch", + "GoldFrogCage": "Goldfroschkäfig", + "GoldGrasshopper": "Goldgrashüpfer", + "GoldGrasshopperCage": "Goldgrashüpferkäfig", + "GoldMouse": "Goldmaus", + "GoldMouseCage": "Goldmauskäfig", + "GoldRing": "Goldring", + "GoldWorm": "Goldwurm", + "GoldWormCage": "Goldwurmkäfig", + "GolemBossBag": "Schatzbeutel", + "GolemMask": "Golemmaske", + "Gradient": "Gradient", + "Granite": "Granitblock", + "GraniteBathtub": "Granitbadewanne", + "GraniteBed": "Granitbett", + "GraniteBlock": "Glatter Granitblock", + "GraniteBlockWall": "Glatte Granitwand", + "GraniteBookcase": "Granitbücherregal", + "GraniteCandelabra": "Granitkandelaber", + "GraniteCandle": "Granitkerze", + "GraniteChair": "Granitstuhl", + "GraniteChandelier": "Granitkronleuchter", + "GraniteChest": "Granittruhe", + "GraniteClock": "Granituhr", + "GraniteDoor": "Granittür", + "GraniteDresser": "Granitkommode", + "GraniteFlyerBanner": "Granit-Elementar-Banner", + "GraniteGolemStatue": "Granitgolemstatue", + "GraniteLamp": "Granitlampe", + "GraniteLantern": "Granitlaterne", + "GranitePiano": "Granitklavier", + "GranitePlatform": "Granitklappe", + "GraniteSink": "Granitwaschbecken", + "GraniteSofa": "Granitsofa", + "GraniteTable": "Granittisch", + "GraniteWall": "Granitwand", + "GraniteWorkBench": "Granitwerkbank", + "Grasshopper": "Grashüpfer", + "GrasshopperCage": "Grashüpferkäfig", + "GrasshopperStatue": "Grashüpferstatue", + "GreedyRing": "Habgierring", + "GreekSkeletonBanner": "Hoptlitenbanner", + "GreenCounterweight": "Grünes Gegengewicht", + "GreenDungeonBathtub": "Grüne Verliesbadewanne", + "GreenDungeonCandelabra": "Grüner Verlieskandelaber", + "GreenDungeonChandelier": "Grüner Verlieskronleuchter", + "GreenDungeonChest": "Grüne Verliestruhe", + "GreenDungeonLamp": "Grüne Verlieslampe", + "GreenDungeonSink": "Grünes Verlieswaschbecken", + "GreenFlameAndSilverDye": "Grüner Flammen- und Silberner Farbstoff", + "GreenJellyfishBanner": "Grüne-Quallen-Banner", + "GreenPhasesaber": "Grünes Laserschwert", + "GreenString": "Grüner Faden", + "GrimDye": "Dünsterer Farbstoff", + "Grubby": "Grubby", + "GrubSoup": "Fraßsuppe", + "HadesDye": "Hades-Farbstoff", + "HallowedFishingCrate": "Heilige Kiste", + "HallowHardenedSand": "Verhärteter Perlsandblock", + "HallowHardenedSandWall": "Verhärtete Perlsandwand", + "HallowSandstone": "Perlsandsteinblock", + "HallowSandstoneWall": "Perlsandsteinwand", + "HardenedSand": "Verhärteter Sandblock", + "HardenedSandWall": "Verhärtete Sandwand", + "HardySaddle": "Abschrotersattel", + "HarpyStatue": "Harpyienstatue", + "HelFire": "Höllenfeuer", + "HellstoneBrickWall": "Höllenstein-Ziegelwand", + "HellwingBow": "Höllenflügelbogen", + "HerbBag": "Kräuterbeutel", + "HiTekSunglasses": "HiTek-Sonnenbrille", + "HiveBackpack": "Bienenstockpaket", + "HoneyBathtub": "Honigbadewanne", + "HoneyBookcase": "Honigbücherschrank", + "HoneyCandelabra": "Honigkandelaber", + "HoneyCandle": "Honigkerze", + "HoneyChandelier": "Honigkronleuchter", + "HoneyChest": "Honigtruhe", + "HoneyClock": "Honiguhr", + "HoneyCup": "Honigbecher", + "HoneyedGoggles": "Honigsüße Brille", + "HoneyfallBlock": "Honigstrom-Block", + "HoneyfallWall": "Honigstrom-Wand", + "HoneyLamp": "Honiglampe", + "HoneyLantern": "Honiglaterne", + "HoneyPiano": "Honigklavier", + "HoneyPlatform": "Honigklappe", + "HoneySink": "Honigwaschbecken", + "HoneyWorkBench": "Honigwerkbank", + "HopliteStatue": "Hopliten-Statue", + "HuntressBuckler": "Faustschild der Jägerin", + "HuntressJerkin": "Wams der Jägerin", + "HuntressPants": "Hose der Jägerin", + "HuntressWig": "Frisur der Jägerin", + "IceMirror": "Eisspiegel", + "IceTortoiseBanner": "Eisschildkrötenbanner", + "IchorCampfire": "Ichor-Lagerfeuer", + "IchorDart": "Ichorwurfpfeil", + "IlluminantHook": "Leuchtender Haken", + "InfernalWispDye": "Höllisches-Irrlicht-Farbstoff", + "InfluxWaver": "Zuflussschwenken", + "ItemFrame": "Item-Frame", + "Javelin": "Wurfspeer", + "JimsWings": "Jims Flügel", + "JourneymanBait": "Gesellenköder", + "JungleFishingCrate": "Dschungelkiste", + "JungleYoyo": "Amazone", + "KingSlimeBossBag": "Schatzbeutel", + "Kraken": "Kraken", + "LamiaHat": "Lamia-Maske", + "LamiaPants": "Lamia-Schwanz", + "LamiaShirt": "Lamia-Wickel", + "LargeAmber": "Großer Bernstein", + "LaserDrill": "Laserbohrer", + "LaserMachinegun": "Laser-Maschinengewehr", + "LaserRuler": "Mechanisches Lineal", + "LastPrism": "Letztes Prisma", + "LavafallBlock": "Lavastromblock", + "LavaLamp": "Lavalampe", + "LifeformAnalyzer": "Lebensform-Analysator", + "LifePreserver": "Rettungsring", + "LightKey": "Schlüssel des Lichts", + "LightMummyBanner": "Helle-Mumie-Banner", + "LihzahrdBathtub": "Lihzahrdbadewanne", + "LihzahrdBed": "Lihzahrdbett", + "LihzahrdBookcase": "Lihzahrd-Bücherschrank", + "LihzahrdCandelabra": "Lihzahrdkkandelaber", + "LihzahrdCandle": "Lihzahrdkerze", + "LihzahrdChandelier": "Lihzahrdkronleuchter", + "LihzahrdClock": "Lihzahrduhr", + "LihzahrdLamp": "Lihzahrdlampe", + "LihzahrdLantern": "Lihzahrdlaterne", + "LihzahrdSink": "Lihzahrdwaschbecken", + "LimeString": "Limonenfarbiger Faden", + "LivingCursedFireBlock": "Lebendes-Fluchfeuer-Block", + "LivingDemonFireBlock": "Lebendes-Dämonenfeuer-Block", + "LivingFireBlock": "Lebendes-Feuer-Block", + "LivingFlameDye": "Lebender-Flammen-Farbstoff", + "LivingFrostFireBlock": "Lebendes-Frostfeuer-Block", + "LivingIchorBlock": "Lebendes-Ichor-Block", + "LivingLeafWall": "Lebendes-Blatt-Wand", + "LivingMahoganyLeafWand": "Reiche Mahagoniblattwand", + "LivingMahoganyWand": "Lebendes-Mahagoni-Wand", + "LivingOceanDye": "Lebender-Ozean-Farbstoff", + "LivingRainbowDye": "Lebender-Regenbogen-Farbstoff", + "LivingUltrabrightFireBlock": "Lebendes-Ultrahellfeuer-Block", + "LivingWoodBathtub": "Lebendes-Holz-Badewanne", + "LivingWoodBed": "Lebendes-Holz-Bett", + "LivingWoodBookcase": "Lebendes-Holz-Bücherschrank", + "LivingWoodCandelabra": "Lebendes-Holz-Kandelaber", + "LivingWoodCandle": "Lebendes-Holz-Kerze", + "LivingWoodChandelier": "Lebendes-Holz-Kronleuchter", + "LivingWoodClock": "Lebendes-Holz-Uhr", + "LivingWoodLamp": "Lebendes-Holz-Lampe", + "LivingWoodLantern": "Lebendes-Holz-Laterne", + "LivingWoodPiano": "Lebendes-Holz-Klavier", + "LivingWoodPlatform": "Lebendes-Holzklappe", + "LivingWoodSink": "Lebendes-Holz-Waschbecken", + "LivingWoodSofa": "Lebendes-Holz-Sofa", + "LivingWoodWorkBench": "Lebendes-Holz-Werkbank", + "LockBox": "Goldene Schließkassette", + "LogicGateLamp_Faulty": "Logikgatter-Lampe (Fehlerhaft)", + "LogicGateLamp_Off": "Logikgatter-Lampe (Aus)", + "LogicGateLamp_On": "Logikgatter-Lampe (Ein)", + "LogicGate_AND": "Logikgatter (AND)", + "LogicGate_NAND": "Logikgatter (NAND)", + "LogicGate_NOR": "Logikgatter (NOR)", + "LogicGate_NXOR": "Logikgatter (XNOR)", + "LogicGate_OR": "Logikgatter (OR)", + "LogicGate_XOR": "Logikgatter (XOR)", + "LogicSensor_Above": "Logiksendor (obiger Spieler)", + "LogicSensor_Honey": "Flüssigkeitssensor (Honig)", + "LogicSensor_Lava": "Flüssigkeitssensor (Lava)", + "LogicSensor_Liquid": "Flüssigkeitssensor (beliebig)", + "LogicSensor_Moon": "Logiksensor (Nacht)", + "LogicSensor_Sun": "Logiksensor (Tag)", + "LogicSensor_Water": "Flüssigkeitssensor (Wasser)", + "LokisDye": "Lokis Farbstoff", + "LokisHelm": "Lokis Helm", + "LokisPants": "Lokis Beinschützer", + "LokisShirt": "Lokis Brustplatte", + "LokisWings": "Lokis Flügel", + "LunarBar": "Luminitbarren", + "LunarBlockNebula": "Nebula-Fragment-Block", + "LunarBlockSolar": "Sonnenfragment-Block", + "LunarBlockStardust": "Sternenstaubfragment-Block", + "LunarBlockVortex": "Vortex-Fragment-Block", + "LunarBrick": "Luminit-Ziegel", + "LunarBrickWall": "Luminit-Ziegelwand", + "LunarCraftingStation": "Uralter Manipulator", + "LunarFlareBook": "Monderuption", + "LunarHamaxeNebula": "Nebula-Hamaxt", + "LunarHamaxeSolar": "Sonneneruptions-Hamaxt", + "LunarHamaxeStardust": "Sternenstaub-Hamaxt", + "LunarHamaxeVortex": "Vortex-Hamaxt", + "LunarHook": "Mondhaken", + "LunarOre": "Luminit", + "LunarTabletFragment": "Sonnentafelfragment", + "MagicHoneyDropper": "Magischer Honig-Dropper", + "MagicLantern": "Magielaterne", + "MagicLavaDropper": "Magischer Lava-Dropper", + "MagicSandDropper": "Magischer Sand-Dropper", + "MagicWaterDropper": "Magischer Wasser-Dropper", + "Marble": "Marmorblock", + "MarbleBathtub": "Marmorbadewanne", + "MarbleBed": "Marmorbett", + "MarbleBlock": "Glatter Marmorblock", + "MarbleBlockWall": "Glatte Marmorwand", + "MarbleBookcase": "Marmorbuchregal", + "MarbleCandelabra": "Marmorkandelaber", + "MarbleCandle": "Marmorkerze", + "MarbleChair": "Marmorstuhl", + "MarbleChandelier": "Marmorkrohnleuchter", + "MarbleChest": "Marmortruhe", + "MarbleClock": "Marmoruhr", + "MarbleDoor": "Marmortür", + "MarbleDresser": "Marmorkommode", + "MarbleLamp": "Marmorlampe", + "MarbleLantern": "Marmorlaterne", + "MarblePiano": "Marmorklavier", + "MarblePlatform": "Marmorklappe", + "MarbleSink": "Marmorwaschbecken", + "MarbleSofa": "Marmorsofa", + "MarbleTable": "Marmortisch", + "MarbleWall": "Marmorwand", + "MarbleWorkBench": "Marmorwerkbank", + "MartianArmorDye": "Marsianer-Farbstoff", + "MartianAstroClock": "Marsianer-Astrouhr", + "MartianBathtub": "Marsianer-Badewanne", + "MartianBed": "Marsianer-Bett", + "MartianChandelier": "Marsianer-Kronleuchter", + "MartianChest": "Marsianer-Truhe", + "MartianConduitPlating": "Marsianer-Isolierüberzug", + "MartianConduitWall": "Marsianer-Isolierwand", + "MartianCostumeMask": "Marsianerkostüm-Maske", + "MartianCostumePants": "Marsianerkostüm-Hose", + "MartianCostumeShirt": "Marsianerkostüm-Hemd", + "MartianDoor": "Marsianer-Tür", + "MartianDresser": "Marsianer-Kommode", + "MartianHairDye": "Marsianer-Haarfärbemittel", + "MartianHolobookcase": "Marsianer-Holobuchregal", + "MartianHoverCandle": "Marsianer-Schwebekerze", + "MartianHoverChair": "Marsianer-Schwebestuhl", + "MartianLamppost": "Marsianer-Lampenpfosten", + "MartianLantern": "Marsianer-Laterne", + "MartianPiano": "Marsianer-Klavier", + "MartianPlatform": "Marsianer-Klappe", + "MartianSaucerTrophy": "Marsianer-UFO-Trophäe", + "MartianSink": "Marsianer-Waschbecken", + "MartianSofa": "Marsianer-Sofa", + "MartianTable": "Marsianer-Tisch", + "MartianTableLamp": "Marsianer-Tischlampe", + "MartianUniformHelmet": "Marsianer-Uniformhelm", + "MartianUniformPants": "Marsianer-Uniformhose", + "MartianUniformTorso": "Marsianer-Uniformrumpf", + "MartianWalkerBanner": "Marsianer-Läufer-Banner", + "MartianWorkBench": "Marsianer-Werkbank", + "MasterBait": "Meisterköder", + "MechanicalBatteryPiece": "Mechanisches Batteriestück", + "MechanicalLens": "Mechanische Linse", + "MechanicalWagonPiece": "Mechanisches Wagenstück", + "MechanicalWheelPiece": "Mechanisches Radstück", + "MedusaBanner": "Medusa-Banner", + "MedusaHead": "Medusa-Kopf", + "MedusaStatue": "Medusa-Statue", + "Meowmere": "Meowmere", + "MetalDetector": "Metalldetektor", + "MetalSink": "Metallwaschbecken", + "MeteoriteBathtub": "Meteoritenbadewanne", + "MeteoriteBed": "Meteoritenbett", + "MeteoriteBookcase": "Meteoritenbuchregal", + "MeteoriteBrick": "Meteoritenziegel", + "MeteoriteBrickWall": "Meteoriten-Ziegelwand", + "MeteoriteCandelabra": "Meteoritenkandelaber", + "MeteoriteCandle": "Meteoritenkerze", + "MeteoriteChair": "Meteoritenstuhl", + "MeteoriteChandelier": "Meteoritenkrohnleuchter", + "MeteoriteChest": "Meteoriten-Truhe", + "MeteoriteClock": "Meteoritenuhr", + "MeteoriteDoor": "Meteoritentür", + "MeteoriteDresser": "Meteoritenkommode", + "MeteoriteLamp": "Meteoritenlampe", + "MeteoriteLantern": "Meteoritenlaterne", + "MeteoritePiano": "Meteoritenklavier", + "MeteoritePlatform": "Meteoritenklappe", + "MeteoriteSink": "Meteoritenwaschbecken", + "MeteoriteSofa": "Meteoritensofa", + "MeteoriteTable": "Meteoritentisch", + "MeteoriteWorkBench": "Meteoriten-Werkbank", + "MeteorStaff": "Meteorstab", + "MidnightRainbowDye": "Mitternacht-Regenbogen-Farbstoff", + "MinecartMech": "Mechanischer Wagen", + "MinecartTrack": "Lorengleis", + "MirageDye": "Trugbild-Farbstoff", + "MolotovCocktail": "Molotowcocktail", + "MoneyTrough": "Geldtrog", + "MonkBelt": "Mönchsgürtel", + "MonkBrows": "Buschige-Augenbrauenkappe des Mönchs", + "MonkPants": "Mönchshose", + "MonkShirt": "Mönchshemd", + "MoonglowPlanterBox": "Mondglanz-Pflanzkasten", + "MoonlordArrow": "Luminit-Pfeil", + "MoonLordBossBag": "Schatzbeutel", + "MoonlordBullet": "Luminit-Kugel", + "MoonLordPainting": "Weder Kind noch Tintenfisch", + "MoonLordTrophy": "Mondherrentrophäe", + "MoonlordTurretStaff": "Mondportalstab", + "MoonMask": "Mondmaske", + "MothronBanner": "Mottron-Banner", + "MothronWings": "Mottron-Flügel", + "MouseStatue": "Mausstatue", + "MulticolorWrench": "Mehrfarbiger Schraubenschlüssel", + "MushroomBathtub": "Pilzbadewanne", + "MushroomBed": "Pilzbett", + "MushroomBench": "Pilzbank", + "MushroomBookcase": "Pilzbücherschrank", + "MushroomCandelabra": "Pilzkandelaber", + "MushroomCandle": "Pilzkerze", + "MushroomChandelier": "Pilzkronleuchter", + "MushroomChest": "Pilztruhe", + "MushroomClock": "Pilzuhr", + "MushroomDresser": "Pilzkommode", + "MushroomDye": "Glühender-Pilz-Farbstoff", + "MushroomLamp": "Pilzlampe", + "MushroomLantern": "Pilzlaterne", + "MushroomPiano": "Pilzklavier", + "MushroomPlatform": "Pilzklappe", + "MushroomSink": "Pilzwaschbecken", + "MushroomTable": "Pilztisch", + "MusicBoxGoblins": "Spieluhr (Goblininvasion)", + "MusicBoxHell": "Spieluhr (Hölle)", + "MusicBoxLunarBoss": "Spieluhr (Mondboss)", + "MusicBoxMartians": "Spieluhr (Marsianerwahnsinn)", + "MusicBoxPirates": "Spieluhr (Pirateninvasion)", + "MusicBoxSandstorm": "Spieluhr (Sandsturm)", + "MusicBoxTowers": "Spieluhr (Die Türme)", + "MusicBoxUndergroundCrimson": "Spieluhr (Untergrund-Purpur)", + "Nail": "Nagel", + "NailGun": "Bolzenschussgerät", + "NailheadBanner": "Nagelkopf-banner", + "NebulaArcanum": "Nebula Arcanum", + "NebulaAxe": "Nebula-Axt", + "NebulaBeastBanner": "Evolutionsbestien-Banner", + "NebulaBlaze": "Nebula-Aufflammen", + "NebulaBrainBanner": "Nebula-Wasserleichen-Banner", + "NebulaBreastplate": "Nebula-Brustplatte", + "NebulaChainsaw": "Nebula-Kettensäge", + "NebulaDrill": "Nebula-Bohrer", + "NebulaDye": "Nebula-Farbstoff", + "NebulaHammer": "Nebula-Hammer", + "NebulaHeadcrabBanner": "Gehirnsauger-Banner", + "NebulaHelmet": "Nebula-Helm", + "NebulaLeggings": "Nebula-Gamaschen", + "NebulaMonolith": "Nebula-Monolith", + "NebulaPickaxe": "Nebula-Spitzhacke", + "NebulaPickup1": "Schadensbooster", + "NebulaPickup2": "Lebensbooster", + "NebulaPickup3": "Manabooster", + "NebulaSoldierBanner": "Prophetenbanner", + "NegativeDye": "Negativ-Farbstoff", + "NightKey": "Schlüssel der Nacht", + "NightVisionHelmet": "Nachtsichthelm", + "ObsidianBathtub": "Obsidianbadewanne", + "ObsidianCandelabra": "Obsidiankandelaber", + "ObsidianCandle": "Obsidiankerze", + "ObsidianChandelier": "Obsidiankronleuchter", + "ObsidianChest": "Obsidiantruhe", + "ObsidianClock": "Obsidianuhr", + "ObsidianHelm": "Obsidian-Gesetzlosenhut", + "ObsidianLamp": "Obsidianlampe", + "ObsidianLantern": "Obsidianlaterne", + "ObsidianPants": "Obsidianhose", + "ObsidianShirt": "Obsidian-Mantel", + "ObsidianSink": "Obsidianwaschbecken", + "OnyxBlaster": "Onyx-Blaster", + "OrangeString": "Orangener Faden", + "PainterPaintballGun": "Paintball-Gewehr", + "PaintingAcorns": "Eicheln", + "PaintingCastleMarsberg": "Schloss Marsberg", + "PaintingColdSnap": "Kälteeinbruch", + "PaintingCursedSaint": "Verfluchter Heiliger", + "PaintingMartiaLisa": "Marsiana Lisa", + "PaintingSnowfellas": "Schneekumpel", + "PaintingTheSeason": "Die Jahreszeit", + "PaintingTheTruthIsUpThere": "Die Wahrheit ist da oben", + "PalmWood": "Palmholz", + "PalmWoodBathtub": "Palmholzbadewanne", + "PalmWoodBed": "Palmholzbett", + "PalmWoodBench": "Palmholzbank", + "PalmWoodBookcase": "Palmholzbücherschrank", + "PalmWoodBow": "Palmholzbogen", + "PalmWoodBreastplate": "Palmholzbrustpanzer", + "PalmWoodCandelabra": "Palmholzkandelaber", + "PalmWoodCandle": "Palmholzkerze", + "PalmWoodChair": "Palmholzstuhl", + "PalmWoodChandelier": "Palmholzkronleuchter", + "PalmWoodChest": "Palmholztruhe", + "PalmWoodClock": "Palmholzuhr", + "PalmWoodDoor": "Palmholztür", + "PalmWoodDresser": "Palmholzkommode", + "PalmWoodFence": "Palmholzzaun", + "PalmWoodGreaves": "Palmholzbeinschützer", + "PalmWoodHammer": "Palmholzhammer", + "PalmWoodHelmet": "Palmholzhelm", + "PalmWoodLamp": "Palmholzlampe", + "PalmWoodLantern": "Palmholzlaterne", + "PalmWoodPiano": "Palmholzklavier", + "PalmWoodPlatform": "Palmholzklappe", + "PalmWoodSink": "Palmholzwaschbecken", + "PalmWoodSofa": "Palmholzsofa", + "PalmWoodSword": "Palmholzschwert", + "PalmWoodTable": "Palmholztisch", + "PalmWoodWall": "Palmholzwand", + "PalmWoodWorkBench": "Palmholzwerkbank", + "PartyBalloonAnimal": "Luftballontier", + "PartyBundleOfBalloonsAccessory": "Partyballonbündel", + "PartyBundleOfBalloonTile": "Albernes Ballonbündel", + "PartyGirlGrenade": "Glückliche Granate", + "PartyHat": "Partyhut", + "PartyMonolith": "Partyzentrale", + "PartyPresent": "Partygeschenk", + "PDA": "PDA", + "PeaceCandle": "Friedenskerze", + "PearlwoodBathtub": "Perlholzbadewanne", + "PearlwoodBookcase": "Perlholzbücherschrank", + "PearlwoodCandelabra": "Perlholzkandelaber", + "PearlwoodCandle": "Perlholzkerze", + "PearlwoodChandelier": "Perlholzkronleuchter", + "PearlwoodClock": "Perlholzuhr", + "PearlwoodLamp": "Perlholzlampe", + "PearlwoodLantern": "Perlholzlaterne", + "PearlwoodSink": "Perlholzwaschbecken", + "PedguinHat": "Pedguins Kapuze", + "PedguinPants": "Pedguins Hose", + "PedguinShirt": "Pedguins Jacke", + "PenguinStatue": "Pinguinstatue", + "Phantasm": "Phantasm", + "PhaseDye": "Laser-Farbstoff", + "PhasicWarpEjector": "Phasen-Warp-Auswerfer", + "Pigronata": "Schwrachnata", + "PigronStatue": "Schwrachen-Statue", + "PinkDungeonBathtub": "Rosa Verliesbadewanne", + "PinkDungeonCandelabra": "Rosa Verlieskandelaber", + "PinkDungeonChandelier": "Rosa Verlieskronleuchter", + "PinkDungeonChest": "Rosa Verliestruhe", + "PinkDungeonLamp": "Rosa Verlieslampe", + "PinkDungeonSink": "Rosa Verlieswaschbecken", + "PinkGel": "Rosa Gel", + "PinkGelDye": "Rosa Gelfarbe", + "PinkJellyfishBanner": "Rosa-Quallen-Banner", + "PinkSlimeBlock": "Rosa Schleimblock", + "PinkString": "Rosa Faden", + "PinkTorch": "Rosa Fackel", + "PirateCaptainBanner": "Piratenkäpt'n-Banner", + "PirateCorsairBanner": "Piratenkorsarbanner", + "PirateCrossbowerBanner": "Piratenarmbrusterbanner", + "PirateDeadeyeBanner": "Piratenjungferbanner", + "PirateStaff": "Piratenstab", + "PixelBox": "Pixelbox", + "PixieDye": "Pixie-Farbstoff", + "PlanteraBossBag": "Schatzbeutel", + "PlanteraMask": "Planteramaske", + "PocketMirror": "Taschenspiegel", + "PoisonousSporeBanner": "Giftsporen-Banner", + "PortalGun": "Portalrevolver", + "PortalGunStation": "Portalrevolverstation", + "PressureTrack": "Druckplattengleis", + "ProjectilePressurePad": "Blaugrüne Druckplatte", + "PsychoBanner": "Psycho-banner", + "PsychoKnife": "Psycho-Messer", + "PumpkinBathtub": "Kürbisbadewanne", + "PumpkinBed": "Kürbisbett", + "PumpkinBookcase": "Kürbisbücherschrank", + "PumpkinCandelabra": "Kürbiskandelaber", + "PumpkinCandle": "Kürbiskerze", + "PumpkinChandelier": "Kürbiskronleuchter", + "PumpkinChest": "Kürbistruhe", + "PumpkinClock": "Kürbisuhr", + "PumpkinDresser": "Kürbiskommode", + "PumpkinLamp": "Kürbislampe", + "PumpkinLantern": "Kürbislaterne", + "PumpkinPiano": "Kürbisklavier", + "PumpkinSink": "Kürbiswaschbecken", + "PurpleCounterweight": "Lila Gegengewicht", + "PurpleOozeDye": "Lila Schlamm-Farbstoff", + "PurplePhasesaber": "Lila Laserschwert", + "PurpleString": "Lila Faden", + "PutridScent": "Fäulnisgeruch", + "QueenBeeBossBag": "Schatzbeutel", + "Radar": "Radar", + "RainbowCampfire": "Regenbogen-Lagerfeuer", + "RainbowCrystalStaff": "Regenbogenkristallstab", + "RainbowString": "Regenbogen-Faden", + "RainbowTorch": "Regenbogenfackel", + "Rally": "Zusammenrufen", + "RazorbladeTyphoon": "Rasierklingentaifun", + "RedAcidDye": "Roter Säurefarbstoff", + "RedCounterweight": "Rotes Gegengewicht", + "RedDevilBanner": "Roter-Teufel-Banner", + "RedPhasesaber": "Rotes Laserschwert", + "RedString": "Roter Faden", + "RedsYoyo": "Reds Überwurf", + "ReflectiveCopperDye": "Spiegelnder Kupferfarbstoff", + "ReflectiveDye": "Spiegelnder Farbstoff", + "ReflectiveGoldDye": "Spiegelnder Goldfarbstoff", + "ReflectiveMetalDye": "Spiegelnder Metallfarbstoff", + "ReflectiveObsidianDye": "Spiegelnder Obsidianfarbstoff", + "ReflectiveSilverDye": "Spiegelnder Silberfarbstoff", + "REK": "R.E.K. 3000", + "RichGravestone1": "Goldkreuz-Grabkreuz", + "RichGravestone2": "Goldener Grabstein", + "RichGravestone3": "Goldenes Grabkreuz", + "RichGravestone4": "Goldene Grabplatte", + "RichGravestone5": "Goldener Leichenstein", + "RichMahoganyBathtub": "Reiche Mahagonibadewanne", + "RichMahoganyBookcase": "Reicher Mahagonibücherschrank", + "RichMahoganyCandelabra": "Reicher Mahagonikandelaber", + "RichMahoganyCandle": "Reiche Mahagonikerze", + "RichMahoganyChandelier": "Reicher Mahagonikronleuchter", + "RichMahoganyClock": "Reiche Mahagoniuhr", + "RichMahoganyLamp": "Reiche Mahagonilampe", + "RichMahoganyLantern": "Reiche Mahagonilaterne", + "RichMahoganySink": "Reiches Mahagoniwaschbecken", + "RoyalGel": "Königliches Gel", + "RubyGemsparkWall": "Rubin-Funkenedelstein-Wand", + "RubyGemsparkWallOff": "Offline-Rubin-Funkenedelstein-Wand", + "SailfishBoots": "Speerfischstiefel", + "SalamanderBanner": "Salamander-Banner", + "SandElementalBanner": "Sand-Elementar-Banner", + "SandFallWall": "Sandstrom-Wand", + "SandsharkBanner": "Sandhai-Banner", + "SandsharkCorruptBanner": "Knochenbeißer-Banner", + "SandsharkCrimsonBanner": "Fleischräuber-Banner", + "SandsharkHallowedBanner": "Kristalldrescher-Banner", + "SandSlimeBanner": "Sandschleim-Banner", + "Sandstone": "Sandstein-Block", + "SandstoneWall": "Sandstein-Wand", + "SapphireGemsparkWall": "Saphir-Funkenedelstein-Wand", + "SapphireGemsparkWallOff": "Offline-Saphir-Funkenedelstein-Wand", + "ScalyTruffle": "Schuppentrüffel", + "ScorpionStatue": "Skorpionstatue", + "Seashell": "Seemuschel", + "SeaSnailBanner": "Meeresschnecken-Banner", + "Seedler": "Setzling", + "SeveredHandBanner": "Abgetrennte-Hand-Banner", + "Sextant": "Sextant", + "ShadewoodBathtub": "Schattenholzbadewanne", + "ShadewoodBookcase": "Schattenholzbücherschrank", + "ShadewoodCandelabra": "Schattenholzkandelaber", + "ShadewoodCandle": "Schattenholzkerze", + "ShadewoodChandelier": "Schattenholzkronleuchter", + "ShadewoodClock": "Schattenholzuhr", + "ShadewoodLamp": "Schattenholzlampe", + "ShadewoodLantern": "Schattenholzlaterne", + "ShadewoodSink": "Schattenholzwaschbecken", + "ShadowDye": "Schattenfarbe", + "ShadowFlameBow": "Schattenflammenbogen", + "ShadowflameHadesDye": "Schattenflammen-Hades-Farbstoff", + "ShadowFlameHexDoll": "Schattenflammen-Voodoopuppe", + "ShadowFlameKnife": "Schattenflammenmesser", + "SharkronBalloon": "Drachei-Ballon", + "SharkStatue": "Haistatue", + "SharkteethTrophy": "Haizahntrophäe", + "SharkToothNecklace": "Haizahn-Halskette", + "SharpeningStation": "Schleifstation", + "ShiftingPearlSandsDye": "Wechselnder-Perlsand-Farbstoff", + "ShiftingSandsDye": "Wechselnder-Sandfarbstoff", + "ShinyStone": "Glänzender Stein", + "ShipsWheel": "Ruder", + "ShiverthornPlanterBox": "Zitterdorn-Pflanzkasten", + "ShrimpyTruffle": "Shrimpige Trüffel", + "ShroomitePlating": "Pilzmit-Überzug", + "ShroomitePlatingWall": "Pilzmit-Überzugwand", + "SilkRope": "Seidenseil", + "SilkRopeCoil": "Seidenseilrolle", + "SillyBalloonGreen": "Alberner Grüner Ballon", + "SillyBalloonGreenWall": "Alberner-Grüner-Ballon-Wand", + "SillyBalloonMachine": "Alberne Ballonmaschine", + "SillyBalloonPink": "Alberner Rosa Ballon", + "SillyBalloonPinkWall": "Alberner-Rosa-Ballon-Wand", + "SillyBalloonPurple": "Alberner Lila Ballon", + "SillyBalloonPurpleWall": "Alberner-Lila-Ballon-Wand", + "SillyBalloonTiedGreen": "Alberner Ballon an Schnur (Grün)", + "SillyBalloonTiedPink": "Alberner Ballon an Schnur (Rosa)", + "SillyBalloonTiedPurple": "Alberner Ballon an Schnur (Lila)", + "SillyStreamerBlue": "Blauer Wimpel", + "SillyStreamerGreen": "Grüner Wimpel", + "SillyStreamerPink": "Rosa Wimpel", + "SilverAndBlackDye": "Silberner und Schwarzer Farbstoff", + "SkeletronBossBag": "Schatzbeutel", + "SkeletronPrimeBossBag": "Schatzbeutel", + "SkeletronPrimeMask": "Skeletron-Prime-Maske", + "SkyBlueString": "Himmelblauer Faden", + "SkyFracture": "Himmelsriss", + "SkywareBathtub": "Himmelswarenbadewanne", + "SkywareBed": "Himmelswarenbett", + "SkywareBookcase": "Himmelswarenbücherschrank", + "SkywareCandelabra": "Himmelswarenkandelaber", + "SkywareCandle": "Himmelswarenkerze", + "SkywareChandelier": "Himmelswarenkronleuchter", + "SkywareClock": "Himmelswarenuhr", + "SkywareLamp": "Himmelswarenlampe", + "SkywareLantern": "Himmelswarenlaterne", + "SkywarePlatform": "Himmelswarenklappe", + "SkywareSink": "Himmelswarenwaschbecken", + "SkywareWorkbench": "Himmelswarenwerkbank", + "SlapHand": "Handklatsche", + "SliceOfCake": "Kuchenstück", + "SlimeBathtub": "Schleimbadewanne", + "SlimeBed": "Schleimbett", + "SlimeBookcase": "Schleimbücherschrank", + "SlimeCandelabra": "Schleimkandelaber", + "SlimeCandle": "Schleimkerze", + "SlimeChair": "Schleimstuhl", + "SlimeChandelier": "Schleimkronleuchter", + "SlimeChest": "Schleimtruhe", + "SlimeClock": "Schleimuhr", + "SlimeDoor": "Schleimtür", + "SlimeDresser": "Schleimkommode", + "SlimeGun": "Schleimpistole", + "SlimeHook": "Schleimhaken", + "SlimeLamp": "Schleimlampe", + "SlimeLantern": "Schleimlaterne", + "SlimePiano": "Schleimklavier", + "SlimePlatform": "Schleimklappe", + "SlimeSink": "Schleimwaschbecken", + "SlimeSofa": "Schleimsofa", + "SlimeTable": "Schleimtisch", + "SlimySaddle": "Schleimsattel", + "Sluggy": "Sluggy", + "SmokeBlock": "Rauchblock", + "SnailStatue": "Schneckenstatue", + "SnowCloudBlock": "Schneewolke", + "SnowFallWall": "Schneefall-Wand", + "SolarCoriteBanner": "Korit-Banner", + "SolarCrawltipedeBanner": "Krabbelfüßler-Banner", + "SolarDrakomireBanner": "Drakomir-Banner", + "SolarDrakomireRiderBanner": "Drakomir-Reiter-Banner", + "SolarDye": "Sonnenfarbstoff", + "SolarEruption": "Sonnenausbruch", + "SolarFlareAxe": "Sonneneruptionsaxt", + "SolarFlareBreastplate": "Sonneneruptions-Brustplatte", + "SolarFlareChainsaw": "Sonneneruptions-Kettensäge", + "SolarFlareDrill": "Sonneneruptions-Bohrer", + "SolarFlareHammer": "Sonneneruptions-Hammer", + "SolarFlareHelmet": "Sonneneruptions-Helm", + "SolarFlareLeggings": "Sonneneruptions-Gamaschen", + "SolarFlarePickaxe": "Sonneneruptions-Spitzhacke", + "SolarMonolith": "Sonnenmonolith", + "SolarSolenianBanner": "Selenisches Banner", + "SolarSrollerBanner": "Sroller-Banner", + "SolarTablet": "Sonnentafel", + "SoulDrain": "Lebensabfluss", + "SparkyPainting": "Funky", + "SpectreBar": "Geisterbarren", + "SpelunkerGlowstick": "Höhlengänger-Leuchtstab", + "SpiderFang": "Spinnengiftzahn", + "SpiderStaff": "Spinnenstab", + "SpiritFlame": "Geisterflamme", + "SpookyBathtub": "Schaurige Badewanne", + "SpookyBed": "Schauriges Bett", + "SpookyBookcase": "Schauriger Bücherschrank", + "SpookyCandelabra": "Schauriger Kandelaber", + "SpookyCandle": "Schaurige Kerze", + "SpookyChandelier": "Schauriger Kronleuchter", + "SpookyChest": "Schaurige Truhe", + "SpookyClock": "Schaurige Uhr", + "SpookyLamp": "Schaurige Lampe", + "SpookyLantern": "Schaurige Laterne", + "SpookySink": "Schauriges Waschbecken", + "SporeSac": "Sporenbeutel", + "SquireGreatHelm": "Großhelm des Knappen", + "SquireGreaves": "Beinschützer des Knappen", + "SquirePlating": "Rüstung des Knappen", + "SquireShield": "Schild des Knappen", + "SquirrelGold": "Goldeichhörnchen", + "SquirrelGoldCage": "Goldeichhörnchenkäfig", + "SquirrelOrangeCage": "Roteichhörnchenkäfig", + "SquirrelRed": "Roteichhörnchen", + "SquirrelStatue": "Eichhörnchenstatue", + "StardustAxe": "Sternenstaub-Axt", + "StardustBreastplate": "Sternenstaub-Platte", + "StardustCellStaff": "Sternenstaubzellen-Stab", + "StardustChainsaw": "Sternenstaub-Kettensäge", + "StardustDragonStaff": "Sternenstaub-Drachenstab", + "StardustDrill": "Sternenstaub-Bohrer", + "StardustDye": "Sternenstaub-Farbstoff", + "StardustHammer": "Sternenstaub-Hammer", + "StardustHelmet": "Sternenstaub-Helm", + "StardustJellyfishBanner": "Flusseindringling-Banner", + "StardustLargeCellBanner": "Sternenzellen-Banner", + "StardustLeggings": "Sternenstaub-Gamaschen", + "StardustMonolith": "Sternenstaub-Monolith", + "StardustPickaxe": "Sternenstaub-Spitzhacke", + "StardustSmallCellBanner": "Kleines Sternenzellen-Banner", + "StardustSoldierBanner": "Sternengucker-Banner", + "StardustSpiderBanner": "Twinkle-Maschine-Banner", + "StardustWormBanner": "Milchstraßenschweber-Banner", + "Starfish": "Seestern", + "StarWrath": "Sternenzorn", + "StaticHook": "Statischer Haken", + "SteampunkBathtub": "Steampunk-Badewanne", + "SteampunkBookcase": "Steampunkbücherschrank", + "SteampunkCandelabra": "Steampunkkandelaber", + "SteampunkCandle": "Steampunkkerze", + "SteampunkChandelier": "Steampunkkronleuchter", + "SteampunkChest": "Steampunk-Truhe", + "SteampunkClock": "Steampunk-Uhr", + "SteampunkCup": "Kelch", + "SteampunkDresser": "Steampunkkommode", + "SteampunkLamp": "Steampunk-Lampe", + "SteampunkLantern": "Steampunk-Laterne", + "SteampunkPiano": "Steampunk-Klavier", + "SteampunkPlatform": "Steampunk-Klappe", + "SteampunkSink": "Steampunk-Waschbecken", + "SteampunkWorkBench": "Steampunk-Werkbank", + "StickyDynamite": "Klebriges Dynamit", + "StickyGrenade": "Haftgranate", + "Stopwatch": "Stoppuhr", + "StrangeBrew": "Seltsames Getränk", + "StrangePlant1": "Seltsame Pflanze", + "StrangePlant2": "Seltsame Pflanze", + "StrangePlant3": "Seltsame Pflanze", + "StrangePlant4": "Seltsame Pflanze", + "StylistKilLaKillScissorsIWish": "Modeschere", + "SummonerEmblem": "Beschwörer-Emblem", + "Sundial": "Verzauberte Sonnenuhr", + "SunMask": "Sonnenmaske", + "SuperAbsorbantSponge": "Supersaugschwamm", + "SuperHealingPotion": "Superheiltrank", + "SuspiciousLookingTentacle": "Verdächtig aussehendes Tentakel", + "SwordfishTrophy": "Schwertfischtrophäe", + "TallGate": "Hohes Tor", + "TallyCounter": "Stückzähler", + "TargetDummy": "Zielpuppe", + "TartarSauce": "Tartarsauce", + "TaxCollectorHat": "Steuereintreiberhut", + "TaxCollectorPants": "Steuereintreiberhose", + "TaxCollectorsStickOfDoom": "Klassischer Stock", + "TaxCollectorSuit": "Steuereintreiberanzug", + "TealString": "Blaugrüner Faden", + "TeamBlockBlue": "Blaues-Team-Block", + "TeamBlockBluePlatform": "Blaues-Team-Klappe", + "TeamBlockGreen": "Grünes-Team-Block", + "TeamBlockGreenPlatform": "Grünes-Team-Klappe", + "TeamBlockPink": "Rosa-Team-Block", + "TeamBlockPinkPlatform": "Rosa-Team-Klappe", + "TeamBlockRed": "Rotes-Team-Block", + "TeamBlockRedPlatform": "Rotes-Team-Klappe", + "TeamBlockWhite": "Weißes-Team-Block", + "TeamBlockWhitePlatform": "Weißes-Team-Klappe", + "TeamBlockYellow": "Gelbes-Team-Block", + "TeamBlockYellowPlatform": "Gelbes-Team-Klappe", + "TempestStaff": "Sturmstab", + "TendonHook": "Sturmhaken", + "Terrarian": "Terraner", + "TheBrideDress": "Hochzeitskleid", + "TheBrideHat": "Hochzeitsschleier", + "TheEyeOfCthulhu": "Das Auge von Cthulhu", + "ThePossessedBanner": "Das besessene Banner", + "ThornHook": "Dornenhaken", + "TinPlating": "Blechüberzug", + "TinPlatingWall": "Blechüberzugwand", + "TombCrawlerBanner": "Grabkriecherbanner", + "TopazGemsparkWall": "Topas-Funkenedelstein-Wand", + "TopazGemsparkWallOff": "Offline-Topas-Funkenedelstein-Wand", + "ToxicFlask": "Giftflasche", + "Toxikarp": "Toxikarpfen", + "Trapdoor": "Falltür", + "TruffleWorm": "Trüffelwurm", + "Tsunami": "Tsunami", + "TsunamiInABottle": "Tsunami in der Flasche", + "TumbleweedBanner": "Wütender-Steppenroller-Banner", + "TwilightDye": "Zwielicht-Farbstoff", + "TwilightHairDye": "Zwielicht-Haarfärbemittel", + "TwinMask": "Zwillingsmaske", + "TwinsBossBag": "Schatzbeutel", + "UndeadVikingStatue": "Untoter-Wikinger-Statue", + "UnicornStatue": "Einhornstatue", + "UnicornWispDye": "Einhorn-Irrlicht-Farbstoff", + "ValkyrieYoyo": "Walküren-Jojo", + "Valor": "Mut", + "ViciousMushroom": "Böser Pilz", + "ViciousPowder": "Böses Pulver", + "VineRope": "Rankenseil", + "VineRopeCoil": "Rankenseilrolle", + "VioletString": "Violetter Faden", + "VoidDye": "Leere-Farbstoff", + "VortexAxe": "Vortex-Axt", + "VortexBeater": "Vortex-Schläger", + "VortexBreastplate": "Vortex-Brustplatte", + "VortexChainsaw": "Vortex-Kettensäge", + "VortexDrill": "Vortex-Bohrer", + "VortexDye": "Vortex-Farbstoff", + "VortexHammer": "Vortex-Hammer", + "VortexHelmet": "Vortex-Helm", + "VortexHornetBanner": "Alien-Hornissenbanner", + "VortexHornetQueenBanner": "Alienköniginnenbanner", + "VortexLarvaBanner": "Alienlarvenbanner", + "VortexLeggings": "Vortex-Gamaschen", + "VortexMonolith": "Vortex-Monolith", + "VortexPickaxe": "Vortex-Spitzhacke", + "VortexRiflemanBanner": "Sturmtaucher-Banner", + "VortexSoldierBanner": "Vortexier-Banner", + "WalkingAntlionBanner": "Ameisenlöwenläufer-Banner", + "WallAnchor": "Maueranker", + "WallCreeperStatue": "Wandkriecherstatue", + "WallOfFleshBossBag": "Schatzbeutel", + "WandofSparking": "Wand der Funken", + "WarTable": "Kriegstisch", + "WarTableBanner": "Kriegstischbanner", + "WaterfallBlock": "Wasserfallblock", + "WaterleafPlanterBox": "Wasserblatt-Pflanzkasten", + "WeaponRack": "Waffenregal", + "WeatherRadio": "Wetterradio", + "WebRope": "Netzseil", + "WebRopeCoil": "Netzseilrolle", + "WeightedPressurePlateCyan": "Gewichtete Zyan-Druckplatte", + "WeightedPressurePlateOrange": "Gewichtete Orange Druckplatte", + "WeightedPressurePlatePink": "Gewichtete Rosa Druckplatte", + "WeightedPressurePlatePurple": "Gewichtete Lila Druckplatte", + "WhiteLunaticHood": "Sonnenkultistenkapuze", + "WhiteLunaticRobe": "Sonnenkultistenrobe", + "WhitePhasesaber": "Weißes Laserschwert", + "WhiteString": "Weißer Faden", + "WineGlass": "Weinglas", + "WingsNebula": "Nebula-Mantel", + "WingsSolar": "Sonnenflügel", + "WingsStardust": "Sternenstaubflügel", + "WingsVortex": "Vortex-Booster", + "WireBulb": "Kabelglühbirne", + "WireKite": "Das große Design", + "WirePipe": "Kabelkasten", + "WispDye": "Irrlicht-Farbstoff", + "WoodenSink": "Holzwaschbecken", + "WoodYoyo": "Holzjojo", + "WormholePotion": "Wurmlochtrank", + "WormHook": "Wurmhaken", + "WormScarf": "Wurmschal", + "WormStatue": "Wurmstatue", + "WraithStatue": "Monstergeist", + "Xenopopper": "Xenopopper", + "XenoStaff": "Xenostab", + "Yelets": "Jelez", + "YellowCounterweight": "Gelbes Gegengewicht", + "YellowPhasesaber": "Gelbes Laserschwert", + "YellowString": "Gelber Faden", + "YellowWrench": "Gelber Schraubenschlüssel", + "Yoraiz0rDarkness": "Yoraiz0rs finsterer Blick", + "Yoraiz0rHead": "Yoraiz0rs umgefärbte Brille", + "Yoraiz0rPants": "Yoraiz0rs Rock", + "Yoraiz0rShirt": "Yoraiz0rs Uniform", + "Yoraiz0rWings": "Yoraiz0rs Zauber", + "YoyoBag": "Jojobeutel", + "YoYoGlove": "Jojohandschuh", + "ZombieArmStatue": "Bewaffnete Zombiestatue", + "AleThrowingGlove": "Bierwerfer", + "ApprenticeAltHead": "Hut des Dunkelkünstlers", + "ApprenticeAltPants": "Gamaschen des Dunkelkünstlers", + "ApprenticeAltShirt": "Roben des Dunkelkünstlers", + "ApprenticeStaffT3": "Betsys Zorn", + "BetsyWings": "Betsys Flügel", + "BookStaff": "Buch des unendlichen Wissens", + "BossMaskBetsy": "Betsy-Maske", + "BossMaskDarkMage": "Dunkelmagiermaske", + "BossMaskOgre": "Ogermaske", + "BossTrophyBetsy": "Betsy-Trophäe", + "BossTrophyDarkmage": "Dunkelmagiertrophäe", + "BossTrophyOgre": "Ogertrophäe", + "CrystalBathtub": "Kristallwanne", + "CrystalBed": "Kristallbett", + "CrystalBookCase": "Kristallbuchregal", + "CrystalCandelabra": "Kristallkandelaber", + "CrystalCandle": "Kristallkerze", + "CrystalChair": "Kristallstuhl", + "CrystalChandelier": "Kristallkronleuchter", + "CrystalChest": "Kristalltruhe", + "CrystalClock": "Kristalluhr", + "CrystalDoor": "Kristalltür", + "CrystalDresser": "Kristallkommode", + "CrystalLamp": "Kristalllampe", + "CrystalLantern": "Kristalllaterne", + "CrystalPiano": "Kristallklavier", + "CrystalPlatform": "Kristallklappe", + "CrystalSink": "Kristallwaschbecken", + "CrystalSofaHowDoesThatEvenWork": "Kristallsofa", + "CrystalTable": "Kristalltisch", + "CrystalWorkbench": "Kristallwerkbank", + "DD2BallistraTowerT1Popper": "Ballistarute", + "DD2BallistraTowerT2Popper": "Ballistastab", + "DD2BallistraTowerT3Popper": "Ballistastock", + "DD2BetsyBow": "Fliegender Schrecken", + "DD2DrakinBanner": "Drakin-Banner", + "DD2ElderCrystal": "Eternia-Kristall", + "DD2ElderCrystalStand": "Eternia-Kristallständer", + "DD2EnergyCrystal": "Etherisches Mana", + "DD2ExplosiveTrapT1Popper": "Sprengfallenrute", + "DD2ExplosiveTrapT2Popper": "Sprengfallenstock", + "DD2ExplosiveTrapT3Popper": "Sprengfallenstab", + "DD2FlameburstTowerT1Popper": "Flammenstoß-Rute", + "DD2FlameburstTowerT2Popper": "Flammenstoß-Stock", + "DD2FlameburstTowerT3Popper": "Flammenstoß-Stab", + "DD2GoblinBanner": "Etherischer-Goblin-Banner", + "DD2GoblinBomberBanner": "Etherischer-Goblin-Bomber-Banner", + "DD2JavelinThrowerBanner": "Etherischer-Speerwerfer-Banner", + "DD2KoboldBanner": "Kobold-Banner", + "DD2KoboldFlyerBanner": "Kobold-Gleiter-Banner", + "DD2LightningAuraT1Popper": "Blitzaura-Rute", + "DD2LightningAuraT2Popper": "Blitzaura-Stock", + "DD2LightningAuraT3Popper": "Blitzaura-Stab", + "DD2LightningBugBanner": "Etherischer-Leuchtkäfer-Banner", + "DD2PetDragon": "Drachenei", + "DD2PetGato": "Gato-Ei", + "DD2PetGhost": "Kriecherei", + "DD2PhoenixBow": "Phantom-Phönix", + "DD2SkeletonBanner": "Skelettbanner des Alten", + "DD2SquireBetsySword": "Fliegender Drache", + "DD2SquireDemonSword": "Höllenbrand", + "DD2WitherBeastBanner": "Welkbestien-Banner", + "DD2WyvernBanner": "Etherischer-Lindwurm-Banner", + "DungeonClockBlue": "Blaue Verliesuhr", + "DungeonClockGreen": "Grüne Verliesuhr", + "DungeonClockPink": "Rosa Verliesuhr", + "DynastyDresser": "Dynastiekommode", + "DynastyPiano": "Dynastieklavier", + "DynastySofa": "Dynastiesofa", + "Fake_CrystalChest": "Gefangene Kristalltruhe", + "Fake_GoldenChest": "Gefangene Goldtruhe", + "FleshPlatform": "Fleischklappe", + "FrozenDresser": "Gefrorene Kommode", + "FrozenPlatform": "Gefrorene Klappe", + "GoldenChest": "Goldene Truhe", + "GoldenPlatform": "Goldene Klappe", + "GoldenWorkbench": "Goldene Werkbank", + "HuntressAltHead": "Rotkäppchen", + "HuntressAltPants": "Rotkäppchen-Gamaschen", + "HuntressAltShirt": "Rotkäppchen-Kleid", + "LihzahrdPlatform": "Lihzahrd-Klappe", + "LivingWoodDresser": "Lebendes-Holz-Kommode", + "MonkAltHead": "Helm des Shinobi-Eindringlings", + "MonkAltPants": "Hose des Shinobi-Eindringlings", + "MonkAltShirt": "Rumpf des Shinobi-Eindringlings", + "MonkStaffT1": "Müde Krake", + "MonkStaffT2": "Grausige Glefe", + "MonkStaffT3": "Wut des Himmelsdrachen", + "SquireAltHead": "Helm des Walhalla-Ritters", + "SquireAltPants": "Beinschützer des Walhalla-Ritters", + "SquireAltShirt": "Brustplatte des Walhalla-Ritters", + "SkywareClock2": "Sonnenplattenuhr", + "LeinforsHat": "Leinfors‘ Haarschutz", + "LeinforsShirt": "Leinfors‘ übertriebener Stil", + "LeinforsPants": "Leinfors‘ schicke Hose", + "LeinforsWings": "Leinfors‘ Greifmantel", + "LeinforsAccessory": "Leinfors‘ Luxusshampoo", + "GraniteGolemBanner": "Granitgolem-Banner", + "RavagerScorpionBanner": "Sandwilderer-Banner", + "MusicBoxDD2": "Spieluhr (Armee des Alten)", + "BossBagBetsy": "{$ItemName.SkeletronBossBag}" + }, + "ItemTooltip": { + "ShadowGreaves": "Um 7% erhöhtes Nahkampftempo", + "ConfettiGun": "Verschießt Konfetti in alle Richtungen", + "ChlorophyteMask": "Um 16% erhöhter Nahkampfschaden\nUm 6% erhöhte kritische Nahkampf-Trefferchance", + "ChlorophyteHelmet": "Um 16% erhöhter Fernkampfschaden\n20% Chance, keine Munition zu verbrauchen", + "ChlorophyteHeadgear": "Erhöht maximales Mana um 80 und verringert Manaverbrauch um 17%\nUm 16% erhöhter magischer Schaden", + "ChlorophytePlateMail": "Um 5% erhöhter Schaden\nKritische Trefferchance um 7% erhöht", + "ChlorophyteGreaves": "Kritische Trefferchance um 8% erhöht\nUm 5% erhöhte Bewegungsgeschwindigkeit", + "ChlorophyteBar": "Reagiert auf Licht", + "ShadowScalemail": "Um 7% erhöhtes Nahkampftempo", + "ShadowHelmet": "Um 7% erhöhtes Nahkampftempo", + "NightmarePickaxe": "Kann Höllenstein abbauen", + "Paintbrush": "Verwendet mit Farbe, um Blöcke anzumalen", + "PaintRoller": "Verwendet mit Farbe, um Wände anzumalen", + "ManaCrystal": "Erhöht maximales Mana dauerhaft um 20", + "GolfBallDyedPink": "{$CommonItemTooltip.GolfBall}", + "TealMushroom": "Um blaugrünen Farbstoff herzustellen", + "GreenMushroom": "Um grünen Farbstoff herzustellen", + "SkyBlueFlower": "Um himmelblauen Farbstoff herzustellen", + "BandofStarpower": "Erhöht das Höchstmana um 20", + "YellowMarigold": "Um gelben Farbstoff herzustellen", + "BlueBerries": "Um blauen Farbstoff herzustellen", + "LimeKelp": "Um limonenfarbigen Farbstoff herzustellen", + "PinkPricklyPear": "Um rosa Farbstoff herzustellen", + "OrangeBloodroot": "Um orangenen Farbstoff herzustellen", + "RedHusk": "Um roten Farbstoff herzustellen", + "CyanHusk": "Um Zyan Farbstoff herzustellen", + "VioletHusk": "Um violetten Farbstoff herzustellen", + "PurpleMucos": "Um lilanen Farbstoff herzustellen", + "BlackInk": "Um schwarzen Farbstoff herzustellen", + "FlowerofFire": "Schießt Feuerbälle ab", + "DyeVat": "Um Farbstoffe herzustellen", + "BeeGun": "Verschießt Bienen, die deinen Gegner verfolgen", + "PossessedHatchet": "Verfolgt deinen Gegner", + "BeeKeeper": "Beschwört Killerbienen, nachdem dein Widersacher getroffen wurde\nKleine Chance, Verwirrung zu stiften", + "HiveWand": "Platziert Bienenstöcke", + "MagicMissile": "Wirft eine steuerbare Rakete aus", + "Beenade": "Explodiert in einen Schwarm Bienen", + "GravityGlobe": "Lässt den Besitzer die Schwerkraft umkehren\nDrücke HOCH, um die Schwerkraft zu ändern", + "KiteRed": "{$CommonItemTooltip.Kite}", + "Abeemination": "Beschwört die Bienenkönigin", + "DirtRod": "Bewegt magisch Dreck", + "TempleKey": "Öffnet die Tür zum Dschungeltempel", + "LihzahrdWorkBench": "Wird zur einfachen Herstellung verwendet", + "ShadowOrb": "Erschafft eine magische Schattenkugel", + "LihzahrdPressurePlate": "Wird aktiviert, wenn ein Spieler drauftritt", + "PiranhaGun": "Hängt sich an Gegner heran, um durchgehend für Schaden zu sorgen", + "PygmyStaff": "Beschwört einen Pygmäen, der für dich kämpft", + "KiteBlueAndYellow": "{$CommonItemTooltip.Kite}", + "KiteBlue": "{$CommonItemTooltip.Kite}", + "KiteWyvern": "{$CommonItemTooltip.Kite}", + "GroxTheGreatGreaves": "{$CommonItemTooltip.DevItem}", + "LeafWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BlizzardinaBalloon": "Ermöglicht einen Doppelsprung\nVergrößert die Sprunghöhe", + "BundleofBalloons": "Ermöglicht einen Vierfachsprung\nVergrößert die Sprunghöhe", + "BatWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "HerculesBeetle": "Erhöht den Schaden deiner Günstlinge um 15%\nErhöht den Rückstoß deiner Günstlinge", + "BoneKey": "Beschwört einen Baby-Skeletron-Kopf", + "MeteoriteBar": "'Fühlt sich warm an'", + "Nectar": "Beschwört eine Babyhornisse", + "TikiTotem": "Beschwört einen Tikigeist", + "LizardEgg": "Beschwört eine zahme Echse", + "LeafBlower": "Verschießt in schneller Abfolge rasiermesserscharfe Blätter", + "ChlorophyteBullet": "Verfolgt deinen Gegner", + "Hook": "Kann mitunter von Skeletten und Piranhas erbeutet werden", + "ParrotCracker": "Beschwört einen zahmen Papageien", + "StrangeGlowingMushroom": "Beschwört einen Babytrüffel", + "Seedling": "Beschwört einen zahmen Schössling", + "WispinaBottle": "Beschwört ein Irrlicht, um dir zu leuchten", + "PalladiumPickaxe": "Kann Mithril und Oreichalkos abbauen", + "PalladiumDrill": "Kann Mithril und Oreichalkos abbauen", + "OrichalcumPickaxe": "Kann Adamantit und Titan abbauen", + "OrichalcumDrill": "Kann Adamantit und Titan abbauen", + "MoltenFury": "Entfacht lodernde Holzpfeile", + "PalladiumMask": "Um 8% erhöhter Nahkampfschaden\nUm 12% erhöhtes Nahkampftempo", + "PalladiumHelmet": "Um 9% erhöhter Fernkampfschaden\nUm 9% erhöhte kritische Fernkampf-Trefferchance", + "PalladiumHeadgear": "Um 7% erhöhter Magieschaden und Chance auf kritischen Treffer\nErhöht das Höchstmana um 60", + "PalladiumBreastplate": "Um 3% erhöhter Schaden\nKritische Trefferchance um 2% erhöht", + "PalladiumLeggings": "Um 2% erhöhter Schaden\nKritische Trefferchance um 1% erhöht", + "FieryGreatsword": "'Ist ganz aus Feuer!'", + "OrichalcumMask": "Um 7% erhöhter Nahkampfschaden\nUm 7% erhöhte Bewegungs- und Nahkampfgeschwindigkeit", + "OrichalcumHelmet": "Um 15% erhöhte kritische Fernkampf-Trefferchance\nUm 8% erhöhte Bewegungsgeschwindigkeit", + "OrichalcumHeadgear": "Um 18% erhöhte kritische Magie-Trefferchance\nErhöht das Höchstmana um 80", + "OrichalcumBreastplate": "Kritische Trefferchance um 6% erhöht", + "OrichalcumLeggings": "Um 11% erhöhte Bewegungsgeschwindigkeit", + "TitaniumMask": "Um 8% erhöhter Nahkampfschaden und Chance auf kritischen Treffer\nUm 8% erhöhtes Nahkampftempo", + "TitaniumHelmet": "Um 16% erhöhter Fernkampfschaden\nUm 7% erhöhte kritische Fernkampf-Trefferchance", + "TitaniumHeadgear": "Um 16% erhöhter Magieschaden und Chance auf kritischen Treffer\nErhöht das Höchstmana um 100", + "TitaniumBreastplate": "Um 4% erhöhter Schaden\nKritische Trefferchance um 3% erhöht", + "TitaniumLeggings": "Um 3% erhöhter Schaden und Chance auf kritischen Treffer\nUm 6% erhöhte Bewegungsgeschwindigkeit", + "OrichalcumAnvil": "Zum Herstellen von Gegenständen aus Mithril- Oreichalkos- Adamantit- und Titanbarren", + "TitaniumForge": "Zum Schmelzen von Adamantit- und Titanerz", + "ChlorophyteClaymore": "Verschießt eine mächtige Kugel", + "ChlorophyteSaber": "Verschießt eine Sporenwolke", + "ChlorophytePartisan": "Verschießt eine Sporenwolke", + "MeteorHelmet": "Um 7% erhöhter magischer Schaden", + "ChlorophyteArrow": "Prallt ab, wenn es eine Wand trifft", + "MeteorSuit": "Um 7% erhöhter magischer Schaden", + "AmberMosquito": "Beschwört einen Babydinosaurier", + "NimbusRod": "Beschwört eine Wolke herauf, die sich über deinen Gegnern ausregnet", + "GroxTheGreatArmor": "{$CommonItemTooltip.DevItem}", + "EyeoftheGolem": "Kritische Trefferchance um 10% erhöht", + "HoneyBalloon": "Vergrößert die Sprunghöhe\nVerströmt Bienen, wenn beschädigt", + "MeteorLeggings": "Um 7% erhöhter magischer Schaden", + "BlueHorseshoeBalloon": "Ermöglicht einen Doppelsprung\nVerbessert Sprunghöhe und annulliert Fallschaden", + "WhiteHorseshoeBalloon": "Ermöglicht einen Doppelsprung\nVerbessert Sprunghöhe und annulliert Fallschaden", + "YellowHorseshoeBalloon": "Ermöglicht einen Doppelsprung\nVerbessert Sprunghöhe und annulliert Fallschaden", + "OceanCrate": "{$CommonItemTooltip.RightClickToOpen}", + "SniperRifle": "Verschießt eine mächtige Hochgeschwindigkeitskugel\n zum Rauszoomen", + "VenusMagnum": "Verschießt eine mächtige Hochgeschwindigkeitskugel", + "CrimsonRod": "Beschwört eine Wolke herauf, die Blut über deinen Gegnern herabregnen lässt", + "SteampunkWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsVortex": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "RainbowGun": "Verschießt einen Regenbogen, der dauerhaften Schaden anrichtet", + "StyngerBolt": "Explodiert in tödliches Schrapnell", + "FlowerofFrost": "Verschießt eine Frostkugel", + "Uzi": "Verschießt eine mächtige Hochgeschwindigkeitskugel", + "RocketBoots": "Lässt dich fliegen", + "AmethystRobe": "Erhöht das Höchstmana um 20\nReduziert Manaverbrauch um 5%", + "TopazRobe": "Erhöht das Höchstmana um 40\nReduziert Manaverbrauch um 7%", + "SapphireRobe": "Erhöht das Höchstmana um 40\nReduziert Manaverbrauch um 9%", + "EmeraldRobe": "Erhöht das Höchstmana um 60\nReduziert Manaverbrauch um 11%", + "RubyRobe": "Erhöht das Höchstmana um 60\nReduziert Manaverbrauch um 13%", + "DiamondRobe": "Erhöht das Höchstmana um 80\nReduziert Manaverbrauch um 15%", + "GroxTheGreatHelm": "{$CommonItemTooltip.DevItem}", + "LifeFruit": "Erhöht die maximalen Lebenspunkte um 5", + "LihzahrdPowerCell": "Wird am Lihzahrdaltar verwendet", + "Picksaw": "Du kannst Lihzahrdziegel abbauen", + "JimsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "StaffofEarth": "Beschwört einen mächtigen Felsbrocken", + "GolemFist": "Schlägt mit der Kraft eines Golems zu", + "Binoculars": "Erhöht Sichtweite, wenn gehalten", + "RifleScope": "Erhöht Sichtweite für Schusswaffen\n zum Rauszoomen", + "DestroyerEmblem": "Um 10% erhöhter Schaden\nKritische Trefferchance um 8% erhöht", + "JellyfishNecklace": "Sorgt für Licht unter Wasser", + "IceSickle": "Verschießt eine Eissichel", + "ClothierVoodooDoll": "'Du bist ein schrecklicher Mensch'", + "PoisonStaff": "Verschießt eine Giftklaue, die mehrere Gegner durchdringt", + "SlimeStaff": "Beschwört einen Babyschleim, der für dich kämpft", + "PoisonDart": "Vergiftet Gegner", + "EyeSpring": "Beschwört eine Augapfelfeder", + "ToySled": "Beschwört einen Babyschneemann", + "BookofSkulls": "Verschießt einen Schädel", + "KOCannon": "Verschießt einen Boxhandschuh", + "PirateMap": "Beschwört einen Piratenüberfall herauf", + "TurtleHelmet": "Um 6% erhöhter Nahkampfschaden\nFeinde greifen dich eher an", + "TurtleScaleMail": "Um 8% erhöhter Nahkampfschaden und Chance auf kritischen Treffer\nFeinde greifen dich eher an", + "TurtleLeggings": "Um 4% erhöhte kritische Nahkampf-Trefferchance\nFeinde greifen dich eher an", + "KiteWorldFeeder": "{$CommonItemTooltip.Kite}", + "OasisCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "ObsidianRose": "Reduziert den Schaden beim Berühren von Lava", + "RodofDiscord": "Teleportiert dich dorthin, wo die Maus ist", + "DeathSickle": "Verschießt eine tödliche Sichel", + "BloodySpine": "Beschwört das Gehirn von Cthulhu", + "Ichor": "'Das Blut der Götter'", + "IchorTorch": "Kann in Wasser platziert werden", + "IchorArrow": "Reduziert die Verteidigung des Ziels", + "IchorBullet": "Reduziert die Verteidigung des Ziels", + "GoldenShower": "Versprüht einen Schauer von Ichor\nReduziert die Verteidigung des Ziels", + "OasisCrate": "{$CommonItemTooltip.RightClickToOpen}", + "ImbuingStation": "Um Tränkungsfläschchen für Waffen herzustellen", + "EmptyBullet": "Um verschiedene Arten von Munition herzustellen", + "ShadowbeamStaff": "Erschafft einen Schattenstahl, der von Wänden reflektiert wird", + "InfernoFork": "Verschießt einen Feuerball, der in ein wütendes Inferno explodiert", + "SpectreStaff": "Beschwört eine verlorene Seele, die deine Widersacher verfolgt", + "BubbleMachine": "Bläst Blasen", + "BubbleWand": "Bläst Blasen", + "WaterCandle": "Kann unerwünschte Aufmerksamkeit erwecken", + "Book": "‚Es enthält seltsame Symbole‘", + "CopperWatch": "Sagt dir die Zeit", + "SpectreHood": "Um 40% erhöhter magischer Schaden", + "SpectreRobe": "Um 7% erhöhter Magieschaden und Chance auf kritischen Treffer", + "SpectrePants": "Um 8% erhöhter magischer Schaden\nUm 8% erhöhte Bewegungsgeschwindigkeit", + "NecroHelmet": "Um 5% erhöhter Fernkampfschaden", + "PaladinsHammer": "Ein mächtiger, zurückkehrender Hammer", + "BeeWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "NecroBreastplate": "Um 5% erhöhter Fernkampfschaden", + "LargeAmethyst": "Für Schnapp dir den Edelstein. Wird bei deinem Tod fallen gelassen", + "LargeTopaz": "Für Schnapp dir den Edelstein. Wird bei deinem Tod fallen gelassen", + "LargeSapphire": "Für Schnapp dir den Edelstein. Wird bei deinem Tod fallen gelassen", + "LargeEmerald": "Für Schnapp dir den Edelstein. Wird bei deinem Tod fallen gelassen", + "LargeRuby": "Für Schnapp dir den Edelstein. Wird bei deinem Tod fallen gelassen", + "LargeDiamond": "Für Schnapp dir den Edelstein. Wird bei deinem Tod fallen gelassen", + "NecroGreaves": "Um 5% erhöhter Fernkampfschaden", + "JungleKey": "Öffnet eine Dschungel-Truhe im Verlies", + "CorruptionKey": "Öffnet eine Verderben-Truhe im Verlies", + "CrimsonKey": "Öffnet eine Purpur-Truhe im Verlies", + "HallowedKey": "Öffnet eine Heilige Truhe im Verlies", + "Cherry": "{$CommonItemTooltip.MinorStats}", + "SpectrePaintbrush": "Verwendet mit Farbe, um Blöcke anzumalen", + "SpectrePaintRoller": "Verwendet mit Farbe, um Wände anzumalen", + "GolfBallDyedOrange": "{$CommonItemTooltip.GolfBall}", + "ShroomiteHeadgear": "Um 15% erhöhter Pfeilschaden\nUm 5% erhöhte kritische Fernkampf-Trefferchance", + "ShroomiteMask": "Um 15% erhöhter Kugelschaden\nUm 5% erhöhte kritische Fernkampf-Trefferchance", + "ShroomiteHelmet": "Um 15% erhöhter Raketenschaden\nUm 5% erhöhte kritische Fernkampf-Trefferchance", + "KiteBoneSerpent": "{$CommonItemTooltip.Kite}", + "ShroomiteLeggings": "Um 7% erhöhte kritische Fernkampf-Trefferchance\nUm 12% erhöhte Bewegungsgeschwindigkeit", + "Autohammer": "Verwandelt Grünalgenbarren in Pilzmitbarren", + "Jetpack": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressUpToBooster}", + "CenxsTiara": "{$CommonItemTooltip.DevItem}", + "CenxsBreastplate": "{$CommonItemTooltip.DevItem}", + "CenxsLeggings": "{$CommonItemTooltip.DevItem}", + "CrownosMask": "{$CommonItemTooltip.DevItem}", + "CrownosBreastplate": "{$CommonItemTooltip.DevItem}", + "CrownosLeggings": "{$CommonItemTooltip.DevItem}", + "CobaltShield": "Gewährt Immunität gegen Rückstoß", + "WillsHelmet": "{$CommonItemTooltip.DevItem}", + "WillsBreastplate": "{$CommonItemTooltip.DevItem}", + "WillsLeggings": "{$CommonItemTooltip.DevItem}", + "JimsHelmet": "{$CommonItemTooltip.DevItem}", + "JimsBreastplate": "{$CommonItemTooltip.DevItem}", + "JimsLeggings": "{$CommonItemTooltip.DevItem}", + "AaronsHelmet": "{$CommonItemTooltip.DevItem}", + "AaronsBreastplate": "{$CommonItemTooltip.DevItem}", + "AaronsLeggings": "{$CommonItemTooltip.DevItem}", + "VampireKnives": "Du wirst schnell Dolche, die Leben stehlen", + "AquaScepter": "Lässt es Wasser herabregnen", + "ScourgeoftheCorruptor": "Ein mächtiger Wurfspeer, der kleine Fresser entfesselt", + "Banana": "{$CommonItemTooltip.MinorStats}", + "SweetheartNecklace": "Verströmt Bienen und erhöht Bewegungstempo, wenn beschädigt", + "FlurryBoots": "Der Träger kann superschnell rennen", + "LuckyHorseshoe": "Hebt Sturzschaden auf", + "DTownsHelmet": "{$CommonItemTooltip.DevItem}", + "DTownsBreastplate": "{$CommonItemTooltip.DevItem}", + "DTownsLeggings": "{$CommonItemTooltip.DevItem}", + "GroxTheGreatWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "StillLife": "{$PaintingArtist.Crowno}", + "BloodyGoblet": "{$PaintingArtist.Crowno}", + "WickedUndead": "{$PaintingArtist.Crowno}", + "CenxsDress": "{$CommonItemTooltip.DevItem}", + "CenxsDressPants": "{$CommonItemTooltip.DevItem}", + "ShinyRedBalloon": "Vergrößert die Sprunghöhe", + "MagicCuffs": "Erhöht das Höchstmana um 20\nStellt bei Beschädigung Mana wieder her", + "SilverWatch": "Sagt dir die Zeit", + "AnkhCharm": "Gibt dir Immunität für die meisten Schwächezauber", + "AnkhShield": "Macht immun gegenüber Rückstoß und Feuerblöcken\nGibt dir Immunität für die meisten Schwächezauber", + "WaterBolt": "Wirft einen sich langsam bewegenden Wasserbolzen aus", + "GolfBall": "{$CommonItemTooltip.GolfBall}", + "Dynamite": "Eine große Explosion, die die meisten Felder zerstört", + "Grenade": "Eine kleine Explosion, die keine Felder zerstört", + "GoldWatch": "Sagt dir die Zeit", + "FartinaJar": "Ermöglicht einen Doppelsprung", + "HellstoneBar": "‚Heiß, heiß, heiß!‘", + "LeprechaunHat": "Sieht für mich wie ein Leprechaun aus", + "LeprechaunShirt": "Ich will bloß wissen, wo das Gold ist!", + "LeprechaunPants": "Ich will das Gold. Ich will das Gold. Ich will das Gold. Her mit dem Gold!", + "GoodieBag": "{$CommonItemTooltip.RightClickToOpen}", + "CandyCornRifle": "33% Chance, keine Munition zu verbrauchen", + "Sickle": "Erlaubt das Sammeln von Heu aus Gras", + "KiteAngryTrapper": "{$CommonItemTooltip.Kite}", + "TatteredFairyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "SpiderEgg": "Beschwört eine zahme Spinne", + "MagicalPumpkinSeed": "Beschwört einen zahmen Kürbisling", + "DepthMeter": "Zeigt Tiefe an", + "BatScepter": "Beschwört Fledermäuse, die deine Gegner angreifen", + "RavenStaff": "Beschwört einen Raben, der für dich kämpft", + "JungleKeyMold": "Für die Herstellung eines Dschungel-Schlüssels", + "CorruptionKeyMold": "Für die Herstellung eines Verderbens-Schlüssels", + "CrimsonKeyMold": "Für die Herstellung eines Purpur-Schlüssels", + "HallowedKeyMold": "Für die Herstellung eines heiligen Schlüssels", + "FrozenKeyMold": "Für die Herstellung eines gefrorenen Schlüssels", + "RottenEgg": "Am besten dazu verwendet, den Stadtleuten einen Streich zu spielen", + "UnluckyYarn": "Beschwört ein schwarzes Kätzchen", + "TheHorsemansBlade": "Beschwört Kürbisköpfe, die deine Gegner angreifen", + "SpookyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "GhostManifestation": "{$PaintingArtist.Crowno}", + "Graveyard": "{$PaintingArtist.Crowno}", + "Reborn": "{$PaintingArtist.Crowno}", + "CursedSapling": "Beschwört einen verwünschten Schößling, der dir folgt", + "PumpkinMoonMedallion": "Beschwört den Kürbismond", + "Nevermore": "{$PaintingArtist.Crowno}", + "SniperScope": "Erhöht Sichtweite für Schusswaffen ( zum Rauszoomen)\nUm 10% erhöhter Fernkampfschaden und kritische Trefferchance", + "BreathingReed": "Erhöht Atemzeit und erlaubt es, unter Wasser zu atmen", + "JellyfishDivingGear": "Befähigt zum Schwimmen und lässt dich um einiges länger unter Wasser atmen\nSorgt für Licht unter Wasser", + "ArcticDivingGear": "Befähigt zum Schwimmen und lässt dich um einiges länger unter Wasser atmen\nSorgt unter Wasser für Licht und für bessere Beweglichkeit auf Eis", + "GnomeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Gnome}", + "FartInABalloon": "Ermöglicht einen Doppelsprung\nVergrößert die Sprunghöhe", + "DandelionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Dandelion}", + "GolfPainting3": "{$PaintingArtist.Crowno}", + "ArkhalisWings": "{$ItemTooltip.ArkhalisHat}\n{$CommonItemTooltip.FlightAndSlowfall}", + "Present": "{$CommonItemTooltip.RightClickToOpen}", + "Flipper": "Befähigt zum Schwimmen", + "RedRyder": "‚Schieß dir nicht dein Auge raus!‘", + "FestiveWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BladeofGrass": "Kann Gegner vergiften", + "EldMelter": "Verwendet Glibber als Munition", + "KiteGoldfish": "{$CommonItemTooltip.Kite}", + "ReindeerBells": "Beschwört ein Rentier zum Reiten", + "CnadyCanePickaxe": "Kann Meteorite abbauen", + "KiteBunnyCrimson": "{$CommonItemTooltip.Kite}", + "KiteBunnyCorrupt": "{$CommonItemTooltip.Kite}", + "HandWarmer": "Macht immun gegen Kälte- und Einfriereffekte", + "Coal": "‚Du warst unartig dieses Jahr.‘", + "GolfPainting2": "{$PaintingArtist.Crowno}", + "DogWhistle": "Beschwört einen Welpen", + "ChristmasTreeSword": "Verschießt Weihnachtsdekoration", + "ChainGun": "50% Chance, keine Munition zu verbrauchen", + "ObsidianSkull": "Macht immun gegen Feuer-Blöcke", + "Razorpine": "Verschießt rasiermesserscharfe Tannennadeln", + "BlizzardStaff": "Lässt Eiszapfen auf einen Bereich herabregnen", + "SnowmanCannon": "Verschießt Zielflugraketen", + "NorthPole": "Verschießt einen Eisspeer, der es schneien lässt", + "NaughtyPresent": "Beschwört den Frostmond", + "BabyGrinchMischiefWhistle": "Beschwört einen Baby-Grinch", + "StarCannon": "Verschießt Sternschnuppen", + "Fez": "‚Feze sind cool‘", + "JungleRose": "‚Oh, ist das hübsch!‘", + "FeralClaws": "Um 12% erhöhtes Nahkampftempo", + "AnkletoftheWind": "Um 10% erhöhte Bewegungsgeschwindigkeit", + "GolfClubIron": "{$CommonItemTooltip.GolfIron}", + "WhoopieCushion": "‚Kann Ärger erregen‘", + "HeavyWorkBench": "Für fortgeschrittene Herstellung", + "AmmoBox": "Reduziert Munitionsverbrauch um 20%", + "Flamelash": "Ruft einen steuerbaren Feuerball herbei", + "VenomStaff": "Verschießt einen Toxikumgiftzahn, der mehrere Gegner durchstößt", + "SpectreMask": "Erhöht maximales Mana um 60 und verringert Manaverbrauch um 13%\nUm 5% erhöhter Magieschaden und Chance auf kritischen Treffer", + "BoneWelder": "{$CommonItemTooltip.SpecialCrafting}", + "FleshCloningVaat": "{$CommonItemTooltip.SpecialCrafting}", + "GlassKiln": "{$CommonItemTooltip.SpecialCrafting}", + "LihzahrdFurnace": "{$CommonItemTooltip.SpecialCrafting}", + "LivingLoom": "{$CommonItemTooltip.SpecialCrafting}", + "SkyMill": "{$CommonItemTooltip.SpecialCrafting}", + "IceMachine": "{$CommonItemTooltip.SpecialCrafting}", + "BeetleHelmet": "Um 6% erhöhter Nahkampfschaden\nFeinde greifen dich eher an", + "BeetleScaleMail": "Um 8% erhöhter Nahkampfschaden und Chance auf kritischen Treffer\nUm 6% erhöhte Bewegungs- und Nahkampfgeschwindigkeit", + "BeetleShell": "Um 5% erhöhter Nahkampfschaden und Chance auf kritischen Treffer\nFeinde greifen dich eher an", + "BeetleLeggings": "Um 6% erhöhte Bewegungs- und Nahkampfgeschwindigkeit\nFeinde greifen dich eher an", + "SteampunkBoiler": "{$CommonItemTooltip.SpecialCrafting}", + "HoneyDispenser": "{$CommonItemTooltip.SpecialCrafting}", + "BrickLayer": "Erhöht die Geschwindigkeit, mit der Felder belegt werden", + "GolfPainting1": "{$PaintingArtist.Crowno}", + "PaintSprayer": "Platzierte Gegenstände werden automatisch angemalt", + "PortableCementMixer": "Erhöht Platzierungstempo von Wänden", + "CelestialMagnet": "Erhöht Einsammelreichweite bei Manasternen", + "ClayPot": "Lässt Pflanzen wachsen", + "CelestialEmblem": "Erhöht Einsammelreichweite bei Manasternen\nUm 15% erhöhter magischer Schaden", + "CelestialCuffs": "Erhöht Einsammelreichweite bei Manasternen\nStellt bei Beschädigung Mana wieder her", + "PulseBow": "Verschießt einen geladenen Pfeil", + "NaturesGift": "Um 6% reduzierte Mananutzung", + "KiteSandShark": "{$CommonItemTooltip.Kite}", + "KiteShark": "{$CommonItemTooltip.Kite}", + "RestorationPotion": "Reduzierte Abklingzeit für Tränke", + "Gatligator": "50% Chance, keine Munition zu verbrauchen\nHöchst ungenau", + "WaterGun": "Versprüht einen harmlosen Wasserstrahl", + "MagicHat": "Um 7% erhöhter Magieschaden und Chance auf kritischen Treffer", + "Gi": "Um 5% erhöhter Schaden und Chance auf kritischen Treffer\nUm 10% erhöhtes Nahkampf-und Bewegungstempo", + "GypsyRobe": "Um 6% erhöhter Magieschaden und Chance auf kritischen Treffer\nReduziert Manaverbrauch um 10%", + "JungleHat": "Erhöht das Höchstmana um 40\nUm 4% erhöhte kritische Magie-Trefferchance", + "BeetleWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "JungleShirt": "Erhöht das Höchstmana um 20\nUm 4% erhöhte kritische Magie-Trefferchance", + "Gel": "‚Sowohl lecker als auch entzündlich‘", + "JunglePants": "Erhöht das Höchstmana um 20\nUm 4% erhöhte kritische Magie-Trefferchance", + "NeonTetra": "‚Die farbigen Schuppen lassen sich sicher gut verkaufen.‘", + "Grapefruit": "{$CommonItemTooltip.MinorStats}", + "MiningPotion": "Erhöht Abbautempo um 25%", + "HeartreachPotion": "Erhöht Einsammelreichweite bei Lebensherzen", + "DungeonFishingCrateHard": "{$ItemTooltip.DungeonFishingCrate}", + "BuilderPotion": "Platzierungstempo und Reichweite erhöht", + "TitanPotion": "Verbesserter Rückstoß", + "FlipperPotion": "Lässt dich in Flüssigkeit schneller vorankommen", + "DivineEye": "{$PaintingArtist.Darthkitten}", + "TrapsightPotion": "Ermöglicht es dir, Gefahrenquellen in der Nähe zu sehen", + "WoodenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "IronCrate": "{$CommonItemTooltip.RightClickToOpen}", + "GoldenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "AmmoReservationPotion": "20% Chance, keine Munition zu verbrauchen", + "LifeforcePotion": "Erhöht maximale Lebensspanne um 20%", + "EndurancePotion": "Verringert eingesteckten Schaden um 10%", + "RagePotion": "Erhöht Chance auf kritischen Treffer um 10%", + "InfernoPotion": "Setzt Gegner in der Nähe in Brand", + "WrathPotion": "Erhöht Schaden um 10%", + "GolfClubDriver": "{$CommonItemTooltip.GolfDriver}", + "RecallPotion": "Teleportiert dich nach Hause", + "TeleportationPotion": "Teleportiert dich an einen zufälligen Ort", + "LovePotion": "Auf jemanden werfen, damit er sich verliebt", + "StinkPotion": "Auf jemanden werfen, um ihn stinken zu lassen", + "BandageBoy": "{$PaintingArtist.Darthkitten}", + "SonarPotion": "Entdeckt Fisch am Haken", + "CratePotion": "Erhöht Chance auf Kiste", + "WarmthPotion": "Verringert Schaden aus kalten Quellen", + "VisitingThePyramids": "{$PaintingArtist.Leinfors}", + "Uluru": "{$PaintingArtist.darthmorf}", + "BeeGreaves": "Erhöht Günstlingschaden um 5%", + "HornetStaff": "Beschwört eine Hornisse, die für dich kämpft", + "ImpStaff": "Beschwört einen Kobold, der für dich kämpft", + "Oasis": "{$PaintingArtist.Khaios}", + "LifeAboveTheSand": "{$PaintingArtist.Zoomo}", + "SnakesIHateSnakes": "{$PaintingArtist.Xman101}", + "Sunglasses": "‚Lässt dich cool aussehen!‘", + "TheSandsOfSlime": "{$PaintingArtist.Criddle}", + "JawsOfDeath": "{$PaintingArtist.Darthkitten}", + "BurningSpirit": "{$PaintingArtist.Zoomo}", + "HighTestFishingLine": "Angelschnur reißt nie", + "FruitSalad": "{$CommonItemTooltip.MinorStats}", + "TackleBox": "Verringert die Chance auf Köderverbrauch", + "WizardHat": "Um 15% erhöhter magischer Schaden", + "ZephyrFish": "Beschwört einen zahmen Zephyrfisch", + "FrogLeg": "Erhöht das Sprungtempo und ermöglicht automatisches Springen\nErhöht Fallwiderstand", + "Dragonfruit": "{$CommonItemTooltip.MediumStats}", + "KiteJellyfishPink": "{$CommonItemTooltip.Kite}", + "KiteJellyfishBlue": "{$CommonItemTooltip.Kite}", + "FinWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "OpticStaff": "Beschwört Zwillinge, die für dich kämpfen", + "RedHat": "Das riecht komisch ...", + "Goldfish": "‚Es lächelt, könnte also ein guter Snack sein‘", + "Sandgun": "‚Das ist eine gute Idee!‘", + "GuideVoodooDoll": "'Du bist ein schrecklicher Mensch'", + "DivingHelmet": "Verleiht deutlich mehr Atemluft unter Wasser", + "DemonScythe": "Wirft eine Dämonensense aus", + "Blowpipe": "Ermöglicht das Sammeln von Samen als Munition", + "Glowstick": "Funktioniert bei Nässe", + "Seed": "Zur Verwendung im Blasrohr", + "Aglet": "Um 5% erhöhte Bewegungsgeschwindigkeit", + "ObsidianSkinPotion": "Macht immun gegen Lava", + "RegenerationPotion": "Belebt wieder", + "LifeCrystal": "Erhöht die maximalen Lebenspunkte um 20", + "SwiftnessPotion": "Um 25% erhöhte Bewegungsgeschwindigkeit", + "GillsPotion": "Wasser statt Luft atmen", + "IronskinPotion": "Erhöht die Abwehr um 8", + "ManaRegenerationPotion": "Erhöhte Mana-Wiederherstellung", + "MagicPowerPotion": "Um 20% erhöhter magischer Schaden", + "FeatherfallPotion": "Verlangsamt das Sturztempo", + "SpelunkerPotion": "Zeigt den Fundort von Schätzen und Erz", + "InvisibilityPotion": "Macht unsichtbar", + "ShinePotion": "Verströmt eine Aura aus Licht", + "NightOwlPotion": "Erhöht die Nachtsicht", + "BattlePotion": "Erhöht Feind-Spawnquote", + "ThornsPotion": "Auch die Angreifer erleiden Schaden", + "WaterWalkingPotion": "Befähigt, auf dem Wasser zu gehen", + "ArcheryPotion": "Erhöht Pfeiltempo und Schaden um 20%", + "HunterPotion": "Zeigt die Position von Feinden", + "GravitationPotion": "Zur Steuerung der Schwerkraft", + "IllegalGunParts": "‚An den meisten Orten verboten‘", + "GolfClubWedge": "{$CommonItemTooltip.GolfWedge}", + "BetsyWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "Furnace": "Wird für die Verhüttung von Erz verwendet", + "Loom": "Verwendet für die Herstellung von Kleidung", + "IronAnvil": "Wird verwendet, um Items aus Metallbarren herzustellen", + "Keg": "Zum Bierbrauen", + "KiteManEater": "{$CommonItemTooltip.Kite}", + "WorkBench": "Wird zur einfachen Herstellung verwendet", + "GoblinBattleStandard": "Ruft eine Goblin-Armee herbei", + "Sawmill": "Für fortgeschrittene Holzherstellung", + "Pwnhammer": "Stark genug, um Dämonenaltäre zu zerstören", + "CobaltHat": "Erhöht das Höchstmana um 40\nUm 9% erhöhte kritische Magie-Trefferchance", + "CobaltHelmet": "Um 7% erhöhte Bewegungsgeschwindigkeit\nUm 12% erhöhtes Nahkampftempo", + "CobaltMask": "Um 10% erhöhter Fernkampfschaden\nUm 6% erhöhte kritische Fernkampf-Trefferchance", + "MythrilHood": "Erhöht das Höchstmana um 60\nUm 15% erhöhter magischer Schaden", + "MythrilHelmet": "Um 5% erhöhte kritische Nahkampf-Trefferchance\nUm 10% erhöhter Nahkampfschaden", + "MythrilHat": "Um 12% erhöhter Fernkampfschaden\nUm 7% erhöhte kritische Fernkampf-Trefferchance", + "CobaltDrill": "Kann Mithril und Oreichalkos abbauen", + "MythrilDrill": "Kann Adamantit und Titan abbauen", + "WingsNebula": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "Compass": "Zeigt horizontale Position", + "DivingGear": "Befähigt zum Schwimmen\nVerleiht deutlich mehr Atemluft unter Wasser", + "GPS": "Zeigt Position an\nSagt dir die Zeit", + "ObsidianHorseshoe": "Hebt Sturzschaden auf\nMacht immun gegen Feuer-Blöcke", + "ObsidianShield": "Gewährt Immunität gegen Rückstoß\nMacht immun gegen Feuer-Blöcke", + "TinkerersWorkshop": "Ermöglicht die Kombination von einigem Zubehör", + "CloudinaBalloon": "Ermöglicht einen Doppelsprung\nVergrößert die Sprunghöhe", + "AdamantiteHeadgear": "Erhöht das Höchstmana um 80\nUm 11% erhöhter Magieschaden und Chance auf kritischen Treffer", + "AdamantiteHelmet": "Um 7% erhöhte kritische Nahkampf-Trefferchance\nUm 14% erhöhter Nahkampfschaden", + "AdamantiteMask": "Um 14% erhöhter Fernkampfschaden\nUm 8% erhöhte kritische Fernkampf-Trefferchance", + "AdamantiteBreastplate": "Um 6% erhöhter Schaden", + "AdamantiteLeggings": "Kritische Trefferchance um 4% erhöht\nUm 5% erhöhte Bewegungsgeschwindigkeit", + "SpectreBoots": "Lässt dich fliegen\nDer Träger kann superschnell rennen", + "FruitJuice": "{$CommonItemTooltip.MinorStats}", + "HolyWater": "Verbreitet Heil auf einige Blöcke", + "CrimsonFishingCrateHard": "{$ItemTooltip.CrimsonFishingCrate}", + "FairyBell": "Ruft eine magische Fee herbei", + "SuspiciousLookingEye": "Ruft das Auge von Cthulhu herbei", + "ClockworkAssaultRifle": "Dreifachschuss\nNur der erste Schuss verbraucht Munition", + "MoonCharm": "Verwandelt den Besitzer nachts in einen Werwolf", + "KiteCrawltipede": "{$CommonItemTooltip.Kite}", + "SorcererEmblem": "Um 15% erhöhter magischer Schaden", + "BandofRegeneration": "Regeneriert langsam Leben", + "WarriorEmblem": "Um 15% erhöhter Nahkampfschaden", + "RangerEmblem": "Um 15% erhöhter Fernkampfschaden", + "DemonWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "AngelWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "RainbowRod": "Zaubert einen steuerbaren Regenbogen aus", + "IceRod": "Ruft einen Eisblock herbei", + "NeptunesShell": "Verwandelt den Besitzer beim Hineingehen ins Wasser in Meermenschen", + "MagicMirror": "Ein Blick in den Spiegel bringt einen zurück nach Hause", + "Flamethrower": "Verwendet Glibber als Munition", + "Wrench": "Platziert rotes Kabel", + "WireCutter": "Entfernt Kabel", + "CrystalBullet": "Erzeugt beim Aufprall mehrere Kristallscherben", + "HolyArrow": "Ruft beim Aufprall Sternschnuppen herbei", + "MagicDagger": "Ein Dolch, der magisch zurückkehrt", + "CrystalStorm": "Ruft schnelle Feuerkristallscherben herbei", + "CursedFlames": "Ruft unheilige Feuerbälle herbei", + "SoulofLight": "‚Die Essenz von Lichtkreaturen‘", + "SoulofNight": "‚Die Essenz von Finsterkreaturen‘", + "CursedFlame": "‚Nicht einmal Wasser löscht diese Flamme‘", + "CursedTorch": "Kann in Wasser platziert werden", + "AdamantiteForge": "Zum Schmelzen von Adamantit- und Titanerz", + "MythrilAnvil": "Zum Herstellen von Gegenständen aus Mithril- Oreichalkos- Adamantit- und Titanbarren", + "UnicornHorn": "‚Scharf und magisch!‘", + "CrownosWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "LightShard": "‚Werden mitunter von Kreaturen in Lichtwüsten getragen‘", + "RedPressurePlate": "Wird beim Drauftreten aktiviert", + "CloudinaBottle": "Ermöglicht einen Doppelsprung", + "SpellTome": "Kann verzaubert werden", + "PrismaticPunch": "{$CommonItemTooltip.MediumStats}", + "Megashark": "50% Chance, keine Munition zu verbrauchen\n'Minihais großer Bruder'", + "Shotgun": "Feuert einen Kugelregen ab", + "FrozenCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "Mango": "{$CommonItemTooltip.MinorStats}", + "HermesBoots": "Der Träger kann superschnell rennen", + "GreenPressurePlate": "Wird beim Drauftreten aktiviert", + "GrayPressurePlate": "Wird aktiviert, wenn ein Spieler drauftritt", + "BrownPressurePlate": "Wird aktiviert, wenn ein Spieler drauftritt", + "MechanicalEye": "Ruft die Zwillinge herbei", + "SoulofFright": "‚Die Essenz reinen Schreckens‘", + "SoulofMight": "‚Die Essenz des Zerstörers‘", + "SoulofSight": "‚Die Essenz der allwissenden Beobachter‘", + "HallowedPlateMail": "Kritische Trefferchance um 7% erhöht", + "HallowedGreaves": "Um 7% erhöhter Schaden\nUm 8% erhöhte Bewegungsgeschwindigkeit", + "HallowedHelmet": "Um 15% erhöhter Fernkampfschaden\nUm 8% erhöhte kritische Fernkampf-Trefferchance", + "CrossNecklace": "Verlängert die Unbesiegbarkeit nach erlittenem Schaden", + "ManaFlower": "Um 8% reduzierte Mananutzung\nManatränke werden automatisch verbraucht, wenn nötig", + "Elderberry": "{$CommonItemTooltip.MinorStats}", + "MechanicalSkull": "Ruft Skeletron Prime herbei", + "HallowedHeadgear": "Erhöht das Höchstmana um 100\nUm 12% erhöhter Magieschaden und Chance auf kritischen Treffer", + "KiteYellow": "{$CommonItemTooltip.Kite}", + "DemoniteOre": "‚Durchpulst von dunkler Energie‘", + "SlimeCrown": "Ruft Schleimkönig herbei", + "LightDisc": "Kann bis zu 5 stapeln", + "DemoniteBar": "‚Durchpulst von dunkler Energie‘", + "SoulofFlight": "‚Essenz mächtiger fliegender Kreaturen‘", + "MusicBox": "Kann Songs aufzeichnen", + "Drax": "‚Nicht zu verwechseln mit einer Spitzhacke‘", + "Explosives": "Explodiert bei Aktivierung", + "InletPump": "Sendet Wasser zu Auslasspumpen", + "OutletPump": "Empfängt Wasser von Einlasspumpen", + "Timer1Second": "Aktiviert jede Sekunde", + "Timer3Second": "Aktiviert alle 3 Sekunden", + "Timer5Second": "Aktiviert alle 5 Sekunden", + "BluePresent": "{$CommonItemTooltip.RightClickToOpen}", + "GreenPresent": "{$CommonItemTooltip.RightClickToOpen}", + "YellowPresent": "{$CommonItemTooltip.RightClickToOpen}", + "SnowGlobe": "Beschwört die Frostlegion", + "Carrot": "Beschwört einen zahmen Hasen", + "Vilethorn": "Ruft einen Ekeldorn herbei", + "Starfury": "Lässt Sterne vom Himmel regnen\n'Geschmiedet mit Himmelswut'", + "PurificationPowder": "Läutert das Böse", + "SmoothieofDarkness": "{$CommonItemTooltip.MinorStats}", + "RedsHelmet": "{$CommonItemTooltip.DevItem}", + "RedsBreastplate": "{$CommonItemTooltip.DevItem}", + "RedsLeggings": "{$CommonItemTooltip.DevItem}", + "Fish": "Beschwört einen Babypinguin", + "BloodOrange": "{$CommonItemTooltip.MinorStats}", + "Frostbrand": "Verschießt einen Eisbolzen", + "RedPotion": "Nur für diejenigen, die würdig sind", + "RottenChunk": "‚Sieht lecker aus!‘", + "UnholyTrident": "Beschwört des Teufels Dreizack", + "FrostHelmet": "Um 16% erhöhter Nah- und Fernkampfschaden", + "FrostBreastplate": "Um 11% erhöhter kritischer Nah- und Fernkampfschaden", + "FrostLeggings": "Um 8% erhöhte Bewegungsgeschwindigkeit\nUm 7% erhöhte Nahkampfgeschwindigkeit", + "WormFood": "Ruft den Weltenfresser herbei", + "TinWatch": "Sagt dir die Zeit", + "TungstenWatch": "Sagt dir die Zeit", + "PlatinumWatch": "Sagt dir die Zeit", + "LeadAnvil": "Wird verwendet, um Items aus Metallbarren herzustellen", + "BeamSword": "Verschießt einen Lichtstrahl", + "IceBlade": "Verschießt einen Eisbolzen", + "IceBow": "Verschießt Frostpfeile", + "FrostStaff": "Verschießt einen Froststrahl", + "BlueCultistCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistDevote}", + "ButterflyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "FallenStar": "Verschwindet nach Sonnenaufgang", + "Seaweed": "Beschwört eine zahme Schildkröte", + "FairyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "Clentaminator": "Erschafft und vernichtet Biome, wenn versprüht\nVerwendet farbige Lösung", + "GreenSolution": "Verwendet vom Clentaminator\nVerbreitet die Reinheit", + "BlueSolution": "Verwendet vom Clentaminator\nVerbreitet das Heilige", + "PurpleSolution": "Verwendet vom Clentaminator\nVerbreitet das Verderben", + "DarkBlueSolution": "Verwendet vom Clentaminator\nVerbreitet Leuchtende Pilze", + "RedSolution": "Verwendet vom Clentaminator\nVerbreitet das Purpurne", + "HarpyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BoneWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "Hammush": "Stark genug, um Dämonenaltäre zu zerstören", + "NettleBurst": "Beschwört einen Dornenspeer", + "CrimsonHelmet": "Um 2% erhöhter Schaden", + "CrimsonScalemail": "Um 2% erhöhter Schaden", + "CrimsonGreaves": "Um 2% erhöhter Schaden", + "DeathbringerPickaxe": "Kann Höllenstein abbauen", + "Torch": "Sorgt für Licht", + "FlameWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "FrozenWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "GhostWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "LivingWoodWand": "Platziert lebendes Holz", + "GrapplingHook": "‚Komm hier rüber!‘", + "Actuator": "Um solide Blöcke ein- und auszuschalten", + "Chain": "Darauf kann geklettert werden", + "BlueWrench": "Platziert blaues Kabel", + "GreenWrench": "Platziert grünes Kabel", + "BluePressurePlate": "Wird aktiviert, wenn ein Spieler drauftritt", + "YellowPressurePlate": "Wird aktiviert, wenn etwas anderes als ein Spieler drauftritt", + "FrozenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LuckyCoin": "Angegriffene Gegner lassen mehr Münzen fallen", + "UnicornonaStick": "‚Ich habe einen Riesenspaß!‘", + "SandstorminaBottle": "Ermöglicht einen verbesserten Doppelsprung", + "CanOfWorms": "{$CommonItemTooltip.RightClickToOpen}", + "MoonShell": "Verwandelt den Besitzer nachts in einen Werwolf und beim Hineingehen ins Wasser in einen Meermenschen", + "StarVeil": "Lässt Sterne herabfallen und verlängert Unverwundbarkeit nach eingestecktem Schaden", + "BloodyMoscato": "{$CommonItemTooltip.MinorStats}", + "MiningHelmet": "Sorgt beim Tragen für Licht", + "AdhesiveBandage": "Immun gegen Bluten", + "ArmorPolish": "Immun gegen Beschädigte Rüstung", + "Bezoar": "Immun gegen Gift", + "Blindfold": "Immun gegen Dunkelheit", + "FastClock": "Immun gegen Langsam", + "Megaphone": "Immun gegen Schweigen", + "Nazar": "Immun gegen Fluch", + "Vitamins": "Immun gegen Schwäche", + "TrifoldMap": "Immun gegen Verwirrung", + "Lemon": "{$CommonItemTooltip.MinorStats}", + "TropicalSmoothie": "{$CommonItemTooltip.MinorStats}", + "PinaColada": "{$CommonItemTooltip.MinorStats}", + "PeachSangria": "{$CommonItemTooltip.MinorStats}", + "ArmorBracing": "Immun gegen Schwäche und Beschädigte Rüstung", + "MedicatedBandage": "Immun gegen Gift und Bluten", + "ThePlan": "Immun gegen Langsam und Verwirrung", + "CountercurseMantra": "Immun gegen Schweigen und Fluch", + "CoinGun": "Verwendet Münzen als Munition\nHöherwertige Münzen richten mehr Schaden an", + "LavaCharm": "7 Sekunden Immunität gegen Lava", + "BananaDaiquiri": "{$CommonItemTooltip.MinorStats}", + "Pineapple": "{$CommonItemTooltip.MinorStats}", + "BoneWand": "Platziert Knochen", + "LeafWand": "Platziert Blätter", + "FlyingCarpet": "Gestattet es dem Besitzer, ein paar Sekunden zu schweben", + "AvengerEmblem": "Um 12% erhöhter Schaden", + "Lemonade": "{$CommonItemTooltip.MinorStats}", + "LandMine": "Explodiert beim Drauftreten", + "Starfruit": "{$CommonItemTooltip.MediumStats}", + "Umbrella": "Du fällst langsamer, wenn du das hältst", + "ChlorophyteOre": "Reagiert auf Licht", + "GrapeJuice": "{$CommonItemTooltip.MajorStats}", + "IceSkates": "Zusätzliche Beweglichkeit auf Eis\nEis zerbricht nicht, wenn du darauf fällst", + "SnowballLauncher": "Feuert schnell nacheinander Schneebälle ab", + "ClimbingClaws": "Ermöglicht es dir, Wände runterzurutschen\nVerbesserte Fähigkeit, wenn mit Schuhspikes kombiniert", + "AncientShadowHelmet": "Um 7% erhöhtes Nahkampftempo", + "AncientShadowScalemail": "Um 7% erhöhtes Nahkampftempo", + "AncientShadowGreaves": "Um 7% erhöhtes Nahkampftempo", + "AncientNecroHelmet": "Um 5% erhöhter Fernkampfschaden", + "AncientCobaltHelmet": "Erhöht das Höchstmana um 40\nUm 4% erhöhte kritische Magie-Trefferchance", + "AncientCobaltBreastplate": "Erhöht das Höchstmana um 20\nUm 4% erhöhte kritische Magie-Trefferchance", + "AncientCobaltLeggings": "Erhöht das Höchstmana um 20\nUm 4% erhöhte kritische Magie-Trefferchance", + "BlackBelt": "Chance, Angriffen auszuweichen", + "Boomstick": "Feuert einen Kugelregen ab", + "Rope": "Darauf kann geklettert werden", + "Campfire": "Lebensregeneration wird in der Nähe eines Lagerfeuers erhöht", + "Marshmallow": "Auf einen Stock stecken und am Lagerfeuer braten", + "MarshmallowonaStick": "Über einem Lagerfeuer braten!", + "Coconut": "{$CommonItemTooltip.MinorStats}", + "ShoeSpikes": "Ermöglicht es dir, Wände runterzurutschen\nVerbesserte Fähigkeit, wenn es mit Kletterklauen kombiniert ist", + "TigerClimbingGear": "Ermöglicht es dir, Wände hochzuklettern", + "Tabi": "Ermöglicht es dir zu sprinten\nTippe doppelt in eine Richtung", + "Minishark": "33% Chance, keine Munition zu verbrauchen\n‚Halb Hai, halb Pistole - einfach toll!‘", + "ManaRegenerationBand": "Erhöht das Höchstmana um 20\nErhöht die Manaregenerationsrate", + "SandstorminaBalloon": "Ermöglicht einen Doppelsprung\nVergrößert die Sprunghöhe", + "MasterNinjaGear": "Gibt die Fähigkeit, Mauern zu erklimmen und zu sprinten\nChance, Angriffen auszuweichen", + "RopeCoil": "Werfen, um eine Kletterseil zu erschaffen", + "Blowgun": "Ermöglicht das Sammeln von Samen als Munition", + "BlizzardinaBottle": "Ermöglicht einen Doppelsprung", + "EnchantedSword": "Verschießt einen verzauberten Schwertstrahl", + "PickaxeAxe": "‚Nicht zu verwechseln mit einem Hammbohrer‘", + "EatersBone": "Beschwört einen Baby-Seelenfresser", + "BlendOMatic": "Um Objekte herzustellen", + "MeatGrinder": "Um Objekte herzustellen", + "Rambutan": "{$CommonItemTooltip.MinorStats}", + "Solidifier": "Um Objekte herzustellen", + "ActuationAccessory": "Platziert automatisch Aktoren auf platzierten Objekten", + "ActuationRod": "Aktiviert Aktoren", + "AlchemyTable": "33% Chance, keine Zutaten für die Trankherstellung zu verbrauchen", + "AncientBattleArmorHat": "Um 15% erhöhter Magie- und Günstlingsschaden", + "AppleJuice": "{$CommonItemTooltip.MinorStats}", + "WoodenCrateHard": "{$ItemTooltip.WoodenCrate}", + "AncientHorn": "Beschwört einen Basilisken zum Reiten", + "BloodNautilusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodNautilus}", + "GoblinSharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinShark}", + "AviatorSunglasses": "Ruf deinen inneren Flügelmann\n‚Toll, wenn man sich als Wimpel ausgeben will!‘", + "KitePigron": "{$CommonItemTooltip.Kite}", + "BalloonHorseshoeFart": "Ermöglicht einen Doppelsprung\nVerbessert Sprunghöhe und annulliert Fallschaden", + "BalloonHorseshoeHoney": "Verströmt Bienen, wenn beschädigt\nVerbessert Sprunghöhe und annulliert Fallschaden", + "BalloonHorseshoeSharkron": "Ermöglicht einen Doppelsprung\nVerbessert Sprunghöhe und annulliert Fallschaden", + "BalloonPufferfish": "Vergrößert die Sprunghöhe", + "BeesKnees": "Holzpfeile verwandelt sich in einen Bienenschwarm", + "BejeweledValkyrieBody": "{$CommonItemTooltip.DevItem}\nElegant und mit Edelsteinen geschmückt, genau das Richtige, um durch die gewitterschweren Wolken zu fliegen", + "BejeweledValkyrieHead": "{$CommonItemTooltip.DevItem}\nWerde zum Wind und reite auf dem Blitz.", + "BloodEelBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodEelHead}", + "BewitchingTable": ", um mehr Günstlinge zu erhalten", + "Bladetongue": "Speit bei Kontakt einen Ichorstrahl", + "BlessedApple": "Beschwört ein Einhorn zum Reiten", + "CorruptFishingCrateHard": "{$ItemTooltip.CorruptFishingCrate}", + "JungleFishingCrateHard": "{$ItemTooltip.JungleFishingCrate}", + "BoneCampfire": "Lebensregeneration wird in der Nähe eines Lagerfeuers erhöht", + "BoneRattle": "Beschwört ein Babygesichtmonster", + "BoneTorch": "‚Gibt einen tödlichen Glanz ab‘", + "BoosterTrack": "Hämmern zum Richtungsändern", + "GolfClubPutter": "{$CommonItemTooltip.GolfPutter}", + "HallowedFishingCrateHard": "{$ItemTooltip.HallowedFishingCrate}", + "KiteRedAndYellow": "{$CommonItemTooltip.Kite}", + "BouncyGlowstick": "Funktioniert bei Nässe", + "BouncyGrenade": "Eine kleine Explosion, die keine Felder zerstört\nSehr federnd", + "WillsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "BrainScrambler": "Beschwört ein Scutlix zum Reiten", + "BubbleGun": "Verschießt starke Blasen schnell nacheinander", + "ButchersChainsaw": "Getroffene Feinde versprühen Funken", + "BloodSquidBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodSquid}", + "CelestialSigil": "Beschwört bevorstehendes Unglück", + "CellPhone": "Zeigt alles\nErmöglicht es dir, jederzeit nach Hause zu gelangen", + "ClingerStaff": "Beschwört eine Wand aus verfluchten Flammen", + "CogWall": "Produktivität erhöht auf 200%", + "CoinRing": "Erhöht Münzensammelreichweite\nAngegriffene Gegner lassen mehr Münzen fallen", + "CompanionCube": "Anfällig für Lava!", + "CordageGuide": "Ermöglicht die Sammlung von Rankenseilen von Ranken", + "CorruptFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "CosmicCarKey": "Beschwört ein UFO zum Besteigen", + "CrimsonFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "CrimsonHeart": "Beschwört ein Herz, um dir zu leuchten", + "CrystalSerpent": "Verschießt eine explosive Kristallladung", + "CrystalVileShard": "Beschwört einen massiven Kristallstachel", + "CursedCampfire": "Lebensregeneration wird in der Nähe eines Lagerfeuers erhöht", + "DaedalusStormbow": "Verschießt Pfeile vom Himmel", + "DayBreak": "‚Schieße deine Feinde mit einem Lichtspeer entzwei!‘", + "DemonCampfire": "Lebensregeneration wird in der Nähe eines Lagerfeuers erhöht", + "DemonHeart": "Erhöht dauerhaft die Anzahl der Accessoire-Slots", + "Detonator": "‚Wagen ... und gewinnen!‘", + "DevDye": "{$CommonItemTooltip.DevItem}", + "DjinnsCurse": "Ermöglicht im Austausch für deine Füße einen langsamen Fall", + "DPSMeter": "Zeigt deinen Schaden pro Sekunde", + "DrillContainmentUnit": "Beschwört einen Bohrer zum Reiten", + "DungeonFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "EoCShield": "Ermöglicht es dem Spieler, in den Gegner zu springen\nTippe doppelt in eine Richtung", + "FishermansGuide": "Zeigt Angelinformationen", + "FishFinder": "Zeigt Wetter, Mondphase und Angelinformationen", + "FishronWings": "{$CommonItemTooltip.FlightAndSlowfall}\nErmöglicht schnelleres Bewegen in Wasser", + "Flairon": "Speit Ziellenkblasen aus", + "FleshKnuckles": "Feinde greifen dich eher an", + "FloatingIslandFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "FlowerBoots": "Blumen wachsen auf dem Gras, auf dem du gehst", + "FlyingKnife": "Wirft ein steuerbares fliegendes Messer", + "GolfBallDyedBrown": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedBlue": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedBlack": "{$CommonItemTooltip.GolfBall}", + "FragmentNebula": "‚In diesem Fragment befindet sich die Macht einer Galaxie‘", + "FragmentSolar": "‚In diesem Fragment befindet sich die Wut des Universums‘", + "FragmentStardust": "‚Hypnotisierende Partikel schweben um dieses Fragment‘", + "FragmentVortex": "‚Wirbelnde Energie kommt aus diesem Fragment‘", + "FrozenCampfire": "Lebensregeneration wird in der Nähe eines Lagerfeuers erhöht", + "FuzzyCarrot": "Beschwört ein Häschen zum Reiten", + "GemLockAmber": ", um große Bernsteine zu platzieren oder zu entfernen", + "GemLockAmethyst": ", um große Amethysten zu platzieren oder zu entfernen", + "GemLockDiamond": ", um große Diamanten zu platzieren oder zu entfernen", + "GemLockEmerald": ", um große Smaragde zu platzieren oder zu entfernen", + "GemLockRuby": ", um große Rubine zu platzieren oder zu entfernen", + "GemLockSapphire": ", um große Saphire zu platzieren oder zu entfernen", + "GemLockTopaz": ", um große Topase zu platzieren oder zu entfernen", + "GoblinTech": "Zeigt Bewegungsgeschwindigkeit, Schaden pro Sekunde und wertvolles Erz", + "GoldPickaxe": "Kann Meteorite abbauen", + "GoldRing": "Erhöht Münzensammelreichweite", + "Plum": "{$CommonItemTooltip.MinorStats}", + "KiteBunny": "{$CommonItemTooltip.Kite}", + "HallowedFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "HardySaddle": "Beschwört eine Schildkröte zum Reiten", + "HellwingBow": "Holzpfeile verwandeln sich in brennende Fledermäuse", + "HerbBag": "{$CommonItemTooltip.RightClickToOpen}", + "HiveBackpack": "Erhöht die Stärke von freundlichen Bienen", + "HoneyedGoggles": "Beschwört eine Biene zum Reiten", + "IceMirror": "Ein Blick in den Spiegel bringt einen zurück nach Hause", + "IchorCampfire": "Lebensregeneration wird in der Nähe eines Lagerfeuers erhöht", + "EyeballFlyingFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EyeballFlyingFish}", + "JungleFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LargeAmber": "Für Schnapp dir den Edelstein. Wird bei deinem Tod fallen gelassen", + "LaserRuler": "Zeigt Linien auf dem Bildschirm zum Platzieren der Blöcke", + "LastPrism": "‚Feuere einen Regenbogen zur Vernichtung von Lebensformen ab‘", + "LifeformAnalyzer": "Zeigt den Namen von seltenen Kreaturen um dich herum an", + "LightKey": "‚Geladen mit der Essenz vieler Seelen‘", + "LivingMahoganyLeafWand": "Platziere reiche Mahagoniblätter", + "LivingMahoganyWand": "Platziert lebendigen, reichen Mahagoni", + "LockBox": "{$CommonItemTooltip.RightClickToOpen}\nBenötigt einen goldenen Schlüssel", + "LogicGateLamp_Faulty": "Platziere dies auf Lampen mit Logikgatter, damit sie nach Zufallsprinzip aktiviert werden", + "LogicGateLamp_Off": "Platziere dies auf Logikgatter, um Checks hinzuzufügen", + "LogicGateLamp_On": "Platziere dies auf Logikgatter, um Checks hinzuzufügen", + "LogicGate_NOR": "Beurteilt die Logikgatterlampen über ihm\nWird aktiviert, wenn keine Lampe an ist. Zu allen anderen Zeiten deaktiviert.", + "LogicGate_NXOR": "Beurteilt die Logikgatterlampen über ihm\nWird aktiviert, wenn die Summe der eingeschalten Lampen nicht eins ist. Zu allen anderen Zeiten deaktiviert\nWird oft auch NXOR genannt", + "LogicGate_OR": "Beurteilt die Logikgatterlampen über ihm\nWird aktiviert, wenn eine beliebige Lampe an ist. Zu allen anderen Zeiten deaktiviert.", + "LogicGate_XOR": "Beurteilt die Logikgatterlampen über ihm\nWird aktiviert, wenn nur eine Lampe an ist. Zu allen anderen Zeiten deaktiviert.", + "LogicSensor_Above": "Wird aktiviert, wenn Spieler darüber sind. Zu allen anderen Zeiten deaktiviert.", + "LogicSensor_Honey": "Wird aktiviert, wenn eine Biene darauf sitzt. Zu allen anderen Zeiten deaktiviert.", + "LogicSensor_Lava": "Wird aktiviert, wenn Lava drauf ist. Zu allen anderen Zeiten deaktiviert.", + "LogicSensor_Liquid": "Wird aktiviert, wenn Flüssigkeit drauf ist. Zu allen anderen Zeiten deaktiviert.", + "LogicSensor_Moon": "Wird aktiviert, wenn die Nacht beginnt", + "LogicSensor_Sun": "Wird aktiviert, wenn der Tag beginnt", + "LogicSensor_Water": "Wird aktiviert, wenn Wasser drauf ist. Zu allen anderen Zeiten deaktiviert.", + "LokisDye": "{$CommonItemTooltip.DevItem}", + "LokisHelm": "{$CommonItemTooltip.DevItem}\nUnordnung kommt von Ordnung, Angst kommt von Mut, Schwäche kommt von Stärke", + "LokisPants": "{$CommonItemTooltip.DevItem}\nDie Mühlen der Gerechtigkeit mahlen langsam, aber fein.", + "LokisShirt": "{$CommonItemTooltip.DevItem}\nKenne dich und kenne deinen Feind. Tausend Kämpfe und tausend Siege ...", + "ZombieMermanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieMerman}", + "LunarBar": "‚Vibriert mit leuchtender, himmlischer Energie‘", + "LunarCraftingStation": "Wird verwendet, um Items aus Mondfragmenten und Luminit herzustellen", + "LunarFlareBook": "Lässt es Monderuptionen regnen", + "LunarHook": "‚Du willst den Mond? Wirf einen Enterhaken aus und zieh ihn runter!‘", + "LunarOre": "‚Ein Kiesel des Himmels‘", + "MagicLantern": "Beschwört eine magische Laterne, die Schätze in der Nähe zeigt", + "MechanicalLens": "Ermöglicht verbesserte Kabelsicht", + "MetalDetector": "Zeigt das wertvollste Erz um dich rum", + "MeteorStaff": "Lässt es Meteore regnen", + "Minecart": "Düsen wir die Gleise entlang", + "MinecartTrack": "Hämmere Endstücke, um Bumper-Stil zu ändern\nKreuzungen hämmern zum Richtungsändern", + "MolotovCocktail": "Eine kleine Explosion, die Feinde anzündet\nErleuchtet für eine Weile die Umgebung", + "MoneyTrough": "Beschwört ein Sparschwein, in dem du deine Items aufbewahren kannst", + "MoonlordArrow": "‚Schießt sie runter mit Schallgeschwindigkeit!‘", + "MoonlordBullet": "‚In einer Reihe aufstellen und runterhauen ...‘", + "Apricot": "{$CommonItemTooltip.MinorStats}", + "MothronWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "MulticolorWrench": " und gedrückt halten, um Kabeleinstellungen zu bearbeiten", + "NebulaArcanum": "‚Beschwöre massenhaft astrale Energie, die deinen Feinden folgt‘", + "NebulaBlaze": "‚Vom Oriongürtel bis in deine Hand‘", + "NebulaBreastplate": "Um 9% erhöhter Magieschaden und Chance auf kritischen Treffer", + "NebulaHelmet": "Erhöht maximales Mana um 60 und verringert Manaverbrauch um 15%\nUm 7% erhöhter Magieschaden und Chance auf kritischen Treffer", + "NebulaLeggings": "Um 10% erhöhter magischer Schaden\nUm 10% erhöhte Bewegungsgeschwindigkeit", + "NebulaMonolith": "‚Du verfügst über eine kleine Menge Macht vom Nebula-Turm‘", + "NightKey": "‚Geladen mit der Essenz vieler Seelen‘", + "NightVisionHelmet": "Verbessert die Sicht", + "GolfBallDyedLimeGreen": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedGreen": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedCyan": "{$CommonItemTooltip.GolfBall}", + "PartyBundleOfBalloonTile": "‚Zum Wohle aller festgebunden‘", + "PartyGirlGrenade": "Eine kleine Explosion, die keine Felder zerstört", + "PartyMonolith": "‚Ballons werden vom Himmel regnen‘", + "PartyPresent": "Du willst wissen, was drin ist?", + "PDA": "Zeigt alles", + "PeaceCandle": "Kreaturen in deiner Umgebung sind weniger aggressiv", + "PedguinHat": "Werde zum Pinguin\n‚Toll, wenn man sich als Wimpel ausgeben will!‘", + "PedguinPants": "Werde zum Pinguin\n‚Toll, wenn man sich als Wimpel ausgeben will!‘", + "PedguinShirt": "Werde zum Pinguin\n‚Toll, wenn man sich als Wimpel ausgeben will!‘", + "Phantasm": "66% Chance, keine Munition zu verbrauchen", + "Pigronata": "Die Party austreiben\nKann eine Überraschung enthalten!", + "PinkGel": "‚Federnd und süß!‘", + "PinkSlimeBlock": "Sehr federnd", + "PirateStaff": "Beschwört Piraten, die für dich kämpfen", + "PixelBox": "Teil Kabelpfade\nLichter von horizontalen Signalen sind aus\nLichter von gekreuzten Signalen sind an", + "PlatinumPickaxe": "Kann Meteorite abbauen", + "PocketMirror": "Immun gegen Versteinerung", + "PressureTrack": "Nicht für Hänge", + "ProjectilePressurePad": "Wird aktiviert, wenn es von einer Kugel berührt wird", + "PsychoKnife": "Ermöglicht es dir, dich zu tarnen", + "PutridScent": "Feinde greifen dich seltener an\nUm 5% erhöhter Schaden und Chance auf kritischen Treffer", + "GolfBallDyedYellow": "{$CommonItemTooltip.GolfBall}", + "Radar": "Erkennt Feinde um dich herum", + "RainbowCampfire": "Lebensregeneration wird in der Nähe eines Lagerfeuers erhöht", + "GolfBallDyedViolet": "{$CommonItemTooltip.GolfBall}", + "RazorbladeTyphoon": "Zaubert schnelle Klingenräder herbei", + "RedsYoyo": "{$CommonItemTooltip.DevItem}", + "REK": "Zeigt die Anzahl der Monster, den Kill-Count und seltene Kreaturen an", + "RoyalGel": "Schleime sind dir freundlich gesinnt", + "SailfishBoots": "Der Träger kann superschnell rennen", + "SandFallBlock": "Fallender Sand, den du ganz sicher beobachten kannst", + "SandFallWall": "Fallender Sand, den du ganz sicher beobachten kannst", + "ScalyTruffle": "Beschwört einen Schwrachen zum Reiten", + "Sextant": "Zeigt die Mondphase an", + "ShadowFlameBow": "Verschießt Schattenflammenpfeile", + "ShadowFlameHexDoll": "Beschwört Schattenflammententakel, die deinen Feind schlagen", + "ShadowFlameKnife": "Fügt bei Treffern Schattenflamme zu", + "SharkronBalloon": "Vergrößert die Sprunghöhe\nErmöglicht einen Doppelsprung", + "SharkToothNecklace": "Erhöht Durchdringen von Rüstung um 5", + "SharpeningStation": "Verhöht Durchdringen von Rüstung für Nahkampfwaffen", + "ShinyStone": "Erhöht die Lebensregeneration stark, wenn du dich nicht bewegst", + "ShrimpyTruffle": "Zieht eine legendäre Kreatur an, die im Wasser und im Kampf auflebt", + "SillyBalloonGreen": "‚Riecht wie Pfefferminze und Schadenfreude‘", + "SillyBalloonGreenWall": "‚Riecht wie Pfefferminze und Schadenfreude‘", + "SillyBalloonMachine": "Die Party hört nie auf!", + "SillyBalloonPink": "‚Riecht wie Kaugummi und Glückseligkeit‘", + "SillyBalloonPinkWall": "‚Riecht wie Kaugummi und Glückseligkeit‘", + "SillyBalloonPurple": "‚Riecht wie Lavendel und Enthusiasmus‘", + "SillyBalloonPurpleWall": "‚Riecht wie Lavendel und Enthusiasmus‘", + "SillyStreamerBlue": "Seltsamerweise stabil genug, um hochzuklettern!", + "SillyStreamerGreen": "Seltsamerweise stabil genug, um hochzuklettern!", + "SillyStreamerPink": "Seltsamerweise stabil genug, um hochzuklettern!", + "SkiphsHelm": "{$CommonItemTooltip.DevItem}", + "SkiphsPants": "{$CommonItemTooltip.DevItem}", + "SkiphsShirt": "{$CommonItemTooltip.DevItem}", + "TheBrideBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TheBride}", + "DTownsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "SlimeGun": "Versprüht einen harmlosen Schleimstrahl", + "SlimySaddle": "Beschwört einen Schleim zum Reiten", + "KiteKoi": "{$CommonItemTooltip.Kite}", + "SnowFallBlock": "Sehr viel kälter als eine Schneekugel", + "SnowFallWall": "Sehr viel kälter als eine Schneekugel", + "SolarEruption": "‚Schlage mit dem Zorn der Sonne zu‘", + "RedsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "Hoverboard": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "CenxsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "SolarMonolith": "‚Du verfügst über eine kleine Menge Macht vom Sonnenturm‘", + "SolarTablet": "Beschwört die Sonnenfinsternis", + "SoulDrain": "Zieht Feinden Leben ab", + "SpelunkerGlowstick": "Zeigt Schätze in der Nähe", + "SpiderStaff": "Beschwört Spinnen, um für dich zu kämpfen", + "SporeSac": "Beschwört Sporen, die den Feinden mit der Zeit Schaden zufügen", + "GolfClubChlorophyteDriver": "{$CommonItemTooltip.GolfDriver}", + "StardustCellStaff": "Beschwört eine Stenenstaubzelle, die für dich kämpft\nZieh dir die schönste Zellinfektion überhaupt heran‘", + "StardustDragonStaff": "Beschwört einen Stenenstaubdrachen, der für dich kämpft\n‚Wer braucht schon eine Horde Günstlinge, wenn du einen riesigen Drachen haben kannst?‘", + "GolfClubDiamondWedge": "{$CommonItemTooltip.GolfWedge}", + "GolfClubShroomitePutter": "{$CommonItemTooltip.GolfPutter}", + "StardustMonolith": "‚Du verfügst über eine kleine Menge Macht vom Sternenstaubturm‘", + "FloatingIslandFishingCrateHard": "{$ItemTooltip.FloatingIslandFishingCrate}", + "StickyGrenade": "Eine kleine Explosion, die keine Felder zerstört\n‚Werfen könnte schwer werden.‘", + "Stopwatch": "Zeigt wie schnell der Spieler sich bewegt", + "StrangeBrew": "‚Sieht schrecklich aus und riecht auch so‘", + "StrangePlant1": "Kann gegen seltene Farbstoffe getauscht werden", + "StrangePlant2": "Kann gegen seltene Farbstoffe getauscht werden", + "StrangePlant3": "Kann gegen seltene Farbstoffe getauscht werden", + "StrangePlant4": "Kann gegen seltene Farbstoffe getauscht werden", + "SummonerEmblem": "Um 15% erhöhter Beschwörungsschaden", + "Sundial": "Pro Woche kann ein Tag vorgespult werden", + "SuperAbsorbantSponge": "Eine unendliche Menge Wasser kann aufgesogen werden", + "SuspiciousLookingTentacle": "Ruft ein verdächtig aussehendes Auge, das dir Licht gibt\n‚Ich weiß, was du denkst ...‘", + "TallyCounter": "Zeigt an, wie viele Monster getötet wurden", + "TartarSauce": "Beschwört einen Mini-Minotaurus", + "TempestStaff": "Beschwört Hainados, die für dich kämpfen", + "TheBrideDress": "'Hochzeit …'", + "TheBrideHat": "Wiebe … bahre Wiebe …", + "Toxikarp": "Speit giftige Blasen aus", + "Tsunami": "Verschießt 5 Pfeile gleichzeitig", + "TsunamiInABottle": "Ermöglicht einen Doppelsprung", + "TungstenPickaxe": "Kann Meteorite abbauen", + "UltraBrightCampfire": "Lebensregeneration wird in der Nähe eines Lagerfeuers erhöht", + "ValkyrieYoyo": "{$CommonItemTooltip.DevItem}", + "BlackCurrant": "{$CommonItemTooltip.MinorStats}", + "VineRopeCoil": "Werfen, um eine Rankenseil zu erschaffen", + "VortexBeater": "66% Chance, keine Munition zu verbrauchen\n‚Eine katastrophische Mischung aus Peng Peng und Bumm Bumm.‘", + "VortexBreastplate": "Um 12% erhöhter Fernkampfschaden und kritische Trefferchance\n25% Chance, keine Munition zu verbrauchen", + "VortexHelmet": "Um 16% erhöhter Fernkampfschaden\nUm 7% erhöhte kritische Fernkampf-Trefferchance", + "VortexLeggings": "Um 8% erhöhter Fernkampfschaden und kritische Trefferchance\nUm 10% erhöhte Bewegungsgeschwindigkeit", + "VortexMonolith": "‚Du verfügst über eine kleine Menge Macht vom Vortex-Turm‘", + "WandofSparking": "Verschießt einen kleinen Funken", + "WeaponRack": ", um ein Item auf dem Waffenregal zu platzieren", + "WeatherRadio": "Zeigt das Wetter an", + "WeightedPressurePlateCyan": "Wird aktiviert, wenn ein Spieler drauftritt oder runtergeht", + "WeightedPressurePlateOrange": "Wird aktiviert, wenn ein Spieler drauftritt oder runtergeht", + "WeightedPressurePlatePink": "Wird aktiviert, wenn ein Spieler drauftritt oder runtergeht", + "WeightedPressurePlatePurple": "Wird aktiviert, wenn ein Spieler drauftritt oder runtergeht", + "Peach": "{$CommonItemTooltip.MinorStats}", + "WingsSolar": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsStardust": "{$CommonItemTooltip.FlightAndSlowfall}", + "GolfClubTitaniumIron": "{$CommonItemTooltip.GolfIron}", + "WireBulb": "Erleuchtet Glühbirnen mit jeder Kabelfarbe", + "WireKite": "Ermöglicht die ultimative Kontrolle über Kabel!\n und gedrückt halten, um Kabeleinstellungen zu bearbeiten", + "WirePipe": "Trennt Kabelpfade\nUnd kann gehämmert werden!", + "WormholePotion": "Teleportiert dich zu einem Gruppenmitglied\nKlicke auf den Kopf, um die ganze Karte zu sehen", + "WormScarf": "Verringert eingesteckten Schaden um 17%", + "XenoStaff": "Beschwört ein UFO, das für dich kämpft", + "YellowWrench": "Platziert gelbes Kabel", + "Yoraiz0rDarkness": "{$CommonItemTooltip.DevItem}\nWenn du das siehst, solltest du vermutlich lieber weglaufen ...", + "Yoraiz0rHead": "{$CommonItemTooltip.DevItem}", + "Yoraiz0rPants": "{$CommonItemTooltip.DevItem}", + "Yoraiz0rShirt": "{$CommonItemTooltip.DevItem}", + "GolfClubPearlwoodDriver": "{$CommonItemTooltip.GolfDriver}", + "YoyoBag": "Gibt dem Nutzer meisterliche Jojofähigkeiten", + "YoYoGlove": "Ermöglicht es dir, zwei Jojos gleichzeitig zu benutzen", + "BloodMoonRising": "{$PaintingArtist.Garner}", + "TheHangedMan": "{$PaintingArtist.Garner}", + "GloryoftheFire": "{$PaintingArtist.Garner}", + "BoneWarp": "{$PaintingArtist.Garner}", + "SkellingtonJSkellingsworth": "{$PaintingArtist.Garner}", + "TheCursedMan": "{$PaintingArtist.Garner}", + "TheEyeSeestheEnd": "{$PaintingArtist.Garner}", + "SomethingEvilisWatchingYou": "{$PaintingArtist.Moosdijk}", + "TheTwinsHaveAwoken": "{$PaintingArtist.Moosdijk}", + "TheScreamer": "{$PaintingArtist.Crowno}", + "GoblinsPlayingPoker": "{$PaintingArtist.Garner}", + "Dryadisque": "{$PaintingArtist.Garner}", + "Sunflowers": "{$PaintingArtist.Garner}", + "TerrarianGothic": "{$PaintingArtist.Garner}", + "Impact": "{$PaintingArtist.Wright}", + "PoweredbyBirds": "{$PaintingArtist.Ness}", + "TheDestroyer": "{$PaintingArtist.Moosdijk}", + "ThePersistencyofEyes": "{$PaintingArtist.Crowno}", + "UnicornCrossingtheHallows": "{$PaintingArtist.Crowno}", + "GreatWave": "{$PaintingArtist.Crowno}", + "StarryNight": "{$PaintingArtist.Crowno}", + "GuidePicasso": "{$PaintingArtist.Crowno}", + "TheGuardiansGaze": "{$PaintingArtist.Kolf}", + "FatherofSomeone": "{$PaintingArtist.Crowno}", + "NurseLisa": "{$PaintingArtist.Garner}", + "DarkSoulReaper": "{$PaintingArtist.Myhre}", + "Land": "{$PaintingArtist.Myhre}", + "TrappedGhost": "{$PaintingArtist.Myhre}", + "DemonsEye": "{$PaintingArtist.Myhre}", + "FindingGold": "{$PaintingArtist.Myhre}", + "FirstEncounter": "{$PaintingArtist.Crowno}", + "GoodMorning": "{$PaintingArtist.Crowno}", + "UndergroundReward": "{$PaintingArtist.Crowno}", + "ThroughtheWindow": "{$PaintingArtist.Crowno}", + "PlaceAbovetheClouds": "{$PaintingArtist.Crowno}", + "DoNotStepontheGrass": "{$PaintingArtist.Crowno}", + "ColdWatersintheWhiteLand": "{$PaintingArtist.Crowno}", + "LightlessChasms": "{$PaintingArtist.Crowno}", + "TheLandofDeceivingLooks": "{$PaintingArtist.Crowno}", + "Daylight": "{$PaintingArtist.Crowno}", + "SecretoftheSands": "{$PaintingArtist.Crowno}", + "DeadlandComesAlive": "{$PaintingArtist.Crowno}", + "EvilPresence": "{$PaintingArtist.Crowno}", + "SkyGuardian": "{$PaintingArtist.Crowno}", + "AmericanExplosive": "{$PaintingArtist.Kolf}", + "Discover": "{$PaintingArtist.Myhre}", + "HandEarth": "{$PaintingArtist.Myhre}", + "OldMiner": "{$PaintingArtist.Myhre}", + "Skelehead": "{$PaintingArtist.Myhre}", + "FacingtheCerebralMastermind": "{$PaintingArtist.Kolf}", + "LakeofFire": "{$PaintingArtist.Garner}", + "TrioSuperHeroes": "{$PaintingArtist.Burczyk}", + "ImpFace": "{$PaintingArtist.Myhre}", + "OminousPresence": "{$PaintingArtist.Craig}", + "ShiningMoon": "{$PaintingArtist.Craig}", + "LivingGore": "{$PaintingArtist.Craig}", + "FlowingMagma": "{$PaintingArtist.Craig}", + "TheCreationoftheGuide": "{$PaintingArtist.Garner}", + "TheMerchant": "{$PaintingArtist.Garner}", + "CrownoDevoursHisLunch": "{$PaintingArtist.Garner}", + "RareEnchantment": "{$PaintingArtist.Phelps}", + "GloriousNight": "{$PaintingArtist.Duncan}", + "AnglerFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AnglerFish}", + "AngryNimbusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryNimbus}", + "AnomuraFungusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AnomuraFungus}", + "AntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Antlion}", + "ArapaimaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Arapaima}", + "ArmoredSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ArmoredSkeleton}", + "BatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CaveBat}", + "BirdBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Bird}", + "BlackRecluseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlackRecluse}", + "BloodFeederBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodFeeder}", + "BloodJellyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodJelly}", + "BloodCrawlerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodCrawler}", + "BoneSerpentBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BoneSerpentHead}", + "BunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Bunny}", + "ChaosElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ChaosElemental}", + "MimicBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mimic}", + "ClownBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Clown}", + "CorruptBunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptBunny}", + "CorruptGoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptGoldfish}", + "CrabBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crab}", + "CrimeraBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crimera}", + "CrimsonAxeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonAxe}", + "CursedHammerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CursedHammer}", + "DemonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Demon}", + "DemonEyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DemonEye}", + "DerplingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Derpling}", + "EaterofSoulsBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EaterofSouls}", + "EnchantedSwordBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EnchantedSword}", + "ZombieEskimoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieEskimo}", + "FaceMonsterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FaceMonster}", + "FloatyGrossBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FloatyGross}", + "FlyingFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingFish}", + "FlyingSnakeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingSnake}", + "FrankensteinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Frankenstein}", + "FungiBulbBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FungiBulb}", + "FungoFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FungoFish}", + "GastropodBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Gastropod}", + "GoblinThiefBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinThief}", + "GoblinSorcererBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinSorcerer}", + "GoblinPeonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinPeon}", + "GoblinScoutBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinScout}", + "GoblinWarriorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinWarrior}", + "GoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Goldfish}", + "HarpyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Harpy}", + "HellbatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hellbat}", + "HerplingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Herpling}", + "HornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hornet}", + "IceElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceElemental}", + "IcyMermanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IcyMerman}", + "FireImpBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FireImp}", + "JellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueJellyfish}", + "JungleCreeperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleCreeper}", + "LihzahrdBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LihzahrdCrawler}", + "ManEaterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ManEater}", + "MeteorHeadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MeteorHead}", + "MothBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Moth}", + "MummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mummy}", + "MushiLadybugBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MushiLadybug}", + "ParrotBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Parrot}", + "PigronBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PigronCorruption}", + "PiranhaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Piranha}", + "PirateBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateDeckhand}", + "PixieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Pixie}", + "RaincoatZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieRaincoat}", + "ReaperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Reaper}", + "SharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Shark}", + "SkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Skeleton}", + "SkeletonMageBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DarkCaster}", + "SlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueSlime}", + "SnowFlinxBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowFlinx}", + "SpiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WallCreeper}", + "SporeZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieMushroom}", + "SwampThingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SwampThing}", + "TortoiseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantTortoise}", + "ToxicSludgeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ToxicSludge}", + "UmbrellaSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UmbrellaSlime}", + "UnicornBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Unicorn}", + "VampireBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VampireBat}", + "VultureBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Vulture}", + "NypmhBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nymph}", + "WerewolfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Werewolf}", + "WolfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Wolf}", + "WorldFeederBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SeekerHead}", + "WormBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantWormHead}", + "WraithBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Wraith}", + "WyvernBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WyvernHead}", + "ZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Zombie}", + "JackingSkeletron": "{$PaintingArtist.Crowno}", + "BitterHarvest": "{$PaintingArtist.Lazure}", + "BloodMoonCountess": "{$PaintingArtist.Lazure}", + "HallowsEve": "{$PaintingArtist.Lazure}", + "MorbidCuriosity": "{$PaintingArtist.Lazure}", + "StarTopper1": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "StarTopper2": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "StarTopper3": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BowTopper": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndRedGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenAndWhiteGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "MulticoloredBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndYellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndRedBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndYellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "MulticoloredLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndYellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndBlueLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueAndYellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "PillaginMePixels": "{$PaintingArtist.Lazure}", + "PaintingCastleMarsberg": "{$PaintingArtist.Lazure}", + "PaintingMartiaLisa": "{$PaintingArtist.Lazure}", + "PaintingTheTruthIsUpThere": "{$PaintingArtist.Lazure}", + "AngryTrapperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryTrapper}", + "ArmoredVikingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ArmoredViking}", + "BlackSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlackSlime}", + "BlueArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueArmoredBones}", + "BlueCultistArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistArcherBlue}", + "SkiphsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "BlueCultistFighterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "BoneLeeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BoneLee}", + "ClingerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Clinger}", + "CochinealBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CochinealBeetle}", + "CorruptPenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptPenguin}", + "CorruptSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptSlime}", + "CorruptorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Corruptor}", + "CrimslimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crimslime}", + "CursedSkullBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CursedSkull}", + "CyanBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CyanBeetle}", + "DevourerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DevourerHead}", + "DiablolistBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DiabolistRed}", + "DoctorBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DoctorBones}", + "DungeonSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DungeonSlime}", + "DungeonSpiritBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DungeonSpirit}", + "ElfArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ElfArcher}", + "ElfCopterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ElfCopter}", + "EyezorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Eyezor}", + "FlockoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Flocko}", + "GhostBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Ghost}", + "GiantBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantBat}", + "GiantCursedSkullBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantCursedSkull}", + "GiantFlyingFoxBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantFlyingFox}", + "GingerbreadManBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GingerbreadMan}", + "GoblinArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinArcher}", + "GreenSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreenSlime}", + "HeadlessHorsemanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HeadlessHorseman}", + "HellArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HellArmoredBones}", + "HellhoundBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hellhound}", + "HoppinJackBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HoppinJack}", + "IceBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceBat}", + "IceGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceGolem}", + "IceSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceSlime}", + "IchorStickerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IchorSticker}", + "IlluminantBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IlluminantBat}", + "IlluminantSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IlluminantSlime}", + "JungleBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleBat}", + "JungleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleSlime}", + "KrampusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Krampus}", + "LacBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LacBeetle}", + "LavaBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Lavabat}", + "LavaSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LavaSlime}", + "MartianBrainscramblerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BrainScrambler}", + "MartianDroneBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianDrone}", + "MartianEngineerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianEngineer}", + "MartianGigazapperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GigaZapper}", + "MartianGreyGruntBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GrayGrunt}", + "MartianOfficerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianOfficer}", + "MartianRaygunnerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RayGunner}", + "MartianScutlixGunnerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ScutlixRider}", + "MartianTeslaTurretBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianTurret}", + "MisterStabbyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MisterStabby}", + "MotherSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MotherSlime}", + "NecromancerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Necromancer}", + "NutcrackerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nutcracker}", + "PaladinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Paladin}", + "PenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Penguin}", + "PinkyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Pinky}", + "PoltergeistBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Poltergeist}", + "PossessedArmorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PossessedArmor}", + "PresentMimicBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PresentMimic}", + "PurpleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PurpleSlime}", + "RaggedCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RaggedCaster}", + "RainbowSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RainbowSlime}", + "RavenBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Raven}", + "RedSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RedSlime}", + "RuneWizardBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RuneWizard}", + "RustyArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RustyArmoredBonesAxe}", + "ScarecrowBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Scarecrow1}", + "ScutlixBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Scutlix}", + "SkeletonArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonArcher}", + "SkeletonCommandoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonCommando}", + "SkeletonSniperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonSniper}", + "SlimerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Slimer}", + "SnatcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Snatcher}", + "SnowBallaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowBalla}", + "SnowmanGangstaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowmanGangsta}", + "SpikedIceSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SpikedIceSlime}", + "SpikedJungleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SpikedJungleSlime}", + "SplinterlingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Splinterling}", + "SquidBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Squid}", + "TacticalSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TacticalSkeleton}", + "TheGroomBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TheGroom}", + "TimBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Tim}", + "UndeadMinerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UndeadMiner}", + "UndeadVikingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UndeadViking}", + "WhiteCultistArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistArcherWhite}", + "WhiteCultistCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "WhiteCultistFighterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "YellowSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.YellowSlime}", + "YetiBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Yeti}", + "ZombieElfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieElf}", + "SparkyPainting": "{$PaintingArtist.Crowno}\n‚In stillem Gedenken‘", + "PaintingAcorns": "{$PaintingArtist.Lazure}", + "PaintingColdSnap": "{$PaintingArtist.Lazure}", + "PaintingCursedSaint": "{$PaintingArtist.Lazure}", + "PaintingSnowfellas": "{$PaintingArtist.Lazure}", + "PaintingTheSeason": "{$PaintingArtist.Lazure}", + "RedString": "{$CommonItemTooltip.String}", + "OrangeString": "{$CommonItemTooltip.String}", + "YellowString": "{$CommonItemTooltip.String}", + "LimeString": "{$CommonItemTooltip.String}", + "GreenString": "{$CommonItemTooltip.String}", + "TealString": "{$CommonItemTooltip.String}", + "CyanString": "{$CommonItemTooltip.String}", + "SkyBlueString": "{$CommonItemTooltip.String}", + "BlueString": "{$CommonItemTooltip.String}", + "PurpleString": "{$CommonItemTooltip.String}", + "VioletString": "{$CommonItemTooltip.String}", + "PinkString": "{$CommonItemTooltip.String}", + "BrownString": "{$CommonItemTooltip.String}", + "WhiteString": "{$CommonItemTooltip.String}", + "RainbowString": "{$CommonItemTooltip.String}", + "BlackString": "{$CommonItemTooltip.String}", + "BlackCounterweight": "{$CommonItemTooltip.Counterweight}", + "BlueCounterweight": "{$CommonItemTooltip.Counterweight}", + "GreenCounterweight": "{$CommonItemTooltip.Counterweight}", + "PurpleCounterweight": "{$CommonItemTooltip.Counterweight}", + "RedCounterweight": "{$CommonItemTooltip.Counterweight}", + "YellowCounterweight": "{$CommonItemTooltip.Counterweight}", + "KingSlimeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "EyeOfCthulhuBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "EaterOfWorldsBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "BrainOfCthulhuBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "QueenBeeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "SkeletronBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "WallOfFleshBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "DestroyerBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "TwinsBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "SkeletronPrimeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "PlanteraBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "GolemBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "FishronBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "CultistBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "MoonLordBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "GoblinSummonerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinSummoner}", + "SalamanderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Salamander}", + "GiantShellyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantShelly}", + "CrawdadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crawdad}", + "FritzBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Fritz}", + "CreatureFromTheDeepBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CreatureFromTheDeep}", + "DrManFlyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DrManFly}", + "MothronBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mothron}", + "SeveredHandBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "ThePossessedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ThePossessed}", + "ButcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Butcher}", + "PsychoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Psycho}", + "DeadlySphereBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DeadlySphere}", + "NailheadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nailhead}", + "PoisonousSporeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "MedusaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Medusa}", + "GreekSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreekSkeleton}", + "GraniteFlyerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GraniteFlyer}", + "GraniteGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GraniteGolem}", + "BloodZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodZombie}", + "DripplerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Drippler}", + "TombCrawlerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TombCrawlerHead}", + "DuneSplicerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DuneSplicerHead}", + "FlyingAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingAntlion}", + "WalkingAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WalkingAntlion}", + "DesertGhoulBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertGhoul}", + "DesertLamiaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertLamiaDark}", + "DesertDjinnBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertDjinn}", + "DesertBasiliskBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertBeast}", + "RavagerScorpionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertScorpionWalk}", + "StardustSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustSoldier}", + "StardustWormBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustWormHead}", + "StardustJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustJellyfishBig}", + "StardustSpiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustSpiderBig}", + "StardustSmallCellBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "StardustLargeCellBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustCellBig}", + "SolarCoriteBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarCorite}", + "SolarSrollerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarSroller}", + "SolarCrawltipedeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarCrawltipedeHead}", + "SolarDrakomireRiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarDrakomireRider}", + "SolarDrakomireBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarDrakomire}", + "SolarSolenianBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarSolenian}", + "NebulaSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaSoldier}", + "NebulaHeadcrabBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaHeadcrab}", + "NebulaBrainBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaBrain}", + "NebulaBeastBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaBeast}", + "VortexLarvaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexLarva}", + "VortexHornetQueenBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexHornetQueen}", + "VortexHornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexHornet}", + "VortexSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexSoldier}", + "VortexRiflemanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexRifleman}", + "PirateCaptainBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCaptain}", + "PirateDeadeyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateDeadeye}", + "PirateCorsairBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCorsair}", + "PirateCrossbowerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCrossbower}", + "MartianWalkerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianWalker}", + "RedDevilBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RedDevil}", + "PinkJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PinkJellyfish}", + "GreenJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreenJellyfish}", + "DarkMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DarkMummy}", + "LightMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LightMummy}", + "AngryBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryBones}", + "IceTortoiseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceTortoise}", + "SandSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandSlime}", + "SeaSnailBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SeaSnail}", + "MoonLordPainting": "{$PaintingArtist.Crowno}", + "SandElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandElemental}", + "SandsharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandShark}", + "SandsharkCorruptBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkCorrupt}", + "SandsharkCrimsonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkCrimson}", + "SandsharkHallowedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkHallow}", + "TumbleweedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Tumbleweed}", + "BossBagBetsy": "{$CommonItemTooltip.RightClickToOpen}", + "BossBagOgre": "{$CommonItemTooltip.RightClickToOpen}", + "BossBagDarkMage": "{$CommonItemTooltip.RightClickToOpen}", + "ExplosiveBunny": "Für die Häschenkanone", + "VialofVenom": "'Äußerst giftig'", + "FlaskofVenom": "Nahkampfangriffe fügen Zielen Giftschaden zu", + "VenomArrow": "Richtet toxischen Schaden an", + "VenomBullet": "Richtet toxischen Schaden an", + "PartyBullet": "Explodiert beim Einschlag in Konfetti", + "NanoBullet": "Stiftet Verwirrung", + "ExplodingBullet": "Explodiert beim Einschlag", + "GoldenBullet": "Getötete Gegner lassen mehr Geld fallen", + "FlaskofCursedFlames": "Nahkampfangriffe richten bei Gegnern Schaden mit verfluchten Flammen an", + "FlaskofFire": "Nahkampfangriffe setzen Gegner in Brand", + "FlaskofGold": "Bei Nahkampfangriffen lassen Gegner mehr Gold fallen", + "FlaskofIchor": "Nahkampfangriffe verringern Verteidigung von Gegnern", + "FlaskofNanites": "Nahkampfangriffe verwirren Feinde", + "FlaskofParty": "Nahkampfangriffe lassen Konfetti regnen", + "FlaskofPoison": "Nahkampfangriffe vergiften Feinde", + "CobaltBreastplate": "Kritische Trefferchance um 3% erhöht", + "CobaltLeggings": "Um 10% erhöhte Bewegungsgeschwindigkeit", + "MythrilChainmail": "Um 5% erhöhter Schaden", + "MythrilGreaves": "Kritische Trefferchance um 3% erhöht", + "RocketI": "Kleiner Explosionsradius. Zerstört keine Felder", + "RocketII": "Kleiner Explosionsradius. Zerstört Felder", + "RocketIII": "Großer Explosionsradius. Zerstört keine Felder", + "RocketIV": "Großer Explosionsradius. Zerstört Felder", + "AsphaltBlock": "Erhöht die Laufgeschwindigkeit", + "CobaltPickaxe": "Kann Mithril und Oreichalkos abbauen", + "MythrilPickaxe": "Kann Adamantit und Titan abbauen", + "Cannonball": "Für die Kanone", + "Arkhalis": "Ich hab‘s keinem armen Irren abgenommen‘", + "BoneGlove": "33% Chance, keine Knochen zu verbrauchen", + "LogicGate_AND": "Wird aktiviert, wenn alle Lampen an sind. Zu allen anderen Zeiten deaktiviert.", + "LogicGate_NAND": "Wird aktiviert, wenn nicht alle Lampen an sind. Zu allen anderen Zeiten deaktiviert.", + "DD2FlameburstTowerT2Popper": "{$ItemTooltip.DD2FlameburstTowerT1Popper}", + "DD2FlameburstTowerT3Popper": "{$ItemTooltip.DD2FlameburstTowerT1Popper}", + "DD2BallistraTowerT2Popper": "{$ItemTooltip.DD2BallistraTowerT1Popper}", + "DD2BallistraTowerT3Popper": "{$ItemTooltip.DD2BallistraTowerT1Popper}", + "DD2ExplosiveTrapT2Popper": "{$ItemTooltip.DD2ExplosiveTrapT1Popper}", + "DD2ExplosiveTrapT3Popper": "{$ItemTooltip.DD2ExplosiveTrapT1Popper}", + "DD2LightningAuraT2Popper": "{$ItemTooltip.DD2LightningAuraT1Popper}", + "DD2LightningAuraT3Popper": "{$ItemTooltip.DD2LightningAuraT1Popper}", + "ApprenticeScarf": "{$ItemTooltip.HuntressBuckler}", + "SquireShield": "{$ItemTooltip.HuntressBuckler}", + "MonkBelt": "{$ItemTooltip.HuntressBuckler}", + "GolfClubStoneIron": "{$CommonItemTooltip.GolfIron}", + "ApprenticeAltPants": "Um 20% erhöhter Günstlingschaden und 25% Chance auf kritischen Magietreffer", + "ApprenticeAltShirt": "Um 30% erhöhter Günstlingschaden und 15% erhöhter Magieschaden", + "GolfClubGoldWedge": "{$CommonItemTooltip.GolfWedge}", + "ApprenticeRobe": "Um 20% erhöhter Günstlingschaden und 10% erhöhter Magieschaden", + "ApprenticeStaffT3": "Versprüht Verteidigung, die einen üblen Geruch verströmt", + "GoldenCrateHard": "{$ItemTooltip.GoldenCrate}", + "BookStaff": "Da fragt man sich, wer ein Buch des unendlichen Wissens auf einen Stock gesteckt hat ...\n, um einen mächtigen Tornado zu zaubern", + "GolfBallDyedSkyBlue": "{$CommonItemTooltip.GolfBall}", + "DD2BetsyBow": "Verschießt spaltende Pfeile, fügt Feinden in der Luft mehr Schaden zu", + "DD2ElderCrystal": "Lege ihn in den Eternia-Kristallständer, um Etherias Portale zu beschwören.", + "DD2ElderCrystalStand": "Hält den Eternia-Kristall", + "DD2EnergyCrystal": "Wird oft eingesetzt, um den eigenen Willen als körperliche Verteidigungsform zu verwenden", + "GolfBallDyedRed": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedTeal": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedPurple": "{$CommonItemTooltip.GolfBall}", + "DD2PetDragon": "Beschwört einen zahmen Drachen", + "DD2PetGato": "Beschwört eine zahme Gato", + "DD2PetGhost": "Beschwört einen zahmen Flackerdocht, der dir leuchtet", + "DD2PhoenixBow": "Nutze die Macht der unsterblichen Flammen", + "DD2SquireBetsySword": "Entfesselt die Energie des Herzens geradeaus", + "DD2SquireDemonSword": ", um mit einem Schild zu blocken", + "DefenderMedal": "Währung zum Handeln mit dem Tavernenwirt", + "ShuckedOyster": "{$CommonItemTooltip.MinorStats}", + "HuntressAltPants": "Um 25% erhöhter Günstlingschaden und 20% erhöhte Bewegungsgeschwindigkeit", + "HuntressAltShirt": "Um 25% erhöhter Günstlings- & Fernkampfschaden", + "GolfClubBronzeWedge": "{$CommonItemTooltip.GolfWedge}", + "HuntressJerkin": "Um 20% erhöhter Günstlings- und Fernkampfschaden", + "HuntressPants": "Um 10% erhöhter Günstlingschaden und 20% erhöhte Bewegungsgeschwindigkeit", + "GolfClubWoodDriver": "{$CommonItemTooltip.GolfDriver}", + "Oyster": "{$CommonItemTooltip.RightClickToOpen}", + "MonkAltPants": "Um 20% erhöhter Günstlingschaden, Bewegungsgeschwindigkeit und kritische Nahkampfchance", + "MonkAltShirt": "Um 20% erhöhter Günstlingschaden und Nahkampfgeschwindigkeit", + "GolfClubMythrilIron": "{$CommonItemTooltip.GolfIron}", + "MonkPants": "Um 10% erhöhter Günstlingsschaden, um 10% erhöhte kritische Angriffschance und um 20% erhöhte Bewegungsgeschwindigkeit", + "MonkShirt": "Um 20% erhöhter Günstlings- und Nahkampfschaden", + "MonkStaffT1": "Läd Energie auf, während du sie schwingst, um Feinde zu zerschmettern", + "MonkStaffT2": "Beschwört einen Geist, der die Feinde angreift", + "MonkStaffT3": " und Waffe halten, um einen alternativen Angriff zu starten!", + "GolfClubRustyPutter": "{$CommonItemTooltip.GolfPutter}", + "IronCrateHard": "{$ItemTooltip.IronCrate}", + "SquireAltShirt": "Um 30% erhöhter Günstlingschaden und massiv erhöhte Lebensregeneration", + "GolfClubLeadPutter": "{$CommonItemTooltip.GolfPutter}", + "SquireGreaves": "Um 15% erhöhter Günstlingsschaden, um 20% erhöhte kritische Nahkampfchance und Bewegungsgeschwindigkeit", + "SquirePlating": "Um 15% erhöhter Günstlings- und Nahkampfschaden", + "ArkhalisShirt": "{$ItemTooltip.ArkhalisHat}", + "ArkhalisPants": "{$ItemTooltip.ArkhalisHat}", + "LobsterTail": "{$CommonItemTooltip.MediumStats}", + "ArkhalisHat": "{$CommonItemTooltip.DevItem}\n'Aus dem Raster hab ich das nicht'", + "LeinforsHat": "{$CommonItemTooltip.DevItem}\n'Damit diese vollen Locken so herrlich wie eh und je bleiben'", + "LeinforsShirt": "{$CommonItemTooltip.DevItem}\n'Bringt das Sexy wieder zurück'", + "LeinforsPants": "{$CommonItemTooltip.DevItem}\n‚Shia á la Überraschung! Von einer Hose hast du das nicht erwartet, oder?‘", + "OceanCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "LeinforsAccessory": "{$CommonItemTooltip.DevItem}\n‚Beste Ergebnisse erzielt man in Kombination mit einer Pastadiät‘", + "KiteSpectrum": "{$CommonItemTooltip.Kite}", + "KiteWanderingEye": "{$CommonItemTooltip.Kite}", + "KiteUnicorn": "{$CommonItemTooltip.Kite}", + "FairyQueenBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "LavaCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LavaCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "HotlineFishingHook": "{$CommonItemTooltip.LavaFishing}", + "LavaFishingHook": "{$CommonItemTooltip.LavaFishing}", + "TeleportationPylonJungle": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonPurity": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonHallow": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonUnderground": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonOcean": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonDesert": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonSnow": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonMushroom": "{$CommonItemTooltip.TeleportationPylon}", + "RockGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RockGolem}", + "BloodMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodMummy}", + "SporeSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SporeSkeleton}", + "SporeBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SporeBat}", + "LarvaeAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LarvaeAntlion}", + "CrimsonBunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonBunny}", + "CrimsonGoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonGoldfish}", + "CrimsonPenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonPenguin}", + "BigMimicCorruptionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicCorruption}", + "BigMimicCrimsonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicCrimson}", + "BigMimicHallowBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicHallow}", + "MossHornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MossHornet}", + "WanderingEyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WanderingEye}", + "CreativeWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "RainbowWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressUpToBooster}", + "LongRainbowTrailWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}\n{$CommonItemTooltip.PressUpToBooster}" + }, + "CommonItemTooltip": { + "SpecialCrafting": "Wird zur besonderen Herstellung verwendet", + "DevItem": "‚Toll, wenn man sich als Dev ausgeben will!‘", + "FlightAndSlowfall": "Ermöglicht Flug und langsamen Fall", + "RightClickToOpen": " zum Öffnen", + "BannerBonus": "Spieler in der Nähe erhalten einen Bonus gegen: ", + "Counterweight": "Wirft ein Gegengewicht, nachdem er einen Feind mit einem Jo-jo getroffen hat", + "MinuteDuration": "{0} Minuten Dauer", + "PlaceableOnXmasTree": "Kann auf einem Weihnachtsbaum platziert werden", + "RestoresLife": "Stellt {0} Leben wieder her", + "RestoresMana": "Stellt {0} Mana wieder her", + "SecondDuration": "{0} Sekunden Dauer", + "String": "Erhöht Jo-jo-Reichweite", + "UsesLife": "Verwendet {0} Leben", + "UsesMana": "Verwendet {0} Mana" + }, + "BuffDescription": { + "WellFed_Expert": "Kleinere Verbesserungen bei allen Werten und erhöhte Lebensregeneration" + } +} \ No newline at end of file diff --git a/Localization/Content/de-DE/Legacy.json b/Localization/Content/de-DE/Legacy.json new file mode 100644 index 0000000..71cf059 --- /dev/null +++ b/Localization/Content/de-DE/Legacy.json @@ -0,0 +1,1143 @@ +{ + "LegacyWorldGen": { + "0": "Welt wird generiert", + "10": "Höhlenoberflächen werden generiert", + "11": "Dschungel wird generiert", + "12": "Schwimmende Inseln werden generiert", + "13": "Pilzflecken werden generiert", + "14": "Schlamm wird in Dreck gefügt", + "15": "Schlick wird hinzugefügt", + "16": "Glitzer wird hinzugefügt", + "17": "Spinnweben werden hinzugefügt", + "18": "Erstellen der Unterwelt", + "19": "Gewässer werden hinzugefügt", + "1": "Sand wird hinzugefügt", + "20": "Macht die Welt böse", + "21": "Berghöhlen werden generiert", + "22": "Strände werden erstellt", + "23": "Edelsteine werden hinzugefügt", + "24": "Gravitieren von Sand", + "25": "Reinigung von Dreckhintergrund", + "26": "Platzieren von Altären", + "27": "Gewässer verteilen", + "28": "Lebenskristalle platzieren", + "29": "Platzieren von Statuen", + "2": "Hügel werden generiert", + "30": "Verstecken von Schätzen", + "31": "Verstecken von mehr Schätzen", + "32": "Verstecken von Dschungelschätzen", + "33": "Verstecken von Wasserschätzen", + "34": "Platzieren von Fallen", + "35": "Platzieren von Zerbrechlichem", + "36": "Platzieren von Höllenschmieden", + "37": "Gras wird verteilt", + "38": "Kakteen wachsen", + "39": "Sonnenblumen werden gepflanzt", + "40": "Bäume werden gepflanzt", + "41": "Kräuter werden gepflanzt", + "42": "Unkraut wird gepflanzt", + "43": "Wein wird angebaut", + "44": "Blumen werden gepflanzt", + "45": "Pilze werden gesät", + "46": "Unverbrauchte Ressourcen werden freigesetzt", + "47": "Spielobjekte werden zurückgesetzt", + "48": "Schwerer Modus wird eingestellt", + "49": "Weltdaten werden gesichert:", + "4": "Felsen werden in den Dreck gesetzt", + "50": "Backup von Weltdatei wird erstellt", + "51": "Weltdaten werden geladen:", + "52": "Überprüfen der Feld-Ausrichtung;", + "53": "Laden fehlgeschlagen!", + "54": "Kein Backup gefunden.", + "55": "Suchen von Feld-Frames", + "56": "Schnee hinzufügen", + "57": "Welt", + "58": "Verlies erstellen", + "59": "Ein Meteorit ist gelandet!", + "5": "Dreck wird in Felsen platziert", + "60": "Glätte die Welt", + "61": "Moosifizierung", + "62": "Edelsteine werden hinzugefügt", + "63": "Errichten von Höhlenwänden", + "64": "Erstellen von Spinnenhöhlen", + "65": "Weltdaten werden gelöscht:", + "66": "Weltdaten werden gesichert:", + "67": "Weltdaten werden geladen:", + "68": "Karte wird gezeichnet:", + "69": "Wasserfälle werden erschaffen", + "6": "Lehm wird hinzugefügt", + "70": "Dschungelruinen werden erschaffen", + "71": "Hornissennester werden erschaffen", + "72": "Welt wird grausam und gemein gemacht", + "73": "Weltenspeichern wird bestätigt:", + "74": "Schleim fällt vom Himmel!", + "75": "Schleim fällt nicht mehr vom Himmel!", + "77": "Mehr Gras hinzufügen", + "78": "Wüstifizierung", + "7": "Zufällig platzierte Löcher werden geschaffen", + "80": "Marmor wird gemeißelt", + "81": "Granit wird wachsen gelassen", + "8": "Generieren kleiner Höhlen", + "9": "Generieren großer Höhlen" + }, + "LegacyDialog": { + "1": "Ich hoffe, du dünnes Hemd bist nicht das Einzige, was zwischen Chtulhus Auge und uns steht.", + "10": "Schau dir mal meine Dreckblöcke an; die sind wirklich super-dreckig.", + "100": "Warum willst du die Welt reinigen, wenn du sie einfach in die Luft jagen kannst?", + "101": "Wenn du das hier in die Badewanne schmeißt und alle Fenster schließt, durchpustet es deine Nasenhöhlen und dir fliegen die Ohren weg!", + "102": "Möchtest du mal Grillhähnchen spielen?", + "103": "Könntest du hier unterschreiben, dass du nicht jammern wirst?", + "104": "RAUCHEN IST HIER NICHT ERLAUBT!", + "105": "Sprengstoffe sind zur Zeit der Knaller. Kauf dir jetzt welche!", + "106": "Ein schöner Tag, um zu sterben!", + "107": "Ich frage mich, was passiert, wenn ich ... (BUMM!) ... Oha, sorry, brauchtest du dieses Bein noch?", + "108": "Dynamit, mein ganz spezielles Heilmittelchen - für alles, was schmerzt.", + "109": "Schau dir meine Waren an - sie haben hochexplosive Preise!", + "11": "Junge, Junge, wie die Sonne brennt! Ich hab da eine tolle klimatisierte Rüstung.", + "110": "Ich erinnere mich vage an eine Frau, die ich fesselte und in das Verlies warf.", + "111": "... wir haben ein Problem! Es ist Blutmond!", + "112": "Wenn ich jünger wäre, würde ich mit {Nurse} ausgehen wollen. Ich war mal ein Womanizer.", + "113": "Dein roter Hut kommt mir bekannt vor ...", + "114": "Danke nochmals, dass du mich von meinem Fluch befreit hast. Es fühlte sich an, als hätte mich etwas angesprungen und gebissen.", + "115": "Mama sagte immer, dass ich einen guten Schneider abgeben würde.", + "116": "Das Leben ist wie ein Kleiderschrank; du weißt nie, was du tragen wirst!", + "117": "Natürlich ist die Stickerei schwierig! Wenn es nicht schwierig wäre, würde es niemand machen! Das macht es so großartig.", + "118": "Ich weiß alles, was man über das Kleidergeschäft wissen muss.", + "119": "Das Leben mit dem Fluch war einsam, deshalb fertigte ich mir aus Leder einen Freund an. Ich nannte ihn Wilson.", + "12": "Die Sonne steht zwar hoch, meine Preise sind's aber nicht.", + "120": "Danke für die Befreiung, Mensch. Ich wurde gefesselt und von den anderen Goblins hier zurückgelassen. Man kann sagen, dass wir nicht besonders gut miteinander auskamen.", + "121": "Ich kann nicht glauben, dass sie mich fesselten und hierließen, nur um klarzumachen, dass sie nicht nach Osten gehen.", + "122": "Darf ich nun, da ich zu den Verstoßenen gehöre, meine Stachelkugeln wegwerfen? Sie pieken durch die Taschen.", + "123": "Suchst du einen Bastelexperten? Dann bin ich dein Goblin!", + "124": "Danke für deine Hilfe. Jetzt muss ich erst mal aufhören, hier ziellos herumzurennen. Wir begegnen uns sicher wieder.", + "125": "Ich hielt dich für größer.", + "126": "Heh ... was macht {Mechanic} so? Hast du ... hast du vielleicht mit ihr gesprochen?", + "127": "Wäre ein Motor für deinen Hut nicht schick? Ich glaube, ich habe einen Motor, der genau hineinpasst.", + "128": "Ja, ich hab schon gehört, dass du Raketen und Laufstiefel magst. Deshalb habe ich ein paar Raketen in deine Laufstiefel montiert.", + "129": "Schweigen ist Gold. Klebeband ist Silber.", + "13": "Toll. Ich kann {Mechanic} und {Nurse} von hier aus streiten hören.", + "130": "JA! Gold ist stärker als Eisen. Was bringt man den Menschen heutzutage eigentlich bei?", + "131": "Diese Bergmanns-Helm-Flossen-Kombination sah auf dem Papier viel besser aus.", + "132": "Goblins kann man erstaunlich leicht auf die Palme bringen. Die würden sogar wegen Kleidern einen Krieg anfangen.", + "133": "Um ehrlich zu sein, Goblins sind nicht gerade Genies oder Raketentechniker. Naja, bis auf ein paar Ausnahmen.", + "134": "Weißt du eigentlich, warum wir alle diese Stachelkugeln mit uns herumtragen? Ich weiß es nämlich nicht.", + "135": "Meine neuste Erfindung ist fertig! Diese Version explodiert nicht, wenn du sie heftig anhauchst.", + "136": "Goblin-Diebe sind nicht besonders gut in ihrem Job. Sie können nicht mal was aus einer unverschlossenen Truhe klauen.", + "137": "Danke für die Rettung, mein Freund! Die Fesseln fingen an, zu scheuern.", + "138": "Oh, mein Held!", + "139": "Oh, wie heroisch! Danke für die Rettung, junge Dame!", + "14": "Hast du Chith ... Shith... Chat... ... das große Auge gesehen?", + "140": "Oh, wie heroisch! Danke für die Rettung, junger Mann!", + "141": "Nun da wir uns kennen, kann ich doch bei dir einziehen, oder?", + "142": "Hallo, {Guide}! Was kann ich heute für dich tun?", + "143": "Hallo, {Demolitionist}! Was kann ich heute für dich tun?", + "144": "Hallo, {GoblinTinkerer}! Was kann ich heute für dich tun?", + "145": "Hallo, {Nurse}! Was kann ich heute für dich tun?", + "146": "Hallo, {Mechanic}! Was kann ich heute für dich tun?", + "147": "Hallo, {Dryad}! Was kann ich heute für dich tun?", + "148": "Möchtest du, dass ich eine Münze hinter deinem Ohr hervorziehe? Nein? Gut.", + "149": "Möchtest du vielleicht magische Süßigkeiten? Nein? Gut.", + "15": "Heh, dieses Haus ist doch wohl sicher? Oder? {PlayerName}?", + "150": "Ich braue eine heiße Zauber-Schokolade, wenn du Inter ... nein? Gut.", + "151": "Bist du hier, um einen Blick in meine Kristallkugel zu werfen?", + "152": "Hast du dir je einen verzauberten Ring gewünscht, der Steine in Schleime verwandelt? Ich auch nicht.", + "153": "Jemand sagte mir mal, Freundschaft sei magisch. Das ist lächerlich. Du kannst mit Freundschaft keine Menschen in Frösche verwandeln.", + "154": "Jetzt kann ich deine Zukunft sehen ... Du wirst mir eine Menge Items abkaufen!", + "155": "Ich habe mal versucht, eine Engelsstatue zu beleben. Hat überhaupt nichts gebracht!", + "156": "Danke! Es wäre nur eine Frage der Zeit gewesen, bis aus mir eines der Skelette hier geworden wäre.", + "157": "Pass auf, wo du hingehst! Ich war vor einer Weile dort drüben.", + "158": "Warte, ich habe es fast geschafft, hier unten WLAN zu installieren.", + "159": "Aber ich hatte es fast geschafft, hier oben blinkende Lichter anzubringen.", + "16": "Nicht mal ein Blutmond kann den Kapitalismus stoppen. Lass uns also Geschäfte machen.", + "160": "NICHT BEWEGEN! ICH HABE MEINE KONTAKTLINSE VERLOREN.", + "161": "Ich möchte nur den Schalter ... Was?!", + "162": "Oh, lass mich raten. Nicht genügend Kabel gekauft. Idiot.", + "163": "Kannst du einfach nur mal ... Bitte! Ja? Gut. Uff!", + "164": "Mir gefällt nicht, wie du mich anschaust. Ich ARBEITE gerade.", + "165": "Sag, {PlayerName}, kommst du gerade von {GoblinTinkerer}? Hat er vielleicht etwas über mich gesagt?", + "166": "{ArmsDealer} spricht immer davon, auf meine Druckplatten zu drücken. Ich habe ihm gesagt, die ist zum Drauftreten.", + "167": "Kaufe immer etwas mehr Kabel als nötig!", + "168": "Hast du dich vergewissert, dass dein Gerät angeschlossen ist?", + "169": "Oh, weißt du, was dieses Haus noch braucht? Mehr blinkende Lichter.", + "170": "Du erkennst den Blutmond an der Rotfärbung des Himmels. Irgendetwas daran lässt Monster ausschwärmen.", + "171": "Weißt du vielleicht, wo man Todeskraut findet? Nein, es hat keinen Grund. Ich frag nur so.", + "172": "Wenn du mal hochschauen würdest, würdest du bemerken, dass der Mond rot ist.", + "173": "Du solltest in der Nacht drinnen bleiben. Es ist sehr gefährlich, in der Dunkelheit umherzustreifen.", + "174": "Sei gegrüßt, {PlayerName}. Gibt es etwas, das ich für dich tun kann?", + "175": "Ich bin hier, um dir zu raten, was du als Nächstes tust. Du solltest immer zu mir kommen, wenn du feststeckst.", + "176": "Es heißt, es gibt jemanden, der dir erklärt, wie man in diesem Land überlebt ... oh, Moment. Das bin ja ich.", + "177": "Du kannst deine Spitzhacke zum Graben im Dreck verwenden und deine Axt zum Holzfällen. Bewege einfach deinen Zeiger über das Feld und klicke!", + "178": "Wenn du überleben willst, musst du Waffen und Zufluchten bauen. Fälle dazu Bäume und sammle das Holz.", + "179": "Drücke {InventoryKey} zum Aufrufen des Handwerksmenüs. Wenn du genügend Holz hast, kannst du eine Werkbank bauen. Damit kannst du komplexere Sachen herstellen, solange du nur nah genug dran stehst.", + "18": "Kosh, kapleck Mog. Oha, sorry. Das war Klingonisch für ‚Kauf etwas oder stirb‘.", + "180": "Du kannst durch Platzieren von Holz oder anderen Blöcken in der Welt eine Zuflucht bauen. Vergiss dabei nicht, auch Wände zu bauen und aufzustellen.", + "181": "Sobald du ein Holzschwert hast, kannst du versuchen, etwas Glibber von den Schleimen zu sammeln. Kombiniere Holz und Glibber, um eine Fackel zu erhalten.", + "182": "Verwende einen Hammer, um mit Hintergründen zu interagieren!", + "183": "Du solltest ein bisschen Bergbau betreiben, um Gold zu finden. Du kannst sehr nützliche Dinge damit herstellen.", + "184": "Jetzt, da du etwas Erz hast, musst du es in einen Barren verwandeln, um damit Items zu erschaffen. Dazu brauchst du einen Schmelzofen!", + "185": "Du kannst einen Schmelzofen aus Fackeln, Holz und Steinen herstellen. Achte dabei darauf, dass du neben einer Werkbank stehst.", + "186": "Zum Herstellen der meisten Sachen aus Metallbarren wirst du einen Amboss brauchen.", + "188": "Im Untergrund findest du Kristallherzen, mit denen du deine maximale Lebensspanne erhöhen kannst. Du kannst sie mit der Spitzhacke zerschlagen.", + "19": "{PlayerName}, richtig? Ich habe nur Gutes über dich gehört!", + "191": "Es gibt viele Möglichkeiten, wie du Menschen dazu bewegen kannst, in unsere Stadt zu ziehen. Sie brauchen zuallererst ein Zuhause.", + "192": "Damit ein Raum wie ein Heim wirkt, braucht er eine Tür, einen Stuhl, einen Tisch und eine Lichtquelle. Achte darauf, dass das Haus auch Wände hat.", + "193": "Zwei Menschen werden nicht im selben Haus leben wollen. Außerdem brauchen sie ein neues Zuhause, wenn ihr Heim zerstört wurde.", + "194": "Du kannst das Behausungsmenü verwenden, um ein Haus zuzuweisen und anzuschauen. Öffne dein Inventar und klick auf das Haussymbol.", + "195": "Wenn du willst, dass ein Händler einzieht, brauchst du eine Menge Geld. 50 Silbermünzen sollten aber reichen.", + "196": "Damit eine Krankenschwester einzieht, solltest du deine maximale Lebensspanne erhöhen.", + "197": "Wenn du ein Gewehr hast, taucht garantiert ein Waffenhändler auf, um dir Munition zu verkaufen!", + "198": "Du solltest dich beweisen, indem du ein starkes Monster besiegst. Das wird die Aufmerksamkeit einer Dryade erregen.", + "199": "Erforsche das Verlies wirklich sorgfältig. Tief unten könnten sich Gefangene befinden.", + "2": "Was für eine schäbige Rüstung du trägst. Kauf lieber ein paar Heiltränke.", + "20": "Ich hörte, es gibt einen geheimen Schatz ... oh, vergiss es!", + "200": "Vielleicht hat der Greis vom Verlies Lust, bei uns mitzumachen - jetzt da sein Fluch aufgehoben wurde.", + "201": "Behalte alle Bomben, die du findest. Ein Sprengmeister möchte vielleicht einen Blick darauf werfen.", + "202": "Sind Goblins wirklich so anders als wir, dass wir nicht in Frieden zusammenleben können?", + "203": "Ich hörte, dass ein mächtiger Zauberer hier in der Gegend lebt. Achte bei deiner nächsten unterirdischen Expedition auf ihn.", + "204": "Wenn du Linsen an einem Dämonenaltar kombinierst, kannst du vielleicht eine Möglichkeit finden, ein mächtiges Monster herbeizurufen. Du solltest jedoch bis zur Nacht warten, bevor du das tust.", + "205": "Du kannst einen Wurmköder mit verfaulten Fleischbrocken und Ekelpulver erzeugen. Achte aber darauf, dass du dich vor der Verwendung in einem verdorbenen Gebiet befindest.", + "206": "Dämonenaltäre sind gewöhnlich im Verderben zu finden. Du musst aber nahe an ihnen dran stehen, um Items herzustellen", + "208": "Wenn du einen Topf siehst, so schlage ihn kaputt. Töpfe enthalten alle möglichen nützlichen Zubehörteile.", + "209": "Verborgene Schätze sind auf der ganzen Welt zu finden! Einige erstaunliche Dinge sind auch im Untergrund aufzuspüren!", + "21": "Engelsstatue, sagst du? Tut mir leid, ich bin kein Nippesverkäufer.", + "210": "Beim Zerschlagen einer Schattenkugel fällt mitunter ein Meteorit vom Himmel. Schattenkugeln können normalerweise in den Schluchten bei verdorbenen Gebieten gefunden werden.", + "211": "Du solltest dich darauf konzentrieren, mehr Kristallherzen zur Erhöhung deiner maximalen Lebensspanne zu sammeln.", + "212": "Deine jetzige Ausrüstung wird einfach nicht ausreichen. Du musst eine bessere Rüstung fertigen.", + "213": "Ich denke, du bist bereit für deinen ersten großen Kampf. Sammle in der Nacht ein paar Linsen von den Augäpfeln und bringe sie zum Dämonenaltar.", + "214": "Du solltest dein Leben verlängern, bevor du die nächste Herausforderung annimmst. Fünfzehn Herzen sollten ausreichen.", + "215": "Der Ebenstein im Verderben kann durch Verwendung von etwas Pulver einer Dryade gereinigt werden, oder er kann mit Sprengstoff zerstört werden.", + "216": "Dein nächster Schritt ist, die verdorbenen Schluchten zu untersuchen. Suche nach Schattenkugeln und zerstöre sie!", + "217": "Nicht weit von hier gibt es ein altes Verlies. Dies wäre ein guter Zeitpunkt, es zu erkunden.", + "218": "Du solltest versuchen, deine Lebensspanne auf das Maximum anzuheben. Versuche, zwanzig Herzen zu finden.", + "219": "Im Dschungel lassen sich viele Schätze finden, wenn du bereit bist, tief genug zu graben.", + "22": "Der letzte Typ, der hier war, hinterließ mir einigen Nippes, äh, ich meine ... Schätze!", + "220": "Die Unterwelt entstand aus einem Material, welches sich Höllenstein nennt. Es eignet sich perfekt, um damit Waffen und Rüstungen herzustellen.", + "221": "Wenn du bereit bist, den Wächter der Unterwelt herauszufordern, musst du ein lebendiges Opfer darbringen. Alles was du brauchst, findest du in der Unterwelt.", + "222": "Zerschlage jeden Dämonenaltar, den du findest. Etwas Gutes passiert, wenn du das tust!", + "223": "Seelen können manchmal von gefallenen Kreaturen an Orten extremen Lichts oder extremer Finsternis eingesammelt werden.", + "224": "Ho ho ho, und eine Flasche ... Eierlikör!", + "225": "Würdest du mir ein paar Plätzchen backen?", + "226": "Was? Du dachtest, ich wäre nicht echt?", + "227": "Es gelang mir, dein Gesicht wieder anzunähen. Sei beim nächsten Mal vorsichtiger.", + "228": "Du behältst wahrscheinlich eine Narbe.", + "229": "Alles okay. Ich will nicht, dass du nochmal von irgendwelchen Klippen springst.", + "23": "Ich frage mich, ob der Mond aus Käse ist ... huch, was? Oh, ja, kauf etwas!", + "230": "Das hat nicht allzu weh getan, oder?", + "231": "Als ob im Untergrund leben nicht schon schlimm genug ist, da kommen Idioten wie du, wenn ich schlafe, und stehlen meine Kinder.", + "232": "Nur unter uns, aber {Dryad} ist die einzige, der ich vertraue. Sie ist die einzige hier, die nicht versucht hat, mich zu fressen oder als Zutat in einen Trank zu schmeißen.", + "233": "Ich hab letztens versucht, mich selbst zu lecken, um so sehen, was so toll daran sein soll ... dann ist plötzlich alles blau geworden.", + "234": "Jetzt werde ich jedes Mal, wenn ich die Farbe Blau sehe, depressiv und faul.", + "235": "Du hast hier keine Schweine gesehen, oder? Mein Bruder hat sein Bein an eins verloren.", + "236": "Alle Leute in der Stadt stehen irgendwie neben der Spur. Ich bin letzte Nacht aufgewacht und der Schneider knabberte an meinem Fuß.", + "237": "Ich gebe dir einen Rabatt für die Kleidung, wenn du {Truffle} davon überzeugen kannst, hierzukommen und sich ... messen zu lassen.", + "238": "Ich glaube, die Leute schätzen {Truffle} falsch ein. Eigentlich ist er ein klasse Typ.", + "24": "Hast du Gold gesagt? Ich nehm' dir das ab.", + "240": "Ich weiß nichts über ‚Truffle Shuffle‘, hör auf mich danach zu fragen!", + "241": "Es geht ein Mega-Gerücht um mich um: ‚Wenn du ihn nicht besiegen kannst, friss ihn auf!‘", + "242": "Hey, was haste da in dir drin?", + "243": "Vielleicht sollte ich ein Pirat der Lüfte werden? Ich habe schon überlegt, ein Pirat der Lüfte zu werden.", + "244": "Wie dem auch sei, ein Jetpack würde dir gut stehen!", + "245": "Ich bin in letzter Zeit irgendwie verdrossen, also lass mich mit deinem Gelaber zufrieden, du Lump!", + "246": "Ich bin mächtig neugierig auf diesen {Cyborg} Was nimmt er nur zu sich, dass er immer so weiterläuft?", + "247": "Dieser Kapitän scheint ein wenig ‚über die Bucht geschlagen zu haben‘, wenn du weißt, was ich meine!", + "248": "Zeig mir deine Ausrüstung!", + "249": "Mir gefällt deine ... Ausrüstung. Gibts die auch in Messing?", + "25": "Blute mich bloß nicht voll!", + "250": "Sobald du heiligen Boden betrittst, siehst du einen Regenbogen am Himmel. Ich kann dir beim Malen helfen, wenn du magst.", + "251": "Sieh dir nur mal {PartyGirl} an. Das ist mal ein Mädchen, dass so richtig Spaß haben kann!", + "252": "Ich kenne den Unterschied zwischen Türkis und Blaugrün. Aber dir verrate ich ihn nicht.", + "253": "Ich habe kein Titanenweiß mehr, also frag gar nicht erst.", + "254": "Probier rasendes Rosa mit Lila aus. Ich schwöre, das funktioniert!", + "255": "Nein, nein, nein ... Es gibt UNMENGEN an verschiedenen Grautönen! Hör bloß auf!", + "256": "Ich hoffe, es regnet nicht wieder, bevor die Farbe trocken ist Das wäre eine Katastrophe!", + "257": "Ich bringe euch die reichsten Farben im Austausch für all euer Geld!", + "258": "Meine Güte, was du da trägst, ist viel zu langweilig. Du solltest wirklich mal einen Färbekurs für langweilige Kleidung besuchen.", + "259": "Die einzige Art Holz, die ich färben würde, wäre REICHES Mahagoni. Bei anderen Hölzern wäre das die reinste Verschwendung.", + "26": "Jetzt hör schon mit der Bluterei auf!", + "260": "Du musst etwas gegen {Pirate} unternehmen. Jedes Mal, wenn er vorbeischaut, werd ich eine ganze Woche lang den Gestank nicht wieder los.", + "261": "Was für ein Arzt ich bin? Ich bin ein Hexenarzt", + "262": "Das Herz der Magie ist die Natur. Die Natur der Herzen ist Magie.", + "263": "{Nurse} kann zwar deinen Körper heilen, aber ich bringe dich dazu, die Heilung in dir aufzunehmen.", + "264": "Wähle weise, {PlayerName}, denn meine Waren sind brisant und meine dunklen Künste mysteriös.", + "265": "Wir müssen reden. Es ... geht um Partys.", + "266": "Ich kann mich nicht entscheiden, was ich mehr mag: Partys oder After-Partys.", + "267": "Wir sollten eine Leuchtwurzel-Party schmeißen ... aber auch eine After-Party.", + "268": "Wow, {PlayerName}, wenn ich solch einen abenteuerlichen Menschen wie dich treffe, will ich immer gleich eine Party schmeißen!", + "269": "Häng eine Diskokugel auf und los geht‘s!", + "27": "Wenn du stirbst, dann bitte draußen.", + "270": "Ich war mal in Schweden, die wissen, wie man Partys feiert. Warum ist das bei dir nicht so?", + "271": "Mein Name ist {PartyGirl}, aber die Leute nennen mich die Partyverderberin Ach, ich weiß auch nicht, aber es klingt cool.", + "272": "Magst du Partys? Manchmal? Hm, okay, dann können wir reden ...", + "273": "Ich bin zwar keine Landratte, aber lieber ein bisschen Land, als viel Ratte", + "274": "Yo ho ho und eine Flasche... Leuchtwurzeln!", + "275": "JAR! Lustig, dass du von Papageien anfängst, weil ... ähm... Worüber haben wir grad gesprochen?", + "276": "{PlayerName}, du bist eine der schönest Jungfern, die meine Kapitänsaugen seit vielen Monden gesichtet haben!", + "277": "Bleib weg von meiner Beute, du Lump!", + "278": "Was zum Teufel redest du? Moby Dick ist mein!", + "279": "*Yarr Blarr Harrdarr*", + "28": "Was soll das heißen?!", + "280": "Und dann sagte Einheit 492-8: ‚Was glaubst du, wer ich bin, Einheit 472-6?‘ HA. HA. HA.", + "281": "Meine Expeditionseffizienz wurde stark reduziert, als ein Projektil mit meinem Bewegungselement kollidiert ist.", + "282": "Dieser Satz ist falsch, oder nicht?", + "283": "Dann ist die punkige Kleine eine Erfinderin, was? Ich glaube, ihr könnte ich noch einiges beibringen!", + "284": "Klar, {Pirate} und ich sind Kumpels. Aber ich hasse es, wenn sein Papagei auf mich scheißt. Das Zeug bringt mich zum Rosten!", + "285": "Ich habe mir selbst ein Geschmacksmodul gebaut, damit ich Bier trinken kann!", + "286": "Manchmal lasse ich sogar etwas locker ... Verstehst du? Na?", + "287": "Hinten und an den Seiten kurz, ja?", + "288": "Diese Strähnchen bringen deine Augen so richtig zur Geltung.", + "289": "Meine Hände sind ganz klebrig von all dem ...", + "29": "Irgendwie gefällt mir dein Ton nicht.", + "290": "Tee? Kaffee? Oder einfach wieder nur Orangensaft?", + "291": "Süße, wir müssen wirklich was gegen deinen Spliss tun.", + "292": "Kleine! Du bist mein liebstes Tratschthema aller Zeiten.", + "293": "Welches Aftershave darf‘s denn heute sein, mein Herr?", + "294": "Setz dich und lass dich von mir zum Hingucker machen.", + "295": "Entweder hat man Style oder man wird gestylt.", + "296": "Bei dir machen wir ... nicht viel Brimborium.", + "297": "Einmal habe ich eines dieser Produkte von Dye Master ausprobiert. Spitzen versengt. Katastrophe.", + "298": "Ach, du armes, armes Ding. Setz ... setz dich einfach hierher. Das wird schon wieder. Schhhh.", + "299": "Sieht spitze aus!", + "3": "Ich habe das Gefühl, dass mich eine böse Kraft beobachtet.", + "30": "Warum bist du überhaupt hier? Wenn du nicht blutest, gehörst du nicht hierher. Raus jetzt!", + "300": "Hallo, mein Herr, ich bin {Stylist}, deine Friseurin für heute.", + "301": "Nur ein wenig obenrum? Wie langweilig ...", + "302": "Ich hoffe, dir gefällt, was ich mit {PartyGirl}s Haar gemacht habe!", + "303": "Für {Demolitionist}s angesengelten Kopf kann ich nichts tun. Er ist ein hoffnungsloser Fall.", + "304": "Trinkgeld ist nicht nötig, aber vergiss nicht, ich habe Zugang zu meiner Schere und deinem Kopf.", + "305": "Das ist übrigens ein Halsabschneidermesser.", + "306": "Du lässt mich heute Abend lieber in Ruhe, ok? Ich habe gerade meine Scheren geschliffen und warte nur auf eine Ausrede, sie zu benutzen.", + "307": "Mhmm, ich habe gerade von {PartyGirl} gehört, dass {Mechanic}s Freundin {Nurse} das ganze letzte Monatsgehalt von ihrem Freund für Schuhe ausgegeben hat.", + "308": "Einmal habe ich {Cyborg} eine Perücke aufgesetzt, damit ich ihm die Haare schneiden konnte. Ich glaube, das hat ihm irgendwie gefallen!", + "309": "Einmal wollte ich {Stylist} aufsuchen. Sie sah mich nur an und meinte „nö“.", + "31": "WAS?!", + "310": "Ich glaub, es wird Zeit, dass ich mir die Haare machen lasse!", + "311": "Hast du heute überhaupt schon versucht, deine Haare zu bürsten?", + "312": "Einen Bubikopf also. Soll ich mir ein paar Damenkoteletten stehen lassen?", + "313": "Ich habe kein Problem mit Augenbrauen oder Haaren in Ohr, aber bei Nasenhaaren ist Schluss.", + "314": "In Ordnung, hinsetzen und marinieren. Ich bin in 25 Minuten wieder da, um die Farbe auszuspülen ...", + "315": "Danke dir! Jetzt kann ich mir endlich die Haare machen.", + "316": "Wenn du früher gekommen wärst, hätte ich dir die Haare umsonst geschnitten.", + "317": "Unterwegs braucht man keine Schere, hieß es. Du wirst dich schon nicht in einem Spinnennetz verheddern, hieß es!", + "318": "Igitt, meine Haare. Alles voller Spinnennetz!", + "319": "Wir treffen uns in etwa drei Stunden hinter {Guide}s Haus. Ich denke, ich hätte da etwas für dich, das dir sehr gefallen würde.", + "32": "Hast du den Greis um das Verlies schreiten sehen? Der scheint Probleme zu haben.", + "320": "Dieser {Merchant} weiß ein gutes Geschäft einfach nicht zu schätzen.", + "321": "Ich verkaufe nur, was ich bekommen kann. {Clothier} schickt mich immer auf die Jagd nach exotischen Klamotten.", + "322": "Hmm, du siehst aus, als könntest du eine Engelsstatue gebrauchen! Die flitzen und schlitzen, bis alles tut sitzen!", + "323": "Für „Ich bereue den Kauf“ gibt es keine Rückerstattung ... Und auch aus keinem anderen Grund.", + "324": "Jetzt kaufen und die Versandkosten sparen!", + "325": "Ich verkaufe Waren von Orten, die es vielleicht nicht mal gibt!", + "326": "Du verlangst zwei Penny Farthings!? Sagen wir, einen, und wir sind im Geschäft.", + "327": "Eine Kombination aus Bong und Kaffeemaschine! Bereitet außerdem Pommes zu!", + "328": "Kommt her und wagt einen Blick! Ein Pfund Fisch! Sehr, sehr gut! Ein Pfund Fisch!", + "329": "Wenn du nach Ramsch suchst, bist du hier an der falschen Adresse.", + "33": "Ich wünschte, {Demolitionist} wäre vorsichtiger. Es nervt mich, täglich seine Glieder zusammennähen zu müssen.", + "330": "Ein Billigladen? Nein, ich biete nur die qualitativ hochwertigsten Waren an.", + "331": "Beim Zerschlagen eines Purpurherzens fällt mitunter ein Meteorit vom Himmel. Purpurherzen können normalerweise in den Schluchten bei Puprpur-Gebieten gefunden werden.", + "332": "Hast du versucht, das Reinigungspulver am Purpurstein im Purpur zu verwenden?", + "333": "Du musst die Welt von allem Purpur befreien.", + "334": "Psst! Ich habe vielleicht einen Job für dich. Und ich glaube nicht, dass du ihn ablehnen kannst!", + "335": "Ich will einen Fisch, und du wirst ihn mir besorgen! Frag mich danach!", + "336": "Hey! Genau das Opfer ... Ich meine, der qualifizierte Meisterangler, nach dem ich gesucht habe! ", + "337": "{Angler} will DICH als offiziellen {WorldName}-Laufaffen!", + "338": "Waaaas?! Siehst du nicht, dass ich die Angelschnur einziehe?", + "339": "Ich habe genug Fisch! Ich brauche deine Hilfe jetzt nicht!", + "34": "Heh, hat {ArmsDealer} den Grund für einen notwendigen Arztbesuch erwähnt? Ich wundere mich nur.", + "340": "In ganz {WorldName} gibt es keine Köche, also muss ich all diesen Fisch selbst zubereiten! ", + "341": "Hey! Pass auf! Ich stelle meine Fallen für meinen größten Streich aller Zeiten auf! Niemand wird etwas kommen sehen! Aber wehe, du sagst etwas!", + "342": "Lass dir von einem Kind einen Ratschlag geben. Halte niemals deine Zunge an einen Eisblock. Warte, vergiss, was ich gesagt habe! Ich will sehen, wie du es machst!", + "343": "Schon mal was von bellenden Fischen gehört? Ich nicht, ich dachte nur, du vielleicht!", + "344": "{WorldName} ist bis zum Rand gefüllt mit den sonderbarsten Fischsorten!", + "345": "Wie deprimierend! Es gibt vermutlich Fischarten, die schon vor meiner Geburt ausgestorben sind, und das ist einfach nicht fair!", + "346": "Ich habe keine Mami und keinen Papi, aber ich habe eine Menge Fisch! Ist ja fast so ähnlich!", + "347": "He, he, du hättest {Dryad}s Gesicht sehen sollen, als ich den Piranhazahn auf den Stuhl gelegt habe!", + "348": "Ich habe eine Bitte an dich! Nein, es interessiert mich nicht, dass gerade eine Zombie-Apokalypse ausgebrochen ist!", + "349": "Beeil dich und hör zu! Du musst jetzt sofort etwas für mich fangen!", + "35": "Ich muss mal ein ernsthaftes Wort mit {Guide} reden. Wie oft in der Woche willst du hier noch mit Lavaverbrennungen reinkommen?", + "350": "Ich hasse Blutmond! Wegen der unheimlichen Geräusche krieg ich kein Auge zu!", + "351": "Blutmond ist das schlimmste, was Fischen passieren kann! Die Fische beißen, ja, die Zombies aber auch!", + "352": "Da laufen gerade eine Fantastilliarde an Monstern frei rum!", + "353": "Danke oder so, dass du mich gerettet hast oder so. Du würdest einen tollen Helfer-Günstling abgeben!", + "354": "Wa...? Und wer bist du? Ich war so was von nicht am Ertrinken oder so!", + "355": "Du hast mich gerettet! Ich könnte dich gebrauchen, um ... Ähm, ich meine, ich könnte dich einstellen, um ein paar tolle Sachen für mich zu erledigen!", + "356": "Hast du ein paar Knochen übrig? Ich will meine kaputte Hüfte ersetzen ... schon wieder.", + "357": "Wunderbar! Endlich nimmt mir mal jemand die ganzen Maden ab.", + "358": "Es gibt keine Krankheit und kein Leiden, das sich nicht mit meinem Schleimöl heilen lässt. Vertrau mir, es funktioniert! Sieh dir nur meine gesunde Figur an!", + "359": "Du hast ja echt Nerv, hierherzukommen. Warum kaufst du nicht aus?", + "36": "Ich finde, du siehst so besser aus.", + "360": "Du kannst dir nicht vorstellen, was die Leute mir an den Kopf werfen ... Willst du was davon kaufen?", + "361": "Ich würde ja etwas Hand anlegen, aber letztes Mal habe ich sie erst nach einem Monat zurückgekriegt.", + "362": "Halt dich von den Spinnen fern. Sie saugen dir die Innereien aus und lassen nur eine leere Hülle übrig. Das kannst du mir glauben.", + "363": "Die einzigen konstanten Sachen auf der Welt sind der Tod und die Steuern. Und ich hab beides!", + "364": "Du schon wieder? Ich vermute, du willst noch mehr Geld?!", + "365": "Müssen denn immer alle so laut mit den Türen knallen?!", + "366": "Ich sehe, du hast mal wieder nichts zu tun. Kann mir nicht vorstellen, wie deine Sorte sich ein Arbeitsleben vorstellt.", + "367": "Ja, ja, ja! -- Du kriegst ja deinen Anteil gleich. Man sollte meinen, dass du etwas mehr Geduld hättest. Immerhin tu ich ja die ganze Arbeit.", + "368": "Was muss man denn tun, um hier alleine gelassen zu werden? Geh jemand anderen nerven, der nicht so viel zu tun hat!", + "369": "... zwei Fässer mit Melasse und ... Ach, schon gut, da bist du ja. Hier ist dein Geld.", + "37": "Ähhh ... ... was ist denn mit deinem Gesicht passiert?", + "370": "Mal ganz im Vertrauen ... Ich habe keine Ahnung, warum sie überhaupt Miete bezahlen.", + "371": "Ich wollte {Dryad} mal davon überzeugen, mich in Gefallen zu bezahlen und jetzt wächst mir Pilz an unzugänglichen Stellen.", + "372": "Geh zu {ArmsDealer} und sag ihm, dass er mich nicht mehr mit Munition bezahlen soll. Ich hab ja nicht mal eine Waffe.", + "373": "Warum versuchst DU nicht, Geld von {Demolitionist} zu besorgen und dabei keine Körperteile zu verlieren ...", + "374": "Ich komme grade vom {Merchant}. Er wollte wissen, ob ich Kreditkarten nehme.", + "38": "MEINE GÜTE! Ich bin gut, aber ich bin nicht SO gut.", + "380": "Hier ist dein Anteil von den Steuern, die ich von unseren überschüssigen Bewohnern eingenommen habe!", + "381": "Und schon wieder willst du mein ganzes Geld! Nimm‘s dir einfach und geh mir aus den Augen!", + "382": "Bäh! Hier, nimm deine Schillinge und geh mir aus den Augen!", + "383": "Das ist alles, was du heute von mir kriegst. Und keinen Pfenning mehr! Nimm es, und gib es weise aus.", + "39": "Liebe Freunde, wir sind zusammengekommen, um Aufwiedersehen zu sagen ... Ach, es wird schon werden.", + "390": "... Und die Leute sagen, dass ich gierig sei? Nein, ich habe nichts mehr für dich.", + "391": "Ach, dann sehe ich wohl wie ein Münzenschild aus, was? Denn jedes Mal, wenn du mich siehst, willst du welche von mir.", + "392": "Kommst du nie mal nur zum Hallo sagen?", + "393": "Bäh! Du schon wieder? Du hast dir doch grad schon meine Münzen geschnappt. Jetzt hau ab und komm später wieder!", + "394": "Ich hab dir doch vor 5 Minuten erst eine halbe Krone gegeben! Hau ab!", + "395": "Du willst schon wieder in meinen Geldbeutel greifen?! Und die Leute sagen, dass ICH gierig sei?", + "396": "Du hast deine Bezahlung erhalten, du kriegst keinen Farthing mehr! Raus mit dir!", + "397": "Geld wächst nicht auf Bäumen. Nimm mir also nicht meine ganze Ernte weg! Bäh! ", + "398": "Hast du schon jeden Pfenning ausgegeben, den ich dir gegeben hab?! Pah, ich bin doch keine Wohltätigkeitsgesellschaft. Geh und töte Schleime!", + "399": "Nicht so schnell! Du hast dein Geld, jetzt verdufte! ", + "4": "Schwert schlägt Papier! Hol dir noch heute eins.", + "40": "Du hast deinen Arm da drüben gelassen. Lass mich ihn holen ...", + "400": "Jetzt bettelst du schon?! Sieh mich nicht so an, als würde ich mich über Nacht umentscheiden! ", + "401": "Zerschlage jeden Purpur-Altar, den du findest. Etwas Gutes passiert, wenn du das tust!", + "402": "Purpur-Altäre sind gewöhnlich im Purpur zu finden. Du musst aber nahe an ihnen dran stehen, um Items herzustellen", + "41": "Hör schon auf, wie ein Baby zu plärren! Ich habe Schlimmeres gesehen.", + "42": "Das geht nicht ohne ein paar Stiche!", + "43": "Schon wieder Ärger mit diesen Rabauken?", + "44": "Halt durch. Ich hab hier irgendwo ein paar hübsch bedruckte Pflaster.", + "45": "Hör schon auf, {PlayerName}, du überstehst das schon. Mist.", + "46": "Tut es weh, wenn du das machst? Tu das nicht.", + "47": "Du siehst halb verdaut aus. Hast du schon wieder Schleime gejagt?", + "48": "Dreh deinen Kopf und huste!", + "49": "Ich habe schon größere gesehen ... Jep, ich habe definitiv schon größere Wunden gesehen.", + "5": "Du möchtest Äpfel? Du willst Karotten? Ananas? Wir haben Fackeln.", + "50": "Möchtest du einen Lolli?", + "51": "Zeig mir, wo es weh tut.", + "52": "Tut mir leid, aber ich bin viel zu teuer für dich.", + "53": "Dafür brauche ich mehr Gold.", + "54": "Ich arbeite schließlich nicht umsonst, weißt du.", + "55": "Ich verschenke keine Happy-Ends.", + "56": "Ohne eine Schönheitsoperation kann ich nicht mehr für dich tun.", + "57": "Hör auf, meine Zeit zu verschwenden!", + "58": "Ich habe gehört, es gibt eine Puppe in der Unterwelt, die {Guide} sehr ähnlich sieht. Ich würde sie gerne mit ein paar Kugeln durchlöchern.", + "59": "Mach schnell! Ich habe in einer Stunde ein Date mit {Nurse}.", + "6": "Ein schöner Morgen, nicht wahr? War da noch was, was du brauchst?", + "60": "Ich möchte das, was {Nurse} verkauft. Was heißt, sie verkauft nichts?", + "61": "{Dryad} ist hübsch. Zu dumm, dass sie so prüde ist.", + "62": "Halte dich nicht mit {Demolitionist} auf, ich habe alles, was du brauchst, hier.", + "63": "Was ist eigentlich mit {Demolitionist} los? Kriegt der mal mit, dass wir ganz andere Sachen verkaufen?", + "64": "Das ist eine gute Nacht, um mit niemandem zu sprechen, denkst du nicht, {PlayerName}?", + "65": "Ich liebe Nächte wie diese. Es gibt immer genug zu töten!", + "66": "Wie ich sehe, starrst du den Minihai an ... Du solltest lieber nicht fragen, wie der entstand.", + "67": "Moment, das ist kein Film, Freundchen. Munition geht extra.", + "68": "Hände weg von meinem Gewehr, Kumpel!", + "69": "Hast du versucht, das Reinigungspulver auf dem Ebenstein des Verderbens auszuprobieren?", + "7": "Die Nacht wird uns bald eingeholt haben, Freund. Entscheide dich, solange du noch kannst.", + "70": "Ich wünschte, {ArmsDealer} würde aufhören, mit mir zu flirten. Versteht er nicht, dass ich 500 Jahre alt bin?", + "72": "Hast du den Greis im Verlies rumlaufen sehen? Der sieht gar nicht gut aus ...", + "73": "Ich verkaufe, was ich will! Dein Pech, wenn du es nicht magst.", + "74": "Warum bist du in einer Zeit wie dieser so aggressiv?", + "75": "Ich möchte nicht, dass du meine Sachen kaufst. Ich will, dass du dir wünschst, sie zu kaufen, okay?", + "76": "Kommt es mir nur so vor oder sind heute Nacht eine Million Zombies draußen?", + "77": "Du musst die Welt von diesem Verderben befreien.", + "78": "Pass auf dich auf, Terraria braucht dich!", + "79": "Der Zahn der Zeit nagt und du alterst nicht gerade würdevoll. Du alterst nicht gerade in Würde.", + "8": "Du hast keine Ahnung, wie gut sich Dreckblöcke nach Übersee verkaufen.", + "80": "Was soll das heißen, ich belle mehr als ich beiße?", + "81": "Zwei Goblins kommen in einen Stoffladen. Sagt der eine zum anderen: Sitzt du gerne auf Gobelin?", + "82": "Ich kann dich erst hineinlassen, wenn du mich von meinem Fluch befreit hast.", + "83": "Komm in der Nacht wieder, wenn du hineinwillst.", + "84": "Mein Meister kann nicht bei Tageslicht herbeigerufen werden.", + "85": "Du bist viel zu schwach, um meinen Fluch zu brechen. Komm wieder, wenn du was aus dir gemacht hast.", + "86": "Du armseliger Wicht. So kannst du meinem Meister nicht gegenübertreten.", + "87": "Ich hoffe, du hast mindestens sechs Freunde, die hinter dir stehen.", + "88": "Bitte nicht, Fremdling. Du bringst dich nur selbst um.", + "89": "Du könntest tatsächlich stark genug sein, um mich von meinem Fluch zu befreien ...", + "9": "Ach, eines Tages werden sie Geschichten über {PlayerName} erzählen ... sicher gute.", + "90": "Fremdling, hast du die Kraft, meinen Meister zu besiegen?", + "91": "Bitte! Bezwinge meinen Kerkermeister und befreie mich! Ich flehe dich an!", + "92": "Besiege meinen Meister und ich gewähre dir den Zutritt in das Verlies.", + "93": "Du versuchst, hinter den Ebenstein zu kommen? Warum machen wir ihn nicht mit diesem Sprengstoff bekannt?", + "94": "Heh, hast du hier in der Gegend einen Clown gesehen?", + "95": "Genau hier war doch eine Bombe und jetzt kann ich sie nicht finden ...", + "96": "Ich habe etwas für diese Zombies!", + "97": "Sogar {ArmsDealer} ist scharf auf meine Waren!", + "98": "Hättest du lieber das Einschussloch eines Gewehrs oder das einer Granate? Das dachte ich mir.", + "99": "Ich bin sicher, dass {Nurse} dir helfen wird, wenn du versehentlich ein Glied verlierst." + }, + "LegacyMenu": { + "0": "Starte eine neue Instanz von Terarria um mitzumachen!", + "100": "Hintergrund EIN", + "101": "Hintergrund AUS", + "102": "Sprache auswählen", + "103": "Sprache", + "104": "Ja", + "105": "Nein", + "106": "Kartenstil ändern ", + "107": "Vollbild ändern ", + "108": "Reinzoomen ", + "109": "Rauszoomen ", + "10": "Backup laden", + "110": "Transparenz senken ", + "111": "Transparenz erhöhen ", + "112": "Karte aktiviert", + "113": "Karte deaktiviert", + "114": "Allgemein", + "115": "Kartensteuerung", + "116": "Multicore-Beleuchtung:", + "117": "Aus", + "118": "Menü schließen", + "11": "Kein Backup gefunden", + "120": "Smarter Cursor ", + "121": "Smarter Cursor-Modus: Ein-/Ausschalten", + "122": "Smarter Cursor-Modus: Halten", + "123": "Eventfortschrittsleiste", + "124": "Aus", + "125": "Zeitlich festgelegt", + "126": "An", + "127": "Stil", + "128": "Platzierungsvorschau EIN", + "129": "Platzierungsvorschau AUS", + "12": "Einzelspieler", + "130": "Reittier ", + "131": "Erfolge", + "132": "Blut und Gedärme EIN", + "133": "Blut und Gedärme AUS", + "134": "Anwenden", + "135": "Servereinstellungen", + "136": "Steam-Mehrspieler: Deaktiviert", + "137": "Steam-Mehrspieler: Aktiviert", + "138": "Zugelassene Nutzer: Nur mit Einladung", + "139": "Zugelassene Nutzer: Freunde", + "13": "Mehrspieler", + "140": "Freunde können einladen: Aus", + "141": "Freunde können einladen: Ein", + "142": "Freunde von Freunden zulassen: Aus", + "143": "Freunde von Freunden zulassen: Ein", + "144": "Start", + "145": "Über Steam beitreten", + "146": "Über IP beitreten", + "147": "Freunde einladen", + "148": "Hoch", + "149": "Runter", + "14": "Einstellungen", + "150": "Links", + "151": "Rechts", + "152": "Springen", + "153": "Werfen", + "154": "Inventar", + "155": "Entern", + "156": "Schnelles Mana", + "157": "Schneller Buff", + "158": "Schnelles Reittier", + "159": "Schnelles Heilen", + "15": "Verlassen", + "160": "Automatische Auswahl", + "161": "Smarter Cursor", + "162": "Item benutzen", + "163": "Interagieren", + "164": "Spielsteuerung", + "165": "Kartensteuerung", + "166": "Schnellleistensteuerung", + "167": "Gamepad-Einstellungen", + "168": "Reinzoomen", + "169": "Rauszoomen", + "16": "Charakter erstellen", + "170": "Transparenz erhöhen", + "171": "Transparenz senken", + "172": "Kartenstil ändern", + "173": "Ganze Karte ein-/ausschalten", + "174": "Nach links drehen", + "175": "Nach rechts drehen", + "176": "Schnellleiste Nr. 1", + "177": "Schnellleiste Nr. 2", + "178": "Schnellleiste Nr. 3", + "179": "Schnellleiste Nr. 4", + "17": "Löschen", + "180": "Schnellleiste Nr. 5", + "181": "Schnellleiste Nr. 6", + "182": "Schnellleiste Nr. 7", + "183": "Schnellleiste Nr. 8", + "184": "Schnellleiste Nr. 9", + "185": "Schnellleiste Nr. 10", + "186": "Schnellmarkierung Nr. 1", + "187": "Schnellmarkierung Nr. 2", + "188": "Schnellmarkierung Nr. 3", + "189": "Schnellmarkierung Nr. 4", + "18": "Haar", + "190": "Ring-Schnellleiste", + "191": "Cursoreinrasten (hoch)", + "192": "Cursoreinrasten (rechts)", + "193": "Cursoreinrasten (runter)", + "194": "Cursoreinrasten (links)", + "195": "", + "196": "DPad Cursoreinrasten", + "197": "DPad Schnellleiste", + "198": "Erweiterte Gamepad-Einstellungen", + "199": "Löst neutrale Zone aus", + "19": "Augen", + "1": "Läuft auf Port ", + "200": "Neutrale Schieberzone", + "201": "Neutrale Zone linker Stick X", + "202": "Neutrale Zone linker Stick Y", + "203": "Neutrale Zone rechter Stick X", + "204": "Neutrale Zone rechter Stick Y", + "205": "Linken Stick horizontal umkehren", + "206": "Linken Stick vertikal umkehren", + "207": "Rechten Stick horizontal umkehren", + "208": "Rechten Stick vertikal umkehren", + "209": "Anwenden", + "20": "Haut", + "210": "Interface", + "211": "Passwörter: Sichtbar", + "212": "Passwörter: Verborgen", + "213": "Smarter Cursorpriorität: Spitzhacke -> Axt", + "214": "Smarter Cursorpriorität: Axt -> Spitzhacke", + "215": "Smarte Blockplatzierung: Zum Cursor", + "217": "Rahmenfarbe", + "218": "Cursor", + "219": "Steuerung", + "21": "Kleidung", + "220": "Set-Boni aktivieren: Hoch", + "221": "Set-Boni aktivieren: Runter", + "222": "Tastaturbelegung", + "223": "Schnelllöschen mit linker Shift-Taste Aktiviert", + "224": "Schnelllöschen mit linker Shift-Taste Deaktiviert", + "225": "Wand schnell ersetzen: Deaktiviert", + "226": "Wand schnell ersetzen: Aktiviert", + "227": "Scrolltime Schnellleiste zu Ring: Ein", + "228": "Scrolltime Schnellleiste zu Ring: Aus", + "229": "Feldraster EIN", + "22": "Männlich", + "230": "Feldraster AUS", + "231": "Zielen", + "232": "Zielpriorität: Ziel des Fokus", + "233": "Zielpriorität: Nahegelegenes Ziel", + "234": "Zielpriorität: Direkte Linie", + "235": "abc / ABC / !@#", + "236": "Rücktaste", + "237": "Absenden", + "238": "Leertaste", + "239": "<-", + "23": "Weiblich", + "240": "->", + "241": "Gamepad-Anleitung AUS", + "242": "Gamepad-Anleitung EIN", + "243": "Menüsteuerung", + "244": "Ring-Schnellleiste", + "245": "Fenster ohne Rand: Aktiviert", + "246": "Fenster ohne Rand: Deaktiviert", + "247": "Überspringen von Frames AUS", + "248": "Überspringen von Frames EIN", + "249": "Überspringen von Frames subtil", + "24": "Hardcore", + "250": "Abbaueffekt: Aktiviert", + "251": "Abbaueffekt: Deaktiviert", + "252": "Verzögerung der Interfacebewegung", + "25": "Mediumcore", + "26": "Softcore", + "27": "Zufall", + "28": "Erstellen", + "2": "Trennen", + "32": "Schwierigkeitsgrad wählen", + "33": "Hemd", + "34": "Unterhemd", + "35": "Hose", + "36": "Schuhe", + "37": "Haar", + "38": "Haarfarbe", + "39": "Augenfarbe", + "3": "Server erfordert Passwort:", + "40": "Hautfarbe", + "41": "Hemdfarbe", + "42": "Unterhemdfarbe", + "43": "Hosenfarbe", + "44": "Schuhfarbe", + "45": "Charaktername eingeben:", + "46": "Löschen", + "47": "Welt erstellen", + "48": "Weltnamen eingeben:", + "49": "Fenstermodus", + "4": "Annehmen", + "50": "Vollbild", + "51": "Auflösung", + "52": "Parallax", + "53": "Überspringen von Frames AUS", + "54": "Überspringen von Frames EIN", + "55": "Beleuchtung: Farbe", + "56": "Beleuchtung: Weiß", + "57": "Beleuchtung: Retro", + "58": "Beleuchtung: Abgefahren", + "59": "Qualität: Automatisch", + "5": "Zurück", + "60": "Qualität: Hoch", + "61": "Qualität: Mittel", + "62": "Qualität: Niedrig", + "63": "Video", + "64": "Cursorfarbe", + "65": "Lautstärke", + "66": "Steuerung", + "67": "Autospeichern EIN", + "68": "Autospeichern AUS", + "69": "Autopause EIN", + "6": "Abbrechen", + "70": "Autopause AUS", + "71": "Pickup-Text EIN", + "72": "Pickup-Text AUS", + "73": "Vollbildauflösung", + "74": "Hoch ", + "75": "Runter ", + "76": "Links ", + "77": "Rechts ", + "78": "Springen ", + "79": "Werfen ", + "7": "Serverpasswort eingeben:", + "80": "Inventar ", + "81": "Schnelles Heilen ", + "82": "Schnelles Mana ", + "83": "Schneller Buff ", + "84": "Entern ", + "85": "Automatische Auswahl ", + "86": "Auf Standardeinstellungen zurücksetzen", + "87": "Beitreten", + "88": "Hosten & Spielen", + "89": "Serveradresse eingeben:", + "8": "Server wird hochgefahren ...", + "90": "Serverport eingeben:", + "91": "Weltgröße wählen:", + "92": "Klein", + "93": "Mittel", + "94": "Groß", + "95": "Rot:", + "96": "Grün:", + "97": "Blau:", + "98": "Sound:", + "99": "Musik:", + "9": "Laden fehlgeschlagen!", + "119": "Ambient:" + }, + "LegacyTooltip": { + "0": "Ausgerüstet im Soziales-Slot", + "10": "Langsam", + "11": "Sehr langsam", + "12": "Extrem langsam", + "13": "Schneckentempo", + "14": "Kein Rückstoß", + "15": "Extrem schwacher Rückstoß", + "16": "Sehr schwacher Rückstoß", + "17": "Schwacher Rückstoß", + "18": "Mittlerer Rückstoß", + "19": "Starker Rückstoß", + "1": "Keine Werte werden gewonnen", + "20": "Sehr starker Rückstoß", + "21": "Extrem starker Rückstoß", + "22": "Wahnsinniger Rückstoß", + "23": "Ausrüstbar", + "24": "Mode-Item", + "25": " Abwehr", + "26": "% Spitzhackenkraft", + "27": "% Axtkraft", + "28": "% Hammerkraft", + "29": "Stellt wieder her:", + "2": " Nahkampfschaden", + "30": "Leben", + "31": "Mana", + "32": "Verwendet", + "33": "Kann platziert werden", + "34": "Munition", + "35": "Verbrauchbar", + "36": "Material", + "37": " Dauer in Minuten", + "38": " Dauer in Sekunden", + "39": "% Schaden", + "3": " Fernkampfschaden", + "40": "% Tempo", + "41": "% kritische Trefferchance", + "42": "% Manakosten", + "43": "% Größe", + "44": "% Projektiltempo", + "45": "% Rückstoß", + "46": "% Bewegungstempo", + "47": "% Nahkampftempo", + "48": "Set-Bonus:", + "49": "Verkaufspreis:", + "4": " Magischer Schaden", + "50": "Kaufpreis:", + "51": "Kein Wert", + "52": "Verbraucht ", + "53": " Beschwörungsschaden", + "54": " Reichweite", + "55": " Schaden", + "56": "Als Favorit markiert", + "57": "Schnelllöschen, stapeln und verkaufen wird gesperrt", + "58": " Wurfschaden", + "59": "Wurde von einer mächtigen Dschungelkreatur verflucht", + "5": "% kritische Trefferchance", + "6": "Wahnsinnig schnell", + "7": "Sehr schnell", + "8": "Schnell", + "9": "Durchschnittlich" + }, + "LegacyMultiplayer": { + "10": "Du bist in keiner Gruppe!", + "11": "{0} hat PvP aktiviert!", + "12": "{0} hat PvP deaktiviert!", + "13": "{0} ist in keiner Gruppe mehr.", + "14": "{0} ist der roten Gruppe beigetreten.", + "15": "{0} ist der grünen Gruppe beigetreten.", + "16": "{0} ist der blauen Gruppe beigetreten.", + "17": "{0} ist der gelben Gruppe beigetreten.", + "18": "Willkommen bei", + "19": "{0} ist beigetreten.", + "20": "{0} ist weg.", + "21": "/Spieler", + "22": "{0} ist der rosa Gruppe beigetreten.", + "2": "Ungültige Operation in diesem Zustand.", + "3": "Du bist für diesen Server gesperrt.", + "4": "Du verwendest nicht die gleiche Version wie der Server.", + "5": "ist bereits auf diesem Server.", + "6": "/spielt", + "7": "Aktuelle Spieler:", + "8": "/rollen", + "9": "rollt eine", + "0": "Erhalten:" + }, + "LegacyMisc": { + "0": "Die Goblin-Armee wurde besiegt!", + "100": "Wähle das Böse in der Welt", + "101": "Verderben", + "102": "Purpur", + "103": "Zufall", + "10": "Eine Eiseskälte steigt in dir hoch ...", + "11": "Du hörst das Echo von Schreien um dich herum ...", + "12": "Deine Welt wurde mit Kobalt gesegnet!", + "13": "Deine Welt wurde mit Mithril gesegnet!", + "14": "Deine Welt wurde mit Adamantit gesegnet!", + "15": "Die uralten Geister des Lichts und der Finsternis wurden freigelassen.", + "19": "{0} wurde getötet ...", + "1": "Eine Goblin-Armee nähert sich von Westen!", + "20": "Eine Sonnenfinsternis beginne!", + "21": "Deine Welt wurde mit Palladium gesegnet!", + "22": "Deine Welt wurde mit Oreichalkos gesegnet!", + "23": "Deine Welt wurde mit Titan gesegnet!", + "24": "Die Piraten wurden besiegt!", + "25": "Piraten nähern sich von Westen!", + "26": "Piraten nähern sich von Osten!", + "27": "Die Piraten sind da!", + "28": "Du spürst Erschütterungen aus der Tiefe ...", + "29": "Das verspricht eine furchtbare Nacht zu werden ...", + "2": "Eine Goblin-Armee nähert sich von Osten!", + "30": "Die Luft um dich herum wird kälter ...", + "31": "Der Kürbismond geht auf ...", + "32": "Im Dschungel wird es unruhig ...", + "33": "Schreie erschallen aus dem Verlies ...", + "34": "Der Frostmond geht auf ...", + "35": "{0} ist aufgebrochen!", + "36": "{0} ist weg!", + "37": "Beliebig", + "38": "Druckplatte", + "39": " und erhöhte Lebensregeneration", + "3": "Eine Goblin-Armee ist angekommen!", + "40": "Erhöht Lebensregeneration", + "41": "Die Marsianer fallen ein!", + "42": "Die Marsianer wurden besiegt!", + "43": "Himmlische Kreaturen fallen ein!", + "44": "Alles um dich herum verschwimmt ...", + "45": "Der Schmerz überwältigt dich ...", + "46": "Du hörst plötzlichen Stimmen aus anderen Dimensionen ...", + "47": "Der Mondherr ist erwacht!", + "48": "Die Zwillinge sind erwacht!", + "49": "Die wachst aus einem seltsamen Traum auf ...", + "4": "Die Frost-Legion wurde besiegt!", + "50": "wurde besiegt", + "51": "Mondfragment", + "52": "Bevorstehendes Unglück nähert sich ...", + "53": "Auswählen", + "54": "Nehmen", + "55": "1 nehmen", + "56": "Schließen", + "57": "Entern", + "58": "Springen", + "59": "Schnellleiste drehen", + "5": "Die Frost-Legion nähert sich aus dem Westen!", + "60": "Angreifen", + "61": "Bauen", + "62": "Trinken", + "63": "Aktion", + "64": "Menü wechseln", + "65": "Platzieren", + "66": "Austauschen", + "67": "Ausrüsten", + "68": "Ablegen", + "69": "Raumflaggen zeigen", + "6": "Die Frost-Legion nähert sich aus dem Osten!", + "70": "Behausung überprüfen", + "71": "Schnellherstellung", + "72": "Herstellen", + "73": "Auswählen", + "74": "Löschen", + "75": "Verkaufen", + "76": "Übertragen", + "77": "Bildmaterial anzeigen", + "78": "Bildmaterial verbergen", + "79": "Nutzen", + "7": "Die Frostlegion ist angekommen!", + "80": "Sprechen", + "81": "Lesen", + "82": "Zurück", + "83": "Favorit", + "84": "Du kannst innerhalb der Blöcke deines Teams nicht Teams wechseln!", + "86": "Ente", + "87": "Schmetterling", + "88": "Glühwürmchen", + "89": "Verkabelungsoptionen", + "8": "Der Blutmond geht auf ...", + "90": "Kaufen", + "91": "Mehr kaufen", + "92": "Verkaufen", + "93": "Mehr herstellen", + "94": "Versuchen zu entfernen", + "95": "Schnecke", + "96": "Sieht aus wie ", + "97": " schmeißt eine Party", + "98": " schmeißen eine Party", + "99": "Die Party ist vorbei!", + "9": "Du spürst eine böse Präsenz, die dich beobachtet ...", + "104": "Kann nicht ohne etherisches Mana verwendet werden, bis der Eternia-Kristall verteidigt wurde" + }, + "LegacyInterface": { + "0": "Leben:", + "100": "Kreaturen", + "101": "Kills", + "102": "Mondphase", + "103": "Bewegungstempo", + "104": "Schatz", + "105": "Seltene Kreaturen", + "106": "Schaden pro Sekunde", + "107": "Seltsame Pflanzen", + "108": "Karte öffnen", + "109": "Karte schließen", + "10": "Abwehr", + "110": "Ordner öffnen", + "111": "Screenshot machen", + "112": "Du musst zuerst den Frame einstellen", + "113": "Nur im Fenstermodus verfügbar", + "114": "Nur verfügbar, wenn die Karte aktiviert ist", + "115": "Kameramodus deaktiviert", + "116": "Neues Item markieren AUS", + "117": "Neues Item markieren EIN", + "118": "Reinzoomen", + "119": "Rauszoomen", + "11": "Soziales", + "120": "Zum Verbündeten teleportieren", + "121": "Item fallen lassen", + "122": "Items sortieren", + "123": "Kaltes Wetter", + "12": "Helm", + "13": "Hemd", + "14": "Hose", + "15": "Platin", + "16": "Gold", + "17": "Silber", + "18": "Kupfer", + "19": "Nachschmieden", + "1": "Atem", + "20": "Item zum Nachschmieden hierhin legen", + "21": "Rezepte anzeigen mit", + "22": "Erforderliche Objekte:", + "23": "Keine", + "24": "Lege hier ein Material hin", + "25": "Herstellen", + "26": "Münzen", + "27": "Munition", + "28": "Geschäft", + "29": "Alle einsammeln", + "2": "Mana", + "30": "Alle ablegen", + "31": "Schnellstapeln", + "32": "Sparschwein", + "33": "Tresor", + "34": "Zeit", + "35": "Speichern und beenden", + "36": "Trennen", + "37": "Items", + "38": "Du wurdest getötet ...", + "39": "Diese Behausung ist geeignet.", + "3": "Mülleimer", + "40": "Das ist keine zulässige Behausung.", + "41": "Diese Behausung ist bereits belegt.", + "42": "Diese Behausung ist verdorben.", + "43": "Verbindungszeit überschritten", + "44": "Felddaten werden empfangen", + "45": "Ausrüsten", + "46": "Kosten", + "47": "Speichern", + "48": "Bearbeiten", + "49": "Status", + "4": "Inventar", + "50": "Fluch", + "51": "Hilfe", + "52": "Schließen", + "53": "Wasser", + "54": "Heilen", + "55": "Diese Behausung erfüllt nicht die Voraussetzungen für ein", + "56": "Lava", + "57": "Färben", + "58": "Honig", + "59": "Sichtbar", + "5": "Schnellleiste freigeschaltet", + "60": "Verborgen", + "61": "Umbenennen", + "62": "Einstellungen", + "63": "Abbrechen", + "64": "Quest", + "65": "Quest-Item", + "66": "Gespartes", + "67": "Schnappschuss machen", + "68": "Einstellungen", + "69": "Frame anheften", + "6": "Schnellleiste gesperrt", + "70": "Frame einstellen", + "71": "Schließen", + "72": "An", + "73": "Aus", + "74": "Bild-Packing", + "75": "Instanzen aufnehmen", + "76": "Hintergrund aufnehmen", + "77": "Biom auswählen", + "78": "Frame zurücksetzen", + "79": "Ausrüstung", + "7": "Behausung", + "80": "Behausung", + "81": "Kameramodus", + "82": "Auffüllen", + "83": "Frostmond", + "84": "Kürbismond", + "85": "Marsianerwahnsinn", + "86": "Pirateninvasion", + "87": "Frostlegion", + "88": "Globinarmee", + "89": "Sammeln", + "8": "Behausungsanfrage", + "90": "Enterhaken", + "91": "Reittier", + "92": "Haustier", + "93": "Lore", + "94": "Leichtes Haustier", + "95": "Zeit", + "96": "Wetter", + "97": "Angeln", + "98": "Position", + "99": "Tiefe", + "9": "Accessoires" + }, + "LegacyChestType": { + "0": "Truhe", + "10": "Efeutruhe", + "12": "Lebendes-Holz-Truhe", + "13": "Himmelswarentruhe", + "14": "Schattenholztruhe", + "15": "Eingesponnene Truhe", + "16": "Lihzahrdtruhe", + "17": "Wassertruhe", + "18": "Dschungeltruhe", + "19": "Verdorbene Truhe", + "1": "Goldtruhe", + "20": "Purpurne Truhe", + "21": "Heilige Truhe", + "23": "Verschlossene Dschungeltruhe", + "24": "Verschlossene Verdorbene Truhe", + "25": "Verschlossene Purpur-Truhe", + "26": "Verschlossene Heilige Truhe", + "28": "Dynastietruhe", + "29": "Honigtruhe", + "2": "Verschlossene Goldtruhe", + "30": "Steampunk-Truhe", + "31": "Palmholztruhe", + "32": "Pilztruhe", + "33": "Borealholztruhe", + "34": "Schleimtruhe", + "35": "Grüne Verliestruhe", + "36": "Verschlossene Grüne Verliestruhe", + "37": "Rosa Verliestruhe", + "38": "Verschlossene Rosa Verliestruhe", + "39": "Blaue Verliestruhe", + "3": "Schattentruhe", + "40": "Verschlossene Blaue Verliestruhe", + "41": "Knochentruhe", + "42": "Kaktustruhe", + "43": "Fleischtruhe", + "44": "Obsidiantruhe", + "45": "Kürbistruhe", + "46": "Schaurige Truhe", + "47": "Glastruhe", + "48": "Marsianer-Truhe", + "49": "Meteoriten-Truhe", + "4": "Verschlossene Schattentruhe", + "50": "Granittruhe", + "51": "Marmortruhe", + "5": "Fass", + "6": "Mülleimer", + "7": "Ebenholztruhe", + "8": "Reiche Mahagonitruhe", + "9": "Perlholztruhe" + }, + "LegacyDresserType": { + "0": "Kommode", + "10": "Knochenkommode", + "11": "Kaktuskommode", + "12": "Schaurige Kommode", + "13": "Himmelswarenkommode", + "14": "Honigkommode", + "15": "Lihzahrdkommode", + "16": "Palmholzkommode", + "17": "Pilzkommode", + "18": "Borealholzkommode", + "19": "Schleimkommode", + "1": "Ebenholzkommode", + "20": "Kürbiskommode", + "21": "Steampunkkommode", + "22": "Glaskommode", + "23": "Fleischkommode", + "24": "Marsianerkommode", + "25": "Meteoritenkommode", + "26": "Granitkommode", + "27": "Marmorkommode", + "2": "Reiche Mahagonikommode", + "3": "Perlholzkommode", + "4": "Schattenholzkommode", + "5": "Blaue Verlieskommode", + "6": "Grüne Verlieskommode", + "7": "Rosa Verlieskommode", + "8": "Goldene Verlieskommode", + "9": "Obsidianverlieskommode", + "28": "{$ItemName.CrystalDresser}", + "29": "{$ItemName.DynastyDresser}", + "30": "{$ItemName.FrozenDresser}", + "31": "{$ItemName.LivingWoodDresser}", + "32": "{$ItemName.SpiderDresser}", + "33": "{$ItemName.LesionDresser}", + "34": "{$ItemName.SolarDresser}", + "35": "{$ItemName.VortexDresser}", + "36": "{$ItemName.NebulaDresser}", + "37": "{$ItemName.StardustDresser}", + "38": "{$ItemName.SandstoneDresser}", + "39": "{$ItemName.BambooDresser}" + }, + "LegacyChestType2": { + "1": "{$ItemName.GoldenChest}", + "0": "{$ItemName.CrystalChest}", + "2": "{$ItemName.SpiderChest}", + "3": "{$ItemName.LesionChest}", + "4": "{$ItemName.GoldChest}", + "5": "{$ItemName.SolarChest}", + "6": "{$ItemName.VortexChest}", + "7": "{$ItemName.NebulaChest}", + "8": "{$ItemName.StardustChest}", + "9": "{$ItemName.GolfChest}", + "10": "{$ItemName.DesertChest}", + "11": "{$ItemName.BambooChest}", + "12": "{$ItemName.DungeonDesertChest}" + } +} \ No newline at end of file diff --git a/Localization/Content/de-DE/NPCs.json b/Localization/Content/de-DE/NPCs.json new file mode 100644 index 0000000..d09e2a0 --- /dev/null +++ b/Localization/Content/de-DE/NPCs.json @@ -0,0 +1,582 @@ +{ + "NPCName": { + "BlueSlime": "Blauer Schleim", + "GiantWormHead": "Riesenwurm", + "SeekerTail": "Weltspeiser", + "Clinger": "Klette", + "AnglerFish": "Seeteufel", + "GreenJellyfish": "Grüne Qualle", + "Werewolf": "Werwolf", + "BoundGoblin": "Gebundener Goblin", + "BoundWizard": "Gebundener Zauberer", + "GoblinTinkerer": "Goblin-Tüftler", + "Wizard": "Zauberer", + "Clown": "Clown", + "GiantWormBody": "Riesenwurm", + "SkeletonArcher": "Skelettbogenschütze", + "GoblinArcher": "Goblin-Bogenschütze", + "VileSpit": "Ekelspeichel", + "WallofFlesh": "Fleischwand", + "WallofFleshEye": "Fleischwand", + "TheHungry": "Fressmaul", + "TheHungryII": "Fressmaul", + "LeechHead": "Blutegel", + "LeechBody": "Blutegel", + "LeechTail": "Blutegel", + "GiantWormTail": "Riesenwurm", + "ChaosElemental": "Chaos-Elementar", + "Slimer": "Schleimer", + "Gastropod": "Bauchfüßler", + "BoundMechanic": "Gebundene Mechanikerin", + "Mechanic": "Mechanikerin", + "Retinazer": "Retinazer", + "Spazmatism": "Spazmatism", + "SkeletronPrime": "Skeletron Prime", + "PrimeCannon": "Super-Kanone", + "PrimeSaw": "Super-Säge", + "EaterofWorldsHead": "Weltenfresser", + "PrimeVice": "Super-Zange", + "PrimeLaser": "Super-Laser", + "BaldZombie": "Zombie", + "WanderingEye": "Wanderndes Auge", + "TheDestroyer": "Der Zerstörer", + "TheDestroyerBody": "Der Zerstörer", + "TheDestroyerTail": "Der Zerstörer", + "IlluminantBat": "Leuchtfledermaus", + "IlluminantSlime": "Leuchtender Schleim", + "Probe": "Sonde", + "EaterofWorldsBody": "Weltenfresser", + "PossessedArmor": "Geisterrüstung", + "ToxicSludge": "Giftiger Schlamm", + "SantaClaus": "Weihnachtsmann", + "SnowmanGangsta": "Gangster Schneemann", + "MisterStabby": "Herr Stabby", + "SnowBalla": "Schnee Balla", + "IceSlime": "Eisschleim", + "Penguin": "Pinguin", + "PenguinBlack": "Pinguin", + "EaterofWorldsTail": "Weltenfresser", + "IceBat": "Eisfledermaus", + "Lavabat": "Lavafledermaus", + "GiantFlyingFox": "Riesiger Fliegender Fuchs", + "GiantTortoise": "Riesenschildkröte", + "IceTortoise": "Eisschildkröte", + "Wolf": "Wolf", + "RedDevil": "Roter Teufel", + "Arapaima": "Arapaima", + "VampireBat": "Vampir", + "Vampire": "Vampir", + "MotherSlime": "Schleimmami", + "Truffle": "Trüffel", + "Frankenstein": "Frankenstein", + "BlackRecluse": "Schwarze Einsiedlerin", + "WallCreeper": "Wandkriecher", + "WallCreeperWall": "Wandkriecher", + "SwampThing": "Das Ding aus dem Sumpf", + "UndeadViking": "Untoter Wikinger", + "CorruptPenguin": "Verdorbener Pinguin", + "IceElemental": "Eis-Elementar", + "Merchant": "Händler", + "PigronCorruption": "Schwrache", + "PigronHallow": "Schwrache", + "RuneWizard": "Runenzauberer", + "Crimera": "Purmere", + "Herpling": "Herpling", + "AngryTrapper": "Zorniger Trapper", + "MossHornet": "Mooshornisse", + "Derpling": "Derpling", + "Steampunker": "Steampunker", + "CrimsonAxe": "Purpurne Axt", + "Nurse": "Krankenschwester", + "PigronCrimson": "Schwrache", + "FaceMonster": "Gesichtsmonster", + "FloatyGross": "Schwebender Ekel", + "Crimslime": "Purpurschleim", + "SpikedIceSlime": "Gespickter Eisschleim", + "SnowFlinx": "Schneeflinx", + "PincushionZombie": "Zombie", + "SlimedZombie": "Zombie", + "SwampZombie": "Zombie", + "TwiggyZombie": "Zombie", + "ArmsDealer": "Waffenhändler", + "CataractEye": "Dämonenauge", + "SleepyEye": "Dämonenauge", + "DialatedEye": "Dämonenauge", + "GreenEye": "Dämonenauge", + "PurpleEye": "Dämonenauge", + "LostGirl": "Verirrtes Mädchen", + "Nymph": "Nymphe", + "ArmoredViking": "Gepanzerter Wikinger", + "Lihzahrd": "Lihzahrd", + "LihzahrdCrawler": "Lihzahrd", + "DemonEye": "Dämonenauge", + "Dryad": "Dryade", + "FemaleZombie": "Zombie", + "HeadacheSkeleton": "Skelett", + "MisassembledSkeleton": "Skelett", + "PantlessSkeleton": "Skelett", + "SpikedJungleSlime": "Gespickter Dschungelschleim", + "Moth": "Motte", + "IcyMerman": "Eiswassermann", + "DyeTrader": "Farbstoffhändler", + "PartyGirl": "Partygirl", + "Cyborg": "Cyborg", + "Skeleton": "Skelett", + "Bee": "Biene", + "BeeSmall": "Biene", + "PirateDeckhand": "Piratenmatrose", + "PirateCorsair": "Piratenkorsar", + "PirateDeadeye": "Piratenjungfer", + "PirateCrossbower": "Piratenarmbruster", + "PirateCaptain": "Piratenkäpt'n", + "CochinealBeetle": "Koschenillenkäfer", + "CyanBeetle": "Zyankäfer", + "LacBeetle": "Lackkäfer", + "Guide": "Fremdenführer", + "SeaSnail": "Seeschnecke", + "Squid": "Tintenfisch", + "QueenBee": "Bienenkönigin", + "ZombieRaincoat": "Regenmantelzombie", + "FlyingFish": "Fliegender Fisch", + "UmbrellaSlime": "Regenschirmschleim", + "FlyingSnake": "Fliegende Schlange", + "Painter": "Maler", + "WitchDoctor": "Medizinmann", + "Pirate": "Pirat", + "MeteorHead": "Meteorenkopf", + "GoldfishWalker": "Goldfisch", + "HornetFatty": "Hornisse", + "HornetHoney": "Hornisse", + "HornetLeafy": "Hornisse", + "HornetSpikey": "Hornisse", + "HornetStingy": "Hornisse", + "JungleCreeper": "Dschungelkriecher", + "JungleCreeperWall": "Dschungelkriecher", + "BlackRecluseWall": "Schwarze Einsiedlerin", + "BloodCrawler": "Blutkriecher", + "FireImp": "Feuerkobold", + "BloodCrawlerWall": "Blutkriecher", + "BloodFeeder": "Blutsauger", + "BloodJelly": "Blutgelee", + "IceGolem": "Eisgolem", + "RainbowSlime": "Regenbogenschleim", + "Golem": "Golem", + "GolemHead": "Golemkopf", + "GolemFistLeft": "Golemfaust", + "GolemFistRight": "Golemfaust", + "GolemHeadFree": "Golemkopf", + "BurningSphere": "Flammenkugel", + "AngryNimbus": "Zorniger Nimbus", + "Eyezor": "Schandfleck", + "Parrot": "Papagei", + "Reaper": "Sensenmann", + "ZombieMushroom": "Sporenzombiebanner", + "ZombieMushroomHat": "Sporenzombiebanner", + "FungoFish": "Fungofisch", + "AnomuraFungus": "Anomurapilz", + "MushiLadybug": "Mushi-Marienkäfer", + "FungiBulb": "Pilzbirne", + "GoblinPeon": "Goblin-Arbeiter", + "GiantFungiBulb": "Riesige Pilzbirne", + "FungiSpore": "Pilzsspore", + "Plantera": "Plantera", + "PlanterasHook": "Planteras Haken", + "PlanterasTentacle": "Planteras Tentakel", + "Spore": "Spore", + "BrainofCthulhu": "Gehirn von Cthulhu", + "Creeper": "Kriecher", + "IchorSticker": "Ichor-Sticker", + "RustyArmoredBonesAxe": "Rostige Gepanzerte Knochen", + "GoblinThief": "Goblin-Dieb", + "RustyArmoredBonesFlail": "Rostige Gepanzerte Knochen", + "RustyArmoredBonesSword": "Rostige Gepanzerte Knochen", + "RustyArmoredBonesSwordNoArmor": "Rostige Gepanzerte Knochen", + "BlueArmoredBones": "Blaue Gepanzerte Knochen", + "BlueArmoredBonesMace": "Blaue Gepanzerte Knochen", + "BlueArmoredBonesNoPants": "Blaue Gepanzerte Knochen", + "BlueArmoredBonesSword": "Blaue Gepanzerte Knochen", + "HellArmoredBones": "Höllisch gepanzerte Knochen", + "HellArmoredBonesSpikeShield": "Höllisch gepanzerte Knochen", + "HellArmoredBonesMace": "Höllisch gepanzerte Knochen", + "GoblinWarrior": "Goblin-Krieger", + "HellArmoredBonesSword": "Höllisch gepanzerte Knochen", + "RaggedCaster": "Zerlumpter Zauberer", + "RaggedCasterOpenCoat": "Zerlumpter Zauberer", + "Necromancer": "Totenbeschwörer", + "NecromancerArmored": "Totenbeschwörer", + "DiabolistRed": "Satanist", + "DiabolistWhite": "Satanist", + "BoneLee": "Bone Lee", + "DungeonSpirit": "Verliesgeist", + "GiantCursedSkull": "Riesiger Verfluchter Schädel", + "GoblinSorcerer": "Goblin-Hexer", + "Paladin": "Paladin", + "SkeletonSniper": "Skelettsniper", + "TacticalSkeleton": "Taktisches Skelett", + "SkeletonCommando": "Skelettkommando", + "AngryBonesBig": "Wutknochen", + "AngryBonesBigMuscle": "Wutknochen", + "AngryBonesBigHelmet": "Wutknochen", + "BirdBlue": "Blauhäher", + "BirdRed": "Kardinal", + "Squirrel": "Eichhörnchen", + "Zombie": "Zombie", + "ChaosBall": "Chaoskugel", + "Mouse": "Maus", + "Raven": "Rabe", + "SlimeMasked": "Schleim", + "BunnySlimed": "Hase", + "HoppinJack": "Hüpfender Kürbis", + "Scarecrow1": "Vogelscheuche", + "Scarecrow2": "Vogelscheuche", + "Scarecrow3": "Vogelscheuche", + "Scarecrow4": "Vogelscheuche", + "Scarecrow5": "Vogelscheuche", + "AngryBones": "Wutknochen", + "Scarecrow6": "Vogelscheuche", + "Scarecrow7": "Vogelscheuche", + "Scarecrow8": "Vogelscheuche", + "Scarecrow9": "Vogelscheuche", + "Scarecrow10": "Vogelscheuche", + "HeadlessHorseman": "Kopfloser Reiter", + "Ghost": "Gespenst", + "DemonEyeOwl": "Dämonenauge", + "DemonEyeSpaceship": "Dämonenauge", + "ZombieDoctor": "Zombie", + "DarkCaster": "Düstermagier", + "ZombieSuperman": "Zombie", + "ZombiePixie": "Zombie", + "SkeletonTopHat": "Skelett", + "SkeletonAstonaut": "Skelett", + "SkeletonAlien": "Skelett", + "MourningWood": "Trauerndes Holz", + "Splinterling": "Splitterling", + "Pumpking": "Kürbiskönig", + "PumpkingBlade": "Kürbiskönig", + "Hellhound": "Höllenhund", + "WaterSphere": "Wasserkugel", + "Poltergeist": "Poltergeist", + "ZombieXmas": "Zombie", + "ZombieSweater": "Zombie", + "SlimeRibbonWhite": "Schleim", + "SlimeRibbonYellow": "Schleim", + "SlimeRibbonGreen": "Schleim", + "SlimeRibbonRed": "Schleim", + "BunnyXmas": "Hase", + "ZombieElf": "Zombie-Elf", + "ZombieElfBeard": "Zombie-Elf", + "CursedSkull": "Fluchschädel", + "ZombieElfGirl": "Zombie-Elf", + "PresentMimic": "Geschenk-Mimic", + "GingerbreadMan": "Lebkuchenmann", + "Yeti": "Yeti", + "Everscream": "Immerschrei", + "IceQueen": "Eiskönigin", + "SantaNK1": "Weihnachtsmann NK1", + "ElfCopter": "Elfkopter", + "Nutcracker": "Nussknacker", + "NutcrackerSpinning": "Nussknacker", + "SkeletronHead": "Skeletron", + "ElfArcher": "Elfenbogenschütze", + "Krampus": "Krampus", + "Flocko": "Flocki", + "Stylist": "Stylistin", + "WebbedStylist": "Spinnenweben-Stylist", + "Firefly": "Glühwürmchen", + "Butterfly": "Schmetterling", + "Worm": "Wurm", + "LightningBug": "Leuchtkäfer", + "Snail": "Schnecke", + "SkeletronHand": "Skeletron", + "GlowingSnail": "Leuchtende Schnecke", + "Frog": "Frosch", + "Duck": "Ente", + "Duck2": "Ente", + "DuckWhite": "Ente", + "DuckWhite2": "Ente", + "ScorpionBlack": "Skorpion", + "Scorpion": "Skorpion", + "TravellingMerchant": "Handelsreisender", + "Angler": "Angler", + "OldMan": "Greis", + "DukeFishron": "Herzog Fischron", + "DetonatingBubble": "Explodierende Blase", + "Sharkron": "Drachai", + "Sharkron2": "Drachai", + "TruffleWorm": "Trüffelwurm", + "TruffleWormDigger": "Trüffelwurm", + "SleepingAngler": "Schlafender Angler", + "Grasshopper": "Grashüpfer", + "ChatteringTeethBomb": "Klappernde Zahnbombe", + "Demolitionist": "Sprengmeister", + "BrainScrambler": "Gehirnverwirrer", + "RayGunner": "Strahlenschütze", + "MartianOfficer": "Marsianer-Offizier", + "ForceBubble": "Blasenschild", + "GrayGrunt": "Graugrunzer", + "MartianEngineer": "Marsianer-Ingenieur", + "MartianTurret": "Teslakanonenturm", + "MartianDrone": "Marsianer-Drohne", + "GigaZapper": "Gigazapper", + "BoneSerpentHead": "Knochenschlange", + "ScutlixRider": "Scutlixschütze", + "Scutlix": "Scutlix", + "EyeofCthulhu": "Auge von Cthulhu", + "BoneSerpentBody": "Knochenschlange", + "BoneSerpentTail": "Knochenschlange", + "SolarCrawltipedeHead": "Krabbelfüßler", + "SolarCrawltipedeBody": "Krabbelfüßler", + "SolarCrawltipedeTail": "Krabbelfüßler", + "SolarDrakomire": "Drakomir", + "SolarDrakomireRider": "Drakomir-Reiter", + "SolarSroller": "Sroller", + "SolarCorite": "Korit", + "SolarSolenian": "Selenier", + "Hornet": "Hornisse", + "ManEater": "Menschenfresser", + "ArmedZombie": "Zombie", + "ArmedZombiePincussion": "Zombie", + "ArmedZombieSlimed": "Zombie", + "ArmedZombieSwamp": "Zombie", + "ArmedZombieTwiggy": "Zombie", + "ArmedZombieCenx": "Zombie", + "UndeadMiner": "Untoter Minenarbeiter", + "GoldBird": "Goldvogel", + "GoldBunny": "Goldhase", + "GoldButterfly": "Goldschmetterling", + "GoldFrog": "Goldfrosch", + "GoldGrasshopper": "Goldgrashüpfer", + "GoldMouse": "Goldmaus", + "GoldWorm": "Goldwurm", + "BoneThrowingSkeleton": "Skelett", + "Tim": "Tim", + "BoneThrowingSkeleton2": "Skelett", + "BoneThrowingSkeleton3": "Skelett", + "BoneThrowingSkeleton4": "Skelett", + "Bunny": "Hase", + "CorruptBunny": "Verderbnishase", + "Harpy": "Harpyie", + "CaveBat": "Höhlenfledermaus", + "ServantofCthulhu": "Diener von Cthulhu", + "KingSlime": "Schleimkönig", + "JungleBat": "Dschungelfledermaus", + "DoctorBones": "Doktor Bones", + "TheGroom": "Bräutigam", + "Clothier": "Schneider", + "Goldfish": "Goldfisch", + "Snatcher": "Schnapper", + "CorruptGoldfish": "Verderbnisgoldfisch", + "Piranha": "Piranha", + "LavaSlime": "Lavaschleim", + "EaterofSouls": "Seelenfresser", + "Hellbat": "Höllenfledermaus", + "Vulture": "Geier", + "Demon": "Dämon", + "BlueJellyfish": "Blauqualle", + "PinkJellyfish": "Pinkqualle", + "Shark": "Hai", + "VoodooDemon": "Voodoo-Dämon", + "Crab": "Krabbe", + "DungeonGuardian": "Verlies-Wächter", + "Antlion": "Ameisenlöwe", + "DevourerHead": "Verschlinger", + "SpikeBall": "Nagelball", + "DungeonSlime": "Verliesschleim", + "BlazingWheel": "Flammenrad", + "GoblinScout": "Goblin-Späher", + "Bird": "Vogel", + "Pixie": "Pixie", + "ArmoredSkeleton": "Gepanzertes Skelett", + "Mummy": "Mumie", + "DarkMummy": "Dunkle Mumie", + "DevourerBody": "Verschlinger", + "LightMummy": "Helle Mumie", + "CorruptSlime": "Verderbnisschleim", + "Wraith": "Monstergeist", + "CursedHammer": "Verfluchter Hammer", + "EnchantedSword": "Verzaubertes Schwert", + "Mimic": "Mimic", + "Unicorn": "Einhorn", + "WyvernHead": "Lindwurm", + "WyvernLegs": "Lindwurm", + "WyvernBody": "Lindwurm", + "DevourerTail": "Verschlinger", + "WyvernBody2": "Lindwurm", + "WyvernBody3": "Lindwurm", + "WyvernTail": "Lindwurm", + "GiantBat": "Riesenfledermaus", + "Corruptor": "Verderber", + "DiggerHead": "Gräber", + "DiggerBody": "Gräber", + "DiggerTail": "Gräber", + "SeekerHead": "Weltspeiser", + "SeekerBody": "Weltspeiser", + "AncientCultistSquidhead": "Alte Vision", + "AncientDoom": "Altes Unheil", + "AncientLight": "Altes Licht", + "BigMimicCorruption": "Verdorbener Mimic", + "BigMimicCrimson": "Purpur-Mimic", + "BigMimicHallow": "Heiliger Mimic", + "BigMimicJungle": "Dschungel-Mimic", + "BloodZombie": "Blutzombie", + "Buggy": "Buggy", + "Butcher": "Schlachter", + "Crawdad": "Flusskrebs", + "Crawdad2": "Flusskrebs", + "CreatureFromTheDeep": "Kreatur aus der Tiefe", + "CrimsonPenguin": "Böser Pinguin", + "CultistBoss": "Irrer Kultist", + "CultistBossClone": "Irrer Kultist", + "CultistDragonBody1": "Phantasm-Drache", + "CultistDragonBody2": "Phantasm-Drache", + "CultistDragonBody3": "Phantasm-Drache", + "CultistDragonBody4": "Phantasm-Drache", + "CultistDragonHead": "Phantasm-Drache", + "CultistDragonTail": "Phantasm-Drache", + "CultistTablet": "Mysteriöse Tafel", + "DD2AttackerTest": "???", + "DD2GoblinT3": "{$NPCName.DD2GoblinT1}", + "DD2GoblinBomberT3": "{$NPCName.DD2GoblinBomberT1}", + "DD2JavelinstT2": "{$NPCName.DD2JavelinstT1}", + "DD2JavelinstT3": "{$NPCName.DD2JavelinstT1}", + "DD2LanePortal": "Mysteriöses Portal", + "DD2GoblinT2": "{$NPCName.DD2GoblinT1}", + "DeadlySphere": "Tödliche Sphäre", + "DemonTaxCollector": "Gequälite Seele", + "DesertBeast": "Basilisk", + "DesertDjinn": "Wüstengeist", + "DesertGhoul": "Ghoul", + "DesertGhoulCorruption": "Ekelghoul", + "DesertGhoulCrimson": "Verdorbener Ghoul", + "DesertGhoulHallow": "Träumer-Ghoul", + "DesertLamiaDark": "Lamia", + "DesertLamiaLight": "Lamia", + "DesertScorpionWalk": "Sandwilderer", + "DesertScorpionWall": "Sandwilderer", + "Drippler": "Tropfer", + "DrManFly": "Dr. Mann-Fliege", + "DuneSplicerBody": "Dünenstecher", + "DuneSplicerHead": "Dünenstecher", + "DuneSplicerTail": "Dünenstecher", + "EnchantedNightcrawler": "Verzauberter Nachtkriecher", + "GiantFlyingAntlion": "Ameisenlöwenschwarm", + "Fritz": "Fritz", + "GiantShelly": "Riesen-Shelly", + "GiantShelly2": "Riesen-Shelly", + "GoblinSummoner": "Goblin-Beschwörer", + "GraniteFlyer": "Granit-Elementar", + "GraniteGolem": "Granitgolem", + "GreekSkeleton": "Hoplit", + "Grubby": "Grubby", + "LunarTowerNebula": "Nebulasäule", + "LunarTowerSolar": "Sonnensäule", + "LunarTowerStardust": "Sternenstaubsäule", + "LunarTowerVortex": "Vortexsäule", + "MartianProbe": "Marsianersonde", + "MartianSaucer": "Marsianer-UFO", + "MartianSaucerCannon": "Marsianer-UFO-Kanone", + "MartianSaucerCore": "Marsianer-UFO", + "MartianSaucerTurret": "Marsianer-UFO-Geschützturm", + "MartianWalker": "Marsianer-Läufer", + "Medusa": "Medusa", + "MoonLordCore": "Mondherrenkern", + "MoonLordHand": "Mondherrenhand", + "MoonLordHead": "Mondherr", + "Mothron": "Mottron", + "MothronEgg": "Mottron-Ei", + "MothronSpawn": "Baby Mottron", + "Nailhead": "Nagelkopf", + "NebulaBeast": "Evolutionsbestie", + "NebulaBrain": "Nebula-Wasserleiche", + "NebulaHeadcrab": "Gehirnsauger", + "NebulaSoldier": "Prophet", + "PartyBunny": "Hase", + "Psycho": "Psycho", + "Salamander": "Salamander", + "Salamander2": "Salamander", + "Salamander3": "Salamander", + "Salamander4": "Salamander", + "Salamander5": "Salamander", + "Salamander6": "Salamander", + "Salamander7": "Salamander", + "Salamander8": "Salamander", + "Salamander9": "Salamander", + "SandElemental": "Sand-Elementar", + "SandShark": "Sandhai", + "SandsharkCorrupt": "Knochenbeißer", + "SandsharkCrimson": "Fleischräuber", + "SandsharkHallow": "Kristalldrescher", + "SandSlime": "Sandschleim", + "SlimeSpiked": "Gespickter Schleim", + "Sluggy": "Sluggy", + "SolarFlare": "Sonneneruption", + "SolarGoop": "Sonnenfragment", + "SolarSpearman": "Drakanier", + "SquirrelGold": "Goldeichhörnchen", + "SquirrelRed": "Roteichhörnchen", + "StardustCellBig": "Sternenzelle", + "StardustCellSmall": "Sternenzelle", + "StardustJellyfishBig": "Flusseindringling", + "StardustSoldier": "Sternengucker", + "StardustSpiderBig": "Twinkle-Maschine", + "StardustSpiderSmall": "Twinkle", + "StardustWormHead": "Milchstraßenschweber", + "TargetDummy": "Zielpuppe", + "TaxCollector": "Steuereintreiber", + "TheBride": "Die Braut", + "ThePossessed": "Der Besessene", + "TombCrawlerBody": "Grabkriecher", + "TombCrawlerHead": "Grabkriecher", + "TombCrawlerTail": "Grabkriecher", + "Tumbleweed": "Wütender Steppenroller", + "VortexHornet": "Alien-Hornisse", + "VortexHornetQueen": "Alienkönigin", + "VortexLarva": "Alienlarve", + "VortexRifleman": "Sturmtaucher", + "VortexSoldier": "Vortexianer", + "GiantWalkingAntlion": "Ameisenlöwenläufer", + "DD2GoblinBomberT2": "{$NPCName.DD2GoblinBomberT1}", + "DD2WyvernT3": "{$NPCName.DD2WyvernT1}", + "DD2WyvernT2": "{$NPCName.DD2WyvernT1}", + "DD2OgreT3": "{$NPCName.DD2OgreT2}", + "DD2WitherBeastT3": "{$NPCName.DD2WitherBeastT2}", + "DD2SkeletonT3": "{$NPCName.DD2SkeletonT1}", + "DD2KoboldWalkerT3": "{$NPCName.DD2KoboldWalkerT2}", + "DD2DrakinT3": "{$NPCName.DD2DrakinT2}", + "DD2DarkMageT3": "{$NPCName.DD2DarkMageT1}", + "DD2KoboldFlyerT3": "{$NPCName.DD2KoboldFlyerT2}", + "BabySlime": "Babyschleim", + "BigRainZombie": "Zombie", + "BlackSlime": "Schwarzer Schleim", + "DD2Bartender": "Tavernenwirt", + "DD2Betsy": "Betsy", + "DD2DarkMageT1": "Dunkelmagier", + "DD2DrakinT2": "Drakin", + "DD2EterniaCrystal": "Eternia-Kristall", + "DD2GoblinBomberT1": "Etherischer Goblin-Bomber", + "DD2GoblinT1": "Etherischer Goblin", + "DD2JavelinstT1": "Etherischer Speerwerfer", + "DD2KoboldFlyerT2": "Kobold-Gleiter", + "DD2KoboldWalkerT2": "Kobold", + "DD2LightningBugT3": "Etherischer Leuchtkäfer", + "DD2OgreT2": "Oger", + "DD2SkeletonT1": "Skelett des Alten", + "DD2WitherBeastT2": "Welkbestie", + "DD2WyvernT1": "Etherischer Lindwurm", + "GreenSlime": "Grüner Schleim", + "JungleSlime": "Dschungelschleim", + "Pinky": "Pinky", + "PurpleSlime": "Lila Schleim", + "RedSlime": "Roter Schleim", + "Slimeling": "Schleimling", + "Slimer2": "Schleimer", + "SmallRainZombie": "Zombie", + "YellowSlime": "Gelber Schleim", + "MoonLordFreeEye": "Das wahre Auge von Cthulhu", + "MoonLordLeechBlob": "Mondblutegelpfropf", + "SkeletonMerchant": "Skeletthändler", + "PirateShip": "Fliegender Holländer", + "PirateShipCannon": "Holländerkanone", + "BartenderUnconscious": "Bewusstloser Typ" + } +} \ No newline at end of file diff --git a/Localization/Content/de-DE/Projectiles.json b/Localization/Content/de-DE/Projectiles.json new file mode 100644 index 0000000..ce43818 --- /dev/null +++ b/Localization/Content/de-DE/Projectiles.json @@ -0,0 +1,722 @@ +{ + "ProjectileName": { + "AdamantiteChainsaw": "Adamant-Kettensäge", + "AdamantiteDrill": "Adamant-Bohrer", + "AdamantiteGlaive": "Adamant-Glefe", + "Amarok": "Jojo", + "AmberBolt": "Bernsteinbolzen", + "AmethystBolt": "Amethystbolzen", + "Anchor": "Anker", + "AncientDoomProjectile": "Ende der Prophezeiung", + "AntiGravityHook": "Antischwerkrafthaken", + "Arkhalis": "Arkhalis", + "AshBallFalling": "Ascheball", + "BabyDino": "Babydino", + "BabyEater": "Babyfresser", + "BabyFaceMonster": "Babygesichtmonster", + "BabyGrinch": "Baby Grinch", + "BabyHornet": "Baby-Hornisse", + "BabySkeletronHead": "Baby-Skeletron-Kopf", + "BabySlime": "Babyschleim", + "BabySnowman": "Babyschneemann", + "BabySpider": "Babyspinne", + "BallofFire": "Feuerball", + "BallofFrost": "Frostkugel", + "BallOHurt": "Schmerzball", + "Bananarang": "Bananarang", + "Bat": "Fledermaus", + "BatHook": "Fledermaushaken", + "BeachBall": "Wasserball", + "Bee": "Biene", + "BeeArrow": "Bienenpfeil", + "BeeHive": "Bienenstock", + "Beenade": "Bienate", + "BlackBolt": "Onyx-Blaster", + "BlackCat": "Schwarze Katze", + "BlackCounterweight": "Gegengewicht", + "Blizzard": "Schneesturm", + "BloodCloudMoving": "Blutwolke", + "BloodCloudRaining": "Blutwolke", + "BloodRain": "Blutregen", + "BloodWater": "Blutwasser", + "BloodyMachete": "Blutige Machete", + "BlowupSmoke": "Vergrößerungsrauch", + "BlowupSmokeMoonlord": "Vergrößerungsrauch", + "BlueCounterweight": "Gegengewicht", + "BlueFairy": "Blaue Fee", + "BlueFlare": "Blaue Leuchtkugel", + "BlueMoon": "Blauer Mond", + "BobberFiberglass": "Schwimmer", + "BobberFisherOfSouls": "Schwimmer", + "BobberFleshcatcher": "Schwimmer", + "BobberGolden": "Schwimmer", + "BobberHotline": "Schwimmer", + "BobberMechanics": "Schwimmer", + "BobberReinforced": "Schwimmer", + "BobbersittingDuck": "Schwimmer", + "BobberWooden": "Schwimmer", + "Bomb": "Bombe", + "BombFish": "Bombenfisch", + "BombSkeletronPrime": "Bombe", + "Bone": "Knochen", + "BoneArrow": "Knochenpfeil", + "BoneArrowFromMerchant": "Knochenpfeil", + "BoneDagger": "Knochendolch", + "BoneGloveProj": "X-Knochen", + "BoneJavelin": "Knochenwurfspeer", + "Boulder": "Felsen", + "BoulderStaffOfEarth": "Felsen", + "BouncyBomb": "Federnde Bombe", + "BouncyDynamite": "Federndes Dynamit", + "BouncyGlowstick": "Federnder Leuchtstab", + "BouncyGrenade": "Federnde Granate", + "BoxingGlove": "Boxhandschuh", + "BrainOfConfusion": "Gehirn der Verwirrung", + "BrainScramblerBolt": "Gehirnverwirrungsbolzen", + "Bubble": "Blase", + "Bullet": "Patrone", + "BulletDeadeye": "Patrone", + "BulletHighVelocity": "Patrone", + "BulletSnowman": "Patrone", + "Bunny": "Hase", + "ButchersChainsaw": "Kettensäge des Schlachters", + "CandyCaneHook": "Zuckerstangen-Haken", + "CandyCorn": "Bonbonmais", + "CannonballFriendly": "Kanonenkugel", + "CannonballHostile": "Kanonenkugel", + "Cascade": "Jojo", + "ChainGuillotine": "Kettenguillotine", + "ChainKnife": "Kettenmesser", + "ChargedBlasterCannon": "Aufgeladene Blasterkanone", + "ChargedBlasterLaser": "Aufgeladener Blasterlaser", + "ChargedBlasterOrb": "Aufgeladene Blasterkugel", + "Chik": "Jojo", + "ChlorophyteArrow": "Grünalgenpfeil", + "ChlorophyteBullet": "Patrone", + "ChlorophyteChainsaw": "Grünalgenkettensäge", + "ChlorophyteDrill": "Grünalgenbohrer", + "ChlorophyteJackhammer": "Grünalgendrucklufthammer", + "ChlorophyteOrb": "Grünalgenkugel", + "ChlorophytePartisan": "Grünalgenpartisane", + "ChristmasHook": "Weihnachtshaken", + "ClingerStaff": "Verfluchte Flammen", + "ClothiersCurse": "Schädel", + "CobaltChainsaw": "Kobalt-Kettensäge", + "CobaltDrill": "Kobalt-Bohrer", + "CobaltNaginata": "Kobalt-Naginata", + "Code1": "Jojo", + "Code2": "Jojo", + "CoinPortal": "Münzenportal", + "CompanionCube": "Gefährtenwürfel", + "ConfettiGun": "Konfetti", + "ConfettiMelee": "Konfetti", + "CopperCoin": "Kupfermünze", + "CopperCoinsFalling": "Kupfermünzen", + "CorruptSpray": "Verdorbenes Spray", + "CorruptYoyo": "Jojo", + "CrimsandBallFalling": "Purpursandkugel", + "CrimsandBallGun": "Purpursandkugel", + "CrimsonHeart": "Purpurherz", + "CrimsonSpray": "Purpurspray", + "CrimsonYoyo": "Jojo", + "CrossGraveMarker": "Grabstein", + "CrystalBullet": "Kristallpatrone", + "CrystalDart": "Kristallwurfpfeil", + "CrystalLeaf": "Kristallblatt", + "CrystalLeafShot": "Kristallblatt", + "CrystalPulse": "Kristallladung", + "CrystalPulse2": "Kristallladung", + "CrystalShard": "Kristallsplitter", + "CrystalStorm": "Kristallsturm", + "CrystalVileShardHead": "Böser Kristallsplitter", + "CrystalVileShardShaft": "Böser Kristallsplitter", + "Cthulunado": "Cthulunado", + "CultistBossFireBall": "Feuerball", + "CultistBossFireBallClone": "Schattenfeuerball", + "CultistBossIceMist": "Eisnebel", + "CultistBossLightningOrb": "Blitzkugel", + "CultistBossLightningOrbArc": "Blitzkugelbogen", + "CultistBossParticle": "Energie", + "CultistRitual": "Blitzritual", + "CursedArrow": "Verfluchter Pfeil", + "CursedBullet": "Verfluchte Patrone", + "CursedDart": "Verfluchter Wurfpfeil", + "CursedDartFlame": "Verfluchte Flamme", + "CursedFlameFriendly": "Verfluchte Flamme", + "CursedFlameHostile": "Verfluchte Flamme", + "CursedSapling": "Verfluchter Schössling", + "DangerousSpider": "Gefährliche Spinne", + "DarkLance": "Finstere Lanze", + "Daybreak": "Tagesanbruch", + "DD2FlameBurstTowerT1": "Flammenstoßturm", + "DD2FlameBurstTowerT1Shot": "Flammenstoßturm", + "DD2FlameBurstTowerT2": "Flammenstoßturm", + "DD2FlameBurstTowerT2Shot": "Flammenstoßturm", + "DD2FlameBurstTowerT3": "Flammenstoßturm", + "DD2FlameBurstTowerT3Shot": "Flammenstoßturm", + "DD2JavelinHostile": "Wurfspeer", + "DeadlySphere": "Tödliche Sphäre", + "DeathLaser": "Todeslaser", + "DeathSickle": "Todessichel", + "DemonScythe": "Dämonensense", + "DemonSickle": "Dämonensichel", + "DesertDjinnCurse": "Fluch des Wüstengeists", + "DiamondBolt": "Diamantbolzen", + "DirtBall": "Schmutzkugel", + "DrillMountCrosshair": "Bohrerfadenkreuz", + "DrManFlyFlask": "Flasche", + "DryadsWardCircle": "Dyradenschutz", + "DualHookBlue": "Haken", + "DualHookRed": "Haken", + "Dynamite": "Dynamit", + "EatersBite": "Biss des Essers", + "EbonsandBallFalling": "Ebensandball", + "EbonsandBallGun": "Ebensandball", + "EighthNote": "Notiz", + "Electrosphere": "Elektrosphäre", + "ElectrosphereMissile": "Elektrosphärenrakete", + "EmeraldBolt": "Smaragdbolzen", + "EnchantedBeam": "Verzauberter Strahl", + "EnchantedBoomerang": "Verzauberter Bumerang", + "ExplosiveBullet": "Explodierende Kugel", + "ExplosiveBunny": "Explosives Häschen", + "Explosives": "Sprengstoff", + "EyeBeam": "Augenstrahl", + "EyeFire": "Augenfeuer", + "EyeLaser": "Augenlaser", + "EyeSpring": "Augenfeder", + "FallingStar": "Sternschnuppe", + "FireArrow": "Feuerpfeil", + "Fireball": "Feuerball", + "FireworkFountainBlue": "Feuerwerksbrunnen", + "FireworkFountainRainbow": "Feuerwerksbrunnen", + "FireworkFountainRed": "Feuerwerksbrunnen", + "FireworkFountainYellow": "Feuerwerksbrunnen", + "FishHook": "Angelhaken", + "Flairon": "Flairon", + "FlaironBubble": "Flaironblase", + "Flamarang": "Flammarang", + "Flamelash": "Flammenpeitsche", + "Flames": "Flammen", + "FlamesTrap": "Flammen", + "FlamethrowerTrap": "Flammenwerfer", + "FlamingArrow": "Flammenpfeil", + "FlamingJack": "Brennender Jack", + "FlamingScythe": "Brennende Sense", + "FlamingWood": "Brennendes Holz", + "Flare": "Leuchtkugel", + "FlowerPetal": "Blütenblatt", + "FlowerPow": "Blumenbumm", + "FlowerPowPetal": "Blumenbumm", + "FlyingImp": "Fliegender Kobold", + "FlyingKnife": "Fliegendes Messer", + "FlyingPiggyBank": "Fliegendes Sparschwein", + "FormatC": "Jojo", + "FoulPotion": "Faultrank", + "FrostArrow": "Frostpfeil", + "FrostBeam": "Froststrahl", + "FrostBlastFriendly": "Froststoß", + "FrostBlastHostile": "Froststoß", + "FrostBoltStaff": "Frostbolzen", + "FrostBoltSword": "Frostbolzen", + "FrostburnArrow": "Gefrierbrandpfeil", + "FrostDaggerfish": "Frost-Dolchfisch", + "FrostHydra": "Frosthydra", + "FrostShard": "Frostsplitter", + "FrostWave": "Frostwelle", + "FruitcakeChakram": "Früchtebrot-Chakram", + "GemHookAmethyst": "Edelsteinhaken", + "GemHookDiamond": "Edelsteinhaken", + "GemHookEmerald": "Edelsteinhaken", + "GemHookRuby": "Edelsteinhaken", + "GemHookSapphire": "Edelsteinhaken", + "GemHookTopaz": "Edelsteinhaken", + "GeyserTrap": "Geysir", + "GiantBee": "Biene", + "GigaZapperSpear": "Gigazapper-Angriffsspitze", + "Glowstick": "Leuchtstab", + "GoldCoin": "Goldmünze", + "GoldCoinsFalling": "Goldmünzen", + "GoldenBullet": "Goldene Kugel", + "GoldenShowerFriendly": "Goldener Schauer", + "GoldenShowerHostile": "Goldener Schauer", + "GolemFist": "Golemfaust", + "Gradient": "Jojo", + "GraveMarker": "Grabstein", + "Gravestone": "Grabstein", + "GreekFire1": "Griechisches Feuer", + "GreekFire2": "Griechisches Feuer", + "GreekFire3": "Griechisches Feuer", + "GreenCounterweight": "Gegengewicht", + "GreenFairy": "Rosa Fee", + "GreenLaser": "Grüner Laser", + "Grenade": "Granate", + "GrenadeI": "Granate", + "GrenadeII": "Granate", + "GrenadeIII": "Granate", + "GrenadeIV": "Granate", + "Gungnir": "Gungnir", + "HallowSpray": "Heiliges Spray", + "HallowStar": "Heiliger Stern", + "Hamdrax": "Hamdrax", + "HappyBomb": "Fröhliche Bombe", + "Harpoon": "Harpune", + "HarpyFeather": "Harpyenfeder", + "Headstone": "Grabstein", + "HeatRay": "Hitzestrahl", + "HelFire": "Jojo", + "HellfireArrow": "Höllenfeuerpfeil", + "Hellwing": "Höllenflügen", + "HolyArrow": "Heiliger Pfeil", + "HolyWater": "Heiliges Wasser", + "Hook": "Haken", + "Hornet": "Hornisse", + "HornetStinger": "Hornissenstachel", + "IceBlock": "Eisklotz", + "IceBolt": "Eisbolzen", + "IceBoomerang": "Eisbumerang", + "IceSickle": "Eissichel", + "IceSpike": "Eisstachel", + "IcewaterSpit": "Eiswasserspeichel", + "IchorArrow": "Ichorpfeil", + "IchorBullet": "Ichorkugel", + "IchorDart": "Ichorwurfpfeil", + "IchorSplash": "Ichorspritzer", + "IlluminantHook": "Haken", + "ImpFireball": "Koboldfeuerball", + "InfernoFriendlyBlast": "Inferno", + "InfernoFriendlyBolt": "Inferno", + "InfernoHostileBlast": "Inferno", + "InfernoHostileBolt": "Inferno", + "InfluxWaver": "Zuflussschwenken", + "IvyWhip": "Efeupeitsche", + "JackOLantern": "Kürbislaterne", + "JavelinFriendly": "Wurfspeer", + "JavelinHostile": "Wurfspeer", + "JestersArrow": "Narrenpfeil", + "JumperSpider": "Springspinne", + "JungleSpike": "Dschungelstachel", + "JungleYoyo": "Jojo", + "Kraken": "Jojo", + "Landmine": "Tretmine", + "LaserDrill": "Laserbohrer", + "LaserMachinegun": "Laser-Maschinengewehr", + "LaserMachinegunLaser": "Laser", + "LastPrism": "Letztes Prisma", + "LastPrismLaser": "Letztes Prisma", + "Leaf": "Blatt", + "LightBeam": "Lichtstrahl", + "LightDisc": "Lichtscheibe", + "LostSoulFriendly": "Verlorene Seele", + "LostSoulHostile": "Verlorene Seele", + "LovePotion": "Liebestrank", + "LunarFlare": "Monderuption", + "LunarHookNebula": "Mondhaken", + "LunarHookSolar": "Mondhaken", + "LunarHookStardust": "Mondhaken", + "LunarHookVortex": "Mondhaken", + "MagicDagger": "Magischer Dolch", + "MagicLantern": "Magielaterne", + "MagicMissile": "Magische Rakete", + "MagnetSphereBall": "Magnetsphäre", + "MagnetSphereBolt": "Magnetsphäre", + "MartianTurretBolt": "Elektrischer Bolzen", + "MartianWalkerLaser": "Laserstrahl", + "MechanicalPiranha": "Mechanischer Piranha", + "MechanicWrench": "Mechanikerrute", + "MedusaHead": "Medusastrahl", + "MedusaHeadRay": "Medusastrahl", + "Meowmere": "Meowmere", + "Meteor1": "Meteor", + "Meteor2": "Meteor", + "Meteor3": "Meteor", + "MeteorShot": "Meteorenschuss", + "MinecartMechLaser": "Lorenlaser", + "MiniMinotaur": "Mini-Minotaurus", + "MiniRetinaLaser": "Mini-Retina-Laser", + "MiniSharkron": "Mini-Drachai", + "Missile": "Flugkörper", + "MolotovCocktail": "Molotowcocktail", + "MolotovFire": "Molotowfeuer", + "MolotovFire2": "Molotowfeuer", + "MolotovFire3": "Molotowfeuer", + "MoonLeech": "Mondblutegel", + "MoonlordArrow": "Luminit-Pfeil", + "MoonlordArrowTrail": "Luminit-Pfeil", + "MoonlordBullet": "Luminit-Kugel", + "MoonlordTurret": "Mondportal", + "MoonlordTurretLaser": "Mondportallaser", + "MudBall": "Schlammball", + "Mushroom": "Pilz", + "MushroomSpear": "Pilzspeer", + "MushroomSpray": "Pilzspray", + "MythrilChainsaw": "Mythrill-Kettensäge", + "MythrilDrill": "Mythrill-Bohrer", + "MythrilHalberd": "Mythrill-Hellebarde", + "Nail": "Nagel", + "NailFriendly": "Nagel", + "NanoBullet": "Nanokugel", + "NebulaArcanum": "Nebula Arcanum", + "NebulaArcanumExplosionShot": "Nebula Arcanum", + "NebulaArcanumExplosionShotShard": "Nebula Arcanum", + "NebulaArcanumSubshot": "Nebula Arcanum", + "NebulaBlaze1": "Nebula-Aufflammen", + "NebulaBlaze2": "Nebula-Aufflammen Ex", + "NebulaBolt": "Nebula-Durchdringer", + "NebulaChainsaw": "Nebula-Kettensäge", + "NebulaDrill": "Nebula-Bohrer", + "NebulaEye": "Nebula-Auge", + "NebulaLaser": "Nebula-Laser", + "NebulaSphere": "Nebula-Sphäre", + "NettleBurstEnd": "Nesselstoß", + "NettleBurstLeft": "Nesselstoß", + "NettleBurstRight": "Nesselstoß", + "NightBeam": "Nachtstrahl", + "None": "", + "NorthPoleSnowflake": "Nordpol", + "NorthPoleSpear": "Nordpol", + "NorthPoleWeapon": "Nordpol", + "NurseSyringeHeal": "Spritze", + "NurseSyringeHurt": "Spritze", + "Obelisk": "Grabstein", + "ObsidianSwordfish": "Osidianschwertfisch", + "OneEyedPirate": "Einäugiger Pirat", + "OrichalcumChainsaw": "Oreichalkoskettensäge", + "OrichalcumDrill": "Oreichalkosbohrer", + "OrichalcumHalberd": "Oreichalkoshellebarde", + "OrnamentFriendly": "Schmuck", + "OrnamentHostile": "Schmuck", + "OrnamentHostileShrapnel": "Schmuck", + "PainterPaintball": "Paintball", + "PaladinsHammerFriendly": "Paladins Hammer", + "PaladinsHammerHostile": "Paladins Hammer", + "PalladiumChainsaw": "Palladiumkettensäge", + "PalladiumDrill": "Palladiumbohrer", + "PalladiumPike": "Palladiumspieß", + "Parrot": "Papagei", + "PartyBullet": "Partykugel", + "PartyGirlGrenade": "Konfettigranate", + "PearlSandBallFalling": "Perlensandball", + "PearlSandBallGun": "Perlensandball", + "Penguin": "Pinguin", + "PetLizard": "Zahme Echse", + "Phantasm": "Phantasm", + "PhantasmalBolt": "Phantasmischer Bolzern", + "PhantasmalDeathray": "Phantasmischer Todesstrahl", + "PhantasmalEye": "Phantasmisches Auge", + "PhantasmalSphere": "Phantasmische Sphäre", + "PhantasmArrow": "Phantasm", + "PhasicWarpDisc": "", + "PhasicWarpEjector": "", + "PineNeedleFriendly": "Piniennadel", + "PineNeedleHostile": "Piniennadel", + "PinkFairy": "Rosa Fee", + "PinkLaser": "Rosa Laser", + "PirateCaptain": "Piratenkäpt'n", + "PlatinumCoin": "Platinmünze", + "PlatinumCoinsFalling": "Platinmünzen", + "PoisonDart": "Giftpfeil", + "PoisonDartBlowgun": "Giftpfeil", + "PoisonDartTrap": "Giftpfeil", + "PoisonedKnife": "Vergiftetes Messer", + "PoisonFang": "Giftklaue", + "PoisonSeedPlantera": "Giftsaat", + "PortalGun": "Portalrevolver", + "PortalGunBolt": "Portalbolzen", + "PortalGunGate": "Portaltor", + "PossessedHatchet": "Besessenes Beil", + "Present": "Geschenk", + "ProximityMineI": "Landmine", + "ProximityMineII": "Landmine", + "ProximityMineIII": "Landmine", + "ProximityMineIV": "Landmine", + "PulseBolt": "Pulsbolzen", + "Puppy": "Welpe", + "PureSpray": "Reines Spray", + "PurificationPowder": "Läuterungspulver", + "PurpleCounterweight": "Gegengewicht", + "PurpleLaser": "Lila Laser", + "Pygmy": "Pygmäe", + "Pygmy2": "Pygmäe", + "Pygmy3": "Pygmäe", + "Pygmy4": "Pygmäe", + "PygmySpear": "Pygmäe", + "QuarterNote": "Notiz", + "RainbowBack": "Regenbogen", + "RainbowCrystal": "Regenbogenkristall", + "RainbowCrystalExplosion": "Regenbogenexplosion", + "RainbowFront": "Regenbogen", + "RainbowRodBullet": "Regenbogen", + "RainCloudMoving": "Regenwolke", + "RainCloudRaining": "Regenwolke", + "RainFriendly": "Regen", + "RainNimbus": "Regen", + "Rally": "Jojo", + "Raven": "Rabe", + "RayGunnerLaser": "Laserstrahl", + "RedCounterweight": "Gegengewicht", + "RedsYoyo": "Jojo", + "Retanimini": "Retanimini", + "RichGravestone1": "Grabstein", + "RichGravestone2": "Grabstein", + "RichGravestone3": "Grabstein", + "RichGravestone4": "Grabstein", + "RichGravestone5": "Grabstein", + "RocketFireworkBlue": "Rakete", + "RocketFireworkGreen": "Rakete", + "RocketFireworkRed": "Rakete", + "RocketFireworksBoxBlue": "Rakete", + "RocketFireworksBoxGreen": "Rakete", + "RocketFireworksBoxRed": "Rakete", + "RocketFireworksBoxYellow": "Rakete", + "RocketFireworkYellow": "Rakete", + "RocketI": "Rakete", + "RocketII": "Rakete", + "RocketIII": "Rakete", + "RocketIV": "Rakete", + "RocketSkeleton": "Rakete", + "RocketSnowmanI": "Rakete", + "RocketSnowmanII": "Rakete", + "RocketSnowmanIII": "Rakete", + "RocketSnowmanIV": "Rakete", + "RopeCoil": "Spiralseil", + "RottenEgg": "Faules Ei", + "RubyBolt": "Rubinbolzen", + "RuneBlast": "Runenstoß", + "SalamanderSpit": "Giftspucke", + "SandBallFalling": "Sandball", + "SandBallGun": "Sandball", + "SandnadoFriendly": "Alter Sturm", + "SandnadoHostile": "Alter Sturm", + "SandnadoHostileMark": "Alter Sturm", + "SantaBombs": "Weihnachtsschmuck", + "Sapling": "Schößling", + "SapphireBolt": "Saphirbolzen", + "SaucerDeathray": "Marsianer-Todesstrahl", + "SaucerLaser": "UFO-Laser", + "SaucerMissile": "Marsianer-Rakete", + "SaucerScrap": "UFO-Schrott", + "SawtoothShark": "Sägezahnhai", + "ScutlixLaser": "Laser", + "ScutlixLaserCrosshair": "Scutlix-Fadenkreuz", + "ScutlixLaserFriendly": "Scutlix-Laser", + "Seed": "Samen", + "SeedlerNut": "Setzling", + "SeedlerThorn": "Setzling", + "SeedPlantera": "Samen", + "ShadowBeamFriendly": "Schattenstrahl", + "ShadowBeamHostile": "Schattenstrahl", + "ShadowFlame": "Schattenflamme", + "ShadowFlameArrow": "Schattenflammenpfeil", + "ShadowFlameKnife": "Schattenflammenmesser", + "Shadowflames": "Schattenflammen", + "ShadowOrb": "Schattenkugel", + "Sharknado": "Hainado", + "SharknadoBolt": "Hainadoblitz", + "Shuriken": "Wurfstern", + "SilkRopeCoil": "Spiralseil", + "SiltBall": "Schlickball", + "SilverCoin": "Silbermünze", + "SilverCoinsFalling": "Silbermünzen", + "SkeletonBone": "Knochen", + "SkeletronHand": "Skeletronhand", + "Skull": "Schädel", + "SkyFracture": "Himmelsriss", + "SlimeGun": "Schleimpistole", + "SlimeHook": "Schleimhaken", + "SlushBall": "Schlackekugel", + "SmokeBomb": "Rauchbombe", + "SniperBullet": "Sniper-Kugel", + "SnowBallFriendly": "Schneekugel", + "SnowBallHostile": "Schneekugel", + "SolarCounter": "Solarstrahlung", + "SolarFlareChainsaw": "Sonneneruptions-Kettensäge", + "SolarFlareDrill": "Sonneneruptions-Bohrer", + "SolarFlareRay": "Sonneneruption", + "SolarWhipSword": "Sonnenausbruch", + "SolarWhipSwordExplosion": "Sonnenausbruch", + "SoulDrain": "Seelensaugen", + "SoulscourgePirate": "Seelengeißelpirat", + "Spark": "Funken", + "Spazmamini": "Spazmamini", + "Spear": "Speer", + "SpearTrap": "Speer", + "SpectreWrath": "Geisterzorn", + "SpelunkerGlowstick": "Höhlengänger-Leuchtstab", + "Spider": "Spinne", + "SpiderEgg": "Spinnenei", + "SpiderHiver": "Spinnenkanonenturm", + "Spike": "Stachel", + "SpikedSlimeSpike": "Schleimstachel", + "SpikyBall": "Dornenball", + "SpikyBallTrap": "Dornenball", + "SpiritFlame": "Geisterflamme", + "SpiritHeal": "Geistheilung", + "SporeCloud": "Sporenwolke", + "SporeGas": "Spore", + "SporeGas2": "Spore", + "SporeGas3": "Spore", + "SporeTrap": "Spore", + "SporeTrap2": "Spore", + "Squashling": "Kürbisling", + "Stake": "Pflock", + "StarAnise": "Zuckerkeks", + "StardustCellMinion": "Sternenstaubzelle", + "StardustCellMinionShot": "Sternenstaubzelle", + "StardustChainsaw": "Sternenstaub-Kettensäge", + "StardustDragon1": "Sternenstaub-Drache", + "StardustDragon2": "Sternenstaub-Drache", + "StardustDragon3": "Sternenstaub-Drache", + "StardustDragon4": "Sternenstaub-Drache", + "StardustDrill": "Sternenstaub-Bohrer", + "StardustGuardian": "Sternenstaub-Wächter", + "StardustGuardianExplosion": "Sternenexplosion", + "StardustJellyfishSmall": "Flusseindringling", + "StardustSoldierLaser": "Sternenstaub-Laser", + "StardustTowerMark": "Sternenzeichen", + "Starfury": "Sternenwut", + "StarWrath": "Sternenzorn", + "StaticHook": "Statischer Haken", + "StickyBomb": "Haftbombe", + "StickyDynamite": "Klebriges Dynamit", + "StickyGlowstick": "Klebriger Leuchtstab", + "StickyGrenade": "Haftgranate", + "Stinger": "Stachel", + "Stynger": "Stachler", + "StyngerShrapnel": "Stachler", + "Sunfury": "Sonnenzorn", + "SuspiciousTentacle": "Verdächtig aussehendes Tentakel", + "SwordBeam": "Schwertstrahl", + "Swordfish": "Schwertfisch", + "Tempest": "Sturm", + "TendonHook": "Haken", + "TerraBeam": "Terrastrahl", + "Terrarian": "Terraner", + "TerrarianBeam": "Terraner", + "TheDaoofPow": "Das Dao von Peng", + "TheEyeOfCthulhu": "Jojo", + "TheMeatball": "Der Fleischklops", + "TheRottedFork": "Die verwittere Gabel", + "ThornBall": "Dornenkugel", + "ThornChakram": "Dornen-Chakram", + "ThornHook": "Haken", + "ThrowingKnife": "Wurfmesser", + "TiedEighthNote": "Notiz", + "TikiSpirit": "Tikigeist", + "TinyEater": "Kleiner Fresser", + "TitaniumChainsaw": "Titankettensäge", + "TitaniumDrill": "Titanbohrer", + "TitaniumTrident": "Titandreizack", + "Tombstone": "Grabstein", + "TopazBolt": "Topasbolzen", + "TowerDamageBolt": "Abgelassene Energie", + "ToxicBubble": "Giftige Blase", + "ToxicCloud": "Giftwolke", + "ToxicCloud2": "Giftwolke", + "ToxicCloud3": "Giftwolke", + "ToxicFlask": "Giftflasche", + "TrackHook": "Gleishaken", + "Trident": "Dreizack", + "Truffle": "Trüffel", + "TruffleSpore": "Trüffelsporen", + "Turtle": "Schildkröte", + "Twinkle": "Flimmern", + "Typhoon": "Taifun", + "UFOLaser": "UFO-Strahl", + "UFOMinion": "UFO", + "UnholyArrow": "Unheiliger Pfeil", + "UnholyTridentFriendly": "Unheiliger Dreizack", + "UnholyTridentHostile": "Unheiliger Dreizack", + "UnholyWater": "Unheiliges Wasser", + "ValkyrieYoyo": "Jojo", + "Valor": "Jojo", + "VampireHeal": "Vampirheilung", + "VampireKnife": "Vampirmesser", + "VenomArrow": "Toxikumpfeil", + "VenomBullet": "Toxikumkugel", + "VenomFang": "Toxikumgiftzahn", + "VenomSpider": "Giftspinne", + "ViciousPowder": "Böses Pulver", + "VilePowder": "Ekelpulver", + "VilethornBase": "Ekeldorn", + "VilethornTip": "Ekeldorn", + "VineRopeCoil": "Rankenseilrolle", + "VortexAcid": "Alien-Matsch", + "VortexBeater": "Vortex-Schläger", + "VortexBeaterRocket": "Vortex-Rakete", + "VortexChainsaw": "Vortex-Kettensäge", + "VortexDrill": "Vortex-Bohrer", + "VortexLaser": "Vortex-Laser", + "VortexLightning": "Vortex-Blitz", + "VortexVortexLightning": "Vortex", + "VortexVortexPortal": "Vortex", + "Wasp": "Wespe", + "WaterBolt": "Wasserbolzen", + "WaterGun": "Wasserpistole", + "WaterStream": "Wasserstrom", + "Web": "Netz", + "WebRopeCoil": "Spiralseil", + "WebSpit": "Netzspucke", + "WireKite": "Drahtdrachen", + "Wisp": "Irrlicht", + "WoodenArrowFriendly": "Holzpfeil", + "WoodenArrowHostile": "Holzpfeil", + "WoodenBoomerang": "Holzbumerang", + "WoodHook": "Holzhaken", + "WoodYoyo": "Jojo", + "WormHook": "Haken", + "Xenopopper": "Xenopopper", + "Yelets": "Jojo", + "YellowCounterweight": "Gegengewicht", + "ZephyrFish": "Zephyrfisch", + "Ale": "Bier", + "ApprenticeStaffT3Shot": "Betsys Zorn", + "BookStaffShot": "Buch des unendlichen Wissens", + "DD2ApprenticeStorm": "Wirbelwind des unendlichen Wissens", + "DD2BallistraProj": "Ballista", + "DD2BallistraTowerT1": "Ballista", + "DD2BallistraTowerT2": "Ballista", + "DD2BallistraTowerT3": "Ballista", + "DD2BetsyArrow": "Fliegender Schrecken", + "DD2BetsyFireball": "Betsys Feuerball", + "DD2BetsyFlameBreath": "Betsys Atem", + "DD2DarkMageBolt": "Dunkle Energie", + "DD2DarkMageHeal": "Dunkles Siegel", + "DD2DarkMageRaise": "Dunkles Siegel", + "DD2DrakinShot": "Drakin", + "DD2ElderWins": "Düsteres Ende", + "DD2ExplosiveTrapT1": "Sprengfalle", + "DD2ExplosiveTrapT1Explosion": "Sprengfalle", + "DD2ExplosiveTrapT2": "Sprengfalle", + "DD2ExplosiveTrapT2Explosion": "Sprengfalle", + "DD2ExplosiveTrapT3": "Sprengfalle", + "DD2ExplosiveTrapT3Explosion": "Sprengfalle", + "DD2GoblinBomb": "Goblinbombe", + "DD2LightningAuraT1": "Blitzaura", + "DD2LightningAuraT2": "Blitzaura", + "DD2LightningAuraT3": "Blitzaura", + "DD2LightningBugZap": "Vertrockneter Bolzen", + "DD2OgreSmash": "Ogerstampfen", + "DD2OgreSpit": "Ogerspuke", + "DD2OgreStomp": "Ogerstampfen", + "DD2PetDragon": "Hoardagron", + "DD2PetGato": "Propeller-Gato", + "DD2PetGhost": "Flickerdocht", + "DD2PhoenixBow": "Phantom-Phönix", + "DD2PhoenixBowShot": "Phantom-Phönix", + "DD2SquireSonicBoom": "Herzhafter Schlag", + "DD2Win": "Sieg!", + "MonkStaffT1": "Müde Krake", + "MonkStaffT1Explosion": "Stabschlag", + "MonkStaffT2": "Grausige Glefe", + "MonkStaffT2Ghast": "Ghast", + "MonkStaffT3": "Wut des Himmelsdrachen", + "MonkStaffT3_Alt": "Wut des Himmelsdrachen", + "MonkStaffT3_AltShot": "Wut des Himmelsdrachen", + "DD2JavelinHostileT3": "{$ProjectileName.DD2JavelinHostile}", + "Celeb2Rocket": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketExplosive": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketLarge": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketLargeExplosive": "{$ProjectileName.Celeb2Weapon}" + } +} \ No newline at end of file diff --git a/Localization/Content/de-DE/Town.json b/Localization/Content/de-DE/Town.json new file mode 100644 index 0000000..6ce0387 --- /dev/null +++ b/Localization/Content/de-DE/Town.json @@ -0,0 +1,228 @@ +{ + "DryadSpecialText": { + "WorldStatusAll": "{0} ist {1}% heilig, {2}% verdorben und {3}% purpur.", + "WorldStatusHallowCorrupt": "{0} ist {1}% heilig und {2}% verdorben.", + "WorldDescriptionGrim": "Die Dinge stehen sehr schlecht ...", + "WorldDescriptionWork": "Du hast viel Arbeit vor dir.", + "WorldDescriptionClose": "Du bist so nah!", + "WorldStatusHallowCrimson": "{0} ist {1}% heilig und {2}% purpur.", + "WorldStatusCorruptCrimson": "{0} ist {1}% verdorben und {2}% purpur.", + "WorldStatusCorrupt": "{0} ist {1}% verdorben.", + "WorldStatusCrimson": "{0} ist {1}% purpur.", + "WorldStatusHallow": "{0} ist {1}% heilig", + "WorldStatusPure": "{0} ist vollkommen rein. Das hast du toll gemacht!", + "WorldDescriptionBalanced": "Die Welt ist im Gleichgewicht.", + "WorldDescriptionFairyTale": "Wir leben in einem Märchen.", + "Party": "Ich dachte, ich könnte eine Party für unsere vergangenen Erfolge schmeißen und für die, die noch kommen.", + "AfterDD2Tier1": "Als ich in Etheria war, fühlte ich mich völlig isoliert von {WorldName}. Schön, wieder hier zu sein.", + "AfterDD2Tier2": "Das Verderben wollte mich einnehmen, als ich in Etheria war, aber stattdessen habe ich seine Macht gegen die Armee des Alten eingesetzt!" + }, + "DyeTraderSpecialText": { + "HasPlant_0": "Wunderbar! Du hast mir eine exquisite Probe der wunderschönen Farben und Armen der Welt gebracht. Im Austausch erhältst du diese besondere Flasche mit Farbe.", + "HasPlant_1": "Du bringst mir eine wunderschöne, seltene Blume ... ja, ja? Nimm diese Flasche mit besonderer Farbe als Entlohnung, Freund!", + "HasPlant_2": "Fantastisch, wunderbarer Freund! Mit diesem besonderen Exemplar kann ich die besten Farben mischen, die {WorldName} je gesehen hat! Diese hier darfst du gleich mitnehmen!", + "NoPlant_0": "Oh, nein, nein, so geht das nicht. Dieses Geld ist nutzlos! Du musst mir ein seltenes Exemplar einer Pflanze bringen!", + "NoPlant_1": "Du glaubst, du kannst {DyeTrader} hinters Licht führen! Da musst du aber früher aufstehen! Ich nehme nur die seltensten aller Blumen im Austausch für diese besonderen Flaschen!", + "NoPlant_2": "Diese Farbflaschen? Nein, mein lieber Freund, die lassen sich nicht mit Geld bezahlen. Ich nehme nur die wertvollsten und seltensten Blumen im Austausch für eine davon!", + "Party": "Ich liebe Partys. So viele wunderschöne Farben und glückliche Leute." + }, + "GuideSpecialText": { + "Party": "Du warst noch nie auf einer Party? Du solltest mal bei den anderen nachfragen. Manchmal bringen Leute besondere Geschenke mit." + }, + "MerchantSpecialText": { + "Party": "Weißt du, wie man am besten eine Party macht. Indem du Sachen für andere kaufst, vor allem von mir." + }, + "GoblinTinkererSpecialText": { + "Party": "Goblin-Partys sind so ähnlich wie die von Menschen. Bei beiden gibt es Spiele wie „Gib dem Menschen die Schuld“, äh ... Ich spiele das Spiel natürlich auf meinen Partys nicht." + }, + "WitchDoctorSpecialText": { + "Party": "Ich wollte nur mal sehen, wie dein Volk feiert. Enttäuscht bin ich nicht.", + "AfterDD2Tier1": "Ich spüre einen Gleichgesinnten unter den etherischen Dunkelmagiern. Schade, dass sie unsere Feinde sind. Ich hätte gern von ihnen gelernt." + }, + "ClothierSpecialText": { + "Party": "Mama hat immer gesagt, du musst die Vergangenheit hinter dir lassen, damit du weiter Party machen kannst." + }, + "TravellingMerchantSpecialText": { + "Party": "Viele sagen, dass man auf Partys die besten Erinnerungen sammelt. Also kauf etwas, damit du Erinnerungen sammeln kannst!" + }, + "MechanicSpecialText": { + "Party": "Glaubst du, es würde jemanden stören, wenn ich einen Kuchen mit Glühbirnen statt mit Kerzen verzieren würde?" + }, + "BartenderSpecialText": { + "AfterDD2Tier1": "Das war echt super, wie du die Armee des Alten zurückgeschlagen hast! Aber das war bestimmt noch nicht das letzte Mal, dass wir die gesehen haben. Sonderlich angestrengt haben sie sich ja nicht.", + "AfterDD2Tier2": "Die Armee des Alten wird immer stärker, und trotzdem setzt du dich gegen sie durch! Aber irgendwie habe ich den Eindruck, dass es das noch nicht gewesen ist.", + "AfterDD2Tier3": "Du hast es echt geschafft, den Ansturm der Armee des Alten abzuwehren? Vielleicht solltest du mal nach Etheria kommen.", + "BeforeDD2Tier1": "Wir sollten wirklich etwas gegen die Armee des Alten unternehmen. Wenn du mehr über den Eternia-Kristall erfahren willst, dann frag nur.", + "FirstHelp": "Hier hast du erst einmal ein paar Verteidigermedaillen, als Geschenk quasi! Ich hab ein paar besondere Verteidigungen, die du kaufen kannst, aber nur mit den Medaillen!", + "FirstMeeting": "Eh? Wie komme ich denn hierher? Ich erinnere mich nur noch, dass sich ein Portal vor mir geöffnet hat ..." + }, + "PartyGirlSpecialText": { + "Party_1": "Hmm? Heute nichts Besonderes ... haha, Scherz! Es ist Party-Zeit und danach ist After-Party-Zeit!", + "Party_2": "Endlich ist meine Zeit gekommen!", + "AfterDD2Tier1": "Hast du schon mal einen Oger gesehen? Ich möchte mal auf einem reiten!" + }, + "PirateSpecialText": { + "Party": "Nach dem ganzen Kuchen wirst du mich eine Weile Weißbart nennen müssen." + }, + "TruffleSpecialText": { + "Party": "Ich hätte ja alle zu mir nach Hause eingeladen, aber da gibt‘s keinen Pilz." + }, + "NurseSpecialText": { + "Party": "Nein, ich werde dir nicht verraten, wie viele Kerzen auf meinem Kuchen stehen." + }, + "WizardSpecialText": { + "Party": "Keine Frage, ich schmeiße die magischsten Partys.", + "AfterDD2Tier1": "Weißt du, so ein Portal habe ich schon mal gesehen, aber das war aus Gold." + }, + "CyborgSpecialText": { + "Party": "Die Party wird der Hammer! Oder sogar der Meißel!" + }, + "DemolitionistSpecialText": { + "Party": "Heute solltest du vorsichtig sein. Wir Zwerge haben ziemlich explosive Partys.", + "AfterDD2Start": "Ich verstehe nicht, warum wir die Portale nicht einfach in die Luft sprengen können." + }, + "ArmsDealerSpecialText": { + "Party": "Partys sind toll dafür, Leute aus ihrem Schneckenhaus zu locken." + }, + "StylistSpecialText": { + "Party": "Es mag ja sein, dass ich mir die Haare extra für heute hab machen lassen, aber ehrlich gesagt wollte ich nur Luftballons mit meiner Schere platzen lassen." + }, + "PainterSpecialText": { + "Party": "Ich hab schon mal ein Paintball-Duell ausprobiert, aber die Leute wollten lieber Essen und Dekorationen." + }, + "AnglerSpecialText": { + "Party": "Was, du glaubst, ich mag Partys, weil ich noch so jung bin? Tja, da hast du recht, also let‘s party!" + }, + "AnglerQuestText": { + "NoQuest_1": "Ich hab grad nichts für dich zu tun.", + "NoQuest_2": "Du hast mich für heute genug unterhalten, hau ab.", + "NoQuest_3": "Du bist fertig, der große {Angler} entlässt dich!", + "NoQuest_4": "Nur ein Fisch pro Tag. Lass mich in Frieden.", + "NoQuest_5": "Ich hab noch nicht mal den letzten Fisch aufgebraucht. Ich brauche nicht noch einen.", + "TurnIn_1": "Oh! Das ist der Fisch, den ich wollte! Jetzt hau ab!", + "TurnIn_2": "Toller Fang! Alles läuft nach Plan! Hehehe!", + "TurnIn_3": "Du gibst einen guten Laufaffen ab! Und jetzt verdufte!", + "TurnIn_4": "Muahahahahaha! Du hast es geschafft! Aber du bist immer noch heil, wie langweilig!", + "TurnIn_5": "Woah!? Du hast tatsächlich getan, was ich wollte, und hast überlebt! Nicht schlecht! Gib schon her und verdufte dann!", + "Quest_Batfish": "Na na na na na na na Bat-FISCH! Das heißt, du gräbst im Untergrund, fängst ihn und bringst ihn mir.\n\n(Gefangen im Untergrund & Höhlen)", + "Quest_BumblebeeTuna": "Die unterirdischen Dschungel von {WorldName} haben die seltsamsten Sachen! So hab ich zum Beispiel einen Fisch gesehen, der wie eine riesige Biene aussah! Ich bin allergisch gegen Bienen, deswegen musst du ihn mir fangen! Ich wette, der schmeckt wie ein Thunfisch-Honig-Sandwich!\n\n(Im Honig gefangen)", + "Quest_Catfish": "Endlich habe ich eine Dschungelkatze gefunden, die Wasser mag. Vermutlich, weil sie halb Fisch ist. Ich weiß nicht, warum es so gekommen ist, und ich will es auch nicht wissen. Ich will das Viech einfach nur haben, und zwar zackig!\n\n(Auf der Dschungel-Oberfläche gefangen)", + "Quest_Cloudfish": "Gerüchten zufolge gibt es Inseln, die hoch oben am Himmel schweben, und dort sollen unglaubliche Schätze zu holen sein! Aber wen interessiert das schon, wenn es noch viel cooler ist, dass sich manchmal Seen in den Wolken bilden, in denen Fische aus Wolken schwimmen! Ich will wissen, wie die Dinger schmecken, also solltest du einen für mich fangen!\n\n(Gefangen in den Himmelsseen)", + "Quest_Cursedfish": "In den Gewässern der tiefsten Verderbtheit schwimmt ein verfluchter Fisch! Er entstand aus den verfluchten Flammen, die von den gefallenen Schrecken ausgehen, die dort unten lauern. Angeblich kann nicht einmal Wasser diese Flammen löschen, heißt es, denn sie brennen auf ewig. Mit einem solchen Fisch könnte man die tollsten Sachen anstellen! Und du wirst ihn mir doch holen, oder bist du zu feige?\n\n(Gefangen im Verderben)", + "Quest_DynamiteFish": "Der Abreißer hat wegen einer verlorenen Dynamitstange im Waldsee rumgeheult. Dabei hat er doch so viele davon, da kommt es auf eine doch nicht an. Aber offenbar, weil ihr Flossen wuchsen und sie einfach davonschwamm! Keine Ahnung, woher er das Zeug bekommt, um so was hinzukriegen, aber die ist eindeutig besessen! Zieh sie an Land und bring sie mir. Ich wollte schon immer einen Selbstmordattentat-Fisch besitzen. Frag nicht, warum.\n\n(Auf der Oberfläche gefangen)", + "Quest_EaterofPlankton": "Ich wette, du hast nicht den Mumm, den Planktonfresser zu besorgen. Er ist ein pervertierter Fisch, der aus einem abgetrennten Stück des Weltenfressers mutierte. Fang ihn ein und bring ihn mir. Zeig mir, dass du kein Weichei bist!\n\n(Gefangen im Verderben)", + "Quest_FallenStarfish": "Ich liebe es, diese strahlend gelben Sterne zu sammeln, die vom Himmel fallen! Und noch mehr liebe ich es, wenn sie jemandem auf den Kopf fallen. Aber ... aber ... es geht nichts über einen Stern, der in einen Waldsee plumpst und sich in einen Fisch verwandelt! Das ist einfach dufte, und du bist so dufte und holst ihn mir!\n\n(Gefangen in den Himmelsseen)", + "Quest_TheFishofCthulu": "Offenbar können Dämonenaugen manchmal amphibisch sein. Sie fliegen nicht, sie schwimmen! Ich würd gern mal das Gesicht von jemandem sehen, in dessen Badewanne sie auftauchen! Die hängen in derselben Gegend ab. Das heißt, du wirst einen für mich an Land ziehen!\n\n(Gefangen in den Himmelsseen & auf der Oberfläche)", + "Quest_Fishotron": "Ich weiß nicht, was schlimmer ist, ein Knochenfisch oder ein Knochenfisch mit HÄNDEN. Dieser Fisch-o-Tron tief in den Höhlen macht mich wahnsinnig! Ich glaube, er ist von denselben bösen Geistern besessen, die auch in den alten Mann am Verlies gefahren sind! Ich fordere dich hiermit auf, ihn zu erwischen!\n\n(Gefangen in den Höhlen)", + "Quest_Harpyfish": "Ich wollte gerade an der Uferböschung ein Nickerchen halten, als sich dieser Fisch auf mich stürzte. Aus der Luft! Er hatte das Gesicht einer Frau und Federn statt Schuppen! Ich glaube, ich hab noch lauter geschrien als sie! He, du, geh hin und lass sie teuer dafür bezahlen, dass sie mich so erschreckt hat!\n\n(Gefangen in den Himmelsseen & auf der Oberfläche)", + "Quest_Hungerfish": "Es gibt da ein Stück der Hungrigen, das sich aus der Wand aus Fleisch in so ein kleines fischähnliches Ding verwandelt hat, das ziellos in der Unterwelt umherschwimmt und eklig und igitt ist - kurz gesagt: ich will es, sofort!\n\n(Gefangen in den Höhlen)", + "Quest_Ichorfish": "Wusstest du, dass es tief im Purpur Kreaturen gibt, die dieses widerliche gelbe Zeug produzieren? Ich habe mal zufällig mit angehört, wie sich eine Pfütze davon zu einem Fisch verschmolzen hat, der jetzt durch die Gegend schwimmt und so! Fang ihn mir, damit ich ihn jemandem ins Klo stecken kann!\n\n(Im Purpur gefangen)", + "Quest_Jewelfish": "Oooooohhh, STINKREICH werde ich sein! Tief in den Höhlen gibt es einen Fisch aus Edelsteinen! Frag mich nicht, wie das möglich ist. Ich weiß nur, dass dieser Fisch der Knaller ist und dass du ihn für mich fangen sollst!\n\n(Gefangen im Untergrund & Höhlen)", + "Quest_MirageFish": "In den Tiefen des Heiligen lassen sich ein paar interessante Kreaturen finden, kann ich dir sagen. Sie leuchten total violett und führen meine Augen an der Nase herum! Das ist echt abgefahren, darum sollst du so einen Fisch für mich fangen!\n\n(Gefangen im Untergrund-Heiligen)", + "Quest_MutantFlinxfin": "Was ist weiß-braun und kuschelig und lebt in einem gefrorenen unterirdischen See? Eine Mutantenflinxflosse! Das war jetzt wirklich kein Witz, es gibt tatsächlich eine mutierte Flinx-Abart, die sich den Lebensbedingungen im Wasser angepasst hat! Und ich möchte sie für mein Fischglas anpassen, also sorg gefälligst dafür, dass das passiert!\n\n(Gefangen in der Untergrund-Tundra)", + "Quest_Pengfish": "Es ist ein Wal! Es ist ein Delfin! Nein, es ist ein Pinguinfisch! Ach, und du bist's auch! Du darfst mir einen besorgen! Du weißt schon, dass sie nur auf kaltes Wasser stehen, oder?\n\n(Gefangen in der Tundra)", + "Quest_Pixiefish": "Es gibt da eine echt total seltene Art von Pixie, die mit so vielen Flügeln geboren wird, dass sie nicht fliegen kann! Sie schwimmt zusammen mit den Fischen in den Seen, die von diesem blauen Gras umgeben sind. Mein Aquarium braucht eine Lampe, darum sollst du diesen Pixie für mich fangen!\n\n(Gefangen im Heiligen)", + "Quest_Spiderfish": "Ich habe einen Fisch mit acht Beinen gesehen! Oh nein! Von wegen! Du wirst ihn für mich fangen, damit er nicht mehr lebt, wenn ich ihn in Händen halte! Das ist das letzte Mal, dass ich so tief in der Höhle fischen gehe!\n\n(Gefangen im Untergrund & Höhlen)", + "Quest_UnicornFish": "Einhörner und Regenbögen sind das Größte! Es gibt sie überall, sogar im Wasser. Doch, echt jetzt, im Heiligen See habe ich einen richtigen Einhornfisch gesehen! Deine Aufgabe ist es, ihn an Land zu ziehen, damit er mein Haustier werden kann!\n\n(Gefangen im Heiligen)", + "Quest_GuideVoodooFish": "Diese Dämonen in der Unterwelt stehen total auf Voodoopuppen, aber da gibt es eine Puppe, die viel zu viel Magie abbekommen hat! Sie hat sich in einen Fisch verwandelt, der sich selbstständig gemacht hat. Ich fordere dich auf, da runter zu gehen, und mir einen zu besorgen! Ich würde auf die kochende Lava aufpassen, denn wenn die dich röstet, bekomme ich meinen Fisch nicht!\n\n(Gefangen in den Höhlen)", + "Quest_Wyverntail": "Ich weiß mal was, was duuu nicht weißt! Gut, ich sag‘s dir ja! Es gibt eine fürchterliche Kreatur, die durch den Sternenhimmel fliegt! Das ist kein Quatsch! Man nennt sie einen Lindwurm! A-aber das wusstest du bereits, oder? Nun, dann sag ich dir etwas, das du noch nicht wusstest. Sie werden als Kaulquappen geboren! Das heißt ... Sie sind eigentlich Frösche! Jetzt hüpf mal los und besorg mir einen!\n\n(Gefangen in den Himmelsseen)", + "Quest_ZombieFish": "Du glaubst es nicht! Ich habe nachts im Wald einen Fisch gefangen, der schon tot war! Und dann hat er versucht, mich zu fressen! Ich hab ihn weggeschmissen und bin losgerannt! Jetzt will ich ihn jemandem in den Kleiderschrank legen, nur um zu sehen, was geschieht. Also zieh los und hol ihn für mich, okay?\n\n(Auf der Oberfläche gefangen)", + "Quest_AmanitaFungifin": "Ich habe einen Ort mit riesigen leuchtenden Pilzen entdeckt! Da war alles blau! Ich wollte nahe eines glitzernden blauen Sees einen von ihnen pflücken, als er auf einmal nach mir schnappte und wegschwamm! Dem werd ich's zeigen und ordentlich auf ihm rumtrampeln! Das heißt natürlich, du wirst ihn mir besorgen!\n\n(Gefangen im Glühenden Pilzfeld)", + "Quest_Angelfish": "Wusstest du, dass es Zauberinseln gibt, die hoch oben am Himmel schweben? Ich wette, das wusstest du nicht! Angeblich werden sie von Engeln bevölkert. Ich glaube, diese Engel haben Flossen und Kiemen und schwimmen durch die Gegend! Und ich glaube, dass du einen für mich fangen musst!\n\n(Gefangen in den Himmelsseen)", + "Quest_BloodyManowar": "Au! Komm mir bloß nicht zu nahe! Ich wurde von einer verdammten Galeere gebissen! Falls du so dumm bist, und nicht weißt, was das ist, das ist die gefährlichste Qualle auf der ganzen Welt {WorldName}! Geh ins ätzende Purpur und fang sie, wenn du dich traust! \n\n(Im Purpur gefangen)", + "Quest_Bonefish": "Normalerweise interessiert es mich nicht die Bohne, wenn ich Fischgräten im Wasser im Untergrund treiben sehe, aber die hier ist geschwommen! Was, du dachtest, dass nur menschliche Skelette in dieser Welt herumstolzieren {WorldName}? Capture-o para mim, quero colocá-lo na cama de alguém!\n\n(Gefangen im Untergrund & Höhlen)", + "Quest_Bunnyfish": "Ich war draußen im Wald zum Angeln. Und rate mal! Ein Häschen kam angehoppelt! Und dann noch eins und noch eins, bis ich von Häschen umzingelt war! Eines kam sogar aus dem Wasser angeschwommen, aber ohne Beine! Vor lauter Überraschung bin ich aus dem Stuhl gefallen, was sämtliche Häschen vertrieben hat! Ich will diesen Hasenfisch als Haustier, und du sollst ihn für mich fangen! Und zwar pronto!\n\n(Auf der Oberfläche gefangen)", + "Quest_CapnTunabeard": "Arrr, Matrose! Beim Klabautermann! Setzt die Segel! Es gab da mal einen Piratenkapitän mit einem Fisch namens Käpt'n Tunfischbart, der leider bei einem heftigen Sturm zusammen mit seinem Aquarium über Bord ging! Er hatte einen Haken als Flosse, eine Augenklappe und so weiter! Den musst du mir besorgen, damit ich so cool wie ein Pirat sein kann! Irgendwo da draußen auf dem Meer muss er sein! Hopp, hopp!\n\n(Im Meer gefangen)", + "Quest_Clownfish": "Am Meer sah ich einen knallorangenen und bunten Fisch, der krampfhaft nach einem verschwundenen Familienmitglied zu suchen schien! Geh ihn mir fangen, damit noch einer auftaucht, der dann wiederum nach ihm sucht!\n\n(Im Meer gefangen)", + "Quest_DemonicHellfish": "In der Unterwelt heißt es, dass der König aller Dämonen in Wirklichkeit ein Fisch sei! Stell dir mal die absolute Macht vor, die ich hätte, wenn du ihn für mich fangen würdest!\n\n(Gefangen in den Höhlen)", + "Quest_Derpfish": "Diese Derplinge im Dschungel sind die unheimlichsten Viecher überhaupt! Zum Glück gibt es welche, die keine Beine haben! Die leben im Wasser und sind weit weniger unheimlich! Fang mir einen, damit ich herausfinden kann, wie sie schmecken, ohne dass ich mich halb zu Tode ängstige!\n\n(Auf der Dschungel-Oberfläche gefangen)", + "Quest_Fishron": "Der Legende nach gibt es ein mächtiges Wesen namens Fischrache! Teils Schwein, teils Drache und teils FISCH! Angeblich hängt er in den gefrorenen unterirdischen Seen im kältesten Teil der Welt ab! Ich werd da ganz bestimmt nicht hingehen, aber DU wirst ihn für mich fangen und dafür sorgen, dass er mir in die Hände fällt! Ich freu mich ja so!\n\n(Gefangen in der Untergrund-Tundra)", + "Quest_InfectedScabbardfish": "Ein ziemlich langer Fisch, der wie eine Schwertscheide aussieht, schwimmt in den brackigen Gewässern des Verderbens! Er sieht aus wie Ebenstein, also wirst du genau hinsehen müssen! Jawohl, DU! Du wirst ihn fangen, nicht ich!\n\n(Gefangen im Verderben)", + "Quest_Mudfish": "Pass auf, wo du hintrittst, wenn du durch die Dschungelgewässer watest! Wieso? Nein, nicht, weil ich Angst hätte, dass dich die Piranhas fressen könnten. Weil ich befürchte, dass du auf meinen Lieblingsfisch trittst, den Schlammfisch! Außerdem hätte ich gern, dass du mir einen als Haustier mitbringst!\n\n(Im Dschungel gefangen)", + "Quest_TropicalBarracuda": "Piranhas und Haie sind hässlich! Soooo hässlich! Wusstest du, dass es einen Fisch gibt, der wunderschön aussieht, und der dir trotzdem das Gesicht wegfressen kann? Ich würde übrigens 2 Platinmünzen springen lassen, um das zu sehen ... Wie auch immer, du gehst einen für mich fangen. Sorg nur dafür, dass ich ihn habe, bevor du dein Gesicht verlierst!\n\n(Auf der Dschungel-Oberfläche gefangen)", + "Quest_TundraTrout": "Fragst du dich auch manchmal, warum die Seen an der Oberfläche der verschneiten {WorldName} niemals zufrieren? Ich nicht. Die Fische, jedoch, frieren ein! Ein Fisch aus Eis wäre ein tolles Opfer für den großen und mächtigen {Angler}! Geh, mein getreuer Untertan, und bringe mir eiligst besagte Tundraforelle!\n\n(Gefangen in der Oberflächen-Tundra)" + }, + "AnglerChatter": { + "Chatter_1": "Warum weigert sich {Bartender}, mir Bier zu verkaufen? Ich will auch was davon! So ein Stinkstiefel!" + }, + "BartenderChatter": { + "Chatter_1": "Mach doch nicht so ein bierernstes Gesicht! Kapierst du? Bierernst? Nein?", + "Chatter_10": "Glaubst du, dass {Steampunker} noch eine zweite davon hat? Ich kenne eine Hexe, die sowas gern hätte.", + "Chatter_11": "Kein Wunder, dass {Demolitionist} ständig in so viele Unfälle verwickelt ist. Du kannst dir nicht vorstellen, wie viel Bier er von mir kauft.", + "Chatter_12": "Normalerweise bin ich kein Fan von GOblins, aber {GoblinTinkerer} scheint ganz okay zu sein.", + "Chatter_13": "{?Day}Hat jemand gesehen, wo die Dryade hin ist?", + "Chatter_14": "{?!Day}Echt still hier draußen. Etwas zu still ...", + "Chatter_15": "{?!Day}Schau bei mir vorbei und mach deinen Job.", + "Chatter_16": "{?BloodMoon}Weißt du, wo ich herkomme, ist ein Blutmond nur eine Ausrede, um etwas frische Luft zu schnappen.", + "Chatter_17": "{?MoonLordDefeated}Mondherr? Meinst du nicht den Abyssherrn?", + "Chatter_18": "{?HardMode}Ich kenne einen Lavabeschwörer in der Unterwelt, der echt gerne einen Höllenstein hätte.", + "Chatter_19": "{?Homeless}Kennst du einen guten Ort zum Niederlassen? Würde hier echt gerne eine Bar aufmachen.", + "Chatter_2": "Sie sagen, du wärst stark. Ha, ich weiß, wie echt Stärke aussieht. Mal sehen, was du drauf hast.", + "Chatter_3": "Wo ich herkomme, gibt es nur Rootbeer.", + "Chatter_4": "Das ist schon ein großer Unterschied zu dem ständigen Tischewischen.", + "Chatter_5": "Das Leben ist eine Herausforderung, wenn man einfach besser ist als alle anderen.", + "Chatter_6": "Was mach ich hier bloß ...", + "Chatter_7": "Viel Beharrlichkeit und ein kleines Bisschen Glück bringt einen weit ...", + "Chatter_8": "Hast du hier irgendwelche Mebur gesehen?", + "Chatter_9": "{Dryad} scheint nett zu sein. Ich sollte sie her holen." + }, + "BartenderHelpText": { + "Help_1": "Du solltest dir wirklich die besonderen Verteidigungsartefakte ansehen, die ich im Angebot habe. Allerdings nur, wenn du Verteidigermedaillen hast!", + "Help_10": "Wenn du die Invasion erfolgreich zurückschlägst, erhältst du mehr Verteidigermedaillen, mit denen du dann bei mir mehr Artefakte und andere besondere Belohnungen kaufen kannst!", + "Help_11": "Außerdem habe ich Gerüchte gehört, dass die Macht der Artefakte verstärkt werden kann, wenn du die Armee des Alten besiegst. Vielleicht kann man sie dann sogar jederzeit nach Belieben nutzen?", + "Help_2": "Mit den Artefakten kannst du Fallen und Verteidigungstürme erschaffen. Dazu brauchst du allerdings etherisches Mana. Das ist eine besondere Art von Energie, die nur Mitglieder der Armee des Alten haben!", + "Help_3": "Die Armee des Alten herauszufordern ist nicht schwer. Sie wird von der Macht der Eternia-Kristalle angezogen. Damit kannst du sie locken.", + "Help_4": "Wenn du einen Eternia-Kristall aufstellen willst, brauchst du den Kristall und einen Ständer. Und wie es das Schicksal will, habe ich beides!", + "Help_5": "Du solltest den Eternia-Kristallständer auf einem offenen, flachen Gebiet aufstellen. Die vielen Mauern und das ganze Zeug machen es schwer, ihn zu beschützen!", + "Help_6": "Sobald der Ständer steht, musst du einfach nur mit einem Eternia-Kristall in der Hand damit interagieren und dich auf den Kampf vorbereiten!", + "Help_7": "Aber natürlich darfst du nicht zulassen, dass die Armee des Alten den Eternia-Kristall vernichtet! Das hätte schreckliche Konsequenzen für meine Heimatwelt Etheria!", + "Help_8": "Du kannst für 10 etherische Mana Verteidigungen aufstellen. Sobald die stehen, gibt der Eternia-Kristall etwas von seinem Mana ab. Oder du kannst einfach Feinde besiegen, um mehr davon zu erhalten.", + "Help_9": "Mit der Hilfe der Verteidigung musst du mehrere Wellen der Eindringlinge abhalten, denn sie wollen dich und den Kristall vernichten." + }, + "BartenderNames": { + "Name_1": "Ted", + "Name_10": "Javahawk", + "Name_11": "Elandrian", + "Name_12": "Driscan", + "Name_13": "Iamisom", + "Name_14": "Blacksmith", + "Name_15": "Dani Moo", + "Name_16": "Paddy", + "Name_2": "Barkeep", + "Name_3": "Jerry", + "Name_4": "Bill", + "Name_5": "Ernest", + "Name_6": "William", + "Name_7": "Dale", + "Name_8": "Bruce", + "Name_9": "Moe" + }, + "CyborgChatter": { + "Chatter_1": "{Bartender} sagt, ich erinnere ihn an eine gewisse „EV2“. Vielleicht sollte ich die mal besuchen." + }, + "GoblinTinkererChatter": { + "Chatter_1": "Weißt du, diese etherischen Goblins sind ganz anders als mein Volk. Ein ganz wilder Haufen. Nicht, dass meine Leute besser wären ..." + }, + "GuideHelpText": { + "Help_1063": "Normalerweise würde ich dir ja alles mögliche über die Armee des Alten erzählen, aber vermutlich solltest du lieber {Bartender} fragen." + }, + "MechanicChatter": { + "Chatter_1": "{Bartender} hat mir ein Rootbeer angeboten. Ich hab ihm gesagt, es soll es mir in einem eckigen Becher geben." + }, + "NurseChatter": { + "Chatter_1": "Ich bitte immer um Wein, aber {Bartender} gibt mir ständig nur Bierkrüge." + }, + "PirateChatter": { + "Chatter_1": "Wurde auch Zeit, dass es hier einen Barkeeper gibt! Mein Rum ist fast leer!" + }, + "StylistChatter": { + "Chatter_1": "Ich habe {Bartender} einen kostenlosen Schnitt angeboten, aber er wollte nicht. Immerhin hätte er mich was mit seinem Bart machen lassen können!" + }, + "TownNPCHousingFailureReasons": { + "HoleInWallIsTooBig": "In diesem Zimmer fehlt eine Wand", + "RoomCheckStartedInASolidTile": "Das ist ein fester Block!", + "RoomIsTooBig": "Dieser Raum ist zu groß", + "RoomIsTooSmall": "Dieser Raum ist zu klein", + "TooCloseToWorldEdge": "We need better text for this!!!" + } +} \ No newline at end of file diff --git a/Localization/Content/en-US.json b/Localization/Content/en-US.json new file mode 100644 index 0000000..9991e17 --- /dev/null +++ b/Localization/Content/en-US.json @@ -0,0 +1,2653 @@ +{ + "Error": { + "Error": "Error", + "LaunchFromSteam": "Please launch the game from your Steam client.", + "ServerCrash": "Server crash: {0}\n{1}\n\nPlease send crashlog.txt to support@terraria.org", + "LoadFailed": "Load failed!", + "LoadFailedNoBackup": "Load failed! No backup found.", + "InvalidLobbyFlag": "-lobby flag used without \"{0}\" or \"{1}\". Ignoring it.", + "CaptureError": "An error occurred while saving the capture. Attempting again...", + "UnableToCapture": "Unable to capture.", + "UnableToWritePreferences": "Unable to write file at: {0}", + "UnableToLoadWorld": "Unable to load world:", + "BadHeaderBufferOverflow": "Bad header lead to a read buffer overflow.", + "ExceptionNormal": " Exception normal: {0}", + "TriedToRunServerTwice": "Tried to run two servers on the same PC", + "DataSentAfterConnectionLost": "Tried to send data to a client after losing connection", + "NetMessageError": "Error on message {0}" + }, + "Key": { + "UP": "UP", + "DOWN": "DOWN" + }, + "Language": { + "English": "English", + "Spanish": "Español (Spanish)", + "French": "Français (French)", + "Italian": "Italiano (Italian)", + "Russian": "Русский (Russian)", + "Chinese": "简体中文 (Simplified Chinese)", + "Portuguese": "Português brasileiro (Brazilian Portuguese)", + "German": "Deutsch (German)", + "Polish": "Polski (Polish)" + }, + "CLI": { + "Server": "Terraria Server {0}", + "AvailableCommands": "Available commands:", + "Help_Command": "help", + "Help_Description": "Displays a list of commands.", + "Playing_Command": "playing", + "Playing_Description": "Shows the list of players.", + "Clear_Command": "clear", + "Clear_Description": "Clear the console window.", + "Exit_Command": "exit", + "Exit_Description": "Shutdown the server and save.", + "ExitNoSave_Command": "exit-nosave", + "ExitNoSave_Description": "Shutdown the server without saving.", + "Save_Command": "save", + "Save_Description": "Save the game world.", + "Kick_Command": "kick", + "Kick_Example": "kick ", + "Kick_Description": "Kicks a player from the server.", + "Ban_Command": "ban", + "Ban_Example": "ban ", + "Ban_Description": "Bans a player from the server.", + "Password_Command": "password", + "Password_Description": "Show password.", + "SetPassword_Command": "password", + "SetPassword_Example": "password ", + "SetPassword_Description": "Change password.", + "Version_Command": "version", + "Version_Description": "Print version number.", + "Time_Command": "time", + "Time_Description": "Display game time.", + "Port_Command": "port", + "Port_Description": "Print the listening port.", + "MaxPlayers_Command": "maxplayers", + "MaxPlayers_Description": "Print the max number of players.", + "Say_Command": "say", + "Say_Example": "say ", + "Say_Description": "Send a message.", + "MOTD_Command": "motd", + "MOTD_Description": "Print MOTD.", + "SetMOTD_Command": "motd", + "SetMOTD_Example": "motd ", + "SetMOTD_Description": "Change MOTD.", + "Dawn_Command": "dawn", + "Dawn_Description": "Change time to dawn.", + "Noon_Command": "noon", + "Noon_Description": "Change time to noon.", + "Dusk_Command": "dusk", + "Dusk_Description": "Change time to dusk.", + "Midnight_Command": "midnight", + "Midnight_Description": "Change time to midnight.", + "Settle_Command": "settle", + "Settle_Description": "Settle all water.", + "Seed_Command": "seed", + "Seed_Description": "Displays the world seed.", + "FPS_Command": "fps", + "WaterIsAlreadySettling": "Water is already settling", + "Time": "Time: {0}", + "PlayerLimit": "Player limit: {0}", + "Port": "Port: {0}", + "NoPlayers": "No players connected.", + "OnePlayerConnected": "1 player connected.", + "PlayersConnected": "{0} players connected.", + "NoMOTD": "Welcome to {0}!", + "MOTD": "MOTD: {0}", + "NoPassword": "No password set.", + "Password": "Password: {0}", + "PasswordDisabled": "Password disabled.", + "PasswordSet": "Password: {0}", + "Say_Usage": "Usage: say ", + "ServerMessage": " {0}", + "Kick_Usage": "Usage: kick ", + "KickMessage": "Kicked from server.", + "Ban_Usage": "Usage: ban ", + "BanMessage": "Banned from server.", + "InvalidCommand": "Invalid command.", + "SetInitialPort": "Server port (press enter for 7777): ", + "AutomaticPortForward": "Automatically forward port? (y/n): ", + "Yes": "yes", + "ShortYes": "y", + "No": "no", + "ShortNo": "n", + "ListeningOnPort": "Listening on port {0}", + "HelpHint": "Type 'help' for a list of commands.", + "ChooseWorld": "Choose World: ", + "NewWorld_Description": "New World", + "NewWorld_Command": "n", + "DeleteWorld_Description": "Delete World", + "DeleteWorld_Command": "d", + "DeleteWorld_Example": "d ", + "DeleteConfirmation": "Really delete {0}?", + "ChooseSize": "Choose size: ", + "ChooseDifficulty": "Choose difficulty: ", + "ChooseEvil": "Choose world evil: ", + "Random": "Random", + "Corrupt": "Corrupt", + "Crimson": "Crimson", + "EnterWorldName": "Enter world name: ", + "EnterServerPassword": "Server password (press enter for none): ", + "ClientWasBooted": "{0} was booted: {1}", + "ServerStarted": "Server started", + "EnterSeed": "Enter Seed (Leave Blank For Random):", + "NoValidSeed": "This world was generated in an older version that did not support seeds.", + "DisplaySeed": "World Seed: {0}", + "SetInitialMaxPlayers": "Max players (press enter for 16): ", + "ServerIsFull": "This server is full right now, please try again later.", + }, + "UI": { + "Effects": "Effects", + "LoadingCode": "Loading:", + "Favorite": "Favorite", + "Unfavorite": "Unfavorite", + "MoveToCloud": "Move to cloud", + "MoveOffCloud": "Move off cloud", + "Play": "Play", + "Delete": "Delete", + "Softcore": "Classic", + "Mediumcore": "Mediumcore", + "Hardcore": "Hardcore", + "Master": "Master", + "Expert": "Expert", + "Normal": "Classic", + "Creative": "Journey", + "CreativeDescriptionPlayer": "Journey characters start with extra equipment. Can only be played on Journey worlds.", + "WorldSizeFormat": "{0} World", + "WorldCreatedFormat": "Created: {0}", + "SelectWorld": "Select World", + "SelectPlayer": "Select Player", + "Back": "Back", + "New": "New", + "EnterMessage": "Enter message:", + "EnterNewName": "Enter new name:", + "Achievements": "Achievements", + "Keybindings": "Keybindings", + "Save": "Save", + "Submit": "Submit", + "Cancel": "Cancel", + "SpaceButton": "Space", + "EnterButton": "Enter", + "RestoreButton": "Restore", + "WorldSizeSmall": "Small", + "WorldSizeMedium": "Medium", + "WorldSizeLarge": "Large", + "WorldSizeUnknown": "Unknown", + "NormalDescriptionFlavor": "Your Adventure Begins...", + "NormalDescription": "(The Standard Terraria Experience)", + "ExpertDescriptionFlavor": "Fortune & Glory, Kid.", + "ExpertDescription": "(Far Greater Difficulty & Loot)", + "More": "more", + "CopySeed": "Copy Seed: {0}", + "SeedCopied": "Seed Copied", + "EnterSeed": "Enter Seed (Leave Blank For Random)", + "BartenderHelp": "Eternia Crystal", + "ZoomIn": "{$LegacyMenu.168}", + "ZoomOut": "{$LegacyMenu.169}", + "Ellipsis": "...", + "ResourcePacks": "Texture Packs", + "LightMode_Color": "{$LegacyMenu.55}", + "LightMode_White": "{$LegacyMenu.56}", + "LightMode_Retro": "{$LegacyMenu.57}", + "LightMode_Trippy": "{$LegacyMenu.58}", + "CopyColorToClipboard": "Copy color code to clipboard", + "PasteColorFromClipboard": "Paste color code from clipboard", + "RandomizeColor": "Randomize color", + "RandomizePlayer": "Randomize player", + "CopyPlayerToClipboard": "Copy player template to clipboard", + "PastePlayerFromClipboard": "Paste player template from clipboard", + "PlayerNameSlot": "Name:", + "PlayerEmptyName": "{$Net.EmptyName}", + "Create": "Create", + "SelectMapBorder": "Minimap Border: {0}", + "MinimapFrame_Default": "Default", + "MinimapFrame_Golden": "Golden", + "MinimapFrame_Remix": "Remix", + "MinimapFrame_Sticks": "Sticks", + "MinimapFrame_StoneGold": "StoneGold", + "MinimapFrame_TwigLeaf": "TwigLeaf", + "MinimapFrame_Leaf": "Leaf", + "MinimapFrame_Retro": "Retro", + "MinimapFrame_Valkyrie": "Valkyrie", + "SelectHealthStyle": "Health and Mana Style: {0}", + "HealthManaStyle_Default": "Classic", + "HealthManaStyle_New": "Fancy", + "HealthManaStyle_HorizontalBars": "Bars", + "SpawnPoint": "Spawn", + "SpawnBed": "Home", + "EmoteCategoryGeneral": "General", + "EmoteCategoryRPS": "Rock, Paper, Scissors!", + "EmoteCategoryItems": "Items", + "EmoteCategoryBiomesAndEvents": "Nature & Weather", + "EmoteCategoryTownNPCs": "Town", + "EmoteCategoryCritters": "Critters & Monsters", + "EmoteCategoryBosses": "Dangers", + "ToggleBank4VacuumIsOn": "Void Pull: On", + "ToggleBank4VacuumIsOff": "Void Pull: Off", + "Author": "by {0}", + "WorldCreationName": "Name:", + "WorldCreationNameEmpty": "", + "WorldCreationRandomizeNameDescription": "Randomize your world's name.", + "WorldCreationSeed": "Seed:", + "WorldCreationSeedEmpty": "", + "WorldCreationRandomizeSeedDescription": "Randomize your world's seed.", + "WorldCreationSize": "Size:", + "WorldCreationDifficulty": "Difficulty:", + "WorldCreationEvil": "Evil:", + "WorldCreationNumberOfWorlds": "# of Worlds:", + "WorldCreationNumberOfWorldsDescription": "Number of worlds to generate at once", + "ItemCannotBePlacedInsideItself": "Placing into itself will be blocked", + "WorldDescriptionName": "Give your world a name! Choose carefully, you cannot change it later!", + "WorldDescriptionSeed": "The DNA marker that defines your world's specific shape and traits.", + "WorldDescriptionSizeSmall": "Ideal for a quick, single player experience.", + "WorldDescriptionSizeMedium": "Bigger and better for prolonged exploration, or bringing a friend.", + "WorldDescriptionSizeLarge": "Super-sized for long term progression and multiple players.", + "WorldDescriptionCreative": "With great power comes great responsibility (Unearth your creativity)", + "WorldDescriptionNormal": "Your Adventure Begins... (The Standard Terraria Experience)", + "WorldDescriptionExpert": "Fortune & Glory, Kid. (Far Greater Difficulty & Loot)", + "WorldDescriptionMaster": "Game over man, game over! (Brutally hard, for the truly brave)", + "WorldDescriptionEvilRandom": "Let nature decide whether corruption or crimson infects your world.", + "WorldDescriptionEvilCorrupt": "Disease-like corruption is guaranteed to be present in your world.", + "WorldDescriptionEvilCrimson": "Macabre, grotesque crimson is guaranteed to be present in your world.", + "WorldDescriptionDefault": "Please choose how your world will be built with the options above.", + "SmartDoorsDisabled": "Smart Doors: Disabled", + "SmartDoorsEnabled": "Smart Doors: Enabled", + "SmartDoorsGamepad": "Smart Doors: Gamepad Only", + "CannotDeleteFavorited": "Cannot Delete (Favorited)", + "NPCCheckHappiness": " Happiness", + "QuickUseItem": "Quick Use", + "TilesSwayInWindOn": "Windy Environment: Enabled", + "TilesSwayInWindOff": "Windy Environment: Disabled", + "Info": "Info", + "Version": "Version {0}", + "AvailableResourcePacksTitle": "Available Packs ({Amount})", + "EnabledResourcePacksTitle": "Enabled Packs ({Amount})", + "OffsetTexturePackPriorityUp": "Move Frontwards", + "OffsetTexturePackPriorityDown": "Move Backwards", + "EnableTexturePack": "Enable", + "DisableTexturePack": "Disable", + "SeeTexturePackInfo": "View Pack Info", + "PlayerIsNotCreativeAndWorldIsCreative": "Only Journey characters may enter a Journey world.", + "PlayerIsCreativeAndWorldIsNotCreative": "Only Non-Journey characters may enter a Non-Journey world.", + "PetTheAnimal": "Pet", + "HoverControlSettingIsClick": "Hover Controls: Click", + "HoverControlSettingIsHold": "Hover Controls: Hold", + "ToggleCreativeMenu": "Toggle Journey Powers", + "WorldCannotBeLoadedBecauseItHasAnInvalidGameMode": "Error: This world has an invalid data!", + "WorldGenEasterEgg_GeneratingBees": "Generating bees" + }, + "Net": { + "ClientStatusComplete": "({0}) {1} {2}: Complete!", + "ClientConnecting": "{0} is connecting...", + "ClientSendingData": "({0}) {1} is sending player data...", + "ClientRequestedWorldInfo": "({0}) {1} requested world information", + "ClientPlaying": "({0}) {1} is playing", + "WaitingForClients": "Waiting for clients...", + "ClientsConnected": "{0} clients connected", + "CheatingProjectileSpam": "Cheating attempt detected: Projectile spam", + "CheatingTileSpam": "Cheating attempt detected: Add tile spam", + "CheatingTileRemovalSpam": "Cheating attempt detected: Remove tile spam", + "CheatingLiquidSpam": "Cheating attempt detected: Liquid spam", + "CheatingInvalid": "Cheating attempt detected: Invalid kick-out", + "ServerAutoShutdown": "Local player left. Autoshutdown starting.", + "ConnectingTo": "Connecting to {0}", + "IsReceivingTileData": "is receiving tile data", + "LostConnection": "Lost connection", + "FoundServer": "Found server", + "SendingPlayerData": "Sending player data...", + "RequestingWorldInformation": "Requesting world information", + "RequestingTileData": "Requesting tile data", + "StatusComplete": "{0}: Complete!", + "NameTooLong": "Name is too long.", + "EmptyName": "Empty name.", + "PlayerIsNotCreativeAndWorldIsCreative": "Only Journey characters may enter a Journey server.", + "PlayerIsCreativeAndWorldIsNotCreative": "Only Non-Journey characters may enter a Non-Journey server.", + "CannotTeleportToPylonBecausePlayerIsNotNearAPylon": "You are not close enough to a pylon to teleport with the pylon network", + "CannotTeleportToPylonBecauseNotEnoughNPCs": "There are not enough villagers near that pylon to access it", + "CannotTeleportToPylonBecauseNotEnoughNPCsAtCurrentPylon": "There are not enough villagers near the current pylon", + "CannotTeleportToPylonBecauseThereIsDanger": "Defeat the current threat before you can use the pylon network!", + "CannotTeleportToPylonBecauseNotMeetingBiomeRequirements": "This pylon is not in the correct biome to use", + "CannotTeleportToPylonBecauseAccessingLihzahrdTempleEarly": "Ancient forces prevent you from accessing this location . . .", + + }, + "GameUI": { + "Storm": "Storm", + "HeavyRain": "Heavy Rain", + "Rain": "Rain", + "LightRain": "Light Rain", + "Overcast": "Overcast", + "MostlyCloudy": "Mostly Cloudy", + "Cloudy": "Cloudy", + "PartlyCloudy": "Partly Cloudy", + "Clear": "Clear", + "WestWind": " ({0} mph W)", + "EastWind": " ({0} mph E)", + "FullMoon": "Full Moon", + "WaningGibbous": "Waning Gibbous", + "ThirdQuarter": "Third Quarter", + "WaningCrescent": "Waning Crescent", + "NewMoon": "New Moon", + "WaxingCrescent": "Waxing Crescent", + "FirstQuarter": "First Quarter", + "WaxingGibbous": "Waxing Gibbous", + "FishingWarning": "Warning!", + "FishingPower": "{0} Fishing Power", + "NoTreasureNearby": "No treasure nearby", + "OreDetected": "{0} detected nearby!", + "NoRareCreatures": "No rare creatures nearby", + "NoEnemiesNearby": "No enemies nearby", + "OneEnemyNearby": "1 enemy nearby!", + "EnemiesNearby": "{0} enemies nearby!", + "NoKillCount": "Kill count unavailable", + "NoDPS": "N/A", + "DPS": "{0} damage per second", + "Speed": "{0} mph", + "CompassEast": "{0}' East", + "CompassWest": "{0}' West", + "CompassCenter": "Center", + "LayerUnderworld": "Underworld", + "LayerCaverns": "Caverns", + "LayerUnderground": "Underground", + "LayerSurface": "Surface", + "LayerSpace": "Space", + "DepthLevel": "Level", + "Depth": "{0}'", + "WireModeForced": "Mechanical Display: Forced", + "WireModeNormal": "Mechanical Display: Normal", + "RulerOn": "Ruler On", + "RulerOff": "Ruler Off", + "MechanicalRulerOn": "Mechanical ruler on", + "MechanicalRulerOff": "Mechanical ruler off", + "PaintSprayerOn": "Paint sprayer on", + "PaintSprayerOff": "Paint sprayer off", + "ActuationDeviceOn": "Actuation device on", + "ActuationDeviceOff": "Actuation device off", + "BlockReplacerOn": "Block swap on", + "BlockReplacerOff": "Block swap off", + "SettingsMenu": "Settings Menu", + "Buy": "Buy", + "BuyWithValue": "Buy ({0})", + "Cancel": "Cancel", + "Change": "Change", + "Expert": "Expert", + "Master": "Master", + "NotEnoughWater": "Not Enough Water!", + "FullFishingPower": "{0} ({1}%) Fishing Power", + "PrecentFishingPower": "{0}% fishing power", + "BaitRequired": "Requires bait to catch fish", + "BaitPower": "{0}% bait power", + "HairStyle": "Hair Style", + "CraftingWindow": "Crafting Window", + "QuickStackToNearby": "Quick Stack to Nearby Chests", + "SortInventory": "Sort Inventory", + "PlayerDistance": "({0} ft)", + "Bright": "Bright", + "Normal": "Classic", + "Faded": "Faded", + "Hidden": "Hidden", + "WaveQuality": "Waves Quality: {0}", + "HeatDistortion": "Heat Distortion: {0}", + "Enabled": "Enabled", + "Disabled": "Disabled", + "StormEffects": "Storm Effects: {0}", + "QualityHigh": "High", + "QualityMedium": "Medium", + "QualityLow": "Low", + "QualityOff": "Off", + + "GameZoom": "Zoom: {0}% ({1}%)", + "UIScale": "UI Scale: {0}% ({1}%)", + "ZoomCategory": "Zoom", + "Misc": "Misc", + "Gameplay": "Gameplay", + "LightingUpdateEveryFrameOn": "Rapid Lighting On", + "LightingUpdateEveryFrameOff": "Rapid Lighting Off", + "MapScale": "Map Scale: {0}%", + "Emote": "Open Emotes Window", + "HoverTextBoxesOn": "Hover Text Boxes On", + "HoverTextBoxesOff": "Hover Text Boxes Off", + "Bestiary": "Open Bestiary", + "TimeAtMorning": "AM", + "TimePastMorning": "PM", + "PlayerLifeMax": " HP", + "PlayerManaMax": " MP", + "NotificationsOptionsCategory": "Notifications", + "ClearAllNotifications": "Clear All", + "OpenFileFolder": "{$LegacyInterface.110}", + "PotionOfReturnExitPortal": "Return Portal Exit", + "PotionOfReturnHomePortal": "Return Portal Entrance", + "Music": "Music", + "TorchTypeSwapperOn": "Biome torch swap on", + "TorchTypeSwapperOff": "Biome torch swap off", + }, + "Controls": { + "LeftClick": "Left Click", + "RightClick": "Right Click" + }, + "Social": { + "StatusInGame": "Playing online.", + "StatusJoining": "Joining game.", + "JoiningFriend": "Joining {0}...", + "Joining": "Joining..." + }, + "Game": { + "Wave": "Wave: {0}", + "FirstWave": "First Wave", + "FinalWave": "Final Wave", + "InvasionWave_Type1": "{0}: {1}", + "InvasionWave_Type2": "{0}: {1}, and {2}", + "InvasionWave_Type3": "{0}: {1}, {2}, and {3}", + "InvasionWave_Type4": "{0}: {1}, {2}, {3}, and {4}", + "InvasionWave_Type5": "{0}: {1}, {2}, {3}, {4}, and {5}", + "InvasionWave_Type6": "{0}: {1}, {2}, {3}, {4}, {5}, and {6}", + "InvasionWave_Type7": "{0}: {1}, {2}, {3}, {4}, {5}, {6}, and {7}", + "InvasionWave_Type8": "{0}: {1}, {2}, {3}, {4}, {5}, {6}, {7}, and {8}", + "BallBounceResult": "{0} was hit {1} times before touching the ground!", + "JoinGreeting": "Current players: {0}.", + "BedObstructed": "Your bed is obstructed.", + "PvPFlag": "(PvP)", + "DroppedCoins": "dropped {0}", + "RespawnInPrefix": "", + "RespawnInSuffix": "{0}", + "InvasionPoints": "{0} points", + "WaveMessage": "Wave {0}: {1}", + "WaveCleared": "Cleared {0}", + "TeleportTo": "Teleport to {0}", + "HasTeleportedTo": "{0} has teleported to {1}", + "Time": "Time: {0}", + "NPCTitle": "{0} the {1}", + "ReservedForNPC": "Reserved for {0}", + "PlayerDeathTime": "{0} died {1} ago", + "SpawnPointRemoved": "Spawn point removed!", + "SpawnPointSet": "Spawn point set!", + "RedWires": "Red Wires", + "BlueWires": "Blue Wires", + "GreenWires": "Green Wires", + "YellowWires": "Yellow Wires", + "Actuators": "Actuators", + "EnemiesDefeatedAnnouncement": "The {0}th {1} has been defeated!", + "EnemiesDefeatedByAnnouncement": "{0} has defeated the {1}th {2}!", + "HouseMissing_1": "This house is missing {0}.", + "HouseMissing_2": "This house is missing {0} and {1}.", + "HouseMissing_3": "This house is missing {0}, {1}, and {2}.", + "HouseMissing_4": "This house is missing {0}, {1}, {2}, and {3}.", + "HouseLightSource": "a light source", + "HouseDoor": "a door", + "HouseTable": "a table", + "HouseChair": "a chair", + "BirthdayParty_1": "Looks like {0} is throwing a party", + "BirthdayParty_2": "Looks like {0} & {1} are throwing a party", + "BirthdayParty_3": "Looks like {0}, {1}, and {2} are throwing a party", + "BallBounceResultGolf_Single": "{0} sunk the {1} in {2} stroke!", + "BallBounceResultGolf_Plural": "{0} sunk the {1} in {2} strokes!" + }, + "Enemies": { + "TheTwins": "The Twins", + "MoonLord": "Moon Lord" + }, + "Friends": { + "TownCat": "Town Cat", + "TownDog": "Town Dog", + "TownBunny": "Town Bunny" + }, + "DeathTextGeneric": { + "Slain": "{0} was slain", + "Eviscerated": "{0} was eviscerated", + "Murdered": "{0} was murdered", + "FaceTornOff": "{0}'s face was torn off", + "EntrailsRippedOut": "{0}'s entrails were ripped out", + "Destroyed": "{0} was destroyed", + "SkullCrushed": "{0}'s skull was crushed", + "Massacred": "{0} got massacred", + "Impaled": "{0} got impaled", + "TornInHalf": "{0} was torn in half", + "Decapitated": "{0} was decapitated", + "ArmTornOff": "{0} let their arms get torn off", + "InnardsBecameOutards": "{0} watched their innards become outards", + "Dissected": "{0} was brutally dissected", + "ExtremitiesDetached": "{0}'s extremities were detached", + "Mangled": "{0}'s body was mangled", + "Ruptured": "{0}'s vital organs were ruptured", + "PileOfFlesh": "{0} was turned into a pile of flesh", + "Removed": "{0} was removed from {1}", + "Snapped": "{0} got snapped in half", + "Cut": "{0} was cut down the middle", + "Chopped": "{0} was chopped up", + "Plead": "{0}'s plea for death was answered", + "Ripped": "{0}'s meat was ripped off the bone", + "Flailing": "{0}'s flailing about was finally stopped", + "HeadRemoved": "{0} had their head removed" + }, + "DeathSource": { + "Player": "{0} by {1}'s {2}.", + "NPC": "{0} by {1}.", + "Projectile": "{0} by {1}." + }, + "DeathText": { + "Suffocated": "{0} couldn't breathe.", + "Poisoned": "{0} couldn't find the antidote.", + "Burned": "{0} couldn't put the fire out.", + "Electrocuted": "{0} couldn't contain the watts.", + "TriedToEscape": "{0} tried to escape.", + "WasLicked": "{0} was licked.", + "Teleport_1": "{0} didn't materialize", + "Teleport_2_Male": "{0}'s legs appeared where his head should be.", + "Teleport_2_Female": "{0}'s legs appeared where her head should be.", + "Slain": "{0} was slain...", + "Stabbed": "{0} was stabbed.", + "Default": "{0}.", + "Fell_1": "{0} fell to their death.", + "Fell_2": "{0} didn't bounce.", + "Drowned_1": "{0} forgot to breathe.", + "Drowned_2": "{0} is sleeping with the fish.", + "Drowned_3": "{0} drowned.", + "Drowned_4": "{0} is shark food.", + "Lava_1": "{0} got melted.", + "Lava_2": "{0} was incinerated.", + "Lava_3": "{0} tried to swim in lava.", + "Lava_4": "{0} likes to play in magma.", + "Petrified_1": "{0} shattered into pieces.", + "Petrified_2": "{0} can't be put back together again.", + "Petrified_3": "{0} needs to be swept up.", + "Petrified_4": "{0} just became another dirt pile.", + "Inferno": "{0} was consumed by the inferno." + }, + "Misc": { + "ForceWaterSettling": "Forcing water to settle.", + "WaterSettled": "Water has been settled.", + "ResolutionChanged": "Resolution changed to: {0}x{1}.", + "ShortDays": "d", + "ShortHours": "h", + "ShortMinutes": "m", + "ShortSeconds": "s", + "CombatBookUsed": "The book's knowledge empowers your villagers!", + "Fruit": "Fruit", + "CanBePlacedInVanity": "Can be worn in vanity slots", + "StartedVictoryXmas": "The spirit of Christmas spreads cheer...", + "EndedVictoryXmas": "The spirit of Christmas fades...", + "StartedVictoryHalloween": "The spirit of Halloween penetrates the air...", + "EndedVictoryHalloween": "The spirit of Halloween rests...", + "LicenseCatUsed": "The license teleports away to the cat delivery service...", + "LicenseDogUsed": "The license teleports away to the dog delivery service...", + "LicenseBunnyUsed": "The license teleports away to the bunny delivery service..." + }, + "Currency": { + "Platinum": "Platinum", + "Gold": "Gold", + "Silver": "Silver", + "Copper": "Copper", + "DefenderMedals": "Defender Medals" + }, + "Achievements": { + "ChallengerCategory": "Challenger", + "CollectorCategory": "Collector", + "ExplorerCategory": "Explorer", + "SlayerCategory": "Slayer", + "NoCategory": "None", + "Completed": "Achievement complete! {0}", + "TIMBER_Name": "Timber!!", + "TIMBER_Description": "Chop down your first tree.", + "BENCHED_Name": "Benched", + "BENCHED_Description": "Craft your first work bench.", + "NO_HOBO_Name": "No Hobo", + "NO_HOBO_Description": "Build a house suitable enough for your first town NPC, such as the guide, to move into.", + "OBTAIN_HAMMER_Name": "Stop! Hammer Time!", + "OBTAIN_HAMMER_Description": "Obtain your first hammer via crafting or otherwise.", + "OOO_SHINY_Name": "Ooo! Shiny!", + "OOO_SHINY_Description": "Mine your first nugget of ore with a pickaxe.", + "HEART_BREAKER_Name": "Heart Breaker", + "HEART_BREAKER_Description": "Discover and smash your first heart crystal underground.", + "HEAVY_METAL_Name": "Heavy Metal", + "HEAVY_METAL_Description": "Obtain an anvil made from iron or lead.", + "I_AM_LOOT_Name": "I Am Loot!", + "I_AM_LOOT_Description": "Discover a golden chest underground and take a peek at its contents.", + "STAR_POWER_Name": "Star Power", + "STAR_POWER_Description": "Craft a mana crystal out of fallen stars, and consume it.", + "HOLD_ON_TIGHT_Name": "Hold on Tight!", + "HOLD_ON_TIGHT_Description": "Equip your first grappling hook.", + "EYE_ON_YOU_Name": "Eye on You", + "EYE_ON_YOU_Description": "Defeat the Eye of Cthulhu, an ocular menace who only appears at night.", + "SMASHING_POPPET_Name": "Smashing, Poppet!", + "SMASHING_POPPET_Description": "Using explosives or your trusty hammer, smash a Shadow Orb or Crimson Heart in the evil parts of your world.", + "WORM_FODDER_Name": "Worm Fodder", + "WORM_FODDER_Description": "Defeat the Eater of Worlds, a massive worm who dwells in the corruption.", + "MASTERMIND_Name": "Mastermind", + "MASTERMIND_Description": "Defeat the Brain of Cthulhu, an enormous demon brain which haunts the creeping crimson.", + "WHERES_MY_HONEY_Name": "Where's My Honey?", + "WHERES_MY_HONEY_Description": "Discover a large bee's hive deep in the jungle.", + "STING_OPERATION_Name": "Sting Operation", + "STING_OPERATION_Description": "Defeat the Queen Bee, the matriarch of the jungle hives.", + "BONED_Name": "Boned", + "BONED_Description": "Defeat Skeletron, the cursed guardian of the dungeon.", + "DUNGEON_HEIST_Name": "Dungeon Heist", + "DUNGEON_HEIST_Description": "Steal a key from dungeon's undead denizens, and unlock one of their precious golden chests.", + "ITS_GETTING_HOT_IN_HERE_Name": "It's Getting Hot in Here", + "ITS_GETTING_HOT_IN_HERE_Description": "Spelunk deep enough to reach the molten underworld.", + "MINER_FOR_FIRE_Name": "Miner for Fire", + "MINER_FOR_FIRE_Description": "Craft a molten pickaxe using the hottest of materials.", + "STILL_HUNGRY_Name": "Still Hungry", + "STILL_HUNGRY_Description": "Defeat the Wall of Flesh, the master and core of the world who arises after a great, burning sacrifice.", + "ITS_HARD_Name": "It's Hard!", + "ITS_HARD_Description": "Unleash the ancient spirits of light and darkness across your world, enabling much stronger foes and showering the world with dazzling treasures (and rainbows!).", + "BEGONE_EVIL_Name": "Begone, Evil!", + "BEGONE_EVIL_Description": "Smash a demon or crimson altar with a powerful, holy hammer.", + "EXTRA_SHINY_Name": "Extra Shiny!", + "EXTRA_SHINY_Description": "Mine a powerful ore that has been newly blessed upon your world.", + "HEAD_IN_THE_CLOUDS_Name": "Head in the Clouds", + "HEAD_IN_THE_CLOUDS_Description": "Equip a pair of wings.", + "LIKE_A_BOSS_Name": "Like a Boss", + "LIKE_A_BOSS_Description": "Obtain a boss-summoning item.", + "BUCKETS_OF_BOLTS_Name": "Buckets of Bolts", + "BUCKETS_OF_BOLTS_Description": "Defeat the three nocturnal mechanical menaces: the Twins, the Destroyer, and Skeletron Prime.", + "DRAX_ATTAX_Name": "Drax Attax", + "DRAX_ATTAX_Description": "Craft a drax or pickaxe axe using hallowed bars, and the souls of the three mechanical bosses.", + "PHOTOSYNTHESIS_Name": "Photosynthesis", + "PHOTOSYNTHESIS_Description": "Mine chlorophyte, an organic ore found deep among the thickest of flora.", + "GET_A_LIFE_Name": "Get a Life", + "GET_A_LIFE_Description": "Consume a life fruit, which grows in the thick of subterranean jungle grass.", + "THE_GREAT_SOUTHERN_PLANTKILL_Name": "The Great Southern Plantkill", + "THE_GREAT_SOUTHERN_PLANTKILL_Description": "Defeat Plantera, the overgrown monstrosity of the jungle's depths.", + "TEMPLE_RAIDER_Name": "Temple Raider", + "TEMPLE_RAIDER_Description": "Breach the impenetrable walls of the jungle temple.", + "LIHZAHRDIAN_IDOL_Name": "Lihzahrdian Idol", + "LIHZAHRDIAN_IDOL_Description": "Defeat Golem, the stone-faced ritualistic idol of the lihzahrd tribe.", + "ROBBING_THE_GRAVE_Name": "Robbing the Grave", + "ROBBING_THE_GRAVE_Description": "Obtain a rare treasure from a difficult monster in the dungeon.", + "BIG_BOOTY_Name": "Big Booty", + "BIG_BOOTY_Description": "Unlock one of the dungeon's large, mysterious chests with a special key.", + "FISH_OUT_OF_WATER_Name": "Fish Out of Water", + "FISH_OUT_OF_WATER_Description": "Defeat Duke Fishron, mutant terror of the sea.", + "OBSESSIVE_DEVOTION_Name": "Obsessive Devotion", + "OBSESSIVE_DEVOTION_Description": "Defeat the Ancient Cultist, fanatical leader of the dungeon coven.", + "STAR_DESTROYER_Name": "Star Destroyer", + "STAR_DESTROYER_Description": "Defeat the four celestial towers of the moon.", + "CHAMPION_OF_TERRARIA_Name": "Champion of Terraria", + "CHAMPION_OF_TERRARIA_Description": "Defeat the Moon Lord.", + "BLOODBATH_Name": "Bloodbath", + "BLOODBATH_Description": "Survive a blood moon, a nocturnal event where the rivers run red and monsters swarm aplenty.", + "SLIPPERY_SHINOBI_Name": "Slippery Shinobi", + "SLIPPERY_SHINOBI_Description": "Defeat King Slime, the lord of all things slimy.", + "GOBLIN_PUNTER_Name": "Goblin Punter", + "GOBLIN_PUNTER_Description": "Triumph over a goblin invasion, a ragtag regiment of crude, barbaric, pointy-eared warriors and their shadowflame sorcerers.", + "WALK_THE_PLANK_Name": "Walk the Plank", + "WALK_THE_PLANK_Description": "Triumph over a pirate invasion, a group of pillagers from the sea out for your booty... and your life!", + "KILL_THE_SUN_Name": "Kill the Sun", + "KILL_THE_SUN_Description": "Survive a solar eclipse, a day darker than night filled with creatures of horror.", + "DO_YOU_WANT_TO_SLAY_A_SNOWMAN_Name": "Do You Want to Slay a Snowman?", + "DO_YOU_WANT_TO_SLAY_A_SNOWMAN_Description": "Triumph over the frost legion, a festive family of maniacal snowman mobsters.", + "TIN_FOIL_HATTER_Name": "Tin-Foil Hatter", + "TIN_FOIL_HATTER_Description": "Triumph over a martian invasion, when beings from out of this world come to scramble your brains and probe you in uncomfortable places.", + "BALEFUL_HARVEST_Name": "Baleful Harvest", + "BALEFUL_HARVEST_Description": "Reach the 15th wave of a pumpkin moon, where evil lurks among the autumn harvest.", + "ICE_SCREAM_Name": "Ice Scream", + "ICE_SCREAM_Description": "Reach the 15th wave of a frost moon, where the festive season quickly degrades into madness.", + "STICKY_SITUATION_Name": "Sticky Situation", + "STICKY_SITUATION_Description": "Survive the slime rain, where gelatinous organisms fall from the sky in droves.", + "REAL_ESTATE_AGENT_Name": "Real Estate Agent", + "REAL_ESTATE_AGENT_Description": "Have all possible town NPCs living in your world.", + "NOT_THE_BEES_Name": "Not the Bees!", + "NOT_THE_BEES_Description": "Fire a Bee Gun while wearing a full set of Bee Armor.", + "JEEPERS_CREEPERS_Name": "Jeepers Creepers", + "JEEPERS_CREEPERS_Description": "Stumble into a spider cavern in the underground.", + "FUNKYTOWN_Name": "Funkytown", + "FUNKYTOWN_Description": "Build or encounter a glowing mushroom field above the surface.", + "INTO_ORBIT_Name": "Into Orbit", + "INTO_ORBIT_Description": "You can only go down from here!", + "ROCK_BOTTOM_Name": "Rock Bottom", + "ROCK_BOTTOM_Description": "The only way is up!", + "MECHA_MAYHEM_Name": "Mecha Mayhem", + "MECHA_MAYHEM_Description": "Do battle against the Twins, the Destroyer, and Skeletron Prime simultaneously and emerge victorious.", + "GELATIN_WORLD_TOUR_Name": "Gelatin World Tour", + "GELATIN_WORLD_TOUR_Description": "Defeat every type of slime there is!", + "FASHION_STATEMENT_Name": "Fashion Statement", + "FASHION_STATEMENT_Description": "Equip armor or vanity clothing in all three social slots.", + "VEHICULAR_MANSLAUGHTER_Name": "Vehicular Manslaughter", + "VEHICULAR_MANSLAUGHTER_Description": "Defeat an enemy by running it over with a minecart.", + "BULLDOZER_Name": "Bulldozer", + "BULLDOZER_Description": "Destroy a total of 10,000 tiles.", + "THERE_ARE_SOME_WHO_CALL_HIM_Name": "There are Some Who Call Him...", + "THERE_ARE_SOME_WHO_CALL_HIM_Description": "Kill Tim.", + "DECEIVER_OF_FOOLS_Name": "Deceiver of Fools", + "DECEIVER_OF_FOOLS_Description": "Kill a nymph.", + "SWORD_OF_THE_HERO_Name": "Sword of the Hero", + "SWORD_OF_THE_HERO_Description": "Obtain a Terra Blade, forged from the finest blades of light and darkness.", + "LUCKY_BREAK_Name": "Lucky Break", + "LUCKY_BREAK_Description": "Survive a long fall with just a sliver of health remaining.", + "THROWING_LINES_Name": "Throwing Lines", + "THROWING_LINES_Description": "Throw a yoyo.", + "DYE_HARD_Name": "Dye Hard", + "DYE_HARD_Description": "Equip a dye in every possible dye slot.", + "SICK_THROW_Name": "Sick Throw", + "SICK_THROW_Description": "Obtain the Terrarian.", + "FREQUENT_FLYER_Name": "The Frequent Flyer", + "FREQUENT_FLYER_Description": "Spend over 1 gold being treated by the nurse.", + "THE_CAVALRY_Name": "The Cavalry", + "THE_CAVALRY_Description": "Equip a mount.", + "COMPLETELY_AWESOME_Name": "Completely Awesome", + "COMPLETELY_AWESOME_Description": "Obtain a minishark.", + "TIL_DEATH_Name": "Til Death...", + "TIL_DEATH_Description": "Kill the groom.", + "ARCHAEOLOGIST_Name": "Archaeologist", + "ARCHAEOLOGIST_Description": "Kill Doctor Bones.", + "PRETTY_IN_PINK_Name": "Pretty in Pink", + "PRETTY_IN_PINK_Description": "Kill pinky.", + "RAINBOWS_AND_UNICORNS_Name": "Rainbows and Unicorns", + "RAINBOWS_AND_UNICORNS_Description": "Fire a rainbow gun while riding on a unicorn.", + "YOU_AND_WHAT_ARMY_Name": "You and What Army?", + "YOU_AND_WHAT_ARMY_Description": "Command nine summoned minions simultaneously.", + "PRISMANCER_Name": "Prismancer", + "PRISMANCER_Description": "Obtain a rainbow rod.", + "IT_CAN_TALK_Name": "It Can Talk?!", + "IT_CAN_TALK_Description": "Build a house in a mushroom biome and have Truffle move in.", + "WATCH_YOUR_STEP_Name": "Watch Your Step!", + "WATCH_YOUR_STEP_Description": "Become a victim to a nasty underground trap.", + "MARATHON_MEDALIST_Name": "Marathon Medalist", + "MARATHON_MEDALIST_Description": "Travel a total of 26.2 miles on foot.", + "GLORIOUS_GOLDEN_POLE_Name": "Glorious Golden Pole", + "GLORIOUS_GOLDEN_POLE_Description": "Obtain a golden fishing rod.", + "SERVANT_IN_TRAINING_Name": "Servant-in-Training", + "SERVANT_IN_TRAINING_Description": "Complete your 1st quest for the angler.", + "GOOD_LITTLE_SLAVE_Name": "Good Little Slave", + "GOOD_LITTLE_SLAVE_Description": "Complete your 10th quest for the angler.", + "TROUT_MONKEY_Name": "Trout Monkey", + "TROUT_MONKEY_Description": "Complete your 25th quest for the angler.", + "FAST_AND_FISHIOUS_Name": "Fast and Fishious", + "FAST_AND_FISHIOUS_Description": "Complete your 50th quest for the angler.", + "SUPREME_HELPER_MINION_Name": "Supreme Helper Minion!", + "SUPREME_HELPER_MINION_Description": "Complete a grand total of 200 quests for the angler.", + "TOPPED_OFF_Name": "Topped Off", + "TOPPED_OFF_Description": "Attain maximum life and mana possible without accessories or buffs.", + "SLAYER_OF_WORLDS_Name": "Slayer of Worlds", + "SLAYER_OF_WORLDS_Description": "Defeat every boss in Terraria.", + "YOU_CAN_DO_IT_Name": "You Can Do It!", + "YOU_CAN_DO_IT_Description": "Survive your character's first full night.", + "MATCHING_ATTIRE_Name": "Matching Attire", + "MATCHING_ATTIRE_Description": "Equip armor in all three armor slots: head, chest, and feet.", + "BEHIND_THE_MASK_Name": "Behind The Mask", + "BEHIND_THE_MASK_Description": "Slay the Insane Cultist, a mad magician with powerful spells.", + "DAVY_JONES_LOCKER_Name": "Davy Jones' Locker", + "DAVY_JONES_LOCKER_Description": "Defeat the Flying Dutchman, the sails of the plunderin' skies.", + "WINTERHEARTED_Name": "Winterhearted", + "WINTERHEARTED_Description": "Defeat the Ice Queen, wicked witch of the coldest nights.", + "PUMPKIN_SMASHER_Name": "Pumpkin Smasher", + "PUMPKIN_SMASHER_Description": "Defeat the Pumpking, the spooky lord of hallow's eve.", + "INDEPENDENCE_DAY_Name": "Independence Day", + "INDEPENDENCE_DAY_Description": "Defeat a Mothership, overminds of the martian invaders.", + "HEX_EDUCATION_Name": "Hex Education", + "HEX_EDUCATION_Description": "Defeat a Goblin Summoner, conjurers of the darkest flames." + }, + "DungeonDefenders2": { + "InvasionStart": "The old one's army is approaching!", + "InvasionProgressTitle": "Old One's Army", + "InvasionWin": "The old one's army has been defeated!", + "WaveComplete": "Wave Complete!", + "CantSummonTower": "It doesn't seem to work without an Etheria Crystal nearby...", + "BartenderWarning": "The eternia crystal rejects this area and pops away instantly, the Tavernkeep mentioned it should rest in a large flat open area..." + }, + "GameTitle": { + "0": "Terraria: Dig Peon, Dig!", + "1": "Terraria: Epic Dirt", + "10": "Terraria: Digger T' Blocks", + "11": "Terraria: There is No Cow Layer", + "12": "Terraria: Suspicous Looking Eyeballs", + "13": "Terraria: Purple Grass!", + "14": "Terraria: No one Dug Behind!", + "15": "Terraria: The Water Fall Of Content!", + "16": "Terraria: Earthbound", + "17": "Terraria: Dig Dug Ain't Got Nuthin on Me", + "18": "Terraria: Ore's Well That Ends Well", + "19": "Terraria: Judgement Clay", + "2": "Terraria: Adaman-TIGHT!", + "20": "Terraria: Terrestrial Trouble", + "21": "Terraria: Obsessive-Compulsive Discovery Simulator", + "22": "Terraria: Red Dev Redemption", + "23": "Terraria: Rise of the Slimes", + "24": "Terraria: Now with more things to kill you!", + "25": "Terraria: Rumors of the Guides' death were greatly exaggerated", + "26": "Terraria: I Pity the Tools...", + "27": "Terraria: A spelunker says 'What'?", + "28": "Terraria: So then I said 'Something about a PC update....'", + "29": "Terraria: May the blocks be with you", + "3": "Terraria: Sand is Overpowered", + "30": "Terraria: Better than life", + "31": "Terraria: Terraria: Terraria:", + "32": "Terraria: Now in 1D", + "33": "Terraria: Coming soon to a computer near you", + "34": "Terraria: Dividing by zero", + "35": "Terraria: Now with SOUND", + "36": "Terraria: Press alt-f4", + "37": "Terraria: I Pity the Tools", + "38": "Terraria: You sand bro?", + "39": "Terraria: A good day to dig hard", + "4": "Terraria Part 3: The Return of the Guide", + "40": "Terraria: Can You Re-Dig-It?", + "41": "Terraria: I don't know that-- aaaaa!", + "42": "Terraria: What's that purple spiked thing?", + "43": "Terraria: I wanna be the guide", + "44": "Terraria: Cthulhu is mad... and is missing an eye!", + "45": "Terraria: NOT THE BEES!!!", + "46": "Terraria: Legend of Maxx", + "47": "Terraria: Cult of Cenx", + "48": "Terraria 2: Electric Boogaloo", + "49": "Terraria: Also try Minecraft!", + "5": "Terraria: A Bunnies Tale", + "50": "Terraria: Also try Breath of the Wild!", + "51": "Terraria: I just wanna know where the gold at?", + "52": "Terraria: Now with more ducks!", + "53": "Terraria: 9 + 1 = 11", + "54": "Terraria: Infinite Plantera", + "6": "Terraria: Dr. Bones and The Temple of Blood Moon", + "7": "Terraria: Slimeassic Park", + "8": "Terraria: The Grass is Greener on This Side", + "9": "Terraria: Small Blocks, Not for Children Under the Age of 5", + "55": "Terraria: Shut Up and Dig Gaiden!" + }, + "RandomWorldName_Legacy": { + "1": "Redigit's Kingdom", + "2": "Cenx's Turf", + "3": "Cthulhu's Ruins", + "4": "Land of the Moon", + "5": "Working Ant's Nest" + }, + + "RandomWorldName_Composition": { + "1": "The {Adjective} {Location} of {Noun}", + "2": "The {Adjective} {Location} of {Noun}", + "3": "{Adjective} {Location} of {Noun}", + "4": "{Adjective} {Location} of {Noun}", + "5": "The {Adjective} {Location}", + "6": "{Adjective} {Location}", + "7": "The {Location} of {Noun}", + "8": "{Location} of {Noun}" + }, + "RandomWorldName_Adjective": { +"Abandoned": "Abandoned", + "Abhorrent": "Abhorrent", + "Abusive": "Abusive", + "Adorable": "Adorable", + "Adventurous": "Adventurous", + "Ageless": "Ageless", + "Aggravating": "Aggravating", + "Aggressive": "Aggressive", + "Agile": "Agile", + "Agreeable": "Agreeable", + "Alert": "Alert", + "Alien": "Alien", + "Alive": "Alive", + "Alleged": "Alleged", + "Amethyst": "Amethyst", + "Amusing": "Amusing", + "Ancient": "Ancient", + "Angelic": "Angelic", + "Angry": "Angry", + "Annoyed": "Annoyed", + "Annoying": "Annoying", + "Anxious": "Anxious", + "Archaic": "Archaic", + "Ardent": "Ardent", + "Arrogant": "Arrogant", + "Ashamed": "Ashamed", + "Attractive": "Attractive", + "AuntBeckys": "Aunt Becky's", + "Average": "Average", + "Awful": "Awful", + "Awkward": "Awkward", + "Babbling": "Babbling", + "Bad": "Bad", + "Bashful": "Bashful", + "Beautiful": "Beautiful", + "Best": "Best", + "Bewildered": "Bewildered", + "Bitter": "Bitter", + "Bizarre": "Bizarre", + "Black": "Black", + "Blackish": "Blackish", + "Bleeding": "Bleeding", + "Blistering": "Blistering", + "Blocky": "Blocky", + "Bloody": "Bloody", + "Blooming": "Blooming", + "Blue": "Blue", + "Blushful": "Blushful", + "Blushing": "Blushing", + "Boatmurdered": "Boatmurdered", + "Boorish": "Boorish", + "Bored": "Bored", + "Boundless": "Boundless", + "Brainy": "Brainy", + "Brash": "Brash", + "Brave": "Brave", + "Breakable": "Breakable", + "Breakless": "Breakless", + "Breathtaking": "Breathtaking", + "Bright": "Bright", + "Brightish": "Brightish", + "Brilliant": "Brilliant", + "Broken": "Broken", + "Brown": "Brown", + "Brutal": "Brutal", + "Budding": "Budding", + "Burning": "Burning", + "Busy": "Busy", + "Calm": "Calm", + "Canadian": "Canadian", + "Careful": "Careful", + "Cautious": "Cautious", + "Celestial": "Celestial", + "Chads": "Chad's", + "Charming": "Charming", + "Chartreuse": "Chartreuse", + "Cheap": "Cheap", + "Cheerful": "Cheerful", + "Clean": "Clean", + "Clear": "Clear", + "Clearable": "Clearable", + "Clever": "Clever", + "Cleverish": "Cleverish", + "Cloudy": "Cloudy", + "Clumsy": "Clumsy", + "Cold": "Cold", + "Colorful": "Colorful", + "Combative": "Combative", + "Comfortable": "Comfortable", + "Comical": "Comical", + "Common": "Common", + "Complacent": "Complacent", + "Compulsive": "Compulsive", + "Concerned": "Concerned", + "Condemnable": "Condemnable", + "Condemned": "Condemned", + "Confident": "Confident", + "Confusable": "Confusable", + "Confused": "Confused", + "Constant": "Constant", + "Cooperative": "Cooperative", + "Corrupted": "Corrupted", + "Cosmic": "Cosmic", + "Courageous": "Courageous", + "Cracked": "Cracked", + "Cranky": "Cranky", + "Crass": "Crass", + "Crazy": "Crazy", + "Creepy": "Creepy", + "Crowded": "Crowded", + "Crude": "Crude", + "Cruel": "Cruel", + "Cuddly": "Cuddly", + "Curious": "Curious", + "Cursed": "Cursed", + "Cute": "Cute", + "Daft": "Daft", + "Damaged": "Damaged", + "Dangerous": "Dangerous", + "Dank": "Dank", + "Dark": "Dark", + "Daunting": "Daunting", + "Dead": "Dead", + "Decaying": "Decaying", + "Deceased": "Deceased", + "Defeated": "Defeated", + "Defiant": "Defiant", + "Delightful": "Delightful", + "Demented": "Demented", + "Demonic": "Demonic", + "Dense": "Dense", + "Depressed": "Depressed", + "Deranged": "Deranged", + "Desolate": "Desolate", + "Desperate": "Desperate", + "Determined": "Determined", + "Devious": "Devious", + "Diamond": "Diamond", + "Different": "Different", + "Difficult": "Difficult", + "Dire": "Dire", + "Dirty": "Dirty", + "Disappointing": "Disappointing", + "Discarded": "Discarded", + "Disgusting": "Disgusting", + "Disgusting": "Disgusting", + "Disloyal": "Disloyal", + "Distant": "Distant", + "Distinct": "Distinct", + "Distorted": "Distorted", + "Distressing": "Distressing", + "Disturbed": "Disturbed", + "Divine": "Divine", + "Dizzy": "Dizzy", + "Docile": "Docile", + "Doubtful": "Doubtful", + "Drab": "Drab", + "Dreadful": "Dreadful", + "Dreamy": "Dreamy", + "Dry": "Dry", + "Dubious": "Dubious", + "Dull": "Dull", + "Dumb": "Dumb", + "Eager": "Eager", + "Easy": "Easy", + "Eerie": "Eerie", + "Elated": "Elated", + "Elegant": "Elegant", + "Embarrassed": "Embarrassed", + "Embarrassing": "Embarrassing", + "Emerald": "Emerald", + "Empty": "Empty", + "Enchanting": "Enchanting", + "Encouraging": "Encouraging", + "Enduring": "Enduring", + "Energetic": "Energetic", + "Enthusiastic": "Enthusiastic", + "Envious": "Envious", + "Erratic": "Erratic", + "Eternal": "Eternal", + "Euphoric": "Euphoric", + "Everlasting": "Everlasting", + "Evil": "Evil", + "Exalted": "Exalted", + "Excellent": "Excellent", + "Excited": "Excited", + "Exiled": "Exiled", + "Existential": "Existential", + "Exotic": "Exotic", + "Expensive": "Expensive", + "Extinct": "Extinct", + "Extraordinary": "Extraordinary", + "Extravagant": "Extravagant", + "Exuberant": "Exuberant", + "Fabulous": "Fabulous", + "Fair": "Fair", + "Faithful": "Faithful", + "Fallen": "Fallen", + "Famous": "Famous", + "Fancy": "Fancy", + "Fantastic": "Fantastic", + "Far": "Far", + "Faraway": "Faraway", + "Fearful": "Fearful", + "Fearsome": "Fearsome", + "Fierce": "Fierce", + "Filthy": "Filthy", + "Fine": "Fine", + "Firm": "Firm", + "Flaky": "Flaky", + "Flaming": "Flaming", + "Flatulent": "Flatulent", + "Fluffy": "Fluffy", + "Foolhardy": "Foolhardy", + "Foolish": "Foolish", + "Forceful": "Forceful", + "Foreign": "Foreign", + "Forgiving": "Forgiving", + "Forgotten": "Forgotten", + "Forsaken": "Forsaken", + "Foul": "Foul", + "Fragile": "Fragile", + "Frail": "Frail", + "Frantic": "Frantic", + "Fresh": "Fresh", + "Friendly": "Friendly", + "Frightened": "Frightened", + "Frightening": "Frightening", + "Frightening": "Frightening", + "Funny": "Funny", + "Furious": "Furious", + "Gangrenous": "Gangrenous", + "Gentle": "Gentle", + "Gifted": "Gifted", + "Glamorous": "Glamorous", + "Gleaming": "Gleaming", + "Gleamless": "Gleamless", + "Gloomy": "Gloomy", + "Glorious": "Glorious", + "Glowing": "Glowing", + "Godly": "Godly", + "Good": "Good", + "Gorgeous": "Gorgeous", + "Graceful": "Graceful", + "Grand": "Grand", + "Grassy": "Grassy", + "Gray": "Gray", + "Greasy": "Greasy", + "Great": "Great", + "Greedy": "Greedy", + "Green": "Green", + "Grieving": "Grieving", + "Grizzly": "Grizzly", + "Grotesque": "Grotesque", + "Grouchy": "Grouchy", + "Growing": "Growing", + "Gruesome": "Gruesome", + "Grumpy": "Grumpy", + "Guilty": "Guilty", + "Gutless": "Gutless", + "Hallowed": "Hallowed", + "Handsome": "Handsome", + "Happy": "Happy", + "Harsh": "Harsh", + "Hateful": "Hateful", + "Hazardous": "Hazardous", + "Healthy": "Healthy", + "Heartless": "Heartless", + "Heavenly": "Heavenly", + "Heinous": "Heinous", + "Helpful": "Helpful", + "Helpless": "Helpless", + "Hesitant": "Hesitant", + "Hidden": "Hidden", + "Hideous": "Hideous", + "Hilarious": "Hilarious", + "Holy": "Holy", + "Homeless": "Homeless", + "Homely": "Homely", + "Horrible": "Horrible", + "Horrific": "Horrific", + "Horrifying": "Horrifying", + "Hungry": "Hungry", + "Hurt": "Hurt", + "Hurtable": "Hurtable", + "Hurtful": "Hurtful", + "Hyper": "Hyper", + "Hyperalert": "Hyperalert", + "Hyperenergetic": "Hyperenergetic", + "Hyperexcited": "Hyperexcited", + "Hyperhilarious": "Hyperhilarious", + "Hysterical": "Hysterical", + "Ignorant": "Ignorant", + "Illicit": "Illicit", + "Illusive": "Illusive", + "Imaginary": "Imaginary", + "Imaginary": "Imaginary", + "Immortal": "Immortal", + "Incompetent": "Incompetent", + "Inconvenient": "Inconvenient", + "Indecisive": "Indecisive", + "Indifferent": "Indifferent", + "Inferior": "Inferior", + "Infinite": "Infinite", + "Insecure": "Insecure", + "Insolent": "Insolent", + "Intense": "Intense", + "Irresponsible": "Irresponsible", + "Irritating": "Irritating", + "Isolated": "Isolated", + "Jade": "Jade", + "Jealous": "Jealous", + "Jiggly": "Jiggly", + "Jittery": "Jittery", + "Jolly": "Jolly", + "Joyous": "Joyous", + "Judgmental": "Judgmental", + "Karens": "Karen's", + "Keen": "Keen", + "Kind": "Kind", + "Kooky": "Kooky", + "Large": "Large", + "Lasting": "Lasting", + "Lavish": "Lavish", + "Lazy": "Lazy", + "Lazyish": "Lazyish", + "Leafy": "Leafy", + "Legendary": "Legendary", + "Light": "Light", + "Lightful": "Lightful", + "Lime": "Lime", + "Littleknown": "Little Known", + "Lively": "Lively", + "Lonely": "Lonely", + "Long": "Long", + "Lost": "Lost", + "Lousy": "Lousy", + "Lovely": "Lovely", + "Loyal": "Loyal", + "Lucky": "Lucky", + "Mad": "Mad", + "Magical": "Magical", + "Magnificent": "Magnificent", + "Marvelous": "Marvelous", + "Massive": "Massive", + "Menacing": "Menacing", + "Merciless": "Merciless", + "Mischievous": "Mischievous", + "Miserable": "Miserable", + "Misty": "Misty", + "Modern": "Modern", + "Modular": "Modular", + "Moist": "Moist", + "Moldy": "Moldy", + "Mopey": "Mopey", + "Motionless": "Motionless", + "Mourning": "Mourning", + "Muddy": "Muddy", + "Multitalented": "Multitalented", + "Murderous": "Murderous", + "Murky": "Murky", + "Mushy": "Mushy", + "Mysterious": "Mysterious", + "Mythical": "Mythical", + "Naive": "Naive", + "Naked": "Naked", + "Nameless": "Nameless", + "Nasty": "Nasty", + "Natural": "Natural", + "Naughty": "Naughty", + "Nauseating": "Nauseating", + "Navy": "Navy", + "Neglected": "Neglected", + "Nervous": "Nervous", + "New": "New", + "Nice": "Nice", + "Nimble": "Nimble", + "Nude": "Nude", + "Nutty": "Nutty", + "Obedient": "Obedient", + "Obnoxious": "Obnoxious", + "Obsessive": "Obsessive", + "Obstructed": "Obstructed", + "Obtuse": "Obtuse", + "Odd": "Odd", + "Offended": "Offended", + "Offensive": "Offensive", + "Old": "Old", + "OldFashioned": "Old-fashioned", + "Olive": "Olive", + "Open": "Open", + "Optimistic": "Optimistic", + "Outraged": "Outraged", + "Outrageous": "Outrageous", + "Outstanding": "Outstanding", + "Overcrowded": "Overcrowded", + "Overeasy": "Overeasy", + "Overjealous": "Overjealous", + "Overjoyous": "Overjoyous", + "Overrun": "Overrun", + "Pale": "Pale", + "Panicky": "Panicky", + "Peaceful": "Peaceful", + "Perfect": "Perfect", + "Perilous": "Perilous", + "Perpetual": "Perpetual", + "Persistent": "Persistent", + "Petrified": "Petrified", + "Pine": "Pine", + "Placid": "Placid", + "Plain": "Plain", + "Pleasant": "Pleasant", + "Pleasing": "Pleasing", + "Pointy": "Pointy", + "Poised": "Poised", + "Poison": "Poison", + "Poor": "Poor", + "Powerful": "Powerful", + "Precious": "Precious", + "Prickly": "Prickly", + "Proud": "Proud", + "Purified": "Purified", + "Putrid": "Putrid", + "Puzzled": "Puzzled", + "Quaint": "Quaint", + "Quick": "Quick", + "Quiet": "Quiet", + "Quirky": "Quirky", + "Rancid": "Rancid", + "Rank": "Rank", + "Raunchy": "Raunchy", + "Raw": "Raw", + "Real": "Real", + "Reckless": "Reckless", + "Red's": "Red's", + "Reeking": "Reeking", + "Rejected": "Rejected", + "Relentless": "Relentless", + "Relievable": "Relievable", + "Relieved": "Relieved", + "Remote": "Remote", + "Repugnant": "Repugnant", + "Repulsive": "Repulsive", + "Resentful": "Resentful", + "Restful": "Restful", + "Revolting": "Revolting", + "Rich": "Rich", + "Ridiculous": "Ridiculous", + "Risky": "Risky", + "Rotten": "Rotten", + "Rotting": "Rotting", + "Royal": "Royal", + "Ruby": "Ruby", + "Rude": "Rude", + "Ruthless": "Ruthless", + "Sacred": "Sacred", + "Sad": "Sad", + "Sadistic": "Sadistic", + "Sage": "Sage", + "Sallow": "Sallow", + "Sapphire": "Sapphire", + "Savage": "Savage", + "Scandalous": "Scandalous", + "Scary": "Scary", + "Searing": "Searing", + "Sedated": "Sedated", + "Selfish": "Selfish", + "Senseless": "Senseless", + "Sensitive": "Sensitive", + "Serene": "Serene", + "Serious": "Serious", + "Shabby": "Shabby", + "Shameful": "Shameful", + "Sharp": "Sharp", + "Shiny": "Shiny", + "Shocking": "Shocking", + "Shoddy": "Shoddy", + "Shy": "Shy", + "Significant": "Significant", + "Silenced": "Silenced", + "Silly": "Silly", + "Simple": "Simple", + "Sleazy": "Sleazy", + "Sleepy": "Sleepy", + "Slow": "Slow", + "Sluggish": "Sluggish", + "Smelly": "Smelly", + "Smiling": "Smiling", + "Smoggy": "Smoggy", + "Smooth": "Smooth", + "Smouldering": "Smouldering", + "Solid": "Solid", + "Sore": "Sore", + "Sour": "Sour", + "Sparkling": "Sparkling", + "Spastic": "Spastic", + "Spiritual": "Spiritual", + "Splendid": "Splendid", + "Spoiled": "Spoiled", + "Spooky": "Spooky", + "Spotless": "Spotless", + "Stable": "Stable", + "Stalwart": "Stalwart", + "Staunch": "Staunch", + "Stiff": "Stiff", + "Still": "Still", + "Stinky": "Stinky", + "Stormy": "Stormy", + "Strange": "Strange", + "Strong": "Strong", + "Stupid": "Stupid", + "Subaverage": "Subaverage", + "Successful": "Successful", + "Super": "Super", + "Superb": "Superb", + "Superior": "Superior", + "Supreme": "Supreme", + "Sweaty": "Sweaty", + "Tainted": "Tainted", + "Talented": "Talented", + "Tame": "Tame", + "Tasty": "Tasty", + "Teal": "Teal", + "Tender": "Tender", + "Tense": "Tense", + "Terrible": "Terrible", + "Terrified": "Terrified", + "Thankful": "Thankful", + "Thanos": "Thanos'", + "Thick": "Thick", + "Thoughtful": "Thoughtful", + "Thoughtless": "Thoughtless", + "Timeless": "Timeless", + "Tiny": "Tiny", + "Tired": "Tired", + "Topaz": "Topaz", + "Tough": "Tough", + "Tranquil": "Tranquil", + "Trashy": "Trashy", + "Tropical": "Tropical", + "Troubled": "Troubled", + "Trusting": "Trusting", + "Ugliest": "Ugliest", + "Ugly": "Ugly", + "Unbroken": "Unbroken", + "Uncharming": "Uncharming", + "Uncharted": "Uncharted", + "Uncombative": "Uncombative", + "Uncooperative": "Uncooperative", + "Undetermined": "Undetermined", + "Undiscovered": "Undiscovered", + "Undying": "Undying", + "Unending": "Unending", + "Unexplored": "Unexplored", + "Unhappy": "Unhappy", + "Unhurt": "Unhurt", + "Unhurting": "Unhurting", + "Uninterested": "Uninterested", + "Unknown": "Unknown", + "Unlawful": "Unlawful", + "Unpleasant": "Unpleasant", + "Unreal": "Unreal", + "Unruly": "Unruly", + "Unsightly": "Unsightly", + "Unsure": "Unsure", + "Untalented": "Untalented", + "Untamed": "Untamed", + "Unusual": "Unusual", + "Unwicked": "Unwicked", + "Unworried": "Unworried", + "Upset": "Upset", + "Upsetable": "Upsetable", + "Uptight": "Uptight", + "Useless": "Useless", + "Vague": "Vague", + "Vain": "Vain", + "Vast": "Vast", + "Vibrant": "Vibrant", + "Vicious": "Vicious", + "Victorious": "Victorious", + "Vile": "Vile", + "Violent": "Violent", + "Viridian": "Viridian", + "Vivacious": "Vivacious", + "Volatile": "Volatile", + "Vulgar": "Vulgar", + "Wacky": "Wacky", + "Wandering": "Wandering", + "Wary": "Wary", + "Weak": "Weak", + "Weary": "Weary", + "Weepy": "Weepy", + "Weird": "Weird", + "Wellamused": "Wellamused", + "Wellfrightened": "Wellfrightened", + "Wet": "Wet", + "Wicked": "Wicked", + "Wild": "Wild", + "Windy": "Windy", + "Wishful": "Wishful", + "Withered": "Withered", + "Witless": "Witless", + "Witty": "Witty", + "Wonderful": "Wonderful", + "Wondrous": "Wondrous", + "Worried": "Worried", + "Worrisome": "Worrisome", + "Wriggly": "Wriggly", + "Wrong": "Wrong", + "Yellow": "Yellow", + "YOLO": "YOLO", + "Zany": "Zany", + "Zealous": "Zealous", + }, + "RandomWorldName_Location": { + "Abode": "Abode", + "Abyss": "Abyss", + "Acres": "Acres", + "Afterworld": "Afterworld", + "Alcove": "Alcove", + "Alley": "Alley", + "Apogee": "Apogee", + "Arbor": "Arbor", + "Archipelago": "Archipelago", + "Area": "Area", + "Arena": "Arena", + "Armpit": "Armpit", + "Artwork": "Artwork", + "Asylum": "Asylum", + "Backcountry": "Backcountry", + "Backwater": "Backwater", + "Backwoods": "Backwoods", + "Badlands": "Badlands", + "Bank": "Bank", + "Barleycorn": "Barleycorn", + "Barren": "Barren", + "Base": "Base", + "Basin": "Basin", + "Bastion": "Bastion", + "Bay": "Bay", + "Bayou": "Bayou", + "Beach": "Beach", + "Bed": "Bed", + "Bedrock": "Bedrock", + "Beyond": "Beyond", + "Biosphere": "Biosphere", + "Bluff": "Bluff", + "Bog": "Bog", + "Boondocks": "Boondocks", + "Boonies": "Boonies", + "Border": "Border", + "Bottoms": "Bottoms", + "Boundary": "Boundary", + "Breach": "Breach", + "Brewery": "Brewery", + "Brook": "Brook", + "Bubble": "Bubble", + "Bunker": "Bunker", + "Burrow": "Burrow", + "Bush": "Bush", + "Butte": "Butte", + "Camp": "Camp", + "Canal": "Canal", + "Canopy": "Canopy", + "Canvas": "Canvas", + "Canyon": "Canyon", + "Cape": "Cape", + "Center": "Center", + "Chaparral": "Chaparral", + "Chasm": "Chasm", + "Citadel": "Citadel", + "City": "City", + "Clearing": "Clearing", + "Climax": "Climax", + "Cloudland": "Cloudland", + "Coast": "Coast", + "Colony": "Colony", + "Commune": "Commune", + "Confluence": "Confluence", + "Continent": "Continent", + "Convention": "Convention", + "Core": "Core", + "Cosmos": "Cosmos", + "Country": "Country", + "County": "County", + "Court": "Court", + "Courtyard": "Courtyard", + "Cove": "Cove", + "Crater": "Crater", + "Creek": "Creek", + "Crest": "Crest", + "Crick": "Crick", + "Crossing": "Crossing", + "Crossroads": "Crossroads", + "Crown": "Crown", + "Dale": "Dale", + "Dab": "Dab", + "Dam": "Dam", + "Daydream": "Daydream", + "Defecation": "Defecation", + "Dell": "Dell", + "Delta": "Delta", + "Den": "Den", + "Depths": "Depths", + "Desert": "Desert", + "Dimension": "Dimension", + "District": "District", + "Domain": "Domain", + "Dome": "Dome", + "Dream": "Dream", + "Dreamland": "Dreamland", + "Dreamworld": "Dreamworld", + "Dump": "Dump", + "Dune": "Dune", + "Dungeon": "Dungeon", + "Easement": "Easement", + "Edge": "Edge", + "Elevation": "Elevation", + "Empire": "Empire", + "Empyrean": "Empyrean", + "Enclosure": "Enclosure", + "Entity": "Entity", + "Essence": "Essence", + "Estate": "Estate", + "Estuary": "Estuary", + "Eternity": "Eternity", + "Ether": "Ether", + "Everglade": "Everglade", + "Existence": "Existence", + "Expanse": "Expanse", + "Exterior": "Exterior", + "Fable": "Fable", + "Fabrication": "Fabrication", + "Fantasia": "Fantasia", + "Farm": "Farm", + "Field": "Field", + "Figment": "Figment", + "Firmament": "Firmament", + "Fjord": "Fjord", + "Flatland": "Flatland", + "Flats": "Flats", + "Fold": "Fold", + "Foothold": "Foothold", + "Forest": "Forest", + "Forge": "Forge", + "Fortress": "Fortress", + "Foundation": "Foundation", + "Fountain": "Fountain", + "Fraternity": "Fraternity", + "Front": "Front", + "Frontier": "Frontier", + "Galaxy": "Galaxy", + "Garden": "Garden", + "Geyser": "Geyser", + "Glacier": "Glacier", + "Glade": "Glade", + "Globe": "Globe", + "Grange": "Grange", + "Grassland": "Grassland", + "Graveyard": "Graveyard", + "Grounds": "Grounds", + "Grove": "Grove", + "Gulf": "Gulf", + "Gully": "Gully", + "Gutter": "Gutter", + "Hamlet": "Hamlet", + "Harbor": "Harbor", + "Haven": "Haven", + "Heart": "Heart", + "Heaven": "Heaven", + "Hedge": "Hedge", + "Heights": "Heights", + "Hideout": "Hideout", + "Highland": "Highland", + "Hill": "Hill", + "Hilltop": "Hilltop", + "Hinterland": "Hinterland", + "Hive": "Hive", + "Hole": "Hole", + "Homeland": "Homeland", + "Hoosegow": "Hoosegow", + "Hollow": "Hollow", + "Hovel": "Hovel", + "Hub": "Hub", + "Illusion": "Illusion", + "Image": "Image", + "Interior": "Interior", + "Island": "Island", + "Isle": "Isle", + "Islet": "Islet", + "Jungle": "Jungle", + "Keystone": "Keystone", + "Kingdom": "Kingdom", + "Knoll": "Knoll", + "Labyrinth": "Labyrinth", + "Lagoon": "Lagoon", + "Lair": "Lair", + "Lake": "Lake", + "Land": "Land", + "Legend": "Legend", + "Limbo": "Limbo", + "Locale": "Locale", + "Loch": "Loch", + "Marsh": "Marsh", + "Marshland": "Marshland", + "Mass": "Mass", + "Maze": "Maze", + "Meadow": "Meadow", + "Meridian": "Meridian", + "Mesa": "Mesa", + "Midland": "Midland", + "Mine": "Mine", + "Mirage": "Mirage", + "Mire": "Mire", + "Moorland": "Moorland", + "Morass": "Morass", + "Mortuary": "Mortuary", + "Mound": "Mound", + "Mountain": "Mountain", + "Myth": "Myth", + "Nation": "Nation", + "Neighborhood": "Neighborhood", + "Nest": "Nest", + "Niche": "Niche", + "Nightmare": "Nightmare", + "Nirvana": "Nirvana", + "Nursery": "Nursery", + "Oasis": "Oasis", + "Object": "Object", + "OldTownRoad": "Old Town Road", + "Ocean": "Ocean", + "Orchard": "Orchard", + "Origin": "Origin", + "Outback": "Outback", + "Outland": "Outland", + "Outskirts": "Outskirts", + "Outskirts": "Outskirts", + "Overworld": "Overworld", + "Paintbrush": "Paintbrush", + "Parable": "Parable", + "Paradise": "Paradise", + "Park": "Park", + "Passage": "Passage", + "Passing": "Passing", + "Pasture": "Pasture", + "Patch": "Patch", + "Peak": "Peak", + "Pedestal": "Pedestal", + "Peninsula": "Peninsula", + "Picture": "Picture", + "Pinnacle": "Pinnacle", + "Pit": "Pit", + "Place": "Place", + "Plains": "Plains", + "Planet": "Planet", + "Plateau": "Plateau", + "Plaza": "Plaza", + "Plot": "Plot", + "Plumbus": "Plumbus", + "Point": "Point", + "Polestar": "Polestar", + "Pond": "Pond", + "Port": "Port", + "Portrait": "Portrait", + "Pothole": "Pothole", + "Prairie": "Prairie", + "Prison": "Prison", + "Province": "Province", + "Pub": "Pub", + "Quagmire": "Quagmire", + "Quarantine": "Quarantine", + "Ranch": "Ranch", + "Rapids": "Rapids", + "Ravine": "Ravine", + "Reach": "Reach", + "Reality": "Reality", + "Realm": "Realm", + "Reef": "Reef", + "Refuge": "Refuge", + "Region": "Region", + "Remotes": "Remotes", + "Residence": "Residence", + "Rest": "Rest", + "Retreat": "Retreat", + "Ridge": "Ridge", + "Rift": "Rift", + "Ring": "Ring", + "River": "River", + "Roost": "Roost", + "Root": "Root", + "Route": "Route", + "Run": "Run", + "Sanctuary": "Sanctuary", + "Savanna": "Savanna", + "Schmeckle": "Schmeckle", + "Scrubland": "Scrubland", + "Sea": "Sea", + "Seaside": "Seaside", + "Section": "Section", + "Sector": "Sector", + "Settlement": "Settlement", + "Shallows": "Shallows", + "Shanty": "Shanty", + "Shantytown": "Shantytown", + "Sheet": "Sheet", + "Shire": "Shire", + "Shore": "Shore", + "Shrine": "Shrine", + "Shroud": "Shroud", + "Shrubbery": "Shrubbery", + "Shrublands": "Shrublands", + "Site": "Site", + "Slope": "Slope", + "Slumber": "Slumber", + "Snap": "Snap", + "Sod": "Sod", + "Sorority": "Sorority", + "Source": "Source", + "Space": "Space", + "Span": "Span", + "Sphere": "Sphere", + "Spring": "Spring", + "Square": "Square", + "State": "State", + "Station": "Station", + "Steppe": "Steppe", + "Sticks": "Sticks", + "Stonk": "Stonk", + "Story": "Story", + "Strait": "Strait", + "Stream": "Stream", + "Stretch": "Stretch", + "Suburb": "Suburb", + "Summit": "Summit", + "Swale": "Swale", + "Swamp": "Swamp", + "Sweep": "Sweep", + "Taiga": "Taiga", + "Tale": "Tale", + "Temple": "Temple", + "Terrace": "Terrace", + "Terrain": "Terrain", + "Terraria": "Terraria", + "Terrarium": "Terrarium", + "Territory": "Territory", + "Thicket": "Thicket", + "Throne": "Throne", + "Timberland": "Timberland", + "Tilt": "Tilt", + "Tip": "Tip", + "Tomb": "Tomb", + "Towel": "Towel", + "Town": "Town", + "Tract": "Tract", + "Trail": "Trail", + "Trench": "Trench", + "Tributary": "Tributary", + "Tropic": "Tropic", + "Tundra": "Tundra", + "Tunnel": "Tunnel", + "Turf": "Turf", + "Underbelly": "Underbelly", + "Undergrowth": "Undergrowth", + "Underwood": "Underwood", + "Universe": "Universe", + "Unknown": "Unknown", + "Upland": "Upland", + "Utopia": "Utopia", + "Vale": "Vale", + "Valley": "Valley", + "Vault": "Vault", + "Veldt": "Veldt", + "Vicinity": "Vicinity", + "Vineyard": "Vineyard", + "Vision": "Vision", + "Void": "Void", + "Ward": "Ward", + "Waste": "Waste", + "Wasteland": "Wasteland", + "Well": "Well", + "Wetland": "Wetland", + "Wharf": "Wharf", + "Wilderness": "Wilderness", + "Wilds": "Wilds", + "Wildwood": "Wildwood", + "Wonderland": "Wonderland", + "Wood": "Wood", + "Woodland": "Woodland", + "Woods": "Woods", + "World": "World", + "Yard": "Yard", + "Yeet": "Yeet", + "Zone": "Zone" + }, + "RandomWorldName_Noun": { + "Ability": "Ability", + "Absurdity": "Absurdity", + "Accidents": "Accidents", + "Acne": "Acne", + "Acorns": "Acorns", + "Adamantite": "Adamantite", + "Adoration": "Adoration", + "Adulthood": "Adulthood", + "Advantage": "Advantage", + "Adventure": "Adventure", + "Agony": "Agony", + "Alarm": "Alarm", + "Alcohol": "Alcohol", + "Ale": "Ale", + "Allergies": "Allergies", + "Amazement": "Amazement", + "Angels": "Angels", + "Anger": "Anger", + "AngryGamers": "Angry Gamers", + "Bones": "Bones", + "Anguish": "Anguish", + "AnimalCarcasses": "Animal Carcasses", + "Annoyance": "Annoyance", + "Anvils": "Anvils", + "Anxiety": "Anxiety", + "Apples": "Apples", + "Apricots": "Apricots", + "Argon": "Argon", + "Arrows": "Arrows", + "Arsenic": "Arsenic", + "Arson": "Arson", + "Arthritis": "Arthritis", + "Asbestos": "Asbestos", + "Ash": "Ash", + "Assassins": "Assassins", + "Assault": "Assault", + "Atrophy": "Atrophy", + "Awareness": "Awareness", + "Awe": "Awe", + "Boomers": "Boomers", + "Bacon": "Bacon", + "BadDecisions": "Bad Decisions", + "BadJokes": "Bad Jokes", + "BadLuck": "Bad Luck", + "BadOmens": "Bad Omens", + "Balance": "Balance", + "Bamboo": "Bamboo", + "Bananas": "Bananas", + "Bandits": "Bandits", + "Bankruptcy": "Bankruptcy", + "Bark": "Bark", + "Bats": "Bats", + "Beauty": "Beauty", + "Beenades": "Beenades", + "Bees": "Bees", + "Beggars": "Beggars", + "Beheadings": "Beheadings", + "Belief": "Belief", + "Betrayers": "Betrayers", + "Birds": "Birds", + "Birthdays": "Birthdays", + "Bitterness": "Bitterness", + "Bladders": "Bladders", + "Blasphemy": "Blasphemy", + "Blindness": "Blindness", + "Blinkroot": "Blinkroot", + "Blocks": "Blocks", + "Blood": "Blood", + "Bloodletting": "Bloodletting", + "Bloodshed": "Bloodshed", + "Blossoms": "Blossoms", + "Body": "Body", + "Odor": "Odor", + "Bone": "Bone", + "Spurs": "Spurs", + "Boots": "Boots", + "Boredom": "Boredom", + "Boulders": "Boulders", + "Brains": "Brains", + "Branches": "Branches", + "Bravery": "Bravery", + "Bribery": "Bribery", + "Bridges": "Bridges", + "Brilliance": "Brilliance", + "BrokenBones": "Broken Bones", + "BrokenDreams": "Broken Dreams", + "BrokenGlass": "Broken Glass", + "Bronies": "Bronies", + "Bubbles": "Bubbles", + "Buckets": "Buckets", + "Bugs": "Bugs", + "Bums": "Bums", + "Bunnies": "Bunnies", + "Burglars": "Burglars", + "BurningHair": "Burning Hair", + "BurntFlesh": "Burnt Flesh", + "BurntOfferings": "Burnt Offerings", + "Butchery": "Butchery", + "Butterflies": "Butterflies", + "Cacti": "Cacti", + "Calmness": "Calmness", + "Candy": "Candy", + "Care": "Care", + "Carnage": "Carnage", + "Carrion": "Carrion", + "Casualty": "Casualty", + "Cats": "Cats", + "Cattails": "Cattails", + "Caves": "Caves", + "Celebration": "Celebration", + "Chainsaws": "Chainsaws", + "Chaos": "Chaos", + "Charity": "Charity", + "Cheats": "Cheats", + "Cherries": "Cherries", + "Chests": "Chests", + "Childhood": "Childhood", + "Children": "Children", + "Chlorophyte": "Chlorophyte", + "Cilantro": "Cilantro", + "Clarity": "Clarity", + "Clay": "Clay", + "Clentamination": "Clentamination", + "Cleverness": "Cleverness", + "Clouds": "Clouds", + "Cobalt": "Cobalt", + "Coconuts": "Coconuts", + "Coffee": "Coffee", + "Coins": "Coins", + "Coldness": "Coldness", + "Comfort": "Comfort", + "Compassion": "Compassion", + "Compost": "Compost", + "Confidence": "Confidence", + "Confinement": "Confinement", + "Confusion": "Confusion", + "Contentment": "Contentment", + "Convicts": "Convicts", + "Covfefe": "Covfefe", + "Copper": "Copper", + "Corpses": "Corpses", + "Corruption": "Corruption", + "Courage": "Courage", + "Creation": "Creation", + "Creatures": "Creatures", + "Creepers": "Creepers", + "Crests": "Crests", + "Crime": "Crime", + "Criminals": "Criminals", + "Crimtane": "Crimtane", + "CripplingDepression": "Crippling Depression", + "Crooks": "Crooks", + "Crows": "Crows", + "Crystals": "Crystals", + "Cthulhu": "Cthulhu", + "Curiosity": "Curiosity", + "CursedFlames": "Cursed Flames", + "Dabbing": "Dabbing", + "Daisies": "Daisies", + "DankMemes": "Dank Memes", + "Darkness": "Darkness", + "Darts": "Darts", + "Daughters": "Daughters", + "Dawn": "Dawn", + "Daybloom": "Daybloom", + "DeadBodies": "Dead Bodies", + "Deadbeats": "Deadbeats", + "Death": "Death", + "Deathweed": "Deathweed", + "Debauchery": "Debauchery", + "Debt": "Debt", + "Decapitation": "Decapitation", + "DecayingMeat": "Decaying Meat", + "Deceit": "Deceit", + "Deception": "Deception", + "Dedication": "Dedication", + "Defeat": "Defeat", + "Defecation": "Defecation", + "Degradation": "Degradation", + "Delay": "Delay", + "Delusion": "Delusion", + "Dementia": "Dementia", + "Demonite": "Demonite", + "Demilogic": "Demilogic", + "Demons": "Demons", + "Derangement": "Derangement", + "Despair": "Despair", + "Desperation": "Desperation", + "Destruction": "Destruction", + "DijonMustard": "Dijon Mustard", + "Dirt": "Dirt", + "Disappointment": "Disappointment", + "Disgust": "Disgust", + "Dishonesty": "Dishonesty", + "Dismay": "Dismay", + "Distortion": "Distortion", + "Distribution": "Distribution", + "Divorce": "Divorce", + "Doom": "Doom", + "Dragonfruit": "Dragonfruit", + "Dragons": "Dragons", + "Dread": "Dread", + "Dreams": "Dreams", + "Drills": "Drills", + "Drums": "Drums", + "Ducks": "Ducks", + "Dusk": "Dusk", + "Dust": "Dust", + "Duty": "Duty", + "Dysphoria": "Dysphoria", + "Ears": "Ears", + "Education": "Education", + "Eggs": "Eggs", + "Elderberries": "Elderberries", + "Elegance": "Elegance", + "Envy": "Envy", + "Evasion": "Evasion", + "Evil": "Evil", + "Exile": "Exile", + "Exploits": "Exploits", + "Explosives": "Explosives", + "Extortion": "Extortion", + "Eyes": "Eyes", + "Fable": "Fable", + "FaceMonsters": "Face Monsters", + "Failures": "Failures", + "Fairies": "Fairies", + "Faith": "Faith", + "FallingStars": "Falling Stars", + "FalseIdols": "False Idols", + "FalseImprisonment": "False Imprisonment", + "Falsehood": "Falsehood", + "Fame": "Fame", + "Famine": "Famine", + "Fantasy": "Fantasy", + "Fascination": "Fascination", + "Fatality": "Fatality", + "Fear": "Fear", + "Feathers": "Feathers", + "Feces": "Feces", + "Felons": "Felons", + "Ferns": "Ferns", + "Fiction": "Fiction", + "Fiends": "Fiends", + "Fingers": "Fingers", + "Fireblossom": "Fireblossom", + "Fireflies": "Fireflies", + "Fish": "Fish", + "Flails": "Flails", + "Flatulence": "Flatulence", + "Flatus": "Flatus", + "Flesh": "Flesh", + "Floof": "Floof", + "Flowers": "Flowers", + "FlyingFish": "Flying Fish", + "FoodPoisoning": "Food Poisoning", + "Forgery": "Forgery", + "Forks": "Forks", + "Fraud": "Fraud", + "Freaks": "Freaks", + "Freckles": "Freckles", + "Freedom": "Freedom", + "Friendship": "Friendship", + "Fright": "Fright", + "Frogs": "Frogs", + "Frost": "Frost", + "Fruit": "Fruit", + "Gangsters": "Gangsters", + "Garbage": "Garbage", + "GarlicBread": "Garlic Bread", + "Gears": "Gears", + "Gel": "Gel", + "Generation": "Generation", + "GenXers": "Gen-Xers", + "GenYers": "Gen-Yers", + "Ghosts": "Ghosts", + "Giggles": "Giggles", + "Gingers": "Gingers", + "Girls": "Girls", + "Glass": "Glass", + "Gloom": "Gloom", + "Gluttony": "Gluttony", + "Goals": "Goals", + "Goblins": "Goblins", + "Gold": "Gold", + "Goldfish": "Goldfish", + "Gossip": "Gossip", + "Grain": "Grain", + "Grandfathers": "Grandfathers", + "Grandmothers": "Grandmothers", + "Granite": "Granite", + "Grapefruit": "Grapefruit", + "Grapes": "Grapes", + "Grass": "Grass", + "Grasshoppers": "Grasshoppers", + "Graves": "Graves", + "Greed": "Greed", + "Grief": "Grief", + "Guitars": "Guitars", + "Guts": "Guts", + "Hair": "Hair", + "Hamburgers": "Hamburgers", + "Hammers": "Hammers", + "Hands": "Hands", + "Happiness": "Happiness", + "HappyEndings": "Happy Endings", + "Hardship": "Hardship", + "Harpies": "Harpies", + "Hate": "Hate", + "Hatred": "Hatred", + "Heart": "Heart", + "Heartache": "Heartache", + "Hearts": "Hearts", + "Heels": "Heels", + "Hellstone": "Hellstone", + "Herbs": "Herbs", + "Heresy": "Heresy", + "Homicide": "Homicide", + "Honey": "Honey", + "Hoodlums": "Hoodlums", + "Hooks": "Hooks", + "Hooligans": "Hooligans", + "Hopelessness": "Hopelessness", + "Hornets": "Hornets", + "Horns": "Horns", + "Hornswoggle": "Hornswoggle", + "Horror": "Horror", + "Horrors": "Horrors", + "Houses": "Houses", + "Humiliation": "Humiliation", + "Hurt": "Hurt", + "Hysteria": "Hysteria", + "IDidntInhale": "I Didn't Inhale", + "Ice": "Ice", + "Ichor": "Ichor", + "Illness": "Illness", + "Indictments": "Indictments", + "Indigestion": "Indigestion", + "Indignity": "Indignity", + "Infancy": "Infancy", + "Infections": "Infections", + "Inflammation": "Inflammation", + "Inflation": "Inflation", + "Injury": "Injury", + "Insanity": "Insanity", + "Insects": "Insects", + "Intelligence": "Intelligence", + "Intestines": "Intestines", + "Invasions": "Invasions", + "Iron": "Iron", + "Irritation": "Irritation", + "Isolation": "Isolation", + "Ivy": "Ivy", + "Jaws": "Jaws", + "Jealousy": "Jealousy", + "Jellyfish": "Jellyfish", + "Joy": "Joy", + "Justice": "Justice", + "Karens": "Karens", + "Kidneys": "Kidneys", + "Kindness": "Kindness", + "Kittens": "Kittens", + "Knives": "Knives", + "Krypton": "Krypton", + "Lamps": "Lamps", + "Laughter": "Laughter", + "Lava": "Lava", + "Lawsuits": "Lawsuits", + "Lawyers": "Lawyers", + "Lead": "Lead", + "Leaves": "Leaves", + "Legend": "Legend", + "Leggings": "Leggings", + "Legs": "Legs", + "Lemons": "Lemons", + "Leprosy": "Leprosy", + "Letdown": "Letdown", + "Lethargy": "Lethargy", + "Liberty": "Liberty", + "Lies": "Lies", + "Life": "Life", + "LightningBugs": "Lightning Bugs", + "Lilies": "Lilies", + "Lilith": "Lilith", + "Lilypad": "Lilypad", + "Lips": "Lips", + "Litigation": "Litigation", + "Livers": "Livers", + "Loathing": "Loathing", + "Lombago": "Lombago", + "Loneliness": "Loneliness", + "Lore": "Lore", + "Loss": "Loss", + "Love": "Love", + "Luck": "Luck", + "Luggage": "Luggage", + "Luminite": "Luminite", + "Lungs": "Lungs", + "Luxury": "Luxury", + "Madness": "Madness", + "Maggots": "Maggots", + "Mana": "Mana", + "Mangos": "Mangos", + "Mania": "Mania", + "Manslaughter": "Manslaughter", + "Marble": "Marble", + "Markets": "Markets", + "Mastication": "Mastication", + "Maturity": "Maturity", + "Medicine": "Medicine", + "Melancholy": "Melancholy", + "Memes": "Memes", + "Mercy": "Mercy", + "Merica": "Merica", + "Meteorite": "Meteorite", + "Mice": "Mice", + "Midnight": "Midnight", + "MidnightRamen": "Midnight Ramen", + "Millennials": "Millennials", + "Mimics": "Mimics", + "Mirrors": "Mirrors", + "Misery": "Misery", + "Misfortune": "Misfortune", + "MissingLimbs": "Missing Limbs", + "Models": "Models", + "Money": "Money", + "Monotony": "Monotony", + "Moonglow": "Moonglow", + "Moonlight": "Moonlight", + "Morons": "Morons", + "Mortality": "Mortality", + "Moss": "Moss", + "Mourning": "Mourning", + "Mouths": "Mouths", + "Movement": "Movement", + "Muckers": "Muckers", + "Mud": "Mud", + "Muggers": "Muggers", + "Murder": "Murder", + "Murderers": "Murderers", + "Mushrooms": "Mushrooms", + "Music": "Music", + "Mystery": "Mystery", + "Myth": "Myth", + "Mythril": "Mythril", + "Nausea": "Nausea", + "Necromancers": "Necromancers", + "Necromancy": "Necromancy", + "Night": "Night", + "Nightcrawlers": "Nightcrawlers", + "Nightmares": "Nightmares", + "NoRemorse": "No Remorse", + "Nocram": "Nocram", + "Nostalgia": "Nostalgia", + "Nudity": "Nudity", + "Obscurity": "Obscurity", + "Obsidian": "Obsidian", + "OopsieDaisy": "Oopsie Daisy", + "Ooze": "Ooze", + "OpenWounds": "Open Wounds", + "Opportunity": "Opportunity", + "Options": "Options", + "Oranges": "Oranges", + "Organs": "Organs", + "Orichalcum": "Orichalcum", + "Outlaws": "Outlaws", + "Owls": "Owls", + "PadThai": "Pad Thai", + "Pain": "Pain", + "Palladium": "Palladium", + "Panhandlers": "Panhandlers", + "Panic": "Panic", + "Parasites": "Parasites", + "Parties": "Parties", + "PartyTime": "Party Time", + "Patience": "Patience", + "Peace": "Peace", + "Penguins": "Penguins", + "Perjury": "Perjury", + "Perspiration": "Perspiration", + "Pickaxes": "Pickaxes", + "Pickpockets": "Pickpockets", + "Pineapples": "Pineapples", + "Pinky": "Pinky", + "Piranha": "Piranha", + "Piranhas": "Piranhas", + "Pirates": "Pirates", + "Pixies": "Pixies", + "Plantero": "Plantero", + "Plants": "Plants", + "Platinum": "Platinum", + "Pleasure": "Pleasure", + "Plums": "Plums", + "Politicians": "Politicians", + "Ponies": "Ponies", + "Potions": "Potions", + "Poverty": "Poverty", + "Power": "Power", + "Pride": "Pride", + "Prisms": "Prisms", + "Privacy": "Privacy", + "Prophecy": "Prophecy", + "Psychology": "Psychology", + "PublicSpeaking": "Public Speaking", + "Puppies": "Puppies", + "Rain": "Rain", + "Ramen": "Ramen", + "Rats": "Rats", + "Reality": "Reality", + "Regret": "Regret", + "Regurgitation": "Regurgitation", + "Relaxation": "Relaxation", + "Relief": "Relief", + "Remorse": "Remorse", + "Repugnance": "Repugnance", + "RichMahogany": "Rich Mahogany", + "Riches": "Riches", + "Rocks": "Rocks", + "Rope": "Rope", + "Roses": "Roses", + "RottenFruit": "Rotten Fruit", + "RottingFlesh": "Rotting Flesh", + "Rumours": "Rumours", + "Sacrifice": "Sacrifice", + "Sacrilege": "Sacrilege", + "Sadness": "Sadness", + "Salesmen": "Salesmen", + "Sand": "Sand", + "Sandstone": "Sandstone", + "Sanity": "Sanity", + "Sap": "Sap", + "Saplings": "Saplings", + "Sashimi": "Sashimi", + "Satisfaction": "Satisfaction", + "Scandal": "Scandal", + "Scorpions": "Scorpions", + "Seasons": "Seasons", + "Seaweed": "Seaweed", + "Seclusion": "Seclusion", + "Secrecy": "Secrecy", + "Secrets": "Secrets", + "Seeds": "Seeds", + "SelfControl": "Self-control", + "SelfDisgust": "Self-disgust", + "SelfLoathing": "Self-loathing", + "Services": "Services", + "SeveredHeads": "Severed Heads", + "Shade": "Shade", + "Shadows": "Shadows", + "ShatteredHope": "Shattered Hope", + "Shivers": "Shivers", + "Shiverthorn": "Shiverthorn", + "Shock": "Shock", + "Shrimp": "Shrimp", + "Silliness": "Silliness", + "Silt": "Silt", + "Silver": "Silver", + "Sin": "Sin", + "Skeletons": "Skeletons", + "Skill": "Skill", + "Skin": "Skin", + "Skulls": "Skulls", + "Sleep": "Sleep", + "Slime": "Slime", + "Sloth": "Sloth", + "Sloths": "Sloths", + "Smiles": "Smiles", + "Smoke": "Smoke", + "Snails": "Snails", + "Snatchers": "Snatchers", + "Snow": "Snow", + "Solicitation": "Solicitation", + "Sorrow": "Sorrow", + "Spaghetti": "Spaghetti", + "Sparkles": "Sparkles", + "Spears": "Spears", + "Speed": "Speed", + "SpicyRamen": "Spicy Ramen", + "Spikes": "Spikes", + "Spirits": "Spirits", + "Splinters": "Splinters", + "Sponges": "Sponges", + "Sprinkles": "Sprinkles", + "Squid": "Squid", + "Squirrels": "Squirrels", + "StagnantWater": "Stagnant Water", + "Starfruit": "Starfruit", + "Starvation": "Starvation", + "Statues": "Statues", + "Stonks": "Stonks", + "Stone": "Stone", + "Strength": "Strength", + "Strictness": "Strictness", + "Stumps": "Stumps", + "Suffering": "Suffering", + "Sunflowers": "Sunflowers", + "Superstition": "Superstition", + "Surprise": "Surprise", + "Swagger": "Swagger", + "Swindlers": "Swindlers", + "Swords": "Swords", + "Talent": "Talent", + "Taxes": "Taxes", + "TeddysBread": "Teddy's Bread", + "Teeth": "Teeth", + "Terror": "Terror", + "the Ancients": "the Ancients", + "the Angler": "the Angler", + "the Apple": "the Apple", + "the Archer": "the Archer", + "the Aunt": "the Aunt", + "the Axe": "the Axe", + "the Baby": "the Baby", + "the Ball": "the Ball", + "the Balloon": "the Balloon", + "the Bat": "the Bat", + "the Beast": "the Beast", + "the Betrayed": "the Betrayed", + "the Blender": "the Blender", + "the Blood Moon": "the Blood Moon", + "the Bow": "the Bow", + "the Bride": "the Bride", + "the Brony": "the Brony", + "the Bubble": "the Bubble", + "the Bunny": "the Bunny", + "the Cactus": "the Cactus", + "the Cloud": "the Cloud", + "the Coma": "the Coma", + "the Corruptor": "the Corruptor", + "the Crab": "the Crab", + "the Dance": "the Dance", + "the Dark": "the Dark", + "the Dead": "the Dead", + "the Devourer": "the Devourer", + "the Drax": "the Drax", + "the Ducks": "the Ducks", + "the Eclipse": "the Eclipse", + "the Fairy": "the Fairy", + "the Father": "the Father", + "the Flu": "the Flu", + "the Foot": "the Foot", + "the Frozen": "the Frozen", + "the Gift": "the Gift", + "the Ginger": "the Ginger", + "the Goblin": "the Goblin", + "the Golem": "the Golem", + "the GreatestGeneration": "the Greatest Generation", + "the Groom": "the Groom", + "the Guest": "the Guest", + "the Hammer": "the Hammer", + "the Hammush": "the Hammush", + "the Head": "the Head", + "the Heavens": "the Heavens", + "the Hipster": "the Hipster", + "the Hobo": "the Hobo", + "the Homeless": "the Homeless", + "the King": "the King", + "the Law": "the Law", + "the Library": "the Library", + "the Lihzahrd": "the Lihzahrd", + "the Lilith": "the Lilith", + "the Lizard King": "the Lizard King", + "the LostGeneration": "the Lost Generation", + "the Mirror": "the Mirror", + "the Monster": "the Monster", + "the Moon": "the Moon", + "the Mother": "the Mother", + "the Mummy": "the Mummy", + "the Mushroom": "the Mushroom", + "the Narc": "the Narc", + "the Needy": "the Needy", + "the Nude": "the Nude", + "the Old One": "the Old One", + "the Pandemic": "the Pandemic", + "the Pickaxe": "the Pickaxe", + "the Picksaw": "the Picksaw", + "the Pigron": "the Pigron", + "the Po Boy": "the Po Boy", + "the Porcelain God": "the Porcelain God", + "the Prism": "the Prism", + "the Prophecy": "the Prophecy", + "the Pwnhammer": "the Pwnhammer", + "the Queen": "the Queen", + "the Ramen": "the Ramen", + "the Right": "the Right", + "the Scholar": "the Scholar", + "the Shark": "the Shark", + "the Sickle": "the Sickle", + "the Sky": "the Sky", + "the Snap": "the Snap", + "the Snitch": "the Snitch", + "the Spelunker": "the Spelunker", + "the Staff": "the Staff", + "the Stars": "the Stars", + "the Stench": "the Stench", + "the Stooge": "the Stooge", + "the Sun": "the Sun", + "the Sword": "the Sword", + "the Tooth": "the Tooth", + "The Torch God": "The Torch God", + "the Tortoise": "the Tortoise", + "the Tree": "the Tree", + "the Trend": "the Trend", + "the Undead": "the Undead", + "the Unicorn": "the Unicorn", + "the Union": "the Union", + "the Unknown": "the Unknown", + "the Varmint": "the Varmint", + "the Waraxe": "the Waraxe", + "the Yoyo": "the Yoyo", + "TanSuits": "Tan Suits", + "Thieves": "Thieves", + "Thorns": "Thorns", + "Thunder": "Thunder", + "Tin": "Tin", + "Tingling": "Tingling", + "Tiredness": "Tiredness", + "Titanium": "Titanium", + "Tombstones": "Tombstones", + "Torches": "Torches", + "Torment": "Torment", + "TornMuscles": "Torn Muscles", + "Torture": "Torture", + "Traitors": "Traitors", + "Tramps": "Tramps", + "Tranquility": "Tranquility", + "Traps": "Traps", + "Trash": "Trash", + "Treasure": "Treasure", + "Trees": "Trees", + "Trends": "Trends", + "Trouble": "Trouble", + "Truffles": "Truffles", + "Trunks": "Trunks", + "Trust": "Trust", + "Tungsten": "Tungsten", + "Twigs": "Twigs", + "Twilight": "Twilight", + "TwistedAnkles": "Twisted Ankles", + "Umbrellas": "Umbrellas", + "UnjustPrices": "Unjust Prices", + "Upchuck": "Upchuck", + "Vagabonds": "Vagabonds", + "Vampires": "Vampires", + "Vanity": "Vanity", + "Venom": "Venom", + "Victims": "Victims", + "Victory": "Victory", + "Villains": "Villains", + "Vines": "Vines", + "Violets": "Violets", + "Vomit": "Vomit", + "Vultures": "Vultures", + "Wands": "Wands", + "Wariness": "Wariness", + "Warmth": "Warmth", + "Wasps": "Wasps", + "Waterleaf": "Waterleaf", + "Weakness": "Weakness", + "Wealth": "Wealth", + "Webs": "Webs", + "Weeds": "Weeds", + "Werewolves": "Werewolves", + "Whoopsies": "Whoopsies", + "Wings": "Wings", + "Wires": "Wires", + "Wisdom": "Wisdom", + "Woe": "Woe", + "Wood": "Wood", + "Worms": "Worms", + "Worries": "Worries", + "Wrath": "Wrath", + "Wrenches": "Wrenches", + "Wyverns": "Wyverns", + "Xenon": "Xenon", + "Yoyos": "Yoyos", + "Zombies": "Zombies", + "Zoomers": "Zoomers" + }, + + "RichPresence": { + "Spaghet": "Cooking Spaghet", + "InMainMenu": "In Main Menu", + "CreatingPlayer": "Creating a Player", + "CreatingWorld": "Generating a World", + "PlayingSingle": "Playing Single-Player", + "PlayingMulti": "Playing Multi-Player" + }, + + "AssetRejections" : { + "BadSize": "Textures loaded must match the original size, got ({ActualWidth},{ActualHeight}) but expected ({NeededWidth}, {NeededHeight}).", + "BadExtension": "Only textures of type '.png' and '.xnb' may be loaded." + } +} \ No newline at end of file diff --git a/Localization/Content/en-US/Game.json b/Localization/Content/en-US/Game.json new file mode 100644 index 0000000..51df27b --- /dev/null +++ b/Localization/Content/en-US/Game.json @@ -0,0 +1,2119 @@ +{ + "WorldGeneration": { + "OceanSand": "Generating ocean sand" + }, + "LoadingTips_Default": { + "1": "Other players can loot your chests! If you don't trust them, use a Safe or Piggy Bank; those items have storage that is exclusive to each player.", + "2": "Info accessories don't need to be equipped to provide you and nearby friends with useful information; you can just leave them in your Inventory.", + "3": "Rope can really help you get around while exploring caves. You can even craft it into a Rope Coil which can be thrown and automatically unfolds!", + "4": "Mushroom Biomes can be grown above ground as well as below. Friendly Truffles will sometimes make themselves at home in Surface Mushroom Biomes.", + "5": "You can change your spawn point by placing and using a bed.", + "6": "If you find a Magic Mirror, you can use it to teleport back to your spawn point.", + "7": "There are Floating Islands in the sky.", + "8": "Sometimes you can find NPCs hidden around the World.", + "9": "During a Blood Moon, Zombies can open doors.", + "10": "Water will break your fall.", + "11": "Torches and Glowsticks can be a light for you in dark places when all other lights go out. Torches won't work underwater, but Glowsticks will.", + "12": "Don't fall into lava without drinking an Obsidian Skin Potion first!", + "13": "You won't take falling damage if you have a Lucky Horseshoe. Look for them on Floating Islands.", + "14": "Walking on Hellstone and Meteorite can burn you! Protect yourself by equipping an Obsidian Skull or similar accessory.", + "15": "Life Crystals are hidden around the World. Use them to increase your health.", + "16": "Torches require Wood and Gel to craft. Gel can be obtained by defeating slimes.", + "17": "Some ores require better pickaxes to mine.", + "18": "Bosses are easier to defeat with friends.", + "19": "Bows and guns require the proper ammo in your Ammo Slots.", + "20": "The Old Man at the Dungeon is a Clothier. If only someone could lift his curse...", + "21": "Merchants love money. If you save up enough, one might move in!", + "22": "Keep an explosive in your inventory or a storage container to attract a Demolitionist to your house.", + "23": "Make sure you have valid housing with empty rooms, and you may attract new inhabitants to your World.", + "24": "When exploring, it helps to keep some Platforms on hand. They can be crafted from numerous materials such as Wood, Glass, or even Bones.", + "25": "Slay a boss to attract a Dryad to your house. She can tell you the state of Corruption, Crimson, and Hallow in your World.", + "26": "Advanced players may wish to remap their buttons; you can do this from the Controls Menu in Settings.", + "27": "Wear a Mining Helmet if you don't want to use Torches.", + "28": "You can wear Buckets on your head!", + "29": "Defeat the boss in The Underworld to change the World forever. Find a Guide Voodoo Doll and hurl it into the infernal lava to summon him.", + "30": "Demon Altars and Crimson Altars can't be destroyed with a normal hammer. You have to pwn them.", + "31": "Killing Bunnies is cruel. Period.", + "32": "Falling Stars sometimes appear at night. Collect 3 of them to craft a Mana Crystal you can use to increase your Mana.", + "33": "Watch out for Meteorites!", + "34": "A pet can be your best friend.", + "35": "If you dig deep enough, you'll end up in The Underworld!", + "36": "Santa Claus is real. He comes to town after the Frost Legion is defeated (and 'tis the season).", + "37": "Don't shake a Snow Globe unless you want to summon the Frost Legion.", + "38": "You can use Hallowed Seeds, Holy Water, or Pearlstone to make Hallow spread.", + "39": "The Hallow is the only place where Corruption and Crimson cannot spread.", + "40": "The Corruption is full of chasms. Mind the gaps.", + "41": "Time heals all wounds.", + "42": "You can plant Acorns to grow new trees.", + "43": "Rocket science gave us Rocket Boots.", + "44": "The Cloud in a Bottle and Shiny Red Balloon accessories both improve your ability to jump. Combine them to make a Cloud in a Balloon.", + "45": "If you store your Coins in a Chest or Piggy Bank, you will be less likely to lose them.", + "46": "To craft potions, place a Bottle on a Table to make an Alchemy Station. Double, double, toil and trouble!", + "47": "If your house doesn't have background walls, monsters will be able to spawn inside.", + "48": "Wearing a full set of armor crafted from the same material gives you an extra bonus.", + "49": "Build a Furnace to craft metal bars out of ore.", + "50": "You can harvest Cobwebs and turn them into Silk. You can use Silk to craft beds, sofas, and more!", + "51": "You can buy Wires from the Mechanic and use them to create traps, pumping systems, or other elaborate devices.", + "52": "The Housing section of the Equipment Menu allows you to decide what rooms you want your NPCs to live in.", + "53": "If you're sick of getting knocked around, try equipping a Cobalt Shield. You can find one in the Dungeon.", + "54": "Grappling Hooks are invaluable tools for exploration. Try crafting them with Hooks or gems.", + "55": "A room in a house can have Wood Platforms as a floor or ceiling, but NPCs need at least one solid block to stand on.", + "56": "You can destroy Shadow Orbs and Crimson Hearts with a hammer or explosives, but prepare yourself for the forces they unleash.", + "57": "When dealing with a Goblin Army, crowd control is key.", + "58": "The best wizards around use Mana Flowers.", + "59": "Use \"suspicious looking items\" at your own risk!", + "60": "Sand is overpowered.", + "61": "The Goblin Tinkerer found in Underground Caverns will sell you many useful items, including a Tinkerer's Workshop.", + "62": "You can check if a room is valid housing from the Housing section of the Inventory Menu.", + "63": "Seeds can be used to grow a variety of useful ingredients for crafting potions.", + "65": "If you get lost or need to find another player, open the World Map.", + "66": "If you need to remove background walls, craft a hammer!", + "67": "Got some extra walls or platforms? You can turn them back into their original materials!", + "68": "Fishing is a fantastic source of crafting ingredients, accessories, and loot crates!", + "69": "Nothing improves your mobility like Wings. Who wouldn't want to fly?", + "70": "Riding Minecarts is one of the best ways of getting around. You can build your own tracks, or find them Underground.", + "71": "Life Crystals not enough for you? Eventually, Life Fruit will grow in the Jungle, and can give you an extra boost to your health.", + "72": "Change your clothes in game at a Dresser or talk to the Stylist for a new hairdo.", + "73": "Mounts grant the player increased mobility and a variety of useful abilities. Each one is unique!", + "74": "Looking for a challenge? Try Expert mode!", + "75": "Be careful around Martian Probes. If they scan you, they'll summon a Martian Invasion!", + "76": "During a Solar Eclipse, be on the lookout for tons of strange and creepy monsters.", + "77": "Sometimes, enemies may even invade from other dimensions . . .", + "78": "A Pumpkin Medallion can be used to summon the Pumpkin Moon. Spooky!", + "79": "Feeling up for the chill of winter? Use a Naughty Present to summon the Frost Moon!", + "80": "When a Sandstorm hits, deserts can be very dangerous. New enemies, reduced visibility, and it can even be hard to move!", + "81": "The Arms Dealer knows more about guns than anyone. If you find one, he might move in.", + "82": "The Mechanic got lost in the Dungeon. You'll have to help her out if you want her to move in.", + "83": "Once you use a Life Crystal, a Nurse might move in! Speak to her for healing at any time . . . for a price, of course.", + "84": "If you ever want to get stylish, try dyes! The Dye Trader can help you turn some materials into new dye colors.", + "85": "The Tavernkeep is a guest from a faraway land called Etheria.", + "86": "If you need a new haircut, go check out a nearby Spider Biome. Stylists always end up lost in them!", + "87": "Regular Wood and Stone not vibrant enough for you? A Painter will move in and sell paints if enough townsfolk move in.", + "88": "It's worth it to explore your Oceans. You can find treasure, dyes, and even sleeping fishermen.", + "89": "You could get a Witch Doctor to come to your World if you defeat the Queen Bee.", + "90": "The Party Girl won't move in unless your World is full of other townsfolk. Afterall, what's a party without lots of guests?", + "91": "The Wizard sells some useful magic artifacts, but he has a tendency to wander off Underground.", + "92": "The Tax Collector spends his days wandering the Underworld as a Tortured Soul. If only there were a way to purify him . . .", + "93": "Pirates are so unpredictable. First they invade your world, and then they move into your houses!", + "94": "If you ever defeat any giant robots, a Steampunker might move in to your World.", + "95": "If you like rockets, the Cyborg may have some for sale.", + "96": "The Traveling Merchant never stays in one place for long, but he always brings different wares when he visits!", + "97": "Not all Skeletons are evil. Some are even known to sell unique items to those that can find them.", + "98": "Not sure what to do next? Take a look at the Achievement Guide for a clue!", + "99": "If an enemy steals your money after you die in Expert Mode, hunt it down! If you defeat it, you can get your money back.", + "100": "With the Block Swap mechanic enabled, you can replace one block with another directly, rather than having to mine it first.", + "101": "Keep an eye out for Goodie Bags around Halloween. If you open them, you can find all sorts of spooky items. Trick or Treat!", + "102": "Clouds are nice and soft, and you won't get hurt falling on them no matter how far you fall.", + "103": "Did you know you can order your Summons to attack a specific target? While holding a Summoning Weapon, Right Click an enemy!", + "104": "Press the + and - keys to zoom in & out! Focus on what matters!", + "105": "Have something on the Map to show a friend? Double click on the Map to ping a location for everyone to see!", + "106": "The Void Bag is a magical artifact that will store items for you when your inventory is full.", + "107": "Enemies aren't the only danger when exploring Underground. Watch out for traps too!", + "108": "Find a cool new Material? Want to know what you can make? Check with your friendly neighborhood Guide!", + "109": "Have some NPCs perished? Don't worry, they'll be back in the morning.", + "110": "Explosives are dangerous!\n...and effective..." + }, + "LoadingTips_GamePad": { + "0": "You can assign your favorite items to the DPad for rapid use by enabling DPad Hotbar in Gamepad Settings!", + "1": "You can continuously use some items by holding down the {InputTrigger_UseOrAttack} button.", + "2": "Press {InputTrigger_SmartCursor} to switch between Cursor Modes.", + "3": "If your Inventory is full, you can press {InputTriggerUI_Trash} to send items to the Trash.", + "4": "When speaking to a vendor, you can sell items in your Inventory by pressing {InputTriggerUI_SellItem}.", + "5": "You can remove Torches with {InputTrigger_InteractWithTile} or with a pickaxe.", + "6": "In your Inventory, you can press {InputTrigger_QuickEquip} to equip items such as armor or accessories directly to a usable slot.", + "7": "Hold {InputTrigger_SmartSelect} to use Auto Select, a versatile feature that adapts to your environment. It will allow you to automatically hold your Torches in dark caves, Glowsticks when underwater, or even select the right tool for breaking something.", + "8": "Press {InputTriggerUI_FavoriteItem} to Favorite an item. Favorited items can no longer be sold, thrown away, or dropped. No more accidentally losing your favorite items!", + "9": "While navigating your Inventory, press {InputTriggerUI_BuildFromInventory} while highlighting a tool or block to build directly from your Inventory.", + "10": "Hold {InputTrigger_RadialQuickbar} and {InputTrigger_RadialHotbar} to bring up the Radial Quickbar and Radial Hotbar menus. These will allow you to quickly access potions, mounts, and the items in your hotbar.", + "11": "There are multiple Gamepad control layouts available in the menu. Choose from Redigit's Pick, Yoraiz0r's Pick, Xbox, Playstation, or even make your own Custom settings!", + "12": "If you select DPad Cursor Snap in the Gamepad settings, you can use the DPad for improved precision when mining or building.", + "13": "When using Gamepad, you can lock on to enemies by pressing {InputTrigger_LockOn}. Locked on targets will be marked by a spinning reticle, and long range weapons will automatically aim at your target!" + }, + "LoadingTips_Keyboard": { + "0": "You can continuously use some items by holding down the {InputTrigger_UseOrAttack} button.", + "1": "Press {InputTrigger_SmartCursor} to switch between Cursor Modes.", + "2": "If your Inventory is full, you can press {InputTriggerUI_Trash} and {InputTrigger_UseOrAttack} to send items to the Trash.", + "3": "When speaking to a vendor, you can sell items in your Inventory by pressing {InputTriggerUI_Trash} and {InputTrigger_UseOrAttack}.", + "4": "You can remove Torches with {InputTrigger_InteractWithTile} or with a pickaxe.", + "5": "In your Inventory, you can press {InputTrigger_InteractWithTile} to equip items such as armor or accessories directly to a usable slot.", + "6": "Hold {InputTrigger_SmartSelect} to use Auto Select, a versatile feature that adapts to your environment. It will allow you to automatically hold your Torches in dark caves, Glowsticks when underwater, or even select the right tool for breaking something.", + "7": "Press {InputTriggerUI_FavoriteItem} and {InputTrigger_UseOrAttack} to Favorite an item. Favorited items can no longer be sold, thrown away, or dropped. No more accidentally losing your favorite items!" + }, + "ChatCommand": { + "Party": "/p", + "Emote": "/me", + "Playing_0": "{$LegacyMultiplayer.6}", + "Playing_1": "{$LegacyMultiplayer.21}", + "Roll": "{$LegacyMultiplayer.8}", + "Emoji_0": "/emoji", + "Emoji_1": "/e", + "Help": "/help", + "RPS": "/rps" + }, + "ChatCommandDescription": { + "Party": "{$ChatCommand.Party} message: Send the message to your party members", + "Emote": "{$ChatCommand.Emote} message: Send the message in third-person perspective", + "Playing": "{$ChatCommand.Playing_0}: List the names of all players on the server", + "Roll": "{$ChatCommand.Roll}: Roll a number from 1 to 100", + "Emoji": "{$ChatCommand.Emoji_1}: Show your emoji", + "Help": "{$ChatCommand.Help}: Lists all the commands you can use", + "RPS": "{$ChatCommand.RPS}: Randomly uses a Rock, Paper, or Scissors emote" + }, + "EmojiCommand": { + "EmotionLove": "/{$EmojiName.EmotionLove}", + "EmotionAnger": "/{$EmojiName.EmotionAnger}", + "EmotionCry": "/{$EmojiName.EmotionCry}", + "EmotionAlert": "/{$EmojiName.EmotionAlert}", + "WeatherRain": "/{$EmojiName.WeatherRain}", + "WeatherLightning": "/{$EmojiName.WeatherLightning}", + "WeatherRainbow": "/{$EmojiName.WeatherRainbow}", + "ItemRing": "/{$EmojiName.ItemRing}", + "DebuffPoison": "/{$EmojiName.DebuffPoison}", + "DebuffBurn": "/{$EmojiName.DebuffBurn}", + "DebuffSilence": "/{$EmojiName.DebuffSilence}", + "DebuffCurse": "/{$EmojiName.DebuffCurse}", + "CritterBee": "/{$EmojiName.CritterBee}", + "CritterSlime": "/{$EmojiName.CritterSlime}", + "MiscTree": "/{$EmojiName.MiscTree}", + "EmoteLaugh": "/{$EmojiName.EmoteLaugh}", + "EmoteFear": "/{$EmojiName.EmoteFear}", + "EmoteNote": "/{$EmojiName.EmoteNote}", + "EventBloodmoon": "/{$EmojiName.EventBloodmoon}", + "EventEclipse": "/{$EmojiName.EventEclipse}", + "EventPumpkin": "/{$EmojiName.EventPumpkin}", + "EventSnow": "/{$EmojiName.EventSnow}", + "BiomeSky": "/{$EmojiName.BiomeSky}", + "BiomeOtherworld": "/{$EmojiName.BiomeOtherworld}", + "BiomeJungle": "/{$EmojiName.BiomeJungle}", + "BiomeCrimson": "/{$EmojiName.BiomeCrimson}", + "BiomeCorruption": "/{$EmojiName.BiomeCorruption}", + "BiomeHallow": "/{$EmojiName.BiomeHallow}", + "BiomeDesert": "/{$EmojiName.BiomeDesert}", + "BiomeBeach": "/{$EmojiName.BiomeBeach}", + "BiomeRocklayer": "/{$EmojiName.BiomeRocklayer}", + "BiomeLavalayer": "/{$EmojiName.BiomeLavalayer}", + "BiomeSnow": "/{$EmojiName.BiomeSnow}", + "RPSWinScissors": "/{$EmojiName.RPSWinScissors}", + "RPSWinRock": "/{$EmojiName.RPSWinRock}", + "RPSWinPaper": "/{$EmojiName.RPSWinPaper}", + "RPSScissors": "/{$EmojiName.RPSScissors}", + "RPSRock": "/{$EmojiName.RPSRock}", + "RPSPaper": "/{$EmojiName.RPSPaper}", + "BossEoC": "/{$EmojiName.BossEoC}", + "BossEoW": "/{$EmojiName.BossEoW}", + "BossBoC": "/{$EmojiName.BossBoC}", + "BossQueenBee": "/{$EmojiName.BossQueenBee}", + "BossSkeletron": "/{$EmojiName.BossSkeletron}", + "BossWoF": "/{$EmojiName.BossWoF}", + "BossDestroyer": "/{$EmojiName.BossDestroyer}", + "BossSkeletronPrime": "/{$EmojiName.BossSkeletronPrime}", + "BossTwins": "/{$EmojiName.BossTwins}", + "BossPlantera": "/{$EmojiName.BossPlantera}", + "BossGolem": "/{$EmojiName.BossGolem}", + "BossFishron": "/{$EmojiName.BossFishron}", + "BossKingSlime": "/{$EmojiName.BossKingSlime}", + "BossCultist": "/{$EmojiName.BossCultist}", + "BossMoonmoon": "/{$EmojiName.BossMoonmoon}", + "BossMourningWood": "/{$EmojiName.BossMourningWood}", + "BossPumpking": "/{$EmojiName.BossPumpking}", + "BossEverscream": "/{$EmojiName.BossEverscream}", + "BossIceQueen": "/{$EmojiName.BossIceQueen}", + "BossSantank": "/{$EmojiName.BossSantank}", + "BossPirateship": "/{$EmojiName.BossPirateship}", + "BossMartianship": "/{$EmojiName.BossMartianship}", + "CritterZombie": "/{$EmojiName.CritterZombie}", + "CritterBunny": "/{$EmojiName.CritterBunny}", + "CritterButterfly": "/{$EmojiName.CritterButterfly}", + "CritterGoblin": "/{$EmojiName.CritterGoblin}", + "CritterPirate": "/{$EmojiName.CritterPirate}", + "CritterSnowman": "/{$EmojiName.CritterSnowman}", + "CritterSpider": "/{$EmojiName.CritterSpider}", + "CritterBird": "/{$EmojiName.CritterBird}", + "CritterMouse": "/{$EmojiName.CritterMouse}", + "CritterGoldfish": "/{$EmojiName.CritterGoldfish}", + "CritterMartian": "/{$EmojiName.CritterMartian}", + "CritterSkeleton": "/{$EmojiName.CritterSkeleton}", + "ItemLifePotion": "/{$EmojiName.ItemLifePotion}", + "ItemManaPotion": "/{$EmojiName.ItemManaPotion}", + "ItemSoup": "/{$EmojiName.ItemSoup}", + "ItemCookedFish": "/{$EmojiName.ItemCookedFish}", + "ItemAle": "/{$EmojiName.ItemAle}", + "ItemSword": "/{$EmojiName.ItemSword}", + "ItemFishingRod": "/{$EmojiName.ItemFishingRod}", + "ItemBugNet": "/{$EmojiName.ItemBugNet}", + "ItemDynamite": "/{$EmojiName.ItemDynamite}", + "ItemMinishark": "/{$EmojiName.ItemMinishark}", + "ItemCog": "/{$EmojiName.ItemCog}", + "ItemTombstone": "/{$EmojiName.ItemTombstone}", + "ItemGoldpile": "/{$EmojiName.ItemGoldpile}", + "ItemDiamondRing": "/{$EmojiName.ItemDiamondRing}", + "EmoteConfused": "/{$EmojiName.EmoteConfused}", + "EmoteKiss": "/{$EmojiName.EmoteKiss}", + "EmoteSleep": "/{$EmojiName.EmoteSleep}", + "ItemPickaxe": "/{$EmojiName.ItemPickaxe}", + "EmoteRun": "/{$EmojiName.EmoteRun}", + "EmoteKick": "/{$EmojiName.EmoteKick}", + "EmoteFight": "/{$EmojiName.EmoteFight}", + "EmoteEating": "/{$EmojiName.EmoteEating}", + "WeatherSunny": "/{$EmojiName.WeatherSunny}", + "WeatherCloudy": "/{$EmojiName.WeatherCloudy}", + "WeatherStorming": "/{$EmojiName.WeatherStorming}", + "WeatherSnowstorm": "/{$EmojiName.WeatherSnowstorm}", + "EventMeteor": "/{$EmojiName.EventMeteor}", + "MiscFire": "/{$EmojiName.MiscFire}", + "TownMerchant": "/{$EmojiName.TownMerchant}", + "TownNurse": "/{$EmojiName.TownNurse}", + "TownArmsDealer": "/{$EmojiName.TownArmsDealer}", + "TownDryad": "/{$EmojiName.TownDryad}", + "TownGuide": "/{$EmojiName.TownGuide}", + "TownOldman": "/{$EmojiName.TownOldman}", + "TownDemolitionist": "/{$EmojiName.TownDemolitionist}", + "TownClothier": "/{$EmojiName.TownClothier}", + "TownGoblinTinkerer": "/{$EmojiName.TownGoblinTinkerer}", + "TownWizard": "/{$EmojiName.TownWizard}", + "TownMechanic": "/{$EmojiName.TownMechanic}", + "TownSanta": "/{$EmojiName.TownSanta}", + "TownTruffle": "/{$EmojiName.TownTruffle}", + "TownSteampunker": "/{$EmojiName.TownSteampunker}", + "TownDyeTrader": "/{$EmojiName.TownDyeTrader}", + "TownPartyGirl": "/{$EmojiName.TownPartyGirl}", + "TownCyborg": "/{$EmojiName.TownCyborg}", + "TownPainter": "/{$EmojiName.TownPainter}", + "TownWitchDoctor": "/{$EmojiName.TownWitchDoctor}", + "TownPirate": "/{$EmojiName.TownPirate}", + "TownStylist": "/{$EmojiName.TownStylist}", + "TownTravellingMerchant": "/{$EmojiName.TownTravellingMerchant}", + "TownAngler": "/{$EmojiName.TownAngler}", + "TownSkeletonMerchant": "/{$EmojiName.TownSkeletonMerchant}", + "TownTaxCollector": "/{$EmojiName.TownTaxCollector}", + "PartyPresent": "/{$EmojiName.PartyPresent}", + "PartyBalloons": "/{$EmojiName.PartyBalloons}", + "PartyCake": "/{$EmojiName.PartyCake}", + "PartyHats": "/{$EmojiName.PartyHats}", + "TownBartender": "/{$EmojiName.TownBartender}", + "ItemBeer": "/{$EmojiName.ItemBeer}", + "ItemDefenderMedal": "/{$EmojiName.ItemDefenderMedal}", + "EventOldOnesArmy": "/{$EmojiName.EventOldOnesArmy}", + "EmoteSadness": "/{$EmojiName.EmoteSadness}", + "EmoteAnger": "/{$EmojiName.EmoteAnger}", + "EmoteHappiness": "/{$EmojiName.EmoteHappiness}", + "EmoteWink": "/{$EmojiName.EmoteWink}", + "EmoteScowl": "/{$EmojiName.EmoteScowl}", + "EmoteSilly": "/{$EmojiName.EmoteSilly}", + "TownGolfer": "/{$EmojiName.TownGolfer}", + "TownBestiaryGirl": "/{$EmojiName.TownBestiaryGirl}", + "TownBestiaryGirlFox": "/{$EmojiName.TownBestiaryGirlFox}", + "BossEmpressOfLight": "/{$EmojiName.BossEmpressOfLight}", + "BossQueenSlime": "/{$EmojiName.BossQueenSlime}" + }, + "EmojiName": { + "EmotionLove": "heart", + "EmotionAnger": "angry", + "EmotionCry": "cry", + "EmotionAlert": "alert", + "WeatherRain": "rain", + "WeatherLightning": "lightning", + "WeatherRainbow": "rainbow", + "ItemRing": "ring", + "DebuffPoison": "poison", + "DebuffBurn": "burn", + "DebuffSilence": "silent", + "DebuffCurse": "curse", + "CritterBee": "bee", + "CritterSlime": "slime", + "MiscTree": "tree", + "EmoteLaugh": "laugh", + "EmoteFear": "fear", + "EmoteNote": "music", + "EventBloodmoon": "bloodmoon", + "EventEclipse": "eclipse", + "EventPumpkin": "pumpkinmoon", + "EventSnow": "frostmoon", + "BiomeSky": "sky", + "BiomeOtherworld": "surface", + "BiomeJungle": "jungle", + "BiomeCrimson": "crimson", + "BiomeCorruption": "corruption", + "BiomeHallow": "hallow", + "BiomeDesert": "desert", + "BiomeBeach": "beach", + "BiomeRocklayer": "rockbiome", + "BiomeLavalayer": "lavabiome", + "BiomeSnow": "snow", + "RPSWinScissors": "scissorswins", + "RPSWinRock": "rockwins", + "RPSWinPaper": "paperwins", + "RPSScissors": "scissors", + "RPSRock": "rock", + "RPSPaper": "paper", + "BossEoC": "eoc", + "BossEoW": "eow", + "BossBoC": "boc", + "BossQueenBee": "queenbee", + "BossSkeletron": "skeletron", + "BossWoF": "wof", + "BossDestroyer": "destroyer", + "BossSkeletronPrime": "skeletronprime", + "BossTwins": "twins", + "BossPlantera": "plantera", + "BossGolem": "golem", + "BossFishron": "fishron", + "BossKingSlime": "kingslime", + "BossCultist": "cultist", + "BossMoonmoon": "moonlord", + "BossMourningWood": "mourningwood", + "BossPumpking": "pumpking", + "BossEverscream": "everscream", + "BossIceQueen": "icequeen", + "BossSantank": "santank", + "BossPirateship": "pirateship", + "BossMartianship": "martianship", + "CritterZombie": "zombie", + "CritterBunny": "bunny", + "CritterButterfly": "butterfly", + "CritterGoblin": "goblin", + "CritterPirate": "deadeye", + "CritterSnowman": "snowman", + "CritterSpider": "spider", + "CritterBird": "bird", + "CritterMouse": "mouse", + "CritterGoldfish": "goldfish", + "CritterMartian": "martian", + "CritterSkeleton": "skeleton", + "ItemLifePotion": "lifepotion", + "ItemManaPotion": "manapotion", + "ItemSoup": "soup", + "ItemCookedFish": "cookedfish", + "ItemAle": "ale", + "ItemSword": "sword", + "ItemFishingRod": "fishingrod", + "ItemBugNet": "bugnet", + "ItemDynamite": "dynamite", + "ItemMinishark": "minishark", + "ItemCog": "cog", + "ItemTombstone": "tombstone", + "ItemGoldpile": "goldpile", + "ItemDiamondRing": "diamondring", + "EmoteConfused": "confused", + "EmoteKiss": "kiss", + "EmoteSleep": "sleep", + "ItemPickaxe": "pickaxe", + "EmoteRun": "run", + "EmoteKick": "kicking", + "EmoteFight": "fight", + "EmoteEating": "hungry", + "WeatherSunny": "sunny", + "WeatherCloudy": "cloudy", + "WeatherStorming": "storming", + "WeatherSnowstorm": "blizzard", + "EventMeteor": "meteor", + "MiscFire": "fire", + "TownMerchant": "merchant", + "TownNurse": "nurse", + "TownArmsDealer": "armsdealer", + "TownDryad": "dryad", + "TownGuide": "guide", + "TownOldman": "oldman", + "TownDemolitionist": "demo", + "TownClothier": "clothier", + "TownGoblinTinkerer": "tinkerer", + "TownWizard": "wizard", + "TownMechanic": "mechanic", + "TownSanta": "santa", + "TownTruffle": "truffle", + "TownSteampunker": "steampunker", + "TownDyeTrader": "dyetrader", + "TownPartyGirl": "partygirl", + "TownCyborg": "cyborg", + "TownPainter": "painter", + "TownWitchDoctor": "witchdoctor", + "TownPirate": "pirate", + "TownStylist": "stylist", + "TownTravellingMerchant": "travelingmerchant", + "TownAngler": "angler", + "TownSkeletonMerchant": "skeletonmerchant", + "TownTaxCollector": "taxcollector", + "PartyPresent": "present", + "PartyBalloons": "balloon", + "PartyCake": "cake", + "PartyHats": "partyhat", + "TownBartender": "bartender", + "ItemBeer": "beer", + "ItemDefenderMedal": "defendermedal", + "EventOldOnesArmy": "oldonesarmy", + "EmoteSadness": "sad", + "EmoteAnger": "mad", + "EmoteHappiness": "happy", + "EmoteWink": "wink", + "EmoteScowl": "scowl", + "EmoteSilly": "silly", + "TownGolfer": "golfer", + "TownBestiaryGirl": "zoologist", + "TownBestiaryGirlFox": "zoologistfox", + "BossEmpressOfLight": "eol", + "BossQueenSlime": "queenslime" + }, + "Announcement": { + "HasBeenDefeated_Single": "{0} has been defeated!", + "HasBeenDefeated_Plural": "{0} have been defeated!", + "HasAwoken": "{0} has awoken!", + "HasArrived": "{0} has arrived!" + }, + "MapObject": { + "Tree": "Tree", + "Iron": "Iron", + "Copper": "Copper", + "Gold": "Gold", + "Silver": "Silver", + "Door": "Door", + "Table": "Table", + "Chair": "Chair", + "Anvil": "Anvil", + "Sapling": "Sapling", + "Demonite": "Demonite", + "DemonAltar": "Demon Altar", + "CrimsonAltar": "Crimson Altar", + "Fossil": "Fossil", + "Pot": "Pot", + "Thorns": "Thorns", + "Chandelier": "Chandelier", + "Lantern": "Lantern", + "Web": "Web", + "Thorn": "Thorn", + "GiantMushroom": "Giant Mushroom", + "Banner": "Banner", + "FloorLamp": "Floor Lamp", + "Statue": "Statue", + "Vase": "Vase", + "Cobalt": "Cobalt", + "Mythril": "Mythril", + "Adamantite": "Adamantite", + "Trap": "Trap", + "Timer": "Timer", + "ChristmasLight": "Christmas Light", + "Tin": "Tin", + "Lead": "Lead", + "Tungsten": "Tungsten", + "Platinum": "Platinum", + "PineTree": "Pine Tree", + "Sink": "Sink", + "LivingWood": "Living Wood", + "Crimtane": "Crimtane", + "WaterFountain": "Water Fountain", + "Chlorophyte": "Chlorophyte", + "Turret": "Turret", + "Rocket": "Rocket", + "SiltExtractinator": "Silt Extractinator", + "Palladium": "Palladium", + "Orichalcum": "Orichalcum", + "Titanium": "Titanium", + "Larva": "Larva", + "PlanterasBulb": "Plantera's Bulb", + "MetalBar": "Metal Bar", + "Trophy": "Trophy", + "ItemRack": "Item Rack", + "Painting": "Painting", + "AnimalSkin": "Animal Skin", + "Picture": "Picture", + "OrangeSquirrelCage": "Orange Squirrel Cage", + "PalmTree": "Palm Tree", + "DrippingWater": "Dripping Water", + "DrippingLava": "Dripping Lava", + "DrippingHoney": "Dripping Honey", + "SandFlow": "Sand Flow", + "BeeHive": "Bee Hive", + "DesertFossil": "Fossil", + "GeyserTrap": "Geyser", + "WireBulb": "Wire Bulb", + "FallenLog": "Fallen Log", + "GoldBirdCage": "Gold Bird Cage", + "GoldBunnyCage": "Gold Bunny Cage", + "GoldButterflyCage": "Gold Butterfly Jar", + "GoldFrogCage": "Gold Frog Cage", + "GoldGrasshopperCage": "Gold Grasshopper Cage", + "GoldMouseCage": "Gold Mouse Cage", + "GoldWormCage": "Gold Worm Cage", + "SquirrelGoldCage": "Gold Squirrel Cage", + "Toilet": "Toilet", + "TeleportationPylon": "Teleportation Pylon", + "Relic": "Relic" + + }, + "BuffName": { + "ObsidianSkin": "Obsidian Skin", + "Regeneration": "Regeneration", + "Swiftness": "Swiftness", + "Gills": "Gills", + "Ironskin": "Ironskin", + "ManaRegeneration": "Mana Regeneration", + "MagicPower": "Magic Power", + "Featherfall": "Featherfall", + "Spelunker": "Spelunker", + "Invisibility": "Invisibility", + "Shine": "Shine", + "NightOwl": "Night Owl", + "Battle": "Battle", + "Thorns": "Thorns", + "WaterWalking": "Water Walking", + "Archery": "Archery", + "Hunter": "Hunter", + "Gravitation": "Gravitation", + "ShadowOrb": "Shadow Orb", + "Poisoned": "Poisoned", + "PotionSickness": "Potion Sickness", + "Darkness": "Darkness", + "Cursed": "Cursed", + "OnFire": "On Fire!", + "Tipsy": "Tipsy", + "FairyBlue": "Fairy", + "Werewolf": "Werewolf", + "Clairvoyance": "Clairvoyance", + "Bleeding": "Bleeding", + "Confused": "Confused", + "Slow": "Slow", + "Weak": "Weak", + "Merfolk": "Merfolk", + "Silenced": "Silenced", + "BrokenArmor": "Broken Armor", + "Horrified": "Horrified", + "TheTongue": "The Tongue", + "CursedInferno": "Cursed Inferno", + "PetBunny": "Pet Bunny", + "BabyPenguin": "Baby Penguin", + "PetTurtle": "Pet Turtle", + "PaladinsShield": "Paladin's Shield", + "Frostburn": "Frostburn", + "BabyEater": "Baby Eater", + "Chilled": "Chilled", + "Frozen": "Frozen", + "Honey": "Honey", + "Pygmies": "Pygmies", + "BabySkeletronHead": "Baby Skeletron Head", + "BabyHornet": "Baby Hornet", + "TikiSpirit": "Tiki Spirit", + "PetLizard": "Pet Lizard", + "PetParrot": "Pet Parrot", + "BabyTruffle": "Baby Truffle", + "PetSapling": "Pet Sapling", + "Wisp": "Wisp", + "RapidHealing": "Rapid Healing", + "ShadowDodge": "Holy Protection", + "LeafCrystal": "Leaf Crystal", + "BabyDinosaur": "Baby Dinosaur", + "IceBarrier": "Ice Barrier", + "Panic": "Panic!", + "BabySlime": "Baby Slime", + "EyeballSpring": "Eyeball Spring", + "BabySnowman": "Baby Snowman", + "Burning": "Burning", + "Suffocation": "Suffocation", + "Ichor": "Ichor", + "Venom": "Venom", + "Midas": "Midas", + "Blackout": "Blackout", + "PetSpider": "Pet Spider", + "Squashling": "Squashling", + "Ravens": "Ravens", + "BlackCat": "Black Cat", + "CursedSapling": "Cursed Sapling", + "WaterCandle": "Water Candle", + "PeaceCandle": "Peace Candle", + "Campfire": "Cozy Fire", + "ChaosState": "Chaos State", + "HeartLamp": "Heart Lamp", + "Rudolph": "Rudolph", + "Puppy": "Puppy", + "BabyGrinch": "Baby Grinch", + "AmmoBox": "Ammo Box", + "ManaSickness": "Mana Sickness", + "BeetleEndurance1": "Beetle Endurance", + "BeetleEndurance2": "Beetle Endurance", + "BeetleEndurance3": "Beetle Endurance", + "BeetleMight1": "Beetle Might", + "BeetleMight2": "Beetle Might", + "BeetleMight3": "Beetle Might", + "FairyRed": "Fairy", + "FairyGreen": "Fairy", + "Wet": "Wet", + "Mining": "Mining", + "Heartreach": "Heartreach", + "Calm": "Calm", + "Builder": "Builder", + "Titan": "Titan", + "Flipper": "Flipper", + "Summoning": "Summoning", + "Dangersense": "Dangersense", + "AmmoReservation": "Ammo Reservation", + "Lifeforce": "Lifeforce", + "Endurance": "Endurance", + "Rage": "Rage", + "Inferno": "Inferno", + "Wrath": "Wrath", + "MinecartLeft": "Minecart", + "MinecartRight": "Minecart", + "Lovestruck": "Lovestruck", + "Stinky": "Stinky", + "Fishing": "Fishing", + "Sonar": "Sonar", + "Crate": "Crate", + "Warmth": "Warmth", + "HornetMinion": "Hornet", + "ImpMinion": "Imp", + "ZephyrFish": "Zephyr Fish", + "BunnyMount": "Bunny Mount", + "PigronMount": "Pigron Mount", + "SlimeMount": "Slime Mount", + "TurtleMount": "Turtle Mount", + "BeeMount": "Bee Mount", + "SpiderMinion": "Spider", + "TwinEyesMinion": "Twins", + "PirateMinion": "Pirate", + "MiniMinotaur": "Mini Minotaur", + "Slimed": "Slime", + "SharknadoMinion": "Sharknado", + "UFOMinion": "UFO", + "UFOMount": "UFO Mount", + "DrillMount": "Drill Mount", + "ScutlixMount": "Scutlix Mount", + "Electrified": "Electrified", + "MoonLeech": "Moon Bite", + "Sunflower": "Happy!", + "MonsterBanner": "Banner", + "Rabies": "Feral Bite", + "Webbed": "Webbed", + "Bewitched": "Bewitched", + "SoulDrain": "Life Drain", + "MagicLantern": "Magic Lantern", + "ShadowFlame": "Shadowflame", + "CrimsonHeart": "Crimson Heart", + "BabyFaceMonster": "Baby Face Monster", + "BoneJavelin": "Penetrated", + "StardustMinion": "Stardust Cell", + "StardustMinionBleed": "Celled", + "DryadsWardDebuff": "Dryad's Bane", + "StardustGuardianMinion": "Stardust Guardian", + "StardustDragonMinion": "Stardust Dragon", + "Daybreak": "Daybroken", + "SuspiciousTentacle": "Suspicious Looking Eye", + "CompanionCube": "Companion Cube", + "PetDD2Gato": "Propeller Gato", + "PetDD2Ghost": "Flickerwick", + "PetDD2Dragon": "Hoardagron", + "BetsysCurse": "Betsy's Curse", + "Oiled": "Oiled", + "Stoned": "Stoned", + "StarInBottle": "Star in a Bottle", + "Sharpened": "Sharpened", + "Dazed": "Dazed", + "DeadlySphere": "Deadly Sphere", + "Obstructed": "Obstructed", + "VortexDebuff": "Distorted", + "DryadsWard": "Dryad's Blessing", + "WindPushed": "Mighty Wind", + "WitheredArmor": "Withered Armor", + "WitheredWeapon": "Withered Weapon", + "OgreSpit": "Oozed", + "ParryDamageBuff": "Striking Moment", + "BallistaPanic": "Ballista Panic!", + "MinecartRightMech": "Minecart", + "MinecartLeftMech": "Minecart", + "MinecartRightWood": "Minecart", + "MinecartLeftWood": "Minecart", + "SolarShield1": "Solar Blaze", + "SolarShield2": "Solar Blaze", + "SolarShield3": "Solar Blaze", + "NebulaUpDmg1": "Damage Nebula", + "NebulaUpDmg2": "Damage Nebula", + "NebulaUpDmg3": "Damage Nebula", + "NebulaUpLife1": "Life Nebula", + "NebulaUpLife2": "Life Nebula", + "NebulaUpLife3": "Life Nebula", + "NebulaUpMana1": "Mana Nebula", + "NebulaUpMana2": "Mana Nebula", + "NebulaUpMana3": "Mana Nebula", + "UnicornMount": "Unicorn Mount", + "CuteFishronMount": "Cute Fishron Mount", + "BasiliskMount": "Basilisk Mount", + "NoBuilding": "Creative Shock", + "WeaponImbueVenom": "Weapon Imbue: Venom", + "WeaponImbueCursedFlames": "Weapon Imbue: Cursed Flames", + "WeaponImbueFire": "Weapon Imbue: Fire", + "WeaponImbueGold": "Weapon Imbue: Gold", + "WeaponImbueIchor": "Weapon Imbue: Ichor", + "WeaponImbueNanites": "Weapon Imbue: Nanites", + "WeaponImbueConfetti": "Weapon Imbue: Confetti", + "WeaponImbuePoison": "Weapon Imbue: Poison", + "WellFed": "Well Fed", + "WellFed2": "Plenty Satisfied", + "WellFed3": "Exquisitely Stuffed", + "DesertMinecartRight": "{$BuffName.MinecartRight}", + "DesertMinecartLeft": "{$BuffName.MinecartLeft}", + "FishMinecartRight": "{$BuffName.MinecartRight}", + "FishMinecartLeft": "{$BuffName.MinecartLeft}", + "GolfCartMount": "Golf Cart", + "BabyBird": "Baby Finch", + "CatBast": "The Bast Defense", + "SugarGlider": "Sugar Glider", + "VampireFrog": "Vampire Frog", + "UpbeatStar": "Estee", + "BatOfLight": "Sanguine Bat", + "BeeMinecartRight": "{$BuffName.MinecartRight}", + "BeeMinecartLeft": "{$BuffName.MinecartLeft}", + "LadybugMinecartRight": "{$BuffName.MinecartRight}", + "LadybugMinecartLeft": "{$BuffName.MinecartLeft}", + "PigronMinecartRight": "{$BuffName.MinecartRight}", + "PigronMinecartLeft": "{$BuffName.MinecartLeft}", + "SunflowerMinecartRight": "{$BuffName.MinecartRight}", + "SunflowerMinecartLeft": "{$BuffName.MinecartLeft}", + "HellMinecartRight": "{$BuffName.MinecartRight}", + "HellMinecartLeft": "{$BuffName.MinecartLeft}", + "ShroomMinecartRight": "{$BuffName.MinecartRight}", + "ShroomMinecartLeft": "{$BuffName.MinecartLeft}", + "AmethystMinecartRight": "{$BuffName.MinecartRight}", + "AmethystMinecartLeft": "{$BuffName.MinecartLeft}", + "TopazMinecartRight": "{$BuffName.MinecartRight}", + "TopazMinecartLeft": "{$BuffName.MinecartLeft}", + "SapphireMinecartRight": "{$BuffName.MinecartRight}", + "SapphireMinecartLeft": "{$BuffName.MinecartLeft}", + "EmeraldMinecartRight": "{$BuffName.MinecartRight}", + "EmeraldMinecartLeft": "{$BuffName.MinecartLeft}", + "RubyMinecartRight": "{$BuffName.MinecartRight}", + "RubyMinecartLeft": "{$BuffName.MinecartLeft}", + "DiamondMinecartRight": "{$BuffName.MinecartRight}", + "DiamondMinecartLeft": "{$BuffName.MinecartLeft}", + "AmberMinecartRight": "{$BuffName.MinecartRight}", + "AmberMinecartLeft": "{$BuffName.MinecartLeft}", + "BeetleMinecartRight": "{$BuffName.MinecartRight}", + "BeetleMinecartLeft": "{$BuffName.MinecartLeft}", + "MeowmereMinecartRight": "{$BuffName.MinecartRight}", + "MeowmereMinecartLeft": "{$BuffName.MinecartLeft}", + "PartyMinecartRight": "{$BuffName.MinecartRight}", + "PartyMinecartLeft": "{$BuffName.MinecartLeft}", + "PirateMinecartRight": "{$BuffName.MinecartRight}", + "PirateMinecartLeft": "{$BuffName.MinecartLeft}", + "SteampunkMinecartRight": "{$BuffName.MinecartRight}", + "SteampunkMinecartLeft": "{$BuffName.MinecartLeft}", + "CoffinMinecartRight": "{$BuffName.MinecartRight}", + "CoffinMinecartLeft": "{$BuffName.MinecartLeft}", + "Lucky": "Lucky", + "LilHarpy": "Lil' Harpy", + "FennecFox": "Fennec Fox", + "GlitteryButterfly": "Glittery Butterfly", + "BabyImp": "Baby Imp", + "BabyRedPanda": "Baby Red Panda", + "WitchBroom": "Witch's Broom", + "SharkPup": "Shark Pup", + "StormTiger": "Desert Tiger", + "Plantero": "Plantero", + "Flamingo": "Flamingo", + "DynamiteKitten": "Dynamite Kitten", + "BabyWerewolf": "Baby Werewolf", + "ShadowMimic": "Shadow Mimic", + "VoltBunny": "Volt Bunny", + "KingSlimePet": "Slime Prince", + "EyeOfCthulhuPet": "Suspicious Eye", + "EaterOfWorldsPet": "Eater of Worms", + "BrainOfCthulhuPet": "Spider Brain", + "SkeletronPet": "Skeletron Jr.", + "QueenBeePet": "Honey Bee", + "DestroyerPet": "Destroyer-Lite", + "TwinsPet": "Rez and Spaz", + "SkeletronPrimePet": "Mini Prime", + "PlanteraPet": "Plantera Seedling", + "GolemPet": "Toy Golem", + "DukeFishronPet": "Tiny Fishron", + "LunaticCultistPet": "Phantasmal Dragon", + "MoonLordPet": "Moonling", + "FairyQueenPet": "Fairy Princess", + "PumpkingPet": "Jack 'O Lantern", + "EverscreamPet": "Everscream Sapling", + "IceQueenPet": "Ice Queen", + "MartianPet": "Alien Skater", + "DD2OgrePet": "Baby Ogre", + "DD2BetsyPet": "Itsy Betsy", + "PirateShipMount": "Pirate Ship Mount", + "SpookyWoodMount": "Tree Mount", + "SantankMount": "Santank Mount", + "WallOfFleshGoatMount": "Goat Mount", + "DarkMageBookMount": "Book Mount", + "PaintedHorseMount": "Painted Horse Mount", + "MajesticHorseMount": "Majestic Horse Mount", + "DarkHorseMount": "Dark Horse Mount", + "LavaSharkMount": "Lava Shark Mount", + "PogoStickMount": "Pogo Stick Mount", + "TitaniumStorm": "Titanium Barrier", + "QueenSlimePet": "Slime Princess", + "ThornWhipPlayerBuff": "Jungle's Fury", + "SwordWhipPlayerBuff": "Durendal's Blessing", + "ScytheWhipPlayerBuff": "Harvest Time", + "CoolWhipPlayerBuff": "A Nice Buff", + "Smolstar": "Enchanted Daggers", + "QueenSlimeMount": "Winged Slime Mount", + "GelBalloonBuff": "Sparkle Slime", + "BrainOfConfusionBuff": "Cerebral Mindtrick", + "SugarRush": "Sugar Rush", + "DiggingMoleMinecartRight": "Digging Molecart", + "DiggingMoleMinecartLeft": "Digging Molecart", + "EmpressBlade": "Terraprisma", + + + }, + "BuffDescription": { + "ObsidianSkin": "Immune to lava", + "Regeneration": "Provides life regeneration", + "Swiftness": "25% increased movement speed", + "Gills": "Breathe water instead of air", + "Ironskin": "Increase defense by 8", + "ManaRegeneration": "Increased mana regeneration", + "MagicPower": "20% increased magic damage", + "Featherfall": "Press UP or DOWN to control speed of descent", + "Spelunker": "Shows the location of treasure and ore", + "Invisibility": "Grants invisibility", + "Shine": "Emitting light", + "NightOwl": "Increased night vision", + "Battle": "Increased enemy spawn rate", + "Thorns": "Attackers also take damage", + "WaterWalking": "Press DOWN to enter water", + "Archery": "20% increased arrow damage and speed", + "Hunter": "Shows the location of enemies", + "Gravitation": "Press UP to reverse gravity", + "ShadowOrb": "A magical orb that provides light", + "Poisoned": "Slowly losing life", + "PotionSickness": "Cannot consume anymore healing items", + "Darkness": "Decreased light vision", + "Cursed": "Cannot use any items", + "OnFire": "Slowly losing life", + "Tipsy": "Increased melee abilities, lowered defense", + "FairyBlue": "A fairy is following you", + "Werewolf": "Physical abilities are increased", + "Clairvoyance": "Magic powers are increased", + "Bleeding": "Cannot regenerate life", + "Confused": "Movement is reversed", + "Slow": "Movement speed is reduced", + "Weak": "Physical abilities are decreased", + "Merfolk": "Can breathe and move easily underwater", + "Silenced": "Cannot use items that require mana", + "BrokenArmor": "Defense is cut in half", + "Horrified": "You have seen something nasty, there is no escape.", + "TheTongue": "You are being sucked into the mouth", + "CursedInferno": "Losing life", + "PetBunny": "I think it wants your carrot", + "BabyPenguin": "I think it wants your fish", + "PetTurtle": "Happy turtle time!", + "PaladinsShield": "25% of damage taken will be redirected to another player", + "Frostburn": "It's either really hot or really cold. Either way it REALLY hurts", + "BabyEater": "A baby Eater of Souls is following you", + "Chilled": "Your movement speed has been reduced", + "Frozen": "You can't move!", + "Honey": "Life regeneration is increased", + "Pygmies": "The pygmies will fight for you", + "BabySkeletronHead": "Don't even ask...", + "BabyHornet": "It thinks you are its mother", + "TikiSpirit": "A friendly spirit is following you", + "PetLizard": "Chillin' like a reptilian", + "PetParrot": "Polly wants the cracker", + "BabyTruffle": "Isn't this just soooo cute?", + "PetSapling": "A little sapling is following you", + "Wisp": "A wisp is following you", + "RapidHealing": "Life regeneration is greatly increased", + "ShadowDodge": "You will dodge the next attack", + "LeafCrystal": "Shoots crystal leaves at nearby enemies", + "BabyDinosaur": "A baby dinosaur is following you", + "IceBarrier": "Damage taken is reduced by 25%", + "Panic": "Movement speed is increased", + "BabySlime": "The baby slime will fight for you", + "EyeballSpring": "An eyeball spring is following you", + "BabySnowman": "A baby snowman is following you", + "Burning": "Losing life and slowed movement", + "Suffocation": "Losing life", + "Ichor": "Reduced defense", + "Venom": "Losing life", + "Midas": "Drop more money on death", + "Blackout": "Light vision severely reduced", + "PetSpider": "A spider is following you", + "Squashling": "A squashling is following you", + "Ravens": "The ravens will attack your enemies", + "BlackCat": "A black kitty is following you", + "CursedSapling": "A cursed sapling is following you", + "WaterCandle": "Increased monster spawn rate", + "PeaceCandle": "Decreased monster spawn rate", + "Campfire": "Life regen is slightly increased", + "ChaosState": "Using the Rod of Discord will take life", + "HeartLamp": "Life regen is increased", + "Rudolph": "Riding the red nosed reindeer", + "Puppy": "A puppy is following you", + "BabyGrinch": "A baby grinch is following you", + "AmmoBox": "20% chance to not consume ammo", + "ManaSickness": "Magic damage reduced by ", + "BeetleEndurance1": "Damage taken reduced by 15%", + "BeetleEndurance2": "Damage taken reduced by 30%", + "BeetleEndurance3": "Damage taken reduced by 45%", + "BeetleMight1": "Melee damage and speed increase by 10%", + "BeetleMight2": "Melee damage and speed increase by 20%", + "BeetleMight3": "Melee damage and speed increase by 30%", + "FairyRed": "A fairy is following you", + "FairyGreen": "A fairy is following you", + "Wet": "You are dripping water", + "Mining": "25% increased mining speed", + "Heartreach": "Increased heart pickup range", + "Calm": "Decreased enemy spawn rate", + "Builder": "Increased placement speed and range", + "Titan": "Increased knockback", + "Flipper": "Move like normal in water", + "Summoning": "Increased max number of minions", + "Dangersense": "You can see nearby hazards", + "AmmoReservation": "20% chance to not consume ammo", + "Lifeforce": "20% increased max life", + "Endurance": "10% reduced damage", + "Rage": "10% increased critical chance", + "Inferno": "Nearby enemies are ignited", + "Wrath": "10% increased damage", + "MinecartLeft": "Riding in a minecart", + "MinecartRight": "Riding in a minecart", + "Lovestruck": "You are in love!", + "Stinky": "You smell terrible", + "Fishing": "Increased fishing power", + "Sonar": "You can see what's biting your hook", + "Crate": "Greater chance of fishing up a crate", + "Warmth": "Reduced damage from cold sources", + "HornetMinion": "The hornet will fight for you", + "ImpMinion": "The imp will fight for you", + "ZephyrFish": "It likes swimming around you", + "BunnyMount": "You are craving carrots", + "PigronMount": "Now you see me....", + "SlimeMount": "BOOOIIINNNG!", + "TurtleMount": "Slow if by land, zoom if by sea", + "BeeMount": "BzzzBzzBZZZZBzzz", + "SpiderMinion": "The spider will fight for you", + "TwinEyesMinion": "The twins will fight for you", + "PirateMinion": "The pirate will fight for you", + "MiniMinotaur": "How do you defeat a mini Minotaur?", + "Slimed": "You are slimy and sticky", + "SharknadoMinion": "The sharknado will fight for you", + "UFOMinion": "The UFO will fight for you", + "UFOMount": "It's a good thing you had a MAC", + "DrillMount": "Riding in a flying drill", + "ScutlixMount": "Pew Pew", + "Electrified": "You cannot move", + "MoonLeech": "You are unable to absorb healing effects", + "Sunflower": "Movement speed increased and monster spawns reduced", + "MonsterBanner": "Increased damage and defense from the following:", + "Rabies": "Increased damage, Decreased life regen, Causes status effects", + "Webbed": "You are stuck", + "Bewitched": "Increased max number of minions", + "SoulDrain": "Increased life regeneration", + "MagicLantern": "An enchanted lantern is lighting your way", + "ShadowFlame": "Losing life", + "CrimsonHeart": "A magical heart that provides light", + "BabyFaceMonster": "A baby face monster is following you", + "BoneJavelin": "Bleeding Out", + "StardustMinion": "The stardust cell will fight for you", + "StardustMinionBleed": "being eaten by cells", + "DryadsWardDebuff": "The power of nature compells you", + "StardustGuardianMinion": "The stardust guardian will protect you", + "StardustDragonMinion": "The stardust dragon will protect you", + "Daybreak": "Incenerated by solar rays", + "SuspiciousTentacle": "A suspicious looking eye that provides light", + "CompanionCube": "Will never threaten to stab you and, in fact, cannot speak", + "PetDD2Gato": "A propeller gato is following you", + "PetDD2Ghost": "A flickerwick is following you", + "PetDD2Dragon": "A hoardagron is following you", + "BetsysCurse": "Defense is lowered", + "Oiled": "Taking more damage from being on fire", + "Stoned": "You are completely petrified!", + "StarInBottle": "Increased mana regeneration", + "Sharpened": "Melee weapons have armor penetration", + "Dazed": "Movement is greatly slowed", + "DeadlySphere": "The Deadly Sphere will fight for you", + "Obstructed": "You can't see!", + "VortexDebuff": "Gravity around you is distorted", + "DryadsWard": "The power of nature protects you", + "WindPushed": "The wind moves you around!", + "WitheredArmor": "Your armor is lowered!", + "WitheredWeapon": "Your attacks are weaker!", + "OgreSpit": "Movement is significantly reduced", + "ParryDamageBuff": "500% increased damage for next melee strike", + "BallistaPanic": "Your ballistas rapidly shoot in panic!", + "MinecartRightMech": "Riding in a minecart", + "MinecartLeftMech": "Riding in a minecart", + "MinecartRightWood": "Riding in a minecart", + "MinecartLeftWood": "Riding in a minecart", + "SolarShield1": "Damage taken reduced by 30%, repel enemies when taking damage", + "SolarShield2": "Damage taken reduced by 30%, repel enemies when taking damage", + "SolarShield3": "Damage taken reduced by 30%, repel enemies when taking damage", + "NebulaUpDmg1": "15% increased damage", + "NebulaUpDmg2": "30% increased damage", + "NebulaUpDmg3": "45% increased damage", + "NebulaUpLife1": "Increased life regeneration", + "NebulaUpLife2": "Increased life regeneration", + "NebulaUpLife3": "Increased life regeneration", + "NebulaUpMana1": "Increased mana regeneration", + "NebulaUpMana2": "Increased mana regeneration", + "NebulaUpMana3": "Increased mana regeneration", + "UnicornMount": "Charge ahead... fabulously!", + "CuteFishronMount": "Just don't make it crawl.", + "BasiliskMount": "Crash into anyone... and EVERYONE!", + "NoBuilding": "You have lost the power of creation!", + "WeaponImbueVenom": "Melee attacks inflict venom on your targets", + "WeaponImbueCursedFlames": "Melee attacks inflict enemies with cursed flames", + "WeaponImbueFire": "Melee attacks set enemies on fire", + "WeaponImbueGold": "Melee attacks make enemies drop more gold", + "WeaponImbueIchor": "Melee attacks decrease enemies defense", + "WeaponImbueNanites": "Melee attacks confuse enemies", + "WeaponImbueConfetti": "Melee attacks cause confetti to appear", + "WeaponImbuePoison": "Melee attacks poison enemies", + "WellFed": "Minor improvements to all stats", + "WellFed2": "Medium improvements to all stats", + "WellFed3": "Major improvements to all stats", + "DesertMinecartRight": "{$BuffDescription.MinecartRight}", + "DesertMinecartLeft": "{$BuffDescription.MinecartLeft}", + "FishMinecartRight": "{$BuffDescription.MinecartRight}", + "FishMinecartLeft": "{$BuffDescription.MinecartLeft}", + "BabyBird": "The baby finch will fight for you", + "CatBast": "Defense is increased by 5", + "SugarGlider": "A sugar glider is following you", + "VampireFrog": "The vampire frog will fight for you", + "UpbeatStar": "Estee is following you", + "BatOfLight": "The sanguine bat will fight for you", + "BeeMinecartRight": "{$BuffDescription.MinecartRight}", + "BeeMinecartLeft": "{$BuffDescription.MinecartLeft}", + "LadybugMinecartRight": "{$BuffDescription.MinecartRight}", + "LadybugMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PigronMinecartRight": "{$BuffDescription.MinecartRight}", + "PigronMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SunflowerMinecartRight": "{$BuffDescription.MinecartRight}", + "SunflowerMinecartLeft": "{$BuffDescription.MinecartLeft}", + "HellMinecartRight": "{$BuffDescription.MinecartRight}", + "HellMinecartLeft": "{$BuffDescription.MinecartLeft}", + "ShroomMinecartRight": "{$BuffDescription.MinecartRight}", + "ShroomMinecartLeft": "{$BuffDescription.MinecartLeft}", + "AmethystMinecartRight": "{$BuffDescription.MinecartRight}", + "AmethystMinecartLeft": "{$BuffDescription.MinecartLeft}", + "TopazMinecartRight": "{$BuffDescription.MinecartRight}", + "TopazMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SapphireMinecartRight": "{$BuffDescription.MinecartRight}", + "SapphireMinecartLeft": "{$BuffDescription.MinecartLeft}", + "EmeraldMinecartRight": "{$BuffDescription.MinecartRight}", + "EmeraldMinecartLeft": "{$BuffDescription.MinecartLeft}", + "RubyMinecartRight": "{$BuffDescription.MinecartRight}", + "RubyMinecartLeft": "{$BuffDescription.MinecartLeft}", + "DiamondMinecartRight": "{$BuffDescription.MinecartRight}", + "DiamondMinecartLeft": "{$BuffDescription.MinecartLeft}", + "AmberMinecartRight": "{$BuffDescription.MinecartRight}", + "AmberMinecartLeft": "{$BuffDescription.MinecartLeft}", + "BeetleMinecartRight": "{$BuffDescription.MinecartRight}", + "BeetleMinecartLeft": "{$BuffDescription.MinecartLeft}", + "MeowmereMinecartRight": "{$BuffDescription.MinecartRight}", + "MeowmereMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PartyMinecartRight": "{$BuffDescription.MinecartRight}", + "PartyMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PirateMinecartRight": "{$BuffDescription.MinecartRight}", + "PirateMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SteampunkMinecartRight": "{$BuffDescription.MinecartRight}", + "SteampunkMinecartLeft": "{$BuffDescription.MinecartLeft}", + "CoffinMinecartRight": "{$BuffDescription.MinecartRight}", + "CoffinMinecartLeft": "{$BuffDescription.MinecartLeft}", + "Lucky": "You are feeling pretty lucky", + "LilHarpy": "Cuteness from above", + "FennecFox": "What does the fox say? Better yet, what does the fox HEAR?!", + "GlitteryButterfly": "Truly, truly outrageous", + "BabyImp": "Just wait till his terrible twos!", + "BabyRedPanda": "A baby red panda is following you", + "WitchBroom": "It flies! WITCHCRAFT!", + "SharkPup": "Doo doo doo doo doo doo", + "GolfCartMount": "A fair way to cross the fairway", + "Plantero": "Little Plantero is following you", + "Flamingo": "Flamingogogo", + "DynamiteKitten": "Not for use in cannons", + "BabyWerewolf": "A baby werewolf is following you", + "ShadowMimic": "A shadow mimic is following you", + "VoltBunny": "A volt bunny is ecstatic about you", + "KingSlimePet": "He answers to a higher authority", + "EyeOfCthulhuPet": "Just keepin' an eye out . . .", + "EaterOfWorldsPet": "May ruin several backyards", + "BrainOfCthulhuPet": "It's crawling around . . . icky", + "SkeletronPet": "Skeletron Jr. Is following you", + "QueenBeePet": "A honey bee is following you", + "DestroyerPet": "For destruction on the go", + "TwinsPet": "You have special eyes!", + "SkeletronPrimePet": "Each tool can commit murder", + "PlanteraPet": "What exactly does it eat, anyway?", + "GolemPet": "Got myself a crying, talking, sleeping, walking, living idol!", + "DukeFishronPet": "A sea-green marquess of the abyss", + "LunaticCultistPet": "It keeps looking at the Moon", + "MoonLordPet": "A friend from beyond", + "FairyQueenPet": "The light of the fair folk illuminates all", + "PumpkingPet": "A small Jack 'O Lantern is fiendishly lighting the way", + "EverscreamPet": "Taking the tree for a walk!", + "IceQueenPet": "Ice Queen has been reborn as your companion", + "MartianPet": "How do you do, fellow humans?", + "DD2OgrePet": "He's got a big stick and he doesn't know how to use it", + "DD2BetsyPet": "Itsy Betsy is following you", + "PirateShipMount": "You're the captain now", + "SpookyWoodMount": "Run, forest, run!", + "SantankMount": "Crossing off the naughty list . . .", + "WallOfFleshGoatMount": "This ride is totally metal!", + "DarkMageBookMount": "The Book is now helping in your guidance", + "PaintedHorseMount": "Riding a Painted Horse", + "MajesticHorseMount": "Riding a Majestic Horse", + "DarkHorseMount": "Riding a Dark Horse", + "LavaSharkMount": "Surfing the molten seas!", + "PogoStickMount": "Kss-shik! Kss-shik! Kss-shik!", + "TitaniumStorm": "Defensive shards surround you", + "QueenSlimePet": "She is the higher authority", + "ThornWhipPlayerBuff": "Melee speed is increased", + "SwordWhipPlayerBuff": "Melee speed is increased", + "ScytheWhipPlayerBuff": "Melee speed is increased", + "CoolWhipPlayerBuff": "Summons a snowflake to fight for you", + "Smolstar": "Death by a thousand cuts", + "QueenSlimeMount": "BOING FLAP BOING!", + "GelBalloonBuff": "You are slimy and sparkly", + "BrainOfConfusionBuff": "Increased critical chance", + "SugarRush": "20% increased movement and mining speed", + "DiggingMoleMinecartRight": "The Molecart will dig for you", + "DiggingMoleMinecartLeft": "The Molecart will dig for you", + "StormTiger": "The desert tiger will fight beside you", + "EmpressBlade": "The Blades of the Empress will fight for you", + + }, + "ArmorSetBonus": { + "SquireTier3": "Increases your max number of sentries\nGreatly enhances Ballista effectiveness", + "ApprenticeTier3": "Increases your max number of sentries\nGreatly enhances Flameburst effectiveness", + "HuntressTier3": "Increases your max number of sentries\nGreatly enhances Explosive Traps effectiveness", + "MonkTier3": "Increases your max number of sentries\nGreatly enhances Lightning Aura effectiveness", + "SquireTier2": "Increases your max number of sentries\nBallista pierces more targets and panics when you take damage", + "ApprenticeTier2": "Increases your max number of sentries\nFlameburst field of view and range are dramatically increased", + "HuntressTier2": "Increases your max number of sentries\nExplosive Traps recharge faster and oil enemies\nSet oiled enemies on fire for extra damage", + "MonkTier2": "Increases your max number of sentries\nLightning Aura can now crit and strikes faster", + "MetalTier1": "2 defense", + "MetalTier2": "3 defense", + "CobaltRanged": "20% chance to not consume ammo", + "MythrilCaster": "17% reduced mana usage", + "MythrilMelee": "5% increased melee critical strike chance", + "MythrilRanged": "20% chance to not consume ammo", + "AdamantiteCaster": "19% reduced mana usage", + "AdamantiteMelee": "18% increased melee and movement speed", + "AdamantiteRanged": "25% chance to not consume ammo", + "TitaniumCaster": "19% reduced mana usage", + "TitaniumMelee": "18% increased melee and movement speed", + "TitaniumRanged": "25% chance to not consume ammo", + "ShadowScale": "15% increased movement speed", + "Wood": "1 defense", + "Crimson": "Greatly increased life regen", + "Frost": "Melee and ranged attacks cause frostburn", + "Tiki": "Increases your max number of minions", + "Palladium": "Greatly increases life regeneration after striking an enemy", + "Orichalcum": "Flower petals will fall on your target for extra damage", + "Titanium": "Attacking generates a defensive barrier of titanium shards", + "Hallowed": "Become immune after striking an enemy", + "Chlorophyte": "Summons a powerful leaf crystal to shoot at nearby enemies", + "ChlorophyteMelee": "Summons a powerful leaf crystal to shoot at nearby enemies\nReduces damage taken by 5%", + "Wizard": "10% increased magic critical strike chance", + "Turtle": "Attackers also take double damage\nReduces damage taken by 15%", + "Meteor": "Space Gun costs 0 mana", + "SpectreHealing": "Magic damage done to enemies heals the player with lowest health", + "Shroomite": "Not moving puts you in stealth,\nincreasing ranged ability and reducing chance for enemies to target you", + "Platinum": "4 defense", + "Pumpkin": "10% increased damage", + "Spooky": "Increases minion damage by 25%", + "SpectreDamage": "Magic damage done will hurt extra nearby enemies", + "MagicHat": "Increases maximum mana by 60", + "BeetleDefense": "Beetles protect you from damage", + "BeetleDamage": "Beetles increase your melee damage and speed", + "Bee": "Increases minion damage by 10%", + "Spider": "Increases minion damage by 12%", + "Solar": "Solar shields charge over time to protect you & let you dash\nA charge is used to damage enemies you touch\nConsumed charges explode & damage enemies", + "Vortex": "Double tap {0} to toggle stealth,\nincreasing ranged ability and reducing chance for enemies to target you but slowing movement speed", + "Nebula": "Magic damage has a chance to spawn buff boosters,\npick boosters up to get stacking buffs", + "Stardust": "A stardust guardian will protect you from nearby enemies", + "Forbidden": "Double tap {0} to call an ancient storm to the cursor location", + "Jungle": "16% reduced mana usage", + "Molten": "17% extra melee damage", + "Mining": "30% increased mining speed", + "CobaltCaster": "14% reduced mana usage", + "CobaltMelee": "15% increased melee speed", + "Bone": "15% increased ranged critical strike chance", + "Ninja": "20% increased movement speed", + "Fossil": "20% chance to not consume ammo", + "HallowedSummoner": "Become immune after striking an enemy,\nand increases your max number of minions by 2", + "CrystalNinja": "10% increased damage and crit chance,\n15% increased movement speed", + }, + "Bestiary_Biomes": { + "Surface": "Surface", + "Graveyard": "Graveyard", + "UndergroundJungle": "Underground Jungle", + "TheUnderworld": "The Underworld", + "TheDungeon": "The Dungeon", + "TheCorruption": "The Corruption", + "Underground": "Underground", + "TheHallow": "The Hallow", + "UndergroundMushroom": "Underground Mushroom", + "StardustPillar": "Stardust Pillar", + "Jungle": "The Jungle", + "Caverns": "Caverns", + "UndergroundSnow": "Underground Snow", + "Ocean": "Ocean", + "SurfaceMushroom": "Surface Mushroom", + "UndergroundDesert": "Underground Desert", + "Snow": "Snow", + "Desert": "Desert", + "Meteor": "Meteor", + "Oasis": "Oasis", + "SpiderNest": "Spider Nest", + "Crimson": "The Crimson", + "SolarPillar": "Solar Pillar", + "VortexPillar": "Vortex Pillar", + "TheTemple": "The Temple", + "UndergroundCorruption": "Underground Corruption", + "Hallow": "The Hallow", + "NebulaPillar": "Nebula Pillar", + "CorruptUndergroundDesert": "Corrupt Cave Desert", + "CrimsonUndergroundDesert": "Crimson Cave Desert", + "HallowUndergroundDesert": "Hallow Cave Desert", + "CorruptDesert": "Corrupt Desert", + "HallowDesert": "Hallow Desert", + "Granite": "Granite", + "UndergroundCrimson": "Underground Crimson", + "UndergroundHallow": "Underground Hallow", + "Marble": "Marble", + "CorruptIce": "Corrupt Ice", + "HallowIce": "Hallow Ice", + "CrimsonIce": "Crimson Ice", + "Sky": "Sky", + "CrimsonDesert": "Crimson Desert", + }, + "Bestiary_Invasions": { + "Goblins": "Goblin Invasion", + "Pirates": "Pirate Invasion", + "Martian": "Martian Madness", + "OldOnesArmy": "Old One's Army", + "PumpkinMoon": "Pumpkin Moon", + "FrostMoon": "Frost Moon", + "FrostLegion": "Frost Legion" + }, + "Bestiary_Times": { + "DayTime": "Daytime", + "NightTime": "Nighttime", + }, + "Bestiary_Events": { + "SlimeRain": "Slime Rain", + "WindyDay": "Windy Day", + "BloodMoon": "Blood Moon", + "Halloween": "Halloween", + "Rain": "Rain", + "Christmas": "Christmas", + "Eclipse": "Eclipse", + "Party": "Party", + "Blizzard": "Blizzard", + "Sandstorm": "Sandstorm" + }, + "BestiaryInfo": { + "Rarity_1": "Is Uncommon", + "Rarity_2": "Is Rare", + "IsBoss": "Boss Enemy", + "UnlockCondition_Hallow": "Reach Hardmode", + "IsRare": "Rare Creature", + "Filters": "Filters ({Count})", + "KnockbackNone": "None", + "KnockbackLow": "Low", + "KnockbackMedium": "Med", + "KnockbackHigh": "High", + "Attack": "Attack", + "Defense": "Defense", + "Knockback": "Knockback Taken", + "Life": "Life", + "IfUnlocked": "If Unlocked", + "IfSearched": "If Searched", + "Sort_Unlocks": "Unlocks", + "Sort_ID": "ID", + "Sort_BestiaryID": "Bestiary ID", + "Sort_Rarity": "Rarity", + "Sort_Alphabetical": "Name", + "Sort_Attack": "Attack", + "Sort_Defense": "Defense", + "Sort_Coins": "Coins", + "Sort_HitPoints": "HP", + "PercentCollected": "{Percent} Collected", + }, + "Bestiary_ItemDropConditions": { + "PirateMap": "Drops in the Hardmode Ocean", + "IsChristmas": "Drops during Christmas", + "NotExpert": "", + "NotMasterMode": "", + "PlayerNeedsHealing": "Drops when the player is hurt", + "LegacyHack_IsBossAndExpert": "Drops in Expert Mode", + "LegacyHack_IsBossAndNotExpert": "", + "IsExpert": "This is an Expert Mode drop rate", + "IsMasterMode": "This is a Master Mode drop rate", + "IsCrimson": "Drops in the Crimson", + "IsCorruption": "Drops in the Corruption", + "IsCrimsonAndNotExpert": "", + "IsCorruptionAndNotExpert": "", + "HalloweenWeapons": "Drops during Halloween season", + "SoulOfNight": "Drops in Underground Crimson or Corruption", + "SoulOfLight": "Drops in Underground Hallow", + "NotFromStatue": "", + "HalloweenGoodieBagDrop": "Drops in early gameplay during Halloween", + "XmasPresentDrop": "Drops in early gameplay during Christmas", + "LivingFlames": "Drops in Hardmode Underworld", + "NamedNPC": "Drops from uniquely named NPCs", + "HallowKeyCondition": "Drops in the Hardmode Hallow", + "JungleKeyCondition": "Drops in the Hardmode Jungle", + "CorruptKeyCondition": "Drops in the Hardmode Corruption", + "CrimsonKeyCondition": "Drops in the Hardmode Crimson", + "FrozenKeyCondition": "Drops in the Hardmode Snow", + "DesertKeyCondition": "Drops in the Hardmode Desert", + "BeatAnyMechBoss": "Drops after defeating any Mech Boss", + "YoyoCascade": "Drops after defeating Skeletron but before Hardmode", + "YoyosAmarok": "Drops in Hardmode", + "YoyosYelets": "Drops after defeating any Mech Boss", + "YoyosKraken": "Drops after defeating Plantera", + "YoyosHelFire": "Drops in Hardmode", + "KOCannon": "Drops during a Hardmode Bloodmoon", + "IsItAHappyWindyDay": "Drops on Windy Days", + "EmpressOfLightOnlyTookDamageWhileEnraged": "Drops if the Empress of Light is only attacked during daytime" + }, + "Bestiary_BiomeText": { + "biome_Goblins": "A ragtag army of crude, barbaric goblins set out to conquer and destroy. Some wield dark, evil magic.", + "biome_Pirates": "A seafaring horde of armed bandits that lust after the riches of the land, collecting treasures and taking no prisoners.", + "biome_Martian": "Technologically advanced beings from another world who want to eradicate all primitive life with their superior weaponry.", + "biome_OldOnesArmy": "Minions from Etheria - they may have mistakenly invaded this world, but they wish to rule it nonetheless!", + "biome_PumpkinMoon": "A bitter harvest rises in the dead of night. Creatures of evil and darkness spook the lands, killing everything in their path.", + "biome_FrostMoon": "Ho Ho Ho! On this not-so-silent night, festive beings wish to shower the world with gifts of blood and carnage. ", + "biome_FrostLegion": "This organized family of cold-hearted killers wish to ice any who cross them, and they don't like snitches... capisce?", + "biome_SlimeRain": "For reasons beyond any meteorological explanation, slimy things are raining down from above by the buckets!", + "biome_WindyDay": "Don't get carried away! Nature is throwing a party and wishes to sweep everybody - and everything - off their feet!", + "biome_BloodMoon": "When the moon rises drenched in blood, the dead rise with it! These macabre creatures seek to add fresh meat to their dripping ranks.", + "biome_Halloween": "Pumpkins grow wildly across the land, and certain creatures masquerade in unusual costumes. Trick or treat!", + "biome_Rain": "When it rains, it pours. Creatures which normally thrive in water may roam the land and sky. Beware the angered clouds.", + "biome_Christmas": "Winter is here! Time to celebrate with twinkling lights, ugly sweaters, and a fat old fellow wearing a bright red suit.", + "biome_Eclipse": "Familiar creatures of horror rapidly grip the lands this day, for no mere mortal can resist the evil of the blackened sun. ", + "biome_Party": "This day, for no particular reason, everyone decided to throw a party. There's always time for a celebration!", + "biome_Blizzard": "The most vile, stone-cold entities emerge in the blinding chaos of bone-piercing icy wind and snow. Every step is cold and dangerous.", + "biome_Sandstorm": "The sands of the desert rage like a stormy sea, with deadly creatures swimming among them.", + "biome_Surface": "Anywhere where one can see the trees, the mountains, and the sky. Not all creatures are powerful or even hostile.", + "biome_Graveyard": "When areas of death become littered with graves, a thick mist of concentrated eeriness blankets the land.", + "biome_UndergroundJungle": "The tangled world beneath the muddy jungle proves perilous to any adventurer. Within, be on guard for voracious plants and bugs.", + "biome_TheUnderworld": "A doomed haven of fire and brimstone - run rampant with demons and devils - offers no sanctuary for the living.", + "biome_TheDungeon": "Constructed long ago as a once thriving city, this dark and evil place now serves as the home for its cursed former inhabitants.", + "biome_TheCorruption": "A cancerous Corruption thriving off the sins of the living. Its sole desire is to consume all things, leaving behind only a lifeless void.", + "biome_Underground": "Just below the surface, there's no shortage of dirt. Basic ore, mundane treasure, and weak monsters live down there.", + "biome_TheHallow": "A divine and overzealous force, 'The Hallow', serves as a cure to combat evil with its majestic, powerful creatures of light.", + "biome_UndergroundMushroom": "A curious deviation of nature, large mushrooms grow densely from glowing blue grass. Tough 'mycanoids' defend the area.", + "biome_StardustPillar": "A blue lunar seal protected by powerful guardians. This one representing a glittering celestial remnant known as 'stardust'.", + "biome_Jungle": "Thick trees, brambled vines, and relentless beasts of nature inhabit this dense canopy of lush growth, sprouted from seemingly limitless mud.", + "biome_Caverns": "Tough monsters, abandoned cabins, and golden treasure adorn the dark, vacant caverns tunneled beneath the underground.", + "biome_UndergroundSnow": "Tunnels carved throughout frigid ice result in slippery pitfalls and freezing pools - all patrolled by the sub-zero denizens of the deep.", + "biome_Ocean": "An endless ocean stretched to the horizon awaits at the world's edge, filled with infinitely hungry creatures from the watery depths.", + "biome_SurfaceMushroom": "Surface mushroom patches must be cultivated by hand, but doing so may draw attention from strong mycanoids.", + "biome_UndergroundDesert": "Beneath the sandy surface lies weathered, hard sandstone. Massive nests of deadly insects and more infest these ancient burrows.", + "biome_Snow": "A persistent arctic jet stream left a part of the world permanently cold. Only the hardiest of beasts can survive this harsh region.", + "biome_Desert": "Endless dunes of sand reside here, scorched by the never-ending sun. Few things have adapted to survive in this environment.", + "biome_Meteor": "The fragments left behind from plummeting meteorites burn endlessly with astrological energy, some of which appears to be alive.", + "biome_Oasis": "This is no mirage! The clandestine pools of water glittering in the desert sun are the only source of life in these desolate sands.", + "biome_SpiderNest": "In this deadly place, there lurk arachnids with many legs, many eyes, and a thirst for blood. They sow thick webs threaded with malice.", + "biome_Crimson": "A hive mind of grotesque, biological infections which aim to consume all life whilst feeling absolutely nothing.", + "biome_SolarPillar": "A red lunar seal protected by powerful guardians. This one representing a flaming celestial event known as 'solar flares'.", + "biome_VortexPillar": "A green lunar seal protected by powerful guardians. This one representing a deep celestial void known as 'vortex'.", + "biome_TheTemple": "Stone-crafted with an ancient mineral alloy, this indomitable temple houses the Lihzahrd; a crude, yet advanced reptilian race.", + "biome_UndergroundCorruption": "With the ancient spirits of light and dark released, the Corruption's reach drastically increased and its minions greatly empowered.", + "biome_NebulaPillar": "A purple lunar seal protected by powerful guardians. This one representing a stormy celestial body known as 'nebula'.", + "biome_CorruptUndergroundDesert": "The Corruption's hold in the sandstone weakened the seals that held an assortment of ancient magicked beings at bay.", + "biome_CrimsonUndergroundDesert": "The Crimson's bloody veins broke up the tombs that once held magicked beings, which are now released to commit mayhem.", + "biome_HallowUndergroundDesert": "The blessing swept through the ancient sands, awakening dangerous creatures once forgotten to time.", + "biome_CorruptDesert": "When the Corruption grows through the desert, vile things long since buried in the sand awaken with pure malice.", + "biome_HallowDesert": "As the Hallow responds to the encroaching evils, it inadvertently awakens things that have slept beneath the sands for centuries.", + "biome_CrimsonDesert": "With the Crimson seeping through the sands, dark things long forgotten rise again to seek out and destroy life.", + "biome_Granite": "A glistening, dark material adorns the caverns here. Granite paves the way for progress in architectural fashion and durable monsters.", + "biome_UndergroundCrimson": "With the ancient spirit of darkness released, the Crimson's veiny growth reaches new depths, and its macabre fiends gain strength.", + "biome_UndergroundHallow": "With the evils now unleashed into the depths of the world, the Hallow fights back with powerful minions of light.", + "biome_Marble": "A smooth material wrought with pleasing veins of color coat the walls of this cavern. An ancient civilization of monsters dwell here.", + "biome_CorruptIce": "Cold ice infused with even colder Corruption results in bitterly-frozen terrors lurking beneath the treacherous icy caverns.", + "biome_HallowIce": "Ice serves as a catalyst for the blessing, the Hallow's luminous source of power. Strong entities take advantage of this light.", + "biome_CrimsonIce": "These bitterly cold caverns of ice, saturated with the blood of Crimson, host a new variety of menacing frozen fiends.", + "biome_Sky": "It is rumored that there is a land far above the clouds, where ancient treasures are guarded by powerful winged creatures.", + "biome_DayTime": "After 4:30am, the sun rises in the sky and the most dangerous of beings flee from the light. It's a great time to explore!", + "biome_NightTime": "After 7:30pm, the moon rises in the sky. All manner of evil things, living and dead, roam the lands in the dark.", + + }, + "CommonBestiaryFlavor": { + "Slime": "A simple, gelatinous creature that swallows anything and everything whole! It takes a long time to digest anything.", + "DemonEye": "That suspicious feeling of being watched may very well come true in the dark of night, when Cthulhu's minions roam the skies.", + "Hornet": "Aggressive flying insects which swarm the jungle depths. Their venomous barbs discharge over great distances at high velocity.", + "Zombie": "Leaving doors open may be an invitation for shambling brain-eaters to enter the home, and nobody likes that.", + "Skeleton": "Who needs muscles, skin, or even eyeballs? Skeletons get by with just the bones on their back, just as deadly as more fleshy foes.", + "GoldCritter": "Rarely, critters are found coated entirely in gold! Shopkeepers will pay handsomely for these, or you can show them off in cages!", + "GoldBaitCritter": "Rarely, critters are found coated entirely in gold! They are worth great coin to shopkeepers and fish absolutely love golden bait!", + "Jellyfish": "That strange tingling sensation in the water may be the unwelcome surging of electrical death from a brainless jellyfish. Swim with care.", + "Pigron": "This elusive dragon-pig hybrid has excellent stealth capabilities despite its rotund figure. It is uncertain how they came to exist.", + "Dragonfly": "A swift-flying insect which hunts mosquitoes. Comes in a variety of colors. Fish are somewhat attracted to these.", + "Mimic": "Talking to a chest doesn't cause craziness, but if the chest answers back, it may cause death! It still contains rare treasure, regardless!", + "Penguin": "Penguins make their home in the coldest regions of the world, waddling around looking for tasty fish.", + "LavaBat": "What's worse than a rabid, fast-flying, and annoying flying rodent? One that is on fire, of course!", + "AngryBones": "Cursed with undeath, the former inhabitants of the Dungeon roam endlessly through its halls, seeking a victim for their unending fury.", + "RustyArmoredBones": "Through use and neglect, the Rusted Company's weapons are jagged and rough, inflicting terrible bleeding wounds upon their foes.", + "BlueArmoredBones": "Disciplined and relentless, the Marching Bones unceasingly pursue their goals, sundering anything, or anyone, in their way.", + "HellArmoredBones": "The fiery glow of the Molten Legion is unmistakable. With their red-hot armaments in hand, they blaze a trail through all those in their way.", + "RaggedCaster": "With their cursed magic, the members of the Ragged Brotherhood leave their victims helplessly lost in utter darkness.", + "Necromancer": "In life, these sorcerers bore the Necromantic Sign of their order, and they shall continue to do so forever . . . even in death.", + "Diabolist": "The undead who bear the Diabolic Sigil wield flames as intense as any in the underworld, consuming all in a scorching inferno.", + "MushroomZombie": "The fungus controlling the minds of these zombies wants only one thing: brains! This is very convenient for the zombie.", + "CostumeDemonEye": "No one knows who dressed these demon eyes up in cute costumes, but the whole process hasn't made them any friendlier.", + "CostumeZombie": "Wearing costumes isn't fooling anyone; these zombies are clearly way too old to be trick or treating.", + "CostumeSkeleton": "Skeletons need to wear very elaborate costumes during Halloween, or else people think they are dressing up as skeletons.", + "ZombieXmas": "Even zombies can celebrate the holidays. Their festive outfits are just right, but their holiday spirit could use some work.", + "RibbonSlime": "A perfectly gift wrapped bundle of slime. A wonderfully deadly present for any festive occasion.", + "ZombieElf": "Elves that used to work for Santa, but have since been zombified. They don't complain much, so they are still pretty good helpers.", + "AntlionCharger": "The soldiers of the antlion species, Antlion Chargers ferociously chase after intruders with a surprising speed.", + "AntlionSwarmer": "Antlion Swarmers patrol their nests with a watchful eye. Should anyone threaten their eggs, they will defend them fiercely.", + "Scarecrow": "Possessed by vengeful spirits of the harvest, these scarecrows are out to cause mischief and mayhem galore.", + "FungiBulb": "When the glowing fungus is ready to spread, these bulbs will sprout to spread its spores to other locations and hosts.", + "Mummy": "With the sands transmogrified by outside forces, those put to rest in the desert, whether good or evil, now rise to maim and kill.", + "Sandshark": "In ancient times, a saltwater river once ran through the desert. These powerful creatures evolved to survive in the now dry sand.", + "Lamia": "By the time glowing red eyes appear in the darkness of the desert caves, it is already too late. The lamias have found their prey.", + "GemSquirrel": "Glistening squirrels who strayed too deep become ensorcelled with residual cursed energy retained in gemstones.", + "GemBunny": "These colorful rabbits made their way so deep, their reaction to magicked gems resulted in a coveted sparkling appearance.", + + }, + "Bestiary_FlavorText": { + "npc_BabySlime": "Clinging tightly to their parents and rarely seen, these miniature slimes will swarm anyone who harms their mother. ", + "npc_MotherSlime": "Critical to the lifecycle of the slime species, these oversized jiggling masses are often found carrying their young deep underground.", + "npc_JungleSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_YellowSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_RedSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_PurpleSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_BlackSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_Pinky": "The smallest slime ever recorded, their extreme cellular density makes them incredibly durable for their small size. They eat money.", + "npc_GreenSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_Slimeling": "The still-animate severed pieces of an injured Corrupt Slime, Slimelings can still put up a fight, and have strength in numbers.", + "npc_BlueSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_DemonEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_Zombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_TorchZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_EyeofCthulhu": "A piece of Cthulhu ripped from his body centuries ago in a bloody war. It wanders the night seeking its host body... and revenge!", + "npc_ServantofCthulhu": "Young Demon Eyes newly birthed from the Eye of Cthulhu, brought forth to protect their master by any means necessary.", + "npc_EaterofSouls": "Birthed from the Corruption as a being of pure malice, its sole instincts are to pursue, punish, and kill.", + "npc_DevourerHead": "Worm-like monstrosities are the Corruption's most favored creatures, tunneling underneath unsuspecting victims.", + "npc_GiantWormHead": "These itty bitty diggy dawgs dig through the earth and take focused spelunkers by surprise, causing unwanted distress.", + "npc_EaterofWorldsHead": "Conceived from the bottomless malice of the Corruption, this mighty abyssal worm tunnels wildly to devour all in its path.", + "npc_Merchant": "The Merchant acts as a simple general store of sorts, providing useful starter tools and supplies needed for exploration.", + "npc_Nurse": "The Nurse's snarky attitude and poor bedside manner may be scary, but for a price, she will cure all that ails a wounded Terrarian.", + "npc_ArmsDealer": "The Arms Dealer has everything anyone could need to shoot things dead, from little round bullets to guns made from sharks.", + "npc_Dryad": "The Dryad is the last of her kind. She is connected with nature and can analyze its purity worldwide. She sells seeds, too!", + "npc_Skeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_SkeletonArcher": "{$CommonBestiaryFlavor.Skeleton}", + "npc_ArmoredSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_Guide": "The Guide always offers useful advice and crafting recipes. His origins and unusual connections to this world remain a mystery.", + "npc_MeteorHead": "When meteorites strike the surface, their fragments lay scattered for the taking. Some pieces are alive, and will attack.", + "npc_FireImp": "A lesser demon imbued with hell magic. Capable of teleporting and hurling phantom fireballs towards their foes.", + "npc_GoblinPeon": "Common footsoldiers of the Goblin Army, these foul creatures are good for little more than cannon fodder... and breaking down doors.", + "npc_GoblinThief": "Quick strike units of the Goblin Army, these pesky foes specialize in nimble movement and close-quarters combat.", + "npc_GoblinWarrior": "The backbone of the Goblin Army infantry, these heavily-armored soldiers can take tremendous damage as they march undeterred.", + "npc_GoblinSorcerer": "As primitive as they are, some goblins have the potential for manipulating magicked shadow energy through a form of hexing.", + "npc_AngryBones": "{$CommonBestiaryFlavor.AngryBones}", + "npc_DarkCaster": "Doomed to watch over the Dungeon, these mages teleport to confuse their prey, before striking them down with a blast of water.", + "npc_CursedSkull": "Exposed to dark rituals, this skull has begun floating around on its own, chasing the living. Its touch leaves its victims defenseless.", + "npc_SkeletronHead": "The disembodied bones of a former tyrant pulsed with a hatred so strong, it left behind a mighty curse which guards the Dungeon.", + "npc_OldMan": "This hapless Old Man carries the burden of a heavy curse. It's said at night he transforms into a horrific demon which guards the Dungeon.", + "npc_Demolitionist": "Tread carefully around this dwarf. The Demolitionist is an explosive fanatic and sells dangerous things that go 'Boom!'", + "npc_BoneSerpentHead": "Mighty serpentine dragons once ruled hell, but long ago shed their obsidian scales. A skeletal husk is all that remains.", + "npc_Hornet": "{$CommonBestiaryFlavor.Hornet}", + "npc_ManEater": "A sharp-toothed plant with a taste for human flesh. It has the ability to hide inside the mud and reach over great distances.", + "npc_UndeadMiner": "There's evidence of spelunkers having explored the caverns in the past... as well as evidence of them having died doing so.", + "npc_Tim": "An enchanter in life, this funny fellow won't give up his robe or wizard hat without a fight. He prefers warmer caverns.", + "npc_Bunny": "Fuzzy wuzzy creatures that prefer safe, friendly locations.", + "npc_CorruptBunny": "Bunnies are pure beings that normally resist all forms of Corruption, but will succumb under the effects of a Blood Moon.", + "npc_Harpy": "Winged, demi-human women defend their territory against invaders by impaling them with their razor-sharp feathers.", + "npc_CaveBat": "They are small, hard to see, and swiftly flap about in unpredictable ways. They often carry diseases, such as rabies.", + "npc_KingSlime": "Slimes normally aren't intelligent, but occasionally they merge together to become a powerful force to swallow all things.", + "npc_JungleBat": "These small, annoying creatures aren't to be underestimated. A deadly end awaits for those swarmed by these fangy rodents.", + "npc_DoctorBones": "This particular zombie has a knack for finding historical artifacts, but has a terrible disdain towards snakes.", + "npc_TheGroom": "Tall, handsome, and dead. This unlucky fellow did not survive his wedding and is ready to take it out on everyone.", + "npc_Clothier": "Once trapped under a curse, the Clothier is the master of thread. If it's fashion that's desired, he's the man! He talks in a familiar way.", + "npc_Goldfish": "A seemingly ordinary goldfish, until it decides to rain.", + "npc_Snatcher": "A sharp-toothed plant with a taste for human flesh. It has the ability to hide inside the mud and reach over great distances.", + "npc_CorruptGoldfish": "Goldfish mutate and become violent when exposed to a Blood Moon, allowing the Corruption to take hold of them.", + "npc_Piranha": "Just one of these sharp-toothed fish can easily end a life. Luckily, they tend to swarm their victims in large groups! Life is grand.", + "npc_LavaSlime": "Due to the heat of the underworld, these slimes have taken on the properties of lava. Slaying them is difficult and dangerous.", + "npc_Hellbat": "{$CommonBestiaryFlavor.LavaBat}", + "npc_Vulture": "Built to survive the desert heat, avian scavengers such as these will peck apart those who come near their carrion.", + "npc_Demon": "Demons are the infantry of the underworld. Unlike their lesser brothers, they cast shadow magic rather than hell magic.", + "npc_BlueJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_PinkJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_Shark": "Once these ocean predators catch a whiff of blood, they become relentless and unstoppable in their ravenous pursuit.", + "npc_VoodooDemon": "Higher ranking demons can possess a voodoo doll of the chosen one, whose soul is linked with the world's guardian himself.", + "npc_Crab": "This hard shelled coastal creature could snip the toes right off a man, among other things. They are not to be trifled with.", + "npc_DungeonGuardian": "A lethal sentry that stands watch over the Dungeon's gates. Those who are deemed unworthy to enter shall not pass!", + "npc_Antlion": "When antlions are nesting, they hide in the surface. To defend their eggs, they projectile vomit hard globs of sand at trespassers.", + "npc_DungeonSlime": "Slimes in the Dungeon became powerful by feeding off the cursed energy throughout the place. They seem particularly attracted to keys.", + "npc_GoblinScout": "The Goblin Army sends lone soldiers out from the beaches to seek out colonies to conquer. They give warning with a tattered sigil.", + "npc_Bird": "A simple white bird which enjoys a calm sunny day.", + "npc_Pixie": "A larger, more luminous form of fairy. Pixies provide the Hallow with more blessed light and aid in the cleansing of the land.", + "npc_ArmoredSkeleton": "Remnants of a long lost expeditionary force, these stout warriors mindlessly patrol the caves in which they died.", + "npc_Mummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_DarkMummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_LightMummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_CorruptSlime": "Steeped in the power of Corruption, these slimes can survive being cut apart into smaller pieces, unlike their untainted brethren.", + "npc_Wraith": "Souls belonging to the darkest of hearts were once sealed in the world's core. Now, they roam the night to add to their kind.", + "npc_CursedHammer": "Magicked through the pure hatred of the Corruption, this weapon flails about attempting to smash anything that breathes.", + "npc_EnchantedSword": "Animated by the blessed light of the crystals, it will slice through anything to cleanse the world's evils.", + "npc_Mimic": "{$CommonBestiaryFlavor.Mimic}", + "npc_Unicorn": "These majestic single-horned equines storm angrily through the hallowed land in search of lowly intrusions needing to be cleansed away.", + "npc_WyvernHead": "A colossal dragon-like creature unleashed along with the ancient spirits. It rules the skies with its unrivaled might.", + "npc_GiantBat": "The oversized cousins of Cave Bats, these bats are more dangerous and can confuse their enemies with their bite.", + "npc_Corruptor": "Like a cancer, the putrid creatures born from the Corruption mutate and grow into bigger, more deadly forms which discharge acids.", + "npc_DiggerHead": "Exposure to the effects of ancient magicks flowing throughout the cracks of the world causes unusual rapid growths in giant worms.", + "npc_SeekerHead": "Ancient magicks have unleashed the dark influences that gave birth to the Eater of Worlds, producing smaller, but just as deadly worms.", + "npc_Clinger": "In the depths of the darkest corruption lies cursed-fire belching, betentacled nightmares stretching from the very walls themselves.", + "npc_AnglerFish": "Some angler fish are content to lie in wait for their prey, but these are perfectly happy to aggressively chase down an underwater meal.", + "npc_GreenJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_Werewolf": "Cursed by the moonlight, these menacing lupines were once human. Now, they feast on their loved ones instinctively.", + "npc_GoblinTinkerer": "Exiled from the rest of goblinkind for being an intelligent pacifist, the Tinkerer sells tools for combining accessories into stronger versions.", + "npc_Wizard": "The Wizard is an absent-minded, demented old man who dabbles in the arcane arts. He sells magical trinkets to train new apprentices.", + "npc_Clown": "His origins unknown, this creepy fiend balances himself on a ball while hurling explosive destruction at everything around him.", + "npc_SkeletonArcher": "Skeleton Archers have a keen eye, despite the general lack of eyes. Distance offers little protection from their blazing arrows.", + "npc_GoblinArcher": "Lending ranged support to the Goblin Army, archers keep a distance and pick off distracted and overwhelmed foes.", + "npc_WallofFlesh": "Serving as the world's core and guardian, the towering demon lord exists to keep powerful ancient spirits sealed away.", + "npc_TheHungry": "The Wall of Flesh's many mouths, attached by bloody veins. As a last resort, they can tear away and hungrily chase down threats.", + "npc_TheHungryII": "The Wall of Flesh's many mouths, attached by bloody veins. As a last resort, they can tear away and hungrily chase down threats.", + "npc_LeechHead": "A worm-like parasite spit forth from the Wall of Flesh, filled with the lifeblood of its host. This blood has healing properties.", + "npc_ChaosElemental": "Once living beings infused by the blessing, they erratically make chase with an uncontrollable surge of luminous power.", + "npc_Slimer": "The Slimer has become airborne with wings of unknown origin. The wings are easily knocked off with force, depriving it of its flight.", + "npc_Gastropod": "Touched by the blessing, these nocturnal slimes evolved into a levitating snail-like creature which spits powerful beams of light.", + "npc_Mechanic": "The Mechanic was imprisoned for her aptitude in engineering. She sells wiring and tools for putting together anything imaginable.", + "npc_Retinazer": "Belonging to a pair of mechanically recreated Eyes of Cthulhu, this one focuses its energy into firing powerful lasers.", + "npc_Spazmatism": "Belonging to a pair of mechanically recreated Eyes of Cthulhu, this one chases at high speed, exhaling cursed flames.", + "npc_SkeletronPrime": "Mechanically reconstructed for reviving Cthulhu, this Skeletron has more arms than ever before, and a variety of fierce weapons.", + "npc_BaldZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_WanderingEye": "Given time to mature, Demon Eyes will continue to grow in size and danger. These ones are old enough that their teeth have come in.", + "npc_TheDestroyer": "A mechanical simulacrum of Cthulhu's spine decorated in laser-armed probes, which detach from its body when damaged.", + "npc_IlluminantBat": "Blessed with the prismatic light of the Hallow, the Illuminant Bats are a vibrant pink blur arcing across the darkness of the Underground.", + "npc_IlluminantSlime": "Slimes exposed to the light of the Hallow's crystals begin to emit that very same light, glowing brightly in the darkness.", + "npc_Probe": "A singular probe detached from the Destroyer's body serves as a remote laser battery, often in a swarm of other probes.", + "npc_PossessedArmor": "Whatever possessed this suit of armor to suddenly walk about and start killing everyone? It lacks a corporeal body.", + "npc_ToxicSludge": "Distantly related to the common slime, the Toxic Sludge takes down its prey with potent toxins and a disarmingly toothy smile.", + "npc_SantaClaus": "Only present during a specific time of year, Santa Claus makes a big entrance and an even bigger, rather explosive exit. Ho! Ho! Ho!", + "npc_SnowmanGangsta": "While the world's inhabitants celebrate festivities, gangster snowmen party by slaying everyone with their tommy guns.", + "npc_MisterStabby": "This stone-cold, yet maniacal gangster never snuffs the celebrating do-gooders without bringing along his 'Lil' Pokey'.", + "npc_SnowBalla": "Nobody underestimates the throwing arm on this disturbed member of the snowman mafioso. He's a real slugger!", + "npc_IceSlime": "Slimes that spent too long in arctic temperatures may begin to partially freeze, developing a shifting layer of ice on their surface.", + "npc_Penguin": "{$CommonBestiaryFlavor.Penguin}", + "npc_PenguinBlack": "{$CommonBestiaryFlavor.Penguin}", + "npc_IceBat": "As if bats weren't enough of a nuisance already, Ice Bats can freeze flesh solid with a touch, leaving their prey defenseless.", + "npc_Lavabat": "{$CommonBestiaryFlavor.LavaBat}", + "npc_GiantFlyingFox": "An oversized cousin of the bat found only in the Jungle, giant flying foxes hunt the night skies looking for prey.", + "npc_GiantTortoise": "No one takes the giant tortoises seriously. Not until they come hurtling through the air, a spinning, spiky ball of death.", + "npc_IceTortoise": "Like their jungle cousins, ice tortoises are an unexpectedly serious threat, possessing surprising speed and mobility. ", + "npc_Wolf": "Living in the harshest of climates, these savage lupines hunt in the dark of night desperately for sustenance.", + "npc_RedDevil": "Conjuring potent spears of dark magic, these elite demons are a serious threat to any who dare enter their abode.", + "npc_Arapaima": "These enormous fish thrive in the jungle waters near veins of unstable magicks, which make them unusually strong and hostile.", + "npc_Vampire": "Whether he is a man who turns into a bat, or a bat who turns into a man, one thing is for sure: he's out for blood!", + "npc_Truffle": "Harnessing the hidden power of the glowing mushroom, the Truffle forges weapons and tools exclusively in his mushroom home.", + "npc_ZombieEskimo": "Zombies found in snow biomes are often found bundled up in winter clothing. It doesn't help them any, they are still dead cold!", + "npc_Frankenstein": "Built from parts of deceased Terrarians, this stout monster resulted from a crazy man's desire to create life with his own hands.", + "npc_WallCreeperWall": "They have eight legs, eight eyes, and eight ways to cocoon and feast upon an unsuspecting victim.", + "npc_SwampThing": "Creeping from the depths of the darkest swamps, this algae-dripped beast desires to drown away anyone in his path.", + "npc_UndeadViking": "Long before there were pirates, stories tell of powerful vikings who raged the seas. Their remains roam the icy caverns below.", + "npc_CorruptPenguin": "During a Blood Moon, the normally docile penguins fall under the hostile influence of the Corruption.", + "npc_IceElemental": "Water elementals become icy when dense strong magicks accumulate in the coldest places. Their frosty shards freeze all.", + "npc_PigronCorruption": "{$CommonBestiaryFlavor.Pigron}", + "npc_PigronHallow": "{$CommonBestiaryFlavor.Pigron}", + "npc_RuneWizard": "Tim's more powerful and much better-looking older brother. He, too, prefers the heat, but not excessively.", + "npc_Crimera": "The most common horror to be born from the Crimson, it seeks to consume pure things with unrelenting hunger.", + "npc_Herpling": "These hyper, demented, slug-like fiends serve the crimson horde with an unstoppable appetite for blood and flesh.", + "npc_AngryTrapper": "When a Man Eater consumes enough human flesh, it undergoes a cocoon-like metamorphosis into a far deadlier form.", + "npc_MossHornet": "The empowered flora of the Jungle has merged with these species of Hornet, strengthening their exoskeletons and stingers.", + "npc_Derpling": "These large, sapphire-shelled fleas leap around incessantly. They can drain the blood content of one man within seconds.", + "npc_Steampunker": "The Steampunker has a particular taste for steam-fueled machinery and gadgets. She sells her gizmos with an endearing accent.", + "npc_CrimsonAxe": "Ensorcelled by the Crimson collective, this weapon moves about and chops its enemies by its own will.", + "npc_PigronCrimson": "{$CommonBestiaryFlavor.Pigron}", + "npc_FaceMonster": "It would be unwise to face off with one of these unfeeling, hungry mutations. Their mouths are large enough to devour all things.", + "npc_FloatyGross": "These buoyant terrors of the darkest crimson depths most definitely, without question, are both floaty and gross.", + "npc_Crimslime": "Taking on the consistency of congealed blood and flesh, Crimslimes seek out and digest more raw material for the Crimson.", + "npc_SpikedIceSlime": "This Ice Slime has large ice shards in its mass from excessive exposure to the cold. Somehow, it is able to launch these at its prey.", + "npc_SnowFlinx": "A strange, round furry mammal with an unusually large, protruding nose. They are extremely lightweight.", + "npc_PincushionZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_SlimedZombie": "Sometimes, a slime's victim will turn into a zombie mid-digestion. Walking around like that is quite awkward for both parties.", + "npc_SwampZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_TwiggyZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_CataractEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_SleepyEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_DialatedEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_GreenEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_PurpleEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_WanderingEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_LostGirl": "Naked and afraid, this girl stands still, deep in the world, as if waiting for someone to rescue her and lead her to the surface.", + "npc_Nymph": "Masterfully deceives explorers by posing as a lost girl, then attacks with ferocious might, blood-lust in her eyes.", + "npc_ArmoredViking": "The most elite vikings were worthy of the strongest armor. It seems that it wasn't terribly effective, given their state now.", + "npc_Lihzahrd": "A reclusive race of reptilian folk found exclusively in the mysterious jungle Temple. They look primitive, but are quite advanced.", + "npc_FemaleZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_HeadacheSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_MisassembledSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_PantlessSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_SpikedJungleSlime": "Frequent consumption of the Jungle's toxins and thorns has resulted in a slime covered in venomous spikes.", + "npc_Moth": "Rarely, exposure to jungle toxins causes certain moths to mutate to enormous size. They release a valuable dust on death.", + "npc_IcyMerman": "Mermen rarely stray far from the ocean. Those that do can become lost, wander into cold caverns, and become icy undead fish men.", + "npc_DyeTrader": "Eccentric and rather snobby to a fault, the Dye Trader has expensive tastes. He is passionate about the materials used in the dyes he sells.", + "npc_PartyGirl": "Positive beyond comprehension, the Party Girl will use any excuse to celebrate. She sells party favors and flashy things.", + "npc_Cyborg": "The Cyborg was built with the combined efforts of the Mechanic and the Steampunker to aid in rocket science and world defense.", + "npc_Bee": "Found in hives and nests all throughout the jungle, these tiny pests will swarm an adventurer at every turn.", + "npc_BeeSmall": "Found in hives and nests all throughout the jungle, these tiny pests will swarm an adventurer at every turn.", + "npc_PirateDeckhand": "They are either washing the deck of their ship of seaweed and ale, or wiping the dirt with the faces of unsuspecting Terrarians.", + "npc_PirateCorsair": "Once mercenaries from a distant land, Corsairs brandish deadly scimitars with unyielding skill and a cut-throat agenda.", + "npc_PirateDeadeye": "Nobody knows if 'Dead Eye' refers to their precise aim, or the fact that one of their eyes is indeed 'dead'... like their targets.", + "npc_PirateCrossbower": "Some wee lasses aren't content staying at port waiting for their men to return from a raid, so they join in on the deadly fun!", + "npc_PirateCaptain": "A pirate captain's love for riches is only rivaled by his obsession with heavy gunpowder and large, rampart-shattering cannons!", + "npc_CochinealBeetle": "Found in deep, dark caverns, these large beetles are sought out for the deep, blood-red secretions stored in their scaly exoskeleton.", + "npc_CyanBeetle": "Hardy to extremely cold temperatures, these beetles contain a desired bluish fluid which can be used to dye textiles.", + "npc_LacBeetle": "These scaly insects thrive in thick subterranean foliage. Their secretions stain many materials in a beautiful violet color.", + "npc_SeaSnail": "This unusually large snail makes its home deep in the ocean. Its mucous can be manufactured into a purple dye.", + "npc_Squid": "A betentacled marine creature which discharges a thick, black ink when threatened. The ink is collected for aesthetic purposes.", + "npc_QueenBee": "This highly aggressive monstrosity responds violently when her larva is disturbed; the honey-laden hives are her home turf.", + "npc_ZombieRaincoat": "Some zombies never leave home without their trusty raincoat. Comfy and dry, they pursue human flesh no matter the weather.", + "npc_FlyingFish": "Certain species of fish gain the most peculiar abilities when it rains. They only like one thing about land-dwellers: their flesh.", + "npc_UmbrellaSlime": "The previous owner of this umbrella learned the hard way: umbrellas are good protection against rain, but not against slime.", + "npc_FlyingSnake": "Kept as pets and guardians by the Lihzahrd race, the flying snakes will attack any who trespass on the Temple's protected grounds.", + "npc_Painter": "The Painter can talk about all the different shades of colors with which one can paint the walls. He'll sell but a handful of them!", + "npc_WitchDoctor": "It's unusual for a Lihzahrd to be outside the Temple. Even more unusual are the voodoo things he sells. He prefers his jungle digs.", + "npc_Pirate": "Ahoy! The only good Pirate Captain is... one that sells cannons and weapons to take out all competing Pirate Captains!", + "npc_HornetFatty": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetHoney": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetLeafy": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetSpikey": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetStingy": "{$CommonBestiaryFlavor.Hornet}", + "npc_JungleCreeperWall": "The itsy bitsy spider climbed up a jungle vine, down came a hapless explorer and the spider got to dine. The End.", + "npc_BlackRecluseWall": "They have eight legs, eight eyes, and eight ways to cocoon and feast upon an unsuspecting victim.", + "npc_BloodCrawlerWall": "Most spiders operate independently, but ones touched by the Crimson hive coordinate together to consume life.", + "npc_BloodFeeder": "Like the piranha, these swarming fish thirst for blood. Birthed from tainted blood themselves, their hunger is truly intense.", + "npc_BloodJelly": "Jellyfish swimming in the bloody waters of the Crimson become infected, converting them to its all-consuming cause.", + "npc_IceGolem": "Sub-zero temperatures, blinding snow flurries, and being blasted apart by an icy construct are some of the dangers of blizzards.", + "npc_RainbowSlime": "These blessing-infused gelatin menaces glow vibrantly in a rainbow of hues. As a result, they require a constant liquid intake.", + "npc_Golem": "A remarkable display of ingenuity constructed by the Lihzahrd clan. Powered by solar energy cells, it is ready to guard the Temple.", + "npc_AngryNimbus": "When severe storms roll through, it is said that the skies are angry. This cloud in particular is especially livid!", + "npc_Eyezor": "A powerful zombie-like creature whose eye can see for miles, and blow away opponents with powerful lasers.", + "npc_Parrot": "A pirate's best friend, the parrot, will tear the eyes out of any greasy landlubber with its sharp, pointy talons.", + "npc_Reaper": "The reaper's list stretches endlessly with the names of those who will soon depart this world. His sickle will make sure of that.", + "npc_ZombieMushroom": "{$CommonBestiaryFlavor.MushroomZombie}", + "npc_ZombieMushroomHat": "{$CommonBestiaryFlavor.MushroomZombie}", + "npc_FungoFish": "Some fish exposed to glowing mushroom spores become a curious mushroom-jellyfish hybrid, glowing softly in the watery depths.", + "npc_AnomuraFungus": "These crab-like creatures scuttle about in glowing mushroom fields, heavily infested by the fungal spores. ", + "npc_MushiLadybug": "This aggressive species of ladybug is quite at home near glowing mushrooms, living symbiotically with the fungus.", + "npc_FungiBulb": "{$CommonBestiaryFlavor.FungiBulb}", + "npc_GiantFungiBulb": "{$CommonBestiaryFlavor.FungiBulb}", + "npc_Plantera": "A dormant, yet powerful floral guardian awoken by the fallout of Cthulhu's destroyed machinations. Its reach spans the entire jungle.", + "npc_BrainofCthulhu": "A piece of Cthulhu torn asunder, this vile mastermind pulses with agony and aids the Crimson to an attempt to avenge its master.", + "npc_Creeper": "Manipulated through the hive mind of the Crimson, Creepers serve as the brain's eyes and orbit around it for defense in numbers.", + "npc_IchorSticker": "Filled to the brim with powerful ichor, these squid-like abominations spew their corrosive bio-fluid at their prey.", + "npc_RustyArmoredBonesAxe": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesFlail": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesSword": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesSwordNoArmor": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_BlueArmoredBones": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesMace": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesNoPants": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesSword": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_HellArmoredBones": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesSpikeShield": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesMace": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesSword": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_RaggedCaster": "{$CommonBestiaryFlavor.RaggedCaster}", + "npc_RaggedCasterOpenCoat": "{$CommonBestiaryFlavor.RaggedCaster}", + "npc_Necromancer": "{$CommonBestiaryFlavor.Necromancer}", + "npc_NecromancerArmored": "{$CommonBestiaryFlavor.Necromancer}", + "npc_DiabolistRed": "{$CommonBestiaryFlavor.Diabolist}", + "npc_DiabolistWhite": "{$CommonBestiaryFlavor.Diabolist}", + "npc_BoneLee": "It's said that centuries ago, there was once a clan of ninjas that hid in the shadows of the world. It seems they are long dead now.", + "npc_DungeonSpirit": "Sometimes, highly concentrated ectoplasm gathers inside the more powerful of the cursed inhabitants of the Dungeon.", + "npc_GiantCursedSkull": "No one knows where these giant skulls came from, but like their smaller cousins, they seek out and curse the living with their magic.", + "npc_Paladin": "In distant history, these mighty undead knights once guarded a prosperous city before a massive curse befell them.", + "npc_SkeletonSniper": "These eagle-eyed sharpshooters let nothing escape their crosshairs. Part of an elite military unit in their past lives.", + "npc_TacticalSkeleton": "With thick armor and mighty boomsticks, it's clear these bones are prepared for a siege. Part of an elite military unit in their past lives.", + "npc_SkeletonCommando": "Rocket-powered and fueled with rage, these cursed skeletons prefer the nuclear option. Part of an elite military unit in their past lives.", + "npc_AngryBonesBig": "{$CommonBestiaryFlavor.AngryBones}", + "npc_AngryBonesBigMuscle": "{$CommonBestiaryFlavor.AngryBones}", + "npc_AngryBonesBigHelmet": "{$CommonBestiaryFlavor.AngryBones}", + "npc_BirdBlue": "This little blue bird came looking for worms.", + "npc_BirdRed": "A rare, red-crested friend of the forest.", + "npc_Squirrel": "Fast moving and erratic woodland creatures with greyish-brown fur. Got nuts? ", + "npc_Mouse": "Mice squeak around harmlessly, looking for small insects in damp underground locations.", + "npc_Raven": "Nevermore. Nevermore. Nevermore. Nevermore. Nevermore. Nevermore. Nevermore. Nevermore.", + "npc_SlimeMasked": "Is it a slime in a bunny costume? Or is it a bunny in a slime costume? Halloween can be very confusing sometimes.", + "npc_BunnySlimed": "Is it a bunny in a slime costume? Or is it a slime in a bunny costume? Halloween can be very confusing sometimes.", + "npc_HoppinJack": "This particular pumpkin seeks revenge for being carved. His hearty leaps become quicker the more he is carved into.", + "npc_Scarecrow1": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow2": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow3": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow4": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow5": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow6": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow7": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow8": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow9": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow10": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_HeadlessHorseman": "This menacing nightmare rides out into the night to harvest living souls on his seeing-eye horse, for he has no head of his own.", + "npc_Ghost": "During the most harrowing times, these apparitions float aimlessly through the depths to steal the life from those they envy.", + "npc_DemonEyeOwl": "{$CommonBestiaryFlavor.CostumeDemonEye}", + "npc_DemonEyeSpaceship": "{$CommonBestiaryFlavor.CostumeDemonEye}", + "npc_ZombieDoctor": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_ZombieSuperman": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_ZombiePixie": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_SkeletonTopHat": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_SkeletonAstonaut": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_SkeletonAlien": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_MourningWood": "These enormous murder trees nightmarishly stomp about, prepared to shower endless fiery destruction upon all life.", + "npc_Splinterling": "Mourning Woods reproduce by snapping cuttings from their bodies and thrusting them into the soil. Splinterlings are the result.", + "npc_Pumpking": "A pumpkin has many faces. A pumpkin will murder all with many sharp blades. A pumpkin is king of the harvest.", + "npc_Hellhound": "Most certainly not a good boy, this vicious demon dog is more than eager to guide living beings to the underworld with every bite.", + "npc_Poltergeist": "The intense hateful energies emanating from these spirits grant them the ability to move objects, truly for the purpose of killing.", + "npc_ZombieXmas": "{$CommonBestiaryFlavor.ZombieXmas}", + "npc_ZombieSweater": "{$CommonBestiaryFlavor.ZombieXmas}", + "npc_SlimeRibbonWhite": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonYellow": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonGreen": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonRed": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_BunnyXmas": "Judging by the outfit, Santa appears to have recruited some bunnies to be his little helpers this year.", + "npc_ZombieElf": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ZombieElfBeard": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ZombieElfGirl": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_PresentMimic": "Surprise! The most unexpected gift this holiday season, the Present Mimic is a nicely gift-wrapped box of teeth and death.", + "npc_GingerbreadMan": "A gingerbread man seeking vengeance for his long-eaten brethren. He may look yummy, but this is one tough cookie.", + "npc_Yeti": "An ill-tempered ape from cold, snowy regions to the north. They do not appreciate festivity, so they've come to spoil all the fun.", + "npc_Everscream": "If trees could scream, this evil evergreen would do so constantly. Deadly are the ornaments hurled from its branches.", + "npc_IceQueen": "If this icy towering monstrosity wishes for someone's soul, they'll surely let it go... right from their cold, dead hands.", + "npc_SantaNK1": "This jolly bad boy wants to stuff everyone's stockings with the gift of their entrails. This cranky Kringle's gone postal.", + "npc_ElfCopter": "The elves aren't just flying toy helicopters, these are fully combat ready. All that inventing finally paid off! ", + "npc_NutcrackerSpinning": "Bringing his massive chompers to bear, the Nutcracker frolics through the wintery night. Nuts aren't the only thing he can crack.", + "npc_ElfArcher": "These aren't your typical elven archers. Tinkering all year long, they are excited to gift you with the hottest new arrows this season.", + "npc_Krampus": "Every year, Krampus is tasked to punish all of the naughty children, but he's taken the day off to participate in this mayhem instead!", + "npc_Flocko": "These ferocious flakes are the frozen minions of the Ice Queen. Where this sinister snow falls, so shall her icy judgment.", + "npc_Stylist": "The Stylist loves style, gossip, and hair. Aside from performing a miracle makeover, she sells some hair product as well.", + "npc_Firefly": "Appears at night in calm locations, illuminating the sky with strobing green light. Fish are fairly attracted to these.", + "npc_Butterfly": "Beautiful fluttering insects that love sunrises. Fish are attracted to these based on their color variety.", + "npc_Worm": "A slick, tubular invertebrate found hiding in rocks, dirt, and grass. Loves the rain. Fish are especially attracted to these.", + "npc_LightningBug": "Appears at night in blessed locations, filling the sky with flashing cyan light. Fish are especially attracted to these.", + "npc_Snail": "A slimy mollusk that thrives in damp, dark places. Fish are barely attracted to these.", + "npc_GlowingSnail": "A snail that has mutated to adapt to the glowing mushroom environment. Fish are significantly attracted to these.", + "npc_Frog": "Prefers bodies of water filled with thick growth. Perfectly content both on land and underwater.", + "npc_Duck": "A water fowl with beautiful plumage. Swims in the purest of water, quacking happily.", + "npc_DuckWhite": "A white feathered waterfowl that swims in pure water and basks in the warm sun.", + "npc_ScorpionBlack": "Despite its menacing appearance, it is quite docile unless threatened or facing smaller prey. Fish are occasionally attracted to these.", + "npc_Scorpion": "Harmlessly scuttles around the desert looking for food. Fish are barely attracted to these.", + "npc_TravellingMerchant": "The flamboyantly-dressed Traveling Merchant travels far and wide to bring unique, cultural wares from time to time.", + "npc_Angler": "The Angler, a rude fishing genius, sends others to find weird, rare fish. He rewards random items, entertained by any misfortunes.", + "npc_DukeFishron": "An aquatic pigron mutation from the depths of the ocean who surfaces in search of a rare, savory type of worm.", + "npc_Sharkron": "Duke Fishron's nature as a form of chimera causes his offspring to emerge more shark-like, which he uses as minions in battle.", + "npc_TruffleWorm": "An extremely rare, difficult to catch glowworm. A specific, powerful sea creature is insatiably attracted to these.", + "npc_Grasshopper": "It leaps tall blades of grass in a single bound. Fish are fairly attracted to these.", + "npc_ChatteringTeethBomb": "A playful prank gone wrong, clowns will unleash these explosive chompers on their enemies. Also great for parties!", + "npc_CultistArcherBlue": "Sworn to protect the cultist's ritual, these robed archers will fight to the death defending the lunatic devotees.", + "npc_BrainScrambler": "These Martian soldiers brandish crude laser weaponry that releases dangerous short-range radiation, hence the protective helmets.", + "npc_RayGunner": "The elite specialists in the Martian Invasion Force are equipped with more precise and deadly laser rifles; effectively snipers.", + "npc_MartianOfficer": "Lacking offensive weaponry, officers in the Martian forces favor defensive measures to focus on relaying tactics to the soldiers.", + "npc_GrayGrunt": "Martians are conscripted into military service, and those who do not make the cut are sent out unarmed to distract the enemy as fodder.", + "npc_MartianEngineer": "Martian soldiers who lack combat ability may instead be deployed for their mechanical aptitude, constructing turrets on the field.", + "npc_MartianTurret": "Named after a historic Terrarian, these turrets are built by Martian engineers and rain devastating energy upon anyone nearby.", + "npc_MartianDrone": "The data collected from these drones are sent back to the motherships moments before they self-destruct onto their foes.", + "npc_GigaZapper": "Martians who show great potential in close combat are equipped with powerful energy spears that can atomize anything.", + "npc_ScutlixRider": "Elite Ray Gunners often ride these powerful alien creatures into battle as cavalry. If their mount dies, they will pursue on foot.", + "npc_Scutlix": "Native to the Martian homeworld, these creatures function similarly to horses. That is, if horses could fire lasers from their eyes.", + "npc_MartianSaucerCore": "An advanced flying saucer from somewhere well beyond this world. The destruction from its weaponry is unimaginable.", + "npc_MoonLordCore": "The mastermind behind all terrors which befall the world, freed from his lunar prison. Practically a god, his power knows no limits.", + "npc_MartianProbe": "Sensing growing power on the planet, otherworldly beings send space-age technology to scan for advanced lifeforms.", + "npc_StardustWormHead": "The celestial energies of which this worm is born give its body and tail near unstoppable power as it twists through the skies.", + "npc_StardustCellBig": "A biological single-celled organism that divides and multiplies rapidly with the limitless power of celestial energy.", + "npc_StardustCellSmall": "A biological single-celled organism that divides and multiplies rapidly with the limitless power of celestial energy.", + "npc_StardustJellyfishBig": "A cosmic jellyfish-type creature infused with abundant celestial energies which summons smaller minions to serve as its weaponry.", + "npc_StardustSpiderBig": "This beastly celestial arachnid rapidly spawns swift and relentless offspring to distract its prey as it prepares to devour them.", + "npc_StardustSoldier": "This slow-moving celestial soldier fires cosmic rays at unsuspecting invaders, defending the pillar without hesitation.", + "npc_SolarCrawltipedeHead": "Wrapped in celestial energy, this worm-like creature seems invincible. Having no eyes, it seeks vibrations throughout the air.", + "npc_SolarDrakomire": "These celestial beasts harness the power of the sun, releasing violent flares towards any intruders nearing the pillar.", + "npc_SolarDrakomireRider": "Many drakanians ride the beastly Drakomires as a form of battle steed. Should the Drakomire be slain, they will pursue on foot.", + "npc_SolarSroller": "These humanoid celestial monsters assault their foes by rolling up into a ball and charging them with their sharp, fiery spikes.", + "npc_SolarCorite": "Resembling a large, sentient meteorite, Corites are infused with celestial energy and will charge at anything that moves.", + "npc_SolarSolenian": "These acrobatic celestial warriors can deflect incoming threats whilst spinning with their solar-infused blades.", + "npc_NebulaBrain": "These brain-like celestial beings have psionic capabilities, phasing through space and summoning powerful optical minions.", + "npc_NebulaHeadcrab": "These psionic, squid-like beasts levitate with celestial energy and latch onto the head of their prey, disrupting brain functions.", + "npc_LunarTowerVortex": "Representing a deep celestial void known as 'vortex', this tower holds the seal locking away a terrifying tyrant.", + "npc_NebulaBeast": "Celestial power fuels the aggression of these violent beasts, allowing them to run down those who trespass the pillar's area.", + "npc_NebulaSoldier": "The cosmic power held by these humanoid warriors grant them psychic abilities, in which they use to accurately shoot down foes.", + "npc_VortexRifleman": "These alien soldiers carry a versatile arsenal of celestial rifles and cosmic accessories that allow them to defy gravity.", + "npc_VortexHornetQueen": "The final evolutionary stage of the alien hornet. They fire powerful disruptive energy at their prey, and give birth to many larvae.", + "npc_VortexHornet": "These flying insectoids utilize wormholes to ambush intruders near the celestial pillars. They hunt in pairs and may swiftly evolve.", + "npc_VortexLarva": "The larval stage of the alien hornets. They may seem weak and harmless, but if ignored they will evolve into powerful beings.", + "npc_VortexSoldier": "The cosmic energy surging through these warriors builds up until their untimely demise, resulting in an explosion of lightning.", + "npc_ArmedZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombiePincushion": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieSwamp": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieTwiggy": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieCenx": "{$CommonBestiaryFlavor.Zombie}", + "npc_CultistDevote": "Utterly devoted, Lunatic Devotees unfailingly worship their deity, even when threatened with death. Fear only makes them worship harder.", + "npc_CultistBoss": "A fanatical leader hell-bent on bringing about the apocalypse by reviving the great Cthulhu through behind-the-scenes scheming.", + "npc_CultistBossClone": "Though it is an illusion designed to distract from the true threat, this fake cultist can still use some basic offensive magic as well.", + "npc_TaxCollector": "This grumpy Tax Collector has literally been to hell and back. Greedy to a fault, he's truly only concerned with money.", + "npc_GoldBird": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldBunny": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldButterfly": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldFrog": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldGrasshopper": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldMouse": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldWorm": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_BoneThrowingSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton2": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton3": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton4": "{$CommonBestiaryFlavor.Skeleton}", + "npc_SkeletonMerchant": "Most skeletons are out for blood, but not the Skeleton Merchant. He just wants to sell supplies, such as rare torches and yo-yo gear.", + "npc_CultistDragonHead": "Wyvern souls are entwined in the atmosphere of the world. Powerful magicks can summon them through the veil with physical form.", + "npc_Butcher": "Soulless and cruel, this pig-masked psychotic killer brandishes a powerful chainsaw in which to dismember every living thing.", + "npc_CreatureFromTheDeep": "Said to have emerged from the blackest lagoons, these fish-men lash at their victims with unmatched submerged mobility.", + "npc_Fritz": "Rumors speak of a small-minded hunchback who assisted in mad science. This small fellow reacts unpredictably when approached.", + "npc_Nailhead": "An intelligent being who seeks out souls to steal, utilizing nails from his own body both as a weapon and as defensive measures.", + "npc_CrimsonBunny": "Bunnies are pure beings that normally cannot be afflicted by Crimson, but will succumb under the effects of a Blood Moon.", + "npc_CrimsonGoldfish": "Goldfish become grotesque, blood-sucking fiends of the Crimson when exposed to a Blood Moon.", + "npc_Psycho": "This masked killer's quiet demeanor and cunning ability to hunt allows him to ambush his victims without being detected.", + "npc_DeadlySphere": "By means unknown, this silvery metamorphic sphere levitates about on its own. It moves about quickly, often producing spikes.", + "npc_DrManFly": "Part man, part fly, all doctor. He's brought his most volatile and dangerous chemicals, and he's buzzing to try them out.", + "npc_ThePossessed": "A Terrarian girl possessed by the most evil of spirits, she gains superhuman abilities and behaves both arbitrarily and violently.", + "npc_CrimsonPenguin": "During a Blood Moon, the normally docile penguins become infested with the contagious growth of the Crimson.", + "npc_GoblinSummoner": "Gifted in the darkest of magics, she summons unfathomable shadowflame ghasts through a powerful hex.", + "npc_ShadowFlameApparition": "The shadowflame magicks are powerful spiritual remnants of twisted goblin ancestors, wrought from powerful summoning.", + "npc_BigMimicCorruption": "Mimics which fall to Corruption grow larger and more powerful as a result. They can be birthed from ordinary chests by force.", + "npc_BigMimicCrimson": "Mimics which are enthralled by the Crimson are empowered dramatically. They can be birthed from ordinary chests by force.", + "npc_BigMimicHallow": "Mimics struck with the blessing surge with energy and become powerful. They can be birthed from ordinary chests by force.", + "npc_Mothron": "A behemoth of an insect attracted to the eerie anti-glow of a solar eclipse. With a rapid gestation period, it multiplies quickly.", + "npc_MothronSpawn": "The creatures which burst from the eggs laid by mothron can be as deadly and as relentless as their daunting mothers.", + "npc_Medusa": "An ancient monster with a petrifying gaze. The snakes which grow from her scalp like hair grant her these powers.", + "npc_GreekSkeleton": "In the ruins of an ancient civilization now deeply buried, some of its spear-hurling soldiers still walk its marble-adorned paths.", + "npc_GraniteGolem": "Strong are the magicked spirits which inhabit the granite masses deep below, this type in particular taking on a humanoid shape.", + "npc_GraniteFlyer": "Earth elementals manifest through many forms by taking on the properties of different materials, such as this hardy granite.", + "npc_EnchantedNightcrawler": "Worms infused with fallen star magic glow with a glittering light. Fish are extremely attracted to these.", + "npc_Grubby": "Slimy, yet satisfying! Fish are especially attracted to these.", + "npc_Sluggy": "Slow and covered in a slick mucous. Fish are somewhat attracted to these.", + "npc_Buggy": "A vibrant beetle-like bug. Fish are extremely attracted to these.", + "npc_BloodZombie": "With enough exposure to a Blood Moon, zombies become twisted and cursed with everflowing blood pouring out from their rotten flesh.", + "npc_Drippler": "Demon eyes become erratic under a Blood Moon, sometimes twisting together into a dripping cluster of cursed blood and eyeballs.", + "npc_PirateShip": "When the pirates face strong opposition in their pillaging raids, they bring their majestic floating galleon as backup. Cannons away!", + "npc_LunarTowerStardust": "Representing a glittering celestial remnant known as 'stardust', this tower holds the seal locking away a terrifying tyrant.", + "npc_Crawdad": "A subterranean form of crayfish which scuttles along the cavern floors, searching for prey to clip apart with its powerful pincers.", + "npc_GiantShelly": "To overcome their slow speed, shellies have developed the ability to hide inside their spiked shell and hurl themselves at their foes.", + "npc_Salamander2": "An unusual amphibious bipedal lizard which inhabits the dark caverns. When threatened, it spews a highly corrosive acid everywhere.", + "npc_LunarTowerNebula": "Representing a stormy celestial body known as 'nebula', this tower holds the seal locking away a terrifying tyrant.", + "npc_GiantWalkingAntlion": "{$CommonBestiaryFlavor.AntlionCharger}", + "npc_GiantFlyingAntlion": "{$CommonBestiaryFlavor.AntlionSwarmer}", + "npc_DuneSplicerHead": "The world's largest, most deadly worm. Strengthened by ancient magicks, it can devour a spicy Terrarian quicker than they realize.", + "npc_TombCrawlerHead": "The desert is home to one of the largest varieties of worms across the land. It has a voracious appetite for careless explorers.", + "npc_LunarTowerSolar": "Representing a flaming celestial event known as 'solar flares', this tower holds the seal locking away a terrifying tyrant.", + "npc_SolarSpearman": "These highly aggressive celestial soldiers carry a large, fiery spear that can melt nearly anything it penetrates.", + "npc_MartianWalker": "A wonder of Martian technology constructed from the strongest metals and infused with biological components.", + "npc_AncientCultistSquidhead": "A vision of a deadly omen wrought forth by a powerful cultist, often appears with reckless cosmic summoning of wyvern spirits.", + "npc_DesertGhoul": "Wandering the dark caverns below the desert dunes, ghouls are the dessicated husks of zombies preserved by the arid environment.", + "npc_DesertGhoulCorruption": "Ghouls twisted by the Corruption ooze a nasty green bile that ignites on contact with skin, scorching their prey with cursed flames.", + "npc_DesertGhoulCrimson": "Ghouls infested by the Crimson leak vile ichor from their mouths, weakening the defenses of their foes with every bite.", + "npc_DesertGhoulHallow": "Ghouls cleansed by the Hallow possess a psychedelic saliva that renders their victims confused and distracted by visions and mirages.", + "npc_DesertLamiaLight": "{$CommonBestiaryFlavor.Lamia}", + "npc_DesertLamiaDark": "{$CommonBestiaryFlavor.Lamia}", + "npc_DesertScorpionWall": "These unnaturally large scorpions have adapted to swiftly pursuing their prey along the walls with their sharp, venomous tails.", + "npc_DesertBeast": "Sturdy as a rock, these lizard-like beasts roam the desert in search of food. Their hardened bodies make them formidable threats.", + "npc_DesertDjinn": "Ancient magicks corrupted the minds of the once friendly desert djinns, releasing them full of hostility from their lamps.", + "npc_DemonTaxCollector": "Sentenced to an eternity of punishment for his lifelong greedy ambitions, this man has long been corrupted into a demonic state.", + "npc_TheBride": "It's uncertain if the bride was wed before or after her death, but the story ends tragically for anyone who crosses her path.", + "npc_SandSlime": "Deserts are very dry, but the Sand Slime seems to have successfully adapted to the harsh conditions by becoming a pile of living sand.", + "npc_SquirrelRed": "Rare, red-furred hyperactive rodents which scurry about the woods.", + "npc_SquirrelGold": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_PartyBunny": "Someone put a party hat on a bunny. It must be a real party animal.", + "npc_SandElemental": "The most intense sandstorms draw forth powerful earth elementals. With this feminine form, her tornadoes tear all asunder.", + "npc_SandShark": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkCorrupt": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkCrimson": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkHallow": "{$CommonBestiaryFlavor.Sandshark}", + "npc_Tumbleweed": "Powerful winds have blown this tumbleweed around the desert, and it is none too pleased. They roll faster with the wind than against it.", + "npc_DD2Bartender": "The Tavern Keep once managed a bar in another universe. He's here to help stop the Old One's Army from conquering this world.", + "npc_DD2Betsy": "A vicious Etherian dragon who leads the minions of the Old One's Army that found their way to this world.", + "npc_DD2GoblinT3": "A unique goblin species from Etheria, they are not related Terrarian goblins. The ferocious footsoldiers of the Old One's Army.", + "npc_DD2GoblinBomberT3": "Hurling bombs with reckless abandon, these sappers serve the Old One's Army with maniacal passion.", + "npc_DD2WyvernT3": "Etherian Wyverns come in a variety of shapes and sizes, and behave more like bats than the majestic Wyverns of this world.", + "npc_DD2JavelinstT3": "These bulky brutes are awkward and ungainly, but their javelins are still razor sharp, and their aim is deadly.", + "npc_DD2DarkMageT1": "A small, levitating sorcerer from Etheria who wields dark magic and can even raise fresh minions for the Old One's Army.", + "npc_DD2DarkMageT3": "A small, levitating sorcerer from Etheria who wields dark magic and can even raise fresh minions for the Old One's Army.", + "npc_DD2SkeletonT3": "Small armies of these skeletons are summoned from the ground by Dark Mages, loyally serving their master's will.", + "npc_DD2WitherBeastT3": "Wither beasts emit a defense-sapping aura from the crystals on their back. While rooted in place, they heal rapidly.", + "npc_DD2DrakinT3": "Etherian reptiles in service of the Old One's Army. Powerful beasts, they are capable of spewing deadly purple flames.", + "npc_DD2KoboldWalkerT3": "Rigged with an explosive payload, Kobolds have no regard for safety. They eagerly blow themselves up, hoping to take their foes with them.", + "npc_DD2KoboldFlyerT3": "Taking the explosive approach to a whole new level, Kobold Gliders soar the skies, seeking to bring death from above.", + "npc_DD2OgreT2": "A tall, hulking demi-human from the Old One's Army with unfathomable strength and vitality. He carries a big stick.", + "npc_DD2OgreT3": "A tall, hulking demi-human from the Old One's Army with unfathomable strength and vitality. He carries a big stick.", + "npc_DD2LightningBugT3": "Lightning Bugs from Etheria aren't just named that for their pretty lights! These ones blast their foes with shocking bolts of electricity.", + "npc_WalkingAntlion": "{$CommonBestiaryFlavor.AntlionCharger}", + "npc_FlyingAntlion": "{$CommonBestiaryFlavor.AntlionSwarmer}", + "npc_LarvaeAntlion": "Freshly hatched from their eggs, larval antlions should not be underestimated. Though young, they are still very aggressive.", + "npc_FairyCritterPink": "Glowing winged humanoid creatures the size of a butterfly. Attuned to the world around them, they excel at finding shiny things.", + "npc_FairyCritterGreen": "Glowing winged humanoid creatures the size of a butterfly. Attuned to the world around them, they excel at finding shiny things.", + "npc_FairyCritterBlue": "Glowing winged humanoid creatures the size of a butterfly. Attuned to the world around them, they excel at finding shiny things.", + "npc_ZombieMerman": "Mermen may be rare and exotic demi-humans, but they can still die... and still come back from that a changed merman.", + "npc_EyeballFlyingFish": "For mysterious reasons, fish are known to mutate with other living things or even man-made objects. This one is especially violent.", + "npc_Golfer": "The Golfer is a wise, middle-aged man who sells all sorts of golfing equipment. He's got game and knows how to score.", + "npc_TorchZombie": "In life, this torch-wielding zombie joined an angry mob to hunt the undead. In death, it joined an undead mob to hunt the living.", + "npc_GoldGoldfish": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldGoldfishWalker": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_WindyBalloon": "Some enterprising slimes ride wind currents with balloons in an effort to find food. Pop their balloons to bring them back down to earth. ", + "npc_BlackDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_BlueDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_GreenDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_OrangeDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_RedDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_YellowDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_GoldDragonfly": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_Seagull": "A larger bird that inhabits coastal areas. Watch out for droppings!", + "npc_LadyBug": "A brilliant red insect often associated with luck. Fishing with these as bait may result in unwanted karma.", + "npc_GoldLadyBug": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_Maggot": "An unsavory larval bug which feasts on dead, rotting matter. Fish are somewhat attracted to these.", + "npc_Pupfish": "These fish prefer isolated, extreme climates where competition is scarce, such as the lakebeds of a desert oasis.", + "npc_Grebe": "An exotic waterfowl that thrives in the desert oasis.", + "npc_Rat": "These fuzzy rodents sniff about in putrid locations scavenging for food. They are avoided in fear of diseases they may carry.", + "npc_Owl": "A large, wise predatory bird which hunts nocturnally from the tree tops. ", + "npc_WaterStrider": "Glides elegantly along the surface of calm bodies of water searching for smaller bugs. Fish are occasionally attracted to these.", + "npc_GoldWaterStrider": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_ExplosiveBunny": "Not the typical garden-variety bunny. This one has been tampered with, and has an explosive temper as a result.", + "npc_Dolphin": "A playful sea mammal whose intelligence rivals that of humanity.", + "npc_Turtle": "These slow, stoic creatures travel between lakes and dry land, carrying a hard shell on their backs for protection.", + "npc_TurtleJungle": "Their hard shells camouflage them from vicious predators by blending in with the thick, jungly environment in which they reside.", + "npc_BloodNautilus": "An enormous shelled water demon which feeds off the negative energy of a Blood Moon. Brutally responds to being pestered.", + "npc_BloodSquid": "Summoned in small groups by the Nautilus to aid their master in battle. Thick are the streams of blood squirted from their bodies.", + "npc_GoblinShark": "Half-shark, half-goblin, completely murderous! One of the numerous reasons to just stay home during a Blood Moon.", + "npc_BloodEelHead": "A large, worm-like demon, dripping with blood - both its own, and its victim's. It's a bloody nightmare of a fiend!", + "npc_Gnome": "A tiny long-bearded sneak who resides in oversized trees. Becomes a lawn ornament when exposed to sunlight.", + "npc_SeaTurtle": "A soft-shelled reptile that prefers saltwater and marine prey.", + "npc_Seahorse": "A gentle critter which swims harmlessly in the ocean depths. ", + "npc_GoldSeahorse": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_Dandelion": "All this wind can make just about anyone angry. Evidently, this includes otherwise harmless dandelions and their deadly seeds.", + "npc_IceMimic": "{$CommonBestiaryFlavor.Mimic}", + "npc_RockGolem": "Dense-minded living stone formation. Awaits weary cavern dwellers to pound them into juicy rubble.", + "npc_BloodMummy": "The blood-dripping organic matter in these mummies display far better preservation than the rest of their ilk.", + "npc_SporeSkeleton": "Skeletons meandering through more moist caverns become hosts for glowing fungal growth, greatly empowering them.", + "npc_SporeBat": "The tables have turned on a variety of rabid bats, themselves enwrought with a deadly fungal infection.", + "npc_BestiaryGirl": "The Zoologist, resident lycanthrope, adores animals. Her fox-like biology resulted from a cursed animal bite.", + "npc_TownCat": "Lazy, devious, might bring presents. Presents might have once been breathing.", + "npc_TownDog": "A loyal companion to many. Excitable and always ready for action.", + "npc_TownBunny": "Guaranteed to keep the vegetable supplies in check. Might possibly become a hat.", + "npc_HellButterfly": "A solemn butterfly seeking blooms rooted in hell. Its wings glimmer with fiery veins.", + "npc_Lavafly": "A variation of firefly which adapted to the intense conditions of the world's infernal core. It mimics sparking embers.", + "npc_MagmaSnail": "A unique species of snail which withstands extreme heat. Its boiling slime trail melts down most weaker surfaces.", + "npc_GemSquirrelAmethyst": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelTopaz": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelSapphire": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelEmerald": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelRuby": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelDiamond": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelAmber": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemBunnyAmethyst": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyTopaz": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnySapphire": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyEmerald": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyRuby": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyDiamond": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyAmber": "{$CommonBestiaryFlavor.GemBunny}", + "npc_HallowBoss": "Beneath the Hallow's cleansing blanket lies a vengeful fae goddess bent on scrubbing the land of any and all impurity.", + "npc_QueenSlimeBoss": "Hallowed slimes consolidated into a haughty, crushing force adorned in dazzling crystals. She is rumored to grow wings.", + "npc_MaggotZombie": "Wanders aimlessly to infest the living with undeath, unaware of its own maggoty infestation.", + "npc_QueenSlimeMinionBlue": "The blue-spectrumed crystal slimes specialize in growing and ejecting pointed crystal shards from their gelatinous bodies.", + "npc_QueenSlimeMinionPink": "On the pink side of the crystal spectrum, these crystal slimes pop off tumor-like gel growths to assault their enemies.", + "npc_QueenSlimeMinionPurple": "Crystal slimes on the purple spectrum grow wings much like their royal creator, becoming aerial threats.", + "npc_EmpressButterfly": "Should one of these luminescent beings perish in the chaos of night, a sleeping tyrant is rumored to violently awaken.", + }, + "CreativePowers": { + "InfiniteItemSacrificeShortDescription": "Researching will consume it", + "ConfirmInfiniteItemSacrifice": "Research", + "ItemWasJustUnlockedInfinitely": "Once enough of is researched, it will be available infinitely!", + "InfiniteItemsCategoryClosed": "Open Duplication Menu", + "InfiniteItemsCategoryOpened": "Close Duplication Menu", + "InfiniteItemsCategory": "Research Infinite Items", + + "ResearchItemsCategoryClosed": "Open Research Menu", + "ResearchItemsCategoryOpened": "Close Research Menu", + + "InfinitePlacementRange_Disabled": "Normal Placement Range", + "InfinitePlacementRange_Enabled": "Increased Placement Range", + + "StopBiomeSpread_Disabled": "Infection Spread Enabled", + "StopBiomeSpread_Enabled": "Infection Spread Disabled", + + "DifficultySlider_Closed": "Open Enemy Difficulty Slider", + "DifficultySlider_Opened": "Close Enemy Difficulty Slider", + + "NPCSpawnRateSlider_Closed": "Open Enemy Spawn Rate Slider", + "NPCSpawnRateSlider_Opened": "Close Enemy Spawn Rate Slider", + + "PowersMenuOpen": "Close Power Menu", + "PowersMenuClosed": "Open Power Menu", + "TimeCategoryClosed": "Open Time Menu", + "TimeCategoryOpened": "Close Time Menu", + "TimeCategory": "Powers relating to controlling time", + "PersonalCategoryClosed": "Open Personal Power Menu", + "PersonalCategoryOpened": "Close Personal Power Menu", + "PersonalCategory": "Powers relating to you", + "FreezeTime_Disabled": "Time Unfrozen", + "FreezeTime_Enabled": "Time Frozen", + "FreezeTime_Description": "Stop the passage of time", + "StartDayImmediately": "Change Time to Dawn", + "StartDayImmediately_Description": "Time is set to 4:30 AM", + "StartNightImmediately": "Change Time to Dusk", + "StartNightImmediately_Description": "Time is set to 7:30 PM", + "StartNoonImmediately": "Change Time to Noon", + "StartNoonImmediately_Description": "Time is set to 12:00 PM", + "StartMidnightImmediately": "Change Time to Midnight", + "StartMidnightImmediately_Description": "Time is set to 12:00 AM", + "WeatherCategoryClosed": "Open Weather Menu", + "WeatherCategoryOpened": "Close Weather Menu", + "WeatherCategory": "Powers relating to controlling weather", + "StartRainImmediately": "Start Rain", + "StartRainImmediately_Description": "Will cause rain to start falling", + "StopRainImmediately": "Stop Rain", + "StopRainImmediately_Description": "Will cause rain to stop falling", + "Godmode_Disabled": "Godmode Disabled", + "Godmode_Enabled": "Godmode Enabled", + "Godmode_Description": "Become invulnerable to damage!", + + "ModifyWindDirectionAndStrength_Closed": "Open Wind Control Slider", + "ModifyWindDirectionAndStrength_Opened": "Close Wind Control Slider", + + "ModifyTimeRate_Closed": "Open Time Speed Slider", + "ModifyTimeRate_Opened": "Close Time Speed Slider", + + "ModifyRainPower_Opened": "Close Rain Control Slider", + "ModifyRainPower_Closed": "Open Rain Control Slider", + + "FreezeRainPower_Disabled": "Rain Change Enabled", + "FreezeRainPower_Enabled": "Rain Change Disabled", + + "FreezeWindDirectionAndStrength_Enabled": "Wind Change Disabled", + "FreezeWindDirectionAndStrength_Disabled": "Wind Change Enabled", + + "NPCSpawnRateSliderEnemySpawnsDisabled": "Disabled", + + "TabSearch": "If Searched For", + "TabBlocks": "Blocks", + "TabWeapons": "Weapons", + "TabArmor": "Armor", + "TabAccessories": "Accessories", + "TabConsumables": "Consumables", + "TabMisc": "Misc", + "TabMaterials": "Materials", + + "WeatherMonsoon": "Monsoon", + "WeatherClearSky": "Clear Sky", + "WeatherDrizzle": "Drizzle", + + "WindWest": "West", + "WindNone": "No Wind", + "WindEast": "East", + + "ResearchButtonTooltip": "Fully researched items can be created freely", + + "Sort_SortingID": "By ID", + "Sort_PlacableObjects": "Placable Objects", + "Sort_Walls": "Walls", + "Sort_Blocks": "Blocks", + "Sort_Alphabetical": "Name", + "CantUsePowerBecauseOfNoPermissionFromServer": "You have no permission for this power" + } + +} \ No newline at end of file diff --git a/Localization/Content/en-US/Items.json b/Localization/Content/en-US/Items.json new file mode 100644 index 0000000..380bb19 --- /dev/null +++ b/Localization/Content/en-US/Items.json @@ -0,0 +1,7178 @@ +{ + "CommonItemTooltip": { + "UsesLife": "Uses {0} life", + "UsesMana": "Uses {0} mana", + "RestoresLife": "Restores {0} life", + "RestoresMana": "Restores {0} mana", + "MinuteDuration": "{0} minute duration", + "SecondDuration": "{0} second duration", + "PlaceableOnXmasTree": "Placeable on a christmas tree", + "String": "Increases yoyo range", + "Counterweight": "Throws a counterweight after hitting an enemy with a yoyo", + "BannerBonus": "Nearby players get a bonus against: ", + "SpecialCrafting": "Used for special crafting", + "DevItem": "'Great for impersonating devs!'", + "FlightAndSlowfall": "Allows flight and slow fall", + "PressDownToHover": "Press DOWN to toggle hover\nPress UP to deactivate hover", + "PressUpToBooster": "Hold UP to boost faster!", + "RightClickToOpen": " to open", + "MinorStats": "Minor improvements to all stats", + "MediumStats": "Medium improvements to all stats", + "MajorStats": "Major improvements to all stats", + "TipsyStats": "Minor improvements to melee stats & lowered defense", + "EtherianManaCost10": "Costs 10 Etherian Mana per use while defending an Eternia Crystal", + "GolfBall": "Can be hit with a golf club", + "Sentry": "Summons a sentry", + "GolfIron": "A well-rounded club best for mid-range distances\nGolf balls will carry a good distance with decent vertical loft", + "GolfPutter": "A specialized club for finishing holes\nGolf balls will stay close to the ground over short distances for precision shots", + "GolfWedge": "A specialized club for sand pits or tall obstacles\nGolf balls will gain tons of vertical loft but will not carry very far", + "GolfDriver": "A powerful club for long distances\nGolf balls will carry very far, with little vertical loft", + "Kite": "Kites can be flown on windy days\nReel it in with ", + "LavaFishing": "Allows fishing in lava", + "CreativeSacrificeNeeded": "Research {0} more to unlock duplication", + "CreativeSacrificeComplete": "Duplication unlocked", + "TeleportationPylon": "Teleport to another pylon when 2 villagers are nearby\nYou can only place one per type and in the matching biome", + "Whips": "Your summons will focus struck enemies" + }, + "PaintingArtist": { + "Crowno": "'V. Costa Moura'", + "Garner": "'W. Garner'", + "Moosdijk": "'R. Moosdijk'", + "Lazure": "'J. Hayes'", + "Myhre": "'J. T. Myhre'", + "Burczyk": "'C. Burczyk'", + "Craig": "'A. Craig'", + "Kolf": "'A. G. Kolf'", + "Wright": "'K. Wright'", + "Phelps": "'D. Phelps'", + "Duncan": "'M. J. Duncan'", + "Ness": "'C. J. Ness'", + "Leinfors": "'J. Parker III'", + "Aurora": "'J. Witzig'", + "Criddle": "'C. Rohde'", + "Darthkitten": "'C. Schneider'", + "darthmorf": "'S. Poirier'", + "Khaios": "'J. Sterling'", + "UnitOne": "'U. One'", + "Xman101": "'X. Calder'", + "Zoomo": "'A. Dale'" + + }, + "BuffDescription": { + "WellFed_Expert": "Minor improvements to all stats and increased life regeneration", + "WellFed2_Expert": "Medium improvements to all stats and increased life regeneration", + "WellFed3_Expert": "Major improvements to all stats and increased life regeneration" + }, + "Prefix": { + "Dull": "Dull", + "Unhappy": "Unhappy", + "Bulky": "Bulky", + "Shameful": "Shameful", + "Heavy": "Heavy", + "Light": "Light", + "Sighted": "Sighted", + "Rapid": "Rapid", + "Hasty": "Hasty", + "Intimidating": "Intimidating", + "Large": "Large", + "Deadly": "Deadly", + "Staunch": "Staunch", + "Awful": "Awful", + "Lethargic": "Lethargic", + "Awkward": "Awkward", + "Powerful": "Powerful", + "Mystic": "Mystic", + "Adept": "Adept", + "Masterful": "Masterful", + "Inept": "Inept", + "Massive": "Massive", + "Ignorant": "Ignorant", + "Deranged": "Deranged", + "Intense": "Intense", + "Taboo": "Taboo", + "Celestial": "Celestial", + "Furious": "Furious", + "Keen": "Keen", + "Superior": "Superior", + "Forceful": "Forceful", + "Broken": "Broken", + "Dangerous": "Dangerous", + "Damaged": "Damaged", + "Shoddy": "Shoddy", + "Quick": "Quick", + "Deadly2": "Deadly", + "Agile": "Agile", + "Nimble": "Nimble", + "Murderous": "Murderous", + "Slow": "Slow", + "Sluggish": "Sluggish", + "Lazy": "Lazy", + "Savage": "Savage", + "Annoying": "Annoying", + "Nasty": "Nasty", + "Manic": "Manic", + "Hurtful": "Hurtful", + "Strong": "Strong", + "Unpleasant": "Unpleasant", + "Weak": "Weak", + "Ruthless": "Ruthless", + "Frenzying": "Frenzying", + "Godly": "Godly", + "Sharp": "Sharp", + "Demonic": "Demonic", + "Zealous": "Zealous", + "Hard": "Hard", + "Guarding": "Guarding", + "Armored": "Armored", + "Warding": "Warding", + "Arcane": "Arcane", + "Precise": "Precise", + "Lucky": "Lucky", + "Jagged": "Jagged", + "Pointy": "Pointy", + "Spiked": "Spiked", + "Angry": "Angry", + "Menacing": "Menacing", + "Brisk": "Brisk", + "Fleeting": "Fleeting", + "Hasty2": "Hasty", + "Quick2": "Quick", + "Wild": "Wild", + "Rash": "Rash", + "Intrepid": "Intrepid", + "Tiny": "Tiny", + "Violent": "Violent", + "Legendary": "Legendary", + "Legendary2": "Legendary", + "Unreal": "Unreal", + "Mythical": "Mythical", + "Terrible": "Terrible", + "Small": "Small" + }, + "ItemName": { + "BloodMoonMonolith": "Blood Moon Monolith", + "CrimstoneBrick": "Crimstone Brick", + "CrimstoneBrickWall": "Crimstone Brick Wall", + "SmoothSandstone": "Smooth Sandstone", + "SmoothSandstoneWall": "Smooth Sandstone Wall", + "IronPickaxe": "Iron Pickaxe", + "IronAxe": "Iron Axe", + "ShadowGreaves": "Shadow Greaves", + "ConfettiGun": "Confetti Gun", + "ChlorophyteMask": "Chlorophyte Mask", + "ChlorophyteHelmet": "Chlorophyte Helmet", + "ChlorophyteHeadgear": "Chlorophyte Headgear", + "ChlorophytePlateMail": "Chlorophyte Plate Mail", + "ChlorophyteGreaves": "Chlorophyte Greaves", + "ChlorophyteBar": "Chlorophyte Bar", + "RedDye": "Red Dye", + "OrangeDye": "Orange Dye", + "YellowDye": "Yellow Dye", + "ShadowScalemail": "Shadow Scalemail", + "LimeDye": "Lime Dye", + "GreenDye": "Green Dye", + "TealDye": "Teal Dye", + "CyanDye": "Cyan Dye", + "SkyBlueDye": "Sky Blue Dye", + "BlueDye": "Blue Dye", + "PurpleDye": "Purple Dye", + "VioletDye": "Violet Dye", + "PinkDye": "Pink Dye", + "RedandBlackDye": "Red and Black Dye", + "ShadowHelmet": "Shadow Helmet", + "OrangeandBlackDye": "Orange and Black Dye", + "YellowandBlackDye": "Yellow and Black Dye", + "LimeandBlackDye": "Lime and Black Dye", + "GreenandBlackDye": "Green and Black Dye", + "TealandBlackDye": "Teal and Black Dye", + "CyanandBlackDye": "Cyan and Black Dye", + "SkyBlueandBlackDye": "Sky Blue and Black Dye", + "BlueandBlackDye": "Blue and Black Dye", + "PurpleandBlackDye": "Purple and Black Dye", + "VioletandBlackDye": "Violet and Black Dye", + "NightmarePickaxe": "Nightmare Pickaxe", + "PinkandBlackDye": "Pink and Black Dye", + "FlameDye": "Flame Dye", + "FlameAndBlackDye": "Flame and Black Dye", + "GreenFlameDye": "Green Flame Dye", + "GreenFlameAndBlackDye": "Green Flame and Black Dye", + "BlueFlameDye": "Blue Flame Dye", + "BlueFlameAndBlackDye": "Blue Flame and Black Dye", + "SilverDye": "Silver Dye", + "BrightRedDye": "Bright Red Dye", + "BrightOrangeDye": "Bright Orange Dye", + "TheBreaker": "The Breaker", + "BrightYellowDye": "Bright Yellow Dye", + "BrightLimeDye": "Bright Lime Dye", + "BrightGreenDye": "Bright Green Dye", + "BrightTealDye": "Bright Teal Dye", + "BrightCyanDye": "Bright Cyan Dye", + "BrightSkyBlueDye": "Bright Sky Blue Dye", + "BrightBlueDye": "Bright Blue Dye", + "BrightPurpleDye": "Bright Purple Dye", + "BrightVioletDye": "Bright Violet Dye", + "BrightPinkDye": "Bright Pink Dye", + "Candle": "Candle", + "BlackDye": "Black Dye", + "RedandSilverDye": "Red and Silver Dye", + "OrangeandSilverDye": "Orange and Silver Dye", + "YellowandSilverDye": "Yellow and Silver Dye", + "LimeandSilverDye": "Lime and Silver Dye", + "GreenandSilverDye": "Green and Silver Dye", + "TealandSilverDye": "Teal and Silver Dye", + "CyanandSilverDye": "Cyan and Silver Dye", + "SkyBlueandSilverDye": "Sky Blue and Silver Dye", + "BlueandSilverDye": "Blue and Silver Dye", + "CopperChandelier": "Copper Chandelier", + "PurpleandSilverDye": "Purple and Silver Dye", + "VioletandSilverDye": "Violet and Silver Dye", + "PinkandSilverDye": "Pink and Silver Dye", + "IntenseFlameDye": "Intense Flame Dye", + "IntenseGreenFlameDye": "Intense Green Flame Dye", + "IntenseBlueFlameDye": "Intense Blue Flame Dye", + "RainbowDye": "Rainbow Dye", + "IntenseRainbowDye": "Intense Rainbow Dye", + "YellowGradientDye": "Yellow Gradient Dye", + "CyanGradientDye": "Cyan Gradient Dye", + "SilverChandelier": "Silver Chandelier", + "VioletGradientDye": "Violet Gradient Dye", + "Paintbrush": "Paintbrush", + "PaintRoller": "Paint Roller", + "RedPaint": "Red Paint", + "OrangePaint": "Orange Paint", + "YellowPaint": "Yellow Paint", + "LimePaint": "Lime Paint", + "GreenPaint": "Green Paint", + "TealPaint": "Teal Paint", + "CyanPaint": "Cyan Paint", + "GoldChandelier": "Gold Chandelier", + "SkyBluePaint": "Sky Blue Paint", + "BluePaint": "Blue Paint", + "PurplePaint": "Purple Paint", + "VioletPaint": "Violet Paint", + "PinkPaint": "Pink Paint", + "DeepRedPaint": "Deep Red Paint", + "DeepOrangePaint": "Deep Orange Paint", + "DeepYellowPaint": "Deep Yellow Paint", + "DeepLimePaint": "Deep Lime Paint", + "DeepGreenPaint": "Deep Green Paint", + "ManaCrystal": "Mana Crystal", + "DeepTealPaint": "Deep Teal Paint", + "DeepCyanPaint": "Deep Cyan Paint", + "DeepSkyBluePaint": "Deep Sky Blue Paint", + "DeepBluePaint": "Deep Blue Paint", + "DeepPurplePaint": "Deep Purple Paint", + "DeepVioletPaint": "Deep Violet Paint", + "DeepPinkPaint": "Deep Pink Paint", + "BlackPaint": "Black Paint", + "WhitePaint": "White Paint", + "GrayPaint": "Gray Paint", + "IronOre": "Iron Ore", + "LesserManaPotion": "Lesser Mana Potion", + "PaintScraper": "Paint Scraper", + "LihzahrdBrick": "Lihzahrd Brick", + "LihzahrdBrickWall": "Lihzahrd Brick Wall", + "SlushBlock": "Slush Block", + "PalladiumOre": "Palladium Ore", + "OrichalcumOre": "Orichalcum Ore", + "TitaniumOre": "Titanium Ore", + "TealMushroom": "Teal Mushroom", + "GreenMushroom": "Green Mushroom", + "SkyBlueFlower": "Sky Blue Flower", + "BandofStarpower": "Band of Starpower", + "YellowMarigold": "Yellow Marigold", + "BlueBerries": "Blue Berries", + "LimeKelp": "Lime Kelp", + "PinkPricklyPear": "Pink Prickly Pear", + "OrangeBloodroot": "Orange Bloodroot", + "RedHusk": "Red Husk", + "CyanHusk": "Cyan Husk", + "VioletHusk": "Violet Husk", + "PurpleMucos": "Purple Mucus", + "BlackInk": "Black Ink", + "FlowerofFire": "Flower of Fire", + "DyeVat": "Dye Vat", + "BeeGun": "Bee Gun", + "PossessedHatchet": "Possessed Hatchet", + "BeeKeeper": "Bee Keeper", + "Hive": "Hive", + "HoneyBlock": "Honey Block", + "HiveWall": "Hive Wall", + "CrispyHoneyBlock": "Crispy Honey Block", + "HoneyBucket": "Honey Bucket", + "HiveWand": "Hive Wand", + "MagicMissile": "Magic Missile", + "Beenade": "Beenade", + "GravityGlobe": "Gravity Globe", + "HoneyComb": "Honey Comb", + "Abeemination": "Abeemination", + "BottledHoney": "Bottled Honey", + "RainHat": "Rain Hat", + "RainCoat": "Rain Coat", + "LihzahrdDoor": "Lihzahrd Door", + "DungeonDoor": "Dungeon Door", + "LeadDoor": "Lead Door", + "DirtRod": "Dirt Rod", + "IronDoor": "Iron Door", + "TempleKey": "Temple Key", + "LihzahrdChest": "Lihzahrd Chest", + "LihzahrdChair": "Lihzahrd Chair", + "LihzahrdTable": "Lihzahrd Table", + "LihzahrdWorkBench": "Lihzahrd Work Bench", + "SuperDartTrap": "Super Dart Trap", + "FlameTrap": "Flame Trap", + "SpikyBallTrap": "Spiky Ball Trap", + "SpearTrap": "Spear Trap", + "ShadowOrb": "Shadow Orb", + "WoodenSpike": "Wooden Spike", + "LihzahrdPressurePlate": "Lihzahrd Pressure Plate", + "LihzahrdStatue": "Lihzahrd Statue", + "LihzahrdWatcherStatue": "Lihzahrd Watcher Statue", + "LihzahrdGuardianStatue": "Lihzahrd Guardian Statue", + "WaspGun": "Wasp Gun", + "PiranhaGun": "Piranha Gun", + "PygmyStaff": "Pygmy Staff", + "PygmyNecklace": "Pygmy Necklace", + "TikiMask": "Tiki Mask", + "Meteorite": "Meteorite", + "TikiShirt": "Tiki Shirt", + "TikiPants": "Tiki Pants", + "LeafWings": "Leaf Wings", + "BlizzardinaBalloon": "Blizzard in a Balloon", + "BundleofBalloons": "Bundle of Balloons", + "BatWings": "Bat Wings", + "BoneSword": "Bone Sword", + "HerculesBeetle": "Hercules Beetle", + "SmokeBomb": "Smoke Bomb", + "BoneKey": "Bone Key", + "MeteoriteBar": "Meteorite Bar", + "Nectar": "Nectar", + "TikiTotem": "Tiki Totem", + "LizardEgg": "Lizard Egg", + "GraveMarker": "Grave Marker", + "CrossGraveMarker": "Cross Grave Marker", + "Headstone": "Headstone", + "Gravestone": "Gravestone", + "Obelisk": "Obelisk", + "LeafBlower": "Leaf Blower", + "ChlorophyteBullet": "Chlorophyte Bullet", + "Hook": "Hook", + "ParrotCracker": "Parrot Cracker", + "StrangeGlowingMushroom": "Strange Glowing Mushroom", + "Seedling": "Seedling", + "WispinaBottle": "Wisp in a Bottle", + "PalladiumBar": "Palladium Bar", + "PalladiumSword": "Palladium Sword", + "PalladiumPike": "Palladium Pike", + "PalladiumRepeater": "Palladium Repeater", + "PalladiumPickaxe": "Palladium Pickaxe", + "PalladiumDrill": "Palladium Drill", + "Flamarang": "Flamarang", + "PalladiumChainsaw": "Palladium Chainsaw", + "OrichalcumBar": "Orichalcum Bar", + "OrichalcumSword": "Orichalcum Sword", + "OrichalcumHalberd": "Orichalcum Halberd", + "OrichalcumRepeater": "Orichalcum Repeater", + "OrichalcumPickaxe": "Orichalcum Pickaxe", + "OrichalcumDrill": "Orichalcum Drill", + "OrichalcumChainsaw": "Orichalcum Chainsaw", + "TitaniumBar": "Titanium Bar", + "TitaniumSword": "Titanium Sword", + "CopperOre": "Copper Ore", + "MoltenFury": "Molten Fury", + "TitaniumTrident": "Titanium Trident", + "TitaniumRepeater": "Titanium Repeater", + "TitaniumPickaxe": "Titanium Pickaxe", + "TitaniumDrill": "Titanium Drill", + "TitaniumChainsaw": "Titanium Chainsaw", + "PalladiumMask": "Palladium Mask", + "PalladiumHelmet": "Palladium Helmet", + "PalladiumHeadgear": "Palladium Headgear", + "PalladiumBreastplate": "Palladium Breastplate", + "PalladiumLeggings": "Palladium Leggings", + "FieryGreatsword": "Fiery Greatsword", + "OrichalcumMask": "Orichalcum Mask", + "OrichalcumHelmet": "Orichalcum Helmet", + "OrichalcumHeadgear": "Orichalcum Headgear", + "OrichalcumBreastplate": "Orichalcum Breastplate", + "OrichalcumLeggings": "Orichalcum Leggings", + "TitaniumMask": "Titanium Mask", + "TitaniumHelmet": "Titanium Helmet", + "TitaniumHeadgear": "Titanium Headgear", + "TitaniumBreastplate": "Titanium Breastplate", + "TitaniumLeggings": "Titanium Leggings", + "MoltenPickaxe": "Molten Pickaxe", + "OrichalcumAnvil": "Orichalcum Anvil", + "TitaniumForge": "Titanium Forge", + "PalladiumWaraxe": "Palladium Waraxe", + "OrichalcumWaraxe": "Orichalcum Waraxe", + "TitaniumWaraxe": "Titanium Waraxe", + "HallowedBar": "Hallowed Bar", + "ChlorophyteClaymore": "Chlorophyte Claymore", + "ChlorophyteSaber": "Chlorophyte Saber", + "ChlorophytePartisan": "Chlorophyte Partisan", + "ChlorophyteShotbow": "Chlorophyte Shotbow", + "MeteorHelmet": "Meteor Helmet", + "ChlorophytePickaxe": "Chlorophyte Pickaxe", + "ChlorophyteDrill": "Chlorophyte Drill", + "ChlorophyteChainsaw": "Chlorophyte Chainsaw", + "ChlorophyteGreataxe": "Chlorophyte Greataxe", + "ChlorophyteWarhammer": "Chlorophyte Warhammer", + "ChlorophyteArrow": "Chlorophyte Arrow", + "AmethystHook": "Amethyst Hook", + "TopazHook": "Topaz Hook", + "SapphireHook": "Sapphire Hook", + "EmeraldHook": "Emerald Hook", + "MeteorSuit": "Meteor Suit", + "RubyHook": "Ruby Hook", + "DiamondHook": "Diamond Hook", + "AmberMosquito": "Amber Mosquito", + "UmbrellaHat": "Umbrella Hat", + "NimbusRod": "Nimbus Rod", + "OrangeTorch": "Orange Torch", + "CrimsandBlock": "Crimsand Block", + "BeeCloak": "Bee Cloak", + "EyeoftheGolem": "Eye of the Golem", + "HoneyBalloon": "Honey Balloon", + "MeteorLeggings": "Meteor Leggings", + "BlueHorseshoeBalloon": "Blue Horseshoe Balloon", + "WhiteHorseshoeBalloon": "White Horseshoe Balloon", + "YellowHorseshoeBalloon": "Yellow Horseshoe Balloon", + "FrozenTurtleShell": "Frozen Turtle Shell", + "SniperRifle": "Sniper Rifle", + "VenusMagnum": "Venus Magnum", + "CrimsonRod": "Crimson Rod", + "CrimtaneBar": "Crimtane Bar", + "Stynger": "Stynger", + "FlowerPow": "Flower Pow", + "BottledWater": "Bottled Water", + "RainbowGun": "Rainbow Gun", + "StyngerBolt": "Stynger Bolt", + "ChlorophyteJackhammer": "Chlorophyte Jackhammer", + "Teleporter": "Teleporter", + "FlowerofFrost": "Flower of Frost", + "Uzi": "Uzi", + "MagnetSphere": "Magnet Sphere", + "PurpleStainedGlass": "Purple Stained Glass", + "YellowStainedGlass": "Yellow Stained Glass", + "BlueStainedGlass": "Blue Stained Glass", + "SpaceGun": "Space Gun", + "GreenStainedGlass": "Green Stained Glass", + "RedStainedGlass": "Red Stained Glass", + "MulticoloredStainedGlass": "Multicolored Stained Glass", + "SkeletronHand": "Skeletron Hand", + "Skull": "Skull", + "BallaHat": "Balla Hat", + "GangstaHat": "Gangsta Hat", + "SailorHat": "Sailor Hat", + "EyePatch": "Eye Patch", + "SailorShirt": "Sailor Shirt", + "RocketBoots": "Rocket Boots", + "SailorPants": "Sailor Pants", + "SkeletronMask": "Skeletron Mask", + "AmethystRobe": "Amethyst Robe", + "TopazRobe": "Topaz Robe", + "SapphireRobe": "Sapphire Robe", + "EmeraldRobe": "Emerald Robe", + "RubyRobe": "Ruby Robe", + "DiamondRobe": "Diamond Robe", + "WhiteTuxedoShirt": "White Tuxedo Shirt", + "WhiteTuxedoPants": "White Tuxedo Pants", + "GrayBrick": "Gray Brick", + "PanicNecklace": "Panic Necklace", + "LifeFruit": "Life Fruit", + "LihzahrdAltar": "Lihzahrd Altar", + "LihzahrdPowerCell": "Lihzahrd Power Cell", + "Picksaw": "Picksaw", + "HeatRay": "Heat Ray", + "StaffofEarth": "Staff of Earth", + "GolemFist": "Golem Fist", + "WaterChest": "Water Chest", + "Binoculars": "Binoculars", + "GoldOre": "Gold Ore", + "GrayBrickWall": "Gray Brick Wall", + "RifleScope": "Rifle Scope", + "DestroyerEmblem": "Destroyer Emblem", + "HighVelocityBullet": "High Velocity Bullet", + "JellyfishNecklace": "Jellyfish Necklace", + "ZombieArm": "Zombie Arm", + "TheAxe": "The Axe", + "IceSickle": "Ice Sickle", + "ClothierVoodooDoll": "Clothier Voodoo Doll", + "PoisonStaff": "Poison Staff", + "SlimeStaff": "Slime Staff", + "RedBrick": "Red Brick", + "PoisonDart": "Poison Dart", + "EyeSpring": "Eye Spring", + "ToySled": "Toy Sled", + "BookofSkulls": "Book of Skulls", + "KOCannon": "KO Cannon", + "PirateMap": "Pirate Map", + "TurtleHelmet": "Turtle Helmet", + "TurtleScaleMail": "Turtle Scale Mail", + "TurtleLeggings": "Turtle Leggings", + "SnowballCannon": "Snowball Cannon", + "RedBrickWall": "Red Brick Wall", + "BonePickaxe": "Bone Pickaxe", + "MagicQuiver": "Magic Quiver", + "MagmaStone": "Magma Stone", + "ObsidianRose": "Obsidian Rose", + "Bananarang": "Bananarang", + "ChainKnife": "Chain Knife", + "RodofDiscord": "Rod of Discord", + "DeathSickle": "Death Sickle", + "TurtleShell": "Turtle Shell", + "TissueSample": "Tissue Sample", + "ClayBlock": "Clay Block", + "Vertebrae": "Vertebra", + "BloodySpine": "Bloody Spine", + "Ichor": "Ichor", + "IchorTorch": "Ichor Torch", + "IchorArrow": "Ichor Arrow", + "IchorBullet": "Ichor Bullet", + "GoldenShower": "Golden Shower", + "BunnyCannon": "Bunny Cannon", + "ExplosiveBunny": "Explosive Bunny", + "VialofVenom": "Vial of Venom", + "BlueBrick": "Blue Brick", + "FlaskofVenom": "Flask of Venom", + "VenomArrow": "Venom Arrow", + "VenomBullet": "Venom Bullet", + "FireGauntlet": "Fire Gauntlet", + "Cog": "Cog", + "Confetti": "Confetti", + "Nanites": "Nanites", + "ExplosivePowder": "Explosive Powder", + "GoldDust": "Gold Dust", + "PartyBullet": "Party Bullet", + "BlueBrickWall": "Blue Brick Wall", + "NanoBullet": "Nano Bullet", + "ExplodingBullet": "Exploding Bullet", + "GoldenBullet": "Golden Bullet", + "FlaskofCursedFlames": "Flask of Cursed Flames", + "FlaskofFire": "Flask of Fire", + "FlaskofGold": "Flask of Gold", + "FlaskofIchor": "Flask of Ichor", + "FlaskofNanites": "Flask of Nanites", + "FlaskofParty": "Flask of Party", + "FlaskofPoison": "Flask of Poison", + "ChainLantern": "Chain Lantern", + "EyeofCthulhuTrophy": "Eye of Cthulhu Trophy", + "EaterofWorldsTrophy": "Eater of Worlds Trophy", + "BrainofCthulhuTrophy": "Brain of Cthulhu Trophy", + "SkeletronTrophy": "Skeletron Trophy", + "QueenBeeTrophy": "Queen Bee Trophy", + "WallofFleshTrophy": "Wall of Flesh Trophy", + "DestroyerTrophy": "Destroyer Trophy", + "SkeletronPrimeTrophy": "Skeletron Prime Trophy", + "RetinazerTrophy": "Retinazer Trophy", + "SpazmatismTrophy": "Spazmatism Trophy", + "GreenBrick": "Green Brick", + "PlanteraTrophy": "Plantera Trophy", + "GolemTrophy": "Golem Trophy", + "BloodMoonRising": "Blood Moon Rising", + "TheHangedMan": "The Hanged Man", + "GloryoftheFire": "Glory of the Fire", + "BoneWarp": "Bone Warp", + "WallSkeleton": "Wall Skeleton", + "HangingSkeleton": "Hanging Skeleton", + "BlueSlabWall": "Blue Slab Wall", + "BlueTiledWall": "Blue Tiled Wall", + "GreenBrickWall": "Green Brick Wall", + "PinkSlabWall": "Pink Slab Wall", + "PinkTiledWall": "Pink Tiled Wall", + "GreenSlabWall": "Green Slab Wall", + "GreenTiledWall": "Green Tiled Wall", + "BlueBrickPlatform": "Blue Brick Platform", + "PinkBrickPlatform": "Pink Brick Platform", + "GreenBrickPlatform": "Green Brick Platform", + "MetalShelf": "Metal Shelf", + "BrassShelf": "Brass Shelf", + "WoodShelf": "Wood Shelf", + "PinkBrick": "Pink Brick", + "BrassLantern": "Brass Lantern", + "CagedLantern": "Caged Lantern", + "CarriageLantern": "Carriage Lantern", + "AlchemyLantern": "Alchemy Lantern", + "DiablostLamp": "Diabolist Lamp", + "OilRagSconse": "Oil Rag Sconce", + "BlueDungeonChair": "Blue Dungeon Chair", + "BlueDungeonTable": "Blue Dungeon Table", + "BlueDungeonWorkBench": "Blue Dungeon Work Bench", + "GreenDungeonChair": "Green Dungeon Chair", + "SilverOre": "Silver Ore", + "PinkBrickWall": "Pink Brick Wall", + "GreenDungeonTable": "Green Dungeon Table", + "GreenDungeonWorkBench": "Green Dungeon Work Bench", + "PinkDungeonChair": "Pink Dungeon Chair", + "PinkDungeonTable": "Pink Dungeon Table", + "PinkDungeonWorkBench": "Pink Dungeon Work Bench", + "BlueDungeonCandle": "Blue Dungeon Candle", + "GreenDungeonCandle": "Green Dungeon Candle", + "PinkDungeonCandle": "Pink Dungeon Candle", + "BlueDungeonVase": "Blue Dungeon Vase", + "GreenDungeonVase": "Green Dungeon Vase", + "GoldBrick": "Gold Brick", + "PinkDungeonVase": "Pink Dungeon Vase", + "BlueDungeonDoor": "Blue Dungeon Door", + "GreenDungeonDoor": "Green Dungeon Door", + "PinkDungeonDoor": "Pink Dungeon Door", + "BlueDungeonBookcase": "Blue Dungeon Bookcase", + "GreenDungeonBookcase": "Green Dungeon Bookcase", + "PinkDungeonBookcase": "Pink Dungeon Bookcase", + "Catacomb": "Catacomb", + "DungeonShelf": "Dungeon Shelf", + "SkellingtonJSkellingsworth": "Skellington J Skellingsworth", + "GoldBrickWall": "Gold Brick Wall", + "TheCursedMan": "The Cursed Man", + "TheEyeSeestheEnd": "The Eye Sees the End", + "SomethingEvilisWatchingYou": "Something Evil is Watching You", + "TheTwinsHaveAwoken": "The Twins Have Awoken", + "TheScreamer": "The Screamer", + "GoblinsPlayingPoker": "Goblins Playing Poker", + "Dryadisque": "Dryadisque", + "Sunflowers": "Sunflowers", + "TerrarianGothic": "Terrarian Gothic", + "Beanie": "Beanie", + "SilverBrick": "Silver Brick", + "ImbuingStation": "Imbuing Station", + "StarinaBottle": "Star in a Bottle", + "EmptyBullet": "Empty Bullet", + "Impact": "Impact", + "PoweredbyBirds": "Powered by Birds", + "TheDestroyer": "The Destroyer", + "ThePersistencyofEyes": "The Persistency of Eyes", + "UnicornCrossingtheHallows": "Unicorn Crossing the Hallows", + "GreatWave": "Great Wave", + "StarryNight": "Starry Night", + "SilverBrickWall": "Silver Brick Wall", + "GuidePicasso": "Guide Picasso", + "TheGuardiansGaze": "The Guardian's Gaze", + "FatherofSomeone": "Father of Someone", + "NurseLisa": "Nurse Lisa", + "ShadowbeamStaff": "Shadowbeam Staff", + "InfernoFork": "Inferno Fork", + "SpectreStaff": "Spectre Staff", + "WoodenFence": "Wooden Fence", + "LeadFence": "Lead Fence", + "BubbleMachine": "Bubble Machine", + "CopperBrick": "Copper Brick", + "BubbleWand": "Bubble Wand", + "MarchingBonesBanner": "Marching Bones Banner", + "NecromanticSign": "Necromantic Sign", + "RustedCompanyStandard": "Rusted Company Standard", + "RaggedBrotherhoodSigil": "Ragged Brotherhood Sigil", + "MoltenLegionFlag": "Molten Legion Flag", + "DiabolicSigil": "Diabolic Sigil", + "ObsidianPlatform": "Obsidian Platform", + "ObsidianDoor": "Obsidian Door", + "ObsidianChair": "Obsidian Chair", + "CopperBrickWall": "Copper Brick Wall", + "ObsidianTable": "Obsidian Table", + "ObsidianWorkBench": "Obsidian Work Bench", + "ObsidianVase": "Obsidian Vase", + "ObsidianBookcase": "Obsidian Bookcase", + "HellboundBanner": "Hellbound Banner", + "HellHammerBanner": "Hell Hammer Banner", + "HelltowerBanner": "Helltower Banner", + "LostHopesofManBanner": "Lost Hopes of Man Banner", + "ObsidianWatcherBanner": "Obsidian Watcher Banner", + "LavaEruptsBanner": "Lava Erupts Banner", + "Spike": "Spike", + "BlueDungeonBed": "Blue Dungeon Bed", + "GreenDungeonBed": "Green Dungeon Bed", + "PinkDungeonBed": "Pink Dungeon Bed", + "ObsidianBed": "Obsidian Bed", + "Waldo": "Waldo", + "Darkness": "Darkness", + "DarkSoulReaper": "Dark Soul Reaper", + "Land": "Land", + "TrappedGhost": "Trapped Ghost", + "DemonsEye": "Demon's Eye", + "WaterCandle": "Water Candle", + "FindingGold": "Finding Gold", + "FirstEncounter": "First Encounter", + "GoodMorning": "Good Morning", + "UndergroundReward": "Underground Reward", + "ThroughtheWindow": "Through the Window", + "PlaceAbovetheClouds": "Place Above the Clouds", + "DoNotStepontheGrass": "Do Not Step on the Grass", + "ColdWatersintheWhiteLand": "Cold Waters in the White Land", + "LightlessChasms": "Lightless Chasms", + "TheLandofDeceivingLooks": "The Land of Deceiving Looks", + "Book": "Book", + "Daylight": "Daylight", + "SecretoftheSands": "Secret of the Sands", + "DeadlandComesAlive": "Deadland Comes Alive", + "EvilPresence": "Evil Presence", + "SkyGuardian": "Sky Guardian", + "AmericanExplosive": "American Explosive", + "Discover": "Discover", + "HandEarth": "Hand Earth", + "OldMiner": "Old Miner", + "Skelehead": "Skelehead", + "CopperWatch": "Copper Watch", + "Cobweb": "Cobweb", + "FacingtheCerebralMastermind": "Facing the Cerebral Mastermind", + "LakeofFire": "Lake of Fire", + "TrioSuperHeroes": "Trio Super Heroes", + "SpectreHood": "Spectre Hood", + "SpectreRobe": "Spectre Robe", + "SpectrePants": "Spectre Pants", + "SpectrePickaxe": "Spectre Pickaxe", + "SpectreHamaxe": "Spectre Hamaxe", + "Ectoplasm": "Ectoplasm", + "GothicChair": "Gothic Chair", + "NecroHelmet": "Necro Helmet", + "GothicTable": "Gothic Table", + "GothicWorkBench": "Gothic Work Bench", + "GothicBookcase": "Gothic Bookcase", + "PaladinsHammer": "Paladin's Hammer", + "SWATHelmet": "SWAT Helmet", + "BeeWings": "Bee Wings", + "GiantHarpyFeather": "Giant Harpy Feather", + "BoneFeather": "Bone Feather", + "FireFeather": "Fire Feather", + "IceFeather": "Ice Feather", + "NecroBreastplate": "Necro Breastplate", + "BrokenBatWing": "Broken Bat Wing", + "TatteredBeeWing": "Tattered Bee Wing", + "LargeAmethyst": "Large Amethyst", + "LargeTopaz": "Large Topaz", + "LargeSapphire": "Large Sapphire", + "LargeEmerald": "Large Emerald", + "LargeRuby": "Large Ruby", + "LargeDiamond": "Large Diamond", + "JungleChest": "Jungle Chest", + "CorruptionChest": "Corruption Chest", + "NecroGreaves": "Necro Greaves", + "CrimsonChest": "Crimson Chest", + "HallowedChest": "Hallowed Chest", + "FrozenChest": "Ice Chest", + "JungleKey": "Jungle Key", + "CorruptionKey": "Corruption Key", + "CrimsonKey": "Crimson Key", + "HallowedKey": "Hallowed Key", + "FrozenKey": "Frozen Key", + "ImpFace": "Imp Face", + "OminousPresence": "Ominous Presence", + "Bone": "Bone", + "ShiningMoon": "Shining Moon", + "LivingGore": "Living Gore", + "FlowingMagma": "Flowing Magma", + "SpectrePaintbrush": "Spectre Paintbrush", + "SpectrePaintRoller": "Spectre Paint Roller", + "SpectrePaintScraper": "Spectre Paint Scraper", + "ShroomiteHeadgear": "Shroomite Headgear", + "ShroomiteMask": "Shroomite Mask", + "ShroomiteHelmet": "Shroomite Helmet", + "ShroomiteBreastplate": "Shroomite Breastplate", + "Muramasa": "Muramasa", + "ShroomiteLeggings": "Shroomite Leggings", + "Autohammer": "Autohammer", + "ShroomiteBar": "Shroomite Bar", + "SDMG": "S.D.M.G.", + "CenxsTiara": "Cenx's Tiara", + "CenxsBreastplate": "Cenx's Breastplate", + "CenxsLeggings": "Cenx's Leggings", + "CrownosMask": "Crowno's Mask", + "CrownosBreastplate": "Crowno's Breastplate", + "CrownosLeggings": "Crowno's Leggings", + "CobaltShield": "Cobalt Shield", + "WillsHelmet": "Will's Helmet", + "WillsBreastplate": "Will's Breastplate", + "WillsLeggings": "Will's Leggings", + "JimsHelmet": "Jim's Helmet", + "JimsBreastplate": "Jim's Breastplate", + "JimsLeggings": "Jim's Leggings", + "AaronsHelmet": "Aaron's Helmet", + "AaronsBreastplate": "Aaron's Breastplate", + "AaronsLeggings": "Aaron's Leggings", + "VampireKnives": "Vampire Knives", + "AquaScepter": "Aqua Scepter", + "BrokenHeroSword": "Broken Hero Sword", + "ScourgeoftheCorruptor": "Scourge of the Corruptor", + "StaffoftheFrostHydra": "Staff of the Frost Hydra", + "TheCreationoftheGuide": "The Creation of the Guide", + "TheMerchant": "The Merchant", + "CrownoDevoursHisLunch": "Crowno Devours His Lunch", + "RareEnchantment": "Rare Enchantment", + "GloriousNight": "Glorious Night", + "SweetheartNecklace": "Sweetheart Necklace", + "FlurryBoots": "Flurry Boots", + "LuckyHorseshoe": "Lucky Horseshoe", + "DTownsHelmet": "D-Town's Helmet", + "DTownsBreastplate": "D-Town's Breastplate", + "DTownsLeggings": "D-Town's Leggings", + "DTownsWings": "D-Town's Wings", + "WillsWings": "Will's Wings", + "CrownosWings": "Crowno's Wings", + "CenxsWings": "Cenx's Wings", + "CenxsDress": "Cenx's Dress", + "CenxsDressPants": "Cenx's Dress Pants", + "PalladiumColumn": "Palladium Column", + "ShinyRedBalloon": "Shiny Red Balloon", + "PalladiumColumnWall": "Palladium Column Wall", + "BubblegumBlock": "Bubblegum Block", + "BubblegumBlockWall": "Bubblegum Block Wall", + "TitanstoneBlock": "Titanstone Block", + "TitanstoneBlockWall": "Titanstone Block Wall", + "MagicCuffs": "Magic Cuffs", + "MusicBoxSnow": "Music Box (Snow)", + "MusicBoxSpace": "Music Box (Space Night)", + "MusicBoxCrimson": "Music Box (Crimson)", + "MusicBoxBoss4": "Music Box (Boss 4)", + "SilverWatch": "Silver Watch", + "Harpoon": "Harpoon", + "MusicBoxAltOverworldDay": "Music Box (Alt Overworld Day)", + "MusicBoxRain": "Music Box (Rain)", + "MusicBoxIce": "Music Box (Ice)", + "MusicBoxDesert": "Music Box (Desert)", + "MusicBoxOcean": "Music Box (Ocean Day)", + "MusicBoxDungeon": "Music Box (Dungeon)", + "MusicBoxPlantera": "Music Box (Plantera)", + "MusicBoxBoss5": "Music Box (Boss 5)", + "MusicBoxTemple": "Music Box (Temple)", + "MusicBoxEclipse": "Music Box (Eclipse)", + "SpikyBall": "Spiky Ball", + "MusicBoxMushrooms": "Music Box (Mushrooms)", + "ButterflyDust": "Butterfly Dust", + "AnkhCharm": "Ankh Charm", + "AnkhShield": "Ankh Shield", + "BlueFlare": "Blue Flare", + "AnglerFishBanner": "Angler Fish Banner", + "AngryNimbusBanner": "Angry Nimbus Banner", + "AnomuraFungusBanner": "Anomura Fungus Banner", + "AntlionBanner": "Antlion Banner", + "ArapaimaBanner": "Arapaima Banner", + "BallOHurt": "Ball O' Hurt", + "ArmoredSkeletonBanner": "Armored Skeleton Banner", + "BatBanner": "Cave Bat Banner", + "BirdBanner": "Bird Banner", + "BlackRecluseBanner": "Black Recluse Banner", + "BloodFeederBanner": "Blood Feeder Banner", + "BloodJellyBanner": "Blood Jelly Banner", + "BloodCrawlerBanner": "Blood Crawler Banner", + "BoneSerpentBanner": "Bone Serpent Banner", + "BunnyBanner": "Bunny Banner", + "ChaosElementalBanner": "Chaos Elemental Banner", + "BlueMoon": "Blue Moon", + "MimicBanner": "Mimic Banner", + "ClownBanner": "Clown Banner", + "CorruptBunnyBanner": "Corrupt Bunny Banner", + "CorruptGoldfishBanner": "Corrupt Goldfish Banner", + "CrabBanner": "Crab Banner", + "CrimeraBanner": "Crimera Banner", + "CrimsonAxeBanner": "Crimson Axe Banner", + "CursedHammerBanner": "Cursed Hammer Banner", + "DemonBanner": "Demon Banner", + "DemonEyeBanner": "Demon Eye Banner", + "Handgun": "Handgun", + "DerplingBanner": "Derpling Banner", + "EaterofSoulsBanner": "Eater of Souls Banner", + "EnchantedSwordBanner": "Enchanted Sword Banner", + "ZombieEskimoBanner": "Frozen Zombie Banner", + "FaceMonsterBanner": "Face Monster Banner", + "FloatyGrossBanner": "Floaty Gross Banner", + "FlyingFishBanner": "Flying Fish Banner", + "FlyingSnakeBanner": "Flying Snake Banner", + "FrankensteinBanner": "Frankenstein Banner", + "FungiBulbBanner": "Fungi Bulb Banner", + "WaterBolt": "Water Bolt", + "FungoFishBanner": "Fungo Fish Banner", + "GastropodBanner": "Gastropod Banner", + "GoblinThiefBanner": "Goblin Thief Banner", + "GoblinSorcererBanner": "Goblin Sorcerer Banner", + "GoblinPeonBanner": "Goblin Peon Banner", + "GoblinScoutBanner": "Goblin Scout Banner", + "GoblinWarriorBanner": "Goblin Warrior Banner", + "GoldfishBanner": "Goldfish Banner", + "HarpyBanner": "Harpy Banner", + "HellbatBanner": "Hellbat Banner", + "Bomb": "Bomb", + "HerplingBanner": "Herpling Banner", + "HornetBanner": "Hornet Banner", + "IceElementalBanner": "Ice Elemental Banner", + "IcyMermanBanner": "Icy Merman Banner", + "FireImpBanner": "Fire Imp Banner", + "JellyfishBanner": "Blue Jellyfish Banner", + "JungleCreeperBanner": "Jungle Creeper Banner", + "LihzahrdBanner": "Lihzahrd Banner", + "ManEaterBanner": "Man Eater Banner", + "MeteorHeadBanner": "Meteor Head Banner", + "Dynamite": "Dynamite", + "MothBanner": "Moth Banner", + "MummyBanner": "Mummy Banner", + "MushiLadybugBanner": "Mushi Ladybug Banner", + "ParrotBanner": "Parrot Banner", + "PigronBanner": "Pigron Banner", + "PiranhaBanner": "Piranha Banner", + "PirateBanner": "Pirate Deckhand Banner", + "PixieBanner": "Pixie Banner", + "RaincoatZombieBanner": "Raincoat Zombie Banner", + "ReaperBanner": "Reaper Banner", + "Grenade": "Grenade", + "SharkBanner": "Shark Banner", + "SkeletonBanner": "Skeleton Banner", + "SkeletonMageBanner": "Dark Caster Banner", + "SlimeBanner": "Blue Slime Banner", + "SnowFlinxBanner": "Snow Flinx Banner", + "SpiderBanner": "Wall Creeper Banner", + "SporeZombieBanner": "Spore Zombie Banner", + "SwampThingBanner": "Swamp Thing Banner", + "TortoiseBanner": "Giant Tortoise Banner", + "ToxicSludgeBanner": "Toxic Sludge Banner", + "SandBlock": "Sand Block", + "UmbrellaSlimeBanner": "Umbrella Slime Banner", + "UnicornBanner": "Unicorn Banner", + "VampireBanner": "Vampire Banner", + "VultureBanner": "Vulture Banner", + "NypmhBanner": "Nymph Banner", + "WerewolfBanner": "Werewolf Banner", + "WolfBanner": "Wolf Banner", + "WorldFeederBanner": "World Feeder Banner", + "WormBanner": "Worm Banner", + "WraithBanner": "Wraith Banner", + "GoldWatch": "Gold Watch", + "Glass": "Glass", + "WyvernBanner": "Wyvern Banner", + "ZombieBanner": "Zombie Banner", + "GlassPlatform": "Glass Platform", + "GlassChair": "Glass Chair", + "GoldenChair": "Golden Chair", + "GoldenToilet": "Golden Toilet", + "BarStool": "Bar Stool", + "HoneyChair": "Honey Chair", + "SteampunkChair": "Steampunk Chair", + "GlassDoor": "Glass Door", + "Sign": "Sign", + "GoldenDoor": "Golden Door", + "HoneyDoor": "Honey Door", + "SteampunkDoor": "Steampunk Door", + "GlassTable": "Glass Table", + "BanquetTable": "Banquet Table", + "Bar": "Bar", + "GoldenTable": "Golden Table", + "HoneyTable": "Honey Table", + "SteampunkTable": "Steampunk Table", + "GlassBed": "Glass Bed", + "AshBlock": "Ash Block", + "GoldenBed": "Golden Bed", + "HoneyBed": "Honey Bed", + "SteampunkBed": "Steampunk Bed", + "LivingWoodWall": "Living Wood Wall", + "FartinaJar": "Fart in a Jar", + "Pumpkin": "Pumpkin", + "PumpkinWall": "Pumpkin Wall", + "Hay": "Hay", + "HayWall": "Hay Wall", + "SpookyWood": "Spooky Wood", + "Obsidian": "Obsidian", + "SpookyWoodWall": "Spooky Wood Wall", + "PumpkinHelmet": "Pumpkin Helmet", + "PumpkinBreastplate": "Pumpkin Breastplate", + "PumpkinLeggings": "Pumpkin Leggings", + "CandyApple": "Candy Apple", + "SoulCake": "Soul Cake", + "NurseHat": "Nurse Hat", + "NurseShirt": "Nurse Shirt", + "NursePants": "Nurse Pants", + "WizardsHat": "Wizard's Hat", + "Hellstone": "Hellstone", + "GuyFawkesMask": "Guy Fawkes Mask", + "DyeTraderRobe": "Dye Trader Robe", + "SteampunkGoggles": "Steampunk Goggles", + "CyborgHelmet": "Cyborg Helmet", + "CyborgShirt": "Cyborg Shirt", + "CyborgPants": "Cyborg Pants", + "CreeperMask": "Creeper Mask", + "CreeperShirt": "Creeper Shirt", + "CreeperPants": "Creeper Pants", + "CatMask": "Cat Mask", + "HellstoneBar": "Hellstone Bar", + "CatShirt": "Cat Shirt", + "CatPants": "Cat Pants", + "GhostMask": "Ghost Mask", + "GhostShirt": "Ghost Shirt", + "PumpkinMask": "Pumpkin Mask", + "PumpkinShirt": "Pumpkin Shirt", + "PumpkinPants": "Pumpkin Pants", + "RobotMask": "Robot Mask", + "RobotShirt": "Robot Shirt", + "RobotPants": "Robot Pants", + "MudBlock": "Mud Block", + "UnicornMask": "Unicorn Mask", + "UnicornShirt": "Unicorn Shirt", + "UnicornPants": "Unicorn Pants", + "VampireMask": "Vampire Mask", + "VampireShirt": "Vampire Shirt", + "VampirePants": "Vampire Pants", + "WitchHat": "Witch Hat", + "LeprechaunHat": "Leprechaun Hat", + "LeprechaunShirt": "Leprechaun Shirt", + "LeprechaunPants": "Leprechaun Pants", + "Sapphire": "Sapphire", + "PixieShirt": "Pixie Shirt", + "PixiePants": "Pixie Pants", + "PrincessHat": "Princess Hat", + "PrincessDressNew": "Princess Dress", + "GoodieBag": "Goodie Bag", + "WitchDress": "Witch Dress", + "WitchBoots": "Witch Boots", + "BrideofFrankensteinMask": "Bride of Frankenstein Mask", + "BrideofFrankensteinDress": "Bride of Frankenstein Dress", + "KarateTortoiseMask": "Karate Tortoise Mask", + "Ruby": "Ruby", + "KarateTortoiseShirt": "Karate Tortoise Shirt", + "KarateTortoisePants": "Karate Tortoise Pants", + "CandyCornRifle": "Candy Corn Rifle", + "CandyCorn": "Candy Corn", + "JackOLanternLauncher": "Jack 'O Lantern Launcher", + "ExplosiveJackOLantern": "Explosive Jack 'O Lantern", + "Sickle": "Sickle", + "PumpkinPie": "Pumpkin Pie", + "ScarecrowHat": "Scarecrow Hat", + "ScarecrowShirt": "Scarecrow Shirt", + "Emerald": "Emerald", + "ScarecrowPants": "Scarecrow Pants", + "Cauldron": "Cauldron", + "PumpkinChair": "Pumpkin Chair", + "PumpkinDoor": "Pumpkin Door", + "PumpkinTable": "Pumpkin Table", + "PumpkinWorkBench": "Pumpkin Work Bench", + "PumpkinPlatform": "Pumpkin Platform", + "TatteredFairyWings": "Tattered Fairy Wings", + "SpiderEgg": "Spider Egg", + "MagicalPumpkinSeed": "Magical Pumpkin Seed", + "DepthMeter": "Depth Meter", + "Topaz": "Topaz", + "BatHook": "Bat Hook", + "BatScepter": "Bat Scepter", + "RavenStaff": "Raven Staff", + "JungleKeyMold": "Jungle Key Mold", + "CorruptionKeyMold": "Corruption Key Mold", + "CrimsonKeyMold": "Crimson Key Mold", + "HallowedKeyMold": "Hallowed Key Mold", + "FrozenKeyMold": "Frozen Key Mold", + "HangingJackOLantern": "Hanging Jack 'O Lantern", + "RottenEgg": "Rotten Egg", + "Amethyst": "Amethyst", + "UnluckyYarn": "Unlucky Yarn", + "BlackFairyDust": "Black Fairy Dust", + "Jackelier": "Jackelier", + "JackOLantern": "Jack 'O Lantern", + "SpookyChair": "Spooky Chair", + "SpookyDoor": "Spooky Door", + "SpookyTable": "Spooky Table", + "SpookyWorkBench": "Spooky Work Bench", + "SpookyPlatform": "Spooky Wood Platform", + "ReaperHood": "Reaper Hood", + "Diamond": "Diamond", + "ReaperRobe": "Reaper Robe", + "FoxMask": "Fox Mask", + "FoxShirt": "Fox Shirt", + "FoxPants": "Fox Pants", + "CatEars": "Cat Ears", + "BloodyMachete": "Bloody Machete", + "TheHorsemansBlade": "The Horseman's Blade", + "BladedGlove": "Bladed Glove", + "PumpkinSeed": "Pumpkin Seed", + "SpookyHook": "Spooky Hook", + "GlowingMushroom": "Glowing Mushroom", + "SpookyWings": "Spooky Wings", + "SpookyTwig": "Spooky Twig", + "SpookyHelmet": "Spooky Helmet", + "SpookyBreastplate": "Spooky Breastplate", + "SpookyLeggings": "Spooky Leggings", + "StakeLauncher": "Stake Launcher", + "Stake": "Stake", + "CursedSapling": "Cursed Sapling", + "SpaceCreatureMask": "Space Creature Mask", + "SpaceCreatureShirt": "Space Creature Shirt", + "Star": "Star", + "SpaceCreaturePants": "Space Creature Pants", + "WolfMask": "Wolf Mask", + "WolfShirt": "Wolf Shirt", + "WolfPants": "Wolf Pants", + "PumpkinMoonMedallion": "Pumpkin Moon Medallion", + "NecromanticScroll": "Necromantic Scroll", + "JackingSkeletron": "Jacking Skeletron", + "BitterHarvest": "Bitter Harvest", + "BloodMoonCountess": "Blood Moon Countess", + "HallowsEve": "Hallow's Eve", + "IvyWhip": "Ivy Whip", + "MorbidCuriosity": "Morbid Curiosity", + "TreasureHunterShirt": "Treasure Hunter Shirt", + "TreasureHunterPants": "Treasure Hunter Pants", + "DryadCoverings": "Dryad Coverings", + "DryadLoincloth": "Dryad Loincloth", + "MourningWoodTrophy": "Mourning Wood Trophy", + "PumpkingTrophy": "Pumpking Trophy", + "JackOLanternMask": "Jack 'O Lantern Mask", + "SniperScope": "Sniper Scope", + "HeartLantern": "Heart Lantern", + "BreathingReed": "Breathing Reed", + "JellyfishDivingGear": "Jellyfish Diving Gear", + "ArcticDivingGear": "Arctic Diving Gear", + "FrostsparkBoots": "Frostspark Boots", + "FartInABalloon": "Fart in a Balloon", + "PapyrusScarab": "Papyrus Scarab", + "CelestialStone": "Celestial Stone", + "Hoverboard": "Hoverboard", + "CandyCane": "Candy Cane", + "SugarPlum": "Sugar Plum", + "Present": "Present", + "Flipper": "Flipper", + "RedRyder": "Red Ryder", + "FestiveWings": "Festive Wings", + "PineTreeBlock": "Pine Tree Block", + "ChristmasTree": "Christmas Tree", + "StarTopper1": "Star Topper 1", + "StarTopper2": "Star Topper 2", + "StarTopper3": "Star Topper 3", + "BowTopper": "Bow Topper", + "WhiteGarland": "White Garland", + "WhiteAndRedGarland": "White and Red Garland", + "HealingPotion": "Healing Potion", + "RedGardland": "Red Garland", + "RedAndGreenGardland": "Red and Green Garland", + "GreenGardland": "Green Garland", + "GreenAndWhiteGarland": "Green and White Garland", + "MulticoloredBulb": "Multicolored Bulb", + "RedBulb": "Red Bulb", + "YellowBulb": "Yellow Bulb", + "GreenBulb": "Green Bulb", + "RedAndGreenBulb": "Red and Green Bulb", + "YellowAndGreenBulb": "Yellow and Green Bulb", + "ManaPotion": "Mana Potion", + "RedAndYellowBulb": "Red and Yellow Bulb", + "WhiteBulb": "White Bulb", + "WhiteAndRedBulb": "White and Red Bulb", + "WhiteAndYellowBulb": "White and Yellow Bulb", + "WhiteAndGreenBulb": "White and Green Bulb", + "MulticoloredLights": "Multicolored Lights", + "RedLights": "Red Lights", + "GreenLights": "Green Lights", + "BlueLights": "Blue Lights", + "YellowLights": "Yellow Lights", + "GoldBar": "Gold Bar", + "BladeofGrass": "Blade of Grass", + "RedAndYellowLights": "Red and Yellow Lights", + "RedAndGreenLights": "Red and Green Lights", + "YellowAndGreenLights": "Yellow and Green Lights", + "BlueAndGreenLights": "Blue and Green Lights", + "RedAndBlueLights": "Red and Blue Lights", + "BlueAndYellowLights": "Blue and Yellow Lights", + "GiantBow": "Giant Bow", + "ReindeerAntlers": "Reindeer Antlers", + "Holly": "Holly", + "CandyCaneSword": "Candy Cane Sword", + "ThornChakram": "Thorn Chakram", + "EldMelter": "Elf Melter", + "ChristmasPudding": "Christmas Pudding", + "Eggnog": "Eggnog", + "StarAnise": "Star Anise", + "ReindeerBells": "Reindeer Bells", + "CandyCaneHook": "Candy Cane Hook", + "ChristmasHook": "Christmas Hook", + "CnadyCanePickaxe": "Candy Cane Pickaxe", + "FruitcakeChakram": "Fruitcake Chakram", + "SugarCookie": "Sugar Cookie", + "ObsidianBrick": "Obsidian Brick", + "GingerbreadCookie": "Gingerbread Cookie", + "HandWarmer": "Hand Warmer", + "Coal": "Coal", + "Toolbox": "Toolbox", + "PineDoor": "Pine Door", + "PineChair": "Pine Chair", + "PineTable": "Pine Table", + "DogWhistle": "Dog Whistle", + "ChristmasTreeSword": "Christmas Tree Sword", + "ChainGun": "Chain Gun", + "ObsidianSkull": "Obsidian Skull", + "Razorpine": "Razorpine", + "BlizzardStaff": "Blizzard Staff", + "MrsClauseHat": "Mrs. Claus Hat", + "MrsClauseShirt": "Mrs. Claus Shirt", + "MrsClauseHeels": "Mrs. Claus Heels", + "ParkaHood": "Parka Hood", + "ParkaCoat": "Parka Coat", + "ParkaPants": "Parka Pants", + "SnowHat": "Snow Hat", + "UglySweater": "Ugly Sweater", + "MushroomGrassSeeds": "Mushroom Grass Seeds", + "TreeMask": "Tree Mask", + "TreeShirt": "Tree Shirt", + "TreeTrunks": "Tree Trunks", + "ElfHat": "Elf Hat", + "ElfShirt": "Elf Shirt", + "ElfPants": "Elf Pants", + "SnowmanCannon": "Snowman Cannon", + "NorthPole": "North Pole", + "ChristmasTreeWallpaper": "Christmas Tree Wallpaper", + "OrnamentWallpaper": "Ornament Wallpaper", + "JungleGrassSeeds": "Jungle Grass Seeds", + "CandyCaneWallpaper": "Candy Cane Wallpaper", + "FestiveWallpaper": "Festive Wallpaper", + "StarsWallpaper": "Stars Wallpaper", + "SquigglesWallpaper": "Squiggles Wallpaper", + "SnowflakeWallpaper": "Snowflake Wallpaper", + "KrampusHornWallpaper": "Krampus Horn Wallpaper", + "BluegreenWallpaper": "Bluegreen Wallpaper", + "GrinchFingerWallpaper": "Grinch Finger Wallpaper", + "NaughtyPresent": "Naughty Present", + "BabyGrinchMischiefWhistle": "Baby Grinch's Mischief Whistle", + "WoodenHammer": "Wooden Hammer", + "IceQueenTrophy": "Ice Queen Trophy", + "SantaNK1Trophy": "Santa-NK1 Trophy", + "EverscreamTrophy": "Everscream Trophy", + "MusicBoxPumpkinMoon": "Music Box (Pumpkin Moon)", + "MusicBoxAltUnderground": "Music Box (Alt Underground)", + "MusicBoxFrostMoon": "Music Box (Frost Moon)", + "BrownPaint": "Brown Paint", + "ShadowPaint": "Shadow Paint", + "NegativePaint": "Negative Paint", + "TeamDye": "Team Dye", + "StarCannon": "Star Cannon", + "AmethystGemsparkBlock": "Amethyst Gemspark Block", + "TopazGemsparkBlock": "Topaz Gemspark Block", + "SapphireGemsparkBlock": "Sapphire Gemspark Block", + "EmeraldGemsparkBlock": "Emerald Gemspark Block", + "RubyGemsparkBlock": "Ruby Gemspark Block", + "DiamondGemsparkBlock": "Diamond Gemspark Block", + "AmberGemsparkBlock": "Amber Gemspark Block", + "LifeHairDye": "Life Hair Dye", + "ManaHairDye": "Mana Hair Dye", + "DepthHairDye": "Depth Hair Dye", + "BluePhaseblade": "Blue Phaseblade", + "MoneyHairDye": "Money Hair Dye", + "TimeHairDye": "Time Hair Dye", + "TeamHairDye": "Team Hair Dye", + "BiomeHairDye": "Biome Hair Dye", + "PartyHairDye": "Party Hair Dye", + "RainbowHairDye": "Rainbow Hair Dye", + "SpeedHairDye": "Speed Hair Dye", + "AngelHalo": "Angel Halo", + "Fez": "Fez", + "Womannquin": "Womannequin", + "RedPhaseblade": "Red Phaseblade", + "HairDyeRemover": "Hair Dye Remover", + "BugNet": "Bug Net", + "Firefly": "Firefly", + "FireflyinaBottle": "Firefly in a Bottle", + "MonarchButterfly": "Monarch Butterfly", + "PurpleEmperorButterfly": "Purple Emperor Butterfly", + "RedAdmiralButterfly": "Red Admiral Butterfly", + "UlyssesButterfly": "Ulysses Butterfly", + "SulphurButterfly": "Sulphur Butterfly", + "TreeNymphButterfly": "Tree Nymph Butterfly", + "DirtBlock": "Dirt Block", + "CopperBar": "Copper Bar", + "GreenPhaseblade": "Green Phaseblade", + "ZebraSwallowtailButterfly": "Zebra Swallowtail Butterfly", + "JuliaButterfly": "Julia Butterfly", + "Worm": "Worm", + "Mouse": "Mouse", + "LightningBug": "Lightning Bug", + "LightningBuginaBottle": "Lightning Bug in a Bottle", + "Snail": "Snail", + "GlowingSnail": "Glowing Snail", + "FancyGreyWallpaper": "Fancy Gray Wallpaper", + "IceFloeWallpaper": "Ice Floe Wallpaper", + "PurplePhaseblade": "Purple Phaseblade", + "MusicWallpaper": "Music Wallpaper", + "PurpleRainWallpaper": "Purple Rain Wallpaper", + "RainbowWallpaper": "Rainbow Wallpaper", + "SparkleStoneWallpaper": "Sparkle Stone Wallpaper", + "StarlitHeavenWallpaper": "Starlit Heaven Wallpaper", + "Bird": "Bird", + "BlueJay": "Blue Jay", + "Cardinal": "Cardinal", + "Squirrel": "Squirrel", + "Bunny": "Bunny", + "WhitePhaseblade": "White Phaseblade", + "YellowPhaseblade": "Yellow Phaseblade", + "MeteorHamaxe": "Meteor Hamaxe", + "EmptyBucket": "Empty Bucket", + "WaterBucket": "Water Bucket", + "LavaBucket": "Lava Bucket", + "JungleRose": "Jungle Rose", + "Stinger": "Stinger", + "SilverBar": "Silver Bar", + "Vine": "Vine", + "FeralClaws": "Feral Claws", + "BlacksmithRack": "Blacksmith Rack", + "CarpentryRack": "Carpentry Rack", + "HelmetRack": "Helmet Rack", + "SpearRack": "Spear Rack", + "SwordRack": "Sword Rack", + "StoneSlab": "Stone Slab", + "AnkletoftheWind": "Anklet of the Wind", + "SandstoneSlab": "Sandstone Slab", + "Frog": "Frog", + "MallardDuck": "Mallard Duck", + "Duck": "Duck", + "StaffofRegrowth": "Staff of Regrowth", + "HellstoneBrick": "Hellstone Brick", + "WhoopieCushion": "Whoopie Cushion", + "BlackScorpion": "Black Scorpion", + "Scorpion": "Scorpion", + "BubbleWallpaper": "Bubble Wallpaper", + "CopperPipeWallpaper": "Copper Pipe Wallpaper", + "Shackle": "Shackle", + "DuckyWallpaper": "Ducky Wallpaper", + "FrostCore": "Frost Core", + "BunnyCage": "Bunny Cage", + "SquirrelCage": "Squirrel Cage", + "MallardDuckCage": "Mallard Duck Cage", + "DuckCage": "Duck Cage", + "BirdCage": "Bird Cage", + "BlueJayCage": "Blue Jay Cage", + "CardinalCage": "Cardinal Cage", + "WaterfallWall": "Waterfall Wall", + "MoltenHamaxe": "Molten Hamaxe", + "LavafallWall": "Lavafall Wall", + "CrimsonSeeds": "Crimson Seeds", + "HeavyWorkBench": "Heavy Work Bench", + "CopperPlating": "Copper Plating", + "SnailCage": "Snail Cage", + "GlowingSnailCage": "Glowing Snail Cage", + "ShroomiteDiggingClaw": "Shroomite Digging Claw", + "AmmoBox": "Ammo Box", + "MonarchButterflyJar": "Monarch Butterfly Jar", + "PurpleEmperorButterflyJar": "Purple Emperor Butterfly Jar", + "Flamelash": "Flamelash", + "RedAdmiralButterflyJar": "Red Admiral Butterfly Jar", + "UlyssesButterflyJar": "Ulysses Butterfly Jar", + "SulphurButterflyJar": "Sulphur Butterfly Jar", + "TreeNymphButterflyJar": "Tree Nymph Butterfly Jar", + "ZebraSwallowtailButterflyJar": "Zebra Swallowtail Butterfly Jar", + "JuliaButterflyJar": "Julia Butterfly Jar", + "ScorpionCage": "Scorpion Cage", + "BlackScorpionCage": "Black Scorpion Cage", + "VenomStaff": "Venom Staff", + "SpectreMask": "Spectre Mask", + "PhoenixBlaster": "Phoenix Blaster", + "FrogCage": "Frog Cage", + "MouseCage": "Mouse Cage", + "BoneWelder": "Bone Welder", + "FleshCloningVaat": "Flesh Cloning Vat", + "GlassKiln": "Glass Kiln", + "LihzahrdFurnace": "Lihzahrd Furnace", + "LivingLoom": "Living Loom", + "SkyMill": "Sky Mill", + "IceMachine": "Ice Machine", + "BeetleHelmet": "Beetle Helmet", + "IronBar": "Iron Bar", + "Sunfury": "Sunfury", + "BeetleScaleMail": "Beetle Scale Mail", + "BeetleShell": "Beetle Shell", + "BeetleLeggings": "Beetle Leggings", + "SteampunkBoiler": "Steampunk Boiler", + "HoneyDispenser": "Honey Dispenser", + "Penguin": "Penguin", + "PenguinCage": "Penguin Cage", + "WormCage": "Worm Cage", + "Terrarium": "Terrarium", + "SuperManaPotion": "Super Mana Potion", + "Hellforge": "Hellforge", + "EbonwoodFence": "Ebonwood Fence", + "RichMahoganyFence": "Rich Mahogany Fence", + "PearlwoodFence": "Pearlwood Fence", + "ShadewoodFence": "Shadewood Fence", + "BrickLayer": "Brick Layer", + "ExtendoGrip": "Extendo Grip", + "PaintSprayer": "Paint Sprayer", + "PortableCementMixer": "Portable Cement Mixer", + "BeetleHusk": "Beetle Husk", + "CelestialMagnet": "Celestial Magnet", + "ClayPot": "Clay Pot", + "CelestialEmblem": "Celestial Emblem", + "CelestialCuffs": "Celestial Cuffs", + "PeddlersHat": "Peddler's Hat", + "PulseBow": "Pulse Bow", + "NaturesGift": "Nature's Gift", + "Bed": "Bed", + "Silk": "Silk", + "DynastyTable": "Dynasty Table", + "LesserRestorationPotion": "Lesser Restoration Potion", + "DynastyWood": "Dynasty Wood", + "RedDynastyShingles": "Red Dynasty Shingles", + "BlueDynastyShingles": "Blue Dynasty Shingles", + "WhiteDynastyWall": "White Dynasty Wall", + "BlueDynastyWall": "Blue Dynasty Wall", + "DynastyDoor": "Dynasty Door", + "Sake": "Sake", + "PadThai": "Pad Thai", + "Pho": "Pho", + "Revolver": "Revolver", + "RestorationPotion": "Restoration Potion", + "Gatligator": "Gatligator", + "ArcaneRuneWall": "Arcane Rune Wall", + "WaterGun": "Water Gun", + "Katana": "Katana", + "UltrabrightTorch": "Ultrabright Torch", + "MagicHat": "Magic Hat", + "DiamondRing": "Diamond Ring", + "Gi": "Gi", + "Kimono": "Kimono", + "GypsyRobe": "Gypsy Robe", + "JungleHat": "Jungle Hat", + "BeetleWings": "Beetle Wings", + "TigerSkin": "Tiger Skin", + "LeopardSkin": "Leopard Skin", + "ZebraSkin": "Zebra Skin", + "CrimsonCloak": "Crimson Cloak", + "MysteriousCape": "Mysterious Cape", + "RedCape": "Red Cape", + "WinterCape": "Winter Cape", + "WoodFishingPole": "Wood Fishing Pole", + "JungleShirt": "Jungle Shirt", + "Bass": "Bass", + "ReinforcedFishingPole": "Reinforced Fishing Pole", + "FiberglassFishingPole": "Fiberglass Fishing Pole", + "FisherofSouls": "Fisher of Souls", + "GoldenFishingRod": "Golden Fishing Rod", + "MechanicsRod": "Mechanic's Rod", + "SittingDucksFishingRod": "Sitting Duck's Fishing Pole", + "Trout": "Trout", + "Salmon": "Salmon", + "AtlanticCod": "Atlantic Cod", + "Gel": "Gel", + "JunglePants": "Jungle Pants", + "Tuna": "Tuna", + "RedSnapper": "Red Snapper", + "NeonTetra": "Neon Tetra", + "ArmoredCavefish": "Armored Cavefish", + "Damselfish": "Damselfish", + "CrimsonTigerfish": "Crimson Tigerfish", + "FrostMinnow": "Frost Minnow", + "PrincessFish": "Princess Fish", + "GoldenCarp": "Golden Carp", + "SpecularFish": "Specular Fish", + "MoltenHelmet": "Molten Helmet", + "Prismite": "Prismite", + "VariegatedLardfish": "Variegated Lardfish", + "FlarefinKoi": "Flarefin Koi", + "DoubleCod": "Double Cod", + "Honeyfin": "Honeyfin", + "Obsidifish": "Obsidifish", + "Shrimp": "Shrimp", + "ChaosFish": "Chaos Fish", + "Ebonkoi": "Ebonkoi", + "Hemopiranha": "Hemopiranha", + "MoltenBreastplate": "Molten Breastplate", + "Rockfish": "Rockfish", + "Stinkfish": "Stinkfish", + "MiningPotion": "Mining Potion", + "HeartreachPotion": "Heartreach Potion", + "CalmingPotion": "Calming Potion", + "BuilderPotion": "Builder Potion", + "TitanPotion": "Titan Potion", + "FlipperPotion": "Flipper Potion", + "SummoningPotion": "Summoning Potion", + "TrapsightPotion": "Dangersense Potion", + "MoltenGreaves": "Molten Greaves", + "PurpleClubberfish": "Purple Clubberfish", + "ObsidianSwordfish": "Obsidian Swordfish", + "Swordfish": "Swordfish", + "IronFence": "Iron Fence", + "WoodenCrate": "Wooden Crate", + "IronCrate": "Iron Crate", + "GoldenCrate": "Golden Crate", + "OldShoe": "Old Shoe", + "FishingSeaweed": "Seaweed", + "TinCan": "Tin Can", + "MeteorShot": "Meteor Shot", + "ReaverShark": "Reaver Shark", + "SawtoothShark": "Sawtooth Shark", + "Minecart": "Minecart", + "AmmoReservationPotion": "Ammo Reservation Potion", + "LifeforcePotion": "Lifeforce Potion", + "EndurancePotion": "Endurance Potion", + "RagePotion": "Rage Potion", + "InfernoPotion": "Inferno Potion", + "WrathPotion": "Wrath Potion", + "StickyBomb": "Sticky Bomb", + "RecallPotion": "Recall Potion", + "TeleportationPotion": "Teleportation Potion", + "LovePotion": "Love Potion", + "StinkPotion": "Stink Potion", + "FishingPotion": "Fishing Potion", + "SonarPotion": "Sonar Potion", + "CratePotion": "Crate Potion", + "ShiverthornSeeds": "Shiverthorn Seeds", + "Shiverthorn": "Shiverthorn", + "WarmthPotion": "Warmth Potion", + "BlackLens": "Black Lens", + "FishHook": "Fish Hook", + "BeeHeadgear": "Bee Headgear", + "BeeBreastplate": "Bee Breastplate", + "BeeGreaves": "Bee Greaves", + "HornetStaff": "Hornet Staff", + "ImpStaff": "Imp Staff", + "QueenSpiderStaff": "Queen Spider Staff", + "AnglerHat": "Angler Hat", + "AnglerVest": "Angler Vest", + "AnglerPants": "Angler Pants", + "Sunglasses": "Sunglasses", + "SpiderMask": "Spider Mask", + "SpiderBreastplate": "Spider Breastplate", + "SpiderGreaves": "Spider Greaves", + "HighTestFishingLine": "High Test Fishing Line", + "AnglerEarring": "Angler Earring", + "TackleBox": "Tackle Box", + "BlueDungeonPiano": "Blue Dungeon Piano", + "GreenDungeonPiano": "Green Dungeon Piano", + "PinkDungeonPiano": "Pink Dungeon Piano", + "GoldenPiano": "Golden Piano", + "WizardHat": "Wizard Hat", + "ObsidianPiano": "Obsidian Piano", + "BonePiano": "Bone Piano", + "CactusPiano": "Cactus Piano", + "SpookyPiano": "Spooky Piano", + "SkywarePiano": "Skyware Piano", + "LihzahrdPiano": "Lihzahrd Piano", + "BlueDungeonDresser": "Blue Dungeon Dresser", + "GreenDungeonDresser": "Green Dungeon Dresser", + "PinkDungeonDresser": "Pink Dungeon Dresser", + "GoldenDresser": "Golden Dresser", + "TopHat": "Top Hat", + "ObsidianDresser": "Obsidian Dresser", + "BoneDresser": "Bone Dresser", + "CactusDresser": "Cactus Dresser", + "SpookyDresser": "Spooky Dresser", + "SkywareDresser": "Skyware Dresser", + "HoneyDresser": "Honey Dresser", + "LihzahrdDresser": "Lihzahrd Dresser", + "Sofa": "Sofa", + "EbonwoodSofa": "Ebonwood Sofa", + "RichMahoganySofa": "Rich Mahogany Sofa", + "WoodenSword": "Wooden Sword", + "TuxedoShirt": "Tuxedo Shirt", + "PearlwoodSofa": "Pearlwood Sofa", + "ShadewoodSofa": "Shadewood Sofa", + "BlueDungeonSofa": "Blue Dungeon Sofa", + "GreenDungeonSofa": "Green Dungeon Sofa", + "PinkDungeonSofa": "Pink Dungeon Sofa", + "GoldenSofa": "Golden Sofa", + "ObsidianSofa": "Obsidian Sofa", + "BoneSofa": "Bone Sofa", + "CactusSofa": "Cactus Sofa", + "SpookySofa": "Spooky Sofa", + "TuxedoPants": "Tuxedo Pants", + "SkywareSofa": "Skyware Sofa", + "HoneySofa": "Honey Sofa", + "SteampunkSofa": "Steampunk Sofa", + "MushroomSofa": "Mushroom Sofa", + "GlassSofa": "Glass Sofa", + "PumpkinSofa": "Pumpkin Sofa", + "LihzahrdSofa": "Lihzahrd Sofa", + "SeashellHairpin": "Seashell Hairpin", + "MermaidAdornment": "Mermaid Adornment", + "MermaidTail": "Mermaid Tail", + "SummerHat": "Summer Hat", + "ZephyrFish": "Zephyr Fish", + "Fleshcatcher": "Fleshcatcher", + "HotlineFishingHook": "Hotline Fishing Hook", + "FrogLeg": "Frog Leg", + "Anchor": "Anchor", + "CookedFish": "Cooked Fish", + "CookedShrimp": "Cooked Shrimp", + "Sashimi": "Sashimi", + "BunnyHood": "Bunny Hood", + "BeeWax": "Bee Wax", + "CopperPlatingWall": "Copper Plating Wall", + "StoneSlabWall": "Stone Slab Wall", + "Sail": "Sail", + "CoralstoneBlock": "Coralstone Block", + "BlueJellyfish": "Blue Jellyfish", + "GreenJellyfish": "Green Jellyfish", + "PinkJellyfish": "Pink Jellyfish", + "BlueJellyfishJar": "Blue Jellyfish Jar", + "PlumbersHat": "Plumber's Hat", + "GreenJellyfishJar": "Green Jellyfish Jar", + "PinkJellyfishJar": "Pink Jellyfish Jar", + "PlumbersShirt": "Plumber's Shirt", + "Batfish": "Batfish", + "BumblebeeTuna": "Bumblebee Tuna", + "Catfish": "Catfish", + "Cloudfish": "Cloudfish", + "Cursedfish": "Cursedfish", + "Dirtfish": "Dirtfish", + "DynamiteFish": "Dynamite Fish", + "EaterofPlankton": "Eater of Plankton", + "FallenStarfish": "Fallen Starfish", + "TheFishofCthulu": "The Fish of Cthulhu", + "PlumbersPants": "Plumber's Pants", + "Fishotron": "Fishotron", + "Harpyfish": "Harpyfish", + "Hungerfish": "Hungerfish", + "Ichorfish": "Ichorfish", + "Jewelfish": "Jewelfish", + "MirageFish": "Mirage Fish", + "MutantFlinxfin": "Mutant Flinxfin", + "Pengfish": "Pengfish", + "Pixiefish": "Pixiefish", + "Spiderfish": "Spiderfish", + "HerosHat": "Hero's Hat", + "TundraTrout": "Tundra Trout", + "UnicornFish": "Unicorn Fish", + "GuideVoodooFish": "Guide Voodoo Fish", + "Wyverntail": "Wyverntail", + "ZombieFish": "Zombie Fish", + "AmanitaFungifin": "Amanita Fungifin", + "Angelfish": "Angelfish", + "BloodyManowar": "Bloody Manowar", + "Bonefish": "Bonefish", + "Bunnyfish": "Bunnyfish", + "HerosShirt": "Hero's Shirt", + "CapnTunabeard": "Cap'n Tunabeard", + "Clownfish": "Clownfish", + "DemonicHellfish": "Demonic Hellfish", + "Derpfish": "Derpfish", + "Fishron": "Fishron", + "InfectedScabbardfish": "Infected Scabbardfish", + "Mudfish": "Mudfish", + "Slimefish": "Slimefish", + "TropicalBarracuda": "Tropical Barracuda", + "KingSlimeTrophy": "King Slime Trophy", + "HerosPants": "Hero's Pants", + "ShipInABottle": "Ship in a Bottle", + "KingSlimeMask": "King Slime Mask", + "FinWings": "Fin Wings", + "TreasureMap": "Treasure Map", + "SeaweedPlanter": "Seaweed Planter", + "PillaginMePixels": "Pillagin Me Pixels", + "FishCostumeMask": "Fish Costume Mask", + "FishCostumeShirt": "Fish Costume Shirt", + "WoodenDoor": "Wooden Door", + "FishBowl": "Fish Bowl", + "FishCostumeFinskirt": "Fish Costume Finskirt", + "GingerBeard": "Ginger Beard", + "ArchaeologistsHat": "Archaeologist's Hat", + "ArchaeologistsJacket": "Archaeologist's Jacket", + "ArchaeologistsPants": "Archaeologist's Pants", + "OpticStaff": "Optic Staff", + "BlackThread": "Black Thread", + "GreenThread": "Green Thread", + "NinjaHood": "Ninja Hood", + "NinjaShirt": "Ninja Shirt", + "NinjaPants": "Ninja Pants", + "Leather": "Leather", + "StoneWall": "Stone Wall", + "RedHat": "Red Hat", + "Goldfish": "Goldfish", + "Robe": "Robe", + "RobotHat": "Robot Hat", + "GoldCrown": "Gold Crown", + "HellfireArrow": "Hellfire Arrow", + "Sandgun": "Sandgun", + "GuideVoodooDoll": "Guide Voodoo Doll", + "DivingHelmet": "Diving Helmet", + "FamiliarShirt": "Familiar Shirt", + "Acorn": "Acorn", + "FamiliarPants": "Familiar Pants", + "FamiliarWig": "Familiar Wig", + "DemonScythe": "Demon Scythe", + "NightsEdge": "Night's Edge", + "DarkLance": "Dark Lance", + "Coral": "Coral", + "Cactus": "Cactus", + "Trident": "Trident", + "SilverBullet": "Silver Bullet", + "ThrowingKnife": "Throwing Knife", + "LesserHealingPotion": "Lesser Healing Potion", + "Spear": "Spear", + "Blowpipe": "Blowpipe", + "Glowstick": "Glowstick", + "Seed": "Seed", + "WoodenBoomerang": "Wooden Boomerang", + "Aglet": "Aglet", + "StickyGlowstick": "Sticky Glowstick", + "PoisonedKnife": "Poisoned Knife", + "ObsidianSkinPotion": "Obsidian Skin Potion", + "RegenerationPotion": "Regeneration Potion", + "AngryTrapperBanner": "Angry Trapper Banner", + "ArmoredVikingBanner": "Armored Viking Banner", + "BlackSlimeBanner": "Black Slime Banner", + "LifeCrystal": "Life Crystal", + "SwiftnessPotion": "Swiftness Potion", + "BlueArmoredBonesBanner": "Blue Armored Bones Banner", + "BlueCultistArcherBanner": "Blue Cultist Archer Banner", + "BlueCultistCasterBanner": "Lunatic Devotee Banner", + "BlueCultistFighterBanner": "Blue Cultist Fighter Banner", + "BoneLeeBanner": "Bone Lee Banner", + "ClingerBanner": "Clinger Banner", + "CochinealBeetleBanner": "Cochineal Beetle Banner", + "CorruptPenguinBanner": "Corrupt Penguin Banner", + "CorruptSlimeBanner": "Corrupt Slime Banner", + "CorruptorBanner": "Corruptor Banner", + "GillsPotion": "Gills Potion", + "CrimslimeBanner": "Crimslime Banner", + "CursedSkullBanner": "Cursed Skull Banner", + "CyanBeetleBanner": "Cyan Beetle Banner", + "DevourerBanner": "Devourer Banner", + "DiablolistBanner": "Diabolist Banner", + "DoctorBonesBanner": "Doctor Bones Banner", + "DungeonSlimeBanner": "Dungeon Slime Banner", + "DungeonSpiritBanner": "Dungeon Spirit Banner", + "ElfArcherBanner": "Elf Archer Banner", + "ElfCopterBanner": "Elf Copter Banner", + "IronskinPotion": "Ironskin Potion", + "EyezorBanner": "Eyezor Banner", + "FlockoBanner": "Flocko Banner", + "GhostBanner": "Ghost Banner", + "GiantBatBanner": "Giant Bat Banner", + "GiantCursedSkullBanner": "Giant Cursed Skull Banner", + "GiantFlyingFoxBanner": "Giant Flying Fox Banner", + "GingerbreadManBanner": "Gingerbread Man Banner", + "GoblinArcherBanner": "Goblin Archer Banner", + "GreenSlimeBanner": "Green Slime Banner", + "HeadlessHorsemanBanner": "Headless Horseman Banner", + "ManaRegenerationPotion": "Mana Regeneration Potion", + "HellArmoredBonesBanner": "Hell Armored Bones Banner", + "HellhoundBanner": "Hellhound Banner", + "HoppinJackBanner": "Hoppin' Jack Banner", + "IceBatBanner": "Ice Bat Banner", + "IceGolemBanner": "Ice Golem Banner", + "IceSlimeBanner": "Ice Slime Banner", + "IchorStickerBanner": "Ichor Sticker Banner", + "IlluminantBatBanner": "Illuminant Bat Banner", + "IlluminantSlimeBanner": "Illuminant Slime Banner", + "JungleBatBanner": "Jungle Bat Banner", + "MagicPowerPotion": "Magic Power Potion", + "JungleSlimeBanner": "Jungle Slime Banner", + "KrampusBanner": "Krampus Banner", + "LacBeetleBanner": "Lac Beetle Banner", + "LavaBatBanner": "Lava Bat Banner", + "LavaSlimeBanner": "Lava Slime Banner", + "MartianBrainscramblerBanner": "Martian Brainscrambler Banner", + "MartianDroneBanner": "Martian Drone Banner", + "MartianEngineerBanner": "Martian Engineer Banner", + "MartianGigazapperBanner": "Martian Gigazapper Banner", + "MartianGreyGruntBanner": "Martian Gray Grunt Banner", + "FeatherfallPotion": "Featherfall Potion", + "MartianOfficerBanner": "Martian Officer Banner", + "MartianRaygunnerBanner": "Martian Ray Gunner Banner", + "MartianScutlixGunnerBanner": "Martian Scutlix Gunner Banner", + "MartianTeslaTurretBanner": "Martian Tesla Turret Banner", + "MisterStabbyBanner": "Mister Stabby Banner", + "MotherSlimeBanner": "Mother Slime Banner", + "NecromancerBanner": "Necromancer Banner", + "NutcrackerBanner": "Nutcracker Banner", + "PaladinBanner": "Paladin Banner", + "PenguinBanner": "Penguin Banner", + "SpelunkerPotion": "Spelunker Potion", + "PinkyBanner": "Pinky Banner", + "PoltergeistBanner": "Poltergeist Banner", + "PossessedArmorBanner": "Possessed Armor Banner", + "PresentMimicBanner": "Present Mimic Banner", + "PurpleSlimeBanner": "Purple Slime Banner", + "RaggedCasterBanner": "Ragged Caster Banner", + "RainbowSlimeBanner": "Rainbow Slime Banner", + "RavenBanner": "Raven Banner", + "RedSlimeBanner": "Red Slime Banner", + "RuneWizardBanner": "Rune Wizard Banner", + "InvisibilityPotion": "Invisibility Potion", + "RustyArmoredBonesBanner": "Rusty Armored Bones Banner", + "ScarecrowBanner": "Scarecrow Banner", + "ScutlixBanner": "Scutlix Banner", + "SkeletonArcherBanner": "Skeleton Archer Banner", + "SkeletonCommandoBanner": "Skeleton Commando Banner", + "SkeletonSniperBanner": "Skeleton Sniper Banner", + "SlimerBanner": "Slimer Banner", + "SnatcherBanner": "Snatcher Banner", + "SnowBallaBanner": "Snow Balla Banner", + "SnowmanGangstaBanner": "Snowman Gangsta Banner", + "ShinePotion": "Shine Potion", + "SpikedIceSlimeBanner": "Spiked Ice Slime Banner", + "SpikedJungleSlimeBanner": "Spiked Jungle Slime Banner", + "SplinterlingBanner": "Splinterling Banner", + "SquidBanner": "Squid Banner", + "TacticalSkeletonBanner": "Tactical Skeleton Banner", + "TheGroomBanner": "The Groom Banner", + "TimBanner": "Tim Banner", + "UndeadMinerBanner": "Undead Miner Banner", + "UndeadVikingBanner": "Undead Viking Banner", + "WhiteCultistArcherBanner": "White Cultist Archer Banner", + "NightOwlPotion": "Night Owl Potion", + "WhiteCultistCasterBanner": "White Cultist Caster Banner", + "WhiteCultistFighterBanner": "White Cultist Fighter Banner", + "YellowSlimeBanner": "Yellow Slime Banner", + "YetiBanner": "Yeti Banner", + "ZombieElfBanner": "Zombie Elf Banner", + "StoneBlock": "Stone Block", + "DirtWall": "Dirt Wall", + "BattlePotion": "Battle Potion", + "ThornsPotion": "Thorns Potion", + "WaterWalkingPotion": "Water Walking Potion", + "ArcheryPotion": "Archery Potion", + "HunterPotion": "Hunter Potion", + "GravitationPotion": "Gravitation Potion", + "GoldChest": "Gold Chest", + "DaybloomSeeds": "Daybloom Seeds", + "MoonglowSeeds": "Moonglow Seeds", + "BlinkrootSeeds": "Blinkroot Seeds", + "Bottle": "Bottle", + "DeathweedSeeds": "Deathweed Seeds", + "WaterleafSeeds": "Waterleaf Seeds", + "FireblossomSeeds": "Fireblossom Seeds", + "Daybloom": "Daybloom", + "Moonglow": "Moonglow", + "Blinkroot": "Blinkroot", + "Deathweed": "Deathweed", + "Waterleaf": "Waterleaf", + "Fireblossom": "Fireblossom", + "SharkFin": "Shark Fin", + "WoodenTable": "Wooden Table", + "Feather": "Feather", + "Tombstone": "Tombstone", + "MimeMask": "Mime Mask", + "AntlionMandible": "Antlion Mandible", + "IllegalGunParts": "Illegal Gun Parts", + "TheDoctorsShirt": "The Doctor's Shirt", + "TheDoctorsPants": "The Doctor's Pants", + "GoldenKey": "Golden Key", + "ShadowChest": "Shadow Chest", + "ShadowKey": "Shadow Key", + "Furnace": "Furnace", + "ObsidianBrickWall": "Obsidian Brick Wall", + "JungleSpores": "Jungle Spores", + "Loom": "Loom", + "Piano": "Piano", + "Dresser": "Dresser", + "Bench": "Bench", + "Bathtub": "Bathtub", + "RedBanner": "Red Banner", + "GreenBanner": "Green Banner", + "BlueBanner": "Blue Banner", + "WoodenChair": "Wooden Chair", + "YellowBanner": "Yellow Banner", + "LampPost": "Lamp Post", + "TikiTorch": "Tiki Torch", + "Barrel": "Barrel", + "ChineseLantern": "Chinese Lantern", + "CookingPot": "Cooking Pot", + "Safe": "Safe", + "SkullLantern": "Skull Lantern", + "TrashCan": "Trash Can", + "PlatinumBow": "Platinum Bow", + "PlatinumHammer": "Platinum Hammer", + "PlatinumAxe": "Platinum Axe", + "PlatinumShortsword": "Platinum Shortsword", + "PlatinumBroadsword": "Platinum Broadsword", + "PlatinumPickaxe": "Platinum Pickaxe", + "TungstenBow": "Tungsten Bow", + "TungstenHammer": "Tungsten Hammer", + "TungstenAxe": "Tungsten Axe", + "TungstenShortsword": "Tungsten Shortsword", + "Candelabra": "Candelabra", + "TungstenBroadsword": "Tungsten Broadsword", + "TungstenPickaxe": "Tungsten Pickaxe", + "LeadBow": "Lead Bow", + "LeadHammer": "Lead Hammer", + "LeadAxe": "Lead Axe", + "LeadShortsword": "Lead Shortsword", + "LeadBroadsword": "Lead Broadsword", + "LeadPickaxe": "Lead Pickaxe", + "TinBow": "Tin Bow", + "TinHammer": "Tin Hammer", + "IronAnvil": "Iron Anvil", + "PinkVase": "Pink Vase", + "TinAxe": "Tin Axe", + "TinShortsword": "Tin Shortsword", + "TinBroadsword": "Tin Broadsword", + "TinPickaxe": "Tin Pickaxe", + "CopperBow": "Copper Bow", + "CopperHammer": "Copper Hammer", + "CopperAxe": "Copper Axe", + "CopperShortsword": "Copper Shortsword", + "CopperBroadsword": "Copper Broadsword", + "CopperPickaxe": "Copper Pickaxe", + "Mug": "Mug", + "SilverBow": "Silver Bow", + "SilverHammer": "Silver Hammer", + "SilverAxe": "Silver Axe", + "SilverShortsword": "Silver Shortsword", + "SilverBroadsword": "Silver Broadsword", + "SilverPickaxe": "Silver Pickaxe", + "GoldBow": "Gold Bow", + "GoldHammer": "Gold Hammer", + "GoldAxe": "Gold Axe", + "GoldShortsword": "Gold Shortsword", + "Keg": "Keg", + "GoldBroadsword": "Gold Broadsword", + "GoldPickaxe": "Gold Pickaxe", + "Ale": "Ale", + "Bookcase": "Bookcase", + "Throne": "Throne", + "Bowl": "Bowl", + "BowlofSoup": "Bowl of Soup", + "Toilet": "Toilet", + "GrandfatherClock": "Grandfather Clock", + "WorkBench": "Work Bench", + "ArmorStatue": "Armor Statue", + "GoblinBattleStandard": "Goblin Battle Standard", + "TatteredCloth": "Tattered Cloth", + "Sawmill": "Sawmill", + "CobaltOre": "Cobalt Ore", + "MythrilOre": "Mythril Ore", + "AdamantiteOre": "Adamantite Ore", + "Pwnhammer": "Pwnhammer", + "Excalibur": "Excalibur", + "HallowedSeeds": "Hallowed Seeds", + "Goggles": "Goggles", + "EbonsandBlock": "Ebonsand Block", + "CobaltHat": "Cobalt Hat", + "CobaltHelmet": "Cobalt Helmet", + "CobaltMask": "Cobalt Mask", + "CobaltBreastplate": "Cobalt Breastplate", + "CobaltLeggings": "Cobalt Leggings", + "MythrilHood": "Mythril Hood", + "MythrilHelmet": "Mythril Helmet", + "MythrilHat": "Mythril Hat", + "MythrilChainmail": "Mythril Chainmail", + "Lens": "Lens", + "MythrilGreaves": "Mythril Greaves", + "CobaltBar": "Cobalt Bar", + "MythrilBar": "Mythril Bar", + "CobaltChainsaw": "Cobalt Chainsaw", + "MythrilChainsaw": "Mythril Chainsaw", + "CobaltDrill": "Cobalt Drill", + "MythrilDrill": "Mythril Drill", + "AdamantiteChainsaw": "Adamantite Chainsaw", + "AdamantiteDrill": "Adamantite Drill", + "DaoofPow": "Dao of Pow", + "WoodenBow": "Wooden Bow", + "MythrilHalberd": "Mythril Halberd", + "AdamantiteBar": "Adamantite Bar", + "GlassWall": "Glass Wall", + "Compass": "Compass", + "DivingGear": "Diving Gear", + "GPS": "GPS", + "ObsidianHorseshoe": "Obsidian Horseshoe", + "ObsidianShield": "Obsidian Shield", + "TinkerersWorkshop": "Tinkerer's Workshop", + "CloudinaBalloon": "Cloud in a Balloon", + "IronBroadsword": "Iron Broadsword", + "WoodenArrow": "Wooden Arrow", + "AdamantiteHeadgear": "Adamantite Headgear", + "AdamantiteHelmet": "Adamantite Helmet", + "AdamantiteMask": "Adamantite Mask", + "AdamantiteBreastplate": "Adamantite Breastplate", + "AdamantiteLeggings": "Adamantite Leggings", + "SpectreBoots": "Spectre Boots", + "AdamantiteGlaive": "Adamantite Glaive", + "Toolbelt": "Toolbelt", + "PearlsandBlock": "Pearlsand Block", + "PearlstoneBlock": "Pearlstone Block", + "FlamingArrow": "Flaming Arrow", + "MiningShirt": "Mining Shirt", + "MiningPants": "Mining Pants", + "PearlstoneBrick": "Pearlstone Brick", + "IridescentBrick": "Iridescent Brick", + "MudstoneBlock": "Mudstone Brick", + "CobaltBrick": "Cobalt Brick", + "MythrilBrick": "Mythril Brick", + "PearlstoneBrickWall": "Pearlstone Brick Wall", + "IridescentBrickWall": "Iridescent Brick Wall", + "MudstoneBrickWall": "Mudstone Brick Wall", + "Shuriken": "Shuriken", + "CobaltBrickWall": "Cobalt Brick Wall", + "MythrilBrickWall": "Mythril Brick Wall", + "HolyWater": "Holy Water", + "UnholyWater": "Unholy Water", + "SiltBlock": "Silt Block", + "FairyBell": "Fairy Bell", + "BreakerBlade": "Breaker Blade", + "BlueTorch": "Blue Torch", + "RedTorch": "Red Torch", + "GreenTorch": "Green Torch", + "SuspiciousLookingEye": "Suspicious Looking Eye", + "PurpleTorch": "Purple Torch", + "WhiteTorch": "White Torch", + "YellowTorch": "Yellow Torch", + "DemonTorch": "Demon Torch", + "ClockworkAssaultRifle": "Clockwork Assault Rifle", + "CobaltRepeater": "Cobalt Repeater", + "MythrilRepeater": "Mythril Repeater", + "DualHook": "Dual Hook", + "StarStatue": "Star Statue", + "SwordStatue": "Sword Statue", + "DemonBow": "Demon Bow", + "SlimeStatue": "Slime Statue", + "GoblinStatue": "Goblin Statue", + "ShieldStatue": "Shield Statue", + "BatStatue": "Bat Statue", + "FishStatue": "Fish Statue", + "BunnyStatue": "Bunny Statue", + "SkeletonStatue": "Skeleton Statue", + "ReaperStatue": "Reaper Statue", + "WomanStatue": "Woman Statue", + "ImpStatue": "Imp Statue", + "WarAxeoftheNight": "War Axe of the Night", + "GargoyleStatue": "Gargoyle Statue", + "GloomStatue": "Gloom Statue", + "HornetStatue": "Hornet Statue", + "BombStatue": "Bomb Statue", + "CrabStatue": "Crab Statue", + "HammerStatue": "Hammer Statue", + "PotionStatue": "Potion Statue", + "SpearStatue": "Spear Statue", + "CrossStatue": "Cross Statue", + "JellyfishStatue": "Jellyfish Statue", + "LightsBane": "Light's Bane", + "BowStatue": "Bow Statue", + "BoomerangStatue": "Boomerang Statue", + "BootStatue": "Boot Statue", + "ChestStatue": "Chest Statue", + "BirdStatue": "Bird Statue", + "AxeStatue": "Axe Statue", + "CorruptStatue": "Corrupt Statue", + "TreeStatue": "Tree Statue", + "AnvilStatue": "Anvil Statue", + "PickaxeStatue": "Pickaxe Statue", + "UnholyArrow": "Unholy Arrow", + "MushroomStatue": "Mushroom Statue", + "EyeballStatue": "Eyeball Statue", + "PillarStatue": "Pillar Statue", + "HeartStatue": "Heart Statue", + "PotStatue": "Pot Statue", + "SunflowerStatue": "Sunflower Statue", + "KingStatue": "King Statue", + "QueenStatue": "Queen Statue", + "PiranhaStatue": "Piranha Statue", + "PlankedWall": "Planked Wall", + "Chest": "Chest", + "WoodenBeam": "Wooden Beam", + "AdamantiteRepeater": "Adamantite Repeater", + "AdamantiteSword": "Adamantite Sword", + "CobaltSword": "Cobalt Sword", + "MythrilSword": "Mythril Sword", + "MoonCharm": "Moon Charm", + "Ruler": "Ruler", + "CrystalBall": "Crystal Ball", + "DiscoBall": "Disco Ball", + "SorcererEmblem": "Sorcerer Emblem", + "BandofRegeneration": "Band of Regeneration", + "WarriorEmblem": "Warrior Emblem", + "RangerEmblem": "Ranger Emblem", + "DemonWings": "Demon Wings", + "AngelWings": "Angel Wings", + "MagicalHarp": "Magical Harp", + "RainbowRod": "Rainbow Rod", + "IceRod": "Ice Rod", + "NeptunesShell": "Neptune's Shell", + "Mannequin": "Mannequin", + "GreaterHealingPotion": "Greater Healing Potion", + "Mushroom": "Mushroom", + "MagicMirror": "Magic Mirror", + "GreaterManaPotion": "Greater Mana Potion", + "PixieDust": "Pixie Dust", + "CrystalShard": "Crystal Shard", + "ClownHat": "Clown Hat", + "ClownShirt": "Clown Shirt", + "ClownPants": "Clown Pants", + "Flamethrower": "Flamethrower", + "Bell": "Bell", + "Harp": "Harp", + "Wrench": "Red Wrench", + "JestersArrow": "Jester's Arrow", + "WireCutter": "Wire Cutter", + "ActiveStoneBlock": "Active Stone Block", + "InactiveStoneBlock": "Inactive Stone Block", + "Lever": "Lever", + "LaserRifle": "Laser Rifle", + "CrystalBullet": "Crystal Bullet", + "HolyArrow": "Holy Arrow", + "MagicDagger": "Magic Dagger", + "CrystalStorm": "Crystal Storm", + "CursedFlames": "Cursed Flames", + "AngelStatue": "Angel Statue", + "SoulofLight": "Soul of Light", + "SoulofNight": "Soul of Night", + "CursedFlame": "Cursed Flame", + "CursedTorch": "Cursed Torch", + "AdamantiteForge": "Adamantite Forge", + "MythrilAnvil": "Mythril Anvil", + "UnicornHorn": "Unicorn Horn", + "DarkShard": "Dark Shard", + "LightShard": "Light Shard", + "RedPressurePlate": "Red Pressure Plate", + "CloudinaBottle": "Cloud in a Bottle", + "Wire": "Wire", + "SpellTome": "Spell Tome", + "StarCloak": "Star Cloak", + "Megashark": "Megashark", + "Shotgun": "Shotgun", + "PhilosophersStone": "Philosopher's Stone", + "TitanGlove": "Titan Glove", + "CobaltNaginata": "Cobalt Naginata", + "Switch": "Switch", + "DartTrap": "Dart Trap", + "HermesBoots": "Hermes Boots", + "Boulder": "Boulder", + "GreenPressurePlate": "Green Pressure Plate", + "GrayPressurePlate": "Gray Pressure Plate", + "BrownPressurePlate": "Brown Pressure Plate", + "MechanicalEye": "Mechanical Eye", + "CursedArrow": "Cursed Arrow", + "CursedBullet": "Cursed Bullet", + "SoulofFright": "Soul of Fright", + "SoulofMight": "Soul of Might", + "SoulofSight": "Soul of Sight", + "EnchantedBoomerang": "Enchanted Boomerang", + "Gungnir": "Gungnir", + "HallowedPlateMail": "Hallowed Plate Mail", + "HallowedGreaves": "Hallowed Greaves", + "HallowedHelmet": "Hallowed Helmet", + "CrossNecklace": "Cross Necklace", + "ManaFlower": "Mana Flower", + "MechanicalWorm": "Mechanical Worm", + "MechanicalSkull": "Mechanical Skull", + "HallowedHeadgear": "Hallowed Headgear", + "HallowedMask": "Hallowed Mask", + "DemoniteOre": "Demonite Ore", + "SlimeCrown": "Slime Crown", + "LightDisc": "Light Disc", + "MusicBoxOverworldDay": "Music Box (Overworld Day)", + "MusicBoxEerie": "Music Box (Eerie)", + "MusicBoxNight": "Music Box (Night)", + "MusicBoxTitle": "Music Box (Title)", + "MusicBoxUnderground": "Music Box (Underground)", + "MusicBoxBoss1": "Music Box (Boss 1)", + "MusicBoxJungle": "Music Box (Jungle)", + "MusicBoxCorruption": "Music Box (Corruption)", + "DemoniteBar": "Demonite Bar", + "MusicBoxUndergroundCorruption": "Music Box (Underground Corruption)", + "MusicBoxTheHallow": "Music Box (The Hallow)", + "MusicBoxBoss2": "Music Box (Boss 2)", + "MusicBoxUndergroundHallow": "Music Box (Underground Hallow)", + "MusicBoxBoss3": "Music Box (Boss 3)", + "SoulofFlight": "Soul of Flight", + "MusicBox": "Music Box", + "DemoniteBrick": "Demonite Brick", + "HallowedRepeater": "Hallowed Repeater", + "Drax": "Drax", + "Heart": "Heart", + "Explosives": "Explosives", + "InletPump": "Inlet Pump", + "OutletPump": "Outlet Pump", + "Timer1Second": "1 Second Timer", + "Timer3Second": "3 Second Timer", + "Timer5Second": "5 Second Timer", + "CandyCaneBlock": "Candy Cane Block", + "CandyCaneWall": "Candy Cane Wall", + "SantaHat": "Santa Hat", + "SantaShirt": "Santa Shirt", + "CorruptSeeds": "Corrupt Seeds", + "SantaPants": "Santa Pants", + "GreenCandyCaneBlock": "Green Candy Cane Block", + "GreenCandyCaneWall": "Green Candy Cane Wall", + "SnowBlock": "Snow Block", + "SnowBrick": "Snow Brick", + "SnowBrickWall": "Snow Brick Wall", + "BlueLight": "Blue Light", + "RedLight": "Red Light", + "GreenLight": "Green Light", + "BluePresent": "Blue Present", + "IronShortsword": "Iron Shortsword", + "VileMushroom": "Vile Mushroom", + "GreenPresent": "Green Present", + "YellowPresent": "Yellow Present", + "SnowGlobe": "Snow Globe", + "Carrot": "Carrot", + "AdamantiteBeam": "Adamantite Beam", + "AdamantiteBeamWall": "Adamantite Beam Wall", + "DemoniteBrickWall": "Demonite Brick Wall", + "SandstoneBrick": "Sandstone Brick", + "SandstoneBrickWall": "Sandstone Brick Wall", + "EbonstoneBrick": "Ebonstone Brick", + "EbonstoneBlock": "Ebonstone Block", + "EbonstoneBrickWall": "Ebonstone Brick Wall", + "RedStucco": "Red Stucco", + "YellowStucco": "Yellow Stucco", + "GreenStucco": "Green Stucco", + "GrayStucco": "Gray Stucco", + "RedStuccoWall": "Red Stucco Wall", + "YellowStuccoWall": "Yellow Stucco Wall", + "GreenStuccoWall": "Green Stucco Wall", + "GrayStuccoWall": "Gray Stucco Wall", + "Ebonwood": "Ebonwood", + "GrassSeeds": "Grass Seeds", + "RichMahogany": "Rich Mahogany", + "Pearlwood": "Pearlwood", + "EbonwoodWall": "Ebonwood Wall", + "RichMahoganyWall": "Rich Mahogany Wall", + "PearlwoodWall": "Pearlwood Wall", + "EbonwoodChest": "Ebonwood Chest", + "RichMahoganyChest": "Rich Mahogany Chest", + "PearlwoodChest": "Pearlwood Chest", + "EbonwoodChair": "Ebonwood Chair", + "RichMahoganyChair": "Rich Mahogany Chair", + "Sunflower": "Sunflower", + "PearlwoodChair": "Pearlwood Chair", + "EbonwoodPlatform": "Ebonwood Platform", + "RichMahoganyPlatform": "Rich Mahogany Platform", + "PearlwoodPlatform": "Pearlwood Platform", + "BonePlatform": "Bone Platform", + "EbonwoodWorkBench": "Ebonwood Work Bench", + "RichMahoganyWorkBench": "Rich Mahogany Work Bench", + "PearlwoodWorkBench": "Pearlwood Work Bench", + "EbonwoodTable": "Ebonwood Table", + "RichMahoganyTable": "Rich Mahogany Table", + "Vilethorn": "Vilethorn", + "PearlwoodTable": "Pearlwood Table", + "EbonwoodPiano": "Ebonwood Piano", + "RichMahoganyPiano": "Rich Mahogany Piano", + "PearlwoodPiano": "Pearlwood Piano", + "EbonwoodBed": "Ebonwood Bed", + "RichMahoganyBed": "Rich Mahogany Bed", + "PearlwoodBed": "Pearlwood Bed", + "EbonwoodDresser": "Ebonwood Dresser", + "RichMahoganyDresser": "Rich Mahogany Dresser", + "PearlwoodDresser": "Pearlwood Dresser", + "Starfury": "Starfury", + "EbonwoodDoor": "Ebonwood Door", + "RichMahoganyDoor": "Rich Mahogany Door", + "PearlwoodDoor": "Pearlwood Door", + "EbonwoodSword": "Ebonwood Sword", + "EbonwoodHammer": "Ebonwood Hammer", + "EbonwoodBow": "Ebonwood Bow", + "RichMahoganySword": "Rich Mahogany Sword", + "RichMahoganyHammer": "Rich Mahogany Hammer", + "RichMahoganyBow": "Rich Mahogany Bow", + "PearlwoodSword": "Pearlwood Sword", + "PurificationPowder": "Purification Powder", + "PearlwoodHammer": "Pearlwood Hammer", + "PearlwoodBow": "Pearlwood Bow", + "RainbowBrick": "Rainbow Brick", + "RainbowBrickWall": "Rainbow Brick Wall", + "IceBlock": "Ice Block", + "RedsWings": "Red's Wings", + "RedsHelmet": "Red's Helmet", + "RedsBreastplate": "Red's Breastplate", + "RedsLeggings": "Red's Leggings", + "Fish": "Fish", + "VilePowder": "Vile Powder", + "IceBoomerang": "Ice Boomerang", + "Keybrand": "Keybrand", + "Cutlass": "Cutlass", + "TrueExcalibur": "True Excalibur", + "TrueNightsEdge": "True Night's Edge", + "Frostbrand": "Frostbrand", + "RedPotion": "Red Potion", + "TacticalShotgun": "Tactical Shotgun", + "RottenChunk": "Rotten Chunk", + "IvyChest": "Ivy Chest", + "IceChest": "Frozen Chest", + "Marrow": "Marrow", + "UnholyTrident": "Unholy Trident", + "FrostHelmet": "Frost Helmet", + "FrostBreastplate": "Frost Breastplate", + "FrostLeggings": "Frost Leggings", + "TinHelmet": "Tin Helmet", + "TinChainmail": "Tin Chainmail", + "TinGreaves": "Tin Greaves", + "WormTooth": "Worm Tooth", + "LeadHelmet": "Lead Helmet", + "LeadChainmail": "Lead Chainmail", + "LeadGreaves": "Lead Greaves", + "TungstenHelmet": "Tungsten Helmet", + "TungstenChainmail": "Tungsten Chainmail", + "TungstenGreaves": "Tungsten Greaves", + "PlatinumHelmet": "Platinum Helmet", + "PlatinumChainmail": "Platinum Chainmail", + "PlatinumGreaves": "Platinum Greaves", + "TinOre": "Tin Ore", + "IronHammer": "Iron Hammer", + "WormFood": "Worm Food", + "LeadOre": "Lead Ore", + "TungstenOre": "Tungsten Ore", + "PlatinumOre": "Platinum Ore", + "TinBar": "Tin Bar", + "LeadBar": "Lead Bar", + "TungstenBar": "Tungsten Bar", + "PlatinumBar": "Platinum Bar", + "TinWatch": "Tin Watch", + "TungstenWatch": "Tungsten Watch", + "PlatinumWatch": "Platinum Watch", + "CopperCoin": "Copper Coin", + "TinChandelier": "Tin Chandelier", + "TungstenChandelier": "Tungsten Chandelier", + "PlatinumChandelier": "Platinum Chandelier", + "PlatinumCandle": "Platinum Candle", + "PlatinumCandelabra": "Platinum Candelabra", + "PlatinumCrown": "Platinum Crown", + "LeadAnvil": "Lead Anvil", + "TinBrick": "Tin Brick", + "TungstenBrick": "Tungsten Brick", + "PlatinumBrick": "Platinum Brick", + "SilverCoin": "Silver Coin", + "TinBrickWall": "Tin Brick Wall", + "TungstenBrickWall": "Tungsten Brick Wall", + "PlatinumBrickWall": "Platinum Brick Wall", + "BeamSword": "Beam Sword", + "IceBlade": "Ice Blade", + "IceBow": "Ice Bow", + "FrostStaff": "Frost Staff", + "WoodHelmet": "Wood Helmet", + "WoodBreastplate": "Wood Breastplate", + "WoodGreaves": "Wood Greaves", + "GoldCoin": "Gold Coin", + "EbonwoodHelmet": "Ebonwood Helmet", + "EbonwoodBreastplate": "Ebonwood Breastplate", + "EbonwoodGreaves": "Ebonwood Greaves", + "RichMahoganyHelmet": "Rich Mahogany Helmet", + "RichMahoganyBreastplate": "Rich Mahogany Breastplate", + "RichMahoganyGreaves": "Rich Mahogany Greaves", + "PearlwoodHelmet": "Pearlwood Helmet", + "PearlwoodBreastplate": "Pearlwood Breastplate", + "PearlwoodGreaves": "Pearlwood Greaves", + "AmethystStaff": "Amethyst Staff", + "PlatinumCoin": "Platinum Coin", + "TopazStaff": "Topaz Staff", + "SapphireStaff": "Sapphire Staff", + "EmeraldStaff": "Emerald Staff", + "RubyStaff": "Ruby Staff", + "DiamondStaff": "Diamond Staff", + "GrassWall": "Grass Wall", + "JungleWall": "Jungle Wall", + "FlowerWall": "Flower Wall", + "Jetpack": "Jetpack", + "ButterflyWings": "Butterfly Wings", + "FallenStar": "Fallen Star", + "CactusWall": "Cactus Wall", + "Cloud": "Cloud", + "CloudWall": "Cloud Wall", + "Seaweed": "Seaweed", + "RuneHat": "Rune Hat", + "RuneRobe": "Rune Robe", + "MushroomSpear": "Mushroom Spear", + "TerraBlade": "Terra Blade", + "GrenadeLauncher": "Grenade Launcher", + "RocketLauncher": "Rocket Launcher", + "CopperGreaves": "Copper Greaves", + "ProximityMineLauncher": "Proximity Mine Launcher", + "FairyWings": "Fairy Wings", + "SlimeBlock": "Slime Block", + "FleshBlock": "Flesh Block", + "MushroomWall": "Mushroom Wall", + "RainCloud": "Rain Cloud", + "BoneBlock": "Bone Block", + "FrozenSlimeBlock": "Frozen Slime Block", + "BoneBlockWall": "Bone Block Wall", + "SlimeBlockWall": "Slime Block Wall", + "IronGreaves": "Iron Greaves", + "FleshBlockWall": "Flesh Block Wall", + "RocketI": "Rocket I", + "RocketII": "Rocket II", + "RocketIII": "Rocket III", + "RocketIV": "Rocket IV", + "AsphaltBlock": "Asphalt Block", + "CobaltPickaxe": "Cobalt Pickaxe", + "MythrilPickaxe": "Mythril Pickaxe", + "AdamantitePickaxe": "Adamantite Pickaxe", + "Clentaminator": "Clentaminator", + "SilverGreaves": "Silver Greaves", + "GreenSolution": "Green Solution", + "BlueSolution": "Blue Solution", + "PurpleSolution": "Purple Solution", + "DarkBlueSolution": "Dark Blue Solution", + "RedSolution": "Red Solution", + "HarpyWings": "Harpy Wings", + "BoneWings": "Bone Wings", + "Hammush": "Hammush", + "NettleBurst": "Nettle Burst", + "AnkhBanner": "Ankh Banner", + "GoldGreaves": "Gold Greaves", + "SnakeBanner": "Snake Banner", + "OmegaBanner": "Omega Banner", + "CrimsonHelmet": "Crimson Helmet", + "CrimsonScalemail": "Crimson Scalemail", + "CrimsonGreaves": "Crimson Greaves", + "BloodButcherer": "Blood Butcherer", + "TendonBow": "Tendon Bow", + "FleshGrinder": "Flesh Grinder", + "DeathbringerPickaxe": "Deathbringer Pickaxe", + "BloodLustCluster": "Blood Lust Cluster", + "Torch": "Torch", + "CopperChainmail": "Copper Chainmail", + "TheUndertaker": "The Undertaker", + "TheMeatball": "The Meatball", + "TheRottedFork": "The Rotted Fork", + "EskimoHood": "Snow Hood", + "EskimoCoat": "Snow Coat", + "EskimoPants": "Snow Pants", + "LivingWoodChair": "Living Wood Chair", + "CactusChair": "Cactus Chair", + "BoneChair": "Bone Chair", + "FleshChair": "Flesh Chair", + "IronChainmail": "Iron Chainmail", + "MushroomChair": "Mushroom Chair", + "BoneWorkBench": "Bone Work Bench", + "CactusWorkBench": "Cactus Work Bench", + "FleshWorkBench": "Flesh Work Bench", + "MushroomWorkBench": "Mushroom Work Bench", + "SlimeWorkBench": "Slime Work Bench", + "CactusDoor": "Cactus Door", + "FleshDoor": "Flesh Door", + "MushroomDoor": "Mushroom Door", + "LivingWoodDoor": "Living Wood Door", + "SilverChainmail": "Silver Chainmail", + "BoneDoor": "Bone Door", + "FlameWings": "Flame Wings", + "FrozenWings": "Frozen Wings", + "GhostWings": "Spectre Wings", + "SunplateBlock": "Sunplate Block", + "DiscWall": "Disc Wall", + "SkywareChair": "Skyware Chair", + "BoneTable": "Bone Table", + "FleshTable": "Flesh Table", + "LivingWoodTable": "Living Wood Table", + "GoldChainmail": "Gold Chainmail", + "SkywareTable": "Skyware Table", + "LivingWoodChest": "Living Wood Chest", + "LivingWoodWand": "Living Wood Wand", + "PurpleIceBlock": "Purple Ice Block", + "PinkIceBlock": "Pink Ice Block", + "RedIceBlock": "Red Ice Block", + "CrimstoneBlock": "Crimstone Block", + "SkywareDoor": "Skyware Door", + "SkywareChest": "Skyware Chest", + "SteampunkHat": "Steampunk Hat", + "GrapplingHook": "Grappling Hook", + "SteampunkShirt": "Steampunk Shirt", + "SteampunkPants": "Steampunk Pants", + "BeeHat": "Bee Hat", + "BeeShirt": "Bee Shirt", + "BeePants": "Bee Pants", + "WorldBanner": "World Banner", + "SunBanner": "Sun Banner", + "GravityBanner": "Gravity Banner", + "PharaohsMask": "Pharaoh's Mask", + "Actuator": "Actuator", + "Chain": "Chain", + "BlueWrench": "Blue Wrench", + "GreenWrench": "Green Wrench", + "BluePressurePlate": "Blue Pressure Plate", + "YellowPressurePlate": "Yellow Pressure Plate", + "DiscountCard": "Discount Card", + "LuckyCoin": "Lucky Coin", + "UnicornonaStick": "Unicorn on a Stick", + "SandstorminaBottle": "Sandstorm in a Bottle", + "BeachBall": "Beach Ball", + "ShadowScale": "Shadow Scale", + "CharmofMyths": "Charm of Myths", + "MoonShell": "Moon Shell", + "StarVeil": "Star Veil", + "WaterWalkingBoots": "Water Walking Boots", + "Tiara": "Tiara", + "PrincessDress": "Princess Dress", + "PharaohsRobe": "Pharaoh's Robe", + "GreenCap": "Green Cap", + "MushroomCap": "Mushroom Cap", + "TamOShanter": "Tam O' Shanter", + "PiggyBank": "Piggy Bank", + "MummyMask": "Mummy Mask", + "MummyShirt": "Mummy Shirt", + "MummyPants": "Mummy Pants", + "CowboyHat": "Cowboy Hat", + "CowboyJacket": "Cowboy Jacket", + "CowboyPants": "Cowboy Pants", + "PirateHat": "Pirate Hat", + "PirateShirt": "Pirate Shirt", + "PiratePants": "Pirate Pants", + "VikingHelmet": "Viking Helmet", + "MiningHelmet": "Mining Helmet", + "CrimtaneOre": "Crimtane Ore", + "CactusSword": "Cactus Sword", + "CactusPickaxe": "Cactus Pickaxe", + "IceBrick": "Ice Brick", + "IceBrickWall": "Ice Brick Wall", + "AdhesiveBandage": "Adhesive Bandage", + "ArmorPolish": "Armor Polish", + "Bezoar": "Bezoar", + "Blindfold": "Blindfold", + "FastClock": "Fast Clock", + "CopperHelmet": "Copper Helmet", + "Megaphone": "Megaphone", + "Nazar": "Nazar", + "Vitamins": "Vitamins", + "TrifoldMap": "Trifold Map", + "CactusHelmet": "Cactus Helmet", + "CactusBreastplate": "Cactus Breastplate", + "CactusLeggings": "Cactus Leggings", + "PowerGlove": "Power Glove", + "LightningBoots": "Lightning Boots", + "SunStone": "Sun Stone", + "Wood": "Wood", + "IronHelmet": "Iron Helmet", + "MoonStone": "Moon Stone", + "ArmorBracing": "Armor Bracing", + "MedicatedBandage": "Medicated Bandage", + "ThePlan": "The Plan", + "CountercurseMantra": "Countercurse Mantra", + "CoinGun": "Coin Gun", + "LavaCharm": "Lava Charm", + "ObsidianWaterWalkingBoots": "Obsidian Water Walking Boots", + "LavaWaders": "Lava Waders", + "PureWaterFountain": "Pure Water Fountain", + "SilverHelmet": "Silver Helmet", + "DesertWaterFountain": "Desert Water Fountain", + "Shadewood": "Shadewood", + "ShadewoodDoor": "Shadewood Door", + "ShadewoodPlatform": "Shadewood Platform", + "ShadewoodChest": "Shadewood Chest", + "ShadewoodChair": "Shadewood Chair", + "ShadewoodWorkBench": "Shadewood Work Bench", + "ShadewoodTable": "Shadewood Table", + "ShadewoodDresser": "Shadewood Dresser", + "ShadewoodPiano": "Shadewood Piano", + "GoldHelmet": "Gold Helmet", + "ShadewoodBed": "Shadewood Bed", + "ShadewoodSword": "Shadewood Sword", + "ShadewoodHammer": "Shadewood Hammer", + "ShadewoodBow": "Shadewood Bow", + "ShadewoodHelmet": "Shadewood Helmet", + "ShadewoodBreastplate": "Shadewood Breastplate", + "ShadewoodGreaves": "Shadewood Greaves", + "ShadewoodWall": "Shadewood Wall", + "Cannon": "Cannon", + "Cannonball": "Cannonball", + "WoodWall": "Wood Wall", + "FlareGun": "Flare Gun", + "Flare": "Flare", + "BoneWand": "Bone Wand", + "LeafWand": "Leaf Wand", + "FlyingCarpet": "Flying Carpet", + "AvengerEmblem": "Avenger Emblem", + "MechanicalGlove": "Mechanical Glove", + "LandMine": "Land Mine", + "PaladinsShield": "Paladin's Shield", + "WebSlinger": "Web Slinger", + "WoodPlatform": "Wood Platform", + "JungleWaterFountain": "Jungle Water Fountain", + "IcyWaterFountain": "Icy Water Fountain", + "CorruptWaterFountain": "Corrupt Water Fountain", + "CrimsonWaterFountain": "Crimson Water Fountain", + "HallowedWaterFountain": "Hallowed Water Fountain", + "BloodWaterFountain": "Blood Water Fountain", + "Umbrella": "Umbrella", + "ChlorophyteOre": "Chlorophyte Ore", + "SteampunkWings": "Steampunk Wings", + "Snowball": "Snowball", + "FlintlockPistol": "Flintlock Pistol", + "IceSkates": "Ice Skates", + "SnowballLauncher": "Snowball Launcher", + "WebCoveredChest": "Web Covered Chest", + "ClimbingClaws": "Climbing Claws", + "AncientIronHelmet": "Ancient Iron Helmet", + "AncientGoldHelmet": "Ancient Gold Helmet", + "AncientShadowHelmet": "Ancient Shadow Helmet", + "AncientShadowScalemail": "Ancient Shadow Scalemail", + "AncientShadowGreaves": "Ancient Shadow Greaves", + "AncientNecroHelmet": "Ancient Necro Helmet", + "Musket": "Musket", + "AncientCobaltHelmet": "Ancient Cobalt Helmet", + "AncientCobaltBreastplate": "Ancient Cobalt Breastplate", + "AncientCobaltLeggings": "Ancient Cobalt Leggings", + "BlackBelt": "Black Belt", + "Boomstick": "Boomstick", + "Rope": "Rope", + "Campfire": "Campfire", + "Marshmallow": "Marshmallow", + "MarshmallowonaStick": "Marshmallow on a Stick", + "CookedMarshmallow": "Cooked Marshmallow", + "MusketBall": "Musket Ball", + "RedRocket": "Red Rocket", + "GreenRocket": "Green Rocket", + "BlueRocket": "Blue Rocket", + "YellowRocket": "Yellow Rocket", + "IceTorch": "Ice Torch", + "ShoeSpikes": "Shoe Spikes", + "TigerClimbingGear": "Tiger Climbing Gear", + "Tabi": "Tabi", + "PinkEskimoHood": "Pink Snow Hood", + "PinkEskimoCoat": "Pink Snow Coat", + "Minishark": "Minishark", + "PinkEskimoPants": "Pink Snow Pants", + "PinkThread": "Pink Thread", + "ManaRegenerationBand": "Mana Regeneration Band", + "SandstorminaBalloon": "Sandstorm in a Balloon", + "MasterNinjaGear": "Master Ninja Gear", + "RopeCoil": "Rope Coil", + "Blowgun": "Blowgun", + "BlizzardinaBottle": "Blizzard in a Bottle", + "FrostburnArrow": "Frostburn Arrow", + "EnchantedSword": "Enchanted Sword", + "IronBow": "Iron Bow", + "PickaxeAxe": "Pickaxe Axe", + "CobaltWaraxe": "Cobalt Waraxe", + "MythrilWaraxe": "Mythril Waraxe", + "AdamantiteWaraxe": "Adamantite Waraxe", + "EatersBone": "Eater's Bone", + "BlendOMatic": "Blend-O-Matic", + "MeatGrinder": "Meat Grinder", + "Extractinator": "Extractinator", + "Solidifier": "Solidifier", + "Amber": "Amber", + "AcidDye": "Acid Dye", + "ActuationAccessory": "Presserator", + "ActuationRod": "Actuation Rod", + "AlchemyTable": "Alchemy Table", + "AlphabetStatue0": "'0' Statue", + "AlphabetStatue1": "'1' Statue", + "AlphabetStatue2": "'2' Statue", + "AlphabetStatue3": "'3' Statue", + "AlphabetStatue4": "'4' Statue", + "AlphabetStatue5": "'5' Statue", + "AlphabetStatue6": "'6' Statue", + "AlphabetStatue7": "'7' Statue", + "AlphabetStatue8": "'8' Statue", + "AlphabetStatue9": "'9' Statue", + "AlphabetStatueA": "'A' Statue", + "AlphabetStatueB": "'B' Statue", + "AlphabetStatueC": "'C' Statue", + "AlphabetStatueD": "'D' Statue", + "AlphabetStatueE": "'E' Statue", + "AlphabetStatueF": "'F' Statue", + "AlphabetStatueG": "'G' Statue", + "AlphabetStatueH": "'H' Statue", + "AlphabetStatueI": "'I' Statue", + "AlphabetStatueJ": "'J' Statue", + "AlphabetStatueK": "'K' Statue", + "AlphabetStatueL": "'L' Statue", + "AlphabetStatueM": "'M' Statue", + "AlphabetStatueN": "'N' Statue", + "AlphabetStatueO": "'O' Statue", + "AlphabetStatueP": "'P' Statue", + "AlphabetStatueQ": "'Q' Statue", + "AlphabetStatueR": "'R' Statue", + "AlphabetStatueS": "'S' Statue", + "AlphabetStatueT": "'T' Statue", + "AlphabetStatueU": "'U' Statue", + "AlphabetStatueV": "'V' Statue", + "AlphabetStatueW": "'W' Statue", + "AlphabetStatueX": "'X' Statue", + "AlphabetStatueY": "'Y' Statue", + "AlphabetStatueZ": "'Z' Statue", + "Amarok": "Amarok", + "AmberGemsparkWall": "Amber Gemspark Wall", + "AmberGemsparkWallOff": "Offline Amber Gemspark Wall", + "AmberStaff": "Amber Staff", + "AmethystGemsparkWall": "Amethyst Gemspark Wall", + "AmethystGemsparkWallOff": "Offline Amethyst Gemspark Wall", + "AncientArmorHat": "Ancient Headdress", + "AncientArmorPants": "Ancient Slacks", + "AncientArmorShirt": "Ancient Garments", + "AncientBattleArmorHat": "Forbidden Mask", + "AncientBattleArmorMaterial": "Forbidden Fragment", + "AncientBattleArmorPants": "Forbidden Treads", + "AncientBattleArmorShirt": "Forbidden Robes", + "AncientCloth": "Ancient Cloth", + "AncientCultistTrophy": "Lunatic Cultist Trophy", + "AncientHorn": "Ancient Horn", + "AnglerTackleBag": "Angler Tackle Bag", + "AngryBonesBanner": "Angry Bones Banner", + "AnnouncementBox": "Announcement Box", + "AntiGravityHook": "Anti-Gravity Hook", + "AntlionClaw": "Mandible Blade", + "ApprenticeBait": "Apprentice Bait", + "ApprenticeHat": "Apprentice's Hat", + "ApprenticeRobe": "Apprentice's Robe", + "ApprenticeScarf": "Apprentice's Scarf", + "ApprenticeTrousers": "Apprentice's Trousers", + "ArchitectGizmoPack": "Architect Gizmo Pack", + "Arkhalis": "Arkhalis", + "AviatorSunglasses": "0x33's Aviators", + "Bacon": "Bacon", + "BalloonHorseshoeFart": "Green Horseshoe Balloon", + "BalloonHorseshoeHoney": "Amber Horseshoe Balloon", + "BalloonHorseshoeSharkron": "Pink Horseshoe Balloon", + "BalloonPufferfish": "Balloon Pufferfish", + "BeeMask": "Queen Bee Mask", + "BeesKnees": "The Bee's Knees", + "BejeweledValkyrieBody": "Lazure's Valkyrie Cloak", + "BejeweledValkyrieHead": "Lazure's Valkyrie Circlet", + "BejeweledValkyrieWing": "Lazure's Barrier Platform", + "BewitchingTable": "Bewitching Table", + "BlackAndWhiteDye": "Black and White Dye", + "BlackCounterweight": "Black Counterweight", + "BlackString": "Black String", + "Bladetongue": "Bladetongue", + "BlessedApple": "Blessed Apple", + "BlinkrootPlanterBox": "Blinkroot Planter Box", + "BloodWater": "Blood Water", + "BloodZombieBanner": "Blood Zombie Banner", + "BloodZombieStatue": "Blood Zombie Statue", + "BlueAcidDye": "Blue Acid Dye", + "BlueCounterweight": "Blue Counterweight", + "BlueDungeonBathtub": "Blue Dungeon Bathtub", + "BlueDungeonCandelabra": "Blue Dungeon Candelabra", + "BlueDungeonChandelier": "Blue Dungeon Chandelier", + "BlueDungeonChest": "Blue Dungeon Chest", + "BlueDungeonLamp": "Blue Dungeon Lamp", + "BlueDungeonSink": "Blue Dungeon Sink", + "BlueFlameAndSilverDye": "Blue Flame and Silver Dye", + "BlueLunaticHood": "Lunar Cultist Hood", + "BlueLunaticRobe": "Lunar Cultist Robe", + "BluePhasesaber": "Blue Phasesaber", + "BlueString": "Blue String", + "BombFish": "Bomb Fish", + "BoneArrow": "Bone Arrow", + "BoneBathtub": "Bone Bathtub", + "BoneBed": "Bone Bed", + "BoneBookcase": "Bone Bookcase", + "BoneCampfire": "Bone Campfire", + "BoneCandelabra": "Bone Candelabra", + "BoneChandelier": "Bone Chandelier", + "BoneChest": "Bone Chest", + "BoneClock": "Bone Clock", + "BoneDagger": "Bone Throwing Knife", + "BoneGlove": "Bone Glove", + "BoneJavelin": "Bone Javelin", + "BoneLamp": "Bone Lamp", + "BoneLantern": "Bone Lantern", + "BoneRattle": "Bone Rattle", + "BoneSink": "Bone Sink", + "BoneSkeletonStatue": "Bone Skeleton Statue", + "BoneTorch": "Bone Torch", + "BoosterTrack": "Booster Track", + "BorealWood": "Boreal Wood", + "BorealWoodBathtub": "Boreal Wood Bathtub", + "BorealWoodBed": "Boreal Wood Bed", + "BorealWoodBookcase": "Boreal Wood Bookcase", + "BorealWoodBow": "Boreal Wood Bow", + "BorealWoodBreastplate": "Boreal Wood Breastplate", + "BorealWoodCandelabra": "Boreal Wood Candelabra", + "BorealWoodCandle": "Boreal Wood Candle", + "BorealWoodChair": "Boreal Wood Chair", + "BorealWoodChandelier": "Boreal Wood Chandelier", + "BorealWoodChest": "Boreal Wood Chest", + "BorealWoodClock": "Boreal Wood Clock", + "BorealWoodDoor": "Boreal Wood Door", + "BorealWoodDresser": "Boreal Wood Dresser", + "BorealWoodFence": "Boreal Wood Fence", + "BorealWoodGreaves": "Boreal Wood Greaves", + "BorealWoodHammer": "Boreal Wood Hammer", + "BorealWoodHelmet": "Boreal Wood Helmet", + "BorealWoodLamp": "Boreal Wood Lamp", + "BorealWoodLantern": "Boreal Wood Lantern", + "BorealWoodPiano": "Boreal Wood Piano", + "BorealWoodPlatform": "Boreal Wood Platform", + "BorealWoodSink": "Boreal Wood Sink", + "BorealWoodSofa": "Boreal Wood Sofa", + "BorealWoodSword": "Boreal Wood Sword", + "BorealWoodTable": "Boreal Wood Table", + "BorealWoodWall": "Boreal Wood Wall", + "BorealWoodWorkBench": "Boreal Wood Work Bench", + "BossMaskCultist": "Lunatic Cultist Mask", + "BossMaskMoonlord": "Moon Lord Mask", + "BottomlessBucket": "Bottomless Water Bucket", + "BouncyBomb": "Bouncy Bomb", + "BouncyDynamite": "Bouncy Dynamite", + "BouncyGlowstick": "Bouncy Glowstick", + "BouncyGrenade": "Bouncy Grenade", + "BrainMask": "Brain of Cthulhu Mask", + "BrainOfConfusion": "Brain of Confusion", + "BrainOfCthulhuBossBag": "Treasure Bag", + "BrainScrambler": "Brain Scrambler", + "BrightBrownDye": "Bright Brown Dye", + "BrightSilverDye": "Bright Silver Dye", + "BrownAndBlackDye": "Brown and Black Dye", + "BrownAndSilverDye": "Brown and Silver Dye", + "BrownDye": "Brown Dye", + "BrownString": "Brown String", + "Bubble": "Bubble", + "BubbleGun": "Bubble Gun", + "BuccaneerBandana": "Buccaneer Bandana", + "BuccaneerPants": "Buccaneer Pantaloons", + "BuccaneerShirt": "Buccaneer Tunic", + "Buggy": "Buggy", + "BuggyStatue": "Buggy Statue", + "BunnyfishTrophy": "Bunnyfish Trophy", + "BurningHadesDye": "Burning Hades Dye", + "ButcherBanner": "Butcher Banner", + "ButchersChainsaw": "Butcher's Chainsaw", + "ButterflyStatue": "Butterfly Statue", + "CactusBathtub": "Cactus Bathtub", + "CactusBed": "Cactus Bed", + "CactusBookcase": "Cactus Bookcase", + "CactusCandelabra": "Cactus Candelabra", + "CactusCandle": "Cactus Candle", + "CactusChandelier": "Cactus Chandelier", + "CactusChest": "Cactus Chest", + "CactusClock": "Cactus Clock", + "CactusLamp": "Cactus Lamp", + "CactusLantern": "Cactus Lantern", + "CactusPlatform": "Cactus Platform", + "CactusSink": "Cactus Sink", + "CactusTable": "Cactus Table", + "CageBuggy": "Buggy Cage", + "CageEnchantedNightcrawler": "Enchanted Nightcrawler Cage", + "CageGrubby": "Grubby Cage", + "CageSluggy": "Sluggy Cage", + "Cascade": "Cascade", + "CelestialShell": "Celestial Shell", + "CelestialSigil": "Celestial Sigil", + "CellPhone": "Cell Phone", + "ChainGuillotines": "Chain Guillotines", + "ChargedBlasterCannon": "Charged Blaster Cannon", + "Chik": "Chik", + "Chimney": "Chimney", + "ChlorophyteBrick": "Chlorophyte Brick", + "ChlorophyteBrickWall": "Chlorophyte Brick Wall", + "ChlorophyteDye": "Chlorophyte Dye", + "ClingerStaff": "Clinger Staff", + "ClothierJacket": "Clothier's Jacket", + "ClothierPants": "Clothier's Pants", + "Code1": "Code 1", + "Code2": "Code 2", + "CogWall": "Cog Wall", + "CoinRing": "Coin Ring", + "CompanionCube": "Companion Cube", + "CompassRose": "Compass Rose", + "ConfettiBlock": "Confetti Block", + "ConfettiBlockBlack": "Midnight Confetti Block", + "ConfettiCannon": "Confetti Cannon", + "ConfettiWall": "Confetti Wall", + "ConfettiWallBlack": "Midnight Confetti Wall", + "ConveyorBeltLeft": "Conveyor Belt (Clockwise)", + "ConveyorBeltRight": "Conveyor Belt (Counter Clockwise)", + "CordageGuide": "Guide to Plant Fiber Cordage", + "CorruptFishingCrate": "Corrupt Crate", + "CorruptHardenedSand": "Hardened Ebonsand Block", + "CorruptHardenedSandWall": "Hardened Ebonsand Wall", + "CorruptPlanterBox": "Deathweed Planter Box", + "CorruptSandstone": "Ebonsandstone Block", + "CorruptSandstoneWall": "Ebonsandstone Wall", + "CorruptYoyo": "Malaise", + "CosmicCarKey": "Cosmic Car Key", + "CrawdadBanner": "Crawdad Banner", + "CreatureFromTheDeepBanner": "Creature From The Deep Banner", + "CrimsonFishingCrate": "Crimson Crate", + "CrimsonHardenedSand": "Hardened Crimsand Block", + "CrimsonHardenedSandWall": "Hardened Crimsand Wall", + "CrimsonHeart": "Crimson Heart", + "CrimsonPlanterBox": "Deathweed Planter Box", + "CrimsonSandstone": "Crimsandstone Block", + "CrimsonSandstoneWall": "Crimsandstone Wall", + "CrimsonYoyo": "Artery", + "CrimtaneBrick": "Crimtane Brick", + "CrimtaneBrickWall": "Crimtane Brick Wall", + "CrystalBlock": "Crystal Block", + "CrystalBlockWall": "Crystal Block Wall", + "CrystalDart": "Crystal Dart", + "CrystalSerpent": "Crystal Serpent", + "CrystalVileShard": "Crystal Vile Shard", + "CultistBossBag": "Treasure Bag", + "CursedCampfire": "Cursed Campfire", + "CursedDart": "Cursed Dart", + "CyanString": "Cyan String", + "DaedalusStormbow": "Daedalus Stormbow", + "DarkMummyBanner": "Dark Mummy Banner", + "DartPistol": "Dart Pistol", + "DartRifle": "Dart Rifle", + "DayBloomPlanterBox": "Daybloom Planter Box", + "DayBreak": "Daybreak", + "DeadlySphereBanner": "Deadly Sphere Banner", + "DeadlySphereStaff": "Deadly Sphere Staff", + "DefenderMedal": "Defender Medal", + "DefendersForge": "Defender's Forge", + "DemonCampfire": "Demon Campfire", + "DemonHeart": "Demon Heart", + "DesertBasiliskBanner": "Basilisk Banner", + "DesertDjinnBanner": "Desert Spirit Banner", + "DesertFossil": "Desert Fossil", + "DesertFossilWall": "Desert Fossil Wall", + "DesertGhoulBanner": "Ghoul Banner", + "DesertLamiaBanner": "Lamia Banner", + "DestroyerBossBag": "Treasure Bag", + "DestroyerMask": "Destroyer Mask", + "Detonator": "Detonator", + "DevDye": "Skiphs' Blood", + "DiamondGemsparkWall": "Diamond Gemspark Wall", + "DiamondGemsparkWallOff": "Offline Diamond Gemspark Wall", + "DjinnLamp": "Desert Spirit Lamp", + "DjinnsCurse": "Djinn's Curse", + "DPSMeter": "DPS Meter", + "DrillContainmentUnit": "Drill Containment Unit", + "DripplerBanner": "Drippler Banner", + "DripplerStatue": "Drippler Statue", + "DrManFlyBanner": "Dr. Man Fly Banner", + "DuckStatue": "Duck Statue", + "DukeFishronMask": "Duke Fishron Mask", + "DukeFishronTrophy": "Duke Fishron Trophy", + "DuneSplicerBanner": "Dune Splicer Banner", + "DungeonFishingCrate": "Dungeon Crate", + "DyeTradersScimitar": "Exotic Scimitar", + "DyeTraderTurban": "Dye Trader's Turban", + "DynastyBathtub": "Dynasty Bathtub", + "DynastyBed": "Dynasty Bed", + "DynastyBookcase": "Dynasty Bookcase", + "DynastyBowl": "Dynasty Bowl", + "DynastyCandelabra": "Large Dynasty Candle", + "DynastyCandle": "Dynasty Candle", + "DynastyChair": "Dynasty Chair", + "DynastyChandelier": "Large Dynasty Lantern", + "DynastyChest": "Dynasty Chest", + "DynastyClock": "Dynasty Clock", + "DynastyCup": "Dynasty Cup", + "DynastyLamp": "Dynasty Lamp", + "DynastyLantern": "Dynasty Lantern", + "DynastySink": "Dynasty Sink", + "DynastyWorkBench": "Dynasty Work Bench", + "EaterMask": "Eater of Worlds Mask", + "EaterOfWorldsBossBag": "Treasure Bag", + "EbonwoodBathtub": "Ebonwood Bathtub", + "EbonwoodBookcase": "Ebonwood Bookcase", + "EbonwoodCandelabra": "Ebonwood Candelabra", + "EbonwoodCandle": "Ebonwood Candle", + "EbonwoodChandelier": "Ebonwood Chandelier", + "EbonwoodClock": "Ebonwood Clock", + "EbonwoodLamp": "Ebonwood Lamp", + "EbonwoodLantern": "Ebonwood Lantern", + "EbonwoodSink": "Ebonwood Sink", + "ElectrosphereLauncher": "Electrosphere Launcher", + "EmeraldGemsparkWall": "Emerald Gemspark Wall", + "EmeraldGemsparkWallOff": "Offline Emerald Gemspark Wall", + "EmptyDropper": "Empty Dropper", + "EnchantedNightcrawler": "Enchanted Nightcrawler", + "EndlessMusketPouch": "Endless Musket Pouch", + "EndlessQuiver": "Endless Quiver", + "EngineeringHelmet": "Engineering Helmet", + "EoCShield": "Shield of Cthulhu", + "EyeMask": "Eye of Cthulhu Mask", + "EyeOfCthulhuBossBag": "Treasure Bag", + "Fake_BlueDungeonChest": "Trapped Blue Dungeon Chest", + "Fake_BoneChest": "Trapped Bone Chest", + "Fake_BorealWoodChest": "Trapped Boreal Wood Chest", + "Fake_CactusChest": "Trapped Cactus Chest", + "Fake_Chest": "Trapped Chest", + "Fake_CorruptionChest": "Trapped Corruption Chest", + "Fake_CrimsonChest": "Trapped Crimson Chest", + "Fake_DynastyChest": "Trapped Dynasty Chest", + "Fake_EbonwoodChest": "Trapped Ebonwood Chest", + "Fake_FleshChest": "Trapped Flesh Chest", + "Fake_FrozenChest": "Trapped Ice Chest", + "Fake_GlassChest": "Trapped Glass Chest", + "Fake_GoldChest": "Trapped Gold Chest", + "Fake_GraniteChest": "Trapped Granite Chest", + "Fake_GreenDungeonChest": "Trapped Green Dungeon Chest", + "Fake_HallowedChest": "Trapped Hallowed Chest", + "Fake_HoneyChest": "Trapped Honey Chest", + "Fake_IceChest": "Trapped Frozen Chest", + "Fake_IvyChest": "Trapped Ivy Chest", + "Fake_JungleChest": "Trapped Jungle Chest", + "Fake_LihzahrdChest": "Trapped Lihzahrd Chest", + "Fake_LivingWoodChest": "Trapped Living Wood Chest", + "Fake_MarbleChest": "Trapped Marble Chest", + "Fake_MartianChest": "Trapped Martian Chest", + "Fake_MeteoriteChest": "Trapped Meteorite Chest", + "Fake_MushroomChest": "Trapped Mushroom Chest", + "Fake_ObsidianChest": "Trapped Obsidian Chest", + "Fake_PalmWoodChest": "Trapped Palm Wood Chest", + "Fake_PearlwoodChest": "Trapped Pearlwood Chest", + "Fake_PinkDungeonChest": "Trapped Pink Dungeon Chest", + "Fake_PumpkinChest": "Trapped Pumpkin Chest", + "Fake_RichMahoganyChest": "Trapped Rich Mahogany Chest", + "Fake_ShadewoodChest": "Trapped Shadewood Chest", + "Fake_ShadowChest": "Trapped Shadow Chest", + "Fake_SkywareChest": "Trapped Skyware Chest", + "Fake_SlimeChest": "Trapped Slime Chest", + "Fake_SpookyChest": "Trapped Spooky Chest", + "Fake_SteampunkChest": "Trapped Steampunk Chest", + "Fake_WaterChest": "Trapped Water Chest", + "Fake_WebCoveredChest": "Trapped Web Covered Chest", + "FalconBlade": "Falcon Blade", + "FallenTuxedoPants": "Fallen Tuxedo Pants", + "FallenTuxedoShirt": "Fallen Tuxedo Shirt", + "FancyDishes": "Fancy Dishes", + "FetidBaghnakhs": "Fetid Baghnakhs", + "FireBlossomPlanterBox": "Fireblossom Planter Box", + "FireflyStatue": "Firefly Statue", + "Fireplace": "Fireplace", + "FireworkFountain": "Firework Fountain", + "FireworksBox": "Fireworks Box", + "FireworksLauncher": "Celebration", + "FishermansGuide": "Fisherman's Pocket Guide", + "FishFinder": "Fish Finder", + "FishronBossBag": "Treasure Bag", + "FishronWings": "Fishron Wings", + "Flairon": "Flairon", + "FlameAndSilverDye": "Flame and Silver Dye", + "FleshBathtub": "Flesh Bathtub", + "FleshBed": "Flesh Bed", + "FleshBookcase": "Flesh Bookcase", + "FleshCandelabra": "Flesh Candelabra", + "FleshCandle": "Flesh Candle", + "FleshChandelier": "Flesh Chandelier", + "FleshChest": "Flesh Chest", + "FleshClock": "Flesh Clock", + "FleshDresser": "Flesh Dresser", + "FleshKnuckles": "Flesh Knuckles", + "FleshLamp": "Flesh Lamp", + "FleshLantern": "Flesh Lantern", + "FleshMask": "Wall of Flesh Mask", + "FleshPiano": "Flesh Piano", + "FleshSink": "Flesh Sink", + "FleshSofa": "Flesh Sofa", + "FloatingIslandFishingCrate": "Sky Crate", + "FlowerBoots": "Flower Boots", + "FlowerBoyHat": "Silly Sunflower Petals", + "FlowerBoyPants": "Silly Sunflower Bottoms", + "FlowerBoyShirt": "Silly Sunflower Tops", + "FlyingAntlionBanner": "Antlion Swarmer Banner", + "FlyingDutchmanTrophy": "Flying Dutchman Trophy", + "FlyingKnife": "Flying Knife", + "FormatC": "Format:C", + "FossilHelm": "Fossil Helmet", + "FossilOre": "Sturdy Fossil", + "FossilPants": "Fossil Greaves", + "FossilShirt": "Fossil Plate", + "FragmentNebula": "Nebula Fragment", + "FragmentSolar": "Solar Fragment", + "FragmentStardust": "Stardust Fragment", + "FragmentVortex": "Vortex Fragment", + "FritzBanner": "Fritz Banner", + "FrogStatue": "Frog Statue", + "FrostDaggerfish": "Frost Daggerfish", + "FrozenBathtub": "Frozen Bathtub", + "FrozenBed": "Frozen Bed", + "FrozenBookcase": "Frozen Bookcase", + "FrozenCampfire": "Frozen Campfire", + "FrozenCandelabra": "Frozen Candelabra", + "FrozenCandle": "Frozen Candle", + "FrozenChair": "Frozen Chair", + "FrozenChandelier": "Frozen Chandelier", + "FrozenClock": "Frozen Clock", + "FrozenDoor": "Frozen Door", + "FrozenLamp": "Frozen Lamp", + "FrozenLantern": "Frozen Lantern", + "FrozenPiano": "Frozen Piano", + "FrozenSink": "Frozen Sink", + "FrozenSofa": "Frozen Sofa", + "FrozenTable": "Frozen Table", + "FrozenWorkBench": "Frozen Work Bench", + "FuzzyCarrot": "Fuzzy Carrot", + "GelDye": "Gel Dye", + "GemLockAmber": "Amber Gem Lock", + "GemLockAmethyst": "Amethyst Gem Lock", + "GemLockDiamond": "Diamond Gem Lock", + "GemLockEmerald": "Emerald Gem Lock", + "GemLockRuby": "Ruby Gem Lock", + "GemLockSapphire": "Sapphire Gem Lock", + "GemLockTopaz": "Topaz Gem Lock", + "GenderChangePotion": "Gender Change Potion", + "GeyserTrap": "Geyser", + "GiantShellyBanner": "Giant Shelly Banner", + "GladiatorBreastplate": "Gladiator Breastplate", + "GladiatorHelmet": "Gladiator Helmet", + "GladiatorLeggings": "Gladiator Leggings", + "GlassBathtub": "Glass Bathtub", + "GlassBookcase": "Glass Bookcase", + "GlassBowl": "Glass Bowl", + "GlassCandelabra": "Glass Candelabra", + "GlassCandle": "Glass Candle", + "GlassChandelier": "Glass Chandelier", + "GlassChest": "Glass Chest", + "GlassClock": "Glass Clock", + "GlassDresser": "Glass Dresser", + "GlassLamp": "Glass Lamp", + "GlassLantern": "Glass Lantern", + "GlassPiano": "Glass Piano", + "GlassSink": "Glass Sink", + "GlassWorkBench": "Glass Work Bench", + "GoblinSummonerBanner": "Goblin Summoner Banner", + "GoblinTech": "Goblin Tech", + "GoldBird": "Gold Bird", + "GoldBirdCage": "Gold Bird Cage", + "GoldBunny": "Gold Bunny", + "GoldBunnyCage": "Gold Bunny Cage", + "GoldButterfly": "Gold Butterfly", + "GoldButterflyCage": "Gold Butterfly Jar", + "GoldenBathtub": "Golden Bathtub", + "GoldenBookcase": "Golden Bookcase", + "GoldenBugNet": "Golden Bug Net", + "GoldenCandelabra": "Golden Candelabra", + "GoldenCandle": "Golden Candle", + "GoldenChandelier": "Golden Chandelier", + "GoldenClock": "Golden Clock", + "GoldenLamp": "Golden Lamp", + "GoldenLantern": "Golden Lantern", + "GoldenSink": "Golden Sink", + "GoldfishTrophy": "Goldfish Trophy", + "GoldFrog": "Gold Frog", + "GoldFrogCage": "Gold Frog Cage", + "GoldGrasshopper": "Gold Grasshopper", + "GoldGrasshopperCage": "Gold Grasshopper Cage", + "GoldMouse": "Gold Mouse", + "GoldMouseCage": "Gold Mouse Cage", + "GoldRing": "Gold Ring", + "GoldWorm": "Gold Worm", + "GoldWormCage": "Gold Worm Cage", + "GolemBossBag": "Treasure Bag", + "GolemMask": "Golem Mask", + "Gradient": "Gradient", + "Granite": "Granite Block", + "GraniteBathtub": "Granite Bathtub", + "GraniteBed": "Granite Bed", + "GraniteBlock": "Smooth Granite Block", + "GraniteBlockWall": "Smooth Granite Wall", + "GraniteBookcase": "Granite Bookcase", + "GraniteCandelabra": "Granite Candelabra", + "GraniteCandle": "Granite Candle", + "GraniteChair": "Granite Chair", + "GraniteChandelier": "Granite Chandelier", + "GraniteChest": "Granite Chest", + "GraniteClock": "Granite Clock", + "GraniteDoor": "Granite Door", + "GraniteDresser": "Granite Dresser", + "GraniteFlyerBanner": "Granite Elemental Banner", + "GraniteGolemBanner": "Granite Golem Banner", + "GraniteGolemStatue": "Granite Golem Statue", + "GraniteLamp": "Granite Lamp", + "GraniteLantern": "Granite Lantern", + "GranitePiano": "Granite Piano", + "GranitePlatform": "Granite Platform", + "GraniteSink": "Granite Sink", + "GraniteSofa": "Granite Sofa", + "GraniteTable": "Granite Table", + "GraniteWall": "Granite Wall", + "GraniteWorkBench": "Granite Work Bench", + "Grasshopper": "Grasshopper", + "GrasshopperCage": "Grasshopper Cage", + "GrasshopperStatue": "Grasshopper Statue", + "GreedyRing": "Greedy Ring", + "GreekSkeletonBanner": "Hoplite Banner", + "GreenCounterweight": "Green Counterweight", + "GreenDungeonBathtub": "Green Dungeon Bathtub", + "GreenDungeonCandelabra": "Green Dungeon Candelabra", + "GreenDungeonChandelier": "Green Dungeon Chandelier", + "GreenDungeonChest": "Green Dungeon Chest", + "GreenDungeonLamp": "Green Dungeon Lamp", + "GreenDungeonSink": "Green Dungeon Sink", + "GreenFlameAndSilverDye": "Green Flame and Silver Dye", + "GreenJellyfishBanner": "Green Jellyfish Banner", + "GreenPhasesaber": "Green Phasesaber", + "GreenString": "Green String", + "GrimDye": "Grim Dye", + "Grubby": "Grubby", + "GrubSoup": "Grub Soup", + "HadesDye": "Hades Dye", + "HallowedFishingCrate": "Hallowed Crate", + "HallowHardenedSand": "Hardened Pearlsand Block", + "HallowHardenedSandWall": "Hardened Pearlsand Wall", + "HallowSandstone": "Pearlsandstone Block", + "HallowSandstoneWall": "Pearlsandstone Wall", + "HardenedSand": "Hardened Sand Block", + "HardenedSandWall": "Hardened Sand Wall", + "HardySaddle": "Hardy Saddle", + "HarpyStatue": "Harpy Statue", + "HelFire": "Hel-Fire", + "HellstoneBrickWall": "Hellstone Brick Wall", + "HellwingBow": "Hellwing Bow", + "HerbBag": "Herb Bag", + "HiTekSunglasses": "HiTek Sunglasses", + "HiveBackpack": "Hive Pack", + "HoneyBathtub": "Honey Bathtub", + "HoneyBookcase": "Honey Bookcase", + "HoneyCandelabra": "Honey Candelabra", + "HoneyCandle": "Honey Candle", + "HoneyChandelier": "Honey Chandelier", + "HoneyChest": "Honey Chest", + "HoneyClock": "Honey Clock", + "HoneyCup": "Honey Cup", + "HoneyedGoggles": "Honeyed Goggles", + "HoneyfallBlock": "Honeyfall Block", + "HoneyfallWall": "Honeyfall Wall", + "HoneyLamp": "Honey Lamp", + "HoneyLantern": "Honey Lantern", + "HoneyPiano": "Honey Piano", + "HoneyPlatform": "Honey Platform", + "HoneySink": "Honey Sink", + "HoneyWorkBench": "Honey Work Bench", + "HopliteStatue": "Hoplite Statue", + "HuntressBuckler": "Huntress's Buckler", + "HuntressJerkin": "Huntress's Jerkin", + "HuntressPants": "Huntress's Pants", + "HuntressWig": "Huntress's Wig", + "IceMirror": "Ice Mirror", + "IceTortoiseBanner": "Ice Tortoise Banner", + "IchorCampfire": "Ichor Campfire", + "IchorDart": "Ichor Dart", + "IlluminantHook": "Illuminant Hook", + "InfernalWispDye": "Infernal Wisp Dye", + "InfluxWaver": "Influx Waver", + "ItemFrame": "Item Frame", + "Javelin": "Javelin", + "JimsWings": "Jim's Wings", + "JourneymanBait": "Journeyman Bait", + "JungleFishingCrate": "Jungle Crate", + "JungleYoyo": "Amazon", + "KingSlimeBossBag": "Treasure Bag", + "Kraken": "Kraken", + "LamiaHat": "Lamia Mask", + "LamiaPants": "Lamia Tail", + "LamiaShirt": "Lamia Wraps", + "LargeAmber": "Large Amber", + "LaserDrill": "Laser Drill", + "LaserMachinegun": "Laser Machinegun", + "LaserRuler": "Mechanical Ruler", + "LastPrism": "Last Prism", + "LavafallBlock": "Lavafall Block", + "LavaLamp": "Lava Lamp", + "LifeformAnalyzer": "Lifeform Analyzer", + "LifePreserver": "Life Preserver", + "LightKey": "Key of Light", + "LightMummyBanner": "Light Mummy Banner", + "LihzahrdBathtub": "Lihzahrd Bathtub", + "LihzahrdBed": "Lihzahrd Bed", + "LihzahrdBookcase": "Lihzahrd Bookcase", + "LihzahrdCandelabra": "Lihzahrd Candelabra", + "LihzahrdCandle": "Lihzahrd Candle", + "LihzahrdChandelier": "Lihzahrd Chandelier", + "LihzahrdClock": "Lihzahrd Clock", + "LihzahrdLamp": "Lihzahrd Lamp", + "LihzahrdLantern": "Lihzahrd Lantern", + "LihzahrdSink": "Lihzahrd Sink", + "LimeString": "Lime String", + "LivingCursedFireBlock": "Living Cursed Fire Block", + "LivingDemonFireBlock": "Living Demon Fire Block", + "LivingFireBlock": "Living Fire Block", + "LivingFlameDye": "Living Flame Dye", + "LivingFrostFireBlock": "Living Frost Fire Block", + "LivingIchorBlock": "Living Ichor Block", + "LivingLeafWall": "Living Leaf Wall", + "LivingMahoganyLeafWand": "Rich Mahogany Leaf Wand", + "LivingMahoganyWand": "Living Mahogany Wand", + "LivingOceanDye": "Living Ocean Dye", + "LivingRainbowDye": "Living Rainbow Dye", + "LivingUltrabrightFireBlock": "Living Ultrabright Fire Block", + "LivingWoodBathtub": "Living Wood Bathtub", + "LivingWoodBed": "Living Wood Bed", + "LivingWoodBookcase": "Living Wood Bookcase", + "LivingWoodCandelabra": "Living Wood Candelabra", + "LivingWoodCandle": "Living Wood Candle", + "LivingWoodChandelier": "Living Wood Chandelier", + "LivingWoodClock": "Living Wood Clock", + "LivingWoodLamp": "Living Wood Lamp", + "LivingWoodLantern": "Living Wood Lantern", + "LivingWoodPiano": "Living Wood Piano", + "LivingWoodPlatform": "Living Wood Platform", + "LivingWoodSink": "Living Wood Sink", + "LivingWoodSofa": "Living Wood Sofa", + "LivingWoodWorkBench": "Living Wood Work Bench", + "LockBox": "Golden Lock Box", + "LogicGateLamp_Faulty": "Logic Gate Lamp (Faulty)", + "LogicGateLamp_Off": "Logic Gate Lamp (Off)", + "LogicGateLamp_On": "Logic Gate Lamp (On)", + "LogicGate_AND": "Logic Gate (AND)", + "LogicGate_NAND": "Logic Gate (NAND)", + "LogicGate_NOR": "Logic Gate (NOR)", + "LogicGate_NXOR": "Logic Gate (XNOR)", + "LogicGate_OR": "Logic Gate (OR)", + "LogicGate_XOR": "Logic Gate (XOR)", + "LogicSensor_Above": "Logic Sensor (Player Above)", + "LogicSensor_Honey": "Liquid Sensor (Honey)", + "LogicSensor_Lava": "Liquid Sensor (Lava)", + "LogicSensor_Liquid": "Liquid Sensor (Any)", + "LogicSensor_Moon": "Logic Sensor (Night)", + "LogicSensor_Sun": "Logic Sensor (Day)", + "LogicSensor_Water": "Liquid Sensor (Water)", + "LokisDye": "Loki's Dye", + "LokisHelm": "Loki's Helmet", + "LokisPants": "Loki's Greaves", + "LokisShirt": "Loki's Breastplate", + "LokisWings": "Loki's Wings", + "LunarBar": "Luminite Bar", + "LunarBlockNebula": "Nebula Fragment Block", + "LunarBlockSolar": "Solar Fragment Block", + "LunarBlockStardust": "Stardust Fragment Block", + "LunarBlockVortex": "Vortex Fragment Block", + "LunarBrick": "Luminite Brick", + "LunarBrickWall": "Luminite Brick Wall", + "LunarCraftingStation": "Ancient Manipulator", + "LunarFlareBook": "Lunar Flare", + "LunarHamaxeNebula": "Nebula Hamaxe", + "LunarHamaxeSolar": "Solar Flare Hamaxe", + "LunarHamaxeStardust": "Stardust Hamaxe", + "LunarHamaxeVortex": "Vortex Hamaxe", + "LunarHook": "Lunar Hook", + "LunarOre": "Luminite", + "LunarTabletFragment": "Solar Tablet Fragment", + "MagicHoneyDropper": "Magic Honey Dropper", + "MagicLantern": "Magic Lantern", + "MagicLavaDropper": "Magic Lava Dropper", + "MagicSandDropper": "Magic Sand Dropper", + "MagicWaterDropper": "Magic Water Dropper", + "Marble": "Marble Block", + "MarbleBathtub": "Marble Bathtub", + "MarbleBed": "Marble Bed", + "MarbleBlock": "Smooth Marble Block", + "MarbleBlockWall": "Smooth Marble Wall", + "MarbleBookcase": "Marble Bookcase", + "MarbleCandelabra": "Marble Candelabra", + "MarbleCandle": "Marble Candle", + "MarbleChair": "Marble Chair", + "MarbleChandelier": "Marble Chandelier", + "MarbleChest": "Marble Chest", + "MarbleClock": "Marble Clock", + "MarbleDoor": "Marble Door", + "MarbleDresser": "Marble Dresser", + "MarbleLamp": "Marble Lamp", + "MarbleLantern": "Marble Lantern", + "MarblePiano": "Marble Piano", + "MarblePlatform": "Marble Platform", + "MarbleSink": "Marble Sink", + "MarbleSofa": "Marble Sofa", + "MarbleTable": "Marble Table", + "MarbleWall": "Marble Wall", + "MarbleWorkBench": "Marble Work Bench", + "MartianArmorDye": "Martian Dye", + "MartianAstroClock": "Martian Astro Clock", + "MartianBathtub": "Martian Bathtub", + "MartianBed": "Martian Bed", + "MartianChandelier": "Martian Chandelier", + "MartianChest": "Martian Chest", + "MartianConduitPlating": "Martian Conduit Plating", + "MartianConduitWall": "Martian Conduit Wall", + "MartianCostumeMask": "Martian Costume Mask", + "MartianCostumePants": "Martian Costume Pants", + "MartianCostumeShirt": "Martian Costume Shirt", + "MartianDoor": "Martian Door", + "MartianDresser": "Martian Dresser", + "MartianHairDye": "Martian Hair Dye", + "MartianHolobookcase": "Martian Holobookcase", + "MartianHoverCandle": "Martian Hover Candle", + "MartianHoverChair": "Martian Hover Chair", + "MartianLamppost": "Martian Lamppost", + "MartianLantern": "Martian Lantern", + "MartianPiano": "Martian Piano", + "MartianPlatform": "Martian Platform", + "MartianSaucerTrophy": "Martian Saucer Trophy", + "MartianSink": "Martian Sink", + "MartianSofa": "Martian Sofa", + "MartianTable": "Martian Table", + "MartianTableLamp": "Martian Table Lamp", + "MartianUniformHelmet": "Martian Uniform Helmet", + "MartianUniformPants": "Martian Uniform Pants", + "MartianUniformTorso": "Martian Uniform Torso", + "MartianWalkerBanner": "Martian Walker Banner", + "MartianWorkBench": "Martian Work Bench", + "MasterBait": "Master Bait", + "MechanicalBatteryPiece": "Mechanical Battery Piece", + "MechanicalLens": "Mechanical Lens", + "MechanicalWagonPiece": "Mechanical Wagon Piece", + "MechanicalWheelPiece": "Mechanical Wheel Piece", + "MedusaBanner": "Medusa Banner", + "MedusaHead": "Medusa Head", + "MedusaStatue": "Medusa Statue", + "Meowmere": "Meowmere", + "MetalDetector": "Metal Detector", + "MetalSink": "Metal Sink", + "MeteoriteBathtub": "Meteorite Bathtub", + "MeteoriteBed": "Meteorite Bed", + "MeteoriteBookcase": "Meteorite Bookcase", + "MeteoriteBrick": "Meteorite Brick", + "MeteoriteBrickWall": "Meteorite Brick Wall", + "MeteoriteCandelabra": "Meteorite Candelabra", + "MeteoriteCandle": "Meteorite Candle", + "MeteoriteChair": "Meteorite Chair", + "MeteoriteChandelier": "Meteorite Chandelier", + "MeteoriteChest": "Meteorite Chest", + "MeteoriteClock": "Meteorite Clock", + "MeteoriteDoor": "Meteorite Door", + "MeteoriteDresser": "Meteorite Dresser", + "MeteoriteLamp": "Meteorite Lamp", + "MeteoriteLantern": "Meteorite Lantern", + "MeteoritePiano": "Meteorite Piano", + "MeteoritePlatform": "Meteorite Platform", + "MeteoriteSink": "Meteorite Sink", + "MeteoriteSofa": "Meteorite Sofa", + "MeteoriteTable": "Meteorite Table", + "MeteoriteWorkBench": "Meteorite Work Bench", + "MeteorStaff": "Meteor Staff", + "MidnightRainbowDye": "Midnight Rainbow Dye", + "MinecartMech": "Mechanical Cart", + "MinecartTrack": "Minecart Track", + "MirageDye": "Mirage Dye", + "MolotovCocktail": "Molotov Cocktail", + "MoneyTrough": "Money Trough", + "MonkBelt": "Monk's Belt", + "MonkBrows": "Monk's Bushy Brow Bald Cap", + "MonkPants": "Monk's Pants", + "MonkShirt": "Monk's Shirt", + "MoonglowPlanterBox": "Moonglow Planter Box", + "MoonlordArrow": "Luminite Arrow", + "MoonLordBossBag": "Treasure Bag", + "MoonlordBullet": "Luminite Bullet", + "MoonLordPainting": "Not a Kid, nor a Squid", + "MoonLordTrophy": "Moon Lord Trophy", + "MoonlordTurretStaff": "Lunar Portal Staff", + "MoonMask": "Moon Mask", + "MothronBanner": "Mothron Banner", + "MothronWings": "Mothron Wings", + "MouseStatue": "Mouse Statue", + "MulticolorWrench": "Multicolor Wrench", + "MushroomBathtub": "Mushroom Bathtub", + "MushroomBed": "Mushroom Bed", + "MushroomBench": "Mushroom Bench", + "MushroomBookcase": "Mushroom Bookcase", + "MushroomCandelabra": "Mushroom Candelabra", + "MushroomCandle": "Mushroom Candle", + "MushroomChandelier": "Mushroom Chandelier", + "MushroomChest": "Mushroom Chest", + "MushroomClock": "Mushroom Clock", + "MushroomDresser": "Mushroom Dresser", + "MushroomDye": "Glowing Mushroom Dye", + "MushroomLamp": "Mushroom Lamp", + "MushroomLantern": "Mushroom Lantern", + "MushroomPiano": "Mushroom Piano", + "MushroomPlatform": "Mushroom Platform", + "MushroomSink": "Mushroom Sink", + "MushroomTable": "Mushroom Table", + "MusicBoxGoblins": "Music Box (Goblin Invasion)", + "MusicBoxHell": "Music Box (Hell)", + "MusicBoxLunarBoss": "Music Box (Lunar Boss)", + "MusicBoxMartians": "Music Box (Martian Madness)", + "MusicBoxPirates": "Music Box (Pirate Invasion)", + "MusicBoxSandstorm": "Music Box (Sandstorm)", + "MusicBoxTowers": "Music Box (The Towers)", + "MusicBoxUndergroundCrimson": "Music Box (Underground Crimson)", + "Nail": "Nail", + "NailGun": "Nail Gun", + "NailheadBanner": "Nailhead Banner", + "NebulaArcanum": "Nebula Arcanum", + "NebulaAxe": "Nebula Axe", + "NebulaBeastBanner": "Evolution Beast Banner", + "NebulaBlaze": "Nebula Blaze", + "NebulaBrainBanner": "Nebula Floater Banner", + "NebulaBreastplate": "Nebula Breastplate", + "NebulaChainsaw": "Nebula Chainsaw", + "NebulaDrill": "Nebula Drill", + "NebulaDye": "Nebula Dye", + "NebulaHammer": "Nebula Hammer", + "NebulaHeadcrabBanner": "Brain Suckler Banner", + "NebulaHelmet": "Nebula Helmet", + "NebulaLeggings": "Nebula Leggings", + "NebulaMonolith": "Nebula Monolith", + "NebulaPickaxe": "Nebula Pickaxe", + "NebulaPickup1": "Damage Booster", + "NebulaPickup2": "Life Booster", + "NebulaPickup3": "Mana Booster", + "NebulaSoldierBanner": "Predictor Banner", + "NegativeDye": "Negative Dye", + "NightKey": "Key of Night", + "NightVisionHelmet": "Night Vision Helmet", + "ObsidianBathtub": "Obsidian Bathtub", + "ObsidianCandelabra": "Obsidian Candelabra", + "ObsidianCandle": "Obsidian Candle", + "ObsidianChandelier": "Obsidian Chandelier", + "ObsidianChest": "Obsidian Chest", + "ObsidianClock": "Obsidian Clock", + "ObsidianHelm": "Obsidian Outlaw Hat", + "ObsidianLamp": "Obsidian Lamp", + "ObsidianLantern": "Obsidian Lantern", + "ObsidianPants": "Obsidian Pants", + "ObsidianShirt": "Obsidian Longcoat", + "ObsidianSink": "Obsidian Sink", + "OnyxBlaster": "Onyx Blaster", + "OrangeString": "Orange String", + "PainterPaintballGun": "Paintball Gun", + "PaintingAcorns": "Acorns", + "PaintingCastleMarsberg": "Castle Marsberg", + "PaintingColdSnap": "Cold Snap", + "PaintingCursedSaint": "Cursed Saint", + "PaintingMartiaLisa": "Martia Lisa", + "PaintingSnowfellas": "Snowfellas", + "PaintingTheSeason": "The Season", + "PaintingTheTruthIsUpThere": "The Truth Is Up There", + "PalmWood": "Palm Wood", + "PalmWoodBathtub": "Palm Wood Bathtub", + "PalmWoodBed": "Palm Wood Bed", + "PalmWoodBench": "Palm Wood Bench", + "PalmWoodBookcase": "Palm Wood Bookcase", + "PalmWoodBow": "Palm Wood Bow", + "PalmWoodBreastplate": "Palm Wood Breastplate", + "PalmWoodCandelabra": "Palm Wood Candelabra", + "PalmWoodCandle": "Palm Wood Candle", + "PalmWoodChair": "Palm Wood Chair", + "PalmWoodChandelier": "Palm Wood Chandelier", + "PalmWoodChest": "Palm Wood Chest", + "PalmWoodClock": "Palm Wood Clock", + "PalmWoodDoor": "Palm Wood Door", + "PalmWoodDresser": "Palm Wood Dresser", + "PalmWoodFence": "Palm Wood Fence", + "PalmWoodGreaves": "Palm Wood Greaves", + "PalmWoodHammer": "Palm Wood Hammer", + "PalmWoodHelmet": "Palm Wood Helmet", + "PalmWoodLamp": "Palm Wood Lamp", + "PalmWoodLantern": "Palm Wood Lantern", + "PalmWoodPiano": "Palm Wood Piano", + "PalmWoodPlatform": "Palm Wood Platform", + "PalmWoodSink": "Palm Wood Sink", + "PalmWoodSofa": "Palm Wood Sofa", + "PalmWoodSword": "Palm Wood Sword", + "PalmWoodTable": "Palm Wood Table", + "PalmWoodWall": "Palm Wood Wall", + "PalmWoodWorkBench": "Palm Wood Work Bench", + "PartyBalloonAnimal": "Balloon Animal", + "PartyBundleOfBalloonsAccessory": "Bundled Party Balloons", + "PartyBundleOfBalloonTile": "Silly Tied Bundle of Balloons", + "PartyGirlGrenade": "Happy Grenade", + "PartyHat": "Party Hat", + "PartyMonolith": "Party Center", + "PartyPresent": "Party Present", + "PDA": "PDA", + "PeaceCandle": "Peace Candle", + "PearlwoodBathtub": "Pearlwood Bathtub", + "PearlwoodBookcase": "Pearlwood Bookcase", + "PearlwoodCandelabra": "Pearlwood Candelabra", + "PearlwoodCandle": "Pearlwood Candle", + "PearlwoodChandelier": "Pearlwood Chandelier", + "PearlwoodClock": "Pearlwood Clock", + "PearlwoodLamp": "Pearlwood Lamp", + "PearlwoodLantern": "Pearlwood Lantern", + "PearlwoodSink": "Pearlwood Sink", + "PedguinHat": "Pedguin's Hood", + "PedguinPants": "Pedguin's Trousers", + "PedguinShirt": "Pedguin's Jacket", + "PenguinStatue": "Penguin Statue", + "Phantasm": "Phantasm", + "PhaseDye": "Phase Dye", + "PhasicWarpEjector": "Phasic Warp Ejector", + "Pigronata": "Pigronata", + "PigronStatue": "Pigron Statue", + "PinkDungeonBathtub": "Pink Dungeon Bathtub", + "PinkDungeonCandelabra": "Pink Dungeon Candelabra", + "PinkDungeonChandelier": "Pink Dungeon Chandelier", + "PinkDungeonChest": "Pink Dungeon Chest", + "PinkDungeonLamp": "Pink Dungeon Lamp", + "PinkDungeonSink": "Pink Dungeon Sink", + "PinkGel": "Pink Gel", + "PinkGelDye": "Pink Gel Dye", + "PinkJellyfishBanner": "Pink Jellyfish Banner", + "PinkSlimeBlock": "Pink Slime Block", + "PinkString": "Pink String", + "PinkTorch": "Pink Torch", + "PirateCaptainBanner": "Pirate Captain Banner", + "PirateCorsairBanner": "Pirate Corsair Banner", + "PirateCrossbowerBanner": "Pirate Crossbower Banner", + "PirateDeadeyeBanner": "Pirate Deadeye Banner", + "PirateStaff": "Pirate Staff", + "PixelBox": "Pixel Box", + "PixieDye": "Pixie Dye", + "PlanteraBossBag": "Treasure Bag", + "PlanteraMask": "Plantera Mask", + "PocketMirror": "Pocket Mirror", + "PoisonousSporeBanner": "Poisonous Spore Banner", + "PortalGun": "Portal Gun", + "PortalGunStation": "Portal Gun Station", + "PressureTrack": "Pressure Plate Track", + "ProjectilePressurePad": "Teal Pressure Pad", + "PsychoBanner": "Psycho Banner", + "PsychoKnife": "Psycho Knife", + "PumpkinBathtub": "Pumpkin Bathtub", + "PumpkinBed": "Pumpkin Bed", + "PumpkinBookcase": "Pumpkin Bookcase", + "PumpkinCandelabra": "Pumpkin Candelabra", + "PumpkinCandle": "Pumpkin Candle", + "PumpkinChandelier": "Pumpkin Chandelier", + "PumpkinChest": "Pumpkin Chest", + "PumpkinClock": "Pumpkin Clock", + "PumpkinDresser": "Pumpkin Dresser", + "PumpkinLamp": "Pumpkin Lamp", + "PumpkinLantern": "Pumpkin Lantern", + "PumpkinPiano": "Pumpkin Piano", + "PumpkinSink": "Pumpkin Sink", + "PurpleCounterweight": "Purple Counterweight", + "PurpleOozeDye": "Purple Ooze Dye", + "PurplePhasesaber": "Purple Phasesaber", + "PurpleString": "Purple String", + "PutridScent": "Putrid Scent", + "QueenBeeBossBag": "Treasure Bag", + "Radar": "Radar", + "RainbowCampfire": "Rainbow Campfire", + "RainbowCrystalStaff": "Rainbow Crystal Staff", + "RainbowString": "Rainbow String", + "RainbowTorch": "Rainbow Torch", + "Rally": "Rally", + "RavagerScorpionBanner": "Sand Poacher Banner", + "RazorbladeTyphoon": "Razorblade Typhoon", + "RedAcidDye": "Red Acid Dye", + "RedCounterweight": "Red Counterweight", + "RedDevilBanner": "Red Devil Banner", + "RedPhasesaber": "Red Phasesaber", + "RedString": "Red String", + "RedsYoyo": "Red's Throw", + "ReflectiveCopperDye": "Reflective Copper Dye", + "ReflectiveDye": "Reflective Dye", + "ReflectiveGoldDye": "Reflective Gold Dye", + "ReflectiveMetalDye": "Reflective Metal Dye", + "ReflectiveObsidianDye": "Reflective Obsidian Dye", + "ReflectiveSilverDye": "Reflective Silver Dye", + "REK": "R.E.K. 3000", + "RichGravestone1": "Golden Cross Grave Marker", + "RichGravestone2": "Golden Tombstone", + "RichGravestone3": "Golden Grave Marker", + "RichGravestone4": "Golden Gravestone", + "RichGravestone5": "Golden Headstone", + "RichMahoganyBathtub": "Rich Mahogany Bathtub", + "RichMahoganyBookcase": "Rich Mahogany Bookcase", + "RichMahoganyCandelabra": "Rich Mahogany Candelabra", + "RichMahoganyCandle": "Rich Mahogany Candle", + "RichMahoganyChandelier": "Rich Mahogany Chandelier", + "RichMahoganyClock": "Rich Mahogany Clock", + "RichMahoganyLamp": "Rich Mahogany Lamp", + "RichMahoganyLantern": "Rich Mahogany Lantern", + "RichMahoganySink": "Rich Mahogany Sink", + "RoyalGel": "Royal Gel", + "RubyGemsparkWall": "Ruby Gemspark Wall", + "RubyGemsparkWallOff": "Offline Ruby Gemspark Wall", + "SailfishBoots": "Sailfish Boots", + "SalamanderBanner": "Salamander Banner", + "SandElementalBanner": "Sand Elemental Banner", + "SandFallBlock": "Sandfall Block", + "SandFallWall": "Sandfall Wall", + "SandsharkBanner": "Sand Shark Banner", + "SandsharkCorruptBanner": "Bone Biter Banner", + "SandsharkCrimsonBanner": "Flesh Reaver Banner", + "SandsharkHallowedBanner": "Crystal Thresher Banner", + "SandSlimeBanner": "Sand Slime Banner", + "Sandstone": "Sandstone Block", + "SandstoneWall": "Sandstone Wall", + "SapphireGemsparkWall": "Sapphire Gemspark Wall", + "SapphireGemsparkWallOff": "Offline Sapphire Gemspark Wall", + "ScalyTruffle": "Scaly Truffle", + "ScorpionStatue": "Scorpion Statue", + "Seashell": "Seashell", + "SeaSnailBanner": "Sea Snail Banner", + "Seedler": "Seedler", + "SeveredHandBanner": "Severed Hand Banner", + "Sextant": "Sextant", + "ShadewoodBathtub": "Shadewood Bathtub", + "ShadewoodBookcase": "Shadewood Bookcase", + "ShadewoodCandelabra": "Shadewood Candelabra", + "ShadewoodCandle": "Shadewood Candle", + "ShadewoodChandelier": "Shadewood Chandelier", + "ShadewoodClock": "Shadewood Clock", + "ShadewoodLamp": "Shadewood Lamp", + "ShadewoodLantern": "Shadewood Lantern", + "ShadewoodSink": "Shadewood Sink", + "ShadowDye": "Shadow Dye", + "ShadowFlameBow": "Shadowflame Bow", + "ShadowflameHadesDye": "Shadowflame Hades Dye", + "ShadowFlameHexDoll": "Shadowflame Hex Doll", + "ShadowFlameKnife": "Shadowflame Knife", + "SharkronBalloon": "Sharkron Balloon", + "SharkStatue": "Shark Statue", + "SharkteethTrophy": "Sharkteeth Trophy", + "SharkToothNecklace": "Shark Tooth Necklace", + "SharpeningStation": "Sharpening Station", + "ShiftingPearlSandsDye": "Shifting Pearlsands Dye", + "ShiftingSandsDye": "Shifting Sands Dye", + "ShinyStone": "Shiny Stone", + "ShipsWheel": "Ship's Wheel", + "ShiverthornPlanterBox": "Shiverthorn Planter Box", + "ShrimpyTruffle": "Shrimpy Truffle", + "ShroomitePlating": "Shroomite Plating", + "ShroomitePlatingWall": "Shroomite Plating Wall", + "SilkRope": "Silk Rope", + "SilkRopeCoil": "Silk Rope Coil", + "SillyBalloonGreen": "Silly Green Balloon", + "SillyBalloonGreenWall": "Silly Green Balloon Wall", + "SillyBalloonMachine": "Silly Balloon Machine", + "SillyBalloonPink": "Silly Pink Balloon", + "SillyBalloonPinkWall": "Silly Pink Balloon Wall", + "SillyBalloonPurple": "Silly Purple Balloon", + "SillyBalloonPurpleWall": "Silly Purple Balloon Wall", + "SillyBalloonTiedGreen": "Silly Tied Balloon (Green)", + "SillyBalloonTiedPink": "Silly Tied Balloon (Pink)", + "SillyBalloonTiedPurple": "Silly Tied Balloon (Purple)", + "SillyStreamerBlue": "Blue Streamer", + "SillyStreamerGreen": "Green Streamer", + "SillyStreamerPink": "Pink Streamer", + "SilverAndBlackDye": "Silver and Black Dye", + "SkeletronBossBag": "Treasure Bag", + "SkeletronPrimeBossBag": "Treasure Bag", + "SkeletronPrimeMask": "Skeletron Prime Mask", + "SkiphsHelm": "Skiphs' Mask", + "SkiphsPants": "Skiphs' Bear Butt", + "SkiphsShirt": "Skiphs' Skin", + "SkiphsWings": "Skiphs' Paws", + "SkyBlueString": "Sky Blue String", + "SkyFracture": "Sky Fracture", + "SkywareBathtub": "Skyware Bathtub", + "SkywareBed": "Skyware Bed", + "SkywareBookcase": "Skyware Bookcase", + "SkywareCandelabra": "Skyware Candelabra", + "SkywareCandle": "Skyware Candle", + "SkywareChandelier": "Skyware Chandelier", + "SkywareClock": "Skyware Clock", + "SkywareLamp": "Skyware Lamp", + "SkywareLantern": "Skyware Lantern", + "SkywarePlatform": "Skyware Platform", + "SkywareSink": "Skyware Sink", + "SkywareWorkbench": "Skyware Work Bench", + "SlapHand": "Slap Hand", + "SliceOfCake": "Slice of Cake", + "SlimeBathtub": "Slime Bathtub", + "SlimeBed": "Slime Bed", + "SlimeBookcase": "Slime Bookcase", + "SlimeCandelabra": "Slime Candelabra", + "SlimeCandle": "Slime Candle", + "SlimeChair": "Slime Chair", + "SlimeChandelier": "Slime Chandelier", + "SlimeChest": "Slime Chest", + "SlimeClock": "Slime Clock", + "SlimeDoor": "Slime Door", + "SlimeDresser": "Slime Dresser", + "SlimeGun": "Slime Gun", + "SlimeHook": "Slime Hook", + "SlimeLamp": "Slime Lamp", + "SlimeLantern": "Slime Lantern", + "SlimePiano": "Slime Piano", + "SlimePlatform": "Slime Platform", + "SlimeSink": "Slime Sink", + "SlimeSofa": "Slime Sofa", + "SlimeTable": "Slime Table", + "SlimySaddle": "Slimy Saddle", + "Sluggy": "Sluggy", + "SmokeBlock": "Smoke Block", + "SnailStatue": "Snail Statue", + "SnowCloudBlock": "Snow Cloud", + "SnowFallBlock": "Snowfall Block", + "SnowFallWall": "Snowfall Wall", + "SolarCoriteBanner": "Corite Banner", + "SolarCrawltipedeBanner": "Crawltipede Banner", + "SolarDrakomireBanner": "Drakomire Banner", + "SolarDrakomireRiderBanner": "Drakomire Rider Banner", + "SolarDye": "Solar Dye", + "SolarEruption": "Solar Eruption", + "SolarFlareAxe": "Solar Flare Axe", + "SolarFlareBreastplate": "Solar Flare Breastplate", + "SolarFlareChainsaw": "Solar Flare Chainsaw", + "SolarFlareDrill": "Solar Flare Drill", + "SolarFlareHammer": "Solar Flare Hammer", + "SolarFlareHelmet": "Solar Flare Helmet", + "SolarFlareLeggings": "Solar Flare Leggings", + "SolarFlarePickaxe": "Solar Flare Pickaxe", + "SolarMonolith": "Solar Monolith", + "SolarSolenianBanner": "Selenian Banner", + "SolarSrollerBanner": "Sroller Banner", + "SolarTablet": "Solar Tablet", + "SoulDrain": "Life Drain", + "SparkyPainting": "Sparky", + "SpectreBar": "Spectre Bar", + "SpelunkerGlowstick": "Spelunker Glowstick", + "SpiderFang": "Spider Fang", + "SpiderStaff": "Spider Staff", + "SpiritFlame": "Spirit Flame", + "SpookyBathtub": "Spooky Bathtub", + "SpookyBed": "Spooky Bed", + "SpookyBookcase": "Spooky Bookcase", + "SpookyCandelabra": "Spooky Candelabra", + "SpookyCandle": "Spooky Candle", + "SpookyChandelier": "Spooky Chandelier", + "SpookyChest": "Spooky Chest", + "SpookyClock": "Spooky Clock", + "SpookyLamp": "Spooky Lamp", + "SpookyLantern": "Spooky Lantern", + "SpookySink": "Spooky Sink", + "SporeSac": "Spore Sac", + "SquireGreatHelm": "Squire's Great Helm", + "SquireGreaves": "Squire's Greaves", + "SquirePlating": "Squire's Plating", + "SquireShield": "Squire's Shield", + "SquirrelGold": "Gold Squirrel", + "SquirrelGoldCage": "Gold Squirrel Cage", + "SquirrelOrangeCage": "Red Squirrel Cage", + "SquirrelRed": "Red Squirrel", + "SquirrelStatue": "Squirrel Statue", + "StardustAxe": "Stardust Axe", + "StardustBreastplate": "Stardust Plate", + "StardustCellStaff": "Stardust Cell Staff", + "StardustChainsaw": "Stardust Chainsaw", + "StardustDragonStaff": "Stardust Dragon Staff", + "StardustDrill": "Stardust Drill", + "StardustDye": "Stardust Dye", + "StardustHammer": "Stardust Hammer", + "StardustHelmet": "Stardust Helmet", + "StardustJellyfishBanner": "Flow Invader Banner", + "StardustLargeCellBanner": "Star Cell Banner", + "StardustLeggings": "Stardust Leggings", + "StardustMonolith": "Stardust Monolith", + "StardustPickaxe": "Stardust Pickaxe", + "StardustSmallCellBanner": "Small Star Cell Banner", + "StardustSoldierBanner": "Stargazer Banner", + "StardustSpiderBanner": "Twinkle Popper Banner", + "StardustWormBanner": "Milkyway Weaver Banner", + "Starfish": "Starfish", + "StarWrath": "Star Wrath", + "StaticHook": "Static Hook", + "SteampunkBathtub": "Steampunk Bathtub", + "SteampunkBookcase": "Steampunk Bookcase", + "SteampunkCandelabra": "Steampunk Candelabra", + "SteampunkCandle": "Steampunk Candle", + "SteampunkChandelier": "Steampunk Chandelier", + "SteampunkChest": "Steampunk Chest", + "SteampunkClock": "Steampunk Clock", + "SteampunkCup": "Chalice", + "SteampunkDresser": "Steampunk Dresser", + "SteampunkLamp": "Steampunk Lamp", + "SteampunkLantern": "Steampunk Lantern", + "SteampunkPiano": "Steampunk Piano", + "SteampunkPlatform": "Steampunk Platform", + "SteampunkSink": "Steampunk Sink", + "SteampunkWorkBench": "Steampunk Work Bench", + "StickyDynamite": "Sticky Dynamite", + "StickyGrenade": "Sticky Grenade", + "Stopwatch": "Stopwatch", + "StrangeBrew": "Strange Brew", + "StrangePlant1": "Strange Plant", + "StrangePlant2": "Strange Plant", + "StrangePlant3": "Strange Plant", + "StrangePlant4": "Strange Plant", + "StylistKilLaKillScissorsIWish": "Stylish Scissors", + "SummonerEmblem": "Summoner Emblem", + "Sundial": "Enchanted Sundial", + "SunMask": "Sun Mask", + "SuperAbsorbantSponge": "Super Absorbant Sponge", + "SuperHealingPotion": "Super Healing Potion", + "SuspiciousLookingTentacle": "Suspicious Looking Tentacle", + "SwordfishTrophy": "Swordfish Trophy", + "TallGate": "Tall Gate", + "TallyCounter": "Tally Counter", + "TargetDummy": "Target Dummy", + "TartarSauce": "Tartar Sauce", + "TaxCollectorHat": "Tax Collector's Hat", + "TaxCollectorPants": "Tax Collector's Pants", + "TaxCollectorsStickOfDoom": "Classy Cane", + "TaxCollectorSuit": "Tax Collector's Suit", + "TealString": "Teal String", + "TeamBlockBlue": "Blue Team Block", + "TeamBlockBluePlatform": "Blue Team Platform", + "TeamBlockGreen": "Green Team Block", + "TeamBlockGreenPlatform": "Green Team Platform", + "TeamBlockPink": "Pink Team Block", + "TeamBlockPinkPlatform": "Pink Team Platform", + "TeamBlockRed": "Red Team Block", + "TeamBlockRedPlatform": "Red Team Platform", + "TeamBlockWhite": "White Team Block", + "TeamBlockWhitePlatform": "White Team Platform", + "TeamBlockYellow": "Yellow Team Block", + "TeamBlockYellowPlatform": "Yellow Team Platform", + "TempestStaff": "Tempest Staff", + "TendonHook": "Tendon Hook", + "Terrarian": "Terrarian", + "TheBrideDress": "Wedding Dress", + "TheBrideHat": "Wedding Veil", + "TheEyeOfCthulhu": "The Eye of Cthulhu", + "ThePossessedBanner": "The Possessed Banner", + "ThornHook": "Thorn Hook", + "TinPlating": "Tin Plating", + "TinPlatingWall": "Tin Plating Wall", + "TombCrawlerBanner": "Tomb Crawler Banner", + "TopazGemsparkWall": "Topaz Gemspark Wall", + "TopazGemsparkWallOff": "Offline Topaz Gemspark Wall", + "ToxicFlask": "Toxic Flask", + "Toxikarp": "Toxikarp", + "Trapdoor": "Trap Door", + "TruffleWorm": "Truffle Worm", + "Tsunami": "Tsunami", + "TsunamiInABottle": "Tsunami in a Bottle", + "TumbleweedBanner": "Angry Tumbler Banner", + "TwilightDye": "Twilight Dye", + "TwilightHairDye": "Twilight Hair Dye", + "TwinMask": "Twin Mask", + "TwinsBossBag": "Treasure Bag", + "UltraBrightCampfire": "Ultrabright Campfire", + "UndeadVikingStatue": "Undead Viking Statue", + "UnicornStatue": "Unicorn Statue", + "UnicornWispDye": "Unicorn Wisp Dye", + "ValkyrieYoyo": "Valkyrie Yoyo", + "Valor": "Valor", + "ViciousMushroom": "Vicious Mushroom", + "ViciousPowder": "Vicious Powder", + "VineRope": "Vine Rope", + "VineRopeCoil": "Vine Rope Coil", + "VioletString": "Violet String", + "VoidDye": "Void Dye", + "VortexAxe": "Vortex Axe", + "VortexBeater": "Vortex Beater", + "VortexBreastplate": "Vortex Breastplate", + "VortexChainsaw": "Vortex Chainsaw", + "VortexDrill": "Vortex Drill", + "VortexDye": "Vortex Dye", + "VortexHammer": "Vortex Hammer", + "VortexHelmet": "Vortex Helmet", + "VortexHornetBanner": "Alien Hornet Banner", + "VortexHornetQueenBanner": "Alien Queen Banner", + "VortexLarvaBanner": "Alien Larva Banner", + "VortexLeggings": "Vortex Leggings", + "VortexMonolith": "Vortex Monolith", + "VortexPickaxe": "Vortex Pickaxe", + "VortexRiflemanBanner": "Storm Diver Banner", + "VortexSoldierBanner": "Vortexian Banner", + "WalkingAntlionBanner": "Antlion Charger Banner", + "WallAnchor": "Wall Anchor", + "WallCreeperStatue": "Wall Creeper Statue", + "WallOfFleshBossBag": "Treasure Bag", + "WandofSparking": "Wand of Sparking", + "WarTable": "War Table", + "WarTableBanner": "War Table Banner", + "WaterfallBlock": "Waterfall Block", + "WaterleafPlanterBox": "Waterleaf Planter Box", + "WeaponRack": "Weapon Rack", + "WeatherRadio": "Weather Radio", + "WebRope": "Web Rope", + "WebRopeCoil": "Web Rope Coil", + "WeightedPressurePlateCyan": "Cyan Weighted Pressure Plate", + "WeightedPressurePlateOrange": "Orange Weighted Pressure Plate", + "WeightedPressurePlatePink": "Pink Weighted Pressure Plate", + "WeightedPressurePlatePurple": "Purple Weighted Pressure Plate", + "WhiteLunaticHood": "Solar Cultist Hood", + "WhiteLunaticRobe": "Solar Cultist Robe", + "WhitePhasesaber": "White Phasesaber", + "WhiteString": "White String", + "WineGlass": "Wine Glass", + "WingsNebula": "Nebula Mantle", + "WingsSolar": "Solar Wings", + "WingsStardust": "Stardust Wings", + "WingsVortex": "Vortex Booster", + "WireBulb": "Wire Bulb", + "WireKite": "The Grand Design", + "WirePipe": "Junction Box", + "WispDye": "Wisp Dye", + "WoodenSink": "Wooden Sink", + "WoodYoyo": "Wooden Yoyo", + "WormholePotion": "Wormhole Potion", + "WormHook": "Worm Hook", + "WormScarf": "Worm Scarf", + "WormStatue": "Worm Statue", + "WraithStatue": "Wraith Statue", + "Xenopopper": "Xenopopper", + "XenoStaff": "Xeno Staff", + "Yelets": "Yelets", + "YellowCounterweight": "Yellow Counterweight", + "YellowPhasesaber": "Yellow Phasesaber", + "YellowString": "Yellow String", + "YellowWrench": "Yellow Wrench", + "Yoraiz0rDarkness": "Yoraiz0r's Scowl", + "Yoraiz0rHead": "Yoraiz0r's Recolored Goggles", + "Yoraiz0rPants": "Yoraiz0r's Skirt", + "Yoraiz0rShirt": "Yoraiz0r's Uniform", + "Yoraiz0rWings": "Yoraiz0r's Spell", + "YoyoBag": "Yoyo Bag", + "YoYoGlove": "Yoyo Glove", + "ZombieArmStatue": "Armed Zombie Statue", + "DD2FlameburstTowerT1Popper": "Flameburst Rod", + "DD2FlameburstTowerT2Popper": "Flameburst Cane", + "DD2FlameburstTowerT3Popper": "Flameburst Staff", + "AleThrowingGlove": "Ale Tosser", + "DD2EnergyCrystal": "Etherian Mana", + "DD2SquireDemonSword": "Brand of the Inferno", + "DD2BallistraTowerT1Popper": "Ballista Rod", + "DD2BallistraTowerT2Popper": "Ballista Cane", + "DD2BallistraTowerT3Popper": "Ballista Staff", + "DD2SquireBetsySword": "Flying Dragon", + "DD2ElderCrystal": "Eternia Crystal", + "DD2LightningAuraT1Popper": "Lightning Aura Rod", + "DD2LightningAuraT2Popper": "Lightning Aura Cane", + "DD2LightningAuraT3Popper": "Lightning Aura Staff", + "DD2ExplosiveTrapT1Popper": "Explosive Trap Rod", + "DD2ExplosiveTrapT2Popper": "Explosive Trap Cane", + "DD2ExplosiveTrapT3Popper": "Explosive Trap Staff", + "MonkStaffT1": "Sleepy Octopod", + "MonkStaffT2": "Ghastly Glaive", + "DD2GoblinBomberBanner": "Etherian Goblin Bomber Banner", + "DD2GoblinBanner": "Etherian Goblin Banner", + "DD2SkeletonBanner": "Old One's Skeleton Banner", + "DD2DrakinBanner": "Drakin Banner", + "DD2KoboldFlyerBanner": "Kobold Glider Banner", + "DD2KoboldBanner": "Kobold Banner", + "DD2WitherBeastBanner": "Wither Beast Banner", + "DD2WyvernBanner": "Etherian Wyvern Banner", + "DD2JavelinThrowerBanner": "Etherian Javelin Thrower Banner", + "DD2LightningBugBanner": "Etherian Lightning Bug Banner", + "DD2PetGato": "Gato Egg", + "DD2PetGhost": "Creeper Egg", + "DD2PetDragon": "Dragon Egg", + "BookStaff": "Tome of Infinite Wisdom", + "DD2PhoenixBow": "Phantom Phoenix", + "MonkStaffT3": "Sky Dragon's Fury", + "DD2BetsyBow": "Aerial Bane", + "BossMaskBetsy": "Betsy Mask", + "BossMaskOgre": "Ogre Mask", + "BossMaskDarkMage": "Dark Mage Mask", + "BossTrophyBetsy": "Betsy Trophy", + "BossTrophyDarkmage": "Dark Mage Trophy", + "BossTrophyOgre": "Ogre Trophy", + "ApprenticeStaffT3": "Betsy's Wrath", + "SquireAltHead": "Valhalla Knight's Helm", + "SquireAltShirt": "Valhalla Knight's Breastplate", + "SquireAltPants": "Valhalla Knight's Greaves", + "ApprenticeAltHead": "Dark Artist's Hat", + "ApprenticeAltShirt": "Dark Artist's Robes", + "ApprenticeAltPants": "Dark Artist's Leggings", + "HuntressAltHead": "Red Riding Hood", + "HuntressAltShirt": "Red Riding Dress", + "HuntressAltPants": "Red Riding Leggings", + "MonkAltHead": "Shinobi Infiltrator's Helmet", + "MonkAltShirt": "Shinobi Infiltrator's Torso", + "MonkAltPants": "Shinobi Infiltrator's Pants", + "DD2ElderCrystalStand": "Eternia Crystal Stand", + "BetsyWings": "Betsy's Wings", + "CrystalChest": "Crystal Chest", + "GoldenChest": "Golden Chest", + "Fake_CrystalChest": "Trapped Crystal Chest", + "Fake_GoldenChest": "Trapped Golden Chest", + "CrystalDoor": "Crystal Door", + "CrystalChair": "Crystal Chair", + "CrystalCandle": "Crystal Candle", + "CrystalLantern": "Crystal Lantern", + "CrystalLamp": "Crystal Lamp", + "CrystalCandelabra": "Crystal Candelabra", + "CrystalChandelier": "Crystal Chandelier", + "CrystalBathtub": "Crystal Bathtub", + "CrystalSink": "Crystal Sink", + "CrystalBed": "Crystal Bed", + "CrystalClock": "Crystal Clock", + "SkywareClock2": "Sunplate Clock", + "DungeonClockBlue": "Blue Dungeon Clock", + "DungeonClockGreen": "Green Dungeon Clock", + "DungeonClockPink": "Pink Dungeon Clock", + "CrystalPlatform": "Crystal Platform", + "GoldenPlatform": "Golden Platform", + "DynastyPlatform": "Dynasty Wood Platform", + "LihzahrdPlatform": "Lihzahrd Platform", + "FleshPlatform": "Flesh Platform", + "FrozenPlatform": "Frozen Platform", + "CrystalWorkbench": "Crystal Work Bench", + "GoldenWorkbench": "Golden Work Bench", + "CrystalDresser": "Crystal Dresser", + "DynastyDresser": "Dynasty Dresser", + "FrozenDresser": "Frozen Dresser", + "LivingWoodDresser": "Living Wood Dresser", + "CrystalPiano": "Crystal Piano", + "DynastyPiano": "Dynasty Piano", + "CrystalBookCase": "Crystal Bookcase", + "CrystalSofaHowDoesThatEvenWork": "Crystal Sofa", + "DynastySofa": "Dynasty Sofa", + "CrystalTable": "Crystal Table", + "ArkhalisHat": "Arkhalis' Hood", + "ArkhalisShirt": "Arkhalis' Bodice", + "ArkhalisPants": "Arkhalis' Tights", + "ArkhalisWings": "Arkhalis' Lightwings", + "LeinforsHat": "Leinfors' Hair Protector", + "LeinforsShirt": "Leinfors' Excessive Style", + "LeinforsPants": "Leinfors' Fancypants", + "LeinforsWings": "Leinfors' Prehensile Cloak", + "LeinforsAccessory": "Leinfors' Luxury Shampoo", + "MusicBoxDD2": "Music Box (Old One's Army)", + "BossBagBetsy": "{$ItemName.SkeletronBossBag}", + "Celeb2": "Celebration Mk2", + "SpiderBathtub": "Spider Bathtub", + "SpiderBed": "Spider Bed", + "SpiderBookcase": "Spider Bookcase", + "SpiderDresser": "Spider Dresser", + "SpiderCandelabra": "Spider Candelabra", + "SpiderCandle": "Spider Candle", + "SpiderChair": "Spider Chair", + "SpiderChandelier": "Spider Chandelier", + "SpiderChest": "Spider Chest", + "SpiderClock": "Spider Clock", + "SpiderDoor": "Spider Door", + "SpiderLamp": "Spider Lamp", + "SpiderLantern": "Spider Lantern", + "SpiderPiano": "Spider Piano", + "SpiderPlatform": "Spider Platform", + "SpiderSinkSpiderSinkDoesWhateverASpiderSinkDoes": "Spider Sink", + "SpiderSofa": "Spider Sofa", + "SpiderTable": "Spider Table", + "SpiderWorkbench": "Spider Work Bench", + "Fake_SpiderChest": "Trapped Spider Chest", + "IronBrick": "Iron Brick", + "IronBrickWall": "Iron Brick Wall", + "LeadBrick": "Lead Brick", + "LeadBrickWall": "Lead Brick Wall", + "LesionBlock": "Lesion Block", + "LesionBlockWall": "Lesion Block Wall", + "LesionPlatform": "Lesion Platform", + "LesionBathtub": "Lesion Bathtub", + "LesionBed": "Lesion Bed", + "LesionBookcase": "Lesion Bookcase", + "LesionCandelabra": "Lesion Candelabra", + "LesionCandle": "Lesion Candle", + "LesionChair": "Lesion Chair", + "LesionChandelier": "Lesion Chandelier", + "LesionChest": "Lesion Chest", + "LesionClock": "Lesion Clock", + "LesionDoor": "Lesion Door", + "LesionDresser": "Lesion Dresser", + "LesionLamp": "Lesion Lamp", + "LesionLantern": "Lesion Lantern", + "LesionPiano": "Lesion Piano", + "LesionSink": "Lesion Sink", + "LesionSofa": "Lesion Sofa", + "LesionTable": "Lesion Table", + "LesionWorkbench": "Lesion Work Bench", + "Fake_LesionChest": "Trapped Lesion Chest", + "HatRack": "Hat Rack", + "WoodenCrateHard": "Pearlwood Crate", + "IronCrateHard": "Mythril Crate", + "GoldenCrateHard": "Titanium Crate", + "CorruptFishingCrateHard": "Defiled Crate", + "CrimsonFishingCrateHard": "Hematic Crate", + "DungeonFishingCrateHard": "Stockade Crate", + "FloatingIslandFishingCrateHard": "Azure Crate", + "HallowedFishingCrateHard": "Divine Crate", + "JungleFishingCrateHard": "Bramble Crate", + "DeadMansChest": "Dead Man's Chest", + "AmphibianBoots": "Amphibian Boots", + "ArcaneFlower": "Arcane Flower", + "BerserkerGlove": "Berserker's Glove", + "FairyBoots": "Fairy Boots", + "FrogFlipper": "Frog Flipper", + "FrogGear": "Frog Gear", + "FrogWebbing": "Frog Webbing", + "FrozenShield": "Frozen Shield", + "HeroShield": "Hero Shield", + "LavaSkull": "Magma Skull", + "MagnetFlower": "Magnet Flower", + "ManaCloak": "Mana Cloak", + "MoltenQuiver": "Molten Quiver", + "MoltenSkullRose": "Molten Skull Rose", + "ObsidianSkullRose": "Obsidian Skull Rose", + "ReconScope": "Recon Scope", + "StalkersQuiver": "Stalker's Quiver", + "StingerNecklace": "Stinger Necklace", + "UltrabrightHelmet": "Ultrabright Helmet", + "Apple": "Apple", + "ApplePieSlice": "Apple Pie Slice", + "ApplePie": "Apple Pie", + "BananaSplit": "Banana Split", + "BBQRibs": "BBQ Ribs", + "BunnyStew": "Bunny Stew", + "Burger": "Burger", + "ChickenNugget": "Chicken Nugget", + "ChocolateChipCookie": "Chocolate Chip Cookie", + "CreamSoda": "Cream Soda", + "Escargot": "Escargot", + "FriedEgg": "Fried Egg", + "Fries": "Fries", + "GoldenDelight": "Golden Delight", + "Grapes": "Grapes", + "GrilledSquirrel": "Grilled Squirrel", + "Hotdog": "Hotdog", + "IceCream": "Ice Cream", + "Milkshake": "Milkshake", + "Nachos": "Nachos", + "Pizza": "Pizza", + "PotatoChips": "Potato Chips", + "RoastedBird": "Roasted Bird", + "RoastedDuck": "Roasted Duck", + "SauteedFrogLegs": "Sauteed Frog Legs", + "SeafoodDinner": "Seafood Dinner", + "ShrimpPoBoy": "Shrimp Po' Boy", + "Spaghetti": "Spaghetti", + "Steak": "Steak", + "MoltenCharm": "Molten Charm", + "GolfCup": "Golf Cup", + "FlowerPacketBlue": "Blue Flower Seeds", + "FlowerPacketMagenta": "Magenta Flower Seeds", + "FlowerPacketPink": "Pink Flower Seeds", + "FlowerPacketRed": "Red Flower Seeds", + "FlowerPacketYellow": "Yellow Flower Seeds", + "FlowerPacketViolet": "Violet Flower Seeds", + "FlowerPacketWhite": "White Flower Seeds", + "FlowerPacketTallGrass": "Tall Grass Seeds", + "SandBoots": "Dunerider Boots", + "AncientChisel": "Ancient Chisel", + "CarbonGuitar": "Rain Song", + "SkeletonBow": "Skull Bow", + "FossilPickaxe": "Fossil Pickaxe", + "SuperStarCannon": "Super Star Shooter", + "ThunderSpear": "Storm Spear", + "ThunderStaff": "Thunder Zapper", + "DrumSet": "Drum Set", + "PicnicTable": "Picnic Table", + "PicnicTableWithCloth": "Fancy Picnic Table", + "DesertMinecart": "Desert Minecart", + "FishMinecart": "Minecarp", + "GolfClubIron": "Golf Club (Iron)", + "GolfClubPutter": "Golf Club (Putter)", + "GolfClubWedge": "Golf Club (Wedge)", + "GolfClubDriver": "Golf Club (Driver)", + "GolfWhistle": "Golf Whistle", + "GolfTee": "Golf Tee", + "FairyCritterPink": "Pink Fairy", + "FairyCritterGreen": "Green Fairy", + "FairyCritterBlue": "Blue Fairy", + "JunoniaShell": "Junonia Shell", + "LightningWhelkShell": "Lightning Whelk Shell", + "TulipShell": "Tulip Shell", + "PinWheel": "Pin Wheel", + "WeatherVane": "Weather Vane", + "VoidVault": "Void Vault", + "MusicBoxOceanAlt": "Music Box (Ocean Night)", + "MusicBoxSlimeRain": "Music Box (Slime Rain)", + "MusicBoxSpaceAlt": "Music Box (Space Day)", + "MusicBoxTownDay": "Music Box (Town Day)", + "MusicBoxTownNight": "Music Box (Town Night)", + "MusicBoxWindyDay": "Music Box (Windy Day)", + "GolfCupFlagWhite": "White Pin Flag", + "GolfCupFlagRed": "Red Pin Flag", + "GolfCupFlagGreen": "Green Pin Flag", + "GolfCupFlagBlue": "Blue Pin Flag", + "GolfCupFlagYellow": "Yellow Pin Flag", + "GolfCupFlagPurple": "Purple Pin Flag", + "ShellPileBlock": "Shell Pile", + "AntiPortalBlock": "Anti-Portal Block", + "LawnMower": "Lawn Mower", + "GolfBall": "Golf Ball", + + "ToiletEbonyWood": "Ebonwood Toilet", + "ToiletRichMahogany": "Rich Mahogany Toilet", + "ToiletPearlwood": "Pearlwood Toilet", + "ToiletLivingWood": "Living Wood Toilet", + "ToiletCactus": "Cactus Toilet", + "ToiletBone": "Bone Toilet", + "ToiletFlesh": "Flesh Toilet", + "ToiletMushroom": "Mushroom Toilet", + "ToiletSunplate": "Skyware Toilet", + "ToiletShadewood": "Shadewood Toilet", + "ToiletLihzhard": "Lihzahrd Toilet", + "ToiletDungeonBlue": "Blue Dungeon Toilet", + "ToiletDungeonGreen": "Green Dungeon Toilet", + "ToiletDungeonPink": "Pink Dungeon Toilet", + "ToiletObsidian": "Obsidian Toilet", + "ToiletFrozen": "Frozen Toilet", + "ToiletGlass": "Glass Toilet", + "ToiletHoney": "Honey Toilet", + "ToiletSteampunk": "Steampunk Toilet", + "ToiletPumpkin": "Pumpkin Toilet", + "ToiletSpooky": "Spooky Toilet", + "ToiletDynasty": "Dynasty Toilet", + "ToiletPalm": "Palm Wood Toilet", + "ToiletBoreal": "Boreal Wood Toilet", + "ToiletSlime": "Slime Toilet", + "ToiletMartian": "Martian Toilet", + "ToiletGranite": "Granite Toilet", + "ToiletMarble": "Marble Toilet", + "ToiletCrystal": "Crystal Toilet", + "ToiletSpider": "Spider Toilet", + "ToiletLesion": "Lesion Toilet", + "ToiletDiamond": "Diamond Toilet", + "MaidHead": "Maid Bonnet", + "MaidShirt": "Maid Dress", + "MaidPants": "Maid Shoes", + "VoidLens": "Void Bag", + "MaidHead2": "Pink Maid Bonnet", + "MaidShirt2": "Pink Maid Dress", + "MaidPants2": "Pink Maid Shoes", + "GolfHat": "Country Club Cap", + "GolfShirt": "Country Club Vest", + "GolfPants": "Country Club Trousers", + "GolfVisor": "Country Club Visor", + "SpiderBlock": "Spider Nest Block", + "SpiderWall": "Spider Nest Wall", + "ToiletMeteor": "Meteor Toilet", + "LesionStation": "Decay Chamber", + "ManaCloakStar": "", + "SolarBathtub": "Solar Bathtub", + "SolarBed": "Solar Bed", + "SolarBookcase": "Solar Bookcase", + "SolarDresser": "Solar Dresser", + "SolarCandelabra": "Solar Candelabra", + "SolarCandle": "Solar Candle", + "SolarChair": "Solar Chair", + "SolarChandelier": "Solar Chandelier", + "SolarChest": "Solar Chest", + "SolarClock": "Solar Clock", + "SolarDoor": "Solar Door", + "SolarLamp": "Solar Lamp", + "SolarLantern": "Solar Lantern", + "SolarPiano": "Solar Piano", + "SolarPlatform": "Solar Platform", + "SolarSink": "Solar Sink", + "SolarSofa": "Solar Sofa", + "SolarTable": "Solar Table", + "SolarWorkbench": "Solar Work Bench", + "Fake_SolarChest": "Trapped Solar Chest", + "SolarToilet": "Solar Toilet", + "VortexBathtub": "Vortex Bathtub", + "VortexBed": "Vortex Bed", + "VortexBookcase": "Vortex Bookcase", + "VortexDresser": "Vortex Dresser", + "VortexCandelabra": "Vortex Candelabra", + "VortexCandle": "Vortex Candle", + "VortexChair": "Vortex Chair", + "VortexChandelier": "Vortex Chandelier", + "VortexChest": "Vortex Chest", + "VortexClock": "Vortex Clock", + "VortexDoor": "Vortex Door", + "VortexLamp": "Vortex Lamp", + "VortexLantern": "Vortex Lantern", + "VortexPiano": "Vortex Piano", + "VortexPlatform": "Vortex Platform", + "VortexSink": "Vortex Sink", + "VortexSofa": "Vortex Sofa", + "VortexTable": "Vortex Table", + "VortexWorkbench": "Vortex Work Bench", + "Fake_VortexChest": "Trapped Vortex Chest", + "VortexToilet": "Vortex Toilet", + "NebulaBathtub": "Nebula Bathtub", + "NebulaBed": "Nebula Bed", + "NebulaBookcase": "Nebula Bookcase", + "NebulaDresser": "Nebula Dresser", + "NebulaCandelabra": "Nebula Candelabra", + "NebulaCandle": "Nebula Candle", + "NebulaChair": "Nebula Chair", + "NebulaChandelier": "Nebula Chandelier", + "NebulaChest": "Nebula Chest", + "NebulaClock": "Nebula Clock", + "NebulaDoor": "Nebula Door", + "NebulaLamp": "Nebula Lamp", + "NebulaLantern": "Nebula Lantern", + "NebulaPiano": "Nebula Piano", + "NebulaPlatform": "Nebula Platform", + "NebulaSink": "Nebula Sink", + "NebulaSofa": "Nebula Sofa", + "NebulaTable": "Nebula Table", + "NebulaWorkbench": "Nebula Work Bench", + "Fake_NebulaChest": "Trapped Nebula Chest", + "NebulaToilet": "Nebula Toilet", + "StardustBathtub": "Stardust Bathtub", + "StardustBed": "Stardust Bed", + "StardustBookcase": "Stardust Bookcase", + "StardustDresser": "Stardust Dresser", + "StardustCandelabra": "Stardust Candelabra", + "StardustCandle": "Stardust Candle", + "StardustChair": "Stardust Chair", + "StardustChandelier": "Stardust Chandelier", + "StardustChest": "Stardust Chest", + "StardustClock": "Stardust Clock", + "StardustDoor": "Stardust Door", + "StardustLamp": "Stardust Lamp", + "StardustLantern": "Stardust Lantern", + "StardustPiano": "Stardust Piano", + "StardustPlatform": "Stardust Platform", + "StardustSink": "Stardust Sink", + "StardustSofa": "Stardust Sofa", + "StardustTable": "Stardust Table", + "StardustWorkbench": "Stardust Work Bench", + "Fake_StardustChest": "Trapped Stardust Chest", + "StardustToilet": "Stardust Toilet", + "SolarBrick": "Solar Brick", + "SolarBrickWall": "Solar Brick Wall", + "VortexBrick": "Vortex Brick", + "VortexBrickWall": "Vortex Brick Wall", + "NebulaBrick": "Nebula Brick", + "NebulaBrickWall": "Nebula Brick Wall", + "StardustBrick": "Stardust Brick", + "StardustBrickWall": "Stardust Brick Wall", + + "CrackedBlueBrick": "Cracked Blue Brick", + "CrackedGreenBrick": "Cracked Green Brick", + "CrackedPinkBrick": "Cracked Pink Brick", + "FlowerPacketWild": "Wild Flower Seeds", + + "MusicBoxDayRemix": "Music Box (Day Remix)", + "GolfBallDyedBlack": "Black Golf Ball", + "GolfBallDyedBlue": "Blue Golf Ball", + "GolfBallDyedBrown": "Brown Golf Ball", + "GolfBallDyedCyan": "Cyan Golf Ball", + "GolfBallDyedGreen": "Green Golf Ball", + "GolfBallDyedLimeGreen": "Lime Golf Ball", + "GolfBallDyedOrange": "Orange Golf Ball", + "GolfBallDyedPink": "Pink Golf Ball", + "GolfBallDyedPurple": "Purple Golf Ball", + "GolfBallDyedRed": "Red Golf Ball", + "GolfBallDyedSkyBlue": "Sky Blue Golf Ball", + "GolfBallDyedTeal": "Teal Golf Ball", + "GolfBallDyedViolet": "Violet Golf Ball", + "GolfBallDyedYellow": "Yellow Golf Ball", + + "AmberHook": "Amber Hook", + "OrangePhaseblade": "Orange Phaseblade", + "OrangePhasesaber": "Orange Phasesaber", + "AmberRobe": "Amber Robe", + "OrangeStainedGlass": "Orange Stained Glass", + "OrangePressurePlate": "Orange Pressure Plate", + + "MysticCoilSnake": "Snake Charmer's Flute", + "MagicConch": "Magic Conch", + "GolfCart": "Golf Cart Keys", + + "GolfChest": "Golf Chest", + "Fake_GolfChest": "Trapped Golf Chest", + "DesertChest": "Sandstone Chest", + "Fake_DesertChest": "Trapped Sandstone Chest", + "SharpTears": "Blood Thorn", + "VampireFrogStaff": "Vampire Frog Staff", + "BloodMoonStarter": "Bloody Tear", + "DripplerFlail": "Drippler Crippler", + "GoldGoldfish": "Gold Goldfish", + "GoldGoldfishBowl": "Gold Fish Bowl", + "GoldStarryGlassBlock": "Gold Starry Block", + "BlueStarryGlassBlock": "Blue Starry Block", + "GoldStarryGlassWall": "Gold Starry Wall", + "BlueStarryGlassWall": "Blue Starry Wall", + + "Apricot": "Apricot", + "Banana": "Banana", + "BlackCurrant": "Blackcurrant", + "BloodOrange": "Blood Orange", + "Cherry": "Cherry", + "Coconut": "Coconut", + "Dragonfruit": "Dragon Fruit", + "Elderberry": "Elderberry", + "Grapefruit": "Grapefruit", + "Lemon": "Lemon", + "Mango": "Mango", + "Peach": "Peach", + "Pineapple": "Pineapple", + "Plum": "Plum", + "Rambutan": "Rambutan", + "Starfruit": "Star Fruit", + + "SandstoneBathtub": "Sandstone Bathtub", + "SandstoneBed": "Sandstone Bed", + "SandstoneBookcase": "Sandstone Bookcase", + "SandstoneDresser": "Sandstone Dresser", + "SandstoneCandelabra": "Sandstone Candelabra", + "SandstoneCandle": "Sandstone Candle", + "SandstoneChair": "Sandstone Chair", + "SandstoneChandelier": "Sandstone Chandelier", + "SandstoneClock": "Sandstone Clock", + "SandstoneDoor": "Sandstone Door", + "SandstoneLamp": "Sandstone Lamp", + "SandstoneLantern": "Sandstone Lantern", + "SandstonePiano": "Sandstone Piano", + "SandstonePlatform": "Sandstone Platform", + "SandstoneSink": "Sandstone Sink", + "SandstoneSofa": "Sandstone Sofa", + "SandstoneTable": "Sandstone Table", + "SandstoneWorkbench": "Sandstone Work Bench", + "SandstoneToilet": "Sandstone Toilet", + "BloodHamaxe": "Haemorrhaxe", + "BloodFishingRod": "Chum Caster", + "BabyBirdStaff": "Finch Staff", + "VoidMonolith": "Void Monolith", + "ArrowSign": "Arrow Sign", + "PaintedArrowSign": "Painted Arrow Sign", + "GameMasterShirt": "Master Gamer's Jacket", + "GameMasterPants": "Master Gamer's Pants", + "StarPrincessCrown": "Star Princess Crown", + "StarPrincessDress": "Star Princess Dress", + "SanguineStaff": "Sanguine Staff", + "CatBast": "Bast Statue", + + "FoodPlatter": "Plate", + "BlackDragonflyJar": "Black Dragonfly Jar", + "BlueDragonflyJar": "Blue Dragonfly Jar", + "GreenDragonflyJar": "Green Dragonfly Jar", + "OrangeDragonflyJar": "Orange Dragonfly Jar", + "RedDragonflyJar": "Red Dragonfly Jar", + "YellowDragonflyJar": "Yellow Dragonfly Jar", + "GoldDragonflyJar": "Gold Dragonfly Jar", + "BlackDragonfly": "Black Dragonfly", + "BlueDragonfly": "Blue Dragonfly", + "GreenDragonfly": "Green Dragonfly", + "OrangeDragonfly": "Orange Dragonfly", + "RedDragonfly": "Red Dragonfly", + "YellowDragonfly": "Yellow Dragonfly", + "GoldDragonfly": "Gold Dragonfly", + "DragonflyStatue": "Dragonfly Statue", + "CanOfWorms": "Can Of Worms", + "EncumberingStone": "Encumbering Stone", + + "GreenMoss": "Green Moss", + "RedMoss": "Red Moss", + "BrownMoss": "Brown Moss", + "BlueMoss": "Blue Moss", + "PurpleMoss": "Purple Moss", + "LavaMoss": "Lava Moss", + "BoulderStatue": "Boulder Statue", + "MusicBoxTitleAlt": "Music Box (Journey's Beginning)", + "MusicBoxStorm": "Music Box (Storm)", + "MusicBoxGraveyard": "Music Box (Graveyard)", + "Seagull": "Seagull", + "SeagullStatue": "Seagull Statue", + "LadyBug": "Ladybug", + "GoldLadyBug": "Gold Ladybug", + "Maggot": "Maggot", + "MaggotCage": "Maggot Cage", + "CelestialWand": "Celestial Wand", + "EucaluptusSap": "Eucalyptus Sap", + "KiteBlue": "Blue Kite", + "KiteBlueAndYellow": "Blue and Yellow Kite", + "KiteRed": "Red Kite", + "KiteRedAndYellow": "Red and Yellow Kite", + "KiteYellow": "Yellow Kite", + "Pupfish": "Pupfish", + "Grebe": "Grebe", + "Rat": "Rat", + "RatCage": "Rat Cage", + "PaperAirplaneA": "Paper Airplane", + "PaperAirplaneB": "White Paper Airplane", + "LadybugCage": "Ladybug Cage", + "BloodRainBow": "Blood Rain Bow", + "CombatBook": "Advanced Combat Techniques", + "PortableStool": "Step Stool", + "DesertTorch": "Desert Torch", + "CoralTorch": "Coral Torch", + "CorruptTorch": "Corrupt Torch", + "CrimsonTorch": "Crimson Torch", + "HallowedTorch": "Hallowed Torch", + "JungleTorch": "Jungle Torch", + "KryptonMoss": "Krypton Moss", + "XenonMoss": "Xenon Moss", + "ArgonMoss": "Argon Moss", + "RollingCactus": "Rolling Cactus", + "ScarabFish": "Scarab Fish", + "ScorpioFish": "Scorpio Fish", + "Owl": "Owl", + "OwlCage": "Owl Cage", + "OwlStatue": "Owl Statue", + "PupfishBowl": "Pupfish Bowl", + "GoldLadybugCage": "Gold Ladybug Cage", + "Flounder": "Flounder", + "RockLobster": "Rock Lobster", + "LobsterTail": "Lobster Tail", + "SpectreGoggles": "Spectre Goggles", + "Oyster": "Oyster", + "ShuckedOyster": "Shucked Oyster", + "WhitePearl": "White Pearl", + "BlackPearl": "Black Pearl", + "PinkPearl": "Pink Pearl", + "StoneDoor": "Stone Door", + "StonePlatform": "Stone Platform", + "OasisFountain": "Oasis Water Fountain", + "Geode": "Geode", + "FloatingTube": "Inner Tube", + "FrozenCrate": "Frozen Crate", + "FrozenCrateHard": "Boreal Crate", + "OasisCrate": "Oasis Crate", + "OasisCrateHard": "Mirage Crate", + "WaterStrider": "Water Strider", + "GoldWaterStrider": "Gold Water Strider", + "KiteWyvern": "Wyvern Kite", + "EchoBlock": "Echo Block", + "LawnFlamingo": "Lawn Flamingo", + "MusicBoxUndergroundJungle": "Music Box (Underground Jungle)", + "ScarabBomb": "Scarab Bomb", + "WroughtIronFence": "Wrought Iron Fence", + "BeeMinecart": "Bee Minecart", + "LadybugMinecart": "Ladybug Minecart", + "PigronMinecart": "Pigron Minecart", + "SunflowerMinecart": "Sunflower Minecart", + "ScarabFishingRod": "Scarab Fishing Rod", + "HellMinecart": "Demonic Hellcart", + "ClusterRocketI": "Cluster Rocket I", + "ClusterRocketII": "Cluster Rocket II", + "WetRocket": "Wet Rocket", + "LavaRocket": "Lava Rocket", + "HoneyRocket": "Honey Rocket", + "ShroomMinecart": "Shroom Minecart", + "AmethystMinecart": "Amethyst Minecart", + "TopazMinecart": "Topaz Minecart", + "SapphireMinecart": "Sapphire Minecart", + "EmeraldMinecart": "Emerald Minecart", + "RubyMinecart": "Ruby Minecart", + "DiamondMinecart": "Diamond Minecart", + "MiniNukeI": "Mini Nuke I", + "MiniNukeII": "Mini Nuke II", + "DryRocket": "Dry Rocket", + "SandcastleBucket": "Sandcastle Bucket", + "Turtle": "Turtle", + "TurtleJungle": "Jungle Turtle", + "TurtleStatue": "Turtle Statue", + "TurtleCage": "Turtle Cage", + "TurtleJungleCage": "Jungle Turtle Cage", + "PottedForestCedar": "Potted Forest Cedar", + "PottedJungleCedar": "Potted Jungle Cedar", + "PottedHallowCedar": "Potted Hallow Cedar", + "PottedForestTree": "Potted Forest Tree", + "PottedJungleTree": "Potted Jungle Tree", + "PottedHallowTree": "Potted Hallow Tree", + "PottedForestPalm": "Potted Forest Palm", + "PottedJunglePalm": "Potted Jungle Palm", + "PottedHallowPalm": "Potted Hallow Palm", + "PottedForestBamboo": "Potted Forest Bamboo", + "PottedJungleBamboo": "Potted Jungle Bamboo", + "PottedHallowBamboo": "Potted Hallow Bamboo", + "AmberMinecart": "Amber Minecart", + "GrebeCage": "Grebe Cage", + "SeagullCage": "Seagull Cage", + "WaterStriderCage": "Water Strider Cage", + "GoldWaterStriderCage": "Gold Water Strider Cage", + "BeetleMinecart": "Beetle Minecart", + "MeowmereMinecart": "Meowmere Minecart", + "PartyMinecart": "Party Wagon", + "PirateMinecart": "The Dutchman", + "SteampunkMinecart": "Steampunk Minecart", + "Grate": "Grate", + "LuckPotionLesser": "Lesser Luck Potion", + "LuckPotion": "Luck Potion", + "LuckPotionGreater": "Greater Luck Potion", + "Terragrim": "Terragrim", + "Seahorse": "Seahorse", + "SeahorseCage": "Seahorse Cage", + "GoldSeahorse": "Gold Seahorse", + "GoldSeahorseCage": "Gold Seahorse Cage", + "TimerOneHalfSecond": "1/2 Second Timer", + "TimerOneFourthSecond": "1/4 Second Timer", + "WitchBroom": "Witch's Broom", + "TheBrideBanner": "The Bride Banner", + "ZombieMermanBanner": "Zombie Merman Banner", + "EyeballFlyingFishBanner": "Wandering Eye Fish Banner", + "BloodSquidBanner": "Blood Squid Banner", + "BloodEelBanner": "Blood Eel Banner", + "GoblinSharkBanner": "Hemogoblin Shark Banner", + "EbonstoneEcho": "Ebonstone Wall", + "MudWallEcho": "Mud Wall", + "PearlstoneEcho": "Pearlstone Wall", + "SnowWallEcho": "Snow Wall", + "AmethystEcho": "Amethyst Stone Wall", + "TopazEcho": "Topaz Stone Wall", + "SapphireEcho": "Sapphire Stone Wall", + "EmeraldEcho": "Emerald Stone Wall", + "RubyEcho": "Ruby Stone Wall", + "DiamondEcho": "Diamond Stone Wall", + "Cave1Echo": "Green Mossy Wall", + "Cave2Echo": "Brown Mossy Wall", + "Cave3Echo": "Red Mossy Wall", + "Cave4Echo": "Blue Mossy Wall", + "Cave5Echo": "Purple Mossy Wall", + "Cave6Echo": "Rocky Dirt Wall", + "Cave7Echo": "Old Stone Wall", + "SpiderEcho": "Spider Wall", + "CorruptGrassEcho": "Corrupt Grass Wall", + "HallowedGrassEcho": "Hallowed Grass Wall", + "IceEcho": "Ice Wall", + "ObsidianBackEcho": "Obsidian Wall", + "CrimsonGrassEcho": "Crimson Grass Wall", + "CrimstoneEcho": "Crimstone Wall", + "CaveWall1Echo": "Cave Dirt Wall", + "CaveWall2Echo": "Rough Dirt Wall", + "Cave8Echo": "Craggy Stone Wall", + "Corruption1Echo": "Corrupt Growth Wall", + "Corruption2Echo": "Corrupt Mass Wall", + "Corruption3Echo": "Corrupt Pustule Wall", + "Corruption4Echo": "Corrupt Tendril Wall", + "Crimson1Echo": "Crimson Crust Wall", + "Crimson2Echo": "Crimson Scab Wall", + "Crimson3Echo": "Crimson Teeth Wall", + "Crimson4Echo": "Crimson Blister Wall", + "Dirt1Echo": "Layered Dirt Wall", + "Dirt2Echo": "Crumbling Dirt Wall", + "Dirt3Echo": "Cracked Dirt Wall", + "Dirt4Echo": "Wavy Dirt Wall", + "Hallow1Echo": "Hallowed Prism Wall", + "Hallow2Echo": "Hallowed Cavern Wall", + "Hallow3Echo": "Hallowed Shard Wall", + "Hallow4Echo": "Hallowed Crystalline Wall", + "Jungle1Echo": "Lichen Stone Wall", + "Jungle2Echo": "Leafy Jungle Wall", + "Jungle3Echo": "Ivy Stone Wall", + "Jungle4Echo": "Jungle Vine Wall", + "Lava1Echo": "Ember Wall", + "Lava2Echo": "Cinder Wall", + "Lava3Echo": "Magma Wall", + "Lava4Echo": "Smouldering Stone Wall", + "Rocks1Echo": "Worn Stone Wall", + "Rocks2Echo": "Stalactite Stone Wall", + "Rocks3Echo": "Mottled Stone Wall", + "Rocks4Echo": "Fractured Stone Wall", + "GolfTrophyBronze": "Bronze Golf Trophy", + "GolfTrophySilver": "Silver Golf Trophy", + "GolfTrophyGold": "Gold Golf Trophy", + "GolfClubStoneIron": "Worn Golf Club (Iron)", + "GolfClubRustyPutter": "Worn Golf Club (Putter)", + "GolfClubBronzeWedge": "Worn Golf Club (Wedge)", + "GolfClubWoodDriver": "Worn Golf Club (Driver)", + "GolfClubMythrilIron": "Fancy Golf Club (Iron)", + "GolfClubLeadPutter": "Fancy Golf Club (Putter)", + "GolfClubGoldWedge": "Fancy Golf Club (Wedge)", + "GolfClubPearlwoodDriver": "Fancy Golf Club (Driver)", + "GolfClubTitaniumIron": "Premium Golf Club (Iron)", + "GolfClubShroomitePutter": "Premium Golf Club (Putter)", + "GolfClubDiamondWedge": "Premium Golf Club (Wedge)", + "GolfClubChlorophyteDriver": "Premium Golf Club (Driver)", + "BloodNautilusBanner": "Dreadnautilus Banner", + "MusicBoxJungleNight": "Music Box (Jungle Night)", + "BirdieRattle": "Birdie Rattle", + "ExoticEasternChewToy": "Exotic Chew Toy", + "BedazzledNectar": "Bedazzled Nectar", + "BambooBlock": "Bamboo", + "BambooBlockWall": "Bamboo Wall", + "LargeBambooBlock": "Large Bamboo", + "LargeBambooBlockWall": "Large Bamboo Wall", + "BambooBathtub": "Bamboo Bathtub", + "BambooBed": "Bamboo Bed", + "BambooBookcase": "Bamboo Bookcase", + "BambooDresser": "Bamboo Dresser", + "BambooCandelabra": "Bamboo Candelabra", + "BambooCandle": "Bamboo Candle", + "BambooChair": "Bamboo Chair", + "BambooChandelier": "Bamboo Chandelier", + "BambooChest": "Bamboo Chest", + "BambooClock": "Bamboo Clock", + "BambooDoor": "Bamboo Door", + "BambooLamp": "Bamboo Lamp", + "BambooLantern": "Bamboo Lantern", + "BambooPiano": "Bamboo Piano", + "BambooPlatform": "Bamboo Platform", + "BambooSink": "Bamboo Sink", + "BambooSofa": "Bamboo Sofa", + "BambooTable": "Bamboo Table", + "BambooWorkbench": "Bamboo Work Bench", + "Fake_BambooChest": "Trapped Bamboo Chest", + "BambooToilet": "Bamboo Toilet", + "DemonHorns": "Demon Horns", + "BunnyEars": "Bunny Ears", + "DevilHorns": "Devil Horns", + "Fedora": "Fedora", + "ChefHat": "Chef Hat", + "ChefShirt": "Chef Uniform", + "ChefPants": "Chef Pants", + "MarbleColumn": "Marble Column", + "PlasmaLamp": "Plasma Lamp", + "HellCake": "Slice of Hell Cake", + "ChumBucket": "Chum Bucket", + "GardenGnome": "Garden Gnome", + "KiteBoneSerpent": "Bone Serpent Kite", + "KiteWorldFeeder": "World Feeder Kite", + "KiteBunny": "Bunny Kite", + "StarHairpin": "Star Hairpin", + "HeartHairpin": "Heart Hairpin", + "BambooLeaf": "Bamboo Leaf", + "KitePigron": "Pigron Kite", + "AppleJuice": "Apple Juice", + "GrapeJuice": "Grape Juice", + "Lemonade": "Lemonade", + "BananaDaiquiri": "Frozen Banana Daiquiri", + "PeachSangria": "Peach Sangria", + "PinaColada": "Piña Colada", + "TropicalSmoothie": "Tropical Smoothie", + "BloodyMoscato": "Bloody Moscato", + "SmoothieofDarkness": "Smoothie of Darkness", + "PrismaticPunch": "Prismatic Punch", + "FruitJuice": "Fruit Juice", + "FruitSalad": "Fruit Salad", + "SharkBait": "Shark Bait", + "AndrewSphinx": "Andrew Sphinx", + "WatchfulAntlion": "Watchful Antlion", + "BurningSpirit": "Burning Spirit", + "JawsOfDeath": "Jaws of Death", + "TheSandsOfSlime": "The Sands of Slime", + "SnakesIHateSnakes": "Snakes, I Hate Snakes", + "LifeAboveTheSand": "Life Above the Sand", + "Oasis": "Oasis", + "PrehistoryPreserved": "Prehistory Preserved", + "AncientTablet": "Ancient Tablet", + "Uluru": "Uluru", + "VisitingThePyramids": "Visiting the Pyramids", + "BandageBoy": "Bandage Boy", + "DivineEye": "Divine Eye", + "AmethystStoneBlock": "Amethyst Stone Block", + "TopazStoneBlock": "Topaz Stone Block", + "SapphireStoneBlock": "Sapphire Stone Block", + "EmeraldStoneBlock": "Emerald Stone Block", + "RubyStoneBlock": "Ruby Stone Block", + "DiamondStoneBlock": "Diamond Stone Block", + "AmberStoneBlock": "Amber Stone Block", + "AmberStoneWallEcho": "Amber Stone Wall", + "KiteManEater": "Man Eater Kite", + "KiteJellyfishBlue": "Blue Jellyfish Kite", + "KiteJellyfishPink": "Pink Jellyfish Kite", + "KiteShark": "Shark Kite", + "SuperHeroMask": "Superhero Mask", + "SuperHeroCostume": "Superhero Costume", + "SuperHeroTights": "Superhero Tights", + "PinkFairyJar": "Pink Fairy Jar", + "GreenFairyJar": "Green Fairy Jar", + "BlueFairyJar": "Blue Fairy Jar", + "FogMachine": "Fog Machine", + "GolfPainting1": "The Rolling Greens", + "GolfPainting2": "Study of a Ball at Rest", + "GolfPainting3": "Fore!", + "GolfPainting4": "The Duplicity of Reflections", + "Gladius": "Gladius", + "IvyGuitar": "Ivy", + "PrettyPinkDressSkirt": "Pretty Pink Dress", + "PrettyPinkDressPants": "Pretty Pink Stockings", + "UnicornHornHat": "Fake Unicorn Horn", + "PrettyPinkRibbon": "Pretty Pink Ribbon", + "BambooFence": "Bamboo Fence", + "KiteSandShark": "Sand Shark Kite", + "ThinIce": "Thin Ice", + "KiteBunnyCorrupt": "Corrupt Bunny Kite", + "KiteBunnyCrimson": "Crimson Bunny Kite", + "StormTigerStaff": "Desert Tiger Staff", + "DrumStick": "Drumstick", + "KiteGoldfish": "Goldfish Kite", + "FogboundDye": "Fogbound Dye", + "BloodbathDye": "Bloodbath Dye", + "GlowPaint": "Illuminant Paint", + "KiteAngryTrapper": "Angry Trapper Kite", + "KiteKoi": "Koi Kite", + "KiteCrawltipede": "Crawltipede Kite", + "KiteSpectrum": "Spectrum Kite", + "KiteWanderingEye": "Wandering Eye Kite", + "KiteUnicorn": "Unicorn Kite", + "DandelionBanner": "Angry Dandelion Banner", + "GnomeBanner": "Gnome Banner", + "UndertakerHat": "Gravedigger Hat", + "UndertakerCoat": "Gravedigger Coat", + "DesertCampfire": "Desert Campfire", + "CoralCampfire": "Coral Campfire", + "CorruptCampfire": "Corrupt Campfire", + "CrimsonCampfire": "Crimson Campfire", + "HallowedCampfire": "Hallowed Campfire", + "JungleCampfire": "Jungle Campfire", + "SoulBottleLight": "Soul of Light in a Bottle", + "SoulBottleNight": "Soul of Night in a Bottle", + "SoulBottleFlight": "Soul of Flight in a Bottle", + "SoulBottleSight": "Soul of Sight in a Bottle", + "SoulBottleMight": "Soul of Might in a Bottle", + "SoulBottleFright": "Soul of Fright in a Bottle", + "MudBud": "Mud Bud", + "ReleaseDoves": "Release Doves", + "ReleaseLantern": "Release Lantern", + "QuadBarrelShotgun": "Quad-Barrel Shotgun", + "FuneralHat": "Funeral Hat", + "FuneralCoat": "Funeral Coat", + "FuneralPants": "Funeral Pants", + "TragicUmbrella": "Tragic Umbrella", + "VictorianGothHat": "Victorian Goth Hat", + "VictorianGothDress": "Victorian Goth Dress", + "TatteredWoodSign": "Tattered Wood Sign", + "GravediggerShovel": "Gravedigger's Shovel", + "DungeonDesertChest": "Desert Chest", + "Fake_DungeonDesertChest": "Trapped Desert Chest", + "DungeonDesertKey": "Desert Key", + "MolluskWhistle": "Mollusk Whistle", + "BorealBeam": "Boreal Beam", + "RichMahoganyBeam": "Rich Mahogany Beam", + "GraniteColumn": "Granite Column", + "SandstoneColumn": "Sandstone Column", + "MushroomBeam": "Mushroom Beam", + "Nevermore": "Nevermore", + "Reborn": "Reborn", + "Graveyard": "Graveyard", + "GhostManifestation": "Ghost Manifestation", + "WickedUndead": "Wicked Undead", + "BloodyGoblet": "Bloody Goblet", + "StillLife": "Still Life", + "TerraToilet": "Terra Toilet", + "GhostarsWings": "Ghostar’s Infinity Eight", + "GhostarSkullPin": "Ghostar’s Soul Jar", + "GhostarShirt": "Ghostar’s Garb", + "GhostarPants": "Ghostar’s Tights", + "BallOfFuseWire": "Ball O' Fuse Wire", + "FullMoonSqueakyToy": "Full Moon Squeaky Toy", + "OrnateShadowKey": "Ornate Shadow Key", + "DrManFlyMask": "Dr. Man Fly Mask", + "DrManFlyLabCoat": "Dr. Man Fly's Lab Coat", + "ButcherMask": "Butcher Mask", + "ButcherApron": "Butcher's Bloodstained Apron", + "ButcherPants": "Butcher's Bloodstained Pants", + "Football": "Football", + "CoffinMinecart": "Coffin Minecart", + "FoodBarbarianWings": "FoodBarbarian's Tattered Dragon Wings", + "FoodBarbarianHelm": "FoodBarbarian's Horned Helm", + "FoodBarbarianArmor": "FoodBarbarian's Wild Wolf Spaulders", + "FoodBarbarianGreaves": "FoodBarbarian's Savage Greaves", + "SafemanWings": "Safeman's Blanket Cape", + "SafemanSunHair": "Safeman's Sunny Day", + "SafemanSunDress": "Safeman's Sun Dress", + "SafemanDressLeggings": "Safeman's Pink Leggings", + "GroxTheGreatWings": "Grox The Great's Wings", + "GroxTheGreatHelm": "Grox The Great's Horned Cowl", + "GroxTheGreatArmor": "Grox The Great's Chestplate", + "GroxTheGreatGreaves": "Grox The Great's Greaves", + "SparkleGuitar": "Stellar Tune", + "SquirrelHook": "Squirrel Hook", + "RockGolemHead": "Rock Golem Head", + "CritterShampoo": "Critter Shampoo", + "Shroomerang": "Shroomerang", + "DontHurtCrittersBook": "Guide To Critter Companionship", + "DogEars": "Dog Ears", + "DogTail": "Dog Tail", + "FoxEars": "Fox Ears", + "FoxTail": "Fox Tail", + "LizardEars": "Lizard Ears", + "LizardTail": "Lizard Tail", + "PandaEars": "Panda Ears", + "BunnyTail": "Bunny Tail", + "FairyGlowstick": "Fairy Glowstick", + "LightningCarrot": "Lightning Carrot", + "MushroomHat": "Mushroom Hat", + "MushroomVest": "Mushroom Vest", + "MushroomPants": "Mushroom Pants", + "HunterCloak": "Hunter Cloak", + "ZapinatorGray": "Gray Zapinator", + "ZapinatorOrange": "Orange Zapinator", + "TreeGlobe": "Tree Globe", + "WorldGlobe": "World Globe", + "CombatWrench": "Combat Wrench", + "PaintedHorseSaddle": "Dusty Rawhide Saddle", + "MajesticHorseSaddle": "Royal Gilded Saddle", + "DarkHorseSaddle": "Black Studded Saddle", + "JoustingLance": "Jousting Lance", + "ShadowJoustingLance": "Shadow Jousting Lance", + "HallowJoustingLance": "Hallowed Jousting Lance", + "DemonConch": "Demon Conch", + "BottomlessLavaBucket": "Bottomless Lava Bucket", + "FireproofBugNet": "Lavaproof Bug Net", + "FlameWakerBoots": "Flame Waker Boots", + "WetBomb": "Wet Bomb", + "LavaBomb": "Lava Bomb", + "HoneyBomb": "Honey Bomb", + "DryBomb": "Dry Bomb", + "LicenseCat": "Cat License", + "LicenseDog": "Dog License", + "GemSquirrelAmethyst": "Amethyst Squirrel", + "GemSquirrelTopaz": "Topaz Squirrel", + "GemSquirrelSapphire": "Sapphire Squirrel", + "GemSquirrelEmerald": "Emerald Squirrel", + "GemSquirrelRuby": "Ruby Squirrel", + "GemSquirrelDiamond": "Diamond Squirrel", + "GemSquirrelAmber": "Amber Squirrel", + "GemBunnyAmethyst": "Amethyst Bunny", + "GemBunnyTopaz": "Topaz Bunny", + "GemBunnySapphire": "Sapphire Bunny", + "GemBunnyEmerald": "Emerald Bunny", + "GemBunnyRuby": "Ruby Bunny", + "GemBunnyDiamond": "Diamond Bunny", + "GemBunnyAmber": "Amber Bunny", + "HellButterfly": "Hell Butterfly", + "HellButterflyJar": "Hell Butterfly Jar", + "Lavafly": "Lavafly", + "LavaflyinaBottle": "Lavafly in a Bottle", + "MagmaSnail": "Magma Snail", + "MagmaSnailCage": "Magma Snail Cage", + "GemTreeTopazSeed": "Topaz Gemcorn", + "GemTreeAmethystSeed": "Amethyst Gemcorn", + "GemTreeSapphireSeed": "Sapphire Gemcorn", + "GemTreeEmeraldSeed": "Emerald Gemcorn", + "GemTreeRubySeed": "Ruby Gemcorn", + "GemTreeDiamondSeed": "Diamond Gemcorn", + "GemTreeAmberSeed": "Amber Gemcorn", + "LavaAbsorbantSponge": "Lava Absorbant Sponge", + "HallowedHood": "Hallowed Hood", + "LavaCrate": "Obsidian Crate", + "LavaCrateHard": "Hellstone Crate", + "PotSuspended": "Hanging Pot", + "PotSuspendedDaybloom": "Hanging Daybloom", + "PotSuspendedMoonglow": "Hanging Moonglow", + "PotSuspendedWaterleaf": "Hanging Waterleaf", + "PotSuspendedShiverthorn": "Hanging Shiverthorn", + "PotSuspendedBlinkroot": "Hanging Blinkroot", + "PotSuspendedDeathweedCorrupt": "Hanging Corrupt Deathweed", + "PotSuspendedDeathweedCrimson": "Hanging Crimson Deathweed", + "PotSuspendedFireblossom": "Hanging Fireblossom", + "BrazierSuspended": "Hanging Brazier", + "ObsidianLockbox": "Obsidian Lock Box", + "SuperheatedBlood": "Superheated Blood", + "VolcanoSmall": "Mini Volcano", + "VolcanoLarge": "Large Volcano", + "LavaFishingHook": "Lavaproof Fishing Hook", + "PotionOfReturn": "Potion of Return", + "AmethystBunnyCage": "Amethyst Bunny Cage", + "TopazBunnyCage": "Topaz Bunny Cage", + "SapphireBunnyCage": "Sapphire Bunny Cage", + "EmeraldBunnyCage": "Emerald Bunny Cage", + "RubyBunnyCage": "Ruby Bunny Cage", + "DiamondBunnyCage": "Diamond Bunny Cage", + "AmberBunnyCage": "Amber Bunny Cage", + "AmethystSquirrelCage": "Amethyst Squirrel Cage", + "TopazSquirrelCage": "Topaz Squirrel Cage", + "SapphireSquirrelCage": "Sapphire Squirrel Cage", + "EmeraldSquirrelCage": "Emerald Squirrel Cage", + "RubySquirrelCage": "Ruby Squirrel Cage", + "DiamondSquirrelCage": "Diamond Squirrel Cage", + "AmberSquirrelCage": "Amber Squirrel Cage", + "AncientHallowedMask": "Ancient Hallowed Mask", + "AncientHallowedHelmet": "Ancient Hallowed Helmet", + "AncientHallowedHeadgear": "Ancient Hallowed Headgear", + "AncientHallowedHood": "Ancient Hallowed Hood", + "AncientHallowedPlateMail": "Ancient Hallowed Plate Mail", + "AncientHallowedGreaves": "Ancient Hallowed Greaves", + "VanityTreeSakuraSeed": "Sakura Sapling", + "PottedLavaPlantPalm": "Potted Magma Palm", + "PottedLavaPlantBush": "Potted Brimstone Bush", + "PottedLavaPlantBramble": "Potted Fire Brambles", + "PottedLavaPlantBulb": "Potted Lava Bulb", + "PottedLavaPlantTendrils": "Potted Ember Tendrils", + "HellfireTreads": "Hellfire Treads", + "LavaFishbowl": "Lava Serpent Bowl", + "VanityTreeYellowWillowSeed": "Yellow Willow Sapling", + "PirateShipMountItem": "The Black Spot", + "SpookyWoodMountItem": "Hexxed Branch", + "SantankMountItem": "Toy Tank", + "WallOfFleshGoatMountItem": "Goat Skull", + "DarkMageBookMountItem": "Dark Mage's Tome", + "KingSlimePetItem": "Royal Delight", + "EyeOfCthulhuPetItem": "Suspicious Grinning Eye", + "EaterOfWorldsPetItem": "Writhing Remains", + "BrainOfCthulhuPetItem": "Brain in a Jar", + "SkeletronPetItem": "Possessed Skull", + "QueenBeePetItem": "Sparkling Honey", + "DestroyerPetItem": "Deactivated Probe", + "TwinsPetItem": "Pair of Eyeballs", + "SkeletronPrimePetItem": "Robotic Skull", + "PlanteraPetItem": "Plantera Seedling", + "GolemPetItem": "Guardian Golem", + "DukeFishronPetItem": "Pork of the Sea", + "LunaticCultistPetItem": "Tablet Fragment", + "MoonLordPetItem": "Piece of Moon Squid", + "FairyQueenPetItem": "Jewel of Light", + "PumpkingPetItem": "Pumpkin Scented Candle", + "EverscreamPetItem": "Shrub Star", + "IceQueenPetItem": "Frozen Crown", + "MartianPetItem": "Cosmic Skateboard", + "DD2OgrePetItem": "Ogre's Club", + "DD2BetsyPetItem": "Betsy's Egg", + "PogoStick": "Pogo Stick", + "LicenseBunny": "Bunny License", + "TungstenBullet": "Tungsten Bullet", + "TeleportationPylonJungle": "Jungle Pylon", + "TeleportationPylonPurity": "Forest Pylon", + "TeleportationPylonHallow": "Hallow Pylon", + "TeleportationPylonUnderground": "Cavern Pylon", + "TeleportationPylonOcean": "Ocean Pylon", + "TeleportationPylonDesert": "Desert Pylon", + "TeleportationPylonSnow": "Snow Pylon", + "TeleportationPylonMushroom": "Mushroom Pylon", + "CavernFountain": "Cavern Water Fountain", + "FairyQueenBossBag": "Treasure Bag", + "FairyQueenTrophy": "Empress of Light Trophy", + "FairyQueenMask": "Empress of Light Mask", + "EyeofCthulhuMasterTrophy": "Eye of Cthulhu Relic", + "EaterofWorldsMasterTrophy": "Eater of Worlds Relic", + "BrainofCthulhuMasterTrophy": "Brain of Cthulhu Relic", + "SkeletronMasterTrophy": "Skeletron Relic", + "QueenBeeMasterTrophy": "Queen Bee Relic", + "KingSlimeMasterTrophy": "King Slime Relic", + "WallofFleshMasterTrophy": "Wall of Flesh Relic", + "TwinsMasterTrophy": "Twins Relic", + "DestroyerMasterTrophy": "Destroyer Relic", + "SkeletronPrimeMasterTrophy": "Skeletron Prime Relic", + "PlanteraMasterTrophy": "Plantera Relic", + "GolemMasterTrophy": "Golem Relic", + "DukeFishronMasterTrophy": "Duke Fishron Relic", + "LunaticCultistMasterTrophy": "Lunatic Cultist Relic", + "MoonLordMasterTrophy": "Moon Lord Relic", + "UFOMasterTrophy": "Martian Saucer Relic", + "FlyingDutchmanMasterTrophy": "Flying Dutchman Relic", + "MourningWoodMasterTrophy": "Mourning Wood Relic", + "PumpkingMasterTrophy": "Pumpking Relic", + "IceQueenMasterTrophy": "Ice Queen Relic", + "EverscreamMasterTrophy": "Everscream Relic", + "SantankMasterTrophy": "Santa-NK1 Relic", + "DarkMageMasterTrophy": "Dark Mage Relic", + "OgreMasterTrophy": "Ogre Relic", + "BetsyMasterTrophy": "Betsy Relic", + "FairyQueenMasterTrophy": "Empress of Light Relic", + "QueenSlimeMasterTrophy": "Queen Slime Relic", + "TeleportationPylonVictory": "Victory Pylon", + "HallowBossDye": "Prismatic Dye", + "RainbowWings": "Empress Wings", + "DirtBomb": "Dirt Bomb", + "DirtStickyBomb": "Sticky Dirt Bomb", + "QueenSlimeBossBag": "Treasure Bag", + "QueenSlimeTrophy": "Queen Slime Trophy", + "QueenSlimeMask": "Queen Slime Mask", + "QueenSlimePetItem": "Regal Delicacy", + "AccentSlab": "Stone Accent Slab", + "EmpressButterfly": "Prismatic Lacewing", + "TruffleWormCage": "Truffle Worm Cage", + "EmpressButterflyJar": "Prismatic Lacewing Jar", + "RockGolemBanner": "Rock Golem Banner", + "BloodMummyBanner": "Blood Mummy Banner", + "SporeSkeletonBanner": "Spore Skeleton Banner", + "SporeBatBanner": "Spore Bat Banner", + "LarvaeAntlionBanner": "Antlion Larva Banner", + "CrimsonBunnyBanner": "Vicious Bunny Banner", + "CrimsonGoldfishBanner": "Vicious Goldfish Banner", + "CrimsonPenguinBanner": "Vicious Penguin Banner", + "BigMimicCorruptionBanner": "Corrupt Mimic Banner", + "BigMimicCrimsonBanner": "Crimson Mimic Banner", + "BigMimicHallowBanner": "Hallowed Mimic Banner", + "MossHornetBanner": "Moss Hornet Banner", + "WanderingEyeBanner": "Wandering Eye Banner", + "CreativeWings": "Fledgling Wings", + "MusicBoxQueenSlime": "Music Box (Queen Slime)", + "BouncingShield": "Sergeant United Shield", + "DiggingMoleMinecart": "Digging Molecart", + "BlandWhip": "Leather Whip", + "MaceWhip": "Morning Star", + "ScytheWhip": "Dark Harvest", + "SwordWhip": "Durendal", + "ThornWhip": "Snapthorn", + "FireWhip": "Firecracker", + "CoolWhip": "Cool Whip", + "RainbowWhip": "Kaleidoscope", + "MusicBoxEmpressOfLight": "Music Box (Empress Of Light)", + "CrystalNinjaHelmet": "Crystal Assassin Hood", + "CrystalNinjaChestplate": "Crystal Assassin Shirt", + "CrystalNinjaLeggings": "Crystal Assassin Pants", + "QueenSlimeMountSaddle": "Gelatinous Pillion", + "QueenSlimeHook": "Hook of Dissonance", + "Smolstar": "Blade Staff", + "PiercingStarlight": "Starlight", + "FairyQueenMagicItem": "Nightglow", + "FairyQueenRangedItem": "Eventide", + "RabbitOrder": "Rabbit Perch", + "TeleportationPylonVictory": "Universal Pylon", + "QueenSlimeCrystal": "Gelatin Crystal", + "EmpressFlightBooster": "Soaring Insignia", + "VolatileGelatin": "Volatile Gelatin", + "GelBalloon": "Sparkle Slime Balloon", + "MusicBoxDukeFishron": "Music Box (Duke Fishron)", + "MusicBoxMorningRain": "Music Box (Morning Rain)", + "MusicBoxConsoleTitle": "Music Box (Alt Title)", + "Zenith": "Zenith", + "ChippysCouch": "Chippy's Couch", + "GraduationCapBlue": "Blue Graduation Cap", + "GraduationCapMaroon": "Maroon Graduation Cap", + "GraduationCapBlack": "Black Graduation Cap", + "GraduationGownBlue": "Blue Graduation Gown", + "GraduationGownMaroon": "Maroon Graduation Gown", + "GraduationGownBlack": "Black Graduation Gown", + "LongRainbowTrailWings": "Celestial Starboard", + "TerrasparkBoots": "Terraspark Boots", + "OceanCrate": "Ocean Crate", + "OceanCrateHard": "Seaside Crate", + "MusicBoxUndergroundDesert": "Music Box (Underground Desert)", + "BadgersHat": "Badger's Hat", + "DeadMansSweater": "Dead Man's Sweater", + "TeaKettle": "Teapot", + "Teacup": "Teacup", + "EmpressBlade": "Terraprisma", + "MoonLordLegs": "Moon Lord Legs", + "TreasureMagnet": "Treasure Magnet", + "Mace": "Mace", + "FlamingMace": "Flaming Mace", + "MusicBoxOWRain": "Otherworldly Music Box (Rain)", + "MusicBoxOWDay": "Otherworldly Music Box (Overworld Day)", + "MusicBoxOWNight": "Otherworldly Music Box (Night)", + "MusicBoxOWUnderground": "Otherworldly Music Box (Underground)", + "MusicBoxOWDesert": "Otherworldly Music Box (Desert)", + "MusicBoxOWOcean": "Otherworldly Music Box (Ocean)", + "MusicBoxOWMushroom": "Otherworldly Music Box (Mushrooms)", + "MusicBoxOWDungeon": "Otherworldly Music Box (Dungeon)", + "MusicBoxOWSpace": "Otherworldly Music Box (Space)", + "MusicBoxOWUnderworld": "Otherworldly Music Box (Underworld)", + "MusicBoxOWSnow": "Otherworldly Music Box (Snow)", + "MusicBoxOWCorruption": "Otherworldly Music Box (Corruption)", + "MusicBoxOWUndergroundCorruption": "Otherworldly Music Box (Underground Corruption)", + "MusicBoxOWCrimson": "Otherworldly Music Box (Crimson)", + "MusicBoxOWUndergroundCrimson": "Otherworldly Music Box (Underground Crimson)", + "MusicBoxOWUndergroundSnow": "Otherworldly Music Box (Ice)", + "MusicBoxOWUndergroundHallow": "Otherworldly Music Box (Underground Hallow)", + "MusicBoxOWBloodMoon": "Otherworldly Music Box (Eerie)", + "MusicBoxOWBoss2": "Otherworldly Music Box (Boss 2)", + "MusicBoxOWBoss1": "Otherworldly Music Box (Boss 1)", + "MusicBoxOWInvasion": "Otherworldly Music Box (Invasion)", + "MusicBoxOWTowers": "Otherworldly Music Box (The Towers)", + "MusicBoxOWMoonLord": "Otherworldly Music Box (Lunar Boss)", + "MusicBoxOWPlantera": "Otherworldly Music Box (Plantera)", + "MusicBoxOWJungle": "Otherworldly Music Box (Jungle)", + "MusicBoxOWWallOfFlesh": "Otherworldly Music Box (Wall of Flesh)", + "MusicBoxOWHallow": "Otherworldly Music Box (Hallow)", + "MilkCarton": "Carton of Milk", + "CoffeeCup": "Coffee", + "TorchGodsFavor": "Torch God's Favor", + "MusicBoxCredits": "Music Box (Journey's End)", + }, + "ItemTooltip": { + "ShadowGreaves": "7% increased melee speed", + "ConfettiGun": "Shoots confetti everywhere!", + "ChlorophyteMask": "16% increased melee damage\n6% increased melee critical strike chance", + "ChlorophyteHelmet": "16% increased ranged damage\n20% chance to not consume ammo", + "ChlorophyteHeadgear": "Increases maximum mana by 80 and reduces mana usage by 17%\n16% increased magic damage", + "ChlorophytePlateMail": "5% increased damage\n7% increased critical strike chance", + "ChlorophyteGreaves": "8% increased critical strike chance\n5% increased movement speed", + "ChlorophyteBar": "Reacts to the light", + "ShadowScalemail": "7% increased melee speed", + "ShadowHelmet": "7% increased melee speed", + "NightmarePickaxe": "Able to mine Hellstone", + "Paintbrush": "Used with paint to color blocks", + "PaintRoller": "Used with paint to color walls", + "ManaCrystal": "Permanently increases maximum mana by 20", + "PaintScraper": "Used to remove paint\nCan sometimes collect moss", + "TealMushroom": "Used to make Teal Dye", + "GreenMushroom": "Used to make Green Dye", + "SkyBlueFlower": "Used to make Sky Blue Dye", + "BandofStarpower": "Increases maximum mana by 20", + "YellowMarigold": "Used to make Yellow Dye", + "BlueBerries": "Used to make Blue Dye", + "LimeKelp": "Used to make Lime Dye", + "PinkPricklyPear": "Used to make Pink Dye", + "OrangeBloodroot": "Used to make Orange Dye", + "RedHusk": "Used to make Red Dye", + "CyanHusk": "Used to make Cyan Dye", + "VioletHusk": "Used to make Violet Dye", + "PurpleMucos": "Used to make Purple Dye", + "BlackInk": "Used to make Black Dye", + "FlowerofFire": "Throws balls of fire", + "DyeVat": "Used to Craft Dyes", + "BeeGun": "Shoots bees that will chase your enemy", + "PossessedHatchet": "Chases after your enemy", + "BeeKeeper": "Summons killer bees after striking your foe\nSmall chance to cause confusion", + "HiveWand": "Places Hives", + "MagicMissile": "Casts a controllable missile", + "Beenade": "Explodes into a swarm of bees", + "GravityGlobe": "Allows the holder to reverse gravity\nPress UP to change gravity", + "HoneyComb": "Releases bees after taking damage", + "Abeemination": "Summons the Queen Bee", + "DirtRod": "Magically moves dirt", + "TempleKey": "Opens the jungle temple door", + "LihzahrdWorkBench": "Used for basic crafting", + "ShadowOrb": "Creates a magical shadow orb", + "LihzahrdPressurePlate": "Activates when a player steps on it", + "PiranhaGun": "Latches on to enemies for continuous damage", + "PygmyStaff": "Summons a Pygmy to fight for you", + "PygmyNecklace": "Increases your max number of minions by 1", + "TikiMask": "Increases your max number of minions by 1\nIncreases minion damage by 10%", + "TikiShirt": "Increases your max number of minions by 1\nIncreases minion damage by 10%", + "TikiPants": "Increases your max number of minions by 1\nIncreases minion damage by 10%", + "LeafWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BetsyWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "BlizzardinaBalloon": "Allows the holder to double jump\nIncreases jump height", + "BundleofBalloons": "Allows the holder to quadruple jump\nIncreases jump height", + "BatWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "HerculesBeetle": "Increases the damage of your minions by 15%\nIncreases the knockback of your minions", + "BoneKey": "Summons a Baby Skeletron Head", + "MeteoriteBar": "'Warm to the touch'", + "Nectar": "Summons a Baby Hornet", + "TikiTotem": "Summons a Tiki Spirit", + "LizardEgg": "Summons a Pet Lizard", + "LeafBlower": "Rapidly shoots razor sharp leaves", + "ChlorophyteBullet": "Chases after your enemy", + "Hook": "Sometimes dropped by Skeletons and Piranha", + "ParrotCracker": "Summons a Pet Parrot", + "StrangeGlowingMushroom": "Summons a Baby Truffle", + "Seedling": "Summons a Pet Sapling", + "WispinaBottle": "Summons a Wisp to provide light", + "PalladiumPickaxe": "Can mine Mythril and Orichalcum", + "PalladiumDrill": "Can mine Mythril and Orichalcum", + "OrichalcumPickaxe": "Can mine Adamantite and Titanium", + "OrichalcumDrill": "Can mine Adamantite and Titanium", + "MoltenFury": "Lights wooden arrows ablaze", + "PalladiumMask": "8% increased melee damage\n12% increased melee speed", + "PalladiumHelmet": "9% increased ranged damage\n9% increased ranged critical strike chance", + "PalladiumHeadgear": "7% increased magic damage and critical strike chance\nIncreases maximum mana by 60", + "PalladiumBreastplate": "3% increased damage\n2% increased critical strike chance", + "PalladiumLeggings": "2% increased damage\n1% increased critical strike chance", + "FieryGreatsword": "'It's made out of fire!'", + "OrichalcumMask": "7% increased melee damage\n7% increased movement and melee speed", + "OrichalcumHelmet": "15% increased ranged critical strike chance\n8% increased movement speed", + "OrichalcumHeadgear": "18% increased magic critical strike chance\nIncreases maximum mana by 80", + "OrichalcumBreastplate": "6% increased critical strike chance", + "OrichalcumLeggings": "11% increased movement speed", + "TitaniumMask": "8% increased melee damage and critical strike chance\n8% increased melee speed", + "TitaniumHelmet": "16% increased ranged damage\n7% increased ranged critical strike chance", + "TitaniumHeadgear": "16% increased magic damage and 7% increased magic critical strike chance\nIncreases maximum mana by 100", + "TitaniumBreastplate": "4% increased damage\n3% increased critical strike chance", + "TitaniumLeggings": "3% increased damage and critical strike chance\n6% increased movement speed", + "OrichalcumAnvil": "Used to craft items from mythril, orichalcum, adamantite, and titanium bars", + "TitaniumForge": "Used to smelt adamantite and titanium ore", + "ChlorophyteClaymore": "Shoots a powerful orb", + "ChlorophyteSaber": "Shoots a spore cloud", + "ChlorophytePartisan": "Shoots a spore cloud", + "MeteorHelmet": "7% increased magic damage", + "ChlorophyteArrow": "Bounces back after hitting a wall", + "MeteorSuit": "7% increased magic damage", + "AmberMosquito": "Summons a Baby Dinosaur", + "NimbusRod": "Summons a cloud to rain down on your foes", + "BeeCloak": "Causes stars to fall and releases bees after taking damage", + "EyeoftheGolem": "10% increased critical strike chance", + "HoneyBalloon": "Increases jump height\nReleases bees when damaged", + "MeteorLeggings": "7% increased magic damage", + "BlueHorseshoeBalloon": "Allows the holder to double jump\nIncreases jump height and negates fall damage", + "WhiteHorseshoeBalloon": "Allows the holder to double jump\nIncreases jump height and negates fall damage", + "YellowHorseshoeBalloon": "Allows the holder to double jump\nIncreases jump height and negates fall damage", + "FrozenTurtleShell": "Puts a shell around the owner when below 50% life that reduces damage by 25%", + "SniperRifle": "Shoots a powerful, high velocity bullet\n to zoom out", + "VenusMagnum": "Shoots a powerful, high velocity bullet", + "CrimsonRod": "Summons a cloud to rain blood on your foes", + "Stynger": "Shoots an explosive bolt\nDoes extra damage on a direct hit", + "FlowerPow": "Shoots razor sharp flower petals at nearby enemies", + "RainbowGun": "Shoots a rainbow that does continuous damage", + "StyngerBolt": "Explodes into deadly shrapnel", + "FlowerofFrost": "Shoots a ball of frost", + "Uzi": "Shoots a powerful, high velocity bullet", + "RocketBoots": "Allows flight", + "AmethystRobe": "Increases maximum mana by 20\nReduces mana usage by 5%", + "TopazRobe": "Increases maximum mana by 40\nReduces mana usage by 7%", + "SapphireRobe": "Increases maximum mana by 40\nReduces mana usage by 9%", + "EmeraldRobe": "Increases maximum mana by 60\nReduces mana usage by 11%", + "RubyRobe": "Increases maximum mana by 60\nReduces mana usage by 13%", + "DiamondRobe": "Increases maximum mana by 80\nReduces mana usage by 15%", + "PanicNecklace": "Increases movement speed after taking damage", + "LifeFruit": "Permanently increases maximum life by 5", + "LihzahrdPowerCell": "Used at the Lihzahrd Altar", + "Picksaw": "Capable of mining Lihzahrd Bricks", + "HeatRay": "Shoots a scorching ray of heat\n'Oolaa!!'", + "StaffofEarth": "Summons a powerful boulder", + "GolemFist": "Punches with the force of a golem", + "Binoculars": "Increases view range when held", + "RifleScope": "Increases view range for guns\n to zoom out", + "DestroyerEmblem": "10% increased damage\n8% increased critical strike chance", + "JellyfishNecklace": "Provides light under water", + "IceSickle": "Shoots an icy sickle", + "ClothierVoodooDoll": "'You are a terrible person'", + "PoisonStaff": "Shoots a poison fang that pierces multiple enemies", + "SlimeStaff": "Summons a baby slime to fight for you", + "PoisonDart": "Inflicts poison on enemies", + "EyeSpring": "Summons an eyeball spring", + "ToySled": "Summons a baby snowman", + "BookofSkulls": "Shoots a skull", + "KOCannon": "Shoots a boxing glove", + "PirateMap": "Summons a pirate invasion", + "TurtleHelmet": "6% increased melee damage\nEnemies are more likely to target you", + "TurtleScaleMail": "8% increased melee damage and critical strike chance\nEnemies are more likely to target you", + "TurtleLeggings": "4% increased melee critical strike chance\nEnemies are more likely to target you", + "MagicQuiver": "Increases arrow damage by 10% and greatly increases arrow speed\n20% chance to not consume arrows", + "MagmaStone": "Melee attacks inflict fire damage", + "ObsidianRose": "Reduces damage from touching lava", + "RodofDiscord": "Teleports you to the position of the mouse", + "DeathSickle": "Shoots a deathly sickle", + "BloodySpine": "Summons the Brain of Cthulhu", + "Ichor": "'The blood of gods'", + "IchorTorch": "Can be placed in water", + "IchorArrow": "Decreases target's defense", + "IchorBullet": "Decreases target's defense", + "GoldenShower": "Sprays a shower of ichor\nDecreases target's defense", + "ImbuingStation": "Used to craft weapon imbuement flasks", + "EmptyBullet": "Used to craft various types of ammo", + "ShadowbeamStaff": "Creates a shadow beam that bounces off walls", + "InfernoFork": "Launches a ball of fire that explodes into a raging inferno", + "SpectreStaff": "Summons a lost soul to chase your foes", + "BubbleMachine": "Blows bubbles", + "BubbleWand": "Blows bubbles", + "WaterCandle": "Holding this may attract unwanted attention", + "Book": "'It contains strange symbols'", + "CopperWatch": "Tells the time", + "SpectreHood": "40% decreased magic damage", + "SpectreRobe": "7% increased magic damage and critical strike chance", + "SpectrePants": "8% increased magic damage\n8% increased movement speed", + "PaladinsHammer": "A powerful returning hammer", + "BeeWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "LargeAmethyst": "For Capture the Gem. It drops when you die", + "LargeTopaz": "For Capture the Gem. It drops when you die", + "LargeSapphire": "For Capture the Gem. It drops when you die", + "LargeEmerald": "For Capture the Gem. It drops when you die", + "LargeRuby": "For Capture the Gem. It drops when you die", + "LargeDiamond": "For Capture the Gem. It drops when you die", + "JungleKey": "Unlocks a Jungle Chest in the dungeon", + "CorruptionKey": "Unlocks a Corruption Chest in the dungeon", + "CrimsonKey": "Unlocks a Crimson Chest in the dungeon", + "HallowedKey": "Unlocks a Hallowed Chest in the dungeon", + "FrozenKey": "Unlocks an Ice Chest in the dungeon", + "SpectrePaintbrush": "Used with paint to color blocks", + "SpectrePaintRoller": "Used with paint to color walls", + "SpectrePaintScraper": "Used to remove paint\nCan sometimes collect moss", + "ShroomiteHeadgear": "15% increased arrow damage\n5% increased ranged critical strike chance", + "ShroomiteMask": "15% increased bullet damage\n5% increased ranged critical strike chance", + "ShroomiteHelmet": "15% increased rocket damage\n5% increased ranged critical strike chance", + "ShroomiteBreastplate": "13% increased ranged damage & critical strike chance\n20% chance to not consume ammo", + "ShroomiteLeggings": "7% increased ranged critical strike chance\n12% increased movement speed", + "Autohammer": "Converts Chlorophyte Bars into Shroomite Bars", + "SDMG": "66% chance to not consume ammo\n'It came from the edge of space'", + "CenxsTiara": "{$CommonItemTooltip.DevItem}", + "CenxsBreastplate": "{$CommonItemTooltip.DevItem}", + "CenxsLeggings": "{$CommonItemTooltip.DevItem}", + "CrownosMask": "{$CommonItemTooltip.DevItem}", + "CrownosBreastplate": "{$CommonItemTooltip.DevItem}", + "CrownosLeggings": "{$CommonItemTooltip.DevItem}", + "CobaltShield": "Grants immunity to knockback", + "WillsHelmet": "{$CommonItemTooltip.DevItem}", + "WillsBreastplate": "{$CommonItemTooltip.DevItem}", + "WillsLeggings": "{$CommonItemTooltip.DevItem}", + "JimsHelmet": "{$CommonItemTooltip.DevItem}", + "JimsBreastplate": "{$CommonItemTooltip.DevItem}", + "JimsLeggings": "{$CommonItemTooltip.DevItem}", + "AaronsHelmet": "{$CommonItemTooltip.DevItem}", + "AaronsBreastplate": "{$CommonItemTooltip.DevItem}", + "AaronsLeggings": "{$CommonItemTooltip.DevItem}", + "VampireKnives": "Rapidly throw life stealing daggers", + "AquaScepter": "Sprays out a shower of water", + "ScourgeoftheCorruptor": "A powerful javelin that unleashes tiny eaters", + "StaffoftheFrostHydra": "{$CommonItemTooltip.Sentry}\nSummons a powerful frost hydra to spit ice at your enemies", + "SweetheartNecklace": "Releases bees and increases movement speed when damaged", + "FlurryBoots": "The wearer can run super fast", + "LuckyHorseshoe": "Negates fall damage", + "DTownsHelmet": "{$CommonItemTooltip.DevItem}", + "DTownsBreastplate": "{$CommonItemTooltip.DevItem}", + "DTownsLeggings": "{$CommonItemTooltip.DevItem}", + "DTownsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "WillsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "CrownosWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "CenxsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "CenxsDress": "{$CommonItemTooltip.DevItem}", + "CenxsDressPants": "{$CommonItemTooltip.DevItem}", + "ShinyRedBalloon": "Increases jump height", + "MagicCuffs": "Increases maximum mana by 20\nRestores mana when damaged", + "SilverWatch": "Tells the time", + "AnkhCharm": "Grants immunity to most debuffs", + "AnkhShield": "Grants immunity to knockback and fire blocks\nGrants immunity to most debuffs", + "WaterBolt": "Casts a slow moving bolt of water", + "Bomb": "A small explosion that will destroy most tiles", + "Dynamite": "A large explosion that will destroy most tiles", + "Grenade": "A small explosion that will not destroy tiles", + "GoldWatch": "Tells the time", + "FartinaJar": "Allows the holder to double jump", + "HellstoneBar": "'Hot to the touch'", + "LeprechaunHat": "To me it look like a leprechaun to me", + "LeprechaunShirt": "I just wanna know where the gold at!", + "LeprechaunPants": "I want the gold. I want the gold. I want the gold. Gimme the gold!", + "GoodieBag": "{$CommonItemTooltip.RightClickToOpen}", + "CandyCornRifle": "33% chance to not consume ammo", + "Sickle": "Allows the collection of hay from grass", + "TatteredFairyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "SpiderEgg": "Summons a pet spider", + "MagicalPumpkinSeed": "Summons a pet squashling", + "DepthMeter": "Displays depth", + "BatScepter": "Summons bats to attack your enemies", + "RavenStaff": "Summons a raven to fight for you", + "JungleKeyMold": "Used for crafting a Jungle Key", + "CorruptionKeyMold": "Used for crafting a Corruption Key", + "CrimsonKeyMold": "Used for crafting a Crimson Key", + "HallowedKeyMold": "Used for crafting a Hallowed Key", + "FrozenKeyMold": "Used for crafting a Frozen Key", + "RottenEgg": "Best used for pranking townsfolk", + "UnluckyYarn": "Summons a black kitty", + "TheHorsemansBlade": "Summons Pumpkin heads to attack your enemies", + "SpookyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "SpookyHelmet": "Increases your max number of minions by 1\nIncreases minion damage by 11%", + "SpookyBreastplate": "Increases your max number of minions by 2\nIncreases minion damage by 11%", + "SpookyLeggings": "Increases your max number of minions by 1\nIncreases minion damage by 11%\n20% increased movement speed", + "CursedSapling": "Summons a cursed sapling to follow you", + "PumpkinMoonMedallion": "Summons the Pumpkin Moon", + "NecromanticScroll": "Increases your max number of minions by 1\nIncreases minion damage by 10%", + "SniperScope": "Increases view range for guns ( to zoom out)\n10% increased ranged damage and critical strike chance", + "BreathingReed": "Increases breath time and allows breathing in water", + "JellyfishDivingGear": "Grants the ability to swim and greatly extends underwater breathing\nProvides light under water", + "ArcticDivingGear": "Grants the ability to swim and greatly extends underwater breathing\nProvides light under water and extra mobility on ice", + "FrostsparkBoots": "Allows flight, super fast running, and extra mobility on ice\n8% increased movement speed", + "FartInABalloon": "Allows the holder to double jump\nIncreases jump height", + "PapyrusScarab": "Increases your max number of minions by 1\nIncreases the damage and knockback of your minions", + "CelestialStone": "Minor increase to damage, melee speed, critical strike chance,\nlife regeneration, defense, mining speed, and minion knockback", + "Hoverboard": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "Present": "{$CommonItemTooltip.RightClickToOpen}", + "Flipper": "Grants the ability to swim", + "RedRyder": "'Don't shoot your eye out!'", + "FestiveWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BladeofGrass": "Has a chance to poison enemies", + "EldMelter": "Uses gel for ammo", + "ReindeerBells": "Summons a rideable reindeer", + "CnadyCanePickaxe": "Can mine Meteorite", + "HandWarmer": "Provides immunity to chill and freezing effects", + "Coal": "'You've been naughty this year'", + "Toolbox": "Increases block placement & tool range by 1", + "DogWhistle": "Summons a Puppy", + "ChristmasTreeSword": "Shoots Christmas ornaments", + "ChainGun": "50% chance to not consume ammo", + "ObsidianSkull": "Grants immunity to fire blocks", + "Razorpine": "Shoots razor sharp pine needles", + "BlizzardStaff": "Showers an area with icicles", + "SnowmanCannon": "Launches homing missiles", + "NorthPole": "Shoots an icy spear that rains snowflakes", + "NaughtyPresent": "Summons the Frost Moon", + "BabyGrinchMischiefWhistle": "Summons a Baby Grinch", + "StarCannon": "Shoots fallen stars", + "Fez": "'Fezzes are cool'", + "JungleRose": "'It's pretty, oh so pretty'", + "FeralClaws": "12% increased melee speed", + "AnkletoftheWind": "10% increased movement speed", + "StaffofRegrowth": "Creates grass on dirt\nIncreases alchemy plant collection when used to gather", + "WhoopieCushion": "'May annoy others'", + "HeavyWorkBench": "Used for advanced crafting", + "AmmoBox": "Reduces ammo usage by 20%", + "Flamelash": "Summons a controllable ball of fire", + "VenomStaff": "Shoots a venom fang that pierces multiple enemies", + "SpectreMask": "Increases maximum mana by 60 and reduces mana usage by 13%\n5% increased magic damage and critical strike chance", + "BoneWelder": "{$CommonItemTooltip.SpecialCrafting}", + "FleshCloningVaat": "{$CommonItemTooltip.SpecialCrafting}", + "GlassKiln": "{$CommonItemTooltip.SpecialCrafting}", + "LihzahrdFurnace": "{$CommonItemTooltip.SpecialCrafting}", + "LivingLoom": "{$CommonItemTooltip.SpecialCrafting}", + "SkyMill": "{$CommonItemTooltip.SpecialCrafting}", + "IceMachine": "{$CommonItemTooltip.SpecialCrafting}", + "BeetleHelmet": "6% increased melee damage\nEnemies are more likely to target you", + "BeetleScaleMail": "8% increased melee damage and critical strike chance\n6% increased movement and melee speed", + "BeetleShell": "5% increased melee damage and critical strike chance\nEnemies are more likely to target you", + "BeetleLeggings": "6% increased movement and melee speed\nEnemies are more likely to target you", + "SteampunkBoiler": "{$CommonItemTooltip.SpecialCrafting}", + "HoneyDispenser": "{$CommonItemTooltip.SpecialCrafting}", + "BrickLayer": "Increases tile placement speed", + "ExtendoGrip": "Increases block placement & tool range by 3", + "PaintSprayer": "Automatically paints placed objects", + "PortableCementMixer": "Increases wall placement speed", + "CelestialMagnet": "Increases pickup range for mana stars", + "ClayPot": "Grows plants", + "CelestialEmblem": "Increases pickup range for mana stars\n15% increased magic damage", + "CelestialCuffs": "Increases pickup range for mana stars\nRestores mana when damaged", + "PulseBow": "Shoots a charged arrow", + "NaturesGift": "6% reduced mana usage", + "RestorationPotion": "Reduced potion cooldown", + "Gatligator": "50% chance to not consume ammo\nHighly inaccurate", + "WaterGun": "Squirts a harmless stream of water", + "MagicHat": "7% increased magic damage and critical strike chance", + "Gi": "5% increased damage and critical strike chance\n10% increased melee and movement speed", + "GypsyRobe": "6% increased magic damage and critical strike chance\nReduces mana usage by 10%", + "JungleHat": "Increases maximum mana by 40\n4% increased magic critical strike chance", + "BeetleWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "JungleShirt": "Increases maximum mana by 20\n4% increased magic critical strike chance", + "Gel": "'Both tasty and flammable'", + "JunglePants": "Increases maximum mana by 20\n4% increased magic critical strike chance", + "NeonTetra": "'Its colorful scales could sell well.'", + "GoldenCarp": "Quite shiny. This will probably sell well.", + "MiningPotion": "Increases mining speed by 25%", + "HeartreachPotion": "Increases pickup range for life hearts", + "CalmingPotion": "Decreases enemy spawn rate", + "BuilderPotion": "Increases placement speed and range", + "TitanPotion": "Increases knockback", + "FlipperPotion": "Lets you move swiftly in liquids", + "SummoningPotion": "Increases your max number of minions by 1", + "TrapsightPotion": "Allows you to see nearby danger sources", + "WoodenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "IronCrate": "{$CommonItemTooltip.RightClickToOpen}", + "GoldenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "AmmoReservationPotion": "20% chance to not consume ammo", + "LifeforcePotion": "Increases max life by 20%", + "EndurancePotion": "Reduces damage taken by 10%", + "RagePotion": "Increases critical chance by 10%", + "InfernoPotion": "Ignites nearby enemies", + "WrathPotion": "Increases damage by 10%", + "StickyBomb": "A small explosion that will destroy most tiles\n'Tossing may be difficult.'", + "RecallPotion": "Teleports you home", + "TeleportationPotion": "Teleports you to a random location", + "LovePotion": "Throw this to make someone fall in love", + "StinkPotion": "Throw this to make someone smell terrible", + "FishingPotion": "Increases fishing power", + "SonarPotion": "Detects hooked fish", + "CratePotion": "Increases chance to get a crate", + "WarmthPotion": "Reduces damage from cold sources", + "BeeHeadgear": "Increases minion damage by 4%\nIncreases your max number of minions by 1", + "BeeBreastplate": "Increases minion damage by 4%\nIncreases your max number of minions by 1", + "BeeGreaves": "Increases minion damage by 5%", + "HornetStaff": "Summons a hornet to fight for you", + "ImpStaff": "Summons an imp to fight for you", + "AnglerHat": "Increases fishing power", + "AnglerVest": "Increases fishing power", + "AnglerPants": "Increases fishing power", + "Sunglasses": "'Makes you look cool!'", + "SpiderMask": "Increases your max number of minions by 1\nIncreases minion damage by 5%", + "SpiderBreastplate": "Increases your max number of minions by 1\nIncreases minion damage by 5%", + "SpiderGreaves": "Increases your max number of minions by 1\nIncreases minion damage by 6%", + "HighTestFishingLine": "Fishing line will never break", + "AnglerEarring": "Increases fishing power", + "TackleBox": "Decreases chance of bait consumption", + "WizardHat": "15% increased magic damage", + "ZephyrFish": "Summons a pet Zephyr Fish", + "FrogLeg": "Increases jump speed and allows auto-jump\nIncreases fall resistance", + "FinWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "OpticStaff": "Summons twins to fight for you", + "RedHat": "It smells funny...", + "Goldfish": "'It's smiling, might be a good snack'", + "Sandgun": "'This is a good idea!'", + "GuideVoodooDoll": "'You are a terrible person.'", + "DivingHelmet": "Greatly extends underwater breathing", + "DemonScythe": "Casts a demon scythe", + "Blowpipe": "Allows the collection of seeds for ammo", + "Glowstick": "Works when wet", + "Seed": "For use with Blowpipe", + "Aglet": "5% increased movement speed", + "ObsidianSkinPotion": "Provides immunity to lava", + "RegenerationPotion": "Provides life regeneration", + "LifeCrystal": "Permanently increases maximum life by 20", + "SwiftnessPotion": "25% increased movement speed", + "GillsPotion": "Breathe water instead of air", + "IronskinPotion": "Increase defense by 8", + "ManaRegenerationPotion": "Increased mana regeneration", + "MagicPowerPotion": "20% increased magic damage", + "FeatherfallPotion": "Slows falling speed", + "SpelunkerPotion": "Shows the location of treasure and ore", + "InvisibilityPotion": "Grants invisibility and lowers the spawn rate of enemies", + "ShinePotion": "Emits an aura of light", + "NightOwlPotion": "Increases night vision", + "BattlePotion": "Increases enemy spawn rate", + "ThornsPotion": "Attackers also take damage", + "WaterWalkingPotion": "Allows the ability to walk on water", + "ArcheryPotion": "20% increased arrow speed and damage", + "HunterPotion": "Shows the location of enemies", + "GravitationPotion": "Allows the control of gravity", + "IllegalGunParts": "'Banned in most places'", + "GoldenKey": "Opens one locked Gold Chest or Lock Box", + "ShadowKey": "Opens all Shadow Chests and Obsidian Lock Boxes", + "Furnace": "Used for smelting ore", + "Loom": "Used for crafting cloth", + "IronAnvil": "Used to craft items from metal bars", + "Keg": "Used for brewing ale", + "WorkBench": "Used for basic crafting", + "GoblinBattleStandard": "Summons a Goblin Army", + "Sawmill": "Used for advanced wood crafting", + "Pwnhammer": "Strong enough to destroy Demon Altars", + "CobaltHat": "Increases maximum mana by 40\n9% increased magic critical strike chance", + "CobaltHelmet": "7% increased movement speed\n12% increased melee speed", + "CobaltMask": "10% increased ranged damage\n6% increased ranged critical strike chance", + "MythrilHood": "Increases maximum mana by 60\n15% increased magic damage", + "MythrilHelmet": "5% increased melee critical strike chance\n10% increased melee damage", + "MythrilHat": "12% increased ranged damage\n7% increased ranged critical strike chance", + "CobaltDrill": "Can mine Mythril and Orichalcum", + "MythrilDrill": "Can mine Adamantite and Titanium", + "DaoofPow": "Has a chance to confuse\n'Find your inner pieces'", + "Compass": "Displays horizontal position", + "DivingGear": "Grants the ability to swim\nGreatly extends underwater breathing", + "GPS": "Shows position\nTells the time", + "ObsidianHorseshoe": "Negates fall damage\nGrants immunity to fire blocks", + "ObsidianShield": "Grants immunity to knockback\nGrants immunity to fire blocks", + "TinkerersWorkshop": "Allows the combining of some accessories", + "CloudinaBalloon": "Allows the holder to double jump\nIncreases jump height", + "AdamantiteHeadgear": "Increases maximum mana by 80\n11% increased magic damage and critical strike chance", + "AdamantiteHelmet": "7% increased melee critical strike chance\n14% increased melee damage", + "AdamantiteMask": "14% increased ranged damage\n8% increased ranged critical strike chance", + "AdamantiteBreastplate": "6% increased damage", + "AdamantiteLeggings": "4% increased critical strike chance\n5% increased movement speed", + "SpectreBoots": "Allows flight\nThe wearer can run super fast", + "Toolbelt": "Increases block placement range by 1", + "HolyWater": "Spreads the Hallow to some blocks", + "UnholyWater": "Spreads the Corruption to some blocks", + "FairyBell": "Summons a magical fairy", + "SuspiciousLookingEye": "Summons the Eye of Cthulhu", + "ClockworkAssaultRifle": "Three round burst\nOnly the first shot consumes ammo", + "MoonCharm": "Turns the holder into a werewolf at night", + "SorcererEmblem": "15% increased magic damage", + "BandofRegeneration": "Slowly regenerates life", + "WarriorEmblem": "15% increased melee damage", + "RangerEmblem": "15% increased ranged damage", + "DemonWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "AngelWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "RainbowRod": "Casts a controllable rainbow", + "IceRod": "Summons a block of ice", + "NeptunesShell": "Transforms the holder into merfolk when entering water", + "MagicMirror": "Gaze in the mirror to return home", + "Flamethrower": "Uses gel for ammo", + "Wrench": "Places red wire", + "WireCutter": "Removes wire", + "CrystalBullet": "Creates several crystal shards on impact", + "HolyArrow": "Summons falling stars on impact", + "MagicDagger": "A magical returning dagger", + "CrystalStorm": "Summons rapid fire crystal shards", + "CursedFlames": "Summons unholy fire balls", + "SoulofLight": "'The essence of light creatures'", + "SoulofNight": "'The essence of dark creatures'", + "CursedFlame": "'Not even water can put the flame out'", + "CursedTorch": "Can be placed in water", + "AdamantiteForge": "Used to smelt adamantite and titanium ore", + "MythrilAnvil": "Used to craft items from mythril, orichalcum, adamantite, and titanium bars", + "UnicornHorn": "'Sharp and magical!'", + "DarkShard": "'Sometimes carried by creatures in dark deserts'", + "LightShard": "'Sometimes carried by creatures in light deserts'", + "RedPressurePlate": "Activates when stepped on", + "CloudinaBottle": "Allows the holder to double jump", + "SpellTome": "Can be enchanted", + "StarCloak": "Causes stars to fall after taking damage", + "Megashark": "50% chance to not consume ammo\n'Minishark's older brother'", + "Shotgun": "Fires a spread of bullets", + "PhilosophersStone": "Reduces the cooldown of healing potions by 25%", + "HermesBoots": "The wearer can run super fast", + "GreenPressurePlate": "Activates when stepped on", + "GrayPressurePlate": "Activates when a player steps on it", + "BrownPressurePlate": "Activates when a player steps on it", + "MechanicalEye": "Summons The Twins", + "SoulofFright": "'The essence of pure terror'", + "SoulofMight": "'The essence of the destroyer'", + "SoulofSight": "'The essence of omniscient watchers'", + "HallowedPlateMail": "7% increased critical strike chance", + "HallowedGreaves": "7% increased damage\n8% increased movement speed", + "HallowedHelmet": "15% increased ranged damage\n8% increased ranged critical strike chance", + "CrossNecklace": "Increases length of invincibility after taking damage", + "ManaFlower": "8% reduced mana usage\nAutomatically use mana potions when needed", + "MechanicalWorm": "Summons The Destroyer", + "MechanicalSkull": "Summons Skeletron Prime", + "HallowedHeadgear": "Increases maximum mana by 100\n12% increased magic damage and critical strike chance", + "HallowedMask": "10% increased melee damage and critical strike chance\n10% increased melee speed", + "DemoniteOre": "'Pulsing with dark energy'", + "SlimeCrown": "Summons King Slime", + "LightDisc": "Stacks up to 5", + "DemoniteBar": "'Pulsing with dark energy'", + "SoulofFlight": "'The essence of powerful flying creatures'", + "MusicBox": "Has a chance to record songs", + "Drax": "'Not to be confused with a picksaw'", + "Explosives": "Explodes when activated", + "InletPump": "Sends water to outlet pumps", + "OutletPump": "Receives water from inlet pumps", + "Timer1Second": "Activates every second", + "Timer3Second": "Activates every 3 seconds", + "Timer5Second": "Activates every 5 seconds", + "BluePresent": "{$CommonItemTooltip.RightClickToOpen}", + "GreenPresent": "{$CommonItemTooltip.RightClickToOpen}", + "YellowPresent": "{$CommonItemTooltip.RightClickToOpen}", + "SnowGlobe": "Summons the Frost Legion", + "Carrot": "Summons a pet bunny", + "Vilethorn": "Summons a vile thorn", + "Starfury": "Causes stars to rain from the sky\n'Forged with the fury of heaven'", + "PurificationPowder": "Cleanses the evil", + "RedsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "RedsHelmet": "{$CommonItemTooltip.DevItem}", + "RedsBreastplate": "{$CommonItemTooltip.DevItem}", + "RedsLeggings": "{$CommonItemTooltip.DevItem}", + "Fish": "Summons a baby penguin", + "VilePowder": "Spreads the Corruption", + "Frostbrand": "Shoots an icy bolt", + "RedPotion": "'Only for those who are worthy'", + "RottenChunk": "'Looks tasty!'", + "UnholyTrident": "Summons the Devil's trident", + "FrostHelmet": "16% increased melee and ranged damage", + "FrostBreastplate": "11% increased melee and ranged critical strike chance", + "FrostLeggings": "8% increased movement speed\n7% increased melee attack speed", + "WormFood": "Summons the Eater of Worlds", + "TinWatch": "Tells the time", + "TungstenWatch": "Tells the time", + "PlatinumWatch": "Tells the time", + "LeadAnvil": "Used to craft items from metal bars", + "BeamSword": "Shoots a beam of light", + "IceBlade": "Shoots an icy bolt", + "IceBow": "Shoots frost arrows", + "FrostStaff": "Shoots a stream of frost", + "Jetpack": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressUpToBooster}", + "ButterflyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "FallenStar": "Disappears after the sunrise", + "Seaweed": "Summons a pet turtle", + "FairyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "Clentaminator": "Creates and destroys biomes when sprayed\nUses colored solution", + "GreenSolution": "Used by the Clentaminator\nSpreads the Purity", + "BlueSolution": "Used by the Clentaminator\nSpreads the Hallow", + "PurpleSolution": "Used by the Clentaminator\nSpreads the Corruption", + "DarkBlueSolution": "Used by the Clentaminator\nSpreads Glowing Mushrooms", + "RedSolution": "Used by the Clentaminator\nSpreads the Crimson", + "HarpyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BoneWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "Hammush": "Strong enough to destroy Demon Altars", + "NettleBurst": "Summons a thorn spear", + "CrimsonHelmet": "2% increased damage", + "CrimsonScalemail": "2% increased damage", + "CrimsonGreaves": "2% increased damage", + "DeathbringerPickaxe": "Able to mine Hellstone", + "Torch": "Provides light", + "FlameWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "FrozenWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "GhostWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "LivingWoodWand": "Places living wood", + "GrapplingHook": "'Get over here!'", + "Actuator": "Enables solid blocks to be toggled on and off", + "Chain": "Can be climbed on", + "BlueWrench": "Places blue wire", + "GreenWrench": "Places green wire", + "BluePressurePlate": "Activates when a player steps on it", + "YellowPressurePlate": "Activates when anything but a player steps on it", + "DiscountCard": "Shops prices lowered by 20%", + "LuckyCoin": "Hitting enemies will sometimes drop extra coins", + "UnicornonaStick": "'Having a wonderful time!'", + "SandstorminaBottle": "Allows the holder to do an improved double jump", + "CharmofMyths": "Provides life regeneration and reduces the cooldown of healing potions by 25%", + "MoonShell": "Turns the holder into a werewolf at night and a merfolk when entering water", + "StarVeil": "Causes stars to fall and increases length of invincibility after taking damage", + "WaterWalkingBoots": "Provides the ability to walk on water & honey", + "MiningHelmet": "Provides light when worn", + "AdhesiveBandage": "Immunity to Bleeding", + "ArmorPolish": "Immunity to Broken Armor", + "Bezoar": "Immunity to Poison", + "Blindfold": "Immunity to Darkness", + "FastClock": "Immunity to Slow", + "Megaphone": "Immunity to Silence", + "Nazar": "Immunity to Curse", + "Vitamins": "Immunity to Weakness", + "TrifoldMap": "Immunity to Confusion", + "LightningBoots": "Allows flight, super fast running\n8% increased movement speed", + "SunStone": "If worn during the day, grants minor increase to damage, melee speed, critical strike chance,\nlife regeneration, defense, mining speed, and minion knockback", + "MoonStone": "If worn during the night, grants minor increase to damage, melee speed, critical strike chance,\nlife regeneration, defense, mining speed, and minion knockback", + "ArmorBracing": "Immunity to Weakness and Broken Armor", + "MedicatedBandage": "Immunity to Poison and Bleeding", + "ThePlan": "Immunity to Slow and Confusion", + "CountercurseMantra": "Immunity to Silence and Curse", + "CoinGun": "Uses coins for ammo\nHigher valued coins do more damage", + "LavaCharm": "Provides 7 seconds of immunity to lava", + "ObsidianWaterWalkingBoots": "Provides the ability to walk on water & honey\nGrants immunity to fire blocks", + "LavaWaders": "Provides the ability to walk on water, honey & lava\nGrants immunity to fire blocks and 7 seconds of immunity to lava", + "BoneWand": "Places bone", + "LeafWand": "Places leaves", + "FlyingCarpet": "Allows the owner to float for a few seconds", + "AvengerEmblem": "12% increased damage", + "LandMine": "Explodes when stepped on", + "PaladinsShield": "Absorbs 25% of damage done to players on your team when above 25% life\nGrants immunity to knockback", + "Umbrella": "You will fall slower while holding this", + "ChlorophyteOre": "'Reacts to the light'", + "SteampunkWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "IceSkates": "Provides extra mobility on ice\nIce will not break when you fall on it", + "SnowballLauncher": "Rapidly launches snowballs", + "ClimbingClaws": "Allows the ability to slide down walls\nImproved ability if combined with Shoe Spikes", + "AncientShadowHelmet": "7% increased melee speed", + "AncientShadowScalemail": "7% increased melee speed", + "AncientShadowGreaves": "7% increased melee speed", + "AncientCobaltHelmet": "Increases maximum mana by 40\n4% increased magic critical strike chance", + "AncientCobaltBreastplate": "Increases maximum mana by 20\n4% increased magic critical strike chance", + "AncientCobaltLeggings": "Increases maximum mana by 20\n4% increased magic critical strike chance", + "BlackBelt": "Gives a chance to dodge attacks", + "Boomstick": "Fires a spread of bullets", + "Rope": "Can be climbed on", + "Campfire": "Life regen is increased when near a campfire", + "Marshmallow": "Put it on a stick and roast over a campfire\n{$CommonItemTooltip.MinorStats}\n'How many can you fit in your mouth?'", + "MarshmallowonaStick": "Roast it over a campfire!", + "ShoeSpikes": "Allows the ability to slide down walls\nImproved ability if combined with Climbing Claws", + "TigerClimbingGear": "Allows the ability to climb walls", + "Tabi": "Allows the ability to dash\nDouble tap a direction", + "Minishark": "33% chance to not consume ammo\n'Half shark, half gun, completely awesome.'", + "ManaRegenerationBand": "Increases maximum mana by 20\nIncreases mana regeneration rate", + "SandstorminaBalloon": "Allows the holder to double jump\nIncreases jump height", + "MasterNinjaGear": "Allows the ability to climb walls and dash\nGives a chance to dodge attacks", + "RopeCoil": "Throw to create a climbable line of rope", + "Blowgun": "Allows the collection of seeds for ammo", + "BlizzardinaBottle": "Allows the holder to double jump", + "EnchantedSword": "Shoots an enchanted sword beam", + "PickaxeAxe": "'Not to be confused with a hamdrill'", + "EatersBone": "Summons a Baby Eater of Souls", + "BlendOMatic": "Used to craft objects", + "MeatGrinder": "Used to craft objects", + "Extractinator": "Placing silt/slush/fossil piles into the extractinator turns them into something more useful", + "Solidifier": "Used to craft objects", + "ActuationAccessory": "Automatically places actuators on placed objects", + "ActuationRod": "Activates Actuators", + "AlchemyTable": "33% chance to not consume potion crafting ingredients", + "AncientBattleArmorHat": "15% increased magic and minion damage", + "AncientBattleArmorPants": "Increases maximum mana by 40\nIncreases your max number of minions by 1", + "AncientBattleArmorShirt": "Increases maximum mana by 40\nIncreases your max number of minions by 1", + "AncientHorn": "Summons a rideable basilisk mount", + "AnglerTackleBag": "Fishing line will never break, Decreases chance of bait consumption, Increases fishing power", + "ArchitectGizmoPack": "Increases block & wall placement speed\nIncreases block placement & tool range by 3\nAutomatically paints placed objects", + "AviatorSunglasses": "Enables your inner wingman\n'Great for impersonating streamers!'", + "BalloonHorseshoeFart": "Allows the holder to double jump\nIncreases jump height and negates fall damage", + "BalloonHorseshoeHoney": "Releases bees when damaged\nIncreases jump height and negates fall damage", + "BalloonHorseshoeSharkron": "Allows the holder to double jump\nIncreases jump height and negates fall damage", + "BalloonPufferfish": "Increases jump height", + "BeesKnees": "Wooden arrows turn into a column of bees", + "BejeweledValkyrieBody": "{$CommonItemTooltip.DevItem}\nBejeweled and elegant for soaring through the thundering skies", + "BejeweledValkyrieHead": "{$CommonItemTooltip.DevItem}\nBecome the wind, ride the lightning.", + "BejeweledValkyrieWing": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}\nThe Valkyrie Satellite Barrier Platform is totally safe. Most of the time.", + "BewitchingTable": " to have more minions", + "Bladetongue": "Spits an Ichor stream on contact", + "BlessedApple": "Summons a rideable unicorn mount", + "BloodWater": "Spreads the Crimson to some blocks", + "BombFish": "A small explosion that will destroy most tiles", + "BoneCampfire": "Life regen is increased when near a campfire", + "BoneRattle": "Summons a Baby Face Monster", + "BoneTorch": "'Emits a deathly glow'", + "BoosterTrack": "Hammer to change direction", + "BottomlessBucket": "Contains an endless amount of water\nCan be poured out", + "BouncyBomb": "A small explosion that will destroy most tiles\nVery bouncy", + "BouncyDynamite": "A large explosion that will destroy most tiles\n'This will prove to be a terrible idea'", + "BouncyGlowstick": "Works when wet", + "BouncyGrenade": "A small explosion that will not destroy tiles\nVery bouncy", + "BrainOfConfusion": "Has a chance to create illusions and dodge an attack\nTemporarily increase critical chance after dodge\nMay confuse nearby enemies after being struck", + "BrainScrambler": "Summons a rideable Scutlix mount", + "BubbleGun": "Rapidly shoots forceful bubbles", + "ButchersChainsaw": "Sparks emit from struck enemies", + "CelestialShell": "Turns the holder into a werewolf at night and a merfolk when entering water\nMinor increase to damage, melee speed, critical strike chance,\nlife regeneration, defense, mining speed, and minion knockback", + "CelestialSigil": "Summons the Impending Doom", + "CellPhone": "Displays everything\nAllows you to return home at will", + "ClingerStaff": "Summons a wall of cursed flames", + "CogWall": "Productivity up 200%", + "CoinRing": "Increases coin pickup range\nHitting enemies will sometimes drop extra coins", + "CompanionCube": "Susceptible to lava!", + "CordageGuide": "Allows the collection of Vine Rope from vines", + "CorruptFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "CosmicCarKey": "Summons a rideable UFO mount", + "CrimsonFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "CrimsonHeart": "Summons a heart to provide light", + "CrystalSerpent": "Shoots an explosive crystal charge", + "CrystalVileShard": "Summons a massive crystal spike", + "CursedCampfire": "Life regen is increased when near a campfire", + "DaedalusStormbow": "Shoots arrows from the sky", + "DayBreak": "'Rend your foes asunder with a spear of light!'", + "DemonCampfire": "Life regen is increased when near a campfire", + "DemonHeart": "Permanently increases the number of accessory slots", + "Detonator": "'Guts... and Gory!'", + "DevDye": "{$CommonItemTooltip.DevItem}", + "DjinnsCurse": "Grants slow fall in exchange for your feet", + "DPSMeter": "Displays your damage per second", + "DrillContainmentUnit": "Summons a rideable Drill mount", + "DungeonFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "EoCShield": "Allows the player to dash into the enemy\nDouble tap a direction", + "FishermansGuide": "Displays fishing information", + "FishFinder": "Displays weather, moon phase, and fishing information", + "FishronWings": "{$CommonItemTooltip.FlightAndSlowfall}\nAllows quick travel in water", + "Flairon": "Spews homing bubbles", + "FleshKnuckles": "Enemies are more likely to target you", + "FloatingIslandFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "FlowerBoots": "Flowers grow on the grass you walk on", + "FlyingKnife": "Throws a controllable flying knife", + "FragmentNebula": "'The power of a galaxy resides within this fragment'", + "FragmentSolar": "'The fury of the universe lies within this fragment'", + "FragmentStardust": "'Entrancing particles revolve around this fragment'", + "FragmentVortex": "'Swirling energies emanate from this fragment'", + "FrozenCampfire": "Life regen is increased when near a campfire", + "FuzzyCarrot": "Summons a rideable Bunny mount", + "GemLockAmber": " to place or remove Large Ambers", + "GemLockAmethyst": " to place or remove Large Amethysts", + "GemLockDiamond": " to place or remove Large Diamonds", + "GemLockEmerald": " to place or remove Large Emeralds", + "GemLockRuby": " to place or remove Large Rubies", + "GemLockSapphire": " to place or remove Large Sapphires", + "GemLockTopaz": " to place or remove Large Topazes", + "GoblinTech": "Displays movement speed, damage per second, and valuable ore", + "GoldPickaxe": "Can mine Meteorite", + "GoldRing": "Increases coin pickup range", + "GreedyRing": "Increases coin pickup range and shops prices lowered by 20%\nHitting enemies will sometimes drop extra coins", + "HallowedFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "HardySaddle": "Summons a rideable Turtle mount", + "HellwingBow": "Wooden arrows turn into flaming bats", + "HerbBag": "{$CommonItemTooltip.RightClickToOpen}", + "HiveBackpack": "Increases the strength of friendly bees", + "HoneyedGoggles": "Summons a rideable Bee mount", + "IceMirror": "Gaze in the mirror to return home", + "IchorCampfire": "Life regen is increased when near a campfire", + "JimsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "JungleFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LargeAmber": "For Capture the Gem. It drops when you die", + "LaserRuler": "Creates measurement lines on screen for block placement", + "LastPrism": "'Fire a lifeform disintegration rainbow'", + "LifeformAnalyzer": "Displays the name of rare creatures around you", + "LightKey": "'Charged with the essence of many souls'", + "LivingMahoganyLeafWand": "Places rich mahogany leaves", + "LivingMahoganyWand": "Places living rich mahogany", + "LockBox": "{$CommonItemTooltip.RightClickToOpen}\nRequires a Golden Key", + "LogicGateLamp_Faulty": "Place this on logic gate lamps to randomize the activation", + "LogicGateLamp_Off": "Place this on logic gates to add checks", + "LogicGateLamp_On": "Place this on logic gates to add checks", + "LogicGate_NOR": "Judges logic gate lamps above it\nActivates when no lamp is on, Deactivates otherwise", + "LogicGate_NXOR": "Judges logic gate lamps above it\nActivates when the total 'on' lamps is not one, Deactivates otherwise\nAlso often called NXOR", + "LogicGate_OR": "Judges logic gate lamps above it\nActivates when any lamp is on, Deactivates otherwise", + "LogicGate_XOR": "Judges logic gate lamps above it\nActivates when only one lamp is on, Deactivates otherwise", + "LogicSensor_Above": "Activates whenever players are over it, deactivates otherwise", + "LogicSensor_Honey": "Activates whenever occupied by honey, deactivates otherwise", + "LogicSensor_Lava": "Activates whenever occupied by lava, deactivates otherwise", + "LogicSensor_Liquid": "Activates whenever occupied by liquid, deactivates otherwise", + "LogicSensor_Moon": "Activates once night starts", + "LogicSensor_Sun": "Activates once day starts", + "LogicSensor_Water": "Activates whenever occupied by water, deactivates otherwise", + "LokisDye": "{$CommonItemTooltip.DevItem}", + "LokisHelm": "{$CommonItemTooltip.DevItem}\nDisorder came from order, fear came from courage, weakness came from strength", + "LokisPants": "{$CommonItemTooltip.DevItem}\nWheels of justice grind slow but grind fine.", + "LokisShirt": "{$CommonItemTooltip.DevItem}\nKnow thy self, know thy enemy. A thousand battles, a thousand victories…", + "LokisWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}\nLet your plans be dark and impenetrable as night, and when you move, fall like a thunderbolt.", + "LunarBar": "'It vibrates with luminous celestial energy'", + "LunarCraftingStation": "Used to craft items from Lunar Fragments and Luminite", + "LunarFlareBook": "Rains down lunar flares", + "LunarHook": "'You want the moon? Just grapple it and pull it down!'", + "LunarOre": "'A pebble of the heavens'", + "MagicLantern": "Summons a magic lantern that exposes nearby treasure", + "MechanicalLens": "Grants improved wire vision", + "MetalDetector": "Displays the most valuable ore around you", + "MeteorStaff": "Showers meteors", + "Minecart": "Let's ride the rails", + "MinecartTrack": "Hammer end piece to change bumper style\nHammer intersections to change direction", + "MolotovCocktail": "A small explosion that puts enemies on fire\nLights nearby area on fire for a while", + "MoneyTrough": "Summons a flying piggy bank to store your items", + "MoonlordArrow": "'Shooting them down at the speed of sound!'", + "MoonlordBullet": "'Line 'em up and knock 'em down...'", + "MoonlordTurretStaff": "{$CommonItemTooltip.Sentry}\nSummons a lunar portal to shoot lasers at your enemies", + "MothronWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "MulticolorWrench": " while holding to edit wire settings", + "NebulaArcanum": "'Conjure masses of astral energy to chase down your foes'", + "NebulaBlaze": "'From Orion's belt to the palm of your hand'", + "NebulaBreastplate": "9% increased magic damage and critical strike chance", + "NebulaHelmet": "Increases maximum mana by 60 and reduces mana usage by 15% \n7% increased magic damage and critical strike chance", + "NebulaLeggings": "10% increased magic damage\n10% increased movement speed", + "NebulaMonolith": "'Wield a small amount of power from the Nebula Tower'", + "NightKey": "'Charged with the essence of many souls'", + "NightVisionHelmet": "Improves vision", + "PartyBundleOfBalloonTile": "'Tied down for everyone's pleasure'", + "PartyGirlGrenade": "A small explosion that will not destroy tiles", + "PartyMonolith": "'Balloons shall rain from the sky'", + "PartyPresent": "Wonder what's inside?", + "PDA": "Displays everything", + "PeaceCandle": "Makes surrounding creatures less hostile", + "PedguinHat": "Become the Pedguin\n'Great for impersonating streamers!'", + "PedguinPants": "Become the Pedguin\n'Great for impersonating streamers!'", + "PedguinShirt": "Become the Pedguin\n'Great for impersonating streamers!'", + "Phantasm": "66% chance to not consume ammo", + "Pigronata": "Beat the shindig out of it!\nMay contain a suprise!", + "PinkGel": "'Bouncy and sweet!'", + "PinkSlimeBlock": "Very bouncy", + "PirateStaff": "Summons pirates to fight for you", + "PixelBox": "Separates wire paths\nLights off from horizontal signals\nLights on from crossed signals", + "PlatinumPickaxe": "Can mine Meteorite", + "PocketMirror": "Immunity to petrification", + "PressureTrack": "Not for use on slopes", + "ProjectilePressurePad": "Activates when a projectile touches it", + "PsychoKnife": "Allows you to go into stealth mode", + "PutridScent": "Enemies are less likely to target you\n5% increased damage and critical strike chance", + "QueenSpiderStaff": "{$CommonItemTooltip.Sentry}\nSummons a spider queen to spit eggs at your enemies", + "Radar": "Detects enemies around you", + "RainbowCampfire": "Life regen is increased when near a campfire", + "RainbowCrystalStaff": "{$CommonItemTooltip.Sentry}\nSummons a radiant crystal that banishes your enemies\n'The colors, Duke, the colors!'", + "RazorbladeTyphoon": "Casts fast moving razorwheels", + "RedsYoyo": "{$CommonItemTooltip.DevItem}", + "REK": "Displays number of monsters, kill count, and rare creatures", + "RoyalGel": "Slimes become friendly", + "SailfishBoots": "The wearer can run super fast", + "SandFallBlock": "Falling sand you can safely watch", + "SandFallWall": "Falling sand you can safely watch", + "ScalyTruffle": "Summons a rideable Pigron mount", + "Sextant": "Displays the phase of the moon", + "ShadowFlameBow": "Shoots Shadowflame Arrows", + "ShadowFlameHexDoll": "Summons Shadowflame tentacles to strike your foe", + "ShadowFlameKnife": "Inflicts Shadowflame on hit", + "SharkronBalloon": "Increases jump height\nAllows the holder to double jump", + "SharkToothNecklace": "Increases armor penetration by 5", + "SharpeningStation": "Increases armor penetration for melee weapons", + "ShinyStone": "Greatly increases life regen when not moving", + "ShrimpyTruffle": "Attracts a legendary creature which flourishes in water & combat", + "SilkRope": "Can be climbed on", + "SilkRopeCoil": "Throw to create a climbable line of silk rope", + "SillyBalloonGreen": "'Smells like mint and glee'", + "SillyBalloonGreenWall": "'Smells like mint and glee'", + "SillyBalloonMachine": "It never stops celebrating!", + "SillyBalloonPink": "'Smells like bubblegum and happiness'", + "SillyBalloonPinkWall": "'Smells like bubblegum and happiness'", + "SillyBalloonPurple": "'Smells like lavender and enthusiasm'", + "SillyBalloonPurpleWall": "'Smells like lavender and enthusiasm'", + "SillyStreamerBlue": "Oddly durable enough to climb!", + "SillyStreamerGreen": "Oddly durable enough to climb!", + "SillyStreamerPink": "Oddly durable enough to climb!", + "SkiphsHelm": "{$CommonItemTooltip.DevItem}", + "SkiphsPants": "{$CommonItemTooltip.DevItem}", + "SkiphsShirt": "{$CommonItemTooltip.DevItem}", + "SkiphsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "SliceOfCake": "'Stuff your face. Stuff someone else's face. Whatever.'", + "SlimeGun": "Squirts a harmless stream of slime", + "SlimySaddle": "Summons a rideable Slime mount", + "SnowCloudBlock": "It gets pretty cold up there", + "SnowFallBlock": "A lot cooler than a snow globe", + "SnowFallWall": "A lot cooler than a snow globe", + "SolarEruption": "'Strike with the fury of the sun'", + "SolarFlareBreastplate": "29% increased melee damage\nGrants minor life regeneration\nEnemies are more likely to target you", + "SolarFlareHelmet": "26% increased melee critical strike chance\nGrants minor life regeneration\nEnemies are more likely to target you", + "SolarFlareLeggings": "15% increased movement and melee speed\nGrants minor life regeneration\nEnemies are more likely to target you", + "SolarMonolith": "'Wield a small amount of power from the Solar Tower'", + "SolarTablet": "Summons the Eclipse", + "SoulDrain": "Drains life from enemies", + "SpelunkerGlowstick": "Exposes nearby treasure", + "SpiderStaff": "Summons spiders to fight for you", + "SporeSac": "Summons spores over time that will damage enemies", + "StardustBreastplate": "Increases your max number of minions by 2\nIncreases minion damage by 22%", + "StardustCellStaff": "Summons a stardust cell to fight for you\n'Cultivate the most beautiful cellular infection'", + "StardustDragonStaff": "Summons a stardust dragon to fight for you\n'Who needs a horde of minions when you have a giant dragon?'", + "StardustHelmet": "Increases your max number of minions by 1\nIncreases minion damage by 22%", + "StardustLeggings": "Increases your max number of minions by 2\nIncreases minion damage by 22%", + "StardustMonolith": "'Wield a small amount of power from the Stardust Tower'", + "StickyDynamite": "A large explosion that will destroy most tiles\n'Tossing may be difficult.'", + "StickyGrenade": "A small explosion that will not destroy tiles\n'Tossing may be difficult.'", + "Stopwatch": "Displays how fast the player is moving", + "StrangeBrew": "'It looks and smells terrible'", + "StrangePlant1": "Can be traded for rare dyes", + "StrangePlant2": "Can be traded for rare dyes", + "StrangePlant3": "Can be traded for rare dyes", + "StrangePlant4": "Can be traded for rare dyes", + "SummonerEmblem": "15% increased summon damage", + "Sundial": "Allows time to fast forward one day per week", + "SuperAbsorbantSponge": "Capable of soaking up an endless amount of water", + "SuspiciousLookingTentacle": "Calls upon a suspicious looking eye to provide light\n'I know what you're thinking....'", + "TallyCounter": "Displays how many monsters have been killed", + "TartarSauce": "Summons a mini minotaur", + "TempestStaff": "Summons sharknados to fight for you", + "TheBrideDress": "'Mawwiage...'", + "TheBrideHat": "'Wuv... twue wuv...'", + "Toxikarp": "Spits toxic bubbles", + "Tsunami": "Shoots 5 arrows at a time", + "TsunamiInABottle": "Allows the holder to double jump", + "TungstenPickaxe": "Can mine Meteorite", + "UltraBrightCampfire": "Life regen is increased when near a campfire", + "ValkyrieYoyo": "{$CommonItemTooltip.DevItem}", + "ViciousPowder": "Spreads the Crimson", + "VineRope": "Can be climbed on", + "VineRopeCoil": "Throw to create a climbable line of vine rope", + "VortexBeater": "66% chance to not consume ammo\n'The catastrophic mixture of pew pew and boom boom.'", + "VortexBreastplate": "12% increased ranged damage and critical strike chance\n25% chance not to consume ammo", + "VortexHelmet": "16% increased ranged damage\n7% increased ranged critical strike chance", + "VortexLeggings": "8% increased ranged damage and critical strike chance\n10% increased movement speed", + "VortexMonolith": "'Wield a small amount of power from the Vortex Tower'", + "WandofSparking": "Shoots a small spark", + "WeaponRack": " to place item on weapon rack", + "WeatherRadio": "Displays the weather", + "WebRope": "Can be climbed on", + "WebRopeCoil": "Throw to create a climbable line of web rope", + "WeightedPressurePlateCyan": "Activates when a player steps on or off it", + "WeightedPressurePlateOrange": "Activates when a player steps on or off it", + "WeightedPressurePlatePink": "Activates when a player steps on or off it", + "WeightedPressurePlatePurple": "Activates when a player steps on or off it", + "WingsNebula": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "WingsSolar": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsStardust": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsVortex": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "WireBulb": "Lights up bulbs for each wire color", + "WireKite": "Allows ultimate control over wires!\n while holding to edit wire settings", + "WirePipe": "Separates wire paths\nIt's also hammerable!", + "WormholePotion": "Teleports you to a party member\nClick their head on the fullscreen map", + "WormScarf": "Reduces damage taken by 17%", + "XenoStaff": "Summons a UFO to fight for you", + "YellowWrench": "Places yellow wire", + "Yoraiz0rDarkness": "{$CommonItemTooltip.DevItem}\nIf you see this you should probably run away...", + "Yoraiz0rHead": "{$CommonItemTooltip.DevItem}", + "Yoraiz0rPants": "{$CommonItemTooltip.DevItem}", + "Yoraiz0rShirt": "{$CommonItemTooltip.DevItem}", + "Yoraiz0rWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}\nWhatever this accessory does to you is not a bug!", + "YoyoBag": "Gives the user master yoyo skills", + "YoYoGlove": "Allows the use of two yoyos at once", + "BloodMoonRising": "{$PaintingArtist.Garner}", + "TheHangedMan": "{$PaintingArtist.Garner}", + "GloryoftheFire": "{$PaintingArtist.Garner}", + "BoneWarp": "{$PaintingArtist.Garner}", + "SkellingtonJSkellingsworth": "{$PaintingArtist.Garner}", + "TheCursedMan": "{$PaintingArtist.Garner}", + "TheEyeSeestheEnd": "{$PaintingArtist.Garner}", + "SomethingEvilisWatchingYou": "{$PaintingArtist.Moosdijk}", + "TheTwinsHaveAwoken": "{$PaintingArtist.Moosdijk}", + "TheScreamer": "{$PaintingArtist.Crowno}", + "GoblinsPlayingPoker": "{$PaintingArtist.Garner}", + "Dryadisque": "{$PaintingArtist.Garner}", + "Sunflowers": "{$PaintingArtist.Garner}", + "TerrarianGothic": "{$PaintingArtist.Garner}", + "Impact": "{$PaintingArtist.Wright}", + "PoweredbyBirds": "{$PaintingArtist.Ness}", + "TheDestroyer": "{$PaintingArtist.Moosdijk}", + "ThePersistencyofEyes": "{$PaintingArtist.Crowno}", + "UnicornCrossingtheHallows": "{$PaintingArtist.Crowno}", + "GreatWave": "{$PaintingArtist.Crowno}", + "StarryNight": "{$PaintingArtist.Crowno}", + "GuidePicasso": "{$PaintingArtist.Crowno}", + "TheGuardiansGaze": "{$PaintingArtist.Kolf}", + "FatherofSomeone": "{$PaintingArtist.Crowno}", + "NurseLisa": "{$PaintingArtist.Garner}", + "DarkSoulReaper": "{$PaintingArtist.Myhre}", + "Land": "{$PaintingArtist.Myhre}", + "TrappedGhost": "{$PaintingArtist.Myhre}", + "DemonsEye": "{$PaintingArtist.Myhre}", + "FindingGold": "{$PaintingArtist.Myhre}", + "FirstEncounter": "{$PaintingArtist.Crowno}", + "GoodMorning": "{$PaintingArtist.Crowno}", + "UndergroundReward": "{$PaintingArtist.Crowno}", + "ThroughtheWindow": "{$PaintingArtist.Crowno}", + "PlaceAbovetheClouds": "{$PaintingArtist.Crowno}", + "DoNotStepontheGrass": "{$PaintingArtist.Crowno}", + "ColdWatersintheWhiteLand": "{$PaintingArtist.Crowno}", + "LightlessChasms": "{$PaintingArtist.Crowno}", + "TheLandofDeceivingLooks": "{$PaintingArtist.Crowno}", + "Daylight": "{$PaintingArtist.Crowno}", + "SecretoftheSands": "{$PaintingArtist.Crowno}", + "DeadlandComesAlive": "{$PaintingArtist.Crowno}", + "EvilPresence": "{$PaintingArtist.Crowno}", + "SkyGuardian": "{$PaintingArtist.Crowno}", + "AmericanExplosive": "{$PaintingArtist.Kolf}", + "Discover": "{$PaintingArtist.Myhre}", + "HandEarth": "{$PaintingArtist.Myhre}", + "OldMiner": "{$PaintingArtist.Myhre}", + "Skelehead": "{$PaintingArtist.Myhre}", + "FacingtheCerebralMastermind": "{$PaintingArtist.Kolf}", + "LakeofFire": "{$PaintingArtist.Garner}", + "TrioSuperHeroes": "{$PaintingArtist.Burczyk}", + "ImpFace": "{$PaintingArtist.Myhre}", + "OminousPresence": "{$PaintingArtist.Craig}", + "ShiningMoon": "{$PaintingArtist.Craig}", + "LivingGore": "{$PaintingArtist.Craig}", + "FlowingMagma": "{$PaintingArtist.Craig}", + "TheCreationoftheGuide": "{$PaintingArtist.Garner}", + "TheMerchant": "{$PaintingArtist.Garner}", + "CrownoDevoursHisLunch": "{$PaintingArtist.Garner}", + "RareEnchantment": "{$PaintingArtist.Phelps}", + "GloriousNight": "{$PaintingArtist.Duncan}", + "AnglerFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AnglerFish}", + "AngryNimbusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryNimbus}", + "AnomuraFungusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AnomuraFungus}", + "AntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Antlion}", + "ArapaimaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Arapaima}", + "ArmoredSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ArmoredSkeleton}", + "BatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CaveBat}", + "BirdBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Bird}", + "BlackRecluseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlackRecluse}", + "BloodFeederBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodFeeder}", + "BloodJellyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodJelly}", + "BloodCrawlerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodCrawler}", + "BoneSerpentBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BoneSerpentHead}", + "BunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Bunny}", + "ChaosElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ChaosElemental}", + "MimicBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mimic}", + "ClownBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Clown}", + "CorruptBunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptBunny}", + "CorruptGoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptGoldfish}", + "CrabBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crab}", + "CrimeraBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crimera}", + "CrimsonAxeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonAxe}", + "CursedHammerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CursedHammer}", + "DemonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Demon}", + "DemonEyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DemonEye}", + "DerplingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Derpling}", + "EaterofSoulsBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EaterofSouls}", + "EnchantedSwordBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EnchantedSword}", + "ZombieEskimoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieEskimo}", + "FaceMonsterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FaceMonster}", + "FloatyGrossBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FloatyGross}", + "FlyingFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingFish}", + "FlyingSnakeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingSnake}", + "FrankensteinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Frankenstein}", + "FungiBulbBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FungiBulb}", + "FungoFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FungoFish}", + "GastropodBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Gastropod}", + "GoblinThiefBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinThief}", + "GoblinSorcererBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinSorcerer}", + "GoblinPeonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinPeon}", + "GoblinScoutBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinScout}", + "GoblinWarriorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinWarrior}", + "GoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Goldfish}", + "HarpyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Harpy}", + "HellbatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hellbat}", + "HerplingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Herpling}", + "HornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hornet}", + "IceElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceElemental}", + "IcyMermanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IcyMerman}", + "FireImpBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FireImp}", + "JellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueJellyfish}", + "JungleCreeperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleCreeper}", + "LihzahrdBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LihzahrdCrawler}", + "ManEaterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ManEater}", + "MeteorHeadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MeteorHead}", + "MothBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Moth}", + "MummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mummy}", + "MushiLadybugBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MushiLadybug}", + "ParrotBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Parrot}", + "PigronBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PigronCorruption}", + "PiranhaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Piranha}", + "PirateBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateDeckhand}", + "PixieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Pixie}", + "RaincoatZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieRaincoat}", + "ReaperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Reaper}", + "SharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Shark}", + "SkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Skeleton}", + "SkeletonMageBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DarkCaster}", + "SlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueSlime}", + "SnowFlinxBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowFlinx}", + "SpiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WallCreeper}", + "SporeZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieMushroom}", + "SwampThingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SwampThing}", + "TortoiseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantTortoise}", + "ToxicSludgeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ToxicSludge}", + "UmbrellaSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UmbrellaSlime}", + "UnicornBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Unicorn}", + "VampireBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VampireBat}", + "VultureBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Vulture}", + "NypmhBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nymph}", + "WerewolfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Werewolf}", + "WolfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Wolf}", + "WorldFeederBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SeekerHead}", + "WormBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantWormHead}", + "WraithBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Wraith}", + "WyvernBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WyvernHead}", + "ZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Zombie}", + "JackingSkeletron": "{$PaintingArtist.Crowno}", + "BitterHarvest": "{$PaintingArtist.Lazure}", + "BloodMoonCountess": "{$PaintingArtist.Lazure}", + "HallowsEve": "{$PaintingArtist.Lazure}", + "MorbidCuriosity": "{$PaintingArtist.Lazure}", + "StarTopper1": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "StarTopper2": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "StarTopper3": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BowTopper": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndRedGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenAndWhiteGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "MulticoloredBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndYellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndRedBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndYellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "MulticoloredLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndYellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndBlueLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueAndYellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "PillaginMePixels": "{$PaintingArtist.Lazure}", + "PaintingCastleMarsberg": "{$PaintingArtist.Lazure}", + "PaintingMartiaLisa": "{$PaintingArtist.Lazure}", + "PaintingTheTruthIsUpThere": "{$PaintingArtist.Lazure}", + "AngryTrapperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryTrapper}", + "ArmoredVikingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ArmoredViking}", + "BlackSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlackSlime}", + "BlueArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueArmoredBones}", + "BlueCultistArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistArcherBlue}", + "BlueCultistCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "BlueCultistFighterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "BoneLeeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BoneLee}", + "ClingerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Clinger}", + "CochinealBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CochinealBeetle}", + "CorruptPenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptPenguin}", + "CorruptSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptSlime}", + "CorruptorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Corruptor}", + "CrimslimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crimslime}", + "CursedSkullBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CursedSkull}", + "CyanBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CyanBeetle}", + "DevourerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DevourerHead}", + "DiablolistBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DiabolistRed}", + "DoctorBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DoctorBones}", + "DungeonSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DungeonSlime}", + "DungeonSpiritBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DungeonSpirit}", + "ElfArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ElfArcher}", + "ElfCopterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ElfCopter}", + "EyezorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Eyezor}", + "FlockoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Flocko}", + "GhostBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Ghost}", + "GiantBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantBat}", + "GiantCursedSkullBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantCursedSkull}", + "GiantFlyingFoxBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantFlyingFox}", + "GingerbreadManBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GingerbreadMan}", + "GoblinArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinArcher}", + "GreenSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreenSlime}", + "HeadlessHorsemanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HeadlessHorseman}", + "HellArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HellArmoredBones}", + "HellhoundBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hellhound}", + "HoppinJackBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HoppinJack}", + "IceBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceBat}", + "IceGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceGolem}", + "IceSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceSlime}", + "IchorStickerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IchorSticker}", + "IlluminantBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IlluminantBat}", + "IlluminantSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IlluminantSlime}", + "JungleBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleBat}", + "JungleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleSlime}", + "KrampusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Krampus}", + "LacBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LacBeetle}", + "LavaBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Lavabat}", + "LavaSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LavaSlime}", + "MartianBrainscramblerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BrainScrambler}", + "MartianDroneBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianDrone}", + "MartianEngineerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianEngineer}", + "MartianGigazapperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GigaZapper}", + "MartianGreyGruntBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GrayGrunt}", + "MartianOfficerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianOfficer}", + "MartianRaygunnerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RayGunner}", + "MartianScutlixGunnerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ScutlixRider}", + "MartianTeslaTurretBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianTurret}", + "MisterStabbyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MisterStabby}", + "MotherSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MotherSlime}", + "NecromancerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Necromancer}", + "NutcrackerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nutcracker}", + "PaladinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Paladin}", + "PenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Penguin}", + "PinkyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Pinky}", + "PoltergeistBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Poltergeist}", + "PossessedArmorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PossessedArmor}", + "PresentMimicBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PresentMimic}", + "PurpleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PurpleSlime}", + "RaggedCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RaggedCaster}", + "RainbowSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RainbowSlime}", + "RavenBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Raven}", + "RedSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RedSlime}", + "RuneWizardBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RuneWizard}", + "RustyArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RustyArmoredBonesAxe}", + "ScarecrowBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Scarecrow1}", + "ScutlixBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Scutlix}", + "SkeletonArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonArcher}", + "SkeletonCommandoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonCommando}", + "SkeletonSniperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonSniper}", + "SlimerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Slimer}", + "SnatcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Snatcher}", + "SnowBallaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowBalla}", + "SnowmanGangstaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowmanGangsta}", + "SpikedIceSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SpikedIceSlime}", + "SpikedJungleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SpikedJungleSlime}", + "SplinterlingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Splinterling}", + "SquidBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Squid}", + "TacticalSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TacticalSkeleton}", + "TheGroomBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TheGroom}", + "TimBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Tim}", + "UndeadMinerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UndeadMiner}", + "UndeadVikingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UndeadViking}", + "WhiteCultistArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistArcherWhite}", + "WhiteCultistCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "WhiteCultistFighterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "YellowSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.YellowSlime}", + "YetiBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Yeti}", + "ZombieElfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieElf}", + "SparkyPainting": "{$PaintingArtist.Crowno}\n'In loving memory'", + "PaintingAcorns": "{$PaintingArtist.Lazure}", + "PaintingColdSnap": "{$PaintingArtist.Lazure}", + "PaintingCursedSaint": "{$PaintingArtist.Lazure}", + "PaintingSnowfellas": "{$PaintingArtist.Lazure}", + "PaintingTheSeason": "{$PaintingArtist.Lazure}", + "RedString": "{$CommonItemTooltip.String}", + "OrangeString": "{$CommonItemTooltip.String}", + "YellowString": "{$CommonItemTooltip.String}", + "LimeString": "{$CommonItemTooltip.String}", + "GreenString": "{$CommonItemTooltip.String}", + "TealString": "{$CommonItemTooltip.String}", + "CyanString": "{$CommonItemTooltip.String}", + "SkyBlueString": "{$CommonItemTooltip.String}", + "BlueString": "{$CommonItemTooltip.String}", + "PurpleString": "{$CommonItemTooltip.String}", + "VioletString": "{$CommonItemTooltip.String}", + "PinkString": "{$CommonItemTooltip.String}", + "BrownString": "{$CommonItemTooltip.String}", + "WhiteString": "{$CommonItemTooltip.String}", + "RainbowString": "{$CommonItemTooltip.String}", + "BlackString": "{$CommonItemTooltip.String}", + "BlackCounterweight": "{$CommonItemTooltip.Counterweight}", + "BlueCounterweight": "{$CommonItemTooltip.Counterweight}", + "GreenCounterweight": "{$CommonItemTooltip.Counterweight}", + "PurpleCounterweight": "{$CommonItemTooltip.Counterweight}", + "RedCounterweight": "{$CommonItemTooltip.Counterweight}", + "YellowCounterweight": "{$CommonItemTooltip.Counterweight}", + "KingSlimeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "EyeOfCthulhuBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "EaterOfWorldsBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "BrainOfCthulhuBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "QueenBeeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "SkeletronBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "WallOfFleshBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "DestroyerBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "TwinsBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "SkeletronPrimeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "PlanteraBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "GolemBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "FishronBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "CultistBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "MoonLordBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "GoblinSummonerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinSummoner}", + "SalamanderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Salamander}", + "GiantShellyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantShelly}", + "CrawdadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crawdad}", + "FritzBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Fritz}", + "CreatureFromTheDeepBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CreatureFromTheDeep}", + "DrManFlyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DrManFly}", + "MothronBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mothron}", + "SeveredHandBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "ThePossessedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ThePossessed}", + "ButcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Butcher}", + "PsychoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Psycho}", + "DeadlySphereBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DeadlySphere}", + "NailheadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nailhead}", + "PoisonousSporeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "MedusaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Medusa}", + "GreekSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreekSkeleton}", + "GraniteFlyerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GraniteFlyer}", + "GraniteGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GraniteGolem}", + "BloodZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodZombie}", + "DripplerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Drippler}", + "TombCrawlerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TombCrawlerHead}", + "DuneSplicerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DuneSplicerHead}", + "FlyingAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingAntlion}", + "WalkingAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WalkingAntlion}", + "DesertGhoulBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertGhoul}", + "DesertLamiaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertLamiaDark}", + "DesertDjinnBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertDjinn}", + "DesertBasiliskBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertBeast}", + "RavagerScorpionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertScorpionWalk}", + "StardustSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustSoldier}", + "StardustWormBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustWormHead}", + "StardustJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustJellyfishBig}", + "StardustSpiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustSpiderBig}", + "StardustSmallCellBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "StardustLargeCellBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustCellBig}", + "SolarCoriteBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarCorite}", + "SolarSrollerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarSroller}", + "SolarCrawltipedeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarCrawltipedeHead}", + "SolarDrakomireRiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarDrakomireRider}", + "SolarDrakomireBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarDrakomire}", + "SolarSolenianBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarSolenian}", + "NebulaSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaSoldier}", + "NebulaHeadcrabBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaHeadcrab}", + "NebulaBrainBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaBrain}", + "NebulaBeastBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaBeast}", + "VortexLarvaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexLarva}", + "VortexHornetQueenBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexHornetQueen}", + "VortexHornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexHornet}", + "VortexSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexSoldier}", + "VortexRiflemanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexRifleman}", + "PirateCaptainBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCaptain}", + "PirateDeadeyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateDeadeye}", + "PirateCorsairBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCorsair}", + "PirateCrossbowerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCrossbower}", + "MartianWalkerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianWalker}", + "RedDevilBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RedDevil}", + "PinkJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PinkJellyfish}", + "GreenJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreenJellyfish}", + "DarkMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DarkMummy}", + "LightMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LightMummy}", + "AngryBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryBones}", + "IceTortoiseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceTortoise}", + "SandSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandSlime}", + "SeaSnailBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SeaSnail}", + "MoonLordPainting": "{$PaintingArtist.Crowno}", + "SandElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandElemental}", + "SandsharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandShark}", + "SandsharkCorruptBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkCorrupt}", + "SandsharkCrimsonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkCrimson}", + "SandsharkHallowedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkHallow}", + "TumbleweedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Tumbleweed}", + "BossBagBetsy": "{$CommonItemTooltip.RightClickToOpen}", + "BossBagOgre": "{$CommonItemTooltip.RightClickToOpen}", + "BossBagDarkMage": "{$CommonItemTooltip.RightClickToOpen}", + "ExplosiveBunny": "For use with bunny cannon", + "VialofVenom": "'Extremely toxic'", + "FlaskofVenom": "Melee attacks inflict Venom on enemies", + "VenomArrow": "Inflicts target with Venom", + "VenomBullet": "Inflicts target with Venom", + "PartyBullet": "Explodes into confetti on impact", + "NanoBullet": "Causes confusion", + "ExplodingBullet": "Explodes on impact", + "GoldenBullet": "Enemies killed will drop more money", + "FlaskofCursedFlames": "Melee attacks inflict enemies with cursed flames", + "FlaskofFire": "Melee attacks set enemies on fire", + "FlaskofGold": "Melee attacks make enemies drop more gold", + "FlaskofIchor": "Melee attacks decrease enemies defense", + "FlaskofNanites": "Melee attacks confuse enemies", + "FlaskofParty": "Melee attacks cause confetti to appear", + "FlaskofPoison": "Melee attacks poison enemies", + "CobaltBreastplate": "3% increased critical strike chance", + "CobaltLeggings": "10% increased movement speed", + "MythrilChainmail": "5% increased damage", + "MythrilGreaves": "3% increased critical strike chance", + "RocketI": "Small blast radius. Will not destroy tiles", + "RocketII": "Small blast radius. Will destroy tiles", + "RocketIII": "Large blast radius. Will not destroy tiles", + "RocketIV": "Large blast radius. Will destroy tiles", + "AsphaltBlock": "Increases running speed", + "CobaltPickaxe": "Can mine Mythril and Orichalcum", + "MythrilPickaxe": "Can mine Adamantite and Titanium", + "Cannonball": "For use with cannon", + "Arkhalis": "'I didn't get this off of a Schmoo'", + "BoneGlove": "33% chance to not consume bone", + "LogicGate_AND": "Activates when all lamps are on, Deactivates otherwise", + "LogicGate_NAND": "Activates when not all lamps are on, Deactivates otherwise", + "DD2ElderCrystalStand": "Holds the Eternia Crystal", + "DD2ElderCrystal": "Place in the Eternia Crystal Stand to summon Etheria's portals", + "DefenderMedal": "Currency for trading with the Tavernkeep", + "DD2FlameburstTowerT1Popper": "{$CommonItemTooltip.Sentry}\nAn average speed tower that shoots exploding fireballs\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2FlameburstTowerT2Popper": "{$ItemTooltip.DD2FlameburstTowerT1Popper}", + "DD2FlameburstTowerT3Popper": "{$ItemTooltip.DD2FlameburstTowerT1Popper}", + "DD2BallistraTowerT1Popper": "{$CommonItemTooltip.Sentry}\nA slow but high damage tower that shoots piercing bolts\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2BallistraTowerT2Popper": "{$ItemTooltip.DD2BallistraTowerT1Popper}", + "DD2BallistraTowerT3Popper": "{$ItemTooltip.DD2BallistraTowerT1Popper}", + "DD2ExplosiveTrapT1Popper": "{$CommonItemTooltip.Sentry}\nA trap that explodes when enemies come near\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2ExplosiveTrapT2Popper": "{$ItemTooltip.DD2ExplosiveTrapT1Popper}", + "DD2ExplosiveTrapT3Popper": "{$ItemTooltip.DD2ExplosiveTrapT1Popper}", + "DD2LightningAuraT1Popper": "{$CommonItemTooltip.Sentry}\nAn aura that repeatedly zaps enemies that go inside\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2LightningAuraT2Popper": "{$ItemTooltip.DD2LightningAuraT1Popper}", + "DD2LightningAuraT3Popper": "{$ItemTooltip.DD2LightningAuraT1Popper}", + "DD2PetGato": "Summons a pet gato", + "DD2PetGhost": "Summons a pet flickerwick to provide light", + "DD2PetDragon": "Summons a pet dragon", + "DD2SquireDemonSword": " to guard with a shield", + "DD2SquireBetsySword": "Unleashes the heart's energy forward", + "DD2PhoenixBow": "Harnesses the power of undying flames", + "DD2BetsyBow": "Shoots splitting arrows, deals more damage to airborne enemies", + "MonkStaffT1": "Charges power as it is swung to smash enemies", + "MonkStaffT2": "Summons ghosts as it hits enemies", + "MonkStaffT3": " while holding for an alternate attack!", + "BookStaff": "Gotta wonder who stuck a tome of infinite wisdom on a stick...\n to cast a powerful tornado", + "ApprenticeStaffT3": "Splashes defense reducing miasma!", + "ApprenticeHat": "Increases your max number of sentries by 1 and reduces mana costs by 10%", + "ApprenticeRobe": "20% increased minion damage and 10% increased magic damage", + "ApprenticeTrousers": "10% increased minion damage, 20% increased magic critical strike chance and movement speed", + "SquireGreatHelm": "Increases your max number of sentries by 1 and increases your life regeneration", + "SquirePlating": "15% increased minion and melee damage", + "SquireGreaves": "15% increased minion damage, 20% increased melee critical strike chance and movement speed", + "MonkBrows": "Increases your max number of sentries by 1 and increases melee attack speed by 20%", + "MonkShirt": "20% increased minion and melee damage", + "MonkPants": "10% increased minion damage,\n10% increased critical strike chance and 20% increased movement speed", + "HuntressWig": "Increases your max number of sentries by 1 and increases ranged critical strike chance by 10%", + "HuntressJerkin": "20% increased minion and ranged damage", + "HuntressPants": "10% increased minion damage and 20% increased movement speed", + "ApprenticeScarf": "{$ItemTooltip.HuntressBuckler}", + "SquireShield": "{$ItemTooltip.HuntressBuckler}", + "MonkBelt": "{$ItemTooltip.HuntressBuckler}", + "HuntressBuckler": "Increase your max number of sentries by 1\nIncreases minion damage by 10%", + "SquireAltHead": "Increases your max number of sentries by 2 and grants you 10% minion damage", + "SquireAltShirt": "30% increased minion damage and massively increased life regeneration", + "SquireAltPants": "20% increased minion damage and melee critical strike chance and 30% movement speed", + "ApprenticeAltHead": "Increases your max number of sentries by 2\n10% increased minion & magic damage", + "ApprenticeAltShirt": "30% increased minion damage and 15% increased magic damage", + "ApprenticeAltPants": "20% increased minion damage and 25% increased magic critical strike chance", + "HuntressAltHead": "Increases your max number of sentries by 2\n10% increased minion damage and ranged critical strike chance", + "HuntressAltShirt": "25% increased minion & ranged damage", + "HuntressAltPants": "25% increased minion damage and 20% increased movement speed", + "MonkAltHead": "Increases your max number of sentries by 2 and increases 20% melee & minion damage", + "MonkAltShirt": "20% increased minion damage and melee speed", + "MonkAltPants": "20% increased minion damage, movement speed and melee critical strike chance", + "DD2EnergyCrystal": "Often used to manifest one's will as a physical form of defense", + "ArkhalisHat": "{$CommonItemTooltip.DevItem}\n'I didn't get this from the Grid'", + "ArkhalisShirt": "{$ItemTooltip.ArkhalisHat}", + "ArkhalisPants": "{$ItemTooltip.ArkhalisHat}", + "ArkhalisWings": "{$ItemTooltip.ArkhalisHat}\n{$CommonItemTooltip.FlightAndSlowfall}", + "LeinforsHat": "{$CommonItemTooltip.DevItem}\n'To keep those luscious locks as gorgeous as ever'", + "LeinforsShirt": "{$CommonItemTooltip.DevItem}\n'Bringing sexy back'", + "LeinforsPants": "{$CommonItemTooltip.DevItem}\n'There might be pasta in the pockets'", + "LeinforsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}\n'It's full on! What does it mean?!'", + "LeinforsAccessory": "{$CommonItemTooltip.DevItem}\n'Brought to you by LeinCorp'", + "WoodenCrateHard": "{$ItemTooltip.WoodenCrate}", + "IronCrateHard": "{$ItemTooltip.IronCrate}", + "GoldenCrateHard": "{$ItemTooltip.GoldenCrate}", + "CorruptFishingCrateHard": "{$ItemTooltip.CorruptFishingCrate}", + "CrimsonFishingCrateHard": "{$ItemTooltip.CrimsonFishingCrate}", + "DungeonFishingCrateHard": "{$ItemTooltip.DungeonFishingCrate}", + "FloatingIslandFishingCrateHard": "{$ItemTooltip.FloatingIslandFishingCrate}", + "HallowedFishingCrateHard": "{$ItemTooltip.HallowedFishingCrate}", + "JungleFishingCrateHard": "{$ItemTooltip.JungleFishingCrate}", + "HeartLantern": "Increases life regeneration when placed nearby", + "StarinaBottle": "Increases mana regeneration when placed nearby", + "Cloud": "Prevents fall damage", + "RainCloud": "Prevents fall damage", + "SnowCloudBlock": "Prevents fall damage", + "AmphibianBoots": "The wearer can run super fast\nIncreases jump speed and allows auto-jump\nIncreases fall resistance", + "ArcaneFlower": "8% reduced mana usage\nAutomatically use mana potions when needed\nEnemies are less likely to target you", + "BerserkerGlove": "Increases melee knockback\n12% increased melee speed\nEnables auto swing for melee weapons\nEnemies are more likely to target you", + "FairyBoots": "Allows flight\nThe wearer can run super fast\nFlowers grow on the grass you walk on", + "FrogFlipper": "Grants the ability to swim\nIncreases jump speed and allows auto-jump\nIncreases fall resistance", + "FrogGear": "Grants the ability to swim\nAllows the ability to climb walls\nIncreases jump speed and allows auto-jump\nIncreases fall resistance\n'It ain't easy being green'", + "FrogWebbing": "Allows the ability to climb walls\nIncreases jump speed and allows auto-jump\nIncreases fall resistance", + "FrozenShield": "Grants immunity to knockback\nPuts a shell around the owner when below 50% life that reduces damage by 25%\nAbsorbs 25% of damage done to players on your team when above 25% life", + "HeroShield": "Grants immunity to knockback\nAbsorbs 25% of damage done to players on your team when above 25% life\nEnemies are more likely to target you", + "LavaSkull": "Melee attacks inflict fire damage\nGrants immunity to fire blocks", + "MoltenCharm": "Grants immunity to fire blocks\nProvides 7 seconds of immunity to lava", + "MagnetFlower": "8% reduced mana usage\nAutomatically use mana potions when needed\nIncreases pickup range for mana stars", + "ManaCloak": "8% reduced mana usage\nAutomatically use mana potions when needed\nCauses stars to fall after taking damage\nStars restore mana when collected", + "MoltenQuiver": "Increases arrow damage by 10% and greatly increases arrow speed\n20% chance not to consume arrows\nLights wooden arrows ablaze\n'Quiver in fear!'", + "ObsidianSkullRose": "Grants immunity to fire blocks\nReduces damage from touching lava", + "MoltenSkullRose": "Melee attacks inflict fire damage\nGrants immunity to fire blocks\nReduces damage from touching lava", + "ReconScope": "Increases view range for guns ( to zoom out)\n10% increased ranged damage and critical strike chance\nEnemies are less likely to target you\n'Enemy spotted'", + "StalkersQuiver": "Increases arrow damage by 10% and greatly increases arrow speed\n20% chance not to consume arrows\nEnemies are less likely to target you", + "StingerNecklace": "Increases armor penetration by 5\nReleases bees when damaged", + "UltrabrightHelmet": "Improves vision and provides light when worn\n'The darkness holds no secrets for you'", + "SandBoots": "The wearer can run super fast, and even faster on sand\n'Walk without rhythm and you won't attract the worm'", + "AncientChisel": "Increases mining speed by 25%\n'Ancient problems require ancient solutions'", + "Mannequin": " to customize attire", + "Womannquin": " to customize attire", + "HatRack": " when placed to display hats and helmets", + "DeadMansChest": "Activates when opened", + "GolfBall": "{$CommonItemTooltip.GolfBall}", + "GolfClubIron": "{$CommonItemTooltip.GolfIron}", + "GolfCup": "Aim to sink your golf ball in the cup\nLets everyone know how well you did", + "LawnMower": "Mows Pure and Hallowed grass\nMowed grass reduces enemy spawn chance", + "GolfTee": " to place a golf ball on it", + "AntiPortalBlock": "Portals cannot be created on the surface of these blocks", + "GolfClubPutter": "{$CommonItemTooltip.GolfPutter}", + "GolfClubWedge": "{$CommonItemTooltip.GolfWedge}", + "GolfClubDriver": "{$CommonItemTooltip.GolfDriver}", + "GolfWhistle": "Returns your last hit Golf Ball to its previous position\nHas a one stroke penalty", + "VoidLens": "Summons the void vault\nIf carried, it may pick up items when your inventory is full\n'This pocket dimension is out of this world!'", + "LesionStation": "Used for special crafting", + "TitanGlove": "Increases melee knockback\nEnables auto swing for melee weapons", + "PowerGlove": "Increases melee knockback\n12% increased melee speed\nEnables auto swing for melee weapons", + "MechanicalGlove": "Increases melee knockback\n12% increased melee damage and speed\nEnables auto swing for melee weapons", + "FireGauntlet": "Increases melee knockback and melee attacks inflict fire damage\n10% increased melee damage and speed\nEnables auto swing for melee weapons", + "MusicBoxDayRemix": "Brought to you by Xenon and DJ Sniper", + "GolfBallDyedBlack": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedBlue": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedBrown": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedCyan": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedGreen": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedLimeGreen": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedOrange": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedPink": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedPurple": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedRed": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedSkyBlue": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedTeal": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedViolet": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedYellow": "{$CommonItemTooltip.GolfBall}", + "AmberRobe": "Increases maximum mana by 60\nReduces mana usage by 13%", + "OrangePressurePlate": "Activates and breaks when a player steps on it", + "PumpkinPie": "{$CommonItemTooltip.MediumStats}\n'Stuff it all up in one bite!'", + "ChristmasPudding": "{$CommonItemTooltip.MajorStats}\n'A cozy treat by the fireplace.'", + "SugarCookie": "{$CommonItemTooltip.MajorStats}\n'You'll bounce off the walls!'", + "GingerbreadCookie": "{$CommonItemTooltip.MajorStats}\n'Not the gumdrop buttons!'", + "PadThai": "{$CommonItemTooltip.MediumStats}\n'Spicy level 5!'", + "Pho": "{$CommonItemTooltip.MediumStats}\n'Pho sho...'", + "CookedFish": "{$CommonItemTooltip.MinorStats}\n'Where's the chips!?'", + "CookedShrimp": "{$CommonItemTooltip.MediumStats}\n'Barbecue it, boil it, broil it, bake it...'", + "Sashimi": "{$CommonItemTooltip.MediumStats}\n'It's raw! It's exotic!'", + "BowlofSoup": "{$CommonItemTooltip.MediumStats}\n'Simple, yet refreshing.'", + "CookedMarshmallow": "{$CommonItemTooltip.MinorStats}\n'How can I have some more of nothing?'", + "Bacon": "{$CommonItemTooltip.MajorStats}\n'Bacon? Bacon.'", + "GrubSoup": "{$CommonItemTooltip.MediumStats}\n'Grub's up!'", + "Apple": "{$CommonItemTooltip.MinorStats}\n'An apple a day keeps Dr Bones away!'", + "ApplePieSlice": "{$CommonItemTooltip.MediumStats}\n'Mmmm... pie.'", + "ApplePie": "{$CommonItemTooltip.MajorStats}\n'Nothing is as Terrarian as apple pie.'", + "BananaSplit": "{$CommonItemTooltip.MediumStats}\n'Make like a banana and split!'", + "BBQRibs": "{$CommonItemTooltip.MajorStats}\n'Grilled to perfection!'", + "BunnyStew": "{$CommonItemTooltip.MinorStats}\n'This one's luck has run out.'", + "Burger": "{$CommonItemTooltip.MajorStats}\n'...but wait! It was 99 cents.'", + "ChickenNugget": "{$CommonItemTooltip.MediumStats}\n'Caution: may contain harpy.'", + "ChocolateChipCookie": "{$CommonItemTooltip.MediumStats}\n'Fresh from the oven'", + "CreamSoda": "{$CommonItemTooltip.MediumStats}\n'It's so fizzy!'", + "Escargot": "{$CommonItemTooltip.MediumStats}\n'Look at that S Car Go!'", + "FriedEgg": "{$CommonItemTooltip.MediumStats}\n'Sunny side up!'", + "Fries": "{$CommonItemTooltip.MediumStats}\n'Where's the Ketchup!?'", + "GoldenDelight": "{$CommonItemTooltip.MajorStats}\n'(Au)some!'", + "Grapes": "{$CommonItemTooltip.MediumStats}\n'Wrath not included.'", + "GrilledSquirrel": "{$CommonItemTooltip.MinorStats}\n'That'll keep you out of my birdfeeders...'", + "Hotdog": "{$CommonItemTooltip.MediumStats}\n'Hot diggity!'", + "IceCream": "{$CommonItemTooltip.MediumStats}\n'Eat it before it melts!'", + "Milkshake": "{$CommonItemTooltip.MajorStats}\n'It brings the boys to the yard!'", + "Nachos": "{$CommonItemTooltip.MediumStats}\n'It's nach-yos, it's mine!'", + "Pizza": "{$CommonItemTooltip.MajorStats}\n'With pepperoni and extra cheese.'", + "PotatoChips": "{$CommonItemTooltip.MinorStats}\n'Betcha can't eat just one!'", + "RoastedBird": "{$CommonItemTooltip.MinorStats}\n'Serving Size: 1 child.'", + "RoastedDuck": "{$CommonItemTooltip.MediumStats}\n'Better than chicken from a wall.'", + "SauteedFrogLegs": "{$CommonItemTooltip.MediumStats}\n'The other, other white meat.'", + "SeafoodDinner": "{$CommonItemTooltip.MajorStats}\n'I sea food, I eat it.'", + "ShrimpPoBoy": "{$CommonItemTooltip.MediumStats}\n'Po' Boy are you in for a treat!'", + "Spaghetti": "{$CommonItemTooltip.MajorStats}\n'Al dente!'", + "Steak": "{$CommonItemTooltip.MajorStats}\n'Well done with ketchup!'", + "Ale": "{$CommonItemTooltip.TipsyStats}\n'Down the hatch!'", + "Sake": "{$CommonItemTooltip.TipsyStats}\n'Drink too much of this, and you become karate master.'", + "GolfCart": "Summons a rideable Golf Cart mount", + "BloodMoonStarter": "Summons the Blood Moon\n'What a horrible night to have a curse.'", + "GoldGoldfish": "'Not to be confused with the elusive Gold Gold Goldfish'", + "GoldGoldfishBowl": "'Is it a gold bowl? Or a gold fish?'", + "Apricot": "{$CommonItemTooltip.MinorStats}\n'You'll apricate this!'", + "Banana": "{$CommonItemTooltip.MinorStats}\n'Good source of potassium!'", + "BlackCurrant": "{$CommonItemTooltip.MinorStats}", + "BloodOrange": "{$CommonItemTooltip.MinorStats}\n'A vegan option for vampires'", + "Cherry": "{$CommonItemTooltip.MinorStats}", + "Coconut": "{$CommonItemTooltip.MinorStats}\n'Are you suggesting that coconuts can migrate?'", + "Dragonfruit": "{$CommonItemTooltip.MediumStats}", + "Elderberry": "{$CommonItemTooltip.MinorStats}\n'Smells like your father'", + "Grapefruit": "{$CommonItemTooltip.MinorStats}", + "Lemon": "{$CommonItemTooltip.MinorStats}\n'When life gives you lemons...'", + "Mango": "{$CommonItemTooltip.MinorStats}", + "Peach": "{$CommonItemTooltip.MinorStats}", + "Pineapple": "{$CommonItemTooltip.MinorStats}\n'Goes great with pizza'", + "Plum": "{$CommonItemTooltip.MinorStats}", + "Rambutan": "{$CommonItemTooltip.MinorStats}", + "Starfruit": "{$CommonItemTooltip.MediumStats}", + "StarWrath": "Causes stars to rain from the sky", + "FairyCritterPink": "'Hey! Listen!'", + "FairyCritterGreen": "'Hey! Listen!'", + "FairyCritterBlue": "'Hey! Listen!'", + "BabyBirdStaff": "Summons a baby finch to fight for you", + "MysticCoilSnake": "Summons rope snakes", + "SanguineStaff": "Summons a sanguine bat to fight for you", + "CatBast": "Increases defense by 5 when placed nearby", + "ItemFrame": " to place item on item frame", + "FoodPlatter": " to place item on plate", + "CanOfWorms": "{$CommonItemTooltip.RightClickToOpen}", + "Trident": "Increases mobility in water when held\nHold UP to descend slower", + "EucaluptusSap": "Summons a Pet Sugar Glider", + "CelestialWand": "Summons Estee", + + "NecroHelmet": "5% increased ranged damage", + "NecroBreastplate": "5% increased ranged damage", + "NecroGreaves": "5% increased ranged damage", + "AncientNecroHelmet": "5% increased ranged damage", + + "NinjaHood": "3% increased critical strike chance", + "NinjaPants": "3% increased critical strike chance", + "NinjaShirt": "3% increased critical strike chance", + + "FossilHelm": "3% increased ranged critical strike chance", + "FossilPants": "3% increased ranged critical strike chance", + "FossilShirt": "3% increased ranged critical strike chance", + + "EncumberingStone": "Prevents item pickups while in the inventory\n'You are over-encumbered'", + + "SharpTears": "Summons blood thorns from the ground", + "VampireFrogStaff": "Summons a vampire frog to fight for you", + "CombatBook": "Increases the defense and strength of all villagers\n'Contains offensive and defensive fighting techniques'", + "PortableStool": "Hold UP to reach higher", + + "CoralTorch": "Can be placed in water", + + "KryptonMoss": "'A sight to dwell upon and never forget'", + "XenonMoss": "'A sight to dwell upon and never forget'", + "ArgonMoss": "'A sight to dwell upon and never forget'", + "ThinIce": "Breaks when fallen on\n'Watch your step'", + + "FrozenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "FrozenCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "OasisCrate": "{$CommonItemTooltip.RightClickToOpen}", + "OasisCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + + "OceanCrate": "{$CommonItemTooltip.RightClickToOpen}", + "OceanCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + + "ArrowSign": " to change directions", + "PaintedArrowSign": " to change directions", + + "SpectreGoggles": "Enables Echo Sight, showing hidden blocks", + "LobsterTail": "{$CommonItemTooltip.MediumStats}\n'Delicious with a bit of butter'", + "Oyster": "{$CommonItemTooltip.RightClickToOpen}", + "ShuckedOyster": "{$CommonItemTooltip.MinorStats}\n'Aw, shucks!'", + "ClusterRocketI": "Will not destroy tiles", + "ClusterRocketII": "Will destroy tiles", + "MiniNukeI": "Huge blast radius. Will not destroy tiles", + "MiniNukeII": "Huge blast radius. Will destroy tiles", + "SandcastleBucket": "Places sandcastles", + "EchoBlock": "Only visible with Echo Sight", + "Grate": "Allows only liquids through\nCan be toggled open or closed\n'They'rrrre great!'", + "LuckPotionLesser": "Increases the Luck of the user", + "LuckPotion": "Increases the Luck of the user", + "LuckPotionGreater": "Increases the Luck of the user", + "MagicConch": "If you listen closely, you can hear the ocean", + "TimerOneHalfSecond": "Activates every half of a second", + "TimerOneFourthSecond": "Activates every fourth of a second", + "Terragrim": "Unleashes a dicing flurry", + "FloatingTube": "Grants the ability to float in water", + "SharkBait": "Summons a Shark Pup\n'Doo, doo, doo, doo, doo, doo'", + "Geode": "May drop valuable shinies when smashed!", + "CrackedBlueBrick": "May break when stepped on", + "CrackedGreenBrick": "May break when stepped on", + "CrackedPinkBrick": "May break when stepped on", + "BloodMoonMonolith": "'Sustain a bloody fraction of the Moon'", + "VoidMonolith": "'Harness a small amount of power from the Void'", + "ScarabBomb": "A narrow explosion that will destroy most tiles\nExplosion aims away from your position", + "GolfClubStoneIron": "{$CommonItemTooltip.GolfIron}", + "GolfClubRustyPutter": "{$CommonItemTooltip.GolfPutter}", + "GolfClubBronzeWedge": "{$CommonItemTooltip.GolfWedge}", + "GolfClubWoodDriver": "{$CommonItemTooltip.GolfDriver}", + "GolfClubMythrilIron": "{$CommonItemTooltip.GolfIron}", + "GolfClubLeadPutter": "{$CommonItemTooltip.GolfPutter}", + "GolfClubGoldWedge": "{$CommonItemTooltip.GolfWedge}", + "GolfClubPearlwoodDriver": "{$CommonItemTooltip.GolfDriver}", + "GolfClubTitaniumIron": "{$CommonItemTooltip.GolfIron}", + "GolfClubShroomitePutter": "{$CommonItemTooltip.GolfPutter}", + "GolfClubDiamondWedge": "{$CommonItemTooltip.GolfWedge}", + "GolfClubChlorophyteDriver": "{$CommonItemTooltip.GolfDriver}", + "FishMinecart": "Allows quick travel in water\n'Deal with it'", + "HellMinecart": "Provides 7 seconds of immunity to lava", + "TheBrideBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TheBride}", + "ZombieMermanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieMerman}", + "EyeballFlyingFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EyeballFlyingFish}", + "BloodSquidBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodSquid}", + "BloodEelBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodEelHead}", + "GoblinSharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinShark}", + "BloodNautilusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodNautilus}", + "WitchBroom": "'Grants a witching spark of inspiration!'", + "BirdieRattle": "Summons a baby harpy\n'Not for your everyday cockatiel'", + "ExoticEasternChewToy": "Summons a fennec fox\n'It squeaks at a glorious 96kHz!'", + "BedazzledNectar": "Summons a pet butterfly\n'Only the best, most exquisite flower excrement!'", + "HellCake": "Summons a baby imp\n'He hasn't learned how to teleport yet!'", + "BambooLeaf": "Summons a baby red panda", + "Celeb2": "50% chance to not consume ammo\n'All good things end with a bang... or many!'", + "AppleJuice": "{$CommonItemTooltip.MinorStats}\n'Hungry for Apples?'", + "GrapeJuice": "{$CommonItemTooltip.MajorStats}\n'Sugar. Water. Purple.'", + "Lemonade": "{$CommonItemTooltip.MinorStats}\n'...make lemonade!'", + "BananaDaiquiri": "{$CommonItemTooltip.MinorStats}\n'Yellow and mellow'", + "PeachSangria": "{$CommonItemTooltip.MinorStats}\n'Life's a peach'", + "PinaColada": "{$CommonItemTooltip.MinorStats}\n'If you like piña coladas and getting caught in the rain'", + "TropicalSmoothie": "{$CommonItemTooltip.MinorStats}\n'Real smooth'", + "BloodyMoscato": "{$CommonItemTooltip.MinorStats}\n'Not really blood... or is it?'", + "SmoothieofDarkness": "{$CommonItemTooltip.MinorStats}\n'Come to the dark side, we have smoothies'", + "PrismaticPunch": "{$CommonItemTooltip.MediumStats}\n'Feel the rainbow, taste the crystal!'", + "FruitJuice": "{$CommonItemTooltip.MinorStats}\n'With 5% real fruit juice!'", + "FruitSalad": "{$CommonItemTooltip.MinorStats}", + "AndrewSphinx": "{$PaintingArtist.UnitOne} (Restored)", + "WatchfulAntlion": "{$PaintingArtist.Aurora} (Restored)", + "BurningSpirit": "{$PaintingArtist.Zoomo}", + "JawsOfDeath": "{$PaintingArtist.Darthkitten}", + "TheSandsOfSlime": "{$PaintingArtist.Criddle}", + "SnakesIHateSnakes": "{$PaintingArtist.Xman101}", + "LifeAboveTheSand": "{$PaintingArtist.Zoomo}", + "Oasis": "{$PaintingArtist.Khaios}", + "PrehistoryPreserved": "'Unearthed by C. Schneider'", + "AncientTablet": "'Unearthed by C. Schneider'", + "Uluru": "{$PaintingArtist.darthmorf}", + "VisitingThePyramids": "{$PaintingArtist.Leinfors}", + "BandageBoy": "{$PaintingArtist.Darthkitten}", + "DivineEye": "{$PaintingArtist.Darthkitten}", + "FogMachine": "Billows out fog", + "GolfPainting1": "{$PaintingArtist.Crowno}", + "GolfPainting2": "{$PaintingArtist.Crowno}", + "GolfPainting3": "{$PaintingArtist.Crowno}", + "GolfPainting4": "'Ceci n'est pas un club de golf.'\n{$PaintingArtist.Crowno}", + "UnicornHornHat": "'It's a new day, yes it is!'", + "ChumBucket": "Toss in water up to 3 times to increase fishing power\n'Plankton!'", + "GardenGnome": "'Said to bring good fortune and keep evil spirits at bay'", + "BloodFishingRod": "Increased chance to fish up enemies during a Blood Moon", + "IvyGuitar": "Playable Instrument\n'Property of Dead Man's Sweater'", + "CarbonGuitar": "Playable Instrument\n'These licks are spicy'", + "DrumStick": "Playable next to Drum Set\n'The coffee is strong...and vulgar'", + "GlowPaint": "Fully illuminates the painted object", + "WetRocket": "Spreads water on impact", + "LavaRocket": "Spreads lava on impact", + "HoneyRocket": "Spreads honey on impact", + "DryRocket": "Absorbs liquid on impact", + "BloodRainBow": "Rains blood from the sky\n'Reign in Blood'", + "DandelionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Dandelion}", + "GnomeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Gnome}", + "CrystalDart": "Bounces between enemies", + "CursedDart": "Drops cursed flames on the ground", + "IchorDart": "Bursts into multiple darts", + "DeadlySphereStaff": "Summons a deadly sphere to fight for you", + "DesertCampfire": "Life regen is increased when near a campfire", + "CoralCampfire": "Life regen is increased when near a campfire", + "CorruptCampfire": "Life regen is increased when near a campfire", + "CrimsonCampfire": "Life regen is increased when near a campfire", + "HallowedCampfire": "Life regen is increased when near a campfire", + "JungleCampfire": "Life regen is increased when near a campfire", + "EmptyBucket": "Can be used to scoop up a small amount of liquid", + "WaterBucket": "Contains a small amount of water\nCan be poured out", + "LavaBucket": "Contains a small amount of lava\nCan be poured out", + "HoneyBucket": "Contains a small amount of honey\nCan be poured out", + "PiggyBank": "Can be used to store your items\nStored items can only be accessed by you", + "Safe": "Can be used to store your items\nStored items can only be accessed by you", + "DefendersForge": "Can be used to store your items\nStored items can only be accessed by you", + "VoidVault": "Can be used to store your items\nStored items can only be accessed by you\nWill contain items picked up by a void bag", + "MudBud": "Summons little Plantero", + "ReleaseDoves": "'Released during certain ceremonies'", + "TragicUmbrella": "You will fall slower while holding this", + "GravediggerShovel": "Digs in a bigger area than a pickaxe\nOnly digs up soft tiles\n'Can you dig it?'", + "DungeonDesertKey": "Unlocks a Desert Chest in the dungeon", + "MolluskWhistle": "Summons a rideable flamingo mount", + "BreakerBlade": "Deals more damage to unhurt enemies", + "Nevermore": "{$PaintingArtist.Crowno}", + "Reborn": "{$PaintingArtist.Crowno}", + "Graveyard": "{$PaintingArtist.Crowno}", + "GhostManifestation": "{$PaintingArtist.Crowno}", + "WickedUndead": "{$PaintingArtist.Crowno}", + "BloodyGoblet": "{$PaintingArtist.Crowno}", + "StillLife": "{$PaintingArtist.Crowno}", + "GhostarsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}\n'I am right here'", + "GhostarSkullPin": "{$CommonItemTooltip.DevItem}\n'Could this be the real Ghostar?'", + "GhostarShirt": "{$CommonItemTooltip.DevItem}\n'A fine dress handmade by a dragon'", + "GhostarPants": "{$CommonItemTooltip.DevItem}\n'The journey of a thousand miles begins with one step'", + "BallOfFuseWire": "Summons a dynamite kitten\n'It's like yarn, but more exciting!'", + "FullMoonSqueakyToy": "Summons a baby werewolf", + "OrnateShadowKey": "Summons a pet shadow mimic", + "FoodBarbarianWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}\n'The holes cut down on weight.'", + "FoodBarbarianHelm": "{$CommonItemTooltip.DevItem}\n'Safety First'", + "FoodBarbarianArmor": "{$CommonItemTooltip.DevItem}\n'Max was a good boy.'", + "FoodBarbarianGreaves": "{$CommonItemTooltip.DevItem}\n'They don't let me wear a loincloth anymore.'", + "SafemanWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}\n'Can you help me tie this on?'", + "SafemanSunHair": "{$CommonItemTooltip.DevItem}\n'Bright idea'", + "SafemanSunDress": "{$CommonItemTooltip.DevItem}\n'Fashionable and functional'", + "SafemanDressLeggings": "{$CommonItemTooltip.DevItem}\n'Almost like pants'", + "GroxTheGreatWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "GroxTheGreatHelm": "{$CommonItemTooltip.DevItem}", + "GroxTheGreatArmor": "{$CommonItemTooltip.DevItem}", + "GroxTheGreatGreaves": "{$CommonItemTooltip.DevItem}", + "KiteWyvern": "{$CommonItemTooltip.Kite}", + "KiteBlue": "{$CommonItemTooltip.Kite}", + "KiteBlueAndYellow": "{$CommonItemTooltip.Kite}", + "KiteRed": "{$CommonItemTooltip.Kite}", + "KiteRedAndYellow": "{$CommonItemTooltip.Kite}", + "KiteYellow": "{$CommonItemTooltip.Kite}", + "KiteBoneSerpent": "{$CommonItemTooltip.Kite}", + "KiteWorldFeeder": "{$CommonItemTooltip.Kite}", + "KiteBunny": "{$CommonItemTooltip.Kite}", + "KitePigron": "{$CommonItemTooltip.Kite}", + "KiteManEater": "{$CommonItemTooltip.Kite}", + "KiteJellyfishBlue": "{$CommonItemTooltip.Kite}", + "KiteJellyfishPink": "{$CommonItemTooltip.Kite}", + "KiteShark": "{$CommonItemTooltip.Kite}", + "KiteSandShark": "{$CommonItemTooltip.Kite}", + "KiteBunnyCorrupt": "{$CommonItemTooltip.Kite}", + "KiteBunnyCrimson": "{$CommonItemTooltip.Kite}", + "KiteGoldfish": "{$CommonItemTooltip.Kite}", + "KiteAngryTrapper": "{$CommonItemTooltip.Kite}", + "KiteKoi": "{$CommonItemTooltip.Kite}", + "KiteCrawltipede": "{$CommonItemTooltip.Kite}", + "KiteSpectrum": "{$CommonItemTooltip.Kite}", + "KiteWanderingEye": "{$CommonItemTooltip.Kite}\n'This one can't wander too far'", + "KiteUnicorn": "{$CommonItemTooltip.Kite}", + "CritterShampoo": "Applies dye to minions", + "DontHurtCrittersBook": "Prevents you from hurting critters while in the inventory", + "FairyGlowstick": "Hovers when thrown\nWorks when wet", + "LightningCarrot": "Summons a volt bunny", + "SquirrelHook": "Grapple onto trees like a real squirrel!\n'In the tree, part of the tree'", + "Football": "Try to catch it!", + "FairyQueenBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "TreeGlobe": "Toss it to change how trees look!\n'Time for a change of scenery'", + "WorldGlobe": "Toss it to change how the world looks!\n'Time for a change of scenery'", + "BottomlessLavaBucket": "Contains an endless amount of lava\nCan be poured out", + "BugNet": "Used to catch critters", + "GoldenBugNet": "Used to catch critters\nCan catch lava critters too!", + "FireproofBugNet": "Used to catch critters\nCan catch lava critters too!", + "WetBomb": "A small explosion that will spread water", + "LavaBomb": "A small explosion that will spread lava", + "HoneyBomb": "A small explosion that will spread honey", + "DryBomb": "A small explosion that will absorb liquid", + "LicenseCat": "Use to let a cat arrive in town", + "LicenseDog": "Use to let a dog arrive in town", + "LavaAbsorbantSponge": "Capable of soaking up an endless amount of lava", + "HallowedHood": "Increases your max number of minions by 1\nIncreases minion damage by 10%", + "FlameWaderBoots": "Provides the ability to walk on water, honey & lava\nGrants immunity to fire blocks and 7 seconds of immunity to lava", + "LavaCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LavaCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "ObsidianLockbox": "{$CommonItemTooltip.RightClickToOpen}\nRequires a Shadow Key", + "DemonConch": "If you listen closely, you can hear screams\n'Watch your toes'", + "HotlineFishingHook": "{$CommonItemTooltip.LavaFishing}", + "LavaFishingHook": "{$CommonItemTooltip.LavaFishing}", + "AncientHallowedMask": "10% increased melee damage and critical strike chance\n10% increased melee speed", + "AncientHallowedHelmet": "15% increased ranged damage\n8% increased ranged critical strike chance", + "AncientHallowedHeadgear": "Increases maximum mana by 100\n12% increased magic damage and critical strike chance", + "AncientHallowedHood": "Increases your max number of minions by 1\nIncreases minion damage by 10%", + "AncientHallowedPlateMail": "7% increased critical strike chance", + "AncientHallowedGreaves": "7% increased damage\n8% increased movement speed", + "PotionOfReturn": "Teleports you home and creates a portal\nUse portal to return when you are done\n'Good for one round trip!'", + "FlameWakerBoots": "Leaves a trail of flames in your wake", + "HellfireTreads": "Provides the ability to walk on water, honey & lava\nGrants immunity to fire blocks and 7 seconds of immunity to lava\nLeaves a trail of flames in your wake", + "LavaFishbowl": "'No, you can't wear it on your head'", + "PirateShipMountItem": "Summons the Black Spot mount\n'Arrr! This be mutiny!'", + "SpookyWoodMountItem": "Summons a rideable tree mount\n'A wand crafted from the branch of a cursed tree.'", + "SantankMountItem": "Summons a rideable Santank mount\n'For the REALLY naughty ones.'", + "WallOfFleshGoatMountItem": "Summons a rideable death goat mount\n'Brutal!'", + "DarkMageBookMountItem": "Summons a magic tome mount\n'A book said to be at its holder's behest.'", + "KingSlimePetItem": "Summons a Slime Prince\n'A dessert fit for a king!'", + "EyeOfCthulhuPetItem": "Summons a suspicious eye\n'Seems to have lost its look.'", + "EaterOfWorldsPetItem": "Summons the Eater of Worms\n'It'll give you worms!'", + "BrainOfCthulhuPetItem": "Summons a spider brain\n'Pickled and shrunken, this brain can no longer hurt you.'", + "SkeletronPetItem": "Summons a small Skeletron\n'A skull with unimaginable power dulled.'", + "QueenBeePetItem": "Summons a honey bee\n'The secret ingredient for royal bees.'", + "DestroyerPetItem": "Summons a miniature tool of destruction\n'It's safe to operate this right?'", + "TwinsPetItem": "Summons miniature mechanical eyes\n'Two are better than one.'", + "SkeletronPrimePetItem": "Summons a miniature Skeletron Prime\n'We can rebuild it.'", + "PlanteraPetItem": "Summons a newly sprouted Plantera\n'Get to the root of the problem.'", + "GolemPetItem": "Summons a toy golem to light your way\n'Power cells not included.'", + "DukeFishronPetItem": "Summons a tiny Fishron\n'Brined to perfection.'", + "LunaticCultistPetItem": "Summons a baby phantasmal dragon\n'Contains a fragment of Phantasm energy.'", + "MoonLordPetItem": "Summons a Moonling\n'The forbidden calamari.'", + "FairyQueenPetItem": "Summons a fairy princess to provide light\n'A glowing gemstone that houses a powerful fairy.'", + "PumpkingPetItem": "Summons a possessed Jack 'O Lantern\n'The flame cannot be put out!'", + "EverscreamPetItem": "Summons an Everscream sapling\n'Twinkle, Twinkle!'", + "IceQueenPetItem": "Summons a tiny Ice Queen\n'Fit for a queen!'", + "MartianPetItem": "Summons an alien skater\n'Kickflips are a lot easier in Zero-G!'", + "DD2OgrePetItem": "Summons a baby ogre\n'No other uses besides smashing.'", + "DD2BetsyPetItem": "Summons Itsy Betsy\n'No fire sacrifices required!'", + "PaintedHorseSaddle": "Summons a rideable painted horse mount", + "MajesticHorseSaddle": "Summons a rideable white horse mount", + "DarkHorseSaddle": "Summons a rideable dark horse mount", + "SuperheatedBlood": "Summons a rideable lava shark mount\n'Bloody hell!'", + "PogoStick": "Summons a rideable pogo stick mount\nPress Jump again in mid-air to do tricks!", + "LicenseBunny": "Use to let a bunny arrive in town", + "TeleportationPylonJungle": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonPurity": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonHallow": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonUnderground": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonOcean": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonDesert": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonSnow": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonMushroom": "{$CommonItemTooltip.TeleportationPylon}", + "TerraToilet": "Seriously? THIS is what you used the Broken Hero Sword for?", + "QueenSlimePetItem": "Summons a Slime Princess\n'A dessert fit for a queen!'", + "AccentSlab": "A Stone Slab variant that merges differently with nearby blocks\nFavored by advanced builders", + "TeleportationPylonVictory": "Teleport to another pylon\nCan function anywhere\n'You must construct additional pylons'", + "RockGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RockGolem}", + "BloodMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodMummy}", + "SporeSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SporeSkeleton}", + "SporeBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SporeBat}", + "LarvaeAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LarvaeAntlion}", + "CrimsonBunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonBunny}", + "CrimsonGoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonGoldfish}", + "CrimsonPenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonPenguin}", + "BigMimicCorruptionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicCorruption}", + "BigMimicCrimsonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicCrimson}", + "BigMimicHallowBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicHallow}", + "MossHornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MossHornet}", + "WanderingEyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WanderingEye}", + "BlueCultistCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistDevote}", + "CreativeWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "RainbowWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressUpToBooster}", + "LongRainbowTrailWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}\n{$CommonItemTooltip.PressUpToBooster}\n'The more you know'", + "DirtBomb": "A small explosion that will spread dirt", + "DirtStickyBomb": "A small explosion that will spread dirt", + "DiggingMoleMinecart": "Will dig through blocks and lay new track if carrying minecart tracks\nOnly digs when underground", + "CrystalNinjaHelmet": "5% increased crit chance", + "CrystalNinjaChestplate": "5% increased damage", + "CrystalNinjaLeggings": "10% increased movement speed", + "QueenSlimeMountSaddle": "Summons a rideable Winged Slime mount", + "QueenSlimeCrystal": "Summons Queen Slime", + "RocketLauncher": "Does extra damage on a direct hit", + "ProximityMineLauncher": "Mines deal triple damage when armed", + "EmpressFlightBooster": "Grants infinite wing and rocket boot flight\nIncreases flight and jump mobility", + "GelBalloon": "Throw this to make someone sparkle", + "Smolstar": "Summons an Enchanted Dagger to fight for you\nIgnores a substantial amount of enemy defense\n'Don't let their small size fool you'", + "QueenSlimeHook": "Teleports you to the location of the hook", + "VolatileGelatin": "Releases volatile gelatin periodically that damages enemies", + "TerrasparkBoots": "Allows flight, super fast running, and extra mobility on ice\n8% increased movement speed\nProvides the ability to walk on water, honey & lava\nGrants immunity to fire blocks and 7 seconds of immunity to lava", + "EmpressButterfly": "'Its wings are so delicate, you must be careful not to damage it...'", + "BlandWhip": "4 summon tag damage\n{$CommonItemTooltip.Whips}\n'Die monster!'", + "MaceWhip": "5 summon tag damage\n5% summon tag critical strike chance\n{$CommonItemTooltip.Whips}", + "ScytheWhip": "{$CommonItemTooltip.Whips}\nStrike enemies with dark energy to gain attack speed\nDark energy jumps from enemies hit by summons", + "SwordWhip": "9 summon tag damage\n{$CommonItemTooltip.Whips}\nStrike enemies to gain attack speed", + "ThornWhip": "6 summon tag damage\n{$CommonItemTooltip.Whips}\nStrike enemies to gain attack speed", + "FireWhip": "{$CommonItemTooltip.Whips}\nStrike enemies with blazing energy\nBlazing energy explodes from enemies hit by summons", + "CoolWhip": "{$CommonItemTooltip.Whips}\nStrike enemies to summon a friendly snowflake\n'Let me have some of that cool whip'", + "RainbowWhip": "20 summon tag damage\n10% summon tag critical strike chance\n{$CommonItemTooltip.Whips}", + "BadgersHat": "You seem to have a problem with your green screen\n'Great for impersonating streamers!'", + "ChippysCouch": "Heeellllllo Terraria enthusiasts!\n'Great for chilling like a streamer!'", + "ZapinatorGray": "'It might be broken'", + "ZapinatorOrange": "'It might be broken'", + "JoustingLance": "Build momentum to increase attack power\n'Have at thee!'", + "ShadowJoustingLance": "Build momentum to increase attack power", + "HallowJoustingLance": "Build momentum to increase attack power", + "StormTigerStaff": "Summons a white tiger to fight for you", + "EmpressBlade": "Summons an Enchanted Sword to fight for you", + "TreasureMagnet": "Increases pickup range for items", + "Mace": "Can be upgraded with torches", + "FlamingMace": "'May the fire light your way'", + "MoonLordLegs": "Slightly increases mobility\n'These might be Steve's'", + "Keybrand": "Deals more damage to injured foes", + "SpiderSinkSpiderSinkDoesWhateverASpiderSinkDoes": "'Spider-sink, Spider-sink, does whatever a spider can...'", + "SuperStarCannon": "'Sure, Brain, but where are you going to get enough stars for this?'", + "DrumSet": "'Badum, psh'", + "ToiletCactus": "'How desperate are you?'", + "GameMasterShirt": "'I thought I told you to clean up your room!'", + "GameMasterPants": "'I thought I told you to clean up your room!'", + "RollingCactus": "'They hatin'...'", + "RockLobster": "'But it wasn't a rock!'", + "ShroomMinecart": "'The shroom goes vroom'", + "Gladius": "'Are you not entertained?!'", + "MeowmereMinecart": "'brrrrrow'", + "PartyMinecart": "'All aboard the party wagon!'", + "SteampunkMinecart": "'Steam powered!'", + "ChefHat": "'This chicken is raw!'", + "Fedora": "'*tips* M'lady'", + "GlowPaint": "'What a bright idea!'", + "PigronMinecart": "'Powered by Bacon!'", + "QuadBarrelShotgun": "'When 2 or 3 just doesn't cut it'", + "SparkleGuitar": "'These chords are out of this world'", + "BouncingShield": "'I can do this all day'", + "BunnyTail": "'That's why they call me Thumper'", + "CombatWrench": "'For fixing things, and breaking them'", + "FireproofBugNet": "'For when things get too hot to handle'", + "FlameWakerBoots": "'Never get cold feet again'", + "RabbitOrder": "'It looks like a bunny, but its actually a bunny'", + "TruffleWormCage": "'Won't be running away now...'", + "GelBalloon": "'Filled with Party Girl bathwater'", + "Teacup": "{$CommonItemTooltip.MinorStats}\n'A must-have for tea parties'", + "MilkCarton": "{$CommonItemTooltip.MinorStats}\n'For strong, healthy bones'", + "CoffeeCup": "{$CommonItemTooltip.MediumStats}\n'Hello darkness my old friend'", + "TorchGodsFavor": "Unlocks an ability toggle to the left of the inventory\nWhen enabled normal torches change according to your biome", + } +} \ No newline at end of file diff --git a/Localization/Content/en-US/Legacy.json b/Localization/Content/en-US/Legacy.json new file mode 100644 index 0000000..63002ba --- /dev/null +++ b/Localization/Content/en-US/Legacy.json @@ -0,0 +1,1176 @@ +{ + "LegacyWorldGen": { + "0": "Generating world terrain", + "10": "Generating surface caves", + "11": "Generating jungle", + "12": "Generating floating islands", + "13": "Adding mushroom patches", + "14": "Placing mud in the dirt", + "15": "Adding silt", + "16": "Adding shinies", + "17": "Adding webs", + "18": "Creating underworld", + "19": "Adding water bodies", + "1": "Adding sand", + "20": "Making the world evil", + "21": "Generating mountain caves", + "22": "Creating beaches", + "23": "Adding gems", + "24": "Gravitating sand", + "25": "Cleaning up dirt backgrounds", + "26": "Placing altars", + "27": "Settling liquids", + "28": "Placing life crystals", + "29": "Placing statues", + "2": "Generating hills", + "30": "Hiding treasure", + "31": "Hiding more treasure", + "32": "Hiding jungle treasure", + "33": "Hiding water treasure", + "34": "Placing traps", + "35": "Placing breakables", + "36": "Placing hellforges", + "37": "Spreading grass", + "38": "Growing cacti", + "39": "Planting sunflowers", + "3": "Putting dirt behind dirt", + "40": "Planting trees", + "41": "Planting herbs", + "42": "Planting weeds", + "43": "Growing vines", + "44": "Planting flowers", + "45": "Planting mushrooms", + "46": "Freeing unused resources", + "47": "Resetting game objects", + "48": "Setting hard mode", + "49": "Saving world data:", + "4": "Placing rocks in the dirt", + "50": "Backing up world file", + "51": "Loading world data:", + "52": "Checking tile alignment:", + "53": "Load failed!", + "54": "No backup found.", + "55": "Finding tile frames:", + "56": "Adding snow", + "57": "World", + "58": "Creating dungeon", + "59": "A meteorite has landed!", + "5": "Placing dirt in the rocks", + "60": "Smoothing the world", + "61": "Mossification", + "62": "Gemification", + "63": "Making cave walls", + "64": "Growing spider caves", + "65": "Clearing map data:", + "66": "Saving map data:", + "67": "Loading map data:", + "68": "Drawing map:", + "69": "Creating waterfalls", + "6": "Adding clay", + "70": "Creating jungle ruins", + "71": "Creating hornet nests", + "72": "Making the world bloody", + "73": "Validating world save:", + "74": "Slime is falling from the sky!", + "75": "Slime has stopped falling from the sky.", + "76": "Generating structures", + "77": "Adding more grass", + "78": "Desertification", + "79": "Weathering caverns", + "7": "Making random holes", + "80": "Chiseling marble", + "81": "Growing granite", + "8": "Generating small caves", + "9": "Generating large caves", + "82": "Disarming broken traps", + "83": "Growing rich mahogany", + "84": "Clean up", + "85": "Felling trees", + "86": "Final clean up", + "87": "Finalizing world", + "88": "Growing water plants", + "89": "Placing objects", + "90": "Forming the depths", + }, + "LegacyDialog": { + "1": "I hope a scrawny kid like you isn't all that is standing between us and Cthulhu's Eye.", + "10": "Check out my dirt blocks; they are extra dirty.", + "100": "Why purify the world when you can just blow it up?", + "101": "If you throw this one in the bathtub and close all the windows, it'll clear your sinuses and pop your ears!", + "102": "Wanna play Fuse Chicken?", + "103": "Hey, could you sign this Griefing Waiver?", + "104": "NO SMOKING IN HERE!!", + "105": "Explosives are da' bomb these days. Buy some now!", + "106": "It's a good day to die!", + "107": "I wonder what happens if I... (BOOM!)... Oh, sorry, did you need that leg?", + "108": "Dynamite, my own special cure-all for what ails ya.", + "109": "Check out my goods; they have explosive prices!", + "11": "Boy, that sun is hot! I do have some perfectly ventilated armor.", + "110": "I keep having vague memories of tying up a woman and throwing her in a dungeon.", + "111": "... we have a problem! Its a blood moon out there!", + "112": "T'were I younger, I would ask {Nurse} out. I used to be quite the lady killer.", + "113": "That Red Hat of yours looks familiar...", + "114": "Thanks again for freeing me from my curse. Felt like something jumped up and bit me.", + "115": "Mama always said I would make a great tailor.", + "116": "Life's like a box of clothes; you never know what you are gonna wear!", + "117": "Of course embroidery is hard! If it wasn't hard, no one would do it! That's what makes it great.", + "118": "I know everything they is to know about the clothierin' business.", + "119": "Being cursed was lonely, so I once made a friend out of leather. I named him Wilson.", + "12": "The sun is high, but my prices are not.", + "120": "Thank you for freeing me, human. I was tied up and left here by the other goblins. You could say that we didn't get along very well.", + "121": "I can't believe they tied me up and left me here just for pointing out that they weren't going east!", + "122": "Now that I'm an outcast, can I throw away the spiked balls? My pockets hurt.", + "123": "Looking for a gadgets expert? I'm your goblin!", + "124": "Thanks for your help. Now, I have to finish pacing around aimlessly here. I'm sure we'll meet again.", + "125": "I thought you'd be taller.", + "126": "Hey...what's {Mechanic} up to? Have you...have you talked to her, by chance?", + "127": "Hey, does your hat need a motor? I think I have a motor that would fit exactly in that hat.", + "128": "Yo, I heard you like rockets and running boots, so I put some rockets in your running boots.", + "129": "Silence is golden. Duct tape is silver.", + "13": "Oh, great. I can hear {Mechanic} and {Nurse} arguing from here.", + "130": "YES, gold is stronger than iron. What are they teaching these humans nowadays?", + "131": "You know, that mining helmet-flipper combination was a much better idea on paper.", + "132": "Goblins are surprisingly easy to anger. In fact, they could start a war over cloth!", + "133": "To be honest, most goblins aren't exactly rocket scientists. Well, some are.", + "134": "Do you know why we all carry around these spiked balls? Because I don't.", + "135": "I just finished my newest creation! This version doesn't explode violently if you breathe on it too hard.", + "136": "Goblin thieves aren't very good at their job. They can't even steal from an unlocked chest!", + "137": "Thanks for saving me, friend! This bondage was starting to chafe.", + "138": "Ohh, my hero!", + "139": "Oh, how heroic! Thank you for saving me, young lady!", + "14": "Have you seen Chith...Shith.. Chat... The big eye?", + "140": "Oh, how heroic! Thank you for saving me, young man!", + "141": "Now that we know each other, I can move in with you, right?", + "142": "Well, hi there, {Guide}! What can I do for you today?", + "143": "Well, hi there, {Demolitionist}! What can I do for you today?", + "144": "Well, hi there, {GoblinTinkerer}! What can I do for you today?", + "145": "Well, hi there, {Nurse}! What can I do for you today?", + "146": "Well, hi there, {Mechanic}! What can I do for you today?", + "147": "Well, hi there, {Dryad}! What can I do for you today?", + "148": "Want me to pull a coin from behind your ear? No? Ok.", + "149": "Do you want some magic candy? No? Ok.", + "15": "Hey, this house is secure, right? Right? {PlayerName}?", + "150": "I make a rather enchanting hot chocolate if you'd be inter...No? Ok.", + "151": "Are you here for a peek at my crystal ball?", + "152": "Ever wanted an enchanted ring that turns rocks into slimes? Well neither did I.", + "153": "Someone once told me friendship is magic. That's ridiculous. You can't turn people into frogs with friendship.", + "154": "I can see your future now... You will buy a lot of items from me!", + "155": "I once tried to bring an Angel Statue to life. It didn't do anything.", + "156": "Thanks! It was just a matter of time before I ended up like the rest of the skeletons down here.", + "157": "Hey, watch where you're going! I was over there a little while ago!", + "158": "Hold on, I've almost got wifi going down here.", + "159": "But I was almost done putting blinking lights up here!", + "16": "Not even a blood moon can stop capitalism. Let's do some business.", + "160": "DON'T MOVE. I DROPPED MY CONTACT.", + "161": "All I want is for the switch to make the... What?!", + "162": "Oh, let me guess. Didn't buy enough wire. Idiot.", + "163": "Just-could you just... Please? Ok? Ok. Ugh.", + "164": "I don't appreciate the way you're looking at me. I am WORKING right now.", + "165": "Hey, {PlayerName}, did you just come from {GoblinTinkerer}'s? Did he say anything about me by chance?", + "166": "{ArmsDealer} keeps talking about pressing my pressure plate. I told him it was for stepping on.", + "167": "Always buy more wire than you need!", + "168": "Did you make sure your device was plugged in?", + "169": "Oh, you know what this house needs? More blinking lights.", + "17": "Keep your eye on the prize, buy a lens!", + "170": "You can tell a Blood Moon is out when the sky turns red. There is something about it that causes monsters to swarm.", + "171": "Hey, buddy, do you know where any deathweed is? Oh, no reason; just wondering, is all.", + "172": "If you were to look up, you'd see that the moon is red right now.", + "173": "You should stay indoors at night. It is very dangerous to be wandering around in the dark.", + "174": "Greetings, {PlayerName}. Is there something I can help you with?", + "175": "I am here to give you advice on what to do next. It is recommended that you talk with me anytime you get stuck.", + "176": "They say there is a person who will tell you how to survive in this land... oh wait. That's me.", + "177": "You can use your pickaxe to dig through dirt, and your axe to chop down trees. Just place your cursor over the tile and click!", + "178": "If you want to survive, you will need to create weapons and shelter. Start by chopping down trees and gathering wood.", + "179": "Press {InventoryKey} to access your crafting menu. When you have enough wood, create a workbench. This will allow you to create more complicated things, as long as you are standing close to it.", + "18": "Kosh, kapleck Mog. Oh sorry, that's klingon for 'Buy something or die.'", + "180": "You can build a shelter by placing wood or other blocks in the world. Don't forget to create and place walls.", + "181": "Once you have a wooden sword, you might try to gather some gel from the slimes. Combine wood and gel to make a torch!", + "182": "To interact with backgrounds, use a hammer!", + "183": "You should do some mining to find metal ore. You can craft very useful things with it.", + "184": "Now that you have some ore, you will need to turn it into a bar in order to make items with it. This requires a furnace!", + "185": "You can create a furnace out of torches, wood, and stone. Make sure you are standing near a work bench.", + "186": "You will need an anvil to make most things out of metal bars.", + "187": "Anvils can be crafted out of iron or lead, or purchased from a merchant.", + "188": "Underground are crystal hearts which can be used to increase your max life. You can smash them with a pickaxe.", + "189": "If you gather 3 fallen stars, they can be combined to create an item that will increase your magic capacity.", + "19": "{PlayerName} is it? I've heard good things, friend!", + "190": "Stars fall all over the world at night. They can be used for all sorts of useful things. If you see one, be sure to grab it because they disappear after sunrise.", + "191": "There are many different ways you can attract people to move in to our town. They will of course need a home to live in.", + "192": "In order for a room to be considered a home, it needs to have a door, a chair, a table, and a light source. Make sure the house has walls as well.", + "193": "Two people will not live in the same home. Also, if their home is destroyed, they will look for a new place to live.", + "194": "You can use the housing interface to assign and view housing. Open your inventory and click the house icon.", + "195": "If you want a merchant to move in, you will need to gather plenty of money. 50 silver coins should do the trick!", + "196": "For a nurse to move in, you might want to increase your maximum life.", + "197": "If you had a gun, I bet an arms dealer might show up to sell you some ammo!", + "198": "You should prove yourself by defeating a strong monster. That will get the attention of a dryad.", + "199": "Make sure to explore the dungeon thoroughly. There may be prisoners held deep within.", + "2": "Look at that shoddy armor you're wearing. Better buy some more healing potions.", + "20": "I hear there's a secret treasure... oh never mind.", + "200": "Perhaps the old man by the dungeon would like to join us now that his curse has been lifted.", + "201": "Hang on to any bombs you might find. A demolitionist may want to have a look at them.", + "202": "Are goblins really so different from us that we couldn't live together peacefully?", + "203": "I heard there was a powerful wizard who lives in these parts. Make sure to keep an eye out for him next time you go underground.", + "204": "If you combine lenses at a demon altar, you might be able to find a way to summon a powerful monster. You will want to wait until night before using it, though.", + "205": "You can create worm bait with rotten chunks and vile powder. Make sure you are in a corrupt area before using it.", + "206": "Demonic altars can usually be found in the corruption. You will need to be near them to craft some items.", + "207": "You can make a grappling hook from a hook and 3 chains. Skeletons found deep underground usually carry hooks, and chains can be made from iron bars or lead bars.", + "208": "If you see a pot, be sure to smash it open. They contain all sorts of useful supplies.", + "209": "There is treasure hidden all over the world. Some amazing things can be found deep underground!", + "21": "Angel Statue you say? I'm sorry, I'm not a junk dealer.", + "210": "Smashing a shadow orb will sometimes cause a meteor to fall out of the sky. Shadow orbs can usually be found in the chasms around corrupt areas.", + "211": "You should focus on gathering more life crystals to increase your maximum life.", + "212": "Your current equipment simply won't do. You need to make better armor.", + "213": "I think you are ready for your first major battle. Gather some lenses from the eyeballs at night and take them to a demon altar.", + "214": "You will want to increase your life before facing your next challenge. Fifteen hearts should be enough.", + "215": "The ebonstone in the corruption can be purified using some powder from a dryad, or it can be destroyed with explosives.", + "216": "Your next step should be to explore the corrupt chasms. Destroy any shadow orb you find.", + "217": "There is an old dungeon not far from here. Now would be a good time to go check it out.", + "218": "You should make an attempt to max out your available life. Try to gather twenty hearts.", + "219": "There are many treasures to be discovered in the jungle, if you are willing to dig deep enough.", + "22": "The last guy who was here left me some junk... er I mean... treasures!", + "220": "The underworld is made of a material called hellstone. It's perfect for making weapons and armor.", + "221": "When you are ready to challenge the keeper of the underworld, you will have to make a living sacrifice. Everything you need for it can be found in the underworld.", + "222": "Make sure to smash any demon altar you can find. Something good is bound to happen if you do!", + "223": "Souls can sometimes be gathered from fallen creatures in places of extreme light or dark.", + "224": "Ho ho ho, and a bottle of... Egg Nog!", + "225": "Care to bake me some cookies?", + "226": "What? You thought I wasn't real?", + "227": "I managed to sew your face back on. Be more careful next time.", + "228": "That's probably going to leave a scar.", + "229": "All better. I don't want to see you jumping off anymore cliffs.", + "23": "I wonder if the moon is made of cheese...huh, what? Oh yes, buy something!", + "230": "That didn't hurt too bad, now did it?", + "231": "As if living underground wasn't bad enough, jerks like you come in while I'm sleeping and steal my children.", + "232": "Between you and me, {Dryad} is the only one I trust. She is the only one here who hasn't tried to eat me or use me in a potion.", + "233": "I tried to lick myself the other day to see what the big deal was, everything started glowing blue.", + "234": "Everytime I see the color blue, it makes me depressed and lazy.", + "235": "You haven't seen any pigs around here have you? My brother lost his leg to one.", + "236": "Everyone in this town feels a bit off. I woke up to the clothier chewing on my foot last night.", + "237": "I'll give you a discount on your wears if you can convince {Truffle} to come over for a...sizing.", + "238": "I feel like {Truffle} is a bit misunderstood, he really is a fun guy.", + "24": "Did you say gold? I'll take that off of ya.", + "240": "I don't know the 'Truffle Shuffle,' so stop asking!", + "241": "There's been such a huge rumor that's being spread about me, 'If you can't beat him, eat him!'", + "242": "Oy, whatchu got in you jiminy fluffer?", + "243": "Should I become an air pirate? I've considered becoming an air pirate.", + "244": "Be it what it would, a jetpack would suit you nicely!", + "245": "I'm feeling a bit peevish as of late, so enough with your palaver you ragamuffin!", + "246": "I'm mighty curious about that {Cyborg} fellow. By what manner of consumption does he maintain such locomotion?", + "247": "That captain fellow seems to me to be 'pretty well over the bay' if you know what I mean!", + "248": "Show me some gears!", + "249": "I like your... gear. Does it come in brass?", + "25": "You better not get blood on me.", + "250": "Once you enter hallowed land, you will see a rainbow in the sky. I can help you with painting that if you want.", + "251": "Check out {PartyGirl}. Now that's a girl who can paint the town red!", + "252": "I know the difference between turquoise and blue-green. But I won't tell you.", + "253": "I'm all out of titanium white, so don't even ask.", + "254": "Try swirly pink and purple, it works, I swear!", + "255": "No, no, no... There's TONS of different grays! Don't get me started...", + "256": "I hope it doesn't rain again until this paint dries. That would be a disaster!", + "257": "I bring you the richest colors in exchange for your riches!", + "258": "My dear, what you're wearing is much too drab. You absolutely must take a lesson in dyeing your tired attire!", + "259": "The only kind of wood I would bother dyeing is RICH Mahogany. Dyeing any other wood is such a waste.", + "26": "Hurry up and stop bleeding.", + "260": "You must do something about {Pirate}. Everytime he comes over here, it takes me a week to get the smell off!", + "261": "Which doctor am I? The Witch Doctor am I.", + "262": "The heart of magic is nature. The nature of hearts is magic.", + "263": "{Nurse} may help heal your body, but I can make you embody healing.", + "264": "Choose wisely, {PlayerName}, my commodities are volatile and my dark arts, mysterious.", + "265": "We have to talk. It's... it's about parties.", + "266": "I can't decide what I like more: parties, or after-parties.", + "267": "We should set up a blinkroot party, and we should also set up an after-party.", + "268": "Wow, {PlayerName}, meeting an adventurous man like you makes me want to party!", + "269": "Put up a disco ball and then I'll show you how to party.", + "27": "If you're going to die, do it outside.", + "270": "I went to Sweden once, they party hard, why aren't you like that?", + "271": "My name's {PartyGirl} but people call me party pooper. Yeah I don't know, it sounds cool though.", + "272": "Do you party? Sometimes? Hm, okay then we can talk...", + "273": "I'm no landlubber, but it's better to have lubbed and lost than never to have lubbed at all.", + "274": "Yo ho ho and a bottle of....blinkroots!", + "275": "YAR! Funny ye should be mentionin' parrots b'cause...um...What t'were we talkin' 'bout?", + "276": "{PlayerName}, Ye be one o' the finest lookin' lassies this here captain's seen in many a fortnight!", + "277": "Stay off me booty, ya scallywag!", + "278": "What in blazes are ye talkin' about? Moby Dick is mine!", + "279": "*Yarr Blarr Harrdarr*", + "28": "What is that supposed to mean?!", + "280": "And then Unit 492-8 said, 'Who do you think I am, Unit 472-6?' HA. HA. HA.", + "281": "My expedition efficiency was critically reduced when a projectile impacted my locomotive actuator.", + "282": "This sentence is false, or is it?", + "283": "So that 'punk' lookin' chick is an inventor, eh? I think I could show her a thing or two!", + "284": "Sure, me and {Pirate} are pals, but I hate it when his parrot does his business on me. That stuff's corrosive!", + "285": "I built myself a taste mechanism, so I can drink some ale!", + "286": "Sometimes I come off a bit... Get it? a bit?", + "287": "Short back and sides' is it?", + "288": "Those highlights really bring out your eyes!", + "289": "My hands are sticky from all that... wax.", + "29": "I don't think I like your tone.", + "290": "Tea? Coffee? Or is it just orange juice again?", + "291": "Doll, we seriously need to fix those split ends.", + "292": "Gurrllll! You are my favorite gossip ever.", + "293": "Which aftershave can I interest you in today, sir?", + "294": "Sit down for a second and I'll have you steppin' razor.", + "295": "Either you have style, or you get styled.", + "296": "For you I think we'll do something... low maintenance.", + "297": "I tried using one of the Dye Master's products once. Ends fried. Disaster.", + "298": "Oh you poor, poor thing. Just... just sit down here. It'll be okay. Shhhh.", + "299": "Check my fresh.", + "3": "I feel like an evil presence is watching me.", + "30": "Why are you even here? If you aren't bleeding, you don't need to be here. Get out.", + "300": "Hello sir, I'm {Stylist}, and I'll be your barber today.", + "301": "Just a little off the top? That's no fun...", + "302": "I hope you like what I did to {PartyGirl}'s hair!", + "303": "There is nothing I can do for {Demolitionist}'s singed head. He's a lost cause.", + "304": "Tipping IS optional, but remember I have access to scissors and your head.", + "305": "This is a cut-throat razor by the way.", + "306": "You better stay outta my hair tonight, hun. I just sharpened my scissors, and I'm looking for an excuse to use them!", + "307": "Mhmm, I heard from {PartyGirl} that {Mechanic}'s friend {Nurse} spent her boyfriend's last paycheck on shoes.", + "308": "One time I put a wig on {Cyborg} just so I could cut his hair. I think he kinda liked it!", + "309": "I tried to visit {Stylist} one time. She just looked at me and said 'nope.'", + "31": "WHAT?!", + "310": "I think it is about time I got my hair did!", + "311": "Did you even try to brush your hair today?", + "312": "So a pixie cut, would you like to keep some lady burns?", + "313": "I have no problem cleaning up ears and eyebrows, but I draw the line at nose hair.", + "314": "Alright, you sit and marinate. I'll be back to rinse your color out in 25 minutes...", + "315": "Thanks hun! Now I can finally do my hair.", + "316": "I would have given you a free cut if you'd come earlier.", + "317": "Don't go exploring with scissors, they said. You won't get trapped in a spider's web, they said!", + "318": "Ew, my hair, there's spider web all over it!", + "319": "Meet me behind {Guide}'s house in about three hours, I think I have something you will find very appealing.", + "32": "Have you seen that old man pacing around the dungeon? He looks troubled.", + "320": "That {Merchant}, he really has no appreciation for a really good deal.", + "321": "I sell only what I can get. {Clothier} keeps hounding me for exotic clothing.", + "322": "Hmm, you look like you could use an Angel Statue! They slice, and dice, and make everything nice!", + "323": "I don't refund for \"buyer's remorse...\" Or for any other reason, really.", + "324": "Buy now and get free shipping!", + "325": "I sell wares from places that might not even exist!", + "326": "You want two penny farthings!? Make it one and we have a deal.", + "327": "Combination hookah and coffee maker! Also makes julienne fries!", + "328": "Come and have a look! One pound fish! Very, very good! One pound fish!", + "329": "If you're looking for junk, you've come to the wrong place.", + "33": "I wish {Demolitionist} would be more careful. I'm getting tired of having to sew his limbs back on every day.", + "330": "A thrift shop? No, I am only selling the highest quality items on the market.", + "331": "Smashing a crimson heart will sometimes cause a meteor to fall out of the sky. Crimson hearts can usually be found in the chasms around crimtane areas.", + "332": "Have you tried using purification powder on the crimstone of the crimson?", + "333": "You must cleanse the world of this crimson.", + "334": "Psst! I might have a job for you. Don't think you can say no, either!", + "335": "I want a fish and you're going to find me one! Ask me about it!", + "336": "Hey! Just the sacrifi- I mean competent fishing master that I've been looking for! ", + "337": "{Angler} wants YOU as the official {WorldName} errand monkey!", + "338": "Whaaaat?! Can't you see I'm winding up fishing line??", + "339": "I have enough fish! I don't need your help right now!", + "34": "Hey, has {ArmsDealer} mentioned needing to go to the doctor for any reason? Just wondering.", + "340": "There's no chefs in all of {WorldName}, so I have to cook all this fish myself! ", + "341": "Hey! Watch it! I'm setting up traps for my biggest prank ever! No one will see it coming! Don't you dare tell anyone!", + "342": "Let a kid give you some advice, never touch your tongue to an ice block! Wait, forget what I said, I totally want to see you do it!", + "343": "Ever heard of a barking fish?! I haven't, I'm just wondering if you did!", + "344": "{WorldName} is filled to the brim with the most outlandish kinds of fish!", + "345": "I'm bummed out! There's probably been fish that have gone extinct before I even was born, and that's not fair!", + "346": "I don't have a mommy or a daddy, but I have a lot of fish! It's close enough!", + "347": "Heh heh, you shoulda seen the look on {Dryad}'s face when I stuck that piranha tooth in the chair!", + "348": "I have a request for you! No, I don't care that there's a zombie apocalypse right now!", + "349": "Hurry up and listen! I need you to catch something for me right now!", + "35": "I need to have a serious talk with {Guide}. How many times a week can you come in with severe lava burns?", + "350": "I hate blood moons! I stay up all night because of all the scary noises!", + "351": "Blood moon is the worst time to fish! The fish bite, yes, but so do the zombies!", + "352": "There's a bajillion monsters running around out there right now!", + "353": "Thanks, I guess, for saving me or whatever. You'd be a great helper minion!", + "354": "Wha? Who might you be? I totally wasn't just drowning or anything!", + "355": "You saved me! You're awful nice, I could use you... er, I mean, totally hire you to do some awesome stuff for me!", + "356": "Got any spare bones for sale? I'm looking to replace my broken hip... again.", + "357": "Excellent! Someone's finally come by to take some of these maggots off my hands.", + "358": "There's no illness or condition that can't be cured by some of my Slime Oil! Trust me, it works, just look at my lively figure!", + "359": "You've got a real backbone coming way down here, how 'bout ya buy somethin?", + "36": "I think you look better this way.", + "360": "You would not believe some of the things people throw at me... Wanna buy some of it?", + "361": "I'd lend you a hand, but last time I did that, I didn't get it back for a month.", + "362": "Stay away from the spiders. They'll suck out your insides and leave you a hollow shell of a man. Trust me on this one.", + "363": "The only things constant in this world are death and taxes, I've got both!", + "364": "You again? Suppose you want more money!?", + "365": "Must everyone open and shut doors so incredibly noisily around here?!", + "366": "I see you're free of time, as usual. Can't imagine what work life would be for your kind of folk.", + "367": "Yes, yes, yes! -- I'll give you your share in just a moment. I'd think you to be a bit more patient, what with me doing all the work and all.", + "368": "What does a man have to do to be left alone in this place? Go bugger someone less busy!", + "369": "...two barrels of molasses, plus -- Oh, nevermind that, you're here. Here's your money.", + "37": "Eww... What happened to your face?", + "370": "Just between you and me... I have no idea why they're bothering to pay the rent", + "371": "Tried to get {Dryad} to pay me with favors once, now I have fungus growing in strange places.", + "372": "Go tell {ArmsDealer} to stop offering to pay me with ammo, I don't even own a gun.", + "373": "Why don't YOU try collecting money from {Demolitionist} and not lose a hand or foot or...", + "374": "I just came from {Merchant}'s. He wanted to know if I took credit cards.", + "38": "MY GOODNESS! I'm good, but I'm not THAT good.", + "380": "Here's your cut of the taxes that I've taken from our surplus population!", + "381": "Here you are again, taking all my coin! Just grab it and begone from my sight!", + "382": "Bah! Here, take your shillings and get out of my sight!", + "383": "This is all you're gonna get for now, not a penny more! Take it and spend it wisely.", + "39": "Dear friends we are gathered here today to bid farewell... Oh, you'll be fine.", + "390": "...And people call me greedy? No, I have nothing else for you.", + "391": "Oh, so you just see me as a coin sign, eh? 'Cus every time you see me, you ask me.", + "392": "Don't you ever stop just to say 'Hi?'", + "393": "Bah! You again? You just grabbed some of my coin just moments ago, so bugger off and come back later!", + "394": "I just gave you half a crown five minutes ago! Scram!", + "395": "Reaching into my moneybags again already!? And you call ME greedy.", + "396": "You just received your pay, and not a farthing more! Get out!", + "397": "Money doesn't grow on trees, so don't overpick my fruit! Bah! ", + "398": "You already managed to spend every pence I paid you!? Bah, I'm not a charity, go kill a slime!", + "399": "Not so fast! You got your money, now begone! ", + "4": "Sword beats paper! Get one today.", + "40": "You left your arm over there. Let me get that for you...", + "400": "Begging so soon?! Don't look at me like I'll have a change of heart overnight! ", + "401": "Make sure to smash any crimson altar you can find. Something good is bound to happen if you do!", + "402": "Crimson altars can usually be found in the crimson. You will need to be near them to craft some items.", + "403": "You can create a bloody spine with vertebrae. Make sure you are in a crimson area before using it.", + "404": "I think you are ready for your first major battle. Gather some lenses from the eyeballs at night and take them to a crimson altar.", + "41": "Quit being such a baby! I've seen worse.", + "42": "That's gonna need stitches!", + "43": "Trouble with those bullies again?", + "44": "Hold on, I've got some cartoon bandages around here somewhere.", + "45": "Walk it off, {PlayerName}, you'll be fine. Sheesh.", + "46": "Does it hurt when you do that? Don't do that.", + "47": "You look half digested. Have you been chasing slimes again?", + "48": "Turn your head and cough.", + "49": "That's not the biggest I've ever seen... Yes, I've seen bigger wounds for sure.", + "5": "You want apples? You want carrots? You want pineapples? We got torches.", + "50": "Would you like a lollipop?", + "51": "Show me where it hurts.", + "52": "I'm sorry, but you can't afford me.", + "53": "I'm gonna need more gold than that.", + "54": "I don't work for free you know.", + "55": "I don't give happy endings.", + "56": "I can't do anymore for you without plastic surgery.", + "57": "Quit wasting my time.", + "58": "I heard there is a doll that looks very similar to {Guide} somewhere in the underworld. I'd like to put a few rounds in it.", + "59": "Make it quick! I've got a date with {Nurse} in an hour.", + "6": "Lovely morning, wouldn't you say? Was there something you needed?", + "60": "I want what {Nurse} is sellin'. What do you mean, she doesn't sell anything?", + "61": "{Dryad} is a looker. Too bad she's such a prude.", + "62": "Don't bother with {Demolitionist}, I've got all you need right here.", + "63": "What's {Demolitionist}'s problem? Does he even realize we sell completely different stuff?", + "64": "Man, it's a good night not to talk to anybody, don't you think, {PlayerName}?", + "65": "I love nights like tonight. There is never a shortage of things to kill!", + "66": "I see you're eyeballin' the Minishark.. You really don't want to know how it was made.", + "67": "Hey, this ain't a movie, pal. Ammo is extra.", + "68": "Keep your hands off my gun, buddy!", + "69": "Have you tried using purification powder on the ebonstone of the corruption?", + "7": "Night will be upon us soon, friend. Make your choices while you can.", + "70": "I wish {ArmsDealer} would stop flirting with me. Doesn't he realize I'm 500 years old?", + "71": "Why does {Merchant} keep trying to sell me angel statues? Everyone knows that they don't do anything.", + "72": "Have you seen the old man walking around the dungeon? He doesn't look well at all...", + "73": "I sell what I want! If you don't like it, too bad.", + "74": "Why do you have to be so confrontational during a time like this?", + "75": "I don't want you to buy my stuff. I want you to want to buy my stuff, ok?", + "76": "Dude, is it just me or is there like a million zombies out tonight?", + "77": "You must cleanse the world of this corruption.", + "78": "Be safe; Terraria needs you!", + "79": "The sands of time are flowing. And well, you are not aging very gracefully.", + "8": "You have no idea how much Dirt Blocks sell for overseas.", + "80": "What's this about me having more 'bark' than bite?", + "81": "So two goblins walk into a bar, and one says to the other, 'Want to get a Goblet of beer?!", + "82": "I cannot let you enter until you free me of my curse.", + "83": "Come back at night if you wish to enter.", + "84": "My master cannot be summoned under the light of day.", + "85": "You are far too weak to defeat my curse. Come back when you aren't so worthless.", + "86": "You pathetic fool. You cannot hope to face my master as you are now.", + "87": "I hope you have like six friends standing around behind you.", + "88": "Please, no, stranger. You'll only get yourself killed.", + "89": "You just might be strong enough to free me from my curse...", + "9": "Ah, they will tell tales of {PlayerName} some day... good ones I'm sure.", + "90": "Stranger, do you possess the strength to defeat my master?", + "91": "Please! Battle my captor and free me! I beg you!", + "92": "Defeat my master, and I will grant you passage into the Dungeon.", + "93": "Trying to get past that ebonrock, eh? Why not introduce it to one of these explosives!", + "94": "Hey, have you seen a clown around?", + "95": "There was a bomb sitting right here, and now I can't seem to find it...", + "96": "I've got something for them zombies alright!", + "97": "Even {ArmsDealer} wants what I'm selling!", + "98": "Would you rather have a bullet hole or a grenade hole? That's what I thought.", + "99": "I'm sure {Nurse} will help if you accidentally lose a limb to these." + }, + "LegacyMenu": { + "0": "Start a new instance of Terraria to join!", + "100": "Background On", + "101": "Background Off", + "102": "Select language", + "103": "Language", + "104": "Yes", + "105": "No", + "106": "Toggle Map Style ", + "107": "Toggle Fullscreen ", + "108": "Zoom In ", + "109": "Zoom Out ", + "10": "Load Backup", + "110": "Decrease Transparency ", + "111": "Increase Transparency ", + "112": "Map Enabled", + "113": "Map Disabled", + "114": "General", + "115": "Map Controls", + "116": "Multicore Lighting:", + "117": "Off", + "118": "Close Menu", + "119": "Ambient:", + "11": "No backup found", + "120": "Smart Cursor ", + "121": "Smart Cursor Mode: Toggle", + "122": "Smart Cursor Mode: Hold", + "123": "Event Progress Bar", + "124": "Off", + "125": "Timed", + "126": "On", + "127": "Style", + "128": "Placement Preview On", + "129": "Placement Preview Off", + "12": "Single Player", + "130": "Mount ", + "131": "Achievements", + "132": "Blood and Gore On", + "133": "Blood and Gore Off", + "134": "Apply", + "135": "Server Settings", + "136": "Steam Multiplayer: Disabled", + "137": "Steam Multiplayer: Enabled", + "138": "Allowed Users: Invite Only", + "139": "Allowed Users: Friends", + "13": "Multiplayer", + "140": "Friends Can Invite: Off", + "141": "Friends Can Invite: On", + "142": "Allow Friends Of Friends: Off", + "143": "Allow Friends Of Friends: On", + "144": "Start", + "145": "Join via Steam", + "146": "Join via IP", + "147": "Invite Friends", + "148": "Up", + "149": "Down", + "14": "Settings", + "150": "Left", + "151": "Right", + "152": "Jump", + "153": "Throw", + "154": "Inventory", + "155": "Grapple", + "156": "Quick Mana", + "157": "Quick Buff", + "158": "Quick Mount", + "159": "Quick Heal", + "15": "Exit", + "160": "Auto Select", + "161": "Smart Cursor", + "162": "Use Item", + "163": "Interact", + "164": "Gameplay Controls", + "165": "Map Controls", + "166": "Hotbar Controls", + "167": "Gamepad Settings", + "168": "Zoom In", + "169": "Zoom Out", + "16": "Create Character", + "170": "Increase Transparency", + "171": "Decrease Transparency", + "172": "Toggle Map Style", + "173": "Toggle Full Map", + "174": "Cycle Left", + "175": "Cycle Right", + "176": "Hotbar #1", + "177": "Hotbar #2", + "178": "Hotbar #3", + "179": "Hotbar #4", + "17": "Delete", + "180": "Hotbar #5", + "181": "Hotbar #6", + "182": "Hotbar #7", + "183": "Hotbar #8", + "184": "Hotbar #9", + "185": "Hotbar #10", + "186": "Quick Mark #1", + "187": "Quick Mark #2", + "188": "Quick Mark #3", + "189": "Quick Mark #4", + "18": "Hair", + "190": "Radial Hotbar", + "191": "Cursor Snap Up", + "192": "Cursor Snap Right", + "193": "Cursor Snap Down", + "194": "Cursor Snap Left", + "195": "", + "196": "DPad Cursor Snap", + "197": "DPad Hotbar", + "198": "Gamepad Advanced Settings", + "199": "Triggers Deadzone", + "19": "Eyes", + "1": "Running on port ", + "200": "Sliders Deadzone", + "201": "Left Thumbstick Deadzone X", + "202": "Left Thumbstick Deadzone Y", + "203": "Right Thumbstick Deadzone X", + "204": "Right Thumbstick Deadzone Y", + "205": "Invert Left Thumbstick Horizontally", + "206": "Invert Left Thumbstick Vertically", + "207": "Invert Right Thumbstick Horizontally", + "208": "Invert Right Thumbstick Vertical", + "209": "Utilize", + "20": "Skin", + "210": "Interface", + "211": "Passwords: Visible", + "212": "Passwords: Hidden", + "213": "Smart Cursor Priority: Pickaxe -> Axe", + "214": "Smart Cursor Priority: Axe -> Pickaxe", + "215": "Smart Block Placement: To Cursor", + "216": "Smart Block Placement: Disabled", + "217": "Border Color", + "218": "Cursor", + "219": "Controls", + "21": "Clothes", + "220": "Activate Set Bonuses: Up", + "221": "Activate Set Bonuses: Down", + "222": "Keybindings", + "223": "Left Shift Quick Trash: Enabled", + "224": "Left Shift Quick Trash: Disabled", + "225": "Quick Wall Replace: Disabled", + "226": "Quick Wall Replace: Enabled", + "227": "Hotbar Scroll Time To Radial: On", + "228": "Hotbar Scroll Time To Radial: Off", + "229": "Tile Grid On", + "22": "Male", + "230": "Tile Grid Off", + "231": "Lock On", + "232": "Lock On Priority: Focus Target", + "233": "Lock On Priority: Target Closest", + "234": "Lock On Priority: Clearest Line", + "235": "abc / ABC / !@#", + "236": "Backspace", + "237": "Submit", + "238": "Space", + "239": "<-", + "23": "Female", + "240": "->", + "241": "Gamepad Instructions Off", + "242": "Gamepad Instructions On", + "243": "Menu Controls", + "244": "Radial Quickbar", + "245": "Borderless Window: Enabled", + "246": "Borderless Window: Disabled", + "247": "Frame Skip Off", + "248": "Frame Skip On", + "249": "Frame Skip Subtle", + "24": "Hardcore", + "250": "Miner's Wobble: Enabled", + "251": "Miner's Wobble: Disabled", + "252": "Interface Movement Delay", + "25": "Mediumcore", + "26": "Classic", + "27": "Random", + "28": "Create", + "29": "Hardcore characters die for good.", + "2": "Disconnect", + "30": "Mediumcore characters drop items on death.", + "31": "Classic characters drop money on death.", + "32": "Select difficulty", + "33": "Shirt", + "34": "Undershirt", + "35": "Pants", + "36": "Shoes", + "37": "Hair", + "38": "Hair Color", + "39": "Eye Color", + "3": "Server Requires Password:", + "40": "Skin Color", + "41": "Shirt Color", + "42": "Undershirt Color", + "43": "Pants Color", + "44": "Shoe Color", + "45": "Enter Character Name:", + "46": "Delete", + "47": "Create World", + "48": "Enter World Name:", + "49": "Go Windowed", + "4": "Accept", + "50": "Go Fullscreen", + "51": "Resolution", + "52": "Parallax", + "53": "Frame Skip Off", + "54": "Frame Skip On", + "55": "Lighting: Color", + "56": "Lighting: White", + "57": "Lighting: Retro", + "58": "Lighting: Trippy", + "59": "Quality: Auto", + "5": "Back", + "60": "Quality: High", + "61": "Quality: Medium", + "62": "Quality: Low", + "63": "Video", + "64": "Cursor Color", + "65": "Volume", + "66": "Controls", + "67": "Autosave On", + "68": "Autosave Off", + "69": "Autopause On", + "6": "Cancel", + "70": "Autopause Off", + "71": "Pickup Text On", + "72": "Pickup Text Off", + "73": "Fullscreen Resolution", + "74": "Up ", + "75": "Down ", + "76": "Left ", + "77": "Right ", + "78": "Jump ", + "79": "Throw ", + "7": "Enter Server Password:", + "80": "Inventory ", + "81": "Quick Heal ", + "82": "Quick Mana ", + "83": "Quick Buff ", + "84": "Grapple ", + "85": "Auto Select ", + "86": "Reset to Default", + "87": "Join", + "88": "Host & Play", + "89": "Enter Server IP Address:", + "8": "Starting server...", + "90": "Enter Server Port:", + "91": "Choose world size:", + "92": "Small", + "93": "Medium", + "94": "Large", + "95": "Red:", + "96": "Green:", + "97": "Blue:", + "98": "Sound:", + "99": "Music:", + "9": "Load failed!" + }, + "LegacyTooltip": { + "0": "Equipped in social slot", + "10": "Slow speed", + "11": "Very slow speed", + "12": "Extremely slow speed", + "13": "Snail speed", + "14": "No knockback", + "15": "Extremely weak knockback", + "16": "Very weak knockback", + "17": "Weak knockback", + "18": "Average knockback", + "19": "Strong knockback", + "1": "No stats will be gained", + "20": "Very strong knockback", + "21": "Extremely strong knockback", + "22": "Insane knockback", + "23": "Equipable", + "24": "Vanity Item", + "25": " defense", + "26": "% pickaxe power", + "27": "% axe power", + "28": "% hammer power", + "29": "Restores", + "2": " melee damage", + "30": "life", + "31": "mana", + "32": "Uses", + "33": "Can be placed", + "34": "Ammo", + "35": "Consumable", + "36": "Material", + "37": " minute duration", + "38": " second duration", + "39": "% damage", + "3": " ranged damage", + "40": "% speed", + "41": "% critical strike chance", + "42": "% mana cost", + "43": "% size", + "44": "% velocity", + "45": "% knockback", + "46": "% movement speed", + "47": "% melee speed", + "48": "Set bonus:", + "49": "Sell price:", + "4": " magic damage", + "50": "Buy price:", + "51": "No value", + "52": "Consumes ", + "53": " summon damage", + "54": " range", + "55": " damage", + "56": "Marked as favorite", + "57": "Quick trash, stacking, and selling will be blocked", + "58": " throwing damage", + "59": "It has been cursed by a powerful Jungle creature", + "5": "% critical strike chance", + "6": "Insanely fast speed", + "60": "Cannot be equipped or removed while shopping", + "7": "Very fast speed", + "8": "Fast speed", + "9": "Average speed" + }, + "LegacyMultiplayer": { + "0": "Receive:", + "10": "You are not in a party!", + "11": "{0} has enabled PvP!", + "12": "{0} has disabled PvP!", + "13": "{0} is no longer on a party.", + "14": "{0} has joined the red party.", + "15": "{0} has joined the green party.", + "16": "{0} has joined the blue party.", + "17": "{0} has joined the yellow party.", + "18": "Welcome to", + "19": "{0} has joined.", + "1": "Incorrect password", + "20": "{0} has left.", + "21": "/players", + "22": "{0} has joined the pink party.", + "2": "Invalid operation at this state.", + "3": "You are banned from this server.", + "4": "You are not using the same version as this server.", + "5": "{0} is already on this server.", + "6": "/playing", + "7": "Current players:", + "8": "/roll", + "9": "rolls a" + }, + "LegacyMisc": { + "0": "A goblin army has been defeated!", + "100": "Pick world evil", + "101": "Corruption", + "102": "Crimson", + "103": "Random", + "104": "Cannot be used without Etherian Mana until the Eternia Crystal has been defended", + "105": "Dragonfly", + "10": "A horrible chill goes down your spine...", + "11": "Screams echo around you...", + "12": "Your world has been blessed with Cobalt!", + "13": "Your world has been blessed with Mythril!", + "14": "Your world has been blessed with Adamantite!", + "15": "The ancient spirits of light and dark have been released.", + "19": "{0} was slain...", + "1": "A goblin army is approaching from the west!", + "20": "A solar eclipse is happening!", + "21": "Your world has been blessed with Palladium!", + "22": "Your world has been blessed with Orichalcum!", + "23": "Your world has been blessed with Titanium!", + "24": "The pirates have been defeated!", + "25": "Pirates are approaching from the west!", + "26": "Pirates are approaching from the east!", + "27": "The pirates have arrived!", + "28": "You feel vibrations from deep below...", + "29": "This is going to be a terrible night...", + "2": "A goblin army is approaching from the east!", + "30": "The air is getting colder around you...", + "31": "The Pumpkin Moon is rising...", + "32": "The jungle grows restless...", + "33": "Screams are echoing from the dungeon...", + "34": "The Frost Moon is rising...", + "35": "{0} has departed!", + "36": "{0} has left!", + "37": "Any", + "38": "Pressure Plate", + "39": " and increased life regeneration", + "3": "A goblin army has arrived!", + "40": "Increases life regeneration", + "41": "Martians are invading!", + "42": "The martians have been defeated!", + "43": "Celestial creatures are invading!", + "44": "Your mind goes numb...", + "45": "You are overwhelmed with pain...", + "46": "Otherworldly voices linger around you...", + "47": "The Moon Lord has awoken!", + "48": "The Twins have awoken!", + "49": "You wake up from a strange dream...", + "4": "The Frost Legion has been defeated!", + "50": "have been defeated!", + "51": "Lunar Fragment", + "52": "Impending doom approaches...", + "53": "Select", + "54": "Take", + "55": "Take One", + "56": "Close", + "57": "Grapple", + "58": "Jump", + "59": "Cycle hotbar", + "5": "The Frost Legion is approaching from the west!", + "60": "Attack", + "61": "Build", + "62": "Drink", + "63": "Action", + "64": "Switch menu", + "65": "Place", + "66": "Swap", + "67": "Equip", + "68": "Unequip", + "69": "Show room flags", + "6": "The Frost Legion is approaching from the east!", + "70": "Check housing", + "71": "Quick craft", + "72": "Craft", + "73": "Select", + "74": "Trash", + "75": "Sell", + "76": "Transfer", + "77": "Show visuals", + "78": "Hide visuals", + "79": "Use", + "7": "The Frost Legion has arrived!", + "80": "Talk", + "81": "Read", + "82": "Back", + "83": "Favorite", + "84": "You can't change teams inside your team's blocks!", + "85": "Jungle Bug", + "86": "Duck", + "87": "Butterfly", + "88": "Firefly", + "89": "Wiring Options", + "8": "The Blood Moon is rising...", + "90": "Buy", + "91": "Buy More", + "92": "Sell", + "93": "Craft more", + "94": "Try Removing", + "95": "Snail", + "96": "Looks like ", + "97": " is throwing a party", + "98": " are throwing a party", + "99": "Party time's over!", + "9": "You feel an evil presence watching you..." + }, + "LegacyInterface": { + "0": "Life:", + "100": "Creature Count", + "101": "Kill Count", + "102": "Moon Phase", + "103": "Movement Speed", + "104": "Treasure", + "105": "Rare Creatures", + "106": "Damage Per Second", + "107": "Strange Plants", + "108": "Open Map", + "109": "Close Map", + "10": "Defense", + "110": "Open Folder", + "111": "Take Screenshot", + "112": "You must first set a frame", + "113": "Only available in windowed mode", + "114": "Only available if map is enabled", + "115": "Camera Mode Disabled", + "116": "Highlight New Items Off", + "117": "Highlight New Items On", + "118": "Zoom In", + "119": "Zoom Out", + "11": "Social", + "120": "Teleport to ally", + "121": "Drop Item", + "122": "Sort Items", + "123": "Cold Weather", + "124": "Ecto Mist", + "12": "Helmet", + "13": "Shirt", + "14": "Pants", + "15": "platinum", + "16": "gold", + "17": "silver", + "18": "copper", + "19": "Reforge", + "1": "Breath", + "20": "Place an item here to reforge", + "21": "Showing recipes that use", + "22": "Required objects:", + "23": "None", + "24": "Place a material here", + "25": "Crafting", + "26": "Coins", + "27": "Ammo", + "28": "Shop", + "29": "Loot All", + "2": "Mana", + "30": "Deposit All", + "31": "Quick Stack", + "32": "Piggy Bank", + "33": "Safe", + "34": "Time", + "35": "Save & Exit", + "36": "Disconnect", + "37": "Items", + "38": "You were slain...", + "39": "This housing is suitable.", + "3": "Trash Can", + "40": "This is not valid housing.", + "41": "This housing is already occupied.", + "42": "This housing is corrupted.", + "43": "Connection timed out", + "44": "Receiving tile data", + "45": "Equip", + "46": "Cost", + "47": "Save", + "48": "Edit", + "49": "Status", + "4": "Inventory", + "50": "Curse", + "51": "Help", + "52": "Close", + "53": "Water", + "54": "Heal", + "55": "This housing does not meet the requirements for a", + "56": "Lava", + "57": "Dye", + "58": "Honey", + "59": "Visible", + "5": "Hotbar unlocked", + "60": "Hidden", + "61": "Rename", + "62": "Settings", + "63": "Cancel", + "64": "Quest", + "65": "Quest Item", + "66": "Savings", + "67": "Take Snapshot", + "68": "Settings", + "69": "Pin Frame", + "6": "Hotbar locked", + "70": "Set Frame", + "71": "Close", + "72": "On", + "73": "Off", + "74": "Image Packing", + "75": "Capture Entities", + "76": "Capture Background", + "77": "Biome Pick", + "78": "Reset Frame", + "79": "Equipment", + "7": "Housing", + "80": "Housing", + "81": "Camera Mode", + "82": "Restock", + "83": "Frost Moon", + "84": "Pumpkin Moon", + "85": "Martian Madness", + "86": "Pirate Invasion", + "87": "Frost Legion", + "88": "Goblin Army", + "89": "Collect", + "8": "Housing Query", + "90": "Grappling Hook", + "91": "Mount", + "92": "Pet", + "93": "Minecart", + "94": "Light Pet", + "95": "Time", + "96": "Weather", + "97": "Fishing", + "98": "Position", + "99": "Depth", + "9": "Accessory" + }, + "LegacyChestType": { + "0": "Chest", + "10": "Ivy Chest", + "11": "Frozen Chest", + "12": "Living Wood Chest", + "13": "Skyware Chest", + "14": "Shadewood Chest", + "15": "Web Covered Chest", + "16": "Lihzahrd Chest", + "17": "Water Chest", + "18": "Jungle Chest", + "19": "Corruption Chest", + "1": "Gold Chest", + "20": "Crimson Chest", + "21": "Hallowed Chest", + "22": "Ice Chest", + "23": "Locked Jungle Chest", + "24": "Locked Corruption Chest", + "25": "Locked Crimson Chest", + "26": "Locked Hallowed Chest", + "27": "Locked Ice Chest", + "28": "Dynasty Chest", + "29": "Honey Chest", + "2": "Locked Gold Chest", + "30": "Steampunk Chest", + "31": "Palm Wood Chest", + "32": "Mushroom Chest", + "33": "Boreal Wood Chest", + "34": "Slime Chest", + "35": "Green Dungeon Chest", + "36": "Locked Green Dungeon Chest", + "37": "Pink Dungeon Chest", + "38": "Locked Pink Dungeon Chest", + "39": "Blue Dungeon Chest", + "3": "Shadow Chest", + "40": "Locked Blue Dungeon Chest", + "41": "Bone Chest", + "42": "Cactus Chest", + "43": "Flesh Chest", + "44": "Obsidian Chest", + "45": "Pumpkin Chest", + "46": "Spooky Chest", + "47": "Glass Chest", + "48": "Martian Chest", + "49": "Meteorite Chest", + "4": "Locked Shadow Chest", + "50": "Granite Chest", + "51": "Marble Chest", + "5": "Barrel", + "6": "Trash Can", + "7": "Ebonwood Chest", + "8": "Rich Mahogany Chest", + "9": "Pearlwood Chest" + }, + "LegacyDresserType": { + "0": "Dresser", + "10": "Bone Dresser", + "11": "Cactus Dresser", + "12": "Spooky Dresser", + "13": "Skyware Dresser", + "14": "Honey Dresser", + "15": "Lihzahrd Dresser", + "16": "Palm Wood Dresser", + "17": "Mushroom Dresser", + "18": "Boreal Wood Dresser", + "19": "Slime Dresser", + "1": "Ebonwood Dresser", + "20": "Pumpkin Dresser", + "21": "Steampunk Dresser", + "22": "Glass Dresser", + "23": "Flesh Dresser", + "24": "Martian Dresser", + "25": "Meteorite Dresser", + "26": "Granite Dresser", + "27": "Marble Dresser", + "28": "{$ItemName.CrystalDresser}", + "29": "{$ItemName.DynastyDresser}", + "2": "Rich Mahogany Dresser", + "30": "{$ItemName.FrozenDresser}", + "31": "{$ItemName.LivingWoodDresser}", + "32": "{$ItemName.SpiderDresser}", + "33": "{$ItemName.LesionDresser}", + "34": "{$ItemName.SolarDresser}", + "35": "{$ItemName.VortexDresser}", + "36": "{$ItemName.NebulaDresser}", + "37": "{$ItemName.StardustDresser}", + "38": "{$ItemName.SandstoneDresser}", + "39": "{$ItemName.BambooDresser}", + "3": "Pearlwood Dresser", + "4": "Shadewood Dresser", + "5": "Blue Dungeon Dresser", + "6": "Green Dungeon Dresser", + "7": "Pink Dungeon Dresser", + "8": "Golden Dresser", + "9": "Obsidian Dresser" + }, + "LegacyChestType2": { + "0": "{$ItemName.CrystalChest}", + "1": "{$ItemName.GoldenChest}", + "2": "{$ItemName.SpiderChest}", + "3": "{$ItemName.LesionChest}", + "4": "{$ItemName.GoldChest}", + "5": "{$ItemName.SolarChest}", + "6": "{$ItemName.VortexChest}", + "7": "{$ItemName.NebulaChest}", + "8": "{$ItemName.StardustChest}", + "9": "{$ItemName.GolfChest}", + "10": "{$ItemName.DesertChest}", + "11": "{$ItemName.BambooChest}", + "12": "{$ItemName.DungeonDesertChest}", + "13": "Locked {$ItemName.DungeonDesertChest}" + } +} \ No newline at end of file diff --git a/Localization/Content/en-US/NPCs.json b/Localization/Content/en-US/NPCs.json new file mode 100644 index 0000000..d0fd837 --- /dev/null +++ b/Localization/Content/en-US/NPCs.json @@ -0,0 +1,673 @@ +{ + "NPCName": { + "BlueSlime": "Blue Slime", + "GiantWormHead": "Giant Worm", + "SeekerTail": "World Feeder", + "Clinger": "Clinger", + "AnglerFish": "Angler Fish", + "GreenJellyfish": "Green Jellyfish", + "Werewolf": "Werewolf", + "BoundGoblin": "Bound Goblin", + "BoundWizard": "Bound Wizard", + "GoblinTinkerer": "Goblin Tinkerer", + "Wizard": "Wizard", + "Clown": "Clown", + "GiantWormBody": "Giant Worm", + "SkeletonArcher": "Skeleton Archer", + "GoblinArcher": "Goblin Archer", + "VileSpit": "Vile Spit", + "WallofFlesh": "Wall of Flesh", + "WallofFleshEye": "Wall of Flesh", + "TheHungry": "The Hungry", + "TheHungryII": "The Hungry", + "LeechHead": "Leech", + "LeechBody": "Leech", + "LeechTail": "Leech", + "GiantWormTail": "Giant Worm", + "ChaosElemental": "Chaos Elemental", + "Slimer": "Slimer", + "Gastropod": "Gastropod", + "BoundMechanic": "Bound Mechanic", + "Mechanic": "Mechanic", + "Retinazer": "Retinazer", + "Spazmatism": "Spazmatism", + "SkeletronPrime": "Skeletron Prime", + "PrimeCannon": "Prime Cannon", + "PrimeSaw": "Prime Saw", + "EaterofWorldsHead": "Eater of Worlds", + "PrimeVice": "Prime Vice", + "PrimeLaser": "Prime Laser", + "BaldZombie": "Zombie", + "WanderingEye": "Wandering Eye", + "TheDestroyer": "The Destroyer", + "TheDestroyerBody": "The Destroyer", + "TheDestroyerTail": "The Destroyer", + "IlluminantBat": "Illuminant Bat", + "IlluminantSlime": "Illuminant Slime", + "Probe": "Probe", + "EaterofWorldsBody": "Eater of Worlds", + "PossessedArmor": "Possessed Armor", + "ToxicSludge": "Toxic Sludge", + "SantaClaus": "Santa Claus", + "SnowmanGangsta": "Snowman Gangsta", + "MisterStabby": "Mister Stabby", + "SnowBalla": "Snow Balla", + "IceSlime": "Ice Slime", + "Penguin": "Penguin", + "PenguinBlack": "Penguin", + "EaterofWorldsTail": "Eater of Worlds", + "IceBat": "Ice Bat", + "Lavabat": "Lava Bat", + "GiantFlyingFox": "Giant Flying Fox", + "GiantTortoise": "Giant Tortoise", + "IceTortoise": "Ice Tortoise", + "Wolf": "Wolf", + "RedDevil": "Red Devil", + "Arapaima": "Arapaima", + "VampireBat": "Vampire", + "Vampire": "Vampire", + "MotherSlime": "Mother Slime", + "Truffle": "Truffle", + "ZombieEskimo": "Frozen Zombie", + "Frankenstein": "Frankenstein", + "BlackRecluse": "Black Recluse", + "WallCreeper": "Wall Creeper", + "WallCreeperWall": "Wall Creeper", + "SwampThing": "Swamp Thing", + "UndeadViking": "Undead Viking", + "CorruptPenguin": "Corrupt Penguin", + "IceElemental": "Ice Elemental", + "Merchant": "Merchant", + "PigronCorruption": "Pigron", + "PigronHallow": "Pigron", + "RuneWizard": "Rune Wizard", + "Crimera": "Crimera", + "Herpling": "Herpling", + "AngryTrapper": "Angry Trapper", + "MossHornet": "Moss Hornet", + "Derpling": "Derpling", + "Steampunker": "Steampunker", + "CrimsonAxe": "Crimson Axe", + "Nurse": "Nurse", + "PigronCrimson": "Pigron", + "FaceMonster": "Face Monster", + "FloatyGross": "Floaty Gross", + "Crimslime": "Crimslime", + "SpikedIceSlime": "Spiked Ice Slime", + "SnowFlinx": "Snow Flinx", + "PincushionZombie": "Zombie", + "SlimedZombie": "Zombie", + "SwampZombie": "Zombie", + "TwiggyZombie": "Zombie", + "ArmsDealer": "Arms Dealer", + "CataractEye": "Demon Eye", + "SleepyEye": "Demon Eye", + "DialatedEye": "Demon Eye", + "GreenEye": "Demon Eye", + "PurpleEye": "Demon Eye", + "LostGirl": "Lost Girl", + "Nymph": "Nymph", + "ArmoredViking": "Armored Viking", + "Lihzahrd": "Lihzahrd", + "LihzahrdCrawler": "Lihzahrd", + "DemonEye": "Demon Eye", + "Dryad": "Dryad", + "FemaleZombie": "Zombie", + "HeadacheSkeleton": "Skeleton", + "MisassembledSkeleton": "Skeleton", + "PantlessSkeleton": "Skeleton", + "SpikedJungleSlime": "Spiked Jungle Slime", + "Moth": "Moth", + "IcyMerman": "Icy Merman", + "DyeTrader": "Dye Trader", + "PartyGirl": "Party Girl", + "Cyborg": "Cyborg", + "Skeleton": "Skeleton", + "Bee": "Bee", + "BeeSmall": "Bee", + "PirateDeckhand": "Pirate Deckhand", + "PirateCorsair": "Pirate Corsair", + "PirateDeadeye": "Pirate Deadeye", + "PirateCrossbower": "Pirate Crossbower", + "PirateCaptain": "Pirate Captain", + "CochinealBeetle": "Cochineal Beetle", + "CyanBeetle": "Cyan Beetle", + "LacBeetle": "Lac Beetle", + "Guide": "Guide", + "SeaSnail": "Sea Snail", + "Squid": "Squid", + "QueenBee": "Queen Bee", + "ZombieRaincoat": "Raincoat Zombie", + "FlyingFish": "Flying Fish", + "UmbrellaSlime": "Umbrella Slime", + "FlyingSnake": "Flying Snake", + "Painter": "Painter", + "WitchDoctor": "Witch Doctor", + "Pirate": "Pirate", + "MeteorHead": "Meteor Head", + "GoldfishWalker": "Goldfish", + "HornetFatty": "Hornet", + "HornetHoney": "Hornet", + "HornetLeafy": "Hornet", + "HornetSpikey": "Hornet", + "HornetStingy": "Hornet", + "JungleCreeper": "Jungle Creeper", + "JungleCreeperWall": "Jungle Creeper", + "BlackRecluseWall": "Black Recluse", + "BloodCrawler": "Blood Crawler", + "FireImp": "Fire Imp", + "BloodCrawlerWall": "Blood Crawler", + "BloodFeeder": "Blood Feeder", + "BloodJelly": "Blood Jelly", + "IceGolem": "Ice Golem", + "RainbowSlime": "Rainbow Slime", + "Golem": "Golem", + "GolemHead": "Golem Head", + "GolemFistLeft": "Golem Fist", + "GolemFistRight": "Golem Fist", + "GolemHeadFree": "Golem Head", + "BurningSphere": "Burning Sphere", + "AngryNimbus": "Angry Nimbus", + "Eyezor": "Eyezor", + "Parrot": "Parrot", + "Reaper": "Reaper", + "ZombieMushroom": "Spore Zombie", + "ZombieMushroomHat": "Spore Zombie", + "FungoFish": "Fungo Fish", + "AnomuraFungus": "Anomura Fungus", + "MushiLadybug": "Mushi Ladybug", + "FungiBulb": "Fungi Bulb", + "GoblinPeon": "Goblin Peon", + "GiantFungiBulb": "Giant Fungi Bulb", + "FungiSpore": "Fungi Spore", + "Plantera": "Plantera", + "PlanterasHook": "Plantera's Hook", + "PlanterasTentacle": "Plantera's Tentacle", + "Spore": "Spore", + "BrainofCthulhu": "Brain of Cthulhu", + "Creeper": "Creeper", + "IchorSticker": "Ichor Sticker", + "RustyArmoredBonesAxe": "Rusty Armored Bones", + "GoblinThief": "Goblin Thief", + "RustyArmoredBonesFlail": "Rusty Armored Bones", + "RustyArmoredBonesSword": "Rusty Armored Bones", + "RustyArmoredBonesSwordNoArmor": "Rusty Armored Bones", + "BlueArmoredBones": "Blue Armored Bones", + "BlueArmoredBonesMace": "Blue Armored Bones", + "BlueArmoredBonesNoPants": "Blue Armored Bones", + "BlueArmoredBonesSword": "Blue Armored Bones", + "HellArmoredBones": "Hell Armored Bones", + "HellArmoredBonesSpikeShield": "Hell Armored Bones", + "HellArmoredBonesMace": "Hell Armored Bones", + "GoblinWarrior": "Goblin Warrior", + "HellArmoredBonesSword": "Hell Armored Bones", + "RaggedCaster": "Ragged Caster", + "RaggedCasterOpenCoat": "Ragged Caster", + "Necromancer": "Necromancer", + "NecromancerArmored": "Necromancer", + "DiabolistRed": "Diabolist", + "DiabolistWhite": "Diabolist", + "BoneLee": "Bone Lee", + "DungeonSpirit": "Dungeon Spirit", + "GiantCursedSkull": "Giant Cursed Skull", + "GoblinSorcerer": "Goblin Sorcerer", + "Paladin": "Paladin", + "SkeletonSniper": "Skeleton Sniper", + "TacticalSkeleton": "Tactical Skeleton", + "SkeletonCommando": "Skeleton Commando", + "AngryBonesBig": "Angry Bones", + "AngryBonesBigMuscle": "Angry Bones", + "AngryBonesBigHelmet": "Angry Bones", + "BirdBlue": "Blue Jay", + "BirdRed": "Cardinal", + "Squirrel": "Squirrel", + "Zombie": "Zombie", + "ChaosBall": "Chaos Ball", + "Mouse": "Mouse", + "Raven": "Raven", + "SlimeMasked": "Slime", + "BunnySlimed": "Bunny", + "HoppinJack": "Hoppin' Jack", + "Scarecrow1": "Scarecrow", + "Scarecrow2": "Scarecrow", + "Scarecrow3": "Scarecrow", + "Scarecrow4": "Scarecrow", + "Scarecrow5": "Scarecrow", + "AngryBones": "Angry Bones", + "Scarecrow6": "Scarecrow", + "Scarecrow7": "Scarecrow", + "Scarecrow8": "Scarecrow", + "Scarecrow9": "Scarecrow", + "Scarecrow10": "Scarecrow", + "HeadlessHorseman": "Headless Horseman", + "Ghost": "Ghost", + "DemonEyeOwl": "Demon Eye", + "DemonEyeSpaceship": "Demon Eye", + "ZombieDoctor": "Zombie", + "DarkCaster": "Dark Caster", + "ZombieSuperman": "Zombie", + "ZombiePixie": "Zombie", + "SkeletonTopHat": "Skeleton", + "SkeletonAstonaut": "Skeleton", + "SkeletonAlien": "Skeleton", + "MourningWood": "Mourning Wood", + "Splinterling": "Splinterling", + "Pumpking": "Pumpking", + "PumpkingBlade": "Pumpking", + "Hellhound": "Hellhound", + "WaterSphere": "Water Sphere", + "Poltergeist": "Poltergeist", + "ZombieXmas": "Zombie", + "ZombieSweater": "Zombie", + "SlimeRibbonWhite": "Slime", + "SlimeRibbonYellow": "Slime", + "SlimeRibbonGreen": "Slime", + "SlimeRibbonRed": "Slime", + "BunnyXmas": "Bunny", + "ZombieElf": "Zombie Elf", + "ZombieElfBeard": "Zombie Elf", + "CursedSkull": "Cursed Skull", + "ZombieElfGirl": "Zombie Elf", + "PresentMimic": "Present Mimic", + "GingerbreadMan": "Gingerbread Man", + "Yeti": "Yeti", + "Everscream": "Everscream", + "IceQueen": "Ice Queen", + "SantaNK1": "Santa-NK1", + "ElfCopter": "Elf Copter", + "Nutcracker": "Nutcracker", + "NutcrackerSpinning": "Nutcracker", + "SkeletronHead": "Skeletron", + "ElfArcher": "Elf Archer", + "Krampus": "Krampus", + "Flocko": "Flocko", + "Stylist": "Stylist", + "WebbedStylist": "Webbed Stylist", + "Firefly": "Firefly", + "Butterfly": "Butterfly", + "Worm": "Worm", + "LightningBug": "Lightning Bug", + "Snail": "Snail", + "SkeletronHand": "Skeletron", + "GlowingSnail": "Glowing Snail", + "Frog": "Frog", + "Duck": "Duck", + "Duck2": "Duck", + "DuckWhite": "Duck", + "DuckWhite2": "Duck", + "ScorpionBlack": "Scorpion", + "Scorpion": "Scorpion", + "TravellingMerchant": "Traveling Merchant", + "Angler": "Angler", + "OldMan": "Old Man", + "DukeFishron": "Duke Fishron", + "DetonatingBubble": "Detonating Bubble", + "Sharkron": "Sharkron", + "Sharkron2": "Sharkron", + "TruffleWorm": "Truffle Worm", + "TruffleWormDigger": "Truffle Worm", + "SleepingAngler": "Sleeping Angler", + "Grasshopper": "Grasshopper", + "ChatteringTeethBomb": "Chattering Teeth Bomb", + "CultistArcherBlue": "Cultist Archer", + "Demolitionist": "Demolitionist", + "CultistArcherWhite": "Cultist Archer", + "BrainScrambler": "Brain Scrambler", + "RayGunner": "Ray Gunner", + "MartianOfficer": "Martian Officer", + "ForceBubble": "Bubble Shield", + "GrayGrunt": "Gray Grunt", + "MartianEngineer": "Martian Engineer", + "MartianTurret": "Tesla Turret", + "MartianDrone": "Martian Drone", + "GigaZapper": "Gigazapper", + "BoneSerpentHead": "Bone Serpent", + "ScutlixRider": "Scutlix Gunner", + "Scutlix": "Scutlix", + "EyeofCthulhu": "Eye of Cthulhu", + "BoneSerpentBody": "Bone Serpent", + "BoneSerpentTail": "Bone Serpent", + "SolarCrawltipedeHead": "Crawltipede", + "SolarCrawltipedeBody": "Crawltipede", + "SolarCrawltipedeTail": "Crawltipede", + "SolarDrakomire": "Drakomire", + "SolarDrakomireRider": "Drakomire Rider", + "SolarSroller": "Sroller", + "SolarCorite": "Corite", + "SolarSolenian": "Selenian", + "Hornet": "Hornet", + "ManEater": "Man Eater", + "ArmedZombie": "Zombie", + "ArmedZombieEskimo": "Frozen Zombie", + "ArmedZombiePincussion": "Zombie", + "ArmedZombieSlimed": "Zombie", + "ArmedZombieSwamp": "Zombie", + "ArmedZombieTwiggy": "Zombie", + "ArmedZombieCenx": "Zombie", + "UndeadMiner": "Undead Miner", + "GoldBird": "Gold Bird", + "GoldBunny": "Gold Bunny", + "GoldButterfly": "Gold Butterfly", + "GoldFrog": "Gold Frog", + "GoldGrasshopper": "Gold Grasshopper", + "GoldMouse": "Gold Mouse", + "GoldWorm": "Gold Worm", + "BoneThrowingSkeleton": "Skeleton", + "Tim": "Tim", + "BoneThrowingSkeleton2": "Skeleton", + "BoneThrowingSkeleton3": "Skeleton", + "BoneThrowingSkeleton4": "Skeleton", + "Bunny": "Bunny", + "CorruptBunny": "Corrupt Bunny", + "Harpy": "Harpy", + "CaveBat": "Cave Bat", + "ServantofCthulhu": "Servant of Cthulhu", + "KingSlime": "King Slime", + "JungleBat": "Jungle Bat", + "DoctorBones": "Doctor Bones", + "TheGroom": "The Groom", + "Clothier": "Clothier", + "Goldfish": "Goldfish", + "Snatcher": "Snatcher", + "CorruptGoldfish": "Corrupt Goldfish", + "Piranha": "Piranha", + "LavaSlime": "Lava Slime", + "EaterofSouls": "Eater of Souls", + "Hellbat": "Hellbat", + "Vulture": "Vulture", + "Demon": "Demon", + "BlueJellyfish": "Blue Jellyfish", + "PinkJellyfish": "Pink Jellyfish", + "Shark": "Shark", + "VoodooDemon": "Voodoo Demon", + "Crab": "Crab", + "DungeonGuardian": "Dungeon Guardian", + "Antlion": "Antlion", + "DevourerHead": "Devourer", + "SpikeBall": "Spike Ball", + "DungeonSlime": "Dungeon Slime", + "BlazingWheel": "Blazing Wheel", + "GoblinScout": "Goblin Scout", + "Bird": "Bird", + "Pixie": "Pixie", + "ArmoredSkeleton": "Armored Skeleton", + "Mummy": "Mummy", + "DarkMummy": "Dark Mummy", + "DevourerBody": "Devourer", + "LightMummy": "Light Mummy", + "CorruptSlime": "Corrupt Slime", + "Wraith": "Wraith", + "CursedHammer": "Cursed Hammer", + "EnchantedSword": "Enchanted Sword", + "Mimic": "Mimic", + "Unicorn": "Unicorn", + "WyvernHead": "Wyvern", + "WyvernLegs": "Wyvern", + "WyvernBody": "Wyvern", + "DevourerTail": "Devourer", + "WyvernBody2": "Wyvern", + "WyvernBody3": "Wyvern", + "WyvernTail": "Wyvern", + "GiantBat": "Giant Bat", + "Corruptor": "Corruptor", + "DiggerHead": "Digger", + "DiggerBody": "Digger", + "DiggerTail": "Digger", + "SeekerHead": "World Feeder", + "SeekerBody": "World Feeder", + "AncientCultistSquidhead": "Ancient Vision", + "AncientDoom": "Ancient Doom", + "AncientLight": "Ancient Light", + "BigMimicCorruption": "Corrupt Mimic", + "BigMimicCrimson": "Crimson Mimic", + "BigMimicHallow": "Hallowed Mimic", + "BigMimicJungle": "Jungle Mimic", + "BloodZombie": "Blood Zombie", + "Buggy": "Buggy", + "Butcher": "Butcher", + "Crawdad": "Crawdad", + "Crawdad2": "Crawdad", + "CreatureFromTheDeep": "Creature from the Deep", + "CrimsonBunny": "Vicious Bunny", + "CrimsonGoldfish": "Vicious Goldfish", + "CrimsonPenguin": "Vicious Penguin", + "CultistBoss": "Lunatic Cultist", + "CultistBossClone": "Lunatic Cultist", + "CultistDevote": "Lunatic Devotee", + "CultistDragonBody1": "Phantasm Dragon", + "CultistDragonBody2": "Phantasm Dragon", + "CultistDragonBody3": "Phantasm Dragon", + "CultistDragonBody4": "Phantasm Dragon", + "CultistDragonHead": "Phantasm Dragon", + "CultistDragonTail": "Phantasm Dragon", + "CultistTablet": "Mysterious Tablet", + "DD2AttackerTest": "???", + "DD2LanePortal": "Mysterious Portal", + "DeadlySphere": "Deadly Sphere", + "DemonTaxCollector": "Tortured Soul", + "DesertBeast": "Basilisk", + "DesertDjinn": "Desert Spirit", + "DesertGhoul": "Ghoul", + "DesertGhoulCorruption": "Vile Ghoul", + "DesertGhoulCrimson": "Tainted Ghoul", + "DesertGhoulHallow": "Dreamer Ghoul", + "DesertLamiaDark": "Lamia", + "DesertLamiaLight": "Lamia", + "DesertScorpionWalk": "Sand Poacher", + "DesertScorpionWall": "Sand Poacher", + "Drippler": "Drippler", + "DrManFly": "Dr. Man Fly", + "DuneSplicerBody": "Dune Splicer", + "DuneSplicerHead": "Dune Splicer", + "DuneSplicerTail": "Dune Splicer", + "EnchantedNightcrawler": "Enchanted Nightcrawler", + "FlyingAntlion": "Antlion Swarmer", + "Fritz": "Fritz", + "GiantShelly": "Giant Shelly", + "GiantShelly2": "Giant Shelly", + "GoblinSummoner": "Goblin Summoner", + "GraniteFlyer": "Granite Elemental", + "GraniteGolem": "Granite Golem", + "GreekSkeleton": "Hoplite", + "Grubby": "Grubby", + "LunarTowerNebula": "Nebula Pillar", + "LunarTowerSolar": "Solar Pillar", + "LunarTowerStardust": "Stardust Pillar", + "LunarTowerVortex": "Vortex Pillar", + "MartianProbe": "Martian Probe", + "MartianSaucer": "Martian Saucer", + "MartianSaucerCannon": "Martian Saucer Cannon", + "MartianSaucerCore": "Martian Saucer", + "MartianSaucerTurret": "Martian Saucer Turret", + "MartianWalker": "Martian Walker", + "Medusa": "Medusa", + "MoonLordCore": "Moon Lord's Core", + "MoonLordHand": "Moon Lord's Hand", + "MoonLordHead": "Moon Lord", + "Mothron": "Mothron", + "MothronEgg": "Mothron Egg", + "MothronSpawn": "Baby Mothron", + "Nailhead": "Nailhead", + "NebulaBeast": "Evolution Beast", + "NebulaBrain": "Nebula Floater", + "NebulaHeadcrab": "Brain Suckler", + "NebulaSoldier": "Predictor", + "PartyBunny": "Bunny", + "Psycho": "Psycho", + "Salamander": "Salamander", + "Salamander2": "Salamander", + "Salamander3": "Salamander", + "Salamander4": "Salamander", + "Salamander5": "Salamander", + "Salamander6": "Salamander", + "Salamander7": "Salamander", + "Salamander8": "Salamander", + "Salamander9": "Salamander", + "SandElemental": "Sand Elemental", + "SandShark": "Sand Shark", + "SandsharkCorrupt": "Bone Biter", + "SandsharkCrimson": "Flesh Reaver", + "SandsharkHallow": "Crystal Thresher", + "SandSlime": "Sand Slime", + "ShadowFlameApparition": "Shadowflame Apparition", + "SlimeSpiked": "Spiked Slime", + "Sluggy": "Sluggy", + "SolarFlare": "Solar Flare", + "SolarGoop": "Solar Fragment", + "SolarSpearman": "Drakanian", + "SquirrelGold": "Gold Squirrel", + "SquirrelRed": "Red Squirrel", + "StardustCellBig": "Star Cell", + "StardustCellSmall": "Star Cell", + "StardustJellyfishBig": "Flow Invader", + "StardustSoldier": "Stargazer", + "StardustSpiderBig": "Twinkle Popper", + "StardustSpiderSmall": "Twinkle", + "StardustWormHead": "Milkyway Weaver", + "TargetDummy": "Target Dummy", + "TaxCollector": "Tax Collector", + "TheBride": "The Bride", + "ThePossessed": "The Possessed", + "TombCrawlerBody": "Tomb Crawler", + "TombCrawlerHead": "Tomb Crawler", + "TombCrawlerTail": "Tomb Crawler", + "Tumbleweed": "Angry Tumbler", + "VortexHornet": "Alien Hornet", + "VortexHornetQueen": "Alien Queen", + "VortexLarva": "Alien Larva", + "VortexRifleman": "Storm Diver", + "VortexSoldier": "Vortexian", + "WalkingAntlion": "Antlion Charger", + "Slimeling": "Slimeling", + "Slimer2": "Slimer", + "GreenSlime": "Green Slime", + "Pinky": "Pinky", + "BabySlime": "Baby Slime", + "BlackSlime": "Black Slime", + "PurpleSlime": "Purple Slime", + "RedSlime": "Red Slime", + "YellowSlime": "Yellow Slime", + "JungleSlime": "Jungle Slime", + "SmallRainZombie": "Zombie", + "BigRainZombie": "Zombie", + "DD2EterniaCrystal": "Eternia Crystal", + "DD2GoblinT3": "{$NPCName.DD2GoblinT1}", + "DD2GoblinT2": "{$NPCName.DD2GoblinT1}", + "DD2GoblinT1": "Etherian Goblin", + "DD2JavelinstT3": "{$NPCName.DD2JavelinstT1}", + "DD2JavelinstT2": "{$NPCName.DD2JavelinstT1}", + "DD2JavelinstT1": "Etherian Javelin Thrower", + "DD2GoblinBomberT3": "{$NPCName.DD2GoblinBomberT1}", + "DD2GoblinBomberT2": "{$NPCName.DD2GoblinBomberT1}", + "DD2GoblinBomberT1": "Etherian Goblin Bomber", + "DD2WyvernT3": "{$NPCName.DD2WyvernT1}", + "DD2WyvernT2": "{$NPCName.DD2WyvernT1}", + "DD2WyvernT1": "Etherian Wyvern", + "DD2Bartender": "Tavernkeep", + "DD2OgreT3": "{$NPCName.DD2OgreT2}", + "DD2OgreT2": "Ogre", + "DD2WitherBeastT3": "{$NPCName.DD2WitherBeastT2}", + "DD2WitherBeastT2": "Wither Beast", + "DD2SkeletonT3": "{$NPCName.DD2SkeletonT1}", + "DD2SkeletonT1": "Old One's Skeleton", + "DD2KoboldWalkerT3": "{$NPCName.DD2KoboldWalkerT2}", + "DD2KoboldWalkerT2": "Kobold", + "DD2DrakinT3": "{$NPCName.DD2DrakinT2}", + "DD2DrakinT2": "Drakin", + "DD2DarkMageT3": "{$NPCName.DD2DarkMageT1}", + "DD2DarkMageT1": "Dark Mage", + "DD2KoboldFlyerT3": "{$NPCName.DD2KoboldFlyerT2}", + "DD2KoboldFlyerT2": "Kobold Glider", + "DD2Betsy": "Betsy", + "DD2LightningBugT3": "Etherian Lightning Bug", + "MoonLordFreeEye": "True Eye of Cthulhu", + "MoonLordLeechBlob": "Moon Leech Clot", + "SkeletonMerchant": "Skeleton Merchant", + "PirateShip": "Flying Dutchman", + "PirateShipCannon": "Dutchman Cannon", + "BartenderUnconscious": "Unconscious Man", + "GiantWalkingAntlion": "Giant Antlion Charger", + "GiantFlyingAntlion": "Giant Antlion Swarmer", + "LarvaeAntlion": "Antlion Larva", + "FairyCritterPink": "Pink Fairy", + "FairyCritterGreen": "Green Fairy", + "FairyCritterBlue": "Blue Fairy", + "ZombieMerman": "Zombie Merman", + "EyeballFlyingFish": "Wandering Eye Fish", + "Golfer": "Golfer", + "GolferRescue": "Golfer", + "TorchZombie": "Zombie", + "ArmedTorchZombie": "Zombie", + "GoldGoldfish": "Gold Goldfish", + "GoldGoldfishWalker": "Gold Goldfish", + "WindyBalloon": "Windy Balloon", + "BlackDragonfly": "Dragonfly", + "BlueDragonfly": "Dragonfly", + "GreenDragonfly": "Dragonfly", + "OrangeDragonfly": "Dragonfly", + "RedDragonfly": "Dragonfly", + "YellowDragonfly": "Dragonfly", + "GoldDragonfly": "Gold Dragonfly", + "Seagull": "Seagull", + "Seagull2": "Seagull", + "LadyBug": "Ladybug", + "GoldLadyBug": "Gold Ladybug", + "Maggot": "Maggot", + "Pupfish": "Pupfish", + "Grebe": "Grebe", + "Grebe2": "Grebe", + "Rat": "Rat", + "Owl": "Owl", + "ExplosiveBunny": "Explosive Bunny", + "Turtle": "Turtle", + "TurtleJungle": "Jungle Turtle", + "WaterStrider": "Water Strider", + "GoldWaterStrider": "Gold Water Strider", + "Gnome": "Gnome", + "SeaTurtle": "Sea Turtle", + "Seahorse": "Seahorse", + "GoldSeahorse": "Gold Seahorse", + "Dolphin": "Dolphin", + "BloodSquid": "Blood Squid", + "BloodEelHead": "Blood Eel", + "BloodEelBody": "Blood Eel", + "BloodEelTail": "Blood Eel", + "GoblinShark": "Hemogoblin Shark", + "BloodNautilus": "Dreadnautilus", + "Dandelion": "Angry Dandelion", + "IceMimic": "Ice Mimic", + "BloodMummy": "Blood Mummy", + "RockGolem": "Rock Golem", + "MaggotZombie": "Maggot Zombie", + "BestiaryGirl": "Zoologist", + "SporeBat": "Spore Bat", + "SporeSkeleton": "Spore Skeleton", + "TownCat": "Cat", + "TownDog": "Dog", + "GemSquirrelAmethyst": "Amethyst Squirrel", + "GemSquirrelTopaz": "Topaz Squirrel", + "GemSquirrelSapphire": "Sapphire Squirrel", + "GemSquirrelEmerald": "Emerald Squirrel", + "GemSquirrelRuby": "Ruby Squirrel", + "GemSquirrelDiamond": "Diamond Squirrel", + "GemSquirrelAmber": "Amber Squirrel", + "GemBunnyAmethyst": "Amethyst Bunny", + "GemBunnyTopaz": "Topaz Bunny", + "GemBunnySapphire": "Sapphire Bunny", + "GemBunnyEmerald": "Emerald Bunny", + "GemBunnyRuby": "Ruby Bunny", + "GemBunnyDiamond": "Diamond Bunny", + "GemBunnyAmber": "Amber Bunny", + "HellButterfly": "Hell Butterfly", + "Lavafly": "Lavafly", + "MagmaSnail": "Magma Snail", + "TownBunny": "Bunny", + "QueenSlimeBoss": "Queen Slime", + "QueenSlimeMinionBlue": "Crystal Slime", + "QueenSlimeMinionPink": "Bouncy Slime", + "QueenSlimeMinionPurple": "Heavenly Slime", + "HallowBoss": "Empress of Light", + "EmpressButterfly": "Prismatic Lacewing", + "PirateGhost": "Pirate's Curse" + } +} \ No newline at end of file diff --git a/Localization/Content/en-US/Projectiles.json b/Localization/Content/en-US/Projectiles.json new file mode 100644 index 0000000..b24fec2 --- /dev/null +++ b/Localization/Content/en-US/Projectiles.json @@ -0,0 +1,883 @@ +{ + "ProjectileName": { + "AdamantiteChainsaw": "Adamantite Chainsaw", + "AdamantiteDrill": "Adamantite Drill", + "AdamantiteGlaive": "Adamantite Glaive", + "Amarok": "Yoyo", + "AmberBolt": "Amber Bolt", + "AmethystBolt": "Amethyst Bolt", + "Anchor": "Anchor", + "AncientDoomProjectile": "Prophecy's End", + "AntiGravityHook": "Anti-Gravity Hook", + "Arkhalis": "Arkhalis", + "AshBallFalling": "Ash Ball", + "BabyDino": "Baby Dino", + "BabyEater": "Baby Eater", + "BabyFaceMonster": "Baby Face Monster", + "BabyGrinch": "Baby Grinch", + "BabyHornet": "Baby Hornet", + "BabySkeletronHead": "Baby Skeletron Head", + "BabySlime": "Baby Slime", + "BabySnowman": "Baby Snowman", + "BabySpider": "Baby Spider", + "BallofFire": "Ball of Fire", + "BallofFrost": "Ball of Frost", + "BallOHurt": "Ball 'O Hurt", + "Bananarang": "Bananarang", + "Bat": "Bat", + "BatHook": "Bat Hook", + "BeachBall": "Beach Ball", + "Bee": "Bee", + "BeeArrow": "Bee Arrow", + "BeeCloakStar": "Bee Cloak", + "BeeHive": "Bee Hive", + "Beenade": "Beenade", + "BlackBolt": "Onyx Blaster", + "BlackCat": "Black Cat", + "BlackCounterweight": "Counterweight", + "Blizzard": "Blizzard", + "BloodCloudMoving": "Blood Cloud", + "BloodCloudRaining": "Blood Cloud", + "BloodRain": "Blood Rain", + "BloodWater": "Blood Water", + "BloodyMachete": "Bloody Machete", + "BlowupSmoke": "Blowup Smoke", + "BlowupSmokeMoonlord": "Blowup Smoke", + "BlueCounterweight": "Counterweight", + "BlueFairy": "Blue Fairy", + "BlueFlare": "Blue Flare", + "BlueMoon": "Blue Moon", + "BobberFiberglass": "Bobber", + "BobberFisherOfSouls": "Bobber", + "BobberFleshcatcher": "Bobber", + "BobberGolden": "Bobber", + "BobberHotline": "Bobber", + "BobberMechanics": "Bobber", + "BobberReinforced": "Bobber", + "BobbersittingDuck": "Bobber", + "BobberWooden": "Bobber", + "Bomb": "Bomb", + "BombFish": "Bomb Fish", + "BombSkeletronPrime": "Bomb", + "Bone": "Bone", + "BoneArrow": "Bone Arrow", + "BoneArrowFromMerchant": "Bone Arrow", + "BoneDagger": "Bone Dagger", + "BoneGloveProj": "XBone", + "BoneJavelin": "Bone Javelin", + "Boulder": "Boulder", + "BoulderStaffOfEarth": "Boulder", + "BouncyBomb": "Bouncy Bomb", + "BouncyDynamite": "Bouncy Dynamite", + "BouncyGlowstick": "Bouncy Glowstick", + "BouncyGrenade": "Bouncy Grenade", + "BoxingGlove": "Boxing Glove", + "BrainOfConfusion": "Brain of Confusion", + "BrainScramblerBolt": "Brain Scrambling Bolt", + "Bubble": "Bubble", + "Bullet": "Bullet", + "BulletDeadeye": "Bullet", + "BulletHighVelocity": "Bullet", + "BulletSnowman": "Bullet", + "Bunny": "Bunny", + "ButchersChainsaw": "Butcher's Chainsaw", + "CandyCaneHook": "Candy Cane Hook", + "CandyCorn": "Candy Corn", + "CannonballFriendly": "Cannonball", + "CannonballHostile": "Cannonball", + "Cascade": "Yoyo", + "ChainGuillotine": "Chain Guillotine", + "ChainKnife": "Chain Knife", + "ChargedBlasterCannon": "Charged Blaster Cannon", + "ChargedBlasterLaser": "Charged Blaster Laser", + "ChargedBlasterOrb": "Charged Blaster Orb", + "Chik": "Yoyo", + "ChlorophyteArrow": "Chlorophyte Arrow", + "ChlorophyteBullet": "Bullet", + "ChlorophyteChainsaw": "Chlorophyte Chainsaw", + "ChlorophyteDrill": "Chlorophyte Drill", + "ChlorophyteJackhammer": "Chlorophyte Jackhammer", + "ChlorophyteOrb": "Chlorophyte Orb", + "ChlorophytePartisan": "Chlorophyte Partisan", + "ChristmasHook": "Christmas Hook", + "ClingerStaff": "Cursed Flames", + "ClothiersCurse": "Skull", + "CobaltChainsaw": "Cobalt Chainsaw", + "CobaltDrill": "Cobalt Drill", + "CobaltNaginata": "Cobalt Naginata", + "Code1": "Yoyo", + "Code2": "Yoyo", + "CoinPortal": "Coin Portal", + "CompanionCube": "Companion Cube", + "ConfettiGun": "Confetti", + "ConfettiMelee": "Confetti", + "CopperCoin": "Copper Coin", + "CopperCoinsFalling": "Copper Coins", + "CorruptSpray": "Corrupt Spray", + "CorruptYoyo": "Yoyo", + "CrimsandBallFalling": "Crimsand Ball", + "CrimsandBallGun": "Crimsand Ball", + "CrimsonHeart": "Crimson Heart", + "CrimsonSpray": "Crimson Spray", + "CrimsonYoyo": "Yoyo", + "CrossGraveMarker": "Tombstone", + "CrystalBullet": "Crystal Bullet", + "CrystalDart": "Crystal Dart", + "CrystalLeaf": "Crystal Leaf", + "CrystalLeafShot": "Crystal Leaf", + "CrystalPulse": "Crystal Charge", + "CrystalPulse2": "Crystal Charge", + "CrystalShard": "Crystal Shard", + "CrystalStorm": "Crystal Storm", + "CrystalVileShardHead": "Crystal Vile Shard", + "CrystalVileShardShaft": "Crystal Vile Shard", + "Cthulunado": "Cthulunado", + "CultistBossFireBall": "Fireball", + "CultistBossFireBallClone": "Shadow Fireball", + "CultistBossIceMist": "Ice Mist", + "CultistBossLightningOrb": "Lightning Orb", + "CultistBossLightningOrbArc": "Lightning Orb Arc", + "CultistBossParticle": "Energy", + "CultistRitual": "Lightning Ritual", + "CursedArrow": "Cursed Arrow", + "CursedBullet": "Cursed Bullet", + "CursedDart": "Cursed Dart", + "CursedDartFlame": "Cursed Flame", + "CursedFlameFriendly": "Cursed Flame", + "CursedFlameHostile": "Cursed Flame", + "CursedSapling": "Cursed Sapling", + "DangerousSpider": "Dangerous Spider", + "DarkLance": "Dark Lance", + "Daybreak": "Daybreak", + "DD2FlameBurstTowerT1": "Flameburst Tower", + "DD2FlameBurstTowerT1Shot": "Flameburst Tower", + "DD2FlameBurstTowerT2": "Flameburst Tower", + "DD2FlameBurstTowerT2Shot": "Flameburst Tower", + "DD2FlameBurstTowerT3": "Flameburst Tower", + "DD2FlameBurstTowerT3Shot": "Flameburst Tower", + "DD2JavelinHostile": "Javelin", + "DeadlySphere": "Deadly Sphere", + "DeathLaser": "Death Laser", + "DeathSickle": "Death Sickle", + "DemonScythe": "Demon Scythe", + "DemonSickle": "Demon Sickle", + "DesertDjinnCurse": "Desert Spirit's Curse", + "DiamondBolt": "Diamond Bolt", + "DirtBall": "Dirt Ball", + "DrillMountCrosshair": "Drill Crosshair", + "DrManFlyFlask": "Flask", + "DryadsWardCircle": "Dryad's ward", + "DualHookBlue": "Hook", + "DualHookRed": "Hook", + "Dynamite": "Dynamite", + "EatersBite": "Eater's Bite", + "EbonsandBallFalling": "Ebonsand Ball", + "EbonsandBallGun": "Ebonsand Ball", + "EighthNote": "Note", + "Electrosphere": "Electrosphere", + "ElectrosphereMissile": "Electrosphere Missile", + "EmeraldBolt": "Emerald Bolt", + "EnchantedBeam": "Enchanted Beam", + "EnchantedBoomerang": "Enchanted Boomerang", + "ExplosiveBullet": "Explosive Bullet", + "ExplosiveBunny": "Explosive Bunny", + "Explosives": "Explosives", + "EyeBeam": "Eye Beam", + "EyeFire": "Eye Fire", + "EyeLaser": "Eye Laser", + "EyeSpring": "Eye Spring", + "FallingStar": "Falling Star", + "FireArrow": "Fire Arrow", + "Fireball": "Fireball", + "FireworkFountainBlue": "Firework Fountain", + "FireworkFountainRainbow": "Firework Fountain", + "FireworkFountainRed": "Firework Fountain", + "FireworkFountainYellow": "Firework Fountain", + "FishHook": "Fish Hook", + "Flairon": "Flairon", + "FlaironBubble": "Flairon Bubble", + "Flamarang": "Flamarang", + "Flamelash": "Flamelash", + "Flames": "Flames", + "FlamesTrap": "Flames", + "FlamethrowerTrap": "Flamethrower", + "FlamingArrow": "Flaming Arrow", + "FlamingJack": "Flaming Jack", + "FlamingScythe": "Flaming Scythe", + "FlamingWood": "Flaming Wood", + "Flare": "Flare", + "FlowerPetal": "Flower Petal", + "FlowerPow": "Flower Pow", + "FlowerPowPetal": "Flower Pow", + "FlyingImp": "Flying Imp", + "FlyingKnife": "Flying Knife", + "FlyingPiggyBank": "Flying Piggy Bank", + "FormatC": "Yoyo", + "FoulPotion": "Foul Potion", + "FrostArrow": "Frost Arrow", + "FrostBeam": "Frost Beam", + "FrostBlastFriendly": "Frost Blast", + "FrostBlastHostile": "Frost Blast", + "FrostBoltStaff": "Frost Bolt", + "FrostBoltSword": "Frost Bolt", + "FrostburnArrow": "Frostburn Arrow", + "FrostDaggerfish": "Frost Daggerfish", + "FrostHydra": "Frost Hydra", + "FrostShard": "Frost Shard", + "FrostWave": "Frost Wave", + "FruitcakeChakram": "Fruitcake Chakram", + "GemHookAmethyst": "Gem Hook", + "GemHookDiamond": "Gem Hook", + "GemHookEmerald": "Gem Hook", + "GemHookRuby": "Gem Hook", + "GemHookSapphire": "Gem Hook", + "GemHookTopaz": "Gem Hook", + "GeyserTrap": "Geyser", + "GiantBee": "Bee", + "GigaZapperSpear": "Gigazapper Spearhead", + "Glowstick": "Glowstick", + "GoldCoin": "Gold Coin", + "GoldCoinsFalling": "Gold Coins", + "GoldenBullet": "Golden Bullet", + "GoldenShowerFriendly": "Golden Shower", + "GoldenShowerHostile": "Golden Shower", + "GolemFist": "Golem Fist", + "Gradient": "Yoyo", + "GraveMarker": "Tombstone", + "Gravestone": "Tombstone", + "GreekFire1": "Greek Fire", + "GreekFire2": "Greek Fire", + "GreekFire3": "Greek Fire", + "GreenCounterweight": "Counterweight", + "GreenFairy": "Pink Fairy", + "GreenLaser": "Green Laser", + "Grenade": "Grenade", + "GrenadeI": "Grenade", + "GrenadeII": "Grenade", + "GrenadeIII": "Grenade", + "GrenadeIV": "Grenade", + "Gungnir": "Gungnir", + "HallowSpray": "Hallow Spray", + "HallowStar": "Hallow Star", + "Hamdrax": "Hamdrax", + "HappyBomb": "Happy Bomb", + "Harpoon": "Harpoon", + "HarpyFeather": "Harpy Feather", + "Headstone": "Tombstone", + "HeatRay": "Heat Ray", + "HelFire": "Yoyo", + "HellfireArrow": "Hellfire Arrow", + "Hellwing": "Hellwing", + "HolyArrow": "Holy Arrow", + "HolyWater": "Holy Water", + "Hook": "Hook", + "Hornet": "Hornet", + "HornetStinger": "Hornet Stinger", + "IceBlock": "Ice Block", + "IceBolt": "Ice Bolt", + "IceBoomerang": "Ice Boomerang", + "IceSickle": "Ice Sickle", + "IceSpike": "Ice Spike", + "IcewaterSpit": "Icewater Spit", + "IchorArrow": "Ichor Arrow", + "IchorBullet": "Ichor Bullet", + "IchorDart": "Ichor Dart", + "IchorSplash": "Ichor Splash", + "IlluminantHook": "Hook", + "ImpFireball": "Imp Fireball", + "InfernoFriendlyBlast": "Inferno", + "InfernoFriendlyBolt": "Inferno", + "InfernoHostileBlast": "Inferno", + "InfernoHostileBolt": "Inferno", + "InfluxWaver": "Influx Waver", + "IvyWhip": "Ivy Whip", + "JackOLantern": "Jack 'O Lantern", + "JavelinFriendly": "Javelin", + "JavelinHostile": "Javelin", + "JestersArrow": "Jester's Arrow", + "JumperSpider": "Jumper Spider", + "JungleSpike": "Jungle Spike", + "JungleYoyo": "Yoyo", + "Kraken": "Yoyo", + "Landmine": "Landmine", + "LaserDrill": "Laser Drill", + "LaserMachinegun": "Laser Machinegun", + "LaserMachinegunLaser": "Laser", + "LastPrism": "Last Prism", + "LastPrismLaser": "Last Prism", + "Leaf": "Leaf", + "LightBeam": "Light Beam", + "LightDisc": "Light Disc", + "LostSoulFriendly": "Lost Soul", + "LostSoulHostile": "Lost Soul", + "LovePotion": "Love Potion", + "LunarFlare": "Lunar Flare", + "LunarHookNebula": "Lunar Hook", + "LunarHookSolar": "Lunar Hook", + "LunarHookStardust": "Lunar Hook", + "LunarHookVortex": "Lunar Hook", + "MagicDagger": "Magic Dagger", + "MagicLantern": "Magic Lantern", + "MagicMissile": "Magic Missile", + "MagnetSphereBall": "Magnet Sphere", + "MagnetSphereBolt": "Magnet Sphere", + "ManaCloakStar": "Mana Cloak", + "MartianTurretBolt": "Electric Bolt", + "MartianWalkerLaser": "Laser Ray", + "MechanicalPiranha": "Mechanical Piranha", + "MechanicWrench": "Mechanic's Wrench", + "MedusaHead": "Medusa Ray", + "MedusaHeadRay": "Medusa Ray", + "Meowmere": "Meowmere", + "Meteor1": "Meteor", + "Meteor2": "Meteor", + "Meteor3": "Meteor", + "MeteorShot": "Meteor Shot", + "MinecartMechLaser": "Minecart Laser", + "MiniMinotaur": "Mini Minotaur", + "MiniRetinaLaser": "Mini Retina Laser", + "MiniSharkron": "Mini Sharkron", + "Missile": "Missile", + "MolotovCocktail": "Molotov Cocktail", + "MolotovFire": "Molotov Fire", + "MolotovFire2": "Molotov Fire", + "MolotovFire3": "Molotov Fire", + "MoonLeech": "Moon Leech", + "MoonlordArrow": "Luminite Arrow", + "MoonlordArrowTrail": "Luminite Arrow", + "MoonlordBullet": "Luminite Bullet", + "MoonlordTurret": "Lunar Portal", + "MoonlordTurretLaser": "Lunar Portal Laser", + "MudBall": "Mud Ball", + "Mushroom": "Mushroom", + "MushroomSpear": "Mushroom Spear", + "MushroomSpray": "Mushroom Spray", + "MythrilChainsaw": "Mythril Chainsaw", + "MythrilDrill": "Mythril Drill", + "MythrilHalberd": "Mythril Halberd", + "Nail": "Nail", + "NailFriendly": "Nail", + "NanoBullet": "Nano Bullet", + "NebulaArcanum": "Nebula Arcanum", + "NebulaArcanumExplosionShot": "Nebula Arcanum", + "NebulaArcanumExplosionShotShard": "Nebula Arcanum", + "NebulaArcanumSubshot": "Nebula Arcanum", + "NebulaBlaze1": "Nebula Blaze", + "NebulaBlaze2": "Nebula Blaze Ex", + "NebulaBolt": "Nebula Piercer", + "NebulaChainsaw": "Nebula Chainsaw", + "NebulaDrill": "Nebula Drill", + "NebulaEye": "Nebula Eye", + "NebulaLaser": "Nebula Laser", + "NebulaSphere": "Nebula Sphere", + "NettleBurstEnd": "Nettle Burst", + "NettleBurstLeft": "Nettle Burst", + "NettleBurstRight": "Nettle Burst", + "NightBeam": "Night Beam", + "None": "", + "NorthPoleSnowflake": "North Pole", + "NorthPoleSpear": "North Pole", + "NorthPoleWeapon": "North Pole", + "NurseSyringeHeal": "Syringe", + "NurseSyringeHurt": "Syringe", + "Obelisk": "Tombstone", + "ObsidianSwordfish": "Obsidian Swordfish", + "OneEyedPirate": "One Eyed Pirate", + "OrichalcumChainsaw": "Orichalcum Chainsaw", + "OrichalcumDrill": "Orichalcum Drill", + "OrichalcumHalberd": "Orichalcum Halberd", + "OrnamentFriendly": "Ornament", + "OrnamentHostile": "Ornament", + "OrnamentHostileShrapnel": "Ornament", + "PainterPaintball": "Paintball", + "PaladinsHammerFriendly": "Paladin's Hammer", + "PaladinsHammerHostile": "Paladin's Hammer", + "PalladiumChainsaw": "Palladium Chainsaw", + "PalladiumDrill": "Palladium Drill", + "PalladiumPike": "Palladium Pike", + "Parrot": "Parrot", + "PartyBullet": "Party Bullet", + "PartyGirlGrenade": "Confetti Grenade", + "PearlSandBallFalling": "Pearl Sand Ball", + "PearlSandBallGun": "Pearl Sand Ball", + "Penguin": "Penguin", + "PetLizard": "Pet Lizard", + "Phantasm": "Phantasm", + "PhantasmalBolt": "Phantasmal Bolt", + "PhantasmalDeathray": "Phantasmal Deathray", + "PhantasmalEye": "Phantasmal Eye", + "PhantasmalSphere": "Phantasmal Sphere", + "PhantasmArrow": "Phantasm", + "PhasicWarpDisc": "", + "PhasicWarpEjector": "", + "PineNeedleFriendly": "Pine Needle", + "PineNeedleHostile": "Pine Needle", + "PinkFairy": "Pink Fairy", + "PinkLaser": "Pink Laser", + "PirateCaptain": "Pirate Captain", + "PlatinumCoin": "Platinum Coin", + "PlatinumCoinsFalling": "Platinum Coins", + "PoisonDart": "Poison Dart", + "PoisonDartBlowgun": "Poison Dart", + "PoisonDartTrap": "Poison Dart", + "PoisonedKnife": "Poisoned Knife", + "PoisonFang": "Poison Fang", + "PoisonSeedPlantera": "Poison Seed", + "PortalGun": "Portal Gun", + "PortalGunBolt": "Portal Bolt", + "PortalGunGate": "Portal Gate", + "PossessedHatchet": "Possessed Hatchet", + "Present": "Present", + "ProximityMineI": "Proximity Mine", + "ProximityMineII": "Proximity Mine", + "ProximityMineIII": "Proximity Mine", + "ProximityMineIV": "Proximity Mine", + "PulseBolt": "Pulse Bolt", + "Puppy": "Puppy", + "PureSpray": "Pure Spray", + "PurificationPowder": "Purification Powder", + "PurpleCounterweight": "Counterweight", + "PurpleLaser": "Purple Laser", + "Pygmy": "Pygmy", + "Pygmy2": "Pygmy", + "Pygmy3": "Pygmy", + "Pygmy4": "Pygmy", + "PygmySpear": "Pygmy", + "QuarterNote": "Note", + "QueenBeeStinger": "Queen Bee's Stinger", + "RainbowBack": "Rainbow", + "RainbowCrystal": "Rainbow Crystal", + "RainbowCrystalExplosion": "Rainbow Explosion", + "RainbowFront": "Rainbow", + "RainbowRodBullet": "Rainbow", + "RainCloudMoving": "Rain Cloud", + "RainCloudRaining": "Rain Cloud", + "RainFriendly": "Rain", + "RainNimbus": "Rain", + "Rally": "Yoyo", + "Raven": "Raven", + "RayGunnerLaser": "Laser Ray", + "RedCounterweight": "Counterweight", + "RedsYoyo": "Yoyo", + "Retanimini": "Retanimini", + "RichGravestone1": "Tombstone", + "RichGravestone2": "Tombstone", + "RichGravestone3": "Tombstone", + "RichGravestone4": "Tombstone", + "RichGravestone5": "Tombstone", + "RocketFireworkBlue": "Rocket", + "RocketFireworkGreen": "Rocket", + "RocketFireworkRed": "Rocket", + "RocketFireworksBoxBlue": "Rocket", + "RocketFireworksBoxGreen": "Rocket", + "RocketFireworksBoxRed": "Rocket", + "RocketFireworksBoxYellow": "Rocket", + "RocketFireworkYellow": "Rocket", + "RocketI": "Rocket", + "RocketII": "Rocket", + "RocketIII": "Rocket", + "RocketIV": "Rocket", + "RocketSkeleton": "Rocket", + "RocketSnowmanI": "Rocket", + "RocketSnowmanII": "Rocket", + "RocketSnowmanIII": "Rocket", + "RocketSnowmanIV": "Rocket", + "RopeCoil": "Rope Coil", + "RottenEgg": "Rotten Egg", + "RubyBolt": "Ruby Bolt", + "RuneBlast": "Rune Blast", + "SalamanderSpit": "Poison Spit", + "SandBallFalling": "Sand Ball", + "SandBallGun": "Sand Ball", + "SandnadoFriendly": "Ancient Storm", + "SandnadoHostile": "Ancient Storm", + "SandnadoHostileMark": "Ancient Storm", + "SantaBombs": "Christmas Ornament", + "Sapling": "Sapling", + "SapphireBolt": "Sapphire Bolt", + "SaucerDeathray": "Martian Deathray", + "SaucerLaser": "Saucer Laser", + "SaucerMissile": "Martian Rocket", + "SaucerScrap": "Saucer Scrap", + "SawtoothShark": "Sawtooth Shark", + "ScutlixLaser": "Laser", + "ScutlixLaserCrosshair": "Scutlix Crosshair", + "ScutlixLaserFriendly": "Scutlix Laser", + "Seed": "Seed", + "SeedlerNut": "Seedler", + "SeedlerThorn": "Seedler", + "SeedPlantera": "Seed", + "ShadowBeamFriendly": "Shadow Beam", + "ShadowBeamHostile": "Shadow Beam", + "ShadowFlame": "Shadowflame", + "ShadowFlameArrow": "Shadowflame Arrow", + "ShadowFlameKnife": "Shadowflame Knife", + "Shadowflames": "Shadowflames", + "ShadowOrb": "Shadow Orb", + "Sharknado": "Sharknado", + "SharknadoBolt": "Sharknado Bolt", + "Shuriken": "Shuriken", + "SilkRopeCoil": "Rope Coil", + "SiltBall": "Silt Ball", + "SilverCoin": "Silver Coin", + "SilverCoinsFalling": "Silver Coins", + "SkeletonBone": "Bone", + "SkeletronHand": "Skeletron Hand", + "Skull": "Skull", + "SkyFracture": "Sky Fracture", + "SlimeGun": "Slime Gun", + "SlimeHook": "Slime Hook", + "SlushBall": "Slush Ball", + "SmokeBomb": "Smoke Bomb", + "SniperBullet": "Sniper Bullet", + "SnowBallFriendly": "Snow Ball", + "SnowBallHostile": "Snow Ball", + "SolarCounter": "Solar Radiance", + "SolarFlareChainsaw": "Solar Flare Chainsaw", + "SolarFlareDrill": "Solar Flare Drill", + "SolarFlareRay": "Solar Flare", + "SolarWhipSword": "Solar Eruption", + "SolarWhipSwordExplosion": "Solar Eruption", + "SoulDrain": "Soul Drain", + "SoulscourgePirate": "Soulscourge Pirate", + "Spark": "Spark", + "Spazmamini": "Spazmamini", + "Spear": "Spear", + "SpearTrap": "Spear", + "SpectreWrath": "Spectre Wrath", + "SpelunkerGlowstick": "Spelunker Glowstick", + "Spider": "Spider", + "SpiderEgg": "Spider Egg", + "SpiderHiver": "Spider Turret", + "Spike": "Spike", + "SpikedSlimeSpike": "Slime Spike", + "SpikyBall": "Spiky Ball", + "SpikyBallTrap": "Spiky Ball", + "SpiritFlame": "Spirit Flame", + "SpiritHeal": "Spirit Heal", + "SporeCloud": "Spore Cloud", + "SporeGas": "Spore", + "SporeGas2": "Spore", + "SporeGas3": "Spore", + "SporeTrap": "Spore", + "SporeTrap2": "Spore", + "Squashling": "Squashling", + "Stake": "Stake", + "StarAnise": "Star Anise", + "StardustCellMinion": "Stardust Cell", + "StarCloakStar": "Star Cloak", + "StardustCellMinionShot": "Stardust Cell", + "StardustChainsaw": "Stardust Chainsaw", + "StardustDragon1": "Stardust Dragon", + "StardustDragon2": "Stardust Dragon", + "StardustDragon3": "Stardust Dragon", + "StardustDragon4": "Stardust Dragon", + "StardustDrill": "Stardust Drill", + "StardustGuardian": "Stardust Guardian", + "StardustGuardianExplosion": "Starburst", + "StardustJellyfishSmall": "Flow Invader", + "StardustSoldierLaser": "Stardust Laser", + "StardustTowerMark": "Starmark", + "Starfury": "Starfury", + "StarVeilStar": "Star Veil", + "StarWrath": "Star Wrath", + "StaticHook": "Static Hook", + "StickyBomb": "Sticky Bomb", + "StickyDynamite": "Sticky Dynamite", + "StickyGlowstick": "Sticky Glowstick", + "StickyGrenade": "Sticky Grenade", + "Stinger": "Stinger", + "Stynger": "Stynger", + "StyngerShrapnel": "Stynger", + "Sunfury": "Sunfury", + "SuperStar": "Super Star Cannon", + "SuperStarSlash": "Super Star Cannon", + "SuspiciousTentacle": "Suspicious Looking Tentacle", + "SwordBeam": "Sword Beam", + "Swordfish": "Swordfish", + "Tempest": "Tempest", + "TendonHook": "Hook", + "TerraBeam": "Terra Beam", + "Terrarian": "Terrarian", + "TerrarianBeam": "Terrarian", + "TheDaoofPow": "The Dao of Pow", + "TheEyeOfCthulhu": "Yoyo", + "TheMeatball": "The Meatball", + "TheRottedFork": "The Rotted Fork", + "ThornBall": "Thorn Ball", + "ThornChakram": "Thorn Chakram", + "ThornHook": "Hook", + "ThrowingKnife": "Throwing Knife", + "ThunderSpear": "Storm Spear", + "ThunderSpearShot": "Storm Spear", + "ThunderStaffShot": "Thunder Zapper", + "TiedEighthNote": "Note", + "TikiSpirit": "Tiki Spirit", + "TinyEater": "Tiny Eater", + "TitaniumChainsaw": "Titanium Chainsaw", + "TitaniumDrill": "Titanium Drill", + "TitaniumTrident": "Titanium Trident", + "Tombstone": "Tombstone", + "TopazBolt": "Topaz Bolt", + "TowerDamageBolt": "Released Energy", + "ToxicBubble": "Toxic Bubble", + "ToxicCloud": "Toxic Cloud", + "ToxicCloud2": "Toxic Cloud", + "ToxicCloud3": "Toxic Cloud", + "ToxicFlask": "Toxic Flask", + "TrackHook": "Track Hook", + "Trident": "Trident", + "Truffle": "Truffle", + "TruffleSpore": "Truffle Spore", + "Turtle": "Turtle", + "Twinkle": "Twinkle", + "Typhoon": "Typhoon", + "UFOLaser": "UFO Ray", + "UFOMinion": "UFO", + "UnholyArrow": "Unholy Arrow", + "UnholyTridentFriendly": "Unholy Trident", + "UnholyTridentHostile": "Unholy Trident", + "UnholyWater": "Unholy Water", + "ValkyrieYoyo": "Yoyo", + "Valor": "Yoyo", + "VampireHeal": "Vampire Heal", + "VampireKnife": "Vampire Knife", + "VenomArrow": "Venom Arrow", + "VenomBullet": "Venom Bullet", + "VenomFang": "Venom Fang", + "VenomSpider": "Venom Spider", + "ViciousPowder": "Vicious Powder", + "VilePowder": "Vile Powder", + "VilethornBase": "Vilethorn", + "VilethornTip": "Vilethorn", + "VineRopeCoil": "Vine Rope Coil", + "VortexAcid": "Alien Goop", + "VortexBeater": "Vortex Beater", + "VortexBeaterRocket": "Vortex Rocket", + "VortexChainsaw": "Vortex Chainsaw", + "VortexDrill": "Vortex Drill", + "VortexLaser": "Vortex Laser", + "VortexLightning": "Vortex Lightning", + "VortexVortexLightning": "Vortex", + "VortexVortexPortal": "Vortex", + "Wasp": "Wasp", + "WaterBolt": "Water Bolt", + "WaterGun": "Water Gun", + "WaterStream": "Water Stream", + "Web": "Web", + "WebRopeCoil": "Rope Coil", + "WebSpit": "Web spit", + "WireKite": "Wire Kite", + "Wisp": "Wisp", + "WoodenArrowFriendly": "Wooden Arrow", + "WoodenArrowHostile": "Wooden Arrow", + "WoodenBoomerang": "Wooden Boomerang", + "WoodHook": "Wood Hook", + "WoodYoyo": "Yoyo", + "WormHook": "Hook", + "Xenopopper": "Xenopopper", + "Yelets": "Yoyo", + "YellowCounterweight": "Counterweight", + "ZephyrFish": "Zephyr Fish", + "Ale": "Ale", + "DD2OgreStomp": "Ogre's Stomp", + "DD2OgreSmash": "Ogre's Stomp", + "DD2DrakinShot": "Drakin", + "DD2ElderWins": "Grim End", + "DD2DarkMageRaise": "Dark Sigil", + "DD2DarkMageHeal": "Dark Sigil", + "DD2DarkMageBolt": "Dark Energy", + "DD2OgreSpit": "Ogre Spit", + "DD2BallistraTowerT1": "Ballista", + "DD2BallistraTowerT2": "Ballista", + "DD2BallistraTowerT3": "Ballista", + "DD2BallistraProj": "Ballista", + "DD2GoblinBomb": "Goblin Bomb", + "DD2LightningBugZap": "Withering Bolt", + "DD2SquireSonicBoom": "Hearty Slash", + "DD2BetsyFireball": "Betsy's Fireball", + "DD2BetsyFlameBreath": "Betsy's Breath", + "DD2LightningAuraT1": "Lightning Aura", + "DD2LightningAuraT2": "Lightning Aura", + "DD2LightningAuraT3": "Lightning Aura", + "DD2ExplosiveTrapT1": "Explosive Trap", + "DD2ExplosiveTrapT2": "Explosive Trap", + "DD2ExplosiveTrapT3": "Explosive Trap", + "DD2ExplosiveTrapT1Explosion": "Explosive Trap", + "DD2ExplosiveTrapT2Explosion": "Explosive Trap", + "DD2ExplosiveTrapT3Explosion": "Explosive Trap", + "MonkStaffT1": "Sleepy Octopod", + "MonkStaffT1Explosion": "Pole Smash", + "MonkStaffT2": "Ghastly Glaive", + "MonkStaffT2Ghast": "Ghast", + "DD2PetDragon": "Hoardagron", + "DD2PetGato": "Propeller Gato", + "DD2PetGhost": "Flickerwick", + "DD2ApprenticeStorm": "Whirlwind of Infinite Wisdom", + "DD2PhoenixBow": "Phantom Phoenix", + "DD2PhoenixBowShot": "Phantom Phoenix", + "MonkStaffT3": "Sky Dragon's Fury", + "MonkStaffT3_Alt": "Sky Dragon's Fury", + "MonkStaffT3_AltShot": "Sky Dragon's Fury", + "DD2BetsyArrow": "Aerial Bane", + "ApprenticeStaffT3Shot": "Betsy's Wrath", + "BookStaffShot": "Tome of Infinite Wisdom", + "DD2Win": "Victory!", + "DD2JavelinHostileT3": "{$ProjectileName.DD2JavelinHostile}", + "Celeb2Weapon": "Celebration Mk2", + "Celeb2Rocket": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketExplosive": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketLarge": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketLargeExplosive": "{$ProjectileName.Celeb2Weapon}", + "BlueDungeonDebris": "Debris", + "GreenDungeonDebris": "Debris", + "PinkDungeonDebris": "Debris", + "DirtGolfBall": "Golf Ball", + "GolfBallDyedBlack": "Golf Ball", + "GolfBallDyedBlue": "Golf Ball", + "GolfBallDyedBrown": "Golf Ball", + "GolfBallDyedCyan": "Golf Ball", + "GolfBallDyedSkyBlue": "Golf Ball", + "GolfBallDyedGreen": "Golf Ball", + "GolfBallDyedLimeGreen": "Golf Ball", + "GolfBallDyedOrange": "Golf Ball", + "GolfBallDyedPink": "Golf Ball", + "GolfBallDyedPurple": "Golf Ball", + "GolfBallDyedRed": "Golf Ball", + "GolfBallDyedTeal": "Golf Ball", + "GolfBallDyedViolet": "Golf Ball", + "GolfBallDyedYellow": "Golf Ball", + "GolfClubHelper": "Golf Club", + "VampireFrog": "Vampire Frog", + "BatOfLight": "Sanguine Bat", + "SharpTears": "Blood Thorn", + "ScarabBomb": "Scarab Bomb", + "RollingCactus": "Rolling Cactus", + "RollingCactusSpike": "Rolling Cactus Spike", + "Terragrim": "Terragrim", + "DripplerFlail": "Drippler Crippler", + "BabyBird": "Finch", + "PaperAirplaneA": "Paper Airplane", + "PaperAirplaneB": "Paper Airplane", + "ClusterRocketI": "Rocket", + "ClusterGrenadeI": "Grenade", + "ClusterMineI": "Proximity Mine", + "ClusterFragmentsI": "Cluster Fragment", + "ClusterRocketII": "Rocket", + "ClusterGrenadeII": "Grenade", + "ClusterMineII": "Proximity Mine", + "ClusterFragmentsII": "Cluster Fragment", + "WetRocket": "Rocket", + "WetGrenade": "Grenade", + "WetMine": "Proximity Mine", + "LavaRocket": "Rocket", + "LavaGrenade": "Grenade", + "LavaMine": "Proximity Mine", + "HoneyRocket": "Rocket", + "HoneyGrenade": "Grenade", + "HoneyMine": "Proximity Mine", + "MiniNukeRocketI": "Rocket", + "MiniNukeGrenadeI": "Grenade", + "MiniNukeMineI": "Proximity Mine", + "MiniNukeRocketII": "Rocket", + "MiniNukeGrenadeII": "Grenade", + "MiniNukeMineII": "Proximity Mine", + "DryRocket": "Rocket", + "DryGrenade": "Grenade", + "DryMine": "Proximity Mine", + "ClusterSnowmanRocketI": "Rocket", + "ClusterSnowmanRocketII": "Rocket", + "WetSnowmanRocket": "Rocket", + "LavaSnowmanRocket": "Rocket", + "HoneySnowmanRocket": "Rocket", + "MiniNukeSnowmanRocketI": "Rocket", + "MiniNukeSnowmanRocketII": "Rocket", + "DrySnowmanRocket": "Rocket", + "BloodShot": "Blood Shot", + "ShellPileFalling": "Shell Pile", + "SharkPup": "Shark Pup", + "LilHarpy": "Lil' Harpy", + "FennecFox": "Fennec Fox", + "GlitteryButterfly": "Glittery Butterfly", + "BookOfSkullsSkull": "Skull", + "StormTigerTier1": "Desert Tiger", + "StormTigerTier2": "Desert Tiger", + "StormTigerTier3": "Desert Tiger", + "StormTigerAttack": "Desert Tiger", + "WhiteTigerPounce": "Desert Tiger", + "StormTigerGem": "Desert Tiger", + "BloodNautilusShot": "Blood Shot", + "BloodNautilusTears": "Blood Tears", + "GladiusStab": "Gladius", + "BloodArrow": "Blood Rain", + "DandelionSeed": "Dandelion Seed", + "RulerStab": "Ruler", + "DynamiteKitten": "Dynamite Kitten", + "BabyWerewolf": "Baby Werewolf", + "ShadowMimic": "Shadow Mimic", + "ClusterSnowmanFragmentsI": "Cluster Fragment", + "ClusterSnowmanFragmentsII": "Cluster Fragment", + "SparkleGuitar": "Stellar Tune", + "FirstFractal": "First Fractal", + "FairyGlowstick": "Fairy Glowstick", + "VoltBunny": "Volt Bunny", + "CombatWrench": "Combat Wrench", + "Shroomerang": "Shroomerang", + "JoustingLance": "Jousting Lance", + "ShadowJoustingLance": "Shadow Jousting Lance", + "HallowJoustingLance": "Hallowed Jousting Lance", + "WetBomb": "Wet Bomb", + "LavaBomb": "Lava Bomb", + "HoneyBomb": "Honey Bomb", + "DryBomb": "Dry Bomb", + "OrnamentStar": "Ornament", + "RockGolemRock": "Rock", + "TitaniumStormShard": "Titanium Shard", + "HallowBossLastingRainbow": "Everlasting Rainbow", + "HallowBossRainbowStreak": "Prismatic Bolt", + "FairyQueenLance": "Ethereal Lance", + "FairyQueenSunDance": "Sun Dance", + "QueenSlimeMinionBlueSpike": "Crystal Spike", + "QueenSlimeMinionPinkBall": "Bouncy Gel", + "QueenSlimeSmash": "Queenly Smash", + "QueenSlimeGelAttack": "Regal Gel", + "DirtBomb": "Dirt Bomb", + "DirtStickyBomb": "Sticky Dirt Bomb", + "BouncingShield": "Sergeant United Shield", + "DripplerFlailExtraBall": "Drippler Crippler", + "FallingStarSpawner": "Falling Star", + "SantankMountRocket": "Rocket", + "BlandWhip": "Leather Whip", + "SwordWhip": "Durendal", + "MaceWhip": "Morning Star", + "ScytheWhip": "Dark Harvest", + "CoolWhip": "Cool Whip", + "FireWhip": "Firecracker", + "ThornWhip": "Snapthorn", + "ScytheWhipProj": "Reaping", + "CoolWhipProj": "Cool Flake", + "FireWhipProj": "Firecracker", + "RainbowWhip": "Kaleidoscope", + "Smolstar": "Enchanted Dagger", + "PiercingStarlight": "Starlight", + "FairyQueenMagicItemShot": "Nightglow", + "FairyQueenRangedItemShot": "Twilight Lance", + "VolatileGelatinBall": "Volatile Gelatin", + "CopperShortswordStab": "Copper Shortsword", + "TinShortswordStab": "Tin Shortsword", + "IronShortswordStab": "Iron Shortsword", + "LeadShortswordStab": "Lead Shortsword", + "SilverShortswordStab": "Silver Shortsword", + "TungstenShortswordStab": "Tungsten Shortsword", + "GoldShortswordStab": "Gold Shortsword", + "PlatinumShortswordStab": "Platinum Shortsword", + "FinalFractal": "Zenith", + "ZapinatorLaser": "Zapinator", + "GelBalloon": "Sparkle Slime Balloon", + "EmpressBlade": "Terraprisma", + "Mace": "Mace", + "FlamingMace": "Flaming Mace", + "StardustPunch": "Stardust Guardian", + "TorchGod": "The Torch God", + } +} \ No newline at end of file diff --git a/Localization/Content/en-US/Town.json b/Localization/Content/en-US/Town.json new file mode 100644 index 0000000..1742130 --- /dev/null +++ b/Localization/Content/en-US/Town.json @@ -0,0 +1,1409 @@ +{ + "TownNPCHousingFailureReasons": { + "TooCloseToWorldEdge" : "We need better text for this!!!", + "RoomIsTooBig" : "This room is too big", + "RoomIsTooSmall" : "This room is too small", + "HoleInWallIsTooBig" : "This room is missing a wall", + "RoomCheckStartedInASolidTile" : "This is a solid block!" + }, + "BartenderNames": { + "Name_1": "Ted", + "Name_2": "Barkeep", + "Name_3": "Jerry", + "Name_4": "Bill", + "Name_5": "Ernest", + "Name_6": "William", + "Name_7": "Dale", + "Name_8": "Bruce", + "Name_9": "Moe", + "Name_10": "Javahawk", + "Name_11": "Elandrian", + "Name_12": "Driscan", + "Name_13": "Iamisom", + "Name_14": "Blacksmith", + "Name_15": "Dani Moo", + "Name_16": "Paddy" + }, + "GolferNames": { + "Name_1": "Lion Pines", + "Name_2": "Gunner McLovin", + "Name_3": "Harry Madison", + "Name_4": "Arnie Palmfrond", + "Name_5": "Jake Nicklelisp", + "Name_6": "William", + "Name_7": "Billy Bones", + "Name_8": "Jim Mulligan" + }, + "BestiaryGirlNames": { + "Name_1": "Maria", + "Name_2": "MacKenzie", + "Name_3": "Azaria", + "Name_4": "Juanita", + "Name_5": "Astra", + "Name_6": "Hayley", + "Name_7": "Becca", + "Name_8": "Veronica", + "Name_9": "Tia", + "Name_10": "Robyn", + "Name_11": "Arien", + "Name_12": "Jane", + "Name_13": "Bindi", + "Name_14": "Dian", + "Name_15": "Lori", + "Name_16": "Mardy", + "Name_17": "Mollie", + "Name_18": "Lizzy", + "Name_19": "Daphne", + "Name_20": "Ellen" + }, + + "CatNames_Siamese": { + "Zen": "Zen", + "Callie": "Callie", + "Rainha": "Rainha", + "Nust": "Nust", + "Bandit": "Bandit", + "Goliath": "Goliath", + "Valerie": "Valerie", + "Socks": "Socks", + "Iris": "Iris", + "Sekhmet": "Sekhmet", + "Cleo": "Cleo", + "Sappho": "Sappho" + }, + "CatNames_Black": { + "Luna": "Luna", + "Figment": "Figment", + "Ember": "Ember", + "Damien": "Damien", + "Snowball": "Snowball", + "Night": "Night", + "Misu": "Misu", + "Magic": "Magic", + "Tonic": "Tonic", + "Violet": "Violet", + "Jaspers": "Jaspers", + "Gargoyle": "Gargoyle", + "Lilith": "Lilith", + "Salem": "Salem", + "Rascal": "Rascal", + "Bella": "Bella", + "Odin": "Odin", + "Jiji": "Jiji", + "Morgan": "Morgan", + "Arbus": "Arbus", + "Max": "Max", + "George": "George" + }, + "CatNames_OrangeTabby": { + "Linkle": "Linkle", + "Remy": "Remy", + "Lux": "Lux", + "Sunny": "Sunny", + "Tigger": "Tigger", + "Callie": "Callie", + "Sassy": "Sassy", + "Bob": "Bob", + "Leo": "Leo", + "Tiger": "Tiger", + "Caramel": "Caramel", + "Tony": "Tony", + "Garfield": "Garfield", + "Hobbes": "Hobbes", + "Charlie": "Charlie", + "Rascal": "Rascal", + "Critter": "Critter", + "Adol": "Adol" + }, + "CatNames_RussianBlue": { + "Alexi": "Alexi", + "Ruby": "Ruby", + "Bubbles": "Bubbles", + "Lexi": "Lexi", + "Prissy": "Prissy", + "Valery": "Valery", + "Lucy": "Lucy", + "Pete": "Pete", + "Jocelyn": "Jocelyn", + "Light": "Light", + "Lily": "Lily", + "Starlight": "Starlight", + "Cobalt": "Cobalt", + "Tilly": "Tilly", + "Rion": "Rion", + "Momo": "Momo" + }, + "CatNames_Silver": { + "Roo": "Roo", + "Blaze": "Blaze", + "Rebus": "Rebus", + "Polo": "Polo", + "Kelly": "Kelly", + "Kiva": "Kiva", + "Sooty": "Sooty", + "By": "By", + "Tor": "Tor", + "Trudy": "Trudy", + "Nana": "Nana", + "Ange": "Ange", + "Kanako": "Kanako", + "Freya": "Freya", + "Cloud": "Cloud", + "Cutie": "Cutie", + "Renne": "Renne" + }, + "CatNames_White": { + "Misty": "Misty", + "Storm": "Storm", + "Angel": "Angel", + "Vincent": "Vincent", + "MrCat": "Mr. Cat", + "Holly": "Holly", + "Sam": "Sam", + "Rory": "Rory", + "Ichibi": "Ichibi", + "Belle": "Belle", + "Yuki": "Yuki", + "Ater": "Ater", + "Snowdrop": "Snowdrop", + "Snowball": "Snowball", + "Reah": "Reah" + }, + "DogNames_Labrador": { + "Penny": "Penny", + "Pebbles": "Pebbles", + "Puppy": "Puppy", + "Monroe": "Monroe", + "Kittie": "Kittie", + "Buddy": "Buddy", + "Charlie": "Charlie", + "Trulte": "Trulte", + "Daisy": "Daisy", + "Calvin": "Calvin", + "Willow": "Willow", + "Arthur": "Arthur", + "John": "John", + "Bitsy": "Bitsy", + "Mike": "Mike", + "Sparky": "Sparky", + "Lucky": "Lucky" + }, + "DogNames_PitBull": { + "Max": "Max", + "Dexter": "Dexter", + "Chomps": "Chomps", + "Bubba": "Bubba", + "Sampson": "Sampson", + "Spike": "Spike", + "Ginger": "Ginger", + "Kona": "Kona", + "Keith": "Keith", + "Jazzy": "Jazzy", + "Rex": "Rex", + "Toshiro": "Toshiro", + "Buster": "Buster", + "Doug": "Doug" + }, + + "DogNames_Beagle": { + "Zelda": "Zelda", + "Navi": "Navi", + "Ali": "Ali", + "Fred": "Fred", + "Roxie": "Roxie", + "Milo": "Milo", + "Copper": "Copper", + "Darwin": "Darwin", + "Lieselotte": "Lieselotte", + "Wilma": "Wilma", + "Odie": "Odie", + "Feena": "Feena" + }, + "DogNames_Corgi": { + "Bella": "Bella", + "Ellie": "Ellie", + "Baxter": "Baxter", + "Oliver": "Oliver", + "Maya": "Maya", + "Titus": "Titus", + "Shino": "Shino", + "Elizabeth": "Elizabeth", + "Victoria": "Victoria", + "Yona": "Yona", + "Ammy": "Ammy", + "Charles": "Charles", + "Estelle": "Estelle", + "Astro": "Astro" + }, + "DogNames_Dalmation": { + "Spot": "Spot", + "Suzy": "Suzy", + "Lucky": "Lucky", + "Marshall": "Marshall", + "Dotty": "Dotty", + "Pongo": "Pongo", + "Sapphire": "Sapphire", + "Splat": "Splat", + "Aurora": "Aurora", + "Akane": "Akane", + "Firebug": "Firebug", + "Polka": "Polka", + "Mizore": "Mizore" + }, + "DogNames_Husky": { + "Rosalie": "Rosalie", + "Balto": "Balto", + "Miska": "Miska", + "Sky": "Sky", + "Sasha": "Sasha", + "Zoey": "Zoey", + "Toya": "Toya", + "Snowdog": "Snowdog", + "Kayla": "Kayla", + "Hachiko": "Hachiko", + "Indiana": "Indiana", + "Sven": "Sven", + "Bullet": "Bullet", + "Comet": "Comet", + "Ingrid": "Ingrid", + "Dogi": "Dogi" + }, + "BunnyNames_White": { + "Bunnicula": "Bunnicula", + "Ben": "Ben", + "Roger": "Roger", + "Skippy": "Skippy", + "Donnie": "Donnie", + "Alice": "Alice", + "Presto": "Presto", + "Shion": "Shion", + "Lisette": "Lisette", + "Lily": "Lily", + "Inaba": "Inaba", + "Shirayuki": "Shirayuki", + "Lilia": "Lilia", + }, + "BunnyNames_Angora": { + "Breadbuns": "Breadbuns", + "Loaf": "Loaf", + "Babs": "Babs", + "BigB": "Big B", + "Greg": "Greg", + "Fluffy": "Fluffy", + "Pom": "Pom", + "Muffin": "Muffin", + "Maximus": "Maximus", + "Donald": "Donald", + }, + "BunnyNames_Dutch": { + "Oreo": "Oreo", + "Olaf": "Olaf", + "Domino": "Domino", + "Oz": "Oz", + "Yin": "Yin", + "Yang": "Yang", + "Pow": "Pow", + "Kaguya": "Kaguya", + "Mono": "Mono", + "Panda": "Panda", + "Orin": "Orin" + }, + "BunnyNames_Flemish": { + "Thumper": "Thumper", + "Cinnabun": "Cinnabun", + "Peter": "Peter", + "Hazel": "Hazel", + "Loki": "Loki", + "Sunflower": "Sunflower", + "Toby": "Toby", + "Daisy": "Daisy", + "Dusty": "Dusty", + "Jazz": "Jazz", + "Russell": "Russell", + "Honeycomb": "Honeycomb" + }, + "BunnyNames_Lop": { + "Bunbun": "Bunbun", + "Lola": "Lola", + "Max": "Max", + "Tyler": "Tyler", + "Flops": "Flops", + "Flappie": "Flappie", + "Caerbannog": "Caerbannog", + "Mochi": "Mochi", + "Dandy": "Dandy", + "Puff": "Puff", + "Youp": "Youp", + "Boof": "Boof", + "Veidra": "Veidra" + }, + "BunnyNames_Silver": { + "Bugz": "Bugz", + "Buster": "Buster", + "Silvine": "Silvine", + "Bunstar": "Bunstar", + "Lord": "Lord", + "Bunnykins": "Bunnykins", + "Crystal": "Crystal", + "Chrome": "Chrome", + "Vincent": "Vincent", + "Zach": "Zach", + "Joshua": "Joshua", + "Dustbunny": "Dustbunny", + "Dusty": "Dusty" + }, + + + "AnglerQuestChatter": { + "Chatter_1": "Wooow! You've bothered me, like, {AnglerCompletedQuestsCount} times! If I didn't have a cool fish for each time, I would be really mad!", + "Chatter_2": "Did you know I have {AnglerCompletedQuestsCount} amazingly awesome fish now!? That's because as far as errand monkeys go, you're actually a bit useful!" + }, + "BartenderChatter": { + "Chatter_1": "I've got the cure for what ails ya! Get it? Ale? No?", + "Chatter_2": "They say you're strong, well, I know strong. Let's see if you measure up.", + "Chatter_3": "Back where I'm from, we only serve Root Beer...", + "Chatter_4": "This is a big upgrade from wiping that table all day.", + "Chatter_5": "Life's a challenge when you're just naturally better than everyone else.", + "Chatter_6": "What am I doing here...", + "Chatter_7": "A lot of tenacity and a little bit of luck can go a long way...", + "Chatter_8": "Have you seen any Meburs around here?", + "Chatter_9": "{Dryad} seems nice. I should bring her back with me.", + "Chatter_10": "Do you think {Steampunker} has an extra of that gun? I know a witch that may want one.", + "Chatter_11": "No wonder {Demolitionist} has so many accidents. You can't imagine how much ale he buys from me.", + "Chatter_12": "Normally, I'm not much of a fan of Goblins, but {GoblinTinkerer} seems to be an alright sort.", + "Chatter_13": "{?Day}Anyone see where the Dryad went?", + "Chatter_14": "{?!Day}Really quiet out there. A little too quiet...", + "Chatter_15": "{?!Day}Check in with me, and do your job.", + "Chatter_16": "{?BloodMoon}You know, where I'm from, a Blood Moon is actually just an excuse to get some fresh air.", + "Chatter_17": "{?MoonLordDefeated}Moon Lord, don't you mean Abyss Lord?", + "Chatter_18": "{?HardMode}I know a Lavamancer that would really like that hellstone down in the underworld.", + "Chatter_19": "{?Homeless}Know any good places to set up shop? Would love to open up a bar here." + }, + "GolferChatter": { + "Chatter_1": "I'm not the type to scream and thrash around just because my ball lands in the water. I stay calm, and collected, and focus on the next shot.", + "Chatter_2": "Huh? You eat WHAT for breakfast?", + "Chatter_3": "An early bird catches the worm, but an early hole catches the birdie.", + "Chatter_4": "Lick your finger and hold it to the wind. Golf balls are lightweight and easily influenced by a breeze.", + "Chatter_5": "If sand is causing you nightmares, your wedge is your dreamcatcher.", + "Chatter_6": "Should I take up fishing? Bribing {Angler} to fetch my balls out of the water is emptying my wallet!", + "Chatter_7": "To strike high, strike far, or to get unstuck? It's all about the club you use. Choose wisely!", + "Chatter_8": "When I offer you to go clubbing, I don't mean downtown. I mean like, with a five iron?", + "Chatter_9": "In this game, only losers go for that high score.", + "Chatter_10": "Landscapers must make a lot of green off us golfers. Heh!", + "Chatter_11": "{Armsdealer} has mistaken my golf balls as ammo for his musket on several occassions.", + "Chatter_12": "According to {Dryad}, I'm murdering a lot of her friends when I mow the lawn. I gotta have a fairway for my course!", + "Chatter_13": "If you land on the green, use a putter! Don't let your balls go flying away when you're THAT close.", + "Chatter_14": "Don't go chasing water hazards, please stick to the fairways and greens that you're used to.", + "Chatter_15": "{?BloodMoon}The blood stains on my club? Have you seen the zombies outside?!", + "Chatter_16": "{?BloodMoon}I don't know what's scarier, a Blood Moon or my sister during a Blood Moon!", + "Chatter_17": "{?Rain}Golfing in THIS weather?! Only if you like swinging around a giant lightning rod!" + }, + "BestiaryGirlChatter": { + "Chatter_1": "I collected critters like you once, then I took a cursed fox bite to the knee!", + "Chatter_2": "{?Eclipse}Like wow, I feel like I belong with the creepy killer things running around right now. So glad I'm not that mindless.", + "Chatter_3": "I may not know, like, a whole lot...but I can talk your head off about nature and critters and animals and wildlife and...", + "Chatter_4": "My older bro calls me a lycanthrope. It means I'm like, part animal or something. He'd know, though, because he spends all his time outside!", + "Chatter_5": "I love animals, like, a lot! I tried to pet this weird looking fox one time, he sooo bit me, and now I became like one! Rad!", + "Chatter_6": "Staahp pulling on my tail, bro, it's totally real, and like...totally hurts when you pull on it!", + "Chatter_7": "Huh?! No, {Stylist} didn't dye my hair. It's naturally this color! It was like, dark brown before I was bitten, though!", + "Chatter_8": "Oh, THESE ears? Haha, totes better to hear you with, my dear!", + "Chatter_9": "This one time, at critter camp, I woke up one morning and everything was torn apart! Like, wow, how did I sleep through THAT?!", + "Chatter_10": "Wow, like, I've never seen a full moon. For some reason, it's like I pass out every time one's around!", + "Chatter_11": "I have noooo idea how I got here, but it's mega rad." + }, + "BestiaryGirlLycantropeChatter": { + "Chatter_1": "Grrr!! Away. Stay. NOW!", + "Chatter_2": "Rawgh! Roo! Danger. Me. Wraaaath!" + }, + "CatChatter": { + "Chatter_1": "Meow!", + "Chatter_2": "Purr...", + "Chatter_3": "Merrooow!" + }, + "DogChatter": { + "Chatter_1": "Woof!", + "Chatter_2": "Bark!", + "Chatter_3": "Woof woof!" + }, + "BunnyChatter": { + "Chatter_1": "*Rabbit noises*", + "Chatter_2": "*Bunny noises*" + }, + "BestiaryGirlSpecialText": { + "Party": "So, uh, I can't wear the hat. Sorry. I'm still here for the party, no worries!", + "Graveyard1": "My instincts are totally going wild. I really need to get out of here!", + "Graveyard2": "Ok, like, this place is totally freaky. It makes my fur stand on end!", + "Windy1": "Running in the wind makes me feel so free and wild. Totes try it sometime!", + "Windy2": "The breeze blows through my hair, it's, like, woah.", + "Storm1": "Eek!! You have NO idea how much thunder hurts my sensitive ears.", + "Storm2": "Is it over yet? I have this, like, irrational fear of thunderstorms.", + "Rain1": "Staaaap! Ugh! Not you, this lame rain.", + "Rain2": "For real!? I can't STAND being wet! It's gross." + }, + "BartenderHelpText": { + "Help_1": "The first thing you need to know about are the special defensive artifacts I've got for sale, but only if you've got some Defender Medals!", + "Help_2": "You can use these artifacts to create traps and defensive towers. Doing so consumes Etherian mana, a special energy dropped only by members of the Old One's Army!", + "Help_3": "Challenging the Old One's Army is rather simple. They are attracted to the power of the Eternia Crystals, and that can be used to bait them out.", + "Help_4": "To place an Eternia Crystal, you must obtain an Eternia Crystal and a stand to put it in. It just so happens, you can buy em from me!", + "Help_5": "You'll want to place your Eternia Crystal stand in a pretty open, flat area. Lots of walls and stuff might make it pretty difficult to protect!", + "Help_6": "Once your stand is set up, just interact with it while holding an Eternia Crystal, and prepare for a fight!", + "Help_7": "Of course, you can't let the Old One's Army destroy the Eternia Crystal! This will have catastrophic consequences for my home world of Etheria!", + "Help_8": "You can place defenses at the cost of 10 Etherian mana. Once placed, the Eternia Crystal will release some of this mana. Otherwise, you will need to defeat enemies to get more.", + "Help_9": "With the help of the defenses, you will have to repel several waves of invaders who are attempting to destroy both you and the Eternia Crystal!", + "Help_10": "If you successfully repel the invasion, you'll be awarded with more Defender Medals, which you can bring to me to purchase more artifacts and some other special rewards!", + "Help_11": "I've also heard rumors that the power of the artifacts themselves may be further unlocked if you defeat the Old One's Army. Perhaps you could even use them any time you wish!" + }, + "GuideHelpText": { + "Help_1063": "Normally I'd try to teach you all about the Old One's Army, but you should probably ask {Bartender} about that.", + "Help_1064": "When the moon goes red, the water becomes like blood. Creatures submerged within may become grotesque and malicious." + }, + + "GuideHelpTextSpecific": { + "Help_1100": "I hear a race of lizardmen live in the jungle. Maybe you can get the attention of one by felling a giant beast of the jungle?", + "Help_1101": "I hear there's a woman out there well-versed in fighting back the forces you just unleashed. Maybe if you prove yourself, you can get her attention.", + "Help_1102": "Machines aren't so bad. Maybe we can build one of our own, if we can just get some explosive weaponry from the jungle...", + "Help_1103": "I once met a stylist in this region. She went off adventuring underground and that was the last I saw of her. Wonder what became of her?", + "Help_1104": "Ever caught a strange fish and you aren't sure what to do with it? I hear a fishing master lives near the ocean who might have a use for those...", + "Help_1105": "The Tortured Soul down in the Underworld sure looks familiar...have you tried using Purification Powder on him?", + "Help_1106": "There have been some pirates sighted around lately. If we befriend one, you think he might show us where he buried his treasure?", + "Help_1107": "There are some special plants and other ingredients that can be used to dye things. Maybe if you keep some with you, you'll find someone to show you how.", + "Help_1108": "I've heard of glowing mushrooms growing big enough on the surface to gain sentience. Wonder if there's any truth to that...", + "Help_1109": "They say sand is terrible for golfing. No self-respecting golfer would ever be caught in a desert...right?", + "Help_1110": "Artists like to practice their craft, and painters like to paint. If enough people move in, we'll have enough homes that a painter might show up to spruce up the place!", + "Help_1111": "A lot of people have moved in lately, haven't they? If it gets much more busy around here, a party girl will surely move in!", + "Help_1112": "Always keep an eye out for strangers in need! You never know when you might meet someone new who is in need of help.", + "Help_1113": "If {Merchant}'s wares don't interest you, a wandering merchant often visits with exotic merchandise you might prefer.", + "Help_1114": "Not all of the undead monsters are hostile. I hear one even sells merchandise deep underground.", + "Help_1115": "This world is full of many exciting and dangerous creatures to discover. There are some experts who might reward you for sharing that knowledge with them!", + "Help_1120": "If you thought rainy days were a drag, wait till you see it raining slime!", + "Help_1121": "On rare occasions, the moon will blot out the sun, bringing out lots of scary monsters!", + "Help_1122": "Ever seen the Goblin Scouts in the outer regions of the world? I wonder if an invasion is imminent...", + "Help_1123": "I think I saw a treasure map floating around in the ocean once, but a shark ate it. Maybe you should go try and find one?", + "Help_1124": "I saw some flashing lights, high up in the sky and far away. The truth is out there, I'm telling you.", + "Help_1125": "Have you ever seen beautiful lanterns floating across the night sky? The people of this world celebrate your victories, wishing you good fortune.", + "Help_1130": "If you place an empty bottle on a table, you can use it to craft all sorts of neat potions!", + "Help_1131": "Hang up any banners you earn from defeating foes, as they will help you in future combat with that creature.", + "Help_1132": "It's pretty cold in the snow biome, but there are some unique treasures there as well. I'd check it out!", + "Help_1133": "There are antlion tunnels deep beneath the desert, full of rare fossils and many hazards!", + "Help_1134": "If you find a marble biome, be careful! They say that those locations are inhabited by some very dangerous creatures!", + "Help_1135": "In granite biomes, the very stone itself is a threat, frequently coming to life and attacking intruders!", + "Help_1136": "Need to craft something with ores you can't find on {WorldName}? Try fishing for crates, or placing silt and slush into the Extractinator!", + "Help_1137": "If you ever need a break from all this adventuring, there's always time for some good old fashioned fishing.", + "Help_1138": "While you explore the underground, you may occasionally encounter helpful fairies. If you follow them, maybe they will lead you to treasure!", + "Help_1140": "Your next step should be to explore the caverns of the Crimson. Find and destroy any Crimson Hearts that you come across.", + "Help_1141": "The Crimstone in the Crimson can be purified using some powder from a Dryad, or it can be destroyed with explosives.", + "Help_1142": "Try to gather some obsidian, formed when water and lava meet. It can be used to protect against intense heat.", + "Help_1143": "Some say there are giant bee hives buried underground in the jungle. I could do with some honey myself.", + "Help_1144": "You found some old fossils in the desert? I wonder if there is a way to extract them from the rock.", + "Help_1145": "It's time to upgrade that old Furnace! Look for a Hellforge in the Underworld, it's the only way to craft Hellstone bars.", + "Help_1146": "Have you seen the Wyverns soaring high up in the clouds? If only I could fly like that...", + "Help_1147": "Try combining a Hellforge with some adamantite ore. I bet you could make some really powerful stuff with that!", + "Help_1148": "Try combining a Hellforge with some titanium ore. I bet you could make some really powerful stuff with that!", + "Help_1149": "Run into any rare fruit growing in the jungle lately? If you eat it, it will increase your max life!", + "Help_1150": "I've heard of glowing pink bulbs growing around the jungle recently. Be ready for anything if you decide to harvest one.", + "Help_1151": "That key you have can be used to unlock the Temple hidden in the jungle. Have you found it yet?", + "Help_1152": "They say that there is a sealed Temple, hidden away in the jungle. I wonder how you could open it?", + "Help_1153": "Wow, that key you have is pretty nifty! I heard keys like that can be used to get rare treasure in the Dungeon!", + "Help_1154": "I've heard reports of a very strange worm in the underground mushroom fields. I wonder if it would be any good as bait?", + "Help_1155": "Ancient prophecies speak of a way to summon the monstrous hordes of Halloween through medallions crafted with pumpkins.", + "Help_1156": "Legends tell of a cursed gift that can turn the most festive of nights into an invasion of horrors!", + "Help_1157": "There are some strange people in hoods loitering outside of the Dungeon. Maybe you should check it out?", + "Help_1158": "Where the heck did those Pillars come from?! You should clear out some of the monsters around them!", + "Help_1159": "If you combine lenses at a crimson altar, you might be able to find a way to summon a powerful monster. You will want to wait until night before using it, though." + }, + + "AnglerQuestText": { + "NoQuest_1": "I don't have anything for you to do right now.", + "NoQuest_2": "You have entertained me enough for today, go.", + "NoQuest_3": "You are done, the grand {Angler} dismisses you!", + "NoQuest_4": "Only one fish a day, please go away!", + "NoQuest_5": "I haven't even used the last fish you gave me. I don't need another.", + "TurnIn_1": "Oh! Thanks for the fish I asked for, now scram!", + "TurnIn_2": "Awesome catch! It's all going according to plan! He he he!", + "TurnIn_3": "You make a great errand monkey! Now go away!", + "TurnIn_4": "Muahahahahaha! You did it! You're still in one piece though, how boring!", + "TurnIn_5": "Woah!? You actually did what I asked, and survived! Nice, hand it over and beat it!", + "Quest_Batfish": "Na na na na na na na Bat-FISH! That means go digging underground, fetch it, and bring it to me!\n\n(Caught in Underground & Caverns)", + "Quest_BumblebeeTuna": "The subterranean jungles of {WorldName} have the weirdest things! Like, there's this fish I saw that looked just like a giant bumblebee! I'm allergic to bees, so you have to catch it for me! I bet it'd taste like a tuna and honey sandwich!\n\n(Caught in Honey)", + "Quest_Catfish": "I finally found a jungle cat that likes water! I think it's because it's also part fish. I don't know why this happened, and I don't want to know. I just want it in my hands, and make it snappy!\n\n(Caught in Jungle Surface)", + "Quest_Cloudfish": "There's a rumor going around that there are islands that float high up in the sky, and that they have amazing treasure! Who cares about that though, what's even cooler is that sometimes lakes form in the clouds, and in those lakes are fish made out of clouds! I wanna know what it tastes like, so you better go catch it for me!\n\n(Caught in Sky Lakes)", + "Quest_Cursedfish": "There's a cursed fish swimming in the waters of the deepest corruption! It was forged of the cursed flames that spread from the fallen horrors that lurk down there. They say not even water can put out this fire, and that it can burn forever. I can think of some awesome things I can do with a fish like that! You gonna go get it for me, or are you too chicken!?\n\n(Caught in Corruption)", + "Quest_Dirtfish": "I was reeling in the big one when this funny talking zombie burst out of the forest lake and started rambling on about this 'ferocious' species of fish made out of dirt! He says it could suffocate ten blokes his size, or something like that... I want it! NOW!\n\n(Caught in Surface & Underground)", + "Quest_DynamiteFish": "The demolitionist was raising cane about losing a stick of dynamite in the lake out in the forest. He has like, so many, so why does one matter? Apparently, because it grew fins and started swimming away! I don't know where he gets his materials to make those things, but that one is clearly possessed! Reel it in and bring it to me, I always wanted a suicide bombing fish! Don't ask why...\n\n(Caught in Surface)", + "Quest_EaterofPlankton": "I bet you're not brave enough to find the Eater of Plankton. A corrupt fish that was mutated from a severed piece of the Eater of Worlds itself! Capture it and bring it to me, and prove to me you're not a wuss!\n\n(Caught in Corruption)", + "Quest_FallenStarfish": "I love collecting those bright yellow stars that fall from the sky! I love it even more when they land on someone's head. But.. but.. nothing beats a star that falls in a foresty lake and turns into a fish! That's just totally rad, and you're just rad enough to get it for me!\n\n(Caught in Sky Lakes)", + "Quest_TheFishofCthulu": "Apparently, Demon Eyes can sometimes be amphibious. They don't fly, they swim! I want to see the look on someone's face when they find it in their bathtub! They hang around the same areas. That means you reel one in for me!\n\n(Caught in Sky Lakes & Surface)", + "Quest_Fishotron": "I don't know what's worse, a bone fish or a bone fish with HANDS. This Fish-o-Tron deep in the caverns really freaks me out! I think it's possessed by the same evil spirits that possessed that old man by the dungeon! I double duck dare you to go catch it!\n\n(Caught in Caverns)", + "Quest_Harpyfish": "I was trying to sleep by the hill lakeside when this fish swooped down at me. It was flying! It also had the face of a lady and had feathers! I think I screamed louder than she did! Hey you, go make her pay for scaring me like that!\n\n(Caught in Sky Lakes & Surface)", + "Quest_Hungerfish": "There's a piece of the Hunger that morphed from the Wall of Flesh into a small fish-like thing that swims around aimlessly in the underworld and it's gross and it's yucky and I want it now!\n\n(Caught in Caverns)", + "Quest_Ichorfish": "Did you know deep in the crimson, some of those creatures make this gross yellow stuff? I overheard a crazy story about a pool of it having melted together into a shape of a fish and it swims around and everything! Fetch it for me, so I can stick it in someone's toilet!\n\n(Caught in Crimson)", + "Quest_Jewelfish": "Oooooohhh, I'm going to be SO rich! Deep in the caverns, there is a fish made out of gemstones! Don't ask me how, I don't know, all I know is that this fish is totally awesome and you're going to catch it for me!\n\n(Caught in Underground & Caverns)", + "Quest_MirageFish": "There's some interesting critters to be found in the deeper Hallows, I tell you! They glow this crazy purple color and it messes with my eyes! It's totally wild, so I want you to catch a fish like that for me!\n\n(Caught in Underground Hallow)", + "Quest_MutantFlinxfin": "What's white and tan and fluffy and lives in a frozen underground lake? A mutant flinxfin! I wasn't telling a joke, you know, there really is a mutated variety of Flinx that is more adapted to an aquatic lifestyle! I want it to adapt to my fishbowl, so make sure that happens!\n\n(Caught in Underground Tundra)", + "Quest_Pengfish": "It's a whale! It's a dolphin! No, it's a penguin fish! Oh, and look, it's you! You get to bring me one! You do know they only like cold water, right?\n\n(Caught in Tundra)", + "Quest_Pixiefish": "There's a really really rare type of pixie that's born with so many wings that it can't actually fly! It swims with the fishes in the lakes surrounded by that blue colored grass. My fish tank needs a lamp, so I want you to catch me that pixie!\n\n(Caught in Hallow)", + "Quest_Spiderfish": "I saw a fish that had eight legs! Nope! Not happening! You're fishing it for me, so it's not alive when I hold it! That's the last time I go fishing so deep in the cavern!\n\n(Caught in Underground & Caverns)", + "Quest_UnicornFish": "Unicorns and rainbows are absolutely great! They're everywhere, even in the water. No, really, I actually saw a unicorn fish in the Hallowed lake! Your job is to reel it up and let me have it as a pet!\n\n(Caught in Hallow)", + "Quest_GuideVoodooFish": "Those demons in the underworld really like voodoo dolls, but I think there's a doll out there who was blasted with way too much magic! It turned into a fish and it does stuff on its own. I dare you to go down and get me one! I'd watch out for the boiling lava, because it burns you to death and that won't get me my fish!\n\n(Caught in Caverns)", + "Quest_Wyverntail": "I know something youuuuu don't! Fine, I'll tell you, there's a terrifying creature that flies among the stars! I'm not making this up! It's called a Wyvern! But, but, you knew that already, right? Well what you don't know is that they are born and raised as tadpoles! So, they're actually like.. well, a frog! Hop to it and get me one!\n\n(Caught in Sky Lakes)", + "Quest_ZombieFish": "You won't believe it! I caught a fish in the forest at night that was already dead! Then it tried to eat me! I threw it away and ran! Now I want to stick it in someone's dresser to see what happens, so go fish it back up for me will ya?!\n\n(Caught in Surface)", + "Quest_AmanitaFungifin": "I found this spectacular place draped in giant glowing mushrooms! Everything was blue! I was picking some of the mushrooms I found next to a glistening blue lake, when one of the mushrooms snapped at me and swam away! I want to give it a taste of its own medicine, and give it a good chompin'! What I mean is, you gotta get it for me!\n\n(Caught in Glowing Mushroom Fields)", + "Quest_Angelfish": "Did you know there's magical islands that float up high in the sky? Bet you didn't! They say angels live in the sky, and I believe those angels have fins and gills and swim around! I believe you must catch one for me!\n\n(Caught in Sky Lakes)", + "Quest_BloodyManowar": "Ow! Don't get near me! I got stung by a Bloody Man-O-War! In case you're not smart enough to know what that is, it's the most menacing jellyfish in all of {WorldName}! Go to that rotten crimson and catch it if you dare! \n\n(Caught in Crimson)", + "Quest_Bonefish": "Normally I could care less if I see fishbones floating in the water underground, but this one was swimming! What, you thought that only human skeletons still flailed about in {WorldName}? Get it for me so I can stick it in someone's bed!\n\n(Caught in Underground & Caverns)", + "Quest_Bunnyfish": "Out in the forest, I was fishing right? Well guess what! A bunny hopped up to me! Then another one hopped up, and another... suddenly I'm surrounded by bunnies! One even swam up to me from the water, but it had no legs! I fell outta my chair in surprise and all the bunnies scurried off! I want that bunny fish as a pet, so you better catch it for me! Pronto!\n\n(Caught in Surface)", + "Quest_CapnTunabeard": "Yarr matey! Shiver me timbers! Avast, scallywags! There's a pirate captain who once had a pet fish named Cap'n Tunabeard, but during a big storm the fishbowl fell overboard! It has a hook for a tail, and an eyepatch and everything! You need to fetch me that fish, so I can be as cool as a pirate! Obviously it's out in the ocean somewhere! Duh!\n\n(Caught in Ocean)", + "Quest_Clownfish": "I saw this bright orange and colorful fish by the ocean, and it was looking around frantically as though it was seeking a lost family member! Go catch it for me, so that another one will show up looking frantically for him instead!\n\n(Caught in Ocean)", + "Quest_DemonicHellfish": "I hear in the underworld, that the King of all demons is actually a fish! Just imagine the absolute power I would have if you caught it for me!\n\n(Caught in Caverns)", + "Quest_Derpfish": "Those Derplings in the jungle are the most scary creatures I've ever seen! Good thing is, sometimes they don't have legs! These ones live in the water and are a lot less scary! Catch me one now so I can see what they taste like without being scared half to death!\n\n(Caught in Jungle Surface)", + "Quest_Fishron": "There's a legend of a mighty being known as the Fishron! It's part pig, part dragon, and part FISH! I hear it hangs around in the frozen subterranean lakes of the coldest part of the world! I'm not going there, so YOU go catch it and makes sure it lands in my hands! I'm so excited!\n\n(Caught in Underground Tundra)", + "Quest_InfectedScabbardfish": "A really long fish that looks like a sword's sheath swims in the murky waters of the corruption! It looks a lot like ebonstone, so don't let it fool you! That's right, you. You're catching it, not me!\n\n(Caught in Corruption)", + "Quest_Mudfish": "Watch your step when wading through jungle waters! Why? No, not because I care about you being eaten by piranhas. I care because you'll step on one of my favorite kinds of fish, the Mud Fish! I also care a lot that you're going to grab me one as a pet!\n\n(Caught in Jungle)", + "Quest_TropicalBarracuda": "Piranhas and sharks are ugly! Soooo ugly! Did you know there's a fish that looks very pretty and still can eat your face off? I would pay 2 platinum to see that happen, by the way... To the point, though, you catchy for me. Just make sure I have it before you lose your face!\n\n(Caught Jungle Surface)", + "Quest_TundraTrout": "You ever wonder why the lakes on the surface of the snowy areas of {WorldName} never ice over? I don't. The fish, however, do! A fish made out of ice would make a great offering to the mighty and amazing {Angler}! Go, my loyal subject, and bring me this Tundra Trout with haste!\n\n(Caught in Surface Tundra)", + "Quest_Slimefish": "In the forest, the slimes are kinda gross. Slimefish are even more so! I don't want to swim with slimes, so yoink one out of the water for me!\n\n(Caught in Surface Forest)", + "Quest_ScarabFish": "I read this ancient story about a fish that looks like a magical scarab! That's beetle, for simpletons like you! Where do you find it? Where do you think? In the desert, duh! Don't look at me like that... it's true! There is actually water out there! I'd go, but I don't like having my eyeballs pecked out by vultures. So... you do it!\n\n(Caught in Desert)", + "Quest_ScorpioFish": "I'm sure someone, a really stupid someone, tried to tell you there was no water in the desert! They were absolutely and positively wrong! There's this thing called an Oasis, and it has water in it! Guess what happens when you have water!? That's right, you have fish! Weird fish that try to sting you and pinch you and do all kinds of other mean things to you! A perfect pet for me, and a perfect job for you!\n\n(Caught in Desert)" + }, + "PirateChatter": { + "Chatter_1": "About time we gotta barkeep around here! Me rum was almost gone!" + }, + "GuideChatter": { + "Chatter_1": "I thought you said you purified {TaxCollector}? He's just as greedy as ever!", + "Chatter_2": "I wonder why my predecessor spontaneously burst into flames. Hopefully it doesn't happen to me..." + }, + "NurseChatter": { + "Chatter_1": "I keep asking for wine, but all {Bartender} gives me are mugs of ale." + }, + "StylistChatter": { + "Chatter_1": "I offered {Bartender} a free trim, but he refused. I mean, I could have at least worked on his mustache!" + }, + "CyborgChatter": { + "Chatter_1": "{Bartender} said I reminded him of a certain \"EV2\". Perhaps I should meet her." + }, + "MechanicChatter": { + "Chatter_1": "{Bartender} offered me a Root Beer, I told him to give it to me in a square cup." + }, + "AnglerChatter": { + "Chatter_1": "How come {Bartender} won't sell me any ale? I want to try some! What a grouch!", + "Chatter_2": "Whaaaat?! Can't you see I'm winding up fishing line??", + "Chatter_3": "I have enough fish! I don't need your help right now!", + "Chatter_4": "There's no chefs in all of {WorldName}, so I have to cook all this fish myself! ", + "Chatter_5": "Hey! Watch it! I'm setting up traps for my biggest prank ever! No one will see it coming! Don't you dare tell anyone!", + "Chatter_6": "Let a kid give you some advice, never touch your tongue to an ice block! Wait, forget what I said, I totally want to see you do it!", + "Chatter_7": "Ever heard of a barking fish?! I haven't, I'm just wondering if you did!", + "Chatter_8": "{WorldName} is filled to the brim with the most outlandish kinds of fish!", + "Chatter_9": "I'm bummed out! There's probably been fish that have gone extinct before I even was born, and that's not fair!", + "Chatter_10": "I don't have a mommy or a daddy, but I have a lot of fish! It's close enough!" + }, + "GoblinTinkererChatter": { + "Chatter_1": "You know, these Etherian Goblins are nothing like my people. Really rowdy bunch. Not that my people are much better..." + }, + "MerchantSpecialText": { + "Party": "You know what would be the best way to party? Buying things for others, specifically from me.", + "Graveyard1": "This eerie atmosphere is bad for business!", + "Graveyard2": "This is a terrible location... I can't sell my wares to the dead!", + "Windy1": "What a blustery day! Stay awhile, and buy a thing or two.", + "Windy2": "I used slime glue to keep my hat from blowing away! Perhaps I can sell you some for a couple gold coins...", + "Storm1": "Wanna buy a lightning rod? Oh, seems I'm out of stock.", + "Storm2": "Storms rollin' in... how 'bout you come in and buy something?", + "Rain1": "Umbrellas! Umbrellas! Get your half-off umbrellas!", + "Rain2": "How dreary! Lighten the mood with 99 torches!" + }, + "NurseSpecialText": { + "Party": "No, I will not tell you how many candles are on my cake.", + "Graveyard1": "Ahh!! I'd rather be working at an abandoned hospital than hanging around here!", + "Graveyard2": "This place creeps me out, and I can't treat dead patients!", + "Windy1": "This breeze is really extra right now! Beware of flying needles.", + "Windy2": "I been chasing my medical instruments all day. This gale is keeping me fit!", + "Storm1": "I do not perform shock therapy, just go stand outside under a tree!", + "Storm2": "Just stay inside! I've already treated too many electrocuted patients today.", + "Rain1": "If you stay out there too long, you'll catch a cold!", + "Rain2": "Great! Now my uniform is all wet. Stop staring!" + }, + "ArmsDealerSpecialText": { + "Party": "Parties are great for getting people to come out of their shell, just like with bullets.", + "Graveyard1": "I hate places like this. I can't kill what's already dead!", + "Graveyard2": "If you see any suspicious activity out in that fog, I wasn't involved.", + "Windy1": "Was tryin' out my new gun, but the wind kept me off target!", + "Windy2": "Don't spray and pray in the wind, buddy!", + "Storm1": "A lightning gun? Don't have time for that, man. I love my bullets!", + "Storm2": "If you time it right, no one will hear your gunshots with the thunder.", + "Rain1": "Heard a rumor that some clouds are literally out to get you! Show 'em whose boss with one of my guns!", + "Rain2": "Flying fish? I call that target practice!" + }, + "DryadSpecialText": { + "AfterDD2Tier1": "When I was in Etheria, I felt so disconnected from {WorldName}. Its good to be back.", + "AfterDD2Tier2": "The Corruption tried to take me over when I went to Etheria, but instead, I used its power against the Old One's Army!", + "WorldStatusAll": "{0} is {1}% hallow, {2}% corrupt, and {3}% crimson.", + "WorldStatusHallowCorrupt": "{0} is {1}% hallow and {2}% corrupt.", + "WorldStatusHallowCrimson": "{0} is {1}% hallow and {2}% crimson.", + "WorldStatusCorruptCrimson": "{0} is {1}% corrupt and {2}% crimson.", + "WorldStatusCorrupt": "{0} is {1}% corrupt.", + "WorldStatusCrimson": "{0} is {1}% crimson.", + "WorldStatusHallow": "{0} is {1}% hallow.", + "WorldStatusPure": "{0} is completely pure. You have done an amazing job!", + "WorldDescriptionBalanced": "The world is in balance.", + "WorldDescriptionFairyTale": "We are living in a fairy tale.", + "WorldDescriptionGrim": "Things are grim indeed...", + "WorldDescriptionWork": "You have a lot of work to do.", + "WorldDescriptionClose": "You are so close!", + "Party": "I thought I would throw a party to celebrate our victories in the past and those yet to come.", + "Graveyard1": "I can handle the corruption, but the vile air of death in this location wilts the flower in my hair.", + "Graveyard2": "This place... I can hear the cry of nature at those who've fallen here.", + "Windy1": "The wind... it is nature's way of sweeping the dust from the land.", + "Windy2": "Nature's fury strips the leaves from the trees this day.", + "Storm1": "Our mother is angry, and wishes to burn away the filth by raining destructive power on our treetops.", + "Storm2": "It is unwise to traverse openly beneath the flashing dangers from above.", + "Rain1": "The water from the sky is a way for nature to wash away the mud in our streams.", + "Rain2": "When it rains, many kind of fish acquire some mystical properties." + }, + "GuideSpecialText": { + "Party": "Never been to a party before? You might want to check around with the others. People sometimes bring out special party favors.", + "Graveyard1": "Graveyards are spooky and very dangerous. I'd watch your step, kid.", + "Graveyard2": "It's cold and ominous around here. I feel something very evil calling out to me.", + "Rain1": "Be advised that certain creatures only come out during rain.", + "Rain2": "Don't be alarmed, it is just water. I hear certain species of fish can fly when it rains!", + "Windy1": "Don't get blown away by the strong gusts going on, and be wary of monsters which take advantage of them!", + "Windy2": "It's windy out there! Now is the best time to fly a kite.", + "Storm1": "It's dangerous to be out in a thunderstorm. Take cover, kid.", + "Storm2": "Lightning is no joke, very powerful fiends come out in this weather.", + "SlimeRain": "If you defeat enough of these slimes, you might invoke the wrath of their king. Be careful!", + "Eclipse": "Huh?! Where is the sun? Why is it so dark? It must be a Solar Eclipse!", + "Lantern1": "What a beautiful night! With your recent victory, the world seems more at peace, and these lanterns are in celebration of that.", + "Lantern2": "Do you see the lanterns? Now that you've saved our world, there are regular celebrations of your victory. Always such a beautiful sight!" + }, + "DemolitionistSpecialText": { + "AfterDD2Start": "I don't see why we can't just blow up those portals.", + "Party": "You might want to be careful today. Us dwarves tend to have pretty explosive parties.", + "Graveyard1": "The stench of death here is worse than the skeleton-infested caverns where I work!", + "Graveyard2": "All these piles of bones and stones... perfect for blowin' up!", + "Windy1": "Now might not be the best time to lob grenades on the surface, my tall friend!", + "Windy2": "You want boomerang bombs? Throw some out in that gust, they'll come back to you alright!", + "Storm1": "BOOM! Even mother nature likes a taste of gratifying demolition!", + "Storm2": "You shoulda seen it when lightning struck one of my carts filled with explosives!", + "Rain1": "This is a terrible day to be a dwarf.", + "Rain2": "ARGH! Another fuse put out by all this wet stuff! This never happens underground!" + }, + "ClothierSpecialText": { + "Party": "Mama always said you've got to put the past behind you before you can party on.", + "Graveyard1": "I've been cursed! Take me to the hospital!", + "Graveyard2": "It's a big graveyard, we'll divide it up! The dead stay in their half, we'll stay in ours!", + "Windy1": "Sometimes, I guess there's just not enough windmills.", + "Windy2": "The air has certainly got it, today!", + "Storm1": "Remember to keep breathing, because eventually this storm will pass!", + "Storm2": "If it wasn't storming, everyone would go outside. It's the lightning that makes it dangerous.", + "Rain1": "It's raining alright! Little bitty stingin' big ol' fat sideways rain! At least it ain't coming from straight up underneath us!", + "Rain2": "One day it started raining like this, and it didn't quit for four days!" + }, + "GoblinTinkererSpecialText": { + "Party": "Goblin parties are a lot like humans. They both have games like \"Pin the Blame on the Human\" er... I don't play that game at my parties.", + "Graveyard1": "I'm working on a Photon Sack. It's an invention to trap all the ghasts lurking around outside!", + "Graveyard2": "The constant moaning and ear-piercing screeching noises are distracting me from my work!", + "Windy1": "This weather is the reason why I wear goggles! I can't have dirt and sand blowing in my eyes.", + "Windy2": "Now would be a great time to tinker a pinwheel accessory!", + "Storm1": "I'm working on an invention that will harness the energy being released around us!", + "Storm2": "Most goblins hate thunderstorms. Probably because they carry so many spiky balls.", + "Rain1": "All this rainfall makes it hard to see. I should tinker my goggles with a pair of windshield wipers.", + "Rain2": "Humans are a lot taller than goblins. When it floods, we are always in big trouble!" + }, + "WizardSpecialText": { + "AfterDD2Tier1": "You know, I think I've seen a portal like that before, but it was gold.", + "Party": "Clearly I throw the most magical of parties.", + "Graveyard1": "I can't bring anyone back from the dead, so don't ask!", + "Graveyard2": "Funny, when I look far enough into the crystal ball, this is where every customer ends up!", + "Windy1": "This gale got you bothered? There's a spell for that.", + "Windy2": "A blast of wind terrorizing our world? Did I do that?", + "Storm1": "Did somebody steal my spell book again!?", + "Storm2": "You call this lightning!? Back in my day, I .. uh.. Hmm. Oh, did you need something?", + "Rain1": "Yes, I can go out in the rain and not melt. I'm a wizard, dammit!", + "Rain2": "Raindrops falling on my... uh.. Where am I? Who are you? ... Who am I?", + "LuckIsCursed1": "Stay away! You are dragging a behemoth of woeful bad luck in your wake! I want nothing of it!!", + "LuckIsCursed2": "Did you smash every mirror in WorldName!? You hapless fool, you are cursed beyond help!!", + "LuckIsTerrible1": "I feel a terrible fate surrounding you! You should just stay in bed today!", + "LuckIsTerrible2": "What manner of salt did you spill to receive such misfortune!?", + "LuckIsPoor1": "Negative energy is seeping from your pores. I wouldn't take any chances today.", + "LuckIsPoor2": "Unfortunate omens hang over your head. You DID forward that letter, right?", + "LuckIsBad1": "The air feels dull and gloomy where you step. Be wary of ill feelings.", + "LuckIsBad2": "Is something bothering you? Something doesn't feel quite right about you.", + "LuckIsGood1": "I sense a speck of good karma about you, but I could be mistaken.", + "LuckIsGood2": "There's something unusually warm about you. I'm not sure how to place it, but keep walking in that direction.", + "LuckIsGreat1": "You are giving off a positive energy, like something grand could occur at any moment.", + "LuckIsGreat2": "There are vibes of good fortune emanating from you, as though your wishes could possibly come true.", + "LuckIsAmazing1": "Have you a garden of four-leaf clovers? You are bursting with essences of great fortune!", + "LuckIsAmazing2": "Serendipity smiles upon you! It is likely you shall find profit in all things!", + "LuckIsGodly1": "You are overflowing with a blessing of stupendous prosperity!!", + "LuckIsGodly2": "Excessive health and happiness gush from your very being! You are a Godsend!!" + }, + "MechanicSpecialText": { + "Party": "Do you think anyone would mind if I wired a cake with bulbs instead of candles?", + "Graveyard1": "I should light up this dark and scary place to keep the monsters away.", + "Graveyard2": "I'd run some wire here, but the spooky dead things are in the way!", + "Windy1": "Oh no! There are pockets of low pressure rolling in, I must secure the power grid.", + "Windy2": "My wires are getting tangled in this cyclone. Watch where you step!", + "Storm1": "Great! There goes another pump. When will the lightning stop frying my equipment?!", + "Storm2": "Don't go outside right now while holding any of my products, you'll attract an unwanted dose of electrical power!", + "Rain1": "If it doesn't stop raining, my wrench is going to get all rusty!", + "Rain2": "Oh Fudge! Shorted out another outlet! I hate this weather." + }, + "TruffleSpecialText": { + "Party": "I would have invited everyone to party in my home, but there's not mushroom.", + "Graveyard1": "This is an excellent place to start a family. Most of my friends were born here!", + "Graveyard2": "This place makes me feel good. I'm not sure why...", + "Windy1": "Our kind is very brittle, I worry for my brothers on this breezy day.", + "Windy2": "Wind is not my friend, I like the dark, calm places.", + "Storm1": "The weather seems detrimental to your species, human.", + "Storm2": "That last roar of thunder startled the spores right out of me!", + "Rain1": "Ahh... nice and damp. I feel so good.", + "Rain2": "Rain is cause for celebration for my people." + }, + "SteampunkerSpecialText": { + "Party": "Everyone said they like stacked cakes, so I installed smokestacks in mine", + "Graveyard1": "Golly! What uncultured swine decided to break ground here?", + "Graveyard2": "Neither blood nor steam pumps in this miserable locale.", + "Windy1": "Ahh... a sip of tea to enjoy the breeze.", + "Windy2": "Why, this windy phenomena has inspired me ideas for a new jetpack engine!", + "Storm1": "Electricity? Don't be ludicrous! Nothing beats the power of steam!", + "Storm2": "Everything I tinker up is made of metal. This current situation surely is a cause for rethinking that!", + "Rain1": "The rain is a double edged sword you see... It provides us water for steam, but it also rusts our equipment.", + "Rain2": "This bloody downpour! I can't get a lick of anything done when it's all wet!" + }, + "DyeTraderSpecialText": { + "HasPlant_0": "Brilliant, my dear! You have brought me an exquisite sample of the world's beautiful colors and aroma. In exchange, you may take this special bottle of dye.", + "HasPlant_1": "You bring me a beautiful, rare flower... yes, yes? Take this bottle of special dye for your troubles, friend!", + "HasPlant_2": "Fantabulous, wonderful friend! With this delicate specimen, I may mix the most amazing dyes {WorldName} has ever seen! You may take this one right away!", + "NoPlant_0": "Oh no no, this will not do. For these money is no good, you must return to me with a rare specimen of a plant!", + "NoPlant_1": "You think you can pull a fast one on {DyeTrader}, I don't think so! I only take the rarest of flowers for these special bottles!", + "NoPlant_2": "These dye bottles? Sorry dear friend, these don't take coin. I only take the most precious and rare of flora in exchange for one of this!", + "Party": "I truly love parties, so many beautiful colors and happy people.", + "Graveyard1": "My, my... this is no good. The putrid surroundings are dulling my dye petals.", + "Graveyard2": "You think this a place worthy of my presence? So drab, so dull, these people are literally below me.", + "Windy1": "Marvelous! The wind brings me petals of all colors!", + "Windy2": "Give me a moment, my dear. I must secure my palette from the gusty gales!", + "Storm1": "Egads! I loathe these bothersome storms!", + "Storm2": "Please, do tell when the wrath of nature has ended out there!", + "Rain1": "Too much water dilutes my selection! This rain better pass, soon!", + "Rain2": "No, no, these robes cannot get wet! They will lose their vibrant color!" + }, + "PartyGirlSpecialText": { + "AfterDD2Tier1": "Have you seen an ogre yet? I want to ride on the back of one!", + "Party_1": "Hmm? Nothing special today... just kidding! It's party time, and then it's after party time!", + "Party_2": "At last, my time has come!", + "Graveyard1": "Woo hoo! It's party time! ...Uh, why isn't anyone moving?", + "Graveyard2": "We should party so loud that we LITERALLY wake the dead! Hee hee!", + "Windy1": "Did somebody say hurricane party!? I'll bring the batteries!", + "Windy2": "This is like, an amazing time to fling confetti everywhere!", + "Storm1": "There was a sudden crash of thunder at the disco, and I panicked!", + "Storm2": "Let's dance! We can shake our hips to the beat of the sky!", + "Rain1": "It's raining outside! Come on in and party!", + "Rain2": "Oh, are you all wet? Well, shake it off!", + "Cake1": "Where ya been!? There's a total party going on! Here, take the cake!", + "Cake2": "Shhh! Don't tell ANYONE I gave you this! It's a party surprise!", + "Cake3": "Party up! You're like, in charge of the cake, {PlayerName}!", + "Music1": "Are the tunes killing your party? I'll shuffle the playlist for you.", + "Music2": "I think this party could use a switch-up! How about these jams?", + "Music3": "We've been partying to this song for years! Let's change it up!" + }, + "CyborgSpecialText": { + "Party": "This party is going to be nuts, maybe even bolts!", + "Graveyard1": "Fascinating. This appears to be a storage unit for broken and malfunctioning humans.", + "Graveyard2": "My sensors indicate an increased density of energy particles. My visual receptors are unable to identify any of them.", + "Windy1": "Sensors indicate strong shifts in barometric pressure. Caution is advised.", + "Windy2": "A strong contrast between high and low pressure detected.", + "Storm1": "BEEP! Severe weather warning. This is not a test. Take shelter, immediately. BEEP!", + "Storm2": "Abnormal levels of negative and positive charged particles detected.", + "Rain1": "Precipitation detected. Advising self to seek shelter. Rust imminent.", + "Rain2": "Flash flood warning. Error 404: Sandbags not found." + }, + "PainterSpecialText": { + "Party": "I tried having a paintball fight, but everyone wanted food and decorations instead.", + "Graveyard1": "I paint walls and furniture, not bones! It isn't Dia de Muertos!", + "Graveyard2": "What a dreary place... it sure could use a splash of color, huh?", + "Windy1": "Feel that draft coming through? It's wafting paint fumes all over the place.", + "Windy2": "This wind storm just blew all the fresh paint right off the wall!", + "Storm1": "When the thunder rolls, and the lightning strikes... it really brings out the colors on the furniture.", + "Storm2": "Blink and you'll miss it. The brightest colors stand out when the lightning flashes.", + "Rain1": "Rain is my worst nightmare. It literally rinses out all my hard work!", + "Rain2": "I painted a mural on this wall just a moment ago. Shoulda bought a weather radio!" + }, + "WitchDoctorSpecialText": { + "AfterDD2Tier1": "I sense a kindred spirit in the Etherian Dark Mages. A pity they are our enemies, I would have liked to learn from them.", + "Party": "I wanted to see how your kind celebrate, I am not disappointed.", + "Graveyard1": "Rise, zombie! Zombie, arise!", + "Graveyard2": "You may remove the reaper from the cemetery, but you may not remove the cemetery from the reaper...", + "Rain1": "The sound of rain is soothing to the soul.", + "Rain2": "Balance is key. We need sun, we need rain. Too much of either leads to ruin.", + "Windy1": "Keep your talismans close... if you wind some, you lose some.", + "Windy2": "The wind blows with the leaves, the leaves blow with the wind.", + "Storm1": "The spirits sound loudly this day, in blinding majesty.", + "Storm2": "Lightning casts powerful shadows, shadows cast powerful lightning." + }, + "PirateSpecialText": { + "Party": "After all that cake, you might have to call me White Beard for a while.", + "Graveyard1": "Arr... hate to say it, but many me mateys put these holes in the ground... if ye catch me drift!", + "Graveyard2": "Hardee harr... the sea be a pirate's graveyard! Ye landlubbers waste ye time!", + "Windy1": "Hoist the sails, ye curs! We pirates startin' a leg of a race! Yarharharr!", + "Windy2": "All hands on deck! A storm of wind be brewin'!", + "Storm1": "Ahoy! Brace fer impact, swashbuckler! 'Tis a'mother of all tempests!", + "Storm2": "Great Charybdis! What manner of wrath er curses have ye sent on us now!?", + "Rain1": "Ha har! Rain!? Jus' another day fer a pirate.", + "Rain2": "Fish do fly in ye rainy skies! I seen it with me own eye!" + }, + "StylistSpecialText": { + "Party": "I may have gotten my hair done up just for today, but honestly, I just want to pop balloons with my scissors.", + "Graveyard1": "Eek! This deathly atmosphere is ruining my perm!", + "Graveyard2": "I kinda want to go out there and collect heads of hair for wigs, but I kinda don't want to GO OUT THERE!", + "Windy1": "Want windswept hair? Go outside, it's free.", + "Windy2": "Ugh! I should just take the day off, this wind will blow away all my hard work!", + "Storm1": "I'm staying inside! The Einstein look is NOT in fashion.", + "Storm2": "Like, really? This crazy storm is bad for business!", + "Rain1": "That totally will not do. Soggy rat is not a hairstyle!", + "Rain2": "What?! It's raining? I just got a perm!" + }, + "AnglerSpecialText": { + "Party": "What, you think I like parties because I am a kid? Well, you're right, so get to partying!", + "Graveyard1": "I'm totally scared right now! It is all YOUR fault!", + "Graveyard2": "How can I fish out there?! Are you crazy, or just stupid!?", + "Windy1": "Wind is usually a great time to fish, but this is too much! I almost hooked my eye out!", + "Windy2": "Is this some kinda hurricane!? I almost got hit by a dolphin!", + "Storm1": "Thunderstorms are the best time to go fishing! Also the most dangerous! That's why I'll send you to do it for me!", + "Storm2": "This one time at fishing camp, lightning struck the lake! Suddenly, all the fish floated up to the surface for free!", + "Rain1": "Yes! It's raining! Now I can watch you get soaking wet while you fish for me!", + "Rain2": "I always go fishing in the rain! It's why I wear this hat!", + "BloodMoonFishing1": "You know, super scary things lurk in the water during a Blood Moon! You should totally go try it! I'll watch from here!", + "BloodMoonFishing2": "You should try fishing when the water is all bloody! It's to die for!" + }, + "TaxCollectorSpecialText": { + "Graveyard1": "Death and taxes, nothing more sure in life than that!", + "Graveyard2": "The people here aren't paying up! They are better off dead! Oh, perhaps they already are.", + "Windy1": "Just because your house blows down, doesn't mean you stop paying taxes!", + "Windy2": "Bah! If this wind keeps up, people will lose their precious possessions and stop paying me!", + "Storm1": "A marvelous storm! A remarkable storm!", + "Storm2": "I am as giddy as a drunken man! I love this weather!", + "Rain1": "Humbug! Someone tried to tell me they saw a fish walking on land. Who do they take ME for?!", + "Rain2": "Why can't it be raining gold coins!? Water is everywhere! Bah, how useless!" + }, + "BartenderSpecialText": { + "FirstHelp": "For starters, take a few of these Defender Medals, on the house! I've got some special defenses you can purchase, but only with Defender Medals!", + "FirstMeeting": "Huh? How did I get here? The last thing I remember was a portal opening up in front of me...", + "BeforeDD2Tier1": "We should really do something about the Old One's Army. Ask me about the Eternia Crystal if you want to learn more.", + "AfterDD2Tier1": "Great job on fighting off the Old One's Army! But I'm sure we haven't seen the last of them, they didn't put up much of a fight this time.", + "AfterDD2Tier2": "The Army of the Old One's keeps getting stronger, yet you keep pushing them back! But something tells me they aren't quite finished with us yet.", + "AfterDD2Tier3": "You really kept the full force of the Old One's Army at bay? Maybe you should visit Etheria some time.", + "Party_1": "There's a party happening here! I had just wiped down the bar, too.", + "Party_2": "You should sit down and have a little fun. Don't worry, I don't think any kobolds will crash this party.", + "Graveyard1": "Etheria has some dark places, but this takes the cake!", + "Graveyard2": "The bar seems kinda dead tonight. Smells like it, too!", + "Windy1": "There goes the roof. I had just had it redone yesterday!", + "Windy2": "Hold onto your bonnet, there's a real breeze out today.", + "Storm1": "Take shelter from the storm! Sit down for a pint.", + "Storm2": "You look a bit frazzled! Perhaps a mug'll calm your singed nerves.", + "Rain1": "You look like a drowned, shaggy dog! How 'bout you down some ale, eh?", + "Rain2": "Wipe your feet before you step in here, the floor was just waxed!" + }, + "GolferSpecialText": { + "FirstMeeting1": "Thank you for the rescue. If I were trapped out here any longer, I could have come down with a heat stroke!", + "FirstMeeting2": "Why, thank you! I been stuck in this sand pit for days. Good thing you can get water out of a cactus.", + "Party_1": "I'm having trouble concentrating on this swing because of the obnoxious party going on around me.", + "Party_2": "I hit a hole in one! That's a good reason for us all to celebrate. Time to put my club down and have a margarita.", + "Graveyard1": "Graveyards creep me out. I don't like practicing my swings on top of my family and friends.", + "Graveyard2": "Don't play golf in a cemetery. The grass grows too efficiently and makes the entire course rough.", + "Windy1": "This wind makes for a very difficult course.", + "Windy2": "A strong gale adds challenge to a game of golf, but this is rather excessive.", + "Storm1": "I don't think so, {PlayerName}.", + "Storm2": "The odds of being struck by lightning are the same as the lottery. Going outside swinging an iron is a winning ticket!", + "Rain1": "Golfing in the rain is less fun. Everything is all slippery!", + "Rain2": "Water hazards are a lot larger when it rains, making it that much harder to reach the green!" + }, + "SantaSpecialText": { + "Party": "Come now, you didn't think I only celebrated on Christmas did you?", + "Graveyard1": "Ho ho ho! Wait, look at this place... did I come two months too early!?", + "Graveyard2": "Naughty or Nice? Hm, how unusual... the people here have all been crossed off my list for some time now.", + "Windy1": "Ho ho! My reindeer will fly at mach speeds, tonight!", + "Storm1": "Oh ho... whoah! There goes Dasher. There went Donner, too!", + "Rain1": "Got a torch? If so, won't you guide my sleigh tonight?!" + }, + "TravellingMerchantSpecialText": { + "Party": "Many say that parties give you the richest of memories. So buy something and make this memory rich!", + "Graveyard1": "Whew! Look at my many wares! I totally did NOT take them off the dead buried here, to sell to you.", + "Graveyard2": "In my travels, I've never run across anyone living in a dismal place like this! Ah, well, as long as you have coin...", + "Windy1": "I go where winds take me, but this is ridiculous!", + "Windy2": "I would sell you exotic wind socks, but I'm afraid I forgot to stock them!", + "Storm1": "Hurry up and buy!", + "Storm2": "Whew! That was close! Brick and mortar sounds like a pretty good investment right now.", + "Rain1": "Rain or blue skies, I come from afar to serve you! Do you have some coin?", + "Rain2": "If my exotic coat shrinks, I will be a tad upset!" + }, + "SkeletonMerchantSpecialText": { + "Graveyard1": "As much as you would think I'd belong here, I really don't.", + "Graveyard2": "How did I get here!? These are not my friends!", + "Windy1": "The world above is turbulent and chaotic. I like my bones to stay attached, as it were!", + "Storm1": "The surface is overabundant with destructive weather. Singed bones would be bad for my complexion!", + "Rain1": "Up there? Heard it's pretty wet. Don't want my bones getting soggy and mushy..." + }, + "GolferQuestsChatterMaster": { + "1": "You are a God walking among mere mortals! A spectacular golfer!", + "2": "If I had a trophy to give for your amazing swings, I'd give you ten!", + "3": "What a breathtaking golfer! You may be at the top, but never stop reaching for it!" + }, + "GolferQuestsChatterJourneyman": { + "1": "I'm impressed. Statistically, you are a wedge above the rest!", + "2": "You're doing a good job out there! Should I be worried?", + "3": "Your courses are well below par. That's a good thing!" + }, + "GolferQuestsChatterApprentice": { + "1": "You're getting better! I am not fearing for my life anymore.", + "2": "Those are rather mediocre swings. Almost par for the course, if I must say.", + "3": "Not quite champion level, but you'll do." + }, + "GolferQuestsChatterBeginner": { + "1": "If you keep swinging like that, you'll end up hurting someone... or yourself!", + "2": "You're going to need a lot of practice, I strongly recommend padding.", + "3": "That poor bird. Duck is tasty, however, so don't give up!" + }, + "TownNPCMoodBiomes": { + "Forest": "the Forest", + "NormalUnderground": "the Underground", + "Snow": "the Snow", + "Desert": "the Desert", + "Jungle": "the Jungle", + "Ocean": "the Ocean", + "Hallow": "the Hallow", + "Mushroom": "the Mushroom", + "Dungeon": "the Dungeon", + "Corruption": "the Corruption", + "Crimson": "the Crimson" + }, + "TownNPCMood": { + "Content": "I am content.", + "NoHome": "I hate not having a home.", + "FarFromHome": "I am too far from home.", + "DislikeCrowded": "I dislike how crowded I am.", + "HateCrowded": "I hate how crowded I am.", + "LoveSpace": "I love having so much space.", + "LikeBiome": "I like {BiomeName}.", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "I dislike {BiomeName}.", + "HateBiome": "I hate {BiomeName}.", + "LikeNPC": "I like {NPCName}.", + "LoveNPC": "I love {NPCName}.", + "DislikeNPC": "I dislike {NPCName}.", + "HateNPC": "I hate {NPCName}.", + }, + "TownNPCMood_Guide": { + "Content": "I'm feeling quite alright.", + "NoHome": "I'm quite used to not having a home, but I wouldn't mind one.", + "FarFromHome": "I'm far from my home, it seems.", + "DislikeCrowded": "I'm a free spirit. I dislike so many people being close to me.", + "HateCrowded": "I hate overcrowding. I prefer the open world!", + "LoveSpace": "Getting this place to myself... I greatly appreciate it.", + "LikeBiome": "I'm quite fond of wandering through {BiomeName}. I like it here.", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "I don't really like {BiomeName}. There's little to accomplish.", + "HateBiome": "I hate {BiomeName}, the terrors here can tear a person apart in moments.", + "LikeNPC": "I'm quite fond of {NPCName}, we have a lot in common.", + "LoveNPC": "I love being around {NPCName}.", + "DislikeNPC": "{NPCName} rubs me the wrong way. Maybe it's the weird clothing?", + "HateNPC": "I hate that {NPCName} is around. The world is fine the way it was made!", + }, + "TownNPCMood_Merchant": { + "Content": "I'm feeling successful! Want to buy something?", + "NoHome": "I don't have a place to set up shop, friend.", + "FarFromHome": "Boy, I need to make my way back to my merchandise!", + "DislikeCrowded": "The number of neighbors has me a little unsettled.", + "HateCrowded": "I hate how many people hang around, but none of them buy anything!", + "LoveSpace": "This is nice, lots of privacy to store my wares.", + "LikeBiome": "I like the scenery in {BiomeName}, a good view attracts customers!", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "Hmm, {BiomeName} is a terrible place for business, I don't like it.", + "HateBiome": "I don't think I can sell goods to monsters in {BiomeName}!", + "LikeNPC": "{NPCName} makes loads of money, I like deep pockets.", + "LoveNPC": "I love being around {NPCName}.", + "DislikeNPC": "I dislike {NPCName}, too frugal and doesn't ever buy my things.", + "HateNPC": "I hate {NPCName}'s terrible personality!", + }, + "TownNPCMood_Nurse": { + "Content": "My vital signs are normal, if that's what you're asking.", + "NoHome": "Tch, not having a house REALLY puts me in a bad mood.", + "FarFromHome": "I'm TOO FAR from my house, I hate all this walking.", + "DislikeCrowded": "Hey, I dislike the lack of social distancing here.", + "HateCrowded": "UGH, I hate how unhealthy it is to cram so many people in one place!", + "LoveSpace": "These digs are great - loving the personal space.", + "LikeBiome": "I like how {BiomeName} is a beautiful place to get daily exercise.", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "Eww, I don't like {BiomeName}'s propensity for illness.", + "HateBiome": "Yuck, {BiomeName} is extremely putrid and filthy, it'll make me sick!", + "LikeNPC": "{NPCName} is a smart and likeable goof.", + "LoveNPC": "What? {NPCName}? I don't have a crush! I don't! Shut up!", + "DislikeNPC": "I don't like {NPCName} that much, kinda weirds me out.", + "HateNPC": "Oh, I hate treating {NPCName}, so difficult!", + }, + "TownNPCMood_Painter": { + "Content": "Yeah, I might be in a good mood. What's it to ya?", + "NoHome": "I ain't got a place to stay!", + "FarFromHome": "I need more paint, but my flat is too far, ya?", + "DislikeCrowded": "I don't like all these people around makin' noise when I'm painting.", + "HateCrowded": "I hate noisy crowds, when will I get some peace and quiet?", + "LoveSpace": "This serene living space has all the quiet I need to focus on my mural.", + "LikeBiome": "There are many ingredients for mixin' new paint in {BiomeName}, and the pretty view don't hurt either!", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "Why don't I like {BiomeName}? Because it's borin'. Green? Brown? That's it?", + "HateBiome": "Woah, {BiomeName} is disgusting, get me outta here!", + "LikeNPC": "{NPCName} and I like the same shade of pink! That's a friend, in my book!", + "LoveNPC": "I would really love to paint {NPCName}... because of the vivid colors, of course!", + "DislikeNPC": "{NPCName} is just too bland for my tastes, I dislike associating with dull types.", + "HateNPC": "I hate being around {NPCName}.", + }, + "TownNPCMood_DyeTrader": { + "Content": "Me? I'm fine, I'm fine.", + "NoHome": "No no, this will not do, need a place to call mine.", + "FarFromHome": "You think I can make brilliant colors so far from my shop? Don't think so!", + "DislikeCrowded": "I truly dislike crowds, unless of course they are here for my vivid colors!", + "HateCrowded": "When I'm not doing business, I'd much rather be alone, yes? I hate feeling crammed in!", + "LoveSpace": "My dear, this palace is quiet enough to sleep like a sultan!", + "LikeBiome": "Ahh, {BiomeName} is really nice, reminds me of my home town, I like it very much so!", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "Oh no, {BiomeName} does not inspire me, don't like, don't like.", + "HateBiome": "Gross, {BiomeName} is draining the color from my palettes!", + "LikeNPC": "{NPCName} has good eyes for vividness and business, I like it, yes?", + "LoveNPC": "I love being around {NPCName}.", + "DislikeNPC": "Oh dear, that {NPCName} has no sense of color or style, I don't like.", + "HateNPC": "I truly, truly hate how unsavory {NPCName} can be.", + }, + "TownNPCMood_PartyGirl": { + "Content": "I'm in my best party mood!", + "NoHome": "I'm ready to party, but I don't have a house for the after-party.", + "FarFromHome": "My party favors, I forgot them at home. Wow, it's pretty far!", + "DislikeCrowded": "There's a lot of people around me, but I don't like that they aren't partying!", + "HateCrowded": "Wow, there's so many people here, I hate that it's not for a party.", + "LoveSpace": "This is all mine? I'm gonna throw the BIGGEST party - for myself!", + "LikeBiome": "Why do I like {BiomeName}? Because it has RAINBOWS!", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "Ew, it's so drab in {BiomeName}. How can you party in a place like this?", + "HateBiome": "Yeesh, {BiomeName} is literally murdering my party vibe.", + "LikeNPC": "I totally like {NPCName}'s party style.", + "LoveNPC": "I love that {NPCName} always dazzles at my parties.", + "DislikeNPC": "I think {NPCName} is a killjoy at parties.", + "HateNPC": "I hate how {NPCName} always tries to shut down my after-parties. What a grump!", + }, + "TownNPCMood_Angler": { + "Content": "I'm good, now fetch me a fish!", + "NoHome": "I'm a kid, you need to give me a house! Are you dumb!?", + "FarFromHome": "I left my fishing pole at home, and it's waaaaay over there! Drat!", + "DislikeCrowded": "I don't like all these people scaring my fish, so make them go away!", + "HateCrowded": "I hate all these strangers - they scared all my fish half to death!", + "LoveSpace": "Yes! I get to be alone with all my fish!", + "LikeBiome": "Why is {BiomeName} my favorite place to go? It has tons of cool fish, duh!", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "Did you hit your head? Duh, {BiomeName} doesn't have fish!", + "HateBiome": "Hey stupid, the fish here in {BiomeName} are all trying to kill me!", + "LikeNPC": "{NPCName} actually knows what they're doing, unlike some OTHER people! I kinda like that!", + "LoveNPC": "I love being around {NPCName}.", + "DislikeNPC": "I dislike {NPCName}.", + "HateNPC": "I hate {NPCName}, and anyone else who treats me like a child!", + }, + "TownNPCMood_Stylist": { + "Content": "I'm feeling fresh today.", + "NoHome": "Sorry hun, I can't style hair without a place to set up my station.", + "FarFromHome": "I'm too far from my tools...", + "DislikeCrowded": "Am I hearing spiders? Oh, just noisy neighbors, I don't like that.", + "HateCrowded": "I absolutely cannot stand having so many people living around me, I can't focus.", + "LoveSpace": "Lovely, I get to keep to myself and study my technique without distraction.", + "LikeBiome": "It's nice, calm atmosphere for cutting hair in {BiomeName}.", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "Hun, I don't like it here in {BiomeName}, how can anyone show off their hair when it's so cold?", + "HateBiome": "Ugh, {BiomeName} is causing severe damage to my hair!", + "LikeNPC": "{NPCName} is strong and mysterious. I like that.", + "LoveNPC": "{NPCName} is quite the looker... so exotic... I think I'm in love...", + "DislikeNPC": "I tried to work on {NPCName}, but was rudely rejected, I don't like stubborn people!", + "HateNPC": "I hate {NPCName}, how can you literally NOT grow hair?", + }, +"TownNPCMood_Demolitionist": { + "Content": "Well, I don't feel like exploding today!", + "NoHome": "I don't have a place to live, did I blow up my last one?", + "FarFromHome": "I need more BOOM, I think I left it way back at home.", + "DislikeCrowded": "I dislike the number of people here, for safety reasons, of course...", + "HateCrowded": "Too many people around! One mistake making dynamite, and... well, they'd HATE the outcome!", + "LoveSpace": "Ah, no one around - I can test new bombs without creating a graveyard for limbs!", + "LikeBiome": "Dwarves are naturally drawn to {BiomeName}, it's in our blood!", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "I can't stand {BiomeName}, my fuses have trouble igniting here!", + "HateBiome": "It reeks of death and malice in {BiomeName}, I wanna blasts holes everywhere!", + "LikeNPC": "{NPCName} is a good friend I like, helps me load the gunpowder!", + "LoveNPC": "I love how well {NPCName} can handle a container of fireball!", + "DislikeNPC": "I wanna strap {NPCName} to a rocket and watch what happens!", + "HateNPC": "I hate being around {NPCName}.", + }, + "TownNPCMood_Dryad": { + "Content": "All is peaceful, don't mess it up.", + "NoHome": "All of nature may be my home, but a house would treat me well.", + "FarFromHome": "A flower doesn't grow very well so far away from its roots!", + "DislikeCrowded": "Is this area becoming rather dense, or is it just me? I dislike the feeling...", + "HateCrowded": "So many others crammed into one spot? The grass is doomed, I hate it!", + "LoveSpace": "Solitude is sometimes good - there's room to grow and to breathe.", + "LikeBiome": "I kissed a tree in {BiomeName} and I liked it.", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "I rather dislike how {BiomeName} is so devoid of life.", + "HateBiome": "I am severely offended by my surroundings - {BiomeName} is my mortal enemy!", + "LikeNPC": "I like that {NPCName} resonates with every fiber of my being!", + "LoveNPC": "I love being around {NPCName}.", + "DislikeNPC": "I don't like that {NPCName} has no respect for other beings.", + "HateNPC": "I hate {NPCName}'s destructive habits towards nature!", + }, + "TownNPCMood_DD2Bartender": { + "Content": "I'm livin' the dream.", + "NoHome": "I feel so out of place without a bar to polish.", + "FarFromHome": "I might want to get back to my place in case anyone needs a drink or two.", + "DislikeCrowded": "Not sure I like living next door to so many people.", + "HateCrowded": "Hate to say it, but I rather hate overcrowded quarters.", + "LoveSpace": "Finally, some peace and quiet... as a bartender this is a luxury!", + "LikeBiome": "Ahh, {BiomeName}... I like it here, it's got character.", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "I'm not a fan of {BiomeName}, it's bitter.", + "HateBiome": "Is this another invasion? Oh, it's just {BiomeName} - even worse!", + "LikeNPC": "I like {NPCName}, it shows you cannot always judge a person by their... origins.", + "LoveNPC": "{NPCName} is one crazy little drinker, I love it!", + "DislikeNPC": "I rather dislike {NPCName}, they put out similar vibes as some of the dark things from Etheria.", + "HateNPC": "{NPCName}'s eccentric and narcissistic personality really makes me want to smash a table!", + }, + "TownNPCMood_ArmsDealer": { + "Content": "I'm good, buddy!", + "NoHome": "I don't have a place to stay, pal!", + "FarFromHome": "I don't like doin' business this far from home.", + "DislikeCrowded": "Shh, I think there's some people nearby, don't like doin' my deals here.", + "HateCrowded": "Hey, I can't do what I do with so many people watchin' me.", + "LoveSpace": "This is what I'm talkin' about, privacy!", + "LikeBiome": "Ya know, {BiomeName} is secluded and great for business, if you catch my drift.", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "Yeah, no, {BiomeName} makes me very uncomfortable.", + "HateBiome": "I hate {BiomeName} - hunting isn't quite as fun if you're the prey!", + "LikeNPC": "Yeah, I like {NPCName}, wicked cool person.", + "LoveNPC": "Think {NPCName} ever, ya know, checks me out?", + "DislikeNPC": "I don't really like {NPCName} bein' on my turf, ya know?", + "HateNPC": "I'd REALLY like to use {NPCName} as a range target sometime.", + }, + "TownNPCMood_GoblinTinkerer": { + "Content": "Feelings are currently nominal.", + "NoHome": "Goblins don't normally need nice homes, but I'm not like most goblins.", + "FarFromHome": "I want to work on my new invention, but my house is way over there!", + "DislikeCrowded": "There appears to be an unlikeable amount of humans gathering around me, hm?", + "HateCrowded": "This crowding triggers bad memories of goblin war camps, I really hate it.", + "LoveSpace": "Perfect, the lack of annoying neighbors adequately meet my needs.", + "LikeBiome": "Ahh, {BiomeName} is a nice, quiet place to construct more gadgets. Major like-age!", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "I don't like {BiomeName}, it is filled with loud, annoying pests that get in the way of my work!", + "HateBiome": "I hate {BiomeName}, I cannot put merge these trinkets into one piece if I'm fighting to keep myself that way!", + "LikeNPC": "{NPCName} understands how fun it is to mix things together, I can respect that!", + "LoveNPC": "{NPCName} makes my cardiac core function improperly, it appears I love how that feels!", + "DislikeNPC": "I detect eerie vibes from {NPCName}, as if they contain dark secrets. I don't like the feeling.", + "HateNPC": "I really hate how {NPCName} humiliated me, all because male goblins cannot grow real hair!", + }, + "TownNPCMood_WitchDoctor": { + "Content": "I embody contentedness.", + "NoHome": "A hut would suffice. Not all of my surroundings embrace tranquility.", + "FarFromHome": "I have strayed far from my calm place.", + "DislikeCrowded": "The close presence of others disrupts my juju and comfort.", + "HateCrowded": "Too many of your kind are gathering too near, growing much malice in my soul.", + "LoveSpace": "Strong energy flows through unimpeded by neighboring presence, very pleasant.", + "LikeBiome": "I cannot fathom existing elsewhere, {BiomeName} is the center of my voodoo spirits.", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "The magicks of {BiomeName} are of oppression, not true purity, my heart and soul are enraged.", + "HateBiome": "I sense a grim evil pervading the land and all living things in {BiomeName}.", + "LikeNPC": "{NPCName} is a kindred spirit of nature, my soul is at peace in their presence.", + "LoveNPC": "I love being around {NPCName}.", + "DislikeNPC": "I dislike the practices of {NPCName}. True healing cannot come from metal and glass.", + "HateNPC": "Fury fills my being as abominations sprout from tainted earth - I speak of {NPCName}.", + }, + "TownNPCMood_Clothier": { + "Content": "What's normal, anyways?", + "NoHome": "No home at all? I will not be subjected to criminal abuse!", + "FarFromHome": "It's a highly tedious procedure, cranking out a spyglass and looking for my house.", + "DislikeCrowded": "The local population is like living with dead weight on my back.", + "HateCrowded": "Overcrowding is as overcrowding does.", + "LoveSpace": "I'm not a popular man, but I know what tranquility is.", + "LikeBiome": "Seeing is believing, but sometimes the most likeable things are in {BiomeName}.", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "There just aren't enough dark rooms in {BiomeName}.", + "HateBiome": "My soul feels torn here in {BiomeName}, as if my very being is at war between good and evil.", + "LikeNPC": "I can't quite place it, but I find {NPCName} fascinating.", + "LoveNPC": "{NPCName}? I hadn't seen anything so delicious in my life.", + "DislikeNPC": "For some reason, being around {NPCName} makes me feel uneasy.", + "HateNPC": "I hate {NPCName} and I don't know why.", + }, + "TownNPCMood_Mechanic": { + "Content": "Everything's working correctly - oh, me? Yeah I'm fine!", + "NoHome": "I need some sort of structure to run these wires through.", + "FarFromHome": "Oh, it seems I'm out of signal range! Hmm.", + "DislikeCrowded": "The flickering lights are bothering me. Is there a load on the grid?", + "HateCrowded": "I'm going to need a way bigger power source for THIS MANY people, I hate it!", + "LoveSpace": "Perfect, no one is in the way for building infrastructure.", + "LikeBiome": "I like {BiomeName}, machines don't overheat here, and the energy flow is efficient.", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "I don't like {BiomeName}, it reminds me of a traumatic experience!", + "HateBiome": "I feel extremely uncomfortable in {BiomeName}, as if creeping eyes are always watching me.", + "LikeNPC": "I feel like I understand {NPCName} better than anyone else.", + "LoveNPC": "Umm... {NPCName} makes my heart flutter, I need to get that checked!", + "DislikeNPC": "I don't really like that {NPCName} won't leave me alone!", + "HateNPC": "I hate how {NPCName} doesn't know how to treat a woman!", + }, + "TownNPCMood_TaxCollector": { + "Content": "What? I AM in a good mood.", + "NoHome": "How can a man of my riches have no home? Preposterous!", + "FarFromHome": "Bah! I'm trying to make my way back home to count my money. Begone!", + "DislikeCrowded": "I'll have you know, I dislike neighbors!", + "HateCrowded": "Go tell all these miserable poor freeloaders to scram, I hate crowds.", + "LoveSpace": "Finally, isolation from all these miserable peasants!", + "LikeBiome": "Living in {BiomeName} forces people to stay indoors and leave me alone. I find that pleasant.", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "What kind of irritating place is {BiomeName}? Poppycock, I tell you!", + "HateBiome": "Even for my standard, {BiomeName} is beyond miserable! Bah!", + "LikeNPC": "Exuberant people tend to give me a headache, but somehow I actually like {NPCName}. I must be losing my mind!", + "LoveNPC": "I highly admire {NPCName}. Anyone who knows the true value of money earns my utmost respect!", + "DislikeNPC": "{NPCName} is just too noisy, away with them and their ilk!", + "HateNPC": "I loathe the very existence of {NPCName}! What kind of lunatic just gives things away for free?", + }, + "TownNPCMood_Pirate": { + "Content": "Yarr. I be in ship shape!", + "NoHome": "The open sea's me true home, but if I be landlocked for awhile... well I need me shelter, matey.", + "FarFromHome": "Me bed and me rum be callin' me name back home.", + "DislikeCrowded": "Avast! Too many landlubbers on me ship be foulin' my mood.", + "HateCrowded": "Ye too hate the feelin' that a mutiny be comin'? Too many scallywags gettin' close to me quarters.", + "LoveSpace": "'Tis like having me very own galleon, matey!", + "LikeBiome": "Hardy har har, matey, {BiomeName} is me true home!", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "Argh, {BiomeName} be a bit cramped for me style, ye scurvy dog!", + "HateBiome": "Arr, {BiomeName} be the foulest chunk 'o dry land ever traversed!", + "LikeNPC": "Har Har! Melikes how {NPCName} brings ye best bottle o' rum.", + "LoveNPC": "Ahoy! Me takes {NPCName} under me wing, landlubber. Me love raisin' sea pups!", + "DislikeNPC": "Ye know me don't like that {NPCName} tries to cut me beard, I've slit scurvy throats fer less!", + "HateNPC": "Me want to make {NPCName} walk ye plank, sea dog! Hate the coddlin' and the dastardly smell!", + }, + "TownNPCMood_Wizard": { + "Content": "I feel magical.", + "NoHome": "Where is my house? Where am I? Who are you? Who am I?", + "FarFromHome": "I could have sworn my house was here somewhere...", + "DislikeCrowded": "Can some of these noisy people move further away? No? Ok.", + "HateCrowded": "This overcrowding is starting to dampen my magic! I think.", + "LoveSpace": "Reminds me of the old days, practicing magic up in a tower in the middle of nowhere!", + "LikeBiome": "What's not to like about {BiomeName}? It has unicorns and rainbows.", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "I dislike {BiomeName}, magic does not flow well in a place like this.", + "HateBiome": "The abominations in {BiomeName} disturb me, like the darkest form of magic.", + "LikeNPC": "{NPCName} and I share a very long history, I like the mutual wisdom.", + "LoveNPC": "I love that there's a lot to talk about with {NPCName}.", + "DislikeNPC": "{NPCName} dabbles in things that shouldn't be disturbed, and I don't like that.", + "HateNPC": "That loathsome {NPCName} is a complete and total abomination to magic!", + }, + "TownNPCMood_Steampunker": { + "Content": "I am jolly good.", + "NoHome": "I could use a flat to bide in.", + "FarFromHome": "I'm wee far from home, an' I forgot my bloody motor!", + "DislikeCrowded": "I dinnae like being surrounded by folk, much.", + "HateCrowded": "Oi, I absolutely hate crowded quarters!", + "LoveSpace": "Plenty o' room just for me and some good steam engines!", + "LikeBiome": "I prefer the wide open spaces here in {BiomeName}, great for jetpack joyrides!", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "The shrubbery and mess of {BiomeName} really grinds my gears!", + "HateBiome": "Truly, {BiomeName} is uncultured and unsightly - nevermind perilous!", + "LikeNPC": "{NPCName} is a likeable sort who helps me spruce up my inventions.", + "LoveNPC": "I love how unique and interesting {NPCName} truly is, remarkable!", + "DislikeNPC": "{NPCName} is too otherworldly! I dinnae like them much.", + "HateNPC": "I hate being near {NPCName}.", + }, + "TownNPCMood_Cyborg": { + "Content": "All neural functions appear to be operating smoothly.", + "NoHome": "Error 404: Living arrangements not found.", + "FarFromHome": "I have wandered beyond the signal range of my datacenter.", + "DislikeCrowded": "Too many other lifeforms. I am experiencing negative emotional neural patterns.", + "HateCrowded": "Lifeform limit exceeded. Neural functions overloaded. Translation: I hate this.", + "LoveSpace": "Zero close proximity life signs detected. This is fortunate.", + "LikeBiome": "My cybernetic functions perform optimally in {BiomeName}'s temperature gradient. This is a plus.", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "The flora and fauna are invading my synthetic exoskeleton: {BiomeName} is an undesired location for myself.", + "HateBiome": "Detecting overwhelming numbers of hostile life signatures in {BiomeName}.", + "LikeNPC": "{NPCName} attempts to treat me favorably like another human. It appears I appreciate that.", + "LoveNPC": "I love being around {NPCName}.", + "DislikeNPC": "{NPCName} does not comprehend my existence, for it deviates from the norm. Unusual. The negative feeling is mutual.", + "HateNPC": "{NPCName}'s functions cannot be scientifically analyzed. Neutral functions overloaded. Translation: I hate this.", + }, + "TownNPCMood_SantaClaus": { + "Content": "I am jolly!", + "NoHome": "I can't just go back to the north pole when I please, ho ho ho! Think you can spot me a temporary house?", + "FarFromHome": "Hello there! I'm far from my temporary home!", + "DislikeCrowded": "I prefer to work alone, in the presence of just my elves. I dislike all the distractions!", + "HateCrowded": "This is a pretty big crowd, each and every one on the naughty list. I hate carrying that heavy bag of coal!", + "LoveSpace": "Ho ho ho! Just me and my elves, a perfect place for my remote workshop.", + "LikeBiome": "I like {BiomeName}.", + "LoveBiome": "I absolutely love it here! Are you surprised? Who thought I wouldn't like {BiomeName}?", + "DislikeBiome": "I dislike {BiomeName}.", + "HateBiome": "I'm adding you to the naughty list for putting me in a awful place like {BiomeName}.", + "LikeNPC": "I like being around {NPCName}.", + "LoveNPC": "I love being around {NPCName}.", + "DislikeNPC": "I dislike being around{NPCName}.", + "HateNPC": "I hate people who don't believe in me! For example, {NPCName}, the naughtiest I've ever known!", + }, + "TownNPCMood_Golfer": { + "Content": "I'm doing fine!", + "NoHome": "I need a place to hang up my clubs.", + "FarFromHome": "I think I've wandered off course. That is not a smart move.", + "DislikeCrowded": "Golf is a sport best enjoyed solo. I dislike my life not being the same way.", + "HateCrowded": "Hate to say it, but I rather hate all the foot traffic here.", + "LoveSpace": "Nothing better than having all this space to yourself.", + "LikeBiome": "I like {BiomeName}. It has all the necessary features for golfing.", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "Tell me something. How am I supposed to golf in a place like {BiomeName}?", + "HateBiome": "I especially think it's unwise to hang around a place like {BiomeName}.", + "LikeNPC": "It's always fun to hang out with {NPCName}. Good people.", + "LoveNPC": "Unpopular opinion: I quite love having {NPCName} around. I get my water hazards returned to me!", + "DislikeNPC": "I dislike being around {NPCName}. Makes me feel uneasy.", + "HateNPC": "I hate {NPCName}'s greedy attitude. It's pretty unnecessary in a world like this.", + }, + "TownNPCMood_Truffle": { + "Content": "I am quite happy, considering.", + "NoHome": "I need a place to feel secure and welcome.", + "FarFromHome": "I don't think I'm comfortable being so far away from my home.", + "DislikeCrowded": "I don't like this anxiety I'm getting from the people gathering around me.", + "HateCrowded": "I hate it. So many people... I... I'm not going to get eaten, right?", + "LoveSpace": "I love having so mush room to myself. What's so funny?", + "LikeBiome": "I feel right at home, like I am one with {BiomeName} biome.", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "I dislike {BiomeName}.", + "HateBiome": "I don't belong in {BiomeName}, I would not survive!", + "LikeNPC": "{NPCName} treats me with respect, as though I'm a true part of nature. I don't know how to feel about that, except I like it.", + "LoveNPC": "I love {NPCName} for being able to talk to me without mysteriously getting hungry.", + "DislikeNPC": "{NPCName} has tried to eat me so many times. I swear, one time they weren't even human! I, obviously, dislike it.", + "HateNPC": "{NPCName} has tried to throw me into a pot filled with other unusual ingredients. I hate that.", + }, + "TownNPCMood_BestiaryGirl": { + "Content": "I'm feeling good, actually! Thanks for askin'!", + "NoHome": "Like, I can't just go live in a burrow, you know. I need a house!", + "FarFromHome": "I'm uh, like, a little homesick,? Plus I need to feed my pets!", + "DislikeCrowded": "I get a little anxious around a lot of people. I like, don't want that.", + "HateCrowded": "Eek! I hate feeling worried about what will happen with all these people around!", + "LoveSpace": "I absolutely love having my own place to be myself! This is like, totally awesome!", + "LikeBiome": "I love animals, so naturally {BiomeName} is like, the best place ever! Yas!", + "LoveBiome": "I love {BiomeName}.", + "DislikeBiome": "It's like, weird having instincts and all, and {BiomeName} really makes me want to run away!", + "HateBiome": "Like, {BiomeName} totally reeks of those curses that fox cub had -- the one that bit me!", + "LikeNPC": "Of course I like {NPCName}! I like, knew them since I was born!", + "LoveNPC": "I can't explain it. I have like, a thing for {NPCName}. Is it because of the tail?", + "DislikeNPC": "I don't like how cruel {NPCName} is!", + "HateNPC": "I really totally hate what {NPCName} does to animals!", + }, + "TownNPCMood_BestiaryGirlTransformed": { + "Content": "Rrrr... feel fine.", + "NoHome": "GRAH! Need HOME! NOW!", + "FarFromHome": "Grrawr... home! far FAR! CANNOT TRACK.", + "DislikeCrowded": "Rawgh! PEOPLE. TOO MANY. Irritate!", + "HateCrowded": "Snarrrrrll... CANNOT. STAND. CROWDING!", + "LoveSpace": "Rrrrr... open space. HAPPY.", + "LikeBiome": "In {BiomeName}... Good RUN! PLAY! HUNT! Yee!", + "LoveBiome": "FAVORITE LAND... {BiomeName}. DELIGHT.", + "DislikeBiome": "Mrrrr... {BiomeName}. NO SMELL GOOD.", + "HateBiome": "Gughhh, {BiomeName}... I LOATHE. BAD SCENERY.", + "LikeNPC": "{NPCName}. Rrr... GOOD. FEEL.", + "LoveNPC": "LOVE. STRONG... {NPCName}. Yeeyee!", + "DislikeNPC": "{NPCName}.... VIBES. BAD! Grrl", + "HateNPC": "Arghl! NO {NPCName}. HATE. FURY. DISGUST!!", + } +} \ No newline at end of file diff --git a/Localization/Content/es-ES.json b/Localization/Content/es-ES.json new file mode 100644 index 0000000..891247c --- /dev/null +++ b/Localization/Content/es-ES.json @@ -0,0 +1,697 @@ +{ + "GameTitle": { + "0": "Terraria: ¡Cava, peón! ¡Cava!", + "1": "Terraria: Barro épico", + "10": "Terraria: Excavador de bloques", + "11": "Terraria: No hay vacas", + "12": "Terraria: Ojos de aspecto sospechoso", + "13": "Terraria: ¡Hierba morada!", + "14": "Terraria: ¡Nadie se queda atrás!", + "15": "Terraria: ¡Catarata de contenidos!", + "16": "Terraria: Atados a la tierra", + "17": "Terraria: Mucho cavar, pero poco rédito", + "18": "Terraria: Mineral, natural y maravillosal", + "19": "Terraria: La arcilla del juicio final", + "2": "Terraria: ¡Adaman-tira fuerte!", + "20": "Terraria: Problemas terrestres", + "21": "Terraria: Simulador de descubrimientos obsesivo-compulsivos", + "22": "Terraria: Red Dev Redemption", + "23": "Terraria: El amanecer de los slimes", + "24": "Terraria: ¡Ahora, con más cosas que querrán matarte!", + "25": "Terraria: Los rumores de la muerte del guía eran exagerados", + "26": "Terraria: Qué pena de herramientas...", + "27": "Terraria: Un espeleólogo dijo: \"¿Qué?\"", + "28": "Terraria: Y yo dije: \"Nosequé de una actualización para PC...\"", + "29": "Terraria: Que los bloques te acompañen", + "3": "Terraria: La arena es demasiado poderosa", + "30": "Terraria: Mejor que la vida", + "31": "Terraria: Terraria: Terraria:", + "32": "Terraria: Ahora en 1D", + "33": "Terraria: Próximamente en los mejores ordenadores", + "34": "Terraria: Dividimos por 0", + "35": "Terraria: ¡Ahora, con sonido!", + "36": "Terraria: Pulsa ALT+F4", + "37": "Terraria: Qué pena de herramientas", + "38": "Terraria: ¿Quieres arena?", + "39": "Terraria: Un buen día para cavar", + "4": "Terraria Parte 3: El regreso del Guía", + "40": "Terraria: ¿Podrías recavarlo?", + "41": "Terraria: No sabía que... ¡Aaah!", + "42": "Terraria: ¿Qué es esa cosa morada y con pinchos?", + "43": "Terraria: Quiero ser el guía", + "44": "Terraria: Cthulhu está enfadado... ¡y le falta un ojo!", + "45": "Terraria: ¡¡¡LAS ABEJAS, NO!!!", + "46": "Terraria: La leyenda de Maxx", + "47": "Terraria: Culto a Cenx", + "48": "Terraria 2: Electric Boogaloo", + "49": "Terraria: ¡Minecraft también mola!", + "5": "Terraria: Historias de conejos", + "51": "Terraria: ¡Tan solo quiero saber dónde está el oro!", + "52": "Terraria: ¡Ahora con más patos!", + "53": "Terraria: 9 + 1 = 11", + "54": "Terraria: Plantera infinita", + "6": "Terraria: Huesos Jones y el templo de la Luna de Sangre", + "7": "Terraria: Slimeassic Park", + "8": "Terraria: La hierba es más verde por este lado", + "9": "Terraria: Mantenga los bloques pequeños lejos del alcance de niños menores de 5 años", + "55": "Terraria: ¡Cava y calla!" + }, + "Achievements": { + "ARCHAEOLOGIST_Description": "Mata al Doctor Látigo.", + "ARCHAEOLOGIST_Name": "El arqueólogo", + "BALEFUL_HARVEST_Description": "Llega a la oleada 15 de una Luna calabaza, en la que el mal acecha entre la cosecha otoñal.", + "BALEFUL_HARVEST_Name": "Cosecha siniestra", + "BEGONE_EVIL_Description": "Destroza un altar carmesí o demoníaco con un potente martillo sagrado.", + "BEGONE_EVIL_Name": "¡Fuera, demonios!", + "BEHIND_THE_MASK_Description": "Mata al sectario loco, un mago malvado con hechizos muy potentes.", + "BEHIND_THE_MASK_Name": "Tras la máscara", + "BIG_BOOTY_Description": "Desbloquea uno de los grandes cofres misteriosos de la mazmorra con una llave especial.", + "BIG_BOOTY_Name": "Gran botín", + "BLOODBATH_Description": "Sobrevive a una Luna de sangre, un evento nocturno en el que los ríos se vuelven rojos y los monstruos vagan libremente.", + "BLOODBATH_Name": "Baño de sangre", + "BONED_Description": "Derrota a Esqueletrón, el guardián maldito de la mazmorra.", + "BONED_Name": "Huesazo", + "BUCKETS_OF_BOLTS_Description": "Derrota a las tres amenazas mecánicas nocturnas: los Gemelos, el Destructor y Esqueletrón mayor.", + "BUCKETS_OF_BOLTS_Name": "Cubos de tornillos", + "BULLDOZER_Description": "Destruye un total de 10 000 ladrillos.", + "BULLDOZER_Name": "Bulldozer", + "ChallengerCategory": "Aspirante", + "CHAMPION_OF_TERRARIA_Description": "Derrota al Señor de la Luna.", + "CHAMPION_OF_TERRARIA_Name": "Campeón de Terraria", + "CollectorCategory": "Coleccionista", + "Completed": "¡Logro completado! {0}", + "COMPLETELY_AWESOME_Description": "Consigue un minitiburón.", + "COMPLETELY_AWESOME_Name": "Mola un montón", + "DAVY_JONES_LOCKER_Description": "Derrota al Holandés volador, el azote de los cielos.", + "DAVY_JONES_LOCKER_Name": "El cofre de Davy Jones", + "DECEIVER_OF_FOOLS_Description": "Mata a una ninfa.", + "DECEIVER_OF_FOOLS_Name": "Engañabobos", + "DO_YOU_WANT_TO_SLAY_A_SNOWMAN_Description": "Vence a la Legión de escarcha, una familia de muñecos de nieve maníacos.", + "DO_YOU_WANT_TO_SLAY_A_SNOWMAN_Name": "¿Quieres matar a un muñeco de nieve?", + "DRAX_ATTAX_Description": "Crea un taladro hacha o pico hacha usando lingotes sagrados y las almas de los tres jefes mecánicos.", + "DRAX_ATTAX_Name": "Taladrado", + "DUNGEON_HEIST_Description": "Roba una llave a uno de los habitantes no muertos de una mazmorra y abre uno de sus preciados cofres de oro.", + "DUNGEON_HEIST_Name": "Robo en la mazmorra", + "DYE_HARD_Description": "Equipa un tinte en cada una de las ranuras disponibles.", + "DYE_HARD_Name": "Tintorería extrema", + "ExplorerCategory": "Explorador", + "EXTRA_SHINY_Description": "Extrae un mineral potente con el que tu mundo acabe de ser bendecido.", + "EXTRA_SHINY_Name": "¡Cómo brilla!", + "EYE_ON_YOU_Description": "Derrota al Ojo de Cthulhu, una amenaza ocular que solo aparece por la noche.", + "EYE_ON_YOU_Name": "No te quito ojo", + "FASHION_STATEMENT_Description": "Equipa una armadura o un objeto de vanidad en cada una de las tres ranuras sociales.", + "FASHION_STATEMENT_Name": "Compromiso con la moda", + "FAST_AND_FISHIOUS_Description": "Completa tu misión número 50 de Rape.", + "FAST_AND_FISHIOUS_Name": "Pezqueñines sí, gracias", + "FISH_OUT_OF_WATER_Description": "Derrota al duque Fishron, el terror mutante de los mares.", + "FISH_OUT_OF_WATER_Name": "Fuera del agua", + "FREQUENT_FLYER_Description": "Pasa una hora siendo cuidado por la enfermera.", + "FREQUENT_FLYER_Name": "Volador frecuente", + "FUNKYTOWN_Description": "Construye o encuentra un campo de campiñones brillantes sobre la superficie.", + "FUNKYTOWN_Name": "Villapilla", + "GELATIN_WORLD_TOUR_Description": "¡Acaba con todos los tipos de slime!", + "GELATIN_WORLD_TOUR_Name": "Viaje por el mundo de la gelatina", + "GET_A_LIFE_Description": "Consume una fruta de la vida, que se producen en la hierba de la selva subterránea.", + "GET_A_LIFE_Name": "Búscate la vida", + "GLORIOUS_GOLDEN_POLE_Description": "Obtén una caña de pescar dorada.", + "GLORIOUS_GOLDEN_POLE_Name": "Glorioso palo dorado", + "GOBLIN_PUNTER_Description": "Sobrevive a una invasión duende, un regimiento de bárbaros y letales guerreros de orejas puntiagudas y sus hechiceros de Llamas oscuras.", + "GOBLIN_PUNTER_Name": "Pateaduendes", + "GOOD_LITTLE_SLAVE_Description": "Completa tu misión número 10 de Rape.", + "GOOD_LITTLE_SLAVE_Name": "Buen esclavo", + "HEAD_IN_THE_CLOUDS_Description": "Ponte un par de alas.", + "HEAD_IN_THE_CLOUDS_Name": "Con la cabeza en las nubes", + "HEART_BREAKER_Description": "Descubre y aplasta tu primer cristal de corazón subterráneo.", + "HEART_BREAKER_Name": "Rompecorazones", + "HEAVY_METAL_Description": "Consigue un yunque de hierro o plomo.", + "HEAVY_METAL_Name": "Metales pesados", + "HEX_EDUCATION_Description": "Derrota a un invocador duende, de los que conjuran las llamas más oscuras.", + "HEX_EDUCATION_Name": "Erudito en maldiciones", + "HOLD_ON_TIGHT_Description": "Equipa tu primer gancho.", + "HOLD_ON_TIGHT_Name": "¡Agárrate bien!", + "ICE_SCREAM_Description": "Llega a la oleada 15 de una Luna Gélida, donde la temporada festiva acaba convertida en una locura.", + "ICE_SCREAM_Name": "Grito gélido", + "INDEPENDENCE_DAY_Description": "Derrota a una nave nodriza, el eje central de los invasores marcianos.", + "INDEPENDENCE_DAY_Name": "Independence Day", + "INTO_ORBIT_Description": "¡Desde aquí, ya solo puedes bajar!", + "INTO_ORBIT_Name": "En órbita", + "ITS_GETTING_HOT_IN_HERE_Description": "Baja lo suficiente como para llegar al inframundo fundido.", + "ITS_GETTING_HOT_IN_HERE_Name": "La cosa se está calentando", + "ITS_HARD_Description": "Libera en tu mundo a los antiguos espíritus de la luz y la oscuridad, lo cual provocará la aparición de enemigos mucho más fuertes y bañará al mundo de tesoros increíbles (y arcoíris).", + "ITS_HARD_Name": "¡Qué duro!", + "IT_CAN_TALK_Description": "Construye una casa en un biomedio de champiñones y consigue que Trufa se mude.", + "IT_CAN_TALK_Name": "¡¿Puede hablar?!", + "I_AM_LOOT_Description": "Descubre un cofre subterráneo dorado y echa un vistazo a su contenido.", + "I_AM_LOOT_Name": "¡Yo soy botín!", + "JEEPERS_CREEPERS_Description": "Adéntrate en una caverna de arañas subterránea.", + "JEEPERS_CREEPERS_Name": "Qué mal rollo", + "KILL_THE_SUN_Description": "Sobrevive a un eclipse lunar, a un día más oscuro que la noche repleteo de criaturas terroríficas.", + "KILL_THE_SUN_Name": "Mata al sol", + "LIHZAHRDIAN_IDOL_Description": "Derrota al gólem, el ídolo de cara de piedra de la tribu lihzahrd.", + "LIHZAHRDIAN_IDOL_Name": "Ídolo lihzahrd", + "LIKE_A_BOSS_Description": "Consigue un objeto invocajefes.", + "LIKE_A_BOSS_Name": "Eres el jefe", + "LUCKY_BREAK_Description": "Sobrevive a una gran caída quedándote un requicio de vida.", + "LUCKY_BREAK_Name": "Por un pelo", + "MARATHON_MEDALIST_Description": "Recorre 42 kilómetros a pie.", + "MARATHON_MEDALIST_Name": "Medallitas de maratón", + "MASTERMIND_Description": "Derrota al Cerebro de Cthulhu, un gigantesco cerebro demoníaco que acecha en el carmesí.", + "MASTERMIND_Name": "Mente maestra", + "MATCHING_ATTIRE_Description": "Equipa una armadura en las tres ranuras de armadura: cabeza, pecho y pies.", + "MATCHING_ATTIRE_Name": "A juego", + "MECHA_MAYHEM_Description": "Enfréntate a la vez a los Gemelos, al Destructor y a Esqueletrón mayor... y sal victorioso.", + "MECHA_MAYHEM_Name": "Caos mecánico", + "MINER_FOR_FIRE_Description": "Crea un pico fundido usando únicamente materiales muy calientes.", + "MINER_FOR_FIRE_Name": "Minero de fuego", + "NoCategory": "Nada", + "NOT_THE_BEES_Description": "Dispara una pistola de abejas co una armadura de abeja completa.", + "NOT_THE_BEES_Name": "¡¡¡Las abejas, no!!!", + "NO_HOBO_Description": "Construye una casa apta para que se mude tu primer PNJ, como puede ser el guía.", + "NO_HOBO_Name": "Todos con casa", + "OBSESSIVE_DEVOTION_Description": "Derrota al sectario antiguo, líder fanático del aquelarre de la mazmorra.", + "OBSESSIVE_DEVOTION_Name": "Devoción obsesiva", + "OBTAIN_HAMMER_Description": "Obtén tu primer martillo, ya sea por creación o por cualquier otro modo.", + "OBTAIN_HAMMER_Name": "¡Basta! ¡A martillear!", + "OOO_SHINY_Description": "Extrae tu primera pepita de mineral con un pico.", + "OOO_SHINY_Name": "¡Oooh! ¡Cómo brilla!", + "PHOTOSYNTHESIS_Description": "Extrae clorofita, un mineral orgánico que se encuentra en las profundidades de la flora más densa.", + "PHOTOSYNTHESIS_Name": "Fotosíntesis", + "PRETTY_IN_PINK_Description": "Mata al rosa.", + "PRETTY_IN_PINK_Name": "Precioso de rosa", + "PRISMANCER_Description": "Obtén una varita multicolor.", + "PRISMANCER_Name": "Prismante", + "PUMPKIN_SMASHER_Description": "Derrota al Rey calabaza, el terrorífico señor de la Víspera de todos los santos.", + "PUMPKIN_SMASHER_Name": "Aplastacalabazas", + "RAINBOWS_AND_UNICORNS_Description": "Dispara una pistola arcoíris mientras montas en unicornio.", + "RAINBOWS_AND_UNICORNS_Name": "Arcoíris y unicornios", + "REAL_ESTATE_AGENT_Description": "Consigue que todos los posibles PNJ vivan en tu mundo.", + "REAL_ESTATE_AGENT_Name": "Agencia inmobiliaria", + "ROBBING_THE_GRAVE_Description": "Obtén un tesoro raro de un monstruo difícil de una mazmorra.", + "ROBBING_THE_GRAVE_Name": "Robando la tumba", + "ROCK_BOTTOM_Description": "¡Solo se puede subir!", + "ROCK_BOTTOM_Name": "Lo más hondo", + "SERVANT_IN_TRAINING_Description": "Completa tu primera misión de Rape.", + "SERVANT_IN_TRAINING_Name": "Sirviente en prácticas", + "SICK_THROW_Description": "Obtén el terrariano.", + "SICK_THROW_Name": "Mal tiro", + "SlayerCategory": "Cazador", + "SLAYER_OF_WORLDS_Description": "Derrota a todos los jefes de Terraria.", + "SLAYER_OF_WORLDS_Name": "Destructor de mundos", + "SLIPPERY_SHINOBI_Description": "Derrota al rey slime, el señor de todas las cosas pegajosas.", + "SLIPPERY_SHINOBI_Name": "Shinobi escurridizo", + "SMASHING_POPPET_Description": "Usa explosivos o tu fiel martillo para destrozar un orbe sombrío o un corazón carmesí en las partes malvadas del mundo.", + "SMASHING_POPPET_Name": "¡Destrozador!", + "STAR_DESTROYER_Description": "Derrota a las cuatro torres celestiales de la luna.", + "STAR_DESTROYER_Name": "Destructor estelar", + "STAR_POWER_Description": "Crea un cristal de maná hecho de estrellas caídas y consúmelo.", + "STAR_POWER_Name": "Poder estelar", + "STICKY_SITUATION_Description": "Sobrevive a la lluvia de slime, en la que organismos gelatinosos caen de los cielos.", + "STICKY_SITUATION_Name": "Situación pegajosa", + "STILL_HUNGRY_Description": "Derrota al muro carnoso, maestro y núcleo del mundo que surge tras un gran sacrificio ardiente.", + "STILL_HUNGRY_Name": "Todavía tengo hambre", + "STING_OPERATION_Description": "Derrota a la reina abeja, matriarca de las colmenas de la selva.", + "STING_OPERATION_Name": "Operación peliaguda", + "SUPREME_HELPER_MINION_Description": "Completa un total de 200 misiones para Rape.", + "SUPREME_HELPER_MINION_Name": "¡Súbdito supremo!", + "SWORD_OF_THE_HERO_Description": "Obtén una Espada Terra, forjada con las mejores espadas de luz y oscuridad.", + "SWORD_OF_THE_HERO_Name": "Espada de héroe", + "TEMPLE_RAIDER_Description": "Rompe los impenetrables muros del templo de la selva.", + "TEMPLE_RAIDER_Name": "Buscador de templos", + "THERE_ARE_SOME_WHO_CALL_HIM_Description": "Mata a Tim.", + "THERE_ARE_SOME_WHO_CALL_HIM_Name": "Algunos lo llaman...", + "THE_CAVALRY_Description": "Equipa una montura.", + "THE_CAVALRY_Name": "La caballería", + "THE_GREAT_SOUTHERN_PLANTKILL_Description": "Derrota a Plantera, la monstruosidad gigantesca de las profundidades de la jungla.", + "THE_GREAT_SOUTHERN_PLANTKILL_Name": "La gran masacre vegetal", + "THROWING_LINES_Description": "Lanza un yoyó.", + "THROWING_LINES_Name": "Tiralíneas", + "TIL_DEATH_Description": "Mata al novio.", + "TIL_DEATH_Name": "Hasta que la muerte...", + "TIMBER_Description": "Tala tu primer árbol.", + "TIMBER_Name": "¡Madera!", + "TIN_FOIL_HATTER_Description": "Sobrevive a una invasión marciana en la que seres de otro mudno vienen a trastear con vuestros cerebros y a meteros sondas por sitios incómodos.", + "TIN_FOIL_HATTER_Name": "Sombrero de aluminio", + "TOPPED_OFF_Name": "A tope", + "TROUT_MONKEY_Description": "Completa tu misión número 25 de Rape.", + "TROUT_MONKEY_Name": "Amante de la pesca", + "VEHICULAR_MANSLAUGHTER_Description": "Derrota a un enemigo arrollándolo con una vagoneta.", + "VEHICULAR_MANSLAUGHTER_Name": "Masacre vehicular", + "WALK_THE_PLANK_Description": "Sobrevive a una invasión pirata, un grupo de saqueadores de alta mar que vienen a por tu botín... ¡y a por tu vida!", + "WALK_THE_PLANK_Name": "Por la quilla", + "WATCH_YOUR_STEP_Description": "Sé víctima de una horrible trampa subterránea.", + "WATCH_YOUR_STEP_Name": "¡Cuidado con dónde pisas!", + "WHERES_MY_HONEY_Description": "Descubre una gran colmena de abejas en las profundidades de la jungla.", + "WHERES_MY_HONEY_Name": "¿Dónde está mi miel?", + "WINTERHEARTED_Description": "Derrota a la Reina de Hielo, la bruja malvada de las noches más frías.", + "WINTERHEARTED_Name": "Corazón invernal", + "WORM_FODDER_Name": "Comida para gusanos", + "YOU_AND_WHAT_ARMY_Description": "Ten a nueve súbditos invocados a la vez.", + "YOU_AND_WHAT_ARMY_Name": "¿Con qué ejército?", + "YOU_CAN_DO_IT_Description": "Sobrevive a la primera noche completa de tu personaje.", + "YOU_CAN_DO_IT_Name": "¡Puedes hacerlo!" + }, + "CLI": { + "AutomaticPortForward": "¿ (S/N): ", + "AvailableCommands": "Comandos disponibles:", + "BanMessage": "Baneado del servidor.", + "Ban_Command": "ban", + "Ban_Description": "Banea del servidor a un jugador.", + "Ban_Example": "ban ", + "Ban_Usage": "Uso: banear a ", + "ChooseDifficulty": "Elegir dificultad: ", + "ChooseEvil": "Elegir mal del mundo: ", + "ChooseSize": "Elegir tamaño: ", + "ChooseWorld": "Elegir mundo: ", + "Clear_Command": "borrar", + "Clear_Description": "Borrar la ventana de la consola.", + "ClientWasBooted": "Se ha iniciado {0}: {1}", + "Corrupt": "Corrupto", + "Crimson": "Carmesí", + "Dawn_Command": "dawn", + "Dawn_Description": "Cambiar la hora al amanecer.", + "DeleteConfirmation": "¿Seguro que quieres borrar {0}?", + "DeleteWorld_Command": "d", + "DeleteWorld_Description": "Borrar mundo", + "DeleteWorld_Example": "d ", + "Dusk_Command": "dusk", + "Dusk_Description": "Cambiar la hora al atardecer.", + "EnterServerPassword": "Contraseña del servidor (pulsa Intro para no poner ninguna): ", + "EnterWorldName": "Dale un nombre al mundo: ", + "ExitNoSave_Command": "exit-nosave", + "ExitNoSave_Description": "Cerrar el servidor sin guardar.", + "Exit_Command": "exit", + "Exit_Description": "Cerrar el servidor y guardar.", + "FPS_Command": "fps", + "HelpHint": "Escribe \"help\" para ver una lista de comandos.", + "Help_Command": "help", + "Help_Description": "Muestra una lista de comandos.", + "InvalidCommand": "Comando no válido.", + "KickMessage": "Expulsado del servidor.", + "Kick_Command": "kick", + "Kick_Description": "Expulsa del servidor a un jugador.", + "Kick_Example": "kick ", + "Kick_Usage": "Uso: expulsar a ", + "ListeningOnPort": "Escuchando en puerto {0}", + "MaxPlayers_Command": "maxplayers", + "MaxPlayers_Description": "Imprime el número máximo de jugadores.", + "Midnight_Command": "midnight", + "Midnight_Description": "Cambiar la hora a la medianoche.", + "MOTD": "Lema del día: {0}", + "MOTD_Command": "motd", + "MOTD_Description": "Imprimir lema del día.", + "NewWorld_Command": "n", + "NewWorld_Description": "Mundo nuevo", + "No": "No", + "NoMOTD": "¡Te damos la bienvenida a {0}!", + "Noon_Command": "noon", + "Noon_Description": "Cambiar la hora al mediodía.", + "NoPassword": "No se determinó una contraseña.", + "NoPlayers": "No hay jugadores conectados.", + "OnePlayerConnected": "1 jugador conectado.", + "Password": "Contraseña: {0}", + "PasswordDisabled": "Contraseña desactivada", + "PasswordSet": "Contraseña: {0}", + "Password_Command": "password", + "Password_Description": "Mostrar contraseña.", + "PlayerLimit": "Límite de jugadores: {0}", + "PlayersConnected": "{0} jugadores conectados.", + "Playing_Command": "playing", + "Playing_Description": "Muestra la lista de jugadores.", + "Port": "Puerto: {0}", + "Port_Command": "port", + "Port_Description": "Imprime el puerto de escucha.", + "Random": "Aleatorio", + "Save_Command": "save", + "Save_Description": "Guardar el mundo de juego.", + "Say_Command": "say", + "Say_Description": "Enviar un mensaje.", + "Say_Example": "say ", + "Say_Usage": "Uso: say ", + "Server": "Servidor {0} de Terraria", + "ServerMessage": " {0}", + "ServerStarted": "Servidor iniciado", + "SetInitialPort": "Puerto del servidor (pulsa Intro para 7777): ", + "SetMOTD_Command": "motd", + "SetMOTD_Description": "Cambiar lema del día.", + "SetMOTD_Example": "motd ", + "SetPassword_Command": "password", + "SetPassword_Description": "Cambiar contraseña.", + "SetPassword_Example": "password ", + "Settle_Command": "settle", + "Settle_Description": "Asentar el agua.", + "ShortNo": "n", + "ShortYes": "s", + "Time": "Hora: {0}", + "Time_Command": "time", + "Time_Description": "Muestra el tiempo de juego", + "Version_Command": "version", + "Version_Description": "Imprime el número de versión.", + "WaterIsAlreadySettling": "El agua ya está asentada.", + "Yes": "sí", + "DisplaySeed": "Semilla del mundo {0}", + "EnterSeed": "Introduce la semilla (déjalo en blanco para una aleatoria):", + "NoValidSeed": "Este mundo ha sido generado en una versión antigua y no es compatible con las semillas.", + "Seed_Command": "semilla", + "Seed_Description": "Muestra la semilla del mundo." + }, + "Controls": { + "RightClick": "Clic derecho" + }, + "Currency": { + "Copper": "Cobre", + "DefenderMedals": "Medallas del Defensor", + "Gold": "Oro", + "Platinum": "Platino", + "Silver": "Plata" + }, + "Enemies": { + "MoonLord": "Señor de la Luna", + "TheTwins": "Los Gemelos" + }, + "Error": { + "BadHeaderBufferOverflow": "Un mal titular dio lugar a una sobrecarga del búfer.", + "DataSentAfterConnectionLost": "Se han enviado datos a un cliente tras perder la conexión.", + "Error": "Error", + "ExceptionNormal": " Excepción normal: {0}", + "LaunchFromSteam": "Inicia el juego desde tu cliente de Steam.", + "LoadFailed": "¡Error al cargar!", + "LoadFailedNoBackup": "¡Error al cargar! No se ha encontrado copia de seguridad.", + "NetMessageError": "Error en el mensaje {0}", + "ServerCrash": "Caída del servidor: {0}\n{1}\nEnvía el archivo crashlog.txt a support@terraria.org", + "TriedToRunServerTwice": "Se han intentado ejecutar dos servidores en el mismo PC", + "UnableToCapture": "No se ha podido capturar.", + "UnableToLoadWorld": "No se ha podido cargar el mundo:", + "UnableToWritePreferences": "No se ha podido escribir el archivo de: {0}", + "InvalidLobbyFlag": "Bandera -lobby empleada sin \"{0}\" o \"{1}\". Ignorándola." + }, + "Game": { + "Actuators": "Actuador", + "BallBounceResult": "¡{0} ha sido golpeado {1} veces antes de caer al suelo!", + "BedObstructed": "La cama está obstruida.", + "BlueWires": "Cables azules", + "DroppedCoins": "ha dejado {0}", + "EnemiesDefeatedAnnouncement": "¡Se ha derrtado al {0}º {1}!", + "EnemiesDefeatedByAnnouncement": "¡{0} ha derrotado al {1}º {2}!", + "FinalWave": "Oleada final", + "FirstWave": "Primera oleada", + "GreenWires": "Cables verdes", + "HasTeleportedTo": "{0} se ha teletransportado a {1}", + "HouseChair": "una silla", + "HouseDoor": "una puerta", + "HouseLightSource": "una fuente de luz", + "HouseMissing_1": "A la casa le falta: {0}.", + "HouseMissing_2": "A la casa le falta: {0} y {1}.", + "HouseMissing_3": "A la casa le falta: {0}, {1} y {2}.", + "HouseMissing_4": "A la casa le falta: {0}, {1}, {2} y {3}.", + "HouseTable": "una mesa", + "InvasionPoints": "{0} puntos", + "InvasionWave_Type1": "{0}: {1}", + "InvasionWave_Type2": "{0}: {1} y {2}", + "InvasionWave_Type3": "{0}: {1}, {2} y {3}", + "InvasionWave_Type4": "{0}: {1}, {2}, {3} y {4}", + "InvasionWave_Type5": "{0}: {1}, {2}, {3}, {4} y {5}", + "InvasionWave_Type6": "{0}: {1}, {2}, {3}, {4}, {5} y {6}", + "InvasionWave_Type7": "{0}: {1}, {2}, {3}, {4}, {5}, {6} y {7}", + "InvasionWave_Type8": "{0}: {1}, {2}, {3}, {4}, {5}, {6}, {7} y {8}", + "JoinGreeting": "Jugadores actuales: {0}.", + "NPCTitle": "{0} el {1}", + "PlayerDeathTime": "{0} murió hace {1}", + "PvPFlag": "(JcJ)", + "RedWires": "Cables rojos", + "SpawnPointRemoved": "¡Punto de resurreción eliminado!", + "SpawnPointSet": "¡Punto de resurreción establecido!", + "TeleportTo": "Teletransportarse a {0}", + "Time": "Hora: {0}", + "Wave": "Oleada: {0}", + "WaveCleared": "Completado: {0}", + "WaveMessage": "Oleada {0}: {1}", + "YellowWires": "Cables amarillos", + "BirthdayParty_1": "Parece que {0} está celebrando una fiesta.", + "BirthdayParty_2": "Parece que {0} y {1} están celebrando una fiesta.", + "BirthdayParty_3": "Parece que {0}, {1} y {2} están celebrando una fiesta.", + "RespawnInPrefix": "", + "RespawnInSuffix": "{0}" + }, + "GameUI": { + "ActuationDeviceOff": "Dispositivo de actuación desactivado", + "ActuationDeviceOn": "Dispositivo de actuación activado", + "BaitPower": "{0}% potencia de cebo", + "BaitRequired": "Se necesita un cebo para pescar.", + "Bright": "Brillo", + "Buy": "Comprar", + "BuyWithValue": "Comprar ({0})", + "Cancel": "Cancelar", + "Change": "Cambiar", + "Clear": "Borrar", + "Cloudy": "Nublado", + "CompassCenter": "Centro", + "CompassEast": "{0}' Este", + "CompassWest": "{0}' Oeste", + "DepthLevel": "Nivel", + "DPS": "{0} daño por segundo", + "EnemiesNearby": "¡{0} enemigos cerca!", + "Expert": "Experto", + "Faded": "Difuminado", + "FirstQuarter": "Primer cuarto", + "FishingPower": "{0} de poder de pesca", + "FishingWarning": "¡Aviso!", + "FullFishingPower": "{0} ({1}%) de poder de pesca", + "FullMoon": "Luna llena", + "HairStyle": "Estilo de peinado", + "HeatDistortion": "Distorsión por calor: {0}", + "HeavyRain": "Lluvia fuerte", + "LayerCaverns": "Cavernas", + "LayerSurface": "Superficie", + "LayerUnderground": "Subsuelo", + "LayerUnderworld": "Inframundo", + "LightRain": "Lluvia suave", + "MechanicalRulerOff": "Regla mecánica desactivada", + "MechanicalRulerOn": "Regla mecánica activada", + "MostlyCloudy": "Mayormente nublado", + "NoDPS": "ND", + "NoEnemiesNearby": "No hay enemigos cerca", + "NoKillCount": "Contador de muertes no disponible", + "NoRareCreatures": "No hay criaturas raras cerca", + "NotEnoughWater": "¡No hay suficiente agua!", + "NoTreasureNearby": "No hay tesoros cerca", + "OneEnemyNearby": "¡1 enemigo cerca!", + "OreDetected": "¡Se ha detectado cerca: {0}!", + "Overcast": "Cubierto", + "PaintSprayerOff": "Sin spray de pintura", + "PaintSprayerOn": "Con spray de pintura", + "PartlyCloudy": "Parcialmente nublado", + "PlayerDistance": "({0} pies)", + "RulerOff": "Regla no", + "RulerOn": "Regla sí", + "SettingsMenu": "Menú de ajustes", + "OpenFileFolder": "{$LegacyInterface.110}", + "StormEffects": "Efectos de tormenta: {0}", + "ThirdQuarter": "Tercer cuarto", + "WaningCrescent": "Cuarto menguante", + "WaningGibbous": "Luna menguante", + "WaxingCrescent": "Cuarto creciente", + "WaxingGibbous": "Luna creciente", + "WestWind": " ({0} mph O)", + "WireModeForced": "Pantalla mecánica: Forzada", + "WireModeNormal": "Pantalla mecánica: Normal", + "Depth": "{0}'", + "Disabled": "Desactivado", + "EastWind": " ({0} mph E)", + "Enabled": "Activado", + "Hidden": "Oculto", + "LayerSpace": "Barra espaciadora", + "NewMoon": "New Moon", + "Normal": "Normal", + "PrecentFishingPower": "{0}% de poder de pesca", + "Rain": "Lluvia", + "Speed": "{0} mph", + "Gameplay": "Sistema de juego", + "GameZoom": "Zoom: {0}% ({1}%)", + "LightingUpdateEveryFrameOff": "Sin iluminación rápida", + "LightingUpdateEveryFrameOn": "Con iluminación rápida", + "Misc": "Misc.", + "QualityHigh": "Alta", + "QualityLow": "Baja", + "QualityMedium": "Media", + "QualityOff": "No", + "UIScale": "Tamaño IU: {0}% ({1}%)", + "WaveQuality": "Calidad de las oleadas: {0}", + "ZoomCategory": "Zoom" + }, + "Misc": { + "ForceWaterSettling": "Obligando al agua a asentarse.", + "ResolutionChanged": "Resolución cambiada a: {0}x{1}.", + "ShortDays": "d", + "ShortHours": "h", + "ShortMinutes": "m", + "ShortSeconds": "s", + "WaterSettled": "El agua se ha asentado." + }, + "Net": { + "CheatingInvalid": "Se ha detectado un intento de hacer trampas: Expulsión no válida", + "CheatingLiquidSpam": "Se ha detectado un intento de hacer trampas: Spam líquido", + "CheatingProjectileSpam": "Se ha detectado un intento de hacer trampas: Spam de proyectil", + "CheatingTileRemovalSpam": "Se ha detectado un intento de hacer trampas: Spam de ladrillo eliminado", + "CheatingTileSpam": "Se ha detectado un intento de hacer trampas: Spam de añadir ladrillo", + "ClientConnecting": "{0} se está conectando...", + "ClientPlaying": "({0}) {1} está jugando", + "ClientRequestedWorldInfo": "({0}) {1} ha pedido información del mundo", + "ClientsConnected": "{0} clientes conectados", + "ClientSendingData": "({0}) {1} está enviando datos de jugador...", + "ClientStatusComplete": "({0}) {1} {2}: ¡Completado!", + "ConnectingTo": "Conectándose a {0}", + "EmptyName": "Nombre vacío.", + "FoundServer": "Se ha encontrado un servidor", + "IsReceivingTileData": "está recibiendo datos de ladrillos", + "LostConnection": "Se ha perdido la conexión", + "NameTooLong": "El nombre es demasiado largo", + "RequestingTileData": "Obteniendo información de ladrillos", + "RequestingWorldInformation": "Obteniendo información del mundo", + "SendingPlayerData": "Enviando datos de jugador...", + "ServerAutoShutdown": "El jugador local se ha ido Se va a iniciar el cierre automático", + "StatusComplete": "{0}: ¡Completado!", + "WaitingForClients": "Esperando clientes..." + }, + "Social": { + "Joining": "Uniéndose...", + "JoiningFriend": "Uniéndose a {0}...", + "StatusInGame": "Jugando en línea", + "StatusJoining": "Uniéndose a la partida" + }, + "UI": { + "Achievements": "Logros", + "Back": "Atrás", + "Cancel": "Cancelar", + "Delete": "Eliminar", + "Effects": "Efectos", + "EnterButton": "Aceptar", + "EnterMessage": "Escribir mensaje:", + "EnterNewName": "Escribir nuevo nombre:", + "Expert": "Experto", + "ExpertDescription": "(Dificultad mucho más elevada y mejores botines)", + "ExpertDescriptionFlavor": "Fortuna y gloria, chico.", + "Favorite": "Favorito", + "Hardcore": "Extremo", + "Keybindings": "Asignación de teclas", + "Mediumcore": "Núcleo medio", + "More": "más", + "MoveOffCloud": "Sacar de la nube", + "MoveToCloud": "Subir a la nube", + "New": "Nuevo", + "Normal": "Normal", + "LightMode_White": "{$LegacyMenu.56}", + "LightMode_Color": "{$LegacyMenu.55}", + "Play": "Jugar", + "RestoreButton": "Restablecer", + "Save": "Guardar", + "SelectPlayer": "Seleccionar jugador", + "SelectWorld": "Seleccionar mundo", + "Softcore": "Suave", + "SpaceButton": "Barra espaciadora", + "Submit": "Enviar", + "Unfavorite": "Quitar de favoritos", + "WorldCreatedFormat": "Creación: {0}", + "WorldSizeFormat": "Mundo {0}", + "WorldSizeLarge": "Grande", + "WorldSizeMedium": "Mediano", + "WorldSizeSmall": "Pequeño", + "WorldSizeUnknown": "Desconocido", + "BartenderHelp": "Cristal eternia", + "CopySeed": "Copiar semilla: {0}", + "EnterSeed": "Introduce la semilla (déjalo en blanco para una aleatoria)", + "LoadingCode": "Cargando:", + "SeedCopied": "Semilla copiada", + "ZoomIn": "{$LegacyMenu.168}", + "ZoomOut": "{$LegacyMenu.169}", + "Ellipsis": "...", + "LightMode_Retro": "{$LegacyMenu.57}", + "LightMode_Trippy": "{$LegacyMenu.58}", + "PlayerEmptyName": "{$Net.EmptyName}" + }, + "DeathSource": { + "NPC": "{0} por {1}.", + "Player": "{0} por {2} de {1}.", + "Projectile": "{0} por {1}." + }, + "DeathText": { + "Burned": "{0} no pudo extinguir el fuego.", + "Default": "{0}.", + "Drowned_1": "{0} se olvidó de respirar.", + "Drowned_2": "{0} está durmiendo con los peces.", + "Drowned_3": "{0} se ha ahogado.", + "Drowned_4": "{0} es comida para tiburones.", + "Electrocuted": "{0} no pudo contener los vatios.", + "Fell_1": "{0} ha caído en las garras de la muerte.", + "Fell_2": "{0} no saltó.", + "Lava_1": "{0} se ha derretido.", + "Lava_2": "{0} se ha incinerado.", + "Lava_3": "{0} ha intentado nadar en la lava.", + "Lava_4": "{0} disfruta jugando en el magma.", + "Petrified_1": "{0} ha sido troceado.", + "Petrified_3": "{0} va a tener que salir de aquí en un contenedor.", + "Petrified_4": "{0} se ha visto reducido a un montón de basura.", + "Poisoned": "{0} no logró encontrar el antídoto..", + "Slain": "{0} ha sido asesinado...", + "Stabbed": "{0} ha sido apuñalado.", + "Suffocated": "{0} no puedo respirar.", + "Teleport_1": "{0} no se ha materializado.", + "Teleport_2_Female": "{0} vio cómo sus piernas aparecían en donde antes tenía la cabeza.", + "Teleport_2_Male": "{0} vio cómo sus piernas aparecían en donde antes tenía la cabeza.", + "TriedToEscape": "{0} intentó escapar.", + "WasLicked": "{0} sufrió un lametazo." + }, + "DeathTextGeneric": { + "ArmTornOff": "{0} ha visto cómo le arrancaban los brazos.", + "Chopped": "{0} ha sido triturado.", + "Cut": "{0} ha visto cómo lo partían por la mitad.", + "Decapitated": "{0} ha sido decapitado.", + "Destroyed": "{0} ha sido destruido.", + "Dissected": "{0} ha sido diseccionado.", + "EntrailsRippedOut": "{0} ha visto cómo le arrancaban las entrañas.", + "Eviscerated": "{0} ha sido destripado.", + "ExtremitiesDetached": "{0} ha visto cómo le arrancaban las extremidades.", + "FaceTornOff": "{0} ha visto cómo le arrancaban la cara.", + "Flailing": "{0} ha visto cómo ponían fin a sus andanzas.", + "HeadRemoved": "{0} ha visto cómo le arrancaban la cabeza.", + "Impaled": "{0} ha sido empalado.", + "InnardsBecameOutards": "{0} ha visto cómo le sacaban las entrañas.", + "Mangled": "{0} ha visto cómo le destrozaban el cuerpo.", + "Massacred": "{0} ha sido masacrado.", + "Murdered": "{0} ha sido asesinado.", + "PileOfFlesh": "{0} se ha visto reducido a una montaña de carne.", + "Plead": "{0} ha visto cómo se cumplía su deseo de morir.", + "Removed": "{0} ha sido eliminado de {1}.", + "Ripped": "{0} ha visto cómo le arrancaban la carne de los huesos.", + "Ruptured": "{0} ha visto cómo le destrozaban los órganos.", + "SkullCrushed": "{0} ha visto cómo le destrozaban el cráneo.", + "Slain": "{0} ha sido asesinado.", + "Snapped": "{0} ha sido partido por la mitad.", + "TornInHalf": "{0} ha visto cómo lo partían en dos." + }, + "DungeonDefenders2": { + "BartenderWarning": "El cristal eternia rechaza esta zona y desaparece al instante. El tabernero dijo que debería encontrarse en una gran zona abierta...", + "CantSummonTower": "No parece que funcione sin un cristal eternia cerca...", + "InvasionProgressTitle": "Ejército del Antiguo", + "InvasionStart": "¡Se aproxima el ejército del Antiguo!", + "InvasionWin": "¡El ejército del Antiguo ha sido derrotado!", + "WaveComplete": "¡Oleada completada!" + }, + "Key": { + "DOWN": "ABAJO", + "UP": "UP" + }, + "Language": { + "English": "English (Inglés)", + "German": "Deutsch (Alemán)", + "Italian": "Italiano (Italiano)", + "French": "Français (Francés)", + "Spanish": "Español", + "Russian": "Русский (Ruso)", + "Chinese": "简体中文 (Chino simplificado)", + "Portuguese": "Português brasileiro (Portugués de Brasil)", + "Polish": "Polski (Polaco)" + }, + "RandomWorldName_Composition": { + "6": "{Adjective} {Location}" + } +} \ No newline at end of file diff --git a/Localization/Content/es-ES/Game.json b/Localization/Content/es-ES/Game.json new file mode 100644 index 0000000..07c3f78 --- /dev/null +++ b/Localization/Content/es-ES/Game.json @@ -0,0 +1,780 @@ +{ + "Announcement": { + "HasBeenDefeated_Plural": "{0} han sufrido una derrota.", + "HasBeenDefeated_Single": "{0} ha sufrido una derrota.", + "HasAwoken": "{0} ha despertado.", + "HasArrived": "{0} ha llegado." + }, + "ArmorSetBonus": { + "MetalTier1": "2 defensa", + "MetalTier2": "3 defensa", + "CobaltRanged": "Probabilidad del 20% de no gastar munición", + "MythrilCaster": "Reduce el uso de maná en un 17%", + "MythrilMelee": "Aumenta un 5% la probabilidad de ataque crítico en el cuerpo a cuerpo", + "MythrilRanged": "Probabilidad del 20% de no gastar munición", + "AdamantiteCaster": "Reduce el uso de maná en un 19%", + "AdamantiteMelee": "Aumenta en un 18% la velocidad de movimiento y del cuerpo a cuerpo", + "AdamantiteRanged": "Probabilidad del 25% de no gastar munición", + "ShadowScale": "Aumenta en un 15% la velocidad de movimiento", + "Wood": "1 defensa", + "Crimson": "Mejora mucho la regeneración de vida", + "Frost": "Los ataques cuerpo a cuerpo y a distancia producen quemaduras gélidas", + "Tiki": "Aumenta el máximo de súbditos que puedes tener", + "Palladium": "Mejora mucho la regeneración de vida tras golpear a un enemigo", + "Orichalcum": "Caerán pétalos sobre el objetivo para infligir daño extra", + "Titanium": "Te vuelves inmune tras golpear a un enemigo", + "Chlorophyte": "Invoca una poderosa hoja de cristal que se lanza a los enemigos cercanos", + "Wizard": "Aumenta un 10% la probabilidad de impacto mágico crítico", + "Meteor": "La pistola espacial no cuesta maná", + "SpectreHealing": "El daño mágico infligido a los enemigos curará al jugador con menos vida", + "Shroomite": "Si no te mueves entrarás en sigilo,\ncon lo que aumentará tu habilidad de ataque a distancia y se reducirá la posibilidad de que te ataquen los enemigos", + "Platinum": "4 defensa", + "Pumpkin": "Aumenta un 10% el daño", + "Spooky": "Aumenta un 25% el daño de los súbditos", + "SpectreDamage": "El daño mágico infligido hará daño extra a los enemigos cercanos", + "MagicHat": "Aumenta el maná máximo en 60", + "BeetleDefense": "Los escarabajos te protegen del daño", + "BeetleDamage": "Los escarabajos aumentan la velocidad y el daño cuerpo a cuerpo", + "Bee": "Aumenta un 10% el daño de los súbditos", + "Spider": "Aumenta un 12% el daño de los súbditos", + "Vortex": "Pulsa dos veces {0} para entrar en sigilo o dejarlo,\ncon lo que aumentas tu habilidad a distancia y reduces la probabilidad de que los enemigos te ataquen, aunque se reduce tu velocidad de movimiento", + "Stardust": "Pulsa dos veces {0} para enviar a tu guardián hacia una posición", + "Forbidden": "Pulsa dos veces {0} para invocar una antigua tormenta en la posición del cursor", + "Jungle": "Reduce el uso de maná en un 16%", + "Molten": "Aumenta en un 17% el daño cuerpo a cuerpo", + "Mining": "Aumenta en un 30% la velocidad de excavación", + "CobaltCaster": "Reduce el uso de maná en un 14%", + "CobaltMelee": "Aumenta un 15% la velocidad del cuerpo a cuerpo", + "ApprenticeTier2": "Aumenta el número máximo de centinelas\nAumentan drásticamente el campo de visión y el alcance de las Explosiones de llamas", + "ApprenticeTier3": "Aumenta el número máximo de centinelas\nAumenta notablemente la efectividad de las Explosiones de llamas", + "HuntressTier2": "Aumenta el número máximo de centinelas\nLas trampas explosivas se recargan más rápido y bañan de aceite a los enemigos\nPrende fuego a los enemigos bañados en aceite para infligirles daño extra", + "HuntressTier3": "Aumenta el número máximo de centinelas\nAumenta notablemente la efectividad de las trampas explosivas", + "MonkTier2": "Aumenta el número máximo de centinelas\nAhora, Aura de rayo puede infligir golpes críticos y atacar más rápido", + "MonkTier3": "Aumenta el número máximo de centinelas\nAumenta notablemente la efectividad de Aura de rayo", + "SquireTier2": "Aumenta el número máximo de centinelas\nLa balista perfora a más objetivos y asusta si sufres daños", + "SquireTier3": "Aumenta el número máximo de centinelas\nAumenta notablemente la efectividad de las balistas" + }, + "BuffDescription": { + "AmmoBox": "Probabilidad del 20% de no gastar munición", + "AmmoReservation": "Probabilidad del 20% de no gastar munición", + "Archery": "Aumenta en un 20% la velocidad y el daño de las flechas", + "BabyDinosaur": "Te está siguiendo un bebé dinosaurio", + "BabyEater": "Te está siguiendo un bebé comealmas", + "BabyFaceMonster": "Te está siguiendo un bebé caramonstruo", + "BabyGrinch": "Te está siguiendo un pequeño Grinch", + "BabyHornet": "Piensa que eres su madre", + "BabyPenguin": "Creo que quiere una zanahoria", + "BabySkeletronHead": "No preguntes…", + "BabySlime": "El slime bebé luchará por ti", + "BabySnowman": "Te está siguiendo un muñeco de nieve bebé", + "BabyTruffle": "¿A que es adoraaable?", + "BallistaPanic": "¡Tus balistas disparan más rápido al estar asustadas!", + "BasiliskMount": "Destrózalo todo... ¡y a todos!", + "Battle": "Aumenta la velocidad de regeneración del enemigo", + "BeeMount": "BzzzBzzBZZZZBzzz", + "BeetleEndurance1": "El daño sufrido se reduce en un 15%", + "BeetleEndurance2": "El daño sufrido se reduce en un 30%", + "BeetleEndurance3": "El daño sufrido se reduce en un 45%", + "BeetleMight1": "El daño cuerpo a cuerpo y la velocidad aumentan un 10%", + "BeetleMight2": "El daño cuerpo a cuerpo y la velocidad aumentan un 20%", + "BeetleMight3": "El daño cuerpo a cuerpo y la velocidad aumentan un 30%", + "BetsysCurse": "Se reduce la defensa", + "Bewitched": "Aumenta el máximo de súbditos que puedes tener", + "BlackCat": "Te está siguiendo una gata negra", + "Blackout": "La visión se ve reducida ligeramente", + "Bleeding": "No se puede recuperar vida", + "BoneJavelin": "Desangrándose", + "BrokenArmor": "La defensa disminuye hasta la mitad", + "Builder": "Aumenta el alcance y la velocidad de colocación", + "BunnyMount": "Tienes ganas de zanahorias", + "Burning": "Pierdes vida y se ralentizan tus movimientos", + "DesertMinecartRight": "{$BuffDescription.MinecartRight}", + "Campfire": "La regeneración de vida ha aumentado un poco", + "ChaosState": "Usar la Varita de la discordia consume vida", + "Chilled": "Se ha reducido tu velocidad de movimiento", + "Clairvoyance": "Aumenta los poderes mágicos", + "CompanionCube": "Nunca amenazará con apuñalarte porque no puede hablar", + "Confused": "Invierte los movimientos", + "Crate": "Más posibilidades de pescar una caja", + "CrimsonHeart": "Corazón mágico que proporciona luz", + "Cursed": "No se puede usar ningún objeto", + "CursedInferno": "Te succiona hacia la Boca", + "CursedSapling": "Te está siguiendo un retoño maldito", + "CuteFishronMount": "No permitas que se arrastre", + "Dangersense": "Puedes ver los peligros cercanos", + "Darkness": "Disminuye la claridad", + "Daybreak": "Incinerado por los rayos del sol", + "Dazed": "El movimiento se ralentiza notablemente", + "DeadlySphere": "La esfera letal luchará por ti", + "DrillMount": "A lomos de un taladro volador", + "DryadsWard": "El poder de la naturaleza te protege", + "DryadsWardDebuff": "El poder de la naturaleza te empuja", + "Electrified": "No puedes moverte", + "Endurance": "Se reduce el daño un 10%", + "EyeballSpring": "Te está siguiendo un ojo saltarín", + "FairyBlue": "Un hada te acompaña", + "FairyGreen": "Un hada te acompaña", + "FairyRed": "Un hada te acompaña", + "Featherfall": "Pulsa ARRIBA o ABAJO para controlar la velocidad de descenso", + "DesertMinecartLeft": "{$BuffDescription.MinecartLeft}", + "Flipper": "Te mueves en el agua de forma normal", + "Frostburn": "El 25% del daño sufrido se desviará a otro jugador O está muy caliente o está muy frío… lo que está claro es que DUELE", + "Frozen": "¡No te puedes mover!", + "Gills": "Permite respirar agua en vez de aire", + "Gravitation": "Pulsa ARRIBA para invertir la gravedad", + "HeartLamp": "Aumenta la regeneración de vida", + "Heartreach": "Aumenta el alcance de recolección de corazones", + "Honey": "Ha aumentado la regeneración de vida", + "HornetMinion": "El avispón luchará por ti", + "Horrified": "Has visto algo horrible...", + "Hunter": "Muestra la ubicación de los enemigos", + "IceBarrier": "El daño sufrido se reduce en un 25%", + "Ichor": "Defensa reducida", + "ImpMinion": "El diablillo luchará por ti", + "Inferno": "Se prende fuego a los enemigos cercanos", + "Invisibility": "Proporciona invisibilidad", + "Ironskin": "Aumenta la defensa en 8", + "LeafCrystal": "Dispara hojas de cristal a los enemigos cercanos", + "Lifeforce": "Aumenta un 20% la vida máxima", + "Lovestruck": "¡Estás enamorado!", + "MagicLantern": "Una linterna encantada te ilumina el camino", + "MagicPower": "Aumenta el daño de los ataques mágicos en un 20%", + "ManaRegeneration": "Aumenta la regeneración de maná", + "ManaSickness": "El daño mágico se reduce en un ", + "Merfolk": "Respira y se mueve bajo el agua con facilidad", + "Midas": "Dejas más dinero al morir", + "MinecartLeft": "Montado en una vagoneta", + "MinecartLeftMech": "Montado en una vagoneta", + "MinecartLeftWood": "Montado en una vagoneta", + "MinecartRight": "Montado en una vagoneta", + "MinecartRightMech": "Montado en una vagoneta", + "MinecartRightWood": "Montado en una vagoneta", + "MiniMinotaur": "¿Cómo se derrota a un pequeño minotauro?", + "Mining": "Aumenta en un 25% la velocidad de excavación", + "MonsterBanner": "Aumenta el daño y la defensa de los siguientes:", + "MoonLeech": "No puedes absorber efectos curativos", + "NebulaUpDmg1": "Aumenta un 15% el daño", + "NebulaUpDmg2": "Aumenta un 30% el daño", + "NebulaUpDmg3": "Aumenta un 45% el daño", + "NebulaUpLife1": "Aumenta la regeneración de vida", + "NebulaUpLife2": "Aumenta la regeneración de vida", + "NebulaUpLife3": "Aumenta la regeneración de vida", + "NebulaUpMana1": "Aumenta la regeneración de maná", + "NebulaUpMana2": "Aumenta la regeneración de maná", + "NebulaUpMana3": "Aumenta la regeneración de maná", + "NightOwl": "Mejora la visión nocturna", + "NoBuilding": "¡Has perdido el poder de la creación!", + "ObsidianSkin": "Inmune a la lava", + "Obstructed": "¡No puedes ver!", + "OgreSpit": "El movimiento se reduce de forma significativa", + "Oiled": "Más daño por estar en llamas", + "OnFire": "La vida se va perdiendo lentamente", + "PaladinsShield": "Un 25% del daño sufrido será redirigido a otro jugador", + "Panic": "Ha aumentado la velocidad de movimiento", + "ParryDamageBuff": "Un 500% más de daño en el próximo ataque cuerpo a cuerpo", + "PeaceCandle": "Se reduce el ritmo de aparición de los monstruos", + "PetBunny": "Creo que quiere tu zanahoria", + "PetDD2Dragon": "Te está siguiendo un hordragón", + "PetDD2Gato": "Te está siguiendo un gatocóptero", + "PetDD2Ghost": "Te está siguiendo un espirillama", + "PetLizard": "Se pasa la vida arrastrado", + "FishMinecartRight": "{$BuffDescription.MinecartRight}", + "PetSapling": "Te está siguiendo un pequeño retoño", + "PetSpider": "Te está siguiendo una araña", + "PetTurtle": "¡Feliz hora de las tortugas!", + "PigronMount": "Ahora me ves...", + "PirateMinion": "El pirata luchará por ti", + "Poisoned": "La vida se va perdiendo lentamente", + "PotionSickness": "Impide seguir consumiendo objetos curativos", + "Puppy": "Te está siguiendo un cachorrito", + "Pygmies": "Los pigmeos lucharán por ti", + "Rabies": "Aumenta el daño, reduce la regeneración de vida y provoca estados alterados", + "Rage": "10% de probabilidad de impacto crítico", + "RapidHealing": "La regeneración de vida ha aumentado mucho", + "Ravens": "Los cuervos atacarán a tus enemigos", + "Regeneration": "Regenera la vida", + "Rudolph": "A lomos del reno de la nariz roja", + "ScutlixMount": "Pam, pam", + "ShadowDodge": "Esquivarás el próximo ataque", + "ShadowFlame": "Perdiendo vida", + "ShadowOrb": "Orbe mágico que proporciona luz", + "SharknadoMinion": "El tornado de tiburones luchará por ti", + "Sharpened": "Las armas cuerpo a cuerpo tienen penetración de armadura", + "Shine": "Emite luz", + "Silenced": "No puede utilizar los artículos que requieren maná", + "Slimed": "Estás pegajoso y pringoso", + "SlimeMount": "¡BOOOIIING!", + "Slow": "Disminuye la velocidad de movimiento", + "SolarShield1": "Se reduce un 30% el daño sufrido y repele a los enemigos al sufrir daños", + "SolarShield2": "Se reduce un 30% el daño sufrido y repele a los enemigos al sufrir daños", + "SolarShield3": "Se reduce un 30% el daño sufrido y repele a los enemigos al sufrir daños", + "Sonar": "Puedes ver lo que ha mordido el anzuelo", + "SoulDrain": "Aumenta la regeneración de vida", + "Spelunker": "Muestra la ubicación de tesoros y minerales", + "SpiderMinion": "La araña luchará por ti", + "Squashling": "Te está siguiendo un calabacín", + "StardustDragonMinion": "El dragón de polvo estelar te protegerá", + "StardustGuardianMinion": "El guardián de polvo estelar te protegerá", + "StardustMinion": "La célula de polvo estelar luchará por ti", + "StardustMinionBleed": "siendo pasto de las células", + "StarInBottle": "Aumenta la regeneración de maná", + "Stinky": "Hueles fatal", + "Stoned": "¡Estás completamente petrificado!", + "Suffocation": "Perdiendo vida", + "Summoning": "Aumenta el máximo de súbditos que puedes tener", + "Sunflower": "Aumenta la velocidad de movimiento y se reduce la generación de monstruos", + "SuspiciousTentacle": "Un ojo de aspecto sospechoso que te ilumina", + "Swiftness": "Aumenta en un 25% la velocidad de movimiento", + "TheTongue": "Te están succionando hacia la boca", + "Thorns": "Los atacantes también sufren daños", + "TikiSpirit": "Un espíritu amistoso te está siguiendo", + "Tipsy": "Mejora el ataque cuerpo a cuerpo, pero reduce la defensa", + "Titan": "Aumenta el retroceso", + "TurtleMount": "Va despacio por tierra, pero acelera en el agua", + "TwinEyesMinion": "Los gemelos lucharán por ti", + "UFOMinion": "El OVNI luchará por ti", + "UFOMount": "Menos mal que tenías un MAC", + "UnicornMount": "Carga... ¡con estilo!", + "Venom": "Perdiendo vida", + "VortexDebuff": "Se distorsiona la gravedad a tu alrededor", + "Warmth": "Se reduce el daño de las fuentes de frío", + "WaterCandle": "Aumenta el ritmo de aparición de los monstruos", + "WaterWalking": "Pulsa ABAJO para sumergirte", + "Weak": "Disminuye la capacidad física", + "WeaponImbueConfetti": "Los ataques cuerpo a cuerpo provocan la aparición de confeti", + "WeaponImbueCursedFlames": "Los ataques cuerpo a cuerpo infligen llamas malditas a los enemigos", + "WeaponImbueFire": "Los ataques cuerpo a cuerpo prenden fuego a los enemigos", + "WeaponImbueGold": "Los ataques cuerpo a cuerpo hacen que los enemigos dejen más oro", + "WeaponImbueIchor": "Los ataques cuerpo a cuerpo reducen la defensa de los enemigos", + "WeaponImbueNanites": "Los ataques cuerpo a cuerpo confunden a los enemigos", + "WeaponImbuePoison": "Los ataques cuerpo a cuerpo envenenan a los enemigos", + "WeaponImbueVenom": "Los ataques cuerpo a cuerpo infligen Ponzoña a los objetivos", + "Webbed": "Te has atascado", + "FishMinecartLeft": "{$BuffDescription.MinecartLeft}", + "Werewolf": "Aumenta la capacidad física", + "Wet": "Estás chorreando", + "WindPushed": "¡El viento te mueve como si nada!", + "Wisp": "Te está siguiendo una voluta", + "WitheredArmor": "¡Se reduce tu armadura!", + "WitheredWeapon": "¡Tus ataques son más débiles!", + "Wrath": "Aumenta un 10% el daño", + "ZephyrFish": "Le gusta nadar a tu alrededor", + "BeeMinecartRight": "{$BuffDescription.MinecartRight}", + "BeeMinecartLeft": "{$BuffDescription.MinecartLeft}", + "LadybugMinecartRight": "{$BuffDescription.MinecartRight}", + "LadybugMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PigronMinecartRight": "{$BuffDescription.MinecartRight}", + "PigronMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SunflowerMinecartRight": "{$BuffDescription.MinecartRight}", + "SunflowerMinecartLeft": "{$BuffDescription.MinecartLeft}", + "HellMinecartRight": "{$BuffDescription.MinecartRight}", + "HellMinecartLeft": "{$BuffDescription.MinecartLeft}", + "ShroomMinecartRight": "{$BuffDescription.MinecartRight}", + "ShroomMinecartLeft": "{$BuffDescription.MinecartLeft}", + "AmethystMinecartRight": "{$BuffDescription.MinecartRight}", + "AmethystMinecartLeft": "{$BuffDescription.MinecartLeft}", + "TopazMinecartRight": "{$BuffDescription.MinecartRight}", + "TopazMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SapphireMinecartRight": "{$BuffDescription.MinecartRight}", + "SapphireMinecartLeft": "{$BuffDescription.MinecartLeft}", + "EmeraldMinecartRight": "{$BuffDescription.MinecartRight}", + "EmeraldMinecartLeft": "{$BuffDescription.MinecartLeft}", + "RubyMinecartRight": "{$BuffDescription.MinecartRight}", + "RubyMinecartLeft": "{$BuffDescription.MinecartLeft}", + "DiamondMinecartRight": "{$BuffDescription.MinecartRight}", + "DiamondMinecartLeft": "{$BuffDescription.MinecartLeft}", + "AmberMinecartRight": "{$BuffDescription.MinecartRight}", + "AmberMinecartLeft": "{$BuffDescription.MinecartLeft}", + "BeetleMinecartRight": "{$BuffDescription.MinecartRight}", + "BeetleMinecartLeft": "{$BuffDescription.MinecartLeft}", + "MeowmereMinecartRight": "{$BuffDescription.MinecartRight}", + "MeowmereMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PartyMinecartRight": "{$BuffDescription.MinecartRight}", + "PartyMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PirateMinecartRight": "{$BuffDescription.MinecartRight}", + "PirateMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SteampunkMinecartRight": "{$BuffDescription.MinecartRight}", + "SteampunkMinecartLeft": "{$BuffDescription.MinecartLeft}", + "CoffinMinecartRight": "{$BuffDescription.MinecartRight}", + "CoffinMinecartLeft": "{$BuffDescription.MinecartLeft}" + }, + "BuffName": { + "AmmoBox": "Caja de munición", + "AmmoReservation": "Reserva de munición", + "Archery": "Tiro con arco", + "BabyDinosaur": "Dinosaurio bebé", + "BabyEater": "Comealmas bebé", + "BabyFaceMonster": "Caramonstruo bebé", + "BabyGrinch": "Grinch bebé", + "BabyHornet": "Avispón bebé", + "BabyPenguin": "Pingüino bebé", + "BabySkeletronHead": "Cabeza de esqueletrón bebé", + "BabySlime": "Slime bebé", + "BabySnowman": "Muñeco de nieve bebé", + "BabyTruffle": "Trufa bebé", + "BallistaPanic": "¡Pánico balistil!", + "BasiliskMount": "Montura en basilisco", + "Battle": "Batalla", + "BeeMount": "Montura en abeja", + "BeetleEndurance1": "Resistencia de escarabajo", + "BeetleEndurance2": "Resistencia de escarabajo", + "BeetleEndurance3": "Resistencia de escarabajo", + "BeetleMight1": "Fuerza de escarabajo", + "BeetleMight2": "Fuerza de escarabajo", + "BeetleMight3": "Fuerza de escarabajo", + "BetsysCurse": "Maldición de Besty", + "Bewitched": "Embrujado", + "BlackCat": "Gato negro", + "Blackout": "Apagón", + "Bleeding": "Hemorragia", + "BoneJavelin": "Perforado", + "BrokenArmor": "Armadura rota", + "Builder": "Constructor", + "BunnyMount": "Montura en conejo", + "Burning": "Ardiendo", + "Calm": "Calmado", + "Campfire": "Fuego agradable", + "ChaosState": "Estado de caos", + "Chilled": "Helado", + "Clairvoyance": "Clarividencia", + "CompanionCube": "Cubo de compañía", + "Confused": "Confusión", + "Crate": "Caja", + "CrimsonHeart": "Corazón carmesí", + "Cursed": "Maldición", + "CursedInferno": "El Averno", + "CursedSapling": "Retoño maldito", + "CuteFishronMount": "Adorable montura de Fishron", + "Dangersense": "Sentido del peligro", + "Darkness": "Oscuridad", + "Daybreak": "Amanecer", + "Dazed": "Aturdido", + "DeadlySphere": "Esfera letal", + "DrillMount": "Montura en taladro", + "DryadsWard": "Bendición de la dríada", + "DryadsWardDebuff": "Maldición de la dríada", + "Electrified": "Electrificado", + "Endurance": "Resistencia", + "EyeballSpring": "Ojo saltarín", + "FairyBlue": "Hada", + "FairyGreen": "Hada", + "FairyRed": "Hada", + "Featherfall": "Caída de pluma", + "Fishing": "Pescando", + "Flipper": "Aletas", + "Frostburn": "Quemadura de hielo", + "Frozen": "Congelado", + "Gills": "Agallas", + "Gravitation": "Gravedad", + "HeartLamp": "Lámpara del corazón", + "Heartreach": "Alcanzacorazón", + "Honey": "Miel", + "HornetMinion": "Avispón", + "Horrified": "Terror", + "Hunter": "Cazador", + "IceBarrier": "Barrera de hielo", + "Ichor": "Icor", + "ImpMinion": "Diablillo", + "Inferno": "Infierno", + "Invisibility": "Invisibilidad", + "Ironskin": "Piel de hierro", + "LeafCrystal": "Hoja de cristal", + "Lifeforce": "Fuerza vital", + "Lovestruck": "Enamorado", + "MagicLantern": "Linterna mágica", + "MagicPower": "Poder mágico", + "ManaRegeneration": "Regeneración de maná", + "ManaSickness": "Locura de maná", + "Merfolk": "Tritón", + "Midas": "Midas", + "MinecartLeft": "Vagoneta", + "MinecartLeftMech": "Vagoneta", + "MinecartLeftWood": "Vagoneta", + "MinecartRight": "Vagoneta", + "MinecartRightMech": "Vagoneta", + "MinecartRightWood": "Vagoneta", + "MiniMinotaur": "Pequeño minotauro", + "Mining": "Minería", + "MonsterBanner": "Estandarte", + "MoonLeech": "Mordisco lunar", + "NebulaUpDmg1": "Nebulosa dañina", + "NebulaUpDmg2": "Nebulosa dañina", + "NebulaUpDmg3": "Nebulosa dañina", + "NebulaUpLife1": "Nebulosa vital", + "NebulaUpLife2": "Nebulosa vital", + "NebulaUpLife3": "Nebulosa vital", + "NebulaUpMana1": "Nebulosa de maná", + "NebulaUpMana2": "Nebulosa de maná", + "NebulaUpMana3": "Nebulosa de maná", + "NightOwl": "Noctámbulo", + "NoBuilding": "Impacto creativo", + "ObsidianSkin": "Piel de obsidiana", + "Obstructed": "Obstruido", + "OgreSpit": "Pringado", + "Oiled": "Embadurnado", + "OnFire": "¡En llamas!", + "PaladinsShield": "Escudo de paladín", + "Panic": "¡Pánico!", + "ParryDamageBuff": "Momento impactante", + "PeaceCandle": "Vela de paz", + "PetBunny": "Conejo mascota", + "PetDD2Dragon": "Hordragón", + "PetDD2Gato": "Gatocóptero", + "PetDD2Ghost": "Espirillama", + "PetLizard": "Lagarto mascota", + "PetParrot": "Loro mascota", + "PetSapling": "Retoño mascota", + "PetSpider": "Araña mascota", + "PetTurtle": "Tortuga mascota", + "PigronMount": "Montura de cerdidragón", + "PirateMinion": "Pirata", + "Poisoned": "Envenenado", + "PotionSickness": "Enfermedad de poción", + "Puppy": "Cachorrito", + "Pygmies": "Pigmeos", + "Rabies": "Mordisco feroz", + "Rage": "Furia", + "RapidHealing": "Curación rápida", + "Ravens": "Cuervos", + "Regeneration": "Regeneración", + "Rudolph": "Rudolph", + "ScutlixMount": "Montura de scutlix", + "DesertMinecartRight": "{$BuffName.MinecartRight}", + "ShadowFlame": "Llama oscura", + "ShadowOrb": "Orbe sombrío", + "SharknadoMinion": "Tornado de tiburones", + "Sharpened": "Afilado", + "Shine": "Brillo", + "Silenced": "Silencio", + "Slimed": "Slime", + "SlimeMount": "Montura de slime", + "Slow": "Lento", + "SolarShield1": "Llamarada solar", + "SolarShield2": "Llamarada solar", + "SolarShield3": "Llamarada solar", + "Sonar": "Sonar", + "SoulDrain": "Absorción de vida", + "Spelunker": "Espeleólogo", + "SpiderMinion": "Araña", + "Squashling": "Calabacín", + "StardustDragonMinion": "Dragón de polvo estelar", + "StardustGuardianMinion": "Guardián de polvo estelar", + "StardustMinion": "Célula de polvo estelar", + "StardustMinionBleed": "Celulado", + "StarInBottle": "Estrella embotellada", + "Stinky": "Apestoso", + "Stoned": "De piedra", + "Suffocation": "Ahogo", + "Summoning": "Invocando", + "Sunflower": "¡Feliz!", + "SuspiciousTentacle": "Ojo de aspecto sospechoso", + "Swiftness": "Rapidez", + "TheTongue": "La Lengua", + "Thorns": "Espinas", + "TikiSpirit": "Espíritu tiki", + "Tipsy": "Beodo", + "Titan": "Titán", + "TurtleMount": "Montura de tortuga", + "TwinEyesMinion": "Gemelos", + "UFOMinion": "OVNI", + "UFOMount": "Montura en OVNI", + "UnicornMount": "Montura en unicornio", + "Venom": "Ponzoña", + "VortexDebuff": "Distorsionado", + "Warmth": "Calor", + "WaterCandle": "Vela de agua", + "WaterWalking": "Flotación", + "Weak": "Débil", + "WeaponImbueConfetti": "Arma imbuida: Confeti", + "WeaponImbueCursedFlames": "Arma imbuida: Llamas malditas", + "WeaponImbueFire": "Arma imbuida: Llamas", + "WeaponImbueGold": "Arma imbuida: Oro", + "WeaponImbueIchor": "Arma imbuida: Icor", + "WeaponImbueNanites": "Arma imbuida: Nanitos", + "WeaponImbuePoison": "Arma imbuida: Veneno", + "WeaponImbueVenom": "Arma imbuida: Ponzoña", + "Webbed": "Enteralañado", + "WellFed": "Bien alimentado", + "Werewolf": "Hombre lobo", + "Wet": "Húmedo", + "WindPushed": "Viento fuerte", + "Wisp": "Voluta", + "WitheredArmor": "Armadura marchita", + "WitheredWeapon": "Arma marchita", + "Wrath": "Ira", + "ZephyrFish": "Pez de zafiro", + "DesertMinecartLeft": "{$BuffName.MinecartLeft}", + "FishMinecartRight": "{$BuffName.MinecartRight}", + "FishMinecartLeft": "{$BuffName.MinecartLeft}", + "BeeMinecartRight": "{$BuffName.MinecartRight}", + "BeeMinecartLeft": "{$BuffName.MinecartLeft}", + "LadybugMinecartRight": "{$BuffName.MinecartRight}", + "LadybugMinecartLeft": "{$BuffName.MinecartLeft}", + "PigronMinecartRight": "{$BuffName.MinecartRight}", + "PigronMinecartLeft": "{$BuffName.MinecartLeft}", + "SunflowerMinecartRight": "{$BuffName.MinecartRight}", + "SunflowerMinecartLeft": "{$BuffName.MinecartLeft}", + "HellMinecartRight": "{$BuffName.MinecartRight}", + "HellMinecartLeft": "{$BuffName.MinecartLeft}", + "ShroomMinecartRight": "{$BuffName.MinecartRight}", + "ShroomMinecartLeft": "{$BuffName.MinecartLeft}", + "AmethystMinecartRight": "{$BuffName.MinecartRight}", + "AmethystMinecartLeft": "{$BuffName.MinecartLeft}", + "TopazMinecartRight": "{$BuffName.MinecartRight}", + "TopazMinecartLeft": "{$BuffName.MinecartLeft}", + "SapphireMinecartRight": "{$BuffName.MinecartRight}", + "SapphireMinecartLeft": "{$BuffName.MinecartLeft}", + "EmeraldMinecartRight": "{$BuffName.MinecartRight}", + "EmeraldMinecartLeft": "{$BuffName.MinecartLeft}", + "RubyMinecartRight": "{$BuffName.MinecartRight}", + "RubyMinecartLeft": "{$BuffName.MinecartLeft}", + "DiamondMinecartRight": "{$BuffName.MinecartRight}", + "DiamondMinecartLeft": "{$BuffName.MinecartLeft}", + "AmberMinecartRight": "{$BuffName.MinecartRight}", + "AmberMinecartLeft": "{$BuffName.MinecartLeft}", + "BeetleMinecartRight": "{$BuffName.MinecartRight}", + "BeetleMinecartLeft": "{$BuffName.MinecartLeft}", + "MeowmereMinecartRight": "{$BuffName.MinecartRight}", + "MeowmereMinecartLeft": "{$BuffName.MinecartLeft}", + "PartyMinecartRight": "{$BuffName.MinecartRight}", + "PartyMinecartLeft": "{$BuffName.MinecartLeft}", + "PirateMinecartRight": "{$BuffName.MinecartRight}", + "PirateMinecartLeft": "{$BuffName.MinecartLeft}", + "SteampunkMinecartRight": "{$BuffName.MinecartRight}", + "SteampunkMinecartLeft": "{$BuffName.MinecartLeft}", + "CoffinMinecartRight": "{$BuffName.MinecartRight}", + "CoffinMinecartLeft": "{$BuffName.MinecartLeft}" + }, + "MapObject": { + "Adamantite": "Adamantita", + "AnimalSkin": "Piel de animal", + "Anvil": "Yunque", + "Banner": "Estandarte", + "BeeHive": "Colmena de abejas", + "Chair": "Silla", + "Chandelier": "Lámpara araña", + "Chlorophyte": "Clorofita", + "ChristmasLight": "Luz navideña", + "Cobalt": "Cobalto", + "Copper": "Cobre", + "CrimsonAltar": "Altar carmesí", + "Crimtane": "Carmesí", + "DemonAltar": "Altar demoníaco", + "Demonite": "Endemoniado", + "Door": "Puerta", + "DrippingHoney": "Miel goteando", + "DrippingLava": "Lava goteando", + "DrippingWater": "Agua goteando", + "FloorLamp": "Lámpara de suelo", + "Fossil": "Fósil", + "GiantMushroom": "Champiñón gigante", + "Gold": "Oro", + "Iron": "Hierro", + "ItemRack": "Repisa de objetos", + "Lantern": "Linterna", + "Larva": "Larva", + "Lead": "Plomo", + "LivingWood": "Madera viviente", + "MetalBar": "Barra metálica", + "Mythril": "Mithril", + "OrangeSquirrelCage": "Jaula de ardilla naranja", + "Orichalcum": "Oricalco", + "Painting": "Cuadro", + "Palladium": "Paladio", + "PalmTree": "Palmera", + "Picture": "Foto", + "PineTree": "Pino", + "PlanterasBulb": "Bulbo de Plantera", + "Platinum": "Platino", + "Pot": "Maceta", + "Rocket": "Cohete", + "SandFlow": "Fluir de arena", + "Sapling": "Retoño", + "SiltExtractinator": "Extractinador de limo", + "Silver": "Plata", + "Sink": "Fregadero", + "Statue": "Estatua", + "Table": "Mesa", + "Thorn": "Espina", + "Thorns": "Espinas", + "Timer": "Temporizador", + "Tin": "Aluminio", + "Titanium": "Titanio", + "Trap": "Trampa", + "Tree": "Árbol", + "Trophy": "Trofeo", + "Tungsten": "Tungsteno", + "Turret": "Torreta", + "Vase": "Jarrón", + "WaterFountain": "Fuente de agua", + "Web": "Telaraña" + }, + "ChatCommand": { + "Playing_0": "{$LegacyMultiplayer.6}", + "Playing_1": "{$LegacyMultiplayer.21}", + "Roll": "{$LegacyMultiplayer.8}", + "Party": "/p", + "Emote": "/me" + }, + "Bestiary_ItemDropConditions": { + "NotExpert": "", + "NotMasterMode": "", + "LegacyHack_IsBossAndNotExpert": "", + "IsCrimsonAndNotExpert": "", + "IsCorruptionAndNotExpert": "", + "NotFromStatue": "" + }, + "Bestiary_FlavorText": { + "npc_JungleSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_YellowSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_RedSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_PurpleSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_BlackSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_GreenSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_BlueSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_DemonEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_Zombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_Skeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_AngryBones": "{$CommonBestiaryFlavor.AngryBones}", + "npc_Hornet": "{$CommonBestiaryFlavor.Hornet}", + "npc_Hellbat": "{$CommonBestiaryFlavor.LavaBat}", + "npc_BlueJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_PinkJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_Mummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_DarkMummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_LightMummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_Mimic": "{$CommonBestiaryFlavor.Mimic}", + "npc_GreenJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_BaldZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_WanderingEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_Penguin": "{$CommonBestiaryFlavor.Penguin}", + "npc_PenguinBlack": "{$CommonBestiaryFlavor.Penguin}", + "npc_Lavabat": "{$CommonBestiaryFlavor.LavaBat}", + "npc_PigronCorruption": "{$CommonBestiaryFlavor.Pigron}", + "npc_PigronHallow": "{$CommonBestiaryFlavor.Pigron}", + "npc_PigronCrimson": "{$CommonBestiaryFlavor.Pigron}", + "npc_PincushionZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_SwampZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_TwiggyZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_CataractEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_SleepyEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_DialatedEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_GreenEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_PurpleEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_FemaleZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_HeadacheSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_MisassembledSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_PantlessSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_HornetFatty": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetHoney": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetLeafy": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetSpikey": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetStingy": "{$CommonBestiaryFlavor.Hornet}", + "npc_ZombieMushroom": "{$CommonBestiaryFlavor.MushroomZombie}", + "npc_ZombieMushroomHat": "{$CommonBestiaryFlavor.MushroomZombie}", + "npc_FungiBulb": "{$CommonBestiaryFlavor.FungiBulb}", + "npc_GiantFungiBulb": "{$CommonBestiaryFlavor.FungiBulb}", + "npc_RustyArmoredBonesAxe": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesFlail": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesSword": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesSwordNoArmor": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_BlueArmoredBones": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesMace": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesNoPants": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesSword": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_HellArmoredBones": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesSpikeShield": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesMace": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesSword": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_RaggedCaster": "{$CommonBestiaryFlavor.RaggedCaster}", + "npc_RaggedCasterOpenCoat": "{$CommonBestiaryFlavor.RaggedCaster}", + "npc_Necromancer": "{$CommonBestiaryFlavor.Necromancer}", + "npc_NecromancerArmored": "{$CommonBestiaryFlavor.Necromancer}", + "npc_DiabolistRed": "{$CommonBestiaryFlavor.Diabolist}", + "npc_DiabolistWhite": "{$CommonBestiaryFlavor.Diabolist}", + "npc_AngryBonesBig": "{$CommonBestiaryFlavor.AngryBones}", + "npc_AngryBonesBigMuscle": "{$CommonBestiaryFlavor.AngryBones}", + "npc_AngryBonesBigHelmet": "{$CommonBestiaryFlavor.AngryBones}", + "npc_Scarecrow1": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow2": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow3": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow4": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow5": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow6": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow7": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow8": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow9": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow10": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_DemonEyeOwl": "{$CommonBestiaryFlavor.CostumeDemonEye}", + "npc_DemonEyeSpaceship": "{$CommonBestiaryFlavor.CostumeDemonEye}", + "npc_ZombieDoctor": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_ZombieSuperman": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_ZombiePixie": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_SkeletonTopHat": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_SkeletonAstonaut": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_SkeletonAlien": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_ZombieXmas": "{$CommonBestiaryFlavor.ZombieXmas}", + "npc_ZombieSweater": "{$CommonBestiaryFlavor.ZombieXmas}", + "npc_SlimeRibbonWhite": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonYellow": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonGreen": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonRed": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_ZombieElf": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ZombieElfBeard": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ZombieElfGirl": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ArmedZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombiePincushion": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieSwamp": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieTwiggy": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieCenx": "{$CommonBestiaryFlavor.Zombie}", + "npc_GoldBird": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldBunny": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldButterfly": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldFrog": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldGrasshopper": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldMouse": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldWorm": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_BoneThrowingSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton2": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton3": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton4": "{$CommonBestiaryFlavor.Skeleton}", + "npc_GiantWalkingAntlion": "{$CommonBestiaryFlavor.AntlionCharger}", + "npc_GiantFlyingAntlion": "{$CommonBestiaryFlavor.AntlionSwarmer}", + "npc_DesertLamiaLight": "{$CommonBestiaryFlavor.Lamia}", + "npc_DesertLamiaDark": "{$CommonBestiaryFlavor.Lamia}", + "npc_SquirrelGold": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_SandShark": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkCorrupt": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkCrimson": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkHallow": "{$CommonBestiaryFlavor.Sandshark}", + "npc_WalkingAntlion": "{$CommonBestiaryFlavor.AntlionCharger}", + "npc_FlyingAntlion": "{$CommonBestiaryFlavor.AntlionSwarmer}", + "npc_GoldGoldfish": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldGoldfishWalker": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_BlackDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_BlueDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_GreenDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_OrangeDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_RedDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_YellowDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_GoldDragonfly": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldLadyBug": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldWaterStrider": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldSeahorse": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_IceMimic": "{$CommonBestiaryFlavor.Mimic}", + "npc_GemSquirrelAmethyst": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelTopaz": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelSapphire": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelEmerald": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelRuby": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelDiamond": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelAmber": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemBunnyAmethyst": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyTopaz": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnySapphire": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyEmerald": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyRuby": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyDiamond": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyAmber": "{$CommonBestiaryFlavor.GemBunny}" + } +} \ No newline at end of file diff --git a/Localization/Content/es-ES/Items.json b/Localization/Content/es-ES/Items.json new file mode 100644 index 0000000..c8b72a5 --- /dev/null +++ b/Localization/Content/es-ES/Items.json @@ -0,0 +1,5511 @@ +{ + "PaintingArtist": { + "Crowno": "'V. Costa Moura'", + "Garner": "'W. Garner'", + "Moosdijk": "'R. Moosdijk'", + "Lazure": "'J. Hayes'", + "Myhre": "'J. T. Myhre'", + "Burczyk": "'C. Burczyk'", + "Craig": "'A. Craig'", + "Kolf": "'A. G. Kolf'", + "Wright": "'K. Wright'", + "Phelps": "'D. Phelps'", + "Duncan": "'M. J. Duncan'", + "Ness": "'C. J. Ness'" + }, + "Prefix": { + "Dull": "(Romo)", + "Unhappy": "(Infeliz)", + "Bulky": "(Voluminoso)", + "Shameful": "(Vergonzoso)", + "Heavy": "(Pesado)", + "Light": "(Ligero)", + "Sighted": "(Perspicaz)", + "Rapid": "(Rápido)", + "Hasty": "(Precipitado)", + "Intimidating": "(Intimidante)", + "Large": "(Grande)", + "Deadly": "(Letal)", + "Staunch": "(Firme)", + "Awful": "(Atroz)", + "Lethargic": "(Letárgico)", + "Awkward": "(Torpe)", + "Powerful": "(Poderoso)", + "Mystic": "(Místico)", + "Adept": "(Experto)", + "Masterful": "(Maestro)", + "Inept": "(Inepto)", + "Massive": "(Enorme)", + "Ignorant": "(Ignorante)", + "Deranged": "(Trastornado)", + "Intense": "(Intenso)", + "Taboo": "(Prohibido)", + "Celestial": "(Celeste)", + "Furious": "(Furioso)", + "Keen": "(Incisivo)", + "Superior": "(Superior)", + "Forceful": "(Fuerte)", + "Broken": "(Roto)", + "Dangerous": "(Peligroso)", + "Damaged": "(Estropeado)", + "Shoddy": "(Chapucero)", + "Quick": "(Veloz)", + "Deadly2": "(Letal)", + "Agile": "(Ágil)", + "Nimble": "(Listo)", + "Murderous": "(Asesino)", + "Slow": "(Lento)", + "Sluggish": "(Perezoso)", + "Lazy": "(Gandul)", + "Savage": "(Salvaje)", + "Annoying": "(Molesto)", + "Nasty": "(Feo)", + "Manic": "(Maníaco)", + "Hurtful": "(Hiriente)", + "Strong": "(Vigoroso)", + "Unpleasant": "(Desagradable)", + "Weak": "(Débil)", + "Ruthless": "(Despiadado)", + "Frenzying": "(Frenético)", + "Godly": "(Piadoso)", + "Sharp": "(Afilado)", + "Demonic": "(Demoníaco)", + "Zealous": "(Fanático)", + "Hard": "(Duro)", + "Guarding": "(Protector)", + "Armored": "(Blindado)", + "Warding": "(Defensivo)", + "Arcane": "(Arcano)", + "Precise": "(Preciso)", + "Lucky": "(Afortunado)", + "Jagged": "(Dentado)", + "Pointy": "(Puntiagudo)", + "Spiked": "(Claveteado)", + "Angry": "(Enojado)", + "Menacing": "(Amenazante)", + "Brisk": "(Enérgico)", + "Fleeting": "(Fugaz)", + "Hasty2": "(Precipitado)", + "Quick2": "(Veloz)", + "Wild": "(Salvaje)", + "Rash": "(Temerario)", + "Intrepid": "(Intrépido)", + "Tiny": "(Diminuto)", + "Violent": "(Violento)", + "Legendary": "(Legendario)", + "Unreal": "(Irreal)", + "Mythical": "(Mítico)", + "Terrible": "(Malo)", + "Small": "(Pequeño)" + }, + "ItemName": { + "IronPickaxe": "Pico de hierro", + "IronAxe": "Hacha de hierro", + "ShadowGreaves": "Grebas de las sombras", + "ConfettiGun": "Pistola de confeti", + "ChlorophyteMask": "Máscara de clorofita", + "ChlorophyteHelmet": "Casco de clorofita", + "ChlorophyteHeadgear": "Tocado de clorofita", + "ChlorophytePlateMail": "Cota de placas de clorofita", + "ChlorophyteGreaves": "Grebas de clorofita", + "ChlorophyteBar": "Lingote de clorofita", + "RedDye": "Tinte rojo", + "OrangeDye": "Tinte naranja", + "YellowDye": "Tinte amarillo", + "ShadowScalemail": "Cota de escamas de las sombras", + "LimeDye": "Tinte verde lima", + "GreenDye": "Tinte verde", + "TealDye": "Tinte verde azulado", + "CyanDye": "Tinte turquesa", + "SkyBlueDye": "Tinte azul celeste", + "BlueDye": "Tinte azul", + "PurpleDye": "Tinte morado", + "VioletDye": "Tinte violeta", + "PinkDye": "Tinte rosa", + "RedandBlackDye": "Tinte rojo y negro", + "ShadowHelmet": "Casco de las sombras", + "OrangeandBlackDye": "Tinte naranja y negro", + "YellowandBlackDye": "Tinte amarillo y negro", + "LimeandBlackDye": "Tinte verde lima y negro", + "GreenandBlackDye": "Tinte verde y negro", + "TealandBlackDye": "Tinte verde azulado y negro", + "CyanandBlackDye": "Tinte turquesa y negro", + "SkyBlueandBlackDye": "Tinte azul celeste y negro", + "BlueandBlackDye": "Tinte azul y negro", + "PurpleandBlackDye": "Tinte morado y negro", + "VioletandBlackDye": "Tinte violeta y negro", + "NightmarePickaxe": "Pico de pesadilla", + "PinkandBlackDye": "Tinte rosa y negro", + "FlameDye": "Tinte flamígero", + "FlameAndBlackDye": "Tinte flamígero y negro", + "GreenFlameDye": "Tinte flamígero verde", + "GreenFlameAndBlackDye": "Tinte flamígero verde y negro", + "BlueFlameDye": "Tinte flamígero azul", + "BlueFlameAndBlackDye": "Tinte flamígero azul y negro", + "SilverDye": "Tinte plateado", + "BrightRedDye": "Tinte rojo brillante", + "BrightOrangeDye": "Tinte naranja brillante", + "TheBreaker": "La Despedazadora", + "BrightYellowDye": "Tinte amarillo brillante", + "BrightLimeDye": "Tinte verde lima brillante", + "BrightGreenDye": "Tinte verde brillante", + "BrightTealDye": "Tinte verde azulado brillante", + "BrightCyanDye": "Tinte turquesa brillante", + "BrightSkyBlueDye": "Tinte azul celeste brillante", + "BrightBlueDye": "Tinte azul brillante", + "BrightPurpleDye": "Tinte morado brillante", + "BrightVioletDye": "Tinte violeta brillante", + "BrightPinkDye": "Tinte rosa brillante", + "Candle": "Vela", + "BlackDye": "Tinte negro", + "RedandSilverDye": "Tinte rojo y plateado", + "OrangeandSilverDye": "Tinte naranja y plateado", + "YellowandSilverDye": "Tinte amarillo y plateado", + "LimeandSilverDye": "Tinte verde lima y plateado", + "GreenandSilverDye": "Tinte verde y plateado", + "TealandSilverDye": "Tinte verde azulado y plateado", + "CyanandSilverDye": "Tinte turquesa y plateado", + "SkyBlueandSilverDye": "Tinte azul celeste y plateado", + "BlueandSilverDye": "Tinte azul y plateado", + "CopperChandelier": "Lámpara araña de cobre", + "PurpleandSilverDye": "Tinte morado y plateado", + "VioletandSilverDye": "Tinte violeta y plateado", + "PinkandSilverDye": "Tinte rosa y plateado", + "IntenseFlameDye": "Tinte flamígero intenso", + "IntenseGreenFlameDye": "Tinte flamígero verde intenso", + "IntenseBlueFlameDye": "Tinte flamígero azul intenso", + "RainbowDye": "Tinte multicolor", + "IntenseRainbowDye": "Tinte multicolor intenso", + "YellowGradientDye": "Tinte amarillo degradado", + "CyanGradientDye": "Tinte turquesa degradado", + "SilverChandelier": "Lámpara araña de plata", + "VioletGradientDye": "Tinte violeta degradado", + "Paintbrush": "Pincel", + "PaintRoller": "Rodillo", + "RedPaint": "Pintura roja", + "OrangePaint": "Pintura naranja", + "YellowPaint": "Pintura amarilla", + "LimePaint": "Pintura verde lima", + "GreenPaint": "Pintura verde", + "TealPaint": "Pintura verde azulado", + "CyanPaint": "Pintura turquesa", + "GoldChandelier": "Lámpara araña de oro", + "SkyBluePaint": "Pintura azul celeste", + "BluePaint": "Pintura azul", + "PurplePaint": "Pintura morada", + "VioletPaint": "Pintura violeta", + "PinkPaint": "Pintura rosa", + "DeepRedPaint": "Pintura rojo fuerte", + "DeepOrangePaint": "Pintura naranja fuerte", + "DeepYellowPaint": "Pintura amarilla fuerte", + "DeepLimePaint": "Pintura verde lima fuerte", + "DeepGreenPaint": "Pintura verde fuerte", + "ManaCrystal": "Cristal de maná", + "DeepTealPaint": "Pintura verde azulado fuerte", + "DeepCyanPaint": "Pintura turquesa verde", + "DeepSkyBluePaint": "Pintura azul celeste fuerte", + "DeepBluePaint": "Pintura azul fuerte", + "DeepPurplePaint": "Pintura morado fuerte", + "DeepVioletPaint": "Pintura violeta fuerte", + "DeepPinkPaint": "Pintura rosa fuerte", + "BlackPaint": "Pintura negra", + "WhitePaint": "Pintura blanca", + "GrayPaint": "Pintura gris", + "IronOre": "Mineral de hierro", + "LesserManaPotion": "Poción menor de maná", + "PaintScraper": "Rasqueta", + "LihzahrdBrick": "Ladrillo de lihzahrd", + "LihzahrdBrickWall": "Pared de ladrillo de lihzahrd", + "SlushBlock": "Bloque de aguanieve", + "PalladiumOre": "Mineral de paladio", + "OrichalcumOre": "Mineral de oricalco", + "TitaniumOre": "Mineral de titanio", + "TealMushroom": "Champiñón verde azulado", + "GreenMushroom": "Champiñón verde", + "SkyBlueFlower": "Flor azul celeste", + "BandofStarpower": "Banda de polvo de estrellas", + "YellowMarigold": "Caléndula amarilla", + "BlueBerries": "Bayas azules", + "LimeKelp": "Alga verde lima", + "PinkPricklyPear": "Pera espinosa rosa", + "OrangeBloodroot": "Sanguinaria naranja", + "RedHusk": "Caparazón rojo", + "CyanHusk": "Caparazón turquesa", + "VioletHusk": "Caparazón morado", + "BlackInk": "Tinta negra", + "FlowerofFire": "Flor de fuego", + "DyeVat": "Tubo para tinte", + "BeeGun": "Pistola de abejas", + "PossessedHatchet": "Hacha de mano poseída", + "BeeKeeper": "Apicultora", + "Hive": "Colmena", + "HoneyBlock": "Bloque de miel", + "HiveWall": "Pared de colmena", + "CrispyHoneyBlock": "Bloque de miel tostado", + "HoneyBucket": "Cubo de miel", + "HiveWand": "Vara colmenera", + "MagicMissile": "Proyectil mágico", + "Beenade": "Granabeja", + "GravityGlobe": "Globo gravitacional", + "HoneyComb": "Panal", + "Abeemination": "Abejaminación", + "BottledHoney": "Miel embotellada", + "RainHat": "Gorro para la lluvia", + "RainCoat": "Chubasquero", + "LihzahrdDoor": "Puerta de lihzahrd", + "DungeonDoor": "Puerta de mazmorra", + "LeadDoor": "Puerta principal", + "DirtRod": "Varita de tierra", + "IronDoor": "Puerta de hierro", + "TempleKey": "Llave del templo", + "LihzahrdChest": "Cofre de lihzahrd", + "LihzahrdChair": "Silla de lihzahrd", + "LihzahrdTable": "Mesa de lihzahrd", + "LihzahrdWorkBench": "Banco de trabajo de lihzahrd", + "SuperDartTrap": "Súper trampa de dardos", + "FlameTrap": "Trampa flamígera", + "SpikyBallTrap": "Trampa de bola espinosa", + "SpearTrap": "Trampa de lanzas", + "ShadowOrb": "Orbe sombrío", + "WoodenSpike": "Púa de madera", + "LihzahrdPressurePlate": "Placa de presión de lihzahrd", + "LihzahrdStatue": "Estatua de lihzahrd", + "LihzahrdWatcherStatue": "Estatua de vigilante lihzahrd", + "LihzahrdGuardianStatue": "Estatua de guardián lihzahrd", + "WaspGun": "Pistola de avispas", + "PiranhaGun": "Pistola de pirañas", + "PygmyStaff": "Báculo pigmeo", + "PygmyNecklace": "Collar pigmeo", + "TikiMask": "Máscara tiki", + "Meteorite": "Meteorito", + "TikiShirt": "Camisa tiki", + "TikiPants": "Pantalones tiki", + "LeafWings": "Alas de hoja", + "BlizzardinaBalloon": "Ventisca en globo", + "BundleofBalloons": "Puñado de globos", + "BatWings": "Alas de murciélago", + "BoneSword": "Espada de hueso", + "HerculesBeetle": "Escarabajo Hércules", + "SmokeBomb": "Bomba de humo", + "BoneKey": "Llave de hueso", + "MeteoriteBar": "Lingote de meteorito", + "Nectar": "Néctar", + "TikiTotem": "Tótem tiki", + "LizardEgg": "Huevo de lagarto", + "GraveMarker": "Lápida", + "CrossGraveMarker": "Lápida en forma de cruz", + "Headstone": "Lápida mortuoria", + "Gravestone": "Lápida sepulcral", + "Obelisk": "Obelisco", + "LeafBlower": "Lanzahojas", + "ChlorophyteBullet": "Bala de clorofita", + "Hook": "Gancho", + "ParrotCracker": "Galleta para loro", + "StrangeGlowingMushroom": "Champiñón brillante extraño", + "Seedling": "Semillera", + "WispinaBottle": "Voluta en botella", + "PalladiumBar": "Lingote de paladio", + "PalladiumSword": "Espada de paladio", + "PalladiumPike": "Pica de paladio", + "PalladiumRepeater": "Repetidor de paladio", + "PalladiumPickaxe": "Pico de paladio", + "PalladiumDrill": "Taladro de paladio", + "Flamarang": "Bumerán en llamas", + "PalladiumChainsaw": "Motosierra de paladio", + "OrichalcumBar": "Lingote de oricalco", + "OrichalcumSword": "Espada de oricalco", + "OrichalcumHalberd": "Alabarda de oricalco", + "OrichalcumRepeater": "Repetidor de oricalco", + "OrichalcumPickaxe": "Pico de oricalco", + "OrichalcumDrill": "Taladro de oricalco", + "OrichalcumChainsaw": "Motosierra de oricalco", + "TitaniumBar": "Lingote de titanio", + "TitaniumSword": "Espada de titanio", + "CopperOre": "Mineral de cobre", + "MoltenFury": "Furia fundida", + "TitaniumTrident": "Tridente de titanio", + "TitaniumRepeater": "Repetidor de titanio", + "TitaniumPickaxe": "Pico de titanio", + "TitaniumDrill": "Taladro de titanio", + "TitaniumChainsaw": "Motosierra de titanio", + "PalladiumMask": "Máscara de paladio", + "PalladiumHelmet": "Casco de paladio", + "PalladiumHeadgear": "Tocado de paladio", + "PalladiumBreastplate": "Coraza de paladio", + "PalladiumLeggings": "Perneras de paladio", + "FieryGreatsword": "Espadón ardiente", + "OrichalcumMask": "Máscara de oricalco", + "OrichalcumHelmet": "Casco de oricalco", + "OrichalcumHeadgear": "Tocado de oricalco", + "OrichalcumBreastplate": "Coraza de oricalco", + "OrichalcumLeggings": "Perneras de oricalco", + "TitaniumMask": "Máscara de titanio", + "TitaniumHelmet": "Casco de titanio", + "TitaniumHeadgear": "Tocado de titanio", + "TitaniumBreastplate": "Coraza de titanio", + "TitaniumLeggings": "Perneras de titanio", + "MoltenPickaxe": "Pico fundido", + "OrichalcumAnvil": "Yunque de oricalco", + "TitaniumForge": "Forja de titanio", + "PalladiumWaraxe": "Hacha de guerra de paladio", + "OrichalcumWaraxe": "Hacha de guerra de oricalco", + "TitaniumWaraxe": "Hacha de guerra de titanio", + "HallowedBar": "Lingote sagrado", + "ChlorophyteClaymore": "Claymore de clorofita", + "ChlorophyteSaber": "Sable de clorofita", + "ChlorophytePartisan": "Partisana de clorofita", + "ChlorophyteShotbow": "Arco de clorofita", + "MeteorHelmet": "Casco de meteorito", + "ChlorophytePickaxe": "Pico de clorofita", + "ChlorophyteDrill": "Taladro de clorofita", + "ChlorophyteChainsaw": "Motosierra de clorofita", + "ChlorophyteGreataxe": "Gran hacha de clorofita", + "ChlorophyteWarhammer": "Martillo de guerra de clorofita", + "ChlorophyteArrow": "Flecha de clorofita", + "AmethystHook": "Gancho de amatista", + "TopazHook": "Gancho de topacio", + "SapphireHook": "Gancho de zafiro", + "EmeraldHook": "Gancho de esmeralda", + "MeteorSuit": "Cota de meteorito", + "RubyHook": "Gancho de rubí", + "DiamondHook": "Gancho de diamante", + "AmberMosquito": "Mosquito de ámbar", + "UmbrellaHat": "Sombrero paraguas", + "NimbusRod": "Varita de nimbo", + "OrangeTorch": "Antorcha naranja", + "CrimsandBlock": "Bloque de arena carmesí", + "BeeCloak": "Capa de abejas", + "EyeoftheGolem": "Ojo del gólem", + "HoneyBalloon": "Globo de miel", + "MeteorLeggings": "Perneras de meteorito", + "BlueHorseshoeBalloon": "Globo de herradura azul", + "WhiteHorseshoeBalloon": "Globo de herradura blanco", + "YellowHorseshoeBalloon": "Globo de herradura amarillo", + "FrozenTurtleShell": "Caparazón de tortuga congelado", + "SniperRifle": "Fusil de francotirador", + "VenusMagnum": "Venus Magnum", + "CrimsonRod": "Varita carmesí", + "CrimtaneBar": "Lingote carmesí", + "Stynger": "Stynger", + "FlowerPow": "Florecillas", + "BottledWater": "Agua embotellada", + "RainbowGun": "Pistola multicolor", + "StyngerBolt": "Proyectil Stynger", + "ChlorophyteJackhammer": "Martillo neumático de clorofita", + "Teleporter": "Teletransportador", + "FlowerofFrost": "Flor de escarcha", + "Uzi": "Uzi", + "MagnetSphere": "Esfera magnética", + "PurpleStainedGlass": "Vidriera morada", + "YellowStainedGlass": "Vidriera amarilla", + "BlueStainedGlass": "Vidriera azul", + "SpaceGun": "Pistola espacial", + "GreenStainedGlass": "Vidriera verde", + "RedStainedGlass": "Vidriera roja", + "MulticoloredStainedGlass": "Vidriera multicolor", + "SkeletronHand": "Mano de esqueletrón", + "Skull": "Calavera", + "BallaHat": "Gorra sombrero", + "GangstaHat": "Gorra de malote", + "SailorHat": "Gorra de marinero", + "EyePatch": "Parche para el ojo", + "SailorShirt": "Camisa de marinero", + "RocketBoots": "Botas cohete", + "SailorPants": "Pantalones de marinero", + "SkeletronMask": "Máscara de esqueletrón", + "AmethystRobe": "Vestido de amatista", + "TopazRobe": "Vestido de topacio", + "SapphireRobe": "Vestido de zafiro", + "EmeraldRobe": "Vestido de esmeralda", + "RubyRobe": "Vestido de rubí", + "DiamondRobe": "Vestido de diamante", + "WhiteTuxedoShirt": "Camisa de esmoquin blanca", + "WhiteTuxedoPants": "Pantalones de esmoquin blancos", + "GrayBrick": "Ladrillo gris", + "PanicNecklace": "Collar del pánico", + "LifeFruit": "Fruta de la vida", + "LihzahrdAltar": "Altar de lihzahrd", + "LihzahrdPowerCell": "Célula de poder de lihzahrd", + "Picksaw": "Picoserrucho", + "HeatRay": "Rayo calorífico", + "StaffofEarth": "Báculo de la Tierra", + "GolemFist": "Puño de gólem", + "WaterChest": "Cofre de agua", + "Binoculars": "Prismáticos", + "GoldOre": "Mineral de oro", + "GrayBrickWall": "Pared de ladrillo gris", + "RifleScope": "Mira telescópica", + "DestroyerEmblem": "Emblema del Destructor", + "HighVelocityBullet": "Bala de alta velocidad", + "JellyfishNecklace": "Collar de medusa", + "ZombieArm": "Brazo de zombi", + "TheAxe": "El hacha", + "IceSickle": "Hoz de hielo", + "ClothierVoodooDoll": "Muñeco de vudú del Buhonero", + "PoisonStaff": "Báculo envenenado", + "SlimeStaff": "Báculo de slime", + "RedBrick": "Ladrillo rojo", + "PoisonDart": "Dardo venenoso", + "EyeSpring": "Brote ocular", + "ToySled": "Trineo de juguete", + "BookofSkulls": "Libro de las calaveras", + "KOCannon": "Cañón KO", + "PirateMap": "Mapa pirata", + "TurtleHelmet": "Casco de tortuga", + "TurtleScaleMail": "Cota de escamas de tortuga", + "TurtleLeggings": "Perneras de tortuga", + "SnowballCannon": "Cañón de bolas de nieve", + "RedBrickWall": "Pared de ladrillo rojo", + "BonePickaxe": "Pico de hueso", + "MagicQuiver": "Carcaj mágico", + "MagmaStone": "Piedra de magma", + "ObsidianRose": "Rosa de obsidiana", + "Bananarang": "Bumerán plátano", + "ChainKnife": "Motocuchillo", + "RodofDiscord": "Varita de la discordia", + "DeathSickle": "Hoz mortífera", + "TurtleShell": "Caparazón de tortuga", + "TissueSample": "Muestra de tejido", + "ClayBlock": "Bloque de arcilla", + "Vertebrae": "Vértebras", + "BloodySpine": "Espina dorsal sangrienta", + "Ichor": "Icor", + "IchorTorch": "Antorcha de icor", + "IchorArrow": "Flecha de icor", + "IchorBullet": "Bala de icor", + "GoldenShower": "Ducha dorada", + "BunnyCannon": "Cañón de conejos", + "ExplosiveBunny": "Conejo explosivo", + "VialofVenom": "Vial de ponzoña", + "BlueBrick": "Ladrillo azul", + "FlaskofVenom": "Frasco de ponzoña", + "VenomArrow": "Flecha de ponzoña", + "VenomBullet": "Bala de ponzoña", + "FireGauntlet": "Guantalete de fuego", + "Cog": "Eslabón", + "Confetti": "Confeti", + "Nanites": "Nanitos", + "ExplosivePowder": "Polvareda explosiva", + "GoldDust": "Polvo dorado", + "PartyBullet": "Bala fiestera", + "BlueBrickWall": "Pared de ladrillo azul", + "NanoBullet": "Nanobala", + "ExplodingBullet": "Bala explosiva", + "GoldenBullet": "Bala de oro", + "FlaskofCursedFlames": "Frasco de las llamas malditas", + "FlaskofFire": "Frasco de fuego", + "FlaskofGold": "Frasco de oro", + "FlaskofIchor": "Frasco de icor", + "FlaskofNanites": "Frasco de nanitos", + "FlaskofParty": "Frasco fiestero", + "FlaskofPoison": "Frasco de veneno", + "ChainLantern": "Farolillo", + "EyeofCthulhuTrophy": "Trofeo Ojo de Cthulhu", + "EaterofWorldsTrophy": "Trofeo Devoramundos", + "BrainofCthulhuTrophy": "Trofeo Cerebro de Cthulhu", + "SkeletronTrophy": "Trofeo Esqueletrón", + "QueenBeeTrophy": "Trofeo Abeja reina", + "WallofFleshTrophy": "Trofeo Muro carnoso", + "DestroyerTrophy": "Trofeo Destructor", + "SkeletronPrimeTrophy": "Trofeo Esqueletrón mayor", + "RetinazerTrophy": "Trofeo Retinator", + "SpazmatismTrophy": "Trofeo Espasmatizador", + "GreenBrick": "Ladrillo verde", + "PlanteraTrophy": "Trofeo Plantera", + "GolemTrophy": "Trofeo Gólem", + "BloodMoonRising": "Luna sangrienta creciente", + "TheHangedMan": "El hombre colgado", + "GloryoftheFire": "La gloria del fuego", + "BoneWarp": "Torcedura de hueso", + "WallSkeleton": "Muro de esqueletos", + "HangingSkeleton": "Esqueleto colgante", + "BlueSlabWall": "Pared de losa azul", + "BlueTiledWall": "Pared de baldosa azul", + "GreenBrickWall": "Pared de ladrillo verde", + "PinkSlabWall": "Pared de losa rosa", + "PinkTiledWall": "Pared de baldosa rosa", + "GreenSlabWall": "Pared de losa verde", + "GreenTiledWall": "Pared de baldosa verde", + "BlueBrickPlatform": "Plataforma de ladrillo azul", + "PinkBrickPlatform": "Plataforma de ladrillo rosa", + "GreenBrickPlatform": "Plataforma de ladrillo verde", + "MetalShelf": "Estante de metal", + "BrassShelf": "Estante de latón", + "WoodShelf": "Estante de madera", + "PinkBrick": "Ladrillo rosa", + "BrassLantern": "Linterna de latón", + "CagedLantern": "Linterna enjaulada", + "CarriageLantern": "Linterna de carroza", + "AlchemyLantern": "Linterna de alquimia", + "DiablostLamp": "Farola del diablo", + "BlueDungeonChair": "Silla de mazmorra azul", + "BlueDungeonTable": "Mesa de mazmorra azul", + "BlueDungeonWorkBench": "Banco de trabajo de mazmorra azul", + "GreenDungeonChair": "Silla de mazmorra verde", + "SilverOre": "Mineral de plata", + "PinkBrickWall": "Pared de ladrillo rosa", + "GreenDungeonTable": "Mesa de mazmorra verde", + "GreenDungeonWorkBench": "Banco de trabajo de mazmorra verde", + "PinkDungeonChair": "Silla de mazmorra rosa", + "PinkDungeonTable": "Mesa de mazmorra rosa", + "PinkDungeonWorkBench": "Banco de trabajo de mazmorra rosa", + "BlueDungeonCandle": "Vela de mazmorra azul", + "GreenDungeonCandle": "Vela de mazmorra verde", + "PinkDungeonCandle": "Vela de mazmorra rosa", + "BlueDungeonVase": "Jarrón de mazmorra azul", + "GreenDungeonVase": "Jarrón de mazmorra verde", + "GoldBrick": "Ladrillo dorado", + "PinkDungeonVase": "Jarrón de mazmorra rosa", + "BlueDungeonDoor": "Puerta de mazmorra azul", + "GreenDungeonDoor": "Puerta de mazmorra verde", + "PinkDungeonDoor": "Puerta de mazmorra rosa", + "BlueDungeonBookcase": "Librería de mazmorra azul", + "GreenDungeonBookcase": "Librería de mazmorra verde", + "PinkDungeonBookcase": "Librería de mazmorra rosa", + "Catacomb": "Catacumbas", + "DungeonShelf": "Estante de mazmorra", + "SkellingtonJSkellingsworth": "Esqueleto J. Esquéletez", + "GoldBrickWall": "Pared de ladrillo dorado", + "TheCursedMan": "El hombre maldito", + "TheEyeSeestheEnd": "El ojo ve el final", + "SomethingEvilisWatchingYou": "Algo malvado te observa", + "TheTwinsHaveAwoken": "Los gemelos han despertado", + "TheScreamer": "El Gritón", + "GoblinsPlayingPoker": "Duendes jugando al póquer", + "Dryadisque": "Driadesco", + "Sunflowers": "Girasoles", + "TerrarianGothic": "Gótico terrariano", + "Beanie": "Gorro de lana", + "SilverBrick": "Ladrillo plateado", + "ImbuingStation": "Estación de imbuición", + "StarinaBottle": "Estrella embotellada", + "EmptyBullet": "Bala hueca", + "Impact": "Impacto", + "PoweredbyBirds": "Creado por los pájaros", + "TheDestroyer": "El Destructor", + "ThePersistencyofEyes": "La persistencia de los ojos", + "UnicornCrossingtheHallows": "Unicornios cruzando las reliquias", + "GreatWave": "Gran ola", + "StarryNight": "Noche estrellada", + "SilverBrickWall": "Pared de ladrillo plateado", + "GuidePicasso": "Guía de Picasso", + "TheGuardiansGaze": "La mirada del Guardián", + "FatherofSomeone": "Padre de alguien", + "NurseLisa": "Enfermera Lisa", + "ShadowbeamStaff": "Báculo de rayos oscuros", + "InfernoFork": "Tenedor del infierno", + "SpectreStaff": "Báculo espectral", + "WoodenFence": "Valla de madera", + "LeadFence": "Valla de plomo", + "BubbleMachine": "Máquina de burbujas", + "CopperBrick": "Ladrillo de cobre", + "BubbleWand": "Vara de burbujas", + "MarchingBonesBanner": "Bandera de los huesos andantes", + "NecromanticSign": "Señal nigromántica", + "RustedCompanyStandard": "Estandarte de la compañía oxidado", + "RaggedBrotherhoodSigil": "Sello de la hermandad andrajoso", + "MoltenLegionFlag": "Bandera de la legión derretida", + "DiabolicSigil": "Sello diabólico", + "ObsidianPlatform": "Plataforma de obsidiana", + "ObsidianDoor": "Puerta de obsidiana", + "ObsidianChair": "Silla de obsidiana", + "CopperBrickWall": "Pared de ladrillo cobrizo", + "ObsidianTable": "Mesa de obsidiana", + "ObsidianWorkBench": "Banco de trabajo de obisidana", + "ObsidianVase": "Jarrón de obsidiana", + "ObsidianBookcase": "Librería de obsidiana", + "HellboundBanner": "Bandera de la Unión Infernal", + "HellHammerBanner": "Bandera del Martillo del infierno", + "HelltowerBanner": "Banderra de la Torre infernal", + "LostHopesofManBanner": "Bandera de las Últimas esperanzas del hombre", + "ObsidianWatcherBanner": "Bandera del Vigilante de obsidiana", + "LavaEruptsBanner": "Bandera de la Erupción de lava", + "Spike": "Púa", + "BlueDungeonBed": "Cama de mazmorra azul", + "GreenDungeonBed": "Cama de mazmorra verde", + "PinkDungeonBed": "Cama de mazmorra rosa", + "ObsidianBed": "Cama de obsidiana", + "Waldo": "Wally", + "Darkness": "Oscuridad", + "DarkSoulReaper": "Segador de almas oscuras", + "Land": "Tierra", + "TrappedGhost": "Fantasma atrapado", + "DemonsEye": "Ojo demoníaco", + "WaterCandle": "Vela de agua", + "FindingGold": "En busca del oro", + "FirstEncounter": "Primer encuentro", + "GoodMorning": "Buenos días", + "UndergroundReward": "Recompensa subterránea", + "ThroughtheWindow": "A través de la ventana", + "PlaceAbovetheClouds": "Un lugar sobre las nubes", + "DoNotStepontheGrass": "No pisar el césped", + "ColdWatersintheWhiteLand": "Aguas frías en tierra blanca", + "LightlessChasms": "Abismo sin luz", + "TheLandofDeceivingLooks": "La tierra de las miradas engañosas", + "Book": "Libro", + "Daylight": "Luz diurna", + "SecretoftheSands": "El secreto de la arena", + "DeadlandComesAlive": "La tierra árida vuelve a la vida", + "EvilPresence": "Presencia maligna", + "SkyGuardian": "Guardián celestial", + "AmericanExplosive": "Explosivo estadounidense", + "Discover": "Descubrimiento", + "HandEarth": "Mano terrestre", + "OldMiner": "Viejo minero", + "Skelehead": "Cabeza-esqueleto", + "CopperWatch": "Reloj de cobre", + "Cobweb": "Telaraña", + "FacingtheCerebralMastermind": "Enfrentándose a la Mente maestra", + "LakeofFire": "Lago de fuego", + "TrioSuperHeroes": "Trío de superhéroes", + "SpectreHood": "Caperuza espectral", + "SpectreRobe": "Vestido espectral", + "SpectrePants": "Pantalones espectrales", + "SpectrePickaxe": "Pico espectral", + "SpectreHamaxe": "Hacha-martillo espectral", + "Ectoplasm": "Ectoplasma", + "GothicChair": "Silla gótica", + "NecroHelmet": "Casco de los muertos", + "GothicTable": "Mesa gótica", + "GothicWorkBench": "Banco de trabajo gótico", + "GothicBookcase": "Librería gótica", + "PaladinsHammer": "Martillo del paladín", + "SWATHelmet": "Caso de SWAT", + "BeeWings": "Alas de abeja", + "GiantHarpyFeather": "Pluma de arpía gigante", + "BoneFeather": "Pluma de hueso", + "FireFeather": "Pluma de fuego", + "IceFeather": "Pluma de hielo", + "NecroBreastplate": "Coraza de los muertos", + "BrokenBatWing": "Ala de murciélago rota", + "TatteredBeeWing": "Ala de abeja andrajosa", + "LargeAmethyst": "Amatista grande", + "LargeTopaz": "Topacio grande", + "LargeSapphire": "Zafiro grande", + "LargeEmerald": "Esmeralda grande", + "LargeRuby": "Rubí grande", + "LargeDiamond": "Diamante grande", + "JungleChest": "Cofre de la selva", + "CorruptionChest": "Cofre corrupto", + "NecroGreaves": "Grebas de los muertos", + "CrimsonChest": "Cofre carmesí", + "HallowedChest": "Cofre sagrado", + "JungleKey": "Llave de la selva", + "CorruptionKey": "Llave corrupta", + "CrimsonKey": "Llave carmesí", + "HallowedKey": "Llave sagrada", + "FrozenKey": "Llave congelada", + "ImpFace": "Cara de diablillo", + "OminousPresence": "Presencia ominosa", + "Bone": "Hueso", + "ShiningMoon": "Luna brillante", + "LivingGore": "Sangre viviente", + "FlowingMagma": "Magma fluido", + "SpectrePaintbrush": "Pincel espectral", + "SpectrePaintRoller": "Rodillo espectral", + "SpectrePaintScraper": "Rasqueta espectral", + "ShroomiteHeadgear": "Tocado de piñonita", + "ShroomiteMask": "Máscara de piñonita", + "ShroomiteHelmet": "Casco de piñonita", + "ShroomiteBreastplate": "Coraza de piñonita", + "Muramasa": "Muramasa", + "ShroomiteLeggings": "Perneras de piñonita", + "Autohammer": "Automartillo", + "ShroomiteBar": "Lingote de piñonita", + "SDMG": "ADEE", + "CenxsTiara": "Tiara de Cenx", + "CenxsBreastplate": "Coraza de Cenx", + "CenxsLeggings": "Perneras de Cenx", + "CrownosMask": "Máscara de Coronos", + "CrownosBreastplate": "Coraza de Coronos", + "CrownosLeggings": "Perneras de Coronos", + "CobaltShield": "Escudo de cobalto", + "WillsHelmet": "Casco de Will", + "WillsBreastplate": "Coraza de Will", + "WillsLeggings": "Perneras de Will", + "JimsHelmet": "Casco de Jim", + "JimsBreastplate": "Coraza de Jim", + "JimsLeggings": "Perneras de Jim", + "AaronsHelmet": "Casco de Aaron", + "AaronsBreastplate": "Coraza de Aaron", + "AaronsLeggings": "Perneras de Aaron", + "VampireKnives": "Cuchillos de vampiro", + "AquaScepter": "Cetro de agua", + "BrokenHeroSword": "Espada de héroe rota", + "ScourgeoftheCorruptor": "Azote del Corruptor", + "StaffoftheFrostHydra": "Báculo de la hidra de escarcha", + "TheCreationoftheGuide": "La creación del Guía", + "TheMerchant": "El Mercader", + "CrownoDevoursHisLunch": "Coronos devora su comida", + "RareEnchantment": "Encantamiento extraño", + "GloriousNight": "Noche gloriosa", + "SweetheartNecklace": "Collar del cariño", + "FlurryBoots": "Botas del frenesí", + "LuckyHorseshoe": "Herradura de la suerte", + "DTownsHelmet": "Casco de Ciudad D", + "DTownsBreastplate": "Coraza de Ciudad D", + "DTownsLeggings": "Perneras de Ciudad D", + "DTownsWings": "Alas de Ciudad D", + "WillsWings": "Alas de Will", + "CrownosWings": "Alas de Coronos", + "CenxsWings": "Alas de Cenx", + "CenxsDress": "Vestido de Cenx", + "CenxsDressPants": "Pantalones del vestido de Cenx", + "PalladiumColumn": "Columna de paladio", + "ShinyRedBalloon": "Globo rojo brillante", + "PalladiumColumnWall": "Columna de pared de paladio", + "BubblegumBlock": "Bloque de chicle", + "BubblegumBlockWall": "Bloque de pared de chicle", + "TitanstoneBlock": "Bloque de piedratita", + "TitanstoneBlockWall": "Bloque de pared de piedratita", + "MagicCuffs": "Esposas mágicas", + "MusicBoxSnow": "Caja de música (Nieve)", + "MusicBoxCrimson": "Caja de música (Carmesí)", + "MusicBoxBoss4": "Caja de música (Jefe final 4)", + "SilverWatch": "Reloj de plata", + "Harpoon": "Arpón", + "MusicBoxAltOverworldDay": "Caja de música (Superficie de día, alternativa)", + "MusicBoxRain": "Caja de música (Lluvia)", + "MusicBoxIce": "Caja de música (Hielo)", + "MusicBoxDesert": "Caja de música (Desierto)", + "MusicBoxDungeon": "Caja de música (Mazmorra)", + "MusicBoxPlantera": "Caja de música (Plantera)", + "MusicBoxBoss5": "Caja de música (Jefe final 5)", + "MusicBoxTemple": "Caja de música (Templo)", + "MusicBoxEclipse": "Caja de música (Eclipse)", + "SpikyBall": "Bola con pinchos", + "MusicBoxMushrooms": "Caja de música (Champiñones)", + "ButterflyDust": "Polvo de mariposa", + "AnkhCharm": "Amuleto de cruz ansata", + "AnkhShield": "Escudo de cruz ansata", + "BlueFlare": "Bengala azul", + "AnglerFishBanner": "Estandarte de pez abisal", + "AngryNimbusBanner": "Estandarte de nimbo enfadado", + "AnomuraFungusBanner": "Estandarte de hongo anomura", + "AntlionBanner": "Estandarte de hormiga león", + "ArapaimaBanner": "Estandarte de arapaima", + "BallOHurt": "Flagelo con bola", + "ArmoredSkeletonBanner": "Estandarte de esqueleto con armadura", + "BatBanner": "Estandarte de murciélago gigante", + "BirdBanner": "Estandarte de pájaro", + "BlackRecluseBanner": "Estandarte de ermitaño negro", + "BloodFeederBanner": "Estandarte de tragasangre", + "BloodJellyBanner": "Estandarte de medusa de sangre", + "BloodCrawlerBanner": "Estandarte de trepasangre", + "BoneSerpentBanner": "Estandarte de serpiente de hueso", + "BunnyBanner": "Estandarte de conejo", + "ChaosElementalBanner": "Estandarte de caos elemental", + "BlueMoon": "Luna azul", + "MimicBanner": "Estandarte de cofre falso", + "ClownBanner": "Estandarte de payaso", + "CorruptBunnyBanner": "Estandarte de conejo corrompido", + "CorruptGoldfishBanner": "Estandarte de pececillo corrompido", + "CrabBanner": "Estandarte de cangrejo", + "CrimeraBanner": "Estandarte de carmebicho", + "CrimsonAxeBanner": "Estandarte de hacha carmesí", + "CursedHammerBanner": "Estandarte de martillo maldito", + "DemonBanner": "Estandarte de demonio", + "DemonEyeBanner": "Estandarte de ojo demoníaco", + "Handgun": "Pistola", + "DerplingBanner": "Estandarte de tontuno", + "EaterofSoulsBanner": "Estandarte de Devoraalmas", + "EnchantedSwordBanner": "Estandarte de espada encantada", + "FaceMonsterBanner": "Estandarte de caramonstruo", + "FloatyGrossBanner": "Estandarte de flotasquillo", + "FlyingFishBanner": "Estandarte de pez volador", + "FlyingSnakeBanner": "Estandarte de serpiente voladora", + "FrankensteinBanner": "Estandarte de Frankenstein", + "FungiBulbBanner": "Estandarte de bulbo mohoso", + "WaterBolt": "Proyectil de agua", + "FungoFishBanner": "Estandarte de pez mohoso", + "GastropodBanner": "Estandarte de gastrópodo", + "GoblinThiefBanner": "Estandarte de duende ladrón", + "GoblinSorcererBanner": "Estandarte de duende hechicero", + "GoblinPeonBanner": "Estandarte de duende peón", + "GoblinScoutBanner": "Estandarte de duende explorador", + "GoblinWarriorBanner": "Estandarte de duende guerrero", + "GoldfishBanner": "Estandarte de pececillo", + "HarpyBanner": "Estandarte de arpía", + "HellbatBanner": "Estandarte de murciélago infiernal", + "Bomb": "Bomba", + "HerplingBanner": "Estandarte de lerduno", + "HornetBanner": "Estandarte de avispón", + "IceElementalBanner": "Estandarte de hielo elemental", + "IcyMermanBanner": "Estandarte de tritón del hielo", + "FireImpBanner": "Estandarte de diablillo de fuego", + "JellyfishBanner": "Estandarte de medusa azul", + "JungleCreeperBanner": "Estandarte de criatura selvático", + "LihzahrdBanner": "Estandarte de lihzahrd", + "ManEaterBanner": "Estandarte de Devorahombres", + "MeteorHeadBanner": "Estandarte de cabeza meteorito", + "Dynamite": "Dinamita", + "MothBanner": "Estandarte de polilla", + "MummyBanner": "Estandarte de momia", + "MushiLadybugBanner": "Estandarte de mariquita mushi", + "ParrotBanner": "Estandarte de loro", + "PigronBanner": "Estandarte de cerdidragón", + "PiranhaBanner": "Estandarte de piraña", + "PirateBanner": "Estandarte de pirata de cubierta", + "PixieBanner": "Estandarte de duendecillo", + "RaincoatZombieBanner": "Estandarte de zombi impermeable", + "ReaperBanner": "Estandarte de la Muerte", + "Grenade": "Granada", + "SharkBanner": "Estandarte de tiburón", + "SkeletonBanner": "Estandarte de esqueleto", + "SkeletonMageBanner": "Estandarte de mago oscuro", + "SlimeBanner": "Estandarte de slime azul", + "SnowFlinxBanner": "Estandarte de copito de nieve", + "SpiderBanner": "Estandarte de criatura de pared", + "SporeZombieBanner": "Estandarte de zombi espora", + "SwampThingBanner": "Estandarte de cosa del pantano", + "TortoiseBanner": "Estandarte de tortuga gigante", + "ToxicSludgeBanner": "Estandarte de fango tóxico", + "SandBlock": "Bloque de arena", + "UmbrellaSlimeBanner": "Estandarte de slime paraguas", + "UnicornBanner": "Estandarte de unicornio", + "VampireBanner": "Estandarte de vampiro", + "VultureBanner": "Estandarte de buitre", + "NypmhBanner": "Estandarte de ninfa", + "WerewolfBanner": "Estandarte de hombre lobo", + "WolfBanner": "Estandarte de lobo", + "WorldFeederBanner": "Estandarte de Tragamundos", + "WormBanner": "Estandarte de gusano", + "WraithBanner": "Estandarte de espectro", + "GoldWatch": "Reloj de oro", + "Glass": "Cristal", + "WyvernBanner": "Estandarte de guiverno", + "ZombieBanner": "Estandarte de zombi", + "GlassPlatform": "Plataforma de cristal", + "GlassChair": "Silla de cristal", + "GoldenChair": "Silla de oro", + "GoldenToilet": "Retrete de oro", + "BarStool": "Taburete", + "HoneyChair": "Silla de miel", + "SteampunkChair": "Silla steampunk", + "GlassDoor": "Puerta de cristal", + "Sign": "Cartel", + "GoldenDoor": "Puerta de oro", + "HoneyDoor": "Puerta de miel", + "SteampunkDoor": "Puerta steampunk", + "GlassTable": "Mesa de cristal", + "BanquetTable": "Banqueta", + "Bar": "Barra", + "GoldenTable": "Mesa de oro", + "HoneyTable": "Mesa de miel", + "SteampunkTable": "Mesa steampunk", + "GlassBed": "Cama de cristal", + "AshBlock": "Bloque de ceniza", + "GoldenBed": "Cama de oro", + "HoneyBed": "Cama de miel", + "SteampunkBed": "Cama steampunk", + "LivingWoodWall": "Pared de madera viviente", + "FartinaJar": "Pedo en un bote", + "Pumpkin": "Calabaza", + "PumpkinWall": "Pared de calabaza", + "Hay": "Heno", + "HayWall": "Pared de heno", + "SpookyWood": "Madera tétrica", + "Obsidian": "Obsidiana", + "SpookyWoodWall": "Pared de madera tétrica", + "PumpkinHelmet": "Casco de calabaza", + "PumpkinBreastplate": "Coraza de calabaza", + "PumpkinLeggings": "Perneras de calabaza", + "CandyApple": "Manzana dulce", + "SoulCake": "Pastel del alma", + "NurseHat": "Sombrero de enfermera", + "NurseShirt": "Camisa de enfermera", + "NursePants": "Pantalones de enfermera", + "WizardsHat": "Sombrero de mago", + "Hellstone": "Piedra infernal", + "GuyFawkesMask": "Máscara de Guy Fawkes", + "DyeTraderRobe": "Vestido del comerciante de tintes", + "SteampunkGoggles": "Gafas steampunk", + "CyborgHelmet": "Casco de cíborg", + "CyborgShirt": "Camisa de cíborg", + "CyborgPants": "Pantalones de cíborg", + "CreeperMask": "Máscara de criatura", + "CreeperShirt": "Camisa de criatura", + "CreeperPants": "Pantalones de criatura", + "CatMask": "Máscara de gato", + "HellstoneBar": "Lingote de piedra infernal", + "CatShirt": "Camisa de gato", + "CatPants": "Pantalones de gato", + "GhostMask": "Máscara de fantasma", + "GhostShirt": "Camisa de fantasma", + "PumpkinMask": "Máscara de calabaza", + "PumpkinShirt": "Camisa de calabaza", + "PumpkinPants": "Pantalones de calabaza", + "RobotMask": "Máscara de robot", + "RobotShirt": "Camisa de robot", + "RobotPants": "Pantalones de robot", + "MudBlock": "Bloque de lodo", + "UnicornMask": "Máscara de unicornio", + "UnicornShirt": "Camisa de unicornio", + "UnicornPants": "Pantalones de unicornio", + "VampireMask": "Máscara de vampiro", + "VampireShirt": "Camisa de vampiro", + "VampirePants": "Pantalones de vampiro", + "WitchHat": "Sombrero de bruja", + "LeprechaunHat": "Sombrero de leprechaun", + "LeprechaunShirt": "Camisa de leprechaun", + "LeprechaunPants": "Pantalones de leprechaun", + "Sapphire": "Zafiro", + "PixieShirt": "Camisa de duendecillo", + "PixiePants": "Pantalones de duendecillo", + "PrincessHat": "Sombrero de princesa", + "PrincessDressNew": "Vestido de princesa", + "GoodieBag": "Mochila de la suerte", + "WitchDress": "Vestido de bruja", + "WitchBoots": "Botas de bruja", + "BrideofFrankensteinMask": "Máscara de la novia de Frankenstein", + "BrideofFrankensteinDress": "Vestido de la novia de Frankenstein", + "KarateTortoiseMask": "Máscara de tortuga karateka", + "Ruby": "Rubí", + "KarateTortoiseShirt": "Camisa de tortuga karateka", + "KarateTortoisePants": "Pantalones de tortuga karateka", + "CandyCornRifle": "Fusil de maíz de caramelo", + "CandyCorn": "Maíz de caramelo", + "JackOLanternLauncher": "Lanzador de linternas calabaza", + "ExplosiveJackOLantern": "Linterna calabaza explosiva", + "Sickle": "Hoz", + "PumpkinPie": "Pastel de calabaza", + "ScarecrowHat": "Sombrero de espantapájaros", + "ScarecrowShirt": "Camisa de espantapájaros", + "Emerald": "Esmeralda", + "ScarecrowPants": "Pantalones de espantapájaros", + "Cauldron": "Caldero", + "PumpkinChair": "Silla de calabaza", + "PumpkinDoor": "Puerta de calabaza", + "PumpkinTable": "Mesa de calabaza", + "PumpkinWorkBench": "Banco de trabajo de calabaza", + "PumpkinPlatform": "Plataforma de calabaza", + "TatteredFairyWings": "Alas de hada andrajosas", + "SpiderEgg": "Huevo de araña", + "MagicalPumpkinSeed": "Semilla de calabaza mágica", + "DepthMeter": "Medidor de profundidad", + "Topaz": "Topacio", + "BatHook": "Gancho de murciélago", + "BatScepter": "Cetro de murciélago", + "RavenStaff": "Báculo de cuervo", + "JungleKeyMold": "Molde para llave de la selva", + "CorruptionKeyMold": "Molde para llave corrupta", + "CrimsonKeyMold": "Molde para llave carmesí", + "HallowedKeyMold": "Molde para llave sagrada", + "FrozenKeyMold": "Molde para llave congelada", + "HangingJackOLantern": "Linterna calabaza colgante", + "RottenEgg": "Huevo podrido", + "Amethyst": "Amatista", + "UnluckyYarn": "Hilo desafortunado", + "BlackFairyDust": "Polvo de hada negra", + "Jackelier": "Linternalabro", + "JackOLantern": "Linterna calabaza", + "SpookyChair": "Silla tétrica", + "SpookyDoor": "Puerta tétrica", + "SpookyTable": "Mesa tétrica", + "SpookyWorkBench": "Banco de trabajo tétrico", + "ReaperHood": "Caperuza de la Muerte", + "Diamond": "Diamante", + "ReaperRobe": "Vestido de la Muerte", + "FoxMask": "Máscara de zorro", + "FoxShirt": "Camisa de zorro", + "FoxPants": "Pantalones de zorro", + "CatEars": "Orejas de gato", + "BloodyMachete": "Machete sangriento", + "TheHorsemansBlade": "La espada del Jinete", + "BladedGlove": "Guante con cuchillas", + "PumpkinSeed": "Semilla de calabaza", + "SpookyHook": "Gancho tétrico", + "GlowingMushroom": "Champiñón brillante", + "SpookyWings": "Alas tétricas", + "SpookyTwig": "Rama tétrica", + "SpookyHelmet": "Casco tétrico", + "SpookyBreastplate": "Coraza tétrica", + "SpookyLeggings": "Perneras tétricas", + "StakeLauncher": "Lanzaestacas", + "Stake": "Estaca", + "CursedSapling": "Retoño maldito", + "SpaceCreatureMask": "Máscara de criatura espacial", + "SpaceCreatureShirt": "Camisa de criatura espacial", + "Star": "Estrella", + "SpaceCreaturePants": "Pantalones de criatura espacial", + "WolfMask": "Máscara de lobo", + "WolfShirt": "Camisa de lobo", + "WolfPants": "Pantalones de lobo", + "PumpkinMoonMedallion": "Medallón de luna calabaza", + "NecromanticScroll": "Pergamino de nigromante", + "JackingSkeletron": "Jacking Esqueletrón", + "BitterHarvest": "Cosecha amarga", + "BloodMoonCountess": "Condesa de la luna sangrienta", + "HallowsEve": "Víspera de todos los santos", + "IvyWhip": "Látigo de hiedra", + "MorbidCuriosity": "Curiosidad mórbida", + "TreasureHunterShirt": "Camisa de cazador de tesoros", + "TreasureHunterPants": "Pantalones de cazador de tesoros", + "DryadCoverings": "Cubierta de dríada", + "DryadLoincloth": "Taparrabos de dríada", + "MourningWoodTrophy": "Trofeo de árbol de luto", + "PumpkingTrophy": "Trofeo de calabaza", + "JackOLanternMask": "Trofeo de linterna calabaza", + "SniperScope": "Mira de francotirador", + "HeartLantern": "Linterna de corazón", + "BreathingReed": "Caña para respirar", + "JellyfishDivingGear": "Equipo de buceo medusa", + "ArcticDivingGear": "Equipo de buceo ártico", + "FrostsparkBoots": "Botas del campo helado", + "FartInABalloon": "Pedo en globo", + "PapyrusScarab": "Escarabajo de papiro", + "CelestialStone": "Piedra celestial", + "Hoverboard": "Patinete volador", + "CandyCane": "Bastón de caramelo", + "SugarPlum": "Ciruela de azúcar", + "Present": "Regalo", + "Flipper": "Aletas", + "RedRyder": "Jinete rojo", + "FestiveWings": "Alas festivas", + "PineTreeBlock": "Bloque de pino", + "ChristmasTree": "Árbol de Navidad", + "StarTopper1": "Estrella 1", + "StarTopper2": "Estrella 2", + "StarTopper3": "Estrella 3", + "BowTopper": "Lazo", + "WhiteGarland": "Guirnalda blanca", + "WhiteAndRedGarland": "Guirnalda blanca y roja", + "HealingPotion": "Poción curativa", + "RedGardland": "Guirnalda roja", + "RedAndGreenGardland": "Guirnalda roja y verde", + "GreenGardland": "Guirnalda verde", + "GreenAndWhiteGarland": "Guirnalda verde y blanca", + "MulticoloredBulb": "Bombilla multicolor", + "RedBulb": "Bombilla roja", + "YellowBulb": "Bombilla amarilla", + "GreenBulb": "Bombilla verde", + "RedAndGreenBulb": "Bombilla roja y verde", + "YellowAndGreenBulb": "Bombilla amarilla y verde", + "ManaPotion": "Poción de maná", + "RedAndYellowBulb": "Bombilla roja y amarilla", + "WhiteBulb": "Bombilla blanca", + "WhiteAndRedBulb": "Bombilla blanca y roja", + "WhiteAndYellowBulb": "Bombilla blanca y amarilla", + "WhiteAndGreenBulb": "Bombilla blanca y verde", + "MulticoloredLights": "Luces multicolor", + "RedLights": "Luces rojas", + "GreenLights": "Luces verdes", + "BlueLights": "Luces azules", + "YellowLights": "Luces amarillas", + "GoldBar": "Lingote de oro", + "BladeofGrass": "Espada de hierba", + "RedAndYellowLights": "Luces rojas y amarillas", + "RedAndGreenLights": "Luces rojas y verdes", + "YellowAndGreenLights": "Luces amarillas y verdes", + "BlueAndGreenLights": "Luces azules y verdes", + "RedAndBlueLights": "Luces rojas y azules", + "BlueAndYellowLights": "Luces azules y amarillas", + "GiantBow": "Arco gigante", + "ReindeerAntlers": "Astas de reno", + "Holly": "Holly", + "CandyCaneSword": "Espada de bastón de caramelo", + "ThornChakram": "Chakram de espinas", + "EldMelter": "Derriteelfos", + "ChristmasPudding": "Pudin navideño", + "Eggnog": "Ponche de huevo", + "StarAnise": "Anís estrellado", + "ReindeerBells": "Campanas de reno", + "CandyCaneHook": "Gancho de bastón de caramelo", + "ChristmasHook": "Gancho navideño", + "CnadyCanePickaxe": "Pico de bastón de caramelo", + "FruitcakeChakram": "Chakram de tarta de frutas", + "SugarCookie": "Galleta azucarada", + "ObsidianBrick": "Ladrillo de obsidiana", + "GingerbreadCookie": "Galleta de jengibre", + "HandWarmer": "Calientamanos", + "Coal": "Carbón", + "Toolbox": "Caja de herramientas", + "PineDoor": "Puerta de pino", + "PineChair": "Silla de pino", + "PineTable": "Mesa de pino", + "DogWhistle": "Silbato para perros", + "ChristmasTreeSword": "Espada Árbol de Navidad", + "ChainGun": "Metralleta", + "ObsidianSkull": "Calavera de obsidiana", + "Razorpine": "Cuchillas de pino", + "BlizzardStaff": "Bastón de la ventisca", + "MrsClauseHat": "Sombrero de la Sra. Noel", + "MrsClauseShirt": "Camisa de la Sra. Noel", + "MrsClauseHeels": "Tacones de la Sra. Noel", + "ParkaHood": "Parka con capucha", + "ParkaCoat": "Parka", + "ParkaPants": "Parka con pantalones", + "SnowHat": "Sombrero de nieve", + "UglySweater": "Jersey feo", + "MushroomGrassSeeds": "Semillas de champiñón de césped", + "TreeMask": "Máscara de árbol", + "TreeShirt": "Camisa de árbol", + "TreeTrunks": "Calzoncillos de árbol", + "ElfHat": "Sombrero de elfo", + "ElfShirt": "Camisa de elfo", + "ElfPants": "Pantalones de elfo", + "SnowmanCannon": "Cañón de muñecos de nieve", + "NorthPole": "Polo Norte", + "ChristmasTreeWallpaper": "Fondo de árbol de Navidad", + "OrnamentWallpaper": "Fondo ornamental", + "JungleGrassSeeds": "Semillas de césped selvático", + "CandyCaneWallpaper": "Fondo de bastón de caramelo", + "FestiveWallpaper": "Fondo festivo", + "StarsWallpaper": "Fondo de estrellas", + "SquigglesWallpaper": "Fondo de garabatos", + "SnowflakeWallpaper": "Fondo de copos de nieve", + "KrampusHornWallpaper": "Fondo de cuernos de Krampus", + "BluegreenWallpaper": "Fondo azul verdoso", + "GrinchFingerWallpaper": "Fondo de dedo del Grinch", + "NaughtyPresent": "Regalo asqueroso", + "BabyGrinchMischiefWhistle": "Silbato travieso del Grinch bebé", + "WoodenHammer": "Martillo de madera", + "IceQueenTrophy": "Trofeo Reina de Hielo", + "SantaNK1Trophy": "Trofeo Papá-Tanque1", + "EverscreamTrophy": "Trofeo Gritoeterno", + "MusicBoxPumpkinMoon": "Caja de música (Luna calabaza)", + "MusicBoxAltUnderground": "Caja de música (Subsuelo alternativo)", + "MusicBoxFrostMoon": "Caja de música (Luna Gélida)", + "BrownPaint": "Pintura marrón", + "ShadowPaint": "Pintura sombra", + "NegativePaint": "Pintura negativa", + "TeamDye": "Tinte de equipo", + "StarCannon": "Cañón de estrellas", + "AmethystGemsparkBlock": "Bloque de amatista gemachispa", + "TopazGemsparkBlock": "Bloque de topacio gemachispa", + "SapphireGemsparkBlock": "Bloque de zafiro gemachispa", + "EmeraldGemsparkBlock": "Bloque de esmeralda gemachispa", + "RubyGemsparkBlock": "Bloque de rubí gemachispa", + "DiamondGemsparkBlock": "Bloque de diamante gemachispa", + "AmberGemsparkBlock": "Bloque de ámbar gemachispa", + "LifeHairDye": "Tinta vital", + "ManaHairDye": "Tinte de maná", + "DepthHairDye": "Tinte de las profundidades", + "BluePhaseblade": "Espada de luz azul", + "MoneyHairDye": "Tinte de dinero", + "TimeHairDye": "Tinte de tiempo", + "TeamHairDye": "Tinte de equipo", + "BiomeHairDye": "Tinte de biomedio", + "PartyHairDye": "Tinte festivo", + "RainbowHairDye": "Tinte arcoíris", + "SpeedHairDye": "Tinte de velocidad", + "AngelHalo": "Halo de ángel", + "Fez": "Fez", + "Womannquin": "Maniquí femenino", + "RedPhaseblade": "Espada de luz roja", + "HairDyeRemover": "Quitatintes", + "BugNet": "Red para insectos", + "Firefly": "Luciérnaga", + "FireflyinaBottle": "Luciérnaga en una botella", + "MonarchButterfly": "Mariposa monárquica", + "PurpleEmperorButterfly": "Mariposa emperador morada", + "RedAdmiralButterfly": "Mariposa almirante roja", + "UlyssesButterfly": "Mariposa Ulises", + "SulphurButterfly": "Mariposa de sulfuro", + "TreeNymphButterfly": "Mariposa ninfa de los árboles", + "DirtBlock": "Bloque de tierra", + "CopperBar": "Lingote de cobre", + "GreenPhaseblade": "Espada de luz verde", + "ZebraSwallowtailButterfly": "Mariposa cebra de cola corta", + "JuliaButterfly": "Mariposa Julia", + "Worm": "Gusano", + "Mouse": "Ratón", + "LightningBug": "Insecto rayo", + "LightningBuginaBottle": "Insecto rayo embotellado", + "Snail": "Caracol", + "GlowingSnail": "Caracol brillante", + "FancyGreyWallpaper": "Fondo gris bonito", + "IceFloeWallpaper": "Fondo helado", + "PurplePhaseblade": "Espada de luz morada", + "MusicWallpaper": "Fondo musical", + "PurpleRainWallpaper": "Fondo de lluvia púrpura", + "RainbowWallpaper": "Fondo arcoíris", + "SparkleStoneWallpaper": "Fondo piedra chispeante", + "StarlitHeavenWallpaper": "Fondo cielo iluminado de estrellas", + "Bird": "Pájaro", + "BlueJay": "Jota azul", + "Cardinal": "Cardenal", + "Squirrel": "Ardilla", + "Bunny": "Conejo", + "WhitePhaseblade": "Espada de luz blanca", + "YellowPhaseblade": "Espada de luz amarilla", + "MeteorHamaxe": "Hacha-martillo de meteorito", + "EmptyBucket": "Cubo vacío", + "WaterBucket": "Cubo de agua", + "LavaBucket": "Cubo de lava", + "JungleRose": "Rosa de la selva", + "Stinger": "Aguijón", + "SilverBar": "Lingote de plata", + "Vine": "Enredadera", + "FeralClaws": "Garras de bestia", + "BlacksmithRack": "Repisa de herrero", + "CarpentryRack": "Repisa de carpintero", + "HelmetRack": "Repisa de cascos", + "SpearRack": "Repisa de lanzas", + "SwordRack": "Repisa de espadas", + "StoneSlab": "Losa de piedra", + "AnkletoftheWind": "Tobillera de viento", + "SandstoneSlab": "Losa de arenisca", + "Frog": "Rana", + "MallardDuck": "Ánade real", + "Duck": "Pato", + "StaffofRegrowth": "Báculo de regeneración", + "HellstoneBrick": "Ladrillo de piedra infernal", + "WhoopieCushion": "Cojín flatulento", + "BlackScorpion": "Escorpión negro", + "Scorpion": "Escorpión", + "BubbleWallpaper": "Fondo de burbujas", + "CopperPipeWallpaper": "Fondo de tubería de cobre", + "Shackle": "Argolla", + "DuckyWallpaper": "Fondo de pato", + "FrostCore": "Núcleo congelado", + "BunnyCage": "Jaula de conejo", + "SquirrelCage": "Jaula de ardilla", + "MallardDuckCage": "Jaula de ánade real", + "DuckCage": "Jaula de pato", + "BirdCage": "Jaula de pájaro", + "BlueJayCage": "Jaula de jota azul", + "CardinalCage": "Jaula de cardenal", + "WaterfallWall": "Pared de cascada", + "MoltenHamaxe": "Hacha-martillo fundida", + "LavafallWall": "Pared de lava", + "CrimsonSeeds": "Semillas carmesí", + "HeavyWorkBench": "Banco de trabajo duro", + "CopperPlating": "Placa de cobre", + "SnailCage": "Jaula de caracol", + "GlowingSnailCage": "Jaula de caracol brillante", + "ShroomiteDiggingClaw": "Garra de piñonita excavadora", + "AmmoBox": "Caja de munición", + "MonarchButterflyJar": "Bote de mariposa monárquica", + "PurpleEmperorButterflyJar": "Bote de mariposa emperador morada", + "Flamelash": "Látigo de llamas", + "RedAdmiralButterflyJar": "Bote de mariposa almirante roja", + "UlyssesButterflyJar": "Bote de mariposa Ulises", + "SulphurButterflyJar": "Bote de mariposa de sulfuro", + "TreeNymphButterflyJar": "Bote de mariposa ninfa de los árboles", + "ZebraSwallowtailButterflyJar": "Bote de mariposa cebra de cola corta", + "JuliaButterflyJar": "Bote de mariposa Julia", + "ScorpionCage": "Jaula de escorpión", + "BlackScorpionCage": "Jaula de escorpión negro", + "VenomStaff": "Cetro venenoso", + "SpectreMask": "Máscara Espectro", + "PhoenixBlaster": "Desintegrador Fénix", + "FrogCage": "Jaula de rana", + "MouseCage": "Jaula de ratón", + "BoneWelder": "Soldador de huesos", + "FleshCloningVaat": "Cámara de clonación", + "GlassKiln": "Horno de cristal", + "LihzahrdFurnace": "Muebles de lihzahrd", + "LivingLoom": "Telar viviente", + "SkyMill": "Molino celestial", + "IceMachine": "Máquina de hielo", + "BeetleHelmet": "Casco de escarabajo", + "IronBar": "Lingote de hierro", + "Sunfury": "Furia solar", + "BeetleScaleMail": "Cota de malla de escarabajo", + "BeetleShell": "Caparazón de escarabajo", + "BeetleLeggings": "Perneras de escarabajo", + "SteampunkBoiler": "Calentador steampunk", + "HoneyDispenser": "Dispensador de miel", + "Penguin": "Pingüino", + "PenguinCage": "Jaula de pingüino", + "WormCage": "Jaula de gusano", + "Terrarium": "Terrario", + "SuperManaPotion": "Superpoción de maná", + "Hellforge": "Forja infernal", + "EbonwoodFence": "Valla de madera de ébano", + "RichMahoganyFence": "Valla de caoba rica", + "PearlwoodFence": "Valla de madera perlada", + "ShadewoodFence": "Valla de madera sombría", + "BrickLayer": "Capa de ladrillo", + "ExtendoGrip": "Agarre extendido", + "PaintSprayer": "Spray de pintura", + "PortableCementMixer": "Hormigonera portátil", + "BeetleHusk": "Cuerno de escarabajo", + "CelestialMagnet": "Imán celestial", + "ClayPot": "Recipiente de barro", + "CelestialEmblem": "Emblema celestial", + "CelestialCuffs": "Esposas celestiales", + "PeddlersHat": "Sombrero de vendedor ambulante", + "PulseBow": "Arco de pulsos", + "NaturesGift": "Don de la naturaleza", + "Bed": "Cama", + "Silk": "Seda", + "DynastyTable": "Mesa dinástica", + "LesserRestorationPotion": "Poción de recuperación menor", + "DynastyWood": "Madera dinástica", + "RedDynastyShingles": "Tejuela dinástica roja", + "BlueDynastyShingles": "Tejuela dinástica azul", + "WhiteDynastyWall": "Pared dinástica blanca", + "BlueDynastyWall": "Pared dinástica azul", + "DynastyDoor": "Puerta dinástica", + "Sake": "Sake", + "PadThai": "Pad Thai", + "Pho": "Pho", + "Revolver": "Revólver", + "RestorationPotion": "Poción de recuperación", + "Gatligator": "Cocodrilo metralleta", + "ArcaneRuneWall": "Pared de runas arcanas", + "WaterGun": "Pistola de agua", + "Katana": "Katana", + "UltrabrightTorch": "Antorcha ultrabrillante", + "MagicHat": "Sombrero mágico", + "DiamondRing": "Anillo de diamante", + "Gi": "Gi", + "Kimono": "Kimono", + "GypsyRobe": "Atuendo gitano", + "JungleHat": "Casco para la selva", + "BeetleWings": "Alas de escarabajo", + "TigerSkin": "Piel de tigre", + "LeopardSkin": "Piel de leopardo", + "ZebraSkin": "Piel de cebra", + "CrimsonCloak": "Capa carmesí", + "MysteriousCape": "Capa misteriosa", + "RedCape": "Capa roja", + "WinterCape": "Capa invernal", + "WoodFishingPole": "Caña de madera", + "JungleShirt": "Camisa para la selva", + "Bass": "Lubina", + "ReinforcedFishingPole": "Caña de pescar reforzada", + "FiberglassFishingPole": "Caña de fibra de cristal", + "FisherofSouls": "Pescador de almas", + "GoldenFishingRod": "Caña dorada", + "MechanicsRod": "Caña mecánica", + "SittingDucksFishingRod": "Caña de blanco fácil", + "Trout": "Trucha", + "Salmon": "Salmón", + "AtlanticCod": "Bacalao atlántico", + "Gel": "Gel", + "JunglePants": "Pantalones para la selva", + "Tuna": "Atún", + "RedSnapper": "Pargo colorado", + "NeonTetra": "Tetra de neón", + "ArmoredCavefish": "Pez de cueva blindado", + "Damselfish": "Pez damisela", + "CrimsonTigerfish": "Pez tigre carmesí", + "FrostMinnow": "Mendo congelado", + "PrincessFish": "Pez princesa", + "GoldenCarp": "Carpa dorada", + "SpecularFish": "Pez espectacular", + "MoltenHelmet": "Casco fundido", + "Prismite": "Prismita", + "VariegatedLardfish": "Pez manteca multicolor", + "FlarefinKoi": "Koi aletafina", + "DoubleCod": "Bacalao doble", + "Honeyfin": "Aleta de miel", + "Obsidifish": "Pez de obsidiana", + "Shrimp": "Gamba", + "ChaosFish": "Pez del caos", + "Ebonkoi": "Ebonkoi", + "Hemopiranha": "Hemopiraña", + "MoltenBreastplate": "Coraza fundida", + "Rockfish": "Pez roca", + "Stinkfish": "Pez apestoso", + "MiningPotion": "Poción de minería", + "HeartreachPotion": "Poción alcanzacorazón", + "CalmingPotion": "Poción tranquilizadora", + "BuilderPotion": "Poción constructora", + "TitanPotion": "Poción de titán", + "FlipperPotion": "Poción de aletas", + "SummoningPotion": "Poción de invocación", + "TrapsightPotion": "Poción de sentido del peligro", + "MoltenGreaves": "Grebas fundidas", + "PurpleClubberfish": "Pez garrote morado", + "ObsidianSwordfish": "Pez espada de obsidiana", + "Swordfish": "Pez espada", + "IronFence": "Valla de hierro", + "WoodenCrate": "Caja de madera", + "IronCrate": "Caja de hierro", + "GoldenCrate": "Caja dorada", + "OldShoe": "Zapato viejo", + "FishingSeaweed": "Alga", + "TinCan": "Lata", + "MeteorShot": "Proyectil de meteorito", + "ReaverShark": "Tiburón segador", + "SawtoothShark": "Tiburón dientes de sierra", + "Minecart": "Vagoneta", + "AmmoReservationPotion": "Poción de reserva de munición", + "LifeforcePotion": "Poción de fuerza vital", + "EndurancePotion": "Poción de resistencia", + "RagePotion": "Poción de furia", + "InfernoPotion": "Poción del infierno", + "WrathPotion": "Poción de ira", + "StickyBomb": "Bomba lapa", + "RecallPotion": "Poción de recuperación", + "TeleportationPotion": "Poción de teletransporte", + "LovePotion": "Poción del amor", + "StinkPotion": "Poción apestosa", + "FishingPotion": "Poción de pesca", + "SonarPotion": "Poción de sonar", + "CratePotion": "Poción de caja", + "ShiverthornSeeds": "Semillas de espinatemblor", + "Shiverthorn": "Espinatemblor", + "WarmthPotion": "Poción del calor", + "BlackLens": "Lentes negras", + "FishHook": "Anzuelo", + "BeeHeadgear": "Tocado de abeja", + "BeeBreastplate": "Coraza de abeja", + "BeeGreaves": "Grebas de abeja", + "HornetStaff": "Báculo de avispón", + "ImpStaff": "Báculo de diablillo", + "QueenSpiderStaff": "Báculo de reina araña", + "AnglerHat": "Sombrero de Rape", + "AnglerVest": "Chaleco de Rape", + "AnglerPants": "Pantalones de Rape", + "Sunglasses": "Gafas de sol", + "SpiderMask": "Máscara de araña", + "SpiderBreastplate": "Coraza de araña", + "SpiderGreaves": "Grebas de araña", + "HighTestFishingLine": "Sedal de gran prueba", + "AnglerEarring": "Pendiente abisal", + "TackleBox": "Caja de aparejos", + "BlueDungeonPiano": "Piano de mazmorra azul", + "GreenDungeonPiano": "Piano de mazmorra verde", + "PinkDungeonPiano": "Piano de mazmorra rosa", + "GoldenPiano": "Piano dorado", + "WizardHat": "Sombrero de mago", + "ObsidianPiano": "Piano de obsidiana", + "BonePiano": "Piano de hueso", + "CactusPiano": "Piano de cactus", + "SpookyPiano": "Piano tétrico", + "SkywarePiano": "Piano celestial", + "LihzahrdPiano": "Piano de lihzahrd", + "BlueDungeonDresser": "Aparador de mazmorra azul", + "GreenDungeonDresser": "Aparador de mazmorra verde", + "PinkDungeonDresser": "Aparador de mazmorra rosa", + "GoldenDresser": "Aparador dorado", + "TopHat": "Sombrero de copa", + "ObsidianDresser": "Aparador de obsidiana", + "BoneDresser": "Aparador de hueso", + "CactusDresser": "Aparador de cactus", + "SpookyDresser": "Aparador tétrico", + "SkywareDresser": "Aparador celestial", + "HoneyDresser": "Aparador de miel", + "LihzahrdDresser": "Aparador de lihzahrd", + "Sofa": "Sofá", + "EbonwoodSofa": "Sofá de madera de ébano", + "RichMahoganySofa": "Sofá de caoba rica", + "WoodenSword": "Espada de madera", + "TuxedoShirt": "Camisa de esmoquin", + "PearlwoodSofa": "Sofá de madera perlada", + "ShadewoodSofa": "Sofá de madera sombría", + "BlueDungeonSofa": "Sofá de mazmorra azul", + "GreenDungeonSofa": "Sofá de mazmorra verde", + "PinkDungeonSofa": "Sofá de mazmorra rosa", + "GoldenSofa": "Sofá dorado", + "ObsidianSofa": "Sofá de obsidiana", + "BoneSofa": "Sofá de hueso", + "CactusSofa": "Sofá de cactus", + "SpookySofa": "Sofá tétrico", + "TuxedoPants": "Pantalones de esmoquin", + "SkywareSofa": "Sofá celestial", + "HoneySofa": "Sofá de miel", + "SteampunkSofa": "Sofá steampunk", + "MushroomSofa": "Sofá de champiñón", + "GlassSofa": "Sofá de cristal", + "PumpkinSofa": "Sofá de calabaza", + "LihzahrdSofa": "Sofá lihzahrd", + "SeashellHairpin": "Horquilla de concha", + "MermaidAdornment": "Adorno de sirena", + "MermaidTail": "Cola de sirena", + "SummerHat": "Sombrero veraniego", + "ZephyrFish": "Pez de zafiro", + "Fleshcatcher": "Atrapacarne", + "HotlineFishingHook": "Anzuelo directo", + "FrogLeg": "Anca de rana", + "Anchor": "Ancla", + "CookedFish": "Pescado hecho", + "CookedShrimp": "Gamba hecha", + "Sashimi": "Sashimi", + "BunnyHood": "Máscara de conejito", + "BeeWax": "Cera de abeja", + "CopperPlatingWall": "Pared de cobre", + "StoneSlabWall": "Pared de losa de piedra", + "Sail": "Vela", + "CoralstoneBlock": "Bloque de piedra de coral", + "BlueJellyfish": "Medusa azul", + "GreenJellyfish": "Medusa verde", + "PinkJellyfish": "Medusa rosa", + "BlueJellyfishJar": "Tarro de medusa azul", + "PlumbersHat": "Gorra de fontanero", + "GreenJellyfishJar": "Tarro de medusa verde", + "PinkJellyfishJar": "Tarro de medusa rosa", + "PlumbersShirt": "Camisa de fontanero", + "Batfish": "Pez murciélago", + "BumblebeeTuna": "Atún abejorro", + "Catfish": "Pez gato", + "Cloudfish": "Pez nube", + "Cursedfish": "Pez maldito", + "Dirtfish": "Pez del fango", + "DynamiteFish": "Pez dinamita", + "EaterofPlankton": "Comedor de plancton", + "FallenStarfish": "Estrella de mar caída", + "TheFishofCthulu": "El pez de Cthulhu", + "PlumbersPants": "Pantalones de fontanero", + "Fishotron": "Pezotrón", + "Harpyfish": "Pez arpía", + "Hungerfish": "Pez hambriento", + "Ichorfish": "Pez picor", + "Jewelfish": "Pez joya", + "MirageFish": "Pez espejismo", + "MutantFlinxfin": "Aletacopito mutante", + "Pengfish": "Pez pingüino", + "Pixiefish": "Pez hada", + "Spiderfish": "Pez araña", + "HerosHat": "Gorro de héroe", + "TundraTrout": "Trucha de la tundra", + "UnicornFish": "Pez unicornio", + "GuideVoodooFish": "Pez guía vudú", + "Wyverntail": "Cola de guiverno", + "ZombieFish": "Pez zombi", + "AmanitaFungifin": "Fungifin amanitia", + "Angelfish": "Pez ángel", + "BloodyManowar": "Buque de guerra sangriento", + "Bonefish": "Pez hueso", + "Bunnyfish": "Pez conejo", + "HerosShirt": "Camisa de héroe", + "CapnTunabeard": "Capitán Barbatún", + "Clownfish": "Pez payaso", + "DemonicHellfish": "Pez infernal demoníaco", + "Derpfish": "Pez tonto", + "Fishron": "Fishron", + "InfectedScabbardfish": "Anguila infectada", + "Mudfish": "Misgurnus", + "Slimefish": "Pez slime", + "TropicalBarracuda": "Barracuda tropical", + "KingSlimeTrophy": "Trofeo del rey slime", + "HerosPants": "Pantalones de héroe", + "ShipInABottle": "Barco embotellado", + "KingSlimeMask": "Máscara Rey slime", + "FinWings": "Alas de aleta", + "TreasureMap": "Mapa del tesoro", + "SeaweedPlanter": "Plantador de algas", + "PillaginMePixels": "Píxeles saqueadores", + "FishCostumeMask": "Máscara de disfraz de pez", + "FishCostumeShirt": "Camisa de disfraz de pez", + "WoodenDoor": "Puerta de madera", + "FishBowl": "Pecera", + "FishCostumeFinskirt": "Falda de disfraz de pez", + "GingerBeard": "Barba pelirroja", + "ArchaeologistsHat": "Sombrero de arqueólogo", + "ArchaeologistsJacket": "Chaqueta de arqueólogo", + "ArchaeologistsPants": "Pantalones de arqueólogo", + "OpticStaff": "Báculo óptico", + "BlackThread": "Hilo negro", + "GreenThread": "Hilo verde", + "NinjaHood": "Gorro de ninja", + "NinjaShirt": "Camisa de ninja", + "NinjaPants": "Pantalones de ninja", + "Leather": "Cuero", + "StoneWall": "Pared de piedra", + "RedHat": "Sombrero rojo", + "Goldfish": "Pececillo", + "Robe": "Vestido", + "RobotHat": "Sombrero de robot", + "GoldCrown": "Corona de oro", + "HellfireArrow": "Flecha de fuego infernal", + "Sandgun": "Pistola de arena", + "GuideVoodooDoll": "Muñeco vudú del guía", + "DivingHelmet": "Casco de buceo", + "FamiliarShirt": "Camisa informal", + "Acorn": "Bellota", + "FamiliarPants": "Pantalones informales", + "FamiliarWig": "Peluca informal", + "DemonScythe": "Guadaña demoníaca", + "NightsEdge": "Filo de la noche", + "DarkLance": "Lanza de la oscuridad", + "Coral": "Coral", + "Cactus": "Cactus", + "Trident": "Tridente", + "SilverBullet": "Bala de plata", + "ThrowingKnife": "Cuchillo arrojadizo", + "LesserHealingPotion": "Poción curativa menor", + "Spear": "Lanza", + "Blowpipe": "Cerbatana", + "Glowstick": "Varita luminosa", + "Seed": "Semilla", + "WoodenBoomerang": "Bumerán de madera", + "Aglet": "Herrete", + "StickyGlowstick": "Varita luminosa adhesiva", + "PoisonedKnife": "Cuchillo envenenado", + "ObsidianSkinPotion": "Poción de piel obsidiana", + "RegenerationPotion": "Poción de regeneración", + "AngryTrapperBanner": "Estandarte de trampero enfadado", + "ArmoredVikingBanner": "Estandarte de vikingo acorazado", + "BlackSlimeBanner": "Estandarte de slime paraguas", + "LifeCrystal": "Cristal de vida", + "SwiftnessPotion": "Poción de rapidez", + "BlueArmoredBonesBanner": "Estandarte de huesos azules acorazados", + "BlueCultistArcherBanner": "Estandarte de arquero sectario azul", + "ManaCloakStar": "", + "BlueCultistFighterBanner": "Estandarte de guerrero sectario azul", + "BoneLeeBanner": "Estandarte de Hueso Lee", + "ClingerBanner": "Estandarte de lapa", + "CochinealBeetleBanner": "Estandarte de cochinilla", + "CorruptPenguinBanner": "Estandarte de pingüino corrupto", + "CorruptSlimeBanner": "Estandarte de slime corrupto", + "CorruptorBanner": "Estandarte del Corruptor", + "GillsPotion": "Poción de agallas", + "CrimslimeBanner": "Estandarte de slime carmesí", + "CursedSkullBanner": "Estandarte de calavera maldita", + "CyanBeetleBanner": "Estandarte de escarabajo turquesa", + "DevourerBanner": "Estandarte del gusano devorador", + "DiablolistBanner": "Estandarte del diablo", + "DoctorBonesBanner": "Estandarte del Doctor Látigo", + "DungeonSlimeBanner": "Estandarte de slime de la mazmorra", + "DungeonSpiritBanner": "Estandarte de espíritu de la mazmorra", + "ElfArcherBanner": "Estandarte de elfo arquero", + "ElfCopterBanner": "Estandarte de elfocóptero", + "IronskinPotion": "Poción de piel de hierro", + "EyezorBanner": "Estandarte de Ojozor", + "FlockoBanner": "Estandarte de Copito", + "GhostBanner": "Estandarte de fantasma", + "GiantBatBanner": "Estandarte de murciélago gigante", + "GiantCursedSkullBanner": "Estandarte de calavera maldita gigante", + "GiantFlyingFoxBanner": "Estandarte de zorro volador gigante", + "GingerbreadManBanner": "Estandarte de hombre de jengibre", + "GoblinArcherBanner": "Estandarte de duende arquero", + "GreenSlimeBanner": "Estandarte de slime verde", + "HeadlessHorsemanBanner": "Estandarte del caballero sin cabeza", + "ManaRegenerationPotion": "Poción de regeneración de maná", + "HellArmoredBonesBanner": "Estandarte de huesos infernales acorazados", + "HellhoundBanner": "Estandarte de perro infernal", + "HoppinJackBanner": "Estandarte de Jack Saltarín", + "IceBatBanner": "Estandarte de murciélago del hielo", + "IceGolemBanner": "Estandarte de gólem de hielo", + "IceSlimeBanner": "Estandarte de slime de hielo", + "IchorStickerBanner": "Estandarte de pegatina de icor", + "IlluminantBatBanner": "Estandarte de murciélago luminoso", + "IlluminantSlimeBanner": "Estandarte de slime luminoso", + "JungleBatBanner": "Estandarte de murciélago de la selva", + "MagicPowerPotion": "Poción de poder mágico", + "JungleSlimeBanner": "Estandarte de slime de la selva", + "KrampusBanner": "Estandarte de Krampus", + "LacBeetleBanner": "Estandarte de escarabajo laca", + "LavaBatBanner": "Estandarte de murciélago de lava", + "LavaSlimeBanner": "Estandarte de slime de lava", + "MartianBrainscramblerBanner": "Estandarte del batecerebros marciano", + "MartianDroneBanner": "Estandarte de drone marciano", + "MartianEngineerBanner": "Estandarte de ingeniero marciano", + "MartianGigazapperBanner": "Estandarte del gigaexterminador marciano", + "MartianGreyGruntBanner": "Estandarte del matón gris marciano", + "FeatherfallPotion": "Poción de caída de pluma", + "MartianOfficerBanner": "Estandarte del oficial marciano", + "MartianRaygunnerBanner": "Estandarte del artillero marciano", + "MartianScutlixGunnerBanner": "Estandarte del artillero de scutlix marciano", + "MartianTeslaTurretBanner": "Estandarte de la torreta Tesla marciana", + "MisterStabbyBanner": "Estandarte del señor Stabby", + "MotherSlimeBanner": "Estandarte de slime madre", + "NecromancerBanner": "Estandarte de nigromante", + "NutcrackerBanner": "Estandarte de cascanueces", + "PaladinBanner": "Estandarte de paladín", + "PenguinBanner": "Estandarte de pingüino", + "SpelunkerPotion": "Poción de espeleólogo", + "PinkyBanner": "Estandarte rosado", + "PoltergeistBanner": "Estandarte de poltergeist", + "PossessedArmorBanner": "Estandarte de armadura poseída", + "PresentMimicBanner": "Estandarte de regalo mimo", + "PurpleSlimeBanner": "Estandarte de slime morado", + "RaggedCasterBanner": "Estandarte de mago harapiento", + "RainbowSlimeBanner": "Estandarte de slime arcoíris", + "RavenBanner": "Estandarte de cuervo", + "RedSlimeBanner": "Estandarte de slime rojo", + "RuneWizardBanner": "Estandarte de mago rúnico", + "InvisibilityPotion": "Poción de invisibilidad", + "RustyArmoredBonesBanner": "Estandarte de huesos viejos blindados", + "ScarecrowBanner": "Estandarte de espantapájaros", + "ScutlixBanner": "Estandarte de scutlix", + "SkeletonArcherBanner": "Estandarte de esqueleto arquero", + "SkeletonCommandoBanner": "Estandarte de esqueleto comando", + "SkeletonSniperBanner": "Estandarte de esqueleto francotirador", + "SlimerBanner": "Estandarte de slimer", + "SnatcherBanner": "Estandarte de atrapadora", + "SnowBallaBanner": "Estandarte de triunfador de nieve", + "SnowmanGangstaBanner": "Estandarte de muñeco de nieve malote", + "ShinePotion": "Poción de brillo", + "SpikedIceSlimeBanner": "Estandarte de slime de hielo puntiagudo", + "SpikedJungleSlimeBanner": "Estandarte de slime de la selva puntiagudo", + "SplinterlingBanner": "Estandarte de astilleante", + "SquidBanner": "Estandarte de calamar", + "TacticalSkeletonBanner": "Estandarte de esqueleto táctico", + "TheGroomBanner": "Estandarte de novio", + "TimBanner": "Estandarte de Tim", + "UndeadMinerBanner": "Estandarte de minero no muerto", + "UndeadVikingBanner": "Estandarte de vikingo no muerto", + "WhiteCultistArcherBanner": "Estandarte de arquero sectario blanco", + "NightOwlPotion": "Poción de noctámbulo", + "WhiteCultistCasterBanner": "Estandarte de mago sectario blanco", + "WhiteCultistFighterBanner": "Estandarte de guerrero sectario blanco", + "YellowSlimeBanner": "Estandarte de slime amarillo", + "YetiBanner": "Estandarte de yeti", + "ZombieElfBanner": "Estandarte de elfo zombi", + "StoneBlock": "Bloque de piedra", + "DirtWall": "Pared de tierra", + "BattlePotion": "Poción de batalla", + "ThornsPotion": "Poción de espinas", + "WaterWalkingPotion": "Poción de flotación", + "ArcheryPotion": "Poción de arquero", + "HunterPotion": "Poción de cazador", + "GravitationPotion": "Poción de gravedad", + "GoldChest": "Cofre de oro", + "DaybloomSeeds": "Semillas de resplandor diurno", + "MoonglowSeeds": "Semillas de luz de luna", + "BlinkrootSeeds": "Semillas de raíz intermitente", + "Bottle": "Botella", + "DeathweedSeeds": "Semillas de malahierba", + "WaterleafSeeds": "Semillas de hoja de agua", + "FireblossomSeeds": "Semillas de resplandor de fuego", + "Daybloom": "Resplandor diurno", + "Moonglow": "Luz de luna", + "Blinkroot": "Raíz intermitente", + "Deathweed": "Malahierba", + "Waterleaf": "Hoja de agua", + "Fireblossom": "Resplandor de fuego", + "SharkFin": "Aleta de tiburón", + "WoodenTable": "Mesa de madera", + "Feather": "Pluma", + "Tombstone": "Lápida", + "MimeMask": "Máscara de mimo", + "AntlionMandible": "Mandíbula de hormiga león", + "IllegalGunParts": "Piezas de arma ilegales", + "TheDoctorsShirt": "Camisa del doctor", + "TheDoctorsPants": "Pantalones del doctor", + "GoldenKey": "Llave dorada", + "ShadowChest": "Cofre de las sombras", + "ShadowKey": "Llave de las sombras", + "Furnace": "Forja", + "ObsidianBrickWall": "Pared de ladrillo de obsidiana", + "JungleSpores": "Esporas de la selva", + "Loom": "Telar", + "Piano": "Piano", + "Dresser": "Aparador", + "Bench": "Banco", + "Bathtub": "Bañera", + "RedBanner": "Estandarte rojo", + "GreenBanner": "Estandarte verde", + "BlueBanner": "Estandarte azul", + "WoodenChair": "Silla de madera", + "YellowBanner": "Estandarte amarillo", + "LampPost": "Farola", + "TikiTorch": "Antorcha tiki", + "Barrel": "Barril", + "ChineseLantern": "Farolillo de papel", + "CookingPot": "Perol", + "Safe": "Caja fuerte", + "SkullLantern": "Cráneo con vela", + "TrashCan": "Cubo de basura", + "PlatinumBow": "Arco de platino", + "PlatinumHammer": "Martillo de platino", + "PlatinumAxe": "Hacha de platino", + "PlatinumShortsword": "Espada corta de platino", + "PlatinumBroadsword": "Espada larga de platino", + "PlatinumPickaxe": "Pico de platino", + "TungstenBow": "Arco de tungsteno", + "TungstenHammer": "Martillo de tungsteno", + "TungstenAxe": "Hacha de tungsteno", + "TungstenShortsword": "Espada corta de tungsteno", + "Candelabra": "Candelabro", + "TungstenBroadsword": "Espada larga de tungsteno", + "TungstenPickaxe": "Pico de tungsteno", + "LeadBow": "Arco de plomo", + "LeadHammer": "Martillo de plomo", + "LeadAxe": "Hacha de plomo", + "LeadShortsword": "Espada corta de plomo", + "LeadBroadsword": "Espada larga de plomo", + "LeadPickaxe": "Pico de plomo", + "TinBow": "Arco de estaño", + "TinHammer": "Martillo de estaño", + "IronAnvil": "Yunque de hierro", + "PinkVase": "Recipiente rosa", + "TinAxe": "Hacha de estaño", + "TinShortsword": "Espada corta de estaño", + "TinBroadsword": "Espada larga de estaño", + "TinPickaxe": "Pico de estaño", + "CopperBow": "Arco de cobre", + "CopperHammer": "Martillo de cobre", + "CopperAxe": "Hacha de cobre", + "CopperShortsword": "Espada corta de cobre", + "CopperBroadsword": "Espada larga de cobre", + "CopperPickaxe": "Pico de cobre", + "Mug": "Taza", + "SilverBow": "Arco de plata", + "SilverHammer": "Martillo de plata", + "SilverAxe": "Hacha de plata", + "SilverShortsword": "Espada corta de plata", + "SilverBroadsword": "Espada larga de plata", + "SilverPickaxe": "Pico de plata", + "GoldBow": "Arco de oro", + "GoldHammer": "Martillo de oro", + "GoldAxe": "Hacha de oro", + "GoldShortsword": "Espada corta de oro", + "Keg": "Barrica", + "GoldBroadsword": "Espada larga de oro", + "GoldPickaxe": "Pico de oro", + "Ale": "Cerveza", + "Bookcase": "Librería", + "Throne": "Trono", + "Bowl": "Cuenco", + "BowlofSoup": "Cuenco de sopa", + "Toilet": "Retrete", + "GrandfatherClock": "Reloj de pie", + "WorkBench": "Banco de trabajo", + "ArmorStatue": "Estatua de armadura", + "GoblinBattleStandard": "Estandarte de batalla duende", + "TatteredCloth": "Harapos", + "Sawmill": "Serrería", + "CobaltOre": "Mineral de cobalto", + "MythrilOre": "Mineral de mithril", + "AdamantiteOre": "Mineral de adamantita", + "Pwnhammer": "Gran martillo", + "Excalibur": "Excalibur", + "HallowedSeeds": "Semillas sagradas", + "Goggles": "Gafas de protección", + "EbonsandBlock": "Bloque de arena de ébano", + "CobaltHat": "Gorro de cobalto", + "CobaltHelmet": "Casco de cobalto", + "CobaltMask": "Máscara de cobalto", + "CobaltBreastplate": "Coraza de cobalto", + "CobaltLeggings": "Perneras de cobalto", + "MythrilHood": "Caperuza de mithril", + "MythrilHelmet": "Casco de mithril", + "MythrilHat": "Gorro de mithril", + "MythrilChainmail": "Cota de malla de mithril", + "Lens": "Lentes", + "MythrilGreaves": "Grebas de mithril", + "CobaltBar": "Lingote de cobalto", + "MythrilBar": "Lingote de mithril", + "CobaltChainsaw": "Motosierra de cobalto", + "MythrilChainsaw": "Motosierra de mithril", + "CobaltDrill": "Taladro de cobalto", + "MythrilDrill": "Taladro de mithril", + "AdamantiteChainsaw": "Motosierra de adamantita", + "AdamantiteDrill": "Taladro de adamantita", + "DaoofPow": "Flagelo Taoísta", + "WoodenBow": "Arco de madera", + "MythrilHalberd": "Alabarda de mithril", + "AdamantiteBar": "Lingote de adamantita", + "GlassWall": "Pared de cristal", + "Compass": "Brújula", + "DivingGear": "Equipo de buceo", + "GPS": "GPS", + "ObsidianHorseshoe": "Herradura de obsidiana", + "ObsidianShield": "Escudo de obsidiana", + "TinkerersWorkshop": "Taller de chapuzas", + "CloudinaBalloon": "Nube en globo", + "IronBroadsword": "Espada larga de hierro", + "WoodenArrow": "Flecha de madera", + "AdamantiteHeadgear": "Tocado de adamantita", + "AdamantiteHelmet": "Casco de adamantita", + "AdamantiteMask": "Máscara de adamantita", + "AdamantiteBreastplate": "Coraza de adamantita", + "AdamantiteLeggings": "Perneras de adamantita", + "SpectreBoots": "Botas de espectro", + "AdamantiteGlaive": "Guja de adamantita", + "Toolbelt": "Cinturón de herramientas", + "PearlsandBlock": "Bloque de arena perlada", + "PearlstoneBlock": "Bloque de piedra perlada", + "FlamingArrow": "Flecha ardiente", + "MiningShirt": "Camisa de minero", + "MiningPants": "Pantalones de minero", + "PearlstoneBrick": "Ladrillo de piedra perlada", + "IridescentBrick": "Ladrillo tornasol", + "MudstoneBlock": "Ladrillo de lutita", + "CobaltBrick": "Ladrillo de cobalto", + "MythrilBrick": "Ladrillo de mithril", + "PearlstoneBrickWall": "Pared de ladrillo de piedra perlada", + "IridescentBrickWall": "Pared de ladrillo tornasol", + "MudstoneBrickWall": "Pared de ladrillo de lutita", + "Shuriken": "Estrellas ninja", + "CobaltBrickWall": "Pared de ladrillo de cobalto", + "MythrilBrickWall": "Pared de ladrillo de mithril", + "HolyWater": "Agua sagrada", + "UnholyWater": "Agua impura", + "SiltBlock": "Bloque de limo", + "FairyBell": "Campana de hada", + "BreakerBlade": "Espada despedazadora", + "BlueTorch": "Antorcha azul", + "RedTorch": "Antorcha roja", + "GreenTorch": "Antorcha verde", + "SuspiciousLookingEye": "Ojo de aspecto sospechoso", + "PurpleTorch": "Antorcha morada", + "WhiteTorch": "Antorcha blanca", + "YellowTorch": "Antorcha amarilla", + "DemonTorch": "Antorcha demoníaca", + "ClockworkAssaultRifle": "Fusil de asalto de precisión", + "CobaltRepeater": "Repetidor de cobalto", + "MythrilRepeater": "Repetidor de mithril", + "DualHook": "Gancho doble", + "StarStatue": "Estatua de estrella", + "SwordStatue": "Estatua de espada", + "DemonBow": "Arco demoníaco", + "SlimeStatue": "Estatua de slime", + "GoblinStatue": "Estatua de duende", + "ShieldStatue": "Estatua de escudo", + "BatStatue": "Estatua de murciélago", + "FishStatue": "Estatua de pez", + "BunnyStatue": "Estatua de conejito", + "SkeletonStatue": "Estatua de esqueleto", + "ReaperStatue": "Estatua de la Muerte", + "WomanStatue": "Estatua de mujer", + "ImpStatue": "Estatua de diablillo", + "WarAxeoftheNight": "Hacha de la noche", + "GargoyleStatue": "Estatua de gárgola", + "GloomStatue": "Estatua melancólica", + "HornetStatue": "Estatua de avispón", + "BombStatue": "Estatua de bomba", + "CrabStatue": "Estatua de cangrejo", + "HammerStatue": "Estatua de martillo", + "PotionStatue": "Estatua de poción", + "SpearStatue": "Estatua de lanza", + "CrossStatue": "Estatua de cruz", + "JellyfishStatue": "Estatua de medusa", + "LightsBane": "Azote de la luz", + "BowStatue": "Estatua de arco", + "BoomerangStatue": "Estatua de bumerán", + "BootStatue": "Estatua de bota", + "ChestStatue": "Estatua de cofre", + "BirdStatue": "Estatua de pájaro", + "AxeStatue": "Estatua de hacha", + "CorruptStatue": "Estatua de corrupción", + "TreeStatue": "Estatua de árbol", + "AnvilStatue": "Estatua de yunque", + "PickaxeStatue": "Estatua de pico", + "UnholyArrow": "Flecha infame", + "MushroomStatue": "Estatua de champiñón", + "EyeballStatue": "Estatua de ojo", + "PillarStatue": "Estatua de columna", + "HeartStatue": "Estatua de corazón", + "PotStatue": "Estatua de marmita", + "SunflowerStatue": "Estatua de girasol", + "KingStatue": "Estatua de rey", + "QueenStatue": "Estatua de reina", + "PiranhaStatue": "Estatua de piraña", + "PlankedWall": "Pared de tablones", + "Chest": "Cofre", + "WoodenBeam": "Viga de madera", + "AdamantiteRepeater": "Repetidor de adamantita", + "AdamantiteSword": "Espada de adamantita", + "CobaltSword": "Espada de cobalto", + "MythrilSword": "Espada de mithril", + "MoonCharm": "Hechizo de luna", + "Ruler": "Regla", + "CrystalBall": "Bola de cristal", + "DiscoBall": "Bola de discoteca", + "SorcererEmblem": "Emblema de hechicero", + "BandofRegeneration": "Banda de regeneración", + "WarriorEmblem": "Emblema de guerrero", + "RangerEmblem": "Emblema de guardián", + "DemonWings": "Alas demoníacas", + "AngelWings": "Alas de ángel", + "MagicalHarp": "Arpa mágica", + "RainbowRod": "Varita multicolor", + "IceRod": "Varita helada", + "NeptunesShell": "Concha de Neptuno", + "Mannequin": "Maniquí", + "GreaterHealingPotion": "Poción curativa mayor", + "Mushroom": "Champiñón", + "MagicMirror": "Espejo mágico", + "GreaterManaPotion": "Poción de maná mayor", + "PixieDust": "Polvo de hada", + "CrystalShard": "Fragmento de cristal", + "ClownHat": "Sombrero de payaso", + "ClownShirt": "Camisa de payaso", + "ClownPants": "Pantalones de payaso", + "Flamethrower": "Lanzallamas", + "Bell": "Campana", + "Harp": "Arpa", + "Wrench": "Llave inglesa roja", + "JestersArrow": "Flecha de bufón", + "WireCutter": "Alicates", + "ActiveStoneBlock": "Bloque de piedra activo", + "InactiveStoneBlock": "Bloque de piedra inactivo", + "Lever": "Palanca", + "LaserRifle": "Fusil láser", + "CrystalBullet": "Bala de cristal", + "HolyArrow": "Flecha sagrada", + "MagicDagger": "Daga mágica", + "CrystalStorm": "Tormenta de cristal", + "CursedFlames": "Llamas malditas", + "AngelStatue": "Estatua de ángel", + "SoulofLight": "Alma de luz", + "SoulofNight": "Alma de noche", + "CursedFlame": "Llama maldita", + "CursedTorch": "Antorcha maldita", + "AdamantiteForge": "Forja de adamantita", + "MythrilAnvil": "Yunque de mithril", + "UnicornHorn": "Cuerno de unicornio", + "DarkShard": "Fragmento de oscuridad", + "LightShard": "Fragmento de luz", + "RedPressurePlate": "Placa de presión roja", + "CloudinaBottle": "Nube embotellada", + "Wire": "Cable", + "SpellTome": "Tomo encantado", + "StarCloak": "Manto de estrellas", + "Megashark": "Megatiburón", + "Shotgun": "Escopeta", + "PhilosophersStone": "Piedra filosofal", + "TitanGlove": "Guante de titán", + "CobaltNaginata": "Naginata de cobalto", + "Switch": "Interruptor", + "DartTrap": "Trampa de dardos", + "HermesBoots": "Botas de Hermes", + "Boulder": "Roca", + "GreenPressurePlate": "Placa de presión verde", + "GrayPressurePlate": "Placa de presión gris", + "BrownPressurePlate": "Placa de presión marrón", + "MechanicalEye": "Ojo mecánico", + "CursedArrow": "Flecha maldita", + "CursedBullet": "Bala maldita", + "SoulofFright": "Alma de terror", + "SoulofMight": "Alma de poder", + "SoulofSight": "Alma de visión", + "EnchantedBoomerang": "Bumerán encantado", + "Gungnir": "Gungnir", + "HallowedPlateMail": "Cota de placas sagrada", + "HallowedGreaves": "Grebas sagradas", + "HallowedHelmet": "Casco sagrado", + "CrossNecklace": "Collar con cruz", + "ManaFlower": "Flor de maná", + "MechanicalWorm": "Gusano mecánico", + "MechanicalSkull": "Cráneo mecánico", + "HallowedHeadgear": "Tocado sagrado", + "HallowedMask": "Máscara sagrada", + "DemoniteOre": "Mineral endemoniado", + "SlimeCrown": "Corona de slime", + "LightDisc": "Disco de luz", + "MusicBoxOverworldDay": "Caja de música (Superficie de día)", + "MusicBoxEerie": "Caja de música (Sobrecogedor)", + "MusicBoxNight": "Caja de música (Noche)", + "MusicBoxTitle": "Caja de música (Título)", + "MusicBoxUnderground": "Caja de música (Subsuelo)", + "MusicBoxBoss1": "Caja de música (Jefe final 1)", + "MusicBoxJungle": "Caja de música (Selva)", + "MusicBoxCorruption": "Caja de música (Corrupción)", + "DemoniteBar": "Lingote endemoniado", + "MusicBoxUndergroundCorruption": "Caja de música (Corrupción en el subsuelo)", + "MusicBoxTheHallow": "Caja de música (Terreno sagrado)", + "MusicBoxBoss2": "Caja de música (Jefe final 2)", + "MusicBoxUndergroundHallow": "Caja de música (Subsuelo sagrado)", + "MusicBoxBoss3": "Caja de música (Jefe final 3)", + "SoulofFlight": "Alma de vuelo", + "MusicBox": "Caja de música", + "DemoniteBrick": "Ladrillo endemoniado", + "HallowedRepeater": "Repetidor sagrado", + "Drax": "Taladro hacha", + "Heart": "Corazón", + "Explosives": "Explosivos", + "InletPump": "Colector de entrada", + "OutletPump": "Colector de salida", + "Timer1Second": "Temporizador de 1 segundo", + "Timer3Second": "Temporizador de 3 segundos", + "Timer5Second": "Temporizador de 5 segundos", + "CandyCaneBlock": "Bloque de caramelo", + "CandyCaneWall": "Pared de caramelo", + "SantaHat": "Gorro de Papá Noel", + "SantaShirt": "Camisa de Papá Noel", + "CorruptSeeds": "Semillas corrompidas", + "SantaPants": "Pantalones de Papá Noel", + "GreenCandyCaneBlock": "Bloque de caramelo verde", + "GreenCandyCaneWall": "Pared de caramelo verde", + "SnowBlock": "Bloque de nieve", + "SnowBrick": "Ladrillo de nieve", + "SnowBrickWall": "Pared de ladrillos de nieve", + "BlueLight": "Luz azul", + "RedLight": "Luz roja", + "GreenLight": "Luz verde", + "BluePresent": "Regalo azul", + "IronShortsword": "Espada corta de hierro", + "VileMushroom": "Champiñón vil", + "GreenPresent": "Regalo verde", + "YellowPresent": "Regalo amarillo", + "SnowGlobe": "Globo de nieve", + "Carrot": "Zanahoria", + "AdamantiteBeam": "Viga de adamantita", + "AdamantiteBeamWall": "Viga de pared de adamantita", + "DemoniteBrickWall": "Pared de ladrillo endemoniado", + "SandstoneBrick": "Ladrillo de arenisca", + "SandstoneBrickWall": "Pared de ladrillo de arenisca", + "EbonstoneBrick": "Ladrillo de piedra de ébano", + "EbonstoneBlock": "Bloque de piedra de ébano", + "EbonstoneBrickWall": "Pared de ladrillo de piedra de ébano", + "RedStucco": "Estuco rojo", + "YellowStucco": "Estuco amarillo", + "GreenStucco": "Estuco verde", + "GrayStucco": "Estuco gris", + "RedStuccoWall": "Pared de estuco rojo", + "YellowStuccoWall": "Pared de estuco amarillo", + "GreenStuccoWall": "Pared de estuco verde", + "GrayStuccoWall": "Pared de estuco gris", + "Ebonwood": "Madera de ébano", + "GrassSeeds": "Semillas de césped", + "RichMahogany": "Madera de caoba rico", + "Pearlwood": "Madera perlada", + "EbonwoodWall": "Pared de madera de ébano", + "RichMahoganyWall": "Pared de madera de caoba rico", + "PearlwoodWall": "Pared de madera perlada", + "EbonwoodChest": "Cofre de madera de ébano", + "RichMahoganyChest": "Cofre de madera de caoba rico", + "PearlwoodChest": "Cofre de madera perlada", + "EbonwoodChair": "Silla de madera de ébano", + "RichMahoganyChair": "Silla de madera de caoba rica", + "Sunflower": "Girasol", + "PearlwoodChair": "Silla de madera perlada", + "EbonwoodPlatform": "Plataforma de madera de ébano", + "RichMahoganyPlatform": "Plataforma de madera de caoba rica", + "PearlwoodPlatform": "Plataforma de madera perlada", + "BonePlatform": "Plataforma de hueso", + "EbonwoodWorkBench": "Banco de trabajo de madera de ébano", + "RichMahoganyWorkBench": "Banco de trabajo de madera de caoba rico", + "PearlwoodWorkBench": "Banco de trabajo de madera perlada", + "EbonwoodTable": "Mesa de madera de ébano", + "RichMahoganyTable": "Mesa de madera de caoba rica", + "Vilethorn": "Espina vil", + "PearlwoodTable": "Mesa de madera perlada", + "EbonwoodPiano": "Piano de madera de ébano", + "RichMahoganyPiano": "Piano de madera de caoba rico", + "PearlwoodPiano": "Piano de madera perlada", + "EbonwoodBed": "Cama de madera de ébano", + "RichMahoganyBed": "Cama de madera de caoba rica", + "PearlwoodBed": "Cama de madera perlada", + "EbonwoodDresser": "Aparador de madera de ébano", + "RichMahoganyDresser": "Aparador de madera de caoba rico", + "PearlwoodDresser": "Aparador de madera perlada", + "Starfury": "Furia de estrellas", + "EbonwoodDoor": "Puerta de madera de ébano", + "RichMahoganyDoor": "Puerta de madera de caoba rica", + "PearlwoodDoor": "Puerta de madera perlada", + "EbonwoodSword": "Espada de madera de ébano", + "EbonwoodHammer": "Martillo de madera de ébano", + "EbonwoodBow": "Arco de madera de ébano", + "RichMahoganySword": "Espada de madera de caoba rica", + "RichMahoganyHammer": "Martillo de madera de caoba rico", + "RichMahoganyBow": "Arco de madera de caoba rico", + "PearlwoodSword": "Espada de madera perlada", + "PurificationPowder": "Polvo de purificación", + "PearlwoodHammer": "Martillo de madera perlada", + "PearlwoodBow": "Arco de madera perlada", + "RainbowBrick": "Ladrillo multicolor", + "RainbowBrickWall": "Pared de ladrillo multicolor", + "IceBlock": "Bloque de hielo", + "RedsWings": "Alas de Red", + "RedsHelmet": "Casco de Red", + "RedsBreastplate": "Coraza de Red", + "RedsLeggings": "Perneras de Red", + "Fish": "Pez", + "VilePowder": "Polvo vil", + "IceBoomerang": "Bumerán de hielo", + "Keybrand": "Llave-espada", + "Cutlass": "Alfanje", + "TrueExcalibur": "Excalibur verdadera", + "TrueNightsEdge": "Espada de la noche verdadera", + "Frostbrand": "Espada helada", + "RedPotion": "Poción roja", + "TacticalShotgun": "Escopeta táctica", + "RottenChunk": "Trozo podrido", + "IvyChest": "Cofre de hiedra", + "Marrow": "Médula", + "UnholyTrident": "Tridente infame", + "FrostHelmet": "Casco helado", + "FrostBreastplate": "Coraza helada", + "FrostLeggings": "Perneras heladas", + "TinHelmet": "Casco de estaño", + "TinChainmail": "Cota de malla de estaño", + "TinGreaves": "Grebas de estaño", + "WormTooth": "Diente de gusano", + "LeadHelmet": "Casco de plomo", + "LeadChainmail": "Cota de malla de plomo", + "LeadGreaves": "Grebas de plomo", + "TungstenHelmet": "Casco de tungsteno", + "TungstenChainmail": "Cota de malla de tungsteno", + "TungstenGreaves": "Grebas de tungsteno", + "PlatinumHelmet": "Casco de platino", + "PlatinumChainmail": "Cota de malla de platino", + "PlatinumGreaves": "Grebas de platino", + "TinOre": "Mineral de estaño", + "IronHammer": "Martillo de hierro", + "WormFood": "Cebo de gusanos", + "LeadOre": "Mineral de plomo", + "TungstenOre": "Mineral de tungsteno", + "PlatinumOre": "Mineral de platino", + "TinBar": "Lingote de estaño", + "LeadBar": "Lingote de plomo", + "TungstenBar": "Lingote de tungsteno", + "PlatinumBar": "Lingote de platino", + "TinWatch": "Reloj de estaño", + "TungstenWatch": "Reloj de tungsteno", + "PlatinumWatch": "Reloj de platino", + "CopperCoin": "Moneda de cobre", + "TinChandelier": "Lámpara araña de estaño", + "TungstenChandelier": "Lámpara araña de tungsteno", + "PlatinumChandelier": "Lámpara araña de platino", + "PlatinumCandle": "Vela de platino", + "PlatinumCandelabra": "Candelabro de platino", + "PlatinumCrown": "Corona de platino", + "LeadAnvil": "Yunque de plomo", + "TinBrick": "Ladrillo de estaño", + "TungstenBrick": "Ladrillo de tungsteno", + "PlatinumBrick": "Ladrillo de platino", + "SilverCoin": "Moneda de plata", + "TinBrickWall": "Pared de ladrillo de estaño", + "TungstenBrickWall": "Pared de ladrillo de tungsteno", + "PlatinumBrickWall": "Pared de ladrillo de platino", + "BeamSword": "Espada lumínica", + "IceBlade": "Espada de hielo", + "IceBow": "Arco de hielo", + "FrostStaff": "Báculo helado", + "WoodHelmet": "Casco de madera", + "WoodBreastplate": "Coraza de madera", + "WoodGreaves": "Grebas de madera", + "GoldCoin": "Moneda de oro", + "EbonwoodHelmet": "Casco de madera de ébano", + "EbonwoodBreastplate": "Coraza de madera de ébano", + "EbonwoodGreaves": "Grebas de madera de ébano", + "RichMahoganyHelmet": "Casco de madera de caoba rico", + "RichMahoganyBreastplate": "Coraza de madera de caoba rica", + "RichMahoganyGreaves": "Grebas de madera de caoba ricas", + "PearlwoodHelmet": "Casco de madera perlada", + "PearlwoodBreastplate": "Coraza de madera perlada", + "PearlwoodGreaves": "Grebas de madera perlada", + "AmethystStaff": "Báculo de amatista", + "PlatinumCoin": "Moneda de platino", + "TopazStaff": "Báculo de topacio", + "SapphireStaff": "Báculo de zafiro", + "EmeraldStaff": "Báculo de esmeralda", + "RubyStaff": "Báculo de rubí", + "DiamondStaff": "Báculo de diamante", + "GrassWall": "Pared de hierba", + "JungleWall": "Pared de selva", + "FlowerWall": "Pared de flor", + "Jetpack": "Mochila cohete", + "ButterflyWings": "Alas de mariposa", + "FallenStar": "Estrella fugaz", + "CactusWall": "Pared de cactus", + "Cloud": "Nube", + "CloudWall": "Pared de nube", + "Seaweed": "Alga", + "RuneHat": "Sombrero rúnico", + "RuneRobe": "Vestido rúnico", + "MushroomSpear": "Lanza de champiñón", + "TerraBlade": "Espada Terra", + "GrenadeLauncher": "Lanzagranadas", + "RocketLauncher": "Lanzacohetes", + "CopperGreaves": "Grebas de cobre", + "ProximityMineLauncher": "Lanzaminas de proximidad", + "FairyWings": "Alas de hada", + "SlimeBlock": "Bloque de slime", + "FleshBlock": "Bloque de carne", + "MushroomWall": "Pared de champiñón", + "RainCloud": "Nube de lluvia", + "BoneBlock": "Bloque de hueso", + "FrozenSlimeBlock": "Bloque de slime congelado", + "BoneBlockWall": "Pared de bloque de hueso", + "SlimeBlockWall": "Pared de bloque de slime", + "IronGreaves": "Grebas de hierro", + "FleshBlockWall": "Pared de bloque de carne", + "RocketI": "Cohete I", + "RocketII": "Cohete II", + "RocketIII": "Cohete III", + "RocketIV": "Cohete IV", + "AsphaltBlock": "Bloque de asfalto", + "CobaltPickaxe": "Pico de cobalto", + "MythrilPickaxe": "Pico de mithril", + "AdamantitePickaxe": "Pico de adamantita", + "Clentaminator": "Clentaminator", + "SilverGreaves": "Grebas de plata", + "GreenSolution": "Solución verde", + "BlueSolution": "Solución azul", + "PurpleSolution": "Solución morada", + "DarkBlueSolution": "Solución azul oscura", + "RedSolution": "Solución roja", + "HarpyWings": "Alas de arpía", + "BoneWings": "Alas de hueso", + "Hammush": "Martillo champiñón", + "NettleBurst": "Relámpago de ortigas", + "AnkhBanner": "Estandarte de cruz ansata", + "GoldGreaves": "Grebas de oro", + "SnakeBanner": "Estandarte de serpiente", + "OmegaBanner": "Estandarte omega", + "CrimsonHelmet": "Casco carmesí", + "CrimsonScalemail": "Cota de escamas carmesí", + "CrimsonGreaves": "Grebas carmesí", + "BloodButcherer": "Espada carnicera", + "TendonBow": "Arco de tendón", + "FleshGrinder": "Picadora de carne", + "DeathbringerPickaxe": "Pico mortífero", + "BloodLustCluster": "Hacha sed de sangre", + "Torch": "Antorcha", + "CopperChainmail": "Cota de malla de cobre", + "TheUndertaker": "El enterrador", + "TheMeatball": "La albóndiga", + "TheRottedFork": "El tenedor podrido", + "LivingWoodChair": "Silla de madera viviente", + "CactusChair": "Silla de cactus", + "BoneChair": "Silla de hueso", + "FleshChair": "Silla de carne", + "IronChainmail": "Cota de malla de hierro", + "MushroomChair": "Silla de champiñón", + "BoneWorkBench": "Banco de trabajo de hueso", + "CactusWorkBench": "Banco de trabajo de cactus", + "FleshWorkBench": "Banco de trabajo de carne", + "MushroomWorkBench": "Banco de trabajo de champiñón", + "SlimeWorkBench": "Banco de trabajo de slime", + "CactusDoor": "Puerta de cactus", + "FleshDoor": "Puerta de carne", + "MushroomDoor": "Puerta de champiñón", + "LivingWoodDoor": "Puerta de madera viviente", + "SilverChainmail": "Cota de malla de plata", + "BoneDoor": "Puerta de hueso", + "FlameWings": "Alas de llamas", + "FrozenWings": "Alas congeladas", + "GhostWings": "Alas espectrales", + "SunplateBlock": "Bloque soleado", + "DiscWall": "Pared de disco", + "SkywareChair": "Silla celestial", + "BoneTable": "Mesa de hueso", + "FleshTable": "Mesa de carne", + "LivingWoodTable": "Mesa de madera viviente", + "GoldChainmail": "Cota de malla de oro", + "SkywareTable": "Mesa celestial", + "LivingWoodChest": "Cofre de madera viviente", + "LivingWoodWand": "Varita de madera viviente", + "PurpleIceBlock": "Bloque de hielo morado", + "PinkIceBlock": "Bloque de hielo rosa", + "RedIceBlock": "Bloque de hielo rojo", + "CrimstoneBlock": "Bloque de piedra carmesí", + "SkywareDoor": "Puerta celestial", + "SkywareChest": "Cofre celestial", + "SteampunkHat": "Sombrero steampunk", + "GrapplingHook": "Gancho de escalada", + "SteampunkShirt": "Camisa steampunk", + "SteampunkPants": "Pantalones steampunk", + "BeeHat": "Sombrero de abeja", + "BeeShirt": "Camisa de abeja", + "BeePants": "Pantalones de abeja", + "WorldBanner": "Estandarte del mundo", + "SunBanner": "Estandarte de sol", + "GravityBanner": "Estandarte de gravedad", + "PharaohsMask": "Máscara del faraón", + "Actuator": "Activador", + "Chain": "Cadena", + "BlueWrench": "Llave inglesa azul", + "GreenWrench": "Llave inglesa verde", + "BluePressurePlate": "Placa de presión azul", + "YellowPressurePlate": "Placa de presión amarilla", + "DiscountCard": "Tarjeta de descuentos", + "LuckyCoin": "Moneda de la suerte", + "UnicornonaStick": "Unicornio en un palo", + "SandstorminaBottle": "Tormenta de arena embotellada", + "BeachBall": "Balón de playa", + "ShadowScale": "Escama de las sombras", + "CharmofMyths": "Talismán de mitos", + "MoonShell": "Concha de la luna", + "StarVeil": "Velo estelar", + "WaterWalkingBoots": "Botas de flotación", + "Tiara": "Tiara", + "PrincessDress": "Vestido de princesa", + "PharaohsRobe": "Túnica de faraón", + "GreenCap": "Gorra verde", + "MushroomCap": "Gorra champiñón", + "TamOShanter": "Tam O' Shanter", + "PiggyBank": "Hucha", + "MummyMask": "Máscara de momia", + "MummyShirt": "Camisa de momia", + "MummyPants": "Pantalones de momia", + "CowboyHat": "Sombrero de vaquero", + "CowboyJacket": "Chaqueta de vaquero", + "CowboyPants": "Pantalones de vaquero", + "PirateHat": "Sombrero pirata", + "PirateShirt": "Camisa pirata", + "PiratePants": "Pantalones pirata", + "VikingHelmet": "Casco vikingo", + "MiningHelmet": "Casco de minero", + "CrimtaneOre": "Mineral carmesí", + "CactusSword": "Espada de cactus", + "CactusPickaxe": "Pico de cactus", + "IceBrick": "Ladrillo de hielo", + "IceBrickWall": "Pared de ladrillo de hielo", + "AdhesiveBandage": "Vendaje adhesivo", + "ArmorPolish": "Pulidor de armaduras", + "Bezoar": "Bezoar", + "Blindfold": "Venda", + "FastClock": "Reloj rápido", + "CopperHelmet": "Casco de cobre", + "Megaphone": "Megáfono", + "Nazar": "Nazar", + "Vitamins": "Vitaminas", + "TrifoldMap": "Mapa tríptico", + "CactusHelmet": "Casco de cactus", + "CactusBreastplate": "Coraza de cactus", + "CactusLeggings": "Perneras de cactus", + "PowerGlove": "Guante de poder", + "LightningBoots": "Botas relámpago", + "SunStone": "Piedra de sol", + "Wood": "Madera", + "IronHelmet": "Casco de hierro", + "MoonStone": "Piedra de luna", + "ArmorBracing": "Fortalecedor de armadura", + "MedicatedBandage": "Vendaje medicinal", + "ThePlan": "El plan", + "CountercurseMantra": "Mantra antimaldición", + "CoinGun": "Pistola de monedas", + "LavaCharm": "Talismán de lava", + "ObsidianWaterWalkingBoots": "Botas de flotación obsidianas", + "LavaWaders": "Katiuskas de lava", + "PureWaterFountain": "Fuente de agua pura", + "SilverHelmet": "Casco de plata", + "DesertWaterFountain": "Fuente del desierto", + "Shadewood": "Madera sombría", + "ShadewoodDoor": "Puerta de madera sombría", + "ShadewoodPlatform": "Plataforma de madera sombría", + "ShadewoodChest": "Cofre de madera sombría", + "ShadewoodChair": "Silla de madera sombría", + "ShadewoodWorkBench": "Banco de trabajo de madera sombría", + "ShadewoodTable": "Mesa de madera sombría", + "ShadewoodDresser": "Aparador de madera sombría", + "ShadewoodPiano": "Piano de madera sombría", + "GoldHelmet": "Casco de oro", + "ShadewoodBed": "Cama de madera sombría", + "ShadewoodSword": "Espada de madera sombría", + "ShadewoodHammer": "Martillo de madera sombría", + "ShadewoodBow": "Arco de madera sombría", + "ShadewoodHelmet": "Casco de madera sombría", + "ShadewoodBreastplate": "Coraza de madera sombría", + "ShadewoodGreaves": "Grebas de madera sombría", + "ShadewoodWall": "Pared de madera sombría", + "Cannon": "Cañón", + "Cannonball": "Bala de cañón", + "WoodWall": "Pared de madera", + "FlareGun": "Pistola de bengalas", + "Flare": "Bengala", + "BoneWand": "Varita de hueso", + "LeafWand": "Varita de hoja", + "FlyingCarpet": "Alfombra voladora", + "AvengerEmblem": "Emblema de vengador", + "MechanicalGlove": "Guante mecánico", + "LandMine": "Mina antipersonal", + "PaladinsShield": "Escudo de paladín", + "WebSlinger": "Lanzatelarañas", + "WoodPlatform": "Plataforma de madera", + "JungleWaterFountain": "Fuente de la selva", + "IcyWaterFountain": "Fuente de agua helada", + "CorruptWaterFountain": "Fuente de agua corrupta", + "CrimsonWaterFountain": "Fuente de agua carmesí", + "HallowedWaterFountain": "Fuente de agua sagrada", + "BloodWaterFountain": "Fuente de agua sangrienta", + "Umbrella": "Paraguas", + "ChlorophyteOre": "Mineral de clorofita", + "SteampunkWings": "Alas steampunk", + "Snowball": "Bola de nieve", + "FlintlockPistol": "Pistola de pedernal", + "IceSkates": "Patines de hielo", + "SnowballLauncher": "Lanzabolas de nieve", + "WebCoveredChest": "Cofre cubierto de telarañas", + "ClimbingClaws": "Garras de escalada", + "AncientIronHelmet": "Casco de hierro antiguo", + "AncientGoldHelmet": "Casco de oro antiguo", + "AncientShadowHelmet": "Casco de las sombras antiguo", + "AncientShadowScalemail": "Cota de escamas de las sombras antiguas", + "AncientShadowGreaves": "Grebas de las sombras antiguas", + "AncientNecroHelmet": "Necrocasco antiguo", + "Musket": "Mosquete", + "AncientCobaltHelmet": "Casco de cobalto antiguo", + "AncientCobaltBreastplate": "Coraza de cobalto antiguo", + "AncientCobaltLeggings": "Perneras de cobalto antiguas", + "BlackBelt": "Cinturón negro", + "Boomstick": "Explosiva", + "Rope": "Cuerda", + "Campfire": "Hoguera", + "Marshmallow": "Nube dulce", + "MarshmallowonaStick": "Nube dulce en un palo", + "CookedMarshmallow": "Nube dulce bien hecha", + "MusketBall": "Bala de mosquete", + "RedRocket": "Cohete rojo", + "GreenRocket": "Cohete verde", + "BlueRocket": "Cohete azul", + "YellowRocket": "Cohete amarillo", + "IceTorch": "Antorcha de hielo", + "ShoeSpikes": "Zapatos de púa", + "TigerClimbingGear": "Equipo de escalada de tigre", + "Tabi": "Tabi", + "Minishark": "Minitiburón", + "PinkThread": "Hilo rosa", + "ManaRegenerationBand": "Banda de regeneración de maná", + "SandstorminaBalloon": "Tormenta de arena en globo", + "MasterNinjaGear": "Equipo de maestro ninja", + "RopeCoil": "Rollo de cuerda", + "Blowgun": "Cerbatana", + "BlizzardinaBottle": "Ventisca embotellada", + "FrostburnArrow": "Flecha de quemadura gélida", + "EnchantedSword": "Espada encantada", + "IronBow": "Arco de hierro", + "PickaxeAxe": "Pico hacha", + "CobaltWaraxe": "Hacha de guerra de cobalto", + "MythrilWaraxe": "Hacha de guerra de mithril", + "AdamantiteWaraxe": "Hacha de guerra de adamantita", + "EatersBone": "Hueso del devorador", + "BlendOMatic": "Mezclamático", + "MeatGrinder": "Picadora de carne", + "Extractinator": "Expriminator", + "Solidifier": "Solidificador", + "Amber": "Ámbar", + "AcidDye": "Tinte ácido", + "ActuationAccessory": "Pulsificador", + "ActuationRod": "Vara de actuación", + "AlchemyTable": "Mesa de alquimia", + "AlphabetStatue0": "Estatua 0", + "AlphabetStatue1": "Estatua 1", + "AlphabetStatue2": "Estatua 2", + "AlphabetStatue3": "Estatua 3", + "AlphabetStatue4": "Estatua 4", + "AlphabetStatue5": "Estatua 5", + "AlphabetStatue6": "Estatua 6", + "AlphabetStatue7": "Estatua 7", + "AlphabetStatue8": "Estatua 8", + "AlphabetStatue9": "Estatua 9", + "AlphabetStatueA": "Estatua A", + "AlphabetStatueB": "Estatua B", + "AlphabetStatueC": "Estatua C", + "AlphabetStatueD": "Estatua D", + "AlphabetStatueE": "Estatua E", + "AlphabetStatueF": "Estatua F", + "AlphabetStatueG": "Estatua G", + "AlphabetStatueH": "Estatua H", + "AlphabetStatueI": "Estatua I", + "AlphabetStatueJ": "Estatua J", + "AlphabetStatueK": "Estatua K", + "AlphabetStatueL": "Estatua L", + "AlphabetStatueM": "Estatua M", + "AlphabetStatueN": "Estatua N", + "AlphabetStatueO": "Estatua O", + "AlphabetStatueP": "Estatua P", + "AlphabetStatueQ": "Estatua Q", + "AlphabetStatueR": "Estatua R", + "AlphabetStatueS": "Estatua S", + "AlphabetStatueT": "Estatua T", + "AlphabetStatueU": "Estatua U", + "AlphabetStatueV": "Estatua V", + "AlphabetStatueW": "Estatua W", + "AlphabetStatueX": "Estatua X", + "AlphabetStatueY": "Estatua Y", + "AlphabetStatueZ": "Estatua Z", + "Amarok": "Amarok", + "AmberGemsparkWall": "Pared de ámbar gemachispa", + "AmberGemsparkWallOff": "Pared sin conexión de ámbar gemachispa", + "AmberStaff": "Báculo de ámbar", + "AmethystGemsparkWall": "Pared de amatista gemachispa", + "AmethystGemsparkWallOff": "Pared sin conexión de amatista gemachispa", + "AncientArmorHat": "Tocado antiguo", + "AncientArmorPants": "Pantalón de vestir antiguo", + "AncientArmorShirt": "Prenda antigua", + "AncientBattleArmorHat": "Máscara prohibida", + "AncientBattleArmorMaterial": "Fragmento prohibido", + "AncientBattleArmorPants": "Bandas prohibidas", + "AncientBattleArmorShirt": "Vestido prohibido", + "AncientCloth": "Ropa antigua", + "AncientHorn": "Cuerno antiguo", + "AnglerTackleBag": "Bolsa de aparejos de Rape", + "AngryBonesBanner": "Estandarte de huesos enfadados", + "AnnouncementBox": "Megafonía", + "AntiGravityHook": "Gancho antigravitatorio", + "AntlionClaw": "Mandoble", + "ApprenticeBait": "Cebo de aprendiz", + "ApprenticeHat": "Sombrero de aprendiz", + "ApprenticeRobe": "Vestido de aprendiz", + "ApprenticeScarf": "Bufanda de aprendiz", + "ApprenticeTrousers": "Pantalones de aprendiz", + "ArchitectGizmoPack": "Paquete de artilugios de arquitecto", + "Arkhalis": "Arkhalis", + "AviatorSunglasses": "Aviadores 0x33", + "Bacon": "Beicon", + "BalloonHorseshoeFart": "Globo de herradura verde", + "BalloonHorseshoeHoney": "Globo de herradura ámbar", + "BalloonHorseshoeSharkron": "Globo de herradura rosa", + "BalloonPufferfish": "Pez globo", + "BeeMask": "Máscara de abeja reina", + "BeesKnees": "Rodillas de la abeja", + "BejeweledValkyrieBody": "Capa de valquiria de Lazure", + "BejeweledValkyrieHead": "Diadema de valquiria de Lazure", + "BejeweledValkyrieWing": "Plataforma de barrera de Lazure", + "BewitchingTable": "Mesa cautivadora", + "BlackAndWhiteDye": "Tinte blanco y negro", + "BlackCounterweight": "Contrapeso negro", + "BlackString": "Hilo negro", + "Bladetongue": "Lengua afilada", + "BlessedApple": "Mandana bendita", + "BlinkrootPlanterBox": "Macetero de raíz intermitente", + "BloodWater": "Agua sangrienta", + "BloodZombieBanner": "Estandarte de zombi sangriento", + "BloodZombieStatue": "Estatua de zombi sangriento", + "BlueAcidDye": "Tinte ácido azul", + "BlueCounterweight": "Contrapeso azul", + "BlueDungeonBathtub": "Bañera de mazmorra azul", + "BlueDungeonCandelabra": "Candelabro de mazmorra azul", + "BlueDungeonChandelier": "Lámpara araña de mazmorra azul", + "BlueDungeonChest": "Cofre de mazmorra azul", + "BlueDungeonLamp": "Farola de mazmorra azul", + "BlueDungeonSink": "Fregadero de mazmorra azul", + "BlueFlameAndSilverDye": "Tinte flamígero azul y plata", + "BlueLunaticHood": "Capucha de sectario lunar", + "BlueLunaticRobe": "Vestido de sectario lunar", + "BluePhasesaber": "Sable de luz azul", + "BlueString": "Hilo azul", + "BombFish": "Pez bomba", + "BoneArrow": "Flecha de hueso", + "BoneBathtub": "Bañera de hueso", + "BoneBed": "Cama de hueso", + "BoneBookcase": "Librería de hueso", + "BoneCampfire": "Hoguera de hueso", + "BoneCandelabra": "Candelabro de hueso", + "BoneChandelier": "Lámpara araña de hueso", + "BoneChest": "Cofre de hueso", + "BoneClock": "Reloj de hueso", + "BoneDagger": "Cuchillo arrojadizo de hueso", + "BoneGlove": "Guante de hueso", + "BoneJavelin": "Jabalina de hueso", + "BoneLamp": "Farola de hueso", + "BoneLantern": "Linterna de hueso", + "BoneRattle": "Sonajero de hueso", + "BoneSink": "Fregadero de hueso", + "BoneSkeletonStatue": "Estatua de esqueleto", + "BoneTorch": "Antorcha de hueso", + "BoosterTrack": "Pista potenciadora", + "BorealWood": "Madera boreal", + "BorealWoodBathtub": "Bañera de madera boreal", + "BorealWoodBed": "Cama de madera boreal", + "BorealWoodBookcase": "Librería de madera boreal", + "BorealWoodBow": "Arco de madera boreal", + "BorealWoodBreastplate": "Coraza de madera boreal", + "BorealWoodCandelabra": "Candelabro de madera boreal", + "BorealWoodCandle": "Vela de madera boreal", + "BorealWoodChair": "Silla de madera boreal", + "BorealWoodChandelier": "Lámpara araña de madera boreal", + "BorealWoodChest": "Cofre de madera boreal", + "BorealWoodClock": "Reloj de madera boreal", + "BorealWoodDoor": "Puerta de madera boreal", + "BorealWoodDresser": "Aparador de madera boreal", + "BorealWoodFence": "Valla de madera boreal", + "BorealWoodGreaves": "Grebas de madera boreal", + "BorealWoodHammer": "Martillo de madera boreal", + "BorealWoodHelmet": "Casco de madera boreal", + "BorealWoodLamp": "Farola de madera boreal", + "BorealWoodLantern": "Linterna de madera boreal", + "BorealWoodPiano": "Piano de madera boreal", + "BorealWoodPlatform": "Plataforma de madera boreal", + "BorealWoodSink": "Fregadero de madera boreal", + "BorealWoodSofa": "Sofá de madera boreal", + "BorealWoodSword": "Espada de madera boreal", + "BorealWoodTable": "Mesa de madera boreal", + "BorealWoodWall": "Pared de madera boreal", + "BorealWoodWorkBench": "Mesa de trabajo de madera boreal", + "BossMaskMoonlord": "Máscara del Señor de la Luna", + "BottomlessBucket": "Cubo de agua sin fondo", + "BouncyBomb": "Bomba saltarina", + "BouncyDynamite": "Dinamita saltarina", + "BouncyGlowstick": "Palo brillante saltarín", + "BouncyGrenade": "Granada saltarina", + "BrainMask": "Máscara de cerebro de Cthulhu", + "BrainOfConfusion": "Cerebro de confusión", + "BrainOfCthulhuBossBag": "Bolsa del tesoro", + "BrainScrambler": "Destrozacerebros", + "BrightBrownDye": "Tinte marrón brillante", + "BrightSilverDye": "Tinte plateado brillante", + "BrownAndBlackDye": "Tinte marrón y negro", + "BrownAndSilverDye": "Tinte plateado y marrón", + "BrownDye": "Tinte marrón", + "BrownString": "Hilo marrón", + "Bubble": "Burbuja", + "BubbleGun": "Arma de burbujas", + "BuccaneerBandana": "Pañuelo de bucanero", + "BuccaneerPants": "Bombachos de bucanero", + "BuccaneerShirt": "Túnica de bucanero", + "Buggy": "Calesa", + "BuggyStatue": "Estatua de calesa", + "BunnyfishTrophy": "Trofeo de pez conejo", + "BurningHadesDye": "Tinte de Hades en llamas", + "ButcherBanner": "Estandarte de carnicero", + "ButchersChainsaw": "Motosierra de carnicero", + "ButterflyStatue": "Estatua de mariposa", + "CactusBathtub": "Bañera de cactus", + "CactusBed": "Cama de cactus", + "CactusBookcase": "Librería de cactus", + "CactusCandelabra": "Candelabro de cactus", + "CactusCandle": "Vela de cactus", + "CactusChandelier": "Lámpara araña de cactus", + "CactusChest": "Cofre de cactus", + "CactusClock": "Reloj de cactus", + "CactusLamp": "Farola de cactus", + "CactusLantern": "Linterna de cactus", + "CactusPlatform": "Plataforma de cactus", + "CactusSink": "Fregadero de cactus", + "CactusTable": "Mesa de cactus", + "CageBuggy": "Jaula de carruaje", + "CageEnchantedNightcrawler": "Jaula de rondador encantado", + "CageGrubby": "Jaula mugrienta", + "CageSluggy": "Jaula babosa", + "Cascade": "Cascada", + "CelestialShell": "Caparazón celestial", + "CelestialSigil": "Sello celestial", + "CellPhone": "Móvil", + "ChainGuillotines": "Guillotinas encadenadas", + "ChargedBlasterCannon": "Desintegrador cargado", + "Chik": "Chik", + "Chimney": "Chimenea", + "ChlorophyteBrick": "Ladrillo de clorofita", + "ChlorophyteBrickWall": "Pared de ladrillo de clorofita", + "ChlorophyteDye": "Tinte de clorofita", + "ClingerStaff": "Báculo de lapa", + "ClothierJacket": "Chaqueta de buhonero", + "ClothierPants": "Pantalones de buhonero", + "Code1": "Código 1", + "Code2": "Código 2", + "CogWall": "Pared de engranajes", + "CoinRing": "Anillo moneda", + "CompanionCube": "Cubo de compañía", + "CompassRose": "Rosa compás", + "ConfettiBlock": "Bloque de confeti", + "ConfettiBlockBlack": "Bloque de confeti a medianoche", + "ConfettiCannon": "Cañón de confeti", + "ConfettiWall": "Pared de confeti", + "ConfettiWallBlack": "Pared de confeti a medianoche", + "ConveyorBeltLeft": "Cinta transportadora (sentido de las agujas del reloj)", + "ConveyorBeltRight": "Cinta transportadora (sentido contrario a las agujas del reloj)", + "CordageGuide": "Guía de cordaje de fibra", + "CorruptFishingCrate": "Caja corrompida", + "CorruptHardenedSand": "Bloque de arena de ébano endurecido", + "CorruptHardenedSandWall": "Pared de arena de ébano endurecido", + "CorruptPlanterBox": "Macetero de malahierba", + "CorruptSandstone": "Bloque de arenisca de ébano", + "CorruptSandstoneWall": "Pared de arenisca de ébano", + "CorruptYoyo": "Malestar", + "CosmicCarKey": "Llave de coche cósmico", + "CrawdadBanner": "Estandarte de cangrejo de río", + "CreatureFromTheDeepBanner": "Estandarte de la Criatura de las Profundidades", + "CrimsonFishingCrate": "Caja carmesí", + "CrimsonHardenedSand": "Bloque de arena carmesí endurecida", + "CrimsonHardenedSandWall": "Pared de arena carmesí endurecida", + "CrimsonHeart": "Corazón carmesí", + "CrimsonPlanterBox": "Macetero de malahierba", + "CrimsonSandstone": "Bloque de arenisca carmesí", + "CrimsonSandstoneWall": "Pared de arenisca carmesí", + "CrimsonYoyo": "Arteria", + "CrimtaneBrick": "Ladrillo carmesí", + "CrimtaneBrickWall": "Pared de ladrillo carmesí", + "CrystalBlock": "Bloque de cristal", + "CrystalBlockWall": "Pared de bloque de cristal", + "CrystalDart": "Dardo de cristal", + "CrystalSerpent": "Serpiente de cristal", + "CrystalVileShard": "Fragmento vil de cristal", + "CultistBossBag": "Bolsa del tesoro", + "CursedCampfire": "Hoguera maldita", + "CursedDart": "Dardo maldito", + "CyanString": "Hilo turquesa", + "DaedalusStormbow": "Arco de tormentas de Dédalo", + "DarkMummyBanner": "Estandarte de momia de la oscuridad", + "DartPistol": "Pistola de dardos", + "DartRifle": "Escopeta de dardos", + "DayBloomPlanterBox": "Macetero de resplandor diurno", + "DayBreak": "Amanecer", + "DeadlySphereBanner": "Estandarte de esfera letal", + "DeadlySphereStaff": "Báculo de esfera letal", + "DefenderMedal": "Medalla del Defensor", + "DefendersForge": "Forja del Defensor", + "DemonCampfire": "Hoguera demoníaca", + "DemonHeart": "Corazón de demonio", + "DesertBasiliskBanner": "Estandarte de basilisco", + "DesertDjinnBanner": "Estandarte de espíritu del desierto", + "DesertFossil": "Fósil del desierto", + "DesertFossilWall": "Pared de fósiles del desierto", + "DesertGhoulBanner": "Estandarte ghul", + "DesertLamiaBanner": "Estandarte de lamia", + "DestroyerBossBag": "Bolsa del tesoro", + "DestroyerMask": "Máscara del Destructor", + "Detonator": "Detonador", + "DiamondGemsparkWall": "Pared de diamante gemachispa", + "DiamondGemsparkWallOff": "Pared sin conexión de diamante gemachispa", + "DjinnLamp": "Farola de espíritu del desierto", + "DjinnsCurse": "Maldición del genio", + "DPSMeter": "Medidor DPS", + "DrillContainmentUnit": "Unidad de contención de taladro", + "DripplerBanner": "Estandarte goteador", + "DripplerStatue": "Estatua de goteador", + "DrManFlyBanner": "Estandarte del Dr. Moscahombre", + "DuckStatue": "Estatua de pato", + "DukeFishronMask": "Máscara del Duque Fishron", + "DukeFishronTrophy": "Trofeo del duque Fishron", + "DuneSplicerBanner": "Estandarte del atraviesadunas", + "DungeonFishingCrate": "Caja de la mazmorra", + "DyeTradersScimitar": "Cimitarra exótica", + "DyeTraderTurban": "Turbante del comerciante de tintes", + "DynastyBathtub": "Bañera dinástica", + "DynastyBed": "Cama dinástica", + "DynastyBookcase": "Librería dinástica", + "DynastyBowl": "Cuenco dinástico", + "DynastyCandelabra": "Vela dinástica grande", + "DynastyCandle": "Vela dinástica", + "DynastyChair": "Silla dinástica", + "DynastyChandelier": "Linterna dinástica grande", + "DynastyChest": "Cofre dinástico", + "DynastyClock": "Reloj dinástico", + "DynastyCup": "Taza dinástica", + "DynastyLamp": "Farola dinástica", + "DynastyLantern": "Linterna dinástica", + "DynastySink": "Fregadero dinástico", + "DynastyWorkBench": "Banco de trabajo dinástico", + "EaterMask": "Máscara del Devoramundos", + "EaterOfWorldsBossBag": "Bolsa del tesoro", + "EbonwoodBathtub": "Bañera de ébano", + "EbonwoodBookcase": "Librería de ébano", + "EbonwoodCandelabra": "Candelabro de ébano", + "EbonwoodCandle": "Vela de ébano", + "EbonwoodChandelier": "Lámpara araña de ébano", + "EbonwoodClock": "Reloj de madera de ébano", + "EbonwoodLamp": "Farola de ébano", + "EbonwoodLantern": "Linterna de ébano", + "EbonwoodSink": "Fregadero de ébano", + "ElectrosphereLauncher": "Lanzador de electroesferas", + "EmeraldGemsparkWall": "Pared de esmeralda gemachispa", + "EmeraldGemsparkWallOff": "Pared sin conexión de esmeralda gemachispa", + "EmptyDropper": "Gotero vacío", + "EnchantedNightcrawler": "Rondador encantado", + "EndlessMusketPouch": "Petaca de mosquete eterna", + "EndlessQuiver": "Carcaj eterno", + "EngineeringHelmet": "Casco de ingeniería", + "EoCShield": "Escudo de Cthulhu", + "EyeMask": "Máscara Ojo de Cthulhu", + "EyeOfCthulhuBossBag": "Bolsa del tesoro", + "Fake_BlueDungeonChest": "Cofre de mazmorra azul atrapado", + "Fake_BoneChest": "Cofre de hueso atrapado", + "Fake_BorealWoodChest": "Cofre de madera boreal atrapado", + "Fake_CactusChest": "Cofre de cactus atrapado", + "Fake_Chest": "Cofre atrapado", + "Fake_CorruptionChest": "Cofre corrupto atrapado", + "Fake_CrimsonChest": "Cofre carmesí atrapado", + "Fake_DynastyChest": "Cofre dinástico atrapado", + "Fake_EbonwoodChest": "Cofre de madera de ébano atrapado", + "Fake_FleshChest": "Cofre de carne atrapado", + "Fake_GlassChest": "Cofre de cristal atrapado", + "Fake_GoldChest": "Cofre de oro atrapado", + "Fake_GraniteChest": "Cofre de granito atrapado", + "Fake_GreenDungeonChest": "Cofre de mazmorra verde atrapado", + "Fake_HallowedChest": "Cofre sagrado atrapado", + "Fake_HoneyChest": "Cofre de miel atrapado", + "Fake_IvyChest": "Cofre de hiedra atrapado", + "Fake_JungleChest": "Cofre de la selva atrapado", + "Fake_LihzahrdChest": "Cofre de lihzahrd atrapado", + "Fake_LivingWoodChest": "Cofre de madera viviente atrapado", + "Fake_MarbleChest": "Cofre de mármol atrapado", + "Fake_MartianChest": "Cofre marciano atrapado", + "Fake_MeteoriteChest": "Cofre de meteorito atrapado", + "Fake_MushroomChest": "Cofre de champiñón atrapado", + "Fake_ObsidianChest": "Cofre de obsidiana atrapado", + "Fake_PalmWoodChest": "Cofre de madera de palmera atrapado", + "Fake_PearlwoodChest": "Cofre de madera perlada atrapado", + "Fake_PinkDungeonChest": "Cofre de mazmorra rosa atrapado", + "Fake_PumpkinChest": "Cofre de calabaza atrapado", + "Fake_RichMahoganyChest": "Cofre de madera de caoba rico atrapado", + "Fake_ShadewoodChest": "Cofre de madera sombría atrapado", + "Fake_ShadowChest": "Cofre de las sombras atrapado", + "Fake_SkywareChest": "Cofre celestial atrapado", + "Fake_SlimeChest": "Cofre de slime atrapado", + "Fake_SpookyChest": "Cofre tétrico atrapado", + "Fake_SteampunkChest": "Cofre steampunk atrapado", + "Fake_WaterChest": "Cofre de agua atrapado", + "Fake_WebCoveredChest": "Cofre cubierto de telarañas atrapado", + "FalconBlade": "Filo de halcón", + "FallenTuxedoPants": "Pantalones de esmoquin caídos", + "FallenTuxedoShirt": "Camisa de esmoquin caída", + "FancyDishes": "Platos bonitos", + "FetidBaghnakhs": "Baghnakhs fétidos", + "FireBlossomPlanterBox": "Macetero de resplandor de fuego", + "FireflyStatue": "Estatua de luciérnaga", + "Fireplace": "Chimenea", + "FireworkFountain": "Fuente de fuegos artificiales", + "FireworksBox": "Caja de fuegos artificiales", + "FireworksLauncher": "Celebración", + "FishermansGuide": "Guía de bolsillo del pescador", + "FishFinder": "Localizador de peces", + "FishronBossBag": "Bolsa del tesoro", + "FishronWings": "Alas de Fishron", + "Flairon": "Flairon", + "FlameAndSilverDye": "Tinte flamígero y plata", + "FleshBathtub": "Bañera de carne", + "FleshBed": "Cama de carne", + "FleshBookcase": "Librería de carne", + "FleshCandelabra": "Candelabro de carne", + "FleshCandle": "Vela de carne", + "FleshChandelier": "Lámpara araña de carne", + "FleshChest": "Cofre de carne", + "FleshClock": "Reloj de carne", + "FleshDresser": "Aparador de carne", + "FleshKnuckles": "Nudillos de carne", + "FleshLamp": "Farola de carne", + "FleshLantern": "Linterna de carne", + "FleshMask": "Máscara de muro carnoso", + "FleshPiano": "Piano de carne", + "FleshSink": "Fregadero de carne", + "FleshSofa": "Sofá de carne", + "FloatingIslandFishingCrate": "Caja celestial", + "FlowerBoots": "Botas floridas", + "FlowerBoyHat": "Pétalos de girasol absurdos", + "FlowerBoyPants": "Raíces de girasol absurdas", + "FlowerBoyShirt": "Hojas de girasol absurdas", + "FlyingAntlionBanner": "Estandarte de enjambre de hormigas león", + "FlyingDutchmanTrophy": "Trofeo Holandés volador", + "FlyingKnife": "Cuchillo volador", + "FormatC": "Format:C", + "FossilHelm": "Casco de fósil", + "FossilOre": "Fósil férreo", + "FossilPants": "Grebas de fósil", + "FossilShirt": "Placa de fósil", + "FragmentNebula": "Fragmento de nebulosa", + "FragmentSolar": "Fragmento solar", + "FragmentStardust": "Fragmento de polvo estelar", + "FragmentVortex": "Fragmento de vórtice", + "FritzBanner": "Estandarte de Fritz", + "FrogStatue": "Estatua de rana", + "FrostDaggerfish": "Pez daga de escarcha", + "FrozenBathtub": "Bañera congelada", + "FrozenBed": "Cama congelada", + "FrozenBookcase": "Librería congelada", + "FrozenCampfire": "Hoguera congelada", + "FrozenCandelabra": "Candelabro congelado", + "FrozenCandle": "Vela congelada", + "FrozenChair": "Silla congelada", + "FrozenChandelier": "Lámpara araña congelada", + "FrozenClock": "Reloj congelado", + "FrozenDoor": "Puerta congelada", + "FrozenLamp": "Farola de cristal", + "FrozenLantern": "Linterna congelada", + "FrozenPiano": "Piano congelado", + "FrozenSink": "Fregadero congelado", + "FrozenSofa": "Sofá congelado", + "FrozenTable": "Mesa congelada", + "FrozenWorkBench": "Banco de trabajo congelado", + "FuzzyCarrot": "Zanahoria borrosa", + "GelDye": "Tinte de gel", + "GemLockAmber": "Cierre de gema de ámbar", + "GemLockAmethyst": "Cierre de gema de amatista", + "GemLockDiamond": "Cierre de gema de diamante", + "GemLockEmerald": "Cierre de gema de esmeralda", + "GemLockRuby": "Cierre de gema de rubí", + "GemLockSapphire": "Cierre de gema de zafiro", + "GemLockTopaz": "Cierre de gema de topacio", + "GenderChangePotion": "Poción de cambio de sexo", + "GeyserTrap": "Géiser", + "GiantShellyBanner": "Estandarte de conchito gigante", + "GladiatorBreastplate": "Coraza de gladiador", + "GladiatorHelmet": "Casco de gladiador", + "GladiatorLeggings": "Perneras de gladiador", + "GlassBathtub": "Bañera de cristal", + "GlassBookcase": "Librería de cristal", + "GlassBowl": "Cuenco de cristal", + "GlassCandelabra": "Candelabro de cristal", + "GlassCandle": "Vela de cristal", + "GlassChandelier": "Lámpara araña de cristal", + "GlassChest": "Cofre de cristal", + "GlassClock": "Reloj de cristal", + "GlassDresser": "Aparador de cristal", + "GlassLamp": "Farola de cristal", + "GlassLantern": "Linterna de cristal", + "GlassPiano": "Piano de cristal", + "GlassSink": "Fregadero de cristal", + "GlassWorkBench": "Banco de trabajo de cristal", + "GoblinSummonerBanner": "Estandarte de duende invocador", + "GoblinTech": "Tecnología duende", + "GoldBird": "Pájaro dorado", + "GoldBirdCage": "Jaula de pájaro dorado", + "GoldBunny": "Conejo dorado", + "GoldBunnyCage": "Jaula de conejo dorado", + "GoldButterfly": "Mariposa dorada", + "GoldButterflyCage": "Bote de mariposa dorada", + "GoldenBathtub": "Bañera dorada", + "GoldenBookcase": "Librería dorada", + "GoldenBugNet": "Cazamariposas dorado", + "GoldenCandelabra": "Candelabro dorado", + "GoldenCandle": "Vela dorada", + "GoldenChandelier": "Lámpara araña dorada", + "GoldenClock": "Reloj dorado", + "GoldenLamp": "Farola dorada", + "GoldenLantern": "Linterna dorada", + "GoldenSink": "Fregadero dorado", + "GoldfishTrophy": "Trofeo dorado", + "GoldFrog": "Rana dorada", + "GoldFrogCage": "Jaula de rana dorada", + "GoldGrasshopper": "Saltamontes dorado", + "GoldGrasshopperCage": "Jaula de saltamontes dorado", + "GoldMouse": "Ratón dorado", + "GoldMouseCage": "Jaula de ratón dorado", + "GoldRing": "Anillo dorado", + "GoldWorm": "Gusano dorado", + "GoldWormCage": "Jaula de gusano dorado", + "GolemBossBag": "Bolsa del tesoro", + "GolemMask": "Máscara Gólem", + "Gradient": "Gradiente", + "Granite": "Bloque de granito", + "GraniteBathtub": "Bañera de granito", + "GraniteBed": "Cama de granito", + "GraniteBlock": "Bloque de granito suave", + "GraniteBlockWall": "Pared de granito suave", + "GraniteBookcase": "Librería de granito", + "GraniteCandelabra": "Candelabro de granito", + "GraniteCandle": "Vela de granito", + "GraniteChair": "Silla de granito", + "GraniteChandelier": "Lámpara araña de granito", + "GraniteChest": "Cofre de granito", + "GraniteClock": "Reloj de granito", + "GraniteDoor": "Puerta de granito", + "GraniteDresser": "Aparador de granito", + "GraniteFlyerBanner": "Estandarte de granito elemental", + "GraniteGolemStatue": "Estatua de gólem de granito", + "GraniteLamp": "Farola de granito", + "GraniteLantern": "Linterna de granito", + "GranitePiano": "Piano de granito", + "GranitePlatform": "Plataforma de granito", + "GraniteSink": "Fregadero de granito", + "GraniteSofa": "Sofá de granito", + "GraniteTable": "Mesa de granito", + "GraniteWall": "Pared de granito", + "GraniteWorkBench": "Banco de trabajo de granito", + "Grasshopper": "Saltamontes", + "GrasshopperCage": "Jaula de saltamontes", + "GrasshopperStatue": "Estatua de saltamontes", + "GreedyRing": "Anillo codicioso", + "GreekSkeletonBanner": "Estandarte de hoplita", + "GreenCounterweight": "Contrapeso verde", + "GreenDungeonBathtub": "Bañera de mazmorra verde", + "GreenDungeonCandelabra": "Candelabro de mazmorra verde", + "GreenDungeonChandelier": "Lámpara araña de mazmorra verde", + "GreenDungeonChest": "Cofre de mazmorra verde", + "GreenDungeonLamp": "Farola de mazmorra verde", + "GreenDungeonSink": "Fregadero de mazmorra verde", + "GreenFlameAndSilverDye": "Tinte flamígero verde y plata", + "GreenJellyfishBanner": "Estandarte de medusa verde", + "GreenPhasesaber": "Sable de luz verde", + "GreenString": "Hilo verde", + "GrimDye": "Tinte lúgubre", + "Grubby": "Mugriento", + "GrubSoup": "Sopa de larvas", + "HadesDye": "Tinte de Hades", + "HallowedFishingCrate": "Caja sagrada", + "HallowHardenedSand": "Bloque de arena perlada endurecida", + "HallowHardenedSandWall": "Pared de arena perlada endurecida", + "HallowSandstone": "Bloque de arenisca perlada", + "HallowSandstoneWall": "Pared de arenisca perlada", + "HardenedSand": "Bloque de arena endurecida", + "HardenedSandWall": "Pared de arena endurecida", + "HardySaddle": "Montura resistente", + "HarpyStatue": "Estatua de arpía", + "HelFire": "Fuego infernal", + "HellstoneBrickWall": "Pared de ladrillo de piedra infernal", + "HellwingBow": "Arco de ala infernal", + "HerbBag": "Bolsa de hierbas", + "HiTekSunglasses": "Gafas de sol HiTek", + "HiveBackpack": "Mochila colmena", + "HoneyBathtub": "Bañera de miel", + "HoneyBookcase": "Librería de miel", + "HoneyCandelabra": "Candelabro de miel", + "HoneyCandle": "Vela de miel", + "HoneyChandelier": "Lámpara araña de miel", + "HoneyChest": "Cofre de miel", + "HoneyClock": "Reloj de miel", + "HoneyCup": "Taza de miel", + "HoneyedGoggles": "Gafas melosas", + "HoneyfallBlock": "Bloque de lluvia de miel", + "HoneyfallWall": "Pared de lluvia de miel", + "HoneyLamp": "Farola de miel", + "HoneyLantern": "Linterna de miel", + "HoneyPiano": "Piano de miel", + "HoneyPlatform": "Plataforma de miel", + "HoneySink": "Fregadero de miel", + "HoneyWorkBench": "Banco de trabajo de miel", + "HopliteStatue": "Estatua de hoplita", + "HuntressBuckler": "Rodela de cazadora", + "HuntressJerkin": "Jubón de cazadora", + "HuntressPants": "Pantalones de cazadora", + "HuntressWig": "Peluca de cazadora", + "IceMirror": "Espejo de hielo", + "IceTortoiseBanner": "Estandarte de tortuga de hielo", + "IchorCampfire": "Hoguera de icor", + "IchorDart": "Dardo de icor", + "IlluminantHook": "Gancho iluminador", + "InfernalWispDye": "Tinte de voluta infernal", + "InfluxWaver": "Generadora de flujos", + "ItemFrame": "Marco", + "Javelin": "Jabalina", + "JimsWings": "Alas de Jim", + "JourneymanBait": "Cebo de viajero", + "JungleFishingCrate": "Caja de la selva", + "JungleYoyo": "Amazonas", + "KingSlimeBossBag": "Bolsa del tesoro", + "Kraken": "Kraken", + "LamiaHat": "Máscara de lamia", + "LamiaPants": "Cola de lamia", + "LamiaShirt": "Vendas de lamia", + "LargeAmber": "Ámbar grande", + "LaserDrill": "Taladro láser", + "LaserMachinegun": "Metralleta láser", + "LaserRuler": "Regla mecánica", + "LastPrism": "Último prisma", + "LavafallBlock": "Bloque de lava", + "LavaLamp": "Lámpara de lava", + "LifeformAnalyzer": "Analizador de formas de vida", + "LifePreserver": "Preservador de vida", + "LightKey": "Llave de luz", + "LightMummyBanner": "Estandarte de momia de la luz", + "LihzahrdBathtub": "Bañera lihzahrd", + "LihzahrdBed": "Cama lihzahrd", + "LihzahrdBookcase": "Librería lihzahrd", + "LihzahrdCandelabra": "Candelabro lihzahrd", + "LihzahrdCandle": "Vela lihzahrd", + "LihzahrdChandelier": "Lámpara araña lihzahrd", + "LihzahrdClock": "Reloj de lihzahrd", + "LihzahrdLamp": "Farola lihzahrd", + "LihzahrdLantern": "Linterna lihzahrd", + "LihzahrdSink": "Fregadero lihzahrd", + "LimeString": "Hilo de limo", + "LivingCursedFireBlock": "Bloque de fuego viviente maldito", + "LivingDemonFireBlock": "Bloque de fuego viviente demoníaco", + "LivingFireBlock": "Bloque de fuego viviente", + "LivingFlameDye": "Tinte flamígero viviente", + "LivingFrostFireBlock": "Bloque de fuego gélido viviente", + "LivingIchorBlock": "Bloque de icor viviente", + "LivingLeafWall": "Pared de hoja viviente", + "LivingMahoganyLeafWand": "Varita de hoja de caoba rica", + "LivingMahoganyWand": "Varita de madera de caoba", + "LivingOceanDye": "Tinte océano viviente", + "LivingRainbowDye": "Tinte arcoíris viviente", + "LivingUltrabrightFireBlock": "Bloque de fuego ultrabrillante viviente", + "LivingWoodBathtub": "Bañera de madera viviente", + "LivingWoodBed": "Cama de madera viviente", + "LivingWoodBookcase": "Librería de madera viviente", + "LivingWoodCandelabra": "Candelabro de madera viviente", + "LivingWoodCandle": "Vela de madera viviente", + "LivingWoodChandelier": "Lámpara araña de madera viviente", + "LivingWoodClock": "Reloj de madera viviente", + "LivingWoodLamp": "Farola de madera viviente", + "LivingWoodLantern": "Linterna de madera viviente", + "LivingWoodPiano": "Piano de madera viviente", + "LivingWoodPlatform": "Plataforma de madera viviente", + "LivingWoodSink": "Fregadero de madera viviente", + "LivingWoodSofa": "Sofá de madera viviente", + "LivingWoodWorkBench": "Banco de trabajo de madera viviente", + "LockBox": "Caja cerrada dorada", + "LogicGateLamp_Faulty": "Interruptor de puerta lógica (defectuoso)", + "LogicGateLamp_Off": "Interruptor de puerta lógica (desactivado)", + "LogicGateLamp_On": "Interruptor de puerta lógica (activado)", + "LogicGate_AND": "Puerta lógica (AND)", + "LogicGate_NAND": "Puerta lógica (NAND)", + "LogicGate_NOR": "Puerta lógica (NOR)", + "LogicGate_NXOR": "Puerta lógica (XNOR)", + "LogicGate_OR": "Puerta lógica (OR)", + "LogicGate_XOR": "Puerta lógica (XOR)", + "LogicSensor_Above": "Sensor lógico (con el jugador encima)", + "LogicSensor_Honey": "Sensor líquido (miel)", + "LogicSensor_Lava": "Sensor líquido (lava)", + "LogicSensor_Liquid": "Sensor líquido (cualquiera)", + "LogicSensor_Moon": "Sensor lógico (noche)", + "LogicSensor_Sun": "Sensor lógico (día)", + "LogicSensor_Water": "Sensor líquido (agua)", + "LokisDye": "Tinte de Loki", + "LokisHelm": "Casco de Loki", + "LokisPants": "Grebas de Loki", + "LokisShirt": "Coraza de Loki", + "LokisWings": "Alas de Loki", + "LunarBar": "Lingote de luminita", + "LunarBlockNebula": "Bloque de fragmento de nebulosa", + "LunarBlockSolar": "Bloque de fragmento solar", + "LunarBlockStardust": "Bloque de fragmento de polvo estelar", + "LunarBlockVortex": "Bloque de fragmento de vórtice", + "LunarBrick": "Ladrillo de luminita", + "LunarBrickWall": "Pared de ladrillo de luminita", + "LunarCraftingStation": "Manipulador antiguo", + "LunarFlareBook": "Bengala lunar", + "LunarHamaxeNebula": "Hacha-martillo de nebulosa", + "LunarHamaxeSolar": "Hacha-martillo de bengala solar", + "LunarHamaxeStardust": "Hacha-martillo de polvo estelar", + "LunarHamaxeVortex": "Hacha-martillo de vórtice", + "LunarHook": "Gancho lunar", + "LunarOre": "Luminita", + "LunarTabletFragment": "Fragmento de tablilla solar", + "MagicHoneyDropper": "Gotero de miel mágica", + "MagicLantern": "Linterna mágica", + "MagicLavaDropper": "Gotero de lava mágica", + "MagicSandDropper": "Gotero de arena mágica", + "MagicWaterDropper": "Gotero de agua mágica", + "Marble": "Bloque de mármol", + "MarbleBathtub": "Bañera de mármol", + "MarbleBed": "Cama de mármol", + "MarbleBlock": "Bloque de mármol suave", + "MarbleBlockWall": "Pared de mármol suave", + "MarbleBookcase": "Librería de mármol", + "MarbleCandelabra": "Candelabro de mármol", + "MarbleCandle": "Vela de mármol", + "MarbleChair": "Silla de mármol", + "MarbleChandelier": "Lámpara araña de mármol", + "MarbleChest": "Cofre de mármol", + "MarbleClock": "Reloj de mármol", + "MarbleDoor": "Puerta de mármol", + "MarbleDresser": "Aparador de mármol", + "MarbleLamp": "Farola de mármol", + "MarbleLantern": "Linterna de mármol", + "MarblePiano": "Piano de mármol", + "MarblePlatform": "Plataforma de mármol", + "MarbleSink": "Fregadero de mármol", + "MarbleSofa": "Sofá de mármol", + "MarbleTable": "Mesa de mármol", + "MarbleWall": "Pared de mármol", + "MarbleWorkBench": "Banco de trabajo de mármol", + "MartianArmorDye": "Tinte marciano", + "MartianAstroClock": "Reloj astrológico marciano", + "MartianBathtub": "Bañera marciana", + "MartianBed": "Cama marciana", + "MartianChandelier": "Lámpara araña marciana", + "MartianChest": "Cofre marciano", + "MartianConduitPlating": "Placa conductora marciana", + "MartianConduitWall": "Pared conductora marciana", + "MartianCostumeMask": "Máscara de disfraz de marciano", + "MartianCostumePants": "Pantalones de disfraz de marciano", + "MartianCostumeShirt": "Camisa de disfraz de marciano", + "MartianDoor": "Puerta marciana", + "MartianDresser": "Aparador marciano", + "MartianHairDye": "Tinte de pelo marciano", + "MartianHolobookcase": "Librería holográfica marciana", + "MartianHoverCandle": "Vela flotante marciana", + "MartianHoverChair": "Silla flotante marciana", + "MartianLamppost": "Farola marciana", + "MartianLantern": "Linterna marciana", + "MartianPiano": "Piano marciano", + "MartianPlatform": "Plataforma marciana", + "MartianSaucerTrophy": "Trofeo de platillo marciano", + "MartianSink": "Fregadero marciano", + "MartianSofa": "Sofá marciano", + "MartianTable": "Mesa marciana", + "MartianTableLamp": "Lámpara de mesa marciana", + "MartianUniformHelmet": "Casco de uniforme marciano", + "MartianUniformPants": "Pantalones de uniforme marciano", + "MartianUniformTorso": "Torso de uniforme marciano", + "MartianWalkerBanner": "Estandarte del caminante marciano", + "MartianWorkBench": "Banco de trabajo marciano", + "MasterBait": "Cebo de maestro", + "MechanicalBatteryPiece": "Pieza de batería mecánica", + "MechanicalLens": "Lente mecánica", + "MechanicalWagonPiece": "Pieza de vagoneta mecánica", + "MechanicalWheelPiece": "Pieza de rueda mecánica", + "MedusaBanner": "Estandarte de medusa", + "MedusaHead": "Cabeza de medusa", + "MedusaStatue": "Estatua de medusa", + "Meowmere": "Filomiau", + "MetalDetector": "Detector de metales", + "MetalSink": "Fregadero de metal", + "MeteoriteBathtub": "Bañera de meteorito", + "MeteoriteBed": "Cama de meteorito", + "MeteoriteBookcase": "Librería de meteorito", + "MeteoriteBrick": "Ladrillo de meteorito", + "MeteoriteBrickWall": "Pared de ladrillo de meteorito", + "MeteoriteCandelabra": "Candelabro de meteorito", + "MeteoriteCandle": "Vela de meteorito", + "MeteoriteChair": "Silla de meteorito", + "MeteoriteChandelier": "Lámpara araña de meteorito", + "MeteoriteChest": "Cofre de meteorito", + "MeteoriteClock": "Reloj de meteorito", + "MeteoriteDoor": "Puerta de meteorito", + "MeteoriteDresser": "Aparador de meteorito", + "MeteoriteLamp": "Farola de meteorito", + "MeteoriteLantern": "Linterna de meteorito", + "MeteoritePiano": "Piano de meteorito", + "MeteoritePlatform": "Plataforma de meteorito", + "MeteoriteSink": "Fregadero de meteorito", + "MeteoriteSofa": "Sofá de meteorito", + "MeteoriteTable": "Mesa de meteorito", + "MeteoriteWorkBench": "Banco de trabajo de meteorito", + "MeteorStaff": "Báculo de meteorito", + "MidnightRainbowDye": "Tinte arcoíris de medianoche", + "MinecartMech": "Vagoneta mecánica", + "MinecartTrack": "Pista de vagoneta", + "MirageDye": "Tinte espejismo", + "MolotovCocktail": "Cóctel molotov", + "MoneyTrough": "Abrevadero de dinero", + "MonkBelt": "Cinturón de monje", + "MonkBrows": "Gorra de calvo y cejas densas de monje", + "MonkPants": "Pantalones de monje", + "MonkShirt": "Camina de monje", + "MoonglowPlanterBox": "Macetero de luz de luna", + "MoonlordArrow": "Flecha de luminita", + "MoonLordBossBag": "Bolsa del tesoro", + "MoonlordBullet": "Bala de luminita", + "MoonLordPainting": "Ni es un niño, ni es un calamar", + "MoonLordTrophy": "Trofeo del Señor de la Luna", + "MoonlordTurretStaff": "Báculo del portal lunar", + "MoonMask": "Máscara de la luna", + "MothronBanner": "Estandarte de polillón", + "MothronWings": "Alas de polillón", + "MouseStatue": "Estatua de ratón", + "MulticolorWrench": "Llave inglesa multicolor", + "MushroomBathtub": "Bañera de champiñón", + "MushroomBed": "Cama de champiñón", + "MushroomBench": "Banco de champiñón", + "MushroomBookcase": "Librería de champiñón", + "MushroomCandelabra": "Candelabro de champiñón", + "MushroomCandle": "Vela de champiñón", + "MushroomChandelier": "Lámpara araña de champiñón", + "MushroomChest": "Cofre de champiñón", + "MushroomClock": "Reloj de champiñón", + "MushroomDresser": "Aparador de champiñón", + "MushroomDye": "Tinte de champiñón brillante", + "MushroomLamp": "Farola de champiñón", + "MushroomLantern": "Linterna de champiñón", + "MushroomPiano": "Piano de champiñón", + "MushroomPlatform": "Plataforma de champiñón", + "MushroomSink": "Fregadero de champiñón", + "MushroomTable": "Mesa de champiñón", + "MusicBoxGoblins": "Caja de música (Invasión duende)", + "MusicBoxHell": "Caja de música (Infierno)", + "MusicBoxLunarBoss": "Caja de música (Jefe lunar)", + "MusicBoxMartians": "Caja de música (Locura marciana)", + "MusicBoxPirates": "Caja de música (Invasión pirata)", + "MusicBoxSandstorm": "Caja de música (Tormenta de arena)", + "MusicBoxTowers": "Caja de música (Las Torres)", + "MusicBoxUndergroundCrimson": "Caja de música (Subsuelo carmesí)", + "Nail": "Clavo", + "NailGun": "Pistola de clavos", + "NailheadBanner": "Estandarte de cabezaclavo", + "NebulaArcanum": "Arcanum de nebulosa", + "NebulaAxe": "Hacha de nebulosa", + "NebulaBeastBanner": "Estandarte de bestia evolutiva", + "NebulaBlaze": "Llama de nebulosa", + "NebulaBrainBanner": "Estandarte flotante de nebulosa", + "NebulaBreastplate": "Coraza de nebulosa", + "NebulaChainsaw": "Motosierra de nebulosa", + "NebulaDrill": "Taladro de nebulosa", + "NebulaDye": "Tinte de nebulosa", + "NebulaHammer": "Martillo de nebulosa", + "NebulaHeadcrabBanner": "Estandarte de lactacerebros", + "NebulaHelmet": "Casco de nebulosa", + "NebulaLeggings": "Perneras de nebulosa", + "NebulaMonolith": "Monolito de nebulosa", + "NebulaPickaxe": "Pico de nebulosa", + "NebulaPickup1": "Potenciador de daño", + "NebulaPickup2": "Potenciador de vida", + "NebulaPickup3": "Potenciador de maná", + "NebulaSoldierBanner": "Estandarte de predictor", + "NegativeDye": "Tinte negativo", + "NightKey": "Llave de noche", + "NightVisionHelmet": "Casco de visión nocturna", + "ObsidianBathtub": "Bañera de obsidiana", + "ObsidianCandelabra": "Candelabro de obsidiana", + "ObsidianCandle": "Vela de obsidiana", + "ObsidianChandelier": "Lámpara araña de obsidiana", + "ObsidianChest": "Cofre de obsidiana", + "ObsidianClock": "Reloj de obsidiana", + "ObsidianHelm": "Sombrero de forajido de obsidiana", + "ObsidianLamp": "Farola de obsidiana", + "ObsidianLantern": "Linterna de obsidiana", + "ObsidianPants": "Pantalones de obsidiana", + "ObsidianShirt": "Abrigo largo de obsidiana", + "ObsidianSink": "Fregadero de obsidiana", + "OnyxBlaster": "Desintegrador de ónice", + "OrangeString": "Hilo naranja", + "PainterPaintballGun": "Pistola de pintura", + "PaintingAcorns": "Bellotas", + "PaintingCastleMarsberg": "Castillo Marsberg", + "PaintingColdSnap": "Rompefríos", + "PaintingCursedSaint": "Santo maldito", + "PaintingMartiaLisa": "Martia Lisa", + "PaintingSnowfellas": "Compañeros de las nieves", + "PaintingTheSeason": "La Temporada", + "PaintingTheTruthIsUpThere": "La verdad está ahí arriba", + "PalmWood": "Madera de palmera", + "PalmWoodBathtub": "Bañera de madera de palmera", + "PalmWoodBed": "Cama de madera de palmera", + "PalmWoodBench": "Banco de madera de palmera", + "PalmWoodBookcase": "Librería de madera de palmera", + "PalmWoodBow": "Arco de madera de palmera", + "PalmWoodBreastplate": "Coraza de madera de palmera", + "PalmWoodCandelabra": "Candelabro de madera de palmera", + "PalmWoodCandle": "Vela de madera de palmera", + "PalmWoodChair": "Silla de madera de palmera", + "PalmWoodChandelier": "Lámpara araña de madera de palmera", + "PalmWoodChest": "Cofre de madera de palmera", + "PalmWoodClock": "Reloj de madera de palmera", + "PalmWoodDoor": "Puerta de madera de palmera", + "PalmWoodDresser": "Aparador de madera de palmera", + "PalmWoodFence": "Valla de madera de palmera", + "PalmWoodGreaves": "Grebas de madera de palmera", + "PalmWoodHammer": "Martillo de madera de palmera", + "PalmWoodHelmet": "Casco de madera de palmera", + "PalmWoodLamp": "Farola de madera de palmera", + "PalmWoodLantern": "Linterna de madera de palmera", + "PalmWoodPiano": "Piano de madera de palmera", + "PalmWoodPlatform": "Plataforma de madera de palmera", + "PalmWoodSink": "Fregadero de madera de palmera", + "PalmWoodSofa": "Sofá de madera de palmera", + "PalmWoodSword": "Espada de madera de palmera", + "PalmWoodTable": "Mesa de madera de palmera", + "PalmWoodWall": "Pared de madera de palmera", + "PalmWoodWorkBench": "Banco de trabajo de madera de palmera", + "PartyBalloonAnimal": "Animal globo", + "PartyBundleOfBalloonsAccessory": "Puñado de globos de fiesta", + "PartyBundleOfBalloonTile": "Puñado de globos mal atados", + "PartyGirlGrenade": "Granada feliz", + "PartyHat": "Gorro fiestero", + "PartyMonolith": "Centro de fiesta", + "PartyPresent": "Regalo", + "PDA": "PDA", + "PeaceCandle": "Vela de paz", + "PearlwoodBathtub": "Bañera de madera perlada", + "PearlwoodBookcase": "Librería de madera perlada", + "PearlwoodCandelabra": "Candelabro de madera perlada", + "PearlwoodCandle": "Vela de madera perlada", + "PearlwoodChandelier": "Lámpara araña de madera perlada", + "PearlwoodClock": "Reloj de madera perlada", + "PearlwoodLamp": "Farola de madera perlada", + "PearlwoodLantern": "Linterna de madera perlada", + "PearlwoodSink": "Fregadero de madera perlada", + "PedguinHat": "Capucha de profingüino", + "PedguinPants": "Pantalones de profingüino", + "PedguinShirt": "Chaqueta de profingüino", + "PenguinStatue": "Estatua de pingüino", + "Phantasm": "Fantasma", + "PhaseDye": "Tinte de fase", + "PhasicWarpEjector": "Eyector de salto fásico", + "Pigronata": "cerdidragonata", + "PigronStatue": "Estatua de cerdidragón", + "PinkDungeonBathtub": "Bañera de mazmorra rosa", + "PinkDungeonCandelabra": "Candelabro de mazmorra rosa", + "PinkDungeonChandelier": "Lámpara araña de mazmorra rosa", + "PinkDungeonChest": "Cofre de mazmorra rosa", + "PinkDungeonLamp": "Farola de mazmorra rosa", + "PinkDungeonSink": "Fregadero de mazmorra rosa", + "PinkGel": "Gel rosa", + "PinkGelDye": "Tinte de gel rosa", + "PinkJellyfishBanner": "Estandarte de medusa rosa", + "PinkSlimeBlock": "Bloque de slime rosa", + "PinkString": "Hilo rosa", + "PinkTorch": "Antorcha rosa", + "PirateCaptainBanner": "Estandarte de capitán pirata", + "PirateCorsairBanner": "Estandarte de corsario pirata", + "PirateCrossbowerBanner": "Estandarte de pirata con arco", + "PirateDeadeyeBanner": "Estandarte de pirata pistolero", + "PirateStaff": "Báculo pirata", + "PixelBox": "Caja de píxel", + "PixieDye": "Tinte de duendecillo", + "PlanteraBossBag": "Bolsa del tesoro", + "PlanteraMask": "Máscara Plantera", + "PocketMirror": "Espejo de bolsillo", + "PoisonousSporeBanner": "Estandarte de esporas venenosas", + "PortalGun": "Arma de portales", + "PortalGunStation": "Estación de arma de portales", + "PressureTrack": "Pista de placa de presión", + "ProjectilePressurePad": "Placa de presión verde azulada", + "PsychoBanner": "Estandarte de psicópata", + "PsychoKnife": "Cuchillo de psicópata", + "PumpkinBathtub": "Bañera de calabaza", + "PumpkinBed": "Cama de calabaza", + "PumpkinBookcase": "Librería de calabaza", + "PumpkinCandelabra": "Candelabro de calabaza", + "PumpkinCandle": "Vela de calabaza", + "PumpkinChandelier": "Lámpara araña de calabaza", + "PumpkinChest": "Cofre de calabaza", + "PumpkinClock": "Reloj de calabaza", + "PumpkinDresser": "Aparador de calabaza", + "PumpkinLamp": "Farola de calabaza", + "PumpkinLantern": "Linterna de calabaza", + "PumpkinPiano": "Piano de calabaza", + "PumpkinSink": "Fregadero de calabaza", + "PurpleCounterweight": "Contrapeso morado", + "PurpleOozeDye": "Tinte de pringue morado", + "PurplePhasesaber": "Sable de luz morado", + "PurpleString": "Hilo morado", + "PutridScent": "Aroma putrefacto", + "QueenBeeBossBag": "Bolsa del tesoro", + "Radar": "Radar", + "RainbowCampfire": "Hoguera arcoíris", + "RainbowCrystalStaff": "Báculo de cristal arcoíris", + "RainbowString": "Hilo arcoíris", + "RainbowTorch": "Antorcha arcoíris", + "Rally": "Acelerón", + "RazorbladeTyphoon": "Tifón de cuchillas", + "RedAcidDye": "Tinte ácido rojo", + "RedCounterweight": "Contrapeso rojo", + "RedDevilBanner": "Estandarte de diablo rojo", + "RedPhasesaber": "Sable de luz rojo", + "RedString": "Hilo rojo", + "RedsYoyo": "Lanzamiento rojo", + "ReflectiveCopperDye": "Tinte de cobre reflectante", + "ReflectiveDye": "Tinte reflectante", + "ReflectiveGoldDye": "Tinte de oro reflectante", + "ReflectiveMetalDye": "Tinte de metal reflectante", + "ReflectiveObsidianDye": "Tinte de obsidiana reflectante", + "ReflectiveSilverDye": "Tinte de plata reflectante", + "REK": "R.E.K. 3000", + "RichGravestone1": "Lápida en forma de cruz dorada", + "RichGravestone2": "Lápida dorada", + "RichGravestone3": "Tumba dorada", + "RichGravestone4": "Lápida dorada", + "RichGravestone5": "Piedra sepulcral dorada", + "RichMahoganyBathtub": "Bañera de caoba rica", + "RichMahoganyBookcase": "Librería de caoba rica", + "RichMahoganyCandelabra": "Candelabro de caoba rica", + "RichMahoganyCandle": "Vela de caoba rica", + "RichMahoganyChandelier": "Lámpara araña de caoba rica", + "RichMahoganyClock": "Reloj de caoba rica", + "RichMahoganyLamp": "Farola de caoba rica", + "RichMahoganyLantern": "Linterna de caoba rica", + "RichMahoganySink": "Fregadero de madera de caoba rica", + "RoyalGel": "Gel real", + "RubyGemsparkWall": "Pared de rubí gemachispa", + "RubyGemsparkWallOff": "Pared sin conexión de rubí gemachispa", + "SailfishBoots": "Botas de pez vela", + "SalamanderBanner": "Estandarte de slamandra", + "SandElementalBanner": "Estandarte de elemental de arena", + "SandFallWall": "Pared de catarata de arena", + "SandsharkBanner": "Estandarte de tiburón de arena", + "SandsharkCorruptBanner": "Estandarte de muertehuesos", + "SandsharkCrimsonBanner": "Estandarte de segador de carne", + "SandsharkHallowedBanner": "Estandarte de trilladora de cristal", + "SandSlimeBanner": "Estandarte de slime de arena", + "Sandstone": "Bloque de arenisca", + "SandstoneWall": "Pared de arenisca", + "SapphireGemsparkWall": "Pared de zafiro gemachispa", + "SapphireGemsparkWallOff": "Pared sin conexión de zafiro gemachispa", + "ScalyTruffle": "Trufa escamosa", + "ScorpionStatue": "Estatua de escorpión", + "Seashell": "Concha", + "SeaSnailBanner": "Estandarte de caracol marino", + "Seedler": "Semillera", + "SeveredHandBanner": "Estandarte de mano cortada", + "Sextant": "Sextante", + "ShadewoodBathtub": "Bañera de madera sombría", + "ShadewoodBookcase": "Librería de madera sombría", + "ShadewoodCandelabra": "Candelabro de madera sombría", + "ShadewoodCandle": "Vela de madera sombría", + "ShadewoodChandelier": "Lámpara araña de madera sombría", + "ShadewoodClock": "Reloj de madera sombría", + "ShadewoodLamp": "Farola de madera sombría", + "ShadewoodLantern": "Linterna de madera sombría", + "ShadewoodSink": "Fregadero de madera sombría", + "ShadowDye": "Tinte sombrío", + "ShadowFlameBow": "Arco de Llamas oscuras", + "ShadowflameHadesDye": "Tinte de Hades en llamas oscuras", + "ShadowFlameHexDoll": "Muñeca maldita de Llamas oscuras", + "ShadowFlameKnife": "Cuchillo de Llamas oscuras", + "SharkronBalloon": "Globo de tiburrón", + "SharkStatue": "Estatua de tiburón", + "SharkteethTrophy": "Trofeo de dientes de tiburón", + "SharkToothNecklace": "Collar de diente de tiburón", + "SharpeningStation": "Rueda de afilar", + "ShiftingPearlSandsDye": "Tinte de arena perlada cambiante", + "ShiftingSandsDye": "Tinte de arena cambiante", + "ShinyStone": "Piedra brillante", + "ShipsWheel": "Timón de barco", + "ShiverthornPlanterBox": "Macetero de espinatemblor", + "ShrimpyTruffle": "Trufa gambeante", + "ShroomitePlating": "Placa de piñonita", + "ShroomitePlatingWall": "Pared de piñonita", + "SilkRope": "Cuerda de seda", + "SilkRopeCoil": "Rollo de cuerda de seda", + "SillyBalloonGreen": "Globo verde tonto", + "SillyBalloonGreenWall": "Pared de globo verde tonto", + "SillyBalloonMachine": "Máquina de globo tonto", + "SillyBalloonPink": "Globo rosa tonto", + "SillyBalloonPinkWall": "Pared de globo rosa tonto", + "SillyBalloonPurple": "Globo morado tonto", + "SillyBalloonPurpleWall": "Pared de globo morado tonto", + "SillyBalloonTiedGreen": "Globo atado absurdo (verde)", + "SillyBalloonTiedPink": "Globo atado absurdo (rosa)", + "SillyBalloonTiedPurple": "Globo atado absurdo (morado)", + "SillyStreamerBlue": "Guirnalda azul", + "SillyStreamerGreen": "Guirnalda verde", + "SillyStreamerPink": "Guirnalda rosa", + "SilverAndBlackDye": "Tinte plateado y negro", + "SkeletronBossBag": "Bolsa del tesoro", + "SkeletronPrimeBossBag": "Bolsa del tesoro", + "SkeletronPrimeMask": "Máscara Esqueletrón mayor", + "SkyBlueString": "Hilo azul celeste", + "SkyFracture": "Fractura celestial", + "SkywareBathtub": "Bañera celestial", + "SkywareBed": "Cama celestial", + "SkywareBookcase": "Librería celestial", + "SkywareCandelabra": "Candelabro celestial", + "SkywareCandle": "Vela celestial", + "SkywareChandelier": "Lámpara araña celestial", + "SkywareClock": "Reloj celestial", + "SkywareLamp": "Farola celestial", + "SkywareLantern": "Linterna celestial", + "SkywarePlatform": "Plataforma celestial", + "SkywareSink": "Fregadero celestial", + "SkywareWorkbench": "Banco de trabajo celestial", + "SlapHand": "Mano de abofetear", + "SliceOfCake": "Trozo de tarta", + "SlimeBathtub": "Bañera de slime", + "SlimeBed": "Cama de slime", + "SlimeBookcase": "Librería de slime", + "SlimeCandelabra": "Candelabro de slime", + "SlimeCandle": "Vela de slime", + "SlimeChair": "Silla de slime", + "SlimeChandelier": "Lámpara araña de slime", + "SlimeChest": "Cofre de slime", + "SlimeClock": "Reloj de slime", + "SlimeDoor": "Puerta de slime", + "SlimeDresser": "Aparador de slime", + "SlimeGun": "Arma slime", + "SlimeHook": "Gancho de slime", + "SlimeLamp": "Farola de slime", + "SlimeLantern": "Linterna de slime", + "SlimePiano": "Piano de slime", + "SlimePlatform": "Plataforma de slime", + "SlimeSink": "Fregadero de slime", + "SlimeSofa": "Sofá de slime", + "SlimeTable": "Mesa de slime", + "SlimySaddle": "Montura pringosa", + "Sluggy": "Baboso", + "SmokeBlock": "Bloque de humo", + "SnailStatue": "Estatua de caracol", + "SnowCloudBlock": "Nube de nieve", + "SnowFallWall": "Pared de nieve", + "SolarCoriteBanner": "Estandarte de corita", + "SolarCrawltipedeBanner": "Estandarte de arrastrapiés", + "SolarDrakomireBanner": "Estandarte de drakomira", + "SolarDrakomireRiderBanner": "Estandarte de jinete de drakomira", + "SolarDye": "Tinte solar", + "SolarEruption": "Erupción solar", + "SolarFlareAxe": "Hacha de bengala solar", + "SolarFlareBreastplate": "Coraza de bengala solar", + "SolarFlareChainsaw": "Motosierra de bengala solar", + "SolarFlareDrill": "Taladro de bengala solar", + "SolarFlareHammer": "Martillo de bengala solar", + "SolarFlareHelmet": "Casco de bengala solar", + "SolarFlareLeggings": "Perneras de bengala solar", + "SolarFlarePickaxe": "Pico de bengala solar", + "SolarMonolith": "Monolito solar", + "SolarSolenianBanner": "Estandarte de selenio", + "SolarSrollerBanner": "Estandarte de srodante", + "SolarTablet": "Tablilla solar", + "SoulDrain": "Absorción de vida", + "SparkyPainting": "Chisposo", + "SpectreBar": "Bar espectral", + "SpelunkerGlowstick": "Varita luminosa espeleólogo", + "SpiderFang": "Colmillo de araña", + "SpiderStaff": "Báculo de araña", + "SpiritFlame": "Llama espiritual", + "SpookyBathtub": "Bañera tétrica", + "SpookyBed": "Cama tétrica", + "SpookyBookcase": "Librería tétrica", + "SpookyCandelabra": "Candelabro tétrica", + "SpookyCandle": "Vela tétrica", + "SpookyChandelier": "Lámpara araña tétrica", + "SpookyChest": "Cofre tétrico", + "SpookyClock": "Reloj tétrico", + "SpookyLamp": "Farola tétrica", + "SpookyLantern": "Linterna tétrica", + "SpookySink": "Fregadero tétrico", + "SporeSac": "Saco de esporas", + "SquireGreatHelm": "Gran casco de escudero", + "SquireGreaves": "Grebas de escudero", + "SquirePlating": "Placa de escudero", + "SquireShield": "Escudo de escudero", + "SquirrelGold": "Ardilla dorada", + "SquirrelGoldCage": "Jaula de ardilla dorada", + "SquirrelOrangeCage": "Jaula de ardilla roja", + "SquirrelRed": "Ardilla roja", + "SquirrelStatue": "Estatua de ardilla", + "StardustAxe": "Hacha de polvo estelar", + "StardustBreastplate": "Placa de polvo estelar", + "StardustCellStaff": "Báculo de célula de polvo estelar", + "StardustChainsaw": "Motosierra de polvo estelar", + "StardustDragonStaff": "Báculo de dragón de polvo estelar", + "StardustDrill": "Taladro de polvo estelar", + "StardustDye": "Tinte de polvo estelar", + "StardustHammer": "Martillo de polvo estelar", + "StardustHelmet": "Casco de polvo estelar", + "StardustJellyfishBanner": "Estandarte de invasor del ritmo", + "StardustLargeCellBanner": "Estandarte de célula estelar", + "StardustLeggings": "Perneras de polvo estelar", + "StardustMonolith": "Monolito de polvo estelar", + "StardustPickaxe": "Pico de polvo estelar", + "StardustSmallCellBanner": "Estandarte de célula estelar pequeña", + "StardustSoldierBanner": "Estandarte observaestrellas", + "StardustSpiderBanner": "Estandarte de lanzacentelleos", + "StardustWormBanner": "Estandarte de tejedor de la vía láctea", + "Starfish": "Estrella de mar", + "StarWrath": "Espectro estelar", + "StaticHook": "Gancho estático", + "SteampunkBathtub": "Bañera steampunk", + "SteampunkBookcase": "Librería steampunk", + "SteampunkCandelabra": "Candelabro steampunk", + "SteampunkCandle": "Vela steampunk", + "SteampunkChandelier": "Lámpara araña steampunk", + "SteampunkChest": "Cofre steampunk", + "SteampunkClock": "Reloj steampunk", + "SteampunkCup": "Cáliz", + "SteampunkDresser": "Aparador steampunk", + "SteampunkLamp": "Farola steampunk", + "SteampunkLantern": "Linterna steampunk", + "SteampunkPiano": "Piano steampunk", + "SteampunkPlatform": "Plataforma steampunk", + "SteampunkSink": "Fregadero steampunk", + "SteampunkWorkBench": "Banco de trabajo steampunk", + "StickyDynamite": "Dinamita adhesiva", + "StickyGrenade": "Granada adhesiva", + "Stopwatch": "Reloj parador", + "StrangeBrew": "Brebaje extraño", + "StrangePlant1": "Planta extraña", + "StrangePlant2": "Planta extraña", + "StrangePlant3": "Planta extraña", + "StrangePlant4": "Planta extraña", + "StylistKilLaKillScissorsIWish": "Tijeras estilosas", + "SummonerEmblem": "Emblema de invocador", + "Sundial": "Reloj de sol encantando", + "SunMask": "Máscara del sol", + "SuperAbsorbantSponge": "Esponja superabsorbente", + "SuperHealingPotion": "Poción supercurativa", + "SuspiciousLookingTentacle": "Tentáculo de aspecto sospechoso", + "SwordfishTrophy": "Trofeo de pez espada", + "TallGate": "Puerta alta", + "TallyCounter": "Contador", + "TargetDummy": "Muñeco de pruebas", + "TartarSauce": "Salsa tártara", + "TaxCollectorHat": "Sombrero de recaudador de impuestos", + "TaxCollectorPants": "Pantalones de recaudador de impuestos", + "TaxCollectorsStickOfDoom": "Bastón con clase", + "TaxCollectorSuit": "Traje de recaudador de impuestos", + "TealString": "Hilo verde azulado", + "TeamBlockBlue": "Bloque del equipo azul", + "TeamBlockBluePlatform": "Plataforma del equipo azul", + "TeamBlockGreen": "Bloque del equipo verde", + "TeamBlockGreenPlatform": "Plataforma del equipo verde", + "TeamBlockPink": "Bloque del equipo rosa", + "TeamBlockPinkPlatform": "Plataforma del equipo rosa", + "TeamBlockRed": "Bloque del equipo rojo", + "TeamBlockRedPlatform": "Plataforma del equipo rojo", + "TeamBlockWhite": "Bloque del equipo blanco", + "TeamBlockWhitePlatform": "Plataforma del equipo blanco", + "TeamBlockYellow": "Bloque del equipo amarillo", + "TeamBlockYellowPlatform": "Plataforma del equipo amarillo", + "TempestStaff": "Báculo de tempestades", + "TendonHook": "Gancho de tendones", + "Terrarian": "Terrariano", + "TheBrideDress": "Vestido de boda", + "TheBrideHat": "Velo de vestido de boda", + "TheEyeOfCthulhu": "El Ojo de Cthulhu", + "ThePossessedBanner": "Estandarte poseído", + "ThornHook": "Gancho de espinas", + "TinPlating": "Placa de hojalata", + "TinPlatingWall": "Pared de hojalata", + "TombCrawlerBanner": "Estandarte de trepatumbas", + "TopazGemsparkWall": "Pared de topacio gemachispa", + "TopazGemsparkWallOff": "Pared sin conexión de topacio gemachispa", + "ToxicFlask": "Vial tóxico", + "Toxikarp": "Toxicarpa", + "Trapdoor": "Trampilla", + "TruffleWorm": "Gusano de trufa", + "Tsunami": "Tsunami", + "TsunamiInABottle": "Tsunami embotellado", + "TumbleweedBanner": "Estandarte de volteador enfadado", + "TwilightDye": "Tinte de crepúsculo", + "TwilightHairDye": "Tinte de pelo de crepúsculo", + "TwinMask": "Máscara gemela", + "TwinsBossBag": "Bolsa del tesoro", + "UndeadVikingStatue": "Estatua de vikingo no muerto", + "UnicornStatue": "Estatua de unicornio", + "UnicornWispDye": "Tinte de voluta unicornio", + "ValkyrieYoyo": "Yoyó de valquiria", + "Valor": "Valor", + "ViciousMushroom": "Champiñón feroz", + "ViciousPowder": "Polvo feroz", + "VineRope": "Cuerda de enredadera", + "VineRopeCoil": "Rollo de cuerda de enredadera", + "VioletString": "Hilo violeta", + "VoidDye": "Tinte del vacío", + "VortexAxe": "Hacha del vórtice", + "VortexBeater": "Golpeador del vórtice", + "VortexBreastplate": "Coraza del vórtice", + "VortexChainsaw": "Motosierra del vórtice", + "VortexDrill": "Taladro del vórtice", + "VortexDye": "Tinte del vórtice", + "VortexHammer": "Martilo del vórtice", + "VortexHelmet": "Casco del vórtice", + "VortexHornetBanner": "Estandarte de la avispa alienígena", + "VortexHornetQueenBanner": "Estandarte de la reina alienígena", + "VortexLarvaBanner": "Estandarte de la larva alienígena", + "VortexLeggings": "Perneras de vórtice", + "VortexMonolith": "Monolito de vórtice", + "VortexPickaxe": "Pico de vórtice", + "VortexRiflemanBanner": "Estandarte de navegatormentas", + "VortexSoldierBanner": "Estandarte de vórtice", + "WalkingAntlionBanner": "Estandarte de cargador de hormigas león", + "WallAnchor": "Ancla de pared", + "WallCreeperStatue": "Estatua de criatura de pared", + "WallOfFleshBossBag": "Bolsa del tesoro", + "WandofSparking": "Varita de chispas", + "WarTable": "Mesa de guerra", + "WarTableBanner": "Estandarte de mesa de guerra", + "WaterfallBlock": "Bloque de cascada", + "WaterleafPlanterBox": "Macetero de hoja de agua", + "WeaponRack": "Estante de armas", + "WeatherRadio": "Radio del clima", + "WebRope": "Cuerda de telaraña", + "WebRopeCoil": "Rollo de cuerda de telaraña", + "WeightedPressurePlateCyan": "Placa de presión con peso turquesa", + "WeightedPressurePlateOrange": "Placa de presión con peso naranja", + "WeightedPressurePlatePink": "Placa de presión con peso rosa", + "WeightedPressurePlatePurple": "Placa de presión con peso morado", + "WhiteLunaticHood": "Capucha de sectario solar", + "WhiteLunaticRobe": "Vestido de sectario solar", + "WhitePhasesaber": "Sable de luz blanco", + "WhiteString": "Hilo blanco", + "WineGlass": "Vaso de vino", + "WingsNebula": "Manto de nebulosa", + "WingsSolar": "Alas solares", + "WingsStardust": "Alas de polvo estelar", + "WingsVortex": "Potenciador de vórtice", + "WireBulb": "Bombilla cableada", + "WireKite": "El Gran Diseño", + "WirePipe": "Conector", + "WispDye": "Tinte de voluta", + "WoodenSink": "Fregadero de madera", + "WoodYoyo": "Yoyó de madera", + "WormholePotion": "Poción agujero de gusano", + "WormHook": "Gancho de gusano", + "WormScarf": "Bufanda de gusano", + "WormStatue": "Estatua de gusano", + "WraithStatue": "Estatua de espectro", + "Xenopopper": "Xenolanzador", + "XenoStaff": "Xenobáculo", + "Yelets": "Yelets", + "YellowCounterweight": "Contrapeso amarillo", + "YellowPhasesaber": "Sable de luz amarillo", + "YellowString": "Hilo amarillo", + "YellowWrench": "Llave inglesa amarilla", + "Yoraiz0rDarkness": "Ceño de Yoraiz0r", + "Yoraiz0rHead": "Gafas recoloreadas de Yoraiz0r", + "Yoraiz0rPants": "Falda de Yoraiz0r", + "Yoraiz0rShirt": "Uniforme de Yoraiz0r", + "Yoraiz0rWings": "Hechizo de Yoraiz0r", + "YoyoBag": "Bolsa yoyó", + "YoYoGlove": "Guante yoyó", + "ZombieArmStatue": "Estatua de zombi armado", + "AleThrowingGlove": "Lanzador de cerveza", + "ApprenticeAltHead": "Sombrero de Artista Oscuro", + "ApprenticeAltPants": "Perneras de Artista Oscuro", + "ApprenticeAltShirt": "Vestido de Artista Oscuro", + "ApprenticeStaffT3": "Ira de Betsy", + "BetsyWings": "Alas de Betsy", + "BookStaff": "Libro de la Sabiduría Infinita", + "BossMaskBetsy": "Máscara de Betsy", + "BossMaskDarkMage": "Máscara de mago negro", + "BossMaskOgre": "Máscara de ogro", + "BossTrophyBetsy": "Trofeo de Betsy", + "BossTrophyDarkmage": "Trofeo de mago negro", + "BossTrophyOgre": "Trofeo de ogro", + "CrystalBathtub": "Bañera de cristal", + "CrystalBed": "Cama de cristal", + "CrystalBookCase": "Librería de cristal", + "CrystalCandelabra": "Candelabro de cristal", + "CrystalCandle": "Vela de cristal", + "CrystalChair": "Silla de cristal", + "CrystalChandelier": "Lámpara araña de cristal", + "CrystalChest": "Cofre de cristal", + "CrystalClock": "Reloj de cristal", + "CrystalDoor": "Puerta de cristal", + "CrystalDresser": "Aparador de cristal", + "CrystalLamp": "Lámpara de cristal", + "CrystalLantern": "Linterna de cristal", + "CrystalPiano": "Piano de cristal", + "CrystalPlatform": "Plataforma de cristal", + "CrystalSink": "Fregadero de cristal", + "CrystalSofaHowDoesThatEvenWork": "Sofá de cristal", + "CrystalTable": "Mesa de cristal", + "CrystalWorkbench": "Mesa de trabajo de cristal", + "DD2BallistraTowerT1Popper": "Varita de balista", + "DD2BallistraTowerT2Popper": "Bastón de balista", + "DD2BallistraTowerT3Popper": "Báculo de balista", + "DD2BetsyBow": "Muerte aérea", + "DD2DrakinBanner": "Estandarte drakin", + "DD2ElderCrystal": "Cristal eternia", + "DD2ElderCrystalStand": "Stand de cristal eternia", + "DD2EnergyCrystal": "Maná etéreo", + "DD2ExplosiveTrapT1Popper": "Varita de trampa explosiva", + "DD2ExplosiveTrapT2Popper": "Bastón de trampa explosiva", + "DD2ExplosiveTrapT3Popper": "Báculo de trampa explosiva", + "DD2FlameburstTowerT1Popper": "Varita de Explosión de llamas", + "DD2FlameburstTowerT2Popper": "Bastón de Explosión de llamas", + "DD2FlameburstTowerT3Popper": "Báculo de Explosión de llamas", + "DD2GoblinBanner": "Estandarte de duende etéreo", + "DD2GoblinBomberBanner": "Estandarte de duende etéreo bombardero", + "DD2JavelinThrowerBanner": "Estandarte de lanzajabalinas etéreo", + "DD2KoboldBanner": "Estandarte kobold", + "DD2KoboldFlyerBanner": "Estandarte de kobold planeador", + "DD2LightningAuraT1Popper": "Varita de Aura de rayo", + "DD2LightningAuraT2Popper": "Bastón de Aura de rayo", + "DD2LightningAuraT3Popper": "Báculo de Aura de rayo", + "DD2LightningBugBanner": "Estandarte de insecto rayo etéreo", + "DD2PetDragon": "Huevo de dragón", + "DD2PetGato": "Huevo de gato", + "DD2PetGhost": "Huevo de criatura", + "DD2PhoenixBow": "Fénix fantasma", + "DD2SkeletonBanner": "Estandarte de esqueleto del Antiguo", + "DD2SquireBetsySword": "Dragón volador", + "DD2SquireDemonSword": "Marca del infierno", + "DD2WitherBeastBanner": "Estandarte de bestia marchita", + "DD2WyvernBanner": "Estandarte de guiverno etéreo", + "DungeonClockBlue": "Reloj de mazmorra azul", + "DungeonClockGreen": "Reloj de mazmorra verde", + "DungeonClockPink": "Reloj de mazmorra rosa", + "DynastyDresser": "Aparador dinástico", + "DynastyPiano": "Piano dinástico", + "DynastySofa": "Sofá dinástico", + "Fake_CrystalChest": "Cofre de cristal con trampa", + "Fake_GoldenChest": "Cofre dorado con trampa", + "FleshPlatform": "Plataforma de carne", + "FrozenDresser": "Aparador congelado", + "FrozenPlatform": "Plataforma congelada", + "GoldenChest": "Cofre de oro", + "GoldenPlatform": "Plataforma de oro", + "GoldenWorkbench": "Banco de trabajo de oro", + "HuntressAltHead": "Caperuza roja", + "HuntressAltPants": "Perneras rojas", + "HuntressAltShirt": "Vestido rojo", + "LihzahrdPlatform": "Plataforma de lihzahrd", + "LivingWoodDresser": "Aparador de madera viviente", + "MonkAltHead": "Casco de infiltrador shinobi", + "MonkAltPants": "Pantalones de infiltrador shinobi", + "MonkAltShirt": "Torso de infiltrador shinobi", + "MonkStaffT1": "Octópodo adormilado", + "MonkStaffT2": "Guja terrible", + "MonkStaffT3": "Furia del dragón celestial", + "SquireAltHead": "Casco de Caballero del Valhalla", + "SquireAltPants": "Grebas de Caballero del Valhalla", + "SquireAltShirt": "Coraza de Caballero del Valhalla", + "SkywareClock2": "Reloj soleado", + "LeinforsHat": "Protector capilar de Leinfors", + "LeinforsShirt": "Estilo excesivo de Leinfors", + "LeinforsPants": "Pantalones molones de Leinfors", + "LeinforsWings": "Capa prensil de Leinfors", + "LeinforsAccessory": "Champú de lujo de Leinfors", + "GraniteGolemBanner": "Estandarte de gólem de granito", + "RavagerScorpionBanner": "Estandarte de cazador de las arenas", + "MusicBoxDD2": "Caja de música (Ejército del Antiguo)", + "BossBagBetsy": "{$ItemName.SkeletronBossBag}" + }, + "ItemTooltip": { + "ShadowGreaves": "Aumenta un 7% la velocidad del cuerpo a cuerpo", + "ConfettiGun": "¡Lanza confeti por todas partes!", + "ChlorophyteMask": "Aumenta un 16% el daño cuerpo a cuerpo\nAumenta un 6% la probabilidad de ataque crítico en el cuerpo a cuerpo", + "ChlorophyteHelmet": "Aumenta un 16% el daño de los ataques a distancia\nProbabilidad del 20% de no gastar munición", + "ChlorophyteHeadgear": "Aumenta el maná máximo en 80 y reduce el consumo de maná un 17%\nAumenta el daño de los ataques mágicos en un 16%", + "ChlorophytePlateMail": "Aumenta un 5% el daño\nAumenta un 7% la probabilidad de ataque crítico", + "ChlorophyteGreaves": "Aumenta un 8% la probabilidad de ataque crítico\nAumenta en un 5% la velocidad de movimiento", + "ChlorophyteBar": "Reacciona a la luz", + "ShadowScalemail": "Aumenta un 7% la velocidad del cuerpo a cuerpo", + "ShadowHelmet": "Aumenta un 7% la velocidad del cuerpo a cuerpo", + "NightmarePickaxe": "Permite extraer piedra infernal", + "Paintbrush": "Se usa para colorear bloques", + "PaintRoller": "Se usa para colorear paredes", + "ManaCrystal": "Aumenta el maná máximo en 20 de forma permanente", + "GolfBallDyedPink": "{$CommonItemTooltip.GolfBall}", + "TealMushroom": "Se usa para hacer tinte verde azulado", + "GreenMushroom": "Se usa para hacer tinte verde", + "SkyBlueFlower": "Se usa para hacer tinte azul cielo", + "BandofStarpower": "Aumenta el maná máximo en 20", + "YellowMarigold": "Se usa para hacer tinte amarillo", + "BlueBerries": "Se usa para hacer tinte azul", + "LimeKelp": "Se usa para hacer tinte verde lima", + "PinkPricklyPear": "Se usa para hacer tinte rosa", + "OrangeBloodroot": "Se usa para hacer tinte naranja", + "RedHusk": "Se usa para hacer tinte rojo", + "CyanHusk": "Se usa para hacer tinte turquesa", + "VioletHusk": "Se usa para hacer tinte violeta", + "PurpleMucos": "Se usa para hacer tinte morado", + "BlackInk": "Se usa para hacer tinte negro", + "FlowerofFire": "Arroja bolas de fuego", + "DyeVat": "Se usa para hacer tintes", + "BeeGun": "Dispara abejas que perseguirán al enemigo", + "PossessedHatchet": "Persigue a tu enemigo", + "BeeKeeper": "Invoca abejas asesinas tras golpear al enemigo\nPequeña posibilidad de causar Confusión", + "HiveWand": "Coloca colmenas", + "MagicMissile": "Lanza un proyectil dirigible", + "Beenade": "Explota en un enjambre de abejas", + "GravityGlobe": "Permite al portador invertir la gravedad\nPulsa ARRIBA para cambiar la gravedad", + "KiteRed": "{$CommonItemTooltip.Kite}", + "Abeemination": "Invoca a la abeja reina", + "DirtRod": "Desplaza la tierra por arte de magia", + "TempleKey": "Abre la puerta del templo de la selva", + "LihzahrdWorkBench": "Se usa para creaciones básicas", + "ShadowOrb": "Crea un orbe sombrío mágico", + "LihzahrdPressurePlate": "Se activa cuando un jugador se pone encima", + "PiranhaGun": "Se pega a los enemigos para infligirles daño continuado", + "PygmyStaff": "Invoca a un pigmeo para que luche por ti", + "KiteBlueAndYellow": "{$CommonItemTooltip.Kite}", + "KiteBlue": "{$CommonItemTooltip.Kite}", + "KiteWyvern": "{$CommonItemTooltip.Kite}", + "GroxTheGreatGreaves": "{$CommonItemTooltip.DevItem}", + "LeafWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BlizzardinaBalloon": "Su portador puede realizar saltos dobles\nAumenta la altura de los saltos", + "BundleofBalloons": "Su portador puede realizar saltos cuádruples\nAumenta la altura de los saltos", + "BatWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "HerculesBeetle": "Aumenta un 15% el daño de los súbditos\nAumenta el retroceso de tus súbditos", + "BoneKey": "Invoca una cabeza de esqueletrón bebé", + "MeteoriteBar": "Caliente al tacto", + "Nectar": "Invoca a un avispón bebé", + "TikiTotem": "Invoca a un espíritu tiki", + "LizardEgg": "Invoca a un lagarto mascota", + "LeafBlower": "Dispara rápidamente hojas afiladas como cuchillas", + "ChlorophyteBullet": "Persigue a tu enemigo", + "Hook": "A veces lo sueltan esqueletos y pirañas", + "ParrotCracker": "Invoca a un loro mascota", + "StrangeGlowingMushroom": "Invoca a una trufa bebé", + "Seedling": "Invoca a un retoño mascota", + "WispinaBottle": "Invoca a una voluta que te ofrece luz", + "PalladiumPickaxe": "Permite extraer mithril y oricalco", + "PalladiumDrill": "Permite extraer mithril y oricalco", + "OrichalcumPickaxe": "Permite extraer adamantita y titanio", + "OrichalcumDrill": "Permite extraer adamantita y titanio", + "MoltenFury": "Enciende las flechas de madera", + "PalladiumMask": "Aumenta un 8% el daño cuerpo a cuerpo\nAumenta un 12% la velocidad del cuerpo a cuerpo", + "PalladiumHelmet": "Aumenta un 9% el daño de los ataques a distancia\nAumenta un 9% la probabilidad de asestar ataques críticos a distancia", + "PalladiumHeadgear": "Aumenta un 7% el daño mágico y la probabilidad de ataque crítico\nAumenta el maná máximo en 60", + "PalladiumBreastplate": "Aumenta un 3% el daño\nAumenta un 2% la probabilidad de ataque crítico", + "PalladiumLeggings": "Aumenta un 2% el daño\nAumenta un 1% la probabilidad de ataque crítico", + "FieryGreatsword": "¡Está hecha de fuego!", + "OrichalcumMask": "Aumenta un 7% el daño cuerpo a cuerpo\nAumenta un 7% la velocidad de movimiento y del cuerpo a cuerpo", + "OrichalcumHelmet": "Aumenta un 15% la probabilidad de asestar ataques críticos a distancia\nAumenta en un 8% la velocidad de movimiento", + "OrichalcumHeadgear": "Aumenta un 18% la probabilidad de impacto mágico crítico\nAumenta el maná máximo en 80", + "OrichalcumBreastplate": "Aumenta un 6% la probabilidad de ataque crítico", + "OrichalcumLeggings": "Aumenta en un 11% la velocidad de movimiento", + "TitaniumMask": "Aumenta un 8% el daño cuerpo a cuerpo y la probabilidad de ataque crítico\nAumenta un 8% la velocidad del cuerpo a cuerpo", + "TitaniumHelmet": "Aumenta un 16% el daño de los ataques a distancia\nAumenta un 7% la probabilidad de asestar ataques críticos a distancia", + "TitaniumHeadgear": "Aumenta un 16% el daño mágico y un 7% la probabilidad de ataque mágico crítico\nAumenta el maná máximo en 100", + "TitaniumBreastplate": "Aumenta un 4% el daño\nAumenta un 3% la probabilidad de ataque crítico", + "TitaniumLeggings": "Aumenta un 3% el daño y la probabilidad de ataque crítico\nAumenta en un 6% la velocidad de movimiento", + "OrichalcumAnvil": "Se usa para fabricar objetos con lingotes de mithril, oricalco, adamantita y titanio", + "TitaniumForge": "Se usa para fundir los minerales de adamantita y titanio", + "ChlorophyteClaymore": "Dispara un potente orbe", + "ChlorophyteSaber": "Dispara una nube de esporas", + "ChlorophytePartisan": "Dispara una nube de esporas", + "MeteorHelmet": "Aumenta el daño de los ataques mágicos en un 7%", + "ChlorophyteArrow": "Rebota tras golpear en una pared", + "MeteorSuit": "Aumenta el daño de los ataques mágicos en un 7%", + "AmberMosquito": "Invoca a un dinosaurio bebé", + "NimbusRod": "Invoca una nube para que llueva sobre tus enemigos", + "GroxTheGreatArmor": "{$CommonItemTooltip.DevItem}", + "EyeoftheGolem": "Aumenta un 10% la probabilidad de ataque crítico", + "HoneyBalloon": "Aumenta la altura de los saltos\nLibera abejas al sufrir daños", + "MeteorLeggings": "Aumenta el daño de los ataques mágicos en un 7%", + "BlueHorseshoeBalloon": "Su portador puede realizar saltos dobles\nAumenta la altura de los saltos y anula el daño al caer", + "WhiteHorseshoeBalloon": "Su portador puede realizar saltos dobles\nAumenta la altura de los saltos y anula el daño al caer", + "YellowHorseshoeBalloon": "Su portador puede realizar saltos dobles\nAumenta la altura de los saltos y anula el daño al caer", + "OceanCrate": "{$CommonItemTooltip.RightClickToOpen}", + "SniperRifle": "Dispara una potente bala de gran velocidad\n para alejar", + "VenusMagnum": "Dispara una potente bala de gran velocidad", + "CrimsonRod": "Invoca una nube para que llueva sangre sobre los enemigos", + "SteampunkWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsVortex": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "RainbowGun": "Dispara un arcoíris que inflige daño continuado", + "StyngerBolt": "Explota con una metralla letal", + "FlowerofFrost": "Dispara una bola de escarcha", + "Uzi": "Dispara una potente bala de gran velocidad", + "RocketBoots": "Permite volar", + "AmethystRobe": "Aumenta el maná máximo en 20\nReduce el consumo de maná un 5%", + "TopazRobe": "Aumenta el maná máximo en 40\nReduce el consumo de maná un 7%", + "SapphireRobe": "Aumenta el maná máximo en 40\nReduce el consumo de maná un 9%", + "EmeraldRobe": "Aumenta el maná máximo en 60\nReduce el consumo de maná un 11%", + "RubyRobe": "Aumenta el maná máximo en 60\nReduce el consumo de maná un 13%", + "DiamondRobe": "Aumenta el maná máximo en 80\nReduce el consumo de maná un 15%", + "GroxTheGreatHelm": "{$CommonItemTooltip.DevItem}", + "LifeFruit": "Aumenta permanentemente el nivel máximo de vida en 9", + "LihzahrdPowerCell": "Se usa en el altar de lihzahrd", + "Picksaw": "Capaz de extraer ladrillos de lihzahrd", + "JimsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "StaffofEarth": "Invoca una poderosa roca", + "GolemFist": "Golpea con la fuerza de un gólem", + "Binoculars": "Al portarlo, aumenta el alcance de la visión", + "RifleScope": "Aumenta el alcance de la visión con armas\n para alejar", + "DestroyerEmblem": "Aumenta un 10% el daño\nAumenta un 8% la probabilidad de ataque crítico", + "JellyfishNecklace": "Ofrece luz al estar bajo el agua", + "IceSickle": "Dispara una hoz de hielo", + "ClothierVoodooDoll": "Eres una persona horrible", + "PoisonStaff": "Dispara un colmillo venenoso que atraviesa a varios enemigos", + "SlimeStaff": "Invoca a un slime bebé para que luche por ti", + "PoisonDart": "Inflige veneno a los enemigos", + "EyeSpring": "Invoca a un ojo saltarín", + "ToySled": "Invoca a un muñeco de nieve bebé", + "BookofSkulls": "Dispara una calavera", + "KOCannon": "Dispara un guante de boxeo", + "PirateMap": "Invoca una invasión pirata", + "TurtleHelmet": "Aumenta un 6% el daño cuerpo a cuerpo\nSerá más probable que los enemigos te ataquen", + "TurtleScaleMail": "Aumenta un 8% el daño cuerpo a cuerpo y la probabilidad de ataque crítico\nSerá más probable que los enemigos te ataquen", + "TurtleLeggings": "Aumenta un 4% la probabilidad de ataque crítico en el cuerpo a cuerpo\nSerá más probable que los enemigos te ataquen", + "KiteWorldFeeder": "{$CommonItemTooltip.Kite}", + "OasisCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "ObsidianRose": "Reduce el daño al tocar lava", + "RodofDiscord": "Te teletransporta a la posición del ratón", + "DeathSickle": "Dispara una hoz letal", + "BloodySpine": "Invoca el Cerebro de Cthulhu", + "Ichor": "La sangre de los dioses", + "IchorTorch": "Se puede meter en el agua", + "IchorArrow": "Reduce la defensa del objetivo", + "IchorBullet": "Reduce la defensa del objetivo", + "GoldenShower": "Genera una lluvia de icor\nReduce la defensa del objetivo", + "OasisCrate": "{$CommonItemTooltip.RightClickToOpen}", + "ImbuingStation": "Se usa para crear viales con los que imbuir las armas", + "EmptyBullet": "Se usa para crear diferentes tipos de munición", + "ShadowbeamStaff": "Crea un rayo de sombra que rebota en las paredes", + "InfernoFork": "Lanza una bola de fuego que explota en un intenso infierno", + "SpectreStaff": "Invoca a un alma perdida para que persiga a tus enemigos", + "BubbleMachine": "Lanza burbujas", + "BubbleWand": "Lanza burbujas", + "WaterCandle": "Su portador llamará la atención aunque no lo desee", + "Book": "Contiene extraños símbolos", + "CopperWatch": "Da la hora", + "SpectreHood": "Aumenta el daño de los ataques mágicos en un 40%", + "SpectreRobe": "Aumenta un 7% el daño mágico y la probabilidad de ataque crítico", + "SpectrePants": "Aumenta el daño de los ataques mágicos en un 8%\nAumenta en un 8% la velocidad de movimiento", + "NecroHelmet": "Aumenta un 5% el daño de los ataques a distancia", + "PaladinsHammer": "Un poderoso martillo que regresa a ti", + "BeeWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "NecroBreastplate": "Aumenta un 5% el daño de los ataques a distancia", + "LargeAmethyst": "Para Capturar la Gema. Lo sueltas al morir.", + "LargeTopaz": "Para Capturar la Gema. Lo sueltas al morir.", + "LargeSapphire": "Para Capturar la Gema. Lo sueltas al morir.", + "LargeEmerald": "Para Capturar la Gema. Lo sueltas al morir.", + "LargeRuby": "Para Capturar la Gema. Lo sueltas al morir.", + "LargeDiamond": "Para Capturar la Gema. Lo sueltas al morir.", + "NecroGreaves": "Aumenta un 5% el daño de los ataques a distancia", + "JungleKey": "Desbloquea un cofre de la selva en esta mazmorra", + "CorruptionKey": "Desbloquea un cofre corrupto en esta mazmorra", + "CrimsonKey": "Desbloquea un cofre carmesí en esta mazmorra", + "HallowedKey": "Desbloquea un cofre sagrado en esta mazmorra", + "Cherry": "{$CommonItemTooltip.MinorStats}", + "SpectrePaintbrush": "Se usa para colorear bloques", + "SpectrePaintRoller": "Se usa para colorear paredes", + "GolfBallDyedOrange": "{$CommonItemTooltip.GolfBall}", + "ShroomiteHeadgear": "Aumenta un 15% el daño de las flechas\nAumenta un 5% la probabilidad de asestar ataques críticos a distancia", + "ShroomiteMask": "Aumenta un 15% el daño de las balas\nAumenta un 5% la probabilidad de asestar ataques críticos a distancia", + "ShroomiteHelmet": "Aumenta un 15% el daño de los cohetes\nAumenta un 5% la probabilidad de asestar ataques críticos a distancia", + "KiteBoneSerpent": "{$CommonItemTooltip.Kite}", + "ShroomiteLeggings": "Aumenta un 7% la probabilidad de asestar ataques críticos a distancia\nAumenta en un 12% la velocidad de movimiento", + "Autohammer": "Convierte los lingotes de clorofita en lingotes de piñonita", + "Jetpack": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressUpToBooster}", + "CenxsTiara": "{$CommonItemTooltip.DevItem}", + "CenxsBreastplate": "{$CommonItemTooltip.DevItem}", + "CenxsLeggings": "{$CommonItemTooltip.DevItem}", + "CrownosMask": "{$CommonItemTooltip.DevItem}", + "CrownosBreastplate": "{$CommonItemTooltip.DevItem}", + "CrownosLeggings": "{$CommonItemTooltip.DevItem}", + "CobaltShield": "Vuelve inmune al retroceso", + "WillsHelmet": "{$CommonItemTooltip.DevItem}", + "WillsBreastplate": "{$CommonItemTooltip.DevItem}", + "WillsLeggings": "{$CommonItemTooltip.DevItem}", + "JimsHelmet": "{$CommonItemTooltip.DevItem}", + "JimsBreastplate": "{$CommonItemTooltip.DevItem}", + "JimsLeggings": "{$CommonItemTooltip.DevItem}", + "AaronsHelmet": "{$CommonItemTooltip.DevItem}", + "AaronsBreastplate": "{$CommonItemTooltip.DevItem}", + "AaronsLeggings": "{$CommonItemTooltip.DevItem}", + "VampireKnives": "Lanza con rapidez dagas que roban vida", + "AquaScepter": "Lanza un chorro de agua", + "ScourgeoftheCorruptor": "Una poderosa jabalina que libera a pequeños devoradores", + "Banana": "{$CommonItemTooltip.MinorStats}", + "SweetheartNecklace": "Libera abejas y aumenta la velocidad de movimiento al sufrir daños", + "FlurryBoots": "El portador podrá correr superrápido", + "LuckyHorseshoe": "Anula el daño al caer", + "DTownsHelmet": "{$CommonItemTooltip.DevItem}", + "DTownsBreastplate": "{$CommonItemTooltip.DevItem}", + "DTownsLeggings": "{$CommonItemTooltip.DevItem}", + "GroxTheGreatWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "StillLife": "{$PaintingArtist.Crowno}", + "BloodyGoblet": "{$PaintingArtist.Crowno}", + "WickedUndead": "{$PaintingArtist.Crowno}", + "CenxsDress": "{$CommonItemTooltip.DevItem}", + "CenxsDressPants": "{$CommonItemTooltip.DevItem}", + "ShinyRedBalloon": "Aumenta la altura de los saltos", + "MagicCuffs": "Aumenta el maná máximo en 20\nRecupera maná al sufrir daños", + "SilverWatch": "Da la hora", + "AnkhCharm": "Otorga inmunidad a la mayoría de estados alterados", + "AnkhShield": "Otorga inmunidad al retroceso y a los bloques de fuego\nOtorga inmunidad a la mayoría de estados alterados", + "WaterBolt": "Lanza un proyectil de agua a baja velocidad", + "GolfBall": "{$CommonItemTooltip.GolfBall}", + "Dynamite": "Gran explosión capaz de romper casi todos los ladrillos", + "Grenade": "Pequeña explosión que no rompe ningún ladrillo", + "GoldWatch": "Da la hora", + "FartinaJar": "Su portador puede realizar saltos dobles", + "HellstoneBar": "Caliente al tacto", + "LeprechaunHat": "Pues a mí me parece un leprechaun", + "LeprechaunShirt": "¡Tan solo quiero saber dónde está el oro!", + "LeprechaunPants": "Quiero el oro. Quiero el oro. Quiero el oro. ¡Dadme el oro!", + "GoodieBag": "{$CommonItemTooltip.RightClickToOpen}", + "CandyCornRifle": "Probabilidad del 33% de no gastar munición", + "Sickle": "Permite obtener heno de la hierba", + "KiteAngryTrapper": "{$CommonItemTooltip.Kite}", + "TatteredFairyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "SpiderEgg": "Invoca a una araña mascota", + "MagicalPumpkinSeed": "Invoca a calabacín mascota", + "DepthMeter": "Muestra la profundidad", + "BatScepter": "Invoca murciélagos para que ataquen a tus enemigos", + "RavenStaff": "Invoca a un cuervo para que luche por ti", + "JungleKeyMold": "Se usa para crear una llave de la selva", + "CorruptionKeyMold": "Se usa para crear una llave corrupta", + "CrimsonKeyMold": "Se usa para crear una llave carmesí", + "HallowedKeyMold": "Se usa para crear una llave sagrada", + "FrozenKeyMold": "Se usa para crear una llave congelada", + "RottenEgg": "Ideal para gastar bromas en los pueblos", + "UnluckyYarn": "Invoca a un gatito negro", + "TheHorsemansBlade": "Invoca cabezas de calabaza que atacan a tus enemigos", + "SpookyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "GhostManifestation": "{$PaintingArtist.Crowno}", + "Graveyard": "{$PaintingArtist.Crowno}", + "Reborn": "{$PaintingArtist.Crowno}", + "CursedSapling": "Invoca a un retoño maldito para que te siga", + "PumpkinMoonMedallion": "Invoca a la Luna calabaza", + "Nevermore": "{$PaintingArtist.Crowno}", + "SniperScope": "Aumenta el alcance de la visión con armas ( para alejar)\nAumenta un 10% el daño a distancia y la probabilidad de impacto crítico", + "BreathingReed": "Aumenta el tiempo de respiración y permite respirar bajo el agua", + "JellyfishDivingGear": "Otorga la habilidad de nadar y aumenta notablemente el tiempo de respiración bajo el agua\nOfrece luz al estar bajo el agua", + "ArcticDivingGear": "Otorga la habilidad de nadar y aumenta notablemente el tiempo de respiración bajo el agua\nOfrece luz bajo el agua y movilidad extra en el hielo", + "GnomeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Gnome}", + "FartInABalloon": "Su portador puede realizar saltos dobles\nAumenta la altura de los saltos", + "DandelionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Dandelion}", + "GolfPainting3": "{$PaintingArtist.Crowno}", + "ArkhalisWings": "{$ItemTooltip.ArkhalisHat}\n{$CommonItemTooltip.FlightAndSlowfall}", + "Present": "{$CommonItemTooltip.RightClickToOpen}", + "Flipper": "Permite nadar", + "RedRyder": "¡No te saques un ojo!", + "FestiveWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BladeofGrass": "Puede envenenar a los enemigos", + "EldMelter": "Utiliza gel como munición", + "KiteGoldfish": "{$CommonItemTooltip.Kite}", + "ReindeerBells": "Invoca a un reno que podrás usar", + "CnadyCanePickaxe": "Permite excavar meteoritos", + "KiteBunnyCrimson": "{$CommonItemTooltip.Kite}", + "KiteBunnyCorrupt": "{$CommonItemTooltip.Kite}", + "HandWarmer": "Ofrece inmunidad a los efectos de helado y congelación", + "Coal": "¡Este año te has portado muy mal!", + "GolfPainting2": "{$PaintingArtist.Crowno}", + "DogWhistle": "Invoca a un cachorrito", + "ChristmasTreeSword": "Dispara adornos navideños", + "ChainGun": "Probabilidad del 50% de no gastar munición", + "ObsidianSkull": "Ofrece inmunidad ante los bloques de fuego", + "Razorpine": "Dispara agujas de pino afiladas como cuchillas", + "BlizzardStaff": "Cae una lluvia de carámbanos en la zona", + "SnowmanCannon": "Lanza misiles guiados", + "NorthPole": "Dispara una lanza de hielo que hace caer copos de nieve", + "NaughtyPresent": "Invoca a la Luna Gélida", + "BabyGrinchMischiefWhistle": "Invoca a un Grinch bebé", + "StarCannon": "Dispara estrellas fugaces", + "Fez": "Los feces molan", + "JungleRose": "Hermosa, muy hermosa", + "FeralClaws": "Aumenta un 12% la velocidad del cuerpo a cuerpo", + "AnkletoftheWind": "Aumenta en un 10% la velocidad de movimiento", + "GolfClubIron": "{$CommonItemTooltip.GolfIron}", + "WhoopieCushion": "Una molestia para los demás", + "HeavyWorkBench": "Se usa para fabricación avanzada", + "AmmoBox": "Reduce un 20% el consumo de munición", + "Flamelash": "Lanza una bola de fuego dirigible", + "VenomStaff": "Dispara un colmillo venenoso que atraviesa a varios enemigos", + "SpectreMask": "Aumenta el maná máximo en 60 y reduce el consumo de maná un 13%\nAumenta un 5% el daño mágico y la probabilidad de ataque crítico", + "BoneWelder": "{$CommonItemTooltip.SpecialCrafting}", + "FleshCloningVaat": "{$CommonItemTooltip.SpecialCrafting}", + "GlassKiln": "{$CommonItemTooltip.SpecialCrafting}", + "LihzahrdFurnace": "{$CommonItemTooltip.SpecialCrafting}", + "LivingLoom": "{$CommonItemTooltip.SpecialCrafting}", + "SkyMill": "{$CommonItemTooltip.SpecialCrafting}", + "IceMachine": "{$CommonItemTooltip.SpecialCrafting}", + "BeetleHelmet": "Aumenta un 6% el daño cuerpo a cuerpo\nSerá más probable que los enemigos te ataquen", + "BeetleScaleMail": "Aumenta un 8% el daño cuerpo a cuerpo y la probabilidad de ataque crítico\nAumenta un 6% la velocidad de movimiento y del cuerpo a cuerpo", + "BeetleShell": "Aumenta un 5% el daño cuerpo a cuerpo y la probabilidad de ataque crítico\nSerá más probable que los enemigos te ataquen", + "BeetleLeggings": "Aumenta un 6% la velocidad de movimiento y el daño cuerpo a cuerpo\nSerá más probable que los enemigos te ataquen", + "SteampunkBoiler": "{$CommonItemTooltip.SpecialCrafting}", + "HoneyDispenser": "{$CommonItemTooltip.SpecialCrafting}", + "BrickLayer": "Aumenta la velocidad a la que se colocan baldosas", + "GolfPainting1": "{$PaintingArtist.Crowno}", + "PaintSprayer": "Pinta automáticamente los objetos colocados", + "PortableCementMixer": "Aumenta la velocidad de colocación de paredes", + "CelestialMagnet": "Aumenta el rango de recogida de estrellas de maná", + "ClayPot": "Cultiva plantas", + "CelestialEmblem": "Aumenta el rango de recogida de estrellas de maná\nAumenta el daño de los ataques mágicos en un 15%", + "CelestialCuffs": "Aumenta el rango de recogida de estrellas de maná\nRecupera maná al sufrir daños", + "PulseBow": "Dispara una flecha cargada", + "NaturesGift": "Reduce el uso de maná en un 6%", + "KiteSandShark": "{$CommonItemTooltip.Kite}", + "KiteShark": "{$CommonItemTooltip.Kite}", + "RestorationPotion": "Reduce el tiempo de espera para usar pociones", + "Gatligator": "Probabilidad del 50% de no gastar munición\nMuy impreciso", + "WaterGun": "Lanza un inofensivo chorro de agua", + "MagicHat": "Aumenta un 7% el daño mágico y la probabilidad de ataque crítico", + "Gi": "Aumenta un 5% el daño y la probabilidad de ataque crítico\nAumenta en un 10% la velocidad de movimiento y del cuerpo a cuerpo", + "GypsyRobe": "Aumenta un 6% el daño mágico y la probabilidad de ataque crítico\nReduce el consumo de maná un 10%", + "JungleHat": "Aumenta el maná máximo en 40\nAumenta un 4% la probabilidad de impacto mágico crítico", + "BeetleWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "JungleShirt": "Aumenta el maná máximo en 20\nAumenta un 4% la probabilidad de impacto mágico crítico", + "Gel": "Sabroso a la par que inflamable", + "JunglePants": "Aumenta el maná máximo en 20\nAumenta un 4% la probabilidad de impacto mágico crítico", + "NeonTetra": "Sus escamas coloridas se podrían vender a buen precio", + "Grapefruit": "{$CommonItemTooltip.MinorStats}", + "MiningPotion": "Aumenta un 25% la velocidad de minería", + "HeartreachPotion": "Aumenta el rango de recogida de corazones", + "DungeonFishingCrateHard": "{$ItemTooltip.DungeonFishingCrate}", + "BuilderPotion": "Aumenta el alcance y la velocidad de colocación", + "TitanPotion": "Aumenta el retroceso", + "FlipperPotion": "Te permite moverte más rápido en líquidos", + "DivineEye": "{$PaintingArtist.Darthkitten}", + "TrapsightPotion": "Te permite ver los peligros cercanos", + "WoodenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "IronCrate": "{$CommonItemTooltip.RightClickToOpen}", + "GoldenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "AmmoReservationPotion": "Probabilidad del 20% de no gastar munición", + "LifeforcePotion": "Aumenta un 20% la vida máxima", + "EndurancePotion": "Reduce un 10% el daño sufrido", + "RagePotion": "Aumenta un 10% la probabilidad de impacto crítico", + "InfernoPotion": "Prende fuego a los enemigos cercanos", + "WrathPotion": "Aumenta un 10% el daño", + "GolfClubDriver": "{$CommonItemTooltip.GolfDriver}", + "RecallPotion": "Te teletransporta a casa", + "TeleportationPotion": "Te teletransporta a una ubicación aleatoria", + "LovePotion": "Lánzaselo a alguien para que se enamore", + "StinkPotion": "Lánzaselo a alguien para que huela fatal", + "BandageBoy": "{$PaintingArtist.Darthkitten}", + "SonarPotion": "Detecta que un pez ha picado", + "CratePotion": "Aumenta la probabilidad de conseguir una caja", + "WarmthPotion": "Reduce el daño de las fuentes de frío", + "VisitingThePyramids": "{$PaintingArtist.Leinfors}", + "Uluru": "{$PaintingArtist.darthmorf}", + "BeeGreaves": "Aumenta un 5% el daño de los súbditos", + "HornetStaff": "Invoca a un avispón para que luche por ti", + "ImpStaff": "Invoca a un diablillo para que luche por ti", + "Oasis": "{$PaintingArtist.Khaios}", + "LifeAboveTheSand": "{$PaintingArtist.Zoomo}", + "SnakesIHateSnakes": "{$PaintingArtist.Xman101}", + "Sunglasses": "¡Te quedan muy bien!", + "TheSandsOfSlime": "{$PaintingArtist.Criddle}", + "JawsOfDeath": "{$PaintingArtist.Darthkitten}", + "BurningSpirit": "{$PaintingArtist.Zoomo}", + "HighTestFishingLine": "El sedal nunca se romperá", + "FruitSalad": "{$CommonItemTooltip.MinorStats}", + "TackleBox": "Reduce la probabilidad de consumo del cebo", + "WizardHat": "Aumenta el daño de los ataques mágicos en un 15%", + "ZephyrFish": "Invoca a un pez zafiro como mascota", + "FrogLeg": "Aumenta la velocidad de salto y permite el salto automático\nAumenta la resistencia a las caídas", + "Dragonfruit": "{$CommonItemTooltip.MediumStats}", + "KiteJellyfishPink": "{$CommonItemTooltip.Kite}", + "KiteJellyfishBlue": "{$CommonItemTooltip.Kite}", + "FinWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "OpticStaff": "Invoca a unos gemelos para que peleen por ti", + "RedHat": "Esto huele raro...", + "Goldfish": "Sonríe, así que podría ser un buen aperitivo", + "Sandgun": "¡Qué buena idea!", + "GuideVoodooDoll": "Eres mala persona.", + "DivingHelmet": "Permite respirar bajo el agua mucho más tiempo", + "DemonScythe": "Lanza una guadaña demoníaca", + "Blowpipe": "Permite recoger semillas como munición", + "Glowstick": "Funciona si se moja", + "Seed": "Se usa con la cerbatana", + "Aglet": "Aumenta en un 5% la velocidad de movimiento", + "ObsidianSkinPotion": "Ofrece inmunidad a la lava", + "RegenerationPotion": "Regenera la vida", + "LifeCrystal": "Aumenta el nivel máximo de vida en 20 de forma permanente", + "SwiftnessPotion": "Aumenta en un 25% la velocidad de movimiento", + "GillsPotion": "Permite respirar agua en vez de aire", + "IronskinPotion": "Aumenta la defensa en 8", + "ManaRegenerationPotion": "Aumenta la regeneración de maná", + "MagicPowerPotion": "Aumenta el daño de los ataques mágicos en un 20%", + "FeatherfallPotion": "Disminuye la velocidad de caída", + "SpelunkerPotion": "Muestra la ubicación de tesoros y minerales", + "InvisibilityPotion": "Proporciona invisibilidad", + "ShinePotion": "Emite un aura de luz", + "NightOwlPotion": "Mejora la visión nocturna", + "BattlePotion": "Aumenta la velocidad de regeneración del enemigo", + "ThornsPotion": "Los atacantes también sufren daños", + "WaterWalkingPotion": "Permite caminar sobre el agua", + "ArcheryPotion": "Aumenta en un 20% la velocidad de las flechas y el daño que causan", + "HunterPotion": "Muestra la ubicación de los enemigos", + "GravitationPotion": "Permite controlar la gravedad", + "IllegalGunParts": "Prohibidos en casi todas partes", + "GolfClubWedge": "{$CommonItemTooltip.GolfWedge}", + "BetsyWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "Furnace": "Se usa para fundir minerales", + "Loom": "Se usa para confeccionar ropa", + "IronAnvil": "Se usa para fabricar objetos con lingotes de metal", + "Keg": "Se usa para elaborar cerveza", + "KiteManEater": "{$CommonItemTooltip.Kite}", + "WorkBench": "Se usa para creaciones básicas", + "GoblinBattleStandard": "Invoca a un ejército de duendes", + "Sawmill": "Se usa para fabricar artículos de madera avanzados", + "Pwnhammer": "Lo bastante sólido para destruir los altares demoníacos", + "CobaltHat": "Aumenta el maná máximo en 40\nAumenta un 9% la probabilidad de impacto mágico crítico", + "CobaltHelmet": "Aumenta un 7% la velocidad de movimiento\nAumenta un 12% la velocidad del cuerpo a cuerpo", + "CobaltMask": "Aumenta un 10% el daño de los ataques a distancia\nAumenta un 6% la probabilidad de asestar ataques críticos a distancia", + "MythrilHood": "Aumenta el maná máximo en 60\nAumenta el daño de los ataques mágicos en un 15%", + "MythrilHelmet": "Aumenta un 5% la probabilidad de ataque crítico en el cuerpo a cuerpo\nAumenta un 10% el daño cuerpo a cuerpo", + "MythrilHat": "Aumenta un 12% el daño de los ataques a distancia\nAumenta un 7% la probabilidad de asestar ataques críticos a distancia", + "CobaltDrill": "Permite extraer mithril y oricalco", + "MythrilDrill": "Permite extraer adamantita y titanio", + "WingsNebula": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "Compass": "Muestra la posición horizontal", + "DivingGear": "Permite nadar\nPermite respirar bajo el agua mucho más tiempo", + "GPS": "Indica la posición\nDa la hora", + "ObsidianHorseshoe": "Anula el daño al caer\nOfrece inmunidad ante los bloques de fuego", + "ObsidianShield": "Vuelve inmune al retroceso\nOfrece inmunidad ante los bloques de fuego", + "TinkerersWorkshop": "Permite combinar algunos accesorios", + "CloudinaBalloon": "Su portador puede realizar saltos dobles\nAumenta la altura de los saltos", + "AdamantiteHeadgear": "Aumenta el maná máximo en 80\nAumenta un 11% el daño mágico y la probabilidad de ataque crítico", + "AdamantiteHelmet": "Aumenta un 7% la probabilidad de ataque crítico en el cuerpo a cuerpo\nAumenta un 14% el daño cuerpo a cuerpo", + "AdamantiteMask": "Aumenta un 14% el daño de los ataques a distancia\nAumenta un 8% la probabilidad de asestar ataques críticos a distancia", + "AdamantiteBreastplate": "Aumenta un 6% el daño", + "AdamantiteLeggings": "Aumenta un 4% la probabilidad de ataque crítico\nAumenta en un 5% la velocidad de movimiento", + "SpectreBoots": "Permite volar\nEl portador podrá correr superrápido", + "FruitJuice": "{$CommonItemTooltip.MinorStats}", + "HolyWater": "Extiende lo sagrado a algunos bloques", + "CrimsonFishingCrateHard": "{$ItemTooltip.CrimsonFishingCrate}", + "FairyBell": "Invoca a un hada mágica", + "SuspiciousLookingEye": "Invoca al Ojo de Cthulhu", + "ClockworkAssaultRifle": "Disparo de tres ráfagas\nSolo gasta munición el primer disparo", + "MoonCharm": "Convierte a su portador en hombre lobo durante la noche", + "KiteCrawltipede": "{$CommonItemTooltip.Kite}", + "SorcererEmblem": "Aumenta el daño de los ataques mágicos en un 15%", + "BandofRegeneration": "Regenera la vida poco a poco", + "WarriorEmblem": "Aumenta un 15% el daño cuerpo a cuerpo", + "RangerEmblem": "Aumenta un 15% el daño de los ataques a distancia", + "DemonWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "AngelWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "RainbowRod": "Lanza un arcoíris dirigible", + "IceRod": "Invoca un bloque de hielo", + "NeptunesShell": "Transforma a su portador en un tritón al sumergirse en el agua", + "MagicMirror": "Al mirarte en él regresarás a tu hogar", + "Flamethrower": "Utiliza gel como munición", + "Wrench": "Coloca un cable rojo", + "WireCutter": "Quita el cable", + "CrystalBullet": "Crea varios fragmentos de cristal al impactar", + "HolyArrow": "Invoca estrellas fugaces al impactar", + "MagicDagger": "Una daga mágica que siempre regresa", + "CrystalStorm": "Lanza fragmentos de cristal a toda velocidad", + "CursedFlames": "Lanza bolas de fuego impuras", + "SoulofLight": "La esencia de las criaturas de la luz", + "SoulofNight": "La esencia de las criaturas de la oscuridad", + "CursedFlame": "Ni siquiera el agua puede apagarla", + "CursedTorch": "Se puede meter en el agua", + "AdamantiteForge": "Se usa para fundir los minerales de adamantita y titanio", + "MythrilAnvil": "Se usa para fabricar objetos con lingotes de mithril, oricalco, adamantita y titanio", + "UnicornHorn": "¡Puntiagudo y mágico!", + "CrownosWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "LightShard": "A veces lo llevan las criaturas de los desiertos de luz", + "RedPressurePlate": "Se activa al pisarla", + "CloudinaBottle": "Su portador puede realizar saltos dobles", + "SpellTome": "Se puede hechizar", + "PrismaticPunch": "{$CommonItemTooltip.MediumStats}", + "Megashark": "Probabilidad del 50% de no gastar munición\nEl hermano mayor del minitiburón", + "Shotgun": "Dispara una ráfaga dispersa de balas", + "FrozenCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "Mango": "{$CommonItemTooltip.MinorStats}", + "HermesBoots": "El portador podrá correr superrápido", + "GreenPressurePlate": "Se activa al pisarla", + "GrayPressurePlate": "Se activa cuando un jugador se pone encima", + "BrownPressurePlate": "Se activa cuando un jugador se pone encima", + "MechanicalEye": "Invoca a los Gemelos", + "SoulofFright": "La esencia del terror en estado puro", + "SoulofMight": "La esencia del Destructor", + "SoulofSight": "La esencia de los observadores omniscientes", + "HallowedPlateMail": "Aumenta un 7% la probabilidad de ataque crítico", + "HallowedGreaves": "Aumenta un 7% el daño\nAumenta en un 8% la velocidad de movimiento", + "HallowedHelmet": "Aumenta un 15% el daño de los ataques a distancia\nAumenta un 8% la probabilidad de asestar ataques críticos a distancia", + "CrossNecklace": "Aumenta el tiempo de invencibilidad tras recibir daños", + "ManaFlower": "Reduce el uso de maná en un 8%\nUsa de forma automática pociones de maná cuando se necesitan", + "Elderberry": "{$CommonItemTooltip.MinorStats}", + "MechanicalSkull": "Invoca al Esqueletrón mayor", + "HallowedHeadgear": "Aumenta el maná máximo en 100\nAumenta un 12% el daño mágico y la probabilidad de ataque crítico", + "KiteYellow": "{$CommonItemTooltip.Kite}", + "DemoniteOre": "Una energía oscura fluye en su interior", + "SlimeCrown": "Invoca al rey slime", + "LightDisc": "Se acumula hasta 5 veces", + "DemoniteBar": "Una energía oscura fluye en su interior", + "SoulofFlight": "La esencia de poderosas criaturas que vuelan", + "MusicBox": "Permite grabar canciones", + "Drax": "No se debe confundir con un picoserrucho", + "Explosives": "Explota al activarse", + "InletPump": "Envía agua a los colectores de salida", + "OutletPump": "Recibe agua de los colectores de entrada", + "Timer1Second": "Se activa cada segundo", + "Timer3Second": "Se activa cada 3 segundos", + "Timer5Second": "Se activa cada 5 segundos", + "BluePresent": "{$CommonItemTooltip.RightClickToOpen}", + "GreenPresent": "{$CommonItemTooltip.RightClickToOpen}", + "YellowPresent": "{$CommonItemTooltip.RightClickToOpen}", + "SnowGlobe": "Invoca a la Legión de escarcha", + "Carrot": "Invoca a conejo mascota", + "Vilethorn": "Lanza una espina vil", + "Starfury": "Hace que lluevan estrellas del cielo\nForjada por la furia del cielo", + "PurificationPowder": "Limpia el mal", + "SmoothieofDarkness": "{$CommonItemTooltip.MinorStats}", + "RedsHelmet": "{$CommonItemTooltip.DevItem}", + "RedsBreastplate": "{$CommonItemTooltip.DevItem}", + "RedsLeggings": "{$CommonItemTooltip.DevItem}", + "Fish": "Invoca a un bebé pingüino", + "BloodOrange": "{$CommonItemTooltip.MinorStats}", + "Frostbrand": "Dispara un rayo de hielo", + "RedPotion": "Solo para aquellos que sean dignos", + "RottenChunk": "¡Qué delicia!", + "UnholyTrident": "Invoca el tridente del diablo", + "FrostHelmet": "Aumenta un 16% el daño cuerpo a cuerpo y a distancia", + "FrostBreastplate": "Aumenta en un 11% el daño de los ataques mágicos y la posibilidad de asestar ataques críticos", + "FrostLeggings": "Aumenta en un 8% la velocidad de movimiento\nAumenta un 7% la velocidad de los ataques cuerpo a cuerpo", + "WormFood": "Invoca al Devoramundos", + "TinWatch": "Da la hora", + "TungstenWatch": "Da la hora", + "PlatinumWatch": "Da la hora", + "LeadAnvil": "Se usa para fabricar objetos con lingotes de metal", + "BeamSword": "Dispara un rayo de luz", + "IceBlade": "Dispara un rayo de hielo", + "IceBow": "Lanza flechas de escarcha", + "FrostStaff": "Lanza un río de escarcha", + "BlueCultistCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistDevote}", + "ButterflyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "FallenStar": "Desaparece al amanecer", + "Seaweed": "Invoca a una tortuga mascota", + "FairyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "Clentaminator": "Crea y destruye biomedios al usarlo\nUsa una solución de color", + "GreenSolution": "Lo usa el Clentaminator\nSiembra Pureza", + "BlueSolution": "Lo usa el Clentaminator\nSiembra Sagrado", + "PurpleSolution": "Lo usa el Clentaminator\nSiembra Corrupción", + "DarkBlueSolution": "Lo usa el Clentaminator\nSiembra Champiñones brillantes", + "RedSolution": "Lo usa el Clentaminator\nSiembra Carmesí", + "HarpyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BoneWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "Hammush": "Lo bastante sólido para destruir los altares demoníacos", + "NettleBurst": "Invoca una lanza de espinas", + "CrimsonHelmet": "Aumenta un 2% el daño", + "CrimsonScalemail": "Aumenta un 2% el daño", + "CrimsonGreaves": "Aumenta un 2% el daño", + "DeathbringerPickaxe": "Permite extraer piedra infernal", + "Torch": "Da luz", + "FlameWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "FrozenWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "GhostWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "LivingWoodWand": "Coloca madera viviente", + "GrapplingHook": "¡Te atrapé!", + "Actuator": "Permite activar y desactivar bloques sólidos", + "Chain": "Se puede usar para subir", + "BlueWrench": "Coloca un cable azul", + "GreenWrench": "Coloca un cable verde", + "BluePressurePlate": "Se activa cuando un jugador se pone encima", + "YellowPressurePlate": "Se activa cuando se pone encima cualquier cosa que no sea un jugador", + "FrozenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LuckyCoin": "En ocasiones, golpear a los enemigos te dará monedas extra", + "UnicornonaStick": "¡Me lo estoy pasando de miedo!", + "SandstorminaBottle": "Permite al portador realizar un salto doble mejorado", + "CanOfWorms": "{$CommonItemTooltip.RightClickToOpen}", + "MoonShell": "Convierte a quien lo lleve en hombre lobo por la noche y en tritón al entrar en el agua", + "StarVeil": "Provoca que las estrellas caigan y aumenta la duración de la invencibilidad tras sufrir daños", + "BloodyMoscato": "{$CommonItemTooltip.MinorStats}", + "MiningHelmet": "Da luz a su portador", + "AdhesiveBandage": "Inmunidad a Hemorragia", + "ArmorPolish": "Inmunidad a Armadura rota", + "Bezoar": "Inmunidad a Veneno", + "Blindfold": "Inmunidad a Oscuridad", + "FastClock": "Inmunidad a Lentitud", + "Megaphone": "Inmunidad a Silencio", + "Nazar": "Inmunidad a Maldición", + "Vitamins": "Inmunidad a Debilidad", + "TrifoldMap": "Inmunidad a Confusión", + "Lemon": "{$CommonItemTooltip.MinorStats}", + "TropicalSmoothie": "{$CommonItemTooltip.MinorStats}", + "PinaColada": "{$CommonItemTooltip.MinorStats}", + "PeachSangria": "{$CommonItemTooltip.MinorStats}", + "ArmorBracing": "Inmunidad a Debilidad y Armadura rota", + "MedicatedBandage": "Inmunidad a Veneno y Hemorragia", + "ThePlan": "Inmunidad a Lentitud y Confusión", + "CountercurseMantra": "Inmunidad a Silencio y Maldición", + "CoinGun": "Usa monedas como munición\nLas monedas de mayor valor infligen más daño", + "LavaCharm": "Ofrece 7 segundos de inmunidad a la lava", + "BananaDaiquiri": "{$CommonItemTooltip.MinorStats}", + "Pineapple": "{$CommonItemTooltip.MinorStats}", + "BoneWand": "Coloca un hueso", + "LeafWand": "Coloca hojas", + "FlyingCarpet": "Permite al propietario flotar durante unos segundos", + "AvengerEmblem": "Aumenta un 12% el daño", + "Lemonade": "{$CommonItemTooltip.MinorStats}", + "LandMine": "Explota cuando se pisa", + "Starfruit": "{$CommonItemTooltip.MediumStats}", + "Umbrella": "Con esto, caerás más despacio", + "ChlorophyteOre": "Reacciona a la luz", + "GrapeJuice": "{$CommonItemTooltip.MajorStats}", + "IceSkates": "Ofrece movilidad extra sobre el hielo\nEl hielo no se romperá al caer sobre él", + "SnowballLauncher": "Lanza rápidamente bolas de nieve", + "ClimbingClaws": "Otorga la habilidad de deslizarse por paredes\nLa habilidad mejora si se combina con los Zapatos de púa", + "AncientShadowHelmet": "Aumenta un 7% la velocidad del cuerpo a cuerpo", + "AncientShadowScalemail": "Aumenta un 7% la velocidad del cuerpo a cuerpo", + "AncientShadowGreaves": "Aumenta un 7% la velocidad del cuerpo a cuerpo", + "AncientNecroHelmet": "Aumenta un 5% el daño de los ataques a distancia", + "AncientCobaltHelmet": "Aumenta el maná máximo en 40\nAumenta un 4% la probabilidad de impacto mágico crítico", + "AncientCobaltBreastplate": "Aumenta el maná máximo en 20\nAumenta un 4% la probabilidad de impacto mágico crítico", + "AncientCobaltLeggings": "Aumenta el maná máximo en 20\nAumenta un 4% la probabilidad de impacto mágico crítico", + "BlackBelt": "Otorga la posibilidad de esquivar ataques", + "Boomstick": "Dispara una ráfaga dispersa de balas", + "Rope": "Se puede usar para subir", + "Campfire": "La regeneración de vida es mayor junto a una hoguera", + "Marshmallow": "Ponlo en un palo y ásalo en una hoguera", + "MarshmallowonaStick": "¡Para asar en una hoguera!", + "Coconut": "{$CommonItemTooltip.MinorStats}", + "ShoeSpikes": "Otorga la habilidad de deslizarse por paredes\nLa habilidad mejora si se combina con las Garras de escalada", + "TigerClimbingGear": "Otorga la habilidad de escalar paredes", + "Tabi": "Otorga la habilidad de correr\nToca dos veces en una dirección", + "Minishark": "Probabilidad del 33% de no gastar munición\nMitad tiburón, mitad arma, 100% maravilloso", + "ManaRegenerationBand": "Aumenta el maná máximo en 20\nAumenta la velocidad a la que se regenera el maná", + "SandstorminaBalloon": "Su portador puede realizar saltos dobles\nAumenta la altura de los saltos", + "MasterNinjaGear": "Otorga la habilidad de escalar paredes y correr\nOtorga la posibilidad de esquivar ataques", + "RopeCoil": "Se puede lanzar para crear una cuerda por la que escalar", + "Blowgun": "Permite recoger semillas como munición", + "BlizzardinaBottle": "Su portador puede realizar saltos dobles", + "EnchantedSword": "Lanza un rayo encantado con la espada", + "PickaxeAxe": "No confundir con un taladro-martillo", + "EatersBone": "Invoca a un comealmas bebé", + "BlendOMatic": "Se usa para crear objetos", + "MeatGrinder": "Se usa para crear objetos", + "Rambutan": "{$CommonItemTooltip.MinorStats}", + "Solidifier": "Se usa para crear objetos", + "ActuationAccessory": "Coloca activadores sobre objetos colocados", + "ActuationRod": "Activa los activadores", + "AlchemyTable": "Probabilidad del 33% de no consumir los ingredientes al crear una poción", + "AncientBattleArmorHat": "Aumenta un 15% el daño mágico y el de los súbditos", + "AppleJuice": "{$CommonItemTooltip.MinorStats}", + "WoodenCrateHard": "{$ItemTooltip.WoodenCrate}", + "AncientHorn": "Invoca un basilisco como montura", + "BloodNautilusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodNautilus}", + "GoblinSharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinShark}", + "AviatorSunglasses": "Activa a tu compañero interior\n¡Ideal para suplantar a los retransmisores!", + "KitePigron": "{$CommonItemTooltip.Kite}", + "BalloonHorseshoeFart": "Su portador puede realizar saltos dobles\nAumenta la altura de los saltos y anula el daño al caer", + "BalloonHorseshoeHoney": "Libera abejas al sufrir daños\nAumenta la altura de los saltos y anula el daño al caer", + "BalloonHorseshoeSharkron": "Su portador puede realizar saltos dobles\nAumenta la altura de los saltos y anula el daño al caer", + "BalloonPufferfish": "Aumenta la altura de los saltos", + "BeesKnees": "Las flechas de madera se convierten en una columna de abejas", + "BejeweledValkyrieBody": "{$CommonItemTooltip.DevItem}\nEnjoyado y elegante para moverse bajo cielos de tormenta", + "BejeweledValkyrieHead": "{$CommonItemTooltip.DevItem}\nSé el viento, cabalga el rayo.", + "BloodEelBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodEelHead}", + "BewitchingTable": " para tener más súbditos", + "Bladetongue": "Al contacto, escupe un río de icor", + "BlessedApple": "Invoca un unicornio como montura", + "CorruptFishingCrateHard": "{$ItemTooltip.CorruptFishingCrate}", + "JungleFishingCrateHard": "{$ItemTooltip.JungleFishingCrate}", + "BoneCampfire": "La regeneración de vida es mayor junto a una hoguera", + "BoneRattle": "Invoca a un caramonstruo bebé", + "BoneTorch": "Emite un brillo letal", + "BoosterTrack": "Golpea para cambiar de dirección", + "GolfClubPutter": "{$CommonItemTooltip.GolfPutter}", + "HallowedFishingCrateHard": "{$ItemTooltip.HallowedFishingCrate}", + "KiteRedAndYellow": "{$CommonItemTooltip.Kite}", + "BouncyGlowstick": "Funciona si se moja", + "BouncyGrenade": "Pequeña explosión que no rompe ningún ladrillo\nMuy rebotante", + "WillsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "BrainScrambler": "Invoca un scutlix como montura", + "BubbleGun": "Dispara con rapidez burbujas fuertes", + "ButchersChainsaw": "Se emiten chispas al golpear a los enemigos", + "BloodSquidBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodSquid}", + "CelestialSigil": "Invoca al Infierno inminente", + "CellPhone": "Lo muestra todo\nTe permite regresar a casa cuando quieras", + "ClingerStaff": "Invoca un muro de llamas malditas", + "CogWall": "Aumenta un 200% la productividad", + "CoinRing": "Aumenta el alcance de recolección de monedas\nEn ocasiones, golpear a los enemigos te dará monedas extra", + "CompanionCube": "¡Susceptible a la lava!", + "CordageGuide": "Permite la obtención de cuerdas de enredaderas", + "CorruptFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "CosmicCarKey": "Invoca un OVNI como montura", + "CrimsonFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "CrimsonHeart": "Invoca a un corazón que te ofrece luz", + "CrystalSerpent": "Dispara una carga de cristal explosivo", + "CrystalVileShard": "Invoca un gigantesco pincho de cristal", + "CursedCampfire": "La regeneración de vida es mayor junto a una hoguera", + "DaedalusStormbow": "Dispara flechas desde el cielo", + "DayBreak": "¡Separa a tus enemigos con una lanza de luz!", + "DemonCampfire": "La regeneración de vida es mayor junto a una hoguera", + "DemonHeart": "Aumenta permanentemente el número de ranuras para accesorios", + "Detonator": "Entrañas... ¡y sangre!", + "DevDye": "{$CommonItemTooltip.DevItem}", + "DjinnsCurse": "A cambio de tus pies, caerás despacito", + "DPSMeter": "Muestra tu daño por segundo", + "DrillContainmentUnit": "Invoca un taladro como montura", + "DungeonFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "EoCShield": "Permite que el jugador vaya corriendo hacia el enemigo\nToca dos veces en una dirección", + "FishermansGuide": "Muestra información para la pesca", + "FishFinder": "Muestra el clima, la fase de la luna e información para la pesca", + "FishronWings": "{$CommonItemTooltip.FlightAndSlowfall}\nPermite viajar rápido en el agua", + "Flairon": "Escupe burbujas dirigidas", + "FleshKnuckles": "Será más probable que los enemigos te ataquen", + "FloatingIslandFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "FlowerBoots": "Crecerán las flores a tu paso cuando andes sobre la hierba", + "FlyingKnife": "Lanza un cuchillo volador dirigible", + "GolfBallDyedBrown": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedBlue": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedBlack": "{$CommonItemTooltip.GolfBall}", + "FragmentNebula": "El poder de toda una galaxia reside dentro de este fragmento", + "FragmentSolar": "La furia del universo reside dentro de este fragmento", + "FragmentStardust": "Partículas deslumbrantes giran dentro de este fragmento", + "FragmentVortex": "Energías turbulentas emanan de este fragmento", + "FrozenCampfire": "La regeneración de vida es mayor junto a una hoguera", + "FuzzyCarrot": "Invoca un conejito como montura", + "GemLockAmber": " para colocar o quitar ámbar grande", + "GemLockAmethyst": " para colocar o quitar amatistas grandes", + "GemLockDiamond": " para colocar o quitar diamantes grandes", + "GemLockEmerald": " para colocar o quitar esmeraldas grandes", + "GemLockRuby": " para colocar o quitar rubíes grandes", + "GemLockSapphire": " para colocar o quitar zafiros grandes", + "GemLockTopaz": " para colocar o quitar topacios grandes", + "GoblinTech": "Muestra la velocidad de movimiento, el daño por segundo y los minerales valiosos", + "GoldPickaxe": "Permite excavar meteoritos", + "GoldRing": "Aumenta el alcance de recolección de monedas", + "Plum": "{$CommonItemTooltip.MinorStats}", + "KiteBunny": "{$CommonItemTooltip.Kite}", + "HallowedFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "HardySaddle": "Invoca una tortuga como montura", + "HellwingBow": "Las fechas de madera se convierten en murciélagos en llamas", + "HerbBag": "{$CommonItemTooltip.RightClickToOpen}", + "HiveBackpack": "Aumenta la fuerza de las abejas amigas", + "HoneyedGoggles": "Invoca una abeja como montura", + "IceMirror": "Al mirarte en él regresarás a tu hogar", + "IchorCampfire": "La regeneración de vida es mayor junto a una hoguera", + "EyeballFlyingFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EyeballFlyingFish}", + "JungleFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LargeAmber": "Para Capturar la Gema. Lo sueltas al morir.", + "LaserRuler": "Dibuja líneas de medidas en pantalla para colocar los bloques", + "LastPrism": "Lanza un arcoíris que desintegra toda forma de vida", + "LifeformAnalyzer": "Muestra el nombre de las criaturas extrañas a tu alrededor", + "LightKey": "Está cargado con la esencia de muchas almas", + "LivingMahoganyLeafWand": "Coloca hojas de caoba rica", + "LivingMahoganyWand": "Coloca caoba rica viviente", + "LockBox": "{$CommonItemTooltip.RightClickToOpen}\nSe necesita una llave dorada", + "LogicGateLamp_Faulty": "Coloca esto sobre un interruptor de puerta lógica para aleatorizar la activación", + "LogicGateLamp_Off": "Coloca esto sobre puertas lógicas para añadir verificaciones", + "LogicGateLamp_On": "Coloca esto sobre puertas lógicas para añadir verificaciones", + "LogicGate_NOR": "Juzga los interruptores de puertas lógicas que tenga encima\nSe activa cuando ninguna lámpara está encendida; se desactiva cuando no es así.", + "LogicGate_NXOR": "Juzga los interruptores de puertas lógicas que tenga encima\nSe activa cuando haya más de una lámpara encendida; se desactiva cuando no es así.\nTambién se suele llamar NXOR.", + "LogicGate_OR": "Juzga los interruptores de puertas lógicas que tenga encima\nSe activa cuando cualquier lámpara está encendida; se desactiva cuando no es así.", + "LogicGate_XOR": "Juzga los interruptores de puertas lógicas que tenga encima\nSe activa cuando solo hay una lámpara encendida; se desactiva cuando no es así.", + "LogicSensor_Above": "Se activa si hay jugadores encima; se desactiva si no los hay.", + "LogicSensor_Honey": "Se activa si tiene miel; se desactiva si no es así.", + "LogicSensor_Lava": "Se activa si tiene lava; se desactiva si no es así.", + "LogicSensor_Liquid": "Se activa si tiene líquido; se desactiva si no es así.", + "LogicSensor_Moon": "Se activa al hacerse de noche", + "LogicSensor_Sun": "Se activa al hacerse de día", + "LogicSensor_Water": "Se activa si tiene agua; se desactiva si no es así.", + "LokisDye": "{$CommonItemTooltip.DevItem}", + "LokisHelm": "{$CommonItemTooltip.DevItem}\nEl desorden tiene su origen en el orden, el miedo en el coraje y la debilidad en la fuerza.", + "LokisPants": "{$CommonItemTooltip.DevItem}\nLa justicia va lenta, pero sobre seguro.", + "LokisShirt": "{$CommonItemTooltip.DevItem}\nConócete a ti mismo, conoce al enemigo. Un millar de batallas, un millar de victorias...", + "ZombieMermanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieMerman}", + "LunarBar": "Vibra con energía celestial luminosa", + "LunarCraftingStation": "Se usa para crear objetos a partir de fragmentos lunares y luminita", + "LunarFlareBook": "Llueven bengalas lunares", + "LunarHook": "¿Quieres la luna? ¡Pues engánchala y tira de ella!", + "LunarOre": "Un guijarro celestial", + "MagicLantern": "Invoca una linterna mágica que expone un tesoro cercano", + "MechanicalLens": "Otorga una visión mejorada de los cables", + "MetalDetector": "Muestra los minerales más valiosos a tu alrededor", + "MeteorStaff": "Hace caer meteoritos", + "Minecart": "¡A conquistar las vías!", + "MinecartTrack": "Martillea la pieza final para cambiar el estilo de la defensa\nGolpea las intersecciones para cambiar de dirección", + "MolotovCocktail": "Una pequeña explosión que prende fuego al enemigo\nDurante un rato, prende fuego a la zona cercana", + "MoneyTrough": "Invoca una hucha voladora para guardar tus objetos", + "MoonlordArrow": "¡Derribándolos a la velocidad del sonido!", + "MoonlordBullet": "Ponlos en línea y derríbalos...", + "Apricot": "{$CommonItemTooltip.MinorStats}", + "MothronWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "MulticolorWrench": " mientras mantienes pulsado para editar los ajustes de cableado", + "NebulaArcanum": "Conjura masas de energía astral para perseguir a tus enemigos", + "NebulaBlaze": "Del cinturón de Orión a la palma de tu mano", + "NebulaBreastplate": "Aumenta un 9% el daño mágico y la probabilidad de ataque crítico", + "NebulaHelmet": "Aumenta el maná máximo en 60 y reduce el consumo de maná un 15%\nAumenta un 7% el daño mágico y la probabilidad de ataque crítico", + "NebulaLeggings": "Aumenta el daño de los ataques mágicos en un 10%\nAumenta en un 10% la velocidad de movimiento", + "NebulaMonolith": "Obtienes una pequeña cantidad de poder de la Torre de la Nebulosa", + "NightKey": "Está cargado con la esencia de muchas almas", + "NightVisionHelmet": "Mejora la visión", + "GolfBallDyedLimeGreen": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedGreen": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedCyan": "{$CommonItemTooltip.GolfBall}", + "PartyBundleOfBalloonTile": "Atado para disfrute de todos", + "PartyGirlGrenade": "Pequeña explosión que no rompe ningún ladrillo", + "PartyMonolith": "Lloverán globos del cielo", + "PartyPresent": "Me pregunto qué habrá dentro", + "PDA": "Lo muestra todo", + "PeaceCandle": "Hace que las criaturas de los alrededores sean menos hostiles", + "PedguinHat": "Conviértete en profingüino\n¡Ideal para suplantar a los retransmisores!", + "PedguinPants": "Conviértete en profingüino\n¡Ideal para suplantar a los retransmisores!", + "PedguinShirt": "Conviértete en profingüino\n¡Ideal para suplantar a los retransmisores!", + "Phantasm": "Probabilidad del 66% de no gastar munición", + "Pigronata": "¡Quítale el jaleo a patadas!\n¡Podría contener una sorpresa!", + "PinkGel": "¡Rebotante y delicioso!", + "PinkSlimeBlock": "Muy rebotante", + "PirateStaff": "Invoca piratas para que peleen por ti", + "PixelBox": "Separa los caminos de los cables\nLas señales horizontales apagan las luces\nLa señales cruzadas encienden luces", + "PlatinumPickaxe": "Permite excavar meteoritos", + "PocketMirror": "Inmune a la petrificación", + "PressureTrack": "No se debe usar en pendientes", + "ProjectilePressurePad": "Se activa cuando lo toca un proyectil", + "PsychoKnife": "Permite entrar en modo sigilo", + "PutridScent": "Será menosprobable que los enemigos te ataquen\nAumenta un 5% el daño y la probabilidad de ataque crítico", + "GolfBallDyedYellow": "{$CommonItemTooltip.GolfBall}", + "Radar": "Detecta a los enemigos a tu alrededor", + "RainbowCampfire": "La regeneración de vida es mayor junto a una hoguera", + "GolfBallDyedViolet": "{$CommonItemTooltip.GolfBall}", + "RazorbladeTyphoon": "Lanza cuchillas que se mueven muy rápido", + "RedsYoyo": "{$CommonItemTooltip.DevItem}", + "REK": "Muestra el número de monstruos, el número de muertes y las criaturas raras", + "RoyalGel": "Los slimes serán amistosos", + "SailfishBoots": "El portador podrá correr superrápido", + "SandFallBlock": "Podrás ver caer la arena desde un lugar seguro", + "SandFallWall": "Podrás ver caer la arena desde un lugar seguro", + "ScalyTruffle": "Invoca un cerdidragón como montura", + "Sextant": "Muestra la fase de la luna", + "ShadowFlameBow": "Lanza flechas de Llamas oscuras", + "ShadowFlameHexDoll": "Invoca tentáculos de Llamas oscuras para golpear a tu enemigo", + "ShadowFlameKnife": "Inflige Llamas oscuras al impactar", + "SharkronBalloon": "Aumenta la altura de los saltos\nSu portador puede realizar saltos dobles", + "SharkToothNecklace": "Aumenta en 5 la penetración de armadura", + "SharpeningStation": "Aumenta la penetración de armadura de las armas cuerpo a cuerpo", + "ShinyStone": "Aumenta notablemente la regeneración de vida al no moverse", + "ShrimpyTruffle": "Atrae a una criatura legendaria que florece en el agua y en combate", + "SillyBalloonGreen": "Huele a menta y a júbilo", + "SillyBalloonGreenWall": "Huele a menta y a júbilo", + "SillyBalloonMachine": "¡La celebración nunca se acaba!", + "SillyBalloonPink": "Huele a chicle y a felicidad", + "SillyBalloonPinkWall": "Huele a chicle y a felicidad", + "SillyBalloonPurple": "Huele a lavanda y a entusiasmo", + "SillyBalloonPurpleWall": "Huele a lavanda y a entusiasmo", + "SillyStreamerBlue": "¡Misteriosamente, es lo bastante resistente como para escalar!", + "SillyStreamerGreen": "¡Misteriosamente, es lo bastante resistente como para escalar!", + "SillyStreamerPink": "¡Misteriosamente, es lo bastante resistente como para escalar!", + "SkiphsHelm": "{$CommonItemTooltip.DevItem}", + "SkiphsPants": "{$CommonItemTooltip.DevItem}", + "SkiphsShirt": "{$CommonItemTooltip.DevItem}", + "TheBrideBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TheBride}", + "DTownsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "SlimeGun": "Lanza un inofensivo chorro de slime", + "SlimySaddle": "Invoca un slime como montura", + "KiteKoi": "{$CommonItemTooltip.Kite}", + "SnowFallBlock": "Mola mucho más que un globo de nieve", + "SnowFallWall": "Mola mucho más que un globo de nieve", + "SolarEruption": "Golpea con la furia del sol", + "RedsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "Hoverboard": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "CenxsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "SolarMonolith": "Obtienes una pequeña cantidad de poder de la Torre Solar", + "SolarTablet": "Invoca al Eclipse", + "SoulDrain": "Absorbe vida de los enemigos", + "SpelunkerGlowstick": "Expone los tesoros cercanos", + "SpiderStaff": "Invoca arañas para que peleen por ti", + "SporeSac": "Invoca esporas con el tiempo que dañarán a los enemigos", + "GolfClubChlorophyteDriver": "{$CommonItemTooltip.GolfDriver}", + "StardustCellStaff": "Invoca a una célula de polvo estelar para que luche por ti\nCultiva la infección celular más bella", + "StardustDragonStaff": "Invoca a un dragón de polvo estelar para que luche por ti\n¿Quién necesita una horda de súbditos cuando tienes un dragón gigante?", + "GolfClubDiamondWedge": "{$CommonItemTooltip.GolfWedge}", + "GolfClubShroomitePutter": "{$CommonItemTooltip.GolfPutter}", + "StardustMonolith": "Obtienes una pequeña cantidad de poder de la Torre de Polvo estelar", + "FloatingIslandFishingCrateHard": "{$ItemTooltip.FloatingIslandFishingCrate}", + "StickyGrenade": "Pequeña explosión que no rompe ningún ladrillo\nPuede ser difícil de lanzar", + "Stopwatch": "Muestra lo rápido que avanza el jugador", + "StrangeBrew": "Además de su aspecto horrible, huele fatal", + "StrangePlant1": "Se puede cambiar por tintes raros", + "StrangePlant2": "Se puede cambiar por tintes raros", + "StrangePlant3": "Se puede cambiar por tintes raros", + "StrangePlant4": "Se puede cambiar por tintes raros", + "SummonerEmblem": "Aumenta el daño de las invocaciones en un 15%", + "Sundial": "Permite avanzar en el tiempo un día por semana", + "SuperAbsorbantSponge": "Capaz de generar una cantidad ilimitada de agua", + "SuspiciousLookingTentacle": "Invoca a un ojo de aspecto sospechoso para que te ilumine\nSé lo que estás pensando...", + "TallyCounter": "Muestra cuántos monstruos has matado", + "TartarSauce": "Invoca a un pequeño minotauro", + "TempestStaff": "Invoca tornados de tiburones para que peleen por ti", + "TheBrideDress": "Mauuutrimonio...", + "TheBrideHat": "Fieun... Muy fieun...", + "Toxikarp": "Escupe burbujas tóxicas", + "Tsunami": "Lanza 5 flechas a la vez", + "TsunamiInABottle": "Su portador puede realizar saltos dobles", + "TungstenPickaxe": "Permite excavar meteoritos", + "UltraBrightCampfire": "La regeneración de vida es mayor junto a una hoguera", + "ValkyrieYoyo": "{$CommonItemTooltip.DevItem}", + "BlackCurrant": "{$CommonItemTooltip.MinorStats}", + "VineRopeCoil": "Se puede lanzar para crear una cuerda de enredadera por la que escalar", + "VortexBeater": "Probabilidad del 66% de no gastar munición\nUna catastrófica mezcla de pam, pam y bum, bum.", + "VortexBreastplate": "Aumenta un 12% el daño a distancia y la probabilidad de impacto crítico\nProbabilidad del 25% de no gastar munición", + "VortexHelmet": "Aumenta un 16% el daño de los ataques a distancia\nAumenta la probabilidad de conseguir ataques críticos a distancia en un 7%", + "VortexLeggings": "Aumenta un 8% el daño a distancia y la probabilidad de impacto crítico\nAumenta en un 10% la velocidad de movimiento", + "VortexMonolith": "Obtienes una pequeña cantidad de poder de la Torre del Vórtice", + "WandofSparking": "Lanza una pequeña chispa", + "WeaponRack": " para colocar un objeto en el estante de armas", + "WeatherRadio": "Muestra el clima", + "WeightedPressurePlateCyan": "Se activa cuando un jugador se pone encima o se baja", + "WeightedPressurePlateOrange": "Se activa cuando un jugador se pone encima o se baja", + "WeightedPressurePlatePink": "Se activa cuando un jugador se pone encima o se baja", + "WeightedPressurePlatePurple": "Se activa cuando un jugador se pone encima o se baja", + "Peach": "{$CommonItemTooltip.MinorStats}", + "WingsSolar": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsStardust": "{$CommonItemTooltip.FlightAndSlowfall}", + "GolfClubTitaniumIron": "{$CommonItemTooltip.GolfIron}", + "WireBulb": "Enciende bombillas de cada color de cable", + "WireKite": "¡Otorga el control definitivo sobre los cables!\n mientras mantienes pulsado para editar los ajustes de cableado", + "WirePipe": "Separa los caminos de los cables\n¡Se puede usar el martillo!", + "WormholePotion": "Te teletransporta junto a un miembro del equipo\nHaz clic sobre su cabeza en el mapa a pantalla completa", + "WormScarf": "Reduce un 17% el daño sufrido", + "XenoStaff": "Invoca a un OVNI para que luche por ti", + "YellowWrench": "Coloca un cable amarillo", + "Yoraiz0rDarkness": "{$CommonItemTooltip.DevItem}\nSi ves esto, tal vez deberías empezar a correr...", + "Yoraiz0rHead": "{$CommonItemTooltip.DevItem}", + "Yoraiz0rPants": "{$CommonItemTooltip.DevItem}", + "Yoraiz0rShirt": "{$CommonItemTooltip.DevItem}", + "GolfClubPearlwoodDriver": "{$CommonItemTooltip.GolfDriver}", + "YoyoBag": "Le otorga al usuario habilidades expertas con el yoyó", + "YoYoGlove": "Te permite usar dos yoyós a la vez", + "BloodMoonRising": "{$PaintingArtist.Garner}", + "TheHangedMan": "{$PaintingArtist.Garner}", + "GloryoftheFire": "{$PaintingArtist.Garner}", + "BoneWarp": "{$PaintingArtist.Garner}", + "SkellingtonJSkellingsworth": "{$PaintingArtist.Garner}", + "TheCursedMan": "{$PaintingArtist.Garner}", + "TheEyeSeestheEnd": "{$PaintingArtist.Garner}", + "SomethingEvilisWatchingYou": "{$PaintingArtist.Moosdijk}", + "TheTwinsHaveAwoken": "{$PaintingArtist.Moosdijk}", + "TheScreamer": "{$PaintingArtist.Crowno}", + "GoblinsPlayingPoker": "{$PaintingArtist.Garner}", + "Dryadisque": "{$PaintingArtist.Garner}", + "Sunflowers": "{$PaintingArtist.Garner}", + "TerrarianGothic": "{$PaintingArtist.Garner}", + "Impact": "{$PaintingArtist.Wright}", + "PoweredbyBirds": "{$PaintingArtist.Ness}", + "TheDestroyer": "{$PaintingArtist.Moosdijk}", + "ThePersistencyofEyes": "{$PaintingArtist.Crowno}", + "UnicornCrossingtheHallows": "{$PaintingArtist.Crowno}", + "GreatWave": "{$PaintingArtist.Crowno}", + "StarryNight": "{$PaintingArtist.Crowno}", + "GuidePicasso": "{$PaintingArtist.Crowno}", + "TheGuardiansGaze": "{$PaintingArtist.Kolf}", + "FatherofSomeone": "{$PaintingArtist.Crowno}", + "NurseLisa": "{$PaintingArtist.Garner}", + "DarkSoulReaper": "{$PaintingArtist.Myhre}", + "Land": "{$PaintingArtist.Myhre}", + "TrappedGhost": "{$PaintingArtist.Myhre}", + "DemonsEye": "{$PaintingArtist.Myhre}", + "FindingGold": "{$PaintingArtist.Myhre}", + "FirstEncounter": "{$PaintingArtist.Crowno}", + "GoodMorning": "{$PaintingArtist.Crowno}", + "UndergroundReward": "{$PaintingArtist.Crowno}", + "ThroughtheWindow": "{$PaintingArtist.Crowno}", + "PlaceAbovetheClouds": "{$PaintingArtist.Crowno}", + "DoNotStepontheGrass": "{$PaintingArtist.Crowno}", + "ColdWatersintheWhiteLand": "{$PaintingArtist.Crowno}", + "LightlessChasms": "{$PaintingArtist.Crowno}", + "TheLandofDeceivingLooks": "{$PaintingArtist.Crowno}", + "Daylight": "{$PaintingArtist.Crowno}", + "SecretoftheSands": "{$PaintingArtist.Crowno}", + "DeadlandComesAlive": "{$PaintingArtist.Crowno}", + "EvilPresence": "{$PaintingArtist.Crowno}", + "SkyGuardian": "{$PaintingArtist.Crowno}", + "AmericanExplosive": "{$PaintingArtist.Kolf}", + "Discover": "{$PaintingArtist.Myhre}", + "HandEarth": "{$PaintingArtist.Myhre}", + "OldMiner": "{$PaintingArtist.Myhre}", + "Skelehead": "{$PaintingArtist.Myhre}", + "FacingtheCerebralMastermind": "{$PaintingArtist.Kolf}", + "LakeofFire": "{$PaintingArtist.Garner}", + "TrioSuperHeroes": "{$PaintingArtist.Burczyk}", + "ImpFace": "{$PaintingArtist.Myhre}", + "OminousPresence": "{$PaintingArtist.Craig}", + "ShiningMoon": "{$PaintingArtist.Craig}", + "LivingGore": "{$PaintingArtist.Craig}", + "FlowingMagma": "{$PaintingArtist.Craig}", + "TheCreationoftheGuide": "{$PaintingArtist.Garner}", + "TheMerchant": "{$PaintingArtist.Garner}", + "CrownoDevoursHisLunch": "{$PaintingArtist.Garner}", + "RareEnchantment": "{$PaintingArtist.Phelps}", + "GloriousNight": "{$PaintingArtist.Duncan}", + "AnglerFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AnglerFish}", + "AngryNimbusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryNimbus}", + "AnomuraFungusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AnomuraFungus}", + "AntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Antlion}", + "ArapaimaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Arapaima}", + "ArmoredSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ArmoredSkeleton}", + "BatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CaveBat}", + "BirdBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Bird}", + "BlackRecluseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlackRecluse}", + "BloodFeederBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodFeeder}", + "BloodJellyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodJelly}", + "BloodCrawlerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodCrawler}", + "BoneSerpentBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BoneSerpentHead}", + "BunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Bunny}", + "ChaosElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ChaosElemental}", + "MimicBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mimic}", + "ClownBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Clown}", + "CorruptBunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptBunny}", + "CorruptGoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptGoldfish}", + "CrabBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crab}", + "CrimeraBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crimera}", + "CrimsonAxeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonAxe}", + "CursedHammerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CursedHammer}", + "DemonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Demon}", + "DemonEyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DemonEye}", + "DerplingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Derpling}", + "EaterofSoulsBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EaterofSouls}", + "EnchantedSwordBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EnchantedSword}", + "ZombieEskimoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieEskimo}", + "FaceMonsterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FaceMonster}", + "FloatyGrossBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FloatyGross}", + "FlyingFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingFish}", + "FlyingSnakeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingSnake}", + "FrankensteinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Frankenstein}", + "FungiBulbBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FungiBulb}", + "FungoFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FungoFish}", + "GastropodBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Gastropod}", + "GoblinThiefBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinThief}", + "GoblinSorcererBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinSorcerer}", + "GoblinPeonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinPeon}", + "GoblinScoutBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinScout}", + "GoblinWarriorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinWarrior}", + "GoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Goldfish}", + "HarpyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Harpy}", + "HellbatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hellbat}", + "HerplingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Herpling}", + "HornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hornet}", + "IceElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceElemental}", + "IcyMermanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IcyMerman}", + "FireImpBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FireImp}", + "JellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueJellyfish}", + "JungleCreeperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleCreeper}", + "LihzahrdBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LihzahrdCrawler}", + "ManEaterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ManEater}", + "MeteorHeadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MeteorHead}", + "MothBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Moth}", + "MummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mummy}", + "MushiLadybugBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MushiLadybug}", + "ParrotBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Parrot}", + "PigronBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PigronCorruption}", + "PiranhaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Piranha}", + "PirateBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateDeckhand}", + "PixieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Pixie}", + "RaincoatZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieRaincoat}", + "ReaperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Reaper}", + "SharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Shark}", + "SkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Skeleton}", + "SkeletonMageBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DarkCaster}", + "SlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueSlime}", + "SnowFlinxBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowFlinx}", + "SpiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WallCreeper}", + "SporeZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieMushroom}", + "SwampThingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SwampThing}", + "TortoiseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantTortoise}", + "ToxicSludgeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ToxicSludge}", + "UmbrellaSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UmbrellaSlime}", + "UnicornBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Unicorn}", + "VampireBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VampireBat}", + "VultureBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Vulture}", + "NypmhBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nymph}", + "WerewolfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Werewolf}", + "WolfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Wolf}", + "WorldFeederBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SeekerHead}", + "WormBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantWormHead}", + "WraithBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Wraith}", + "WyvernBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WyvernHead}", + "ZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Zombie}", + "JackingSkeletron": "{$PaintingArtist.Crowno}", + "BitterHarvest": "{$PaintingArtist.Lazure}", + "BloodMoonCountess": "{$PaintingArtist.Lazure}", + "HallowsEve": "{$PaintingArtist.Lazure}", + "MorbidCuriosity": "{$PaintingArtist.Lazure}", + "StarTopper1": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "StarTopper2": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "StarTopper3": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BowTopper": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndRedGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenAndWhiteGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "MulticoloredBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndYellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndRedBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndYellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "MulticoloredLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndYellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndBlueLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueAndYellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "PillaginMePixels": "{$PaintingArtist.Lazure}", + "PaintingCastleMarsberg": "{$PaintingArtist.Lazure}", + "PaintingMartiaLisa": "{$PaintingArtist.Lazure}", + "PaintingTheTruthIsUpThere": "{$PaintingArtist.Lazure}", + "AngryTrapperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryTrapper}", + "ArmoredVikingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ArmoredViking}", + "BlackSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlackSlime}", + "BlueArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueArmoredBones}", + "BlueCultistArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistArcherBlue}", + "SkiphsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "BlueCultistFighterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "BoneLeeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BoneLee}", + "ClingerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Clinger}", + "CochinealBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CochinealBeetle}", + "CorruptPenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptPenguin}", + "CorruptSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptSlime}", + "CorruptorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Corruptor}", + "CrimslimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crimslime}", + "CursedSkullBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CursedSkull}", + "CyanBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CyanBeetle}", + "DevourerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DevourerHead}", + "DiablolistBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DiabolistRed}", + "DoctorBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DoctorBones}", + "DungeonSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DungeonSlime}", + "DungeonSpiritBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DungeonSpirit}", + "ElfArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ElfArcher}", + "ElfCopterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ElfCopter}", + "EyezorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Eyezor}", + "FlockoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Flocko}", + "GhostBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Ghost}", + "GiantBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantBat}", + "GiantCursedSkullBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantCursedSkull}", + "GiantFlyingFoxBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantFlyingFox}", + "GingerbreadManBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GingerbreadMan}", + "GoblinArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinArcher}", + "GreenSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreenSlime}", + "HeadlessHorsemanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HeadlessHorseman}", + "HellArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HellArmoredBones}", + "HellhoundBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hellhound}", + "HoppinJackBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HoppinJack}", + "IceBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceBat}", + "IceGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceGolem}", + "IceSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceSlime}", + "IchorStickerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IchorSticker}", + "IlluminantBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IlluminantBat}", + "IlluminantSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IlluminantSlime}", + "JungleBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleBat}", + "JungleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleSlime}", + "KrampusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Krampus}", + "LacBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LacBeetle}", + "LavaBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Lavabat}", + "LavaSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LavaSlime}", + "MartianBrainscramblerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BrainScrambler}", + "MartianDroneBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianDrone}", + "MartianEngineerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianEngineer}", + "MartianGigazapperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GigaZapper}", + "MartianGreyGruntBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GrayGrunt}", + "MartianOfficerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianOfficer}", + "MartianRaygunnerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RayGunner}", + "MartianScutlixGunnerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ScutlixRider}", + "MartianTeslaTurretBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianTurret}", + "MisterStabbyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MisterStabby}", + "MotherSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MotherSlime}", + "NecromancerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Necromancer}", + "NutcrackerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nutcracker}", + "PaladinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Paladin}", + "PenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Penguin}", + "PinkyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Pinky}", + "PoltergeistBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Poltergeist}", + "PossessedArmorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PossessedArmor}", + "PresentMimicBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PresentMimic}", + "PurpleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PurpleSlime}", + "RaggedCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RaggedCaster}", + "RainbowSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RainbowSlime}", + "RavenBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Raven}", + "RedSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RedSlime}", + "RuneWizardBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RuneWizard}", + "RustyArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RustyArmoredBonesAxe}", + "ScarecrowBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Scarecrow1}", + "ScutlixBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Scutlix}", + "SkeletonArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonArcher}", + "SkeletonCommandoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonCommando}", + "SkeletonSniperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonSniper}", + "SlimerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Slimer}", + "SnatcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Snatcher}", + "SnowBallaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowBalla}", + "SnowmanGangstaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowmanGangsta}", + "SpikedIceSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SpikedIceSlime}", + "SpikedJungleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SpikedJungleSlime}", + "SplinterlingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Splinterling}", + "SquidBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Squid}", + "TacticalSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TacticalSkeleton}", + "TheGroomBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TheGroom}", + "TimBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Tim}", + "UndeadMinerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UndeadMiner}", + "UndeadVikingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UndeadViking}", + "WhiteCultistArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistArcherWhite}", + "WhiteCultistCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "WhiteCultistFighterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "YellowSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.YellowSlime}", + "YetiBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Yeti}", + "ZombieElfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieElf}", + "SparkyPainting": "{$PaintingArtist.Crowno}\nEn memoria", + "PaintingAcorns": "{$PaintingArtist.Lazure}", + "PaintingColdSnap": "{$PaintingArtist.Lazure}", + "PaintingCursedSaint": "{$PaintingArtist.Lazure}", + "PaintingSnowfellas": "{$PaintingArtist.Lazure}", + "PaintingTheSeason": "{$PaintingArtist.Lazure}", + "RedString": "{$CommonItemTooltip.String}", + "OrangeString": "{$CommonItemTooltip.String}", + "YellowString": "{$CommonItemTooltip.String}", + "LimeString": "{$CommonItemTooltip.String}", + "GreenString": "{$CommonItemTooltip.String}", + "TealString": "{$CommonItemTooltip.String}", + "CyanString": "{$CommonItemTooltip.String}", + "SkyBlueString": "{$CommonItemTooltip.String}", + "BlueString": "{$CommonItemTooltip.String}", + "PurpleString": "{$CommonItemTooltip.String}", + "VioletString": "{$CommonItemTooltip.String}", + "PinkString": "{$CommonItemTooltip.String}", + "BrownString": "{$CommonItemTooltip.String}", + "WhiteString": "{$CommonItemTooltip.String}", + "RainbowString": "{$CommonItemTooltip.String}", + "BlackString": "{$CommonItemTooltip.String}", + "BlackCounterweight": "{$CommonItemTooltip.Counterweight}", + "BlueCounterweight": "{$CommonItemTooltip.Counterweight}", + "GreenCounterweight": "{$CommonItemTooltip.Counterweight}", + "PurpleCounterweight": "{$CommonItemTooltip.Counterweight}", + "RedCounterweight": "{$CommonItemTooltip.Counterweight}", + "YellowCounterweight": "{$CommonItemTooltip.Counterweight}", + "KingSlimeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "EyeOfCthulhuBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "EaterOfWorldsBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "BrainOfCthulhuBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "QueenBeeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "SkeletronBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "WallOfFleshBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "DestroyerBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "TwinsBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "SkeletronPrimeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "PlanteraBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "GolemBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "FishronBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "CultistBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "MoonLordBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "GoblinSummonerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinSummoner}", + "SalamanderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Salamander}", + "GiantShellyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantShelly}", + "CrawdadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crawdad}", + "FritzBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Fritz}", + "CreatureFromTheDeepBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CreatureFromTheDeep}", + "DrManFlyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DrManFly}", + "MothronBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mothron}", + "SeveredHandBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "ThePossessedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ThePossessed}", + "ButcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Butcher}", + "PsychoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Psycho}", + "DeadlySphereBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DeadlySphere}", + "NailheadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nailhead}", + "PoisonousSporeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "MedusaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Medusa}", + "GreekSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreekSkeleton}", + "GraniteFlyerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GraniteFlyer}", + "GraniteGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GraniteGolem}", + "BloodZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodZombie}", + "DripplerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Drippler}", + "TombCrawlerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TombCrawlerHead}", + "DuneSplicerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DuneSplicerHead}", + "FlyingAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingAntlion}", + "WalkingAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WalkingAntlion}", + "DesertGhoulBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertGhoul}", + "DesertLamiaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertLamiaDark}", + "DesertDjinnBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertDjinn}", + "DesertBasiliskBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertBeast}", + "RavagerScorpionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertScorpionWalk}", + "StardustSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustSoldier}", + "StardustWormBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustWormHead}", + "StardustJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustJellyfishBig}", + "StardustSpiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustSpiderBig}", + "StardustSmallCellBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "StardustLargeCellBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustCellBig}", + "SolarCoriteBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarCorite}", + "SolarSrollerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarSroller}", + "SolarCrawltipedeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarCrawltipedeHead}", + "SolarDrakomireRiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarDrakomireRider}", + "SolarDrakomireBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarDrakomire}", + "SolarSolenianBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarSolenian}", + "NebulaSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaSoldier}", + "NebulaHeadcrabBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaHeadcrab}", + "NebulaBrainBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaBrain}", + "NebulaBeastBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaBeast}", + "VortexLarvaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexLarva}", + "VortexHornetQueenBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexHornetQueen}", + "VortexHornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexHornet}", + "VortexSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexSoldier}", + "VortexRiflemanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexRifleman}", + "PirateCaptainBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCaptain}", + "PirateDeadeyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateDeadeye}", + "PirateCorsairBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCorsair}", + "PirateCrossbowerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCrossbower}", + "MartianWalkerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianWalker}", + "RedDevilBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RedDevil}", + "PinkJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PinkJellyfish}", + "GreenJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreenJellyfish}", + "DarkMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DarkMummy}", + "LightMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LightMummy}", + "AngryBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryBones}", + "IceTortoiseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceTortoise}", + "SandSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandSlime}", + "SeaSnailBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SeaSnail}", + "MoonLordPainting": "{$PaintingArtist.Crowno}", + "SandElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandElemental}", + "SandsharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandShark}", + "SandsharkCorruptBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkCorrupt}", + "SandsharkCrimsonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkCrimson}", + "SandsharkHallowedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkHallow}", + "TumbleweedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Tumbleweed}", + "BossBagBetsy": "{$CommonItemTooltip.RightClickToOpen}", + "BossBagOgre": "{$CommonItemTooltip.RightClickToOpen}", + "BossBagDarkMage": "{$CommonItemTooltip.RightClickToOpen}", + "ExplosiveBunny": "Para usar con un cañón de conejos", + "VialofVenom": "Extremadamente tóxico", + "FlaskofVenom": "Los ataques cuerpo a cuerpo infligen Ponzoña a los enemigos", + "VenomArrow": "Inflige Ponzoña al enemigo", + "VenomBullet": "Inflige Ponzoña al enemigo", + "PartyBullet": "Explota en confeti al impactar", + "NanoBullet": "Provoca Confusión", + "ExplodingBullet": "Explota al impactar", + "GoldenBullet": "Los enemigos muertos dejarán más dinero", + "FlaskofCursedFlames": "Los ataques cuerpo a cuerpo infligen llamas malditas a los enemigos", + "FlaskofFire": "Los ataques cuerpo a cuerpo prenden fuego a los enemigos", + "FlaskofGold": "Los ataques cuerpo a cuerpo hacen que los enemigos dejen más oro", + "FlaskofIchor": "Los ataques cuerpo a cuerpo reducen la defensa de los enemigos", + "FlaskofNanites": "Los ataques cuerpo a cuerpo confunden a los enemigos", + "FlaskofParty": "Los ataques cuerpo a cuerpo provocan la aparición de confeti", + "FlaskofPoison": "Los ataques cuerpo a cuerpo envenenan a los enemigos", + "CobaltBreastplate": "Aumenta un 3% la probabilidad de ataque crítico", + "CobaltLeggings": "Aumenta en un 10% la velocidad de movimiento", + "MythrilChainmail": "Aumenta un 5% el daño", + "MythrilGreaves": "Aumenta un 3% la probabilidad de ataque crítico", + "RocketI": "Radio de explosión pequeño No destruye ladrillos", + "RocketII": "Radio de explosión pequeño Destruye ladrillos", + "RocketIII": "Radio de explosión grande No destruye ladrillos", + "RocketIV": "Radio de explosión grande Destruye ladrillos", + "AsphaltBlock": "Aumenta la velocidad al correr", + "CobaltPickaxe": "Permite extraer mithril y oricalco", + "MythrilPickaxe": "Permite extraer adamantita y titanio", + "Cannonball": "Para usar con un cañón", + "Arkhalis": "No se lo he quitado a un schmoo", + "BoneGlove": "Probabilidad del 33% de no gastar hueso", + "LogicGate_AND": "Se activa cuando todas las lámparas están encendidas; se desactiva cuando no es así.", + "LogicGate_NAND": "Se activa cuando no están encendidas todas las lámparas; se desactiva cuando no es así.", + "DD2FlameburstTowerT2Popper": "{$ItemTooltip.DD2FlameburstTowerT1Popper}", + "DD2FlameburstTowerT3Popper": "{$ItemTooltip.DD2FlameburstTowerT1Popper}", + "DD2BallistraTowerT2Popper": "{$ItemTooltip.DD2BallistraTowerT1Popper}", + "DD2BallistraTowerT3Popper": "{$ItemTooltip.DD2BallistraTowerT1Popper}", + "DD2ExplosiveTrapT2Popper": "{$ItemTooltip.DD2ExplosiveTrapT1Popper}", + "DD2ExplosiveTrapT3Popper": "{$ItemTooltip.DD2ExplosiveTrapT1Popper}", + "DD2LightningAuraT2Popper": "{$ItemTooltip.DD2LightningAuraT1Popper}", + "DD2LightningAuraT3Popper": "{$ItemTooltip.DD2LightningAuraT1Popper}", + "ApprenticeScarf": "{$ItemTooltip.HuntressBuckler}", + "SquireShield": "{$ItemTooltip.HuntressBuckler}", + "MonkBelt": "{$ItemTooltip.HuntressBuckler}", + "GolfClubStoneIron": "{$CommonItemTooltip.GolfIron}", + "ApprenticeAltPants": "Aumenta un 20% el daño de súbditos y un 25% la probabilidad de ataque mágico crítico", + "ApprenticeAltShirt": "Aumenta un 30% el daño de súbditos y un 15% el daño mágico", + "GolfClubGoldWedge": "{$CommonItemTooltip.GolfWedge}", + "ApprenticeRobe": "Aumenta un 20% el daño de súbditos y un 10% el daño mágico", + "ApprenticeStaffT3": "¡Salpica la defensa y reduce la contaminación!", + "GoldenCrateHard": "{$ItemTooltip.GoldenCrate}", + "BookStaff": "Me pregunto quién clavaría un libro de sabiduría infinita en un palito...\n para liberar un poderoso tornado", + "GolfBallDyedSkyBlue": "{$CommonItemTooltip.GolfBall}", + "DD2BetsyBow": "Dispara flechas que se separan e infligen más daño a los enemigos aéreos", + "DD2ElderCrystal": "Colócate en el stand del cristal eternia para invocar portales a Eteria", + "DD2ElderCrystalStand": "Contiene el cristal eternia", + "DD2EnergyCrystal": "Suele usarse para manifestar la propia voluntad como una forma física de defensa", + "GolfBallDyedRed": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedTeal": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedPurple": "{$CommonItemTooltip.GolfBall}", + "DD2PetDragon": "Invoca a un dragón mascota", + "DD2PetGato": "Invoca a un gato mascota", + "DD2PetGhost": "Invoca a una espirillama mascota que te ofrece luz", + "DD2PhoenixBow": "Hazte con el poder de llamas inmortales", + "DD2SquireBetsySword": "Lanza hacia adelante la energía del corazón", + "DD2SquireDemonSword": " para protegerte con un escudo", + "DefenderMedal": "Dinero para comerciar con el tabernero", + "ShuckedOyster": "{$CommonItemTooltip.MinorStats}", + "HuntressAltPants": "Aumenta un 25% el daño de súbditos y un 20% la velocidad de movimiento", + "HuntressAltShirt": "Aumenta un 25% el daño de súbditos y de ataques a distancia", + "GolfClubBronzeWedge": "{$CommonItemTooltip.GolfWedge}", + "HuntressJerkin": "Aumenta un 20% el daño de súbditos y a distancia", + "HuntressPants": "Aumenta un 10% el daño de súbditos y un 20% la velocidad de movimiento", + "GolfClubWoodDriver": "{$CommonItemTooltip.GolfDriver}", + "Oyster": "{$CommonItemTooltip.RightClickToOpen}", + "MonkAltPants": "Aumenta un 20% el daño de súbditos, la velocidad de movimiento y la probabilidad de impacto crítico a distancia", + "MonkAltShirt": "Aumenta un 20% el daño de súbditos y la velocidad del cuerpo a cuerpo", + "GolfClubMythrilIron": "{$CommonItemTooltip.GolfIron}", + "MonkPants": "Aumenta un 10% el daño de súbditos\nAumenta un 10% la probabilidad de impacto crítico y un 20% la velocidad de movimiento", + "MonkShirt": "Aumenta un 20% el daño de súbditos y la velocidad del cuerpo a cuerpo", + "MonkStaffT1": "Carga potencia al lanzarlo para aplastar a los enemigos", + "MonkStaffT2": "Invoca a un fantasma al golpear a los enemigos", + "MonkStaffT3": " mientras mantienes pulsado para un ataque alternativo.", + "GolfClubRustyPutter": "{$CommonItemTooltip.GolfPutter}", + "IronCrateHard": "{$ItemTooltip.IronCrate}", + "SquireAltShirt": "Aumenta un 30% el daño de súbditos y aumenta drásticamente la regeneración de vida", + "GolfClubLeadPutter": "{$CommonItemTooltip.GolfPutter}", + "SquireGreaves": "Aumenta un 15% el daño de súbditos, un 20% la probabilidad de impacto crítico cuerpo a cuerpo y la velocidad de movimiento", + "SquirePlating": "Aumenta un 15% el daño de súbditos y la velocidad del cuerpo a cuerpo", + "ArkhalisShirt": "{$ItemTooltip.ArkhalisHat}", + "ArkhalisPants": "{$ItemTooltip.ArkhalisHat}", + "LobsterTail": "{$CommonItemTooltip.MediumStats}", + "ArkhalisHat": "{$CommonItemTooltip.DevItem}\n\"No lo he conseguido en la red\".", + "LeinforsHat": "{$CommonItemTooltip.DevItem}\n\"Para mantener esos cierres tan preciosos como siempre\".", + "LeinforsShirt": "{$CommonItemTooltip.DevItem}\n\"El regreso de la sexualidad\".", + "LeinforsPants": "{$CommonItemTooltip.DevItem}\n\"¡Sorpresa! No esperabas algo así de unos pantalones, ¿a que no?\"", + "OceanCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "LeinforsAccessory": "{$CommonItemTooltip.DevItem}\n\"Para obtener los mejores resultados, se ha de usar con una dieta basada en pasta\".", + "KiteSpectrum": "{$CommonItemTooltip.Kite}", + "KiteWanderingEye": "{$CommonItemTooltip.Kite}", + "KiteUnicorn": "{$CommonItemTooltip.Kite}", + "FairyQueenBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "LavaCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LavaCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "HotlineFishingHook": "{$CommonItemTooltip.LavaFishing}", + "LavaFishingHook": "{$CommonItemTooltip.LavaFishing}", + "TeleportationPylonJungle": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonPurity": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonHallow": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonUnderground": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonOcean": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonDesert": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonSnow": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonMushroom": "{$CommonItemTooltip.TeleportationPylon}", + "RockGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RockGolem}", + "BloodMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodMummy}", + "SporeSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SporeSkeleton}", + "SporeBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SporeBat}", + "LarvaeAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LarvaeAntlion}", + "CrimsonBunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonBunny}", + "CrimsonGoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonGoldfish}", + "CrimsonPenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonPenguin}", + "BigMimicCorruptionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicCorruption}", + "BigMimicCrimsonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicCrimson}", + "BigMimicHallowBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicHallow}", + "MossHornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MossHornet}", + "WanderingEyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WanderingEye}", + "CreativeWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "RainbowWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressUpToBooster}", + "LongRainbowTrailWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}\n{$CommonItemTooltip.PressUpToBooster}" + }, + "CommonItemTooltip": { + "SpecialCrafting": "Se usa para crear cosas especiales", + "DevItem": "¡Ideal para suplantar a los desarrolladores!", + "FlightAndSlowfall": "Permite volar y caer lentamente", + "RightClickToOpen": " para abrir", + "BannerBonus": "Los jugadores cercanos obtienen una bonificación contra: ", + "Counterweight": "Lanza un contrapeso tras golpear a un enemigo con un yoyó", + "MinuteDuration": "{0} minuto(s) de duración", + "PlaceableOnXmasTree": "Se puede poner en un árbol de Navidad", + "RestoresLife": "Recupera {0} de vida", + "RestoresMana": "Recupera {0} de maná", + "SecondDuration": "{0} segundo(s) de duración", + "String": "Aumenta el alcance del yoyó", + "UsesLife": "Usa {0} de vida", + "UsesMana": "Usa {0} de maná" + }, + "BuffDescription": { + "WellFed_Expert": "Mejoras menores en todas las características y aumento de la regeneración de vida" + } +} \ No newline at end of file diff --git a/Localization/Content/es-ES/Legacy.json b/Localization/Content/es-ES/Legacy.json new file mode 100644 index 0000000..1c53c00 --- /dev/null +++ b/Localization/Content/es-ES/Legacy.json @@ -0,0 +1,1143 @@ +{ + "LegacyWorldGen": { + "0": "Generando terreno del mundo", + "10": "Generando cuevas en la superficie", + "11": "Generando selva", + "12": "Generando islas flotantes", + "13": "Añadiendo parcelas de champiñones", + "14": "Añadiendo lodo a la tierra", + "15": "Añadiendo cieno", + "16": "Añadiendo tesoros", + "17": "Añadiendo telas de araña", + "18": "Creando Inframundo", + "19": "Añadiendo cursos de agua", + "1": "Añadiendo arena", + "20": "Corrompiendo el mundo", + "21": "Generando cuevas en montañas", + "22": "Creando playas", + "23": "Añadiendo gemas", + "24": "Gravitando arena", + "25": "Limpiando de tierra los entornos", + "26": "Colocando altares", + "27": "Distribuyendo líquidos", + "28": "Colocando cristales de vida", + "29": "Colocando estatuas", + "2": "Generando colinas", + "30": "Ocultando tesoros", + "31": "Ocultando más tesoros", + "32": "Ocultando tesoros en la selva", + "33": "Ocultando tesoros en el agua", + "34": "Colocando trampas", + "35": "Colocando objetos quebradizos", + "36": "Colocando forjas infernales", + "37": "Plantando césped", + "38": "Plantando cactus", + "39": "Plantando girasoles", + "40": "Plantando árboles", + "41": "Plantando hierbas", + "42": "Plantando hierbajos", + "43": "Plantando enredaderas", + "44": "Plantando flores", + "45": "Cultivando champiñones", + "46": "Liberando recursos no utilizados", + "47": "Reiniciando objetos del juego", + "48": "Estableciendo modo Difícil", + "49": "Guardando datos del mundo:", + "4": "Añadiendo rocas a la tierra", + "50": "Haciendo copia de seguridad del archivo del mundo", + "51": "Cargando datos del mundo:", + "52": "Comprobando alineación de la cuadrícula:", + "53": "¡Error al cargar!", + "54": "No se ha encontrado copia de seguridad.", + "55": "Encontrando frames de cuadrículas:", + "56": "Añadiendo de nieve", + "57": "Mundo", + "58": "Creando mazmorra", + "59": "¡Ha caído un meteorito!", + "5": "Añadiendo tierra a las rocas", + "60": "Suavizando el mundo", + "61": "Musguificando", + "62": "Gemificando", + "63": "Creando las paredes de las cuevas", + "64": "Criando las arañas de las cuevas", + "65": "Borrando datos de mapa:", + "66": "Guardando datos de mapa:", + "67": "Cargando datos de mapa:", + "68": "Trazando mapa:", + "69": "Creando cascadas", + "6": "Añadiendo arcilla", + "70": "Creando ruinas selvática", + "71": "Creando nidos de avispas", + "72": "Creando un mundo sangriento", + "73": "Validando el mundo guardado:", + "74": "¡Llueven slimes!", + "75": "Han dejado de llover slimes.", + "77": "Añadiendo más hierba", + "78": "Desertificando", + "7": "Generando agujeros aleatorios", + "80": "Cincelando mármol", + "81": "Generando granito", + "8": "Generando cuevas pequeñas", + "9": "Generando cuevas grandes" + }, + "LegacyDialog": { + "1": "Espero que un canijo como tú no sea lo único que se interpone entre nosotros y el Ojo de Cthulhu.", + "10": "Echa un vistazo a estos bloques de tierra... ¡Tienen extra de tierra!", + "100": "¿Por qué purificar el mundo cuando puedes volarlo en pedazos?", + "101": "Si lanzas uno de estos en la bañera y cierras todas las ventanas, ¡te despejará la nariz y los oídos!", + "102": "¿Quieres jugar con fuego, gallina?", + "103": "Oye, ¿firmarías esta renuncia de daños y perjuicios?", + "104": "¡AQUÍ NO SE PUEDE FUMAR!", + "105": "Hoy en día, los explosivos son la bomba. ¡Llévate unos cuantos!", + "106": "¡Es un buen día para morir!", + "107": "Y qué pasa si... (¡BUM!)... Oh, lo siento, ¿usabas mucho esa pierna?", + "108": "Dinamita. Mi panacea personal para solucionar todos los problemas.", + "109": "Echa un vistazo a este género; ¡los precios son la bomba!", + "11": "¡Oye, cómo pega el sol! Por suerte, tengo armaduras totalmente transpirables.", + "110": "Tengo un vago recuerdo de atar a una mujer y lanzarla a una mazmorra.", + "111": "¡Tenemos un problema! ¡Hoy tenemos Luna de Sangre!", + "112": "Si fuera más joven, invitaría a {Nurse} a salir. Yo antes era todo un galán.", + "113": "Ese sombrero rojo me resulta familiar...", + "114": "Gracias otra vez por librarme de esta maldición. Sentí como si algo me hubiera saltado encima y me hubiera mordido.", + "115": "Mamá siempre me decía que sería un buen sastre.", + "116": "La vida es como un cajón de la ropa; ¡nunca sabes qué te vas a poner!", + "117": "¡Desde luego, bordar es una tarea difícil! ¡Si no fuera así, nadie lo haría! Eso es lo que la hace tan genial.", + "118": "Sé todo lo que hay que saber sobre el negocio de la confección.", + "119": "La maldición me ha convertido en un ser solitario; una vez me hice amigo de un muñeco de cuero. Lo llamaba Wilson.", + "12": "El sol está alto, al contrario que mis precios.", + "120": "Gracias por liberarme, humano. Los otros duendes me ataron y me dejaron aquí. Como ya imaginarás, no nos llevamos muy bien.", + "121": "¡No puedo creer que me ataran y me dejaran aquí solo por decirles que no se dirigían al este!", + "122": "Ahora que soy un proscrito, ¿puedo tirar ya estas bolas de pinchos? Tengo los bolsillos destrozados.", + "123": "¿Buscas un experto en artilugios? ¡Pues yo soy tu duende!", + "124": "Gracias por tu ayuda. Tengo que dejar de vagar por ahí sin rumbo. Seguro que nos volvemos a ver.", + "125": "Creía que eras más alto.", + "126": "Oye... ¿Qué trama {Mechanic}? ¿No habrás... hablado con ella, por un casual?", + "127": "Eh, ¿quieres un motor para tu sombrero? Creo que tengo un motor que quedaría de perlas en ese sombrero.", + "128": "Oye, he oído que te gustan los cohetes y las botas de correr, así que he puesto unos cohetes en tus botas.", + "129": "El silencio es dorado. La cinta adhesiva es plateada.", + "13": "¡Vaya! Desde aquí se oye cómo discuten {Mechanic} y {Nurse}.", + "130": "Sí, el oro es más resistente que el hierro. Pero ¿qué os enseñan los humanos hoy en día?", + "131": "En fin, la idea de un casco de minero con alas quedaba mucho mejor sobre el papel.", + "132": "Los duendes tienen una increíble predisposición al enfado. ¡De hecho, podrían iniciar una guerra por una simple discusión sobre ropa!", + "133": "Sinceramente, la mayoría de los duendes no son precisamente unos genios. Bueno, algunos sí.", + "134": "¿Tú sabes por qué llevamos estas bolas con pinchos? Porque yo no.", + "135": "¡Acabo de terminar mi última creación! Esta versión no explota con violencia si le respiras encima.", + "136": "Los duendes ladrones no son muy buenos en lo suyo. ¡Ni siquiera saben robar un cofre abierto!", + "137": "¡Gracias por salvarme, colega! Estas ataduras me estaban haciendo rozaduras.", + "138": "¡Oh, te debo la vida!", + "139": "¡Oh, qué heroico! ¡Gracias por salvarme, jovencita!", + "14": "¿Has visto a Chith... Shith...? ¿Chat...? Vamos, ¿al gran Ojo?", + "140": "¡Oh, qué heroico! ¡Gracias por salvarme, jovencito!", + "141": "Ahora que nos conocemos, me puedo ir a vivir contigo, ¿verdad?", + "142": "¡Eh, hola, {Guide}! ¿Qué puedo hacer hoy por ti?", + "143": "¡Anda, hola, {Demolitionist}! ¿Qué puedo hacer hoy por ti?", + "144": "¡Anda, hola, {GoblinTinkerer}! ¿Qué puedo hacer hoy por ti?", + "145": "¡Anda, hola, {Nurse}! ¿Qué puedo hacer hoy por ti?", + "146": "¡Anda, hola, {Mechanic}! ¿Qué puedo hacer hoy por ti?", + "147": "¡Anda, hola, {Dryad}! ¿Qué puedo hacer hoy por ti?", + "148": "¿Quieres que saque una moneda de tu oreja? ¿No? Pues nada.", + "149": "¿Quieres un caramelo mágico? ¿No? Pues nada.", + "15": "Oye, esta casa es segura, ¿verdad? ¿Verdad? ¿{PlayerName}?", + "150": "Si te gusta, te puedo hacer un delicioso chocolate calentito... ¿No? Pues nada.", + "151": "¿Has venido a echar un ojo a mi bola de cristal?", + "152": "¿Nunca has deseado tener un anillo mágico que convierta las piedras en slimes? La verdad es que yo tampoco.", + "153": "Una vez me dijeron que la amistad es algo mágico. ¡Qué tontería! No puedes convertir a nadie en rana con la amistad.", + "154": "Veo tu futuro... ¡Vas a comprarme un montón de artículos!", + "155": "En cierta ocasión intenté devolverle la vida a una estatua de ángel. Pero no pasó nada.", + "156": "¡Gracias! Un poco más y habría acabado como los demás esqueletos de ahí abajo.", + "157": "¡Eh, mira por dónde vas! ¡Llevo ahí desde hace... un rato!", + "158": "Espera un momento, ya casi he conseguido que funcione el wifi.", + "159": "¡Casi había acabado de poner luces intermitentes aquí arriba!", + "16": "Ni siquiera una luna de sangre detendría el capitalismo. Así que vamos a hacer negocios.", + "160": "¡No te muevas! ¡Se me ha caído una lentilla!", + "161": "Lo único que quiero es que el conmutador... ¿Qué?", + "162": "A ver si lo adivino. No has comprado suficiente cable. ¡Ya te vale!", + "163": "¿Podrías...? Solo... ¿Por favor...? ¿Vale? Pues nada. Aaarg.", + "164": "No me gusta cómo me miras. Estoy trabajando.", + "165": "Oye, {PlayerName}, ¿vienes de cara de {GoblinTinkerer}? Por un casual no te hablaría de mí, ¿verdad?", + "166": "{ArmsDealer} no deja de hablar sobre activar mi placa de presión. Ya le he dicho que funciona pisándola.", + "167": "¡Compra siempre más cable del que necesitas!", + "168": "¿Has comprobado si tu dispositivo está enchufado?", + "169": "Oh, ¿sabes lo que le vendría bien a esta casa? Más luces intermitentes.", + "170": "Cuando el cielo se tiña de rojo, sabrás que se avecina una Luna de Sangre. Hay algo en ella que hace que los monstruos ataquen en grupo.", + "171": "Eh, amigo, ¿sabes dónde hay por aquí malahierba? Oh, no es por nada. Solo preguntaba, sin más.", + "172": "Si miraras hacia arriba, verías que ahora mismo la luna está roja.", + "173": "Deberías quedarte en casa por la noche. Es muy peligroso vagar por ahí en la oscuridad.", + "174": "Saludos, {PlayerName}. ¿Te puedo ayudar en algo?", + "175": "Estoy aquí para aconsejarte sobre tus próximos pasos. Te aconsejo que hables conmigo cuando estés atascado.", + "176": "Dicen que hay una persona que te dirá cómo sobrevivir en esta tierra... Oh, espera. ¡Si soy yo!", + "177": "Puedes usar el pico para cavar en la tierra y el hacha para talar árboles. ¡Sitúa el cursor sobre el ladrillo y haz clic!", + "178": "Si quieres sobrevivir, tendrás que crear armas y un cobijo. Empieza talando árboles y recogiendo madera.", + "179": "Pulsa {InventoryKey} para acceder al menú de creación. Cuando tengas suficiente madera, crea un banco de trabajo. De este modo, podrás crear objetos más elaborados... si estás cerca del banco, claro.", + "18": "Kosh, kapleck Mog. Perdona, hablaba en klingon... Quiere decir \"Compra algo o muere\".", + "180": "Puedes construir un cobijo juntando madera y otros bloques que hay por el mundo. No olvides levantar y colocar paredes.", + "181": "En cuanto tengas una espada de madera, podrías intentar recoger el gel de los slimes. Mezcla madera y gel para hacer una antorcha.", + "182": "Usa un martillo para interactuar con el entorno.", + "183": "Deberías cavar una mina para encontrar vetas de mineral. Así podrás crear objetos muy útiles.", + "184": "Ahora que tienes minerales, tendrás que convertirlos en un lingote para fabricar objetos con ellos. Para ello, necesitas una forja.", + "185": "Puedes construir una forja con antorchas, madera y piedra. Asegúrate de que estás cerca de un banco de trabajo.", + "186": "Necesitarás un yunque para crear objetos con los lingotes de metal.", + "188": "En el subsuelo hay corazones de cristal que puedes usar para aumentar el máximo de vida. Podrás destrozarlos con un pico.", + "19": "¿Tu nombre era {PlayerName}? ¡Me han hablado bien de ti, amigo!", + "191": "Hay muchas formas de hacer que los demás se muden a nuestra ciudad. Por supuesto, necesitarán una casa en la que vivir.", + "192": "Para que una habitación pueda ser considerada un hogar, debe tener una puerta, una silla, una mesa y una fuente de luz. Y paredes, claro.", + "193": "En la misma casa no pueden vivir dos personas. Además, si se destruye una casa, esa persona deberá buscar un nuevo lugar donde vivir.", + "194": "En la interfaz de vivienda podrás ver y asignar viviendas. Abre el inventario y haz clic en el icono de la casa.", + "195": "Si quieres que un mercader se mude a una casa, deberás recoger una gran cantidad de dinero. ¡Bastará con 50 monedas de plata!", + "196": "Para que se mude una enfermera, tendrás que aumentar tu vida máxima.", + "197": "Si tuvieras alguna pistola, seguro que aparecería algún traficante de armas para venderte munición.", + "198": "Deberías ponerte a prueba e intentar derrotar a un monstruo poderoso. Eso llamaría la atención de una dríada.", + "199": "Asegúrate de explorar la mazmorra a fondo. Podría haber prisioneros retenidos en la parte más profunda.", + "2": "Vaya una armadura más chapucera que llevas. Yo de ti compraría más pociones curativas.", + "20": "Dicen que aquí hay un tesoro escondido... Oh, olvídalo...", + "200": "Quizás el anciano de la mazmorra quiera unirse a nosotros ahora que su maldición ha desaparecido.", + "201": "Guarda bien las bombas que encuentres. Algún demoledor querrá echarles un vistazo.", + "202": "¿Acaso los duendes son tan distintos a nosotros que no podemos vivir juntos en paz?", + "203": "He oído que por esta región vive un poderoso mago. Estate muy atento por si lo ves la próxima vez que viajes al subsuelo.", + "204": "Si juntas varias lentes en un altar demoníaco, tal vez encuentres la forma de invocar a un monstruo poderoso. Aunque te conviene esperar hasta la noche para hacerlo.", + "205": "Puedes crear un cebo de gusanos usando trozos podridos y polvo vil. Asegúrate de estar en una zona corrompida antes de usarlo.", + "206": "Los altares demoníacos se suelen encontrar en territorio corrompido. Tendrás que estar cerca de ellos para crear ciertos objetos.", + "208": "Si ves un jarrón, golpéalo para romperlo. Contienen toda clase de suministros de utilidad.", + "209": "Hay tesoros escondidos por todo el mundo. ¡En las profundidades del subsuelo se pueden encontrar objetos maravillosos!", + "21": "¿La estatua de un ángel? Lo siento pero no vendo cosas de segunda mano.", + "210": "En ocasiones, al romper un orbe sombrío se provoca la caída de un meteorito del cielo. Los orbes sombríos se suelen encontrar en los abismos que rodean las zonas corrompidas.", + "211": "Deberías dedicarte a recoger más cristal de corazón para aumentar tu vida máxima.", + "212": "El equipo que llevas no es gran cosa. Debes mejorar tu armadura.", + "213": "Creo que ya estás listo para tu primera gran batalla. De noche, recoge lentillas de ojos y llévalas a un altar demoníaco.", + "214": "Te conviene aumentar tu nivel de vida antes de enfrentarte al siguiente desafío. Con 15 corazones será suficiente.", + "215": "La piedra de ébano que se encuentra en el territorio corrompido se puede purificar usando un poco de polvo de dríada, o bien destruirla con explosivos.", + "216": "El siguiente paso debería ser explorar los abismos corrompidos. Encuentra y destruye todos los orbes sombríos que encuentres.", + "217": "No muy lejos de aquí hay una antigua mazmorra. Ahora sería un buen momento para ir a echar un vistazo.", + "218": "Deberías intentar aumentar al máximo tu vida disponible. Intenta conseguir 20 corazones.", + "219": "Hay muchos tesoros por descubrir en la selva si estás dispuesto a cavar a suficiente profundidad.", + "22": "El último tipo que estuvo aquí me dejó algunos trastos viejos... quiero decir... ¡tesoros!", + "220": "El inframundo está compuesto de un material llamado piedra infernal, perfecto para crear armas y armaduras.", + "221": "Cuando estés preparado para desafiar al guardián del inframundo, tendrás que hacer un sacrificio viviente. Encontrarás todo lo que necesitas en el inframundo.", + "222": "No dejes de destruir todos los altares demoníacos que encuentres. ¡Algo bueno te sucederá si lo haces!", + "223": "A veces, podrás recuperar el alma de las criaturas caídas en lugares de extrema luminosidad u oscuridad.", + "224": "Jo, jo, jo y una botella de... ¡ponche de huevo!", + "225": "¿Me preparas unas galletitas?", + "226": "¿Qué? ¿Creías que no existía?", + "227": "Me las arreglé para coserte la cara de nuevo. Ten más cuidado la próxima vez.", + "228": "Seguramente te quede una cicatriz.", + "229": "Ya está. No quiero volver a verte saltando por acantilados.", + "23": "Me pregunto si la luna estará hecha de queso... Eh... esto... ¿Querías comprar algo?", + "230": "No ha sido para tanto, ¿verdad?", + "231": "Por si vivir bajo tierra no fuera algo lo bastante malo, ahora venís idiotas como tú a secuestrar a mis hijos mientras duermo.", + "232": "Entre tú y yo, {Dryad} es la única en quien confío. Es la única que no ha intentado comerme o usarme en una poción.", + "233": "Traté de lamerme a mí mismo el otro día para ver a qué venía tanta historia, pero todo empezó a brillar de color azul.", + "234": "Cada vez que veo el color azul, me deprimo y me entra la pereza.", + "235": "No habrás visto ningún cerdo por aquí, ¿verdad? Uno le quitó la pierna a mi hermano.", + "236": "En esta ciudad, todo el mundo está un poco fuera de sí. Anoche vi al buhonero mordisqueándome el pie.", + "237": "Te haré un descuento en la ropa si convences a {Truffle} para que venga a que le... tome medidas.", + "238": "Me parece que {Truffle} es un poco incomprendido. ¡En realidad es un tipo muy majo!", + "24": "¿Has dicho oro? Me lo quedo.", + "240": "No, no me sé el baile de la trufa. ¡Deja de preguntármelo!", + "241": "Se está difundiendo un rumor terrible sobre mí: \"Si no puedes derrotarlo, ¡cómetelo!\".", + "242": "Oye, ¿qué tienes ahí?", + "243": "¿Debería convertirme en un pirata del aire? He estado planteándome la posibilidad de ser pirata del aire.", + "244": "Sea como sea, ¡una mochila cohete te iría como anillo al dedo!", + "245": "Últimamente estoy un poco de mal humor. ¡Así que basta de palabrería, bicho!", + "246": "Me produce mucha curiosidad ese tal {Cyborg}. ¿Qué hará para mantenerse siempre en movimiento?", + "247": "Me parece que ese capitán va siempre un poco \"achispado de más\", ¡no sé si me explico!", + "248": "¡Muéstrame tu equipo!", + "249": "Me gusta tu... equipo. ¿Lo tienes en bronce?", + "25": "Será mejor que no me manches de sangre.", + "250": "Cuando entres en tierra sagrada, verás un arcoíris en el cielo. Si quieres, te puedo ayudar con la pintura.", + "251": "Ve a ver a {PartyGirl}. ¡Esa chica es capaz de pintar toda la ciudad de rojo!", + "252": "Sé diferenciar el turquesa del azul verdoso. Pero no te la voy a decir.", + "253": "Me he quedado sin blanco titanio, así que nada de pedírmelo.", + "254": "Prueba el morado y el rosa arremolinado. ¡Funciona, en serio!", + "255": "No, no, no... ¡Hay infinidad de grises diferentes! No me piques...", + "256": "Espero que no llueva hasta que se seque la pintura. ¡Eso sería un desastre!", + "257": "¡A cambio de tus riquezas, te traeré los colores más ricos!", + "258": "Querida, lo que llevas puesto es demasiado monótono. ¡Necesitas clases para aprender a teñir adecuadamente tu ropa!", + "259": "El único tipo de madera que me molestaría en teñir es la caoba rica. Es un desperdicio teñir cualquier otro tipo de madera.", + "26": "Date prisa... y deja ya de sangrar.", + "260": "Tienes que hacer algo con {Pirate}. ¡Cada vez que se pasa por aquí, tardo una semana en quitar la peste!", + "261": "¿Qué médico soy? Soy el médico brujo.", + "262": "El corazón de la magia es la naturaleza. La naturaleza de los corazones es la magia.", + "263": "{Nurse} puede cuarte el cuerpo, pero yo puedo convertirte en la curación personificada.", + "264": "Elige sabiamente, {PlayerName}. Mis productos son volátiles y mis artes oscuras misteriosas.", + "265": "Tenemos que hablar. Se... se trata de las fiestas.", + "266": "Soy incapaz de decidir qué me gusta más: si las fiestas o las post-fiestas.", + "267": "Deberíamos montar una fiesta de la raíz intermitente y, por si acaso, también una post-fiesta.", + "268": "¡Vaya, {PlayerName}! ¡Encontrarme con un aventurero es un motivo de festejo!", + "269": "Pon una bola de discoteca, que te enseñaré cómo se monta una buena fiesta.", + "27": "Si vas a morir, hazlo fuera.", + "270": "Estuve en Suecia una vez. No veas qué fiestas locas se montan. ¿Por qué tú no eres así?", + "271": "Me llamo {PartyGirl}, pero la gente me llama destrozafiestas. No sé por qué, pero suena guay.", + "272": "¿Te gustan las fiestas? ¿A veces? Mmm, vale. Entonces podemos hablar...", + "273": "No me entusiasma la tierra, pero es mejor perderse en la tierra que no pisar tierra nunca jamás.", + "274": "¡Jo, jo, jo, y una botella de... raíz intermitente!", + "275": "¡Ar! Es curioso que hables de loros porque... Esto... ¿De qué estábamos hablando?", + "276": "{PlayerName}, ¡eres una de las mejores jovencitas que este capitán ha visto en semanas!", + "277": "¡Aléjate de mi botín, canalla!", + "278": "¿De qué rayos estás hablando? ¡Moby Dick me pertenece!", + "279": "*Aaar, yaaar, gaaar*", + "28": "¿Y eso qué quiere decir?", + "280": "Y, entonces, la unidad 492-8 dijo: \"¿Quién crees que soy, unidad 472-6?\". JA. JA. JA.", + "281": "Mi eficiencia en la expedición se redujo drásticamente cuando un proyectil impactó en el propulsor de mi locomotora.", + "282": "Esta oración es falsa, ¿o no?", + "283": "Así que esa chica de pinta punki es inventora, ¿eh? ¡Creo que podría enseñarle un par de cosas!", + "284": "Claro, {Pirate} y yo somos amigos, pero no me gusta cuando su loro hace sus cosas sobre mí. ¡Esa movida es corrosiva!", + "285": "¡Construí un mecanismo de degustación para beber un poco de cerveza!", + "286": "A veces se me va un poco... ¿Lo pillas? ¡Un poco!", + "287": "¿Corto por detrás y por los lados?", + "288": "¡Esas mechas resaltan el color de tus ojos!", + "289": "Tengo las manos pegajosas de tanta… cera.", + "29": "No me gusta el tono que empleas.", + "290": "¿Té? ¿Café? ¿O acaso es otro zumo de naranja?", + "291": "Muñeca, tenemos que arreglar esas puntas abiertas.", + "292": "¡Nenaaa! Eres mi marujeo favorito.", + "293": "¿Qué aftershave te puedo ofrecer hoy?", + "294": "Siéntate un segundo, que voy a por una maquinilla.", + "295": "O tienes estilo o te meten el estilo en el cuerpo.", + "296": "A ti creo que podríamos hacerte… un pequeño mantenimiento.", + "297": "Una vez, intenté usar uno de los productos del Maestro de los Tintes. Las puntas acabaron quemadas. Un desastre.", + "298": "Oh, pobre... Ven… Ven a sentarte aquí. Todo irá bien. Shhh.", + "299": "Échale un ojo a esto.", + "3": "Siento como si una presencia maligna me observara.", + "30": "¿Por qué sigues aquí? Si no te estás desangrando, aquí no pintas nada. Lárgate.", + "300": "¡Muy buenas! Soy {Stylist} y me encargaré de tu pelo hoy.", + "301": "¿Solo un poquito exagerado? Qué aburrido…", + "302": "¡Espero que te guste lo que he hecho con el pelo de {PartyGirl}!", + "303": "No se puede hacer nada con la cabeza de {Demolitionist}. Es una causa perdida.", + "304": "No es obligatorio dejar propina, pero recuerda que tengo unas tijeras cerca de tu cabeza.", + "305": "Por cierto, esta cuchilla se solía usar para guillotinar.", + "306": "Querido, más te vale no acercarte a mí esta noche. Acabo de afilar las tijeras ¡y estoy buscando alguna excusa para usarlas!", + "307": "Me ha contado {PartyGirl} que {Nurse}, la amiga de {Mechanic}, se pulió todo el sueldo de su novio en zapatos.", + "308": "Una vez, le puse una peluca a un {Cyborg} para poder arreglarle el pelo. ¡Creo que le gustó!", + "309": "Una vez, intenté visitar a {Stylist}. Pero en cuanto me vio, dijo: \"Ni de coña\".", + "31": "¡¿Cómo?!", + "310": "¡Creo que va siendo hora de arreglarme el pelo!", + "311": "Hoy no te has molestado ni en peinarte, ¿verdad?", + "312": "Así que un corte pixie… ¿Quieres unas patillas también?", + "313": "No tengo ningún problema en trabajar con el pelo de orejas y cejas, ¡pero por los de la nariz no paso!", + "314": "Vale, siéntate y acomódate. Volveré a tintarte en unos 25 minutos…", + "315": "¡Gracias, cielo! Ahora por fin podré arreglarme el pelo.", + "316": "Si hubieses venido antes, te habría cortado el pelo gratis.", + "317": "\"No vayas a explorar con tijeras\", decían. \"No te vas a comer ninguna telaraña\", decían.", + "318": "¡Arg, mi pelo! ¡Lo tengo lleno de telarañas!", + "319": "Quedaremos detrás de casa de {Guide} dentro de unas tres horas. Creo que tengo algo que podría interesarte.", + "32": "¿Has visto a ese anciano que deambula por la mazmorra? Parece un tanto preocupado.", + "320": "Ese {Merchant} no sabe apreciar un buen negocio ni aunque se lo pongan delante de las narices.", + "321": "Solo vendo lo que puedo conseguir. {Clothier} me está buscando ropa exótica.", + "322": "Vaya, ¡parece que te vendría bien una Estatua de ángel! Cortan, trocean y lo hacen todo maravilloso.", + "323": "No devuelvo el dinero si el comprador se arrepiente. Bueno, ni por ningún otro motivo, la verdad.", + "324": "¡Si compras ahora, el envío te sale gratis!", + "325": "¡Vendo objetos de lugares que podrían no existir!", + "326": "¡¿Quieres dos cuartos de penique?! Que sea uno y cerramos el trato.", + "327": "¡La fusión de una cachimba y una cafetera! ¡Y además, hace patatas a la juliana!", + "328": "¡Ven a echar un vistazo! ¡Pescado a una libra! ¡Muy, muy bueno! ¡Pescado a una libra!", + "329": "Si estás buscando basura, has venido al lugar equivocado.", + "33": "Ojalá {Demolitionist} tuviera más cuidado. Ya me estoy hartando de tener que coserle las extremidades todos los días.", + "330": "¿Un mercadillo? Qué va, tan solo vendo los objetos de más calidad del mercado.", + "331": "Al veces, al romper un corazón carmesí se provoca la caída de un meteorito del cielo. Los corazones carmesís se suelen encontrar en los abismos que rodean las zonas carmesís.", + "332": "¿Has probado a usar polvos purificadores sobre la piedra carmesí?", + "333": "Debes librar al mundo de este carmesí.", + "334": "¡Psst! Puede que tenga un trabajillo para ti. ¡Tampoco es que puedas decir que no!", + "335": "¡Quiero un pez y me vas a encontrar uno! ¡Pregúntame por él!", + "336": "¡Oye! Solo me vale el sacrifi… Digooo… El maestro de la pesca al que estoy buscando. ", + "337": "{Angler} quiere que seas el chico de los recados oficial de {WorldName}.", + "338": "¡¿Quééé?! ¿Acaso no ves que estoy recogiendo el sedal?", + "339": "¡Ya tengo suficientes peces! ¡No necesito tu ayuda ahora mismo!", + "34": "Oye, por curiosidad, ¿ha dicho {ArmsDealer} por qué tiene que ir al médico? Es por mera curiosidad.", + "340": "No hay cocineros en Terraria, así que me toca cocinarme el pescado yo solito. ", + "341": "¡Oye! ¡Ten cuidado! ¡Estoy preparando las trampas para mi mayor broma hasta la fecha! ¡Nadie se lo verá venir! ¡No se lo digas a nadie!", + "342": "Deja que te dé un consejo: ¡nunca toques un bloque de hielo con la lengua! No, espera, olvida eso. ¡Estoy deseando verte hacerlo!", + "343": "¡¿Has visto alguna vez a un pez que ladra?! Yo no, ¡pero me preguntaba si tú sí lo habías visto!", + "344": "¡{WorldName} tiene un montón de peces de todo tipo!", + "345": "¡Estoy cabreado! Podría haber peces que se extinguieron incluso antes de que yo hubiese nacido.", + "346": "No tengo ni madre ni padre, ¡pero tengo un montón de peces! ¡A mí me vale!", + "347": "Je, je. ¡Tendrías que haber visto la cara de {Dryad} cuando clavé ese diente de piraña en la silla!", + "348": "Tengo algo que pedirte. ¡Me da igual que haya un apocalipsis zombi en estos momentos!", + "349": "¡Venga, escucha! ¡Necesito que me consigas algo cuanto antes!", + "35": "Debo hablar en serio con {Guide}. ¿Cuántas veces a la semana crees que podrás venir con quemaduras de lava graves?", + "350": "¡Odio las Lunas de Sangre! ¡Me paso la noche en vela por culpa de todos esos sonidos terroríficos!", + "351": "¡El peor momento para pescar es con una Luna de Sangre! Sí, los peces pican igual, ¡pero mientras los zombis te muerden!", + "352": "¡Hay un gritón de monstruos correteando por ahí fuera ahora mismo!", + "353": "Supongo que debo darte las gracias por salvarme… o lo que fuera eso. ¡Serías un gran súbdito ayudante!", + "354": "¿Qué? ¿Quién rayos eres tú? ¡No, no me estaba ahogando ni nada por el estilo!", + "355": "¡Me has salvado! Podría usarte… digooo, contratarte para que realices un par de tareas para mí.", + "356": "¿Vendes huesos de repuesto? Tengo que sustituir mi cadera rota... otra vez.", + "357": "¡Excelente! Al final, ha venido alguien a quitarme algunos de estos gusanos de las manos.", + "358": "¡No hay enfermedad que mi aceite de slime no pueda curar! Funciona, créeme. ¡Mira qué buen color tengo!", + "359": "Ya tienes que tener cara para venir hasta aquí. ¿Qué tal si compras algo?", + "36": "Creo que así estarás mejor.", + "360": "No te creerías algunas de las cosas que la gente me tira... ¿Quieres comprar un poco?", + "361": "Te echaré una mano, pero, la última vez que lo hice, tardaste un mes en devolvérmela.", + "362": "Aléjate de las arañas. Te succionarán las entrañas y solo dejarán un recipiente humano vacío. Confía en mí para esto.", + "363": "Las únicas cosas constantes en este mundo son la muerte y los impuestos. ¡Yo tengo ambos!", + "364": "¿Tú otra vez? ¡¿Entiendo que quieres más dinero?!", + "365": "¡¿Aquí todo el mundo tiene que abrir y cerrar las puertas de una forma tan ruidosa?!", + "366": "Veo que te sobra el tiempo, como siempre. No me puedo ni imaginar cómo debe de ser vuestra vida laboral.", + "367": "¡Sí, sí, sí! Te daré tu parte en un momento. Creía que serías un poco más paciente, por aquello de que soy yo quien hace todo el trabajo y eso.", + "368": "¿Qué tiene que hacer un hombre para que lo dejen en paz en este lugar? ¡Ve a molestar a alguien que esté menos ocupado!", + "369": "Dos barriles de melaza, más... Oh, da igual. Estás aquí. Aquí tienes tu dinero.", + "37": "Ufff... ¿Qué te ha pasado en la cara?", + "370": "Entre tú y yo... No tengo ni idea de por qué se molestan en pagar el alquiler.", + "371": "Una vez, intenté que {Dryad} me pagara en especias. Ahora, me crecen hongos en lugares extraños.", + "372": "Dile a {ArmsDealer} que deje de intentar pagarme con munición. Ni siquiera tengo un arma.", + "373": "¿Por qué no intentas que {Demolitionist} te dé dinero sin perder una mano o un pie o...?", + "374": "Acabo de hacerle una visita a {Merchant}. Quería saber si aceptaba tarjetas de crédito.", + "38": "¡DIOS MÍO! Se me da bien mi trabajo, pero no tanto.", + "380": "¡Toma tu parte de los impuestos que he recaudado de nuestra población sobrante!", + "381": "¡Aquí estás otra vez, llevándote todo mi dinero! ¡Anda, cógelo y lárgate de mi vista!", + "382": "¡Bah! Ten, ¡coge tu dinero y vete a freír espárragos!", + "383": "Esto es todo lo que tendrás por ahora. ¡Ni una moneda más! Cógelo y gástalo con cabeza.", + "39": "Estimados amigos, estamos hoy aquí reunidos para despedirnos... Oh, saldrás de esta.", + "390": "¿Y la gente dice que me pierde la codicia? No, no tengo nada más para ti.", + "391": "Oh, así que me ves como un banco con patas, ¿no? Porque siempre que me ves, me pides algo.", + "392": "¿Nunca te pasas solo para decir \"hola\"?", + "393": "¡Bah! ¿Tú otra vez? Te llevaste parte de mi dinero hace un momento, ¡así que lárgate y vuelve más tarde!", + "394": "¡Te he dado un buen pellizco hace solo cinco minutos! ¡Fuera!", + "395": "¡¿Ya me estás saqueando los bolsillos otra vez?! Y después hablas de mi tacañería.", + "396": "Acabas de recibir tu pago. ¡No te llevarás ni una moneda más! ¡Sal de aquí!", + "397": "El dinero no crece en los árboles, ¡así que no abuses! ¡Bah! ", + "398": "¡¿Ya te has gastado todo lo que te pagué?! No soy una ONG. ¡Vete a matar slimes por ahí!", + "399": "¡No tan rápido! Ya tienes tu dinero. ¡Ahora, vete! ", + "4": "¡La espada gana al papel! Hazte con un ejemplar ahora.", + "40": "Te dejaste el brazo por ahí. Deja que te ayude...", + "400": "¿Suplicando tan pronto? ¡No me mires como si fuera a cambiar de idea de un día para otro! ", + "401": "Asegúrate de destruir todos los altares carmesís que encuentres. ¡Algo bueno te sucederá si lo haces!", + "402": "Los altares carmesís se suelen encontrar en Carmesí. Tendrás que estar cerca de ellos para crear ciertos objetos.", + "41": "¡Deja de comportarte como un bebé! He visto cosas peores.", + "42": "¡Voy a tener que darte puntos!", + "43": "¿Ya te has vuelto a meter en líos?", + "44": "Aguanta, por aquí tengo unas tiritas infantiles chulísimas.", + "45": "Puedes irte, {PlayerName}. Te pondrás bien. Jesús...", + "46": "¿Te duele cuando haces eso? Pues no lo hagas.", + "47": "Vienes como si estuvieras a medio digerir. ¿Has estado cazando slimes otra vez?", + "48": "Gira la cabeza y tose.", + "49": "No es de lo peor que he visto... Sin duda, he visto heridas más grandes que esta.", + "5": "¿Quieres manzanas? ¿Zanahorias? ¿Unas piñas? Tenemos antorchas.", + "50": "¿Quieres una piruleta?", + "51": "Dime dónde te duele.", + "52": "Lo siento, pero no trabajo por caridad.", + "53": "Vas a necesitar más oro del que traes.", + "54": "Oye, yo no trabajo gratis.", + "55": "No tengo una varita mágica.", + "56": "No puedo hacer nada más por ti sin cirugía estética.", + "57": "No me hagas perder el tiempo.", + "58": "Dicen que en alguna parte del Inframundo hay una muñeca que se parece mucho a {Guide}. Ojalá pudiera usarla para practicar el tiro al blanco.", + "59": "¡Date prisa! Tengo una cita con {Nurse} dentro de una hora.", + "6": "Una mañana estupenda, ¿verdad? ¿No necesitas nada?", + "60": "Quiero lo que vende {Nurse}. ¿Qué quieres decir? Ella no vende nada.", + "61": "{Dryad} es una monada. Es una lástima que sea tan mojigata.", + "62": "Olvídate de {Demolitionist}, yo tengo todo lo que necesitas aquí y ahora.", + "63": "¿Qué mosca le ha picado a {Demolitionist}? ¿Aún no sabe que vendemos cosas totalmente distintas?", + "64": "Oye, hace una noche magnífica para no hablar con nadie, ¿no crees, {PlayerName}?", + "65": "Me encantan estas noches. ¡Siempre encuentras algo que matar!", + "66": "Veo que le has echado el ojo al minitiburón... Será mejor que no sepas de qué está hecho.", + "67": "Eh, amigo, que esto no es una película. La munición va aparte.", + "68": "¡Aparta esas manos de mi pistola, colega!", + "69": "¿Has probado a usar polvos de purificación sobre la piedra de ébano corrupta?", + "7": "La noche caerá pronto, amigo. Haz tus compras mientras puedas.", + "70": "Ojalá {ArmsDealer} dejara de flirtear conmigo. ¿No se da cuenta de que tengo 500 años?", + "72": "¿Has visto a ese anciano que deambula por la mazmorra? No tiene muy buen aspecto...", + "73": "¡Yo vendo lo que quiero! Si no te gusta, mala suerte.", + "74": "¿Por qué tienes que ser tan beligerante en estos tiempos que corren?", + "75": "No quiero que compres mis artículos. Quiero que desees comprar mis artículos, ¿entiendes?", + "76": "Oye, ¿soy yo o esta noche han salido de juerga un millón de zombis?", + "77": "Debes erradicar la corrupción de este mundo.", + "78": "Cuídate. ¡Terraria te necesita!", + "79": "Fluyen las arenas del tiempo. Y la verdad, no estás envejeciendo con mucha elegancia.", + "8": "Ni te imaginas lo bien que se venden los bloques de tierra en el extranjero.", + "80": "¿Qué es eso de que ladro mucho y muerdo poco?", + "81": "Dos trasgos entran en un bar y uno le dice al otro: \"¿Quieres un trasgo de cerveza?\".", + "82": "No puedo dejarte entrar hasta que me liberes de la maldición.", + "83": "Vuelve por la noche si quieres entrar.", + "84": "No se puede invocar al maestro a la luz del día.", + "85": "Eres demasiado débil para romper esta maldición. Vuelve cuando seas de más utilidad.", + "86": "Eres lamentable. No esperes presentarte ante el maestro tal como eres.", + "87": "Espero que hayas venido con varios amigos...", + "88": "No lo hagas, forastero. Sería un suicidio.", + "89": "Tal vez seas lo bastante fuerte para poder librarme de esta maldición...", + "9": "Oh, algún día narrarán las aventuras de {PlayerName}... y seguro que acaban bien.", + "90": "Forastero, ¿te crees con fuerzas para derrotar al maestro?", + "91": "¡Por favor! ¡Lucha con mi raptor y libérame! ¡Te lo suplico!", + "92": "Derrota al maestro y te permitiré entrar a la mazmorra.", + "93": "Conque intentando librarte de esa piedra de ébano, ¿eh? ¿Por qué no la metes en uno de estos explosivos?", + "94": "Eh, ¿has visto a un payaso por aquí?", + "95": "Había una bomba aquí mismo, y ahora no soy capaz de encontrarla...", + "96": "¡Yo les daré a esos zombis lo que necesitan!", + "97": "¡Incluso {ArmsDealer} quiere lo que vendo!", + "98": "¿Prefieres tener un agujero de bala o de granada? ¿Un agujero de bala o de granada?", + "99": "Seguro que {Nurse} te ayudará si pierdes una extremidad jugando con estas monadas..." + }, + "LegacyMenu": { + "0": "¡Empieza una nueva partida de Terraria para unirte!", + "100": "Con fondo", + "101": "Sin fondo", + "102": "Seleccionar idioma", + "103": "Idioma", + "104": "Sí", + "105": "No", + "106": "Cambiar estilo de mapa ", + "107": "Cambiar pantalla completa ", + "108": "Acercar ", + "109": "Alejar ", + "10": "Cargar copia", + "110": "Reducir transparencia ", + "111": "Aumentar transparencia ", + "112": "Mapa activo", + "113": "Mapa desactivado", + "114": "General", + "115": "Controles del mapa", + "116": "Luces multinúcleo:", + "117": "No", + "118": "Cerrar menú", + "11": "No se ha encontrado copia de seguridad", + "120": "Cursor inteligente ", + "121": "Modo de cursor inteligente: Cambiar", + "122": "Modo de cursor inteligente: Mantener", + "123": "Barra de progreso del evento", + "124": "No", + "125": "Temporal", + "126": "Sí", + "127": "Estilo", + "128": "Activar vista previa de colocación", + "129": "Desactivar vista previa de colocación", + "12": "Un jugador", + "130": "Montura ", + "131": "Logros", + "132": "Activar sangre y gore", + "133": "Desactivar sangre y gore", + "134": "Aplicar", + "135": "Ajustes del servidor", + "136": "Multijugador de Steam: Desactivado", + "137": "Multijugador de Steam: Activado", + "138": "Usuarios permitidos: Solo por invitación", + "139": "Usuarios permitidos: Amigos", + "13": "Multijugador", + "140": "Los amigos pueden invitar: No", + "141": "Los amigos pueden invitar: Sí", + "142": "Permitir amigos de amigos: No", + "143": "Permitir amigos de amigos: Sí", + "144": "Inicio", + "145": "Jugar a través de Steam", + "146": "Jugar a través de IP", + "147": "Invitar a amigos", + "148": "Arriba", + "149": "Abajo", + "14": "Configuración", + "150": "Izquierda", + "151": "Derecha", + "152": "Saltar", + "153": "Lanzar", + "154": "Inventario", + "155": "Agarrar", + "156": "Maná rápido", + "157": "Potenciador rápido", + "158": "Montura rápida", + "159": "Curación rápida", + "15": "Salir", + "160": "Selección automática", + "161": "Cursor inteligente", + "162": "Usar objeto", + "163": "Interactuar", + "164": "Controles de juego", + "165": "Controles del mapa", + "166": "Controles de acceso rápido", + "167": "Ajustes del mando", + "168": "Acercar", + "169": "Alejar", + "16": "Crear personaje", + "170": "Aumentar transparencia", + "171": "Reducir transparencia", + "172": "Cambiar estilo de mapa", + "173": "Cambiar mapa completo", + "174": "Girar izquierda", + "175": "Girar derecha", + "176": "Acceso rápido 1", + "177": "Acceso rápido 2", + "178": "Acceso rápido 3", + "179": "Acceso rápido 4", + "17": "Eliminar", + "180": "Acceso rápido 5", + "181": "Acceso rápido 6", + "182": "Acceso rápido 7", + "183": "Acceso rápido 8", + "184": "Acceso rápido 9", + "185": "Acceso rápido 10", + "186": "Marca rápida 1", + "187": "Marca rápida 2", + "188": "Marca rápida 3", + "189": "Marca rápida 4", + "18": "Pelo", + "190": "Acceso rápido radial", + "191": "Cursor Snap Up", + "192": "Cursor Snap Right", + "193": "Cursor Snap Down", + "194": "Cursor Snap Left", + "195": "", + "196": "DPad Cursor Snap", + "197": "DPad Hotbar", + "198": "Ajustes avanzados del mando", + "199": "Triggers Deadzone", + "19": "Ojos", + "1": "Running on port ", + "200": "Sliders Deadzone", + "201": "Left Thumbstick Deadzone X", + "202": "Left Thumbstick Deadzone Y", + "203": "Right Thumbstick Deadzone X", + "204": "Right Thumbstick Deadzone Y", + "205": "Invert Left Thumbstick Horizontally", + "206": "Invert Left Thumbstick Vertically", + "207": "Invert Right Thumbstick Horizontally", + "208": "Invert Right Thumbstick Vertical", + "209": "Utilize", + "20": "Skin", + "210": "Interface", + "211": "Passwords: Visible", + "212": "Contraseñas: Oculto", + "213": "Prioridad de cursor inteligente: Pico -> hacha", + "214": "Prioridad de cursor inteligente: Hacha -> pico", + "215": "Colocación inteligente de bloques: Al cursor", + "217": "Color de bordes", + "218": "Cursor", + "219": "Controles", + "21": "Ropa", + "220": "Activar bonificaciones: Arriba", + "221": "Activar bonificaciones: Abajo", + "222": "Asignación de teclas", + "223": "Eliminación rápida con Mayús izquierdo: Activada", + "224": "Eliminación rápida con Mayús izquierdo: Desactivada", + "225": "Sustituir pared rápidamente: Desactivado", + "226": "Sustituir pared rápidamente: Activado", + "227": "Tiempo de scroll de acceso rápido a radial: Sí", + "228": "Tiempo de scroll de acceso rápido a radial: No", + "229": "Red de ladrillos activada", + "22": "Hombre", + "230": "Red de ladrillos desactivada", + "231": "Fijar", + "232": "Prioridad de objetivo: Objetivo fijado", + "233": "Prioridad de objetivo: Objetivo más cercano", + "234": "Prioridad de objetivo: Ataque más limpio", + "235": "abc / ABC / !@#", + "236": "Retroceso", + "237": "Enviar", + "238": "Barra espaciadora", + "239": "<-", + "23": "Mujer", + "240": "->", + "241": "Desactivar instrucciones del mando", + "242": "Activar instrucciones del mando", + "243": "Controles del menú", + "244": "Acceso rápido radial", + "245": "Ventana sin bordes: Activada", + "246": "Ventana sin bordes: Desactivada", + "247": "No omitir Frame", + "248": "Omitir Frame", + "249": "Omitir Frame sutilmente", + "24": "Extremo", + "250": "Bamboleo del minero: Activado", + "251": "Bamboleo del minero: Desactivado", + "252": "Retraso de movimiento de la interfaz", + "25": "Núcleo medio", + "26": "Núcleo suave", + "27": "Aleatorio", + "28": "Crear", + "2": "Desconectar", + "32": "Seleccionar dificultad", + "33": "Camisa", + "34": "Camiseta", + "35": "Pantalones", + "36": "Zapatos", + "37": "Pelo", + "38": "Color de pelo", + "39": "Color de ojos", + "3": "Este servidor tiene contraseña:", + "40": "Color de piel", + "41": "Color de la camisa", + "42": "Color de la camiseta", + "43": "Color de los pantalones", + "44": "Color de los zapatos", + "45": "Escribir nombre del personaje:", + "46": "Eliminar", + "47": "Crear mundo", + "48": "Escribir nombre del mundo:", + "49": "Modo ventana", + "4": "Aceptar", + "50": "Pantalla completa", + "51": "Resolución", + "52": "Parallax", + "53": "No omitir Frame", + "54": "Omitir Frame", + "55": "Iluminación: Color", + "56": "Iluminación: Blanca", + "57": "Iluminación: Retro", + "58": "Iluminación: Psicodélica", + "59": "Calidad: Automática", + "5": "Atrás", + "60": "Calidad: Alta", + "61": "Calidad: Media", + "62": "Calidad: Baja", + "63": "Vídeo", + "64": "Color del cursor", + "65": "Volumen", + "66": "Controles", + "67": "Guardado automático activado", + "68": "Guardado automático desactivado", + "69": "Pausa automática activada", + "6": "Cancelar", + "70": "Pausa automática desactivada", + "71": "Sugerencias activadas", + "72": "Sugerencias desactivadas", + "73": "Resolución de pantalla completa", + "74": "Arriba ", + "75": "Abajo ", + "76": "Izquierda ", + "77": "Derecha ", + "78": "Saltar ", + "79": "Lanzar ", + "7": "Introducir contraseña del servidor:", + "80": "Inventario ", + "81": "Curación rápida ", + "82": "Maná rápido ", + "83": "Potenciador rápido ", + "84": "Agarrar ", + "85": "Selección automática ", + "86": "Volver a predeterminado", + "87": "Unirse", + "88": "Crear y jugar", + "89": "Introducir dirección IP del servidor:", + "8": "Iniciando servidor...", + "90": "Introducir puerto del servidor:", + "91": "Elegir tamaño del mundo:", + "92": "Pequeño", + "93": "Mediano", + "94": "Grande", + "95": "Rojo:", + "96": "Verde:", + "97": "Azul:", + "98": "Sonido:", + "99": "Música:", + "9": "¡Error al cargar!", + "119": "Ambiente:" + }, + "LegacyTooltip": { + "0": "Equipado en la ranura social", + "10": "Lento", + "11": "Muy lento", + "12": "Exageradamente lento", + "13": "Velocidad de tortuga", + "14": "Sin retroceso", + "15": "Retroceso sumamente débil", + "16": "Retroceso muy débil", + "17": "Retroceso débil", + "18": "Retroceso normal", + "19": "Retroceso fuerte", + "1": "No aumentará ninguna característica", + "20": "Retroceso muy fuerte", + "21": "Retroceso tremendamente fuerte", + "22": "Retroceso descomunal", + "23": "Equipable", + "24": "Objeto decorativo", + "25": " defensa", + "26": "% potencia de pico", + "27": "% potencia de hacha", + "28": "% potencia de martillo", + "29": "Restablece", + "2": " daño en el cuerpo a cuerpo", + "30": "vida", + "31": "maná", + "32": "Consume", + "33": "Se puede colocar", + "34": "Munición", + "35": "Consumible", + "36": "Material", + "37": " minuto(s) de duración", + "38": " segundo(s) de duración", + "39": "% daño", + "3": " daño a distancia", + "40": "% velocidad", + "41": "% probabilidad de ataque crítico", + "42": "% coste de maná", + "43": "% tamaño", + "44": "% velocidad de proyectil", + "45": "% retroceso", + "46": "% velocidad de movimiento", + "47": "% velocidad en el cuerpo a cuerpo", + "48": "Bonus conjunto:", + "49": "Precio de venta:", + "4": " daño por magia", + "50": "Precio de compra:", + "51": "Sin valor", + "52": "Consume ", + "53": " daño de invocación", + "54": " alcance", + "55": " daño", + "56": "Marcado como favorito", + "57": "Se bloquearán la eliminación rápida, la acumulación y la venta", + "58": " daño al lanzar", + "59": "Ha sido maldito por una poderosa criatura de la selva", + "5": "% probabilidad de ataque crítico", + "6": "Velocidad de vértigo", + "7": "Gran velocidad", + "8": "Veloz", + "9": "Velocidad normal" + }, + "LegacyMultiplayer": { + "10": "¡No estás en un equipo!", + "11": "{0} ha activado el JcJ.", + "12": "{0} ha desactivado el JcJ.", + "13": "{0} ya no pertenece a ningún bando.", + "14": "{0} se ha unido al bando rojo.", + "15": "{0} se ha unido al bando verde.", + "16": "{0} se ha unido al bando azul.", + "17": "{0} se ha unido al bando amarillo.", + "18": "Te damos la bienvenida a", + "19": "{0} se ha unido.", + "20": "{0} se ha ido.", + "21": "/players", + "22": "{0} se ha unido al bando rosa.", + "2": "Operación no válida en este estado.", + "3": "Has sido expulsado de este servidor.", + "4": "No tienes la misma versión que este servidor.", + "5": "ya está en este servidor.", + "6": "/playing", + "7": "Jugadores actuales:", + "8": "/roll", + "9": "tira un", + "0": "Recibes:" + }, + "LegacyMisc": { + "0": "¡El ejército de duendes ha sido derrotado!", + "100": "Elige el mal del mundo", + "101": "Corrupción", + "102": "Carmesí", + "103": "Aleatorio", + "10": "Sientes un horrible escalofrío por la espalda...", + "11": "El eco de los alaridos suena por todas partes...", + "12": "¡Tu mundo ha sido bendecido con cobalto!", + "13": "¡Tu mundo ha sido bendecido con mithril!", + "14": "¡Tu mundo ha sido bendecido con adamantita!", + "15": "Los ancestrales espíritus de la luz y la oscuridad han sido liberados.", + "19": "{0} ha muerto...", + "1": "¡Un ejército de duendes se aproxima por el oeste!", + "20": "¡Se avecina un eclipse solar!", + "21": "¡Tu mundo ha sido bendecido con paladio!", + "22": "¡Tu mundo ha sido bendecido con oricalco!", + "23": "¡Tu mundo ha sido bendecido con titanio!", + "24": "¡Los piratas han sido derrotados!", + "25": "¡Los piratas se aproximan por el oeste!", + "26": "¡Los piratas se aproximan por el este!", + "27": "¡Han llegado los piratas!", + "28": "Sientes vibraciones desde las profundidades…", + "29": "Va a ser una noche horrible...", + "2": "¡Un ejército de duendes se aproxima por el este!", + "30": "El aire es cada vez más frío a tu alrededor…", + "31": "La Luna calabaza ha salido...", + "32": "La selva se expande sin control…", + "33": "Resuenan gritos en la mazmorra...", + "34": "La Luna Gélida se alza…", + "35": "{0} ha partido.", + "36": "{0} se ha ido.", + "37": "Cualquiera", + "38": "Placa de presión", + "39": " y regeneración de vida aumentada", + "3": "¡Un ejército duende ha llegado!", + "40": "Aumenta la regeneración de vida", + "41": "¡Los marcianos nos invaden!", + "42": "¡Los marcianos han sido derrotados!", + "43": "¡Nos invaden criaturas celestiales!", + "44": "Te estás mareando...", + "45": "El dolor está acabando contigo...", + "46": "Voces de otro mundo resuenan a tu alrededor...", + "47": "¡El Señor de la Luna ha despertado!", + "48": "¡Los gemelos se han despertado!", + "49": "Te despiertas de un sueño extraño...", + "4": "¡La Legión de escarcha ha sido derrotada!", + "50": "ha sufrido una derrota.", + "51": "Fragmento lunar", + "52": "Se avecina un Infierno inminente...", + "53": "Seleccionar", + "54": "Coger", + "55": "Coger uno", + "56": "Cerrar", + "57": "Agarrar", + "58": "Saltar", + "59": "Girar acceso rápido", + "5": "¡La Legión de escarcha avanza por el oeste!", + "60": "Atacar", + "61": "Construir", + "62": "Beber", + "63": "Acción", + "64": "Cambiar menú", + "65": "Colocar", + "66": "Cambiar", + "67": "Equipar", + "68": "Desequipar", + "69": "Mostrar banderas", + "6": "¡La Legión de escarcha avanza por el este!", + "70": "Revisar vivienda", + "71": "Creación rápida", + "72": "Crear", + "73": "Seleccionar", + "74": "Eliminar", + "75": "Vender", + "76": "Transferir", + "77": "Mostrar gráficos", + "78": "Ocultar gráficos", + "79": "Usar", + "7": "¡Ha llegado la Legión de escarcha!", + "80": "Hablar", + "81": "Leer", + "82": "Atrás", + "83": "Favorito", + "84": "¡No puedes cambiar de equipo dentro de los bloques de tu equipo!", + "86": "Pato", + "87": "Mariposa", + "88": "Luciérnaga", + "89": "Opciones de cableado", + "8": "La Luna de Sangre se alza…", + "90": "Comprar", + "91": "Comprar más", + "92": "Vender", + "93": "Crear más", + "94": "Intentar quitar", + "95": "Caracol", + "96": "Parece que ", + "97": " está celebrando una fiesta", + "98": " están celebrando una fiesta", + "99": "¡Se acabó la fiesta!", + "9": "Crees que una presencia maligna te está observando...", + "104": "No se puede usar sin maná etéreo hasta haber defendido el cristal eternia" + }, + "LegacyInterface": { + "0": "Vida:", + "100": "Total de criaturas", + "101": "Total de muertes", + "102": "Fase de la luna", + "103": "Velocidad de movimiento", + "104": "Tesoro", + "105": "Criaturas raras", + "106": "Daño por segundo", + "107": "Plantas extrañas", + "108": "Abrir mapa", + "109": "Cerrar mapa", + "10": "Defensa", + "110": "Abrir carpeta", + "111": "Hacer captura de pantalla", + "112": "Primero, tienes que determinar un frame", + "113": "Solo disponible en el modo ventana", + "114": "Solo disponible con el mapa activado", + "115": "Modo cámara desactivado", + "116": "No destacar objetos nuevos", + "117": "Destacar objetos nuevos", + "118": "Acercar", + "119": "Alejar", + "11": "Social", + "120": "Teletransportarse al aliado", + "121": "Soltar objeto", + "122": "Ordenar objetos", + "123": "Clima frío", + "12": "Casco", + "13": "Camisa", + "14": "Pantalones", + "15": "platino", + "16": "oro", + "17": "plata", + "18": "cobre", + "19": "Reciclar", + "1": "Respirar", + "20": "Coloca aquí un objeto para reciclarlo", + "21": "Monstando recetas que usen", + "22": "Objetos necesarios:", + "23": "Ninguno", + "24": "Coloca aquí un material", + "25": "Creación", + "26": "Monedas", + "27": "Munición", + "28": "Tienda", + "29": "Coger todo", + "2": "Maná", + "30": "Depositar todo", + "31": "Guardar rápido", + "32": "Hucha", + "33": "Caja fuerte", + "34": "Hora", + "35": "Guardar y salir", + "36": "Desconectar", + "37": "Objetos", + "38": "Te han matado...", + "39": "Esta vivienda es válida.", + "3": "Cubo de basura", + "40": "Esta vivienda no es válida.", + "41": "Esta vivienda ya está ocupada.", + "42": "Esta vivienda está corrompida.", + "43": "Se ha acabado el tiempo para la conexión", + "44": "Recibiendo datos de casillas", + "45": "Equipar", + "46": "Coste", + "47": "Guardar", + "48": "Editar", + "49": "Estado", + "4": "Inventario", + "50": "Maldición", + "51": "Ayuda", + "52": "Cerrar", + "53": "Agua", + "54": "Sanar", + "55": "Este cobijo no cumple los requisitos para:", + "56": "Lava", + "57": "Tinte", + "58": "Miel", + "59": "Visible", + "5": "Acceso rápido desbloqueado", + "60": "Oculto", + "61": "Cambiar nombre", + "62": "Configuración", + "63": "Cancelar", + "64": "Misión", + "65": "Objeto de misión", + "66": "Ahorros", + "67": "Hacer captura", + "68": "Configuración", + "69": "Fijar frame", + "6": "Acceso rápido bloqueado", + "70": "Determinar frame", + "71": "Cerrar", + "72": "Sí", + "73": "No", + "74": "Compresión de imagen", + "75": "Capturar entidades", + "76": "Capturar fondo", + "77": "Elección de biomedio", + "78": "Reiniciar frame", + "79": "Equipamiento", + "7": "Vivienda", + "80": "Vivienda", + "81": "Modo de cámara", + "82": "Reabastecer", + "83": "Luna Gélida", + "84": "Luna calabaza", + "85": "Locura marciana", + "86": "Invasión pirata", + "87": "Legión de escarcha", + "88": "Ejército de duendes", + "89": "Coger", + "8": "Pregunta de vivienda", + "90": "Gancho de escalada", + "91": "Montura", + "92": "Mascota", + "93": "Vagoneta", + "94": "Mascota de luz", + "95": "Hora", + "96": "Clima", + "97": "Pescando", + "98": "Posición", + "99": "Profundidad", + "9": "Accesorio" + }, + "LegacyChestType": { + "0": "Cofre", + "10": "Cofre de hiedra", + "12": "Cofre de madera viviente", + "13": "Cofre celestial", + "14": "Cofre de madera sombría", + "15": "Cofre cubierto de telarañas", + "16": "Cofre de lihzahrd", + "17": "Cofre de agua", + "18": "Cofre de la selva", + "19": "Cofre corrupto", + "1": "Cofre de oro", + "20": "Cofre carmesí", + "21": "Cofre sagrado", + "23": "Cofre cerrado de la selva", + "24": "Cofre cerrado corrompido", + "25": "Cofre cerrado carmesí", + "26": "Cofre cerrado sagrado", + "28": "Cofre dinástico", + "29": "Cofre de miel", + "2": "Cofre dorado cerrado", + "30": "Cofre steampunk", + "31": "Cofre de madera de palmera", + "32": "Cofre de champiñón", + "33": "Cofre de madera boreal", + "34": "Cofre de slime", + "35": "Cofre de mazmorra verde", + "36": "Cofre de mazmorra verde cerrado", + "37": "Cofre de mazmorra rosa", + "38": "Cofre de mazmorra rosa cerrado", + "39": "Cofre de mazmorra azul", + "3": "Cofre de las sombras", + "40": "Cofre de mazmorra azul cerrado", + "41": "Cofre de hueso", + "42": "Cofre de cactus", + "43": "Cofre de carne", + "44": "Cofre de obsidiana", + "45": "Cofre de calabaza", + "46": "Cofre tétrico", + "47": "Cofre de cristal", + "48": "Cofre marciano", + "49": "Cofre de meteorito", + "4": "Cofre de las sombras cerrado", + "50": "Cofre de granito", + "51": "Cofre de mármol", + "5": "Barril", + "6": "Cubo de basura", + "7": "Cofre de madera de ébano", + "8": "Cofre de madera de caoba rico", + "9": "Cofre de madera perlada" + }, + "LegacyDresserType": { + "0": "Aparador", + "10": "Aparador de hueso", + "11": "Aparador de cactus", + "12": "Aparador tétrico", + "13": "Aparador celestial", + "14": "Aparador de miel", + "15": "Aparador de lihzahrd", + "16": "Aparador de madera de palmera", + "17": "Aparador de champiñón", + "18": "Aparador de madera boreal", + "19": "Aparador de slime", + "1": "Aparador de madera de ébano", + "20": "Aparador de calabaza", + "21": "Aparador steampunk", + "22": "Aparador de cristal", + "23": "Aparador de carne", + "24": "Aparador marciano", + "25": "Aparador de meteorito", + "26": "Aparador de granito", + "27": "Aparador de mármol", + "2": "Aparador de madera de caoba rico", + "3": "Aparador de madera perlada", + "4": "Aparador de madera sombría", + "5": "Aparador de mazmorra azul", + "6": "Aparador de mazmorra verde", + "7": "Aparador de mazmorra rosa", + "8": "Aparador dorado", + "9": "Aparador de obsidiana", + "28": "{$ItemName.CrystalDresser}", + "29": "{$ItemName.DynastyDresser}", + "30": "{$ItemName.FrozenDresser}", + "31": "{$ItemName.LivingWoodDresser}", + "32": "{$ItemName.SpiderDresser}", + "33": "{$ItemName.LesionDresser}", + "34": "{$ItemName.SolarDresser}", + "35": "{$ItemName.VortexDresser}", + "36": "{$ItemName.NebulaDresser}", + "37": "{$ItemName.StardustDresser}", + "38": "{$ItemName.SandstoneDresser}", + "39": "{$ItemName.BambooDresser}" + }, + "LegacyChestType2": { + "1": "{$ItemName.GoldenChest}", + "0": "{$ItemName.CrystalChest}", + "2": "{$ItemName.SpiderChest}", + "3": "{$ItemName.LesionChest}", + "4": "{$ItemName.GoldChest}", + "5": "{$ItemName.SolarChest}", + "6": "{$ItemName.VortexChest}", + "7": "{$ItemName.NebulaChest}", + "8": "{$ItemName.StardustChest}", + "9": "{$ItemName.GolfChest}", + "10": "{$ItemName.DesertChest}", + "11": "{$ItemName.BambooChest}", + "12": "{$ItemName.DungeonDesertChest}" + } +} \ No newline at end of file diff --git a/Localization/Content/es-ES/NPCs.json b/Localization/Content/es-ES/NPCs.json new file mode 100644 index 0000000..2da72df --- /dev/null +++ b/Localization/Content/es-ES/NPCs.json @@ -0,0 +1,582 @@ +{ + "NPCName": { + "BlueSlime": "Slime azul", + "GiantWormHead": "Gusano gigante", + "SeekerTail": "Tragamundos", + "Clinger": "Lapa", + "AnglerFish": "Pez abisal", + "GreenJellyfish": "Medusa verde", + "Werewolf": "Hombre lobo", + "BoundGoblin": "Duende cautivo", + "BoundWizard": "Mago cautivo", + "GoblinTinkerer": "Duende chapucero", + "Wizard": "Mago", + "Clown": "Payaso", + "GiantWormBody": "Gusano gigante", + "SkeletonArcher": "Esqueleto arquero", + "GoblinArcher": "Duende arquero", + "VileSpit": "Escupitajo vil", + "WallofFlesh": "Muro carnoso", + "WallofFleshEye": "Muro carnoso", + "TheHungry": "El Famélico", + "TheHungryII": "El Famélico", + "LeechHead": "Sanguijuela", + "LeechBody": "Sanguijuela", + "LeechTail": "Sanguijuela", + "GiantWormTail": "Gusano gigante", + "ChaosElemental": "Caos elemental", + "Slimer": "Slimer", + "Gastropod": "Gasterópodo", + "BoundMechanic": "Mecánico cautivo", + "Mechanic": "Mecánico", + "Retinazer": "Retinator", + "Spazmatism": "Espasmatizador", + "SkeletronPrime": "Esqueletrón mayor", + "PrimeCannon": "Cañón mayor", + "PrimeSaw": "Sierra mayor", + "EaterofWorldsHead": "Devoramundos", + "PrimeVice": "Torno mayor", + "PrimeLaser": "Láser mayor", + "BaldZombie": "Zombi", + "WanderingEye": "Ojo errante", + "TheDestroyer": "El Destructor", + "TheDestroyerBody": "El Destructor", + "TheDestroyerTail": "El Destructor", + "IlluminantBat": "Murciélago luminoso", + "IlluminantSlime": "Slime luminoso", + "Probe": "Sonda", + "EaterofWorldsBody": "Devoramundos", + "PossessedArmor": "Armadura poseída", + "ToxicSludge": "Fango tóxico", + "SantaClaus": "Papá Noel", + "SnowmanGangsta": "Muñeco de nieve malote", + "MisterStabby": "Señor Stabby", + "SnowBalla": "Triunfador de nieve", + "IceSlime": "Slime de hielo", + "Penguin": "Pingüino", + "PenguinBlack": "Pingüino", + "EaterofWorldsTail": "Devoramundos", + "IceBat": "Murciélago de hielo", + "Lavabat": "Murciélago de lava", + "GiantFlyingFox": "Zorro volador gigante", + "GiantTortoise": "Tortuga gigante", + "IceTortoise": "Tortuga de hielo", + "Wolf": "Lobo", + "RedDevil": "Diablo rojo", + "Arapaima": "Arapaima", + "VampireBat": "Vampiro", + "Vampire": "Vampiro", + "MotherSlime": "Mamá slime", + "Truffle": "Trufa", + "Frankenstein": "Frankenstein", + "BlackRecluse": "Ermitaño negro", + "WallCreeper": "Criatura de pared", + "WallCreeperWall": "Criatura de pared", + "SwampThing": "Cosa del pantano", + "UndeadViking": "Vikingo no muerto", + "CorruptPenguin": "Pingüino corrupto", + "IceElemental": "Ente de hielo", + "Merchant": "Mercader", + "PigronCorruption": "Cerdidragón", + "PigronHallow": "Cerdidragón", + "RuneWizard": "Mago rúnico", + "Crimera": "Carmebicho", + "Herpling": "Lerduno", + "AngryTrapper": "Trampero enfadado", + "MossHornet": "Avispón del musgo", + "Derpling": "Tontuno", + "Steampunker": "Steampunker", + "CrimsonAxe": "Hacha carmesí", + "Nurse": "Enfermera", + "PigronCrimson": "Cerdidragón", + "FaceMonster": "Caramonstruo", + "FloatyGross": "Flotasquillo", + "Crimslime": "Slime carmesí", + "SpikedIceSlime": "Slime de hielo puntiagudo", + "SnowFlinx": "Copito de nieve", + "PincushionZombie": "Zombi", + "SlimedZombie": "Zombi", + "SwampZombie": "Zombi", + "TwiggyZombie": "Zombi", + "ArmsDealer": "Traficante de armas", + "CataractEye": "Ojo demoníaco", + "SleepyEye": "Ojo demoníaco", + "DialatedEye": "Ojo demoníaco", + "GreenEye": "Ojo demoníaco", + "PurpleEye": "Ojo demoníaco", + "LostGirl": "Niña perdida", + "Nymph": "Ninfa", + "ArmoredViking": "Vikingo acorazado", + "Lihzahrd": "Lihzahrd", + "LihzahrdCrawler": "Lihzahrd", + "DemonEye": "Ojo demoníaco", + "Dryad": "Dríada", + "FemaleZombie": "Zombi", + "HeadacheSkeleton": "Esqueleto", + "MisassembledSkeleton": "Esqueleto", + "PantlessSkeleton": "Esqueleto", + "SpikedJungleSlime": "Slime selvático puntiagudo", + "Moth": "Polilla", + "IcyMerman": "Tritón helado", + "DyeTrader": "Comerciante teñido", + "PartyGirl": "Chica fiestera", + "Cyborg": "Ciborg", + "Skeleton": "Esqueleto", + "Bee": "Abeja", + "BeeSmall": "Abeja", + "PirateDeckhand": "Pirata de cubierta", + "PirateCorsair": "Corsario pirata", + "PirateDeadeye": "Pirata pistolero", + "PirateCrossbower": "Pirata con arco", + "PirateCaptain": "Capitán pirata", + "CochinealBeetle": "Cochinilla", + "CyanBeetle": "Escarabajo turquesa", + "LacBeetle": "Escarabajo laca", + "Guide": "Guía", + "SeaSnail": "Caracol marino", + "Squid": "Calamar", + "QueenBee": "Abeja reina", + "ZombieRaincoat": "Zombi con chubasquero", + "FlyingFish": "Pez volador", + "UmbrellaSlime": "Slime paraguas", + "FlyingSnake": "Serpiente voladora", + "Painter": "Pintor", + "WitchDoctor": "Médico brujo", + "Pirate": "Pirata", + "MeteorHead": "Cabeza meteorito", + "GoldfishWalker": "Pececillo", + "HornetFatty": "Avispón", + "HornetHoney": "Avispón", + "HornetLeafy": "Avispón", + "HornetSpikey": "Avispón", + "HornetStingy": "Avispón", + "JungleCreeper": "Criatura selvática", + "JungleCreeperWall": "Criatura selvática", + "BlackRecluseWall": "Ermitaño negro", + "BloodCrawler": "Trepasangre", + "FireImp": "Diablillo de fuego", + "BloodCrawlerWall": "Trepasangre", + "BloodFeeder": "Tragasangre", + "BloodJelly": "Medusa de sangre", + "IceGolem": "Gólem de hielo", + "RainbowSlime": "Slime arcoíris", + "Golem": "Gólem", + "GolemHead": "Cabeza de gólem", + "GolemFistLeft": "Puño de gólem", + "GolemFistRight": "Puño de gólem", + "GolemHeadFree": "Cabeza de gólem", + "BurningSphere": "Esfera ardiente", + "AngryNimbus": "Nimbo enfadado", + "Eyezor": "Ojozor", + "Parrot": "Loro", + "Reaper": "Muerte", + "ZombieMushroom": "Zombi espora", + "ZombieMushroomHat": "Zombi espora", + "FungoFish": "Pez mohoso", + "AnomuraFungus": "Hongo anomura", + "MushiLadybug": "Mariquita mushi", + "FungiBulb": "Bulbo mohoso", + "GoblinPeon": "Duende peón", + "GiantFungiBulb": "Bulbo mohoso gigantesco", + "FungiSpore": "Esporas de hongo", + "Plantera": "Plantera", + "PlanterasHook": "Garfio de Plantera", + "PlanterasTentacle": "Tentáculo de Plantera", + "Spore": "Esporas de hongo", + "BrainofCthulhu": "Cerebro de Cthulhu", + "Creeper": "Criatura", + "IchorSticker": "Pegatina de icor", + "RustyArmoredBonesAxe": "Huesos viejos acorazados", + "GoblinThief": "Duende ladrón", + "RustyArmoredBonesFlail": "Huesos viejos acorazados", + "RustyArmoredBonesSword": "Huesos viejos acorazados", + "RustyArmoredBonesSwordNoArmor": "Huesos viejos acorazados", + "BlueArmoredBones": "Huesos azules acorazados", + "BlueArmoredBonesMace": "Huesos azules acorazados", + "BlueArmoredBonesNoPants": "Huesos azules acorazados", + "BlueArmoredBonesSword": "Huesos azules acorazados", + "HellArmoredBones": "Huesos infernales acorazados", + "HellArmoredBonesSpikeShield": "Huesos infernales acorazados", + "HellArmoredBonesMace": "Huesos infernales acorazados", + "GoblinWarrior": "Duende guerrero", + "HellArmoredBonesSword": "Huesos infernales acorazados", + "RaggedCaster": "Mago harapiento", + "RaggedCasterOpenCoat": "Mago harapiento", + "Necromancer": "Nigromante", + "NecromancerArmored": "Nigromante", + "DiabolistRed": "Diablista", + "DiabolistWhite": "Diablista", + "BoneLee": "Hueso Lee", + "DungeonSpirit": "Espíritu de la mazmorra", + "GiantCursedSkull": "Calavera maldita gigante", + "GoblinSorcerer": "Duende hechicero", + "Paladin": "Paladín", + "SkeletonSniper": "Esqueleto francotirador", + "TacticalSkeleton": "Esqueleto táctico", + "SkeletonCommando": "Esqueleto comando", + "AngryBonesBig": "Huesitos furiosos", + "AngryBonesBigMuscle": "Huesitos furiosos", + "AngryBonesBigHelmet": "Huesitos furiosos", + "BirdBlue": "Jota azul", + "BirdRed": "Cardenal", + "Squirrel": "Ardilla", + "Zombie": "Zombi", + "ChaosBall": "Bola del caos", + "Mouse": "Ratón", + "Raven": "Cuervo", + "SlimeMasked": "Slime", + "BunnySlimed": "Conejo", + "HoppinJack": "Jack saltarín", + "Scarecrow1": "Espantapájaros", + "Scarecrow2": "Espantapájaros", + "Scarecrow3": "Espantapájaros", + "Scarecrow4": "Espantapájaros", + "Scarecrow5": "Espantapájaros", + "AngryBones": "Huesitos furiosos", + "Scarecrow6": "Espantapájaros", + "Scarecrow7": "Espantapájaros", + "Scarecrow8": "Espantapájaros", + "Scarecrow9": "Espantapájaros", + "Scarecrow10": "Espantapájaros", + "HeadlessHorseman": "Caballero sin cabeza", + "Ghost": "Fantasma", + "DemonEyeOwl": "Ojo demoníaco", + "DemonEyeSpaceship": "Ojo demoníaco", + "ZombieDoctor": "Zombi", + "DarkCaster": "Mago siniestro", + "ZombieSuperman": "Zombi", + "ZombiePixie": "Zombi", + "SkeletonTopHat": "Esqueleto", + "SkeletonAstonaut": "Esqueleto", + "SkeletonAlien": "Esqueleto", + "MourningWood": "Árbol de luto", + "Splinterling": "Astilleante", + "Pumpking": "Rey calabaza", + "PumpkingBlade": "Rey calabaza", + "Hellhound": "Perro infernal", + "WaterSphere": "Esfera de agua", + "Poltergeist": "Poltergeist", + "ZombieXmas": "Zombi", + "ZombieSweater": "Zombi", + "SlimeRibbonWhite": "Slime", + "SlimeRibbonYellow": "Slime", + "SlimeRibbonGreen": "Slime", + "SlimeRibbonRed": "Slime", + "BunnyXmas": "Conejo", + "ZombieElf": "Elfo zombi", + "ZombieElfBeard": "Elfo zombi", + "CursedSkull": "Cráneo maldito", + "ZombieElfGirl": "Elfo zombi", + "PresentMimic": "Regalo mimo", + "GingerbreadMan": "Hombre de jengibre", + "Yeti": "Yeti", + "Everscream": "Gritoeterno", + "IceQueen": "Reina de Hielo", + "SantaNK1": "Papá-NK1", + "ElfCopter": "Elfocóptero", + "Nutcracker": "Cascanueces", + "NutcrackerSpinning": "Cascanueces", + "SkeletronHead": "Esqueletrón", + "ElfArcher": "Arquero elfo", + "Krampus": "Krampus", + "Flocko": "Copito", + "Stylist": "Estilista", + "WebbedStylist": "Estilisa entelarañado", + "Firefly": "Luciérnaga", + "Butterfly": "Mariposa", + "Worm": "Gusano", + "LightningBug": "Insecto rayo", + "Snail": "Caracol", + "SkeletronHand": "Esqueletrón", + "GlowingSnail": "Caracol brillante", + "Frog": "Rana", + "Duck": "Pato", + "Duck2": "Pato", + "DuckWhite": "Pato", + "DuckWhite2": "Pato", + "ScorpionBlack": "Escorpión", + "Scorpion": "Escorpión", + "TravellingMerchant": "Mercader ambulante", + "Angler": "Rape", + "OldMan": "Anciano", + "DukeFishron": "Duque Fishron", + "DetonatingBubble": "Burbuja detonante", + "Sharkron": "Tiburrón", + "Sharkron2": "Tiburrón", + "TruffleWorm": "Gusano de trufa", + "TruffleWormDigger": "Gusano de trufa", + "SleepingAngler": "Rape dormido", + "Grasshopper": "Saltamontes", + "ChatteringTeethBomb": "Bomba castañeante", + "Demolitionist": "Demoledor", + "BrainScrambler": "Destrozacerebros", + "RayGunner": "Artillero de rayos", + "MartianOfficer": "Oficial marciano", + "ForceBubble": "Escudo burbuja", + "GrayGrunt": "Matón gris", + "MartianEngineer": "Ingeniero marciano", + "MartianTurret": "Torreta Tesla", + "MartianDrone": "Drone marciano", + "GigaZapper": "Gigazapper", + "BoneSerpentHead": "Esqueleto de serpiente", + "ScutlixRider": "Artillero scutlix", + "Scutlix": "Scutlix", + "EyeofCthulhu": "Ojo de Cthulhu", + "BoneSerpentBody": "Esqueleto de serpiente", + "BoneSerpentTail": "Esqueleto de serpiente", + "SolarCrawltipedeHead": "Arrastrapiés", + "SolarCrawltipedeBody": "Arrastrapiés", + "SolarCrawltipedeTail": "Arrastrapiés", + "SolarDrakomire": "Drakomira", + "SolarDrakomireRider": "Jinete de drakomira", + "SolarSroller": "Srodante", + "SolarCorite": "Corita", + "SolarSolenian": "Selenio", + "Hornet": "Avispón", + "ManEater": "Devorahombres", + "ArmedZombie": "Zombi", + "ArmedZombiePincussion": "Zombi", + "ArmedZombieSlimed": "Zombi", + "ArmedZombieSwamp": "Zombi", + "ArmedZombieTwiggy": "Zombi", + "ArmedZombieCenx": "Zombi", + "UndeadMiner": "Minero no muerto", + "GoldBird": "Pájaro dorado", + "GoldBunny": "Conejo dorado", + "GoldButterfly": "Mariposa dorada", + "GoldFrog": "Rana dorada", + "GoldGrasshopper": "Saltamontes dorado", + "GoldMouse": "Ratón dorado", + "GoldWorm": "Gusano dorado", + "BoneThrowingSkeleton": "Esqueleto", + "Tim": "Tim", + "BoneThrowingSkeleton2": "Esqueleto", + "BoneThrowingSkeleton3": "Esqueleto", + "BoneThrowingSkeleton4": "Esqueleto", + "Bunny": "Conejo", + "CorruptBunny": "Conejito corrompido", + "Harpy": "Arpía", + "CaveBat": "Murciélago de cueva", + "ServantofCthulhu": "Siervo de Cthulhu", + "KingSlime": "Rey slime", + "JungleBat": "Murciélago de selva", + "DoctorBones": "Doctor Látigo", + "TheGroom": "El novio", + "Clothier": "Buhonero", + "Goldfish": "Pececillo", + "Snatcher": "Atrapadora", + "CorruptGoldfish": "Pececillo corrompido", + "Piranha": "Piraña", + "LavaSlime": "Babosa de lava", + "EaterofSouls": "Devoraalmas", + "Hellbat": "Murciélago infernal", + "Vulture": "Buitre", + "Demon": "Demonio", + "BlueJellyfish": "Medusa azul", + "PinkJellyfish": "Medusa rosa", + "Shark": "Tiburón", + "VoodooDemon": "Demonio vudú", + "Crab": "Cangrejo", + "DungeonGuardian": "Guardián de la mazmorra", + "Antlion": "Hormiga león", + "DevourerHead": "Devorador", + "SpikeBall": "Bola de pinchos", + "DungeonSlime": "Slime de las mazmorras", + "BlazingWheel": "Rueda ardiente", + "GoblinScout": "Duende explorador", + "Bird": "Pájaro", + "Pixie": "Duendecillo", + "ArmoredSkeleton": "Esqueleto con armadura", + "Mummy": "Momia", + "DarkMummy": "Momia de la oscuridad", + "DevourerBody": "Devorador", + "LightMummy": "Momia de la luz", + "CorruptSlime": "Slime corrompido", + "Wraith": "Espectro", + "CursedHammer": "Martillo maldito", + "EnchantedSword": "Espada encantada", + "Mimic": "Cofre falso", + "Unicorn": "Unicornio", + "WyvernHead": "Guiverno", + "WyvernLegs": "Guiverno", + "WyvernBody": "Guiverno", + "DevourerTail": "Devorador", + "WyvernBody2": "Guiverno", + "WyvernBody3": "Guiverno", + "WyvernTail": "Guiverno", + "GiantBat": "Murciélago gigante", + "Corruptor": "Corruptor", + "DiggerHead": "Excavador", + "DiggerBody": "Excavador", + "DiggerTail": "Excavador", + "SeekerHead": "Tragamundos", + "SeekerBody": "Tragamundos", + "AncientCultistSquidhead": "Visión antigua", + "AncientDoom": "Muerte antigua", + "AncientLight": "Luz antigua", + "BigMimicCorruption": "Cofre falso corrupto", + "BigMimicCrimson": "Cofre falso carmesí", + "BigMimicHallow": "Cofre falso sagrado", + "BigMimicJungle": "Cofre falso de la selva", + "BloodZombie": "Zombi sangriento", + "Buggy": "Calesa", + "Butcher": "Carnicero", + "Crawdad": "Padre cangrejo", + "Crawdad2": "Papá cangrejo", + "CreatureFromTheDeep": "Criatura de las Profundidades", + "CrimsonPenguin": "Pingüino violento", + "CultistBoss": "Sectario lunático", + "CultistBossClone": "Sectario lunático", + "CultistDragonBody1": "Dragón fantasma", + "CultistDragonBody2": "Dragón fantasma", + "CultistDragonBody3": "Dragón fantasma", + "CultistDragonBody4": "Dragón fantasma", + "CultistDragonHead": "Dragón fantasma", + "CultistDragonTail": "Dragón fantasma", + "CultistTablet": "Tablilla misteriosa", + "DD2AttackerTest": "¿¿¿???", + "DD2GoblinT3": "{$NPCName.DD2GoblinT1}", + "DD2GoblinBomberT3": "{$NPCName.DD2GoblinBomberT1}", + "DD2JavelinstT2": "{$NPCName.DD2JavelinstT1}", + "DD2JavelinstT3": "{$NPCName.DD2JavelinstT1}", + "DD2LanePortal": "Postal misterioso", + "DD2GoblinT2": "{$NPCName.DD2GoblinT1}", + "DeadlySphere": "Esfera letal", + "DemonTaxCollector": "Alma torturada", + "DesertBeast": "Basilisco", + "DesertDjinn": "Espíritu del desierto", + "DesertGhoul": "Ghul", + "DesertGhoulCorruption": "Ghul vil", + "DesertGhoulCrimson": "Ghul contaminado", + "DesertGhoulHallow": "Ghul soñador", + "DesertLamiaDark": "Lamia", + "DesertLamiaLight": "Lamia", + "DesertScorpionWalk": "Cazador de las arenas", + "DesertScorpionWall": "Cazador de las arenas", + "Drippler": "Goteador", + "DrManFly": "Dr. Moscahombre", + "DuneSplicerBody": "Atraviesadunas", + "DuneSplicerHead": "Atraviesadunas", + "DuneSplicerTail": "Atraviesadunas", + "EnchantedNightcrawler": "Rondador encantado", + "GiantFlyingAntlion": "Enjambre de hormigas león", + "Fritz": "Fritz", + "GiantShelly": "Conchito gigante", + "GiantShelly2": "Conchito gigante", + "GoblinSummoner": "Duende invocador", + "GraniteFlyer": "Granito elemental", + "GraniteGolem": "Gólem de granito", + "GreekSkeleton": "Hoplita", + "Grubby": "Mugriento", + "LunarTowerNebula": "Columna de nebulosa", + "LunarTowerSolar": "Columna solar", + "LunarTowerStardust": "Columna de polvo estelar", + "LunarTowerVortex": "Columan de vórtice", + "MartianProbe": "Sonda marciana", + "MartianSaucer": "Platillo marciano", + "MartianSaucerCannon": "Cañón de platillo marciano", + "MartianSaucerCore": "Platillo marciano", + "MartianSaucerTurret": "Torreta de platillo marciano", + "MartianWalker": "Caminante marciano", + "Medusa": "Medusa", + "MoonLordCore": "Núcleo del Señor de la Luna", + "MoonLordHand": "Mano del Señor de la Luna", + "MoonLordHead": "Señor de la Luna", + "Mothron": "Polillón", + "MothronEgg": "Huevo de polillón", + "MothronSpawn": "Polillón bebé", + "Nailhead": "Cabezaclavo", + "NebulaBeast": "Bestia evolutiva", + "NebulaBrain": "Flotante de nebulosa", + "NebulaHeadcrab": "Lactacerebros", + "NebulaSoldier": "Predictor", + "PartyBunny": "Conejo", + "Psycho": "Psicópata", + "Salamander": "Salamandra", + "Salamander2": "Salamandra", + "Salamander3": "Salamandra", + "Salamander4": "Salamandra", + "Salamander5": "Salamandra", + "Salamander6": "Salamandra", + "Salamander7": "Salamandra", + "Salamander8": "Salamandra", + "Salamander9": "Salamandra", + "SandElemental": "Elemental de arena", + "SandShark": "Tiburón de arena", + "SandsharkCorrupt": "Muerdehuesos", + "SandsharkCrimson": "Segador de carne", + "SandsharkHallow": "Trilladora de cristal", + "SandSlime": "Slime de arena", + "SlimeSpiked": "Slime puntiagudo", + "Sluggy": "Baboso", + "SolarFlare": "Bengala solar", + "SolarGoop": "Fragmento solar", + "SolarSpearman": "Drakaniano", + "SquirrelGold": "Ardilla dorada", + "SquirrelRed": "Ardilla roja", + "StardustCellBig": "Célula estelar", + "StardustCellSmall": "Célula estelar", + "StardustJellyfishBig": "Invasor del ritmo", + "StardustSoldier": "Observaestrellas", + "StardustSpiderBig": "Lanzacentelleos", + "StardustSpiderSmall": "Centelleo", + "StardustWormHead": "Tejedor de la vía láctea", + "TargetDummy": "Muñeco de pruebas", + "TaxCollector": "Recaudador de impuestos", + "TheBride": "La Novia", + "ThePossessed": "El Poseído", + "TombCrawlerBody": "Trepatumbas", + "TombCrawlerHead": "Trepatumbas", + "TombCrawlerTail": "Trepatumbas", + "Tumbleweed": "Volteador enfadado", + "VortexHornet": "Avispa alienígena", + "VortexHornetQueen": "Reina alienígena", + "VortexLarva": "Larva alienígena", + "VortexRifleman": "Navegatormentas", + "VortexSoldier": "Vorticiano", + "GiantWalkingAntlion": "Cargador de hormigas león", + "DD2GoblinBomberT2": "{$NPCName.DD2GoblinBomberT1}", + "DD2WyvernT3": "{$NPCName.DD2WyvernT1}", + "DD2WyvernT2": "{$NPCName.DD2WyvernT1}", + "DD2OgreT3": "{$NPCName.DD2OgreT2}", + "DD2WitherBeastT3": "{$NPCName.DD2WitherBeastT2}", + "DD2SkeletonT3": "{$NPCName.DD2SkeletonT1}", + "DD2KoboldWalkerT3": "{$NPCName.DD2KoboldWalkerT2}", + "DD2DrakinT3": "{$NPCName.DD2DrakinT2}", + "DD2DarkMageT3": "{$NPCName.DD2DarkMageT1}", + "DD2KoboldFlyerT3": "{$NPCName.DD2KoboldFlyerT2}", + "BabySlime": "Slime bebé", + "BigRainZombie": "Zombi", + "BlackSlime": "Slime negro", + "DD2Bartender": "Tabernero", + "DD2Betsy": "Betsy", + "DD2DarkMageT1": "Mago negro", + "DD2DrakinT2": "Drakin", + "DD2EterniaCrystal": "Cristal eternia", + "DD2GoblinBomberT1": "Duende etéreo bombardero", + "DD2GoblinT1": "Duende etéreo", + "DD2JavelinstT1": "Lanzajabalinas etéreo", + "DD2KoboldFlyerT2": "Planeador kobold", + "DD2KoboldWalkerT2": "Kobold", + "DD2LightningBugT3": "Insecto rayo etéreo", + "DD2OgreT2": "Ogro", + "DD2SkeletonT1": "Esqueleto del Antiguo", + "DD2WitherBeastT2": "Bestia marchita", + "DD2WyvernT1": "Guiverno etéreo", + "GreenSlime": "Slime verde", + "JungleSlime": "Slime selvático", + "Pinky": "Slime rosa", + "PurpleSlime": "Slime morado", + "RedSlime": "Slime rojo", + "Slimeling": "Slimeling", + "Slimer2": "Slimer", + "SmallRainZombie": "Zombi", + "YellowSlime": "Slime amarillo", + "MoonLordFreeEye": "Auténtico ojo de Cthulhu", + "MoonLordLeechBlob": "Coágulo de sanguijuela lunar", + "SkeletonMerchant": "Mercader esquelético", + "PirateShip": "Holandés volador", + "PirateShipCannon": "Cañón holandés", + "BartenderUnconscious": "Hombre inconsciente" + } +} \ No newline at end of file diff --git a/Localization/Content/es-ES/Projectiles.json b/Localization/Content/es-ES/Projectiles.json new file mode 100644 index 0000000..38a16a1 --- /dev/null +++ b/Localization/Content/es-ES/Projectiles.json @@ -0,0 +1,722 @@ +{ + "ProjectileName": { + "AdamantiteChainsaw": "Motosierra de adamantita", + "AdamantiteDrill": "Taladro de adamantita", + "AdamantiteGlaive": "Guja de adamantita", + "Amarok": "Yoyó", + "AmberBolt": "Rayo de ámbar", + "AmethystBolt": "Rayo amatista", + "Anchor": "Ancla", + "AncientDoomProjectile": "Fin de la profecía", + "AntiGravityHook": "Gancho antigravitatorio", + "Arkhalis": "Arkhalis", + "AshBallFalling": "Bola de ceniza", + "BabyDino": "Dinosaurio bebé", + "BabyEater": "Comealmas bebé", + "BabyFaceMonster": "Caramonstruo bebé", + "BabyGrinch": "Grinch bebé", + "BabyHornet": "Avispón bebé", + "BabySkeletronHead": "Cabeza de esqueletrón bebé", + "BabySlime": "Slime bebé", + "BabySnowman": "Muñeco de nieve bebé", + "BabySpider": "Araña bebé", + "BallofFire": "Bola de fuego", + "BallofFrost": "Bola de hielo", + "BallOHurt": "Flagelo con bola", + "Bananarang": "Bumerán plátano", + "Bat": "Murciélago", + "BatHook": "Gancho de murciélago", + "BeachBall": "Balón de playa", + "Bee": "Abeja", + "BeeArrow": "Flecha de abejas", + "BeeHive": "Colmena de abejas", + "Beenade": "Granabeja", + "BlackBolt": "Desintegrador de ónice", + "BlackCat": "Gato negro", + "BlackCounterweight": "Contrapeso", + "Blizzard": "Ventisca", + "BloodCloudMoving": "Nube de sangre", + "BloodCloudRaining": "Nube de sangre", + "BloodRain": "Lluvia de sangre", + "BloodWater": "Agua sangrienta", + "BloodyMachete": "Machete sangriento", + "BlowupSmoke": "Humo de explosión", + "BlowupSmokeMoonlord": "Humo de explosión", + "BlueCounterweight": "Contrapeso", + "BlueFairy": "Hada azul", + "BlueFlare": "Bengala azul", + "BlueMoon": "Luna azul", + "BobberFiberglass": "Corcho de pesca", + "BobberFisherOfSouls": "Corcho de pesca", + "BobberFleshcatcher": "Corcho de pesca", + "BobberGolden": "Corcho de pesca", + "BobberHotline": "Corcho de pesca", + "BobberMechanics": "Corcho de pesca", + "BobberReinforced": "Corcho de pesca", + "BobbersittingDuck": "Corcho de pesca", + "BobberWooden": "Corcho de pesca", + "Bomb": "Bomba", + "BombFish": "Pez bomba", + "BombSkeletronPrime": "Bomba", + "Bone": "Hueso", + "BoneArrow": "Flecha de hueso", + "BoneArrowFromMerchant": "Flecha de hueso", + "BoneDagger": "Daga de hueso", + "BoneGloveProj": "Hueso X", + "BoneJavelin": "Jabalina de hueso", + "Boulder": "Roca", + "BoulderStaffOfEarth": "Roca", + "BouncyBomb": "Bomba saltarina", + "BouncyDynamite": "Dinamita saltarina", + "BouncyGlowstick": "Palo brillante saltarín", + "BouncyGrenade": "Granada saltarina", + "BoxingGlove": "Guante de boxeo", + "BrainOfConfusion": "Cerebro de confusión", + "BrainScramblerBolt": "Proyectil destrozacerebros", + "Bubble": "Burbuja", + "Bullet": "Bala", + "BulletDeadeye": "Bala", + "BulletHighVelocity": "Bala", + "BulletSnowman": "Bala", + "Bunny": "Conejo", + "ButchersChainsaw": "Motosierra de carnicero", + "CandyCaneHook": "Gancho de bastón de caramelo", + "CandyCorn": "Maíz de caramelo", + "CannonballFriendly": "Bala de cañón", + "CannonballHostile": "Bala de cañón", + "Cascade": "Yoyó", + "ChainGuillotine": "Guillotina encadenada", + "ChainKnife": "Motocuchillo", + "ChargedBlasterCannon": "Cañón desintegrador cargado", + "ChargedBlasterLaser": "Láser desintegrador cargado", + "ChargedBlasterOrb": "Orbe desintegrador cargado", + "Chik": "Yoyó", + "ChlorophyteArrow": "Flecha de clorofita", + "ChlorophyteBullet": "Bala", + "ChlorophyteChainsaw": "Motosierra de clorofita", + "ChlorophyteDrill": "Taladro de clorofita", + "ChlorophyteJackhammer": "Martillo neumático de clorofita", + "ChlorophyteOrb": "Orbe de clorofita", + "ChlorophytePartisan": "Partisana de clorofita", + "ChristmasHook": "Gancho navideño", + "ClingerStaff": "Llamas malditas", + "ClothiersCurse": "Calavera", + "CobaltChainsaw": "Motosierra de cobalto", + "CobaltDrill": "Taladro de cobalto", + "CobaltNaginata": "Naginata de cobalto", + "Code1": "Yoyó", + "Code2": "Yoyó", + "CoinPortal": "Portal de moneda", + "CompanionCube": "Cubo de compañía", + "ConfettiGun": "Confeti", + "ConfettiMelee": "Confeti", + "CopperCoin": "Moneda de cobre", + "CopperCoinsFalling": "Monedas de cobre", + "CorruptSpray": "Aerosol corrupto", + "CorruptYoyo": "Yoyó", + "CrimsandBallFalling": "Bala de arena carmesí", + "CrimsandBallGun": "Bala de arena carmesí", + "CrimsonHeart": "Corazón carmesí", + "CrimsonSpray": "Aerosol carmesí", + "CrimsonYoyo": "Yoyó", + "CrossGraveMarker": "Lápida", + "CrystalBullet": "Bala de cristal", + "CrystalDart": "Dardo de cristal", + "CrystalLeaf": "Hoja de cristal", + "CrystalLeafShot": "Hoja de cristal", + "CrystalPulse": "Carga de cristal", + "CrystalPulse2": "Carga de cristal", + "CrystalShard": "Fragmento de cristal", + "CrystalStorm": "Tormenta de cristal", + "CrystalVileShardHead": "Fragmento vil de cristal", + "CrystalVileShardShaft": "Fragmento vil de cristal", + "Cthulunado": "Tornado de Cthulhus", + "CultistBossFireBall": "Bola de fuego", + "CultistBossFireBallClone": "Bola de fuego sombría", + "CultistBossIceMist": "Niebla de hielo", + "CultistBossLightningOrb": "Orbe de rayo", + "CultistBossLightningOrbArc": "Arco de robe de rayo", + "CultistBossParticle": "Energía", + "CultistRitual": "Ritual de rayo", + "CursedArrow": "Flecha maldita", + "CursedBullet": "Bala maldita", + "CursedDart": "Dardo maldito", + "CursedDartFlame": "Llama maldita", + "CursedFlameFriendly": "Llama maldita", + "CursedFlameHostile": "Llama maldita", + "CursedSapling": "Retoño maldito", + "DangerousSpider": "Araña peligrosa", + "DarkLance": "Lanza de la oscuridad", + "Daybreak": "Amanecer", + "DD2FlameBurstTowerT1": "Torre lanzallamas", + "DD2FlameBurstTowerT1Shot": "Torre lanzallamas", + "DD2FlameBurstTowerT2": "Torre lanzallamas", + "DD2FlameBurstTowerT2Shot": "Torre lanzallamas", + "DD2FlameBurstTowerT3": "Torre lanzallamas", + "DD2FlameBurstTowerT3Shot": "Torre lanzallamas", + "DD2JavelinHostile": "Jabalina", + "DeadlySphere": "Esfera letal", + "DeathLaser": "Láser de la muerte", + "DeathSickle": "Hoz mortífera", + "DemonScythe": "Guadaña demoníaca", + "DemonSickle": "Hoz demoníaca", + "DesertDjinnCurse": "Maldición del espíritu del desierto", + "DiamondBolt": "Rayo de diamante", + "DirtBall": "Bola de porquería", + "DrillMountCrosshair": "Mira de taladro", + "DrManFlyFlask": "Vial", + "DryadsWardCircle": "Defensa de dríada", + "DualHookBlue": "Gancho", + "DualHookRed": "Gancho", + "Dynamite": "Dinamita", + "EatersBite": "Mordisco del comedor", + "EbonsandBallFalling": "Bola de arena de ébano", + "EbonsandBallGun": "Bola de arena de ébano", + "EighthNote": "Nota", + "Electrosphere": "Electroesfera", + "ElectrosphereMissile": "Misil de electroesfera", + "EmeraldBolt": "Proyectil esmeralda", + "EnchantedBeam": "Rayo encantado", + "EnchantedBoomerang": "Bumerán encantado", + "ExplosiveBullet": "Bala explosiva", + "ExplosiveBunny": "Conejo explosivo", + "Explosives": "Explosivos", + "EyeBeam": "Rayo ocular", + "EyeFire": "Fuego ocular", + "EyeLaser": "Láser ocular", + "EyeSpring": "Brote ocular", + "FallingStar": "Estrella fugaz", + "FireArrow": "Flecha de fuego", + "Fireball": "Bola de fuego", + "FireworkFountainBlue": "Fuente de fuegos artificiales", + "FireworkFountainRainbow": "Fuente de fuegos artificiales", + "FireworkFountainRed": "Fuente de fuegos artificiales", + "FireworkFountainYellow": "Fuente de fuegos artificiales", + "FishHook": "Anzuelo", + "Flairon": "Flairon", + "FlaironBubble": "Burbuja de Flairon", + "Flamarang": "Bumerán en llamas", + "Flamelash": "Látigo de llamas", + "Flames": "Llamas", + "FlamesTrap": "Llamas", + "FlamethrowerTrap": "Lanzallamas", + "FlamingArrow": "Flecha ardiente", + "FlamingJack": "Jack llameante", + "FlamingScythe": "Guadaña ardiente", + "FlamingWood": "Madera ardiente", + "Flare": "Bengala", + "FlowerPetal": "Pétalo de flor", + "FlowerPow": "Florecillas", + "FlowerPowPetal": "Florecillas", + "FlyingImp": "Diablillo volador", + "FlyingKnife": "Cuchillo volador", + "FlyingPiggyBank": "Hucha voladora", + "FormatC": "Yoyó", + "FoulPotion": "Poción de la locura", + "FrostArrow": "Flecha de hielo", + "FrostBeam": "Rayo de hielo", + "FrostBlastFriendly": "Explosión helada", + "FrostBlastHostile": "Explosión helada", + "FrostBoltStaff": "Rayo de escarcha", + "FrostBoltSword": "Rayo de escarcha", + "FrostburnArrow": "Flecha de quemadura gélida", + "FrostDaggerfish": "Pez daga de escarcha", + "FrostHydra": "Hidra helada", + "FrostShard": "Esquirla gélida", + "FrostWave": "Ola de frío", + "FruitcakeChakram": "Chakram de tarta de frutas", + "GemHookAmethyst": "Garfio gema", + "GemHookDiamond": "Garfio gema", + "GemHookEmerald": "Garfio gema", + "GemHookRuby": "Garfio gema", + "GemHookSapphire": "Garfio gema", + "GemHookTopaz": "Garfio gema", + "GeyserTrap": "Géiser", + "GiantBee": "Abeja", + "GigaZapperSpear": "Punta de lanza de gigazapper", + "Glowstick": "Varita luminosa", + "GoldCoin": "Moneda de oro", + "GoldCoinsFalling": "Monedas de oro", + "GoldenBullet": "Bala de oro", + "GoldenShowerFriendly": "Ducha dorada", + "GoldenShowerHostile": "Ducha dorada", + "GolemFist": "Puño de gólem", + "Gradient": "Yoyó", + "GraveMarker": "Lápida", + "Gravestone": "Lápida", + "GreekFire1": "Fuego griego", + "GreekFire2": "Fuego griego", + "GreekFire3": "Fuego griego", + "GreenCounterweight": "Contrapeso", + "GreenFairy": "Hada rosa", + "GreenLaser": "Láser verde", + "Grenade": "Granada", + "GrenadeI": "Granada", + "GrenadeII": "Granada", + "GrenadeIII": "Granada", + "GrenadeIV": "Granada", + "Gungnir": "Gungnir", + "HallowSpray": "Aerosol sagrado", + "HallowStar": "Estrella sagrada", + "Hamdrax": "Martitaladrahacha", + "HappyBomb": "Bomba feliz", + "Harpoon": "Arpón", + "HarpyFeather": "Pluma de arpía", + "Headstone": "Lápida", + "HeatRay": "Rayo calorífico", + "HelFire": "Yoyó", + "HellfireArrow": "Flecha de fuego infernal", + "Hellwing": "Ala infernal", + "HolyArrow": "Flecha sagrada", + "HolyWater": "Agua sagrada", + "Hook": "Gancho", + "Hornet": "Avispón", + "HornetStinger": "Aguijón de avispón", + "IceBlock": "Bloque de hielo", + "IceBolt": "Rayo de hielo", + "IceBoomerang": "Bumerán de hielo", + "IceSickle": "Hoz de hielo", + "IceSpike": "Púa de hielo", + "IcewaterSpit": "Espetón de agua helada", + "IchorArrow": "Flecha de icor", + "IchorBullet": "Bala de icor", + "IchorDart": "Dardo de icor", + "IchorSplash": "Salpicadura de icor", + "IlluminantHook": "Gancho", + "ImpFireball": "Bola de fuego de diablillo", + "InfernoFriendlyBlast": "Infierno", + "InfernoFriendlyBolt": "Infierno", + "InfernoHostileBlast": "Infierno", + "InfernoHostileBolt": "Infierno", + "InfluxWaver": "Generadora de flujos", + "IvyWhip": "Látigo de hiedra", + "JackOLantern": "Linterna calabaza", + "JavelinFriendly": "Jabalina", + "JavelinHostile": "Jabalina", + "JestersArrow": "Flecha de bufón", + "JumperSpider": "Araña saltarina", + "JungleSpike": "Espina de la jungla", + "JungleYoyo": "Yoyó", + "Kraken": "Yoyó", + "Landmine": "Mina antipersonal", + "LaserDrill": "Taladro láser", + "LaserMachinegun": "Metralleta láser", + "LaserMachinegunLaser": "Láser", + "LastPrism": "Último prisma", + "LastPrismLaser": "Último prisma", + "Leaf": "Hoja", + "LightBeam": "Rayo de luz", + "LightDisc": "Disco de luz", + "LostSoulFriendly": "Alma perdida", + "LostSoulHostile": "Alma perdida", + "LovePotion": "Poción del amor", + "LunarFlare": "Bengala lunar", + "LunarHookNebula": "Gancho lunar", + "LunarHookSolar": "Gancho lunar", + "LunarHookStardust": "Gancho lunar", + "LunarHookVortex": "Gancho lunar", + "MagicDagger": "Daga mágica", + "MagicLantern": "Linterna mágica", + "MagicMissile": "Proyectil mágico", + "MagnetSphereBall": "Esfera magnética", + "MagnetSphereBolt": "Esfera magnética", + "MartianTurretBolt": "Rayo eléctrico", + "MartianWalkerLaser": "Rayo láser", + "MechanicalPiranha": "Piraña mecánica", + "MechanicWrench": "Llave inglesa de mecánico", + "MedusaHead": "Rayo de medusa", + "MedusaHeadRay": "Rayo de medusa", + "Meowmere": "Filomiau", + "Meteor1": "Meteorito", + "Meteor2": "Meteorito", + "Meteor3": "Meteorito", + "MeteorShot": "Proyectil de meteorito", + "MinecartMechLaser": "Láser de vagoneta", + "MiniMinotaur": "Pequeño minotauro", + "MiniRetinaLaser": "Láser de minirretina", + "MiniSharkron": "Pequeño tiburrón", + "Missile": "Misil", + "MolotovCocktail": "Cóctel molotov", + "MolotovFire": "Fuego de molotov", + "MolotovFire2": "Fuego de molotov", + "MolotovFire3": "Fuego de molotov", + "MoonLeech": "Sanguijuela lunar", + "MoonlordArrow": "Flecha de luminita", + "MoonlordArrowTrail": "Flecha de luminita", + "MoonlordBullet": "Bala de luminita", + "MoonlordTurret": "Portal lunar", + "MoonlordTurretLaser": "Láser del portal lunar", + "MudBall": "Bola de barro", + "Mushroom": "Champiñón", + "MushroomSpear": "Lanza de champiñón", + "MushroomSpray": "Aerosol champiñón", + "MythrilChainsaw": "Motosierra de mithril", + "MythrilDrill": "Taladro de mithril", + "MythrilHalberd": "Alabarda de mithril", + "Nail": "Clavo", + "NailFriendly": "Clavo", + "NanoBullet": "Nanobala", + "NebulaArcanum": "Arcanum de nebulosa", + "NebulaArcanumExplosionShot": "Arcanum de nebulosa", + "NebulaArcanumExplosionShotShard": "Arcanum de nebulosa", + "NebulaArcanumSubshot": "Arcanum de nebulosa", + "NebulaBlaze1": "Llama de nebulosa", + "NebulaBlaze2": "Llama de nebulosa ex", + "NebulaBolt": "Perforador de nebulosa", + "NebulaChainsaw": "Motosierra de nebulosa", + "NebulaDrill": "Taladro de nebulosa", + "NebulaEye": "Ojo de nebulosa", + "NebulaLaser": "Láser de nebulosa", + "NebulaSphere": "Espera de nebulosa", + "NettleBurstEnd": "Relámpago de ortigas", + "NettleBurstLeft": "Relámpago de ortigas", + "NettleBurstRight": "Relámpago de ortigas", + "NightBeam": "Rayo nocturno", + "None": "", + "NorthPoleSnowflake": "Polo Norte", + "NorthPoleSpear": "Polo Norte", + "NorthPoleWeapon": "Polo Norte", + "NurseSyringeHeal": "Jeringa", + "NurseSyringeHurt": "Jeringa", + "Obelisk": "Lápida", + "ObsidianSwordfish": "Pez espada de obsidiana", + "OneEyedPirate": "Pirata tuerto", + "OrichalcumChainsaw": "Motosierra de oricalco", + "OrichalcumDrill": "Taladro de oricalco", + "OrichalcumHalberd": "Alabarda de oricalco", + "OrnamentFriendly": "Adorno", + "OrnamentHostile": "Adorno", + "OrnamentHostileShrapnel": "Adorno", + "PainterPaintball": "Paintball", + "PaladinsHammerFriendly": "Martillo del paladín", + "PaladinsHammerHostile": "Martillo del paladín", + "PalladiumChainsaw": "Motosierra de paladio", + "PalladiumDrill": "Taladro de paladio", + "PalladiumPike": "Pica de paladio", + "Parrot": "Loro", + "PartyBullet": "Bala fiestera", + "PartyGirlGrenade": "Granada de confeti", + "PearlSandBallFalling": "Bola de arena de perla", + "PearlSandBallGun": "Bola de arena de perla", + "Penguin": "Pingüino", + "PetLizard": "Lagarto mascota", + "Phantasm": "Fantasma", + "PhantasmalBolt": "Rayo fantasmal", + "PhantasmalDeathray": "Rayo mortal fantasmal", + "PhantasmalEye": "Ojo fantasmal", + "PhantasmalSphere": "Esfera fantasmal", + "PhantasmArrow": "Fantasma", + "PhasicWarpDisc": "", + "PhasicWarpEjector": "", + "PineNeedleFriendly": "Aguja de pino", + "PineNeedleHostile": "Aguja de pino", + "PinkFairy": "Hada rosa", + "PinkLaser": "Láser rosa", + "PirateCaptain": "Capitán pirata", + "PlatinumCoin": "Moneda de platino", + "PlatinumCoinsFalling": "Monedas de platino", + "PoisonDart": "Dardo venenoso", + "PoisonDartBlowgun": "Dardo venenoso", + "PoisonDartTrap": "Dardo venenoso", + "PoisonedKnife": "Cuchillo envenenado", + "PoisonFang": "Colmillo venenoso", + "PoisonSeedPlantera": "Semilla venenosa", + "PortalGun": "Arma de portales", + "PortalGunBolt": "Rayo de portales", + "PortalGunGate": "Puerta de portales", + "PossessedHatchet": "Hacha de mano poseída", + "Present": "Regalo", + "ProximityMineI": "Mina de proximidad", + "ProximityMineII": "Mina de proximidad", + "ProximityMineIII": "Mina de proximidad", + "ProximityMineIV": "Mina de proximidad", + "PulseBolt": "Rayo de pulsos", + "Puppy": "Cachorrito", + "PureSpray": "Aerosol puro", + "PurificationPowder": "Polvo de purificación", + "PurpleCounterweight": "Contrapeso", + "PurpleLaser": "Láser morado", + "Pygmy": "Pigmeo", + "Pygmy2": "Pigmeo", + "Pygmy3": "Pigmeo", + "Pygmy4": "Pigmeo", + "PygmySpear": "Pigmeo", + "QuarterNote": "Nota", + "RainbowBack": "Arcoíris", + "RainbowCrystal": "Cristal de arcoíris", + "RainbowCrystalExplosion": "Explosión de arcoíris", + "RainbowFront": "Arcoíris", + "RainbowRodBullet": "Arcoíris", + "RainCloudMoving": "Nube de lluvia", + "RainCloudRaining": "Nube de lluvia", + "RainFriendly": "Lluvia", + "RainNimbus": "Lluvia", + "Rally": "Yoyó", + "Raven": "Cuervo", + "RayGunnerLaser": "Rayo láser", + "RedCounterweight": "Contrapeso", + "RedsYoyo": "Yoyó", + "Retanimini": "Retanimini", + "RichGravestone1": "Lápida", + "RichGravestone2": "Lápida", + "RichGravestone3": "Lápida", + "RichGravestone4": "Lápida", + "RichGravestone5": "Lápida", + "RocketFireworkBlue": "Cohete", + "RocketFireworkGreen": "Cohete", + "RocketFireworkRed": "Cohete", + "RocketFireworksBoxBlue": "Cohete", + "RocketFireworksBoxGreen": "Cohete", + "RocketFireworksBoxRed": "Cohete", + "RocketFireworksBoxYellow": "Cohete", + "RocketFireworkYellow": "Cohete", + "RocketI": "Cohete", + "RocketII": "Cohete", + "RocketIII": "Cohete", + "RocketIV": "Cohete", + "RocketSkeleton": "Cohete", + "RocketSnowmanI": "Cohete", + "RocketSnowmanII": "Cohete", + "RocketSnowmanIII": "Cohete", + "RocketSnowmanIV": "Cohete", + "RopeCoil": "Rollo de cuerda", + "RottenEgg": "Huevo podrido", + "RubyBolt": "Rayo rubí", + "RuneBlast": "Explosión rúnica", + "SalamanderSpit": "Escupitajo venenoso", + "SandBallFalling": "Bola de arena", + "SandBallGun": "Bola de arena", + "SandnadoFriendly": "Tormenta antigua", + "SandnadoHostile": "Tormenta antigua", + "SandnadoHostileMark": "Tormenta antigua", + "SantaBombs": "Adorno navideño", + "Sapling": "Retoño", + "SapphireBolt": "Rayo zafiro", + "SaucerDeathray": "Rayo mortal marciano", + "SaucerLaser": "Láser de platillo", + "SaucerMissile": "Cohete marciano", + "SaucerScrap": "Chatarra de platillo", + "SawtoothShark": "Tiburón dientes de sierra", + "ScutlixLaser": "Láser", + "ScutlixLaserCrosshair": "Mira de scutlix", + "ScutlixLaserFriendly": "Láser de scutlix", + "Seed": "Semilla", + "SeedlerNut": "Semillera", + "SeedlerThorn": "Semillera", + "SeedPlantera": "Semilla", + "ShadowBeamFriendly": "Rayo de sombra", + "ShadowBeamHostile": "Rayo de sombra", + "ShadowFlame": "Llama oscura", + "ShadowFlameArrow": "Flecha de Llamas oscuras", + "ShadowFlameKnife": "Cuchillo de Llamas oscuras", + "Shadowflames": "Llamas oscuras", + "ShadowOrb": "Orbe sombrío", + "Sharknado": "Tornado de tiburones", + "SharknadoBolt": "Rayo de tornado de tiburones", + "Shuriken": "Estrellas ninja", + "SilkRopeCoil": "Rollo de cuerda", + "SiltBall": "Bola de limo", + "SilverCoin": "Moneda de plata", + "SilverCoinsFalling": "Monedas de plata", + "SkeletonBone": "Hueso", + "SkeletronHand": "Mano de esqueletrón", + "Skull": "Calavera", + "SkyFracture": "Fractura celestial", + "SlimeGun": "Arma slime", + "SlimeHook": "Gancho de slime", + "SlushBall": "Bola de aguanieve", + "SmokeBomb": "Bomba de humo", + "SniperBullet": "Bala de francotirador", + "SnowBallFriendly": "Bola de nieve", + "SnowBallHostile": "Bola de nieve", + "SolarCounter": "Fulgor solar", + "SolarFlareChainsaw": "Motosierra de bengala solar", + "SolarFlareDrill": "Taladro de bengala solar", + "SolarFlareRay": "Bengala solar", + "SolarWhipSword": "Erupción solar", + "SolarWhipSwordExplosion": "Erupción solar", + "SoulDrain": "Absorción de alma", + "SoulscourgePirate": "Pirata Azote del Alma", + "Spark": "Chispa", + "Spazmamini": "Spazmamini", + "Spear": "Lanza", + "SpearTrap": "Lanza", + "SpectreWrath": "Espectro fantasmal", + "SpelunkerGlowstick": "Varita luminosa espeleólogo", + "Spider": "Araña", + "SpiderEgg": "Huevo de araña", + "SpiderHiver": "Torreta de araña", + "Spike": "Púa", + "SpikedSlimeSpike": "Púa de slime", + "SpikyBall": "Bola con pinchos", + "SpikyBallTrap": "Bola con pinchos", + "SpiritFlame": "Llama espiritual", + "SpiritHeal": "Curación espiritual", + "SporeCloud": "Nube de esporas", + "SporeGas": "Esporas de hongo", + "SporeGas2": "Esporas de hongo", + "SporeGas3": "Esporas de hongo", + "SporeTrap": "Esporas de hongo", + "SporeTrap2": "Esporas de hongo", + "Squashling": "Calabacín", + "Stake": "Estaca", + "StarAnise": "Anís estrellado", + "StardustCellMinion": "Célula de polvo estelar", + "StardustCellMinionShot": "Célula de polvo estelar", + "StardustChainsaw": "Motosierra de polvo estelar", + "StardustDragon1": "Dragón de polvo estelar", + "StardustDragon2": "Dragón de polvo estelar", + "StardustDragon3": "Dragón de polvo estelar", + "StardustDragon4": "Dragón de polvo estelar", + "StardustDrill": "Taladro de polvo estelar", + "StardustGuardian": "Guardián de polvo estelar", + "StardustGuardianExplosion": "Explosión estelar", + "StardustJellyfishSmall": "Invasor del ritmo", + "StardustSoldierLaser": "Láser de polvo estelar", + "StardustTowerMark": "Marca estelar", + "Starfury": "Furia de estrellas", + "StarWrath": "Espectro estelar", + "StaticHook": "Gancho estático", + "StickyBomb": "Bomba lapa", + "StickyDynamite": "Dinamita adhesiva", + "StickyGlowstick": "Varita luminosa adhesiva", + "StickyGrenade": "Granada adhesiva", + "Stinger": "Aguijón", + "Stynger": "Stynger", + "StyngerShrapnel": "Stynger", + "Sunfury": "Furia solar", + "SuspiciousTentacle": "Tentáculo de aspecto sospechoso", + "SwordBeam": "Espada encantada", + "Swordfish": "Pez espada", + "Tempest": "Tempestad", + "TendonHook": "Gancho", + "TerraBeam": "Rayo terrestre", + "Terrarian": "Terrariano", + "TerrarianBeam": "Terrariano", + "TheDaoofPow": "Flagelo Taoísta", + "TheEyeOfCthulhu": "Yoyó", + "TheMeatball": "La albóndiga", + "TheRottedFork": "El tenedor podrido", + "ThornBall": "Bola de espinas", + "ThornChakram": "Chakram de espinas", + "ThornHook": "Gancho", + "ThrowingKnife": "Cuchillo arrojadizo", + "TiedEighthNote": "Nota", + "TikiSpirit": "Espíritu tiki", + "TinyEater": "Pequeño devorador", + "TitaniumChainsaw": "Motosierra de titanio", + "TitaniumDrill": "Taladro de titanio", + "TitaniumTrident": "Tridente de titanio", + "Tombstone": "Lápida", + "TopazBolt": "Rayo de topacio", + "TowerDamageBolt": "Energía liberada", + "ToxicBubble": "Burbuja tóxica", + "ToxicCloud": "Nube tóxica", + "ToxicCloud2": "Nube tóxica", + "ToxicCloud3": "Nube tóxica", + "ToxicFlask": "Vial tóxico", + "TrackHook": "Garfio seguidor", + "Trident": "Tridente", + "Truffle": "Trufa", + "TruffleSpore": "Espora de trufas", + "Turtle": "Tortuga", + "Twinkle": "Centelleo", + "Typhoon": "Tifón", + "UFOLaser": "Rayo de OVNI", + "UFOMinion": "OVNI", + "UnholyArrow": "Flecha infame", + "UnholyTridentFriendly": "Tridente infame", + "UnholyTridentHostile": "Tridente infame", + "UnholyWater": "Agua impura", + "ValkyrieYoyo": "Yoyó", + "Valor": "Yoyó", + "VampireHeal": "Curación vampírica", + "VampireKnife": "Cuchillo vampírico", + "VenomArrow": "Flecha de ponzoña", + "VenomBullet": "Bala de ponzoña", + "VenomFang": "Colmillo venenoso", + "VenomSpider": "Araña venenosa", + "ViciousPowder": "Polvo feroz", + "VilePowder": "Polvo vil", + "VilethornBase": "Espina vil", + "VilethornTip": "Espina vil", + "VineRopeCoil": "Rollo de cuerda de enredadera", + "VortexAcid": "Pringue alienígena", + "VortexBeater": "Golpeador del vórtice", + "VortexBeaterRocket": "Cohete del vórtice", + "VortexChainsaw": "Motosierra del vórtice", + "VortexDrill": "Taladro del vórtice", + "VortexLaser": "Láser del vórtice", + "VortexLightning": "Rayo del vórtice", + "VortexVortexLightning": "Vórtice", + "VortexVortexPortal": "Vórtice", + "Wasp": "Avispa", + "WaterBolt": "Proyectil de agua", + "WaterGun": "Pistola de agua", + "WaterStream": "Corriente de agua", + "Web": "Telaraña", + "WebRopeCoil": "Rollo de cuerda", + "WebSpit": "Escupitajo de telaraña", + "WireKite": "Cometa de alambre", + "Wisp": "Voluta", + "WoodenArrowFriendly": "Flecha de madera", + "WoodenArrowHostile": "Flecha de madera", + "WoodenBoomerang": "Bumerán de madera", + "WoodHook": "Garfio de madera", + "WoodYoyo": "Yoyó", + "WormHook": "Gancho", + "Xenopopper": "Xenolanzador", + "Yelets": "Yoyó", + "YellowCounterweight": "Contrapeso", + "ZephyrFish": "Pez de zafiro", + "Ale": "Cerveza", + "ApprenticeStaffT3Shot": "Ira de Betsy", + "BookStaffShot": "Libro de la Sabiduría Infinita", + "DD2ApprenticeStorm": "Torbellino de la Sabiduría Infinita", + "DD2BallistraProj": "Balista", + "DD2BallistraTowerT1": "Balista", + "DD2BallistraTowerT2": "Balista", + "DD2BallistraTowerT3": "Balista", + "DD2BetsyArrow": "Muerte aérea", + "DD2BetsyFireball": "Bola de fuego de Betsy", + "DD2BetsyFlameBreath": "Aliento de Betsy", + "DD2DarkMageBolt": "Energía Oscura", + "DD2DarkMageHeal": "Sigil oscuro", + "DD2DarkMageRaise": "Sigil oscuro", + "DD2DrakinShot": "Drakin", + "DD2ElderWins": "Final aciago", + "DD2ExplosiveTrapT1": "Trampa explosiva", + "DD2ExplosiveTrapT1Explosion": "Trampa explosiva", + "DD2ExplosiveTrapT2": "Trampa explosiva", + "DD2ExplosiveTrapT2Explosion": "Trampa explosiva", + "DD2ExplosiveTrapT3": "Trampa explosiva", + "DD2ExplosiveTrapT3Explosion": "Trampa explosiva", + "DD2GoblinBomb": "Bomba duende", + "DD2LightningAuraT1": "Aura de rayo", + "DD2LightningAuraT2": "Aura de rayo", + "DD2LightningAuraT3": "Aura de rayo", + "DD2LightningBugZap": "Proyectil marchitante", + "DD2OgreSmash": "Pisotón de ogro", + "DD2OgreSpit": "Escupitajo de ogro", + "DD2OgreStomp": "Pisotón de ogro", + "DD2PetDragon": "Hordragón", + "DD2PetGato": "Gatocóptero", + "DD2PetGhost": "Espirillama", + "DD2PhoenixBow": "Fénix fantasma", + "DD2PhoenixBowShot": "Fénix fantasma", + "DD2SquireSonicBoom": "Tajo con ganas", + "DD2Win": "¡Victoria!", + "MonkStaffT1": "Octópodo adormilado", + "MonkStaffT1Explosion": "Golpe de palo", + "MonkStaffT2": "Guja terrible", + "MonkStaffT2Ghast": "Horror", + "MonkStaffT3": "Furia del dragón celestial", + "MonkStaffT3_Alt": "Furia del dragón celestial", + "MonkStaffT3_AltShot": "Furia del dragón celestial", + "DD2JavelinHostileT3": "{$ProjectileName.DD2JavelinHostile}", + "Celeb2Rocket": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketExplosive": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketLarge": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketLargeExplosive": "{$ProjectileName.Celeb2Weapon}" + } +} \ No newline at end of file diff --git a/Localization/Content/es-ES/Town.json b/Localization/Content/es-ES/Town.json new file mode 100644 index 0000000..dfe36d6 --- /dev/null +++ b/Localization/Content/es-ES/Town.json @@ -0,0 +1,228 @@ +{ + "DryadSpecialText": { + "WorldStatusAll": "{0} tiene un {1}% de sagrado, un {2}% de corrompido y un {3}% carmesí.", + "WorldStatusHallowCorrupt": "{0} tiene un {1}% de sagrado y un {2}% de corrompido.", + "WorldDescriptionGrim": "Es bastante desalentador...", + "WorldDescriptionWork": "Tienes mucho trabajo que hacer.", + "WorldDescriptionClose": "¡Estás muy cerca!", + "WorldStatusHallowCrimson": "{0} tiene un {1}% de sagrado y un {2}% carmesí.", + "WorldStatusCorruptCrimson": "{0} tiene un {1}% de corrompido y un {2}% carmesí.", + "WorldStatusCorrupt": "{0} tiene un {1}% de corrompido.", + "WorldStatusCrimson": "{0} tiene un {1}% carmesí.", + "WorldStatusHallow": "{0} tiene un {1}% de sagrado.", + "WorldStatusPure": "{0} tiene una pureza total. ¡Has hecho un trabajo increíble!", + "WorldDescriptionBalanced": "El mundo está en equilibrio.", + "WorldDescriptionFairyTale": "Estamos viviendo en un cuento de hadas.", + "Party": "Pensé que sería buena idea hacer una fiesta para celebrar nuestras victorias pasadas y futuras.", + "AfterDD2Tier1": "Cuando estaba en Eteria, me sentía muy lejos de {WorldName}. Da gusto estar de vuelta.", + "AfterDD2Tier2": "La Corrupción intentó dominarme cuando fui a Eteria, pero yo usé su poder contra el ejército del Antiguo." + }, + "DyeTraderSpecialText": { + "HasPlant_0": "¡Brillante, sí, señor! Me has traído una muestra exquisita de los preciosos colores y el aroma del mundo. A cambio, puedes quedarte con esta botella de tinte especial.", + "HasPlant_1": "¿Me traes una flor rara y hermosa? ¿Sí? ¿Sí? ¡Toma esta botella de tinte especial que te será útil!", + "HasPlant_2": "¡Fantabuloso, camarada! Con este espécimen delicado, ¡podré mezclar los tintes más increíbles que {WorldName} ha visto! ¡Puedes llevarte este ya mismo!", + "NoPlant_0": "Oh, no, no. Esto no funcionará. Este dinero no está bien, ¡así que tienes que traerme una flor rara!", + "NoPlant_1": "¿Crees que puedes engañar a {DyeTrader}? ¡Lo dudo mucho! ¡Solo acepto las flores más raras para estas botellas especiales!", + "NoPlant_2": "¿Estas botellas de tinte? Lo siento, camarada. Estas no aceptan dinero. ¡Solo acepto una flor rara y valiosa a cambio de una de estas!", + "Party": "Adoro las fiestas por sus bonitos colores y la gente feliz." + }, + "GuideSpecialText": { + "Party": "¿Nunca habías estado en una fiesta? Tal vez quieras hablarlo con los demás. A veces, la gente saca a relucir favores especiales. " + }, + "MerchantSpecialText": { + "Party": "¿Sabes cuál sería la mejor forma de hacer una fiesta? Comprando cosas para otros, sobre todo para mí." + }, + "GoblinTinkererSpecialText": { + "Party": "Las fiestas de los duendes se parecen mucho a las de los humanos. Ambas tienen juegos como \"Cárgale el muerto al humano\"... En mis fiestas, no jugamos a ese juego." + }, + "WitchDoctorSpecialText": { + "Party": "Quería ver cómo lo celebráis vosotros. No me decepciona.", + "AfterDD2Tier1": "Siento un espíritu gemelo en los magos negros etéreos. Es una pena que sean nuestros enemigos. Me hubiese gustado aprender de ellos." + }, + "ClothierSpecialText": { + "Party": "Mamá siempre decía que tenías que dejar el pasado atrás antes de seguir festejando." + }, + "TravellingMerchantSpecialText": { + "Party": "Muchos dicen que las fiestas te proporcionan los mejores recuerdos. ¡Así que compra algo y crea buenos recuerdos!" + }, + "MechanicSpecialText": { + "Party": "¿Crees que a alguien le importaría que pusiese bombillas en la tarta en lugar de velas?" + }, + "BartenderSpecialText": { + "AfterDD2Tier1": "¡Has hecho un gran trabajo deshaciéndote del ejército del Antiguo! Pero seguro que los volveremos a ver. Esta vez no se han defendido demasiado.", + "AfterDD2Tier2": "El ejército del Antiguo es cada vez más fuerte... ¡pero tú sigues deshaciéndote de ellos! Pero algo me dice que todavía nos volverán a incordiar.", + "AfterDD2Tier3": "¿En serio has conseguido mantener a raya al ejército del Antiguo? Tal vez deberías visitar Eteria alguna vez.", + "BeforeDD2Tier1": "Tendríamos que hacer algo con el ejército del Antiguo. Pregúntame por el cristal eternia si quieres saber más sobre él.", + "FirstHelp": "Para empezar, toma unas cuantas Medallas del Defensor. ¡Invita la casa! Tengo varias defensas especiales que puedes comprar, ¡pero solo con Medallas del Defensor!", + "FirstMeeting": "¿Uh? ¿Cómo he llegado hasta aquí? Lo último que recuerdo es ver un portal abriéndose delante de mí..." + }, + "PartyGirlSpecialText": { + "Party_1": "¿Mmm? Nada especial hoy... ¡Estoy de broma! Ha llegado la hora de la fiesta. Y, después, ¡será la posfiesta!", + "Party_2": "¡Por fin, ha llegado mi momento!", + "AfterDD2Tier1": "¿Has visto ya a algún ogro? ¡Quiero montarme a lomos de uno!" + }, + "PirateSpecialText": { + "Party": "Después de toda esa tarta, tal vez tengas que llamarme Barba Blanca durante un buen rato." + }, + "TruffleSpecialText": { + "Party": "Habría invitado a todo el mundo a mi fiesta, pero no hay mucho espacio." + }, + "NurseSpecialText": { + "Party": "No, no te diré cuántas velas hay en mi tarta." + }, + "WizardSpecialText": { + "Party": "Está claro que celebré la fiesta más mágica de todas.", + "AfterDD2Tier1": "Jo, creía haber visto un portal como ese en el pasado... pero era oro." + }, + "CyborgSpecialText": { + "Party": "¡Esta fiesta será un desmadre! ¡Y hasta un despadre!" + }, + "DemolitionistSpecialText": { + "Party": "Puede que hoy quieras andar con cuidado. Los enanos solemos celebrar unas fiestas bastante explosivas.", + "AfterDD2Start": "No entiendo por qué no podemos cargarnos esos portales." + }, + "ArmsDealerSpecialText": { + "Party": "Las fiestas son geniales para hacer que la gente salga de sus cascarones, cual polluelos." + }, + "StylistSpecialText": { + "Party": "Puede que haya ido a la peluquería hoy, pero, a decir verdad, solo quiero reventar globos con las tijeras." + }, + "PainterSpecialText": { + "Party": "Intenté hacer una partida de paintball, pero todos preferían la comida y los adornos." + }, + "AnglerSpecialText": { + "Party": "¿Cómo? ¿Crees que me gustan las fiestas porque soy infantil? Pues efectivamente, ¡así que a festejar!" + }, + "AnglerQuestText": { + "NoQuest_1": "No tengo nada para ti en estos momentos.", + "NoQuest_2": "Ya me has entretenido bastante por hoy. Márchate.", + "NoQuest_3": "¡Se acabó! El gran {Angler} te permite irte.", + "NoQuest_4": "Solo un pez al día. ¡Márchate!", + "NoQuest_5": "Todavía no he usado el último pez que me has traído. No necesito más.", + "TurnIn_1": "¡Oh! ¡Gracias por traerme el pez que te pedí! Y ahora, ¡lárgate!", + "TurnIn_2": "¡Una gran pieza! ¡Todo va según el plan! ¡Je, je, je!", + "TurnIn_3": "¡Eres un gran mono de los recados! Pero ahora, ¡lárgate!", + "TurnIn_4": "¡Ja, ja, ja, ja, ja, ja! ¡Lo has logrado! Pero sigues de una pieza. ¡Qué aburrido!", + "TurnIn_5": "¡Vaya! ¡Pero si has hecho lo que te pedí y has sobrevivido! ¡Genial! ¡Dámelo y lárgate!", + "Quest_Batfish": "Nana nana nana nana ¡BATPEZ! Es decir, excava hasta donde tengas que cavar, consíguelo y tráemelo.\n\n(Se encuentra en el subterráneo y cavernas)", + "Quest_BumblebeeTuna": "¡En las junglas subterráneas de {WorldName} te encuentras cosas muy extrañas! ¡Por ejemplo, una vez vi un pez que parecía un abejorro gigante! Tengo alergia a las abejas, ¡así que tendrás que pescármelo tú! ¡Seguro que sabe a sándwich de atún y miel!\n\n(Se encuentra en la Miel)", + "Quest_Catfish": "¡Por fin he encontrado un gato de la jungla al que le gusta el agua! Creo que también es medio pez. No sé por qué ha pasado esto, pero no quiero saberlo. Lo quiero en mi poder. ¡Y que sea rapidito!\n\n(Se encuentra en la superficie de la selva)", + "Quest_Cloudfish": "Se rumorea que hay islas que flotan en el cielo y que esconden tesoros increíbles. ¿A quién le importa eso? Lo que mola es que a veces se forman lagos en las nubes… ¡que están repletos de peces hechos de nube! ¡Quiero saber cómo saben! ¡Ve a pescar uno!\n\n(Se encuentra en Lagos Celestiales)", + "Quest_Cursedfish": "Hay un pez maldito que nada por las aguas de la corrupción. Está compuesto por las llamas infernales que se expanden a partir de los horrores caídos que acechan aquí abajo. Dicen que ni siquiera el agua puede apagar su fuego, el cual puede arder eternamente. ¡Se me ocurren un par de usos para un pez así! ¿Vas a ir a conseguirme uno o eres un gallina?\n\n(Se encuentra en la Corrupción)", + "Quest_DynamiteFish": "El demoledor se estaba quejando de que había perdido una barra de dinamita en el lago del bosque. Tiene un montón, ¿por qué le da tanta importancia a una? Por lo visto, le salieron aletas y empezó a nadar. No sé de dónde saca sus materiales para que hagan algo así, ¡pero ese está obviamente poseído! Péscalo y tráemelo. Siempre quise un pez bomba suicida. No me preguntes por qué…\n\n(Se encuentra en la superficie)", + "Quest_EaterofPlankton": "Seguro que no serás tan valiente como para encontrar al comedor de plancton. ¡Un pez corrupto se ha transformado en una especie de Comedor de Mundos! ¡Atrápalo, tráemelo y demuéstrame tu valía!\n\n(Se encuentra en la Corrupción)", + "Quest_FallenStarfish": "Me encanta coleccionar esas estrellas brillantes y amarillas que caen del cielo. Me encanta todavía más que caigan sobre la cabeza de alguien. Pero… pero… ¡no hay nada mejor que una estrella que cae del cielo en un lago de un bosque y se convierte en pez! Es una locura, ¡pero tú estás lo bastante loco para conseguírmelo!\n\n(Se encuentra en Lagos Celestiales)", + "Quest_TheFishofCthulu": "Por lo visto, los ojos demoníacos pueden ser anfibios en ocasiones. ¡No vuelan, nadan! ¡Quiero ver la cara que pone alguien cuando se lo encuentre en la bañera! Vagan por las mismas zonas. ¡Es decir, que puedes pescarme uno!\n\n(Se encuentra en Lagos Celestiales y en la superficie)", + "Quest_Fishotron": "No sé qué es peor: un pez hueso o un pez hueso con manos. ¡Ese peztrón de las cavernas me da mucho miedo! Creo que ha sido poseído por los mismos espíritus malvados que han poseído a ese viejo que está junto a la mazmorra. ¡Te reto a que vayas a por él!\n\n(Se encuentra en las cavernas)", + "Quest_Harpyfish": "Estaba intentando dormir junto al lago de la colina cuando un pez me pasó rozando. ¡Estaba volando! ¡Además, tenía plumas y la cara de una señorita! ¡Creo que grité más fuerte que ella! ¡Oye, tú! ¡Haz que pague por asustarme así!\n\n(Se encuentra en Lagos Celestiales y en la superficie)", + "Quest_Hungerfish": "Hay un pez hambriento que ha mutado del muro carnoso en un pequeño pez que nada por el inframundo. ¡Es asqueroso, es repulsivo y yo lo quiero ahora mismo!\n\n(Se encuentra en las cavernas)", + "Quest_Ichorfish": "¿Sabías que algunas de esas criaturas crean esta cosa amarillenta? Oí una historia sobre un montón de esa cosa, que se fusionó en forma de pez ¡y que nada por ahí y todo! ¡Consíguemelo para que pueda ponérselo a alguien en el baño!\n\n(Se encuentra en Carmesí)", + "Quest_Jewelfish": "¡Oooh, voy a hacerme de oro! ¡En las profundidades de las cavernas hay un pez hecho de gemas! No me preguntes cómo es posible, porque no lo sé. Tan solo sé que ese pez mola mucho ¡y que lo vas a pescar para mí!\n\n(Se encuentra en el subterráneo y cavernas)", + "Quest_MirageFish": "Hay criaturas interesantes por encontrar en las reliquias más profundas, ¡en serio! ¡Brillan con un color morado que engaña a tus ojos! ¡Es una locura! ¡Quiero que me consigas un pez así!\n\n(Se encuentra en el subterráneo de la tundra)", + "Quest_MutantFlinxfin": "¿Qué es blanco, moreno y blandito, y vive en un lago subterráneo congelado? ¡Un aletacopito mutante! No era broma, ¿sabes? ¡Hay una variedad mutante del copito que está más adaptada a la vida acuática! Quiero que viva en mi pecera, ¡así que consigue hacer realidad mi sueño!\n\n(Se encuentra en el subterráneo de la tundra)", + "Quest_Pengfish": "¡Es una ballena! ¡Es un delfín! ¡No, es un pingüino! ¡Anda mira! Pero si eres tú. ¿Podrías traerme uno? Sabes que solo les gusta el agua fría, ¿verdad?\n\n(Se encuentra en la tundra)", + "Quest_Pixiefish": "Hay un tipo muy, muy raro de hada que ha nacido con tantas alas… ¡que no puede volar! Nada con los peces en los lagos, con esa hierba de color azul a su alrededor. Agradecería una lucecita en mi pecera, ¡así que consígueme esa hada!\n\n(Se encuentra en lo sagrado)", + "Quest_Spiderfish": "¡He visto a un pez con ocho patas! ¡No! ¡Imposible! Me lo vas a pescar, ¡para que no esté vivo cuando lo coja! ¡Es la última vez que voy a pescar en las profundidades de la caverna!\n\n(Se encuentra en el subterráneo y cavernas)", + "Quest_UnicornFish": "¡Los unicornios y los arcoíris molan mucho! Están por todas partes, ¡incluso debajo del agua! No, en serio, ¡he visto a un pez unicornio en el lago sagrado! ¡Tendrás que pescármelo y dejármelo como mascota!\n\n(Se encuentra en lo sagrado)", + "Quest_GuideVoodooFish": "Esos demonios del inframundo adoran los muñecos de vudú, ¡pero creo que hay un muñeco que ha recibido demasiada magia! Se convirtió en un pez con vida propia. ¡Te desafío a que me consigas uno! Yo de ti tendría cuidado con la lava ardiente, ¡ya que te puede matar y me quedaría sin mi pez!\n\n(Se encuentra en las cavernas)", + "Quest_Wyverntail": "¡Sé algo que tú no! Vale, te lo diré: ¡hay una criatura terrible que vuela entre las estrellas! ¡No es mentira! ¡Se llama guiverno! Pero eso ya lo sabías, ¿verdad? ¡Pero lo que no sabes es que nacen y crecen como renacuajos! Así que en realidad son como… ¡como una rana! ¡Ponte a ello y consígueme uno!\n\n(Se encuentra en Lagos Celestiales)", + "Quest_ZombieFish": "¡No te lo vas a creer! ¡He pescado un pez ya muerto en el bosque, durante la noche! ¡Intentó comerme! Lo tiré y salí corriendo de allí. Ahora quiero meterlo en el vestidor de alguien para ver qué pasa. ¿Podrías volver a pescarlo para mí?\n\n(Se encuentra en la superficie)", + "Quest_AmanitaFungifin": "Encontré un lugar espectacular que estaba rodeado por setas gigantes y brillantes. ¡Todo era azul! Estaba cogiendo algunas de las setas que encontré junto a un lago azul brillante cuando una de las setas… ¡me atacó y se fue nadando! Quiero darle a probar su propia medicina ¡y darle un buen mordisco! Es decir, ¡tienes que conseguírmela!\n\n(Se encuentra en los campos de champiñones brillantes)", + "Quest_Angelfish": "¿Sabías que hay islas mágicas flotando en lo alto del cielo? ¡Seguro que no! Dicen que en el cielo viven los ángeles. ¡Yo creo que esos ángeles tienen aletas y agallas y se pasan todo el día nadando por ahí! ¡Tendrías que atraparme uno!\n\n(Se encuentra en Lagos Celestiales)", + "Quest_BloodyManowar": "¡Ay! ¡No te me acerques! ¡Me ha picado una manowar sangrienta! Por si no sabes lo que es, ¡es la medusa más amenazadora de todo {WorldName}! ¡Ve a atraparme una si te atreves! \n\n(Se encuentra en Carmesí)", + "Quest_Bonefish": "Por lo general, me da igual ver espinas en el agua… ¡pero esta estaba nadando! ¿Acaso creías que solo los esqueletos humanos cobraban vida en {WorldName}? ¡Atrápamela para que se la pueda meter en la cama a alguien!\n\n(Se encuentra en el subterráneo y cavernas)", + "Quest_Bunnyfish": "Estaba pescando en el bosque, ¿vale? ¡Pues no sabes lo que pasó! ¡Me saltó encima un conejo! Y luego otro, y otro… ¡y de repente, me veo rodeado de conejos! Uno incluso vino nadando desde el agua, ¡pero no tenía patas! Me caí de la silla del susto ¡y todos los conejos se escabulleron! ¡Quiero ese pez conejo como mascota! ¡Más te vale conseguirme uno pronto!\n\n(Se encuentra en la superficie)", + "Quest_CapnTunabeard": "¡Eh, colega! ¡Arriad la mesana! ¡Traed el ron! Había un capitán pirata que tenía un pez como mascota, que se llamaba Barbatún. Durante una gran tormenta, ¡la pecera se le cayó al mar! Tiene un garfio por cola y un parche, ¡el lote completo! Tendrás que conseguirme ese pez, para que pueda ser tan guay como un pirata. ¡Seguro que está en algún rincón del océano!\n\n(Se encuentra en el océano)", + "Quest_Clownfish": "Vi un gran pez naranja y colorido junto al océano. Se movía de un lado a otro sin parar, ¡como si estuviese buscando a un familiar desaparecido! ¡Ve a conseguírmelo, para que ese familiar acabe teniendo que buscarlo a él!\n\n(Se encuentra en el océano)", + "Quest_DemonicHellfish": "Dicen que, en el inframundo, el rey de todos los demonios ¡es un pez! ¡Imagínate el poder absoluto que conseguiría si me lo pescases!\n\n(Se encuentra en las cavernas)", + "Quest_Derpfish": "Esos tontunos de la jungla con las criaturas más terroríficas que jamás haya visto. ¡Lo bueno es que, a veces, no tienen patas! Viven en el agua ¡y dan mucho menos miedo! ¡Péscame uno para que pueda descubrir su sabor sin que me dé un infarto!\n\n(Se encuentra en la superficie de la selva)", + "Quest_Fishron": "Existe la leyenda de un ser poderoso conocido como pezgrón, ¡mitad cerdo, mitad dragón y mitad pez! Dicen que se encuentra en los lagos subterráneos de la zona más fría del mundo. Yo no pienso ir hasta allí, ¡así que péscamelo y asegúrate de que cae en mis manos! ¡Ay, qué ilusión!\n\n(Se encuentra en el subterráneo de la tundra)", + "Quest_InfectedScabbardfish": "Un pez muy largo, que parece una espada, nada por las aguas turbias de la corrupción. Se parece mucho a una piedra de ébano, ¡no dejes que te engañe! Eso es, tú. ¡Lo vas a pescar tú, no yo!\n\n(Se encuentra en la Corrupción)", + "Quest_Mudfish": "¡Ten cuidado al adentrarte en las aguas de la jungla! ¿Por qué? No, no es porque me preocupe que te coman las pirañas. Me preocupa que pises sin querer uno de mis tipos de pez favoritos: ¡el pez barro! También me preocupa mucho que me consigas uno como mascota.\n\n(Se encuentra en la selva)", + "Quest_TropicalBarracuda": "¡Las pirañas y los tiburones son horribles! ¡Muy, muy feos! ¿Sabías que hay un pez que parece muy bonito y que podría comerte la cara? Pagaría 2 platinos por verlo, la verdad… Bueno, vayamos al grano: quiero que me lo consigas. ¡Tráemelo antes de que te coma la cara!\n\n(Se encuentra en la superficie de la selva)", + "Quest_TundraTrout": "¿Alguna vez te has preguntado por qué en {WorldName} nunca se congelan los lagos de las zonas nevadas? Yo no. ¡Pero los peces sí se congelan! ¡Un pez hecho de hielo sería una gran ofenda al gran y poderoso {Angler}! ¡Ve, mi fiel súbdito! ¡Tráeme esa trucha de la tundra cuanto antes!\n\n(Se encuentra en la superficie de la tundra)" + }, + "AnglerChatter": { + "Chatter_1": "¿Por qué {Bartender} no me quiere vender cerveza? ¡Quiero probarla! ¡Menudo gruñón!" + }, + "BartenderChatter": { + "Chatter_1": "¡Tengo la birra que te pirra! ¿Lo pillas? ¿Birra? ¿No?", + "Chatter_10": "Oye, ¿tú crees que {Steampunker} tiene otra arma como esa? Conozco a una bruja que podría querer una.", + "Chatter_11": "Normal que {Demolitionist} tenga tantos accidentes. No te puedes ni imaginar cuantísima cerveza me compra.", + "Chatter_12": "Por lo general, no me entusiasman los duendes... Pero ese {GoblinTinkerer} me parece muy majo.", + "Chatter_13": "{?Day}¿Alguien sabe adónde se ha ido la dríada?", + "Chatter_14": "{?!Day}Está la cosa muy tranquila. Demasiado tranquila...", + "Chatter_15": "{?!Day}Contacta conmigo y haz tu trabajo.", + "Chatter_16": "{?BloodMoon}Lo cierto es que, en mi pueblo, una Luna de Sangre no es más que una excusa para respirar un poco de aire fresco.", + "Chatter_17": "{?MoonLordDefeated}¿Señor de la Luna? ¿No será Señor del Abismo?", + "Chatter_18": "{?HardMode}Conozco a un lavamante al que le encantaría esa piedra infernal del inframundo.", + "Chatter_19": "{?Homeless}¿Conoces algún buen sitio para montar una tienda? Me encantaría abrir un bar aquí.", + "Chatter_2": "Dicen que eres fuerte. De fortalezas sé bastante. A ver si estás a la altura.", + "Chatter_3": "En mi pueblo, tan solo servimos cerveza de raíz...", + "Chatter_4": "Es un gran paso adelante con respecto a estar todo el día limpiando esa mesa.", + "Chatter_5": "La vida es un desafío cuando la naturaleza te ha hecho mejor que a los demás.", + "Chatter_6": "Qué estoy haciendo aquí...", + "Chatter_7": "Se pueden conseguir grandes cosas con un montón de tenacidad y un poco de suerte...", + "Chatter_8": "¿Has visto algún llamexplo por aquí?", + "Chatter_9": "{Dryad} parece maja. Debería llevármela conmigo." + }, + "BartenderHelpText": { + "Help_1": "Lo primero que tienes que saber es que tengo artefactos defensivos especiales a la venta, ¡pero solo si tienes Medallas del Defensor!", + "Help_10": "Si logras repeler la invasión, obtendrás más Medallas del Defensor. ¡Si me las traes, podrás comprar más artefactos y tendrás otras recompensas especiales!", + "Help_11": "He oído rumores de que se puede desbloquear todavía más la potencia de los artefactos si derrotar al ejército del Antiguo. ¡Puede que incluso los puedas usar cuando quieras!", + "Help_2": "Podrás usar estos artefactos para crear trampas y torres defensivas. Al hacerlo, consumirás maná etéreo, una energía especial que sueltan los miembros del ejército de los Antiguos.", + "Help_3": "Desafiar al ejército de los Antiguos es bastante sencillo. Se ven atraídos por el poder de los cristales eternia. Puedes usarlos para hacerlos salir.", + "Help_4": "Para colocar un cristal eternia, debes obtener un cristal eternia y un stand para colocarlo. ¡Pues resulta que yo te lo vendo todo!", + "Help_5": "Te recomiendo colocar el cristal de eternia en un stand que esté en una zona muy abierta. ¡Muchas paredes y cosas podría complicarte su defensa!", + "Help_6": "Cuando tengas montado el stand, interactúa con él mientras tengas un cristal eternia en las manos. ¡Prepárate para luchar!", + "Help_7": "¡Obviamente, no puedes permitir que el ejército del antiguo destruya el cristal eternia! ¡Esto tendrá consecuencias catastróficas para mi hogar natal de Eteria!", + "Help_8": "Puedes colocar defensas por solo 10 de maná etéreo. Una vez colocado, el cristal eternia liberará parte de su maná. Si no, tendrás que derrotar a enemigos para conseguir más.", + "Help_9": "Aprovecha las defensas para repeler a numerosas oleadas de invasores que intentan destruiros tanto a ti como al cristal eternia." + }, + "BartenderNames": { + "Name_1": "Ted", + "Name_10": "Javahawk", + "Name_11": "Elandrian", + "Name_12": "Driscan", + "Name_13": "Iamisom", + "Name_14": "Herrero", + "Name_15": "Dani Moo", + "Name_16": "Paddy", + "Name_2": "Camarero", + "Name_3": "Jerry", + "Name_4": "Bill", + "Name_5": "Ernest", + "Name_6": "William", + "Name_7": "Dale", + "Name_8": "Bruce", + "Name_9": "Moe" + }, + "CyborgChatter": { + "Chatter_1": "{Bartender} dijo que le recordaba a una tal \"EV2\". Tal vez debería conocerla." + }, + "GoblinTinkererChatter": { + "Chatter_1": "Esos duendes etéreos no se parecen en nada a mi pueblo. Son un montón de alborotadores. Bueno, tampoco es que mi pueblo sea mucho mejor..." + }, + "GuideHelpText": { + "Help_1063": "Lo normal sería que te lo contase todo sobre el ejército del Antiguo, pero tal vez sea mejor que le preguntes a {Bartender} sobre el tema." + }, + "MechanicChatter": { + "Chatter_1": "{Bartender} me ofreció una cerveza de raíz. Le dije que me la sirviese en una copa cuadrada." + }, + "NurseChatter": { + "Chatter_1": "Yo no dejaba de pedirle vino, pero {Bartender} no hacía más que darme cerveza." + }, + "PirateChatter": { + "Chatter_1": "¡Ya iba siendo hora de tener a un camarero por aquí! ¡Me quedaba poco ron!" + }, + "StylistChatter": { + "Chatter_1": "Le ofrecí a {Bartender} un corte gratis, pero me lo rechazó. Jo, ¡al menos podría haberle retocado el bigotillo!" + }, + "TownNPCHousingFailureReasons": { + "HoleInWallIsTooBig": "A esta habitación le falta una pared.", + "RoomCheckStartedInASolidTile": "¡Es un bloque sólido!", + "RoomIsTooBig": "Esta habitación es demasiado grande.", + "RoomIsTooSmall": "Esta habitación es demasiado pequeña.", + "TooCloseToWorldEdge": "¡Necesitamos un texto mejor para esto!" + } +} \ No newline at end of file diff --git a/Localization/Content/fr-FR.json b/Localization/Content/fr-FR.json new file mode 100644 index 0000000..47ab505 --- /dev/null +++ b/Localization/Content/fr-FR.json @@ -0,0 +1,697 @@ +{ + "GameTitle": { + "0": "Terraria : Creusez Péon, creusez !", + "1": "Terraria : Terre épique", + "10": "Terraria : Creusez les blocs de T", + "11": "Terraria : Il n'y a pas de couche de vache secrète", + "12": "Terraria : Des globes oculaires suspects", + "13": "Terraria : De l'herbe violette !", + "14": "Terraria : Personne ne reste à creuser !", + "15": "Terraria : La cascade de contenu !", + "16": "Terraria : Destination Terre", + "17": "Terraria : Je suis bien meilleur que Dig Dug", + "18": "Terraria : Tout est bien qui finit en minerai", + "19": "Terraria : L'argile du jugement dernier", + "2": "Terraria : Adamantite et mithril !", + "20": "Terraria : Soucis terrestres", + "21": "Terraria : Simulateur de troubles obsessionnels compulsifs", + "22": "Terraria : Red dev Redemtpion", + "23": "Terraria : Réveil des Gelées", + "24": "Terraria : Avec encore plus de créatures pour vous tuer !", + "25": "Terraria : Les rumeurs sur la mort du guide étaient exagérées", + "26": "Terraria : Je plains les outils…", + "27": "Terraria : Un spéléo dans ton quoi ?", + "28": "Terraria : Et j'ai dit : « Un truc sur une mise à jour de PC… »", + "29": "Terraria : Que les blocs soient avec vous", + "3": "Terraria : Le sable se fait écraser", + "30": "Terraria : Mieux que la vie", + "31": "Terraria : Terraria : Terraria :", + "32": "Terraria : Maintenant en 1D", + "33": "Terraria : Bientôt sur un ordinateur près de chez vous", + "34": "Terraria : Diviser par zéro", + "35": "Terraria : Maintenant avec du SON", + "36": "Terraria : Appuyez sur alt-F4", + "37": "Terraria : Je plains les outils", + "38": "Terraria : Tu veux du sable ?", + "39": "Terraria : Une bonne journée en enfer", + "4": "Terraria 3 : Le Retour du guide", + "40": "Terraria : À creuser sans modération !", + "41": "Terraria : Je ne sais pas… aaaa !", + "42": "Terraria : C'est quoi ce truc violet à pointes ?", + "43": "Terraria : Je veux être guide", + "44": "Terraria : Cthulhu est fou… et borgne !", + "45": "Terraria : PAS LES ABEILLES !", + "46": "Terraria : La Légende de Maxx", + "47": "Terraria : Culte de Cenx", + "48": "Terraria 2 : Boogaloo électrique", + "49": "Terraria : Essayez aussi Minecraft !", + "5": "Terraria : Un conte de lapins", + "51": "Terraria : Je veux juste savoir où est l'or", + "52": "Terraria : Maintenant avec plus de canards !", + "53": "Terraria : 9+1=11", + "54": "Terraria : Plantera infinie", + "6": "Terraria : Dr Bones et le Temple de la Lune de sang", + "7": "Terraria : Gelassique Park", + "8": "Terraria : L'herbe est plus verte de ce côté", + "9": "Terraria : Petits blocs, déconseillés aux enfants de moins de 5 ans", + "55": "Terraria : Tais-toi et creuse !" + }, + "Achievements": { + "ARCHAEOLOGIST_Description": "Tuez le Docteur Bones.", + "ARCHAEOLOGIST_Name": "Archéologue", + "BALEFUL_HARVEST_Description": "Atteignez la 15e vague de la lune citrouille, où le mal se tapit dans les récoltes de l'automne.", + "BALEFUL_HARVEST_Name": "Récolte maléfique", + "BEGONE_EVIL_Description": "Brisez un autel démoniaque ou carmin avec un marteau puissant et bénit.", + "BEGONE_EVIL_Name": "Va-t'en, Mal !", + "BEHIND_THE_MASK_Description": "Tuez l'Adepte fou, un magicien dément aux sortilèges puissants.", + "BEHIND_THE_MASK_Name": "Derrière le masque", + "BIG_BOOTY_Description": "Déverrouillez l'un des grands coffres mystérieux de donjon avec une clé particulière.", + "BIG_BOOTY_Name": "Gros butin", + "BLOODBATH_Description": "Survivez à une lune de sang, un évènement nocturne où les fleuves sont rouges et les monstres pullulent.", + "BLOODBATH_Name": "Bain de sang", + "BONED_Description": "Éliminez Squeletron, le gardien maudit du donjon.", + "BONED_Name": "Désossé", + "BUCKETS_OF_BOLTS_Description": "Éliminez les trois menaces mécaniques de la nuit : les Jumeaux, le Destructeur et le Grand Squeletron.", + "BUCKETS_OF_BOLTS_Name": "Tonnes d'écrous", + "BULLDOZER_Description": "Détruisez un total de 10 000 tuiles.", + "BULLDOZER_Name": "Bulldozer", + "ChallengerCategory": "Défi", + "CHAMPION_OF_TERRARIA_Description": "Éliminez le Seigneur de la lune.", + "CHAMPION_OF_TERRARIA_Name": "Champion de Terraria", + "CollectorCategory": "Collection", + "Completed": "Succès terminé ! {0}", + "COMPLETELY_AWESOME_Description": "Obtenez un minirequin.", + "COMPLETELY_AWESOME_Name": "Trop cool", + "DAVY_JONES_LOCKER_Description": "Éliminez le Hollandais volant, le navire de pillage céleste.", + "DAVY_JONES_LOCKER_Name": "Au fond des mers", + "DECEIVER_OF_FOOLS_Description": "Tuez une nymphe.", + "DECEIVER_OF_FOOLS_Name": "Imposteur d'imbéciles", + "DO_YOU_WANT_TO_SLAY_A_SNOWMAN_Description": "Triomphez contre la Légion de givre, une mafia festive de bonhommes de neige maniaques.", + "DO_YOU_WANT_TO_SLAY_A_SNOWMAN_Name": "Voulez-vous tuer un bonhomme de neige ?", + "DRAX_ATTAX_Description": "Fabriquez une fourche ou pioche-hache avec des lingots sacrés et les âmes de trois boss mécaniques.", + "DRAX_ATTAX_Name": "Défi Forche", + "DUNGEON_HEIST_Description": "Volez une clé aux habitants morts-vivants de donjon, et déverrouillez l'un de leurs précieux coffres dorés.", + "DUNGEON_HEIST_Name": "Braquage de donjon", + "DYE_HARD_Description": "Équipez une teinture dans tous les emplacements de teinture possible.", + "DYE_HARD_Name": "Teinturathon", + "ExplorerCategory": "Exploration", + "EXTRA_SHINY_Description": "Trouvez un minerai puissant qui vient d'être donné à votre monde.", + "EXTRA_SHINY_Name": "Super brillant", + "EYE_ON_YOU_Description": "Éliminez l'Œil de Cthulhu, une menace oculaire qui apparaît la nuit.", + "EYE_ON_YOU_Name": "Jeter un œil", + "FASHION_STATEMENT_Description": "Équipez une armure ou un habit de style dans trois emplacements sociaux.", + "FASHION_STATEMENT_Name": "À la mode", + "FAST_AND_FISHIOUS_Description": "Réalisez voter 50e quête pour le pêcheur.", + "FAST_AND_FISHIOUS_Name": "Tendre la perche", + "FISH_OUT_OF_WATER_Description": "Éliminez le Duc Dracosson, terreur mutante de la mer.", + "FISH_OUT_OF_WATER_Name": "Un poisson hors de l'eau", + "FREQUENT_FLYER_Description": "Dépensez plus de 1 pièce d'or à vous faire soigner par l'infirmière.", + "FREQUENT_FLYER_Name": "Voyageur fréquent", + "FUNKYTOWN_Description": "Construisez ou trouvez un champ de champignons luisants à la surface.", + "FUNKYTOWN_Name": "Funkyville", + "GELATIN_WORLD_TOUR_Description": "Éliminez tous les types de gelées qui existent !", + "GELATIN_WORLD_TOUR_Name": "Tour du monde de Gélatine", + "GET_A_LIFE_Description": "Consommez un fruit de vie qui pousse dans les herbes denses de la jungle souterraine.", + "GET_A_LIFE_Name": "Changer de vie", + "GLORIOUS_GOLDEN_POLE_Description": "Obtenez une canne à pêche dorée.", + "GLORIOUS_GOLDEN_POLE_Name": "Jolie perche dorée", + "GOBLIN_PUNTER_Description": "Triomphez contre l'invasion de gobelins, un régiment hétéroclite de guerriers barbares aux oreilles pointues et leurs marabouts de flamme d'ombre.", + "GOBLIN_PUNTER_Name": "Chalands gobelins", + "GOOD_LITTLE_SLAVE_Description": "Réalisez votre 10e quête pour le pêcheur.", + "GOOD_LITTLE_SLAVE_Name": "Petit esclave", + "HEAD_IN_THE_CLOUDS_Description": "Équipez une paire d'ailes.", + "HEAD_IN_THE_CLOUDS_Name": "Tête en l'air", + "HEART_BREAKER_Description": "Découvrez et brisez votre premier cœur de cristal souterrain.", + "HEART_BREAKER_Name": "Briseur de cœurs", + "HEAVY_METAL_Description": "Obtenez une enclume de fer ou de plomb.", + "HEAVY_METAL_Name": "Métalleux", + "HEX_EDUCATION_Description": "Éliminez un invocateur gobelin, des sorciers des flammes de l'ombre.", + "HEX_EDUCATION_Name": "Le sort en est jeté", + "HOLD_ON_TIGHT_Description": "Équipez votre premier grappin.", + "HOLD_ON_TIGHT_Name": "Accrochez-vous !", + "ICE_SCREAM_Description": "Atteignez la 15e vague de la lune de givre, où la saison des fêtes se transforme rapidement en folie.", + "ICE_SCREAM_Name": "Complètement givré", + "INDEPENDENCE_DAY_Description": "Éliminez un vaisseau mère pour arrêter les envahisseurs martiens.", + "INDEPENDENCE_DAY_Name": "Indépendance", + "INTO_ORBIT_Description": "Vous ne pouvez pas aller plus haut !", + "INTO_ORBIT_Name": "Sur orbite", + "ITS_GETTING_HOT_IN_HERE_Description": "Creusez assez profondément pour arriver à l'enfer en fusion.", + "ITS_GETTING_HOT_IN_HERE_Name": "Chaud devant !", + "ITS_HARD_Description": "Libérez les esprits anciens de la lumière et de l'obscurité dans votre monde. Vous affronterez des ennemis plus forts et vous ferez pleuvoir des trésors étincelants (et des arcs-en-ciel !).", + "ITS_HARD_Name": "C'est dur !", + "IT_CAN_TALK_Description": "Construisez une maison dans un biome de champignon pour que Truffe emménage.", + "IT_CAN_TALK_Name": "Quelle truffe !", + "I_AM_LOOT_Description": "Découvrez un coffre doré souterrain et regardez ce qu'il contient.", + "I_AM_LOOT_Name": "Un petit trésor", + "JEEPERS_CREEPERS_Description": "Tombez sur une grotte d'araignées dans les souterrains.", + "JEEPERS_CREEPERS_Name": "Les petites bêtes", + "KILL_THE_SUN_Description": "Survivez à une éclipse solaire, un jour plus sombre que la nuit, rempli de créatures de l'horreur.", + "KILL_THE_SUN_Name": "Mort du soleil", + "LIHZAHRDIAN_IDOL_Description": "Éliminez un Golem, l'idole de rituels au visage de pierre de la tribu des Lihzahrds.", + "LIHZAHRDIAN_IDOL_Name": "Idole des Lihzahrds", + "LIKE_A_BOSS_Description": "Obtenez un objet qui invoque un boss.", + "LIKE_A_BOSS_Name": "Ennemi mortel", + "LUCKY_BREAK_Description": "Survivez à une longue chute avec un tout petit peu de santé restante.", + "LUCKY_BREAK_Name": "Chute vertigineuse", + "MARATHON_MEDALIST_Description": "Parcourez un total de 26,2 milles à pied.", + "MARATHON_MEDALIST_Name": "Médaille de marathon", + "MASTERMIND_Description": "Éliminez le Cerveau de Cthulhu, un énorme cerveau de démon qui hante le terrifiant monde carmin.", + "MASTERMIND_Name": "Le génie", + "MATCHING_ATTIRE_Description": "Équipez une armure dans les trois emplacements d'armure : tête, poitrine et pieds.", + "MATCHING_ATTIRE_Name": "Costume assorti", + "MECHA_MAYHEM_Description": "Combattez contre les Jumeaux, le Destructeur et le Grand Squeletron en même temps et remportez la victoire.", + "MECHA_MAYHEM_Name": "Chaos mécanique", + "MINER_FOR_FIRE_Description": "Fabriquez une pioche en fusion avec des matériaux ardents.", + "MINER_FOR_FIRE_Name": "Équipement en fusion", + "NoCategory": "Aucune", + "NOT_THE_BEES_Description": "Utilisez le Fusil abeille tout en portant l'armure complète d'abeille.", + "NOT_THE_BEES_Name": "Essaim d'abeilles", + "NO_HOBO_Description": "Construisez une maison convenable pour accueillir votre premier PNJ comme le guide.", + "NO_HOBO_Name": "Pas de SDF", + "OBSESSIVE_DEVOTION_Description": "Éliminez l'Adepte ancien, un chef fanatique de l'assemblée du donjon.", + "OBSESSIVE_DEVOTION_Name": "Dévotion obsessionnelle", + "OBTAIN_HAMMER_Description": "Obtenez votre premier marteau via l'artisanat ou autre.", + "OBTAIN_HAMMER_Name": "À rendre marteau !", + "OOO_SHINY_Description": "Obtenez votre première pépite de minerai avec une pioche.", + "OOO_SHINY_Name": "Ouh ! Ça brille !", + "PHOTOSYNTHESIS_Description": "Creusez pour trouver du chlorophyte, un minerai organique au plus profond de la flore.", + "PHOTOSYNTHESIS_Name": "Photosynthèse", + "PRETTY_IN_PINK_Description": "Tuez Rosie.", + "PRETTY_IN_PINK_Name": "Le rose vous va bien", + "PRISMANCER_Description": "Obtenez un bâton arc-en-ciel.", + "PRISMANCER_Name": "Prismancien", + "PUMPKIN_SMASHER_Description": "Éliminez le Potiroi, le seigneur terrifiant de la nuit des esprits.", + "PUMPKIN_SMASHER_Name": "Rien dans la citrouille", + "RAINBOWS_AND_UNICORNS_Description": "Utilisez un Pistolet arc-en-ciel à dos de licorne.", + "RAINBOWS_AND_UNICORNS_Name": "Tout le monde, il est beau", + "REAL_ESTATE_AGENT_Description": "Faites en sorte que tous les PNJ de ville vivent dans votre monde.", + "REAL_ESTATE_AGENT_Name": "Agent immobilier", + "ROBBING_THE_GRAVE_Description": "Obtenez un trésor rare d'un monstre difficile dans le donjon.", + "ROBBING_THE_GRAVE_Name": "Pillage de tombes", + "ROCK_BOTTOM_Description": "La seule issue est vers le haut !", + "ROCK_BOTTOM_Name": "Au plus bas", + "SERVANT_IN_TRAINING_Description": "Réalisez votre 1re quête pour le pêcheur.", + "SERVANT_IN_TRAINING_Name": "Serviteur apprenti", + "SICK_THROW_Description": "Obtenez le Terrarien.", + "SICK_THROW_Name": "Lancer incroyable", + "SlayerCategory": "Tueur", + "SLAYER_OF_WORLDS_Description": "Éliminez tous les monstres finaux de Terraria.", + "SLAYER_OF_WORLDS_Name": "Tueur de mondes", + "SLIPPERY_SHINOBI_Description": "Éliminez le Roi des Gelées, le seigneur de tout le gluant.", + "SLIPPERY_SHINOBI_Name": "Shinobi glissant", + "SMASHING_POPPET_Description": "À l'aide d'explosifs ou de votre bon vieux marteau, éclatez un orbe de l'ombre ou un cœur de cristal dans les zones maléfiques de votre monde.", + "SMASHING_POPPET_Name": "On s'éclate !", + "STAR_DESTROYER_Description": "Éliminez les quatre tours célestes de la lune.", + "STAR_DESTROYER_Name": "Destructeur d'étoiles", + "STAR_POWER_Description": "Fabriquez un cristal de mana avec des étoiles filantes, et consommez-le.", + "STAR_POWER_Name": "Une étoile est née", + "STICKY_SITUATION_Description": "Survivez à la pluie de gelées, où des organismes gélatineux tombent du ciel en grand nombre.", + "STICKY_SITUATION_Name": "Pot de colle", + "STILL_HUNGRY_Description": "Éliminez le Mur de chair, le maître et le centre du monde qui émerge après un grand sacrifice de feu.", + "STILL_HUNGRY_Name": "Insatiable", + "STING_OPERATION_Description": "Éliminez la Reine des abeilles, la matriarche des ruches de la jungle.", + "STING_OPERATION_Name": "Opération Essaim", + "SUPREME_HELPER_MINION_Description": "Réalisez un grand total de 200 quêtes pour le pêcheur.", + "SUPREME_HELPER_MINION_Name": "Aide suprême !", + "SWORD_OF_THE_HERO_Description": "Obtenez une lame Terra, forgée des lames de lumière et d'obscurité.", + "SWORD_OF_THE_HERO_Name": "Épée du héros", + "TEMPLE_RAIDER_Description": "Faufilez-vous à l'intérieur des murs impénétrables du temple de la jungle.", + "TEMPLE_RAIDER_Name": "Pillage de temple", + "THERE_ARE_SOME_WHO_CALL_HIM_Description": "Tuez Kim.", + "THERE_ARE_SOME_WHO_CALL_HIM_Name": "Certains l'appellent…", + "THE_CAVALRY_Description": "Équipez une monture.", + "THE_CAVALRY_Name": "La cavalerie", + "THE_GREAT_SOUTHERN_PLANTKILL_Description": "Éliminez Plantera, la monstruosité de broussailles dans les profondeurs de la jungle.", + "THE_GREAT_SOUTHERN_PLANTKILL_Name": "Le grand désherbage", + "THROWING_LINES_Description": "Lancez un yoyo.", + "THROWING_LINES_Name": "Lignes droites", + "TIL_DEATH_Description": "Tuez le marié.", + "TIL_DEATH_Name": "Jusqu'à ce que la mort…", + "TIMBER_Description": "Coupez votre premier arbre.", + "TIMBER_Name": "Du bois !!", + "TIN_FOIL_HATTER_Description": "Triomphez contre une invasion martienne, lorsque des êtres d'un autre monde viennent vous brouiller le cerveau et vous sonder à des endroits gênants.", + "TIN_FOIL_HATTER_Name": "Soucoupe en alu", + "TOPPED_OFF_Name": "À fond", + "TROUT_MONKEY_Description": "Terminez votre 25e quête pour le pêcheur.", + "TROUT_MONKEY_Name": "Serviable", + "VEHICULAR_MANSLAUGHTER_Description": "Éliminez un ennemi en l'écrasant avec un wagonnet.", + "VEHICULAR_MANSLAUGHTER_Name": "Meurte véhiculaire", + "WALK_THE_PLANK_Description": "Triomphez contre une invasion de pirates, un groupe de pilleurs venant des mers pour votre butin… et votre vie !", + "WALK_THE_PLANK_Name": "Supplice de la planche", + "WATCH_YOUR_STEP_Description": "Devenez victime d'un cruel piège souterrain.", + "WATCH_YOUR_STEP_Name": "Regardez où vous allez !", + "WHERES_MY_HONEY_Description": "Découvrez une grosse ruche d'abeilles aux fins fonds de la jungle.", + "WHERES_MY_HONEY_Name": "Où est mon miel ?", + "WINTERHEARTED_Description": "Éliminez la Reinde des glaces, la méchante sorcière des nuits glaciales.", + "WINTERHEARTED_Name": "Cœur d'hiver", + "WORM_FODDER_Name": "Nourriture pour ver", + "YOU_AND_WHAT_ARMY_Description": "Commandez neuf sbires invoqués en même temps.", + "YOU_AND_WHAT_ARMY_Name": "Vous et une armée de quoi ?", + "YOU_CAN_DO_IT_Description": "Survivez à la première nuit de votre personnage.", + "YOU_CAN_DO_IT_Name": "C'est possible !" + }, + "CLI": { + "AutomaticPortForward": "Rediriger le port automatiquement ? (o/n) :", + "AvailableCommands": "Commandes disponibles :", + "BanMessage": "Banni-e du serveur.", + "Ban_Command": "interdiction", + "Ban_Description": "Bannit un joueur du serveur.", + "Ban_Example": "bannit ", + "Ban_Usage": "Usage : bannit ", + "ChooseDifficulty": "Choisissez la difficulté :", + "ChooseEvil": "Choisissez le mal du monde :", + "ChooseSize": "Choisissez la taille :", + "ChooseWorld": "Choisissez le monde :", + "Clear_Command": "supprimer", + "Clear_Description": "Supprimez la fenêtre de la console.", + "ClientWasBooted": "{0} a été lancé : {1}", + "Corrupt": "Corruption", + "Crimson": "Carmin", + "Dawn_Command": "aube", + "Dawn_Description": "Changez l'heure de l'aube.", + "DeleteConfirmation": "Confirmer la suppression de {0} ?", + "DeleteWorld_Command": "j", + "DeleteWorld_Description": "Supprimer le monde", + "DeleteWorld_Example": " j", + "Dusk_Command": "crépuscule", + "Dusk_Description": "Changez l'heure du crépuscule.", + "EnterServerPassword": "Mot de passe du serveur (appuyez sur Entrée s'il n'y en a pas) :", + "EnterWorldName": "Saisissez le nom du monde :", + "ExitNoSave_Command": "quitter-sanssauvegarder", + "ExitNoSave_Description": "Fermez le serveur sans sauvegarder.", + "Exit_Command": "quitter", + "Exit_Description": "Fermez le serveur et sauvegardez.", + "FPS_Command": "ips", + "HelpHint": "Saisissez « aide » pour une liste de commandes.", + "Help_Command": "aide", + "Help_Description": "Affiche une liste de commandes.", + "InvalidCommand": "Commande non valide.", + "KickMessage": "Expulsé-e du serveur.", + "Kick_Command": "expulser", + "Kick_Description": "Expulse un joueur du serveur.", + "Kick_Example": "expulser ", + "Kick_Usage": "Usage : expulser ", + "ListeningOnPort": "Écoute sur port {0}", + "MaxPlayers_Command": "joueursmax", + "MaxPlayers_Description": "Imprimez le nombre maximal de joueurs.", + "Midnight_Command": "minuit", + "Midnight_Description": "Définissez l'heure sur minuit.", + "MOTD": "MOTD : {0}", + "MOTD_Command": "motd", + "MOTD_Description": "Imprimez le MOTD.", + "NewWorld_Command": "n", + "NewWorld_Description": "Nouveau monde", + "No": "no", + "NoMOTD": "Bienvenue dans {0} !", + "Noon_Command": "midi", + "Noon_Description": "Définissez l'heure sur midi.", + "NoPassword": "Aucun mot de passe défini.", + "NoPlayers": "Aucun joueur connecté.", + "OnePlayerConnected": "1 joueur connecté.", + "Password": "Mot de passe : {0}", + "PasswordDisabled": "Mot de passe désactivé", + "PasswordSet": "Mot de passe : {0}", + "Password_Command": "mot de passe", + "Password_Description": "Affichez le mot de passe.", + "PlayerLimit": "Limite de joueurs : {0}", + "PlayersConnected": "{0} joueurs connectés.", + "Playing_Command": "en train de jouer", + "Playing_Description": "Affiche la liste des joueurs.", + "Port": "Port : {0}", + "Port_Command": "port", + "Port_Description": "Imprimez le port d'écoute.", + "Random": "Aléatoire", + "Save_Command": "sauvegarder", + "Save_Description": "Sauvegardez le monde du jeu.", + "Say_Command": "dire", + "Say_Description": "Envoyez un message.", + "Say_Example": "dire ", + "Say_Usage": "Usage : dire ", + "Server": "Serveur de Terraria {0}", + "ServerMessage": " {0}", + "ServerStarted": "Serveur démarré", + "SetInitialPort": "Port du serveur (appuyez sur Entrée pour 7777) :", + "SetMOTD_Command": "motd", + "SetMOTD_Description": "Changez les MOTD.", + "SetMOTD_Example": "motd ", + "SetPassword_Command": "mot de passe", + "SetPassword_Description": "Changez le mot de passe.", + "SetPassword_Example": "mot de passe ", + "Settle_Command": "former", + "Settle_Description": "Formez toute l'eau.", + "ShortNo": "n", + "ShortYes": "o", + "Time": "Heure : {0}", + "Time_Command": "heure", + "Time_Description": "Affichez l'heure dans le jeu.", + "Version_Command": "version", + "Version_Description": "Imprimez le numéro de la version.", + "WaterIsAlreadySettling": "L'eau est déjà en cours de formation", + "Yes": "oui", + "DisplaySeed": "Graine du monde : {0}", + "EnterSeed": "Entrez la graine (laissez vide pour aléatoire) :", + "NoValidSeed": "Ce monde a été généré dans une ancienne version qui ne prenait pas en charge les graines.", + "Seed_Command": "graine", + "Seed_Description": "Affiche la graine du monde." + }, + "Controls": { + "RightClick": "Clic droit" + }, + "Currency": { + "Copper": "Cuivre", + "DefenderMedals": "Médailles de défenseur", + "Gold": "Or", + "Platinum": "Platine", + "Silver": "Argent" + }, + "Enemies": { + "MoonLord": "Seigneur de la lune", + "TheTwins": "Les Jumeaux" + }, + "Error": { + "BadHeaderBufferOverflow": "Un mauvais titre cause un excès de lecture de buffer.", + "DataSentAfterConnectionLost": "A essayé d'envoyer des données à un client après avoir perdu la connexion", + "Error": "Erreur", + "ExceptionNormal": " Exception normale : {0}", + "LaunchFromSteam": "Veuillez lancer le jeu depuis votre client Steam.", + "LoadFailed": "Échec du chargement !", + "LoadFailedNoBackup": "Échec du chargement ! Aucune sauvegarde trouvée.", + "NetMessageError": "Erreur du message {0}", + "ServerCrash": "Panne de serveur : {0}\n{1}\nVeuillez envoyer le crashlog.txt à support@terraria.org", + "TriedToRunServerTwice": "A essayé d'exécuter deux serveurs sur le même PC", + "UnableToCapture": "Impossible d'effectuer la capture.", + "UnableToLoadWorld": "Impossible de charger le monde :", + "UnableToWritePreferences": "Impossible d'écrire le fichier à : {0}", + "InvalidLobbyFlag": "-lobby flag used without \"{0}\" or \"{1}\". Ignoring it." + }, + "Game": { + "Actuators": "Actionneurs", + "BallBounceResult": "{0} a été touché-e {1} fois avant de toucher le sol !", + "BedObstructed": "Votre lit est bloqué.", + "BlueWires": "Câbles bleus", + "DroppedCoins": "a perdu {0}", + "EnemiesDefeatedAnnouncement": "Le/la {0}e {1} a été vaincu-e !", + "EnemiesDefeatedByAnnouncement": "{0} a vaincu {1} x {2} !", + "FinalWave": "Dernière vague", + "FirstWave": "Première vague", + "GreenWires": "Câbles verts", + "HasTeleportedTo": "{0} s'est téléporté-e vers {1}", + "HouseChair": "une chaise", + "HouseDoor": "une porte", + "HouseLightSource": "une source de lumière", + "HouseMissing_1": "Il manque {0} dans ce logement.", + "HouseMissing_2": "Il manque {0} et {1} dans ce logement.", + "HouseMissing_3": "Il manque {0}, {1} et {2} dans ce logement.", + "HouseMissing_4": "Il manque {0}, {1}, {2} et {3} dans ce logement.", + "HouseTable": "une table", + "InvasionPoints": "{0} points", + "InvasionWave_Type1": "{0}: {1}", + "InvasionWave_Type2": "{0}: {1} et {2}", + "InvasionWave_Type3": "{0}: {1}, {2} et {3}", + "InvasionWave_Type4": "{0}: {1}, {2}, {3} et {4}", + "InvasionWave_Type5": "{0}: {1}, {2}, {3}, {4} et {5}", + "InvasionWave_Type6": "{0}: {1}, {2}, {3}, {4}, {5} et {6}", + "InvasionWave_Type7": "{0}: {1}, {2}, {3}, {4}, {5}, {6} et {7}", + "InvasionWave_Type8": "{0}: {1}, {2}, {3}, {4}, {5}, {6}, {7} et {8}", + "JoinGreeting": "Joueurs actuels : {0}", + "NPCTitle": "{0} le/la {1}", + "PlayerDeathTime": "{0} a trouvé la mort il y a {1}", + "PvPFlag": "(JcJ)", + "RedWires": "Câbles rouges", + "SpawnPointRemoved": "Point de réapparition supprimé !", + "SpawnPointSet": "Point de réapparition défini !", + "TeleportTo": "Téléporter vers {0}", + "Time": "Temps : {0}", + "Wave": "Vague :{0}", + "WaveCleared": "Réussies {0}", + "WaveMessage": "Vague {0} : {1}", + "YellowWires": "Câbles jaunes", + "BirthdayParty_1": "On dirait que {0} organise une fête", + "BirthdayParty_2": "On dirait que {0} et {1} organisent une fête", + "BirthdayParty_3": "On dirait que {0}, {1} et {2} organisent une fête", + "RespawnInPrefix": "", + "RespawnInSuffix": "{0}" + }, + "GameUI": { + "ActuationDeviceOff": "Actionneur activé", + "ActuationDeviceOn": "Actionneur désactivé", + "BaitPower": "{0} % puissance d'appât", + "BaitRequired": "Nécessite un appât pour attraper des poissons", + "Bright": "Brillant", + "Buy": "Acheter", + "BuyWithValue": "Acheter ({0})", + "Cancel": "Annuler", + "Change": "Changer", + "Clear": "Effacer", + "Cloudy": "Nuageux", + "CompassCenter": "Centre", + "CompassEast": "Est de {0}", + "CompassWest": "Ouest de {0}", + "Depth": "{0}", + "DepthLevel": "Niveau", + "Disabled": "Désactivé", + "DPS": "{0} points de dégâts par seconde", + "EastWind": " ({0} mph E)", + "Enabled": "Désactivé", + "EnemiesNearby": "{0} à proximité !", + "Expert": "Expert", + "Faded": "Délavé", + "FirstQuarter": "Premier quartier", + "FishingPower": "{0} de puissance de pêche", + "FishingWarning": "Attention !", + "FullFishingPower": "{0} ({1} %) de puissance de pêche", + "FullMoon": "Pleine lune", + "HairStyle": "Coupe de cheveux", + "HeatDistortion": "Distorsion de chaleur : {0}", + "HeavyRain": "Pluie battante", + "Hidden": "Masqué", + "LayerCaverns": "Grottes", + "LayerSpace": "Espace", + "LayerSurface": "Surface", + "LayerUnderground": "Souterrain", + "LayerUnderworld": "Enfer", + "LightRain": "Pluie fine", + "MechanicalRulerOff": "Règle mécanique désactivée", + "MechanicalRulerOn": "Règle mécanique activée", + "MostlyCloudy": "Très nuageux", + "NewMoon": "Nouvelle lune", + "NoDPS": "N/D", + "NoEnemiesNearby": "Aucun ennemi à proximité", + "NoKillCount": "Compteur d'ennemis tués non disponible", + "NoRareCreatures": "Aucune créature rare à proximité", + "Normal": "Normal", + "NotEnoughWater": "Eau insuffisante !", + "NoTreasureNearby": "Aucun trésor à proximité", + "OneEnemyNearby": "1 ennemi à proximité !", + "OreDetected": "{0} détecté-e-s à proximité !", + "Overcast": "Couvert", + "PaintSprayerOff": "Pistolet à peinture désactivé", + "PaintSprayerOn": "Pistolet à peinture activé", + "PartlyCloudy": "Très couvert", + "PlayerDistance": "({0} m)", + "PrecentFishingPower": "{0} % de puissance de pêche", + "Rain": "Pluie", + "RulerOff": "Règle désactivée", + "RulerOn": "Règle activée", + "SettingsMenu": "Menu de paramètres", + "OpenFileFolder": "{$LegacyInterface.110}", + "Speed": "{0} mph", + "StormEffects": "Effets de tempête : {0}", + "ThirdQuarter": "Troisième quartier", + "WaningCrescent": "Lune décroissante", + "WaningGibbous": "Lune gibbeuse décroissante", + "WaxingCrescent": "lune croissante", + "WaxingGibbous": "Gibbeuse croissante", + "WestWind": " ({0} mph O)", + "WireModeForced": "Affichage mécanique : forcé", + "WireModeNormal": "Affichage mécanique : normal", + "Gameplay": "Gameplay", + "GameZoom": "Zoom : {0} % ({1} %)", + "LightingUpdateEveryFrameOff": "Rapid Lighting Off", + "LightingUpdateEveryFrameOn": "Rapid Lighting On", + "Misc": "Divers", + "QualityHigh": "Élevée", + "QualityLow": "Basse", + "QualityMedium": "Moyenne", + "QualityOff": "Désactivée", + "UIScale": "Échelle de l'interface : {0} % ({1} %)", + "WaveQuality": "Qualité des vagues : {0}", + "ZoomCategory": "Zoom" + }, + "Misc": { + "ForceWaterSettling": "Force la formation de l'eau.", + "ResolutionChanged": "Tire un nuage de spores", + "ShortDays": "j", + "ShortHours": "h", + "ShortMinutes": "m", + "ShortSeconds": "s", + "WaterSettled": "La formation de l'eau a été effectuée." + }, + "Net": { + "CheatingInvalid": "Tentative de triche détectée : expulsion non valide", + "CheatingLiquidSpam": "Tentative de triche détectée : spam liquide", + "CheatingProjectileSpam": "Tentative de triche détectée : spam de projectile", + "CheatingTileRemovalSpam": "Tentative de triche détectée : suppression d'une tuile spammée", + "CheatingTileSpam": "Tentative de triche détectée : ajout de tuile spammée", + "ClientConnecting": "{0} se connecte….", + "ClientPlaying": "({0}) {1} joue", + "ClientRequestedWorldInfo": "({0}) {1} a demandé des informations sur le monde", + "ClientsConnected": "{0} clients connectés", + "ClientSendingData": "({0}) {1} envoie des données au joueur…", + "ClientStatusComplete": "({0}) {1} {2} : Terminé !", + "ConnectingTo": "Connexion à {0}", + "EmptyName": "Champ du nom vide.", + "FoundServer": "Serveur trouvé", + "IsReceivingTileData": "reçoit les données sur les tuiles", + "LostConnection": "Connexion perdue", + "NameTooLong": "Le nom est trop long.", + "RequestingTileData": "Demande de données sur les tuiles", + "RequestingWorldInformation": "Demande d'informations sur le monde", + "SendingPlayerData": "Envoi de données au joueur…", + "ServerAutoShutdown": "Le joueur local est parti. Début de la fermeture automatique.", + "StatusComplete": "{0} : Terminé !", + "WaitingForClients": "En attente de clients…" + }, + "Social": { + "Joining": "Connexion…", + "JoiningFriend": "Connexion à {0}…", + "StatusInGame": "Joue en ligne.", + "StatusJoining": "Rejoint la partie." + }, + "UI": { + "Achievements": "Succès", + "Back": "Retour", + "Cancel": "Annuler", + "Delete": "Supprimer", + "Effects": "Effets", + "EnterButton": "Saisir", + "EnterMessage": "Saisissez un message :", + "EnterNewName": "Saisissez un nouveau nom :", + "Expert": "Expert", + "ExpertDescription": "(Difficulté et butin bien plus importants)", + "ExpertDescriptionFlavor": "La fortune et la gloire !", + "Favorite": "Favoris", + "Hardcore": "Difficile", + "Keybindings": "Raccourcis", + "Mediumcore": "Moyen", + "More": "plus", + "MoveOffCloud": "Retirer du nuage", + "MoveToCloud": "Déplacer vers le nuage", + "New": "Nouveau", + "Normal": "Normal", + "LightMode_White": "{$LegacyMenu.56}", + "LightMode_Color": "{$LegacyMenu.55}", + "Play": "Jouer", + "RestoreButton": "Restaurer", + "Save": "Sauvegarder", + "SelectPlayer": "Sélectionnez un joueur", + "SelectWorld": "Sélectionnez un monde", + "Softcore": "Facile", + "SpaceButton": "Espace", + "Submit": "Envoyer", + "Unfavorite": "Retirer des favoris", + "WorldCreatedFormat": "Créé : {0}", + "WorldSizeFormat": "Monde {0}", + "WorldSizeLarge": "Grand", + "WorldSizeMedium": "Moyen", + "WorldSizeSmall": "Petit", + "WorldSizeUnknown": "Inconnu", + "BartenderHelp": "Cristal Eternia", + "CopySeed": "Graine de copie : {0}", + "EnterSeed": "Entrez la graine (laissez vide pour aléatoire)", + "LoadingCode": "Chargement :", + "SeedCopied": "Graine copiée", + "ZoomIn": "{$LegacyMenu.168}", + "ZoomOut": "{$LegacyMenu.169}", + "Ellipsis": "...", + "LightMode_Retro": "{$LegacyMenu.57}", + "LightMode_Trippy": "{$LegacyMenu.58}", + "PlayerEmptyName": "{$Net.EmptyName}" + }, + "DeathSource": { + "NPC": "{0} par {1}.", + "Player": "{0} par {2} de {1}.", + "Projectile": "{0} par {1}." + }, + "DeathText": { + "Burned": "{0} n'a pas pu éteindre le feu.", + "Default": "{0}.", + "Drowned_1": "{0} a oublié de respirer.", + "Drowned_2": "{0} dort avec les poissons.", + "Drowned_3": "{0} a coulé.", + "Drowned_4": "{0} nourrit les poissons.", + "Electrocuted": "{0} n'a pas pu supporter les watts.", + "Fell_1": "{0} a fait une chute mortelle.", + "Fell_2": "{0} n'a pas rebondi.", + "Lava_1": "{0} a fondu.", + "Lava_2": "{0} s'est fait incinérer.", + "Lava_3": "{0} a tenté de nager dans la lave.", + "Lava_4": "{0} aime jouer dans le magma.", + "Petrified_1": "{0} a éclaté en mille morceaux.", + "Petrified_3": "{0} n'est plus que poussière à balayer.", + "Petrified_4": "{0} est un nouveau tas de poussière.", + "Poisoned": "{0} n'a pas trouvé l'antidote.", + "Slain": "{0} s'est fait tuer...", + "Stabbed": "{0} s'est fait poignarder.", + "Suffocated": "{0} ne pouvait plus respirer.", + "Teleport_1": "{0} n'a pas effectué sa matérialisation.", + "Teleport_2_Female": "{0} a les jambes à la place de la tête.", + "Teleport_2_Male": "{0} a les jambes à la place de la tête.", + "TriedToEscape": "{0} a tenté de s'échapper.", + "WasLicked": "{0} s'est fait lécher." + }, + "DeathTextGeneric": { + "ArmTornOff": "{0} s'est fait tordre les bras.", + "Chopped": "{0} s'est fait couper en morceaux.", + "Cut": "{0} s'est fait couper en deux.", + "Decapitated": "{0} s'est fait décapiter.", + "Destroyed": "{0} s'est fait détruire.", + "Dissected": "{0} s'est fait disséquer brutalement.", + "EntrailsRippedOut": "{0} s'est fait arracher les entrailles.", + "Eviscerated": "{0} s'est fait éventrer.", + "ExtremitiesDetached": "{0} s'est fait détacher les membres.", + "FaceTornOff": "{0} s'est fait arracher le visage.", + "Flailing": "{0} a enfin fini de se débattre.", + "HeadRemoved": "{0} s'est fait couper la tête.", + "Impaled": "{0} s'est fait empaler.", + "InnardsBecameOutards": "{0} a regardé ses tripes sortir.", + "Mangled": "{0} s'est fait broyer le corps.", + "Massacred": "{0} s'est fait massacrer.", + "Murdered": "{0} s'est fait assassiner.", + "PileOfFlesh": "{0} s'est fait transformer en tas de chair.", + "Plead": "{0} a reçu satisfaction à ses supplications de mort", + "Removed": "{0} s'est fait éliminer de {1}", + "Ripped": "{0} s'est fait arracher la chair des os.", + "Ruptured": "{0} s'est fait éclater les organes vitaux.", + "SkullCrushed": "{0} s'est fait écraser le crâne.", + "Slain": "{0} s'est fait tuer.", + "Snapped": "{0} s'est fait cassé en deux.", + "TornInHalf": "{0} s'est fait couper en deux." + }, + "DungeonDefenders2": { + "BartenderWarning": "Le cristal Eternia rejette cette zone et disparait instantanément ; le tavernier a mentionné qu'il devrait se trouver dans une grande zone de plaine...", + "CantSummonTower": "It doesn't seem to work without an Etheria Crystal nearby...", + "InvasionProgressTitle": "Armée de l'ancien", + "InvasionStart": "L'armée de l'ancien approche !", + "InvasionWin": "L'armée de l'ancien a été vaincue !", + "WaveComplete": "Vague terminée !" + }, + "Key": { + "DOWN": "BAS", + "UP": "HAUT" + }, + "Language": { + "English": "English (Anglais)", + "German": "Deutsch (Allemand)", + "Italian": "Italiano (Italien)", + "French": "Français", + "Spanish": "Español (Espagnol)", + "Russian": "Русский (Russe)", + "Chinese": "简体中文 (Chinois simplifié)", + "Portuguese": "Português brasileiro (Portugais (Brésil))", + "Polish": "Polski (Polonais)" + }, + "RandomWorldName_Composition": { + "6": "{Adjective} {Location}" + } +} \ No newline at end of file diff --git a/Localization/Content/fr-FR/Game.json b/Localization/Content/fr-FR/Game.json new file mode 100644 index 0000000..f16b566 --- /dev/null +++ b/Localization/Content/fr-FR/Game.json @@ -0,0 +1,780 @@ +{ + "Announcement": { + "HasBeenDefeated_Plural": "{0} ont été vaincus !", + "HasBeenDefeated_Single": "{0} a été vaincu !", + "HasAwoken": "{0} s'est réveillé-e !", + "HasArrived": "{0} est arrivé-e !" + }, + "ArmorSetBonus": { + "MetalTier1": "2 points de défense", + "MetalTier2": "3 points de défense", + "CobaltRanged": "20 % de chances de ne pas utiliser de munitions", + "MythrilCaster": "-17 % d'usage de mana", + "MythrilMelee": "+5 % de chances de coup critique au corps à corps", + "MythrilRanged": "20 % de chances de ne pas utiliser de munitions", + "AdamantiteCaster": "-19 % d'usage de mana", + "AdamantiteMelee": "+18 % de vitesse de déplacement et au corps à corps", + "AdamantiteRanged": "25 % de chances de ne pas utiliser de munitions", + "ShadowScale": "+15 % de vitesse de déplacement", + "Wood": "1 point de défense", + "Crimson": "Augmente considérablement la régénération de santé", + "Frost": "Les attaques au corps à corps et à distance infligent brûledegivre", + "Tiki": "Augmente votre nombre maximal de sbires", + "Palladium": "Augmente considérablement la régénération de santé après avoir frappé un ennemi", + "Orichalcum": "Des pétales de fleur tombent et infligent des dégâts supplémentaires à votre cible", + "Titanium": "Immunise après avoir touché un ennemi", + "Chlorophyte": "Invoque une feuille de cristal puissante pour tirer sur les ennemis à proximité", + "Wizard": "+10 % de chances de coup critique magique", + "Meteor": "Le pistolet spatial consomme 0 point de mana", + "SpectreHealing": "Les dégâts magiques infligés aux ennemis soignent le joueur à la santé la plus faible", + "Shroomite": "L'immobilité vous met en mode furtif,\naugmentant les capacités à distance et réduisant les chances que les ennemis vous visent", + "Platinum": "4 points de défense", + "Pumpkin": "+10 % de dégâts", + "Spooky": "+25 % de dégâts des sbires", + "SpectreDamage": "Les dégâts magiques infligés blessent les ennemis à proximité", + "MagicHat": "+60 points de mana max", + "BeetleDefense": "Les scarabées vous protègent des dégâts", + "BeetleDamage": "Les scarabées augmentent vos dégâts et votre vitesse au corps à corps", + "Bee": "+10 % de dégâts des sbires", + "Spider": "+12 % de dégâts des sbires", + "Vortex": "Effectuez un double clic sur {0} pour passer en mode furtif :\naugmente les capacités à distance et réduit les chances que les ennemis vous visent, mais ralentit la vitesse de déplacement", + "Stardust": "Effectuez un double clic sur {0} pour diriger votre gardien vers un lieu", + "Forbidden": "Effectuez un double clic sur {0} pour appeler une tempête ancienne à l'emplacement du curseur", + "Jungle": "-16 % d'usage de mana", + "Molten": "+17 % de dégâts supplémentaires au corps à corps", + "Mining": "+30 % de vitesse d'extraction", + "CobaltCaster": "-14 % d'usage de mana", + "CobaltMelee": "+15 % de vitesse au corps à corps", + "ApprenticeTier2": "Augmente votre nombre maximal de sentinelles\nVision et portée des sentinelles enflammées largement augmentées", + "ApprenticeTier3": "Augmente votre nombre maximal de sentinelles\nAméliore considérablement l'efficacité des sentinelles enflammées", + "HuntressTier2": "Augmente votre nombre maximal de sentinelles\nLes pièges explosifs rechargent plus rapidement et jettent de l'huile sur les ennemis\nEmbrasez les ennemis huilés pour infliger des dégâts supplémentaires", + "HuntressTier3": "Augmente votre nombre maximal de sentinelles\nAméliore considérablement l'efficacité des pièges explosifs", + "MonkTier2": "Augmente votre nombre maximal de sentinelles\nL'aura foudroyante a des chances de coup critique et frappe plus rapidement", + "MonkTier3": "Augmente votre nombre maximal de sentinelles\nAméliore considérablement l'efficacité d'aura foudroyante", + "SquireTier2": "Augmente votre nombre maximal de sentinelles\nBaliste transperce plus de cibles et panique lorsque vous subissez des dégâts", + "SquireTier3": "Augmente votre nombre maximal de sentinelles\nAméliore considérablement l'efficacité de Baliste" + }, + "BuffDescription": { + "AmmoBox": "20 % de chances de ne pas utiliser de munitions", + "AmmoReservation": "20 % de chances de ne pas utiliser de munitions", + "Archery": "+20 % de dégâts et de vitesse des flèches", + "BabyDinosaur": "Un petit dinosaure vous suit", + "BabyEater": "Un petit Dévoreur d'âmes vous suit", + "BabyFaceMonster": "Un petit monstre grimaçant vous suit", + "BabyGrinch": "Un petit grinch vous suit", + "BabyHornet": "Il vous prend pour sa mère", + "BabyPenguin": "Je crois qu'il veut votre poisson", + "BabySkeletronHead": "Sans commentaires...", + "BabySlime": "La petite gelée combattra à vos côtés", + "BabySnowman": "Un petit homme de neige vous suit", + "BabyTruffle": "Il est trooooop mignon !", + "BallistaPanic": "Vos balistes paniquent et tirent rapidement !", + "BasiliskMount": "Fonce dans tout... et TOUT LE MONDE !", + "Battle": "Taux d'apparition d'ennemis augmenté", + "BeeMount": "BzzzBzzBZZZZBzzz", + "BeetleEndurance1": "-15 % de dégâts subis", + "BeetleEndurance2": "-30 % de dégâts subis", + "BeetleEndurance3": "-45 % de dégâts subis", + "BeetleMight1": "+10 % de dégâts et de vitesse au corps à corps", + "BeetleMight2": "+20 % de dégâts et de vitesse au corps à corps", + "BeetleMight3": "+30 % de dégâts et de vitesse au corps à corps", + "BetsysCurse": "Défense affaiblie", + "Bewitched": "Nombre maximal de sbires augmenté", + "BlackCat": "Un chat noir vous suit", + "Blackout": "Vision de jour très réduite", + "Bleeding": "Impossible de régénérer la santé", + "BoneJavelin": "Saignement grave", + "BrokenArmor": "Défense réduite de moitié", + "Builder": "Vitesse et portée du placement augmentées", + "BunnyMount": "Vous avez envie de carottes", + "Burning": "Perte de santé et déplacements ralentis", + "DesertMinecartRight": "{$BuffDescription.MinecartRight}", + "Campfire": "Régénération de santé légèrement augmentée", + "ChaosState": "Utiliser le bâton de discorde prendra la vie", + "Chilled": "Votre vitesse de déplacement a été réduite", + "Clairvoyance": "Pouvoirs magiques augmentés", + "CompanionCube": "Ne menacera jamais de vous poignarder, et d'ailleurs, ne peut pas parler", + "Confused": "Déplacement inversé", + "Crate": "Plus de chances de pêcher une caisse", + "CrimsonHeart": "Un cœur magique qui donne de la lumière", + "Cursed": "Impossible d'utiliser des objets", + "CursedInferno": "Perte de santé", + "CursedSapling": "Un arbuste maudit vous suit", + "CuteFishronMount": "Ne le faites pas ramper.", + "Dangersense": "Vous pouvez voir les dangers à proximité", + "Darkness": "Vision réduite", + "Daybreak": "Incenerated by solar rays", + "Dazed": "Déplacements considérablement ralentis", + "DeadlySphere": "La sphère mortelle combattra à vos côtés", + "DrillMount": "À dos de foreuse volante", + "DryadsWard": "Le pouvoir de la nature vous protège", + "DryadsWardDebuff": "Le pouvoir de la nature vous force la main", + "Electrified": "Vous ne pouvez pas bouger", + "Endurance": "-10 % de dégâts", + "EyeballSpring": "Un globe oculaire sur ressort vous suit", + "FairyBlue": "Une fée vous suit", + "FairyGreen": "Une fée vous suit", + "FairyRed": "Une fée vous suit", + "Featherfall": "Appuyez sur HAUT ou BAS pour contrôler la vitesse de descente", + "DesertMinecartLeft": "{$BuffDescription.MinecartLeft}", + "Flipper": "Déplacez-vous normalement dans l'eau", + "Frostburn": "C'est soit très chaud, soit très froid. Dans les deux cas, ça fait VRAIMENT mal", + "Frozen": "Vous ne pouvez pas bouger !", + "Gills": "Respirez de l'eau au lieu de l'air", + "Gravitation": "Appuyez sur HAUT pour inverser la gravité", + "HeartLamp": "Régénération de santé augmentée", + "Heartreach": "Portée de collecte des cœurs augmentée", + "Honey": "Régénération de santé augmentée", + "HornetMinion": "Le frelon combattra à vos côtés", + "Horrified": "Vous avez vu quelque chose de terrible, il n'y a pas d'échappatoire. ", + "Hunter": "Montre où se trouvent les ennemis", + "IceBarrier": "-25 % de dégâts subis", + "Ichor": "Défense réduite", + "ImpMinion": "Le diablotin combattra à vos côtés", + "Inferno": "Les ennemis à proximité prennent feu", + "Invisibility": "Rend invisible", + "Ironskin": "+8 points de défense", + "LeafCrystal": "Lance des feuilles de cristal aux ennemis à proximité", + "Lifeforce": "+20 % de santé max", + "Lovestruck": "Il y a de l'amour dans l'air !", + "MagicLantern": "Une lanterne enchantée éclaire votre chemin", + "MagicPower": "+20 % de dégâts magiques", + "ManaRegeneration": "Régénération de mana augmentée", + "ManaSickness": "Dégâts magiques réduits de ", + "Merfolk": "Respire et se déplace facilement sous l'eau", + "Midas": "Perd plus d'argent en mourant", + "MinecartLeft": "En wagonnet", + "MinecartLeftMech": "En wagonnet", + "MinecartLeftWood": "En wagonnet", + "MinecartRight": "En wagonnet", + "MinecartRightMech": "En wagonnet", + "MinecartRightWood": "En wagonnet", + "MiniMinotaur": "Comment vaincre un mini Minotaure ?", + "Mining": "+25 % de vitesse d'extraction", + "MonsterBanner": "Dégâts et défense augmentés avec :", + "MoonLeech": "Vous ne pouvez pas absorber les effets de soin", + "NebulaUpDmg1": "+15 % de dégâts", + "NebulaUpDmg2": "+30 % de dégâts", + "NebulaUpDmg3": "+45 % de dégâts", + "NebulaUpLife1": "Régénération de santé augmentée", + "NebulaUpLife2": "Régénération de santé augmentée", + "NebulaUpLife3": "Régénération de santé augmentée", + "NebulaUpMana1": "Régénération de mana augmentée", + "NebulaUpMana2": "Régénération de mana augmentée", + "NebulaUpMana3": "Régénération de mana augmentée", + "NightOwl": "Vision de nuit améliorée", + "NoBuilding": "Vous avez perdu le pouvoir de création !", + "ObsidianSkin": "Immunité contre la lave", + "Obstructed": "Vous ne voyez rien !", + "OgreSpit": "Déplacements considérablement réduits", + "Oiled": "Vous subissez plus de dégâts par le feu", + "OnFire": "Lente perte de santé", + "PaladinsShield": "25 % des dégâts subis seront redirigés vers un autre joueur", + "Panic": "Vitesse de déplacement augmentée", + "ParryDamageBuff": "+500 % de dégâts pour la prochaine attaque au corps à corps", + "PeaceCandle": "Taux d'apparition de monstres réduit", + "PetBunny": "Je crois qu'il veut votre carotte", + "PetDD2Dragon": "Un hoardagron vous suit", + "PetDD2Gato": "Un gato à hélice vous suit", + "PetDD2Ghost": "Un allumèche vous suit", + "PetLizard": "Tranquille comme un reptile", + "FishMinecartRight": "{$BuffDescription.MinecartRight}", + "PetSapling": "Un petit arbuste vous suit", + "PetSpider": "Une araignée vous suit", + "PetTurtle": "Amusez-vous bien avec votre tortue !", + "PigronMount": "Maintenant, tu me vois...", + "PirateMinion": "Le pirate combattra à vos côtés", + "Poisoned": "Lente perte de santé", + "PotionSickness": "Impossible de consommer des objets de soin", + "Puppy": "Un chiot vous suit", + "Pygmies": "Les pygmées combattront à vos côtés", + "Rabies": "Dégâts augmentés, régénération de santé réduite, cause des effets sur l'état", + "Rage": "+10 % de chances de coup critique", + "RapidHealing": "Régénération de santé considérablement augmentée", + "Ravens": "Les corbeaux attaqueront vos ennemis", + "Regeneration": "Régénère la santé", + "Rudolph": "À dos du renne au nez rouge", + "ScutlixMount": "Pan pan", + "ShadowDodge": "Vous éviterez la prochaine attaque", + "ShadowFlame": "Perte de santé", + "ShadowOrb": "Un orbe magique qui donne de la lumière", + "SharknadoMinion": "Le requinade combattra à vos côtés", + "Sharpened": "Les armes de corps à corps pénètrent les armures", + "Shine": "Émet de la lumière", + "Silenced": "Impossible d'utiliser les objets nécessitant du mana", + "Slimed": "Une matière visqueuse et collante vous enveloppe", + "SlimeMount": "BOOOIIINNNG !", + "Slow": "Vitesse de déplacement réduite", + "SolarShield1": "-30 % de dégâts subis, repousse les ennemis quand vous subissez des dégâts", + "SolarShield2": "-30 % de dégâts subis, repousse les ennemis quand vous subissez des dégâts", + "SolarShield3": "-30 % de dégâts subis, repousse les ennemis quand vous subissez des dégâts", + "Sonar": "Vous voyez ce qui mord à l'hameçon", + "SoulDrain": "Régénération de santé augmentée", + "Spelunker": "Montre les emplacements de trésors et de minerais", + "SpiderMinion": "L'araignée combattra à vos côtés", + "Squashling": "Un potiron vous suit", + "StardustDragonMinion": "Le dragon astral vous protègera", + "StardustGuardianMinion": "Le gardien astral vous protègera", + "StardustMinion": "La cellule astrale combattra à vos côtés", + "StardustMinionBleed": "being eaten by cells", + "StarInBottle": "Régénération de mana augmentée", + "Stinky": "Vous empestez", + "Stoned": "Vous êtes complètement pétrifié", + "Suffocation": "Perte de santé", + "Summoning": "Nombre maximal de sbires augmenté", + "Sunflower": "Vitesse de déplacement augmentée et apparition de monstres réduite", + "SuspiciousTentacle": "Un œil suspect qui donne de la lumière", + "Swiftness": "+25 % de vitesse de déplacement", + "TheTongue": "La bouche vous aspire", + "Thorns": "Les agresseurs subissent également des dégâts", + "TikiSpirit": "Un esprit amical vous suit", + "Tipsy": "Capacités au corps à corps augmentées, défense affaiblie", + "Titan": "Recul augmenté", + "TurtleMount": "Lentement sur terre, à toute allure en mer", + "TwinEyesMinion": "Les jumeaux combattront à vos côtés", + "UFOMinion": "L'ovni combattra à vos côtés", + "UFOMount": "Heureusement que vous aviez un MAC", + "UnicornMount": "Chargez droit devant... en toute splendeur !", + "Venom": "Perte de santé", + "VortexDebuff": "La gravité autour de vous est déformée", + "Warmth": "Dégâts de sources froides réduits", + "WaterCandle": "Taux d'apparition de monstres augmenté", + "WaterWalking": "Appuyez sur BAS pour entrer dans l'eau", + "Weak": "Capacités physiques réduites", + "WeaponImbueConfetti": "Les attaques au corps à corps font apparaitre des confettis", + "WeaponImbueCursedFlames": "Les attaques au corps à corps infligent des flammes maudites aux ennemis.", + "WeaponImbueFire": "Les attaques au corps à corps mettent le feu aux ennemis", + "WeaponImbueGold": "Les attaques au corps à corps font perdre plus d'or aux ennemis", + "WeaponImbueIchor": "Les attaques au corps à corps affaiblissent la défense des ennemis", + "WeaponImbueNanites": "Les attaques au corps à corps rendent les ennemis confus", + "WeaponImbuePoison": "Les attaques au corps à corps empoisonnent les ennemis", + "WeaponImbueVenom": "Les attaques au corps à corps infligent des dégâts de venin à vos cibles", + "Webbed": "Vous ne pouvez pas bouger", + "FishMinecartLeft": "{$BuffDescription.MinecartLeft}", + "Werewolf": "Capacités physiques augmentées", + "Wet": "Vous dégoulinez d'eau", + "WindPushed": "Le vent vous fait bouger !", + "Wisp": "Une volute vous suit", + "WitheredArmor": "Votre armure est affaiblie !", + "WitheredWeapon": "Vos attaques sont plus faibles !", + "Wrath": "+10 % de dégâts", + "ZephyrFish": "Il aime nager autour de vous", + "BeeMinecartRight": "{$BuffDescription.MinecartRight}", + "BeeMinecartLeft": "{$BuffDescription.MinecartLeft}", + "LadybugMinecartRight": "{$BuffDescription.MinecartRight}", + "LadybugMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PigronMinecartRight": "{$BuffDescription.MinecartRight}", + "PigronMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SunflowerMinecartRight": "{$BuffDescription.MinecartRight}", + "SunflowerMinecartLeft": "{$BuffDescription.MinecartLeft}", + "HellMinecartRight": "{$BuffDescription.MinecartRight}", + "HellMinecartLeft": "{$BuffDescription.MinecartLeft}", + "ShroomMinecartRight": "{$BuffDescription.MinecartRight}", + "ShroomMinecartLeft": "{$BuffDescription.MinecartLeft}", + "AmethystMinecartRight": "{$BuffDescription.MinecartRight}", + "AmethystMinecartLeft": "{$BuffDescription.MinecartLeft}", + "TopazMinecartRight": "{$BuffDescription.MinecartRight}", + "TopazMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SapphireMinecartRight": "{$BuffDescription.MinecartRight}", + "SapphireMinecartLeft": "{$BuffDescription.MinecartLeft}", + "EmeraldMinecartRight": "{$BuffDescription.MinecartRight}", + "EmeraldMinecartLeft": "{$BuffDescription.MinecartLeft}", + "RubyMinecartRight": "{$BuffDescription.MinecartRight}", + "RubyMinecartLeft": "{$BuffDescription.MinecartLeft}", + "DiamondMinecartRight": "{$BuffDescription.MinecartRight}", + "DiamondMinecartLeft": "{$BuffDescription.MinecartLeft}", + "AmberMinecartRight": "{$BuffDescription.MinecartRight}", + "AmberMinecartLeft": "{$BuffDescription.MinecartLeft}", + "BeetleMinecartRight": "{$BuffDescription.MinecartRight}", + "BeetleMinecartLeft": "{$BuffDescription.MinecartLeft}", + "MeowmereMinecartRight": "{$BuffDescription.MinecartRight}", + "MeowmereMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PartyMinecartRight": "{$BuffDescription.MinecartRight}", + "PartyMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PirateMinecartRight": "{$BuffDescription.MinecartRight}", + "PirateMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SteampunkMinecartRight": "{$BuffDescription.MinecartRight}", + "SteampunkMinecartLeft": "{$BuffDescription.MinecartLeft}", + "CoffinMinecartRight": "{$BuffDescription.MinecartRight}", + "CoffinMinecartLeft": "{$BuffDescription.MinecartLeft}" + }, + "BuffName": { + "AmmoBox": "Boîte de munitions", + "AmmoReservation": "Réserve de munitions", + "Archery": "Archerie", + "BabyDinosaur": "Petit dinosaure", + "BabyEater": "Petit dévoreur", + "BabyFaceMonster": "Petit monstre grimaçant", + "BabyGrinch": "Petit grinch", + "BabyHornet": "Petit frelon", + "BabyPenguin": "Petit manchot", + "BabySkeletronHead": "Petite tête de Squeletron", + "BabySlime": "Petite gelée", + "BabySnowman": "Petit homme de neige", + "BabyTruffle": "Petite Truffe", + "BallistaPanic": "Panique de Baliste !", + "BasiliskMount": "Monture basilic", + "Battle": "Bataille", + "BeeMount": "Monture abeille", + "BeetleEndurance1": "Endurance de scarabée", + "BeetleEndurance2": "Endurance de scarabée", + "BeetleEndurance3": "Endurance de scarabée", + "BeetleMight1": "Puissance de scarabée", + "BeetleMight2": "Puissance de scarabée", + "BeetleMight3": "Puissance de scarabée", + "BetsysCurse": "Malédiction de Betsy", + "Bewitched": "Envoûtement", + "BlackCat": "Chat noir", + "Blackout": "Trou noir", + "Bleeding": "Saignement", + "BoneJavelin": "Pénétration", + "BrokenArmor": "Armure brisée", + "Builder": "Construction", + "BunnyMount": "Monture lapin", + "Burning": "Brûlure", + "Calm": "Calme", + "Campfire": "Petit feu", + "ChaosState": "Chaos", + "Chilled": "Refroidissement", + "Clairvoyance": "Clairvoyance", + "CompanionCube": "Familier cube", + "Confused": "Confusion", + "Crate": "Caisse", + "CrimsonHeart": "Cœur carmin", + "Cursed": "Malédiction", + "CursedInferno": "Brasier maudit", + "CursedSapling": "Arbuste maudit", + "CuteFishronMount": "Monture Dracosson adorable", + "Dangersense": "Sens du danger", + "Darkness": "Obscurité", + "Daybreak": "Jour perçant", + "Dazed": "Étourdissement", + "DeadlySphere": "Sphère mortelle", + "DrillMount": "Monture foreuse", + "DryadsWard": "Bénédiction de dryade", + "DryadsWardDebuff": "Fléau de dryade", + "Electrified": "Électrification", + "Endurance": "Endurance", + "EyeballSpring": "Globe oculaire sur ressort", + "FairyBlue": "Fée", + "FairyGreen": "Fée", + "FairyRed": "Fée", + "Featherfall": "Chute lente", + "Fishing": "Pêche", + "Flipper": "Palmes", + "Frostburn": "Brûledegivre", + "Frozen": "Congélation", + "Gills": "Nageoires", + "Gravitation": "Gravitation", + "HeartLamp": "Lampe cœur", + "Heartreach": "Portée de cœur", + "Honey": "Miel", + "HornetMinion": "Frelon", + "Horrified": "Horreur", + "Hunter": "Chasseur", + "IceBarrier": "Barrière de glace", + "Ichor": "Ichor", + "ImpMinion": "Diablotin", + "Inferno": "Brasier", + "Invisibility": "Invisibilité", + "Ironskin": "Peau de fer", + "LeafCrystal": "Cristal de feuille", + "Lifeforce": "Force vitale", + "Lovestruck": "Coup de foudre", + "MagicLantern": "Lanterne magique", + "MagicPower": "Puissance magique", + "ManaRegeneration": "Régénération de mana", + "ManaSickness": "Mana affaibli", + "Merfolk": "Sirènes", + "Midas": "Midas", + "MinecartLeft": "Wagonnet", + "MinecartLeftMech": "Wagonnet", + "MinecartLeftWood": "Wagonnet", + "MinecartRight": "Wagonnet", + "MinecartRightMech": "Wagonnet", + "MinecartRightWood": "Wagonnet", + "MiniMinotaur": "Mini Minotaure", + "Mining": "Extraction", + "MonsterBanner": "Bannière", + "MoonLeech": "Morsure lunaire", + "NebulaUpDmg1": "Nébuleuse de dégâts", + "NebulaUpDmg2": "Nébuleuse de dégâts", + "NebulaUpDmg3": "Nébuleuse de dégâts", + "NebulaUpLife1": "Nébuleuse de santé", + "NebulaUpLife2": "Nébuleuse de santé", + "NebulaUpLife3": "Nébuleuse de santé", + "NebulaUpMana1": "Nébuleuse de mana", + "NebulaUpMana2": "Nébuleuse de mana", + "NebulaUpMana3": "Nébuleuse de mana", + "NightOwl": "Hibou", + "NoBuilding": "Onde créative", + "ObsidianSkin": "Peau d'obsidienne", + "Obstructed": "Obstruction", + "OgreSpit": "Suintement", + "Oiled": "Huilé", + "OnFire": "En feu !", + "PaladinsShield": "Bouclier de paladin", + "Panic": "Panique !", + "ParryDamageBuff": "Moment frappant", + "PeaceCandle": "Bougie de paix", + "PetBunny": "Familier lapin", + "PetDD2Dragon": "Hoardagron", + "PetDD2Gato": "Gato à hélice", + "PetDD2Ghost": "Allumèche", + "PetLizard": "Familier lézard", + "PetParrot": "Familier perroquet", + "PetSapling": "Familier arbuste", + "PetSpider": "Familier araignée", + "PetTurtle": "Familier tortue", + "PigronMount": "Monture Drachon", + "PirateMinion": "Pirate", + "Poisoned": "Empoisonné", + "PotionSickness": "Potion affaiblie", + "Puppy": "Chiot", + "Pygmies": "Pygmées", + "Rabies": "Morsure sauvage", + "Rage": "Rage", + "RapidHealing": "Soin rapide", + "Ravens": "Corbeaux", + "Regeneration": "Régénération", + "Rudolph": "Rudolphe", + "ScutlixMount": "Monture Scutlix", + "DesertMinecartRight": "{$BuffName.MinecartRight}", + "ShadowFlame": "Flamme d'ombre", + "ShadowOrb": "Orbe de l'ombre", + "SharknadoMinion": "Requinade", + "Sharpened": "Aiguisé", + "Shine": "Brillance", + "Silenced": "Silence forcé", + "Slimed": "Gelée", + "SlimeMount": "Monture gelée", + "Slow": "Lenteur", + "SolarShield1": "Flammes solaires", + "SolarShield2": "Flammes solaires", + "SolarShield3": "Flammes solaires", + "Sonar": "Sonar", + "SoulDrain": "Absorbeur de santé", + "Spelunker": "Spéléologue", + "SpiderMinion": "Araignée", + "Squashling": "Potiron", + "StardustDragonMinion": "Dragon astral", + "StardustGuardianMinion": "Gardien astral", + "StardustMinion": "Cellule astrale", + "StardustMinionBleed": "Celled", + "StarInBottle": "Étoile en bouteille", + "Stinky": "Puanteur", + "Stoned": "Lapidation", + "Suffocation": "Suffocation", + "Summoning": "Invocation", + "Sunflower": "Heureux !", + "SuspiciousTentacle": "Œil suspect", + "Swiftness": "Rapidité", + "TheTongue": "La Langue", + "Thorns": "Épines", + "TikiSpirit": "Esprit Tiki", + "Tipsy": "Pompette", + "Titan": "Titan", + "TurtleMount": "Monture tortue", + "TwinEyesMinion": "Jumeaux", + "UFOMinion": "Ovni", + "UFOMount": "Monture ovni", + "UnicornMount": "Monture licorne", + "Venom": "Venin", + "VortexDebuff": "Distorsion", + "Warmth": "Chaleur", + "WaterCandle": "Bougie d'eau", + "WaterWalking": "Marcher sur l'eau", + "Weak": "Faible", + "WeaponImbueConfetti": "Infusion d'arme : Confettis", + "WeaponImbueCursedFlames": "Infusion d'arme : Flammes maudites", + "WeaponImbueFire": "Infusion d'arme : Feu", + "WeaponImbueGold": "Infusion d'arme : Or", + "WeaponImbueIchor": "Infusion d'arme : Ichor", + "WeaponImbueNanites": "Infusion d'arme : Nanites", + "WeaponImbuePoison": "Infusion d'arme : Poison", + "WeaponImbueVenom": "Infusion d'arme : Venin", + "Webbed": "En toile", + "WellFed": "Sustenté", + "Werewolf": "Loup-garou", + "Wet": "Mouillé", + "WindPushed": "Vent puissant", + "Wisp": "Volute", + "WitheredArmor": "Armure abimée", + "WitheredWeapon": "Arme abimée", + "Wrath": "Colère", + "ZephyrFish": "Poisson-zéphyr", + "DesertMinecartLeft": "{$BuffName.MinecartLeft}", + "FishMinecartRight": "{$BuffName.MinecartRight}", + "FishMinecartLeft": "{$BuffName.MinecartLeft}", + "BeeMinecartRight": "{$BuffName.MinecartRight}", + "BeeMinecartLeft": "{$BuffName.MinecartLeft}", + "LadybugMinecartRight": "{$BuffName.MinecartRight}", + "LadybugMinecartLeft": "{$BuffName.MinecartLeft}", + "PigronMinecartRight": "{$BuffName.MinecartRight}", + "PigronMinecartLeft": "{$BuffName.MinecartLeft}", + "SunflowerMinecartRight": "{$BuffName.MinecartRight}", + "SunflowerMinecartLeft": "{$BuffName.MinecartLeft}", + "HellMinecartRight": "{$BuffName.MinecartRight}", + "HellMinecartLeft": "{$BuffName.MinecartLeft}", + "ShroomMinecartRight": "{$BuffName.MinecartRight}", + "ShroomMinecartLeft": "{$BuffName.MinecartLeft}", + "AmethystMinecartRight": "{$BuffName.MinecartRight}", + "AmethystMinecartLeft": "{$BuffName.MinecartLeft}", + "TopazMinecartRight": "{$BuffName.MinecartRight}", + "TopazMinecartLeft": "{$BuffName.MinecartLeft}", + "SapphireMinecartRight": "{$BuffName.MinecartRight}", + "SapphireMinecartLeft": "{$BuffName.MinecartLeft}", + "EmeraldMinecartRight": "{$BuffName.MinecartRight}", + "EmeraldMinecartLeft": "{$BuffName.MinecartLeft}", + "RubyMinecartRight": "{$BuffName.MinecartRight}", + "RubyMinecartLeft": "{$BuffName.MinecartLeft}", + "DiamondMinecartRight": "{$BuffName.MinecartRight}", + "DiamondMinecartLeft": "{$BuffName.MinecartLeft}", + "AmberMinecartRight": "{$BuffName.MinecartRight}", + "AmberMinecartLeft": "{$BuffName.MinecartLeft}", + "BeetleMinecartRight": "{$BuffName.MinecartRight}", + "BeetleMinecartLeft": "{$BuffName.MinecartLeft}", + "MeowmereMinecartRight": "{$BuffName.MinecartRight}", + "MeowmereMinecartLeft": "{$BuffName.MinecartLeft}", + "PartyMinecartRight": "{$BuffName.MinecartRight}", + "PartyMinecartLeft": "{$BuffName.MinecartLeft}", + "PirateMinecartRight": "{$BuffName.MinecartRight}", + "PirateMinecartLeft": "{$BuffName.MinecartLeft}", + "SteampunkMinecartRight": "{$BuffName.MinecartRight}", + "SteampunkMinecartLeft": "{$BuffName.MinecartLeft}", + "CoffinMinecartRight": "{$BuffName.MinecartRight}", + "CoffinMinecartLeft": "{$BuffName.MinecartLeft}" + }, + "MapObject": { + "Adamantite": "Adamantite", + "AnimalSkin": "Peau d'animal", + "Anvil": "Enclume", + "Banner": "Bannière", + "BeeHive": "Ruche", + "Chair": "Chaise", + "Chandelier": "Chandelier", + "Chlorophyte": "Chlorophyte", + "ChristmasLight": "Lumière de Noël", + "Cobalt": "Cobalt", + "Copper": "Cuivre", + "CrimsonAltar": "Autel carmin", + "Crimtane": "Carmitane", + "DemonAltar": "Autel démoniaque", + "Demonite": "Démonite", + "Door": "Porte", + "DrippingHoney": "Miel dégoulinant", + "DrippingLava": "Lave dégoulinante", + "DrippingWater": "Eau dégoulinante", + "FloorLamp": "Lampadaire", + "Fossil": "Fossile", + "GiantMushroom": "Champignon géant", + "Gold": "Or", + "Iron": "Fer", + "ItemRack": "Étagère à objets", + "Lantern": "Lanterne", + "Larva": "Larve", + "Lead": "Plomb", + "LivingWood": "Bois vivant", + "MetalBar": "Lingot de métal", + "Mythril": "Mithril", + "OrangeSquirrelCage": "Écureuil orange en cage", + "Orichalcum": "Orichalque", + "Painting": "Tableau", + "Palladium": "Palladium", + "PalmTree": "Palmier", + "Picture": "Image", + "PineTree": "Sapin", + "PlanterasBulb": "Bulbe de Plantera", + "Platinum": "Platine", + "Pot": "Jarre", + "Rocket": "Fusée", + "SandFlow": "Pluie de sable", + "Sapling": "Arbuste", + "SiltExtractinator": "Extractinateur de vase", + "Silver": "Argent", + "Sink": "Évier", + "Statue": "Statue", + "Table": "Table", + "Thorn": "Épine", + "Thorns": "Épines", + "Timer": "Minuteur", + "Tin": "Étain", + "Titanium": "Titane", + "Trap": "Piège", + "Tree": "Arbre", + "Trophy": "Trophée", + "Tungsten": "Tungstène", + "Turret": "Tourette", + "Vase": "Vase", + "WaterFountain": "Fontaine d'eau", + "Web": "Toile" + }, + "ChatCommand": { + "Playing_0": "{$LegacyMultiplayer.6}", + "Playing_1": "{$LegacyMultiplayer.21}", + "Roll": "{$LegacyMultiplayer.8}", + "Party": "/g", + "Emote": "/moi" + }, + "Bestiary_ItemDropConditions": { + "NotExpert": "", + "NotMasterMode": "", + "LegacyHack_IsBossAndNotExpert": "", + "IsCrimsonAndNotExpert": "", + "IsCorruptionAndNotExpert": "", + "NotFromStatue": "" + }, + "Bestiary_FlavorText": { + "npc_JungleSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_YellowSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_RedSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_PurpleSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_BlackSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_GreenSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_BlueSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_DemonEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_Zombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_Skeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_AngryBones": "{$CommonBestiaryFlavor.AngryBones}", + "npc_Hornet": "{$CommonBestiaryFlavor.Hornet}", + "npc_Hellbat": "{$CommonBestiaryFlavor.LavaBat}", + "npc_BlueJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_PinkJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_Mummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_DarkMummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_LightMummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_Mimic": "{$CommonBestiaryFlavor.Mimic}", + "npc_GreenJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_BaldZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_WanderingEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_Penguin": "{$CommonBestiaryFlavor.Penguin}", + "npc_PenguinBlack": "{$CommonBestiaryFlavor.Penguin}", + "npc_Lavabat": "{$CommonBestiaryFlavor.LavaBat}", + "npc_PigronCorruption": "{$CommonBestiaryFlavor.Pigron}", + "npc_PigronHallow": "{$CommonBestiaryFlavor.Pigron}", + "npc_PigronCrimson": "{$CommonBestiaryFlavor.Pigron}", + "npc_PincushionZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_SwampZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_TwiggyZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_CataractEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_SleepyEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_DialatedEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_GreenEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_PurpleEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_FemaleZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_HeadacheSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_MisassembledSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_PantlessSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_HornetFatty": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetHoney": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetLeafy": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetSpikey": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetStingy": "{$CommonBestiaryFlavor.Hornet}", + "npc_ZombieMushroom": "{$CommonBestiaryFlavor.MushroomZombie}", + "npc_ZombieMushroomHat": "{$CommonBestiaryFlavor.MushroomZombie}", + "npc_FungiBulb": "{$CommonBestiaryFlavor.FungiBulb}", + "npc_GiantFungiBulb": "{$CommonBestiaryFlavor.FungiBulb}", + "npc_RustyArmoredBonesAxe": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesFlail": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesSword": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesSwordNoArmor": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_BlueArmoredBones": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesMace": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesNoPants": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesSword": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_HellArmoredBones": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesSpikeShield": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesMace": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesSword": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_RaggedCaster": "{$CommonBestiaryFlavor.RaggedCaster}", + "npc_RaggedCasterOpenCoat": "{$CommonBestiaryFlavor.RaggedCaster}", + "npc_Necromancer": "{$CommonBestiaryFlavor.Necromancer}", + "npc_NecromancerArmored": "{$CommonBestiaryFlavor.Necromancer}", + "npc_DiabolistRed": "{$CommonBestiaryFlavor.Diabolist}", + "npc_DiabolistWhite": "{$CommonBestiaryFlavor.Diabolist}", + "npc_AngryBonesBig": "{$CommonBestiaryFlavor.AngryBones}", + "npc_AngryBonesBigMuscle": "{$CommonBestiaryFlavor.AngryBones}", + "npc_AngryBonesBigHelmet": "{$CommonBestiaryFlavor.AngryBones}", + "npc_Scarecrow1": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow2": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow3": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow4": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow5": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow6": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow7": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow8": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow9": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow10": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_DemonEyeOwl": "{$CommonBestiaryFlavor.CostumeDemonEye}", + "npc_DemonEyeSpaceship": "{$CommonBestiaryFlavor.CostumeDemonEye}", + "npc_ZombieDoctor": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_ZombieSuperman": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_ZombiePixie": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_SkeletonTopHat": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_SkeletonAstonaut": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_SkeletonAlien": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_ZombieXmas": "{$CommonBestiaryFlavor.ZombieXmas}", + "npc_ZombieSweater": "{$CommonBestiaryFlavor.ZombieXmas}", + "npc_SlimeRibbonWhite": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonYellow": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonGreen": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonRed": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_ZombieElf": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ZombieElfBeard": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ZombieElfGirl": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ArmedZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombiePincushion": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieSwamp": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieTwiggy": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieCenx": "{$CommonBestiaryFlavor.Zombie}", + "npc_GoldBird": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldBunny": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldButterfly": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldFrog": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldGrasshopper": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldMouse": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldWorm": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_BoneThrowingSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton2": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton3": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton4": "{$CommonBestiaryFlavor.Skeleton}", + "npc_GiantWalkingAntlion": "{$CommonBestiaryFlavor.AntlionCharger}", + "npc_GiantFlyingAntlion": "{$CommonBestiaryFlavor.AntlionSwarmer}", + "npc_DesertLamiaLight": "{$CommonBestiaryFlavor.Lamia}", + "npc_DesertLamiaDark": "{$CommonBestiaryFlavor.Lamia}", + "npc_SquirrelGold": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_SandShark": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkCorrupt": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkCrimson": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkHallow": "{$CommonBestiaryFlavor.Sandshark}", + "npc_WalkingAntlion": "{$CommonBestiaryFlavor.AntlionCharger}", + "npc_FlyingAntlion": "{$CommonBestiaryFlavor.AntlionSwarmer}", + "npc_GoldGoldfish": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldGoldfishWalker": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_BlackDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_BlueDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_GreenDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_OrangeDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_RedDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_YellowDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_GoldDragonfly": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldLadyBug": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldWaterStrider": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldSeahorse": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_IceMimic": "{$CommonBestiaryFlavor.Mimic}", + "npc_GemSquirrelAmethyst": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelTopaz": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelSapphire": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelEmerald": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelRuby": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelDiamond": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelAmber": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemBunnyAmethyst": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyTopaz": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnySapphire": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyEmerald": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyRuby": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyDiamond": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyAmber": "{$CommonBestiaryFlavor.GemBunny}" + } +} \ No newline at end of file diff --git a/Localization/Content/fr-FR/Items.json b/Localization/Content/fr-FR/Items.json new file mode 100644 index 0000000..af5367b --- /dev/null +++ b/Localization/Content/fr-FR/Items.json @@ -0,0 +1,5511 @@ +{ + "PaintingArtist": { + "Crowno": "'V. Costa Moura'", + "Garner": "'W. Garner'", + "Moosdijk": "'R. Moosdijk'", + "Lazure": "'J. Hayes'", + "Myhre": "'J. T. Myhre'", + "Burczyk": "'C. Burczyk'", + "Craig": "'A. Craig'", + "Kolf": "'A. G. Kolf'", + "Wright": "'K. Wright'", + "Phelps": "'D. Phelps'", + "Duncan": "'M. J. Duncan'", + "Ness": "'C. J. Ness'" + }, + "Prefix": { + "Dull": "(Terne)", + "Unhappy": "(Misérable)", + "Bulky": "(Mastoc)", + "Shameful": "(Coupable)", + "Heavy": "(Lourd)", + "Light": "(Léger)", + "Sighted": "(Voyant)", + "Rapid": "(Rapide)", + "Hasty": "(Précipité)", + "Intimidating": "(Intimidant)", + "Large": "(Grand)", + "Deadly": "(Fatal)", + "Staunch": "(Fervent)", + "Awful": "(Atroce)", + "Lethargic": "(Léthargique)", + "Awkward": "(Gauche)", + "Powerful": "(Puissant)", + "Mystic": "(Mystique)", + "Adept": "(Adepte)", + "Masterful": "(Autoritaire)", + "Inept": "(Inepte)", + "Massive": "(Massif)", + "Ignorant": "(Ignorant)", + "Deranged": "(Dérangé)", + "Intense": "(Intense)", + "Taboo": "(Tabou)", + "Celestial": "(Céleste)", + "Furious": "(Furieux)", + "Keen": "(Appliqué)", + "Superior": "(Supérieur)", + "Forceful": "(Énergique)", + "Broken": "(Cassé)", + "Dangerous": "(Dangereux)", + "Damaged": "(Endommagé)", + "Shoddy": "(Exécrable)", + "Quick": "(Bref)", + "Deadly2": "(Fatal)", + "Agile": "(Agile)", + "Nimble": "(Leste)", + "Murderous": "(Meurtrier)", + "Slow": "(Lent)", + "Sluggish": "(Apathique)", + "Lazy": "(Paresseux)", + "Savage": "(Sauvage)", + "Annoying": "(Ennuyeux)", + "Nasty": "(Méchant)", + "Manic": "(Frénétique)", + "Hurtful": "(Offensant)", + "Strong": "(Fort)", + "Unpleasant": "(Désagréable)", + "Weak": "(Faible)", + "Ruthless": "(Impitoyable)", + "Frenzying": "(Déchaîné)", + "Godly": "(Divin)", + "Sharp": "(Aiguisé)", + "Demonic": "(Démoniaque)", + "Zealous": "(Zélé)", + "Hard": "(Difficile)", + "Guarding": "(Protecteur)", + "Armored": "(Blindé)", + "Warding": "(Défenseur)", + "Arcane": "(Obscur)", + "Precise": "(Précis)", + "Lucky": "(Chanceux)", + "Jagged": "(Denté)", + "Pointy": "(Pointu)", + "Spiked": "(Perçant)", + "Angry": "(Furieux)", + "Menacing": "(Menaçant)", + "Brisk": "(Vif)", + "Fleeting": "(Fugace)", + "Hasty2": "(Hâtif)", + "Quick2": "(Bref)", + "Wild": "(Féroce)", + "Rash": "(Imprudent)", + "Intrepid": "(Intrépide)", + "Tiny": "(Minuscule)", + "Violent": "(Violent)", + "Legendary": "(Légendaire)", + "Unreal": "(Iréel)", + "Mythical": "(Mythique)", + "Terrible": "(Terrible)", + "Small": "(Petit)" + }, + "ItemName": { + "IronPickaxe": "Pioche en fer", + "IronAxe": "Hache en fer", + "ShadowGreaves": "Grèves de l'ombre", + "ConfettiGun": "Pistolet à confetti", + "ChlorophyteMask": "Masque en chlorophyte", + "ChlorophyteHelmet": "Casque en chlorophyte", + "ChlorophyteHeadgear": "Couvre-chef en chlorophyte", + "ChlorophytePlateMail": "Haubert en chlorophyte", + "ChlorophyteGreaves": "Grèves en chlorophyte", + "ChlorophyteBar": "Lingot de chlorophyte", + "RedDye": "Teinture rouge", + "OrangeDye": "Teinture orange", + "YellowDye": "Teinture jaune", + "ShadowScalemail": "Cotte de mailles de l'ombre", + "LimeDye": "Teinture citron vert", + "GreenDye": "Teinture verte", + "TealDye": "Teinture bleu sarcelle", + "CyanDye": "Teinture cyan", + "SkyBlueDye": "Teinture bleu ciel", + "BlueDye": "Teinture bleue", + "PurpleDye": "Teinture violette", + "VioletDye": "Teinture mauve", + "PinkDye": "Teinture rose", + "RedandBlackDye": "Teinture rouge et noir", + "ShadowHelmet": "Casque de l'ombre", + "OrangeandBlackDye": "Teinture orange et noir", + "YellowandBlackDye": "Teinture jaune et noir", + "LimeandBlackDye": "Teinture vert citron et noir", + "GreenandBlackDye": "Teinture vert et noir", + "TealandBlackDye": "Teinture bleu sarcelle et noir", + "CyanandBlackDye": "Teinture cyan et noir", + "SkyBlueandBlackDye": "Teinture bleu ciel et noir", + "BlueandBlackDye": "Teinture bleu et noir", + "PurpleandBlackDye": "Teinture violet et noir", + "VioletandBlackDye": "Teinture mauve et noir", + "NightmarePickaxe": "Pioche de cauchemar", + "PinkandBlackDye": "Teinture rose et noir", + "FlameDye": "Teinture flamme", + "FlameAndBlackDye": "Teinture flamme et noir", + "GreenFlameDye": "Teinture flamme verte", + "GreenFlameAndBlackDye": "Teinture flamme vert et noir", + "BlueFlameDye": "Teinture flamme bleue", + "BlueFlameAndBlackDye": "Teinture flamme bleu et noir", + "SilverDye": "Teinture argentée", + "BrightRedDye": "Teinture rouge vif", + "BrightOrangeDye": "Teinture orange vif", + "TheBreaker": "Le Casseur", + "BrightYellowDye": "Teinture jaune vif", + "BrightLimeDye": "Teinture vert citron vif", + "BrightGreenDye": "Teinture vert vif", + "BrightTealDye": "Teinture bleu sarcelle vif", + "BrightCyanDye": "Teinture cyan vif", + "BrightSkyBlueDye": "Teinture bleu ciel vif", + "BrightBlueDye": "Teinture bleu vif", + "BrightPurpleDye": "Teinture violet vif", + "BrightVioletDye": "Teinture mauve vif", + "BrightPinkDye": "Teinture rose vif", + "Candle": "Bougie", + "BlackDye": "Teinture noire", + "RedandSilverDye": "Teinture rouge et argenté", + "OrangeandSilverDye": "Teinture orange et argenté", + "YellowandSilverDye": "Teinture jaune et argenté", + "LimeandSilverDye": "Teinture vert citron et argenté", + "GreenandSilverDye": "Teinture vert et argenté", + "TealandSilverDye": "Teinture bleu sarcelle et argenté", + "CyanandSilverDye": "Teinture cyan et argenté", + "SkyBlueandSilverDye": "Teinture bleu ciel et argenté", + "BlueandSilverDye": "Teinture bleu et argenté", + "CopperChandelier": "Chandelier en cuivre", + "PurpleandSilverDye": "Teinture violet et argenté", + "VioletandSilverDye": "Teinture mauve et argenté", + "PinkandSilverDye": "Teinture rose et argenté", + "IntenseFlameDye": "Teinture flamme intense", + "IntenseGreenFlameDye": "Teinture flamme vert intense", + "IntenseBlueFlameDye": "Teinture flamme bleu intense", + "RainbowDye": "Teinture arc-en-ciel", + "IntenseRainbowDye": "Teinture arc-en-ciel intense", + "YellowGradientDye": "Teinture dégradée de jaunes", + "CyanGradientDye": "Teinture dégradée de cyan", + "SilverChandelier": "Chandelier en argent", + "VioletGradientDye": "Teinture dégradée de mauve", + "Paintbrush": "Pinceau", + "PaintRoller": "Rouleau à peinture", + "RedPaint": "Peinture rouge", + "OrangePaint": "Peinture orange", + "YellowPaint": "Peinture jaune", + "LimePaint": "Peinture vert citron", + "GreenPaint": "Peinture verte", + "TealPaint": "Peinture bleu sarcelle", + "CyanPaint": "Peinture cyan", + "GoldChandelier": "Chandelier en or", + "SkyBluePaint": "Peinture bleu ciel", + "BluePaint": "Peinture bleue", + "PurplePaint": "Peinture violette", + "VioletPaint": "Peinture mauve", + "PinkPaint": "Peinture rose", + "DeepRedPaint": "Peinture rouge foncé", + "DeepOrangePaint": "Peinture orange foncé", + "DeepYellowPaint": "Peinture jaune foncé", + "DeepLimePaint": "Peinture vert citron foncé", + "DeepGreenPaint": "Peinture vert foncé", + "ManaCrystal": "Cristal de mana", + "DeepTealPaint": "Peinture bleu sarcelle foncé", + "DeepCyanPaint": "Peinture cyan foncé", + "DeepSkyBluePaint": "Peinture bleu ciel foncé", + "DeepBluePaint": "Peinture bleu foncé", + "DeepPurplePaint": "Peinture violet foncé", + "DeepVioletPaint": "Peinture mauve foncé", + "DeepPinkPaint": "Peinture rose foncé", + "BlackPaint": "Peinture noire", + "WhitePaint": "Peinture blanche", + "GrayPaint": "Peinture grise", + "IronOre": "Minerai de fer", + "LesserManaPotion": "Potion mana faible", + "PaintScraper": "Grattoir", + "LihzahrdBrick": "Brique de lihzahrd", + "LihzahrdBrickWall": "Mur en brique de lihzahrd", + "SlushBlock": "Bloc de gadoue", + "PalladiumOre": "Minerai de palladium", + "OrichalcumOre": "Minerai d'orichalque", + "TitaniumOre": "Minerai de titane", + "TealMushroom": "Champignon bleu sarcelle", + "GreenMushroom": "Champignon vert", + "SkyBlueFlower": "Fleur bleu ciel", + "BandofStarpower": "Brassard de puissance étoilée", + "YellowMarigold": "Souci jaune", + "BlueBerries": "Baies bleues", + "LimeKelp": "Algue vert citron", + "PinkPricklyPear": "Poire piquante rose", + "OrangeBloodroot": "Racine sanglante orange", + "RedHusk": "Coquille rouge", + "CyanHusk": "Coquille cyan", + "VioletHusk": "Coquille mauve", + "BlackInk": "Encre noire", + "FlowerofFire": "Fleur de feu", + "DyeVat": "Bac à teinture", + "BeeGun": "Fusil abeille", + "PossessedHatchet": "Hachette possédée", + "BeeKeeper": "Apicultrice", + "Hive": "Ruche", + "HoneyBlock": "Bloc de miel", + "HiveWall": "Mur de miel", + "CrispyHoneyBlock": "Bloc de miel croquant", + "HoneyBucket": "Seau de miel", + "HiveWand": "Baguette de ruche", + "MagicMissile": "Missile magique", + "Beenade": "Grebeille", + "GravityGlobe": "Globe de gravité", + "HoneyComb": "Alvéole de miel", + "Abeemination": "Abeillemination", + "BottledHoney": "Pot de miel", + "RainHat": "Chapeau de pluie", + "RainCoat": "Imperméable", + "LihzahrdDoor": "Porte en lihzahrd", + "DungeonDoor": "Porte de donjon", + "LeadDoor": "Porte en plomb", + "DirtRod": "Bâton de terre", + "IronDoor": "Porte en fer", + "TempleKey": "Clé de temple", + "LihzahrdChest": "Coffre en lihzahrd", + "LihzahrdChair": "Chaise en lihzahrd", + "LihzahrdTable": "Table en lihzahrd", + "LihzahrdWorkBench": "Établi en lihzahrd", + "SuperDartTrap": "Super piège à fléchettes", + "FlameTrap": "Piège à flamme", + "SpikyBallTrap": "Piège à boule à pointes", + "SpearTrap": "Piège à lance", + "ShadowOrb": "Orbe de l'ombre", + "WoodenSpike": "Pointe en bois", + "LihzahrdPressurePlate": "Plaque de pression en lihzahrd", + "LihzahrdStatue": "Statue en lihzahrd", + "LihzahrdWatcherStatue": "Statue d'observateur en lihzahrd", + "LihzahrdGuardianStatue": "Statue de gardien en lihzahrd", + "WaspGun": "Pistoguêpe", + "PiranhaGun": "Pistoranha", + "PygmyStaff": "Sceptre de pygmée", + "PygmyNecklace": "Collier de pygmée", + "TikiMask": "Masque Tiki", + "Meteorite": "Météorite", + "TikiShirt": "Chemise Tiki", + "TikiPants": "Pantalon Tiki", + "LeafWings": "Ailes de feuilles", + "BlizzardinaBalloon": "Ballon de blizzard", + "BundleofBalloons": "Lot de ballons", + "BatWings": "Ailes de chauve-souris", + "BoneSword": "Épée en os", + "HerculesBeetle": "Scarabée Hercule", + "SmokeBomb": "Bombe à fumée", + "BoneKey": "Clé en os", + "MeteoriteBar": "Lingot de météorite", + "Nectar": "Nectar", + "TikiTotem": "Totem Tiki", + "LizardEgg": "Œuf de lézard", + "GraveMarker": "Symbole de tombe", + "CrossGraveMarker": "Croix de tombe", + "Headstone": "Stèle", + "Gravestone": "Pierre tombale", + "Obelisk": "Obélisque", + "LeafBlower": "Souffleur de feuilles", + "ChlorophyteBullet": "Balle en chlorophyte", + "Hook": "Crochet", + "ParrotCracker": "Biscuit de perroquet", + "StrangeGlowingMushroom": "Étrange champignon luisant", + "Seedling": "Jeune plant", + "WispinaBottle": "Volute en bouteille", + "PalladiumBar": "Lingot de palladium", + "PalladiumSword": "Épée en palladium", + "PalladiumPike": "Pique en palladium", + "PalladiumRepeater": "Arbalète en palladium", + "PalladiumPickaxe": "Pioche en palladium", + "PalladiumDrill": "Foreuse en palladium", + "Flamarang": "Flammerang", + "PalladiumChainsaw": "Tronçonneuse en palladium", + "OrichalcumBar": "Lingot d'orichalque", + "OrichalcumSword": "Épée en orichalque", + "OrichalcumHalberd": "Hallebarde en orichalque", + "OrichalcumRepeater": "Arbalète en orichalque", + "OrichalcumPickaxe": "Pioche en orichalque", + "OrichalcumDrill": "Foreuse en orichalque", + "OrichalcumChainsaw": "Tronçonneuse en orichalque", + "TitaniumBar": "Lingot de titane", + "TitaniumSword": "Épée de titane", + "CopperOre": "Minerai de cuivre", + "MoltenFury": "Furie en fusion", + "TitaniumTrident": "Trident en titane", + "TitaniumRepeater": "Arbalète en titane", + "TitaniumPickaxe": "Pioche en titane", + "TitaniumDrill": "Foreuse en titane", + "TitaniumChainsaw": "Tronçonneuse en titane", + "PalladiumMask": "Masque en palladium", + "PalladiumHelmet": "Casque en palladium", + "PalladiumHeadgear": "Couvre-chef en palladium", + "PalladiumBreastplate": "Plastron en palladium", + "PalladiumLeggings": "Jambières en palladium", + "FieryGreatsword": "Grande épée flambante", + "OrichalcumMask": "Masque en orichalque", + "OrichalcumHelmet": "Casque en orichalque", + "OrichalcumHeadgear": "Couvre-chef en orichalque", + "OrichalcumBreastplate": "Plastron en orichalque", + "OrichalcumLeggings": "Jambières en orichalque", + "TitaniumMask": "Masque en titane", + "TitaniumHelmet": "Casque en titane", + "TitaniumHeadgear": "Couvre-chef en titane", + "TitaniumBreastplate": "Plastron en titane", + "TitaniumLeggings": "Jambières en titane", + "MoltenPickaxe": "Pioche en fusion", + "OrichalcumAnvil": "Enclume en orichalque", + "TitaniumForge": "Forge en titane", + "PalladiumWaraxe": "Hache de guerre en palladium", + "OrichalcumWaraxe": "Hache de guerre en orichalque", + "TitaniumWaraxe": "Hache de guerre en titane", + "HallowedBar": "Lingot sacré", + "ChlorophyteClaymore": "Claymore en chlorophyte", + "ChlorophyteSaber": "Sabre en chlorophyte", + "ChlorophytePartisan": "Épieu en chlorophyte", + "ChlorophyteShotbow": "Arbalète en chlorophyte", + "MeteorHelmet": "Casque météore", + "ChlorophytePickaxe": "Pioche en chlorophyte", + "ChlorophyteDrill": "Foreuse en chlorophyte", + "ChlorophyteChainsaw": "Tronçonneuse en chlorophyte", + "ChlorophyteGreataxe": "Grande hache en chlorophyte", + "ChlorophyteWarhammer": "Grand marteau en chlorophyte", + "ChlorophyteArrow": "Flèche en chlorophyte", + "AmethystHook": "Grappin d'améthyste", + "TopazHook": "Grappin de topaze", + "SapphireHook": "Grappin de saphir", + "EmeraldHook": "Grappin d'émeraude", + "MeteorSuit": "Armure météore", + "RubyHook": "Grappin de rubis", + "DiamondHook": "Grappin de diamant", + "AmberMosquito": "Moustique ambré", + "UmbrellaHat": "Chapeau parapluie", + "NimbusRod": "Bâton nimbus", + "OrangeTorch": "Torche orange", + "CrimsandBlock": "Bloc de sable carmin", + "BeeCloak": "Cape d'abeille", + "EyeoftheGolem": "Œil du golem", + "HoneyBalloon": "Ballon de miel", + "MeteorLeggings": "Jambières météore", + "BlueHorseshoeBalloon": "Ballon fer à cheval bleu", + "WhiteHorseshoeBalloon": "Ballon fer à cheval blanc", + "YellowHorseshoeBalloon": "Ballon fer à cheval jaune", + "FrozenTurtleShell": "Carapace de tortue gelée", + "SniperRifle": "Fusil de sniper", + "VenusMagnum": "Magnum Venus", + "CrimsonRod": "Bâton carmin", + "CrimtaneBar": "Lingot de carmitane", + "Stynger": "Cingleur", + "FlowerPow": "Fleuréau", + "BottledWater": "Bouteille d'eau", + "RainbowGun": "Pistolet arc-en-ciel", + "StyngerBolt": "Munition de cingleur", + "ChlorophyteJackhammer": "Marteau-piqueur en chlorophyte", + "Teleporter": "Téléporteur", + "FlowerofFrost": "Fleur de givre", + "Uzi": "Uzi", + "MagnetSphere": "Sphère aimantée", + "PurpleStainedGlass": "Vitrail violet", + "YellowStainedGlass": "Vitrail jaune", + "BlueStainedGlass": "Vitrail bleu", + "SpaceGun": "Pistolet spatial", + "GreenStainedGlass": "Vitrail vert", + "RedStainedGlass": "Vitrail rouge", + "MulticoloredStainedGlass": "Vitrail multicolore", + "SkeletronHand": "Main de Squeletron", + "Skull": "Crâne", + "BallaHat": "Chapeau de truand", + "GangstaHat": "Chapeau de gangster", + "SailorHat": "Chapeau de marin", + "EyePatch": "Bandeau", + "SailorShirt": "Chemise de marin", + "RocketBoots": "Bottes à fusée", + "SailorPants": "Pantalon de marin", + "SkeletronMask": "Masque de Squeletron", + "AmethystRobe": "Robe en améthyste", + "TopazRobe": "Robe en topaze", + "SapphireRobe": "Robe en saphir", + "EmeraldRobe": "Robe en émeraude", + "RubyRobe": "Robe en rubis", + "DiamondRobe": "Robe en diamant", + "WhiteTuxedoShirt": "Chemise de smoking blanche", + "WhiteTuxedoPants": "Pantalon de smoking blanc", + "GrayBrick": "Brique grise", + "PanicNecklace": "Collier de panique", + "LifeFruit": "Fruit de vie", + "LihzahrdAltar": "Autel de lihzahrd", + "LihzahrdPowerCell": "Capsule de pouvoir Lihzahrd", + "Picksaw": "Piochache", + "HeatRay": "Rayon thermique", + "StaffofEarth": "Sceptre de Terre", + "GolemFist": "Poing de Golem", + "WaterChest": "Coffre d'eau", + "Binoculars": "Jumelles", + "GoldOre": "Minerai d'or", + "GrayBrickWall": "Mur en brique grise", + "RifleScope": "Lunette de visée", + "DestroyerEmblem": "Emblème du Destructeur", + "HighVelocityBullet": "Balle à grande vitesse", + "JellyfishNecklace": "Collier de méduse", + "ZombieArm": "Bras de zombie", + "TheAxe": "Guithache", + "IceSickle": "Faux de glace", + "ClothierVoodooDoll": "Poupée vaudou du tailleur", + "PoisonStaff": "Sceptre de poison", + "SlimeStaff": "Sceptre de gelée", + "RedBrick": "Brique rouge", + "PoisonDart": "Fléchette de poison", + "EyeSpring": "Œil à ressort", + "ToySled": "Luge factice", + "BookofSkulls": "Livre de crânes", + "KOCannon": "Canon KO", + "PirateMap": "Carte de pirate", + "TurtleHelmet": "Casque de tortue", + "TurtleScaleMail": "Cotte de mailles de tortue", + "TurtleLeggings": "Jambières de tortue", + "SnowballCannon": "Canon à neige", + "RedBrickWall": "Mur en brique rouge", + "BonePickaxe": "Pioche en os", + "MagicQuiver": "Carquois magique", + "MagmaStone": "Pierre de magma", + "ObsidianRose": "Rose d'obsidienne", + "Bananarang": "Bananerang", + "ChainKnife": "Chaîne à couteau", + "RodofDiscord": "Bâton de discorde", + "DeathSickle": "Faucille de la mort", + "TurtleShell": "Carapace de tortue", + "TissueSample": "Échantillon de tissu", + "ClayBlock": "Bloc d'argile", + "Vertebrae": "Vertèbre", + "BloodySpine": "Colonne sanglante", + "Ichor": "Ichor", + "IchorTorch": "Torche d'ichor", + "IchorArrow": "Flèche d'ichor", + "IchorBullet": "Balle d'ichor", + "GoldenShower": "Douche dorée", + "BunnyCannon": "Canon à lapins", + "ExplosiveBunny": "Lapin explosif", + "VialofVenom": "Fiole de venin", + "BlueBrick": "Brique bleue", + "FlaskofVenom": "Flasque de venin", + "VenomArrow": "Flèche venimeuse", + "VenomBullet": "Balle venimeuse", + "FireGauntlet": "Gantelet de feu", + "Cog": "Roue dentée", + "Confetti": "Confetti", + "Nanites": "Nanites", + "ExplosivePowder": "Poudre explosive", + "GoldDust": "Poussière d'or", + "PartyBullet": "Balle festive", + "BlueBrickWall": "Mur en brique bleue", + "NanoBullet": "Nanoballe", + "ExplodingBullet": "Balle explosive", + "GoldenBullet": "Balle en or", + "FlaskofCursedFlames": "Flasque de flammes maudites", + "FlaskofFire": "Flasque de feu", + "FlaskofGold": "Flasque d'or", + "FlaskofIchor": "Flasque d'ichor", + "FlaskofNanites": "Flasque de nanites", + "FlaskofParty": "Flasque de fête", + "FlaskofPoison": "Flasque de poison", + "ChainLantern": "Lanterne à chaîne", + "EyeofCthulhuTrophy": "Trophée de l'Œil de Cthulhu", + "EaterofWorldsTrophy": "Trophée du Dévoreur des mondes", + "BrainofCthulhuTrophy": "Trophée du Cerveau de Cthulhu", + "SkeletronTrophy": "Trophée du Squeletron", + "QueenBeeTrophy": "Trophée de la Reine des abeilles", + "WallofFleshTrophy": "Trophée du Mur de chair", + "DestroyerTrophy": "Trophée du Destructeur", + "SkeletronPrimeTrophy": "Trophée du Grand Squeletron", + "RetinazerTrophy": "Trophée du Rétinaser", + "SpazmatismTrophy": "Trophée du Spazmatisme", + "GreenBrick": "Brique verte", + "PlanteraTrophy": "Trophée de Plantera", + "GolemTrophy": "Trophée du Golem", + "BloodMoonRising": "Lever d'une lune de sang", + "TheHangedMan": "Le Pendu", + "GloryoftheFire": "Gloire du feu", + "BoneWarp": "Enveloppe osseuse", + "WallSkeleton": "Squelette de mur", + "HangingSkeleton": "Squelette suspendu", + "BlueSlabWall": "Mur de dalles bleues", + "BlueTiledWall": "Mur de tuiles bleues", + "GreenBrickWall": "Mur en brique verte", + "PinkSlabWall": "Mur de dalles roses", + "PinkTiledWall": "Mur de tuiles roses", + "GreenSlabWall": "Mur de dalles vertes", + "GreenTiledWall": "Mur de tuiles vertes", + "BlueBrickPlatform": "Plateforme en brique bleue", + "PinkBrickPlatform": "Plateforme en brique rose", + "GreenBrickPlatform": "Plateforme en brique verte", + "MetalShelf": "Étagère métallique", + "BrassShelf": "Étagère en laiton", + "WoodShelf": "Étagère en bois", + "PinkBrick": "Brique rose", + "BrassLantern": "Lanterne en laiton", + "CagedLantern": "Lanterne en cage", + "CarriageLantern": "Lanterne de calèche", + "AlchemyLantern": "Lanterne d'alchimie", + "DiablostLamp": "Lampe diabolique", + "BlueDungeonChair": "Chaise bleue de donjon", + "BlueDungeonTable": "Table bleue de donjon", + "BlueDungeonWorkBench": "Établi bleu de donjon", + "GreenDungeonChair": "Chaise verte de donjon", + "SilverOre": "Minerai d'argent", + "PinkBrickWall": "Mur en brique rose", + "GreenDungeonTable": "Table verte de donjon", + "GreenDungeonWorkBench": "Établi vert de donjon", + "PinkDungeonChair": "Chaise rose de donjon", + "PinkDungeonTable": "Table rose de donjon", + "PinkDungeonWorkBench": "Établi bleu de donjon", + "BlueDungeonCandle": "Bougie bleue de donjon", + "GreenDungeonCandle": "Bougie verte de donjon", + "PinkDungeonCandle": "Bougie rose de donjon", + "BlueDungeonVase": "Vase bleu de donjon", + "GreenDungeonVase": "Vase vert de donjon", + "GoldBrick": "Brique dorée", + "PinkDungeonVase": "Vase rose de donjon", + "BlueDungeonDoor": "Porte bleue de donjon", + "GreenDungeonDoor": "Porte verte de donjon", + "PinkDungeonDoor": "Porte rose de donjon", + "BlueDungeonBookcase": "Bibliothèque bleue de donjon", + "GreenDungeonBookcase": "Bibliothèque verte de donjon", + "PinkDungeonBookcase": "Bibliothèque rose de donjon", + "Catacomb": "Catacombe", + "DungeonShelf": "Étagère de donjon", + "SkellingtonJSkellingsworth": "Oscar Squelette", + "GoldBrickWall": "Mur en brique dorée", + "TheCursedMan": "Le Maudit", + "TheEyeSeestheEnd": "L'Œil voit la fin", + "SomethingEvilisWatchingYou": "Le Mal vous observe", + "TheTwinsHaveAwoken": "Les Jumeaux sont éveillés !", + "TheScreamer": "Le Hurleur", + "GoblinsPlayingPoker": "Gobelins jouant au poker", + "Dryadisque": "Dryadisque", + "Sunflowers": "Tournesols", + "TerrarianGothic": "Terrarien gothique", + "Beanie": "Bonnet", + "SilverBrick": "Brique argentée", + "ImbuingStation": "Station d'infusion", + "StarinaBottle": "Étoile en bouteille", + "EmptyBullet": "Balle vide", + "Impact": "Impact", + "PoweredbyBirds": "Alimentation aviaire", + "TheDestroyer": "Le destructeur", + "ThePersistencyofEyes": "Regard insistant", + "UnicornCrossingtheHallows": "Licorne dans les terres sacrées", + "GreatWave": "Grande vague", + "StarryNight": "Nuit étoilée", + "SilverBrickWall": "Mur en brique argentée", + "GuidePicasso": "Guide façon Picasso", + "TheGuardiansGaze": "Le Regard du gardien", + "FatherofSomeone": "Le Père de quelqu'un", + "NurseLisa": "Infirmière Lisa", + "ShadowbeamStaff": "Sceptre de l'ombre", + "InfernoFork": "Fourche infernale", + "SpectreStaff": "Sceptre spectral", + "WoodenFence": "Barrière en bois", + "LeadFence": "Barrière en plomb", + "BubbleMachine": "Machine à bulles", + "CopperBrick": "Brique en cuivre", + "BubbleWand": "Baguette à bulles", + "MarchingBonesBanner": "Bannière de Squelettes vivants", + "NecromanticSign": "Signe nécromancien", + "RustedCompanyStandard": "Étendard de Compagnie rouillée", + "RaggedBrotherhoodSigil": "Sceau de la Confrérie déguenillée", + "MoltenLegionFlag": "Drapeau de la Légion en fusion", + "DiabolicSigil": "Sceau diabolique", + "ObsidianPlatform": "Plateforme en obsidienne", + "ObsidianDoor": "Porte en obsidienne", + "ObsidianChair": "Chaise en obsidienne", + "CopperBrickWall": "Mur en brique de cuivre", + "ObsidianTable": "Table en obsidienne", + "ObsidianWorkBench": "Établi en obsidienne", + "ObsidianVase": "Vase en obsidienne", + "ObsidianBookcase": "Bibliothèque en obsidienne", + "HellboundBanner": "Bannière de l'Enfer", + "HellHammerBanner": "Bannière du Marteau infernal", + "HelltowerBanner": "Bannière de la Tour infernale", + "LostHopesofManBanner": "Bannière des Espoirs perdus de l'homme", + "ObsidianWatcherBanner": "Bannière du Gardien d'obsidienne", + "LavaEruptsBanner": "Bannière de l'Éruption de lave", + "Spike": "Pointe", + "BlueDungeonBed": "Lit bleu de donjon", + "GreenDungeonBed": "Lit vert de donjon", + "PinkDungeonBed": "Lit rose de donjon", + "ObsidianBed": "Lit en obsidienne", + "Waldo": "Charlie", + "Darkness": "Obscurité", + "DarkSoulReaper": "La Faucheuse du mal", + "Land": "Terres", + "TrappedGhost": "Fantôme piégé", + "DemonsEye": "Œil du démon", + "WaterCandle": "Bougie d'eau", + "FindingGold": "Trouver de l'or", + "FirstEncounter": "Première rencontre", + "GoodMorning": "Beau matin", + "UndergroundReward": "Récompense souterraine", + "ThroughtheWindow": "Par la fenêtre", + "PlaceAbovetheClouds": "Au-delà des nuages", + "DoNotStepontheGrass": "Ne marchez pas sur l'herbe", + "ColdWatersintheWhiteLand": "Eaux froides dans le pays blanc", + "LightlessChasms": "Gouffres obscurs", + "TheLandofDeceivingLooks": "Le pays des apparences trompeuses", + "Book": "Livre", + "Daylight": "Jour", + "SecretoftheSands": "Secret du sable", + "DeadlandComesAlive": "Le pays mort est vivant", + "EvilPresence": "Présence maléfique", + "SkyGuardian": "Gardien céleste", + "AmericanExplosive": "Explosif américain", + "Discover": "Découverte", + "HandEarth": "Main de terre", + "OldMiner": "Vieux mineur", + "Skelehead": "Crâne de serpent", + "CopperWatch": "Montre en cuivre", + "Cobweb": "Toile d'araignée", + "FacingtheCerebralMastermind": "Devant le génie cérébral", + "LakeofFire": "Lac de feu", + "TrioSuperHeroes": "Trio de super héros", + "SpectreHood": "Capuche spectrale", + "SpectreRobe": "Robe spectrale", + "SpectrePants": "Pantalon spectral", + "SpectrePickaxe": "Pioche spectrale", + "SpectreHamaxe": "Martache spectrale", + "Ectoplasm": "Ectoplasme", + "GothicChair": "Chaise gothique", + "NecroHelmet": "Casque nécro", + "GothicTable": "Table gothique", + "GothicWorkBench": "Établi gothique", + "GothicBookcase": "Bibliothèque gothique", + "PaladinsHammer": "Marteau de paladin", + "SWATHelmet": "Casque de RAID", + "BeeWings": "Ailes d'abeille", + "GiantHarpyFeather": "Plume géante de harpie", + "BoneFeather": "Plume d'os", + "FireFeather": "Plume de feu", + "IceFeather": "Plume de glace", + "NecroBreastplate": "Plastron nécro", + "BrokenBatWing": "Aile cassée de chauve-souris", + "TatteredBeeWing": "Aile abîmée d'abeille", + "LargeAmethyst": "Grosse améthyste", + "LargeTopaz": "Grosse topaze", + "LargeSapphire": "Gros saphir", + "LargeEmerald": "Grosse émeraude", + "LargeRuby": "Gros rubis", + "LargeDiamond": "Gros diamant", + "JungleChest": "Coffre de la jungle", + "CorruptionChest": "Coffre de la corruption", + "NecroGreaves": "Grèves nécro", + "CrimsonChest": "Coffre carmin", + "HallowedChest": "Coffre sacré", + "JungleKey": "Clé de la jungle", + "CorruptionKey": "Clé de la corruption", + "CrimsonKey": "Clé carmin", + "HallowedKey": "Clé sacrée", + "FrozenKey": "Clé gelée", + "ImpFace": "Tête de diablotin", + "OminousPresence": "Présence sinistre", + "Bone": "Os", + "ShiningMoon": "Lune brillante", + "LivingGore": "Carnage vivant", + "FlowingMagma": "Magma coulant", + "SpectrePaintbrush": "Pinceau spectral", + "SpectrePaintRoller": "Rouleau à peinture spectral", + "SpectrePaintScraper": "Grattoir spectral", + "ShroomiteHeadgear": "Couvre-chef en champignite", + "ShroomiteMask": "Masque en champignite", + "ShroomiteHelmet": "Casque en champignite", + "ShroomiteBreastplate": "Plastron en champignite", + "Muramasa": "Muramasa", + "ShroomiteLeggings": "Jambières en champignite", + "Autohammer": "Marteau automatique", + "ShroomiteBar": "Lingot de champignite", + "SDMG": "M.D.S", + "CenxsTiara": "Diadème de Cenx", + "CenxsBreastplate": "Plastron de Cenx", + "CenxsLeggings": "Jambières de Cenx", + "CrownosMask": "Masque de Crowno", + "CrownosBreastplate": "Plastron de Crowno", + "CrownosLeggings": "Jambières de Crowno", + "CobaltShield": "Bouclier en cuivre", + "WillsHelmet": "Casque de Will", + "WillsBreastplate": "Plastron de Will", + "WillsLeggings": "Jambières de Will", + "JimsHelmet": "Casque de Jim", + "JimsBreastplate": "Plastron de Jim", + "JimsLeggings": "Jambières de Jim", + "AaronsHelmet": "Casque d'Aaron", + "AaronsBreastplate": "Plastron d'Aaron", + "AaronsLeggings": "Jambières d'Aaron", + "VampireKnives": "Couteaux de vampire", + "AquaScepter": "Sceptre aquatique", + "BrokenHeroSword": "Épée de héros cassée", + "ScourgeoftheCorruptor": "Fléau de malédiction", + "StaffoftheFrostHydra": "Sceptre d'hydre givrée", + "TheCreationoftheGuide": "La Création du guide", + "TheMerchant": "Le marchand", + "CrownoDevoursHisLunch": "Crowno dévore son repas", + "RareEnchantment": "Envoûtement rare", + "GloriousNight": "Superbe nuit", + "SweetheartNecklace": "Collier d'amoureux", + "FlurryBoots": "Bottes de rafale", + "LuckyHorseshoe": "Fer à cheval porte-bonheur", + "DTownsHelmet": "Casque de D-Town", + "DTownsBreastplate": "Plastron de D-Town", + "DTownsLeggings": "Jambières de D-Town", + "DTownsWings": "Ailes de D-Town", + "WillsWings": "Ailes de Will", + "CrownosWings": "Ailes de Crowno", + "CenxsWings": "Ailes de Cenx", + "CenxsDress": "Débardeur de Cenx", + "CenxsDressPants": "Jupe de Cenx", + "PalladiumColumn": "Colonne en palladium", + "ShinyRedBalloon": "Ballon rouge brillant", + "PalladiumColumnWall": "Mur de colonnes en palladium", + "BubblegumBlock": "Bloc de chewing-gum", + "BubblegumBlockWall": "Mur en blocs de chewing-gum", + "TitanstoneBlock": "Bloc de pierre de titane", + "TitanstoneBlockWall": "Mur en blocs de pierre de titane", + "MagicCuffs": "Menottes magiques", + "MusicBoxSnow": "Boîte à musique (neige)", + "MusicBoxCrimson": "Boîte à musique (carmin)", + "MusicBoxBoss4": "Boîte à musique (boss 4)", + "SilverWatch": "Montre en argent", + "Harpoon": "Harpon", + "MusicBoxAltOverworldDay": "Boîte à musique (alt. Journée à la surface)", + "MusicBoxRain": "Boîte à musique (pluie)", + "MusicBoxIce": "Boîte à musique (glace)", + "MusicBoxDesert": "Boîte à musique (désert)", + "MusicBoxDungeon": "Boîte à musique (donjon)", + "MusicBoxPlantera": "Boîte à musique (Plantera)", + "MusicBoxBoss5": "Boîte à musique (boss 5)", + "MusicBoxTemple": "Boîte à musique (temple)", + "MusicBoxEclipse": "Boîte à musique (éclipse)", + "SpikyBall": "Boule à pointes", + "MusicBoxMushrooms": "Boîte à musique (champignons)", + "ButterflyDust": "Poussière de papillon", + "AnkhCharm": "Amulette Ânkh", + "AnkhShield": "Bouclier Ânkh", + "BlueFlare": "Lueur bleue", + "AnglerFishBanner": "Bannière de Baudroie", + "AngryNimbusBanner": "Bannière de Nimbus furieux", + "AnomuraFungusBanner": "Bannière d'Anomoure", + "AntlionBanner": "Bannière de Fourmilion", + "ArapaimaBanner": "Bannière de Paiche", + "BallOHurt": "Boule de douleur", + "ArmoredSkeletonBanner": "Bannière de Squelette en armure", + "BatBanner": "Bannière de Chauve-souris", + "BirdBanner": "Bannière d'Oiseau", + "BlackRecluseBanner": "Bannière de Recluse noire", + "BloodFeederBanner": "Bannière de Sangsue", + "BloodJellyBanner": "Bannière de Gelée de sang", + "BloodCrawlerBanner": "Bannière de Tikenfer", + "BoneSerpentBanner": "Bannière de Squelette de serpent", + "BunnyBanner": "Bannière de Lapin", + "ChaosElementalBanner": "Bannière d'Élémentaire de chaos", + "BlueMoon": "Lune bleue", + "MimicBanner": "Bannière d'Imitation", + "ClownBanner": "Bannière de Clown", + "CorruptBunnyBanner": "Bannière de Lapin corrompu", + "CorruptGoldfishBanner": "Bannière de Poisson doré corrompu", + "CrabBanner": "Bannière de Crabe", + "CrimeraBanner": "Bannière de Carminera", + "CrimsonAxeBanner": "Bannière de Hache carmin", + "CursedHammerBanner": "Bannière de Marteau maudit", + "DemonBanner": "Bannière de Démon", + "DemonEyeBanner": "Bannière d' Œil du démon", + "Handgun": "Pistolet", + "DerplingBanner": "Bannière de Benêt", + "EaterofSoulsBanner": "Bannière de Dévoreur d'âmes", + "EnchantedSwordBanner": "Bannière d'Épée envoûtée", + "FaceMonsterBanner": "Bannière de Monstre grimaçant", + "FloatyGrossBanner": "Bannière d'Immondice flottante", + "FlyingFishBanner": "Bannière de Poisson volant", + "FlyingSnakeBanner": "Bannière de Serpent volant", + "FrankensteinBanner": "Bannière de Frankenstein", + "FungiBulbBanner": "Bannière de Champibulbe", + "WaterBolt": "Sort de l'eau", + "FungoFishBanner": "Bannière de Champoisson", + "GastropodBanner": "Bannière de Gastropode", + "GoblinThiefBanner": "Bannière de Voleur gobelin", + "GoblinSorcererBanner": "Bannière de Sorcier gobelin", + "GoblinPeonBanner": "Bannière de Péon gobelin", + "GoblinScoutBanner": "Bannière d'Éclaireur gobelin", + "GoblinWarriorBanner": "Bannière de Guerrier gobelin", + "GoldfishBanner": "Bannière de Poisson doré", + "HarpyBanner": "Bannière de Harpie", + "HellbatBanner": "Bannière de Chauve-souris infernale", + "Bomb": "Bombe", + "HerplingBanner": "Bannière de Bêta", + "HornetBanner": "Bannière de Frelon", + "IceElementalBanner": "Bannière d'Élémentaire de glace", + "IcyMermanBanner": "Bannière de Triton glacial", + "FireImpBanner": "Bannière de Diablotin de feu", + "JellyfishBanner": "Bannière de Méduse bleue", + "JungleCreeperBanner": "Bannière d'Insecte de la jungle", + "LihzahrdBanner": "Bannière de Lihzahrd", + "ManEaterBanner": "Bannière de Croqueuse d'hommes", + "MeteorHeadBanner": "Bannière de Tête de météore", + "Dynamite": "Dynamite", + "MothBanner": "Bannière de Papillon de nuit", + "MummyBanner": "Bannière de Momie", + "MushiLadybugBanner": "Bannière de Champinelle", + "ParrotBanner": "Bannière de Perroquet", + "PigronBanner": "Bannière de Drachon", + "PiranhaBanner": "Bannière de Piranha", + "PirateBanner": "Pirate de Moussaillon", + "PixieBanner": "Bannière de Fée", + "RaincoatZombieBanner": "Bannière de Zombie en imper", + "ReaperBanner": "Bannière de Faucheuse", + "Grenade": "Grenade", + "SharkBanner": "Bannière de Requin", + "SkeletonBanner": "Bannière de Squelette", + "SkeletonMageBanner": "Bannière d'Incantateur du mal", + "SlimeBanner": "Bannière de Gelée bleue", + "SnowFlinxBanner": "Bannière de Flinx des neiges", + "SpiderBanner": "Bannière de Grimpeur de murs", + "SporeZombieBanner": "Bannière de Zombie à spores", + "SwampThingBanner": "Bannière de la Chose du marais", + "TortoiseBanner": "Bannière de Tortue géante", + "ToxicSludgeBanner": "Bannière de Gadoue toxique", + "SandBlock": "Bloc de sable", + "UmbrellaSlimeBanner": "Bannière de Gelée à parapluie", + "UnicornBanner": "Bannière de Licorne", + "VampireBanner": "Bannière de Vampire", + "VultureBanner": "Bannière de Vautour", + "NypmhBanner": "Bannière de Nymphe", + "WerewolfBanner": "Bannière de Loup-garou", + "WolfBanner": "Bannière de Loup", + "WorldFeederBanner": "Bannière du Mangeur de monde", + "WormBanner": "Bannière de Ver", + "WraithBanner": "Bannière de Spectre", + "GoldWatch": "Montre en or", + "Glass": "Verre", + "WyvernBanner": "Bannière de Vouivre", + "ZombieBanner": "Bannière de Zombie", + "GlassPlatform": "Plateforme en verre", + "GlassChair": "Chaise en verre", + "GoldenChair": "Chaise dorée", + "GoldenToilet": "Toilette dorée", + "BarStool": "Tabouret de bar", + "HoneyChair": "Chaise en miel", + "SteampunkChair": "Chaise steampunk", + "GlassDoor": "Porte en verre", + "Sign": "Panneau", + "GoldenDoor": "Porte dorée", + "HoneyDoor": "Porte en miel", + "SteampunkDoor": "Porte steampunk", + "GlassTable": "Table en verre", + "BanquetTable": "Table de banquet", + "Bar": "Bar", + "GoldenTable": "Table dorée", + "HoneyTable": "Table en miel", + "SteampunkTable": "Table steampunk", + "GlassBed": "Lit en verre", + "AshBlock": "Bloc de cendre", + "GoldenBed": "Lit doré", + "HoneyBed": "Lit en miel", + "SteampunkBed": "Lit steampunk", + "LivingWoodWall": "Mur en bois vivant", + "FartinaJar": "Pet en pot", + "Pumpkin": "Citrouille", + "PumpkinWall": "Mur en citrouille", + "Hay": "Foin", + "HayWall": "Mur en foin", + "SpookyWood": "Bois sinistre", + "Obsidian": "Obsidienne", + "SpookyWoodWall": "Mur en bois sinistre", + "PumpkinHelmet": "Casque en citrouille", + "PumpkinBreastplate": "Plastron en citrouille", + "PumpkinLeggings": "Jambières en citrouille", + "CandyApple": "Pomme d'amour", + "SoulCake": "Biscuit de Toussaint", + "NurseHat": "Chapeau d'infirmière", + "NurseShirt": "Chemise d'infirmière", + "NursePants": "Pantalon d'infirmière", + "WizardsHat": "Chapeau de magicien", + "Hellstone": "Pierre infernale", + "GuyFawkesMask": "Masque de Guy Fawkes", + "DyeTraderRobe": "Robe de teinturier", + "SteampunkGoggles": "Lunettes steampunk", + "CyborgHelmet": "Casque de cyborg", + "CyborgShirt": "Chemise de cyborg", + "CyborgPants": "Pantalon de cyborg", + "CreeperMask": "Masque de Creeper", + "CreeperShirt": "Chemise de Creeper", + "CreeperPants": "Pantalon de Creeper", + "CatMask": "Masque de chat", + "HellstoneBar": "Lingot de pierre infernale", + "CatShirt": "Chemise de chat", + "CatPants": "Pantalon de chat", + "GhostMask": "Masque de fantôme", + "GhostShirt": "Chemise de fantôme", + "PumpkinMask": "Masque de citrouille", + "PumpkinShirt": "Chemise de citrouille", + "PumpkinPants": "Pantalon de citrouille", + "RobotMask": "Masque de robot", + "RobotShirt": "Chemise de robot", + "RobotPants": "Pantalon de robot", + "MudBlock": "Bloc de boue", + "UnicornMask": "Masque de licorne", + "UnicornShirt": "Chemise de licorne", + "UnicornPants": "Pantalon de licorne", + "VampireMask": "Masque de vampire", + "VampireShirt": "Chemise de vampire", + "VampirePants": "Pantalon de vampire", + "WitchHat": "Chapeau de sorcière", + "LeprechaunHat": "Chapeau de Leprechaun", + "LeprechaunShirt": "Chemise de Leprechaun", + "LeprechaunPants": "Pantalon de Leprechaun", + "Sapphire": "Saphir", + "PixieShirt": "Chemise de fée", + "PixiePants": "Pantalon de fée", + "PrincessHat": "Chapeau de princesse", + "PrincessDressNew": "Robe de princesse", + "GoodieBag": "Sac-surprise", + "WitchDress": "Robe de sorcière", + "WitchBoots": "Bottes de sorcière", + "BrideofFrankensteinMask": "Masque de la fiancée de Frankenstein", + "BrideofFrankensteinDress": "Robe de la fiancée de Frankenstein", + "KarateTortoiseMask": "Masque de tortue karatéka", + "Ruby": "Rubis", + "KarateTortoiseShirt": "Chemise de tortue karatéka", + "KarateTortoisePants": "Pantalon de tortue karatéka", + "CandyCornRifle": "Fusil bonbon au maïs", + "CandyCorn": "Bonbon au maïs", + "JackOLanternLauncher": "Lance-citrouilles menaçantes", + "ExplosiveJackOLantern": "Citrouille menaçante explosive", + "Sickle": "Faux", + "PumpkinPie": "Tarte au potiron", + "ScarecrowHat": "Chapeau d'épouvantail", + "ScarecrowShirt": "Chemise d'épouvantail", + "Emerald": "Émeraude", + "ScarecrowPants": "Pantalon d'épouvantail", + "Cauldron": "Chaudron", + "PumpkinChair": "Chaise en citrouille", + "PumpkinDoor": "Porte en citrouille", + "PumpkinTable": "Table en citrouille", + "PumpkinWorkBench": "Établi en citrouille", + "PumpkinPlatform": "Plateforme en citrouille", + "TatteredFairyWings": "Ailes abîmées de bonne fée", + "SpiderEgg": "Œuf d'araignée", + "MagicalPumpkinSeed": "Graine magique de citrouille", + "DepthMeter": "Altimètre", + "Topaz": "Topaze", + "BatHook": "Chauve-grappin", + "BatScepter": "Sceptre de chauve-souris", + "RavenStaff": "Sceptre de corbeau", + "JungleKeyMold": "Moule de clé de la jungle", + "CorruptionKeyMold": "Moule de clé de la corruption", + "CrimsonKeyMold": "Moule de clé carmin", + "HallowedKeyMold": "Moule de clé sacré", + "FrozenKeyMold": "Moule de clé gelée", + "HangingJackOLantern": "Citrouille menaçante suspendue", + "RottenEgg": "Œuf pourri", + "Amethyst": "Améthyste", + "UnluckyYarn": "Laine malchanceuse", + "BlackFairyDust": "Poussière noire de bonne fée", + "Jackelier": "Citrouilier", + "JackOLantern": "Lanterne de citrouille", + "SpookyChair": "Chaise sinistre", + "SpookyDoor": "Porte sinistre", + "SpookyTable": "Table sinistre", + "SpookyWorkBench": "Établi sinistre", + "ReaperHood": "Capuche de faucheuse", + "Diamond": "Diamant", + "ReaperRobe": "Robe de faucheuse", + "FoxMask": "Masque de renard", + "FoxShirt": "Chemise de renard", + "FoxPants": "Pantalon de renard", + "CatEars": "Oreilles de chat", + "BloodyMachete": "Machette sanglante", + "TheHorsemansBlade": "L'épée du cavalier", + "BladedGlove": "Gant à lames", + "PumpkinSeed": "Graine de citrouille", + "SpookyHook": "Grappin sinistre", + "GlowingMushroom": "Champignon luisant", + "SpookyWings": "Ailes sinistres", + "SpookyTwig": "Brindille sinistre", + "SpookyHelmet": "Casque sinistre", + "SpookyBreastplate": "Plastron sinistre", + "SpookyLeggings": "Jambières sinistres", + "StakeLauncher": "Lance-pieu", + "Stake": "Pieu", + "CursedSapling": "Arbuste maudit", + "SpaceCreatureMask": "Masque de créature spatiale", + "SpaceCreatureShirt": "Chemise de créature spatiale", + "Star": "Étoile", + "SpaceCreaturePants": "Pantalon de créature spatiale", + "WolfMask": "Masque de loup", + "WolfShirt": "Chemise de loup", + "WolfPants": "Pantalon de loup", + "PumpkinMoonMedallion": "Médaillon de lune de citrouille", + "NecromanticScroll": "Parchemin nécromancien", + "JackingSkeletron": "Jaques Squeletron", + "BitterHarvest": "Dures récoltes", + "BloodMoonCountess": "Comtesse de la lune de sang", + "HallowsEve": "Nuit des esprits", + "IvyWhip": "Fouet de lierre", + "MorbidCuriosity": "Curiosité morbide", + "TreasureHunterShirt": "Chemise de chasseur de trésor", + "TreasureHunterPants": "Pantalon de chasseur de trésor", + "DryadCoverings": "Haut de dryade", + "DryadLoincloth": "Bas de dryade", + "MourningWoodTrophy": "Trophée du Bois terrifiant", + "PumpkingTrophy": "Trophée de Citrouille", + "JackOLanternMask": "Masque de citrouille menaçante", + "SniperScope": "Lunette de sniper", + "HeartLantern": "Lanterne en cœur", + "BreathingReed": "Roseau de respiration", + "JellyfishDivingGear": "Matériel de plongée de méduse", + "ArcticDivingGear": "Matériel de plongée arctique", + "FrostsparkBoots": "Bottes d'éclair givré", + "FartInABalloon": "Pet dans un ballon", + "PapyrusScarab": "Papyrus scarabée", + "CelestialStone": "Pierre céleste", + "Hoverboard": "Hoverboard", + "CandyCane": "Grappin en sucre d'orge", + "SugarPlum": "Dragée", + "Present": "Cadeau", + "Flipper": "Palmes", + "RedRyder": "Red Ryder", + "FestiveWings": "Ailes festives", + "PineTreeBlock": "Bloc de sapin", + "ChristmasTree": "Sapin de Noël", + "StarTopper1": "Étoile 1", + "StarTopper2": "Étoile 2", + "StarTopper3": "Étoile 3", + "BowTopper": "Nœud", + "WhiteGarland": "Guirlande blanche", + "WhiteAndRedGarland": "Guirlande blanc et rouge", + "HealingPotion": "Potion de soin", + "RedGardland": "Guirlande rouge", + "RedAndGreenGardland": "Guirlande rouge et vert", + "GreenGardland": "Guirlande verte", + "GreenAndWhiteGarland": "Guirlande vert et blanc", + "MulticoloredBulb": "Boules multicolores", + "RedBulb": "Boules rouges", + "YellowBulb": "Boules jaunes", + "GreenBulb": "Boules vertes", + "RedAndGreenBulb": "Boules rouges et vertes", + "YellowAndGreenBulb": "Boules jaunes et vertes", + "ManaPotion": "Potion de mana", + "RedAndYellowBulb": "Boules rouges et jaunes", + "WhiteBulb": "Boules blanches", + "WhiteAndRedBulb": "Boules blanches et rouges", + "WhiteAndYellowBulb": "Boules blanches et jaunes", + "WhiteAndGreenBulb": "Boules blanches et vertes", + "MulticoloredLights": "Lumières multicolores", + "RedLights": "Lumières rouges", + "GreenLights": "Lumières vertes", + "BlueLights": "Lumières bleues", + "YellowLights": "Lumières jaunes", + "GoldBar": "Lingot d'or", + "BladeofGrass": "Lame d'herbe", + "RedAndYellowLights": "Lumières rouge et jaune", + "RedAndGreenLights": "Lumières rouge et vert", + "YellowAndGreenLights": "Lumières jaune et vert", + "BlueAndGreenLights": "Lumières bleu et vert", + "RedAndBlueLights": "Lumières rouge et bleu", + "BlueAndYellowLights": "Lumières bleu et jaune", + "GiantBow": "Nœud géant", + "ReindeerAntlers": "Bois de renne", + "Holly": "Houx", + "CandyCaneSword": "Épée en sucre d'orge", + "ThornChakram": "Chakram épineux", + "EldMelter": "Fondue d'elfe", + "ChristmasPudding": "Pudding de Noël", + "Eggnog": "Lait de poule", + "StarAnise": "Anis étoilé", + "ReindeerBells": "Cloches de renne", + "CandyCaneHook": "Grappin en sucre d'orge", + "ChristmasHook": "Grappin de Noël", + "CnadyCanePickaxe": "Pioche en sucre d'orge", + "FruitcakeChakram": "Chakram en gâteau", + "SugarCookie": "Biscuit sucré", + "ObsidianBrick": "Brique en obsidienne", + "GingerbreadCookie": "Biscuit au gingembre", + "HandWarmer": "Chauffe-main", + "Coal": "Charbon", + "Toolbox": "Boîte à outils", + "PineDoor": "Porte en sapin", + "PineChair": "Chaise en sapin", + "PineTable": "Table en sapin", + "DogWhistle": "Sifflet pour chien", + "ChristmasTreeSword": "Épée en sapin de Noël", + "ChainGun": "Mitrailleuse", + "ObsidianSkull": "Crâne en obsidienne", + "Razorpine": "Pin acéré", + "BlizzardStaff": "Sceptre de blizzard", + "MrsClauseHat": "Chapeau de mère Noël", + "MrsClauseShirt": "Chemise de mère Noël", + "MrsClauseHeels": "Chaussure de mère Noël", + "ParkaHood": "Capuche de parka", + "ParkaCoat": "Manteau de parka", + "ParkaPants": "Pantalon de parka", + "SnowHat": "Bonnet de laine", + "UglySweater": "Pull moche", + "MushroomGrassSeeds": "Graine d'herbe de champignon", + "TreeMask": "Masque d'arbre", + "TreeShirt": "Tronc d'arbre", + "TreeTrunks": "Pantalon d'arbre", + "ElfHat": "Chapeau d'elfe", + "ElfShirt": "Chemise d'elfe", + "ElfPants": "Pantalon d'elfe", + "SnowmanCannon": "Canommes de neige", + "NorthPole": "Pôle Nord", + "ChristmasTreeWallpaper": "Papier peint de sapins de Noël", + "OrnamentWallpaper": "Papier peint de décorations", + "JungleGrassSeeds": "Graines de la jungle", + "CandyCaneWallpaper": "Papier peint de sucres d'orge", + "FestiveWallpaper": "Papier peint festif", + "StarsWallpaper": "Papier peint d'étoiles", + "SquigglesWallpaper": "Papier peint d'ondulations", + "SnowflakeWallpaper": "Papier peint de flocons de neige", + "KrampusHornWallpaper": "Papier peint de Corne de Krampus", + "BluegreenWallpaper": "Papier peint bleu vert", + "GrinchFingerWallpaper": "Papier peint du doigt du Grinch", + "NaughtyPresent": "Cadeau de vilain", + "BabyGrinchMischiefWhistle": "Sifflet de bêtises du petit Grinch", + "WoodenHammer": "Marteau en bois", + "IceQueenTrophy": "Trophée de la Reine des glaces", + "SantaNK1Trophy": "Trophée du Père Noël-NK1", + "EverscreamTrophy": "Trophée d'Hurléternel", + "MusicBoxPumpkinMoon": "Boîte à musique (lune citrouille)", + "MusicBoxAltUnderground": "Boîte à musique (alt. souterrain)", + "MusicBoxFrostMoon": "Boîte à musique (lune de givre)", + "BrownPaint": "Peinture marron", + "ShadowPaint": "Peinture de l'ombre", + "NegativePaint": "Peinture négative", + "TeamDye": "Teinture d'équipe", + "StarCannon": "Canon à étoiles", + "AmethystGemsparkBlock": "Bloc brillant d'améthyste", + "TopazGemsparkBlock": "Bloc brillant de topaze", + "SapphireGemsparkBlock": "Bloc brillant de saphir", + "EmeraldGemsparkBlock": "Bloc brillant d'émeraude", + "RubyGemsparkBlock": "Bloc brillant de rubis", + "DiamondGemsparkBlock": "Bloc brillant de diamant", + "AmberGemsparkBlock": "Bloc brillant d'ambre", + "LifeHairDye": "Coloration de santé", + "ManaHairDye": "Coloration de mana", + "DepthHairDye": "Coloration de profondeur", + "BluePhaseblade": "Sabre laser bleu", + "MoneyHairDye": "Coloration monétaire", + "TimeHairDye": "Coloration de temps", + "TeamHairDye": "Coloration d'équipe", + "BiomeHairDye": "Coloration de biome", + "PartyHairDye": "Coloration de fête", + "RainbowHairDye": "Coloration arc-en-ciel", + "SpeedHairDye": "Coloration de vitesse", + "AngelHalo": "Halo d'ange", + "Fez": "Fez", + "Womannquin": "Fémannequin", + "RedPhaseblade": "Sabre laser rouge", + "HairDyeRemover": "Dissolvant de coloration", + "BugNet": "Filet à insectes", + "Firefly": "Luciole", + "FireflyinaBottle": "Luciole en bouteille", + "MonarchButterfly": "Monarque", + "PurpleEmperorButterfly": "Grand Mars changeant", + "RedAdmiralButterfly": "Vulcain", + "UlyssesButterfly": "Papilio ulysses", + "SulphurButterfly": "Piéride des jardins", + "TreeNymphButterfly": "Idea malabarica", + "DirtBlock": "Bloc de terre", + "CopperBar": "Lingot de cuivre", + "GreenPhaseblade": "Sabre laser vert", + "ZebraSwallowtailButterfly": "Eurytides marcellus", + "JuliaButterfly": "Papillon Julia ", + "Worm": "Ver", + "Mouse": "Souris", + "LightningBug": "Ver luisant", + "LightningBuginaBottle": "Ver luisant en bouteille", + "Snail": "Escargot", + "GlowingSnail": "Escargot luisant", + "FancyGreyWallpaper": "Papier peint gris fantaisie", + "IceFloeWallpaper": "Papier peint de banquise", + "PurplePhaseblade": "Sabre laser violet", + "MusicWallpaper": "Papier peint de musique", + "PurpleRainWallpaper": "Papier peint de pluie violette", + "RainbowWallpaper": "Papier peint d'arcs-en-ciel", + "SparkleStoneWallpaper": "Papier peint de pierre scintillante", + "StarlitHeavenWallpaper": "Papier peint de ciel étoilé", + "Bird": "Oiseau", + "BlueJay": "Geai bleu", + "Cardinal": "Cardinal", + "Squirrel": "Écureuil", + "Bunny": "Lapin", + "WhitePhaseblade": "Sabre laser blanc", + "YellowPhaseblade": "Sabre laser jaune", + "MeteorHamaxe": "Martache de météore", + "EmptyBucket": "Seau vide", + "WaterBucket": "Seau d'eau", + "LavaBucket": "Seau de lave", + "JungleRose": "Rose de la jungle", + "Stinger": "Dard", + "SilverBar": "Lingot d'argent", + "Vine": "Liane", + "FeralClaws": "Griffes sauvages", + "BlacksmithRack": "Étagère de forgeron", + "CarpentryRack": "Étagère de charpentier", + "HelmetRack": "Étagère à casques", + "SpearRack": "Porte-lances", + "SwordRack": "Porte-épées", + "StoneSlab": "Dalle de pierre", + "AnkletoftheWind": "Bracelet du vent", + "SandstoneSlab": "Dalle de grès", + "Frog": "Grenouille", + "MallardDuck": "Canard colvert", + "Duck": "Canard", + "StaffofRegrowth": "Sceptre de repousse", + "HellstoneBrick": "Brique de pierre infernale", + "WhoopieCushion": "Coussin péteur", + "BlackScorpion": "Scorpion noir", + "Scorpion": "Scorpion", + "BubbleWallpaper": "Papier peint de bulles", + "CopperPipeWallpaper": "Papier peint de tuyaux en cuivre", + "Shackle": "Menotte", + "DuckyWallpaper": "Papier peint de canards", + "FrostCore": "Noyau de givre", + "BunnyCage": "Lapin en cage", + "SquirrelCage": "Écureuil en cage", + "MallardDuckCage": "Canard colvert en cage", + "DuckCage": "Canard en cage", + "BirdCage": "Oiseau en cage", + "BlueJayCage": "Geai bleu en cage", + "CardinalCage": "Cardinal en cage", + "WaterfallWall": "Mur de chute d'eau", + "MoltenHamaxe": "Martache en fusion", + "LavafallWall": "Mur de chute de lave", + "CrimsonSeeds": "Graines carmin", + "HeavyWorkBench": "Établi lourd", + "CopperPlating": "Plaquage en cuivre", + "SnailCage": "Escargot en cage", + "GlowingSnailCage": "Escargot luisant en cage", + "ShroomiteDiggingClaw": "Griffes de champignite", + "AmmoBox": "Boîte de munitions", + "MonarchButterflyJar": "Monarque en pot", + "PurpleEmperorButterflyJar": "Grand Mars changeant en pot", + "Flamelash": "Flammissile", + "RedAdmiralButterflyJar": "Vulcain en pot", + "UlyssesButterflyJar": "Papilio ulysses en pot", + "SulphurButterflyJar": "Piéride des jardins en pot", + "TreeNymphButterflyJar": "Idea malabarica en pot", + "ZebraSwallowtailButterflyJar": "Eurytides marcellus en pot", + "JuliaButterflyJar": "Papillon Julia en pot", + "ScorpionCage": "Scorpion en cage", + "BlackScorpionCage": "Scorpion noir en cage", + "VenomStaff": "Sceptre à venin", + "SpectreMask": "Masque spectral", + "PhoenixBlaster": "Pistolet Phénix", + "FrogCage": "Grenouille en cage", + "MouseCage": "Souris en cage", + "BoneWelder": "Soudeuse d'os", + "FleshCloningVaat": "Cuve à clonage de chair", + "GlassKiln": "Four à verre", + "LihzahrdFurnace": "Four de lihzahrd", + "LivingLoom": "Métier à bois vivant", + "SkyMill": "Moulin céleste", + "IceMachine": "Machine à glace", + "BeetleHelmet": "Casque de scarabée", + "IronBar": "Lingot de fer", + "Sunfury": "Furie solaire", + "BeetleScaleMail": "Cotte de mailles de scarabée", + "BeetleShell": "Carapace de scarabée", + "BeetleLeggings": "Jambières de scarabée", + "SteampunkBoiler": "Chaudière steampunk", + "HoneyDispenser": "Distributeur de miel", + "Penguin": "Manchot", + "PenguinCage": "Manchot en cage", + "WormCage": "Ver en cage", + "Terrarium": "Terrarium", + "SuperManaPotion": "Potion de mana forte", + "Hellforge": "Forge d'enfer", + "EbonwoodFence": "Barrière en ébène", + "RichMahoganyFence": "Barrière en acajou riche", + "PearlwoodFence": "Barrière en bois perlé", + "ShadewoodFence": "Barrière en bois d'ombre", + "BrickLayer": "Truelle", + "ExtendoGrip": "Crochet d'extension", + "PaintSprayer": "Pistolet à peinture", + "PortableCementMixer": "Bétonneuse portable", + "BeetleHusk": "Coquille de scarabée", + "CelestialMagnet": "Aimant céleste", + "ClayPot": "Pot en argile", + "CelestialEmblem": "Emblème céleste", + "CelestialCuffs": "Menottes célestes", + "PeddlersHat": "Chapeau de marchand", + "PulseBow": "Arc à impulsion", + "NaturesGift": "Don de la nature", + "Bed": "Lit", + "Silk": "Soie", + "DynastyTable": "Table de dynastie", + "LesserRestorationPotion": "Faible potion de restauration", + "DynastyWood": "Bois de dynastie", + "RedDynastyShingles": "Galets de dynastie rouge", + "BlueDynastyShingles": "Galets de dynastie bleue", + "WhiteDynastyWall": "Mur de dynastie blanche", + "BlueDynastyWall": "Mur de dynastie bleue", + "DynastyDoor": "Porte de dynastie", + "Sake": "Saké", + "PadThai": "Pad thaï", + "Pho": "Pho", + "Revolver": "Revolver", + "RestorationPotion": "Potion de restauration", + "Gatligator": "Carabligator", + "ArcaneRuneWall": "Mur de runes", + "WaterGun": "Pistolet à eau", + "Katana": "Katana", + "UltrabrightTorch": "Torche super intense", + "MagicHat": "Chapeau magique", + "DiamondRing": "Anneau en diamant", + "Gi": "Gi", + "Kimono": "Kimono", + "GypsyRobe": "Robe de gitan", + "JungleHat": "Chapeau de la jungle", + "BeetleWings": "Ailes de scarabée", + "TigerSkin": "Peau de tigre", + "LeopardSkin": "Peau de léopard", + "ZebraSkin": "Peau de zèbre", + "CrimsonCloak": "Cape carmin", + "MysteriousCape": "Cape mystérieuse", + "RedCape": "Cape rouge", + "WinterCape": "Cape d'hiver", + "WoodFishingPole": "Canne à pêche en bois", + "JungleShirt": "Chemise de la jungle", + "Bass": "Bar", + "ReinforcedFishingPole": "Canne à pêche renforcée", + "FiberglassFishingPole": "Canne en fibre de verre", + "FisherofSouls": "Pêcheuse d'âmes", + "GoldenFishingRod": "Canne à pêche dorée", + "MechanicsRod": "Canne de mécano", + "SittingDucksFishingRod": "Canne à pêche de cible facile", + "Trout": "Truite", + "Salmon": "Saumon", + "AtlanticCod": "Morue de l'Atlantique", + "Gel": "Gel", + "JunglePants": "Pantalon de la jungle", + "Tuna": "Thon", + "RedSnapper": "Rouget", + "NeonTetra": "Néon", + "ArmoredCavefish": "Poisson cavernicole", + "Damselfish": "Poisson-demoiselle", + "CrimsonTigerfish": "Poisson-tigre carmin", + "FrostMinnow": "Vairon de givre", + "PrincessFish": "Poisson-princesse", + "GoldenCarp": "Carpe dorée", + "SpecularFish": "Poisson spéculaire", + "MoltenHelmet": "Casque en fusion", + "Prismite": "Prismite", + "VariegatedLardfish": "Poisson gras panaché", + "FlarefinKoi": "Koï lumineux", + "DoubleCod": "Double morue", + "Honeyfin": "Nagemiel", + "Obsidifish": "Obsidipoisson", + "Shrimp": "Crevette", + "ChaosFish": "Poisson du chaos", + "Ebonkoi": "Koï d'ébène", + "Hemopiranha": "Hémopiranha", + "MoltenBreastplate": "Plastron en fusion", + "Rockfish": "Poisson-roche", + "Stinkfish": "Poisson infect", + "MiningPotion": "Potion d'extraction", + "HeartreachPotion": "Potion de cœurs", + "CalmingPotion": "Potion apaisante", + "BuilderPotion": "Potion de construction", + "TitanPotion": "Potion de titan", + "FlipperPotion": "Potion de nage", + "SummoningPotion": "Potion d'invocation", + "TrapsightPotion": "Potion de danger", + "MoltenGreaves": "Grèves en fusion", + "PurpleClubberfish": "Massue-poisson violette", + "ObsidianSwordfish": "Espadon en obsidienne", + "Swordfish": "Espadon", + "IronFence": "Barrière en fer", + "WoodenCrate": "Caisse en bois", + "IronCrate": "Caisse en fer", + "GoldenCrate": "Caisse dorée", + "OldShoe": "Vieille chaussure", + "FishingSeaweed": "Algue", + "TinCan": "Boîte en étain", + "MeteorShot": "Balle de météore", + "ReaverShark": "Requin-piqueur", + "SawtoothShark": "Requin-scieur", + "Minecart": "Wagonnet", + "AmmoReservationPotion": "Potion de munitions", + "LifeforcePotion": "Potion de longuevie", + "EndurancePotion": "Potion d'endurance", + "RagePotion": "Potion de rage", + "InfernoPotion": "Potion infernale", + "WrathPotion": "Potion d'ire", + "StickyBomb": "Bombe collante", + "RecallPotion": "Potion de rappel", + "TeleportationPotion": "Potion de téléportation", + "LovePotion": "Élixir d'amour", + "StinkPotion": "Potion de puanteur", + "FishingPotion": "Potion de pêche", + "SonarPotion": "Potion de sonar", + "CratePotion": "Potion de caisse", + "ShiverthornSeeds": "Graines de tremblépine", + "Shiverthorn": "Tremblépine", + "WarmthPotion": "Potion de chaleur", + "BlackLens": "Lentilles noires", + "FishHook": "Hameçon", + "BeeHeadgear": "Couvre-chef d'abeille", + "BeeBreastplate": "Plastron d'abeille", + "BeeGreaves": "Grèves d'abeille", + "HornetStaff": "Sceptre de frelon", + "ImpStaff": "Sceptre de diablotin", + "QueenSpiderStaff": "Sceptre de la Reine-araignée", + "AnglerHat": "Chapeau de pêcheur", + "AnglerVest": "Gilet de pêcheur", + "AnglerPants": "Pantalon de pêcheur", + "Sunglasses": "Lunettes de soleil", + "SpiderMask": "Masque d'araignée", + "SpiderBreastplate": "Plastron d'araignée", + "SpiderGreaves": "Grèves d'araignée", + "HighTestFishingLine": "Canne à pêche résistante", + "AnglerEarring": "Boucles d'oreille de pêcheur", + "TackleBox": "Coffre à pêche", + "BlueDungeonPiano": "Piano bleu de donjon", + "GreenDungeonPiano": "Piano vert de donjon", + "PinkDungeonPiano": "Piano rose de donjon", + "GoldenPiano": "Piano doré", + "WizardHat": "Chapeau de magicien", + "ObsidianPiano": "Piano en obsidienne", + "BonePiano": "Piano en os", + "CactusPiano": "Piano en cactus", + "SpookyPiano": "Piano sinistre", + "SkywarePiano": "Piano céleste", + "LihzahrdPiano": "Piano en lihzahrd", + "BlueDungeonDresser": "Commode bleue de donjon", + "GreenDungeonDresser": "Commode verte de donjon", + "PinkDungeonDresser": "Commode rose de donjon", + "GoldenDresser": "Commode dorée", + "TopHat": "Haut-de-forme", + "ObsidianDresser": "Commode en obsidienne", + "BoneDresser": "Commode en os", + "CactusDresser": "Commode en cactus", + "SpookyDresser": "Commode sinistre", + "SkywareDresser": "Commode céleste", + "HoneyDresser": "Commode en miel", + "LihzahrdDresser": "Commode en lihzahrd", + "Sofa": "Canapé", + "EbonwoodSofa": "Canapé en ébène", + "RichMahoganySofa": "Canapé en acajou riche", + "WoodenSword": "Épée en bois", + "TuxedoShirt": "Chemise de smoking", + "PearlwoodSofa": "Canapé en bois perlé", + "ShadewoodSofa": "Canapé en bois d'ombre", + "BlueDungeonSofa": "Canapé bleu de donjon", + "GreenDungeonSofa": "Canapé vert de donjon", + "PinkDungeonSofa": "Canapé rose de donjon", + "GoldenSofa": "Canapé doré", + "ObsidianSofa": "Canapé en obsidienne", + "BoneSofa": "Canapé en os", + "CactusSofa": "Canapé en cactus", + "SpookySofa": "Canapé sinistre", + "TuxedoPants": "Pantalon de smoking", + "SkywareSofa": "Canapé céleste", + "HoneySofa": "Canapé en miel", + "SteampunkSofa": "Canapé steampunk", + "MushroomSofa": "Canapé en champignon", + "GlassSofa": "Canapé en verre", + "PumpkinSofa": "Canapé en citrouille", + "LihzahrdSofa": "Canapé en lihzahrd", + "SeashellHairpin": "Épingle en coquillage", + "MermaidAdornment": "Parure de sirène", + "MermaidTail": "Queue de sirène", + "SummerHat": "Chapeau estival", + "ZephyrFish": "Poisson-zéphyr", + "Fleshcatcher": "Canne à chair", + "HotlineFishingHook": "Canne à pêche infernale", + "FrogLeg": "Cuisse de grenouille", + "Anchor": "Ancre", + "CookedFish": "Poisson cuit", + "CookedShrimp": "Crevette cuite", + "Sashimi": "Sashimi", + "BunnyHood": "Capuche de lapin", + "BeeWax": "Cire d'abeille", + "CopperPlatingWall": "Mur de plaquage en cuivre", + "StoneSlabWall": "Mur en dalles de pierre", + "Sail": "Voile", + "CoralstoneBlock": "Bloc de corail", + "BlueJellyfish": "Méduse bleue", + "GreenJellyfish": "Méduse verte", + "PinkJellyfish": "Méduse rose", + "BlueJellyfishJar": "Méduse bleue en pot", + "PlumbersHat": "Chapeau de plombier", + "GreenJellyfishJar": "Méduse verte en pot", + "PinkJellyfishJar": "Méduse rose en pot", + "PlumbersShirt": "Chemise de plombier", + "Batfish": "Chauve-poisson", + "BumblebeeTuna": "Bourthon", + "Catfish": "Poisson-chat", + "Cloudfish": "Poisson-nuage", + "Cursedfish": "Poisson maudit", + "Dirtfish": "Poisson-terre", + "DynamiteFish": "Poisson-dynamite", + "EaterofPlankton": "Mangeur de plancton", + "FallenStarfish": "Étoile de mer filante", + "TheFishofCthulu": "Le Poisson de Cthulhu", + "PlumbersPants": "Pantalon de plombier", + "Fishotron": "Poissomate", + "Harpyfish": "Harpisson", + "Hungerfish": "Faminoisson", + "Ichorfish": "Ichoroisson", + "Jewelfish": "Joyausson", + "MirageFish": "Poimirage", + "MutantFlinxfin": "Nage-flinx mutant", + "Pengfish": "Manchoisson", + "Pixiefish": "Fée poisson", + "Spiderfish": "Poissaraignée", + "HerosHat": "Chapeau de héros", + "TundraTrout": "Truite des Toundras", + "UnicornFish": "Licoisson", + "GuideVoodooFish": "Guide vaudousson", + "Wyverntail": "Vouivroisson", + "ZombieFish": "Poissombie", + "AmanitaFungifin": "Amanite champoisson", + "Angelfish": "Angeoisson", + "BloodyManowar": "Méduse sanglante", + "Bonefish": "Poisquelette", + "Bunnyfish": "Lapoisson", + "HerosShirt": "Chemisier de héros", + "CapnTunabeard": "Cap'taine Barbethon", + "Clownfish": "Poisson-clown", + "DemonicHellfish": "Poissenfer diabolique", + "Derpfish": "Derpoisson", + "Fishron": "Dracosson", + "InfectedScabbardfish": "Poisson-sabre infecté", + "Mudfish": "Bousson", + "Slimefish": "Poigelée", + "TropicalBarracuda": "Barracuda tropical", + "KingSlimeTrophy": "Trophée du Roi des gelées", + "HerosPants": "Pantalon de héros", + "ShipInABottle": "Bateau en bouteille", + "KingSlimeMask": "Masque du Roi des gelées", + "FinWings": "Ailes nageoires", + "TreasureMap": "Carte aux trésors", + "SeaweedPlanter": "Pot d'algues", + "PillaginMePixels": "Pillage en pixels", + "FishCostumeMask": "Masque de poisson", + "FishCostumeShirt": "Chemise de poisson", + "WoodenDoor": "Porte en bois", + "FishBowl": "Bocal à poisson", + "FishCostumeFinskirt": "Najupe de poisson", + "GingerBeard": "Barbe-Rousse", + "ArchaeologistsHat": "Chapeau d'archéologue", + "ArchaeologistsJacket": "Veste d'archéologue", + "ArchaeologistsPants": "Pantalon d'archéologue", + "OpticStaff": "Sceptre optique", + "BlackThread": "Fil noir", + "GreenThread": "Fil vert", + "NinjaHood": "Capuche de ninja", + "NinjaShirt": "Chemise de ninja", + "NinjaPants": "Pantalon de ninja", + "Leather": "Cuir", + "StoneWall": "Mur en pierre", + "RedHat": "Chapeau rouge", + "Goldfish": "Poisson doré", + "Robe": "Robe", + "RobotHat": "Chapeau de robot", + "GoldCrown": "Couronne en or", + "HellfireArrow": "Flèche de l'enfer", + "Sandgun": "Sableuse", + "GuideVoodooDoll": "Poupée vaudou du guide", + "DivingHelmet": "Casque de plongée", + "FamiliarShirt": "Chemise ordinaire", + "Acorn": "Gland", + "FamiliarPants": "Pantalon ordinaire", + "FamiliarWig": "Perruque ordinaire", + "DemonScythe": "Faux démoniaque", + "NightsEdge": "Épée des ténèbres", + "DarkLance": "Lance du mal", + "Coral": "Corail", + "Cactus": "Cactus", + "Trident": "Trident", + "SilverBullet": "Balle en argent", + "ThrowingKnife": "Couteau de lancer", + "LesserHealingPotion": "Faible potion de soin", + "Spear": "Lance", + "Blowpipe": "Sarbacane", + "Glowstick": "Bâton lumineux", + "Seed": "Graine", + "WoodenBoomerang": "Boomerang en bois", + "Aglet": "Ferret", + "StickyGlowstick": "Bâton lumineux collant", + "PoisonedKnife": "Couteau empoisonné", + "ObsidianSkinPotion": "Potion d'enveloppe d'obsidienne", + "RegenerationPotion": "Potion de régénération", + "AngryTrapperBanner": "Bannière de Trappeur irrité", + "ArmoredVikingBanner": "Bannière de Viking en armure", + "BlackSlimeBanner": "Bannière de Gelée noire", + "LifeCrystal": "Cristal de santé", + "SwiftnessPotion": "Potion de rapidité", + "BlueArmoredBonesBanner": "Bannière de Squelette en armure bleue", + "BlueCultistArcherBanner": "Bannière d'Archer adepte bleu", + "ManaCloakStar": "", + "BlueCultistFighterBanner": "Bannière de Guerrier adepte bleu", + "BoneLeeBanner": "Bannière de Bones Lee", + "ClingerBanner": "Bannière d'Accrocheur", + "CochinealBeetleBanner": "Bannière de Cochenille", + "CorruptPenguinBanner": "Bannière de Manchot corrompu", + "CorruptSlimeBanner": "Bannière de Gelée corrompue", + "CorruptorBanner": "Bannière de Corrupteur", + "GillsPotion": "Potion de branchies", + "CrimslimeBanner": "Bannière de Gelarmin", + "CursedSkullBanner": "Bannière de Crâne maudit", + "CyanBeetleBanner": "Bannière de Scarabée cyan", + "DevourerBanner": "Bannière de Dévoreur", + "DiablolistBanner": "Bannière de Diaboliste", + "DoctorBonesBanner": "Bannière de Docteur Bones", + "DungeonSlimeBanner": "Bannière de Gelée de donjon", + "DungeonSpiritBanner": "Bannière d'Esprit de donjon", + "ElfArcherBanner": "Bannière d'Archer elfe", + "ElfCopterBanner": "Bannière d'Hélico elfe", + "IronskinPotion": "Potion d'enveloppe de fer", + "EyezorBanner": "Bannière de Zombolaire", + "FlockoBanner": "Bannière de Flocon", + "GhostBanner": "Bannière de Fantôme", + "GiantBatBanner": "Bannière de Chauve-souris géante", + "GiantCursedSkullBanner": "Bannière de Crâne maudit géant", + "GiantFlyingFoxBanner": "Bannière de Roussette géante", + "GingerbreadManBanner": "Bannière du Bonhomme de pain d'épices", + "GoblinArcherBanner": "Bannière d'Archer gobelin", + "GreenSlimeBanner": "Bannière de Gelée verte", + "HeadlessHorsemanBanner": "Bannière du Cavalier sans tête", + "ManaRegenerationPotion": "Potion de régénération de mana", + "HellArmoredBonesBanner": "Bannière de Squelette en armure infernale", + "HellhoundBanner": "Bannière de Chien de l'enfer", + "HoppinJackBanner": "Bannière de Citrouille sauteuse", + "IceBatBanner": "Bannière de Chauve-souris de glace", + "IceGolemBanner": "Bannière de Golem de glace", + "IceSlimeBanner": "Bannière de Gelée de glace", + "IchorStickerBanner": "Bannière de Cracheuse d'ichor", + "IlluminantBatBanner": "Bannière de Chauve-souris lumineuse", + "IlluminantSlimeBanner": "Bannière de Gelée lumineuse", + "JungleBatBanner": "Bannière de Chauve-souris de la jungle", + "MagicPowerPotion": "Potion de puissance magique", + "JungleSlimeBanner": "Bannière de Gelée de la jungle", + "KrampusBanner": "Bannière de Krampus", + "LacBeetleBanner": "Bannière de Scarabée du lac", + "LavaBatBanner": "Bannière de Chauve-souris de lave", + "LavaSlimeBanner": "Bannière de Gelée de lave", + "MartianBrainscramblerBanner": "Bannière d'Embrouilleur martien", + "MartianDroneBanner": "Bannière de Drone martien", + "MartianEngineerBanner": "Bannière d'Ingénieur martien", + "MartianGigazapperBanner": "Bannière de Gigataser martien", + "MartianGreyGruntBanner": "Bannière de Soldat gris martien", + "FeatherfallPotion": "Potion de chute lente", + "MartianOfficerBanner": "Bannière d'Officier martien", + "MartianRaygunnerBanner": "Bannière de Tireur laser martien", + "MartianScutlixGunnerBanner": "Bannière de Tireur de Scutlix martien", + "MartianTeslaTurretBanner": "Bannière de Tourelle de Tesla martienne", + "MisterStabbyBanner": "Bannière de Monsieur Poignard", + "MotherSlimeBanner": "Bannière de Mère Gelée", + "NecromancerBanner": "Bannière de Nécromancien", + "NutcrackerBanner": "Bannière de Casse-Noisette", + "PaladinBanner": "Bannière de Paladin", + "PenguinBanner": "Bannière de Manchot", + "SpelunkerPotion": "Potion de spéléologue", + "PinkyBanner": "Bannière de Rosie", + "PoltergeistBanner": "Bannière d'Esprit frappeur", + "PossessedArmorBanner": "Bannière d'Armure possédée", + "PresentMimicBanner": "Bannière d'Imitation de cadeau", + "PurpleSlimeBanner": "Bannière de Gelée violette", + "RaggedCasterBanner": "Bannière d'Incantateur en loques", + "RainbowSlimeBanner": "Bannière de Gelée arc-en-ciel", + "RavenBanner": "Bannière de Corbeau", + "RedSlimeBanner": "Bannière de Gelée rouge", + "RuneWizardBanner": "Bannière de Magicien de runes", + "InvisibilityPotion": "Potion d'invisibilité", + "RustyArmoredBonesBanner": "Bannière de Squelette en armure rouillée", + "ScarecrowBanner": "Bannière d'Épouvantail", + "ScutlixBanner": "Bannière de Scutlix", + "SkeletonArcherBanner": "Bannière d'Archer squelette", + "SkeletonCommandoBanner": "Bannière de Commando squelette", + "SkeletonSniperBanner": "Bannière de Sniper squelette", + "SlimerBanner": "Bannière de Gelée volante", + "SnatcherBanner": "Bannière de Croqueur", + "SnowBallaBanner": "Bannière de Truand de neige", + "SnowmanGangstaBanner": "Bannière de Gangster de neige", + "ShinePotion": "Potion de brillance", + "SpikedIceSlimeBanner": "Bannière de Gelée de glace à pointes", + "SpikedJungleSlimeBanner": "Bannière de Gelée de jungle à pointes", + "SplinterlingBanner": "Bannière de l'Échardet", + "SquidBanner": "Bannière de Seiche", + "TacticalSkeletonBanner": "Bannière de Squelette tactique", + "TheGroomBanner": "Bannière du Marié", + "TimBanner": "Bannière de Tim", + "UndeadMinerBanner": "Bannière de Mineur mort-vivant", + "UndeadVikingBanner": "Bannière de Viking mort-vivant", + "WhiteCultistArcherBanner": "Bannière d'Archer adepte blanc", + "NightOwlPotion": "Potion d'oiseau de nuit", + "WhiteCultistCasterBanner": "Bannière d'Incantateur adepte blanc", + "WhiteCultistFighterBanner": "Bannière de Guerrier adepte blanc", + "YellowSlimeBanner": "Bannière de Gelée jaune", + "YetiBanner": "Bannière de Yéti", + "ZombieElfBanner": "Bannière d'Elfe zombie", + "StoneBlock": "Bloc de pierre", + "DirtWall": "Mur de terre", + "BattlePotion": "Potion de combat", + "ThornsPotion": "Potion d'épines", + "WaterWalkingPotion": "Potion pour marcher sur l'eau", + "ArcheryPotion": "Potion d'archerie", + "HunterPotion": "Potion de chasse", + "GravitationPotion": "Potion de gravitation", + "GoldChest": "Coffre en or", + "DaybloomSeeds": "Graines de fleurjour", + "MoonglowSeeds": "Graines d'éclalunaire", + "BlinkrootSeeds": "Graines de clignotherbe", + "Bottle": "Bouteille", + "DeathweedSeeds": "Graines de mortherbe", + "WaterleafSeeds": "Graine de feuilleau", + "FireblossomSeeds": "Graines de fleurfeu", + "Daybloom": "Fleurjour", + "Moonglow": "Éclalunaire", + "Blinkroot": "Clignotherbe", + "Deathweed": "Mortherbe", + "Waterleaf": "Feuilleau", + "Fireblossom": "Fleurfeu", + "SharkFin": "Nageoire de requin", + "WoodenTable": "Table en bois", + "Feather": "Plume", + "Tombstone": "Pierre tombale", + "MimeMask": "Masque de mime", + "AntlionMandible": "Mandibule de fourmilion", + "IllegalGunParts": "Pièces d'arme illégales", + "TheDoctorsShirt": "Chemise du Docteur", + "TheDoctorsPants": "Pantalon du Docteur", + "GoldenKey": "Clé dorée", + "ShadowChest": "Coffre de l'ombre", + "ShadowKey": "Clé de l'ombre", + "Furnace": "Four", + "ObsidianBrickWall": "Mur de brique en obsidienne", + "JungleSpores": "Spores de jungle", + "Loom": "Métier", + "Piano": "Piano", + "Dresser": "Commode", + "Bench": "Banc", + "Bathtub": "Baignoire", + "RedBanner": "Bannière rouge", + "GreenBanner": "Bannière verte", + "BlueBanner": "Bannière bleue", + "WoodenChair": "Chaise en bois", + "YellowBanner": "Bannière jaune", + "LampPost": "Lampadaire", + "TikiTorch": "Torche Tiki", + "Barrel": "Tonneau", + "ChineseLantern": "Lanterne chinoise", + "CookingPot": "Marmite", + "Safe": "Coffre-fort", + "SkullLantern": "Lanterne crâne", + "TrashCan": "Poubelle", + "PlatinumBow": "Arc en platine", + "PlatinumHammer": "Marteau en platine", + "PlatinumAxe": "Hache en platine", + "PlatinumShortsword": "Épée courte en platine", + "PlatinumBroadsword": "Épée longue en platine", + "PlatinumPickaxe": "Pioche en platine", + "TungstenBow": "Arc en tungstène", + "TungstenHammer": "Marteau en tungstène", + "TungstenAxe": "Hache en tungstène", + "TungstenShortsword": "Épée courte en tungstène", + "Candelabra": "Candélabre", + "TungstenBroadsword": "Épée longue en tungstène", + "TungstenPickaxe": "Pioche en tungstène", + "LeadBow": "Arc en plomb", + "LeadHammer": "Marteau en plomb", + "LeadAxe": "Hache en plomb", + "LeadShortsword": "Épée courte en plomb", + "LeadBroadsword": "Épée longue en plomb", + "LeadPickaxe": "Pioche en plomb", + "TinBow": "Arc en étain", + "TinHammer": "Marteau en étain", + "IronAnvil": "Enclume en fer", + "PinkVase": "Vase rose", + "TinAxe": "Hache en étain", + "TinShortsword": "Épée courte en étain", + "TinBroadsword": "Épée longue en étain", + "TinPickaxe": "Pioche en étain", + "CopperBow": "Arc en cuivre", + "CopperHammer": "Marteau en cuivre", + "CopperAxe": "Hache en cuivre", + "CopperShortsword": "Épée courte en cuivre", + "CopperBroadsword": "Épée longue en cuivre", + "CopperPickaxe": "Pioche en cuivre", + "Mug": "Tasse", + "SilverBow": "Arc en argent", + "SilverHammer": "Marteau en argent", + "SilverAxe": "Hache en argent", + "SilverShortsword": "Épée courte en argent", + "SilverBroadsword": "Épée longue en argent", + "SilverPickaxe": "Pioche en argent", + "GoldBow": "Arc en or", + "GoldHammer": "Marteau en or", + "GoldAxe": "Hache en or", + "GoldShortsword": "Épée courte en or", + "Keg": "Fût", + "GoldBroadsword": "Épée longue en or", + "GoldPickaxe": "Pioche en or", + "Ale": "Bière", + "Bookcase": "Bibliothèque", + "Throne": "Trône", + "Bowl": "Bol", + "BowlofSoup": "Bol de soupe", + "Toilet": "Toilettes", + "GrandfatherClock": "Horloge de grand-père", + "WorkBench": "Établi", + "ArmorStatue": "Statue d'armure", + "GoblinBattleStandard": "Étendard de bataille de gobelins", + "TatteredCloth": "Tissu abîmé", + "Sawmill": "Scierie", + "CobaltOre": "Minerai de cobalt", + "MythrilOre": "Minerai de mithril", + "AdamantiteOre": "Minerai d'adamantite", + "Pwnhammer": "Supermarteau", + "Excalibur": "Excalibur", + "HallowedSeeds": "Graines scarées", + "Goggles": "Lunettes", + "EbonsandBlock": "Bloc de sable d'ébène", + "CobaltHat": "Chapeau en cobalt", + "CobaltHelmet": "Casque en cobalt", + "CobaltMask": "Masque en cobalt", + "CobaltBreastplate": "Plastron en cobalt", + "CobaltLeggings": "Jambières en cobalt", + "MythrilHood": "Capuche en mithril", + "MythrilHelmet": "Casque en mithril", + "MythrilHat": "Chapeau en mithril", + "MythrilChainmail": "Cotte de mailles en mithril", + "Lens": "Lentille", + "MythrilGreaves": "Grèves de mithril", + "CobaltBar": "Lingot de cobalt", + "MythrilBar": "Lingot de mithril", + "CobaltChainsaw": "Tronçonneuse en cobalt", + "MythrilChainsaw": "Tronçonneuse en mithril", + "CobaltDrill": "Foreuse en cobalt", + "MythrilDrill": "Foreuse en mithril", + "AdamantiteChainsaw": "Tronçonneuse en adamantite", + "AdamantiteDrill": "Foreuse en adamantite", + "DaoofPow": "Fouet taoïste", + "WoodenBow": "Arc en bois", + "MythrilHalberd": "Hallebarde en mithril", + "AdamantiteBar": "Lingot d'adamantite", + "GlassWall": "Mur en verre", + "Compass": "Boussole", + "DivingGear": "Matériel de plongée", + "GPS": "GPS", + "ObsidianHorseshoe": "Fer à cheval en obsidienne", + "ObsidianShield": "Bouclier en obsidienne", + "TinkerersWorkshop": "Atelier de bricolage", + "CloudinaBalloon": "Nuage dans un ballon", + "IronBroadsword": "Épée longue en fer", + "WoodenArrow": "Flèche en bois", + "AdamantiteHeadgear": "Couvre-chef en adamantite", + "AdamantiteHelmet": "Casque en adamantite", + "AdamantiteMask": "Masque en adamantite", + "AdamantiteBreastplate": "Plastron en adamantite", + "AdamantiteLeggings": "Jambières en adamantite", + "SpectreBoots": "Bottes spectrales", + "AdamantiteGlaive": "Glaive en adamantite", + "Toolbelt": "Ceinture à outils", + "PearlsandBlock": "Bloc de sable perlé", + "PearlstoneBlock": "Bloc de pierre perlée", + "FlamingArrow": "Flèche enflammée", + "MiningShirt": "Chemise de mineur", + "MiningPants": "Pantalon de mineur", + "PearlstoneBrick": "Brique de pierre perlée", + "IridescentBrick": "Brique irisée", + "MudstoneBlock": "Brique de pierre boueuse", + "CobaltBrick": "Brique de cobalt", + "MythrilBrick": "Brique de mithril", + "PearlstoneBrickWall": "Mur en brique de pierre perlée", + "IridescentBrickWall": "Mur en brique irisée", + "MudstoneBrickWall": "Mur en brique de pierre boueuse", + "Shuriken": "Shuriken", + "CobaltBrickWall": "Mur en brique de cobalt", + "MythrilBrickWall": "Mur en brique de mithril", + "HolyWater": "Eau bénite", + "UnholyWater": "Eau profane", + "SiltBlock": "Bloc de vase", + "FairyBell": "Cloche de bonne fée", + "BreakerBlade": "La Briseuse", + "BlueTorch": "Torche bleue", + "RedTorch": "Torche rouge", + "GreenTorch": "Torche verte", + "SuspiciousLookingEye": "Œil suspect", + "PurpleTorch": "Torche violette", + "WhiteTorch": "Torche blanche", + "YellowTorch": "Torche jaune", + "DemonTorch": "Torche démoniaque", + "ClockworkAssaultRifle": "Fusil d'assaut mécanique", + "CobaltRepeater": "Arbalète en cobalt", + "MythrilRepeater": "Arbalète en mithril", + "DualHook": "Double grappin", + "StarStatue": "Statue d'étoile", + "SwordStatue": "Statue d'épée", + "DemonBow": "Arc démoniaque", + "SlimeStatue": "Statue de gelée", + "GoblinStatue": "Statue de gobelin", + "ShieldStatue": "Statue de bouclier", + "BatStatue": "Statue de chauve-souris", + "FishStatue": "Statue de poisson", + "BunnyStatue": "Statue de lapin", + "SkeletonStatue": "Statue de squelette", + "ReaperStatue": "Statue de faucheuse", + "WomanStatue": "Statue de femme", + "ImpStatue": "Statue de diablotin", + "WarAxeoftheNight": "Hache de guerre de la nuit", + "GargoyleStatue": "Statue de gargouille", + "GloomStatue": "Statue de morosité", + "HornetStatue": "Statue de frelon", + "BombStatue": "Statue de bombe", + "CrabStatue": "Statue de crabe", + "HammerStatue": "Statue de marteau", + "PotionStatue": "Statue de potion", + "SpearStatue": "Statue de lance", + "CrossStatue": "Statue de croix", + "JellyfishStatue": "Statue de méduse", + "LightsBane": "Fléau de la lumière", + "BowStatue": "Statue d'arc", + "BoomerangStatue": "Statue de boomerang", + "BootStatue": "Statue de botte", + "ChestStatue": "Statue de coffre", + "BirdStatue": "Statue d'oiseau", + "AxeStatue": "Statue de hache", + "CorruptStatue": "Statue corrompue", + "TreeStatue": "Statue d'arbre", + "AnvilStatue": "Statue d'enclume", + "PickaxeStatue": "Statue de pioche", + "UnholyArrow": "Flèche profane", + "MushroomStatue": "Statue de champignon", + "EyeballStatue": "Statue de globe oculaire", + "PillarStatue": "Statue de pilier", + "HeartStatue": "Statue de cœur", + "PotStatue": "Statue de jarre", + "SunflowerStatue": "Statue de tournesol", + "KingStatue": "Statue de roi", + "QueenStatue": "Statue de reine", + "PiranhaStatue": "Statue de piranha", + "PlankedWall": "Mur à planches", + "Chest": "Coffre", + "WoodenBeam": "Poutre en bois", + "AdamantiteRepeater": "Arbalète en adamantite", + "AdamantiteSword": "Épée en adamantite", + "CobaltSword": "Épée en cobalt", + "MythrilSword": "Épée en mithril", + "MoonCharm": "Amulette lunaire", + "Ruler": "Règle", + "CrystalBall": "Boule de cristal", + "DiscoBall": "Boule à facettes", + "SorcererEmblem": "Emblème de mage", + "BandofRegeneration": "Anneau de régénération", + "WarriorEmblem": "Emblème de guerrier", + "RangerEmblem": "Emblème de ranger", + "DemonWings": "Ailes de démon", + "AngelWings": "Ailes d'ange", + "MagicalHarp": "Harpe magique", + "RainbowRod": "Bâton arc-en-ciel", + "IceRod": "Bâton de glace", + "NeptunesShell": "Coquillage de Neptune", + "Mannequin": "Mannequin", + "GreaterHealingPotion": "Forte potion de soin", + "Mushroom": "Champignon", + "MagicMirror": "Miroir magique", + "GreaterManaPotion": "Forte potion de soin mana", + "PixieDust": "Poussière de fée", + "CrystalShard": "Fragment de cristal", + "ClownHat": "Chapeau de clown", + "ClownShirt": "Chemise de clown", + "ClownPants": "Pantalon de clown", + "Flamethrower": "Lance-flammes", + "Bell": "Cloche", + "Harp": "Harpe", + "Wrench": "Clé anglaise rouge", + "JestersArrow": "Flèche de bouffon", + "WireCutter": "Pince coupante", + "ActiveStoneBlock": "Bloc de pierre actif", + "InactiveStoneBlock": "Bloc de pierre inactif", + "Lever": "Levier", + "LaserRifle": "Fusil à laser", + "CrystalBullet": "Balle de cristal", + "HolyArrow": "Flèche bénite", + "MagicDagger": "Dague magique", + "CrystalStorm": "Tempête de cristal", + "CursedFlames": "Flammes maudites", + "AngelStatue": "Statue d'ange", + "SoulofLight": "Âme de lumière", + "SoulofNight": "Âme de nuit", + "CursedFlame": "Flamme maudite", + "CursedTorch": "Torche maudite", + "AdamantiteForge": "Forge en adamantite", + "MythrilAnvil": "Enclume en mithril", + "UnicornHorn": "Corne de licorne", + "DarkShard": "Fragment obscur", + "LightShard": "Fragment clair", + "RedPressurePlate": "Plaque de pression rouge", + "CloudinaBottle": "Nuage en bouteille", + "Wire": "Câble", + "SpellTome": "Tome de sorts", + "StarCloak": "Cape étoilée", + "Megashark": "Mégarequin", + "Shotgun": "Fusil à pompe", + "PhilosophersStone": "Pierre philosophale", + "TitanGlove": "Gant de titan", + "CobaltNaginata": "Naginata en cobalt", + "Switch": "Interrupteur", + "DartTrap": "Piège à fléchette", + "HermesBoots": "Bottes d'Hermès", + "Boulder": "Rocher", + "GreenPressurePlate": "Plaque de pression verte", + "GrayPressurePlate": "Plaque de pression grise", + "BrownPressurePlate": "Plaque de pression marron", + "MechanicalEye": "Œil mécanique", + "CursedArrow": "Flèche maudite", + "CursedBullet": "Balle maudite", + "SoulofFright": "Âme d'effroi", + "SoulofMight": "Âme de puissance", + "SoulofSight": "Âme de vision", + "EnchantedBoomerang": "Boomerang envoûté", + "Gungnir": "Gungnir", + "HallowedPlateMail": "Buste d'armure sacré", + "HallowedGreaves": "Grèves sacrées", + "HallowedHelmet": "Casque sacré", + "CrossNecklace": "Pendentif en croix", + "ManaFlower": "Fleur de mana", + "MechanicalWorm": "Ver mécanique", + "MechanicalSkull": "Crâne mécanique", + "HallowedHeadgear": "Couvre-chef sacré", + "HallowedMask": "Masque sacré", + "DemoniteOre": "Minerai de démonite", + "SlimeCrown": "Gelée couronnée", + "LightDisc": "Disque de lumière", + "MusicBoxOverworldDay": "Boîte à musique (Alt. jour à la surface)", + "MusicBoxEerie": "Boîte à musique (étrange)", + "MusicBoxNight": "Boîte à musique (nuit)", + "MusicBoxTitle": "Boîte à musique (tuile)", + "MusicBoxUnderground": "Boîte à musique (souterrain)", + "MusicBoxBoss1": "Boîte à musique (boss 1)", + "MusicBoxJungle": "Boîte à musique (jungle)", + "MusicBoxCorruption": "Boîte à musique (corruption)", + "DemoniteBar": "Lingot de démonite", + "MusicBoxUndergroundCorruption": "Boîte à musique (souterrain de corruption)", + "MusicBoxTheHallow": "Boîte à musique (le sacré)", + "MusicBoxBoss2": "Boîte à musique (boss 2)", + "MusicBoxUndergroundHallow": "Boîte à musique (sacré souterrain)", + "MusicBoxBoss3": "Boîte à musique (boss 3)", + "SoulofFlight": "Âme d'envol", + "MusicBox": "Boîte à musique", + "DemoniteBrick": "Brique de démonite", + "HallowedRepeater": "Arbalète sacré", + "Drax": "Forche", + "Heart": "Cœur", + "Explosives": "Explosifs", + "InletPump": "Pompe entrante", + "OutletPump": "Pompe sortante", + "Timer1Second": "Chrono de 1 seconde", + "Timer3Second": "Chrono de 3 secondes", + "Timer5Second": "Chrono de 5 secondes", + "CandyCaneBlock": "Bloc de sucre d'orge", + "CandyCaneWall": "Mur en sucre d'orge", + "SantaHat": "Chapeau de père Noël", + "SantaShirt": "Chemise de père Noël", + "CorruptSeeds": "Graines corrompues", + "SantaPants": "Pantalon de père Noël", + "GreenCandyCaneBlock": "Bloc de sucre d'orge vert", + "GreenCandyCaneWall": "Mur en sucre d'orge vert", + "SnowBlock": "Bloc de neige", + "SnowBrick": "Brique de neige", + "SnowBrickWall": "Mur en brique de neige", + "BlueLight": "Lumière bleue", + "RedLight": "Lumière rouge", + "GreenLight": "Lumière verte", + "BluePresent": "Cadeau bleu", + "IronShortsword": "Épée courte en fer", + "VileMushroom": "Champignon vil", + "GreenPresent": "Cadeau vert", + "YellowPresent": "Cadeau jaune", + "SnowGlobe": "Boule à neige", + "Carrot": "Carotte", + "AdamantiteBeam": "Poutre d'adamantite", + "AdamantiteBeamWall": "Mur en poutres d'adamantite", + "DemoniteBrickWall": "Mur en brique de démonite", + "SandstoneBrick": "Brique de grès", + "SandstoneBrickWall": "Mur en brique de grès", + "EbonstoneBrick": "Brique de pierre d'ébène", + "EbonstoneBlock": "Bloc de pierre d'ébène", + "EbonstoneBrickWall": "Mur en brique de pierre d'ébène", + "RedStucco": "Stuc rouge", + "YellowStucco": "Stuc jaune", + "GreenStucco": "Stuc vert", + "GrayStucco": "Stuc gris", + "RedStuccoWall": "Mur en stuc rouge", + "YellowStuccoWall": "Mur en stuc jaune", + "GreenStuccoWall": "Mur en stuc vert", + "GrayStuccoWall": "Mur en stuc gris", + "Ebonwood": "Ébène", + "GrassSeeds": "Graines d'herbe", + "RichMahogany": "Acajou riche", + "Pearlwood": "Bois perlé", + "EbonwoodWall": "Mur en ébène", + "RichMahoganyWall": "Mur en acajou riche", + "PearlwoodWall": "Mur en bois perlé", + "EbonwoodChest": "Coffre en ébène", + "RichMahoganyChest": "Coffre en acajou riche", + "PearlwoodChest": "Coffre en bois perlé", + "EbonwoodChair": "Chaise en ébène", + "RichMahoganyChair": "Chaise en acajou riche", + "Sunflower": "Tournesol", + "PearlwoodChair": "Chaise en bois perlé", + "EbonwoodPlatform": "Plateforme en ébène", + "RichMahoganyPlatform": "Plateforme en acajou riche", + "PearlwoodPlatform": "Plateforme en bois perlé", + "BonePlatform": "Plateforme en os", + "EbonwoodWorkBench": "Établi en ébène", + "RichMahoganyWorkBench": "Étable en acajou riche", + "PearlwoodWorkBench": "Établi en bois perlé", + "EbonwoodTable": "Table en ébène", + "RichMahoganyTable": "Table en acajou riche", + "Vilethorn": "Vilépine", + "PearlwoodTable": "Table en bois perlé", + "EbonwoodPiano": "Piano en ébène", + "RichMahoganyPiano": "Piano en acajou riche", + "PearlwoodPiano": "Piano en bois perlé", + "EbonwoodBed": "Lit en ébène", + "RichMahoganyBed": "Lit en acajou riche", + "PearlwoodBed": "Lit en bois perlé", + "EbonwoodDresser": "Commode en ébène", + "RichMahoganyDresser": "Commode en acajou riche", + "PearlwoodDresser": "Commode en bois perlé", + "Starfury": "Furie étoilée", + "EbonwoodDoor": "Porte en ébène", + "RichMahoganyDoor": "Porte en acajou riche", + "PearlwoodDoor": "Porte en bois perlé", + "EbonwoodSword": "Épée en ébène", + "EbonwoodHammer": "Marteau en ébène", + "EbonwoodBow": "Arc en ébène", + "RichMahoganySword": "Épée en acajou riche", + "RichMahoganyHammer": "Marteau en acajou riche", + "RichMahoganyBow": "Arc en acajou riche", + "PearlwoodSword": "Épée en bois perlé", + "PurificationPowder": "Poudre de purification", + "PearlwoodHammer": "Marteau en bois perlé", + "PearlwoodBow": "Arc en bois perlé", + "RainbowBrick": "Brique arc-en-ciel", + "RainbowBrickWall": "Mur en brique arc-en-ciel", + "IceBlock": "Bloc de glace", + "RedsWings": "Ailes de Red", + "RedsHelmet": "Casque de Red", + "RedsBreastplate": "Plastron de Red", + "RedsLeggings": "Jambières de Red", + "Fish": "Poisson", + "VilePowder": "Poudre infecte", + "IceBoomerang": "Boomerang glacial", + "Keybrand": "Keybrand", + "Cutlass": "Coutelas", + "TrueExcalibur": "Véritable Excalibur", + "TrueNightsEdge": "Vraie Épée des ténèbres", + "Frostbrand": "Lame de givre", + "RedPotion": "Potion rouge", + "TacticalShotgun": "Fusil à pompe tactique", + "RottenChunk": "Morceau avarié", + "IvyChest": "Coffre de lierre", + "Marrow": "Moelle", + "UnholyTrident": "Trident profane", + "FrostHelmet": "Casque de givre", + "FrostBreastplate": "Plastron de givre", + "FrostLeggings": "Jambières de givre", + "TinHelmet": "Casque en étain", + "TinChainmail": "Cotte de mailles en étain", + "TinGreaves": "Grèves en étain", + "WormTooth": "Dent de ver", + "LeadHelmet": "Casque en plomb", + "LeadChainmail": "Cotte de mailles en plomb", + "LeadGreaves": "Grèves en plomb", + "TungstenHelmet": "Casque en tungstène", + "TungstenChainmail": "Cotte de mailles en tungstène", + "TungstenGreaves": "Grèves en tungstène", + "PlatinumHelmet": "Casque en platine", + "PlatinumChainmail": "Cotte de mailles en platine", + "PlatinumGreaves": "Grèves en platine", + "TinOre": "Minerai en étain", + "IronHammer": "Marteau en fer", + "WormFood": "Appât à ver", + "LeadOre": "Minerai de plomb", + "TungstenOre": "Minerai de tungstène", + "PlatinumOre": "Minerai de platine", + "TinBar": "Lingot d'étain", + "LeadBar": "Lingot de plomb", + "TungstenBar": "Lingot de tungstène", + "PlatinumBar": "Lingot de platine", + "TinWatch": "Montre en étain", + "TungstenWatch": "Montre en tungstène", + "PlatinumWatch": "Montre en platine", + "CopperCoin": "Pièce de cuivre", + "TinChandelier": "Chandelier en étain", + "TungstenChandelier": "Chandelier en tungstène", + "PlatinumChandelier": "Chandelier en platine", + "PlatinumCandle": "Bougie en platine", + "PlatinumCandelabra": "Candélabre en platine", + "PlatinumCrown": "Couronne en platine", + "LeadAnvil": "Enclume en plomb", + "TinBrick": "Brique d'étain", + "TungstenBrick": "Brique de tungstène", + "PlatinumBrick": "Brique de platine", + "SilverCoin": "Pièce d'argent", + "TinBrickWall": "Mur en brique d'étain", + "TungstenBrickWall": "Mur en brique de tungstène", + "PlatinumBrickWall": "Mur en brique de platine", + "BeamSword": "Épée rayonnante", + "IceBlade": "Épée de glace", + "IceBow": "Arc de glace", + "FrostStaff": "Sceptre de givre", + "WoodHelmet": "Casque en bois", + "WoodBreastplate": "Plastron en bois", + "WoodGreaves": "Grèves en bois", + "GoldCoin": "Pièce d'or", + "EbonwoodHelmet": "Casque en ébène", + "EbonwoodBreastplate": "Plastron en ébène", + "EbonwoodGreaves": "Grèves en ébène", + "RichMahoganyHelmet": "Casque en acajou riche", + "RichMahoganyBreastplate": "Plastron en acajou riche", + "RichMahoganyGreaves": "Grèves en acajou riche", + "PearlwoodHelmet": "Casque en bois perlé", + "PearlwoodBreastplate": "Plastron en bois perlé", + "PearlwoodGreaves": "Grèves en bois perlé", + "AmethystStaff": "Sceptre d'améthyste", + "PlatinumCoin": "Pièce de platine", + "TopazStaff": "Sceptre de topaze", + "SapphireStaff": "Sceptre de saphir", + "EmeraldStaff": "Sceptre d'émeraude", + "RubyStaff": "Sceptre de rubis", + "DiamondStaff": "Sceptre de diamant", + "GrassWall": "Mur en verre", + "JungleWall": "Mur de jungle", + "FlowerWall": "Mur de fleurs", + "Jetpack": "Jetpack", + "ButterflyWings": "Ailes de papillon", + "FallenStar": "Étoile filante", + "CactusWall": "Mur de cactus", + "Cloud": "Nuage", + "CloudWall": "Mur de nuage", + "Seaweed": "Algue", + "RuneHat": "Chapeau de rune", + "RuneRobe": "Robe de rune", + "MushroomSpear": "Lance de champignon", + "TerraBlade": "Lame Terra", + "GrenadeLauncher": "Lance-grenades", + "RocketLauncher": "Lance-roquettes", + "CopperGreaves": "Grèves en cuivre", + "ProximityMineLauncher": "Lance-mines de proximité", + "FairyWings": "Ailes de bonne fée", + "SlimeBlock": "Bloc de gelée", + "FleshBlock": "Bloc de chair", + "MushroomWall": "Mur en champignons", + "RainCloud": "Nuage de pluie", + "BoneBlock": "Bloc d'os", + "FrozenSlimeBlock": "Bloc de gelée glacée", + "BoneBlockWall": "Mur en blocs d'os", + "SlimeBlockWall": "Mur en blocs de gelée", + "IronGreaves": "Grèves en fer", + "FleshBlockWall": "Mur en blocs de chair", + "RocketI": "Fusée I", + "RocketII": "Fusée II", + "RocketIII": "Fusée III", + "RocketIV": "Fusée IV", + "AsphaltBlock": "Bloc d'asphalte", + "CobaltPickaxe": "Pioche en cobalt", + "MythrilPickaxe": "Pioche en mithril", + "AdamantitePickaxe": "Pioche en adamantite", + "Clentaminator": "Nettoyeur", + "SilverGreaves": "Grèves en argent", + "GreenSolution": "Solution verte", + "BlueSolution": "Solution bleue", + "PurpleSolution": "Solution violette", + "DarkBlueSolution": "Solution bleu foncé", + "RedSolution": "Solution rouge", + "HarpyWings": "Ailes de harpie", + "BoneWings": "Ailes d'os", + "Hammush": "Marteaugnon", + "NettleBurst": "Explosion d'orties", + "AnkhBanner": "Bannière d'Ânkh", + "GoldGreaves": "Grèves en or", + "SnakeBanner": "Bannière de Serpent", + "OmegaBanner": "Bannière d'Oméga", + "CrimsonHelmet": "Casque carmin", + "CrimsonScalemail": "Buste d'armure carmin", + "CrimsonGreaves": "Grèves carmin", + "BloodButcherer": "Boucher sanglant", + "TendonBow": "Arc de tendon", + "FleshGrinder": "Broyeur de chair", + "DeathbringerPickaxe": "Pioche de la mort", + "BloodLustCluster": "Bouquet sanguinaire", + "Torch": "Torche", + "CopperChainmail": "Cotte de mailles en cuivre", + "TheUndertaker": "Le Croque-mort", + "TheMeatball": "La Boulette de viande", + "TheRottedFork": "La Fourche pourrie", + "LivingWoodChair": "Chaise en bois vivant", + "CactusChair": "Chaise en cactus", + "BoneChair": "Chaise en os", + "FleshChair": "Chaise en chair", + "IronChainmail": "Cotte de mailles en fer", + "MushroomChair": "Chaise en champignon", + "BoneWorkBench": "Établi en os", + "CactusWorkBench": "Établi en cactus", + "FleshWorkBench": "Établi en chair", + "MushroomWorkBench": "Établi en champignon", + "SlimeWorkBench": "Établi en gelée", + "CactusDoor": "Porte en cactus", + "FleshDoor": "Porte en chair", + "MushroomDoor": "Porte en champignon", + "LivingWoodDoor": "Porte en bois vivant", + "SilverChainmail": "Cotte de mailles en argent", + "BoneDoor": "Porte en os", + "FlameWings": "Ailes de flammes", + "FrozenWings": "Ailes gelées", + "GhostWings": "Ailes spectrales", + "SunplateBlock": "Bloc de soleil", + "DiscWall": "Mur de disques", + "SkywareChair": "Chaise céleste", + "BoneTable": "Table en os", + "FleshTable": "Table en chair", + "LivingWoodTable": "Table en bois vivant", + "GoldChainmail": "Cotte de mailles en or", + "SkywareTable": "Table céleste", + "LivingWoodChest": "Coffre en bois vivant", + "LivingWoodWand": "Baguette en bois vivant", + "PurpleIceBlock": "Bloc de glace violet", + "PinkIceBlock": "Bloc de glace rose", + "RedIceBlock": "Bloc de glace rouge", + "CrimstoneBlock": "Bloc de pierre carmin", + "SkywareDoor": "Porte céleste", + "SkywareChest": "Coffre céleste", + "SteampunkHat": "Chapeau steampunk", + "GrapplingHook": "Grappin", + "SteampunkShirt": "Chemise steampunk", + "SteampunkPants": "Pantalon steampunk", + "BeeHat": "Chapeau d'abeille", + "BeeShirt": "Chemise d'abeille", + "BeePants": "Pantalon d'abeille", + "WorldBanner": "Bannière de Monde", + "SunBanner": "Bannière de Soleil", + "GravityBanner": "Bannière de Gravité", + "PharaohsMask": "Masque de pharaon", + "Actuator": "Actionneur", + "Chain": "Chaîne", + "BlueWrench": "Clé anglaise bleue", + "GreenWrench": "Clé anglaise verte", + "BluePressurePlate": "Plaque de pression bleue", + "YellowPressurePlate": "Plaque de pression jaune", + "DiscountCard": "Carte de réduction", + "LuckyCoin": "Pièce porte-bonheur", + "UnicornonaStick": "Licorne à bâton", + "SandstorminaBottle": "Tempête de sable en bouteille", + "BeachBall": "Ballon de plage", + "ShadowScale": "Écaille de l'ombre", + "CharmofMyths": "Talisman de mythes", + "MoonShell": "Coquillage lunaire", + "StarVeil": "Voile d'étoiles", + "WaterWalkingBoots": "Bottes pour marcher sur l'eau", + "Tiara": "Diadème", + "PrincessDress": "Robe de princesse", + "PharaohsRobe": "Robe de pharaon", + "GreenCap": "Casquette verte", + "MushroomCap": "Casquette de champignon", + "TamOShanter": "Tam O' Shanter", + "PiggyBank": "Tirelire", + "MummyMask": "Masque de momie", + "MummyShirt": "Chemise de momie", + "MummyPants": "Pantalon de momie", + "CowboyHat": "Chapeau de cow-boy", + "CowboyJacket": "Veste de cow-boy", + "CowboyPants": "Pantalon de cow-boy", + "PirateHat": "Chapeau de pirate", + "PirateShirt": "Chemise de pirate", + "PiratePants": "Pantalon de pirate", + "VikingHelmet": "Casque de Viking", + "MiningHelmet": "Casque de mineur", + "CrimtaneOre": "Minerai de carmitane", + "CactusSword": "Épée en cactus", + "CactusPickaxe": "Pioche en cactus", + "IceBrick": "Brique de glace", + "IceBrickWall": "Mur en brique de glace", + "AdhesiveBandage": "Pansement", + "ArmorPolish": "Cire pour armure", + "Bezoar": "Bézoard", + "Blindfold": "Bandeau", + "FastClock": "Horloge en avance", + "CopperHelmet": "Casque en cuivre", + "Megaphone": "Mégaphone", + "Nazar": "Nazar", + "Vitamins": "Vitamines", + "TrifoldMap": "Carte dépliante", + "CactusHelmet": "Casque en cactus", + "CactusBreastplate": "Plastron en cactus", + "CactusLeggings": "Jambières en cactus", + "PowerGlove": "Gant de puissance", + "LightningBoots": "Bottes éclaires", + "SunStone": "Pierre solaire", + "Wood": "Bois", + "IronHelmet": "Casque en fer", + "MoonStone": "Pierre lunaire", + "ArmorBracing": "Fortifiant d'armure", + "MedicatedBandage": "Pansement médicalisé", + "ThePlan": "Le Plan", + "CountercurseMantra": "Mantra protecteur", + "CoinGun": "Fusil à pièces", + "LavaCharm": "Amulette de lave", + "ObsidianWaterWalkingBoots": "Bottes pour marcher sur l'eau en obsidienne", + "LavaWaders": "Cuissardes en lave", + "PureWaterFountain": "Fontaine d'eau pure", + "SilverHelmet": "Casque en argent", + "DesertWaterFountain": "Fontaine d'eau du désert", + "Shadewood": "Bois d'ombre", + "ShadewoodDoor": "Porte en bois d'ombre", + "ShadewoodPlatform": "Plateforme en bois d'ombre", + "ShadewoodChest": "Coffre en bois d'ombre", + "ShadewoodChair": "Chaise en bois d'ombre", + "ShadewoodWorkBench": "Établi en bois d'ombre", + "ShadewoodTable": "Table en bois d'ombre", + "ShadewoodDresser": "Commode en bois d'ombre", + "ShadewoodPiano": "Piano en bois d'ombre", + "GoldHelmet": "Casque en or", + "ShadewoodBed": "Lit en bois d'ombre", + "ShadewoodSword": "Épée en bois d'ombre", + "ShadewoodHammer": "Marteau en bois d'ombre", + "ShadewoodBow": "Arc en bois d'ombre", + "ShadewoodHelmet": "Casque en bois d'ombre", + "ShadewoodBreastplate": "Plastron en bois d'ombre", + "ShadewoodGreaves": "Grèves en bois d'ombre", + "ShadewoodWall": "Mur en bois d'ombre", + "Cannon": "Canon", + "Cannonball": "Boulet de canon", + "WoodWall": "Mur en bois", + "FlareGun": "Pistolet à fusées", + "Flare": "Fusée", + "BoneWand": "Baguette en os", + "LeafWand": "Baguette en feuille", + "FlyingCarpet": "Tapis volant", + "AvengerEmblem": "Emblème de vengeur", + "MechanicalGlove": "Gant mécanique", + "LandMine": "Mine", + "PaladinsShield": "Bouclier de paladin", + "WebSlinger": "Perce-toile", + "WoodPlatform": "Plateforme en bois", + "JungleWaterFountain": "Fontaine d'eau de la jungle", + "IcyWaterFountain": "Fontaine d'eau glaciale", + "CorruptWaterFountain": "Fontaine d'eau corrompue", + "CrimsonWaterFountain": "Fontaine d'eau carmin", + "HallowedWaterFountain": "Fontaine d'eau sacrée", + "BloodWaterFountain": "Fontaine d'eau sanguine", + "Umbrella": "Parapluie", + "ChlorophyteOre": "Minerai de chlorophyte", + "SteampunkWings": "Ailes steampunk", + "Snowball": "Boule de neige", + "FlintlockPistol": "Pistolet à silex", + "IceSkates": "Patins à glace", + "SnowballLauncher": "Lance-boules de neige", + "WebCoveredChest": "Coffre couvert de toile d'araignée", + "ClimbingClaws": "Griffes d'escalade", + "AncientIronHelmet": "Ancien casque de fer", + "AncientGoldHelmet": "Ancien casque d'or", + "AncientShadowHelmet": "Ancien casque de l'ombre", + "AncientShadowScalemail": "Ancienne cotte de mailles de l'ombre", + "AncientShadowGreaves": "Anciennes grèves de l'ombre", + "AncientNecroHelmet": "Ancien casque nécro", + "Musket": "Mousquet", + "AncientCobaltHelmet": "Ancien casque en cobalt", + "AncientCobaltBreastplate": "Ancien plastron en cobalt", + "AncientCobaltLeggings": "Anciennes jambières en cobalt", + "BlackBelt": "Ceinture noire", + "Boomstick": "Pistoboum", + "Rope": "Corde", + "Campfire": "Feu de camp", + "Marshmallow": "Guimauve", + "MarshmallowonaStick": "Brochette de guimauve", + "CookedMarshmallow": "Guimauve cuite", + "MusketBall": "Balle de mousquet", + "RedRocket": "Fusée rouge", + "GreenRocket": "Fusée verte", + "BlueRocket": "Fusée bleue", + "YellowRocket": "Fusée jaune", + "IceTorch": "Torche de glace", + "ShoeSpikes": "Chaussures à pointes", + "TigerClimbingGear": "Matériel d'escalade de tigre", + "Tabi": "Tabi", + "Minishark": "Minirequin", + "PinkThread": "Fil rose", + "ManaRegenerationBand": "Anneau de régénération de mana", + "SandstorminaBalloon": "Tempête de sable dans un ballon", + "MasterNinjaGear": "Matériel de ninja pro", + "RopeCoil": "Rouleau de corde", + "Blowgun": "Sarbafeu", + "BlizzardinaBottle": "Blizzard en bouteille", + "FrostburnArrow": "Flèche de brûledegivre", + "EnchantedSword": "Épée envoûtée", + "IronBow": "Arc de fer", + "PickaxeAxe": "Pioche-hache", + "CobaltWaraxe": "Hache de guerre en cobalt", + "MythrilWaraxe": "Hache de guerre en mithril", + "AdamantiteWaraxe": "Hache de guerre en adamantite", + "EatersBone": "Os de Dévoreur", + "BlendOMatic": "Mixomatique", + "MeatGrinder": "Hachoir à viande", + "Extractinator": "Extractinateur", + "Solidifier": "Solidificateur", + "Amber": "Ambre", + "AcidDye": "Teinture acide", + "ActuationAccessory": "Placeuromatique", + "ActuationRod": "Bâton d'activation", + "AlchemyTable": "Table d'alchimie", + "AlphabetStatue0": "Statue « 0 »", + "AlphabetStatue1": "Statue « 1 »", + "AlphabetStatue2": "Statue « 2 »", + "AlphabetStatue3": "Statue « 3 »", + "AlphabetStatue4": "Statue « 4 »", + "AlphabetStatue5": "Statue « 5 »", + "AlphabetStatue6": "Statue « 6 »", + "AlphabetStatue7": "Statue « 7 »", + "AlphabetStatue8": "Statue « 8 »", + "AlphabetStatue9": "Statue « 9 »", + "AlphabetStatueA": "Statue « A »", + "AlphabetStatueB": "Statue « B »", + "AlphabetStatueC": "Statue « C »", + "AlphabetStatueD": "Statue « D »", + "AlphabetStatueE": "Statue « E »", + "AlphabetStatueF": "Statue « F »", + "AlphabetStatueG": "Statue « G »", + "AlphabetStatueH": "Statue « H »", + "AlphabetStatueI": "Statue « I »", + "AlphabetStatueJ": "Statue « J »", + "AlphabetStatueK": "Statue « K »", + "AlphabetStatueL": "Statue « L »", + "AlphabetStatueM": "Statue « M »", + "AlphabetStatueN": "Statue « N »", + "AlphabetStatueO": "Statue « O »", + "AlphabetStatueP": "Statue « P »", + "AlphabetStatueQ": "Statue « Q »", + "AlphabetStatueR": "Statue « R »", + "AlphabetStatueS": "Statue « S »", + "AlphabetStatueT": "Statue « T »", + "AlphabetStatueU": "Statue « U »", + "AlphabetStatueV": "Statue « V »", + "AlphabetStatueW": "Statue « W »", + "AlphabetStatueX": "Statue « X »", + "AlphabetStatueY": "Statue « Y »", + "AlphabetStatueZ": "Statue « Z »", + "Amarok": "Amarok", + "AmberGemsparkWall": "Mur de blocs brillance d'ambre", + "AmberGemsparkWallOff": "Mur de blocs sans brillance d'ambre", + "AmberStaff": "Sceptre d'ambre", + "AmethystGemsparkWall": "Mur de blocs brillance d'améthyste", + "AmethystGemsparkWallOff": "Mur de blocs sans brillance d'améthyste", + "AncientArmorHat": "Coiffe antique", + "AncientArmorPants": "Pantalon antique", + "AncientArmorShirt": "Habit antique", + "AncientBattleArmorHat": "Masque interdit", + "AncientBattleArmorMaterial": "Fragment interdit", + "AncientBattleArmorPants": "Pantalon interdit", + "AncientBattleArmorShirt": "Robes interdites", + "AncientCloth": "Tissu antique", + "AncientHorn": "Corne antique", + "AnglerTackleBag": "Sac complet de pêche", + "AngryBonesBanner": "Bannière de Squelette furieux", + "AnnouncementBox": "Poste d'annonces", + "AntiGravityHook": "Grappin antigravité", + "AntlionClaw": "Épée-mandibule", + "ApprenticeBait": "Appât d'apprenti", + "ApprenticeHat": "Chapeau d'apprenti", + "ApprenticeRobe": "Robe d'apprenti", + "ApprenticeScarf": "Écharpe d'apprenti", + "ApprenticeTrousers": "Pantalon d'apprenti", + "ArchitectGizmoPack": "Lot de bidules d'architecte", + "Arkhalis": "Arkhalis", + "AviatorSunglasses": "Lunettes 0x33", + "Bacon": "Bacon", + "BalloonHorseshoeFart": "Ballon et fer à cheval verts", + "BalloonHorseshoeHoney": "Ballon et fer à cheval ambrés", + "BalloonHorseshoeSharkron": "Ballon et fer à cheval roses", + "BalloonPufferfish": "Ballon poisson-globe", + "BeeMask": "Masque de la Reine des abeilles", + "BeesKnees": "Arc des abeilles", + "BejeweledValkyrieBody": "Cape de Valkyrie de Lazure", + "BejeweledValkyrieHead": "Bandeau de Valkyrie de Lazure", + "BejeweledValkyrieWing": "Plateforme protectrice de Lazure", + "BewitchingTable": "Table ensorcelante", + "BlackAndWhiteDye": "Teinture noir et blanc", + "BlackCounterweight": "Contrepoids noir", + "BlackString": "Cordon noir", + "Bladetongue": "Langacérée", + "BlessedApple": "Pomme bénite", + "BlinkrootPlanterBox": "Pot de clignotherbe", + "BloodWater": "Eau sanglante", + "BloodZombieBanner": "Bannière de Zombie de sang", + "BloodZombieStatue": "Statue de Zombie de sang", + "BlueAcidDye": "Teinture acide bleue", + "BlueCounterweight": "Contrepoids bleu", + "BlueDungeonBathtub": "Baignoire bleue de donjon", + "BlueDungeonCandelabra": "Candélabre bleu de donjon", + "BlueDungeonChandelier": "Chandelier bleu de donjon", + "BlueDungeonChest": "Coffre bleu de donjon", + "BlueDungeonLamp": "Lampe bleue de donjon", + "BlueDungeonSink": "Évier bleu de donjon", + "BlueFlameAndSilverDye": "Teinture flamme bleu et argenté", + "BlueLunaticHood": "Capuche d'adepte lunaire", + "BlueLunaticRobe": "Robe d'adepte lunaire", + "BluePhasesaber": "Sabre laser bleu", + "BlueString": "Cordon bleu", + "BombFish": "Poisson bombe", + "BoneArrow": "Flèche en os", + "BoneBathtub": "Baignoire en os", + "BoneBed": "Lit en os", + "BoneBookcase": "Bibliothèque en os", + "BoneCampfire": "Feu de camp en os", + "BoneCandelabra": "Candélabre en os", + "BoneChandelier": "Chandelier en os", + "BoneChest": "Coffre en os", + "BoneClock": "Horloge en os", + "BoneDagger": "Couteau de lancer en os", + "BoneGlove": "Gant en os", + "BoneJavelin": "Javelot en os", + "BoneLamp": "Lampe en os", + "BoneLantern": "Lanterne en os", + "BoneRattle": "Hochet en os", + "BoneSink": "Lavabo en os", + "BoneSkeletonStatue": "Statue de squelette osseux", + "BoneTorch": "Torche en os", + "BoosterTrack": "Rail turbo", + "BorealWood": "Bois boréal", + "BorealWoodBathtub": "Baignoire en bois boréal", + "BorealWoodBed": "Lit en bois boréal", + "BorealWoodBookcase": "Bibliothèque en bois boréal", + "BorealWoodBow": "Arc en bois boréal", + "BorealWoodBreastplate": "Plastron en bois boréal", + "BorealWoodCandelabra": "Candélabre en bois boréal", + "BorealWoodCandle": "Bougie en bois boréal", + "BorealWoodChair": "Chaise en bois boréal", + "BorealWoodChandelier": "Chandelier en bois boréal", + "BorealWoodChest": "Coffre en bois boréal", + "BorealWoodClock": "Horloge en bois boréal", + "BorealWoodDoor": "Porte en bois boréal", + "BorealWoodDresser": "Commode en bois boréal", + "BorealWoodFence": "Barrière en bois boréal", + "BorealWoodGreaves": "Grèves en bois boréal", + "BorealWoodHammer": "Marteau en bois boréal", + "BorealWoodHelmet": "Casque en bois boréal", + "BorealWoodLamp": "Lampe en bois boréal", + "BorealWoodLantern": "Lanterne en bois boréal", + "BorealWoodPiano": "Piano en bois boréal", + "BorealWoodPlatform": "Plateforme en bois boréal", + "BorealWoodSink": "Évier en bois boréal", + "BorealWoodSofa": "Canapé en bois boréal", + "BorealWoodSword": "Épée en bois boréal", + "BorealWoodTable": "Table en bois boréal", + "BorealWoodWall": "Mur en bois boréal", + "BorealWoodWorkBench": "Établi en bois boréal", + "BossMaskMoonlord": "Masque du Seigneur de la lune", + "BottomlessBucket": "Seau d'eau sans fond", + "BouncyBomb": "Bombe à rebonds", + "BouncyDynamite": "Dynamite à rebonds", + "BouncyGlowstick": "Bâton lumineux à rebonds", + "BouncyGrenade": "Grenade à rebonds", + "BrainMask": "Masque du Cerveau de Cthulhu", + "BrainOfConfusion": "Cerveau de confusion", + "BrainOfCthulhuBossBag": "Sac de trésors", + "BrainScrambler": "Embrouilleur", + "BrightBrownDye": "Teinture marron vif", + "BrightSilverDye": "Teinture argenté vif", + "BrownAndBlackDye": "Teinture marron et noir", + "BrownAndSilverDye": "Teinture marron et argenté", + "BrownDye": "Teinture marron", + "BrownString": "Cordon marron", + "Bubble": "Bulle", + "BubbleGun": "Pistolet à bulles", + "BuccaneerBandana": "Bandana de flibustier", + "BuccaneerPants": "Pantalon de flibustier", + "BuccaneerShirt": "Tunique de flibustier", + "Buggy": "Grimace", + "BuggyStatue": "Statue de Grimace", + "BunnyfishTrophy": "Trophée de Lapoisson", + "BurningHadesDye": "Teinture d'Hadès brûlante", + "ButcherBanner": "Bannière de Boucher", + "ButchersChainsaw": "Tronçonneuse de boucher", + "ButterflyStatue": "Statue de papillon", + "CactusBathtub": "Baignoire en cactus", + "CactusBed": "Lit en cactus", + "CactusBookcase": "Bibliothèque en cactus", + "CactusCandelabra": "Candélabre en cactus", + "CactusCandle": "Bougie en cactus", + "CactusChandelier": "Chandelier en cactus", + "CactusChest": "Coffre en cactus", + "CactusClock": "Horloge en cactus", + "CactusLamp": "Lampe en cactus", + "CactusLantern": "Lanterne en cactus", + "CactusPlatform": "Plateforme en cactus", + "CactusSink": "Évier en cactus", + "CactusTable": "Table en cactus", + "CageBuggy": "Grimace en cage", + "CageEnchantedNightcrawler": "Insecte nocturne envoûté en cage", + "CageGrubby": "Limace en cage", + "CageSluggy": "Coriace en cage", + "Cascade": "Cascade", + "CelestialShell": "Coquillage céleste", + "CelestialSigil": "Sceau céleste", + "CellPhone": "Téléphone portable", + "ChainGuillotines": "Chaîne à guillotine", + "ChargedBlasterCannon": "Canon à charge", + "Chik": "Chik", + "Chimney": "Cheminée", + "ChlorophyteBrick": "Brique de chlorophyte", + "ChlorophyteBrickWall": "Mur en brique de chlorophyte", + "ChlorophyteDye": "Teinture de chlorophyte", + "ClingerStaff": "Sceptre d'Accrocheur", + "ClothierJacket": "Veste de tailleur", + "ClothierPants": "Pantalon de tailleur", + "Code1": "Code 1", + "Code2": "Code 2", + "CogWall": "Mur en roues dentées", + "CoinRing": "Anneau à pièces", + "CompanionCube": "Cube de voyage", + "CompassRose": "Rose des vents", + "ConfettiBlock": "Bloc de confetti", + "ConfettiBlockBlack": "Bloc de confetti de minuit", + "ConfettiCannon": "Canon à confetti", + "ConfettiWall": "Mur de confetti", + "ConfettiWallBlack": "Mur de confetti de minuit", + "ConveyorBeltLeft": "Tapis roulant (vers la droite)", + "ConveyorBeltRight": "Tapis roulant (vers la gauche)", + "CordageGuide": "Guide pur planter des cordes de fibre", + "CorruptFishingCrate": "Caisse corrompue", + "CorruptHardenedSand": "Bloc de sable d'ébène durci", + "CorruptHardenedSandWall": "Mur de sable d'ébène durci", + "CorruptPlanterBox": "Pot d'algue", + "CorruptSandstone": "Bloc de grès d'ébène", + "CorruptSandstoneWall": "Mur de grès d'ébène", + "CorruptYoyo": "Malaise", + "CosmicCarKey": "Clé de voiture cosmique", + "CrawdadBanner": "Bannière de Crabisse", + "CreatureFromTheDeepBanner": "Bannière de Créature des profondeurs", + "CrimsonFishingCrate": "Caisse carmin", + "CrimsonHardenedSand": "Bloc de sable carmin durci", + "CrimsonHardenedSandWall": "Mur de sable carmin durci", + "CrimsonHeart": "Cœur carmin", + "CrimsonPlanterBox": "Pot d'algue", + "CrimsonSandstone": "Bloc de grès carmin", + "CrimsonSandstoneWall": "Mur de grès carmin", + "CrimsonYoyo": "Artère", + "CrimtaneBrick": "Brique de carmitane", + "CrimtaneBrickWall": "Mur en brique de carmitane", + "CrystalBlock": "Bloc de cristal", + "CrystalBlockWall": "Mur en blocs de cristal", + "CrystalDart": "Fléchette de cristal", + "CrystalSerpent": "Serpent en cristal", + "CrystalVileShard": "Fragment vil de cristal", + "CultistBossBag": "Sac de trésors", + "CursedCampfire": "Feu de camp maudit", + "CursedDart": "Fléchette maudite", + "CyanString": "Cordon cyan", + "DaedalusStormbow": "Arc tonnerre de Dédale", + "DarkMummyBanner": "Bannière de momie du mal", + "DartPistol": "Pistolet à fléchettes", + "DartRifle": "Fusil à fléchettes", + "DayBloomPlanterBox": "Pot de Fleurjour", + "DayBreak": "Point du jour", + "DeadlySphereBanner": "Bannière de Sphère mortelle", + "DeadlySphereStaff": "Sceptre de Sphère mortelle", + "DefenderMedal": "Médaille de défenseur", + "DefendersForge": "Forge de défenseur", + "DemonCampfire": "Feu de camp démoniaque", + "DemonHeart": "Cœur démoniaque", + "DesertBasiliskBanner": "Bannière de Basilic", + "DesertDjinnBanner": "Bannière d'Esprit du désert", + "DesertFossil": "Fossile du désert", + "DesertFossilWall": "Mur de fossiles du désert", + "DesertGhoulBanner": "Bannière de Goule", + "DesertLamiaBanner": "Bannière de Lamia", + "DestroyerBossBag": "Sac de trésors", + "DestroyerMask": "Masque de Destructeur", + "Detonator": "Détonateur", + "DiamondGemsparkWall": "Mur brillance de diamant", + "DiamondGemsparkWallOff": "Mur sans brillance de diamant", + "DjinnLamp": "Lampe d'Esprit du désert", + "DjinnsCurse": "Malédiction de Djinn", + "DPSMeter": "Jauge de DGS", + "DrillContainmentUnit": "Dispositif d'extraction", + "DripplerBanner": "Bannière de Dégoulineur", + "DripplerStatue": "Statue de Dégoulineur", + "DrManFlyBanner": "Bannière du Dr Mouche ", + "DuckStatue": "Statue de canard", + "DukeFishronMask": "Masque du Duc Dracosson", + "DukeFishronTrophy": "Trophée de Duc Dracosson", + "DuneSplicerBanner": "Bannière de Colleur des dunes", + "DungeonFishingCrate": "Caisse de donjon", + "DyeTradersScimitar": "Cimeterre exotique", + "DyeTraderTurban": "Turban de teinturier", + "DynastyBathtub": "Baignoire en dynastie", + "DynastyBed": "Lit en dynastie", + "DynastyBookcase": "Bibliothèque en dynastie", + "DynastyBowl": "Bol en dynastie", + "DynastyCandelabra": "Grand bougie en dynastie", + "DynastyCandle": "Bougie en dynastie", + "DynastyChair": "Chaise en dynastie", + "DynastyChandelier": "Grande lanterne en dynastie", + "DynastyChest": "Coffre en dynastie", + "DynastyClock": "Horloge de dynastie", + "DynastyCup": "Gobelet en dynastie", + "DynastyLamp": "Lampe en dynastie", + "DynastyLantern": "Lanterne en dynastie", + "DynastySink": "Évier en dynastie", + "DynastyWorkBench": "Établi en dynastie", + "EaterMask": "Masque de Dévoreur des mondes", + "EaterOfWorldsBossBag": "Sac de trésors", + "EbonwoodBathtub": "Baignoire en ébène", + "EbonwoodBookcase": "Bibliothèque en ébène", + "EbonwoodCandelabra": "Candélabre en ébène", + "EbonwoodCandle": "Bougie en ébène", + "EbonwoodChandelier": "Chandelier en ébène", + "EbonwoodClock": "Horloge en ébène", + "EbonwoodLamp": "Lampe en ébène", + "EbonwoodLantern": "Lanterne en ébène", + "EbonwoodSink": "Évier en ébène", + "ElectrosphereLauncher": "Lance-électrosphère", + "EmeraldGemsparkWall": "Bloc brillance d'émeraude", + "EmeraldGemsparkWallOff": "Bloc sans brillance d'émeraude", + "EmptyDropper": "Compte-gouttes magique", + "EnchantedNightcrawler": "Insecte nocturne envoûté", + "EndlessMusketPouch": "Bourse infinie pour mousquet", + "EndlessQuiver": "Carquois infini", + "EngineeringHelmet": "Casque d'ingénieur", + "EoCShield": "Bouclier de Cthulhu", + "EyeMask": "Masque de l'Œil de Cthulhu", + "EyeOfCthulhuBossBag": "Sac de trésors", + "Fake_BlueDungeonChest": "Coffre bleu de donjon piégé", + "Fake_BoneChest": "Coffre en os piégé", + "Fake_BorealWoodChest": "Coffre en bois boréal piégé", + "Fake_CactusChest": "Coffre en cactus piégé", + "Fake_Chest": "Coffre piégé", + "Fake_CorruptionChest": "Coffre de la corruption piégé", + "Fake_CrimsonChest": "Coffre carmin piégé", + "Fake_DynastyChest": "Coffre en dynastie piégé", + "Fake_EbonwoodChest": "Coffre en ébène piégé", + "Fake_FleshChest": "Coffre en chair piégé", + "Fake_GlassChest": "Coffre en verre piégé", + "Fake_GoldChest": "Coffre en or piégé", + "Fake_GraniteChest": "Coffre en granite piégé", + "Fake_GreenDungeonChest": "Coffre vert de donjon piégé", + "Fake_HallowedChest": "Coffre sacré piégé", + "Fake_HoneyChest": "Coffre en miel piégé", + "Fake_IvyChest": "Coffre de lierre piégé", + "Fake_JungleChest": "Coffre de la jungle piégé", + "Fake_LihzahrdChest": "Coffre en lihzahrd piégé", + "Fake_LivingWoodChest": "Coffre en bois vivant piégé", + "Fake_MarbleChest": "Coffre en marbre piégé", + "Fake_MartianChest": "Coffre martien piégé", + "Fake_MeteoriteChest": "Coffre en météorite piégé", + "Fake_MushroomChest": "Coffre en champignon piégé", + "Fake_ObsidianChest": "Coffre en obsidienne piégé", + "Fake_PalmWoodChest": "Coffre en palmier piégé", + "Fake_PearlwoodChest": "Coffre en bois perlé piégé", + "Fake_PinkDungeonChest": "Coffre rose de donjon piégé", + "Fake_PumpkinChest": "Coffre en citrouille piégé", + "Fake_RichMahoganyChest": "Coffre en acajou riche piégé", + "Fake_ShadewoodChest": "Coffre en bois d'ombre piégé", + "Fake_ShadowChest": "Coffre de l'ombre piégé", + "Fake_SkywareChest": "Coffre céleste piégé", + "Fake_SlimeChest": "Coffre en gelée piégé", + "Fake_SpookyChest": "Coffre sinistre piégé", + "Fake_SteampunkChest": "Coffre steampunk piégé", + "Fake_WaterChest": "Coffre d'eau piégé", + "Fake_WebCoveredChest": "Coffre couvert de toile d'araignée piégé", + "FalconBlade": "Lame de faucon", + "FallenTuxedoPants": "Pantalon de smoking déchu", + "FallenTuxedoShirt": "Chemise de smoking déchu", + "FancyDishes": "Vaisselle de luxe", + "FetidBaghnakhs": "Baghnakhs fétides", + "FireBlossomPlanterBox": "Pot de fleurfeu", + "FireflyStatue": "Statue de luciole", + "Fireplace": "Cheminée", + "FireworkFountain": "Fontaine d'artifice", + "FireworksBox": "Boîte de feux d'artifice", + "FireworksLauncher": "Célébration", + "FishermansGuide": "Guide de poche du pêcheur", + "FishFinder": "Détecteur de poissons", + "FishronBossBag": "Sac de trésors", + "FishronWings": "Ailes de Dracosson", + "Flairon": "Fléon", + "FlameAndSilverDye": "Teinture flamme et argenté", + "FleshBathtub": "Baignoire en chair", + "FleshBed": "Lit en chair", + "FleshBookcase": "Bibliothèque en chair", + "FleshCandelabra": "Candélabre en chair", + "FleshCandle": "Bougie en chair", + "FleshChandelier": "Chandelier en chair", + "FleshChest": "Coffre en chair", + "FleshClock": "Horloge en chair", + "FleshDresser": "Commode en chair", + "FleshKnuckles": "Poing américain en chair", + "FleshLamp": "Lampe en chair", + "FleshLantern": "Lanterne en chair", + "FleshMask": "Masque du Mur de chair", + "FleshPiano": "Piano en chair", + "FleshSink": "Évier en chair", + "FleshSofa": "Canapé en chair", + "FloatingIslandFishingCrate": "Caisse céleste", + "FlowerBoots": "Bottes fleurs", + "FlowerBoyHat": "Pétales de tournesol loufoque", + "FlowerBoyPants": "Bas de tournesol loufoque", + "FlowerBoyShirt": "Haut de tournesol loufoque", + "FlyingAntlionBanner": "Bannière de Fourmilion envahisseur", + "FlyingDutchmanTrophy": "Trophée du Hollandais volant", + "FlyingKnife": "Couteau volant", + "FormatC": "Format:C", + "FossilHelm": "Casque en fossile", + "FossilOre": "Fossile solide", + "FossilPants": "Grèves en fossile", + "FossilShirt": "Buste d'armure en fossile", + "FragmentNebula": "Fragment de nébuleuse", + "FragmentSolar": "Fragment solaire", + "FragmentStardust": "Fragment astral", + "FragmentVortex": "Fragment de vortex", + "FritzBanner": "Bannière de Fritz", + "FrogStatue": "Statue de grenouille", + "FrostDaggerfish": "Daguesson givré", + "FrozenBathtub": "Baignoire gelée", + "FrozenBed": "Lit gelé", + "FrozenBookcase": "Bibliothèque gelée", + "FrozenCampfire": "Feu de camp gelé", + "FrozenCandelabra": "Candélabre gelé", + "FrozenCandle": "Bougie gelée", + "FrozenChair": "Chaise gelée", + "FrozenChandelier": "Chandelier gelé", + "FrozenClock": "Horloge gelée", + "FrozenDoor": "Porte gelée", + "FrozenLamp": "Lampe gelée", + "FrozenLantern": "Lanterne gelée", + "FrozenPiano": "Piano gelé", + "FrozenSink": "Évier gelé", + "FrozenSofa": "Canapé gelé", + "FrozenTable": "Table gelée", + "FrozenWorkBench": "Établi gelé", + "FuzzyCarrot": "Carotte duveteuse", + "GelDye": "Teinture de gel", + "GemLockAmber": "Porte-ambres", + "GemLockAmethyst": "Porte-améthystes", + "GemLockDiamond": "Porte-diamants", + "GemLockEmerald": "Porte-émeraudes", + "GemLockRuby": "Porte-rubis", + "GemLockSapphire": "Porte-saphirs", + "GemLockTopaz": "Porte-topazes", + "GenderChangePotion": "Potion pour changer de sexe", + "GeyserTrap": "Geyser", + "GiantShellyBanner": "Bannière de Mollusque géant", + "GladiatorBreastplate": "Plastron de gladiateur", + "GladiatorHelmet": "Casque de gladiateur", + "GladiatorLeggings": "Jambières de gladiateur", + "GlassBathtub": "Baignoire en verre", + "GlassBookcase": "Bibliothèque en verre", + "GlassBowl": "Bol en verre", + "GlassCandelabra": "Candélabre en verre", + "GlassCandle": "Bougie en verre", + "GlassChandelier": "Chandelier en verre", + "GlassChest": "Coffre en verre", + "GlassClock": "Horloge en verre", + "GlassDresser": "Commode en verre", + "GlassLamp": "Lampe en verre", + "GlassLantern": "Lanterne en verre", + "GlassPiano": "Piano en verre", + "GlassSink": "Évier en verre", + "GlassWorkBench": "Établi en verre", + "GoblinSummonerBanner": "Bannière d'Invocateur gobelin", + "GoblinTech": "Technicien gobelin", + "GoldBird": "Oiseau doré", + "GoldBirdCage": "Oiseau doré en cage", + "GoldBunny": "Lapin doré", + "GoldBunnyCage": "Lapin doré en cage", + "GoldButterfly": "Papillon doré", + "GoldButterflyCage": "Papillon doré en pot", + "GoldenBathtub": "Baignoire dorée", + "GoldenBookcase": "Bibliothèque dorée", + "GoldenBugNet": "Filet à insectes doré", + "GoldenCandelabra": "Candélabre doré", + "GoldenCandle": "Bougie dorée", + "GoldenChandelier": "Chandelier doré", + "GoldenClock": "Horloge dorée", + "GoldenLamp": "Lampe dorée", + "GoldenLantern": "Lanterne dorée", + "GoldenSink": "Évier doré", + "GoldfishTrophy": "Trophée du Poisson doré", + "GoldFrog": "Grenouille dorée", + "GoldFrogCage": "Grenouille dorée en cage", + "GoldGrasshopper": "Sauterelle dorée", + "GoldGrasshopperCage": "Sauterelle dorée en cage", + "GoldMouse": "Souris dorée", + "GoldMouseCage": "Souris dorée en cage", + "GoldRing": "Anneau doré", + "GoldWorm": "Ver doré", + "GoldWormCage": "Ver doré en cage", + "GolemBossBag": "Sac de trésors", + "GolemMask": "Masque de Golem", + "Gradient": "Dégradé", + "Granite": "Bloc de granite", + "GraniteBathtub": "Baignoire en granite", + "GraniteBed": "Lit en granite", + "GraniteBlock": "Bloc de granite lisse", + "GraniteBlockWall": "Mur en granite lisse", + "GraniteBookcase": "Bibliothèque en granite", + "GraniteCandelabra": "Candélabre en granite", + "GraniteCandle": "Bougie en granite", + "GraniteChair": "Chaise en granite", + "GraniteChandelier": "Chandelier en granite", + "GraniteChest": "Coffre en granite", + "GraniteClock": "Horloge en granite", + "GraniteDoor": "Porte en granite", + "GraniteDresser": "Commode en granite", + "GraniteFlyerBanner": "Bannière d'Élémentaire de granite", + "GraniteGolemStatue": "Statue de Golem en granite", + "GraniteLamp": "Lampe en granite", + "GraniteLantern": "Lanterne en granite", + "GranitePiano": "Piano en granite", + "GranitePlatform": "Plateforme en granite", + "GraniteSink": "Évier en granite", + "GraniteSofa": "Canapé en granite", + "GraniteTable": "Table en granite", + "GraniteWall": "Mur en granite", + "GraniteWorkBench": "Établi en granite", + "Grasshopper": "Sauterelle", + "GrasshopperCage": "Sauterelle en cage", + "GrasshopperStatue": "Statue de sauterelle", + "GreedyRing": "Anneau d'avarice", + "GreekSkeletonBanner": "Bannière d'hoplite", + "GreenCounterweight": "Contrepoids vert", + "GreenDungeonBathtub": "Baignoire verte de donjon", + "GreenDungeonCandelabra": "Candélabre vert de donjon", + "GreenDungeonChandelier": "Chandelier vert de donjon", + "GreenDungeonChest": "Coffre vert de donjon", + "GreenDungeonLamp": "Lampe verte de donjon", + "GreenDungeonSink": "Évier vert de donjon", + "GreenFlameAndSilverDye": "Teinture flamme vert et argenté", + "GreenJellyfishBanner": "Bannière de méduse verte", + "GreenPhasesaber": "Sabre laser vert", + "GreenString": "Cordon vert", + "GrimDye": "Teinture menaçante", + "Grubby": "Limace", + "GrubSoup": "Soupe de larves", + "HadesDye": "Teinture d'Hadès", + "HallowedFishingCrate": "Caisse sacrée", + "HallowHardenedSand": "Bloc de sable perlé durci", + "HallowHardenedSandWall": "Mur en sable perlé durci", + "HallowSandstone": "Bloc de grès perlé", + "HallowSandstoneWall": "Mur en grès perlé", + "HardenedSand": "Bloc de sable durci", + "HardenedSandWall": "Mur de sable durci", + "HardySaddle": "Selle robuste", + "HarpyStatue": "Statue de harpie", + "HelFire": "Combustion", + "HellstoneBrickWall": "Mur en brique de pierre infernale", + "HellwingBow": "Arc d'ailes de feu", + "HerbBag": "Sac d'herbes", + "HiTekSunglasses": "Lunettes HiTek", + "HiveBackpack": "Ruche pack", + "HoneyBathtub": "Baignoire en miel", + "HoneyBookcase": "Bibliothèque en miel", + "HoneyCandelabra": "Candélabre en miel", + "HoneyCandle": "Bougie en miel", + "HoneyChandelier": "Chandelier en miel", + "HoneyChest": "Coffre en miel", + "HoneyClock": "Horloge en miel", + "HoneyCup": "Gobelet en miel", + "HoneyedGoggles": "Lunettes mielleuses", + "HoneyfallBlock": "Bloc de chute de miel", + "HoneyfallWall": "Mur de chute de miel", + "HoneyLamp": "Lampe en miel", + "HoneyLantern": "Lanterne en miel", + "HoneyPiano": "Piano en miel", + "HoneyPlatform": "Plateforme en miel", + "HoneySink": "Évier en miel", + "HoneyWorkBench": "Établi en miel", + "HopliteStatue": "Statue d'hoplite", + "HuntressBuckler": "Bouclier de chasseuse", + "HuntressJerkin": "Gilet de chasseuse", + "HuntressPants": "Pantalon de chasseuse", + "HuntressWig": "Perruque de chasseuse", + "IceMirror": "Miroir de glace", + "IceTortoiseBanner": "Bannière de Tortue de glace", + "IchorCampfire": "Feu de camp d'ichor", + "IchorDart": "Fléchette d'ichor", + "IlluminantHook": "Grappin illuminant", + "InfernalWispDye": "Teinture de volute infernale", + "InfluxWaver": "Épée à flot", + "ItemFrame": "Cadre d'objets", + "Javelin": "Javelot", + "JimsWings": "Ailes de Jim", + "JourneymanBait": "Appât de compagnon", + "JungleFishingCrate": "Caisse de la jungle", + "JungleYoyo": "Amazone", + "KingSlimeBossBag": "Sac de trésors", + "Kraken": "Kraken", + "LamiaHat": "Masque de lamia", + "LamiaPants": "Queue de lamia", + "LamiaShirt": "Châle de lamia", + "LargeAmber": "Gros ambre", + "LaserDrill": "Foreuse laser", + "LaserMachinegun": "Mitrailleuse laser", + "LaserRuler": "Règle mécanique", + "LastPrism": "Prisme ultime", + "LavafallBlock": "Bloc de chute de lave", + "LavaLamp": "Lampe de lave", + "LifeformAnalyzer": "Détecteur d'organismes vivants", + "LifePreserver": "Bouée de sauvetage", + "LightKey": "Clé de lumière", + "LightMummyBanner": "Bannière de Momie de lumière", + "LihzahrdBathtub": "Baignoire en lihzahrd", + "LihzahrdBed": "Lit en lihzahrd", + "LihzahrdBookcase": "Bibliothèque en lihzahrd", + "LihzahrdCandelabra": "Candélabre en lihzahrd", + "LihzahrdCandle": "Bougie en lihzahrd", + "LihzahrdChandelier": "Chandelier en lihzahrd", + "LihzahrdClock": "Horloge en lihzahrd", + "LihzahrdLamp": "Lampe en lihzahrd", + "LihzahrdLantern": "Lanterne en lihzahrd", + "LihzahrdSink": "Évier en lihzahrd", + "LimeString": "Cordon vert citron", + "LivingCursedFireBlock": "Bloc de feu maudit vivant", + "LivingDemonFireBlock": "Bloc de feu démoniaque vivant", + "LivingFireBlock": "Bloc de feu vivant", + "LivingFlameDye": "Teinture flamme vivante", + "LivingFrostFireBlock": "Bloc de feu givré vivant", + "LivingIchorBlock": "Bloc d'ichor vivant", + "LivingLeafWall": "Mur en feuilles vivant", + "LivingMahoganyLeafWand": "Baguette de feuilles d'acajou riche", + "LivingMahoganyWand": "Baguette d'acajou riche", + "LivingOceanDye": "Teinture océan vivante", + "LivingRainbowDye": "Teinture arc-en-ciel vivante", + "LivingUltrabrightFireBlock": "Bloc de feu intense vivant", + "LivingWoodBathtub": "Baignoire en bois vivant", + "LivingWoodBed": "Lit en bois vivant", + "LivingWoodBookcase": "Bibliothèque en bois vivant", + "LivingWoodCandelabra": "Candélabre en bois vivant", + "LivingWoodCandle": "Bougie en bois vivant", + "LivingWoodChandelier": "Chandelier en bois vivant", + "LivingWoodClock": "Horloge en bois vivant", + "LivingWoodLamp": "Lampe en bois vivant", + "LivingWoodLantern": "Lanterne en bois vivant", + "LivingWoodPiano": "Piano en bois vivant", + "LivingWoodPlatform": "Plateforme en bois vivant", + "LivingWoodSink": "Évier en bois vivant", + "LivingWoodSofa": "Canapé en bois vivant", + "LivingWoodWorkBench": "Établi en bois vivant", + "LockBox": "Boîte à serrure dorée", + "LogicGateLamp_Faulty": "Lampe de porte logique (défectueuse)", + "LogicGateLamp_Off": "Lampe de porte logique (éteinte)", + "LogicGateLamp_On": "Lampe de porte logique (allumée)", + "LogicGate_AND": "Porte logique (ET)", + "LogicGate_NAND": "Porte logique (NON-ET)", + "LogicGate_NOR": "Porte logique (NON-OU)", + "LogicGate_NXOR": "Porte logique (NON-OU EXC.)", + "LogicGate_OR": "Porte logique (OU)", + "LogicGate_XOR": "Porte logique (OU EXC.)", + "LogicSensor_Above": "Capteur logique (joueur au-dessus)", + "LogicSensor_Honey": "Capteur liquide (miel)", + "LogicSensor_Lava": "Capteur liquide (lave)", + "LogicSensor_Liquid": "Capteur liquide (tous)", + "LogicSensor_Moon": "Capteur logique (nuit)", + "LogicSensor_Sun": "Capteur logique (jour)", + "LogicSensor_Water": "Capteur liquide (eau)", + "LokisDye": "Teinture de Loki", + "LokisHelm": "Casque de Loki", + "LokisPants": "Grèves de Loki", + "LokisShirt": "Plastron de Loki", + "LokisWings": "Ailes de Loki", + "LunarBar": "Lingot de luminite", + "LunarBlockNebula": "Bloc de fragment nébuleux", + "LunarBlockSolar": "Bloc de fragment solaire", + "LunarBlockStardust": "Bloc de fragment astral", + "LunarBlockVortex": "Bloc de fragment de vortex", + "LunarBrick": "Brique de luminite", + "LunarBrickWall": "Mur en brique de luminite", + "LunarCraftingStation": "Manipulateur antique", + "LunarFlareBook": "Lueur lunaire", + "LunarHamaxeNebula": "Martache nébuleux", + "LunarHamaxeSolar": "Martache de lueur solaire", + "LunarHamaxeStardust": "Martache astral", + "LunarHamaxeVortex": "Martache de vortex", + "LunarHook": "Grappin lunaire", + "LunarOre": "Luminite", + "LunarTabletFragment": "Fragment de tablette solaire", + "MagicHoneyDropper": "Pipette de miel magique", + "MagicLantern": "Lanterne magique", + "MagicLavaDropper": "Pipette de lave magique", + "MagicSandDropper": "Pipette de sable magique", + "MagicWaterDropper": "Pipette d'eau magique", + "Marble": "Bloc de marbre", + "MarbleBathtub": "Baignoire en marbre", + "MarbleBed": "Lit en marbre", + "MarbleBlock": "Bloc de marbre lisse", + "MarbleBlockWall": "Mur en marbre lisse", + "MarbleBookcase": "Bibliothèque en marbre", + "MarbleCandelabra": "Candélabre en marbre", + "MarbleCandle": "Bougie en marbre", + "MarbleChair": "Chaise en marbre", + "MarbleChandelier": "Chandelier en marbre", + "MarbleChest": "Coffre en marbre", + "MarbleClock": "Horloge en marbre", + "MarbleDoor": "Porte en marbre", + "MarbleDresser": "Commode en marbre", + "MarbleLamp": "Lampe en marbre", + "MarbleLantern": "Lanterne en marbre", + "MarblePiano": "Piano en marbre", + "MarblePlatform": "Plateforme en marbre", + "MarbleSink": "Évier en marbre", + "MarbleSofa": "Canapé en marbre", + "MarbleTable": "Table en marbre", + "MarbleWall": "Mur en marbre", + "MarbleWorkBench": "Établi en marbre", + "MartianArmorDye": "Teinture martienne", + "MartianAstroClock": "Astrohorloge martienne", + "MartianBathtub": "Baignoire martienne", + "MartianBed": "Lit martien", + "MartianChandelier": "Chandelier martien", + "MartianChest": "Coffre martien", + "MartianConduitPlating": "Plaque de conduit martienne", + "MartianConduitWall": "Mur de conduits martiens", + "MartianCostumeMask": "Masque de costume martien", + "MartianCostumePants": "Pantalon de costume martien", + "MartianCostumeShirt": "Chemise de costume martien", + "MartianDoor": "Porte martienne", + "MartianDresser": "Commode martienne", + "MartianHairDye": "Coloration martienne", + "MartianHolobookcase": "Holobibliothèque martienne", + "MartianHoverCandle": "Bougie flottante martienne", + "MartianHoverChair": "Chaise flottante martienne", + "MartianLamppost": "Réverbère martien", + "MartianLantern": "Lanterne martienne", + "MartianPiano": "Piano martien", + "MartianPlatform": "Plateforme martienne", + "MartianSaucerTrophy": "Trophée de Soucoupe martienne", + "MartianSink": "Évier martien", + "MartianSofa": "Canapé martien", + "MartianTable": "Table martienne", + "MartianTableLamp": "Lampe de table martienne", + "MartianUniformHelmet": "Casque d'uniforme martien", + "MartianUniformPants": "Pantalon d'uniforme martien", + "MartianUniformTorso": "Buste d'uniforme martien", + "MartianWalkerBanner": "Bannière de Marcheur martien", + "MartianWorkBench": "Établi martien", + "MasterBait": "Appât de maître", + "MechanicalBatteryPiece": "Pièce de batterie mécanique", + "MechanicalLens": "Lentille mécanique", + "MechanicalWagonPiece": "Pièce de wagonnet mécanique", + "MechanicalWheelPiece": "Pièce de roue mécanique", + "MedusaBanner": "Bannière de Médusa", + "MedusaHead": "Tête de Médusa", + "MedusaStatue": "Statue de Médusa", + "Meowmere": "Épée arc-en-ciel", + "MetalDetector": "Détecteur de métaux", + "MetalSink": "Évier en métal", + "MeteoriteBathtub": "Baignoire en météorite", + "MeteoriteBed": "Lit en météorite", + "MeteoriteBookcase": "Bibliothèque en météorite", + "MeteoriteBrick": "Brique de météorite", + "MeteoriteBrickWall": "Mur en brique de météorite", + "MeteoriteCandelabra": "Candélabre en météorite", + "MeteoriteCandle": "Bougie en météorite", + "MeteoriteChair": "Chaise en météorite", + "MeteoriteChandelier": "Chandelier en météorite", + "MeteoriteChest": "Coffre en météorite", + "MeteoriteClock": "Horloge en météorite", + "MeteoriteDoor": "Porte en météorite", + "MeteoriteDresser": "Commode en météorite", + "MeteoriteLamp": "Lampe en météorite", + "MeteoriteLantern": "Lanterne en météorite", + "MeteoritePiano": "Piano en météorite", + "MeteoritePlatform": "Plateforme en météorite", + "MeteoriteSink": "Évier en météorite", + "MeteoriteSofa": "Canapé en météorite", + "MeteoriteTable": "Table en météorite", + "MeteoriteWorkBench": "Établi en météorite", + "MeteorStaff": "Sceptre de météore", + "MidnightRainbowDye": "Teinture arc-en-ciel de minuit", + "MinecartMech": "Wagonnet mécanique", + "MinecartTrack": "Rail de wagonnet", + "MirageDye": "Teinture mirage", + "MolotovCocktail": "Cocktail Molotov", + "MoneyTrough": "Auge d'argent", + "MonkBelt": "Ceinture de moine", + "MonkBrows": "Perruque de tonsure de moine", + "MonkPants": "Pantalon de moine", + "MonkShirt": "Chemise de moine", + "MoonglowPlanterBox": "Pot d'éclalunaire", + "MoonlordArrow": "Flèche en luminite", + "MoonLordBossBag": "Sac de trésors", + "MoonlordBullet": "Balle en luminite", + "MoonLordPainting": "Ni chef-d'œuvre ni pieuvre", + "MoonLordTrophy": "Trophée du Seigneur de la lune", + "MoonlordTurretStaff": "Sceptre de portail lunaire", + "MoonMask": "Masque de lune", + "MothronBanner": "Bannière de Mothron", + "MothronWings": "Ailes de Mothron", + "MouseStatue": "Statue de souris", + "MulticolorWrench": "Clé anglaise multicolore", + "MushroomBathtub": "Baignoire en champignon", + "MushroomBed": "Lit en champignon", + "MushroomBench": "Banc en champignon", + "MushroomBookcase": "Bibliothèque en champignon", + "MushroomCandelabra": "Candélabre en champignon", + "MushroomCandle": "Bougie en champignon", + "MushroomChandelier": "Chandelier en champignon", + "MushroomChest": "Coffre en champignon", + "MushroomClock": "Horloge en champignon", + "MushroomDresser": "Commode en champignon", + "MushroomDye": "Teinture de champignon luisant", + "MushroomLamp": "Lampe en champignon", + "MushroomLantern": "Lanterne en champignon", + "MushroomPiano": "Piano en champignon", + "MushroomPlatform": "Plateforme en champignon", + "MushroomSink": "Évier en champignon", + "MushroomTable": "Table en champignon", + "MusicBoxGoblins": "Boîte à musique (invasion gobeline)", + "MusicBoxHell": "Boîte à musique (enfer)", + "MusicBoxLunarBoss": "Boîte à musique (boss lunaire)", + "MusicBoxMartians": "Boîte à musique (folie martienne)", + "MusicBoxPirates": "Boîte à musique (invasion pirate)", + "MusicBoxSandstorm": "Boîte à musique (tempête de sable)", + "MusicBoxTowers": "Boîte à musique (les Tours)", + "MusicBoxUndergroundCrimson": "Boîte à musique (souterrain carmin)", + "Nail": "Clou", + "NailGun": "Pistolet à clous", + "NailheadBanner": "Bannière de Tête à clous", + "NebulaArcanum": "Arcanum nébuleux", + "NebulaAxe": "Hache nébuleuse", + "NebulaBeastBanner": "Bannière de Bête d'évolution", + "NebulaBlaze": "Flambée nébuleuse", + "NebulaBrainBanner": "Bannière de Flotteur nébuleux", + "NebulaBreastplate": "Plastron nébuleux", + "NebulaChainsaw": "Tronçonneuse nébuleuse", + "NebulaDrill": "Foreuse nébuleuse", + "NebulaDye": "Teinture nébuleuse", + "NebulaHammer": "Marteau nébuleux", + "NebulaHeadcrabBanner": "Bannière du Suceur de cerveau", + "NebulaHelmet": "Casque nébuleux", + "NebulaLeggings": "Jambières nébuleuses", + "NebulaMonolith": "Monolithe nébuleux", + "NebulaPickaxe": "Pioche nébuleuse", + "NebulaPickup1": "Bonus de dégâts", + "NebulaPickup2": "Bonus de santé", + "NebulaPickup3": "Bonus de mana", + "NebulaSoldierBanner": "Bannière de Prédicteur", + "NegativeDye": "Teinture négative", + "NightKey": "Clé de nuit", + "NightVisionHelmet": "Casque de vision nocturne", + "ObsidianBathtub": "Baignoire en obsidienne", + "ObsidianCandelabra": "Candélabre en obsidienne", + "ObsidianCandle": "Bougie en obsidienne", + "ObsidianChandelier": "Chandelier en obsidienne", + "ObsidianChest": "Coffre en obsidienne", + "ObsidianClock": "Horloge en obsidienne", + "ObsidianHelm": "Chapeau de hors-la-loi en obsidienne", + "ObsidianLamp": "Lampe en obsidienne", + "ObsidianLantern": "Lanterne en obsidienne", + "ObsidianPants": "Pantalon en obsidienne", + "ObsidianShirt": "Manteau en obsidienne", + "ObsidianSink": "Évier en obsidienne", + "OnyxBlaster": "Fusil onyx", + "OrangeString": "Cordon orange", + "PainterPaintballGun": "Fusil de paintball", + "PaintingAcorns": "Glands", + "PaintingCastleMarsberg": "Château de Marsberg", + "PaintingColdSnap": "Vague de froid", + "PaintingCursedSaint": "Saint maudit", + "PaintingMartiaLisa": "Martia Lisa", + "PaintingSnowfellas": "Gang de neige", + "PaintingTheSeason": "La Saison", + "PaintingTheTruthIsUpThere": "La vérité est au-dessus", + "PalmWood": "Palmier", + "PalmWoodBathtub": "Baignoire en palmier", + "PalmWoodBed": "Lit en palmier", + "PalmWoodBench": "Établi en palmier", + "PalmWoodBookcase": "Bibliothèque en palmier", + "PalmWoodBow": "Arc en palmier", + "PalmWoodBreastplate": "Plastron en palmier", + "PalmWoodCandelabra": "Candélabre en palmier", + "PalmWoodCandle": "Bougie en palmier", + "PalmWoodChair": "Chaise en palmier", + "PalmWoodChandelier": "Chandelier en palmier", + "PalmWoodChest": "Coffre en palmier", + "PalmWoodClock": "Horloge en palmier", + "PalmWoodDoor": "Porte en palmier", + "PalmWoodDresser": "Commode en palmier", + "PalmWoodFence": "Barrière en palmier", + "PalmWoodGreaves": "Grèves en palmier", + "PalmWoodHammer": "Marteau en palmier", + "PalmWoodHelmet": "Casque en palmier", + "PalmWoodLamp": "Lampe en palmier", + "PalmWoodLantern": "Lanterne en palmier", + "PalmWoodPiano": "Piano en palmier", + "PalmWoodPlatform": "Plateforme en palmier", + "PalmWoodSink": "Piano en palmier", + "PalmWoodSofa": "Canapé en palmier", + "PalmWoodSword": "Épée en palmier", + "PalmWoodTable": "Table en palmier", + "PalmWoodWall": "Mur en palmier", + "PalmWoodWorkBench": "Établi en palmier", + "PartyBalloonAnimal": "Animal en ballon", + "PartyBundleOfBalloonsAccessory": "Lot de ballons festifs", + "PartyBundleOfBalloonTile": "Lot de ballons loufoques", + "PartyGirlGrenade": "Grenade de joie", + "PartyHat": "Chapeau festif", + "PartyMonolith": "Centre festif", + "PartyPresent": "Cadeau festif", + "PDA": "PDA", + "PeaceCandle": "Bougie de paix", + "PearlwoodBathtub": "Baignoire en bois perlé", + "PearlwoodBookcase": "Bibliothèque en bois perlé", + "PearlwoodCandelabra": "Candélabre en bois perlé", + "PearlwoodCandle": "Bougie en bois perlé", + "PearlwoodChandelier": "Chandelier en bois perlé", + "PearlwoodClock": "Horloge en bois perlé", + "PearlwoodLamp": "Lampe en bois perlé", + "PearlwoodLantern": "Lanterne en bois perlé", + "PearlwoodSink": "Évier en bois perlé", + "PedguinHat": "Capuche de manchot", + "PedguinPants": "Pantalon de manchot", + "PedguinShirt": "Veste de manchot", + "PenguinStatue": "Statue de manchot", + "Phantasm": "Spectre", + "PhaseDye": "Teinture de phase", + "PhasicWarpEjector": "Éjecteur de distorsion phasique", + "Pigronata": "Piñachon", + "PigronStatue": "Statue de Drachon", + "PinkDungeonBathtub": "Baignoire rose de donjon", + "PinkDungeonCandelabra": "Candélabre rose de donjon", + "PinkDungeonChandelier": "Chandelier rose de donjon", + "PinkDungeonChest": "Coffre rose de donjon", + "PinkDungeonLamp": "Lampe rose de donjon", + "PinkDungeonSink": "Évier rose de donjon", + "PinkGel": "Gel rose", + "PinkGelDye": "Teinture de gel rose", + "PinkJellyfishBanner": "Bannière de Méduse rose", + "PinkSlimeBlock": "Bloc de gelée rose", + "PinkString": "Cordon rose", + "PinkTorch": "Torche rose", + "PirateCaptainBanner": "Bannière de Capitaine pirate", + "PirateCorsairBanner": "Bannière de Corsaire pirate", + "PirateCrossbowerBanner": "Bannière d'Arbalétrier pirate", + "PirateDeadeyeBanner": "Bannière de Borgne pirate", + "PirateStaff": "Sceptre de pirate", + "PixelBox": "Boîte de pixels", + "PixieDye": "Poussière de fée", + "PlanteraBossBag": "Sac de trésors", + "PlanteraMask": "Masque de Plantera", + "PocketMirror": "Miroir de poche", + "PoisonousSporeBanner": "Bannière de Spores empoisonnées", + "PortalGun": "Fusil à portails", + "PortalGunStation": "Station de fusil à portails", + "PressureTrack": "Rail à plaque de pression", + "ProjectilePressurePad": "Piston bleu sarcelle", + "PsychoBanner": "Bannière de Taré", + "PsychoKnife": "Couteau de Taré", + "PumpkinBathtub": "Baignoire en citrouille", + "PumpkinBed": "Lit en citrouille", + "PumpkinBookcase": "Bibliothèque en citrouille", + "PumpkinCandelabra": "Candélabre en citrouille", + "PumpkinCandle": "Bougie en citrouille", + "PumpkinChandelier": "Chandelier en citrouille", + "PumpkinChest": "Coffre en citrouille", + "PumpkinClock": "Horloge en citrouille", + "PumpkinDresser": "Commode en citrouille", + "PumpkinLamp": "Lampe en citrouille", + "PumpkinLantern": "Lanterne en citrouille", + "PumpkinPiano": "Piano en citrouille", + "PumpkinSink": "Évier en citrouille", + "PurpleCounterweight": "Contrepoids en citrouille", + "PurpleOozeDye": "Teinture de limon violet", + "PurplePhasesaber": "Sabre laser violet", + "PurpleString": "Cordon violet", + "PutridScent": "Odeur putride", + "QueenBeeBossBag": "Sac de trésors", + "Radar": "Radar", + "RainbowCampfire": "Feu de camp arc-en-ciel", + "RainbowCrystalStaff": "Sceptre de cristal arc-en-ciel", + "RainbowString": "Cordon arc-en-ciel", + "RainbowTorch": "Torche arc-en-ciel", + "Rally": "Rallye", + "RazorbladeTyphoon": "Typhon rasoir", + "RedAcidDye": "Teinture acide rouge", + "RedCounterweight": "Contrepoids rouge", + "RedDevilBanner": "Bannière de Diable rouge", + "RedPhasesaber": "Sabre laser rouge", + "RedString": "Cordon rouge", + "RedsYoyo": "Lancer de Red", + "ReflectiveCopperDye": "Teinture de cuivre poli", + "ReflectiveDye": "Teinture de poli", + "ReflectiveGoldDye": "Teinture d'or poli", + "ReflectiveMetalDye": "Teinture de métal poli", + "ReflectiveObsidianDye": "Teinture d'obsidienne polie", + "ReflectiveSilverDye": "Teinture d'argent poli", + "REK": "R.E.K. 3000", + "RichGravestone1": "Croix de tombe en or", + "RichGravestone2": "Pierre tombale en or", + "RichGravestone3": "Symbole de tombe en or", + "RichGravestone4": "Pierre de tombe en or", + "RichGravestone5": "Stèle en or", + "RichMahoganyBathtub": "Baignoire en acajou riche", + "RichMahoganyBookcase": "Bibliothèque en acajou riche", + "RichMahoganyCandelabra": "Candélabre en acajou riche", + "RichMahoganyCandle": "Bougie en acajou riche", + "RichMahoganyChandelier": "Chandelier en acajou riche", + "RichMahoganyClock": "Horloge en acajou riche", + "RichMahoganyLamp": "Lampe en acajou riche", + "RichMahoganyLantern": "Lanterne en acajou riche", + "RichMahoganySink": "Évier en acajou riche", + "RoyalGel": "Gel royal", + "RubyGemsparkWall": "Mur de blocs brillance de rubis", + "RubyGemsparkWallOff": "Mur de blocs sans brillance de rubis", + "SailfishBoots": "Bottes voilier", + "SalamanderBanner": "Bannière de Salamandre", + "SandElementalBanner": "Bannière d'Élémentaire de sable", + "SandFallWall": "Mur de chute de sable", + "SandsharkBanner": "Bannière de Requin des sables", + "SandsharkCorruptBanner": "Bannière de Croqueur osseux", + "SandsharkCrimsonBanner": "Bannière de Ravageur de chair", + "SandsharkHallowedBanner": "Bannière de Batteur de cristal", + "SandSlimeBanner": "Bannière de Gelée des sables", + "Sandstone": "Bloc de grès", + "SandstoneWall": "Mur en grès", + "SapphireGemsparkWall": "Mur brillance de saphir", + "SapphireGemsparkWallOff": "Mur sans brillance de saphir", + "ScalyTruffle": "Truffe à écailles", + "ScorpionStatue": "Statue de scorpion", + "Seashell": "Coquillage", + "SeaSnailBanner": "Bannière de Bulot", + "Seedler": "Semeuse", + "SeveredHandBanner": "Bannière de Main coupée", + "Sextant": "Sextant", + "ShadewoodBathtub": "Baignoire en bois d'ombre", + "ShadewoodBookcase": "Bibliothèque en bois d'ombre", + "ShadewoodCandelabra": "Candélabre en bois d'ombre", + "ShadewoodCandle": "Bougie en bois d'ombre", + "ShadewoodChandelier": "Chandelier en bois d'ombre", + "ShadewoodClock": "Horloge en bois d'ombre", + "ShadewoodLamp": "Lampe en bois d'ombre", + "ShadewoodLantern": "Lanterne en bois d'ombre", + "ShadewoodSink": "Évier en bois d'ombre", + "ShadowDye": "Teinture de l'ombre", + "ShadowFlameBow": "Arc en flamme d'ombre", + "ShadowflameHadesDye": "Teinture d'Hadès en flamme d'ombre", + "ShadowFlameHexDoll": "Poupée maudite en flamme d'ombre", + "ShadowFlameKnife": "Couteau en flamme d'ombre", + "SharkronBalloon": "Ballon de draquin", + "SharkStatue": "Statue de requin", + "SharkteethTrophy": "Trophée de Dent de requin", + "SharkToothNecklace": "Collier de dent de requin", + "SharpeningStation": "Station d'affûtage", + "ShiftingPearlSandsDye": "Teinture de sables perlés mouvants", + "ShiftingSandsDye": "Teinture de sables mouvants", + "ShinyStone": "Pierre brillante", + "ShipsWheel": "Gouvernail", + "ShiverthornPlanterBox": "Pot de tremblépine", + "ShrimpyTruffle": "Truffe crevette", + "ShroomitePlating": "Plaquage de champignite", + "ShroomitePlatingWall": "Mur en plaquage de champignite", + "SilkRope": "Robe en soie", + "SilkRopeCoil": "Rouleau de corde en soie", + "SillyBalloonGreen": "Ballon loufoque vert", + "SillyBalloonGreenWall": "Mur de ballons loufoques verts", + "SillyBalloonMachine": "Machine à ballons loufoques", + "SillyBalloonPink": "Ballon loufoque rose", + "SillyBalloonPinkWall": "Mur de ballons loufoques roses", + "SillyBalloonPurple": "Ballon loufoque violet", + "SillyBalloonPurpleWall": "Mur de ballons loufoques violets", + "SillyBalloonTiedGreen": "Ensemble de ballons loufoques (vert)", + "SillyBalloonTiedPink": "Ensemble de ballons loufoques (rose)", + "SillyBalloonTiedPurple": "Ensemble de ballons loufoques (violet)", + "SillyStreamerBlue": "Serpentin bleu", + "SillyStreamerGreen": "Serpentin vert", + "SillyStreamerPink": "Serpentin rose", + "SilverAndBlackDye": "Teinture argenté et noir", + "SkeletronBossBag": "Sac de trésors", + "SkeletronPrimeBossBag": "Sac de trésors", + "SkeletronPrimeMask": "Trophée du Grand Squeletron", + "SkyBlueString": "Cordon bleu ciel", + "SkyFracture": "Fracture céleste", + "SkywareBathtub": "Baignoire céleste", + "SkywareBed": "Lit céleste", + "SkywareBookcase": "Bibliothèque céleste", + "SkywareCandelabra": "Candélabre céleste", + "SkywareCandle": "Bougie céleste", + "SkywareChandelier": "Chandelier céleste", + "SkywareClock": "Horloge céleste", + "SkywareLamp": "Lampe céleste", + "SkywareLantern": "Lanterne céleste", + "SkywarePlatform": "Plateforme céleste", + "SkywareSink": "Évier céleste", + "SkywareWorkbench": "Établi céleste", + "SlapHand": "Main à claques", + "SliceOfCake": "Part de gâteau", + "SlimeBathtub": "Baignoire en gelée", + "SlimeBed": "Lit en gelée", + "SlimeBookcase": "Bibliothèque en gelée", + "SlimeCandelabra": "Candélabre en gelée", + "SlimeCandle": "Bougie en gelée", + "SlimeChair": "Chaise en gelée", + "SlimeChandelier": "Chandelier en gelée", + "SlimeChest": "Coffre en gelée", + "SlimeClock": "Horloge en gelée", + "SlimeDoor": "Porte en gelée", + "SlimeDresser": "Commode en gelée", + "SlimeGun": "Pistolet à gelée", + "SlimeHook": "Grappin de gelée", + "SlimeLamp": "Lampe en gelée", + "SlimeLantern": "Lanterne en gelée", + "SlimePiano": "Piano en gelée", + "SlimePlatform": "Plateforme en gelée", + "SlimeSink": "Évier en gelée", + "SlimeSofa": "Canapé en gelée", + "SlimeTable": "Table en gelée", + "SlimySaddle": "Selle en gelée", + "Sluggy": "Coriace", + "SmokeBlock": "Bloc de fumée", + "SnailStatue": "Statue d'escargot", + "SnowCloudBlock": "Nuage de neige", + "SnowFallWall": "Mur de chute de neige", + "SolarCoriteBanner": "Bannière de Corite", + "SolarCrawltipedeBanner": "Bannière de Rampipède", + "SolarDrakomireBanner": "Bannière de Drakomire", + "SolarDrakomireRiderBanner": "Bannière du Cavalier de Drakomire", + "SolarDye": "Teinture solaire", + "SolarEruption": "Éruption solaire", + "SolarFlareAxe": "Hache de lueur solaire", + "SolarFlareBreastplate": "Plastron de lueur solaire", + "SolarFlareChainsaw": "Tronçonneuse de lueur solaire", + "SolarFlareDrill": "Foreuse de lueur solaire", + "SolarFlareHammer": "Marteau de lueur solaire", + "SolarFlareHelmet": "Casque de lueur solaire", + "SolarFlareLeggings": "Jambières de lueur solaire", + "SolarFlarePickaxe": "Pioche de lueur solaire", + "SolarMonolith": "Monolithe solaire", + "SolarSolenianBanner": "Bannière de Sélénien", + "SolarSrollerBanner": "Bannière de Debroulé", + "SolarTablet": "Tablette solaire", + "SoulDrain": "Absorbeur de santé", + "SparkyPainting": "Médor", + "SpectreBar": "Lingot spectral", + "SpelunkerGlowstick": "Bâton lumineux de spéléo", + "SpiderFang": "Croc d'araignée", + "SpiderStaff": "Sceptre d'araignée", + "SpiritFlame": "Flamme d'esprit", + "SpookyBathtub": "Baignoire sinistre", + "SpookyBed": "Lit sinistre", + "SpookyBookcase": "Bibliothèque sinistre", + "SpookyCandelabra": "Candélabre sinistre", + "SpookyCandle": "Bougie sinistre", + "SpookyChandelier": "Chandelier sinistre", + "SpookyChest": "Coffre sinistre", + "SpookyClock": "Horloge sinistre", + "SpookyLamp": "Lampe sinistre", + "SpookyLantern": "Lanterne sinistre", + "SpookySink": "Évier sinistre", + "SporeSac": "Sac de spores", + "SquireGreatHelm": "Grand heaume d'écuyer", + "SquireGreaves": "Grèves d'écuyer", + "SquirePlating": "Plaquage d'écuyer", + "SquireShield": "Bouclier d'écuyer", + "SquirrelGold": "Écureuil doré", + "SquirrelGoldCage": "Écureuil doré en cage", + "SquirrelOrangeCage": "Écureuil roux en cage", + "SquirrelRed": "Écureuil roux", + "SquirrelStatue": "Statue d'écureuil", + "StardustAxe": "Hache astrale", + "StardustBreastplate": "Buste d'armure astrale", + "StardustCellStaff": "Sceptre de cellules astrales", + "StardustChainsaw": "Tronçonneuse astrale", + "StardustDragonStaff": "Sceptre de dragon astral", + "StardustDrill": "Foreuse astrale", + "StardustDye": "Teinture astrale", + "StardustHammer": "Marteau astral", + "StardustHelmet": "Casque astral", + "StardustJellyfishBanner": "Bannière d'Envahisseur", + "StardustLargeCellBanner": "Bannière de Cellule étoilée", + "StardustLeggings": "Jambières astrales", + "StardustMonolith": "Monolithe astral", + "StardustPickaxe": "Pioche astrale", + "StardustSmallCellBanner": "Bannière de Petite cellule étoilée", + "StardustSoldierBanner": "Bannière d'Astronome", + "StardustSpiderBanner": "Bannière de Machine à scintillements", + "StardustWormBanner": "Bannière de Tisseur de voie lactée", + "Starfish": "Étoile de mer", + "StarWrath": "Colère étoilée", + "StaticHook": "Grappin statique", + "SteampunkBathtub": "Baignoire steampunk", + "SteampunkBookcase": "Bibliothèque steampunk", + "SteampunkCandelabra": "Candélabre steampunk", + "SteampunkCandle": "Bougie steampunk", + "SteampunkChandelier": "Chandelier steampunk", + "SteampunkChest": "Coffre steampunk", + "SteampunkClock": "Horloge steampunk", + "SteampunkCup": "Calice", + "SteampunkDresser": "Commode steampunk", + "SteampunkLamp": "Lampe steampunk", + "SteampunkLantern": "Lanterne steampunk", + "SteampunkPiano": "Piano steampunk", + "SteampunkPlatform": "Plateforme steampunk", + "SteampunkSink": "Évier steampunk", + "SteampunkWorkBench": "Établi steampuk", + "StickyDynamite": "Dynamite collante", + "StickyGrenade": "Grenade collante", + "Stopwatch": "Chronomètre", + "StrangeBrew": "Infusion bizarre", + "StrangePlant1": "Plante étrange", + "StrangePlant2": "Plante étrange", + "StrangePlant3": "Plante étrange", + "StrangePlant4": "Plante étrange", + "StylistKilLaKillScissorsIWish": "Ciseaux stylés", + "SummonerEmblem": "Emblème d'invocateur", + "Sundial": "Cadran solaire envoûté", + "SunMask": "Masque du soleil", + "SuperAbsorbantSponge": "Éponge très absorbante", + "SuperHealingPotion": "Super potion de soin", + "SuspiciousLookingTentacle": "Tentacule bizarre", + "SwordfishTrophy": "Trophée d'Espadon", + "TallGate": "Grande porte", + "TallyCounter": "Compteur", + "TargetDummy": "Cible factice", + "TartarSauce": "Sauce tartare", + "TaxCollectorHat": "Chapeau de percepteur d'impôts", + "TaxCollectorPants": "Pantalon de percepteur d'impôts", + "TaxCollectorsStickOfDoom": "Canne chic", + "TaxCollectorSuit": "Veste de percepteur d'impôts", + "TealString": "Cordon bleu sarcelle", + "TeamBlockBlue": "Bloc de l'équipe bleue", + "TeamBlockBluePlatform": "Plateforme de l'équipe bleue", + "TeamBlockGreen": "Bloc de l'équipe verte", + "TeamBlockGreenPlatform": "Plateforme de l'équipe verte", + "TeamBlockPink": "Bloc de l'équipe rose", + "TeamBlockPinkPlatform": "Plateforme de l'équipe rose", + "TeamBlockRed": "Bloc de l'équipe rouge", + "TeamBlockRedPlatform": "Plateforme de l'équipe rouge", + "TeamBlockWhite": "Bloc de l'équipe blanche", + "TeamBlockWhitePlatform": "Plateforme de l'équipe blanche", + "TeamBlockYellow": "Bloc de l'équipe jaune", + "TeamBlockYellowPlatform": "Plateforme de l'équipe jaune", + "TempestStaff": "Sceptre de tempête", + "TendonHook": "Grappin de tendon", + "Terrarian": "Terarrien", + "TheBrideDress": "Robe de mariée", + "TheBrideHat": "Voile de mariée", + "TheEyeOfCthulhu": "L'Œil de Cthulhu", + "ThePossessedBanner": "La bannière du Possédé", + "ThornHook": "Grappin épineux", + "TinPlating": "Plaquage d'étain", + "TinPlatingWall": "Mur en plaquage d'étain", + "TombCrawlerBanner": "Bannière de Rampant de tombes", + "TopazGemsparkWall": "Bloc brillance de topaze", + "TopazGemsparkWallOff": "Bloc sans brillance de topaze", + "ToxicFlask": "Flasque toxique", + "Toxikarp": "Toxikarp", + "Trapdoor": "Porte à piège", + "TruffleWorm": "Ver truffe", + "Tsunami": "Tsunami", + "TsunamiInABottle": "Tsunami en bouteille", + "TumbleweedBanner": "Bannière de Virevoltant furieux", + "TwilightDye": "Teinture crépuscule", + "TwilightHairDye": "Coloration crépuscule", + "TwinMask": "Masque de jumeau", + "TwinsBossBag": "Sac de trésors", + "UndeadVikingStatue": "Statue de Viking mort-vivant", + "UnicornStatue": "Statue de licorne", + "UnicornWispDye": "Teinture de volute de licorne", + "ValkyrieYoyo": "Yoyo Valkyrie", + "Valor": "Valeur", + "ViciousMushroom": "Champignon cruel", + "ViciousPowder": "Poudre cruelle", + "VineRope": "Corde de liane", + "VineRopeCoil": "Rouleau de liane", + "VioletString": "Cordon mauve", + "VoidDye": "Teinture du néant", + "VortexAxe": "Hache du vortex", + "VortexBeater": "Batteur du vortex", + "VortexBreastplate": "Plastron du vortex", + "VortexChainsaw": "Tronçonneuse du vortex", + "VortexDrill": "Foreuse du vortex", + "VortexDye": "Teinture du vortex", + "VortexHammer": "Marteau du vortex", + "VortexHelmet": "Casque du vortex", + "VortexHornetBanner": "Bannière de Frelon extraterrestre", + "VortexHornetQueenBanner": "Bannière de Reine extraterrestre", + "VortexLarvaBanner": "Bannière de Larve extraterrestre", + "VortexLeggings": "Jambières du vortex", + "VortexMonolith": "Monolithe du vortex", + "VortexPickaxe": "Pioche du vortex", + "VortexRiflemanBanner": "Bannière de Plongeur d'orage", + "VortexSoldierBanner": "Bannière de Vortexien", + "WalkingAntlionBanner": "Bannière de Chargeur fourmilion", + "WallAnchor": "Ancre murale", + "WallCreeperStatue": "Bannière de Grimpeur de murs", + "WallOfFleshBossBag": "Sac de trésors", + "WandofSparking": "Baguette d'étincelles", + "WarTable": "Table de guerre", + "WarTableBanner": "Bannière de Table de guerre", + "WaterfallBlock": "Bloc de chute d'eau", + "WaterleafPlanterBox": "Pot de feuilleau", + "WeaponRack": "Porte-armes", + "WeatherRadio": "Radio du temps", + "WebRope": "Corde de toile", + "WebRopeCoil": "Rouleau de toile", + "WeightedPressurePlateCyan": "Plaque de pression lestée cyan", + "WeightedPressurePlateOrange": "Plaque de pression lestée orange", + "WeightedPressurePlatePink": "Plaque de pression lestée rose", + "WeightedPressurePlatePurple": "Plaque de pression lestée violette", + "WhiteLunaticHood": "Capuche d'adepte solaire", + "WhiteLunaticRobe": "Robe d'adepte solaire", + "WhitePhasesaber": "Sabre laser blanc", + "WhiteString": "Cordon blanc", + "WineGlass": "Verre à vin", + "WingsNebula": "Mante nébuleuse", + "WingsSolar": "Ailes solaires", + "WingsStardust": "Ailes astrales", + "WingsVortex": "Booster de vortex", + "WireBulb": "Ampoule à câble", + "WireKite": "Le Grand dessein", + "WirePipe": "Boîte de jonction", + "WispDye": "Teinture de volute", + "WoodenSink": "Évier en bois", + "WoodYoyo": "Yoyo en bois", + "WormholePotion": "Potion de trou de ver", + "WormHook": "Ver en bois", + "WormScarf": "Écharpe de ver", + "WormStatue": "Statue de ver", + "WraithStatue": "Statue de spectre", + "Xenopopper": "Fusil à xéno", + "XenoStaff": "Sceptre xéno", + "Yelets": "Yelets", + "YellowCounterweight": "Contrepoids jaune", + "YellowPhasesaber": "Sabre laser jaune", + "YellowString": "Cordon jaune", + "YellowWrench": "Clé anglaise jaune", + "Yoraiz0rDarkness": "Rictus de Yoraiz0r", + "Yoraiz0rHead": "Lunettes recolorées de Yoraiz0r", + "Yoraiz0rPants": "Jupe de Yoraiz0r", + "Yoraiz0rShirt": "Uniforme de Yoraiz0r", + "Yoraiz0rWings": "Sort de Yoraiz0r", + "YoyoBag": "Sac à yoyos", + "YoYoGlove": "Gant à yoyo", + "ZombieArmStatue": "Statue de zombie armé", + "AleThrowingGlove": "Lance-bière", + "ApprenticeAltHead": "Chapeau de l'artiste noir", + "ApprenticeAltPants": "Jambières de l'artiste noir", + "ApprenticeAltShirt": "Robe de l'artiste noir", + "ApprenticeStaffT3": "Colère de Betsy", + "BetsyWings": "Ailes de Betsy", + "BookStaff": "Tome de Sagesse infinie", + "BossMaskBetsy": "Masque de Betsy", + "BossMaskDarkMage": "Masque du mage noir", + "BossMaskOgre": "Masque d'ogre", + "BossTrophyBetsy": "Trophée de Betsy", + "BossTrophyDarkmage": "Trophée du mage noir", + "BossTrophyOgre": "Trophée de l'ogre", + "CrystalBathtub": "Baignoire de cristal", + "CrystalBed": "Lit de cristal", + "CrystalBookCase": "Bibliothèque de cristal", + "CrystalCandelabra": "Candélabre de cristal", + "CrystalCandle": "Bougie de cristal", + "CrystalChair": "Chaise de cristal", + "CrystalChandelier": "Chandelier de cristal", + "CrystalChest": "Coffre de cristal", + "CrystalClock": "Horloge de cristal", + "CrystalDoor": "Porte de cristal", + "CrystalDresser": "Commode de cristal", + "CrystalLamp": "Lampe de cristal", + "CrystalLantern": "Lanterne de cristal", + "CrystalPiano": "Piano de cristal", + "CrystalPlatform": "Plateforme de cristal", + "CrystalSink": "Évier de cristal", + "CrystalSofaHowDoesThatEvenWork": "Sofa de cristal", + "CrystalTable": "Table de cristal", + "CrystalWorkbench": "Établi de cristal", + "DD2BallistraTowerT1Popper": "Bâton de Baliste", + "DD2BallistraTowerT2Popper": "Canne de Baliste", + "DD2BallistraTowerT3Popper": "Sceptre de Baliste", + "DD2BetsyBow": "Fléau aérien", + "DD2DrakinBanner": "Bannière de Drakin", + "DD2ElderCrystal": "Cristal Eternia", + "DD2ElderCrystalStand": "Support de cristal Eternia", + "DD2EnergyCrystal": "Mana d'Etheria", + "DD2ExplosiveTrapT1Popper": "Bâton de piège explosif", + "DD2ExplosiveTrapT2Popper": "Canne de piège explosif", + "DD2ExplosiveTrapT3Popper": "Sceptre de piège explosif", + "DD2FlameburstTowerT1Popper": "Bâton d'embrasement", + "DD2FlameburstTowerT2Popper": "Canne d'embrasement", + "DD2FlameburstTowerT3Popper": "Sceptre d'embrasement", + "DD2GoblinBanner": "Bannière de gobelin d'Etheria", + "DD2GoblinBomberBanner": "Bannière de gobelin à bombes d'Etheria", + "DD2JavelinThrowerBanner": "Bannière de lanceur de javelot d'Etheria", + "DD2KoboldBanner": "Bannière de Kobold", + "DD2KoboldFlyerBanner": "Bannière de Kobold planeur", + "DD2LightningAuraT1Popper": "Bâton de l'aura foudroyante", + "DD2LightningAuraT2Popper": "Canne de l'aura foudroyante", + "DD2LightningAuraT3Popper": "Sceptre de l'aura foudroyante", + "DD2LightningBugBanner": "Bannière de ver luisant d'Etheria", + "DD2PetDragon": "Œuf de dragon", + "DD2PetGato": "Œuf de gato", + "DD2PetGhost": "Œuf de Creeper", + "DD2PhoenixBow": "Fantôme Phénix", + "DD2SkeletonBanner": "Bannière de squelette du vieux", + "DD2SquireBetsySword": "Dragon volant", + "DD2SquireDemonSword": "Marque du Brasier", + "DD2WitherBeastBanner": "Bannière de bête abimée", + "DD2WyvernBanner": "Bannière de vouivre d'Etheria", + "DungeonClockBlue": "Horloge bleue de donjon", + "DungeonClockGreen": "Horloge verte de donjon", + "DungeonClockPink": "Horloge rose de donjon", + "DynastyDresser": "Commode de dynastie", + "DynastyPiano": "Piano de dynastie", + "DynastySofa": "Sofa de dynastie", + "Fake_CrystalChest": "Coffre de cristal piégé", + "Fake_GoldenChest": "Coffre doré piégé", + "FleshPlatform": "Plateforme de chair", + "FrozenDresser": "Commode gelée", + "FrozenPlatform": "Plateforme gelée", + "GoldenChest": "Coffre doré", + "GoldenPlatform": "Plateforme dorée", + "GoldenWorkbench": "Établi doré", + "HuntressAltHead": "Capuchon du Chaperon rouge", + "HuntressAltPants": "Jambières du Chaperon rouge", + "HuntressAltShirt": "Robe du Chaperon rouge", + "LihzahrdPlatform": "Plateforme de lihzahrd", + "LivingWoodDresser": "Commode en bois vivant", + "MonkAltHead": "Casque d'infiltré Shinobi", + "MonkAltPants": "Pantalon d'infiltré Shinobi", + "MonkAltShirt": "Torse d'infiltré Shinobi", + "MonkStaffT1": "Octopode endormi", + "MonkStaffT2": "Glaive atroce", + "MonkStaffT3": "Furie de dragon céleste", + "SquireAltHead": "Casque de chevalier de Valhalla", + "SquireAltPants": "Grèves de chevalier de Valhalla", + "SquireAltShirt": "Plastron de chevalier de Valhalla", + "SkywareClock2": "Horloge de soleil", + "LeinforsHat": "Après-shampoing de Leinfor", + "LeinforsShirt": "Style excessif de Leinfor", + "LeinforsPants": "Pantalon fantaisie de Leinfor", + "LeinforsWings": "Cape préhensile de Leinfor", + "LeinforsAccessory": "Shampoing de luxe de Leinfor", + "GraniteGolemBanner": "Bannière de Golem en granite", + "RavagerScorpionBanner": "Bannière de Braconnier des sables", + "MusicBoxDD2": "Boîte à musique (Armée de l'Ancien)", + "BossBagBetsy": "{$ItemName.SkeletronBossBag}" + }, + "ItemTooltip": { + "ShadowGreaves": "+7 % de vitesse au corps à corps", + "ConfettiGun": "Envoie des confettis partout !", + "ChlorophyteMask": "+16 % de dégâts au corps à corps\n+6 % de chances de coup critique au corps à corps", + "ChlorophyteHelmet": "+16 % de dégâts à distance\n20 % de chances de ne pas utiliser de munitions", + "ChlorophyteHeadgear": "+80 points de mana max et -17 % d'usage de mana\n+16 % de dégâts magiques", + "ChlorophytePlateMail": "+5 % de dégâts\n+7 % de chances de coup critique", + "ChlorophyteGreaves": "+8 % de chances de coup critique\n+5 % de vitesse de déplacement", + "ChlorophyteBar": "Réagit à la lumière", + "ShadowScalemail": "+7 % de vitesse au corps à corps", + "ShadowHelmet": "+7 % de vitesse au corps à corps", + "NightmarePickaxe": "Peut extraire de la pierre infernale", + "Paintbrush": "Utilisé avec de la peinture pour colorer les blocs", + "PaintRoller": "Utilisé avec de la peinture pour colorer les murs", + "ManaCrystal": "+20 points de santé max définitifs", + "GolfBallDyedPink": "{$CommonItemTooltip.GolfBall}", + "TealMushroom": "Utilisé pour fabriquer la teinture cyan", + "GreenMushroom": "Utilisé pour fabriquer la teinture verte", + "SkyBlueFlower": "Utilisée pour fabriquer la teinture bleu ciel", + "BandofStarpower": "+20 points de mana max", + "YellowMarigold": "Utilisé pour fabriquer la teinture jaune", + "BlueBerries": "Utilisées pour fabriquer la teinture bleue", + "LimeKelp": "Utilisée pour fabriquer la teinture vert citron", + "PinkPricklyPear": "Utilisée pour fabriquer la teinture rose", + "OrangeBloodroot": "Utilisée pour fabriquer la teinture orange", + "RedHusk": "Utilisée pour fabriquer la teinture rouge", + "CyanHusk": "Utilisée pour fabriquer la teinture cyan", + "VioletHusk": "Utilisée pour fabriquer la teinture mauve", + "PurpleMucos": "Utilisé pour fabriquer la teinture violette", + "BlackInk": "Utilisée pour fabriquer la teinture noire", + "FlowerofFire": "Jette des boules de feu", + "DyeVat": "Utilisé pour fabriquer des teintures", + "BeeGun": "Tire des abeilles qui pourchassent votre ennemi", + "PossessedHatchet": "Pourchasse votre ennemi", + "BeeKeeper": "Invoque des abeilles tueuses après avoir touché votre ennemi\nPetite chance de causer la confusion", + "HiveWand": "Place des ruches", + "MagicMissile": "Lance un missile contrôlable", + "Beenade": "Explose en une colonie d'abeilles", + "GravityGlobe": "Permet au porteur d'inverser la gravité\nAppuyez sur HAUT pour changer la gravité", + "KiteRed": "{$CommonItemTooltip.Kite}", + "Abeemination": "Invoque la Reine des abeilles", + "DirtRod": "Déplace de la terre comme par magie", + "TempleKey": "Ouvre la porte du temple de la jungle", + "LihzahrdWorkBench": "Utilisé pour l'artisanat de base", + "ShadowOrb": "Crée un orbe magique de l'ombre", + "LihzahrdPressurePlate": "S'active quand un joueur marche dessus", + "PiranhaGun": "S'accroche à l'ennemi et inflige des dégâts en continu", + "PygmyStaff": "Invoque un pygmée pour combattre à vos côtés", + "KiteBlueAndYellow": "{$CommonItemTooltip.Kite}", + "KiteBlue": "{$CommonItemTooltip.Kite}", + "KiteWyvern": "{$CommonItemTooltip.Kite}", + "GroxTheGreatGreaves": "{$CommonItemTooltip.DevItem}", + "LeafWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BlizzardinaBalloon": "Permet au porteur de faire un double saut\nAugmente la hauteur des sauts", + "BundleofBalloons": "Permet au porteur de faire un quadruple saut\nAugmente la hauteur des sauts", + "BatWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "HerculesBeetle": "+15 % de dégâts infligés par vos sbires\nAugmente le recul de vos sbires", + "BoneKey": "Invoque une Petite tête de Squeletron", + "MeteoriteBar": "Chaud au toucher", + "Nectar": "Invoque un Petit frelon", + "TikiTotem": "Invoque un Esprit Tiki", + "LizardEgg": "Invoque un familier lézard", + "LeafBlower": "Tire en succession rapide des feuilles acérées", + "ChlorophyteBullet": "Pourchasse votre ennemi", + "Hook": "Parfois laissé par des squelettes et des piranhas", + "ParrotCracker": "Invoque un familier perroquet", + "StrangeGlowingMushroom": "Invoque une petite truffe", + "Seedling": "Invoque un familier arbuste", + "WispinaBottle": "Invoque une volute pour donner de la lumière", + "PalladiumPickaxe": "Peut extraire du mithril et de l'orichalque", + "PalladiumDrill": "Peut extraire du mithril et de l'orichalque", + "OrichalcumPickaxe": "Peut extraire de l'adamantite et du titane", + "OrichalcumDrill": "Peut extraire de l'adamantite et du titane", + "MoltenFury": "Embrase les flèches en bois", + "PalladiumMask": "+8 % de dégâts au corps à corps\n+12 % de vitesse au corps à corps", + "PalladiumHelmet": "+9 % de dégâts à distance\n+9 % de chances de coup critique à distance", + "PalladiumHeadgear": "+7 % de dégâts magiques et de chances de coup critique\n+60 points de mana max", + "PalladiumBreastplate": "+3 % de dégâts\n+2 % de chances de coup critique", + "PalladiumLeggings": "+2 % de dégâts\n+1 % de chances de coup critique", + "FieryGreatsword": "Elle n'est que feu !", + "OrichalcumMask": "+7 % de dégâts au corps à corps\n+7 % de vitesse de mouvement et au corps à corps", + "OrichalcumHelmet": "+15 % de chances de coup critique à distance\nVitesse de déplacement augmentée de 8 %", + "OrichalcumHeadgear": "+18 % de chances de coup critique magique\n+80 points de mana max", + "OrichalcumBreastplate": "+18 % de chances de coup critique", + "OrichalcumLeggings": "+11 % de vitesse de déplacement", + "TitaniumMask": "+8 % de dégâts au corps à corps et de chances de coup critique\n+8 % de vitesse au corps à corps", + "TitaniumHelmet": "+16 % de dégâts à distance\n+7 % de chances de coup critique à distance", + "TitaniumHeadgear": "+16 % de dégâts magiques et +7 % de chances de coup critique magique\n+100 points de mana max", + "TitaniumBreastplate": "+4 % de dégâts\n+3 % de chances de coup critique", + "TitaniumLeggings": "+3 % de dégâts et de chances de coup critique\n+6 % de vitesse de déplacement", + "OrichalcumAnvil": "Utilisée pour fabriquer des objets avec des lingots de mithril, d'orichalque, d'adamantite et de titane", + "TitaniumForge": "Utilisée pour fondre les minerais d'adamantite et de titane", + "ChlorophyteClaymore": "Tire un orbe puissant", + "ChlorophyteSaber": "Tire un nuage de spores", + "ChlorophytePartisan": "Tire un nuage de spores", + "MeteorHelmet": "+7 % de dégâts magiques", + "ChlorophyteArrow": "Rebondit après avoir touché un mur", + "MeteorSuit": "+7 % de dégâts magiques", + "AmberMosquito": "Invoque un petit dinosaure", + "NimbusRod": "Invoque un nuage pour faire pleuvoir de l'eau sur vos ennemis", + "GroxTheGreatArmor": "{$CommonItemTooltip.DevItem}", + "EyeoftheGolem": "+10 % de chances de coup critique", + "HoneyBalloon": "Permet de sauter plus haut\nLibère des abeilles quand il est endommagé", + "MeteorLeggings": "+7 % de dégâts magiques", + "BlueHorseshoeBalloon": "Permet au porteur de faire un double saut\nAugmente la hauteur de saut et annule les dégâts de chute", + "WhiteHorseshoeBalloon": "Permet au porteur de faire un double saut\nAugmente la hauteur de saut et annule les dégâts de chute", + "YellowHorseshoeBalloon": "Permet au porteur de faire un double saut\nAugmente la hauteur de saut et annule les dégâts de chute", + "OceanCrate": "{$CommonItemTooltip.RightClickToOpen}", + "SniperRifle": "Tire une balle puissante très rapide\n pour réduire", + "VenusMagnum": "Tire une balle puissante très rapide", + "CrimsonRod": "Invoque un nuage pour faire pleuvoir du sang sur vos ennemis", + "SteampunkWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsVortex": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "RainbowGun": "Tire un arc-en-ciel qui cause des dégâts en continu", + "StyngerBolt": "Explose en éclats d'obus mortels", + "FlowerofFrost": "Tire une boule de givre", + "Uzi": "Tire une balle puissante et très rapide", + "RocketBoots": "Permettent de voler", + "AmethystRobe": "+20 points de mana max\n-5 % d'usage de mana", + "TopazRobe": "+40 points de mana max\n-7 % d'usage de mana", + "SapphireRobe": "+40 points de mana max\n-9 % d'usage de mana", + "EmeraldRobe": "+60 points de mana max\n-11 % d'usage de mana", + "RubyRobe": "+60 points de mana max\n-13 % d'usage de mana", + "DiamondRobe": "+80 points de mana max\n-15 % d'usage de mana", + "GroxTheGreatHelm": "{$CommonItemTooltip.DevItem}", + "LifeFruit": "+5 points de santé max définitifs", + "LihzahrdPowerCell": "Sert d'autel de Lihzahrd", + "Picksaw": "Peut extraire des briques de Lihzhard", + "JimsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "StaffofEarth": "Invoque un rocher puissant", + "GolemFist": "Donne un coup de poing avec la force d'un golem", + "Binoculars": "Augmentent la visibilité si équipées", + "RifleScope": "Augmente la visibilité pour les armes à feu\n pour réduire", + "DestroyerEmblem": "+10 % de dégâts\n+8 % de chances de coup critique", + "JellyfishNecklace": "Donne de la lumière sous l'eau", + "IceSickle": "Lance une faucille glaciale", + "ClothierVoodooDoll": "Vous êtes une horrible personne", + "PoisonStaff": "Tire un croc empoisonné qui transperce plusieurs ennemis", + "SlimeStaff": "Invoque une petite gelée pour combattre à vos côtés", + "PoisonDart": "Empoisonne les ennemis", + "EyeSpring": "Invoque un globe oculaire sur ressort", + "ToySled": "Invoque un petit homme de neige", + "BookofSkulls": "Lance un crâne", + "KOCannon": "Lance un gant de boxe", + "PirateMap": "Invoque une invasion de pirates", + "TurtleHelmet": "+6 % de dégâts au corps à corps\nLes ennemis sont plus susceptibles de vous viser", + "TurtleScaleMail": "+8 % de dégâts au corps à corps et de chances de coup critique\nLes ennemis sont plus susceptibles de vous viser", + "TurtleLeggings": "+4 % de chances de coup critique au corps à corps\nLes ennemis sont plus susceptibles de vous viser", + "KiteWorldFeeder": "{$CommonItemTooltip.Kite}", + "OasisCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "ObsidianRose": "Réduit les dégâts au toucher de la lave", + "RodofDiscord": "Vous téléporte à la position du curseur", + "DeathSickle": "Lance une faucille de la mort", + "BloodySpine": "Invoque le Cerveau de Cthulhu", + "Ichor": "Le sang des dieux", + "IchorTorch": "Peut se placer dans l'eau", + "IchorArrow": "Réduit la défense de la cible", + "IchorBullet": "Réduit la défense de la cible", + "GoldenShower": "Vaporise une douche d'ichor\nRéduit la défense de la cible", + "OasisCrate": "{$CommonItemTooltip.RightClickToOpen}", + "ImbuingStation": "Utilisée pour fabriquer des flasques d'infusion pour armes", + "EmptyBullet": "Utilisée pour fabriquer différents types de munitions", + "ShadowbeamStaff": "Crée un faisceau de l'ombre qui rebondit sur les murs", + "InfernoFork": "Lance une boule de feu qui explose en fournaise", + "SpectreStaff": "Invoque une âme perdue pour pourchasser vos ennemis", + "BubbleMachine": "Tire des bulles", + "BubbleWand": "Tire des bulles", + "WaterCandle": "L'équiper pourrait vous attirer une attention non désirée", + "Book": "Il contient d'étranges symboles", + "CopperWatch": "Donne l'heure", + "SpectreHood": "-40 % de dégâts magiques", + "SpectreRobe": "+7 % de dégâts magiques et de chances de coup critique", + "SpectrePants": "+8 % de dégâts magiques\n+8 % de vitesse de déplacement", + "NecroHelmet": "+5 % de dégâts à distance", + "PaladinsHammer": "Un marteau puissant qui revient", + "BeeWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "NecroBreastplate": "+5 % de dégâts à distance", + "LargeAmethyst": "Pour « Attraper la gemme ». Elle tombe quand vous mourez.", + "LargeTopaz": "Pour « Attraper la gemme ». Elle tombe quand vous mourez.", + "LargeSapphire": "Pour « Attraper la gemme ». Il tombe quand vous mourez.", + "LargeEmerald": "Pour « Attraper la gemme ». Elle tombe quand vous mourez.", + "LargeRuby": "Pour « Attraper la gemme ». Il tombe quand vous mourez.", + "LargeDiamond": "Pour « Attraper la gemme ». Il tombe quand vous mourez.", + "NecroGreaves": "+5 % de dégâts à distance", + "JungleKey": "Ouvre un coffre de la Jungle dans le donjon", + "CorruptionKey": "Ouvre un coffre de la Corruption dans le donjon", + "CrimsonKey": "Ouvre un coffre du Monde carmin dans le donjon", + "HallowedKey": "Ouvre un coffre sacré dans le donjon", + "Cherry": "{$CommonItemTooltip.MinorStats}", + "SpectrePaintbrush": "Utilisé avec de la peinture pour colorer les blocs", + "SpectrePaintRoller": "Utilisé avec de la peinture pour colorer les murs", + "GolfBallDyedOrange": "{$CommonItemTooltip.GolfBall}", + "ShroomiteHeadgear": "+15 % de dégâts de flèches\n+5 % de chances de coup critique à distance", + "ShroomiteMask": "+15 % de dégâts de balles\n+5 % de chances de coup critique à distance", + "ShroomiteHelmet": "+15 % de dégâts de fusées\n+5 % de chances de coup critique à distance", + "KiteBoneSerpent": "{$CommonItemTooltip.Kite}", + "ShroomiteLeggings": "+7 % de chances de coup critique à distance\n+12 % de vitesse de déplacement", + "Autohammer": "Convertit les lingots de chlorophyte en lingots de champignite", + "Jetpack": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressUpToBooster}", + "CenxsTiara": "{$CommonItemTooltip.DevItem}", + "CenxsBreastplate": "{$CommonItemTooltip.DevItem}", + "CenxsLeggings": "{$CommonItemTooltip.DevItem}", + "CrownosMask": "{$CommonItemTooltip.DevItem}", + "CrownosBreastplate": "{$CommonItemTooltip.DevItem}", + "CrownosLeggings": "{$CommonItemTooltip.DevItem}", + "CobaltShield": "Immunise contre le recul", + "WillsHelmet": "{$CommonItemTooltip.DevItem}", + "WillsBreastplate": "{$CommonItemTooltip.DevItem}", + "WillsLeggings": "{$CommonItemTooltip.DevItem}", + "JimsHelmet": "{$CommonItemTooltip.DevItem}", + "JimsBreastplate": "{$CommonItemTooltip.DevItem}", + "JimsLeggings": "{$CommonItemTooltip.DevItem}", + "AaronsHelmet": "{$CommonItemTooltip.DevItem}", + "AaronsBreastplate": "{$CommonItemTooltip.DevItem}", + "AaronsLeggings": "{$CommonItemTooltip.DevItem}", + "VampireKnives": "Lancent rapidement des dagues qui volent de la santé", + "AquaScepter": "Vaporise une douche d'eau", + "ScourgeoftheCorruptor": "Un javelot puissant qui libère de petits dévoreurs", + "Banana": "{$CommonItemTooltip.MinorStats}", + "SweetheartNecklace": "Libère des abeilles et augmente la vitesse de déplacement quand le joueur a subi des dégâts", + "FlurryBoots": "Le porteur peut courir très vite", + "LuckyHorseshoe": "Annule tous dégâts de chute", + "DTownsHelmet": "{$CommonItemTooltip.DevItem}", + "DTownsBreastplate": "{$CommonItemTooltip.DevItem}", + "DTownsLeggings": "{$CommonItemTooltip.DevItem}", + "GroxTheGreatWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "StillLife": "{$PaintingArtist.Crowno}", + "BloodyGoblet": "{$PaintingArtist.Crowno}", + "WickedUndead": "{$PaintingArtist.Crowno}", + "CenxsDress": "{$CommonItemTooltip.DevItem}", + "CenxsDressPants": "{$CommonItemTooltip.DevItem}", + "ShinyRedBalloon": "Permet de sauter plus haut", + "MagicCuffs": "+20 points de mana max\nRestaure du mana quand le joueur est blessé", + "SilverWatch": "Donne l'heure", + "AnkhCharm": "Immunise contre la plupart des altérations", + "AnkhShield": "Immunise contre le recul et les blocs de feu\nImmunise contre la plupart des altérations", + "WaterBolt": "Lance un jet d'eau qui se déplace lentement", + "GolfBall": "{$CommonItemTooltip.GolfBall}", + "Dynamite": "Une grosse explosion qui détruira la majorité des tuiles", + "Grenade": "Une petite explosion qui ne détruira pas de tuiles", + "GoldWatch": "Donne l'heure", + "FartinaJar": "Permet au porteur de faire un double saut", + "HellstoneBar": "Chaud au toucher", + "LeprechaunHat": "Ça ressemble à un leprechaun pour moi", + "LeprechaunShirt": "Je veux juste savoir où est l'or !", + "LeprechaunPants": "Je veux l'or, je veux l'or, je veux l'or. Donnez-moi l'or !", + "GoodieBag": "{$CommonItemTooltip.RightClickToOpen}", + "CandyCornRifle": "33 % de ne pas utiliser de munitions", + "Sickle": "Permet de couper l'herbe pour faire du foin", + "KiteAngryTrapper": "{$CommonItemTooltip.Kite}", + "TatteredFairyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "SpiderEgg": "Invoque un familier araignée", + "MagicalPumpkinSeed": "Invoque un familier potiron", + "DepthMeter": "Affiche la profondeur", + "BatScepter": "Invoque des chauves-souris pour attaquer vos ennemis", + "RavenStaff": "Invoque un corbeau pour combattre à vos côtés", + "JungleKeyMold": "Utilisé pour fabriquer une clé de la jungle", + "CorruptionKeyMold": "Utilisé pour fabriquer une clé de la corruption", + "CrimsonKeyMold": "Utilisé pour fabriquer une clé carmin", + "HallowedKeyMold": "Utilisé pour fabriquer une clé sacrée", + "FrozenKeyMold": "Utilisé pour fabriquer une clé gelée", + "RottenEgg": "Parfait pour jouer un tour aux villageois", + "UnluckyYarn": "Invoque un chat noir", + "TheHorsemansBlade": "Invoque des têtes de citrouille pour attaquer vos ennemis", + "SpookyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "GhostManifestation": "{$PaintingArtist.Crowno}", + "Graveyard": "{$PaintingArtist.Crowno}", + "Reborn": "{$PaintingArtist.Crowno}", + "CursedSapling": "Invoque un arbuste maudit pour vous suivre", + "PumpkinMoonMedallion": "Invoque la Lune citrouille", + "Nevermore": "{$PaintingArtist.Crowno}", + "SniperScope": "Augmente la visibilité pour les fusils ( pour réduire)\n+10 % de dégâts à distance et de chances de coup critique", + "BreathingReed": "Augmente la durée de respiration et permet de respirer sous l'eau", + "JellyfishDivingGear": "Permet de nager et rallonge considérablement la respiration sous l'eau\nDonne de la lumière sous l'eau", + "ArcticDivingGear": "Permet de nager et rallonge considérablement la respiration sous l'eau\nDonne de la lumière sous l'eau et permet de mieux se déplacer sur la glace", + "GnomeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Gnome}", + "FartInABalloon": "Permet au porteur de faire un double saut\nPermet de sauter plus haut", + "DandelionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Dandelion}", + "GolfPainting3": "{$PaintingArtist.Crowno}", + "ArkhalisWings": "{$ItemTooltip.ArkhalisHat}\n{$CommonItemTooltip.FlightAndSlowfall}", + "Present": "{$CommonItemTooltip.RightClickToOpen}", + "Flipper": "Permettent de nager", + "RedRyder": "Allez pas vous crever un œil !", + "FestiveWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BladeofGrass": "Chance d'empoisonner l'ennemi", + "EldMelter": "Utilise du gel comme munitions", + "KiteGoldfish": "{$CommonItemTooltip.Kite}", + "ReindeerBells": "Invoque un renne à monter", + "CnadyCanePickaxe": "Peut extraire de la météorite", + "KiteBunnyCrimson": "{$CommonItemTooltip.Kite}", + "KiteBunnyCorrupt": "{$CommonItemTooltip.Kite}", + "HandWarmer": "Immunise contre les effets de froid et de gel", + "Coal": "Vous n'avez pas été sage cette année", + "GolfPainting2": "{$PaintingArtist.Crowno}", + "DogWhistle": "Invoque un chien", + "ChristmasTreeSword": "Tire des décorations de Noël", + "ChainGun": "50 % de chances de ne pas utiliser de munitions", + "ObsidianSkull": "Immunise contre les blocs de feu", + "Razorpine": "Tire des aiguilles de pin très pointues", + "BlizzardStaff": "Couvre la zone de stalactites", + "SnowmanCannon": "Lance des missiles autoguidés", + "NorthPole": "Envoie une lance glaciale qui fait tomber des flocons de neige", + "NaughtyPresent": "Invoque la Lune de givre", + "BabyGrinchMischiefWhistle": "Invoque un petit Grinch", + "StarCannon": "Tire des étoiles filantes", + "Fez": "Les Fez, c'est cool", + "JungleRose": "Oh, que c'est joli !", + "FeralClaws": "+12 % de vitesse au corps à corps", + "AnkletoftheWind": "+10 % de vitesse de déplacement", + "GolfClubIron": "{$CommonItemTooltip.GolfIron}", + "WhoopieCushion": "Peut ennuyer certaines personnes", + "HeavyWorkBench": "Utilisé pour l'artisanat supérieur", + "AmmoBox": "-20 % d'utilisation des munitions", + "Flamelash": "Invoque une boule de feu contrôlable", + "VenomStaff": "Tire un croc de venin qui transperce plusieurs ennemis", + "SpectreMask": "+60 % de mana max et -13 % d'usage de mana\n+5 % de dégâts magiques et de chances de coup critique", + "BoneWelder": "{$CommonItemTooltip.SpecialCrafting}", + "FleshCloningVaat": "{$CommonItemTooltip.SpecialCrafting}", + "GlassKiln": "{$CommonItemTooltip.SpecialCrafting}", + "LihzahrdFurnace": "{$CommonItemTooltip.SpecialCrafting}", + "LivingLoom": "{$CommonItemTooltip.SpecialCrafting}", + "SkyMill": "{$CommonItemTooltip.SpecialCrafting}", + "IceMachine": "{$CommonItemTooltip.SpecialCrafting}", + "BeetleHelmet": "+6 % de dégâts au corps à corps\nLes ennemis sont plus susceptibles de vous viser", + "BeetleScaleMail": "+8 % de dégâts au corps`à corps et de chances de coup critique\n+6 % de vitesse de déplacement et au corps à corps", + "BeetleShell": "+5 % de dégâts au corps`à corps et de chances de coup critique\nLes ennemis sont plus susceptibles de vous viser", + "BeetleLeggings": "+6 % de vitesse de déplacement et au corps à corps\nLes ennemis sont plus susceptibles de vous viser", + "SteampunkBoiler": "{$CommonItemTooltip.SpecialCrafting}", + "HoneyDispenser": "{$CommonItemTooltip.SpecialCrafting}", + "BrickLayer": "Augmente la vitesse de placement des tuiles", + "GolfPainting1": "{$PaintingArtist.Crowno}", + "PaintSprayer": "Peint automatiquement les objets placés", + "PortableCementMixer": "Augmente la vitesse de placement des murs", + "CelestialMagnet": "Augmente la portée de collecte des étoiles de mana", + "ClayPot": "Fait pousser des plantes", + "CelestialEmblem": "Augmente la portée de collecte des étoiles de mana\n+15 % de dégâts magiques", + "CelestialCuffs": "Augmente la portée de collecte des étoiles de mana\nRestaure du mana quand le joueur est blessé", + "PulseBow": "Tire une flèche chargée", + "NaturesGift": "-6 % d'usage de mana", + "KiteSandShark": "{$CommonItemTooltip.Kite}", + "KiteShark": "{$CommonItemTooltip.Kite}", + "RestorationPotion": "Réduit le temps de recharge des potions", + "Gatligator": "50 % de chances ne pas utiliser de munitions\nTrès imprécis", + "WaterGun": "Fait jaillir un jet d'eau inoffensif", + "MagicHat": "+7 % de dégâts magiques et de chances de coup critique", + "Gi": "+5 % de dégâts et de chances de coup critique\n+10 % de vitesse de déplacement et au corps à corps", + "GypsyRobe": "+6 % de dégâts magiques et de chances de coup critique\n-10 % d'usage de mana", + "JungleHat": "+40 points de mana max\n+4 % de chance de coup critique magique", + "BeetleWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "JungleShirt": "+20 points de mana max\n+4 % de chance de coup critique magique", + "Gel": "Aussi délicieux qu'inflammable", + "JunglePants": "+20 points de mana max\n+4 % de chance de coup critique magique", + "NeonTetra": "Ses écailles colorées se vendraient bien.", + "Grapefruit": "{$CommonItemTooltip.MinorStats}", + "MiningPotion": "+25 % de vitesse d'extraction", + "HeartreachPotion": "Augmente la portée de collecte des cœurs de vie", + "DungeonFishingCrateHard": "{$ItemTooltip.DungeonFishingCrate}", + "BuilderPotion": "Augmente la vitesse et la portée du placement", + "TitanPotion": "Augmente le recul", + "FlipperPotion": "Permet de se déplacer avec aise dans les liquides", + "DivineEye": "{$PaintingArtist.Darthkitten}", + "TrapsightPotion": "Permet de voir les sources de danger à proximité", + "WoodenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "IronCrate": "{$CommonItemTooltip.RightClickToOpen}", + "GoldenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "AmmoReservationPotion": "20 % de chances de ne pas utiliser de munitions", + "LifeforcePotion": "+20 % de santé max", + "EndurancePotion": "-10 % de dégâts subis", + "RagePotion": "+10 % de chances de coup critique", + "InfernoPotion": "Met le feu aux ennemis à proximité", + "WrathPotion": "+10 % de dégâts", + "GolfClubDriver": "{$CommonItemTooltip.GolfDriver}", + "RecallPotion": "Vous téléporte chez vous", + "TeleportationPotion": "Vous téléporte vers un lieu au hasard", + "LovePotion": "Jetez-la pour jouer les cupidons", + "StinkPotion": "Jetez-la pour donner une terrible odeur à quelqu'un", + "BandageBoy": "{$PaintingArtist.Darthkitten}", + "SonarPotion": "Détecte les poissons qui ont mordu à l'hameçon", + "CratePotion": "Augmente les chances d'obtenir une caisse", + "WarmthPotion": "Réduit les dégâts causés par les sources de froid", + "VisitingThePyramids": "{$PaintingArtist.Leinfors}", + "Uluru": "{$PaintingArtist.darthmorf}", + "BeeGreaves": "+5 % de dégâts de sbires", + "HornetStaff": "Invoque un frelon pour combattre à vos côtés", + "ImpStaff": "Invoque un diablotin pour combattre à vos côtés", + "Oasis": "{$PaintingArtist.Khaios}", + "LifeAboveTheSand": "{$PaintingArtist.Zoomo}", + "SnakesIHateSnakes": "{$PaintingArtist.Xman101}", + "Sunglasses": "Elles vous donnent un air cool !", + "TheSandsOfSlime": "{$PaintingArtist.Criddle}", + "JawsOfDeath": "{$PaintingArtist.Darthkitten}", + "BurningSpirit": "{$PaintingArtist.Zoomo}", + "HighTestFishingLine": "Le fil ne se cassera jamais", + "FruitSalad": "{$CommonItemTooltip.MinorStats}", + "TackleBox": "Réduit les chances d'utilisation d'appâts", + "WizardHat": "+15 % de dégâts magiques", + "ZephyrFish": "Invoque un poisson-zéphyr", + "FrogLeg": "Augmente la vitesse de saut et permet le saut automatique\nAugmente la résistance à la chute", + "Dragonfruit": "{$CommonItemTooltip.MediumStats}", + "KiteJellyfishPink": "{$CommonItemTooltip.Kite}", + "KiteJellyfishBlue": "{$CommonItemTooltip.Kite}", + "FinWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "OpticStaff": "Invoque des jumeaux pour combattre à vos côtés", + "RedHat": "Il a une odeur bizarre…", + "Goldfish": "Il sourit, il pourrait servir de snack", + "Sandgun": "C'est une bonne idée !", + "GuideVoodooDoll": "Vous êtes une horrible personne", + "DivingHelmet": "Rallonge considérablement la respiration sous l'eau", + "DemonScythe": "Lance une faux démoniaque", + "Blowpipe": "Permet de récupérer des graines comme munitions", + "Glowstick": "Fonctionne même mouillé", + "Seed": "S'utilise avec la sarbacane", + "Aglet": "+5 % de vitesse de déplacement", + "ObsidianSkinPotion": "Immunise contre la lave", + "RegenerationPotion": "Régénère la santé", + "LifeCrystal": "+20 points de santé max définitifs", + "SwiftnessPotion": "+25 % de vitesse de déplacement", + "GillsPotion": "Respire de l'eau au lieu d'air", + "IronskinPotion": "+8 points de défense", + "ManaRegenerationPotion": "Régénération de mana augmentée", + "MagicPowerPotion": "+20 % de dégâts magiques", + "FeatherfallPotion": "Ralentit la chute", + "SpelunkerPotion": "Montre les emplacements de trésors et de minerais", + "InvisibilityPotion": "Rend invisible", + "ShinePotion": "Émet une aura de lumière", + "NightOwlPotion": "Améliore la vision de nuit", + "BattlePotion": "Augmente le taux d'apparition d'ennemis", + "ThornsPotion": "Les agresseurs subissent aussi des dégâts", + "WaterWalkingPotion": "Permet de marcher sur l'eau", + "ArcheryPotion": "+20 % de vitesse et dégâts de flèches", + "HunterPotion": "Montre où se trouvent les ennemis", + "GravitationPotion": "Permet de contrôler la gravité", + "IllegalGunParts": "Interdites presque partout", + "GolfClubWedge": "{$CommonItemTooltip.GolfWedge}", + "BetsyWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "Furnace": "Sert à fondre des minerais", + "Loom": "Sert à fabriquer des vêtements", + "IronAnvil": "Sert à fabriquer des objets à partir de lingots de métal", + "Keg": "Sert à brasser de la bière", + "KiteManEater": "{$CommonItemTooltip.Kite}", + "WorkBench": "Sert à l'artisanat de base", + "GoblinBattleStandard": "Invoque une armée de gobelins", + "Sawmill": "Sert à l'artisanat avancé avec le bois", + "Pwnhammer": "Assez puissant pour détruire les autels démoniaques", + "CobaltHat": "+40 points de mana max\n+9 % de chances de coup critique magique", + "CobaltHelmet": "+7 % de vitesse de déplacement\n+12 % de vitesse au corps à corps", + "CobaltMask": "+10 % de dégâts à distance\n+6 % de chances de coup critique magique", + "MythrilHood": "+60 points de mana max\n+15 % de dégâts magiques", + "MythrilHelmet": "+5 % de chances de coup critique au corps à corps\n+10 % de dégâts au corps à corps", + "MythrilHat": "+12 % de dégâts à distance\n+7 % de chances de coup critique à distance", + "CobaltDrill": "Peut extraire du mithril et de l'orichalque", + "MythrilDrill": "Peut extraire de l'adamantite et du titane", + "WingsNebula": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "Compass": "Affiche la position horizontale", + "DivingGear": "Permet de nager\nRallonge considérablement la durée de respiration sous l'eau", + "GPS": "Montre la position\nDonne l'heure", + "ObsidianHorseshoe": "Annule les dégâts de chute\nImmunise contre les blocs de feu", + "ObsidianShield": "Immunise contre le recul\nImmunise contre les blocs de feu", + "TinkerersWorkshop": "Permet de combiner certains accessoires", + "CloudinaBalloon": "Permet au porteur de faire un double saut\nPermet de sauter plus haut", + "AdamantiteHeadgear": "+80 points de mana max\n+11 % de dégâts magiques et de chances de coup critique", + "AdamantiteHelmet": "+7 % de chances de coup critique au corps à corps\n+14 % de dégâts au corps à corps", + "AdamantiteMask": "+14 % de dégâts à distance\n+8 % de chances de coup critique à distance", + "AdamantiteBreastplate": "+6 % de dégâts", + "AdamantiteLeggings": "+4 % de chances de coup critique\n+5 % de vitesse de déplacement", + "SpectreBoots": "Permettent de voler\nLe porteur peut courir super vite", + "FruitJuice": "{$CommonItemTooltip.MinorStats}", + "HolyWater": "Étend le sacré à certains blocs", + "CrimsonFishingCrateHard": "{$ItemTooltip.CrimsonFishingCrate}", + "FairyBell": "Invoque une fée magique", + "SuspiciousLookingEye": "Invoque l'Œil de Cthulhu", + "ClockworkAssaultRifle": "Trois rafales\nSeul le premier tir consomme des munitions", + "MoonCharm": "Transforme le porteur en loup-garou la nuit", + "KiteCrawltipede": "{$CommonItemTooltip.Kite}", + "SorcererEmblem": "+15 % de dégâts magiques", + "BandofRegeneration": "Régénère lentement la santé", + "WarriorEmblem": "+15 % de dégâts au corps à corps", + "RangerEmblem": "+15 % de dégâts à distance", + "DemonWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "AngelWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "RainbowRod": "Jette un arc-en-ciel contrôlable", + "IceRod": "Invoque un bloc de glace", + "NeptunesShell": "Transforme en sirène ou triton au contact de l'eau si équipé", + "MagicMirror": "Regardez le miroir pour rentrer chez vous", + "Flamethrower": "Utilise du gel comme munitions", + "Wrench": "Place du câble rouge", + "WireCutter": "Retire les câbles", + "CrystalBullet": "Crée des fragments de cristal à l'impact", + "HolyArrow": "Invoque des étoiles filantes à l'impact", + "MagicDagger": "Une dague magique infinie", + "CrystalStorm": "Invoque des fragments de cristal à tir rapide", + "CursedFlames": "Invoque des boules de feu profanes", + "SoulofLight": "L'essence des créatures de lumière", + "SoulofNight": "L'essence des créatures de l'ombre", + "CursedFlame": "Même l'eau ne peut l'éteindre", + "CursedTorch": "Peut se mettre dans l'eau", + "AdamantiteForge": "Sert à fondre les minerais d'adamantite et de titane", + "MythrilAnvil": "Sert à fabriquer des objets à partir de lingots de mithril, d'orichalque, d'adamantite et de titane", + "UnicornHorn": "Pointue et magique !", + "CrownosWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "LightShard": "Parfois, des créatures en portent dans les déserts de lumière", + "RedPressurePlate": "S'active quand on marche dessus", + "CloudinaBottle": "Permet au porteur de faire un double saut", + "SpellTome": "Peut être envoûté", + "PrismaticPunch": "{$CommonItemTooltip.MediumStats}", + "Megashark": "50 % de chances de ne pas utiliser de munitions\nLe grand frère de Minirequin", + "Shotgun": "Tire une série de balles", + "FrozenCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "Mango": "{$CommonItemTooltip.MinorStats}", + "HermesBoots": "Le porteur peut courir très vite", + "GreenPressurePlate": "S'active quand on marche dessus", + "GrayPressurePlate": "S'active quand un joueur marche dessus", + "BrownPressurePlate": "S'active quand un joueur marche dessus", + "MechanicalEye": "Invoque les Jumeaux", + "SoulofFright": "L'essence de la terreur pure", + "SoulofMight": "L'essence du destructeur", + "SoulofSight": "L'essence des spectateurs omniscients", + "HallowedPlateMail": "+7 % de chances de coup critique", + "HallowedGreaves": "+7 % de dégâts\n+8 % de vitesse de déplacement", + "HallowedHelmet": "+15 % de dégâts à distance\n+8 % de chances de coup critique à distance", + "CrossNecklace": "Augmente la durée d'invincibilité après avoir subi des dégâts", + "ManaFlower": "-8 % d'usage de mana\nUtilise automatiquement des potions de mana au besoin", + "Elderberry": "{$CommonItemTooltip.MinorStats}", + "MechanicalSkull": "Invoque le Grand Squeletron", + "HallowedHeadgear": "+100 points de mana max\n+12 % de dégâts magiques et de chances de coup critique", + "KiteYellow": "{$CommonItemTooltip.Kite}", + "DemoniteOre": "Bat d'une énergie noire", + "SlimeCrown": "Invoque le Roi des gelées", + "LightDisc": "Cumule jusqu'à 5", + "DemoniteBar": "Bat d'une énergie noire", + "SoulofFlight": "L'essence de puissantes créatures volantes", + "MusicBox": "A une chance d'enregistrer des chansons", + "Drax": "À ne pas confondre avec une piochache.", + "Explosives": "Explose à l'activation", + "InletPump": "Envoie de l'eau dans les pompes sortantes", + "OutletPump": "Reçoit de l'eau dans les pompes entrantes", + "Timer1Second": "S'active toutes les secondes", + "Timer3Second": "S'active toutes les 3 secondes", + "Timer5Second": "S'active toutes les 5 secondes", + "BluePresent": "{$CommonItemTooltip.RightClickToOpen}", + "GreenPresent": "{$CommonItemTooltip.RightClickToOpen}", + "YellowPresent": "{$CommonItemTooltip.RightClickToOpen}", + "SnowGlobe": "Invoque la Légion de givre", + "Carrot": "Invoque un familier lapin", + "Vilethorn": "Invoque une ronce vile", + "Starfury": "Fait pleuvoir les étoiles du ciel\nForgée avec la furie des cieux", + "PurificationPowder": "Purifie le mal", + "SmoothieofDarkness": "{$CommonItemTooltip.MinorStats}", + "RedsHelmet": "{$CommonItemTooltip.DevItem}", + "RedsBreastplate": "{$CommonItemTooltip.DevItem}", + "RedsLeggings": "{$CommonItemTooltip.DevItem}", + "Fish": "Invoque un petit manchot", + "BloodOrange": "{$CommonItemTooltip.MinorStats}", + "Frostbrand": "Tire un projectile glacial", + "RedPotion": "Uniquement pour ceux qui le valent", + "RottenChunk": "Ça a l'air bon !", + "UnholyTrident": "Invoque le trident du Diable", + "FrostHelmet": "Dégâts au corps à corps et à distance augmentés de 16 %", + "FrostBreastplate": "Chances de coup critique au corps à corps et à distance augmentées de 11 %", + "FrostLeggings": "Vitesse de déplacement augmentée de 8 %\n+7 % de vitesse d'attaque au corps à corps", + "WormFood": "Invoque le Dévoreur des mondes", + "TinWatch": "Donne l'heure", + "TungstenWatch": "Donne l'heure", + "PlatinumWatch": "Donne l'heure", + "LeadAnvil": "Sert à fabriquer des objets à partir de lingots de métal", + "BeamSword": "Tire un faisceau lumineux", + "IceBlade": "Tire un projectile glacial", + "IceBow": "Tire des flèches de givre", + "FrostStaff": "Tire un flux de givre", + "BlueCultistCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistDevote}", + "ButterflyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "FallenStar": "Disparaît après le lever du soleil", + "Seaweed": "Invoque un familier tortue", + "FairyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "Clentaminator": "Crée et détruit les biomes par pulvérisation\nUtiliser une solution colorée", + "GreenSolution": "S'utilise avec le Nettoyeur\nRépand la pureté", + "BlueSolution": "S'utilise avec le Nettoyeur\nRépand le sacré", + "PurpleSolution": "S'utilise avec le Nettoyeur\nRépand la corruption", + "DarkBlueSolution": "S'utilise avec le Nettoyeur\nRépand les champignons luisants", + "RedSolution": "S'utilise avec le Nettoyeur\nRépand le carmin", + "HarpyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BoneWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "Hammush": "Assez puissant pour détruire les autels démoniaques", + "NettleBurst": "Invoque une lance épineuse", + "CrimsonHelmet": "+2 % de dégâts", + "CrimsonScalemail": "+2 % de dégâts", + "CrimsonGreaves": "+2 % de dégâts", + "DeathbringerPickaxe": "Peut extraire de la pierre infernale", + "Torch": "Donne de la lumière", + "FlameWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "FrozenWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "GhostWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "LivingWoodWand": "Place du bois vivant", + "GrapplingHook": "Venez ici !", + "Actuator": "Permet d'activer ou de désactiver des blocs solides", + "Chain": "Peut s'escalader", + "BlueWrench": "Place du câble bleu", + "GreenWrench": "Place du câble vert", + "BluePressurePlate": "S'active quand un joueur marche dessus", + "YellowPressurePlate": "S'active quand tout sauf un joueur marche dessus", + "FrozenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LuckyCoin": "Frapper des ennemis rapporte parfois des pièces en plus", + "UnicornonaStick": "Qu'est-ce qu'on s'amuse !", + "SandstorminaBottle": "Permet de faire un double saut si équipée", + "CanOfWorms": "{$CommonItemTooltip.RightClickToOpen}", + "MoonShell": "Transforme en loup-garou la nuit et en sirène ou triton au contact de l'eau si équipé", + "StarVeil": "Fait tomber des étoiles et augmente la durée d'invincibilité après avoir subi des dégâts", + "BloodyMoscato": "{$CommonItemTooltip.MinorStats}", + "MiningHelmet": "Donne de la lumière lorsqu'il est équipé", + "AdhesiveBandage": "Immunité contre le saignement", + "ArmorPolish": "Immunité contre l'armure cassée", + "Bezoar": "Immunité contre le poison", + "Blindfold": "Immunité contre l'obscurité", + "FastClock": "Immunité contre le ralentissement", + "Megaphone": "Immunité contre le silence", + "Nazar": "Immunité contre les malédictions", + "Vitamins": "Immunité contre la faiblesse", + "TrifoldMap": "Immunité contre la confusion", + "Lemon": "{$CommonItemTooltip.MinorStats}", + "TropicalSmoothie": "{$CommonItemTooltip.MinorStats}", + "PinaColada": "{$CommonItemTooltip.MinorStats}", + "PeachSangria": "{$CommonItemTooltip.MinorStats}", + "ArmorBracing": "Immunité contre la faiblesse et l'armure cassée", + "MedicatedBandage": "Immunité contre le poison et le saignement", + "ThePlan": "Immunité contre le ralentissement et la confusion", + "CountercurseMantra": "Immunité contre le silence et la malédiction", + "CoinGun": "Les munitions sont des pièces\nLes pièces de valeur plus élevée font plus de dégâts", + "LavaCharm": "7 secondes d'immunité contre la lave", + "BananaDaiquiri": "{$CommonItemTooltip.MinorStats}", + "Pineapple": "{$CommonItemTooltip.MinorStats}", + "BoneWand": "Place des os", + "LeafWand": "Place des feuilles", + "FlyingCarpet": "Permet à qui le possède de voler quelques secondes", + "AvengerEmblem": "+12 % de dégâts", + "Lemonade": "{$CommonItemTooltip.MinorStats}", + "LandMine": "Explose quand on marche dessus", + "Starfruit": "{$CommonItemTooltip.MediumStats}", + "Umbrella": "Vous tomberez plus lentement en le tenant", + "ChlorophyteOre": "Réagit à la lumière", + "GrapeJuice": "{$CommonItemTooltip.MajorStats}", + "IceSkates": "Permet de mieux se déplacer sur la glace\nLa glace ne se cassera pas quand vous tomberez dessus", + "SnowballLauncher": "Lance rapidement des boules de neige", + "ClimbingClaws": "Permettent de descendre les murs en glissant\nCapacité améliorée si combinées avec les chaussures à pointes", + "AncientShadowHelmet": "+7 % de vitesse au corps à corps", + "AncientShadowScalemail": "+7 % de vitesse au corps à corps", + "AncientShadowGreaves": "+7 % de vitesse au corps à corps", + "AncientNecroHelmet": "+5 % de dégâts à distance", + "AncientCobaltHelmet": "+40 points de mana max\n+4 % de chances de coup critique magique", + "AncientCobaltBreastplate": "+20 points de mana max\n+4 % de chances de coup critique magique", + "AncientCobaltLeggings": "+20 points de mana max\n+4 % de chances de coup critique magique", + "BlackBelt": "Chance d'esquiver les attaques", + "Boomstick": "Tire une série de balles", + "Rope": "Peut s'escalader", + "Campfire": "Régénération de santé augmentée près d'un feu de camp", + "Marshmallow": "Faites-en une brochette à faire griller au feu de camp", + "MarshmallowonaStick": "Faites-les griller au feu de camp !", + "Coconut": "{$CommonItemTooltip.MinorStats}", + "ShoeSpikes": "Permettent de descendre les murs en glissant\nCapacité améliorée si combinées avec les griffes d'escalade", + "TigerClimbingGear": "Permet d'escalader les murs", + "Tabi": "Permet de foncer\nTouchez deux fois une direction", + "Minishark": "33 % de chances de ne pas utiliser de munitions\nMoitié requin, moitié fusil, un vrai bijou", + "ManaRegenerationBand": "+20 points de mana max\nAugmente la vitesse de régénération de mana", + "SandstorminaBalloon": "Permet au porteur de faire un double saut\nPermet de sauter plus haut", + "MasterNinjaGear": "Permet d'escalader les murs et de foncer\nDonne une chance d'éviter les attaques", + "RopeCoil": "À lancer pour créer une corde à escalader", + "Blowgun": "Permet de récupérer des graines en guise de munitions", + "BlizzardinaBottle": "Permet de faire un double saut si équipé", + "EnchantedSword": "Tire un rayon envoûté d'épée", + "PickaxeAxe": "À ne pas confondre avec une marteuse", + "EatersBone": "Invoque un Petit Dévoreur d'âmes", + "BlendOMatic": "Sert à fabriquer des objets", + "MeatGrinder": "Sert à fabriquer des objets", + "Rambutan": "{$CommonItemTooltip.MinorStats}", + "Solidifier": "Sert à fabriquer des objets", + "ActuationAccessory": "Place automatiquement des actionneurs sur des objets placés", + "ActuationRod": "Active des actionneurs", + "AlchemyTable": "33 % de chances de ne pas consommer d'ingrédients de potion", + "AncientBattleArmorHat": "+15 % de dégâts magiques et de sbires", + "AppleJuice": "{$CommonItemTooltip.MinorStats}", + "WoodenCrateHard": "{$ItemTooltip.WoodenCrate}", + "AncientHorn": "Invoque une monture basilic", + "BloodNautilusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodNautilus}", + "GoblinSharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinShark}", + "AviatorSunglasses": "Fait ressortir l'aviateur en vous\nSuper pour prétendre que vous faites des vidéos", + "KitePigron": "{$CommonItemTooltip.Kite}", + "BalloonHorseshoeFart": "Permet de faire un double saut si équipé\nPermet de sauter plus haut et annule les dégâts de chute", + "BalloonHorseshoeHoney": "Libère des abeilles quand il est endommagé\nPermet de sauter plus haut et annule les dégâts de chute", + "BalloonHorseshoeSharkron": "Permet de faire un double saut si équipé\nPermet de sauter plus haut et annule les dégâts de chute", + "BalloonPufferfish": "Augmente la hauteur des sauts", + "BeesKnees": "Les flèches en bois se transforment en une colonne d'abeilles", + "BejeweledValkyrieBody": "{$CommonItemTooltip.DevItem}\nParée de bijoux et super chic pour s'envoler dans le ciel orageux", + "BejeweledValkyrieHead": "{$CommonItemTooltip.DevItem}\nDevenez le vent, chevauchez les éclairs", + "BloodEelBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodEelHead}", + "BewitchingTable": " pour obtenir plus de sbires", + "Bladetongue": "Crache un flot d'ichor au contact", + "BlessedApple": "Invoque une monture licorne", + "CorruptFishingCrateHard": "{$ItemTooltip.CorruptFishingCrate}", + "JungleFishingCrateHard": "{$ItemTooltip.JungleFishingCrate}", + "BoneCampfire": "Régénération de santé augmentée près d'un feu de camp", + "BoneRattle": "Invoque un petit monstre grimaçant", + "BoneTorch": "Émet une lueur mortelle", + "BoosterTrack": "Un coup de marteau pour changer de direction", + "GolfClubPutter": "{$CommonItemTooltip.GolfPutter}", + "HallowedFishingCrateHard": "{$ItemTooltip.HallowedFishingCrate}", + "KiteRedAndYellow": "{$CommonItemTooltip.Kite}", + "BouncyGlowstick": "Fonctionne même mouillé", + "BouncyGrenade": "Une petite explosion qui ne détruira pas de tuiles\nRebondit beaucoup", + "WillsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "BrainScrambler": "Invoque une monture Scutlix", + "BubbleGun": "Tire rapidement des bulles puissantes", + "ButchersChainsaw": "Étincelles émises par les ennemis touchés", + "BloodSquidBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodSquid}", + "CelestialSigil": "Invoque l'Apocalypse", + "CellPhone": "Affiche tout\nVous permet de rentrer chez vous quand vous voulez", + "ClingerStaff": "Invoque un mur de flammes maudites", + "CogWall": "+200 % de productivité", + "CoinRing": "Augmente la portée de récolte de pièces\nFrapper les ennemis peut parfois rapporter des pièces", + "CompanionCube": "Sensible à la lave !", + "CordageGuide": "Permet de récolter des lianes à partir de plante grimpante", + "CorruptFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "CosmicCarKey": "Invoque une monture ovni", + "CrimsonFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "CrimsonHeart": "Invoque un cœur pour donner de la lumière", + "CrystalSerpent": "Tire une charge explosive de cristal", + "CrystalVileShard": "Invoque une énorme pointe en cristal", + "CursedCampfire": "Régénération de santé augmentée près d'un feu de camp", + "DaedalusStormbow": "Tire des flèches du ciel", + "DayBreak": "Écartez vos ennemis avec une lance de lumière !", + "DemonCampfire": "Régénération de santé augmentée près d'un feu de camp", + "DemonHeart": "Augmente définitivement le nombre de cases d'accessoires", + "Detonator": "Éclatez-les tous !", + "DevDye": "{$CommonItemTooltip.DevItem}", + "DjinnsCurse": "Octroie une chute lente en échange de vos pieds", + "DPSMeter": "Affiche vos dégâts par seconde", + "DrillContainmentUnit": "Invoque une monture Foreuse", + "DungeonFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "EoCShield": "Permet de foncer dans l'ennemi\nTouchez deux fois une direction", + "FishermansGuide": "Affiche des informations sur la pêche", + "FishFinder": "Affiche le temps, la phase lunaire et des informations sur la pêche", + "FishronWings": "{$CommonItemTooltip.FlightAndSlowfall}\nPermettent de se déplacer rapidement dans l'eau", + "Flairon": "Produit des bulles autoguidées", + "FleshKnuckles": "Les ennemis sont plus susceptibles de vous viser", + "FloatingIslandFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "FlowerBoots": "Des fleurs poussent sur l'herbe que vous foulez", + "FlyingKnife": "Lance un couteau volant contrôlable", + "GolfBallDyedBrown": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedBlue": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedBlack": "{$CommonItemTooltip.GolfBall}", + "FragmentNebula": "Le pouvoir de la galaxie réside dans ce fragment", + "FragmentSolar": "La furie de l'univers est à l'intérieur de ce fragment", + "FragmentStardust": "Des particules enchanteresses tournent autour de ce fragment", + "FragmentVortex": "Des énergies tourbillonnantes émanent de ce fragment", + "FrozenCampfire": "Régénération de santé augmentée près d'un feu de camp", + "FuzzyCarrot": "Invoque un lapin à chevaucher", + "GemLockAmber": " pour placer ou retirer de gros ambres", + "GemLockAmethyst": " pour placer ou retirer de grosses améthystes", + "GemLockDiamond": " pour placer ou retirer de gros diamants", + "GemLockEmerald": " pour placer ou retirer de grosses émeraudes", + "GemLockRuby": " pour placer ou retirer de gros rubis", + "GemLockSapphire": " pour placer ou retirer de gros saphirs", + "GemLockTopaz": " pour placer ou retirer de grosses topazes", + "GoblinTech": "Affiche la vitesse de déplacement, les dégâts par seconde et les minerais précieux", + "GoldPickaxe": "Peut extraire des météorites", + "GoldRing": "Augmente la portée de récolte de pièces", + "Plum": "{$CommonItemTooltip.MinorStats}", + "KiteBunny": "{$CommonItemTooltip.Kite}", + "HallowedFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "HardySaddle": "Invoque une tortue à chevaucher", + "HellwingBow": "Les flèches en bois deviennent des chauves-souris enflammées", + "HerbBag": "{$CommonItemTooltip.RightClickToOpen}", + "HiveBackpack": "Augmente la force des abeilles alliées", + "HoneyedGoggles": "Invoque une abeille à chevaucher", + "IceMirror": "Regardez le miroir pour rentrer chez vous", + "IchorCampfire": "Régénération de santé augmentée près d'un feu de camp", + "EyeballFlyingFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EyeballFlyingFish}", + "JungleFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LargeAmber": "Pour « Attraper la gemme ». Elle tombe quand vous mourez.", + "LaserRuler": "Crée des lignes de mesure sur l'écran pour placer les blocs", + "LastPrism": "Tire un arc-en-ciel de désintégration de toutes formes de vie", + "LifeformAnalyzer": "Affiche le nom de créatures rares autour de vous", + "LightKey": "Chargée de l'essence de nombreuses âmes", + "LivingMahoganyLeafWand": "Place des feuilles d'acajou riche", + "LivingMahoganyWand": "Place de l'acajou riche vivant", + "LockBox": "{$CommonItemTooltip.RightClickToOpen}\nRequiert une clé dorée", + "LogicGateLamp_Faulty": "Placez ceci sur les lampes du portail logique pour randomiser l'activation", + "LogicGateLamp_Off": "Placez ceci sur les portails logiques pour ajouter des vérifications", + "LogicGateLamp_On": "Placez ceci sur les portails logiques pour ajouter des vérifications", + "LogicGate_NOR": "Juge les lampes de portails logiques au-dessus\nS'active lorsqu'aucune lampe n'est allumée, se désactive autrement", + "LogicGate_NXOR": "Juge les lampes de portails logiques au-dessus\nS'active lorsque le total de lampes allumées n'est pas une, se désactive autrement\nSouvent appelée NON-OU EXC.", + "LogicGate_OR": "Juge les lampes de portails logiques au-dessus\nS'active quand n'importe quelle lampe est allumée, se désactive autrement", + "LogicGate_XOR": "Juge les lampes de portails logiques au-dessus\nS'active lorsqu'une seule lampe est active, se désactive autrement", + "LogicSensor_Above": "S'active lorsqu'un joueur est dessus, se désactive autrement", + "LogicSensor_Honey": "S'active lorsqu'il est occupé par du miel, se désactive autrement", + "LogicSensor_Lava": "S'active lorsqu'il est occupé par de la lave, se désactive autrement", + "LogicSensor_Liquid": "S'active lorsqu'il est occupé par de la lave, se désactive autrement", + "LogicSensor_Moon": "S'active à la tombée de la nuit", + "LogicSensor_Sun": "S'active au lever du jour", + "LogicSensor_Water": "S'active lorsqu'il est occupé par de l'eau, se désactive autrement", + "LokisDye": "{$CommonItemTooltip.DevItem}", + "LokisHelm": "{$CommonItemTooltip.DevItem}\nLe désordre vint de l'ordre, la peur vint du courage, la faiblesse vint de la force", + "LokisPants": "{$CommonItemTooltip.DevItem}\nLa justice est lente, mais efficace", + "LokisShirt": "{$CommonItemTooltip.DevItem}\nConnaissez-vous vous-même, ainsi que votre ennemi. Mille batailles, mille victoires…", + "ZombieMermanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieMerman}", + "LunarBar": "Il vibre d'une énergie céleste lumineuse", + "LunarCraftingStation": "Sert à fabriquer des objets à partir de fragments lunaires et de luminite", + "LunarFlareBook": "Pleut des lueurs lunaires vives", + "LunarHook": "Vous voulez la lune ? Attrapez-la avec un grappin et faites-la descendre !", + "LunarOre": "Un petit caillou des cieux", + "MagicLantern": "Invoque une lanterne magique qui expose les trésors à proximité", + "MechanicalLens": "Améliore la vision des câbles", + "MetalDetector": "Affiche les minerais les plus précieux autour de vous", + "MeteorStaff": "Fait pleuvoir des météorites", + "Minecart": "Prenez un rail !", + "MinecartTrack": "Mettez un coup de marteau sur l'extrémité pour changer le style de champignon\nDonner un coup de marteau à l'intersection pour changer de direction", + "MolotovCocktail": "Une petite explosion qui met le feu aux ennemis\nIncendiez les zones alentours pendant un moment", + "MoneyTrough": "Invoque une tirelire volante pour stocker vos objets", + "MoonlordArrow": "Ils les fait tomber plus vite que la lumière !", + "MoonlordBullet": "Alignez-les pour tous les dégommer !", + "Apricot": "{$CommonItemTooltip.MinorStats}", + "MothronWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "MulticolorWrench": " en maintenant pour modifier les paramètres de câbles", + "NebulaArcanum": "Fait apparaître des masses d'énergie astrale pour pourchasser vos ennemis", + "NebulaBlaze": "De la ceinture d'Orion à la paume de votre main", + "NebulaBreastplate": "+9 % de dégâts magiques et de chances de coup critique", + "NebulaHelmet": "+60 points de mana max et -15 % d'usage de mana\n+7 % de dégâts magiques et de chances de coup critique", + "NebulaLeggings": "+10 % de dégâts magiques\n+10 % de vitesse de déplacement", + "NebulaMonolith": "Exerce une petite quantité de pouvoir de la tour nébuleuse", + "NightKey": "Chargée de l'essence de nombreuses âmes", + "NightVisionHelmet": "Améliore la vision", + "GolfBallDyedLimeGreen": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedGreen": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedCyan": "{$CommonItemTooltip.GolfBall}", + "PartyBundleOfBalloonTile": "Attachés pour le plaisir de tous", + "PartyGirlGrenade": "Une petite explosion qui ne détruira pas de tuiles", + "PartyMonolith": "Les ballons tomberont du ciel", + "PartyPresent": "Vous voulez savoir ce qu'il y a dedans ?", + "PDA": "Affiche tout", + "PeaceCandle": "Rend les créatures à proximité moins hostiles", + "PedguinHat": "Devenez un manchot\nSuper pour prétendre que vous faites des vidéos", + "PedguinPants": "Devenez un manchot\nSuper pour prétendre que vous faites des vidéos", + "PedguinShirt": "Devenez un manchot\nSuper pour prétendre que vous faites des vidéos", + "Phantasm": "66 % de chances de ne pas utiliser de munitions", + "Pigronata": "Tapez jusqu'à ce que ça explose !\nPeut contenir une surprise !", + "PinkGel": "Élastique et sucré !", + "PinkSlimeBlock": "Très élastique", + "PirateStaff": "Invoque des pirates pour combattre avec vous", + "PixelBox": "Sépare les chemins de câble\nLumière éteinte de signaux horizontaux\nLumière allumée de signaux croisés", + "PlatinumPickaxe": "Peut extraire des météorites", + "PocketMirror": "Immunité contre la pétrification", + "PressureTrack": "Ne peut pas s'utiliser en pente", + "ProjectilePressurePad": "S'active quand un projectile le touche", + "PsychoKnife": "Vous permet de passer en mode furtif", + "PutridScent": "Les ennemis sont moins susceptibles de vous viser\n+5 % de dégâts et de chances de coup critique", + "GolfBallDyedYellow": "{$CommonItemTooltip.GolfBall}", + "Radar": "Détecte les ennemis autour de vous", + "RainbowCampfire": "Régénération de santé augmentée près d'un feu de camp", + "GolfBallDyedViolet": "{$CommonItemTooltip.GolfBall}", + "RazorbladeTyphoon": "Lance des roues acérées rapides", + "RedsYoyo": "{$CommonItemTooltip.DevItem}", + "REK": "Affiche le nombre de monstres, le compte d'ennemis tués et les créatures rares", + "RoyalGel": "Les gelées deviennent alliées", + "SailfishBoots": "Permettent de courir super vite", + "SandFallBlock": "Une chute de sable à regarder en toute sécurité", + "SandFallWall": "Une chute de sable à regarder en toute sécurité", + "ScalyTruffle": "Invoque une monture drachon", + "Sextant": "Affiche la phase de la lune", + "ShadowFlameBow": "Tire des flèches de flamme d'ombre", + "ShadowFlameHexDoll": "Invoque des tentacules de flamme d'ombre pour frapper votre ennemi", + "ShadowFlameKnife": "Inflige Flamme d'ombre au contact", + "SharkronBalloon": "Augmente la hauteur des sauts\nPermet au porteur de faire un double saut", + "SharkToothNecklace": "+5 points de pénétration d'armure", + "SharpeningStation": "Augmente la pénétration d'armure pour les armes de corps à corps", + "ShinyStone": "Augmente considérablement la régénération de santé si le joueur ne bouge pas\n", + "ShrimpyTruffle": "Attire une créature légendaire qui s'épanouit dans l'eau et au combat", + "SillyBalloonGreen": "Ça sent la menthe et la joie", + "SillyBalloonGreenWall": "Ça sent la menthe et la joie", + "SillyBalloonMachine": "Ça ne s'arrête jamais de faire la fête !", + "SillyBalloonPink": "Ça sent le chewing-gum et le bonheur", + "SillyBalloonPinkWall": "Ça sent le chewing-gum et le bonheur", + "SillyBalloonPurple": "Ça sent la lavande et l'enthousiasme", + "SillyBalloonPurpleWall": "Ça sent la lavande et l'enthousiasme", + "SillyStreamerBlue": "Bizarrement assez durable pour l'escalader !", + "SillyStreamerGreen": "Bizarrement assez durable pour l'escalader !", + "SillyStreamerPink": "Bizarrement assez durable pour l'escalader !", + "SkiphsHelm": "{$CommonItemTooltip.DevItem}", + "SkiphsPants": "{$CommonItemTooltip.DevItem}", + "SkiphsShirt": "{$CommonItemTooltip.DevItem}", + "TheBrideBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TheBride}", + "DTownsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "SlimeGun": "Asperge un jet inoffensif de gelée", + "SlimySaddle": "Invoque une gelée à chevaucher", + "KiteKoi": "{$CommonItemTooltip.Kite}", + "SnowFallBlock": "Bien plus cool qu'une boule à neige", + "SnowFallWall": "Bien plus cool qu'une boule à neige", + "SolarEruption": "Attaquez avec la furie du soleil", + "RedsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "Hoverboard": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "CenxsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "SolarMonolith": "Exerce une petite quantité de pouvoir de la tour solaire", + "SolarTablet": "Invoque l'Éclipse", + "SoulDrain": "Aspire la santé des ennemis", + "SpelunkerGlowstick": "Expose les trésors à proximité", + "SpiderStaff": "Invoque des araignées pour combattre à vos côtés", + "SporeSac": "Invoque des spores qui infligeront des dégâts aux ennemis avec le temps", + "GolfClubChlorophyteDriver": "{$CommonItemTooltip.GolfDriver}", + "StardustCellStaff": "Invoque une cellule astrale pour combattre à vos côtés\nPour cultiver la plus belle des infections cellulaires", + "StardustDragonStaff": "Invoque un dragon astral pour combattre à vos côtés\nQui veut une horde de sbires quand on peut avoir un dragon géant ?", + "GolfClubDiamondWedge": "{$CommonItemTooltip.GolfWedge}", + "GolfClubShroomitePutter": "{$CommonItemTooltip.GolfPutter}", + "StardustMonolith": "Exerce une petite quantité de pouvoir de la tour astrale", + "FloatingIslandFishingCrateHard": "{$ItemTooltip.FloatingIslandFishingCrate}", + "StickyGrenade": "Une petite explosion qui ne détruira pas de tuiles\nLe lancer peut s'avérer difficile", + "Stopwatch": "Affiche la vitesse de déplacement du joueur", + "StrangeBrew": "Ça a l'air horrible et ça pue", + "StrangePlant1": "Peut s'échanger contre des teintures rares", + "StrangePlant2": "Peut s'échanger contre des teintures rares", + "StrangePlant3": "Peut s'échanger contre des teintures rares", + "StrangePlant4": "Peut s'échanger contre des teintures rares", + "SummonerEmblem": "+15 % de dégâts d'invocation", + "Sundial": "Le temps peut accélérer et passer un jour par semaine", + "SuperAbsorbantSponge": "Peut absorber un volume infini d'eau", + "SuspiciousLookingTentacle": "Demande à un œil suspect de donner de la lumière\nJe sais ce que vous pensez…", + "TallyCounter": "Affiche le nombre de monstres tués", + "TartarSauce": "Invoque un mini Minotaure", + "TempestStaff": "Invoque des requinades pour combattre à vos côtés", + "TheBrideDress": "Mawiage...", + "TheBrideHat": "Amouw... twop d'amouw...", + "Toxikarp": "Crache des bulles toxiques", + "Tsunami": "Tire 5 flèches en même temps", + "TsunamiInABottle": "Permet de faire un double saut si équipé", + "TungstenPickaxe": "Peut extraire des météorites", + "UltraBrightCampfire": "Régénération de santé augmentée près d'un feu de camp", + "ValkyrieYoyo": "{$CommonItemTooltip.DevItem}", + "BlackCurrant": "{$CommonItemTooltip.MinorStats}", + "VineRopeCoil": "À lancer pour créer une corde de lianes à escalader", + "VortexBeater": "66 % de chances de ne pas utiliser de munitions\nLe mélange catastrophique de fusil et d'explosifs.", + "VortexBreastplate": "+12 % de dégâts magiques et de chances de coup critique\n25 % chances de ne pas utiliser de munitions", + "VortexHelmet": "+16 % de dégâts à distance\n+7 % de chances de coup critique à distance", + "VortexLeggings": "+8 % de dégâts magiques et de chances de coup critique\n+10 % de vitesse de déplacement", + "VortexMonolith": "Exerce une petite quantité de pouvoir de la tour du vortex", + "WandofSparking": "Tire une petite étincelle", + "WeaponRack": " pour placer un objet sur le porte-armes", + "WeatherRadio": "Affiche le temps", + "WeightedPressurePlateCyan": "S'active quand un joueur marche dessus ou en descend", + "WeightedPressurePlateOrange": "S'active quand un joueur marche dessus ou en descend", + "WeightedPressurePlatePink": "S'active quand un joueur marche dessus ou en descend", + "WeightedPressurePlatePurple": "S'active quand un joueur marche dessus ou en descend", + "Peach": "{$CommonItemTooltip.MinorStats}", + "WingsSolar": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsStardust": "{$CommonItemTooltip.FlightAndSlowfall}", + "GolfClubTitaniumIron": "{$CommonItemTooltip.GolfIron}", + "WireBulb": "Allume des ampoules pour chaque couleur de câbles", + "WireKite": "Permet un contrôle ultime des câbles !\n en tenant pour modifier les paramètres de câbles", + "WirePipe": "Sépare les chemins de câble\nSensible au marteau !", + "WormholePotion": "Vous téléporte auprès d'un membre de votre équipe\nCliquez sur leur tête sur la carte du plein écran", + "WormScarf": "-17 % de dégâts subis", + "XenoStaff": "Invoque un ovni pour combattre à vos côtés", + "YellowWrench": "Place un câble jaune", + "Yoraiz0rDarkness": "{$CommonItemTooltip.DevItem}\nSi vous le voyez, vous devriez vous enfuir…", + "Yoraiz0rHead": "{$CommonItemTooltip.DevItem}", + "Yoraiz0rPants": "{$CommonItemTooltip.DevItem}", + "Yoraiz0rShirt": "{$CommonItemTooltip.DevItem}", + "GolfClubPearlwoodDriver": "{$CommonItemTooltip.GolfDriver}", + "YoyoBag": "Donne des compétences expertes en yoyo si équipé", + "YoYoGlove": "Permet d'utiliser deux yoyos en même temps", + "BloodMoonRising": "{$PaintingArtist.Garner}", + "TheHangedMan": "{$PaintingArtist.Garner}", + "GloryoftheFire": "{$PaintingArtist.Garner}", + "BoneWarp": "{$PaintingArtist.Garner}", + "SkellingtonJSkellingsworth": "{$PaintingArtist.Garner}", + "TheCursedMan": "{$PaintingArtist.Garner}", + "TheEyeSeestheEnd": "{$PaintingArtist.Garner}", + "SomethingEvilisWatchingYou": "{$PaintingArtist.Moosdijk}", + "TheTwinsHaveAwoken": "{$PaintingArtist.Moosdijk}", + "TheScreamer": "{$PaintingArtist.Crowno}", + "GoblinsPlayingPoker": "{$PaintingArtist.Garner}", + "Dryadisque": "{$PaintingArtist.Garner}", + "Sunflowers": "{$PaintingArtist.Garner}", + "TerrarianGothic": "{$PaintingArtist.Garner}", + "Impact": "{$PaintingArtist.Wright}", + "PoweredbyBirds": "{$PaintingArtist.Ness}", + "TheDestroyer": "{$PaintingArtist.Moosdijk}", + "ThePersistencyofEyes": "{$PaintingArtist.Crowno}", + "UnicornCrossingtheHallows": "{$PaintingArtist.Crowno}", + "GreatWave": "{$PaintingArtist.Crowno}", + "StarryNight": "{$PaintingArtist.Crowno}", + "GuidePicasso": "{$PaintingArtist.Crowno}", + "TheGuardiansGaze": "{$PaintingArtist.Kolf}", + "FatherofSomeone": "{$PaintingArtist.Crowno}", + "NurseLisa": "{$PaintingArtist.Garner}", + "DarkSoulReaper": "{$PaintingArtist.Myhre}", + "Land": "{$PaintingArtist.Myhre}", + "TrappedGhost": "{$PaintingArtist.Myhre}", + "DemonsEye": "{$PaintingArtist.Myhre}", + "FindingGold": "{$PaintingArtist.Myhre}", + "FirstEncounter": "{$PaintingArtist.Crowno}", + "GoodMorning": "{$PaintingArtist.Crowno}", + "UndergroundReward": "{$PaintingArtist.Crowno}", + "ThroughtheWindow": "{$PaintingArtist.Crowno}", + "PlaceAbovetheClouds": "{$PaintingArtist.Crowno}", + "DoNotStepontheGrass": "{$PaintingArtist.Crowno}", + "ColdWatersintheWhiteLand": "{$PaintingArtist.Crowno}", + "LightlessChasms": "{$PaintingArtist.Crowno}", + "TheLandofDeceivingLooks": "{$PaintingArtist.Crowno}", + "Daylight": "{$PaintingArtist.Crowno}", + "SecretoftheSands": "{$PaintingArtist.Crowno}", + "DeadlandComesAlive": "{$PaintingArtist.Crowno}", + "EvilPresence": "{$PaintingArtist.Crowno}", + "SkyGuardian": "{$PaintingArtist.Crowno}", + "AmericanExplosive": "{$PaintingArtist.Kolf}", + "Discover": "{$PaintingArtist.Myhre}", + "HandEarth": "{$PaintingArtist.Myhre}", + "OldMiner": "{$PaintingArtist.Myhre}", + "Skelehead": "{$PaintingArtist.Myhre}", + "FacingtheCerebralMastermind": "{$PaintingArtist.Kolf}", + "LakeofFire": "{$PaintingArtist.Garner}", + "TrioSuperHeroes": "{$PaintingArtist.Burczyk}", + "ImpFace": "{$PaintingArtist.Myhre}", + "OminousPresence": "{$PaintingArtist.Craig}", + "ShiningMoon": "{$PaintingArtist.Craig}", + "LivingGore": "{$PaintingArtist.Craig}", + "FlowingMagma": "{$PaintingArtist.Craig}", + "TheCreationoftheGuide": "{$PaintingArtist.Garner}", + "TheMerchant": "{$PaintingArtist.Garner}", + "CrownoDevoursHisLunch": "{$PaintingArtist.Garner}", + "RareEnchantment": "{$PaintingArtist.Phelps}", + "GloriousNight": "{$PaintingArtist.Duncan}", + "AnglerFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AnglerFish}", + "AngryNimbusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryNimbus}", + "AnomuraFungusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AnomuraFungus}", + "AntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Antlion}", + "ArapaimaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Arapaima}", + "ArmoredSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ArmoredSkeleton}", + "BatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CaveBat}", + "BirdBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Bird}", + "BlackRecluseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlackRecluse}", + "BloodFeederBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodFeeder}", + "BloodJellyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodJelly}", + "BloodCrawlerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodCrawler}", + "BoneSerpentBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BoneSerpentHead}", + "BunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Bunny}", + "ChaosElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ChaosElemental}", + "MimicBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mimic}", + "ClownBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Clown}", + "CorruptBunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptBunny}", + "CorruptGoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptGoldfish}", + "CrabBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crab}", + "CrimeraBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crimera}", + "CrimsonAxeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonAxe}", + "CursedHammerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CursedHammer}", + "DemonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Demon}", + "DemonEyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DemonEye}", + "DerplingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Derpling}", + "EaterofSoulsBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EaterofSouls}", + "EnchantedSwordBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EnchantedSword}", + "ZombieEskimoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieEskimo}", + "FaceMonsterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FaceMonster}", + "FloatyGrossBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FloatyGross}", + "FlyingFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingFish}", + "FlyingSnakeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingSnake}", + "FrankensteinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Frankenstein}", + "FungiBulbBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FungiBulb}", + "FungoFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FungoFish}", + "GastropodBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Gastropod}", + "GoblinThiefBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinThief}", + "GoblinSorcererBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinSorcerer}", + "GoblinPeonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinPeon}", + "GoblinScoutBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinScout}", + "GoblinWarriorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinWarrior}", + "GoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Goldfish}", + "HarpyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Harpy}", + "HellbatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hellbat}", + "HerplingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Herpling}", + "HornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hornet}", + "IceElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceElemental}", + "IcyMermanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IcyMerman}", + "FireImpBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FireImp}", + "JellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueJellyfish}", + "JungleCreeperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleCreeper}", + "LihzahrdBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LihzahrdCrawler}", + "ManEaterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ManEater}", + "MeteorHeadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MeteorHead}", + "MothBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Moth}", + "MummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mummy}", + "MushiLadybugBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MushiLadybug}", + "ParrotBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Parrot}", + "PigronBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PigronCorruption}", + "PiranhaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Piranha}", + "PirateBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateDeckhand}", + "PixieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Pixie}", + "RaincoatZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieRaincoat}", + "ReaperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Reaper}", + "SharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Shark}", + "SkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Skeleton}", + "SkeletonMageBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DarkCaster}", + "SlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueSlime}", + "SnowFlinxBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowFlinx}", + "SpiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WallCreeper}", + "SporeZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieMushroom}", + "SwampThingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SwampThing}", + "TortoiseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantTortoise}", + "ToxicSludgeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ToxicSludge}", + "UmbrellaSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UmbrellaSlime}", + "UnicornBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Unicorn}", + "VampireBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VampireBat}", + "VultureBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Vulture}", + "NypmhBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nymph}", + "WerewolfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Werewolf}", + "WolfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Wolf}", + "WorldFeederBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SeekerHead}", + "WormBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantWormHead}", + "WraithBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Wraith}", + "WyvernBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WyvernHead}", + "ZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Zombie}", + "JackingSkeletron": "{$PaintingArtist.Crowno}", + "BitterHarvest": "{$PaintingArtist.Lazure}", + "BloodMoonCountess": "{$PaintingArtist.Lazure}", + "HallowsEve": "{$PaintingArtist.Lazure}", + "MorbidCuriosity": "{$PaintingArtist.Lazure}", + "StarTopper1": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "StarTopper2": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "StarTopper3": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BowTopper": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndRedGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenAndWhiteGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "MulticoloredBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndYellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndRedBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndYellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "MulticoloredLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndYellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndBlueLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueAndYellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "PillaginMePixels": "{$PaintingArtist.Lazure}", + "PaintingCastleMarsberg": "{$PaintingArtist.Lazure}", + "PaintingMartiaLisa": "{$PaintingArtist.Lazure}", + "PaintingTheTruthIsUpThere": "{$PaintingArtist.Lazure}", + "AngryTrapperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryTrapper}", + "ArmoredVikingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ArmoredViking}", + "BlackSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlackSlime}", + "BlueArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueArmoredBones}", + "BlueCultistArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistArcherBlue}", + "SkiphsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "BlueCultistFighterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "BoneLeeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BoneLee}", + "ClingerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Clinger}", + "CochinealBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CochinealBeetle}", + "CorruptPenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptPenguin}", + "CorruptSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptSlime}", + "CorruptorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Corruptor}", + "CrimslimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crimslime}", + "CursedSkullBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CursedSkull}", + "CyanBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CyanBeetle}", + "DevourerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DevourerHead}", + "DiablolistBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DiabolistRed}", + "DoctorBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DoctorBones}", + "DungeonSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DungeonSlime}", + "DungeonSpiritBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DungeonSpirit}", + "ElfArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ElfArcher}", + "ElfCopterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ElfCopter}", + "EyezorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Eyezor}", + "FlockoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Flocko}", + "GhostBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Ghost}", + "GiantBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantBat}", + "GiantCursedSkullBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantCursedSkull}", + "GiantFlyingFoxBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantFlyingFox}", + "GingerbreadManBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GingerbreadMan}", + "GoblinArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinArcher}", + "GreenSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreenSlime}", + "HeadlessHorsemanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HeadlessHorseman}", + "HellArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HellArmoredBones}", + "HellhoundBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hellhound}", + "HoppinJackBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HoppinJack}", + "IceBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceBat}", + "IceGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceGolem}", + "IceSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceSlime}", + "IchorStickerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IchorSticker}", + "IlluminantBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IlluminantBat}", + "IlluminantSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IlluminantSlime}", + "JungleBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleBat}", + "JungleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleSlime}", + "KrampusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Krampus}", + "LacBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LacBeetle}", + "LavaBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Lavabat}", + "LavaSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LavaSlime}", + "MartianBrainscramblerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BrainScrambler}", + "MartianDroneBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianDrone}", + "MartianEngineerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianEngineer}", + "MartianGigazapperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GigaZapper}", + "MartianGreyGruntBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GrayGrunt}", + "MartianOfficerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianOfficer}", + "MartianRaygunnerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RayGunner}", + "MartianScutlixGunnerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ScutlixRider}", + "MartianTeslaTurretBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianTurret}", + "MisterStabbyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MisterStabby}", + "MotherSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MotherSlime}", + "NecromancerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Necromancer}", + "NutcrackerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nutcracker}", + "PaladinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Paladin}", + "PenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Penguin}", + "PinkyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Pinky}", + "PoltergeistBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Poltergeist}", + "PossessedArmorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PossessedArmor}", + "PresentMimicBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PresentMimic}", + "PurpleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PurpleSlime}", + "RaggedCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RaggedCaster}", + "RainbowSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RainbowSlime}", + "RavenBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Raven}", + "RedSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RedSlime}", + "RuneWizardBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RuneWizard}", + "RustyArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RustyArmoredBonesAxe}", + "ScarecrowBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Scarecrow1}", + "ScutlixBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Scutlix}", + "SkeletonArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonArcher}", + "SkeletonCommandoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonCommando}", + "SkeletonSniperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonSniper}", + "SlimerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Slimer}", + "SnatcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Snatcher}", + "SnowBallaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowBalla}", + "SnowmanGangstaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowmanGangsta}", + "SpikedIceSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SpikedIceSlime}", + "SpikedJungleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SpikedJungleSlime}", + "SplinterlingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Splinterling}", + "SquidBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Squid}", + "TacticalSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TacticalSkeleton}", + "TheGroomBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TheGroom}", + "TimBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Tim}", + "UndeadMinerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UndeadMiner}", + "UndeadVikingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UndeadViking}", + "WhiteCultistArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistArcherWhite}", + "WhiteCultistCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "WhiteCultistFighterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "YellowSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.YellowSlime}", + "YetiBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Yeti}", + "ZombieElfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieElf}", + "SparkyPainting": "{$PaintingArtist.Crowno}\nEn hommage", + "PaintingAcorns": "{$PaintingArtist.Lazure}", + "PaintingColdSnap": "{$PaintingArtist.Lazure}", + "PaintingCursedSaint": "{$PaintingArtist.Lazure}", + "PaintingSnowfellas": "{$PaintingArtist.Lazure}", + "PaintingTheSeason": "{$PaintingArtist.Lazure}", + "RedString": "{$CommonItemTooltip.String}", + "OrangeString": "{$CommonItemTooltip.String}", + "YellowString": "{$CommonItemTooltip.String}", + "LimeString": "{$CommonItemTooltip.String}", + "GreenString": "{$CommonItemTooltip.String}", + "TealString": "{$CommonItemTooltip.String}", + "CyanString": "{$CommonItemTooltip.String}", + "SkyBlueString": "{$CommonItemTooltip.String}", + "BlueString": "{$CommonItemTooltip.String}", + "PurpleString": "{$CommonItemTooltip.String}", + "VioletString": "{$CommonItemTooltip.String}", + "PinkString": "{$CommonItemTooltip.String}", + "BrownString": "{$CommonItemTooltip.String}", + "WhiteString": "{$CommonItemTooltip.String}", + "RainbowString": "{$CommonItemTooltip.String}", + "BlackString": "{$CommonItemTooltip.String}", + "BlackCounterweight": "{$CommonItemTooltip.Counterweight}", + "BlueCounterweight": "{$CommonItemTooltip.Counterweight}", + "GreenCounterweight": "{$CommonItemTooltip.Counterweight}", + "PurpleCounterweight": "{$CommonItemTooltip.Counterweight}", + "RedCounterweight": "{$CommonItemTooltip.Counterweight}", + "YellowCounterweight": "{$CommonItemTooltip.Counterweight}", + "KingSlimeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "EyeOfCthulhuBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "EaterOfWorldsBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "BrainOfCthulhuBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "QueenBeeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "SkeletronBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "WallOfFleshBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "DestroyerBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "TwinsBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "SkeletronPrimeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "PlanteraBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "GolemBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "FishronBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "CultistBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "MoonLordBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "GoblinSummonerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinSummoner}", + "SalamanderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Salamander}", + "GiantShellyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantShelly}", + "CrawdadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crawdad}", + "FritzBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Fritz}", + "CreatureFromTheDeepBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CreatureFromTheDeep}", + "DrManFlyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DrManFly}", + "MothronBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mothron}", + "SeveredHandBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "ThePossessedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ThePossessed}", + "ButcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Butcher}", + "PsychoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Psycho}", + "DeadlySphereBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DeadlySphere}", + "NailheadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nailhead}", + "PoisonousSporeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "MedusaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Medusa}", + "GreekSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreekSkeleton}", + "GraniteFlyerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GraniteFlyer}", + "GraniteGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GraniteGolem}", + "BloodZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodZombie}", + "DripplerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Drippler}", + "TombCrawlerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TombCrawlerHead}", + "DuneSplicerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DuneSplicerHead}", + "FlyingAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingAntlion}", + "WalkingAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WalkingAntlion}", + "DesertGhoulBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertGhoul}", + "DesertLamiaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertLamiaDark}", + "DesertDjinnBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertDjinn}", + "DesertBasiliskBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertBeast}", + "RavagerScorpionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertScorpionWalk}", + "StardustSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustSoldier}", + "StardustWormBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustWormHead}", + "StardustJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustJellyfishBig}", + "StardustSpiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustSpiderBig}", + "StardustSmallCellBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "StardustLargeCellBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustCellBig}", + "SolarCoriteBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarCorite}", + "SolarSrollerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarSroller}", + "SolarCrawltipedeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarCrawltipedeHead}", + "SolarDrakomireRiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarDrakomireRider}", + "SolarDrakomireBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarDrakomire}", + "SolarSolenianBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarSolenian}", + "NebulaSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaSoldier}", + "NebulaHeadcrabBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaHeadcrab}", + "NebulaBrainBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaBrain}", + "NebulaBeastBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaBeast}", + "VortexLarvaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexLarva}", + "VortexHornetQueenBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexHornetQueen}", + "VortexHornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexHornet}", + "VortexSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexSoldier}", + "VortexRiflemanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexRifleman}", + "PirateCaptainBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCaptain}", + "PirateDeadeyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateDeadeye}", + "PirateCorsairBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCorsair}", + "PirateCrossbowerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCrossbower}", + "MartianWalkerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianWalker}", + "RedDevilBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RedDevil}", + "PinkJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PinkJellyfish}", + "GreenJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreenJellyfish}", + "DarkMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DarkMummy}", + "LightMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LightMummy}", + "AngryBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryBones}", + "IceTortoiseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceTortoise}", + "SandSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandSlime}", + "SeaSnailBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SeaSnail}", + "MoonLordPainting": "{$PaintingArtist.Crowno}", + "SandElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandElemental}", + "SandsharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandShark}", + "SandsharkCorruptBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkCorrupt}", + "SandsharkCrimsonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkCrimson}", + "SandsharkHallowedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkHallow}", + "TumbleweedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Tumbleweed}", + "BossBagBetsy": "{$CommonItemTooltip.RightClickToOpen}", + "BossBagOgre": "{$CommonItemTooltip.RightClickToOpen}", + "BossBagDarkMage": "{$CommonItemTooltip.RightClickToOpen}", + "ExplosiveBunny": "S'utilise avec un canon à lapins", + "VialofVenom": "Extrêmement toxique", + "FlaskofVenom": "Les attaques au corps à corps infligent Venin aux ennemis", + "VenomArrow": "Inflige Venin à la cible", + "VenomBullet": "Inflige Venin à la cible", + "PartyBullet": "Explose en une pluie de confetti à l'impact", + "NanoBullet": "Cause la confusion", + "ExplodingBullet": "Explose à l'impact", + "GoldenBullet": "Les ennemis tués perdront de l'argent", + "FlaskofCursedFlames": "Les attaques au corps à corps infligent des flammes maudites aux ennemis", + "FlaskofFire": "Les attaques au corps à corps mettent le feu aux ennemis", + "FlaskofGold": "Les attaques au corps à corps font perdre plus d'or aux ennemis", + "FlaskofIchor": "Les attaques au corps à corps réduisent la défense des ennemis", + "FlaskofNanites": "Les attaques au corps à corps rendent les ennemis confus", + "FlaskofParty": "Les attaques au corps à corps font apparaître des confettis", + "FlaskofPoison": "Les attaques au corps à corps enpoisonnent les ennemis", + "CobaltBreastplate": "+3 % de chances de coup critique", + "CobaltLeggings": "+10 % de vitesse de déplacement", + "MythrilChainmail": "+5 % de dégâts", + "MythrilGreaves": "+3 % de chances de coup critique", + "RocketI": "Petite explosion. Ne détruit pas de tuiles", + "RocketII": "Petite explosion. Détruit des tuiles", + "RocketIII": "Grosse explosion. Ne détruit pas de tuiles", + "RocketIV": "Grosse explosion. Détruit des tuiles", + "AsphaltBlock": "Augmente la vitesse de course", + "CobaltPickaxe": "Peut extraire du mithril et de l'orichalque", + "MythrilPickaxe": "Peut extraire de l'adamantite et du titane", + "Cannonball": "Pour utiliser avec le canon", + "Arkhalis": "Ce n'est pas un Schmoo qui me l'a donnée", + "BoneGlove": "33 % de chances de ne pas utiliser d'os", + "LogicGate_AND": "S'active lorsque toutes les lampes sont allumées, se désactive autrement", + "LogicGate_NAND": "S'active lorsque toutes les lampes ne sont pas allumées, se désactive autrement", + "DD2FlameburstTowerT2Popper": "{$ItemTooltip.DD2FlameburstTowerT1Popper}", + "DD2FlameburstTowerT3Popper": "{$ItemTooltip.DD2FlameburstTowerT1Popper}", + "DD2BallistraTowerT2Popper": "{$ItemTooltip.DD2BallistraTowerT1Popper}", + "DD2BallistraTowerT3Popper": "{$ItemTooltip.DD2BallistraTowerT1Popper}", + "DD2ExplosiveTrapT2Popper": "{$ItemTooltip.DD2ExplosiveTrapT1Popper}", + "DD2ExplosiveTrapT3Popper": "{$ItemTooltip.DD2ExplosiveTrapT1Popper}", + "DD2LightningAuraT2Popper": "{$ItemTooltip.DD2LightningAuraT1Popper}", + "DD2LightningAuraT3Popper": "{$ItemTooltip.DD2LightningAuraT1Popper}", + "ApprenticeScarf": "{$ItemTooltip.HuntressBuckler}", + "SquireShield": "{$ItemTooltip.HuntressBuckler}", + "MonkBelt": "{$ItemTooltip.HuntressBuckler}", + "GolfClubStoneIron": "{$CommonItemTooltip.GolfIron}", + "ApprenticeAltPants": "+20 % de dégâts des sbires et +25 % de chances de coup critique magique", + "ApprenticeAltShirt": "+30 % de dégâts des sbires et +15 % de chances de coup critique magique", + "GolfClubGoldWedge": "{$CommonItemTooltip.GolfWedge}", + "ApprenticeRobe": "+20 % de dégâts des sbires et +10 % de dégâts magiques", + "ApprenticeStaffT3": "Éclabousse du miasme qui affaiblit la défense !", + "GoldenCrateHard": "{$ItemTooltip.GoldenCrate}", + "BookStaff": "C'est à se demander qui a mis un tome de sagesse infinie sur un bâton...\n pour lancer une tornade puissante", + "GolfBallDyedSkyBlue": "{$CommonItemTooltip.GolfBall}", + "DD2BetsyBow": "Tire des flèches qui se dédoublent, infligent plus de dégâts aux ennemis volants", + "DD2ElderCrystal": "Placez-le sur le support du cristal Eternia pour invoquer des portails d'Etheria", + "DD2ElderCrystalStand": "Supporte le cristal Eternia", + "DD2EnergyCrystal": "Souvent utilisée pour manifester une volonté sous une forme physique de défense", + "GolfBallDyedRed": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedTeal": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedPurple": "{$CommonItemTooltip.GolfBall}", + "DD2PetDragon": "Invoque un familier dragon", + "DD2PetGato": "Invoque un familier gato", + "DD2PetGhost": "Invoque un familier allumèche pour donner de la lumière", + "DD2PhoenixBow": "Exploite le pouvoir de flammes éternelles", + "DD2SquireBetsySword": "Libère l'énergie du cœur droit devant", + "DD2SquireDemonSword": " pour protéger avec un bouclier", + "DefenderMedal": "Devise à échanger avec le tavernier", + "ShuckedOyster": "{$CommonItemTooltip.MinorStats}", + "HuntressAltPants": "+25 % de dégâts des sbires et +20 % de vitesse de déplacement", + "HuntressAltShirt": "+25 % de dégâts des sbires et à distance", + "GolfClubBronzeWedge": "{$CommonItemTooltip.GolfWedge}", + "HuntressJerkin": "+20 % de dégâts des sbires et à distance", + "HuntressPants": "+10 % de dégâts des sbires et +20 % de vitesse de déplacement", + "GolfClubWoodDriver": "{$CommonItemTooltip.GolfDriver}", + "Oyster": "{$CommonItemTooltip.RightClickToOpen}", + "MonkAltPants": "+20 % de dégâts des sbires, de vitesse de déplacement et chances de coup critique au corps à corps", + "MonkAltShirt": "+20 % de dégâts des sbires et de vitesse au corps à corps", + "GolfClubMythrilIron": "{$CommonItemTooltip.GolfIron}", + "MonkPants": "+10 % de dégâts des sbires,\n+10 % de chances de coup critique et +20 % de vitesse de déplacement", + "MonkShirt": "+20 % de dégâts des sbires et de dégâts au corps à corps", + "MonkStaffT1": "Charge de la puissance en se balançant pour écraser les ennemis", + "MonkStaffT2": "Invoque des fantômes en touchant les ennemis", + "MonkStaffT3": " en tenant l'arme pour une attaque alternative !", + "GolfClubRustyPutter": "{$CommonItemTooltip.GolfPutter}", + "IronCrateHard": "{$ItemTooltip.IronCrate}", + "SquireAltShirt": "+30 % de dégâts des sbires et augmente énormément la régénération de santé", + "GolfClubLeadPutter": "{$CommonItemTooltip.GolfPutter}", + "SquireGreaves": "+15 % de dégâts des sbires, +20 % de chances de coup critique au corps à corps et de vitesse de déplacement", + "SquirePlating": "+15 % de dégâts des sbires et de dégâts au corps à corps", + "ArkhalisShirt": "{$ItemTooltip.ArkhalisHat}", + "ArkhalisPants": "{$ItemTooltip.ArkhalisHat}", + "LobsterTail": "{$CommonItemTooltip.MediumStats}", + "ArkhalisHat": "{$CommonItemTooltip.DevItem}\n'Ça ne vient pas de la grille'", + "LeinforsHat": "{$CommonItemTooltip.DevItem}\n'Pour que ces jolies boucles restent magnifiques'", + "LeinforsShirt": "{$CommonItemTooltip.DevItem}\n'Pour remettre le sexy à la mode'", + "LeinforsPants": "{$CommonItemTooltip.DevItem}\n'Surprise de Shia ! C'est un pantalon incroyable, n'est-ce pas ?'", + "OceanCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "LeinforsAccessory": "{$CommonItemTooltip.DevItem}\n'Pour de meilleurs résultats, faites un régime à base de pâtes'", + "KiteSpectrum": "{$CommonItemTooltip.Kite}", + "KiteWanderingEye": "{$CommonItemTooltip.Kite}", + "KiteUnicorn": "{$CommonItemTooltip.Kite}", + "FairyQueenBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "LavaCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LavaCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "HotlineFishingHook": "{$CommonItemTooltip.LavaFishing}", + "LavaFishingHook": "{$CommonItemTooltip.LavaFishing}", + "TeleportationPylonJungle": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonPurity": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonHallow": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonUnderground": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonOcean": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonDesert": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonSnow": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonMushroom": "{$CommonItemTooltip.TeleportationPylon}", + "RockGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RockGolem}", + "BloodMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodMummy}", + "SporeSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SporeSkeleton}", + "SporeBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SporeBat}", + "LarvaeAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LarvaeAntlion}", + "CrimsonBunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonBunny}", + "CrimsonGoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonGoldfish}", + "CrimsonPenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonPenguin}", + "BigMimicCorruptionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicCorruption}", + "BigMimicCrimsonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicCrimson}", + "BigMimicHallowBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicHallow}", + "MossHornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MossHornet}", + "WanderingEyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WanderingEye}", + "CreativeWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "RainbowWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressUpToBooster}", + "LongRainbowTrailWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}\n{$CommonItemTooltip.PressUpToBooster}" + }, + "CommonItemTooltip": { + "SpecialCrafting": "Utilisée pour l'artisanat spécial", + "DevItem": "Super pour se faire passer pour les développeurs !", + "FlightAndSlowfall": "Permettent de voler et ralentissent la chute", + "RightClickToOpen": " pour ouvrir", + "BannerBonus": "Les joueurs à proximité obtiennent un bonus contre : ", + "Counterweight": "Lance un contrepoids après avoir touché un ennemi avec un yoyo", + "MinuteDuration": "{0} minutes", + "PlaceableOnXmasTree": "Peut se placer sur un sapin de Noël", + "RestoresLife": "Restaure {0} points de santé", + "RestoresMana": "Restaure {0} points de mana", + "SecondDuration": "{0} secondes", + "String": "Augmente la portée du yoyo", + "UsesLife": "Utilise {0} points de santé", + "UsesMana": "Utilise {0} points de mana" + }, + "BuffDescription": { + "WellFed_Expert": "Améliorations mineures de toutes les stats et régénération de santé augmentée" + } +} \ No newline at end of file diff --git a/Localization/Content/fr-FR/Legacy.json b/Localization/Content/fr-FR/Legacy.json new file mode 100644 index 0000000..6c59d2c --- /dev/null +++ b/Localization/Content/fr-FR/Legacy.json @@ -0,0 +1,1143 @@ +{ + "LegacyWorldGen": { + "0": "Création du terrain du monde", + "10": "Création des grottes de la surface", + "11": "Création de la jungle", + "12": "Création des îles flottantes", + "13": "Ajout de parcelles de champignons", + "14": "Placement de boue dans la terre", + "15": "Ajout de vase", + "16": "Ajout d'objets brillants", + "17": "Ajout de toiles d'araignées", + "18": "Création de l'enfer", + "19": "Ajout d'étendues d'eau", + "1": "Ajout de sable", + "20": "Création du mal dans le monde", + "21": "Création de grottes dans les montagnes", + "22": "Création de plages", + "23": "Ajout de pierres précieuses", + "24": "Gravitation du sable", + "25": "Nettoyage des arrière-plans de terre", + "26": "Placement d'autels", + "27": "Formation des liquides", + "28": "Placement des cristaux de vie", + "29": "Placement des statues", + "2": "Création de collines", + "30": "Dissimulation de trésors", + "31": "Dissimulation de trésors supplémentaires", + "32": "Dissimulation de trésors dans la jungle", + "33": "Dissimulation de trésors dans l'eau", + "34": "Installation de pièges", + "35": "Installation d'objets fragiles", + "36": "Placement de forges d'enfer", + "37": "Répartition de l'herbe", + "38": "Culture de cactus", + "39": "Plantation de tournesols", + "40": "Plantation d'arbres", + "41": "Plantation d'herbes", + "42": "Plantation de mauvaises herbes", + "43": "Culture de lierre", + "44": "Plantation de fleurs", + "45": "Plantation de champignons", + "46": "Libération de ressources inutilisées", + "47": "Réinitialisation des objets du jeu", + "48": "Définition du mode difficile", + "49": "Enregistrement des données du monde :", + "4": "Placement de rochers dans la terre", + "50": "Sauvegarde du fichier du monde", + "51": "Chargement des données du monde :", + "52": "Vérification de l'alignement des tuiles :", + "53": "Échec du chargement !", + "54": "Aucune sauvegarde trouvée.", + "55": "Recherche des cadres de tuiles :", + "56": "Ajout de neige", + "57": "Monde", + "58": "Création du donjon", + "59": "Une météorite a atterri !", + "5": "Placement de terre dans les rochers", + "60": "Lissage du monde", + "61": "Dépôt de mousse", + "62": "Dépôt de pierres précieuses", + "63": "Fabrication de murs de grottes", + "64": "Création de grottes d'araignées", + "65": "Suppression des données de la carte :", + "66": "Sauvegarde des données de la carte :", + "67": "Chargement des données de la carte :", + "68": "Dessin de la carte :", + "69": "Création de cascades", + "6": "Ajout d'argile", + "70": "Création de ruines de la jungle", + "71": "Création de nids de frelons", + "72": "Ajout de sang dans le monde", + "73": "Validation de la sauvegarde du monde :", + "74": "De la gelée tombe du ciel !", + "75": "La gelée a arrêté de tomber du ciel !", + "77": "Ajout d'herbe", + "78": "Désertification", + "7": "Création de trous aléatoires", + "80": "Sculpture de marbre", + "81": "Création de granite", + "8": "Génération de petites grottes", + "9": "Génération de grandes grottes" + }, + "LegacyDialog": { + "1": "Rassure-moi, on ne doit pas compter que sur toi pour nous protéger de l'œil de Cthulhu ?", + "10": "Jette un œil à mes blocs de terre, ils ont un supplément de terre.", + "100": "Pourquoi purifier le monde quand tu peux simplement le faire sauter ?", + "101": "Si tu jettes ça dans une baignoire et que tu fermes toutes les fenêtres, ça te débouchera les sinus et les oreilles !", + "102": "Tu veux jouer à Explosion ou vérité ?", + "103": "Hé, tu veux bien signer cette Exemption de chagrin ?", + "104": "INTERDICTION DE FUMER ICI !", + "105": "Les explosifs, c'est de la bombe. Achètes-en !", + "106": "C'est un beau jour pour mourir !", + "107": "Je me demande ce qui se passerait si... (BOUM !)... Oh, pardon, tu te servais de cette jambe ?", + "108": "Dynamite, mon remède spécial pour toutes les douleurs.", + "109": "Jette un œil à ma marchandise, tout est à prix explosif !", + "11": "Ouah, le soleil tape ! J'ai quelques armures qui sont bien aérées.", + "110": "J'ai le vague souvenir d'avoir ligoté une femme avant de la jeter au donjon.", + "111": "... Nous avons un problème ! C'est une lune de sang !", + "112": "C'est que si j'étais plus jeune, j'inviterais {Nurse} à sortir. J'étais un Casanova dans le temps.", + "113": "Ton chapeau rouge me dit quelque chose...", + "114": "Merci encore de m'avoir libéré de ma malédiction. C'est comme si quelque chose m'avait sauté dessus et mordu.", + "115": "Maman disait toujours que je ferais un grand tailleur.", + "116": "La vie, c'est comme une boîte de vêtements ; on ne sait jamais ce qu'on va porter !", + "117": "Absolument, la broderie, c'est difficile ! Si ça ne l'était pas, personne ne broderait ! C'est pour ça que c'est génial.", + "118": "Je sais absolument tout sur l'industrie du vêtement.", + "119": "J'étais si seul à cause de ce sort, alors, je me suis lié d'amitié avec bout de cuir. Je l'ai appelé Wilson.", + "12": "Le soleil est haut dans le ciel, mais mes prix sont bas.", + "120": "Merci de m'avoir libéré. Les autres gobelins m'ont ligoté et laissé ici. Disons qu'on ne s'entendait pas très bien.", + "121": "Je n'arrive pas à croire qu'ils m'aient ligoté et laissé ici juste parce que je leur ai dit qu'ils n'allaient pas vers l'est !", + "122": "Maintenant, je suis un paria, est-ce que je peux jeter les boules à pointes ? Mes poches me font mal.", + "123": "Tu cherches un expert en gadgets ? Je suis ton gobelin !", + "124": "Merci de m'avoir aidé. Je dois maintenant finir d'errer sans but ici. Je suis sûr que nous nous reverrons.", + "125": "Tu es de plus petite taille que je ne croyais.", + "126": "Hé... Qu'est-ce que {Mechanic} prépare ? Lui... Lui as-tu parlé ?", + "127": "Hé, est-ce que ton chapeau a besoin d'un moteur ? Je crois avoir un moteur qui rentrerait exactement dans ce chapeau.", + "128": "Hé, il paraît que tu aimes les fusées et les bottes de course, alors j'ai mis des fusées dans tes bottes.", + "129": "Le silence est d'or. Le ruban adhésif est d'argent.", + "13": "Oh, super. J'entends {Mechanic} et {Nurse} se disputer d'ici.", + "130": "BIEN SÛR que l'or est plus fort que le fer. Qu'enseigne-t-on aux humains de nos jours ?", + "131": "Cette association de casque de mineur et de palmes était une meilleure idée en théorie qu'en pratique.", + "132": "C'est vraiment facile de mettre les gobelins en colère. D'ailleurs, ils devraient commencer une guerre de chiffons !", + "133": "À vrai dire, la plupart des gobelins ne sont pas des lumières. Enfin, certains le sont.", + "134": "Sais-tu pourquoi nous transportons ces boules à pointes ? Tu pourrais m'éclairer.", + "135": "Je viens de terminer ma dernière création ! Cette version n'explose pas d'un coup si on souffle trop fort dessus.", + "136": "Les voleurs gobelins ne font pas du très bon travail. Ils n'arrivent même pas à dérober un coffre qui n'est pas verrouillé !", + "137": "Merci de m'avoir sauvé ! Cette servitude commençait à m'irriter.", + "138": "Oh, tu m'as sauvé la vie !", + "139": "Quel héroïsme ! Merci de m'avoir sauvé, jeune fille !", + "14": "As-tu vu Chith... Shith... Chat... Le gros œil ?", + "140": "Quel héroïsme ! Merci de m'avoir sauvé, jeune homme !", + "141": "Maintenant que nous nous connaissons, je peux emménager chez toi, n'est-ce pas ?", + "142": "Bien le bonjour, {Guide} ! Que puis-je faire pour toi aujourd'hui ?", + "143": "Bien le bonjour, {Demolitionist} ! Que puis-je faire pour toi aujourd'hui ?", + "144": "Bien le bonjour, {GoblinTinkerer} ! Que puis-je faire pour toi aujourd'hui ?", + "145": "Bien le bonjour,Bonjour à toi, {Nurse} ! Que puis-je faire pour toi aujourd'hui ?", + "146": "Bien le bonjour, {Mechanic} ! Que puis-je faire pour toi aujourd'hui ?", + "147": "Bien le bonjour, {Dryad} ! Que puis-je faire pour toi aujourd'hui ?", + "148": "Veux-tu que je trouve une pièce derrière ton oreille ? Non ? D'accord.", + "149": "Veux-tu des bonbons magiques ? Non ? D'accord.", + "15": "Hé, cette maison est sûre, n'est-ce pas ? N'est-ce pas ? {PlayerName} ?", + "150": "Je vais préparer un chocolat chaud envoûtant si ça t'intére... Non ? D'accord.", + "151": "Es-tu ici pour voir ma boule de cristal ?", + "152": "N'as-tu jamais désiré un anneau magique qui transformerait les rochers en gelées ? Moi non plus.", + "153": "Un jour, quelqu'un m'a dit que l'amitié était magique. C'est ridicule. L'amitié ne transforme pas les gens en grenouilles.", + "154": "Je vois ton futur à présent... Tu m'achèteras beaucoup d'objets !", + "155": "Un jour, j'ai essayé de donner vie à une statue d'ange. Ça n'a rien fait.", + "156": "Merci ! C'était juste une question de temps avant que je finisse comme les squelettes qui se trouvent ici.", + "157": "Hé, regarde où tu mets les pieds ! Il n'y a pas si longtemps que j'étais là-bas !", + "158": "Attends, j'ai presque fini avec le Wi-Fi en bas.", + "159": "Mais j'avais presque fini avec les lumières clignotantes ici !", + "16": "Pas même une lune de sang peut arrêter le capitalisme. Faisons quelques affaires.", + "160": "NE BOUGE PAS. J'AI PERDU MA LENTILLE DE CONTACT.", + "161": "Je veux juste que l'interrupteur.... Quoi ?!", + "162": "Oh, laisse-moi deviner. Tu n'as pas acheté assez de câbles. Imbécile.", + "163": "Euh... Peux-tu juste... S'il te plaît ? D'accord ? D'accord. Argh.", + "164": "Je n'aime pas comme tu me regardes. Je TRAVAILLE.", + "165": "Hé, {PlayerName}, tu reviens de chez {GoblinTinkerer}, non ? Il t'a parlé de moi ?", + "166": "{ArmsDealer} ne fait que parler d'appuyer sur ma plaque de pression. Je lui ai dit que c'était pour marcher dessus.", + "167": "Achète toujours du câble en plus !", + "168": "As-tu vérifié que tes appareils étaient branchés ?", + "169": "Oh, tu sais ce qu'il faut à cette maison ? Plus de lumières clignotantes.", + "170": "On sait que c'est une lune de sang quand le ciel devient rouge. Et les monstres pullulent.", + "171": "Hé, sais-tu où je peux trouver des herbes de la mort ? Je me demandais, c'est tout.", + "172": "Si tu regardais le ciel, tu verrais que la lune est rouge.", + "173": "Évite de sortir de nuit. C'est très dangereux de se promener la nuit.", + "174": "Bonjour, {PlayerName}. En quoi puis-je t'être utile ?", + "175": "Je suis ici pour te conseiller. Tu peux venir me parler quand une situation te pose problème.", + "176": "On dit qu'il existe une personne qui te dira comment survivre sur cette île... Oh, attends un peu. C'est moi.", + "177": "Utilise ta pioche pour creuser dans la terre et ta hache pour couper les arbres. Place ton curseur sur une tuile et clique !", + "178": "Si tu veux survivre, tu devras créer des armes et des abris. Commence par couper des arbres et récolter du bois.", + "179": "Appuie sur {InventoryKey} pour accéder au menu d'artisanat. Lorsque tu as suffisamment de bois, crée un établi. Tu pourras ainsi fabriquer des objets plus compliqués tant que tu seras à côté de celui-ci.", + "18": "Kosh, kapleck Mog. Oh, pardon, c'était « Achète quelque chose ou meure » en klingon.", + "180": "Construis un abri en plaçant du bois ou d'autres blocs dans le monde. N'oublie pas de créer et de placer des murs.", + "181": "Une fois que tu possèdes une épée en bois, essaie d'obtenir du gel de gelées. Combine le bois et le gel pour créer une torche !", + "182": "Interagis avec les arrière-plans grâce à ton marteau !", + "183": "Va creuser un peu pour trouver des minerais. Ils te permettront de fabriquer des objets très utiles.", + "184": "Maintenant que tu as du minerai, fais-en un lingot à utiliser pour créer des objets. Il te faudra un four !", + "185": "Fabrique un four avec des torches, du bois et de la pierre. Tu dois être à côté d'un établi.", + "186": "Une enclume te permettra de fabriquer la plupart des objets à partir de lingots de métal.", + "188": "Le souterrain contient des cœurs de cristal qui servent à augmenter ton niveau de santé maximal. Tu peux les briser d'un coup de pioche.", + "19": "{PlayerName}, c'est bien cela ? J'ai entendu de bonnes choses à ton sujet !", + "191": "Il existe différentes façons d'attirer des individus pour qu'ils s'installent dans ton village. Bien entendu, ils auront besoin de vivre dans une maison.", + "192": "Pour qu'une pièce soit considérée comme une maison, il lui faut une porte, une chaise, une table et une source de lumière. Il faut également qu'il y ait des murs.", + "193": "Deux personnes ne peuvent pas vivre dans la même maison. De surcroît, si leur maison est détruite, ils chercheront un nouvel endroit où vivre.", + "194": "Attribue et affiche les maisons dans l'interface de logements. Ouvre ton inventaire et clique sur l'icône de la maison.", + "195": "Si tu souhaites qu'un marchand emménage, tu dois récolter beaucoup d'argent. 50 pièces d'argent devraient faire l'affaire !", + "196": "Pour qu'une infirmière emménage, tu dois augmenter ton niveau de santé maximal.", + "197": "Si tu as une arme à feu, un marchand d'armes pourrait bien apparaître pour te vendre des munitions !", + "198": "Tu devras faire tes preuves en éliminant un monstre puissant. Ça attirera l'attention de la dryade.", + "199": "Explore bien tous les recoins du donjon. Tu pourrais y trouver des prisonniers.", + "2": "Regarde un peu l'armure que tu portes, comment peut-elle te protéger ? Tu ferais mieux d'acheter plus de potions de soin.", + "20": "On dit qu'il existe un trésor secret... Oh, peu importe.", + "200": "Peut-être que le vieil homme près du donjon aimerait se joindre à nous maintenant que sa malédiction est levée ?", + "201": "Garde toutes les bombes que tu trouves. Elles pourraient intéresser un démolisseur.", + "202": "Les gobelins sont-ils si différents que nous ne pouvons pas tous vivre en paix ?", + "203": "On dit qu'un grand magicien vit dans cette région. Essaie de le trouver la prochaine fois que tu seras dans les souterrains.", + "204": "Si tu combines des lentilles à un autel démoniaque, tu pourrais trouver le moyen d'invoquer un monstre puissant. Mais attends que la nuit tombe avant de l'utiliser.", + "205": "Crée des appâts à ver avec des morceaux avariés et de la poudre infecte. Va dans une zone corrompue avant de l'utiliser.", + "206": "Les autels démoniaques se trouvent généralement dans la corruption. Place-toi à côté de ceux-ci pour fabriquer certains objets.", + "208": "Si tu vois une jarre, brise-la. Elles contiennent toutes sortes d'objets utiles.", + "209": "Il y a des trésors cachés partout dans le monde. Tu trouveras des objets incroyables au fond des souterrains !", + "21": "Une statue d'ange, dis-tu ? Désolé, je ne vends pas de camelote.", + "210": "Lorsqu'un orbe de l'ombre est brisé, il arrive qu'une météorite tombe du ciel. Les orbes d'ombre se trouvent généralement dans les gouffres des zones corrompues.", + "211": "Tu devrais te concentrer sur la collecte de cristaux de vie afin d'augmenter ton niveau de santé maximal.", + "212": "Ton présent équipement ne suffira simplement pas. Tu dois fabriquer une armure plus solide.", + "213": "Je pense que l'heure de ton premier combat est venue. Récupère des lentilles auprès des yeux la nuit et apporte-les à un autel démoniaque.", + "214": "Tu devrais augmenter ton niveau de santé avant d'affronter la prochaine épreuve. Quinze cœurs devraient suffire.", + "215": "La pierre d'ébène de la corruption peut être purifiée avec une poudre fournie par une dryade, ou bien détruite avec des explosifs.", + "216": "Tu devrais ensuite explorer les gouffres corrompus. Trouve et détruis tout orbe de l'ombre sur ta route.", + "217": "Il existe un vieux donjon pas très loin. C'est le bon moment d'aller y jeter un œil.", + "218": "Tu devrais d'abord recharger ta santé. Essaie de récupérer vingt cœurs.", + "219": "Il existe de nombreux trésors à découvrir dans la jungle si tu veux bien creuser.", + "22": "Le dernier type qui était ici m'a laissé de la camelote... euh... des trésors !", + "220": "L'enfer est couvert d'un matériau nommé la pierre infernale. C'est parfait pour fabriquer des armes et des armures.", + "221": "Lorsque tu voudras affronter le gardien de l'enfer, tu devras faire un sacrifice. Tout ce dont tu auras besoin pour ceci se trouve en enfer.", + "222": "Assure-toi de briser tous les autels démoniaques sur ta route. Quelque chose de positif devrait se produire !", + "223": "Il est parfois possible de récupérer les âmes de créatures déchues dans des endroits où il y a une lumière intense ou une obscurité complète.", + "224": "Ho, ho, ho, et une bouteille de... lait de poule !", + "225": "Je voudrais bien des biscuits avec ça ?", + "226": "Quoi ? Tu croyais que je n'existais pas ?", + "227": "J'ai réussi à recoudre ton visage. Fais plus attention la prochaine fois.", + "228": "Ça va sûrement laisser une cicatrice.", + "229": "C'est mieux. Je ne veux plus te voir sauter du haut des falaises.", + "23": "Je me demande si la lune est un gros fromage... Euh, quoi ? Ah, oui, achète quelque chose !", + "230": "Ça n'a pas fait trop mal, si ?", + "231": "Comme si vivre sous terre ne suffisait pas, des imbéciles comme toi viennent prendre mes enfants pendant que je dors.", + "232": "Entre toi et moi, {Dryad} est la seule personne en qui j'ai confiance. C'est la seule dans le coin qui n'ait pas essayé de me manger ou de me mettre dans une potion.", + "233": "J'ai essayé de me lécher l'autre jour pour voir ce qui se passerait ; tout a commencé à briller d'une lueur bleue.", + "234": "Chaque fois que je vois du bleu, je me sens déprimé et je n'ai envie de rien.", + "235": "As-tu vu des cochons par ici à tout hasard ? Mon frère a perdu sa jambe à cause d'un cochon.", + "236": "Personne dans le village ne se sent dans son assiette. La nuit dernière, j'ai trouvé le tailleur en train de me manger le pied en me réveillant.", + "237": "Je te ferai une réduction sur vos vêtements si tu arrives à convaincre {Truffle} de venir... prendre ses mesures.", + "238": "J'ai l'impression que personne ne comprend vraiment {Truffle}, il est vraiment marrant.", + "24": "As-tu dit « or » ? Je prends ça, merci.", + "240": "Je ne sais pas ce qu'est une « trufferie », alors arrête de me le demander !", + "241": "Une rumeur énorme circule à mon sujet : « Si on ne peut pas le battre, il faut le manger ! »", + "242": "Oy, qu'est-ce que t'as dans ton bidule ?", + "243": "Devrais-je me lancer dans la piraterie de l'air ? J'ai réfléchi au fait de devenir pirate de l'air.", + "244": "Pense ce que tu veux, mais un jetpack t'irait bien !", + "245": "Je me sens irritable ces temps-ci, alors, ça suffit avec tes palabres, polisson !", + "246": "Ce type, {Cyborg} pique drôlement ma curiosité. Avec quel moyen de consommation maintient-il une telle locomotion ?", + "247": "Ce capitaine me semble « avoir perdu le Nord » si tu vois ce que je veux dire !", + "248": "Montre-moi de l'équipement !", + "249": "J'aime bien ta... pièce d'équipement. On le trouve en laiton ?", + "25": "J'espère que tu ne m'as pas tachée de sang.", + "250": "Une fois que tu entres sur le territoire sacré, tu verras un arc-en-ciel. Je peux t'aider à peindre si tu veux.", + "251": "Regarde {PartyGirl}. Ça, c'est une fille qui peut peindre le village en rouge !", + "252": "Je connais la différence entre turquoise et bleu vert. Mais je ne te dirai pas ce que c'est.", + "253": "Je n'ai plus de blanc titane, alors, ne viens pas m'en demander.", + "254": "Essaie rose et violet tourbillonnant, ça marche, je te le jure !", + "255": "Non, non, non... Il y a des TONNES de gris ! Ne me lance pas là-dessus...", + "256": "J'espère qu'il ne va pas se remettre à pleuvoir avant que cette peinture soit sèche. Ce serait une catastrophe !", + "257": "Je te donne les couleurs les plus riches en échange de tes richesses !", + "258": "Pauvre de moi, ce que tu portes est bien trop terne. Tu dois absolument apprendre à colorer ta tenue si monotone !", + "259": "Il n'y a qu'un seul type de bois que j'aimerais teindre, un RICHE acajou. Teindre tout autre bois est une perte de temps.", + "26": "Dépêche-toi et arrête de saigner.", + "260": "Tu dois faire quelque chose au sujet de {Pirate}. Chaque fois qu'il vient, il me faut une semaine pour me débarrasser de son odeur !", + "261": "Qui suis-je ? Je suis le marabout.", + "262": "Le cœur de la magie est la nature. La nature du cœur est la magie.", + "263": "{Nurse} peut t'aider à soigner ton corps, mais je peux t'aider à comprendre la guérison.", + "264": "Choisis bien, {PlayerName}, mes marchandises sont volatiles et mon art obscur, mystérieux.", + "265": "Nous devons parler. C'est... au sujet des fêtes.", + "266": "Je n'arrive pas à savoir si je préfère les fêtes ou les after.", + "267": "Nous devrions organiser une fête de clignotherbe, et un after aussi.", + "268": "Ouah, {PlayerName}, rencontrer quelqu'un comme toi me donne envie de faire la fête !", + "269": "Branche la boule à facettes pour que je te montre comment on fait la fête !", + "27": "Si tu veux mourir, va dehors, s'il te plaît.", + "270": "Je suis allée en Suède, ils font beaucoup la fête là-bas. Pourquoi pas toi ?", + "271": "Je m'appelle {PartyGirl}, mais on me surnomme trouble-fête. Je ne sais pas pourquoi, mais c'est un nom cool.", + "272": "Tu aimes faire la fête ? Parfois ? Bon, d'accord, nous pouvons parler…", + "273": "Je ne suis pas un marin d'eau douce, mais mieux vaut avoir navigué en eau douce que pas du tout.", + "274": "Ho, ho, ho, et une bouteille de... clignotherbes !", + "275": "ARR ! C'est marrant qu'on cause de perroquets, parce que... euh... On causait de quoi déjà ?", + "276": "{PlayerName}, t'es une des plus jolies filles que le cap'taine ait vues en quinze jours !", + "277": "Lâche-moi le grappin, coquin !", + "278": "De quoi causes-tu ? Moby Dick m'appartient !", + "279": "*Yarr Blarr Harrdarr*", + "28": "Et ça veut dire quoi ?", + "280": "Puis l'unité 492-8 dit : « Pour qui me prends-tu, Unité 472-6 » ? HA. HA. HA.", + "281": "L'efficacité de mon expédition a été largement réduite lorsqu'un projectile est entré en collision avec le mécanisme de ma locomotive.", + "282": "Cette phrase est incorrecte, non ?", + "283": "Comme ça, cette fille punk est une inventrice, hein ? Je pense que je pourrai lui montrer quelques trucs !", + "284": "Oui, {Pirate} et moi sommes amis, mais je n'aime pas que son perroquet fasse ses besoins sur moi. C'est vraiment corrosif !", + "285": "Je me suis construit un mécanisme de goût, alors je peux boire de la bière !", + "286": "Parfois, j'ai le débit un peu... Tu saisis ? Le débit ?", + "287": "Bien court derrière et sur les côtés, c'est ça ?", + "288": "Ces mèches font vraiment ressortir tes yeux !", + "289": "J'ai les mains qui collent avec tout cette... cire.", + "29": "Je n'aime pas beaucoup ce ton.", + "290": "Thé ? Café ? Ou un jus d'orange comme d'habitude ?", + "291": "Il faut vraiment faire quelque chose pour ses pointes fourchues.", + "292": "Meuf ! T'es ma commère préférée.", + "293": "Quel après-rasage voulez-vous aujourd'hui, monsieur ?", + "294": "Assieds-toi que je te fasse une coupe branchée.", + "295": "Soit on a la classe, soit on l'obtient.", + "296": "Pour toi, je pense qu'on va faire quelque chose... de simple.", + "297": "Un jour, j'ai essayé les produits du teinturier. Les pointes ont brûlé. Un désastre.", + "298": "Oh, pauvre chou. Assieds-toi et attends un instant. Tout ira bien. Chut.", + "299": "Regarde-moi un peu.", + "3": "J'ai l'impression qu'une présence du mal m'observe.", + "30": "Pourquoi es-tu ici ? Si tu ne saignes pas, tu n'as pas besoin d'être ici. Va-t'en !", + "300": "Bonjour, monsieur, je suis {Stylist} et je serai votre coiffeuse aujourd'hui.", + "301": "On coupe un petit peu seulement sur le dessus ? Rien d'intéressant...", + "302": "J'espère que tu aimes ce que j'ai fait à {PartyGirl} !", + "303": "Je ne peux rien faire pour {Demolitionist} et ses cheveux roussis ! C'est peine perdue.", + "304": "Les pourboires ne sont pas obligatoires, mais n'oublie pas que j'ai des ciseaux en main.", + "305": "C'est un rasoir coupe-gorge au fait.", + "306": "Lachez-moi un peu ce soir. Je viens d'aiguiser mes ciseaux, et je cherche une excuse pour les utiliser !", + "307": "Umm, {PartyGirl} m'a dit que l'amie de {Mechanic}, {Nurse}, a dépensé le dernier salaire de son copain en chaussures.", + "308": "Un jour, j'ai mis une perruque à {Cyborg} pour pouvoir lui couper les cheveux. Je crois que ça lui a plu !", + "309": "J'ai essayé d'aller voir {Stylist} une fois. Elle m'a regardé et a juste dit : « Non ».", + "31": "QUOI ??", + "310": "Je pense qu'il est temps que j'aille chez le coiffeur !", + "311": "As-tu essayé de te brosser les cheveux aujourd'hui ?", + "312": "Une coupe courte alors, on garde les petites pattes ?", + "313": "Je peux épiler les oreilles et les sourcils, mais pas les narines !", + "314": "Bien, assieds-toi et patiente un petit peu. Je reviens dans 25 minutes pour rincer la couleur…", + "315": "Merci ! Je peux enfin me coiffer.", + "316": "Je t'aurais offert la coupe si tu étais venu-e plus tôt.", + "317": "Ne prends pas des ciseaux pour partir explorer, qu'il disait. Tu ne seras pas coincée dans une toile d'araignée, qu'il disait !", + "318": "Berk, mes cheveux... Ils sont couverts de toile d'araignée !", + "319": "Rejoins-moi derrière chez {Guide} dans environ trois heures, je pense avoir quelque chose qui te plaira beaucoup.", + "32": "As-tu vu le vieil homme qui erre près du donjon ? Il a l'air soucieux.", + "320": "Ce marchand, {Merchant}, il ne sait vraiment pas reconnaître une bonne affaire.", + "321": "Je ne vends que ce que je peux obtenir. {Clothier} n'arrête pas de me harceler pour que je lui vende des vêtements exotiques.", + "322": "Hmm, on dirait qu'une statue d'ange te serait utile ! Elles coupent, découpent et arrangent tout avec finesse !", + "323": "Je ne rembourse pas pour cause de « regret de l'acheteur... » ni pour aucune autre raison, d'ailleurs.", + "324": "Achète maintenant, et la livraison est offerte !", + "325": "Je vends des marchandises d'endroits qui n'existent peut-être même pas !", + "326": "Tu en veux deux sous ? Je prends pour un sou.", + "327": "Un narguilé qui fait aussi le café ! Et des frites !", + "328": "Viens y jeter un œil ! Un poisson d'un kilo ! Très, très bon ! Un poisson d'un kilo !", + "329": "Si tu cherches de la camelote, tu ne trouveras rien ici.", + "33": "Si seulement {Demolitionist} faisait plus attention. Je commence à en voir assez de lui recoudre des membres tous les jours.", + "330": "Une boutique d'occasions ? Non, je ne vends que des objets de qualité supérieure sur le marché.", + "331": "Lorsqu'un cœur carmin est brisé, il arrive qu'une météorite tombe du ciel. Les cœurs carmin se trouvent généralement dans les gouffres des zones carmin.", + "332": "As-tu essayé la poudre de purification sur la pierre carmin ?", + "333": "Tu dois nettoyer le monde et te débarrasser de ce carmin.", + "334": "Psst ! J'ai peut-être une mission qui t'intéressera. Tu ne peux pas refuser !", + "335": "Je veux un poisson et tu vas m'en trouver un ! Demande-moi les détails !", + "336": "Hé ! C'est exactement le sacrifi... Enfin, le pro de la pêche que je cherchais !", + "337": "{Angler} TE demande personnellement d'effectuer ses missions dans {WorldName} !", + "338": "Quoiiiiiiiii ?! Ne vois-tu pas que je suis en train de pêcher ?", + "339": "J'ai assez de poisson ! Je n'ai pas besoin de toi pour le moment !", + "34": "Hé, est-ce que {ArmsDealer} a parlé d'aller chez le médecin par hasard ? Je me demandais, c'est tout.", + "340": "Il n'y a pas de chef cuisinier dans {WorldName}, alors je dois faire cuire le poisson moi-même ! ", + "341": "Hé ! Attention ! J'installe des pièges pour ma plus grosse farce de tous les temps ! Personne ne va la voir venir ! Ne dis rien !", + "342": "Laisse un gamin te donner un conseil : ne mets pas ta langue sur un bloc de glace ! Oublie ce que je viens de dire, je veux te voir le faire !", + "343": "As-tu déjà entendu parler d'un poisson qui aboie ? Pas moi, je voulais juste savoir !", + "344": "{WorldName} est rempli des poissons les plus bizarres !", + "345": "Je suis déprimé ! Il y a sûrement des poissons qui ont disparu avant ma naissance : ce n'est pas juste !", + "346": "Je n'ai ni maman ni papa, mais j'ai plein de poissons ! C'est presque pareil !", + "347": "Tu aurais dû voir la tête qu'a fait {Dryad} quand j'ai enfoncé cette dent de piranha dans la chaise !", + "348": "J'ai une requête pour toi ! Peu m'importe l'apocalypse zombie !", + "349": "Vite, écoute-moi ! J'ai besoin que tu me pêches quelque chose !", + "35": "Je dois vraiment parler à {Guide}. Combien de fois peut-on venir avec des brûlures de lave en une semaine ?", + "350": "Je déteste les lunes de sang ! Tous ces bruits effrayants m'empêchent de dormir !", + "351": "Il n'y a pas pire moment que la lune de sang pour pêcher ! Les poissons mordent, ça, oui, mais les zombies aussi !", + "352": "Il y a un florilège de monstres dehors, là, maintenant !", + "353": "Merci... de m'avoir sauvé, et tout. Tu ferais un bon bras droit !", + "354": "Quoi ? Qui es-tu donc ? Je n'étais pas en train de couler ou quoi !", + "355": "Tu m'as sauvé la vie ! Tu as bon cœur, je pourrais t'utiliser... Je veux dire, t'embaucher pour faire des trucs cool pour moi !", + "356": "As-tu des os à vendre ? Je voudrais remplacer ma hanche cassée... encore une fois.", + "357": "Excellent ! Quelqu'un est enfin venu m'enlever quelques vers des mains.", + "358": "Aucune maladie ni état ne peut résister à mon huile de gelée ! Crois-moi, cela fonctionne. Regarde-moi !", + "359": "Tu as du courage pour venir jusqu'ici, achète donc quelque chose !", + "36": "Tout ça te va bien mieux.", + "360": "Tu ne croirais pas tout ce que les gens me jettent... Veux-tu acheter quelque chose ?", + "361": "Je te donnerai bien un coup de main, mais la dernière fois, j'ai attendu un mois avant de récupérer ma main.", + "362": "Ne t'approche pas des araignées. Elles t'aspireront les entrailles jusqu'à ce qu'il ne reste qu'une coquille humaine vide. Crois-moi.", + "363": "Les seuls éléments constants dans ce monde sont la mort et les impôts, j'ai les deux !", + "364": "Encore toi ! J'imagine que tu veux plus d'argent !", + "365": "Est-ce que tout le monde doit vraiment ouvrir et fermer les portes en faisant tant de bruit ?", + "366": "Je vois que tu passes le temps, comme d'habitude. Je ne peux pas imaginer la vie professionnelle des personnes de ton genre.", + "367": "Oui, oui, oui ! Je vais te donner ta part dans un instant. J'aurai cru que tu aurais plus de patience, surtout que j'ai fait tout le travail.", + "368": "Que faut-il faire pour être en paix ici ? Va ennuyer quelqu'un d'autre qui a moins à faire !", + "369": "... deux tonneaux de molasse, et... Oh, peu importe, tu es ici. Voici ton argent.", + "37": "Berk... Que t'est-il arrivé au visage ?", + "370": "Entre toi et moi.... Je ne sais pas pourquoi ils s'obstinent à payer le loyer.", + "371": "J'ai essayé une fois de laisser {Dryad} me payer avec ses services, maintenant, des champignons poussent dans les endroits les plus étranges.", + "372": "Va dire à {ArmsDealer} d'arrêter d'essayer de me payer en munitions, je n'ai même pas d'armes.", + "373": "Essaie donc d'aller voir {Demolitionist} pour collecter de l'argent sans perdre un membre.", + "374": "Je reviens juste de chez {Merchant}. Il voulait savoir si j'acceptais les cartes bancaires.", + "38": "BONTÉ DIVINE ! Je suis douée, mais pas à ce point-là !", + "380": "Voici ta part des impôts que j'ai obtenus auprès de notre excédent de population !", + "381": "Te revoilà, encore en train de prendre tout mon argent ! Prends-le et disparais !", + "382": "Bah ! Tiens, prends tes sous et disparais !", + "383": "C'est tout ce que tu auras pour l'instant, pas un sou de plus ! Prends-le et dépense-le intelligemment.", + "39": "Chers amis, nous sommes réunis ici aujourd'hui pour dire au revoir... Oh, tout ira bien.", + "390": ".... Et on dit que je suis avare ? Non, je n'ai plus rien pour toi.", + "391": "Oh, alors, tu me vois juste comme un distributeur d'argent, hein ? Parce qu'à chaque fois qu'on se voit, tu m'en demandes.", + "392": "Ne t'arrêtes-tu jamais juste pour dire bonjour ?", + "393": "Bah ! Encore toi ? Tu viens juste de me prendre de l'argent, alors dégage et reviens plus tard !", + "394": "Je viens de te donner une demi-couronne, il n'y a pas cinq minutes ! Du balai !", + "395": "Tu essaies encore de prendre des sous... déjà ? Et tu dis que JE suis avare.", + "396": "Tu viens de recevoir ton argent, et tu n'auras pas un sou de plus ! Va-t'en !", + "397": "L'argent ne tombe pas du ciel, alors, n'en abuse pas ! Bah ! ", + "398": "Tu as déjà dépensé tout ce que je t'ai donné ? Je ne suis pas une œuvre caritative, va tuer une gelée !", + "399": "Pas si vite ! Tu as ton argent, alors, ouste ! ", + "4": "L'épée coupe le papier ! Achètes-en une dès aujourd'hui.", + "40": "Tu as oublié ton bras là-bas. Je vais te le chercher...", + "400": "Tu mendies déjà ? Ne me regarde pas comme si j'allais changer d'avis du jour au lendemain ! ", + "401": "Brise tous les autels carmin sur ta route. Quelque chose de positif devrait se produire !", + "402": "Les autels carmin se trouvent généralement dans les zones carmin. Place-toi à côté de ceux-ci pour fabriquer certains objets.", + "41": "Arrête de te plaindre ! J'ai vu pire.", + "42": "Il va falloir recoudre !", + "43": "Encore des soucis avec des brutes ?", + "44": "Attends, j'ai des pansements avec des personnages de cartoons par ici.", + "45": "Va te promener, {PlayerName}, et ça ira mieux. Chut.", + "46": "Ça te fait mal quand tu fais ça ? Ne fais pas ça.", + "47": "Tu as l'air à moitié digéré-e. Reviens-tu encore d'une chasse aux gelées ?", + "48": "Tourne la tête et tousse.", + "49": "Ce n'est pas la plus grosse que j'aie vue... Oui, j'ai vu de plus grosses blessures.", + "5": "Veux-tu des pommes ? Des carottes ? Des ananas ? Nous avons des torches.", + "50": "Tu veux une sucette ?", + "51": "Montre-moi où tu as mal.", + "52": "Désolée, mais tu n'as pas assez d'argent pour mes services.", + "53": "Il va me falloir plus d'or que ça.", + "54": "Je ne travaille pas gratuitement, tu sais.", + "55": "Je ne peux pas faire plus.", + "56": "Je ne peux rien faire sans chirurgie plastique.", + "57": "Arrête de me faire perdre mon temps.", + "58": "Il paraît qu'il existe une poupée qui ressemble à {Guide} quelque part en enfer. J'aimerais lui trouer la peau.", + "59": "Fais vite ! J'ai rendez-vous avec {Nurse} dans une heure.", + "6": "Beau matin, n'est-ce pas ? As-tu besoin de quelque chose ?", + "60": "Je veux ce que vend {Nurse}. Comment ça « elle ne vend rien » ?", + "61": "{Dryad} est une beauté. Dommage qu'elle soit si prude.", + "62": "Ne t'embête pas avec {Demolitionist}, j'ai tout ce qu'il vous te faut ici.", + "63": "Qu'est-ce qui ne va pas avec {Demolitionist} ? Ne réalise-t-il pas que nous vendons des marchandises complètement différentes ?", + "64": "C'est vraiment une bonne nuit pour parler à quelqu'un, ne penses-tu pas, {PlayerName} ?", + "65": "J'adore les nuits comme celles-ci. On ne manque jamais de cibles à éliminer !", + "66": "Je vois que tu as l'œil sur le minirequin... N'essaie même pas de savoir comment il a été créé.", + "67": "Hé, ce n'est pas un film. Les munitions sont en supplément.", + "68": "Ne touche pas à mon pistolet !", + "69": "As-tu essayé la poudre de purification sur la pierre d'ébène de la corruption ?", + "7": "La nuit va bientôt tomber. Fais ton choix tant qu'il est encore temps.", + "70": "Si seulement {ArmsDealer} arrêtait de me draguer. Ne réalise-t-il pas que j'ai 500 ans ?", + "72": "As-tu vu le vieil homme qui marche autour du donjon ? Il n'a pas l'air d'aller bien...", + "73": "Je vends ce que je veux ! Si ça ne te plaît pas, tant pis.", + "74": "Pourquoi cherches-tu la confrontation dans un moment pareil ?", + "75": "Je ne veux pas que tu achètes mes marchandises. Je veux que tu veuilles les acheter, d'accord ?", + "76": "Hé, c'est moi ou bien il y a genre un million de zombies ce soir ?", + "77": "Tu dois nettoyer le monde et te débarrasser de cette corruption.", + "78": "Fais attention, Terraria a besoin de toi !", + "79": "Le sable du temps s'écoule. Et la vieillesse ne t'embellit pas.", + "8": "Tu ne sais pas combien se vend un bloc de terre outre-mer.", + "80": "Comment ça je parle plus que j'agis ?", + "81": "Donc, deux gobelins entrent dans un bar et l'un dit : « Tu veux un gobelet de bière ?", + "82": "Je ne peux pas te laisser entrer tant que tu n'as pas levé ma malédiction.", + "83": "Reviens cette nuit si tu souhaites entrer.", + "84": "Mon maître ne peut pas être invoqué dans la lumière du jour.", + "85": "Tu es bien trop faible pour me libérer de ma malédiction. Reviens quand tu auras pris des forces.", + "86": "Imbécile pathétique. Tu ne peux pas espérer affronter mon maître ainsi.", + "87": "J'espère que tu as au moins six amis pour t'aider.", + "88": "S'il te plaît, non. Tu ne réussiras qu'à te faire tuer.", + "89": "Tu pourrais bien avoir juste assez de puissance pour me libérer de ma malédiction...", + "9": "Ah, un jour, {PlayerName} fera partie des contes et récits... les bons, sans doute.", + "90": "Possèdes-tu la force pour vaincre mon maître ?", + "91": "Je t'en prie ! Affronte mon ravisseur et libère-moi ! Je t'en supplie !", + "92": "Élimine mon maître et je te laisserai entrer dans le donjon.", + "93": "Essaies-tu de passer le rocher d'ébène ? Pourquoi ne pas tenter avec un de ces explosifs ?", + "94": "Hé, as-tu vu un clown dans le coin ?", + "95": "Il y avait une bombe juste ici, et je n'arrive pas à la retrouver...", + "96": "J'ai un petit cadeau pour ces zombies !", + "97": "Même {ArmsDealer} veut ce que je vends !", + "98": "Préfères-tu un trou de balle ou de grenade ? C'est bien ce que je pensais.", + "99": "{Nurse} t'aidera sûrement si tu perds un membre dans un accident." + }, + "LegacyMenu": { + "0": "Commencez une nouvelle partie de Terraria pour vous connecter !", + "100": "Arrière-plan activé", + "101": "Arrière-plan désactivé", + "102": "Choisir une langue", + "103": "Langue", + "104": "Oui", + "105": "Non", + "106": "Alterner le style de carte ", + "107": "Plein écran ", + "108": "Agrandir ", + "109": "Réduire ", + "10": "Charger la sauvegarde", + "110": "Réduire la transparence ", + "111": "Augmenter la transparence ", + "112": "Carte activée", + "113": "Carte désactivée", + "114": "Général", + "115": "Commandes de carte", + "116": "Éclairage multicolore :", + "117": "Désactivé", + "118": "Fermer le menu", + "11": "Aucune sauvegarde trouvée", + "120": "Curseur intelligent ", + "121": "Mode Curseur intelligent : alterner", + "122": "Mode Curseur intelligent : maintenir", + "123": "Barre de progression d'évènements", + "124": "Désactivé", + "125": "Chronométré", + "126": "Activé", + "127": "Style", + "128": "Avec aperçu du placement", + "129": "Sans aperçu du placement", + "12": "Un joueur", + "130": "Monture ", + "131": "Succès", + "132": "Avec sang et violence", + "133": "Sans sang et violence", + "134": "Appliquer", + "135": "Paramètres du serveur", + "136": "Multijoueur Steam : désactivé", + "137": "Multijoueur Steam : activé", + "138": "Utilisateurs autorisés : invités uniquement", + "139": "Utilisateurs autorisés : amis", + "13": "Multijoueur", + "140": "Amis peuvent inviter : désactivé", + "141": "Amis peuvent inviter : activé", + "142": "Autoriser les amis d'amis : désactivé", + "143": "Autoriser les amis d'amis : activé", + "144": "Démarrer", + "145": "Rejoindre via Steam", + "146": "Rejoindre via IP", + "147": "Inviter des amis", + "148": "Haut", + "149": "Bas", + "14": "Paramètres", + "150": "Gauche", + "151": "Droit", + "152": "Sauter", + "153": "Lancer", + "154": "Inventaire", + "155": "Grappin", + "156": "Mana rapide", + "157": "Amélioration rapide", + "158": "Monture rapide", + "159": "Soin rapide", + "15": "Quitter", + "160": "Sélection auto", + "161": "Curseur intelligent", + "162": "Utiliser l'objet", + "163": "Interagir", + "164": "Commandes de jeu", + "165": "Commandes de carte", + "166": "Commandes barre de raccourcis", + "167": "Paramètres de manette", + "168": "Agrandir", + "169": "Réduire", + "16": "Créer un personnage", + "170": "Augmenter la transparence", + "171": "Réduire la transparence", + "172": "Alterner le style de carte", + "173": "Carte entière", + "174": "Vers la gauche", + "175": "Vers la droite", + "176": "Barre de raccourcis 1", + "177": "Barre de raccourcis 2", + "178": "Barre de raccourcis 3", + "179": "Barre de raccourcis 4", + "17": "Supprimer", + "180": "Barre de raccourcis 5", + "181": "Barre de raccourcis 6", + "182": "Barre de raccourcis 7", + "183": "Barre de raccourcis 8", + "184": "Barre de raccourcis 9", + "185": "Barre de raccourcis 10", + "186": "Marque rapide 1", + "187": "Marque rapide 2", + "188": "Marque rapide 3", + "189": "Marque rapide 4", + "18": "Cheveux", + "190": "Barre de raccourcis circulaire", + "191": "Curseur instantané Haut", + "192": "Curseur instantané Droite", + "193": "Curseur instantané Bas", + "194": "Curseur instantané Gauche", + "195": "", + "196": "Curseur instantané BMD", + "197": "Barre de raccourcis BMD", + "198": "Paramètres avancés de la manette", + "199": "Déclenche une zone morte", + "19": "Yeux", + "1": "Branché sur le port", + "200": "Zone morte du curseur", + "201": "Zone morte du stick gauche X", + "202": "Zone morte du stick gauche Y", + "203": "Zone morte du stick droit X", + "204": "Zone morte du stick droit Y", + "205": "Inverser stick gauche horizontalement", + "206": "Inverser stick gauche verticalement", + "207": "Inverser stick droit horizontalement", + "208": "Inverser stick droit verticalement", + "209": "Utiliser", + "20": "Peau", + "210": "Interface", + "211": "Mots de passe : visibles", + "212": "Mots de passe : masqués", + "213": "Priorité du curseur intelligent : pioche -> hache", + "214": "Priorité du curseur intelligent : hache -> pioche", + "215": "Placement intelligent de blocs : sur le curseur", + "217": "Couleur de bordure", + "218": "Curseur", + "219": "Commandes", + "21": "Habits", + "220": "Activer les bonus d'ensembles : haut", + "221": "Activer les bonus d'ensembles : bas", + "222": "Raccourcis clavier", + "223": "Activé", + "224": "Suppression rapide avec Maj. gauche : désactivée", + "225": "Remplacement rapide de mur : désactivé", + "226": "Remplacement rapide de mur : activé", + "227": "Temps de la barre de raccourcis au menu circulaire : activé", + "228": "Temps de la barre de raccourcis au menu circulaire : désactivé", + "229": "Avec la grille de tuiles", + "22": "Homme", + "230": "Sans la grille de tuiles", + "231": "Verrouillage activé", + "232": "Priorité de verrouillage : cible principale", + "233": "Priorité de verrouillage : cible la plus proche", + "234": "Priorité de verrouillage : cible la plus claire", + "235": "abc/ABC/!@#", + "236": "Retour arrière", + "237": "Envoyer", + "238": "Espace", + "239": "<-", + "23": "Femme", + "240": "->", + "241": "Sans instructions pour manette", + "242": "Avec instructions pour manette", + "243": "Commandes de menu", + "244": "Barre rapide circulaire", + "245": "Fenêtre sans bordure : activée", + "246": "Fenêtre sans bordure : désactivée", + "247": "Passer des images : désactivé", + "248": "Passer des images : activé", + "249": "Passer des images : subtil", + "24": "Difficile", + "250": "Tremblement minier : activé", + "251": "Tremblement minier : désactivé", + "252": "Retard du mouvement d'interface", + "25": "Moyen", + "26": "Facile", + "27": "Aléatoire", + "28": "Créer", + "2": "Déconnecter", + "32": "Sélectionner la difficulté", + "33": "Chemise", + "34": "Maillot", + "35": "Pantalon", + "36": "Chaussures", + "37": "Cheveux", + "38": "Couleur de cheveux", + "39": "Couleur des yeux", + "3": "Le serveur requiert un mot de passe :", + "40": "Couleur de la peau", + "41": "Couleur de la chemise", + "42": "Couleur du maillot", + "43": "Couleur du pantalon", + "44": "Couleur des chaussures", + "45": "Saisissez le nom du personnage :", + "46": "Supprimer", + "47": "Créer un monde", + "48": "Saisissez le nom du monde :", + "49": "Mode fenêtre", + "4": "Accepter", + "50": "Mode plein écran", + "51": "Résolution", + "52": "Parallaxe", + "53": "Passer des images : désactivé", + "54": "Passer des images : activé", + "55": "Éclairage : couleur", + "56": "Éclairage : blanc", + "57": "Éclairage : rétro", + "58": "Éclairage : psychédélique", + "59": "Qualité : auto", + "5": "Retour", + "60": "Qualité : élevée", + "61": "Qualité : moyenne", + "62": "Qualité : basse", + "63": "Vidéo", + "64": "Couleur du curseur", + "65": "Volume", + "66": "Commandes", + "67": "Sauvegarde auto activée", + "68": "Sauvegarde auto désactivée", + "69": "Pause auto activée", + "6": "Annuler", + "70": "Pause auto désactivée", + "71": "Description des objets activée", + "72": "Description des objets désactivée", + "73": "Résolution en plein écran", + "74": "Haut", + "75": "Bas", + "76": "Gauche", + "77": "Droite", + "78": "Sauter", + "79": "Lancer", + "7": "Saisissez le mot de passe du serveur :", + "80": "Inventaire", + "81": "Soin rapide", + "82": "Mana rapide ", + "83": "Bonus rapide", + "84": "Grappin", + "85": "Sélection auto", + "86": "Réinitialiser", + "87": "Rejoindre", + "88": "Héberger et jouer", + "89": "Saisissez l'adresse IP du serveur :", + "8": "Lancement du serveur…", + "90": "Saisissez le port du serveur :", + "91": "Choisissez la taille du monde :", + "92": "Petit", + "93": "Moyen", + "94": "Grand", + "95": "Rouge :", + "96": "Vert :", + "97": "Bleu :", + "98": "Sons :", + "99": "Musique :", + "9": "Échec du chargement !", + "119": "Ambiance :" + }, + "LegacyTooltip": { + "0": "Équipé-e-s dans un emplacement social", + "10": "Vitesse lente", + "11": "Vitesse très lente", + "12": "Vitesse extrêmement lente", + "13": "Vitesse d'escargot", + "14": "Aucun recul", + "15": "Recul extrêmement faible", + "16": "Recul très faible", + "17": "Recul faible", + "18": "Recul moyen", + "19": "Recul fort", + "1": "Aucune stat ne sera obtenue", + "20": "Recul très fort", + "21": "Recul extrêmement fort", + "22": "Recul de folie", + "23": "Peut s'équiper", + "24": "Objet de style", + "25": " de défense", + "26": "% de puissance de pioche", + "27": "% de puissance de hache", + "28": "% de puissance de marteau", + "29": "Restaure", + "2": " de dégâts au corps à corps", + "30": "de santé", + "31": "de mana", + "32": "Utilise", + "33": "Peut se placer", + "34": "Munitions", + "35": "Consommable", + "36": "Matériau", + "37": " minutes", + "38": " secondes", + "39": "% de dégâts", + "3": " de dégâts à distance", + "40": " % de vitesse", + "41": " % de chances de coup critique", + "42": " % de mana", + "43": " % de taille", + "44": " % de rapidité", + "45": " % de recul", + "46": " % de vitesse de déplacement", + "47": " % de vitesse au corps à corps", + "48": "Bonus d'ensemble :", + "49": "Prix de vente :", + "4": " de dégâts magiques", + "50": "Prix d'achat :", + "51": "Sans valeur", + "52": "Consomme", + "53": " de dégâts d'invocation", + "54": " de portée", + "55": " de dégâts", + "56": "Enregistré-e dans les favoris", + "57": "La suppression rapide, l'empilement et la vente seront bloqués", + "58": " de dégâts de lancer", + "59": "Une puissante créature de la jungle lui a jeté un sort", + "5": "% de chances de coup critique", + "6": "Vitesse rapide incroyable", + "7": "Vitesse très rapide", + "8": "Vitesse rapide", + "9": "Vitesse moyenne" + }, + "LegacyMultiplayer": { + "10": "Vous n'appartenez à aucune équipe !", + "11": "{0} a activé le mode JcJ !", + "12": "{0} a désactivé le mode JcJ !", + "13": "{0} n'est plus dans aucune équipe.", + "14": "{0} a rejoint l'équipe rouge.", + "15": "{0} a rejoint l'équipe verte.", + "16": "{0} a rejoint l'équipe bleue.", + "17": "{0} a rejoint l'équipe jaune.", + "18": "Bienvenue dans", + "19": "{0} s'est connecté-e.", + "20": "{0} est parti-e.", + "21": "/joueurs", + "22": "{0} a rejoint l'équipe rose.", + "2": "Opération non valide dans cet état.", + "3": "Vous êtes banni-e de ce serveur.", + "4": "Vous n'utilisez pas la même version que ce serveur.", + "5": "est déjà sur ce serveur.", + "6": "/en train de jouer", + "7": "Joueurs actuels :", + "8": "/lance les dés", + "9": "obtient un", + "0": "Recevez :" + }, + "LegacyMisc": { + "0": "Une armée de gobelins a été vaincue !", + "100": "Choisir le mal du monde", + "101": "Corruption", + "102": "Carmin", + "103": "Aléatoire", + "10": "Un frisson vous parcourt le dos...", + "11": "Vous entendez des cris autour de vous...", + "12": "Votre monde est doté de cobalt !", + "13": "Votre monde est doté de mithril !", + "14": "Votre monde est doté d'adamantite !", + "15": "Les anciens esprits de la lumière et de l'ombre ont été libérés.", + "19": "{0} s'est fait tuer…", + "1": "Une armée de gobelins approche à l'ouest.", + "20": "Une éclipse solaire est en train de se produire !", + "21": "Votre monde est doté de palladium !", + "22": "Votre monde est doté d'orichalque !", + "23": "Votre monde est doté de titane !", + "24": "Les pirates ont été vaincus !", + "25": "Des pirates approchent à l'ouest !", + "26": "Des pirates approchent à l'est !", + "27": "Les pirates sont arrivés !", + "28": "Vous sentez des vibrations dans les profondeurs…", + "29": "Cette nuit ne va pas être une partie de plaisir...", + "2": "Une armée de gobelins approche à l'est !", + "30": "L'air se refroidit autour de vous…", + "31": "La lune citrouille se lève...", + "32": "La jungle s'agite...", + "33": "Des cris résonnent depuis le donjon…", + "34": "La lune de givre se lève…", + "35": "{0} est parti-e !", + "36": "{0} s'en est allé-e !", + "37": "Tout", + "38": "Plaque de pression", + "39": " et augmente la régénération de santé", + "3": "Une armée de gobelins est arrivée !", + "40": "Augmente la régénération de santé", + "41": "Les Martiens nous envahissent !", + "42": "Les Martiens ont été vaincus !", + "43": "Des créatures célestes nous envahissent !", + "44": "Votre esprit s'engourdit…", + "45": "La douleur vous accable…", + "46": "Des voix mystiques vous enveloppent...", + "47": "Le Seigneur de la lune s'est éveillé !", + "48": "Les Jumeaux se sont éveillés !", + "49": "Vous vous réveillez après un rêve étrange…", + "4": "La Légion de givre a été vaincue !", + "50": "ont été vaincu-es !", + "51": "Fragment lunaire", + "52": "L'Apocalypse approche…", + "53": "Sélectionner", + "54": "Prendre", + "55": "Prendre 1", + "56": "Fermer", + "57": "Utiliser le grappin", + "58": "Sauter", + "59": "Parcourir barre de raccourcis", + "5": "La Légion de givre approche à l'ouest !", + "60": "Attaquer", + "61": "Construire", + "62": "Boire", + "63": "Action", + "64": "Changer de menu", + "65": "Placer", + "66": "Échanger", + "67": "Équiper", + "68": "Retirer", + "69": "Afficher les drapeaux", + "6": "La Légion de givre approche à l'est !", + "70": "Vérifier les logements", + "71": "Fabrication rapide", + "72": "Fabriquer", + "73": "Sélectionner", + "74": "Jeter", + "75": "Vendre", + "76": "Transférer", + "77": "Afficher visualisation", + "78": "Masquer visualisation", + "79": "Utiliser", + "7": "La Légion de givre est arrivée !", + "80": "Parler", + "81": "Lire", + "82": "Retour", + "83": "Favoris", + "84": "Vous ne pouvez pas changer d'équipe dans les blocs de votre équipe !", + "86": "Canard", + "87": "Papillon", + "88": "Luciole", + "89": "Options de câblage", + "8": "La Lune de sang se lève…", + "90": "Acheter", + "91": "Acheter plus", + "92": "Vendre", + "93": "Fabriquer plus", + "94": "Essayer de supprimer", + "95": "Escargot", + "96": "Ressemble à", + "97": " organise une fête", + "98": " organisent une fête", + "99": "La fête est finie !", + "9": "Vous sentez une présence maléfique qui vous observe…", + "104": "Ne peut pas s'utiliser sans mana d'Etheria tant que le cristal Eternia n'est pas protégé" + }, + "LegacyInterface": { + "0": "Santé :", + "100": "Compteur de créatures", + "101": "Compteur d'ennemis tués", + "102": "Phase lunaire", + "103": "Vitesse de déplacement", + "104": "Trésor", + "105": "Créatures rares", + "106": "Dégâts par seconde", + "107": "Plantes étranges", + "108": "Ouvrir la carte", + "109": "Fermer la carte", + "10": "Défense", + "110": "Ouvrir le dossier", + "111": "Faire une capture d'écran", + "112": "Vous devez d'abord définir un cadre", + "113": "Disponible uniquement en mode fenêtre", + "114": "Disponible uniquement avec la carte activée", + "115": "Mode Appareil photo désactivé", + "116": "Surbrillance de nouveaux objets désactivée", + "117": "Surbrillance de nouveaux objets activée", + "118": "Agrandir", + "119": "Réduire", + "11": "Social", + "120": "Téléporter vers alliés", + "121": "Jeter un objet", + "122": "Trier les objets", + "123": "Temps froid", + "12": "Casque", + "13": "Chemise", + "14": "Pantalon", + "15": "platine", + "16": "or", + "17": "argent", + "18": "cuivre", + "19": "Reforger", + "1": "Soupir", + "20": "Placer un objet ici pour le reforger", + "21": "Afficher les recettes qui utilisent", + "22": "Objets nécessaires :", + "23": "Aucun", + "24": "Placer un matériau ici", + "25": "Artisanat", + "26": "Pièces", + "27": "Munitions", + "28": "Boutique", + "29": "Tout prendre", + "2": "Mana", + "30": "Tout déposer", + "31": "Pile rapide", + "32": "Tirelire", + "33": "Coffre-fort", + "34": "Temps", + "35": "Sauvegarder et quitter", + "36": "Déconnecter", + "37": "Objets", + "38": "Vous vous êtes fait tuer...", + "39": "Ce logement convient.", + "3": "Poubelle", + "40": "Ce logement n'est pas valide.", + "41": "Ce logement est déjà occupé.", + "42": "Ce logement est corrompu.", + "43": "La connexion a expiré", + "44": "Réception des données de tuiles", + "45": "Équiper", + "46": "Coût", + "47": "Sauvegarder", + "48": "Modifier", + "49": "État", + "4": "Inventaire", + "50": "Sort", + "51": "Aide", + "52": "Fermer", + "53": "Eau", + "54": "Soin", + "55": "Ce logement ne convient pas pour un-e", + "56": "Lave", + "57": "Teinture", + "58": "Miel", + "59": "Visible", + "5": "Barre de raccourcis déverrouillée", + "60": "Masqué", + "61": "Renommer", + "62": "Paramètres", + "63": "Annuler", + "64": "Quête", + "65": "Objet de quête", + "66": "Économies", + "67": "Prendre une photo", + "68": "Paramètres", + "69": "Épingler le cadre", + "6": "Barre de raccourcis verrouillée", + "70": "Définir le cadre", + "71": "Fermer", + "72": "Activé", + "73": "Désactivé", + "74": "Assemblage d'images", + "75": "Prendre des entités", + "76": "Prendre un arrière-plan", + "77": "Choisir un biome", + "78": "Réinitialiser le cadre", + "79": "Équipement", + "7": "Logement", + "80": "Logement", + "81": "Mode appareil photo", + "82": "Restocker", + "83": "Lune de givre", + "84": "Lune citrouille", + "85": "Folie martienne", + "86": "Invasion pirate", + "87": "Légion de givre", + "88": "Armée de gobelins", + "89": "Récupérer", + "8": "Requête de logement", + "90": "Grappin", + "91": "Monter", + "92": "Familier", + "93": "Wagonnet", + "94": "Familier de lumière", + "95": "Temps", + "96": "Météo", + "97": "Pêche", + "98": "Position", + "99": "Profondeur", + "9": "Accessoire" + }, + "LegacyChestType": { + "0": "Coffre", + "10": "Coffre de lierre", + "12": "Coffre en bois vivant", + "13": "Coffre céleste", + "14": "Coffre en bois d'ombre", + "15": "Coffre couvert de toile d'araignée", + "16": "Coffre en lihzahrd", + "17": "Coffre d'eau", + "18": "Coffre de la jungle", + "19": "Coffre de la corruption", + "1": "Coffre en or", + "20": "Coffre carmin", + "21": "Coffre sacré", + "23": "Coffre de la jungle verrouillé ", + "24": "Coffre de la corruption verrouillé ", + "25": "Coffre carmin verrouillé ", + "26": "Coffre sacré verrouillé ", + "28": "Coffre en dynastie", + "29": "Coffre en miel", + "2": "Coffre en or verrouillé", + "30": "Coffre steampunk", + "31": "Coffre en palmier", + "32": "Coffre en champignon", + "33": "Coffre en bois boréal", + "34": "Coffre en gelée", + "35": "Coffre vert de donjon", + "36": "Coffre vert de donjon verrouillé", + "37": "Coffre rose de donjon", + "38": "Coffre rose de donjon verrouillé", + "39": "Coffre bleu de donjon", + "3": "Coffre de l'ombre", + "40": "Coffre bleu de donjon verrouillé", + "41": "Coffre en os", + "42": "Coffre en cactus", + "43": "Coffre en chair", + "44": "Coffre en obsidienne", + "45": "Coffre en citrouille", + "46": "Coffre sinistre", + "47": "Coffre en verre", + "48": "Coffre martien", + "49": "Coffre en météorite", + "4": "Coffre de l'ombre verrouillé", + "50": "Coffre en granite", + "51": "Coffre en marbre", + "5": "Tonneau", + "6": "Poubelle", + "7": "Coffre en ébène", + "8": "Coffre en acajou riche", + "9": "Coffre en bois perlé" + }, + "LegacyDresserType": { + "0": "Commode", + "10": "Commode en os", + "11": "Commode en cactus", + "12": "Commode sinistre", + "13": "Commode céleste", + "14": "Commode en miel", + "15": "Commode en lihzahrd", + "16": "Commode en palmier", + "17": "Commode en champignon", + "18": "Commode en bois boréal", + "19": "Commode en gelée", + "1": "Commode en ébène", + "20": "Commode en citrouille", + "21": "Commode steampunk", + "22": "Commode en verre", + "23": "Commode en chair", + "24": "Commode martienne", + "25": "Commode en météorite", + "26": "Commode en granite", + "27": "Commode en marbre", + "2": "Commode en acajou riche", + "3": "Commode en bois perlé", + "4": "Commode en bois d'ombre", + "5": "Commode bleue de donjon", + "6": "Commode verte de donjon", + "7": "Commode rose de donjon", + "8": "Commode dorée", + "9": "Commode en obsidienne", + "28": "{$ItemName.CrystalDresser}", + "29": "{$ItemName.DynastyDresser}", + "30": "{$ItemName.FrozenDresser}", + "31": "{$ItemName.LivingWoodDresser}", + "32": "{$ItemName.SpiderDresser}", + "33": "{$ItemName.LesionDresser}", + "34": "{$ItemName.SolarDresser}", + "35": "{$ItemName.VortexDresser}", + "36": "{$ItemName.NebulaDresser}", + "37": "{$ItemName.StardustDresser}", + "38": "{$ItemName.SandstoneDresser}", + "39": "{$ItemName.BambooDresser}" + }, + "LegacyChestType2": { + "1": "{$ItemName.GoldenChest}", + "0": "{$ItemName.CrystalChest}", + "2": "{$ItemName.SpiderChest}", + "3": "{$ItemName.LesionChest}", + "4": "{$ItemName.GoldChest}", + "5": "{$ItemName.SolarChest}", + "6": "{$ItemName.VortexChest}", + "7": "{$ItemName.NebulaChest}", + "8": "{$ItemName.StardustChest}", + "9": "{$ItemName.GolfChest}", + "10": "{$ItemName.DesertChest}", + "11": "{$ItemName.BambooChest}", + "12": "{$ItemName.DungeonDesertChest}" + } +} \ No newline at end of file diff --git a/Localization/Content/fr-FR/NPCs.json b/Localization/Content/fr-FR/NPCs.json new file mode 100644 index 0000000..0de3737 --- /dev/null +++ b/Localization/Content/fr-FR/NPCs.json @@ -0,0 +1,582 @@ +{ + "NPCName": { + "BlueSlime": "Gelée bleue", + "GiantWormHead": "Ver géant", + "SeekerTail": "Mangeur de monde", + "Clinger": "Accrocheur", + "AnglerFish": "Pêcheur", + "GreenJellyfish": "Méduse verte", + "Werewolf": "Loup-garou", + "BoundGoblin": "Gobelin ligoté", + "BoundWizard": "Magicien ligoté", + "GoblinTinkerer": "Gobelin bricoleur", + "Wizard": "Magicien", + "Clown": "Clown", + "GiantWormBody": "Ver géant", + "SkeletonArcher": "Archer squelette", + "GoblinArcher": "Archer gobelin", + "VileSpit": "Bave vile", + "WallofFlesh": "Mur de chair", + "WallofFleshEye": "Mur de chair", + "TheHungry": "L'Affamée", + "TheHungryII": "L'Affamée", + "LeechHead": "Sangsue", + "LeechBody": "Sangsue", + "LeechTail": "Sangsue", + "GiantWormTail": "Ver géant", + "ChaosElemental": "Élémentaire de chaos", + "Slimer": "Gelée volante", + "Gastropod": "Gastropode", + "BoundMechanic": "Mécano ligotée", + "Mechanic": "Mécano", + "Retinazer": "Rétinaser", + "Spazmatism": "Spazmatisme", + "SkeletronPrime": "Grand Squeletron", + "PrimeCannon": "Grand canon", + "PrimeSaw": "Grande scie", + "EaterofWorldsHead": "Dévoreur des mondes", + "PrimeVice": "Grand crochet", + "PrimeLaser": "Grand laser", + "BaldZombie": "Zombie", + "WanderingEye": "Œil errant", + "TheDestroyer": "Le Destructeur", + "TheDestroyerBody": "Le Destructeur", + "TheDestroyerTail": "Le Destructeur", + "IlluminantBat": "Chauve-souris lumineuse", + "IlluminantSlime": "Gelée lumineuse", + "Probe": "Sonde", + "EaterofWorldsBody": "Dévoreur des mondes", + "PossessedArmor": "Armure possédée", + "ToxicSludge": "Gadoue toxique", + "SantaClaus": "Père Noël", + "SnowmanGangsta": "Gangster de neige", + "MisterStabby": "Monsieur Poignard", + "SnowBalla": "Boule de neige", + "IceSlime": "Gelée de glace", + "Penguin": "Manchot", + "PenguinBlack": "Manchot", + "EaterofWorldsTail": "Dévoreur des mondes", + "IceBat": "Chauve-souris de glace", + "Lavabat": "Chauve-souris de lave", + "GiantFlyingFox": "Roussette géante", + "GiantTortoise": "Tortue géante", + "IceTortoise": "Tortue de glace", + "Wolf": "Loup", + "RedDevil": "Diable rouge", + "Arapaima": "Paiche", + "VampireBat": "Vampire", + "Vampire": "Vampire", + "MotherSlime": "Mère Gelée", + "Truffle": "Truffe", + "Frankenstein": "Frankenstein", + "BlackRecluse": "Recluse noire", + "WallCreeper": "Grimpeur de murs", + "WallCreeperWall": "Grimpeur de murs", + "SwampThing": "Chose du marais", + "UndeadViking": "Viking mort-vivant", + "CorruptPenguin": "Manchot corrompu", + "IceElemental": "Élémentaire de glace", + "Merchant": "Marchand", + "PigronCorruption": "Drachon", + "PigronHallow": "Drachon", + "RuneWizard": "Magicien de runes", + "Crimera": "Carminera", + "Herpling": "Bêta", + "AngryTrapper": "Trappeur irrité", + "MossHornet": "Frelon de mousse", + "Derpling": "Benêt", + "Steampunker": "Steampunker", + "CrimsonAxe": "Hache carmin", + "Nurse": "Infirmière", + "PigronCrimson": "Drachon", + "FaceMonster": "Monstre grimaçant", + "FloatyGross": "Immondice flottante", + "Crimslime": "Gelarmin", + "SpikedIceSlime": "Gelée de glace à pointes", + "SnowFlinx": "Flinx des neiges", + "PincushionZombie": "Zombie", + "SlimedZombie": "Zombie", + "SwampZombie": "Zombie", + "TwiggyZombie": "Zombie", + "ArmsDealer": "Vendeur d'armes", + "CataractEye": "Œil de démon", + "SleepyEye": "Œil de démon", + "DialatedEye": "Œil de démon", + "GreenEye": "Œil de démon", + "PurpleEye": "Œil de démon", + "LostGirl": "Fille perdue", + "Nymph": "Nymphe", + "ArmoredViking": "Viking en armure", + "Lihzahrd": "Lihzahrd", + "LihzahrdCrawler": "Lihzahrd", + "DemonEye": "Œil de démon", + "Dryad": "Dryade", + "FemaleZombie": "Zombie", + "HeadacheSkeleton": "Squelette", + "MisassembledSkeleton": "Squelette", + "PantlessSkeleton": "Squelette", + "SpikedJungleSlime": "Gelée de jungle à pointes", + "Moth": "Papillon de nuit", + "IcyMerman": "Œil de démon", + "DyeTrader": "Teinturier", + "PartyGirl": "Fêtarde", + "Cyborg": "Cyborg", + "Skeleton": "Squelette", + "Bee": "Abeille", + "BeeSmall": "Abeille", + "PirateDeckhand": "Moussaillon", + "PirateCorsair": "Corsaire pirate", + "PirateDeadeye": "Borgne pirate", + "PirateCrossbower": "Arbalétrier pirate", + "PirateCaptain": "Capitaine pirate", + "CochinealBeetle": "Cochenille", + "CyanBeetle": "Scarabée cyan", + "LacBeetle": "Scarabée de lac", + "Guide": "Guide", + "SeaSnail": "Bulot", + "Squid": "Calamar", + "QueenBee": "Reine des abeilles", + "ZombieRaincoat": "Zombie en imper", + "FlyingFish": "Poisson volant", + "UmbrellaSlime": "Gelée à parapluie", + "FlyingSnake": "Serpent volant", + "Painter": "Peintre", + "WitchDoctor": "Marabout", + "Pirate": "Pirate", + "MeteorHead": "Tête de météore", + "GoldfishWalker": "Poisson doré", + "HornetFatty": "Frelon", + "HornetHoney": "Frelon", + "HornetLeafy": "Frelon", + "HornetSpikey": "Frelon", + "HornetStingy": "Frelon", + "JungleCreeper": "Insecte de la jungle", + "JungleCreeperWall": "Insecte de la jungle", + "BlackRecluseWall": "Recluse noire", + "BloodCrawler": "Tikenfer", + "FireImp": "Diablotin de feu", + "BloodCrawlerWall": "Tikenfer", + "BloodFeeder": "Buveur de sang", + "BloodJelly": "Gelée de sang", + "IceGolem": "Golem de glace", + "RainbowSlime": "Gelée arc-en-ciel", + "Golem": "Golem", + "GolemHead": "Tête de Golem", + "GolemFistLeft": "Poing de Golem", + "GolemFistRight": "Poing de Golem", + "GolemHeadFree": "Tête de Golem", + "BurningSphere": "Sphère brûlante", + "AngryNimbus": "Nimbus furieux", + "Eyezor": "Zombolaire", + "Parrot": "Perroquet", + "Reaper": "Faucheuse", + "ZombieMushroom": "Zombie à spores", + "ZombieMushroomHat": "Zombie à spores", + "FungoFish": "Champoisson", + "AnomuraFungus": "Anomoure", + "MushiLadybug": "Champinelle", + "FungiBulb": "Champibulbe", + "GoblinPeon": "Péon gobelin", + "GiantFungiBulb": "Champibulbe géant", + "FungiSpore": "Spore de champignon", + "Plantera": "Plantera", + "PlanterasHook": "Grappin de Plantera", + "PlanterasTentacle": "Tentacule de Plantera", + "Spore": "Spore", + "BrainofCthulhu": "Cerveau de Cthulhu", + "Creeper": "Suiveur", + "IchorSticker": "Cracheuse d'ichor", + "RustyArmoredBonesAxe": "Squelette en armure rouillée", + "GoblinThief": "Voleur gobelin", + "RustyArmoredBonesFlail": "Squelette en armure rouillée", + "RustyArmoredBonesSword": "Squelette en armure rouillée", + "RustyArmoredBonesSwordNoArmor": "Squelette en armure rouillée", + "BlueArmoredBones": "Squelette en armure bleue", + "BlueArmoredBonesMace": "Squelette en armure bleue", + "BlueArmoredBonesNoPants": "Squelette en armure bleue", + "BlueArmoredBonesSword": "Squelette en armure bleue", + "HellArmoredBones": "Squelette en armure infernale", + "HellArmoredBonesSpikeShield": "Squelette en armure infernale", + "HellArmoredBonesMace": "Squelette en armure infernale", + "GoblinWarrior": "Guerrier gobelin", + "HellArmoredBonesSword": "Squelette en armure infernale", + "RaggedCaster": "Incantateur en loques", + "RaggedCasterOpenCoat": "Incantateur en loques", + "Necromancer": "Nécromancien", + "NecromancerArmored": "Nécromancien", + "DiabolistRed": "Diaboliste", + "DiabolistWhite": "Diaboliste", + "BoneLee": "Bones Lee", + "DungeonSpirit": "Esprit de donjon", + "GiantCursedSkull": "Crâne maudit géant", + "GoblinSorcerer": "Sorcier gobelin", + "Paladin": "Paladin", + "SkeletonSniper": "Sniper squelette", + "TacticalSkeleton": "Squelette tactique", + "SkeletonCommando": "Commando squelette", + "AngryBonesBig": "Squelette furieux", + "AngryBonesBigMuscle": "Squelette furieux", + "AngryBonesBigHelmet": "Squelette furieux", + "BirdBlue": "Geai bleu", + "BirdRed": "Cardinal", + "Squirrel": "Écureuil", + "Zombie": "Zombie", + "ChaosBall": "Boule de chaos", + "Mouse": "Souris", + "Raven": "Corbeau", + "SlimeMasked": "Gelée", + "BunnySlimed": "Lapin", + "HoppinJack": "Citrouille sauteuse", + "Scarecrow1": "Épouvantail", + "Scarecrow2": "Épouvantail", + "Scarecrow3": "Épouvantail", + "Scarecrow4": "Épouvantail", + "Scarecrow5": "Épouvantail", + "AngryBones": "Squelette furieux", + "Scarecrow6": "Épouvantail", + "Scarecrow7": "Épouvantail", + "Scarecrow8": "Épouvantail", + "Scarecrow9": "Épouvantail", + "Scarecrow10": "Épouvantail", + "HeadlessHorseman": "Cavalier sans tête", + "Ghost": "Fantôme", + "DemonEyeOwl": "Œil du démon", + "DemonEyeSpaceship": "Œil du démon", + "ZombieDoctor": "Zombie", + "DarkCaster": "Incantateur du mal", + "ZombieSuperman": "Zombie", + "ZombiePixie": "Zombie", + "SkeletonTopHat": "Squelette", + "SkeletonAstonaut": "Squelette", + "SkeletonAlien": "Squelette", + "MourningWood": "Bois terrifiant", + "Splinterling": "Échardet", + "Pumpking": "Potiroi", + "PumpkingBlade": "Potiroi", + "Hellhound": "Chien de l'enfer", + "WaterSphere": "Sphère d'eau", + "Poltergeist": "Esprit frappeur", + "ZombieXmas": "Zombie", + "ZombieSweater": "Zombie", + "SlimeRibbonWhite": "Gelée", + "SlimeRibbonYellow": "Gelée", + "SlimeRibbonGreen": "Gelée", + "SlimeRibbonRed": "Gelée", + "BunnyXmas": "Lapin", + "ZombieElf": "Elfe zombie", + "ZombieElfBeard": "Elfe zombie", + "CursedSkull": "Crâne maudit", + "ZombieElfGirl": "Elfe zombie", + "PresentMimic": "Imitation de cadeau", + "GingerbreadMan": "Bonhomme de pain d'épices", + "Yeti": "Yéti", + "Everscream": "Hurléternel", + "IceQueen": "Reine des glaces", + "SantaNK1": "Père Noël-NK1", + "ElfCopter": "Elfe Coptère", + "Nutcracker": "Casse-Noisette", + "NutcrackerSpinning": "Casse-Noisette", + "SkeletronHead": "Squeletron", + "ElfArcher": "Archer elfe", + "Krampus": "Krampus", + "Flocko": "Flocko", + "Stylist": "Styliste", + "WebbedStylist": "Styliste enveloppée", + "Firefly": "Luciole", + "Butterfly": "Papillon", + "Worm": "Ver", + "LightningBug": "Ver luisant", + "Snail": "Escargot", + "SkeletronHand": "Squeletron", + "GlowingSnail": "Escargot luisant", + "Frog": "Grenouille", + "Duck": "Canard", + "Duck2": "Canard", + "DuckWhite": "Canard", + "DuckWhite2": "Canard", + "ScorpionBlack": "Scorpion", + "Scorpion": "Scorpion", + "TravellingMerchant": "Marchand ambulant", + "Angler": "Pêcheur", + "OldMan": "Vieil homme", + "DukeFishron": "Duc Dracosson", + "DetonatingBubble": "Bulle explosive", + "Sharkron": "Draquin", + "Sharkron2": "Draquin", + "TruffleWorm": "Ver truffe", + "TruffleWormDigger": "Ver truffe", + "SleepingAngler": "Pêcheur endormi", + "Grasshopper": "Sauterelle", + "ChatteringTeethBomb": "Bombe à dents qui claquent", + "Demolitionist": "Démolisseur", + "BrainScrambler": "Embrouilleur", + "RayGunner": "Tireur laser", + "MartianOfficer": "Officier martien", + "ForceBubble": "Bouclier à bulles", + "GrayGrunt": "Soldat gris", + "MartianEngineer": "Ingénieur martien", + "MartianTurret": "Tourelle de Tesla", + "MartianDrone": "Drone martien", + "GigaZapper": "Gigataser", + "BoneSerpentHead": "Squelette de serpent", + "ScutlixRider": "Tireur de Scutlix", + "Scutlix": "Scutlix", + "EyeofCthulhu": "Œilde Cthulhu", + "BoneSerpentBody": "Squelette de serpent", + "BoneSerpentTail": "Squelette de serpent", + "SolarCrawltipedeHead": "Rampipède", + "SolarCrawltipedeBody": "Rampipède", + "SolarCrawltipedeTail": "Rampipède", + "SolarDrakomire": "Drakomire", + "SolarDrakomireRider": "Cavalier de Drakomire", + "SolarSroller": "Debroulé", + "SolarCorite": "Corite", + "SolarSolenian": "Sélénien", + "Hornet": "Frelon", + "ManEater": "Croqueuse d'hommes", + "ArmedZombie": "Zombie", + "ArmedZombiePincussion": "Zombie", + "ArmedZombieSlimed": "Zombie", + "ArmedZombieSwamp": "Zombie", + "ArmedZombieTwiggy": "Zombie", + "ArmedZombieCenx": "Zombie", + "UndeadMiner": "Mineur mort-vivant", + "GoldBird": "Oiseau doré", + "GoldBunny": "Lapin doré", + "GoldButterfly": "Papillon doré", + "GoldFrog": "Grenouille dorée", + "GoldGrasshopper": "Sauterelle dorée", + "GoldMouse": "Souris dorée", + "GoldWorm": "Ver doré", + "BoneThrowingSkeleton": "Squelette", + "Tim": "Tim", + "BoneThrowingSkeleton2": "Squelette", + "BoneThrowingSkeleton3": "Squelette", + "BoneThrowingSkeleton4": "Squelette", + "Bunny": "Lapin", + "CorruptBunny": "Lapin corrompu", + "Harpy": "Harpie", + "CaveBat": "Chauve-souris des grottes", + "ServantofCthulhu": "Serviteur de Cthulhu", + "KingSlime": "Roi des gelées", + "JungleBat": "Chauve-souris de la jungle", + "DoctorBones": "Docteur Bones", + "TheGroom": "Le Marié", + "Clothier": "Tailleur", + "Goldfish": "Poisson doré", + "Snatcher": "Croqueur", + "CorruptGoldfish": "Poisson doré corrompu", + "Piranha": "Piranha", + "LavaSlime": "Gelée de lave", + "EaterofSouls": "Dévoreur d'âmes", + "Hellbat": "Chauve-souris de l'enfer", + "Vulture": "Vautour", + "Demon": "Démon", + "BlueJellyfish": "Méduse bleue", + "PinkJellyfish": "Méduse rose", + "Shark": "Requin", + "VoodooDemon": "Démon vaudou", + "Crab": "Crabe", + "DungeonGuardian": "Gardien de donjon", + "Antlion": "Fourmilion", + "DevourerHead": "Dévoreur", + "SpikeBall": "Boule à pointes", + "DungeonSlime": "Gelée de donjon", + "BlazingWheel": "Roue embrasée", + "GoblinScout": "Éclaireur gobelin", + "Bird": "Oiseau", + "Pixie": "Fée", + "ArmoredSkeleton": "Squelette en armure", + "Mummy": "Momie", + "DarkMummy": "Momie sombre", + "DevourerBody": "Dévoreur", + "LightMummy": "Momie claire", + "CorruptSlime": "Gelée corrompue", + "Wraith": "Spectre", + "CursedHammer": "Marteau maudit", + "EnchantedSword": "Épée envoûtée", + "Mimic": "Imitation", + "Unicorn": "Licorne", + "WyvernHead": "Vouivre", + "WyvernLegs": "Vouivre", + "WyvernBody": "Vouivre", + "DevourerTail": "Dévoreur", + "WyvernBody2": "Vouivre", + "WyvernBody3": "Vouivre", + "WyvernTail": "Vouivre", + "GiantBat": "Chauve-souris géante", + "Corruptor": "Corrupteur", + "DiggerHead": "Creuseur", + "DiggerBody": "Creuseur", + "DiggerTail": "Creuseur", + "SeekerHead": "Mangeur de monde", + "SeekerBody": "Mangeur de monde", + "AncientCultistSquidhead": "Vision antique", + "AncientDoom": "Mort antique", + "AncientLight": "Lumière antique", + "BigMimicCorruption": "Imitation corrompue", + "BigMimicCrimson": "Imitation carmin", + "BigMimicHallow": "Imitation sacrée", + "BigMimicJungle": "Imitation de la jungle", + "BloodZombie": "Zombie de sang", + "Buggy": "Grimace", + "Butcher": "Boucher", + "Crawdad": "Crabisse", + "Crawdad2": "Crabisse", + "CreatureFromTheDeep": "Créature des profondeurs", + "CrimsonPenguin": "Manchot cruel", + "CultistBoss": "Adepte lunatique", + "CultistBossClone": "Adepte lunatique", + "CultistDragonBody1": "Dragon spectre", + "CultistDragonBody2": "Dragon spectre", + "CultistDragonBody3": "Dragon spectre", + "CultistDragonBody4": "Dragon spectre", + "CultistDragonHead": "Dragon spectre", + "CultistDragonTail": "Dragon spectre", + "CultistTablet": "Tablette mystérieuse", + "DD2AttackerTest": "???", + "DD2GoblinT3": "{$NPCName.DD2GoblinT1}", + "DD2GoblinBomberT3": "{$NPCName.DD2GoblinBomberT1}", + "DD2JavelinstT2": "{$NPCName.DD2JavelinstT1}", + "DD2JavelinstT3": "{$NPCName.DD2JavelinstT1}", + "DD2LanePortal": "Portail mystérieux", + "DD2GoblinT2": "{$NPCName.DD2GoblinT1}", + "DeadlySphere": "Sphère mortelle", + "DemonTaxCollector": "Âme torturée", + "DesertBeast": "Basilic", + "DesertDjinn": "Esprit du désert", + "DesertGhoul": "Goule", + "DesertGhoulCorruption": "Goule vile", + "DesertGhoulCrimson": "Goule contaminée", + "DesertGhoulHallow": "Goule rêveuse", + "DesertLamiaDark": "Lamia", + "DesertLamiaLight": "Lamia", + "DesertScorpionWalk": "Braconnier des sables", + "DesertScorpionWall": "Braconnier des sables", + "Drippler": "Dégoulineur", + "DrManFly": "Dr Mouche ", + "DuneSplicerBody": "Colleur des dunes", + "DuneSplicerHead": "Colleur des dunes", + "DuneSplicerTail": "Colleur des dunes", + "EnchantedNightcrawler": "Insecte nocturne envoûté", + "GiantFlyingAntlion": "Fourmilion envahisseur", + "Fritz": "Fritz", + "GiantShelly": "Mollusque géant", + "GiantShelly2": "Mollusque géant", + "GoblinSummoner": "Invocateur gobelin", + "GraniteFlyer": "Élémentaire de granite", + "GraniteGolem": "Golem en granite", + "GreekSkeleton": "Hoplite", + "Grubby": "Limace", + "LunarTowerNebula": "Pilier nébuleux", + "LunarTowerSolar": "Pilier solaire", + "LunarTowerStardust": "Pilier astral", + "LunarTowerVortex": "Pilier de vortex", + "MartianProbe": "Sonde martienne", + "MartianSaucer": "Soucoupe martienne", + "MartianSaucerCannon": "Canon de soucoupe martienne", + "MartianSaucerCore": "Soucoupe martienne", + "MartianSaucerTurret": "Tourelle de soucoupe martienne", + "MartianWalker": "Marcheur martien", + "Medusa": "Médusa", + "MoonLordCore": "Cœur du Seigneur de la lune", + "MoonLordHand": "Main du Seigneur de la lune", + "MoonLordHead": "Seigneur de la lune", + "Mothron": "Mothron", + "MothronEgg": "Œuf de Mothron", + "MothronSpawn": "Bébé Mothron", + "Nailhead": "Tête à clous", + "NebulaBeast": "Bête d'évolution", + "NebulaBrain": "Flotteur nébuleux", + "NebulaHeadcrab": "Suceur de cerveau", + "NebulaSoldier": "Prédicteur", + "PartyBunny": "Lapin", + "Psycho": "Taré", + "Salamander": "Salamandre", + "Salamander2": "Salamandre", + "Salamander3": "Salamandre", + "Salamander4": "Salamandre", + "Salamander5": "Salamandre", + "Salamander6": "Salamandre", + "Salamander7": "Salamandre", + "Salamander8": "Salamandre", + "Salamander9": "Salamandre", + "SandElemental": "Élémentaire de sable", + "SandShark": "Requin des sables", + "SandsharkCorrupt": "Croqueur osseux", + "SandsharkCrimson": "Ravageur de chair", + "SandsharkHallow": "Batteur de cristal", + "SandSlime": "Gelée des sables", + "SlimeSpiked": "Gelée à pointes", + "Sluggy": "Coriace", + "SolarFlare": "Lueur solaire", + "SolarGoop": "Fragment solaire", + "SolarSpearman": "Drakanian", + "SquirrelGold": "Écureuil doré", + "SquirrelRed": "Écureuil roux", + "StardustCellBig": "Cellule d'étoile", + "StardustCellSmall": "Cellule d'étoile", + "StardustJellyfishBig": "Envahisseur", + "StardustSoldier": "Astronome", + "StardustSpiderBig": "Machine à scintillements", + "StardustSpiderSmall": "Scintillement", + "StardustWormHead": "Tisseur de voie lactée", + "TargetDummy": "Cible factice", + "TaxCollector": "Percepteur d'impôts", + "TheBride": "La Mariée", + "ThePossessed": "Le Possédé", + "TombCrawlerBody": "Rampant de tombes", + "TombCrawlerHead": "Rampant de tombes", + "TombCrawlerTail": "Rampant de tombes", + "Tumbleweed": "Virevoltant furieux", + "VortexHornet": "Frelon extraterrestre", + "VortexHornetQueen": "Reine extraterrestre", + "VortexLarva": "Larve extraterrestre", + "VortexRifleman": "Plongeur d'orage", + "VortexSoldier": "Vortexien", + "GiantWalkingAntlion": "Chargeur fourmilion", + "DD2GoblinBomberT2": "{$NPCName.DD2GoblinBomberT1}", + "DD2WyvernT3": "{$NPCName.DD2WyvernT1}", + "DD2WyvernT2": "{$NPCName.DD2WyvernT1}", + "DD2OgreT3": "{$NPCName.DD2OgreT2}", + "DD2WitherBeastT3": "{$NPCName.DD2WitherBeastT2}", + "DD2SkeletonT3": "{$NPCName.DD2SkeletonT1}", + "DD2KoboldWalkerT3": "{$NPCName.DD2KoboldWalkerT2}", + "DD2DrakinT3": "{$NPCName.DD2DrakinT2}", + "DD2DarkMageT3": "{$NPCName.DD2DarkMageT1}", + "DD2KoboldFlyerT3": "{$NPCName.DD2KoboldFlyerT2}", + "BabySlime": "Petite gelée", + "BigRainZombie": "Zombie", + "BlackSlime": "Gelée noire", + "DD2Bartender": "Tavernier", + "DD2Betsy": "Betsy", + "DD2DarkMageT1": "Mage noir", + "DD2DrakinT2": "Drakin", + "DD2EterniaCrystal": "Cristal Eternia", + "DD2GoblinBomberT1": "Gobelin à bombes d'Etheria", + "DD2GoblinT1": "Gobelin d'Etheria", + "DD2JavelinstT1": "Lanceur de javelot d'Etheria", + "DD2KoboldFlyerT2": "Kobold planeur", + "DD2KoboldWalkerT2": "Kobold", + "DD2LightningBugT3": "Ver luisant d'Etheria", + "DD2OgreT2": "Ogre", + "DD2SkeletonT1": "Squelette de l'Ancien", + "DD2WitherBeastT2": "Bête dépérie", + "DD2WyvernT1": "Vouivre d'Etheria", + "GreenSlime": "Gelée verte", + "JungleSlime": "Gelée de jungle", + "Pinky": "Rosie", + "PurpleSlime": "Gelée violette", + "RedSlime": "Gelée rouge", + "Slimeling": "Corrugel", + "Slimer2": "Gelaile", + "SmallRainZombie": "Zombie", + "YellowSlime": "Gelée jaune", + "MoonLordFreeEye": "Véritable Œil de Cthulhu", + "MoonLordLeechBlob": "Caillot de parasite de lune", + "SkeletonMerchant": "Marchand squelette", + "PirateShip": "Hollandais volant", + "PirateShipCannon": "Canon du Hollandais", + "BartenderUnconscious": "Homme inconscient" + } +} \ No newline at end of file diff --git a/Localization/Content/fr-FR/Projectiles.json b/Localization/Content/fr-FR/Projectiles.json new file mode 100644 index 0000000..cdb3ab1 --- /dev/null +++ b/Localization/Content/fr-FR/Projectiles.json @@ -0,0 +1,722 @@ +{ + "ProjectileName": { + "AdamantiteChainsaw": "Tronçonneuse en adamantite", + "AdamantiteDrill": "Foreuse en adamantite", + "AdamantiteGlaive": "Glaive en adamantite", + "Amarok": "Yoyo", + "AmberBolt": "Éclair ambré", + "AmethystBolt": "Éclair d'améthyste", + "Anchor": "Ancre", + "AncientDoomProjectile": "Fin de la prophétie", + "AntiGravityHook": "Grappin antigravité", + "Arkhalis": "Arkhalis", + "AshBallFalling": "Boule de cendre", + "BabyDino": "Petit dino", + "BabyEater": "Petit dévoreur", + "BabyFaceMonster": "Petit monstre grimaçant", + "BabyGrinch": "Petit Grinch", + "BabyHornet": "Petit frelon", + "BabySkeletronHead": "Petite tête de Squeletron", + "BabySlime": "Petite gelée", + "BabySnowman": "Petit homme de neige", + "BabySpider": "Petite araignée", + "BallofFire": "Boule de feu", + "BallofFrost": "Boule de glace", + "BallOHurt": "Boule de douleur", + "Bananarang": "Bananerang", + "Bat": "Chauve-souris", + "BatHook": "Chauve-grappin", + "BeachBall": "Ballon de plage", + "Bee": "Abeille", + "BeeArrow": "Flèche abeille", + "BeeHive": "Ruche", + "Beenade": "Grebeille", + "BlackBolt": "Fusil onyx", + "BlackCat": "Chat noir", + "BlackCounterweight": "Contrepoids", + "Blizzard": "Blizzard", + "BloodCloudMoving": "Nuage de sang", + "BloodCloudRaining": "Nuage de sang", + "BloodRain": "Pluie de sang", + "BloodWater": "Eau sanguine", + "BloodyMachete": "Machette sanglante", + "BlowupSmoke": "Fumée à l'explosion", + "BlowupSmokeMoonlord": "Fumée à l'explosion", + "BlueCounterweight": "Contrepoids", + "BlueFairy": "Fée bleue", + "BlueFlare": "Lueur bleue", + "BlueMoon": "Lune bleue", + "BobberFiberglass": "Flotteur", + "BobberFisherOfSouls": "Flotteur", + "BobberFleshcatcher": "Flotteur", + "BobberGolden": "Flotteur", + "BobberHotline": "Flotteur", + "BobberMechanics": "Flotteur", + "BobberReinforced": "Flotteur", + "BobbersittingDuck": "Flotteur", + "BobberWooden": "Flotteur", + "Bomb": "Bombe", + "BombFish": "Poisson bombe", + "BombSkeletronPrime": "Bombe", + "Bone": "Os", + "BoneArrow": "Flèche en os", + "BoneArrowFromMerchant": "Flèche en os", + "BoneDagger": "Dague en os", + "BoneGloveProj": "Os en croix", + "BoneJavelin": "Javelot en os", + "Boulder": "Rocher", + "BoulderStaffOfEarth": "Rocher", + "BouncyBomb": "Bombe à rebonds", + "BouncyDynamite": "Dynamite à rebonds", + "BouncyGlowstick": "Bâton lumineux à rebonds", + "BouncyGrenade": "Grenade à rebonds", + "BoxingGlove": "Gant de boxe", + "BrainOfConfusion": "Cerveau de confusion", + "BrainScramblerBolt": "Brouilleur de cerveau", + "Bubble": "Bulle", + "Bullet": "Balle", + "BulletDeadeye": "Balle", + "BulletHighVelocity": "Balle", + "BulletSnowman": "Balle", + "Bunny": "Lapin", + "ButchersChainsaw": "Tronçonneuse de boucher", + "CandyCaneHook": "Grappin en sucre d'orge", + "CandyCorn": "Bonbon au maïs", + "CannonballFriendly": "Boulet de canon", + "CannonballHostile": "Boulet de canon", + "Cascade": "Yoyo", + "ChainGuillotine": "Chaîne à guillotine", + "ChainKnife": "Chaîne à couteau", + "ChargedBlasterCannon": "Canon à charge", + "ChargedBlasterLaser": "Laser à charge", + "ChargedBlasterOrb": "Orbe à charge", + "Chik": "Yoyo", + "ChlorophyteArrow": "Flèche en chlorophyte", + "ChlorophyteBullet": "Balle", + "ChlorophyteChainsaw": "Tronçonneuse en chlorophyte", + "ChlorophyteDrill": "Foreuse en chlorophyte", + "ChlorophyteJackhammer": "Marteau-piqueur en chlorophyte", + "ChlorophyteOrb": "Orbe en chlorophyte", + "ChlorophytePartisan": "Épieu en chlorophyte", + "ChristmasHook": "Grappin de Noël", + "ClingerStaff": "Flammes maudites", + "ClothiersCurse": "Crâne", + "CobaltChainsaw": "Tronçonneuse en cobalt", + "CobaltDrill": "Foreuse en cobalt", + "CobaltNaginata": "Naginata en cobalt", + "Code1": "Yoyo", + "Code2": "Yoyo", + "CoinPortal": "Portail de pièces", + "CompanionCube": "Cube de voyage", + "ConfettiGun": "Confetti", + "ConfettiMelee": "Confetti", + "CopperCoin": "Pièce de cuivre", + "CopperCoinsFalling": "Pièces de cuivre", + "CorruptSpray": "Spray corrompu", + "CorruptYoyo": "Yoyo", + "CrimsandBallFalling": "Boule de sable carmin", + "CrimsandBallGun": "Boule de sable carmin", + "CrimsonHeart": "Cœur carmin", + "CrimsonSpray": "Spray carmin", + "CrimsonYoyo": "Yoyo", + "CrossGraveMarker": "Pierre tombale", + "CrystalBullet": "Balle de cristal", + "CrystalDart": "Fléchette de cristal", + "CrystalLeaf": "Feuille de cristal", + "CrystalLeafShot": "Feuille de cristal", + "CrystalPulse": "Charge de cristal", + "CrystalPulse2": "Charge de cristal", + "CrystalShard": "Fragment de cristal", + "CrystalStorm": "Tempête de cristal", + "CrystalVileShardHead": "Fragment vil de cristal", + "CrystalVileShardShaft": "Fragment vil de cristal", + "Cthulunado": "Cthulunade", + "CultistBossFireBall": "Boule de feu", + "CultistBossFireBallClone": "Boule de feu de l'ombre", + "CultistBossIceMist": "Brume de glace", + "CultistBossLightningOrb": "Orbe foudroyant", + "CultistBossLightningOrbArc": "Arche d'orbe foudroyant", + "CultistBossParticle": "Énergie", + "CultistRitual": "Rituel foudroyant", + "CursedArrow": "Flèche maudite", + "CursedBullet": "Balle maudite", + "CursedDart": "Fléchette maudite", + "CursedDartFlame": "Flamme maudite", + "CursedFlameFriendly": "Flamme maudite", + "CursedFlameHostile": "Flamme maudite", + "CursedSapling": "Arbuste maudit", + "DangerousSpider": "Araignée dangereuse", + "DarkLance": "Lance du mal", + "Daybreak": "Point du jour", + "DD2FlameBurstTowerT1": "Tour enflammée", + "DD2FlameBurstTowerT1Shot": "Tour enflammée", + "DD2FlameBurstTowerT2": "Tour enflammée", + "DD2FlameBurstTowerT2Shot": "Tour enflammée", + "DD2FlameBurstTowerT3": "Tour enflammée", + "DD2FlameBurstTowerT3Shot": "Tour enflammée", + "DD2JavelinHostile": "Javelot", + "DeadlySphere": "Sphère mortelle", + "DeathLaser": "Laser de la mort", + "DeathSickle": "Faucille de la mort", + "DemonScythe": "Faux démoniaque", + "DemonSickle": "Faucille démoniaque", + "DesertDjinnCurse": "Sort de l'esprit du désert", + "DiamondBolt": "Éclair de diamant", + "DirtBall": "Boule de terre", + "DrillMountCrosshair": "Foreuse à viseur", + "DrManFlyFlask": "Flasque", + "DryadsWardCircle": "Protection de dryade", + "DualHookBlue": "Crochet", + "DualHookRed": "Crochet", + "Dynamite": "Dynamite", + "EatersBite": "Morsure de Dévoreur", + "EbonsandBallFalling": "Boule de sable d'ébène", + "EbonsandBallGun": "Boule de sable d'ébène", + "EighthNote": "Note", + "Electrosphere": "Électrosphère", + "ElectrosphereMissile": "Missile électrosphère", + "EmeraldBolt": "Éclair d'émeraude", + "EnchantedBeam": "Faisceau enchanté", + "EnchantedBoomerang": "Boomerang enchanté", + "ExplosiveBullet": "Balle explosive", + "ExplosiveBunny": "Lapin explosif", + "Explosives": "Explosifs", + "EyeBeam": "Faisceau de l'œil", + "EyeFire": "Feu de l'œil", + "EyeLaser": "Laser de l'œil", + "EyeSpring": "Œil à ressort", + "FallingStar": "Étoile filante", + "FireArrow": "Flèche de feu", + "Fireball": "Boule de feu", + "FireworkFountainBlue": "Fontaine d'artifice", + "FireworkFountainRainbow": "Fontaine d'artifice", + "FireworkFountainRed": "Fontaine d'artifice", + "FireworkFountainYellow": "Fontaine d'artifice", + "FishHook": "Hameçon", + "Flairon": "Fléon", + "FlaironBubble": "Bulle de fléon", + "Flamarang": "Flammerang", + "Flamelash": "Flammessile", + "Flames": "Flammes", + "FlamesTrap": "Flammes", + "FlamethrowerTrap": "Lance-flammes", + "FlamingArrow": "Flèche enflammée", + "FlamingJack": "Piqueur enflammé", + "FlamingScythe": "Faux enflammée", + "FlamingWood": "Bois enflammé", + "Flare": "Lueur", + "FlowerPetal": "Pétale de fleur", + "FlowerPow": "Fleuréau", + "FlowerPowPetal": "Fleuréau", + "FlyingImp": "Diablotin volant", + "FlyingKnife": "Couteau volant", + "FlyingPiggyBank": "Tirelire volante", + "FormatC": "Yoyo", + "FoulPotion": "Potion infecte", + "FrostArrow": "Flèche de givre", + "FrostBeam": "Faisceau de givre", + "FrostBlastFriendly": "Souffle de givre", + "FrostBlastHostile": "Souffle de givre", + "FrostBoltStaff": "Éclair de givre", + "FrostBoltSword": "Éclair de givre", + "FrostburnArrow": "Flèche brûledegivre", + "FrostDaggerfish": "Daguesson de givre", + "FrostHydra": "Hydre givrée", + "FrostShard": "Fragment de givre", + "FrostWave": "Vague de givre", + "FruitcakeChakram": "Chakram en gâteau", + "GemHookAmethyst": "Grappin de gemme", + "GemHookDiamond": "Grappin de gemme", + "GemHookEmerald": "Grappin de gemme", + "GemHookRuby": "Grappin de gemme", + "GemHookSapphire": "Grappin de gemme", + "GemHookTopaz": "Grappin de gemme", + "GeyserTrap": "Geyser", + "GiantBee": "Abeille", + "GigaZapperSpear": "Fer-de-lance du Gigataser", + "Glowstick": "Bâton lumineux", + "GoldCoin": "Pièce d'or", + "GoldCoinsFalling": "Pièces d'or", + "GoldenBullet": "Balle dorée", + "GoldenShowerFriendly": "Douche dorée", + "GoldenShowerHostile": "Douche dorée", + "GolemFist": "Poing de Golem", + "Gradient": "Yoyo", + "GraveMarker": "Pierre tombale", + "Gravestone": "Pierre tombale", + "GreekFire1": "Feu grec", + "GreekFire2": "Feu grec", + "GreekFire3": "Feu grec", + "GreenCounterweight": "Contrepoids", + "GreenFairy": "Fée rose", + "GreenLaser": "Laser vert", + "Grenade": "Grenade", + "GrenadeI": "Grenade", + "GrenadeII": "Grenade", + "GrenadeIII": "Grenade", + "GrenadeIV": "Grenade", + "Gungnir": "Gungnir", + "HallowSpray": "Spray sacré", + "HallowStar": "Étoile sacrée", + "Hamdrax": "Piocheuse", + "HappyBomb": "Bombe de joie", + "Harpoon": "Harpon", + "HarpyFeather": "Plume de harpie", + "Headstone": "Pierre tombale", + "HeatRay": "Rayon de chaleur", + "HelFire": "Yoyo", + "HellfireArrow": "Flèche d'enfer", + "Hellwing": "Ailes de feu", + "HolyArrow": "Arc bénit", + "HolyWater": "Eau bénite", + "Hook": "Crochet", + "Hornet": "Frelon", + "HornetStinger": "Dard de frelon", + "IceBlock": "Bloc de glace", + "IceBolt": "Éclair de glace", + "IceBoomerang": "Boomerang de glace", + "IceSickle": "Faux de glace", + "IceSpike": "Pointe de glace", + "IcewaterSpit": "Bave d'eau glacée", + "IchorArrow": "Flèche d'ichor", + "IchorBullet": "Balle d'ichor", + "IchorDart": "Fléchette d'ichor", + "IchorSplash": "Goutte d'ichor", + "IlluminantHook": "Crochet", + "ImpFireball": "Boule de feu de diablotin", + "InfernoFriendlyBlast": "Brasier", + "InfernoFriendlyBolt": "Brasier", + "InfernoHostileBlast": "Brasier", + "InfernoHostileBolt": "Brasier", + "InfluxWaver": "Glaive d'afflux", + "IvyWhip": "Fouet de lierre", + "JackOLantern": "Citrouille menaçante", + "JavelinFriendly": "Javelot", + "JavelinHostile": "Javelot", + "JestersArrow": "Flèche de bouffon", + "JumperSpider": "Araignée sauteuse", + "JungleSpike": "Pointe de jungle", + "JungleYoyo": "Yoyo", + "Kraken": "Yoyo", + "Landmine": "Mine", + "LaserDrill": "Foreuse laser", + "LaserMachinegun": "Mitrailleuse laser", + "LaserMachinegunLaser": "Laser", + "LastPrism": "Prisme ultime", + "LastPrismLaser": "Prisme ultime", + "Leaf": "Feuille", + "LightBeam": "Faisceau de lumière", + "LightDisc": "Disque de lumière", + "LostSoulFriendly": "Âme perdue", + "LostSoulHostile": "Âme perdue", + "LovePotion": "Élixir d'amour", + "LunarFlare": "Lueur lunaire", + "LunarHookNebula": "Grappin lunaire", + "LunarHookSolar": "Grappin lunaire", + "LunarHookStardust": "Grappin lunaire", + "LunarHookVortex": "Grappin lunaire", + "MagicDagger": "Dague magique", + "MagicLantern": "Lanterne magique", + "MagicMissile": "Missile magique", + "MagnetSphereBall": "Sphère aimantée", + "MagnetSphereBolt": "Sphère aimantée", + "MartianTurretBolt": "Projectile électrique", + "MartianWalkerLaser": "Rayon laser", + "MechanicalPiranha": "Piranha mécanique", + "MechanicWrench": "Clé anglaise de mécano", + "MedusaHead": "Rayon de Médusa", + "MedusaHeadRay": "Rayon de Médusa", + "Meowmere": "Épée arc-en-ciel", + "Meteor1": "Météorite", + "Meteor2": "Météorite", + "Meteor3": "Météorite", + "MeteorShot": "Coup de météore", + "MinecartMechLaser": "Laser de wagonnet", + "MiniMinotaur": "Mini Minotaure", + "MiniRetinaLaser": "Mini laser rétine", + "MiniSharkron": "Mini draquin", + "Missile": "Missile", + "MolotovCocktail": "Cocktail Molotov", + "MolotovFire": "Feu Molotov", + "MolotovFire2": "Feu Molotov", + "MolotovFire3": "Feu Molotov", + "MoonLeech": "Parasite de lune", + "MoonlordArrow": "Flèche en luminite", + "MoonlordArrowTrail": "Flèche en luminite", + "MoonlordBullet": "Balle en luminite", + "MoonlordTurret": "Portail lunaire", + "MoonlordTurretLaser": "Laser de portail lunaire", + "MudBall": "Boule de boue", + "Mushroom": "Champignon", + "MushroomSpear": "Lance en champignon", + "MushroomSpray": "Spray de champignon", + "MythrilChainsaw": "Tronçonneuse en mithril", + "MythrilDrill": "Foreuse en mithril", + "MythrilHalberd": "Hallebarde en mithril", + "Nail": "Clou", + "NailFriendly": "Clou", + "NanoBullet": "Nano-balle", + "NebulaArcanum": "Arcanum nébuleux", + "NebulaArcanumExplosionShot": "Arcanum nébuleux", + "NebulaArcanumExplosionShotShard": "Arcanum nébuleux", + "NebulaArcanumSubshot": "Arcanum nébuleux", + "NebulaBlaze1": "Flambée nébuleuse", + "NebulaBlaze2": "Ex flambée nébuleuse", + "NebulaBolt": "Percée nébuleuse", + "NebulaChainsaw": "Tronçonneuse nébuleuse", + "NebulaDrill": "Foreuse nébuleuse", + "NebulaEye": "Œil nébuleux", + "NebulaLaser": "Laser nébuleux", + "NebulaSphere": "Sphère nébuleuse", + "NettleBurstEnd": "Explosion d'orties", + "NettleBurstLeft": "Explosion d'orties", + "NettleBurstRight": "Explosion d'orties", + "NightBeam": "Faisceau de nuit", + "None": "", + "NorthPoleSnowflake": "Pôle Nord", + "NorthPoleSpear": "Pôle Nord", + "NorthPoleWeapon": "Pôle Nord", + "NurseSyringeHeal": "Seringue", + "NurseSyringeHurt": "Seringue", + "Obelisk": "Pierre tombale", + "ObsidianSwordfish": "Espadon en obsidienne", + "OneEyedPirate": "Pirate borgne", + "OrichalcumChainsaw": "Tronçonneuse en orichalque", + "OrichalcumDrill": "Foreuse en orichalque", + "OrichalcumHalberd": "Hallebarde en orichalque", + "OrnamentFriendly": "Décoration", + "OrnamentHostile": "Décoration", + "OrnamentHostileShrapnel": "Décoration", + "PainterPaintball": "Paintball", + "PaladinsHammerFriendly": "Marteau de paladin", + "PaladinsHammerHostile": "Marteau de paladin", + "PalladiumChainsaw": "Tronçonneuse en palladium", + "PalladiumDrill": "Foreuse en palladium", + "PalladiumPike": "Pique en palladium", + "Parrot": "Perroquet", + "PartyBullet": "Balle festive", + "PartyGirlGrenade": "Grenade de confetti", + "PearlSandBallFalling": "Boule de sable perlé", + "PearlSandBallGun": "Boule de sable perlé", + "Penguin": "Manchot", + "PetLizard": "Familier lézard", + "Phantasm": "Spectre", + "PhantasmalBolt": "Éclair spectral", + "PhantasmalDeathray": "Rayon de la mort spectral", + "PhantasmalEye": "Œil spectral", + "PhantasmalSphere": "Sphère spectrale", + "PhantasmArrow": "Spectre", + "PhasicWarpDisc": "", + "PhasicWarpEjector": "", + "PineNeedleFriendly": "Aiguille de pin", + "PineNeedleHostile": "Aiguille de pin", + "PinkFairy": "Fée rose", + "PinkLaser": "Laser rose", + "PirateCaptain": "Capitaine pirate", + "PlatinumCoin": "Pièce de platine", + "PlatinumCoinsFalling": "Pièces de platine", + "PoisonDart": "Fléchette de poison", + "PoisonDartBlowgun": "Fléchette de poison", + "PoisonDartTrap": "Fléchette de poison", + "PoisonedKnife": "Couteau empoisonné", + "PoisonFang": "Croc de poison", + "PoisonSeedPlantera": "Graine de poison", + "PortalGun": "Fusil de portail", + "PortalGunBolt": "Éclair de portail", + "PortalGunGate": "Porte de portail", + "PossessedHatchet": "Hachette possédée", + "Present": "Cadeau", + "ProximityMineI": "Mine de proximité", + "ProximityMineII": "Mine de proximité", + "ProximityMineIII": "Mine de proximité", + "ProximityMineIV": "Mine de proximité", + "PulseBolt": "Flèche à impulsion", + "Puppy": "Chiot", + "PureSpray": "Spray pur", + "PurificationPowder": "Poudre de purification", + "PurpleCounterweight": "Contrepoids", + "PurpleLaser": "Laser violet", + "Pygmy": "Pygmée", + "Pygmy2": "Pygmée", + "Pygmy3": "Pygmée", + "Pygmy4": "Pygmée", + "PygmySpear": "Pygmée", + "QuarterNote": "Note", + "RainbowBack": "Arc-en-ciel", + "RainbowCrystal": "Cristal arc-en-ciel", + "RainbowCrystalExplosion": "Explosion arc-en-ciel", + "RainbowFront": "Arc-en-ciel", + "RainbowRodBullet": "Arc-en-ciel", + "RainCloudMoving": "Nuage de pluie", + "RainCloudRaining": "Nuage de pluie", + "RainFriendly": "Pluie", + "RainNimbus": "Pluie", + "Rally": "Yoyo", + "Raven": "Corbeau", + "RayGunnerLaser": "Rayon laser", + "RedCounterweight": "Contrepoids", + "RedsYoyo": "Yoyo", + "Retanimini": "Minirétina", + "RichGravestone1": "Pierre tombale", + "RichGravestone2": "Pierre tombale", + "RichGravestone3": "Pierre tombale", + "RichGravestone4": "Pierre tombale", + "RichGravestone5": "Pierre tombale", + "RocketFireworkBlue": "Fusée", + "RocketFireworkGreen": "Fusée", + "RocketFireworkRed": "Fusée", + "RocketFireworksBoxBlue": "Fusée", + "RocketFireworksBoxGreen": "Fusée", + "RocketFireworksBoxRed": "Fusée", + "RocketFireworksBoxYellow": "Fusée", + "RocketFireworkYellow": "Fusée", + "RocketI": "Fusée", + "RocketII": "Fusée", + "RocketIII": "Fusée", + "RocketIV": "Fusée", + "RocketSkeleton": "Fusée", + "RocketSnowmanI": "Fusée", + "RocketSnowmanII": "Fusée", + "RocketSnowmanIII": "Fusée", + "RocketSnowmanIV": "Fusée", + "RopeCoil": "Cordage", + "RottenEgg": "Œuf pourri", + "RubyBolt": "Éclair de rubis", + "RuneBlast": "Souffle de rune", + "SalamanderSpit": "Bave empoisonnée", + "SandBallFalling": "Boule de sable", + "SandBallGun": "Boule de sable", + "SandnadoFriendly": "Tempête ancienne", + "SandnadoHostile": "Tempête ancienne", + "SandnadoHostileMark": "Tempête ancienne", + "SantaBombs": "Décoration de Noël", + "Sapling": "Arbuste", + "SapphireBolt": "Éclair de saphir", + "SaucerDeathray": "Rayon de la mort martien", + "SaucerLaser": "Laser de soucoupe", + "SaucerMissile": "Fusée martienne", + "SaucerScrap": "Ferraille de soucoupe", + "SawtoothShark": "Requin-scieur", + "ScutlixLaser": "Laser", + "ScutlixLaserCrosshair": "Cible de Scutlix", + "ScutlixLaserFriendly": "Laser de Scutlix", + "Seed": "Graine", + "SeedlerNut": "Semeuse", + "SeedlerThorn": "Semeuse", + "SeedPlantera": "Graine", + "ShadowBeamFriendly": "Faisceau de l'ombre", + "ShadowBeamHostile": "Faisceau de l'ombre", + "ShadowFlame": "Flamme d'ombre", + "ShadowFlameArrow": "Flèche en flamme d'ombre", + "ShadowFlameKnife": "Couteau en flamme d'ombre", + "Shadowflames": "Flammes d'ombre", + "ShadowOrb": "Orbe de l'ombre", + "Sharknado": "Requinade", + "SharknadoBolt": "Éclair de requinade", + "Shuriken": "Shuriken", + "SilkRopeCoil": "Cordage", + "SiltBall": "Boule de vase", + "SilverCoin": "Pièce d'argent", + "SilverCoinsFalling": "Pièces d'argent", + "SkeletonBone": "Os", + "SkeletronHand": "Main de Squeletron", + "Skull": "Crâne", + "SkyFracture": "Fracture céleste", + "SlimeGun": "Pistolet à gelée", + "SlimeHook": "Grappin de gelée", + "SlushBall": "Boule de gadoue", + "SmokeBomb": "Bombe à fumée", + "SniperBullet": "Balle de sniper", + "SnowBallFriendly": "Boule de neige", + "SnowBallHostile": "Boule de neige", + "SolarCounter": "Éclat solaire", + "SolarFlareChainsaw": "Tronçonneuse de lueur solaire", + "SolarFlareDrill": "Foreuse de lueur solaire", + "SolarFlareRay": "Lueur solaire", + "SolarWhipSword": "Éruption solaire", + "SolarWhipSwordExplosion": "Éruption solaire", + "SoulDrain": "Aspire-âme", + "SoulscourgePirate": "Pirate Malâme", + "Spark": "Étincelle", + "Spazmamini": "Minispazma", + "Spear": "Lance", + "SpearTrap": "Lance", + "SpectreWrath": "Colère spectrale", + "SpelunkerGlowstick": "Bâton lumineux de spéléo", + "Spider": "Araignée", + "SpiderEgg": "Œuf d'araignée", + "SpiderHiver": "Tourelle d'araignée", + "Spike": "Pointe", + "SpikedSlimeSpike": "Pointe de gelée", + "SpikyBall": "Boule à pointes", + "SpikyBallTrap": "Boule à pointes", + "SpiritFlame": "Flamme d'esprit", + "SpiritHeal": "Soin d'esprit", + "SporeCloud": "Nuage de spores", + "SporeGas": "Spore", + "SporeGas2": "Spore", + "SporeGas3": "Spore", + "SporeTrap": "Spore", + "SporeTrap2": "Spore", + "Squashling": "Potiron", + "Stake": "Pieu", + "StarAnise": "Anis étoilé", + "StardustCellMinion": "Cellule astrale", + "StardustCellMinionShot": "Cellule astrale", + "StardustChainsaw": "Tronçonneuse astrale", + "StardustDragon1": "Dragon astral", + "StardustDragon2": "Dragon astral", + "StardustDragon3": "Dragon astral", + "StardustDragon4": "Dragon astral", + "StardustDrill": "Foreuse astrale", + "StardustGuardian": "Gardien astral", + "StardustGuardianExplosion": "Étoile scintillante", + "StardustJellyfishSmall": "Envahisseur", + "StardustSoldierLaser": "Laser astral", + "StardustTowerMark": "Marque étoilée", + "Starfury": "Furie étoilée", + "StarWrath": "Colère étoilée", + "StaticHook": "Grappin statique", + "StickyBomb": "Bombe collante", + "StickyDynamite": "Dynamite collante", + "StickyGlowstick": "Bâton lumineux collant", + "StickyGrenade": "Grenade collante", + "Stinger": "Dard", + "Stynger": "Aiguillon", + "StyngerShrapnel": "Aiguillon", + "Sunfury": "Furie solaire", + "SuspiciousTentacle": "Tentacule bizarre", + "SwordBeam": "Rayon d'épée", + "Swordfish": "Espadon", + "Tempest": "Tempête", + "TendonHook": "Crochet", + "TerraBeam": "Faisceau de Terra", + "Terrarian": "Terarrien", + "TerrarianBeam": "Terarrien", + "TheDaoofPow": "Le dao du coup", + "TheEyeOfCthulhu": "Yoyo", + "TheMeatball": "La boulette de viande", + "TheRottedFork": "La fourche pourrie", + "ThornBall": "Boule épineuse", + "ThornChakram": "Chakram épineux", + "ThornHook": "Crochet", + "ThrowingKnife": "Couteau de lancer", + "TiedEighthNote": "Note", + "TikiSpirit": "Esprit Tiki", + "TinyEater": "Mini dévoreur", + "TitaniumChainsaw": "Tronçonneuse en titane", + "TitaniumDrill": "Foreuse en titane", + "TitaniumTrident": "Trident en titane", + "Tombstone": "Pierre tombale", + "TopazBolt": "Éclair en topaze", + "TowerDamageBolt": "Énergie libérée", + "ToxicBubble": "Bulle toxique", + "ToxicCloud": "Nuage toxique", + "ToxicCloud2": "Nuage toxique", + "ToxicCloud3": "Nuage toxique", + "ToxicFlask": "Flasque toxique", + "TrackHook": "Grappin de rail", + "Trident": "Trident", + "Truffle": "Truffe", + "TruffleSpore": "Spore de truffe", + "Turtle": "Tortue", + "Twinkle": "Reflet", + "Typhoon": "Typhon", + "UFOLaser": "Rayon d'ovni", + "UFOMinion": "Ovni", + "UnholyArrow": "Flèche profane", + "UnholyTridentFriendly": "Trident profane", + "UnholyTridentHostile": "Trident profane", + "UnholyWater": "Eau profane", + "ValkyrieYoyo": "Yoyo", + "Valor": "Yoyo", + "VampireHeal": "Soin vampire", + "VampireKnife": "Couteau de vampire", + "VenomArrow": "Flèche venimeuse", + "VenomBullet": "Balle venimeuse", + "VenomFang": "Croc venimeux", + "VenomSpider": "Araignée venimeuse", + "ViciousPowder": "Poudre vicieuse", + "VilePowder": "Poudre infecte", + "VilethornBase": "Vilépine", + "VilethornTip": "Vilépine", + "VineRopeCoil": "Rouleau de liane", + "VortexAcid": "Morve d'extraterrestre", + "VortexBeater": "Batteur vortex", + "VortexBeaterRocket": "Fusée vortex", + "VortexChainsaw": "Tronçonneuse vortex", + "VortexDrill": "Foreuse vortex", + "VortexLaser": "Laser vortex", + "VortexLightning": "Foudre vortex", + "VortexVortexLightning": "Vortex", + "VortexVortexPortal": "Vortex", + "Wasp": "Guêpe", + "WaterBolt": "Sort de l'eau", + "WaterGun": "Pistolet à eau", + "WaterStream": "Jet d'eau", + "Web": "Toile", + "WebRopeCoil": "Cordage", + "WebSpit": "Bave de toile", + "WireKite": "Plans de construction", + "Wisp": "Volute", + "WoodenArrowFriendly": "Flèche en bois", + "WoodenArrowHostile": "Flèche en bois", + "WoodenBoomerang": "Boomerang en bois", + "WoodHook": "Grappin en bois", + "WoodYoyo": "Yoyo", + "WormHook": "Crochet", + "Xenopopper": "Fusil à bulles", + "Yelets": "Yoyo", + "YellowCounterweight": "Contrepoids", + "ZephyrFish": "Poisson-zéphyr", + "Ale": "Bière", + "ApprenticeStaffT3Shot": "Colère de Betsy", + "BookStaffShot": "Tome de Sagesse infinie", + "DD2ApprenticeStorm": "Tourbillon de Sagesse infinie", + "DD2BallistraProj": "Baliste", + "DD2BallistraTowerT1": "Baliste", + "DD2BallistraTowerT2": "Baliste", + "DD2BallistraTowerT3": "Baliste", + "DD2BetsyArrow": "Fléau aérien", + "DD2BetsyFireball": "Boule de feu de Betsy", + "DD2BetsyFlameBreath": "Souffle de Betsy", + "DD2DarkMageBolt": "Énergie noire", + "DD2DarkMageHeal": "Sceau noir", + "DD2DarkMageRaise": "Sceau noir", + "DD2DrakinShot": "Drakin", + "DD2ElderWins": "Fin macabre", + "DD2ExplosiveTrapT1": "Piège explosif", + "DD2ExplosiveTrapT1Explosion": "Piège explosif", + "DD2ExplosiveTrapT2": "Piège explosif", + "DD2ExplosiveTrapT2Explosion": "Piège explosif", + "DD2ExplosiveTrapT3": "Piège explosif", + "DD2ExplosiveTrapT3Explosion": "Piège explosif", + "DD2GoblinBomb": "Bombe de gobelin", + "DD2LightningAuraT1": "Aura foudroyante", + "DD2LightningAuraT2": "Aura foudroyante", + "DD2LightningAuraT3": "Aura foudroyante", + "DD2LightningBugZap": "Éclair cinglant", + "DD2OgreSmash": "Piétinement d'ogre", + "DD2OgreSpit": "Bave d'ogre", + "DD2OgreStomp": "Piétinement d'ogre", + "DD2PetDragon": "Hoardagron", + "DD2PetGato": "Gato à hélice", + "DD2PetGhost": "Allumèche", + "DD2PhoenixBow": "Fantôme Phénix", + "DD2PhoenixBowShot": "Fantôme Phénix", + "DD2SquireSonicBoom": "Lacération franche", + "DD2Win": "Victoire !", + "MonkStaffT1": "Octopode endormi", + "MonkStaffT1Explosion": "Fracas de bâton", + "MonkStaffT2": "Glaive atroce", + "MonkStaffT2Ghast": "Dratroce", + "MonkStaffT3": "Furie de dragon céleste", + "MonkStaffT3_Alt": "Furie de dragon céleste", + "MonkStaffT3_AltShot": "Furie de dragon céleste", + "DD2JavelinHostileT3": "{$ProjectileName.DD2JavelinHostile}", + "Celeb2Rocket": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketExplosive": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketLarge": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketLargeExplosive": "{$ProjectileName.Celeb2Weapon}" + } +} \ No newline at end of file diff --git a/Localization/Content/fr-FR/Town.json b/Localization/Content/fr-FR/Town.json new file mode 100644 index 0000000..c9eab87 --- /dev/null +++ b/Localization/Content/fr-FR/Town.json @@ -0,0 +1,228 @@ +{ + "DryadSpecialText": { + "WorldStatusAll": "{0} est {1} % sacré, {2} % corrompu et {3} % carmin.", + "WorldStatusHallowCorrupt": "{0} est {1} % sacré et {2} % corrompu.", + "WorldDescriptionGrim": "La situation est peu réjouissante en effet...", + "WorldDescriptionWork": "Vous avez beaucoup de travail.", + "WorldDescriptionClose": "Vous y êtes presque !", + "WorldStatusHallowCrimson": "{0} est {1} % sacré et {2} % carmin.", + "WorldStatusCorruptCrimson": "{0} est {1} % corrompu et {3} % carmin.", + "WorldStatusCorrupt": "{0} est {1} % corrompu.", + "WorldStatusCrimson": "{0} est {1} % carmin.", + "WorldStatusHallow": "{0} est {1} % sacré.", + "WorldStatusPure": "{0} est complétement purifié. Tu as fait un travail incroyable !", + "WorldDescriptionBalanced": "Le monde est en harmonie.", + "WorldDescriptionFairyTale": "Nous vivons dans un conte de fées.", + "Party": "Je pensais organiser une fête pour célébrer nos victoires du passé, et celles à venir.", + "AfterDD2Tier1": "Quand j'étais à Etheria, je me sentais vraiment déconnectée de {WorldName}. Ça fait du bien d'être de retour.", + "AfterDD2Tier2": "La Corruption a essayé de m'avoir quand j'étais à Etheria, mais j'ai réussi à utiliser ses pouvoirs contre l'armée de l'Ancien !" + }, + "DyeTraderSpecialText": { + "HasPlant_0": "Fantastique ! Tu m'as apporté un échantillon exquis des magnifiques couleurs et arômes du monde. En échange, je t'offre cette bouteille spéciale de teinture.", + "HasPlant_1": "Tu m'apportes une fleur aussi magnifique que rare... oui, oui ? Prends cette bouteille de teinture spéciale pour ta peine !", + "HasPlant_2": "Absolument fantabuleux ! Avec ce spécimen délicat, je pourrais mélanger les teintures les plus incroyables jamais vues dans {WorldName} ! Tu peux prendre celle-ci tout de suite !", + "NoPlant_0": "Oh, non, non, ça n'ira pas. Pour ceci, l'argent ne sert à rien, tu dois revenir avec un spécimen de plante rare !", + "NoPlant_1": "Tu penses pouvoir jouer un tour à {DyeTrader}, ça m'étonnerait ! Je ne prends que les fleurs les plus rares pour ces bouteilles. Elles sont très spéciales !", + "NoPlant_2": "Ces bouteilles de teinture ? Désolé, l'argent ne les achète pas. Je n'accepte que la flore la plus rare et la plus précieuse en échange !", + "Party": "J'adore les fêtes, il y a tellement de magnifiques couleurs et de gens heureux." + }, + "GuideSpecialText": { + "Party": "C'est ta première fête ? Tu devrais parler aux autres. Certaines personnes apportent parfois des cadeaux." + }, + "MerchantSpecialText": { + "Party": "Tu sais ce qui serait le meilleur moyen de faire la fête ? Acheter des cadeaux pour les autres, surtout pour moi." + }, + "GoblinTinkererSpecialText": { + "Party": "Les fêtes de gobelins sont les mêmes que celles des humains. Elles ont toutes des jeux du style : \"Rejeter la faute sur l'humain\" euh... Je ne joue pas à ce jeu dans mes fêtes." + }, + "WitchDoctorSpecialText": { + "Party": "Je voulais voir comment tu fais la fête, je ne suis pas déçu.", + "AfterDD2Tier1": "Je sens qu'il existe un esprit semblable dans les mages noirs d'Etheria. Dommage qu'ils soient nos ennemis, j'aurais aimé apprendre à ses côtés." + }, + "ClothierSpecialText": { + "Party": "Maman disait toujours qu'il faut laisser le passé au passé et continuer la fête." + }, + "TravellingMerchantSpecialText": { + "Party": "Beaucoup disent que les fêtes sont les plus riches souvenirs. Alors, achète quelque chose et enrichis ton souvenir !" + }, + "MechanicSpecialText": { + "Party": "Tu penses que ça posera problème si je branche des ampoules sur le gâteau au lieu de bougies ?" + }, + "BartenderSpecialText": { + "AfterDD2Tier1": "Bravo, tu as réussi à vaincre l'armée de l'Ancien ! Mais je suis sûr qu'on les reverra, ils n'ont pas beaucoup résisté cette fois-ci.", + "AfterDD2Tier2": "L'armée de l'Ancien ne fait que se renforcer, mais tu continues de les repousser ! Quelque chose me dit qu'ils n'en ont pas encore fini avec nous.", + "AfterDD2Tier3": "Tu as vraiment réussi à repousser l'armée de l'Ancien ? Tu devrais visiter Etheria un de ces jours.", + "BeforeDD2Tier1": "Nous devrions vraiment faire quelque chose à propos de l'armée de l'Ancien. Viens me voir si tu veux en savoir plus sur le cristal Eternia.", + "FirstHelp": "Pour commencer, prends ces médailles de défenseur, c'est gratuit ! J'ai quelques défenses spéciales que tu peux acheter, mais seulement avec des médailles de défenseur !", + "FirstMeeting": "Hein ? Comment suis-je arrivé ici ? Je me souviens juste d'un portail qui s'est ouvert devant moi..." + }, + "PartyGirlSpecialText": { + "Party_1": "Hmm ? Rien de spécial... je plaisante ! C'est l'heure de la fête, puis de l'after !", + "Party_2": "Enfin, mon heure est venue !", + "AfterDD2Tier1": "Avez-vous déjà vu un ogre ? Je suis monté sur le dos d'un !" + }, + "PirateSpecialText": { + "Party": "Après tout ce gâteau, on pourra m'appeler Barbe-Blanche quelque temps." + }, + "TruffleSpecialText": { + "Party": "J'aurai bien invité tout le monde chez moi, mais ce serait une clavaire." + }, + "NurseSpecialText": { + "Party": "Non, je ne te dirai pas combien de bougies il y a sur mon gâteau." + }, + "WizardSpecialText": { + "Party": "Il est évident que mes fêtes sont magiques.", + "AfterDD2Tier1": "Tu sais, je crois avoir déjà vu un portail de ce genre, mais il était en or." + }, + "CyborgSpecialText": { + "Party": "Cette fête va être géante !" + }, + "DemolitionistSpecialText": { + "Party": "Tu devrais faire attention aujourd'hui. Nous, les nains, avons tendance à organiser des fêtes explosives.", + "AfterDD2Start": "Je ne vois pas pourquoi on ne peut pas simplement faire exploser ces portails." + }, + "ArmsDealerSpecialText": { + "Party": "Les fêtes sont géniales pour que les gens s'éclatent, comme des bombes." + }, + "StylistSpecialText": { + "Party": "J'aurais pu me coiffer juste pour l'occasion, mais je préfère éclater des ballons avec mes ciseaux." + }, + "PainterSpecialText": { + "Party": "J'ai essayé de faire une bataille de peinture, mais les gens voulaient à manger et des décorations." + }, + "AnglerSpecialText": { + "Party": "Comment ? Tu penses que j'aime les fêtes parce que je suis un enfant ? Eh bien, tu as raison, maintenant va t'amuser !" + }, + "AnglerQuestText": { + "NoQuest_1": "Je n'ai rien pour toi pour l'instant.", + "NoQuest_2": "Tu m'as assez diverti aujourd'hui, va-t'en.", + "NoQuest_3": "Tu as terminé, le grand {Angler} te congédie !", + "NoQuest_4": "Un poisson par jour et c'est tout, je te prie de partir !", + "NoQuest_5": "J'ai toujours le dernier poisson que tu m'as apporté. Je n'en veux pas d'autres.", + "TurnIn_1": "Oh ! Merci, c'est le poisson que je voulais ! Maintenant, du balai !", + "TurnIn_2": "Belle prise ! Tout se passe comme prévu ! Hé, hé, hé !", + "TurnIn_3": "Tu es un bon coursier ! Maintenant, va-t'en !", + "TurnIn_4": "Mouah, ah, ah, ah ! Tu as réussi ! Mais tu n'as même pas une égratignure, quelle déception !", + "TurnIn_5": "Ouah ! Tu as fait ce que je voulais et tu as survécu ! Super, donne-le-moi et déguerpis !", + "Quest_Batfish": "Na na na na na na na Bat-POISSON ! Va creuser dans les souterrains, attrape-le et rapporte-le-moi !\n\n(Se trouve dans le souterrain et les grottes)", + "Quest_BumblebeeTuna": "La jungle souterraine de {WorldName} contient les choses les plus bizarres ! Comme ce poisson qui ressemble à un énorme bourdon ! Je suis allergique aux abeilles, alors tu iras me le chercher ! Je parie qu'il a le même goût qu'un sandwich au thon et au miel !\n\n(Se trouve dans le miel)", + "Quest_Catfish": "J'ai enfin trouvé un chat de la jungle qui aime l'eau ! Je crois que c'est parce qu'il est à moitié poisson. Je ne sais pas le pourquoi du comment, et je ne veux pas le savoir. Je veux simplement l'avoir en mains, et plus vite que ça !\n\n(Se trouve à la surface de la jungle)", + "Quest_Cloudfish": "Il existe une rumeur à propos d'île flottant dans le ciel et leurs incroyables trésors ! Enfin peu importe. Ce qui est vraiment cool, c'est que parfois des lacs se forment dans les nuages, et qu'on peut y trouver des poissons-nuages ! Je veux savoir quel goût ils ont, alors tu ferais mieux de m'en attraper un !\n\n(Se trouve dans les lacs célestes)", + "Quest_Cursedfish": "Il existe un poisson maudit dans les eaux profondes de la corruption ! Il a été forgé dans les flammes maudites provenant des horreurs déchues qui se tapissent dans les profondeurs. On dit que même l'eau ne peut éteindre ce feu. Qu'il peut brûler pour l'éternité. J'ai quelques idées pour préparer un poisson comme ça ! Tu vas me le chercher ou tu te dégonfles ?\n\n(Se trouve dans la corruption)", + "Quest_DynamiteFish": "Le démolisseur était furieux parce qu'il avait perdu un bâton de dynamite dans le lac à l'orée de la forêt. Il en a tellement, pourquoi en faire tout un plat ? Apparemment, il lui aurait poussé des nageoires et il serait parti en nageant ! Je ne sais pas où il va chercher ses matériaux, mais celui-ci est possédé ! Attrape-le et rapporte-le-moi, j'ai toujours voulu un poisson suicidaire ! Ne me demande pas pourquoi...\n\n(Se trouve à la surface)", + "Quest_EaterofPlankton": "Je parie que tu n'as pas le courage de trouver le Mangeur de plancton. Un bout sectionné du Dévoreur des mondes a muté et est devenu un poisson corrompu ! Capture-le et apporte-le-moi ; prouve-moi que tu n'es pas une mauviette !\n\n(Se trouve dans la corruption)", + "Quest_FallenStarfish": "J'adore collectionner ces étoiles brillantes qui tombent du ciel ! J'adore encore plus quand elles tombent sur la tête de quelqu'un. Mais... le mieux, c'est une étoile qui tombe dans un lac de la forêt et qui se transforme en poisson ! C'est juste énorme, et tu es assez cool pour l'attraper !\n\n(Se trouve dans les lacs célestes)", + "Quest_TheFishofCthulu": "Apparemment, les Yeux de démon peuvent être amphibiens. Ils ne volent pas, ils nagent ! J'aimerais bien voir la tête que quelqu'un ferait en les trouvant dans sa baignoire ! Ils sont dans les mêmes régions. Et tu vas m'en attraper un !\n\n(Se trouve dans les lacs célestes et à la surface)", + "Quest_Fishotron": "Je ne sais pas ce qui est pire : des arêtes ou des arêtes avec des MAINS. Ce poissomate au fin fond des grottes me donne vraiment la trouille ! Je pense qu'il est possédé par les mêmes esprits maléfiques que le vieil homme près du donjon ! Je te mets au défi de l'attraper !\n\n(Se trouve dans les grottes)", + "Quest_Harpyfish": "J'essayais de dormir près de la colline du lac quand ce poisson m'a plongé dessus. Il volait ! Mais il avait un visage de femme et des plumes ! J'ai dû crier plus qu'elle ! Hé, va donc lui faire payer de m'avoir tant effrayé !\n\n(Se trouve dans les lacs célestes et à la surface)", + "Quest_Hungerfish": "Un bout de la Famine du Mur de chair s'est transformé en un petit poisson qui erre dans le souterrain. Il est dégoûtant, et je le veux immédiatement !\n\n(Se trouve dans les grottes)", + "Quest_Ichorfish": "Sais-tu qu'au fin fond du carmin, des créatures produisent ce truc jaune dégoûtant ? J'ai entendu une histoire incroyable : un bassin qui en serait rempli aurait fondu et pris la forme d'un poisson et se serait mis à nager ! Attrape-le-moi ; je veux le mettre dans les toilettes de quelqu'un !\n\n(Se trouve dans le carmin)", + "Quest_Jewelfish": "Oooooh, je vais devenir SUPER riche ! Au fond des grottes, un poisson est couvert de pierres précieuses ! Je ne connais pas les détails, je sais juste que ce poisson est super cool et que tu vas me le pêcher !\n\n(Se trouve dans le souterrain et les grottes)", + "Quest_MirageFish": "Il y a des créatures intéressantes à trouver au fond du monde sacré, crois-moi ! Elles brillent de cet étrange violet qui me fait mal aux yeux ! C'est juste trop fort, alors je compte sur toi pour m'en rapporter une !\n\n(Se trouve dans le sacré souterrain)", + "Quest_MutantFlinxfin": "Qu'est-ce qui a le poil blanc et fauve et qui vit dans un lac souterrain gelé ? Un nage-flinx mutant ! Je ne blaguais pas. Il existe vraiment une variété mutante de Flinx mieux adaptée à la vie aquatique ! Je veux qu'il s'adapte à mon aquarium, alors à toi de jouer !\n\n(Se trouve dans la toundra souterraine)", + "Quest_Pengfish": "C'est une baleine ! C'est un dauphin ! Non, c'est un poichot ! Oh et regarde ! C'est toi ! C'est toi qui vas me l'apporter ! Tu sais qu'ils n'aiment que l'eau froide, n'est-ce pas ?\n\n(Se trouve dans la toundra)", + "Quest_Pixiefish": "Il y a un type très rare de fée qui naît avec tellement d'ailes qu'elle ne peut pas voler ! Elle nage avec les poissons dans les lacs entourés de cette herbe bleue. J'ai besoin d'une lampe dans mon aquarium, alors, attrape-moi une fée !\n\n(Se trouve dans le sacré)", + "Quest_Spiderfish": "J'ai vu un poisson à huit pattes ! Non ! Impossible ! Tu vas l'attraper et je ne le veux pas vivant quand je le tiendrai ! C'est la dernière fois que je vais pêcher aussi loin dans la grotte !\n\n(Se trouve dans le souterrain et les grottes)", + "Quest_UnicornFish": "Les licornes et les arcs-en-ciel sont vraiment super ! Ils sont partout, même dans l'eau. Non, sans rire, j'ai vu un licoisson dans le lac sacré ! Ta mission est de me le pêcher, je le veux comme animal de compagnie !\n\n(Se trouve dans le sacré)", + "Quest_GuideVoodooFish": "Ces démons du souterrain aiment vraiment les poupées vaudou, mais je crois qu'une de ces poupées a reçu bien trop de magie ! Elle s'est transformée en poisson et elle fait ce qu'elle veut. Je te demande d'aller m'en chercher une ! Fais attention à la lave en ébullition, parce que ça brûle et ça, ça ne m'aidera pas avec mon poisson !\n\n(Se trouve dans les grottes)", + "Quest_Wyverntail": "Je sais quelque chose que tu ne sais pas ! D'accord, je vais tout te dire. Une créature terrifiante vole parmi les étoiles ! Si, c'est vrai ! C'est une « vouivre » ! Mais, tu le savais déjà, n'est-ce pas ? Par contre, tu ne sais sûrement pas que cette créature s'élève comme un têtard ! En fait, c'est... une grenouille ! Saute sur l'occasion pour m'en rapporter une !\n\n(Se trouve dans les lacs célestes)", + "Quest_ZombieFish": "Tu ne vas pas me croire ! J'ai attrapé un poisson qui était déjà mort dans la forêt et de nuit ! Et il a essayé de me manger ! Je l'ai jeté et je suis parti en courant ! Mais j'aimerais le mettre dans l'armoire de quelqu'un pour voir sa réaction. Peux-tu aller me le chercher ?\n\n(Se trouve à la surface)", + "Quest_AmanitaFungifin": "J'ai trouvé un endroit spectaculaire couvert de champignons luisants ! Tout était bleu ! Je ramassais des champignons près d'un lac bleu scintillant lorsque l'un d'eux m'a mordu la main avant de s'enfuir en nageant ! Je veux lui redonner la monnaie de sa pièce et le mordre un bon coup ! Ce que je veux dire, c'est que tu dois le retrouver !\n\n(Se trouve dans les champs de champignons luisants)", + "Quest_Angelfish": "Connais-tu les îles magiques qui flottent dans le ciel ? Je parie que non ! On dit que des anges y vivent et je crois qu'ils ont des nageoires et des branchies et qu'ils nagent ! Tu devrais m'en attraper un !\n\n(Se trouve dans les lacs célestes)", + "Quest_BloodyManowar": "Aïe ! Ne t'approche pas ! Je me suis fait piquer par une méduse sanglante ! Au cas où vous ne sauriez pas ce que c'est, c'est la méduse la plus dangereuse du monde {WorldName} ! Va dans cet horrible carmin et essaie de l'attraper ! \n\n(Se trouve dans le carmin)", + "Quest_Bonefish": "En général, ça m'est bien égal de voir des arêtes qui flottent dans les eaux souterraines, mais celles-ci nagent ! Eh bien, croyais-tu que seuls les squelettes humains pouvaient s'agiter dans ce monde ? {WorldName} Attrape-le-moi pour que je le mette dans le lit de quelqu'un !\n\n(Se trouve dans le souterrain et les grottes)", + "Quest_Bunnyfish": "Je pêchais dans la forêt, oui ? Et devine quoi ! Un lapin s'approche de moi ! Puis un autre vient en sautant, et encore un... tout à coup, il y en a partout ! Il y en a même un qui s'est approché en nageant, mais il n'avait pas de pattes ! J'en suis tombé par terre et tous les lapins se sont enfuis ! Je veux adopter ce poisson-lapin, alors, tu ferais mieux d'aller l'attraper ! Et que ça saute !\n\n(Se trouve à la surface)", + "Quest_CapnTunabeard": "Arrgg moussaillon ! Ça me donne des frissons ! Avast, coquins ! Un capitaine pirate avait jadis un animal qu'il appelait Cap'taine Barbethon, mais en pleine tempête, l'aquarium tomba à la mer ! Sa queue est un crochet, il a un bandeau sur l'œil, tout comme un pirate ! Tu dois m'attraper ce poisson ; je veux être aussi cool qu'un pirate ! De toute évidence, il se trouve dans l'océan... quelque part ! Sans blague !\n\n(Se trouve dans l'océan)", + "Quest_Clownfish": "J'ai vu ce poisson orange et coloré près de l'océan, il avait l'air paniqué comme s'il cherchait un parent ! Va l'attraper et peut-être qu'un autre viendra aussi le chercher désespérément !\n\n(Se trouve dans l'océan)", + "Quest_DemonicHellfish": "On dit en enfer que le roi de tous les démons serait un poisson ! Imaginez un peu le pouvoir absolu que j'aurais si tu me l'attrapais !\n\n(Se trouve dans les grottes)", + "Quest_Derpfish": "Je n'ai jamais vu créature plus effrayante que ces benêts de la jungle ! Heureusement que parfois, ils n'ont pas de pattes ! Ceux-ci vivent dans l'eau et sont bien moins terrifiants ! J'aimerais bien que tu m'en attrapes un pour que j'y goûte sans mourir de peur !\n\n(Se trouve à la surface de la jungle)", + "Quest_Fishron": "Une légende parle d'un être puissant nommé Dracosson ! C'est un mélange de cochon, de dragon et de POISSON ! On dit qu'il vit dans les lacs gelés souterrains des régions les plus froides du monde ! Je ne veux pas y aller ; c'est TOI qui l'attraperas. Et tu as intérêt de la rapporter ! J'ai hâte de le voir !\n\n(Se trouve dans la toundra souterraine)", + "Quest_InfectedScabbardfish": "Un poisson très long qui ressemble à un fourreau d'épée nage dans les eaux troubles de la corruption ! On dirait de la pierre d'ébène ; ne te fais pas avoir ! Oui, toi. C'est toi qui va l'attraper, pas moi !\n\n(Se trouve dans la corruption)", + "Quest_Mudfish": "Attention où tu patauges dans les eaux de la jungle ! Pourquoi ? Non, je n'ai pas peur que tu te fasses dévorer par les piranhas. C'est juste que je ne veux pas que tu marches sur mon poisson préféré, le Vaseux ! J'aimerais bien que tu m'en rapportes un pour que je l'adopte !\n\n(Se trouve dans la jungle)", + "Quest_TropicalBarracuda": "Les piranhas et les requins sont moches ! Trop moches ! Sais-tu qu'il existe un très joli poisson ? Enfin, il peut quand même te croquer la tête. Je donnerai deux pièces de platine pour voir ça, d'ailleurs... Bref, j'aimerais que tu m'en attrapes un. Mais avant qu'il te croque la tête !\n\n(Se trouve à la surface de la jungle)", + "Quest_TundraTrout": "Te demandes-tu parfois pourquoi la surface des zones enneigées de {WorldName} ne gèlent jamais ? Pas moi. Par contre, les poissons gèlent ! Un poisson de glace serait une belle offrande au puissant et incroyable {Angler} ! Mon loyal sujet, rapporte-moi cette truite de la toundra au plus vite !\n\n\n(Se trouve à la surface de la toundra)" + }, + "AnglerChatter": { + "Chatter_1": "Pourquoi {Bartender} ne veut pas me vendre de bière ? Je veux y goûter ! Quel ronchon !" + }, + "BartenderChatter": { + "Chatter_1": "Avec ça, on ne te mettra pas en bière ! T'as saisi ? Bière ? Non ?", + "Chatter_10": "Tu crois que {Steampunker} a un autre de ces pistolets ? Je connais une sorcière qui en voudrait un.", + "Chatter_11": "Pas étonnant que {Demolitionist} a tant d'accidents. T'imagines même pas la quantité de bière qu'il m'achète.", + "Chatter_12": "Normalement, je n'aime pas trop les gobelins, mais {GoblinTinkerer} semble être quelqu'un de bien.", + "Chatter_13": "{?Day}Quelqu'un sait par où est allée la dryade ?", + "Chatter_14": "{?!Day}C'est vraiment très calme par ici. Un peu trop...", + "Chatter_15": "{?!Day}Viens me voir et fais ton boulot.", + "Chatter_16": "{?BloodMoon}Tu sais, d'où je viens, une lune de sang est juste une excuse pour prendre l'air.", + "Chatter_17": "{?MoonLordDefeated}Le Seigneur de la lune, tu veux dire le Seigneur des Abysses ?", + "Chatter_18": "{?HardMode}Je connais un lavemancien qui aimerait vraiment cette pierre d'enfer dans le souterrain.", + "Chatter_19": "{?Homeless}Tu connais un bon endroit pour installer une boutique ? J'aimerais ouvrir un bar.", + "Chatter_2": "On dit que ta force est grande. Laisse-moi en être le juge.", + "Chatter_3": "D'où je viens, on ne sert que de la bière de racines...", + "Chatter_4": "C'est beaucoup mieux que de nettoyer cette table toute la journée.", + "Chatter_5": "La vie est un défi quand tu es naturellement meilleur que les autres.", + "Chatter_6": "Qu'est-ce que je fais ici...", + "Chatter_7": "Beaucoup de ténacité et une once de chance peuvent aller loin...", + "Chatter_8": "As-tu vu des Meburs par ici ?", + "Chatter_9": "{Dryad} a l'air sympa. Je devrais la ramener avec moi." + }, + "BartenderHelpText": { + "Help_1": "Ce que tu dois d'abord connaitre, ce sont les artefacts spéciaux de défense que j'ai à vendre, mais uniquement si tu as des médailles de défenseur !", + "Help_10": "Si tu repousses l'invasion, tu recevras davantage de médailles de défenseur que tu peux m'apporter pour acheter des artefacts et autres récompenses spéciales !", + "Help_11": "J'ai aussi entendu dire que le pouvoir des artefacts peut être déverrouillé si tu arrives à vaincre l'armée de l'Ancien. Tu pourrais les utiliser quand tu le souhaites !", + "Help_2": "Tu peux utiliser ces artefacts pour créer des pièges et des tours défensives. Ceci consomme du mana d'Etheria, une énergie spéciale que seuls les membres de l'armée de l'Ancien peuvent laisser tomber !", + "Help_3": "Affronter l'armée de l'Ancien est assez simple. Ses membres sont attirés par le pouvoir des cristaux Eternia ; tu peux les utiliser pour les appâter.", + "Help_4": "Pour placer un cristal Eternia, tu dois en obtenir un, ainsi qu'un support pour le placer dessus. Il se trouve que je peux te les vendre !", + "Help_5": "Tu devras placer ton support de cristal Eternia dans une zone ouverte et plate. S'il y a des murs ou autre, tu pourrais avoir du mal à le protéger !", + "Help_6": "Une fois que ton support est installé, interagis avec en tenant un cristal Eternia et prépare-toi à combattre !", + "Help_7": "Bien entendu, tu ne peux pas laisser l'armée de l'Ancien détruire le cristal Eternia ! Ceci aurait des conséquences catastrophiques pour mon monde, Etheria !", + "Help_8": "Tu peux placer des défenses pour 10 points de mana d'Etheria. Une fois placé, le cristal libèrera du mana. Autrement, tu devras vaincre les ennemis pour en obtenir davantage.", + "Help_9": "Avec l'aide des défenses, tu devras repousser plusieurs vagues d'envahisseurs qui tentent de t'anéantir et de détruire le cristal Eternia !" + }, + "BartenderNames": { + "Name_1": "Ted", + "Name_10": "Javahawk", + "Name_11": "Elandrian", + "Name_12": "Driscan", + "Name_13": "Iamisom", + "Name_14": "Blacksmith", + "Name_15": "Dani Moo", + "Name_16": "Paddy", + "Name_2": "Serveur", + "Name_3": "Jerry", + "Name_4": "Bill", + "Name_5": "Ernest", + "Name_6": "William", + "Name_7": "Dale", + "Name_8": "Bruce", + "Name_9": "Moe" + }, + "CyborgChatter": { + "Chatter_1": "{Bartender} m'a dit que je lui rappelais une certaine « EV2 ». Je devrais peut-être la rencontrer." + }, + "GoblinTinkererChatter": { + "Chatter_1": "Tu sais, ces gobelins d'Etheria ne ressemblent en rien à mon peuple. Ils sont vraiment bagarreurs... Enfin, mon peuple n'est pas beaucoup mieux..." + }, + "GuideHelpText": { + "Help_1063": "Normalement, j'essaierai de tout t'apprendre sur l'armée de l'Ancien, mais tu devrais plutôt demander à {Bartender}." + }, + "MechanicChatter": { + "Chatter_1": "{Bartender} m'a offert une bière de racines, je lui ai demandé de me la donner dans un verre carré." + }, + "NurseChatter": { + "Chatter_1": "Je n'arrête pas de demander du vin, mais {Bartender} ne fait que me donner des chopes de bière." + }, + "PirateChatter": { + "Chatter_1": "Enfin, nous avons un bar dans le coin ! Mon rhum est presque fini !" + }, + "StylistChatter": { + "Chatter_1": "J'ai offert à {Bartender} une petite coupe gratuite, mais il a refusé. Enfin, j'aurais au moins pu travailler sur sa moustache !" + }, + "TownNPCHousingFailureReasons": { + "HoleInWallIsTooBig": "Il manque un mur à cette pièce.", + "RoomCheckStartedInASolidTile": "C'est un bloc solide !", + "RoomIsTooBig": "Cette pièce est trop grande", + "RoomIsTooSmall": "Cette pièce est trop petite", + "TooCloseToWorldEdge": "We need better text for this!!!" + } +} \ No newline at end of file diff --git a/Localization/Content/it-IT.json b/Localization/Content/it-IT.json new file mode 100644 index 0000000..d0deebf --- /dev/null +++ b/Localization/Content/it-IT.json @@ -0,0 +1,697 @@ +{ + "GameTitle": { + "0": "Terraria: Scava contadino, scava!", + "1": "Terraria: Terra epica", + "10": "Terraria: Il blocco dello scavatore", + "11": "Terraria: Niente mucche", + "12": "Terraria: Bulbi oculari dallo sguardo sospetto", + "13": "Terraria: Erba viola!", + "14": "Terraria: Nessuno resta indietro!", + "15": "Terraria: La cascata dei contenuti!", + "16": "Terraria: Materialista", + "17": "Terraria: Dig Dug mi fa un baffo", + "18": "Terraria: Tutto è bene...", + "19": "Terraria: Argilla del giudizio", + "2": "Terraria: Adamantino!", + "20": "Terraria: Problema terrestre", + "21": "Terraria: Simulatore di scoperta ossessivo compulsiva", + "22": "Terraria: Redenzione del diavolo rosso", + "23": "Terraria: Ascesa degli slime", + "24": "Terraria: Ancora più strumenti letali!", + "25": "Terraria: Le voci della morte delle guide erano esageratissime", + "26": "Terraria: Colpa degli attrezzi...", + "27": "Terraria: Uno speleologo dice \"Che cosa?\"", + "28": "Terraria: E quando ho detto di un \"aggiornamento per PC\"...", + "29": "Terraria: Che i blocchi siano con voi", + "3": "Terraria: La sabbia è stata conquistata", + "30": "Terraria: Meglio della vita", + "31": "Terraria: Terraria: Terraria:", + "32": "Terraria: Ora in 1D", + "33": "Terraria: Prossimamente sui computer di casa vostra", + "34": "Terraria: Dividendo per zero", + "35": "Terraria: Ora con tanto di AUDIO", + "36": "Terraria: Premere ALT+F4", + "37": "Terraria: Colpa degli attrezzi", + "38": "Terraria: Semini sabbia?", + "39": "Terraria: È un bel giorno per scavare", + "4": "Terraria parte 3: Il ritorno della guida", + "40": "Terraria: Puoi riscavare?", + "41": "Terraria: Non saprei!", + "42": "Terraria: Cos'è quel coso con gli spuntoni viola?", + "43": "Terraria: Voglio essere la guida", + "44": "Terraria: Cthulhu è pazzo... e gli manca un occhio!", + "45": "Terraria: LE API NOOOOO!!!", + "46": "Terraria: Leggenda di Maxx", + "47": "Terraria: Culto di Cenx", + "48": "Terraria 2: Boogaloo elettrico", + "49": "Terraria: Prova anche Minecraft!", + "5": "Terraria: Una storia da conigli", + "51": "Terraria: Voglio soltanto sapere dov'è l'oro!", + "52": "Terraria: Ora con più papere!", + "53": "Terraria: 9 + 1 = 11", + "54": "Terraria: Plantera infinita", + "6": "Terraria: Dottor Ossa e il tempio della Luna di Sangue", + "7": "Terraria: Slimeassic Park", + "8": "Terraria: L'erba è più verde da questo lato", + "9": "Terraria: Piccoli blocchi, non per bambini al di sotto dei 5 anni", + "55": "Terraria: Zitto e scava, gaiden!" + }, + "Achievements": { + "ARCHAEOLOGIST_Description": "Uccidi il dottor Ossa.", + "ARCHAEOLOGIST_Name": "Archeologo", + "BALEFUL_HARVEST_Description": "Raggiungi la 15ª ondata della luna a zucca, dove il male è in agguato nel raccolto autunnale.", + "BALEFUL_HARVEST_Name": "Raccolto funesto", + "BEGONE_EVIL_Description": "Distruggi un demone o un altare cremisi con un potente martello sacro.", + "BEGONE_EVIL_Name": "Vade retro!", + "BEHIND_THE_MASK_Description": "Uccidi il cultista matto, un mago folle con potenti incantesimi.", + "BEHIND_THE_MASK_Name": "Dietro la maschera", + "BIG_BOOTY_Description": "Apri una delle casse più grandi e misteriose del dungeon con una chiave speciale.", + "BIG_BOOTY_Name": "Gran bottino", + "BLOODBATH_Description": "Sopravvivi a una Luna di Sangue, evento notturno in cui i fiumi si tingono di rosso e tutto si riempie di mostri.", + "BLOODBATH_Name": "Bagno di sangue", + "BONED_Description": "Sconfiggi Skeletron, il guardiano maledetto del dungeon.", + "BONED_Name": "Disossato", + "BUCKETS_OF_BOLTS_Description": "Sconfiggi le tre minacce meccaniche notturne: i Gemelli, il Distruttore e lo Skeletron primario.", + "BUCKETS_OF_BOLTS_Name": "Un sacco di bulloni", + "BULLDOZER_Description": "Distruggi un totale di 10.000 mattonelle.", + "BULLDOZER_Name": "Bulldozer", + "ChallengerCategory": "Sfidante", + "CHAMPION_OF_TERRARIA_Description": "Sconfiggi il Signore della Luna.", + "CHAMPION_OF_TERRARIA_Name": "Campione di Terraria", + "CollectorCategory": "Collezionista", + "Completed": "Obiettivo completato! {0}", + "COMPLETELY_AWESOME_Description": "Ottieni un Minishark.", + "COMPLETELY_AWESOME_Name": "Assolutamente fantastico", + "DAVY_JONES_LOCKER_Description": "Sconfiggi l'Olandese Volante, la nave pirata dei cieli.", + "DAVY_JONES_LOCKER_Name": "In fondo al mare", + "DECEIVER_OF_FOOLS_Description": "Uccidi una ninfa.", + "DECEIVER_OF_FOOLS_Name": "Ingannatrice degli stolti", + "DO_YOU_WANT_TO_SLAY_A_SNOWMAN_Description": "Trionfa sulla legione del gelo, un'allegra famigliola di pupazzi di neve impazziti.", + "DO_YOU_WANT_TO_SLAY_A_SNOWMAN_Name": "Vuoi uccidere un pupazzo?", + "DRAX_ATTAX_Description": "Fabbrica una perforascia o un piccone usando barre consacrate e le anime di tre boss meccanici.", + "DRAX_ATTAX_Name": "Attacco con perforascia", + "DUNGEON_HEIST_Description": "Ruba una chiave agli abitanti non-morti del dungeon e sblocca una delle loro preziose casse d'oro.", + "DUNGEON_HEIST_Name": "Rapina nel dungeon", + "DYE_HARD_Description": "Equipaggia una tintura in ogni slot per tinture.", + "DYE_HARD_Name": "Tinture a gogò", + "ExplorerCategory": "Esploratore", + "EXTRA_SHINY_Description": "Estrai un potente minerale che è stato di recente donato al tuo mondo.", + "EXTRA_SHINY_Name": "Super brillante!", + "EYE_ON_YOU_Description": "Sconfiggi l'Occhio di Cthulhu, una minaccia oculare che appare soltanto di notte.", + "EYE_ON_YOU_Name": "L'occhio ti osserva", + "FASHION_STATEMENT_Description": "Equipaggia armatura o abbigliamento estetico in tutti e tre gli slot estetici.", + "FASHION_STATEMENT_Name": "Affermazione di stile", + "FAST_AND_FISHIOUS_Description": "Completa la 50ª missione per il pescatore.", + "FAST_AND_FISHIOUS_Name": "Pesca veloce", + "FISH_OUT_OF_WATER_Description": "Sconfiggi il duca pesce drago, terrore mutante dei mari.", + "FISH_OUT_OF_WATER_Name": "Pesce fuor d'acqua", + "FREQUENT_FLYER_Description": "Spendi più di 1 moneta d'oro per farti curare da un'infermiera.", + "FREQUENT_FLYER_Name": "L'assiduo viaggiatore", + "FUNKYTOWN_Description": "Crea o trova un campo di funghi luminosi sulla superficie.", + "FUNKYTOWN_Name": "Città sballata", + "GELATIN_WORLD_TOUR_Description": "Sconfiggi tutti gli slime che trovi!", + "GELATIN_WORLD_TOUR_Name": "Tour del mondo gelatinoso", + "GET_A_LIFE_Description": "Consuma un frutto di vita che cresce nel folto della giungla.", + "GET_A_LIFE_Name": "Fatti una vita", + "GLORIOUS_GOLDEN_POLE_Description": "Ottieni una canna da pesca dorata.", + "GLORIOUS_GOLDEN_POLE_Name": "Canna dorata magnifica", + "GOBLIN_PUNTER_Description": "Trionfa su un'invasione di goblin, un reggimento di guerrieri crudeli e barbarici dalle orecchie appuntite e stregoni della fiamma d'ombra.", + "GOBLIN_PUNTER_Name": "Sfida goblin", + "GOOD_LITTLE_SLAVE_Description": "Completa la 10ª missione per il pescatore.", + "GOOD_LITTLE_SLAVE_Name": "Schiavetto", + "HEAD_IN_THE_CLOUDS_Description": "Indossa un paio di ali.", + "HEAD_IN_THE_CLOUDS_Name": "Testa tra le nuvole", + "HEART_BREAKER_Description": "Scopri e distruggi il tuo primo cuore di cristallo sottoterra.", + "HEART_BREAKER_Name": "Spezzacuori", + "HEAVY_METAL_Description": "Ottieni un'incudine di ferro o piombo.", + "HEAVY_METAL_Name": "Metallo pesante", + "HEX_EDUCATION_Description": "Sconfiggi un goblin evocatore, stregone delle fiamme più oscure.", + "HEX_EDUCATION_Name": "Educazione al malocchio", + "HOLD_ON_TIGHT_Description": "Equipaggia il tuo primo rampino.", + "HOLD_ON_TIGHT_Name": "Tieniti forte!", + "ICE_SCREAM_Description": "Raggiungi la 15ª ondata della luna del gelo, dove la stagione festiva degenera rapidamente in follia.", + "ICE_SCREAM_Name": "Urla di ghiaccio", + "INDEPENDENCE_DAY_Description": "Sconfiggi una nave ammiraglia, mente suprema dei marziani invasori.", + "INDEPENDENCE_DAY_Name": "Il giorno dell'indipendenza", + "INTO_ORBIT_Description": "Da qui si può solo scendere!", + "INTO_ORBIT_Name": "In orbita", + "ITS_GETTING_HOT_IN_HERE_Description": "Scava abbastanza in profondità da raggiungere gli Inferi infuocati.", + "ITS_GETTING_HOT_IN_HERE_Name": "Inizia a fare caldo", + "ITS_HARD_Description": "Libera nel mondo gli spiriti antichi della luce e delle tenebre, attivando nemici molto più forti e inondando il mondo di tesori splendenti (e arcobaleni).", + "ITS_HARD_Name": "È dura!", + "IT_CAN_TALK_Description": "Costruisci una casa in un bioma di micete e sposta qui il Tartufo.", + "IT_CAN_TALK_Name": "Ma parla?!", + "I_AM_LOOT_Description": "Scopri una cassa d'oro sottoterra e dai un'occhiata al suo contenuto.", + "I_AM_LOOT_Name": "Un bottino!", + "JEEPERS_CREEPERS_Description": "Imbattiti in una grotta di ragni sottoterra.", + "JEEPERS_CREEPERS_Name": "Avventura da brivido", + "KILL_THE_SUN_Description": "Sopravvivi a un'eclissi solare, un giorno più buio della notte, pieno di creature del terrore.", + "KILL_THE_SUN_Name": "Spegnete il sole", + "LIHZAHRDIAN_IDOL_Description": "Sconfiggi il golem, idolo rituale dal volto di pietra della tribù rettiliana.", + "LIHZAHRDIAN_IDOL_Name": "Idolo rettiliano", + "LIKE_A_BOSS_Description": "Ottieni un oggetto di evocazione del boss.", + "LIKE_A_BOSS_Name": "Come un boss", + "LUCKY_BREAK_Description": "Sopravvivi a una lunga caduta con pochissima salute.", + "LUCKY_BREAK_Name": "Colpo di fortuna", + "MARATHON_MEDALIST_Description": "Percorri un totale di 26,2 miglia a piedi.", + "MARATHON_MEDALIST_Name": "Maratoneta vincitore", + "MASTERMIND_Description": "Sconfiggi il Cervello di Cthulhu, la materia grigia di un demone che terrorizza il Cremisi.", + "MASTERMIND_Name": "Cervellone", + "MATCHING_ATTIRE_Description": "Equipaggia l'armatura in tutti e tre gli slot: testa, petto e piedi.", + "MATCHING_ATTIRE_Name": "Abbinamento alla moda", + "MECHA_MAYHEM_Description": "Affronta Gemelli, Distruttore e Skeletron primario simultaneamente ed emergi vittorioso.", + "MECHA_MAYHEM_Name": "Caos meccanico", + "MINER_FOR_FIRE_Description": "Crea un piccone fuso usando i materiali più caldi.", + "MINER_FOR_FIRE_Name": "Minatore del fuoco", + "NoCategory": "Nessuno", + "NOT_THE_BEES_Description": "Spara una pistola ad api mentre indossi un set completo di armatura dell'ape.", + "NOT_THE_BEES_Name": "Le api nooooo!", + "NO_HOBO_Description": "Costruisci una casa adatta al tuo primo PNG in città, per esempio per la guida.", + "NO_HOBO_Name": "Niente disoccupati", + "OBSESSIVE_DEVOTION_Description": "Sconfiggi il cultista antico, leader fanatico della congrega del dungeon.", + "OBSESSIVE_DEVOTION_Name": "Devozione ossessionante", + "OBTAIN_HAMMER_Description": "Ottieni il tuo primo martello tramite la fabbricazione o in altro modo.", + "OBTAIN_HAMMER_Name": "Una bella martellata", + "OOO_SHINY_Description": "Estrai la tua prima pepita con il piccone.", + "OOO_SHINY_Name": "Oooh! Beeeeella!", + "PHOTOSYNTHESIS_Description": "Estrai la clorofite, minerale organico che si trova nella flora più densa.", + "PHOTOSYNTHESIS_Name": "Fotosintesi", + "PRETTY_IN_PINK_Description": "Uccidi lo slime rosa.", + "PRETTY_IN_PINK_Name": "Graziosamente rosa", + "PRISMANCER_Description": "Ottieni un bastone dell'arcobaleno.", + "PRISMANCER_Name": "Mago del prisma", + "PUMPKIN_SMASHER_Description": "Sconfiggi il re zucca, spaventoso signore della vigilia.", + "PUMPKIN_SMASHER_Name": "Spacca zucche", + "RAINBOWS_AND_UNICORNS_Description": "Spara una pistola arcobaleno mentre cavalchi un unicorno.", + "RAINBOWS_AND_UNICORNS_Name": "Arcobaleni e unicorni", + "REAL_ESTATE_AGENT_Description": "Porta tutti i PNG nella città del tuo mondo.", + "REAL_ESTATE_AGENT_Name": "Agente immobiliare", + "ROBBING_THE_GRAVE_Description": "Ottieni un tesoro raro da un mostro difficile nel dungeon.", + "ROBBING_THE_GRAVE_Name": "Furto nella tomba", + "ROCK_BOTTOM_Description": "L'unica via è quella che sale!", + "ROCK_BOTTOM_Name": "L'estremo profondo", + "SERVANT_IN_TRAINING_Description": "Completa la 1ª missione per il pescatore.", + "SERVANT_IN_TRAINING_Name": "Servitore in tirocinio", + "SICK_THROW_Description": "Ottieni il Terrariano.", + "SICK_THROW_Name": "Lancio pazzesco", + "SlayerCategory": "Assassino", + "SLAYER_OF_WORLDS_Description": "Sconfiggi tutti i boss di Terraria.", + "SLAYER_OF_WORLDS_Name": "Assassino di mondi", + "SLIPPERY_SHINOBI_Description": "Sconfiggi lo slime re, signore di tutto ciò che è viscido.", + "SLIPPERY_SHINOBI_Name": "Shinobi sfuggente", + "SMASHING_POPPET_Description": "Usando gli esplosivi o il tuo fidato martello, distruggi una sfera dell'ombra o un cuore cremisi nelle parti malvagie del mondo.", + "SMASHING_POPPET_Name": "Sei un mito!", + "STAR_DESTROYER_Description": "Sconfiggi le quattro torri celestiali della luna.", + "STAR_DESTROYER_Name": "Distruttore stellare", + "STAR_POWER_Description": "Fabbrica un cristallo mana con le stelle cadute e consumalo.", + "STAR_POWER_Name": "Potere delle stelle", + "STICKY_SITUATION_Description": "Sopravvivi alla pioggia di slime, dove gli organismi gelatinosi cadono dal cielo in branco.", + "STICKY_SITUATION_Name": "Situazione appiccicosa", + "STILL_HUNGRY_Description": "Sconfiggi il Muro di carne, signore e nucleo del mondo che si risveglia dopo un grande sacrificio scottante.", + "STILL_HUNGRY_Name": "Ancora affamato", + "STING_OPERATION_Description": "Sconfiggi l'ape regina, matriarca degli alveari della giungla.", + "STING_OPERATION_Name": "Operazione pungente", + "SUPREME_HELPER_MINION_Description": "Completa un totale di 200 missioni per il pescatore.", + "SUPREME_HELPER_MINION_Name": "Aiutante supremo!", + "SWORD_OF_THE_HERO_Description": "Ottieni una lama di terra, forgiata con le migliori lame della luce e delle tenebre.", + "SWORD_OF_THE_HERO_Name": "Spada dell'eroe", + "TEMPLE_RAIDER_Description": "Irrompi nelle mura impenetrabili del tempio nella giungla.", + "TEMPLE_RAIDER_Name": "Predone del tempio", + "THERE_ARE_SOME_WHO_CALL_HIM_Description": "Uccidi Tim.", + "THERE_ARE_SOME_WHO_CALL_HIM_Name": "Alcuni lo chiamano...", + "THE_CAVALRY_Description": "Sali su una cavalcatura.", + "THE_CAVALRY_Name": "La cavalleria", + "THE_GREAT_SOUTHERN_PLANTKILL_Description": "Sconfiggi Plantera, mostruosità enorme che vive nel profondo della giungla.", + "THE_GREAT_SOUTHERN_PLANTKILL_Name": "Il gran sterminatore di piante", + "THROWING_LINES_Description": "Lancia uno yo-yo.", + "THROWING_LINES_Name": "Tirando fili", + "TIL_DEATH_Description": "Uccidi lo sposo.", + "TIL_DEATH_Name": "Finché morte non ci separi.", + "TIMBER_Description": "Abbatti il tuo primo albero.", + "TIMBER_Name": "Caaadeee!", + "TIN_FOIL_HATTER_Description": "Trionfa sull'invasione dei marziani, durante la quale le creature da un altro mondo vengono a confondere le menti e a esaminarti dove non batte il sole.", + "TIN_FOIL_HATTER_Name": "Nemici di latta", + "TOPPED_OFF_Name": "Pompatissimo", + "TROUT_MONKEY_Description": "Completa la 25ª missione per il pescatore.", + "TROUT_MONKEY_Name": "Scimmietta cattura-trote", + "VEHICULAR_MANSLAUGHTER_Description": "Sconfiggi un nemico investendolo con un carrello.", + "VEHICULAR_MANSLAUGHTER_Name": "Omicidio con veicolo", + "WALK_THE_PLANK_Description": "Trionfa contro l'invasione dei pirati, un gruppo di predatori del mare in cerca di bottino... e di vite!", + "WALK_THE_PLANK_Name": "Gettato in mare", + "WATCH_YOUR_STEP_Description": "Diventa vittima di una terribile trappola sotterranea.", + "WATCH_YOUR_STEP_Name": "Attenzione a dove metti i piedi!", + "WHERES_MY_HONEY_Description": "Scopri un grande alveare nel mezzo della giungla.", + "WHERES_MY_HONEY_Name": "Dov'è il miele?", + "WINTERHEARTED_Description": "Sconfiggi l'ape regina, strega malvagia delle fredde notti.", + "WINTERHEARTED_Name": "Cuore invernale", + "WORM_FODDER_Name": "Pasto di vermi", + "YOU_AND_WHAT_ARMY_Description": "Comanda contemporaneamente nove seguaci evocati.", + "YOU_AND_WHAT_ARMY_Name": "Tu e quale esercito?", + "YOU_CAN_DO_IT_Description": "Sopravvivi alla prima notte del tuo personaggio.", + "YOU_CAN_DO_IT_Name": "Puoi farcela!" + }, + "CLI": { + "AutomaticPortForward": "Seleziona porta automaticamente? (s/n):", + "AvailableCommands": "Comandi disponibili:", + "BanMessage": "Sospeso dal server.", + "Ban_Command": "sospendi", + "Ban_Description": "Sospende un giocatore dal server.", + "Ban_Example": "sospendi ", + "Ban_Usage": "Uso: sospendi ", + "ChooseDifficulty": "Scegli difficoltà:", + "ChooseEvil": "Scegli il male del mondo:", + "ChooseSize": "Scegli dimensione:", + "ChooseWorld": "Scegli mondo:", + "Clear_Command": "rimuovi", + "Clear_Description": "Rimuovi il testo dalla console.", + "ClientWasBooted": "{0} è stato espulso: {1}", + "Corrupt": "Corrompi", + "Crimson": "Cremisi", + "Dawn_Command": "alba", + "Dawn_Description": "Fai albeggiare.", + "DeleteConfirmation": "Vuoi davvero eliminare {0}?", + "DeleteWorld_Command": "e", + "DeleteWorld_Description": "Elimina mondo", + "DeleteWorld_Example": "e ", + "Dusk_Command": "crepuscolo", + "Dusk_Description": "Fai scendere il crepuscolo.", + "EnterServerPassword": "Password server (premi Invio se non è presente):", + "EnterWorldName": "Inserisci nome mondo:", + "ExitNoSave_Command": "esci senza salvare", + "ExitNoSave_Description": "Chiudi il server senza salvare.", + "Exit_Command": "esci", + "Exit_Description": "Chiudi il server e salva.", + "FPS_Command": "fps", + "HelpHint": "Scrivi \"aiuto\" per un elenco di comandi.", + "Help_Command": "aiuto", + "Help_Description": "Mostra un elenco di comandi.", + "InvalidCommand": "Comando non valido.", + "KickMessage": "Espulso dal server.", + "Kick_Command": "espelli", + "Kick_Description": "Espelle un giocatore dal server.", + "Kick_Example": "espelli ", + "Kick_Usage": "Uso: espelli ", + "ListeningOnPort": "Ascolto su porta {0}", + "MaxPlayers_Command": "maxgiocatori", + "MaxPlayers_Description": "Mostra numero massimo di giocatori.", + "Midnight_Command": "mezzanotte", + "Midnight_Description": "Passa alla mezzanotte.", + "MOTD": "Messaggio del giorno: {0}", + "MOTD_Command": "mdg", + "MOTD_Description": "Mostra messaggio del giorno.", + "NewWorld_Command": "n", + "NewWorld_Description": "Nuovo mondo", + "No": "no", + "NoMOTD": "Benvenuto a {0}!", + "Noon_Command": "mezzogiorno", + "Noon_Description": "Passa a mezzogiorno.", + "NoPassword": "Nessuna password.", + "NoPlayers": "Nessun giocatore connesso.", + "OnePlayerConnected": "1 giocatore connesso.", + "Password": "Password: {0}", + "PasswordDisabled": "Password disattivata.", + "PasswordSet": "Password: {0}", + "Password_Command": "password", + "Password_Description": "Mostra password.", + "PlayerLimit": "Limite giocatori: {0}", + "PlayersConnected": "{0} giocatori connessi.", + "Playing_Command": "in gioco", + "Playing_Description": "Mostra l'elenco dei giocatori.", + "Port": "Porta: {0}", + "Port_Command": "porta", + "Port_Description": "Mostra porta d'ascolto.", + "Random": "Casuale", + "Save_Command": "salva", + "Save_Description": "Salva il mondo di gioco.", + "Say_Command": "parla", + "Say_Description": "Invia un messaggio.", + "Say_Example": "di' ", + "Say_Usage": "Uso: di' ", + "Server": "Server di Terraria {0}", + "ServerMessage": " {0}", + "ServerStarted": "Server avviato", + "SetInitialPort": "Porta server (premi Invio per 7777):", + "SetMOTD_Command": "mdg", + "SetMOTD_Description": "Cambia messaggio del giorno.", + "SetMOTD_Example": "mdg ", + "SetPassword_Command": "password", + "SetPassword_Description": "Cambia password.", + "SetPassword_Example": "password ", + "Settle_Command": "calma", + "Settle_Description": "Calma le acqua.", + "ShortNo": "n", + "ShortYes": "s", + "Time": "Orario: {0}", + "Time_Command": "orario", + "Time_Description": "Mostra l'orario di gioco.", + "Version_Command": "versione", + "Version_Description": "Mostra numero di versione.", + "WaterIsAlreadySettling": "L'acqua si sta già calmando", + "Yes": "sì", + "DisplaySeed": "Seme del mondo: {0}", + "EnterSeed": "Inserisci seme (lascia vuoto per averne uno a caso):", + "NoValidSeed": "Questo mondo è stato generato in una versione precedente che non supportava i semi.", + "Seed_Command": "seme", + "Seed_Description": "Mostra il seme del mondo." + }, + "Controls": { + "RightClick": "Clic destro" + }, + "Currency": { + "Copper": "Rame", + "DefenderMedals": "Medaglie difesa", + "Gold": "Oro", + "Platinum": "Platino", + "Silver": "Argento" + }, + "Enemies": { + "MoonLord": "Signore della Luna", + "TheTwins": "Gemelli" + }, + "Error": { + "BadHeaderBufferOverflow": "Bad header lead to a read buffer overflow.", + "DataSentAfterConnectionLost": "Tentativo di invio dati al clienti dopo aver perso la connessione", + "Error": "Errore", + "ExceptionNormal": "Eccezione normale: {0}", + "LaunchFromSteam": "Avvia il gioco dal client Steam.", + "LoadFailed": "Caricamento non riuscito!", + "LoadFailedNoBackup": "Caricamento non riuscito! Nessun backup presente.", + "NetMessageError": "Errore messaggio {0}", + "ServerCrash": "Interruzione del server: {0}\n{1}\nInvia il crashlog.txt a support@terraria.org", + "TriedToRunServerTwice": "Hai provato a eseguire due server sullo stesso PC", + "UnableToCapture": "Impossibile salvare.", + "UnableToLoadWorld": "Impossibile caricare mondo:", + "UnableToWritePreferences": "Impossibile scrivere file in: {0}", + "InvalidLobbyFlag": "-lobby flag used without \"{0}\" or \"{1}\". Ignoring it." + }, + "Game": { + "Actuators": "Azionatori", + "BallBounceResult": "{0}: colpita {1} volte prima di toccare terra!", + "BedObstructed": "Letto ostruito.", + "BlueWires": "Cavi blu", + "DroppedCoins": "ha rilasciato: {0}", + "EnemiesDefeatedAnnouncement": "Hai sconfitto: {0} {1}!", + "EnemiesDefeatedByAnnouncement": "{0} ha sconfitto: {1} {2}!", + "FinalWave": "Ultima ondata", + "FirstWave": "Prima ondata", + "GreenWires": "Cavi verdi", + "HasTeleportedTo": "{0} si è teletrasportato a {1}", + "HouseChair": "una sedia", + "HouseDoor": "una porta", + "HouseLightSource": "una fonte di luce", + "HouseMissing_1": "In questa casa manca: {0}.", + "HouseMissing_2": "In questa casa mancano: {0} e {1}.", + "HouseMissing_3": "In questa casa mancano: {0}, {1} e {2}.", + "HouseMissing_4": "In questa casa mancano: {0}, {1}, {2} e {3}.", + "HouseTable": "un tavolo", + "InvasionPoints": "{0} punti", + "InvasionWave_Type1": "{0}: {1}", + "InvasionWave_Type2": "{0}: {1} e {2}", + "InvasionWave_Type3": "{0}: {1}, {2} e {3}", + "InvasionWave_Type4": "{0}: {1}, {2}, {3} e {4}", + "InvasionWave_Type5": "{0}: {1}, {2}, {3}, {4} e {5}", + "InvasionWave_Type6": "{0}: {1}, {2}, {3}, {4}, {5} e {6}", + "InvasionWave_Type7": "{0}: {1}, {2}, {3}, {4}, {5}, {6} e {7}", + "InvasionWave_Type8": "{0}: {1}, {2}, {3}, {4}, {5}, {6}, {7} e {8}", + "JoinGreeting": "Giocatori attuali: {0}.", + "NPCTitle": "{0} ({1})", + "PlayerDeathTime": "{0}: morto {1} fa", + "PvPFlag": "(PvP)", + "RedWires": "Cavi rossi", + "SpawnPointRemoved": "Punto di rigenerazione rimosso!", + "SpawnPointSet": "Punto di rigenerazione impostato!", + "TeleportTo": "Teletrasportati verso {0}", + "Time": "Orario: {0}", + "Wave": "Ondata: {0}", + "WaveCleared": "Completato: {0}", + "WaveMessage": "Ondata {0}: {1}", + "YellowWires": "Cavi gialli", + "BirthdayParty_1": "A quanto pare, {0} sta organizzando una festa", + "BirthdayParty_2": "A quanto pare, {0} e {1} stanno organizzando una festa", + "BirthdayParty_3": "A quanto pare, {0}, {1} e {2} stanno organizzando una festa", + "RespawnInPrefix": "", + "RespawnInSuffix": "{0}" + }, + "GameUI": { + "ActuationDeviceOff": "Azionatore spento", + "ActuationDeviceOn": "Azionatore acceso", + "BaitPower": "{0}% potenza esca", + "BaitRequired": "Richiede un'esca per prendere il pesce", + "Bright": "Luminosi", + "Buy": "Compra", + "BuyWithValue": "Compra ({0})", + "Cancel": "Annulla", + "Change": "Cambia", + "Clear": "Rimuovi", + "Cloudy": "Nuvoloso", + "CompassCenter": "Centro", + "CompassEast": "{0}' est", + "CompassWest": "{0}' ovest", + "Depth": "{0}'", + "DepthLevel": "Livello", + "Disabled": "Disattivato", + "DPS": "{0} danni al secondo", + "EastWind": "({0} mph est)", + "Enabled": "Attivato", + "EnemiesNearby": "{0} nemici nei paraggi!", + "Expert": "Esperto", + "Faded": "Sbiadito", + "FirstQuarter": "Primo quarto", + "FishingPower": "{0} potenza pesca", + "FishingWarning": "Attenzione!", + "FullFishingPower": "{0} ({1}%) potenza pesca", + "FullMoon": "Luna piena", + "HairStyle": "Acconciatura", + "HeatDistortion": "Distorsione calore: {0}", + "HeavyRain": "Pioggia pesante", + "Hidden": "Nascosto", + "LayerCaverns": "Caverne", + "LayerSpace": "Spazio", + "LayerSurface": "Superficie", + "LayerUnderground": "Sotterraneo", + "LayerUnderworld": "Inferi", + "LightRain": "Pioggia leggera", + "MechanicalRulerOff": "Righello meccanico: no", + "MechanicalRulerOn": "Righello meccanico: sì", + "MostlyCloudy": "Piuttosto nuvoloso", + "NewMoon": "Luna nuova", + "NoDPS": "N/D", + "NoEnemiesNearby": "Nessun nemico nei paraggi", + "NoKillCount": "Numero di uccisioni non disponibile", + "NoRareCreatures": "Nessuna creatura rara nei paraggi", + "Normal": "Normale", + "NotEnoughWater": "Acqua non sufficiente!", + "NoTreasureNearby": "Nessun tesoro nei paraggi", + "OneEnemyNearby": "1 nemico nei paraggi!", + "OreDetected": "{0} nei paraggi!", + "Overcast": "Annuvolato", + "PaintSprayerOff": "Spruzzavernice: no", + "PaintSprayerOn": "Spruzzavernice: sì", + "PartlyCloudy": "Parzialmente nuvoloso", + "PlayerDistance": "({0} ft)", + "PrecentFishingPower": "{0}% potenza pesca", + "Rain": "Pioggia", + "RulerOff": "Righello: no", + "RulerOn": "Righello: sì", + "SettingsMenu": "Menu impostazioni", + "OpenFileFolder": "{$LegacyInterface.110}", + "Speed": "{0} mph", + "StormEffects": "Effetti tempesta: {0}", + "ThirdQuarter": "Terzo quarto", + "WaningCrescent": "Luna calante", + "WaningGibbous": "Gibbosa calante", + "WaxingCrescent": "Luna crescente", + "WaxingGibbous": "Gibbosa crescente", + "WestWind": "({0} mph ovest)", + "WireModeForced": "Display meccanico: visibile", + "WireModeNormal": "Display meccanico: normale", + "Gameplay": "Gioco", + "GameZoom": "Avvicina: {0}% ({1}%)", + "LightingUpdateEveryFrameOff": "Illuminazione rapida: no", + "LightingUpdateEveryFrameOn": "Illuminazione rapida: sì", + "Misc": "Misto", + "QualityHigh": "Alta", + "QualityLow": "Bassa", + "QualityMedium": "Media", + "QualityOff": "No", + "UIScale": "Scala interfaccia: {0}% ({1}%)", + "WaveQuality": "Qualità onde: {0}", + "ZoomCategory": "Avvicina" + }, + "Misc": { + "ForceWaterSettling": "Forza acqua a calmarsi.", + "ResolutionChanged": "Nuova risoluzione: {0}x{1}.", + "ShortDays": "g", + "ShortHours": "h", + "ShortMinutes": "m", + "ShortSeconds": "s", + "WaterSettled": "L'acqua si è calmata." + }, + "Net": { + "CheatingInvalid": "Tentativo di imbroglio: espulsione non valida", + "CheatingLiquidSpam": "Tentativo di imbroglio: uso continuo di liquido", + "CheatingProjectileSpam": "Tentativo di imbroglio: uso continuo di proiettili", + "CheatingTileRemovalSpam": "Tentativo di imbroglio: rimozione mattonelle in eccesso", + "CheatingTileSpam": "Tentativo di imbroglio: aggiunta mattonelle in eccesso", + "ClientConnecting": "{0} si sta connettendo...", + "ClientPlaying": "({0}) {1} sta giocando", + "ClientRequestedWorldInfo": "({0}) {1} ha richiesto informazioni mondo", + "ClientsConnected": "{0} client connessi", + "ClientSendingData": "({0}) {1} sta inviando dati giocatore...", + "ClientStatusComplete": "({0}) {1} {2}: completato!", + "ConnectingTo": "Connessione a {0}", + "EmptyName": "Nome assente.", + "FoundServer": "Server trovato", + "IsReceivingTileData": "sta ricevendo dati", + "LostConnection": "Connessione interrotta", + "NameTooLong": "Nome troppo lungo.", + "RequestingTileData": "Richiesta dati in cascata", + "RequestingWorldInformation": "Richiesta informazioni mondo", + "SendingPlayerData": "Invio dati giocatore...", + "ServerAutoShutdown": "Il giocatore locale ha abbandonato. Avvio chiusura automatica.", + "StatusComplete": "{0}: completato!", + "WaitingForClients": "In attesa dei client..." + }, + "Social": { + "Joining": "Partecipa...", + "JoiningFriend": "Partecipa a {0}...", + "StatusInGame": "Gioca online.", + "StatusJoining": "Entra in gioco." + }, + "UI": { + "Achievements": "Obiettivi", + "Back": "Indietro", + "Cancel": "Annulla", + "Delete": "Elimina", + "Effects": "Effetti", + "EnterButton": "Inserisci", + "EnterMessage": "Inserisci messaggio:", + "EnterNewName": "Inserisci nuovo nome:", + "Expert": "Esperto", + "ExpertDescription": "(Molto più difficile, più bottino)", + "ExpertDescriptionFlavor": "Fortuna e gloria", + "Favorite": "Preferito", + "Hardcore": "Difficile", + "Keybindings": "Abbinamento tasti", + "Mediumcore": "Medio", + "More": "altro", + "MoveOffCloud": "Allontana da nuvola", + "MoveToCloud": "Avvicina a nuvola", + "New": "Nuovo", + "Normal": "Normale", + "LightMode_White": "{$LegacyMenu.56}", + "LightMode_Color": "{$LegacyMenu.55}", + "Play": "Gioca", + "RestoreButton": "Ripristina", + "Save": "Salva", + "SelectPlayer": "Seleziona giocatore", + "SelectWorld": "Seleziona mondo", + "Softcore": "Facile", + "SpaceButton": "Spazio", + "Submit": "Invio", + "Unfavorite": "Rimuovi preferito", + "WorldCreatedFormat": "Creato: {0}", + "WorldSizeFormat": "Mondo {0}", + "WorldSizeLarge": "Grande", + "WorldSizeMedium": "Medio", + "WorldSizeSmall": "Piccolo", + "WorldSizeUnknown": "Sconosciuto", + "BartenderHelp": "Cristallo di Eternia", + "CopySeed": "Copia seme: {0}", + "EnterSeed": "Inserisci seme (lascia vuoto per averne uno a caso)", + "LoadingCode": "Caricamento:", + "SeedCopied": "Seme copiato", + "ZoomIn": "{$LegacyMenu.168}", + "ZoomOut": "{$LegacyMenu.169}", + "Ellipsis": "...", + "LightMode_Retro": "{$LegacyMenu.57}", + "LightMode_Trippy": "{$LegacyMenu.58}", + "PlayerEmptyName": "{$Net.EmptyName}" + }, + "DeathSource": { + "NPC": "{0} da {1}.", + "Player": "{0} da {1} con {2}.", + "Projectile": "{0} da {1}." + }, + "DeathText": { + "Burned": "{0} non ha potuto spegnere il fuoco.", + "Default": "{0}.", + "Drowned_1": "{0} ha dimenticato di respirare.", + "Drowned_2": "{0} dorme con i pesci.", + "Drowned_3": "{0} è affogato.", + "Drowned_4": "{0} è in pasto ai pescecani.", + "Electrocuted": "{0} non ha potuto contenere i watt.", + "Fell_1": "{0} ha incontrato la morte.", + "Fell_2": "{0} non poteva rimbalzare.", + "Lava_1": "{0} si è sciolto.", + "Lava_2": "{0} è stato incenerito.", + "Lava_3": "{0} ha provato a nuotare nella lava.", + "Lava_4": "{0} ama giocare nel magma.", + "Petrified_1": "{0} si è frantumato.", + "Petrified_3": "{0} dev'essere spazzato via.", + "Petrified_4": "{0} è diventato un mucchietto di polvere.", + "Poisoned": "{0} non ha trovato l'antidoto.", + "Slain": "{0} è stato ucciso...", + "Stabbed": "{0} è stato pugnalato.", + "Suffocated": "A {0} è mancato il respiro.", + "Teleport_1": "{0} non si è materializzato.", + "Teleport_2_Female": "{0} ha le gambe al posto della testa.", + "Teleport_2_Male": "{0} ha le gambe al posto della testa.", + "TriedToEscape": "{0} ha tentato di scappare.", + "WasLicked": "{0} è stato leccato." + }, + "DeathTextGeneric": { + "ArmTornOff": "{0} si è fatto spezzare le braccia.", + "Chopped": "{0} è stato sminuzzato.", + "Cut": "{0} è stato squarciato.", + "Decapitated": "{0} è stato decapitato.", + "Destroyed": "{0} è stato distrutto.", + "Dissected": "{0} è stato squartato brutalmente.", + "EntrailsRippedOut": "{0} è stato massacrato.", + "Eviscerated": "{0} è stato sventrato.", + "ExtremitiesDetached": "A {0} sono state staccate le estremità.", + "FaceTornOff": "Il volto di {0} è stato scorticato.", + "Flailing": "{0} ha smesso di agitarsi.", + "HeadRemoved": "A {0} è stata staccata la testa.", + "Impaled": "{0} è stato trafitto.", + "InnardsBecameOutards": "{0} è stato sbudellato.", + "Mangled": "{0} è stato mutilato.", + "Massacred": "{0} è stato massacrato.", + "Murdered": "{0} è stato assassinato.", + "PileOfFlesh": "{0} è stato trasformato in un mucchio di carne.", + "Plead": "{0} ha implorato la morte.", + "Removed": "{0} è stato rimosso da {1}", + "Ripped": "A {0} è stata strappata la carne dalle ossa.", + "Ruptured": "A {0} sono stati strappati gli organi vitali.", + "SkullCrushed": "A {0} è stato spappolato il cranio.", + "Slain": "{0} è stato ucciso.", + "Snapped": "{0} è stato spezzato in due.", + "TornInHalf": "{0} è stato spezzato a metà." + }, + "DungeonDefenders2": { + "BartenderWarning": "Il cristallo di Eternia rifiuta quest'area e svanisce all'istante. Il taverniere ha detto che dovrebbe essere posizionato su un'ampia zona aperta e piana...", + "CantSummonTower": "Non sembra funzionare senza un cristallo di Eternia vicino...", + "InvasionProgressTitle": "Esercito dell'Antico", + "InvasionStart": "L'esercito dell'Antico si sta avvicinando!", + "InvasionWin": "L'esercito dell'Antico è stato sconfitto!", + "WaveComplete": "Ondata completata!" + }, + "Key": { + "DOWN": "GIÙ", + "UP": "SU" + }, + "Language": { + "English": "English (Inglese)", + "German": "Deutsch (Tedesco)", + "Italian": "Italiano", + "French": "Français (Francese)", + "Spanish": "Español (Spagnolo)", + "Russian": "Русский (Russo)", + "Chinese": "简体中文 (Cinese semplificato)", + "Portuguese": "Português brasileiro (Portoghese brasiliano)", + "Polish": "Polski (Polacco)" + }, + "RandomWorldName_Composition": { + "6": "{Adjective} {Location}" + } +} \ No newline at end of file diff --git a/Localization/Content/it-IT/Game.json b/Localization/Content/it-IT/Game.json new file mode 100644 index 0000000..13584a6 --- /dev/null +++ b/Localization/Content/it-IT/Game.json @@ -0,0 +1,780 @@ +{ + "Announcement": { + "HasBeenDefeated_Plural": "{0} sono stati sconfitti!", + "HasBeenDefeated_Single": "{0} è stato sconfitto!", + "HasAwoken": "{0} si è svegliato!", + "HasArrived": "{0} è arrivato!" + }, + "ArmorSetBonus": { + "MetalTier1": "2 difesa", + "MetalTier2": "3 difesa", + "CobaltRanged": "20% di probabilità di non consumare munizioni", + "MythrilCaster": "Consumo mana ridotto del 17%", + "MythrilMelee": "Possibilità di colpo critico nel corpo a corpo aumentata del 5%", + "MythrilRanged": "20% di probabilità di non consumare munizioni", + "AdamantiteCaster": "Consumo mana ridotto del 19%", + "AdamantiteMelee": "Velocità di corpo a corpo e movimento aumentata del 18%", + "AdamantiteRanged": "25% di probabilità di non consumare munizioni", + "ShadowScale": "Velocità di movimento aumentata del 15%", + "Wood": "1 difesa", + "Crimson": "Aumenta notevolmente la rigenerazione vita", + "Frost": "Gli attacchi in mischia e a distanza provocano scottatura raggelante", + "Tiki": "Aumenta il numero massimo dei tuoi seguaci", + "Palladium": "La rigenerazione vita aumenta notevolmente dopo aver colpito un nemico", + "Orichalcum": "I petali del fiore ricadranno sul bersaglio infliggendo più danni", + "Titanium": "Diventi immune dopo aver colpito un nemico", + "Chlorophyte": "Evoca una potente cristallo a foglia da sparare ai nemici vicini", + "Wizard": "Aumenta la possibilità di colpo critico magico del 10%", + "Meteor": "La pistola spaziale costa 0 mana", + "SpectreHealing": "Il danno magico inflitto ai nemici cura il giocatore con meno salute", + "Shroomite": "Se non ti muovi diventi furtivo,\nla tua abilità a distanza migliora e si riduce la probabilità che i nemici ti prendano di mira", + "Platinum": "4 difesa", + "Pumpkin": "Danno aumentato del 10%", + "Spooky": "Aumenta il danno dei seguaci del 25%", + "SpectreDamage": "Il danno magico danneggerà altri nemici nei dintorni", + "MagicHat": "Aumenta il mana massimo di 60", + "BeetleDefense": "Gli scarabei ti proteggono dai danni", + "BeetleDamage": "Gli scarabei aumentano i danni in mischia e la velocità", + "Bee": "Aumenta il danno dei seguaci del 10%", + "Spider": "Aumenta il danno dei seguaci del 12%", + "Vortex": "Tocca due volte {0} per alternare la furtività,\naumentando la tua abilità a distanza e riducendo la probabilità che i nemici ti prendano di mira ma rallentando la velocità di movimento", + "Stardust": "Tocca due volte {0} per portare il tuo guardiano in un certo luogo", + "Forbidden": "Tocca due volte {0} per evocare una tempesta antica nella posizione del cursore", + "Jungle": "Consumo mana ridotto del 16%", + "Molten": "17% danni da mischia in più", + "Mining": "Velocità di estrazione aumentata del 30%", + "CobaltCaster": "Consumo mana ridotto del 14%", + "CobaltMelee": "Velocità nel corpo a corpo aumentata del 15%", + "ApprenticeTier2": "Aumenta il numero massimo di sentinelle\nIl campo visivo e la portata di Esplosione aumentano notevolmente", + "ApprenticeTier3": "Aumenta il numero massimo di sentinelle\nMigliora notevolmente l'efficacia dell'Esplosione", + "HuntressTier2": "Aumenta il numero massimo di sentinelle\nLe Trappole esplosive si ricaricano più velocemente e ricoprono d'olio i nemici\nI nemici ricoperti d'olio prendono fuoco e ricevono più danni", + "HuntressTier3": "Aumenta il numero massimo di sentinelle\nMigliora notevolmente l'efficacia delle Trappole esplosive", + "MonkTier2": "Aumenta il numero massimo di sentinelle\nL'Aura fulminante può infliggere un danno critico e colpire più velocemente", + "MonkTier3": "Aumenta il numero massimo di sentinelle\nMigliora notevolmente l'efficacia dell'Aura fulminante", + "SquireTier2": "Aumenta il numero massimo di sentinelle\nLa Balestra trafigge più bersagli e scatena il panico quando subisci danni", + "SquireTier3": "Aumenta il numero massimo di sentinelle\nMigliora notevolmente l'efficacia della Balestra" + }, + "BuffDescription": { + "AmmoBox": "20% di probabilità di non consumare munizioni", + "AmmoReservation": "20% di probabilità di non consumare munizioni", + "Archery": "Danno e velocità freccia aumentati del 20%", + "BabyDinosaur": "Un piccolo dinosauro ti sta seguendo", + "BabyEater": "Un piccolo mangiatore di anime ti sta seguendo", + "BabyFaceMonster": "Un mostro bambino ti sta seguendo", + "BabyGrinch": "Un piccolo grinch ti sta seguendo", + "BabyHornet": "Crede che tu sia la sua mamma", + "BabyPenguin": "Vuole un po' di pesce", + "BabySkeletronHead": "Lasciamo perdere...", + "BabySlime": "Lo slime piccolo combatterà per te", + "BabySnowman": "Un pupazzo di neve piccolo ti sta seguendo", + "BabyTruffle": "Non è carinissimo?", + "BallistaPanic": "Le tue balestre subito scatenano il panico!", + "BasiliskMount": "Scontrati con tutto... e con TUTTI!", + "Battle": "Ritmo generazione nemici aumentato", + "BeeMount": "BzzzBzzBZZZZBzzz", + "BeetleEndurance1": "Danni subiti ridotti del 15%", + "BeetleEndurance2": "Danni subiti ridotti del 30%", + "BeetleEndurance3": "Danni subiti ridotti del 45%", + "BeetleMight1": "Danno da mischia e velocità aumentano del 10%", + "BeetleMight2": "Danno da mischia e velocità aumentano del 20%", + "BeetleMight3": "Danno da mischia e velocità aumentano del 30%", + "BetsysCurse": "Difesa ridotta", + "Bewitched": "Numero massimo di seguaci aumentato", + "BlackCat": "Un gattino nero ti sta seguendo", + "Blackout": "Visuale notevolmente ridotta", + "Bleeding": "Impossibile rigenerare vita", + "BoneJavelin": "Dissanguato", + "BrokenArmor": "La difesa è dimezzata", + "Builder": "Aumentata la velocità e la portata di posizionamento", + "BunnyMount": "Hai una gran voglia di carote", + "Burning": "Perdi vita e ti muovi più lentamente", + "DesertMinecartRight": "{$BuffDescription.MinecartRight}", + "Campfire": "Rigenerazione vita leggermente aumentata", + "ChaosState": "Il bastone della discordia sottrae vita", + "Chilled": "La tua velocità di movimento si è ridotta", + "Clairvoyance": "Poteri magici aumentati", + "CompanionCube": "Non minaccerà mai di accoltellarti e non parla nemmeno", + "Confused": "Movimento invertito", + "Crate": "Maggiori probabilità di pescare una cassa", + "CrimsonHeart": "Cuore magico che emette luce", + "Cursed": "Impossibile utilizzare oggetti", + "CursedInferno": "Perdi vita", + "CursedSapling": "Un arboscello maledetto ti sta seguendo", + "CuteFishronMount": "Non farlo strisciare.", + "Dangersense": "I pericoli vicini diventano visibili", + "Darkness": "Visione della luce diminuita", + "Daybreak": "Incenerito dai raggi solari", + "Dazed": "Il movimento è molto rallentato", + "DeadlySphere": "La sfera letale combatterà per te", + "DrillMount": "Cavalcando una perforatrice volante", + "DryadsWard": "Il potere della natura ti protegge", + "DryadsWardDebuff": "Il potere della natura ti costringe", + "Electrified": "Non ti puoi muovere", + "Endurance": "Danno ridotto del 10%", + "EyeballSpring": "Un occhio a molla ti sta seguendo", + "FairyBlue": "Una fata ti sta seguendo", + "FairyGreen": "Una fata ti sta seguendo", + "FairyRed": "Una fata ti sta seguendo", + "Featherfall": "Premi SU o GIÙ per controllare la velocità di discesa", + "DesertMinecartLeft": "{$BuffDescription.MinecartLeft}", + "Flipper": "Ti muovi normalmente nell'acqua", + "Frostburn": "Troppo caldo o troppo freddo; comunque sia, fa un gran male", + "Frozen": "Non puoi muoverti!", + "Gills": "Respiri acqua invece di aria", + "Gravitation": "Premi SU per invertire la gravità", + "HeartLamp": "Rigenerazione vita aumentata", + "Heartreach": "Aumentata la portata di raccolta dei cuori", + "Honey": "Rigenerazione vita aumentata", + "HornetMinion": "Il calabrone combatterà per te", + "Horrified": "Hai visto qualcosa di orribile, non c'è via di scampo.", + "Hunter": "Mostra la posizione dei nemici", + "IceBarrier": "Danni subiti ridotti del 25%", + "Ichor": "Difesa ridotta", + "ImpMinion": "Il diavoletto combatterà per te", + "Inferno": "I nemici vicini vengono incendiati", + "Invisibility": "Rende invisibili", + "Ironskin": "Aumenta la difesa di 8", + "LeafCrystal": "Spara foglie di cristallo ai nemici vicini", + "Lifeforce": "Vita massima aumentata del 20%", + "Lovestruck": "Sei innamorato!", + "MagicLantern": "Una lanterna magica ti illumina il percorso", + "MagicPower": "Danno magico aumentato del 20%", + "ManaRegeneration": "Rigenerazione mana aumentata", + "ManaSickness": "Danno magico ridotto di", + "Merfolk": "Può respirare e muoversi facilmente sott'acqua", + "Midas": "Rilascia più monete morendo", + "MinecartLeft": "Sei a bordo di un carrello", + "MinecartLeftMech": "Sei a bordo di un carrello", + "MinecartLeftWood": "Sei a bordo di un carrello", + "MinecartRight": "Sei a bordo di un carrello", + "MinecartRightMech": "Sei a bordo di un carrello", + "MinecartRightWood": "Sei a bordo di un carrello", + "MiniMinotaur": "Come si sconfigge un mini minotauro?", + "Mining": "Velocità di estrazione aumentata del 25%", + "MonsterBanner": "Aumentati danno e difesa da:", + "MoonLeech": "Non sei in grado di assorbire gli effetti di guarigione", + "NebulaUpDmg1": "Danno aumentato del 15%", + "NebulaUpDmg2": "Danno aumentato del 30%", + "NebulaUpDmg3": "Danno aumentato del 45%", + "NebulaUpLife1": "Rigenerazione vita aumentata", + "NebulaUpLife2": "Rigenerazione vita aumentata", + "NebulaUpLife3": "Rigenerazione vita aumentata", + "NebulaUpMana1": "Rigenerazione mana aumentata", + "NebulaUpMana2": "Rigenerazione mana aumentata", + "NebulaUpMana3": "Rigenerazione mana aumentata", + "NightOwl": "Visione notturna aumentata", + "NoBuilding": "Hai perso il potere della creazione!", + "ObsidianSkin": "Immune dalla lava", + "Obstructed": "Non vedi niente!", + "OgreSpit": "Movimento notevolmente ridotto", + "Oiled": "Si subiscono più danni quando si va a fuoco", + "OnFire": "Perdi lentamente vita", + "PaladinsShield": "25% del danno subito si riverserà su un altro giocatore", + "Panic": "Velocità di movimento aumentata", + "ParryDamageBuff": "Danni per il prossimo attacco in mischia aumentati del 500%", + "PeaceCandle": "Ritmo generazione mostri ridotto", + "PetBunny": "Credo che voglia la tua carota", + "PetDD2Dragon": "Un hoardagron ti sta seguendo", + "PetDD2Gato": "Un eligato ti sta seguendo", + "PetDD2Ghost": "Un flickerwick ti sta seguendo", + "PetLizard": "Spaventoso come un rettile", + "FishMinecartRight": "{$BuffDescription.MinecartRight}", + "PetSapling": "Un arboscello ti sta seguendo", + "PetSpider": "Un ragno ti sta seguendo", + "PetTurtle": "Buona tartaruga a tutti!", + "PigronMount": "Adesso mi vedi...", + "PirateMinion": "Il pirata combatterà per te", + "Poisoned": "Perdi lentamente vita", + "PotionSickness": "Non si possono più consumare oggetti curativi", + "Puppy": "Un cucciolo ti sta seguendo", + "Pygmies": "I pigmei combatteranno per te", + "Rabies": "Aumentato il danno, ridotta la rigenerazione vita, influisce sulle condizioni", + "Rage": "Probabilità critica aumentata del 10%", + "RapidHealing": "Rigenerazione vita notevolmente aumentata", + "Ravens": "I corvi attaccheranno i tuoi nemici", + "Regeneration": "Rigenera la vita", + "Rudolph": "Cavalca la renna dal naso rosso", + "ScutlixMount": "Bang bang", + "ShadowDodge": "Schiverai l'attacco successivo", + "ShadowFlame": "Perdi vita", + "ShadowOrb": "Sfera magica che fornisce luce", + "SharknadoMinion": "Il tornado di squali combatterà per te", + "Sharpened": "Le armi da mischia hanno maggiore penetrazione", + "Shine": "Emette luce", + "Silenced": "Impossibile usare elementi che richiedono mana", + "Slimed": "Sei viscido e appiccicoso", + "SlimeMount": "BOOOIIINNNG!", + "Slow": "Velocità movimento ridotta", + "SolarShield1": "Danno subito ridotto del 30%, respingi i nemici quando subisci danni", + "SolarShield2": "Danno subito ridotto del 30%, respingi i nemici quando subisci danni", + "SolarShield3": "Danno subito ridotto del 30%, respingi i nemici quando subisci danni", + "Sonar": "Vedi quale pesce ha abboccato", + "SoulDrain": "Rigenerazione vita aumentata", + "Spelunker": "Mostra l'ubicazione di tesori e minerali", + "SpiderMinion": "Il ragno combatterà per te", + "Squashling": "Una piccola zucca ti sta seguendo", + "StardustDragonMinion": "Il drago di polvere di stella ti proteggerà", + "StardustGuardianMinion": "Il guardiano di polvere di stella ti proteggerà", + "StardustMinion": "La cellula di polvere di stella combatterà per te", + "StardustMinionBleed": "being eaten by cells", + "StarInBottle": "Rigenerazione mana aumentata", + "Stinky": "Che tanfo!", + "Stoned": "Sei completamente paralizzato!", + "Suffocation": "Perdi vita", + "Summoning": "Numero massimo di seguaci aumentato", + "Sunflower": "Aumentata la velocità di movimento e ridotta la generazione di mostri", + "SuspiciousTentacle": "Un occhio dallo sguardo sospetto che emette luce", + "Swiftness": "Velocità di movimento aumentata del 25%", + "TheTongue": "Sei stato succhiato nella bocca", + "Thorns": "Anche gli aggressori subiscono danni", + "TikiSpirit": "Uno spirito buono ti sta seguendo", + "Tipsy": "Abilità corpo a corpo aumentate, difesa abbassata", + "Titan": "Aumentato lo spintone", + "TurtleMount": "Lenta sulla terra, velocissima in mare", + "TwinEyesMinion": "I gemelli combatteranno per te", + "UFOMinion": "L'UFO combatterà per te", + "UFOMount": "Fortuna che avevi un MAC", + "UnicornMount": "Parti alla carica... in modo favoloso!", + "Venom": "Perdi vita", + "VortexDebuff": "La forza di gravità intorno a te è distorta", + "Warmth": "Danno dalle fonti di freddo ridotto", + "WaterCandle": "Ritmo generazione mostri aumentato", + "WaterWalking": "Premi GIÙ per entrare in acqua", + "Weak": "Abilità fisiche ridotte", + "WeaponImbueConfetti": "Gli attacchi in mischia fanno apparire i coriandoli", + "WeaponImbueCursedFlames": "Gli attacchi in mischia infliggono fiamme maledette ai nemici", + "WeaponImbueFire": "Gli attacchi in mischia incendiano i nemici", + "WeaponImbueGold": "Gli attacchi in mischia fanno rilasciare più oro ai nemici", + "WeaponImbueIchor": "Gli attacchi in mischia riducono la difesa dei nemici", + "WeaponImbueNanites": "Gli attacchi in mischia confondono i nemici", + "WeaponImbuePoison": "Gli attacchi in mischia avvelenano i nemici", + "WeaponImbueVenom": "Gli attacchi in mischia applicano veleno sui tuoi bersagli", + "Webbed": "Sei bloccato", + "FishMinecartLeft": "{$BuffDescription.MinecartLeft}", + "Werewolf": "Abilità fisiche aumentate", + "Wet": "Stai gocciolando", + "WindPushed": "Il vento ti sposta!", + "Wisp": "Un teschietto ti sta seguendo", + "WitheredArmor": "La tua difesa si è ridotta!", + "WitheredWeapon": "I tuoi attacchi sono più deboli!", + "Wrath": "Danno aumentato del 10%", + "ZephyrFish": "Si diverte a nuotare intorno a te", + "BeeMinecartRight": "{$BuffDescription.MinecartRight}", + "BeeMinecartLeft": "{$BuffDescription.MinecartLeft}", + "LadybugMinecartRight": "{$BuffDescription.MinecartRight}", + "LadybugMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PigronMinecartRight": "{$BuffDescription.MinecartRight}", + "PigronMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SunflowerMinecartRight": "{$BuffDescription.MinecartRight}", + "SunflowerMinecartLeft": "{$BuffDescription.MinecartLeft}", + "HellMinecartRight": "{$BuffDescription.MinecartRight}", + "HellMinecartLeft": "{$BuffDescription.MinecartLeft}", + "ShroomMinecartRight": "{$BuffDescription.MinecartRight}", + "ShroomMinecartLeft": "{$BuffDescription.MinecartLeft}", + "AmethystMinecartRight": "{$BuffDescription.MinecartRight}", + "AmethystMinecartLeft": "{$BuffDescription.MinecartLeft}", + "TopazMinecartRight": "{$BuffDescription.MinecartRight}", + "TopazMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SapphireMinecartRight": "{$BuffDescription.MinecartRight}", + "SapphireMinecartLeft": "{$BuffDescription.MinecartLeft}", + "EmeraldMinecartRight": "{$BuffDescription.MinecartRight}", + "EmeraldMinecartLeft": "{$BuffDescription.MinecartLeft}", + "RubyMinecartRight": "{$BuffDescription.MinecartRight}", + "RubyMinecartLeft": "{$BuffDescription.MinecartLeft}", + "DiamondMinecartRight": "{$BuffDescription.MinecartRight}", + "DiamondMinecartLeft": "{$BuffDescription.MinecartLeft}", + "AmberMinecartRight": "{$BuffDescription.MinecartRight}", + "AmberMinecartLeft": "{$BuffDescription.MinecartLeft}", + "BeetleMinecartRight": "{$BuffDescription.MinecartRight}", + "BeetleMinecartLeft": "{$BuffDescription.MinecartLeft}", + "MeowmereMinecartRight": "{$BuffDescription.MinecartRight}", + "MeowmereMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PartyMinecartRight": "{$BuffDescription.MinecartRight}", + "PartyMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PirateMinecartRight": "{$BuffDescription.MinecartRight}", + "PirateMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SteampunkMinecartRight": "{$BuffDescription.MinecartRight}", + "SteampunkMinecartLeft": "{$BuffDescription.MinecartLeft}", + "CoffinMinecartRight": "{$BuffDescription.MinecartRight}", + "CoffinMinecartLeft": "{$BuffDescription.MinecartLeft}" + }, + "BuffName": { + "AmmoBox": "Cassa di munizioni", + "AmmoReservation": "Conserva munizioni", + "Archery": "Arco", + "BabyDinosaur": "Dinosauro piccolo", + "BabyEater": "Mangiatore piccolo", + "BabyFaceMonster": "Mostro bambino", + "BabyGrinch": "Piccolo grinch", + "BabyHornet": "Calabrone piccolo", + "BabyPenguin": "Pinguino piccolo", + "BabySkeletronHead": "Testa di Skeletron piccolo", + "BabySlime": "Slime piccolo", + "BabySnowman": "Pupazzo di neve piccolo", + "BabyTruffle": "Tartufo piccolo", + "BallistaPanic": "Panico balestra!", + "BasiliskMount": "Basilisco cavalcabile", + "Battle": "Battaglia", + "BeeMount": "Ape cavalcabile", + "BeetleEndurance1": "Resistenza scarabeo", + "BeetleEndurance2": "Resistenza scarabeo", + "BeetleEndurance3": "Resistenza scarabeo", + "BeetleMight1": "Potenza scarabeo", + "BeetleMight2": "Potenza scarabeo", + "BeetleMight3": "Potenza scarabeo", + "BetsysCurse": "Maledizione di Betsy", + "Bewitched": "Stregato", + "BlackCat": "Gatto nero", + "Blackout": "Blackout", + "Bleeding": "Sanguinamento", + "BoneJavelin": "Perforato", + "BrokenArmor": "Armatura rotta", + "Builder": "Costruttore", + "BunnyMount": "Coniglio cavalcabile", + "Burning": "Bruciatura", + "Calm": "Calma", + "Campfire": "Fuoco accogliente", + "ChaosState": "Caos", + "Chilled": "Raffreddato", + "Clairvoyance": "Chiaroveggenza", + "CompanionCube": "Cubo compagno", + "Confused": "Confuso", + "Crate": "Cassa", + "CrimsonHeart": "Cuore cremisi", + "Cursed": "Maledetto", + "CursedInferno": "Inferno maledetto", + "CursedSapling": "Arboscello maledetto", + "CuteFishronMount": "Pesce drago carino cavalcabile", + "Dangersense": "Senso del pericolo", + "Darkness": "Oscurità", + "Daybreak": "Albeggiato", + "Dazed": "Stordito", + "DeadlySphere": "Sfera letale", + "DrillMount": "Perforatrice cavalcabile", + "DryadsWard": "Benedizione della driade", + "DryadsWardDebuff": "Flagello della driade", + "Electrified": "Elettrificato", + "Endurance": "Resistenza", + "EyeballSpring": "Occhio a molla", + "FairyBlue": "Fata", + "FairyGreen": "Fata", + "FairyRed": "Fata", + "Featherfall": "Cascata di piume", + "Fishing": "Pesca", + "Flipper": "Pinna", + "Frostburn": "Scottatura raggelante", + "Frozen": "Congelato", + "Gills": "Branchie", + "Gravitation": "Gravità", + "HeartLamp": "Lampada a cuore", + "Heartreach": "Afferracuori", + "Honey": "Miele", + "HornetMinion": "Calabrone", + "Horrified": "Inorridito", + "Hunter": "Cacciatore", + "IceBarrier": "Barriera di ghiaccio", + "Ichor": "Icore", + "ImpMinion": "Diavoletto", + "Inferno": "Inferno", + "Invisibility": "Invisibilità", + "Ironskin": "Pelle di ferro", + "LeafCrystal": "Cristallo a foglia", + "Lifeforce": "Forza vitale", + "Lovestruck": "Innamorato", + "MagicLantern": "Lanterna magica", + "MagicPower": "Potere magico", + "ManaRegeneration": "Rigenerazione mana", + "ManaSickness": "Mal di mana", + "Merfolk": "Tritone", + "Midas": "Mida", + "MinecartLeft": "Carrello", + "MinecartLeftMech": "Carrello", + "MinecartLeftWood": "Carrello", + "MinecartRight": "Carrello", + "MinecartRightMech": "Carrello", + "MinecartRightWood": "Carrello", + "MiniMinotaur": "Mini minotauro", + "Mining": "Minatore", + "MonsterBanner": "Stendardo", + "MoonLeech": "Morso della luna", + "NebulaUpDmg1": "Nebulosa di danni", + "NebulaUpDmg2": "Nebulosa di danni", + "NebulaUpDmg3": "Nebulosa di danni", + "NebulaUpLife1": "Nebulosa di vita", + "NebulaUpLife2": "Nebulosa di vita", + "NebulaUpLife3": "Nebulosa di vita", + "NebulaUpMana1": "Nebulosa di mana", + "NebulaUpMana2": "Nebulosa di mana", + "NebulaUpMana3": "Nebulosa di mana", + "NightOwl": "Civetta notturna", + "NoBuilding": "Scossa creativa", + "ObsidianSkin": "Pelle ossidiana", + "Obstructed": "Ostruito", + "OgreSpit": "Ricoperto di melma", + "Oiled": "Ricoperto d'olio", + "OnFire": "A fuoco!", + "PaladinsShield": "Scudo del paladino", + "Panic": "Panico!", + "ParryDamageBuff": "Momento straordinario", + "PeaceCandle": "Candela pacifica", + "PetBunny": "Coniglio", + "PetDD2Dragon": "Hoardagron", + "PetDD2Gato": "Eligato", + "PetDD2Ghost": "Flickerwick", + "PetLizard": "Lucertola", + "PetParrot": "Pappagallo", + "PetSapling": "Arboscello", + "PetSpider": "Ragno", + "PetTurtle": "Tartaruga", + "PigronMount": "Maialdrago cavalcabile", + "PirateMinion": "Pirata", + "Poisoned": "Avvelenato", + "PotionSickness": "Mal di pozione", + "Puppy": "Cucciolo", + "Pygmies": "Pigmei", + "Rabies": "Morso bestiale", + "Rage": "Rabbia", + "RapidHealing": "Cura rapida", + "Ravens": "Corvi", + "Regeneration": "Rigenerazione", + "Rudolph": "Rudolph", + "ScutlixMount": "Scutlix cavalcabile", + "DesertMinecartRight": "{$BuffName.MinecartRight}", + "ShadowFlame": "Fiamma d'ombra", + "ShadowOrb": "Sfera d'ombra", + "SharknadoMinion": "Tornado di squali", + "Sharpened": "Affilato", + "Shine": "Brillantezza", + "Silenced": "Messo a tacere", + "Slimed": "Slime", + "SlimeMount": "Slime cavalcabile", + "Slow": "Lento", + "SolarShield1": "Esplosione solare", + "SolarShield2": "Esplosione solare", + "SolarShield3": "Esplosione solare", + "Sonar": "Sonar", + "SoulDrain": "Sottrazione vita", + "Spelunker": "Speleologo", + "SpiderMinion": "Ragno", + "Squashling": "Piccola zucca", + "StardustDragonMinion": "Drago di polvere di stella", + "StardustGuardianMinion": "Guardiano di polvere di stella", + "StardustMinion": "Cellula di polvere di stella", + "StardustMinionBleed": "Celled", + "StarInBottle": "Stella in bottiglia", + "Stinky": "Puzzolente", + "Stoned": "Ubriaco", + "Suffocation": "Soffocamento", + "Summoning": "Evocazione", + "Sunflower": "Felice!", + "SuspiciousTentacle": "Occhio dallo sguardo sospetto", + "Swiftness": "Velocità", + "TheTongue": "La Lingua", + "Thorns": "Spine", + "TikiSpirit": "Spirito tiki", + "Tipsy": "Brillo", + "Titan": "Titano", + "TurtleMount": "Tartaruga cavalcabile", + "TwinEyesMinion": "Gemelli", + "UFOMinion": "UFO", + "UFOMount": "UFO cavalcabile", + "UnicornMount": "Unicorno cavalcabile", + "Venom": "Tossina", + "VortexDebuff": "Distorto", + "Warmth": "Calore", + "WaterCandle": "Candela d'acqua", + "WaterWalking": "Camminata nell'acqua", + "Weak": "Debole", + "WeaponImbueConfetti": "Infusione arma: Coriandoli", + "WeaponImbueCursedFlames": "Infusione arma: Fiamme maledette", + "WeaponImbueFire": "Infusione arma: Fuoco", + "WeaponImbueGold": "Infusione arma: Oro", + "WeaponImbueIchor": "Infusione arma: Icore", + "WeaponImbueNanites": "Infusione arma: Naniti", + "WeaponImbuePoison": "Infusione arma: Veleno", + "WeaponImbueVenom": "Infusione arma: Tossina", + "Webbed": "Intrappolato in una ragnatela", + "WellFed": "Ben nutrito", + "Werewolf": "Lupo mannaro", + "Wet": "Bagnato", + "WindPushed": "Vento potente", + "Wisp": "Teschietto", + "WitheredArmor": "Armatura indebolita", + "WitheredWeapon": "Arma indebolita", + "Wrath": "Ira", + "ZephyrFish": "Pesce zefiro", + "DesertMinecartLeft": "{$BuffName.MinecartLeft}", + "FishMinecartRight": "{$BuffName.MinecartRight}", + "FishMinecartLeft": "{$BuffName.MinecartLeft}", + "BeeMinecartRight": "{$BuffName.MinecartRight}", + "BeeMinecartLeft": "{$BuffName.MinecartLeft}", + "LadybugMinecartRight": "{$BuffName.MinecartRight}", + "LadybugMinecartLeft": "{$BuffName.MinecartLeft}", + "PigronMinecartRight": "{$BuffName.MinecartRight}", + "PigronMinecartLeft": "{$BuffName.MinecartLeft}", + "SunflowerMinecartRight": "{$BuffName.MinecartRight}", + "SunflowerMinecartLeft": "{$BuffName.MinecartLeft}", + "HellMinecartRight": "{$BuffName.MinecartRight}", + "HellMinecartLeft": "{$BuffName.MinecartLeft}", + "ShroomMinecartRight": "{$BuffName.MinecartRight}", + "ShroomMinecartLeft": "{$BuffName.MinecartLeft}", + "AmethystMinecartRight": "{$BuffName.MinecartRight}", + "AmethystMinecartLeft": "{$BuffName.MinecartLeft}", + "TopazMinecartRight": "{$BuffName.MinecartRight}", + "TopazMinecartLeft": "{$BuffName.MinecartLeft}", + "SapphireMinecartRight": "{$BuffName.MinecartRight}", + "SapphireMinecartLeft": "{$BuffName.MinecartLeft}", + "EmeraldMinecartRight": "{$BuffName.MinecartRight}", + "EmeraldMinecartLeft": "{$BuffName.MinecartLeft}", + "RubyMinecartRight": "{$BuffName.MinecartRight}", + "RubyMinecartLeft": "{$BuffName.MinecartLeft}", + "DiamondMinecartRight": "{$BuffName.MinecartRight}", + "DiamondMinecartLeft": "{$BuffName.MinecartLeft}", + "AmberMinecartRight": "{$BuffName.MinecartRight}", + "AmberMinecartLeft": "{$BuffName.MinecartLeft}", + "BeetleMinecartRight": "{$BuffName.MinecartRight}", + "BeetleMinecartLeft": "{$BuffName.MinecartLeft}", + "MeowmereMinecartRight": "{$BuffName.MinecartRight}", + "MeowmereMinecartLeft": "{$BuffName.MinecartLeft}", + "PartyMinecartRight": "{$BuffName.MinecartRight}", + "PartyMinecartLeft": "{$BuffName.MinecartLeft}", + "PirateMinecartRight": "{$BuffName.MinecartRight}", + "PirateMinecartLeft": "{$BuffName.MinecartLeft}", + "SteampunkMinecartRight": "{$BuffName.MinecartRight}", + "SteampunkMinecartLeft": "{$BuffName.MinecartLeft}", + "CoffinMinecartRight": "{$BuffName.MinecartRight}", + "CoffinMinecartLeft": "{$BuffName.MinecartLeft}" + }, + "MapObject": { + "Adamantite": "Adamantio", + "AnimalSkin": "Pelle di animale", + "Anvil": "Incudine", + "Banner": "Stendardo", + "BeeHive": "Alveare", + "Chair": "Sedia", + "Chandelier": "Candelabro", + "Chlorophyte": "Clorofite", + "ChristmasLight": "Luce natalizia", + "Cobalt": "Cobalto", + "Copper": "Rame", + "CrimsonAltar": "Altare cremisi", + "Crimtane": "Crimtano", + "DemonAltar": "Altare dei demoni", + "Demonite": "Demonite", + "Door": "Porta", + "DrippingHoney": "Miele gocciolante", + "DrippingLava": "Lava gocciolante", + "DrippingWater": "Acqua gocciolante", + "FloorLamp": "Lampada da pavimento", + "Fossil": "Fossile", + "GiantMushroom": "Fungo gigante", + "Gold": "Oro", + "Iron": "Ferro", + "ItemRack": "Rastrelliera oggetti", + "Lantern": "Lanterna", + "Larva": "Larva", + "Lead": "Piombo", + "LivingWood": "Legno vivo", + "MetalBar": "Barra di metallo", + "Mythril": "Mitrilio", + "OrangeSquirrelCage": "Gabbia dello scoiattolo arancione", + "Orichalcum": "Oricalco", + "Painting": "Dipinto", + "Palladium": "Palladio", + "PalmTree": "Albero di palma", + "Picture": "Fotografia", + "PineTree": "Abete", + "PlanterasBulb": "Bulbo di Plantera", + "Platinum": "Platino", + "Pot": "Vaso", + "Rocket": "Razzo", + "SandFlow": "Flusso di sabbia", + "Sapling": "Arboscello", + "SiltExtractinator": "Estrattificatore insabbiato", + "Silver": "Argento", + "Sink": "Lavabo", + "Statue": "Statua", + "Table": "Tavolo", + "Thorn": "Spina", + "Thorns": "Spine", + "Timer": "Cronometro", + "Tin": "Latta", + "Titanium": "Titanio", + "Trap": "Trappola", + "Tree": "Albero", + "Trophy": "Trofeo", + "Tungsten": "Tungsteno", + "Turret": "Torretta", + "Vase": "Vaso", + "WaterFountain": "Fontana acqua", + "Web": "Ragnatela" + }, + "ChatCommand": { + "Playing_0": "{$LegacyMultiplayer.6}", + "Playing_1": "{$LegacyMultiplayer.21}", + "Roll": "{$LegacyMultiplayer.8}", + "Party": "/s", + "Emote": "/io" + }, + "Bestiary_ItemDropConditions": { + "NotExpert": "", + "NotMasterMode": "", + "LegacyHack_IsBossAndNotExpert": "", + "IsCrimsonAndNotExpert": "", + "IsCorruptionAndNotExpert": "", + "NotFromStatue": "" + }, + "Bestiary_FlavorText": { + "npc_JungleSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_YellowSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_RedSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_PurpleSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_BlackSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_GreenSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_BlueSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_DemonEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_Zombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_Skeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_AngryBones": "{$CommonBestiaryFlavor.AngryBones}", + "npc_Hornet": "{$CommonBestiaryFlavor.Hornet}", + "npc_Hellbat": "{$CommonBestiaryFlavor.LavaBat}", + "npc_BlueJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_PinkJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_Mummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_DarkMummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_LightMummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_Mimic": "{$CommonBestiaryFlavor.Mimic}", + "npc_GreenJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_BaldZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_WanderingEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_Penguin": "{$CommonBestiaryFlavor.Penguin}", + "npc_PenguinBlack": "{$CommonBestiaryFlavor.Penguin}", + "npc_Lavabat": "{$CommonBestiaryFlavor.LavaBat}", + "npc_PigronCorruption": "{$CommonBestiaryFlavor.Pigron}", + "npc_PigronHallow": "{$CommonBestiaryFlavor.Pigron}", + "npc_PigronCrimson": "{$CommonBestiaryFlavor.Pigron}", + "npc_PincushionZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_SwampZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_TwiggyZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_CataractEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_SleepyEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_DialatedEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_GreenEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_PurpleEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_FemaleZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_HeadacheSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_MisassembledSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_PantlessSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_HornetFatty": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetHoney": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetLeafy": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetSpikey": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetStingy": "{$CommonBestiaryFlavor.Hornet}", + "npc_ZombieMushroom": "{$CommonBestiaryFlavor.MushroomZombie}", + "npc_ZombieMushroomHat": "{$CommonBestiaryFlavor.MushroomZombie}", + "npc_FungiBulb": "{$CommonBestiaryFlavor.FungiBulb}", + "npc_GiantFungiBulb": "{$CommonBestiaryFlavor.FungiBulb}", + "npc_RustyArmoredBonesAxe": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesFlail": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesSword": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesSwordNoArmor": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_BlueArmoredBones": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesMace": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesNoPants": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesSword": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_HellArmoredBones": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesSpikeShield": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesMace": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesSword": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_RaggedCaster": "{$CommonBestiaryFlavor.RaggedCaster}", + "npc_RaggedCasterOpenCoat": "{$CommonBestiaryFlavor.RaggedCaster}", + "npc_Necromancer": "{$CommonBestiaryFlavor.Necromancer}", + "npc_NecromancerArmored": "{$CommonBestiaryFlavor.Necromancer}", + "npc_DiabolistRed": "{$CommonBestiaryFlavor.Diabolist}", + "npc_DiabolistWhite": "{$CommonBestiaryFlavor.Diabolist}", + "npc_AngryBonesBig": "{$CommonBestiaryFlavor.AngryBones}", + "npc_AngryBonesBigMuscle": "{$CommonBestiaryFlavor.AngryBones}", + "npc_AngryBonesBigHelmet": "{$CommonBestiaryFlavor.AngryBones}", + "npc_Scarecrow1": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow2": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow3": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow4": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow5": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow6": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow7": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow8": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow9": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow10": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_DemonEyeOwl": "{$CommonBestiaryFlavor.CostumeDemonEye}", + "npc_DemonEyeSpaceship": "{$CommonBestiaryFlavor.CostumeDemonEye}", + "npc_ZombieDoctor": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_ZombieSuperman": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_ZombiePixie": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_SkeletonTopHat": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_SkeletonAstonaut": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_SkeletonAlien": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_ZombieXmas": "{$CommonBestiaryFlavor.ZombieXmas}", + "npc_ZombieSweater": "{$CommonBestiaryFlavor.ZombieXmas}", + "npc_SlimeRibbonWhite": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonYellow": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonGreen": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonRed": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_ZombieElf": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ZombieElfBeard": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ZombieElfGirl": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ArmedZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombiePincushion": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieSwamp": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieTwiggy": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieCenx": "{$CommonBestiaryFlavor.Zombie}", + "npc_GoldBird": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldBunny": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldButterfly": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldFrog": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldGrasshopper": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldMouse": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldWorm": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_BoneThrowingSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton2": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton3": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton4": "{$CommonBestiaryFlavor.Skeleton}", + "npc_GiantWalkingAntlion": "{$CommonBestiaryFlavor.AntlionCharger}", + "npc_GiantFlyingAntlion": "{$CommonBestiaryFlavor.AntlionSwarmer}", + "npc_DesertLamiaLight": "{$CommonBestiaryFlavor.Lamia}", + "npc_DesertLamiaDark": "{$CommonBestiaryFlavor.Lamia}", + "npc_SquirrelGold": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_SandShark": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkCorrupt": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkCrimson": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkHallow": "{$CommonBestiaryFlavor.Sandshark}", + "npc_WalkingAntlion": "{$CommonBestiaryFlavor.AntlionCharger}", + "npc_FlyingAntlion": "{$CommonBestiaryFlavor.AntlionSwarmer}", + "npc_GoldGoldfish": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldGoldfishWalker": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_BlackDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_BlueDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_GreenDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_OrangeDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_RedDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_YellowDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_GoldDragonfly": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldLadyBug": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldWaterStrider": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldSeahorse": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_IceMimic": "{$CommonBestiaryFlavor.Mimic}", + "npc_GemSquirrelAmethyst": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelTopaz": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelSapphire": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelEmerald": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelRuby": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelDiamond": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelAmber": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemBunnyAmethyst": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyTopaz": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnySapphire": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyEmerald": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyRuby": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyDiamond": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyAmber": "{$CommonBestiaryFlavor.GemBunny}" + } +} \ No newline at end of file diff --git a/Localization/Content/it-IT/Items.json b/Localization/Content/it-IT/Items.json new file mode 100644 index 0000000..f9ba72c --- /dev/null +++ b/Localization/Content/it-IT/Items.json @@ -0,0 +1,5511 @@ +{ + "PaintingArtist": { + "Crowno": "'V. Costa Moura'", + "Garner": "'W. Garner'", + "Moosdijk": "'R. Moosdijk'", + "Lazure": "'J. Hayes'", + "Myhre": "'J. T. Myhre'", + "Burczyk": "'C. Burczyk'", + "Craig": "'A. Craig'", + "Kolf": "'A. G. Kolf'", + "Wright": "'K. Wright'", + "Phelps": "'D. Phelps'", + "Duncan": "'M. J. Duncan'", + "Ness": "'C. J. Ness'" + }, + "Prefix": { + "Dull": "(Opaco)", + "Unhappy": "(Infelice)", + "Bulky": "(Ingombrante)", + "Shameful": "(Vergognoso)", + "Heavy": "(Pesante)", + "Light": "(Luce)", + "Sighted": "(Mirino)", + "Rapid": "(Rapido)", + "Hasty": "(Frettoloso)", + "Intimidating": "(Intimidatorio)", + "Large": "(Grande)", + "Deadly": "(Mortale)", + "Staunch": "(Convinto)", + "Awful": "(Orribile)", + "Lethargic": "(Letargico)", + "Awkward": "(Scomodo)", + "Powerful": "(Potente)", + "Mystic": "(Mistico)", + "Adept": "(Esperto)", + "Masterful": "(Magistrale)", + "Inept": "(Inetto)", + "Massive": "(Massiccio)", + "Ignorant": "(Ignorante)", + "Deranged": "(Squilibrato)", + "Intense": "(Intenso)", + "Taboo": "(Tabù)", + "Celestial": "(Celeste)", + "Furious": "(Furioso)", + "Keen": "(Appassionato)", + "Superior": "(Superiore)", + "Forceful": "(Forte)", + "Broken": "(Rotto)", + "Dangerous": "(Pericoloso)", + "Damaged": "(Danneggiato)", + "Shoddy": "(Scadente)", + "Quick": "(Veloce)", + "Deadly2": "(Mortale)", + "Agile": "(Agile)", + "Nimble": "(Lesto)", + "Murderous": "(Omicida)", + "Slow": "(Lento)", + "Sluggish": "(Indolente)", + "Lazy": "(Pigro)", + "Savage": "(Selvaggio)", + "Annoying": "(Fastidioso)", + "Nasty": "(Cattivo)", + "Manic": "(Maniaco)", + "Hurtful": "(Offensivo)", + "Strong": "(Robusto)", + "Unpleasant": "(Sgradevole)", + "Weak": "(Debole)", + "Ruthless": "(Spietato)", + "Frenzying": "(Frenetico)", + "Godly": "(Devoto)", + "Sharp": "(Appuntito)", + "Demonic": "(Diabolico)", + "Zealous": "(Zelante)", + "Hard": "(Duro)", + "Guarding": "(Protettivo)", + "Armored": "(Corazzato)", + "Warding": "(Difensivo)", + "Arcane": "(Arcano)", + "Precise": "(Preciso)", + "Lucky": "(Fortunato)", + "Jagged": "(Frastagliato)", + "Pointy": "(Tagliente)", + "Spiked": "(Chiodato)", + "Angry": "(Arrabbiato)", + "Menacing": "(Minaccioso)", + "Brisk": "(Vivace)", + "Fleeting": "(Fugace)", + "Hasty2": "(Frettoloso)", + "Quick2": "(Veloce)", + "Wild": "(Selvaggio)", + "Rash": "(Temerario)", + "Intrepid": "(Intrepido)", + "Tiny": "(Minuto)", + "Violent": "(Violento)", + "Legendary": "(Leggendario)", + "Unreal": "(Irreale)", + "Mythical": "(Mitico)", + "Terrible": "(Terribile)", + "Small": "(Piccolo)" + }, + "ItemName": { + "IronPickaxe": "Piccone di ferro", + "IronAxe": "Ascia di ferro", + "ShadowGreaves": "Schinieri ombra", + "ConfettiGun": "Pistola di coriandoli", + "ChlorophyteMask": "Maschera di clorofite", + "ChlorophyteHelmet": "Casco di clorofite", + "ChlorophyteHeadgear": "Copricapo di clorofite", + "ChlorophytePlateMail": "Armatura di clorofite", + "ChlorophyteGreaves": "Schinieri di clorofite", + "ChlorophyteBar": "Barra di clorofite", + "RedDye": "Tintura rossa", + "OrangeDye": "Tintura arancione", + "YellowDye": "Tintura gialla", + "ShadowScalemail": "Armatura a scaglie ombra", + "LimeDye": "Tintura limetta", + "GreenDye": "Tintura verde", + "TealDye": "Tintura ottanio", + "CyanDye": "Tintura azzurra", + "SkyBlueDye": "Tintura celeste", + "BlueDye": "Tintura blu", + "PurpleDye": "Tintura viola", + "VioletDye": "Tintura lilla", + "PinkDye": "Tintura rosa", + "RedandBlackDye": "Tintura rossa e nera", + "ShadowHelmet": "Casco ombra", + "OrangeandBlackDye": "Tintura arancione e nera", + "YellowandBlackDye": "Tintura gialla e nera", + "LimeandBlackDye": "Tintura limetta e nera", + "GreenandBlackDye": "Tintura verde e nera", + "TealandBlackDye": "Tintura ottanio e nera", + "CyanandBlackDye": "Tintura azzurra e nera", + "SkyBlueandBlackDye": "Tintura celeste e nera", + "BlueandBlackDye": "Tintura blu e nera", + "PurpleandBlackDye": "Tintura viola e nera", + "VioletandBlackDye": "Tintura lilla e nera", + "NightmarePickaxe": "Piccone dell'incubo", + "PinkandBlackDye": "Tintura rosa e nera", + "FlameDye": "Tintura fiamma", + "FlameAndBlackDye": "Tintura fiamma e nera", + "GreenFlameDye": "Tintura fiamma verde", + "GreenFlameAndBlackDye": "Tintura fiamma verde e nera", + "BlueFlameDye": "Tintura fiamma blu", + "BlueFlameAndBlackDye": "Tintura fiamma blu e nera", + "SilverDye": "Tintura argento", + "BrightRedDye": "Tintura rosso chiaro", + "BrightOrangeDye": "Tintura arancione chiaro", + "TheBreaker": "Il Distruttore", + "BrightYellowDye": "Tintura giallo chiaro", + "BrightLimeDye": "Tintura limetta chiaro", + "BrightGreenDye": "Tintura verde chiaro", + "BrightTealDye": "Tintura ottanio chiaro", + "BrightCyanDye": "Tintura azzurro chiaro", + "BrightSkyBlueDye": "Tintura celeste chiaro", + "BrightBlueDye": "Tintura blu chiaro", + "BrightPurpleDye": "Tintura viola chiaro", + "BrightVioletDye": "Tintura lilla chiaro", + "BrightPinkDye": "Tintura rosa chiaro", + "Candle": "Candela", + "BlackDye": "Tintura nera", + "RedandSilverDye": "Tintura rossa e argento", + "OrangeandSilverDye": "Tintura arancione e argento", + "YellowandSilverDye": "Tintura gialla e argento", + "LimeandSilverDye": "Tintura limetta e argento", + "GreenandSilverDye": "Tintura verde e argento", + "TealandSilverDye": "Tintura ottanio e argento", + "CyanandSilverDye": "Tintura azzurra e argento", + "SkyBlueandSilverDye": "Tintura celeste e argento", + "BlueandSilverDye": "Tintura blu e argento", + "CopperChandelier": "Lampadario di rame", + "PurpleandSilverDye": "Tintura viola e argento", + "VioletandSilverDye": "Tintura lilla e argento", + "PinkandSilverDye": "Tintura rosa e argento", + "IntenseFlameDye": "Tintura fiamma intensa", + "IntenseGreenFlameDye": "Tintura fiamma verde intensa", + "IntenseBlueFlameDye": "Tintura fiamma blu intensa", + "RainbowDye": "Tintura arcobaleno", + "IntenseRainbowDye": "Tintura arcobaleno intensa", + "YellowGradientDye": "Tintura gradazioni di giallo", + "CyanGradientDye": "Tintura gradazioni di azzurro", + "SilverChandelier": "Lampadario d'argento", + "VioletGradientDye": "Tintura gradazioni di lilla", + "Paintbrush": "Pennello", + "PaintRoller": "Rullo", + "RedPaint": "Vernice rossa", + "OrangePaint": "Vernice arancione", + "YellowPaint": "Vernice gialla", + "LimePaint": "Vernice limetta", + "GreenPaint": "Vernice verde", + "TealPaint": "Vernice ottanio", + "CyanPaint": "Vernice azzurra", + "GoldChandelier": "Lampadario d'oro", + "SkyBluePaint": "Vernice celeste", + "BluePaint": "Vernice blu", + "PurplePaint": "Vernice viola", + "VioletPaint": "Vernice lilla", + "PinkPaint": "Vernice rosa", + "DeepRedPaint": "Vernice rosso scuro", + "DeepOrangePaint": "Vernice arancione scuro", + "DeepYellowPaint": "Vernice giallo scuro", + "DeepLimePaint": "Vernice limetta scuro", + "DeepGreenPaint": "Vernice verde scuro", + "ManaCrystal": "Cristallo mana", + "DeepTealPaint": "Vernice ottanio scuro", + "DeepCyanPaint": "Vernice azzurro scuro", + "DeepSkyBluePaint": "Vernice celeste scuro", + "DeepBluePaint": "Vernice blu scuro", + "DeepPurplePaint": "Vernice viola scuro", + "DeepVioletPaint": "Vernice lilla scuro", + "DeepPinkPaint": "Vernice rosa scuro", + "BlackPaint": "Vernice nera", + "WhitePaint": "Vernice bianca", + "GrayPaint": "Vernice grigia", + "IronOre": "Minerale di ferro", + "LesserManaPotion": "Pozione mana inferiore", + "PaintScraper": "Raschietto", + "LihzahrdBrick": "Mattone rettiliano", + "LihzahrdBrickWall": "Muro di mattoni rettiliani", + "SlushBlock": "Blocco di fanghiglia", + "PalladiumOre": "Minerale di palladio", + "OrichalcumOre": "Minerale di oricalco", + "TitaniumOre": "Minerale di titanio", + "TealMushroom": "Fungo ottanio", + "GreenMushroom": "Fungo verde", + "SkyBlueFlower": "Fiore celeste", + "BandofStarpower": "Benda della forza stellare", + "YellowMarigold": "Calendula gialla", + "BlueBerries": "Mirtilli", + "LimeKelp": "Alga limetta", + "PinkPricklyPear": "Fico d'india rosa", + "OrangeBloodroot": "Sanguinaria arancione", + "RedHusk": "Guscio rosso", + "CyanHusk": "Guscio azzurro", + "VioletHusk": "Guscio lilla", + "BlackInk": "Inchiostro nero", + "FlowerofFire": "Fiore di fuoco", + "DyeVat": "Vasca per le tinture", + "BeeGun": "Pistola ad api", + "PossessedHatchet": "Accetta posseduta", + "BeeKeeper": "Apicoltore", + "Hive": "Alveare", + "HoneyBlock": "Blocco di miele", + "HiveWall": "Muro ad alveare", + "CrispyHoneyBlock": "Blocco di miele croccante", + "HoneyBucket": "Secchio di miele", + "HiveWand": "Bacchetta alveare", + "MagicMissile": "Missile magico", + "Beenade": "Apebomba", + "GravityGlobe": "Sfera della gravità", + "HoneyComb": "Favo", + "Abeemination": "Apebominio", + "BottledHoney": "Miele imbottigliato", + "RainHat": "Cappello da pioggia", + "RainCoat": "Impermeabile", + "LihzahrdDoor": "Porta rettiliana", + "DungeonDoor": "Porta da dungeon", + "LeadDoor": "Porta di piombo", + "DirtRod": "Bastone di terra", + "IronDoor": "Porta di ferro", + "TempleKey": "Chiave del tempio", + "LihzahrdChest": "Cassa rettiliana", + "LihzahrdChair": "Sedia rettiliana", + "LihzahrdTable": "Tavolo rettiliano", + "LihzahrdWorkBench": "Banco da lavoro rettiliano", + "SuperDartTrap": "Trappola con super dardo", + "FlameTrap": "Trappola con fiamma", + "SpikyBallTrap": "Trappola con palla chiodata", + "SpearTrap": "Trappola con lancia", + "ShadowOrb": "Sfera d'ombra", + "WoodenSpike": "Spuntone di legno", + "LihzahrdPressurePlate": "Piastra a pressione rettiliana", + "LihzahrdStatue": "Statua rettiliana", + "LihzahrdWatcherStatue": "Statua di sorvegliante rettiliano", + "LihzahrdGuardianStatue": "Statua di guardiano rettiliano", + "WaspGun": "Pistola vespa", + "PiranhaGun": "Pistola piraña", + "PygmyStaff": "Bastone pigmeo", + "PygmyNecklace": "Collana pigmea", + "TikiMask": "Maschera tiki", + "Meteorite": "Meteorite", + "TikiShirt": "Camicia tiki", + "TikiPants": "Pantaloni tiki", + "LeafWings": "Ali di foglia", + "BlizzardinaBalloon": "Bufera in un palloncino", + "BundleofBalloons": "Fascio di palloncini", + "BatWings": "Ali di pipistrello", + "BoneSword": "Spada di ossa", + "HerculesBeetle": "Scarabeo Ercole", + "SmokeBomb": "Bomba fumogena", + "BoneKey": "Chiave di ossa", + "MeteoriteBar": "Barra di meteorite", + "Nectar": "Nettare", + "TikiTotem": "Totem tiki", + "LizardEgg": "Uovo di lucertola", + "GraveMarker": "Lapide di legno", + "CrossGraveMarker": "Lapide a croce", + "Headstone": "Lapide moderna", + "Gravestone": "Lapide sporca", + "Obelisk": "Obelisco", + "LeafBlower": "Soffiafoglie", + "ChlorophyteBullet": "Proiettile di clorofite", + "Hook": "Uncino", + "ParrotCracker": "Biscotto per pappagallo", + "StrangeGlowingMushroom": "Fungo strano luminoso", + "Seedling": "Piantina", + "WispinaBottle": "Fiammella in bottiglia", + "PalladiumBar": "Barra di palladio", + "PalladiumSword": "Spada di palladio", + "PalladiumPike": "Picca di palladio", + "PalladiumRepeater": "Balestra di palladio", + "PalladiumPickaxe": "Piccone di palladio", + "PalladiumDrill": "Perforatrice di palladio", + "Flamarang": "Flamarang", + "PalladiumChainsaw": "Motosega di palladio", + "OrichalcumBar": "Barra di oricalco", + "OrichalcumSword": "Spada di oricalco", + "OrichalcumHalberd": "Alabarda di oricalco", + "OrichalcumRepeater": "Balestra di oricalco", + "OrichalcumPickaxe": "Piccone di oricalco", + "OrichalcumDrill": "Perforatrice di oricalco", + "OrichalcumChainsaw": "Motosega di oricalco", + "TitaniumBar": "Barra di titanio", + "TitaniumSword": "Spada di titanio", + "CopperOre": "Minerale di rame", + "MoltenFury": "Furia fusa", + "TitaniumTrident": "Tridente di titanio", + "TitaniumRepeater": "Balestra di titanio", + "TitaniumPickaxe": "Piccone di titanio", + "TitaniumDrill": "Perforatrice di titanio", + "TitaniumChainsaw": "Motosega di titanio", + "PalladiumMask": "Maschera di palladio", + "PalladiumHelmet": "Casco di palladio", + "PalladiumHeadgear": "Copricapo di palladio", + "PalladiumBreastplate": "Corazza di palladio", + "PalladiumLeggings": "Gambali di palladio", + "FieryGreatsword": "Spadone di fuoco", + "OrichalcumMask": "Maschera di oricalco", + "OrichalcumHelmet": "Casco di oricalco", + "OrichalcumHeadgear": "Copricapo di oricalco", + "OrichalcumBreastplate": "Corazza di oricalco", + "OrichalcumLeggings": "Gambali di oricalco", + "TitaniumMask": "Maschera di titanio", + "TitaniumHelmet": "Casco di titanio", + "TitaniumHeadgear": "Copricapo di titanio", + "TitaniumBreastplate": "Corazza di titanio", + "TitaniumLeggings": "Gambali di titanio", + "MoltenPickaxe": "Piccone fuso", + "OrichalcumAnvil": "Incudine di oricalco", + "TitaniumForge": "Forgia di titanio", + "PalladiumWaraxe": "Ascia di battaglia di palladio", + "OrichalcumWaraxe": "Ascia di battaglia di oricalco", + "TitaniumWaraxe": "Ascia di battaglia di titanio", + "HallowedBar": "Barra consacrata", + "ChlorophyteClaymore": "Spadone di clorofite", + "ChlorophyteSaber": "Sciabola di clorofite", + "ChlorophytePartisan": "Partigiana di clorofite", + "ChlorophyteShotbow": "Balestra di clorofite", + "MeteorHelmet": "Casco meteorite", + "ChlorophytePickaxe": "Piccone di clorofite", + "ChlorophyteDrill": "Perforatrice di clorofite", + "ChlorophyteChainsaw": "Motosega di clorofite", + "ChlorophyteGreataxe": "Ascia grande di clorofite", + "ChlorophyteWarhammer": "Martello d'armi di clorofite", + "ChlorophyteArrow": "Freccia di clorofite", + "AmethystHook": "Gancio di ametista", + "TopazHook": "Gancio di topazio", + "SapphireHook": "Gancio di zaffiro", + "EmeraldHook": "Gancio di smeraldo", + "MeteorSuit": "Tunica di meteorite", + "RubyHook": "Gancio di rubino", + "DiamondHook": "Gancio di diamante", + "AmberMosquito": "Zanzara ambrata", + "UmbrellaHat": "Cappello a ombrello", + "NimbusRod": "Bastone nimbus", + "OrangeTorch": "Torcia arancione", + "CrimsandBlock": "Blocco di sabbia cremisi", + "BeeCloak": "Mantello da ape", + "EyeoftheGolem": "Occhio del golem", + "HoneyBalloon": "Palloncino di miele", + "MeteorLeggings": "Gambali di meteorite", + "BlueHorseshoeBalloon": "Palloncino con ferro di cavallo blu", + "WhiteHorseshoeBalloon": "Palloncino con ferro di cavallo bianco", + "YellowHorseshoeBalloon": "Palloncino con ferro di cavallo giallo", + "FrozenTurtleShell": "Guscio di tartaruga congelato", + "SniperRifle": "Fucile da cecchino", + "VenusMagnum": "Magnum velenosa", + "CrimsonRod": "Bastone cremisi", + "CrimtaneBar": "Barra di crimtano", + "Stynger": "Lanciaframmenti", + "FlowerPow": "Fiore potente", + "BottledWater": "Acqua imbottigliata", + "RainbowGun": "Pistola arcobaleno", + "StyngerBolt": "Dardo a frammentazione", + "ChlorophyteJackhammer": "Martello pneumatico di clorofite", + "Teleporter": "Teletrasporto", + "FlowerofFrost": "Fiore del gelo", + "Uzi": "Uzi", + "MagnetSphere": "Sfera a calamita", + "PurpleStainedGlass": "Vetro viola", + "YellowStainedGlass": "Vetro giallo", + "BlueStainedGlass": "Vetro blu", + "SpaceGun": "Pistola spaziale", + "GreenStainedGlass": "Vetro verde", + "RedStainedGlass": "Vetro rosso", + "MulticoloredStainedGlass": "Vetro variopinto", + "SkeletronHand": "Mano di Skeletron", + "Skull": "Teschio", + "BallaHat": "Cappello da bandito", + "GangstaHat": "Cappello da gangster", + "SailorHat": "Cappello da marinaio", + "EyePatch": "Benda per occhio", + "SailorShirt": "Camicia da marinaio", + "RocketBoots": "Stivali razzo", + "SailorPants": "Pantaloni da marinaio", + "SkeletronMask": "Maschera di Skeletron", + "AmethystRobe": "Toga di ametista", + "TopazRobe": "Toga di topazio", + "SapphireRobe": "Toga di zaffiro", + "EmeraldRobe": "Toga di smeraldo", + "RubyRobe": "Toga di rubino", + "DiamondRobe": "Toga di diamante", + "WhiteTuxedoShirt": "Camicia bianca da smoking", + "WhiteTuxedoPants": "Pantaloni bianchi da smoking", + "GrayBrick": "Mattone grigio", + "PanicNecklace": "Collana del panico", + "LifeFruit": "Frutto di vita", + "LihzahrdAltar": "Altare rettiliano", + "LihzahrdPowerCell": "Cellula rettiliana", + "Picksaw": "Segapiccone", + "HeatRay": "Raggio di calore", + "StaffofEarth": "Bastone della terra", + "GolemFist": "Pugno di golem", + "WaterChest": "Cassa di acqua", + "Binoculars": "Binocolo", + "GoldOre": "Minerale d'oro", + "GrayBrickWall": "Muro grigio", + "RifleScope": "Mirino da fucile", + "DestroyerEmblem": "Emblema del distruttore", + "HighVelocityBullet": "Proiettile ad alta velocità", + "JellyfishNecklace": "Collana medusa", + "ZombieArm": "Braccio di zombie", + "TheAxe": "L'ascia", + "IceSickle": "Falcetto di ghiaccio", + "ClothierVoodooDoll": "Bambola voodoo del merciaio", + "PoisonStaff": "Bastone di veleno", + "SlimeStaff": "Bastone di slime", + "RedBrick": "Mattone rosso", + "PoisonDart": "Dardo di veleno", + "EyeSpring": "Libera occhio", + "ToySled": "Slittino", + "BookofSkulls": "Libro di teschi", + "KOCannon": "Cannone K.O.", + "PirateMap": "Mappa pirata", + "TurtleHelmet": "Casco di tartaruga", + "TurtleScaleMail": "Armatura a squame di tartaruga", + "TurtleLeggings": "Gambali di tartaruga", + "SnowballCannon": "Cannone a palle di neve", + "RedBrickWall": "Muro rosso", + "BonePickaxe": "Piccone di ossa", + "MagicQuiver": "Faretra magica", + "MagmaStone": "Pietra di magma", + "ObsidianRose": "Rosa di ossidiana", + "Bananarang": "Bananarang", + "ChainKnife": "Coltello a catena", + "RodofDiscord": "Bastone della discordia", + "DeathSickle": "Falcetto letale", + "TurtleShell": "Guscio di tartaruga", + "TissueSample": "Campione di tessuto", + "ClayBlock": "Blocco d'argilla", + "Vertebrae": "Vertebre", + "BloodySpine": "Spina dorsale insanguinata", + "Ichor": "Icore", + "IchorTorch": "Torcia di icore", + "IchorArrow": "Freccia di icore", + "IchorBullet": "Proiettile di icore", + "GoldenShower": "Doccia dorata", + "BunnyCannon": "Cannone a coniglio", + "ExplosiveBunny": "Coniglio esplosivo", + "VialofVenom": "Fiala di tossina", + "BlueBrick": "Mattone blu", + "FlaskofVenom": "Borraccia di tossina", + "VenomArrow": "Freccia di tossina", + "VenomBullet": "Proiettile di tossina", + "FireGauntlet": "Guanto di fuoco", + "Cog": "Ingranaggio", + "Confetti": "Coriandoli", + "Nanites": "Naniti", + "ExplosivePowder": "Polvere esplosiva", + "GoldDust": "Polvere d'oro", + "PartyBullet": "Proiettile festivo", + "BlueBrickWall": "Muro blu", + "NanoBullet": "Nano-proiettile", + "ExplodingBullet": "Proiettile esplosivo", + "GoldenBullet": "Proiettile dorato", + "FlaskofCursedFlames": "Borraccia di fiamme maledette", + "FlaskofFire": "Borraccia di fuoco", + "FlaskofGold": "Borraccia di oro", + "FlaskofIchor": "Borraccia di icore", + "FlaskofNanites": "Borraccia di naniti", + "FlaskofParty": "Borraccia da festa", + "FlaskofPoison": "Borraccia di veleno", + "ChainLantern": "Lanterna con catena", + "EyeofCthulhuTrophy": "Trofeo occhio di Cthulhu", + "EaterofWorldsTrophy": "Trofeo mangiatore di mondi", + "BrainofCthulhuTrophy": "Trofeo cervello di Cthulhu", + "SkeletronTrophy": "Trofeo Skeletron", + "QueenBeeTrophy": "Trofeo ape regina", + "WallofFleshTrophy": "Trofeo muro di carne", + "DestroyerTrophy": "Trofeo distruttore", + "SkeletronPrimeTrophy": "Trofeo Skeletron primario", + "RetinazerTrophy": "Trofeo Retinazer", + "SpazmatismTrophy": "Trofeo Spazmatism", + "GreenBrick": "Mattone verde", + "PlanteraTrophy": "Trofeo Plantera", + "GolemTrophy": "Trofeo Golem", + "BloodMoonRising": "Alba della luna di sangue", + "TheHangedMan": "L'impiccato", + "GloryoftheFire": "Gloria del fuoco", + "BoneWarp": "Ossa distorte", + "WallSkeleton": "Scheletro da parete", + "HangingSkeleton": "Scheletro appeso", + "BlueSlabWall": "Muro con lastra blu", + "BlueTiledWall": "Muro a piastrelle blu", + "GreenBrickWall": "Muro verde", + "PinkSlabWall": "Muro con lastra rosa", + "PinkTiledWall": "Muro a piastrelle rosa", + "GreenSlabWall": "Muro con lastra verde", + "GreenTiledWall": "Muro a piastrelle verde", + "BlueBrickPlatform": "Piattaforma a mattoni blu", + "PinkBrickPlatform": "Piattaforma a mattoni rosa", + "GreenBrickPlatform": "Piattaforma a mattoni verde", + "MetalShelf": "Mensola di metallo", + "BrassShelf": "Mensola di ottone", + "WoodShelf": "Mensola di legno", + "PinkBrick": "Mattone rosa", + "BrassLantern": "Lanterna di ottone", + "CagedLantern": "Lanterna con gabbietta", + "CarriageLantern": "Lanterna da carro", + "AlchemyLantern": "Lanterna alchemica", + "DiablostLamp": "Lampada satanica", + "BlueDungeonChair": "Sedia blu da dungeon", + "BlueDungeonTable": "Tavolo blu da dungeon", + "BlueDungeonWorkBench": "Banco da lavoro blu da dungeon", + "GreenDungeonChair": "Sedia verde da dungeon", + "SilverOre": "Minerale d'argento", + "PinkBrickWall": "Muro rosa", + "GreenDungeonTable": "Tavolo verde da dungeon", + "GreenDungeonWorkBench": "Banco da lavoro verde da dungeon", + "PinkDungeonChair": "Sedia rosa da dungeon", + "PinkDungeonTable": "Tavolo rosa da dungeon", + "PinkDungeonWorkBench": "Banco da lavoro rosa da dungeon", + "BlueDungeonCandle": "Candela blu da dungeon", + "GreenDungeonCandle": "Candela verde da dungeon", + "PinkDungeonCandle": "Candela rosa da dungeon", + "BlueDungeonVase": "Vaso blu da dungeon", + "GreenDungeonVase": "Vaso verde da dungeon", + "GoldBrick": "Mattone d'oro", + "PinkDungeonVase": "Vaso rosa da dungeon", + "BlueDungeonDoor": "Porta blu da dungeon", + "GreenDungeonDoor": "Porta verde da dungeon", + "PinkDungeonDoor": "Porta rosa da dungeon", + "BlueDungeonBookcase": "Scaffale blu da dungeon", + "GreenDungeonBookcase": "Scaffale verde da dungeon", + "PinkDungeonBookcase": "Scaffale rosa da dungeon", + "Catacomb": "Catacomba", + "DungeonShelf": "Mensola da dungeon", + "SkellingtonJSkellingsworth": "Jack Skeletron", + "GoldBrickWall": "Muro d'oro", + "TheCursedMan": "L'uomo maledetto", + "TheEyeSeestheEnd": "L'occhio vede la fine", + "SomethingEvilisWatchingYou": "Il male che osserva", + "TheTwinsHaveAwoken": "Il risveglio dei gemelli", + "TheScreamer": "L'urlo", + "GoblinsPlayingPoker": "Poker dei goblin", + "Dryadisque": "Driadesca", + "Sunflowers": "Girasoli", + "TerrarianGothic": "Gotico terrariano", + "Beanie": "Basco", + "SilverBrick": "Mattone d'argento", + "ImbuingStation": "Postazione borracce", + "StarinaBottle": "Stella in bottiglia", + "EmptyBullet": "Proiettile vuoto", + "Impact": "Impatto", + "PoweredbyBirds": "Alimentazione volatile", + "TheDestroyer": "Il Distruttore", + "ThePersistencyofEyes": "La persistenza degli occhi", + "UnicornCrossingtheHallows": "Traversata dell'unicorno", + "GreatWave": "Grande ondata", + "StarryNight": "Notte stellata", + "SilverBrickWall": "Muro d'argento", + "GuidePicasso": "Guida picassiana", + "TheGuardiansGaze": "Lo sguardo del guardiano", + "FatherofSomeone": "Padre di qualcuno", + "NurseLisa": "Infermiera Lisa", + "ShadowbeamStaff": "Bastone raggio d'ombra", + "InfernoFork": "Forcone infernale", + "SpectreStaff": "Bastone da spettro", + "WoodenFence": "Recinto di legno", + "LeadFence": "Recinto di piombo", + "BubbleMachine": "Macchina per bolle di sapone", + "CopperBrick": "Mattone di rame", + "BubbleWand": "Bacchetta per bolle di sapone", + "MarchingBonesBanner": "Stendardo ossa in marcia", + "NecromanticSign": "Segnale necromatico", + "RustedCompanyStandard": "Insegna della compagnia arrugginita", + "RaggedBrotherhoodSigil": "Sigillo lacero della confraternita", + "MoltenLegionFlag": "Bandiera della legione infuocata", + "DiabolicSigil": "Sigillo diabolico", + "ObsidianPlatform": "Piattaforma di ossidiana", + "ObsidianDoor": "Porta di ossidiana", + "ObsidianChair": "Sedia di ossidiana", + "CopperBrickWall": "Muro di rame", + "ObsidianTable": "Tavolo di ossidiana", + "ObsidianWorkBench": "Banco da lavoro di ossidiana", + "ObsidianVase": "Vaso di ossidiana", + "ObsidianBookcase": "Scaffale di ossidiana", + "HellboundBanner": "Stendardo da inferno", + "HellHammerBanner": "Stendardo martello infernale", + "HelltowerBanner": "Stendardo torre infernale", + "LostHopesofManBanner": "Stendardo speranze perdute", + "ObsidianWatcherBanner": "Stendardo sorvegliante di ossidiana", + "LavaEruptsBanner": "Stendardo eruzioni di lava", + "Spike": "Spuntone", + "BlueDungeonBed": "Letto blu da dungeon", + "GreenDungeonBed": "Letto verde da dungeon", + "PinkDungeonBed": "Letto rosa da dungeon", + "ObsidianBed": "Letto di ossidiana", + "Waldo": "Wally", + "Darkness": "Oscurità", + "DarkSoulReaper": "Mietitore di anime oscuro", + "Land": "Terra", + "TrappedGhost": "Fantasma intrappolato", + "DemonsEye": "Occhio del demone", + "WaterCandle": "Candela d'acqua", + "FindingGold": "Caccia all'oro", + "FirstEncounter": "Primo incontro", + "GoodMorning": "Buongiorno", + "UndergroundReward": "Premio sotterraneo", + "ThroughtheWindow": "Dalla finestra", + "PlaceAbovetheClouds": "Sopra le nuvole", + "DoNotStepontheGrass": "Vietato calpestare le aiuole", + "ColdWatersintheWhiteLand": "Acque artiche", + "LightlessChasms": "Abissi senza luce", + "TheLandofDeceivingLooks": "La terra ingannevole", + "Book": "Libro", + "Daylight": "Luce diurna", + "SecretoftheSands": "Segreto delle sabbie", + "DeadlandComesAlive": "Terra rinata", + "EvilPresence": "Presenza maligna", + "SkyGuardian": "Guardiano del cielo", + "AmericanExplosive": "Esplosivo americano", + "Discover": "Scoperta", + "HandEarth": "Mano terrestre", + "OldMiner": "Vecchio minatore", + "Skelehead": "Testa scheletrica", + "CopperWatch": "Orologio di rame", + "Cobweb": "Ragnatela", + "FacingtheCerebralMastermind": "Incontro col genio cerebrale", + "LakeofFire": "Lago di fuoco", + "TrioSuperHeroes": "Trio di super eroi", + "SpectreHood": "Cappuccio da spettro", + "SpectreRobe": "Toga da spettro", + "SpectrePants": "Pantaloni da spettro", + "SpectrePickaxe": "Piccone da spettro", + "SpectreHamaxe": "Maglio da spettro", + "Ectoplasm": "Ectoplasma", + "GothicChair": "Sedia gotica", + "NecroHelmet": "Casco funebre", + "GothicTable": "Tavolo gotico", + "GothicWorkBench": "Banco da lavoro gotico", + "GothicBookcase": "Scaffale gotico", + "PaladinsHammer": "Martello del paladino", + "SWATHelmet": "Casco della SWAT", + "BeeWings": "Ali di ape", + "GiantHarpyFeather": "Piuma di arpia gigante", + "BoneFeather": "Piuma di ossa", + "FireFeather": "Piuma di fuoco", + "IceFeather": "Piuma di ghiaccio", + "NecroBreastplate": "Pettorale funebre", + "BrokenBatWing": "Ala rotta di pipistrello", + "TatteredBeeWing": "Ala di ape a brandelli", + "LargeAmethyst": "Ametista grande", + "LargeTopaz": "Topazio grande", + "LargeSapphire": "Zaffiro grande", + "LargeEmerald": "Smeraldo grande", + "LargeRuby": "Rubino grande", + "LargeDiamond": "Diamante grande", + "JungleChest": "Cassa della giungla", + "CorruptionChest": "Cassa della corruzione", + "NecroGreaves": "Schinieri funebri", + "CrimsonChest": "Cassa cremisi", + "HallowedChest": "Cassa consacrata", + "JungleKey": "Chiave della giungla", + "CorruptionKey": "Chiave della corruzione", + "CrimsonKey": "Chiave cremisi", + "HallowedKey": "Chiave consacrata", + "FrozenKey": "Chiave congelata", + "ImpFace": "Volto di diavoletto", + "OminousPresence": "Presenza sinistra", + "Bone": "Osso", + "ShiningMoon": "Luna splendente", + "LivingGore": "Sangue vivente", + "FlowingMagma": "Magma scorrevole", + "SpectrePaintbrush": "Pennello dello spettro", + "SpectrePaintRoller": "Rullo dello spettro", + "SpectrePaintScraper": "Raschietto dello spettro", + "ShroomiteHeadgear": "Copricapo di micete", + "ShroomiteMask": "Maschera di micete", + "ShroomiteHelmet": "Casco di micete", + "ShroomiteBreastplate": "Corazza di micete", + "Muramasa": "Muramasa", + "ShroomiteLeggings": "Gambali di micete", + "Autohammer": "Martello automatico", + "ShroomiteBar": "Barra di micete", + "SDMG": "Delfino mitra", + "CenxsTiara": "Diadema di Cenx", + "CenxsBreastplate": "Corazza di Cenx", + "CenxsLeggings": "Gambali di Cenx", + "CrownosMask": "Maschera di Crowno", + "CrownosBreastplate": "Corazza di Crowno", + "CrownosLeggings": "Gambali di Crowno", + "CobaltShield": "Scudo di cobalto", + "WillsHelmet": "Casco di Will", + "WillsBreastplate": "Corazza di Will", + "WillsLeggings": "Gambali di Will", + "JimsHelmet": "Casco di Jim", + "JimsBreastplate": "Corazza di Jim", + "JimsLeggings": "Gambali di Jim", + "AaronsHelmet": "Casco di Aaron", + "AaronsBreastplate": "Corazza di Aaron", + "AaronsLeggings": "Gambali di Aaron", + "VampireKnives": "Coltelli vampiro", + "AquaScepter": "Scettro d'acqua", + "BrokenHeroSword": "Spada rotta dell'eroe", + "ScourgeoftheCorruptor": "Castigo del corruttore", + "StaffoftheFrostHydra": "Bastone dell'idra del gelo", + "TheCreationoftheGuide": "Creazione della guida", + "TheMerchant": "Il mercante", + "CrownoDevoursHisLunch": "Crowno divora il pranzo", + "RareEnchantment": "Incantesimo raro", + "GloriousNight": "Notte gloriosa", + "SweetheartNecklace": "Collana da innamorati", + "FlurryBoots": "Stivali a raffica", + "LuckyHorseshoe": "Ferro di cavallo fortunato", + "DTownsHelmet": "Casco di D-Town", + "DTownsBreastplate": "Corazza di D-Town", + "DTownsLeggings": "Gambali di D-Town", + "DTownsWings": "Ali di D-Town", + "WillsWings": "Ali di Will", + "CrownosWings": "Ali di Crowno", + "CenxsWings": "Ali di Cenx", + "CenxsDress": "Vestito di Cenx", + "CenxsDressPants": "Pantaloni di Cenx", + "PalladiumColumn": "Colonna di palladio", + "ShinyRedBalloon": "Palloncino rosso brillante", + "PalladiumColumnWall": "Muro di colonne di palladio", + "BubblegumBlock": "Blocco di gomma da masticare", + "BubblegumBlockWall": "Muro di blocchi di gomma da masticare", + "TitanstoneBlock": "Blocco di pietra titanica", + "TitanstoneBlockWall": "Muro di blocchi di pietra titanica", + "MagicCuffs": "Manette magiche", + "MusicBoxSnow": "Carillon (Neve)", + "MusicBoxCrimson": "Carillon (Cremisi)", + "MusicBoxBoss4": "Carillon (Boss 4)", + "SilverWatch": "Orologio d'argento", + "Harpoon": "Arpione", + "MusicBoxAltOverworldDay": "Carillon (Giornata mondiale alternativa)", + "MusicBoxRain": "Carillon (Pioggia)", + "MusicBoxIce": "Carillon (Ghiaccio)", + "MusicBoxDesert": "Carillon (Deserto)", + "MusicBoxDungeon": "Carillon (Dungeon)", + "MusicBoxPlantera": "Carillon (Plantera)", + "MusicBoxBoss5": "Carillon (Boss 5)", + "MusicBoxTemple": "Carillon (Tempio)", + "MusicBoxEclipse": "Carillon (Eclissi)", + "SpikyBall": "Palla chiodata", + "MusicBoxMushrooms": "Carillon (Funghi)", + "ButterflyDust": "Polvere di farfalla", + "AnkhCharm": "Amuleto croce egizia", + "AnkhShield": "Scudo croce egizia", + "BlueFlare": "Razzo blu", + "AnglerFishBanner": "Stendardo rana pescatrice", + "AngryNimbusBanner": "Stendardo nimbus adirato", + "AnomuraFungusBanner": "Stendardo anomuri", + "AntlionBanner": "Stendardo formicaleone", + "ArapaimaBanner": "Stendardo arapaima", + "BallOHurt": "Palla del dolore", + "ArmoredSkeletonBanner": "Stendardo scheletro corazzato", + "BatBanner": "Stendardo pipistrello della caverna", + "BirdBanner": "Stendardo uccello", + "BlackRecluseBanner": "Stendardo vedova eremita", + "BloodFeederBanner": "Stendardo mangiasangue", + "BloodJellyBanner": "Stendardo gelatina di sangue", + "BloodCrawlerBanner": "Stendardo acaro del sangue", + "BoneSerpentBanner": "Stendardo serpente di ossa", + "BunnyBanner": "Stendardo coniglio", + "ChaosElementalBanner": "Stendardo elementale del caos", + "BlueMoon": "Luna blu", + "MimicBanner": "Stendardo sosia", + "ClownBanner": "Stendardo clown", + "CorruptBunnyBanner": "Stendardo coniglio corrotto", + "CorruptGoldfishBanner": "Stendardo pesce rosso corrotto", + "CrabBanner": "Stendardo granchio", + "CrimeraBanner": "Stendardo cremera", + "CrimsonAxeBanner": "Stendardo ascia cremisi", + "CursedHammerBanner": "Stendardo martello maledetto", + "DemonBanner": "Stendardo demone", + "DemonEyeBanner": "Stendardo occhio del demone", + "Handgun": "Pistola", + "DerplingBanner": "Stendardo derpling", + "EaterofSoulsBanner": "Stendardo mangiatore di anime", + "EnchantedSwordBanner": "Stendardo spada incantata", + "FaceMonsterBanner": "Stendardo faccia mostruosa", + "FloatyGrossBanner": "Stendardo grasso galleggiante", + "FlyingFishBanner": "Stendardo pesce volante", + "FlyingSnakeBanner": "Stendardo serpente volante", + "FrankensteinBanner": "Stendardo Frankenstein", + "FungiBulbBanner": "Stendardo bulbo fungoso", + "WaterBolt": "Dardo d'acqua", + "FungoFishBanner": "Stendardo pesce fungo", + "GastropodBanner": "Stendardo gasteropode", + "GoblinThiefBanner": "Stendardo goblin ladro", + "GoblinSorcererBanner": "Stendardo goblin stregone", + "GoblinPeonBanner": "Stendardo goblin operaio", + "GoblinScoutBanner": "Stendardo goblin ricognitore", + "GoblinWarriorBanner": "Stendardo goblin guerriero", + "GoldfishBanner": "Stendardo pesce rosso", + "HarpyBanner": "Stendardo arpia", + "HellbatBanner": "Stendardo pipistrello dell'inferno", + "Bomb": "Bomba", + "HerplingBanner": "Stendardo herpling", + "HornetBanner": "Stendardo calabrone", + "IceElementalBanner": "Stendardo elementale del ghiaccio", + "IcyMermanBanner": "Stendardo tritone del ghiaccio", + "FireImpBanner": "Stendardo diavoletto di fuoco", + "JellyfishBanner": "Stendardo medusa blu", + "JungleCreeperBanner": "Stendardo ragno della giungla", + "LihzahrdBanner": "Stendardo rettiliano", + "ManEaterBanner": "Stendardo mangiauomini", + "MeteorHeadBanner": "Stendardo testa di meteorite", + "Dynamite": "Dinamite", + "MothBanner": "Stendardo falena", + "MummyBanner": "Stendardo mummia", + "MushiLadybugBanner": "Stendardo coccinella mushi", + "ParrotBanner": "Stendardo pappagallo", + "PigronBanner": "Stendardo maialdrago", + "PiranhaBanner": "Stendardo piraña", + "PirateBanner": "Stendardo pirata marinaio", + "PixieBanner": "Stendardo fatina", + "RaincoatZombieBanner": "Stendardo zombie con impermeabile", + "ReaperBanner": "Stendardo mietitore", + "Grenade": "Granata", + "SharkBanner": "Stendardo squalo", + "SkeletonBanner": "Stendardo scheletro", + "SkeletonMageBanner": "Stendardo lanciatore oscuro", + "SlimeBanner": "Stendardo slime blu", + "SnowFlinxBanner": "Stendardo flinx di neve", + "SpiderBanner": "Stendardo arrampicatore", + "SporeZombieBanner": "Stendardo zombie di spore", + "SwampThingBanner": "Stendardo Swamp Thing", + "TortoiseBanner": "Stendardo testuggine gigante", + "ToxicSludgeBanner": "Stendardo fango tossico", + "SandBlock": "Blocco di sabbia", + "UmbrellaSlimeBanner": "Stendardo slime a ombrello", + "UnicornBanner": "Stendardo unicorno", + "VampireBanner": "Stendardo vampiro", + "VultureBanner": "Stendardo avvoltoio", + "NypmhBanner": "Stendardo ninfa", + "WerewolfBanner": "Stendardo lupo mannaro", + "WolfBanner": "Stendardo lupo", + "WorldFeederBanner": "Stendardo mangiamondo", + "WormBanner": "Stendardo verme", + "WraithBanner": "Stendardo apparizione", + "GoldWatch": "Orologio d'oro", + "Glass": "Vetro", + "WyvernBanner": "Stendardo viverna", + "ZombieBanner": "Stendardo zombie", + "GlassPlatform": "Piattaforma di vetro", + "GlassChair": "Sedia di vetro", + "GoldenChair": "Sedia dorata", + "GoldenToilet": "Toilette dorata", + "BarStool": "Sgabello", + "HoneyChair": "Sedia miele", + "SteampunkChair": "Sedia steampunk", + "GlassDoor": "Porta di vetro", + "Sign": "Cartello", + "GoldenDoor": "Porta dorata", + "HoneyDoor": "Porta miele", + "SteampunkDoor": "Porta steampunk", + "GlassTable": "Tavolo di vetro", + "BanquetTable": "Tavolo da banchetto", + "Bar": "Bar", + "GoldenTable": "Tavolo dorato", + "HoneyTable": "Tavolo miele", + "SteampunkTable": "Tavolo steampunk", + "GlassBed": "Letto di vetro", + "AshBlock": "Blocco di cenere", + "GoldenBed": "Letto dorato", + "HoneyBed": "Letto miele", + "SteampunkBed": "Letto steampunk", + "LivingWoodWall": "Muro di legno vivo", + "FartinaJar": "Flatulenza in barattolo", + "Pumpkin": "Zucca", + "PumpkinWall": "Muro di zucca", + "Hay": "Fieno", + "HayWall": "Muro di fieno", + "SpookyWood": "Legno spettrale", + "Obsidian": "Ossidiana", + "SpookyWoodWall": "Muro di legno spettrale", + "PumpkinHelmet": "Casco da zucca", + "PumpkinBreastplate": "Corazza da zucca", + "PumpkinLeggings": "Gambali da zucca", + "CandyApple": "Mela caramellata", + "SoulCake": "Torta dell'anima", + "NurseHat": "Cappello da infermiera", + "NurseShirt": "Camicia da infermiera", + "NursePants": "Pantaloni da infermiera", + "WizardsHat": "Cappello dello stregone", + "Hellstone": "Pietra infernale", + "GuyFawkesMask": "Maschera di Guy Fawkes", + "DyeTraderRobe": "Toga del venditore di tinture", + "SteampunkGoggles": "Occhiali steampunk", + "CyborgHelmet": "Casco da cyborg", + "CyborgShirt": "Camicia da cyborg", + "CyborgPants": "Pantaloni da cyborg", + "CreeperMask": "Maschera da ragno", + "CreeperShirt": "Camicia da ragno", + "CreeperPants": "Pantaloni da ragno", + "CatMask": "Maschera da gatto", + "HellstoneBar": "Barra di pietra infernale", + "CatShirt": "Camicia da gatto", + "CatPants": "Pantaloni da gatto", + "GhostMask": "Maschera da fantasma", + "GhostShirt": "Camicia da fantasma", + "PumpkinMask": "Maschera da zucca", + "PumpkinShirt": "Camicia da zucca", + "PumpkinPants": "Pantaloni da zucca", + "RobotMask": "Maschera da robot", + "RobotShirt": "Camicia da robot", + "RobotPants": "Pantaloni da robot", + "MudBlock": "Blocco di fango", + "UnicornMask": "Maschera da unicorno", + "UnicornShirt": "Camicia da unicorno", + "UnicornPants": "Pantaloni da unicorno", + "VampireMask": "Maschera da vampiro", + "VampireShirt": "Camicia da vampiro", + "VampirePants": "Pantaloni da vampiro", + "WitchHat": "Cappello da strega", + "LeprechaunHat": "Cappello da folletto", + "LeprechaunShirt": "Camicia da folletto", + "LeprechaunPants": "Pantaloni da folletto", + "Sapphire": "Zaffiro", + "PixieShirt": "Camicia da fatina", + "PixiePants": "Pantaloni da fatina", + "PrincessHat": "Cappello da principessa", + "PrincessDressNew": "Vestito da principessa", + "GoodieBag": "Regalo a sorpresa", + "WitchDress": "Vestito da strega", + "WitchBoots": "Stivali da strega", + "BrideofFrankensteinMask": "Maschera della moglie di Frankenstein", + "BrideofFrankensteinDress": "Vestito della moglie di Frankenstein", + "KarateTortoiseMask": "Maschera tartaruga ninja", + "Ruby": "Rubino", + "KarateTortoiseShirt": "Camicia tartaruga ninja", + "KarateTortoisePants": "Pantaloni tartaruga ninja", + "CandyCornRifle": "Fucile caramella", + "CandyCorn": "Caramella", + "JackOLanternLauncher": "Lanciazucche intagliate", + "ExplosiveJackOLantern": "Zucca intagliata esplosiva", + "Sickle": "Falcetto", + "PumpkinPie": "Torta di zucca", + "ScarecrowHat": "Cappello da spaventapasseri", + "ScarecrowShirt": "Camicia da spaventapasseri", + "Emerald": "Smeraldo", + "ScarecrowPants": "Pantaloni da spaventapasseri", + "Cauldron": "Calderone", + "PumpkinChair": "Sedia di zucca", + "PumpkinDoor": "Porta di zucca", + "PumpkinTable": "Tavolo di zucca", + "PumpkinWorkBench": "Banco da lavoro di zucca", + "PumpkinPlatform": "Piattaforma di zucca", + "TatteredFairyWings": "Ali di fata a brandelli", + "SpiderEgg": "Uovo di ragno", + "MagicalPumpkinSeed": "Seme di zucca magico", + "DepthMeter": "Misuratore di profondità", + "Topaz": "Topazio", + "BatHook": "Uncino pipistrello", + "BatScepter": "Scettro pipistrello", + "RavenStaff": "Bastone corvo", + "JungleKeyMold": "Stampo per chiave della giungla", + "CorruptionKeyMold": "Stampo per chiave della corruzione", + "CrimsonKeyMold": "Stampo per chiave cremisi", + "HallowedKeyMold": "Stampo per chiave consacrata", + "FrozenKeyMold": "Stampo per chiave congelata", + "HangingJackOLantern": "Zucca intagliata appesa", + "RottenEgg": "Uovo marcio", + "Amethyst": "Ametista", + "UnluckyYarn": "Gomitolo sfortunato", + "BlackFairyDust": "Polvere di fata nera", + "Jackelier": "Lampazucca", + "JackOLantern": "Zucca intagliata", + "SpookyChair": "Sedia spettrale", + "SpookyDoor": "Porta spettrale", + "SpookyTable": "Tavolo spettrale", + "SpookyWorkBench": "Banco da lavoro spettrale", + "ReaperHood": "Cappuccio da mietitore", + "Diamond": "Diamante", + "ReaperRobe": "Toga da mietitore", + "FoxMask": "Maschera da volpe", + "FoxShirt": "Camicia da volpe", + "FoxPants": "Pantaloni da volpe", + "CatEars": "Orecchie da gatto", + "BloodyMachete": "Machete insanguinato", + "TheHorsemansBlade": "Lama del cavaliere", + "BladedGlove": "Guanto affilato", + "PumpkinSeed": "Seme di zucca", + "SpookyHook": "Uncino spettrale", + "GlowingMushroom": "Fungo luminoso", + "SpookyWings": "Ali spettrali", + "SpookyTwig": "Rametto spettrale", + "SpookyHelmet": "Casco spettrale", + "SpookyBreastplate": "Corazza spettrale", + "SpookyLeggings": "Gambali spettrali", + "StakeLauncher": "Lanciapaletti", + "Stake": "Paletto", + "CursedSapling": "Arboscello maledetto", + "SpaceCreatureMask": "Maschera da alieno", + "SpaceCreatureShirt": "Camicia da alieno", + "Star": "Stella", + "SpaceCreaturePants": "Pantaloni da alieno", + "WolfMask": "Maschera da lupo", + "WolfShirt": "Camicia da lupo", + "WolfPants": "Pantaloni da lupo", + "PumpkinMoonMedallion": "Medaglione luna a zucca", + "NecromanticScroll": "Pergamena necromatica", + "JackingSkeletron": "Skeletron volante", + "BitterHarvest": "Raccolto amaro", + "BloodMoonCountess": "Contessa della luna di sangue", + "HallowsEve": "La vigilia", + "IvyWhip": "Frusta di edera", + "MorbidCuriosity": "Curiosità morbosa", + "TreasureHunterShirt": "Camicia da cacciatore di tesori", + "TreasureHunterPants": "Pantaloni da cacciatore di tesori", + "DryadCoverings": "Reggiseno da driade", + "DryadLoincloth": "Perizoma da driade", + "MourningWoodTrophy": "Trofeo albero del pianto", + "PumpkingTrophy": "Trofeo zucca", + "JackOLanternMask": "Maschera zucca intagliata", + "SniperScope": "Mirino da cecchino", + "HeartLantern": "Lanterna a cuore", + "BreathingReed": "Canna per la respirazione", + "JellyfishDivingGear": "Muta da sub medusa", + "ArcticDivingGear": "Muta da sub artica", + "FrostsparkBoots": "Stivali lampo di gelo", + "FartInABalloon": "Flatulenza in un palloncino", + "PapyrusScarab": "Papiro con scarabeo", + "CelestialStone": "Pietra celestiale", + "Hoverboard": "Volopattino", + "CandyCane": "Bastoncino di zucchero", + "SugarPlum": "Frutta candita", + "Present": "Regalo", + "Flipper": "Pinna", + "RedRyder": "Red Ryder", + "FestiveWings": "Ali festive", + "PineTreeBlock": "Blocco di abete", + "ChristmasTree": "Albero di Natale", + "StarTopper1": "Puntale a stella 1", + "StarTopper2": "Puntale a stella 2", + "StarTopper3": "Puntale a stella 3", + "BowTopper": "Puntale con fiocco", + "WhiteGarland": "Festone bianco", + "WhiteAndRedGarland": "Festone bianco e rosso", + "HealingPotion": "Pozione curativa", + "RedGardland": "Festone rosso", + "RedAndGreenGardland": "Festone rosso e verde", + "GreenGardland": "Festone verde", + "GreenAndWhiteGarland": "Festone verde e bianco", + "MulticoloredBulb": "Palline multicolore", + "RedBulb": "Palline rosse", + "YellowBulb": "Palline gialle", + "GreenBulb": "Palline verdi", + "RedAndGreenBulb": "Palline rosse e verdi", + "YellowAndGreenBulb": "Palline gialle e verdi", + "ManaPotion": "Pozione mana", + "RedAndYellowBulb": "Palline rosse e gialle", + "WhiteBulb": "Palline bianche", + "WhiteAndRedBulb": "Palline bianche e rosse", + "WhiteAndYellowBulb": "Palline bianche e gialle", + "WhiteAndGreenBulb": "Palline bianche e verdi", + "MulticoloredLights": "Luci multicolore", + "RedLights": "Luci rosse", + "GreenLights": "Luci verdi", + "BlueLights": "Luci blu", + "YellowLights": "Luci gialle", + "GoldBar": "Barra d'oro", + "BladeofGrass": "Spada di erba", + "RedAndYellowLights": "Luci rosse e gialle", + "RedAndGreenLights": "Luci rosse e verdi", + "YellowAndGreenLights": "Luci gialle e verdi", + "BlueAndGreenLights": "Luci blu e verdi", + "RedAndBlueLights": "Luci rosse e blu", + "BlueAndYellowLights": "Luci blu e gialle", + "GiantBow": "Arco gigante", + "ReindeerAntlers": "Corna di renna", + "Holly": "Holly", + "CandyCaneSword": "Spada di zucchero", + "ThornChakram": "Artiglio di Chakram", + "EldMelter": "Fondielfi", + "ChristmasPudding": "Dolce natalizio", + "Eggnog": "Zabaione", + "StarAnise": "Shuriken di anice", + "ReindeerBells": "Campanelle per renna", + "CandyCaneHook": "Uncino di zucchero", + "ChristmasHook": "Uncino natalizio", + "CnadyCanePickaxe": "Piccone di zucchero", + "FruitcakeChakram": "Chakram alla frutta", + "SugarCookie": "Biscotto", + "ObsidianBrick": "Mattone di ossidiana", + "GingerbreadCookie": "Pan di zenzero", + "HandWarmer": "Scaldamani", + "Coal": "Carbone", + "Toolbox": "Cassetta degli attrezzi", + "PineDoor": "Porta di abete", + "PineChair": "Sedia di abete", + "PineTable": "Tavolo di abete", + "DogWhistle": "Fischietto per cani", + "ChristmasTreeSword": "Spada albero di Natale", + "ChainGun": "Mitragliatrice", + "ObsidianSkull": "Teschio di ossidiana", + "Razorpine": "Lancia-aghi", + "BlizzardStaff": "Bastone da bufera", + "MrsClauseHat": "Cappello natalizio femminile", + "MrsClauseShirt": "Top natalizio femminile", + "MrsClauseHeels": "Tacchi natalizi femminili", + "ParkaHood": "Cappuccio parka", + "ParkaCoat": "Cappotto parka", + "ParkaPants": "Pantaloni parka", + "SnowHat": "Cappello da neve", + "UglySweater": "Maglione orrendo", + "MushroomGrassSeeds": "Semi di fungo", + "TreeMask": "Maschera da albero", + "TreeShirt": "Giacca da albero", + "TreeTrunks": "Pantaloni da albero", + "ElfHat": "Cappello da elfo", + "ElfShirt": "Giacca da elfo", + "ElfPants": "Pantaloni da elfo", + "SnowmanCannon": "Cannone pupazzo di neve", + "NorthPole": "Polo Nord", + "ChristmasTreeWallpaper": "Carta da parati con alberi di Natale", + "OrnamentWallpaper": "Carta da parati ornamentale", + "JungleGrassSeeds": "Semi dell'erba della giungla", + "CandyCaneWallpaper": "Carta da parati con bastoncini di zucchero", + "FestiveWallpaper": "Carta da parati festiva", + "StarsWallpaper": "Carta da parati con stelle", + "SquigglesWallpaper": "Carta da parati con scarabocchi", + "SnowflakeWallpaper": "Carta da parati con fiocchi di neve", + "KrampusHornWallpaper": "Carta da parati con corna", + "BluegreenWallpaper": "Carta da parati blu e verde", + "GrinchFingerWallpaper": "Carta da parati con grinch", + "NaughtyPresent": "Regalo per birichini", + "BabyGrinchMischiefWhistle": "Fischietto del piccolo grinch monello", + "WoodenHammer": "Martello di legno", + "IceQueenTrophy": "Trofeo regina del ghiaccio", + "SantaNK1Trophy": "Trofeo Babbo Armato", + "EverscreamTrophy": "Trofeo semprepungente", + "MusicBoxPumpkinMoon": "Carillon (Luna a zucca)", + "MusicBoxAltUnderground": "Carillon (Sotterraneo alternativo)", + "MusicBoxFrostMoon": "Carillon (Luna del gelo)", + "BrownPaint": "Vernice marrone", + "ShadowPaint": "Vernice ombra", + "NegativePaint": "Vernice negativa", + "TeamDye": "Tintura di squadra", + "StarCannon": "Cannone stellare", + "AmethystGemsparkBlock": "Blocco di ametista luccicante", + "TopazGemsparkBlock": "Blocco di topazio luccicante", + "SapphireGemsparkBlock": "Blocco di zaffiro luccicante", + "EmeraldGemsparkBlock": "Blocco di smeraldo luccicante", + "RubyGemsparkBlock": "Blocco di rubino luccicante", + "DiamondGemsparkBlock": "Blocco di diamante luccicante", + "AmberGemsparkBlock": "Blocco di ambra luccicante", + "LifeHairDye": "Tintura per capelli Vita", + "ManaHairDye": "Tintura per capelli Mana", + "DepthHairDye": "Tintura per capelli Profondità", + "BluePhaseblade": "Spada laser blu", + "MoneyHairDye": "Tintura per capelli Soldi", + "TimeHairDye": "Tintura per capelli Tempo", + "TeamHairDye": "Tintura per capelli Squadra", + "BiomeHairDye": "Tintura per capelli Bioma", + "PartyHairDye": "Tintura per capelli Festa", + "RainbowHairDye": "Tintura per capelli Arcobaleno", + "SpeedHairDye": "Tintura per capelli Velocità", + "AngelHalo": "Aureola dell'angelo", + "Fez": "Fez", + "Womannquin": "Manichino donna", + "RedPhaseblade": "Spada laser rossa", + "HairDyeRemover": "Decolorante per capelli", + "BugNet": "Retino", + "Firefly": "Lucciola", + "FireflyinaBottle": "Lucciola in bottiglia", + "MonarchButterfly": "Farfalla monarca", + "PurpleEmperorButterfly": "Farfalla imperatore viola", + "RedAdmiralButterfly": "Farfalla ammiraglio rosso", + "UlyssesButterfly": "Farfalla Ulisse", + "SulphurButterfly": "Farfalla sulfurea", + "TreeNymphButterfly": "Farfalla ninfa dell'albero", + "DirtBlock": "Blocco di terra", + "CopperBar": "Barra di rame", + "GreenPhaseblade": "Spada laser verde", + "ZebraSwallowtailButterfly": "Farfalla con coda zebrata", + "JuliaButterfly": "Farfalla Julia", + "Worm": "Verme", + "Mouse": "Topo", + "LightningBug": "Insetto illuminante", + "LightningBuginaBottle": "Insetto illuminante in bottiglia", + "Snail": "Chiocciola", + "GlowingSnail": "Chiocciola luminosa", + "FancyGreyWallpaper": "Carta da parati grigia decorata", + "IceFloeWallpaper": "Carta da parati banco di ghiaccio", + "PurplePhaseblade": "Spada laser viola", + "MusicWallpaper": "Carta da parati musicale", + "PurpleRainWallpaper": "Carta da parati pioggia viola", + "RainbowWallpaper": "Carta da parati arcobaleno", + "SparkleStoneWallpaper": "Carta da parati pietra luccicante", + "StarlitHeavenWallpaper": "Carta da parati cielo stellato", + "Bird": "Uccello", + "BlueJay": "Ghiandaia blu", + "Cardinal": "Passerotto", + "Squirrel": "Scoiattolo", + "Bunny": "Coniglio", + "WhitePhaseblade": "Spada laser bianca", + "YellowPhaseblade": "Spada laser gialla", + "MeteorHamaxe": "Maglio di meteorite", + "EmptyBucket": "Secchio vuoto", + "WaterBucket": "Secchio d'acqua", + "LavaBucket": "Secchio di lava", + "JungleRose": "Rosa della giungla", + "Stinger": "Artiglio", + "SilverBar": "Barra d'argento", + "Vine": "Vite", + "FeralClaws": "Artigli bestiali", + "BlacksmithRack": "Rastrelliera del fabbro", + "CarpentryRack": "Rastrelliera del falegname", + "HelmetRack": "Rastrelliera per elmi", + "SpearRack": "Rastrelliera per lance", + "SwordRack": "Rastrelliera per spade", + "StoneSlab": "Lastra di pietra", + "AnkletoftheWind": "Cavigliera del vento", + "SandstoneSlab": "Lastra di arenaria", + "Frog": "Rana", + "MallardDuck": "Anatra selvatica", + "Duck": "Anatra", + "StaffofRegrowth": "Bastone della ricrescita", + "HellstoneBrick": "Mattone di pietra infernale", + "WhoopieCushion": "Cuscino rumoroso", + "BlackScorpion": "Scorpione nero", + "Scorpion": "Scorpione", + "BubbleWallpaper": "Carta da parati a bolle", + "CopperPipeWallpaper": "Carta da parati con tubi di rame", + "Shackle": "Grillo", + "DuckyWallpaper": "Carta da parati con paperelle", + "FrostCore": "Nucleo di gelo", + "BunnyCage": "Gabbia con coniglio", + "SquirrelCage": "Gabbia con scoiattolo", + "MallardDuckCage": "Gabbia con anatra selvatica", + "DuckCage": "Gabbia con anatra", + "BirdCage": "Gabbia con uccello", + "BlueJayCage": "Gabbia con ghiandaia", + "CardinalCage": "Gabbia con passerotto", + "WaterfallWall": "Muro con acqua", + "MoltenHamaxe": "Maglio fuso", + "LavafallWall": "Muro con lava", + "CrimsonSeeds": "Semi cremisi", + "HeavyWorkBench": "Banco da lavoro pesante", + "CopperPlating": "Lastra di rame", + "SnailCage": "Gabbia con chiocciola", + "GlowingSnailCage": "Gabbia con chiocciola luminosa", + "ShroomiteDiggingClaw": "Forcone di micete", + "AmmoBox": "Cassa di munizioni", + "MonarchButterflyJar": "Barattolo con farfalla monarca", + "PurpleEmperorButterflyJar": "Barattolo con farfalla imperatore viola", + "Flamelash": "Lanciatore di fiamma", + "RedAdmiralButterflyJar": "Barattolo con farfalla ammiraglio rosso", + "UlyssesButterflyJar": "Barattolo con farfalla Ulisse", + "SulphurButterflyJar": "Barattolo con farfalla sulfurea", + "TreeNymphButterflyJar": "Barattolo con farfalla ninfa dell'albero", + "ZebraSwallowtailButterflyJar": "Barattolo con farfalla con coda zebrata", + "JuliaButterflyJar": "Barattolo con farfalla Julia", + "ScorpionCage": "Gabbia con scorpione", + "BlackScorpionCage": "Gabbia con scorpione nero", + "VenomStaff": "Bastone tossico", + "SpectreMask": "Maschera spettro", + "PhoenixBlaster": "Blaster della fenice", + "FrogCage": "Gabbia con rana", + "MouseCage": "Gabbia con topo", + "BoneWelder": "Saldatore per ossa", + "FleshCloningVaat": "Vasca di clonazione carne", + "GlassKiln": "Forno per vetro", + "LihzahrdFurnace": "Fornace rettiliana", + "LivingLoom": "Telaio vivente", + "SkyMill": "Macina celeste", + "IceMachine": "Macchina per ghiaccio", + "BeetleHelmet": "Casco di scarabeo", + "IronBar": "Barra di ferro", + "Sunfury": "Furia del sole", + "BeetleScaleMail": "Armatura a squame di scarabeo", + "BeetleShell": "Guscio di scarabeo", + "BeetleLeggings": "Gambali di scarabeo", + "SteampunkBoiler": "Caldaia steampunk", + "HoneyDispenser": "Distributore di miele", + "Penguin": "Pinguino", + "PenguinCage": "Gabbia con pinguino", + "WormCage": "Gabbia con verme", + "Terrarium": "Terrario", + "SuperManaPotion": "Pozione super mana", + "Hellforge": "Creazione degli inferi", + "EbonwoodFence": "Recinto di ebano", + "RichMahoganyFence": "Recinto di mogano scuro", + "PearlwoodFence": "Recinto di legno perlato", + "ShadewoodFence": "Recinto di grigiolegno", + "BrickLayer": "Cazzuola", + "ExtendoGrip": "Bastone da allungo", + "PaintSprayer": "Spruzzavernice", + "PortableCementMixer": "Impastatrice portatile", + "BeetleHusk": "Carapace di scarabeo", + "CelestialMagnet": "Calamita celestiale", + "ClayPot": "Vaso di argilla", + "CelestialEmblem": "Emblema celestiale", + "CelestialCuffs": "Manette celestiali", + "PeddlersHat": "Cappello da venditore ambulante", + "PulseBow": "Arco a impulsi", + "NaturesGift": "Dono della natura", + "Bed": "Letto", + "Silk": "Seta", + "DynastyTable": "Tavolo dinastico", + "LesserRestorationPotion": "Pozione di ripristino inferiore", + "DynastyWood": "Legno dinastico", + "RedDynastyShingles": "Assicelle dinastiche rosse", + "BlueDynastyShingles": "Assicelle dinastiche blu", + "WhiteDynastyWall": "Muro dinastico bianco", + "BlueDynastyWall": "Muro dinastico blu", + "DynastyDoor": "Porta dinastica", + "Sake": "Sakè", + "PadThai": "Pad Thai", + "Pho": "Pho", + "Revolver": "Rivoltella", + "RestorationPotion": "Pozione di ripristino", + "Gatligator": "Gatligatore", + "ArcaneRuneWall": "Muro di rune arcane", + "WaterGun": "Pistola ad acqua", + "Katana": "Katana", + "UltrabrightTorch": "Torcia luminosissima", + "MagicHat": "Cappello magico", + "DiamondRing": "Anello con diamante", + "Gi": "Gi", + "Kimono": "Kimono", + "GypsyRobe": "Toga zingara", + "JungleHat": "Cappello della giungla", + "BeetleWings": "Ali di scarabeo", + "TigerSkin": "Pelle di tigre", + "LeopardSkin": "Pelle di leopardo", + "ZebraSkin": "Pelle di zebra", + "CrimsonCloak": "Mantello cremisi", + "MysteriousCape": "Cappa misteriosa", + "RedCape": "Cappa rossa", + "WinterCape": "Cappa invernale", + "WoodFishingPole": "Canna da pesca di legno", + "JungleShirt": "Camicia della giungla", + "Bass": "Spigola", + "ReinforcedFishingPole": "Canna da pesca rinforzata", + "FiberglassFishingPole": "Canna da pesca in fibra di vetro", + "FisherofSouls": "Pescatore di anime", + "GoldenFishingRod": "Canna da pesca dorata", + "MechanicsRod": "Canna meccanica", + "SittingDucksFishingRod": "Canna da pesca bersaglio facile", + "Trout": "Trota", + "Salmon": "Salmone", + "AtlanticCod": "Merluzzo", + "Gel": "Gelatina", + "JunglePants": "Pantaloni della giungla", + "Tuna": "Tonno", + "RedSnapper": "Dentice", + "NeonTetra": "Pesce neon", + "ArmoredCavefish": "Pesce cieco corazzato", + "Damselfish": "Castagnola", + "CrimsonTigerfish": "Pesce tigre cremisi", + "FrostMinnow": "Pesciolino di gelo", + "PrincessFish": "Pesce principessa", + "GoldenCarp": "Carpa dorata", + "SpecularFish": "Pesce speculare", + "MoltenHelmet": "Casco fuso", + "Prismite": "Pesce prismatico", + "VariegatedLardfish": "Pesce lardo variopinto", + "FlarefinKoi": "Carpa a pinne scampanate", + "DoubleCod": "Merluzzo doppio", + "Honeyfin": "Pinna di miele", + "Obsidifish": "Pesce ossidiana", + "Shrimp": "Gamberetto", + "ChaosFish": "Pesce zombie", + "Ebonkoi": "Carpa scura", + "Hemopiranha": "Emopiraña", + "MoltenBreastplate": "Pettorale fuso", + "Rockfish": "Pesce roccia", + "Stinkfish": "Pesce puzza", + "MiningPotion": "Pozione minatore", + "HeartreachPotion": "Pozione afferracuori", + "CalmingPotion": "Pozione calmante", + "BuilderPotion": "Pozione costruttore", + "TitanPotion": "Pozione titano", + "FlipperPotion": "Pozione pinna", + "SummoningPotion": "Pozione evocazione", + "TrapsightPotion": "Pozione senso del pericolo", + "MoltenGreaves": "Schinieri fusi", + "PurpleClubberfish": "Pesce mazza viola", + "ObsidianSwordfish": "Pesce spada di ossidiana", + "Swordfish": "Pesce spada", + "IronFence": "Recinto di ferro", + "WoodenCrate": "Cassa di legno", + "IronCrate": "Cassa di ferro", + "GoldenCrate": "Cassa dorata", + "OldShoe": "Vecchia scarpa", + "FishingSeaweed": "Alga", + "TinCan": "Lattina", + "MeteorShot": "Sparo di meteorite", + "ReaverShark": "Squalo predatore", + "SawtoothShark": "Pesce sega", + "Minecart": "Carrello", + "AmmoReservationPotion": "Pozione conserva munizioni", + "LifeforcePotion": "Pozione forza vitale", + "EndurancePotion": "Pozione resistenza", + "RagePotion": "Pozione rabbia", + "InfernoPotion": "Pozione inferno", + "WrathPotion": "Pozione ira", + "StickyBomb": "Bomba appiccicosa", + "RecallPotion": "Pozione richiamo", + "TeleportationPotion": "Pozione teletrasporto", + "LovePotion": "Pozione d'amore", + "StinkPotion": "Pozione puzzolente", + "FishingPotion": "Pozione pesca", + "SonarPotion": "Pozione sonar", + "CratePotion": "Pozione cassa", + "ShiverthornSeeds": "Semi di rabbrivirovo", + "Shiverthorn": "Rabbrivirovo", + "WarmthPotion": "Pozione calore", + "BlackLens": "Lenti nere", + "FishHook": "Amo", + "BeeHeadgear": "Copricapo da ape", + "BeeBreastplate": "Corazza da ape", + "BeeGreaves": "Schinieri da ape", + "HornetStaff": "Bastone calabrone", + "ImpStaff": "Bastone diavoletto", + "QueenSpiderStaff": "Bastone ragno regina", + "AnglerHat": "Cappello da pescatore", + "AnglerVest": "Giubbotto da pescatore", + "AnglerPants": "Pantaloni da pescatore", + "Sunglasses": "Occhiali da sole", + "SpiderMask": "Maschera da ragno", + "SpiderBreastplate": "Corazza da ragno", + "SpiderGreaves": "Schinieri da ragno", + "HighTestFishingLine": "Lenza indistruttibile", + "AnglerEarring": "Orecchino da pescatore", + "TackleBox": "Cassetta da pescatore", + "BlueDungeonPiano": "Pianoforte blu da dungeon", + "GreenDungeonPiano": "Pianoforte verde da dungeon", + "PinkDungeonPiano": "Pianoforte rosa da dungeon", + "GoldenPiano": "Pianoforte dorato", + "WizardHat": "Cappello dello stregone", + "ObsidianPiano": "Pianoforte di ossidiana", + "BonePiano": "Pianoforte di ossa", + "CactusPiano": "Pianoforte di cactus", + "SpookyPiano": "Pianoforte spettrale", + "SkywarePiano": "Pianoforte celeste", + "LihzahrdPiano": "Pianoforte rettiliano", + "BlueDungeonDresser": "Cassettone blu da dungeon", + "GreenDungeonDresser": "Cassettone verde da dungeon", + "PinkDungeonDresser": "Cassettone rosa da dungeon", + "GoldenDresser": "Cassettone dorato", + "TopHat": "Cilindro", + "ObsidianDresser": "Cassettone di ossidiana", + "BoneDresser": "Cassettone di ossa", + "CactusDresser": "Cassettone di cactus", + "SpookyDresser": "Cassettone spettrale", + "SkywareDresser": "Cassettone celeste", + "HoneyDresser": "Cassettone di miele", + "LihzahrdDresser": "Cassettone rettiliano", + "Sofa": "Divano", + "EbonwoodSofa": "Divano di ebano", + "RichMahoganySofa": "Divano di mogano scuro", + "WoodenSword": "Spada di legno", + "TuxedoShirt": "Camicia da smoking", + "PearlwoodSofa": "Divano di legno perlato", + "ShadewoodSofa": "Divano di grigiolegno", + "BlueDungeonSofa": "Divano blu da dungeon", + "GreenDungeonSofa": "Divano verde da dungeon", + "PinkDungeonSofa": "Divano rosa da dungeon", + "GoldenSofa": "Divano dorato", + "ObsidianSofa": "Divano di ossidiana", + "BoneSofa": "Divano di ossa", + "CactusSofa": "Divano di cactus", + "SpookySofa": "Divano spettrale", + "TuxedoPants": "Pantaloni da smoking", + "SkywareSofa": "Divano celeste", + "HoneySofa": "Divano di miele", + "SteampunkSofa": "Divano steampunk", + "MushroomSofa": "Divano di micete", + "GlassSofa": "Divano di vetro", + "PumpkinSofa": "Divano di zucca", + "LihzahrdSofa": "Divano rettiliano", + "SeashellHairpin": "Forcina conchiglia", + "MermaidAdornment": "Gioiello di sirena", + "MermaidTail": "Coda di sirena", + "SummerHat": "Cappello estivo", + "ZephyrFish": "Pesce zefiro", + "Fleshcatcher": "Pigliacarne", + "HotlineFishingHook": "Canna da pesca ardente", + "FrogLeg": "Zampa di rana", + "Anchor": "Ancora", + "CookedFish": "Pesce cotto", + "CookedShrimp": "Gamberetto cotto", + "Sashimi": "Sashimi", + "BunnyHood": "Cappuccio da coniglio", + "BeeWax": "Cera d'ape", + "CopperPlatingWall": "Muro di lastre di rame", + "StoneSlabWall": "Muro di lastra di pietra", + "Sail": "Vela", + "CoralstoneBlock": "Blocco di corallo", + "BlueJellyfish": "Medusa blu", + "GreenJellyfish": "Medusa verde", + "PinkJellyfish": "Medusa rosa", + "BlueJellyfishJar": "Barattolo con medusa blu", + "PlumbersHat": "Cappello da idraulico", + "GreenJellyfishJar": "Barattolo con medusa verde", + "PinkJellyfishJar": "Barattolo con medusa rosa", + "PlumbersShirt": "Camicia da idraulico", + "Batfish": "Bat-pesce", + "BumblebeeTuna": "Pesce bombo", + "Catfish": "Pesce gatto", + "Cloudfish": "Pesce nuvola", + "Cursedfish": "Pesce maledetto", + "Dirtfish": "Pesce sporco", + "DynamiteFish": "Pesce dinamite", + "EaterofPlankton": "Mangiaplankton", + "FallenStarfish": "Pesce stella cadente", + "TheFishofCthulu": "Pesce di Cthulhu", + "PlumbersPants": "Pantaloni da idraulico", + "Fishotron": "Pesce mostro", + "Harpyfish": "Pesce arpia", + "Hungerfish": "Pesce fame", + "Ichorfish": "Pesce icore", + "Jewelfish": "Pesce gioiello", + "MirageFish": "Pesce miraggio", + "MutantFlinxfin": "Pesce flinx mutante", + "Pengfish": "Pesce pinguì", + "Pixiefish": "Pesce fatina", + "Spiderfish": "Pesce ragno", + "HerosHat": "Cappello da eroe", + "TundraTrout": "Trota della tundra", + "UnicornFish": "Pesce unicorno", + "GuideVoodooFish": "Pesce voodoo", + "Wyverntail": "Pesce viverna", + "ZombieFish": "Pesce zombie", + "AmanitaFungifin": "Pesce fungo", + "Angelfish": "Pesce angelo", + "BloodyManowar": "Medusa sanguinolenta", + "Bonefish": "Pesce ossa", + "Bunnyfish": "Pesce coniglio", + "HerosShirt": "Camicia da eroe", + "CapnTunabeard": "Capitan Tonnorosso", + "Clownfish": "Pesce pagliaccio", + "DemonicHellfish": "Pesce demone", + "Derpfish": "Pesce derpling", + "Fishron": "Pesce drago", + "InfectedScabbardfish": "Pesce guaina infetto", + "Mudfish": "Pesce fango", + "Slimefish": "Pesce slime", + "TropicalBarracuda": "Barracuda tropicale", + "KingSlimeTrophy": "Trofeo slime re", + "HerosPants": "Pantaloni da eroe", + "ShipInABottle": "Nave in bottiglia", + "KingSlimeMask": "Maschera slime re", + "FinWings": "Ali a pinne", + "TreasureMap": "Mappa del tesoro", + "SeaweedPlanter": "Fioriera di alghe", + "PillaginMePixels": "Nave pirata pixellata", + "FishCostumeMask": "Maschera costume da pesce", + "FishCostumeShirt": "Giacca costume da pesce", + "WoodenDoor": "Porta di legno", + "FishBowl": "Boccia dei pesci rossi", + "FishCostumeFinskirt": "Gonnellino costume da pesce", + "GingerBeard": "Barba rossa", + "ArchaeologistsHat": "Cappello da archeologo", + "ArchaeologistsJacket": "Giacca da archeologo", + "ArchaeologistsPants": "Pantaloni da archeologo", + "OpticStaff": "Bastone ottico", + "BlackThread": "Abito nero", + "GreenThread": "Abito verde", + "NinjaHood": "Cappuccio ninja", + "NinjaShirt": "Camicia ninja", + "NinjaPants": "Pantaloni ninja", + "Leather": "Pelle", + "StoneWall": "Muro di pietra", + "RedHat": "Cappello rosso", + "Goldfish": "Pesce rosso", + "Robe": "Mantello", + "RobotHat": "Cappello da robot", + "GoldCrown": "Corona d'oro", + "HellfireArrow": "Freccia di fuoco infernale", + "Sandgun": "Pistola di sabbia", + "GuideVoodooDoll": "Bambola voodoo della guida", + "DivingHelmet": "Casco da sommozzatore", + "FamiliarShirt": "Camicia comune", + "Acorn": "Ghianda", + "FamiliarPants": "Pantaloni comuni", + "FamiliarWig": "Parrucca comune", + "DemonScythe": "Falce demoniaca", + "NightsEdge": "Confine della notte", + "DarkLance": "Lancia oscura", + "Coral": "Corallo", + "Cactus": "Cactus", + "Trident": "Tridente", + "SilverBullet": "Proiettile d'argento", + "ThrowingKnife": "Coltello da lancio", + "LesserHealingPotion": "Pozione curativa inferiore", + "Spear": "Lancia", + "Blowpipe": "Cerbottana", + "Glowstick": "Bastone luminoso", + "Seed": "Seme", + "WoodenBoomerang": "Boomerang di legno", + "Aglet": "Aghetto", + "StickyGlowstick": "Bastone luminoso appiccicoso", + "PoisonedKnife": "Coltello avvelenato", + "ObsidianSkinPotion": "Pozione pelle d'ossidiana", + "RegenerationPotion": "Pozione rigeneratrice", + "AngryTrapperBanner": "Stendardo intrappolatore arrabbiato", + "ArmoredVikingBanner": "Stendardo vichingo corazzato", + "BlackSlimeBanner": "Stendardo slime nero", + "LifeCrystal": "Cristallo di vita", + "SwiftnessPotion": "Pozione della rapidità", + "BlueArmoredBonesBanner": "Stendardo ossa corazzate blu", + "BlueCultistArcherBanner": "Stendardo arciere cultista blu", + "ManaCloakStar": "", + "BlueCultistFighterBanner": "Stendardo lottatore cultista blu", + "BoneLeeBanner": "Stendardo ossa marziali", + "ClingerBanner": "Stendardo appiccicoso", + "CochinealBeetleBanner": "Stendardo cocciniglia", + "CorruptPenguinBanner": "Stendardo pinguino corrotto", + "CorruptSlimeBanner": "Stendardo slime corrotto", + "CorruptorBanner": "Stendardo del corruttore", + "GillsPotion": "Pozione branchie", + "CrimslimeBanner": "Stendardo slime cremisi", + "CursedSkullBanner": "Stendardo teschio maledetto", + "CyanBeetleBanner": "Stendardo scarabeo azzurro", + "DevourerBanner": "Stendardo divoratore", + "DiablolistBanner": "Stendardo satanico", + "DoctorBonesBanner": "Stendardo dottor Ossa", + "DungeonSlimeBanner": "Stendardo slime del dungeon", + "DungeonSpiritBanner": "Stendardo spirito del dungeon", + "ElfArcherBanner": "Stendardo elfo arciere", + "ElfCopterBanner": "Stendardo elficottero", + "IronskinPotion": "Pozione pelle di ferro", + "EyezorBanner": "Stendardo eyezor", + "FlockoBanner": "Stendardo fiokko", + "GhostBanner": "Stendardo fantasma", + "GiantBatBanner": "Stendardo pipistrello gigante", + "GiantCursedSkullBanner": "Stendardo teschio maledetto enorme", + "GiantFlyingFoxBanner": "Stendardo megapipistrello", + "GingerbreadManBanner": "Stendardo omino di zenzero", + "GoblinArcherBanner": "Stendardo goblin arciere", + "GreenSlimeBanner": "Stendardo slime verde", + "HeadlessHorsemanBanner": "Stendardo cavaliere senza testa", + "ManaRegenerationPotion": "Pozione rigenerazione mana", + "HellArmoredBonesBanner": "Stendardo ossa corazzate infernali", + "HellhoundBanner": "Stendardo cerbero", + "HoppinJackBanner": "Stendardo zucca intagliata saltante", + "IceBatBanner": "Stendardo pipistrello del ghiaccio", + "IceGolemBanner": "Stendardo golem del ghiaccio", + "IceSlimeBanner": "Stendardo slime del ghiaccio", + "IchorStickerBanner": "Stendardo sputaicore", + "IlluminantBatBanner": "Stendardo pipistrello illuminante", + "IlluminantSlimeBanner": "Stendardo slime illuminante", + "JungleBatBanner": "Stendardo pipistrello della giungla", + "MagicPowerPotion": "Pozione potenza magica", + "JungleSlimeBanner": "Stendardo slime della giungla", + "KrampusBanner": "Stendardo krampus", + "LacBeetleBanner": "Stendardo scarabeo di resina", + "LavaBatBanner": "Stendardo pipistrello della lava", + "LavaSlimeBanner": "Stendardo slime della lava", + "MartianBrainscramblerBanner": "Stendardo confondicervello marziano", + "MartianDroneBanner": "Stendardo drone marziano", + "MartianEngineerBanner": "Stendardo ingegnere marziano", + "MartianGigazapperBanner": "Stendardo gigazapper marziano", + "MartianGreyGruntBanner": "Stendardo soldato grigio marziano", + "FeatherfallPotion": "Pozione caduta dolce", + "MartianOfficerBanner": "Stendardo ufficiale marziano", + "MartianRaygunnerBanner": "Stendardo artigliere laser marziano", + "MartianScutlixGunnerBanner": "Stendardo artigliere Scutlix marziano", + "MartianTeslaTurretBanner": "Stendardo torretta tesla marziana", + "MisterStabbyBanner": "Stendardo signor Stabby", + "MotherSlimeBanner": "Stendardo slime madre", + "NecromancerBanner": "Stendardo necromante", + "NutcrackerBanner": "Stendardo schiaccianoci", + "PaladinBanner": "Stendardo paladino", + "PenguinBanner": "Stendardo pinguino", + "SpelunkerPotion": "Pozione speleologo", + "PinkyBanner": "Stendardo slime rosa", + "PoltergeistBanner": "Stendardo spirito malvagio", + "PossessedArmorBanner": "Stendardo armatura posseduta", + "PresentMimicBanner": "Stendardo sosia regalo", + "PurpleSlimeBanner": "Stendardo slime viola", + "RaggedCasterBanner": "Stendardo lanciatore lacero", + "RainbowSlimeBanner": "Stendardo slime arcobaleno", + "RavenBanner": "Stendardo corvo", + "RedSlimeBanner": "Stendardo slime rosso", + "RuneWizardBanner": "Stendardo stregone delle rune", + "InvisibilityPotion": "Pozione invisibilità", + "RustyArmoredBonesBanner": "Stendardo ossa corazzate arrugginite", + "ScarecrowBanner": "Stendardo spaventapasseri", + "ScutlixBanner": "Stendardo Scutlix", + "SkeletonArcherBanner": "Stendardo scheletro arciere", + "SkeletonCommandoBanner": "Stendardo scheletro commando", + "SkeletonSniperBanner": "Stendardo scheletro cecchino", + "SlimerBanner": "Stendardo slimer", + "SnatcherBanner": "Stendardo pianta afferratrice", + "SnowBallaBanner": "Stendardo pupazzo di neve", + "SnowmanGangstaBanner": "Stendardo pupazzo di neve Gangsta", + "ShinePotion": "Pozione splendore", + "SpikedIceSlimeBanner": "Stendardo slime di ghiaccio chiodato", + "SpikedJungleSlimeBanner": "Stendardo slime della giungla chiodato", + "SplinterlingBanner": "Stendardo scheggetta", + "SquidBanner": "Stendardo calamaro", + "TacticalSkeletonBanner": "Stendardo scheletro tattico", + "TheGroomBanner": "Stendardo dello sposo", + "TimBanner": "Stendardo di Tim", + "UndeadMinerBanner": "Stendardo minatore non-morto", + "UndeadVikingBanner": "Stendardo vichingo non-morto", + "WhiteCultistArcherBanner": "Stendardo arciere cultista bianco", + "NightOwlPotion": "Pozione civetta", + "WhiteCultistCasterBanner": "Stendardo lanciatore cultista bianco", + "WhiteCultistFighterBanner": "Stendardo lottatore cultista bianco", + "YellowSlimeBanner": "Stendardo slime giallo", + "YetiBanner": "Stendardo yeti", + "ZombieElfBanner": "Stendardo elfo zombie", + "StoneBlock": "Blocco di pietra", + "DirtWall": "Muro di terra", + "BattlePotion": "Pozione battaglia", + "ThornsPotion": "Pozione spine", + "WaterWalkingPotion": "Pozione per camminare sull'acqua", + "ArcheryPotion": "Pozione arciere", + "HunterPotion": "Pozione cacciatore", + "GravitationPotion": "Pozione gravità", + "GoldChest": "Cassa d'oro", + "DaybloomSeeds": "Semi Fiordigiorno", + "MoonglowSeeds": "Semi Splendiluna", + "BlinkrootSeeds": "Semi Lampeggiaradice", + "Bottle": "Bottiglia", + "DeathweedSeeds": "Semi Erbamorte", + "WaterleafSeeds": "Semi Acquafoglia", + "FireblossomSeeds": "Semi Fiordifuoco", + "Daybloom": "Fiordigiorno", + "Moonglow": "Splendiluna", + "Blinkroot": "Lampeggiaradice", + "Deathweed": "Erbamorte", + "Waterleaf": "Acquafoglia", + "Fireblossom": "Fiordifuoco", + "SharkFin": "Pinna di squalo", + "WoodenTable": "Tavolo di legno", + "Feather": "Piuma", + "Tombstone": "Lapide", + "MimeMask": "Maschera sosia", + "AntlionMandible": "Mandibola di formicaleone", + "IllegalGunParts": "Parti di pistola illegale", + "TheDoctorsShirt": "Camicia da medico", + "TheDoctorsPants": "Pantaloni da medico", + "GoldenKey": "Chiave d'oro", + "ShadowChest": "Cassa ombra", + "ShadowKey": "Chiave ombra", + "Furnace": "Fornace", + "ObsidianBrickWall": "Muro di ossidiana", + "JungleSpores": "Spore della giungla", + "Loom": "Telaio", + "Piano": "Pianoforte", + "Dresser": "Cassettone", + "Bench": "Panca", + "Bathtub": "Vasca da bagno", + "RedBanner": "Stendardo rosso", + "GreenBanner": "Stendardo verde", + "BlueBanner": "Stendardo blu", + "WoodenChair": "Sedia di legno", + "YellowBanner": "Stendardo giallo", + "LampPost": "Lampione", + "TikiTorch": "Torcia tiki", + "Barrel": "Barile", + "ChineseLantern": "Lanterna cinese", + "CookingPot": "Pentola", + "Safe": "Caveau", + "SkullLantern": "Lanterna-teschio", + "TrashCan": "Cestino", + "PlatinumBow": "Arco di platino", + "PlatinumHammer": "Martello di platino", + "PlatinumAxe": "Ascia di platino", + "PlatinumShortsword": "Spada corta di platino", + "PlatinumBroadsword": "Spadone di platino", + "PlatinumPickaxe": "Piccone di platino", + "TungstenBow": "Arco di tungsteno", + "TungstenHammer": "Martello di tungsteno", + "TungstenAxe": "Ascia di tungsteno", + "TungstenShortsword": "Spada corta di tungsteno", + "Candelabra": "Candelabro", + "TungstenBroadsword": "Spadone di tungsteno", + "TungstenPickaxe": "Piccone di tungsteno", + "LeadBow": "Arco di piombo", + "LeadHammer": "Martello di piombo", + "LeadAxe": "Ascia di piombo", + "LeadShortsword": "Spada corta di piombo", + "LeadBroadsword": "Spadone di piombo", + "LeadPickaxe": "Piccone di piombo", + "TinBow": "Arco di latta", + "TinHammer": "Martello di latta", + "IronAnvil": "Incudine di ferro", + "PinkVase": "Vaso rosa", + "TinAxe": "Ascia di latta", + "TinShortsword": "Spada corta di latta", + "TinBroadsword": "Spadone di latta", + "TinPickaxe": "Piccone di latta", + "CopperBow": "Arco di rame", + "CopperHammer": "Martello di rame", + "CopperAxe": "Ascia di rame", + "CopperShortsword": "Spada corta di rame", + "CopperBroadsword": "Spadone di rame", + "CopperPickaxe": "Piccone di rame", + "Mug": "Boccale", + "SilverBow": "Arco d'argento", + "SilverHammer": "Martello d'argento", + "SilverAxe": "Ascia d'argento", + "SilverShortsword": "Spada corta d'argento", + "SilverBroadsword": "Spadone d'argento", + "SilverPickaxe": "Piccone d'argento", + "GoldBow": "Arco d'oro", + "GoldHammer": "Martello d'oro", + "GoldAxe": "Ascia d'oro", + "GoldShortsword": "Spada corta d'oro", + "Keg": "Barilotto", + "GoldBroadsword": "Spadone d'oro", + "GoldPickaxe": "Piccone d'oro", + "Ale": "Birra", + "Bookcase": "Scaffale", + "Throne": "Trono", + "Bowl": "Ciotola", + "BowlofSoup": "Ciotola di zuppa", + "Toilet": "Toilette", + "GrandfatherClock": "Pendola", + "WorkBench": "Banco da lavoro", + "ArmorStatue": "Statua armatura", + "GoblinBattleStandard": "Insegna di battaglia dei goblin", + "TatteredCloth": "Abito a brandelli", + "Sawmill": "Segheria", + "CobaltOre": "Minerale cobalto", + "MythrilOre": "Minerale mitrilio", + "AdamantiteOre": "Minerale adamantio", + "Pwnhammer": "Martellone", + "Excalibur": "Excalibur", + "HallowedSeeds": "Semi consacrati", + "Goggles": "Occhiali protettivi", + "EbonsandBlock": "Blocco sabbia d'ebano", + "CobaltHat": "Cappello di cobalto", + "CobaltHelmet": "Casco di cobalto", + "CobaltMask": "Maschera di cobalto", + "CobaltBreastplate": "Corrazza di cobalto", + "CobaltLeggings": "Gambali di cobalto", + "MythrilHood": "Cappuccio di mitrilio", + "MythrilHelmet": "Casco di mitrilio", + "MythrilHat": "Cappello di mitrilio", + "MythrilChainmail": "Maglia metallica di mitrilio", + "Lens": "Lenti", + "MythrilGreaves": "Schinieri di mitrilio", + "CobaltBar": "Barra di cobalto", + "MythrilBar": "Barra di mitrilio", + "CobaltChainsaw": "Motosega di cobalto", + "MythrilChainsaw": "Motosega di mitrilio", + "CobaltDrill": "Perforatrice di cobalto", + "MythrilDrill": "Perforatrice di mitrilio", + "AdamantiteChainsaw": "Motosega di adamantio", + "AdamantiteDrill": "Perforatrice di adamantio", + "DaoofPow": "Frustona", + "WoodenBow": "Arco di legno", + "MythrilHalberd": "Alabarda di mitrilio", + "AdamantiteBar": "Barra di adamantio", + "GlassWall": "Muro di vetro", + "Compass": "Bussola", + "DivingGear": "Muta da sub", + "GPS": "GPS", + "ObsidianHorseshoe": "Ferro di cavallo di ossidiana", + "ObsidianShield": "Scudo di ossidiana", + "TinkerersWorkshop": "Laboratorio dell'inventore", + "CloudinaBalloon": "Nuvola in un palloncino", + "IronBroadsword": "Spadone di ferro", + "WoodenArrow": "Freccia di legno", + "AdamantiteHeadgear": "Copricapo di adamantio", + "AdamantiteHelmet": "Casco di adamantio", + "AdamantiteMask": "Maschera di adamantio", + "AdamantiteBreastplate": "Corrazza di adamantio", + "AdamantiteLeggings": "Gambali di adamantio", + "SpectreBoots": "Stivali da fantasma", + "AdamantiteGlaive": "Alabarda di adamantio", + "Toolbelt": "Cintura porta attrezzi", + "PearlsandBlock": "Blocco sabbiaperla", + "PearlstoneBlock": "Blocco pietraperla", + "FlamingArrow": "Freccia infuocata", + "MiningShirt": "Camicia da minatore", + "MiningPants": "Pantaloni da minatore", + "PearlstoneBrick": "Mattone pietraperla", + "IridescentBrick": "Mattone iridescente", + "MudstoneBlock": "Mattone pietrafango", + "CobaltBrick": "Mattone cobalto", + "MythrilBrick": "Mattone mitrilio", + "PearlstoneBrickWall": "Muro di pietraperla", + "IridescentBrickWall": "Muro di mattoni iridescenti", + "MudstoneBrickWall": "Muro di pietrafango", + "Shuriken": "Shuriken", + "CobaltBrickWall": "Muro di mattoni di cobalto", + "MythrilBrickWall": "Muro di mattoni di mitrilio", + "HolyWater": "Acquasanta", + "UnholyWater": "Acqua profana", + "SiltBlock": "Blocco insabbiato", + "FairyBell": "Campana della fata", + "BreakerBlade": "Lama del distruttore", + "BlueTorch": "Torcia blu", + "RedTorch": "Torcia rossa", + "GreenTorch": "Torcia verde", + "SuspiciousLookingEye": "Occhio dallo sguardo sospetto", + "PurpleTorch": "Torcia viola", + "WhiteTorch": "Torcia bianca", + "YellowTorch": "Torcia gialla", + "DemonTorch": "Torcia demoniaca", + "ClockworkAssaultRifle": "Fucile d'assalto automatico", + "CobaltRepeater": "Balestra automatica di cobalto", + "MythrilRepeater": "Balestra automatica di mitrilio", + "DualHook": "Gancio doppio", + "StarStatue": "Statua stella", + "SwordStatue": "Statua spada", + "DemonBow": "Arco demoniaco", + "SlimeStatue": "Statua slime", + "GoblinStatue": "Statua goblin", + "ShieldStatue": "Statua scudo", + "BatStatue": "Statua pipistrello", + "FishStatue": "Statua pesce", + "BunnyStatue": "Statua coniglio", + "SkeletonStatue": "Statua scheletro", + "ReaperStatue": "Statua mietitore", + "WomanStatue": "Statua donna", + "ImpStatue": "Statua diavoletto", + "WarAxeoftheNight": "Ascia da guerra della notte", + "GargoyleStatue": "Statua gargoyle", + "GloomStatue": "Statua tenebre", + "HornetStatue": "Statua calabrone", + "BombStatue": "Statua bomba", + "CrabStatue": "Statua granchio", + "HammerStatue": "Statua martello", + "PotionStatue": "Statua pozione", + "SpearStatue": "Statua arpione", + "CrossStatue": "Statua croce", + "JellyfishStatue": "Statua medusa", + "LightsBane": "Flagello di luce", + "BowStatue": "Statua arco", + "BoomerangStatue": "Statua boomerang", + "BootStatue": "Statua stivali", + "ChestStatue": "Statua cassa", + "BirdStatue": "Statua Uccello", + "AxeStatue": "Statua ascia", + "CorruptStatue": "Statua corruzione", + "TreeStatue": "Statua albero", + "AnvilStatue": "Statua incudine", + "PickaxeStatue": "Statua piccone", + "UnholyArrow": "Freccia empia", + "MushroomStatue": "Statua fungo", + "EyeballStatue": "Statua bulbo oculare", + "PillarStatue": "Statua colonna", + "HeartStatue": "Statua cuore", + "PotStatue": "Statua pentola", + "SunflowerStatue": "Statua girasole", + "KingStatue": "Statua re", + "QueenStatue": "Statua regina", + "PiranhaStatue": "Statua piraña", + "PlankedWall": "Muro impalcato", + "Chest": "Cassa", + "WoodenBeam": "Trave di legno", + "AdamantiteRepeater": "Mietitore di adamantio", + "AdamantiteSword": "Spada di adamantio", + "CobaltSword": "Spada di cobalto", + "MythrilSword": "Spada di mitrilio", + "MoonCharm": "Amuleto della luna", + "Ruler": "Righello", + "CrystalBall": "Sfera di cristallo", + "DiscoBall": "Palla disco", + "SorcererEmblem": "Emblema dell'incantatore", + "BandofRegeneration": "Benda di rigenerazione", + "WarriorEmblem": "Emblema del guerriero", + "RangerEmblem": "Emblema del guardiaboschi", + "DemonWings": "Ali del demone", + "AngelWings": "Ali dell'angelo", + "MagicalHarp": "Arpa magica", + "RainbowRod": "Bastone dell'arcobaleno", + "IceRod": "Bastone di ghiaccio", + "NeptunesShell": "Conchiglia di Nettuno", + "Mannequin": "Manichino", + "GreaterHealingPotion": "Pozione curativa superiore", + "Mushroom": "Fungo", + "MagicMirror": "Specchio magico", + "GreaterManaPotion": "Pozione mana superiore", + "PixieDust": "Polvere di fata", + "CrystalShard": "Frammento di cristallo", + "ClownHat": "Cappello da clown", + "ClownShirt": "Camicia da clown", + "ClownPants": "Pantaloni da clown", + "Flamethrower": "Lanciafiamme", + "Bell": "Campana", + "Harp": "Arpa", + "Wrench": "Chiave inglese rossa", + "JestersArrow": "Freccia del giullare", + "WireCutter": "Tagliacavi", + "ActiveStoneBlock": "Blocco di pietra attivo", + "InactiveStoneBlock": "Blocco di pietra non attivo", + "Lever": "Leva", + "LaserRifle": "Fucile laser", + "CrystalBullet": "Proiettile di cristallo", + "HolyArrow": "Freccia sacra", + "MagicDagger": "Pugnale magico", + "CrystalStorm": "Tempesta di cristallo", + "CursedFlames": "Fiamme maledette", + "AngelStatue": "Statua dell'angelo", + "SoulofLight": "Anima della luce", + "SoulofNight": "Anima della notte", + "CursedFlame": "Fiamma maledetta", + "CursedTorch": "Torcia maledetta", + "AdamantiteForge": "Forgia di adamantio", + "MythrilAnvil": "Incudine di mitrilio", + "UnicornHorn": "Corno di unicorno", + "DarkShard": "Frammento oscuro", + "LightShard": "Frammento di luce", + "RedPressurePlate": "Piastra a pressione rossa", + "CloudinaBottle": "Nuvola in bottiglia", + "Wire": "Cavo", + "SpellTome": "Tomo incantato", + "StarCloak": "Mantello stellato", + "Megashark": "Megashark", + "Shotgun": "Fucile", + "PhilosophersStone": "Pietra filosofale", + "TitanGlove": "Guanto del Titano", + "CobaltNaginata": "Naginata di cobalto", + "Switch": "Interruttore", + "DartTrap": "Trappola dardi", + "HermesBoots": "Stivali di Ermes", + "Boulder": "Masso", + "GreenPressurePlate": "Piastra a pressione verde", + "GrayPressurePlate": "Piastra a pressione grigia", + "BrownPressurePlate": "Piastra a pressione marrone", + "MechanicalEye": "Occhio meccanico", + "CursedArrow": "Freccia maledetta", + "CursedBullet": "Proiettile maledetto", + "SoulofFright": "Anima del terrore", + "SoulofMight": "Anima del potere", + "SoulofSight": "Anima della visione", + "EnchantedBoomerang": "Boomerang incantato", + "Gungnir": "Gungnir", + "HallowedPlateMail": "Armatura sacra", + "HallowedGreaves": "Schinieri sacri", + "HallowedHelmet": "Casco sacro", + "CrossNecklace": "Collana con croce", + "ManaFlower": "Fiore di mana", + "MechanicalWorm": "Verme meccanico", + "MechanicalSkull": "Teschio meccanico", + "HallowedHeadgear": "Copricapo sacro", + "HallowedMask": "Maschera sacra", + "DemoniteOre": "Minerale demoniaco", + "SlimeCrown": "Corona slime", + "LightDisc": "Disco di luce", + "MusicBoxOverworldDay": "Carillon (Giornata mondiale)", + "MusicBoxEerie": "Carillon (Mistero)", + "MusicBoxNight": "Carillon (Notte)", + "MusicBoxTitle": "Carillon (Titolo)", + "MusicBoxUnderground": "Carillon (Sotterraneo)", + "MusicBoxBoss1": "Carillon (Boss 1)", + "MusicBoxJungle": "Carillon (Giungla)", + "MusicBoxCorruption": "Carillon (Corruzione)", + "DemoniteBar": "Barra demoniaca", + "MusicBoxUndergroundCorruption": "Carillon (Corruzione sotterranea)", + "MusicBoxTheHallow": "Carillon (La Consacrazione)", + "MusicBoxBoss2": "Carillon (Boss 2)", + "MusicBoxUndergroundHallow": "Carillon (Consacrazione sotterranea)", + "MusicBoxBoss3": "Carillon (Boss 3)", + "SoulofFlight": "Anima del volo", + "MusicBox": "Carillon", + "DemoniteBrick": "Mattone demoniaco", + "HallowedRepeater": "Balestra automatica consacrata", + "Drax": "Perforascia", + "Heart": "Cuore", + "Explosives": "Esplosivi", + "InletPump": "Pompa interna", + "OutletPump": "Pompa esterna", + "Timer1Second": "Timer 1 secondi", + "Timer3Second": "Timer 3 secondi", + "Timer5Second": "Timer 5 secondi", + "CandyCaneBlock": "Blocco Candy Cane", + "CandyCaneWall": "Muro Candy Cane", + "SantaHat": "Cappello di Babbo Natale", + "SantaShirt": "Camicia di Babbo Natale", + "CorruptSeeds": "Semi corrotti", + "SantaPants": "Pantaloni di Babbo Natale", + "GreenCandyCaneBlock": "Blocco verde Candy Cane", + "GreenCandyCaneWall": "Muro verde Candy Cane", + "SnowBlock": "Blocco di neve", + "SnowBrick": "Mattone di neve", + "SnowBrickWall": "Muro di mattoni di neve", + "BlueLight": "Luce blu", + "RedLight": "Luce rossa", + "GreenLight": "Luce verde", + "BluePresent": "Regalo blu", + "IronShortsword": "Spada corta di ferro", + "VileMushroom": "Fungo disgustoso", + "GreenPresent": "Regalo verde", + "YellowPresent": "Regalo giallo", + "SnowGlobe": "Sfera di neve", + "Carrot": "Carota", + "AdamantiteBeam": "Trave di adamantio", + "AdamantiteBeamWall": "Muro in travi di adamantio", + "DemoniteBrickWall": "Muro di mattoni demoniaco", + "SandstoneBrick": "Mattone di arenaria", + "SandstoneBrickWall": "Muro di mattoni di arenaria", + "EbonstoneBrick": "Mattone di pietra d'ebano", + "EbonstoneBlock": "Blocco pietra d'ebano", + "EbonstoneBrickWall": "Muro di mattoni di pietra d'ebano", + "RedStucco": "Stucco rosso", + "YellowStucco": "Stucco giallo", + "GreenStucco": "Stucco verde", + "GrayStucco": "Stucco grigio", + "RedStuccoWall": "Muro di stucco rosso", + "YellowStuccoWall": "Muro di stucco giallo", + "GreenStuccoWall": "Muro di stucco verde", + "GrayStuccoWall": "Muro di stucco grigio", + "Ebonwood": "Ebano", + "GrassSeeds": "Semi d'erba", + "RichMahogany": "Mogano scuro", + "Pearlwood": "Legno perlato", + "EbonwoodWall": "Muro di ebano", + "RichMahoganyWall": "Muro di mogano scuro", + "PearlwoodWall": "Muro di legno perlato", + "EbonwoodChest": "Cassa di ebano", + "RichMahoganyChest": "Cassa di mogano scuro", + "PearlwoodChest": "Cassa di legno perlato", + "EbonwoodChair": "Sedia di ebano", + "RichMahoganyChair": "Sedia di mogano scuro", + "Sunflower": "Girasole", + "PearlwoodChair": "Sedia di legno perlato", + "EbonwoodPlatform": "Piattaforma di ebano", + "RichMahoganyPlatform": "Piattaforma di mogano scuro", + "PearlwoodPlatform": "Piattaforma di legno perlato", + "BonePlatform": "Piattaforma di ossa", + "EbonwoodWorkBench": "Banco da lavoro di ebano", + "RichMahoganyWorkBench": "Banco da lavoro di mogano scuro", + "PearlwoodWorkBench": "Banco da lavoro di legno perlato", + "EbonwoodTable": "Tavolo di ebano", + "RichMahoganyTable": "Tavolo di mogano scuro", + "Vilethorn": "Spina vile", + "PearlwoodTable": "Tavolo di legno perlato", + "EbonwoodPiano": "Pianoforte di ebano", + "RichMahoganyPiano": "Pianoforte di mogano scuro", + "PearlwoodPiano": "Pianoforte di legno perlato", + "EbonwoodBed": "Letto di ebano", + "RichMahoganyBed": "Letto di mogano scuro", + "PearlwoodBed": "Letto di legno perlato", + "EbonwoodDresser": "Cassettone di ebano", + "RichMahoganyDresser": "Cassettone di mogano scuro", + "PearlwoodDresser": "Cassettone di legno perlato", + "Starfury": "Furia stellare", + "EbonwoodDoor": "Porta di ebano", + "RichMahoganyDoor": "Porta di mogano scuro", + "PearlwoodDoor": "Porta di legno perlato", + "EbonwoodSword": "Spada di ebano", + "EbonwoodHammer": "Martello di ebano", + "EbonwoodBow": "Arco di ebano", + "RichMahoganySword": "Spada di mogano scuro", + "RichMahoganyHammer": "Martello di mogano scuro", + "RichMahoganyBow": "Arco di mogano scuro", + "PearlwoodSword": "Spada di legno perlato", + "PurificationPowder": "Polvere purificatrice", + "PearlwoodHammer": "Martello di legno perlato", + "PearlwoodBow": "Arco di legno perlato", + "RainbowBrick": "Mattone arcobaleno", + "RainbowBrickWall": "Muro di mattoni arcobaleno", + "IceBlock": "Blocco di ghiaccio", + "RedsWings": "Ali di Redigit", + "RedsHelmet": "Casco di Redigit", + "RedsBreastplate": "Corazza di Redigit", + "RedsLeggings": "Gambali di Redigit", + "Fish": "Pesce", + "VilePowder": "Polvere disgustosa", + "IceBoomerang": "Boomerang di ghiaccio", + "Keybrand": "Chiave marchiata", + "Cutlass": "Sciabola corta", + "TrueExcalibur": "Vera Excalibur", + "TrueNightsEdge": "Vero confine della notte", + "Frostbrand": "Marchio del gelo", + "RedPotion": "Pozione rossa", + "TacticalShotgun": "Fucile tattico", + "RottenChunk": "Ceppo marcio", + "IvyChest": "Cassa di edera", + "Marrow": "Arco di midollo", + "UnholyTrident": "Tridente profano", + "FrostHelmet": "Casco del gelo", + "FrostBreastplate": "Corazza del gelo", + "FrostLeggings": "Gambali del gelo", + "TinHelmet": "Casco di latta", + "TinChainmail": "Maglia metallica di latta", + "TinGreaves": "Schinieri di latta", + "WormTooth": "Dente di verme", + "LeadHelmet": "Casco di piombo", + "LeadChainmail": "Maglia metallica di piombo", + "LeadGreaves": "Schinieri di piombo", + "TungstenHelmet": "Casco di tungsteno", + "TungstenChainmail": "Maglia metallica di tungsteno", + "TungstenGreaves": "Schinieri di tungsteno", + "PlatinumHelmet": "Casco di platino", + "PlatinumChainmail": "Maglia metallica di platino", + "PlatinumGreaves": "Schinieri di platino", + "TinOre": "Minerale di latta", + "IronHammer": "Martello di ferro", + "WormFood": "Esca di verme", + "LeadOre": "Minerale di piombo", + "TungstenOre": "Minerale di tungsteno", + "PlatinumOre": "Minerale di platino", + "TinBar": "Barra di latta", + "LeadBar": "Barra di piombo", + "TungstenBar": "Barra di tungsteno", + "PlatinumBar": "Barra di platino", + "TinWatch": "Orologio di latta", + "TungstenWatch": "Orologio di tungsteno", + "PlatinumWatch": "Orologio di platino", + "CopperCoin": "Moneta di rame", + "TinChandelier": "Lampadario di latta", + "TungstenChandelier": "Lampadario di tungsteno", + "PlatinumChandelier": "Lampadario di platino", + "PlatinumCandle": "Candela di platino", + "PlatinumCandelabra": "Candelabro di platino", + "PlatinumCrown": "Corona di platino", + "LeadAnvil": "Incudine di piombo", + "TinBrick": "Mattone di latta", + "TungstenBrick": "Mattone di tungsteno", + "PlatinumBrick": "Mattone di platino", + "SilverCoin": "Moneta d'argento", + "TinBrickWall": "Muro di mattoni di latta", + "TungstenBrickWall": "Muro di mattoni di tungsteno", + "PlatinumBrickWall": "Muro di mattoni di platino", + "BeamSword": "Spada laser", + "IceBlade": "Lama di ghiaccio", + "IceBow": "Arco di ghiaccio", + "FrostStaff": "Bastone del gelo", + "WoodHelmet": "Casco di legno", + "WoodBreastplate": "Pettorale di legno", + "WoodGreaves": "Schinieri di legno", + "GoldCoin": "Moneta d'oro", + "EbonwoodHelmet": "Casco di ebano", + "EbonwoodBreastplate": "Corazza di ebano", + "EbonwoodGreaves": "Schinieri di ebano", + "RichMahoganyHelmet": "Casco di mogano scuro", + "RichMahoganyBreastplate": "Corazza di mogano scuro", + "RichMahoganyGreaves": "Schinieri di mogano scuro", + "PearlwoodHelmet": "Casco di legno perlato", + "PearlwoodBreastplate": "Corazza di legno perlato", + "PearlwoodGreaves": "Schinieri di legno perlato", + "AmethystStaff": "Bastone di ametista", + "PlatinumCoin": "Moneta di platino", + "TopazStaff": "Bastone di topazio", + "SapphireStaff": "Bastone di zaffiro", + "EmeraldStaff": "Bastone di smeraldo", + "RubyStaff": "Bastone di rubino", + "DiamondStaff": "Bastone di diamante", + "GrassWall": "Muro di erba", + "JungleWall": "Muro della giungla", + "FlowerWall": "Muro di fiori", + "Jetpack": "Jetpack", + "ButterflyWings": "Ali di farfalla", + "FallenStar": "Stella cadente", + "CactusWall": "Muro di cactus", + "Cloud": "Nuvola", + "CloudWall": "Muro di nuvole", + "Seaweed": "Alga", + "RuneHat": "Cappello di rune", + "RuneRobe": "Toga di rune", + "MushroomSpear": "Lancia a fungo", + "TerraBlade": "Lama di terra", + "GrenadeLauncher": "Lanciagranate", + "RocketLauncher": "Lanciarazzi", + "CopperGreaves": "Schinieri di rame", + "ProximityMineLauncher": "Lanciamine di prossimità", + "FairyWings": "Ali di fata", + "SlimeBlock": "Blocco di slime", + "FleshBlock": "Blocco di carne", + "MushroomWall": "Muro di funghi", + "RainCloud": "Nuvola di pioggia", + "BoneBlock": "Blocco di ossa", + "FrozenSlimeBlock": "Blocco di slime congelato", + "BoneBlockWall": "Muro di blocchi di ossa", + "SlimeBlockWall": "Muro di blocchi di slime", + "IronGreaves": "Schinieri di ferro", + "FleshBlockWall": "Muro di blocchi di carne", + "RocketI": "Razzo I", + "RocketII": "Razzo II", + "RocketIII": "Razzo III", + "RocketIV": "Razzo IV", + "AsphaltBlock": "Blocco di asfalto", + "CobaltPickaxe": "Piccone di cobalto", + "MythrilPickaxe": "Piccone di mitrilio", + "AdamantitePickaxe": "Piccone di adamantio", + "Clentaminator": "Puricontaminatore", + "SilverGreaves": "Schinieri d'argento", + "GreenSolution": "Soluzione verde", + "BlueSolution": "Soluzione blu", + "PurpleSolution": "Soluzione viola", + "DarkBlueSolution": "Soluzione blu scura", + "RedSolution": "Soluzione rossa", + "HarpyWings": "Ali dell'arpia", + "BoneWings": "Ali di ossa", + "Hammush": "Martelfungo", + "NettleBurst": "Ortica a getto", + "AnkhBanner": "Stendardo croce egizia", + "GoldGreaves": "Schinieri d'oro", + "SnakeBanner": "Stendardo serpente", + "OmegaBanner": "Stendardo omega", + "CrimsonHelmet": "Casco cremisi", + "CrimsonScalemail": "Armatura a scaglie cremisi", + "CrimsonGreaves": "Schinieri cremisi", + "BloodButcherer": "Macellaio insanguinato", + "TendonBow": "Arco di tendine", + "FleshGrinder": "Trita polpa", + "DeathbringerPickaxe": "Piccone spargimorte", + "BloodLustCluster": "Ascia sanguinolenta", + "Torch": "Torcia", + "CopperChainmail": "Maglia metallica di rame", + "TheUndertaker": "Il becchino", + "TheMeatball": "Il macellaio", + "TheRottedFork": "Il forcone marcio", + "LivingWoodChair": "Sedia di legno vivo", + "CactusChair": "Sedia di cactus", + "BoneChair": "Sedia di ossa", + "FleshChair": "Sedia di carne", + "IronChainmail": "Maglia metallica di ferro", + "MushroomChair": "Sedia a fungo", + "BoneWorkBench": "Banco da lavoro di ossa", + "CactusWorkBench": "Banco da lavoro di cactus", + "FleshWorkBench": "Banco da lavoro di carne", + "MushroomWorkBench": "Banco da lavoro a fungo", + "SlimeWorkBench": "Banco da lavoro di slime", + "CactusDoor": "Porta di cactus", + "FleshDoor": "Porta di carne", + "MushroomDoor": "Porta a fungo", + "LivingWoodDoor": "Porta di legno vivo", + "SilverChainmail": "Maglia metallica d'argento", + "BoneDoor": "Porta di ossa", + "FlameWings": "Ali di fiamme", + "FrozenWings": "Ali congelate", + "GhostWings": "Ali da spettro", + "SunplateBlock": "Blocco solare", + "DiscWall": "Muro a disco", + "SkywareChair": "Sedia celeste", + "BoneTable": "Tavolo di ossa", + "FleshTable": "Tavolo di carne", + "LivingWoodTable": "Tavolo di legno vivo", + "GoldChainmail": "Maglia metallica d'oro", + "SkywareTable": "Tavolo celeste", + "LivingWoodChest": "Cassa di legno vivo", + "LivingWoodWand": "Bacchetta di legno vivo", + "PurpleIceBlock": "Blocco di ghiaccio viola", + "PinkIceBlock": "Blocco di ghiaccio rosa", + "RedIceBlock": "Blocco di ghiaccio rosso", + "CrimstoneBlock": "Blocco di pietra cremisi", + "SkywareDoor": "Porta celeste", + "SkywareChest": "Cassa celeste", + "SteampunkHat": "Cappello steampunk", + "GrapplingHook": "Rampino", + "SteampunkShirt": "Camicia steampunk", + "SteampunkPants": "Pantaloni steampunk", + "BeeHat": "Cappello ape", + "BeeShirt": "Camicia ape", + "BeePants": "Pantaloni ape", + "WorldBanner": "Stendardo mondo", + "SunBanner": "Stendardo sole", + "GravityBanner": "Stendardo gravità", + "PharaohsMask": "Maschera del faraone", + "Actuator": "Azionatore", + "Chain": "Catena di ferro", + "BlueWrench": "Chiave inglese blu", + "GreenWrench": "Chiave inglese verde", + "BluePressurePlate": "Piastra a pressione blu", + "YellowPressurePlate": "Piastra a pressione gialla", + "DiscountCard": "Carta sconto", + "LuckyCoin": "Moneta fortunata", + "UnicornonaStick": "Unicorno giocattolo", + "SandstorminaBottle": "Tempesta di sabbia in bottiglia", + "BeachBall": "Palla da spiaggia", + "ShadowScale": "Scaglia d'ombra", + "CharmofMyths": "Amuleto dei miti", + "MoonShell": "Conchiglia di luna", + "StarVeil": "Velo stellare", + "WaterWalkingBoots": "Stivali da acqua", + "Tiara": "Diadema", + "PrincessDress": "Vestito da principessa", + "PharaohsRobe": "Toga del faraone", + "GreenCap": "Berretto verde", + "MushroomCap": "Berretto a fungo", + "TamOShanter": "Tam O' Shanter", + "PiggyBank": "Salvadanaio", + "MummyMask": "Maschera da mummia", + "MummyShirt": "Camicia da mummia", + "MummyPants": "Pantaloni da mummia", + "CowboyHat": "Cappello da cowboy", + "CowboyJacket": "Giacca da cowboy", + "CowboyPants": "Pantaloni da cowboy", + "PirateHat": "Cappello da pirata", + "PirateShirt": "Camicia da pirata", + "PiratePants": "Pantaloni da pirata", + "VikingHelmet": "Elmo da vichingo", + "MiningHelmet": "Casco da minatore", + "CrimtaneOre": "Minerale di crimtano", + "CactusSword": "Spada di cactus", + "CactusPickaxe": "Piccone di cactus", + "IceBrick": "Mattone di ghiaccio", + "IceBrickWall": "Muro di mattoni di ghiaccio", + "AdhesiveBandage": "Cerotto adesivo", + "ArmorPolish": "Lucido da armatura", + "Bezoar": "Bezoar", + "Blindfold": "Benda", + "FastClock": "Orologio veloce", + "CopperHelmet": "Casco di rame", + "Megaphone": "Megafono", + "Nazar": "Nazar", + "Vitamins": "Vitamine", + "TrifoldMap": "Mappa ripiegata", + "CactusHelmet": "Casco di cactus", + "CactusBreastplate": "Pettorale di cactus", + "CactusLeggings": "Gambali di cactus", + "PowerGlove": "Guanto del potere", + "LightningBoots": "Stivali fulmine", + "SunStone": "Pietra solare", + "Wood": "Legno", + "IronHelmet": "Casco di ferro", + "MoonStone": "Pietra lunare", + "ArmorBracing": "Lucido da armatura", + "MedicatedBandage": "Cerotto medico", + "ThePlan": "Il piano", + "CountercurseMantra": "Mantra antimaledizione", + "CoinGun": "Pistola sparamonete", + "LavaCharm": "Amuleto di lava", + "ObsidianWaterWalkingBoots": "Stivali di ossidiana da acqua", + "LavaWaders": "Stivaloni di lava", + "PureWaterFountain": "Fontana acqua pura", + "SilverHelmet": "Casco d'argento", + "DesertWaterFountain": "Fontana acqua del deserto", + "Shadewood": "Grigiolegno", + "ShadewoodDoor": "Porta di grigiolegno", + "ShadewoodPlatform": "Piattaforma di grigiolegno", + "ShadewoodChest": "Cassa di grigiolegno", + "ShadewoodChair": "Sedia di grigiolegno", + "ShadewoodWorkBench": "Banco da lavoro di grigiolegno", + "ShadewoodTable": "Tavolo di grigiolegno", + "ShadewoodDresser": "Cassettone di grigiolegno", + "ShadewoodPiano": "Pianoforte di grigiolegno", + "GoldHelmet": "Casco d'oro", + "ShadewoodBed": "Letto di grigiolegno", + "ShadewoodSword": "Spada di grigiolegno", + "ShadewoodHammer": "Martello di grigiolegno", + "ShadewoodBow": "Arco di grigiolegno", + "ShadewoodHelmet": "Casco di grigiolegno", + "ShadewoodBreastplate": "Corazza di grigiolegno", + "ShadewoodGreaves": "Schinieri di grigiolegno", + "ShadewoodWall": "Muro di grigiolegno", + "Cannon": "Cannone", + "Cannonball": "Palla di cannone", + "WoodWall": "Muro di legno", + "FlareGun": "Pistola lanciarazzi", + "Flare": "Razzo", + "BoneWand": "Bacchetta di ossa", + "LeafWand": "Bacchetta a foglia", + "FlyingCarpet": "Tappeto volante", + "AvengerEmblem": "Emblema del vendicatore", + "MechanicalGlove": "Guanto meccanico", + "LandMine": "Mina di terra", + "PaladinsShield": "Scudo del paladino", + "WebSlinger": "Filo di ragnatela", + "WoodPlatform": "Piattaforma di legno", + "JungleWaterFountain": "Fontana acqua della giungla", + "IcyWaterFountain": "Fontana acqua di ghiaccio", + "CorruptWaterFountain": "Fontana acqua corrotta", + "CrimsonWaterFountain": "Fontana acqua cremisi", + "HallowedWaterFountain": "Fontana acqua consacrata", + "BloodWaterFountain": "Fontana acqua sanguigna", + "Umbrella": "Ombrello", + "ChlorophyteOre": "Minerale di clorofite", + "SteampunkWings": "Ali steampunk", + "Snowball": "Palla di neve", + "FlintlockPistol": "Pistola a pietra focaia", + "IceSkates": "Pattini da ghiaccio", + "SnowballLauncher": "Lancia palle di neve", + "WebCoveredChest": "Cassa coperta di ragnatele", + "ClimbingClaws": "Artigli da scalata", + "AncientIronHelmet": "Casco antico di ferro", + "AncientGoldHelmet": "Casco antico d'oro", + "AncientShadowHelmet": "Casco antico dell'ombra", + "AncientShadowScalemail": "Armatura antica a scaglie dell'ombra", + "AncientShadowGreaves": "Schinieri antichi dell'ombra", + "AncientNecroHelmet": "Casco antico funebre", + "Musket": "Moschetto", + "AncientCobaltHelmet": "Casco antico di cobalto", + "AncientCobaltBreastplate": "Corazza antica di cobalto", + "AncientCobaltLeggings": "Gambali antichi di cobalto", + "BlackBelt": "Cintura nera", + "Boomstick": "Bastone di tuono", + "Rope": "Corda", + "Campfire": "Fuoco di bivacco", + "Marshmallow": "Marshmallow", + "MarshmallowonaStick": "Marshmallow allo spiedo", + "CookedMarshmallow": "Marshmallow cotto", + "MusketBall": "Palla di moschetto", + "RedRocket": "Razzo rosso", + "GreenRocket": "Razzo verde", + "BlueRocket": "Razzo blu", + "YellowRocket": "Razzo giallo", + "IceTorch": "Torcia da ghiaccio", + "ShoeSpikes": "Ramponi", + "TigerClimbingGear": "Artigli da scalata", + "Tabi": "Calzini tabi", + "Minishark": "Minishark", + "PinkThread": "Abito rosa", + "ManaRegenerationBand": "Benda rigenerazione mana", + "SandstorminaBalloon": "Tempesta di sabbia in un palloncino", + "MasterNinjaGear": "Attrezzatura da maestro ninja", + "RopeCoil": "Bobina di corda", + "Blowgun": "Cerbottana", + "BlizzardinaBottle": "Bufera in bottiglia", + "FrostburnArrow": "Freccia da scottatura raggelante", + "EnchantedSword": "Spada incantata", + "IronBow": "Arco di ferro", + "PickaxeAxe": "Ascia piccone", + "CobaltWaraxe": "Ascia di battaglia di cobalto", + "MythrilWaraxe": "Ascia di battaglia di mitrilio", + "AdamantiteWaraxe": "Ascia di battaglia di adamantio", + "EatersBone": "Osso del mangiatore", + "BlendOMatic": "Frullatore", + "MeatGrinder": "Tritacarne", + "Extractinator": "Estrattificatore", + "Solidifier": "Solidificatore", + "Amber": "Ambra", + "AcidDye": "Tintura acida", + "ActuationAccessory": "Pressatore", + "ActuationRod": "Bastone azionatore", + "AlchemyTable": "Tavolo alchemico", + "AlphabetStatue0": "Statua 0", + "AlphabetStatue1": "Statua 1", + "AlphabetStatue2": "Statua 2", + "AlphabetStatue3": "Statua 3", + "AlphabetStatue4": "Statua 4", + "AlphabetStatue5": "Statua 5", + "AlphabetStatue6": "Statua 6", + "AlphabetStatue7": "Statua 7", + "AlphabetStatue8": "Statua 8", + "AlphabetStatue9": "Statua 9", + "AlphabetStatueA": "Statua A", + "AlphabetStatueB": "Statua B", + "AlphabetStatueC": "Statua C", + "AlphabetStatueD": "Statua D", + "AlphabetStatueE": "Statua E", + "AlphabetStatueF": "Statua F", + "AlphabetStatueG": "Statua G", + "AlphabetStatueH": "Statua H", + "AlphabetStatueI": "Statua I", + "AlphabetStatueJ": "Statua J", + "AlphabetStatueK": "Statua K", + "AlphabetStatueL": "Statua L", + "AlphabetStatueM": "Statua M", + "AlphabetStatueN": "Statua N", + "AlphabetStatueO": "Statua O", + "AlphabetStatueP": "Statua P", + "AlphabetStatueQ": "Statua Q", + "AlphabetStatueR": "Statua R", + "AlphabetStatueS": "Statua S", + "AlphabetStatueT": "Statua T", + "AlphabetStatueU": "Statua U", + "AlphabetStatueV": "Statua V", + "AlphabetStatueW": "Statua W", + "AlphabetStatueX": "Statua X", + "AlphabetStatueY": "Statua Y", + "AlphabetStatueZ": "Statua Z", + "Amarok": "Amarok", + "AmberGemsparkWall": "Muro di ambra luccicante", + "AmberGemsparkWallOff": "Muro di ambra luccicante inattivo", + "AmberStaff": "Bastone di ambra", + "AmethystGemsparkWall": "Muro di ametista luccicante", + "AmethystGemsparkWallOff": "Muro di ametista luccicante inattivo", + "AncientArmorHat": "Copricapo antico", + "AncientArmorPants": "Pantaloni antichi", + "AncientArmorShirt": "Abito antico", + "AncientBattleArmorHat": "Maschera proibita", + "AncientBattleArmorMaterial": "Frammento proibito", + "AncientBattleArmorPants": "Abito proibito", + "AncientBattleArmorShirt": "Toga proibita", + "AncientCloth": "Abito antico", + "AncientHorn": "Corno antico", + "AnglerTackleBag": "Borsa del pescatore", + "AngryBonesBanner": "Stendardo ossa arrabbiate", + "AnnouncementBox": "Cassetta degli annunci", + "AntiGravityHook": "Uncino anti-gravità", + "AntlionClaw": "Lama mandibola", + "ApprenticeBait": "Esca da apprendista", + "ApprenticeHat": "Cappello da apprendista", + "ApprenticeRobe": "Toga da apprendista", + "ApprenticeScarf": "Sciarpa da apprendista", + "ApprenticeTrousers": "Pantaloni da apprendista", + "ArchitectGizmoPack": "Zaino attrezzi da architetto", + "Arkhalis": "Arkhalis", + "AviatorSunglasses": "Occhiali 0x33", + "Bacon": "Pancetta", + "BalloonHorseshoeFart": "Palloncino con ferro di cavallo verde", + "BalloonHorseshoeHoney": "Palloncino con ferro di cavallo ambrato", + "BalloonHorseshoeSharkron": "Palloncino con ferro di cavallo rosa", + "BalloonPufferfish": "Palloncino pesce palla", + "BeeMask": "Maschera ape regina", + "BeesKnees": "Arco delle api", + "BejeweledValkyrieBody": "Mantello valchiria di Lazure", + "BejeweledValkyrieHead": "Cerchietto valchiria di Lazure", + "BejeweledValkyrieWing": "Piattaforma barriera di Lazure", + "BewitchingTable": "Tavolo stregato", + "BlackAndWhiteDye": "Tintura bianca e nera", + "BlackCounterweight": "Contrappeso nero", + "BlackString": "Corda nera", + "Bladetongue": "Lingualama", + "BlessedApple": "Mela benedetta", + "BlinkrootPlanterBox": "Fioriera lampeggiaradice", + "BloodWater": "Acqua sanguigna", + "BloodZombieBanner": "Stendardo zombie del sangue", + "BloodZombieStatue": "Statua zombie del sangue", + "BlueAcidDye": "Tintura acida blu", + "BlueCounterweight": "Contrappeso blu", + "BlueDungeonBathtub": "Vasca da bagno blu da dungeon", + "BlueDungeonCandelabra": "Candelabro blu da dungeon", + "BlueDungeonChandelier": "Lampadario blu da dungeon", + "BlueDungeonChest": "Cassa blu da dungeon", + "BlueDungeonLamp": "Lampada blu da dungeon", + "BlueDungeonSink": "Lavabo blu da dungeon", + "BlueFlameAndSilverDye": "Tintura fiamma blu e argento", + "BlueLunaticHood": "Cappuccio del cultista lunare", + "BlueLunaticRobe": "Toga del cultista lunare", + "BluePhasesaber": "Spada laser blu", + "BlueString": "Corda blu", + "BombFish": "Pesce bomba", + "BoneArrow": "Freccia di ossa", + "BoneBathtub": "Vasca da bagno di ossa", + "BoneBed": "Letto di ossa", + "BoneBookcase": "Scaffale di ossa", + "BoneCampfire": "Fuoco di bivacco di ossa", + "BoneCandelabra": "Candelabro di ossa", + "BoneChandelier": "Lampadario di ossa", + "BoneChest": "Cassa di ossa", + "BoneClock": "Orologio di ossa", + "BoneDagger": "Coltello da lancio di ossa", + "BoneGlove": "Guanto di ossa", + "BoneJavelin": "Giavellotto di ossa", + "BoneLamp": "Lampada di ossa", + "BoneLantern": "Lanterna di ossa", + "BoneRattle": "Sonaglio di ossa", + "BoneSink": "Lavabo di ossa", + "BoneSkeletonStatue": "Statua scheletro di ossa", + "BoneTorch": "Torcia di ossa", + "BoosterTrack": "Binario turbo", + "BorealWood": "Legno boreale", + "BorealWoodBathtub": "Vasca da bagno di legno boreale", + "BorealWoodBed": "Letto di legno boreale", + "BorealWoodBookcase": "Scaffale di legno boreale", + "BorealWoodBow": "Arco di legno boreale", + "BorealWoodBreastplate": "Corazza di legno boreale", + "BorealWoodCandelabra": "Candelabro di legno boreale", + "BorealWoodCandle": "Candela di legno boreale", + "BorealWoodChair": "Sedia di legno boreale", + "BorealWoodChandelier": "Lampadario di legno boreale", + "BorealWoodChest": "Cassa di legno boreale", + "BorealWoodClock": "Orologio di legno boreale", + "BorealWoodDoor": "Porta di legno boreale", + "BorealWoodDresser": "Cassettone di legno boreale", + "BorealWoodFence": "Recinto di legno boreale", + "BorealWoodGreaves": "Schinieri di legno boreale", + "BorealWoodHammer": "Martello di legno boreale", + "BorealWoodHelmet": "Casco di legno boreale", + "BorealWoodLamp": "Lampada di legno boreale", + "BorealWoodLantern": "Lanterna di legno boreale", + "BorealWoodPiano": "Pianoforte di legno boreale", + "BorealWoodPlatform": "Piattaforma di legno boreale", + "BorealWoodSink": "Lavabo di legno boreale", + "BorealWoodSofa": "Divano di legno boreale", + "BorealWoodSword": "Spada di legno boreale", + "BorealWoodTable": "Tavolo di legno boreale", + "BorealWoodWall": "Muro di legno boreale", + "BorealWoodWorkBench": "Banco da lavoro di legno boreale", + "BossMaskMoonlord": "Maschera del Signore della Luna", + "BottomlessBucket": "Secchio d'acqua senza fondo", + "BouncyBomb": "Bomba a rimbalzo", + "BouncyDynamite": "Dinamite a rimbalzo", + "BouncyGlowstick": "Bastone luminoso a rimbalzo", + "BouncyGrenade": "Granata a rimbalzo", + "BrainMask": "Maschera cervello di Cthulhu", + "BrainOfConfusion": "Cervello confuso", + "BrainOfCthulhuBossBag": "Borsa del tesoro", + "BrainScrambler": "Confondi cervello", + "BrightBrownDye": "Tintura marrone chiaro", + "BrightSilverDye": "Tintura argento chiaro", + "BrownAndBlackDye": "Tintura marrone e nera", + "BrownAndSilverDye": "Tintura marrone e argento", + "BrownDye": "Tintura marrone", + "BrownString": "Corda marrone", + "Bubble": "Bolla", + "BubbleGun": "Pistola sparabolle", + "BuccaneerBandana": "Bandana da bucaniere", + "BuccaneerPants": "Pantaloni da bucaniere", + "BuccaneerShirt": "Casacca da bucaniere", + "Buggy": "Coleottero", + "BuggyStatue": "Statua del coleottero", + "BunnyfishTrophy": "Trofeo pesce coniglio", + "BurningHadesDye": "Tintura dell'Ade infuocato", + "ButcherBanner": "Stendardo macellaio", + "ButchersChainsaw": "Motosega da macellaio", + "ButterflyStatue": "Statua della farfalla", + "CactusBathtub": "Vasca da bagno di cactus", + "CactusBed": "Letto di cactus", + "CactusBookcase": "Scaffale di cactus", + "CactusCandelabra": "Candelabro di cactus", + "CactusCandle": "Candela di cactus", + "CactusChandelier": "Lampadario di cactus", + "CactusChest": "Cassa di cactus", + "CactusClock": "Orologio di cactus", + "CactusLamp": "Lampada di cactus", + "CactusLantern": "Lanterna di cactus", + "CactusPlatform": "Piattaforma di cactus", + "CactusSink": "Lavabo di cactus", + "CactusTable": "Tavolo di cactus", + "CageBuggy": "Gabbia con coleottero", + "CageEnchantedNightcrawler": "Gabbia con verme notturno incantato", + "CageGrubby": "Gabbia con larva", + "CageSluggy": "Gabbia con lumaca", + "Cascade": "Cascata", + "CelestialShell": "Conchiglia celestiale", + "CelestialSigil": "Sigillo celestiale", + "CellPhone": "Telefono cellulare", + "ChainGuillotines": "Ghigliottine a catena", + "ChargedBlasterCannon": "Cannone blaster carico", + "Chik": "Chik", + "Chimney": "Ciminiera", + "ChlorophyteBrick": "Mattone di clorofite", + "ChlorophyteBrickWall": "Muro di clorofite", + "ChlorophyteDye": "Tintura di clorofite", + "ClingerStaff": "Bastone appiccicoso", + "ClothierJacket": "Giacca da merciaio", + "ClothierPants": "Pantaloni da merciaio", + "Code1": "Codice 1", + "Code2": "Codice 2", + "CogWall": "Muro di ingranaggi", + "CoinRing": "Anello di monete", + "CompanionCube": "Cubo compagno", + "CompassRose": "Bussola", + "ConfettiBlock": "Blocco di coriandoli", + "ConfettiBlockBlack": "Blocco di coriandoli notturno", + "ConfettiCannon": "Cannone di coriandoli", + "ConfettiWall": "Muro di coriandoli", + "ConfettiWallBlack": "Muro di coriandoli notturno", + "ConveyorBeltLeft": "Nastro trasportatore (orario)", + "ConveyorBeltRight": "Nastro trasportatore (antiorario)", + "CordageGuide": "Guida al cordame con fibra vegetale", + "CorruptFishingCrate": "Cassa corrotta", + "CorruptHardenedSand": "Blocco sabbia d'ebano indurita", + "CorruptHardenedSandWall": "Muro sabbia d'ebano indurita", + "CorruptPlanterBox": "Fioriera erbamorte", + "CorruptSandstone": "Blocco di pietra sabbia d'ebano", + "CorruptSandstoneWall": "Muro di pietra sabbia d'ebano", + "CorruptYoyo": "Malessere", + "CosmicCarKey": "Chiave auto cosmica", + "CrawdadBanner": "Stendardo gambero", + "CreatureFromTheDeepBanner": "Stendardo creatura della profondità", + "CrimsonFishingCrate": "Cassa cremisi", + "CrimsonHardenedSand": "Blocco sabbia cremisi indurita", + "CrimsonHardenedSandWall": "Muro sabbia cremisi indurita", + "CrimsonHeart": "Cuore cremisi", + "CrimsonPlanterBox": "Fioriera erbamorte", + "CrimsonSandstone": "Blocco di pietra sabbia cremisi", + "CrimsonSandstoneWall": "Muro di pietra sabbia cremisi", + "CrimsonYoyo": "Arteria", + "CrimtaneBrick": "Mattone di crimtano", + "CrimtaneBrickWall": "Muro di crimtano", + "CrystalBlock": "Blocco di cristallo", + "CrystalBlockWall": "Muro di blocchi di cristallo", + "CrystalDart": "Dardo di cristallo", + "CrystalSerpent": "Serpente di cristallo", + "CrystalVileShard": "Frammento vile di cristallo", + "CultistBossBag": "Borsa del tesoro", + "CursedCampfire": "Fuoco di bivacco maledetto", + "CursedDart": "Dardo maledetto", + "CyanString": "Corda azzurra", + "DaedalusStormbow": "Arco della tempesta di Dedalo", + "DarkMummyBanner": "Stendardo mummia scura", + "DartPistol": "Pistola a dardi", + "DartRifle": "Fucile a dardi", + "DayBloomPlanterBox": "Fioriera fiordigiorno", + "DayBreak": "Alba", + "DeadlySphereBanner": "Stendardo sfera letale", + "DeadlySphereStaff": "Bastone sfera letale", + "DefenderMedal": "Medaglia difesa", + "DefendersForge": "Forgia del difensore", + "DemonCampfire": "Fuoco di bivacco del demone", + "DemonHeart": "Cuore del demone", + "DesertBasiliskBanner": "Stendardo basilisco", + "DesertDjinnBanner": "Stendardo spirito del deserto", + "DesertFossil": "Fossile del deserto", + "DesertFossilWall": "Muro di fossili del deserto", + "DesertGhoulBanner": "Stendardo demonio", + "DesertLamiaBanner": "Stendardo lamia", + "DestroyerBossBag": "Borsa del tesoro", + "DestroyerMask": "Maschera del distruttore", + "Detonator": "Detonatore", + "DiamondGemsparkWall": "Muro di diamante luccicante", + "DiamondGemsparkWallOff": "Muro di diamante luccicante inattivo", + "DjinnLamp": "Lampada spirito del deserto", + "DjinnsCurse": "Maledizione del djinn", + "DPSMeter": "Indicatore danni al secondo", + "DrillContainmentUnit": "Unità di contenimento perforatrice", + "DripplerBanner": "Stendardo drippler", + "DripplerStatue": "Statua drippler", + "DrManFlyBanner": "Stendardo del dottor K", + "DuckStatue": "Statua della papera", + "DukeFishronMask": "Maschera duca pesce drago", + "DukeFishronTrophy": "Trofeo duca pesce drago", + "DuneSplicerBanner": "Stendardo vermedune", + "DungeonFishingCrate": "Cassa dungeon", + "DyeTradersScimitar": "Scimitarra esotica", + "DyeTraderTurban": "Turbante del venditore di tinture", + "DynastyBathtub": "Vasca da bagno dinastica", + "DynastyBed": "Letto dinastico", + "DynastyBookcase": "Scaffale dinastico", + "DynastyBowl": "Ciotola dinastica", + "DynastyCandelabra": "Candela grande dinastica", + "DynastyCandle": "Candela dinastica", + "DynastyChair": "Sedia dinastica", + "DynastyChandelier": "Lanterna grande dinastica", + "DynastyChest": "Cassa dinastica", + "DynastyClock": "Orologio dinastico", + "DynastyCup": "Coppa dinastica", + "DynastyLamp": "Lampada dinastica", + "DynastyLantern": "Lanterna dinastica", + "DynastySink": "Lavabo dinastico", + "DynastyWorkBench": "Banco da lavoro dinastico", + "EaterMask": "Maschera mangiatore di mondi", + "EaterOfWorldsBossBag": "Borsa del tesoro", + "EbonwoodBathtub": "Vasca da bagno di ebano", + "EbonwoodBookcase": "Scaffale di ebano", + "EbonwoodCandelabra": "Candelabro di ebano", + "EbonwoodCandle": "Candela di ebano", + "EbonwoodChandelier": "Lampadario di ebano", + "EbonwoodClock": "Orologio di ebano", + "EbonwoodLamp": "Lampada di ebano", + "EbonwoodLantern": "Lanterna di ebano", + "EbonwoodSink": "Lavabo di ebano", + "ElectrosphereLauncher": "Lanciaelettrosfera", + "EmeraldGemsparkWall": "Muro di smeraldo luccicante", + "EmeraldGemsparkWallOff": "Muro di smeraldo luccicante inattivo", + "EmptyDropper": "Contagocce vuoto", + "EnchantedNightcrawler": "Verme notturno incantato", + "EndlessMusketPouch": "Marsupio da moschetto infinito", + "EndlessQuiver": "Faretra infinita", + "EngineeringHelmet": "Elmo da ingegnere", + "EoCShield": "Scudo di Cthulhu", + "EyeMask": "Maschera occhio di Cthulhu", + "EyeOfCthulhuBossBag": "Borsa del tesoro", + "Fake_BlueDungeonChest": "Cassa blu da dungeon intrappolata", + "Fake_BoneChest": "Cassa di ossa intrappolata", + "Fake_BorealWoodChest": "Cassa di legno boreale intrappolata", + "Fake_CactusChest": "Cassa di cactus intrappolata", + "Fake_Chest": "Cassa intrappolata", + "Fake_CorruptionChest": "Cassa della corruzione intrappolata", + "Fake_CrimsonChest": "Cassa cremisi intrappolata", + "Fake_DynastyChest": "Cassa dinastica intrappolata", + "Fake_EbonwoodChest": "Cassa di ebano intrappolata", + "Fake_FleshChest": "Cassa di carne intrappolata", + "Fake_GlassChest": "Cassa di vetro intrappolata", + "Fake_GoldChest": "Cassa d'oro intrappolata", + "Fake_GraniteChest": "Cassa di granito intrappolata", + "Fake_GreenDungeonChest": "Cassa verde da dungeon intrappolata", + "Fake_HallowedChest": "Cassa consacrata intrappolata", + "Fake_HoneyChest": "Cassa di miele intrappolata", + "Fake_IvyChest": "Cassa di edera intrappolata", + "Fake_JungleChest": "Cassa della giungla intrappolata", + "Fake_LihzahrdChest": "Cassa rettiliana intrappolata", + "Fake_LivingWoodChest": "Cassa di legno vivo intrappolata", + "Fake_MarbleChest": "Cassa di marmo intrappolata", + "Fake_MartianChest": "Cassa marziana intrappolata", + "Fake_MeteoriteChest": "Cassa di meteorite intrappolata", + "Fake_MushroomChest": "Cassa a fungo intrappolata", + "Fake_ObsidianChest": "Cassa di ossidiana intrappolata", + "Fake_PalmWoodChest": "Cassa di legno di palma intrappolata", + "Fake_PearlwoodChest": "Cassa di legno perlato intrappolata", + "Fake_PinkDungeonChest": "Cassa rosa da dungeon intrappolata", + "Fake_PumpkinChest": "Cassa di zucca intrappolata", + "Fake_RichMahoganyChest": "Cassa di mogano scuro intrappolata", + "Fake_ShadewoodChest": "Cassa di grigiolegno intrappolata", + "Fake_ShadowChest": "Cassa ombra intrappolata", + "Fake_SkywareChest": "Cassa celeste intrappolata", + "Fake_SlimeChest": "Cassa slime intrappolata", + "Fake_SpookyChest": "Cassa spettrale intrappolata", + "Fake_SteampunkChest": "Cassa steampunk intrappolata", + "Fake_WaterChest": "Cassa di acqua intrappolata", + "Fake_WebCoveredChest": "Cassa coperta di ragnatele intrappolata", + "FalconBlade": "Lama di falco", + "FallenTuxedoPants": "Pantaloni da smoking caduti", + "FallenTuxedoShirt": "Camicia da smoking caduta", + "FancyDishes": "Piatti stravaganti", + "FetidBaghnakhs": "Bagh Nakh sporchi", + "FireBlossomPlanterBox": "Fioriera fiordifuoco", + "FireflyStatue": "Statua lucciola", + "Fireplace": "Focolare", + "FireworkFountain": "Fontana fuochi d'artificio", + "FireworksBox": "Cassetta fuochi d'artificio", + "FireworksLauncher": "Festeggiamenti", + "FishermansGuide": "Guida tascabile del pescatore", + "FishFinder": "Cerca pesce", + "FishronBossBag": "Borsa del tesoro", + "FishronWings": "Ali di pesce drago", + "Flairon": "Frusta pesce drago", + "FlameAndSilverDye": "Tintura fiamma e argento", + "FleshBathtub": "Vasca da bagno di carne", + "FleshBed": "Letto di carne", + "FleshBookcase": "Scaffale di carne", + "FleshCandelabra": "Candelabro di carne", + "FleshCandle": "Candela di carne", + "FleshChandelier": "Lampadario di carne", + "FleshChest": "Cassa di carne", + "FleshClock": "Orologio di carne", + "FleshDresser": "Cassettone di carne", + "FleshKnuckles": "Nocche di carne", + "FleshLamp": "Lampada di carne", + "FleshLantern": "Lanterna di carne", + "FleshMask": "Maschera muro di carne", + "FleshPiano": "Pianoforte di carne", + "FleshSink": "Lavabo di carne", + "FleshSofa": "Divano di carne", + "FloatingIslandFishingCrate": "Cassa del cielo", + "FlowerBoots": "Stivali di fiori", + "FlowerBoyHat": "Petali da girasole ridicoli", + "FlowerBoyPants": "Pantaloni da girasole ridicoli", + "FlowerBoyShirt": "Maglia da girasole ridicola", + "FlyingAntlionBanner": "Stendardo formicaleone sciamante", + "FlyingDutchmanTrophy": "Trofeo dell'Olandese Volante", + "FlyingKnife": "Coltello volante", + "FormatC": "Yo-yo C", + "FossilHelm": "Elmo fossile", + "FossilOre": "Fossile robusto", + "FossilPants": "Schinieri fossili", + "FossilShirt": "Piastra fossile", + "FragmentNebula": "Frammento di nebulosa", + "FragmentSolar": "Frammento solare", + "FragmentStardust": "Frammento di polvere di stella", + "FragmentVortex": "Frammento del vortice", + "FritzBanner": "Stendardo Fritz", + "FrogStatue": "Statua della rana", + "FrostDaggerfish": "Pescedaga del gelo", + "FrozenBathtub": "Vasca da bagno congelata", + "FrozenBed": "Letto congelato", + "FrozenBookcase": "Scaffale congelato", + "FrozenCampfire": "Fuoco di bivacco congelato", + "FrozenCandelabra": "Candelabro congelato", + "FrozenCandle": "Candela congelata", + "FrozenChair": "Sedia congelata", + "FrozenChandelier": "Lampadario congelato", + "FrozenClock": "Orologio congelato", + "FrozenDoor": "Porta congelata", + "FrozenLamp": "Lampada congelata", + "FrozenLantern": "Lanterna congelata", + "FrozenPiano": "Pianoforte congelato", + "FrozenSink": "Lavabo congelato", + "FrozenSofa": "Divano congelato", + "FrozenTable": "Tavolo congelato", + "FrozenWorkBench": "Banco da lavoro congelata", + "FuzzyCarrot": "Carota morbidosa", + "GelDye": "Tintura di gel", + "GemLockAmber": "Castone gemma di ambra", + "GemLockAmethyst": "Castone gemma di ametista", + "GemLockDiamond": "Castone gemma di diamante", + "GemLockEmerald": "Castone gemma di smeraldo", + "GemLockRuby": "Castone gemma di rubino", + "GemLockSapphire": "Castone gemma di zaffiro", + "GemLockTopaz": "Castone gemma di topazio", + "GenderChangePotion": "Pozione cambia genere", + "GeyserTrap": "Geyser", + "GiantShellyBanner": "Stendardo guscio gigante", + "GladiatorBreastplate": "Pettorale da gladiatore", + "GladiatorHelmet": "Elmo da gladiatore", + "GladiatorLeggings": "Gambali da gladiatore", + "GlassBathtub": "Vasca da bagno di vetro", + "GlassBookcase": "Scaffale di vetro", + "GlassBowl": "Ciotola di vetro", + "GlassCandelabra": "Candelabro di vetro", + "GlassCandle": "Candela di vetro", + "GlassChandelier": "Lampadario di vetro", + "GlassChest": "Cassa di vetro", + "GlassClock": "Orologio di vetro", + "GlassDresser": "Cassettone di vetro", + "GlassLamp": "Lampada di vetro", + "GlassLantern": "Lanterna di vetro", + "GlassPiano": "Pianoforte di vetro", + "GlassSink": "Lavabo di vetro", + "GlassWorkBench": "Banco da lavoro di vetro", + "GoblinSummonerBanner": "Stendardo goblin evocatore", + "GoblinTech": "Tecnologia goblin", + "GoldBird": "Uccello d'oro", + "GoldBirdCage": "Gabbia con uccello d'oro", + "GoldBunny": "Coniglio d'oro", + "GoldBunnyCage": "Gabbia con coniglio d'oro", + "GoldButterfly": "Farfalla d'oro", + "GoldButterflyCage": "Barattolo con farfalla d'oro", + "GoldenBathtub": "Vasca da bagno dorata", + "GoldenBookcase": "Scaffale dorato", + "GoldenBugNet": "Retino della cimine d'oro", + "GoldenCandelabra": "Candelabro dorato", + "GoldenCandle": "Candela dorata", + "GoldenChandelier": "Lampadario dorato", + "GoldenClock": "Orologio dorato", + "GoldenLamp": "Lampada dorata", + "GoldenLantern": "Lanterna dorata", + "GoldenSink": "Lavabo dorato", + "GoldfishTrophy": "Trofeo pesce rosso", + "GoldFrog": "Rana d'oro", + "GoldFrogCage": "Gabbia con rana d'oro", + "GoldGrasshopper": "Cavalletta d'oro", + "GoldGrasshopperCage": "Gabbia con cavalletta d'oro", + "GoldMouse": "Topo d'oro", + "GoldMouseCage": "Gabbia con topo d'oro", + "GoldRing": "Anello d'oro", + "GoldWorm": "Verme d'oro", + "GoldWormCage": "Gabbia con verme d'oro", + "GolemBossBag": "Borsa del tesoro", + "GolemMask": "Maschera golem", + "Gradient": "Dislivello", + "Granite": "Blocco di granito", + "GraniteBathtub": "Vasca da bagno di granito", + "GraniteBed": "Letto di granito", + "GraniteBlock": "Blocco di granito liscio", + "GraniteBlockWall": "Muro di granito liscio", + "GraniteBookcase": "Scaffale di granito", + "GraniteCandelabra": "Candelabro di granito", + "GraniteCandle": "Candela di granito", + "GraniteChair": "Sedia di granito", + "GraniteChandelier": "Lampadario di granito", + "GraniteChest": "Cassa di granito", + "GraniteClock": "Orologio di granito", + "GraniteDoor": "Porta di granito", + "GraniteDresser": "Cassettone di granito", + "GraniteFlyerBanner": "Stendardo elementale di granito", + "GraniteGolemStatue": "Statua golem di granito", + "GraniteLamp": "Lampada di granito", + "GraniteLantern": "Lanterna di granito", + "GranitePiano": "Piano di granito", + "GranitePlatform": "Piattaforma di granito", + "GraniteSink": "Lavabo di granito", + "GraniteSofa": "Divano di granito", + "GraniteTable": "Tavolo di granito", + "GraniteWall": "Muro di granito", + "GraniteWorkBench": "Banco da lavoro di granito", + "Grasshopper": "Cavalletta", + "GrasshopperCage": "Gabbia con cavalletta", + "GrasshopperStatue": "Statua della cavalletta", + "GreedyRing": "Anello avido", + "GreekSkeletonBanner": "Stendardo oplita", + "GreenCounterweight": "Contrappeso verde", + "GreenDungeonBathtub": "Vasca da bagno verde da dungeon", + "GreenDungeonCandelabra": "Candelabro verde da dungeon", + "GreenDungeonChandelier": "Lampadario verde da dungeon", + "GreenDungeonChest": "Cassa verde da dungeon", + "GreenDungeonLamp": "Lampada verde da dungeon", + "GreenDungeonSink": "Lavabo verde da dungeon", + "GreenFlameAndSilverDye": "Tintura fiamma verde e argento", + "GreenJellyfishBanner": "Stendardo medusa verde", + "GreenPhasesaber": "Spada laser verde", + "GreenString": "Corda verde", + "GrimDye": "Tintura macabra", + "Grubby": "Larva", + "GrubSoup": "Zuppa di larva", + "HadesDye": "Tintura dell'Ade", + "HallowedFishingCrate": "Cassa consacrata", + "HallowHardenedSand": "Blocco sabbiaperla indurita", + "HallowHardenedSandWall": "Muro sabbiaperla indurita", + "HallowSandstone": "Blocco sabbiaperla", + "HallowSandstoneWall": "Muro sabbiaperla", + "HardenedSand": "Blocco sabbia indurita", + "HardenedSandWall": "Muro sabbia indurita", + "HardySaddle": "Sella audace", + "HarpyStatue": "Statua dell'arpia", + "HelFire": "Yo-fuoco", + "HellstoneBrickWall": "Muro di pietra infernale", + "HellwingBow": "Arco ala di fuoco infernale", + "HerbBag": "Borsa di erba", + "HiTekSunglasses": "Occhiali da sole tecnologici", + "HiveBackpack": "Zaino alveare", + "HoneyBathtub": "Vasca da bagno di miele", + "HoneyBookcase": "Scaffale di miele", + "HoneyCandelabra": "Candelabro di miele", + "HoneyCandle": "Candela di miele", + "HoneyChandelier": "Lampadario di miele", + "HoneyChest": "Cassa di miele", + "HoneyClock": "Orologio di miele", + "HoneyCup": "Coppa di miele", + "HoneyedGoggles": "Occhiali da miele", + "HoneyfallBlock": "Blocco di miele liquido", + "HoneyfallWall": "Muro di miele liquido", + "HoneyLamp": "Lampada di miele", + "HoneyLantern": "Lanterna di miele", + "HoneyPiano": "Pianoforte di miele", + "HoneyPlatform": "Piattaforma di miele", + "HoneySink": "Lavabo di miele", + "HoneyWorkBench": "Banco da lavoro di miele", + "HopliteStatue": "Statua dell'oplita", + "HuntressBuckler": "Scudo della cacciatrice", + "HuntressJerkin": "Giubbetto della cacciatrice", + "HuntressPants": "Pantaloni della cacciatrice", + "HuntressWig": "Parrucca della cacciatrice", + "IceMirror": "Specchio di ghiaccio", + "IceTortoiseBanner": "Stendardo testuggine del ghiaccio", + "IchorCampfire": "Fuoco di bivacco di icore", + "IchorDart": "Dardo icore", + "IlluminantHook": "Uncino illuminante", + "InfernalWispDye": "Tintura fiammella infernale", + "InfluxWaver": "Spadone dell'influsso", + "ItemFrame": "Bacheca oggetti", + "Javelin": "Giavellotto", + "JimsWings": "Ali di Jim", + "JourneymanBait": "Esca intermedia", + "JungleFishingCrate": "Cassa della giungla", + "JungleYoyo": "Amazzone", + "KingSlimeBossBag": "Borsa del tesoro", + "Kraken": "Kraken", + "LamiaHat": "Maschera lamia", + "LamiaPants": "Coda lamia", + "LamiaShirt": "Bende lamia", + "LargeAmber": "Ambra grande", + "LaserDrill": "Perforatrice laser", + "LaserMachinegun": "Mitragliatrice laser", + "LaserRuler": "Righello meccanico", + "LastPrism": "Ultimo prisma", + "LavafallBlock": "Blocco di lava", + "LavaLamp": "Lampada di lava", + "LifeformAnalyzer": "Analizzatore forma di vita", + "LifePreserver": "Preservavita", + "LightKey": "Chiave di luce", + "LightMummyBanner": "Stendardo mummia chiara", + "LihzahrdBathtub": "Vasca da bagno rettiliana", + "LihzahrdBed": "Letto rettiliano", + "LihzahrdBookcase": "Scaffale rettiliano", + "LihzahrdCandelabra": "Candelabro rettiliano", + "LihzahrdCandle": "Candela rettiliana", + "LihzahrdChandelier": "Lampadario rettiliano", + "LihzahrdClock": "Orologio rettiliano", + "LihzahrdLamp": "Lampada rettiliana", + "LihzahrdLantern": "Lanterna rettiliana", + "LihzahrdSink": "Lavabo rettiliano", + "LimeString": "Corda limetta", + "LivingCursedFireBlock": "Blocco maledetto di fuoco vivo", + "LivingDemonFireBlock": "Blocco demonico di fuoco vivo", + "LivingFireBlock": "Blocco di fuoco vivo", + "LivingFlameDye": "Tintura fiamma viva", + "LivingFrostFireBlock": "Blocco congelato di fuoco vivo", + "LivingIchorBlock": "Blocco di icore vivo", + "LivingLeafWall": "Muro di foglia viva", + "LivingMahoganyLeafWand": "Bacchetta foglia di mogano scuro", + "LivingMahoganyWand": "Bacchetta di mogano vivo", + "LivingOceanDye": "Tintura oceano vivo", + "LivingRainbowDye": "Tintura arcobaleno vivo", + "LivingUltrabrightFireBlock": "Blocco luminosissimo di fuoco vivo", + "LivingWoodBathtub": "Vasca da bagno di legno vivo", + "LivingWoodBed": "Letto di legno vivo", + "LivingWoodBookcase": "Scaffale di legno vivo", + "LivingWoodCandelabra": "Candelabro di legno vivo", + "LivingWoodCandle": "Candela di legno vivo", + "LivingWoodChandelier": "Lampadario di legno vivo", + "LivingWoodClock": "Orologio di legno vivo", + "LivingWoodLamp": "Lampada di legno vivo", + "LivingWoodLantern": "Lanterna di legno vivo", + "LivingWoodPiano": "Pianoforte di legno vivo", + "LivingWoodPlatform": "Piattaforma di legno vivo", + "LivingWoodSink": "Lavabo di legno vivo", + "LivingWoodSofa": "Divano di legno vivo", + "LivingWoodWorkBench": "Banco da lavoro di legno vivo", + "LockBox": "Scatola con lucchetto d'oro", + "LogicGateLamp_Faulty": "Lampada portale logico (guasta)", + "LogicGateLamp_Off": "Lampada portale logico (spenta)", + "LogicGateLamp_On": "Lampada portale logico (accesa)", + "LogicGate_AND": "Lampada portale logico (AND)", + "LogicGate_NAND": "Lampada portale logico (NAND)", + "LogicGate_NOR": "Lampada portale logico (NOR)", + "LogicGate_NXOR": "Lampada portale logico (XNOR)", + "LogicGate_OR": "Lampada portale logico (OR)", + "LogicGate_XOR": "Lampada portale logico (XOR)", + "LogicSensor_Above": "Sensore logico (giocatore sopra)", + "LogicSensor_Honey": "Sensore liquido (miele)", + "LogicSensor_Lava": "Sensore liquido (lava)", + "LogicSensor_Liquid": "Sensore liquido (qualsiasi)", + "LogicSensor_Moon": "Sensore logico (notte)", + "LogicSensor_Sun": "Sensore logico (giorno)", + "LogicSensor_Water": "Sensore liquido (acqua)", + "LokisDye": "Tintura di Loki", + "LokisHelm": "Elmo di Loki", + "LokisPants": "Schinieri di Loki", + "LokisShirt": "Corazza di Loki", + "LokisWings": "Ali di Loki", + "LunarBar": "Barra di luminite", + "LunarBlockNebula": "Blocco frammento di nebulosa", + "LunarBlockSolar": "Blocco frammento solare", + "LunarBlockStardust": "Blocco frammento di polvere di stella", + "LunarBlockVortex": "Blocco frammento di vortice", + "LunarBrick": "Mattone di luminite", + "LunarBrickWall": "Muro di luminite", + "LunarCraftingStation": "Manipolatore antico", + "LunarFlareBook": "Razzo lunare", + "LunarHamaxeNebula": "Maglio di nebulosa", + "LunarHamaxeSolar": "Maglio esplosione solare", + "LunarHamaxeStardust": "Maglio di polvere di stella", + "LunarHamaxeVortex": "Maglio del vortice", + "LunarHook": "Uncino lunare", + "LunarOre": "Luminite", + "LunarTabletFragment": "Frammento tavoletta solare", + "MagicHoneyDropper": "Contagocce di miele magico", + "MagicLantern": "Lanterna magica", + "MagicLavaDropper": "Contagocce di lava magica", + "MagicSandDropper": "Contagocce di sabbia magica", + "MagicWaterDropper": "Contagocce di acqua magica", + "Marble": "Blocco di marmo", + "MarbleBathtub": "Vasca da bagno di marmo", + "MarbleBed": "Letto di marmo", + "MarbleBlock": "Blocco di marmo liscio", + "MarbleBlockWall": "Muro di marmo liscio", + "MarbleBookcase": "Scaffale di marmo", + "MarbleCandelabra": "Candelabro di marmo", + "MarbleCandle": "Candela di marmo", + "MarbleChair": "Sedia di marmo", + "MarbleChandelier": "Lampadario di marmo", + "MarbleChest": "Cassa di marmo", + "MarbleClock": "Orologio di marmo", + "MarbleDoor": "Porta di marmo", + "MarbleDresser": "Cassettone di marmo", + "MarbleLamp": "Lampada di marmo", + "MarbleLantern": "Lanterna di marmo", + "MarblePiano": "Piano di marmo", + "MarblePlatform": "Piattaforma di marmo", + "MarbleSink": "Lavabo di marmo", + "MarbleSofa": "Divano di marmo", + "MarbleTable": "Tavolo di marmo", + "MarbleWall": "Muro di marmo", + "MarbleWorkBench": "Banco da lavoro di marmo", + "MartianArmorDye": "Tintura marziana", + "MartianAstroClock": "Orologio astrale marziano", + "MartianBathtub": "Vasca da bagno marziana", + "MartianBed": "Letto marziano", + "MartianChandelier": "Lampadario marziano", + "MartianChest": "Cassa marziana", + "MartianConduitPlating": "Lastra di condotti marziani", + "MartianConduitWall": "Muro di condotti marziani", + "MartianCostumeMask": "Maschera costume marziano", + "MartianCostumePants": "Pantaloni costume marziano", + "MartianCostumeShirt": "Maglia costume marziano", + "MartianDoor": "Porta marziana", + "MartianDresser": "Cassettone marziano", + "MartianHairDye": "Tintura per capelli marziana", + "MartianHolobookcase": "Oloscaffale marziano", + "MartianHoverCandle": "Candela sospesa marziana", + "MartianHoverChair": "Sedia sospesa marziana", + "MartianLamppost": "Lampione marziano", + "MartianLantern": "Lanterna marziana", + "MartianPiano": "Piano marziano", + "MartianPlatform": "Piattaforma marziana", + "MartianSaucerTrophy": "Trofeo disco volante marziano", + "MartianSink": "Lavabo marziano", + "MartianSofa": "Divano marziano", + "MartianTable": "Tavolo marziano", + "MartianTableLamp": "Lampada da tavolo marziana", + "MartianUniformHelmet": "Elmo uniforme marziana", + "MartianUniformPants": "Pantaloni uniforme marziana", + "MartianUniformTorso": "Torso uniforme marziana", + "MartianWalkerBanner": "Stendardo camminatore marziano", + "MartianWorkBench": "Banco da lavoro marziano", + "MasterBait": "Esca da maestro", + "MechanicalBatteryPiece": "Pezzo di batteria meccanica", + "MechanicalLens": "Lente meccanica", + "MechanicalWagonPiece": "Pezzo di vagone meccanico", + "MechanicalWheelPiece": "Pezzo di ruota meccanico", + "MedusaBanner": "Stendardo di medusa", + "MedusaHead": "Testa di medusa", + "MedusaStatue": "Statua di medusa", + "Meowmere": "Miaospadone", + "MetalDetector": "Cercametalli", + "MetalSink": "Lavabo di metallo", + "MeteoriteBathtub": "Vasca da bagno di meteorite", + "MeteoriteBed": "Letto di meteorite", + "MeteoriteBookcase": "Scaffale di meteorite", + "MeteoriteBrick": "Mattone di meteorite", + "MeteoriteBrickWall": "Muro di meteorite", + "MeteoriteCandelabra": "Candelabro di meteorite", + "MeteoriteCandle": "Candela di meteorite", + "MeteoriteChair": "Sedia di meteorite", + "MeteoriteChandelier": "Lampadario di meteorite", + "MeteoriteChest": "Cassa di meteorite", + "MeteoriteClock": "Orologio di meteorite", + "MeteoriteDoor": "Porta di meteorite", + "MeteoriteDresser": "Cassettone di meteorite", + "MeteoriteLamp": "Lampada di meteorite", + "MeteoriteLantern": "Lanterna di meteorite", + "MeteoritePiano": "Piano di meteorite", + "MeteoritePlatform": "Piattaforma di meteorite", + "MeteoriteSink": "Lavabo di meteorite", + "MeteoriteSofa": "Divano di meteorite", + "MeteoriteTable": "Tavolo di meteorite", + "MeteoriteWorkBench": "Banco da lavoro di meteorite", + "MeteorStaff": "Bastone di meteorite", + "MidnightRainbowDye": "Tintura arcobaleno di mezzanotte", + "MinecartMech": "Carrello meccanico", + "MinecartTrack": "Binario carrello", + "MirageDye": "Tintura miraggio", + "MolotovCocktail": "Molotov", + "MoneyTrough": "Tinozza di soldi", + "MonkBelt": "Cintura del monaco", + "MonkBrows": "Cappello pelata da monaco con sopracciglia", + "MonkPants": "Pantaloni del monaco", + "MonkShirt": "Maglia del monaco", + "MoonglowPlanterBox": "Fioriera splendiluna", + "MoonlordArrow": "Freccia di luminite", + "MoonLordBossBag": "Borsa del tesoro", + "MoonlordBullet": "Proiettile di luminite", + "MoonLordPainting": "Né bambino né calamaro", + "MoonLordTrophy": "Trofeo del Signore della Luna", + "MoonlordTurretStaff": "Bastone portale lunare", + "MoonMask": "Maschera della luna", + "MothronBanner": "Stendardo mothron", + "MothronWings": "Ali di mothron", + "MouseStatue": "Statua del topo", + "MulticolorWrench": "Chiave inglese multicolore", + "MushroomBathtub": "Vasca da bagno a fungo", + "MushroomBed": "Letto a fungo", + "MushroomBench": "Panchina a fungo", + "MushroomBookcase": "Scaffale a fungo", + "MushroomCandelabra": "Candelabro a fungo", + "MushroomCandle": "Candela a fungo", + "MushroomChandelier": "Lampadario a fungo", + "MushroomChest": "Cassa a fungo", + "MushroomClock": "Orologio a fungo", + "MushroomDresser": "Cassettone a fungo", + "MushroomDye": "Tintura fungo luminoso", + "MushroomLamp": "Lampada a fungo", + "MushroomLantern": "Lanterna a fungo", + "MushroomPiano": "Pianoforte a fungo", + "MushroomPlatform": "Piattaforma a fungo", + "MushroomSink": "Lavabo a fungo", + "MushroomTable": "Tavolo a fungo", + "MusicBoxGoblins": "Carillon (invasione goblin)", + "MusicBoxHell": "Carillon (inferno)", + "MusicBoxLunarBoss": "Carillon (boss lunare)", + "MusicBoxMartians": "Carillon (follia marziana)", + "MusicBoxPirates": "Carillon (invasione pirata)", + "MusicBoxSandstorm": "Carillon (tempesta di sabbia)", + "MusicBoxTowers": "Carillon (le torri)", + "MusicBoxUndergroundCrimson": "Carillon (sotterraneo cremisi)", + "Nail": "Chiodo", + "NailGun": "Pistola sparachiodi", + "NailheadBanner": "Stendardo testa di chiodo", + "NebulaArcanum": "Arcanum di nebulosa", + "NebulaAxe": "Ascia di nebulosa", + "NebulaBeastBanner": "Stendardo bestia dell'evoluzione", + "NebulaBlaze": "Esplosione nebulosa", + "NebulaBrainBanner": "Stendardo galleggiante della nebulosa", + "NebulaBreastplate": "Pettorale della nebulosa", + "NebulaChainsaw": "Motosega della nebulosa", + "NebulaDrill": "Perforatrice della nebulosa", + "NebulaDye": "Tintura della nebulosa", + "NebulaHammer": "Martello della nebulosa", + "NebulaHeadcrabBanner": "Stendardo succhiacervello", + "NebulaHelmet": "Elmo della nebulosa", + "NebulaLeggings": "Gambali della nebulosa", + "NebulaMonolith": "Monolito della nebulosa", + "NebulaPickaxe": "Piccone della nebulosa", + "NebulaPickup1": "Turbo di danni", + "NebulaPickup2": "Turbo di vita", + "NebulaPickup3": "Turbo di mana", + "NebulaSoldierBanner": "Stendardo del profeta", + "NegativeDye": "Tintura negativa", + "NightKey": "Chiave della notte", + "NightVisionHelmet": "Elmo visione notturna", + "ObsidianBathtub": "Vasca da bagno di ossidiana", + "ObsidianCandelabra": "Candelabro di ossidiana", + "ObsidianCandle": "Candela di ossidiana", + "ObsidianChandelier": "Lampadario di ossidiana", + "ObsidianChest": "Cassa di ossidiana", + "ObsidianClock": "Orologio di ossidiana", + "ObsidianHelm": "Cappello fuorilegge di ossidiana", + "ObsidianLamp": "Lampada di ossidiana", + "ObsidianLantern": "Lanterna di ossidiana", + "ObsidianPants": "Pantaloni di ossidiana", + "ObsidianShirt": "Cappotto di ossidiana", + "ObsidianSink": "Lavabo di ossidiana", + "OnyxBlaster": "Blaster di onice", + "OrangeString": "Corda arancione", + "PainterPaintballGun": "Pistola da paintball", + "PaintingAcorns": "Ghiande", + "PaintingCastleMarsberg": "Castello Marsberg", + "PaintingColdSnap": "Ondata di freddo", + "PaintingCursedSaint": "Santo maledetto", + "PaintingMartiaLisa": "Martia Lisa", + "PaintingSnowfellas": "Pupazzi", + "PaintingTheSeason": "La stagione", + "PaintingTheTruthIsUpThere": "La verità è la fuori", + "PalmWood": "Legno di palma", + "PalmWoodBathtub": "Vasca da bagno di legno di palma", + "PalmWoodBed": "Letto di legno di palma", + "PalmWoodBench": "Panchina di legno di palma", + "PalmWoodBookcase": "Scaffale di legno di palma", + "PalmWoodBow": "Arco di legno di palma", + "PalmWoodBreastplate": "Corazza di legno di palma", + "PalmWoodCandelabra": "Candelabro di legno di palma", + "PalmWoodCandle": "Candela di legno di palma", + "PalmWoodChair": "Sedia di legno di palma", + "PalmWoodChandelier": "Lampadario di legno di palma", + "PalmWoodChest": "Cassa di legno di palma", + "PalmWoodClock": "Orologio di legno di palma", + "PalmWoodDoor": "Porta di legno di palma", + "PalmWoodDresser": "Cassettone di legno di palma", + "PalmWoodFence": "Recinto di legno di palma", + "PalmWoodGreaves": "Schinieri di legno di palma", + "PalmWoodHammer": "Martello di legno di palma", + "PalmWoodHelmet": "Casco di legno di palma", + "PalmWoodLamp": "Lampada di legno di palma", + "PalmWoodLantern": "Lanterna di legno di palma", + "PalmWoodPiano": "Pianoforte di legno di palma", + "PalmWoodPlatform": "Piattaforma di legno di palma", + "PalmWoodSink": "Lavabo di legno di palma", + "PalmWoodSofa": "Divano di legno di palma", + "PalmWoodSword": "Spada di legno di palma", + "PalmWoodTable": "Tavolo di legno di palma", + "PalmWoodWall": "Muro di legno di palma", + "PalmWoodWorkBench": "Banco da lavoro di legno di palma", + "PartyBalloonAnimal": "Palloncino animale", + "PartyBundleOfBalloonsAccessory": "Palloncini legati", + "PartyBundleOfBalloonTile": "Fascio di palloncini", + "PartyGirlGrenade": "Granata allegra", + "PartyHat": "Cappello da festa", + "PartyMonolith": "Centro da festa", + "PartyPresent": "Regalo da festa", + "PDA": "Palmare", + "PeaceCandle": "Candela pacifica", + "PearlwoodBathtub": "Vasca da bagno di legno perlato", + "PearlwoodBookcase": "Scaffale di legno perlato", + "PearlwoodCandelabra": "Candelabro di legno perlato", + "PearlwoodCandle": "Candela di legno perlato", + "PearlwoodChandelier": "Lampadario di legno perlato", + "PearlwoodClock": "Orologio di legno perlato", + "PearlwoodLamp": "Lampada di legno perlato", + "PearlwoodLantern": "Lanterna di legno perlato", + "PearlwoodSink": "Lavabo di legno perlato", + "PedguinHat": "Cappuccio di Pedguin", + "PedguinPants": "Pantaloni di Pedguin", + "PedguinShirt": "Giacca di Pedguin", + "PenguinStatue": "Statua del pinguino", + "Phantasm": "Fantasma", + "PhaseDye": "Tintura fasica", + "PhasicWarpEjector": "Espulsore fasico", + "Pigronata": "Pigronata", + "PigronStatue": "Statua del maialdrago", + "PinkDungeonBathtub": "Vasca da bagno rosa da dungeon", + "PinkDungeonCandelabra": "Candelabro rosa da dungeon", + "PinkDungeonChandelier": "Lampadario rosa da dungeon", + "PinkDungeonChest": "Cassa rosa da dungeon", + "PinkDungeonLamp": "Lampada rosa da dungeon", + "PinkDungeonSink": "Lavabo rosa da dungeon", + "PinkGel": "Gel rosa", + "PinkGelDye": "Tintura gel rosa", + "PinkJellyfishBanner": "Stendardo medusa rosa", + "PinkSlimeBlock": "Blocco slime rosa", + "PinkString": "Corda rosa", + "PinkTorch": "Torcia rosa", + "PirateCaptainBanner": "Stendardo pirata capitano", + "PirateCorsairBanner": "Stendardo pirata corsaro", + "PirateCrossbowerBanner": "Stendardo pirata con balestra", + "PirateDeadeyeBanner": "Stendardo pirata bendato", + "PirateStaff": "Bastone pirata", + "PixelBox": "Scatola di pixel", + "PixieDye": "Tintura fatina", + "PlanteraBossBag": "Borsa del tesoro", + "PlanteraMask": "Maschera di Plantera", + "PocketMirror": "Specchietto", + "PoisonousSporeBanner": "Stendardo spora velenosa", + "PortalGun": "Pistola del portale", + "PortalGunStation": "Stazione pistola del portale", + "PressureTrack": "Binario a pressione", + "ProjectilePressurePad": "Cuscinetto a pressione di ottanio", + "PsychoBanner": "Stendardo psicopatico", + "PsychoKnife": "Coltello psicopatico", + "PumpkinBathtub": "Vasca da bagno di zucca", + "PumpkinBed": "Letto di zucca", + "PumpkinBookcase": "Scaffale di zucca", + "PumpkinCandelabra": "Candelabro di zucca", + "PumpkinCandle": "Candela di zucca", + "PumpkinChandelier": "Lampadario di zucca", + "PumpkinChest": "Cassa di zucca", + "PumpkinClock": "Orologio di zucca", + "PumpkinDresser": "Cassettone di zucca", + "PumpkinLamp": "Lampada di zucca", + "PumpkinLantern": "Lanterna di zucca", + "PumpkinPiano": "Pianoforte di zucca", + "PumpkinSink": "Lavabo di zucca", + "PurpleCounterweight": "Contrappeso viola", + "PurpleOozeDye": "Tintura melma viola", + "PurplePhasesaber": "Spada laser viola", + "PurpleString": "Corda viola", + "PutridScent": "Odore putrido", + "QueenBeeBossBag": "Borsa del tesoro", + "Radar": "Radar", + "RainbowCampfire": "Fuoco di bivacco arcobaleno", + "RainbowCrystalStaff": "Bastone di cristallo arcobaleno", + "RainbowString": "Corda arcobaleno", + "RainbowTorch": "Torcia arcobaleno", + "Rally": "Rally", + "RazorbladeTyphoon": "Tifone tagliente", + "RedAcidDye": "Tintura acida rossa", + "RedCounterweight": "Contrappeso rosso", + "RedDevilBanner": "Stendardo diavolo rosso", + "RedPhasesaber": "Spada laser rossa", + "RedString": "Corda rossa", + "RedsYoyo": "Lancio di Red", + "ReflectiveCopperDye": "Tintura rame riflettente", + "ReflectiveDye": "Tintura riflettente", + "ReflectiveGoldDye": "Tintura oro riflettente", + "ReflectiveMetalDye": "Tintura metallo riflettente", + "ReflectiveObsidianDye": "Tintura ossidiana riflettente", + "ReflectiveSilverDye": "Tintura argento riflettente", + "REK": "R.E.K. 3000", + "RichGravestone1": "Targa con croce dorata", + "RichGravestone2": "Lapide dorata", + "RichGravestone3": "Targa dorata", + "RichGravestone4": "Pietra sepolcrale dorata", + "RichGravestone5": "Lastra dorata", + "RichMahoganyBathtub": "Vasca da bagno di mogano scuro", + "RichMahoganyBookcase": "Scaffale di mogano scuro", + "RichMahoganyCandelabra": "Candelabro di mogano scuro", + "RichMahoganyCandle": "Candela di mogano scuro", + "RichMahoganyChandelier": "Lampadario di mogano scuro", + "RichMahoganyClock": "Orologio di mogano scuro", + "RichMahoganyLamp": "Lampada di mogano scuro", + "RichMahoganyLantern": "Lanterna di mogano scuro", + "RichMahoganySink": "Lavabo di mogano scuro", + "RoyalGel": "Gel regale", + "RubyGemsparkWall": "Muro di rubino luccicante", + "RubyGemsparkWallOff": "Muro di rubino luccicante inattivo", + "SailfishBoots": "Stivali pesce-vela", + "SalamanderBanner": "Stendardo salamandra", + "SandElementalBanner": "Stendardo elementale di sabbia", + "SandFallWall": "Muro cascata di sabbia", + "SandsharkBanner": "Stendardo squalo di sabbia", + "SandsharkCorruptBanner": "Stendardo mordiossa", + "SandsharkCrimsonBanner": "Stendardo predatore di carne", + "SandsharkHallowedBanner": "Stendardo trebbiatrice di cristallo", + "SandSlimeBanner": "Stendardo slime di sabbia", + "Sandstone": "Blocco di arenaria", + "SandstoneWall": "Muro di arenaria", + "SapphireGemsparkWall": "Muro di zaffiro luccicante", + "SapphireGemsparkWallOff": "Muro di zaffiro luccicante inattivo", + "ScalyTruffle": "Tartufo squamato", + "ScorpionStatue": "Statua dello scorpione", + "Seashell": "Conchiglia", + "SeaSnailBanner": "Stendardo lumaca di mare", + "Seedler": "Spargisemi", + "SeveredHandBanner": "Stendardo mano staccata", + "Sextant": "Sestante", + "ShadewoodBathtub": "Vasca da bagno di grigiolegno", + "ShadewoodBookcase": "Scaffale di grigiolegno", + "ShadewoodCandelabra": "Candelabro di grigiolegno", + "ShadewoodCandle": "Candela di grigiolegno", + "ShadewoodChandelier": "Lampadario di grigiolegno", + "ShadewoodClock": "Orologio di grigiolegno", + "ShadewoodLamp": "Lampada di grigiolegno", + "ShadewoodLantern": "Lanterna di grigiolegno", + "ShadewoodSink": "Lavabo di grigiolegno", + "ShadowDye": "Tintura ombra", + "ShadowFlameBow": "Arco fiamma d'ombra", + "ShadowflameHadesDye": "Tintura dell'Ade fiamma d'ombra", + "ShadowFlameHexDoll": "Bambolina fiamma d'ombra", + "ShadowFlameKnife": "Coltello fiamma d'ombra", + "SharkronBalloon": "Palloncino squalo volante", + "SharkStatue": "Statua di squalo", + "SharkteethTrophy": "Trofeo pesce sega", + "SharkToothNecklace": "Collana dente di squalo", + "SharpeningStation": "Postazione affilante", + "ShiftingPearlSandsDye": "Tintura sabbiaperla cambiante", + "ShiftingSandsDye": "Tintura sabbia cambiante", + "ShinyStone": "Pietra lucente", + "ShipsWheel": "Timone", + "ShiverthornPlanterBox": "Fioriera rabbrivirovo", + "ShrimpyTruffle": "Tartufo nanerottolo", + "ShroomitePlating": "Lastra di micete", + "ShroomitePlatingWall": "Muro di lastre di micete", + "SilkRope": "Filo di seta", + "SilkRopeCoil": "Bobina di seta", + "SillyBalloonGreen": "Palloncino simpatico verde", + "SillyBalloonGreenWall": "Muro di palloncini simpatici verdi", + "SillyBalloonMachine": "Macchina da palloncini simpatici", + "SillyBalloonPink": "Palloncino simpatico rosa", + "SillyBalloonPinkWall": "Muro di palloncini simpatici rosa", + "SillyBalloonPurple": "Palloncino simpatico viola", + "SillyBalloonPurpleWall": "Muro di palloncini simpatici viola", + "SillyBalloonTiedGreen": "Palloncini simpatici legati (verdi)", + "SillyBalloonTiedPink": "Palloncini simpatici legati (rosa)", + "SillyBalloonTiedPurple": "Palloncini simpatici legati (viola)", + "SillyStreamerBlue": "Striscione blu", + "SillyStreamerGreen": "Striscione verde", + "SillyStreamerPink": "Striscione rosa", + "SilverAndBlackDye": "Tintura argento e nera", + "SkeletronBossBag": "Borsa del tesoro", + "SkeletronPrimeBossBag": "Borsa del tesoro", + "SkeletronPrimeMask": "Maschera skeletron primario", + "SkyBlueString": "Corda celeste", + "SkyFracture": "Frattura celeste", + "SkywareBathtub": "Vasca da bagno celeste", + "SkywareBed": "Letto celeste", + "SkywareBookcase": "Scaffale celeste", + "SkywareCandelabra": "Candelabro celeste", + "SkywareCandle": "Candela celeste", + "SkywareChandelier": "Lampadario celeste", + "SkywareClock": "Orologio celeste", + "SkywareLamp": "Lampada celeste", + "SkywareLantern": "Lanterna celeste", + "SkywarePlatform": "Piattaforma celeste", + "SkywareSink": "Lavabo celeste", + "SkywareWorkbench": "Banco da lavoro celeste", + "SlapHand": "Schiaffo", + "SliceOfCake": "Fetta di torta", + "SlimeBathtub": "Vasca da bagno slime", + "SlimeBed": "Letto slime", + "SlimeBookcase": "Scaffale slime", + "SlimeCandelabra": "Candelabro slime", + "SlimeCandle": "Candela slime", + "SlimeChair": "Sedia slime", + "SlimeChandelier": "Lampadario slime", + "SlimeChest": "Cassa slime", + "SlimeClock": "Orologio slime", + "SlimeDoor": "Porta slime", + "SlimeDresser": "Cassettone slime", + "SlimeGun": "Pistola slime", + "SlimeHook": "Uncino slime", + "SlimeLamp": "Lampada slime", + "SlimeLantern": "Lanterna slime", + "SlimePiano": "Pianoforte slime", + "SlimePlatform": "Piattaforma slime", + "SlimeSink": "Lavabo slime", + "SlimeSofa": "Divano slime", + "SlimeTable": "Tavolo slime", + "SlimySaddle": "Sella slime", + "Sluggy": "Lumaca", + "SmokeBlock": "Blocco di fumo", + "SnailStatue": "Statua della chiocciola", + "SnowCloudBlock": "Nuvola di neve", + "SnowFallWall": "Muro nevicata", + "SolarCoriteBanner": "Stendardo corite", + "SolarCrawltipedeBanner": "Stendardo centipede", + "SolarDrakomireBanner": "Stendardo drakomire", + "SolarDrakomireRiderBanner": "Stendardo cavaliere drakomire", + "SolarDye": "Tintura solare", + "SolarEruption": "Eruzione solare", + "SolarFlareAxe": "Ascia esplosione solare", + "SolarFlareBreastplate": "Pettorale esplosione solare", + "SolarFlareChainsaw": "Motosega esplosione solare", + "SolarFlareDrill": "Perforatrice esplosione solare", + "SolarFlareHammer": "Martello esplosione solare", + "SolarFlareHelmet": "Elmo esplosione solare", + "SolarFlareLeggings": "Gambali esplosione solare", + "SolarFlarePickaxe": "Piccone esplosione solare", + "SolarMonolith": "Monolito solare", + "SolarSolenianBanner": "Stendardo seleniano", + "SolarSrollerBanner": "Stendardo Sroller", + "SolarTablet": "Tavoletta solare", + "SoulDrain": "Sottrazione vita", + "SparkyPainting": "Scintilla", + "SpectreBar": "Barra dello spettro", + "SpelunkerGlowstick": "Bastone luminoso da speleologo", + "SpiderFang": "Zanna di ragno", + "SpiderStaff": "Bastone ragno", + "SpiritFlame": "Fiamma dello spirito", + "SpookyBathtub": "Vasca da bagno spettrale", + "SpookyBed": "Letto spettrale", + "SpookyBookcase": "Scaffale spettrale", + "SpookyCandelabra": "Candelabro spettrale", + "SpookyCandle": "Candela spettrale", + "SpookyChandelier": "Lampadario spettrale", + "SpookyChest": "Cassa spettrale", + "SpookyClock": "Orologio spettrale", + "SpookyLamp": "Lampada spettrale", + "SpookyLantern": "Lanterna spettrale", + "SpookySink": "Lavabo spettrale", + "SporeSac": "Sacca di spore", + "SquireGreatHelm": "Elmo grande dello scudiero", + "SquireGreaves": "Schinieri dello scudiero", + "SquirePlating": "Piastre dello scudiero", + "SquireShield": "Scudo dello scudiero", + "SquirrelGold": "Scoiattolo d'oro", + "SquirrelGoldCage": "Gabbia con scoiattolo d'oro", + "SquirrelOrangeCage": "Gabbia con scoiattolo rosso", + "SquirrelRed": "Scoiattolo rosso", + "SquirrelStatue": "Statua dello scoiattolo", + "StardustAxe": "Ascia di polvere di stella", + "StardustBreastplate": "Piastra di polvere di stella", + "StardustCellStaff": "Bastone cellula di polvere di stella", + "StardustChainsaw": "Motosega di polvere di stella", + "StardustDragonStaff": "Bastone del drago di polvere di stella", + "StardustDrill": "Perforatrice di polvere di stella", + "StardustDye": "Tintura di polvere di stella", + "StardustHammer": "Martello di polvere di stella", + "StardustHelmet": "Elmo di polvere di stella", + "StardustJellyfishBanner": "Stendardo invasore del flusso", + "StardustLargeCellBanner": "Stendardo cellula stellare", + "StardustLeggings": "Gambali di polvere di stella", + "StardustMonolith": "Monolito di polvere di stella", + "StardustPickaxe": "Piccone di polvere di stella", + "StardustSmallCellBanner": "Stendardo piccola cellula stellare", + "StardustSoldierBanner": "Stendardo astronomo", + "StardustSpiderBanner": "Stendardo lancia luccichio", + "StardustWormBanner": "Stendardo tessitore della Via Lattea", + "Starfish": "Stella di mare", + "StarWrath": "Ira stellare", + "StaticHook": "Uncino statico", + "SteampunkBathtub": "Vasca da bagno steampunk", + "SteampunkBookcase": "Scaffale steampunk", + "SteampunkCandelabra": "Candelabro steampunk", + "SteampunkCandle": "Candela steampunk", + "SteampunkChandelier": "Lampadario steampunk", + "SteampunkChest": "Cassa steampunk", + "SteampunkClock": "Orologio steampunk", + "SteampunkCup": "Calice", + "SteampunkDresser": "Cassettone steampunk", + "SteampunkLamp": "Lampada steampunk", + "SteampunkLantern": "Lanterna steampunk", + "SteampunkPiano": "Pianoforte steampunk", + "SteampunkPlatform": "Piattaforma steampunk", + "SteampunkSink": "Lavabo steampunk", + "SteampunkWorkBench": "Banco da lavoro steampunk", + "StickyDynamite": "Dinamite appiccicosa", + "StickyGrenade": "Granata appiccicosa", + "Stopwatch": "Cronometro", + "StrangeBrew": "Bevanda strana", + "StrangePlant1": "Pianta strana", + "StrangePlant2": "Pianta strana", + "StrangePlant3": "Pianta strana", + "StrangePlant4": "Pianta strana", + "StylistKilLaKillScissorsIWish": "Forbici eleganti", + "SummonerEmblem": "Emblema evocatore", + "Sundial": "Meridiana incantata", + "SunMask": "Maschera del sole", + "SuperAbsorbantSponge": "Spugna super-assorbente", + "SuperHealingPotion": "Pozione super guarente", + "SuspiciousLookingTentacle": "Tentacolo sospetto", + "SwordfishTrophy": "Trofeo pesce spada", + "TallGate": "Porta alta", + "TallyCounter": "Contamostri", + "TargetDummy": "Fantoccio", + "TartarSauce": "Salsa tartara", + "TaxCollectorHat": "Cappello dell'esattore", + "TaxCollectorPants": "Pantaloni dell'esattore", + "TaxCollectorsStickOfDoom": "Bastoncino di classe", + "TaxCollectorSuit": "Abito dell'esattore", + "TealString": "Corda ottanio", + "TeamBlockBlue": "Blocco squadra blu", + "TeamBlockBluePlatform": "Piattaforma squadra blu", + "TeamBlockGreen": "Blocco squadra verde", + "TeamBlockGreenPlatform": "Piattaforma squadra verde", + "TeamBlockPink": "Blocco squadra rosa", + "TeamBlockPinkPlatform": "Piattaforma squadra rosa", + "TeamBlockRed": "Blocco squadra rossa", + "TeamBlockRedPlatform": "Piattaforma squadra rossa", + "TeamBlockWhite": "Blocco squadra bianca", + "TeamBlockWhitePlatform": "Piattaforma squadra bianca", + "TeamBlockYellow": "Blocco squadra gialla", + "TeamBlockYellowPlatform": "Piattaforma squadra gialla", + "TempestStaff": "Bastone tempesta", + "TendonHook": "Uncino di tendine", + "Terrarian": "Terrariano", + "TheBrideDress": "Abito da sposa", + "TheBrideHat": "Velo da sposa", + "TheEyeOfCthulhu": "Occhio di Cthulhu", + "ThePossessedBanner": "Stendardo del posseduto", + "ThornHook": "Uncino strappato", + "TinPlating": "Lastra di latta", + "TinPlatingWall": "Muro di lastre di latta", + "TombCrawlerBanner": "Stendardo acaro della tomba", + "TopazGemsparkWall": "Muro di topazio luccicante", + "TopazGemsparkWallOff": "Muro di topazio luccicante inattivo", + "ToxicFlask": "Borraccia tossica", + "Toxikarp": "Tossicarpa", + "Trapdoor": "Porta trappola", + "TruffleWorm": "Verme tartufo", + "Tsunami": "Maremoto", + "TsunamiInABottle": "Tsunami in bottiglia", + "TumbleweedBanner": "Stendardo rotolatore arrabbiato", + "TwilightDye": "Tintura crepuscolare", + "TwilightHairDye": "Tintura per capelli crepuscolare", + "TwinMask": "Maschera gemella", + "TwinsBossBag": "Borsa del tesoro", + "UndeadVikingStatue": "Statua vichingo non-morto", + "UnicornStatue": "Statua dell'unicorno", + "UnicornWispDye": "Tintura fiammella di unicorno", + "ValkyrieYoyo": "Yo-yo della valchiria", + "Valor": "Valore", + "ViciousMushroom": "Fungo malvagio", + "ViciousPowder": "Polvere malvagia", + "VineRope": "Viticcio", + "VineRopeCoil": "Bobina di viticcio", + "VioletString": "Corda lilla", + "VoidDye": "Tintura del vuoto", + "VortexAxe": "Ascia vortice", + "VortexBeater": "Battitore vortice", + "VortexBreastplate": "Pettorale vortice", + "VortexChainsaw": "Motosega vortice", + "VortexDrill": "Perforatrice vortice", + "VortexDye": "Tintura vortice", + "VortexHammer": "Martello vortice", + "VortexHelmet": "Elmo vortice", + "VortexHornetBanner": "Stendardo calabrone alieno", + "VortexHornetQueenBanner": "Stendardo regina aliena", + "VortexLarvaBanner": "Stendardo larva aliena", + "VortexLeggings": "Gambali vortice", + "VortexMonolith": "Monolito vortice", + "VortexPickaxe": "Piccone vortice", + "VortexRiflemanBanner": "Stendardo tuffatore tempestoso", + "VortexSoldierBanner": "Stendardo vorticano", + "WalkingAntlionBanner": "Stendardo carica formicaleone", + "WallAnchor": "Ancora da parete", + "WallCreeperStatue": "Statua arrampicatore", + "WallOfFleshBossBag": "Borsa del tesoro", + "WandofSparking": "Bacchetta delle scintille", + "WarTable": "Tavolo da guerra", + "WarTableBanner": "Stendardo tavolo da guerra", + "WaterfallBlock": "Blocco di acqua", + "WaterleafPlanterBox": "Fioriera acquafoglia", + "WeaponRack": "Rastrelliera per armi", + "WeatherRadio": "Radio meteo", + "WebRope": "Filo di ragnatela", + "WebRopeCoil": "Bobina di ragnatela", + "WeightedPressurePlateCyan": "Piastra a pressione azzurra", + "WeightedPressurePlateOrange": "Piastra a pressione arancione", + "WeightedPressurePlatePink": "Piastra a pressione rosa", + "WeightedPressurePlatePurple": "Piastra a pressione viola", + "WhiteLunaticHood": "Cappuccio del cultista solare", + "WhiteLunaticRobe": "Toga del cultista solare", + "WhitePhasesaber": "Spada laser bianca", + "WhiteString": "Corda bianca", + "WineGlass": "Bicchiere di vetro", + "WingsNebula": "Coltre della nebulosa", + "WingsSolar": "Ali solari", + "WingsStardust": "Ali di polvere di stella", + "WingsVortex": "Vortice turbo", + "WireBulb": "Lampadina multicolore", + "WireKite": "Grande schema", + "WirePipe": "Scatola di giunzione", + "WispDye": "Tintura fiammella", + "WoodenSink": "Lavabo di legno", + "WoodYoyo": "Yo-yo di legno", + "WormholePotion": "Pozione del baco", + "WormHook": "Uncino di verme", + "WormScarf": "Sciarpa di verme", + "WormStatue": "Statua di verme", + "WraithStatue": "Statua di fantasma", + "Xenopopper": "Xenopopper", + "XenoStaff": "Bastone di Xeno", + "Yelets": "Yelets", + "YellowCounterweight": "Contrappeso giallo", + "YellowPhasesaber": "Spada laser gialla", + "YellowString": "Corda gialla", + "YellowWrench": "Chiave inglese gialla", + "Yoraiz0rDarkness": "Grugno di Yoraiz0r", + "Yoraiz0rHead": "Occhiali ricolorati di Yoraiz0r", + "Yoraiz0rPants": "Maglia di Yoraiz0r", + "Yoraiz0rShirt": "Uniforme di Yoraiz0r", + "Yoraiz0rWings": "Magia di Yoraiz0r", + "YoyoBag": "Borsa yo-yo", + "YoYoGlove": "Yo-guanto", + "ZombieArmStatue": "Statua zombie armato", + "AleThrowingGlove": "Lancia birra", + "ApprenticeAltHead": "Cappello dell'artista oscuro", + "ApprenticeAltPants": "Gambali dell'artista oscuro", + "ApprenticeAltShirt": "Toga dell'artista oscuro", + "ApprenticeStaffT3": "Ira di Betsy", + "BetsyWings": "Ali di Betsy", + "BookStaff": "Tomo della saggezza infinita", + "BossMaskBetsy": "Maschera di Betsy", + "BossMaskDarkMage": "Maschera del mago oscuro", + "BossMaskOgre": "Maschera dell'orco", + "BossTrophyBetsy": "Trofeo di Betsy", + "BossTrophyDarkmage": "Trofeo del mago oscuro", + "BossTrophyOgre": "Trofeo dell'orco", + "CrystalBathtub": "Vasca da bagno di cristallo", + "CrystalBed": "Letto di cristallo", + "CrystalBookCase": "Scaffale di cristallo", + "CrystalCandelabra": "Candelabro di cristallo", + "CrystalCandle": "Candela di cristallo", + "CrystalChair": "Sedia di cristallo", + "CrystalChandelier": "Lampadario di cristallo", + "CrystalChest": "Cassa di cristallo", + "CrystalClock": "Orologio di cristallo", + "CrystalDoor": "Porta di cristallo", + "CrystalDresser": "Cassettone di cristallo", + "CrystalLamp": "Lampada di cristallo", + "CrystalLantern": "Lanterna di cristallo", + "CrystalPiano": "Pianoforte di cristallo", + "CrystalPlatform": "Piattaforma di cristallo", + "CrystalSink": "Lavabo di cristallo", + "CrystalSofaHowDoesThatEvenWork": "Divano di cristallo", + "CrystalTable": "Tavolo di cristallo", + "CrystalWorkbench": "Banco da lavoro di cristallo", + "DD2BallistraTowerT1Popper": "Verga balestra", + "DD2BallistraTowerT2Popper": "Bastoncino balestra", + "DD2BallistraTowerT3Popper": "Bastone balestra", + "DD2BetsyBow": "Flagello aereo", + "DD2DrakinBanner": "Stendardo Drakin", + "DD2ElderCrystal": "Cristallo di Eternia", + "DD2ElderCrystalStand": "Piedistallo del cristallo di Eternia", + "DD2EnergyCrystal": "Mana eteriano", + "DD2ExplosiveTrapT1Popper": "Verga trappola esplosiva", + "DD2ExplosiveTrapT2Popper": "Bastoncino trappola esplosiva", + "DD2ExplosiveTrapT3Popper": "Bastone trappola esplosiva", + "DD2FlameburstTowerT1Popper": "Verga esplosiva", + "DD2FlameburstTowerT2Popper": "Bastoncino esplosivo", + "DD2FlameburstTowerT3Popper": "Bastone esplosivo", + "DD2GoblinBanner": "Stendardo goblin eteriano", + "DD2GoblinBomberBanner": "Stendardo goblin dinamitardo eteriano", + "DD2JavelinThrowerBanner": "Stendardo lanciatore di giavellotto eteriano", + "DD2KoboldBanner": "Stendardo Kobold", + "DD2KoboldFlyerBanner": "Stendardo aliante Kobold", + "DD2LightningAuraT1Popper": "Verga dell'aura fulminante", + "DD2LightningAuraT2Popper": "Bastoncino dell'aura fulminante", + "DD2LightningAuraT3Popper": "Bastone dell'aura fulminante", + "DD2LightningBugBanner": "Stendardo insetto fulminante eteriano", + "DD2PetDragon": "Uovo di drago", + "DD2PetGato": "Uovo di gato", + "DD2PetGhost": "Uovo di arrampicatore", + "DD2PhoenixBow": "Fenice fantasma", + "DD2SkeletonBanner": "Stendardo scheletro dell'Antico", + "DD2SquireBetsySword": "Drago volante", + "DD2SquireDemonSword": "Marca dell'inferno", + "DD2WitherBeastBanner": "Stendardo bestia appassita", + "DD2WyvernBanner": "Stendardo viverna eteriana", + "DungeonClockBlue": "Orologio blu da dungeon", + "DungeonClockGreen": "Orologio verde da dungeon", + "DungeonClockPink": "Orologio rosa da dungeon", + "DynastyDresser": "Cassettone dinastico", + "DynastyPiano": "Pianoforte dinastico", + "DynastySofa": "Divano dinastico", + "Fake_CrystalChest": "Cassa di cristallo intrappolata", + "Fake_GoldenChest": "Cassa dorata intrappolata", + "FleshPlatform": "Piattaforma di carne", + "FrozenDresser": "Cassettone congelato", + "FrozenPlatform": "Piattaforma congelata", + "GoldenChest": "Cassa dorata", + "GoldenPlatform": "Piattaforma dorata", + "GoldenWorkbench": "Banco da lavoro dorato", + "HuntressAltHead": "Cappuccetto Rosso", + "HuntressAltPants": "Gambali di Cappuccetto Rosso", + "HuntressAltShirt": "Vestito di Cappuccetto Rosso", + "LihzahrdPlatform": "Piattaforma rettiliana", + "LivingWoodDresser": "Cassettone di legno vivo", + "MonkAltHead": "Casco dell'infiltrato shinobi", + "MonkAltPants": "Pantaloni dell'infiltrato shinobi", + "MonkAltShirt": "Torso dell'infiltrato shinobi", + "MonkStaffT1": "Octopode assonnato", + "MonkStaffT2": "Alabarda spettrale", + "MonkStaffT3": "Furia del drago del cielo", + "SquireAltHead": "Elmo del cavaliere di Valhalla", + "SquireAltPants": "Schinieri del cavaliere di Valhalla", + "SquireAltShirt": "Corazza del cavaliere di Valhalla", + "SkywareClock2": "Orologio solare", + "LeinforsHat": "Protezione capelli Leinfors", + "LeinforsShirt": "Stile eccessivo Leinfors", + "LeinforsPants": "Pantaloni stravaganti Leinfors", + "LeinforsWings": "Manto prensile Leinfors", + "LeinforsAccessory": "Shampoo di lusso Leinfors", + "GraniteGolemBanner": "Stendardo golem di granito", + "RavagerScorpionBanner": "Stendardo bracconiere di sabbia", + "MusicBoxDD2": "Carillon (Esercito dell'Antico)", + "BossBagBetsy": "{$ItemName.SkeletronBossBag}" + }, + "ItemTooltip": { + "ShadowGreaves": "Velocità nel corpo a corpo aumentata del 7%", + "ConfettiGun": "Sparge coriandoli ovunque!", + "ChlorophyteMask": "Danno da mischia aumentato del 16%\nPossibilità di colpo critico nel corpo a corpo aumentata del 6%", + "ChlorophyteHelmet": "Danno boomerang aumentato del 16%\n20% di probabilità di non consumare munizioni", + "ChlorophyteHeadgear": "Aumenta il mana massimo di 80 e riduce il consumo di mana del 17%\nDanno magico aumentato del 16%", + "ChlorophytePlateMail": "Danno aumentato del 5%\nPossibilità di colpo critico aumentata del 7%", + "ChlorophyteGreaves": "Possibilità di colpo critico aumentata dell'8%\nVelocità di movimento aumentata del 5%", + "ChlorophyteBar": "Reagisce alla luce", + "ShadowScalemail": "Velocità nel corpo a corpo aumentata del 7%", + "ShadowHelmet": "Velocità nel corpo a corpo aumentata del 7%", + "NightmarePickaxe": "In grado di estrarre la pietra infernale", + "Paintbrush": "Si usa con la vernice per colorare i blocchi", + "PaintRoller": "Si usa con la vernice per colorare i i muri", + "ManaCrystal": "Aumenta in maniera permanente il mana massimo di 20", + "GolfBallDyedPink": "{$CommonItemTooltip.GolfBall}", + "TealMushroom": "Per ricavare la tintura ottanio", + "GreenMushroom": "Per ricavare la tintura verde", + "SkyBlueFlower": "Per ricavare la tintura celeste", + "BandofStarpower": "Aumenta il mana massimo di 20", + "YellowMarigold": "Per ricavare la tintura gialla", + "BlueBerries": "Per ricavare la tintura blu", + "LimeKelp": "Per ricavare la tintura limetta", + "PinkPricklyPear": "Per ricavare la tintura rosa", + "OrangeBloodroot": "Per ricavare la tintura arancione", + "RedHusk": "Per ricavare la tintura rossa", + "CyanHusk": "Per ricavare la tintura azzurra", + "VioletHusk": "Per ricavare la tintura lilla", + "PurpleMucos": "Per ricavare la tintura viola", + "BlackInk": "Per ricavare la tintura nera", + "FlowerofFire": "Tira palle di fuoco", + "DyeVat": "Per ricavare le tinture", + "BeeGun": "Spara api che inseguiranno il tuo nemico", + "PossessedHatchet": "Insegue il tuo nemico", + "BeeKeeper": "Evoca api assassine dopo aver colpito il nemico\nPiccola probabilità di provocare confusione", + "HiveWand": "Posiziona alveari", + "MagicMissile": "Scaglia un missile guidato", + "Beenade": "Esplode in uno sciame di api", + "GravityGlobe": "Consente al portatore di invertire la gravità\nPremi SU per cambiare la gravità", + "KiteRed": "{$CommonItemTooltip.Kite}", + "Abeemination": "Evoca l'ape regina", + "DirtRod": "Muove magicamente la terra", + "TempleKey": "Apre la porta del tempio nella giungla", + "LihzahrdWorkBench": "Si usa per la creazione di base", + "ShadowOrb": "Crea una sfera d'ombra magica", + "LihzahrdPressurePlate": "Si attiva quando un giocatore ci passa sopra", + "PiranhaGun": "Si attacca ai nemici per infliggere danno continuo", + "PygmyStaff": "Evoca un pigmeo che combatte per te", + "KiteBlueAndYellow": "{$CommonItemTooltip.Kite}", + "KiteBlue": "{$CommonItemTooltip.Kite}", + "KiteWyvern": "{$CommonItemTooltip.Kite}", + "GroxTheGreatGreaves": "{$CommonItemTooltip.DevItem}", + "LeafWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BlizzardinaBalloon": "Per eseguire un salto doppio\nAumenta l'altezza del salto", + "BundleofBalloons": "Il portatore può compiere un salto quadruplo\nAumenta l'altezza del salto", + "BatWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "HerculesBeetle": "Aumenta il danno dei tuoi seguaci del 15%\nAumenta lo spintone dei tuoi seguaci", + "BoneKey": "Evoca una testa di Skeletron piccolo", + "MeteoriteBar": "Calda al tocco", + "Nectar": "Evoca un calabrone piccolo", + "TikiTotem": "Evoca uno spirito tiki", + "LizardEgg": "Evoca una lucertola", + "LeafBlower": "Spara rapidamente foglie affilatissime", + "ChlorophyteBullet": "Insegue il tuo nemico", + "Hook": "Lanciato a volte da scheletri e piraña", + "ParrotCracker": "Evoca una pappagallo", + "StrangeGlowingMushroom": "Evoca un tartufo piccolo", + "Seedling": "Evoca un arboscello", + "WispinaBottle": "Evoca una fiammella per illuminare", + "PalladiumPickaxe": "Per estrarre mitrilio e oricalco", + "PalladiumDrill": "Per estrarre mitrilio e oricalco", + "OrichalcumPickaxe": "Per estrarre adamantio e titanio", + "OrichalcumDrill": "Per estrarre adamantio e titanio", + "MoltenFury": "Incendia le frecce di legno", + "PalladiumMask": "Danno da mischia aumentato dell'8%\nVelocità nel corpo a corpo aumentata del 12%", + "PalladiumHelmet": "Danno boomerang aumentato del 9%\nPossibilità di colpo critico a distanza aumentata del 9%", + "PalladiumHeadgear": "Probabilità di colpo critico e danno magico aumentate del 7%\nAumenta il mana massimo di 60", + "PalladiumBreastplate": "Danno aumentato del 3%\nPossibilità di colpo critico aumentata del 2%", + "PalladiumLeggings": "Danno aumentato del 2%\nPossibilità di colpo critico aumentata del 1%", + "FieryGreatsword": "Creato dal fuoco!", + "OrichalcumMask": "Danno da mischia aumentato del 7%\nMovimento e velocità in mischia aumentano del 7%", + "OrichalcumHelmet": "Possibilità di colpo critico a distanza aumentata del 15%\nVelocità di movimento aumentata dell'8%", + "OrichalcumHeadgear": "Aumenta la possibilità di colpo critico magico del 18%\nAumenta il mana massimo di 80", + "OrichalcumBreastplate": "Possibilità di colpo critico aumentata del 6%", + "OrichalcumLeggings": "Velocità di movimento aumentata dell'11%", + "TitaniumMask": "Probabilità di colpo critico e danno da mischia aumentati dell'8%\nVelocità nel corpo a corpo aumentata dell'8%", + "TitaniumHelmet": "Danno boomerang aumentato del 16%\nPossibilità di colpo critico a distanza aumentata del 7%", + "TitaniumHeadgear": "Danno magico aumentato del 16% e probabilità di colpo critico magico aumentata del 7%\nAumenta il mana massimo di 100", + "TitaniumBreastplate": "Danno aumentato del 4%\nPossibilità di colpo critico aumentata del 3%", + "TitaniumLeggings": "Probabilità di colpo critico e danno aumentate del 3%\nVelocità di movimento aumentata del 6%", + "OrichalcumAnvil": "Per ricavare oggetti da barre di mitrilio, oricalco, adamantio e titanio", + "TitaniumForge": "Per fondere adamantio e titanio", + "ChlorophyteClaymore": "Spara una sfera potente", + "ChlorophyteSaber": "Spara una nuvola di spore", + "ChlorophytePartisan": "Spara una nuvola di spore", + "MeteorHelmet": "Danno magico aumentato del 7%", + "ChlorophyteArrow": "Rimbalza dopo aver colpito un muro", + "MeteorSuit": "Danno magico aumentato del 7%", + "AmberMosquito": "Evoca un dinosauro piccolo", + "NimbusRod": "Evoca una nuvola per scatenare la pioggia sui tuoi nemici", + "GroxTheGreatArmor": "{$CommonItemTooltip.DevItem}", + "EyeoftheGolem": "Possibilità di colpo critico aumentata del 10%", + "HoneyBalloon": "Aumenta l'altezza del salto\nRilascia api quando si danneggia", + "MeteorLeggings": "Danno magico aumentato del 7%", + "BlueHorseshoeBalloon": "Per eseguire un salto doppio\nAumenta l'altezza del salto e annulla i danni da caduta", + "WhiteHorseshoeBalloon": "Per eseguire un salto doppio\nAumenta l'altezza del salto e annulla i danni da caduta", + "YellowHorseshoeBalloon": "Per eseguire un salto doppio\nAumenta l'altezza del salto e annulla i danni da caduta", + "OceanCrate": "{$CommonItemTooltip.RightClickToOpen}", + "SniperRifle": "Spara un proiettile potente ad alta velocità\n per allontanare", + "VenusMagnum": "Spara un proiettile potente ad alta velocità", + "CrimsonRod": "Evoca una nuvola che fa piovere sangue sui tuoi nemici", + "SteampunkWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsVortex": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "RainbowGun": "Spara un arcobaleno che infligge danno continuo", + "StyngerBolt": "Esplode generando frammenti letali", + "FlowerofFrost": "Spara una palla di gelo", + "Uzi": "Spara un proiettile potente ad alta velocità", + "RocketBoots": "Consente di volare", + "AmethystRobe": "Aumenta il mana massimo di 20\nConsumo mana ridotto del 5%", + "TopazRobe": "Aumenta il mana massimo di 40\nConsumo mana ridotto del 7%", + "SapphireRobe": "Aumenta il mana massimo di 40\nConsumo mana ridotto del 9%", + "EmeraldRobe": "Aumenta il mana massimo di 60\nConsumo mana ridotto dell'11%", + "RubyRobe": "Aumenta il mana massimo di 60\nConsumo mana ridotto del 13%", + "DiamondRobe": "Aumenta il mana massimo di 80\nConsumo mana ridotto del 15%", + "GroxTheGreatHelm": "{$CommonItemTooltip.DevItem}", + "LifeFruit": "Aumenta in maniera permanente la vita massima di 5", + "LihzahrdPowerCell": "Si usa presso l'altare rettiliano", + "Picksaw": "Consente di estrarre mattoni rettiliani", + "JimsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "StaffofEarth": "Evoca un masso potente", + "GolemFist": "Tira pugni con la forza di un golem", + "Binoculars": "Aumenta la portata visiva quando si tiene in mano", + "RifleScope": "Aumenta la portata visiva delle pistole\n per allontanare", + "DestroyerEmblem": "Danno aumentato del 10%\nPossibilità di colpo critico aumentata dell'8%", + "JellyfishNecklace": "Fa luce sott'acqua", + "IceSickle": "Spara un falcetto di ghiaccio", + "ClothierVoodooDoll": "Sei una persona terribile", + "PoisonStaff": "Spara una zanna avvelenata che trafigge più nemici", + "SlimeStaff": "Evoca uno slime piccolo che combatte per te", + "PoisonDart": "Infligge veleno sui nemici", + "EyeSpring": "Evoca un occhio a molla", + "ToySled": "Evoca un pupazzo di neve piccolo", + "BookofSkulls": "Spara un teschio", + "KOCannon": "Spara una guantone da boxe", + "PirateMap": "Evoca un'invasione pirata", + "TurtleHelmet": "Danno da mischia aumentato del 6%\nAumenta la probabilità che i nemici ti prendano come bersaglio", + "TurtleScaleMail": "Probabilità di colpo critico e danno da mischia aumentati dell'8%\nAumenta la probabilità che i nemici ti prendano come bersaglio", + "TurtleLeggings": "Possibilità di colpo critico nel corpo a corpo aumentata del 4%\nAumenta la probabilità che i nemici ti prendano come bersaglio", + "KiteWorldFeeder": "{$CommonItemTooltip.Kite}", + "OasisCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "ObsidianRose": "Riduce il danno ricevuto toccando la lava", + "RodofDiscord": "Ti teletrasporta nella posizione del mouse", + "DeathSickle": "Spara un falcetto letale", + "BloodySpine": "Evoca il cervello di Cthulhu", + "Ichor": "Il sangue delle divinità", + "IchorTorch": "Si può mettere in acqua", + "IchorArrow": "Riduce le difese del bersaglio", + "IchorBullet": "Riduce le difese del bersaglio", + "GoldenShower": "Spruzza un getto di icore\nRiduce le difese del bersaglio", + "OasisCrate": "{$CommonItemTooltip.RightClickToOpen}", + "ImbuingStation": "Per creare borracce con cui infondere le armi", + "EmptyBullet": "Per creare vari tipi di munizioni", + "ShadowbeamStaff": "Crea un raggio di ombra che rimbalza sui muri", + "InfernoFork": "Lancia una palla di fuoco che esplode scatenando un inferno", + "SpectreStaff": "Evoca un'anima perduta che insegue i tuoi nemici", + "BubbleMachine": "Crea bolle di sapone", + "BubbleWand": "Crea bolle di sapone", + "WaterCandle": "Avere questo oggetto potrebbe attirare attenzione non desiderata", + "Book": "Contiene simboli strani", + "CopperWatch": "Indica il tempo", + "SpectreHood": "Danno magico ridotto del 40%", + "SpectreRobe": "Probabilità di colpo critico e danno magico aumentate del 7%", + "SpectrePants": "Danno magico aumentato dell'8%\nVelocità di movimento aumentata dell'8%", + "NecroHelmet": "Danno boomerang aumentato del 5%", + "PaladinsHammer": "Un martello potente che torna indietro", + "BeeWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "NecroBreastplate": "Danno boomerang aumentato del 5%", + "LargeAmethyst": "Per la modalità Rubagemma; appare quando muori", + "LargeTopaz": "Per la modalità Rubagemma; appare quando muori", + "LargeSapphire": "Per la modalità Rubagemma; appare quando muori", + "LargeEmerald": "Per la modalità Rubagemma; appare quando muori", + "LargeRuby": "Per la modalità Rubagemma; appare quando muori", + "LargeDiamond": "Per la modalità Rubagemma; appare quando muori", + "NecroGreaves": "Danno boomerang aumentato del 5%", + "JungleKey": "Sblocca una cassa della giungla nel dungeon", + "CorruptionKey": "Sblocca una cassa della corruzione nel dungeon", + "CrimsonKey": "Sblocca una cassa cremisi nel dungeon", + "HallowedKey": "Sblocca una cassa consacrata nel dungeon", + "Cherry": "{$CommonItemTooltip.MinorStats}", + "SpectrePaintbrush": "Si usa con la vernice per colorare i blocchi", + "SpectrePaintRoller": "Si usa con la vernice per colorare i i muri", + "GolfBallDyedOrange": "{$CommonItemTooltip.GolfBall}", + "ShroomiteHeadgear": "Danno da freccia aumentato del 15%\nPossibilità di colpo critico a distanza aumentata del 5%", + "ShroomiteMask": "Danno da proiettile aumentato del 15%\nPossibilità di colpo critico a distanza aumentata del 5%", + "ShroomiteHelmet": "Danno da razzo aumentato del 15%\nPossibilità di colpo critico a distanza aumentata del 5%", + "KiteBoneSerpent": "{$CommonItemTooltip.Kite}", + "ShroomiteLeggings": "Possibilità di colpo critico a distanza aumentata del 7%\nVelocità di movimento aumentata del 12%", + "Autohammer": "Trasforma le barre di clorofite in barre di micete", + "Jetpack": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressUpToBooster}", + "CenxsTiara": "{$CommonItemTooltip.DevItem}", + "CenxsBreastplate": "{$CommonItemTooltip.DevItem}", + "CenxsLeggings": "{$CommonItemTooltip.DevItem}", + "CrownosMask": "{$CommonItemTooltip.DevItem}", + "CrownosBreastplate": "{$CommonItemTooltip.DevItem}", + "CrownosLeggings": "{$CommonItemTooltip.DevItem}", + "CobaltShield": "Rende immuni dallo spintone", + "WillsHelmet": "{$CommonItemTooltip.DevItem}", + "WillsBreastplate": "{$CommonItemTooltip.DevItem}", + "WillsLeggings": "{$CommonItemTooltip.DevItem}", + "JimsHelmet": "{$CommonItemTooltip.DevItem}", + "JimsBreastplate": "{$CommonItemTooltip.DevItem}", + "JimsLeggings": "{$CommonItemTooltip.DevItem}", + "AaronsHelmet": "{$CommonItemTooltip.DevItem}", + "AaronsBreastplate": "{$CommonItemTooltip.DevItem}", + "AaronsLeggings": "{$CommonItemTooltip.DevItem}", + "VampireKnives": "Lancia rapidamente pugnali di sottrazione vita", + "AquaScepter": "Spruzza una cascata d'acqua", + "ScourgeoftheCorruptor": "Un potente giavellotto che scatena minuscoli mangiatori", + "Banana": "{$CommonItemTooltip.MinorStats}", + "SweetheartNecklace": "Rilascia api e aumenta la velocità di movimento quando riceve danni", + "FlurryBoots": "Colui che li indossa può correre velocissimo", + "LuckyHorseshoe": "Annulla i danni da caduta", + "DTownsHelmet": "{$CommonItemTooltip.DevItem}", + "DTownsBreastplate": "{$CommonItemTooltip.DevItem}", + "DTownsLeggings": "{$CommonItemTooltip.DevItem}", + "GroxTheGreatWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "StillLife": "{$PaintingArtist.Crowno}", + "BloodyGoblet": "{$PaintingArtist.Crowno}", + "WickedUndead": "{$PaintingArtist.Crowno}", + "CenxsDress": "{$CommonItemTooltip.DevItem}", + "CenxsDressPants": "{$CommonItemTooltip.DevItem}", + "ShinyRedBalloon": "Aumenta l'altezza del salto", + "MagicCuffs": "Aumenta il mana massimo di 20\nRipristinano il mana quando vengono danneggiate", + "SilverWatch": "Indica il tempo", + "AnkhCharm": "Rende immuni da gran parte dei malus", + "AnkhShield": "Rende immuni da spintoni e blocchi di fuoco\nRende immuni da gran parte dei malus", + "WaterBolt": "Lancia un dardo di acqua lento", + "GolfBall": "{$CommonItemTooltip.GolfBall}", + "Dynamite": "Una grande esplosione che distruggerà molte mattonelle", + "Grenade": "Una piccola esplosione che non distruggerà mattonelle", + "GoldWatch": "Indica il tempo", + "FartinaJar": "Per eseguire un salto doppio", + "HellstoneBar": "Calda al tocco", + "LeprechaunHat": "A me sembra tanto un folletto", + "LeprechaunShirt": "Voglio soltanto sapere dov'è l'oro!", + "LeprechaunPants": "Voglio l'oro. Voglio l'oro. Voglio l'oro. Dammi l'oro!", + "GoodieBag": "{$CommonItemTooltip.RightClickToOpen}", + "CandyCornRifle": "33% di probabilità di non consumare munizioni", + "Sickle": "Per raccogliere fieno nel prato", + "KiteAngryTrapper": "{$CommonItemTooltip.Kite}", + "TatteredFairyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "SpiderEgg": "Evoca un ragno", + "MagicalPumpkinSeed": "Evoca una piccola zucca", + "DepthMeter": "Mostra la profondità", + "BatScepter": "Evoca pipistrelli per attaccare i tuoi nemici", + "RavenStaff": "Evoca un corvo che combatte per te", + "JungleKeyMold": "Si usa per creare una chiave della giungla", + "CorruptionKeyMold": "Si usa per creare una chiave della corruzione", + "CrimsonKeyMold": "Si usa per creare una chiave cremisi", + "HallowedKeyMold": "Si usa per creare una chiave consacrata", + "FrozenKeyMold": "Si usa per creare una chiave congelata", + "RottenEgg": "Si usa per prendersi gioco degli abitanti", + "UnluckyYarn": "Evoca un gattino nero", + "TheHorsemansBlade": "Evoca teste di zucca per attaccare i tuoi nemici", + "SpookyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "GhostManifestation": "{$PaintingArtist.Crowno}", + "Graveyard": "{$PaintingArtist.Crowno}", + "Reborn": "{$PaintingArtist.Crowno}", + "CursedSapling": "Evoca uno arboscello maledetto che ti segue", + "PumpkinMoonMedallion": "Evoca la luna a zucca", + "Nevermore": "{$PaintingArtist.Crowno}", + "SniperScope": "Allunga la portata visiva delle pistole ( per allontanare)\nDanno a distanza e probabilità di colpo critico aumentano del 10%", + "BreathingReed": "Aumenta la durata del respiro e consente di respirare sott'acqua", + "JellyfishDivingGear": "Consente di nuotare e aumenta notevolmente il tempo in apnea\nFa luce sott'acqua", + "ArcticDivingGear": "Consente di nuotare e aumenta notevolmente il tempo in apnea\nIllumina sott'acqua e dona maggiore mobilità sul ghiaccio", + "GnomeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Gnome}", + "FartInABalloon": "Per eseguire un salto doppio\nAumenta l'altezza del salto", + "DandelionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Dandelion}", + "GolfPainting3": "{$PaintingArtist.Crowno}", + "ArkhalisWings": "{$ItemTooltip.ArkhalisHat}\n{$CommonItemTooltip.FlightAndSlowfall}", + "Present": "{$CommonItemTooltip.RightClickToOpen}", + "Flipper": "Abilita al nuoto", + "RedRyder": "Non ti sparare in un occhio!", + "FestiveWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BladeofGrass": "Può avvelenare i nemici", + "EldMelter": "Utilizza la gelatina come munizione", + "KiteGoldfish": "{$CommonItemTooltip.Kite}", + "ReindeerBells": "Evoca una renna cavalcabile", + "CnadyCanePickaxe": "Può estrarre meteorite", + "KiteBunnyCrimson": "{$CommonItemTooltip.Kite}", + "KiteBunnyCorrupt": "{$CommonItemTooltip.Kite}", + "HandWarmer": "Offre immunità dal freddo e dagli effetti di congelamento", + "Coal": "Quest'anno sei stato birichino", + "GolfPainting2": "{$PaintingArtist.Crowno}", + "DogWhistle": "Evoca un cucciolo", + "ChristmasTreeSword": "Spara decorazioni natalizie", + "ChainGun": "50% di probabilità di non consumare munizioni", + "ObsidianSkull": "Dona immunità dai blocchi di fuoco", + "Razorpine": "Spara aghi di pino molto taglienti", + "BlizzardStaff": "Fa scrosciare ghiaccioli su un'area", + "SnowmanCannon": "Lancia missili radiocomandati", + "NorthPole": "Spara una lancia di ghiaccio che fa nevicare", + "NaughtyPresent": "Evoca la luna del gelo", + "BabyGrinchMischiefWhistle": "Evoca un grinch piccolo", + "StarCannon": "Spara stelle cadenti", + "Fez": "I fez sono pazzeschi", + "JungleRose": "Graziosa, oh com'è graziosa", + "FeralClaws": "Velocità nel corpo a corpo aumentata del 12%", + "AnkletoftheWind": "Velocità di movimento aumentata del 10%", + "GolfClubIron": "{$CommonItemTooltip.GolfIron}", + "WhoopieCushion": "Può disturbare gli altri", + "HeavyWorkBench": "Si usa per la creazione avanzata", + "AmmoBox": "Consumo munizioni ridotto del 20%", + "Flamelash": "Evoca una palla di fuoco guidata", + "VenomStaff": "Spara una zanna tossica che trafigge più nemici", + "SpectreMask": "Aumenta il mana massimo di 60 e riduce il consumo di mana del 13%\nProbabilità di colpo critico e danno magico aumentate del 5%", + "BoneWelder": "{$CommonItemTooltip.SpecialCrafting}", + "FleshCloningVaat": "{$CommonItemTooltip.SpecialCrafting}", + "GlassKiln": "{$CommonItemTooltip.SpecialCrafting}", + "LihzahrdFurnace": "{$CommonItemTooltip.SpecialCrafting}", + "LivingLoom": "{$CommonItemTooltip.SpecialCrafting}", + "SkyMill": "{$CommonItemTooltip.SpecialCrafting}", + "IceMachine": "{$CommonItemTooltip.SpecialCrafting}", + "BeetleHelmet": "Danno da mischia aumentato del 6%\nAumenta la probabilità che i nemici ti prendano come bersaglio", + "BeetleScaleMail": "Probabilità di colpo critico e danno da mischia aumentati dell'8%\nMovimento e velocità in mischia aumentano del 6%", + "BeetleShell": "Probabilità di colpo critico e danno da mischia aumentati del 5%\nAumenta la probabilità che i nemici ti prendano come bersaglio", + "BeetleLeggings": "Movimento e velocità in mischia aumentano del 6%\nAumenta la probabilità che i nemici ti prendano come bersaglio", + "SteampunkBoiler": "{$CommonItemTooltip.SpecialCrafting}", + "HoneyDispenser": "{$CommonItemTooltip.SpecialCrafting}", + "BrickLayer": "Aumenta la velocità di posizionamento delle mattonelle", + "GolfPainting1": "{$PaintingArtist.Crowno}", + "PaintSprayer": "Colora automaticamente gli oggetti piazzati", + "PortableCementMixer": "Aumenta la velocità di posizionamento dei muri", + "CelestialMagnet": "Aumenta la portata di raccolta delle stelle di mana", + "ClayPot": "Fa crescere le piante", + "CelestialEmblem": "Aumenta la portata di raccolta delle stelle di mana\nDanno magico aumentato del 15%", + "CelestialCuffs": "Aumenta la portata di raccolta delle stelle di mana\nRipristinano il mana quando vengono danneggiate", + "PulseBow": "Spara una freccia carica", + "NaturesGift": "Consumo mana ridotto del 6%", + "KiteSandShark": "{$CommonItemTooltip.Kite}", + "KiteShark": "{$CommonItemTooltip.Kite}", + "RestorationPotion": "Ricarica pozione ridotta", + "Gatligator": "50% di probabilità di non consumare munizioni\nMolto impreciso", + "WaterGun": "Spruzza uno schizzo d'acqua innocuo", + "MagicHat": "Probabilità di colpo critico e danno magico aumentate del 7%", + "Gi": "Probabilità di colpo critico e danno aumentate del 5%\nVelocità di corpo a corpo e movimento aumentata del 10%", + "GypsyRobe": "Probabilità di colpo critico e danno magico aumentate del 6%\nConsumo mana ridotto del 10%", + "JungleHat": "Aumenta il mana massimo di 40\nAumenta la possibilità di colpo critico magico del 4%", + "BeetleWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "JungleShirt": "Aumenta il mana massimo di 20\nAumenta la possibilità di colpo critico magico del 4%", + "Gel": "Sia gustoso che infiammabile", + "JunglePants": "Aumenta il mana massimo di 20\nAumenta la possibilità di colpo critico magico del 4%", + "NeonTetra": "Le sue squame colorate potrebbero vendere bene.", + "Grapefruit": "{$CommonItemTooltip.MinorStats}", + "MiningPotion": "Aumenta la velocità di estrazione del 25%", + "HeartreachPotion": "Aumenta la portata di raccolta dei cuori", + "DungeonFishingCrateHard": "{$ItemTooltip.DungeonFishingCrate}", + "BuilderPotion": "Aumenta la velocità e la portata di posizionamento", + "TitanPotion": "Aumenta lo spintone", + "FlipperPotion": "Ti consente di muoverti agilmente nei liquidi", + "DivineEye": "{$PaintingArtist.Darthkitten}", + "TrapsightPotion": "Ti consente di vedere le fonti di pericolo nei paraggi", + "WoodenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "IronCrate": "{$CommonItemTooltip.RightClickToOpen}", + "GoldenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "AmmoReservationPotion": "20% di probabilità di non consumare munizioni", + "LifeforcePotion": "Aumenta la vita massima del 20%", + "EndurancePotion": "Riduce il danno subito del 10%", + "RagePotion": "Aumenta la probabilità critica del 10%", + "InfernoPotion": "Incendia i nemici vicini", + "WrathPotion": "Aumenta il danno del 10%", + "GolfClubDriver": "{$CommonItemTooltip.GolfDriver}", + "RecallPotion": "Ti teletrasporta a casa", + "TeleportationPotion": "Ti teletrasporta in un luogo a caso", + "LovePotion": "Si lancia contro qualcuno per farlo innamorare", + "StinkPotion": "Si lancia contro qualcuno per farlo puzzare", + "BandageBoy": "{$PaintingArtist.Darthkitten}", + "SonarPotion": "Rileva i pesci presi all'amo", + "CratePotion": "Aumenta la probabilità di ottenere una cassa", + "WarmthPotion": "Riduce il danno dalle fonti di freddo", + "VisitingThePyramids": "{$PaintingArtist.Leinfors}", + "Uluru": "{$PaintingArtist.darthmorf}", + "BeeGreaves": "Aumenta il danno dei seguaci del 5%", + "HornetStaff": "Evoca un calabrone che combatte per te", + "ImpStaff": "Evoca un diavoletto che combatte per te", + "Oasis": "{$PaintingArtist.Khaios}", + "LifeAboveTheSand": "{$PaintingArtist.Zoomo}", + "SnakesIHateSnakes": "{$PaintingArtist.Xman101}", + "Sunglasses": "Migliora il tuo look!", + "TheSandsOfSlime": "{$PaintingArtist.Criddle}", + "JawsOfDeath": "{$PaintingArtist.Darthkitten}", + "BurningSpirit": "{$PaintingArtist.Zoomo}", + "HighTestFishingLine": "La lenza non si romperà mai", + "FruitSalad": "{$CommonItemTooltip.MinorStats}", + "TackleBox": "Riduce la probabilità di consumo dell'esca", + "WizardHat": "Danno magico aumentato del 15%", + "ZephyrFish": "Evoca un pesce zefiro", + "FrogLeg": "Aumenta la velocità di salto e consente il salto automatico\nAumenta la resistenza alla caduta", + "Dragonfruit": "{$CommonItemTooltip.MediumStats}", + "KiteJellyfishPink": "{$CommonItemTooltip.Kite}", + "KiteJellyfishBlue": "{$CommonItemTooltip.Kite}", + "FinWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "OpticStaff": "Chiama i Gemelli a combattere per te", + "RedHat": "Puzza un po'...", + "Goldfish": "Sta ridendo, potrebbe essere uno spuntino appetitoso", + "Sandgun": "Buona idea!", + "GuideVoodooDoll": "Sei una persona terribile.", + "DivingHelmet": "Aumenta moltissimo il respiro sott'acqua", + "DemonScythe": "Evoca una falce demoniaca", + "Blowpipe": "Consente di raccogliere semi come munizioni", + "Glowstick": "Funziona quando si bagna", + "Seed": "Da utilizzare con la Cerbottana", + "Aglet": "Velocità di movimento aumentata del 5%", + "ObsidianSkinPotion": "Rende immuni dalla lava", + "RegenerationPotion": "Rigenera la vita", + "LifeCrystal": "Aumenta in maniera permanente la vita massima di 20", + "SwiftnessPotion": "Velocità di movimento aumentata del 25%", + "GillsPotion": "Respira acqua invece di aria", + "IronskinPotion": "Aumenta la difesa di 8", + "ManaRegenerationPotion": "Aumenta la rigenerazione del mana", + "MagicPowerPotion": "Danno magico aumentato del 20%", + "FeatherfallPotion": "Velocità di caduta lenta", + "SpelunkerPotion": "Mostra l'ubicazione di tesori e minerali", + "InvisibilityPotion": "Rende invisibili", + "ShinePotion": "Emette un'aura di luce", + "NightOwlPotion": "Migliora la visione notturna", + "BattlePotion": "Aumenta il ritmo di generazione dei nemici", + "ThornsPotion": "Anche gli aggressori subiscono danni", + "WaterWalkingPotion": "Consente di camminare sull'acqua", + "ArcheryPotion": "Velocità e danni della freccia aumentati del 20%", + "HunterPotion": "Mostra la posizione dei nemici", + "GravitationPotion": "Permette il controllo della gravità", + "IllegalGunParts": "Proibita in molti luoghi", + "GolfClubWedge": "{$CommonItemTooltip.GolfWedge}", + "BetsyWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "Furnace": "Serve a fondere i minerali", + "Loom": "Serve a creare abiti", + "IronAnvil": "Serve a creare oggetti dalle barre di metallo", + "Keg": "Serve a produrre birra", + "KiteManEater": "{$CommonItemTooltip.Kite}", + "WorkBench": "Si usa per la creazione di base", + "GoblinBattleStandard": "Evoca un esercito di goblin", + "Sawmill": "Serve per la lavorazione del legno avanzata", + "Pwnhammer": "Abbastanza forte per distruggere gli altari dei demoni", + "CobaltHat": "Aumenta il mana massimo di 40\nAumenta la possibilità di colpo critico magico del 9%", + "CobaltHelmet": "Velocità di movimento aumentata del 7%\nVelocità nel corpo a corpo aumentata del 12%", + "CobaltMask": "Danno boomerang aumentato del 10%\nPossibilità di colpo critico a distanza aumentata del 6%", + "MythrilHood": "Aumenta il mana massimo di 60\nDanno magico aumentato del 15%", + "MythrilHelmet": "Possibilità di colpo critico nel corpo a corpo aumentata del 5%\nDanno da mischia aumentato del 10%", + "MythrilHat": "Danno boomerang aumentato del 12%\nPossibilità di colpo critico a distanza aumentata del 7%", + "CobaltDrill": "Per estrarre mitrilio e oricalco", + "MythrilDrill": "Per estrarre adamantio e titanio", + "WingsNebula": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "Compass": "Mostra posizione orizzontale", + "DivingGear": "Abilita al nuoto\nAumenta moltissimo il respiro sott'acqua", + "GPS": "Mostra posizione\nIndica il tempo", + "ObsidianHorseshoe": "Annulla i danni da caduta\nDona immunità dai blocchi di fuoco", + "ObsidianShield": "Rende immuni dallo spintone\nDona immunità dai blocchi di fuoco", + "TinkerersWorkshop": "Permette la combinazione di alcuni accessori", + "CloudinaBalloon": "Per eseguire un salto doppio\nAumenta l'altezza del salto", + "AdamantiteHeadgear": "Aumenta il mana massimo di 80\nProbabilità di colpo critico e danno magico aumentate dell'11%", + "AdamantiteHelmet": "Possibilità di colpo critico nel corpo a corpo aumentata del 7%\nDanno da mischia aumentato del 14%", + "AdamantiteMask": "Danno boomerang aumentato del 14%\nPossibilità di colpo critico a distanza aumentata dell'8%", + "AdamantiteBreastplate": "Danno aumentato del 6%", + "AdamantiteLeggings": "Possibilità di colpo critico aumentata del 4%\nVelocità di movimento aumentata del 5%", + "SpectreBoots": "Consente di volare\nColui che li indossa può correre velocissimo", + "FruitJuice": "{$CommonItemTooltip.MinorStats}", + "HolyWater": "Sparge consacrazione su alcuni blocchi", + "CrimsonFishingCrateHard": "{$ItemTooltip.CrimsonFishingCrate}", + "FairyBell": "Evoca una fata magica", + "SuspiciousLookingEye": "Evoca l'Occhio di Cthulhu", + "ClockworkAssaultRifle": "Tre raffiche\nSolo il primo colpo consuma munizioni", + "MoonCharm": "Di notte trasforma il portatore in un lupo mannaro", + "KiteCrawltipede": "{$CommonItemTooltip.Kite}", + "SorcererEmblem": "Danno magico aumentato del 15%", + "BandofRegeneration": "Rigenera la vita lentamente", + "WarriorEmblem": "Danno da mischia aumentato del 15%", + "RangerEmblem": "Danno boomerang aumentato del 15%", + "DemonWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "AngelWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "RainbowRod": "Genera un arcobaleno guidato", + "IceRod": "Evoca un blocco di ghiaccio", + "NeptunesShell": "Trasforma il portatore in un tritone quando entra in acqua", + "MagicMirror": "Guarda nello specchio per tornare a casa", + "Flamethrower": "Utilizza la gelatina come munizione", + "Wrench": "Posiziona cavi rossi", + "WireCutter": "Rimuove i cavi", + "CrystalBullet": "Crea svariati frammenti di cristallo all'impatto", + "HolyArrow": "Evoca stelle cadenti all'impatto", + "MagicDagger": "Un pugnale magico che ritorna", + "CrystalStorm": "Evoca veloci frammenti di cristallo infuocati", + "CursedFlames": "Evoca sfere di fuoco profane", + "SoulofLight": "L'essenza delle creature della luce", + "SoulofNight": "L'essenza delle creature del buio", + "CursedFlame": "Neanche l'acqua può spegnere la fiamma", + "CursedTorch": "Si può mettere in acqua", + "AdamantiteForge": "Per fondere adamantio e titanio", + "MythrilAnvil": "Per ricavare oggetti da barre di mitrilio, oricalco, adamantio e titanio", + "UnicornHorn": "Appuntito e magico!", + "CrownosWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "LightShard": "A volte portato dalle creature nei deserti di luce", + "RedPressurePlate": "Si attiva quando calpestata", + "CloudinaBottle": "Per eseguire un salto doppio", + "SpellTome": "Può essere incantato", + "PrismaticPunch": "{$CommonItemTooltip.MediumStats}", + "Megashark": "50% di probabilità di non consumare munizioni\nFratello maggiore del Minishark", + "Shotgun": "Spara una rosa di proiettili", + "FrozenCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "Mango": "{$CommonItemTooltip.MinorStats}", + "HermesBoots": "Colui che li indossa può correre velocissimo", + "GreenPressurePlate": "Si attiva quando calpestata", + "GrayPressurePlate": "Si attiva quando un giocatore ci passa sopra", + "BrownPressurePlate": "Si attiva quando un giocatore ci passa sopra", + "MechanicalEye": "Evoca i Gemelli", + "SoulofFright": "L'essenza del terrore puro", + "SoulofMight": "L'essenza del Distruttore", + "SoulofSight": "L'essenza degli osservatori onniscienti", + "HallowedPlateMail": "Possibilità di colpo critico aumentata del 7%", + "HallowedGreaves": "Danno aumentato del 7%\nVelocità di movimento aumentata dell'8%", + "HallowedHelmet": "Danno boomerang aumentato del 15%\nPossibilità di colpo critico a distanza aumentata dell'8%", + "CrossNecklace": "Aumenta la durata dell'invincibilità dopo aver subito danni", + "ManaFlower": "Consumo mana ridotto dell'8%\nUtilizza le pozioni mana automaticamente in caso di bisogno", + "Elderberry": "{$CommonItemTooltip.MinorStats}", + "MechanicalSkull": "Evoca lo Skeletron primario", + "HallowedHeadgear": "Aumenta il mana massimo di 100\nProbabilità di colpo critico e danno magico aumentate del 12%", + "KiteYellow": "{$CommonItemTooltip.Kite}", + "DemoniteOre": "Pulsa di energia oscura", + "SlimeCrown": "Evoca lo Slime re", + "LightDisc": "Si accumula (fino a 5)", + "DemoniteBar": "Pulsa di energia oscura", + "SoulofFlight": "L'essenza delle potenti creature volanti", + "MusicBox": "Può registrare canzoni", + "Drax": "Da non confondere con il segapiccone", + "Explosives": "Esplode quando si attiva", + "InletPump": "Invia acqua alle pompe esterne", + "OutletPump": "Riceve acqua dalle pompe interne", + "Timer1Second": "Si attiva ogni secondo", + "Timer3Second": "Si attiva ogni 3 secondi", + "Timer5Second": "Si attiva ogni 5 secondi", + "BluePresent": "{$CommonItemTooltip.RightClickToOpen}", + "GreenPresent": "{$CommonItemTooltip.RightClickToOpen}", + "YellowPresent": "{$CommonItemTooltip.RightClickToOpen}", + "SnowGlobe": "Evoca la Legione gelo", + "Carrot": "Evoca un coniglio", + "Vilethorn": "Evoca una spina vile", + "Starfury": "Fa piovere le stelle dal cielo\nForgiato con la furia del cielo", + "PurificationPowder": "Elimina il male", + "SmoothieofDarkness": "{$CommonItemTooltip.MinorStats}", + "RedsHelmet": "{$CommonItemTooltip.DevItem}", + "RedsBreastplate": "{$CommonItemTooltip.DevItem}", + "RedsLeggings": "{$CommonItemTooltip.DevItem}", + "Fish": "Evoca un pinguino piccolo", + "BloodOrange": "{$CommonItemTooltip.MinorStats}", + "Frostbrand": "Spara un dardo di ghiaccio", + "RedPotion": "Solo per chi ne è degno", + "RottenChunk": "Gustoso!", + "UnholyTrident": "Evoca il tridente del diavolo", + "FrostHelmet": "Danno da mischia e danno a distanza aumentano del 16%", + "FrostBreastplate": "Possibilità di colpo critico e danno magico aumentate dell'11%", + "FrostLeggings": "Velocità di movimento aumentata dell'8%\nVelocità d'attacco in mischia aumentata del 7%", + "WormFood": "Evoca il mangiatore di mondi", + "TinWatch": "Indica il tempo", + "TungstenWatch": "Indica il tempo", + "PlatinumWatch": "Indica il tempo", + "LeadAnvil": "Serve a creare oggetti dalle barre di metallo", + "BeamSword": "Spara un raggio di luce", + "IceBlade": "Spara un dardo di ghiaccio", + "IceBow": "Spara frecce di gelo", + "FrostStaff": "Spara una corrente di gelo", + "BlueCultistCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistDevote}", + "ButterflyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "FallenStar": "Sparisce dopo l'alba", + "Seaweed": "Evoca una tartaruga", + "FairyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "Clentaminator": "Quando si spruzza crea e distrugge biomi\nUtilizza le soluzioni colorate", + "GreenSolution": "Si usa con il Puricontaminatore\nDiffonde la purezza", + "BlueSolution": "Si usa con il Puricontaminatore\nDiffonde la sacralità", + "PurpleSolution": "Si usa con il Puricontaminatore\nDiffonde la corruzione", + "DarkBlueSolution": "Si usa con il Puricontaminatore\nDiffonde funghi luminosi", + "RedSolution": "Si usa con il Puricontaminatore\nDiffonde il cremisi", + "HarpyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BoneWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "Hammush": "Abbastanza forte per distruggere gli altari dei demoni", + "NettleBurst": "Evoca una lancia di spine", + "CrimsonHelmet": "Danno aumentato del 2%", + "CrimsonScalemail": "Danno aumentato del 2%", + "CrimsonGreaves": "Danno aumentato del 2%", + "DeathbringerPickaxe": "In grado di estrarre la pietra infernale", + "Torch": "Fornisce luce", + "FlameWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "FrozenWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "GhostWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "LivingWoodWand": "Piazza legno vivo", + "GrapplingHook": "Vieni qui!", + "Actuator": "Per visualizzare/nascondere i blocchi", + "Chain": "Per arrampicarsi", + "BlueWrench": "Posiziona cavi blu", + "GreenWrench": "Posiziona cavi verdi", + "BluePressurePlate": "Si attiva quando un giocatore ci passa sopra", + "YellowPressurePlate": "Si attiva quando qualsiasi creatura (non il giocatore) ci passa sopra", + "FrozenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LuckyCoin": "Colpendo i nemici a volte si guadagneranno più monete", + "UnicornonaStick": "Un momento magico!", + "SandstorminaBottle": "Consente di compiere un salto doppio superiore", + "CanOfWorms": "{$CommonItemTooltip.RightClickToOpen}", + "MoonShell": "Trasforma il portatore in un lupo mannaro di notte e in un tritone quando entra in acqua", + "StarVeil": "Causa la caduta delle stelle e aumenta la durata dell'invincibilità dopo aver subito danni", + "BloodyMoscato": "{$CommonItemTooltip.MinorStats}", + "MiningHelmet": "Fa luce quando si indossa", + "AdhesiveBandage": "Immune dal sanguinamento", + "ArmorPolish": "Immune da armatura rotta", + "Bezoar": "Immune dal veleno", + "Blindfold": "Immune dall'oscurità", + "FastClock": "Immune dal rallentamento", + "Megaphone": "Immune dal silenzio", + "Nazar": "Immune dalla maledizione", + "Vitamins": "Immune dalla debolezza", + "TrifoldMap": "Immune dalla confusione", + "Lemon": "{$CommonItemTooltip.MinorStats}", + "TropicalSmoothie": "{$CommonItemTooltip.MinorStats}", + "PinaColada": "{$CommonItemTooltip.MinorStats}", + "PeachSangria": "{$CommonItemTooltip.MinorStats}", + "ArmorBracing": "Immune da debolezza e armatura rotta", + "MedicatedBandage": "Immune da veleno e sanguinamento", + "ThePlan": "Immune da rallentamento e confusione", + "CountercurseMantra": "Immune da silenzio e maledizione", + "CoinGun": "Utilizza le monete come munizioni\nLe monete di valore superiore infliggono più danni", + "LavaCharm": "Fornisce 7 secondi di immunità dalla lava", + "BananaDaiquiri": "{$CommonItemTooltip.MinorStats}", + "Pineapple": "{$CommonItemTooltip.MinorStats}", + "BoneWand": "Posiziona osso", + "LeafWand": "Posiziona foglie", + "FlyingCarpet": "Il portatore può fluttuare per qualche secondo", + "AvengerEmblem": "Danno aumentato del 12%", + "Lemonade": "{$CommonItemTooltip.MinorStats}", + "LandMine": "Esplode quando si calpesta", + "Starfruit": "{$CommonItemTooltip.MediumStats}", + "Umbrella": "Tenendolo in mano scenderai più lentamente", + "ChlorophyteOre": "Reagisce alla luce", + "GrapeJuice": "{$CommonItemTooltip.MajorStats}", + "IceSkates": "Maggiore mobilità sul ghiaccio\nIl ghiaccio non si rompe se ci cadi sopra", + "SnowballLauncher": "Lancia rapidamente palle di neve", + "ClimbingClaws": "Per scivolare sui muri\nMigliora l'abilità se si abbina ai ramponi", + "AncientShadowHelmet": "Velocità nel corpo a corpo aumentata del 7%", + "AncientShadowScalemail": "Velocità nel corpo a corpo aumentata del 7%", + "AncientShadowGreaves": "Velocità nel corpo a corpo aumentata del 7%", + "AncientNecroHelmet": "Danno boomerang aumentato del 5%", + "AncientCobaltHelmet": "Aumenta il mana massimo di 40\nAumenta la possibilità di colpo critico magico del 4%", + "AncientCobaltBreastplate": "Aumenta il mana massimo di 20\nAumenta la possibilità di colpo critico magico del 4%", + "AncientCobaltLeggings": "Aumenta il mana massimo di 20\nAumenta la possibilità di colpo critico magico del 4%", + "BlackBelt": "Offre una probabilità di schivare gli attacchi", + "Boomstick": "Spara una rosa di proiettili", + "Rope": "Per arrampicarsi", + "Campfire": "La rigenerazione vita aumenta vicino a un fuoco di bivacco", + "Marshmallow": "Mettilo su uno spiedino e abbrustoliscilo sulla fiamma", + "MarshmallowonaStick": "Da abbrustolire sulla fiamma!", + "Coconut": "{$CommonItemTooltip.MinorStats}", + "ShoeSpikes": "Per scivolare sui muri\nMigliora l'abilità se si abbina agli artigli da scalata", + "TigerClimbingGear": "Per arrampicarsi sui muri", + "Tabi": "Per scattare\nPremi due volte in una direzione", + "Minishark": "33% di probabilità di non consumare munizioni\nMezzo squalo, mezza arma, assolutamente terrificante.", + "ManaRegenerationBand": "Aumenta il mana massimo di 20\nAumenta la velocità di rigenerazione del mana", + "SandstorminaBalloon": "Per eseguire un salto doppio\nAumenta l'altezza del salto", + "MasterNinjaGear": "Per arrampicarsi sui muri e scattare\nOffre una probabilità di schivare gli attacchi", + "RopeCoil": "Lanciala per ottenere una corda su cui arrampicarsi", + "Blowgun": "Consente di raccogliere semi come munizioni", + "BlizzardinaBottle": "Per eseguire un salto doppio", + "EnchantedSword": "Spara un raggio incantato con la spada", + "PickaxeAxe": "Da non confondere con il perforello", + "EatersBone": "Evoca un mangiatore di anime piccolo", + "BlendOMatic": "Si usa per ricavare oggetti", + "MeatGrinder": "Si usa per ricavare oggetti", + "Rambutan": "{$CommonItemTooltip.MinorStats}", + "Solidifier": "Si usa per ricavare oggetti", + "ActuationAccessory": "Colloca automaticamente gli azionatori su oggetti piazzati", + "ActuationRod": "Attiva gli azionatori", + "AlchemyTable": "33% di probabilità di non consumare ingredienti per realizzare pozioni", + "AncientBattleArmorHat": "Danno seguaci e magico aumentato del 15%", + "AppleJuice": "{$CommonItemTooltip.MinorStats}", + "WoodenCrateHard": "{$ItemTooltip.WoodenCrate}", + "AncientHorn": "Evoca un basilisco cavalcabile", + "BloodNautilusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodNautilus}", + "GoblinSharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinShark}", + "AviatorSunglasses": "Esprimi la tua natura da wingman\nFantastico per impersonare gli streamer!", + "KitePigron": "{$CommonItemTooltip.Kite}", + "BalloonHorseshoeFart": "Per eseguire un salto doppio\nAumenta l'altezza del salto e annulla i danni da caduta", + "BalloonHorseshoeHoney": "Rilascia api quando si danneggia\nAumenta l'altezza del salto e annulla i danni da caduta", + "BalloonHorseshoeSharkron": "Per eseguire un salto doppio\nAumenta l'altezza del salto e annulla i danni da caduta", + "BalloonPufferfish": "Aumenta l'altezza del salto", + "BeesKnees": "Le frecce di legno si trasformano in una colonna di api", + "BejeweledValkyrieBody": "{$CommonItemTooltip.DevItem}\nAdorno ed elegante per librarsi tra i cieli tempestosi", + "BejeweledValkyrieHead": "{$CommonItemTooltip.DevItem}\nDiventa il vento e cavalca il fulmine.", + "BloodEelBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodEelHead}", + "BewitchingTable": " per avere più seguaci", + "Bladetongue": "Sputa uno spruzzo di icore al contatto", + "BlessedApple": "Evoca un unicorno cavalcabile", + "CorruptFishingCrateHard": "{$ItemTooltip.CorruptFishingCrate}", + "JungleFishingCrateHard": "{$ItemTooltip.JungleFishingCrate}", + "BoneCampfire": "La rigenerazione vita aumenta vicino a un fuoco di bivacco", + "BoneRattle": "Evoca un mostro bambino", + "BoneTorch": "Emette una luce mortale", + "BoosterTrack": "Martella per cambiare direzione", + "GolfClubPutter": "{$CommonItemTooltip.GolfPutter}", + "HallowedFishingCrateHard": "{$ItemTooltip.HallowedFishingCrate}", + "KiteRedAndYellow": "{$CommonItemTooltip.Kite}", + "BouncyGlowstick": "Funziona quando si bagna", + "BouncyGrenade": "Una piccola esplosione che non distruggerà mattonelle\nMolto saltellante", + "WillsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "BrainScrambler": "Evoca uno Scutlix cavalcabile", + "BubbleGun": "Spara rapidamente bolle potenti", + "ButchersChainsaw": "I nemici colpiti emettono scintille", + "BloodSquidBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodSquid}", + "CelestialSigil": "Evoca il fato imminente", + "CellPhone": "Mostra tutto\nTi consente di tornare a casa quando vuoi", + "ClingerStaff": "Evoca un muro di fiamme maledette", + "CogWall": "Produttività aumentata del 200%", + "CoinRing": "Aumenta la portata di raccolta delle monete\nColpendo i nemici a volte si guadagneranno più monete", + "CompanionCube": "Sensibile alla lava!", + "CordageGuide": "Consente la raccolta di viticcio dalle viti", + "CorruptFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "CosmicCarKey": "Evoca un UFO cavalcabile", + "CrimsonFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "CrimsonHeart": "Evoca un cuore per illuminare", + "CrystalSerpent": "Spara una carica di cristallo esplosiva", + "CrystalVileShard": "Evoca uno spuntone di cristallo enorme", + "CursedCampfire": "La rigenerazione vita aumenta vicino a un fuoco di bivacco", + "DaedalusStormbow": "Spara frecce dal cielo", + "DayBreak": "Squarcia i nemici con una lancia della luce!", + "DemonCampfire": "La rigenerazione vita aumenta vicino a un fuoco di bivacco", + "DemonHeart": "Aumenta in modo permanente il numero di slot accessori", + "Detonator": "Fegato e violenza!", + "DevDye": "{$CommonItemTooltip.DevItem}", + "DjinnsCurse": "Sostituisce i piedi e consente la caduta lenta", + "DPSMeter": "Mostra i danni al secondo", + "DrillContainmentUnit": "Evoca una perforatrice cavalcabile", + "DungeonFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "EoCShield": "Consente al giocatore di scattare verso il nemico\nPremi due volte in una direzione", + "FishermansGuide": "Mostra informazioni di pesca", + "FishFinder": "Mostra il clima, le fasi lunari e informazioni di pesca", + "FishronWings": "{$CommonItemTooltip.FlightAndSlowfall}\nConsente di spostarsi velocemente nell'acqua", + "Flairon": "Emette bolle radiocomandate", + "FleshKnuckles": "Aumenta la probabilità che i nemici ti prendano come bersaglio", + "FloatingIslandFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "FlowerBoots": "I fiori crescono quando passi sull'erba", + "FlyingKnife": "Lancia un coltello che può essere controllato in volo", + "GolfBallDyedBrown": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedBlue": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedBlack": "{$CommonItemTooltip.GolfBall}", + "FragmentNebula": "Il potere di una galassia risiede in questo frammento", + "FragmentSolar": "La furia dell'universo risiede in questo frammento", + "FragmentStardust": "Le particelle estasianti ruotano intorno a questo frammento", + "FragmentVortex": "Energie vorticose sono emanate da questo frammento", + "FrozenCampfire": "La rigenerazione vita aumenta vicino a un fuoco di bivacco", + "FuzzyCarrot": "Evoca un coniglio cavalcabile", + "GemLockAmber": " per collocare o rimuovere parti di ambra grandi", + "GemLockAmethyst": " per collocare o rimuovere parti di ametista grandi", + "GemLockDiamond": " per collocare o rimuovere parti di diamante grandi", + "GemLockEmerald": " per collocare o rimuovere parti di smeraldo grandi", + "GemLockRuby": " per collocare o rimuovere parti di rubino grandi", + "GemLockSapphire": " per collocare o rimuovere parti di zaffiro grandi", + "GemLockTopaz": " per collocare o rimuovere parti di topazio grandi", + "GoblinTech": "Mostra velocità di movimento, danni al secondo e minerale prezioso", + "GoldPickaxe": "Può estrarre meteorite", + "GoldRing": "Aumenta la portata di raccolta delle monete", + "Plum": "{$CommonItemTooltip.MinorStats}", + "KiteBunny": "{$CommonItemTooltip.Kite}", + "HallowedFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "HardySaddle": "Evoca una tartaruga cavalcabile", + "HellwingBow": "Frecce di legno si trasformano in pipistrelli infuocati", + "HerbBag": "{$CommonItemTooltip.RightClickToOpen}", + "HiveBackpack": "Aumenta la forza delle api amichevoli", + "HoneyedGoggles": "Evoca un'ape cavalcabile", + "IceMirror": "Guarda nello specchio per tornare a casa", + "IchorCampfire": "La rigenerazione vita aumenta vicino a un fuoco di bivacco", + "EyeballFlyingFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EyeballFlyingFish}", + "JungleFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LargeAmber": "Per la modalità Rubagemma; appare quando muori", + "LaserRuler": "Crea delle linee sullo schermo per posizionare i blocchi", + "LastPrism": "Spara un arcobaleno per disintegrare le forme di vita", + "LifeformAnalyzer": "Mostra il nome di creature rare attorno a te", + "LightKey": "Contiene l'essenza di molte anime", + "LivingMahoganyLeafWand": "Colloca foglie di mogano scuro", + "LivingMahoganyWand": "Colloca mogano scuro vivente", + "LockBox": "{$CommonItemTooltip.RightClickToOpen}\nRichiede una chiave d'oro", + "LogicGateLamp_Faulty": "Si piazza sulle lampade dei portali logici per rendere casuale la loro attivazione", + "LogicGateLamp_Off": "Si piazza sui portali logici per i controlli", + "LogicGateLamp_On": "Si piazza sui portali logici per i controlli", + "LogicGate_NOR": "Rileva lampade sulle porte logiche\nSi attiva quando non è accesa alcuna lampada, altrimenti si ferma", + "LogicGate_NXOR": "Rileva lampade sulle porte logiche\nSi attiva quando il totale di lampade accese non è pari a uno, altrimenti si ferma\nSpesso viene chiamato NXOR", + "LogicGate_OR": "Rileva lampade sulle porte logiche\nSi attiva quando è accesa qualsiasi lampada, altrimenti si ferma", + "LogicGate_XOR": "Rileva lampade sulle porte logiche\nSi attiva quando è accesa una sola lampada, altrimenti si ferma", + "LogicSensor_Above": "Si attiva quando i giocatori ci passano sopra, altrimenti non funziona", + "LogicSensor_Honey": "Si attiva quando c'è sopra il miele, altrimenti non funziona", + "LogicSensor_Lava": "Si attiva quando c'è sopra la lava, altrimenti non funziona", + "LogicSensor_Liquid": "Si attiva quando c'è sopra il liquido, altrimenti non funziona", + "LogicSensor_Moon": "Si attiva quando inizia la notte", + "LogicSensor_Sun": "Si attiva quando inizia il giorno", + "LogicSensor_Water": "Si attiva quando è occupato dall'acqua, altrimenti non è attivo", + "LokisDye": "{$CommonItemTooltip.DevItem}", + "LokisHelm": "{$CommonItemTooltip.DevItem}\nIl disordine deriva dall'ordine, la paura dal coraggio e la debolezza dalla forza", + "LokisPants": "{$CommonItemTooltip.DevItem}\nLe ruote della giustizia si muovono piano ma macinano bene.", + "LokisShirt": "{$CommonItemTooltip.DevItem}\nConosci te stesso e conosci il nemico. Migliaia di battaglie, migliaia di vittorie...", + "ZombieMermanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieMerman}", + "LunarBar": "Vibra di energia celestiale luminosa", + "LunarCraftingStation": "Serve a creare oggetti da frammenti lunari e luminite", + "LunarFlareBook": "Fai piovere razzi lunari", + "LunarHook": "Vuoi la luna? Agganciala e tira!", + "LunarOre": "Un sassolino dei cieli", + "MagicLantern": "Evoca una lanterna magica che rivela i tesori nelle vicinanze", + "MechanicalLens": "Migliora la visione dei cavi", + "MetalDetector": "Mostra il minerale più prezioso vicino a te", + "MeteorStaff": "Fa piovere meteoriti", + "Minecart": "Corriamo sui binari", + "MinecartTrack": "Martella l'ultimo per cambiare lo stile respingente\nMartella le intersezioni per cambiare direzione", + "MolotovCocktail": "Una piccola esplosione che incendia i nemici\nIncendia l'area vicina per un certo tempo", + "MoneyTrough": "Evoca un salvadanaio volante per depositare i tuoi oggetti", + "MoonlordArrow": "Spara alla velocità del suono!", + "MoonlordBullet": "Allineali e abbattili...", + "Apricot": "{$CommonItemTooltip.MinorStats}", + "MothronWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "MulticolorWrench": " mentre tieni premuto per modificare le impostazioni dei cavi", + "NebulaArcanum": "Evoca grandi quantità di energia astrale per inseguire i nemici", + "NebulaBlaze": "Dalla Cintura di Orione al palmo della tua mano", + "NebulaBreastplate": "Probabilità di colpo critico e danno magico aumentate del 9%", + "NebulaHelmet": "Aumenta il mana massimo di 60 e riduce il consumo di mana del 15%\nProbabilità di colpo critico e danno magico aumentate del 7%", + "NebulaLeggings": "Danno magico aumentato del 10%\nVelocità di movimento aumentata del 10%", + "NebulaMonolith": "Usa una piccola quantità di potere dalla torre della nebulosa", + "NightKey": "Contiene l'essenza di molte anime", + "NightVisionHelmet": "Migliora la visione", + "GolfBallDyedLimeGreen": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedGreen": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedCyan": "{$CommonItemTooltip.GolfBall}", + "PartyBundleOfBalloonTile": "Legati per il piacere di tutti", + "PartyGirlGrenade": "Una piccola esplosione che non distruggerà mattonelle", + "PartyMonolith": "I palloncini scenderanno dal cielo", + "PartyPresent": "Chissà cosa contiene...", + "PDA": "Mostra tutto", + "PeaceCandle": "Rende meno ostili le creature circostanti", + "PedguinHat": "Diventa Pedguin\nFantastico per impersonare gli streamer!", + "PedguinPants": "Diventa Pedguin\nFantastico per impersonare gli streamer!", + "PedguinShirt": "Diventa Pedguin\nFantastico per impersonare gli streamer!", + "Phantasm": "66% di probabilità di non consumare munizioni", + "Pigronata": "Fracassala!\nPotrebbe contenere una sorpresa!", + "PinkGel": "Saltellante e carino!", + "PinkSlimeBlock": "Molto saltellante", + "PirateStaff": "Chiama i pirati a combattere per te", + "PixelBox": "Separa i percorsi dei cavi\nLuci spente dai segnali orizzontali\nLuci accese dai segnali incrociati", + "PlatinumPickaxe": "Può estrarre meteorite", + "PocketMirror": "Immune dalla pietrificazione", + "PressureTrack": "Da non usare sui pendii", + "ProjectilePressurePad": "Si attiva quando un proiettile lo tocca", + "PsychoKnife": "Ti consente di passare in modalità furtiva", + "PutridScent": "Riduce la probabilità che i nemici ti prendano come bersaglio\nProbabilità di colpo critico e danno aumentate del 5%", + "GolfBallDyedYellow": "{$CommonItemTooltip.GolfBall}", + "Radar": "Rileva i nemici attorno a te", + "RainbowCampfire": "La rigenerazione vita aumenta vicino a un fuoco di bivacco", + "GolfBallDyedViolet": "{$CommonItemTooltip.GolfBall}", + "RazorbladeTyphoon": "Lancia ruote taglienti rapidissime", + "RedsYoyo": "{$CommonItemTooltip.DevItem}", + "REK": "Mostra il numero di mostri, il numero di uccisioni e le creature rare", + "RoyalGel": "Gli slime diventano amichevoli", + "SailfishBoots": "Colui che li indossa può correre velocissimo", + "SandFallBlock": "Sabbia cadente che puoi osservare senza pericolo", + "SandFallWall": "Sabbia cadente che puoi osservare senza pericolo", + "ScalyTruffle": "Evoca un maialdrago cavalcabile", + "Sextant": "Mostra la fase lunare", + "ShadowFlameBow": "Spara frecce fiamma d'ombra", + "ShadowFlameHexDoll": "Evoca tentacoli fiamma d'ombra per colpire il nemico", + "ShadowFlameKnife": "Infligge fiamma d'ombra quando va a segno", + "SharkronBalloon": "Aumenta l'altezza del salto\nPer eseguire un salto doppio", + "SharkToothNecklace": "Aumenta la penetrazione armatura di 5", + "SharpeningStation": "Aumenta la penetrazione armatura delle armi da mischia", + "ShinyStone": "Aumenta notevolmente la rigenerazione vita quando non ti muovi", + "ShrimpyTruffle": "Attira una creatura leggendaria che prospera nell'acqua e nel combattimento", + "SillyBalloonGreen": "Profuma di menta e allegria", + "SillyBalloonGreenWall": "Profuma di menta e allegria", + "SillyBalloonMachine": "Non smette mai di festeggiare!", + "SillyBalloonPink": "Profuma di gomma da masticare e felicità", + "SillyBalloonPinkWall": "Profuma di gomma da masticare e felicità", + "SillyBalloonPurple": "Profuma di lavanda ed entusiasmo", + "SillyBalloonPurpleWall": "Profuma di lavanda ed entusiasmo", + "SillyStreamerBlue": "Stranamente così robusto da potersi arrampicare!", + "SillyStreamerGreen": "Stranamente così robusto da potersi arrampicare!", + "SillyStreamerPink": "Stranamente così robusto da potersi arrampicare!", + "SkiphsHelm": "{$CommonItemTooltip.DevItem}", + "SkiphsPants": "{$CommonItemTooltip.DevItem}", + "SkiphsShirt": "{$CommonItemTooltip.DevItem}", + "TheBrideBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TheBride}", + "DTownsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "SlimeGun": "Spruzza uno schizzo di slime innocuo", + "SlimySaddle": "Evoca uno slime cavalcabile", + "KiteKoi": "{$CommonItemTooltip.Kite}", + "SnowFallBlock": "Molto meglio di una sfera di neve", + "SnowFallWall": "Molto meglio di una sfera di neve", + "SolarEruption": "Colpisce con la furia del sole", + "RedsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "Hoverboard": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "CenxsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "SolarMonolith": "Usa una piccola quantità di potere dalla torre solare", + "SolarTablet": "Evoca l'eclissi", + "SoulDrain": "Sottrae vita ai nemici", + "SpelunkerGlowstick": "Rivela il tesoro nei paraggi", + "SpiderStaff": "Chiama i ragni a combattere per te", + "SporeSac": "Evoca spore nel tempo per infliggere danni ai nemici", + "GolfClubChlorophyteDriver": "{$CommonItemTooltip.GolfDriver}", + "StardustCellStaff": "Evoca una cellula di polvere di stella che combatte per te\nColtiva la più bella infezione cellulare", + "StardustDragonStaff": "Evoca un drago di polvere di stella che combatte per te\nChi ha bisogno di un'orda di seguaci quando ha un drago gigante?", + "GolfClubDiamondWedge": "{$CommonItemTooltip.GolfWedge}", + "GolfClubShroomitePutter": "{$CommonItemTooltip.GolfPutter}", + "StardustMonolith": "Usa una piccola quantità di potere dalla torre di polvere di stella", + "FloatingIslandFishingCrateHard": "{$ItemTooltip.FloatingIslandFishingCrate}", + "StickyGrenade": "Una piccola esplosione che non distruggerà mattonelle\nLanciare potrebbe essere difficile.", + "Stopwatch": "Mostra la velocità di movimento del giocatore", + "StrangeBrew": "Brutto e puzzolente", + "StrangePlant1": "Si può scambiare con tinture rare", + "StrangePlant2": "Si può scambiare con tinture rare", + "StrangePlant3": "Si può scambiare con tinture rare", + "StrangePlant4": "Si può scambiare con tinture rare", + "SummonerEmblem": "Danno di evocazione aumentato del 15%", + "Sundial": "Consente di mandare avanti il tempo una volta a settimana", + "SuperAbsorbantSponge": "Può assorbire una quantità di acqua infinita", + "SuspiciousLookingTentacle": "Evoca un occhio dallo sguardo sospetto per fare luce\nSo che cosa stai pensando...", + "TallyCounter": "Indica quanti mostri sono stati uccisi", + "TartarSauce": "Evoca un mini minotauro", + "TempestStaff": "Chiama il tornado di squali a combattere per te", + "TheBrideDress": "Matrimonio...", + "TheBrideHat": "Vero amore...", + "Toxikarp": "Sputa bolle tossiche", + "Tsunami": "Scocca 5 frecce contemporaneamente", + "TsunamiInABottle": "Per eseguire un salto doppio", + "TungstenPickaxe": "Può estrarre meteorite", + "UltraBrightCampfire": "La rigenerazione vita aumenta vicino a un fuoco di bivacco", + "ValkyrieYoyo": "{$CommonItemTooltip.DevItem}", + "BlackCurrant": "{$CommonItemTooltip.MinorStats}", + "VineRopeCoil": "Si lancia per ottenere una corda di viticcio su cui arrampicarsi", + "VortexBeater": "66% di probabilità di non consumare munizioni\nUn misto catastrofico di bang bang e bum bum!", + "VortexBreastplate": "Danno a distanza e probabilità di colpo critico aumentano del 12%\n25% di probabilità di non consumare munizioni", + "VortexHelmet": "Danno boomerang aumentato del 16%\nPossibilità di colpo critico a distanza aumentata del 7%", + "VortexLeggings": "Danno a distanza e probabilità di colpo critico aumentano dell'8%\nVelocità di movimento aumentata del 10%", + "VortexMonolith": "Usa una piccola quantità di potere dalla torre del vortice", + "WandofSparking": "Spara una piccola scintilla", + "WeaponRack": " per collocare un oggetto sulla rastrelliera per armi", + "WeatherRadio": "Mostra il clima", + "WeightedPressurePlateCyan": "Si attiva quando un giocatore ci passa sopra", + "WeightedPressurePlateOrange": "Si attiva quando un giocatore ci passa sopra", + "WeightedPressurePlatePink": "Si attiva quando un giocatore ci passa sopra", + "WeightedPressurePlatePurple": "Si attiva quando un giocatore ci passa sopra", + "Peach": "{$CommonItemTooltip.MinorStats}", + "WingsSolar": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsStardust": "{$CommonItemTooltip.FlightAndSlowfall}", + "GolfClubTitaniumIron": "{$CommonItemTooltip.GolfIron}", + "WireBulb": "Accende le lampadine per ogni cavo colorato", + "WireKite": "Consente il massimo controllo dei cavi\n mentre tieni premuto per modificare le impostazioni dei cavi", + "WirePipe": "Separa i percorsi dei cavi\nSi può anche martellare!", + "WormholePotion": "Ti teletrasporta verso un compagno di squadra\nFai clic sulla loro testa sulla mappa a schermo intero", + "WormScarf": "Riduce il danno subito del 17%", + "XenoStaff": "Evoca un UFO che combatte per te", + "YellowWrench": "Posiziona cavi gialli", + "Yoraiz0rDarkness": "{$CommonItemTooltip.DevItem}\nSe appare probabilmente ti conviene scappare...", + "Yoraiz0rHead": "{$CommonItemTooltip.DevItem}", + "Yoraiz0rPants": "{$CommonItemTooltip.DevItem}", + "Yoraiz0rShirt": "{$CommonItemTooltip.DevItem}", + "GolfClubPearlwoodDriver": "{$CommonItemTooltip.GolfDriver}", + "YoyoBag": "Rende l'utente un esperto di yo-yo", + "YoYoGlove": "Consente di usare due yo-yo contemporaneamente", + "BloodMoonRising": "{$PaintingArtist.Garner}", + "TheHangedMan": "{$PaintingArtist.Garner}", + "GloryoftheFire": "{$PaintingArtist.Garner}", + "BoneWarp": "{$PaintingArtist.Garner}", + "SkellingtonJSkellingsworth": "{$PaintingArtist.Garner}", + "TheCursedMan": "{$PaintingArtist.Garner}", + "TheEyeSeestheEnd": "{$PaintingArtist.Garner}", + "SomethingEvilisWatchingYou": "{$PaintingArtist.Moosdijk}", + "TheTwinsHaveAwoken": "{$PaintingArtist.Moosdijk}", + "TheScreamer": "{$PaintingArtist.Crowno}", + "GoblinsPlayingPoker": "{$PaintingArtist.Garner}", + "Dryadisque": "{$PaintingArtist.Garner}", + "Sunflowers": "{$PaintingArtist.Garner}", + "TerrarianGothic": "{$PaintingArtist.Garner}", + "Impact": "{$PaintingArtist.Wright}", + "PoweredbyBirds": "{$PaintingArtist.Ness}", + "TheDestroyer": "{$PaintingArtist.Moosdijk}", + "ThePersistencyofEyes": "{$PaintingArtist.Crowno}", + "UnicornCrossingtheHallows": "{$PaintingArtist.Crowno}", + "GreatWave": "{$PaintingArtist.Crowno}", + "StarryNight": "{$PaintingArtist.Crowno}", + "GuidePicasso": "{$PaintingArtist.Crowno}", + "TheGuardiansGaze": "{$PaintingArtist.Kolf}", + "FatherofSomeone": "{$PaintingArtist.Crowno}", + "NurseLisa": "{$PaintingArtist.Garner}", + "DarkSoulReaper": "{$PaintingArtist.Myhre}", + "Land": "{$PaintingArtist.Myhre}", + "TrappedGhost": "{$PaintingArtist.Myhre}", + "DemonsEye": "{$PaintingArtist.Myhre}", + "FindingGold": "{$PaintingArtist.Myhre}", + "FirstEncounter": "{$PaintingArtist.Crowno}", + "GoodMorning": "{$PaintingArtist.Crowno}", + "UndergroundReward": "{$PaintingArtist.Crowno}", + "ThroughtheWindow": "{$PaintingArtist.Crowno}", + "PlaceAbovetheClouds": "{$PaintingArtist.Crowno}", + "DoNotStepontheGrass": "{$PaintingArtist.Crowno}", + "ColdWatersintheWhiteLand": "{$PaintingArtist.Crowno}", + "LightlessChasms": "{$PaintingArtist.Crowno}", + "TheLandofDeceivingLooks": "{$PaintingArtist.Crowno}", + "Daylight": "{$PaintingArtist.Crowno}", + "SecretoftheSands": "{$PaintingArtist.Crowno}", + "DeadlandComesAlive": "{$PaintingArtist.Crowno}", + "EvilPresence": "{$PaintingArtist.Crowno}", + "SkyGuardian": "{$PaintingArtist.Crowno}", + "AmericanExplosive": "{$PaintingArtist.Kolf}", + "Discover": "{$PaintingArtist.Myhre}", + "HandEarth": "{$PaintingArtist.Myhre}", + "OldMiner": "{$PaintingArtist.Myhre}", + "Skelehead": "{$PaintingArtist.Myhre}", + "FacingtheCerebralMastermind": "{$PaintingArtist.Kolf}", + "LakeofFire": "{$PaintingArtist.Garner}", + "TrioSuperHeroes": "{$PaintingArtist.Burczyk}", + "ImpFace": "{$PaintingArtist.Myhre}", + "OminousPresence": "{$PaintingArtist.Craig}", + "ShiningMoon": "{$PaintingArtist.Craig}", + "LivingGore": "{$PaintingArtist.Craig}", + "FlowingMagma": "{$PaintingArtist.Craig}", + "TheCreationoftheGuide": "{$PaintingArtist.Garner}", + "TheMerchant": "{$PaintingArtist.Garner}", + "CrownoDevoursHisLunch": "{$PaintingArtist.Garner}", + "RareEnchantment": "{$PaintingArtist.Phelps}", + "GloriousNight": "{$PaintingArtist.Duncan}", + "AnglerFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AnglerFish}", + "AngryNimbusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryNimbus}", + "AnomuraFungusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AnomuraFungus}", + "AntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Antlion}", + "ArapaimaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Arapaima}", + "ArmoredSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ArmoredSkeleton}", + "BatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CaveBat}", + "BirdBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Bird}", + "BlackRecluseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlackRecluse}", + "BloodFeederBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodFeeder}", + "BloodJellyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodJelly}", + "BloodCrawlerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodCrawler}", + "BoneSerpentBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BoneSerpentHead}", + "BunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Bunny}", + "ChaosElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ChaosElemental}", + "MimicBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mimic}", + "ClownBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Clown}", + "CorruptBunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptBunny}", + "CorruptGoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptGoldfish}", + "CrabBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crab}", + "CrimeraBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crimera}", + "CrimsonAxeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonAxe}", + "CursedHammerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CursedHammer}", + "DemonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Demon}", + "DemonEyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DemonEye}", + "DerplingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Derpling}", + "EaterofSoulsBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EaterofSouls}", + "EnchantedSwordBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EnchantedSword}", + "ZombieEskimoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieEskimo}", + "FaceMonsterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FaceMonster}", + "FloatyGrossBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FloatyGross}", + "FlyingFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingFish}", + "FlyingSnakeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingSnake}", + "FrankensteinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Frankenstein}", + "FungiBulbBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FungiBulb}", + "FungoFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FungoFish}", + "GastropodBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Gastropod}", + "GoblinThiefBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinThief}", + "GoblinSorcererBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinSorcerer}", + "GoblinPeonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinPeon}", + "GoblinScoutBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinScout}", + "GoblinWarriorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinWarrior}", + "GoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Goldfish}", + "HarpyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Harpy}", + "HellbatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hellbat}", + "HerplingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Herpling}", + "HornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hornet}", + "IceElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceElemental}", + "IcyMermanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IcyMerman}", + "FireImpBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FireImp}", + "JellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueJellyfish}", + "JungleCreeperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleCreeper}", + "LihzahrdBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LihzahrdCrawler}", + "ManEaterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ManEater}", + "MeteorHeadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MeteorHead}", + "MothBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Moth}", + "MummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mummy}", + "MushiLadybugBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MushiLadybug}", + "ParrotBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Parrot}", + "PigronBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PigronCorruption}", + "PiranhaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Piranha}", + "PirateBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateDeckhand}", + "PixieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Pixie}", + "RaincoatZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieRaincoat}", + "ReaperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Reaper}", + "SharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Shark}", + "SkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Skeleton}", + "SkeletonMageBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DarkCaster}", + "SlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueSlime}", + "SnowFlinxBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowFlinx}", + "SpiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WallCreeper}", + "SporeZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieMushroom}", + "SwampThingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SwampThing}", + "TortoiseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantTortoise}", + "ToxicSludgeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ToxicSludge}", + "UmbrellaSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UmbrellaSlime}", + "UnicornBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Unicorn}", + "VampireBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VampireBat}", + "VultureBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Vulture}", + "NypmhBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nymph}", + "WerewolfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Werewolf}", + "WolfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Wolf}", + "WorldFeederBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SeekerHead}", + "WormBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantWormHead}", + "WraithBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Wraith}", + "WyvernBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WyvernHead}", + "ZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Zombie}", + "JackingSkeletron": "{$PaintingArtist.Crowno}", + "BitterHarvest": "{$PaintingArtist.Lazure}", + "BloodMoonCountess": "{$PaintingArtist.Lazure}", + "HallowsEve": "{$PaintingArtist.Lazure}", + "MorbidCuriosity": "{$PaintingArtist.Lazure}", + "StarTopper1": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "StarTopper2": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "StarTopper3": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BowTopper": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndRedGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenAndWhiteGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "MulticoloredBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndYellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndRedBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndYellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "MulticoloredLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndYellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndBlueLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueAndYellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "PillaginMePixels": "{$PaintingArtist.Lazure}", + "PaintingCastleMarsberg": "{$PaintingArtist.Lazure}", + "PaintingMartiaLisa": "{$PaintingArtist.Lazure}", + "PaintingTheTruthIsUpThere": "{$PaintingArtist.Lazure}", + "AngryTrapperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryTrapper}", + "ArmoredVikingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ArmoredViking}", + "BlackSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlackSlime}", + "BlueArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueArmoredBones}", + "BlueCultistArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistArcherBlue}", + "SkiphsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "BlueCultistFighterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "BoneLeeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BoneLee}", + "ClingerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Clinger}", + "CochinealBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CochinealBeetle}", + "CorruptPenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptPenguin}", + "CorruptSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptSlime}", + "CorruptorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Corruptor}", + "CrimslimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crimslime}", + "CursedSkullBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CursedSkull}", + "CyanBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CyanBeetle}", + "DevourerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DevourerHead}", + "DiablolistBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DiabolistRed}", + "DoctorBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DoctorBones}", + "DungeonSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DungeonSlime}", + "DungeonSpiritBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DungeonSpirit}", + "ElfArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ElfArcher}", + "ElfCopterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ElfCopter}", + "EyezorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Eyezor}", + "FlockoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Flocko}", + "GhostBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Ghost}", + "GiantBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantBat}", + "GiantCursedSkullBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantCursedSkull}", + "GiantFlyingFoxBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantFlyingFox}", + "GingerbreadManBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GingerbreadMan}", + "GoblinArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinArcher}", + "GreenSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreenSlime}", + "HeadlessHorsemanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HeadlessHorseman}", + "HellArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HellArmoredBones}", + "HellhoundBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hellhound}", + "HoppinJackBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HoppinJack}", + "IceBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceBat}", + "IceGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceGolem}", + "IceSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceSlime}", + "IchorStickerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IchorSticker}", + "IlluminantBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IlluminantBat}", + "IlluminantSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IlluminantSlime}", + "JungleBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleBat}", + "JungleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleSlime}", + "KrampusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Krampus}", + "LacBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LacBeetle}", + "LavaBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Lavabat}", + "LavaSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LavaSlime}", + "MartianBrainscramblerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BrainScrambler}", + "MartianDroneBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianDrone}", + "MartianEngineerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianEngineer}", + "MartianGigazapperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GigaZapper}", + "MartianGreyGruntBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GrayGrunt}", + "MartianOfficerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianOfficer}", + "MartianRaygunnerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RayGunner}", + "MartianScutlixGunnerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ScutlixRider}", + "MartianTeslaTurretBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianTurret}", + "MisterStabbyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MisterStabby}", + "MotherSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MotherSlime}", + "NecromancerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Necromancer}", + "NutcrackerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nutcracker}", + "PaladinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Paladin}", + "PenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Penguin}", + "PinkyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Pinky}", + "PoltergeistBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Poltergeist}", + "PossessedArmorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PossessedArmor}", + "PresentMimicBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PresentMimic}", + "PurpleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PurpleSlime}", + "RaggedCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RaggedCaster}", + "RainbowSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RainbowSlime}", + "RavenBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Raven}", + "RedSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RedSlime}", + "RuneWizardBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RuneWizard}", + "RustyArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RustyArmoredBonesAxe}", + "ScarecrowBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Scarecrow1}", + "ScutlixBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Scutlix}", + "SkeletonArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonArcher}", + "SkeletonCommandoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonCommando}", + "SkeletonSniperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonSniper}", + "SlimerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Slimer}", + "SnatcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Snatcher}", + "SnowBallaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowBalla}", + "SnowmanGangstaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowmanGangsta}", + "SpikedIceSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SpikedIceSlime}", + "SpikedJungleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SpikedJungleSlime}", + "SplinterlingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Splinterling}", + "SquidBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Squid}", + "TacticalSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TacticalSkeleton}", + "TheGroomBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TheGroom}", + "TimBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Tim}", + "UndeadMinerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UndeadMiner}", + "UndeadVikingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UndeadViking}", + "WhiteCultistArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistArcherWhite}", + "WhiteCultistCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "WhiteCultistFighterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "YellowSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.YellowSlime}", + "YetiBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Yeti}", + "ZombieElfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieElf}", + "SparkyPainting": "{$PaintingArtist.Crowno}\nIn ricordo", + "PaintingAcorns": "{$PaintingArtist.Lazure}", + "PaintingColdSnap": "{$PaintingArtist.Lazure}", + "PaintingCursedSaint": "{$PaintingArtist.Lazure}", + "PaintingSnowfellas": "{$PaintingArtist.Lazure}", + "PaintingTheSeason": "{$PaintingArtist.Lazure}", + "RedString": "{$CommonItemTooltip.String}", + "OrangeString": "{$CommonItemTooltip.String}", + "YellowString": "{$CommonItemTooltip.String}", + "LimeString": "{$CommonItemTooltip.String}", + "GreenString": "{$CommonItemTooltip.String}", + "TealString": "{$CommonItemTooltip.String}", + "CyanString": "{$CommonItemTooltip.String}", + "SkyBlueString": "{$CommonItemTooltip.String}", + "BlueString": "{$CommonItemTooltip.String}", + "PurpleString": "{$CommonItemTooltip.String}", + "VioletString": "{$CommonItemTooltip.String}", + "PinkString": "{$CommonItemTooltip.String}", + "BrownString": "{$CommonItemTooltip.String}", + "WhiteString": "{$CommonItemTooltip.String}", + "RainbowString": "{$CommonItemTooltip.String}", + "BlackString": "{$CommonItemTooltip.String}", + "BlackCounterweight": "{$CommonItemTooltip.Counterweight}", + "BlueCounterweight": "{$CommonItemTooltip.Counterweight}", + "GreenCounterweight": "{$CommonItemTooltip.Counterweight}", + "PurpleCounterweight": "{$CommonItemTooltip.Counterweight}", + "RedCounterweight": "{$CommonItemTooltip.Counterweight}", + "YellowCounterweight": "{$CommonItemTooltip.Counterweight}", + "KingSlimeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "EyeOfCthulhuBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "EaterOfWorldsBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "BrainOfCthulhuBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "QueenBeeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "SkeletronBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "WallOfFleshBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "DestroyerBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "TwinsBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "SkeletronPrimeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "PlanteraBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "GolemBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "FishronBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "CultistBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "MoonLordBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "GoblinSummonerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinSummoner}", + "SalamanderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Salamander}", + "GiantShellyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantShelly}", + "CrawdadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crawdad}", + "FritzBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Fritz}", + "CreatureFromTheDeepBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CreatureFromTheDeep}", + "DrManFlyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DrManFly}", + "MothronBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mothron}", + "SeveredHandBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "ThePossessedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ThePossessed}", + "ButcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Butcher}", + "PsychoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Psycho}", + "DeadlySphereBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DeadlySphere}", + "NailheadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nailhead}", + "PoisonousSporeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "MedusaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Medusa}", + "GreekSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreekSkeleton}", + "GraniteFlyerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GraniteFlyer}", + "GraniteGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GraniteGolem}", + "BloodZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodZombie}", + "DripplerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Drippler}", + "TombCrawlerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TombCrawlerHead}", + "DuneSplicerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DuneSplicerHead}", + "FlyingAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingAntlion}", + "WalkingAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WalkingAntlion}", + "DesertGhoulBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertGhoul}", + "DesertLamiaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertLamiaDark}", + "DesertDjinnBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertDjinn}", + "DesertBasiliskBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertBeast}", + "RavagerScorpionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertScorpionWalk}", + "StardustSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustSoldier}", + "StardustWormBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustWormHead}", + "StardustJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustJellyfishBig}", + "StardustSpiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustSpiderBig}", + "StardustSmallCellBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "StardustLargeCellBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustCellBig}", + "SolarCoriteBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarCorite}", + "SolarSrollerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarSroller}", + "SolarCrawltipedeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarCrawltipedeHead}", + "SolarDrakomireRiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarDrakomireRider}", + "SolarDrakomireBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarDrakomire}", + "SolarSolenianBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarSolenian}", + "NebulaSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaSoldier}", + "NebulaHeadcrabBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaHeadcrab}", + "NebulaBrainBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaBrain}", + "NebulaBeastBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaBeast}", + "VortexLarvaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexLarva}", + "VortexHornetQueenBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexHornetQueen}", + "VortexHornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexHornet}", + "VortexSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexSoldier}", + "VortexRiflemanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexRifleman}", + "PirateCaptainBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCaptain}", + "PirateDeadeyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateDeadeye}", + "PirateCorsairBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCorsair}", + "PirateCrossbowerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCrossbower}", + "MartianWalkerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianWalker}", + "RedDevilBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RedDevil}", + "PinkJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PinkJellyfish}", + "GreenJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreenJellyfish}", + "DarkMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DarkMummy}", + "LightMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LightMummy}", + "AngryBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryBones}", + "IceTortoiseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceTortoise}", + "SandSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandSlime}", + "SeaSnailBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SeaSnail}", + "MoonLordPainting": "{$PaintingArtist.Crowno}", + "SandElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandElemental}", + "SandsharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandShark}", + "SandsharkCorruptBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkCorrupt}", + "SandsharkCrimsonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkCrimson}", + "SandsharkHallowedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkHallow}", + "TumbleweedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Tumbleweed}", + "BossBagBetsy": "{$CommonItemTooltip.RightClickToOpen}", + "BossBagOgre": "{$CommonItemTooltip.RightClickToOpen}", + "BossBagDarkMage": "{$CommonItemTooltip.RightClickToOpen}", + "ExplosiveBunny": "Per il cannone a coniglio", + "VialofVenom": "Altamente tossica", + "FlaskofVenom": "Gli attacchi in mischia infliggono tossina sui nemici", + "VenomArrow": "Infligge tossina sul bersaglio", + "VenomBullet": "Infligge tossina sul bersaglio", + "PartyBullet": "Esplode spargendo coriandoli all'impatto", + "NanoBullet": "Provoca confusione", + "ExplodingBullet": "Esplode all'impatto", + "GoldenBullet": "I nemici uccisi rilasceranno più monete", + "FlaskofCursedFlames": "Gli attacchi in mischia infliggono fiamme maledette ai nemici", + "FlaskofFire": "Gli attacchi in mischia incendiano i nemici", + "FlaskofGold": "Gli attacchi in mischia fanno rilasciare più oro ai nemici", + "FlaskofIchor": "Gli attacchi in mischia riducono le difese dei nemici", + "FlaskofNanites": "Gli attacchi in mischia confondono i nemici", + "FlaskofParty": "Gli attacchi in mischia fanno apparire i coriandoli", + "FlaskofPoison": "Gli attacchi in mischia avvelenano i nemici", + "CobaltBreastplate": "Possibilità di colpo critico aumentata del 3%", + "CobaltLeggings": "Velocità di movimento aumentata del 10%", + "MythrilChainmail": "Danno aumentato del 5%", + "MythrilGreaves": "Possibilità di colpo critico aumentata del 3%", + "RocketI": "Portata di esplosione piccola; non basta a distruggere le mattonelle", + "RocketII": "Portata di esplosione piccola; distrugge le mattonelle", + "RocketIII": "Portata di esplosione ampia; non basta a distruggere le mattonelle", + "RocketIV": "Portata di esplosione ampia; distrugge le mattonelle", + "AsphaltBlock": "Aumenta la velocità di corsa", + "CobaltPickaxe": "Per estrarre mitrilio e oricalco", + "MythrilPickaxe": "Per estrarre adamantio e titanio", + "Cannonball": "Per il cannone", + "Arkhalis": "Non l'ho ottenuto da un mostriciattolo qualunque!", + "BoneGlove": "33% di probabilità di non consumare ossa", + "LogicGate_AND": "Si attiva quando tutte le lampade sono accese, altrimenti si ferma", + "LogicGate_NAND": "Si attiva quando non tutte le lampade sono accese, altrimenti si ferma", + "DD2FlameburstTowerT2Popper": "{$ItemTooltip.DD2FlameburstTowerT1Popper}", + "DD2FlameburstTowerT3Popper": "{$ItemTooltip.DD2FlameburstTowerT1Popper}", + "DD2BallistraTowerT2Popper": "{$ItemTooltip.DD2BallistraTowerT1Popper}", + "DD2BallistraTowerT3Popper": "{$ItemTooltip.DD2BallistraTowerT1Popper}", + "DD2ExplosiveTrapT2Popper": "{$ItemTooltip.DD2ExplosiveTrapT1Popper}", + "DD2ExplosiveTrapT3Popper": "{$ItemTooltip.DD2ExplosiveTrapT1Popper}", + "DD2LightningAuraT2Popper": "{$ItemTooltip.DD2LightningAuraT1Popper}", + "DD2LightningAuraT3Popper": "{$ItemTooltip.DD2LightningAuraT1Popper}", + "ApprenticeScarf": "{$ItemTooltip.HuntressBuckler}", + "SquireShield": "{$ItemTooltip.HuntressBuckler}", + "MonkBelt": "{$ItemTooltip.HuntressBuckler}", + "GolfClubStoneIron": "{$CommonItemTooltip.GolfIron}", + "ApprenticeAltPants": "Danno dei seguaci aumentato del 20% e probabilità di colpo critico magico aumentata del 25%", + "ApprenticeAltShirt": "Danno dei seguaci aumentato del 30% e danno magico aumentato del 15%", + "GolfClubGoldWedge": "{$CommonItemTooltip.GolfWedge}", + "ApprenticeRobe": "Danno dei seguaci aumentato del 20% e danno magico aumentato del 10%", + "ApprenticeStaffT3": "Spruzza miasma che riduce le difese!", + "GoldenCrateHard": "{$ItemTooltip.GoldenCrate}", + "BookStaff": "Chissà chi ha attaccato un tomo della saggezza infinita a un bastone...\n per scatenare un potente tornado", + "GolfBallDyedSkyBlue": "{$CommonItemTooltip.GolfBall}", + "DD2BetsyBow": "Tira frecce separanti, infligge più danni ai nemici in aria", + "DD2ElderCrystal": "Piazza il piedistallo del cristallo di Eternia per evocare i portali di Etheria", + "DD2ElderCrystalStand": "Sostiene il cristallo di Eternia", + "DD2EnergyCrystal": "Spesso si usa per manifestare la volontà di qualcuno sotto forma fisica di difesa", + "GolfBallDyedRed": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedTeal": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedPurple": "{$CommonItemTooltip.GolfBall}", + "DD2PetDragon": "Evoca un drago", + "DD2PetGato": "Evoca un gato", + "DD2PetGhost": "Evoca un flickerwick per illuminare", + "DD2PhoenixBow": "Controlla il potere delle fiamme eterne", + "DD2SquireBetsySword": "Sprigiona l'energia del cuore", + "DD2SquireDemonSword": " per difendere con uno scudo", + "DefenderMedal": "Valuta per fare affari con il taverniere", + "ShuckedOyster": "{$CommonItemTooltip.MinorStats}", + "HuntressAltPants": "Danno dei seguaci aumentato del 25% e velocità di movimento aumentata del 20%", + "HuntressAltShirt": "Danno dei seguaci e a distanza aumentato del 25%", + "GolfClubBronzeWedge": "{$CommonItemTooltip.GolfWedge}", + "HuntressJerkin": "Danno dei seguaci e a distanza aumentato del 20%", + "HuntressPants": "Danno dei seguaci aumentato del 10% e velocità di movimento aumentata del 20%", + "GolfClubWoodDriver": "{$CommonItemTooltip.GolfDriver}", + "Oyster": "{$CommonItemTooltip.RightClickToOpen}", + "MonkAltPants": "Danno dei seguaci, velocità di movimento e probabilità colpo critico in mischia aumentati del 20%", + "MonkAltShirt": "Danni dei seguaci e velocità in mischia aumentati del 20%", + "GolfClubMythrilIron": "{$CommonItemTooltip.GolfIron}", + "MonkPants": "Danno dei seguaci aumentato del 10%,\nprobabilità colpi critici aumentata del 10% e velocità di movimento aumentata del 20%", + "MonkShirt": "Danno dei seguaci e in mischia aumentato del 20%", + "MonkStaffT1": "Si carica di potere quando si usa per schiacciare i nemici", + "MonkStaffT2": "Evoca i fantasmi quando colpisce i nemici", + "MonkStaffT3": " mentre tieni premuto per lanciare un altro attacco!", + "GolfClubRustyPutter": "{$CommonItemTooltip.GolfPutter}", + "IronCrateHard": "{$ItemTooltip.IronCrate}", + "SquireAltShirt": "Danno dei seguaci aumentato del 30% e rigenerazione vita enormemente aumentata", + "GolfClubLeadPutter": "{$CommonItemTooltip.GolfPutter}", + "SquireGreaves": "Danno dei seguaci aumentato del 15%,\nprobabilità colpi critici in mischia e velocità di movimento aumentate del 20%", + "SquirePlating": "Danno dei seguaci e in mischia aumentato del 15%", + "ArkhalisShirt": "{$ItemTooltip.ArkhalisHat}", + "ArkhalisPants": "{$ItemTooltip.ArkhalisHat}", + "LobsterTail": "{$CommonItemTooltip.MediumStats}", + "ArkhalisHat": "{$CommonItemTooltip.DevItem}\n'Non l'ho ottenuto dalla griglia'", + "LeinforsHat": "{$CommonItemTooltip.DevItem}\n'Per mantenere quei riccioli sempre bellissimi'", + "LeinforsShirt": "{$CommonItemTooltip.DevItem}\n'Il sexy torna in voga'", + "LeinforsPants": "{$CommonItemTooltip.DevItem}\n'Sorpresa! Non te l'aspettavi, eh?'", + "OceanCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "LeinforsAccessory": "{$CommonItemTooltip.DevItem}\n'Per i risultati migliori, usare con dieta a base di pasta'", + "KiteSpectrum": "{$CommonItemTooltip.Kite}", + "KiteWanderingEye": "{$CommonItemTooltip.Kite}", + "KiteUnicorn": "{$CommonItemTooltip.Kite}", + "FairyQueenBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "LavaCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LavaCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "HotlineFishingHook": "{$CommonItemTooltip.LavaFishing}", + "LavaFishingHook": "{$CommonItemTooltip.LavaFishing}", + "TeleportationPylonJungle": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonPurity": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonHallow": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonUnderground": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonOcean": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonDesert": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonSnow": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonMushroom": "{$CommonItemTooltip.TeleportationPylon}", + "RockGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RockGolem}", + "BloodMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodMummy}", + "SporeSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SporeSkeleton}", + "SporeBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SporeBat}", + "LarvaeAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LarvaeAntlion}", + "CrimsonBunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonBunny}", + "CrimsonGoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonGoldfish}", + "CrimsonPenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonPenguin}", + "BigMimicCorruptionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicCorruption}", + "BigMimicCrimsonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicCrimson}", + "BigMimicHallowBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicHallow}", + "MossHornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MossHornet}", + "WanderingEyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WanderingEye}", + "CreativeWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "RainbowWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressUpToBooster}", + "LongRainbowTrailWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}\n{$CommonItemTooltip.PressUpToBooster}" + }, + "CommonItemTooltip": { + "SpecialCrafting": "Si usa per la creazione speciale", + "DevItem": "Fantastico per impersonare gli sviluppatori!", + "FlightAndSlowfall": "Consente il volo e la caduta lenta", + "RightClickToOpen": " per aprire", + "BannerBonus": "I giocatori nei dintorni ottengono un bonus contro:", + "Counterweight": "Lancia un contrappeso dopo aver colpito un nemico con uno yo-yo", + "MinuteDuration": "{0} minuto/i", + "PlaceableOnXmasTree": "Per addobbare un albero di Natale", + "RestoresLife": "Ripristina {0} unità di vita", + "RestoresMana": "Ripristina {0} unità di mana", + "SecondDuration": "{0} secondo/i", + "String": "Aumenta la portata dello yo-yo", + "UsesLife": "Usa {0} unità di vita", + "UsesMana": "Usa {0} unità di mana" + }, + "BuffDescription": { + "WellFed_Expert": "Piccole migliorie a tutti i parametri e rigenerazione vita aumentata" + } +} \ No newline at end of file diff --git a/Localization/Content/it-IT/Legacy.json b/Localization/Content/it-IT/Legacy.json new file mode 100644 index 0000000..ccc988d --- /dev/null +++ b/Localization/Content/it-IT/Legacy.json @@ -0,0 +1,1143 @@ +{ + "LegacyWorldGen": { + "0": "Creazione terreno del mondo", + "10": "Creazione grotte superficiali", + "11": "Creazione giungla", + "12": "Creazione isole fluttuanti", + "13": "Aggiunta campi di funghi", + "14": "Posizionamento fango nella terra", + "15": "Aggiunta fango", + "16": "Aggiunta elementi luminosi", + "17": "Aggiunta ragnatele", + "18": "Creazione Inferi", + "19": "Aggiunta creature acquatiche", + "1": "Aggiunta sabbia", + "20": "Creazione di un mondo malvagio", + "21": "Creazione grotte montuose", + "22": "Creazione spiagge", + "23": "Aggiunta gemme", + "24": "Rotazione sabbia", + "25": "Pulizia sfondi sporchi", + "26": "Posizionamento altari", + "27": "Versamento liquidi", + "28": "Posizionamento cristalli di vita", + "29": "Posizionamento statue", + "2": "Creazione colline", + "30": "Occultamento tesori", + "31": "Occultamento altri tesori", + "32": "Occultamento tesori nella giungla", + "33": "Occultamento tesori in acqua", + "34": "Posizionamento trappole", + "35": "Posizionamento oggetti fragili", + "36": "Posizionamento creazioni degli inferi", + "37": "Estensione erba", + "38": "Crescita cactus", + "39": "Coltivazione girasoli", + "40": "Coltivazione alberi", + "41": "Coltivazione erbe", + "42": "Coltivazione erbacce", + "43": "Coltivazione viti", + "44": "Coltivazione fiori", + "45": "Coltivazione funghi", + "46": "Liberazione risorse inutilizzate", + "47": "Ripristino oggetti di gioco", + "48": "Impostazione modalità difficile", + "49": "Salvataggio dati del mondo:", + "4": "Posizionamento rocce nella terra", + "50": "Backup file mondo", + "51": "Caricamento dati del mondo:", + "52": "Controllo allineamento mattonelle:", + "53": "Caricamento non riuscito!", + "54": "Nessun backup trovato.", + "55": "Ricerca mattonelle:", + "56": "Aggiunta neve", + "57": "Mondo", + "58": "Creazione dungeon", + "59": "Un meteorite è atterrato!", + "5": "Posizionamento terra nelle rocce", + "60": "Allisciamento del mondo", + "61": "Aggiunta di muschio", + "62": "Aggiunta di gemme", + "63": "Creazione di grotte nei muri", + "64": "Aggiunta di grotte di ragni", + "65": "Rimozione dati mappa:", + "66": "Salvataggio dati mappa:", + "67": "Caricamento dati mappa:", + "68": "Disegno mappa:", + "69": "Creazione cascate", + "6": "Aggiunta argilla", + "70": "Creazione rovine nella giungla", + "71": "Creazione nidi di calabroni", + "72": "Aumento del pericolo", + "73": "Convalida salvataggio mondo:", + "74": "Una pioggia di slime!", + "75": "La pioggia di slime è finita.", + "77": "Aggiunta di altra erba", + "78": "Desertificazione", + "7": "Creazione fori casuali", + "80": "Cesellamento marmo", + "81": "Crescita granito", + "8": "Creazione grotte piccole", + "9": "Creazione grotte grandi" + }, + "LegacyDialog": { + "1": "Spero che tra noi e l'Occhio di Cthulhu non ci sia solo una pulce come te.", + "10": "Guarda i miei blocchi di terra: sono super terrosi.", + "100": "Perché purificare il mondo quando potresti farlo saltare in aria?", + "101": "Se verserai questo nella vasca da bagno e chiuderai tutte le finestre, ti pulirà le cavità nasali e ti sturerà le orecchie!", + "102": "Vuoi giocare al gioco del perché?", + "103": "Ehi, potresti firmare questa rinuncia al dolore?", + "104": "VIETATO FUMARE QUI DENTRO!", + "105": "Gli esplosivi vanno a ruba di questi tempi. Comprane un po'!", + "106": "È un bel giorno per morire!", + "107": "Mi chiedo cosa succederà se io... (BUM!) Oh, scusa, ti serviva quella gamba?", + "108": "La dinamite, la mia cura speciale per tutto ciò che ti affligge.", + "109": "Guarda i miei prodotti: hanno prezzi esplosivi!", + "11": "Mamma mia quanto scotta il sole! Però io ho un'armatura perfettamente ventilata.", + "110": "Continuo ad avere vaghi ricordi di aver legato una donna e averla gettata in un dungeon.", + "111": "... Abbiamo un problema! Oggi c'è la Luna di Sangue!", + "112": "Fossi più giovane, chiederei a {Nurse} di uscire con me. Avevo un successone con le ragazze.", + "113": "Quel tuo cappello rosso mi sembra familiare...", + "114": "Grazie ancora per avermi liberato dalla maledizione. È stato come se qualcosa mi fosse saltato addosso e mi avesse morso.", + "115": "La mamma mi diceva sempre che sarei stato un grande sarto.", + "116": "La vita è come una scatola di vestiti: non sai mai ciò che indosserai!", + "117": "Ricamare è difficile! Se non lo fosse, nessuno lo farebbe! È ciò che lo rende fantastico.", + "118": "So tutto ciò che c'è da sapere sulle attività di sartoria.", + "119": "Nella maledizione ero solo, perciò una volta mi creai un amico di pelle. Lo chiamai Wilson.", + "12": "Il sole è alto, ma i miei prezzi no.", + "120": "Grazie per avermi liberato, umano. Sono stato legato e lasciato qui dagli altri goblin. Si potrebbe dire che non andavamo proprio d'accordo.", + "121": "Non posso credere che mi abbiano legato e lasciato qui soltanto per aver fatto notare che non andavano verso est!", + "122": "Ora che sono un escluso, posso buttar via le palle chiodate? Le mie tasche pungono.", + "123": "Cerchi un esperto di gadget? Sono il tuo goblin!", + "124": "Grazie per l'aiuto. Ora devo smetterla di gironzolare senza scopo qui attorno. Ci incontreremo di nuovo.", + "125": "Pensavo fossi più alto.", + "126": "Ehi... cosa sta combinando {Mechanic}? Ci hai... ci hai parlato, per caso?", + "127": "Ehi, il tuo cappello ha bisogno di un motore? Credo di averne uno perfettamente adatto.", + "128": "Ciao, ho sentito che ti piacciono i razzi e gli stivali da corsa, così ho messo dei missili nei tuoi stivali.", + "129": "Il silenzio è d'oro. Il nastro adesivo è d'argento.", + "13": "Ecco, ti pareva! Da qui sento {Mechanic} e {Nurse} che discutono.", + "130": "SÌ, l'oro è più forte del ferro. Cosa insegnano al giorno d'oggi a questi umani?", + "131": "Sai, quella combinazione casco da minatore-pinne era venuta meglio sulla carta.", + "132": "I goblin si irritano molto facilmente. Potrebbero persino scatenare una guerra per i tessuti!", + "133": "A dire il vero, gran parte dei goblin non sono particolarmente intelligenti. Beh, alcuni sì.", + "134": "Sai perché ci portiamo dietro queste palle chiodate? Io non ne ho idea...", + "135": "Ho appena finito la mia ultima creazione! Questa versione non esplode violentemente se ci si respira troppo forte sopra.", + "136": "I ladri goblin non sono molto furbi. Non sanno nemmeno rubare da una cassa aperta!", + "137": "Grazie per avermi salvato, amico! Queste funi iniziavano a irritarmi.", + "138": "Ooh, che eroismo!", + "139": "Oh, che eroismo! Mi hai salvato, grazie amica!", + "14": "Hai visto Chith... Shith... Chat... Insomma, il grande occhio?", + "140": "Oh, eroico! Grazie per avermi salvato, ragazzo!", + "141": "Ora che ci conosciamo, posso trasferirmi da te, vero?", + "142": "Beh, ciao, {Guide}! Cosa posso fare per te oggi?", + "143": "Beh, ciao, {Demolitionist}! Cosa posso fare per te oggi?", + "144": "Beh, ciao, {GoblinTinkerer}! Cosa posso fare per te oggi?", + "145": "Beh, ciao, {Nurse}! Cosa posso fare per te oggi?", + "146": "Beh, ciao, {Mechanic}! Cosa posso fare per te oggi?", + "147": "Beh, ciao, {Dryad}! Cosa posso fare per te oggi?", + "148": "Vuoi che tiri fuori una moneta da dietro il tuo orecchio? No? Ok.", + "149": "Vuoi dei dolci magici? No? Ok.", + "15": "Ehi, questa casa è sicura, vero? Vero? {PlayerName}?", + "150": "So preparare una cioccolata calda proprio deliziosa se ti inter... Ah, no? Ok.", + "151": "Sei qui per dare un'occhiata alla mia sfera di cristallo?", + "152": "Non hai mai desiderato un anello incantato che trasforma le rocce in slime? Neanch'io.", + "153": "Una volta qualcuno mi disse che l'amicizia è come la magia. Sciocchezze. Non puoi trasformare le persone in rane con l'amicizia.", + "154": "Ora vedo il tuo futuro... Comprerai molti prodotti da me!", + "155": "Una volta ho provato a dare la vita a una statua dell'angelo... Invano.", + "156": "Grazie! C'è mancato poco che facessi la stessa fine di quegli scheletri laggiù.", + "157": "Ehi, guarda dove metti i piedi! Ero laggiù un attimo fa!", + "158": "Resisti, ancora un po' e il Wi-Fi funzionerà anche qua.", + "159": "Ma avevo quasi finito di mettere luci intermittenti quassù!", + "16": "Nemmeno una Luna di Sangue può fermare il capitalismo. Facciamo un po' di affari.", + "160": "NON MUOVERTI. MI È CADUTA UNA LENTE A CONTATTO.", + "161": "Tutto ciò che voglio è che l'interruttore faccia... Che c'è?!", + "162": "Oh, fammi indovinare. Non hai comprato abbastanza cavi. Idiota.", + "163": "Potresti soltanto... Per favore? Ok? Ok. Puah.", + "164": "Non mi piace il modo in cui mi guardi. Sto LAVORANDO.", + "165": "Ehi, {PlayerName}, sei appena stato dal {GoblinTinkerer}? Ha detto qualcosa su di me, per caso?", + "166": "{ArmsDealer} continua a dire di aver schiacciato la mia piastra a pressione. Gli ho spiegato che bisognava salirci sopra.", + "167": "Compra sempre più cavi del necessario!", + "168": "Hai controllato che il dispositivo fosse collegato?", + "169": "Oh, sai di cosa ha bisogno questa casa? Di più luci intermittenti.", + "170": "C'è Luna di Sangue quando il cielo si fa rosso... e qualcosa fa ridestare i mostri.", + "171": "Ehi, amico, sai dove trovare un po' di erbamorte? Oh, me lo stavo solo chiedendo, tutto qua.", + "172": "Se dovessi alzare lo sguardo, vedresti che la luna è rossa ora.", + "173": "Non dovresti uscire di casa stanotte. È molto pericoloso girare al buio.", + "174": "Saluti, {PlayerName}. Come posso esserti utile?", + "175": "Sono qui per darti consigli su cosa fare dopo. Ti consiglio di parlare con me ogni volta che sei nei guai.", + "176": "Pare che ci sia una persona che ti dirà come sopravvivere in questa terra... Oh, aspetta. Sono io.", + "177": "Puoi utilizzare il piccone per scavare nell'immondizia e l'ascia per abbattere gli alberi. Posiziona il cursore sulla mattonella e fai clic!", + "178": "Se vuoi sopravvivere, dovrai creare armi e un riparo. Inizia abbattendo gli alberi e raccogliendo legna.", + "179": "Premi {InventoryKey} per accedere al menu di creazione degli oggetti. Quando avrai abbastanza legna, crea un banco da lavoro. Così potrai realizzare oggetti più sofisticati quando ti ci trovi vicino.", + "18": "Kosh, kapleck Mog. Oh scusa, in klingon significa \"Compra qualcosa o muori\".", + "180": "Puoi costruirti un riparo con legna o altri blocchi nel mondo. Non dimenticare di creare e sistemare i muri.", + "181": "Quando avrai una spada di legno, potrai provare a raccogliere la gelatina dagli slime. Unisci la legna e la gelatina per creare una torcia!", + "182": "Per interagire con gli ambienti, usa un martello!", + "183": "Devi fare un po' di estrazione per trovare minerali metallici con cui fabbricare oggetti molto utili.", + "184": "Ora che hai un po' di minerale, dovrai trasformarlo in una barra per poter realizzare degli oggetti. Per questo ti servirà una fornace!", + "185": "Puoi creare una fornace con torce, legna e pietra. Dovrai essere vicino a un banco da lavoro.", + "186": "Avrai bisogno di un'incudine per creare la maggior parte degli oggetti dalle barre metalliche.", + "188": "Sottoterra ci sono cuori di cristallo che possono essere utilizzati per aumentare la tua vita massima. Dovrai spaccarli con il piccone.", + "19": "Sei, {PlayerName}, vero? Ho sentito belle cose su di te!", + "191": "Ci sono diversi modi per convincere le persone a trasferirsi nella nostra città. Ovviamente avranno bisogno di una casa in cui vivere.", + "192": "Perché una stanza sia considerata una casa, ha bisogno di una porta, una sedia, un tavolo e una fonte di luce. Assicurati che la casa abbia anche i muri.", + "193": "Due persone non possono vivere nella stessa casa. Inoltre, se la loro casa verrà distrutta, cercheranno un nuovo posto in cui vivere.", + "194": "Puoi utilizzare l'interfaccia Alloggio per visualizzare e assegnare gli alloggi. Apri l'inventario e fai clic sull'icona della casa.", + "195": "Se vuoi che un mercante si trasferisca, dovrai raccogliere molto denaro. 50 monete d'argento dovrebbero bastare!", + "196": "Se vuoi che un'infermiera si trasferisca, dovrai aumentare la tua vita massima.", + "197": "Se avessi una pistola, scommetto che potrebbe apparire un mercante d'armi per venderti munizioni!", + "198": "Dovresti metterti alla prova sconfiggendo un mostro forte. Così attirerai l'attenzione di una driade.", + "199": "Esplora attentamente tutto il dungeon. Potrebbero esserci prigionieri nelle zone più profonde.", + "2": "Guarda che armatura scadente! Ti conviene comprare altre pozioni curative.", + "20": "Ho sentito dire che c'è un tesoro segreto... Oh, non importa.", + "200": "Forse il vecchio nei pressi del dungeon vorrebbe unirsi a noi, ora che la sua maledizione è stata rimossa.", + "201": "Non buttare le bombe che trovi. Potrebbero interessare a un esperto di demolizioni.", + "202": "I goblin sono davvero così diversi da noi da non poterci convivere in modo pacifico?", + "203": "Ho sentito che da queste parti vive un potente stregone. Tieni gli occhi aperti la prossima volta che scendi sottoterra.", + "204": "Unendo le lenti su un altare dei demoni, potresti trovare un modo per evocare un potente mostro. Ma aspetta che faccia buio per provarci.", + "205": "Puoi creare un'esca di vermi con pezzi marci e polvere disgustosa, ma devi essere in una zona corrotta prima di utilizzarla.", + "206": "Gli altari dei demoni si trovano generalmente nella Corruzione. Dovrai trovarti nei pressi degli altari per fabbricare degli oggetti.", + "208": "Se vedi un vaso, demoliscilo per aprirlo. Può contenere delle utili provviste.", + "209": "Vi sono tesori nascosti in tutto il mondo. Alcuni oggetti fantastici si possono trovare nelle zone sotterranee più profonde!", + "21": "Una statua dell'angelo, dici? Scusa, non tratto cianfrusaglie.", + "210": "Demolire una sfera dell'ombra provocherà a volte la caduta di un meteorite dal cielo. Le sfere dell'ombra si possono generalmente trovare negli abissi attorno alle zone corrotte.", + "211": "Dovresti cercare di raccogliere più cristalli di vita per aumentare la tua vita massima.", + "212": "Il tuo equipaggiamento attuale non è sufficiente. Hai bisogno di un'armatura migliore.", + "213": "Credo tu sia pronto per la tua prima grande battaglia. Raccogli lenti dai bulbi oculari di notte e portale a un altare dei demoni.", + "214": "Aumenta la tua vita prima di affrontare la prossima sfida. Quindici cuori dovrebbero bastare.", + "215": "La pietra d'ebano nella Corruzione può essere purificata con polvere di driade o distrutta con esplosivi.", + "216": "La prossima tappa consiste nell'esplorazione degli abissi corrotti. Trova e distruggi ogni sfera dell'ombra che trovi.", + "217": "C'è un vecchio dungeon non lontano da qui. Sarebbe il momento giusto per visitarlo.", + "218": "Dovresti cercare di aumentare al massimo le tue vite disponibili. Prova a raccogliere venti cuori.", + "219": "Ci sono molti tesori da scoprire nella giungla, se sei disposto a scavare abbastanza in profondità.", + "22": "L'ultimo tizio venuto qui mi ha lasciato delle cianfrusaglie... ehm. cioè dei... tesori!", + "220": "Gli Inferi sono composti da un materiale detto pietra infernale, perfetto per creare armi e armature.", + "221": "Quando sarai pronto a sfidare il custode degli Inferi, dovrai offrirgli una vittima sacrificale. Trovi tutto il necessario negli Inferi.", + "222": "Ricordati di demolire ogni altare dei demoni che incontri. Se lo farai, ti succederà qualcosa di bello!", + "223": "A volte è possibile raccogliere le anime delle creature morte in luoghi estremamente luminosi o bui.", + "224": "Oh oh oh e una bottiglia di... zabaione!", + "225": "Ti va di prepararmi dei biscotti?", + "226": "Che c'è? Credevi che non fossi reale?", + "227": "Ti ho ricucito la faccia. Fai più attenzione la prossima volta.", + "228": "Probabilmente ti lascerà una cicatrice.", + "229": "Meglio così. Non voglio vederti saltare da altre scogliere.", + "23": "Mi chiedo se la luna sia fatta di formaggio... Uhm, cosa? Ah certo, compra qualcosa!", + "230": "Non ti ha fatto troppo male, vero?", + "231": "Come se vivere sottoterra non bastasse, mentre dormo arrivano cretini come te e mi rubano i figli.", + "232": "Tra me e te, mi fido soltanto di {Dryad}. Lei è l'unica qui che non abbia cercato di mangiarmi o utilizzarmi in una pozione.", + "233": "L'altro giorno ho provato a leccarmi per vedere quale fosse il problema e ho iniziato a vedere tutto blu.", + "234": "Ogni volta che vedo il colore blu, mi deprimo e impigrisco.", + "235": "Non hai visto suini da queste parti, vero? Mio fratello ci ha rimesso una gamba per colpa loro.", + "236": "Tutta la gente di questa città è un po fuori di testa. Ieri notte mi sono risvegliato con il merciaio che mi rosicchiava un piede.", + "237": "Ti farò uno sconto sull'abbigliamento se convincerai {Truffle} a venire a... farsi prendere le misure.", + "238": "Mi sembra che {Truffle} sia un po' incompreso. È un tipo davvero divertente.", + "24": "Hai detto oro? Te lo tolgo io.", + "240": "Non so cosa sia la \"danza del ventre\", quindi smettila di chiedermelo!", + "241": "Gira una voce sul mio conto: \"Se non puoi batterlo, mangiatelo!\"", + "242": "Ehi, che hai in quel cosino?", + "243": "Mi conviene diventare un pirata dell'aria? Ci sto pensando seriamente.", + "244": "Qualunque cosa sia, un jetpack ti starebbe bene!", + "245": "Mi sento un po' scontroso ultimamente, quindi basta con le chiacchiere, pezzente!", + "246": "Sono davvero incuriosito da {Cyborg}. Che cosa consumerà per essere sempre così attivo?", + "247": "Quel capitano mi sembra di essere in preda ai fumi dell'alcol, se capisci che intendo!", + "248": "Mostrami qualche ingranaggio!", + "249": "Mi piace il tuo... ingranaggio. Lo fanno anche in ottone?", + "25": "Non ti conviene versare sangue su di me.", + "250": "Entrando in terra consacrata, vedrai un arcobaleno in cielo. Posso aiutarti a colorarlo, se hai bisogno di una mano.", + "251": "Dai un'occhiata a {PartyGirl}, una ragazza che può dipingere la città di rosso!", + "252": "Conosco la differenza tra il turchese e il verde-azzurro, ma non te la spiegherò.", + "253": "Sono a corto di bianco titanio, quindi non me lo chiedere.", + "254": "Prova rosa e viola, funziona, lo giuro!", + "255": "No, no, no... Esistono TONNELLATE di grigi diversi! Non cominciamo...", + "256": "Spero che non piova finché non si sarà asciugata questa vernice. Sarebbe un disastro!", + "257": "Ti porto i colori più ricchi in cambio della tua ricchezza!", + "258": "Quello che indossi è troppo triste. Devi assolutamente prendere una lezione di tintura per quell'abbigliamento così spento!", + "259": "L'unico tipo di legno che dipingerei è il mogano scuro. Dipingere altri tipi di legno è un tale spreco.", + "26": "Sbrigati e smettila di sanguinare.", + "260": "Devi fare qualcosa per quanto riguarda {Pirate}. Ogni volta che viene qui, mi ci vuole una settimana per far sparire la puzza!", + "261": "Che dottore sono? Io sono uno stregone!", + "262": "La magia si basa sulla natura. La natura è magia.", + "263": "{Nurse} può aiutare a guarire il corpo, ma io posso farti incarnare la guarigione.", + "264": "Scegli con saggezza, {PlayerName}, le mie materie prime sono incostanti e la mia arte oscura è misteriosa.", + "265": "Dobbiamo parlare di... di feste.", + "266": "Non riesco a decidere cosa mi piace di più: feste o dopo-feste.", + "267": "Dovremmo organizzare una festa con le lampeggiaradici e poi anche un dopo-festa.", + "268": "Wow, {PlayerName}, incontrare una persona avventurosa come te mi fa venire voglia di fare festa!", + "269": "Metti su una palla da discoteca e ti faccio vedere come si fa una festa.", + "27": "Se stai per morire, fallo fuori.", + "270": "Ho visitato la Svezia in passato e ci danno davvero dentro con le feste, perché qui non è la stessa cosa?", + "271": "Mi chiamo {PartyGirl}, ma la gente mi chiama guastafeste. Si, mi piace. Non mi offendo.", + "272": "Ti piace fare festa? Ogni tanto? Uhm, ok allora ti rivolgerò la parola...", + "273": "Io non sono un marinaio d'acqua dolce, ma è meglio aver provato e perso che non aver provato affatto.", + "274": "Yo ho ho e una bottiglia di... lampeggiaradici!", + "275": "YAR! Forte che mi parli di pappagalli perché... ehm... cosa stavamo dicendo?", + "276": "{PlayerName}, sei una delle più belle fanciulle che questo capitano abbia visto nelle ultime due settimane!", + "277": "Togliti dai piedi, piccola nullità!", + "278": "Di cosa diamine stai parlando? Moby Dick è mio!", + "279": "*Yarr Blarr Harrdarr*", + "28": "Cosa vorresti insinuare?!", + "280": "E poi l'unità 492-8 disse: \"Chi pensi che sono io, l'unità 472-6?\" AH. AH. AH.", + "281": "Il mio rendimento di spedizione si è notevolmente ridotto quando un proiettile ha colpito il mio azionatore di movimento.", + "282": "Questa frase è falsa, vero?", + "283": "Quindi quella ragazzina punk fa l'inventore, eh? Potrei mostrarle un paio di cose!", + "284": "Certo, io e {Pirate} siamo amici, ma odio quando il suo pappagallo me la fa addosso. Quella roba è corrosiva!", + "285": "Ho costruito un meccanismo di assaggio, così posso bere qualche birra!", + "286": "A volte non mi funziona qualche rotella...", + "287": "Una spuntatina sul dietro e sui lati, giusto?", + "288": "Quei colpi di sole fanno davvero risaltare il colore degli occhi!", + "289": "Ho le mani tutte appiccicose per via di tutta quella cera.", + "29": "Quel tuo tono non mi piace.", + "290": "Tè? Caffè? O soltanto aranciata anche stavolta?", + "291": "Tesoro, dobbiamo sistemare quelle doppie punte.", + "292": "Tesoro! Sei la mia fonte di pettegolezzi preferita.", + "293": "Quale dopobarba le interessa, signore?", + "294": "Si sieda un istante e le farò un taglio da paura.", + "295": "C'è chi ha stile e chi ne ha bisogno.", + "296": "Per te credo che farò qualcosa di non troppo impegnativo.", + "297": "Una volta ho provato a usare un prodotto dei maestri della tintura. Ha bruciato le punte! Un vero disastro!", + "298": "Oh, tesoro. Vieni... siediti qua. Andrà tutto bene. Sssh.", + "299": "Guarda che look!", + "3": "Ho la sensazione che una presenza malvagia mi stia guardando.", + "30": "Che ci fai qui? Se non sanguini, non devi stare qui. Via.", + "300": "Salve signore, sono {Stylist}, oggi sarò la sua parrucchiera.", + "301": "Soltanto una spuntatina? Non è divertente...", + "302": "Spero che ti piaccia l'acconciatura di {PartyGirl}!", + "303": "Non posso fare niente per i capelli bruciacchiati di {Demolitionist}. È una causa persa.", + "304": "La mancia è facoltativa, ma non dimenticare che ho le forbici e la tua testa è nelle mie mani.", + "305": "A proposito, questo rasoio è affilatissimo.", + "306": "Tesoro, stanotte è meglio se mi stai alla larga. Ho appena affilato le forbici e sto cercando una scusa per usarle.", + "307": "Mmm, mi ha detto {PartyGirl} che {Nurse}, l'amica di {Mechanic}, ha speso tutto lo stipendio del fidanzato in scarpe.", + "308": "Una volta ho messo la parrucca a {Cyborg} soltanto per tagliargli i capelli. Direi che ha apprezzato!", + "309": "Una volta ho provato ad andare da {Stylist}. Mi ha dato un'occhiata e mi ha detto \"lascia perdere\".", + "31": "COSA?!", + "310": "Dovrei proprio andare a farmi i capelli!", + "311": "Hai provato almeno a pettinarti oggi?", + "312": "Quindi facciamo un taglio corto. Vuoi anche le basette?", + "313": "Non ho problemi a togliere i peli da orecchie e sopracciglia, ma non mi chiedete quelli del naso.", + "314": "Ok, resta qui e non ti muovere. Tornerò a risciacquare il colore tra 25 minuti...", + "315": "Grazie, tesoro! Ora potrò finalmente sistemarmi i capelli.", + "316": "Ti avrei tagliato i capelli gratis, ma dovevi venire prima.", + "317": "Mi hanno detto di non andare in giro con le forbici perché non c'è rischio di restare impigliati nelle regnatele!", + "318": "Aaah, i miei capelli sono pieni di ragnatele!", + "319": "Incontriamoci dietro la casa di {Guide} fra circa tre ore, credo di avere qualcosa che ti potrebbe interessare molto.", + "32": "Hai visto il vecchio che gira intorno alla segreta? Sembra agitato.", + "320": "{Merchant} non sa apprezzare i buoni affari.", + "321": "Io vendo soltanto quello che trovo. {Clothier} continua a chiedermi abiti esotici.", + "322": "Uhm, una statua dell'angelo potrebbe esserti utile! Tagliano, affettano e fanno proprio di tutto!", + "323": "Non offro rimborsi se l'acquirente ha cambiato idea... e neanche per altri motivi.", + "324": "Acquistate adesso, spedizione gratuita!", + "325": "Vendo merce proveniente da luoghi che potrebbero anche non esistere!", + "326": "Vuoi mezzo centesimo?! Facciamo un quarto e affare fatto!", + "327": "Una combinazione di narghilè e caffettiera! Fa anche le patatine fritte!", + "328": "Venite a dare un'occhiata! Pesce fresco! Appena pescato! Pesce fresco!", + "329": "Se cerchi cianfrusaglie, ti trovi nel posto sbagliato.", + "33": "Vorrei che {Demolitionist} fosse più attento. Mi sto stancando di dovergli ricucire gli arti ogni giorno.", + "330": "Un negozio di seconda mano? No, vendo soltanto gli oggetti della migliore qualità sul mercato.", + "331": "Demolire un cuore cremisi provocherà a volte la caduta di un meteorite dal cielo. I cuori cremisi si possono generalmente trovare negli abissi attorno alle zone di crimtano.", + "332": "Hai provato a utilizzare la polvere purificatrice sulla pietra cremisi del Cremisi?", + "333": "Devi purificare il mondo da questo cremisi.", + "334": "Pss! Forse ho un lavoro adatto a te. Non potrai rifiutare!", + "335": "Voglio del pesce e tu andrai a cercarlo! Parliamone!", + "336": "Ehi! Cercavo proprio una cavia... ehm cioè, una persona esperta di pesca come te!", + "337": "{Angler} vuole il tuo aiuto per certe commissioni a {WorldName}!", + "338": "Come?! Non hai notato che sto riavvolgendo la lenza?", + "339": "Ho abbastanza pesce! In questo momento non mi serve il tuo aiuto!", + "34": "Ehi, {ArmsDealer} ha detto di dover andare dal dottore per qualche ragione? Così, per sapere.", + "340": "Non ci sono chef a {WorldName}, quindi tocca a me cucinare tutto questo pesce!", + "341": "Ehi! Fai attenzione! Sto preparando delle trappole per una burla pazzesca! Nessuno se l'aspetterà! Mi raccomando, non andare in giro a raccontarlo!", + "342": "Dammi retta: non leccare mai un pezzo di ghiaccio! Anzi, no! Fai come se non te l'avessi detto. Provaci, dai!", + "343": "Hai mai sentito parlare di un pesce che abbaia? Io no, però chiedevo a te!", + "344": "{WorldName} ha un sacco di pesci esotici!", + "345": "Che delusione! Probabilmente alcuni pesci si sono estinti prima della mia nascita. Non è giusto!", + "346": "Non ho la mamma né il papà, però ho un sacco di pesce! Quindi fa lo stesso!", + "347": "Eh eh, avresti dovuto vedere l'espressione di {Dryad} quando ho messo quel dente di piraña sulla sedia!", + "348": "Ho una richiesta per te! No, non mi interessa se in questo momento c'è un'apocalisse di zombie!", + "349": "Sbrigati e ascolta! Devi prendere qualcosa per me!", + "35": "Devo parlare seriamente con {Guide}. Quante volte a settimana si può venire qui con gravi ustioni da lava?", + "350": "Odio le Lune di Sangue! Di notte non dormo per colpa di tutti quei rumori spaventosi!", + "351": "Quando c'è la luna di sangue è meglio non pescare! I pesci mordono, certo, ma gli zombie fanno di peggio!", + "352": "C'è in giro un'infinità di mostri!", + "353": "Beh, grazie per il salvataggio. Come aiutante non saresti affatto male!", + "354": "Che vuoi? Chi ti credi di essere? Non stavo mica affogando!", + "355": "Mi hai salvato! Sei davvero gentile, potrei usarti... ehm, cioè, potrei assumerti per fare delle cose pazzesche!", + "356": "Ti avanza qualche osso? Sto cercando di sostituire la mia anca rotta... di nuovo.", + "357": "Ottimo! Finalmente è venuto qualcuno a prendersi questi vermi.", + "358": "Non ci sono malattie o condizioni che non possano essere curate con un po' del mio olio di slime! Fidati, funziona, guarda come sono in forma io!", + "359": "Hai un bel coraggio a venire qua, ma che ne dici di comprare qualcosa?", + "36": "Penso che tu stia meglio così.", + "360": "Non hai idea di quanta roba mi tira la gente... Vuoi comprarne un po'?", + "361": "Ti darei una mano, ma l'ultima volta che l'ho fatto non me l'hanno restituita per un mese.", + "362": "Non ti avvicinare ai ragni. Ti risucchieranno le viscere e lasceranno un guscio vuoto. Devi credermi.", + "363": "Le uniche cose costanti in questo mondo sono la morte e le tasse, e io le ho entrambe!", + "364": "Di nuovo tu? Che vuoi, altri soldi?!", + "365": "Perché da queste parti tutti aprono e chiudono le porte facendo così tanto rumore?", + "366": "Vedo che non hai da fare, come sempre. Non immagino che cosa potrebbe fare la gente come te.", + "367": "Evviva! Ti darò la tua parte tra poco. Dovresti essere un po' più paziente visto che sono io a fare tutto il lavoro.", + "368": "Che cosa bisogna fare per essere lasciati in pace? Vai a infastidire qualcun altro che abbia meno impegni!", + "369": "...Due barili di molassa più... Oh, non fa niente. Sei qui. Ecco i tuoi soldi.", + "37": "Ehm... Che ti è successo alla faccia?", + "370": "Detto tra noi... Non so perché si preoccupano di pagare l'affitto.", + "371": "Ho provato a farmi pagare da {Dryad}, ora ho funghi che mi crescono da tutte le parti.", + "372": "Vai a dire a {ArmsDealer} di smettere di pagarmi in munizioni, visto che non possiedo nemmeno una pistola.", + "373": "Proveresti tu a raccogliere soldi da {Demolitionist} senza perdere una mano o un piede?", + "374": "Ho appena visto {Merchant}. Voleva sapere se accetto carte di credito.", + "38": "SANTO CIELO! Sono in gamba, ma non fino a questo punto.", + "380": "Ecco la tua parte di tasse che ho preso dalla nostra popolazione in eccedenza!", + "381": "Eccoti di nuovo, a prendere tutte le mie monete! Prendile e sparisci dalla mia vista!", + "382": "Bah! Tieni, prenditi i soldi e togliti dai piedi!", + "383": "Questo è tutto quello che ti darò, neanche un centesimo in più. Prendi e non scialacquare.", + "39": "Cari amici, siamo qui riuniti, oggi, per congedarci... Oh, ti riprenderai.", + "390": "...E la gente dice che sono avido? No, non ho altro per te.", + "391": "Ma per cosa mi hai preso, per una banca? Ogni volta che mi vedi chiedi soldi.", + "392": "Non la smetti mai di dire \"ciao\"?", + "393": "Bah! Di nuovo tu? Hai già arraffato le mie monete pochi istanti fa, quindi sparisci e torna più tardi!", + "394": "Ti ho appena dato del denaro cinque minuti fa! Smamma!", + "395": "Di nuovo qui a riscuotere?! E poi dicono che quello avido sono io.", + "396": "Hai appena ricevuto la tua paga e non ti darò un centesimo di più. Vattene!", + "397": "I soldi non crescono sugli alberi, quindi non venire a raccogliere da me! Bah!", + "398": "Hai già speso tutto quello che ti ho dato? Bah! Non faccio beneficenza, vai a uccidere uno slime!", + "399": "Vacci piano! Hai i soldi, ora vattene!", + "4": "Spada batte carta! Prendine una oggi.", + "40": "Hai lasciato il braccio laggiù. Te lo porto io...", + "400": "Già implori?! Non guardarmi sperando che io cambi idea da un momento all'altro!", + "401": "Ricordati di demolire ogni altare cremisi che trovi. Se lo farai, ti succederà qualcosa di bello!", + "402": "Gli altari cremisi si trovano generalmente nel Cremisi. Dovrai trovarti nei pressi degli altari per fabbricare oggetti.", + "41": "Smettila di piagnucolare! Ho visto di peggio.", + "42": "Serviranno dei punti!", + "43": "Di nuovo problemi con quei bulli?", + "44": "Aspetta, ho i cerotti con i personaggi dei cartoni animati da qualche parte.", + "45": "Cammina, {PlayerName}, non è niente. Tsz.", + "46": "Ti fa male quando lo fai? Allora non farlo.", + "47": "Sembri sul punto di vomitare. Hai di nuovo inseguito slime?", + "48": "Gira la testa e tossisci.", + "49": "Non è la ferita più grande che abbia mai visto... Ne ho viste certamente di più grandi.", + "5": "Vuoi mele? Carote? Ananas? Abbiamo delle torce.", + "50": "Vuoi un lecca-lecca?", + "51": "Dimmi dove ti fa male.", + "52": "Scusa, ma per te costo troppo.", + "53": "Avrò bisogno di più soldi.", + "54": "Sai che non lavoro gratis.", + "55": "Il lieto fine non è il mio forte.", + "56": "Non posso fare più nulla per te senza chirurgia plastica.", + "57": "Smettila di sprecare il mio tempo.", + "58": "Ho sentito che c'è una bambola molto simile a {Guide} negli Inferi. Vorrei usarla per il tiro al bersaglio.", + "59": "Veloce! Ho un appuntamento con {Nurse} tra un'ora.", + "6": "Bella mattina, no? C'era qualcosa di cui avevi bisogno?", + "60": "Voglio quello che vende {Nurse}. In che senso, non vende niente?", + "61": "{Dryad} è uno spettacolo. Peccato sia così bigotta.", + "62": "Lascia stare {Demolitionist}, qui ho tutto ciò che ti serve.", + "63": "Che diavolo vuole {Demolitionist}? Almeno lo sa che vendiamo oggetti diversi?", + "64": "Beh, è una bella serata per non parlare con nessuno, non credi, {PlayerName}?", + "65": "Mi piacciono le notti come questa. Non mancano mai cose da uccidere!", + "66": "Vedo che stai adocchiando il Minishark... Meglio che non ti dica di cosa è fatto.", + "67": "Ehi, questo non è un film. Le munizioni sono extra.", + "68": "Giù le mani dalla mia pistola!", + "69": "Hai provato a utilizzare la polvere purificatrice sulla pietra d'ebano della Corruzione?", + "7": "Presto si farà notte. Fai le tue scelte finché puoi.", + "70": "Vorrei che {ArmsDealer} la smettesse di farmi il filo. Non sa che ho 500 anni?", + "72": "Hai visto il vecchio che gira intorno al dungeon? Non ha una bella cera...", + "73": "Vendo quello che mi pare! Se non ti piace, pazienza.", + "74": "Perché devi essere così conflittuale in un momento come questo?", + "75": "Non voglio che tu compri la mia roba. Voglio che tu desideri comprarla, ok?", + "76": "Senti, sbaglio o stanotte ci sono tipo un milione di zombie in giro?", + "77": "Devi purificare il mondo da questa corruzione.", + "78": "Fai attenzione: Terraria ha bisogno di te!", + "79": "Il tempo vola e tu, ahimé, non stai invecchiando molto bene.", + "8": "Non immagini quanti blocchi di terra si vendono oltreoceano.", + "80": "Cos'è questa storia di me che abbaio, ma non mordo?", + "81": "Due goblin entrano in un bar e uno dice all'altro: \"Vuoi un calice di birra?!\"", + "82": "Non posso farti entrare finché non mi libererai dalla maledizione.", + "83": "Torna di notte se vuoi entrare.", + "84": "Il mio padrone non può essere evocato di giorno.", + "85": "Sei decisamente troppo debole per sconfiggere la mia maledizione. Torna quando servirai a qualcosa.", + "86": "Tu, pazzo patetico. Non puoi sperare di affrontare il mio padrone in queste condizioni.", + "87": "Spero che tu abbia almeno sei amici che ti coprano le spalle.", + "88": "No, ti prego. Finirai per farti ammazzare.", + "89": "Potresti essere abbastanza forte da liberarmi dalla mia maledizione...", + "9": "Ah, un giorno racconteranno storie di {PlayerName}... Belle storie ovviamente.", + "90": "Hai la forza di sconfiggere il mio padrone?", + "91": "Ti prego! Sconfiggi chi mi tiene prigioniero e liberami, ti supplico!", + "92": "Sconfiggi il mio padrone e ti farò entrare nel dungeon.", + "93": "Stai provando a superare quella pietra d'ebano, eh? Perché non metterci uno di questi esplosivi?!", + "94": "Ehi, hai visto un clown in giro?", + "95": "C'era una bomba qui e ora non riesco a trovarla...", + "96": "Ho qualcosa per quegli zombie, altroché!", + "97": "Persino {ArmsDealer} vuole ciò che sto vendendo!", + "98": "Preferisci avere un buco da proiettile o da granata? ...Ecco, lo immaginavo.", + "99": "{Nurse} ti aiuterà sicuramente se dovessi perdere un arto." + }, + "LegacyMenu": { + "0": "Crea una nuova istanza di Terraria!", + "100": "Sfondo: sì", + "101": "Sfondo: no", + "102": "Seleziona lingua", + "103": "Lingua", + "104": "Sì", + "105": "No", + "106": "Alterna stile mappa", + "107": "Alterna schermo intero", + "108": "Avvicina", + "109": "Allontana", + "10": "Carica backup", + "110": "Riduce trasparenza", + "111": "Aumenta trasparenza", + "112": "Mappa attiva", + "113": "Mappa disattivata", + "114": "Generale", + "115": "Comandi mappa", + "116": "Illuminazione multicore:", + "117": "No", + "118": "Chiudi menu", + "11": "Nessun backup trovato", + "120": "Cursore automatico", + "121": "Modalità cursore automatico: alterna", + "122": "Modalità cursore automatico: mantieni", + "123": "Barra di progresso evento", + "124": "No", + "125": "A tempo", + "126": "Sì", + "127": "Stile", + "128": "Anteprima posizionamento: sì", + "129": "Anteprima posizionamento: no", + "12": "Giocatore singolo", + "130": "Cavalcatura", + "131": "Obiettivi", + "132": "Sangue e violenza: sì", + "133": "Sangue e violenza: no", + "134": "Applica", + "135": "Impostazioni server", + "136": "Multigiocatore Steam: disattivato", + "137": "Multigiocatore Steam: attivato", + "138": "Utenti ammessi: solo invito", + "139": "Utenti ammessi: amici", + "13": "Multigiocatore", + "140": "Invito amici: no", + "141": "Invito amici: sì", + "142": "Ammetti amici di amici: no", + "143": "Ammetti amici di amici: sì", + "144": "Avvia", + "145": "Unisciti tramite Steam", + "146": "Unisciti tramite IP", + "147": "Invita amici", + "148": "Su", + "149": "Giù", + "14": "Impostazioni", + "150": "Sinistra", + "151": "Destra", + "152": "Salta", + "153": "Lancia", + "154": "Inventario", + "155": "Afferra", + "156": "Mana rapido", + "157": "Bonus rapido", + "158": "Cavalcatura rapida", + "159": "Cura rapida", + "15": "Esci", + "160": "Selezione automatica", + "161": "Cursore automatico", + "162": "Usa oggetti", + "163": "Interagisci", + "164": "Comandi di gioco", + "165": "Comandi mappa", + "166": "Comandi barra oggetti", + "167": "Impostazioni gamepad", + "168": "Avvicina", + "169": "Allontana", + "16": "Crea personaggio", + "170": "Aumenta trasparenza", + "171": "Riduce trasparenza", + "172": "Alterna stile mappa", + "173": "Alterna mappa completa", + "174": "Passa a sinistra", + "175": "Passa a destra", + "176": "Barra oggetti 1", + "177": "Barra oggetti 2", + "178": "Barra oggetti 3", + "179": "Barra oggetti 4", + "17": "Elimina", + "180": "Barra oggetti 5", + "181": "Barra oggetti 6", + "182": "Barra oggetti 7", + "183": "Barra oggetti 8", + "184": "Barra oggetti 9", + "185": "Barra oggetti 10", + "186": "Marchio rapido 1", + "187": "Marchio rapido 2", + "188": "Marchio rapido 3", + "189": "Marchio rapido 4", + "18": "Capelli", + "190": "Barra oggetti radiale", + "191": "Allinea cursore su", + "192": "Allinea cursore destra", + "193": "Allinea cursore giù", + "194": "Allinea cursore sinistra", + "195": "", + "196": "Allinea cursore tasto direzionale", + "197": "Barra oggetti tasto direzionale", + "198": "Impostazioni avanzate gamepad", + "199": "Zona morta grilletti", + "19": "Occhi", + "1": "Esecuzione su porta", + "200": "Zona morta cursori", + "201": "Zona morta levetta sinistra X", + "202": "Zona morta levetta sinistra Y", + "203": "Zona morta levetta destra X", + "204": "Zona morta levetta destra Y", + "205": "Inverti levetta sinistra orizzontalmente", + "206": "Inverti levetta sinistra verticalmente", + "207": "Inverti levetta destra orizzontalmente", + "208": "Inverti levetta destra verticalmente", + "209": "Utilizza", + "20": "Carnagione", + "210": "Interfaccia", + "211": "Password: visibili", + "212": "Password: nascoste", + "213": "Priorità cursore automatico: Piccone -> Ascia", + "214": "Priorità cursore automatico: Ascia -> Piccone", + "215": "Posizionamento blocco automatico: cursore", + "217": "Colore bordo", + "218": "Cursore", + "219": "Comandi", + "21": "Abiti", + "220": "Attiva bonus set: su", + "221": "Attiva bonus set: giù", + "222": "Abbinamento tasti", + "223": "Getta subito con Maiusc sx: sì", + "224": "Getta subito con Maiusc sx: no", + "225": "Sostituisci subito muro: sì", + "226": "Sostituisci subito muro: no", + "227": "Attesa visualizzazione menu radiale da barra oggetti: sì", + "228": "Attesa visualizzazione menu radiale da barra oggetti: no", + "229": "Griglia mattonelle: sì", + "22": "Maschio", + "230": "Griglia mattonelle: no", + "231": "Aggancio", + "232": "Priorità aggancio: selezione bersaglio", + "233": "Priorità aggancio: bersaglio più vicino", + "234": "Priorità aggancio: linea libera", + "235": "abc / ABC / !@#", + "236": "Indietro", + "237": "Invio", + "238": "Spazio", + "239": "<-", + "23": "Femmina", + "240": "->", + "241": "Istruzioni gamepad: no", + "242": "Istruzioni gamepad: sì", + "243": "Comandi menu", + "244": "Barra rapida radiale", + "245": "Finestra senza bordo: attivata", + "246": "Finestra senza bordo: disattivata", + "247": "Salta fotogrammi: no", + "248": "Salta fotogrammi: sì", + "249": "Salta fotogrammi: minimo", + "24": "Difficile", + "250": "Tremolio minatore: attivo", + "251": "Tremolio minatore: disattivato", + "252": "Ritardo movimento interfaccia", + "25": "Medio", + "26": "Facile", + "27": "Casuale", + "28": "Crea", + "2": "Disconnetti", + "32": "Livello di difficoltà", + "33": "Camicia", + "34": "Maglietta", + "35": "Pantaloni", + "36": "Scarpe", + "37": "Capelli", + "38": "Colore capelli", + "39": "Colore occhi", + "3": "Il server richiede password:", + "40": "Colore pelle", + "41": "Colore camicia", + "42": "Colore maglietta", + "43": "Colore pantaloni", + "44": "Colore scarpe", + "45": "Inserisci nome personaggio:", + "46": "Elimina", + "47": "Crea mondo", + "48": "Inserisci nome mondo:", + "49": "Seleziona modalità finestra", + "4": "Accetta", + "50": "Seleziona modalità schermo intero", + "51": "Risoluzione", + "52": "Parallasse", + "53": "Salta fotogrammi: no", + "54": "Salta fotogrammi: sì", + "55": "Illuminazione: colore", + "56": "Illuminazione: bianco", + "57": "Illuminazione: rétro", + "58": "Illuminazione: psichedelica", + "59": "Qualità: automatica", + "5": "Indietro", + "60": "Qualità: alta", + "61": "Qualità: media", + "62": "Qualità: bassa", + "63": "Video", + "64": "Colore cursore", + "65": "Volume", + "66": "Comandi", + "67": "Salvataggio automatico: sì", + "68": "Salvataggio automatico: no", + "69": "Pausa automatica: sì", + "6": "Annulla", + "70": "Pausa automatica: no", + "71": "Testo di collegamento: sì", + "72": "Testo di collegamento: no", + "73": "Risoluzione schermo intero", + "74": "Su", + "75": "Giù", + "76": "Sinistra", + "77": "Destra", + "78": "Salta", + "79": "Lancia", + "7": "Inserisci password server:", + "80": "Inventario", + "81": "Cura rapida", + "82": "Mana rapido ", + "83": "Bonus rapido", + "84": "Afferra", + "85": "Selezione automatica", + "86": "Ripristina predefinito", + "87": "Partecipa", + "88": "Ospita e gioca", + "89": "Inserisci indirizzo IP:", + "8": "Avvio server...", + "90": "Inserisci porta server:", + "91": "Scegli grandezza mondo:", + "92": "Piccolo", + "93": "Medio", + "94": "Grande", + "95": "Rosso:", + "96": "Verde:", + "97": "Blu:", + "98": "Audio:", + "99": "Musica:", + "9": "Caricamento non riuscito!", + "119": "Ambiente:" + }, + "LegacyTooltip": { + "0": "Equipaggiato nello slot estetico", + "10": "Bassa velocità", + "11": "Velocità molto bassa", + "12": "Velocità extra bassa", + "13": "Velocità lumaca", + "14": "Nessuno spintone", + "15": "Spintone extra debole", + "16": "Spintone molto debole", + "17": "Spintone debole", + "18": "Spintone medio", + "19": "Spintone forte", + "1": "Nessun parametro incrementato", + "20": "Spintone molto forte", + "21": "Spintone extra forte", + "22": "Spintone matto", + "23": "Equipaggiabili", + "24": "Oggetti di estetica", + "25": " difesa", + "26": "% potenza piccone", + "27": "% potenza ascia", + "28": "% potenza martello", + "29": "Risana", + "2": " Danno da mischia", + "30": "vita", + "31": "mana", + "32": "Utilizza", + "33": "Può essere posizionato", + "34": "Munizioni", + "35": "Consumabile", + "36": "Materiale", + "37": " min. di durata", + "38": " sec. di durata", + "39": "% danno", + "3": " Danno boomerang", + "40": "% velocità", + "41": "% possibilità colpo critico", + "42": "% costo mana", + "43": "% dimensione", + "44": "% velocità", + "45": "% spintone", + "46": "% velocità movimento", + "47": "% velocità corpo a corpo", + "48": "Imposta bonus:", + "49": "Prezzo di vendita:", + "4": " danno magico", + "50": "Prezzo di acquisto:", + "51": "Nessun prezzo", + "52": "Consuma", + "53": " danno da evocazione", + "54": " portata", + "55": " danno", + "56": "Indicato come preferito", + "57": "Getta subito, accumula e vendi bloccati", + "58": " danno da lancio", + "59": "Maledetto da una potente creatura della giungla", + "5": "% possibilità colpo critico", + "6": "Velocità matta", + "7": "Extra velocità", + "8": "Alta velocità", + "9": "Media velocità" + }, + "LegacyMultiplayer": { + "10": "Non sei in un gruppo!", + "11": "{0} ha attivato il PvP!", + "12": "{0} ha disattivato il PvP!", + "13": "{0} non è più in un gruppo.", + "14": "{0} si è unito al gruppo rosso.", + "15": "{0} si è unito al gruppo verde.", + "16": "{0} si è unito al gruppo blu.", + "17": "{0} si è unito al gruppo giallo.", + "18": "Benvenuto a", + "19": "{0} si è unito.", + "20": "{0} ha abbandonato.", + "21": "/giocatori", + "22": "{0} si è unito al gruppo rosa.", + "2": "Operazione non valida in questo stato.", + "3": "Sei stato sospeso da questo server", + "4": "Non stai utilizzando la stessa versione del server.", + "5": "è già su questo server.", + "6": "/gioca", + "7": "Giocatori correnti:", + "8": "/numero", + "9": "numero", + "0": "Ricevi:" + }, + "LegacyMisc": { + "0": "Un esercito dei goblin è stato sconfitto!", + "100": "Scegli il male del mondo", + "101": "Corruzione", + "102": "Cremisi", + "103": "Casuale", + "10": "Un freddo terribile ti attraversa la spina dorsale...", + "11": "Intorno a te echeggiano urla...", + "12": "Il tuo mondo si è arricchito di cobalto!", + "13": "Il tuo mondo si è arricchito di mitrilio!", + "14": "Il tuo mondo si è arricchito di adamantio!", + "15": "I vecchi spiriti di luce e tenebre sono stati liberati.", + "19": "{0} è stato ucciso...", + "1": "L'esercito dei goblin si sta avvicinando da ovest!", + "20": "C'è un'eclissi solare!", + "21": "Il tuo mondo si è arricchito di palladio!", + "22": "Il tuo mondo si è arricchito di oricalco!", + "23": "Il tuo mondo si è arricchito di titanio!", + "24": "I pirati sono stati sconfitti!", + "25": "I pirati arrivano da ovest!", + "26": "I pirati arrivano da est!", + "27": "I pirati sono arrivati!", + "28": "Senti delle vibrazioni sotterranee...", + "29": "Questa notte sarà terribile...", + "2": "L'esercito dei goblin si sta avvicinando da est!", + "30": "L'aria intorno a te sta rinfrescando...", + "31": "La luna a zucca sta sorgendo...", + "32": "La giungla è in subbuglio...", + "33": "Le urla riecheggiano dal dungeon...", + "34": "La luna del gelo sta sorgendo...", + "35": "{0} non è più qui!", + "36": "{0} ha abbandonato!", + "37": "Qualsiasi", + "38": "Piastra a pressione", + "39": " e rigenerazione vita aumentata", + "3": "Un esercito di goblin è arrivato!", + "40": "Aumenta la rigenerazione vita", + "41": "I marziani stanno invadendo!", + "42": "I marziani sono stati sconfitti!", + "43": "Le creature celestiali stanno invadendo!", + "44": "Non capisci più niente...", + "45": "Il dolore si fa schiacciante...", + "46": "Delle voci soprannaturali ti tormentano...", + "47": "Il Signore della Luna si è svegliato!", + "48": "I Gemelli si sono svegliati!", + "49": "Ti risvegli da uno strano sogno...", + "4": "La Legione gelo è stata sconfitta!", + "50": "è stato sconfitto!", + "51": "Frammento lunare", + "52": "Il fato imminente si avvicina...", + "53": "Seleziona", + "54": "Prendi", + "55": "Prendi uno", + "56": "Chiudi", + "57": "Afferra", + "58": "Salta", + "59": "Alterna oggetti", + "5": "La Legione gelo si sta avvicinando da ovest!", + "60": "Attacca", + "61": "Costruisci", + "62": "Bevi", + "63": "Azione", + "64": "Cambia menu", + "65": "Posiziona", + "66": "Scambia", + "67": "Equipaggia", + "68": "Rimuovi", + "69": "Mostra bandiere stanza", + "6": "La Legione gelo si sta avvicinando da est!", + "70": "Controlla alloggio", + "71": "Creazione rapida", + "72": "Crea", + "73": "Seleziona", + "74": "Rifiuti", + "75": "Vendi", + "76": "Trasferisci", + "77": "Mostra", + "78": "Nascondi", + "79": "Usa", + "7": "La Legione gelo è arrivata!", + "80": "Parla", + "81": "Leggi", + "82": "Indietro", + "83": "Preferito", + "84": "Non puoi cambiare squadre nei blocchi della tua squadra!", + "86": "Anatra", + "87": "Farfalla", + "88": "Lucciola", + "89": "Interazione cavi", + "8": "La Luna di Sangue sta sorgendo...", + "90": "Compra", + "91": "Compra di più", + "92": "Vendi", + "93": "Fabbrica di più", + "94": "Prova a rimuovere", + "95": "Chiocciola", + "96": "Sembra che", + "97": " stia organizzando una festa", + "98": " stiano organizzando una festa", + "99": "Fine della festa!", + "9": "Senti una presenza malvagia che ti sta guardando...", + "104": "Non si può usare senza mana eteriano finché il cristallo di Eternia viene difeso" + }, + "LegacyInterface": { + "0": "Vita:", + "100": "Numero di creature", + "101": "Numero di uccisioni", + "102": "Fase lunare", + "103": "Velocità movimento", + "104": "Tesoro", + "105": "Creature rare", + "106": "Danni al secondo", + "107": "Piante strane", + "108": "Apri mappa", + "109": "Chiudi mappa", + "10": "Difesa", + "110": "Apri cartella", + "111": "Cattura immagine", + "112": "Devi impostare un'inquadratura", + "113": "Disponibile solo in modalità Finestra", + "114": "Disposizione solo se la mappa è attiva", + "115": "Modalità telecamera disattivata", + "116": "Evidenzia nuovi oggetti: no", + "117": "Evidenzia nuovi oggetti: sì", + "118": "Avvicina", + "119": "Allontana", + "11": "Estetico", + "120": "Teletrasportati verso un alleato", + "121": "Lascia oggetto", + "122": "Organizza oggetti", + "123": "Clima freddo", + "12": "Casco", + "13": "Camicia", + "14": "Pantaloni", + "15": "platino", + "16": "oro", + "17": "argento", + "18": "rame", + "19": "Riforgiare", + "1": "Respiro", + "20": "Posiziona qui un oggetto per riforgiarlo", + "21": "Mostra ricette che usano", + "22": "Oggetti richiesti:", + "23": "Nessuno", + "24": "Posiziona un materiale qui", + "25": "Creazione oggetti", + "26": "Monete", + "27": "Munizioni", + "28": "Negozio", + "29": "Saccheggia tutto", + "2": "Mana", + "30": "Deposita tutto", + "31": "Accumula subito", + "32": "Salvadanaio", + "33": "Caveau", + "34": "Tempo", + "35": "Salva ed esci", + "36": "Disconnetti", + "37": "Oggetti", + "38": "Sei morto...", + "39": "Questo alloggio è adatto.", + "3": "Cestino", + "40": "Questo alloggio non è valido.", + "41": "Questo alloggio è già occupato.", + "42": "Questo alloggio è corrotto.", + "43": "Connessione scaduta", + "44": "Ricezione dati in cascata", + "45": "Equipaggia", + "46": "Costo", + "47": "Salva", + "48": "Modifica", + "49": "Stato", + "4": "Inventario", + "50": "Maledizione", + "51": "Aiuto", + "52": "Chiudi", + "53": "Acqua", + "54": "Guarire", + "55": "Questo alloggio non soddisfa i requisiti per aggiungere", + "56": "Lava", + "57": "Tingere", + "58": "Miele", + "59": "Visibile", + "5": "Barra oggetti sbloccata", + "60": "Nascosto", + "61": "Rinomina", + "62": "Impostazioni", + "63": "Annulla", + "64": "Missione", + "65": "Oggetto missione", + "66": "Risparmi", + "67": "Cattura istantanea", + "68": "Impostazioni", + "69": "Ferma inquadratura", + "6": "Barra oggetti bloccata", + "70": "Imposta inquadratura", + "71": "Chiudi", + "72": "Sì", + "73": "No", + "74": "Compressione immagine", + "75": "Immagine entità", + "76": "Immagine sfondo", + "77": "Scelta bioma", + "78": "Reimposta inquadratura", + "79": "Equipaggiamento", + "7": "Alloggio", + "80": "Alloggio", + "81": "Modalità telecamera", + "82": "Rifornisci", + "83": "Luna del gelo", + "84": "Luna a zucca", + "85": "Follia marziana", + "86": "Invasione pirata", + "87": "Legione del gelo", + "88": "Esercito goblin", + "89": "Raccogli", + "8": "Valutazione alloggio", + "90": "Rampino", + "91": "Cavalcatura", + "92": "Mascotte", + "93": "Carrello", + "94": "Mascotte di luce", + "95": "Tempo", + "96": "Clima", + "97": "Pesca", + "98": "Posizione", + "99": "Profondità", + "9": "Accessorio" + }, + "LegacyChestType": { + "0": "Cassa", + "10": "Cassa di edera", + "12": "Cassa di legno vivo", + "13": "Cassa celeste", + "14": "Cassa di grigiolegno", + "15": "Cassa coperta di ragnatele", + "16": "Cassa rettiliana", + "17": "Cassa di acqua", + "18": "Cassa della giungla", + "19": "Cassa della corruzione", + "1": "Cassa d'oro", + "20": "Cassa cremisi", + "21": "Cassa consacrata", + "23": "Cassa della giungla chiusa", + "24": "Cassa della corruzione chiusa", + "25": "Cassa cremisi chiusa", + "26": "Cassa consacrata chiusa", + "28": "Cassa dinastica", + "29": "Cassa di miele", + "2": "Cassa d'oro chiusa", + "30": "Cassa steampunk", + "31": "Cassa di legno di palma", + "32": "Cassa a fungo", + "33": "Cassa di legno boreale", + "34": "Cassa slime", + "35": "Cassa verde da dungeon", + "36": "Cassa verde da dungeon chiusa", + "37": "Cassa rosa da dungeon", + "38": "Cassa rosa da dungeon chiusa", + "39": "Cassa blu da dungeon", + "3": "Cassa ombra", + "40": "Cassa blu da dungeon chiusa", + "41": "Cassa di ossa", + "42": "Cassa di cactus", + "43": "Cassa di carne", + "44": "Cassa di ossidiana", + "45": "Cassa di zucca", + "46": "Cassa spettrale", + "47": "Cassa di vetro", + "48": "Cassa marziana", + "49": "Cassa di meteorite", + "4": "Cassa ombra bloccata", + "50": "Cassa di granito", + "51": "Cassa di marmo", + "5": "Barile", + "6": "Cestino", + "7": "Cassa di ebano", + "8": "Cassa di mogano scuro", + "9": "Cassa di legno perlato" + }, + "LegacyDresserType": { + "0": "Cassettone", + "10": "Cassettone di ossa", + "11": "Cassettone di cactus", + "12": "Cassettone spettrale", + "13": "Cassettone celeste", + "14": "Cassettone di miele", + "15": "Cassettone rettiliano", + "16": "Cassettone di legno di palma", + "17": "Cassettone a fungo", + "18": "Cassettone di legno boreale", + "19": "Cassettone slime", + "1": "Cassettone di ebano", + "20": "Cassettone di zucca", + "21": "Cassettone steampunk", + "22": "Cassettone di vetro", + "23": "Cassettone di carne", + "24": "Cassettone marziano", + "25": "Cassettone di meteorite", + "26": "Cassettone di granito", + "27": "Cassettone di marmo", + "2": "Cassettone di mogano scuro", + "3": "Cassettone di legno perlato", + "4": "Cassettone di grigiolegno", + "5": "Cassettone blu da dungeon", + "6": "Cassettone verde da dungeon", + "7": "Cassettone rosa da dungeon", + "8": "Cassettone dorato", + "9": "Cassettone di ossidiana", + "28": "{$ItemName.CrystalDresser}", + "29": "{$ItemName.DynastyDresser}", + "30": "{$ItemName.FrozenDresser}", + "31": "{$ItemName.LivingWoodDresser}", + "32": "{$ItemName.SpiderDresser}", + "33": "{$ItemName.LesionDresser}", + "34": "{$ItemName.SolarDresser}", + "35": "{$ItemName.VortexDresser}", + "36": "{$ItemName.NebulaDresser}", + "37": "{$ItemName.StardustDresser}", + "38": "{$ItemName.SandstoneDresser}", + "39": "{$ItemName.BambooDresser}" + }, + "LegacyChestType2": { + "1": "{$ItemName.GoldenChest}", + "0": "{$ItemName.CrystalChest}", + "2": "{$ItemName.SpiderChest}", + "3": "{$ItemName.LesionChest}", + "4": "{$ItemName.GoldChest}", + "5": "{$ItemName.SolarChest}", + "6": "{$ItemName.VortexChest}", + "7": "{$ItemName.NebulaChest}", + "8": "{$ItemName.StardustChest}", + "9": "{$ItemName.GolfChest}", + "10": "{$ItemName.DesertChest}", + "11": "{$ItemName.BambooChest}", + "12": "{$ItemName.DungeonDesertChest}" + } +} \ No newline at end of file diff --git a/Localization/Content/it-IT/NPCs.json b/Localization/Content/it-IT/NPCs.json new file mode 100644 index 0000000..9c02655 --- /dev/null +++ b/Localization/Content/it-IT/NPCs.json @@ -0,0 +1,582 @@ +{ + "NPCName": { + "BlueSlime": "Slime blu", + "GiantWormHead": "Verme gigante", + "SeekerTail": "Alimentatore del mondo", + "Clinger": "Appiccicoso", + "AnglerFish": "Rana pescatrice", + "GreenJellyfish": "Medusa verde", + "Werewolf": "Lupo mannaro", + "BoundGoblin": "Goblin legato", + "BoundWizard": "Stregone legato", + "GoblinTinkerer": "Goblin inventore", + "Wizard": "Stregone", + "Clown": "Clown", + "GiantWormBody": "Verme gigante", + "SkeletonArcher": "Scheletro arciere", + "GoblinArcher": "Goblin arciere", + "VileSpit": "Bava disgustosa", + "WallofFlesh": "Muro di carne", + "WallofFleshEye": "Muro di carne", + "TheHungry": "L'Affamato", + "TheHungryII": "L'Affamato", + "LeechHead": "Sanguisuga", + "LeechBody": "Sanguisuga", + "LeechTail": "Sanguisuga", + "GiantWormTail": "Verme gigante", + "ChaosElemental": "Elementale del caos", + "Slimer": "Slimer", + "Gastropod": "Gasteropodo", + "BoundMechanic": "Meccanico legato", + "Mechanic": "Meccanico", + "Retinazer": "Retinazer", + "Spazmatism": "Spazmatism", + "SkeletronPrime": "Skeletron primario", + "PrimeCannon": "Cannone primario", + "PrimeSaw": "Sega primaria", + "EaterofWorldsHead": "Mangiatore di mondi", + "PrimeVice": "Morsa primaria", + "PrimeLaser": "Laser primario", + "BaldZombie": "Zombie", + "WanderingEye": "Occhio errante", + "TheDestroyer": "Il Distruttore", + "TheDestroyerBody": "Il Distruttore", + "TheDestroyerTail": "Il Distruttore", + "IlluminantBat": "Pipistrello illuminante", + "IlluminantSlime": "Slime illuminante", + "Probe": "Sonda", + "EaterofWorldsBody": "Mangiatore di mondi", + "PossessedArmor": "Armatura posseduta", + "ToxicSludge": "Fango tossico", + "SantaClaus": "Babbo Natale", + "SnowmanGangsta": "Pupazzo di neve Gangsta", + "MisterStabby": "Signor Stabby", + "SnowBalla": "Pupazzo di neve", + "IceSlime": "Slime di ghiaccio", + "Penguin": "Pinguino", + "PenguinBlack": "Pinguino", + "EaterofWorldsTail": "Mangiatore di mondi", + "IceBat": "Pipistrello del ghiaccio", + "Lavabat": "Pipistrello della lava", + "GiantFlyingFox": "Megapipistrello", + "GiantTortoise": "Testuggine gigante", + "IceTortoise": "Testuggine del ghiaccio", + "Wolf": "Lupo", + "RedDevil": "Diavolo rosso", + "Arapaima": "Arapaima", + "VampireBat": "Vampiro", + "Vampire": "Vampiro", + "MotherSlime": "Slime madre", + "Truffle": "Tartufo", + "Frankenstein": "Frankenstein", + "BlackRecluse": "Vedova eremita", + "WallCreeper": "Ragno arrampicatore", + "WallCreeperWall": "Ragno arrampicatore", + "SwampThing": "Swamp Thing", + "UndeadViking": "Vichingo non-morto", + "CorruptPenguin": "Pinguino corrotto", + "IceElemental": "Elementale del ghiaccio", + "Merchant": "Mercante", + "PigronCorruption": "Maialdrago", + "PigronHallow": "Maialdrago", + "RuneWizard": "Stregone delle rune", + "Crimera": "Cremera", + "Herpling": "Herpling", + "AngryTrapper": "Intrappolatore arrabbiato", + "MossHornet": "Calabrone del muschio", + "Derpling": "Derpling", + "Steampunker": "Steampunker", + "CrimsonAxe": "Ascia cremisi", + "Nurse": "Infermiera", + "PigronCrimson": "Maialdrago", + "FaceMonster": "Faccia mostruosa", + "FloatyGross": "Grasso galleggiante", + "Crimslime": "Slime cremisi", + "SpikedIceSlime": "Slime di ghiaccio chiodato", + "SnowFlinx": "Flinx di neve", + "PincushionZombie": "Zombie", + "SlimedZombie": "Zombie", + "SwampZombie": "Zombie", + "TwiggyZombie": "Zombie", + "ArmsDealer": "Mercante di armi", + "CataractEye": "Occhio del Demone", + "SleepyEye": "Occhio del Demone", + "DialatedEye": "Occhio del Demone", + "GreenEye": "Occhio del Demone", + "PurpleEye": "Occhio del Demone", + "LostGirl": "Ragazza smarrita", + "Nymph": "Ninfa", + "ArmoredViking": "Vichingo corazzato", + "Lihzahrd": "Rettiliano", + "LihzahrdCrawler": "Rettiliano", + "DemonEye": "Occhio del Demone", + "Dryad": "Driade", + "FemaleZombie": "Zombie", + "HeadacheSkeleton": "Scheletro", + "MisassembledSkeleton": "Scheletro", + "PantlessSkeleton": "Scheletro", + "SpikedJungleSlime": "Slime della giungla chiodato", + "Moth": "Falena", + "IcyMerman": "Tritone del ghiaccio", + "DyeTrader": "Venditore di tinture", + "PartyGirl": "Ragazza mondana", + "Cyborg": "Cyborg", + "Skeleton": "Scheletro", + "Bee": "Ape", + "BeeSmall": "Ape", + "PirateDeckhand": "Pirata marinaio", + "PirateCorsair": "Pirata corsaro", + "PirateDeadeye": "Pirata bendato", + "PirateCrossbower": "Pirata con balestra", + "PirateCaptain": "Pirata capitano", + "CochinealBeetle": "Cocciniglia", + "CyanBeetle": "Scarabeo azzurro", + "LacBeetle": "Scarabeo di resina", + "Guide": "Guida", + "SeaSnail": "Lumaca di mare", + "Squid": "Calamaro", + "QueenBee": "Ape regina", + "ZombieRaincoat": "Zombie con impermeabile", + "FlyingFish": "Pesce volante", + "UmbrellaSlime": "Slime a ombrello", + "FlyingSnake": "Serpente volante", + "Painter": "Pittore", + "WitchDoctor": "Stregone", + "Pirate": "Pirata", + "MeteorHead": "Testa di meteorite", + "GoldfishWalker": "Pesce rosso", + "HornetFatty": "Calabrone", + "HornetHoney": "Calabrone", + "HornetLeafy": "Calabrone", + "HornetSpikey": "Calabrone", + "HornetStingy": "Calabrone", + "JungleCreeper": "Ragno della giungla", + "JungleCreeperWall": "Ragno della giungla", + "BlackRecluseWall": "Vedova eremita", + "BloodCrawler": "Acaro del sangue", + "FireImp": "Diavoletto di fuoco", + "BloodCrawlerWall": "Acaro del sangue", + "BloodFeeder": "Mangiasangue", + "BloodJelly": "Gelatina di sangue", + "IceGolem": "Golem del ghiaccio", + "RainbowSlime": "Slime arcobaleno", + "Golem": "Golem", + "GolemHead": "Testa di golem", + "GolemFistLeft": "Pugno di golem", + "GolemFistRight": "Pugno di golem", + "GolemHeadFree": "Testa di golem", + "BurningSphere": "Sfera infuocata", + "AngryNimbus": "Nimbus adirato", + "Eyezor": "Eyezor", + "Parrot": "Pappagallo", + "Reaper": "Mietitore", + "ZombieMushroom": "Zombie di spore", + "ZombieMushroomHat": "Zombie di spore", + "FungoFish": "Pesce fungo", + "AnomuraFungus": "Anomuri", + "MushiLadybug": "Coccinella mushi", + "FungiBulb": "Bulbo fungoso", + "GoblinPeon": "Goblin operaio", + "GiantFungiBulb": "Bulbo fungoso gigante", + "FungiSpore": "Spora fungosa", + "Plantera": "Plantera", + "PlanterasHook": "Uncino di Plantera", + "PlanterasTentacle": "Tentacolo di Plantera", + "Spore": "Spora", + "BrainofCthulhu": "Cervello di Cthulhu", + "Creeper": "Occhio guardiano", + "IchorSticker": "Sputaicore", + "RustyArmoredBonesAxe": "Ossa corazzate arrugginite", + "GoblinThief": "Goblin ladro", + "RustyArmoredBonesFlail": "Ossa corazzate arrugginite", + "RustyArmoredBonesSword": "Ossa corazzate arrugginite", + "RustyArmoredBonesSwordNoArmor": "Ossa corazzate arrugginite", + "BlueArmoredBones": "Ossa corazzate blu", + "BlueArmoredBonesMace": "Ossa corazzate blu", + "BlueArmoredBonesNoPants": "Ossa corazzate blu", + "BlueArmoredBonesSword": "Ossa corazzate blu", + "HellArmoredBones": "Ossa corazzate infernali", + "HellArmoredBonesSpikeShield": "Ossa corazzate infernali", + "HellArmoredBonesMace": "Ossa corazzate infernali", + "GoblinWarrior": "Goblin guerriero", + "HellArmoredBonesSword": "Ossa corazzate infernali", + "RaggedCaster": "Lanciatore lacero", + "RaggedCasterOpenCoat": "Lanciatore lacero", + "Necromancer": "Necromante", + "NecromancerArmored": "Necromante", + "DiabolistRed": "Satanico", + "DiabolistWhite": "Satanico", + "BoneLee": "Ossa marziali", + "DungeonSpirit": "Spirito del dungeon", + "GiantCursedSkull": "Teschio maledetto enorme", + "GoblinSorcerer": "Goblin stregone", + "Paladin": "Paladino", + "SkeletonSniper": "Scheletro cecchino", + "TacticalSkeleton": "Scheletro tattico", + "SkeletonCommando": "Scheletro commando", + "AngryBonesBig": "Ossa arrabbiate", + "AngryBonesBigMuscle": "Ossa arrabbiate", + "AngryBonesBigHelmet": "Ossa arrabbiate", + "BirdBlue": "Ghiandaia blu", + "BirdRed": "Passerotto", + "Squirrel": "Scoiattolo", + "Zombie": "Zombie", + "ChaosBall": "Palla del caos", + "Mouse": "Topo", + "Raven": "Corvo", + "SlimeMasked": "Slime", + "BunnySlimed": "Coniglio", + "HoppinJack": "Zucca intagliata saltante", + "Scarecrow1": "Spaventapasseri", + "Scarecrow2": "Spaventapasseri", + "Scarecrow3": "Spaventapasseri", + "Scarecrow4": "Spaventapasseri", + "Scarecrow5": "Spaventapasseri", + "AngryBones": "Ossa arrabbiate", + "Scarecrow6": "Spaventapasseri", + "Scarecrow7": "Spaventapasseri", + "Scarecrow8": "Spaventapasseri", + "Scarecrow9": "Spaventapasseri", + "Scarecrow10": "Spaventapasseri", + "HeadlessHorseman": "Cavaliere senza testa", + "Ghost": "Fantasma", + "DemonEyeOwl": "Occhio del Demone", + "DemonEyeSpaceship": "Occhio del Demone", + "ZombieDoctor": "Zombie", + "DarkCaster": "Lanciatore oscuro", + "ZombieSuperman": "Zombie", + "ZombiePixie": "Zombie", + "SkeletonTopHat": "Scheletro", + "SkeletonAstonaut": "Scheletro", + "SkeletonAlien": "Scheletro", + "MourningWood": "Albero del pianto", + "Splinterling": "Scheggetta", + "Pumpking": "Re zucca", + "PumpkingBlade": "Re zucca", + "Hellhound": "Cerbero", + "WaterSphere": "Sfera d'acqua", + "Poltergeist": "Spirito malvagio", + "ZombieXmas": "Zombie", + "ZombieSweater": "Zombie", + "SlimeRibbonWhite": "Slime", + "SlimeRibbonYellow": "Slime", + "SlimeRibbonGreen": "Slime", + "SlimeRibbonRed": "Slime", + "BunnyXmas": "Coniglio", + "ZombieElf": "Elfo zombie", + "ZombieElfBeard": "Elfo zombie", + "CursedSkull": "Teschio maledetto", + "ZombieElfGirl": "Elfo zombie", + "PresentMimic": "Sosia regalo", + "GingerbreadMan": "Omino di zenzero", + "Yeti": "Yeti", + "Everscream": "Semprepungente", + "IceQueen": "Regina del ghiaccio", + "SantaNK1": "Babbo Natale NK1", + "ElfCopter": "Elficottero", + "Nutcracker": "Schiaccianoci", + "NutcrackerSpinning": "Schiaccianoci", + "SkeletronHead": "Skeletron", + "ElfArcher": "Elfo arciere", + "Krampus": "Krampus", + "Flocko": "Fiokko", + "Stylist": "Stilista", + "WebbedStylist": "Stilista intrappolata", + "Firefly": "Lucciola", + "Butterfly": "Farfalla", + "Worm": "Verme", + "LightningBug": "Insetto illuminante", + "Snail": "Chiocciola", + "SkeletronHand": "Skeletron", + "GlowingSnail": "Chiocciola luminosa", + "Frog": "Rana", + "Duck": "Anatra", + "Duck2": "Anatra", + "DuckWhite": "Anatra", + "DuckWhite2": "Anatra", + "ScorpionBlack": "Scorpione", + "Scorpion": "Scorpione", + "TravellingMerchant": "Venditore itinerante", + "Angler": "Pescatore", + "OldMan": "Vecchio", + "DukeFishron": "Duca pesce drago", + "DetonatingBubble": "Bolla esplosiva", + "Sharkron": "Squalo volante", + "Sharkron2": "Squalo volante", + "TruffleWorm": "Verme tartufo", + "TruffleWormDigger": "Verme tartufo", + "SleepingAngler": "Pescatore addormentato", + "Grasshopper": "Cavalletta", + "ChatteringTeethBomb": "Bomba dentiera", + "Demolitionist": "Esperto in demolizioni", + "BrainScrambler": "Confondi cervello", + "RayGunner": "Artigliere raggio", + "MartianOfficer": "Ufficiale marziano", + "ForceBubble": "Scudo bolla", + "GrayGrunt": "Soldato grigio", + "MartianEngineer": "Ingegnere marziano", + "MartianTurret": "Torretta tesla", + "MartianDrone": "Drone marziano", + "GigaZapper": "Gigazapper", + "BoneSerpentHead": "Serpente di ossa", + "ScutlixRider": "Scutlix artigliere", + "Scutlix": "Scutlix", + "EyeofCthulhu": "Occhio di Cthulhu", + "BoneSerpentBody": "Serpente di ossa", + "BoneSerpentTail": "Serpente di ossa", + "SolarCrawltipedeHead": "Centipede", + "SolarCrawltipedeBody": "Centipede", + "SolarCrawltipedeTail": "Centipede", + "SolarDrakomire": "Drakomire", + "SolarDrakomireRider": "Cavaliere drakomire", + "SolarSroller": "Sroller", + "SolarCorite": "Corite", + "SolarSolenian": "Seleniano", + "Hornet": "Calabrone", + "ManEater": "Mangiauomini", + "ArmedZombie": "Zombie", + "ArmedZombiePincussion": "Zombie", + "ArmedZombieSlimed": "Zombie", + "ArmedZombieSwamp": "Zombie", + "ArmedZombieTwiggy": "Zombie", + "ArmedZombieCenx": "Zombie", + "UndeadMiner": "Minatore non-morto", + "GoldBird": "Uccello d'oro", + "GoldBunny": "Coniglio d'oro", + "GoldButterfly": "Farfalla d'oro", + "GoldFrog": "Rana d'oro", + "GoldGrasshopper": "Cavalletta d'oro", + "GoldMouse": "Topo d'oro", + "GoldWorm": "Verme d'oro", + "BoneThrowingSkeleton": "Scheletro", + "Tim": "Tim", + "BoneThrowingSkeleton2": "Scheletro", + "BoneThrowingSkeleton3": "Scheletro", + "BoneThrowingSkeleton4": "Scheletro", + "Bunny": "Coniglio", + "CorruptBunny": "Coniglio corrotto", + "Harpy": "Arpia", + "CaveBat": "Pipistrello della caverna", + "ServantofCthulhu": "Servo di Cthulhu", + "KingSlime": "Slime re", + "JungleBat": "Pipistrello della giungla", + "DoctorBones": "Dottor Ossa", + "TheGroom": "Lo sposo", + "Clothier": "Mercante di abiti", + "Goldfish": "Pesce rosso", + "Snatcher": "Pianta afferratrice", + "CorruptGoldfish": "Pesce rosso corrotto", + "Piranha": "Piraña", + "LavaSlime": "Slime di lava", + "EaterofSouls": "Mangiatore di anime", + "Hellbat": "Pipistrello dell'inferno", + "Vulture": "Avvoltoio", + "Demon": "Demone", + "BlueJellyfish": "Medusa blu", + "PinkJellyfish": "Medusa rosa", + "Shark": "Squalo", + "VoodooDemon": "Demone voodoo", + "Crab": "Granchio", + "DungeonGuardian": "Guardiano del dungeon", + "Antlion": "Formicaleone", + "DevourerHead": "Divoratore", + "SpikeBall": "Sfera con spuntoni", + "DungeonSlime": "Slime del dungeon", + "BlazingWheel": "Ruota ardente", + "GoblinScout": "Goblin ricognitore", + "Bird": "Uccello", + "Pixie": "Folletto", + "ArmoredSkeleton": "Scheletro corazzato", + "Mummy": "Mummia", + "DarkMummy": "Mummia scura", + "DevourerBody": "Divoratore", + "LightMummy": "Mummia chiara", + "CorruptSlime": "Slime corrotto", + "Wraith": "Fantasma", + "CursedHammer": "Martello maledetto", + "EnchantedSword": "Spada incantata", + "Mimic": "Sosia", + "Unicorn": "Unicorno", + "WyvernHead": "Viverna", + "WyvernLegs": "Viverna", + "WyvernBody": "Viverna", + "DevourerTail": "Divoratore", + "WyvernBody2": "Viverna", + "WyvernBody3": "Viverna", + "WyvernTail": "Viverna", + "GiantBat": "Pipistrello gigante", + "Corruptor": "Corruttore", + "DiggerHead": "Scavatore", + "DiggerBody": "Scavatore", + "DiggerTail": "Scavatore", + "SeekerHead": "Alimentatore del mondo", + "SeekerBody": "Alimentatore del mondo", + "AncientCultistSquidhead": "Visione antica", + "AncientDoom": "Fato antico", + "AncientLight": "Luce antica", + "BigMimicCorruption": "Sosia della Corruzione", + "BigMimicCrimson": "Sosia del Cremisi", + "BigMimicHallow": "Sosia della Consacrazione", + "BigMimicJungle": "Sosia della giungla", + "BloodZombie": "Zombie del sangue", + "Buggy": "Coleottero", + "Butcher": "Macellaio", + "Crawdad": "Gambero", + "Crawdad2": "Gambero", + "CreatureFromTheDeep": "Creatura della profondità", + "CrimsonPenguin": "Pinguino malvagio", + "CultistBoss": "Cultista lunatico", + "CultistBossClone": "Cultista lunatico", + "CultistDragonBody1": "Drago fantasma", + "CultistDragonBody2": "Drago fantasma", + "CultistDragonBody3": "Drago fantasma", + "CultistDragonBody4": "Drago fantasma", + "CultistDragonHead": "Drago fantasma", + "CultistDragonTail": "Drago fantasma", + "CultistTablet": "Tavoletta misteriosa", + "DD2AttackerTest": "???", + "DD2GoblinT3": "{$NPCName.DD2GoblinT1}", + "DD2GoblinBomberT3": "{$NPCName.DD2GoblinBomberT1}", + "DD2JavelinstT2": "{$NPCName.DD2JavelinstT1}", + "DD2JavelinstT3": "{$NPCName.DD2JavelinstT1}", + "DD2LanePortal": "Portale misterioso", + "DD2GoblinT2": "{$NPCName.DD2GoblinT1}", + "DeadlySphere": "Sfera letale", + "DemonTaxCollector": "Anima torturata", + "DesertBeast": "Basilisco", + "DesertDjinn": "Spirito del deserto", + "DesertGhoul": "Demonio", + "DesertGhoulCorruption": "Demonio disgustoso", + "DesertGhoulCrimson": "Demonio corrotto", + "DesertGhoulHallow": "Demonio sognatore", + "DesertLamiaDark": "Lamia", + "DesertLamiaLight": "Lamia", + "DesertScorpionWalk": "Bracconiere di sabbia", + "DesertScorpionWall": "Bracconiere di sabbia", + "Drippler": "Drippler", + "DrManFly": "Dottor K", + "DuneSplicerBody": "Vermedune", + "DuneSplicerHead": "Vermedune", + "DuneSplicerTail": "Vermedune", + "EnchantedNightcrawler": "Verme notturno incantato", + "GiantFlyingAntlion": "Formicaleone sciamante", + "Fritz": "Fritz", + "GiantShelly": "Guscio gigante", + "GiantShelly2": "Guscio gigante", + "GoblinSummoner": "Goblin evocatore", + "GraniteFlyer": "Elementale di granito", + "GraniteGolem": "Golem di granito", + "GreekSkeleton": "Oplita", + "Grubby": "Larva", + "LunarTowerNebula": "Colonna della nebulosa", + "LunarTowerSolar": "Colonna solare", + "LunarTowerStardust": "Colonna di polvere di stella", + "LunarTowerVortex": "Colonna del vortice", + "MartianProbe": "Sonda marziana", + "MartianSaucer": "Disco volante marziano", + "MartianSaucerCannon": "Cannone disco volante marziano", + "MartianSaucerCore": "Disco volante marziano", + "MartianSaucerTurret": "Torretta disco volante marziano", + "MartianWalker": "Camminatore marziano", + "Medusa": "Medusa", + "MoonLordCore": "Nucleo del Signore della Luna", + "MoonLordHand": "Mano del Signore della Luna", + "MoonLordHead": "Signore della Luna", + "Mothron": "Mothron", + "MothronEgg": "Uovo di mothron", + "MothronSpawn": "Piccolo mothron", + "Nailhead": "Testa di chiodo", + "NebulaBeast": "Bestia dell'evoluzione", + "NebulaBrain": "Galleggiante della nebulosa", + "NebulaHeadcrab": "Succhiacervello", + "NebulaSoldier": "Profeta", + "PartyBunny": "Coniglio", + "Psycho": "Psicopatico", + "Salamander": "Salamandra", + "Salamander2": "Salamandra", + "Salamander3": "Salamandra", + "Salamander4": "Salamandra", + "Salamander5": "Salamandra", + "Salamander6": "Salamandra", + "Salamander7": "Salamandra", + "Salamander8": "Salamandra", + "Salamander9": "Salamandra", + "SandElemental": "Elementale di sabbia", + "SandShark": "Squalo di sabbia", + "SandsharkCorrupt": "Mordiossa", + "SandsharkCrimson": "Predatore di carne", + "SandsharkHallow": "Trebbiatrice di cristallo", + "SandSlime": "Slime di sabbia", + "SlimeSpiked": "Slime chiodato", + "Sluggy": "Lumaca", + "SolarFlare": "Esplosione solare", + "SolarGoop": "Frammento solare", + "SolarSpearman": "Drakaniano", + "SquirrelGold": "Scoiattolo d'oro", + "SquirrelRed": "Scoiattolo rosso", + "StardustCellBig": "Cellula stellare", + "StardustCellSmall": "Batteria stellare", + "StardustJellyfishBig": "Invasore del flusso", + "StardustSoldier": "Astronomo", + "StardustSpiderBig": "Lancia luccichio", + "StardustSpiderSmall": "Luccichio", + "StardustWormHead": "Tessitore della Via Lattea", + "TargetDummy": "Fantoccio", + "TaxCollector": "Esattore", + "TheBride": "La sposa", + "ThePossessed": "Il posseduto", + "TombCrawlerBody": "Acaro della tomba", + "TombCrawlerHead": "Acaro della tomba", + "TombCrawlerTail": "Acaro della tomba", + "Tumbleweed": "Rotolatore arrabbiato", + "VortexHornet": "Calabrone alieno", + "VortexHornetQueen": "Regina aliena", + "VortexLarva": "Larva aliena", + "VortexRifleman": "Tuffatore tempestoso", + "VortexSoldier": "Vorticano", + "GiantWalkingAntlion": "Carica formicaleone", + "DD2GoblinBomberT2": "{$NPCName.DD2GoblinBomberT1}", + "DD2WyvernT3": "{$NPCName.DD2WyvernT1}", + "DD2WyvernT2": "{$NPCName.DD2WyvernT1}", + "DD2OgreT3": "{$NPCName.DD2OgreT2}", + "DD2WitherBeastT3": "{$NPCName.DD2WitherBeastT2}", + "DD2SkeletonT3": "{$NPCName.DD2SkeletonT1}", + "DD2KoboldWalkerT3": "{$NPCName.DD2KoboldWalkerT2}", + "DD2DrakinT3": "{$NPCName.DD2DrakinT2}", + "DD2DarkMageT3": "{$NPCName.DD2DarkMageT1}", + "DD2KoboldFlyerT3": "{$NPCName.DD2KoboldFlyerT2}", + "BabySlime": "Slime piccolo", + "BigRainZombie": "Zombie", + "BlackSlime": "Slime nero", + "DD2Bartender": "Taverniere", + "DD2Betsy": "Betsy", + "DD2DarkMageT1": "Mago oscuro", + "DD2DrakinT2": "Drakin", + "DD2EterniaCrystal": "Cristallo di Eternia", + "DD2GoblinBomberT1": "Goblin dinamitardo eteriano", + "DD2GoblinT1": "Goblin eteriano", + "DD2JavelinstT1": "Lanciatore di giavellotto eteriano", + "DD2KoboldFlyerT2": "Aliante Kobold", + "DD2KoboldWalkerT2": "Kobold", + "DD2LightningBugT3": "Insetto fulminante eteriano", + "DD2OgreT2": "Orco", + "DD2SkeletonT1": "Scheletro dell'Antico", + "DD2WitherBeastT2": "Bestia avvizzita", + "DD2WyvernT1": "Viverna eteriana", + "GreenSlime": "Slime verde", + "JungleSlime": "Slime della giungla", + "Pinky": "Mignolo", + "PurpleSlime": "Slime viola", + "RedSlime": "Slime rosso", + "Slimeling": "Slimeling", + "Slimer2": "Slimer", + "SmallRainZombie": "Zombie", + "YellowSlime": "Slime giallo", + "MoonLordFreeEye": "Vero Occhio di Cthulhu", + "MoonLordLeechBlob": "Coagulo della sanguisuga lunare", + "SkeletonMerchant": "Venditore scheletro", + "PirateShip": "Olandese volante", + "PirateShipCannon": "Cannone dell'olandese", + "BartenderUnconscious": "Uomo inconscio" + } +} \ No newline at end of file diff --git a/Localization/Content/it-IT/Projectiles.json b/Localization/Content/it-IT/Projectiles.json new file mode 100644 index 0000000..5536cf3 --- /dev/null +++ b/Localization/Content/it-IT/Projectiles.json @@ -0,0 +1,722 @@ +{ + "ProjectileName": { + "AdamantiteChainsaw": "Motosega di adamantio", + "AdamantiteDrill": "Perforatrice di adamantio", + "AdamantiteGlaive": "Alabarda di adamantio", + "Amarok": "Yo-yo", + "AmberBolt": "Saetta di ambra", + "AmethystBolt": "Saetta di ametista", + "Anchor": "Ancora", + "AncientDoomProjectile": "Fine della profezia", + "AntiGravityHook": "Uncino anti-gravità", + "Arkhalis": "Arkhalis", + "AshBallFalling": "Palla di cenere", + "BabyDino": "Dinosauro piccolo", + "BabyEater": "Mangiatore piccolo", + "BabyFaceMonster": "Mostro bambino", + "BabyGrinch": "Grinch piccolo", + "BabyHornet": "Calabrone piccolo", + "BabySkeletronHead": "Testa di Skeletron piccolo", + "BabySlime": "Slime piccolo", + "BabySnowman": "Pupazzo di neve piccolo", + "BabySpider": "Ragnetto", + "BallofFire": "Palla di fuoco", + "BallofFrost": "Palla di gelo", + "BallOHurt": "Palla del dolore", + "Bananarang": "Bananarang", + "Bat": "Pipistrello", + "BatHook": "Uncino pipistrello", + "BeachBall": "Palla da spiaggia", + "Bee": "Ape", + "BeeArrow": "Freccia ape", + "BeeHive": "Alveare", + "Beenade": "Apebomba", + "BlackBolt": "Blaster di onice", + "BlackCat": "Gatto nero", + "BlackCounterweight": "Contrappeso", + "Blizzard": "Bufera", + "BloodCloudMoving": "Nuvola di sangue", + "BloodCloudRaining": "Nuvola di sangue", + "BloodRain": "Pioggia di sangue", + "BloodWater": "Acqua sanguigna", + "BloodyMachete": "Machete insanguinato", + "BlowupSmoke": "Fumo esplosivo", + "BlowupSmokeMoonlord": "Fumo esplosivo", + "BlueCounterweight": "Contrappeso", + "BlueFairy": "Fata blu", + "BlueFlare": "Razzo blu", + "BlueMoon": "Luna blu", + "BobberFiberglass": "Bobina", + "BobberFisherOfSouls": "Bobina", + "BobberFleshcatcher": "Bobina", + "BobberGolden": "Bobina", + "BobberHotline": "Bobina", + "BobberMechanics": "Bobina", + "BobberReinforced": "Bobina", + "BobbersittingDuck": "Bobina", + "BobberWooden": "Bobina", + "Bomb": "Bomba", + "BombFish": "Pesce bomba", + "BombSkeletronPrime": "Bomba", + "Bone": "Osso", + "BoneArrow": "Freccia di ossa", + "BoneArrowFromMerchant": "Freccia di ossa", + "BoneDagger": "Pugnale di ossa", + "BoneGloveProj": "Osso X", + "BoneJavelin": "Giavellotto di ossa", + "Boulder": "Masso", + "BoulderStaffOfEarth": "Masso", + "BouncyBomb": "Bomba a rimbalzo", + "BouncyDynamite": "Dinamite a rimbalzo", + "BouncyGlowstick": "Bastone luminoso a rimbalzo", + "BouncyGrenade": "Granata a rimbalzo", + "BoxingGlove": "Guanto da boxe", + "BrainOfConfusion": "Cervello confuso", + "BrainScramblerBolt": "Saetta confondi cervello", + "Bubble": "Bolla", + "Bullet": "Proiettile", + "BulletDeadeye": "Proiettile", + "BulletHighVelocity": "Proiettile", + "BulletSnowman": "Proiettile", + "Bunny": "Coniglio", + "ButchersChainsaw": "Motosega da macellaio", + "CandyCaneHook": "Uncino di zucchero", + "CandyCorn": "Caramella", + "CannonballFriendly": "Palla di cannone", + "CannonballHostile": "Palla di cannone", + "Cascade": "Yo-yo", + "ChainGuillotine": "Ghigliottina a catena", + "ChainKnife": "Coltello a catena", + "ChargedBlasterCannon": "Cannone blaster carico", + "ChargedBlasterLaser": "Laser blaster carico", + "ChargedBlasterOrb": "Sfera blaster carica", + "Chik": "Yo-yo", + "ChlorophyteArrow": "Freccia di clorofite", + "ChlorophyteBullet": "Proiettile", + "ChlorophyteChainsaw": "Motosega di clorofite", + "ChlorophyteDrill": "Perforatrice di clorofite", + "ChlorophyteJackhammer": "Martello pneumatico di clorofite", + "ChlorophyteOrb": "Sfera di clorofite", + "ChlorophytePartisan": "Partigiana di clorofite", + "ChristmasHook": "Uncino natalizio", + "ClingerStaff": "Fiamme maledette", + "ClothiersCurse": "Teschio", + "CobaltChainsaw": "Motosega di cobalto", + "CobaltDrill": "Perforatrice di cobalto", + "CobaltNaginata": "Naginata di cobalto", + "Code1": "Yo-yo", + "Code2": "Yo-yo", + "CoinPortal": "Portale di monete", + "CompanionCube": "Cubo compagno", + "ConfettiGun": "Coriandoli", + "ConfettiMelee": "Coriandoli", + "CopperCoin": "Moneta di rame", + "CopperCoinsFalling": "Monete di rame", + "CorruptSpray": "Spruzzo corrotto", + "CorruptYoyo": "Yo-yo", + "CrimsandBallFalling": "Palla di sabbia cremisi", + "CrimsandBallGun": "Palla di sabbia cremisi", + "CrimsonHeart": "Cuore cremisi", + "CrimsonSpray": "Spruzzo cremisi", + "CrimsonYoyo": "Yo-yo", + "CrossGraveMarker": "Lapide", + "CrystalBullet": "Proiettile di cristallo", + "CrystalDart": "Dardo di cristallo", + "CrystalLeaf": "Foglia di cristallo", + "CrystalLeafShot": "Foglia di cristallo", + "CrystalPulse": "Carica di cristallo", + "CrystalPulse2": "Carica di cristallo", + "CrystalShard": "Frammento di cristallo", + "CrystalStorm": "Tempesta di cristallo", + "CrystalVileShardHead": "Frammento vile di cristallo", + "CrystalVileShardShaft": "Frammento vile di cristallo", + "Cthulunado": "Tornado di Cthulu", + "CultistBossFireBall": "Meteorite", + "CultistBossFireBallClone": "Meteorite ombra", + "CultistBossIceMist": "Foschia di ghiaccio", + "CultistBossLightningOrb": "Sfera del fulmine", + "CultistBossLightningOrbArc": "Sfera del fulmine ad arco", + "CultistBossParticle": "Energia", + "CultistRitual": "Rituale del fulmine", + "CursedArrow": "Freccia maledetta", + "CursedBullet": "Proiettile maledetto", + "CursedDart": "Dardo maledetto", + "CursedDartFlame": "Fiamma maledetta", + "CursedFlameFriendly": "Fiamma maledetta", + "CursedFlameHostile": "Fiamma maledetta", + "CursedSapling": "Arboscello maledetto", + "DangerousSpider": "Ragno pericoloso", + "DarkLance": "Lancia oscura", + "Daybreak": "Alba", + "DD2FlameBurstTowerT1": "Torre esplosiva", + "DD2FlameBurstTowerT1Shot": "Torre esplosiva", + "DD2FlameBurstTowerT2": "Torre esplosiva", + "DD2FlameBurstTowerT2Shot": "Torre esplosiva", + "DD2FlameBurstTowerT3": "Torre esplosiva", + "DD2FlameBurstTowerT3Shot": "Torre esplosiva", + "DD2JavelinHostile": "Giavellotto", + "DeadlySphere": "Sfera letale", + "DeathLaser": "Laser letale", + "DeathSickle": "Falcetto letale", + "DemonScythe": "Falce demoniaca", + "DemonSickle": "Falcetto demoniaco", + "DesertDjinnCurse": "Maledizione dello spirito del deserto", + "DiamondBolt": "Saetta di diamante", + "DirtBall": "Palla di terra", + "DrillMountCrosshair": "Mirino perforatore", + "DrManFlyFlask": "Borraccia", + "DryadsWardCircle": "Difesa della driade", + "DualHookBlue": "Uncino", + "DualHookRed": "Uncino", + "Dynamite": "Dinamite", + "EatersBite": "Morso del mangiatore", + "EbonsandBallFalling": "Palla di sabbia d'ebano", + "EbonsandBallGun": "Palla di sabbia d'ebano", + "EighthNote": "Nota", + "Electrosphere": "Elettrosfera", + "ElectrosphereMissile": "Missile elettrosfera", + "EmeraldBolt": "Saetta di smeraldo", + "EnchantedBeam": "Raggio incantato", + "EnchantedBoomerang": "Boomerang incantato", + "ExplosiveBullet": "Proiettile esplosivo", + "ExplosiveBunny": "Coniglio esplosivo", + "Explosives": "Esplosivi", + "EyeBeam": "Raggio visivo", + "EyeFire": "Occhio di fuoco", + "EyeLaser": "Occhio di laser", + "EyeSpring": "Libera occhio", + "FallingStar": "Stella cadente", + "FireArrow": "Freccia di fuoco", + "Fireball": "Meteorite", + "FireworkFountainBlue": "Fontana fuochi d'artificio", + "FireworkFountainRainbow": "Fontana fuochi d'artificio", + "FireworkFountainRed": "Fontana fuochi d'artificio", + "FireworkFountainYellow": "Fontana fuochi d'artificio", + "FishHook": "Amo", + "Flairon": "Frusta pesce drago", + "FlaironBubble": "Frusta pesce drago a bolle", + "Flamarang": "Flamarang", + "Flamelash": "Lanciatore di fiamma", + "Flames": "Fiamme", + "FlamesTrap": "Fiamme", + "FlamethrowerTrap": "Lanciafiamme", + "FlamingArrow": "Freccia infuocata", + "FlamingJack": "Zucca intagliata accesa", + "FlamingScythe": "Falce infuocata", + "FlamingWood": "Legno acceso", + "Flare": "Razzo", + "FlowerPetal": "Petalo", + "FlowerPow": "Fiore potente", + "FlowerPowPetal": "Fiore potente", + "FlyingImp": "Diavoletto volante", + "FlyingKnife": "Coltello volante", + "FlyingPiggyBank": "Salvadanaio volante", + "FormatC": "Yo-yo", + "FoulPotion": "Pozione disgustosa", + "FrostArrow": "Freccia di gelo", + "FrostBeam": "Raggio di gelo", + "FrostBlastFriendly": "Scoppio di gelo", + "FrostBlastHostile": "Scoppio di gelo", + "FrostBoltStaff": "Saetta di gelo", + "FrostBoltSword": "Saetta di gelo", + "FrostburnArrow": "Freccia da scottatura raggelante", + "FrostDaggerfish": "Pescedaga del gelo", + "FrostHydra": "Idra del gelo", + "FrostShard": "Frammento di gelo", + "FrostWave": "Ondata di gelo", + "FruitcakeChakram": "Chakram alla frutta", + "GemHookAmethyst": "Uncino di gemma", + "GemHookDiamond": "Uncino di gemma", + "GemHookEmerald": "Uncino di gemma", + "GemHookRuby": "Uncino di gemma", + "GemHookSapphire": "Uncino di gemma", + "GemHookTopaz": "Uncino di gemma", + "GeyserTrap": "Geyser", + "GiantBee": "Ape", + "GigaZapperSpear": "Punta di lancia gigazapper", + "Glowstick": "Bastone luminoso", + "GoldCoin": "Moneta d'oro", + "GoldCoinsFalling": "Monete d'oro", + "GoldenBullet": "Proiettile dorato", + "GoldenShowerFriendly": "Doccia dorata", + "GoldenShowerHostile": "Doccia dorata", + "GolemFist": "Pugno di golem", + "Gradient": "Yo-yo", + "GraveMarker": "Lapide", + "Gravestone": "Lapide", + "GreekFire1": "Fuoco greco", + "GreekFire2": "Fuoco greco", + "GreekFire3": "Fuoco greco", + "GreenCounterweight": "Contrappeso", + "GreenFairy": "Fata rosa", + "GreenLaser": "Laser verde", + "Grenade": "Granata", + "GrenadeI": "Granata", + "GrenadeII": "Granata", + "GrenadeIII": "Granata", + "GrenadeIV": "Granata", + "Gungnir": "Gungnir", + "HallowSpray": "Spruzzo consacrato", + "HallowStar": "Stella consacrata", + "Hamdrax": "Perforascia", + "HappyBomb": "Bomba allegra", + "Harpoon": "Arpione", + "HarpyFeather": "Piuma dell'arpia", + "Headstone": "Lapide", + "HeatRay": "Raggio di calore", + "HelFire": "Yo-yo", + "HellfireArrow": "Freccia di fuoco infernale", + "Hellwing": "Ala di fuoco infernale", + "HolyArrow": "Freccia sacra", + "HolyWater": "Acquasanta", + "Hook": "Uncino", + "Hornet": "Calabrone", + "HornetStinger": "Pungiglione di calabrone", + "IceBlock": "Blocco di ghiaccio", + "IceBolt": "Saetta di ghiaccio", + "IceBoomerang": "Boomerang di ghiaccio", + "IceSickle": "Falcetto di ghiaccio", + "IceSpike": "Spuntone di ghiaccio", + "IcewaterSpit": "Bava ghiacciata", + "IchorArrow": "Freccia di icore", + "IchorBullet": "Proiettile di icore", + "IchorDart": "Dardo icore", + "IchorSplash": "Spruzzo icore", + "IlluminantHook": "Uncino", + "ImpFireball": "Meteorite diavoletto", + "InfernoFriendlyBlast": "Inferno", + "InfernoFriendlyBolt": "Inferno", + "InfernoHostileBlast": "Inferno", + "InfernoHostileBolt": "Inferno", + "InfluxWaver": "Spadone dell'influsso", + "IvyWhip": "Frusta di edera", + "JackOLantern": "Zucca intagliata", + "JavelinFriendly": "Giavellotto", + "JavelinHostile": "Giavellotto", + "JestersArrow": "Freccia del giullare", + "JumperSpider": "Ragno saltatore", + "JungleSpike": "Spuntone della giungla", + "JungleYoyo": "Yo-yo", + "Kraken": "Yo-yo", + "Landmine": "Mina terrestre", + "LaserDrill": "Perforatrice laser", + "LaserMachinegun": "Mitragliatrice laser", + "LaserMachinegunLaser": "Laser", + "LastPrism": "Ultimo prisma", + "LastPrismLaser": "Ultimo prisma", + "Leaf": "Foglia", + "LightBeam": "Raggio di luce", + "LightDisc": "Disco di luce", + "LostSoulFriendly": "Anima persa", + "LostSoulHostile": "Anima persa", + "LovePotion": "Pozione d'amore", + "LunarFlare": "Razzo lunare", + "LunarHookNebula": "Uncino lunare", + "LunarHookSolar": "Uncino lunare", + "LunarHookStardust": "Uncino lunare", + "LunarHookVortex": "Uncino lunare", + "MagicDagger": "Pugnale magico", + "MagicLantern": "Lanterna magica", + "MagicMissile": "Missile magico", + "MagnetSphereBall": "Sfera a calamita", + "MagnetSphereBolt": "Sfera a calamita", + "MartianTurretBolt": "Saetta elettrica", + "MartianWalkerLaser": "Raggio laser", + "MechanicalPiranha": "Piraña meccanico", + "MechanicWrench": "Chiave inglese del meccanico", + "MedusaHead": "Raggio di medusa", + "MedusaHeadRay": "Raggio di medusa", + "Meowmere": "Miaospadone", + "Meteor1": "Meteorite", + "Meteor2": "Meteorite", + "Meteor3": "Meteorite", + "MeteorShot": "Sparo di meteorite", + "MinecartMechLaser": "Laser carrello", + "MiniMinotaur": "Mini minotauro", + "MiniRetinaLaser": "Mini laser retina", + "MiniSharkron": "Mini squalo volante", + "Missile": "Missile", + "MolotovCocktail": "Molotov", + "MolotovFire": "Fuoco molotov", + "MolotovFire2": "Fuoco molotov", + "MolotovFire3": "Fuoco molotov", + "MoonLeech": "Sanguisuga lunare", + "MoonlordArrow": "Freccia di luminite", + "MoonlordArrowTrail": "Freccia di luminite", + "MoonlordBullet": "Proiettile di luminite", + "MoonlordTurret": "Portale lunare", + "MoonlordTurretLaser": "Laser portale lunare", + "MudBall": "Palla di fango", + "Mushroom": "Fungo", + "MushroomSpear": "Lancia a fungo", + "MushroomSpray": "Spruzzo di fungo", + "MythrilChainsaw": "Motosega di mitrilio", + "MythrilDrill": "Perforatrice di mitrilio", + "MythrilHalberd": "Alabarda di mitrilio", + "Nail": "Chiodo", + "NailFriendly": "Chiodo", + "NanoBullet": "Nano-proiettile", + "NebulaArcanum": "Arcanum di nebulosa", + "NebulaArcanumExplosionShot": "Arcanum di nebulosa", + "NebulaArcanumExplosionShotShard": "Arcanum di nebulosa", + "NebulaArcanumSubshot": "Arcanum di nebulosa", + "NebulaBlaze1": "Esplosione nebulosa", + "NebulaBlaze2": "Esplosione nebulosa X", + "NebulaBolt": "Penetrazione della nebulosa", + "NebulaChainsaw": "Motosega della nebulosa", + "NebulaDrill": "Perforatrice della nebulosa", + "NebulaEye": "Occhio della nebulosa", + "NebulaLaser": "Laser della nebulosa", + "NebulaSphere": "Sfera della nebulosa", + "NettleBurstEnd": "Ortica a getto", + "NettleBurstLeft": "Ortica a getto", + "NettleBurstRight": "Ortica a getto", + "NightBeam": "Raggio notturno", + "None": "", + "NorthPoleSnowflake": "Polo Nord", + "NorthPoleSpear": "Polo Nord", + "NorthPoleWeapon": "Polo Nord", + "NurseSyringeHeal": "Siringa", + "NurseSyringeHurt": "Siringa", + "Obelisk": "Lapide", + "ObsidianSwordfish": "Pesce spada di ossidiana", + "OneEyedPirate": "Pirata con benda", + "OrichalcumChainsaw": "Motosega di oricalco", + "OrichalcumDrill": "Perforatrice di oricalco", + "OrichalcumHalberd": "Alabarda di oricalco", + "OrnamentFriendly": "Ornamento", + "OrnamentHostile": "Ornamento", + "OrnamentHostileShrapnel": "Ornamento", + "PainterPaintball": "Paintball", + "PaladinsHammerFriendly": "Martello del paladino", + "PaladinsHammerHostile": "Martello del paladino", + "PalladiumChainsaw": "Motosega di palladio", + "PalladiumDrill": "Perforatrice di palladio", + "PalladiumPike": "Picca di palladio", + "Parrot": "Pappagallo", + "PartyBullet": "Proiettile festivo", + "PartyGirlGrenade": "Granata di coriandoli", + "PearlSandBallFalling": "Palla di sabbia perlata", + "PearlSandBallGun": "Palla di sabbia perlata", + "Penguin": "Pinguino", + "PetLizard": "Lucertola", + "Phantasm": "Fantasma", + "PhantasmalBolt": "Saetta fantasma", + "PhantasmalDeathray": "Raggio mortale fantasma", + "PhantasmalEye": "Occhio fantasma", + "PhantasmalSphere": "Sfera fantasma", + "PhantasmArrow": "Fantasma", + "PhasicWarpDisc": "", + "PhasicWarpEjector": "", + "PineNeedleFriendly": "Ago di abete", + "PineNeedleHostile": "Ago di abete", + "PinkFairy": "Fata rosa", + "PinkLaser": "Laser rosa", + "PirateCaptain": "Pirata capitano", + "PlatinumCoin": "Moneta di platino", + "PlatinumCoinsFalling": "Monete di platino", + "PoisonDart": "Dardo di veleno", + "PoisonDartBlowgun": "Dardo di veleno", + "PoisonDartTrap": "Dardo di veleno", + "PoisonedKnife": "Coltello avvelenato", + "PoisonFang": "Zanna velenosa", + "PoisonSeedPlantera": "Seme velenoso", + "PortalGun": "Pistola del portale", + "PortalGunBolt": "Saetta del portale", + "PortalGunGate": "Porta del portale", + "PossessedHatchet": "Accetta posseduta", + "Present": "Regalo", + "ProximityMineI": "Mina di prossimità", + "ProximityMineII": "Mina di prossimità", + "ProximityMineIII": "Mina di prossimità", + "ProximityMineIV": "Mina di prossimità", + "PulseBolt": "Saetta a impulsi", + "Puppy": "Cucciolo", + "PureSpray": "Spruzzo puro", + "PurificationPowder": "Polvere purificatrice", + "PurpleCounterweight": "Contrappeso", + "PurpleLaser": "Laser viola", + "Pygmy": "Pigmeo", + "Pygmy2": "Pigmeo", + "Pygmy3": "Pigmeo", + "Pygmy4": "Pigmeo", + "PygmySpear": "Pigmeo", + "QuarterNote": "Nota", + "RainbowBack": "Arcobaleno", + "RainbowCrystal": "Cristallo dell'arcobaleno", + "RainbowCrystalExplosion": "Esplosione dell'arcobaleno", + "RainbowFront": "Arcobaleno", + "RainbowRodBullet": "Arcobaleno", + "RainCloudMoving": "Nuvola di pioggia", + "RainCloudRaining": "Nuvola di pioggia", + "RainFriendly": "Pioggia", + "RainNimbus": "Pioggia", + "Rally": "Yo-yo", + "Raven": "Corvo", + "RayGunnerLaser": "Raggio laser", + "RedCounterweight": "Contrappeso", + "RedsYoyo": "Yo-yo", + "Retanimini": "Mini Retinazer", + "RichGravestone1": "Lapide", + "RichGravestone2": "Lapide", + "RichGravestone3": "Lapide", + "RichGravestone4": "Lapide", + "RichGravestone5": "Lapide", + "RocketFireworkBlue": "Razzo", + "RocketFireworkGreen": "Razzo", + "RocketFireworkRed": "Razzo", + "RocketFireworksBoxBlue": "Razzo", + "RocketFireworksBoxGreen": "Razzo", + "RocketFireworksBoxRed": "Razzo", + "RocketFireworksBoxYellow": "Razzo", + "RocketFireworkYellow": "Razzo", + "RocketI": "Razzo", + "RocketII": "Razzo", + "RocketIII": "Razzo", + "RocketIV": "Razzo", + "RocketSkeleton": "Razzo", + "RocketSnowmanI": "Razzo", + "RocketSnowmanII": "Razzo", + "RocketSnowmanIII": "Razzo", + "RocketSnowmanIV": "Razzo", + "RopeCoil": "Bobina di corda", + "RottenEgg": "Uovo marcio", + "RubyBolt": "Saetta di rubino", + "RuneBlast": "Scoppio runico", + "SalamanderSpit": "Bava velenosa", + "SandBallFalling": "Palla di sabbia", + "SandBallGun": "Palla di sabbia", + "SandnadoFriendly": "Tempesta antica", + "SandnadoHostile": "Tempesta antica", + "SandnadoHostileMark": "Tempesta antica", + "SantaBombs": "Decorazione natalizia", + "Sapling": "Arboscello", + "SapphireBolt": "Saetta di zaffiro", + "SaucerDeathray": "Raggio mortale marziano", + "SaucerLaser": "Laser di disco volante", + "SaucerMissile": "Razzo marziano", + "SaucerScrap": "Resti di disco volante", + "SawtoothShark": "Pesce sega", + "ScutlixLaser": "Laser", + "ScutlixLaserCrosshair": "Mirino Scutlix", + "ScutlixLaserFriendly": "Laser Scutlix", + "Seed": "Seme", + "SeedlerNut": "Spargisemi", + "SeedlerThorn": "Spargisemi", + "SeedPlantera": "Seme", + "ShadowBeamFriendly": "Raggio d'ombra", + "ShadowBeamHostile": "Raggio d'ombra", + "ShadowFlame": "Fiamma d'ombra", + "ShadowFlameArrow": "Freccia fiamma d'ombra", + "ShadowFlameKnife": "Coltello fiamma d'ombra", + "Shadowflames": "Fiamme d'ombra", + "ShadowOrb": "Sfera d'ombra", + "Sharknado": "Tornado di squali", + "SharknadoBolt": "Saetta tornado di squali", + "Shuriken": "Shuriken", + "SilkRopeCoil": "Bobina di corda", + "SiltBall": "Palla insabbiata", + "SilverCoin": "Moneta d'argento", + "SilverCoinsFalling": "Monete d'argento", + "SkeletonBone": "Osso", + "SkeletronHand": "Mano di Skeletron", + "Skull": "Teschio", + "SkyFracture": "Frattura celeste", + "SlimeGun": "Pistola slime", + "SlimeHook": "Uncino slime", + "SlushBall": "Palla di fanghiglia", + "SmokeBomb": "Bomba fumogena", + "SniperBullet": "Proiettile da cecchino", + "SnowBallFriendly": "Palla di neve", + "SnowBallHostile": "Palla di neve", + "SolarCounter": "Splendore solare", + "SolarFlareChainsaw": "Motosega esplosione solare", + "SolarFlareDrill": "Perforatrice esplosione solare", + "SolarFlareRay": "Esplosione solare", + "SolarWhipSword": "Eruzione solare", + "SolarWhipSwordExplosion": "Eruzione solare", + "SoulDrain": "Sottrazione anima", + "SoulscourgePirate": "Pirata flagello", + "Spark": "Scintilla", + "Spazmamini": "Mini Spazmatism", + "Spear": "Lancia", + "SpearTrap": "Lancia", + "SpectreWrath": "Ira spettrale", + "SpelunkerGlowstick": "Bastone luminoso da speleologo", + "Spider": "Ragno", + "SpiderEgg": "Uovo di ragno", + "SpiderHiver": "Torretta del ragno", + "Spike": "Spuntone", + "SpikedSlimeSpike": "Spuntone slime", + "SpikyBall": "Palla chiodata", + "SpikyBallTrap": "Palla chiodata", + "SpiritFlame": "Fiamma dello spirito", + "SpiritHeal": "Cura spettrale", + "SporeCloud": "Nuvola di spore", + "SporeGas": "Spora", + "SporeGas2": "Spora", + "SporeGas3": "Spora", + "SporeTrap": "Spora", + "SporeTrap2": "Spora", + "Squashling": "Piccola zucca", + "Stake": "Paletto", + "StarAnise": "Shuriken di anice", + "StardustCellMinion": "Batteria di polvere di stella", + "StardustCellMinionShot": "Cellula di polvere di stella", + "StardustChainsaw": "Motosega di polvere di stella", + "StardustDragon1": "Drago di polvere di stella", + "StardustDragon2": "Drago di polvere di stella", + "StardustDragon3": "Drago di polvere di stella", + "StardustDragon4": "Drago di polvere di stella", + "StardustDrill": "Perforatrice di polvere di stella", + "StardustGuardian": "Guardiano di polvere di stella", + "StardustGuardianExplosion": "Esplosione stellare", + "StardustJellyfishSmall": "Invasore del flusso", + "StardustSoldierLaser": "Laser di polvere di stella", + "StardustTowerMark": "Marchio stellare", + "Starfury": "Furia stellare", + "StarWrath": "Ira stellare", + "StaticHook": "Uncino statico", + "StickyBomb": "Bomba appiccicosa", + "StickyDynamite": "Dinamite appiccicosa", + "StickyGlowstick": "Bastone luminoso appiccicoso", + "StickyGrenade": "Granata appiccicosa", + "Stinger": "Artiglio", + "Stynger": "Lanciaframmenti", + "StyngerShrapnel": "Lanciaframmenti", + "Sunfury": "Furia del sole", + "SuspiciousTentacle": "Tentacolo sospetto", + "SwordBeam": "Raggio della spada", + "Swordfish": "Pesce spada", + "Tempest": "Tempesta", + "TendonHook": "Uncino", + "TerraBeam": "Raggio di terra", + "Terrarian": "Terrariano", + "TerrarianBeam": "Terrariano", + "TheDaoofPow": "Frustona", + "TheEyeOfCthulhu": "Yo-yo", + "TheMeatball": "Il macellaio", + "TheRottedFork": "Il forcone marcio", + "ThornBall": "Palla di rovi", + "ThornChakram": "Artiglio di Chakram", + "ThornHook": "Uncino", + "ThrowingKnife": "Coltello da lancio", + "TiedEighthNote": "Nota", + "TikiSpirit": "Spirito tiki", + "TinyEater": "Mangiatore minuscolo", + "TitaniumChainsaw": "Motosega di titanio", + "TitaniumDrill": "Perforatrice di titanio", + "TitaniumTrident": "Tridente di titanio", + "Tombstone": "Lapide", + "TopazBolt": "Saetta di topazio", + "TowerDamageBolt": "Energia rilasciata", + "ToxicBubble": "Bolla tossica", + "ToxicCloud": "Nuvola tossica", + "ToxicCloud2": "Nuvola tossica", + "ToxicCloud3": "Nuvola tossica", + "ToxicFlask": "Borraccia tossica", + "TrackHook": "Gancio da binario", + "Trident": "Tridente", + "Truffle": "Tartufo", + "TruffleSpore": "Spora di tartufo", + "Turtle": "Tartaruga", + "Twinkle": "Luccichio", + "Typhoon": "Tifone", + "UFOLaser": "Raggio UFO", + "UFOMinion": "UFO", + "UnholyArrow": "Freccia empia", + "UnholyTridentFriendly": "Tridente profano", + "UnholyTridentHostile": "Tridente profano", + "UnholyWater": "Acqua profana", + "ValkyrieYoyo": "Yo-yo", + "Valor": "Yo-yo", + "VampireHeal": "Cura da vampiro", + "VampireKnife": "Coltello da vampiro", + "VenomArrow": "Freccia di tossina", + "VenomBullet": "Proiettile di tossina", + "VenomFang": "Zanna tossica", + "VenomSpider": "Ragno tossico", + "ViciousPowder": "Polvere malvagia", + "VilePowder": "Polvere disgustosa", + "VilethornBase": "Spina vile", + "VilethornTip": "Spina vile", + "VineRopeCoil": "Bobina di viticcio", + "VortexAcid": "Sostanza viscida aliena", + "VortexBeater": "Battitore vortice", + "VortexBeaterRocket": "Razzo vortice", + "VortexChainsaw": "Motosega vortice", + "VortexDrill": "Perforatrice vortice", + "VortexLaser": "Laser vortice", + "VortexLightning": "Fulmine vortice", + "VortexVortexLightning": "Vortice", + "VortexVortexPortal": "Vortice", + "Wasp": "Vespa", + "WaterBolt": "Dardo d'acqua", + "WaterGun": "Pistola ad acqua", + "WaterStream": "Ruscello", + "Web": "Ragnatela", + "WebRopeCoil": "Bobina di corda", + "WebSpit": "Sputo di ragnatela", + "WireKite": "Grande schema", + "Wisp": "Fiammella", + "WoodenArrowFriendly": "Freccia di legno", + "WoodenArrowHostile": "Freccia di legno", + "WoodenBoomerang": "Boomerang di legno", + "WoodHook": "Uncino di legno", + "WoodYoyo": "Yo-yo", + "WormHook": "Uncino", + "Xenopopper": "Xenopopper", + "Yelets": "Yo-yo", + "YellowCounterweight": "Contrappeso", + "ZephyrFish": "Pesce zefiro", + "Ale": "Birra", + "ApprenticeStaffT3Shot": "Ira di Betsy", + "BookStaffShot": "Tomo della saggezza infinita", + "DD2ApprenticeStorm": "Turbine della saggezza infinita", + "DD2BallistraProj": "Balestra", + "DD2BallistraTowerT1": "Balestra", + "DD2BallistraTowerT2": "Balestra", + "DD2BallistraTowerT3": "Balestra", + "DD2BetsyArrow": "Flagello aereo", + "DD2BetsyFireball": "Meteorite di Betsy", + "DD2BetsyFlameBreath": "Respiro di Betsy", + "DD2DarkMageBolt": "Energia oscura", + "DD2DarkMageHeal": "Sigillo oscuro", + "DD2DarkMageRaise": "Sigillo oscuro", + "DD2DrakinShot": "Drakin", + "DD2ElderWins": "Fine macabra", + "DD2ExplosiveTrapT1": "Trappola esplosiva", + "DD2ExplosiveTrapT1Explosion": "Trappola esplosiva", + "DD2ExplosiveTrapT2": "Trappola esplosiva", + "DD2ExplosiveTrapT2Explosion": "Trappola esplosiva", + "DD2ExplosiveTrapT3": "Trappola esplosiva", + "DD2ExplosiveTrapT3Explosion": "Trappola esplosiva", + "DD2GoblinBomb": "Bomba goblin", + "DD2LightningAuraT1": "Aura fulminante", + "DD2LightningAuraT2": "Aura fulminante", + "DD2LightningAuraT3": "Aura fulminante", + "DD2LightningBugZap": "Saetta indebolita", + "DD2OgreSmash": "Pedata dell'orco", + "DD2OgreSpit": "Sputo dell'orco", + "DD2OgreStomp": "Pedata dell'orco", + "DD2PetDragon": "Hoardagron", + "DD2PetGato": "Eligato", + "DD2PetGhost": "Flickerwick", + "DD2PhoenixBow": "Fenice fantasma", + "DD2PhoenixBowShot": "Fenice fantasma", + "DD2SquireSonicBoom": "Fendente sincero", + "DD2Win": "Vittoria!", + "MonkStaffT1": "Octopode assonnato", + "MonkStaffT1Explosion": "Spacca canna", + "MonkStaffT2": "Alabarda spettrale", + "MonkStaffT2Ghast": "Spaventoso", + "MonkStaffT3": "Furia del drago del cielo", + "MonkStaffT3_Alt": "Furia del drago del cielo", + "MonkStaffT3_AltShot": "Furia del drago del cielo", + "DD2JavelinHostileT3": "{$ProjectileName.DD2JavelinHostile}", + "Celeb2Rocket": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketExplosive": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketLarge": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketLargeExplosive": "{$ProjectileName.Celeb2Weapon}" + } +} \ No newline at end of file diff --git a/Localization/Content/it-IT/Town.json b/Localization/Content/it-IT/Town.json new file mode 100644 index 0000000..f1142b9 --- /dev/null +++ b/Localization/Content/it-IT/Town.json @@ -0,0 +1,228 @@ +{ + "DryadSpecialText": { + "WorldStatusAll": "{0} è {1}% consacrato, {2}% corrotto e {3}% cremisi.", + "WorldStatusHallowCorrupt": "{0} è {1}% consacrato e {2}% corrotto.", + "WorldDescriptionGrim": "Le cose vanno davvero male...", + "WorldDescriptionWork": "Hai un sacco di lavoro da fare.", + "WorldDescriptionClose": "Ci sei quasi!", + "WorldStatusHallowCrimson": "{0} è {1}% consacrato e {2}% cremisi.", + "WorldStatusCorruptCrimson": "{0} è {1}% corrotto e {2}% cremisi.", + "WorldStatusCorrupt": "{0} è {1}% corrotto.", + "WorldStatusCrimson": "{0} è {1}% cremisi.", + "WorldStatusHallow": "{0} è {1}% consacrato.", + "WorldStatusPure": "Hai purificato completamente {0}. Hai fatto un lavoro fantastico!", + "WorldDescriptionBalanced": "Il mondo è in equilibrio.", + "WorldDescriptionFairyTale": "Viviamo in una favola.", + "Party": "Ho pensato di organizzare una festa per celebrare le nostre vittorie passate e quelle future.", + "AfterDD2Tier1": "Quando ero a Etheria, avevo nostalgia di {WorldName}. È bello essere di nuovo qui.", + "AfterDD2Tier2": "La Corruzione ha cercato di conquistarmi ad Etheria e io invece ho usato il suo potere contro l'esercito dell'Antico!" + }, + "DyeTraderSpecialText": { + "HasPlant_0": "Fantastico! Mi hai portato un campione straordinario dei colori e aromi più belli del mondo. In cambio prendi questa bottiglia speciale di tintura.", + "HasPlant_1": "Mi hai portato un fiore bellissimo e raro, eh? Prendi in cambio questa bottiglia di tintura speciale!", + "HasPlant_2": "Che meraviglia! Con questo campione delicato, potrei mischiare le tinture più belle che si siano mai viste a {WorldName}! Questa qui te la do subito!", + "NoPlant_0": "Oh no no, così non va bene. Per una tale cifra non basta, devi tornare qui con un campione di pianta raro!", + "NoPlant_1": "Credi di poter prendere per il naso {DyeTrader}? Ti sbagli di grosso! Io compro soltanto i fiori più rari per queste bottigliette speciali!", + "NoPlant_2": "Queste bottigliette di tintura? Mi dispiace, non sono in vendita. Per una di queste mi devi portare i fiori più preziosi e rari!", + "Party": "Adoro le feste. Sono piene di colori magnifici e gente allegra." + }, + "GuideSpecialText": { + "Party": "Non vai mai alle feste? Dai un'occhiata alla gente in giro. A volte gli invitati portano dei regalini speciali." + }, + "MerchantSpecialText": { + "Party": "Sai quale sarebbe il modo migliore di festeggiare? Comprando oggetti per gli altri... da me ovviamente." + }, + "GoblinTinkererSpecialText": { + "Party": "Le feste dei goblin sono molto simili a quelle degli umani. Entrambi fanno giochi tipo \"Dai la colpa all'umano\" ehm... Alle mie feste non c'è quel genere di giochi." + }, + "WitchDoctorSpecialText": { + "Party": "Volevo vedere come festeggia la tua razza e quello che vedo non mi ha deluso.", + "AfterDD2Tier1": "Percepisco uno spirito affine tra i maghi oscuri eteriani. Peccato che siano nostri nemici, mi sarebbe piaciuto imparare da loro." + }, + "ClothierSpecialText": { + "Party": "La mia mamma diceva sempre che bisogna lasciarsi il passato alle spalle prima di poter festeggiare." + }, + "TravellingMerchantSpecialText": { + "Party": "Molti dicono che le feste ti lasciano i ricordi più belli. Quindi compra qualcosa, così ti resterà un bel ricordo!" + }, + "MechanicSpecialText": { + "Party": "Secondo te importa se al posto delle candele sulla torta metto delle lampadine?" + }, + "BartenderSpecialText": { + "AfterDD2Tier1": "Ottimo lavoro contro l'esercito dell'Antico! Ma scommetto che torneranno. Stavolta non ce l'hanno messa tutta.", + "AfterDD2Tier2": "L'esercito dell'Antico diventa sempre più forte, eppure tu continui a respingerlo! Ma qualcosa mi dice che non hanno ancora finito con noi.", + "AfterDD2Tier3": "Hai davvero tenuto a bada l'esercito dell'Antico? Forse prima o poi dovresti visitare Etheria.", + "BeforeDD2Tier1": "Dovresti davvero fare qualcosa contro questo esercito dell'Antico. Chiedimi del cristallo di Eternia se vuoi saperne di più.", + "FirstHelp": "Per cominciare, prendi alcune di queste medaglie di difesa, offro io! Ho delle difese speciali che puoi acquistare, ma soltanto spendendo medaglie di difesa!", + "FirstMeeting": "Uh? Come sono finito qua? L'ultima cosa che ricordo è un portale che si apriva davanti a me..." + }, + "PartyGirlSpecialText": { + "Party_1": "Uhm... Oggi non c'è niente di speciale... Stavo scherzando! C'è una festa e poi un dopo-festa!", + "Party_2": "Finalmente è arrivato il mio momento!", + "AfterDD2Tier1": "Hai mai visto un orco? Io voglio cavalcarne uno!" + }, + "PirateSpecialText": { + "Party": "Dopo tutta quella torta puoi chiamarmi Barbabianca per un po'." + }, + "TruffleSpecialText": { + "Party": "Avrei invitato tutti a festeggiare a casa mia, ma ho finito i funghi." + }, + "NurseSpecialText": { + "Party": "No, non ti dirò quante candeline ci sono sulla mia torta." + }, + "WizardSpecialText": { + "Party": "Io organizzo le feste più magiche e si vede.", + "AfterDD2Tier1": "Sai, credo di aver già visto un portale così in passato, ma era d'oro." + }, + "CyborgSpecialText": { + "Party": "Questa sarà una festa da pazzi... e anche da svitati!" + }, + "DemolitionistSpecialText": { + "Party": "Oggi ti consiglio di fare attenzione. Noi nani organizziamo feste piuttosto esplosive.", + "AfterDD2Start": "Non capisco perché non possiamo semplicemente far saltare in aria quei portali." + }, + "ArmsDealerSpecialText": { + "Party": "Le feste sono fantastiche per spingere la gente a uscire dal guscio, un po' come i proiettili." + }, + "StylistSpecialText": { + "Party": "Mi sono fatta fare i capelli per l'occasione ma, detto sinceramente, ho soltanto voglia di far scoppiare i palloncini con le forbici." + }, + "PainterSpecialText": { + "Party": "Ho provato a organizzare una battaglia di paintball e invece tutti volevano cibo e festoni." + }, + "AnglerSpecialText": { + "Party": "Che credi? Che mi piacciono le feste perché sono un bambino? Beh, hai ragione, quindi scateniamoci!" + }, + "AnglerQuestText": { + "NoQuest_1": "Non ho niente da affidarti in questo momento.", + "NoQuest_2": "Mi hai intrattenuto abbastanza per oggi. Vai via.", + "NoQuest_3": "Non c'è altro da fare, il grande {Angler} ti congeda!", + "NoQuest_4": "Soltanto un pesce al giorno. Ti prego di andartene!", + "NoQuest_5": "Non ho neanche usato l'ultimo pesce che mi hai dato. Non me ne serve un altro.", + "TurnIn_1": "Oh! Grazie per il pesce che ti avevo chiesto. Ora però smamma!", + "TurnIn_2": "Ottima pesca! Sta andando tutto secondo i piani! Eh eh eh!", + "TurnIn_3": "Fai sempre quello che ti dico! Ora però vattene!", + "TurnIn_4": "Ahahaha! Ce l'hai fatta! Però non ti è successo niente di brutto, che noia!", + "TurnIn_5": "Wow! Hai fatto davvero come ti ho chiesto e sei ancora in vita! Bene. Dammelo e smamma!", + "Quest_Batfish": "Na na na na na na na Bat-pesce! Questo significa vai sotto terra, prendilo e riportamelo!\n\n(Catturato in sotterranei e caverne)", + "Quest_BumblebeeTuna": "Le giungle sotterranee di {WorldName} contengono tante cose strane! Per esempio ho visto un pesce che sembrava davvero un calabrone gigante! Ho l'allergia alle api, quindi devi catturarlo tu al posto mio! Scommetto che ha il sapore di un panino al tonno!\n\n(Catturato nel miele)", + "Quest_Catfish": "Finalmente ho trovato un gatto della giungla che ama l'acqua! Forse perché in parte è anche un pesce. Non so come sia successo e non mi interessa. Lo voglio e basta... E vedi di fare in fretta!\n\n(Catturato nella giungla, in superficie)", + "Quest_Cloudfish": "Pare che esistano delle isole che fluttuano nel cielo e nascondono dei tesori favolosi! Ma che importa. La cosa più bella è che a volte nelle nuvole si formano dei laghi e in questi laghi si trovano i pesci fatti di nuvole! Voglio sapere che sapore hanno, quindi ti conviene andare a catturarmene uno!\n\n(Catturato nei laghi celesti)", + "Quest_Cursedfish": "C'è un pesce maledetto che nuota nelle acque più contaminate che esistano! È stato creato con le fiamme maledette degli eroi caduti che si aggirano laggiù. Dicono che nemmeno l'acqua possa spegnere questo fuoco perché brucia eterno. Ho in mente parecchie cose fantastiche che potrei fare con un pesce così! Lo vai a catturare per me o hai troppa paura?!\n\n(Catturato nella Corruzione)", + "Quest_DynamiteFish": "L'esperto in demolizioni era su tutte le furie per aver perso un candelotto di dinamite nel lago della foresta. Eppure ne ha così tanti. Quindi, che importanza ha? Probabilmente perché gli sono cresciute le pinne e se ne è andato via nuotando! Non so dove prenda il materiale per creare quelle cose, ma quello è sicuramente posseduto! Pescalo e portamelo. Ho sempre voluto un pesce kamikaze! Non chiedermi perché...\n\n(Catturato in superficie)", + "Quest_EaterofPlankton": "Scommetto che non hai il coraggio necessario per trovare il Mangiaplankton. Un pesce contaminato mutato da un trancio del Mangiatore di mondi! Catturalo e portamelo per dimostrarmi che non sei una mezza calzetta!\n\n(Catturato nella Corruzione)", + "Quest_FallenStarfish": "Adoro collezionare quelle stelle luminose che cadono dal cielo! E mi piace ancora di più quando finiscono in testa a qualcuno. Ma... una stella che cade in un lago forestale e si trasforma in un pesce è il massimo! È davvero fenomenale e lo saresti anche tu se me la portassi!\n\n(Catturato nei laghi celesti)", + "Quest_TheFishofCthulu": "A quanto pare, gli Occhi del Demone a volte sono anfibi. Non volano... Nuotano! Chissà che faccia farebbe una persona se li trovasse nella vasca da bagno! Di solito sono sempre nelle stesse zone... Quindi vai a pescarne uno!\n\n(Catturato nei laghi celesti e in superficie)", + "Quest_Fishotron": "Non so se sia meglio un pesce ossa o un pesce ossa CON LE MANI. Il pescetron che bazzica nelle caverne fa davvero paura! Credo che sia posseduto dagli stessi spiriti malvagi che possedevano quel vecchio nei pressi dei sotterranei! Ti sfido a catturarlo!\n\n(Catturato nelle caverne)", + "Quest_Harpyfish": "Stavo cercando di dormire dalle parti del lago quando un pesce è arrivato giù in picchiata. Volava! Aveva il volto di una donna e le piume! Credo di aver urlato più forte di lei! Ehi, tu! Vai a fargliela pagare per avermi terrorizzato!\n\n(Catturato nei laghi celesti e in superficie)", + "Quest_Hungerfish": "C'è un pezzo dell'Affamato che si è trasformato dal Muro di carne in un pesciolino che nuota senza meta negli Inferi. È bruttissimo, disgustoso, ma lo voglio!\n\n(Catturato nelle caverne)", + "Quest_Ichorfish": "Sai che nella profondità del Cremisi, ci sono delle creature che emettono una sostanza gialla schifosa? Ho sentito una storia assurda di uno stagno di questa sostanza che si è fusa dando vita a un pesce che nuota! Catturamelo, così posso nasconderlo nel bagno di qualcuno!\n\n(Catturato nel Cremisi)", + "Quest_Jewelfish": "Oooooohhh, diventerò ricco sfondato! Nelle caverne c'è un pesce fatto di gemme! Non chiedermi come sia possibile perché non lo so. So soltanto che è meraviglioso e che tu andrai a catturarlo per me!\n\n(Catturato in sotterranei e caverne)", + "Quest_MirageFish": "Nella Consacrazione ci sono delle creature interessanti, credimi! Sono di questo colore viola assurdo che mi confonde la vista! Una meraviglia, quindi voglio che tu catturi per me uno di quei pesci!\n\n(Catturato nella Consacrazione sotterranea)", + "Quest_MutantFlinxfin": "Che cos'è di colore bianco e sabbia, è peloso e vive nel lago ghiacciato sotterraneo? Un pesceflinx mutante! Non era un indovinello. Questa varietà esiste davvero, è una mutazione del flinx che si è adattata allo stile di vita acquatico! Ora voglio che si adatti alla mia boccia, quindi fai in modo di farcelo finire dentro!\n\n(Catturato nella tundra sotterranea)", + "Quest_Pengfish": "È una balena! È un delfino! No, è un pesce pinguino! Oh, guarda chi c'è! Me ne porti uno? Lo sai che vivono soltanto nell'acqua gelida, vero?\n\n(Catturato nella tundra)", + "Quest_Pixiefish": "C'è un tipo di fatina rarissima che nasce con così tante ali da essere capace di volare! Nuota con i pesci nel lago, circondata da quell'erba blu colorata. Il mio acquario ha bisogno di una lampada, quindi voglio che tu vada a catturare quella fatina!\n\n(Catturato nella Consacrazione)", + "Quest_Spiderfish": "Ho visto un pesce con otto zampe! No! Non ci contare! Dovrai andare a pescarlo tu, così quando lo avrò tra le mani non sarà vivo! Non mi addentrerò mai più nella caverna per pescare!\n\n(Catturato in sotterranei e caverne)", + "Quest_UnicornFish": "Gli unicorni e gli arcobaleni sono fantastici! Si trovano ovunque, persino in acqua. Dico sul serio. Ho visto un pesce unicorno nel lago della Consacrazione! Dovrai pescarlo e regalarmelo, perché lo voglio come animale domestico!\n\n(Catturato nella Consacrazione)", + "Quest_GuideVoodooFish": "Quei demoni negli inferi adorano le bambole vodoo, ma credo che stavolta abbiano un po' esagerato con la magia! Una di loro si è trasformata in un pesce. Ti sfido ad andare a prendermela! Fai attenzione alla lava bollente perché ti brucerà a morte e non potrai portarmi quel pesce!\n\n(Catturato nelle caverne)", + "Quest_Wyverntail": "Io so una cosa che tu non sai, pappapero! E va bene, te la dico. C'è una creatura terrificante che vola tra le stelle! Non me lo sono inventato! Si chiama viverna! Ma... ma tu lo sapevi già, eh? Beh, quello che non sai è che alla nascita è un girino! Quindi in pratica sono come... rane, ecco! Datti da fare e vai a prendermene una!\n\n(Catturato nei laghi celesti)", + "Quest_ZombieFish": "Non ci crederai mai! Di notte ho catturato un pesce nella foresta che era già morto! Ha cercato di divorarmi! L'ho gettato via e sono scappato! Ora vorrei metterlo nella credenza di qualcuno per vedere che cosa succede, quindi vai a recuperarlo per me, ok?\n\n(Catturato in superficie)", + "Quest_AmanitaFungifin": "Ho scoperto un posto spettacolare pieno di funghi giganti luminosi! Era tutto blu! Stavo raccogliendo alcuni funghi che ho trovato vicino a un lago blu luccicante, quando uno di questi mi ha azzannato ed è scappato via nuotando! Voglio dargli un bel morso e fargliela pagare! In pratica, dovrai catturarlo per me!\n\n(Catturato nei campi di funghi luminosi)", + "Quest_Angelfish": "Sai che esiste un'isola magica che fluttua alta nel cielo? Scommetto di no! Se gli angeli vivono in cielo, secondo me sono dotati di pinne e branchie e sanno nuotare! Direi proprio che devi portarmene uno!\n\n(Catturato nei laghi celesti)", + "Quest_BloodyManowar": "Ahi! Non ti avvicinare! Mi ha punto una medusa sanguinolenta! Se non sai che cosa sia, è la medusa più pericolosa di {WorldName}! Vai in quel maledetto Cremisi e catturala se ne hai il coraggio!\n\n(Catturato nel Cremisi)", + "Quest_Bonefish": "Di solito non mi interessa se vedo ossa di pesce che galleggiano, ma queste stavano proprio nuotando! Credevi che solo gli scheletri umani si aggirassero ancora in {WorldName}? Cattura quella creatura, così posso nasconderla nel letto di qualcuno!\n\n(Catturato in sotterranei e caverne)", + "Quest_Bunnyfish": "Ero nella foresta a pescare, no? E indovina cosa è successo! Mi è saltato addosso un coniglio! Poi un altro... e un altro... Mi sono ritrovato improvvisamente circondato dai conigli! Uno mi è anche saltato addosso dall'acqua, ma non aveva le zampe! Sono caduto dalla sedia per lo stupore e tutti i conigli sono scappati! Voglio quel pesce coniglio come animale domestico, quindi ti conviene andare a prendermelo! Di corsa!\n\n(Catturato in superficie)", + "Quest_CapnTunabeard": "Corpo di mille balene! Forza, ciurma! C'era una volta un pirata che aveva un pesce di nome Capitan Tonnorosso, ma durante una grande tempesta, la boccia cadde in mare. Ha un uncino al posto della coda, una benda sull'occhio e tutto il resto! Devi catturare quel pesce per me, così sarò forte come un pirata! Ovviamente deve trovarsi da qualche parte nell'oceano! Duh!\n\n(Catturato nell'oceano)", + "Quest_Clownfish": "Ho visto un pesce arancione brillante nei pressi dell'oceano. Si guardava intorno agitato, come se avesse perso un parente! Vai a catturarlo, così ne arriverà un altro a cercarlo!\n\n(Catturato nell'oceano)", + "Quest_DemonicHellfish": "Ho sentito dire che negli Inferi il re di tutti i demoni è un pesce! Immagina quanto sarei forte se tu me lo portassi!\n\n(Catturato nelle caverne)", + "Quest_Derpfish": "Quei Derpling nella giungla sono le creature più spaventose che io abbia mai visto! Fortunatamente a volte non hanno le gambe! Alcuni vivono nell'acqua e sono molto meno spaventosi! Pescane uno così potrò assaggiarlo senza che mi spaventi a morte!\n\n(Catturato nella giungla, in superficie)", + "Quest_Fishron": "C'è una leggenda che narra di una creatura potente che si chiama pesce drago. È un'unione tra un maiale, un drago e un pesce! Ho sentito dire che si trova nel laghi sotterranei congelati, nella parte più fredda del mondo! Non ho intenzione di andarci, quindi vai a catturarlo e fai in modo che finisca nelle mie mani! Non vedo l'ora!\n\n(Catturato nella tundra sotterranea)", + "Quest_InfectedScabbardfish": "Un pesce lunghissimo che assomiglia alla guaina di una spada e nuota nelle acque fangose della Corruzione! Sembra una pietra di ebano, quindi non lasciarti ingannare! Esatto, dico proprio a te. Perché sarai tu ad andare a pescarlo, non io!\n\n(Catturato nella Corruzione)", + "Quest_Mudfish": "Fai attenzione mentre attraversi l'acqua della giungla! Perché? Non mi importa se ti mordono i pesci piraña, ma non vorrei che finissi su uno dei miei pesci preferiti: il pesce fango! E poi voglio che lo catturi per me!\n\n(Catturato nella giungla)", + "Quest_TropicalBarracuda": "I pesci piraña e gli squali sono orribili! Davvero brutti! Sai che c'è un pesce davvero carino, ma capace di staccarti la testa? Pagherei 2 monete di platino per vederglielo fare, quindi... vai a catturarlo per me. Però portamelo prima che ti stacchi la testa!\n\n(Catturato nella giungla, in superficie)", + "Quest_TundraTrout": "Ti chiedi mai perché la superficie del lago nelle zone innevate di {WorldName} non si ghiaccia mai? Io no. I pesci però si congelano! Un pesce di ghiaccio sarebbe un grande regalo per il fantastico {Angler}! Vai e portami subito questa trota della tundra!\n\n(Catturato nella tundra in superficie)" + }, + "AnglerChatter": { + "Chatter_1": "Perché {Bartender} non vuole vendermi della birra? Voglio provarla! Che brontolone!" + }, + "BartenderChatter": { + "Chatter_1": "Ho la cura per tutto ciò che ti affligge!", + "Chatter_10": "Secondo te {Steampunker} ha un'altra di quelle pistole? Conosco una strega che potrebbe volerne una.", + "Chatter_11": "Non mi meraviglio che l'{Demolitionist} abbia così tanti incidenti. Non immagini quanta birra compra da me.", + "Chatter_12": "Di solito non mi piacciono molto i goblin, ma {GoblinTinkerer} mi sembra un tipo a posto.", + "Chatter_13": "{?Day}Qualcuno sa dov'è andata la driade?", + "Chatter_14": "{?!Day}Qui non si sente volare una mosca. È un po' troppo tranquillo...", + "Chatter_15": "{?!Day}Parla con me e fai il tuo lavoro.", + "Chatter_16": "{?BloodMoon}Sai, dove abito io, una Luna di Sangue è soltanto una scusa per prendere una boccata d'aria fresca.", + "Chatter_17": "{?MoonLordDefeated}Signore della Luna? Intendi Signore dell'Abisso?", + "Chatter_18": "{?HardMode}Conosco un Lavamante che apprezzerebbe quella pietra infernale nel mondo sotterraneo.", + "Chatter_19": "{?Homeless}Conosci un buon locale per aprire un negozio? Mi piacerebbe avere un bar qui.", + "Chatter_2": "Dicono che sei forte. Beh, io di forza ne so qualcosa. Vediamo se sei all'altezza.", + "Chatter_3": "Al mio paese si vende soltanto birra di radice...", + "Chatter_4": "Un bel passo avanti rispetto a pulire i tavoli tutto il giorno.", + "Chatter_5": "La vita è difficile quando sei naturalmente migliore degli altri.", + "Chatter_6": "Che ci faccio qui...", + "Chatter_7": "Un sacco di tenacia e un pizzico di fortuna fanno molta strada...", + "Chatter_8": "Hai visto qualche Mebur da queste parti?", + "Chatter_9": "{Dryad} sembra simpatica. Dovrei invitarla a venire con me." + }, + "BartenderHelpText": { + "Help_1": "La prima cosa che devi sapere è che vendo degli artefatti difensivi speciali, ma puoi ottenerli soltanto se hai delle medaglie da difesa!", + "Help_10": "Se riesci a respingere l'invasione, riceverai più medaglie da difesa e potrai portarmele per acquistare più artefatti e altre ricompense speciali!", + "Help_11": "Gira anche voce che il potere degli artefatti possa essere ulteriormente sbloccato se sconfiggi l'esercito dell'Antico. Forse potresti persino usarli in qualsiasi momento!", + "Help_2": "Puoi usare questi artefatti per creare trappole e torri difensive. Così facendo si consuma mana eteriano, un'energia speciale che viene rilasciata soltanto dai membri dell'esercito dell'Antico!", + "Help_3": "Sfidare l'esercito dell'Antico è piuttosto semplice. Sono attratti dal potere dei cristalli di Eternia, quindi puoi usarli per attirarli.", + "Help_4": "Per posizionare un cristallo di Eternia, devi ottenere un cristallo di Eternia e un piedistallo sul quale piazzarlo. E guarda caso, puoi comprarli da me!", + "Help_5": "Ti conviene mettere il piedistallo del cristallo di Eternia in una zona aperta e piana. Potrebbe essere difficile da proteggere con troppe pareti e altre cose!", + "Help_6": "Una volta posizionato il piedistallo, interagisci con esso mentre hai in mano il cristallo di Eternia e preparati per una battaglia!", + "Help_7": "Dovrai impedire all'esercito dell'Antico di distruggere il cristallo di Eternia! Questo avrebbe conseguenze catastrofiche per il mio mondo di Etheria!", + "Help_8": "Puoi piazzare difese al costo di 10 unità di mana eteriano. Una volta posizionato, il cristallo di Eternia rilascerà un po' di questo mana. Altrimenti dovrai sconfiggere i nemici per ottenerne ancora.", + "Help_9": "Con l'aiuto delle difese dovrai respingere varie ondate di invasori che stanno cercando di distruggere sia te che il cristallo di Eternia!" + }, + "BartenderNames": { + "Name_1": "Ted", + "Name_10": "Javahawk", + "Name_11": "Elandrian", + "Name_12": "Driscan", + "Name_13": "Iamisom", + "Name_14": "Blacksmith", + "Name_15": "Dani Moo", + "Name_16": "Paddy", + "Name_2": "Barista", + "Name_3": "Jerry", + "Name_4": "Bill", + "Name_5": "Ernest", + "Name_6": "William", + "Name_7": "Dale", + "Name_8": "Bruce", + "Name_9": "Moe" + }, + "CyborgChatter": { + "Chatter_1": "Il {Bartender} ha detto che gli ricordavo \"EV2\". Forse dovrei incontrarla." + }, + "GoblinTinkererChatter": { + "Chatter_1": "Sai, questi goblin eteriani sono molto diversi dal mio popolo. Un gruppo davvero turbolento. Non che la mia gente sia tanto meglio..." + }, + "GuideHelpText": { + "Help_1063": "Di solito cercherei di insegnarti tutto sull'esercito dell'Antico, ma ti consiglio di chiedere al {Bartender}." + }, + "MechanicChatter": { + "Chatter_1": "{Bartender} mi ha offerto della birra di radici e io gli ho chiesto una tazza quadrata." + }, + "NurseChatter": { + "Chatter_1": "Continuo a chiedere vino, ma {Bartender} mi offre solamente boccali di birra." + }, + "PirateChatter": { + "Chatter_1": "Era ora che arrivasse un barista! Ero quasi a corto di rum!" + }, + "StylistChatter": { + "Chatter_1": "Ho offerto al {Bartender} una spuntatina gratuita, ma ha rifiutato. Cioè, gli avrei almeno potuto spuntare i baffi!" + }, + "TownNPCHousingFailureReasons": { + "HoleInWallIsTooBig": "In questa stanza manca una parete", + "RoomCheckStartedInASolidTile": "Questo è un blocco solido!", + "RoomIsTooBig": "Questa stanza è troppo grande", + "RoomIsTooSmall": "Questa stanza è troppo piccola", + "TooCloseToWorldEdge": "We need better text for this!!!" + } +} \ No newline at end of file diff --git a/Localization/Content/pl-PL.json b/Localization/Content/pl-PL.json new file mode 100644 index 0000000..66eb48e --- /dev/null +++ b/Localization/Content/pl-PL.json @@ -0,0 +1,697 @@ +{ + "GameTitle": { + "0": "Terraria: kop, młody, kop!", + "1": "Terraria: epicka ziemia", + "10": "Terraria: bloki à la Digger T", + "11": "Terraria: krowia warstwa nie istnieje", + "12": "Terraria: podejrzanie wyglądające gałki oczne", + "13": "Terraria: fioletowa trawa!", + "14": "Terraria: nikt nie kopie ogonów!", + "15": "Terraria: wodospad zawartości!", + "16": "Terraria: w stronę ziemi", + "17": "Terraria: Dig Dug nic na mnie nie ma", + "18": "Terraria: wszystko dobrze, co się dobrze kopie", + "19": "Terraria: swąd ostateczny", + "2": "Terraria: adamantyta!", + "20": "Terraria: kosmiczne kłopoty", + "21": "Terraria: obsesyjno-kompulsywne zaburzenia burzenia", + "22": "Terraria: Red Dev Redemption", + "23": "Terraria: powstanie szlamów", + "24": "Terraria: teraz możesz zaliczyć jeszcze więcej zgonów!", + "25": "Terraria: pogłoski o śmierci przewodnika były mocno przesadzone", + "26": "Terraria: to wielki blok dla ludzkości...", + "27": "Terraria: a grotołaz na to: „co”?", + "28": "Terraria: i potem wspomniałem „coś o aktualizacji wersji PC...”", + "29": "Terraria: niech bloki będą z tobą", + "3": "Terraria: ten najnowszy build piasku jest OP", + "30": "Terraria: lepsza niż samo życie", + "31": "Terraria: Terraria: Terraria:", + "32": "Terraria: teraz w 1D", + "33": "Terraria: wkrótce w komputerach", + "34": "Terraria: dzieli przez zero", + "35": "Terraria: teraz z dźwiękiem", + "36": "Terraria: wciśnij alt+F4", + "37": "Terraria: to wielki blok dla ludzkości", + "38": "Terraria: jak piasek je, to nie szczeka...", + "39": "Terraria: dzień szlamaka", + "4": "Terraria: Powrót Przewodnika", + "40": "Terraria: co ma być zakopane, nie utonie", + "41": "Terraria: nie mam pojęcia...aaaaa!", + "42": "Terraria: co to takie fioletowe i kolczaste?", + "43": "Terraria: jak dorosnę, zostanę Przewodnikiem", + "44": "Terraria: Cthulhu jest wściekły... i nie ma oka!", + "45": "Terraria: te pszczoły, które tu widzicie...", + "46": "Terraria: Legend of Maxx", + "47": "Terraria: kult Cenx", + "48": "Terraria 2: Electric Boogaloo", + "49": "Terraria: zagraj też w Minecrafta!", + "5": "Terraria: opowieść króliczka", + "51": "Terraria: gdzie ukryłeś złoto, skrzacie?", + "52": "Terraria: teraz więcej kaczek!", + "53": "Terraria: 9 + 1 = 11", + "54": "Terraria: Infinite Plantera", + "6": "Terraria: Dr Bones i Świątynia Krwawego Księżyca", + "7": "Terraria: Park Szlamajski", + "8": "Terraria: wszędzie dobrze, ale tutaj najlepiej", + "9": "Terraria: gra zawiera małe elementy, nieodpowiednie dla dzieci poniżej 5. roku życia", + "55": "Terraria: Shut Up and Dig Gaiden!" + }, + "Achievements": { + "ARCHAEOLOGIST_Description": "Zabij doktora Bonesa.", + "ARCHAEOLOGIST_Name": "Archeolog", + "BALEFUL_HARVEST_Description": "Osiągnij 15. falę dyniowego księżyca, podczas której zło czai się w jesiennych zbiorach.", + "BALEFUL_HARVEST_Name": "Zgubne zbiory", + "BEGONE_EVIL_Description": "Roztrzaskaj demoniczny lub szkarłatny ołtarz potężnym, świętym młotem.", + "BEGONE_EVIL_Name": "Zło, przepadnij!", + "BEHIND_THE_MASK_Description": "Zgładź szalonego kultystę, obłąkanego magika, potężnymi zaklęciami.", + "BEHIND_THE_MASK_Name": "Czas zajrzeć pod maskę", + "BIG_BOOTY_Description": "Otwórz jeden z dużych, tajemniczych kufrów w lochu za pomocą specjalnego klucza.", + "BIG_BOOTY_Name": "Wielki łup", + "BLOODBATH_Description": "Przetrwaj krwawy księżyc – noc, kiedy rzeki spływają krwią, a potworów jest w bród.", + "BLOODBATH_Name": "Krwawa łaźnia", + "BONED_Description": "Pokonaj Szkieletrona, przeklętego strażnika lochu.", + "BONED_Name": "Daj mu w kość", + "BUCKETS_OF_BOLTS_Description": "Pokonaj trzy mechaniczne zmory nocy: Bliźnięta, Niszczyciela i Szkieletrona Prime’a.", + "BUCKETS_OF_BOLTS_Name": "I śrubuję ci...", + "BULLDOZER_Description": "Zniszcz łącznie 10 000 bloków.", + "BULLDOZER_Name": "Buldożer", + "ChallengerCategory": "Challenger", + "CHAMPION_OF_TERRARIA_Description": "Pokonaj Księżycowego Władcę.", + "CHAMPION_OF_TERRARIA_Name": "Czempion Terrarii", + "CollectorCategory": "Takie hobby – zbieractwo", + "Completed": "Osiągnięcie zdobyte! {0}", + "COMPLETELY_AWESOME_Description": "Zdobądź minirekina.", + "COMPLETELY_AWESOME_Name": "Totalny odlot", + "DAVY_JONES_LOCKER_Description": "Pokonaj Latającego Holendra, podniebnego żaglowca.", + "DAVY_JONES_LOCKER_Name": "Skrzynia Davy’ego Jonesa", + "DECEIVER_OF_FOOLS_Description": "Zabij nimfę.", + "DECEIVER_OF_FOOLS_Name": "Zguba głupców", + "DO_YOU_WANT_TO_SLAY_A_SNOWMAN_Description": "Odnieś zwycięstwo nad mroźnym legionem, wesołą grupą maniakalnych bałwanów-gangsterów.", + "DO_YOU_WANT_TO_SLAY_A_SNOWMAN_Name": "Chcesz zabić bałwana?", + "DRAX_ATTAX_Description": "Stwórz świdrolof lub kilofotopór z bajkowych sztabek i dusz trzech mechanicznych bossów.", + "DRAX_ATTAX_Name": "Świdrolofem w oko", + "DUNGEON_HEIST_Description": "Ukradnij klucz nieumarłym mieszkańcom lochu i otwórz jeden z cennych, złotych kufrów.", + "DUNGEON_HEIST_Name": "Napad na loch", + "DYE_HARD_Description": "Włóż barwnik do każdego możliwego okienka.", + "DYE_HARD_Name": "Barwy szczęścia", + "ExplorerCategory": "Eksploracja", + "EXTRA_SHINY_Description": "Wykop potężną rudę, którą twój świat został właśnie obdarzony.", + "EXTRA_SHINY_Name": "Ale się świeci!", + "EYE_ON_YOU_Description": "Pokonaj Oko Cthulhu, naoczną grozę pojawiającą się tylko nocą.", + "EYE_ON_YOU_Name": "Mam na ciebie oko", + "FASHION_STATEMENT_Description": "Załóż zbroję lub ubranie zmieniające wygląd we wszystkich trzech okienkach.", + "FASHION_STATEMENT_Name": "Na wybiegu", + "FAST_AND_FISHIOUS_Description": "Ukończ 50. zadanie wędkarza.", + "FAST_AND_FISHIOUS_Name": "50 prac Rybulesa", + "FISH_OUT_OF_WATER_Description": "Pokonaj Księcia Ryboka, mutanta siejącego postrach w morskich głębinach.", + "FISH_OUT_OF_WATER_Name": "Lepsza ryba w garści niż mutant w morzu", + "FREQUENT_FLYER_Description": "Wydaj więcej niż 1 złoto na leczenie się u pielęgniarki.", + "FREQUENT_FLYER_Name": "Stały klient", + "FUNKYTOWN_Description": "Zbuduj lub znajdź pole lśniących grzybów nad powierzchnią.", + "FUNKYTOWN_Name": "Na grzyby", + "GELATIN_WORLD_TOUR_Description": "Pokonaj wszystkie rodzaje szlamów!", + "GELATIN_WORLD_TOUR_Name": "Wszyscy mają żelki, mam i ja", + "GET_A_LIFE_Description": "Zjedz owoc życia rosnący w gąszczu trawy w podziemnej dżungli.", + "GET_A_LIFE_Name": "To jest dopiero życie", + "GLORIOUS_GOLDEN_POLE_Description": "Zdobądź złotą wędkę.", + "GLORIOUS_GOLDEN_POLE_Name": "Wędka, że mucha nie siada", + "GOBLIN_PUNTER_Description": "Odeprzyj goblińską inwazję, hordę nieokrzesanych, barbarzyńskich, spiczastouchych wojowników i czarowników cienistego płomienia.", + "GOBLIN_PUNTER_Name": "Goblinator", + "GOOD_LITTLE_SLAVE_Description": "Ukończ 10. zadanie wędkarza.", + "GOOD_LITTLE_SLAVE_Name": "Niewolnica graczaura", + "HEAD_IN_THE_CLOUDS_Description": "Załóż skrzydła.", + "HEAD_IN_THE_CLOUDS_Name": "Z głową w chmurach", + "HEART_BREAKER_Description": "Znajdź i roztrzaskaj pod ziemią pierwsze kryształowe serce.", + "HEART_BREAKER_Name": "Łamacz serc", + "HEAVY_METAL_Description": "Zdobądź kowadło zrobione z żelaza lub ołowiu.", + "HEAVY_METAL_Name": "Heavy Metal", + "HEX_EDUCATION_Description": "Pokonaj goblińskiego przywoływacza, czarodzieja najmroczniejszych płomieni.", + "HEX_EDUCATION_Name": "Klątwa ci", + "HOLD_ON_TIGHT_Description": "Załóż swój pierwszy hak wspinaczkowy.", + "HOLD_ON_TIGHT_Name": "Trzymaj się mocno!", + "ICE_SCREAM_Description": "Osiągnij 15. falę mroźnego księżyca, podczas której wesołe chwile szybko zamieniają się w szaleństwo.", + "ICE_SCREAM_Name": "Przełamywanie lodów", + "INDEPENDENCE_DAY_Description": "Pokonaj Statek-Matkę sterujący marsjańską inwazją.", + "INDEPENDENCE_DAY_Name": "Dzień niepodległości", + "INTO_ORBIT_Description": "Wyżej już się nie da!", + "INTO_ORBIT_Name": "Na orbitę", + "ITS_GETTING_HOT_IN_HERE_Description": "Zejdź tak nisko, żeby dotrzeć do piekła.", + "ITS_GETTING_HOT_IN_HERE_Name": "Gorąco tutaj", + "ITS_HARD_Description": "Wypuść starożytne duchy światła i ciemności, uwalniając dużo silniejsze potwory i zasypując świat oślepiającymi skarbami (i tęczami!).", + "ITS_HARD_Name": "Nie jest łatwo!", + "IT_CAN_TALK_Description": "Zbuduj dom w biomie grzybowym, żeby wprowadził się do niego trufla.", + "IT_CAN_TALK_Name": "To mówi?!", + "I_AM_LOOT_Description": "Odkryj złoty kufer w podziemiach i zerknij do środka.", + "I_AM_LOOT_Name": "Łup, łup, łup!", + "JEEPERS_CREEPERS_Description": "Wejdź do jaskini pająków w podziemiach.", + "JEEPERS_CREEPERS_Name": "Pająkoland", + "KILL_THE_SUN_Description": "Przetrwaj zaćmienie słońca – dzień ciemniejszy od nocy, kiedy słudzy grozy wychodzą na żer.", + "KILL_THE_SUN_Name": "Zabić słońce", + "LIHZAHRDIAN_IDOL_Description": "Pokonaj golema, kamiennego bożka plemienia jaszczuhrów.", + "LIHZAHRDIAN_IDOL_Name": "Idol jaszczuhrów", + "LIKE_A_BOSS_Description": "Zdobądź przedmiot przyzywający bossa.", + "LIKE_A_BOSS_Name": "Bossman", + "LUCKY_BREAK_Description": "Przeżyj upadek z wysoka z niewielką liczbą punktów życia.", + "LUCKY_BREAK_Name": "Niewiele brakowało", + "MARATHON_MEDALIST_Description": "Przejdź w sumie na piechotę 26 mil i dwie dziesiąte.", + "MARATHON_MEDALIST_Name": "Maraton", + "MASTERMIND_Description": "Pokonaj Mózg Cthulhu – ogromny, demoniczny mózg siejący grozę w Szkarłacie.", + "MASTERMIND_Name": "Gracz i mózg, mózg, mózg", + "MATCHING_ATTIRE_Description": "Załóż zbroję we wszystkich trzech okienkach: głowy, klatki piersiowej i stóp.", + "MATCHING_ATTIRE_Name": "Dyktator mody", + "MECHA_MAYHEM_Description": "Walcz jednocześnie z Bliźniętami, Niszczycielem i Szkieletronem Prime’em i wygraj.", + "MECHA_MAYHEM_Name": "Mechawygrana", + "MINER_FOR_FIRE_Description": "Stwórz roztopiony kilof z najgorętszych materiałów.", + "MINER_FOR_FIRE_Name": "Ognisty górnik", + "NoCategory": "Brak", + "NOT_THE_BEES_Description": "Użyj pszczelego pistoletu, mając na sobie kompletny zestaw pszczelej zbroi.", + "NOT_THE_BEES_Name": "Znowu pszczoły!", + "NO_HOBO_Description": "Zbuduj dom, do którego wprowadzi się twój pierwszy BN, na przykład przewodnik.", + "NO_HOBO_Name": "Akwizytorów nie przyjmujemy", + "OBSESSIVE_DEVOTION_Description": "Pokonaj starożytnego kultystę, fanatycznego przywódcę kultu z lochu.", + "OBSESSIVE_DEVOTION_Name": "Maniakalne oddanie", + "OBTAIN_HAMMER_Description": "Zdobądź swój pierwszy młot – stwórz go albo znajdź.", + "OBTAIN_HAMMER_Name": "Stop! Naszła mnie ochota na młota!", + "OOO_SHINY_Description": "Wykop kilofem pierwszą bryłkę rudy.", + "OOO_SHINY_Name": "Ooo! Jak ładnie się błyszczy!", + "PHOTOSYNTHESIS_Description": "Wykop zielenicę, organiczną rudę, którą można znaleźć wśród najgęstszych zarośli.", + "PHOTOSYNTHESIS_Name": "Fotosynteza", + "PRETTY_IN_PINK_Description": "Zabij pinky’ego.", + "PRETTY_IN_PINK_Name": "Różowe okulary", + "PRISMANCER_Description": "Zdobądź tęczowy kostur.", + "PRISMANCER_Name": "Pryzmanta", + "PUMPKIN_SMASHER_Description": "Pokonaj Dyniokróla, strasznego gospodarza bajkowej wigilii.", + "PUMPKIN_SMASHER_Name": "Z dyńki mu", + "RAINBOWS_AND_UNICORNS_Description": "Użyj tęczowego pistoletu, jadąc na jednorożcu.", + "RAINBOWS_AND_UNICORNS_Name": "Tęcze i jednorożce", + "REAL_ESTATE_AGENT_Description": "Zdobądź wszystkich możliwych BN-ów zamieszkujących twój świat.", + "REAL_ESTATE_AGENT_Name": "Agencja nieruchomości", + "ROBBING_THE_GRAVE_Description": "Zdobądź rzadki skarb po pokonaniu trudnego potwora w lochu.", + "ROBBING_THE_GRAVE_Name": "Grabiąc groby", + "ROCK_BOTTOM_Description": "Niżej się nie da!", + "ROCK_BOTTOM_Name": "Skalne dno", + "SERVANT_IN_TRAINING_Description": "Ukończ 1. zadanie wędkarza.", + "SERVANT_IN_TRAINING_Name": "Umowa o niewolę", + "SICK_THROW_Description": "Zdobądź Terrariana.", + "SICK_THROW_Name": "Masz skilla", + "SlayerCategory": "Pogromca", + "SLAYER_OF_WORLDS_Description": "Pokonaj każdego bossa w Terrarii.", + "SLAYER_OF_WORLDS_Name": "Pogromca światów", + "SLIPPERY_SHINOBI_Description": "Pokonaj Króla Szlam, władcę wszystkiego co szlamowate.", + "SLIPPERY_SHINOBI_Name": "Śliska sprawa", + "SMASHING_POPPET_Description": "Używając materiałów wybuchowych albo swojego wiernego młota, roztrzaskaj kulę cienia albo szkarłatne serce w spaczonych złem częściach swojego świata.", + "SMASHING_POPPET_Name": "Wybuchowo!", + "STAR_DESTROYER_Description": "Pokonaj cztery niebiańskie wieże księżyca.", + "STAR_DESTROYER_Name": "Niszczyciel gwiazd", + "STAR_POWER_Description": "Stwórz kryształ many ze spadających gwiazd i go wykorzystaj.", + "STAR_POWER_Name": "Gwiezdna moc", + "STICKY_SITUATION_Description": "Przetrwaj deszcz szlam, podczas którego szlamy leją jak z cebra.", + "STICKY_SITUATION_Name": "Ślisko tu", + "STILL_HUNGRY_Description": "Pokonaj Ścianę Mięcha, mistrza i rdzeń świata, który powstaje z wielkiej, płonącej ofiary.", + "STILL_HUNGRY_Name": "Jeść!", + "STING_OPERATION_Description": "Pokonaj Królową Pszczół, macierz uli w dżungli.", + "STING_OPERATION_Name": "I po pszczołach", + "SUPREME_HELPER_MINION_Description": "Ukończ w sumie 200 zadań dla wędkarza.", + "SUPREME_HELPER_MINION_Name": "Sługus pierwsza klasa!", + "SWORD_OF_THE_HERO_Description": "Zdobądź terraostrze wykute z najlepszych ostrz światła i ciemności.", + "SWORD_OF_THE_HERO_Name": "Bohaterski miecz", + "TEMPLE_RAIDER_Description": "Przejdź przez nieprzeniknione mury świątyni w dżungli.", + "TEMPLE_RAIDER_Name": "Temple Raider", + "THERE_ARE_SOME_WHO_CALL_HIM_Description": "Zabij Tima.", + "THERE_ARE_SOME_WHO_CALL_HIM_Name": "Tima ni ma", + "THE_CAVALRY_Description": "Dosiądź wierzchowca.", + "THE_CAVALRY_Name": "Kawaleria", + "THE_GREAT_SOUTHERN_PLANTKILL_Description": "Pokonaj Planterę, przerośniętą ohydę czającą się w głębinach dżungli.", + "THE_GREAT_SOUTHERN_PLANTKILL_Name": "The Great Southern Plantkill", + "THROWING_LINES_Description": "Rzuć jojo.", + "THROWING_LINES_Name": "Rzutnik", + "TIL_DEATH_Description": "Zabij pana młodego.", + "TIL_DEATH_Name": "Dopóki śmierć nas...", + "TIMBER_Description": "Zetnij pierwsze drzewo.", + "TIMBER_Name": "Drzewo!", + "TIN_FOIL_HATTER_Description": "Odeprzyj marsjańską inwazję, podczas której kosmici chcą wyprać ci mózg i wetknąć swoje sondy tam, gdzie nie trzeba.", + "TIN_FOIL_HATTER_Name": "Ochronne czapki z folii aluminiowej", + "TOPPED_OFF_Name": "Mocarz", + "TROUT_MONKEY_Description": "Ukończ 25. zadanie wędkarza.", + "TROUT_MONKEY_Name": "Na ryby", + "VEHICULAR_MANSLAUGHTER_Description": "Pokonaj przeciwnika, przejeżdżając go wózkiem górniczym.", + "VEHICULAR_MANSLAUGHTER_Name": "Wózkiem w łeb", + "WALK_THE_PLANK_Description": "Odeprzyj inwazję piratów, grupy morskich szabrowników czyhających na twoje klejnoty... i życie!", + "WALK_THE_PLANK_Name": "Nie dam się spiracić", + "WATCH_YOUR_STEP_Description": "Wpadnij w paskudną, podziemną pułapkę.", + "WATCH_YOUR_STEP_Name": "Uważaj, gdzie idziesz!", + "WHERES_MY_HONEY_Description": "Odkryj duży ul głęboko w dżungli.", + "WHERES_MY_HONEY_Name": "Gdzie miodek?", + "WINTERHEARTED_Description": "Pokonaj Lodową Królową, nikczemną wiedźmę najzimniejszych nocy.", + "WINTERHEARTED_Name": "Zimowisko", + "WORM_FODDER_Name": "Pies na robaki", + "YOU_AND_WHAT_ARMY_Description": "Wydawaj rozkazy 9 przywołanym sługom jednocześnie.", + "YOU_AND_WHAT_ARMY_Name": "Ty i jaka armia?", + "YOU_CAN_DO_IT_Description": "Przetrwaj swoją pierwszą noc.", + "YOU_CAN_DO_IT_Name": "Dasz radę!" + }, + "CLI": { + "AutomaticPortForward": "Automatycznie przekierować port? (t/n): ", + "AvailableCommands": "Dostępne polecenia:", + "BanMessage": "Zakaz gry na serwerze.", + "Ban_Command": "ban", + "Ban_Description": "Zakazuje graczowi gry na serwerze.", + "Ban_Example": "ban ", + "Ban_Usage": "Zastosowanie: ban ", + "ChooseDifficulty": "Wybierz poziom trudności: ", + "ChooseEvil": "Wybierz zło świata: ", + "ChooseSize": "Wybierz rozmiar: ", + "ChooseWorld": "Wybierz świat: ", + "Clear_Command": "clear", + "Clear_Description": "Wyczyść okno konsoli.", + "ClientWasBooted": "Gracz {0} zostaje wyrzucony: {1}", + "Corrupt": "Zepsucie", + "Crimson": "Szkarłat", + "Dawn_Command": "dawn", + "Dawn_Description": "Zmień czas na świt.", + "DeleteConfirmation": "Na pewno skasować {0}?", + "DeleteWorld_Command": "d", + "DeleteWorld_Description": "Skasuj świat", + "DeleteWorld_Example": "d ", + "Dusk_Command": "dusk", + "Dusk_Description": "Zmień czas na zmierzch.", + "EnterServerPassword": "Hasło serwera (wciśnij Enter, żeby nie ustawiać hasła): ", + "EnterWorldName": "Wprowadź nazwę świata: ", + "ExitNoSave_Command": "exit-nosave", + "ExitNoSave_Description": "Zamknij serwer bez zapisywania.", + "Exit_Command": "exit", + "Exit_Description": "Zamknij serwer i zapisz.", + "FPS_Command": "fps", + "HelpHint": "Wpisz „help”, żeby uzyskać listę poleceń.", + "Help_Command": "help", + "Help_Description": "Pokazuje listę poleceń.", + "InvalidCommand": "Nieprawidłowe polecenie.", + "KickMessage": "Wyrzucono cię z serwera.", + "Kick_Command": "kick", + "Kick_Description": "Wyrzuca gracza z serwera.", + "Kick_Example": "kick ", + "Kick_Usage": "Zastosowanie: kick ", + "ListeningOnPort": "Nasłuchiwanie na porcie {0}", + "MaxPlayers_Command": "maxplayers", + "MaxPlayers_Description": "Wyświetl maksymalną liczbę graczy.", + "Midnight_Command": "midnight", + "Midnight_Description": "Zmień czas na północ.", + "MOTD": "Wiadomość dnia: {0}", + "MOTD_Command": "motd", + "MOTD_Description": "Wyświetl wiadomość dnia.", + "NewWorld_Command": "n", + "NewWorld_Description": "Nowy świat", + "No": "nie", + "NoMOTD": "Witaj w: {0}!", + "Noon_Command": "noon", + "Noon_Description": "Zmień czas na południe.", + "NoPassword": "Nie ustawiono hasła.", + "NoPlayers": "Nie przyłączyli się żadni gracze.", + "OnePlayerConnected": "Przyłączył się 1 gracz.", + "Password": "Hasło: {0}", + "PasswordDisabled": "Hasło wyłączone.", + "PasswordSet": "Hasło: {0}", + "Password_Command": "password", + "Password_Description": "Pokaż hasło.", + "PlayerLimit": "Limit graczy: {0}", + "PlayersConnected": "Przyłączyła się następująca liczba graczy: {0}.", + "Playing_Command": "playing", + "Playing_Description": "Pokaż listę graczy.", + "Port": "Port: {0}", + "Port_Command": "port", + "Port_Description": "Wyświetl nasłuchiwany port.", + "Random": "Losowo", + "Save_Command": "save", + "Save_Description": "Zapisz świat gry.", + "Say_Command": "say", + "Say_Description": "Wyślij wiadomość", + "Say_Example": "say ", + "Say_Usage": "Zastosowanie: say ", + "Server": "Serwer Terrarii {0}", + "ServerMessage": " {0}", + "ServerStarted": "Serwer uruchomiony", + "SetInitialPort": "Port serwera (wciśnij Enter dla 7777): ", + "SetMOTD_Command": "motd", + "SetMOTD_Description": "Zmień wiadomość dnia.", + "SetMOTD_Example": "motd ", + "SetPassword_Command": "password", + "SetPassword_Description": "Zmień hasło.", + "SetPassword_Example": "password ", + "Settle_Command": "settle", + "Settle_Description": "Ustaw wszystkie zbiorniki wodne.", + "ShortNo": "n", + "ShortYes": "t", + "Time": "Czas: {0}", + "Time_Command": "time", + "Time_Description": "Pokazuje czas w grze.", + "Version_Command": "version", + "Version_Description": "Wyświetl wersję gry.", + "WaterIsAlreadySettling": "Woda jest poziomowana", + "Yes": "tak", + "DisplaySeed": "Ziarno świata: {0}", + "EnterSeed": "Wprowadź ziarno (zostaw puste, jeśli ma być losowe):", + "NoValidSeed": "Ten świat został wygenerowany w starszej wersji gry, która nie obsługiwała ziaren.", + "Seed_Command": "ziarno", + "Seed_Description": "Wyświetla ziarno świata." + }, + "Controls": { + "RightClick": "Kliknij prawym przyciskiem" + }, + "Currency": { + "Copper": "Miedź", + "DefenderMedals": "Medale obrońcy", + "Gold": "Złoto", + "Platinum": "Platyna", + "Silver": "Srebro" + }, + "Enemies": { + "MoonLord": "Księżycowy Władca", + "TheTwins": "Bliźnięta" + }, + "Error": { + "BadHeaderBufferOverflow": "Bad header lead to a read buffer overflow.", + "DataSentAfterConnectionLost": "Próba wysłania danych do klienta po utracie połączenia", + "Error": "Błąd", + "ExceptionNormal": " ", + "LaunchFromSteam": "Uruchom grę z poziomu Steama.", + "LoadFailed": "Wczytywanie nieudane!", + "LoadFailedNoBackup": "Wczytywanie nieudane! Brak kopii zapasowej.", + "NetMessageError": "Błąd wiadomości {0}", + "ServerCrash": "Awaria serwera: {0}\n{1}\nWyślij crashlog.txt na adres support@terraria.org", + "TriedToRunServerTwice": "Próba uruchomienia dwóch serwerów na tym samym komputerze", + "UnableToCapture": "Nie udało się zrobić zdjęcia.", + "UnableToLoadWorld": "Nie udało się wczytać świata:", + "UnableToWritePreferences": "Nie udało się zapisać pliku w: {0}", + "InvalidLobbyFlag": "-lobby: brak \"{0}\" lub \"{1}\". Ignorowanie." + }, + "Game": { + "Actuators": "Siłowniki", + "BallBounceResult": "{0} otrzymuje {1} ciosów przed upadkiem na ziemię!", + "BedObstructed": "Coś blokuje twoje łóżko.", + "BlueWires": "Niebieskie kable", + "DroppedCoins": "upuszczono: {0}", + "EnemiesDefeatedAnnouncement": "Udało ci się pokonać {0}. wroga: {1}!", + "EnemiesDefeatedByAnnouncement": "{0} pokonuje {1}. wroga: {2}!", + "FinalWave": "Ostatnia fala", + "FirstWave": "Pierwsza fala", + "GreenWires": "Zielone kable", + "HasTeleportedTo": "{0} teleportuje się do: {1}", + "HouseChair": "krzesło", + "HouseDoor": "drzwi", + "HouseLightSource": "źródło światła", + "HouseMissing_1": "W domu nie ma: {0}.", + "HouseMissing_2": "W domu nie ma: {0}, {1}.", + "HouseMissing_3": "W domu nie ma: {0}, {1}, {2}.", + "HouseMissing_4": "W domu nie ma: {0}, {1}, {2}, {3}.", + "HouseTable": "stół", + "InvasionPoints": "{0} pkt.", + "InvasionWave_Type1": "{0}: {1}", + "InvasionWave_Type2": "{0}: {1}, {2}", + "InvasionWave_Type3": "{0}: {1}, {2}, {3}", + "InvasionWave_Type4": "{0}: {1}, {2}, {3}, {4}", + "InvasionWave_Type5": "{0}: {1}, {2}, {3}, {4}, {5}", + "InvasionWave_Type6": "{0}: {1}, {2}, {3}, {4}, {5}, {6}", + "InvasionWave_Type7": "{0}: {1}, {2}, {3}, {4}, {5}, {6}, {7}", + "InvasionWave_Type8": "{0}: {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}", + "JoinGreeting": "Obecni gracze: {0}.", + "NPCTitle": "{1} {0}", + "PlayerDeathTime": "{0} umarł(a) {1} temu", + "PvPFlag": "(PvP)", + "RedWires": "Czerwone kable", + "SpawnPointRemoved": "Punkt narodzin usunięty!", + "SpawnPointSet": "Punkt narodzin ustawiony!", + "TeleportTo": "Teleportacja do: {0}", + "Time": "Czas: {0}", + "Wave": "Fala: {0}", + "WaveCleared": "Pokonano: {0}", + "WaveMessage": "Fala {0}: {1}", + "YellowWires": "Żółte kable", + "BirthdayParty_1": "Wygląda na to, że {0} urządza imprezę", + "BirthdayParty_2": "Wygląda na to, że {0} i {1} urządzają imprezę", + "BirthdayParty_3": "Wygląda na to, że {0}, {1} i {2} urządzają imprezę", + "RespawnInPrefix": "", + "RespawnInSuffix": "{0}" + }, + "GameUI": { + "ActuationDeviceOff": "Urządzenie siłownikowe wył.", + "ActuationDeviceOn": "Urządzenie siłownikowe wł.", + "BaitPower": "{0}% mocy przynęty", + "BaitRequired": "Trzeba przynęty, żeby łowić ryby", + "Bright": "Jaskrawe", + "Buy": "Kup", + "BuyWithValue": "Kup ({0})", + "Cancel": "Anuluj", + "Change": "Zmień", + "Clear": "Wyczyść", + "Cloudy": "Pochmurnie", + "CompassCenter": "Środek", + "CompassEast": "{0}' na wschód", + "CompassWest": "{0}' na zachód", + "Depth": "{0}'", + "DepthLevel": "Poziom", + "Disabled": "Wył.", + "DPS": "{0} pkt. obrażeń na sekundę", + "EastWind": " ({0} mph E)", + "Enabled": "Wł.", + "EnemiesNearby": "Liczba pobliskich przeciwników: {0}!", + "Expert": "Ekspert", + "Faded": "Przygasanie", + "FirstQuarter": "Pierwsza kwadra", + "FishingPower": "{0} pkt. mocy wędkarstwa", + "FishingWarning": "Uwaga!", + "FullFishingPower": "{0} pkt. ({1}%) mocy wędkarstwa", + "FullMoon": "Pełnia", + "HairStyle": "Fryzura", + "HeatDistortion": "Zniekształcenie cieplne: {0}", + "HeavyRain": "Rzęsisty deszcz", + "Hidden": "Nie widać", + "LayerCaverns": "Jaskinie", + "LayerSpace": "Kosmos", + "LayerSurface": "Powierzchnia", + "LayerUnderground": "Podziemie", + "LayerUnderworld": "Piekło", + "LightRain": "Deszczyk", + "MechanicalRulerOff": "Mechaniczna linijka wył.", + "MechanicalRulerOn": "Mechaniczna linijka wł.", + "MostlyCloudy": "Przeważnie pochmurnie", + "NewMoon": "Nów", + "NoDPS": "b.d.", + "NoEnemiesNearby": "Brak przeciwników w pobliżu", + "NoKillCount": "Liczba zabójstw niedostępna", + "NoRareCreatures": "Brak rzadkich stworzeń w pobliżu", + "Normal": "Normalny", + "NotEnoughWater": "Za mało wody!", + "NoTreasureNearby": "Brak skarbów w pobliżu", + "OneEnemyNearby": "1 przeciwnik w pobliżu!", + "OreDetected": "Wykryto w pobliżu: {0}!", + "Overcast": "Całkowite zachmurzenie", + "PaintSprayerOff": "Rozpylacz farby wył.", + "PaintSprayerOn": "Rozpylacz farby wł.", + "PartlyCloudy": "Częściowo pochmurnie", + "PlayerDistance": "({0} ft)", + "PrecentFishingPower": "{0}% mocy wędkarstwa", + "Rain": "Deszcz", + "RulerOff": "Linijka wył.", + "RulerOn": "Linijka wł.", + "SettingsMenu": "Menu ustawień", + "OpenFileFolder": "{$LegacyInterface.110}", + "Speed": "{0} mph", + "StormEffects": "Efekty burzy: {0}", + "ThirdQuarter": "Trzecia kwadra", + "WaningCrescent": "Ubywający sierp", + "WaningGibbous": "Ubywający garb", + "WaxingCrescent": "Przybywający sierp", + "WaxingGibbous": "Przybywający garb", + "WestWind": " ({0} mph W)", + "WireModeForced": "Wyświetlanie kabli: Wymuszone", + "WireModeNormal": "Wyświetlanie kabli: Normalne", + "Gameplay": "Rozgrywka", + "GameZoom": "Zbliżenie: {0}% ({1}%)", + "LightingUpdateEveryFrameOff": "Rapid Lighting Off", + "LightingUpdateEveryFrameOn": "Rapid Lighting On", + "Misc": "Różne", + "QualityHigh": "Wysoka", + "QualityLow": "Niska", + "QualityMedium": "Średnia", + "QualityOff": "Wył.", + "UIScale": "Rozmiar interfejsu użytkownika: {0}% ({1}%)", + "WaveQuality": "Jakość fal: {0}", + "ZoomCategory": "Zbliżenie" + }, + "Misc": { + "ForceWaterSettling": "Wymuszone ustawienie wody.", + "ResolutionChanged": "Rozdzielczość zmieniona na: {0}x{1}.", + "ShortDays": "d", + "ShortHours": "godz.", + "ShortMinutes": "m", + "ShortSeconds": "s", + "WaterSettled": "Woda została ustawiona." + }, + "Net": { + "CheatingInvalid": "Wykryto próbę oszustwa: Nieuzasadnione wyrzucenie", + "CheatingLiquidSpam": "Wykryto próbę oszustwa: Spamowanie cieczą", + "CheatingProjectileSpam": "Wykryto próbę oszustwa: Spamowanie pociskami", + "CheatingTileRemovalSpam": "Wykryto próbę oszustwa: Usunięcie spamowania płytkami", + "CheatingTileSpam": "Wykryto próbę oszustwa: Spamowanie płytkami", + "ClientConnecting": "{0} się łączy...", + "ClientPlaying": "({0}) {1} gra", + "ClientRequestedWorldInfo": "({0}) {1} prosi o informacje na temat świata", + "ClientsConnected": "Liczba połączonych klientów: {0}", + "ClientSendingData": "({0}) {1} wysyła dane gracza...", + "ClientStatusComplete": "({0}) {1} {2}: Ukończono!", + "ConnectingTo": "Łączenie z: {0}", + "EmptyName": "Brak nazwy.", + "FoundServer": "Serwer znaleziony", + "IsReceivingTileData": "odbiera dane świata", + "LostConnection": "Utracono połączenie", + "NameTooLong": "Nazwa za długa.", + "RequestingTileData": "Wysyła prośbę o dane świata", + "RequestingWorldInformation": "Wysyłanie prośby o dane świata", + "SendingPlayerData": "Wysyłanie danych graczy...", + "ServerAutoShutdown": "Gracz lokalny odchodzi. Rozpoczęcie automatycznego zamykania.", + "StatusComplete": "{0}: Ukończono!", + "WaitingForClients": "Oczekiwanie na klientów..." + }, + "Social": { + "Joining": "Dołączanie...", + "JoiningFriend": "Dołączanie {0}...", + "StatusInGame": "Gra online.", + "StatusJoining": "Dołączanie do gry." + }, + "UI": { + "Achievements": "Osiągnięcia", + "Back": "Wróć", + "Cancel": "Anuluj", + "Delete": "Usuń", + "Effects": "Efekty", + "EnterButton": "Wprowadź", + "EnterMessage": "Wprowadź wiadomość:", + "EnterNewName": "Wprowadź nową nazwę:", + "Expert": "Ekspert", + "ExpertDescription": "(Dużo trudniejszy poziom i lepszy łup)", + "ExpertDescriptionFlavor": "Fortuna i chwała.", + "Favorite": "Ulubione", + "Hardcore": "Hardcore", + "Keybindings": "Przypisanie przycisków", + "Mediumcore": "Średni", + "More": "więcej", + "MoveOffCloud": "Przenieś z chmury", + "MoveToCloud": "Przenieś do chmury", + "New": "Nowy", + "Normal": "Normalny", + "LightMode_White": "{$LegacyMenu.56}", + "LightMode_Color": "{$LegacyMenu.55}", + "Play": "Graj", + "RestoreButton": "Przywróć", + "Save": "Zapisz", + "SelectPlayer": "Wybierz gracza", + "SelectWorld": "Wybierz świat", + "Softcore": "Łatwy", + "SpaceButton": "Kosmos", + "Submit": "Zatwierdź", + "Unfavorite": "Usuń z ulubionych", + "WorldCreatedFormat": "Stworzono: {0}", + "WorldSizeFormat": "{0} świat", + "WorldSizeLarge": "Duży", + "WorldSizeMedium": "Średni", + "WorldSizeSmall": "Mały", + "WorldSizeUnknown": "Nieznany", + "BartenderHelp": "Kryształ eternia", + "CopySeed": "Skopiuj ziarno: {0}", + "EnterSeed": "Wprowadź ziarno (zostaw puste, jeśli ma być losowe)", + "LoadingCode": "Wczytywanie:", + "SeedCopied": "Ziarno skopiowane", + "ZoomIn": "{$LegacyMenu.168}", + "ZoomOut": "{$LegacyMenu.169}", + "Ellipsis": "...", + "LightMode_Retro": "{$LegacyMenu.57}", + "LightMode_Trippy": "{$LegacyMenu.58}", + "PlayerEmptyName": "{$Net.EmptyName}" + }, + "DeathSource": { + "NPC": "{0} przez: {1}.", + "Player": "{0} przez: {1} ({2}).", + "Projectile": "{0} przez: {1}." + }, + "DeathText": { + "Burned": "{0} nie potrafi ugasić ognia.", + "Default": "{0}.", + "Drowned_1": "{0} zapomina, jak się oddycha.", + "Drowned_2": "{0} pływa z rybkami.", + "Drowned_3": "{0} topi się.", + "Drowned_4": "{0} zostaje karmą dla rekinów.", + "Electrocuted": "{0} nie jest dzieckiem elektryka.", + "Fell_1": "{0} upada i się zabija.", + "Fell_2": "{0} upada głową w piach.", + "Lava_1": "{0} topi się.", + "Lava_2": "{0} pali się.", + "Lava_3": "{0} próbuje pływać w lawie.", + "Lava_4": "{0} lubi bawić się magmą.", + "Petrified_1": "{0} roztrzaskuje się na kawałki", + "Petrified_3": "{0} wymaga interwencji ekipy sprzątającej.", + "Petrified_4": "{0} zostaje kupą ziemi.", + "Poisoned": "{0} nie znajduje antidotum.", + "Slain": "Gracz {0} zostaje zabity...", + "Stabbed": "{0} dostaje ostrzem.", + "Suffocated": "{0} nie może oddychać.", + "Teleport_1": "{0} nie materializuje się", + "Teleport_2_Female": "{0} ma problem z nogami. Pojawiły się w miejscu głowy", + "Teleport_2_Male": "{0} ma problem z nogami. Pojawiły się w miejscu głowy", + "TriedToEscape": "{0} próbuje uciec.", + "WasLicked": "{0} otrzymuje liźnięcie." + }, + "DeathTextGeneric": { + "ArmTornOff": "{0} doświadcza urwania rąk", + "Chopped": "{0} doświadcza posiekania", + "Cut": "{0} doświadcza rozcięcia na pół", + "Decapitated": "{0} doświadcza ścięcia głowy", + "Destroyed": "{0} doświadcza zniszczenia", + "Dissected": "{0} doświadcza brutalnego pocięcia", + "EntrailsRippedOut": "{0} doświadcza wyprucia wnętrzności", + "Eviscerated": "{0} doświadcza wypatroszenia", + "ExtremitiesDetached": "{0} doświadcza urwania kończyn", + "FaceTornOff": "{0} ma zmasakrowaną twarz", + "Flailing": "{0} przestaje w końcu machać tymi łapami", + "HeadRemoved": "{0} doświadcza urwania głowy", + "Impaled": "{0} doświadcza wbicia na pal", + "InnardsBecameOutards": "{0} doświadcza wybebeszenia", + "Mangled": "{0} ma zmasakrowane ciało", + "Massacred": "{0} doświadcza zmasakrowania", + "Murdered": "{0} staje się ofiarą morderstwa", + "PileOfFlesh": "{0} staje się kupą miecha", + "Plead": "{0} błaga o śmierć, co zostaje wysłuchane", + "Removed": "{0} doświadcza eliminacji ze świata {1}", + "Ripped": "{0} doświadcza oderwania mięsa od kości", + "Ruptured": "{0} ma pęknięte organy wewnętrzne", + "SkullCrushed": "{0} ma rozbitą czaszkę", + "Slain": "Gracz {0} zostaje zabity", + "Snapped": "{0} doświadcza przełamania na pół", + "TornInHalf": "{0} doświadcza rozdarcia na pół" + }, + "DungeonDefenders2": { + "BartenderWarning": "Kryształ eternia odrzuca to miejsce i natychmiast wyskakuje. Szynkarz wspominał, że trzeba go umieścić na otwartej, płaskiej przestrzeni...", + "CantSummonTower": "It doesn't seem to work without an Etheria Crystal nearby...", + "InvasionProgressTitle": "Armia Starszego", + "InvasionStart": "Nadciąga Armia Starszego!", + "InvasionWin": "Armia Starszego została pokonana!", + "WaveComplete": "Fala ukończona!" + }, + "Key": { + "DOWN": "W DÓŁ", + "UP": "W GÓRĘ" + }, + "Language": { + "English": "English (Angielski)", + "German": "Deutsch (Niemiecki)", + "Italian": "Italiano (Włoski)", + "French": "Français (Francuski)", + "Spanish": "Español (Hiszpański)", + "Russian": "Русский (Rosyjski)", + "Chinese": "简体中文 (Chiński uproszczony)", + "Portuguese": "Português brasileiro (Brazylijski portugalski)", + "Polish": "Polski" + }, + "RandomWorldName_Composition": { + "6": "{Adjective} {Location}" + } +} \ No newline at end of file diff --git a/Localization/Content/pl-PL/Game.json b/Localization/Content/pl-PL/Game.json new file mode 100644 index 0000000..281efc8 --- /dev/null +++ b/Localization/Content/pl-PL/Game.json @@ -0,0 +1,780 @@ +{ + "Announcement": { + "HasBeenDefeated_Plural": "{0} ponoszą klęskę!", + "HasBeenDefeated_Single": "{0} ponosi klęskę!", + "HasAwoken": "{0} budzi się ze snu!", + "HasArrived": "{0} nadchodzi!" + }, + "ArmorSetBonus": { + "MetalTier1": "2 pkt. obrony", + "MetalTier2": "3 pkt. obrony", + "CobaltRanged": "20% szans niezużycia amunicji", + "MythrilCaster": "17% mniejsze zużycie many", + "MythrilMelee": "5% większa szansa na trafienie krytyczne w walce w zwarciu", + "MythrilRanged": "20% szans niezużycia amunicji", + "AdamantiteCaster": "19% mniejsze zużycie many", + "AdamantiteMelee": "18% zwiększona szybkość poruszania się i walki w zwarciu", + "AdamantiteRanged": "25% szans niezużycia amunicji", + "ShadowScale": "15% zwiększona szybkość poruszania się", + "Wood": "1 pkt. obrony", + "Crimson": "Znacznie zwiększona regeneracja życia", + "Frost": "Ataki dystansowe i w zwarciu powodują mrozogień", + "Tiki": "Zwiększa maksymalną liczbę sług gracza", + "Palladium": "Znacznie zwiększa regenerację życia, gdy gracz uderzy przeciwnika", + "Orichalcum": "Na cel spadają płatki kwiatów, zadając dodatkowe obrażenia", + "Titanium": "Po zadaniu obrażeń przeciwnikowi gracz zyskuje odporność", + "Chlorophyte": "Przyzywa potężnego liścia kryształowego, który rani pobliskich wrogów", + "Wizard": "10% większa szansa na magiczne trafienie krytyczne", + "Meteor": "Pistolet kosmiczny zużywa 0 many", + "SpectreHealing": "Obrażenia magiczne zadane przeciwnikom leczą gracza z najmniejszą liczbą punktów życia", + "Shroomite": "Bezruch wprowadza cię w ukrycie,\nzwiększając twoje możliwości dystansowe i utrudniając przeciwnikom namierzanie", + "Platinum": "4 pkt. obrony", + "Pumpkin": "10% zwiększone obrażenia", + "Spooky": "Zwiększa obrażenia sług o 25%", + "SpectreDamage": "Zadane obrażenia magiczne zostaną dodatkowo odbite w pobliskich wrogów", + "MagicHat": "Zwiększa maksymalną liczbę punktów many o 60", + "BeetleDefense": "Żuki chronią cię przed otrzymaniem obrażeń", + "BeetleDamage": "Żuki zwiększają twoje obrażenia i szybkość w walce w zwarciu", + "Bee": "Zwiększa obrażenia sług o 10%", + "Spider": "Zwiększa obrażenia sług o 12%", + "Vortex": "Stuknij dwukrotnie {0}, żeby się ukryć\nzwiększając swoje możliwości dystansowe i utrudniając przeciwnikom namierzanie, ale również zmniejszając swoją szybkość poruszania się", + "Stardust": "Stuknij dwukrotnie {0}, żeby skierować swojego strażnika w konkretne miejsce", + "Forbidden": "Stuknij dwukrotnie {0}, żeby przyzwać pradawną burzę w miejsce kursora", + "Jungle": "16% mniejsze zużycie many", + "Molten": "17% dodatkowych obrażeń w walce w zwarciu", + "Mining": "30% zwiększona szybkość kopania", + "CobaltCaster": "14% mniejsze zużycie many", + "CobaltMelee": "15% zwiększona szybkość walki w zwarciu", + "ApprenticeTier2": "Zwiększa maksymalną liczbę wartowników\nZnaczne zwiększenie zasięgu i pola widzenia ognistych wartowników", + "ApprenticeTier3": "Zwiększa maksymalną liczbę wartowników\nZnacznie zwiększa skuteczność ognistych wartowników", + "HuntressTier2": "Zwiększa maksymalną liczbę wartowników\nWybuchowe pułapki szybciej się ładują i oblewają przeciwników naftą\nPodpal oblanych naftą przeciwników, co zadaje dodatkowe obrażenia", + "HuntressTier3": "Zwiększa maksymalną liczbę wartowników\nZnacznie zwiększa skuteczność wybuchowych pułapek", + "MonkTier2": "Zwiększa maksymalną liczbę wartowników\nElektryczna aura uderza szybciej i może zadawać trafienia krytyczne", + "MonkTier3": "Zwiększa maksymalną liczbę wartowników\nZnacznie zwiększa skuteczność elektrycznej aury", + "SquireTier2": "Zwiększa maksymalną liczbę wartowników\nBalista przebija większą liczbę celów i panikuje, gdy otrzymasz obrażenia", + "SquireTier3": "Zwiększa maksymalną liczbę wartowników\nZnacznie zwiększa skuteczność balisty" + }, + "BuffDescription": { + "AmmoBox": "20% szans niezużycia amunicji", + "AmmoReservation": "20% szans niezużycia amunicji", + "Archery": "20% zwiększone obrażenia i szybkość strzał", + "BabyDinosaur": "Chodzi za tobą młody dinozaur", + "BabyEater": "Chodzi za tobą pożeracz dusz", + "BabyFaceMonster": "Chodzi za tobą młody pyskostwór", + "BabyGrinch": "Chodzi za tobą młody grinch", + "BabyHornet": "Myśli, że jesteś jego matką", + "BabyPenguin": "Chyba chcę twoją rybę", + "BabySkeletronHead": "Nawet nie pytaj...", + "BabySlime": "Młody szlam będzie cię bronił", + "BabySnowman": "Chodzi za tobą młody bałwan", + "BabyTruffle": "No powiedz, że nie jest milutka?", + "BallistaPanic": "Twoje balisty panikują i oddają szybkie strzały!", + "BasiliskMount": "Wpakuj się w kogo chcesz... KOGOKOLWIEK!", + "Battle": "Zwiększone tempo rodzenia się przeciwników", + "BeeMount": "BzzzBzzBZZZZBzzz", + "BeetleEndurance1": "Otrzymywane obrażenia zmniejszone o 15%", + "BeetleEndurance2": "Otrzymywane obrażenia zmniejszone o 30%", + "BeetleEndurance3": "Otrzymywane obrażenia zmniejszone o 45%", + "BeetleMight1": "Obrażenia w walce w zwarciu oraz szybkość zwiększone o 10%", + "BeetleMight2": "Obrażenia w walce w zwarciu oraz szybkość zwiększone o 20%", + "BeetleMight3": "Obrażenia w walce w zwarciu oraz szybkość zwiększone o 30%", + "BetsysCurse": "Zmniejszona obrona", + "Bewitched": "Zwiększona maksymalna liczba sług", + "BlackCat": "Chodzi za tobą czarny kotek", + "Blackout": "Znacznie ograniczone widzenie", + "Bleeding": "Nie można regenerować życia", + "BoneJavelin": "Wykrwawienie", + "BrokenArmor": "Obrona zmniejszona o połowę", + "Builder": "Zwiększone szybkość i zasięg układania obiektów", + "BunnyMount": "Chce ci się marchewki", + "Burning": "Utrata życia i spowolnione poruszanie się", + "DesertMinecartRight": "{$BuffDescription.MinecartRight}", + "Campfire": "Nieznacznie zwiększona regeneracja życia", + "ChaosState": "Korzystanie z Kostura niezgody będzie zabierać życie", + "Chilled": "Szybkość poruszania się ograniczona", + "Clairvoyance": "Moce magiczne zwiększone", + "CompanionCube": "Nie zagrozi ci, że cię potnie, w sumie to nie umie nawet mówić", + "Confused": "Odwrócone poruszanie się", + "Crate": "Większa szansa wyłowienia skrzyni", + "CrimsonHeart": "Magiczne serce dające światło", + "Cursed": "Nie można używać żadnych przedmiotów", + "CursedInferno": "Utrata życia", + "CursedSapling": "Chodzi za tobą przeklęte drzewko", + "CuteFishronMount": "Tylko nie każ mu się czołgać.", + "Dangersense": "Widzisz pobliskie niebezpieczeństwa", + "Darkness": "Ograniczone widzenie", + "Daybreak": "Incenerated by solar rays", + "Dazed": "Znacznie ograniczone poruszanie się", + "DeadlySphere": "Zabójcza kula będzie cię bronić", + "DrillMount": "Latający świder", + "DryadsWard": "Chroni cię siła natury", + "DryadsWardDebuff": "The power of nature compells you", + "Electrified": "Nie możesz się ruszyć", + "Endurance": "10% zmniejszone obrażenia", + "EyeballSpring": "Chodzi za tobą nerw oczny", + "FairyBlue": "Chodzi za tobą duszek", + "FairyGreen": "Chodzi za tobą duszek", + "FairyRed": "Chodzi za tobą duszek", + "Featherfall": "Wciśnij W GÓRĘ lub W DÓŁ, żeby regulować szybkość spadania", + "DesertMinecartLeft": "{$BuffDescription.MinecartLeft}", + "Flipper": "Poruszaj się bez problemu w wodzie", + "Frostburn": "Albo solidnie pali, albo mocno wychładza. Tak czy siak, NAPRAWDĘ boli", + "Frozen": "Nie możesz się poruszać!", + "Gills": "Oddychaj wodą zamiast powietrzem", + "Gravitation": "Wciśnij W GÓRĘ, żeby odwrócić grawitację", + "HeartLamp": "Zwiększona regeneracja życia", + "Heartreach": "Zwiększony zasięg zbierania serc", + "Honey": "Zwiększona regeneracja życia", + "HornetMinion": "Szerszeń będzie cię bronił", + "Horrified": "Po takim paskudnym widoku nie ma ucieczki.", + "Hunter": "Pokazuje położenie przeciwników", + "IceBarrier": "Otrzymywane obrażenia zmniejszone o 25%", + "Ichor": "Zmniejszona obrona", + "ImpMinion": "Diablik będzie cię bronił", + "Inferno": "Podpala pobliskich przeciwników", + "Invisibility": "Daje niewidzialność", + "Ironskin": "Zwiększ obronę o 8", + "LeafCrystal": "Strzela kryształowymi liśćmi w pobliskich przeciwników", + "Lifeforce": "Maksymalne pkt. życia zwiększone o 20%", + "Lovestruck": "Ogarnia cię uczucie miłości!", + "MagicLantern": "Zaczarowana lampa oświetla twoją drogę", + "MagicPower": "20% zwiększone obrażenia magiczne", + "ManaRegeneration": "Zwiększona regeneracja many", + "ManaSickness": "Obrażenia magiczne zmniejszone o ", + "Merfolk": "Można bezproblemowo oddychać i poruszać się pod wodą", + "Midas": "Upuść więcej pieniędzy, jak zginiesz", + "MinecartLeft": "Przejażdżka wózkiem górniczym", + "MinecartLeftMech": "Przejażdżka wózkiem górniczym", + "MinecartLeftWood": "Przejażdżka wózkiem górniczym", + "MinecartRight": "Przejażdżka wózkiem górniczym", + "MinecartRightMech": "Przejażdżka wózkiem górniczym", + "MinecartRightWood": "Przejażdżka wózkiem górniczym", + "MiniMinotaur": "Jak pokonać miniminotaura?", + "Mining": "25% zwiększona szybkość kopania", + "MonsterBanner": "Zwiększone obrażenia i obrona przed następującymi przeciwnikami:", + "MoonLeech": "Nie otrzymujesz żadnego leczenia", + "NebulaUpDmg1": "15% zwiększone obrażenia", + "NebulaUpDmg2": "30% zwiększone obrażenia", + "NebulaUpDmg3": "45% zwiększone obrażenia", + "NebulaUpLife1": "Zwiększona regeneracja życia", + "NebulaUpLife2": "Zwiększona regeneracja życia", + "NebulaUpLife3": "Zwiększona regeneracja życia", + "NebulaUpMana1": "Zwiększona regeneracja many", + "NebulaUpMana2": "Zwiększona regeneracja many", + "NebulaUpMana3": "Zwiększona regeneracja many", + "NightOwl": "Lepsze widzenie w nocy", + "NoBuilding": "Tracisz możliwość tworzenia!", + "ObsidianSkin": "Odporność na lawę", + "Obstructed": "Nie widzisz!", + "OgreSpit": "Poruszanie się znacznie ograniczone", + "Oiled": "Otrzymywanie większych obrażeń od ognia", + "OnFire": "Powolna utrata życia", + "PaladinsShield": "25% otrzymanych obrażeń będzie odbitych do innego gracza", + "Panic": "Zwiększona szybkość poruszania się", + "ParryDamageBuff": "500% zwiększone obrażenia następnego ataku w walce w zwarciu", + "PeaceCandle": "Zmniejszone tempo rodzenia się potworów", + "PetBunny": "Chyba chcę twoją marchewkę", + "PetDD2Dragon": "Chodzi za tobą hoardagron", + "PetDD2Gato": "Chodzi za tobą gato-śmiglarz", + "PetDD2Ghost": "Chodzi za tobą nikły płomyk", + "PetLizard": "Gad jaki jest, każdy widzi", + "FishMinecartRight": "{$BuffDescription.MinecartRight}", + "PetSapling": "Chodzi za tobą drzewko", + "PetSpider": "Chodzi za tobą pająk", + "PetTurtle": "Miłego żółwiowania!", + "PigronMount": "Teraz mnie widzisz...", + "PirateMinion": "Pirat będzie cię bronił", + "Poisoned": "Powolna utrata życia", + "PotionSickness": "Nie można więcej używać przedmiotów leczących", + "Puppy": "Chodzi za tobą szczeniak", + "Pygmies": "Pigmeje będą cię bronić", + "Rabies": "Zwiększone obrażenia, zmniejszona regeneracja życia, nakłada efekty zmieniające status", + "Rage": "10% zwiększona szansa na trafienie krytyczne", + "RapidHealing": "Znacznie zwiększona regeneracja życia", + "Ravens": "Kruki zaatakują twoich wrogów", + "Regeneration": "Zapewnia regenerację życia", + "Rudolph": "Na czerwononosym reniferze w świat", + "ScutlixMount": "Pif, paf", + "ShadowDodge": "Unikniesz następnego ataku", + "ShadowFlame": "Utrata życia", + "ShadowOrb": "Magiczna kula dająca światło", + "SharknadoMinion": "Rekinado będzie cię bronić", + "Sharpened": "Bronie do walki w zwarciu penetrują pancerz", + "Shine": "Emituje światło", + "Silenced": "Nie można używać przedmiotów wymagających many", + "Slimed": "Pokrywa cię warstwa szlamu i się kleisz", + "SlimeMount": "HOPSASA!", + "Slow": "Zmniejszona szybkość poruszania się", + "SolarShield1": "Otrzymywane obrażenia zmniejszone o 30%, odeprzyj wrogów przy otrzymaniu obrażeń", + "SolarShield2": "Otrzymywane obrażenia zmniejszone o 30%, odeprzyj wrogów przy otrzymaniu obrażeń", + "SolarShield3": "Otrzymywane obrażenia zmniejszone o 30%, odeprzyj wrogów przy otrzymaniu obrażeń", + "Sonar": "Wiesz, co gryzie twój haczyk", + "SoulDrain": "Zwiększona regeneracja życia", + "Spelunker": "Pokazuje położenie skarbu i rudy", + "SpiderMinion": "Pająk będzie cię bronił", + "Squashling": "Chodzi za tobą kabaczek", + "StardustDragonMinion": "Smok pyłu gwiezdnego będzie cię bronił", + "StardustGuardianMinion": "Strażnik pyłu gwiezdnego będzie cię bronił", + "StardustMinion": "Ogniwo pyłu gwiezdnego będzie cię bronić", + "StardustMinionBleed": "being eaten by cells", + "StarInBottle": "Zwiększona regeneracja many", + "Stinky": "Strasznie zapodajesz", + "Stoned": "Zamieniasz się w kamień!", + "Suffocation": "Utrata życia", + "Summoning": "Zwiększona maksymalna liczba sług", + "Sunflower": "Zwiększona szybkość poruszania się i zmniejszone tempo rodzenia się potworów", + "SuspiciousTentacle": "Podejrzanie wyglądające oko dające światło", + "Swiftness": "25% zwiększona szybkość poruszania się", + "TheTongue": "Paszcza cię wsysa", + "Thorns": "Atakujący również otrzymują obrażenia", + "TikiSpirit": "Chodzi za tobą przyjazny duch", + "Tipsy": "Zwiększone umiejętności walki w zwarciu, zmniejszona obrona", + "Titan": "Zwiększony odrzut", + "TurtleMount": "Wolno na lądzie, szybko na morzu", + "TwinEyesMinion": "Bliźnięta będą cię chronić", + "UFOMinion": "UFO będzie cię chronić", + "UFOMount": "Dobrze, że masz maca", + "UnicornMount": "Naprzód, mój wierny rumaku!", + "Venom": "Utrata życia", + "VortexDebuff": "Zakrzywiasz grawitację", + "Warmth": "Zmniejszone obrażenia od źródeł zimna", + "WaterCandle": "Zwiększone tempo rodzenia się potworów", + "WaterWalking": "Wciśnij W DÓŁ, żeby wejść do wody", + "Weak": "Zdolności fizyczne zmniejszone", + "WeaponImbueConfetti": "Ataki w zwarciu przywołują konfetti", + "WeaponImbueCursedFlames": "Ataki w zwarciu rzucają na wrogów przeklęte płomienie", + "WeaponImbueFire": "Ataki w zwarciu podpalają wrogów", + "WeaponImbueGold": "Wrogowie upuszczają więcej złota po atakach w zwarciu", + "WeaponImbueIchor": "Ataki w zwarciu obniżają obronę wrogów", + "WeaponImbueNanites": "Ataki w zwarciu dezorientują wrogów", + "WeaponImbuePoison": "Ataki w zwarciu zatruwają wrogów", + "WeaponImbueVenom": "Ataki w zwarciu wstrzykują twoim celom jad", + "Webbed": "Nie możesz się ruszać", + "FishMinecartLeft": "{$BuffDescription.MinecartLeft}", + "Werewolf": "Zdolności fizyczne zwiększone", + "Wet": "Cieknie z ciebie", + "WindPushed": "Wiatr hula wokół ciebie!", + "Wisp": "Chodzi za tobą błędny ognik", + "WitheredArmor": "Masz zmniejszony pancerz!", + "WitheredWeapon": "Twoje ataki są słabsze!", + "Wrath": "10% zwiększone obrażenia", + "ZephyrFish": "Lubi koło ciebie pływać", + "BeeMinecartRight": "{$BuffDescription.MinecartRight}", + "BeeMinecartLeft": "{$BuffDescription.MinecartLeft}", + "LadybugMinecartRight": "{$BuffDescription.MinecartRight}", + "LadybugMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PigronMinecartRight": "{$BuffDescription.MinecartRight}", + "PigronMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SunflowerMinecartRight": "{$BuffDescription.MinecartRight}", + "SunflowerMinecartLeft": "{$BuffDescription.MinecartLeft}", + "HellMinecartRight": "{$BuffDescription.MinecartRight}", + "HellMinecartLeft": "{$BuffDescription.MinecartLeft}", + "ShroomMinecartRight": "{$BuffDescription.MinecartRight}", + "ShroomMinecartLeft": "{$BuffDescription.MinecartLeft}", + "AmethystMinecartRight": "{$BuffDescription.MinecartRight}", + "AmethystMinecartLeft": "{$BuffDescription.MinecartLeft}", + "TopazMinecartRight": "{$BuffDescription.MinecartRight}", + "TopazMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SapphireMinecartRight": "{$BuffDescription.MinecartRight}", + "SapphireMinecartLeft": "{$BuffDescription.MinecartLeft}", + "EmeraldMinecartRight": "{$BuffDescription.MinecartRight}", + "EmeraldMinecartLeft": "{$BuffDescription.MinecartLeft}", + "RubyMinecartRight": "{$BuffDescription.MinecartRight}", + "RubyMinecartLeft": "{$BuffDescription.MinecartLeft}", + "DiamondMinecartRight": "{$BuffDescription.MinecartRight}", + "DiamondMinecartLeft": "{$BuffDescription.MinecartLeft}", + "AmberMinecartRight": "{$BuffDescription.MinecartRight}", + "AmberMinecartLeft": "{$BuffDescription.MinecartLeft}", + "BeetleMinecartRight": "{$BuffDescription.MinecartRight}", + "BeetleMinecartLeft": "{$BuffDescription.MinecartLeft}", + "MeowmereMinecartRight": "{$BuffDescription.MinecartRight}", + "MeowmereMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PartyMinecartRight": "{$BuffDescription.MinecartRight}", + "PartyMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PirateMinecartRight": "{$BuffDescription.MinecartRight}", + "PirateMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SteampunkMinecartRight": "{$BuffDescription.MinecartRight}", + "SteampunkMinecartLeft": "{$BuffDescription.MinecartLeft}", + "CoffinMinecartRight": "{$BuffDescription.MinecartRight}", + "CoffinMinecartLeft": "{$BuffDescription.MinecartLeft}" + }, + "BuffName": { + "AmmoBox": "Skrzynka z amunicją", + "AmmoReservation": "Oszczędzanie amunicji", + "Archery": "Łucznictwo", + "BabyDinosaur": "Młody dinozaur", + "BabyEater": "Młody pożeracz", + "BabyFaceMonster": "Młody pyskostwór", + "BabyGrinch": "Młody grinch", + "BabyHornet": "Młody szerszeń", + "BabyPenguin": "Młody pingwin", + "BabySkeletronHead": "Głowa szkieletrona", + "BabySlime": "Młody szlam", + "BabySnowman": "Młody bałwan", + "BabyTruffle": "Młoda trufla", + "BallistaPanic": "Spanikowana balista!", + "BasiliskMount": "Bazyliszek-wierzchowiec", + "Battle": "Bitwa", + "BeeMount": "Pszczoła-wierzchowiec", + "BeetleEndurance1": "Wytrzymałość żuka", + "BeetleEndurance2": "Wytrzymałość żuka", + "BeetleEndurance3": "Wytrzymałość żuka", + "BeetleMight1": "Moc żuka", + "BeetleMight2": "Moc żuka", + "BeetleMight3": "Moc żuka", + "BetsysCurse": "Klątwa Betsy", + "Bewitched": "Oczarowanie", + "BlackCat": "Czarny kot", + "Blackout": "Awaria", + "Bleeding": "Krwawienie", + "BoneJavelin": "Penetracja", + "BrokenArmor": "Zepsuty pancerz", + "Builder": "Budowniczy", + "BunnyMount": "Króliczek-wierzchowiec", + "Burning": "Podpalenie", + "Calm": "Spokój", + "Campfire": "Milutkie ciepełko", + "ChaosState": "Stan chaosu", + "Chilled": "Ochłodzenie", + "Clairvoyance": "Jasnowidztwo", + "CompanionCube": "Kostka towarzysząca", + "Confused": "Dezorientacja", + "Crate": "Skrzynia", + "CrimsonHeart": "Szkarłatne serce", + "Cursed": "Przekleństwo", + "CursedInferno": "Przeklęte inferno", + "CursedSapling": "Przeklęte drzewko", + "CuteFishronMount": "Uroczy rybok-wierzchowiec", + "Dangersense": "Wyczuwanie zagrożenia", + "Darkness": "Ciemność", + "Daybreak": "Zaświtało", + "Dazed": "Oszołomienie", + "DeadlySphere": "Zabójcza kula", + "DrillMount": "Świder-wierzchowiec", + "DryadsWard": "Błogosławieństwo driady", + "DryadsWardDebuff": "Zguba driady", + "Electrified": "Elektryzacja", + "Endurance": "Wytrzymałość", + "EyeballSpring": "Nerw oczny", + "FairyBlue": "Duszek", + "FairyGreen": "Duszek", + "FairyRed": "Duszek", + "Featherfall": "Delikatny upadek", + "Fishing": "Wędkarstwo", + "Flipper": "Płetwa", + "Frostburn": "Mrozogień", + "Frozen": "Zamarznięcie", + "Gills": "Skrzela", + "Gravitation": "Grawitacja", + "HeartLamp": "Lampa życia", + "Heartreach": "Sercowy zasięg", + "Honey": "Miód", + "HornetMinion": "Szerszeń", + "Horrified": "Przerażenie", + "Hunter": "Łowca", + "IceBarrier": "Lodowa bariera", + "Ichor": "Ichor", + "ImpMinion": "Diablik", + "Inferno": "Inferno", + "Invisibility": "Niewidzialność", + "Ironskin": "Żelazna skóra", + "LeafCrystal": "Liściowy kryształ", + "Lifeforce": "Życiodajna siła", + "Lovestruck": "Miłość", + "MagicLantern": "Magiczna lampa", + "MagicPower": "Moc magiczna", + "ManaRegeneration": "Regeneracja many", + "ManaSickness": "Zaburzenia many", + "Merfolk": "Ryboludź", + "Midas": "Midas", + "MinecartLeft": "Wózek górniczy", + "MinecartLeftMech": "Wózek górniczy", + "MinecartLeftWood": "Wózek górniczy", + "MinecartRight": "Wózek górniczy", + "MinecartRightMech": "Wózek górniczy", + "MinecartRightWood": "Wózek górniczy", + "MiniMinotaur": "Miniminotaur", + "Mining": "Górnictwo", + "MonsterBanner": "Sztandar", + "MoonLeech": "Księżycowe ukąszenie", + "NebulaUpDmg1": "Mgławica ataku", + "NebulaUpDmg2": "Mgławica ataku", + "NebulaUpDmg3": "Mgławica ataku", + "NebulaUpLife1": "Mgławica życia", + "NebulaUpLife2": "Mgławica życia", + "NebulaUpLife3": "Mgławica życia", + "NebulaUpMana1": "Mgławica many", + "NebulaUpMana2": "Mgławica many", + "NebulaUpMana3": "Mgławica many", + "NightOwl": "Sowa", + "NoBuilding": "Paraliż kreatywności", + "ObsidianSkin": "Obsydianowa skóra", + "Obstructed": "Blokada", + "OgreSpit": "Zamulenie", + "Oiled": "Oblanie naftą", + "OnFire": "Pali się!", + "PaladinsShield": "Tarcza paladyna", + "Panic": "Panika!", + "ParryDamageBuff": "Ofensywa", + "PeaceCandle": "Świeca pokojowa", + "PetBunny": "Króliczek-chowaniec", + "PetDD2Dragon": "Hoardagron", + "PetDD2Gato": "Gato-śmiglarz", + "PetDD2Ghost": "Nikły płomyk", + "PetLizard": "Jaszczurka-chowaniec", + "PetParrot": "Papuga-chowaniec", + "PetSapling": "Drzewko-chowaniec", + "PetSpider": "Pająk-chowaniec", + "PetTurtle": "Żółw-chowaniec", + "PigronMount": "Smosiak-wierzchowiec", + "PirateMinion": "Pirat", + "Poisoned": "Zatrucie", + "PotionSickness": "Wstręt do mikstur", + "Puppy": "Szczeniak", + "Pygmies": "Pigmeje", + "Rabies": "Dzikie ugryzienie", + "Rage": "Wściekłość", + "RapidHealing": "Szybkie leczenie", + "Ravens": "Kruki", + "Regeneration": "Regeneracja", + "Rudolph": "Rudolf", + "ScutlixMount": "Scutlix-wierzchowiec", + "DesertMinecartRight": "{$BuffName.MinecartRight}", + "ShadowFlame": "Cienisty płomień", + "ShadowOrb": "Kula cienia", + "SharknadoMinion": "Rekinado", + "Sharpened": "Ostrość", + "Shine": "Blask", + "Silenced": "Uciszenie", + "Slimed": "Szlam", + "SlimeMount": "Szlam-wierzchowiec", + "Slow": "Spowolnienie", + "SolarShield1": "Słoneczny płomień", + "SolarShield2": "Słoneczny płomień", + "SolarShield3": "Słoneczny płomień", + "Sonar": "Sonar", + "SoulDrain": "Wyssanie życia", + "Spelunker": "Grotołaz", + "SpiderMinion": "Pająk", + "Squashling": "Kabaczek", + "StardustDragonMinion": "Smok pyłu gwiezdnego", + "StardustGuardianMinion": "Strażnik pyłu gwiezdnego", + "StardustMinion": "Ogniwo pyłu gwiezdnego", + "StardustMinionBleed": "Zaogniwowanie", + "StarInBottle": "Gwiazda w butelce", + "Stinky": "Smrodek", + "Stoned": "Kamień", + "Suffocation": "Uduszenie", + "Summoning": "Przyzywanie", + "Sunflower": "Radość", + "SuspiciousTentacle": "Podejrzanie wyglądające oko", + "Swiftness": "Szybkość", + "TheTongue": "Jęzor", + "Thorns": "Kolce", + "TikiSpirit": "Duch tiki", + "Tipsy": "Podchmielenie", + "Titan": "Tytan", + "TurtleMount": "Żółw-wierzchowiec", + "TwinEyesMinion": "Bliźnięta", + "UFOMinion": "UFO", + "UFOMount": "UFO-wierzchowiec", + "UnicornMount": "Jednorożec-wierzchowiec", + "Venom": "Jad", + "VortexDebuff": "Zakrzywienie", + "Warmth": "Ciepło", + "WaterCandle": "Wodna świeca", + "WaterWalking": "Wodny krok", + "Weak": "Słabość", + "WeaponImbueConfetti": "Nasycenie broni: konfetti", + "WeaponImbueCursedFlames": "Nasycenie broni: przeklęte płomienie", + "WeaponImbueFire": "Nasycenie broni: ogień", + "WeaponImbueGold": "Nasycenie broni: złoto", + "WeaponImbueIchor": "Nasycenie broni: ichor", + "WeaponImbueNanites": "Nasycenie broni: nanity", + "WeaponImbuePoison": "Nasycenie broni: trucizna", + "WeaponImbueVenom": "Nasycenie broni: jad", + "Webbed": "Pajęczyna", + "WellFed": "Najedzenie", + "Werewolf": "Wilkołak", + "Wet": "Ociekanie", + "WindPushed": "Potężny wiatr", + "Wisp": "Błędny ognik", + "WitheredArmor": "Zniszczony pancerz", + "WitheredWeapon": "Zniszczona broń", + "Wrath": "Gniew", + "ZephyrFish": "Ryba zefiru", + "DesertMinecartLeft": "{$BuffName.MinecartLeft}", + "FishMinecartRight": "{$BuffName.MinecartRight}", + "FishMinecartLeft": "{$BuffName.MinecartLeft}", + "BeeMinecartRight": "{$BuffName.MinecartRight}", + "BeeMinecartLeft": "{$BuffName.MinecartLeft}", + "LadybugMinecartRight": "{$BuffName.MinecartRight}", + "LadybugMinecartLeft": "{$BuffName.MinecartLeft}", + "PigronMinecartRight": "{$BuffName.MinecartRight}", + "PigronMinecartLeft": "{$BuffName.MinecartLeft}", + "SunflowerMinecartRight": "{$BuffName.MinecartRight}", + "SunflowerMinecartLeft": "{$BuffName.MinecartLeft}", + "HellMinecartRight": "{$BuffName.MinecartRight}", + "HellMinecartLeft": "{$BuffName.MinecartLeft}", + "ShroomMinecartRight": "{$BuffName.MinecartRight}", + "ShroomMinecartLeft": "{$BuffName.MinecartLeft}", + "AmethystMinecartRight": "{$BuffName.MinecartRight}", + "AmethystMinecartLeft": "{$BuffName.MinecartLeft}", + "TopazMinecartRight": "{$BuffName.MinecartRight}", + "TopazMinecartLeft": "{$BuffName.MinecartLeft}", + "SapphireMinecartRight": "{$BuffName.MinecartRight}", + "SapphireMinecartLeft": "{$BuffName.MinecartLeft}", + "EmeraldMinecartRight": "{$BuffName.MinecartRight}", + "EmeraldMinecartLeft": "{$BuffName.MinecartLeft}", + "RubyMinecartRight": "{$BuffName.MinecartRight}", + "RubyMinecartLeft": "{$BuffName.MinecartLeft}", + "DiamondMinecartRight": "{$BuffName.MinecartRight}", + "DiamondMinecartLeft": "{$BuffName.MinecartLeft}", + "AmberMinecartRight": "{$BuffName.MinecartRight}", + "AmberMinecartLeft": "{$BuffName.MinecartLeft}", + "BeetleMinecartRight": "{$BuffName.MinecartRight}", + "BeetleMinecartLeft": "{$BuffName.MinecartLeft}", + "MeowmereMinecartRight": "{$BuffName.MinecartRight}", + "MeowmereMinecartLeft": "{$BuffName.MinecartLeft}", + "PartyMinecartRight": "{$BuffName.MinecartRight}", + "PartyMinecartLeft": "{$BuffName.MinecartLeft}", + "PirateMinecartRight": "{$BuffName.MinecartRight}", + "PirateMinecartLeft": "{$BuffName.MinecartLeft}", + "SteampunkMinecartRight": "{$BuffName.MinecartRight}", + "SteampunkMinecartLeft": "{$BuffName.MinecartLeft}", + "CoffinMinecartRight": "{$BuffName.MinecartRight}", + "CoffinMinecartLeft": "{$BuffName.MinecartLeft}" + }, + "MapObject": { + "Adamantite": "Adamantyt", + "AnimalSkin": "Skóra zwierzęcia", + "Anvil": "Kowadło", + "Banner": "Sztandar", + "BeeHive": "Ul", + "Chair": "Krzesło", + "Chandelier": "Żyrandol", + "Chlorophyte": "Zielenica", + "ChristmasLight": "Światełko choinkowe", + "Cobalt": "Kobalt", + "Copper": "Miedź", + "CrimsonAltar": "Szkarłatny ołtarz", + "Crimtane": "Szkarłat", + "DemonAltar": "Demoniczny ołtarz", + "Demonite": "Demonit", + "Door": "Drzwi", + "DrippingHoney": "Cieknący miód", + "DrippingLava": "Cieknąca lawa", + "DrippingWater": "Cieknąca woda", + "FloorLamp": "Lampa podłogowa", + "Fossil": "Skamielina", + "GiantMushroom": "Wielki grzyb", + "Gold": "Złoto", + "Iron": "Żelazo", + "ItemRack": "Stojak na przedmioty", + "Lantern": "Lampa", + "Larva": "Larwa", + "Lead": "Ołów", + "LivingWood": "Żyjące drewno", + "MetalBar": "Metalowa sztabka", + "Mythril": "Mithril", + "OrangeSquirrelCage": "Klatka dla pomarańczowych wiewiórek", + "Orichalcum": "Orichalcum", + "Painting": "Obraz", + "Palladium": "Paladium", + "PalmTree": "Palma", + "Picture": "Obrazek", + "PineTree": "Sosna", + "PlanterasBulb": "Cebulka Plantery", + "Platinum": "Platyna", + "Pot": "Garnek", + "Rocket": "Rakieta", + "SandFlow": "Przepływ piasku", + "Sapling": "Drzewko", + "SiltExtractinator": "Ekstraktator mułu", + "Silver": "Srebro", + "Sink": "Umywalka", + "Statue": "Posąg", + "Table": "Stół", + "Thorn": "Kolec", + "Thorns": "Kolce", + "Timer": "Licznik", + "Tin": "Cyna", + "Titanium": "Tytan", + "Trap": "Pułapka", + "Tree": "Drzewo", + "Trophy": "Trofeum", + "Tungsten": "Tungsten", + "Turret": "Wieżyczka", + "Vase": "Wazon", + "WaterFountain": "Fontanna", + "Web": "Pajęczyna" + }, + "ChatCommand": { + "Playing_0": "{$LegacyMultiplayer.6}", + "Playing_1": "{$LegacyMultiplayer.21}", + "Roll": "{$LegacyMultiplayer.8}", + "Party": "/d", + "Emote": "/ja" + }, + "Bestiary_ItemDropConditions": { + "NotExpert": "", + "NotMasterMode": "", + "LegacyHack_IsBossAndNotExpert": "", + "IsCrimsonAndNotExpert": "", + "IsCorruptionAndNotExpert": "", + "NotFromStatue": "" + }, + "Bestiary_FlavorText": { + "npc_JungleSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_YellowSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_RedSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_PurpleSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_BlackSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_GreenSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_BlueSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_DemonEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_Zombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_Skeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_AngryBones": "{$CommonBestiaryFlavor.AngryBones}", + "npc_Hornet": "{$CommonBestiaryFlavor.Hornet}", + "npc_Hellbat": "{$CommonBestiaryFlavor.LavaBat}", + "npc_BlueJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_PinkJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_Mummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_DarkMummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_LightMummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_Mimic": "{$CommonBestiaryFlavor.Mimic}", + "npc_GreenJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_BaldZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_WanderingEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_Penguin": "{$CommonBestiaryFlavor.Penguin}", + "npc_PenguinBlack": "{$CommonBestiaryFlavor.Penguin}", + "npc_Lavabat": "{$CommonBestiaryFlavor.LavaBat}", + "npc_PigronCorruption": "{$CommonBestiaryFlavor.Pigron}", + "npc_PigronHallow": "{$CommonBestiaryFlavor.Pigron}", + "npc_PigronCrimson": "{$CommonBestiaryFlavor.Pigron}", + "npc_PincushionZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_SwampZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_TwiggyZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_CataractEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_SleepyEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_DialatedEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_GreenEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_PurpleEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_FemaleZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_HeadacheSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_MisassembledSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_PantlessSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_HornetFatty": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetHoney": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetLeafy": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetSpikey": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetStingy": "{$CommonBestiaryFlavor.Hornet}", + "npc_ZombieMushroom": "{$CommonBestiaryFlavor.MushroomZombie}", + "npc_ZombieMushroomHat": "{$CommonBestiaryFlavor.MushroomZombie}", + "npc_FungiBulb": "{$CommonBestiaryFlavor.FungiBulb}", + "npc_GiantFungiBulb": "{$CommonBestiaryFlavor.FungiBulb}", + "npc_RustyArmoredBonesAxe": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesFlail": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesSword": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesSwordNoArmor": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_BlueArmoredBones": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesMace": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesNoPants": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesSword": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_HellArmoredBones": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesSpikeShield": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesMace": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesSword": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_RaggedCaster": "{$CommonBestiaryFlavor.RaggedCaster}", + "npc_RaggedCasterOpenCoat": "{$CommonBestiaryFlavor.RaggedCaster}", + "npc_Necromancer": "{$CommonBestiaryFlavor.Necromancer}", + "npc_NecromancerArmored": "{$CommonBestiaryFlavor.Necromancer}", + "npc_DiabolistRed": "{$CommonBestiaryFlavor.Diabolist}", + "npc_DiabolistWhite": "{$CommonBestiaryFlavor.Diabolist}", + "npc_AngryBonesBig": "{$CommonBestiaryFlavor.AngryBones}", + "npc_AngryBonesBigMuscle": "{$CommonBestiaryFlavor.AngryBones}", + "npc_AngryBonesBigHelmet": "{$CommonBestiaryFlavor.AngryBones}", + "npc_Scarecrow1": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow2": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow3": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow4": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow5": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow6": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow7": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow8": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow9": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow10": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_DemonEyeOwl": "{$CommonBestiaryFlavor.CostumeDemonEye}", + "npc_DemonEyeSpaceship": "{$CommonBestiaryFlavor.CostumeDemonEye}", + "npc_ZombieDoctor": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_ZombieSuperman": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_ZombiePixie": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_SkeletonTopHat": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_SkeletonAstonaut": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_SkeletonAlien": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_ZombieXmas": "{$CommonBestiaryFlavor.ZombieXmas}", + "npc_ZombieSweater": "{$CommonBestiaryFlavor.ZombieXmas}", + "npc_SlimeRibbonWhite": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonYellow": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonGreen": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonRed": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_ZombieElf": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ZombieElfBeard": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ZombieElfGirl": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ArmedZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombiePincushion": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieSwamp": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieTwiggy": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieCenx": "{$CommonBestiaryFlavor.Zombie}", + "npc_GoldBird": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldBunny": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldButterfly": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldFrog": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldGrasshopper": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldMouse": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldWorm": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_BoneThrowingSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton2": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton3": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton4": "{$CommonBestiaryFlavor.Skeleton}", + "npc_GiantWalkingAntlion": "{$CommonBestiaryFlavor.AntlionCharger}", + "npc_GiantFlyingAntlion": "{$CommonBestiaryFlavor.AntlionSwarmer}", + "npc_DesertLamiaLight": "{$CommonBestiaryFlavor.Lamia}", + "npc_DesertLamiaDark": "{$CommonBestiaryFlavor.Lamia}", + "npc_SquirrelGold": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_SandShark": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkCorrupt": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkCrimson": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkHallow": "{$CommonBestiaryFlavor.Sandshark}", + "npc_WalkingAntlion": "{$CommonBestiaryFlavor.AntlionCharger}", + "npc_FlyingAntlion": "{$CommonBestiaryFlavor.AntlionSwarmer}", + "npc_GoldGoldfish": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldGoldfishWalker": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_BlackDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_BlueDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_GreenDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_OrangeDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_RedDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_YellowDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_GoldDragonfly": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldLadyBug": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldWaterStrider": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldSeahorse": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_IceMimic": "{$CommonBestiaryFlavor.Mimic}", + "npc_GemSquirrelAmethyst": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelTopaz": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelSapphire": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelEmerald": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelRuby": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelDiamond": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelAmber": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemBunnyAmethyst": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyTopaz": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnySapphire": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyEmerald": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyRuby": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyDiamond": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyAmber": "{$CommonBestiaryFlavor.GemBunny}" + } +} \ No newline at end of file diff --git a/Localization/Content/pl-PL/Items.json b/Localization/Content/pl-PL/Items.json new file mode 100644 index 0000000..c7342b9 --- /dev/null +++ b/Localization/Content/pl-PL/Items.json @@ -0,0 +1,5511 @@ +{ + "PaintingArtist": { + "Crowno": "'V. Costa Moura'", + "Garner": "'W. Garner'", + "Moosdijk": "'R. Moosdijk'", + "Lazure": "'J. Hayes'", + "Myhre": "'J. T. Myhre'", + "Burczyk": "'C. Burczyk'", + "Craig": "'A. Craig'", + "Kolf": "'A. G. Kolf'", + "Wright": "'K. Wright'", + "Phelps": "'D. Phelps'", + "Duncan": "'M. J. Duncan'", + "Ness": "'C. J. Ness'" + }, + "Prefix": { + "Dull": "(Tępy)", + "Unhappy": "(Nieszczęśliwy)", + "Bulky": "(Masywny)", + "Shameful": "(Haniebny)", + "Heavy": "(Ciężki)", + "Light": "(Lekki)", + "Sighted": "(Celny)", + "Rapid": "(Błyskawiczny)", + "Hasty": "(Szybki)", + "Intimidating": "(Zastraszający)", + "Large": "(Duży)", + "Deadly": "(Śmiercionośny)", + "Staunch": "(Wierny)", + "Awful": "(Okropny)", + "Lethargic": "(Ospały)", + "Awkward": "(Niewygodny)", + "Powerful": "(Potężny)", + "Mystic": "(Mistyczny)", + "Adept": "(Fachowy)", + "Masterful": "(Mistrzowski)", + "Inept": "(Nieudany)", + "Massive": "(Solidny)", + "Ignorant": "(Prostacki)", + "Deranged": "(Obłąkany)", + "Intense": "(Intensywny)", + "Taboo": "(Tabu)", + "Celestial": "(Niebiański)", + "Furious": "(Wściekły)", + "Keen": "(Ochoczy)", + "Superior": "(Ponadprzeciętny)", + "Forceful": "(Gwałtowny)", + "Broken": "(Niesprawny)", + "Dangerous": "(Niebezpieczny)", + "Damaged": "(Uszkodzony)", + "Shoddy": "(Tandetny)", + "Quick": "(Prędki)", + "Deadly2": "(Śmiercionośny)", + "Agile": "(Zwinny)", + "Nimble": "(Chyży)", + "Murderous": "(Morderczy)", + "Slow": "(Wolny)", + "Sluggish": "(Powolny)", + "Lazy": "(Leniwy)", + "Savage": "(Brutalny)", + "Annoying": "(Denerwujący)", + "Nasty": "(Paskudny)", + "Manic": "(Maniakalny)", + "Hurtful": "(Bolesny)", + "Strong": "(Silny)", + "Unpleasant": "(Nieprzyjemny)", + "Weak": "(Słaby)", + "Ruthless": "(Bezwzględny)", + "Frenzying": "(Furiacki)", + "Godly": "(Boski)", + "Sharp": "(Ostry)", + "Demonic": "(Demoniczny)", + "Zealous": "(Gorliwy)", + "Hard": "(Twardy)", + "Guarding": "(Strzegący)", + "Armored": "(Opancerzony)", + "Warding": "(Chroniący)", + "Arcane": "(Tajemniczy)", + "Precise": "(Precyzyjny)", + "Lucky": "(Fortunny)", + "Jagged": "(Postrzępiony)", + "Pointy": "(Szpiczasty)", + "Spiked": "(Kolczasty)", + "Angry": "(Zły)", + "Menacing": "(Groźny)", + "Brisk": "(Energiczny)", + "Fleeting": "(Przelotny)", + "Hasty2": "(Szybki)", + "Quick2": "(Prędki)", + "Wild": "(Dziki)", + "Rash": "(Nierozważny)", + "Intrepid": "(Nieustraszony)", + "Tiny": "(Drobny)", + "Violent": "(Agresywny)", + "Legendary": "(Legendarny)", + "Unreal": "(Nierealny)", + "Mythical": "(Mityczny)", + "Terrible": "(Straszliwy)", + "Small": "(Mały)" + }, + "ItemName": { + "IronPickaxe": "Żelazny kilof", + "IronAxe": "Żelazna siekiera", + "ShadowGreaves": "Nagolenniki cienia", + "ConfettiGun": "Pistolet na konfetti", + "ChlorophyteMask": "Zielenicowa maska", + "ChlorophyteHelmet": "Zielenicowy hełm", + "ChlorophyteHeadgear": "Zielenicowe nakrycie głowy", + "ChlorophytePlateMail": "Zielenicowa zbroja płytowa", + "ChlorophyteGreaves": "Zieleniocowe nagolenniki", + "ChlorophyteBar": "Zielenicowa sztabka", + "RedDye": "Czerwony barwnik", + "OrangeDye": "Pomarańczowy barwnik", + "YellowDye": "Żółty barwnik", + "ShadowScalemail": "Zbroja łuskowa cienia", + "LimeDye": "Limonkowy barwnik", + "GreenDye": "Zielony barwnik", + "TealDye": "Morski barwnik", + "CyanDye": "Cyjanowy barwnik", + "SkyBlueDye": "Barwnik błękitnego nieba", + "BlueDye": "Niebieski barwnik", + "PurpleDye": "Fioletowy barwnik", + "VioletDye": "Fiołkowy barwnik", + "PinkDye": "Różowy barwnik", + "RedandBlackDye": "Czarno-czerwony barwnik", + "ShadowHelmet": "Hełm cienia", + "OrangeandBlackDye": "Pomarańczowo-czarny barwnik", + "YellowandBlackDye": "Żółto-czarny barwnik", + "LimeandBlackDye": "Limonkowo-czarny barwnik", + "GreenandBlackDye": "Zielono-czarny barwnik", + "TealandBlackDye": "Morsko-czarny barwnik", + "CyanandBlackDye": "Cyjanowo-czarny barwnik", + "SkyBlueandBlackDye": "Barwnik błękitne niebo i czarny", + "BlueandBlackDye": "Niebiesko-czarny barwnik", + "PurpleandBlackDye": "Fioletowo-czarny barwnik", + "VioletandBlackDye": "Fiołkowo-czarny barwnik", + "NightmarePickaxe": "Koszmarny kilof", + "PinkandBlackDye": "Różowo-czarny barwnik", + "FlameDye": "Płomienny barwnik", + "FlameAndBlackDye": "Płomienno-czarny barwnik", + "GreenFlameDye": "Barwnik zielonego płomienia", + "GreenFlameAndBlackDye": "Barwnik zielonego płomienia i czarny", + "BlueFlameDye": "Barwnik niebieskiego płomienia", + "BlueFlameAndBlackDye": "Barwnik niebieskiego płomienia i czarny", + "SilverDye": "Srebrny barwnik", + "BrightRedDye": "Jasnoczerwony barwnik", + "BrightOrangeDye": "Jasnopomarańczowy barwnik", + "TheBreaker": "Kruszyciel", + "BrightYellowDye": "Jasnożółty barwnik", + "BrightLimeDye": "Jasnolimonkowy barwnik", + "BrightGreenDye": "Jasnozielony barwnik", + "BrightTealDye": "Jasnomorski barwnik", + "BrightCyanDye": "Jasnocyjanowy barwnik", + "BrightSkyBlueDye": "Jasny barwnik błękitnego nieba", + "BrightBlueDye": "Jasnoniebieski barwnik", + "BrightPurpleDye": "Jasnofioletowy barwnik", + "BrightVioletDye": "Jasnofiołkowy barwnik", + "BrightPinkDye": "Jasnoróżowy barwnik", + "Candle": "Świeca", + "BlackDye": "Czarny barwnik", + "RedandSilverDye": "Czerwono-srebrny barwnik", + "OrangeandSilverDye": "Pomarańczowo-srebrny barwnik", + "YellowandSilverDye": "Żółto-srebrny barwnik", + "LimeandSilverDye": "Limonkowo-srebrny barwnik", + "GreenandSilverDye": "Zielono-srebrny barwnik", + "TealandSilverDye": "Morsko-srebrny barwnik", + "CyanandSilverDye": "Cyjanowo-srebrny barwnik", + "SkyBlueandSilverDye": "Barwnik jasnego nieba i srebrny", + "BlueandSilverDye": "Niebiesko-srebrny barwnik", + "CopperChandelier": "Miedziany żyrandol", + "PurpleandSilverDye": "Fioletowo-srebrny barwnik", + "VioletandSilverDye": "Fiołkowo-srebrny barwnik", + "PinkandSilverDye": "Różowo-srebrny barwnik", + "IntenseFlameDye": "Intensywny, płomienny barwnik", + "IntenseGreenFlameDye": "Intensywny barwnik zielonego płomienia", + "IntenseBlueFlameDye": "Intensywny barwnik niebieskiego płomienia", + "RainbowDye": "Barwnik tęczy", + "IntenseRainbowDye": "Intensywny barwnik tęczy", + "YellowGradientDye": "Barwnik żółtego gradientu", + "CyanGradientDye": "Barwnik cyjanowego gradientu", + "SilverChandelier": "Srebrny żyrandol", + "VioletGradientDye": "Barwnik fiołkowego gradientu", + "Paintbrush": "Pędzel", + "PaintRoller": "Wałek", + "RedPaint": "Czerwona farba", + "OrangePaint": "Pomarańczowa farba", + "YellowPaint": "Żółta farba", + "LimePaint": "Limonkowa farba", + "GreenPaint": "Zielona farba", + "TealPaint": "Morska farba", + "CyanPaint": "Cyjanowa farba", + "GoldChandelier": "Złoty żyrandol", + "SkyBluePaint": "Farba koloru błękitnego nieba", + "BluePaint": "Niebieska farba", + "PurplePaint": "Fioletowa farba", + "VioletPaint": "Fiołkowa farba", + "PinkPaint": "Różowa farba", + "DeepRedPaint": "Farba głęboka czerwień", + "DeepOrangePaint": "Farba głęboki pomarańczowy", + "DeepYellowPaint": "Farba głęboki żółty", + "DeepLimePaint": "Farba głęboki limonkowy", + "DeepGreenPaint": "Farba głęboki zielony", + "ManaCrystal": "Kryształ many", + "DeepTealPaint": "Farba głęboki morski", + "DeepCyanPaint": "Farba głęboki cyjanowy", + "DeepSkyBluePaint": "Farba głębokiego koloru błękitnego nieba", + "DeepBluePaint": "Farba głęboki niebieski", + "DeepPurplePaint": "Farba głęboki fioletowy", + "DeepVioletPaint": "Farba głęboki fiołkowy", + "DeepPinkPaint": "Farba głęboki różowy", + "BlackPaint": "Czarna farba", + "WhitePaint": "Biała farba", + "GrayPaint": "Szara farba", + "IronOre": "Ruda żelaza", + "LesserManaPotion": "Mniejsza mikstura many", + "PaintScraper": "Skrobak do farby", + "LihzahrdBrick": "Jaszczuhrza cegła", + "LihzahrdBrickWall": "Jaszczuhrza ściana z cegieł", + "SlushBlock": "Blok brei", + "PalladiumOre": "Ruda paladium", + "OrichalcumOre": "Ruda orichalcum", + "TitaniumOre": "Ruda tytanu", + "TealMushroom": "Grzyb koloru morskiego", + "GreenMushroom": "Zielony grzyb", + "SkyBlueFlower": "Kwiat koloru błękitnego nieba", + "BandofStarpower": "Opaska gwiezdnej mocy", + "YellowMarigold": "Żółty nagietek", + "BlueBerries": "Niebieskie jagody", + "LimeKelp": "Limonkowe wodorosty", + "PinkPricklyPear": "Różowa opuncja", + "OrangeBloodroot": "Pomarańczowa sanguinaria", + "RedHusk": "Czerwona łupina", + "CyanHusk": "Cyjanowa łupina", + "VioletHusk": "Fiołkowa łupina", + "BlackInk": "Czarny tusz", + "FlowerofFire": "Kwiat ognia", + "DyeVat": "Kadź do barwników", + "BeeGun": "Pszczeli pistolet", + "PossessedHatchet": "Opętany topór", + "BeeKeeper": "Pszczeli sprzymierzeniec", + "Hive": "Plaster miodu", + "HoneyBlock": "Blok miodu", + "HiveWall": "Ściana ula", + "CrispyHoneyBlock": "Kruchy blok miodu", + "HoneyBucket": "Wiadro miodu", + "HiveWand": "Pszczela różdżka", + "MagicMissile": "Magiczny pocisk", + "Beenade": "Pszczeli granat", + "GravityGlobe": "Kula grawitacyjna", + "HoneyComb": "Plaster miodu", + "Abeemination": "Pszczybywaj", + "BottledHoney": "Miód w butelce", + "RainHat": "Kapelusz przeciwdeszczowy", + "RainCoat": "Płaszcz przeciwdeszczowy", + "LihzahrdDoor": "Jaszczuhrze drzwi", + "DungeonDoor": "Drzwi z lochu", + "LeadDoor": "Ołowiane drzwi", + "DirtRod": "Brudna laska", + "IronDoor": "Żelazne drzwi", + "TempleKey": "Klucz do świątyni", + "LihzahrdChest": "Jaszczuhrzy kufer", + "LihzahrdChair": "Jaszczuhrze krzesło", + "LihzahrdTable": "Jaszczuhrzy stół", + "LihzahrdWorkBench": "Jaszczuhrzy stół warsztatowy", + "SuperDartTrap": "Superpułapka strzałkowa", + "FlameTrap": "Pułapka ogniowa", + "SpikyBallTrap": "Pułapka kolczatkowa", + "SpearTrap": "Pułapka włóczniowa", + "ShadowOrb": "Kula cienia", + "WoodenSpike": "Drewniany kolec", + "LihzahrdPressurePlate": "Jaszczuhrza płyta dociskowa", + "LihzahrdStatue": "Jaszczuhrzy posąg", + "LihzahrdWatcherStatue": "Jaszczuhrzy posąg obserwatora", + "LihzahrdGuardianStatue": "Jaszczuhrzy posąg strażnika", + "WaspGun": "Pistolet na osy", + "PiranhaGun": "Pistolet na piranie", + "PygmyStaff": "Pigmejski kostur", + "PygmyNecklace": "Pigmejski naszyjnik", + "TikiMask": "Maska tiki", + "Meteorite": "Meteoryt", + "TikiShirt": "Koszula tiki", + "TikiPants": "Spodnie tiki", + "LeafWings": "Liściaste skrzydła", + "BlizzardinaBalloon": "Zamieć w balonie", + "BundleofBalloons": "Zestaw balonów", + "BatWings": "Skrzydła nietoperza", + "BoneSword": "Kościany miecz", + "HerculesBeetle": "Żuk Herkules", + "SmokeBomb": "Bomba dymna", + "BoneKey": "Kościany klucz", + "MeteoriteBar": "Sztabka meteorytu", + "Nectar": "Nektar", + "TikiTotem": "Totem tiki", + "LizardEgg": "Jajo jaszczurki", + "GraveMarker": "Tablica nagrobkowa", + "CrossGraveMarker": "Krzyż nagrobkowy", + "Headstone": "Macewa", + "Gravestone": "Płyta nagrobkowa", + "Obelisk": "Obelisk", + "LeafBlower": "Dmuchawa do liści", + "ChlorophyteBullet": "Zielenicowa kula", + "Hook": "Hak", + "ParrotCracker": "Krakers dla papugi", + "StrangeGlowingMushroom": "Dziwny, lśniący grzyb", + "Seedling": "Sadzonka", + "WispinaBottle": "Błędny ognik w butelce", + "PalladiumBar": "Sztabka paladium", + "PalladiumSword": "Miecz z paladium", + "PalladiumPike": "Kolec z paladium", + "PalladiumRepeater": "Kusza powtarzalna z paladium", + "PalladiumPickaxe": "Kilof z paladium", + "PalladiumDrill": "Świder z paladium", + "Flamarang": "Ogniorang", + "PalladiumChainsaw": "Piła łańcuchowa z paladium", + "OrichalcumBar": "Sztabka orichalcum", + "OrichalcumSword": "Miecz z orichalcum", + "OrichalcumHalberd": "Halabarda z olicharcum", + "OrichalcumRepeater": "Kusza powtarzalna z orichalcum", + "OrichalcumPickaxe": "Kilof z orichalcum", + "OrichalcumDrill": "Świder z orichalcum", + "OrichalcumChainsaw": "Piła łańcuchowa z orichalcum", + "TitaniumBar": "Sztabka tytanu", + "TitaniumSword": "Miecz z tytanu", + "CopperOre": "Ruda miedzi", + "MoltenFury": "Roztopiona furia", + "TitaniumTrident": "Tytanowy trójząb", + "TitaniumRepeater": "Kusza powtarzalna z tytanu", + "TitaniumPickaxe": "Tytanowy kilof", + "TitaniumDrill": "Tytanowy świder", + "TitaniumChainsaw": "Tytanowa piła łańcuchowa", + "PalladiumMask": "Maska z paladium", + "PalladiumHelmet": "Hełm z paladium", + "PalladiumHeadgear": "Nakrycie głowy z paladium", + "PalladiumBreastplate": "Napierśnik z paladium", + "PalladiumLeggings": "Spodnie z paladium", + "FieryGreatsword": "Ognisty miecz dwuręczny", + "OrichalcumMask": "Maska z orichalcum", + "OrichalcumHelmet": "Hełm z orichalcum", + "OrichalcumHeadgear": "Nakrycie głowy z orichalcum", + "OrichalcumBreastplate": "Napierśnik z orichalcum", + "OrichalcumLeggings": "Spodnie z orichalcum", + "TitaniumMask": "Tytanowa maska", + "TitaniumHelmet": "Tytanowy hełm", + "TitaniumHeadgear": "Tytanowe nakrycie głowy", + "TitaniumBreastplate": "Tytanowy napierśnik", + "TitaniumLeggings": "Tytanowe spodnie", + "MoltenPickaxe": "Roztopiony kilof", + "OrichalcumAnvil": "Kowadło z orichalcum", + "TitaniumForge": "Tytanowa kuźnia", + "PalladiumWaraxe": "Topór wojenny z paladium", + "OrichalcumWaraxe": "Topór wojenny z orichalcum", + "TitaniumWaraxe": "Tytanowy topór wojenny", + "HallowedBar": "Bajkowa sztabka", + "ChlorophyteClaymore": "Zielenicowy claymore", + "ChlorophyteSaber": "Zielenicowa szabla", + "ChlorophytePartisan": "Zielenicowa partyzana", + "ChlorophyteShotbow": "Zielenicowy, strzelbołuk", + "MeteorHelmet": "Hełm z meteoru", + "ChlorophytePickaxe": "Zielenicowy topór", + "ChlorophyteDrill": "Zielenicowy świder", + "ChlorophyteChainsaw": "Zielenicowa piła łańcuchowa", + "ChlorophyteGreataxe": "Zielenicowy, wielki topór", + "ChlorophyteWarhammer": "Zielenicowy młot wojenny", + "ChlorophyteArrow": "Zielenicowa strzała", + "AmethystHook": "Ametystowy hak", + "TopazHook": "Topazowy hak", + "SapphireHook": "Szafirowy hak", + "EmeraldHook": "Szmaragdowy hak", + "MeteorSuit": "Kostium z meteoru", + "RubyHook": "Rubinowy hak", + "DiamondHook": "Diamentowy hak", + "AmberMosquito": "Bursztynowy komar", + "UmbrellaHat": "Parasolkowy kapelusz", + "NimbusRod": "Kostur chmur", + "OrangeTorch": "Pomarańczowa pochodnia", + "CrimsandBlock": "Blok szkarłatnego piasku", + "BeeCloak": "Pszczela peleryna", + "EyeoftheGolem": "Oko golema", + "HoneyBalloon": "Miodowy balon", + "MeteorLeggings": "Spodnie z meteoru", + "BlueHorseshoeBalloon": "Niebieski balon z podkową", + "WhiteHorseshoeBalloon": "Biały balon z podkową", + "YellowHorseshoeBalloon": "Żółty balon z podkową", + "FrozenTurtleShell": "Zamarznięta skorupa żółwia", + "SniperRifle": "Karabin snajperski", + "VenusMagnum": "Venus Magnum", + "CrimsonRod": "Szkarłatny kostur", + "CrimtaneBar": "Szkarłatna sztabka", + "Stynger": "Stynger", + "FlowerPow": "Flower Pow", + "BottledWater": "Woda butelkowana", + "RainbowGun": "Tęczowy pistolet", + "StyngerBolt": "Pocisk do Styngera", + "ChlorophyteJackhammer": "Zielenicowy młot pneumatyczny", + "Teleporter": "Teleporter", + "FlowerofFrost": "Kwiat mrozu", + "Uzi": "Uzi", + "MagnetSphere": "Sfera magnetyczna", + "PurpleStainedGlass": "Fioletowy witraż", + "YellowStainedGlass": "Żółty witraż", + "BlueStainedGlass": "Niebieski witraż", + "SpaceGun": "Pistolet kosmiczny", + "GreenStainedGlass": "Zielony witraż", + "RedStainedGlass": "Czerwony witraż", + "MulticoloredStainedGlass": "Kolorowy witraż", + "SkeletronHand": "Ręka szkieletrona", + "Skull": "Czaszka", + "BallaHat": "Kapelusz cwaniaka", + "GangstaHat": "Kapelusz gangsterski", + "SailorHat": "Czapka żeglarska", + "EyePatch": "Przepaska na oko", + "SailorShirt": "Koszula żeglarska", + "RocketBoots": "Buty rakietowe", + "SailorPants": "Spodnie żeglarskie", + "SkeletronMask": "Maska szkieletrona", + "AmethystRobe": "Ametystowa szata", + "TopazRobe": "Topazowa szata", + "SapphireRobe": "Szafirowa szata", + "EmeraldRobe": "Szmaragdowa szata", + "RubyRobe": "Rubinowa szata", + "DiamondRobe": "Diamentowa szata", + "WhiteTuxedoShirt": "Koszula do białego smokingu", + "WhiteTuxedoPants": "Spodnie białego smokingu", + "GrayBrick": "Szara cegła", + "PanicNecklace": "Naszyjnik paniki", + "LifeFruit": "Owoc życia", + "LihzahrdAltar": "Jaszczuhrzy ołtarz", + "LihzahrdPowerCell": "Jaszczuhrze ogniwo mocy", + "Picksaw": "Piłolof", + "HeatRay": "Promień ciepła", + "StaffofEarth": "Kostur ziemi", + "GolemFist": "Pięść golema", + "WaterChest": "Kufer wody", + "Binoculars": "Lornetka", + "GoldOre": "Ruda złota", + "GrayBrickWall": "Ściana z szarych cegieł", + "RifleScope": "Luneta do karabinu", + "DestroyerEmblem": "Symbol niszczyciela", + "HighVelocityBullet": "Prędka kula", + "JellyfishNecklace": "Meduzowy naszyjnik", + "ZombieArm": "Ręka zombie", + "TheAxe": "Topór", + "IceSickle": "Lodowy sierp", + "ClothierVoodooDoll": "Lalka voodoo kuśnierza", + "PoisonStaff": "Zatruty kostur", + "SlimeStaff": "Szlamowy kostur", + "RedBrick": "Czerwona cegła", + "PoisonDart": "Zatruta strzałka", + "EyeSpring": "Nerw oczny", + "ToySled": "Sanki", + "BookofSkulls": "Księga czaszek", + "KOCannon": "Nokautująca armata", + "PirateMap": "Mapa piratów", + "TurtleHelmet": "Żółwi hełm", + "TurtleScaleMail": "Żółwia zbroja łuskowa", + "TurtleLeggings": "Żółwie spodnie", + "SnowballCannon": "Armata śnieżkowa", + "RedBrickWall": "Ściana z czerwonych cegieł", + "BonePickaxe": "Kościany kilof", + "MagicQuiver": "Magiczny kołczan", + "MagmaStone": "Kamień magmowy", + "ObsidianRose": "Róża obsydianowa", + "Bananarang": "Bananarang", + "ChainKnife": "Nóż łańcuchowy", + "RodofDiscord": "Kostur niezgody", + "DeathSickle": "Zabójczy sierp", + "TurtleShell": "Skorupa żółwia", + "TissueSample": "Próbka tkanki", + "ClayBlock": "Gliniany blok", + "Vertebrae": "Krąg", + "BloodySpine": "Krwawy kręgosłup", + "Ichor": "Ichor", + "IchorTorch": "Pochodnia ichoru", + "IchorArrow": "Strzała ichoru", + "IchorBullet": "Kula ichoru", + "GoldenShower": "Złoty deszcz", + "BunnyCannon": "Królicza armata", + "ExplosiveBunny": "Wybuchowy królik", + "VialofVenom": "Fiolka jadu", + "BlueBrick": "Niebieska cegła", + "FlaskofVenom": "Butelka jadu", + "VenomArrow": "Jadowita strzała", + "VenomBullet": "Jadowita kula", + "FireGauntlet": "Ognista rękawica", + "Cog": "Trybik", + "Confetti": "Konfetti", + "Nanites": "Nanity", + "ExplosivePowder": "Wybuchowy proszek", + "GoldDust": "Złoty pył", + "PartyBullet": "Kula imprezowa", + "BlueBrickWall": "Ściana z niebieskich cegieł", + "NanoBullet": "Nanokula", + "ExplodingBullet": "Eksplodująca kula", + "GoldenBullet": "Złota kula", + "FlaskofCursedFlames": "Butelka przeklętych płomieni", + "FlaskofFire": "Butelka ognia", + "FlaskofGold": "Butelka złota", + "FlaskofIchor": "Butelka ichoru", + "FlaskofNanites": "Butelka nanitów", + "FlaskofParty": "Imprezowa butelka", + "FlaskofPoison": "Butelka trucizny", + "ChainLantern": "Lampa na łańcuchu", + "EyeofCthulhuTrophy": "Trofeum – Oko Cthulhu", + "EaterofWorldsTrophy": "Trofeum – Pożeracz Światów", + "BrainofCthulhuTrophy": "Trofeum – Mózg Cthulhu", + "SkeletronTrophy": "Trofeum – Szkieletron", + "QueenBeeTrophy": "Trofeum – Królowa Pszczół", + "WallofFleshTrophy": "Trofeum – Ściana Mięcha", + "DestroyerTrophy": "Trofeum – Niszczyciel", + "SkeletronPrimeTrophy": "Trofeum – Szkieletron Prime", + "RetinazerTrophy": "Trofeum – Siatkówczak", + "SpazmatismTrophy": "Trofeum – Spazmak", + "GreenBrick": "Zielona cegła", + "PlanteraTrophy": "Trofeum – Plantera", + "GolemTrophy": "Trofeum – Golem", + "BloodMoonRising": "Wschód krwawego księżyca", + "TheHangedMan": "Wisielec", + "GloryoftheFire": "Gloria ognia", + "BoneWarp": "Kościana osnowa", + "WallSkeleton": "Szkielet na ścianie", + "HangingSkeleton": "Wiszący szkielet", + "BlueSlabWall": "Ściana z niebieskich płyt", + "BlueTiledWall": "Ściana z niebieskich płytek", + "GreenBrickWall": "Ściana z zielonej cegły", + "PinkSlabWall": "Ściana z różowych płyt", + "PinkTiledWall": "Ściana z różowych płytek", + "GreenSlabWall": "Ściana z zielonych płyt", + "GreenTiledWall": "Ściana z zielonych płytek", + "BlueBrickPlatform": "Niebieska, ceglana platforma", + "PinkBrickPlatform": "Różowa, ceglana platforma", + "GreenBrickPlatform": "Zielona, ceglana platforma", + "MetalShelf": "Metalowa półka", + "BrassShelf": "Mosiądzowa półka", + "WoodShelf": "Drewniana półka", + "PinkBrick": "Różowa cegła", + "BrassLantern": "Mosiądzowy lampion", + "CagedLantern": "Lampa w klatce", + "CarriageLantern": "Lampa do powozu", + "AlchemyLantern": "Lampa alchemiczna", + "DiablostLamp": "Lampa diabolisty", + "BlueDungeonChair": "Niebieskie krzesło z lochu", + "BlueDungeonTable": "Niebieski stół z lochu", + "BlueDungeonWorkBench": "Niebieski stół warsztatowy z lochu", + "GreenDungeonChair": "Zielone krzesło z lochu", + "SilverOre": "Ruda srebra", + "PinkBrickWall": "Ściana z różowych cegieł", + "GreenDungeonTable": "Zielony stół z lochu", + "GreenDungeonWorkBench": "Zielony stół warsztatowy z lochu", + "PinkDungeonChair": "Różowe krzesło z lochu", + "PinkDungeonTable": "Różowy stół z lochu", + "PinkDungeonWorkBench": "Różowy stół warsztatowy z lochu", + "BlueDungeonCandle": "Niebieska świeca z lochu", + "GreenDungeonCandle": "Zielona świeca z lochu", + "PinkDungeonCandle": "Różowa świeca z lochu", + "BlueDungeonVase": "Niebieski wazon z lochu", + "GreenDungeonVase": "Zielony wazon z lochu", + "GoldBrick": "Złota cegła", + "PinkDungeonVase": "Różowy wazon z lochu", + "BlueDungeonDoor": "Niebieskie drzwi z lochu", + "GreenDungeonDoor": "Zielone drzwi z lochu", + "PinkDungeonDoor": "Różowe drzwi z lochu", + "BlueDungeonBookcase": "Niebieska biblioteczka z lochu", + "GreenDungeonBookcase": "Zielona biblioteczka z lochu", + "PinkDungeonBookcase": "Różowa biblioteczka z lochu", + "Catacomb": "Katakumba", + "DungeonShelf": "Półka z lochu", + "SkellingtonJSkellingsworth": "Skellington J. Skellingsworth", + "GoldBrickWall": "Ściana ze złotych cegieł", + "TheCursedMan": "Przeklęty", + "TheEyeSeestheEnd": "Oko widzi koniec", + "SomethingEvilisWatchingYou": "Coś złowieszczego cię obserwuje", + "TheTwinsHaveAwoken": "Przebudzenie Bliźniąt", + "TheScreamer": "Krzykacz", + "GoblinsPlayingPoker": "Gobliny grające w pokera", + "Dryadisque": "Wielka driadaliska", + "Sunflowers": "Słoneczniki", + "TerrarianGothic": "Terrarian Gothic", + "Beanie": "Czapka", + "SilverBrick": "Srebrna cegła", + "ImbuingStation": "Obdarzający warsztat", + "StarinaBottle": "Gwiazda w butelce", + "EmptyBullet": "Pusta kula", + "Impact": "Uderzenie", + "PoweredbyBirds": "Napędzane przez ptaki", + "TheDestroyer": "Niszczyciel", + "ThePersistencyofEyes": "Trwałość oczu", + "UnicornCrossingtheHallows": "Jednorożec przekraczający Bajkowo", + "GreatWave": "Wielka fala", + "StarryNight": "Gwieździsta noc", + "SilverBrickWall": "Ściana ze srebrnych cegieł", + "GuidePicasso": "Przewodnik Picasso", + "TheGuardiansGaze": "Wzrok strażnika", + "FatherofSomeone": "Ojciec człowieczy", + "NurseLisa": "Pielęgniarka Lisa", + "ShadowbeamStaff": "Kostur cienistego promienia", + "InfernoFork": "Piekielny trójząb", + "SpectreStaff": "Widmowy kostur", + "WoodenFence": "Drewniany płot", + "LeadFence": "Ołowiany płot", + "BubbleMachine": "Bańkomat", + "CopperBrick": "Miedziana cegła", + "BubbleWand": "Bańkoróżdżka", + "MarchingBonesBanner": "Sztandar „maszerujące kości”", + "NecromanticSign": "Nekromantyczny znak", + "RustedCompanyStandard": "Sztandar „zardzewiała kompania”", + "RaggedBrotherhoodSigil": "Pieczęć obdartego bractwa", + "MoltenLegionFlag": "Flaga roztopionego legionu", + "DiabolicSigil": "Diaboliczna pieczęć", + "ObsidianPlatform": "Obsydianowa platforma", + "ObsidianDoor": "Obsydianowe drzwi", + "ObsidianChair": "Obsydianowe krzesło", + "CopperBrickWall": "Ściana z miedzianych cegieł", + "ObsidianTable": "Obsydianowy stół", + "ObsidianWorkBench": "Obsydianowy stół warsztatowy", + "ObsidianVase": "Obsydianowy wazon", + "ObsidianBookcase": "Obsydianowa biblioteczka", + "HellboundBanner": "Sztandar „do piekła mi po drodze”", + "HellHammerBanner": "Sztandar piekielnego młota", + "HelltowerBanner": "Sztandar piekielnej wieży", + "LostHopesofManBanner": "Sztandar „utraconych nadziei”", + "ObsidianWatcherBanner": "Sztandar obsydianowego obserwatora", + "LavaEruptsBanner": "Sztandar erupcji lawy", + "Spike": "Kolec", + "BlueDungeonBed": "Niebieskie łóżko z lochu", + "GreenDungeonBed": "Zielone łóżko z lochu", + "PinkDungeonBed": "Różowe łóżko z lochu", + "ObsidianBed": "Obsydianowe łóżko", + "Waldo": "Waldo", + "Darkness": "Ciemność", + "DarkSoulReaper": "Kostucha", + "Land": "Ziemia", + "TrappedGhost": "Uwięziony duch", + "DemonsEye": "Oko demona", + "WaterCandle": "Wodna świeca", + "FindingGold": "Gorączka złota", + "FirstEncounter": "Pierwsze spotkanie", + "GoodMorning": "Dzień dobry", + "UndergroundReward": "Podziemna nagroda", + "ThroughtheWindow": "Przez okno", + "PlaceAbovetheClouds": "Ponad chmurami", + "DoNotStepontheGrass": "Zakaz deptania trawy", + "ColdWatersintheWhiteLand": "Zimne wody białej krainy", + "LightlessChasms": "Ciemne rozpadliny", + "TheLandofDeceivingLooks": "Pozory mogą mylić", + "Book": "Księga", + "Daylight": "W świetle dnia", + "SecretoftheSands": "Tajemnica piasków", + "DeadlandComesAlive": "Powrót umarłego świata", + "EvilPresence": "Zło", + "SkyGuardian": "Niebieski strażnik", + "AmericanExplosive": "Amerykański wybuch", + "Discover": "Odkrycie", + "HandEarth": "Ręka", + "OldMiner": "Stary górnik", + "Skelehead": "Czaszka", + "CopperWatch": "Miedziany zegarek", + "Cobweb": "Pajęczyna", + "FacingtheCerebralMastermind": "Potyczka z mózgiem mózgów", + "LakeofFire": "Jezioro ognia", + "TrioSuperHeroes": "Trójka superbohaterów", + "SpectreHood": "Widmowy kaptur", + "SpectreRobe": "Widmowa szata", + "SpectrePants": "Widmowe spodnie", + "SpectrePickaxe": "Widmowy kilof", + "SpectreHamaxe": "Widmowy młotopór", + "Ectoplasm": "Ektoplazma", + "GothicChair": "Krzesło gotyckie", + "NecroHelmet": "Nekromantyczny hełm", + "GothicTable": "Stół gotycki", + "GothicWorkBench": "Gotycki stół warsztatowy", + "GothicBookcase": "Biblioteczka gotycka", + "PaladinsHammer": "Młot paladyna", + "SWATHelmet": "Hełm SWAT", + "BeeWings": "Skrzydła pszczoły", + "GiantHarpyFeather": "Pióro gigantycznej harpii", + "BoneFeather": "Kościane pióro", + "FireFeather": "Ogniste pióro", + "IceFeather": "Lodowe pióro", + "NecroBreastplate": "Nekromantyczny napierśnik", + "BrokenBatWing": "Złamane skrzydło nietoperza", + "TatteredBeeWing": "Poszarpane skrzydło nietoperza", + "LargeAmethyst": "Wielki ametyst", + "LargeTopaz": "Wielki topaz", + "LargeSapphire": "Wielki szafir", + "LargeEmerald": "Wielki szmaragd", + "LargeRuby": "Wielki rubin", + "LargeDiamond": "Wielki diament", + "JungleChest": "Kufer z dżungli", + "CorruptionChest": "Kufer zepsucia", + "NecroGreaves": "Nekromantyczne nagolenniki", + "CrimsonChest": "Kufer szkarłatu", + "HallowedChest": "Bajkowy kufer", + "JungleKey": "Klucz z dżungli", + "CorruptionKey": "Klucz zepsucia", + "CrimsonKey": "Szkarłatny klucz", + "HallowedKey": "Bajkowy klucz", + "FrozenKey": "Zamarznięty klucz", + "ImpFace": "Twarz diablika", + "OminousPresence": "Złowieszcza istota", + "Bone": "Kość", + "ShiningMoon": "Świecący księżyc", + "LivingGore": "Żywa posoka", + "FlowingMagma": "Płynąca magma", + "SpectrePaintbrush": "Widmowy pędzel", + "SpectrePaintRoller": "Widmowy wałek", + "SpectrePaintScraper": "Widmowy skrobak do farby", + "ShroomiteHeadgear": "Grzybielenicowe nakrycie głowy", + "ShroomiteMask": "Grzybielenicowa maska", + "ShroomiteHelmet": "Grzybielenicowy hełm", + "ShroomiteBreastplate": "Grzybielenicowy napierśnik", + "Muramasa": "Muramasa", + "ShroomiteLeggings": "Grzybielenicowe spodnie", + "Autohammer": "Automłot", + "ShroomiteBar": "Grzybielenicowa sztabka", + "SDMG": "S.D.M.G.", + "CenxsTiara": "Tiara Cenx", + "CenxsBreastplate": "Napierśnik Cenx", + "CenxsLeggings": "Spodnie Cenx", + "CrownosMask": "Maska Crowno", + "CrownosBreastplate": "Napierśnik Crowno", + "CrownosLeggings": "Spodnie Crowno", + "CobaltShield": "Kobaltowa tarcza", + "WillsHelmet": "Hełm Willa", + "WillsBreastplate": "Napierśnik Willa", + "WillsLeggings": "Spodnie Willa", + "JimsHelmet": "Hełm Jima", + "JimsBreastplate": "Napierśnik Jima", + "JimsLeggings": "Spodnie Jima", + "AaronsHelmet": "Hełm Aarona", + "AaronsBreastplate": "Napierśnik Aarona", + "AaronsLeggings": "Spodnie Aarona", + "VampireKnives": "Wampirze noże", + "AquaScepter": "Wodne berło", + "BrokenHeroSword": "Połamany miecz bohatera", + "ScourgeoftheCorruptor": "Bicz skaziciela", + "StaffoftheFrostHydra": "Kostur mroźnej hydry", + "TheCreationoftheGuide": "Stworzenie przewodnika", + "TheMerchant": "Kupiec", + "CrownoDevoursHisLunch": "Crowno pożerający własny lunch", + "RareEnchantment": "Rzadki czar", + "GloriousNight": "Wspaniała noc", + "SweetheartNecklace": "Naszyjnik miłości", + "FlurryBoots": "Poruszone buty", + "LuckyHorseshoe": "Szczęśliwa podkowa", + "DTownsHelmet": "Hełm D-Towna", + "DTownsBreastplate": "Napierśnik D-Towna", + "DTownsLeggings": "Spodnie D-Towna", + "DTownsWings": "Skrzydła D-Towna", + "WillsWings": "Skrzydła Willa", + "CrownosWings": "Skrzydła Crowno", + "CenxsWings": "Skrzydła Cenx", + "CenxsDress": "Sukienka Cenx", + "CenxsDressPants": "Spodnie do sukienki Cenx", + "PalladiumColumn": "Kolumna z paladium", + "ShinyRedBalloon": "Błyszczący, czerwony balon", + "PalladiumColumnWall": "Ściana z kolumn z paladium", + "BubblegumBlock": "Blok gumy balonowej", + "BubblegumBlockWall": "Ściana z bloków gumy balonowej", + "TitanstoneBlock": "Blok kamienia tytanowego", + "TitanstoneBlockWall": "Ściana z bloków kamienia tytanowego", + "MagicCuffs": "Magiczne kajdanki", + "MusicBoxSnow": "Pozytywka (śnieg)", + "MusicBoxCrimson": "Pozytywka (Szkarłat)", + "MusicBoxBoss4": "Pozytywka (boss 4)", + "SilverWatch": "Srebrny zegarek", + "Harpoon": "Harpun", + "MusicBoxAltOverworldDay": "Pozytywka (dzień na powierzchni – wersja alternatywna)", + "MusicBoxRain": "Pozytywka (deszcz)", + "MusicBoxIce": "Pozytywka (lód)", + "MusicBoxDesert": "Pozytywka (pustynia)", + "MusicBoxDungeon": "Pozytywka (loch)", + "MusicBoxPlantera": "Pozytywka (Plantera)", + "MusicBoxBoss5": "Pozytywka (boss 5)", + "MusicBoxTemple": "Pozytywka (świątynia)", + "MusicBoxEclipse": "Pozytywka (zaćmienie)", + "SpikyBall": "Kolczatka", + "MusicBoxMushrooms": "Pozytywka (grzyby)", + "ButterflyDust": "Motyli pył", + "AnkhCharm": "Wisior ankh", + "AnkhShield": "Tarcza ankh", + "BlueFlare": "Niebieska flara", + "AnglerFishBanner": "Sztandar ryby nogopłetwej", + "AngryNimbusBanner": "Sztandar rozgniewanej chmury", + "AnomuraFungusBanner": "Sztandar grzyba-anomury", + "AntlionBanner": "Mrówkolwowaty sztandar", + "ArapaimaBanner": "Sztandar arapaimy", + "BallOHurt": "Kula bólu", + "ArmoredSkeletonBanner": "Sztandar opancerzonego szkieletu", + "BatBanner": "Sztandar nietoperza jaskiniowego", + "BirdBanner": "Sztandar ptaka", + "BlackRecluseBanner": "Sztandar czarnego pustelnika", + "BloodFeederBanner": "Sztandar krwawego żywiciela", + "BloodJellyBanner": "Sztandar krwawej meduzy", + "BloodCrawlerBanner": "Sztandar krwawego pełzacza", + "BoneSerpentBanner": "Sztandar kościanego węża", + "BunnyBanner": "Sztandar króliczka", + "ChaosElementalBanner": "Sztandar żywiołaka chaosu", + "BlueMoon": "Niebieski księżyc", + "MimicBanner": "Sztandar mimika", + "ClownBanner": "Sztandar klauna", + "CorruptBunnyBanner": "Sztandar zepsutego króliczka", + "CorruptGoldfishBanner": "Sztandar zepsutej złotej rybki", + "CrabBanner": "Sztandar kraba", + "CrimeraBanner": "Sztandar szkarłatnicy", + "CrimsonAxeBanner": "Sztandar szkarłatnego topora", + "CursedHammerBanner": "Sztandar przeklętego młota", + "DemonBanner": "Demoniczny sztandar", + "DemonEyeBanner": "Sztandar demonicznego oka", + "Handgun": "Pistolet jednoręczny", + "DerplingBanner": "Sztandar derplinga", + "EaterofSoulsBanner": "Sztandar pożeracza dusz", + "EnchantedSwordBanner": "Sztandar Zaklętego Miecza", + "FaceMonsterBanner": "Sztandar pyskostwora", + "FloatyGrossBanner": "Sztandar płynącej odrazy", + "FlyingFishBanner": "Sztandar latającej ryby", + "FlyingSnakeBanner": "Sztandar latającego węża", + "FrankensteinBanner": "Sztandar Frankensteina", + "FungiBulbBanner": "Sztandar grzybiczej cebulki", + "WaterBolt": "Pocisk wodny", + "FungoFishBanner": "Sztandar grzyboryby", + "GastropodBanner": "Sztandar brzuchonoga", + "GoblinThiefBanner": "Sztandar goblińskiego złodzieja", + "GoblinSorcererBanner": "Sztandar goblińskiego czarownika", + "GoblinPeonBanner": "Sztandar goblińskiego czeladnika", + "GoblinScoutBanner": "Sztandar goblińskiego zwiadowcy", + "GoblinWarriorBanner": "Sztandar goblińskiego wojownika", + "GoldfishBanner": "Sztandar złotej rybki", + "HarpyBanner": "Sztandar harpii", + "HellbatBanner": "Sztandar piekielnego nietoperza", + "Bomb": "Bomba", + "HerplingBanner": "Sztandar herplinga", + "HornetBanner": "Sztandar szerszenia", + "IceElementalBanner": "Sztandar żywiołaka lodu", + "IcyMermanBanner": "Sztandar lodowego syrena", + "FireImpBanner": "Sztandar ognistego diablika", + "JellyfishBanner": "Sztandar niebieskiej meduzy", + "JungleCreeperBanner": "Sztandar pełzaka z dżungli", + "LihzahrdBanner": "Jaszczuhrzy sztandar", + "ManEaterBanner": "Sztandar kanibala", + "MeteorHeadBanner": "Sztandar meteoru", + "Dynamite": "Dynamit", + "MothBanner": "Sztandar ćmy", + "MummyBanner": "Sztandar mumii", + "MushiLadybugBanner": "Sztandar biedronki mushi", + "ParrotBanner": "Sztandar papugi", + "PigronBanner": "Sztandar smosiaka", + "PiranhaBanner": "Sztandar piranii", + "PirateBanner": "Sztandar majtka pirackiego", + "PixieBanner": "Sztandar wróżki", + "RaincoatZombieBanner": "Sztandar zombie w płaszczu przeciwdeszczowym", + "ReaperBanner": "Sztandar kostuchy", + "Grenade": "Granat", + "SharkBanner": "Sztandar rekina", + "SkeletonBanner": "Sztandar szkieletu", + "SkeletonMageBanner": "Sztandar mrocznego magika", + "SlimeBanner": "Sztandar niebieskiego szlamu", + "SnowFlinxBanner": "Sztandar śnieżnego flinxa", + "SpiderBanner": "Sztandar naściennego pełzaka", + "SporeZombieBanner": "Sztandar zombie-zarodnika", + "SwampThingBanner": "Sztandar bagiennego czegoś", + "TortoiseBanner": "Sztandar wielkiego żółwia", + "ToxicSludgeBanner": "Sztandar toksycznego mułu", + "SandBlock": "Blok piasku", + "UmbrellaSlimeBanner": "Sztandar szlamu z parasolką", + "UnicornBanner": "Sztandar jednorożca", + "VampireBanner": "Sztandar wampira", + "VultureBanner": "Sztandar sępa", + "NypmhBanner": "Sztandar nimfy", + "WerewolfBanner": "Sztandar wilkołaka", + "WolfBanner": "Sztandar wilka", + "WorldFeederBanner": "Sztandar żywiciela świata", + "WormBanner": "Sztandar robaka", + "WraithBanner": "Sztandar widma", + "GoldWatch": "Złoty zegarek", + "Glass": "Szkło", + "WyvernBanner": "Sztandar wywerny", + "ZombieBanner": "Sztandar zombie", + "GlassPlatform": "Szklana platforma", + "GlassChair": "Szklane krzesło", + "GoldenChair": "Złote krzesło", + "GoldenToilet": "Złota toaleta", + "BarStool": "Krzesło barowe", + "HoneyChair": "Miodowe krzesło", + "SteampunkChair": "Krzesło steampunkowe", + "GlassDoor": "Szklane drzwi", + "Sign": "Znak", + "GoldenDoor": "Złote drzwi", + "HoneyDoor": "Drzwi miodowe", + "SteampunkDoor": "Drzwi steampunkowe", + "GlassTable": "Szklany stół", + "BanquetTable": "Stół bankietowy", + "Bar": "Sztabka", + "GoldenTable": "Złoty stół", + "HoneyTable": "Stół miodowy", + "SteampunkTable": "Stół steampunkowy", + "GlassBed": "Szklane łóżko", + "AshBlock": "Blok popiołu", + "GoldenBed": "Złote łóżko", + "HoneyBed": "Łóżko miodowe", + "SteampunkBed": "Łóżko steampunkowe", + "LivingWoodWall": "Ściana z żyjącego drewna", + "FartinaJar": "Bąk w słoiku", + "Pumpkin": "Dynia", + "PumpkinWall": "Ściana z dyń", + "Hay": "Siano", + "HayWall": "Ściana z siana", + "SpookyWood": "Straszne drewno", + "Obsidian": "Obsydian", + "SpookyWoodWall": "Ściana ze strasznego drewna", + "PumpkinHelmet": "Hełm dyniowy", + "PumpkinBreastplate": "Napierśnik dyniowy", + "PumpkinLeggings": "Dyniowe spodnie", + "CandyApple": "Cukierkowe jabłko", + "SoulCake": "Ciasto dusz", + "NurseHat": "Czapka pielęgniarki", + "NurseShirt": "Kitel pielęgniarki", + "NursePants": "Spodnie pielęgniarki", + "WizardsHat": "Kapelusz czarodzieja", + "Hellstone": "Piekielny kamień", + "GuyFawkesMask": "Maska Guya Fawkesa", + "DyeTraderRobe": "Szata handlarza barwnikami", + "SteampunkGoggles": "Steampunkowe gogle", + "CyborgHelmet": "Hełm cyborga", + "CyborgShirt": "Koszulka cyborga", + "CyborgPants": "Spodnie cyborga", + "CreeperMask": "Maska pełzaka", + "CreeperShirt": "Koszulka pełzaka", + "CreeperPants": "Spodnie pełzaka", + "CatMask": "Maska kota", + "HellstoneBar": "Sztabka piekielnego kamienia", + "CatShirt": "Koszulka kota", + "CatPants": "Spodnie kota", + "GhostMask": "Maska ducha", + "GhostShirt": "Koszulka ducha", + "PumpkinMask": "Maska dyni", + "PumpkinShirt": "Koszulka dyni", + "PumpkinPants": "Spodnie dyni", + "RobotMask": "Maska robota", + "RobotShirt": "Koszulka robota", + "RobotPants": "Spodnie robota", + "MudBlock": "Blok błota", + "UnicornMask": "Maska jednorożca", + "UnicornShirt": "Koszulka jednorożca", + "UnicornPants": "Spodnie jednorożca", + "VampireMask": "Maska wampira", + "VampireShirt": "Koszulka wampira", + "VampirePants": "Spodnie wampira", + "WitchHat": "Kapelusz czarownicy", + "LeprechaunHat": "Kapelusz leprechauna", + "LeprechaunShirt": "Koszulka leprechauna", + "LeprechaunPants": "Spodnie leprechauna", + "Sapphire": "Szafir", + "PixieShirt": "Koszulka wróżki", + "PixiePants": "Spodnie wróżki", + "PrincessHat": "Czapka księżniczki", + "PrincessDressNew": "Sukienka księżniczki", + "GoodieBag": "Torba ze skarbami", + "WitchDress": "Sukienka czarownicy", + "WitchBoots": "Buty czarownicy", + "BrideofFrankensteinMask": "Maska narzeczonej Frankensteina", + "BrideofFrankensteinDress": "Sukienka narzeczonej Frankensteina", + "KarateTortoiseMask": "Maska żółwia karate", + "Ruby": "Rubin", + "KarateTortoiseShirt": "Koszulka żółwia karate", + "KarateTortoisePants": "Spodnie żółwia karate", + "CandyCornRifle": "Karabin na cukierkową kukurydzę", + "CandyCorn": "Cukierkowa kukurydza", + "JackOLanternLauncher": "Wyrzutnia Jack 'O Lanternów", + "ExplosiveJackOLantern": "Wybuchowy Jack 'O Lantern", + "Sickle": "Sierp", + "PumpkinPie": "Ciasto dyniowe", + "ScarecrowHat": "Kapelusz stracha na wróble", + "ScarecrowShirt": "Koszula stracha na wróble", + "Emerald": "Szmaragd", + "ScarecrowPants": "Spodnie stracha na wróble", + "Cauldron": "Kociołek", + "PumpkinChair": "Dyniowe krzesło", + "PumpkinDoor": "Dyniowe drzwi", + "PumpkinTable": "Dyniowy stół", + "PumpkinWorkBench": "Dyniowy stół warsztatowy", + "PumpkinPlatform": "Dyniowa platforma", + "TatteredFairyWings": "Poszarpane skrzydła duszka", + "SpiderEgg": "Pajęcze jajo", + "MagicalPumpkinSeed": "Nasienie magicznej dyni", + "DepthMeter": "Głębinomierz", + "Topaz": "Topaz", + "BatHook": "Hak nietoperzowy", + "BatScepter": "Berło nietoperza", + "RavenStaff": "Kostur kruka", + "JungleKeyMold": "Forma klucza z dżungli", + "CorruptionKeyMold": "Forma klucza zepsucia", + "CrimsonKeyMold": "Forma szkarłatnego klucza", + "HallowedKeyMold": "Forma bajkowego klucza", + "FrozenKeyMold": "Forma zamarzniętego klucza", + "HangingJackOLantern": "Wiszący Jack 'O Lantern", + "RottenEgg": "Zgniłe jajo", + "Amethyst": "Ametyst", + "UnluckyYarn": "Pechowy kłębek", + "BlackFairyDust": "Pył czarnego duszka", + "Jackelier": "Jackorandol", + "JackOLantern": "Jack 'O Lantern", + "SpookyChair": "Straszne krzesło", + "SpookyDoor": "Straszne drzwi", + "SpookyTable": "Straszny stół", + "SpookyWorkBench": "Straszny stół warsztatowy", + "ReaperHood": "Kaptur kostuchy", + "Diamond": "Diament", + "ReaperRobe": "Szata kostuchy", + "FoxMask": "Maska lisa", + "FoxShirt": "Koszulka lisa", + "FoxPants": "Spodnie lisa", + "CatEars": "Kocie uszy", + "BloodyMachete": "Krwawa maczeta", + "TheHorsemansBlade": "Ostrze jeźdźca", + "BladedGlove": "Rękawica z ostrzami", + "PumpkinSeed": "Nasienie dyni", + "SpookyHook": "Straszny hak", + "GlowingMushroom": "Lśniący grzyb", + "SpookyWings": "Straszne skrzydła", + "SpookyTwig": "Straszna gałązka", + "SpookyHelmet": "Straszny hełm", + "SpookyBreastplate": "Straszny napierśnik", + "SpookyLeggings": "Straszne spodnie", + "StakeLauncher": "Wyrzutnia kołków", + "Stake": "Kołek", + "CursedSapling": "Przeklęte drzewko", + "SpaceCreatureMask": "Maska kosmicznego stwora", + "SpaceCreatureShirt": "Koszulka kosmicznego stwora", + "Star": "Gwiazda", + "SpaceCreaturePants": "Spodnie kosmicznego stwora", + "WolfMask": "Maska wilka", + "WolfShirt": "Koszulka wilka", + "WolfPants": "Spodnie wilka", + "PumpkinMoonMedallion": "Medalion dyniowego księżyca", + "NecromanticScroll": "Nekromatnyczny zwój", + "JackingSkeletron": "Szkieletron", + "BitterHarvest": "Ciężkie żniwa", + "BloodMoonCountess": "Hrabina krwawego księżyca", + "HallowsEve": "Bajkowa wigilia", + "IvyWhip": "Bicz z bluszczu", + "MorbidCuriosity": "Chorobliwa ciekawość", + "TreasureHunterShirt": "Koszulka łowcy skarbów", + "TreasureHunterPants": "Spodnie łowcy skarbów", + "DryadCoverings": "Szata driady", + "DryadLoincloth": "Przepaska driady", + "MourningWoodTrophy": "Trofeum – Drzewo Żałobne", + "PumpkingTrophy": "Trofeum – Dyniokról", + "JackOLanternMask": "Maska Jacka 'O Lanterna", + "SniperScope": "Luneta snajperska", + "HeartLantern": "Lampa sercowa", + "BreathingReed": "Trzcina do oddychania", + "JellyfishDivingGear": "Meduzowy sprzęt do nurkowania", + "ArcticDivingGear": "Arktyczny sprzęt do nurkowania", + "FrostsparkBoots": "Buty mroźnej iskry", + "FartInABalloon": "Bąk w balonie", + "PapyrusScarab": "Papirusowy skarabeusz", + "CelestialStone": "Niebiański kamień", + "Hoverboard": "Latająca deskorolka", + "CandyCane": "Lizak świąteczny", + "SugarPlum": "Cukierek", + "Present": "Prezent", + "Flipper": "Płetwa", + "RedRyder": "Red Ryder", + "FestiveWings": "Świąteczne skrzydła", + "PineTreeBlock": "Blok sosnowy", + "ChristmasTree": "Choinka", + "StarTopper1": "Gwiazda choinkowa 1", + "StarTopper2": "Gwiazda choinkowa 2", + "StarTopper3": "Gwiazda choinkowa 3", + "BowTopper": "Kokarda choinkowa", + "WhiteGarland": "Biała girlanda", + "WhiteAndRedGarland": "Biało-czerwona girlanda", + "HealingPotion": "Mikstura leczenia", + "RedGardland": "Czerwona girlanda", + "RedAndGreenGardland": "Czerwono-zielona girlanda", + "GreenGardland": "Zielona girlanda", + "GreenAndWhiteGarland": "Zielono-biała girlanda", + "MulticoloredBulb": "Kolorowa bombka", + "RedBulb": "Czerwona bombka", + "YellowBulb": "Żółta bombka", + "GreenBulb": "Zielona bombka", + "RedAndGreenBulb": "Czerwono-zielona bombka", + "YellowAndGreenBulb": "Żółto-zielona bombka", + "ManaPotion": "Mikstura many", + "RedAndYellowBulb": "Czerwono-żółta bombka", + "WhiteBulb": "Biała bombka", + "WhiteAndRedBulb": "Biało-czerwona bombka", + "WhiteAndYellowBulb": "Biało-żółta bombka", + "WhiteAndGreenBulb": "Biało-zielona bombka", + "MulticoloredLights": "Kolorowe lampki", + "RedLights": "Czerwone lampki", + "GreenLights": "Zielone lampki", + "BlueLights": "Niebieskie lampki", + "YellowLights": "Żółte lampki", + "GoldBar": "Sztabka złota", + "BladeofGrass": "Źdźbło trawy", + "RedAndYellowLights": "Czerwono-żółte lampki", + "RedAndGreenLights": "Czerwono-zielone lampki", + "YellowAndGreenLights": "Żółto-zielone lampki", + "BlueAndGreenLights": "Niebiesko-zielone lampki", + "RedAndBlueLights": "Czerwono-niebieskie lampki", + "BlueAndYellowLights": "Niebiesko-żółte lampki", + "GiantBow": "Wielka kokarda", + "ReindeerAntlers": "Poroże renifera", + "Holly": "Ostrokrzew", + "CandyCaneSword": "Cukierkowy miecz", + "ThornChakram": "Kolczy czakram", + "EldMelter": "Podpalacz elfów", + "ChristmasPudding": "Christmas Pudding", + "Eggnog": "Eggnog", + "StarAnise": "Badian", + "ReindeerBells": "Dzwonki renifera", + "CandyCaneHook": "Cukierkowy hak", + "ChristmasHook": "Świąteczny hak", + "CnadyCanePickaxe": "Cukierkowy kilof", + "FruitcakeChakram": "Czakram z ciasta owocowego", + "SugarCookie": "Ciasteczko cukrowe", + "ObsidianBrick": "Obsydianowa cegła", + "GingerbreadCookie": "Piernik", + "HandWarmer": "Ogrzewacz do rąk", + "Coal": "Węgiel", + "Toolbox": "Skrzynka na narzędzia", + "PineDoor": "Drzwi sosnowe", + "PineChair": "Krzesło sosnowe", + "PineTable": "Stół sosnowy", + "DogWhistle": "Gwizdek dla psa", + "ChristmasTreeSword": "Miecz choinkowy", + "ChainGun": "Pistolet maszynowy", + "ObsidianSkull": "Obsydianowa czaszka", + "Razorpine": "Sosnostrzał", + "BlizzardStaff": "Kostur zamieci", + "MrsClauseHat": "Czapka pani Mikołajowej", + "MrsClauseShirt": "Koszula pani Mikołajowej", + "MrsClauseHeels": "Buty pani Mikołajowej", + "ParkaHood": "Kaptur parka", + "ParkaCoat": "Płaszcz parka", + "ParkaPants": "Spodnie parka", + "SnowHat": "Śnieżna czapka", + "UglySweater": "Brzydki sweter", + "MushroomGrassSeeds": "Nasiona grzybiej trawy", + "TreeMask": "Maska drzewa", + "TreeShirt": "Koszulka drzewa", + "TreeTrunks": "Pnie drzewa", + "ElfHat": "Elfia czapka", + "ElfShirt": "Elfia koszulka", + "ElfPants": "Elfie spodnie", + "SnowmanCannon": "Bałwania armata", + "NorthPole": "Biegun północny", + "ChristmasTreeWallpaper": "Tapeta choinkowa", + "OrnamentWallpaper": "Tapeta ozdobna", + "JungleGrassSeeds": "Nasiona trawy z dżungli", + "CandyCaneWallpaper": "Tapeta lizaków świątecznych", + "FestiveWallpaper": "Świąteczna tapeta", + "StarsWallpaper": "Tapeta w gwiazdki", + "SquigglesWallpaper": "Tapeta w gryzmoły", + "SnowflakeWallpaper": "Tapeta w płatki śniegu", + "KrampusHornWallpaper": "Tapeta z rogami krampusa", + "BluegreenWallpaper": "Niebiesko-zielona tapeta", + "GrinchFingerWallpaper": "Tapeta z palcami grincha", + "NaughtyPresent": "Brzydki prezent", + "BabyGrinchMischiefWhistle": "Psotny gwizdek młodego grincha", + "WoodenHammer": "Drewniany młotek", + "IceQueenTrophy": "Trofeum – Lodowa Królowa", + "SantaNK1Trophy": "Trofeum – Czołgołaj-NK1", + "EverscreamTrophy": "Trofeum – Ciągłokrzyk", + "MusicBoxPumpkinMoon": "Pozytywka (dyniowy księżyc)", + "MusicBoxAltUnderground": "Pozytywka (alternatywne podziemie)", + "MusicBoxFrostMoon": "Pozytywka (mroźny księżyc)", + "BrownPaint": "Brązowa farba", + "ShadowPaint": "Farba cienia", + "NegativePaint": "Farba zaprzeczająca", + "TeamDye": "Barwnik drużynowy", + "StarCannon": "Gwiezdna armata", + "AmethystGemsparkBlock": "Ametystowy blok świecący", + "TopazGemsparkBlock": "Topazowy blok świecący", + "SapphireGemsparkBlock": "Szafirowy blok świecący", + "EmeraldGemsparkBlock": "Szmaragdowy blok świecący", + "RubyGemsparkBlock": "Rubinowy blok świecący", + "DiamondGemsparkBlock": "Diamentowy blok świecący", + "AmberGemsparkBlock": "Bursztynowy blok świecący", + "LifeHairDye": "Farba do włosów – życie", + "ManaHairDye": "Farba do włosów – mana", + "DepthHairDye": "Farba do włosów – głębokość", + "BluePhaseblade": "Niebieski miecz świetny", + "MoneyHairDye": "Farba do włosów – pieniądze", + "TimeHairDye": "Farba do włosów – czas", + "TeamHairDye": "Farba do włosów – drużyna", + "BiomeHairDye": "Farba do włosów – biom", + "PartyHairDye": "Farba do włosów – przyjęcie", + "RainbowHairDye": "Farba do włosów – tęcza", + "SpeedHairDye": "Farba do włosów – szybkość", + "AngelHalo": "Aureola anioła", + "Fez": "Fez", + "Womannquin": "Kobiekin", + "RedPhaseblade": "Czerwony miecz świetny", + "HairDyeRemover": "Zmywacz farby do włosów", + "BugNet": "Siatka na robaki", + "Firefly": "Iluminator", + "FireflyinaBottle": "Iluminator w butelce", + "MonarchButterfly": "Monarch", + "PurpleEmperorButterfly": "Fioletowy tęczowiec", + "RedAdmiralButterfly": "Czerwona rusałka admirał", + "UlyssesButterfly": "Papilio ulysses", + "SulphurButterfly": "Motyl żółty", + "TreeNymphButterfly": "Motyl nimfa drzewna", + "DirtBlock": "Blok ziemi", + "CopperBar": "Sztabka miedzi", + "GreenPhaseblade": "Zielony miecz świetny", + "ZebraSwallowtailButterfly": "Motyl paziowaty", + "JuliaButterfly": "Motyl Julii", + "Worm": "Robak", + "Mouse": "Mysz", + "LightningBug": "Świetlik", + "LightningBuginaBottle": "Świetlik w butelce", + "Snail": "Ślimak", + "GlowingSnail": "Świecący ślimak", + "FancyGreyWallpaper": "Wymyślna, szara tapeta", + "IceFloeWallpaper": "Tapeta z krą", + "PurplePhaseblade": "Fioletowy miecz świetny", + "MusicWallpaper": "Tapeta muzyczna", + "PurpleRainWallpaper": "Tapeta „fioletowy deszcz”", + "RainbowWallpaper": "Tęczowa tapeta", + "SparkleStoneWallpaper": "Tapeta w iskierki", + "StarlitHeavenWallpaper": "Tapeta „rozgwieżdżone niebo”", + "Bird": "Ptak", + "BlueJay": "Modrosójka błękitna", + "Cardinal": "Kardynał", + "Squirrel": "Wiewiórka", + "Bunny": "Króliczek", + "WhitePhaseblade": "Biały miecz świetny", + "YellowPhaseblade": "Żółty miecz świetny", + "MeteorHamaxe": "Młotopór z meteoru", + "EmptyBucket": "Puste wiadro", + "WaterBucket": "Wiadro wody", + "LavaBucket": "Wiadro lawy", + "JungleRose": "Róża z dżungli", + "Stinger": "Żądło", + "SilverBar": "Sztabka srebra", + "Vine": "Winorośl", + "FeralClaws": "Dzikie szpony", + "BlacksmithRack": "Stojak kowalski", + "CarpentryRack": "Stojak stolarski", + "HelmetRack": "Stojak na hełmy", + "SpearRack": "Stojak na włócznie", + "SwordRack": "Stojak na miecze", + "StoneSlab": "Kamienna płyta", + "AnkletoftheWind": "Obrączka wiatru", + "SandstoneSlab": "Płyta z kamienia piaskowego", + "Frog": "Żaba", + "MallardDuck": "Kaczka krzyżówka", + "Duck": "Kaczka", + "StaffofRegrowth": "Kostur porostu", + "HellstoneBrick": "Cegła piekielnego kamienia", + "WhoopieCushion": "Poducha", + "BlackScorpion": "Czarny skorpion", + "Scorpion": "Skorpion", + "BubbleWallpaper": "Tapeta w bańki", + "CopperPipeWallpaper": "Tapeta w miedziane rury", + "Shackle": "Kajdany", + "DuckyWallpaper": "Kacza tapeta", + "FrostCore": "Mroźny rdzeń", + "BunnyCage": "Klatka dla królików", + "SquirrelCage": "Klatka dla wiewiórek", + "MallardDuckCage": "Klatka dla kaczek krzyżówek", + "DuckCage": "Klatka dla kaczek", + "BirdCage": "Klatka dla ptaków", + "BlueJayCage": "Klatka dla modrosójek błękitnych", + "CardinalCage": "Klatka dla kardynałów", + "WaterfallWall": "Ściana wodospadu", + "MoltenHamaxe": "Roztopiony młotopór", + "LavafallWall": "Ściana lawospadu", + "CrimsonSeeds": "Szkarłatne nasiona", + "HeavyWorkBench": "Ciężki stół warsztatowy", + "CopperPlating": "Miedziane płyty", + "SnailCage": "Klatka dla ślimaków", + "GlowingSnailCage": "Klatka dla świecących ślimaków", + "ShroomiteDiggingClaw": "Grzybielenicowy pazur do kopania", + "AmmoBox": "Skrzynka z amunicją", + "MonarchButterflyJar": "Słoik na monarchy", + "PurpleEmperorButterflyJar": "Słoik na fioletowe tęczowce", + "Flamelash": "Ognik", + "RedAdmiralButterflyJar": "Słoik na czerwone rusałki admirały", + "UlyssesButterflyJar": "Słoik na papilio ulyssesy", + "SulphurButterflyJar": "Słoik na motyle żółte", + "TreeNymphButterflyJar": "Słoik na motyle nimfy drzewne", + "ZebraSwallowtailButterflyJar": "Słoik na motyle paziowate", + "JuliaButterflyJar": "Słoik na motyle Julii", + "ScorpionCage": "Klatka dla skorpionów", + "BlackScorpionCage": "Klatka dla czarnych skorpionów", + "VenomStaff": "Kostur jadu", + "SpectreMask": "Widmowa maska", + "PhoenixBlaster": "Feniksowy blaster", + "FrogCage": "Klatka dla żab", + "MouseCage": "Klatka dla myszy", + "BoneWelder": "Spawacz kości", + "FleshCloningVaat": "Kadź duplikująca ciało", + "GlassKiln": "Szklany piec", + "LihzahrdFurnace": "Jaszczuhrzy piec", + "LivingLoom": "Żyjące krosno", + "SkyMill": "Gwiezdny młyn", + "IceMachine": "Lodowa maszyna", + "BeetleHelmet": "Hełm żuka", + "IronBar": "Żelazna sztabka", + "Sunfury": "Słoneczna furia", + "BeetleScaleMail": "Zbroja łuskowa żuka", + "BeetleShell": "Skorupa żuka", + "BeetleLeggings": "Spodnie żuka", + "SteampunkBoiler": "Kocioł steampunkowy", + "HoneyDispenser": "Dozownik miodu", + "Penguin": "Pingwin", + "PenguinCage": "Klatka dla pingwinów", + "WormCage": "Klatka dla robaków", + "Terrarium": "Terrarium", + "SuperManaPotion": "Supermikstura many", + "Hellforge": "Piekielna kuźnia", + "EbonwoodFence": "Płot z drewna ebonowego", + "RichMahoganyFence": "Płot mahoniowy", + "PearlwoodFence": "Płot z drewna perłowego", + "ShadewoodFence": "Płot z drewna mroku", + "BrickLayer": "Warstwa cegieł", + "ExtendoGrip": "Większy zasięg", + "PaintSprayer": "Rozpylacz farby", + "PortableCementMixer": "Przenośna betoniarka", + "BeetleHusk": "Łupina żuka", + "CelestialMagnet": "Niebiański magnes", + "ClayPot": "Gliniany garnek", + "CelestialEmblem": "Niebiański symbol", + "CelestialCuffs": "Niebiańskie kajdanki", + "PeddlersHat": "Kapelusz handlarza ulicznego", + "PulseBow": "Pulsujący łuk", + "NaturesGift": "Prezent natury", + "Bed": "Łóżko", + "Silk": "Jedwab", + "DynastyTable": "Stół dynastii", + "LesserRestorationPotion": "Mniejsza mikstura przywrócenia", + "DynastyWood": "Drzewo dynastii", + "RedDynastyShingles": "Czerwony gont dynastii", + "BlueDynastyShingles": "Niebieski gont dynastii", + "WhiteDynastyWall": "Biała ściana dynastii", + "BlueDynastyWall": "Niebieska ściana dynastii", + "DynastyDoor": "Drzwi dynastii", + "Sake": "Sake", + "PadThai": "Pad Thai", + "Pho": "Pho", + "Revolver": "Rewolwer", + "RestorationPotion": "Mikstura przywrócenia", + "Gatligator": "Gatligator", + "ArcaneRuneWall": "Ściana tajemniczych run", + "WaterGun": "Pistolet na wodę", + "Katana": "Katana", + "UltrabrightTorch": "Megajasna pochodnia", + "MagicHat": "Magiczny kapelusz", + "DiamondRing": "Pierścień z diamentem", + "Gi": "Gi", + "Kimono": "Kimono", + "GypsyRobe": "Szata cygańska", + "JungleHat": "Kapelusz z dżungli", + "BeetleWings": "Skrzydła żuka", + "TigerSkin": "Skóra tygrysa", + "LeopardSkin": "Skóra pantery", + "ZebraSkin": "Skóra zebry", + "CrimsonCloak": "Szkarłatna peleryna", + "MysteriousCape": "Tajemnicza peleryna", + "RedCape": "Czerwona peleryna", + "WinterCape": "Zimowa peleryna", + "WoodFishingPole": "Drewniana wędka", + "JungleShirt": "Koszulka z dżungli", + "Bass": "Okoń", + "ReinforcedFishingPole": "Wzmocniona wędka", + "FiberglassFishingPole": "Wędka z włókna szklanego", + "FisherofSouls": "Poławiacz dusz", + "GoldenFishingRod": "Złota wędka", + "MechanicsRod": "Wędka mechanika", + "SittingDucksFishingRod": "Wędka łatwego celu", + "Trout": "Pstrąg", + "Salmon": "Łosoś", + "AtlanticCod": "Dorsz atlantycki", + "Gel": "Żel", + "JunglePants": "Spodnie z dżungli", + "Tuna": "Tuńczyk", + "RedSnapper": "Lucjan czerwony", + "NeonTetra": "Bystrzyk neonowy", + "ArmoredCavefish": "Opancerzona ryba jaskiniowa", + "Damselfish": "Garbik daya", + "CrimsonTigerfish": "Szkarłatna ryba tygrysia", + "FrostMinnow": "Mroźna płotka", + "PrincessFish": "Rybka księżniczki", + "GoldenCarp": "Złoty karp", + "SpecularFish": "Ryba lustrzana", + "MoltenHelmet": "Roztopiony hełm", + "Prismite": "Ryba pryzmatyczna", + "VariegatedLardfish": "Smalecznica pstra", + "FlarefinKoi": "Błystka jasna", + "DoubleCod": "Dwudorsz", + "Honeyfin": "Miodownik", + "Obsidifish": "Obysdianatek", + "Shrimp": "Krewetka", + "ChaosFish": "Ryba chaosu", + "Ebonkoi": "Ebonkoi", + "Hemopiranha": "Hemopirania", + "MoltenBreastplate": "Roztopiony napierśnik", + "Rockfish": "Ryba skalista", + "Stinkfish": "Ryboskunks", + "MiningPotion": "Mikstura górnictwa", + "HeartreachPotion": "Mikstura sercowego zasięgu", + "CalmingPotion": "Mikstura uspokojenia", + "BuilderPotion": "Mikstura budowania", + "TitanPotion": "Mikstura tytana", + "FlipperPotion": "Mikstura płetw", + "SummoningPotion": "Mikstura przyzywania", + "TrapsightPotion": "Mikstura wyczuwania zagrożenia", + "MoltenGreaves": "Roztopione nagolenniki", + "PurpleClubberfish": "Fioletowa rybomaczuga", + "ObsidianSwordfish": "Obsydianowy miecznik", + "Swordfish": "Miecznik", + "IronFence": "Żelazny płot", + "WoodenCrate": "Drewniana skrzynia", + "IronCrate": "Żelazna skrzynia", + "GoldenCrate": "Złota skrzynia", + "OldShoe": "Stary but", + "FishingSeaweed": "Wodorosty", + "TinCan": "Cynowa puszka", + "MeteorShot": "Kula z meteoru", + "ReaverShark": "Zbirkin", + "SawtoothShark": "Rekin piłokształtny", + "Minecart": "Wózek górniczy", + "AmmoReservationPotion": "Mikstura oszczędzania amunicji", + "LifeforcePotion": "Mikstura życiodajnej siły", + "EndurancePotion": "Mikstura wytrzymałości", + "RagePotion": "Mikstura wściekłości", + "InfernoPotion": "Mikstura piekielna", + "WrathPotion": "Mikstura gniewu", + "StickyBomb": "Lepka bomba", + "RecallPotion": "Mikstura powrotu", + "TeleportationPotion": "Mikstura teleportacyjna", + "LovePotion": "Mikstura miłości", + "StinkPotion": "Mikstura smrodu", + "FishingPotion": "Mikstura wędkowania", + "SonarPotion": "Mikstura sonaru", + "CratePotion": "Mikstura skrzyni", + "ShiverthornSeeds": "Nasiona dygociernia", + "Shiverthorn": "Dygocierń", + "WarmthPotion": "Mikstura ciepła", + "BlackLens": "Czarna soczewka", + "FishHook": "Hak na ryby", + "BeeHeadgear": "Pszczele nakrycie głowy", + "BeeBreastplate": "Pszczeli napierśnik", + "BeeGreaves": "Pszczele nagolenniki", + "HornetStaff": "Kostur szerszenia", + "ImpStaff": "Kostur diablika", + "QueenSpiderStaff": "Kostur Królowej Pająków", + "AnglerHat": "Czapka wędkarza", + "AnglerVest": "Kamizelka wędkarza", + "AnglerPants": "Spodnie wędkarza", + "Sunglasses": "Okulary słoneczne", + "SpiderMask": "Pajęcza maska", + "SpiderBreastplate": "Pajęczy napierśnik", + "SpiderGreaves": "Pajęcze nagolenniki", + "HighTestFishingLine": "Wytrzymała żyłka", + "AnglerEarring": "Kolczyki wędkarza", + "TackleBox": "Pudełko na akcesoria", + "BlueDungeonPiano": "Niebieskie pianino z lochu", + "GreenDungeonPiano": "Zielone pianino z lochu", + "PinkDungeonPiano": "Różowe pianino z lochu", + "GoldenPiano": "Złote pianino", + "WizardHat": "Kapelusz czarodzieja", + "ObsidianPiano": "Obsydianowe pianino", + "BonePiano": "Kościane pianino", + "CactusPiano": "Kaktusowe pianino", + "SpookyPiano": "Straszne pianino", + "SkywarePiano": "Niebiańskie pianino", + "LihzahrdPiano": "Jaszczuhrze pianino", + "BlueDungeonDresser": "Niebieska komoda z lochu", + "GreenDungeonDresser": "Zielona komoda z lochu", + "PinkDungeonDresser": "Różowa komoda z lochu", + "GoldenDresser": "Złota komoda", + "TopHat": "Cylinder", + "ObsidianDresser": "Obsydianowa komoda", + "BoneDresser": "Kościana komoda", + "CactusDresser": "Kaktusowa komoda", + "SpookyDresser": "Straszna komoda", + "SkywareDresser": "Niebiańska komoda", + "HoneyDresser": "Miodowa komoda", + "LihzahrdDresser": "Jaszczuhrza komoda", + "Sofa": "Kanapa", + "EbonwoodSofa": "Kanapa z drewna ebonowego", + "RichMahoganySofa": "Kanapa mahoniowa", + "WoodenSword": "Drewniany miecz", + "TuxedoShirt": "Koszula do smokingu", + "PearlwoodSofa": "Kanapa z drewna perłowego", + "ShadewoodSofa": "Kanapa z drewna mroku", + "BlueDungeonSofa": "Niebieska kanapa z lochu", + "GreenDungeonSofa": "Zielona kanapa z lochu", + "PinkDungeonSofa": "Różowa kanapa z lochu", + "GoldenSofa": "Złota kanapa", + "ObsidianSofa": "Obsydianowa kanapa", + "BoneSofa": "Kościana kanapa", + "CactusSofa": "Kaktusowa kanapa", + "SpookySofa": "Straszna kanapa", + "TuxedoPants": "Spodnie smokingu", + "SkywareSofa": "Niebiańska kanapa", + "HoneySofa": "Miodowa kanapa", + "SteampunkSofa": "Steampunkowa kanapa", + "MushroomSofa": "Grzybowa kanapa", + "GlassSofa": "Szklana kanapa", + "PumpkinSofa": "Dyniowa kanapa", + "LihzahrdSofa": "Jaszczuhrza kanapa", + "SeashellHairpin": "Szpilka do włosów w kształcie muszli", + "MermaidAdornment": "Ozdoba syreny", + "MermaidTail": "Ogon syreny", + "SummerHat": "Letni kapelusz", + "ZephyrFish": "Ryba zefiru", + "Fleshcatcher": "Chwytacz mięsa", + "HotlineFishingHook": "Gorący haczyk na ryby", + "FrogLeg": "Żabia noga", + "Anchor": "Kotwica", + "CookedFish": "Gotowana ryba", + "CookedShrimp": "Gotowana krewetka", + "Sashimi": "Sashimi", + "BunnyHood": "Kaptur króliczka", + "BeeWax": "Wosk pszczeli", + "CopperPlatingWall": "Ściana z miedzianych płyt", + "StoneSlabWall": "Ściana z kamiennych płyt", + "Sail": "Żagiel", + "CoralstoneBlock": "Blok kamienia koralowego", + "BlueJellyfish": "Niebieska meduza", + "GreenJellyfish": "Zielona meduza", + "PinkJellyfish": "Różowa meduza", + "BlueJellyfishJar": "Słoik niebieskiej meduzy", + "PlumbersHat": "Czapka hydraulika", + "GreenJellyfishJar": "Słoik zielonej meduzy", + "PinkJellyfishJar": "Słoik różowej meduzy", + "PlumbersShirt": "Koszulka hydraulika", + "Batfish": "Batryba", + "BumblebeeTuna": "Tuńczyk trzmielowy", + "Catfish": "Sum", + "Cloudfish": "Ryba-chmura", + "Cursedfish": "Przeklęta ryba", + "Dirtfish": "Brudna ryba", + "DynamiteFish": "Dynamiczna ryba", + "EaterofPlankton": "Pożeracz planktonu", + "FallenStarfish": "Spadająca rozgwiazda", + "TheFishofCthulu": "Ryba Cthulhu", + "PlumbersPants": "Spodnie hydraulika", + "Fishotron": "Rybotron", + "Harpyfish": "Ryba-harpia", + "Hungerfish": "Żarłok", + "Ichorfish": "Ichoryba", + "Jewelfish": "Klejnoryba", + "MirageFish": "Rybomorgana", + "MutantFlinxfin": "Zmutowany flinx", + "Pengfish": "Ryba-pingwin", + "Pixiefish": "Rybowróżka", + "Spiderfish": "Rybająk", + "HerosHat": "Czapka bohatera", + "TundraTrout": "Pstrąg z tundry", + "UnicornFish": "Jednorybożec", + "GuideVoodooFish": "Ryba-voodoo", + "Wyverntail": "Ogon wywerny", + "ZombieFish": "Ryba-zombie", + "AmanitaFungifin": "Grzybopław-amanita", + "Angelfish": "Rybanioł", + "BloodyManowar": "Wojennica", + "Bonefish": "Ościotrup", + "Bunnyfish": "Królicza ryba", + "HerosShirt": "Koszulka bohatera", + "CapnTunabeard": "Kapiratka", + "Clownfish": "Ryba-klaun", + "DemonicHellfish": "Demoniczna ryba z piekła", + "Derpfish": "Derpryba", + "Fishron": "Rybok", + "InfectedScabbardfish": "Zakażona rybochwa", + "Mudfish": "Błotniak", + "Slimefish": "Ryboszlama", + "TropicalBarracuda": "Tropikalna barakuda", + "KingSlimeTrophy": "Trofeum – Król Szlam", + "HerosPants": "Spodnie bohatera", + "ShipInABottle": "Statek w butelce", + "KingSlimeMask": "Maska Króla Szlam", + "FinWings": "Płetwoskrzydła", + "TreasureMap": "Mapa skarbów", + "SeaweedPlanter": "Wodorościak", + "PillaginMePixels": "Kradną piksele", + "FishCostumeMask": "Maska kostiumu rybnego", + "FishCostumeShirt": "Koszula kostiumu rybnego", + "WoodenDoor": "Drewniane drzwi", + "FishBowl": "Kuliste akwarium", + "FishCostumeFinskirt": "Spódnica kostiumu rybnego", + "GingerBeard": "Ruda broda", + "ArchaeologistsHat": "Kapelusz archeologa", + "ArchaeologistsJacket": "Kurtka archeologa", + "ArchaeologistsPants": "Spodnie archeologa", + "OpticStaff": "Kostur optyczny", + "BlackThread": "Czarna nić", + "GreenThread": "Zielona nić", + "NinjaHood": "Kaptur ninja", + "NinjaShirt": "Koszulka ninja", + "NinjaPants": "Spodnie ninja", + "Leather": "Skóra", + "StoneWall": "Kamienna ściana", + "RedHat": "Czerwony kapelusz", + "Goldfish": "Złota rybka", + "Robe": "Szata", + "RobotHat": "Czapka robota", + "GoldCrown": "Złota korona", + "HellfireArrow": "Strzała piekielnego ognia", + "Sandgun": "Piaskowy pistolet", + "GuideVoodooDoll": "Lalka voodoo przewodnika", + "DivingHelmet": "Hełm do nurkowania", + "FamiliarShirt": "Koszula znajomego", + "Acorn": "Żołądź", + "FamiliarPants": "Spodnie znajomego", + "FamiliarWig": "Peruka znajomego", + "DemonScythe": "Demoniczna kosa", + "NightsEdge": "Nocne ostrze", + "DarkLance": "Mroczna lanca", + "Coral": "Koral", + "Cactus": "Kaktus", + "Trident": "Trójząb", + "SilverBullet": "Srebrna kula", + "ThrowingKnife": "Nóż do rzucania", + "LesserHealingPotion": "Mniejsza mikstura leczenia", + "Spear": "Włócznia", + "Blowpipe": "Dmuchawka", + "Glowstick": "Świetlik", + "Seed": "Nasienie", + "WoodenBoomerang": "Drewniany bumerang", + "Aglet": "Sznurówka", + "StickyGlowstick": "Lepki świetlik", + "PoisonedKnife": "Zatruty nóż", + "ObsidianSkinPotion": "Mikstura obsydianowej skóry", + "RegenerationPotion": "Mikstura regeneracji", + "AngryTrapperBanner": "Sztandar rozgniewanego trapera", + "ArmoredVikingBanner": "Sztandar uzbrojonego wikinga", + "BlackSlimeBanner": "Sztandar czarnego szlamu", + "LifeCrystal": "Kryształ życia", + "SwiftnessPotion": "Mikstura szybkości", + "BlueArmoredBonesBanner": "Sztandar niebieskich, zbrojnych kości", + "BlueCultistArcherBanner": "Sztandar niebieskich łuczników-kultystów", + "ManaCloakStar": "", + "BlueCultistFighterBanner": "Sztandar niebieskich wojowników-kultystów", + "BoneLeeBanner": "Sztandar Obrusa Lee", + "ClingerBanner": "Sztandar chwytaka", + "CochinealBeetleBanner": "Sztandar czerwca żukowego", + "CorruptPenguinBanner": "Sztandar zepsutego pingwina", + "CorruptSlimeBanner": "Sztandar zepsutego szlamu", + "CorruptorBanner": "Sztandar skaziciela", + "GillsPotion": "Mikstura skrzeli", + "CrimslimeBanner": "Sztandar szkarlamu", + "CursedSkullBanner": "Sztandar przeklętej czaszki", + "CyanBeetleBanner": "Sztandar cyjanowego żuka", + "DevourerBanner": "Sztandar pożeracza", + "DiablolistBanner": "Sztandar diabolisty", + "DoctorBonesBanner": "Sztandar doktora Bonesa", + "DungeonSlimeBanner": "Sztandar szlamu z lochu", + "DungeonSpiritBanner": "Sztandar ducha z lochu", + "ElfArcherBanner": "Sztandar elfiego łucznika", + "ElfCopterBanner": "Sztandar elfokoptera", + "IronskinPotion": "Mikstura żelaznej skóry", + "EyezorBanner": "Sztandar laseroka", + "FlockoBanner": "Sztandar śnieżka", + "GhostBanner": "Sztandar ducha", + "GiantBatBanner": "Sztandar wielkiego nietoperza", + "GiantCursedSkullBanner": "Sztandar wielkiej, przeklętej czaszki", + "GiantFlyingFoxBanner": "Sztandar wielkiego, latającego lisa", + "GingerbreadManBanner": "Sztandar piernikowego ludka", + "GoblinArcherBanner": "Sztandar goblińskiego łucznika", + "GreenSlimeBanner": "Sztandar zielonego szlamu", + "HeadlessHorsemanBanner": "Sztandar bezgłowego jeźdźca", + "ManaRegenerationPotion": "Mikstura regeneracji many", + "HellArmoredBonesBanner": "Sztandar piekielnych, zbrojnych kości", + "HellhoundBanner": "Sztandar piekielnego ogara", + "HoppinJackBanner": "Sztandar skaczącego Jacka", + "IceBatBanner": "Sztandar lodowego nietoperza", + "IceGolemBanner": "Sztandar lodowego golema", + "IceSlimeBanner": "Sztandar lodowego szlamu", + "IchorStickerBanner": "Sztandar ichorowego strzelca", + "IlluminantBatBanner": "Sztandar świecącego nietoperza", + "IlluminantSlimeBanner": "Sztandar świecącego szlamu", + "JungleBatBanner": "Sztandar nietoperza z dżungli", + "MagicPowerPotion": "Mikstura mocy magicznej", + "JungleSlimeBanner": "Sztandar szlamu z dżungli", + "KrampusBanner": "Sztandar krampusa", + "LacBeetleBanner": "Sztandar żuka szelaka", + "LavaBatBanner": "Sztandar nietoperza lawy", + "LavaSlimeBanner": "Sztandar szlamu lawy", + "MartianBrainscramblerBanner": "Sztandar marsjańskiego mąciciela", + "MartianDroneBanner": "Sztandar marsjańskiego drona", + "MartianEngineerBanner": "Sztandar marsjańskiego inżyniera", + "MartianGigazapperBanner": "Sztandar marsjańskiego gigamiotacza", + "MartianGreyGruntBanner": "Sztandar marsjańskiego, szarego siepacza", + "FeatherfallPotion": "Mikstura delikatnego upadku", + "MartianOfficerBanner": "Sztandar marsjańskiego oficera", + "MartianRaygunnerBanner": "Sztandar marsjańskiego operatora promieni", + "MartianScutlixGunnerBanner": "Sztandar marsjańskiego, scutlixowego strzelca", + "MartianTeslaTurretBanner": "Sztandar marsjańskiej wieżyczki tesla", + "MisterStabbyBanner": "Sztandar pana dźgacza", + "MotherSlimeBanner": "Sztandar matki szlamów", + "NecromancerBanner": "Sztandar nekromanty", + "NutcrackerBanner": "Sztandar dziadka do orzechów", + "PaladinBanner": "Sztandar paladyna", + "PenguinBanner": "Sztandar pingwina", + "SpelunkerPotion": "Mikstura grotołaza", + "PinkyBanner": "Sztandar pinky’ego", + "PoltergeistBanner": "Sztandar złośliwego ducha", + "PossessedArmorBanner": "Sztandar opętanej zbroi", + "PresentMimicBanner": "Sztandar mimika z prezentu", + "PurpleSlimeBanner": "Sztandar fioletowego szlamu", + "RaggedCasterBanner": "Sztandar obdartego magika", + "RainbowSlimeBanner": "Sztandar tęczowego szlamu", + "RavenBanner": "Kruczy sztandar", + "RedSlimeBanner": "Sztandar czerwonego szlamu", + "RuneWizardBanner": "Sztandar runicznego czarodzieja", + "InvisibilityPotion": "Mikstura niewidzialności", + "RustyArmoredBonesBanner": "Sztandar rdzawych, zbrojnych kości", + "ScarecrowBanner": "Sztandar stracha na wróble", + "ScutlixBanner": "Sztandar scutlixa", + "SkeletonArcherBanner": "Sztandar łucznika-szkieletu", + "SkeletonCommandoBanner": "Sztandar szkieletu-komandosa", + "SkeletonSniperBanner": "Sztandar szkieletu-snajpera", + "SlimerBanner": "Sztandar szlamera", + "SnatcherBanner": "Sztandar łapacza", + "SnowBallaBanner": "Sztandar śnieżnego bałwana", + "SnowmanGangstaBanner": "Sztandar bałwana-ganstera", + "ShinePotion": "Mikstura blasku", + "SpikedIceSlimeBanner": "Sztandar kolczastego, lodowego szlamu", + "SpikedJungleSlimeBanner": "Sztandar kolczastego szlamu z dżungli", + "SplinterlingBanner": "Sztandar drzazgusia", + "SquidBanner": "Sztandar kałamarnicy", + "TacticalSkeletonBanner": "Sztandar szkieletu-taktyka", + "TheGroomBanner": "Sztandar pana młodego", + "TimBanner": "Sztandar Tima", + "UndeadMinerBanner": "Sztandar nieumarłego górnika", + "UndeadVikingBanner": "Sztandar nieumarłego wikinga", + "WhiteCultistArcherBanner": "Sztandar białych łuczników-kultystów", + "NightOwlPotion": "Mikstura sowy", + "WhiteCultistCasterBanner": "Sztandar białych magów-kultystów", + "WhiteCultistFighterBanner": "Sztandar białych wojowników-kultystów", + "YellowSlimeBanner": "Sztandar żółtego szlamu", + "YetiBanner": "Sztandar yeti", + "ZombieElfBanner": "Sztandar elfiego zombie", + "StoneBlock": "Kamienny blok", + "DirtWall": "Ściana ziemi", + "BattlePotion": "Mikstura bitewna", + "ThornsPotion": "Mikstura kolców", + "WaterWalkingPotion": "Mikstura wodnego kroku", + "ArcheryPotion": "Mikstura łucznictwa", + "HunterPotion": "Mikstura łowcy", + "GravitationPotion": "Mikstura grawitacji", + "GoldChest": "Złoty kufer", + "DaybloomSeeds": "Nasiona dziennicy", + "MoonglowSeeds": "Nasiona nocnicy", + "BlinkrootSeeds": "Nasiona migotka", + "Bottle": "Butelka", + "DeathweedSeeds": "Nasiona chwastozgonu", + "WaterleafSeeds": "Nasiona zmokłoliścia", + "FireblossomSeeds": "Nasiona ogniokwiatu", + "Daybloom": "Dziennica", + "Moonglow": "Nocnica", + "Blinkroot": "Migotek", + "Deathweed": "Chwastozgon", + "Waterleaf": "Zmokłoliść", + "Fireblossom": "Ogniokwiat", + "SharkFin": "Płetwa rekina", + "WoodenTable": "Drewniany stół", + "Feather": "Pióro", + "Tombstone": "Nagrobek", + "MimeMask": "Maska mima", + "AntlionMandible": "Żuchwa mrówkolwa", + "IllegalGunParts": "Nielegalne części pistoletu", + "TheDoctorsShirt": "Doktorska koszulka", + "TheDoctorsPants": "Doktorskie spodnie", + "GoldenKey": "Złoty klucz", + "ShadowChest": "Kufer cienia", + "ShadowKey": "Klucz cienia", + "Furnace": "Piec", + "ObsidianBrickWall": "Obsydianowa ściana z cegieł", + "JungleSpores": "Zarodniki z dżungli", + "Loom": "Krosno", + "Piano": "Pianino", + "Dresser": "Komoda", + "Bench": "Ławka", + "Bathtub": "Wanna", + "RedBanner": "Czerwony sztandar", + "GreenBanner": "Zielony sztandar", + "BlueBanner": "Niebieski sztandar", + "WoodenChair": "Drewniane krzesło", + "YellowBanner": "Żółty sztandar", + "LampPost": "Słup lampy", + "TikiTorch": "Pochodnia tiki", + "Barrel": "Beczka", + "ChineseLantern": "Chiński lampion", + "CookingPot": "Garnek", + "Safe": "Sejf", + "SkullLantern": "Lampa-czaszka", + "TrashCan": "Śmietnik", + "PlatinumBow": "Platynowy łuk", + "PlatinumHammer": "Platynowy młot", + "PlatinumAxe": "Platynowy topór", + "PlatinumShortsword": "Platynowy, krótki miecz", + "PlatinumBroadsword": "Platynowy pałasz", + "PlatinumPickaxe": "Platynowy kilof", + "TungstenBow": "Tungstenowy łuk", + "TungstenHammer": "Tungstenowy młot", + "TungstenAxe": "Tungstenowy topór", + "TungstenShortsword": "Tungstenowy, krótki miecz", + "Candelabra": "Świecznik", + "TungstenBroadsword": "Tungstenowy pałasz", + "TungstenPickaxe": "Tungstenowy kilof", + "LeadBow": "Ołowiany łuk", + "LeadHammer": "Ołowiany młot", + "LeadAxe": "Ołowiany topór", + "LeadShortsword": "Ołowiany, krótki miecz", + "LeadBroadsword": "Ołowiany pałasz", + "LeadPickaxe": "Ołowiany kilof", + "TinBow": "Cynowy łuk", + "TinHammer": "Cynowy młot", + "IronAnvil": "Żelazne kowadło", + "PinkVase": "Różowy wazon", + "TinAxe": "Cynowy topór", + "TinShortsword": "Cynowy, krótki miecz", + "TinBroadsword": "Cynowy pałasz", + "TinPickaxe": "Cynowy kilof", + "CopperBow": "Miedziany łuk", + "CopperHammer": "Miedziany młot", + "CopperAxe": "Miedziany topór", + "CopperShortsword": "Miedziany, krótki miecz", + "CopperBroadsword": "Miedziany pałasz", + "CopperPickaxe": "Miedziany kilof", + "Mug": "Kubek", + "SilverBow": "Srebrny łuk", + "SilverHammer": "Srebrny młot", + "SilverAxe": "Srebrny topór", + "SilverShortsword": "Srebrny, krótki miecz", + "SilverBroadsword": "Srebrny pałasz", + "SilverPickaxe": "Srebrny kilof", + "GoldBow": "Złoty łuk", + "GoldHammer": "Złoty młot", + "GoldAxe": "Złoty topór", + "GoldShortsword": "Złoty, krótki miecz", + "Keg": "Antał", + "GoldBroadsword": "Złoty pałasz", + "GoldPickaxe": "Złoty kilof", + "Ale": "Piwo", + "Bookcase": "Biblioteczka", + "Throne": "Tron", + "Bowl": "Miska", + "BowlofSoup": "Miska zupy", + "Toilet": "Toaleta", + "GrandfatherClock": "Zegar dziadka", + "WorkBench": "Stół warsztatowy", + "ArmorStatue": "Posąg zbroi", + "GoblinBattleStandard": "Gobliński proporzec bitewny", + "TatteredCloth": "Obszarpane płótno", + "Sawmill": "Tartak", + "CobaltOre": "Ruda kobaltu", + "MythrilOre": "Ruda mithrilu", + "AdamantiteOre": "Ruda adamantytu", + "Pwnhammer": "Pwn-młot", + "Excalibur": "Excalibur", + "HallowedSeeds": "Bajkowe nasiona", + "Goggles": "Gogle", + "EbonsandBlock": "Blok piasku ebonowego", + "CobaltHat": "Kobaltowy kapelusz", + "CobaltHelmet": "Kobaltowy hełm", + "CobaltMask": "Kobaltowa maska", + "CobaltBreastplate": "Kobaltowy napierśnik", + "CobaltLeggings": "Kobaltowe spodnie", + "MythrilHood": "Mithrilowy kaptur", + "MythrilHelmet": "Mithrilowy hełm", + "MythrilHat": "Mithrilowa czapka", + "MythrilChainmail": "Mithrilowa kolczuga", + "Lens": "Soczewka", + "MythrilGreaves": "Mithrilowe nagolenniki", + "CobaltBar": "Sztabka kobaltu", + "MythrilBar": "Sztabka mithrilu", + "CobaltChainsaw": "Kobaltowa piła łańcuchowa", + "MythrilChainsaw": "Mithrilowa piła łańcuchowa", + "CobaltDrill": "Kobaltowy świder", + "MythrilDrill": "Mithrilowy świder", + "AdamantiteChainsaw": "Adamantytowa piła łańcuchowa", + "AdamantiteDrill": "Adamantytowy świder", + "DaoofPow": "Dao mocy", + "WoodenBow": "Drewniany łuk", + "MythrilHalberd": "Mithrilowa halabarda", + "AdamantiteBar": "Adamantytowa sztabka", + "GlassWall": "Szklana ściana", + "Compass": "Kompas", + "DivingGear": "Sprzęt do nurkowania", + "GPS": "GPS", + "ObsidianHorseshoe": "Obsydianowa podkowa", + "ObsidianShield": "Obsydianowa tarcza", + "TinkerersWorkshop": "Stół warsztatowy Majsterkowicza", + "CloudinaBalloon": "Chmura w balonie", + "IronBroadsword": "Żelazny pałasz", + "WoodenArrow": "Drewniana strzała", + "AdamantiteHeadgear": "Adamantytowe nakrycie głowy", + "AdamantiteHelmet": "Adamantytowy hełm", + "AdamantiteMask": "Adamantytowa maska", + "AdamantiteBreastplate": "Adamantytowy napierśnik", + "AdamantiteLeggings": "Adamantytowe spodnie", + "SpectreBoots": "Widmowe buty", + "AdamantiteGlaive": "Adamantytowa glewia", + "Toolbelt": "Pasek na narzędzia", + "PearlsandBlock": "Blok piasku perłowego", + "PearlstoneBlock": "Blok kamienia perłowego", + "FlamingArrow": "Ognista strzała", + "MiningShirt": "Koszulka górnika", + "MiningPants": "Spodnie górnika", + "PearlstoneBrick": "Cegła kamienia perłowego", + "IridescentBrick": "Mieniąca się cegła", + "MudstoneBlock": "Cegła kamienia błotnego", + "CobaltBrick": "Cegła kobaltowa", + "MythrilBrick": "Cegła mithrilowa", + "PearlstoneBrickWall": "Ściana z cegieł kamienia perłowego", + "IridescentBrickWall": "Ściana z mieniących się cegieł", + "MudstoneBrickWall": "Ściana z cegieł kamienia błotnego", + "Shuriken": "Shuriken", + "CobaltBrickWall": "Ściana z cegieł kobaltowych", + "MythrilBrickWall": "Ściana z cegieł mithrilowych", + "HolyWater": "Woda święcona", + "UnholyWater": "Woda nieświęta", + "SiltBlock": "Blok mułu", + "FairyBell": "Dzwoneczek duszka", + "BreakerBlade": "Ostrze kruszące", + "BlueTorch": "Niebieska pochodnia", + "RedTorch": "Czerwona Pochodnia", + "GreenTorch": "Zielona Pochodnia", + "SuspiciousLookingEye": "Podejrzanie wyglądające oko", + "PurpleTorch": "Fioletowa pochodnia", + "WhiteTorch": "Biała pochodnia", + "YellowTorch": "Żółta pochodnia", + "DemonTorch": "Demoniczna pochodnia", + "ClockworkAssaultRifle": "Mechaniczny karabin", + "CobaltRepeater": "Kusza powtarzalna z kobaltu", + "MythrilRepeater": "Kusza powtarzalna z mithrilu", + "DualHook": "Podwójny hak", + "StarStatue": "Posąg gwiazdy", + "SwordStatue": "Posąg miecza", + "DemonBow": "Demoniczny łuk", + "SlimeStatue": "Szlamowy posąg", + "GoblinStatue": "Posąg goblina", + "ShieldStatue": "Posąg tarczy", + "BatStatue": "Posąg nietoperza", + "FishStatue": "Posąg ryby", + "BunnyStatue": "Posąg króliczka", + "SkeletonStatue": "Posąg szkieletu", + "ReaperStatue": "Posąg kostuchy", + "WomanStatue": "Posąg kobiety", + "ImpStatue": "Posąg diablika", + "WarAxeoftheNight": "Topór wojenny nocy", + "GargoyleStatue": "Posąg gargulca", + "GloomStatue": "Posąg mroku", + "HornetStatue": "Posąg szerszenia", + "BombStatue": "Posąg bomby", + "CrabStatue": "Posąg kraba", + "HammerStatue": "Posąg młota", + "PotionStatue": "Posąg mikstury", + "SpearStatue": "Posąg włóczni", + "CrossStatue": "Posąg krzyża", + "JellyfishStatue": "Posąg meduzy", + "LightsBane": "Zguba światła", + "BowStatue": "Posąg łuku", + "BoomerangStatue": "Posąg bumerangu", + "BootStatue": "Posąg buta", + "ChestStatue": "Posąg kufra", + "BirdStatue": "Posąg ptaka", + "AxeStatue": "Posąg topora", + "CorruptStatue": "Zepsuty posąg", + "TreeStatue": "Posąg drzewa", + "AnvilStatue": "Posąg kowadła", + "PickaxeStatue": "Posąg kilofa", + "UnholyArrow": "Nieświęta strzała", + "MushroomStatue": "Posąg grzyba", + "EyeballStatue": "Posąg gałki ocznej", + "PillarStatue": "Posąg kolumny", + "HeartStatue": "Posąg serca", + "PotStatue": "Posąg garnka", + "SunflowerStatue": "Posąg słonecznika", + "KingStatue": "Posąg króla", + "QueenStatue": "Posąg królowej", + "PiranhaStatue": "Posąg piranii", + "PlankedWall": "Oszalowana ściana", + "Chest": "Kufer", + "WoodenBeam": "Drewniana belka", + "AdamantiteRepeater": "Kusza powtarzalna z adamantytu", + "AdamantiteSword": "Adamantytowy miecz", + "CobaltSword": "Kobaltowy miecz", + "MythrilSword": "Mithrilowy miecz", + "MoonCharm": "Księżycowy wisior", + "Ruler": "Linijka", + "CrystalBall": "Kryształowa kula", + "DiscoBall": "Kula dyskotekowa", + "SorcererEmblem": "Symbol czarownika", + "BandofRegeneration": "Opaska regeneracji", + "WarriorEmblem": "Symbol wojownika", + "RangerEmblem": "Symbol leśnika", + "DemonWings": "Demoniczne skrzydła", + "AngelWings": "Anielskie skrzydła", + "MagicalHarp": "Magiczna harfa", + "RainbowRod": "Tęczowy kostur", + "IceRod": "Lodowy kostur", + "NeptunesShell": "Skorupa Neptuna", + "Mannequin": "Manekin", + "GreaterHealingPotion": "Większa mikstura leczenia", + "Mushroom": "Grzyb", + "MagicMirror": "Magiczne lusterko", + "GreaterManaPotion": "Większa mikstura many", + "PixieDust": "Wróżkowy pył", + "CrystalShard": "Kryształowy odłamek", + "ClownHat": "Czapka klauna", + "ClownShirt": "Koszulka klauna", + "ClownPants": "Spodnie klauna", + "Flamethrower": "Miotacz płomieni", + "Bell": "Dzwonek", + "Harp": "Harfa", + "Wrench": "Czerwony klucz", + "JestersArrow": "Strzała błazna", + "WireCutter": "Przecinak do kabla", + "ActiveStoneBlock": "Aktywny blok kamienny", + "InactiveStoneBlock": "Nieaktywny blok kamienny", + "Lever": "Dźwignia", + "LaserRifle": "Karabin laserowy", + "CrystalBullet": "Kryształowa kula", + "HolyArrow": "Strzała święcona", + "MagicDagger": "Magiczny sztylet", + "CrystalStorm": "Kryształowa burza", + "CursedFlames": "Przeklęte płomienie", + "AngelStatue": "Posąg anioła", + "SoulofLight": "Dusza światła", + "SoulofNight": "Dusza nocy", + "CursedFlame": "Przeklęty płomień", + "CursedTorch": "Przeklęta Pochodnia", + "AdamantiteForge": "Adamantytowa kuźnia", + "MythrilAnvil": "Mithrilowe kowadło", + "UnicornHorn": "Róg jednorożca", + "DarkShard": "Mroczny odłamek", + "LightShard": "Jasny odłamek", + "RedPressurePlate": "Czerwona płyta dociskowa", + "CloudinaBottle": "Chmura w butelce", + "Wire": "Kabel", + "SpellTome": "Księga zaklęć", + "StarCloak": "Gwiezdna peleryna", + "Megashark": "Megarekin", + "Shotgun": "Strzelba", + "PhilosophersStone": "Kamień filozoficzny", + "TitanGlove": "Tytanowa rękawica", + "CobaltNaginata": "Kobaltowa naginata", + "Switch": "Przełącznik", + "DartTrap": "Pułapka strzałkowa", + "HermesBoots": "Buty Hermesa", + "Boulder": "Głaz", + "GreenPressurePlate": "Zielona płyta dociskowa", + "GrayPressurePlate": "Szara płyta dociskowa", + "BrownPressurePlate": "Brązowa płyta dociskowa", + "MechanicalEye": "Mechaniczne oko", + "CursedArrow": "Przeklęta strzała", + "CursedBullet": "Przeklęta kula", + "SoulofFright": "Dusza przerażenia", + "SoulofMight": "Dusza mocy", + "SoulofSight": "Dusza wzroku", + "EnchantedBoomerang": "Zaczarowany bumerang", + "Gungnir": "Gungnir", + "HallowedPlateMail": "Bajkowa zbroja płytowa", + "HallowedGreaves": "Bajkowe nagolenniki", + "HallowedHelmet": "Bajkowy hełm", + "CrossNecklace": "Łańcuszek z krzyżem", + "ManaFlower": "Kwiat many", + "MechanicalWorm": "Mechaniczny robak", + "MechanicalSkull": "Mechaniczna czaszka", + "HallowedHeadgear": "Bajkowe nakrycie głowy", + "HallowedMask": "Bajkowa maska", + "DemoniteOre": "Ruda demonitu", + "SlimeCrown": "Szlamowa korona", + "LightDisc": "Świetlisty dysk", + "MusicBoxOverworldDay": "Pozytywka (dzień na powierzchni)", + "MusicBoxEerie": "Pozytywka (nieziemskość)", + "MusicBoxNight": "Pozytywka (noc)", + "MusicBoxTitle": "Pozytywka (tytuł)", + "MusicBoxUnderground": "Pozytywka (podziemie)", + "MusicBoxBoss1": "Pozytywka (boss 1)", + "MusicBoxJungle": "Pozytywka (dżungla)", + "MusicBoxCorruption": "Pozytywka (Zepsucie)", + "DemoniteBar": "Sztabka demonitu", + "MusicBoxUndergroundCorruption": "Pozytywka (podziemie Zepsucia)", + "MusicBoxTheHallow": "Pozytywka (Bajkowo)", + "MusicBoxBoss2": "Pozytywka (boss 2)", + "MusicBoxUndergroundHallow": "Pozytywka (podziemie Bajkowa)", + "MusicBoxBoss3": "Pozytywka (boss 3)", + "SoulofFlight": "Dusza lotu", + "MusicBox": "Pozytywka", + "DemoniteBrick": "Cegła demonitu", + "HallowedRepeater": "Bajkowa kusza powtarzalna", + "Drax": "Świdrolof", + "Heart": "Serce", + "Explosives": "Materiały wybuchowe", + "InletPump": "Pompa wlotowa", + "OutletPump": "Pompa wylotowa", + "Timer1Second": "1-sekundowy licznik", + "Timer3Second": "3-sekundowy licznik", + "Timer5Second": "5-sekundowy licznik", + "CandyCaneBlock": "Blok cukierkowy", + "CandyCaneWall": "Ściana cukierkowa", + "SantaHat": "Czapka Mikołaja", + "SantaShirt": "Przebranie Mikołaja", + "CorruptSeeds": "Nasiona zepsucia", + "SantaPants": "Spodnie Mikołaja", + "GreenCandyCaneBlock": "Zielony blok cukierkowy", + "GreenCandyCaneWall": "Zielona ściana cukierkowa", + "SnowBlock": "Śnieżny blok", + "SnowBrick": "Śnieżna cegła", + "SnowBrickWall": "Ściana ze śnieżnych cegieł", + "BlueLight": "Niebieskie światło", + "RedLight": "Czerwone światło", + "GreenLight": "Zielone światło", + "BluePresent": "Niebieski prezent", + "IronShortsword": "Żelazny, krótki miecz", + "VileMushroom": "Plugawy grzyb", + "GreenPresent": "Zielony prezent", + "YellowPresent": "Żółty prezent", + "SnowGlobe": "Śnieżna kula", + "Carrot": "Marchewka", + "AdamantiteBeam": "Adamantytowa belka", + "AdamantiteBeamWall": "Ściana z adamantytowych belek", + "DemoniteBrickWall": "Ściana z cegieł demonitu", + "SandstoneBrick": "Cegła kamienia piaskowego", + "SandstoneBrickWall": "Ściana z cegieł kamienia piaskowego", + "EbonstoneBrick": "Cegła kamienia ebonowego", + "EbonstoneBlock": "Kamień ebonowy", + "EbonstoneBrickWall": "Ściana z cegieł kamienia ebonowego", + "RedStucco": "Czerwony stiuk", + "YellowStucco": "Żółty stiuk", + "GreenStucco": "Zielony stiuk", + "GrayStucco": "Szary stiuk", + "RedStuccoWall": "Czerwona ściana stiukowa", + "YellowStuccoWall": "Żółta ściana stiukowa", + "GreenStuccoWall": "Zielona ściana stiukowa", + "GrayStuccoWall": "Szara ściana stiukowa", + "Ebonwood": "Drewno ebonowe", + "GrassSeeds": "Nasiona trawy", + "RichMahogany": "Mahoń", + "Pearlwood": "Drewno perłowe", + "EbonwoodWall": "Ściana z drewna ebonowego", + "RichMahoganyWall": "Ściana mahoniowa", + "PearlwoodWall": "Ściana z drewna perłowego", + "EbonwoodChest": "Kufer z drewna ebonowego", + "RichMahoganyChest": "Kufer mahoniowy", + "PearlwoodChest": "Kufer z drewna perłowego", + "EbonwoodChair": "Krzesło z drewna ebonowego", + "RichMahoganyChair": "Krzesło mahoniowa", + "Sunflower": "Słonecznik", + "PearlwoodChair": "Krzesło z drewna perłowego", + "EbonwoodPlatform": "Platforma z drewna ebonowego", + "RichMahoganyPlatform": "Platforma mahoniowa", + "PearlwoodPlatform": "Platforma z drewna perłowego", + "BonePlatform": "Platforma kościana", + "EbonwoodWorkBench": "Stół warsztatowy z drewna ebonowego", + "RichMahoganyWorkBench": "Mahoniowy stół warsztatowy", + "PearlwoodWorkBench": "Stół warsztatowy z drewna perłowego", + "EbonwoodTable": "Stół z drewna ebonowego", + "RichMahoganyTable": "Stół mahoniowy", + "Vilethorn": "Plugawy cierń", + "PearlwoodTable": "Stół z drewna perłowego", + "EbonwoodPiano": "Pianino z drewna ebonowego", + "RichMahoganyPiano": "Pianino mahoniowe", + "PearlwoodPiano": "Pianino z drewna perłowego", + "EbonwoodBed": "Łóżko z drewna ebonowego", + "RichMahoganyBed": "Łóżko mahoniowe", + "PearlwoodBed": "Łóżko z drewna perłowego", + "EbonwoodDresser": "Komoda z drewna ebonowego", + "RichMahoganyDresser": "Komoda mahoniowa", + "PearlwoodDresser": "Komoda z drewna perłowego", + "Starfury": "Gwiezdna furia", + "EbonwoodDoor": "Drzwi z drewna ebonowego", + "RichMahoganyDoor": "Drzwi mahoniowe", + "PearlwoodDoor": "Drzwi z drewna perłowego", + "EbonwoodSword": "Miecz z drewna ebonowego", + "EbonwoodHammer": "Młot z drewna ebonowego", + "EbonwoodBow": "Łuk z drewna ebonowego", + "RichMahoganySword": "Miecz mahoniowy", + "RichMahoganyHammer": "Młot mahoniowy", + "RichMahoganyBow": "Łuk mahoniowy", + "PearlwoodSword": "Miecz z drewna perłowego", + "PurificationPowder": "Proszek oczyszczający", + "PearlwoodHammer": "Młot z drewna perłowego", + "PearlwoodBow": "Łuk z drewna perłowego", + "RainbowBrick": "Tęczowa cegła", + "RainbowBrickWall": "Ściana tęczowych cegieł", + "IceBlock": "Blok lodu", + "RedsWings": "Skrzydła Reda", + "RedsHelmet": "Hełm Reda", + "RedsBreastplate": "Napierśnik Reda", + "RedsLeggings": "Spodnie Reda", + "Fish": "Ryba", + "VilePowder": "Plugawy proszek", + "IceBoomerang": "Lodowy bumerang", + "Keybrand": "Kluczowe cięcie", + "Cutlass": "Kordelas", + "TrueExcalibur": "Prawdziwy Excalibur", + "TrueNightsEdge": "Prawdziwe nocne ostrze", + "Frostbrand": "Mroźne cięcie", + "RedPotion": "Czerwona mikstura", + "TacticalShotgun": "Strzelba taktyczna", + "RottenChunk": "Zgniły kawałek", + "IvyChest": "Kufer pokryty bluszczem", + "Marrow": "Szpik kostny", + "UnholyTrident": "Nieświęty trójząb", + "FrostHelmet": "Mroźny hełm", + "FrostBreastplate": "Lodowy napierśnik", + "FrostLeggings": "Mroźne spodnie", + "TinHelmet": "Cynowy hełm", + "TinChainmail": "Cynowa kolczuga", + "TinGreaves": "Cynowe nagolenniki", + "WormTooth": "Kieł robaka", + "LeadHelmet": "Ołowiany hełm", + "LeadChainmail": "Ołowiana kolczuga", + "LeadGreaves": "Ołowiane nagolenniki", + "TungstenHelmet": "Tungstenowy hełm", + "TungstenChainmail": "Tungstenowa kolczuga", + "TungstenGreaves": "Tungstenowe nagolenniki", + "PlatinumHelmet": "Platynowy hełm", + "PlatinumChainmail": "Platynowa kolczuga", + "PlatinumGreaves": "Platynowe nagolenniki", + "TinOre": "Ruda cyny", + "IronHammer": "Żelazny młot", + "WormFood": "Jedzenie dla robaków", + "LeadOre": "Ruda ołowiu", + "TungstenOre": "Ruda tungstenu", + "PlatinumOre": "Ruda platyny", + "TinBar": "Sztabka cyny", + "LeadBar": "Sztabka ołowiu", + "TungstenBar": "Sztabka tungstenu", + "PlatinumBar": "Sztabka platyny", + "TinWatch": "Cynowy zegarek", + "TungstenWatch": "Tungstenowy zegarek", + "PlatinumWatch": "Platynowy zegarek", + "CopperCoin": "Miedziana moneta", + "TinChandelier": "Cynowy żyrandol", + "TungstenChandelier": "Tungstenowy żyrandol", + "PlatinumChandelier": "Platynowy żyrandol", + "PlatinumCandle": "Platynowa świeca", + "PlatinumCandelabra": "Platynowa świecznik", + "PlatinumCrown": "Platynowa korona", + "LeadAnvil": "Ołowiane kowadło", + "TinBrick": "Cynowa cegła", + "TungstenBrick": "Tungstenowa cegła", + "PlatinumBrick": "Platynowa cegła", + "SilverCoin": "Srebrna moneta", + "TinBrickWall": "Ściana z cynowych cegieł", + "TungstenBrickWall": "Ściana z tungstenowych cegieł", + "PlatinumBrickWall": "Ściana z platynowych cegieł", + "BeamSword": "Miecz-promień", + "IceBlade": "Lodowe ostrze", + "IceBow": "Lodowy łuk", + "FrostStaff": "Mroźny kostur", + "WoodHelmet": "Drewniany hełm", + "WoodBreastplate": "Drewniany napierśnik", + "WoodGreaves": "Drewniane nagolenniki", + "GoldCoin": "Złota moneta", + "EbonwoodHelmet": "Hełm z drewna ebonowego", + "EbonwoodBreastplate": "Napierśnik z drewna ebonowego", + "EbonwoodGreaves": "Nagolenniki z drewna ebonowego", + "RichMahoganyHelmet": "Mahoniowy hełm", + "RichMahoganyBreastplate": "Mahoniowy napierśnik", + "RichMahoganyGreaves": "Mahoniowe nagolenniki", + "PearlwoodHelmet": "Hełm z drewna perłowego", + "PearlwoodBreastplate": "Napierśnik z drewna perłowego", + "PearlwoodGreaves": "Nagolenniki z drewna perłowego", + "AmethystStaff": "Ametystowy kostur", + "PlatinumCoin": "Platynowa moneta", + "TopazStaff": "Topazowy kostur", + "SapphireStaff": "Szafirowy kostur", + "EmeraldStaff": "Szmaragdowy kostur", + "RubyStaff": "Rubinowy kostur", + "DiamondStaff": "Diamentowy kostur", + "GrassWall": "Trawiasta ściana", + "JungleWall": "Ściana z dżungli", + "FlowerWall": "Kwiecista ściana", + "Jetpack": "Jetpack", + "ButterflyWings": "Motyle skrzydła", + "FallenStar": "Gwiazda z nieba", + "CactusWall": "Kaktusowa ściana", + "Cloud": "Chmura", + "CloudWall": "Ściana z chmur", + "Seaweed": "Wodorosty", + "RuneHat": "Kapelusz runiczny", + "RuneRobe": "Szata runiczna", + "MushroomSpear": "Włócznia grzybowa", + "TerraBlade": "Terraostrze", + "GrenadeLauncher": "Wyrzutnia granatów", + "RocketLauncher": "Wyrzutnia rakiet", + "CopperGreaves": "Miedziane nagolenniki", + "ProximityMineLauncher": "Wyrzutnia min zbliżeniowych", + "FairyWings": "Skrzydła duszka", + "SlimeBlock": "Blok szlamu", + "FleshBlock": "Blok mięsa", + "MushroomWall": "Grzybowa ściana", + "RainCloud": "Chmura deszczowa", + "BoneBlock": "Blok kości", + "FrozenSlimeBlock": "Blok zamarzniętego szlamu", + "BoneBlockWall": "Ściana z bloków kości", + "SlimeBlockWall": "Ściana z bloków szlamu", + "IronGreaves": "Żelazne nagolenniki", + "FleshBlockWall": "Ściana z bloków mięsa", + "RocketI": "Rakieta I", + "RocketII": "Rakieta II", + "RocketIII": "Rakieta III", + "RocketIV": "Rakieta IV", + "AsphaltBlock": "Blok asfaltowy", + "CobaltPickaxe": "Kobaltowy kilof", + "MythrilPickaxe": "Mithrilowy kilof", + "AdamantitePickaxe": "Adamantytowy kilof", + "Clentaminator": "Czyściciel-skaziciel", + "SilverGreaves": "Srebrne nagolenniki", + "GreenSolution": "Zielony roztwór", + "BlueSolution": "Niebieski roztwór", + "PurpleSolution": "Fioletowy roztwór", + "DarkBlueSolution": "Ciemnoniebieski roztwór", + "RedSolution": "Czerwony roztwór", + "HarpyWings": "Skrzydła harpii", + "BoneWings": "Kościane skrzydła", + "Hammush": "Grzybomłot", + "NettleBurst": "Wybuch pokrzywy", + "AnkhBanner": "Sztandar ankh", + "GoldGreaves": "Złote nagolenniki", + "SnakeBanner": "Sztandar węża", + "OmegaBanner": "Sztandar omega", + "CrimsonHelmet": "Szkarłatny hełm", + "CrimsonScalemail": "Szkarłatna zbroja łuskowa", + "CrimsonGreaves": "Szkarłatne nagolenniki", + "BloodButcherer": "Krwawa rzeź", + "TendonBow": "Łuk ze ścięgien", + "FleshGrinder": "Ubijak mięsa", + "DeathbringerPickaxe": "Kilof zguby", + "BloodLustCluster": "Żądza krwi", + "Torch": "Pochodnia", + "CopperChainmail": "Miedziana kolczuga", + "TheUndertaker": "Grabarz", + "TheMeatball": "Klopsik", + "TheRottedFork": "Zbutwiałe widły", + "LivingWoodChair": "Krzesło z żyjącego drewna", + "CactusChair": "Kaktusowe krzesło", + "BoneChair": "Kościane krzesło", + "FleshChair": "Krzesło z mięsa", + "IronChainmail": "Żelazna kolczuga", + "MushroomChair": "Grzybowe krzesło", + "BoneWorkBench": "Kościany stół warsztatowy", + "CactusWorkBench": "Kaktusowy stół warsztatowy", + "FleshWorkBench": "Stół warsztatowy z mięsa", + "MushroomWorkBench": "Grzybowy stół warsztatowy", + "SlimeWorkBench": "Szlamowy stół warsztatowy", + "CactusDoor": "Kaktusowe drzwi", + "FleshDoor": "Mięsne drzwi", + "MushroomDoor": "Grzybowe drzwi", + "LivingWoodDoor": "Drzwi z żyjącego drewna", + "SilverChainmail": "Srebrna kolczuga", + "BoneDoor": "Kościane drzwi", + "FlameWings": "Płomienne skrzydła", + "FrozenWings": "Zamarznięte skrzydła", + "GhostWings": "Widmowe skrzydła", + "SunplateBlock": "Blok płyt słonecznych", + "DiscWall": "Ściana z dysków", + "SkywareChair": "Niebiańskie krzesło", + "BoneTable": "Kościany stół", + "FleshTable": "Stół z mięsa", + "LivingWoodTable": "Stół z żyjącego drewna", + "GoldChainmail": "Złota kolczuga", + "SkywareTable": "Niebiański stół", + "LivingWoodChest": "Kufer z żyjącego drewna", + "LivingWoodWand": "Różdżka z żyjącego drewna", + "PurpleIceBlock": "Fioletowy blok lodu", + "PinkIceBlock": "Różowy blok lodu", + "RedIceBlock": "Czerwony blok lodu", + "CrimstoneBlock": "Szkarłatny blok", + "SkywareDoor": "Niebiańskie drzwi", + "SkywareChest": "Niebiański kufer", + "SteampunkHat": "Czapka steampunkowa", + "GrapplingHook": "Hak wspinaczkowy", + "SteampunkShirt": "Steampunkowa koszulka", + "SteampunkPants": "Steampunkowe spodnie", + "BeeHat": "Pszczela czapka", + "BeeShirt": "Pszczela koszulka", + "BeePants": "Pszczele spodnie", + "WorldBanner": "Sztandar świata", + "SunBanner": "Sztandar słońca", + "GravityBanner": "Sztandar grawitacji", + "PharaohsMask": "Maska faraona", + "Actuator": "Siłownik", + "Chain": "Łańcuch", + "BlueWrench": "Niebieski klucz", + "GreenWrench": "Zielony klucz", + "BluePressurePlate": "Niebieska płyta dociskowa", + "YellowPressurePlate": "Żółta płyta dociskowa", + "DiscountCard": "Karta rabatowa", + "LuckyCoin": "Szczęśliwa moneta", + "UnicornonaStick": "Jednorożec na patyku", + "SandstorminaBottle": "Burza w butelce", + "BeachBall": "Piłka plażowa", + "ShadowScale": "Łuska cienia", + "CharmofMyths": "Talizman mitów", + "MoonShell": "Księżycowa skorupa", + "StarVeil": "Zasłona gwiazd", + "WaterWalkingBoots": "Buty wodnego kroku", + "Tiara": "Tiara", + "PrincessDress": "Sukienka księżniczki", + "PharaohsRobe": "Szata faraona", + "GreenCap": "Zielona czapka", + "MushroomCap": "Grzybowa czapka", + "TamOShanter": "Tam O' Shanter", + "PiggyBank": "Świnka skarbonka", + "MummyMask": "Maska mumii", + "MummyShirt": "Koszulka mumii", + "MummyPants": "Spodnie mumii", + "CowboyHat": "Kowbojski kapelusz", + "CowboyJacket": "Kowbojska kurtka", + "CowboyPants": "Kowbojskie spodnie", + "PirateHat": "Piracki kapelusz", + "PirateShirt": "Piracka koszulka", + "PiratePants": "Pirackie spodnie", + "VikingHelmet": "Hełm wikingów", + "MiningHelmet": "Górniczy hełm", + "CrimtaneOre": "Szkarłatna ruda", + "CactusSword": "Kaktusowy miecz", + "CactusPickaxe": "Kaktusowy kilof", + "IceBrick": "Lodowa cegła", + "IceBrickWall": "Ściana z lodowych cegieł", + "AdhesiveBandage": "Plaster", + "ArmorPolish": "Pasta do zbroi", + "Bezoar": "Bezoar", + "Blindfold": "Przepaska na oczy", + "FastClock": "Śpieszący zegar", + "CopperHelmet": "Miedziany hełm", + "Megaphone": "Megafon", + "Nazar": "Nazar", + "Vitamins": "Witaminy", + "TrifoldMap": "Składana mapa", + "CactusHelmet": "Kaktusowy hełm", + "CactusBreastplate": "Kaktusowy napierśnik", + "CactusLeggings": "Kaktusowe spodnie", + "PowerGlove": "Rękawica mocy", + "LightningBoots": "Buty błyskawic", + "SunStone": "Słoneczny kamień", + "Wood": "Drewno", + "IronHelmet": "Żelazny hełm", + "MoonStone": "Księżycowy kamień", + "ArmorBracing": "Klamra do zbroi", + "MedicatedBandage": "Plaster leczniczy", + "ThePlan": "Plan", + "CountercurseMantra": "Mantra przeciw klątwom", + "CoinGun": "Pistolet monetowy", + "LavaCharm": "Wisior lawy", + "ObsidianWaterWalkingBoots": "Obsydianowe buty wodnego kroku", + "LavaWaders": "Ogniołazy", + "PureWaterFountain": "Fontanna z czystą wodą", + "SilverHelmet": "Srebrny hełm", + "DesertWaterFountain": "Fontanna z wodą pustynną", + "Shadewood": "Drewno mroku", + "ShadewoodDoor": "Drzwi z drewna mroku", + "ShadewoodPlatform": "Platforma z drewna mroku", + "ShadewoodChest": "Kufer z drewna mroku", + "ShadewoodChair": "Krzesło z drewna mroku", + "ShadewoodWorkBench": "Stół warsztatowy z drewna mroku", + "ShadewoodTable": "Stół z drewna mroku", + "ShadewoodDresser": "Komoda z drewna mroku", + "ShadewoodPiano": "Pianino z drewna mroku", + "GoldHelmet": "Złoty hełm", + "ShadewoodBed": "Łóżko z drewna mroku", + "ShadewoodSword": "Miecz z drewna mroku", + "ShadewoodHammer": "Młot z drewna mroku", + "ShadewoodBow": "Łuk z drewna mroku", + "ShadewoodHelmet": "Hełm z drewna mroku", + "ShadewoodBreastplate": "Napierśnik z drewna mroku", + "ShadewoodGreaves": "Nagolenniki z drewna mroku", + "ShadewoodWall": "Ściana z drewna mroku", + "Cannon": "Armata", + "Cannonball": "Kula armatnia", + "WoodWall": "Drewniana ściana", + "FlareGun": "Pistolet sygnałowy", + "Flare": "Flara", + "BoneWand": "Kościana różdżka", + "LeafWand": "Liściasta różdżka", + "FlyingCarpet": "Latający dywan", + "AvengerEmblem": "Symbol mściciela", + "MechanicalGlove": "Mechaniczna rękawica", + "LandMine": "Mina lądowa", + "PaladinsShield": "Tarcza paladyna", + "WebSlinger": "Pajęczak", + "WoodPlatform": "Drewniana platforma", + "JungleWaterFountain": "Fontanna z wodą z dżungli", + "IcyWaterFountain": "Fontanna z lodowatą wodą", + "CorruptWaterFountain": "Fontanna z zepsutą wodą", + "CrimsonWaterFountain": "Fontanna ze szkarłatną wodą", + "HallowedWaterFountain": "Bajkowa fontanna", + "BloodWaterFountain": "Fontanna z niebieską wodą", + "Umbrella": "Parasol", + "ChlorophyteOre": "Zielenicowa ruda", + "SteampunkWings": "Steampunkowe skrzydła", + "Snowball": "Śnieżka", + "FlintlockPistol": "Pistolet skałkowy", + "IceSkates": "Łyżwy", + "SnowballLauncher": "Wyrzutnia śnieżek", + "WebCoveredChest": "Kufer pokryty pajęczyną", + "ClimbingClaws": "Pazury wspinaczkowe", + "AncientIronHelmet": "Starożytny, żelazny hełm", + "AncientGoldHelmet": "Starożytny, złoty hełm", + "AncientShadowHelmet": "Starożytny hełm cienia", + "AncientShadowScalemail": "Starożytna zbroja łuskowa cienia", + "AncientShadowGreaves": "Starożytne nagolenniki cienia", + "AncientNecroHelmet": "Starożytny hełm nekromantyczny", + "Musket": "Muszkiet", + "AncientCobaltHelmet": "Starożytny hełm kobaltowy", + "AncientCobaltBreastplate": "Starożytny kobaltowy napierśnik", + "AncientCobaltLeggings": "Starożytne kobaltowe spodnie", + "BlackBelt": "Czarny pas", + "Boomstick": "Pukawka", + "Rope": "Lina", + "Campfire": "Ognisko", + "Marshmallow": "Pianka", + "MarshmallowonaStick": "Pianka na patyku", + "CookedMarshmallow": "Przyrządzona pianka", + "MusketBall": "Kula muszkietowa", + "RedRocket": "Czerwona rakieta", + "GreenRocket": "Zielona rakieta", + "BlueRocket": "Niebieska rakieta", + "YellowRocket": "Żółta rakieta", + "IceTorch": "Lodowa pochodnia", + "ShoeSpikes": "Kolce do butów", + "TigerClimbingGear": "Tygrysi sprzęt wspinaczkowy", + "Tabi": "Tabi", + "Minishark": "Minirekin", + "PinkThread": "Różowa nić", + "ManaRegenerationBand": "Opaska regeneracji many", + "SandstorminaBalloon": "Burza w balonie", + "MasterNinjaGear": "Sprzęt mistrza ninjutsu", + "RopeCoil": "Zwinięta lina", + "Blowgun": "Dmuchawiec", + "BlizzardinaBottle": "Zamieć w butelce", + "FrostburnArrow": "Strzała mrozognia", + "EnchantedSword": "Zaklęty miecz", + "IronBow": "Żelazny łuk", + "PickaxeAxe": "Kilofotopór", + "CobaltWaraxe": "Kobaltowy topór wojenny", + "MythrilWaraxe": "Mithrilowy topór wojenny", + "AdamantiteWaraxe": "Adamantytowy topór wojenny", + "EatersBone": "Kość pożeracza", + "BlendOMatic": "BetOniarka", + "MeatGrinder": "Maszynka do mięsa", + "Extractinator": "Ekstraktator", + "Solidifier": "Tężarka", + "Amber": "Bursztyn", + "AcidDye": "Kwasowy barwnik", + "ActuationAccessory": "Automat do siłowników", + "ActuationRod": "Kostur siłownikowy", + "AlchemyTable": "Stół alchemiczny", + "AlphabetStatue0": "'0' Posąg", + "AlphabetStatue1": "'1' Posąg", + "AlphabetStatue2": "'2' Posąg", + "AlphabetStatue3": "'3' Posąg", + "AlphabetStatue4": "'4' Posąg", + "AlphabetStatue5": "'5' Posąg", + "AlphabetStatue6": "'6' Posąg", + "AlphabetStatue7": "'7' Posąg", + "AlphabetStatue8": "'8' Posąg", + "AlphabetStatue9": "'9' Posąg", + "AlphabetStatueA": "'A' Posąg", + "AlphabetStatueB": "'B' Posąg", + "AlphabetStatueC": "'C' Posąg", + "AlphabetStatueD": "'D' Posąg", + "AlphabetStatueE": "'E' Posąg", + "AlphabetStatueF": "'F' Posąg", + "AlphabetStatueG": "'G' Posąg", + "AlphabetStatueH": "'H' Posąg", + "AlphabetStatueI": "'I' Posąg", + "AlphabetStatueJ": "'J' Posąg", + "AlphabetStatueK": "'K' Posąg", + "AlphabetStatueL": "'L' Posąg", + "AlphabetStatueM": "'M' Posąg", + "AlphabetStatueN": "'N' Posąg", + "AlphabetStatueO": "'O' Posąg", + "AlphabetStatueP": "'P' Posąg", + "AlphabetStatueQ": "'Q' Posąg", + "AlphabetStatueR": "'R' Posąg", + "AlphabetStatueS": "'S' Posąg", + "AlphabetStatueT": "'T' Posąg", + "AlphabetStatueU": "'U' Posąg", + "AlphabetStatueV": "'V' Posąg", + "AlphabetStatueW": "'W' Posąg", + "AlphabetStatueX": "'X' Posąg", + "AlphabetStatueY": "'Y' Posąg", + "AlphabetStatueZ": "'Z' Posąg", + "Amarok": "Amarok", + "AmberGemsparkWall": "Ściana z bursztynowych bloków świecących", + "AmberGemsparkWallOff": "Nieaktywna ściana z bursztynowych bloków świecących", + "AmberStaff": "Bursztynowy kostur", + "AmethystGemsparkWall": "Ściana z ametystowych bloków świecących", + "AmethystGemsparkWallOff": "Nieaktywna ściana z ametystowych bloków świecących", + "AncientArmorHat": "Starożytne nakrycie głowy", + "AncientArmorPants": "Starożytne buty", + "AncientArmorShirt": "Starożytne odzienie", + "AncientBattleArmorHat": "Zakazana maska", + "AncientBattleArmorMaterial": "Zakazany element", + "AncientBattleArmorPants": "Zakazane nici", + "AncientBattleArmorShirt": "Zakazane szaty", + "AncientCloth": "Starożytne płótno", + "AncientHorn": "Starożytny róg", + "AnglerTackleBag": "Torba Wędkarza", + "AngryBonesBanner": "Sztandar złościotrupa", + "AnnouncementBox": "Automat ogłoszeniowy", + "AntiGravityHook": "Hak antygrawitacyjny", + "AntlionClaw": "Ostrze żuchwowe", + "ApprenticeBait": "Uczniowska przynęta", + "ApprenticeHat": "Uczniowski kapelusz", + "ApprenticeRobe": "Uczniowska szata", + "ApprenticeScarf": "Uczniowski szal", + "ApprenticeTrousers": "Uczniowskie spodnie", + "ArchitectGizmoPack": "Zestaw ustrojstw architekta", + "Arkhalis": "Arkhalis", + "AviatorSunglasses": "Pilotki 0x33", + "Bacon": "Bekon", + "BalloonHorseshoeFart": "Zielony balon z podkową", + "BalloonHorseshoeHoney": "Bursztynowy balon z podkową", + "BalloonHorseshoeSharkron": "Różowy balon z podkową", + "BalloonPufferfish": "Balonowa rozdymka", + "BeeMask": "Maska Królowej Pszczół", + "BeesKnees": "Pszczał", + "BejeweledValkyrieBody": "Peleryna walkirii Lazure’a", + "BejeweledValkyrieHead": "Diadem walkirii Lazure’a", + "BejeweledValkyrieWing": "Latająca platforma Lazure’a", + "BewitchingTable": "Urzekający stół", + "BlackAndWhiteDye": "Czarno-biały barwnik", + "BlackCounterweight": "Czarna przeciwwaga", + "BlackString": "Czarny sznurek", + "Bladetongue": "Ostry język", + "BlessedApple": "Błogosławione jabłko", + "BlinkrootPlanterBox": "Planterowa skrzynka migotków", + "BloodWater": "Krwawa woda", + "BloodZombieBanner": "Sztandar krwawego zombie", + "BloodZombieStatue": "Posąg krwawego zombie", + "BlueAcidDye": "Niebieski, kwasowy barwnik", + "BlueCounterweight": "Niebieska przeciwwaga", + "BlueDungeonBathtub": "Niebieska wanna z lochu", + "BlueDungeonCandelabra": "Niebieski świecznik z lochu", + "BlueDungeonChandelier": "Niebieski żyrandol z lochu", + "BlueDungeonChest": "Niebieski kufer z lochu", + "BlueDungeonLamp": "Niebieska lampa z lochu", + "BlueDungeonSink": "Niebieska umywalka z lochu", + "BlueFlameAndSilverDye": "Barwnik niebieskiego płomienia i srebrny", + "BlueLunaticHood": "Kaptur księżycowego kultysty", + "BlueLunaticRobe": "Szata księżycowego kultysty", + "BluePhasesaber": "Niebieski miecz świetniejszy", + "BlueString": "Niebieski sznurek", + "BombFish": "Bombowa ryba", + "BoneArrow": "Kościana strzała", + "BoneBathtub": "Kościana wanna", + "BoneBed": "Kościane łóżko", + "BoneBookcase": "Kościana biblioteczka", + "BoneCampfire": "Kościane ognisko", + "BoneCandelabra": "Kościany świecznik", + "BoneChandelier": "Kościany żyrandol", + "BoneChest": "Kościany kufer", + "BoneClock": "Kościany zegar", + "BoneDagger": "Kościany nóż do rzucania", + "BoneGlove": "Kościana rękawica", + "BoneJavelin": "Kościany oszczep", + "BoneLamp": "Kościana lampa", + "BoneLantern": "Kościany lampion", + "BoneRattle": "Kościana grzechotka", + "BoneSink": "Kościana umywalka", + "BoneSkeletonStatue": "Posąg kościstego szkieletu", + "BoneTorch": "Kościana pochodnia", + "BoosterTrack": "Tor przyśpieszający", + "BorealWood": "Drewno borealne", + "BorealWoodBathtub": "Wanna z drewna borealnego", + "BorealWoodBed": "Łóżko z drewna borealnego", + "BorealWoodBookcase": "Biblioteczka z drewna borealnego", + "BorealWoodBow": "Łuk z drewna borealnego", + "BorealWoodBreastplate": "Napierśnik z drewna borealnego", + "BorealWoodCandelabra": "Świecznik z drewna borealnego", + "BorealWoodCandle": "Świeca z drewna borealnego", + "BorealWoodChair": "Krzesło z drewna borealnego", + "BorealWoodChandelier": "Żyrandol z drewna borealnego", + "BorealWoodChest": "Kufer z drewna borealnego", + "BorealWoodClock": "Zegar z drewna borealnego", + "BorealWoodDoor": "Drzwi z drewna borealnego", + "BorealWoodDresser": "Komoda z drewna borealnego", + "BorealWoodFence": "Płot z drewna borealnego", + "BorealWoodGreaves": "Nagolenniki z drewna borealnego", + "BorealWoodHammer": "Młot z drewna borealnego", + "BorealWoodHelmet": "Hełm z drewna borealnego", + "BorealWoodLamp": "Lampa z drewna borealnego", + "BorealWoodLantern": "Lampion z drewna borealnego", + "BorealWoodPiano": "Pianino z drewna borealnego", + "BorealWoodPlatform": "Platforma z drewna borealnego", + "BorealWoodSink": "Umywalka z drewna borealnego", + "BorealWoodSofa": "Kanapa z drewna borealnego", + "BorealWoodSword": "Miecz z drewna borealnego", + "BorealWoodTable": "Stół z drewna borealnego", + "BorealWoodWall": "Ściana z drewna borealnego", + "BorealWoodWorkBench": "Stół warsztatowy z drewna borealnego", + "BossMaskMoonlord": "Maska Księżycowego Władcy", + "BottomlessBucket": "Bezdenne wiadro wody", + "BouncyBomb": "Skacząca bomba", + "BouncyDynamite": "Skaczący dynamit", + "BouncyGlowstick": "Skaczący świetlik", + "BouncyGrenade": "Skaczący granat", + "BrainMask": "Maska Mózgu Cthulhu", + "BrainOfConfusion": "Mózg chaosu", + "BrainOfCthulhuBossBag": "Torba skarbów", + "BrainScrambler": "Mąciciel", + "BrightBrownDye": "Jasnobrązowy barwnik", + "BrightSilverDye": "Jasnosrebrny barwnik", + "BrownAndBlackDye": "Brązowo-czarny barwnik", + "BrownAndSilverDye": "Brązowo-srebrny barwnik", + "BrownDye": "Brązowy barwnik", + "BrownString": "Brązowy sznurek", + "Bubble": "Bańka", + "BubbleGun": "Bańkostrzał", + "BuccaneerBandana": "Chusta korsarza", + "BuccaneerPants": "Pantalony korsarza", + "BuccaneerShirt": "Tunika korsarza", + "Buggy": "Łazik", + "BuggyStatue": "Posąg łazika", + "BunnyfishTrophy": "Trofeum – królicza ryba", + "BurningHadesDye": "Płonący barwnik", + "ButcherBanner": "Sztandar rzeźnika", + "ButchersChainsaw": "Piła łańcuchowa rzeźnika", + "ButterflyStatue": "Posąg motyla", + "CactusBathtub": "Kaktusowa wanna", + "CactusBed": "Kaktusowe łóżko", + "CactusBookcase": "Kaktusowa biblioteczka", + "CactusCandelabra": "Kaktusowy świecznik", + "CactusCandle": "Kaktusowa świeca", + "CactusChandelier": "Kaktusowy żyrandol", + "CactusChest": "Kaktusowy kufer", + "CactusClock": "Kaktusowy zegar", + "CactusLamp": "Kaktusowa lampa", + "CactusLantern": "Kaktusowy lampion", + "CactusPlatform": "Kaktusowa platforma", + "CactusSink": "Kaktusowa umywalka", + "CactusTable": "Kaktusowy stół", + "CageBuggy": "Klatka dla łazika", + "CageEnchantedNightcrawler": "Klatka dla zaczarowanych, nocnych pełzaków", + "CageGrubby": "Klatka dla parszywka", + "CageSluggy": "Klatka dla leniwka", + "Cascade": "Kaskada", + "CelestialShell": "Niebiańska skorupa", + "CelestialSigil": "Niebiańska pieczęć", + "CellPhone": "Telefon komórkowy", + "ChainGuillotines": "Gilotyny łańcuchowe", + "ChargedBlasterCannon": "Naładowany blaster armatni", + "Chik": "Chik", + "Chimney": "Komin", + "ChlorophyteBrick": "Zielenicowa cegła", + "ChlorophyteBrickWall": "Ściana z zielenicowych cegieł", + "ChlorophyteDye": "Zielenicowy barwnik", + "ClingerStaff": "Kostur chwytaka", + "ClothierJacket": "Kurtka Kuśnierza", + "ClothierPants": "Spodnie Kuśnierza", + "Code1": "Code 1", + "Code2": "Code 2", + "CogWall": "Ściana z trybików", + "CoinRing": "Pierścień monetowy", + "CompanionCube": "Kostka towarzysząca", + "CompassRose": "Róża wiatrów", + "ConfettiBlock": "Blok konfetti", + "ConfettiBlockBlack": "Blok północnego konfetti", + "ConfettiCannon": "Armata konfetti", + "ConfettiWall": "Ściana konfetti", + "ConfettiWallBlack": "Północna ściana konfetti", + "ConveyorBeltLeft": "Taśmociąg (zgodny z ruchem zegara)", + "ConveyorBeltRight": "Taśmociąg (przeciwny do ruchu zegara)", + "CordageGuide": "Przewodnik po linach z włókna roślinnego", + "CorruptFishingCrate": "Zepsuta skrzynia", + "CorruptHardenedSand": "Utwardzony blok piasku ebonowego", + "CorruptHardenedSandWall": "Utwardzona ściana z piasku ebonowego", + "CorruptPlanterBox": "Planterowa skrzynka chwastozgonów", + "CorruptSandstone": "Blok ebonowego kamienia piaskowego", + "CorruptSandstoneWall": "Ściana z ebonowego kamienia piaskowego", + "CorruptYoyo": "Niemoc", + "CosmicCarKey": "Klucz do kosmicznego samochodu", + "CrawdadBanner": "Sztandar raka", + "CreatureFromTheDeepBanner": "Sztandar potwora z głębin", + "CrimsonFishingCrate": "Szkarłatna skrzynia", + "CrimsonHardenedSand": "Utwardzony szkarłatny blok", + "CrimsonHardenedSandWall": "Utwardzona szkarłatna ściana", + "CrimsonHeart": "Szkarłatne serce", + "CrimsonPlanterBox": "Planterowa skrzynka chwastozgonów", + "CrimsonSandstone": "Blok szkarłatnego kamienia piaskowego", + "CrimsonSandstoneWall": "Ściana ze szkarłatnego kamienia piaskowego", + "CrimsonYoyo": "Tętnica", + "CrimtaneBrick": "Szkarłatna cegła", + "CrimtaneBrickWall": "Ściana ze szkarłatnych cegieł", + "CrystalBlock": "Kryształowy blok", + "CrystalBlockWall": "Ścian z kryształowych bloków", + "CrystalDart": "Kryształowa strzałka", + "CrystalSerpent": "Kryształowy wąż", + "CrystalVileShard": "Plugawy, kryształowy odłamek", + "CultistBossBag": "Torba skarbów", + "CursedCampfire": "Przeklęte ognisko", + "CursedDart": "Przeklęta strzałka", + "CyanString": "Cyjanowy sznurek", + "DaedalusStormbow": "Łuk burzowy Dedala", + "DarkMummyBanner": "Sztandar mrocznej mumii", + "DartPistol": "Pistolet strzałkowy", + "DartRifle": "Karabin strzałkowy", + "DayBloomPlanterBox": "Planterowa skrzynka dziennicy", + "DayBreak": "Świt", + "DeadlySphereBanner": "Sztandar zabójczej kuli", + "DeadlySphereStaff": "Kostur zabójczej kuli", + "DefenderMedal": "Medal obrońcy", + "DefendersForge": "Kuźnia obrońcy", + "DemonCampfire": "Demoniczne ognisko", + "DemonHeart": "Demoniczne serce", + "DesertBasiliskBanner": "Sztandar bazyliszka", + "DesertDjinnBanner": "Sztandar ducha pustynnego", + "DesertFossil": "Pustynna skamielina", + "DesertFossilWall": "Ściana z pustynnych skamielin", + "DesertGhoulBanner": "Sztandar ghula", + "DesertLamiaBanner": "Sztandar lamii", + "DestroyerBossBag": "Torba skarbów", + "DestroyerMask": "Maska niszczyciela", + "Detonator": "Detonator", + "DiamondGemsparkWall": "Ściana z diamentowych bloków świecących", + "DiamondGemsparkWallOff": "Nieaktywna ściana z diamentowych bloków świecących", + "DjinnLamp": "Lampa ducha pustynnego", + "DjinnsCurse": "Klątwa dżina", + "DPSMeter": "Licznik obrażeń na sekundę", + "DrillContainmentUnit": "Osłona świdra", + "DripplerBanner": "Sztandar cieknącego", + "DripplerStatue": "Posąg cieknącego", + "DrManFlyBanner": "Sztandar dr. Ludzkiej Muchy", + "DuckStatue": "Posąg kaczki", + "DukeFishronMask": "Maska Księcia Ryboka", + "DukeFishronTrophy": "Trofeum – Książę Rybok", + "DuneSplicerBanner": "Sztandar penetratora diun", + "DungeonFishingCrate": "Skrzynia z lochu", + "DyeTradersScimitar": "Egzotyczny bułat", + "DyeTraderTurban": "Turban handlarza barwnikami", + "DynastyBathtub": "Wanna dynastii", + "DynastyBed": "Łóżko dynastii", + "DynastyBookcase": "Biblioteczka dynastii", + "DynastyBowl": "Miska dynastii", + "DynastyCandelabra": "Wielka świeca dynastii", + "DynastyCandle": "Świeca dynastii", + "DynastyChair": "Krzesło dynastii", + "DynastyChandelier": "Wielki lampion dynastii", + "DynastyChest": "Kufer dynastii", + "DynastyClock": "Zegar dynastii", + "DynastyCup": "Puchar dynastii", + "DynastyLamp": "Lampa dynastii", + "DynastyLantern": "Lampion dynastii", + "DynastySink": "Umywalka dynastii", + "DynastyWorkBench": "Stół warsztatowy dynastii", + "EaterMask": "Maska Pożeracza Światów", + "EaterOfWorldsBossBag": "Torba skarbów", + "EbonwoodBathtub": "Wanna z drewna ebonowego", + "EbonwoodBookcase": "Biblioteczka z drewna ebonowego", + "EbonwoodCandelabra": "Świecznik z drewna ebonowego", + "EbonwoodCandle": "Świeca z drewna ebonowego", + "EbonwoodChandelier": "Żyrandol z drewna ebonowego", + "EbonwoodClock": "Zegar z drewna ebonowego", + "EbonwoodLamp": "Lampa z drewna ebonowego", + "EbonwoodLantern": "Lampion z drewna ebonowego", + "EbonwoodSink": "Umywalka z drewna ebonowego", + "ElectrosphereLauncher": "Wyrzutnia elektrosfer", + "EmeraldGemsparkWall": "Ściana ze szmaragdowych bloków świecących", + "EmeraldGemsparkWallOff": "Nieaktywna ściana ze szmaragdowych bloków świecących", + "EmptyDropper": "Pusty zakraplacz", + "EnchantedNightcrawler": "Zaczarowany, nocny pełzak", + "EndlessMusketPouch": "Bezkresna sakiewka muszkietowa", + "EndlessQuiver": "Bezkresny kołczan", + "EngineeringHelmet": "Hełm inżynierski", + "EoCShield": "Tarcza Cthulhu", + "EyeMask": "Maska Oka Cthulhu", + "EyeOfCthulhuBossBag": "Torba skarbów", + "Fake_BlueDungeonChest": "Pułapka: Niebieski kufer z lochu", + "Fake_BoneChest": "Pułapka: Kościany kufer", + "Fake_BorealWoodChest": "Pułapka: Kufer z drewna borealnego", + "Fake_CactusChest": "Pułapka: Kaktusowy kufer", + "Fake_Chest": "Pułapka: Kufer", + "Fake_CorruptionChest": "Pułapka: Kufer zepsucia", + "Fake_CrimsonChest": "Pułapka: Kufer szkarłatu", + "Fake_DynastyChest": "Pułapka: Kufer dynastii", + "Fake_EbonwoodChest": "Pułapka: Kufer z drewna ebonowego", + "Fake_FleshChest": "Pułapka: Mięsisty kufer", + "Fake_GlassChest": "Pułapka: Szklany kufer", + "Fake_GoldChest": "Pułapka: Złoty kufer", + "Fake_GraniteChest": "Pułapka: Granitowy kufer", + "Fake_GreenDungeonChest": "Pułapka: Zielony kufer z lochu", + "Fake_HallowedChest": "Pułapka: Bajkowy kufer", + "Fake_HoneyChest": "Pułapka: Miodowy kufer", + "Fake_IvyChest": "Pułapka: Kufer pokryty bluszczem", + "Fake_JungleChest": "Pułapka: Kufer z dżungli", + "Fake_LihzahrdChest": "Pułapka: Jaszczuhrzy kufer", + "Fake_LivingWoodChest": "Pułapka: Kufer z żyjącego drewna", + "Fake_MarbleChest": "Pułapka: Marmurowy kufer", + "Fake_MartianChest": "Pułapka: Marsjański kufer", + "Fake_MeteoriteChest": "Pułapka: Meteorytowy kufer", + "Fake_MushroomChest": "Pułapka: Grzybowy kufer", + "Fake_ObsidianChest": "Pułapka: Obsydianowy kufer", + "Fake_PalmWoodChest": "Pułapka: Kufer z drewna palmowego", + "Fake_PearlwoodChest": "Pułapka: Kufer z drewna perłowego", + "Fake_PinkDungeonChest": "Pułapka: Różowy kufer z lochu", + "Fake_PumpkinChest": "Pułapka: Dyniowy kufer", + "Fake_RichMahoganyChest": "Pułapka: Kufer mahoniowy", + "Fake_ShadewoodChest": "Pułapka: Kufer z drewna mroku", + "Fake_ShadowChest": "Pułapka: Kufer cienia", + "Fake_SkywareChest": "Pułapka: Niebiański kufer", + "Fake_SlimeChest": "Pułapka: Szlamowy kufer", + "Fake_SpookyChest": "Pułapka: Straszny kufer", + "Fake_SteampunkChest": "Pułapka: Kufer steampunkowy", + "Fake_WaterChest": "Pułapka: Kufer wody", + "Fake_WebCoveredChest": "Pułapka: Kufer pokryty pajęczyną", + "FalconBlade": "Sokole ostrze", + "FallenTuxedoPants": "Spodnie upadłego smokingu", + "FallenTuxedoShirt": "Koszula upadłego smokingu", + "FancyDishes": "Wymyślne naczynia", + "FetidBaghnakhs": "Cuchnące bagh naka", + "FireBlossomPlanterBox": "Skrzynka planterowa ogniokwiatu", + "FireflyStatue": "Posąg iluminatora", + "Fireplace": "Kominek", + "FireworkFountain": "Fontanna fajerwerków", + "FireworksBox": "Pudełko fajerwerków", + "FireworksLauncher": "Sylwester", + "FishermansGuide": "Kieszonkowy przewodnik wędkarski", + "FishFinder": "Łowca ryb", + "FishronBossBag": "Torba skarbów", + "FishronWings": "Skrzydła ryboka", + "Flairon": "Rybocep", + "FlameAndSilverDye": "Ognistosrebrny barwnik", + "FleshBathtub": "Mięsista wanna", + "FleshBed": "Mięsiste łóżko", + "FleshBookcase": "Mięsista biblioteczka", + "FleshCandelabra": "Mięsisty świecznik", + "FleshCandle": "Mięsista świeca", + "FleshChandelier": "Mięsisty żyrandol", + "FleshChest": "Mięsisty kufer", + "FleshClock": "Mięsisty zegar", + "FleshDresser": "Mięsista komoda", + "FleshKnuckles": "Mięsiste kłykcie", + "FleshLamp": "Mięsista lampa", + "FleshLantern": "Mięsisty lampion", + "FleshMask": "Maska – Ściana Mięcha", + "FleshPiano": "Mięsiste pianino", + "FleshSink": "Mięsista umywalka", + "FleshSofa": "Mięsista kanapa", + "FloatingIslandFishingCrate": "Niebieska skrzynia", + "FlowerBoots": "Kwieciste buty", + "FlowerBoyHat": "Płatki słonecznika", + "FlowerBoyPants": "Dół słonecznika", + "FlowerBoyShirt": "Góra słonecznika", + "FlyingAntlionBanner": "Sztandar rojnika mrówkolwów", + "FlyingDutchmanTrophy": "Trofeum – Latający Holender", + "FlyingKnife": "Latający nóż", + "FormatC": "Format:C", + "FossilHelm": "Skamieniały hełm", + "FossilOre": "Solidna skamielina", + "FossilPants": "Skamieniałe nagolenniki", + "FossilShirt": "Skamieniała zbroja płytowa", + "FragmentNebula": "Fragment mgławicy", + "FragmentSolar": "Słoneczny fragment", + "FragmentStardust": "Fragment pyłu gwiezdnego", + "FragmentVortex": "Fragment wiru", + "FritzBanner": "Sztandar Fritza", + "FrogStatue": "Posąg żaby", + "FrostDaggerfish": "Mroźna ryba-piła", + "FrozenBathtub": "Zamarznięta wanna", + "FrozenBed": "Zamarznięte łóżko", + "FrozenBookcase": "Zamarznięta biblioteczka", + "FrozenCampfire": "Zamarznięte ognisko", + "FrozenCandelabra": "Zamarznięty świecznik", + "FrozenCandle": "Zamarznięta świeca", + "FrozenChair": "Zamarznięte krzesło", + "FrozenChandelier": "Zamarznięty żyrandol", + "FrozenClock": "Zamarznięty zegar", + "FrozenDoor": "Zamarznięte drzwi", + "FrozenLamp": "Zamarznięta lampa", + "FrozenLantern": "Zamarznięty lampion", + "FrozenPiano": "Zamarznięte pianino", + "FrozenSink": "Zamarznięta umywalka", + "FrozenSofa": "Zamarznięta kanapa", + "FrozenTable": "Zamarznięty stół", + "FrozenWorkBench": "Zamarznięty stół warsztatowy", + "FuzzyCarrot": "Puszysta marchewka", + "GelDye": "Żelowy barwnik", + "GemLockAmber": "Burszytnowy zasobnik klejnotów", + "GemLockAmethyst": "Ametystowy zasobnik klejnotów", + "GemLockDiamond": "Diamentowy zasobnik klejnotów", + "GemLockEmerald": "Szmaragdowy zasobnik klejnotów", + "GemLockRuby": "Rubinowy zasobnik klejnotów", + "GemLockSapphire": "Szafirowy zasobnik klejnotów", + "GemLockTopaz": "Topazowy zasobnik klejnotów", + "GenderChangePotion": "Mikstura zmiany płci", + "GeyserTrap": "Gejzer", + "GiantShellyBanner": "Sztandar wielkiego Shelly’ego", + "GladiatorBreastplate": "Napierśnik gladiatora", + "GladiatorHelmet": "Hełm gladiatora", + "GladiatorLeggings": "Spodnie gladiatora", + "GlassBathtub": "Szklana wanna", + "GlassBookcase": "Szklana biblioteczka", + "GlassBowl": "Szklana miska", + "GlassCandelabra": "Szklany świecznik", + "GlassCandle": "Szklana świeca", + "GlassChandelier": "Szklany żyrandol", + "GlassChest": "Szklany kufer", + "GlassClock": "Szklany zegar", + "GlassDresser": "Szklana komoda", + "GlassLamp": "Szklana lampa", + "GlassLantern": "Szklany lampion", + "GlassPiano": "Szklane pianino", + "GlassSink": "Szklana umywalka", + "GlassWorkBench": "Szklany stół warsztatowy", + "GoblinSummonerBanner": "Sztandar goblińskiego przywoływacza", + "GoblinTech": "Gobliński aparat", + "GoldBird": "Złoty ptak", + "GoldBirdCage": "Klatka dla złotych ptaków", + "GoldBunny": "Złoty króliczek", + "GoldBunnyCage": "Klatka dla złotych króliczków", + "GoldButterfly": "Złoty motyl", + "GoldButterflyCage": "Słoik na złote motyle", + "GoldenBathtub": "Złota wanna", + "GoldenBookcase": "Złota biblioteczka", + "GoldenBugNet": "Złota siatka na robaki", + "GoldenCandelabra": "Złoty świecznik", + "GoldenCandle": "Złota świeca", + "GoldenChandelier": "Złoty żyrandol", + "GoldenClock": "Złoty zegar", + "GoldenLamp": "Złota lampa", + "GoldenLantern": "Złoty lampion", + "GoldenSink": "Złota umywalka", + "GoldfishTrophy": "Trofeum – złota rybka", + "GoldFrog": "Złota żaba", + "GoldFrogCage": "Klatka dla złotych żab", + "GoldGrasshopper": "Złoty konik polny", + "GoldGrasshopperCage": "Klatka dla złotych koników polnych", + "GoldMouse": "Złota mysz", + "GoldMouseCage": "Klatka dla złotych myszy", + "GoldRing": "Złoty pierścień", + "GoldWorm": "Złoty robak", + "GoldWormCage": "Klatka dla złotych robaków", + "GolemBossBag": "Torba skarbów", + "GolemMask": "Maska golema", + "Gradient": "Gradient", + "Granite": "Blok granitu", + "GraniteBathtub": "Granitowa wanna", + "GraniteBed": "Granitowe łóżko", + "GraniteBlock": "Blok gładkiego granitu", + "GraniteBlockWall": "Ściana z gładkiego granitu", + "GraniteBookcase": "Granitowa biblioteczka", + "GraniteCandelabra": "Granitowy świecznik", + "GraniteCandle": "Granitowa świeca", + "GraniteChair": "Granitowe krzesło", + "GraniteChandelier": "Granitowy żyrandol", + "GraniteChest": "Granitowy kufer", + "GraniteClock": "Granitowy zegar", + "GraniteDoor": "Granitowe drzwi", + "GraniteDresser": "Granitowa komoda", + "GraniteFlyerBanner": "Sztandar granitowego żywiołaka", + "GraniteGolemStatue": "Posąg granitowego golema", + "GraniteLamp": "Granitowa lampa", + "GraniteLantern": "Granitowy lampion", + "GranitePiano": "Granitowy fortepian", + "GranitePlatform": "Granitowa platforma", + "GraniteSink": "Granitowa umywalka", + "GraniteSofa": "Granitowa kanapa", + "GraniteTable": "Granitowy stół", + "GraniteWall": "Granitowa ściana", + "GraniteWorkBench": "Granitowy stół warsztatowy", + "Grasshopper": "Konik polny", + "GrasshopperCage": "Klatka dla koników polnych", + "GrasshopperStatue": "Posąg konika polnego", + "GreedyRing": "Chciwy pierścień", + "GreekSkeletonBanner": "Sztandar hoplity", + "GreenCounterweight": "Zielona przeciwwaga", + "GreenDungeonBathtub": "Zielona wanna z lochu", + "GreenDungeonCandelabra": "Zielony świecznik z lochu", + "GreenDungeonChandelier": "Zielony żyrandol z lochu", + "GreenDungeonChest": "Zielony kufer z lochu", + "GreenDungeonLamp": "Zielona lampa z lochu", + "GreenDungeonSink": "Zielona umywalka z lochu", + "GreenFlameAndSilverDye": "Barwnik zielonego płomienia i srebrny", + "GreenJellyfishBanner": "Sztandar zielonej meduzy", + "GreenPhasesaber": "Zielony miecz świetniejszy", + "GreenString": "Zielony sznurek", + "GrimDye": "Ponury barwnik", + "Grubby": "Parszywek", + "GrubSoup": "Krzepiąca zupa", + "HadesDye": "Barwnik Hadesu", + "HallowedFishingCrate": "Bajkowa skrzynia", + "HallowHardenedSand": "Utwardzony blok piasku perłowego", + "HallowHardenedSandWall": "Utwardzona ściana z piasku perłowego", + "HallowSandstone": "Blok perłowca", + "HallowSandstoneWall": "Ściana z perłowca", + "HardenedSand": "Utwardzony blok piasku", + "HardenedSandWall": "Utwardzona ściana piaskowa", + "HardySaddle": "Wytrzymałe siodło", + "HarpyStatue": "Posąg harpii", + "HelFire": "Czartogień", + "HellstoneBrickWall": "Ściana z cegieł piekielnego kamienia", + "HellwingBow": "Piekłoskrzydły łuk", + "HerbBag": "Torba ziół", + "HiTekSunglasses": "Nowoczesne okulary słoneczne", + "HiveBackpack": "Pszczoło-pack", + "HoneyBathtub": "Miodowa wanna", + "HoneyBookcase": "Miodowa biblioteczka", + "HoneyCandelabra": "Miodowy świecznik", + "HoneyCandle": "Miodowa świeca", + "HoneyChandelier": "Miodowy żyrandol", + "HoneyChest": "Miodowy kufer", + "HoneyClock": "Miodowy zegar", + "HoneyCup": "Miodowy puchar", + "HoneyedGoggles": "Słodkie gogle", + "HoneyfallBlock": "Blok miodospadu", + "HoneyfallWall": "Ściana z bloków miodospadu", + "HoneyLamp": "Miodowa lampa", + "HoneyLantern": "Miodowy lampion", + "HoneyPiano": "Miodowe pianino", + "HoneyPlatform": "Miodowa platforma", + "HoneySink": "Miodowa umywalka", + "HoneyWorkBench": "Miodowy stół warsztatowy", + "HopliteStatue": "Posąg hoplity", + "HuntressBuckler": "Puklerz łowczyni", + "HuntressJerkin": "Kaftan łowczyni", + "HuntressPants": "Spodnie łowczyni", + "HuntressWig": "Peruka łowczyni", + "IceMirror": "Lodowe lustro", + "IceTortoiseBanner": "Sztandar lodowego żółwia", + "IchorCampfire": "Ichorowe ognisko", + "IchorDart": "Strzałka ichoru", + "IlluminantHook": "Świecący hak", + "InfernalWispDye": "Barwnik piekielnego, błędnego ognika", + "InfluxWaver": "Przełamanie oporu", + "ItemFrame": "Ramka przedmiotu", + "Javelin": "Oszczep", + "JimsWings": "Skrzydła Jima", + "JourneymanBait": "Przynęta czeladnika", + "JungleFishingCrate": "Skrzynia z dżungli", + "JungleYoyo": "Amazonka", + "KingSlimeBossBag": "Torba skarbów", + "Kraken": "Kraken", + "LamiaHat": "Maska lamii", + "LamiaPants": "Ogon lamii", + "LamiaShirt": "Przepaska lamii", + "LargeAmber": "Wielki bursztyn", + "LaserDrill": "Świder laserowy", + "LaserMachinegun": "Laserowy karabin maszynowy", + "LaserRuler": "Mechaniczna linijka", + "LastPrism": "Ostatni pryzmat", + "LavafallBlock": "Blok lawospadu", + "LavaLamp": "Lampa lawy", + "LifeformAnalyzer": "Analizator form życia", + "LifePreserver": "Obrońca życia", + "LightKey": "Klucz światła", + "LightMummyBanner": "Sztandar jasnej mumii", + "LihzahrdBathtub": "Jaszczuhrza wanna", + "LihzahrdBed": "Jaszczuhrze łóżko", + "LihzahrdBookcase": "Jaszczuhrza biblioteczka", + "LihzahrdCandelabra": "Jaszczuhrzy świecznik", + "LihzahrdCandle": "Jaszczuhrza świeca", + "LihzahrdChandelier": "Jaszczuhrzy żyrandol", + "LihzahrdClock": "Jaszczuhrzy zegar", + "LihzahrdLamp": "Jaszczuhrza lampa", + "LihzahrdLantern": "Jaszczuhrzy lampion", + "LihzahrdSink": "Jaszczuhrza umywalka", + "LimeString": "Limonkowy sznurek", + "LivingCursedFireBlock": "Blok przeklętego, żywego ognia", + "LivingDemonFireBlock": "Blok przeklętego, demonicznego ognia", + "LivingFireBlock": "Blok żywego ognia", + "LivingFlameDye": "Barwnik żywego płomienia", + "LivingFrostFireBlock": "Blok mroźnego, żywego ognia", + "LivingIchorBlock": "Blok żywego ichoru", + "LivingLeafWall": "Żyjąca, liściasta ściana", + "LivingMahoganyLeafWand": "Mahoniowa, liściasta różdżka", + "LivingMahoganyWand": "Żyjąca, mahoniowa różdżka", + "LivingOceanDye": "Żyjący barwnik oceaniczny", + "LivingRainbowDye": "Żyjący barwnik tęczy", + "LivingUltrabrightFireBlock": "Blok megajasnego, żywego ognia", + "LivingWoodBathtub": "Wanna z żyjącego drewna", + "LivingWoodBed": "Łóżko z żyjącego drewna", + "LivingWoodBookcase": "Biblioteczka z żyjącego drewna", + "LivingWoodCandelabra": "Świecznik z żyjącego drewna", + "LivingWoodCandle": "Świeca z żyjącego drewna", + "LivingWoodChandelier": "Żyrandol z żyjącego drewna", + "LivingWoodClock": "Zegar z żyjącego drewna", + "LivingWoodLamp": "Lampa z żyjącego drewna", + "LivingWoodLantern": "Lampion z żyjącego drewna", + "LivingWoodPiano": "Pianino z żyjącego drewna", + "LivingWoodPlatform": "Platforma z żyjącego drewna", + "LivingWoodSink": "Umywalka z żyjącego drewna", + "LivingWoodSofa": "Kanapa z żyjącego drewna", + "LivingWoodWorkBench": "Stół warsztatowy z żyjącego drewna", + "LockBox": "Zamknięty, złoty kuferek", + "LogicGateLamp_Faulty": "Lampka bramki logicznej (wadliwa)", + "LogicGateLamp_Off": "Lampka bramki logicznej (wł.)", + "LogicGateLamp_On": "Lampka bramki logicznej (wył.)", + "LogicGate_AND": "Bramka logiczna (AND)", + "LogicGate_NAND": "Bramka logiczna (NAND)", + "LogicGate_NOR": "Bramka logiczna (NOR)", + "LogicGate_NXOR": "Bramka logiczna (XNOR)", + "LogicGate_OR": "Bramka logiczna (OR)", + "LogicGate_XOR": "Bramka logiczna (XOR)", + "LogicSensor_Above": "Sensor logiczny (gracz nad sensorem)", + "LogicSensor_Honey": "Sensor cieczy (miód)", + "LogicSensor_Lava": "Sensor cieczy (lawa)", + "LogicSensor_Liquid": "Sensor cieczy (dowolny)", + "LogicSensor_Moon": "Sensor logiczny (noc)", + "LogicSensor_Sun": "Sensor logiczny (dzień)", + "LogicSensor_Water": "Sensor cieczy (woda)", + "LokisDye": "Barwnik Lokiego", + "LokisHelm": "Hełm Lokiego", + "LokisPants": "Nagolenniki Lokiego", + "LokisShirt": "Napierśnik Lokiego", + "LokisWings": "Skrzydła Lokiego", + "LunarBar": "Luminytowa sztabka", + "LunarBlockNebula": "Blok z fragmentów mgławicy", + "LunarBlockSolar": "Blok z fragmentów słonecznych", + "LunarBlockStardust": "Blok z fragmentów pyłu gwiezdnego", + "LunarBlockVortex": "Blok z fragmentów wiru", + "LunarBrick": "Luminytowa cegła", + "LunarBrickWall": "Ściana z luminytowych cegieł", + "LunarCraftingStation": "Starożytny manipulator", + "LunarFlareBook": "Flara księżycowa", + "LunarHamaxeNebula": "Młotopór mgławicy", + "LunarHamaxeSolar": "Młotopór słonecznej flary", + "LunarHamaxeStardust": "Młotopór pyłu gwiezdnego", + "LunarHamaxeVortex": "Młotopór wirów", + "LunarHook": "Hak księżycowy", + "LunarOre": "Luminyt", + "LunarTabletFragment": "Fragment tabliczki słonecznej", + "MagicHoneyDropper": "Magiczny, miodowy zakraplacz", + "MagicLantern": "Magiczna lampa", + "MagicLavaDropper": "Magiczny, zakraplacz lawy", + "MagicSandDropper": "Magiczny, piaskowy zakraplacz", + "MagicWaterDropper": "Magiczny, wodny zakraplacz", + "Marble": "Blok marmuru", + "MarbleBathtub": "Marmurowa wanna", + "MarbleBed": "Marmurowe łóżko", + "MarbleBlock": "Blok gładkiego marmuru", + "MarbleBlockWall": "Ściana z gładkiego marmuru", + "MarbleBookcase": "Marmurowa biblioteczka", + "MarbleCandelabra": "Marmurowy świecznik", + "MarbleCandle": "Marmurowa świeca", + "MarbleChair": "Marmurowe krzesło", + "MarbleChandelier": "Marmurowy żyrandol", + "MarbleChest": "Marmurowy kufer", + "MarbleClock": "Marmurowy zegar", + "MarbleDoor": "Marmurowe drzwi", + "MarbleDresser": "Marmurowa komoda", + "MarbleLamp": "Marmurowa lampa", + "MarbleLantern": "Marmurowy lampion", + "MarblePiano": "Marmurowy fortepian", + "MarblePlatform": "Marmurowa platforma", + "MarbleSink": "Marmurowa umywalka", + "MarbleSofa": "Marmurowa kanapa", + "MarbleTable": "Marmurowy stół", + "MarbleWall": "Marmurowa ściana", + "MarbleWorkBench": "Marmurowy stół warsztatowy", + "MartianArmorDye": "Marsjański barwnik", + "MartianAstroClock": "Marsjański astrozegar", + "MartianBathtub": "Marsjańska wanna", + "MartianBed": "Marsjańskie łóżko", + "MartianChandelier": "Marsjański żyrandol", + "MartianChest": "Marsjański kufer", + "MartianConduitPlating": "Marsjańska płytka scalona", + "MartianConduitWall": "Marsjańska ściana scalona", + "MartianCostumeMask": "Maska kostiumu marsjańskiego", + "MartianCostumePants": "Spodnie kostiumu marsjańskiego", + "MartianCostumeShirt": "Koszula kostiumu marsjańskiego", + "MartianDoor": "Marsjańskie drzwi", + "MartianDresser": "Marsjańska komoda", + "MartianHairDye": "Marsjańska farba do włosów", + "MartianHolobookcase": "Marsjańska hologramoteczka", + "MartianHoverCandle": "Marsjańska świeca latająca", + "MartianHoverChair": "Marsjańskie krzesło latające", + "MartianLamppost": "Marsjańska lampa", + "MartianLantern": "Marsjański lampion", + "MartianPiano": "Marsjańskie pianino", + "MartianPlatform": "Marsjańska platforma", + "MartianSaucerTrophy": "Trofeum – Marsjański Spodek", + "MartianSink": "Marsjańska umywalka", + "MartianSofa": "Marsjańska kanapa", + "MartianTable": "Marsjański stół", + "MartianTableLamp": "Marsjańska lampa stołowa", + "MartianUniformHelmet": "Hełm kombinezonu marsjańskiego", + "MartianUniformPants": "Spodnie kombinezonu marsjańskiego", + "MartianUniformTorso": "Góra kombinezonu marsjańskiego", + "MartianWalkerBanner": "Sztandar marsjańskiego piechura", + "MartianWorkBench": "Marsjański stół warsztatowy", + "MasterBait": "Mistrzowska przynęta", + "MechanicalBatteryPiece": "Cześć mechanicznego akumulatora", + "MechanicalLens": "Mechaniczna soczewka", + "MechanicalWagonPiece": "Część mechanicznego wózka", + "MechanicalWheelPiece": "Część mechanicznego koła", + "MedusaBanner": "Sztandar meduzy", + "MedusaHead": "Głowa meduzy", + "MedusaStatue": "Posąg meduzy", + "Meowmere": "Kotomiecz", + "MetalDetector": "Wykrywacz metali", + "MetalSink": "Metalowa umywalka", + "MeteoriteBathtub": "Meteorytowa wanna", + "MeteoriteBed": "Meteorytowe łóżko", + "MeteoriteBookcase": "Meteorytowa biblioteczka", + "MeteoriteBrick": "Meteorytowa cegła", + "MeteoriteBrickWall": "Ściana z meteorytowych cegieł", + "MeteoriteCandelabra": "Meteorytowy świecznik", + "MeteoriteCandle": "Meteorytowa świeca", + "MeteoriteChair": "Meteorytowe krzesło", + "MeteoriteChandelier": "Meteorytowy żyrandol", + "MeteoriteChest": "Meteorytowy kufer", + "MeteoriteClock": "Meteorytowy zegar", + "MeteoriteDoor": "Meteorytowe drzwi", + "MeteoriteDresser": "Meteorytowa komoda", + "MeteoriteLamp": "Meteorytowa lampa", + "MeteoriteLantern": "Meteorytowy lampion", + "MeteoritePiano": "Meteorytowe pianino", + "MeteoritePlatform": "Meteorytowa platforma", + "MeteoriteSink": "Meteorytowa umywalka", + "MeteoriteSofa": "Meteorytowa kanapa", + "MeteoriteTable": "Meteorytowy stół", + "MeteoriteWorkBench": "Meteorytowy stół warsztatowy", + "MeteorStaff": "Kostur z meteoru", + "MidnightRainbowDye": "Barwnik północnej tęczy", + "MinecartMech": "Mechaniczny wózek", + "MinecartTrack": "Tor górniczy", + "MirageDye": "Barwnik mirażu", + "MolotovCocktail": "Koktajl Mołotowa", + "MoneyTrough": "Korytko z pieniędzmi", + "MonkBelt": "Pas mnicha", + "MonkBrows": "Łysa łepetyna mnicha z krzaczastymi brwiami", + "MonkPants": "Spodnie mnicha", + "MonkShirt": "Koszula mnicha", + "MoonglowPlanterBox": "Skrzynka planterowa nocnicy", + "MoonlordArrow": "Luminytowa strzała", + "MoonLordBossBag": "Torba skarbów", + "MoonlordBullet": "Luminytowa kula", + "MoonLordPainting": "Ni pies, ni wydra", + "MoonLordTrophy": "Trofeum – Księżycowy Władca", + "MoonlordTurretStaff": "Kostur księżycowego portalu", + "MoonMask": "Księżycowa maska", + "MothronBanner": "Sztandar mothronu", + "MothronWings": "Skrzydła mothronu", + "MouseStatue": "Posąg myszy", + "MulticolorWrench": "Kolorowy klucz", + "MushroomBathtub": "Grzybowa wanna", + "MushroomBed": "Grzybowe łóżko", + "MushroomBench": "Grzybowa ławka", + "MushroomBookcase": "Grzybowa biblioteczka", + "MushroomCandelabra": "Grzybowy świecznik", + "MushroomCandle": "Grzybowa świeca", + "MushroomChandelier": "Grzybowy żyrandol", + "MushroomChest": "Grzybowy kufer", + "MushroomClock": "Grzybowy zegar", + "MushroomDresser": "Grzybowa komoda", + "MushroomDye": "Barwnik lśniących grzybów", + "MushroomLamp": "Grzybowa lampa", + "MushroomLantern": "Grzybowy lampion", + "MushroomPiano": "Grzybowe pianino", + "MushroomPlatform": "Grzybowa platforma", + "MushroomSink": "Grzybowa umywalka", + "MushroomTable": "Grzybowy stół", + "MusicBoxGoblins": "Pozytywka (goblińska inwazja)", + "MusicBoxHell": "Pozytywka (piekło)", + "MusicBoxLunarBoss": "Pozytywka (księżycowy boss)", + "MusicBoxMartians": "Pozytywka (marsjańskie szaleństwo)", + "MusicBoxPirates": "Pozytywka (inwazja piratów)", + "MusicBoxSandstorm": "Pozytywka (burza piaskowa)", + "MusicBoxTowers": "Pozytywka (wieże)", + "MusicBoxUndergroundCrimson": "Pozytywka (podziemie Szkarłatu)", + "Nail": "Gwóźdź", + "NailGun": "Gwoździarka", + "NailheadBanner": "Sztandar gwoździołba", + "NebulaArcanum": "Arkanum mgławicy", + "NebulaAxe": "Topór mgławicy", + "NebulaBeastBanner": "Sztandar bestii ewolucyjnej", + "NebulaBlaze": "Wybuch mgławicy", + "NebulaBrainBanner": "Sztandar pływaka mgławicy", + "NebulaBreastplate": "Napierśnik mgławicy", + "NebulaChainsaw": "Piła łańcuchowa mgławicy", + "NebulaDrill": "Świder mgławicy", + "NebulaDye": "Barwnik mgławicy", + "NebulaHammer": "Młot mgławicy", + "NebulaHeadcrabBanner": "Sztandar mózgojada", + "NebulaHelmet": "Hełm mgławicy", + "NebulaLeggings": "Spodnie mgławicy", + "NebulaMonolith": "Monolit mgławicy", + "NebulaPickaxe": "Kilof mgławicy", + "NebulaPickup1": "Intensyfikator obrażeń", + "NebulaPickup2": "Intensyfikator życia", + "NebulaPickup3": "Intensyfikator many", + "NebulaSoldierBanner": "Sztandar profety", + "NegativeDye": "Barwnik zaprzeczający", + "NightKey": "Klucz nocy", + "NightVisionHelmet": "Hełm nocnej wizji", + "ObsidianBathtub": "Obsydianowa wanna", + "ObsidianCandelabra": "Obsydianowy świecznik", + "ObsidianCandle": "Obsydianowa świeca", + "ObsidianChandelier": "Obsydianowy żyrandol", + "ObsidianChest": "Obsydianowy kufer", + "ObsidianClock": "Obsydianowy zegar", + "ObsidianHelm": "Kapelusz obsydianowego zbiega", + "ObsidianLamp": "Obsydianowa lampa", + "ObsidianLantern": "Obsydianowy lampion", + "ObsidianPants": "Obsydianowe spodnie", + "ObsidianShirt": "Obsydianowy płaszcz", + "ObsidianSink": "Obsydianowa umywalka", + "OnyxBlaster": "Onyksowy blaster", + "OrangeString": "Pomarańczowy sznurek", + "PainterPaintballGun": "Paintballowy pistolet", + "PaintingAcorns": "Żołędzie", + "PaintingCastleMarsberg": "Zamek Marsberg", + "PaintingColdSnap": "Nadchodzi zima", + "PaintingCursedSaint": "Przeklęty święty", + "PaintingMartiaLisa": "Marso Lisa", + "PaintingSnowfellas": "Bałwany z ferajny", + "PaintingTheSeason": "Ten czas", + "PaintingTheTruthIsUpThere": "Prawda jest gdzieś na górze", + "PalmWood": "Drewno palmowe", + "PalmWoodBathtub": "Wanna z drewna palmowego", + "PalmWoodBed": "Łóżko z drewna palmowego", + "PalmWoodBench": "Ławka z drewna palmowego", + "PalmWoodBookcase": "Biblioteczka z drewna palmowego", + "PalmWoodBow": "Łuk z drewna palmowego", + "PalmWoodBreastplate": "Napierśnik z drewna palmowego", + "PalmWoodCandelabra": "Świecznik z drewna palmowego", + "PalmWoodCandle": "Świeca z drewna palmowego", + "PalmWoodChair": "Krzesło z drewna palmowego", + "PalmWoodChandelier": "Żyrandol z drewna palmowego", + "PalmWoodChest": "Kufer z drewna palmowego", + "PalmWoodClock": "Zegar z drewna palmowego", + "PalmWoodDoor": "Drzwi z drewna palmowego", + "PalmWoodDresser": "Komoda z drewna palmowego", + "PalmWoodFence": "Płot z drewna palmowego", + "PalmWoodGreaves": "Nagolenniki z drewna palmowego", + "PalmWoodHammer": "Młot z drewna palmowego", + "PalmWoodHelmet": "Hełm z drewna palmowego", + "PalmWoodLamp": "Lampa z drewna palmowego", + "PalmWoodLantern": "Lampion z drewna palmowego", + "PalmWoodPiano": "Pianino z drewna palmowego", + "PalmWoodPlatform": "Platforma z drewna palmowego", + "PalmWoodSink": "Umywalka z drewna palmowego", + "PalmWoodSofa": "Kanapa z drewna palmowego", + "PalmWoodSword": "Miecz z drewna palmowego", + "PalmWoodTable": "Stół z drewna palmowego", + "PalmWoodWall": "Ściana z drewna palmowego", + "PalmWoodWorkBench": "Stół warsztatowy z drewna palmowego", + "PartyBalloonAnimal": "Balonowy zwierzak", + "PartyBundleOfBalloonsAccessory": "Balony imprezowe", + "PartyBundleOfBalloonTile": "Śmiesznie związane balony", + "PartyGirlGrenade": "Imprezowy granat", + "PartyHat": "Imprezowa czapka", + "PartyMonolith": "Serce imprezy", + "PartyPresent": "Imprezowy prezent", + "PDA": "PDA", + "PeaceCandle": "Świeca pokojowa", + "PearlwoodBathtub": "Wanna z drewna perłowego", + "PearlwoodBookcase": "Biblioteczka z drewna perłowego", + "PearlwoodCandelabra": "Świecznik z drewna perłowego", + "PearlwoodCandle": "Świeca z drewna perłowego", + "PearlwoodChandelier": "Żyrandol z drewna perłowego", + "PearlwoodClock": "Zegar z drewna perłowego", + "PearlwoodLamp": "Lampa z drewna perłowego", + "PearlwoodLantern": "Lampion z drewna perłowego", + "PearlwoodSink": "Umywalka z drewna perłowego", + "PedguinHat": "Kaptur Pedguina", + "PedguinPants": "Spodnie Pedguina", + "PedguinShirt": "Kurtka Pedguina", + "PenguinStatue": "Posąg pingwina", + "Phantasm": "Fantazmat", + "PhaseDye": "Barwnik błysków", + "PhasicWarpEjector": "Fazowy ejektor warpowy", + "Pigronata": "Smosiakonata", + "PigronStatue": "Posąg smosiaka", + "PinkDungeonBathtub": "Różowa wanna z lochu", + "PinkDungeonCandelabra": "Różowy świecznik z lochu", + "PinkDungeonChandelier": "Różowy żyrandol z lochu", + "PinkDungeonChest": "Różowy kufer z lochu", + "PinkDungeonLamp": "Różowa lampa z lochu", + "PinkDungeonSink": "Różowa umywalka z lochu", + "PinkGel": "Różowy żel", + "PinkGelDye": "Różowy, żelowy barwnik", + "PinkJellyfishBanner": "Sztandar różowej meduzy", + "PinkSlimeBlock": "Różowy blok szlamu", + "PinkString": "Różowy sznurek", + "PinkTorch": "Różowa pochodnia", + "PirateCaptainBanner": "Sztandar kapitana piratów", + "PirateCorsairBanner": "Sztandar korsarza", + "PirateCrossbowerBanner": "Sztandar pirackiego kusznika", + "PirateDeadeyeBanner": "Sztandar jednookiego pirata", + "PirateStaff": "Piracki kostur", + "PixelBox": "Pikselowy blok", + "PixieDye": "Wróżkowy barwnik", + "PlanteraBossBag": "Torba skarbów", + "PlanteraMask": "Maska Plantery", + "PocketMirror": "Kieszonkowe lusterko", + "PoisonousSporeBanner": "Sztandar trującego zarodnika", + "PortalGun": "Pistolet portalu", + "PortalGunStation": "Stanowisko portalowe", + "PressureTrack": "Tor dociskowy", + "ProjectilePressurePad": "Morska podkładka dociskowa", + "PsychoBanner": "Sztandar psychopaty", + "PsychoKnife": "Nóż psychopaty", + "PumpkinBathtub": "Dyniowa wanna", + "PumpkinBed": "Dyniowe łóżko", + "PumpkinBookcase": "Dyniowa biblioteczka", + "PumpkinCandelabra": "Dyniowy świecznik", + "PumpkinCandle": "Dyniowa świeca", + "PumpkinChandelier": "Dyniowy żyrandol", + "PumpkinChest": "Dyniowy kufer", + "PumpkinClock": "Dyniowy zegar", + "PumpkinDresser": "Dyniowa komoda", + "PumpkinLamp": "Dyniowa lampa", + "PumpkinLantern": "Dyniowy lampion", + "PumpkinPiano": "Dyniowe pianino", + "PumpkinSink": "Dyniowa umywalka", + "PurpleCounterweight": "Fioletowa przeciwwaga", + "PurpleOozeDye": "Fioletowy barwnik mułu", + "PurplePhasesaber": "Fioletowy miecz świetniejszy", + "PurpleString": "Fioletowy sznurek", + "PutridScent": "Zgniły zapach", + "QueenBeeBossBag": "Torba skarbów", + "Radar": "Radar", + "RainbowCampfire": "Tęczowe ognisko", + "RainbowCrystalStaff": "Kostur z tęczowych kryształów", + "RainbowString": "Tęczowy sznurek", + "RainbowTorch": "Tęczowa pochodnia", + "Rally": "Rally", + "RazorbladeTyphoon": "Tajfun żyletek", + "RedAcidDye": "Czerwony, kwasowy barwnik", + "RedCounterweight": "Czerwona przeciwwaga", + "RedDevilBanner": "Sztandar czerwonego diabła", + "RedPhasesaber": "Czerwony miecz świetniejszy", + "RedString": "Czerwony sznurek", + "RedsYoyo": "Rzutek Reda", + "ReflectiveCopperDye": "Odblaskowy barwnik miedziany", + "ReflectiveDye": "Odblaskowy barwnik", + "ReflectiveGoldDye": "Odblaskowy barwnik złoty", + "ReflectiveMetalDye": "Odblaskowy barwnik metalowy", + "ReflectiveObsidianDye": "Odblaskowy barwnik obsydianowy", + "ReflectiveSilverDye": "Odblaskowy barwnik srebrny", + "REK": "R.E.K. 3000", + "RichGravestone1": "Złoty krzyż nagrobkowy", + "RichGravestone2": "Złoty nagrobek", + "RichGravestone3": "Złota płyta nagrobkowa", + "RichGravestone4": "Złoty kamień nagrobkowy", + "RichGravestone5": "Złota macewa", + "RichMahoganyBathtub": "Mahoniowa wanna", + "RichMahoganyBookcase": "Mahoniowa biblioteczka", + "RichMahoganyCandelabra": "Mahoniowy świecznik", + "RichMahoganyCandle": "Mahoniowa świeca", + "RichMahoganyChandelier": "Mahoniowy żyrandol", + "RichMahoganyClock": "Mahoniowy zegar", + "RichMahoganyLamp": "Mahoniowa lampa", + "RichMahoganyLantern": "Mahoniowy lampion", + "RichMahoganySink": "Mahoniowa umywalka", + "RoyalGel": "Królewski żel", + "RubyGemsparkWall": "Ściana z rubinowych bloków świecących", + "RubyGemsparkWallOff": "Nieaktywna ściana z rubinowych bloków świecących", + "SailfishBoots": "Buty morskich wiatrów", + "SalamanderBanner": "Sztandar salamandry", + "SandElementalBanner": "Sztandar żywiołaka piasku", + "SandFallWall": "Ściana piaskospadu", + "SandsharkBanner": "Sztandar piaskowego rekina", + "SandsharkCorruptBanner": "Sztandar kąsacza kości", + "SandsharkCrimsonBanner": "Sztandar mięsożercy", + "SandsharkHallowedBanner": "Sztandar kryształowego młocarza", + "SandSlimeBanner": "Sztandar piaskowego szlamu", + "Sandstone": "Blok kamienia piaskowego", + "SandstoneWall": "Ściana z kamienia piaskowego", + "SapphireGemsparkWall": "Ściana z szafirowych bloków świecących", + "SapphireGemsparkWallOff": "Nieaktywna ściana z szafirowych bloków świecących", + "ScalyTruffle": "Łuskowata trufla", + "ScorpionStatue": "Posąg skorpiona", + "Seashell": "Muszla", + "SeaSnailBanner": "Sztandar ślimaka morskiego", + "Seedler": "Siewca", + "SeveredHandBanner": "Sztandar odciętej ręki", + "Sextant": "Sekstans", + "ShadewoodBathtub": "Wanna z drewna mroku", + "ShadewoodBookcase": "Biblioteczka z drewna mroku", + "ShadewoodCandelabra": "Świecznik z drewna mroku", + "ShadewoodCandle": "Świeca z drewna mroku", + "ShadewoodChandelier": "Żyrandol z drewna mroku", + "ShadewoodClock": "Zegar z drewna mroku", + "ShadewoodLamp": "Lampa z drewna mroku", + "ShadewoodLantern": "Lampion z drewna mroku", + "ShadewoodSink": "Umywalka z drewna mroku", + "ShadowDye": "Barwnik cienia", + "ShadowFlameBow": "Łuk cienistego płomienia", + "ShadowflameHadesDye": "Hadesowy barwnik cienistego płomienia", + "ShadowFlameHexDoll": "Przeklinająca kukła cienistego płomienia", + "ShadowFlameKnife": "Nóż cienistego płomienia", + "SharkronBalloon": "Balon smokina", + "SharkStatue": "Posąg rekina", + "SharkteethTrophy": "Trofeum – zęby rekina", + "SharkToothNecklace": "Naszyjnik z zębów rekina", + "SharpeningStation": "Warsztat ostrzący", + "ShiftingPearlSandsDye": "Barwnik przesypującego się perłowca", + "ShiftingSandsDye": "Barwnik przesypujących się piasków", + "ShinyStone": "Błyszczący kamień", + "ShipsWheel": "Ster", + "ShiverthornPlanterBox": "Skrzynka planterowa dygociernia", + "ShrimpyTruffle": "Tycia trufla", + "ShroomitePlating": "Grzybielenicowe płyty", + "ShroomitePlatingWall": "Ściana z grzybielenicowych płyt", + "SilkRope": "Jedwabna lina", + "SilkRopeCoil": "Zwinięta, jedwabna lina", + "SillyBalloonGreen": "Śmieszny, zielony balon", + "SillyBalloonGreenWall": "Ściana ze śmiesznych, zielonych balonów", + "SillyBalloonMachine": "Maszyna do śmiesznych balonów", + "SillyBalloonPink": "Śmieszny, różowy balon", + "SillyBalloonPinkWall": "Ściana ze śmiesznych, różowych balonów", + "SillyBalloonPurple": "Śmieszny, fioletowy balon", + "SillyBalloonPurpleWall": "Ściana ze śmiesznych, fioletowych balonów", + "SillyBalloonTiedGreen": "Śmiesznie związany balon (zielony)", + "SillyBalloonTiedPink": "Śmiesznie związany balon (różowy)", + "SillyBalloonTiedPurple": "Śmiesznie związany balon (fioletowy)", + "SillyStreamerBlue": "Niebieska serpentyna", + "SillyStreamerGreen": "Zielona serpentyna", + "SillyStreamerPink": "Różowa serpentyna", + "SilverAndBlackDye": "Srebrno-czarny barwnik", + "SkeletronBossBag": "Torba skarbów", + "SkeletronPrimeBossBag": "Torba skarbów", + "SkeletronPrimeMask": "Maska Szkieletrona Prime’a", + "SkyBlueString": "Sznurek koloru błękitnego nieba", + "SkyFracture": "Rozdarcie nieba", + "SkywareBathtub": "Niebiańska wanna", + "SkywareBed": "Niebiańskie łóżko", + "SkywareBookcase": "Niebiańska biblioteczka", + "SkywareCandelabra": "Niebiański świecznik", + "SkywareCandle": "Niebiańska świeca", + "SkywareChandelier": "Niebiański żyrandol", + "SkywareClock": "Niebiański zegar", + "SkywareLamp": "Niebiańska lampa", + "SkywareLantern": "Niebiański lampion", + "SkywarePlatform": "Niebiańska platforma", + "SkywareSink": "Niebiańska umywalka", + "SkywareWorkbench": "Niebiański stół warsztatowy", + "SlapHand": "Policzkator", + "SliceOfCake": "Kawałek tortu", + "SlimeBathtub": "Szlamowa wanna", + "SlimeBed": "Szlamowe łóżko", + "SlimeBookcase": "Szlamowa biblioteczka", + "SlimeCandelabra": "Szlamowy świecznik", + "SlimeCandle": "Szlamowa świeca", + "SlimeChair": "Szlamowe krzesło", + "SlimeChandelier": "Szlamowy żyrandol", + "SlimeChest": "Szlamowy kufer", + "SlimeClock": "Szlamowy zegar", + "SlimeDoor": "Szlamowe drzwi", + "SlimeDresser": "Szlamowa komoda", + "SlimeGun": "Pistolet szlamowy", + "SlimeHook": "Hak szlamowy", + "SlimeLamp": "Szlamowa lampa", + "SlimeLantern": "Szlamowy lampion", + "SlimePiano": "Szlamowe pianino", + "SlimePlatform": "Szlamowa platforma", + "SlimeSink": "Szlamowa umywalka", + "SlimeSofa": "Szlamowa kanapa", + "SlimeTable": "Szlamowy stół", + "SlimySaddle": "Szlamowe siodło", + "Sluggy": "Leniwek", + "SmokeBlock": "Blok dymu", + "SnailStatue": "Posąg ślimaka", + "SnowCloudBlock": "Śniegowa chmura", + "SnowFallWall": "Ściana śniegospadu", + "SolarCoriteBanner": "Sztandar korium", + "SolarCrawltipedeBanner": "Szandar pełzowija", + "SolarDrakomireBanner": "Sztandar drakomira", + "SolarDrakomireRiderBanner": "Sztandar drakomirskiego jeźdźca", + "SolarDye": "Słoneczny barwnik", + "SolarEruption": "Wybuch słoneczny", + "SolarFlareAxe": "Topór słonecznej flary", + "SolarFlareBreastplate": "Napierśnik słonecznej flary", + "SolarFlareChainsaw": "Piła łańcuchowa słonecznej flary", + "SolarFlareDrill": "Świder słonecznej flary", + "SolarFlareHammer": "Młot słonecznej flary", + "SolarFlareHelmet": "Hełm słonecznej flary", + "SolarFlareLeggings": "Spodnie słonecznej flary", + "SolarFlarePickaxe": "Kilof słonecznej flary", + "SolarMonolith": "Słoneczny monolit", + "SolarSolenianBanner": "Sztandar lunara", + "SolarSrollerBanner": "Sztandar słonecznego walcownika", + "SolarTablet": "Słoneczna tabliczka", + "SoulDrain": "Wyssanie życia", + "SparkyPainting": "Sparky", + "SpectreBar": "Widmowa sztabka", + "SpelunkerGlowstick": "Świetlik grotołaza", + "SpiderFang": "Kieł pająka", + "SpiderStaff": "Kostur pająka", + "SpiritFlame": "Duchowy płomień", + "SpookyBathtub": "Straszna wanna", + "SpookyBed": "Straszne łóżko", + "SpookyBookcase": "Straszna biblioteczka", + "SpookyCandelabra": "Straszny świecznik", + "SpookyCandle": "Straszna świeca", + "SpookyChandelier": "Straszny żyrandol", + "SpookyChest": "Straszny kufer", + "SpookyClock": "Straszny zegar", + "SpookyLamp": "Straszna lampa", + "SpookyLantern": "Straszny lampion", + "SpookySink": "Straszna umywalka", + "SporeSac": "Worek zarodników", + "SquireGreatHelm": "Wielki hełm giermka", + "SquireGreaves": "Nagolenniki giermka", + "SquirePlating": "Zbroja giermka", + "SquireShield": "Tarcza giermka", + "SquirrelGold": "Złota wiewiórka", + "SquirrelGoldCage": "Klatka dla złotych wiewiórek", + "SquirrelOrangeCage": "Klatka dla czerwonych wiewiórek", + "SquirrelRed": "Czerwona wiewiórka", + "SquirrelStatue": "Posąg wiewiórki", + "StardustAxe": "Topór pyłu gwiezdnego", + "StardustBreastplate": "Zbroja pyłu gwiezdnego", + "StardustCellStaff": "Kostur z ogniw pyłu gwiezdnego", + "StardustChainsaw": "Piła łańcuchowa pyłu gwiezdnego", + "StardustDragonStaff": "Smoczy kostur pyłu gwiezdnego", + "StardustDrill": "Świder pyłu gwiezdnego", + "StardustDye": "Barwnik pyłu gwiezdnego", + "StardustHammer": "Młot pyłu gwiezdnego", + "StardustHelmet": "Hełm pyłu gwiezdnego", + "StardustJellyfishBanner": "Sztandar najeźdźcy pływów", + "StardustLargeCellBanner": "Sztandar gwiezdnych ogniw", + "StardustLeggings": "Spodnie pyłu gwiezdnego", + "StardustMonolith": "Monolit pyłu gwiezdnego", + "StardustPickaxe": "Kilof pyłu gwiezdnego", + "StardustSmallCellBanner": "Sztandar małych, gwiezdnych ogniw", + "StardustSoldierBanner": "Sztandar obserwatora gwiazd", + "StardustSpiderBanner": "Sztandar iskromiota", + "StardustWormBanner": "Sztandar tkacza drogi mlecznej", + "Starfish": "Rozgwiazda", + "StarWrath": "Gwiezdny gniew", + "StaticHook": "Hak statyczny", + "SteampunkBathtub": "Steampunkowa wanna", + "SteampunkBookcase": "Steampunkowa biblioteczka", + "SteampunkCandelabra": "Steampunkowy świecznik", + "SteampunkCandle": "Steampunkowa świeca", + "SteampunkChandelier": "Steampunkowy żyrandol", + "SteampunkChest": "Kufer steampunkowy", + "SteampunkClock": "Steampunkowy zegar", + "SteampunkCup": "Kielich", + "SteampunkDresser": "Steampunkowa komoda", + "SteampunkLamp": "Steampunkowa lampa", + "SteampunkLantern": "Steampunkowy lampion", + "SteampunkPiano": "Steampunkowe pianino", + "SteampunkPlatform": "Steampunkowa platforma", + "SteampunkSink": "Steampunkowa umywalka", + "SteampunkWorkBench": "Steampunkowy stół warsztatowy", + "StickyDynamite": "Lepki dynamit", + "StickyGrenade": "Lepki granat", + "Stopwatch": "Stoper", + "StrangeBrew": "Dziwny napar", + "StrangePlant1": "Dziwna roślina", + "StrangePlant2": "Dziwna roślina", + "StrangePlant3": "Dziwna roślina", + "StrangePlant4": "Dziwna roślina", + "StylistKilLaKillScissorsIWish": "Stylowe nożyczki", + "SummonerEmblem": "Symbol przywoływacza", + "Sundial": "Zaczarowany zegar słoneczny", + "SunMask": "Słoneczna maska", + "SuperAbsorbantSponge": "Megachłonna gąbka", + "SuperHealingPotion": "Supermikstura leczenia", + "SuspiciousLookingTentacle": "Podejrzanie wyglądająca macka", + "SwordfishTrophy": "Trofeum – miecznik", + "TallGate": "Wysoka brama", + "TallyCounter": "Licznik zabójstw", + "TargetDummy": "Kukła treningowa", + "TartarSauce": "Sos tatarski", + "TaxCollectorHat": "Kapelusz poborcy podatkowego", + "TaxCollectorPants": "Spodnie poborcy podatkowego", + "TaxCollectorsStickOfDoom": "Elegancka laska", + "TaxCollectorSuit": "Garnitur poborcy podatkowego", + "TealString": "Morski sznurek", + "TeamBlockBlue": "Blok niebieskiej drużyny", + "TeamBlockBluePlatform": "Platforma niebieskiej drużyny", + "TeamBlockGreen": "Blok zielonej drużyny", + "TeamBlockGreenPlatform": "Platforma zielonej drużyny", + "TeamBlockPink": "Blok różowej drużyny", + "TeamBlockPinkPlatform": "Platforma różowej drużyny", + "TeamBlockRed": "Blok czerwonej drużyny", + "TeamBlockRedPlatform": "Platforma czerwonej drużyny", + "TeamBlockWhite": "Blok białej drużyny", + "TeamBlockWhitePlatform": "Platforma białej drużyny", + "TeamBlockYellow": "Blok żółtej drużyny", + "TeamBlockYellowPlatform": "Platforma żółtej drużyny", + "TempestStaff": "Kostur nawałnicy", + "TendonHook": "Hak ze ścięgien", + "Terrarian": "Terrarian", + "TheBrideDress": "Suknia ślubna", + "TheBrideHat": "Welon sukni ślubnej", + "TheEyeOfCthulhu": "Oko Cthulhu", + "ThePossessedBanner": "Sztandar opętanego", + "ThornHook": "Hak cierniowy", + "TinPlating": "Cynowe płyty", + "TinPlatingWall": "Ściana z cynowych płyt", + "TombCrawlerBanner": "Sztandar cmentarnego pełzacza", + "TopazGemsparkWall": "Ściana z topazowych bloków świecących", + "TopazGemsparkWallOff": "Nieaktywna ściana z topazowych bloków świecących", + "ToxicFlask": "Toksyczna butelka", + "Toxikarp": "Toksykarp", + "Trapdoor": "Klapa", + "TruffleWorm": "Robak truflowy", + "Tsunami": "Tsunami", + "TsunamiInABottle": "Tsunami w butelce", + "TumbleweedBanner": "Sztandar rozjuszonego biegacza", + "TwilightDye": "Barwnik zmierzchu", + "TwilightHairDye": "Farba do włosów „zmierzch”", + "TwinMask": "Bliźniacza maska", + "TwinsBossBag": "Torba skarbów", + "UndeadVikingStatue": "Posąg nieumarłego wikinga", + "UnicornStatue": "Posąg jednorożca", + "UnicornWispDye": "Jednorożcowy barwnik błędnego ognika", + "ValkyrieYoyo": "Jojo walkirii", + "Valor": "Waleczność", + "ViciousMushroom": "Złośliwy grzyb", + "ViciousPowder": "Niecny proszek", + "VineRope": "Pnącze", + "VineRopeCoil": "Zwój pnącz", + "VioletString": "Fiołkowy sznurek", + "VoidDye": "Barwnik pustki", + "VortexAxe": "Topór wirów", + "VortexBeater": "Pogromca wirów", + "VortexBreastplate": "Napierśnik wirów", + "VortexChainsaw": "Piła łańcuchowa wirów", + "VortexDrill": "Świder wirów", + "VortexDye": "Barwnik wirów", + "VortexHammer": "Młot wirów", + "VortexHelmet": "Hełm wirów", + "VortexHornetBanner": "Sztandar kosmicznego szerszenia", + "VortexHornetQueenBanner": "Sztandar kosmicznej królowej", + "VortexLarvaBanner": "Sztandar kosmicznej larwy", + "VortexLeggings": "Spodnie wirów", + "VortexMonolith": "Monolit wirów", + "VortexPickaxe": "Kilof wirów", + "VortexRiflemanBanner": "Sztandar sztormowego lotnika", + "VortexSoldierBanner": "Sztandar wiraka", + "WalkingAntlionBanner": "Sztandar mrówkolwowego wierzchowca", + "WallAnchor": "Kotwica ścienna", + "WallCreeperStatue": "Posąg naściennego pełzaka", + "WallOfFleshBossBag": "Torba skarbów", + "WandofSparking": "Iskrząca się różdżka", + "WarTable": "Stół wojenny", + "WarTableBanner": "Sztandar stołu wojennego", + "WaterfallBlock": "Blok wodospadu", + "WaterleafPlanterBox": "Skrzynka platerowa zmokłoliścia", + "WeaponRack": "Stojak na broń", + "WeatherRadio": "Radio pogodowe", + "WebRope": "Pajęcza lina", + "WebRopeCoil": "Zwinięta, pajęcza lina", + "WeightedPressurePlateCyan": "Cyjanowa, ważona płyta dociskowa", + "WeightedPressurePlateOrange": "Pomarańczowa, ważona płyta dociskowa", + "WeightedPressurePlatePink": "Różowa, ważona płyta dociskowa", + "WeightedPressurePlatePurple": "Fioletowa, ważona płyta dociskowa", + "WhiteLunaticHood": "Kaptur słonecznego kultysty", + "WhiteLunaticRobe": "Szata słonecznego kultysty", + "WhitePhasesaber": "Biały miecz świetniejszy", + "WhiteString": "Biały sznurek", + "WineGlass": "Lampka do wina", + "WingsNebula": "Opończa mgławicy", + "WingsSolar": "Słoneczne skrzydła", + "WingsStardust": "Skrzydła pyłu gwiezdnego", + "WingsVortex": "Intensyfikator wirów", + "WireBulb": "Żarówka z kablami", + "WireKite": "Wielki schemat", + "WirePipe": "Skrzynka przyłączeniowa", + "WispDye": "Barwnik błędnego ognika", + "WoodenSink": "Drewniana umywalka", + "WoodYoyo": "Drewniane jojo", + "WormholePotion": "Mikstura tunelu czasoprzestrzennego", + "WormHook": "Robaczy hak", + "WormScarf": "Robaczy szal", + "WormStatue": "Robaczy posąg", + "WraithStatue": "Posąg widma", + "Xenopopper": "Bańkomiot", + "XenoStaff": "Ksenokostur", + "Yelets": "Yelets", + "YellowCounterweight": "Żółta przeciwwaga", + "YellowPhasesaber": "Żółty miecz świetniejszy", + "YellowString": "Żółty sznurek", + "YellowWrench": "Żółty klucz", + "Yoraiz0rDarkness": "Spojrzenie Yoraiz0ra", + "Yoraiz0rHead": "Malowane gogle Yoraiz0ra", + "Yoraiz0rPants": "Spódnica Yoraiz0ra", + "Yoraiz0rShirt": "Odzienie Yoraiz0ra", + "Yoraiz0rWings": "Zaklęcie Yoraiz0ra", + "YoyoBag": "Torba na jojo", + "YoYoGlove": "Rękawica do jojo", + "ZombieArmStatue": "Posąg uzbrojonego zombie", + "AleThrowingGlove": "Miotacz piwa", + "ApprenticeAltHead": "Kapelusz mrocznego artysty", + "ApprenticeAltPants": "Spodnie mrocznego artysty", + "ApprenticeAltShirt": "Szaty mrocznego artysty", + "ApprenticeStaffT3": "Gniew Betsy", + "BetsyWings": "Skrzydła Betsy", + "BookStaff": "Księga nieskończonej mądrości", + "BossMaskBetsy": "Maska Betsy", + "BossMaskDarkMage": "Maska mrocznego maga", + "BossMaskOgre": "Maska ogra", + "BossTrophyBetsy": "Trofeum Betsy", + "BossTrophyDarkmage": "Trofeum mrocznego maga", + "BossTrophyOgre": "Trofeum ogra", + "CrystalBathtub": "Kryształowa wanna", + "CrystalBed": "Kryształowe łóżko", + "CrystalBookCase": "Kryształowa biblioteczka", + "CrystalCandelabra": "Kryształowy świecznik", + "CrystalCandle": "Kryształowa świeca", + "CrystalChair": "Kryształowe krzesło", + "CrystalChandelier": "Kryształowy żyrandol", + "CrystalChest": "Kryształowy kufer", + "CrystalClock": "Kryształowy zegar", + "CrystalDoor": "Kryształowe drzwi", + "CrystalDresser": "Kryształowa komoda", + "CrystalLamp": "Kryształowa lampa", + "CrystalLantern": "Kryształowy lampion", + "CrystalPiano": "Kryształowe pianino", + "CrystalPlatform": "Kryształowa platforma", + "CrystalSink": "Kryształowa umywalka", + "CrystalSofaHowDoesThatEvenWork": "Kryształowa kanapa", + "CrystalTable": "Kryształowy stół", + "CrystalWorkbench": "Kryształowy stół warsztatowy", + "DD2BallistraTowerT1Popper": "Kij balisty", + "DD2BallistraTowerT2Popper": "Laska balisty", + "DD2BallistraTowerT3Popper": "Kostur balisty", + "DD2BetsyBow": "Powietrzna zguba", + "DD2DrakinBanner": "Sztandar drakina", + "DD2ElderCrystal": "Kryształ eternia", + "DD2ElderCrystalStand": "Stojak na kryształ eternia", + "DD2EnergyCrystal": "Etheriańska mana", + "DD2ExplosiveTrapT1Popper": "Kij wybuchowej pułapki", + "DD2ExplosiveTrapT2Popper": "Laska wybuchowej pułapki", + "DD2ExplosiveTrapT3Popper": "Kostur wybuchowej pułapki", + "DD2FlameburstTowerT1Popper": "Ognisty kij", + "DD2FlameburstTowerT2Popper": "Ognista laska", + "DD2FlameburstTowerT3Popper": "Ognisty kostur", + "DD2GoblinBanner": "Sztandar etheriańskiego goblina", + "DD2GoblinBomberBanner": "Sztandar etheriańskiego goblina-bombowca", + "DD2JavelinThrowerBanner": "Sztandar etheriańskiego oszczepnika", + "DD2KoboldBanner": "Koboldowy sztandar", + "DD2KoboldFlyerBanner": "Sztandar koboldowego szybowca", + "DD2LightningAuraT1Popper": "Kij elektrycznej aury", + "DD2LightningAuraT2Popper": "Laska elektrycznej aury", + "DD2LightningAuraT3Popper": "Kostur elektrycznej aury", + "DD2LightningBugBanner": "Sztandar etheriańskiego świetlika", + "DD2PetDragon": "Smocze jajo", + "DD2PetGato": "Jajo gato", + "DD2PetGhost": "Jajo pełzaka", + "DD2PhoenixBow": "Widmowy feniks", + "DD2SkeletonBanner": "Sztandar szkieletu Starszego", + "DD2SquireBetsySword": "Latający smok", + "DD2SquireDemonSword": "Piekielne piętno", + "DD2WitherBeastBanner": "Sztandar bestii-niszczycielki", + "DD2WyvernBanner": "Sztandar etheriańskiej wywerny", + "DungeonClockBlue": "Niebieski zegar z lochu", + "DungeonClockGreen": "Zielony zegar z lochu", + "DungeonClockPink": "Różowy zegar z lochu", + "DynastyDresser": "Komoda dynastii", + "DynastyPiano": "Pianino dynastii", + "DynastySofa": "Kanapa dynastii", + "Fake_CrystalChest": "Kryształowy kufer-pułapka", + "Fake_GoldenChest": "Złoty kufer-pułapka", + "FleshPlatform": "Mięsista platforma", + "FrozenDresser": "Zamarznięta komoda", + "FrozenPlatform": "Zamarznięta platforma", + "GoldenChest": "Złoty kufer", + "GoldenPlatform": "Złota platforma", + "GoldenWorkbench": "Złoty stół warsztatowy", + "HuntressAltHead": "Kaptur Czerwonego Kapturka", + "HuntressAltPants": "Spodnie Czerwonego Kapturka", + "HuntressAltShirt": "Suknia Czerwonego Kapturka", + "LihzahrdPlatform": "Jaszczuhrza platforma", + "LivingWoodDresser": "Komoda z żyjącego drewna", + "MonkAltHead": "Hełm infiltratora-ninja", + "MonkAltPants": "Spodnie infiltratora-ninja", + "MonkAltShirt": "Góra stroju infiltratora-ninja", + "MonkStaffT1": "Śpiąca ośmiornica", + "MonkStaffT2": "Potworna glewia", + "MonkStaffT3": "Furia niebiańskiego smoka", + "SquireAltHead": "Hełm rycerza z Walhalli", + "SquireAltPants": "Nagolenniki rycerza z Walhalli", + "SquireAltShirt": "Napierśnik rycerza z Walhalli", + "SkywareClock2": "Zegar z płyt słonecznych", + "LeinforsHat": "Ochrona włosów Leinforsa", + "LeinforsShirt": "Przegięty styl Leinforsa", + "LeinforsPants": "Wymyślne pantalony Leinforsa", + "LeinforsWings": "Chwytna peleryna Leinforsa", + "LeinforsAccessory": "Luksusowy szampon Leinforsa", + "GraniteGolemBanner": "Sztandar granitowego golema", + "RavagerScorpionBanner": "Sztandar pustynnego kłusownika", + "MusicBoxDD2": "Pozytywka (Armia Starszego)", + "BossBagBetsy": "{$ItemName.SkeletronBossBag}" + }, + "ItemTooltip": { + "ShadowGreaves": "7% zwiększona szybkość walki w zwarciu", + "ConfettiGun": "Strzela wszędzie konfetti!", + "ChlorophyteMask": "16% zwiększone obrażenia w walce w zwarciu\n6% większa szansa na trafienie krytyczne w walce w zwarciu", + "ChlorophyteHelmet": "16% zwiększone obrażenia dystansowe\n20% szans niezużycia amunicji", + "ChlorophyteHeadgear": "Zwiększa maksymalną liczbę punktów many o 80 i zmniejsza zużycie many o 17%\n16% zwiększone obrażenia magiczne", + "ChlorophytePlateMail": "5% zwiększone obrażenia\n7% większa szansa na trafienie krytyczne", + "ChlorophyteGreaves": "8% większa szansa na trafienie krytyczne\n5% zwiększona szybkość poruszania się", + "ChlorophyteBar": "Reaguje na światło", + "ShadowScalemail": "7% zwiększona szybkość walki w zwarciu", + "ShadowHelmet": "7% zwiększona szybkość walki w zwarciu", + "NightmarePickaxe": "Może wydobywać piekielny kamień", + "Paintbrush": "Używany w połączeniu z farbą do malowania bloków", + "PaintRoller": "Używany w połączeniu z farbą do malowania ścian", + "ManaCrystal": "Trwale zwiększa maksymalną liczbę punktów many o 20", + "GolfBallDyedPink": "{$CommonItemTooltip.GolfBall}", + "TealMushroom": "Używany do tworzenia morskiego barwnika", + "GreenMushroom": "Używany do tworzenia zielonego barwnika", + "SkyBlueFlower": "Używany do tworzenia barwnika błękitnego nieba", + "BandofStarpower": "Zwiększa maksymalną liczbę punktów many o 20", + "YellowMarigold": "Używany do tworzenia żółtego barwnika", + "BlueBerries": "Używany do tworzenia niebieskiego barwnika", + "LimeKelp": "Używany do tworzenia limonkowego barwnika", + "PinkPricklyPear": "Używany do tworzenia różowego barwnika", + "OrangeBloodroot": "Używany do tworzenia pomarańczowego barwnika", + "RedHusk": "Używany do tworzenia czerwonego barwnika", + "CyanHusk": "Używany do tworzenia cyjanowego barwnika", + "VioletHusk": "Używany do tworzenia fiołkowego barwnika", + "PurpleMucos": "Używany do tworzenia fioletowego barwnika", + "BlackInk": "Używany do tworzenia czarnego barwnika", + "FlowerofFire": "Rzuca kulami ognia", + "DyeVat": "Używana do tworzenia barwników", + "BeeGun": "Strzela pszczołami, które gonią twojego wroga", + "PossessedHatchet": "Goni twojego wroga", + "BeeKeeper": "Po zadaniu obrażeń przeciwnikowi przywołuje zabójcze pszczoły\nNiewielka szansa na wywołanie dezorientacji", + "HiveWand": "Umieszcza ule", + "MagicMissile": "Tworzy kontrolowany pocisk", + "Beenade": "Eksploduje i tworzy chmarę pszczół", + "GravityGlobe": "Pozwala posiadaczowi odwrócić grawitację\nWciśnij W GÓRĘ, żeby zmienić grawitację", + "KiteRed": "{$CommonItemTooltip.Kite}", + "Abeemination": "Przyzywa Królową Pszczół", + "DirtRod": "Magicznie przesuwa ziemię", + "TempleKey": "Otwiera drzwi świątyni w dżungli", + "LihzahrdWorkBench": "Używany do tworzenia podstawowych przedmiotów", + "ShadowOrb": "Tworzy magiczną kulę cienia", + "LihzahrdPressurePlate": "Aktywuje się, gdy gracz na nią nadepnie", + "PiranhaGun": "Przyczepia się do wrogów, zadając ciągłe obrażenia", + "PygmyStaff": "Przywołuje pigmeja, który będzie dla ciebie walczył", + "KiteBlueAndYellow": "{$CommonItemTooltip.Kite}", + "KiteBlue": "{$CommonItemTooltip.Kite}", + "KiteWyvern": "{$CommonItemTooltip.Kite}", + "GroxTheGreatGreaves": "{$CommonItemTooltip.DevItem}", + "LeafWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BlizzardinaBalloon": "Daje posiadaczowi umiejętność podwójnego skoku\nZwiększa wysokość skoku", + "BundleofBalloons": "Daje posiadaczowi umiejętność poczwórnego skoku\nZwiększa wysokość skoku", + "BatWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "HerculesBeetle": "Zwiększa obrażenia sług o 15%\nZwiększa odrzut powodowany przez sługi", + "BoneKey": "Przyzywa głowę młodego szkieletrona", + "MeteoriteBar": "„Ciepła w dotyku”", + "Nectar": "Przyzywa młodego szerszenia", + "TikiTotem": "Przyzywa ducha tiki", + "LizardEgg": "Przyzywa jaszczurkę-chowańca", + "LeafBlower": "Strzela z dużą szybkością liśćmi ostrymi jak brzytwa", + "ChlorophyteBullet": "Goni twojego wroga", + "Hook": "Czasami upuszczany przez szkielety i piranie", + "ParrotCracker": "Przyzywa papugę-chowańca", + "StrangeGlowingMushroom": "Przyzywa młodego trufla", + "Seedling": "Przyzywa drzewko-chowańca", + "WispinaBottle": "Przyzywa błędnego ognika dającego światło", + "PalladiumPickaxe": "Może wydobywać mithril i orichalcum", + "PalladiumDrill": "Może wydobywać mithril i orichalcum", + "OrichalcumPickaxe": "Może wydobywać adamantyt i tytan", + "OrichalcumDrill": "Może wydobywać adamantyt i tytan", + "MoltenFury": "Podpala drewniane strzały", + "PalladiumMask": "8% zwiększone obrażenia w walce w zwarciu\n12% zwiększona szybkość walki w zwarciu", + "PalladiumHelmet": "9% zwiększone obrażenia dystansowe\n9% większa szansa na dystansowe trafienie krytyczne", + "PalladiumHeadgear": "7% zwiększone obrażenia magiczne oraz szansa na trafienie krytyczne\nZwiększa maksymalną liczbę punktów many o 60", + "PalladiumBreastplate": "3% zwiększone obrażenia\n2% większa szansa na trafienie krytyczne", + "PalladiumLeggings": "2% zwiększone obrażenia\n1% większa szansa na trafienie krytyczne", + "FieryGreatsword": "„Pali się!”", + "OrichalcumMask": "7% zwiększone obrażenia w walce w zwarciu\n7% zwiększona szybkość poruszania się i walki w zwarciu", + "OrichalcumHelmet": "15% większa szansa na dystansowe trafienie krytyczne\n8% zwiększona szybkość poruszania się", + "OrichalcumHeadgear": "18% większa szansa na magiczne trafienie krytyczne\nZwiększa maksymalną liczbę punktów many o 80", + "OrichalcumBreastplate": "6% większa szansa na trafienie krytyczne", + "OrichalcumLeggings": "11% zwiększona szybkość poruszania się", + "TitaniumMask": "8% zwiększone obrażenia w walce w zwarciu oraz szansa na trafienie krytyczne\n8% zwiększona szybkość walki w zwarciu", + "TitaniumHelmet": "16% zwiększone obrażenia dystansowe\n7% większa szansa na dystansowe trafienie krytyczne", + "TitaniumHeadgear": "16% zwiększone obrażenia magiczne oraz 7% zwiększona szansa na magiczne trafienie krytyczne\nZwiększa maksymalną liczbę punktów many o 100", + "TitaniumBreastplate": "4% zwiększone obrażenia\n3% większa szansa na trafienie krytyczne", + "TitaniumLeggings": "3% zwiększone obrażenia oraz szansa na trafienie krytyczne\n6% zwiększona szybkość poruszania się", + "OrichalcumAnvil": "Używane do tworzenia przedmiotów ze sztabek mithrilu, orichalcum, adamantytu i tytanu", + "TitaniumForge": "Używana do wytapiania rudy adamantytu i tytanu", + "ChlorophyteClaymore": "Strzela potężną kulą", + "ChlorophyteSaber": "Strzela chmurą zarodników", + "ChlorophytePartisan": "Strzela chmurą zarodników", + "MeteorHelmet": "7% zwiększone obrażenia magiczne", + "ChlorophyteArrow": "Po uderzeniu w ścianę odbija się z powrotem", + "MeteorSuit": "7% zwiększone obrażenia magiczne", + "AmberMosquito": "Przyzywa młodego dinozaura", + "NimbusRod": "Przyzywa chmurę zalewającą twoich wrogów strugami deszczu", + "GroxTheGreatArmor": "{$CommonItemTooltip.DevItem}", + "EyeoftheGolem": "10% większa szansa na trafienie krytyczne", + "HoneyBalloon": "Zwiększa wysokość skoku\nPo otrzymaniu obrażeń uwalnia pszczoły", + "MeteorLeggings": "7% zwiększone obrażenia magiczne", + "BlueHorseshoeBalloon": "Daje posiadaczowi umiejętność podwójnego skoku\nZwiększa wysokość skoku i anuluje obrażenia spowodowane upadkiem", + "WhiteHorseshoeBalloon": "Daje posiadaczowi umiejętność podwójnego skoku\nZwiększa wysokość skoku i anuluje obrażenia spowodowane upadkiem", + "YellowHorseshoeBalloon": "Daje posiadaczowi umiejętność podwójnego skoku\nZwiększa wysokość skoku i anuluje obrażenia spowodowane upadkiem", + "OceanCrate": "{$CommonItemTooltip.RightClickToOpen}", + "SniperRifle": "Strzela potężną, prędką kulą\n, żeby oddalić", + "VenusMagnum": "Strzela potężną, prędką kulą", + "CrimsonRod": "Przyzywa chmurę zalewającą twoich wrogów strugami krwi", + "SteampunkWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsVortex": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "RainbowGun": "Strzela tęczą, która zadaje ciągłe obrażenia", + "StyngerBolt": "Eksploduje i tworzy śmiertelny szrapnel", + "FlowerofFrost": "Strzela kulą mrozu", + "Uzi": "Strzela potężną, prędką kulą", + "RocketBoots": "Pozwala latać", + "AmethystRobe": "Zwiększa maksymalną liczbę punktów many o 20\nZmniejsza zużycie many o 5%", + "TopazRobe": "Zwiększa maksymalną liczbę punktów many o 40\nZmniejsza zużycie many o 7%", + "SapphireRobe": "Zwiększa maksymalną liczbę punktów many o 40\nZmniejsza zużycie many o 9%", + "EmeraldRobe": "Zwiększa maksymalną liczbę punktów many o 60\nZmniejsza zużycie many o 11%", + "RubyRobe": "Zwiększa maksymalną liczbę punktów many o 60\nZmniejsza zużycie many o 13%", + "DiamondRobe": "Zwiększa maksymalną liczbę punktów many o 80\nZmniejsza zużycie many o 15%", + "GroxTheGreatHelm": "{$CommonItemTooltip.DevItem}", + "LifeFruit": "Trwale zwiększa maksymalną liczbę punktów życia o 5", + "LihzahrdPowerCell": "Używane na jaszczuhrzym ołtarzu", + "Picksaw": "Może kopać jaszczuhrze cegły", + "JimsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "StaffofEarth": "Przyzywa potężny głaz", + "GolemFist": "Uderza z siłą golema", + "Binoculars": "Zwiększa zasięg widzenia, gdy jest używana", + "RifleScope": "Zwiększa zasięg widzenia dla pistoletów\n, żeby oddalić", + "DestroyerEmblem": "10% zwiększone obrażenia\n8% większa szansa na trafienie krytyczne", + "JellyfishNecklace": "Zapewnia światło pod wodą", + "IceSickle": "Strzela lodowym sierpem", + "ClothierVoodooDoll": "„Jesteś okropną osobą”", + "PoisonStaff": "Strzela zatrutym kłem, który przeszywa wielu wrogów", + "SlimeStaff": "Przyzywa młody szlam, który walczy po twojej stronie", + "PoisonDart": "Zatruwa wrogów", + "EyeSpring": "Przyzywa nerw oczny", + "ToySled": "Przyzywa młodego bałwana", + "BookofSkulls": "Strzela czaszką", + "KOCannon": "Strzela rękawicą bokserską", + "PirateMap": "Przyzywa inwazję piratów", + "TurtleHelmet": "6% zwiększone obrażenia w walce w zwarciu\nWrogowie częściej biorą cię na cel", + "TurtleScaleMail": "8% zwiększone obrażenia w walce w zwarciu oraz szansa na trafienie krytyczne\nWrogowie częściej biorą cię na cel", + "TurtleLeggings": "4% większa szansa na trafienie krytyczne w walce w zwarciu\nWrogowie częściej biorą cię na cel", + "KiteWorldFeeder": "{$CommonItemTooltip.Kite}", + "OasisCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "ObsidianRose": "Obniża obrażenia spowodowane dotknięciem lawy", + "RodofDiscord": "Teleportuje cię w miejsce kursora", + "DeathSickle": "Strzela śmiertelnym sierpem", + "BloodySpine": "Przyzywa Mózg Cthulhu", + "Ichor": "„Krew bogów”", + "IchorTorch": "Można umieścić w wodzie", + "IchorArrow": "Obniża obronę celu", + "IchorBullet": "Obniża obronę celu", + "GoldenShower": "Przywołuje strugę ichoru\nObniża obronę celu", + "OasisCrate": "{$CommonItemTooltip.RightClickToOpen}", + "ImbuingStation": "Używany do tworzenia butelek z substancjami nasycającymi bronie", + "EmptyBullet": "Używana do tworzenia różnych rodzajów amunicji", + "ShadowbeamStaff": "Tworzy cienisty promień, który odbija się od ścian", + "InfernoFork": "Strzela kulą ognia, która wybucha i zamienia się w szalejące inferno", + "SpectreStaff": "Przyzywa zagubioną duszę, która ściga twoich wrogów", + "BubbleMachine": "Dmucha bańki", + "BubbleWand": "Dmucha bańki", + "WaterCandle": "Trzymanie tego przedmiotu może niepotrzebnie przyciągnąć uwagę", + "Book": "„Są w niej dziwne symbole”", + "CopperWatch": "Pokazuje godzinę", + "SpectreHood": "40% zmniejszone obrażenia magiczne", + "SpectreRobe": "7% zwiększone obrażenia magiczne oraz szansa na trafienie krytyczne", + "SpectrePants": "8% zwiększone obrażenia magiczne\n8% zwiększona szybkość poruszania się", + "NecroHelmet": "5% zwiększone obrażenia dystansowe", + "PaladinsHammer": "Potężny, powracający młot", + "BeeWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "NecroBreastplate": "5% zwiększone obrażenia dystansowe", + "LargeAmethyst": "Do „Zdobądź flagę”. Wypada, kiedy giniesz", + "LargeTopaz": "Do „Zdobądź flagę”. Wypada, kiedy giniesz", + "LargeSapphire": "Do „Zdobądź flagę”. Wypada, kiedy giniesz", + "LargeEmerald": "Do „Zdobądź flagę”. Wypada, kiedy giniesz", + "LargeRuby": "Do „Zdobądź flagę”. Wypada, kiedy giniesz", + "LargeDiamond": "Do „Zdobądź flagę”. Wypada, kiedy giniesz", + "NecroGreaves": "5% zwiększone obrażenia dystansowe", + "JungleKey": "Odblokowuje kufer z dżungli w lochu", + "CorruptionKey": "Odblokowuje kufer zepsucia w lochu", + "CrimsonKey": "Odblokowuje szkarłatny kufer w lochu", + "HallowedKey": "Odblokowuje bajkowy kufer w lochu", + "Cherry": "{$CommonItemTooltip.MinorStats}", + "SpectrePaintbrush": "Używany w połączeniu z farbą do malowania bloków", + "SpectrePaintRoller": "Używany w połączeniu z farbą do malowania ścian", + "GolfBallDyedOrange": "{$CommonItemTooltip.GolfBall}", + "ShroomiteHeadgear": "15% zwiększone obrażenia od strzał\n5% większa szansa na dystansowe trafienie krytyczne", + "ShroomiteMask": "15% zwiększone obrażenia od kul\n5% większa szansa na dystansowe trafienie krytyczne", + "ShroomiteHelmet": "15% zwiększone obrażenia od rakiet\n5% większa szansa na dystansowe trafienie krytyczne", + "KiteBoneSerpent": "{$CommonItemTooltip.Kite}", + "ShroomiteLeggings": "7% większa szansa na dystansowe trafienie krytyczne\n12% zwiększona szybkość poruszania się", + "Autohammer": "Zamienia sztabki zielenicowe w sztabki grzybielenicowe", + "Jetpack": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressUpToBooster}", + "CenxsTiara": "{$CommonItemTooltip.DevItem}", + "CenxsBreastplate": "{$CommonItemTooltip.DevItem}", + "CenxsLeggings": "{$CommonItemTooltip.DevItem}", + "CrownosMask": "{$CommonItemTooltip.DevItem}", + "CrownosBreastplate": "{$CommonItemTooltip.DevItem}", + "CrownosLeggings": "{$CommonItemTooltip.DevItem}", + "CobaltShield": "Daje odporność na odrzut", + "WillsHelmet": "{$CommonItemTooltip.DevItem}", + "WillsBreastplate": "{$CommonItemTooltip.DevItem}", + "WillsLeggings": "{$CommonItemTooltip.DevItem}", + "JimsHelmet": "{$CommonItemTooltip.DevItem}", + "JimsBreastplate": "{$CommonItemTooltip.DevItem}", + "JimsLeggings": "{$CommonItemTooltip.DevItem}", + "AaronsHelmet": "{$CommonItemTooltip.DevItem}", + "AaronsBreastplate": "{$CommonItemTooltip.DevItem}", + "AaronsLeggings": "{$CommonItemTooltip.DevItem}", + "VampireKnives": "Szybki rzut wysysającymi życie sztyletami", + "AquaScepter": "Przywołuje strugę wody", + "ScourgeoftheCorruptor": "Potężny oszczep uwalniający małych pożeraczy", + "Banana": "{$CommonItemTooltip.MinorStats}", + "SweetheartNecklace": "Uwalnia pszczoły i zwiększa szybkość poruszania się, kiedy otrzymasz obrażenia", + "FlurryBoots": "Posiadacz biega superszybko", + "LuckyHorseshoe": "Anuluje obrażenia spowodowane upadkiem", + "DTownsHelmet": "{$CommonItemTooltip.DevItem}", + "DTownsBreastplate": "{$CommonItemTooltip.DevItem}", + "DTownsLeggings": "{$CommonItemTooltip.DevItem}", + "GroxTheGreatWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "StillLife": "{$PaintingArtist.Crowno}", + "BloodyGoblet": "{$PaintingArtist.Crowno}", + "WickedUndead": "{$PaintingArtist.Crowno}", + "CenxsDress": "{$CommonItemTooltip.DevItem}", + "CenxsDressPants": "{$CommonItemTooltip.DevItem}", + "ShinyRedBalloon": "Zwiększa wysokość skoku", + "MagicCuffs": "Zwiększa maksymalną liczbę punktów many o 20\nPrzy otrzymaniu obrażeń odnawia manę", + "SilverWatch": "Pokazuje godzinę", + "AnkhCharm": "Daje odporność na większość osłabień", + "AnkhShield": "Zapewnia odporność przed odrzutem i blokami ognia\nDaje odporność na większość osłabień", + "WaterBolt": "Rzuca powolnym pociskiem wody", + "GolfBall": "{$CommonItemTooltip.GolfBall}", + "Dynamite": "Duży wybuch niszczący większość płytek", + "Grenade": "Mały wybuch, który nie niszczy płytek", + "GoldWatch": "Pokazuje godzinę", + "FartinaJar": "Daje posiadaczowi umiejętność podwójnego skoku", + "HellstoneBar": "„Gorąca w dotyku”", + "LeprechaunHat": "Wygląda jak leprechaun, serio", + "LeprechaunShirt": "Powiedz, gdzie ukryłeś złoto, skrzacie!", + "LeprechaunPants": "Złoto. Złoto. Złoto. Dawaj złoto!", + "GoodieBag": "{$CommonItemTooltip.RightClickToOpen}", + "CandyCornRifle": "33% szans niezużycia amunicji", + "Sickle": "Pozwala pozyskiwać siano z trawy", + "KiteAngryTrapper": "{$CommonItemTooltip.Kite}", + "TatteredFairyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "SpiderEgg": "Przyzywa pająka-chowańca", + "MagicalPumpkinSeed": "Przyzywa kabaczka-chowańca", + "DepthMeter": "Pokazuje głębokość", + "BatScepter": "Przyzywa nietoperze atakujące twoich wrogów", + "RavenStaff": "Przyzywa kruka walczącego po twojej stronie", + "JungleKeyMold": "Używana do stworzenia klucza z dżungli", + "CorruptionKeyMold": "Używana do stworzenia klucza zepsucia", + "CrimsonKeyMold": "Używana do stworzenia szkarłatnego klucza", + "HallowedKeyMold": "Używana do stworzenia bajkowego klucza", + "FrozenKeyMold": "Używana do stworzenia zamarzniętego klucza", + "RottenEgg": "Najlepiej nim rzucać w ludzi", + "UnluckyYarn": "Przyzywa czarnego kotka", + "TheHorsemansBlade": "Przyzywa dynię atakującą twoich wrogów", + "SpookyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "GhostManifestation": "{$PaintingArtist.Crowno}", + "Graveyard": "{$PaintingArtist.Crowno}", + "Reborn": "{$PaintingArtist.Crowno}", + "CursedSapling": "Przyzywa przeklęte drzewko, które za tobą podąża", + "PumpkinMoonMedallion": "Przyzywa dyniowy księżyc", + "Nevermore": "{$PaintingArtist.Crowno}", + "SniperScope": "Zwiększa zasięg widzenia dla pistoletów (, żeby oddalić)\n10% zwiększone obrażenia dystansowe oraz szansa na trafienie krytyczne", + "BreathingReed": "Daje możliwość oddychania pod wodą i zwiększa czas wdechu", + "JellyfishDivingGear": "Pozwala pływać i znacznie wydłuża oddychanie pod wodą\nZapewnia światło pod wodą", + "ArcticDivingGear": "Pozwala pływać i znacznie wydłuża oddychanie pod wodą\nZapewnia światło pod wodą i dodatkową zwinność na lodzie", + "GnomeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Gnome}", + "FartInABalloon": "Daje posiadaczowi umiejętność podwójnego skoku\nZwiększa wysokość skoku", + "DandelionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Dandelion}", + "GolfPainting3": "{$PaintingArtist.Crowno}", + "ArkhalisWings": "{$ItemTooltip.ArkhalisHat}\n{$CommonItemTooltip.FlightAndSlowfall}", + "Present": "{$CommonItemTooltip.RightClickToOpen}", + "Flipper": "Pozwala pływać", + "RedRyder": "„Tylko sobie w oko nie strzel!”", + "FestiveWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BladeofGrass": "Daje szansę zatrucia wrogów", + "EldMelter": "Używa żelu jako amunicji", + "KiteGoldfish": "{$CommonItemTooltip.Kite}", + "ReindeerBells": "Przyzywa renifera, którego można dosiąść", + "CnadyCanePickaxe": "Może wydobywać meteoryt", + "KiteBunnyCrimson": "{$CommonItemTooltip.Kite}", + "KiteBunnyCorrupt": "{$CommonItemTooltip.Kite}", + "HandWarmer": "Daje odporność na efekty chłodu i zamrożenia", + "Coal": "„Grzeczność nie była w tym roku twoją najmocniejszą stroną”", + "GolfPainting2": "{$PaintingArtist.Crowno}", + "DogWhistle": "Przyzywa szczeniaczka", + "ChristmasTreeSword": "Strzela ozdobami świątecznymi", + "ChainGun": "50% szans niezużycia amunicji", + "ObsidianSkull": "Daje odporność na bloki ognia", + "Razorpine": "Strzela igłami sosnowymi ostrymi jak brzytwa", + "BlizzardStaff": "Zalewa obszar soplami lodu", + "SnowmanCannon": "Strzela pociskami samonaprowadzającymi", + "NorthPole": "Strzela lodową włócznią, z której lecą płatki śniegu", + "NaughtyPresent": "Przyzywa mroźny księżyc", + "BabyGrinchMischiefWhistle": "Przyzywa młodego grincha", + "StarCannon": "Strzela spadającymi gwiazdami", + "Fez": "„Fezy są fajne”", + "JungleRose": "„Och, ale piękna”", + "FeralClaws": "12% zwiększona szybkość walki w zwarciu", + "AnkletoftheWind": "10% zwiększona szybkość poruszania się", + "GolfClubIron": "{$CommonItemTooltip.GolfIron}", + "WhoopieCushion": "„Może irytować innych”", + "HeavyWorkBench": "Używany do tworzenia bardziej złożonych przedmiotów", + "AmmoBox": "Zmniejsza zużycie amunicji o 20%", + "Flamelash": "Przyzywa kulę ognia, którą można kontrolować", + "VenomStaff": "Strzela jadowitym kłem, który przeszywa wielu wrogów", + "SpectreMask": "Zwiększa maksymalną liczbę punktów many o 60 i zmniejsza zużycie many o 13%\n5% zwiększone obrażenia magiczne oraz szansa na trafienie krytyczne", + "BoneWelder": "{$CommonItemTooltip.SpecialCrafting}", + "FleshCloningVaat": "{$CommonItemTooltip.SpecialCrafting}", + "GlassKiln": "{$CommonItemTooltip.SpecialCrafting}", + "LihzahrdFurnace": "{$CommonItemTooltip.SpecialCrafting}", + "LivingLoom": "{$CommonItemTooltip.SpecialCrafting}", + "SkyMill": "{$CommonItemTooltip.SpecialCrafting}", + "IceMachine": "{$CommonItemTooltip.SpecialCrafting}", + "BeetleHelmet": "6% zwiększone obrażenia w walce w zwarciu\nWrogowie częściej biorą cię na cel", + "BeetleScaleMail": "8% zwiększone obrażenia w walce w zwarciu oraz szansa na trafienie krytyczne\n6% zwiększona szybkość poruszania się i walki w zwarciu", + "BeetleShell": "5% zwiększone obrażenia w walce w zwarciu oraz szansa na trafienie krytyczne\nWrogowie częściej biorą cię na cel", + "BeetleLeggings": "6% zwiększona szybkość poruszania się i walki w zwarciu\nWrogowie częściej biorą cię na cel", + "SteampunkBoiler": "{$CommonItemTooltip.SpecialCrafting}", + "HoneyDispenser": "{$CommonItemTooltip.SpecialCrafting}", + "BrickLayer": "Zwiększa szybkość układania płytek", + "GolfPainting1": "{$PaintingArtist.Crowno}", + "PaintSprayer": "Automatycznie maluje umieszczone przedmioty", + "PortableCementMixer": "Zwiększa szybkość umieszczania ścian", + "CelestialMagnet": "Zwiększa zasięg podnoszenia gwiazdek many", + "ClayPot": "Sadzi rośliny", + "CelestialEmblem": "Zwiększa zasięg podnoszenia gwiazdek many\n15% zwiększone obrażenia magiczne", + "CelestialCuffs": "Zwiększa zasięg podnoszenia gwiazdek many\nPrzy otrzymaniu obrażeń odnawia manę", + "PulseBow": "Strzela naładowaną strzałą", + "NaturesGift": "6% mniejsze zużycie many", + "KiteSandShark": "{$CommonItemTooltip.Kite}", + "KiteShark": "{$CommonItemTooltip.Kite}", + "RestorationPotion": "Zmniejszony czas odnowienia mikstur", + "Gatligator": "50% szans niezużycia amunicji\nBardzo niecelny", + "WaterGun": "Strzela nieszkodliwym strumieniem wody", + "MagicHat": "7% zwiększone obrażenia magiczne oraz szansa na trafienie krytyczne", + "Gi": "5% zwiększone obrażenia oraz szansa na trafienie krytyczne\n10% zwiększona szybkość poruszania się i walki w zwarciu", + "GypsyRobe": "6% zwiększone obrażenia magiczne oraz szansa na trafienie krytyczne\nZmniejsza zużycie many o 10%", + "JungleHat": "Zwiększa maksymalną liczbę punktów many o 40\n4% większa szansa na magiczne trafienie krytyczne", + "BeetleWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "JungleShirt": "Zwiększa maksymalną liczbę punktów many o 20\n4% większa szansa na magiczne trafienie krytyczne", + "Gel": "„I smaczny, i łatwopalny”", + "JunglePants": "Zwiększa maksymalną liczbę punktów many o 20\n4% większa szansa na magiczne trafienie krytyczne", + "NeonTetra": "„Te kolorowe łuski chyba można drogo sprzedać”.", + "Grapefruit": "{$CommonItemTooltip.MinorStats}", + "MiningPotion": "Zwiększa szybkość kopania o 25%", + "HeartreachPotion": "Zwiększa zasięg podnoszenia serc życia", + "DungeonFishingCrateHard": "{$ItemTooltip.DungeonFishingCrate}", + "BuilderPotion": "Zwiększa szybkość i zasięg układania obiektów", + "TitanPotion": "Zwiększa odrzut", + "FlipperPotion": "Pozwala ci szybko poruszać się w cieczach", + "DivineEye": "{$PaintingArtist.Darthkitten}", + "TrapsightPotion": "Pozwala dostrzegać pobliskie zagrożenia", + "WoodenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "IronCrate": "{$CommonItemTooltip.RightClickToOpen}", + "GoldenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "AmmoReservationPotion": "20% szans niezużycia amunicji", + "LifeforcePotion": "Zwiększa maksymalną liczbę punktów życia o 20%", + "EndurancePotion": "Zmniejsza otrzymywane obrażenia o 10%", + "RagePotion": "Zwiększa szansę na trafienie krytyczne o 10%", + "InfernoPotion": "Podpala pobliskich wrogów", + "WrathPotion": "Zwiększa obrażenia o 10%", + "GolfClubDriver": "{$CommonItemTooltip.GolfDriver}", + "RecallPotion": "Teleportuje cię do domu", + "TeleportationPotion": "Teleportuje cię w losowe miejsce", + "LovePotion": "Rzuć nią, żeby ktoś się w tobie zakochał", + "StinkPotion": "Rzuć nią, żeby ktoś paskudnie śmierdział", + "BandageBoy": "{$PaintingArtist.Darthkitten}", + "SonarPotion": "Wykrywa rybę, która połknęła haczyk", + "CratePotion": "Zwiększa szansę wyłowienia skrzyni", + "WarmthPotion": "Zmniejsza obrażenia od źródeł zimna", + "VisitingThePyramids": "{$PaintingArtist.Leinfors}", + "Uluru": "{$PaintingArtist.darthmorf}", + "BeeGreaves": "Zwiększa obrażenia sług o 5%", + "HornetStaff": "Przyzywa szerszenia walczącego po twojej stronie", + "ImpStaff": "Przyzywa diablika walczącego po twojej stronie", + "Oasis": "{$PaintingArtist.Khaios}", + "LifeAboveTheSand": "{$PaintingArtist.Zoomo}", + "SnakesIHateSnakes": "{$PaintingArtist.Xman101}", + "Sunglasses": "„Świetnie w nich wyglądasz!”", + "TheSandsOfSlime": "{$PaintingArtist.Criddle}", + "JawsOfDeath": "{$PaintingArtist.Darthkitten}", + "BurningSpirit": "{$PaintingArtist.Zoomo}", + "HighTestFishingLine": "Żyłka nigdy nie pęka", + "FruitSalad": "{$CommonItemTooltip.MinorStats}", + "TackleBox": "Zmniejsza szanse ryby na połknięcie przynęty", + "WizardHat": "15% zwiększone obrażenia magiczne", + "ZephyrFish": "Przyzywa rybę zefiru", + "FrogLeg": "Zwiększa szybkość skoku i pozwala na skok automatyczny\nZwiększa odporność na upadki", + "Dragonfruit": "{$CommonItemTooltip.MediumStats}", + "KiteJellyfishPink": "{$CommonItemTooltip.Kite}", + "KiteJellyfishBlue": "{$CommonItemTooltip.Kite}", + "FinWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "OpticStaff": "Przyzywa bliźnięta walczące po twojej stronie", + "RedHat": "Dziwnie pachnie...", + "Goldfish": "„Uśmiecha się, chyba będzie smaczna”", + "Sandgun": "„Dobry pomysł!”", + "GuideVoodooDoll": "„Jesteś straszną osobą”.", + "DivingHelmet": "Znacznie wydłuża czas oddychania pod wodą", + "DemonScythe": "Ciska demoniczną kosą", + "Blowpipe": "Pozwala zbierać nasiona jako amunicję", + "Glowstick": "Działa, kiedy go zmoczysz", + "Seed": "Używać z dmuchawką", + "Aglet": "5% zwiększona szybkość poruszania się", + "ObsidianSkinPotion": "Daje odporność na lawę", + "RegenerationPotion": "Zapewnia regenerację życia", + "LifeCrystal": "Trwale zwiększa maksymalną liczbę punktów życia o 20", + "SwiftnessPotion": "25% zwiększona szybkość poruszania się", + "GillsPotion": "Oddychaj wodą zamiast powietrzem", + "IronskinPotion": "Zwiększ obronę o 8", + "ManaRegenerationPotion": "Zwiększona regeneracja many", + "MagicPowerPotion": "20% zwiększone obrażenia magiczne", + "FeatherfallPotion": "Spowalnia spadanie", + "SpelunkerPotion": "Pokazuje położenie skarbu i rudy", + "InvisibilityPotion": "Daje niewidzialność", + "ShinePotion": "Emituję aurę światła", + "NightOwlPotion": "Zwiększa widzenie w nocy", + "BattlePotion": "Zwiększa tempo rodzenia się przeciwników", + "ThornsPotion": "Atakujący również otrzymują obrażenia", + "WaterWalkingPotion": "Pozwala chodzić po wodzie", + "ArcheryPotion": "20% zwiększone obrażenia i szybkość strzał", + "HunterPotion": "Pokazuje położenie przeciwników", + "GravitationPotion": "Pozwala kontrolować grawitację", + "IllegalGunParts": "„Zakazane prawie wszędzie”", + "GolfClubWedge": "{$CommonItemTooltip.GolfWedge}", + "BetsyWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "Furnace": "Używany do wytapiania rudy", + "Loom": "Używane do tworzenia płótna", + "IronAnvil": "Używane do tworzenia przedmiotów z metalowych sztabek", + "Keg": "Używany do warzenia piwa", + "KiteManEater": "{$CommonItemTooltip.Kite}", + "WorkBench": "Używany do tworzenia podstawowych przedmiotów", + "GoblinBattleStandard": "Przyzywa armię goblinów", + "Sawmill": "Używany do tworzenia bardziej złożonych przedmiotów z drewna", + "Pwnhammer": "Potrafi niszczyć demoniczne ołtarze", + "CobaltHat": "Zwiększa maksymalną liczbę punktów many o 40\n9% większa szansa na magiczne trafienie krytyczne", + "CobaltHelmet": "7% zwiększona szybkość poruszania się\n12% zwiększona szybkość walki w zwarciu", + "CobaltMask": "10% zwiększone obrażenia dystansowe\n6% większa szansa na dystansowe trafienie krytyczne", + "MythrilHood": "Zwiększa maksymalną liczbę punktów many o 60\n15% zwiększone obrażenia magiczne", + "MythrilHelmet": "5% większa szansa na trafienie krytyczne w walce w zwarciu\n10% zwiększone obrażenia w walce w zwarciu", + "MythrilHat": "12% zwiększone obrażenia dystansowe\n7% większa szansa na dystansowe trafienie krytyczne", + "CobaltDrill": "Może wydobywać mithril i orichalcum", + "MythrilDrill": "Może wydobywać adamantyt i tytan", + "WingsNebula": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "Compass": "Pokazuje pozycję horyzontalną", + "DivingGear": "Pozwala pływać\nZnacznie wydłuża czas oddychania pod wodą", + "GPS": "Pokazuje pozycję\nPokazuje godzinę", + "ObsidianHorseshoe": "Anuluje obrażenia spowodowane upadkiem\nDaje odporność na bloki ognia", + "ObsidianShield": "Daje odporność na odrzut\nDaje odporność na bloki ognia", + "TinkerersWorkshop": "Pozwala na łączenie niektórych akcesoriów", + "CloudinaBalloon": "Daje posiadaczowi umiejętność podwójnego skoku\nZwiększa wysokość skoku", + "AdamantiteHeadgear": "Zwiększa maksymalną liczbę punktów many o 80\n11% zwiększone obrażenia magiczne oraz szansa na trafienie krytyczne", + "AdamantiteHelmet": "7% większa szansa na trafienie krytyczne w walce w zwarciu\n14% zwiększone obrażenia w walce w zwarciu", + "AdamantiteMask": "14% zwiększone obrażenia dystansowe\n8% większa szansa na dystansowe trafienie krytyczne", + "AdamantiteBreastplate": "6% zwiększone obrażenia", + "AdamantiteLeggings": "4% większa szansa na trafienie krytyczne\n5% zwiększona szybkość poruszania się", + "SpectreBoots": "Pozwala latać\nPosiadacz biega superszybko", + "FruitJuice": "{$CommonItemTooltip.MinorStats}", + "HolyWater": "Rozprzestrzenia efekt Bajkowa na niektóre bloki", + "CrimsonFishingCrateHard": "{$ItemTooltip.CrimsonFishingCrate}", + "FairyBell": "Przyzywa magicznego duszka", + "SuspiciousLookingEye": "Przyzywa Oko Cthulhu", + "ClockworkAssaultRifle": "Potrójna seria\nTylko pierwszy strzał zużywa amunicję", + "MoonCharm": "Nocą zamienia posiadacza w wilkołaka", + "KiteCrawltipede": "{$CommonItemTooltip.Kite}", + "SorcererEmblem": "15% zwiększone obrażenia magiczne", + "BandofRegeneration": "Powoli regeneruje życie", + "WarriorEmblem": "15% zwiększone obrażenia w walce w zwarciu", + "RangerEmblem": "15% zwiększone obrażenia dystansowe", + "DemonWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "AngelWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "RainbowRod": "Rzuca kontrolowaną tęczę", + "IceRod": "Przyzywa blok lodu", + "NeptunesShell": "Przemienia posiadacza w ryboludzia przy wejściu do wody", + "MagicMirror": "Spójrz w lustro, żeby wrócić do domu", + "Flamethrower": "Używa żelu jako amunicji", + "Wrench": "Umieszcza czerwony kabel", + "WireCutter": "Usuwa kabel", + "CrystalBullet": "Przy uderzeniu tworzy kilka kryształowych odłamków", + "HolyArrow": "Przy uderzeniu przyzywa spadające gwiazdy", + "MagicDagger": "Magicznie powracający sztylet", + "CrystalStorm": "Przyzywa błyskawiczne, kryształowe odłamki ognia", + "CursedFlames": "Przyzywa nieświęte kule ogniste", + "SoulofLight": "„Esencja stworzeń światła”", + "SoulofNight": "„Esencja stworzeń mroku”", + "CursedFlame": "Nawet woda nie ugasi tego ognia", + "CursedTorch": "Można umieścić w wodzie", + "AdamantiteForge": "Używana do wytapiania rudy adamantytu i tytanu", + "MythrilAnvil": "Używane do tworzenia przedmiotów ze sztabek mithrilu, orichalcum, adamantytu i tytanu", + "UnicornHorn": "„Ostry i magiczny!”", + "CrownosWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "LightShard": "„Czasami mają go stworzenia z pustyń światła”", + "RedPressurePlate": "Aktywuje się, gdy się na nią stanie", + "CloudinaBottle": "Daje posiadaczowi umiejętność podwójnego skoku", + "SpellTome": "Można ją zaczarować", + "PrismaticPunch": "{$CommonItemTooltip.MediumStats}", + "Megashark": "50% szans niezużycia amunicji\n„Starszy brat minirekina”", + "Shotgun": "Strzela salwą kul", + "FrozenCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "Mango": "{$CommonItemTooltip.MinorStats}", + "HermesBoots": "Posiadacz biega superszybko", + "GreenPressurePlate": "Aktywuje się, gdy się na nią stanie", + "GrayPressurePlate": "Aktywuje się, gdy gracz na nią nadepnie", + "BrownPressurePlate": "Aktywuje się, gdy gracz na nią nadepnie", + "MechanicalEye": "Przyzywa Bliźnięta", + "SoulofFright": "„Esencja prawdziwego przerażenia”", + "SoulofMight": "„Esencja Niszczyciela”", + "SoulofSight": "„Esencja wszechwiedzących obserwatorów”", + "HallowedPlateMail": "7% większa szansa na trafienie krytyczne", + "HallowedGreaves": "7% zwiększone obrażenia\n8% zwiększona szybkość poruszania się", + "HallowedHelmet": "15% zwiększone obrażenia dystansowe\n8% większa szansa na dystansowe trafienie krytyczne", + "CrossNecklace": "Po otrzymaniu obrażeń wydłuża czas trwania niewidzialności", + "ManaFlower": "8% mniejsze zużycie many\nAutomatyczne używanie mikstur many", + "Elderberry": "{$CommonItemTooltip.MinorStats}", + "MechanicalSkull": "Przyzywa Szkieletrona Prime’a", + "HallowedHeadgear": "Zwiększa maksymalną liczbę punktów many o 100\n12% zwiększone obrażenia magiczne oraz szansa na trafienie krytyczne", + "KiteYellow": "{$CommonItemTooltip.Kite}", + "DemoniteOre": "„Pulsuje mroczną energią”", + "SlimeCrown": "Przyzywa Króla Szlam", + "LightDisc": "Można połączyć 5", + "DemoniteBar": "„Pulsuje mroczną energią”", + "SoulofFlight": "„Esencja potężnych, latających stworzeń”", + "MusicBox": "Może nagrywać piosenki", + "Drax": "„Nie mylić z piłolofem”", + "Explosives": "Eksploduje po aktywacji", + "InletPump": "Kieruje wodę do pomp wylotowych", + "OutletPump": "Odbiera wodę z pomp wlotowych", + "Timer1Second": "Aktywuje się co sekundę", + "Timer3Second": "Aktywuje się co 3 sekundy", + "Timer5Second": "Aktywuje się co 5 sekund", + "BluePresent": "{$CommonItemTooltip.RightClickToOpen}", + "GreenPresent": "{$CommonItemTooltip.RightClickToOpen}", + "YellowPresent": "{$CommonItemTooltip.RightClickToOpen}", + "SnowGlobe": "Przyzywa mroźny legion", + "Carrot": "Przyzywa króliczka-chowańca", + "Vilethorn": "Przyzywa plugawy kolec", + "Starfury": "Sprawia, że z nieba spadają gwiazdy\n„Wykuta dzięki furii niebios”", + "PurificationPowder": "Usuwa zło", + "SmoothieofDarkness": "{$CommonItemTooltip.MinorStats}", + "RedsHelmet": "{$CommonItemTooltip.DevItem}", + "RedsBreastplate": "{$CommonItemTooltip.DevItem}", + "RedsLeggings": "{$CommonItemTooltip.DevItem}", + "Fish": "Przyzywa młodego pingwina", + "BloodOrange": "{$CommonItemTooltip.MinorStats}", + "Frostbrand": "Strzela lodowym pociskiem", + "RedPotion": "Tylko dla tych, którzy są jej warci", + "RottenChunk": "„Wygląda apetycznie!”", + "UnholyTrident": "Przyzywa diabelski trójkąt", + "FrostHelmet": "16% zwiększone obrażenia dystansowe i w walce w zwarciu", + "FrostBreastplate": "11% zwiększone obrażenia w walce w zwarciu oraz dystansowa szansa na trafienie krytyczne", + "FrostLeggings": "8% zwiększona szybkość poruszania się\n7% zwiększona szybkość ataku w zwarciu", + "WormFood": "Przyzywa Pożeracza Światów", + "TinWatch": "Pokazuje godzinę", + "TungstenWatch": "Pokazuje godzinę", + "PlatinumWatch": "Pokazuje godzinę", + "LeadAnvil": "Używane do tworzenia przedmiotów z metalowych sztabek", + "BeamSword": "Strzela promieniem światła", + "IceBlade": "Strzela lodowym pociskiem", + "IceBow": "Strzela mroźnymi strzałami", + "FrostStaff": "Strzela strumieniem mrozu", + "BlueCultistCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistDevote}", + "ButterflyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "FallenStar": "Znika po wschodzie słońca", + "Seaweed": "Przyzywa żółwia-chowańca", + "FairyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "Clentaminator": "Tworzy i niszczy biomy, które się nim popryska\nUżywa kolorowego roztworu", + "GreenSolution": "Używany przez czyściciela-skaziciela\nRozprzestrzenia czystość", + "BlueSolution": "Używany przez czyściciela-skaziciela\nRozprzestrzenia Bajkowo", + "PurpleSolution": "Używany przez czyściciela-skaziciela\nRozprzestrzenia Zepsucie", + "DarkBlueSolution": "Używany przez czyściciela-skaziciela\nRozprzestrzenia lśniące grzyby", + "RedSolution": "Używany przez czyściciela-skaziciela\nRozprzestrzenia Szkarłat", + "HarpyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BoneWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "Hammush": "Potrafi niszczyć demoniczne ołtarze", + "NettleBurst": "Przyzywa cierniową włócznię", + "CrimsonHelmet": "2% zwiększone obrażenia", + "CrimsonScalemail": "2% zwiększone obrażenia", + "CrimsonGreaves": "2% zwiększone obrażenia", + "DeathbringerPickaxe": "Może wydobywać piekielny kamień", + "Torch": "Daje światło", + "FlameWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "FrozenWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "GhostWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "LivingWoodWand": "Umieszcza żyjące drewno", + "GrapplingHook": "„Do mnie!”", + "Actuator": "Pozwala włączać i wyłączać bloki z materiałów stałych", + "Chain": "Można się po niej wspinać", + "BlueWrench": "Umieszcza niebieski kabel", + "GreenWrench": "Ustawia zielony kabel", + "BluePressurePlate": "Aktywuje się, gdy gracz na nią nadepnie", + "YellowPressurePlate": "Aktywuje się jeżeli stanie na nią cokolwiek innego niż gracz", + "FrozenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LuckyCoin": "Atakowanie przeciwników czasami daje dodatkowe monety", + "UnicornonaStick": "„Bawię się jak nigdy!”", + "SandstorminaBottle": "Daje posiadaczowi umiejętność ulepszonego podwójnego skoku", + "CanOfWorms": "{$CommonItemTooltip.RightClickToOpen}", + "MoonShell": "Nocą zamienia posiadacza w wilkołaka, a podczas wchodzenia do wody w ryboludzia", + "StarVeil": "Powoduje spadanie gwiazd i wydłuża czas trwania niewidzialności po otrzymaniu obrażeń", + "BloodyMoscato": "{$CommonItemTooltip.MinorStats}", + "MiningHelmet": "Zapewnia światło podczas noszenia", + "AdhesiveBandage": "Odporność na Krwawienie", + "ArmorPolish": "Odporność na Zniszczoną zbroję", + "Bezoar": "Odporność na Truciznę", + "Blindfold": "Odporność na Ciemność", + "FastClock": "Odporność na Spowolnienie", + "Megaphone": "Odporność na Uciszenie", + "Nazar": "Odporność na Klątwę", + "Vitamins": "Odporność na Osłabienie", + "TrifoldMap": "Odporność na Dezorientację", + "Lemon": "{$CommonItemTooltip.MinorStats}", + "TropicalSmoothie": "{$CommonItemTooltip.MinorStats}", + "PinaColada": "{$CommonItemTooltip.MinorStats}", + "PeachSangria": "{$CommonItemTooltip.MinorStats}", + "ArmorBracing": "Odporność na Osłabienie i Zniszczoną zbroję", + "MedicatedBandage": "Odporność na Truciznę i Krwawienie", + "ThePlan": "Odporność na Spowolnienie i Dezorientację", + "CountercurseMantra": "Odporność na Uciszenie i Klątwę", + "CoinGun": "Używa monet jako amunicji\nMonety o wyższej wartości zadają większe obrażenia", + "LavaCharm": "Daje 7-sekundową odporność na lawę", + "BananaDaiquiri": "{$CommonItemTooltip.MinorStats}", + "Pineapple": "{$CommonItemTooltip.MinorStats}", + "BoneWand": "Umieszcza kości", + "LeafWand": "Umieszcza liście", + "FlyingCarpet": "Pozwala posiadaczowi przez kilka sekund unosić się w powietrzu", + "AvengerEmblem": "12% zwiększone obrażenia", + "Lemonade": "{$CommonItemTooltip.MinorStats}", + "LandMine": "Wybucha, gdy się na nią stanie", + "Starfruit": "{$CommonItemTooltip.MediumStats}", + "Umbrella": "Trzymając ten przedmiot, będziesz wolniej spadać", + "ChlorophyteOre": "„Reaguje na światło”", + "GrapeJuice": "{$CommonItemTooltip.MajorStats}", + "IceSkates": "Daje dodatkową zwinność na lodzie\nLód się nie załamie, kiedy na niego spadniesz", + "SnowballLauncher": "Szybko strzela śnieżkami", + "ClimbingClaws": "Pozwalają zjeżdżać po ścianach\nJeszcze lepsze w połączeniu z kolcami do butów", + "AncientShadowHelmet": "7% zwiększona szybkość walki w zwarciu", + "AncientShadowScalemail": "7% zwiększona szybkość walki w zwarciu", + "AncientShadowGreaves": "7% zwiększona szybkość walki w zwarciu", + "AncientNecroHelmet": "5% zwiększone obrażenia dystansowe", + "AncientCobaltHelmet": "Zwiększa maksymalną liczbę punktów many o 40\n4% większa szansa na magiczne trafienie krytyczne", + "AncientCobaltBreastplate": "Zwiększa maksymalną liczbę punktów many o 20\n4% większa szansa na magiczne trafienie krytyczne", + "AncientCobaltLeggings": "Zwiększa maksymalną liczbę punktów many o 20\n4% większa szansa na magiczne trafienie krytyczne", + "BlackBelt": "Daje szansę na uniknięcie ataków", + "Boomstick": "Strzela salwą kul", + "Rope": "Można się po niej wspinać", + "Campfire": "Zwiększona regeneracja życia, gdy gracz znajduje się w pobliżu ogniska", + "Marshmallow": "Wbij ją na patyk i piecz nad ogniskiem", + "MarshmallowonaStick": "Piecz nad ogniskiem!", + "Coconut": "{$CommonItemTooltip.MinorStats}", + "ShoeSpikes": "Pozwalają zjeżdżać po ścianach\nJeszcze lepsze w połączeniu z pazurami wspinaczkowymi", + "TigerClimbingGear": "Pozwala wspinać się po ścianach", + "Tabi": "Pozwala wykonać zryw\nStuknij dwukrotnie odpowiedni kierunek", + "Minishark": "33% szans niezużycia amunicji\n„Pół rekina, pół giwery, totalny odlot”.", + "ManaRegenerationBand": "Zwiększa maksymalną liczbę punktów many o 20\nZwiększa tempo regeneracji many", + "SandstorminaBalloon": "Daje posiadaczowi umiejętność podwójnego skoku\nZwiększa wysokość skoku", + "MasterNinjaGear": "Pozwala wspinać się po ścianach i wykonać zryw\nDaje szansę na uniknięcie ataków", + "RopeCoil": "Rzuć, a otrzymasz linę, po której można się wspiąć", + "Blowgun": "Pozwala zbierać nasiona jako amunicję", + "BlizzardinaBottle": "Daje posiadaczowi umiejętność podwójnego skoku", + "EnchantedSword": "Strzela zaczarowanym promieniem miecza", + "PickaxeAxe": "„Nie mylić z młotoświdrem”", + "EatersBone": "Przyzywa młodego pożeracza dusz", + "BlendOMatic": "Używana do tworzenia przedmiotów", + "MeatGrinder": "Używana do tworzenia przedmiotów", + "Rambutan": "{$CommonItemTooltip.MinorStats}", + "Solidifier": "Używana do tworzenia przedmiotów", + "ActuationAccessory": "Automatycznie umieszcza siłowniki na umieszczonych obiektach", + "ActuationRod": "Aktywuje siłowniki", + "AlchemyTable": "33% szans na niezużycie składników wykorzystywanych do tworzenia mikstur", + "AncientBattleArmorHat": "15% zwiększone obrażenia magiczne i obrażenia sługi", + "AppleJuice": "{$CommonItemTooltip.MinorStats}", + "WoodenCrateHard": "{$ItemTooltip.WoodenCrate}", + "AncientHorn": "Przyzywa bazyliszka, którego można dosiąść", + "BloodNautilusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodNautilus}", + "GoblinSharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinShark}", + "AviatorSunglasses": "Uwalnia twojego wewnętrznego pilota\n„Przebierz się za streamerów!”", + "KitePigron": "{$CommonItemTooltip.Kite}", + "BalloonHorseshoeFart": "Daje posiadaczowi umiejętność podwójnego skoku\nZwiększa wysokość skoku i anuluje obrażenia spowodowane upadkiem", + "BalloonHorseshoeHoney": "Po otrzymaniu obrażeń uwalnia pszczoły\nZwiększa wysokość skoku i anuluje obrażenia spowodowane upadkiem", + "BalloonHorseshoeSharkron": "Daje posiadaczowi umiejętność podwójnego skoku\nZwiększa wysokość skoku i anuluje obrażenia spowodowane upadkiem", + "BalloonPufferfish": "Zwiększa wysokość skoku", + "BeesKnees": "Drewniane strzały zamieniają się w rząd pszczół", + "BejeweledValkyrieBody": "{$CommonItemTooltip.DevItem}\nElegancja ozdobiona klejnotami, którą szybujesz pośród chmur i burz", + "BejeweledValkyrieHead": "{$CommonItemTooltip.DevItem}\nStań się jak wiatr, dosiądź błyskawicę.", + "BloodEelBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodEelHead}", + "BewitchingTable": ", jeśli chcesz więcej sług", + "Bladetongue": "Przy zderzeniu wypuszcza strumień ichoru", + "BlessedApple": "Przyzywa jednorożca, którego można dosiąść", + "CorruptFishingCrateHard": "{$ItemTooltip.CorruptFishingCrate}", + "JungleFishingCrateHard": "{$ItemTooltip.JungleFishingCrate}", + "BoneCampfire": "Zwiększona regeneracja życia, gdy gracz znajduje się w pobliżu ogniska", + "BoneRattle": "Przyzywa młodego pyskostwora", + "BoneTorch": "„Emituje śmiertelny blask”", + "BoosterTrack": "Stuknij młotem, żeby zmienić kierunek", + "GolfClubPutter": "{$CommonItemTooltip.GolfPutter}", + "HallowedFishingCrateHard": "{$ItemTooltip.HallowedFishingCrate}", + "KiteRedAndYellow": "{$CommonItemTooltip.Kite}", + "BouncyGlowstick": "Działa, kiedy go zmoczysz", + "BouncyGrenade": "Mały wybuch, który nie niszczy płytek\nSkacze jak pasikonik", + "WillsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "BrainScrambler": "Przyzywa scutlixa, którego można dosiąść", + "BubbleGun": "Strzela szybko potężnymi bańkami", + "ButchersChainsaw": "Z trafionych przeciwników aż iskry idą", + "BloodSquidBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodSquid}", + "CelestialSigil": "Przyzywa nieuchronny koniec", + "CellPhone": "Wyświetla wszystko\nPozwala w dowolnym momencie wrócić do domu", + "ClingerStaff": "Przyzywa ścianę przeklętych płomieni", + "CogWall": "Produktywność 200%", + "CoinRing": "Zwiększa zasięg podnoszenia monet\nAtakowanie przeciwników czasami daje dodatkowe monety", + "CompanionCube": "Podatność na lawę!", + "CordageGuide": "Pozwala pozyskiwać pnącze z winorośli", + "CorruptFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "CosmicCarKey": "Przyzywa UFO, którym można latać", + "CrimsonFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "CrimsonHeart": "Przyzywa serce dające światło", + "CrystalSerpent": "Strzela wybuchowym ładunkiem kryształu", + "CrystalVileShard": "Przyzywa potężny, kryształowy kolec", + "CursedCampfire": "Zwiększona regeneracja życia, gdy gracz znajduje się w pobliżu ogniska", + "DaedalusStormbow": "Strzela strzałami z nieba", + "DayBreak": "„Rozerwij wrogów na strzępy włócznią światła!”", + "DemonCampfire": "Zwiększona regeneracja życia, gdy gracz znajduje się w pobliżu ogniska", + "DemonHeart": "Trwale zwiększa liczbę okienek na akcesoria", + "Detonator": "„Bebechy... i honorr!”", + "DevDye": "{$CommonItemTooltip.DevItem}", + "DjinnsCurse": "Pozbawia nóg, ale daje możliwość powolnego spadania", + "DPSMeter": "Pokazuje obrażenia na sekundę", + "DrillContainmentUnit": "Przyzywa świder, którego można dosiąść", + "DungeonFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "EoCShield": "Pozwala graczowi wykonać zryw i uderzyć przeciwnika\nStuknij dwukrotnie odpowiedni kierunek", + "FishermansGuide": "Pokazuje informacje wędkarskie", + "FishFinder": "Pokazuje pogodę, fazę księżyca i informacje wędkarskie", + "FishronWings": "{$CommonItemTooltip.FlightAndSlowfall}\nPozwala na szybsze przemieszczanie się w wodzie", + "Flairon": "Pluje samonaprowadzającymi bańkami", + "FleshKnuckles": "Wrogowie częściej biorą cię na cel", + "FloatingIslandFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "FlowerBoots": "Na trawie, po której chodzisz, rosną kwiatki", + "FlyingKnife": "Rzuca latającym nożem, który można kontrolować", + "GolfBallDyedBrown": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedBlue": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedBlack": "{$CommonItemTooltip.GolfBall}", + "FragmentNebula": "„Moc galaktyki jest zawarta w tym fragmencie”", + "FragmentSolar": "„W tym fragmencie spoczywa furia wszechświata”", + "FragmentStardust": "„Zachwycające cząsteczki krążą wokół tego fragmentu”", + "FragmentVortex": "„Z tego fragmentu emanują kłębiące energie”", + "FrozenCampfire": "Zwiększona regeneracja życia, gdy gracz znajduje się w pobliżu ogniska", + "FuzzyCarrot": "Przyzywa króliczka, którego można dosiąść", + "GemLockAmber": ", żeby umieścić lub usunąć wielkie bursztyny", + "GemLockAmethyst": ", żeby umieścić lub usunąć wielkie ametysty", + "GemLockDiamond": ", żeby umieścić lub usunąć wielkie diamenty", + "GemLockEmerald": ", żeby umieścić lub usunąć wielkie szmaragdy", + "GemLockRuby": ", żeby umieścić lub usunąć wielkie rubiny", + "GemLockSapphire": ", żeby umieścić lub usunąć wielkie szafiry", + "GemLockTopaz": ", żeby umieścić lub usunąć wielkie topazy", + "GoblinTech": "Pokazuje szybkość poruszania się, obrażenia na sekundę i wartościowe rudy", + "GoldPickaxe": "Może wydobywać meteoryt", + "GoldRing": "Zwiększa zasięg podnoszenia monet", + "Plum": "{$CommonItemTooltip.MinorStats}", + "KiteBunny": "{$CommonItemTooltip.Kite}", + "HallowedFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "HardySaddle": "Przyzywa żółwia, którego można dosiąść", + "HellwingBow": "Drewniane strzały zamieniają się w płonące nietoperze", + "HerbBag": "{$CommonItemTooltip.RightClickToOpen}", + "HiveBackpack": "Zwiększa siłę sprzymierzonych pszczół", + "HoneyedGoggles": "Przyzywa pszczołę, którą można latać", + "IceMirror": "Spójrz w lustro, żeby wrócić do domu", + "IchorCampfire": "Zwiększona regeneracja życia, gdy gracz znajduje się w pobliżu ogniska", + "EyeballFlyingFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EyeballFlyingFish}", + "JungleFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LargeAmber": "Do „Zdobądź flagę”. Wypada, kiedy giniesz", + "LaserRuler": "Tworzy na ekranie linie pomiarowe ułatwiające ustawianie bloków", + "LastPrism": "„Wystrzel tęczę niszczącą wszelkie formy życia”", + "LifeformAnalyzer": "Pokazuje nazwy pobliskich, rzadkich stworzeń", + "LightKey": "„Naładowany esencją wielu dusz”", + "LivingMahoganyLeafWand": "Umieszcza mahoniowe liście", + "LivingMahoganyWand": "Umieszcza żyjący mahoń", + "LockBox": "{$CommonItemTooltip.RightClickToOpen}\nWymaga złotego klucza", + "LogicGateLamp_Faulty": "Umieszczenie tego przedmiotu na lampkach bramki logicznej sprawi, że będzie się ona losowo aktywować", + "LogicGateLamp_Off": "Umieść ją na bramkach logicznych, żeby dodać punkty sprawdzające", + "LogicGateLamp_On": "Umieść ją na bramkach logicznych, żeby dodać punkty sprawdzające", + "LogicGate_NOR": "Wykrywa bramkę logiczną umieszczoną u góry\nAktywuje się, gdy wszystkie lampki są wyłączone, w przeciwnym wypadku nieaktywny", + "LogicGate_NXOR": "Wykrywa bramkę logiczną umieszczoną u góry\nAktywuje się, gdy żadna lampka nie jest włączona lub są włączone co najmniej dwie lampki, w przeciwnym wypadku nieaktywny\nCzęsto także nazywany NXOR", + "LogicGate_OR": "Wykrywa bramkę logiczną umieszczoną u góry\nAktywuje się, gdy włączona jest dowolna lampka, w przeciwnym wypadku nieaktywny", + "LogicGate_XOR": "Wykrywa bramkę logiczną umieszczoną u góry\nAktywuje się, gdy włączona jest tylko jedna lampka, w przeciwnym wypadku nieaktywny", + "LogicSensor_Above": "Aktywuje się, gdy gracz na nim stoi, w przeciwnym wypadku nieaktywny", + "LogicSensor_Honey": "Aktywuje się, gdy jest na nim miód, w przeciwnym wypadku nieaktywny", + "LogicSensor_Lava": "Aktywuje się, gdy jest na nim lawa, w przeciwnym wypadku nieaktywny", + "LogicSensor_Liquid": "Aktywuje się, gdy jest na nim ciecz, w przeciwnym wypadku nieaktywny", + "LogicSensor_Moon": "Aktywuje się w nocy", + "LogicSensor_Sun": "Aktywuje się za dnia", + "LogicSensor_Water": "Aktywuje się, gdy jest na nim woda, w przeciwnym wypadku nieaktywny", + "LokisDye": "{$CommonItemTooltip.DevItem}", + "LokisHelm": "{$CommonItemTooltip.DevItem}\nNieład pochodzi od ładu, strach od odwagi, słabość od siły", + "LokisPants": "{$CommonItemTooltip.DevItem}\nTryby sprawiedliwości mielą wolno, ale za to niezwykle dokładnie.", + "LokisShirt": "{$CommonItemTooltip.DevItem}\nZnaj siebie, znaj wroga swego. Tysiąc bitew, tysiąc zwycięstw...", + "ZombieMermanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieMerman}", + "LunarBar": "„Wibruje świetlistą, niebiańską energią”", + "LunarCraftingStation": "Używany do tworzenia przedmiotów z księżycowych fragmentów i luminytu", + "LunarFlareBook": "Strzela flarami księżycowymi", + "LunarHook": "Marzy ci się księżyc? No to go zahacz i tutaj ściągnij!", + "LunarOre": "„Kamyk z niebios”", + "MagicLantern": "Przyzywa magiczną lampę pokazującą pobliskie skarby", + "MechanicalLens": "Daje ulepszone przeglądanie kabli", + "MetalDetector": "Pokazuje najbardziej wartościową rudę w pobliżu", + "MeteorStaff": "Strzela meteorami", + "Minecart": "Przejedźmy się", + "MinecartTrack": "Uderz młotem w ostatni tor, żeby zmienić typ zderzaka\nUderz młotem w skrzyżowanie, żeby zmienić kierunek", + "MolotovCocktail": "Mały wybuch podpalający przeciwników\nChwilowo podpala pobliski obszar", + "MoneyTrough": "Przyzywa latającą świnkę skarbonkę, która przechowuje twoje przedmioty", + "MoonlordArrow": "Leci z prędkością dźwięku", + "MoonlordBullet": "„Przeszywa przeciwników, trafiając kilku naraz”", + "Apricot": "{$CommonItemTooltip.MinorStats}", + "MothronWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "MulticolorWrench": ", trzymając klucz, żeby edytować ustawienia kabli", + "NebulaArcanum": "Tworzy astralną energię ścigającą twoich przeciwników", + "NebulaBlaze": "„Prosto z pasa Oriona do twojej dłoni”", + "NebulaBreastplate": "9% zwiększone obrażenia magiczne oraz szansa na trafienie krytyczne", + "NebulaHelmet": "Zwiększa maksymalną liczbę punktów many o 60 i zmniejsza zużycie many o 15%\n7% zwiększone obrażenia magiczne oraz szansa na trafienie krytyczne", + "NebulaLeggings": "10% zwiększone obrażenia magiczne\n10% zwiększona szybkość poruszania się", + "NebulaMonolith": "„Posiądź cząstkę mocy z wieży mgławicy”", + "NightKey": "„Naładowany esencją wielu dusz”", + "NightVisionHelmet": "Poprawia widzenie", + "GolfBallDyedLimeGreen": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedGreen": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedCyan": "{$CommonItemTooltip.GolfBall}", + "PartyBundleOfBalloonTile": "„Związane tak dla radochy”", + "PartyGirlGrenade": "Mały wybuch, który nie niszczy płytek", + "PartyMonolith": "„Albowiem niebo zapłacze balonami”", + "PartyPresent": "Pewnie zastanawiasz się, co jest w środku?", + "PDA": "Wyświetla wszystko", + "PeaceCandle": "Sprawia, że otaczające cię stwory nie są tak wrogo nastawione", + "PedguinHat": "Zostań Pedguinem\n„Przebierz się za streamerów!”", + "PedguinPants": "Zostań Pedguinem\n„Przebierz się za streamerów!”", + "PedguinShirt": "Zostań Pedguinem\n„Przebierz się za streamerów!”", + "Phantasm": "66% szans niezużycia amunicji", + "Pigronata": "Wtłucz jej porządnie!\nW środku możesz znaleźć niespodziankę!", + "PinkGel": "„Odbijająca się słodycz!”", + "PinkSlimeBlock": "Skacze jak pasikonik", + "PirateStaff": "Przyzywa piratów walczących po twojej stronie", + "PixelBox": "Oddziela kable\nŚwiatła są włączone przy sygnałach horyzontalnych\nŚwiatła są wyłączone przy sygnałach skrzyżowanych", + "PlatinumPickaxe": "Może wydobywać meteoryt", + "PocketMirror": "Odporność na skamienienie", + "PressureTrack": "Nie można używać na zboczach", + "ProjectilePressurePad": "Aktywuje się przy zetknięciu z pociskiem", + "PsychoKnife": "Pozwala ci się ukryć", + "PutridScent": "Wrogowie rzadziej biorą cię na cel\n5% zwiększone obrażenia oraz szansa na trafienie krytyczne", + "GolfBallDyedYellow": "{$CommonItemTooltip.GolfBall}", + "Radar": "Wykrywa pobliskich wrogów", + "RainbowCampfire": "Zwiększona regeneracja życia, gdy gracz znajduje się w pobliżu ogniska", + "GolfBallDyedViolet": "{$CommonItemTooltip.GolfBall}", + "RazorbladeTyphoon": "Rzuca szybkie ostrokoła", + "RedsYoyo": "{$CommonItemTooltip.DevItem}", + "REK": "Pokazuje liczbę potworów, zabójstw i rzadkich stworzeń", + "RoyalGel": "Szlamy stają się przyjazne", + "SailfishBoots": "Posiadacz biega superszybko", + "SandFallBlock": "Spadający piasek, nie zrobi ci nic złego", + "SandFallWall": "Spadający piasek, nie zrobi ci nic złego", + "ScalyTruffle": "Przyzywa smosiaka, którego można dosiąść", + "Sextant": "Pokazuje fazę księżyca", + "ShadowFlameBow": "Strzela strzałami cienistego płomienia", + "ShadowFlameHexDoll": "Przyzywa macki cienistego płomienia atakujące twoich wrogów", + "ShadowFlameKnife": "Przy trafieniu rzuca na wroga cienisty płomień", + "SharkronBalloon": "Zwiększa wysokość skoku\nDaje posiadaczowi umiejętność podwójnego skoku", + "SharkToothNecklace": "Zwiększa penetrację pancerza o 5", + "SharpeningStation": "Zwiększa penetrację pancerza przez broń białą", + "ShinyStone": "Znacznie zwiększa regenerację życia w bezruchu", + "ShrimpyTruffle": "Przyciąga legendarne stworzenie, które świetnie czuje się w wodzie i w walce", + "SillyBalloonGreen": "„Pachnie miętą i radością”", + "SillyBalloonGreenWall": "„Pachnie miętą i radością”", + "SillyBalloonMachine": "Nieustanna impreza!", + "SillyBalloonPink": "„Pachnie gumą balonową i szczęściem”", + "SillyBalloonPinkWall": "„Pachnie gumą balonową i szczęściem”", + "SillyBalloonPurple": "„Pachnie lawendą i entuzjazmem”", + "SillyBalloonPurpleWall": "„Pachnie lawendą i entuzjazmem”", + "SillyStreamerBlue": "O dziwo da się po tym wspinać!", + "SillyStreamerGreen": "O dziwo da się po tym wspinać!", + "SillyStreamerPink": "O dziwo da się po tym wspinać!", + "SkiphsHelm": "{$CommonItemTooltip.DevItem}", + "SkiphsPants": "{$CommonItemTooltip.DevItem}", + "SkiphsShirt": "{$CommonItemTooltip.DevItem}", + "TheBrideBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TheBride}", + "DTownsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "SlimeGun": "Strzela nieszkodliwym strumieniem szlamu", + "SlimySaddle": "Przyzywa szlama, którego można dosiąść", + "KiteKoi": "{$CommonItemTooltip.Kite}", + "SnowFallBlock": "Dużo lepszy niż śnieżna kula", + "SnowFallWall": "Dużo lepszy niż śnieżna kula", + "SolarEruption": "„Uderz furią słońca”", + "RedsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "Hoverboard": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "CenxsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "SolarMonolith": "„Posiądź cząstkę mocy ze słonecznej wieży”", + "SolarTablet": "Przyzywa zaćmienie", + "SoulDrain": "Wysysa życie z wrogów", + "SpelunkerGlowstick": "Pokazuje pobliski skarb", + "SpiderStaff": "Przyzywa pająki walczące po twojej stronie", + "SporeSac": "Przyzywa zarodniki atakujące twoich wrogów", + "GolfClubChlorophyteDriver": "{$CommonItemTooltip.GolfDriver}", + "StardustCellStaff": "Przyzywa ogniwo pyłu gwiezdnego walczące po twojej stronie\nAleż one się czepiają, jak zaraza", + "StardustDragonStaff": "Przyzywa smoka pyłu gwiezdnego walczącego po twojej stronie\n„Po co komu zgraja sług, jak masz wielkiego smoka?”", + "GolfClubDiamondWedge": "{$CommonItemTooltip.GolfWedge}", + "GolfClubShroomitePutter": "{$CommonItemTooltip.GolfPutter}", + "StardustMonolith": "„Posiądź cząstkę mocy z wieży pyłu gwiezdnego”", + "FloatingIslandFishingCrateHard": "{$ItemTooltip.FloatingIslandFishingCrate}", + "StickyGrenade": "Mały wybuch, który nie niszczy płytek\n„Może ciężko się rzucać”.", + "Stopwatch": "Pokazuje szybkość poruszania się gracza", + "StrangeBrew": "„Wygląda i pachnie paskudnie”", + "StrangePlant1": "Można wymienić za rzadkie barwniki", + "StrangePlant2": "Można wymienić za rzadkie barwniki", + "StrangePlant3": "Można wymienić za rzadkie barwniki", + "StrangePlant4": "Można wymienić za rzadkie barwniki", + "SummonerEmblem": "15% zwiększone obrażenia przywołanej istoty", + "Sundial": "Raz na tydzień pozwala przyśpieszyć czas", + "SuperAbsorbantSponge": "Może wchłonąć nieskończone ilości wody", + "SuspiciousLookingTentacle": "Wzywa świecące, podejrzanie wyglądające oko\n„Wiem, co sobie myślisz…”", + "TallyCounter": "Pokazuje liczbę zabitych przez gracza potworów", + "TartarSauce": "Przyzywa miniminotaura", + "TempestStaff": "Przyzywa rekinada walczące po twojej stronie", + "TheBrideDress": "„I że ci nie odpuszczę aż do śmierci…”", + "TheBrideHat": "„Nie opuszczę…”", + "Toxikarp": "Pluje toksycznymi bańkami", + "Tsunami": "Strzela 5 strzałami naraz", + "TsunamiInABottle": "Daje posiadaczowi umiejętność podwójnego skoku", + "TungstenPickaxe": "Może wydobywać meteoryt", + "UltraBrightCampfire": "Zwiększona regeneracja życia, gdy gracz znajduje się w pobliżu ogniska", + "ValkyrieYoyo": "{$CommonItemTooltip.DevItem}", + "BlackCurrant": "{$CommonItemTooltip.MinorStats}", + "VineRopeCoil": "Rzuć, a otrzymasz pnącze, po którym można się wspiąć", + "VortexBeater": "66% szans niezużycia amunicji\n„Porażająca mieszanka pif, paf i bum, bum”.", + "VortexBreastplate": "12% zwiększone obrażenia dystansowe oraz szansa na trafienie krytyczne\n25% szans niezużycia amunicji", + "VortexHelmet": "16% zwiększone obrażenia dystansowe\n7% większa szansa na dystansowe trafienie krytyczne", + "VortexLeggings": "8% zwiększone obrażenia dystansowe oraz szansa na trafienie krytyczne\n10% zwiększona szybkość poruszania się", + "VortexMonolith": "„Posiądź cząstkę mocy z wieży wiru”", + "WandofSparking": "Strzela małą iskierką", + "WeaponRack": ", żeby umieścić przedmiot na stojaku na broń", + "WeatherRadio": "Pokazuje pogodę", + "WeightedPressurePlateCyan": "Aktywuje się, gdy gracz na nią wejdzie lub z niej zejdzie", + "WeightedPressurePlateOrange": "Aktywuje się, gdy gracz na nią wejdzie lub z niej zejdzie", + "WeightedPressurePlatePink": "Aktywuje się, gdy gracz na nią wejdzie lub z niej zejdzie", + "WeightedPressurePlatePurple": "Aktywuje się, gdy gracz na nią wejdzie lub z niej zejdzie", + "Peach": "{$CommonItemTooltip.MinorStats}", + "WingsSolar": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsStardust": "{$CommonItemTooltip.FlightAndSlowfall}", + "GolfClubTitaniumIron": "{$CommonItemTooltip.GolfIron}", + "WireBulb": "Zapala żarówki dla każdego koloru kabla", + "WireKite": "Daje najlepszą kontrolę nad kablami!\n, trzymając schemat, żeby edytować ustawienia kabli", + "WirePipe": "Oddziela kable\nMożna też tu użyć młota!", + "WormholePotion": "Teleportuje cię do członka drużyny\nKliknij ikonę głowy tej osoby na pełnej mapie", + "WormScarf": "Zmniejsza otrzymywane obrażenia o 17%", + "XenoStaff": "Przyzywa UFO walczące po twojej stronie", + "YellowWrench": "Umieszcza żółty kabel", + "Yoraiz0rDarkness": "{$CommonItemTooltip.DevItem}\nJeśli to widzisz, to lepiej uciekaj...", + "Yoraiz0rHead": "{$CommonItemTooltip.DevItem}", + "Yoraiz0rPants": "{$CommonItemTooltip.DevItem}", + "Yoraiz0rShirt": "{$CommonItemTooltip.DevItem}", + "GolfClubPearlwoodDriver": "{$CommonItemTooltip.GolfDriver}", + "YoyoBag": "Użytkownik staje się mistrzem jojo", + "YoYoGlove": "Pozwala używać dwóch jojo jednocześnie", + "BloodMoonRising": "{$PaintingArtist.Garner}", + "TheHangedMan": "{$PaintingArtist.Garner}", + "GloryoftheFire": "{$PaintingArtist.Garner}", + "BoneWarp": "{$PaintingArtist.Garner}", + "SkellingtonJSkellingsworth": "{$PaintingArtist.Garner}", + "TheCursedMan": "{$PaintingArtist.Garner}", + "TheEyeSeestheEnd": "{$PaintingArtist.Garner}", + "SomethingEvilisWatchingYou": "{$PaintingArtist.Moosdijk}", + "TheTwinsHaveAwoken": "{$PaintingArtist.Moosdijk}", + "TheScreamer": "{$PaintingArtist.Crowno}", + "GoblinsPlayingPoker": "{$PaintingArtist.Garner}", + "Dryadisque": "{$PaintingArtist.Garner}", + "Sunflowers": "{$PaintingArtist.Garner}", + "TerrarianGothic": "{$PaintingArtist.Garner}", + "Impact": "{$PaintingArtist.Wright}", + "PoweredbyBirds": "{$PaintingArtist.Ness}", + "TheDestroyer": "{$PaintingArtist.Moosdijk}", + "ThePersistencyofEyes": "{$PaintingArtist.Crowno}", + "UnicornCrossingtheHallows": "{$PaintingArtist.Crowno}", + "GreatWave": "{$PaintingArtist.Crowno}", + "StarryNight": "{$PaintingArtist.Crowno}", + "GuidePicasso": "{$PaintingArtist.Crowno}", + "TheGuardiansGaze": "{$PaintingArtist.Kolf}", + "FatherofSomeone": "{$PaintingArtist.Crowno}", + "NurseLisa": "{$PaintingArtist.Garner}", + "DarkSoulReaper": "{$PaintingArtist.Myhre}", + "Land": "{$PaintingArtist.Myhre}", + "TrappedGhost": "{$PaintingArtist.Myhre}", + "DemonsEye": "{$PaintingArtist.Myhre}", + "FindingGold": "{$PaintingArtist.Myhre}", + "FirstEncounter": "{$PaintingArtist.Crowno}", + "GoodMorning": "{$PaintingArtist.Crowno}", + "UndergroundReward": "{$PaintingArtist.Crowno}", + "ThroughtheWindow": "{$PaintingArtist.Crowno}", + "PlaceAbovetheClouds": "{$PaintingArtist.Crowno}", + "DoNotStepontheGrass": "{$PaintingArtist.Crowno}", + "ColdWatersintheWhiteLand": "{$PaintingArtist.Crowno}", + "LightlessChasms": "{$PaintingArtist.Crowno}", + "TheLandofDeceivingLooks": "{$PaintingArtist.Crowno}", + "Daylight": "{$PaintingArtist.Crowno}", + "SecretoftheSands": "{$PaintingArtist.Crowno}", + "DeadlandComesAlive": "{$PaintingArtist.Crowno}", + "EvilPresence": "{$PaintingArtist.Crowno}", + "SkyGuardian": "{$PaintingArtist.Crowno}", + "AmericanExplosive": "{$PaintingArtist.Kolf}", + "Discover": "{$PaintingArtist.Myhre}", + "HandEarth": "{$PaintingArtist.Myhre}", + "OldMiner": "{$PaintingArtist.Myhre}", + "Skelehead": "{$PaintingArtist.Myhre}", + "FacingtheCerebralMastermind": "{$PaintingArtist.Kolf}", + "LakeofFire": "{$PaintingArtist.Garner}", + "TrioSuperHeroes": "{$PaintingArtist.Burczyk}", + "ImpFace": "{$PaintingArtist.Myhre}", + "OminousPresence": "{$PaintingArtist.Craig}", + "ShiningMoon": "{$PaintingArtist.Craig}", + "LivingGore": "{$PaintingArtist.Craig}", + "FlowingMagma": "{$PaintingArtist.Craig}", + "TheCreationoftheGuide": "{$PaintingArtist.Garner}", + "TheMerchant": "{$PaintingArtist.Garner}", + "CrownoDevoursHisLunch": "{$PaintingArtist.Garner}", + "RareEnchantment": "{$PaintingArtist.Phelps}", + "GloriousNight": "{$PaintingArtist.Duncan}", + "AnglerFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AnglerFish}", + "AngryNimbusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryNimbus}", + "AnomuraFungusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AnomuraFungus}", + "AntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Antlion}", + "ArapaimaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Arapaima}", + "ArmoredSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ArmoredSkeleton}", + "BatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CaveBat}", + "BirdBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Bird}", + "BlackRecluseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlackRecluse}", + "BloodFeederBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodFeeder}", + "BloodJellyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodJelly}", + "BloodCrawlerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodCrawler}", + "BoneSerpentBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BoneSerpentHead}", + "BunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Bunny}", + "ChaosElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ChaosElemental}", + "MimicBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mimic}", + "ClownBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Clown}", + "CorruptBunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptBunny}", + "CorruptGoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptGoldfish}", + "CrabBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crab}", + "CrimeraBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crimera}", + "CrimsonAxeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonAxe}", + "CursedHammerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CursedHammer}", + "DemonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Demon}", + "DemonEyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DemonEye}", + "DerplingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Derpling}", + "EaterofSoulsBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EaterofSouls}", + "EnchantedSwordBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EnchantedSword}", + "ZombieEskimoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieEskimo}", + "FaceMonsterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FaceMonster}", + "FloatyGrossBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FloatyGross}", + "FlyingFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingFish}", + "FlyingSnakeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingSnake}", + "FrankensteinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Frankenstein}", + "FungiBulbBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FungiBulb}", + "FungoFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FungoFish}", + "GastropodBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Gastropod}", + "GoblinThiefBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinThief}", + "GoblinSorcererBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinSorcerer}", + "GoblinPeonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinPeon}", + "GoblinScoutBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinScout}", + "GoblinWarriorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinWarrior}", + "GoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Goldfish}", + "HarpyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Harpy}", + "HellbatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hellbat}", + "HerplingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Herpling}", + "HornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hornet}", + "IceElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceElemental}", + "IcyMermanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IcyMerman}", + "FireImpBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FireImp}", + "JellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueJellyfish}", + "JungleCreeperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleCreeper}", + "LihzahrdBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LihzahrdCrawler}", + "ManEaterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ManEater}", + "MeteorHeadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MeteorHead}", + "MothBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Moth}", + "MummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mummy}", + "MushiLadybugBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MushiLadybug}", + "ParrotBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Parrot}", + "PigronBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PigronCorruption}", + "PiranhaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Piranha}", + "PirateBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateDeckhand}", + "PixieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Pixie}", + "RaincoatZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieRaincoat}", + "ReaperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Reaper}", + "SharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Shark}", + "SkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Skeleton}", + "SkeletonMageBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DarkCaster}", + "SlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueSlime}", + "SnowFlinxBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowFlinx}", + "SpiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WallCreeper}", + "SporeZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieMushroom}", + "SwampThingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SwampThing}", + "TortoiseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantTortoise}", + "ToxicSludgeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ToxicSludge}", + "UmbrellaSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UmbrellaSlime}", + "UnicornBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Unicorn}", + "VampireBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VampireBat}", + "VultureBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Vulture}", + "NypmhBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nymph}", + "WerewolfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Werewolf}", + "WolfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Wolf}", + "WorldFeederBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SeekerHead}", + "WormBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantWormHead}", + "WraithBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Wraith}", + "WyvernBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WyvernHead}", + "ZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Zombie}", + "JackingSkeletron": "{$PaintingArtist.Crowno}", + "BitterHarvest": "{$PaintingArtist.Lazure}", + "BloodMoonCountess": "{$PaintingArtist.Lazure}", + "HallowsEve": "{$PaintingArtist.Lazure}", + "MorbidCuriosity": "{$PaintingArtist.Lazure}", + "StarTopper1": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "StarTopper2": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "StarTopper3": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BowTopper": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndRedGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenAndWhiteGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "MulticoloredBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndYellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndRedBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndYellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "MulticoloredLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndYellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndBlueLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueAndYellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "PillaginMePixels": "{$PaintingArtist.Lazure}", + "PaintingCastleMarsberg": "{$PaintingArtist.Lazure}", + "PaintingMartiaLisa": "{$PaintingArtist.Lazure}", + "PaintingTheTruthIsUpThere": "{$PaintingArtist.Lazure}", + "AngryTrapperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryTrapper}", + "ArmoredVikingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ArmoredViking}", + "BlackSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlackSlime}", + "BlueArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueArmoredBones}", + "BlueCultistArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistArcherBlue}", + "SkiphsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "BlueCultistFighterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "BoneLeeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BoneLee}", + "ClingerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Clinger}", + "CochinealBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CochinealBeetle}", + "CorruptPenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptPenguin}", + "CorruptSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptSlime}", + "CorruptorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Corruptor}", + "CrimslimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crimslime}", + "CursedSkullBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CursedSkull}", + "CyanBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CyanBeetle}", + "DevourerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DevourerHead}", + "DiablolistBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DiabolistRed}", + "DoctorBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DoctorBones}", + "DungeonSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DungeonSlime}", + "DungeonSpiritBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DungeonSpirit}", + "ElfArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ElfArcher}", + "ElfCopterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ElfCopter}", + "EyezorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Eyezor}", + "FlockoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Flocko}", + "GhostBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Ghost}", + "GiantBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantBat}", + "GiantCursedSkullBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantCursedSkull}", + "GiantFlyingFoxBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantFlyingFox}", + "GingerbreadManBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GingerbreadMan}", + "GoblinArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinArcher}", + "GreenSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreenSlime}", + "HeadlessHorsemanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HeadlessHorseman}", + "HellArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HellArmoredBones}", + "HellhoundBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hellhound}", + "HoppinJackBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HoppinJack}", + "IceBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceBat}", + "IceGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceGolem}", + "IceSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceSlime}", + "IchorStickerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IchorSticker}", + "IlluminantBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IlluminantBat}", + "IlluminantSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IlluminantSlime}", + "JungleBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleBat}", + "JungleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleSlime}", + "KrampusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Krampus}", + "LacBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LacBeetle}", + "LavaBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Lavabat}", + "LavaSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LavaSlime}", + "MartianBrainscramblerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BrainScrambler}", + "MartianDroneBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianDrone}", + "MartianEngineerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianEngineer}", + "MartianGigazapperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GigaZapper}", + "MartianGreyGruntBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GrayGrunt}", + "MartianOfficerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianOfficer}", + "MartianRaygunnerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RayGunner}", + "MartianScutlixGunnerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ScutlixRider}", + "MartianTeslaTurretBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianTurret}", + "MisterStabbyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MisterStabby}", + "MotherSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MotherSlime}", + "NecromancerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Necromancer}", + "NutcrackerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nutcracker}", + "PaladinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Paladin}", + "PenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Penguin}", + "PinkyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Pinky}", + "PoltergeistBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Poltergeist}", + "PossessedArmorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PossessedArmor}", + "PresentMimicBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PresentMimic}", + "PurpleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PurpleSlime}", + "RaggedCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RaggedCaster}", + "RainbowSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RainbowSlime}", + "RavenBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Raven}", + "RedSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RedSlime}", + "RuneWizardBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RuneWizard}", + "RustyArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RustyArmoredBonesAxe}", + "ScarecrowBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Scarecrow1}", + "ScutlixBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Scutlix}", + "SkeletonArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonArcher}", + "SkeletonCommandoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonCommando}", + "SkeletonSniperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonSniper}", + "SlimerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Slimer}", + "SnatcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Snatcher}", + "SnowBallaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowBalla}", + "SnowmanGangstaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowmanGangsta}", + "SpikedIceSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SpikedIceSlime}", + "SpikedJungleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SpikedJungleSlime}", + "SplinterlingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Splinterling}", + "SquidBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Squid}", + "TacticalSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TacticalSkeleton}", + "TheGroomBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TheGroom}", + "TimBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Tim}", + "UndeadMinerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UndeadMiner}", + "UndeadVikingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UndeadViking}", + "WhiteCultistArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistArcherWhite}", + "WhiteCultistCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "WhiteCultistFighterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "YellowSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.YellowSlime}", + "YetiBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Yeti}", + "ZombieElfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieElf}", + "SparkyPainting": "{$PaintingArtist.Crowno}\n„Ku pamięci”", + "PaintingAcorns": "{$PaintingArtist.Lazure}", + "PaintingColdSnap": "{$PaintingArtist.Lazure}", + "PaintingCursedSaint": "{$PaintingArtist.Lazure}", + "PaintingSnowfellas": "{$PaintingArtist.Lazure}", + "PaintingTheSeason": "{$PaintingArtist.Lazure}", + "RedString": "{$CommonItemTooltip.String}", + "OrangeString": "{$CommonItemTooltip.String}", + "YellowString": "{$CommonItemTooltip.String}", + "LimeString": "{$CommonItemTooltip.String}", + "GreenString": "{$CommonItemTooltip.String}", + "TealString": "{$CommonItemTooltip.String}", + "CyanString": "{$CommonItemTooltip.String}", + "SkyBlueString": "{$CommonItemTooltip.String}", + "BlueString": "{$CommonItemTooltip.String}", + "PurpleString": "{$CommonItemTooltip.String}", + "VioletString": "{$CommonItemTooltip.String}", + "PinkString": "{$CommonItemTooltip.String}", + "BrownString": "{$CommonItemTooltip.String}", + "WhiteString": "{$CommonItemTooltip.String}", + "RainbowString": "{$CommonItemTooltip.String}", + "BlackString": "{$CommonItemTooltip.String}", + "BlackCounterweight": "{$CommonItemTooltip.Counterweight}", + "BlueCounterweight": "{$CommonItemTooltip.Counterweight}", + "GreenCounterweight": "{$CommonItemTooltip.Counterweight}", + "PurpleCounterweight": "{$CommonItemTooltip.Counterweight}", + "RedCounterweight": "{$CommonItemTooltip.Counterweight}", + "YellowCounterweight": "{$CommonItemTooltip.Counterweight}", + "KingSlimeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "EyeOfCthulhuBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "EaterOfWorldsBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "BrainOfCthulhuBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "QueenBeeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "SkeletronBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "WallOfFleshBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "DestroyerBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "TwinsBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "SkeletronPrimeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "PlanteraBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "GolemBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "FishronBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "CultistBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "MoonLordBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "GoblinSummonerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinSummoner}", + "SalamanderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Salamander}", + "GiantShellyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantShelly}", + "CrawdadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crawdad}", + "FritzBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Fritz}", + "CreatureFromTheDeepBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CreatureFromTheDeep}", + "DrManFlyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DrManFly}", + "MothronBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mothron}", + "SeveredHandBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "ThePossessedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ThePossessed}", + "ButcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Butcher}", + "PsychoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Psycho}", + "DeadlySphereBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DeadlySphere}", + "NailheadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nailhead}", + "PoisonousSporeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "MedusaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Medusa}", + "GreekSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreekSkeleton}", + "GraniteFlyerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GraniteFlyer}", + "GraniteGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GraniteGolem}", + "BloodZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodZombie}", + "DripplerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Drippler}", + "TombCrawlerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TombCrawlerHead}", + "DuneSplicerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DuneSplicerHead}", + "FlyingAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingAntlion}", + "WalkingAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WalkingAntlion}", + "DesertGhoulBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertGhoul}", + "DesertLamiaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertLamiaDark}", + "DesertDjinnBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertDjinn}", + "DesertBasiliskBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertBeast}", + "RavagerScorpionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertScorpionWalk}", + "StardustSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustSoldier}", + "StardustWormBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustWormHead}", + "StardustJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustJellyfishBig}", + "StardustSpiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustSpiderBig}", + "StardustSmallCellBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "StardustLargeCellBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustCellBig}", + "SolarCoriteBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarCorite}", + "SolarSrollerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarSroller}", + "SolarCrawltipedeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarCrawltipedeHead}", + "SolarDrakomireRiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarDrakomireRider}", + "SolarDrakomireBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarDrakomire}", + "SolarSolenianBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarSolenian}", + "NebulaSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaSoldier}", + "NebulaHeadcrabBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaHeadcrab}", + "NebulaBrainBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaBrain}", + "NebulaBeastBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaBeast}", + "VortexLarvaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexLarva}", + "VortexHornetQueenBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexHornetQueen}", + "VortexHornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexHornet}", + "VortexSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexSoldier}", + "VortexRiflemanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexRifleman}", + "PirateCaptainBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCaptain}", + "PirateDeadeyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateDeadeye}", + "PirateCorsairBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCorsair}", + "PirateCrossbowerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCrossbower}", + "MartianWalkerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianWalker}", + "RedDevilBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RedDevil}", + "PinkJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PinkJellyfish}", + "GreenJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreenJellyfish}", + "DarkMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DarkMummy}", + "LightMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LightMummy}", + "AngryBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryBones}", + "IceTortoiseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceTortoise}", + "SandSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandSlime}", + "SeaSnailBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SeaSnail}", + "MoonLordPainting": "{$PaintingArtist.Crowno}", + "SandElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandElemental}", + "SandsharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandShark}", + "SandsharkCorruptBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkCorrupt}", + "SandsharkCrimsonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkCrimson}", + "SandsharkHallowedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkHallow}", + "TumbleweedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Tumbleweed}", + "BossBagBetsy": "{$CommonItemTooltip.RightClickToOpen}", + "BossBagOgre": "{$CommonItemTooltip.RightClickToOpen}", + "BossBagDarkMage": "{$CommonItemTooltip.RightClickToOpen}", + "ExplosiveBunny": "Używać z króliczą armatą", + "VialofVenom": "„Niezwykle toksyczny”", + "FlaskofVenom": "Ataki w zwarciu wstrzykują wrogom jad", + "VenomArrow": "Wstrzykuje celowi jad", + "VenomBullet": "Wstrzykuje celowi jad", + "PartyBullet": "Przy uderzeniu wybucha i tworzy chmurę konfetti", + "NanoBullet": "Powoduje dezorientację", + "ExplodingBullet": "Wybucha przy uderzeniu", + "GoldenBullet": "Zabici wrogowie upuszczą więcej pieniędzy", + "FlaskofCursedFlames": "Ataki w zwarciu rzucają na wrogów przeklęte płomienie", + "FlaskofFire": "Ataki w zwarciu podpalają wrogów", + "FlaskofGold": "Wrogowie upuszczają więcej złota po atakach w zwarciu", + "FlaskofIchor": "Ataki w zwarciu obniżają obronę wrogów", + "FlaskofNanites": "Ataki w zwarciu dezorientują wrogów", + "FlaskofParty": "Ataki w zwarciu przywołują konfetti", + "FlaskofPoison": "Ataki w zwarciu zatruwają wrogów", + "CobaltBreastplate": "3% większa szansa na trafienie krytyczne", + "CobaltLeggings": "10% zwiększona szybkość poruszania się", + "MythrilChainmail": "5% zwiększone obrażenia", + "MythrilGreaves": "3% większa szansa na trafienie krytyczne", + "RocketI": "Niewielki promień wybuchu. Nie zniszczy płytek", + "RocketII": "Niewielki promień wybuchu. Zniszczy płytki", + "RocketIII": "Duży promień wybuchu. Nie zniszczy płytek", + "RocketIV": "Duży promień wybuchu. Zniszczy płytki", + "AsphaltBlock": "Zwiększa szybkość biegu", + "CobaltPickaxe": "Może wydobywać mithril i orichalcum", + "MythrilPickaxe": "Może wydobywać adamantyt i tytan", + "Cannonball": "Używać z armatą", + "Arkhalis": "„Wcale nie mam tego od Schmoo”", + "BoneGlove": "33% szans niezużycia kości", + "LogicGate_AND": "Aktywuje się, gdy wszystkie lampki są włączone, w przeciwnym wypadku nieaktywny", + "LogicGate_NAND": "Aktywuje się, gdy nie wszystkie lampki są włączone, w przeciwnym wypadku nieaktywny", + "DD2FlameburstTowerT2Popper": "{$ItemTooltip.DD2FlameburstTowerT1Popper}", + "DD2FlameburstTowerT3Popper": "{$ItemTooltip.DD2FlameburstTowerT1Popper}", + "DD2BallistraTowerT2Popper": "{$ItemTooltip.DD2BallistraTowerT1Popper}", + "DD2BallistraTowerT3Popper": "{$ItemTooltip.DD2BallistraTowerT1Popper}", + "DD2ExplosiveTrapT2Popper": "{$ItemTooltip.DD2ExplosiveTrapT1Popper}", + "DD2ExplosiveTrapT3Popper": "{$ItemTooltip.DD2ExplosiveTrapT1Popper}", + "DD2LightningAuraT2Popper": "{$ItemTooltip.DD2LightningAuraT1Popper}", + "DD2LightningAuraT3Popper": "{$ItemTooltip.DD2LightningAuraT1Popper}", + "ApprenticeScarf": "{$ItemTooltip.HuntressBuckler}", + "SquireShield": "{$ItemTooltip.HuntressBuckler}", + "MonkBelt": "{$ItemTooltip.HuntressBuckler}", + "GolfClubStoneIron": "{$CommonItemTooltip.GolfIron}", + "ApprenticeAltPants": "20% zwiększone obrażenia sług oraz 25% zwiększona szansa na magiczne trafienie krytyczne", + "ApprenticeAltShirt": "30% zwiększone obrażenia sług oraz 15% zwiększone obrażenia magiczne", + "GolfClubGoldWedge": "{$CommonItemTooltip.GolfWedge}", + "ApprenticeRobe": "20% zwiększone obrażenia sług oraz 10% zwiększone obrażenia magiczne", + "ApprenticeStaffT3": "Chlapie wyziewami zmniejszającymi obronę!", + "GoldenCrateHard": "{$ItemTooltip.GoldenCrate}", + "BookStaff": "Ciekawe, kto wsadził księgę nieskończonej mądrości na kijek...\n, żeby rzucić potężne tornado", + "GolfBallDyedSkyBlue": "{$CommonItemTooltip.GolfBall}", + "DD2BetsyBow": "Strzela rozdzielającymi się strzałami, zadaje więcej obrażeń latającym przeciwnikom", + "DD2ElderCrystal": "Umieść w stojaku kryształ eternia, żeby przywołać portale Etherii", + "DD2ElderCrystalStand": "Miejsce na kryształ eternia", + "DD2EnergyCrystal": "Często wykorzystywana do demonstrowania siły woli użytkownika przejawiającej się w postaci fizycznych struktur obronnych", + "GolfBallDyedRed": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedTeal": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedPurple": "{$CommonItemTooltip.GolfBall}", + "DD2PetDragon": "Przyzywa smoka-chowańca", + "DD2PetGato": "Przyzywa gato-chowańca", + "DD2PetGhost": "Przyzywa nikłego płomyka-chowańca, który daje światło", + "DD2PhoenixBow": "Ujarzmia potęgę nieugaszonych płomieni", + "DD2SquireBetsySword": "Uwalnia potężną, wewnętrzną energię", + "DD2SquireDemonSword": ", żeby osłonić się tarczą", + "DefenderMedal": "Waluta do handlu z Szynkarzem", + "ShuckedOyster": "{$CommonItemTooltip.MinorStats}", + "HuntressAltPants": "25% zwiększone obrażenia sług oraz 20% zwiększona szybkość poruszania się", + "HuntressAltShirt": "25% zwiększone obrażenia sług i obrażenia dystansowe", + "GolfClubBronzeWedge": "{$CommonItemTooltip.GolfWedge}", + "HuntressJerkin": "20% zwiększone obrażenia sług i obrażenia dystansowe", + "HuntressPants": "10% zwiększone obrażenia sług oraz 20% zwiększona szybkość poruszania się", + "GolfClubWoodDriver": "{$CommonItemTooltip.GolfDriver}", + "Oyster": "{$CommonItemTooltip.RightClickToOpen}", + "MonkAltPants": "20% zwiększone obrażenia sług, szybkość poruszania się i szansa na trafienie krytyczne w walce w zwarciu", + "MonkAltShirt": "20% zwiększone obrażenia sług oraz szybkość ataku w zwarciu", + "GolfClubMythrilIron": "{$CommonItemTooltip.GolfIron}", + "MonkPants": "10% zwiększone obrażenia sług,\n10% większa szansa na trafienie krytyczne oraz 20% zwiększona szybkość poruszania się", + "MonkShirt": "20% zwiększone obrażenia sług i obrażenia w walce w zwarciu", + "MonkStaffT1": "Ładuje moc, atakując przeciwników", + "MonkStaffT2": "Przyzywa duchy, gdy trafia przeciwników", + "MonkStaffT3": ", dzierżąc broń, żeby wyprowadzić atak alternatywny!", + "GolfClubRustyPutter": "{$CommonItemTooltip.GolfPutter}", + "IronCrateHard": "{$ItemTooltip.IronCrate}", + "SquireAltShirt": "30% zwiększone obrażenia sług oraz znacznie zwiększona regeneracja życia", + "GolfClubLeadPutter": "{$CommonItemTooltip.GolfPutter}", + "SquireGreaves": "15% zwiększone obrażenia sług, 20% zwiększona szansa na trafienie krytyczne w walce w zwarciu i szybkość poruszania się", + "SquirePlating": "15% zwiększone obrażenia sług i obrażenia w walce w zwarciu", + "ArkhalisShirt": "{$ItemTooltip.ArkhalisHat}", + "ArkhalisPants": "{$ItemTooltip.ArkhalisHat}", + "LobsterTail": "{$CommonItemTooltip.MediumStats}", + "ArkhalisHat": "{$CommonItemTooltip.DevItem}\n'Wcale nie jest z siatki'", + "LeinforsHat": "{$CommonItemTooltip.DevItem}\n'Coby te ponętne loczki były zawsze takie cudne'", + "LeinforsShirt": "{$CommonItemTooltip.DevItem}\n'I to jest sexy'", + "LeinforsPants": "{$CommonItemTooltip.DevItem}\n'Niespodzianka! Nie spodziewaliście się tego po spodniach, co?'", + "OceanCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "LeinforsAccessory": "{$CommonItemTooltip.DevItem}\n'Najlepiej połączyć go z dietą makaronową'", + "KiteSpectrum": "{$CommonItemTooltip.Kite}", + "KiteWanderingEye": "{$CommonItemTooltip.Kite}", + "KiteUnicorn": "{$CommonItemTooltip.Kite}", + "FairyQueenBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "LavaCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LavaCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "HotlineFishingHook": "{$CommonItemTooltip.LavaFishing}", + "LavaFishingHook": "{$CommonItemTooltip.LavaFishing}", + "TeleportationPylonJungle": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonPurity": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonHallow": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonUnderground": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonOcean": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonDesert": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonSnow": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonMushroom": "{$CommonItemTooltip.TeleportationPylon}", + "RockGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RockGolem}", + "BloodMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodMummy}", + "SporeSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SporeSkeleton}", + "SporeBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SporeBat}", + "LarvaeAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LarvaeAntlion}", + "CrimsonBunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonBunny}", + "CrimsonGoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonGoldfish}", + "CrimsonPenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonPenguin}", + "BigMimicCorruptionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicCorruption}", + "BigMimicCrimsonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicCrimson}", + "BigMimicHallowBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicHallow}", + "MossHornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MossHornet}", + "WanderingEyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WanderingEye}", + "CreativeWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "RainbowWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressUpToBooster}", + "LongRainbowTrailWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}\n{$CommonItemTooltip.PressUpToBooster}" + }, + "CommonItemTooltip": { + "SpecialCrafting": "Do tworzenia przedmiotów specjalnych", + "DevItem": "„Przebierz się za twórców!”", + "FlightAndSlowfall": "Daje umiejętność latania i powolnego upadku", + "RightClickToOpen": ", żeby otworzyć", + "BannerBonus": "Pobliscy gracze otrzymują premię w walce z następującymi przeciwnikami: ", + "Counterweight": "Rzuca przeciwwagę po trafieniu przeciwnika przy pomocy jojo", + "MinuteDuration": "{0} min. czasu trwania", + "PlaceableOnXmasTree": "Można umieścić na choince", + "RestoresLife": "Przywraca {0} pkt. życia", + "RestoresMana": "Przywraca {0} pkt. many", + "SecondDuration": "{0} sek. czasu trwania", + "String": "Zwiększa zasięg twojego jojo", + "UsesLife": "Zużywa {0} pkt. życia", + "UsesMana": "Zużywa {0} pkt. many" + }, + "BuffDescription": { + "WellFed_Expert": "Niewielkie ulepszenie wszystkich statystyk i zwiększona regeneracja życia" + } +} \ No newline at end of file diff --git a/Localization/Content/pl-PL/Legacy.json b/Localization/Content/pl-PL/Legacy.json new file mode 100644 index 0000000..d30b61a --- /dev/null +++ b/Localization/Content/pl-PL/Legacy.json @@ -0,0 +1,1143 @@ +{ + "LegacyWorldGen": { + "0": "Generowanie terenu", + "10": "Generowanie jaskiń na powierzchni", + "11": "Generowanie dżungli", + "12": "Generowanie dryfujących wysp", + "13": "Dodawanie skupisk grzybów", + "14": "Umieszczanie błota w ziemi", + "15": "Dodawanie mułu", + "16": "Dodawanie błyskotek", + "17": "Dodawanie pajęczyn", + "18": "Tworzenie piekła", + "19": "Dodawanie zbiorników wodnych", + "1": "Dodawanie piasku", + "20": "Spaczanie świata", + "21": "Generowanie jaskiń górskich", + "22": "Tworzenie plaż", + "23": "Dodawanie klejnotów", + "24": "Grawitujący piasek", + "25": "Czyszczenie tła z brudu", + "26": "Rozmieszczanie ołtarzy", + "27": "Poziomowanie cieczy", + "28": "Rozmieszczanie kryształów życia", + "29": "Rozmieszczanie posągów", + "2": "Generowanie wzgórz", + "30": "Ukrywanie skarbów", + "31": "Ukrywanie kolejnych skarbów", + "32": "Ukrywanie skarbów z dżungli", + "33": "Ukrywanie wodnych skarbów", + "34": "Rozmieszczanie pułapek", + "35": "Rozmieszczanie przedmiotów do niszczenia", + "36": "Rozmieszczanie piekielnych kuźni", + "37": "Sadzenie trawy", + "38": "Sadzenie kaktusów", + "39": "Sadzenie słoneczników", + "40": "Sadzenie drzew", + "41": "Sadzenie ziół", + "42": "Sadzenie chwastów", + "43": "Sadzenie winorośli", + "44": "Sadzenie kwiatów", + "45": "Sadzenie grzybów", + "46": "Zwalnianie nieużywanych zasobów", + "47": "Resetowanie obiektów gry", + "48": "Tworzenie trybu trudnego", + "49": "Zapisywanie danych świata:", + "4": "Rozmieszczanie skał w ziemi", + "50": "Tworzenie kopii zapasowej świata", + "51": "Wczytywanie danych świata:", + "52": "Sprawdzanie wyrównania płytek:", + "53": "Wczytywanie nieudane!", + "54": "Brak kopii zapasowej.", + "55": "Wyszukiwanie ramek płytek:", + "56": "Dodawanie śniegu", + "57": "Świat", + "58": "Tworzenie lochu", + "59": "Spadł meteoryt!", + "5": "Rozmieszczanie ziemi między skałami", + "60": "Wygładzanie świata", + "61": "Mech", + "62": "Klejnotyzacja", + "63": "Tworzenie ścian jaskiń", + "64": "Tworzenie pajęczych jaskiń", + "65": "Usuwanie danych mapy:", + "66": "Zapisywanie danych mapy:", + "67": "Wczytywanie danych mapy:", + "68": "Rysowanie mapy:", + "69": "Tworzenie wodospadów", + "6": "Dodawanie gliny", + "70": "Tworzenie ruin z dżungli", + "71": "Tworzenie gniazd szerszeni", + "72": "Zakrwawianie świata", + "73": "Zatwierdzanie zapisu świata:", + "74": "Szlamy spadają z nieba!", + "75": "Szlamy przestały spadać z nieba.", + "77": "Dodawanie trawy", + "78": "Pustynie", + "7": "Tworzenie losowych dziur", + "80": "Rzeźbienie marmuru", + "81": "Tworzenie granitu", + "8": "Tworzenie małych jaskiń", + "9": "Tworzenie dużych jaskiń" + }, + "LegacyDialog": { + "1": "Mam nadzieję, że taka mizerota jak ty to nie wszystko, co chroni nas przed Okiem Cthulhu.", + "10": "Popatrz na moje bloki ziemi, są niezwykle brudne.", + "100": "Po co oczyszczać świat skoro można go po prostu wysadzić?", + "101": "Wrzuć do kąpieli, zamknij wszystkie okna, a przeczyścisz sobie zatoki i odetkasz uszy!", + "102": "Chcesz pograć w „kto stchórzy pierwszy”?", + "103": "Podpiszesz, że nie masz nic przeciwko wybuchom?", + "104": "ZAKAZ PALENIA!", + "105": "Te materiały wybuchowe są bombastyczne. Śmiało, kupuj!", + "106": "Dobry sposób na śmierć!", + "107": "Ciekawe, co się stanie, jak... (BUM!)... Potrzebujesz tej nogi?", + "108": "Dynamit – mój ulubiony lek na wszystkie bolączki.", + "109": "Zobacz moje towary, wszystkie w bombowych cenach!", + "11": "Ale upał! Mam kapitalną, wentylowaną zbroję.", + "110": "Pamiętam jak przez mgłę, że związałem jakąś kobietę i wrzuciłem ją do lochu.", + "111": "...mamy problem! Krwawy księżyc!", + "112": "Gdybym był młodszy, {Nurse} poszłaby ze mną na randkę. Byłem niezłym amantem.", + "113": "Ten twój czerwony kapelusz wygląda znajomo...", + "114": "Dzięki za uwolnienie mnie spod tej klątwy. Czuje się, jakby coś na mnie naskoczyło i mnie ugryzło.", + "115": "Moja mama zawsze mówiła, że będę świetnym krawcem.", + "116": "Życie jest jak pudełko ubrań. Nigdy nie wiesz, co będziesz nosić!", + "117": "Haftowanie jest ciężkie, to jasne! Gdyby takie nie było, nikt by się tym nie zajmował! Dlatego jest takie świetne.", + "118": "Na ubraniach znam się jak nikt inny.", + "119": "Ta klątwa sprawiła, że byłem samotny, więc raz uszyłem sobie skórzanego przyjaciela. Nazwałem go Wilson.", + "12": "Słońce wzeszło wysoko, jednak moje ceny są niskie.", + "120": "Dziękuję za ratunek, człowieku. Inne gobliny mnie związały i tu zostawiły. Można powiedzieć, że zbyt dobrze się nie dogadywaliśmy.", + "121": "Nie do wiary, że związali mnie i tu zostawili, bo zasugerowałem, że wcale nie idą na wschód!", + "122": "Skoro już jestem wyrzutkiem, mogę wyrzucić kolczatki? Niewygodnie się je trzyma w kieszeniach.", + "123": "Szukasz eksperta od gadżetów? Już nie musisz!", + "124": "Dzięki za pomoc. Teraz muszę skończyć te moje bezcelowe spacery. Na pewno się jeszcze spotkamy.", + "125": "Spodziewałem się kogoś wyższego.", + "126": "A co kombinuje {Mechanic}? Udało ci się już z nią porozmawiać?", + "127": "Potrzebujesz napędu do swojego kapelusza? Mam napęd, który idealnie by pasował do tego kapelusza.", + "128": "Słyszałem, że lubisz rakiety i buty, więc wsadziłem ci rakiety do butów.", + "129": "Milczenie jest złotem. Taśma klejąca jest srebrem.", + "13": "Świetnie. Słyszę stąd, jak mechanik {Mechanic} i pielęgniarka {Nurse} się kłócą.", + "130": "Tak, złoto jest mocniejsze niż żelazo. Czego wy się uczycie tam w tych swoich szkołach?", + "131": "Na papierze połączenie kasku górniczego i płetw wydawało się lepszym pomysłem.", + "132": "Gobliny zaskakująco łatwo rozzłościć. Potrafią pójść na wojnę o kawałek sukna!", + "133": "Szczerze mówiąc, większość goblinów nie jest ekspertami rakietowymi. Ale niektórzy są.", + "134": "Wiesz, po co nam te kolczatki? My nie wiemy.", + "135": "Właśnie skończyłem swoje najnowsze dzieło! Ta wersja nie wybucha gwałtownie, kiedy się zbyt mocno na nią chuchnie.", + "136": "Goblińscy złodzieje nie są zbyt dobrzy w swoim fachu. Nie okradliby nawet otwartej skrzyni!", + "137": "Dzięki za ratunek, przyjacielu! Te więzy zaczynały mnie już ocierać.", + "138": "Prawdziwych herosów poznaje się w biedzie!", + "139": "Zaiste, prawdziwe bohaterstwo! Dziękuję za ratunek, młoda damo!", + "14": "Udało ci się już spotkać Chith... Shith... Chat... Wielkie oko?", + "140": "Zaiste, prawdziwe bohaterstwo! Dziękuję za ratunek, młodzieńcze!", + "141": "Skoro już się znamy, to mogę się wprowadzić, tak?", + "142": "Witaj, {Guide}! Jak ci mogę dziś pomóc?", + "143": "Witaj, {Demolitionist}! Jak ci mogę dziś pomóc?", + "144": "Witaj, {GoblinTinkerer}! Jak ci mogę dziś pomóc?", + "145": "Witaj, {Nurse}! Jak ci mogę dziś pomóc?", + "146": "Witaj, {Mechanic}! Jak ci mogę dziś pomóc?", + "147": "Witaj, {Dryad}! Jak ci mogę dziś pomóc?", + "148": "Wyciągnąć ci zza ucha monetę? Nie? Dobra.", + "149": "Chcesz magicznego cukierka? Nie? Dobra.", + "15": "W tym domu jest bezpiecznie, tak? Tak? {PlayerName}?", + "150": "Robię wręcz magiczną czekoladę, jeśli masz ocho... Nie? Dobra.", + "151": "Chcesz zajrzeć do mojej kryształowej kuli?", + "152": "Co powiesz na zaczarowany pierścień przemieniający kamienie w szlamy? Mnie też się nie widzi.", + "153": "Ktoś kiedyś mi powiedział, że przyjaźń to magia. Przecież to niedorzeczne. Przyjaźnią nie przemienisz ludzi w żaby.", + "154": "Widzę twoją przyszłość... Widzę, że sporo ode mnie kupisz!", + "155": "Kiedyś próbowałem ożywić posąg anioła. Nie wyszło.", + "156": "Dzięki! Kwestią czasu było to, kiedy skończę tutaj jak reszta tych szkieletów.", + "157": "Hej, patrz, gdzie leziesz! Przed chwilą tam stałem.", + "158": "Czekaj, zaraz złapię tu WiFi.", + "159": "Już prawie skończyłem z tymi światełkami!", + "16": "Nawet krwawy księżyc nie powstrzyma kapitalizmu. Pohandlujmy.", + "160": "NIE RUSZAJ SIĘ. UPADŁ MI KONTAKT.", + "161": "Teraz ten przełącznik musi... Co?!", + "162": "Niech zgadnę. Za mało kabla. Na drugie masz „bezmózg”?", + "163": "Poczekaj, możesz... Proszę? Ok? Dobra. Ech.", + "164": "Nie podoba mi się, jak na mnie patrzysz. Ja tu pracuję.", + "165": "Hej, {PlayerName}, goblin {GoblinTinkerer} coś o mnie mówił? Wracasz od niego, tak?", + "166": "{ArmsDealer} ciągle mówi o wciskaniu mojej płyty dociskowej. Mówiłam mu, że na niej się staje.", + "167": "Zawsze kupuj więcej kabla, niż potrzebujesz!", + "168": "Twoje urządzenie jest na pewno podłączone?", + "169": "Wiesz, czego brakuje w tym domu? Światełek.", + "170": "Czerwone niebo zwiastuje krwawy księżyc. Jest w nim coś, co sprawia, że wyłazi pełno potworów.", + "171": "Wiesz, gdzie znaleźć chwastozgon? Tak tylko pytam.", + "172": "Popatrz w niebo, a zobaczysz, że księżyc jest czerwony.", + "173": "W nocy lepiej zostań w bezpiecznym miejscu. Niebezpiecznie jest chodzić po zmroku.", + "174": "Witaj, {PlayerName}. Jak mogę ci pomóc?", + "175": "Będę służyć ci radą. Jeśli nie wiesz, co zrobić, porozmawiaj ze mną.", + "176": "Ponoć jest ktoś, kto ci powie, jak tutaj przeżyć... chwilunia. Przecież to ja.", + "177": "Użyj kilofa, żeby kopać w ziemi albo siekiery, żeby ścinać drzewa. Umieść kursor nad obiektem i kliknij!", + "178": "Jeśli chcesz przeżyć, musisz zrobić sprawić sobie broń i schronienie. Zacznij, ścinając drzewa i zbierając drewno.", + "179": "Naciśnij {InventoryKey}, żeby przejść do menu tworzenia. Zrób stół warsztatowy, jak będziesz mieć wystarczająco dużo drewna. Dzięki temu, stojąc w jego pobliżu, będziesz tworzyć bardziej złożone przedmioty.", + "18": "Kosh, kapleck Mog. Przepraszam, to po klingońsku „kupuj albo giń”.", + "180": "Możesz wybudować schronienie, ustawiając drewno lub inne bloki. Nie zapomnij o ścianach.", + "181": "Po zdobyciu drewnianego miecza możesz pozyskać żel ze szlamów. Połącz drewno z żelem, żeby zrobić pochodnię!", + "182": "Użyj młota, żeby wejść w interakcję z otoczeniem.", + "183": "Zajmij się górnictwem, żeby pozyskać rudy metali. Dzięki niej możesz stworzyć bardzo przydatne przedmioty.", + "184": "Masz już rudę, teraz musisz przerobić ją na sztabki, z których stworzysz przedmioty. Potrzebny ci będzie piec!", + "185": "Zrobisz go z pochodni, drewna i kamienia. Pamiętaj, że musisz stać przy stole warsztatowym.", + "186": "Do tworzenia przedmiotów ze sztabek żelaza potrzeba kowadła.", + "188": "Pod ziemią znajdziesz kryształowe serca, którymi zwiększasz swoje maksymalne punkty życia. Rozbijesz je za pomocą kilofa.", + "19": "{PlayerName}, tak? Mam dobre wieści!", + "191": "Jest wiele sposobów, żeby przyciągnąć ludzi do twojego miasta. Na pewno będą potrzebować mieszkania.", + "192": "Pokój musi mieć drzwi, krzesło, stół i źródło światła, żeby można było go uważać za mieszkanie. Pamiętaj, że dom musi też mieć ściany.", + "193": "Dwie osoby nie zamieszkają w tym samym mieszkaniu. A jeśli ich mieszkanie zostanie zniszczone, to poszukają sobie innego.", + "194": "Za pomocą interfejsu mieszkaniowego przypiszesz i przejrzysz mieszkania. Otwórz ekwipunek i kliknij ikonę domu.", + "195": "Jeśli chcesz, żeby kupiec się wprowadził, będziesz potrzebować dużo pieniędzy. 50 srebrnych monet powinno wystarczyć!", + "196": "Zwiększ swoje maksymalne punkty życia, żeby pielęgniarka chciała się wprowadzić.", + "197": "Jak zdobędziesz broń palną, to na pewno handlarz bronią się pojawi, żeby sprzedać ci trochę amunicji!", + "198": "Wykaż się, pokonując silnego potwora. To przyciągnie uwagę driady.", + "199": "Przeszukaj dokładnie loch. W jego głębinach możesz znaleźć więźniów.", + "2": "Masz kiepską zbroję. Lepiej kup mikstury leczenia.", + "20": "Słyszałem o ukrytym skarbie... ale nieważne.", + "200": "Może starzec spod lochu do nas dołączy, skoro już nie jest przeklęty.", + "201": "Zatrzymaj wszystkie znalezione bomby. Dewastator może będzie chciał się im przyjrzeć.", + "202": "Czy gobliny naprawdę aż tak bardzo się od nas różnią, że nie potrafimy żyć razem w pokoju?", + "203": "Słyszałem, że w tych rejonach można spotkać potężnego czarodzieja. Miej na niego oko następnym razem, jak zejdziesz do podziemi.", + "204": "Jeśli połączysz soczewki na demonicznym ołtarzu, może uda ci się przywołać potężnego potwora. Ale lepiej poczekaj, aż się ściemni, zanim tego spróbujesz.", + "205": "Przynętę zrobisz ze zgniłych kawałków i plugawego proszku. Musisz znajdować się na obszarze dotkniętym zepsuciem.", + "206": "Demoniczne ołtarze znajdziesz zazwyczaj w zepsutych miejscach. Musisz się do nich zbliżyć, żeby tworzyć przedmioty.", + "208": "Roztrzaskaj każdy garnek na swojej drodze. Możesz znaleźć przeróżne, użyteczne zapasy.", + "209": "Na całym świecie poukrywane są skarby. W podziemiach można znaleźć niesamowite przedmioty!", + "21": "Posąg anioła, tak? Przykro mi, ale nie zajmuję się śmieciami.", + "210": "Roztrzaskanie kuli cienia niekiedy spowoduje, że z nieba spadnie meteor. Kule cienia można zwykle znaleźć w rozpadlinach na zepsutych obszarach.", + "211": "Musisz zebrać więcej kryształów życia, żeby zwiększyć swoje maksymalne punkty życia.", + "212": "Twoje obecne wyposażenie jest po prostu słabe. Musisz zrobić sobie lepszą zbroję.", + "213": "Myślę, że możesz już stanąć do swojej pierwszej, poważnej walki. Zdobądź nocą soczewki gałek ocznych i zanieś je na demoniczny ołtarz.", + "214": "Przed następnym wyzwaniem lepiej podnieś swoje punkty życia. 15 serc powinno wystarczyć.", + "215": "Kamień ebonowy z zepsutych obszarów można oczyścić za pomocą proszka od driady lub zniszczyć za pomocą materiałów wybuchowych.", + "216": "Twoim kolejnym krokiem powinno być zbadanie zepsutych rozpadlin. Zniszcz wszystkie kule cienia, które uda ci się znaleźć.", + "217": "Niedaleko stąd znajdziesz stary loch. Dobrze by było do niego teraz zajrzeć.", + "218": "Musisz spróbować maksymalnie podnieść swoje punkty życia. Zbierz 20 serc.", + "219": "W dżungli odkryjesz wiele skarbów, jeśli będziesz kopać wystarczająco głęboko.", + "22": "Ten koleś, co tu ostatnio był, zostawił mi trochę śmieci... znaczy się, skarbów!", + "220": "Piekło jest zbudowane z piekielnych kamieni. Można z nich robić świetne bronie i zbroje.", + "221": "Wyzwanie strażnika piekła wymaga złożenia ofiary. W piekle znajdziesz wszystko, czego potrzebujesz.", + "222": "Roztrzaskaj każdy napotkany demoniczny ołtarz. Spotka cię za to coś fajnego!", + "223": "W miejsca emanujących wyjątkową światłością lub ciemnością można czasami pozyskać dusze poległych stworzeń.", + "224": "No i, he, he, butelkę... egg noga!", + "225": "Masz ciasteczka?", + "226": "Co? Wydawało ci się, że nie istnieję?", + "227": "Udało mi się z powrotem przyszyć ci twarz. Musisz bardziej uważać.", + "228": "Będzie z tego blizna.", + "229": "I po sprawie. Ale masz już więcej nie skakać z urwisk.", + "23": "Ciekawe, czy księżyc jest zrobiony z sera... co? O, tak, kup coś!", + "230": "Aż tak bardzo nie bolało, co?", + "231": "Jakby życie pod ziemią nie było wystarczająco paskudne, to takie dupki jak ty tu przyłażą, jak śpię, i porywają moje dzieci.", + "232": "Tak między nami, tylko {Dryad} jest godna zaufania. Tylko ona nie próbowała mnie zjeść, ani wykorzystać do uwarzenia mikstury.", + "233": "Wczoraj próbowałem się polizać, żeby zobaczyć, o co tyle hałasu. Wszystko zaczęło się świecić na niebiesko.", + "234": "Niebieski sprawia, że się rozleniwiam i wpadam w depresję.", + "235": "Nie ma tu żadnych świń? Jedna odgryzła bratu nogę.", + "236": "Wszystko tutaj jest jakieś takie dziwne. Wczoraj obudziłem się, bo kuśnierz ugryzł mnie w nogę.", + "237": "Dam ci zniżkę, jak {Truffle} przyjdzie do mnie na... przymiarki.", + "238": "{Truffle} chyba może czuć się nierozumiany, a jest naprawdę zabawnym gościem.", + "24": "Ktoś coś mówił o złocie? Pomogę ci się pozbyć tego ciężaru.", + "240": "Nie umiem tańca brzucha, więc przestań o to pytać!", + "241": "Krąży o mnie taka jedna plotka, że niby jak mnie pokonasz, to możesz mnie zjeść!", + "242": "Hej, a co tam masz w tym lumpu pumpu?", + "243": "Mam zostać powietrznym piratem? Bo się nad tym zastanawiam.", + "244": "Tak czy siak, przydałby ci się jetpack!", + "245": "Ostatnio jestem drażliwa, więc nie zawracaj mi gitary.", + "246": "Niezmiernie mnie ciekawi ten {Cyborg}. Jakim cudem potrafi się tak ruszać?", + "247": "Ten kapitan chyba trochę „przeholował”!", + "248": "Pokaż sprzęt!", + "249": "Podoba mi się twój... sprzęt. A jest wersja z mosiądzu?", + "25": "Tylko nie zachlap mnie krwią.", + "250": "Jak już będziesz w Bajkowie, to zobaczysz tęczę na niebie. Mogę ci to namalować, jeśli chcesz.", + "251": "{PartyGirl}, obczaj ją. Taka to może dopiero pomalować mój świat!", + "252": "Wiem, czym się różni turkusowy od niebiesko-zielonego. Ale nie powiem.", + "253": "Nie mam bieli tytanowej, nawet nie pytaj.", + "254": "Zmieszaj róż z fioletem, będzie dobrze, słowo!", + "255": "Nie, nie, nie... Jest kupa różnych odcieni szarego! Nie chcesz, żebym o tym mówił...", + "256": "Mam nadzieję, że farba wyschnie, zanim zacznie znowu padać. Bo inaczej byłaby katastrofa!", + "257": "Dostaniesz głębię kolorów za głębię swojej sakiewki!", + "258": "Twój ubiór jest zbyt ponury. Bez dwóch zdań musisz ubarwić swoje znoszone ubranie!", + "259": "Jedyne drewno, które mógłbym ubarwić, to mahoń. Barwienie innych rodzajów drewna to po prostu marnotrawstwo.", + "26": "Szybko, przestań krwawić.", + "260": "{Pirate} – trzeba coś z nim zrobić. Trzeba tygodnia, żeby pozbyć się jego odoru!", + "261": "Co szamam? Nic nie szamam, szaman jestem.", + "262": "Jądrem magii jest natura. Natura jądra jest magiczna.", + "263": "{Nurse} uleczy twój organizm, ale ja zorganizuję znacznie więcej.", + "264": "{PlayerName}, wybieraj roztropnie, moje towary są nieprzewidywalne, a moje mroczne sztuki tajemnicze.", + "265": "Musimy porozmawiać. Chodzi... chodzi o imprezy.", + "266": "Nie wiem, co lepsze: przyjęcia czy poprawiny przyjęć.", + "267": "Musimy urządzić migotkowe przyjęcie, a potem jeszcze je poprawić.", + "268": "Łał, {PlayerName}, spotkanie z taką śmiałą duszą wprawia mnie w imprezowy nastrój!", + "269": "Zorganizuj kulę dyskotekową, a pokażę ci, jak się imprezuje.", + "27": "Jeśli chcesz umierać, to nie tutaj.", + "270": "Byłam kiedyś w Szwecji, nieźle imprezują, czemu nie masz tak jak oni?", + "271": "Mam na imię {PartyGirl}, ale mówią na mnie wodzirejka. No, nie wiem, ale i tak jest odjazdowe.", + "272": "Imprezujesz? Czasami? Hm, dobra, możemy porozmawiać...", + "273": "Nie jestem szczurem lądowym, ale lepiej czasami wylądować, niż nigdy nie lądować.", + "274": "Ho, aye, ho! I butelka... migotków!", + "275": "Ahoj! Ciekawe, że mówisz o papugach... eee... o czym to mówiliśmy?", + "276": "{PlayerName}, od wielu tygodni kapitan nie widział tak ślicznej dziewoi!", + "277": "Łapy precz od moich skarbów, psubracie!", + "278": "O czym ty u licha mówisz? Moby Dick jest mój!", + "279": "*Rum cym cym*", + "28": "Co to ma znaczyć?!", + "280": "I wtedy 492-8 mówi „myślisz, że jestem 472-6?”. HA. HA. HA.", + "281": "Jestem o wiele mniej mobilny po tym, jak pocisk uszkodził mi czujnik ruchu.", + "282": "To fałsz, czy może nie?", + "283": "Czyli ta punkowa laska jest wynalazcą? Mógłbym jej pokazać to i owo!", + "284": "Jasne, {Pirate} to mój kumpel, ale nienawidzę, jak ta jego papuga na mnie paskudzi. Załażę od tego rdzą!", + "285": "Wbudowałem sobie aparat smaku i teraz mogę chlapnąć sobie piwko!", + "286": "Nie lubię być bity... Łapiesz? Bity?", + "287": "Na krótko i pocieniować z boku, tak?", + "288": "Te pasemka pasują ci do oczu!", + "289": "Ręce mi się kleją od tego... wosku.", + "29": "Nie podoba mi się twój ton?", + "290": "Herbatkę? Kawkę? Znowu sok pomarańczowy?", + "291": "Złotko, musimy coś zrobić z tymi rozdwojonymi końcówkami.", + "292": "Stara! Przynosisz najlepsze ploteczki.", + "293": "Jaki płyn po goleniu sobie dziś pan życzy?", + "294": "Usiądź na chwilę, pójdę po brzytwę.", + "295": "Styl albo się ma, albo się nie ma.", + "296": "Tobie zrobimy coś łatwego w utrzymaniu.", + "297": "Kiedyś użyłam jednego z produktów barwiarza. Przypalone końcówki. Katastrofa.", + "298": "Och, moje biedaczysko. Usiądź sobie tutaj. Wszystko będzie dobrze. Ciii.", + "299": "Możesz się porozglądać.", + "3": "Czuję na sobie wzrok złej istoty.", + "30": "Co tutaj robisz? Jeśli krwawisz, to nie powinno cię tu być. Wynocha.", + "300": "Witam pana, jestem {Stylist} i dziś się panem zajmę.", + "301": "Tylko skrócić? Nuda...", + "302": "Mam nadzieję, że podoba ci się {PartyGirl} w nowej fryzurze, moje dzieło!", + "303": "{Demolitionist}, nic nie poradzę na tę jego przypaloną głowę. Nie ma szans.", + "304": "Nie musisz dawać mi napiwku, ale pamiętaj, że mam bardzo ostre nożyczki i mogę cię zaciąć.", + "305": "Mam tę brzytwę od takiego jednego nożownika.", + "306": "Nie zawracaj mi dziś głowy, złotko. Właśnie naostrzyłam nożyce i szukam tylko pretekstu, żeby ich użyć!", + "307": "Hm, {PartyGirl} mówiła, że ta {Nurse}, z którą {Mechanic} się blisko kumpluje, wydała całą wypłatę swojego faceta na buty.", + "308": "Kiedyś {Cyborg} dostał ode mnie perukę tylko po to, żebym mogła obciąć mu włosy. Chyba mu się podobało!", + "309": "Ta stylistka, {Stylist}, raz do niej poszedłem. Tylko na mnie popatrzyła i powiedziała „nic z tego”.", + "31": "Co?!", + "310": "Najwyższy czasz zrobić coś z moimi włosami!", + "311": "Włosy się szczotkuje, wiesz o tym?", + "312": "Tniemy na wróżkę, ze skrzydełkami?", + "313": "Mogę zrobić porządek z uszami i brwiami, ale włosy w nosie to już przesada.", + "314": "Dobra, możesz siadać i pachnieć. Wracam za 25 minut, żeby zmyć twój kolor...", + "315": "Dzięki, złotko! W końcu mogę zająć się moimi włosami.", + "316": "Jesteś trochę za późno, inaczej obcięłabym cię za darmo.", + "317": "Mówili, że po co mi nożyczki na mojej wyprawie. Przecież nie wpadnę w pajęczą sieć, mówili.", + "318": "Fuu, moje włosy, wszędzie pajęczyna!", + "319": "Wiesz, gdzie mieszka {Guide}? Spotkajmy się za jego domem za jakieś trzy godziny. Mam coś, co cię zainteresuje.", + "32": "Widzisz tego starca chodzącego koło lochu? Chyba ma problem.", + "320": "Ten {Merchant} nie rozpoznałby dobrego interesu, nawet jakby spadł mu z nieba prosto na głowę.", + "321": "Sprzedaję tylko to, co uda mi się zdobyć. {Clothier} ciągle mnie męczy, żeby mu sprzedać egzotyczne ubrania.", + "322": "Hmm, przydałby ci się posąg anioła! Mieć go morowo, bo wygląda odjazdowo!", + "323": "Nie przyjmuję zwrotów, bo „kupcowi się odwidziało”. Właściwie to w ogóle nie przyjmuję zwrotów.", + "324": "Kup teraz, a dostaniesz darmową przesyłkę!", + "325": "Sprzedaję towary pochodzące z miejsc, które mogą w ogóle nie istnieć!", + "326": "Chcesz dwa grosze!? Jeden i się dogadamy.", + "327": "Szisza i kawomat! Robi też frytki!", + "328": "Chodź i zobacz! Ryby! Dobre, bardzo dobre! Ryby!", + "329": "Jeśli interesuje cię tandeta, to jesteś w złym miejscu.", + "33": "Szkoda, że {Demolitionist} jest taki nieostrożny. Męczy mnie to codzienne przyszywanie jego oderwanych kończyn.", + "330": "Używane? Ani trochę, sprzedaję wyłącznie towar najwyższej jakości.", + "331": "Roztrzaskanie szkarłatnego serca niekiedy spowoduje, że z nieba spadnie meteor. Szkarłatne serca można zwykle znaleźć w rozpadlinach na szkarłatnych obszarach.", + "332": "Wiesz, co proszek oczyszczający robi ze szkarłatnym kamieniem?", + "333": "Musisz oczyścić świat ze szkarłatu.", + "334": "Psst! Mam dla ciebie robotę. I tak nie możesz odmówić!", + "335": "Potrzebna mi ryba, a ty ją dla mnie złowisz! Zagadaj do mnie!", + "336": "Hej! Właśnie takiego osła... znaczy się, osławionego wędkarza szukam! ", + "337": "Wujek {Angler} potrzebuje cię na posyłki w świecie {WorldName}!", + "338": "Że co?! Nie widzisz, że już zwijam żyłkę??", + "339": "Wystarczy mi ryb! Nie potrzebuję teraz twojej pomocy!", + "34": "Hej, {ArmsDealer} mówił coś o tym, że musi iść do doktora? Tak tylko pytam.", + "340": "{WorldName} nie ma kucharzy, więc muszę sam zrobić tę rybę! ", + "341": "Hej! Uważaj! Ustawiam pułapki do mojego największego kawału! Nikt ich nie zobaczy! Nie waż się nikomu mówić!", + "342": "Dam ci radę, nigdy nie liż bloku lodu! Czekaj, zapomnij o tym, masz właśnie tak zrobić!", + "343": "Wiesz coś o szczekających rybach?! Ja nic, tylko się zastanawiam, czy ty coś wiesz!", + "344": "Świat {WorldName} jest pełny najbardziej cudacznych ryb!", + "345": "Wkurzyłem się! Niektóre ryby prawdopodobnie wyginęły, zanim się urodziłem, to niesprawiedliwe!", + "346": "Nie mam mamusi czy tatusia, ale mam pełno ryb! To prawie to samo!", + "347": "He, he, trzeba było zobaczyć, co zrobiła {Dryad}, jak wsadziłem jej ząb piranii w krzesło!", + "348": "Mam do ciebie prośbę! Nie, nie obchodzi mnie żadna inwazja zombie!", + "349": "Słuchaj! Musisz dla mnie teraz coś złapać.", + "35": "Ja i {Guide} musimy poważnie porozmawiać. Ile razy w tygodniu chcesz przychodzić z poparzeniami od lawy?", + "350": "Nienawidzę krwawych księżyców! Nie śpię przez te wszystkie straszne hałasy!", + "351": "Najgorzej się wędkuje podczas krwawego księżyca! Ryby gryzą, ale zombie też!", + "352": "Lata tu teraz trylion potworów!", + "353": "Niech będzie, dzięki za ratunek. Dobry byłby z ciebie pomagier!", + "354": "Co? Kim jesteś? Wcale nie tonąłem ani nic z tych rzeczy.", + "355": "Dzięki! Jesteś super, mógłbym cię wykorzystać... ee, to znaczy wykorzystać twoje umiejętności!", + "356": "Masz jakieś kości na sprzedaż? Muszę wymienić biodro... znowu.", + "357": "Świetnie! W końcu ktoś chce mnie uwolnić od tych robaków.", + "358": "Nie ma takiej choroby, której by nie uleczył mój szlamowy olejek! Zaufaj mi, naprawdę działa, tylko popatrz na moją figurę!", + "359": "Kości zostały rzucone, jesteś tutaj, więc może coś kupisz?", + "36": "Teraz lepiej wyglądasz.", + "360": "Nie uwierzysz, czym to ludzie we mnie rzucają... Chcesz coś kupić?", + "361": "Podałbym ci swoją pomocną dłoń, ale ostatnim razem, jak tak zrobiłem, to przez miesiąc nie dostałem jej z powrotem.", + "362": "Trzymaj się z daleka od pająków. Zeżrą twoje wnętrzności i zostawią suchą skorupę zamiast człowieka. Wiem, co mówię.", + "363": "Pewnym to być można tylko śmierci i podatków, mam do czynienia z jednym i drugim.", + "364": "Znowu ty? Pewnie chcesz więcej pieniędzy!?", + "365": "Czy wszyscy muszą tutaj tak głośno trzaskać drzwiami?!", + "366": "Widzę, że znowu się lenisz Nie wyobrażam sobie takich jak ty w pracy.", + "367": "Tak, tak, tak! Zaraz wszystko dostaniesz. Brak ci cierpliwości, a przecież i tak jak odwalam całą robotę.", + "368": "Co trzeba zrobić, żeby dali ci tu spokój? Idź i wkurzaj kogoś mniej zajętego!", + "369": "...dwie beczki melasy plus... a, nieważne, jesteś. Twoje pieniądze.", + "37": "Eee... Co się stało z twoją twarzą?", + "370": "Tak między nami... Nie wiem, po co w ogóle płacą czynsz", + "371": "Raz chciałem, żeby {Dryad} zapłaciła mi w naturze... teraz mam grzyby w różnych, dziwnych miejscach.", + "372": "Niech {ArmsDealer} przestanie proponować mi zapłaty amunicją, nie mam nawet pistoletu – zajmij się tym.", + "373": "{Demolitionist} jest mi winien pieniądze. Może ty je od niego odbierzesz i postarasz się nie stracić przy tym ręki albo nogi, albo...", + "374": "{Merchant} mnie zaczepił. Pytał, czy wziąłem karty kredytowe.", + "38": "Wielkie nieba! Dobra jestem, ale nie aż tak dobra.", + "380": "Twoja działka podatków, które pobrałem od dodatkowych mieszkańców.", + "381": "Znowu ty, znowu chcesz całą kasę! Bierz i zejdź mi z oczu!", + "382": "Ech! Bierz swoje pieniądze i zejdź mi z oczu!", + "383": "Więcej teraz nie dostaniesz, ani grosza więcej! Nie przetrać na głupoty.", + "39": "Drodzy przyjaciele, zebraliśmy się dziś w tym miejscu, żeby pożegnać... O, przeżyjesz.", + "390": "...a ludzie mówią, że ja jestem chciwy? Nie, nic więcej dla ciebie nie mam.", + "391": "Patrzysz na mnie jak na skarbonkę, tak? Bo zawsze przychodzisz po pieniądze.", + "392": "Nigdy nie wpadniesz tak po prostu, żeby się przywitać?", + "393": "Ech! Znowu ty? Przecież niedawno dałem ci pieniądze, spadaj i wróć później!", + "394": "Niedawno dałem ci przecież forsę! Spadaj!", + "395": "Znowu wyciągasz łapska po moje sakwy!? I jeszcze mówisz, że to ja jestem chciwy.", + "396": "Już ci zapłaciłem, nie dostaniesz ani grosza więcej! Wynocha!", + "397": "Pieniądze nie rosną na drzewach, więc nie przeginaj gałęzi! Ech! ", + "398": "Udało ci się już wydać wszystko, co ci dałem!? Pff, a co ja jestem, pomoc społeczna? Idź zabić jakiegoś szlama.", + "399": "Nie tak szybko! Dałem ci forsę, teraz zjeżdżaj! ", + "4": "Miecze wygrywają z papierem! Spraw sobie jakiś.", + "40": "Tam jest twoja ręka. Przyniosę ci ją...", + "400": "Już żebrzesz?! Nie patrz tak na mnie, nie zmienię zdania w kilka godzin! ", + "401": "Roztrzaskaj każdy napotkany szkarłatny ołtarz. Spotka cię za to coś fajnego!", + "402": "Szkarłatne ołtarze znajdziesz zazwyczaj w szkarłatnych miejscach. Musisz się do nich zbliżyć, żeby tworzyć przedmioty.", + "41": "Przestań być takim dzieciakiem! Widziałam gorsze przypadki.", + "42": "Trzeba będzie założyć kilka szwów!", + "43": "Znowu problemy z tymi łobuzami?", + "44": "Czekaj, gdzieś tu mam jakieś kartonowe bandaże.", + "45": "{PlayerName}, musisz to rozchodzić i będzie dobrze. Ciii.", + "46": "Boli, jak tak robisz? To nie rób.", + "47": "Wyglądasz, jakby coś cię zjadło, ale tak nie do końca. Znowu uganiasz się za szlamami?", + "48": "Obróć głowę i kaszlnij.", + "49": "Widziałam gorsze rany... Tak, na pewno widziałam gorsze.", + "5": "Chcesz jabłek? Chcesz marchewek? Chcesz ananasów? Mamy pochodnie.", + "50": "Chcesz lizaka?", + "51": "Pokaż, gdzie cię boli.", + "52": "Przykro mi, nie stać cię.", + "53": "To nie są tanie rzeczy.", + "54": "Nie pracuję za darmo.", + "55": "Nie oferuję szczęśliwego zakończenia.", + "56": "Bez operacji plastycznej nic więcej nie można dla ciebie zrobić.", + "57": "Przestań marnować mój czas.", + "58": "Ponoć w piekle jest lalka, która wygląda prawie jak {Guide}. Fajnie by było się z nią pobawić.", + "59": "Szybko! Za godzinę ja i {Nurse} idziemy na randkę.", + "6": "Piękny poranek, nieprawdaż? Potrzebujesz czegoś?", + "60": "Chcę tego, co sprzedaje {Nurse}. Jak to ona nic nie sprzedaje?", + "61": "{Dryad} jest śliczniutka. Szkoda, że taki z niej świętoszek.", + "62": "{Demolitionist} nie jest ci potrzebny, mam tutaj wszystko.", + "63": "{Demolitionist} ma jakiś problem? A wie chociaż, że sprzedajemy całkowicie różne towary?", + "64": "To dobra noc, by z nikim nie rozmawiać. Co ty na to, {PlayerName}?", + "65": "Uwielbiam takie noce. Jest tyle do zabicia!", + "66": "Widzę, że spodobał ci się ten minirekin... Nie chcesz wiedzieć, jak powstał.", + "67": "Hej, to nie film. Nie masz nieskończonej amunicji.", + "68": "Łapy precz od mojej broni!", + "69": "Wiesz, co proszek oczyszczający robi z kamieniem ebonowym z obszarów dotkniętych zepsuciem?", + "7": "Wkrótce zastanie nas noc. Zdecyduj się wreszcie, póki jeszcze możesz.", + "70": "{ArmsDealer} mógłby przestać ze mną ciągle flirtować. Nie wie, że mam 500 lat?", + "72": "Widzisz tego starca chodzącego koło lochu? Nie wygląda dobrze...", + "73": "Sprzedaję, co chcę! Jak ci się nie podoba, to masz problem.", + "74": "Czemu prowokujesz mnie akurat w takiej chwili?", + "75": "Masz nie kupować moich towarów. Masz chcieć kupować moje towary, dobra?", + "76": "Hej, mnie się zdaje, czy dziś wylazło milion zombie?", + "77": "Musisz oczyścić świat z zepsucia.", + "78": "Życzę zdrowia, Terraria cię potrzebuje!", + "79": "Piaski czasu się przesypują. A ty, ty nie starzejesz się z godnością.", + "8": "Nawet nie wiesz, ile bloki ziemi kosztują zagranicą.", + "80": "To całe „nie bierze się drzewa do lasu” było o mnie?", + "81": "Co robią gobliny w galerii sztuki? Podziwiają gobeliny!", + "82": "Nie wpuszczę cię, dopóki nie zdejmiesz mojej klątwy.", + "83": "Wróć nocą, jeśli chcesz wejść.", + "84": "Mojego mistrza nie można wezwać przy świetle dnia.", + "85": "Nie masz wystarczająco siły, żeby przezwyciężyć moją klątwę. Wróć, jak już nabierzesz krzepy.", + "86": "Aż żal patrzeć. Na chwilę obecną nie masz szans w starciu z moim mistrzem.", + "87": "Mam nadzieję, że masz ze sobą przyjaciół.", + "88": "Nie znam cię, ale proszę, nie rób tego. Czeka cię śmierć.", + "89": "Możliwe, że masz wystarczająco dużo siły, żeby zdjąć moją klątwę...", + "9": "Kiedyś {PlayerName} będzie przedmiotem wielu opowieści... zacnych opowieści.", + "90": "Masz wystarczająco siły, żeby pokonać mojego mistrza?", + "91": "Proszę! Pobij mojego oprawcę i mnie uwolnij! Błagam!", + "92": "Pokonaj mojego mistrza, a wpuszczę cię do lochu.", + "93": "Przeszkadza ci ta ebonowa skała? Może zapoznaj ją z jednym z tych materiałów wybuchowych!", + "94": "Hej, był tu jakiś klaun?", + "95": "Miałem tu bombę, a teraz nie mogę jej znaleźć...", + "96": "Już ja mam coś dla tych zombie!", + "97": "Nawet {ArmsDealer} chce mojego towaru!", + "98": "Wolisz dziury po kulach czy po granatach? Tak myślałem.", + "99": "{Nurse} na pewno ci pomoże, jeśli przypadkiem urwie ci się jakaś kończyna." + }, + "LegacyMenu": { + "0": "Włącz nową grę, żeby dołączyć!", + "100": "Tło Wł.", + "101": "Tło Wył.", + "102": "Wybierz język", + "103": "Język", + "104": "Tak", + "105": "Nie", + "106": "Przełącz styl mapy ", + "107": "Przełącz pełny ekran ", + "108": "Przybliż ", + "109": "Oddal ", + "10": "Wczytaj kopię zapasową", + "110": "Zmniejsz przezroczystość ", + "111": "Zwiększ przezroczystość ", + "112": "Mapa włączona", + "113": "Mapa wyłączona", + "114": "Ogólne", + "115": "Sterowanie – mapa", + "116": "Wielordzeniowe oświetlenie:", + "117": "Wył.", + "118": "Zamknij menu", + "11": "Brak kopii zapasowej", + "120": "Inteligentny kursor ", + "121": "Tryb inteligentnego kursora: Przełącz", + "122": "Tryb inteligentnego kursora: Przytrzymaj", + "123": "Pasek postępu wydarzenia", + "124": "Wył.", + "125": "Znikający", + "126": "Wł.", + "127": "Styl", + "128": "Podgląd rozmieszczenia Wł.", + "129": "Podgląd rozmieszczenia Wył.", + "12": "Jeden gracz", + "130": "Wierzchowiec ", + "131": "Osiągnięcia", + "132": "Krew i przemoc Wł.", + "133": "Krew i przemoc Wył.", + "134": "Zastosuj", + "135": "Ustawienia serwera", + "136": "Wielu graczy (Steam): Wył.", + "137": "Wielu graczy (Steam): Wł.", + "138": "Dopuszczeni gracze: Tylko zaproszeni", + "139": "Dopuszczeni gracze: Znajomi", + "13": "Wielu graczy", + "140": "Znajomi mogą zapraszać: Wył.", + "141": "Znajomi mogą zapraszać: Wł.", + "142": "Przyjmowanie znajomych znajomych: Wył.", + "143": "Przyjmowanie znajomych znajomych: Wł.", + "144": "Rozpocznij", + "145": "Dołącz przez Steam", + "146": "Dołącz przez IP", + "147": "Zaproś znajomych", + "148": "W górę", + "149": "W dół", + "14": "Ustawienia", + "150": "W lewo", + "151": "W prawo", + "152": "Skok", + "153": "Rzut", + "154": "Ekwipunek", + "155": "Zahacz", + "156": "Szybka mana", + "157": "Szybkie wzmocnienie", + "158": "Szybki wierzchowiec", + "159": "Szybkie leczenie", + "15": "Wyjdź", + "160": "Wybór automatyczny", + "161": "Inteligentny kursor", + "162": "Użyj przedmiotu", + "163": "Wejdź w interakcję", + "164": "Sterowanie – gra", + "165": "Sterowanie – mapa", + "166": "Sterowanie – pasek skrótów", + "167": "Ustawienia pada", + "168": "Przybliż", + "169": "Oddal", + "16": "Stwórz postać", + "170": "Zwiększ przezroczystość", + "171": "Zmniejsz przezroczystość", + "172": "Przełącz styl mapy", + "173": "Włącz pełną mapę", + "174": "Przewiń w lewo", + "175": "Przewiń w prawo", + "176": "Skrót 1", + "177": "Skrót 2", + "178": "Skrót 3", + "179": "Skrót 4", + "17": "Usuń", + "180": "Skrót 5", + "181": "Skrót 6", + "182": "Skrót 7", + "183": "Skrót 8", + "184": "Skrót 9", + "185": "Skrót 10", + "186": "Quick Mark #1", + "187": "Quick Mark #2", + "188": "Quick Mark #3", + "189": "Quick Mark #4", + "18": "Włosy", + "190": "Radialny pasek skrótów", + "191": "Przypięcie kursora góra", + "192": "Przypięcie kursora prawo", + "193": "Przypięcie kursora dół", + "194": "Przypięcie kursora lewo", + "195": "", + "196": "Przypięcie kursora pada kierunkowego", + "197": "Pasek skrótów pada kierunkowego", + "198": "Zaawansowane ustawienia pada", + "199": "Martwa strefa przycisków spustowych", + "19": "Oczy", + "1": "Port: ", + "200": "Martwa strefa suwaków", + "201": "Martwa strefa lewej gałki analogowej X", + "202": "Martwa strefa lewej gałki analogowej Y", + "203": "Martwa strefa prawej gałki analogowej X", + "204": "Martwa strefa prawej gałki analogowej Y", + "205": "Odwróć lewą gałkę analogową poziomo", + "206": "Odwróć lewą gałkę analogową pionowo", + "207": "Odwróć prawą gałkę analogową poziomo", + "208": "Odwróć prawą gałkę analogową pionowo", + "209": "Użyj", + "20": "Skóra", + "210": "Interfejs", + "211": "Hasła: widoczne", + "212": "Hasła: ukryte", + "213": "Priorytet inteligentnego kursora: Kilof -> topór", + "214": "Priorytet inteligentnego kursora: Topór -> kilof", + "215": "Inteligentne rozmieszczanie bloków: Do kursora", + "217": "Kolor obramowania", + "218": "Kursor", + "219": "Sterowanie", + "21": "Ubrania", + "220": "Aktywuj premię za zestaw: W górę", + "221": "Aktywuj premię za zestaw: W dół", + "222": "Przypisanie przycisków", + "223": "Szybkie wyrzucanie lewy shift: Wł.", + "224": "Szybkie wyrzucanie lewy shift: Wył.", + "225": "Szybkie zastępowanie ściany: Wył.", + "226": "Szybkie zastępowanie ściany: Wł.", + "227": "Czas zmiany paska skrótów w menu radialne: Wł.", + "228": "Czas zmiany paska skrótów w menu radialne: Wył.", + "229": "Siatka płytek Wł.", + "22": "Mężczyzna", + "230": "Siatka płytek Wył.", + "231": "Uchwycenie celu", + "232": "Priorytet uchwycenia celu: Cel", + "233": "Priorytet uchwycenia celu: Najbliższy cel", + "234": "Priorytet uchwycenia celu: Okolice kursora", + "235": "abc / ABC / !@#", + "236": "Backspace", + "237": "Wprowadź tekst", + "238": "Spacja", + "239": "<-", + "23": "Kobieta", + "240": "->", + "241": "Podpowiedzi dla pada Wył.", + "242": "Podpowiedzi dla pada Wł.", + "243": "Sterowanie – menu", + "244": "Radialny pasek szybkiego dostępu", + "245": "Okno bez ramek: Wł.", + "246": "Okno bez ramek: Wył.", + "247": "Pomijanie klatek Wył.", + "248": "Pomijanie klatek Wł.", + "249": "Pomijanie klatek Łagodne", + "24": "Hardcore", + "250": "Pulsowanie przy kopaniu: Wł.", + "251": "Pulsowanie przy kopaniu: Wył.", + "252": "Opóźnienie ruchu po interfejsie", + "25": "Średni", + "26": "Łatwy", + "27": "Losowo", + "28": "Stwórz", + "2": "Rozłącz się", + "32": "Wybierz poziom", + "33": "Koszula", + "34": "Podkoszulek", + "35": "Spodnie", + "36": "Buty", + "37": "Włosy", + "38": "Kolor włosów", + "39": "Kolor oczu", + "3": "Hasło serwera (wymagane):", + "40": "Kolor skóry", + "41": "Kolor koszuli", + "42": "Kolor podkoszulka", + "43": "Kolor spodni", + "44": "Kolor butów", + "45": "Wprowadź nazwę postaci:", + "46": "Usuń", + "47": "Stwórz świat", + "48": "Wprowadź nazwę świata:", + "49": "Gra w oknie", + "4": "Akceptuj", + "50": "Pełny ekran", + "51": "Rozdzielczość", + "52": "Paralaksa", + "53": "Pomijanie klatek Wył.", + "54": "Pomijanie klatek Wł.", + "55": "Oświetlenie: Kolorowe", + "56": "Oświetlenie: Białe", + "57": "Oświetlenie: Retro", + "58": "Oświetlenie: Retro-kolor", + "59": "Jakość: Automatyczna", + "5": "Wróć", + "60": "Jakość: Wysoka", + "61": "Jakość: Średnia", + "62": "Jakość: Niska", + "63": "Grafika", + "64": "Kolor kursora", + "65": "Głośność", + "66": "Sterowanie", + "67": "Automatyczny zapis Wł.", + "68": "Automatyczny zapis Wył.", + "69": "Autopauza Wł.", + "6": "Anuluj", + "70": "Autopauza Wył.", + "71": "Tekst przy podniesieniu Wł.", + "72": "Tekst przy podniesieniu Wył.", + "73": "Rozdzielczość pełnego ekranu", + "74": "W górę ", + "75": "W dół ", + "76": "W lewo ", + "77": "W prawo ", + "78": "Skok ", + "79": "Rzut ", + "7": "Wprowadź hasło serwera:", + "80": "Ekwipunek ", + "81": "Szybkie leczenie ", + "82": "Szybka mana ", + "83": "Szybkie wzmocnienie ", + "84": "Zahacz ", + "85": "Wybór automatyczny ", + "86": "Ustawienia domyślne", + "87": "Dołącz", + "88": "Stwórz grę i graj", + "89": "Wprowadź adres IP serwera:", + "8": "Tworzenie serwera...", + "90": "Wprowadź port serwera:", + "91": "Wybierz rozmiar świata:", + "92": "Mały", + "93": "Średni", + "94": "Duży", + "95": "Czerwony:", + "96": "Zielony:", + "97": "Niebieski:", + "98": "Dźwięk:", + "99": "Muzyka", + "9": "Wczytywanie nieudane!", + "119": "Otoczenie:" + }, + "LegacyTooltip": { + "0": "Założono w okienku wyglądu", + "10": "Niska szybkość", + "11": "Bardzo niska szybkość", + "12": "Ogromnie niska szybkość", + "13": "Ślimak", + "14": "Brak odrzutu", + "15": "Niezwykle słaby odrzut", + "16": "Bardzo słaby odrzut", + "17": "Słaby odrzut", + "18": "Przeciętny odrzut", + "19": "Mocny odrzut", + "1": "Gracz nie dostanie punktów statystyk", + "20": "Bardzo mocny odrzut", + "21": "Niezwykle mocny odrzut", + "22": "Niesamowity odrzut", + "23": "Można założyć", + "24": "Przedmiot wyglądu", + "25": " pkt. obrony", + "26": "% mocy kilofa", + "27": "% mocy topora", + "28": "% mocy młota", + "29": "Przywraca", + "2": " pkt. obrażeń w walce w zwarciu", + "30": "pkt. życia", + "31": "pkt. many", + "32": "Zużywa", + "33": "Można umieścić", + "34": "Amunicja", + "35": "Jednorazowy", + "36": "Materiał", + "37": " czas trwania w minutach", + "38": " czas trwania w sekundach", + "39": "% pkt. obrażeń", + "3": " pkt. obrażeń dystansowych", + "40": "% szybkości użycia", + "41": "% szansy na trafienie krytyczne", + "42": "% kosztu many", + "43": "% rozmiaru", + "44": "% prędkości", + "45": "% odrzutu", + "46": "% szybkości poruszania się", + "47": "% szybkości walki w zwarciu", + "48": "Premia za zestaw:", + "49": "Cena sprzedaży:", + "4": " pkt. obrażeń magicznych", + "50": "Cena zakupu:", + "51": "Brak wartości", + "52": "Zużywa ", + "53": " pkt. obrażeń przywołanej istoty", + "54": " zasięg", + "55": " pkt. obrażeń", + "56": "Oznacz jako ulubione", + "57": "Szybkie wyrzucanie, łączenie i sprzedawanie będzie zablokowane", + "58": " pkt. obrażeń rzutu", + "59": "Ten obiekt został przeklęty przez potężne stworzenie z dżungli", + "5": "% szansy na trafienie krytyczne", + "6": "Szalenie wysoka szybkość", + "7": "Bardzo wysoka szybkość", + "8": "Wysoka szybkość", + "9": "Przeciętna szybkość" + }, + "LegacyMultiplayer": { + "10": "Nie jesteś w drużynie!", + "11": "{0} włącza PvP!", + "12": "{0} wyłącza PvP!", + "13": "{0} nie jest już w drużynie.", + "14": "{0} dołącza do czerwonej drużyny.", + "15": "{0} dołącza do zielonej drużyny.", + "16": "{0} dołącza do niebieskiej drużyny.", + "17": "{0} dołącza do żółtej drużyny.", + "18": "Witaj w", + "19": "{0} dołącza.", + "20": "{0} odchodzi.", + "21": "/gracze", + "22": "{0} dołącza do różowej drużyny.", + "2": "Wykonano nieprawidłową operację.", + "3": "Ten serwer jest dla ciebie niedostępny.", + "4": "Twoja wersja gry i wersja serwera nie są takie same.", + "5": "jest już na tym serwerze.", + "6": "/gra", + "7": "Obecni gracze:", + "8": "/rzuć", + "9": "wyrzuca", + "0": "Otrzymaj:" + }, + "LegacyMisc": { + "0": "Armia goblinów została pokonana!", + "100": "Wybierz zło", + "101": "Zepsucie", + "102": "Szkarłat", + "103": "Losowo", + "10": "Dostajesz gęsiej skórki...", + "11": "Wokół ciebie rozlegają się krzyki...", + "12": "Twój świat został obdarzony kobaltem!", + "13": "Twój świat został obdarzony mythrilem!", + "14": "Twój świat został obdarzony adamantytem!", + "15": "Uwolniono starożytne duchy światłości i mroku.", + "19": "{0} zostaje zgładzony...", + "1": "Od zachodu nadciąga armia goblinów!", + "20": "Trwa zaćmienie słońca!", + "21": "Twój świat został obdarzony paladium!", + "22": "Twój świat został obdarzony orichalcum!", + "23": "Twój świat został obdarzony tytanem!", + "24": "Piraci zostali pokonani!", + "25": "Od zachodu nadciągają piraci!", + "26": "Od wschodu nadciągają piraci!", + "27": "Piraci już tu są!", + "28": "Czujesz wibracje nadciągające z głębin...", + "29": "Czeka cię straszna noc...", + "2": "Od wschodu nadciąga armia goblinów!", + "30": "Powietrze wokół ciebie robi się coraz zimniejsze...", + "31": "Wschodzi dyniowy księżyc...", + "32": "Dżungla jest coraz bardziej niespokojna...", + "33": "Z lochu dobiegają krzyki...", + "34": "Wschodzi mroźny księżyc...", + "35": "{0} odchodzi!", + "36": "{0} odchodzi!", + "37": "Dowolnego rodzaju", + "38": "Płytka dociskowa", + "39": " oraz zwiększona regeneracja życia", + "3": "Przybyła armia goblinów!", + "40": "Zwiększa regenerację życia", + "41": "Marsjanie atakują!", + "42": "Marsjanie zostali pokonani!", + "43": "Niebiańskie stworzenia atakują!", + "44": "Nie możesz myśleć...", + "45": "Miażdży cię ból...", + "46": "Słyszysz pozaziemskie głosy...", + "47": "Księżycowy Władca budzi się ze snu!", + "48": "Bliźnięta budzą się ze snu!", + "49": "Budzisz się z dziwnego snu...", + "4": "Mroźny legion został pokonany!", + "50": "ponosi klęskę!", + "51": "Księżycowy fragment", + "52": "Nadciąga nieuchronny koniec...", + "53": "Wybierz", + "54": "Weź", + "55": "Weź 1", + "56": "Zamknij", + "57": "Zahacz", + "58": "Skocz", + "59": "Przewiń pasek skrótów", + "5": "Od zachodu nadciąga mroźny legion!", + "60": "Atakuj", + "61": "Buduj", + "62": "Pij", + "63": "Działanie", + "64": "Przełącz menu", + "65": "Połóż", + "66": "Zamień", + "67": "Załóż", + "68": "Zdejmij", + "69": "Pokaż flagi pokojów", + "6": "Od wschodu nadciąga mroźny legion!", + "70": "Sprawdź mieszkania", + "71": "Szybkie tworzenie", + "72": "Stwórz", + "73": "Wybierz", + "74": "Śmieci", + "75": "Sprzedaj", + "76": "Przenieś", + "77": "Pokaż wizualizację", + "78": "Ukryj wizualizację", + "79": "Użyj", + "7": "Mroźny legion już tu jest!", + "80": "Porozmawiaj", + "81": "Przeczytaj", + "82": "Wróć", + "83": "Ulubione", + "84": "Nie możesz zmieniać drużyn wewnątrz bloków swojej drużyny!", + "86": "Kaczka", + "87": "Motyl", + "88": "Iluminator", + "89": "Opcje okablowania", + "8": "Wschodzi krwawy księżyc...", + "90": "Kup", + "91": "Kup więcej", + "92": "Sprzedaj", + "93": "Stwórz więcej", + "94": "Spróbuj usnąć", + "95": "Ślimak", + "96": "Chyba ", + "97": " urządza przyjęcie", + "98": " urządzają przyjęcie", + "99": "Koniec imprezy!", + "9": "Czujesz na sobie wzrok złej istoty...", + "104": "Nie można korzystać bez etheriańskiej many, dopóki kryształ eternia nie zostanie obroniony" + }, + "LegacyInterface": { + "0": "Życie:", + "100": "Liczba potworów", + "101": "Liczba zabójstw", + "102": "Faza księżyca", + "103": "Szybkość poruszania się", + "104": "Skarb", + "105": "Rzadkie stworzenia", + "106": "Obrażenia na sekundę", + "107": "Dziwne rośliny", + "108": "Otwarta mapa", + "109": "Zamknięta mapa", + "10": "Obrona", + "110": "Otwórz folder", + "111": "Zrób zrzut ekranu", + "112": "Najpierw musisz stworzyć ramkę", + "113": "Dostępne tylko w grze w oknie", + "114": "Dostępne tylko przy włączonej mapie", + "115": "Tryb aparatu wyłączony", + "116": "Podświetl nowe przedmioty Tak", + "117": "Podświetl nowe przedmioty Nie", + "118": "Przybliż", + "119": "Oddal", + "11": "Wygląd", + "120": "Teleportuj się do sojusznika", + "121": "Upuść przedmiot", + "122": "Uporządkuj przedmioty", + "123": "Zimna pogoda", + "12": "Hełm", + "13": "Koszula", + "14": "Spodnie", + "15": "szt. platyny", + "16": "szt. złota", + "17": "szt. srebra", + "18": "szt. miedzi", + "19": "Przekuj", + "1": "Powietrze", + "20": "Umieść tutaj przedmiot, żeby go przekuć", + "21": "Wyświetlanie przepisów wykorzystujących:", + "22": "Wymagane przedmioty:", + "23": "Brak", + "24": "Umieść tutaj materiał", + "25": "Tworzenie", + "26": "Monety", + "27": "Amunicja", + "28": "Sklep", + "29": "Weź wszystko", + "2": "Mana", + "30": "Zmagazynuj wszystko", + "31": "Szybkie łączenie przedmiotów", + "32": "Świnka skarbonka", + "33": "Sejf", + "34": "Czas", + "35": "Zapisz i wyjdź", + "36": "Rozłącz się", + "37": "Przedmioty", + "38": "Giniesz...", + "39": "To mieszkanie jest odpowiednie.", + "3": "Śmietnik", + "40": "To nie jest odpowiednie mieszkanie.", + "41": "To mieszkanie jest już zajęte.", + "42": "To mieszkanie jest zepsute.", + "43": "Przekroczenie dopuszczalnego czasu połączenia", + "44": "Odbieranie danych świata", + "45": "Załóż", + "46": "Koszt", + "47": "Zapisz", + "48": "Edytuj", + "49": "Status", + "4": "Ekwipunek", + "50": "Klątwa", + "51": "Pomoc", + "52": "Zamknij", + "53": "Woda", + "54": "Ulecz", + "55": "To mieszkanie nie nadaje się do zamieszkania przez:", + "56": "Lawa", + "57": "Barwnik", + "58": "Miód", + "59": "Widać", + "5": "Pasek skrótów odblokowany", + "60": "Nie widać", + "61": "Nazwij ponownie", + "62": "Ustawienia", + "63": "Anuluj", + "64": "Zadanie", + "65": "Przedmiot z zadania", + "66": "Oszczędności", + "67": "Zrób migawkę", + "68": "Ustawienia", + "69": "Ustaw ramkę", + "6": "Pasek skrótów zablokowany", + "70": "Stwórz ramkę", + "71": "Zamknij", + "72": "Wł.", + "73": "Wył.", + "74": "Pakowanie obrazu", + "75": "Uchwyć obiekty", + "76": "Uchwyć tło", + "77": "Wybór biomu", + "78": "Zresetuj ramkę", + "79": "Wyposażenie", + "7": "Mieszkania", + "80": "Mieszkania", + "81": "Tryb aparatu", + "82": "Uzupełnij", + "83": "Mroźny księżyc", + "84": "Dyniowy księżyc", + "85": "Marsjańskie szaleństwo", + "86": "Inwazja piratów", + "87": "Mroźny legion", + "88": "Armia goblinów", + "89": "Weź", + "8": "Pytanie mieszkaniowe", + "90": "Hak wspinaczkowy", + "91": "Wierzchowiec", + "92": "Chowaniec", + "93": "Wózek górniczy", + "94": "Chowaniec światła", + "95": "Czas", + "96": "Pogoda", + "97": "Wędkarstwo", + "98": "Pozycja", + "99": "Głębokość", + "9": "Akcesorium" + }, + "LegacyChestType": { + "0": "Kufer", + "10": "Kufer pokryty bluszczem", + "12": "Kufer z żyjącego drewna", + "13": "Niebiański kufer", + "14": "Kufer z drewna mroku", + "15": "Kufer pokryty pajęczyną", + "16": "Jaszczuhrzy kufer", + "17": "Kufer wody", + "18": "Kufer z dżungli", + "19": "Kufer zepsucia", + "1": "Złoty kufer", + "20": "Kufer szkarłatu", + "21": "Bajkowy kufer", + "23": "Zamknięty kufer z dżungli", + "24": "Zamknięty kufer zepsucia", + "25": "Zamknięty, szkarłatny kufer", + "26": "Zamknięta, bajkowa skrzynia", + "28": "Kufer dynastii", + "29": "Miodowy kufer", + "2": "Zamknięty, złoty kufer", + "30": "Kufer steampunkowy", + "31": "Kufer z drewna palmowego", + "32": "Grzybowy kufer", + "33": "Kufer z drewna borealnego", + "34": "Szlamowy kufer", + "35": "Zielony kufer z lochu", + "36": "Zamknięty, zielony kufer z lochu", + "37": "Różowy kufer z lochu", + "38": "Zamknięty, różowy kufer z lochu", + "39": "Niebieski kufer z lochu", + "3": "Kufer cienia", + "40": "Zamknięty, niebieski kufer z lochu", + "41": "Kościany kufer", + "42": "Kaktusowy kufer", + "43": "Mięsisty kufer", + "44": "Obsydianowy kufer", + "45": "Dyniowy kufer", + "46": "Straszny kufer", + "47": "Szklany kufer", + "48": "Marsjański kufer", + "49": "Meteorytowy kufer", + "4": "Zamknięty kufer cienia", + "50": "Granitowy kufer", + "51": "Marmurowy kufer", + "5": "Beczka", + "6": "Śmietnik", + "7": "Kufer z drewna ebonowego", + "8": "Kufer mahoniowy", + "9": "Kufer z drewna perłowego" + }, + "LegacyDresserType": { + "0": "Komoda", + "10": "Kościana komoda", + "11": "Kaktusowa komoda", + "12": "Straszna komoda", + "13": "Niebiańska komoda", + "14": "Miodowa komoda", + "15": "Jaszczuhrza komoda", + "16": "Komoda z drewna palmowego", + "17": "Grzybowa komoda", + "18": "Komoda z drewna borealnego", + "19": "Szlamowa komoda", + "1": "Komoda z drewna ebonowego", + "20": "Dyniowa komoda", + "21": "Steampunkowa komoda", + "22": "Szklana komoda", + "23": "Mięsista komoda", + "24": "Marsjańska komoda", + "25": "Meteorytowa komoda", + "26": "Granitowa komoda", + "27": "Marmurowa komoda", + "2": "Komoda mahoniowa", + "3": "Komoda z drewna perłowego", + "4": "Komoda z drewna mroku", + "5": "Niebieska komoda z lochu", + "6": "Zielona komoda z lochu", + "7": "Różowa komoda z lochu", + "8": "Złota komoda", + "9": "Obsydianowa komoda", + "28": "{$ItemName.CrystalDresser}", + "29": "{$ItemName.DynastyDresser}", + "30": "{$ItemName.FrozenDresser}", + "31": "{$ItemName.LivingWoodDresser}", + "32": "{$ItemName.SpiderDresser}", + "33": "{$ItemName.LesionDresser}", + "34": "{$ItemName.SolarDresser}", + "35": "{$ItemName.VortexDresser}", + "36": "{$ItemName.NebulaDresser}", + "37": "{$ItemName.StardustDresser}", + "38": "{$ItemName.SandstoneDresser}", + "39": "{$ItemName.BambooDresser}" + }, + "LegacyChestType2": { + "1": "{$ItemName.GoldenChest}", + "0": "{$ItemName.CrystalChest}", + "2": "{$ItemName.SpiderChest}", + "3": "{$ItemName.LesionChest}", + "4": "{$ItemName.GoldChest}", + "5": "{$ItemName.SolarChest}", + "6": "{$ItemName.VortexChest}", + "7": "{$ItemName.NebulaChest}", + "8": "{$ItemName.StardustChest}", + "9": "{$ItemName.GolfChest}", + "10": "{$ItemName.DesertChest}", + "11": "{$ItemName.BambooChest}", + "12": "{$ItemName.DungeonDesertChest}" + } +} \ No newline at end of file diff --git a/Localization/Content/pl-PL/NPCs.json b/Localization/Content/pl-PL/NPCs.json new file mode 100644 index 0000000..cc1b74c --- /dev/null +++ b/Localization/Content/pl-PL/NPCs.json @@ -0,0 +1,582 @@ +{ + "NPCName": { + "BlueSlime": "Niebieski szlam", + "GiantWormHead": "Wielki robak", + "SeekerTail": "Żywiciela świata", + "Clinger": "Chwytak", + "AnglerFish": "Ryba nogopłetwa", + "GreenJellyfish": "Zielona meduza", + "Werewolf": "Wilkołak", + "BoundGoblin": "Związany goblin", + "BoundWizard": "Związany czarodziej", + "GoblinTinkerer": "Goblin Majsterkowicz", + "Wizard": "Czarodziej", + "Clown": "Klaun", + "GiantWormBody": "Wielki robak", + "SkeletonArcher": "Szkielet-łucznik", + "GoblinArcher": "Gobliński łucznik", + "VileSpit": "Wstrętna plujka", + "WallofFlesh": "Ściana Mięcha", + "WallofFleshEye": "Ściana Mięcha", + "TheHungry": "Nienażarty", + "TheHungryII": "Nienażarty", + "LeechHead": "Pijawka", + "LeechBody": "Pijawka", + "LeechTail": "Pijawka", + "GiantWormTail": "Wielki robak", + "ChaosElemental": "Żywiołak chaosu", + "Slimer": "Szlamer", + "Gastropod": "Brzuchonóg", + "BoundMechanic": "Związany mechanik", + "Mechanic": "Mechanik", + "Retinazer": "Siatkówczak", + "Spazmatism": "Spazmak", + "SkeletronPrime": "Szkieletron Prime", + "PrimeCannon": "Armata Prime’a", + "PrimeSaw": "Piła Prime’a", + "EaterofWorldsHead": "Pożeracz Światów", + "PrimeVice": "Zacisk Prime’a", + "PrimeLaser": "Laser Prime’a", + "BaldZombie": "Zombie", + "WanderingEye": "Błędne oko", + "TheDestroyer": "Niszczyciel", + "TheDestroyerBody": "Niszczyciel", + "TheDestroyerTail": "Niszczyciel", + "IlluminantBat": "Świecący nietoperz", + "IlluminantSlime": "Świecący szlam", + "Probe": "Sonda", + "EaterofWorldsBody": "Pożeracz Światów", + "PossessedArmor": "Opętana zbroja", + "ToxicSludge": "Toksyczny muł", + "SantaClaus": "Święty Mikołaj", + "SnowmanGangsta": "Bałwan-ganster", + "MisterStabby": "Pan dźgacz", + "SnowBalla": "Śnieżny koleżka", + "IceSlime": "Lodowy szlam", + "Penguin": "Pingwin", + "PenguinBlack": "Pingwin", + "EaterofWorldsTail": "Pożeracz Światów", + "IceBat": "Lodowy nietoperz", + "Lavabat": "Nietoperz lawy", + "GiantFlyingFox": "Wielki, latający lis", + "GiantTortoise": "Wielki żółw", + "IceTortoise": "Lodowy żółw", + "Wolf": "Wilk", + "RedDevil": "Czerwony diabeł", + "Arapaima": "Arapaima", + "VampireBat": "Wampir", + "Vampire": "Wampir", + "MotherSlime": "Matka szlamów", + "Truffle": "Trufla", + "Frankenstein": "Frankenstein", + "BlackRecluse": "Czarny pustelnik", + "WallCreeper": "Naścienny pełzak", + "WallCreeperWall": "Naścienny pełzak", + "SwampThing": "Bagienne coś", + "UndeadViking": "Nieumarły wiking", + "CorruptPenguin": "Zepsuty pingwin", + "IceElemental": "Żywiołak lodu", + "Merchant": "Kupiec", + "PigronCorruption": "Smosiak", + "PigronHallow": "Smosiak", + "RuneWizard": "Runiczny czarodziej", + "Crimera": "Szkarłatnica", + "Herpling": "Herpling", + "AngryTrapper": "Rozgniewany traper", + "MossHornet": "Szerszeń mchu", + "Derpling": "Derpling", + "Steampunker": "Steampunkówa", + "CrimsonAxe": "Szkarłatny topór", + "Nurse": "Pielęgniarka", + "PigronCrimson": "Smosiak", + "FaceMonster": "Pyskostwór", + "FloatyGross": "Płynąca odraza", + "Crimslime": "Szkarlam", + "SpikedIceSlime": "Kolczasty, lodowy szlam", + "SnowFlinx": "Śnieżny flinx", + "PincushionZombie": "Zombie", + "SlimedZombie": "Zombie", + "SwampZombie": "Zombie", + "TwiggyZombie": "Zombie", + "ArmsDealer": "Handlarz bronią", + "CataractEye": "Demoniczne oko", + "SleepyEye": "Demoniczne oko", + "DialatedEye": "Demoniczne oko", + "GreenEye": "Demoniczne oko", + "PurpleEye": "Demoniczne oko", + "LostGirl": "Zagubiona dziewczynka", + "Nymph": "Nimfa", + "ArmoredViking": "Uzbrojony wiking", + "Lihzahrd": "Jaszczuhr", + "LihzahrdCrawler": "Jaszczuhr", + "DemonEye": "Demoniczne oko", + "Dryad": "Driada", + "FemaleZombie": "Zombie", + "HeadacheSkeleton": "Szkielet", + "MisassembledSkeleton": "Szkielet", + "PantlessSkeleton": "Szkielet", + "SpikedJungleSlime": "Kolczasty szlam z dżungli", + "Moth": "Ćma", + "IcyMerman": "Lodowy syren", + "DyeTrader": "Handlarz barwnikami", + "PartyGirl": "Imprezowiczka", + "Cyborg": "Cyborg", + "Skeleton": "Szkielet", + "Bee": "Pszczoła", + "BeeSmall": "Pszczoła", + "PirateDeckhand": "Majtek piracki", + "PirateCorsair": "Korsarz", + "PirateDeadeye": "Pirat „sokole oko”", + "PirateCrossbower": "Kusznik piracki", + "PirateCaptain": "Kapitan piratów", + "CochinealBeetle": "Czerwiec żukowy", + "CyanBeetle": "Cyjanowy żuk", + "LacBeetle": "Żuk szelak", + "Guide": "Przewodnik", + "SeaSnail": "Ślimak morski", + "Squid": "Kałamarnica", + "QueenBee": "Królowa Pszczół", + "ZombieRaincoat": "Zombie w płaszczu przeciwdeszczowym", + "FlyingFish": "Latająca ryba", + "UmbrellaSlime": "Szlam z parasolką", + "FlyingSnake": "Latający wąż", + "Painter": "Malarz", + "WitchDoctor": "Szaman", + "Pirate": "Pirat", + "MeteorHead": "Głowa meteoru", + "GoldfishWalker": "Złota rybka", + "HornetFatty": "Szerszeń", + "HornetHoney": "Szerszeń", + "HornetLeafy": "Szerszeń", + "HornetSpikey": "Szerszeń", + "HornetStingy": "Szerszeń", + "JungleCreeper": "Pełzak z dżungli", + "JungleCreeperWall": "Pełzak z dżungli", + "BlackRecluseWall": "Czarny pustelnik", + "BloodCrawler": "Krwawy pełzacz", + "FireImp": "Ognisty diablik", + "BloodCrawlerWall": "Krwawy pełzacz", + "BloodFeeder": "Krwawy żywiciel", + "BloodJelly": "Krwawa meduza", + "IceGolem": "Lodowy golem", + "RainbowSlime": "Tęczowy szlam", + "Golem": "Golem", + "GolemHead": "Głowa golema", + "GolemFistLeft": "Pięść golema", + "GolemFistRight": "Pięść golema", + "GolemHeadFree": "Głowa golema", + "BurningSphere": "Płonąca sfera", + "AngryNimbus": "Rozgniewana chmura", + "Eyezor": "Laseroko", + "Parrot": "Papuga", + "Reaper": "Kostucha", + "ZombieMushroom": "Zombie-zarodnik", + "ZombieMushroomHat": "Zombie-zarodnik", + "FungoFish": "Grzyboryba", + "AnomuraFungus": "Grzyb-anomura", + "MushiLadybug": "Biedronka mushi", + "FungiBulb": "Grzybicza cebulka", + "GoblinPeon": "Gobliński czeladnik", + "GiantFungiBulb": "Wielka, grzybicza cebulka", + "FungiSpore": "Zarodnik grzybów", + "Plantera": "Plantera", + "PlanterasHook": "Hak Plantery", + "PlanterasTentacle": "Macka Plantery", + "Spore": "Zarodnik", + "BrainofCthulhu": "Mózg Cthulhu", + "Creeper": "Pełzak", + "IchorSticker": "Ichorowy strzelec", + "RustyArmoredBonesAxe": "Rdzawe, zbrojne kości", + "GoblinThief": "Gobliński złodziej", + "RustyArmoredBonesFlail": "Rdzawe, zbrojne kości", + "RustyArmoredBonesSword": "Rdzawe, zbrojne kości", + "RustyArmoredBonesSwordNoArmor": "Rdzawe, zbrojne kości", + "BlueArmoredBones": "Niebieskie, zbrojne kości", + "BlueArmoredBonesMace": "Niebieskie, zbrojne kości", + "BlueArmoredBonesNoPants": "Niebieskie, zbrojne kości", + "BlueArmoredBonesSword": "Niebieskie, zbrojne kości", + "HellArmoredBones": "Piekielne, zbrojne kości", + "HellArmoredBonesSpikeShield": "Piekielne, zbrojne kości", + "HellArmoredBonesMace": "Piekielne, zbrojne kości", + "GoblinWarrior": "Gobliński wojownik", + "HellArmoredBonesSword": "Piekielne, zbrojne kości", + "RaggedCaster": "Obdarty magik", + "RaggedCasterOpenCoat": "Obdarty magik", + "Necromancer": "Nekromanta", + "NecromancerArmored": "Nekromanta", + "DiabolistRed": "Diabolista", + "DiabolistWhite": "Diabolista", + "BoneLee": "Obrus Lee", + "DungeonSpirit": "Duch z lochu", + "GiantCursedSkull": "Wielka, przeklęta czaszka", + "GoblinSorcerer": "Gobliński czarownik", + "Paladin": "Paladyn", + "SkeletonSniper": "Szkielet-snajper", + "TacticalSkeleton": "Szkielet-taktyk", + "SkeletonCommando": "Szkielet-komandos", + "AngryBonesBig": "Złościotrup", + "AngryBonesBigMuscle": "Złościotrup", + "AngryBonesBigHelmet": "Złościotrup", + "BirdBlue": "Modrosójka błękitna", + "BirdRed": "Kardynał", + "Squirrel": "Wiewiórka", + "Zombie": "Zombie", + "ChaosBall": "Kula chaosu", + "Mouse": "Mysz", + "Raven": "Kruk", + "SlimeMasked": "Szlam", + "BunnySlimed": "Króliczek", + "HoppinJack": "Skaczący Jack", + "Scarecrow1": "Strach na wróble", + "Scarecrow2": "Strach na wróble", + "Scarecrow3": "Strach na wróble", + "Scarecrow4": "Strach na wróble", + "Scarecrow5": "Strach na wróble", + "AngryBones": "Złościotrup", + "Scarecrow6": "Strach na wróble", + "Scarecrow7": "Strach na wróble", + "Scarecrow8": "Strach na wróble", + "Scarecrow9": "Strach na wróble", + "Scarecrow10": "Strach na wróble", + "HeadlessHorseman": "Bezgłowy jeździec", + "Ghost": "Duch", + "DemonEyeOwl": "Demoniczne oko", + "DemonEyeSpaceship": "Demoniczne oko", + "ZombieDoctor": "Zombie", + "DarkCaster": "Mroczny magik", + "ZombieSuperman": "Zombie", + "ZombiePixie": "Zombie", + "SkeletonTopHat": "Szkielet", + "SkeletonAstonaut": "Szkielet", + "SkeletonAlien": "Szkielet", + "MourningWood": "Drzewo Żałobne", + "Splinterling": "Drzazguś", + "Pumpking": "Dyniokról", + "PumpkingBlade": "Dyniokról", + "Hellhound": "Piekielny ogar", + "WaterSphere": "Wodna sfera", + "Poltergeist": "Złośliwy duch", + "ZombieXmas": "Zombie", + "ZombieSweater": "Zombie", + "SlimeRibbonWhite": "Szlam", + "SlimeRibbonYellow": "Szlam", + "SlimeRibbonGreen": "Szlam", + "SlimeRibbonRed": "Szlam", + "BunnyXmas": "Króliczek", + "ZombieElf": "Elf-zombie", + "ZombieElfBeard": "Elf-zombie", + "CursedSkull": "Przeklęta czaszka", + "ZombieElfGirl": "Elf-zombie", + "PresentMimic": "Mimik z prezentu", + "GingerbreadMan": "Piernikowy ludek", + "Yeti": "Yeti", + "Everscream": "Ciągłokrzyk", + "IceQueen": "Lodowa Królowa", + "SantaNK1": "Czołgołaj-NK1", + "ElfCopter": "Elfokopter", + "Nutcracker": "Dziadek do orzechów", + "NutcrackerSpinning": "Dziadek do orzechów", + "SkeletronHead": "Szkieletron", + "ElfArcher": "Elf-łucznik", + "Krampus": "Krampus", + "Flocko": "Śnieżek", + "Stylist": "Stylistka", + "WebbedStylist": "Stylistka pokryta pajęczyną", + "Firefly": "Iluminator", + "Butterfly": "Motyl", + "Worm": "Robak", + "LightningBug": "Świetlik", + "Snail": "Ślimak", + "SkeletronHand": "Szkieletron", + "GlowingSnail": "Świecący ślimak", + "Frog": "Żaba", + "Duck": "Kaczka", + "Duck2": "Kaczka", + "DuckWhite": "Kaczka", + "DuckWhite2": "Kaczka", + "ScorpionBlack": "Skorpion", + "Scorpion": "Skorpion", + "TravellingMerchant": "Wędrowny kupiec", + "Angler": "Wędkarz", + "OldMan": "Starzec", + "DukeFishron": "Książę Rybok", + "DetonatingBubble": "Wybuchająca bańka", + "Sharkron": "Smokin", + "Sharkron2": "Smokin", + "TruffleWorm": "Robak truflowy", + "TruffleWormDigger": "Robak truflowy", + "SleepingAngler": "Śpiący wędkarz", + "Grasshopper": "Konik polny", + "ChatteringTeethBomb": "Bombowe, szczękające zęby", + "Demolitionist": "Dewastator", + "BrainScrambler": "Mąciciel", + "RayGunner": "Operator promieni", + "MartianOfficer": "Marsjański oficer", + "ForceBubble": "Bańkotarcza", + "GrayGrunt": "Szary siepacz", + "MartianEngineer": "Marsjański inżynier", + "MartianTurret": "Wieżyczka tesla", + "MartianDrone": "Marsjański dron", + "GigaZapper": "Gigamiotacz", + "BoneSerpentHead": "Kościany wąż", + "ScutlixRider": "Scutlixowy strzelec", + "Scutlix": "Scutlix", + "EyeofCthulhu": "Oko Cthulhu", + "BoneSerpentBody": "Kościany wąż", + "BoneSerpentTail": "Kościany wąż", + "SolarCrawltipedeHead": "Pełzowij", + "SolarCrawltipedeBody": "Pełzowij", + "SolarCrawltipedeTail": "Pełzowij", + "SolarDrakomire": "Drakomir", + "SolarDrakomireRider": "Drakomirski jeździec", + "SolarSroller": "Słoneczny walcownik", + "SolarCorite": "Korium", + "SolarSolenian": "Lunar", + "Hornet": "Szerszeń", + "ManEater": "Kanibal", + "ArmedZombie": "Zombie", + "ArmedZombiePincussion": "Zombie", + "ArmedZombieSlimed": "Zombie", + "ArmedZombieSwamp": "Zombie", + "ArmedZombieTwiggy": "Zombie", + "ArmedZombieCenx": "Zombie", + "UndeadMiner": "Nieumarły górnik", + "GoldBird": "Złoty ptak", + "GoldBunny": "Złoty króliczek", + "GoldButterfly": "Złoty motyl", + "GoldFrog": "Złota żaba", + "GoldGrasshopper": "Złoty konik polny", + "GoldMouse": "Złota mysz", + "GoldWorm": "Złoty robak", + "BoneThrowingSkeleton": "Szkielet", + "Tim": "Tim", + "BoneThrowingSkeleton2": "Szkielet", + "BoneThrowingSkeleton3": "Szkielet", + "BoneThrowingSkeleton4": "Szkielet", + "Bunny": "Króliczek", + "CorruptBunny": "Zepsuty króliczek", + "Harpy": "Harpia", + "CaveBat": "Nietoperz jaskiniowy", + "ServantofCthulhu": "Sługa Cthulhu", + "KingSlime": "Król Szlam", + "JungleBat": "Nietoperz z dżungli", + "DoctorBones": "Doktor Bones", + "TheGroom": "Pan młody", + "Clothier": "Kuśnierz", + "Goldfish": "Złota rybka", + "Snatcher": "Łapacz", + "CorruptGoldfish": "Zepsuta złota rybka", + "Piranha": "Pirania", + "LavaSlime": "Szlam lawy", + "EaterofSouls": "Pożeracz dusz", + "Hellbat": "Piekielny nietoperz", + "Vulture": "Sęp", + "Demon": "Demon", + "BlueJellyfish": "Niebieska meduza", + "PinkJellyfish": "Różowa meduza", + "Shark": "Rekin", + "VoodooDemon": "Demon voodoo", + "Crab": "Krab", + "DungeonGuardian": "Strażnik lochu", + "Antlion": "Mrówkolew", + "DevourerHead": "Pożeracz", + "SpikeBall": "Kolaczatka", + "DungeonSlime": "Szlam z lochu", + "BlazingWheel": "Płonące koło", + "GoblinScout": "Gobliński zwiadowca", + "Bird": "Ptak", + "Pixie": "Wróżka", + "ArmoredSkeleton": "Opancerzony szkielet", + "Mummy": "Mumia", + "DarkMummy": "Mroczna mumia", + "DevourerBody": "Pożeracz", + "LightMummy": "Jasna mumia", + "CorruptSlime": "Zepsuty szlam", + "Wraith": "Widmo", + "CursedHammer": "Przeklęty młot", + "EnchantedSword": "Zaklęty miecz", + "Mimic": "Mimik", + "Unicorn": "Jednorożec", + "WyvernHead": "Wywerna", + "WyvernLegs": "Wywerna", + "WyvernBody": "Wywerna", + "DevourerTail": "Pożeracz", + "WyvernBody2": "Wywerna", + "WyvernBody3": "Wywerna", + "WyvernTail": "Wywerna", + "GiantBat": "Wielki nietoperz", + "Corruptor": "Skaziciel", + "DiggerHead": "Kopacz", + "DiggerBody": "Kopacz", + "DiggerTail": "Kopacz", + "SeekerHead": "Żywiciela świata", + "SeekerBody": "Żywiciela świata", + "AncientCultistSquidhead": "Starożytna wizja", + "AncientDoom": "Starożytna zguba", + "AncientLight": "Starożytne światło", + "BigMimicCorruption": "Zepsuty mimik", + "BigMimicCrimson": "Szkarłatny mimik", + "BigMimicHallow": "Bajkowy mimik", + "BigMimicJungle": "Mimik z dżungli", + "BloodZombie": "Krwawy zombie", + "Buggy": "Łazik", + "Butcher": "Rzeźnik", + "Crawdad": "Rak", + "Crawdad2": "Rak", + "CreatureFromTheDeep": "Potwór z głębin", + "CrimsonPenguin": "Niecny pingwin", + "CultistBoss": "Obłąkany kultysta", + "CultistBossClone": "Obłąkany kultysta", + "CultistDragonBody1": "Fantazmatyczny smok", + "CultistDragonBody2": "Fantazmatyczny smok", + "CultistDragonBody3": "Fantazmatyczny smok", + "CultistDragonBody4": "Fantazmatyczny smok", + "CultistDragonHead": "Fantazmatyczny smok", + "CultistDragonTail": "Fantazmatyczny smok", + "CultistTablet": "Tajemnicza tabliczka", + "DD2AttackerTest": "???", + "DD2GoblinT3": "{$NPCName.DD2GoblinT1}", + "DD2GoblinBomberT3": "{$NPCName.DD2GoblinBomberT1}", + "DD2JavelinstT2": "{$NPCName.DD2JavelinstT1}", + "DD2JavelinstT3": "{$NPCName.DD2JavelinstT1}", + "DD2LanePortal": "Tajemniczy portal", + "DD2GoblinT2": "{$NPCName.DD2GoblinT1}", + "DeadlySphere": "Zabójcza kula", + "DemonTaxCollector": "Umęczona dusza", + "DesertBeast": "Bazyliszek", + "DesertDjinn": "Duch pustynny", + "DesertGhoul": "Ghul", + "DesertGhoulCorruption": "Plugawy ghul", + "DesertGhoulCrimson": "Skażony ghul", + "DesertGhoulHallow": "Ghul-marzyciel", + "DesertLamiaDark": "Lamia", + "DesertLamiaLight": "Lamia", + "DesertScorpionWalk": "Pustynny kłusownik", + "DesertScorpionWall": "Pustynny kłusownik", + "Drippler": "Cieknący", + "DrManFly": "Dr Ludzka Mucha", + "DuneSplicerBody": "Penetrator diun", + "DuneSplicerHead": "Penetrator diun", + "DuneSplicerTail": "Penetrator diun", + "EnchantedNightcrawler": "Zaczarowany, nocny pełzak", + "GiantFlyingAntlion": "Rojnik mrówkolwów", + "Fritz": "Fritz", + "GiantShelly": "Wielki Shelly", + "GiantShelly2": "Wielki Shelly", + "GoblinSummoner": "Gobliński przywoływacz", + "GraniteFlyer": "Granitowy żywiołak", + "GraniteGolem": "Granitowy golem", + "GreekSkeleton": "Hoplita", + "Grubby": "Parszywek", + "LunarTowerNebula": "Filar mgławicy", + "LunarTowerSolar": "Filar słońca", + "LunarTowerStardust": "Filar pyłu gwiezdnego", + "LunarTowerVortex": "Filar wiru", + "MartianProbe": "Marsjańska sonda", + "MartianSaucer": "Marsjański Spodek", + "MartianSaucerCannon": "Armata Marsjańskiego Spodka", + "MartianSaucerCore": "Marsjański Spodek", + "MartianSaucerTurret": "Wieżyczka Marsjańskiego Spodka", + "MartianWalker": "Marsjański piechur", + "Medusa": "Meduza", + "MoonLordCore": "Serce Księżycowego Władcy", + "MoonLordHand": "Ręka Księżycowego Władcy", + "MoonLordHead": "Księżycowy Władca", + "Mothron": "Mothron", + "MothronEgg": "Jajo mothronu", + "MothronSpawn": "Mały mothron", + "Nailhead": "Gwoździołeb", + "NebulaBeast": "Bestia ewolucyjna", + "NebulaBrain": "Pływak mgławicy", + "NebulaHeadcrab": "Mózgojad", + "NebulaSoldier": "Profeta", + "PartyBunny": "Króliczek", + "Psycho": "Psychopata", + "Salamander": "Salamandra", + "Salamander2": "Salamandra", + "Salamander3": "Salamandra", + "Salamander4": "Salamandra", + "Salamander5": "Salamandra", + "Salamander6": "Salamandra", + "Salamander7": "Salamandra", + "Salamander8": "Salamandra", + "Salamander9": "Salamandra", + "SandElemental": "Żywiołak piasku", + "SandShark": "Piaskowy rekin", + "SandsharkCorrupt": "Kąsacz kości", + "SandsharkCrimson": "Mięsożerca", + "SandsharkHallow": "Kryształowy młocarz", + "SandSlime": "Piaskowy szlam", + "SlimeSpiked": "Kolczasty szlam", + "Sluggy": "Leniwek", + "SolarFlare": "Flara słoneczna", + "SolarGoop": "Słoneczny fragment", + "SolarSpearman": "Drakanianin", + "SquirrelGold": "Złota wiewiórka", + "SquirrelRed": "Czerwona wiewiórka", + "StardustCellBig": "Gwiezdne ogniwo", + "StardustCellSmall": "Gwiezdne ogniwo", + "StardustJellyfishBig": "Najeźdźca pływów", + "StardustSoldier": "Obserwator gwiazd", + "StardustSpiderBig": "Iskromiot", + "StardustSpiderSmall": "Błysk", + "StardustWormHead": "Tkacz drogi mlecznej", + "TargetDummy": "Kukła treningowa", + "TaxCollector": "Poborca podatkowy", + "TheBride": "Panna młoda", + "ThePossessed": "Opętany", + "TombCrawlerBody": "Cmentarny pełzacz", + "TombCrawlerHead": "Cmentarny pełzacz", + "TombCrawlerTail": "Cmentarny pełzacz", + "Tumbleweed": "Rozjuszony biegacz", + "VortexHornet": "Kosmiczny szerszeń", + "VortexHornetQueen": "Kosmiczna królowa", + "VortexLarva": "Kosmiczna larwa", + "VortexRifleman": "Sztormowy lotnik", + "VortexSoldier": "Wirak", + "GiantWalkingAntlion": "Mrówkolwowy wierzchowiec", + "DD2GoblinBomberT2": "{$NPCName.DD2GoblinBomberT1}", + "DD2WyvernT3": "{$NPCName.DD2WyvernT1}", + "DD2WyvernT2": "{$NPCName.DD2WyvernT1}", + "DD2OgreT3": "{$NPCName.DD2OgreT2}", + "DD2WitherBeastT3": "{$NPCName.DD2WitherBeastT2}", + "DD2SkeletonT3": "{$NPCName.DD2SkeletonT1}", + "DD2KoboldWalkerT3": "{$NPCName.DD2KoboldWalkerT2}", + "DD2DrakinT3": "{$NPCName.DD2DrakinT2}", + "DD2DarkMageT3": "{$NPCName.DD2DarkMageT1}", + "DD2KoboldFlyerT3": "{$NPCName.DD2KoboldFlyerT2}", + "BabySlime": "Młody szlam", + "BigRainZombie": "Zombie", + "BlackSlime": "Czarny szlam", + "DD2Bartender": "Szynkarz", + "DD2Betsy": "Betsy", + "DD2DarkMageT1": "Mroczny mag", + "DD2DrakinT2": "Drakin", + "DD2EterniaCrystal": "Kryształ eternia", + "DD2GoblinBomberT1": "Etheriański goblin-bombowiec", + "DD2GoblinT1": "Etheriański goblin", + "DD2JavelinstT1": "Etheriański oszczepnik", + "DD2KoboldFlyerT2": "Koboldowy szybowiec", + "DD2KoboldWalkerT2": "Kobold", + "DD2LightningBugT3": "Etheriański świetlik", + "DD2OgreT2": "Ogr", + "DD2SkeletonT1": "Szkielet Starszego", + "DD2WitherBeastT2": "Bestia-niszczycielka", + "DD2WyvernT1": "Etheriańska wywerna", + "GreenSlime": "Zielony szlam", + "JungleSlime": "Szlam z dżungli", + "Pinky": "Pinky", + "PurpleSlime": "Fioletowy szlam", + "RedSlime": "Czerwony szlam", + "Slimeling": "Szlamek", + "Slimer2": "Szlamer", + "SmallRainZombie": "Zombie", + "YellowSlime": "Żółty szlam", + "MoonLordFreeEye": "Prawdziwe Oko Cthulhu", + "MoonLordLeechBlob": "Skrzep księżycowej pijawki", + "SkeletonMerchant": "Kupiec-szkielet", + "PirateShip": "Latający Holender", + "PirateShipCannon": "Armata Holendra", + "BartenderUnconscious": "Nieprzytomny" + } +} \ No newline at end of file diff --git a/Localization/Content/pl-PL/Projectiles.json b/Localization/Content/pl-PL/Projectiles.json new file mode 100644 index 0000000..54760e0 --- /dev/null +++ b/Localization/Content/pl-PL/Projectiles.json @@ -0,0 +1,722 @@ +{ + "ProjectileName": { + "AdamantiteChainsaw": "Adamantytowa piła łańcuchowa", + "AdamantiteDrill": "Adamantytowy świder", + "AdamantiteGlaive": "Adamantytowa glewia", + "Amarok": "Jojo", + "AmberBolt": "Bursztynowy pocisk", + "AmethystBolt": "Ametystowy pocisk", + "Anchor": "Kotwica", + "AncientDoomProjectile": "Koniec proroctwa", + "AntiGravityHook": "Hak antygrawitacyjny", + "Arkhalis": "Arkhalis", + "AshBallFalling": "Kula popiołu", + "BabyDino": "Młody dinozaur", + "BabyEater": "Młody pożeracz", + "BabyFaceMonster": "Młody pyskostwór", + "BabyGrinch": "Młody grinch", + "BabyHornet": "Młody szerszeń", + "BabySkeletronHead": "Głowa szkieletrona", + "BabySlime": "Młody szlam", + "BabySnowman": "Młody bałwan", + "BabySpider": "Młody pająk", + "BallofFire": "Kula ognia", + "BallofFrost": "Kula mrozu", + "BallOHurt": "Młoda kula bólu", + "Bananarang": "Bananarang", + "Bat": "Nietoperz", + "BatHook": "Hak nietoperzowy", + "BeachBall": "Piłka plażowa", + "Bee": "Pszczoła", + "BeeArrow": "Pszczela strzała", + "BeeHive": "Ul", + "Beenade": "Pszczeli granat", + "BlackBolt": "Onyksowy blaster", + "BlackCat": "Czarny kot", + "BlackCounterweight": "Przeciwwaga", + "Blizzard": "Zamieć", + "BloodCloudMoving": "KEY_ProjectileID.BloodCloudRaining}", + "BloodCloudRaining": "Krwawa chmura", + "BloodRain": "Krwawy deszcz", + "BloodWater": "Krwawa woda", + "BloodyMachete": "Krwawa maczeta", + "BlowupSmoke": "Dym po wybuchu", + "BlowupSmokeMoonlord": "Dym po wybuchu", + "BlueCounterweight": "Przeciwwaga", + "BlueFairy": "Niebieski duszek", + "BlueFlare": "Niebieska flara", + "BlueMoon": "Niebieski księżyc", + "BobberFiberglass": "Spławik", + "BobberFisherOfSouls": "Spławik", + "BobberFleshcatcher": "Spławik", + "BobberGolden": "Spławik", + "BobberHotline": "Spławik", + "BobberMechanics": "Spławik", + "BobberReinforced": "Spławik", + "BobbersittingDuck": "Spławik", + "BobberWooden": "Spławik", + "Bomb": "Bomba", + "BombFish": "Bombowa ryba", + "BombSkeletronPrime": "Bomba", + "Bone": "Kość", + "BoneArrow": "Kościana strzała", + "BoneArrowFromMerchant": "Kościana strzała", + "BoneDagger": "Kościany sztylet", + "BoneGloveProj": "Xość", + "BoneJavelin": "Kościany oszczep", + "Boulder": "Głaz", + "BoulderStaffOfEarth": "Głaz", + "BouncyBomb": "Skacząca bomba", + "BouncyDynamite": "Skaczący dynamit", + "BouncyGlowstick": "Skaczący świetlik", + "BouncyGrenade": "Skaczący granat", + "BoxingGlove": "Rękawica bokserska", + "BrainOfConfusion": "Mózg chaosu", + "BrainScramblerBolt": "Pocisk mąciciela", + "Bubble": "Bańka", + "Bullet": "Kula", + "BulletDeadeye": "Kula", + "BulletHighVelocity": "Kula", + "BulletSnowman": "Kula", + "Bunny": "Króliczek", + "ButchersChainsaw": "Piła łańcuchowa rzeźnika", + "CandyCaneHook": "Cukierkowy hak", + "CandyCorn": "Cukierkowa kukurydza", + "CannonballFriendly": "Kula armatnia", + "CannonballHostile": "Kula armatnia", + "Cascade": "Jojo", + "ChainGuillotine": "Gilotyna łańcuchowa", + "ChainKnife": "Nóż łańcuchowy", + "ChargedBlasterCannon": "Naładowany blaster armatni", + "ChargedBlasterLaser": "Naładowany blaster laserowy", + "ChargedBlasterOrb": "Naładowany blaster kulowy", + "Chik": "Jojo", + "ChlorophyteArrow": "Zielenicowa strzała", + "ChlorophyteBullet": "Kula", + "ChlorophyteChainsaw": "Zielenicowa piła łańcuchowa", + "ChlorophyteDrill": "Zielenicowy świder", + "ChlorophyteJackhammer": "Zielenicowy młot pneumatyczny", + "ChlorophyteOrb": "Zielenicowa kula", + "ChlorophytePartisan": "Zielenicowa partyzana", + "ChristmasHook": "Świąteczny hak", + "ClingerStaff": "Przeklęte płomienie", + "ClothiersCurse": "Czaszka", + "CobaltChainsaw": "Kobaltowa piła łańcuchowa", + "CobaltDrill": "Kobaltowy świder", + "CobaltNaginata": "Kobaltowa naginata", + "Code1": "Jojo", + "Code2": "Jojo", + "CoinPortal": "Portal monetowy", + "CompanionCube": "Kostka towarzysząca", + "ConfettiGun": "Konfetti", + "ConfettiMelee": "Konfetti", + "CopperCoin": "Miedziana moneta", + "CopperCoinsFalling": "Miedziane monety", + "CorruptSpray": "Rozpylacz zepsucia", + "CorruptYoyo": "Jojo", + "CrimsandBallFalling": "Szkarłatna kula", + "CrimsandBallGun": "Szkarłatna kula", + "CrimsonHeart": "Szkarłatne serce", + "CrimsonSpray": "Szkarłatny rozpylacz", + "CrimsonYoyo": "Jojo", + "CrossGraveMarker": "Nagrobek", + "CrystalBullet": "Kryształowa kula", + "CrystalDart": "Kryształowa strzałka", + "CrystalLeaf": "Kryształowy liść", + "CrystalLeafShot": "Kryształowy liść", + "CrystalPulse": "Kryształowy ładunek", + "CrystalPulse2": "Kryształowy ładunek", + "CrystalShard": "Kryształowy odłamek", + "CrystalStorm": "Kryształowa burza", + "CrystalVileShardHead": "Plugawy, kryształowy odłamek", + "CrystalVileShardShaft": "Plugawy, kryształowy odłamek", + "Cthulunado": "Cthulunado", + "CultistBossFireBall": "Kula ognia", + "CultistBossFireBallClone": "Ognista kula cienia", + "CultistBossIceMist": "Lodowa mgła", + "CultistBossLightningOrb": "Kula błyskawic", + "CultistBossLightningOrbArc": "Łuk błyskawic", + "CultistBossParticle": "Energia", + "CultistRitual": "Rytuał piorunów", + "CursedArrow": "Przeklęta strzała", + "CursedBullet": "Przeklęta kula", + "CursedDart": "Przeklęta strzałka", + "CursedDartFlame": "Przeklęty płomień", + "CursedFlameFriendly": "Przeklęty płomień", + "CursedFlameHostile": "Przeklęty płomień", + "CursedSapling": "Przeklęte drzewko", + "DangerousSpider": "Niebezpieczny pająk", + "DarkLance": "Mroczna lanca", + "Daybreak": "Świt", + "DD2FlameBurstTowerT1": "Ognista wieża", + "DD2FlameBurstTowerT1Shot": "Ognista wieża", + "DD2FlameBurstTowerT2": "Ognista wieża", + "DD2FlameBurstTowerT2Shot": "Ognista wieża", + "DD2FlameBurstTowerT3": "Ognista wieża", + "DD2FlameBurstTowerT3Shot": "Ognista wieża", + "DD2JavelinHostile": "Oszczep", + "DeadlySphere": "Zabójcza kula", + "DeathLaser": "Zabójczy laser", + "DeathSickle": "Zabójczy sierp", + "DemonScythe": "Demoniczna kosa", + "DemonSickle": "Demoniczny sierp", + "DesertDjinnCurse": "Przekleństwo ducha pustynnego", + "DiamondBolt": "Diamentowy pocisk", + "DirtBall": "Kula ziemi", + "DrillMountCrosshair": "Celownik świdra", + "DrManFlyFlask": "Fiolka", + "DryadsWardCircle": "Osłona driady", + "DualHookBlue": "Hak", + "DualHookRed": "Hak", + "Dynamite": "Dynamit", + "EatersBite": "Kąsek pożeracza", + "EbonsandBallFalling": "Kula piasku ebonowego", + "EbonsandBallGun": "Kula piasku ebonowego", + "EighthNote": "Nuta", + "Electrosphere": "Elektrosfera", + "ElectrosphereMissile": "Pocisk elektrosfery", + "EmeraldBolt": "Szmaragdowy pocisk", + "EnchantedBeam": "Zaczarowany promień", + "EnchantedBoomerang": "Zaczarowany bumerang", + "ExplosiveBullet": "Wybuchowa kula", + "ExplosiveBunny": "Wybuchowy królik", + "Explosives": "Materiały wybuchowe", + "EyeBeam": "Promień z oczu", + "EyeFire": "Ogień z oczu", + "EyeLaser": "Laser z oczu", + "EyeSpring": "Nerw oczny", + "FallingStar": "Spadająca gwiazda", + "FireArrow": "Strzała ognia", + "Fireball": "Kula ognia", + "FireworkFountainBlue": "Fontanna fajerwerków", + "FireworkFountainRainbow": "Fontanna fajerwerków", + "FireworkFountainRed": "Fontanna fajerwerków", + "FireworkFountainYellow": "Fontanna fajerwerków", + "FishHook": "Hak na ryby", + "Flairon": "Rybocep", + "FlaironBubble": "Bańka rybocepa", + "Flamarang": "Ogniorang", + "Flamelash": "Ognik", + "Flames": "Płomienie", + "FlamesTrap": "Płomienie", + "FlamethrowerTrap": "Miotacz płomieni", + "FlamingArrow": "Ognista strzała", + "FlamingJack": "Ognisty Jack", + "FlamingScythe": "Ognista kosa", + "FlamingWood": "Płonące drewno", + "Flare": "Flara", + "FlowerPetal": "Płatek kwiatka", + "FlowerPow": "Flower Pow", + "FlowerPowPetal": "Flower Pow", + "FlyingImp": "Latający diablik", + "FlyingKnife": "Latający nóż", + "FlyingPiggyBank": "Latająca świnka skarbonka", + "FormatC": "Jojo", + "FoulPotion": "Obrzydliwa mikstura", + "FrostArrow": "Mroźna strzała", + "FrostBeam": "Mroźny promień", + "FrostBlastFriendly": "Mroźny wybuch", + "FrostBlastHostile": "Mroźny wybuch", + "FrostBoltStaff": "Mroźny pocisk", + "FrostBoltSword": "Mroźny pocisk", + "FrostburnArrow": "Strzała mrozognia", + "FrostDaggerfish": "Mroźna ryba-piła", + "FrostHydra": "Mroźna hydra", + "FrostShard": "Mroźny odłamek", + "FrostWave": "Mroźna fala", + "FruitcakeChakram": "Czakram z ciasta owocowego", + "GemHookAmethyst": "Hak z klejnotów", + "GemHookDiamond": "Hak z klejnotów", + "GemHookEmerald": "Hak z klejnotów", + "GemHookRuby": "Hak z klejnotów", + "GemHookSapphire": "Hak z klejnotów", + "GemHookTopaz": "Hak z klejnotów", + "GeyserTrap": "Gejzer", + "GiantBee": "Pszczoła", + "GigaZapperSpear": "Grot gigamiotacza", + "Glowstick": "Świetlik", + "GoldCoin": "Złota moneta", + "GoldCoinsFalling": "Złote monety", + "GoldenBullet": "Złota kula", + "GoldenShowerFriendly": "Złoty deszcz", + "GoldenShowerHostile": "Złoty deszcz", + "GolemFist": "Pięść golema", + "Gradient": "Jojo", + "GraveMarker": "Nagrobek", + "Gravestone": "Nagrobek", + "GreekFire1": "Ogień grecki", + "GreekFire2": "Ogień grecki", + "GreekFire3": "Ogień grecki", + "GreenCounterweight": "Przeciwwaga", + "GreenFairy": "Różowy duszek", + "GreenLaser": "Zielony laser", + "Grenade": "Granat", + "GrenadeI": "Granat", + "GrenadeII": "Granat", + "GrenadeIII": "Granat", + "GrenadeIV": "Granat", + "Gungnir": "Gungnir", + "HallowSpray": "Bajkowy rozpylacz", + "HallowStar": "Bajkowa gwiazda", + "Hamdrax": "Hamdrax", + "HappyBomb": "Wesoła bomba", + "Harpoon": "Harpun", + "HarpyFeather": "Pióro harpii", + "Headstone": "Nagrobek", + "HeatRay": "Promień ciepła", + "HelFire": "Jojo", + "HellfireArrow": "Strzała piekielnego ognia", + "Hellwing": "Piekielne skrzydło", + "HolyArrow": "Strzała święcona", + "HolyWater": "Woda święcona", + "Hook": "Hak", + "Hornet": "Szerszeń", + "HornetStinger": "Żądło szerszenia", + "IceBlock": "Blok lodu", + "IceBolt": "Lodowy pocisk", + "IceBoomerang": "Lodowy bumerang", + "IceSickle": "Lodowy sierp", + "IceSpike": "Lodowy kolec", + "IcewaterSpit": "Lodowata plujka", + "IchorArrow": "Strzała ichoru", + "IchorBullet": "Kula ichoru", + "IchorDart": "Strzałka ichoru", + "IchorSplash": "Chlust ichoru", + "IlluminantHook": "Hak", + "ImpFireball": "Kula ognia diablika", + "InfernoFriendlyBlast": "Inferno", + "InfernoFriendlyBolt": "Inferno", + "InfernoHostileBlast": "Inferno", + "InfernoHostileBolt": "Inferno", + "InfluxWaver": "Przełamanie oporu", + "IvyWhip": "Bicz z bluszczu", + "JackOLantern": "Jack 'O Lantern", + "JavelinFriendly": "Oszczep", + "JavelinHostile": "Oszczep", + "JestersArrow": "Strzała błazna", + "JumperSpider": "Pająk-skoczek", + "JungleSpike": "Kolec z dżungli", + "JungleYoyo": "Jojo", + "Kraken": "Jojo", + "Landmine": "Mina lądowa", + "LaserDrill": "Świder laserowy", + "LaserMachinegun": "Laserowy karabin maszynowy", + "LaserMachinegunLaser": "Laser", + "LastPrism": "Ostatni pryzmat", + "LastPrismLaser": "Ostatni pryzmat", + "Leaf": "Liść", + "LightBeam": "Świetlisty promień", + "LightDisc": "Świetlisty dysk", + "LostSoulFriendly": "Zagubiona dusza", + "LostSoulHostile": "Zagubiona dusza", + "LovePotion": "Mikstura miłości", + "LunarFlare": "Flara księżycowa", + "LunarHookNebula": "Hak księżycowy", + "LunarHookSolar": "Hak księżycowy", + "LunarHookStardust": "Hak księżycowy", + "LunarHookVortex": "Hak księżycowy", + "MagicDagger": "Magiczny sztylet", + "MagicLantern": "Magiczna lampa", + "MagicMissile": "Magiczny pocisk", + "MagnetSphereBall": "Sfera magnetyczna", + "MagnetSphereBolt": "Sfera magnetyczna", + "MartianTurretBolt": "Elektryczny pocisk", + "MartianWalkerLaser": "Promień laserowy", + "MechanicalPiranha": "Mechaniczna pirania", + "MechanicWrench": "Klucz mechanika", + "MedusaHead": "Promień meduzy", + "MedusaHeadRay": "Promień meduzy", + "Meowmere": "Kotomiecz", + "Meteor1": "Meteor", + "Meteor2": "Meteor", + "Meteor3": "Meteor", + "MeteorShot": "Kula z meteoru", + "MinecartMechLaser": "Laser wózka górniczego", + "MiniMinotaur": "Miniminotaur", + "MiniRetinaLaser": "Minilaser oczny", + "MiniSharkron": "Minismokin", + "Missile": "Pocisk", + "MolotovCocktail": "Koktajl Mołotowa", + "MolotovFire": "Ogień Mołotowa", + "MolotovFire2": "Ogień Mołotowa", + "MolotovFire3": "Ogień Mołotowa", + "MoonLeech": "Księżycowa pijawka", + "MoonlordArrow": "Luminytowa strzała", + "MoonlordArrowTrail": "Luminytowa strzała", + "MoonlordBullet": "Luminytowa kula", + "MoonlordTurret": "Księżycowy portal", + "MoonlordTurretLaser": "Laser księżycowego portalu", + "MudBall": "Kula błota", + "Mushroom": "Grzyb", + "MushroomSpear": "Włócznia grzybowa", + "MushroomSpray": "Rozpylacz grzybowy", + "MythrilChainsaw": "Mithrilowa piła łańcuchowa", + "MythrilDrill": "Mithrilowy świder", + "MythrilHalberd": "Mithrilowa halabarda", + "Nail": "Gwóźdź", + "NailFriendly": "Gwóźdź", + "NanoBullet": "Nanokula", + "NebulaArcanum": "Arkanum mgławicy", + "NebulaArcanumExplosionShot": "Arkanum mgławicy", + "NebulaArcanumExplosionShotShard": "Arkanum mgławicy", + "NebulaArcanumSubshot": "Arkanum mgławicy", + "NebulaBlaze1": "Wybuch mgławicy", + "NebulaBlaze2": "Wybuch mgławicy plus", + "NebulaBolt": "Wiertak mgławicy", + "NebulaChainsaw": "Piła łańcuchowa mgławicy", + "NebulaDrill": "Świder mgławicy", + "NebulaEye": "Oko mgławicy", + "NebulaLaser": "Laser mgławicy", + "NebulaSphere": "Kula mgławicy", + "NettleBurstEnd": "Wybuch pokrzywy", + "NettleBurstLeft": "Wybuch pokrzywy", + "NettleBurstRight": "Wybuch pokrzywy", + "NightBeam": "Nocny promień", + "None": "", + "NorthPoleSnowflake": "Biegun północny", + "NorthPoleSpear": "Biegun północny", + "NorthPoleWeapon": "Biegun północny", + "NurseSyringeHeal": "Strzykawka", + "NurseSyringeHurt": "Strzykawka", + "Obelisk": "Nagrobek", + "ObsidianSwordfish": "Obsydianowy miecznik", + "OneEyedPirate": "Jednooki pirat", + "OrichalcumChainsaw": "Piła łańcuchowa z orichalcum", + "OrichalcumDrill": "Świder z orichalcum", + "OrichalcumHalberd": "Halabarda z olicharcum", + "OrnamentFriendly": "Ozdoba", + "OrnamentHostile": "Ozdoba", + "OrnamentHostileShrapnel": "Ozdoba", + "PainterPaintball": "Paintballowa kulka", + "PaladinsHammerFriendly": "Młot paladyna", + "PaladinsHammerHostile": "Młot paladyna", + "PalladiumChainsaw": "Piła łańcuchowa z paladium", + "PalladiumDrill": "Świder z paladium", + "PalladiumPike": "Kolec z paladium", + "Parrot": "Papuga", + "PartyBullet": "Kula imprezowa", + "PartyGirlGrenade": "Granat konfetti", + "PearlSandBallFalling": "Kula piasku perłowego", + "PearlSandBallGun": "Kula piasku perłowego", + "Penguin": "Pingwin", + "PetLizard": "Jaszczurka-chowaniec", + "Phantasm": "Fantazmat", + "PhantasmalBolt": "Pocisk fantazmatyczny", + "PhantasmalDeathray": "Fantazmatyczny promień śmierci", + "PhantasmalEye": "Fantazmatyczne oko", + "PhantasmalSphere": "Fantazmatyczna sfera", + "PhantasmArrow": "Fantazmat", + "PhasicWarpDisc": "", + "PhasicWarpEjector": "", + "PineNeedleFriendly": "Igła sosnowa", + "PineNeedleHostile": "Igła sosnowa", + "PinkFairy": "Różowy duszek", + "PinkLaser": "Różowy laser", + "PirateCaptain": "Kapitan piratów", + "PlatinumCoin": "Platynowa moneta", + "PlatinumCoinsFalling": "Platynowe monety", + "PoisonDart": "Zatruta strzałka", + "PoisonDartBlowgun": "Zatruta strzałka", + "PoisonDartTrap": "Zatruta strzałka", + "PoisonedKnife": "Zatruty nóż", + "PoisonFang": "Zatruty kieł", + "PoisonSeedPlantera": "Zatrute nasienie", + "PortalGun": "Pistolet portalu", + "PortalGunBolt": "Pocisk portalu", + "PortalGunGate": "Brama portalu", + "PossessedHatchet": "Opętany topór", + "Present": "Prezent", + "ProximityMineI": "Mina zbliżeniowa", + "ProximityMineII": "Mina zbliżeniowa", + "ProximityMineIII": "Mina zbliżeniowa", + "ProximityMineIV": "Mina zbliżeniowa", + "PulseBolt": "Pulsujący pocisk", + "Puppy": "Szczeniak", + "PureSpray": "Czysty rozpylacz", + "PurificationPowder": "Proszek oczyszczający", + "PurpleCounterweight": "Przeciwwaga", + "PurpleLaser": "Fioletowy laser", + "Pygmy": "Pigmej", + "Pygmy2": "Pigmej", + "Pygmy3": "Pigmej", + "Pygmy4": "Pigmej", + "PygmySpear": "Pigmej", + "QuarterNote": "Nuta", + "RainbowBack": "Tęcza", + "RainbowCrystal": "Kryształ tęczowy", + "RainbowCrystalExplosion": "Tęczowy wybuch", + "RainbowFront": "Tęcza", + "RainbowRodBullet": "Tęcza", + "RainCloudMoving": "Chmura deszczowa", + "RainCloudRaining": "Chmura deszczowa", + "RainFriendly": "Deszcz", + "RainNimbus": "Deszcz", + "Rally": "Jojo", + "Raven": "Kruk", + "RayGunnerLaser": "Promień laserowy", + "RedCounterweight": "Przeciwwaga", + "RedsYoyo": "Jojo", + "Retanimini": "Retanimini", + "RichGravestone1": "Nagrobek", + "RichGravestone2": "Nagrobek", + "RichGravestone3": "Nagrobek", + "RichGravestone4": "Nagrobek", + "RichGravestone5": "Nagrobek", + "RocketFireworkBlue": "Rakieta", + "RocketFireworkGreen": "Rakieta", + "RocketFireworkRed": "Rakieta", + "RocketFireworksBoxBlue": "Rakieta", + "RocketFireworksBoxGreen": "Rakieta", + "RocketFireworksBoxRed": "Rakieta", + "RocketFireworksBoxYellow": "Rakieta", + "RocketFireworkYellow": "Rakieta", + "RocketI": "Rakieta", + "RocketII": "Rakieta", + "RocketIII": "Rakieta", + "RocketIV": "Rakieta", + "RocketSkeleton": "Rakieta", + "RocketSnowmanI": "Rakieta", + "RocketSnowmanII": "Rakieta", + "RocketSnowmanIII": "Rakieta", + "RocketSnowmanIV": "Rakieta", + "RopeCoil": "Zwinięta lina", + "RottenEgg": "Zgniłe jajo", + "RubyBolt": "Rubinowy pocisk", + "RuneBlast": "Wybuch runiczny", + "SalamanderSpit": "Zatruta plujka", + "SandBallFalling": "Kula piaskowa", + "SandBallGun": "Kula piaskowa", + "SandnadoFriendly": "Pradawna burza", + "SandnadoHostile": "Pradawna burza", + "SandnadoHostileMark": "Pradawna burza", + "SantaBombs": "Ozdoba świąteczna", + "Sapling": "Drzewko", + "SapphireBolt": "Szafirowy pocisk", + "SaucerDeathray": "Marsjański promień śmierci", + "SaucerLaser": "Laser spodka", + "SaucerMissile": "Rakieta marsjańska", + "SaucerScrap": "Część spodka", + "SawtoothShark": "Rekin piłokształtny", + "ScutlixLaser": "Laser", + "ScutlixLaserCrosshair": "Celownik scutlixa", + "ScutlixLaserFriendly": "Laser scutlixa", + "Seed": "Nasienie", + "SeedlerNut": "Siewca", + "SeedlerThorn": "Siewca", + "SeedPlantera": "Nasienie", + "ShadowBeamFriendly": "Promień cienia", + "ShadowBeamHostile": "Promień cienia", + "ShadowFlame": "Cienisty płomień", + "ShadowFlameArrow": "Strzała cienistego płomienia", + "ShadowFlameKnife": "Nóż cienistego płomienia", + "Shadowflames": "Cieniste płomienie", + "ShadowOrb": "Kula cienia", + "Sharknado": "Rekinado", + "SharknadoBolt": "Pocisk rekinada", + "Shuriken": "Shuriken", + "SilkRopeCoil": "Zwinięta lina", + "SiltBall": "Kula mułu", + "SilverCoin": "Srebrna moneta", + "SilverCoinsFalling": "Srebrne monety", + "SkeletonBone": "Kość", + "SkeletronHand": "Ręka szkieletrona", + "Skull": "Czaszka", + "SkyFracture": "Rozdarcie nieba", + "SlimeGun": "Pistolet szlamowy", + "SlimeHook": "Hak szlamowy", + "SlushBall": "Kula brei", + "SmokeBomb": "Bomba dymna", + "SniperBullet": "Kula snajperska", + "SnowBallFriendly": "Śnieżka", + "SnowBallHostile": "Śnieżka", + "SolarCounter": "Blask słoneczny", + "SolarFlareChainsaw": "Piła łańcuchowa słonecznej flary", + "SolarFlareDrill": "Świder słonecznej flary", + "SolarFlareRay": "Flara słoneczna", + "SolarWhipSword": "Wybuch słoneczny", + "SolarWhipSwordExplosion": "Wybuch słoneczny", + "SoulDrain": "Wyssanie duszy", + "SoulscourgePirate": "Pirat-duszołap", + "Spark": "Iskra", + "Spazmamini": "Spazmamini", + "Spear": "Włócznia", + "SpearTrap": "Włócznia", + "SpectreWrath": "Gniew upiora", + "SpelunkerGlowstick": "Świetlik grotołaza", + "Spider": "Pająk", + "SpiderEgg": "Pajęcze jajo", + "SpiderHiver": "Pajęcza wieżyczka", + "Spike": "Kolec", + "SpikedSlimeSpike": "Kolec szlamowy", + "SpikyBall": "Kolczatka", + "SpikyBallTrap": "Kolczatka", + "SpiritFlame": "Duchowy płomień", + "SpiritHeal": "Duchowe leczenie", + "SporeCloud": "Chmura zarodników", + "SporeGas": "Zarodnik", + "SporeGas2": "Zarodnik", + "SporeGas3": "Zarodnik", + "SporeTrap": "Zarodnik", + "SporeTrap2": "Zarodnik", + "Squashling": "Kabaczek", + "Stake": "Kołek", + "StarAnise": "Badian", + "StardustCellMinion": "Ogniwo pyłu gwiezdnego", + "StardustCellMinionShot": "Ogniwo pyłu gwiezdnego", + "StardustChainsaw": "Piła łańcuchowa pyłu gwiezdnego", + "StardustDragon1": "Smok pyłu gwiezdnego", + "StardustDragon2": "Smok pyłu gwiezdnego", + "StardustDragon3": "Smok pyłu gwiezdnego", + "StardustDragon4": "Smok pyłu gwiezdnego", + "StardustDrill": "Świder pyłu gwiezdnego", + "StardustGuardian": "Strażnik pyłu gwiezdnego", + "StardustGuardianExplosion": "Gwiezdny wybuch", + "StardustJellyfishSmall": "Najeźdźca pływów", + "StardustSoldierLaser": "Laser pyłu gwiezdnego", + "StardustTowerMark": "Gwiezdny znak", + "Starfury": "Gwiezdna furia", + "StarWrath": "Gwiezdny gniew", + "StaticHook": "Hak statyczny", + "StickyBomb": "Lepka bomba", + "StickyDynamite": "Lepki dynamit", + "StickyGlowstick": "Lepki świetlik", + "StickyGrenade": "Lepki granat", + "Stinger": "Żądło", + "Stynger": "Stynger", + "StyngerShrapnel": "Stynger", + "Sunfury": "Słoneczna furia", + "SuspiciousTentacle": "Podejrzanie wyglądająca macka", + "SwordBeam": "Promień z miecza", + "Swordfish": "Miecznik", + "Tempest": "Burza", + "TendonHook": "Hak", + "TerraBeam": "Terrapromień", + "Terrarian": "Terrarian", + "TerrarianBeam": "Terrarian", + "TheDaoofPow": "Dao mocy", + "TheEyeOfCthulhu": "Jojo", + "TheMeatball": "Klopsik", + "TheRottedFork": "Zbutwiałe widły", + "ThornBall": "Kolczula", + "ThornChakram": "Kolczy czakram", + "ThornHook": "Hak", + "ThrowingKnife": "Nóż do rzucania", + "TiedEighthNote": "Nuta", + "TikiSpirit": "Duch tiki", + "TinyEater": "Mały pożeracz", + "TitaniumChainsaw": "Tytanowa piła łańcuchowa", + "TitaniumDrill": "Tytanowy świder", + "TitaniumTrident": "Tytanowy trójząb", + "Tombstone": "Nagrobek", + "TopazBolt": "Topazowy pocisk", + "TowerDamageBolt": "Uwolniona energia", + "ToxicBubble": "Toksyczna bańka", + "ToxicCloud": "Toksyczna chmura", + "ToxicCloud2": "Toksyczna chmura", + "ToxicCloud3": "Toksyczna chmura", + "ToxicFlask": "Toksyczna butelka", + "TrackHook": "Hak do wózka", + "Trident": "Trójząb", + "Truffle": "Trufla", + "TruffleSpore": "Zarodnik trufli", + "Turtle": "Żółw", + "Twinkle": "Błysk", + "Typhoon": "Tajfun", + "UFOLaser": "Promień UFO", + "UFOMinion": "UFO", + "UnholyArrow": "Nieświęta strzała", + "UnholyTridentFriendly": "Nieświęty trójząb", + "UnholyTridentHostile": "Nieświęty trójząb", + "UnholyWater": "Woda nieświęta", + "ValkyrieYoyo": "Jojo", + "Valor": "Jojo", + "VampireHeal": "Wampirze życie", + "VampireKnife": "Wampirzy nóż", + "VenomArrow": "Jadowita strzała", + "VenomBullet": "Jadowita kula", + "VenomFang": "Jadowity kieł", + "VenomSpider": "Jadowity pająk", + "ViciousPowder": "Niecny proszek", + "VilePowder": "Plugawy proszek", + "VilethornBase": "Plugawy cierń", + "VilethornTip": "Plugawy cierń", + "VineRopeCoil": "Zwój pnącz", + "VortexAcid": "Maź obcego", + "VortexBeater": "Pogromca wirów", + "VortexBeaterRocket": "Rakieta wirów", + "VortexChainsaw": "Piła łańcuchowa wirów", + "VortexDrill": "Świder wirów", + "VortexLaser": "Laser wirów", + "VortexLightning": "Błyskawica wirów", + "VortexVortexLightning": "Wir", + "VortexVortexPortal": "Wir", + "Wasp": "Osa", + "WaterBolt": "Pocisk wodny", + "WaterGun": "Pistolet na wodę", + "WaterStream": "Strumień wody", + "Web": "Pajęczyna", + "WebRopeCoil": "Zwinięta lina", + "WebSpit": "Pajęcza plujka", + "WireKite": "Kabel tu, kabel tam", + "Wisp": "Błędny ognik", + "WoodenArrowFriendly": "Drewniana strzała", + "WoodenArrowHostile": "Drewniana strzała", + "WoodenBoomerang": "Drewniany bumerang", + "WoodHook": "Drewniany hak", + "WoodYoyo": "Jojo", + "WormHook": "Hak", + "Xenopopper": "Bańkomiot", + "Yelets": "Jojo", + "YellowCounterweight": "Przeciwwaga", + "ZephyrFish": "Ryba zefiru", + "Ale": "Piwo", + "ApprenticeStaffT3Shot": "Gniew Betsy", + "BookStaffShot": "Księga nieskończonej mądrości", + "DD2ApprenticeStorm": "Trąba powietrzna nieskończonej mądrości", + "DD2BallistraProj": "Balista", + "DD2BallistraTowerT1": "Balista", + "DD2BallistraTowerT2": "Balista", + "DD2BallistraTowerT3": "Balista", + "DD2BetsyArrow": "Powietrzna zguba", + "DD2BetsyFireball": "Kula ognia Betsy", + "DD2BetsyFlameBreath": "Oddech Betsy", + "DD2DarkMageBolt": "Mroczna energia", + "DD2DarkMageHeal": "Mroczna pieczęć", + "DD2DarkMageRaise": "Mroczna pieczęć", + "DD2DrakinShot": "Drakin", + "DD2ElderWins": "Ponury koniec", + "DD2ExplosiveTrapT1": "Wybuchowa pułapka", + "DD2ExplosiveTrapT1Explosion": "Wybuchowa pułapka", + "DD2ExplosiveTrapT2": "Wybuchowa pułapka", + "DD2ExplosiveTrapT2Explosion": "Wybuchowa pułapka", + "DD2ExplosiveTrapT3": "Wybuchowa pułapka", + "DD2ExplosiveTrapT3Explosion": "Wybuchowa pułapka", + "DD2GoblinBomb": "Goblińska bomba", + "DD2LightningAuraT1": "Elektryczna aura", + "DD2LightningAuraT2": "Elektryczna aura", + "DD2LightningAuraT3": "Elektryczna aura", + "DD2LightningBugZap": "Niszczycielski pocisk", + "DD2OgreSmash": "Tupnięcie ogra", + "DD2OgreSpit": "Splunięcie ogra", + "DD2OgreStomp": "Tupnięcie ogra", + "DD2PetDragon": "Hoardagron", + "DD2PetGato": "Gato-śmiglarz", + "DD2PetGhost": "Nikły płomyk", + "DD2PhoenixBow": "Widmowy feniks", + "DD2PhoenixBowShot": "Widmowy feniks", + "DD2SquireSonicBoom": "Solidne cięcie", + "DD2Win": "Zwycięstwo!", + "MonkStaffT1": "Śpiąca ośmiornica", + "MonkStaffT1Explosion": "Uderzenie kijem", + "MonkStaffT2": "Potworna glewia", + "MonkStaffT2Ghast": "Upiór", + "MonkStaffT3": "Furia niebiańskiego smoka", + "MonkStaffT3_Alt": "Furia niebiańskiego smoka", + "MonkStaffT3_AltShot": "Furia niebiańskiego smoka", + "DD2JavelinHostileT3": "{$ProjectileName.DD2JavelinHostile}", + "Celeb2Rocket": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketExplosive": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketLarge": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketLargeExplosive": "{$ProjectileName.Celeb2Weapon}" + } +} \ No newline at end of file diff --git a/Localization/Content/pl-PL/Town.json b/Localization/Content/pl-PL/Town.json new file mode 100644 index 0000000..52dc818 --- /dev/null +++ b/Localization/Content/pl-PL/Town.json @@ -0,0 +1,228 @@ +{ + "DryadSpecialText": { + "WorldStatusAll": "{0}: {1}% bajkowa, {2}% zepsucia i {3}% szkarlatu.", + "WorldStatusHallowCorrupt": "{0}: {1}% bajkowa i {2}% zepsucia.", + "WorldDescriptionGrim": "Zaiste, ponuro tutaj...", + "WorldDescriptionWork": "Masz duzo pracy.", + "WorldDescriptionClose": "Jestes tak blisko!", + "WorldStatusHallowCrimson": "{0}: {1}% bajkowa i {2}% szkarlatu.", + "WorldStatusCorruptCrimson": "{0}: {1}% zepsucia i {2}% szkarlatu.", + "WorldStatusCorrupt": "{0}: {1}% zepsucia.", + "WorldStatusCrimson": "{0}: {1}% szkarlatu.", + "WorldStatusHallow": "{0}: {1}% bajkowa.", + "WorldStatusPure": "{0}: calkowita czystosc. Wspaniala robota!", + "WorldDescriptionBalanced": "Swiat zachowuje równowage!", + "WorldDescriptionFairyTale": "Zyjemy jak w bajce.", + "Party": "Pomyślałam, że urządzę przyjęcie, żeby świętować nasze dotychczasowe zwycięstwa i te, które dopiero nadejdą.", + "AfterDD2Tier1": "Gdy byłam w Etherii, czułam się taka oderwana od świata {WorldName}. Dobrze być już z powrotem.", + "AfterDD2Tier2": "Zepsucie chciało mną zawładnąć, kiedy byłam w Etherii, ale wykorzystałam jego moc przeciwko Armii Starszego!" + }, + "DyeTraderSpecialText": { + "HasPlant_0": "Świetnie! Przynosisz ze sobą wyjątkową mieszankę najpiękniejszych kolorów i zapachów tego świata. W zamian za to dostaniesz ten niezwykły flakonik barwnika.", + "HasPlant_1": "Przynosisz piękny, rzadki kwiat... tak? Przyjmij ten flakon barwnika za swój trud!", + "HasPlant_2": "Jedwabiście! Ten delikatny okaz pozwoli mi na stworzenie najwspanialszych barwników na całym świecie {WorldName}! Ten możesz wziąć już teraz!", + "NoPlant_0": "O, nie, nie. Nic z tego. Pieniądze nie grają tu roli, wróć do mnie z rzadką rośliną!", + "NoPlant_1": "{DyeTrader} nie da się tobie wykiwać, nawet o tym nie myśl! Te wyjątkowe flakony oddam ci jedynie za najrzadsze kwiaty!", + "NoPlant_2": "Te flakony? Przykro mi, nie da się ich kupić. Ale wymienię je za najrzadsze okazy flory!", + "Party": "Naprawdę kocham przyjęcia, tyle kolorów i radosnych twarzy." + }, + "GuideSpecialText": { + "Party": "Nie było wcześniej okazji poimprezować? Popytaj innych. Czasami mają wyjątkowe prośby związane z przyjęciami." + }, + "MerchantSpecialText": { + "Party": "Wiesz, jak najlepiej zacząć imprezowanie? Kupując innym prezenty, zwłaszcza mnie." + }, + "GoblinTinkererSpecialText": { + "Party": "Przyjęcia u goblinów są bardzo podobne do tych u ludzi. I tu, i tu są gry, na przykład „Zwal winę na ludzia”, eee... Ja w nią nie gram." + }, + "WitchDoctorSpecialText": { + "Party": "Chciałem zobaczyć, jak twoja rasa się bawi, nie jestem zawiedziony.", + "AfterDD2Tier1": "Wyczuwam, że ci etheriańscy, mroczni magowie to bratnie dusze. Szkoda, że są naszymi przeciwnikami, chciałbym się od nich czegoś nauczyć." + }, + "ClothierSpecialText": { + "Party": "Mama zawsze powtarzała, że trzeba zapomnieć o przeszłości, zanim będzie się mogło bawić." + }, + "TravellingMerchantSpecialText": { + "Party": "Mówi się, że po imprezach zostaje bogactwo wspomnień. Kup coś i daj mi trochę tego bogactwa!" + }, + "MechanicSpecialText": { + "Party": "Myślisz, że komuś będzie przeszkadzać, jak powsadzam do tortu żarówki zamiast świeczek?" + }, + "BartenderSpecialText": { + "AfterDD2Tier1": "Dobra robota, udało ci się odeprzeć Armię Starszego! Ale pewnie jeszcze tu wrócą, nie postarali się tym razem.", + "AfterDD2Tier2": "Armia Starszego jest coraz silniejsza, ale tobie ciągle się udaje ich powstrzymać! Coś mi jednak mówi, że się nie poddadzą.", + "AfterDD2Tier3": "Naprawdę udało ci się powstrzymać całą Armię Starszego? Może kiedyś wpadniesz do Ehterii?", + "BeforeDD2Tier1": "Naprawdę powinniśmy coś zrobić z Armią Starszego. Zapytaj mnie o kryształ eternia, jeśli chcesz się czegoś dowiedzieć.", + "FirstHelp": "Na początek weź kilka medali obrońcy, ja stawiam! Możesz ode mnie kupić struktury obronne, ale tylko za medale obrońcy!", + "FirstMeeting": "Co? Jak ci się udało tu dostać? Ostatnią rzeczą, którą pamiętam, był portal otwierający się przede mną..." + }, + "PartyGirlSpecialText": { + "Party_1": "Hm? Nie, dziś nie ma nic ciekawego... żartowałam! Czas się zabawić, a potem poprawić!", + "Party_2": "W końcu nadszedł mój czas!", + "AfterDD2Tier1": "Udało ci się spotkać ogra? Chcę się na jakimś przejechać!" + }, + "PirateSpecialText": { + "Party": "Po tym całym torcie możesz na mnie wołać Białobrody." + }, + "TruffleSpecialText": { + "Party": "Zaprosiłbym wszystkich do siebie, ale mam zagrzybione ściany." + }, + "NurseSpecialText": { + "Party": "Nie, nie powiem, ile świeczek mam na torcie." + }, + "WizardSpecialText": { + "Party": "Urządzam najlepsze przyjęcia, to jasne jak słońce.", + "AfterDD2Tier1": "Wiesz, chyba widziałem już taki portal, ale złoty." + }, + "CyborgSpecialText": { + "Party": "Dokręcimy dziś śrubę!" + }, + "DemolitionistSpecialText": { + "Party": "Uważaj dzisiaj. Krasnoludy mają dosyć wybuchowe przyjęcia.", + "AfterDD2Start": "Nie rozumiem, czemu po prostu nie wysadzimy tych portali." + }, + "ArmsDealerSpecialText": { + "Party": "Są dwa sposoby na to, żeby ludzie wyszli z tych swoich twardych skorup: przyjęcia albo kule." + }, + "StylistSpecialText": { + "Party": "Może i zrobiłam sobie fryzurę specjalnie na tę okoliczność, ale tak naprawdę chcę poprzebijać balony nożyczkami." + }, + "PainterSpecialText": { + "Party": "Chciałem zorganizować mecz paintballu, ale inni chcieli jedzenia i dekoracji." + }, + "AnglerSpecialText": { + "Party": "Co? Myślisz, że lubię przyjęcia, bo jestem dzieciakiem? I dobrze myślisz, bawmy się!" + }, + "AnglerQuestText": { + "NoQuest_1": "W tej chwili nie mam dla ciebie zadań.", + "NoQuest_2": "Wystarczy mi już twojego towarzystwa, ruszaj.", + "NoQuest_3": "Możesz odejść, wielki {Angler} cię odprawia!", + "NoQuest_4": "Jedna ryba dziennie, odejdź, proszę!", + "NoQuest_5": "Mam jeszcze tę ostatnią rybę od ciebie. Nie potrzebuję kolejnej.", + "TurnIn_1": "O! Dzięki za rybę, a teraz zjeżdżaj!", + "TurnIn_2": "Świetny połów! Wszystko idzie zgodnie z planem! He, he, he!", + "TurnIn_3": "Świetnie się nadajesz do tej roboty! Zmykaj już!", + "TurnIn_4": "Ha, ha, ha, ha! Udało ci się! Ale nic ci się nie stało, nuda!", + "TurnIn_5": "Łał!? Udało ci się wykonać to zadanie, i to w jednym kawałku! Nieźle, teraz dawaj i zjeżdżaj!", + "Quest_Batfish": "Na, na, na, na, na, na, na Bat-ryba! To znaczy, że masz iść, złapać rybę i mi ją przynieść!\n\n(można złapać w Podziemiach i Jaskiniach)", + "Quest_BumblebeeTuna": "W podziemnych dżunglach świata {WorldName} można znaleźć cuda, cudeńka! Na przykład widziałem rybę wyglądającą jak ogromny trzmiel! Mam uczulenie na pszczoły, więc musisz ją dla mnie złapać! Założę się, że smakuje jak kanapka z tuńczykiem i miodem!\n\n(można złapać w Miodzie)", + "Quest_Catfish": "W sumie to znalazłem fajną rybę! Taką co potrafi świetnie liczyć i sumować. Nie wiem i nie chcę wiedzieć, jak to możliwe. Chcę tylko dostać swoją rybę, biegiem!\n\n(można złapać w Dżungli na Powierzchni)", + "Quest_Cloudfish": "Krążą plotki o wyspach unoszących się wysoko na niebie, na których można znaleźć niesamowite skarby! Ale kogo to obchodzi? Znacznie lepsze jest to, że czasami w chmurach tworzą się jeziora, a w nich pływają ryby zrobione z chmur! Muszę takiej spróbować, więc lepiej pędź i ją dla mnie złap!\n\n(można złapać w Gwiezdnych Jeziorach)", + "Quest_Cursedfish": "W najgłębszych wodach zepsucia pływa przeklęta ryba! Stworzono ją za pomocą przeklętych płomieni upadłych zmór czających się tam na dnie. Mówią, że nawet woda nie ugasi tego wiecznego ognia. Mam kilka genialnych pomysłów, co zrobić z taką rybę! Przyniesiesz mi ją, czy tchórzysz!?\n\n(można złapać w Zepsuciu)", + "Quest_DynamiteFish": "Dewastator pieklił się, bo zgubił laskę dynamitu w leśnym jeziorze. Ma ich tyle, że co za różnica? Okazało się, że nie do końca zgubił – ten dynamit nagle dostał płetw i odpłynął! Nie wiem, skąd bierze materiały do swoich towarów, ale ten musi być opętany! Złów go dla mnie, zawsze marzyłem o takiej bombowej rybie! Nie pytaj czemu...\n\n(można złapać na Powierzchni)", + "Quest_EaterofPlankton": "Na pewno nie masz tyle odwagi, żeby odszukać pożeracza planktonu. Zepsuta ryba stworzona z oderwanej cząstki samego Pożeracza Światów! Przynieś mi ją i pokaż, że się do czegoś nadajesz!\n\n(można złapać w Zepsuciu)", + "Quest_FallenStarfish": "Uwielbiam zbierać te jasnożółte gwiazdy spadające z nieba! Jeszcze bardziej uwielbiam, jak spadają komuś na głowę. Ale nie ma nic lepszego niż spadająca gwiazda, która w leśnym jeziorze zmienia się w rybę! To już jest całkowity odjazd, musisz mi taką przynieść!\n\n(można złapać w Gwiezdnych Jeziorach)", + "Quest_TheFishofCthulu": "Wygląda na to, że demoniczne oczy potrafią też żyć w wodzie. Nie latają, pływają! Aż nie mogę się doczekać, żeby je komuś wrzucić do kąpieli! Znajdziesz tam, gdzie demoniczne oczy. Masz mi przynieść jedną sztukę!\n\n(można złapać w Gwiezdnych Jeziorach i na Powierzchni)", + "Quest_Fishotron": "Nie wiem, co gorsze – ościotrup czy ościotrup z łapami. Ten rybotron z jaskiń naprawdę mnie przeraża! Myślę, że opętały go te same złe duchy, które opętały tego starca przy lochu! Założę się, że nie złapiesz tej ryby!\n\n(można złapać w Jaskiniach)", + "Quest_Harpyfish": "Spałem sobie na wzgórzu przy jeziorze, kiedy ta ryba we mnie wleciała. Latała! Miała niewieścią twarz i pióra! Chyba krzyknąłem głośniej niż ona! Hej, może się przejdziesz i dasz jej nauczkę za to, że mnie wystraszyła?\n\n(można złapać w Gwiezdnych Jeziorach i na Powierzchni)", + "Quest_Hungerfish": "W piekle pływa bez sensu w kółko żarłok, który przeobraził się ze Ściany Mięcha w małe, rybopodobne stworzonko. Jest obrzydliwy, ohydny i muszę go mieć!\n\n(można złapać w Jaskiniach)", + "Quest_Ichorfish": "Wiesz, że w głębinach szkarłatu niektóre ze stworzeń produkują to żółte paskudztwo? Słyszałem zwariowaną historyjkę, że się rozlało i przeobraziło w rybę, która pływa i w ogóle! Przynieś mi ją, a wrzucę ją komuś do toalety!\n\n(można złapać w Szkarłacie)", + "Quest_Jewelfish": "Będę obrzydliwie bogaty! Głęboko w jaskiniach żyje ryba stworzona z klejnotów! Nie pytaj, jakim cudem, nie wiem. Wiem tylko tyle, że ta ryba jest kapitalna i masz dla mnie ją złapać!\n\n(można złapać w Podziemiach i Jaskiniach)", + "Quest_MirageFish": "W podziemiach Bajkowa żyją ciekawe stworzonka! Jarzą się tak na fioletowo i przez to wpadły mi w oko! Musisz dla mnie złapać taką rybę, bo jest po prostu obłędna!\n\n(można złapać w Podziemnym Bajkowie)", + "Quest_MutantFlinxfin": "Co jest białe i jasnobrązowe, i puszyste, i żyje w zamarzniętym, podziemnym jeziorze? Zmutowany flinx! Nie żartuję, naprawdę istnieją zmutowane flinxy przystosowane do życia w wodzie! Chcę, żeby się przystosowały do życia w moim akwarium, więc dopilnuj, żeby tak się stało!\n\n(można złapać w Podziemnej Tundrze)", + "Quest_Pengfish": "To wieloryb! To delfin! Nie, to ryba-pingwin! A to ty! Masz mi taką przynieść! Wiesz, że żyją tylko w zimnych wodach, prawda?\n\n(można złapać w Tundrze)", + "Quest_Pixiefish": "Wiesz, że istnieją takie bardzo rzadko spotykane wróżki, które mają tyle skrzydełek, że przez to nie potrafią latać? Pływają z rybami w jeziorach otoczonych tą niebieską trawą. Potrzeba mi lampy do akwarium, więc musisz złapać tę wróżkę!\n\n(można złapać w Bajkowie)", + "Quest_Spiderfish": "Widziałem rybę z ośmioma nogami! Nie! Nic z tego! Masz ją dla mnie złapać i ma być martwa, jak mi już ją dasz! Ostatni raz byłem łowić tak głęboko w jaskini!\n\n(można złapać w Podziemiach i Jaskiniach)", + "Quest_UnicornFish": "Jednorożce i tęcze są niesamowite! Znajdziesz je wszędzie, nawet w wodzie. Naprawdę, widziałem rybę-jednorożca w bajkowym jeziorze! Masz ją złowić i mi przynieść!\n\n(można złapać w Bajkowie)", + "Quest_GuideVoodooFish": "Te piekielne demony naprawdę lubią lalki voodoo, ale coś mi się wydaje, że jedna z tych lalek została potraktowana zbyt dużą ilością magii! Zamieniła się w rybę i teraz wyczynia cuda. Założę się, że nie dasz rady jej złapać! Uważaj na gorącą lawę, bo spali cię na popiół, a ja nie dostanę mojej rybki!\n\n(można złapać w Jaskiniach)", + "Quest_Wyverntail": "Wiem coś, czego ty nie wiesz! Dobra, powiem ci, między gwiazdami lata przerażający stwór! Nie zmyślam! Mówię o wywernie! Już o niej wiesz, tak? Ale nie wiesz, że małe wywerny to kijanki! Więc można powiedzieć, że wywerny to... żaby! Masz dla mnie jedną złapać!\n\n(można złapać w Gwiezdnych Jeziorach)", + "Quest_ZombieFish": "Nie uwierzysz! W nocy złapałem w lesie rybę, która już była martwa! A potem próbowała mnie pogryźć! Wyrzuciłem ją i uciekłem! Teraz chcę wsadzić ją komuś do komody i zobaczyć, co się stanie, więc masz ją dla mnie złapać, dobra?\n\n(można złapać na Powierzchni)", + "Quest_AmanitaFungifin": "Odkryłem to niesamowite miejsce pokryte ogromnymi, lśniącymi grzybami! Wszystko było niebieskie! Zbierałem grzyby koło lśniącego, niebieskiego jeziora, kiedy jeden z nich kłapnął na mnie paszczą i odpłynął! Chcę mu odpłacić pięknym za nadobne i go smacznie schrupać! A to znaczy, że musisz mi go przynieść!\n\n(można złapać na Polach Lśniących Grzybów)", + "Quest_Angelfish": "Wiesz, że wysoko na niebie dryfują sobie magiczne wyspy? Pewnie nie! Mówią, że w niebiosach mieszkają anioły, a ja myślę, że te anioły mają płetwy i skrzela, i całkiem nieźle pływają! Musisz jednego dla mnie złapać!\n\n(można złapać w Gwiezdnych Jeziorach)", + "Quest_BloodyManowar": "Auć! Nie zbliżaj się! Poparzyła mnie krwawa wojennica! To najpaskudniejsza meduza na całym świecie: {WorldName}! Idź do tego zgniłego szkarłatu i ją złap, jeśli się odważysz! \n\n(można złapać w Szkarłacie)", + "Quest_Bonefish": "Zazwyczaj ości dryfujące na wodzie w podziemiach mnie nie obchodzą, ale te ości pływały! Myślisz, że tylko ludzkie szkielety potrafią się ruszać {WorldName}? Zdobądź dla mnie te ości, żebym mógł je wsadzić komuś do łóżka!\n\n(można złapać w Podziemiach i Jaskiniach)", + "Quest_Bunnyfish": "Wędkowałem w lesie. I zgadnij co? Królik do mnie przykicał! Potem kolejny i kolejny... i nagle pełno ich było! Jeden nawet przypłynął do mnie od strony wody, ale nie miał łapek! Spadłem z wrażenia z krzesełka i wszystkie króliki czmychnęły! Chcę dostać tę króliczą rybę, więc lepiej ją dla mnie złap! No dalej!\n\n(można złapać na Powierzchni)", + "Quest_CapnTunabeard": "Ahoj, szczurze lądowy! Niech mnie kule biją! Miarkuj się, psubracie! Pewien kapitan piratów miał rybę – kapiratkę – która w czasie sztormu wypadła za burtę! Ryba ta ma hak zamiast ogona i przepaskę na oko, i w ogóle! Musisz przynieść mi tę rybę, żebym mógł być taki fajny, jak pirat! Rybę znajdziesz oczywiście gdzieś w oceanie! Się wie!\n\n(można złapać w Oceanie)", + "Quest_Clownfish": "Widziałem tę jasnopomarańczową, kolorową rybę w oceanie. Rozglądała się rozpaczliwie, jakby szukała zaginionego krewniaka! Złap ją dla mnie, a kolejna z nich się zjawi, rozpaczliwie szukając tej pierwszej!\n\n(można złapać w Oceanie)", + "Quest_DemonicHellfish": "Słyszałem, że król wszystkich demonów jest tak naprawdę rybą! Tylko pomyśl o potędze, którą zdobędę, jak go dla mnie złapiesz!\n\n(można złapać w Jaskiniach)", + "Quest_Derpfish": "Te derplingi z dżungli są najbardziej przerażającymi stworzeniami, jakie kiedykolwiek widziałem! Dobrze, że niektóre nie mają nóg! Żyją w wodzie i są o wiele mniej przerażające! Złap mi jedną sztukę, żebym mógł zobaczyć, jak smakują, i nie posikał się ze strachu!\n\n(można złapać w Dżungli na Powierzchni)", + "Quest_Fishron": "Krąży legenda o potężnym stworzeniu znanym jako rybok! Jest po części świnią, po części smokiem a po części rybą! Ponoć można je spotkać w zamarzniętych, podziemnych jeziorach najmroźniejszych części świata! Ja tam się nie wybieram, lepiej idź ty, złap ryboka i mi go przynieś! Nie mogę się doczekać!\n\n(można złapać w Podziemnej Tundrze)", + "Quest_InfectedScabbardfish": "W mętnych wodach zepsucia pływa bardzo długa ryba, która wygląda jak pochwa na miecz! Jest podobna do kamienia ebonowego, nie daj się zwieść! Dokładnie tak. Ty masz ją złapać, nie ja!\n\n(można złapać w Zepsuciu)", + "Quest_Mudfish": "Uważaj tylko, jak będziesz brnąć przez wody dżungli! Dlaczego? Nie, nie dlatego, że nie chcę, żeby cię zjadły piranie. Dlatego, że możesz przypadkiem nadepnąć na mój ulubiony rodzaj ryb – błotniaki! Możesz też jednego przynieść do mojej kolekcji!\n\n(można złapać w Dżungli)", + "Quest_TropicalBarracuda": "Piranie i rekiny są paskudne! Ogromnie paskudne! Wiesz, że istnieje bardzo ładna ryba, która i tak może odgryźć ci to i owo? Dałbym 2 platynowe monety, żeby to zobaczyć, tak nawiasem mówiąc... Do rzeczy, masz mi taką złapać. Tylko oddaj ją, zanim ci coś odgryzie!\n\n(można złapać w Dżungli na Powierzchni)", + "Quest_TundraTrout": "Zastanawiasz się czasami, czemu jeziora na zaśnieżonej powierzchni świata {WorldName} nigdy nie zamarzają? Bo ja nie. Ale ryby już zamarzają! Wspaniały i potężny {Angler} bardzo się ucieszy z lodowej ryby! Pędź, moje pacholę, i przynieś mi tego pstrąga z tundry!\n\n(można złapać w Tundrze na Powierzchni)" + }, + "AnglerChatter": { + "Chatter_1": "Jak to {Bartender} nie chce sprzedać mi piwa? Chcę się napić! Co za zrzęda!" + }, + "BartenderChatter": { + "Chatter_1": "Moje ulubione kwiaty to piwonie! Łapiesz? Piwo? Nie?", + "Chatter_10": "Myślisz, że {Steampunker} ma jeszcze taki pistolet? Znam czarownicę, której by się przydał.", + "Chatter_11": "Nie dziwota, że {Demolitionist} ma tyle wypadków. Nawet sobie nie wyobrażasz, ile u mnie kupuje piwa.", + "Chatter_12": "Nie jestem fanem goblinów, ale {GoblinTinkerer} wydaje się w porządku.", + "Chatter_13": "{?Day}Ktoś widział, gdzie poszła driada?", + "Chatter_14": "{?!Day}Cicho tam. Zbyt cicho...", + "Chatter_15": "{?!Day}Zajrzyj do mnie i do dzieła.", + "Chatter_16": "{?BloodMoon}Tam, skąd pochodzę, krwawy księżyc to dobra wymówka, żeby zaczerpnąć świeżego powietrza.", + "Chatter_17": "{?MoonLordDefeated}Księżycowy Władca, nie chodzi ci o Władcę Otchłani?", + "Chatter_18": "{?HardMode}Znam lawamantę, któremu bardzo by się spodobał ten piekielny kamień z piekła.", + "Chatter_19": "{?Homeless}Wiesz, gdzie można otworzyć interes? Chciałbym tu otworzyć bar.", + "Chatter_2": "Mówią, że masz krzepę, a ja się na tym znam. Zobaczmy, czy to prawda.", + "Chatter_3": "W moich rodzinnych stronach pijemy tylko piwo korzenne...", + "Chatter_4": "Coś nowego po szorowaniu stołu przez cały dzień.", + "Chatter_5": "Życie to dopiero wyzwanie, jak się jest zwyczajnie lepszym od reszty.", + "Chatter_6": "Co ja tu robię...", + "Chatter_7": "Spora doza nieustępliwości i odrobina szczęścia mogą się bardzo przydać...", + "Chatter_8": "Nie ma tu żadnych meburów?", + "Chatter_9": "{Dryad} wydaje się fajna. Powinienem ją ze sobą wziąć." + }, + "BartenderHelpText": { + "Help_1": "Musisz wiedzieć, że sprzedaję specjalne, obronne artefakty, ale tylko za medale obrońcy!", + "Help_10": "Jeśli uda ci się odeprzeć inwazję, dostaniesz więcej medali obrońcy, które możesz u mnie wymienić na artefakty i inne wyjątkowe nagrody!", + "Help_11": "Słyszałem też, że można uwolnić moc artefaktów, pokonując Armię Starszego. Może dałoby się ich używać, kiedy tylko się zechce!", + "Help_2": "Możesz użyć tych artefaktów, żeby tworzyć pułapki i wieże obronne. Zużywa to etheriańską manę, specjalną energię upuszczaną wyłącznie przez żołnierzy Armii Starszego!", + "Help_3": "Znalezienie Armii Starszego jest proste. Przyciąga go moc kryształów eternia i dzięki nim można go zwabić.", + "Help_4": "Chcąc osadzić kryształ eternia, musisz zdobyć i kryształ, i stojak, na którym ten kryształ postawisz. Tak się składa, że możesz je u mnie kupić.", + "Help_5": "Lepiej postaw swój stojak na kryształ eternia na otwartej, płaskiej przestrzeni. Ciężko będzie go chronić, kiedy w pobliżu będzie sporo ścian i innych takich.", + "Help_6": "Po ustawieniu stojaka wejdź z nim w interakcję, trzymając kryształ eternia, i przygotuj się do walki!", + "Help_7": "Musisz chronić kryształ eternia przed Armią Starszego! Jego zniszczenie będzie fatalne w skutkach dla mojego domu – Etherii!", + "Help_8": "Za 10 kryształów etheriańskiej many możesz rozmieścić struktury obronne. Po osadzeniu kryształ eternia uwolni swoją manę. W innym wypadku musisz pokonać przeciwników, żeby zdobyć jej więcej.", + "Help_9": "Twoim zadaniem będzie odparcie, przy pomocy struktur obronnych, kilku fal najeźdźców, którzy chcą zniszczyć i ciebie, i kryształ eternia!" + }, + "BartenderNames": { + "Name_1": "Ted", + "Name_10": "Javahawk", + "Name_11": "Elandrian", + "Name_12": "Driscan", + "Name_13": "Iamisom", + "Name_14": "Blacksmith", + "Name_15": "Dani Moo", + "Name_16": "Paddy", + "Name_2": "Barkeep", + "Name_3": "Jerry", + "Name_4": "Bill", + "Name_5": "Ernest", + "Name_6": "William", + "Name_7": "Dale", + "Name_8": "Bruce", + "Name_9": "Moe" + }, + "CyborgChatter": { + "Chatter_1": "{Bartender} powiedział, że przypominam mu \"EV2\". Może powinienem się z nią spotkać." + }, + "GoblinTinkererChatter": { + "Chatter_1": "Wiesz, te etheriańskie gobliny wcale nie przypominają moich ziomków. Są naprawdę nieznośni. Nie to, żeby moi byli dużo lepsi..." + }, + "GuideHelpText": { + "Help_1063": "Normalnie powiedziałbym ci wszystko o Armii Starszego, ale lepiej niech {Bartender} to zrobi." + }, + "MechanicChatter": { + "Chatter_1": "{Bartender} polecił mi piwo korzenne. Powiedziałem mu, żeby podał je w kwadratowym kuflu." + }, + "NurseChatter": { + "Chatter_1": "Ciągle proszę o wino, a {Bartender} podaje mi piwo." + }, + "PirateChatter": { + "Chatter_1": "W końcu mamy barmana! Rum mi się prawie skończył!" + }, + "StylistChatter": { + "Chatter_1": "Chciałam go podstrzyc, ale {Bartender} odmówił. Mógł chociaż dać mi podciąć sobie wąsy!" + }, + "TownNPCHousingFailureReasons": { + "HoleInWallIsTooBig": "W pokoju brakuje ściany", + "RoomCheckStartedInASolidTile": "To blok z materiału stałego!", + "RoomIsTooBig": "Ten pokój jest za duży", + "RoomIsTooSmall": "Ten pokój jest za mały", + "TooCloseToWorldEdge": "We need better text for this!!!" + } +} \ No newline at end of file diff --git a/Localization/Content/pt-BR.json b/Localization/Content/pt-BR.json new file mode 100644 index 0000000..97367c1 --- /dev/null +++ b/Localization/Content/pt-BR.json @@ -0,0 +1,697 @@ +{ + "GameTitle": { + "0": "Terraria: Cave, Peão, Cave!", + "1": "Terraria: Poeira Épica", + "10": "Terraria: Digger T' Blocks", + "11": "Terraria: Camada Não Há Nenhuma Vaca", + "12": "Terraria: Olhos Suspeitos", + "13": "Terraria: Grama Roxo!", + "14": "Terraria: Ninguém Fica Pra Trás... Cavando!", + "15": "Terraria: A Cachoeira da Alegria!", + "16": "Terraria: Earthbound, Só Que Não", + "17": "Terraria: Dig Dug Não Tem a Menor Chance", + "18": "Terraria: O Minério É O Que Importa", + "19": "Terraria: O Dia do Argilamento", + "2": "Terraria: Adaman-TIROU ONDA!", + "20": "Terraria: Terríveis Terráqueos", + "21": "Terraria: Simulador de Descobertas Obsessivo Compulsivo", + "22": "Terraria: Red Dev Redemption", + "23": "Terraria: A Ascensão das Geleias", + "24": "Terraria: Agora com mais coisas querendo te matar!", + "25": "Terraria: Os boatos sobre a morte dos Guias foram um enorme exagero!", + "26": "Terraria: Tenho Pena das Ferramentas...", + "27": "Terraria: E os espeleólogos dizem 'o quê'?", + "28": "Terraria: Então eu disse 'Algo a ver com uma atualização do PC...'", + "29": "Terraria: Que os blocos estejam com você", + "3": "Terraria: A Areia é Superpoderosa", + "30": "Terraria: Melhor que a própria vida", + "31": "Terraria: Terraria: Terraria:", + "32": "Terraria: Agora em 1D", + "33": "Terraria: Em breve, em um computador perto de você", + "34": "Terraria: Dividindo por zero", + "35": "Terraria: Agora com SOM", + "36": "Terraria: Pressione alt-f4", + "37": "Terraria: Tenho Pena das Ferramentas", + "38": "Terraria: Curte areia, parceiro?", + "39": "Terraria: Um belo dia para cavar muito", + "4": "Terraria Parte 3: O Retorno do Guia", + "40": "Terraria: Conhece o Re-Dig-It?", + "41": "Terraria: Eu não sei -- aaaaa!", + "42": "Terraria: O que é aquela coisa roxa e com espinhos?", + "43": "Terraria: Eu quero ser o guia", + "44": "Terraria: Cthulhu é a loucura... e ele está com um olho a menos!", + "45": "Terraria: AS ABELHAS NÃO!!!", + "46": "Terraria: A Lenda de Maxx", + "47": "Terraria: O Culto de Cenx", + "48": "Terraria 2: Bugalu Elétrico", + "49": "Terraria: Experimente também o Minecraft!", + "5": "Terraria: A Estória de um Coelhinho", + "51": "Terraria: Eu só quero saber onde fica o ouro!", + "52": "Terraria: Agora com mais patos!", + "53": "Terraria: 9 + 1 = 11", + "54": "Terraria: Planteras Infinitas", + "6": "Terraria: Dr. Bones e o Templo da Lua de Sangue", + "7": "Terraria: Parque dos Geleiossauros", + "8": "Terraria: A Grama é Mais Verde da Minha Casa", + "9": "Terraria: Blocos Pequenos, Não Recomendados para Crianças Menores de 5 Anos", + "55": "Terraria: Cala a Boca e Cava!" + }, + "Achievements": { + "ARCHAEOLOGIST_Description": "Mate o Doutor Bones.", + "ARCHAEOLOGIST_Name": "Arqueólogo", + "BALEFUL_HARVEST_Description": "Chegue à 15a onda de uma Lua de abóbora, onde o mal espreita a colheita do outono.", + "BALEFUL_HARVEST_Name": "Colheita Nefasta", + "BEGONE_EVIL_Description": "Destrua um altar do demônio ou de carmim com um poderoso martelo sagrado.", + "BEGONE_EVIL_Name": "Fora daqui, Mal!", + "BEHIND_THE_MASK_Description": "Mate o Cultista Insano, um mágico louco que conhece feitiços poderosos.", + "BEHIND_THE_MASK_Name": "Atrás da Máscara", + "BIG_BOOTY_Description": "Desbloqueie um dos misteriosos baús grandes do calabouço com uma chave especial.", + "BIG_BOOTY_Name": "Tesouro dos Grandes", + "BLOODBATH_Description": "Sobreviva a uma Lua de sangue, um evento noturno onde os rios ficam vermelhos e os monstros aparecem aos montes.", + "BLOODBATH_Name": "Banho de Sangue", + "BONED_Description": "Derrote Esqueletron, o guardião amaldiçoado do calabouço.", + "BONED_Name": "Ossudo", + "BUCKETS_OF_BOLTS_Description": "Derrote as três ameaças mecânicas da noite: os Gêmeos, o Destruidor e o Esqueletron Alfa.", + "BUCKETS_OF_BOLTS_Name": "Baldes de Parafusos", + "BULLDOZER_Description": "Destrua um total de 10.000 peças.", + "BULLDOZER_Name": "Escavadora", + "ChallengerCategory": "Desafiante", + "CHAMPION_OF_TERRARIA_Description": "Derrote o Senhor da Lua.", + "CHAMPION_OF_TERRARIA_Name": "Campeão do Terraria", + "CollectorCategory": "Colecionador", + "Completed": "Conquista concluída! {0}", + "COMPLETELY_AWESOME_Description": "Obtenha um minitubarão.", + "COMPLETELY_AWESOME_Name": "Completamente Incrível", + "DAVY_JONES_LOCKER_Description": "Derrote o Holandês Voador, as velas do saqueador dos céus.", + "DAVY_JONES_LOCKER_Name": "O Armário de Davy Jones", + "DECEIVER_OF_FOOLS_Description": "Mate uma ninfa.", + "DECEIVER_OF_FOOLS_Name": "Enganador dos Tolos", + "DO_YOU_WANT_TO_SLAY_A_SNOWMAN_Description": "Derrote uma legião congelada, uma família de bonecos de neve mafiosos.", + "DO_YOU_WANT_TO_SLAY_A_SNOWMAN_Name": "Você Quer Matar na Neve?", + "DRAX_ATTAX_Description": "Crie um drax ou um machado picareta usando barras consagradas e as almas dos três chefes mecânicos.", + "DRAX_ATTAX_Name": "Drax Atacas", + "DUNGEON_HEIST_Description": "Roube uma chave dos zumbis dos calabouços e desbloqueie um de seus preciosos baús dourados.", + "DUNGEON_HEIST_Name": "Assalto ao Calabouço", + "DYE_HARD_Description": "Equipe uma tintura em todas as entradas possíveis.", + "DYE_HARD_Name": "Duro de (Não) Pintar", + "ExplorerCategory": "Explorador", + "EXTRA_SHINY_Description": "Extraia um minério poderoso que foi abençoado há pouco tempo em seu mundo.", + "EXTRA_SHINY_Name": "Com Brilho Adicional!", + "EYE_ON_YOU_Description": "Derrote o Olho de Cthulhu, uma ameaça ocular que só aparece à noite.", + "EYE_ON_YOU_Name": "De Olho em Você", + "FASHION_STATEMENT_Description": "Equipe uma armadura ou roupa decorativa em todas as três entradas sociais.", + "FASHION_STATEMENT_Name": "Moda é Coisa Séria", + "FAST_AND_FISHIOUS_Description": "Complete sua 50a missão para o pescador.", + "FAST_AND_FISHIOUS_Name": "Velozes e Peixiosos", + "FISH_OUT_OF_WATER_Description": "Derrote o Duque Peixe-dragão, terror mutante dos mares.", + "FISH_OUT_OF_WATER_Name": "Um Peixe Fora d'Água", + "FREQUENT_FLYER_Description": "Gaste mais de 1 peça de ouro em tratamento com a enfermeira.", + "FREQUENT_FLYER_Name": "Cliente Fiel", + "FUNKYTOWN_Description": "Construa ou encontre um campo de cogumelos brilhantes acima da superfície.", + "FUNKYTOWN_Name": "Funkytown", + "GELATIN_WORLD_TOUR_Description": "Derroto cada um dos tipos de geleia que existe!", + "GELATIN_WORLD_TOUR_Name": "Turnê Mundial das Geleias", + "GET_A_LIFE_Description": "Consuma uma fruta da vida, que cresce nas gramas mais altas das selvas subterrâneas.", + "GET_A_LIFE_Name": "Arruma uma Vida", + "GLORIOUS_GOLDEN_POLE_Description": "Obtenha uma vara de pescar dourada.", + "GLORIOUS_GOLDEN_POLE_Name": "Gloriosa Vara Dourada", + "GOBLIN_PUNTER_Description": "Derrote uma invasão de goblins, um grupo desorganizado de guerreiros brutais e bárbaros, de orelhas pontudas, e seus feiticeiros das chamas das sombras.", + "GOBLIN_PUNTER_Name": "Cliente dos Goblins", + "GOOD_LITTLE_SLAVE_Description": "Complete sua 10a missão para o pescador.", + "GOOD_LITTLE_SLAVE_Name": "Escravo Bonzinho", + "HEAD_IN_THE_CLOUDS_Description": "Equipe um par de asas.", + "HEAD_IN_THE_CLOUDS_Name": "Com a Cabeça nas Nuvens", + "HEART_BREAKER_Description": "Descubra e destrua seu primeiro coração de cristal subterrâneo.", + "HEART_BREAKER_Name": "Arrasa-Corações", + "HEAVY_METAL_Description": "Obtenha uma bigorna feita de ferro ou de chumbo.", + "HEAVY_METAL_Name": "Heavy Metal", + "HEX_EDUCATION_Description": "Derrote um Invocador Goblin, feiticeiros das chamas mais sombrias.", + "HEX_EDUCATION_Name": "Educação Maldita", + "HOLD_ON_TIGHT_Description": "Equipe seu primeiro gancho.", + "HOLD_ON_TIGHT_Name": "Segura Firme!", + "ICE_SCREAM_Description": "Chegue à 15a onda da Lua congelada, quando a temporada de festas rapidamente transforma-se em loucura.", + "ICE_SCREAM_Name": "Sorvete do Inferno", + "INDEPENDENCE_DAY_Description": "Derrote uma Nave Mãe, estrategista dos invasores de Marte.", + "INDEPENDENCE_DAY_Name": "Dia da Independência", + "INTO_ORBIT_Description": "Você só pode descer daqui!", + "INTO_ORBIT_Name": "Até a Órbita", + "ITS_GETTING_HOT_IN_HERE_Description": "Escave até chegar ao submundo derretido.", + "ITS_GETTING_HOT_IN_HERE_Name": "Está Ficando Quente Aqui", + "ITS_HARD_Description": "Libere os espíritos antigos da luz e da escuridão em seu mundo, permitindo a chegada de inimigos muito mais fortes e enchendo o mundo de tesouros incríveis (e arco-íris!).", + "ITS_HARD_Name": "É Difícil!", + "IT_CAN_TALK_Description": "Construa uma casa em uma bioma de cogumelo e faça uma Trufa mudar-se para lá.", + "IT_CAN_TALK_Name": "Ela Sabe Falar?!", + "I_AM_LOOT_Description": "Descubra um baú dourado no subterrâneo e confira o que há dentro dele.", + "I_AM_LOOT_Name": "Eu Sou o Tesouro!", + "JEEPERS_CREEPERS_Description": "Encontre uma caverna de aranhas no subterrâneo.", + "JEEPERS_CREEPERS_Name": "Quem Arranha a Aranha?", + "KILL_THE_SUN_Description": "Sobreviva a um eclipse solar, um dia mais escuro que a própria noite, repleto de criaturas terríveis.", + "KILL_THE_SUN_Name": "Mate o Sol", + "LIHZAHRDIAN_IDOL_Description": "Derrote o Golem, o ídolo de rosto de pedra da tribo dos laghartos.", + "LIHZAHRDIAN_IDOL_Name": "Ídolo dos Laghartos", + "LIKE_A_BOSS_Description": "Obtenha um item capaz de invocar um chefe.", + "LIKE_A_BOSS_Name": "Você Que Manda, Chefe", + "LUCKY_BREAK_Description": "Sobreviva a uma queda longa com um fio de vida restante.", + "LUCKY_BREAK_Name": "Sorte Miserável", + "MARATHON_MEDALIST_Description": "Ande 26,2 milhas a pé.", + "MARATHON_MEDALIST_Name": "Maratonista", + "MASTERMIND_Description": "Derrote o Cérebro de Cthulhu, um monstro cérebro enorme, que assombra o carmim.", + "MASTERMIND_Name": "Mente Superior", + "MATCHING_ATTIRE_Description": "Equipe armaduras nos três espaços disponíveis: cabeça, peitoral e pés.", + "MATCHING_ATTIRE_Name": "Roupas Combinando", + "MECHA_MAYHEM_Description": "Lute contra os Gêmeos, o Destruidor e o Esqueletron Alfa ao mesmo tempo, e saia vitorioso.", + "MECHA_MAYHEM_Name": "Mecha-Maluco", + "MINER_FOR_FIRE_Description": "Crie uma picareta derretida usando os materiais mais quentes.", + "MINER_FOR_FIRE_Name": "Minerador de Fogo", + "NoCategory": "Nenhum", + "NOT_THE_BEES_Description": "Dispare uma Pistola de Abelha usando uma Armadura de Abelha completa.", + "NOT_THE_BEES_Name": "Nas Abelhas Não!", + "NO_HOBO_Description": "Construa uma casa para seu primeiro habitante NPC, como o guia, para que ele mude para lá.", + "NO_HOBO_Name": "Nada de Morar na Rua", + "OBSESSIVE_DEVOTION_Description": "Derrote o Cultista Antigo, líder fanático do culto do calabouço.", + "OBSESSIVE_DEVOTION_Name": "Devoção Obsessiva", + "OBTAIN_HAMMER_Description": "Crie ou obtenha seu primeiro martelo de alguma outra maneira.", + "OBTAIN_HAMMER_Name": "Pare! Hora do Martelo!", + "OOO_SHINY_Description": "Extraia sua primeira pepita de minério com uma picareta.", + "OOO_SHINY_Name": "Ooo! Brilhante!", + "PHOTOSYNTHESIS_Description": "Extraia clorofita, um minério orgânico encontrado nas profundezas, entre a flora mais densa.", + "PHOTOSYNTHESIS_Name": "Fotossíntese", + "PRETTY_IN_PINK_Description": "Mate o rosado.", + "PRETTY_IN_PINK_Name": "Tão Bonitinho de Rosa", + "PRISMANCER_Description": "Obtenha um bastão do arco-íris.", + "PRISMANCER_Name": "Prismancer", + "PUMPKIN_SMASHER_Description": "Derrote o Reibóbora, o assustador senhor da noite das bruxas.", + "PUMPKIN_SMASHER_Name": "Esmagador de Abóboras", + "RAINBOWS_AND_UNICORNS_Description": "Dispare uma pistola do arco-íris enquanto monta um unicórnio.", + "RAINBOWS_AND_UNICORNS_Name": "Arco-íris e Unicórnios", + "REAL_ESTATE_AGENT_Description": "Faça todos os NPCs de cidade disponíveis viverem em seu mundo.", + "REAL_ESTATE_AGENT_Name": "Agente Imobiliário", + "ROBBING_THE_GRAVE_Description": "Obtenha um tesouro raro com um monstro difícil no calabouço.", + "ROBBING_THE_GRAVE_Name": "Roubando da Cova", + "ROCK_BOTTOM_Description": "Só falta ir para cima!", + "ROCK_BOTTOM_Name": "O Fundo do Poço", + "SERVANT_IN_TRAINING_Description": "Complete sua 1a missão para o pescador.", + "SERVANT_IN_TRAINING_Name": "Servo-em-Treinamento", + "SICK_THROW_Description": "Obtenha o Terrariano.", + "SICK_THROW_Name": "Arremesso Sinistro", + "SlayerCategory": "Assassino", + "SLAYER_OF_WORLDS_Description": "Derrote todos os chefes no Terraria.", + "SLAYER_OF_WORLDS_Name": "Assassino de Mundos", + "SLIPPERY_SHINOBI_Description": "Derrote a Geleia Rei, o senhor de tudo que é pegajoso.", + "SLIPPERY_SHINOBI_Name": "Shinobi Safadinho", + "SMASHING_POPPET_Description": "Usando explosivos ou seu fiel martelo, destrua uma Esfera das Sombras ou um Coração de Carmesim nas partes maléficas do seu mundo.", + "SMASHING_POPPET_Name": "Detonou, Boneco!", + "STAR_DESTROYER_Description": "Derrote as quatro torres celestiais da Lua.", + "STAR_DESTROYER_Name": "Destruidor de Estrelas", + "STAR_POWER_Description": "Crie um cristal de mana usando estrelas caídas e consuma-o.", + "STAR_POWER_Name": "Poder das Estrelas", + "STICKY_SITUATION_Description": "Sobreviva à chuva de geleias, onde organismos gelatinosos cairão do céu aos montes.", + "STICKY_SITUATION_Name": "Perigoso... e Pegajoso", + "STILL_HUNGRY_Description": "Derrote a Parede de Carne, o mestre e núcleo do mundo, que surge depois de um grande sacrifício em chamas.", + "STILL_HUNGRY_Name": "Ainda Faminto", + "STING_OPERATION_Description": "Derrote a Rainha Abelha, matriarca das colmeias da selva.", + "STING_OPERATION_Name": "Operação Ferrão", + "SUPREME_HELPER_MINION_Description": "Complete um total de 200 missões para o pescador.", + "SUPREME_HELPER_MINION_Name": "Lacaio Supremo!", + "SWORD_OF_THE_HERO_Description": "Obtenha uma Lâmina da Terra, forjada a partir das mais finas lâminas de luz e escuridão.", + "SWORD_OF_THE_HERO_Name": "Espada do Herói", + "TEMPLE_RAIDER_Description": "Quebre as paredes impenetráveis do templo da selva.", + "TEMPLE_RAIDER_Name": "Invasor de Templos", + "THERE_ARE_SOME_WHO_CALL_HIM_Description": "Mate o Tim.", + "THERE_ARE_SOME_WHO_CALL_HIM_Name": "Algumas Pessoas o Chamam de...", + "THE_CAVALRY_Description": "Monte alguma criatura.", + "THE_CAVALRY_Name": "A Cavalaria", + "THE_GREAT_SOUTHERN_PLANTKILL_Description": "Derrote Plantera, a monstruosidade vegetal das profundezas da selva.", + "THE_GREAT_SOUTHERN_PLANTKILL_Name": "A Grande Matança das Plantas do Sul", + "THROWING_LINES_Description": "Jogue um ioiô.", + "THROWING_LINES_Name": "Fios para Arremessar", + "TIL_DEATH_Description": "Mate o noivo.", + "TIL_DEATH_Name": "Até que a Morte...", + "TIMBER_Description": "Derrube sua primeira árvore.", + "TIMBER_Name": "Madeiraaaa!!", + "TIN_FOIL_HATTER_Description": "Derrote uma invasão de Marte, quando os seres do outro mundo vierem para derreter seu cérebro e para colocar sondas em lugares desconfortáveis.", + "TIN_FOIL_HATTER_Name": "Chapéu de Alumínio", + "TOPPED_OFF_Name": "No Topo", + "TROUT_MONKEY_Description": "Complete sua 25a missão para o pescador.", + "TROUT_MONKEY_Name": "Macaquinho Treinado", + "VEHICULAR_MANSLAUGHTER_Description": "Derrote um inimigo atropelando-o com uma vagoneta.", + "VEHICULAR_MANSLAUGHTER_Name": "Homicídio com Veículo", + "WALK_THE_PLANK_Description": "Derrote uma invasão pirata, um grupo de ladrões dos mares estão atrás dos seus tesouros... e da sua vida!", + "WALK_THE_PLANK_Name": "Andando na Prancha", + "WATCH_YOUR_STEP_Description": "Torne-se uma vítima de uma terrível armadilha subterrânea.", + "WATCH_YOUR_STEP_Name": "Cuidado Onde Pisa!", + "WHERES_MY_HONEY_Description": "Descubra uma colmeia grande nas profundezas da selva.", + "WHERES_MY_HONEY_Name": "Onde Está o Meu Mel?", + "WINTERHEARTED_Description": "Derrote a Rainha do Gelo, bruxa das noites mais frias.", + "WINTERHEARTED_Name": "Coração Invernal", + "WORM_FODDER_Name": "Munição para Vermes", + "YOU_AND_WHAT_ARMY_Description": "Assuma o comando de nove lacaios ao mesmo tempo.", + "YOU_AND_WHAT_ARMY_Name": "Você e que Exército?", + "YOU_CAN_DO_IT_Description": "Sobreviva à primeira noite completa do seu personagem.", + "YOU_CAN_DO_IT_Name": "Você Consegue!" + }, + "CLI": { + "AutomaticPortForward": "Redirecionar porta automaticamente? (s/n): ", + "AvailableCommands": "Comandos disponíveis:", + "BanMessage": "Expulso do servidor.", + "Ban_Command": "ban", + "Ban_Description": "Expulsa um jogador do servidor.", + "Ban_Example": "ban ", + "Ban_Usage": "Uso: ban ", + "ChooseDifficulty": "Escolher dificuldade: ", + "ChooseEvil": "Escolher mal no mundo: ", + "ChooseSize": "Escolher tamanho: ", + "ChooseWorld": "Escolher Mundo: ", + "Clear_Command": "clear", + "Clear_Description": "Limpar janela do console.", + "ClientWasBooted": "{0} foi chutado: {1}", + "Corrupt": "Corrupção", + "Crimson": "Carmim", + "Dawn_Command": "dawn", + "Dawn_Description": "Muda a hora do dia para o amanhecer.", + "DeleteConfirmation": "Certeza que quer excluir {0}?", + "DeleteWorld_Command": "d", + "DeleteWorld_Description": "Excluir Mundo", + "DeleteWorld_Example": "d ", + "Dusk_Command": "dusk", + "Dusk_Description": "Muda a hora do dia para o entardecer.", + "EnterServerPassword": "Senha do servidor (pressione enter para não definir uma): ", + "EnterWorldName": "Digite um nome para o mundo: ", + "ExitNoSave_Command": "exit-nosave", + "ExitNoSave_Description": "Fecha o servidor sem salvar.", + "Exit_Command": "exit", + "Exit_Description": "Fecha o servidor e salva.", + "FPS_Command": "fps", + "HelpHint": "Digite 'help' para consultar uma lista de comandos.", + "Help_Command": "help", + "Help_Description": "Exibir uma lista de comandos.", + "InvalidCommand": "Comando inválido.", + "KickMessage": "Chutado do servidor.", + "Kick_Command": "kick", + "Kick_Description": "Chuta um jogador do servidor.", + "Kick_Example": "kick ", + "Kick_Usage": "Uso: kick ", + "ListeningOnPort": "Aguardando na porta {0}", + "MaxPlayers_Command": "maxplayers", + "MaxPlayers_Description": "Exibe o número máximo de jogadores.", + "Midnight_Command": "midnight", + "Midnight_Description": "Muda a hora para a meia-noite.", + "MOTD": "MOTD: {0}", + "MOTD_Command": "motd", + "MOTD_Description": "Exibe a mensagem do dia (MOTD).", + "NewWorld_Command": "n", + "NewWorld_Description": "Mundo Novo", + "No": "no", + "NoMOTD": "Boas-vindas a {0}!", + "Noon_Command": "noon", + "Noon_Description": "Muda a hora do dia para o meio-dia.", + "NoPassword": "Nenhuma senha definida.", + "NoPlayers": "Nenhum jogador conectado.", + "OnePlayerConnected": "1 jogador conectado.", + "Password": "Senha: {0}", + "PasswordDisabled": "Senha desativada.", + "PasswordSet": "Senha: {0}", + "Password_Command": "password", + "Password_Description": "Exibe a senha.", + "PlayerLimit": "Limite de jogadores: {0}", + "PlayersConnected": "{0} jogadores conectados.", + "Playing_Command": "playing", + "Playing_Description": "Exibe uma lista dos jogadores.", + "Port": "Porta: {0}", + "Port_Command": "port", + "Port_Description": "Exibe a porta ativa.", + "Random": "Aleatório", + "Save_Command": "save", + "Save_Description": "Salva o mundo do jogo.", + "Say_Command": "say", + "Say_Description": "Envia uma mensagem", + "Say_Example": "say ", + "Say_Usage": "Uso: say >", + "Server": "Servidor do Terraria {0}", + "ServerMessage": " {0}", + "ServerStarted": "Servidor inicializado.", + "SetInitialPort": "Porta do servidor (pressione enter para 7777): ", + "SetMOTD_Command": "motd", + "SetMOTD_Description": "Mude a mensagem do dia (MOTD).", + "SetMOTD_Example": "motd ", + "SetPassword_Command": "password", + "SetPassword_Description": "Mude a senha.", + "SetPassword_Example": "password ", + "Settle_Command": "settle", + "Settle_Description": "Faz a água parar.", + "ShortNo": "n", + "ShortYes": "y", + "Time": "Hora: {0}", + "Time_Command": "time", + "Time_Description": "Exibe a hora no jogo.", + "Version_Command": "version", + "Version_Description": "Exibe o número da versão.", + "WaterIsAlreadySettling": "A água já está parando", + "Yes": "yes", + "DisplaySeed": "Seed do Mundo: {0}", + "EnterSeed": "Inserir Seed (Deixe em branco para aleatório):", + "NoValidSeed": "Este mundo foi gerado em uma versão mais antiga, que não oferecia suporte a seeds.", + "Seed_Command": "seed", + "Seed_Description": "Exibe o seed do mundo." + }, + "Controls": { + "RightClick": "Clique com o botão direito" + }, + "Currency": { + "Copper": "Cobre", + "DefenderMedals": "Medalha do Defensor", + "Gold": "Ouro", + "Platinum": "Platina", + "Silver": "Prata" + }, + "Enemies": { + "MoonLord": "Senhor da Lua", + "TheTwins": "Os Gêmeos" + }, + "Error": { + "BadHeaderBufferOverflow": "Erro na cabeçalho causou sobrecarga no buffer de leitura.", + "DataSentAfterConnectionLost": "Tentou enviar dados a um cliente depois da conexão ser interrompida", + "Error": "Erro", + "ExceptionNormal": " Exceção normal: {0}", + "LaunchFromSteam": "Por favor, execute o jogo do seu cliente Steam.", + "LoadFailed": "Falha no carregamento!", + "LoadFailedNoBackup": "Falha no carregamento! Nenhum backup encontrado.", + "NetMessageError": "Erro na mensagem {0}", + "ServerCrash": "Falha no servidor: {0}\n{1}\nPor favor, envie o crashlog.txt para support@terraria.org", + "TriedToRunServerTwice": "Houve uma tentativa de execução de dois servidores no mesmo PC", + "UnableToCapture": "Não foi possível fazer a captura.", + "UnableToLoadWorld": "Não foi possível carregar o mundo:", + "UnableToWritePreferences": "Não foi possível gravar o arquivo em: {0}", + "InvalidLobbyFlag": "-lobby flag utilizada sem \"{0}\" ou \"{1}\". Ignorando." + }, + "Game": { + "Actuators": "Atuadores", + "BallBounceResult": "{0} foi atingido {1} vezes antes de tocar no chão!", + "BedObstructed": "Sua cama está obstruída.", + "BlueWires": "Fios Azuis", + "DroppedCoins": "deixou cair {0}", + "EnemiesDefeatedAnnouncement": "O {0}o {1} foi derrotado!", + "EnemiesDefeatedByAnnouncement": "{0} derrotou o {1}o {2}!", + "FinalWave": "Onda Final", + "FirstWave": "Primeira Onda", + "GreenWires": "Fios Verdes", + "HasTeleportedTo": "{0} teleportou-se para {1}", + "HouseChair": "uma cadeira", + "HouseDoor": "uma porta", + "HouseLightSource": "uma fonte de luz", + "HouseMissing_1": "Esta casa não tem {0}.", + "HouseMissing_2": "Esta casa não tem {0} nem {1}.", + "HouseMissing_3": "Esta casa não tem {0}, {1} nem {2}.", + "HouseMissing_4": "Esta casa não tem {0}, {1}, {2} nem {3}.", + "HouseTable": "uma mesa", + "InvasionPoints": "{0} pontos", + "InvasionWave_Type1": "{0}: {1}", + "InvasionWave_Type2": "{0}: {1}, e {2}", + "InvasionWave_Type3": "{0}: {1}, {2}, e {3}", + "InvasionWave_Type4": "{0}: {1}, {2}, {3}, e {4}", + "InvasionWave_Type5": "{0}: {1}, {2}, {3}, {4}, e {5}", + "InvasionWave_Type6": "{0}: {1}, {2}, {3}, {4}, {5}, e {6}", + "InvasionWave_Type7": "{0}: {1}, {2}, {3}, {4}, {5}, {6}, e {7}", + "InvasionWave_Type8": "{0}: {1}, {2}, {3}, {4}, {5}, {6}, {7}, e {8}", + "JoinGreeting": "Jogadores no momento: {0}.", + "NPCTitle": "{0} o {1}", + "PlayerDeathTime": "{0} morreu {1} atrás", + "PvPFlag": "(JvJ)", + "RedWires": "Fios Vermelhos", + "SpawnPointRemoved": "Ponto de entrada removido!", + "SpawnPointSet": "Ponto de entrada definido!", + "TeleportTo": "Teleportar-se para {0}", + "Time": "Hora: {0}", + "Wave": "Onda: {0}", + "WaveCleared": "Concluiu {0}", + "WaveMessage": "Onda {0}: {1}", + "YellowWires": "Fios Amarelos", + "BirthdayParty_1": "Parece que {0} está dando uma festa", + "BirthdayParty_2": "Parece que {0} e {1} estão dando uma festa", + "BirthdayParty_3": "Parece que {0}, {1}, e {2} estão dando uma festa", + "RespawnInPrefix": "", + "RespawnInSuffix": "{0}" + }, + "GameUI": { + "ActuationDeviceOff": "Dispositivo atuador desligado", + "ActuationDeviceOn": "Dispositivo atuador ligado", + "BaitPower": "{0}% de poder da isca", + "BaitRequired": "Iscas são necessárias para capturar peixes", + "Bright": "Brilhante", + "Buy": "Comprar", + "BuyWithValue": "Comprar ({0})", + "Cancel": "Cancelar", + "Change": "Mudar", + "Clear": "Limpar", + "Cloudy": "Nublado", + "CompassCenter": "Centro", + "CompassEast": "{0}' a Leste", + "CompassWest": "{0}' Oeste", + "Depth": "{0}'", + "DepthLevel": "Nível", + "Disabled": "Desativado", + "DPS": "{0} de danos por segundo", + "EastWind": " ({0} mph E)", + "Enabled": "Ativado", + "EnemiesNearby": "{0} inimigos próximos!", + "Expert": "Perito", + "Faded": "Esmaecido", + "FirstQuarter": "Quarto Crescente", + "FishingPower": "{0} de Poder de Pescaria", + "FishingWarning": "Aviso!", + "FullFishingPower": "{0} ({1}%) de Poder de Pescaria", + "FullMoon": "Lua Cheia", + "HairStyle": "Tipo de Cabelo", + "HeatDistortion": "Distorção de Calor: {0}", + "HeavyRain": "Chuva Forte", + "Hidden": "Oculto", + "LayerCaverns": "Cavernas", + "LayerSpace": "Espaço", + "LayerSurface": "Superfície", + "LayerUnderground": "Subterrâneo", + "LayerUnderworld": "Submundo", + "LightRain": "Chuva Leve", + "MechanicalRulerOff": "Régua Mecânica desligada", + "MechanicalRulerOn": "Régua Mecânica ligada", + "MostlyCloudy": "Frequentemente Nublado", + "NewMoon": "Lua Nova", + "NoDPS": "N/A", + "NoEnemiesNearby": "Nenhum inimigo próximo", + "NoKillCount": "Número de mortes indisponível", + "NoRareCreatures": "Nenhuma criatura rara próxima", + "Normal": "Normal", + "NotEnoughWater": "Água Insuficiente!", + "NoTreasureNearby": "Nenhum tesouro próximo", + "OneEnemyNearby": "1 inimigo próximo!", + "OreDetected": "{0} detectado na área!", + "Overcast": "Tempo Fechado", + "PaintSprayerOff": "Arma de tinta desligada", + "PaintSprayerOn": "Arma de tinta ligada", + "PartlyCloudy": "Parcialmente Nublado", + "PlayerDistance": "({0} pés)", + "PrecentFishingPower": "{0}% de poder de pescaria", + "Rain": "Chuva", + "RulerOff": "Régua Desligada", + "RulerOn": "Régua Ligada", + "SettingsMenu": "Menu de Configurações", + "OpenFileFolder": "{$LegacyInterface.110}", + "Speed": "{0} mph", + "StormEffects": "Efeitos da Tempestade: {0}", + "ThirdQuarter": "Quarto Minguante", + "WaningCrescent": "Minguante", + "WaningGibbous": "Balsâmica", + "WaxingCrescent": "Crescente", + "WaxingGibbous": "Gibosa", + "WestWind": " ({0} mph W)", + "WireModeForced": "Exibição Mecânica: Forçada", + "WireModeNormal": "Exibição Mecânica: Normal", + "Gameplay": "Jogabilidade", + "GameZoom": "Aproximação: {0}% ({1}%)", + "LightingUpdateEveryFrameOff": "Relâmpago Rápido Desligado", + "LightingUpdateEveryFrameOn": "Relâmpago Rápido Ligado", + "Misc": "Diversos", + "QualityHigh": "Alta", + "QualityLow": "Baixa", + "QualityMedium": "Médio", + "QualityOff": "Desligado", + "UIScale": "Escala da Interface: {0}% ({1}%)", + "WaveQuality": "Qualidade das Ondas: {0}", + "ZoomCategory": "Aproximação" + }, + "Misc": { + "ForceWaterSettling": "Forçando a água a ficar calma.", + "ResolutionChanged": "Resolução alterada para: {0}x{1}.", + "ShortDays": "d", + "ShortHours": "h", + "ShortMinutes": "m", + "ShortSeconds": "s", + "WaterSettled": "A água está calma." + }, + "Net": { + "CheatingInvalid": "Tentativa de trapaça detectada. Chute inválido", + "CheatingLiquidSpam": "Tentativa de trapaça detectada. Spam de líquidos", + "CheatingProjectileSpam": "Tentativa de trapaça detectada. Spam de projéteis", + "CheatingTileRemovalSpam": "Tentativa de trapaça detectada. Spam de remoção de peças", + "CheatingTileSpam": "Tentativa de trapaça detectada. Spam de adição de peças", + "ClientConnecting": "{0} está conectando-se...", + "ClientPlaying": "({0}) {1} está jogando", + "ClientRequestedWorldInfo": "({0}) {1} solicitou informações sobre o mundo", + "ClientsConnected": "{0} clientes conectados", + "ClientSendingData": "({0}) {1} está enviando dados do jogador...", + "ClientStatusComplete": "({0}) {1} {2}: Concluído!", + "ConnectingTo": "Conectando-se a {0}", + "EmptyName": "Nome vazio.", + "FoundServer": "Servidor encontrado", + "IsReceivingTileData": "está recebendo dados sobre as peças", + "LostConnection": "Conexão interrompida", + "NameTooLong": "O nome é longo demais.", + "RequestingTileData": "Requisitando dados sobre as peças", + "RequestingWorldInformation": "Requisitando informações sobre o mundo", + "SendingPlayerData": "Enviando dados do jogador...", + "ServerAutoShutdown": "O jogador local sair do jogo. Iniciando fechamento automático.", + "StatusComplete": "{0}: Concluído!", + "WaitingForClients": "Aguardando clientes..." + }, + "Social": { + "Joining": "Entrado...", + "JoiningFriend": "Entrado em {0}...", + "StatusInGame": "Jogando online.", + "StatusJoining": "Entrado no jogo." + }, + "UI": { + "Achievements": "Conquistas", + "Back": "Voltar", + "Cancel": "Cancelar", + "Delete": "Excluir", + "Effects": "Efeitos", + "EnterButton": "Entrar", + "EnterMessage": "Insira uma mensagem:", + "EnterNewName": "Insira um nome novo:", + "Expert": "Perito", + "ExpertDescription": "(Dificuldade & Tesouros Muito Maiores)", + "ExpertDescriptionFlavor": "Fortuna e Glória, Garoto.", + "Favorite": "Favorito", + "Hardcore": "Hardcore", + "Keybindings": "Definição de Teclas", + "Mediumcore": "Mediumcore", + "More": "outros", + "MoveOffCloud": "Mover da nuvem", + "MoveToCloud": "Mover para a nuvem", + "New": "Novo", + "Normal": "Normal", + "LightMode_White": "{$LegacyMenu.56}", + "LightMode_Color": "{$LegacyMenu.55}", + "Play": "Jogar", + "RestoreButton": "Restaurar", + "Save": "Salvar", + "SelectPlayer": "Selecionar Personagem", + "SelectWorld": "Selecionar Mundo", + "Softcore": "Softcore", + "SpaceButton": "Espaço", + "Submit": "Enviar", + "Unfavorite": "Remover dos Favoritos", + "WorldCreatedFormat": "Criado: {0}", + "WorldSizeFormat": "Mundo {0}", + "WorldSizeLarge": "Grande", + "WorldSizeMedium": "Médio", + "WorldSizeSmall": "Pequeno", + "WorldSizeUnknown": "Desconhecido", + "BartenderHelp": "Cristal de Eternia", + "CopySeed": "Copiar Seed: {0}", + "EnterSeed": "Inserir Seed (Deixe em branco para aleatório)", + "LoadingCode": "Carregando:", + "SeedCopied": "Seed Copiada", + "ZoomIn": "{$LegacyMenu.168}", + "ZoomOut": "{$LegacyMenu.169}", + "Ellipsis": "...", + "LightMode_Retro": "{$LegacyMenu.57}", + "LightMode_Trippy": "{$LegacyMenu.58}", + "PlayerEmptyName": "{$Net.EmptyName}" + }, + "DeathSource": { + "NPC": "{0} por {1}.", + "Player": "{0} pelo {2} de {1}.", + "Projectile": "{0} por {1}." + }, + "DeathText": { + "Burned": "{0} não conseguiu apagar o fogo.", + "Default": "{0}.", + "Drowned_1": "{0} esqueceu de respirar.", + "Drowned_2": "{0} está dormindo com os peixes.", + "Drowned_3": "{0} afogou-se.", + "Drowned_4": "{0} virou comida de tubarão.", + "Electrocuted": "{0} não conseguiu conter os watts.", + "Fell_1": "{0} caiu para a morte.", + "Fell_2": "{0} não quicou.", + "Lava_1": "{0} derreteu.", + "Lava_2": "Incineraram {0}.", + "Lava_3": "{0} tentou nadar na lava.", + "Lava_4": "{0} gosta de brincar com magma.", + "Petrified_1": "Despedaçaram {0}.", + "Petrified_3": "Alguém precisa varrer {0}.", + "Petrified_4": "{0} acabou de virar um monte de pó.", + "Poisoned": "{0} não conseguiu encontrar o antídoto.", + "Slain": "Mataram {0}...", + "Stabbed": "Esfaquearam {0}.", + "Suffocated": "{0} não conseguiu respirar.", + "Teleport_1": "{0} não se materializou.", + "Teleport_2_Female": "{0} acabou com as pernas no lugar da cabeça.", + "Teleport_2_Male": "{0} acabou com as pernas no lugar da cabeça.", + "TriedToEscape": "{0} tentou escapar.", + "WasLicked": "Lamberam {0}." + }, + "DeathTextGeneric": { + "ArmTornOff": "{0} teve seus braços arrancados.", + "Chopped": "Picotaram {0}.", + "Cut": "Cortaram {0} ao meio.", + "Decapitated": "Decapitaram {0}.", + "Destroyed": "Destruíram {0}.", + "Dissected": "Dissecaram {0} brutalmente.", + "EntrailsRippedOut": "As entranhas de {0} foram arrancadas.", + "Eviscerated": "Estraçalharam {0}.", + "ExtremitiesDetached": "{0} teve suas extremidades arrancadas.", + "FaceTornOff": "{0} teve seu rosto arrancado.", + "Flailing": "{0} finalmente parou de balançar por aí.", + "HeadRemoved": "{0} teve a cabeça removida.", + "Impaled": "Empalaram {0}.", + "InnardsBecameOutards": "{0} viu suas entranhas pularem para fora.", + "Mangled": "{0} teve seu corpo mutilado.", + "Massacred": "Massacraram {0}.", + "Murdered": "Assassinaram {0}.", + "PileOfFlesh": "{0} transformou-se em uma pilha de carne.", + "Plead": "{0} teve seu desejo de morte atendido.", + "Removed": "Removeram {0} de {1}.", + "Ripped": "{0} teve sua carne arrancada dos ossos.", + "Ruptured": "{0} teve seus órgãos vitais rasgados.", + "SkullCrushed": "{0} teve seu crânio esmagado.", + "Slain": "Mataram {0}.", + "Snapped": "Quebraram {0} ao meio.", + "TornInHalf": "Cortaram {0} ao meio." + }, + "DungeonDefenders2": { + "BartenderWarning": "O Cristal de Eternia rejeita esta área e some instantaneamente. O Taberneiro falou que ele deveria ficar em uma área grande, plana e ao ar livre...", + "CantSummonTower": "Não parece funcionar com um Cristal de Etheria por perto...", + "InvasionProgressTitle": "Exército do Ancião", + "InvasionStart": "O exército do ancião está chegando!", + "InvasionWin": "O exército do ancião foi derrotado!", + "WaveComplete": "Onda Concluída!" + }, + "Key": { + "DOWN": "PARA BAIXO", + "UP": "PARA CIMA" + }, + "Language": { + "English": "English (Inglês)", + "German": "Deutsch (Alemão)", + "Italian": "Italiano (Italiano)", + "French": "Français (Francês)", + "Spanish": "Español (Espanhol)", + "Russian": "Русский (Russo)", + "Chinese": "简体中文 (Chinês Simplificado)", + "Portuguese": "Português brasileiro", + "Polish": "Polski (Polonês)" + }, + "RandomWorldName_Composition": { + "6": "{Adjective} {Location}" + } +} \ No newline at end of file diff --git a/Localization/Content/pt-BR/Game.json b/Localization/Content/pt-BR/Game.json new file mode 100644 index 0000000..5629816 --- /dev/null +++ b/Localization/Content/pt-BR/Game.json @@ -0,0 +1,780 @@ +{ + "Announcement": { + "HasBeenDefeated_Plural": "{0} foram derrotados!", + "HasBeenDefeated_Single": "{0} foi derrotado!", + "HasAwoken": "{0} acordou!", + "HasArrived": "{0} chegou!" + }, + "ArmorSetBonus": { + "MetalTier1": "2 de defesa", + "MetalTier2": "3 de defesa", + "CobaltRanged": "20% de chance de não consumir munição", + "MythrilCaster": "17% de redução no consumo de mana", + "MythrilMelee": "5% de aumento na chance de acerto crítico em ataque físico", + "MythrilRanged": "20% de chance de não consumir munição", + "AdamantiteCaster": "19% de redução no consumo de mana", + "AdamantiteMelee": "18% de aumento na velocidade do ataque físico e do movimento", + "AdamantiteRanged": "25% de chance de não consumir munição", + "ShadowScale": "15% de aumento na velocidade dos movimentos", + "Wood": "1 de defesa", + "Crimson": "Regeneração de vida muito maior", + "Frost": "Ataques físicos e a distância causam queimaduras de gelo", + "Tiki": "Aumenta o número máximo de lacaios que você pode ter", + "Palladium": "Aumenta muito a regeneração de vida depois de atacar um inimigo", + "Orichalcum": "Pétalas cairão em seu alvo, causando danos extra", + "Titanium": "Fique imune depois de atacar um inimigo", + "Chlorophyte": "Invoca um poderoso cristal de folha para atirar em inimigos próximos", + "Wizard": "10% de aumento na chance de acerto crítico mágico", + "Meteor": "Arma espacial custa 0 de mana", + "SpectreHealing": "Os danos por magia causados aos inimigos curam o jogador com menos vida", + "Shroomite": "Ficar parado deixa você em modo sorrateiro,\naumentando o alcance de seus ataques e reduzindo a chance dos inimigos usarem você como alvo", + "Platinum": "4 de defesa", + "Pumpkin": "10% de aumento nos danos", + "Spooky": "Aumenta os danos causados por lacaios em 25%", + "SpectreDamage": "Os danos por magia atingirão inimigos próximos adicionais", + "MagicHat": "Aumenta a mana máxima em 60", + "BeetleDefense": "Os besouros protegem você contra danos", + "BeetleDamage": "Os besouros aumentam os seus danos por ataque físico e a sua velocidade", + "Bee": "Aumenta os danos causados por lacaios em 10%", + "Spider": "Aumenta os danos causados por lacaios em 12%", + "Vortex": "Toque duplo {0} para o modo sorrateiro,\naumentando o alcance de seus ataques e reduzindo a chance dos inimigos usarem você como alvo, mas desacelerando seus movimentos", + "Stardust": "Toque duplo {0} para direcionar um guardião até um dado local", + "Forbidden": "Toque duplo {0} para chamar uma tempestade antiga até o local do cursor", + "Jungle": "16% de redução no consumo de mana", + "Molten": "17% de danos extra por ataque físico", + "Mining": "30% de aumento na velocidade de minério", + "CobaltCaster": "14% de redução no consumo de mana", + "CobaltMelee": "15% de aumento na velocidade do ataque físico", + "ApprenticeTier2": "Aumenta o número máximo de sentinelas\nCampo de visão e alcance das Chamas Explosivas consideravelmente maior", + "ApprenticeTier3": "Aumenta o número máximo de sentinelas\nAumenta bastante a eficiência das Chamas Explosivas", + "HuntressTier2": "Aumenta o número máximo de sentinelas\nAs Armadilhas Explosivas recarregam mais rápido e cobrem os inimigos com óleo\nIncendeie inimigos com óleo para causar danos adicionais", + "HuntressTier3": "Aumenta o número máximo de sentinelas\nAumenta bastante a eficiência das Armadilhas Explosivas", + "MonkTier2": "Aumenta o número máximo de sentinelas\nA Aura de Relâmpagos agora pode causar danos críticos e ataca mais rapidamente", + "MonkTier3": "Aumenta o número máximo de sentinelas\nAumenta bastante a eficiência da Aura de Relâmpagos", + "SquireTier2": "Aumenta o número máximo de sentinelas\nA Balista perfura mais alvos e entra em pânico quando você sofre danos", + "SquireTier3": "Aumenta o número máximo de sentinelas\nAumenta bastante a eficiência da Balista" + }, + "BuffDescription": { + "AmmoBox": "20% de chance de não consumir munição", + "AmmoReservation": "20% de chance de não consumir munição", + "Archery": "20% de aumento nos danos e na velocidade das flechas", + "BabyDinosaur": "Um filhote de dinossauro está seguindo você", + "BabyEater": "Um filhote de Devorador de almas está seguindo você", + "BabyFaceMonster": "Um monstro cara de bebê está seguindo você", + "BabyGrinch": "Um filhote de grinch está seguindo você", + "BabyHornet": "Ele acha que você é sua mãe", + "BabyPenguin": "Eu acho que ele quer seus peixes", + "BabySkeletronHead": "Não me pergunte...", + "BabySlime": "O filhote de geleia vai lutar por você", + "BabySnowman": "Um filhote de boneco de neve está seguindo você", + "BabyTruffle": "Não é a coisa mais fofa do mundo?", + "BallistaPanic": "Suas balistas atiram rapidamente em pânico!", + "BasiliskMount": "Bate em qualquer um... e em TODOS!", + "Battle": "Taxa de criação de inimigos maior", + "BeeMount": "BzzzBzzBZZZZBzzz", + "BeetleEndurance1": "Danos sofridos reduzidos em 15%", + "BeetleEndurance2": "Redução de 30% nos danos sofridos", + "BeetleEndurance3": "Redução de 45% nos danos sofridos", + "BeetleMight1": "Aumento de 10% nos danos físicos e na velocidade", + "BeetleMight2": "Aumento de 20% nos danos físicos e na velocidade", + "BeetleMight3": "Danos físicos e velocidade aumentam em 30%", + "BetsysCurse": "Diminuição da defesa", + "Bewitched": "Aumenta o número máximo de lacaios", + "BlackCat": "Um gatinho preto está seguindo você", + "Blackout": "A visão da luz é extremamente reduzida", + "Bleeding": "Não é possível regenerar a vida", + "BoneJavelin": "Sangrando", + "BrokenArmor": "A defesa foi cortada pela metade", + "Builder": "Maior velocidade e alcance no posicionamento", + "BunnyMount": "Você está com desejo por cenouras", + "Burning": "Perde uma vida e tem os movimentos desacelerados", + "DesertMinecartRight": "{$BuffDescription.MinecartRight}", + "Campfire": "Regeneração de vida levemente maior", + "ChaosState": "Usar o Cajado da discórdia vai consumir sua vida", + "Chilled": "A velocidade de seus movimentos foi reduzida", + "Clairvoyance": "Os poderes mágicos ficam mais fortes", + "CompanionCube": "Nunca ameaçará esfaquear você e, na verdade, não é capaz de falar", + "Confused": "Os movimentos são invertidos", + "Crate": "Maior chance de pescar um caixote", + "CrimsonHeart": "Um coração mágico que fornece luz", + "Cursed": "Não é possível utilizar qualquer item", + "CursedInferno": "Perdendo vida", + "CursedSapling": "Uma plantinha amaldiçoada está seguindo você", + "CuteFishronMount": "Só não faça ele rastejar.", + "Dangersense": "Você pode ver ameaças próximas", + "Darkness": "Menor visão da luz", + "Daybreak": "Incinerado por raios solares", + "Dazed": "Os movimentos são desacelerados consideravelmente", + "DeadlySphere": "A Esfera Mortal lutará por você", + "DrillMount": "Andando em uma furadeira voadora", + "DryadsWard": "O poder da natureza protege você", + "DryadsWardDebuff": "O poder da natureza comanda você", + "Electrified": "Você não consegue se mexer", + "Endurance": "Redução de 10% nos danos", + "EyeballSpring": "Um olho saltitante está seguindo você", + "FairyBlue": "Uma fada vai seguir você", + "FairyGreen": "Uma fada vai seguir você", + "FairyRed": "Uma fada vai seguir você", + "Featherfall": "Pressione PARA CIMA ou PARA BAIXO para controlar a velocidade da descida", + "DesertMinecartLeft": "{$BuffDescription.MinecartLeft}", + "Flipper": "Mova-se normalmente embaixo d'água", + "Frostburn": "Ou está bem quente ou bem frio. De qualquer maneira, machuca MUITO", + "Frozen": "Você não pode mover-se!", + "Gills": "Respire água ao invés de ar", + "Gravitation": "Pressione PARA CIMA para reverter a gravidade", + "HeartLamp": "A regeneração de vida aumenta", + "Heartreach": "Maior alcance de coleta de corações", + "Honey": "A regeneração de vida aumentou", + "HornetMinion": "A vespa lutará por você", + "Horrified": "Você viu algo terrível, não há escapatória.", + "Hunter": "Exibe a localização dos inimigos", + "IceBarrier": "Redução de 25% nos danos sofridos", + "Ichor": "Defesa reduzida", + "ImpMinion": "O demônio lutará por você", + "Inferno": "Os inimigos próximos são incinerados", + "Invisibility": "Oferece invisibilidade", + "Ironskin": "Aumenta a defesa em 8", + "LeafCrystal": "Atira folhas de cristal em inimigos próximos", + "Lifeforce": "Aumento de 20% no máximo de vida", + "Lovestruck": "Você está apaixonado!", + "MagicLantern": "Uma lanterna encantada ilumina o seu caminho", + "MagicPower": "20% de aumento nos danos por magia", + "ManaRegeneration": "Maior regeneração de mana", + "ManaSickness": "Danos mágicos reduzidos em ", + "Merfolk": "É possível respirar e mover-se facilmente embaixo d'água", + "Midas": "Mais dinheiro é perdido se você morrer", + "MinecartLeft": "Andando em uma vagoneta", + "MinecartLeftMech": "Andando em uma vagoneta", + "MinecartLeftWood": "Andando em uma vagoneta", + "MinecartRight": "Andando em uma vagoneta", + "MinecartRightMech": "Andando em uma vagoneta", + "MinecartRightWood": "Andando em uma vagoneta", + "MiniMinotaur": "Como se derrota um mini Minotauro?", + "Mining": "Aumento de 25% na velocidade de minério", + "MonsterBanner": "Maiores danos e defesa contra:", + "MoonLeech": "Você não pode absorver efeitos de cura", + "NebulaUpDmg1": "Aumento de 15% nos danos", + "NebulaUpDmg2": "Aumento de 30% nos danos", + "NebulaUpDmg3": "Aumento de 45% nos danos", + "NebulaUpLife1": "Regeneração de vida maior", + "NebulaUpLife2": "Regeneração de vida maior", + "NebulaUpLife3": "Regeneração de vida maior", + "NebulaUpMana1": "Maior regeneração de mana", + "NebulaUpMana2": "Maior regeneração de mana", + "NebulaUpMana3": "Maior regeneração de mana", + "NightOwl": "Visão noturna maior", + "NoBuilding": "Você perdeu o poder de criação!", + "ObsidianSkin": "Imune a lava", + "Obstructed": "Você não consegue ver!", + "OgreSpit": "Movimentos consideravelmente reduzidos", + "Oiled": "Maiores danos por estar em chamas", + "OnFire": "Lentamente perdendo a vida", + "PaladinsShield": "25% de danos sofridos serão redirecionados a outro jogador", + "Panic": "A velocidade de movimentação aumenta", + "ParryDamageBuff": "Aumento de 500% nos danos para o próximo ataque físico", + "PeaceCandle": "Taxa de criação de monstros menor", + "PetBunny": "Acho que ele quer sua cenoura", + "PetDD2Dragon": "Um coleciodragão está seguindo você", + "PetDD2Gato": "Um gato de hélices está seguindo você", + "PetDD2Ghost": "Uma velinha está seguindo você", + "PetLizard": "Sossegado como uma lagartixa", + "FishMinecartRight": "{$BuffDescription.MinecartRight}", + "PetSapling": "Uma plantinha está seguindo você", + "PetSpider": "Uma aranha está seguindo você", + "PetTurtle": "Feliz hora da tartaruga!", + "PigronMount": "Agora você me vê...", + "PirateMinion": "O pirata lutará por você", + "Poisoned": "Lentamente perdendo a vida", + "PotionSickness": "Não é possível consumir itens de cura", + "Puppy": "Um filhote está seguindo você", + "Pygmies": "Os pigmeus lutarão por você", + "Rabies": "Danos maiores, regeneração de vida menor, causa efeitos de status", + "Rage": "Aumento de 10% na chance de acerto crítico", + "RapidHealing": "A regeneração de vida aumentou bastante", + "Ravens": "Os corvos atacarão seus inimigos", + "Regeneration": "Fornece regeneração da vida", + "Rudolph": "Andando na rena do nariz vermelho", + "ScutlixMount": "Pow Pow", + "ShadowDodge": "Você vai desviar do próximo ataque", + "ShadowFlame": "Perdendo vida", + "ShadowOrb": "Uma esfera mágica que fornece luz", + "SharknadoMinion": "O tornado de tubarões lutará por você", + "Sharpened": "Armas de ataque físico perfuram a blindagem", + "Shine": "Emitindo luz", + "Silenced": "Não é possível utilizar itens que requerem mana", + "Slimed": "Você é melequento e pegajoso", + "SlimeMount": "BOOOIIINNNG!", + "Slow": "A velocidade de movimentação é reduzida", + "SolarShield1": "Danos sofridos reduzidos em 30%, afasta inimigos ao sofrer danos", + "SolarShield2": "Danos sofridos reduzidos em 30%, afasta inimigos ao sofrer danos", + "SolarShield3": "Danos sofridos reduzidos em 30%, afasta inimigos ao sofrer danos", + "Sonar": "Você pode ver o que está mordendo seu anzol", + "SoulDrain": "Regeneração de vida maior", + "Spelunker": "Exibe a localização de tesouros e minério", + "SpiderMinion": "A aranha lutará por você", + "Squashling": "Uma abóbora está seguindo você", + "StardustDragonMinion": "O dragão de pó das estrelas protegerá você", + "StardustGuardianMinion": "O guardião de pó das estrelas protegerá você", + "StardustMinion": "A célula de pó das estrelas lutará por você", + "StardustMinionBleed": "sendo devorado por células", + "StarInBottle": "Maior regeneração de mana", + "Stinky": "Você está com um cheiro terrível", + "Stoned": "Você foi completamente petrificado!", + "Suffocation": "Perdendo vida", + "Summoning": "Aumenta o número máximo de lacaios", + "Sunflower": "Velocidade dos movimento maior e menor número de monstros", + "SuspiciousTentacle": "Um olho suspeito, capaz de gerar luz", + "Swiftness": "25% de aumento na velocidade dos movimentos", + "TheTongue": "A boca está sugando você", + "Thorns": "Atacantes também sofrem danos", + "TikiSpirit": "Um espírito amigável está seguindo você", + "Tipsy": "Maiores habilidades em ataques físicos, menor defesa", + "Titan": "Maior recuo", + "TurtleMount": "Devagar na terra, apressado no mar", + "TwinEyesMinion": "Os gêmeos lutarão por você", + "UFOMinion": "O OVNI lutará por você", + "UFOMount": "Ainda bem que você tinha um MAC", + "UnicornMount": "Corra ao ataque... fabuloso!", + "Venom": "Perdendo vida", + "VortexDebuff": "A gravidade é distorcida ao seu redor", + "Warmth": "Redução nos danos sofridos por fontes frias", + "WaterCandle": "Taxa de criação de monstros maior", + "WaterWalking": "Pressione PARA BAIXO para entrar na água", + "Weak": "As habilidades físicas sofrem queda", + "WeaponImbueConfetti": "Ataques físicos fazem com que confetes apareçam", + "WeaponImbueCursedFlames": "Ataques físicos fazem com que seus inimigos queimem com chamas amaldiçoadas", + "WeaponImbueFire": "Ataques físicos incendeiam seus inimigos", + "WeaponImbueGold": "Ataques físicos fazem com que seus inimigos deixem cair mais ouro", + "WeaponImbueIchor": "Ataques físicos diminuem as defesas dos inimigos", + "WeaponImbueNanites": "Ataques físicos confundem seus inimigos", + "WeaponImbuePoison": "Ataques físicos envenenam seus inimigos", + "WeaponImbueVenom": "Ataques físicos aplicam peçonha em seus alvos", + "Webbed": "Você está preso", + "FishMinecartLeft": "{$BuffDescription.MinecartLeft}", + "Werewolf": "As habilidades físicas são melhoradas", + "Wet": "Você está vazando água", + "WindPushed": "O vento move-se ao seu redor!", + "Wisp": "Uma luz fantasma está seguindo você", + "WitheredArmor": "Sua armadura caiu!", + "WitheredWeapon": "Seus ataques estão mais fracos!", + "Wrath": "10% de aumento nos danos", + "ZephyrFish": "Ele gosta de nadar ao seu redor", + "BeeMinecartRight": "{$BuffDescription.MinecartRight}", + "BeeMinecartLeft": "{$BuffDescription.MinecartLeft}", + "LadybugMinecartRight": "{$BuffDescription.MinecartRight}", + "LadybugMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PigronMinecartRight": "{$BuffDescription.MinecartRight}", + "PigronMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SunflowerMinecartRight": "{$BuffDescription.MinecartRight}", + "SunflowerMinecartLeft": "{$BuffDescription.MinecartLeft}", + "HellMinecartRight": "{$BuffDescription.MinecartRight}", + "HellMinecartLeft": "{$BuffDescription.MinecartLeft}", + "ShroomMinecartRight": "{$BuffDescription.MinecartRight}", + "ShroomMinecartLeft": "{$BuffDescription.MinecartLeft}", + "AmethystMinecartRight": "{$BuffDescription.MinecartRight}", + "AmethystMinecartLeft": "{$BuffDescription.MinecartLeft}", + "TopazMinecartRight": "{$BuffDescription.MinecartRight}", + "TopazMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SapphireMinecartRight": "{$BuffDescription.MinecartRight}", + "SapphireMinecartLeft": "{$BuffDescription.MinecartLeft}", + "EmeraldMinecartRight": "{$BuffDescription.MinecartRight}", + "EmeraldMinecartLeft": "{$BuffDescription.MinecartLeft}", + "RubyMinecartRight": "{$BuffDescription.MinecartRight}", + "RubyMinecartLeft": "{$BuffDescription.MinecartLeft}", + "DiamondMinecartRight": "{$BuffDescription.MinecartRight}", + "DiamondMinecartLeft": "{$BuffDescription.MinecartLeft}", + "AmberMinecartRight": "{$BuffDescription.MinecartRight}", + "AmberMinecartLeft": "{$BuffDescription.MinecartLeft}", + "BeetleMinecartRight": "{$BuffDescription.MinecartRight}", + "BeetleMinecartLeft": "{$BuffDescription.MinecartLeft}", + "MeowmereMinecartRight": "{$BuffDescription.MinecartRight}", + "MeowmereMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PartyMinecartRight": "{$BuffDescription.MinecartRight}", + "PartyMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PirateMinecartRight": "{$BuffDescription.MinecartRight}", + "PirateMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SteampunkMinecartRight": "{$BuffDescription.MinecartRight}", + "SteampunkMinecartLeft": "{$BuffDescription.MinecartLeft}", + "CoffinMinecartRight": "{$BuffDescription.MinecartRight}", + "CoffinMinecartLeft": "{$BuffDescription.MinecartLeft}" + }, + "BuffName": { + "AmmoBox": "Caixa de Munição", + "AmmoReservation": "Reserva de munição", + "Archery": "Arco e flecha", + "BabyDinosaur": "Filhote de dinossauro", + "BabyEater": "Devorador de Bebês", + "BabyFaceMonster": "Monstro Cara de Bebê", + "BabyGrinch": "Filhote de Grinch", + "BabyHornet": "Filhote de Vespa", + "BabyPenguin": "Filhote de pinguim", + "BabySkeletronHead": "Cabeça de Esqueletron Bebê", + "BabySlime": "Bebê de Geleia", + "BabySnowman": "Filhote de Boneco de Neve", + "BabyTruffle": "Filhote de trufa", + "BallistaPanic": "Balista em Pânico!", + "BasiliskMount": "Montaria do Basilisco", + "Battle": "Batalha", + "BeeMount": "Montaria da Abelha", + "BeetleEndurance1": "Resistência por besouros", + "BeetleEndurance2": "Resistência por besouros", + "BeetleEndurance3": "Resistência por besouros", + "BeetleMight1": "Poder dos besouros", + "BeetleMight2": "Poder dos besouros", + "BeetleMight3": "Poder dos besouros", + "BetsysCurse": "Maldição de Betsy", + "Bewitched": "Enfeitiçado", + "BlackCat": "Gato Preto", + "Blackout": "Apagão", + "Bleeding": "Sangrando", + "BoneJavelin": "Penetrado", + "BrokenArmor": "Armadura quebrada", + "Builder": "Construtor", + "BunnyMount": "Montaria de Coelho", + "Burning": "Queimando", + "Calm": "Calma", + "Campfire": "Fogo Aconchegante", + "ChaosState": "Estado de caos", + "Chilled": "Resfriado", + "Clairvoyance": "Clarividência", + "CompanionCube": "Cubo Companheiro", + "Confused": "Confuso", + "Crate": "Caixote", + "CrimsonHeart": "Coração de Carmesim", + "Cursed": "Amaldiçoado", + "CursedInferno": "Inferno amaldiçoado", + "CursedSapling": "Plantinha Amaldiçoada", + "CuteFishronMount": "Montaria do Peixe-dragão Fofinho", + "Dangersense": "Instinto-Perigo", + "Darkness": "Trevas", + "Daybreak": "Queimado pelo Sol", + "Dazed": "Atordoado", + "DeadlySphere": "Esfera Mortal", + "DrillMount": "Montaria de Furadeira", + "DryadsWard": "Bênção da Dríade", + "DryadsWardDebuff": "Maldição da Dríade", + "Electrified": "Eletrizado", + "Endurance": "Resistência", + "EyeballSpring": "Olho saltitante", + "FairyBlue": "Fada", + "FairyGreen": "Fada", + "FairyRed": "Fada", + "Featherfall": "Queda de penas", + "Fishing": "Pescaria", + "Flipper": "Nadadeira", + "Frostburn": "Queimadura de gelo", + "Frozen": "Congelado", + "Gills": "Guelras", + "Gravitation": "Gravitação", + "HeartLamp": "Lâmpada do coração", + "Heartreach": "Agarra-Corações", + "Honey": "Mel", + "HornetMinion": "Vespa", + "Horrified": "Aterrorizado", + "Hunter": "Caçador", + "IceBarrier": "Barreira de gelo", + "Ichor": "Ichor", + "ImpMinion": "Demônio", + "Inferno": "Inferno", + "Invisibility": "Invisibilidade", + "Ironskin": "Pele de ferro", + "LeafCrystal": "Cristal de folha", + "Lifeforce": "Força-Vital", + "Lovestruck": "Apaixonado", + "MagicLantern": "Lanterna Mágica", + "MagicPower": "Poder mágico", + "ManaRegeneration": "Restauração de mana", + "ManaSickness": "Enjoo por mana", + "Merfolk": "Habitantes do mar", + "Midas": "Midas", + "MinecartLeft": "Vagoneta", + "MinecartLeftMech": "Vagoneta", + "MinecartLeftWood": "Vagoneta", + "MinecartRight": "Vagoneta", + "MinecartRightMech": "Vagoneta", + "MinecartRightWood": "Vagoneta", + "MiniMinotaur": "Mini-Minotauro", + "Mining": "Mineração", + "MonsterBanner": "Bandeira", + "MoonLeech": "Mordida da Lua", + "NebulaUpDmg1": "Nébula de Danos", + "NebulaUpDmg2": "Nébula de Danos", + "NebulaUpDmg3": "Nébula de Danos", + "NebulaUpLife1": "Nébula da Vida", + "NebulaUpLife2": "Nébula da Vida", + "NebulaUpLife3": "Nébula da Vida", + "NebulaUpMana1": "Nébula de Mana", + "NebulaUpMana2": "Nébula de Mana", + "NebulaUpMana3": "Nébula de Mana", + "NightOwl": "Coruja da noite", + "NoBuilding": "Choque de Criatividade", + "ObsidianSkin": "Pele obsidiana", + "Obstructed": "Obstruído", + "OgreSpit": "Esvaído", + "Oiled": "Oleoso", + "OnFire": "Em chamas!", + "PaladinsShield": "Escudo do Paladino", + "Panic": "Pânico!", + "ParryDamageBuff": "Momento do Ataque", + "PeaceCandle": "Vela da Paz", + "PetBunny": "Coelhinho de estimação", + "PetDD2Dragon": "Coleciodragão", + "PetDD2Gato": "Gato de Hélices", + "PetDD2Ghost": "Velinha", + "PetLizard": "Lagarto de Estimação", + "PetParrot": "Papagaio de estimação", + "PetSapling": "Plantinha de estimação", + "PetSpider": "Aranha de estimação", + "PetTurtle": "Tartaruga de estimação", + "PigronMount": "Montaria do Porco-dragão", + "PirateMinion": "Pirata", + "Poisoned": "Envenenado", + "PotionSickness": "Enjoo por poção", + "Puppy": "Cachorrinho", + "Pygmies": "Pigmeus", + "Rabies": "Mordida Feroz", + "Rage": "Raiva", + "RapidHealing": "Cura rápida", + "Ravens": "Corvos", + "Regeneration": "Regeneração", + "Rudolph": "Rodolfo", + "ScutlixMount": "Montaria do Scutlix", + "DesertMinecartRight": "{$BuffName.MinecartRight}", + "ShadowFlame": "Chamas das Sombras", + "ShadowOrb": "Esfera das Sombras", + "SharknadoMinion": "Tornado de Tubarões", + "Sharpened": "Afiado", + "Shine": "Brilho", + "Silenced": "Silenciado", + "Slimed": "Geleia", + "SlimeMount": "Montaria da Geleia", + "Slow": "Lento", + "SolarShield1": "Fogo Solar", + "SolarShield2": "Fogo Solar", + "SolarShield3": "Fogo Solar", + "Sonar": "Sonar", + "SoulDrain": "Drenagem da Vida", + "Spelunker": "Espeleólogo", + "SpiderMinion": "Aranha", + "Squashling": "Abóbora", + "StardustDragonMinion": "Dragão de Pó das Estrelas", + "StardustGuardianMinion": "Guardião de Pó das Estrelas", + "StardustMinion": "Célula de Pó das Estrelas", + "StardustMinionBleed": "Celular", + "StarInBottle": "Estrela na Garrafa", + "Stinky": "Fedorento", + "Stoned": "Petrificado", + "Suffocation": "Asfixia", + "Summoning": "Invocação", + "Sunflower": "Feliz!", + "SuspiciousTentacle": "Olho Suspeito", + "Swiftness": "Rapidez", + "TheTongue": "A língua", + "Thorns": "Espinhos", + "TikiSpirit": "Espírito Tiki", + "Tipsy": "Tonto", + "Titan": "Titã", + "TurtleMount": "Montaria de Tartaruga", + "TwinEyesMinion": "Gêmeos", + "UFOMinion": "OVNI", + "UFOMount": "Montaria de OVNI", + "UnicornMount": "Montaria de Unicórnio", + "Venom": "Peçonha", + "VortexDebuff": "Distorcido", + "Warmth": "Calor", + "WaterCandle": "Vela d'água", + "WaterWalking": "Andar Sobre a Água", + "Weak": "Fraco", + "WeaponImbueConfetti": "Efeito da arma: Confetes", + "WeaponImbueCursedFlames": "Efeito da arma: Chamas Amaldiçoadas", + "WeaponImbueFire": "Efeito da arma: Fogo", + "WeaponImbueGold": "Efeito da arma: Ouro", + "WeaponImbueIchor": "Efeito da arma: Ichor", + "WeaponImbueNanites": "Efeito da arma: Nanobôs", + "WeaponImbuePoison": "Efeito da arma: Veneno", + "WeaponImbueVenom": "Efeito da arma: Peçonha", + "Webbed": "Preso", + "WellFed": "Bem alimentado", + "Werewolf": "Lobisomem", + "Wet": "Molhado", + "WindPushed": "Vento Poderoso", + "Wisp": "Luz Fantasma", + "WitheredArmor": "Armadura Ressecada", + "WitheredWeapon": "Arma Ressecada", + "Wrath": "Ira", + "ZephyrFish": "Peixe do Zéfiro", + "DesertMinecartLeft": "{$BuffName.MinecartLeft}", + "FishMinecartRight": "{$BuffName.MinecartRight}", + "FishMinecartLeft": "{$BuffName.MinecartLeft}", + "BeeMinecartRight": "{$BuffName.MinecartRight}", + "BeeMinecartLeft": "{$BuffName.MinecartLeft}", + "LadybugMinecartRight": "{$BuffName.MinecartRight}", + "LadybugMinecartLeft": "{$BuffName.MinecartLeft}", + "PigronMinecartRight": "{$BuffName.MinecartRight}", + "PigronMinecartLeft": "{$BuffName.MinecartLeft}", + "SunflowerMinecartRight": "{$BuffName.MinecartRight}", + "SunflowerMinecartLeft": "{$BuffName.MinecartLeft}", + "HellMinecartRight": "{$BuffName.MinecartRight}", + "HellMinecartLeft": "{$BuffName.MinecartLeft}", + "ShroomMinecartRight": "{$BuffName.MinecartRight}", + "ShroomMinecartLeft": "{$BuffName.MinecartLeft}", + "AmethystMinecartRight": "{$BuffName.MinecartRight}", + "AmethystMinecartLeft": "{$BuffName.MinecartLeft}", + "TopazMinecartRight": "{$BuffName.MinecartRight}", + "TopazMinecartLeft": "{$BuffName.MinecartLeft}", + "SapphireMinecartRight": "{$BuffName.MinecartRight}", + "SapphireMinecartLeft": "{$BuffName.MinecartLeft}", + "EmeraldMinecartRight": "{$BuffName.MinecartRight}", + "EmeraldMinecartLeft": "{$BuffName.MinecartLeft}", + "RubyMinecartRight": "{$BuffName.MinecartRight}", + "RubyMinecartLeft": "{$BuffName.MinecartLeft}", + "DiamondMinecartRight": "{$BuffName.MinecartRight}", + "DiamondMinecartLeft": "{$BuffName.MinecartLeft}", + "AmberMinecartRight": "{$BuffName.MinecartRight}", + "AmberMinecartLeft": "{$BuffName.MinecartLeft}", + "BeetleMinecartRight": "{$BuffName.MinecartRight}", + "BeetleMinecartLeft": "{$BuffName.MinecartLeft}", + "MeowmereMinecartRight": "{$BuffName.MinecartRight}", + "MeowmereMinecartLeft": "{$BuffName.MinecartLeft}", + "PartyMinecartRight": "{$BuffName.MinecartRight}", + "PartyMinecartLeft": "{$BuffName.MinecartLeft}", + "PirateMinecartRight": "{$BuffName.MinecartRight}", + "PirateMinecartLeft": "{$BuffName.MinecartLeft}", + "SteampunkMinecartRight": "{$BuffName.MinecartRight}", + "SteampunkMinecartLeft": "{$BuffName.MinecartLeft}", + "CoffinMinecartRight": "{$BuffName.MinecartRight}", + "CoffinMinecartLeft": "{$BuffName.MinecartLeft}" + }, + "MapObject": { + "Adamantite": "Adamantina", + "AnimalSkin": "Pele Animal", + "Anvil": "Bigorna", + "Banner": "Bandeira", + "BeeHive": "Colmeia", + "Chair": "Cadeira", + "Chandelier": "Lustre", + "Chlorophyte": "Clorofita", + "ChristmasLight": "Luz de Natal", + "Cobalt": "Cobalto", + "Copper": "Cobre", + "CrimsonAltar": "Altar de Carmesim", + "Crimtane": "Carmim", + "DemonAltar": "Altar Demoníaco", + "Demonite": "Demonita", + "Door": "Porta", + "DrippingHoney": "Pingos de Mel", + "DrippingLava": "Pingos de Lava", + "DrippingWater": "Pingos de Água", + "FloorLamp": "Lâmpada de chão", + "Fossil": "Fóssil", + "GiantMushroom": "Cogumelo Gigante", + "Gold": "Ouro", + "Iron": "Ferro", + "ItemRack": "Prateleira de Itens", + "Lantern": "Lanterna", + "Larva": "Larva", + "Lead": "Chumbo", + "LivingWood": "Madeira viva", + "MetalBar": "Barra de Metal", + "Mythril": "Mithril", + "OrangeSquirrelCage": "Gaiola do Esquilo Laranja", + "Orichalcum": "Oricalco", + "Painting": "Pintura", + "Palladium": "Paládio", + "PalmTree": "Palmeira", + "Picture": "Quadro", + "PineTree": "Pinheiro", + "PlanterasBulb": "Bulbo da Plantera", + "Platinum": "Platina", + "Pot": "Pote", + "Rocket": "Foguete", + "SandFlow": "Fluxo de Areia", + "Sapling": "Muda", + "SiltExtractinator": "Extrator de Logo", + "Silver": "Prata", + "Sink": "Pia", + "Statue": "Estátua", + "Table": "Mesa", + "Thorn": "Espinho", + "Thorns": "Espinhos", + "Timer": "Tempo", + "Tin": "Lata", + "Titanium": "Titânio", + "Trap": "Armadilha", + "Tree": "Árvore", + "Trophy": "Troféu", + "Tungsten": "Tungstênio", + "Turret": "Torre", + "Vase": "Vaso", + "WaterFountain": "Fonte de Água", + "Web": "Teia" + }, + "ChatCommand": { + "Playing_0": "{$LegacyMultiplayer.6}", + "Playing_1": "{$LegacyMultiplayer.21}", + "Roll": "{$LegacyMultiplayer.8}", + "Party": "/g", + "Emote": "/eu" + }, + "Bestiary_ItemDropConditions": { + "NotExpert": "", + "NotMasterMode": "", + "LegacyHack_IsBossAndNotExpert": "", + "IsCrimsonAndNotExpert": "", + "IsCorruptionAndNotExpert": "", + "NotFromStatue": "" + }, + "Bestiary_FlavorText": { + "npc_JungleSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_YellowSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_RedSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_PurpleSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_BlackSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_GreenSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_BlueSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_DemonEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_Zombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_Skeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_AngryBones": "{$CommonBestiaryFlavor.AngryBones}", + "npc_Hornet": "{$CommonBestiaryFlavor.Hornet}", + "npc_Hellbat": "{$CommonBestiaryFlavor.LavaBat}", + "npc_BlueJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_PinkJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_Mummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_DarkMummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_LightMummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_Mimic": "{$CommonBestiaryFlavor.Mimic}", + "npc_GreenJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_BaldZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_WanderingEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_Penguin": "{$CommonBestiaryFlavor.Penguin}", + "npc_PenguinBlack": "{$CommonBestiaryFlavor.Penguin}", + "npc_Lavabat": "{$CommonBestiaryFlavor.LavaBat}", + "npc_PigronCorruption": "{$CommonBestiaryFlavor.Pigron}", + "npc_PigronHallow": "{$CommonBestiaryFlavor.Pigron}", + "npc_PigronCrimson": "{$CommonBestiaryFlavor.Pigron}", + "npc_PincushionZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_SwampZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_TwiggyZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_CataractEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_SleepyEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_DialatedEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_GreenEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_PurpleEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_FemaleZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_HeadacheSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_MisassembledSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_PantlessSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_HornetFatty": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetHoney": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetLeafy": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetSpikey": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetStingy": "{$CommonBestiaryFlavor.Hornet}", + "npc_ZombieMushroom": "{$CommonBestiaryFlavor.MushroomZombie}", + "npc_ZombieMushroomHat": "{$CommonBestiaryFlavor.MushroomZombie}", + "npc_FungiBulb": "{$CommonBestiaryFlavor.FungiBulb}", + "npc_GiantFungiBulb": "{$CommonBestiaryFlavor.FungiBulb}", + "npc_RustyArmoredBonesAxe": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesFlail": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesSword": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesSwordNoArmor": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_BlueArmoredBones": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesMace": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesNoPants": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesSword": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_HellArmoredBones": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesSpikeShield": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesMace": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesSword": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_RaggedCaster": "{$CommonBestiaryFlavor.RaggedCaster}", + "npc_RaggedCasterOpenCoat": "{$CommonBestiaryFlavor.RaggedCaster}", + "npc_Necromancer": "{$CommonBestiaryFlavor.Necromancer}", + "npc_NecromancerArmored": "{$CommonBestiaryFlavor.Necromancer}", + "npc_DiabolistRed": "{$CommonBestiaryFlavor.Diabolist}", + "npc_DiabolistWhite": "{$CommonBestiaryFlavor.Diabolist}", + "npc_AngryBonesBig": "{$CommonBestiaryFlavor.AngryBones}", + "npc_AngryBonesBigMuscle": "{$CommonBestiaryFlavor.AngryBones}", + "npc_AngryBonesBigHelmet": "{$CommonBestiaryFlavor.AngryBones}", + "npc_Scarecrow1": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow2": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow3": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow4": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow5": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow6": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow7": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow8": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow9": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow10": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_DemonEyeOwl": "{$CommonBestiaryFlavor.CostumeDemonEye}", + "npc_DemonEyeSpaceship": "{$CommonBestiaryFlavor.CostumeDemonEye}", + "npc_ZombieDoctor": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_ZombieSuperman": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_ZombiePixie": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_SkeletonTopHat": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_SkeletonAstonaut": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_SkeletonAlien": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_ZombieXmas": "{$CommonBestiaryFlavor.ZombieXmas}", + "npc_ZombieSweater": "{$CommonBestiaryFlavor.ZombieXmas}", + "npc_SlimeRibbonWhite": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonYellow": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonGreen": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonRed": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_ZombieElf": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ZombieElfBeard": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ZombieElfGirl": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ArmedZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombiePincushion": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieSwamp": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieTwiggy": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieCenx": "{$CommonBestiaryFlavor.Zombie}", + "npc_GoldBird": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldBunny": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldButterfly": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldFrog": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldGrasshopper": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldMouse": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldWorm": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_BoneThrowingSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton2": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton3": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton4": "{$CommonBestiaryFlavor.Skeleton}", + "npc_GiantWalkingAntlion": "{$CommonBestiaryFlavor.AntlionCharger}", + "npc_GiantFlyingAntlion": "{$CommonBestiaryFlavor.AntlionSwarmer}", + "npc_DesertLamiaLight": "{$CommonBestiaryFlavor.Lamia}", + "npc_DesertLamiaDark": "{$CommonBestiaryFlavor.Lamia}", + "npc_SquirrelGold": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_SandShark": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkCorrupt": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkCrimson": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkHallow": "{$CommonBestiaryFlavor.Sandshark}", + "npc_WalkingAntlion": "{$CommonBestiaryFlavor.AntlionCharger}", + "npc_FlyingAntlion": "{$CommonBestiaryFlavor.AntlionSwarmer}", + "npc_GoldGoldfish": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldGoldfishWalker": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_BlackDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_BlueDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_GreenDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_OrangeDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_RedDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_YellowDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_GoldDragonfly": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldLadyBug": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldWaterStrider": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldSeahorse": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_IceMimic": "{$CommonBestiaryFlavor.Mimic}", + "npc_GemSquirrelAmethyst": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelTopaz": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelSapphire": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelEmerald": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelRuby": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelDiamond": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelAmber": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemBunnyAmethyst": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyTopaz": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnySapphire": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyEmerald": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyRuby": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyDiamond": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyAmber": "{$CommonBestiaryFlavor.GemBunny}" + } +} \ No newline at end of file diff --git a/Localization/Content/pt-BR/Items.json b/Localization/Content/pt-BR/Items.json new file mode 100644 index 0000000..508c8db --- /dev/null +++ b/Localization/Content/pt-BR/Items.json @@ -0,0 +1,5511 @@ +{ + "PaintingArtist": { + "Crowno": "'V. Costa Moura'", + "Garner": "'W. Garner'", + "Moosdijk": "'R. Moosdijk'", + "Lazure": "'J. Hayes'", + "Myhre": "'J. T. Myhre'", + "Burczyk": "'C. Burczyk'", + "Craig": "'A. Craig'", + "Kolf": "'A. G. Kolf'", + "Wright": "'K. Wright'", + "Phelps": "'D. Phelps'", + "Duncan": "'M. J. Duncan'", + "Ness": "'C. J. Ness'" + }, + "Prefix": { + "Dull": "(Fraco)", + "Unhappy": "(Infeliz)", + "Bulky": "(Volumoso)", + "Shameful": "(Vergonhoso)", + "Heavy": "(Pesado)", + "Light": "(Leve)", + "Sighted": "(Visto)", + "Rapid": "(Acelerado)", + "Hasty": "(Rápido)", + "Intimidating": "(Intimidador)", + "Large": "(Grande)", + "Deadly": "(Mortal)", + "Staunch": "(Convicto)", + "Awful": "(Terrível)", + "Lethargic": "(Letárgico)", + "Awkward": "(Estranho)", + "Powerful": "(Poderoso)", + "Mystic": "(Místico)", + "Adept": "(Adepto)", + "Masterful": "(Mestre)", + "Inept": "(Incapaz)", + "Massive": "(Enorme)", + "Ignorant": "(Ignorante)", + "Deranged": "(Demente)", + "Intense": "(Intenso)", + "Taboo": "(Tabu)", + "Celestial": "(Celestial)", + "Furious": "(Furioso)", + "Keen": "(Disposto)", + "Superior": "(Superior)", + "Forceful": "(Vigoroso)", + "Broken": "(Quebrado)", + "Dangerous": "(Perigoso)", + "Damaged": "(Danificado)", + "Shoddy": "(Pobre)", + "Quick": "(Rápido)", + "Deadly2": "(Mortal)", + "Agile": "(Ágil)", + "Nimble": "(Ligeiro)", + "Murderous": "(Assassino)", + "Slow": "(Lento)", + "Sluggish": "(Vagaroso)", + "Lazy": "(Preguiçoso)", + "Savage": "(Bárbaro)", + "Annoying": "(Irritante)", + "Nasty": "(Nojento)", + "Manic": "(Maníaco)", + "Hurtful": "(Doloroso)", + "Strong": "(Forte)", + "Unpleasant": "(Desagradável)", + "Weak": "(Fraco)", + "Ruthless": "(Implacável)", + "Frenzying": "(Enlouquecedor)", + "Godly": "(Divino)", + "Sharp": "(Afiado)", + "Demonic": "(Demoníaco)", + "Zealous": "(Zeloso)", + "Hard": "(Difícil)", + "Guarding": "(Protetor)", + "Armored": "(Blindado)", + "Warding": "(Vigia)", + "Arcane": "(Arcano)", + "Precise": "(Preciso)", + "Lucky": "(Sortudo)", + "Jagged": "(Dentado)", + "Pointy": "(Pontudo)", + "Spiked": "(Perfurante)", + "Angry": "(Raivoso)", + "Menacing": "(Ameaçador)", + "Brisk": "(Fugaz)", + "Fleeting": "(Apressado)", + "Hasty2": "(Precipitado)", + "Quick2": "(Rápido)", + "Wild": "(Selvagem)", + "Rash": "(Impetuoso)", + "Intrepid": "(Intrépido)", + "Tiny": "(Minúsculo)", + "Violent": "(Violento)", + "Legendary": "(Lendário)", + "Unreal": "(Surreal)", + "Mythical": "(Mítico)", + "Terrible": "(Terrível)", + "Small": "(Pequeno)" + }, + "ItemName": { + "IronPickaxe": "Picareta de Ferro", + "IronAxe": "Machado de Ferro", + "ShadowGreaves": "Grevas das Sombras", + "ConfettiGun": "Arma de Confetes", + "ChlorophyteMask": "Máscara de Clorofita", + "ChlorophyteHelmet": "Elmo de Clorofita", + "ChlorophyteHeadgear": "Capacete de Clorofita", + "ChlorophytePlateMail": "Armadura de Placas de Clorofita", + "ChlorophyteGreaves": "Grevas de Clorofita", + "ChlorophyteBar": "Barra de Clorofita", + "RedDye": "Tintura Vermelha", + "OrangeDye": "Tintura Laranja", + "YellowDye": "Tintura Amarela", + "ShadowScalemail": "Armadura de Placas das Sombras", + "LimeDye": "Tintura Verde-limão", + "GreenDye": "Tintura Verde", + "TealDye": "Tintura Verde Azulada", + "CyanDye": "Tintura Ciano", + "SkyBlueDye": "Tintura Azul Celeste", + "BlueDye": "Tintura Azul", + "PurpleDye": "Tintura Roxa", + "VioletDye": "Tintura Violeta", + "PinkDye": "Tintura Cor-de-rosa", + "RedandBlackDye": "Tintura Vermelha e Preta", + "ShadowHelmet": "Elmo das Sombras", + "OrangeandBlackDye": "Tintura Laranja e Preta", + "YellowandBlackDye": "Tintura Amarela e Preta", + "LimeandBlackDye": "Tintura Verde-limão e Preta", + "GreenandBlackDye": "Tintura Verde e Preta", + "TealandBlackDye": "Tintura Verde Azulada e Preta", + "CyanandBlackDye": "Tintura Ciano e Preta", + "SkyBlueandBlackDye": "Tintura Azul Celeste e Preta", + "BlueandBlackDye": "Tintura Azul e Preta", + "PurpleandBlackDye": "Tintura Roxa e Preta", + "VioletandBlackDye": "Tintura Violeta e Preta", + "NightmarePickaxe": "Picareta de Pesadelos", + "PinkandBlackDye": "Tintura Cor-de-rosa e Preta", + "FlameDye": "Tintura de Chamas", + "FlameAndBlackDye": "Tintura de Chamas e Preta", + "GreenFlameDye": "Tintura de Chamas Verdes", + "GreenFlameAndBlackDye": "Tintura de Chamas Verdes e Preta", + "BlueFlameDye": "Tintura de Chamas Azuis", + "BlueFlameAndBlackDye": "Tintura de Chamas Azuis e Preta", + "SilverDye": "Tintura Prata", + "BrightRedDye": "Tintura Vermelha Brilhante", + "BrightOrangeDye": "Tintura Laranja Brilhante", + "TheBreaker": "O Batedor", + "BrightYellowDye": "Tintura Amarela Brilhante", + "BrightLimeDye": "Tintura Verde-limão Brilhante", + "BrightGreenDye": "Tintura Verde Brilhante", + "BrightTealDye": "Tintura Verde Azulada Brilhante", + "BrightCyanDye": "Tintura Ciano Brilhante", + "BrightSkyBlueDye": "Tintura Azul Celeste Brilhante", + "BrightBlueDye": "Tintura Azul Brilhante", + "BrightPurpleDye": "Tintura Roxa Brilhante", + "BrightVioletDye": "Tintura Violeta Brilhante", + "BrightPinkDye": "Tintura Cor-de-rosa Brilhante", + "Candle": "Vela", + "BlackDye": "Tintura Preta", + "RedandSilverDye": "Tintura Vermelha e Prata", + "OrangeandSilverDye": "Tintura Laranja e Prata", + "YellowandSilverDye": "Tintura Amarela e Prata", + "LimeandSilverDye": "Tintura Verde-limão e Prata", + "GreenandSilverDye": "Tintura Verde e Prata", + "TealandSilverDye": "Tintura Verde Azulada e Prata", + "CyanandSilverDye": "Tintura Ciano e Prata", + "SkyBlueandSilverDye": "Tintura Azul Celeste e Prata", + "BlueandSilverDye": "Tintura Azul e Prata", + "CopperChandelier": "Lustre de Cobre", + "PurpleandSilverDye": "Tintura Roxa e Prata", + "VioletandSilverDye": "Tintura Violeta e Prata", + "PinkandSilverDye": "Tintura Cor-de-rosa e Prata", + "IntenseFlameDye": "Tintura de Chamas Intensas", + "IntenseGreenFlameDye": "Tintura de Chamas Verdes Intensas", + "IntenseBlueFlameDye": "Tintura de Chamas Azuis Intensas", + "RainbowDye": "Tintura de Arco-íris", + "IntenseRainbowDye": "Tintura de Arco-íris Intenso", + "YellowGradientDye": "Tintura de Gradiente Amarelo", + "CyanGradientDye": "Tintura de Gradiente Ciano", + "SilverChandelier": "Lustre de Prata", + "VioletGradientDye": "Tintura de Gradiente Violeta", + "Paintbrush": "Pincel", + "PaintRoller": "Rolo para Pintar", + "RedPaint": "Tinta Vermelha", + "OrangePaint": "Tinta Laranja", + "YellowPaint": "Tinta Amarela", + "LimePaint": "Tinta Verde-limão", + "GreenPaint": "Tinta Verde", + "TealPaint": "Tinta Verde Azulada", + "CyanPaint": "Tinta Ciano", + "GoldChandelier": "Lustre de Ouro", + "SkyBluePaint": "Tinta Azul Celeste", + "BluePaint": "Tinta Azul", + "PurplePaint": "Tinta Roxa", + "VioletPaint": "Tinta Violeta", + "PinkPaint": "Tinta Cor-de-rosa", + "DeepRedPaint": "Tinta Vermelho Escuro", + "DeepOrangePaint": "Tinta Laranja Escuro", + "DeepYellowPaint": "Tinta Amarelo Escuro", + "DeepLimePaint": "Tinta Verde-limão Escuro", + "DeepGreenPaint": "Tinta Verde Escuro", + "ManaCrystal": "Cristal de Mana", + "DeepTealPaint": "Tinta Verde Azulado Escuro", + "DeepCyanPaint": "Tinta Ciano Escuro", + "DeepSkyBluePaint": "Tinta Azul Celeste Escuro", + "DeepBluePaint": "Tinta Azul Escuro", + "DeepPurplePaint": "Tinta Roxo Escuro", + "DeepVioletPaint": "Tinta Violeta Escuro", + "DeepPinkPaint": "Tinta Cor-de-rosa Escuro", + "BlackPaint": "Tinta Preta", + "WhitePaint": "Tinta Branca", + "GrayPaint": "Tinta Cinza", + "IronOre": "Minério de Ferro", + "LesserManaPotion": "Poção de Mana Simples", + "PaintScraper": "Removedor de Tinta", + "LihzahrdBrick": "Tijolo Lagharto", + "LihzahrdBrickWall": "Parede de Tijolo Lagharto", + "SlushBlock": "Bloco de Lama", + "PalladiumOre": "Minério de Paládio", + "OrichalcumOre": "Minério de Oricalco", + "TitaniumOre": "Minério de Titânio", + "TealMushroom": "Cogumelo Verde Azulado", + "GreenMushroom": "Cogumelo Verde", + "SkyBlueFlower": "Flor Azul Celeste", + "BandofStarpower": "Pulseira do Poder das Estrelas", + "YellowMarigold": "Calêndula Amarela", + "BlueBerries": "Mirtilos", + "LimeKelp": "Algas Verde-limão", + "PinkPricklyPear": "Figo Cor-de-rosa", + "OrangeBloodroot": "Sanguinária Laranja", + "RedHusk": "Casca Vermelha", + "CyanHusk": "Casca Ciano", + "VioletHusk": "Casca Violeta", + "BlackInk": "Tinta Preta", + "FlowerofFire": "Flor de Fogo", + "DyeVat": "Máquina de Tinturas", + "BeeGun": "Pistola de Abelhas", + "PossessedHatchet": "Machadinha Possuída", + "BeeKeeper": "Mestre das Abelhas", + "Hive": "Colmeia", + "HoneyBlock": "Bloco de Mel", + "HiveWall": "Parede de Colmeias", + "CrispyHoneyBlock": "Bloco de Mel Torrado", + "HoneyBucket": "Balde de Mel", + "HiveWand": "Varinha de Favo", + "MagicMissile": "Míssil Mágico", + "Beenade": "Granada de Abelhas", + "GravityGlobe": "Globo da Gravidade", + "HoneyComb": "Favo de Mel", + "Abeemination": "Abelhominação", + "BottledHoney": "Mel Engarrafado", + "RainHat": "Chapéu de Chuva", + "RainCoat": "Capa de Chuva", + "LihzahrdDoor": "Porta Lagharto", + "DungeonDoor": "Porta do Calabouço", + "LeadDoor": "Porta de Chumbo", + "DirtRod": "Bastão de Terra", + "IronDoor": "Porta de Ferro", + "TempleKey": "Chave do Templo", + "LihzahrdChest": "Baú Lagharto", + "LihzahrdChair": "Cadeira Lagharto", + "LihzahrdTable": "Mesa Lagharto", + "LihzahrdWorkBench": "Bancada de Trabalho Lagharto", + "SuperDartTrap": "Super Armadilha de Dardos", + "FlameTrap": "Armadilha de Chamas", + "SpikyBallTrap": "Armadilha de Bolas com Espinhos", + "SpearTrap": "Armadilha de Lanças", + "ShadowOrb": "Esfera das Sombras", + "WoodenSpike": "Espeto de Madeira", + "LihzahrdPressurePlate": "Placa de Pressão Lagharto", + "LihzahrdStatue": "Estátua Lagharto", + "LihzahrdWatcherStatue": "Estátua do Observador Lagharto", + "LihzahrdGuardianStatue": "Estátua do Guardião Lagharto", + "WaspGun": "Pistola de Vespas", + "PiranhaGun": "Pistola de Piranhas", + "PygmyStaff": "Cajado Pigmeu", + "PygmyNecklace": "Colar Pigmeu", + "TikiMask": "Máscara Tiki", + "Meteorite": "Meteorito", + "TikiShirt": "Camisa Tiki", + "TikiPants": "Calça Tiki", + "LeafWings": "Asas de Folhas", + "BlizzardinaBalloon": "Nevasca no Balão", + "BundleofBalloons": "Monte de Balões", + "BatWings": "Asas de Morcego", + "BoneSword": "Espada de Osso", + "HerculesBeetle": "Besouro de Hércules", + "SmokeBomb": "Bomba de Fumaça", + "BoneKey": "Chave de Osso", + "MeteoriteBar": "Barra de Meteoritos", + "Nectar": "Néctar", + "TikiTotem": "Totem Tiki", + "LizardEgg": "Ovo de Lagarto", + "GraveMarker": "Marcador de Cova", + "CrossGraveMarker": "Marcador de Cova com Cruz", + "Headstone": "Lápide com Cruz", + "Gravestone": "Lápide com Cruz Grande", + "Obelisk": "Obelisco", + "LeafBlower": "Soprador de Folhas", + "ChlorophyteBullet": "Projétil de Clorofita", + "Hook": "Gancho", + "ParrotCracker": "Bolacha para Papagaio", + "StrangeGlowingMushroom": "Cogumelo de Brilho Estranho", + "Seedling": "Muda", + "WispinaBottle": "Fantasma na Garrafa", + "PalladiumBar": "Barra de Paládio", + "PalladiumSword": "Espada de Paládio", + "PalladiumPike": "Pique de Paládio", + "PalladiumRepeater": "Repetidora de Paládio", + "PalladiumPickaxe": "Picareta de Paládio", + "PalladiumDrill": "Furadeira de Paládio", + "Flamarang": "Bumerangue Flamejante", + "PalladiumChainsaw": "Serra Elétrica de Paládio", + "OrichalcumBar": "Barra de Oricalco", + "OrichalcumSword": "Espada de Oricalco", + "OrichalcumHalberd": "Alabarda de Oricalco", + "OrichalcumRepeater": "Repetidora de Oricalco", + "OrichalcumPickaxe": "Picareta de Oricalco", + "OrichalcumDrill": "Furadeira de Oricalco", + "OrichalcumChainsaw": "Serra Elétrica de Oricalco", + "TitaniumBar": "Barra de Titânio", + "TitaniumSword": "Espada de Titânio", + "CopperOre": "Minério de Cobre", + "MoltenFury": "Minério de Ferro", + "TitaniumTrident": "Tridente de Titânio", + "TitaniumRepeater": "Repetidora de Titânio", + "TitaniumPickaxe": "Picareta de Titânio", + "TitaniumDrill": "Furadeira de Titânio", + "TitaniumChainsaw": "Serra-elétrica de Titânio", + "PalladiumMask": "Máscara de Paládio", + "PalladiumHelmet": "Elmo de Paládio", + "PalladiumHeadgear": "Capacete de Paládio", + "PalladiumBreastplate": "Peitoral de Paládio", + "PalladiumLeggings": "Calças de Paládio", + "FieryGreatsword": "Fúria Derretida", + "OrichalcumMask": "Máscara de Pricalco", + "OrichalcumHelmet": "Elmo de Oricalco", + "OrichalcumHeadgear": "Capacete de Oricalco", + "OrichalcumBreastplate": "Peitoral de Oricalco", + "OrichalcumLeggings": "Calças de Oricalco", + "TitaniumMask": "Máscara de Titânio", + "TitaniumHelmet": "Elmo de Titânio", + "TitaniumHeadgear": "Capacete de Titânio", + "TitaniumBreastplate": "Peitoral de Titânio", + "TitaniumLeggings": "Calças de Titânio", + "MoltenPickaxe": "Picareta Derretida", + "OrichalcumAnvil": "Bigorna de Oricalco", + "TitaniumForge": "Forja de Titânio", + "PalladiumWaraxe": "Machado de Guerra de Paládio", + "OrichalcumWaraxe": "Machado de Guerra de Oricalco", + "TitaniumWaraxe": "Machado de Guerra de Titânio", + "HallowedBar": "Barra Consagrada", + "ChlorophyteClaymore": "Claymore de Clorofita", + "ChlorophyteSaber": "Sabre de Clorofita", + "ChlorophytePartisan": "Partisan de Clorofita", + "ChlorophyteShotbow": "Besta de Clorofita", + "MeteorHelmet": "Elmo de Meteoro", + "ChlorophytePickaxe": "Picareta de Clorofita", + "ChlorophyteDrill": "Furadeira de Clorofita", + "ChlorophyteChainsaw": "Serra-elétrica de Clorofita", + "ChlorophyteGreataxe": "Machado Grande de Clorofita", + "ChlorophyteWarhammer": "Martelo de Guerra de Clorofita", + "ChlorophyteArrow": "Flecha de Clorofita", + "AmethystHook": "Gancho de Ametista", + "TopazHook": "Gancho de Topázio", + "SapphireHook": "Gancho de Safira", + "EmeraldHook": "Gancho de Esmeralda", + "MeteorSuit": "Armadura do Meteoro", + "RubyHook": "Gancho de Rubi", + "DiamondHook": "Gancho de Diamante", + "AmberMosquito": "Mosquito Fossilizado", + "UmbrellaHat": "Chapéu Guarda-chuva", + "NimbusRod": "Varinha Nebulosa", + "OrangeTorch": "Tocha Laranja", + "CrimsandBlock": "Bloco de Areia Vermelha", + "BeeCloak": "Manto de Abelhas", + "EyeoftheGolem": "Olho do Golem", + "HoneyBalloon": "Balão de Mel", + "MeteorLeggings": "Calças de Meteoro", + "BlueHorseshoeBalloon": "Balão da Ferradura Azul", + "WhiteHorseshoeBalloon": "Balão da Ferradura Branca", + "YellowHorseshoeBalloon": "Balão da Ferradura Amarela", + "FrozenTurtleShell": "Casco de Tartaruga Congelada", + "SniperRifle": "Fuzil de Longo Alcance", + "VenusMagnum": "Magnum de Vênus", + "CrimsonRod": "Varinha de Carmim", + "CrimtaneBar": "Barra de Carmim", + "Stynger": "Ferroada", + "FlowerPow": "Poder das Flores", + "BottledWater": "Água Engarrafada", + "RainbowGun": "Pistola de Arco-íris", + "StyngerBolt": "Raio Perfurante", + "ChlorophyteJackhammer": "Britadeira de Clorofita", + "Teleporter": "Teleporte", + "FlowerofFrost": "Flor de Gelo", + "Uzi": "Uzi", + "MagnetSphere": "Esfera Magnética", + "PurpleStainedGlass": "Vitral Roxo", + "YellowStainedGlass": "Vitral Amarelo", + "BlueStainedGlass": "Vitral Azul", + "SpaceGun": "Arma Espacial", + "GreenStainedGlass": "Vitral Verde", + "RedStainedGlass": "Vitral Vermelho", + "MulticoloredStainedGlass": "Vitral Colorido", + "SkeletronHand": "Mão de Esqueletron", + "Skull": "Caveira", + "BallaHat": "Chapéu de Malandro", + "GangstaHat": "Chapéu de Gangster", + "SailorHat": "Chapéu de Marinheiro", + "EyePatch": "Tapa-olho", + "SailorShirt": "Camisa de Marinheiro", + "RocketBoots": "Botas Foguete", + "SailorPants": "Calça de Marinheiro", + "SkeletronMask": "Máscara de Esqueletron", + "AmethystRobe": "Roupão Ametista", + "TopazRobe": "Roupão Topázio", + "SapphireRobe": "Roupão Safira", + "EmeraldRobe": "Roupão Esmeralda", + "RubyRobe": "Roupão Rubi", + "DiamondRobe": "Roupão Diamante", + "WhiteTuxedoShirt": "Camisa de Smoking Branca", + "WhiteTuxedoPants": "Calça de Smoking Branca", + "GrayBrick": "Tijolo Cinza", + "PanicNecklace": "Colar do Pânico", + "LifeFruit": "Fruta da Vida", + "LihzahrdAltar": "Altar Lagharto", + "LihzahrdPowerCell": "Bateria Lagharto", + "Picksaw": "Picareta Serrada", + "HeatRay": "Raio de Calor", + "StaffofEarth": "Cajado da Terra", + "GolemFist": "Punho de Golem", + "WaterChest": "Baú d'água", + "Binoculars": "Binóculos", + "GoldOre": "Minério de Ouro", + "GrayBrickWall": "Parede de Tijolos Cinzas", + "RifleScope": "Luneta do Fuzil", + "DestroyerEmblem": "Emblema do Destruidor", + "HighVelocityBullet": "Projétil de Alta Velocidade", + "JellyfishNecklace": "Colar de Água-viva", + "ZombieArm": "Braço de Zumbi", + "TheAxe": "O Machado", + "IceSickle": "Foice de Gelo", + "ClothierVoodooDoll": "Boneco de Vodu do Alfaiate", + "PoisonStaff": "Cajado Venenoso", + "SlimeStaff": "Cajado da Geleia", + "RedBrick": "Tijolo Vermelho", + "PoisonDart": "Dardo Envenenado", + "EyeSpring": "Olho com Mola", + "ToySled": "Trenó de Brinquedo", + "BookofSkulls": "Livro de Caveiras", + "KOCannon": "Canhão Nocaute", + "PirateMap": "Mapa Pirata", + "TurtleHelmet": "Elmo de Tartaruga", + "TurtleScaleMail": "Armadura de Malha de Tartaruga", + "TurtleLeggings": "Calças de Tartaruga", + "SnowballCannon": "Canhão de Bolas de Neve", + "RedBrickWall": "Parede de Tijolos Vermelhos", + "BonePickaxe": "Picareta de Osso", + "MagicQuiver": "Aljava Mágica", + "MagmaStone": "Pedra de Magma", + "ObsidianRose": "Rosa de Obsidiana", + "Bananarang": "Bananarangue", + "ChainKnife": "Faca com Corrente", + "RodofDiscord": "Cajado da Discórdia", + "DeathSickle": "Foice da Morte", + "TurtleShell": "Casco de Tartaruga", + "TissueSample": "Amostra de Tecido", + "ClayBlock": "Bloco de Argila", + "Vertebrae": "Vértebra", + "BloodySpine": "Espinha Sangrenta", + "Ichor": "Ichor", + "IchorTorch": "Tocha de Ichor", + "IchorArrow": "Flecha de Ichor", + "IchorBullet": "Projétil de Ichor", + "GoldenShower": "Chuveiro Dourado", + "BunnyCannon": "Canhão de Coelhinhos", + "ExplosiveBunny": "Coelhinho Explosivo", + "VialofVenom": "Ampola de Veneno", + "BlueBrick": "Tijolo Azul", + "FlaskofVenom": "Frasco com Veneno", + "VenomArrow": "Flecha com Veneno", + "VenomBullet": "Projétil com Veneno", + "FireGauntlet": "Manopla de Fogo", + "Cog": "Engrenagem", + "Confetti": "Confetes", + "Nanites": "Nanobôs", + "ExplosivePowder": "Pó Explosivo", + "GoldDust": "Pó de Ouro", + "PartyBullet": "Projétil de Festa", + "BlueBrickWall": "Parede de Tijolos Azuis", + "NanoBullet": "Nano-Projétil", + "ExplodingBullet": "Projétil Explosivo", + "GoldenBullet": "Projétil Dourado", + "FlaskofCursedFlames": "Frasco de Chamas Amaldiçoadas", + "FlaskofFire": "Frasco de Fogo", + "FlaskofGold": "Frasco de Ouro", + "FlaskofIchor": "Frasco de Ichor", + "FlaskofNanites": "Frasco de Nanobôs", + "FlaskofParty": "Frasco de Festa", + "FlaskofPoison": "Frasco de Veneno", + "ChainLantern": "Lanterna com Corrente", + "EyeofCthulhuTrophy": "Troféu do Olho de Cthulhu", + "EaterofWorldsTrophy": "Troféu do Devorador de Mundos", + "BrainofCthulhuTrophy": "Troféu do Cérebro de Cthulhu", + "SkeletronTrophy": "Troféu de Esqueletron", + "QueenBeeTrophy": "Troféu da Abelha Rainha", + "WallofFleshTrophy": "Troféu da Parede de Carne", + "DestroyerTrophy": "Troféu do Destruidor", + "SkeletronPrimeTrophy": "Troféu de Esqueletron Alfa", + "RetinazerTrophy": "Troféu do Retinaser", + "SpazmatismTrophy": "Troféu do Spazmatismo", + "GreenBrick": "Tijolo Verde", + "PlanteraTrophy": "Troféu da Plantera", + "GolemTrophy": "Troféu do Golem", + "BloodMoonRising": "O Nascer da Lua de Sangue", + "TheHangedMan": "O Homem Enforcado", + "GloryoftheFire": "A Glória do Fogo", + "BoneWarp": "Osso Torto", + "WallSkeleton": "Esqueleto na Parede", + "HangingSkeleton": "Esqueleto Pendurado", + "BlueSlabWall": "Parede de Placas Azuis", + "BlueTiledWall": "Parede de Lajes Azuis", + "GreenBrickWall": "Parede de Tijolos Verdes", + "PinkSlabWall": "Parede de Placas Cor-de-rosa", + "PinkTiledWall": "Parede de Lajes Cor-de-rosa", + "GreenSlabWall": "Parede de Placas Verdes", + "GreenTiledWall": "Parede de Lajes Verdes", + "BlueBrickPlatform": "Plataforma de Tijolos Azuis", + "PinkBrickPlatform": "Plataforma de Tijolos Cor-de-rosa", + "GreenBrickPlatform": "Plataforma de Tijolos Verdes", + "MetalShelf": "Prateleira de Metal", + "BrassShelf": "Prateleira de Latão", + "WoodShelf": "Prateleira de Madeira", + "PinkBrick": "Tijolo Cor-de-rosa", + "BrassLantern": "Lanterna de Latão", + "CagedLantern": "Lanterna com Grade", + "CarriageLantern": "Lanterna Pendurada", + "AlchemyLantern": "Lanterna de Alquimia", + "DiablostLamp": "Lâmpada do Satanista", + "BlueDungeonChair": "Cadeira de Calabouço Azul", + "BlueDungeonTable": "Mesa de Calabouço Azul", + "BlueDungeonWorkBench": "Bancada de Trabalho de Calabouço Azul", + "GreenDungeonChair": "Cadeira de Calabouço Verde", + "SilverOre": "Minério de Prata", + "PinkBrickWall": "Parede de Tijolos Cor-de-rosa", + "GreenDungeonTable": "Mesa de Calabouço Verde", + "GreenDungeonWorkBench": "Bancada de Trabalho de Calabouço Verde", + "PinkDungeonChair": "Cadeira de Calabouço Cor-de-rosa", + "PinkDungeonTable": "Mesa de Calabouço Cor-de-rosa", + "PinkDungeonWorkBench": "Bancada de Trabalho de Calabouço Cor-de-rosa", + "BlueDungeonCandle": "Vela de Calabouço Azul", + "GreenDungeonCandle": "Vela de Calabouço Verde", + "PinkDungeonCandle": "Vela de Calabouço Cor-de-rosa", + "BlueDungeonVase": "Vaso de Calabouço Azul", + "GreenDungeonVase": "Vaso de Calabouço Verde", + "GoldBrick": "Tijolo de Ouro", + "PinkDungeonVase": "Vaso de Calabouço Cor-de-rosa", + "BlueDungeonDoor": "Porta de Calabouço Azul", + "GreenDungeonDoor": "Porta de Calabouço Verde", + "PinkDungeonDoor": "Porta de Calabouço Cor-de-rosa", + "BlueDungeonBookcase": "Estante de Calabouço Azul", + "GreenDungeonBookcase": "Estante de Calabouço Verde", + "PinkDungeonBookcase": "Estante de Calabouço Cor-de-rosa", + "Catacomb": "Catacumba", + "DungeonShelf": "Prateleira de Calabouço", + "SkellingtonJSkellingsworth": "Esqueluciano J. Esquelelima", + "GoldBrickWall": "Parede de Tijolos de Ouro", + "TheCursedMan": "O Homem Amaldiçoado", + "TheEyeSeestheEnd": "O Olho Vê o Fim", + "SomethingEvilisWatchingYou": "Algo Mal Está Olhando Para Você", + "TheTwinsHaveAwoken": "Os Gêmeos Acordaram", + "TheScreamer": "O Grito", + "GoblinsPlayingPoker": "Goblins Jogando Pôquer", + "Dryadisque": "Dryadisque", + "Sunflowers": "Girassóis", + "TerrarianGothic": "Gótico de Terraria", + "Beanie": "Gorro", + "SilverBrick": "Tijolo de Prata", + "ImbuingStation": "Estação de Impregnação", + "StarinaBottle": "Estrela na Garrafa", + "EmptyBullet": "Projétil Vazio", + "Impact": "Impacto", + "PoweredbyBirds": "Com Energia de Pássaros", + "TheDestroyer": "O Destruidor", + "ThePersistencyofEyes": "A Persistência dos Olhos", + "UnicornCrossingtheHallows": "Unicórnio Atravessando a Terra Consagrada", + "GreatWave": "Grande Onda", + "StarryNight": "Noite Estrelada", + "SilverBrickWall": "Parede de Tijolos de Prata", + "GuidePicasso": "O Guia de Picasso", + "TheGuardiansGaze": "O Olhar do Guardião", + "FatherofSomeone": "O Pai de Alguém", + "NurseLisa": "A Enfermeira Lisa", + "ShadowbeamStaff": "Cajado do Feixe das Sombras", + "InfernoFork": "Garfo do Inferno", + "SpectreStaff": "Cajado dos Espectros", + "WoodenFence": "Cerca de Madeira", + "LeadFence": "Cerca de Chumbo", + "BubbleMachine": "Máquina de Bolhas", + "CopperBrick": "Tijolo de Cobre", + "BubbleWand": "Varinha de Bolhas", + "MarchingBonesBanner": "Bandeira de Ossos em Marcha", + "NecromanticSign": "Placa do Necromancer", + "RustedCompanyStandard": "Estandarte da Companhia Enferrujada", + "RaggedBrotherhoodSigil": "Símbolo da Irmandade dos Trapos", + "MoltenLegionFlag": "Bandeira da Legião Derretida", + "DiabolicSigil": "Símbolo Diabólico", + "ObsidianPlatform": "Plataforma de Obsidiana", + "ObsidianDoor": "Porta de Obsidiana", + "ObsidianChair": "Cadeira de Obsidiana", + "CopperBrickWall": "Parede de Tijolos de Cobre", + "ObsidianTable": "Mesa de Obsidiana", + "ObsidianWorkBench": "Bancada de Trabalho de Obsidiana", + "ObsidianVase": "Vaso de Obsidiana", + "ObsidianBookcase": "Estante de Obsidiana", + "HellboundBanner": "Bandeira Infernal", + "HellHammerBanner": "Bandeira do Martelo Infernal", + "HelltowerBanner": "Bandeira da Torre Infernal", + "LostHopesofManBanner": "Bandeira da Esperança Perdida dos Homens", + "ObsidianWatcherBanner": "Bandeira do Observador de Obsidiana", + "LavaEruptsBanner": "Bandeira da Erupção de Lava", + "Spike": "Espinho", + "BlueDungeonBed": "Cama de Calabouço Azul", + "GreenDungeonBed": "Cama de Calabouço Verde", + "PinkDungeonBed": "Cama de Calabouço Cor-de-rosa", + "ObsidianBed": "Cama de Obsidiana", + "Waldo": "Wally", + "Darkness": "Trevas", + "DarkSoulReaper": "Destruidor de Almas Sombrio", + "Land": "Terra", + "TrappedGhost": "Fantasma Preso", + "DemonsEye": "Olho do Demônio", + "WaterCandle": "Vela d'água", + "FindingGold": "Encontrando Ouro", + "FirstEncounter": "Primeiro Encontro", + "GoodMorning": "Bom Dia", + "UndergroundReward": "Recompensa Subterrânea", + "ThroughtheWindow": "Através da Janela", + "PlaceAbovetheClouds": "Um Lugar Acima das Nuvens", + "DoNotStepontheGrass": "Não Pise na Grama", + "ColdWatersintheWhiteLand": "Águas Gélidas na Terra Branca", + "LightlessChasms": "Abismos Sem Luz", + "TheLandofDeceivingLooks": "A Terra das Ilusões", + "Book": "Livro", + "Daylight": "Luz do Dia", + "SecretoftheSands": "O Segredo das Areias", + "DeadlandComesAlive": "A Terra Morta Ganha Vida", + "EvilPresence": "Presença Maligna", + "SkyGuardian": "O Guardião do Céu", + "AmericanExplosive": "Explosivo Americano", + "Discover": "Descobrir", + "HandEarth": "Mão da Terra", + "OldMiner": "Velho Minerador", + "Skelehead": "Cabeça de Osso", + "CopperWatch": "Relógio de Cobre", + "Cobweb": "Teia de Aranha", + "FacingtheCerebralMastermind": "Encarando o Mestre Cerebral", + "LakeofFire": "Lago de Fogo", + "TrioSuperHeroes": "Trio de Super-Heróis", + "SpectreHood": "Capuz Espectral", + "SpectreRobe": "Roupão Espectral", + "SpectrePants": "Calça Espectral", + "SpectrePickaxe": "Picareta Espectral", + "SpectreHamaxe": "Martelo-machado Espectral", + "Ectoplasm": "Ectoplasma", + "GothicChair": "Cadeira Gótica", + "NecroHelmet": "Elmo Necrosado", + "GothicTable": "Mesa Gótica", + "GothicWorkBench": "Bancada de Trabalho Gótica", + "GothicBookcase": "Estante Gótica", + "PaladinsHammer": "Martelo do Paladino", + "SWATHelmet": "Capacete da SWAT", + "BeeWings": "Asas de Abelha", + "GiantHarpyFeather": "Pena de Harpia Gigante", + "BoneFeather": "Pena de Osso", + "FireFeather": "Pena de Fogo", + "IceFeather": "Pena de Gelo", + "NecroBreastplate": "Peitoral Necrosado", + "BrokenBatWing": "Asa de Morcego Quebrada", + "TatteredBeeWing": "Asa de Abelha Esfarrapada", + "LargeAmethyst": "Ametista Grande", + "LargeTopaz": "Topázio Grande", + "LargeSapphire": "Safira Grande", + "LargeEmerald": "Esmeralda Grande", + "LargeRuby": "Rubi Grande", + "LargeDiamond": "Diamante Grande", + "JungleChest": "Baú da Selva", + "CorruptionChest": "Baú Corrompido", + "NecroGreaves": "Grevas Necrosadas", + "CrimsonChest": "Baú de Carmim", + "HallowedChest": "Baú Consagrado", + "JungleKey": "Chave da Selva", + "CorruptionKey": "Chave Corrompida", + "CrimsonKey": "Chave de Carmim", + "HallowedKey": "Chave Consagrada", + "FrozenKey": "Chave Congelada", + "ImpFace": "Rosto do Demônio", + "OminousPresence": "Presença Sinistra", + "Bone": "Osso", + "ShiningMoon": "Lua Brilhante", + "LivingGore": "Violência Viva", + "FlowingMagma": "Rio de Magma", + "SpectrePaintbrush": "Pincel Espectral", + "SpectrePaintRoller": "Rolo Espectral", + "SpectrePaintScraper": "Removedor de Tinta Espectral", + "ShroomiteHeadgear": "Capacete de Cogumelita", + "ShroomiteMask": "Máscara de Cogumelita", + "ShroomiteHelmet": "Elmo de Cogumelita", + "ShroomiteBreastplate": "Peitoral de Cogumelita", + "Muramasa": "Muramasa", + "ShroomiteLeggings": "Calças de Cogumelita", + "Autohammer": "Martelo Automático", + "ShroomiteBar": "Barra de Cogumelita", + "SDMG": "M.G.E.", + "CenxsTiara": "Diadema de Cenx", + "CenxsBreastplate": "Peitoral de Cenx", + "CenxsLeggings": "Calças de Cenx", + "CrownosMask": "Máscara de Crowno", + "CrownosBreastplate": "Peitoral de Crowno", + "CrownosLeggings": "Calças de Crowno", + "CobaltShield": "Escudo de Cobalto", + "WillsHelmet": "Elmo de Will", + "WillsBreastplate": "Peitoral de Will", + "WillsLeggings": "Calças de Will", + "JimsHelmet": "Elmo de Jim", + "JimsBreastplate": "Peitoral de Jim", + "JimsLeggings": "Calças de Jim", + "AaronsHelmet": "Elmo de Aaron", + "AaronsBreastplate": "Peitoral de Aaron", + "AaronsLeggings": "Calças de Aaron", + "VampireKnives": "Facas Vampiro", + "AquaScepter": "Cetro d'água", + "BrokenHeroSword": "Espada do Herói Quebrada", + "ScourgeoftheCorruptor": "Tormento do Corruptor", + "StaffoftheFrostHydra": "Cajado da Hidra Congelada", + "TheCreationoftheGuide": "A Criação do Guia", + "TheMerchant": "O Comerciante", + "CrownoDevoursHisLunch": "Crowno Devora seu Almoço", + "RareEnchantment": "Encantamento Raro", + "GloriousNight": "Noite Gloriosa", + "SweetheartNecklace": "Colar da Amada", + "FlurryBoots": "Botas Aladas", + "LuckyHorseshoe": "Ferradura da Sorte", + "DTownsHelmet": "Elmo de D-Town", + "DTownsBreastplate": "Peitoral de D-Town", + "DTownsLeggings": "Calças de D-Town", + "DTownsWings": "Asas de D-Town", + "WillsWings": "Asas de Will", + "CrownosWings": "Asas de Crowno", + "CenxsWings": "Asas de Cenx", + "CenxsDress": "Vestido de Cenx", + "CenxsDressPants": "Saia de Cenx", + "PalladiumColumn": "Coluna de Paládio", + "ShinyRedBalloon": "Balão Vermelho Brilhante", + "PalladiumColumnWall": "Parede de Colunas de Paládio", + "BubblegumBlock": "Bloco de Chiclete", + "BubblegumBlockWall": "Parede de Blocos de Chiclete", + "TitanstoneBlock": "Bloco de Rocha Titã", + "TitanstoneBlockWall": "Parede de Blocos de Rocha Titã", + "MagicCuffs": "Algemas Mágicas", + "MusicBoxSnow": "Caixinha de Música (Neve)", + "MusicBoxCrimson": "Caixinha de Música (Carmim)", + "MusicBoxBoss4": "Caixinha de Música (Chefe 4)", + "SilverWatch": "Relógio de Prata", + "Harpoon": "Arpão", + "MusicBoxAltOverworldDay": "Caixa de Música (Dia no Mundo Superior Alternativo)", + "MusicBoxRain": "Caixinha de Música (Chuva)", + "MusicBoxIce": "Caixinha de Música (Gelo)", + "MusicBoxDesert": "Caixinha de Música (Deserto)", + "MusicBoxDungeon": "Caixinha de Música (Calabouço)", + "MusicBoxPlantera": "Caixinha de Música (Plantera)", + "MusicBoxBoss5": "Caixinha de Música (Chefe 5)", + "MusicBoxTemple": "Caixinha de Música (Templo)", + "MusicBoxEclipse": "Caixinha de Música (Eclipse)", + "SpikyBall": "Bola com Espinhos", + "MusicBoxMushrooms": "Caixinha de Música (Cogumelos)", + "ButterflyDust": "Pó de Borboleta", + "AnkhCharm": "Amuleto de Ankh", + "AnkhShield": "Escudo de Ankh", + "BlueFlare": "Chama Azul", + "AnglerFishBanner": "Bandeira do Peixe-diabo", + "AngryNimbusBanner": "Bandeira da Nuvem Furiosa", + "AnomuraFungusBanner": "Bandeira do Fungo Anomura", + "AntlionBanner": "Bandeira da Formiga-leão", + "ArapaimaBanner": "Bandeira do Pirarucu", + "BallOHurt": "Bola de Dor", + "ArmoredSkeletonBanner": "Bandeira do Esqueleto Armado", + "BatBanner": "Bandeira do Morcego da Caverna", + "BirdBanner": "Bandeira do Pássaro", + "BlackRecluseBanner": "Bandeira da Aranha Reclusa Negra", + "BloodFeederBanner": "Bandeira do Peixe de Sangue", + "BloodJellyBanner": "Bandeira da Água-viva de Sangue", + "BloodCrawlerBanner": "Bandeira da Aranha de Sangue", + "BoneSerpentBanner": "Bandeira da Serpente de Osso", + "BunnyBanner": "Bandeira do Coelhinho", + "ChaosElementalBanner": "Bandeira do Elemental do Caos", + "BlueMoon": "Lua Azul", + "MimicBanner": "Bandeira do Mímico", + "ClownBanner": "Bandeira do Palhaço", + "CorruptBunnyBanner": "Bandeira do Coelhinho Corrompido", + "CorruptGoldfishBanner": "Bandeira do Dourado Corrompido", + "CrabBanner": "Bandeira do Caranguejo", + "CrimeraBanner": "Bandeira da Crimera", + "CrimsonAxeBanner": "Bandeira do Machado de Carmim", + "CursedHammerBanner": "Bandeira do Martelo Amaldiçoado", + "DemonBanner": "Bandeira do Demônio", + "DemonEyeBanner": "Bandeira do Olho do Demônio", + "Handgun": "Arma", + "DerplingBanner": "Bandeira do Derpling", + "EaterofSoulsBanner": "Bandeira do Devorador de Almas", + "EnchantedSwordBanner": "Bandeira da Espada Encantada", + "FaceMonsterBanner": "Bandeira do Monstro da Face", + "FloatyGrossBanner": "Bandeira do Nojento Flutuante", + "FlyingFishBanner": "Bandeira do Peixe Voador", + "FlyingSnakeBanner": "Bandeira da Cobra Voadora", + "FrankensteinBanner": "Bandeira do Frankenstein", + "FungiBulbBanner": "Bandeira do Bulbo de Fungos", + "WaterBolt": "Raio d'água", + "FungoFishBanner": "Bandeira do Fungo-peixe", + "GastropodBanner": "Bandeira do Gastrópode", + "GoblinThiefBanner": "Bandeira do Ladrão Goblin", + "GoblinSorcererBanner": "Bandeira do Feiticeiro Goblin", + "GoblinPeonBanner": "Bandeira do Peão Goblin", + "GoblinScoutBanner": "Bandeira do Batedor Goblin", + "GoblinWarriorBanner": "Bandeira do Guerreiro Goblin", + "GoldfishBanner": "Bandeira do Dourado", + "HarpyBanner": "Bandeira da Harpia", + "HellbatBanner": "Bandeira do Morcego Infernal", + "Bomb": "Bomba", + "HerplingBanner": "Bandeira do Herpling", + "HornetBanner": "Bandeira da Vespa", + "IceElementalBanner": "Bandeira do Elemental de Gelo", + "IcyMermanBanner": "Bandeira do Tritão de Gelo", + "FireImpBanner": "Bandeira do Demônio de Fogo", + "JellyfishBanner": "Bandeira da Água-viva Azul", + "JungleCreeperBanner": "Bandeira da Aranha da Selva", + "LihzahrdBanner": "Bandeira do Lagharto", + "ManEaterBanner": "Bandeira do Devorador de Homens", + "MeteorHeadBanner": "Bandeira da Cabeça de Meteoro", + "Dynamite": "Dinamite", + "MothBanner": "Bandeira da Mariposa", + "MummyBanner": "Bandeira da Múmia", + "MushiLadybugBanner": "Bandeira da Joaninha Azul", + "ParrotBanner": "Bandeira do Papagaio", + "PigronBanner": "Bandeira do Porco-dragão", + "PiranhaBanner": "Bandeira da Piranha", + "PirateBanner": "Bandeira do Marinheiro Pirata", + "PixieBanner": "Bandeira do Pixie", + "RaincoatZombieBanner": "Bandeira do Zumbi com Capa de Chuva", + "ReaperBanner": "Bandeira do Ceifador", + "Grenade": "Granada", + "SharkBanner": "Bandeira do Tubarão", + "SkeletonBanner": "Bandeira do Esqueleto", + "SkeletonMageBanner": "Bandeira do Mago das Trevas", + "SlimeBanner": "Bandeira da Geleia Azul", + "SnowFlinxBanner": "Bandeira do Flinx de Neve", + "SpiderBanner": "Bandeira da Aranha Trepadeira", + "SporeZombieBanner": "Bandeira do Zumbi com Esporos", + "SwampThingBanner": "Bandeira do Monstro do Pântano", + "TortoiseBanner": "Bandeira da Tartaruga Gigante", + "ToxicSludgeBanner": "Bandeira da Lama Tóxica", + "SandBlock": "Bloco de Areia", + "UmbrellaSlimeBanner": "Bandeira da Geleia com Guarda-chuva", + "UnicornBanner": "Bandeira do Unicórnio", + "VampireBanner": "Bandeira do Vampiro", + "VultureBanner": "Bandeira do Abutre", + "NypmhBanner": "Bandeira da Ninfa", + "WerewolfBanner": "Bandeira do Lobisomem", + "WolfBanner": "Bandeira do Lobo", + "WorldFeederBanner": "Bandeira do Verme Gigante", + "WormBanner": "Bandeira do Verme", + "WraithBanner": "Bandeira da Assombração", + "GoldWatch": "Relógio de Ouro", + "Glass": "Vidro", + "WyvernBanner": "Bandeira da Serpe", + "ZombieBanner": "Bandeira do Zumbi", + "GlassPlatform": "Plataforma de Vidro", + "GlassChair": "Cadeira de Vidro", + "GoldenChair": "Cadeira Dourada", + "GoldenToilet": "Privada Dourada", + "BarStool": "Banquinho", + "HoneyChair": "Cadeira de Mel", + "SteampunkChair": "Cadeira Steampunk", + "GlassDoor": "Porta de Vidro", + "Sign": "Aviso", + "GoldenDoor": "Porta Dourada", + "HoneyDoor": "Porta de Mel", + "SteampunkDoor": "Porta Steampunk", + "GlassTable": "Mesa de Vidro", + "BanquetTable": "Mesa de Banquete", + "Bar": "Bar", + "GoldenTable": "Mesa Dourada", + "HoneyTable": "Mesa de Mel", + "SteampunkTable": "Mesa Steampunk", + "GlassBed": "Cama de Vidro", + "AshBlock": "Bloco de Cinzas", + "GoldenBed": "Cama Dourada", + "HoneyBed": "Cama de Mel", + "SteampunkBed": "Cama Steampunk", + "LivingWoodWall": "Parede de Madeira Viva", + "FartinaJar": "Peido Engarrafado", + "Pumpkin": "Abóbora", + "PumpkinWall": "Parede de Abóbora", + "Hay": "Feno", + "HayWall": "Parede de Feno", + "SpookyWood": "Madeira Assustadora", + "Obsidian": "Obsidiana", + "SpookyWoodWall": "Parede de Madeira Assustadora", + "PumpkinHelmet": "Elmo de Abóbora", + "PumpkinBreastplate": "Peitoral de Abóbora", + "PumpkinLeggings": "Calças de Abóbora", + "CandyApple": "Maçã do Amor", + "SoulCake": "Bolo de Almas", + "NurseHat": "Chapéu de Enfermeira", + "NurseShirt": "Camisa de Enfermeira", + "NursePants": "Calça de Enfermeira", + "WizardsHat": "Chapéu de Mago", + "Hellstone": "Pedra Infernal", + "GuyFawkesMask": "Máscara de Guy Fawkes", + "DyeTraderRobe": "Roupão de Comerciante de Tinturas", + "SteampunkGoggles": "Óculos Steampunk", + "CyborgHelmet": "Elmo de Ciborgue", + "CyborgShirt": "Camisa de Ciborgue", + "CyborgPants": "Calça de Ciborgue", + "CreeperMask": "Máscara de Creeper", + "CreeperShirt": "Camisa de Creeper", + "CreeperPants": "Calça de Creeper", + "CatMask": "Máscara de Gato", + "HellstoneBar": "Barra de Pedra Infernal", + "CatShirt": "Camisa de Gato", + "CatPants": "Calça de Gato", + "GhostMask": "Máscara de Fantasma", + "GhostShirt": "Camisa de Fantasma", + "PumpkinMask": "Máscara de Abóbora", + "PumpkinShirt": "Camisa de Abóbora", + "PumpkinPants": "Calça de Abóbora", + "RobotMask": "Máscara de Robô", + "RobotShirt": "Camisa de Robô", + "RobotPants": "Calça de Robô", + "MudBlock": "Bloco de Lama", + "UnicornMask": "Máscara de Unicórnio", + "UnicornShirt": "Camisa de Unicórnio", + "UnicornPants": "Calça de Unicórnio", + "VampireMask": "Máscara de Vampiro", + "VampireShirt": "Camisa de Vampiro", + "VampirePants": "Calça de Vampiro", + "WitchHat": "Chapéu de Bruxa", + "LeprechaunHat": "Chapéu de Duende", + "LeprechaunShirt": "Camisa de Duende", + "LeprechaunPants": "Calça de Duende", + "Sapphire": "Safira", + "PixieShirt": "Camisa de Pixie", + "PixiePants": "Calça de Pixie", + "PrincessHat": "Chapéu de Princesa", + "PrincessDressNew": "Vestido de Princesa", + "GoodieBag": "Saco de Guloseimas", + "WitchDress": "Vestido de Bruxa", + "WitchBoots": "Botas de Bruxas", + "BrideofFrankensteinMask": "Máscara da Noiva do Frankenstein", + "BrideofFrankensteinDress": "Vestido da Noiva do Frankenstein", + "KarateTortoiseMask": "Máscara de Tartaruga Carateca", + "Ruby": "Rubi", + "KarateTortoiseShirt": "Camisa de Tartaruga Carateca", + "KarateTortoisePants": "Calça de Tartaruga Carateca", + "CandyCornRifle": "Fuzil de Doces", + "CandyCorn": "Doces", + "JackOLanternLauncher": "Lança Abóboras", + "ExplosiveJackOLantern": "Abóboras Explosivas", + "Sickle": "Foice", + "PumpkinPie": "Torta de Abóbora", + "ScarecrowHat": "Chapéu de Espantalho", + "ScarecrowShirt": "Camisa de Espantalho", + "Emerald": "Esmeralda", + "ScarecrowPants": "Calça de Espantalho", + "Cauldron": "Caldeirão", + "PumpkinChair": "Cadeira de Abóbora", + "PumpkinDoor": "Porta de Abóbora", + "PumpkinTable": "Mesa de Abóbora", + "PumpkinWorkBench": "Bancada de Trabalho de Abóbora", + "PumpkinPlatform": "Plataforma de Abóbora", + "TatteredFairyWings": "Asas de Fadas Esfarrapadas", + "SpiderEgg": "Ovo de Aranha", + "MagicalPumpkinSeed": "Semente de Abóbora Mágica", + "DepthMeter": "Medidor de Profundidade", + "Topaz": "Topázio", + "BatHook": "Gancho de Morcego", + "BatScepter": "Cetro de Morcego", + "RavenStaff": "Cajado de Corvo", + "JungleKeyMold": "Molde de Chave da Selva", + "CorruptionKeyMold": "Molde de Chave Corrompida", + "CrimsonKeyMold": "Molde de Chave de Carmim", + "HallowedKeyMold": "Molde de Chave Consagrada", + "FrozenKeyMold": "Molde de Chave Congelada", + "HangingJackOLantern": "Abóbora Pendurada", + "RottenEgg": "Ovo Podre", + "Amethyst": "Ametista", + "UnluckyYarn": "Novelo do Azar", + "BlackFairyDust": "Pó de Fada Negra", + "Jackelier": "Candelabóbora", + "JackOLantern": "Abóbora do Dia das Bruxas", + "SpookyChair": "Cadeira Assustadora", + "SpookyDoor": "Porta Assustadora", + "SpookyTable": "Mesa Assustadora", + "SpookyWorkBench": "Bancada de Trabalho Assustadora", + "ReaperHood": "Capuz do Ceifador", + "Diamond": "Diamante", + "ReaperRobe": "Roupão do Ceifador", + "FoxMask": "Máscara de Raposa", + "FoxShirt": "Camisa de Raposa", + "FoxPants": "Calça de Raposa", + "CatEars": "Orelhas de Gato", + "BloodyMachete": "Machadinha Sangrenta", + "TheHorsemansBlade": "Lâmina do Cavaleiro", + "BladedGlove": "Luva Laminada", + "PumpkinSeed": "Semente de Abóbora", + "SpookyHook": "Gancho Assustador", + "GlowingMushroom": "Cogumelo Brilhante", + "SpookyWings": "Asas Assustadoras", + "SpookyTwig": "Galho Assustador", + "SpookyHelmet": "Elmo Assustador", + "SpookyBreastplate": "Peitoral Assustador", + "SpookyLeggings": "Calças Assustadoras", + "StakeLauncher": "Lança-estacas", + "Stake": "Estaca", + "CursedSapling": "Plantinha Amaldiçoada", + "SpaceCreatureMask": "Máscara de Criatura do Espaço", + "SpaceCreatureShirt": "Camisa de Criatura do Espaço", + "Star": "Estrela", + "SpaceCreaturePants": "Calça de Criatura do Espaço", + "WolfMask": "Máscara de Lobo", + "WolfShirt": "Camisa de Lobo", + "WolfPants": "Calça de Lobo", + "PumpkinMoonMedallion": "Medalhão da Lua de Abóbora", + "NecromanticScroll": "Pergaminho do Necromancer", + "JackingSkeletron": "Esqueletron Assombrado", + "BitterHarvest": "Colheita Amarga", + "BloodMoonCountess": "Condessa da Lua de Sangue", + "HallowsEve": "Noite das Bruxas", + "IvyWhip": "Chicote de Hera", + "MorbidCuriosity": "Curiosidade Mórbida", + "TreasureHunterShirt": "Camisa de Caçador de Tesouros", + "TreasureHunterPants": "Calça de Caçador de Tesouros", + "DryadCoverings": "Vestes de Dríade", + "DryadLoincloth": "Tanga de Dríade", + "MourningWoodTrophy": "Troféu da Árvore da Morte", + "PumpkingTrophy": "Troféu de Abóbora", + "JackOLanternMask": "Máscara de Abóbora do Dia das Bruxas", + "SniperScope": "Luneta do Atirador", + "HeartLantern": "Lanterna do Coração", + "BreathingReed": "Snorkel de Junco", + "JellyfishDivingGear": "Equipamento de Mergulho de Água-viva", + "ArcticDivingGear": "Equipamento de Mergulho Ártico", + "FrostsparkBoots": "Botas de Raios Congelados", + "FartInABalloon": "Peido no Balão", + "PapyrusScarab": "Escaravelho de Papiro", + "CelestialStone": "Pedra Celestial", + "Hoverboard": "Hoverboard", + "CandyCane": "Doce", + "SugarPlum": "Balinha", + "Present": "Presente", + "Flipper": "Nadadeira", + "RedRyder": "Cavaleiro Vermelho", + "FestiveWings": "Asas Festivas", + "PineTreeBlock": "Bloco de Pinheiro", + "ChristmasTree": "Árvore de Natal", + "StarTopper1": "Estrela Decorativa 1", + "StarTopper2": "Estrela Decorativa 2", + "StarTopper3": "Estrela Decorativa 3", + "BowTopper": "Laço Decorativo", + "WhiteGarland": "Guirlanda Branca", + "WhiteAndRedGarland": "Guirlanda Vermelha e Branca", + "HealingPotion": "Poção de Cura", + "RedGardland": "Guirlanda Vermelha", + "RedAndGreenGardland": "Guirlanda Vermelha e Verde", + "GreenGardland": "Guirlanda Verde", + "GreenAndWhiteGarland": "Guirlanda Verde e Branca", + "MulticoloredBulb": "Bola Colorida", + "RedBulb": "Bola Vermelha", + "YellowBulb": "Bola Amarela", + "GreenBulb": "Bola Verde", + "RedAndGreenBulb": "Bola Vermelha e Verde", + "YellowAndGreenBulb": "Bola Verde e Amarela", + "ManaPotion": "Poção de Mana", + "RedAndYellowBulb": "Bola Vermelha e Amarela", + "WhiteBulb": "Bola Branca", + "WhiteAndRedBulb": "Bola Vermelha e Branca", + "WhiteAndYellowBulb": "Bola Amarela e Branca", + "WhiteAndGreenBulb": "Bola Verde e Branca", + "MulticoloredLights": "Luzes Coloridas", + "RedLights": "Luzes Vermelhas", + "GreenLights": "Luzes Verdes", + "BlueLights": "Luzes Azuis", + "YellowLights": "Luzes Amarelas", + "GoldBar": "Barra de Ouro", + "BladeofGrass": "Folha de Grama", + "RedAndYellowLights": "Luzes Vermelhas e Amarelas", + "RedAndGreenLights": "Luzes Vermelhas e Verdes", + "YellowAndGreenLights": "Luzes Verdes e Amarelas", + "BlueAndGreenLights": "Luzes Azuis e Verdes", + "RedAndBlueLights": "Luzes Vermelhas e Azuis", + "BlueAndYellowLights": "Luzes Azuis e Amarelas", + "GiantBow": "Arco Gigante", + "ReindeerAntlers": "Chifres de Renas", + "Holly": "Azevinho", + "CandyCaneSword": "Espada de Doce", + "ThornChakram": "Chakram com Espinhos", + "EldMelter": "Incinerador de Elfos", + "ChristmasPudding": "Pudim de Natal", + "Eggnog": "Gemada", + "StarAnise": "Estrela Anise", + "ReindeerBells": "Sinos de Renas", + "CandyCaneHook": "Gancho de Doce", + "ChristmasHook": "Gancho de Natal", + "CnadyCanePickaxe": "Picareta de Doce", + "FruitcakeChakram": "Chakram com Frutas Cristalizadas", + "SugarCookie": "Biscoito Doce", + "ObsidianBrick": "Tijolo de Obsidiana", + "GingerbreadCookie": "Biscoito de Gengibre", + "HandWarmer": "Aquecedor de Mãos", + "Coal": "Carvão", + "Toolbox": "Caixa de Ferramentas", + "PineDoor": "Porta de Pinheiro", + "PineChair": "Cadeira de Pinheiro", + "PineTable": "Mesa de Pinheiro", + "DogWhistle": "Apito para Cachorros", + "ChristmasTreeSword": "Espada de Árvore de Natal", + "ChainGun": "Metralhadora Giratória", + "ObsidianSkull": "Caveira de Obsidiana", + "Razorpine": "Pinheiro Afiado", + "BlizzardStaff": "Cajado da Nevasca", + "MrsClauseHat": "Chapéu da Mamãe Noel", + "MrsClauseShirt": "Blusa da Mamãe Noel", + "MrsClauseHeels": "Salto alto da Mamãe Noel", + "ParkaHood": "Capuz de Parca", + "ParkaCoat": "Casaco de Parca", + "ParkaPants": "Calça de Parca", + "SnowHat": "Chapéu de Neve", + "UglySweater": "Suéter Feio", + "MushroomGrassSeeds": "Sementes de Grama de Cogumelo", + "TreeMask": "Máscara de Árvore", + "TreeShirt": "Camiseta de Árvores", + "TreeTrunks": "Calça de Árvore", + "ElfHat": "Chapéu de Elfo", + "ElfShirt": "Camiseta de Elfo", + "ElfPants": "Calça de Elfo", + "SnowmanCannon": "Canhão do Homem das Neves", + "NorthPole": "Polo Norte", + "ChristmasTreeWallpaper": "Papel de Parede de Árvore de Natal", + "OrnamentWallpaper": "Papel de Parede Decorativo", + "JungleGrassSeeds": "Sementes de Grama da Selva", + "CandyCaneWallpaper": "Papel de Parede de Doce", + "FestiveWallpaper": "Papel de Parede Festivo", + "StarsWallpaper": "Papel de Parede de Estrelas", + "SquigglesWallpaper": "Papel de Parede de Rabiscos", + "SnowflakeWallpaper": "Papel de Parede de Flocos de Neve", + "KrampusHornWallpaper": "Papel de Parede do Chifre de Krampus", + "BluegreenWallpaper": "Papel de Parede Verde-azulado", + "GrinchFingerWallpaper": "Papel de Parede dos dedos do Grinch", + "NaughtyPresent": "Presente dos Malcriados", + "BabyGrinchMischiefWhistle": "Apito de Malcriação do Filhote de Grinch", + "WoodenHammer": "Martelo de Madeira", + "IceQueenTrophy": "Troféu da Rainha do Gelo", + "SantaNK1Trophy": "Troféu Papai-Noel-NK1", + "EverscreamTrophy": "Troféu do Everscream", + "MusicBoxPumpkinMoon": "Caixinha de Música (Lua de Abóbora)", + "MusicBoxAltUnderground": "Caixinha de Música (Subterrâneo Alternativo)", + "MusicBoxFrostMoon": "Caixinha de Música (Lua de Gelo)", + "BrownPaint": "Tinta Marrom", + "ShadowPaint": "Tinta Cor de Sombra", + "NegativePaint": "Tinta Negativa", + "TeamDye": "Tintura da Equipe", + "StarCannon": "Canhão de Estrelas", + "AmethystGemsparkBlock": "Bloco de Ametistas Brilhantes", + "TopazGemsparkBlock": "Bloco de Topázios Brilhantes", + "SapphireGemsparkBlock": "Bloco de Safiras Brilhantes", + "EmeraldGemsparkBlock": "Bloco de Esmeraldas Brilhantes", + "RubyGemsparkBlock": "Bloco de Rubis Brilhantes", + "DiamondGemsparkBlock": "Bloco de Diamantes Brilhantes", + "AmberGemsparkBlock": "Bloco de Pedras de Âmbar Brilhantes", + "LifeHairDye": "Tintura para Cabelo da Vida", + "ManaHairDye": "Tintura para Cabelo de Mana", + "DepthHairDye": "Tintura para Cabelo da Profundidade", + "BluePhaseblade": "Espada de Luz Azul", + "MoneyHairDye": "Tintura para Cabelo de Dinheiro", + "TimeHairDye": "Tintura para Cabelo do Tempo", + "TeamHairDye": "Tintura para Cabelo da Equipe", + "BiomeHairDye": "Tintura para Cabelo da Bioma", + "PartyHairDye": "Tintura para Cabelo para Festa", + "RainbowHairDye": "Tintura para Cabelo do Arco-íris", + "SpeedHairDye": "Tintura para Cabelo da Velocidade", + "AngelHalo": "Auréola Angelical", + "Fez": "Fez", + "Womannquin": "Manequim Feminino", + "RedPhaseblade": "Espada de Luz Vermelha", + "HairDyeRemover": "Removedor de Tintura para Cabelo", + "BugNet": "Puçá", + "Firefly": "Vagalume", + "FireflyinaBottle": "Vagalume na Garrafa", + "MonarchButterfly": "Borboleta Monarca", + "PurpleEmperorButterfly": "Borboleta Imperial Roxa", + "RedAdmiralButterfly": "Borboleta Almirante Vermelha", + "UlyssesButterfly": "Borboleta Ulisses", + "SulphurButterfly": "Borboleta Enxofre", + "TreeNymphButterfly": "Borboleta da Ninfa das Árvores", + "DirtBlock": "Bloco de Terra", + "CopperBar": "Barra de Cobre", + "GreenPhaseblade": "Espada de Luz Verde", + "ZebraSwallowtailButterfly": "Borboleta Zebra Rabo-de-andorinha", + "JuliaButterfly": "Borboleta Julia", + "Worm": "Verme", + "Mouse": "Camundongo", + "LightningBug": "Inseto Relâmpago", + "LightningBuginaBottle": "Inseto Relâmpago na Garrafa", + "Snail": "Caracol", + "GlowingSnail": "Lesma Brilhante", + "FancyGreyWallpaper": "Papel de Parede Cinza Chique", + "IceFloeWallpaper": "Papel de Parede de Campos de Gelo", + "PurplePhaseblade": "Espada de Luz Roxa", + "MusicWallpaper": "Papel de Parede Musical", + "PurpleRainWallpaper": "Papel de Parede de Chuva Roxa", + "RainbowWallpaper": "Papel de Parede de Arco-íris", + "SparkleStoneWallpaper": "Papel de Parede de Rocha Brilhante", + "StarlitHeavenWallpaper": "Papel de Parede de Céu Estrelado", + "Bird": "Pássaro", + "BlueJay": "Gaio-azul", + "Cardinal": "Cardeal", + "Squirrel": "Esquilo", + "Bunny": "Coelhinho", + "WhitePhaseblade": "Espada de Luz Branca", + "YellowPhaseblade": "Espada de Luz Amarela", + "MeteorHamaxe": "Martelo-machado de Meteoro", + "EmptyBucket": "Balde Vazio", + "WaterBucket": "Balde com Água", + "LavaBucket": "Balde com Lava", + "JungleRose": "Rosa da Selva", + "Stinger": "Ferrão", + "SilverBar": "Barra de Prata", + "Vine": "Vinha", + "FeralClaws": "Garras Ferozes", + "BlacksmithRack": "Prateleiras de Ferreiro", + "CarpentryRack": "Prateleiras de Carpinteiro", + "HelmetRack": "Prateleira de Elmos", + "SpearRack": "Prateleira de Lanças", + "SwordRack": "Prateleira de Espadas", + "StoneSlab": "Placa de Pedra", + "AnkletoftheWind": "Tornozeleira do Vento", + "SandstoneSlab": "Placa de Arenito", + "Frog": "Rã", + "MallardDuck": "Pato Real", + "Duck": "Pato", + "StaffofRegrowth": "Cajado do Renascimento", + "HellstoneBrick": "Tijolo de Pedra Infernal", + "WhoopieCushion": "Almofada Engraçadinha", + "BlackScorpion": "Escorpião Negro", + "Scorpion": "Escorpião", + "BubbleWallpaper": "Papel de Parede de Bolhas", + "CopperPipeWallpaper": "Papel de Parede de Canos de Cobre", + "Shackle": "Algema", + "DuckyWallpaper": "Papel de Parede de Patinhos", + "FrostCore": "Núcleo de Gelo", + "BunnyCage": "Gaiola para Coelhinho", + "SquirrelCage": "Gaiola para Esquilo", + "MallardDuckCage": "Gaiola para Pato Real", + "DuckCage": "Gaiola para Pato", + "BirdCage": "Gaiola", + "BlueJayCage": "Gaiola para Gaio-azul", + "CardinalCage": "Gaiola para Cardeal", + "WaterfallWall": "Muro de Cachoeira", + "MoltenHamaxe": "Martelo-machado Derretido", + "LavafallWall": "Muro de Cascata de Lava", + "CrimsonSeeds": "Sementes de Carmim", + "HeavyWorkBench": "Bancada de Trabalho Pesada", + "CopperPlating": "Revestimento de Cobre", + "SnailCage": "Gaiola para Lesmas", + "GlowingSnailCage": "Gaiola para Lesmas Brilhantes", + "ShroomiteDiggingClaw": "Garra para Cavar de Cogumelita", + "AmmoBox": "Caixa de Munição", + "MonarchButterflyJar": "Pote com Borboleta Monarca", + "PurpleEmperorButterflyJar": "Pote com Borboleta Imperial Roxa", + "Flamelash": "Chicote Flamejante", + "RedAdmiralButterflyJar": "Pote com Borboleta Almirante Vermelha", + "UlyssesButterflyJar": "Pote com Borboleta Ulisses", + "SulphurButterflyJar": "Pote com Borboleta Enxofre", + "TreeNymphButterflyJar": "Pote com Borboleta da Ninfa das Árvores", + "ZebraSwallowtailButterflyJar": "Pote com Borboleta Zebra Rabo-de-andorinha", + "JuliaButterflyJar": "Pote com Borboleta Julia", + "ScorpionCage": "Gaiola para Escorpião", + "BlackScorpionCage": "Gaiola para Escorpião Negro", + "VenomStaff": "Cajado Venenoso", + "SpectreMask": "Máscara de espectro", + "PhoenixBlaster": "Pistola da Fênix", + "FrogCage": "Gaiola para Rãs", + "MouseCage": "Gaiola para Camundongos", + "BoneWelder": "Soldador de Osso", + "FleshCloningVaat": "Máquina de Clonagem de Carne", + "GlassKiln": "Fornalha para Vidro", + "LihzahrdFurnace": "Fornalha de Lagharto", + "LivingLoom": "Sala de Estar", + "SkyMill": "Moinho Celeste", + "IceMachine": "Máquina de Gelo", + "BeetleHelmet": "Elmo de Besouro", + "IronBar": "Barra de Ferro", + "Sunfury": "Fúria do Sol", + "BeetleScaleMail": "Armadura de Malha de Besouro", + "BeetleShell": "Concha de Besouro", + "BeetleLeggings": "Calças de Besouro", + "SteampunkBoiler": "Caldeira Steampunk", + "HoneyDispenser": "Distribuidor de Mel", + "Penguin": "Pinguim", + "PenguinCage": "Gaiola para Pinguim", + "WormCage": "Gaiola para Verme", + "Terrarium": "Terrário", + "SuperManaPotion": "Poção de Super Mana", + "Hellforge": "Forja do Inferno", + "EbonwoodFence": "Cerca de Madeira de Ébano", + "RichMahoganyFence": "Cerca de Mogno", + "PearlwoodFence": "Cerca de Madeira Pérola", + "ShadewoodFence": "Cerca de Madeira Escura", + "BrickLayer": "Camada de Tijolos", + "ExtendoGrip": "Mão Biônika", + "PaintSprayer": "Arma de Tinta", + "PortableCementMixer": "Betoneira Portátil", + "BeetleHusk": "Casco de Besouro", + "CelestialMagnet": "Ímã Celestial", + "ClayPot": "Pote de Barro", + "CelestialEmblem": "Emblema Celestial", + "CelestialCuffs": "Algemas Celestiais", + "PeddlersHat": "Chapéu de Ambulante", + "PulseBow": "Arco de Pulso", + "NaturesGift": "Presente da Natureza", + "Bed": "Cama", + "Silk": "Seda", + "DynastyTable": "Mesa da Dinastia", + "LesserRestorationPotion": "Poção de Restauração Simples", + "DynastyWood": "Madeira da Dinastia", + "RedDynastyShingles": "Telhas Vermelhas da Dinastia", + "BlueDynastyShingles": "Telhas Azuis da Dinastia", + "WhiteDynastyWall": "Parede Branca da Dinastia", + "BlueDynastyWall": "Parede Azul da Dinastia", + "DynastyDoor": "Porta da Dinastia", + "Sake": "Saquê", + "PadThai": "Comida Tailandesa", + "Pho": "Comida Vietnamita", + "Revolver": "Revólver", + "RestorationPotion": "Poção de Restauração", + "Gatligator": "Metralhadora Jacaré", + "ArcaneRuneWall": "Parede de Runas Arcanas", + "WaterGun": "Arma d'água", + "Katana": "Katana", + "UltrabrightTorch": "Tocha Super-Brilhante", + "MagicHat": "Chapéu Mágico", + "DiamondRing": "Anel de Diamante", + "Gi": "Gi", + "Kimono": "Quimono", + "GypsyRobe": "Roupão de Cigano", + "JungleHat": "Chapéu da Selva", + "BeetleWings": "Asas de Besouro", + "TigerSkin": "Pele de Tigre", + "LeopardSkin": "Pele de Leopardo", + "ZebraSkin": "Pele de Zebra", + "CrimsonCloak": "Manto de Carmim", + "MysteriousCape": "Capa Misteriosa", + "RedCape": "Capa Vermelha", + "WinterCape": "Capa do Inverno", + "WoodFishingPole": "Vara de Pescar de Madeira", + "JungleShirt": "Camiseta da Selva", + "Bass": "Robalo", + "ReinforcedFishingPole": "Vara de Pescar Reforçada", + "FiberglassFishingPole": "Vara de Pescar de Fibra de Vidro", + "FisherofSouls": "Pescador de Almas", + "GoldenFishingRod": "Vara de Pescar Dourada", + "MechanicsRod": "Ferramenta do Mecânico", + "SittingDucksFishingRod": "Vara de Pescar do Patinho", + "Trout": "Truta", + "Salmon": "Salmão", + "AtlanticCod": "Bacalhau-do-Atlântico", + "Gel": "Gel", + "JunglePants": "Calça da Selva", + "Tuna": "Atum", + "RedSnapper": "Caranho", + "NeonTetra": "Néon", + "ArmoredCavefish": "Bagre-cego Encouraçado", + "Damselfish": "Castanheta", + "CrimsonTigerfish": "Peixe-tigre de Carmim", + "FrostMinnow": "Piaba Congelada", + "PrincessFish": "Peixe-princesa", + "GoldenCarp": "Carpa Dourada", + "SpecularFish": "Peixe-especular", + "MoltenHelmet": "Elmo Derretido", + "Prismite": "Peixe-prisma", + "VariegatedLardfish": "Peixe-banha", + "FlarefinKoi": "Koi das Barbatanas em Chamas", + "DoubleCod": "Bacalhau Duplo", + "Honeyfin": "Barbatanas de Mel", + "Obsidifish": "Peixe-obsidiana", + "Shrimp": "Camarão", + "ChaosFish": "Peixe-do-caos", + "Ebonkoi": "Ebonkoi", + "Hemopiranha": "Hemopiranha", + "MoltenBreastplate": "Peitoral Derretido", + "Rockfish": "Peixe-pedra", + "Stinkfish": "Peixe-podre", + "MiningPotion": "Poção de Mineração", + "HeartreachPotion": "Poção Agarra-corações", + "CalmingPotion": "Poção Calmante", + "BuilderPotion": "Poção do Construtor", + "TitanPotion": "Poção do Titã", + "FlipperPotion": "Poção das Nadadeiras", + "SummoningPotion": "Poção de Invocação", + "TrapsightPotion": "Poção do Instinto-perigo", + "MoltenGreaves": "Grevas Derretidas", + "PurpleClubberfish": "Peixe-clava Roxo", + "ObsidianSwordfish": "Peixe-Espada de Obsidiana", + "Swordfish": "Peixe-Espada", + "IronFence": "Cerca de Ferro", + "WoodenCrate": "Caixote de Madeira", + "IronCrate": "Caixote de Ferro", + "GoldenCrate": "Caixote Dourado", + "OldShoe": "Sapato Velho", + "FishingSeaweed": "Alga", + "TinCan": "Lata", + "MeteorShot": "Tiro de Meteoros", + "ReaverShark": "Tubarão Ladrão", + "SawtoothShark": "Tubarão de Dentes Serrados", + "Minecart": "Vagoneta", + "AmmoReservationPotion": "Poção de Reserva de Munição", + "LifeforcePotion": "Poção da Força-vital", + "EndurancePotion": "Poção de Resistência", + "RagePotion": "Poção da Raiva", + "InfernoPotion": "Poção Infernal", + "WrathPotion": "Poção da Ira", + "StickyBomb": "Bomba Adesiva", + "RecallPotion": "Poção da Lembrança", + "TeleportationPotion": "Poção do Teleporte", + "LovePotion": "Poção do Amor", + "StinkPotion": "Poção do Fedor", + "FishingPotion": "Poção da Pescaria", + "SonarPotion": "Poção do Sonar", + "CratePotion": "Poção do Caixote", + "ShiverthornSeeds": "Sementes de Flor do Gelo", + "Shiverthorn": "Flor do Gelo", + "WarmthPotion": "Poção do Calor", + "BlackLens": "Lente Negra", + "FishHook": "Anzol para Peixes", + "BeeHeadgear": "Capacete de Abelha", + "BeeBreastplate": "Peitoral de Abelha", + "BeeGreaves": "Grevas de Abelha", + "HornetStaff": "Cajado da Vespa", + "ImpStaff": "Cajado do Demônio", + "QueenSpiderStaff": "Cajado da Aranha Rainha", + "AnglerHat": "Chapéu de Pescador", + "AnglerVest": "Colete de Pescador", + "AnglerPants": "Calça de Pescador", + "Sunglasses": "Óculos de Sol", + "SpiderMask": "Máscara de Aranha", + "SpiderBreastplate": "Peitoral de Aranha", + "SpiderGreaves": "Grevas de Aranha", + "HighTestFishingLine": "Fio de Pesca de Alto Desempenho", + "AnglerEarring": "Brinco de Pescador", + "TackleBox": "Caixa de Iscas", + "BlueDungeonPiano": "Piano de Calabouço Azul", + "GreenDungeonPiano": "Piano de Calabouço Verde", + "PinkDungeonPiano": "Piano de Calabouço Cor-de-rosa", + "GoldenPiano": "Piano Dourado", + "WizardHat": "Chapéu de Mago", + "ObsidianPiano": "Piano de Obsidiana", + "BonePiano": "Piano de Osso", + "CactusPiano": "Piano de Cacto", + "SpookyPiano": "Piano Assustador", + "SkywarePiano": "Piano Celeste", + "LihzahrdPiano": "Piano de Lagharto", + "BlueDungeonDresser": "Cômoda de Calabouço Azul", + "GreenDungeonDresser": "Cômoda de Calabouço Verde", + "PinkDungeonDresser": "Cômoda de Calabouço Cor-de-rosa", + "GoldenDresser": "Cômoda Dourada", + "TopHat": "Cartola", + "ObsidianDresser": "Cômoda de Obsidiana", + "BoneDresser": "Cômoda de Osso", + "CactusDresser": "Cômoda de Cacto", + "SpookyDresser": "Cômoda Assustadora", + "SkywareDresser": "Cômoda Celeste", + "HoneyDresser": "Cômoda de Mel", + "LihzahrdDresser": "Cômoda de Lagharto", + "Sofa": "Sofá", + "EbonwoodSofa": "Sofá de Madeira de Ébano", + "RichMahoganySofa": "Sofá de Mogno", + "WoodenSword": "Espada de Madeira", + "TuxedoShirt": "Camisa de Smoking", + "PearlwoodSofa": "Sofá de Madeira Pérola", + "ShadewoodSofa": "Sofá de Madeira Escura", + "BlueDungeonSofa": "Sofá de Calabouço Azul", + "GreenDungeonSofa": "Sofá de Calabouço Verde", + "PinkDungeonSofa": "Sofá de Calabouço Cor-de-rosa", + "GoldenSofa": "Sofá Dourado", + "ObsidianSofa": "Sofá de Obsidiana", + "BoneSofa": "Sofá de Osso", + "CactusSofa": "Sofá de Cacto", + "SpookySofa": "Sofá Assustador", + "TuxedoPants": "Calça de Smoking", + "SkywareSofa": "Sofá Celeste", + "HoneySofa": "Sofá de Mel", + "SteampunkSofa": "Sofá Steampunk", + "MushroomSofa": "Sofá Cogumelo", + "GlassSofa": "Sofá de Vidro", + "PumpkinSofa": "Sofá Abóbora", + "LihzahrdSofa": "Sofá de Lagharto", + "SeashellHairpin": "Grampo de Concha", + "MermaidAdornment": "Enfeite de Sereia", + "MermaidTail": "Cauda de Sereia", + "SummerHat": "Chapéu do Verão", + "ZephyrFish": "Peixe do Zéfiro", + "Fleshcatcher": "Vara de Pescar de Carne", + "HotlineFishingHook": "Anzol em Chamas", + "FrogLeg": "Perna de Rã", + "Anchor": "Âncora", + "CookedFish": "Peixe Cozido", + "CookedShrimp": "Camarão Cozido", + "Sashimi": "Sashimi", + "BunnyHood": "Capuz de Coelhinho", + "BeeWax": "Cera de Abelhas", + "CopperPlatingWall": "Parede de Revestimento de Cobre", + "StoneSlabWall": "Parede de Placas de Pedra", + "Sail": "Vela", + "CoralstoneBlock": "Bloco de Pedra Coral", + "BlueJellyfish": "Água-viva Azul", + "GreenJellyfish": "Água-viva Verde", + "PinkJellyfish": "Água-viva Cor-de-rosa", + "BlueJellyfishJar": "Pote de Água-viva Azul", + "PlumbersHat": "Chapéu de Encanador", + "GreenJellyfishJar": "Pote de Água-viva Verde", + "PinkJellyfishJar": "Pote de Água-viva Cor-de-rosa", + "PlumbersShirt": "Camiseta de Encanador", + "Batfish": "Peixe-morcego", + "BumblebeeTuna": "Atum Abelha", + "Catfish": "Peixe-gato", + "Cloudfish": "Peixe-nuvem", + "Cursedfish": "Peixe Amaldiçoado", + "Dirtfish": "Peixe-areia", + "DynamiteFish": "Peixe Dinamite", + "EaterofPlankton": "Devorador de Plankton", + "FallenStarfish": "Estrela-caída-do-mar", + "TheFishofCthulu": "O Peixe de Cthulhu", + "PlumbersPants": "Calça de Encanador", + "Fishotron": "Peixo-tron", + "Harpyfish": "Peixe-harpia", + "Hungerfish": "Peixe-fome", + "Ichorfish": "Peixe-ichor", + "Jewelfish": "Peixe-joia", + "MirageFish": "Peixe Miragem", + "MutantFlinxfin": "Flinxfin Mutante", + "Pengfish": "Peixe-pinguim", + "Pixiefish": "Peixe-pixie", + "Spiderfish": "Peixe-aranha", + "HerosHat": "Chapéu de Herói", + "TundraTrout": "Truta da Tundra", + "UnicornFish": "Peixe Unicórnio", + "GuideVoodooFish": "Peixe de Vodu Guia", + "Wyverntail": "Cauda de Serpe", + "ZombieFish": "Peixe Zumbi", + "AmanitaFungifin": "Peixe-fungo Amanita", + "Angelfish": "Peixe-anjo", + "BloodyManowar": "Caravela Sangrenta", + "Bonefish": "Peixe-osso", + "Bunnyfish": "Peixe-coelho", + "HerosShirt": "Camiseta de Herói", + "CapnTunabeard": "Capitão Barba de Atum", + "Clownfish": "Peixe-palhaço", + "DemonicHellfish": "Peixe-infernal Demoníaco", + "Derpfish": "Derpeixe", + "Fishron": "Peixe-dragão", + "InfectedScabbardfish": "Peixe-espada Infectado", + "Mudfish": "Peixe-lama", + "Slimefish": "Peixe-geleia", + "TropicalBarracuda": "Barracuda Tropical", + "KingSlimeTrophy": "Troféu da Geleia Rei", + "HerosPants": "Calça de Herói", + "ShipInABottle": "Navio Dentro da Garrafa", + "KingSlimeMask": "Máscara da Geleia Rei", + "FinWings": "Asas de Barbatana", + "TreasureMap": "Mapa do Tesouro", + "SeaweedPlanter": "Alga Marinha no Vaso", + "PillaginMePixels": "Pirata Pixelado", + "FishCostumeMask": "Máscara de Fantasia de Peixe", + "FishCostumeShirt": "Camiseta de Fantasia de Peixe", + "WoodenDoor": "Porta de Madeira", + "FishBowl": "Aquário", + "FishCostumeFinskirt": "Saia de Fantasia de Peixe", + "GingerBeard": "Barba Ruiva", + "ArchaeologistsHat": "Chapéu de Arqueólogo", + "ArchaeologistsJacket": "Jaqueta de Arqueólogo", + "ArchaeologistsPants": "Calça de Arqueólogo", + "OpticStaff": "Cajado Ótico", + "BlackThread": "Fio Preto", + "GreenThread": "Fio Verde", + "NinjaHood": "Capuz de Ninja", + "NinjaShirt": "Camiseta de Ninja", + "NinjaPants": "Calça de Ninja", + "Leather": "Couro", + "StoneWall": "Parede de Pedra", + "RedHat": "Chapéu Vermelho", + "Goldfish": "Peixe-dourado", + "Robe": "Roupão", + "RobotHat": "Chapéu de Robô", + "GoldCrown": "Coroa de Ouro", + "HellfireArrow": "Flecha do Inferno", + "Sandgun": "Arma de Areia", + "GuideVoodooDoll": "Boneco de Vodu Guia", + "DivingHelmet": "Capacete de Mergulho", + "FamiliarShirt": "Camiseta Familiar", + "Acorn": "Bolota", + "FamiliarPants": "Calça Familiar", + "FamiliarWig": "Peruca Familiar", + "DemonScythe": "Gadanha Demoníaca", + "NightsEdge": "Lâmina da Noite", + "DarkLance": "Lança das Trevas", + "Coral": "Coral", + "Cactus": "Cacto", + "Trident": "Tridente", + "SilverBullet": "Projétil de Prata", + "ThrowingKnife": "Faca de Arremessar", + "LesserHealingPotion": "Poção de Cura Simples", + "Spear": "Lança", + "Blowpipe": "Zarabatana", + "Glowstick": "Bastão Luminoso", + "Seed": "Semente", + "WoodenBoomerang": "Bumerangue de Madeira", + "Aglet": "Aglet", + "StickyGlowstick": "Bastão Luminoso Adesivo", + "PoisonedKnife": "Faca Envenenada", + "ObsidianSkinPotion": "Poção de Pele Obsidiana", + "RegenerationPotion": "Poção de Regeneração", + "AngryTrapperBanner": "Bandeira da Planta Carnívora Furiosa", + "ArmoredVikingBanner": "Bandeira do Viking Armado", + "BlackSlimeBanner": "Bandeira da da Geleia Negra", + "LifeCrystal": "Cristal da Vida", + "SwiftnessPotion": "Poção de Velocidade", + "BlueArmoredBonesBanner": "Bandeira dos Ossos com Armadura Azul", + "BlueCultistArcherBanner": "Bandeira do Arqueiro Cultista Azul", + "ManaCloakStar": "", + "BlueCultistFighterBanner": "Bandeira do Guerreiro Cultista Azul", + "BoneLeeBanner": "Ossos de Bone Lee", + "ClingerBanner": "Bandeira do Agarrador", + "CochinealBeetleBanner": "Bandeira do Besouro da Cochonilha", + "CorruptPenguinBanner": "Bandeira do Pinguim Corrompido", + "CorruptSlimeBanner": "Bandeira da Geleia Corrompida", + "CorruptorBanner": "Bandeira do Corruptor", + "GillsPotion": "Poção de Guelras", + "CrimslimeBanner": "Bandeira de Carmim", + "CursedSkullBanner": "Bandeira da Caveira Amaldiçoada", + "CyanBeetleBanner": "Bandeira do Besouro Ciano", + "DevourerBanner": "Bandeira do Devorador", + "DiablolistBanner": "Bandeira do Satanista", + "DoctorBonesBanner": "Bandeira do Doutor Bones", + "DungeonSlimeBanner": "Bandeira da Geleia do Calabouço", + "DungeonSpiritBanner": "Bandeira da Geleia do Calabouço", + "ElfArcherBanner": "Bandeira do Arqueiro Elfo", + "ElfCopterBanner": "Bandeira do Helicóptero Elfo", + "IronskinPotion": "Poção de Pele de Ferro", + "EyezorBanner": "Bandeira do Zumbolho", + "FlockoBanner": "Bandeira de Flocko", + "GhostBanner": "Bandeira do Fantasma", + "GiantBatBanner": "Bandeira do Morcego Gigante", + "GiantCursedSkullBanner": "Bandeira da Caveira Amaldiçoada Gigante", + "GiantFlyingFoxBanner": "Bandeira da Raposa Voadora Gigante", + "GingerbreadManBanner": "Bandeira do Boneco de Gengibre", + "GoblinArcherBanner": "Bandeira do arqueiro goblin", + "GreenSlimeBanner": "Bandeira da Geleia Verde", + "HeadlessHorsemanBanner": "Bandeira do Cavaleiro Sem Cabeça", + "ManaRegenerationPotion": "Poção de Regeneração de Mana", + "HellArmoredBonesBanner": "Bandeira dos Ossos com Armadura do Inferno", + "HellhoundBanner": "Bandeira do Cão do Inferno", + "HoppinJackBanner": "Bandeira da Abóbora Saltitante", + "IceBatBanner": "Bandeira do Morcego de Gelo", + "IceGolemBanner": "Bandeira do Golem de Gelo", + "IceSlimeBanner": "Bandeira da Geleia de Gelo", + "IchorStickerBanner": "Bandeira do Adesivo de Ichor", + "IlluminantBatBanner": "Bandeira do Morcego Luminoso", + "IlluminantSlimeBanner": "Bandeira da Geleia Luminosa", + "JungleBatBanner": "Bandeira do Morcego da Selva", + "MagicPowerPotion": "Poção do Pó Mágico", + "JungleSlimeBanner": "Bandeira da Geleia da Selva", + "KrampusBanner": "Bandeira do Krampus", + "LacBeetleBanner": "Bandeira do Besouro de Laca", + "LavaBatBanner": "Bandeira do Morcego de Lava", + "LavaSlimeBanner": "Bandeira da Geleia de Lava", + "MartianBrainscramblerBanner": "Bandeira do Embaralhador de Cérebros de Marte", + "MartianDroneBanner": "Bandeira do Drone de Marte", + "MartianEngineerBanner": "Bandeira do Engenheiro de Marte", + "MartianGigazapperBanner": "Bandeira Gigaelétrica de Marte", + "MartianGreyGruntBanner": "Bandeira do Soldado Cinza de Marte", + "FeatherfallPotion": "Poção das Penas", + "MartianOfficerBanner": "Bandeira do Oficial de Marte", + "MartianRaygunnerBanner": "Bandeira do Atirador de Raios de Marte", + "MartianScutlixGunnerBanner": "Bandeira do Atirador Scutlix de Marte", + "MartianTeslaTurretBanner": "Bandeira do Torreão Tesla de Marte", + "MisterStabbyBanner": "Bandeira do Senhor Facas", + "MotherSlimeBanner": "Bandeira da Mamãe Geleia", + "NecromancerBanner": "Bandeira do Necromancer", + "NutcrackerBanner": "Bandeira do Quebra-nozes", + "PaladinBanner": "Bandeira do Paladino", + "PenguinBanner": "Bandeira do Pinguim", + "SpelunkerPotion": "Poção do Espeleólogo", + "PinkyBanner": "Bandeira do Rosado", + "PoltergeistBanner": "Bandeira da Assombração", + "PossessedArmorBanner": "Bandeira da Armadura Possuída", + "PresentMimicBanner": "Bandeira do Presente Falso", + "PurpleSlimeBanner": "Bandeira da Geleia Roxa", + "RaggedCasterBanner": "Bandeira do Mago Maltrapilho", + "RainbowSlimeBanner": "Bandeira da Geleia Arco-íris", + "RavenBanner": "Bandeira do Corvo", + "RedSlimeBanner": "Bandeira da Geleia Vermelha", + "RuneWizardBanner": "Bandeira do Mago das Runas", + "InvisibilityPotion": "Poção da Invisibilidade", + "RustyArmoredBonesBanner": "Bandeira dos Ossos com Armadura Enferrujada", + "ScarecrowBanner": "Bandeira do Espantalho", + "ScutlixBanner": "Bandeira de Scutlix", + "SkeletonArcherBanner": "Bandeira do Arqueiro Esqueleto", + "SkeletonCommandoBanner": "Bandeira do Comando Esqueleto", + "SkeletonSniperBanner": "Bandeira do Atirador Esqueleto", + "SlimerBanner": "Bandeira da Geleia", + "SnatcherBanner": "Bandeira do Agarrador", + "SnowBallaBanner": "Bandeira do Malandro de Neve", + "SnowmanGangstaBanner": "Bandeira do Boneco de Neve Mafioso", + "ShinePotion": "Poção Brilhante", + "SpikedIceSlimeBanner": "Bandeira da Geleia de Gelo com Espinhos", + "SpikedJungleSlimeBanner": "Bandeira da Geleia da Selva com Espinhos", + "SplinterlingBanner": "Bandeira do Galho Vivo", + "SquidBanner": "Bandeira da Lula", + "TacticalSkeletonBanner": "Bandeira do Esqueleto Tático", + "TheGroomBanner": "Bandeira do Noivo", + "TimBanner": "Bandeira de Tim", + "UndeadMinerBanner": "Bandeira do Minerador Zumbi", + "UndeadVikingBanner": "Bandeira do Viking Zumbi", + "WhiteCultistArcherBanner": "Bandeira do Arqueiro Cultista Branco", + "NightOwlPotion": "Poção da Coruja da Noite", + "WhiteCultistCasterBanner": "Bandeira do Mago Cultista Branco", + "WhiteCultistFighterBanner": "Bandeira do Guerreiro Cultista Branco", + "YellowSlimeBanner": "Bandeira da Geleia Amarela", + "YetiBanner": "Bandeira do Yeti", + "ZombieElfBanner": "Bandeira do Elfo Zumbi", + "StoneBlock": "Bloco de Pedra", + "DirtWall": "Parede de Terra", + "BattlePotion": "Poção da Batalha", + "ThornsPotion": "Poção dos Espinhos", + "WaterWalkingPotion": "Poção para Andar Sobre a Água", + "ArcheryPotion": "Poção do Arqueiro", + "HunterPotion": "Poção do Caçador", + "GravitationPotion": "Poção da Gravidade", + "GoldChest": "Baú de Ouro", + "DaybloomSeeds": "Sementes do Nascer do Dia", + "MoonglowSeeds": "Sementes do Brilho da Lua", + "BlinkrootSeeds": "Sementes de Raiz Brilhante", + "Bottle": "Garrafa", + "DeathweedSeeds": "Sementes da Erva da Morte", + "WaterleafSeeds": "Sementes de Folha d'água", + "FireblossomSeeds": "Sementes do Florescer de Fogo", + "Daybloom": "Nascer do Dia", + "Moonglow": "Brilho da Lua", + "Blinkroot": "Raiz Brilhante", + "Deathweed": "Erva da Morte", + "Waterleaf": "Folha d'água", + "Fireblossom": "Florescer de Fogo", + "SharkFin": "Barbatana de Tubarão", + "WoodenTable": "Mesa de Madeira", + "Feather": "Pena", + "Tombstone": "Lápide", + "MimeMask": "Máscara de Mímico", + "AntlionMandible": "Mandíbula de Formiga-leão", + "IllegalGunParts": "Peças de Armas Ilegais", + "TheDoctorsShirt": "A Camisa do Médico", + "TheDoctorsPants": "As Calças do Médico", + "GoldenKey": "Chave Dourada", + "ShadowChest": "Baú das Sombras", + "ShadowKey": "Chave das Sombras", + "Furnace": "Fornalha", + "ObsidianBrickWall": "Parede de Tijolos de Obsidiana", + "JungleSpores": "Esporos da Selva", + "Loom": "Tear", + "Piano": "Piano", + "Dresser": "Cômoda", + "Bench": "Banquinho", + "Bathtub": "Banheira", + "RedBanner": "Faixa Vermelha", + "GreenBanner": "Faixa Verde", + "BlueBanner": "Faixa Azul", + "WoodenChair": "Cadeira de Madeira", + "YellowBanner": "Faixa Amarela", + "LampPost": "Poste", + "TikiTorch": "Tocha Tiki", + "Barrel": "Barril", + "ChineseLantern": "Lanterna Chinesa", + "CookingPot": "Panela", + "Safe": "Cofre", + "SkullLantern": "Lanterna de Caveira", + "TrashCan": "Lata de Lixo", + "PlatinumBow": "Arco de Platina", + "PlatinumHammer": "Martelo de Platina", + "PlatinumAxe": "Machado de Platina", + "PlatinumShortsword": "Espada Curta de Platina", + "PlatinumBroadsword": "Espada Larga de Platina", + "PlatinumPickaxe": "Picareta de Platina", + "TungstenBow": "Arco de Tungstênio", + "TungstenHammer": "Martelo de Tungstênio", + "TungstenAxe": "Machado de Tungstênio", + "TungstenShortsword": "Espada Curta de Tungstênio", + "Candelabra": "Candelabros", + "TungstenBroadsword": "Espada Larga de Tungstênio", + "TungstenPickaxe": "Picareta de Tungstênio", + "LeadBow": "Arco de Chumbo", + "LeadHammer": "Martelo de Chumbo", + "LeadAxe": "Machado de Chumbo", + "LeadShortsword": "Espada Curta de Chumbo", + "LeadBroadsword": "Espada Larga de Chumbo", + "LeadPickaxe": "Picareta de Chumbo", + "TinBow": "Arco de Estanho", + "TinHammer": "Martelo de Estanho", + "IronAnvil": "Bigorna de Ferro", + "PinkVase": "Vaso Cor-de-rosa", + "TinAxe": "Machado de Estanho", + "TinShortsword": "Espada Curta de Estanho", + "TinBroadsword": "Espada Larga de Estanho", + "TinPickaxe": "Picareta de Estanho", + "CopperBow": "Arco de Cobre", + "CopperHammer": "Martelo de Cobre", + "CopperAxe": "Machado de Cobre", + "CopperShortsword": "Espada Curta de Cobre", + "CopperBroadsword": "Espada Larga de Cobre", + "CopperPickaxe": "Picareta de Cobre", + "Mug": "Caneca", + "SilverBow": "Arco de Prata", + "SilverHammer": "Martelo de Prata", + "SilverAxe": "Machado de Prata", + "SilverShortsword": "Espada Curta de Prata", + "SilverBroadsword": "Espada Larga de Prata", + "SilverPickaxe": "Picareta de Prata", + "GoldBow": "Arco de Ouro", + "GoldHammer": "Martelo de Ouro", + "GoldAxe": "Machado de Ouro", + "GoldShortsword": "Espada Curta de Ouro", + "Keg": "Barril", + "GoldBroadsword": "Espada Larga de Ouro", + "GoldPickaxe": "Picareta de Ouro", + "Ale": "Cerveja", + "Bookcase": "Estante", + "Throne": "Trono", + "Bowl": "Tigela", + "BowlofSoup": "Tigela de Sopa", + "Toilet": "Privada", + "GrandfatherClock": "Relógio do Vovô", + "WorkBench": "Bancada de Trabalho", + "ArmorStatue": "Estátua de Armadura", + "GoblinBattleStandard": "Estandarte de Batalha de Goblins", + "TatteredCloth": "Pano Esfarrapado", + "Sawmill": "Serraria", + "CobaltOre": "Minério de Cobalto", + "MythrilOre": "Minério de Mithril", + "AdamantiteOre": "Minério de Adamantina", + "Pwnhammer": "Pwnhammer", + "Excalibur": "Excalibur", + "HallowedSeeds": "Sementes Consagradas", + "Goggles": "Óculos de Proteção", + "EbonsandBlock": "Bloco de Areia Escura", + "CobaltHat": "Chapéu de Cobalto", + "CobaltHelmet": "Elmo de Cobalto", + "CobaltMask": "Máscara de Cobalto", + "CobaltBreastplate": "Peitoral de Cobalto", + "CobaltLeggings": "Calças de Cobalto", + "MythrilHood": "Capuz de Mithril", + "MythrilHelmet": "Elmo de Mithril", + "MythrilHat": "Chapéu de Mithril", + "MythrilChainmail": "Cota de Malha de Mithril", + "Lens": "Lente", + "MythrilGreaves": "Grevas de Mithril", + "CobaltBar": "Barra de Cobalto", + "MythrilBar": "Barra de Mithril", + "CobaltChainsaw": "Serra-elétrica de Cobalto", + "MythrilChainsaw": "Serra-elétrica de Mithril", + "CobaltDrill": "Furadeira de Cobalto", + "MythrilDrill": "Furadeira de Mithril", + "AdamantiteChainsaw": "Serra-elétrica de Adamantina", + "AdamantiteDrill": "Furadeira de Adamantina", + "DaoofPow": "Poder de Dao", + "WoodenBow": "Arco de Madeira", + "MythrilHalberd": "Alabarda de Mithril", + "AdamantiteBar": "Barra de Adamantina", + "GlassWall": "Parede de Vidro", + "Compass": "Bússola", + "DivingGear": "Equipamento de Mergulho", + "GPS": "GPS", + "ObsidianHorseshoe": "Ferradura de Obsidiana", + "ObsidianShield": "Escudo de Obsidiana", + "TinkerersWorkshop": "Oficina do Inventor", + "CloudinaBalloon": "Nuvem no Balão", + "IronBroadsword": "Espada Larga de Ferro", + "WoodenArrow": "Flecha de Madeira", + "AdamantiteHeadgear": "Capacete de Adamantina", + "AdamantiteHelmet": "Elmo de Adamantina", + "AdamantiteMask": "Máscara de Adamantina", + "AdamantiteBreastplate": "Peitoral de Adamantina", + "AdamantiteLeggings": "Calças de Adamantina", + "SpectreBoots": "Botas Espectrais", + "AdamantiteGlaive": "Gládio de Adamantina", + "Toolbelt": "Cinto de Utilidades", + "PearlsandBlock": "Bloco de Areia-pérola", + "PearlstoneBlock": "Bloco de Pedra-pérola", + "FlamingArrow": "Flecha Flamejante", + "MiningShirt": "Camiseta de Minerador", + "MiningPants": "Calças de Minerador", + "PearlstoneBrick": "Tijolo de Pedra-pérola", + "IridescentBrick": "Tijolo Iridescente", + "MudstoneBlock": "Tijolo de Pedra-de-lama", + "CobaltBrick": "Tijolo de Cobalto", + "MythrilBrick": "Tijolo de Mithril", + "PearlstoneBrickWall": "Parede de Tijolos de Pedra-pérola", + "IridescentBrickWall": "Parede de Tijolos Iridescentes", + "MudstoneBrickWall": "Parede de Tijolos de Pedra-de-lama", + "Shuriken": "Estrela Ninja", + "CobaltBrickWall": "Parede de Tijolos de Cobalto", + "MythrilBrickWall": "Parede de Tijolos de Mithril", + "HolyWater": "Água Benta", + "UnholyWater": "Água Profana", + "SiltBlock": "Bloco de Limo", + "FairyBell": "Sino de Fadas", + "BreakerBlade": "Lâmina do Batedor", + "BlueTorch": "Tocha Azul", + "RedTorch": "Tocha Vermelha", + "GreenTorch": "Tocha Verde", + "SuspiciousLookingEye": "Olho Suspeito", + "PurpleTorch": "Tocha Roxa", + "WhiteTorch": "Tocha Branca", + "YellowTorch": "Tocha Amarela", + "DemonTorch": "Tocha Demoníaca", + "ClockworkAssaultRifle": "Fuzil de Assalto Relógio", + "CobaltRepeater": "Repetidora de Cobalto", + "MythrilRepeater": "Repetidora de Mithril", + "DualHook": "Gancho Duplo", + "StarStatue": "Estátua de Estrela", + "SwordStatue": "Estátua de Espada", + "DemonBow": "Arco Demoníaco", + "SlimeStatue": "Estátua de Geleia", + "GoblinStatue": "Estátua de Goblin", + "ShieldStatue": "Estátua de Escudo", + "BatStatue": "Estátua de Morcego", + "FishStatue": "Estátua de Peixe", + "BunnyStatue": "Estátua de Coelhinho", + "SkeletonStatue": "Estátua de Esqueleto", + "ReaperStatue": "Estátua da Morte", + "WomanStatue": "Estátua da Mulher", + "ImpStatue": "Estátua de Demônio", + "WarAxeoftheNight": "Machado de Guerra da Noite", + "GargoyleStatue": "Estátua de Gárgula", + "GloomStatue": "Estátua da Tristeza", + "HornetStatue": "Estátua da Vespa", + "BombStatue": "Estátua da Bomba", + "CrabStatue": "Estátua do Caranguejo", + "HammerStatue": "Estátua de Martelo", + "PotionStatue": "Estátua de Poção", + "SpearStatue": "Estátua de Lança", + "CrossStatue": "Estátua de Cruz", + "JellyfishStatue": "Estátua de Água Viva", + "LightsBane": "Destruidor da Luz", + "BowStatue": "Estátua de Arco", + "BoomerangStatue": "Estátua de Bumerangue", + "BootStatue": "Estátua de Bota", + "ChestStatue": "Estátua de Baú", + "BirdStatue": "Estátua de Pássaro", + "AxeStatue": "Estátua de Machado", + "CorruptStatue": "Estátua Corrompida", + "TreeStatue": "Estátua de Árvore", + "AnvilStatue": "Estátua de Bigorna", + "PickaxeStatue": "Estátua de Picareta", + "UnholyArrow": "Flecha Profana", + "MushroomStatue": "Estátua de Cogumelo", + "EyeballStatue": "Estátua de Globo Ocular", + "PillarStatue": "Estátua de Coluna", + "HeartStatue": "Estátua de Coração", + "PotStatue": "Estátua de Vaso", + "SunflowerStatue": "Estátua de Girassol", + "KingStatue": "Estátua do Rei", + "QueenStatue": "Estátua da Rainha", + "PiranhaStatue": "Estátua de Piranha", + "PlankedWall": "Parede com Tábuas", + "Chest": "Baú", + "WoodenBeam": "Viga de Madeira", + "AdamantiteRepeater": "Repetidora de Adamantina", + "AdamantiteSword": "Espada de Adamantina", + "CobaltSword": "Espada de Cobalto", + "MythrilSword": "Espada de Mithril", + "MoonCharm": "Amuleto da Lua", + "Ruler": "Régua", + "CrystalBall": "Bola de Cristal", + "DiscoBall": "Globo de Discoteca", + "SorcererEmblem": "Emblema do Feiticeiro", + "BandofRegeneration": "Pulseira da Regeneração", + "WarriorEmblem": "Emblema do Guerreiro", + "RangerEmblem": "Emblema do Vigia", + "DemonWings": "Asas Demoníacas", + "AngelWings": "Asas Angelicais", + "MagicalHarp": "Harpia Mágica", + "RainbowRod": "Bastão de Arco-íris", + "IceRod": "Bastão de Gelo", + "NeptunesShell": "Concha de Netuno", + "Mannequin": "Manequim", + "GreaterHealingPotion": "Poção de Cura Avançada", + "Mushroom": "Cogumelo", + "MagicMirror": "Espelho Mágico", + "GreaterManaPotion": "Poção de Mana Avançada", + "PixieDust": "Pó de Pixie", + "CrystalShard": "Fragmento de Cristal", + "ClownHat": "Chapéu de Palhaço", + "ClownShirt": "Camiseta de Palhaço", + "ClownPants": "Calças de Palhaço", + "Flamethrower": "Lança-Chamas", + "Bell": "Sino", + "Harp": "Harpia", + "Wrench": "Chave Inglesa Vermelha", + "JestersArrow": "Flecha do Jester", + "WireCutter": "Corta-fios", + "ActiveStoneBlock": "Bloco de Pedra Ativado", + "InactiveStoneBlock": "Bloco de Pedra Desativado", + "Lever": "Alavanca", + "LaserRifle": "Fuzil de Laser", + "CrystalBullet": "Projétil de Cristal", + "HolyArrow": "Flecha Consagrada", + "MagicDagger": "Adaga Mágica", + "CrystalStorm": "Tempestade de Cristal", + "CursedFlames": "Chamas Amaldiçoadas", + "AngelStatue": "Estátua de Anjo", + "SoulofLight": "Alma da Luz", + "SoulofNight": "Alma da Noite", + "CursedFlame": "Chama Amaldiçoada", + "CursedTorch": "Tocha Amaldiçoada", + "AdamantiteForge": "Forja de Adamantina", + "MythrilAnvil": "Bigorna de Mithril", + "UnicornHorn": "Chifre de Unicórnio", + "DarkShard": "Estilhaço das Trevas", + "LightShard": "Estilhaço de Luz", + "RedPressurePlate": "Placa de Pressão Vermelha", + "CloudinaBottle": "Nuvem na Garrafa", + "Wire": "Fio", + "SpellTome": "Tomo de Feitiço", + "StarCloak": "Manto das Estrelas", + "Megashark": "Megatubarão", + "Shotgun": "Espingarda", + "PhilosophersStone": "Pedra Filosofal", + "TitanGlove": "Luva de Titã", + "CobaltNaginata": "Naginata de Cobalto", + "Switch": "Interruptor", + "DartTrap": "Armadilha com Dardos", + "HermesBoots": "Botas de Hermes", + "Boulder": "Rochedo", + "GreenPressurePlate": "Placa de Pressão Verde", + "GrayPressurePlate": "Placa de Pressão Cinza", + "BrownPressurePlate": "Placa de Pressão Marrom", + "MechanicalEye": "Olho Mecânico", + "CursedArrow": "Flecha Amaldiçoada", + "CursedBullet": "Projétil Amaldiçoada", + "SoulofFright": "Alma do Medo", + "SoulofMight": "Alma da Força", + "SoulofSight": "Alma da Visão", + "EnchantedBoomerang": "Bumerangue Encantado", + "Gungnir": "Gungnir", + "HallowedPlateMail": "Armadura de Placas Consagradas", + "HallowedGreaves": "Grevas Consagradas", + "HallowedHelmet": "Elmo Consagrado", + "CrossNecklace": "Colar com Cruz", + "ManaFlower": "Flor de Mana", + "MechanicalWorm": "Verme Mecânico", + "MechanicalSkull": "Caveira Mecânica", + "HallowedHeadgear": "Capacete Consagrado", + "HallowedMask": "Máscara Consagrada", + "DemoniteOre": "Minério de Demonita", + "SlimeCrown": "Coroa de Geleia", + "LightDisc": "Disco de Luz", + "MusicBoxOverworldDay": "Caixinha de Música (Dia no Mundo Superior)", + "MusicBoxEerie": "Caixinha de Música (Sinistra)", + "MusicBoxNight": "Caixinha de Música (Noite)", + "MusicBoxTitle": "Caixinha de Música (Título)", + "MusicBoxUnderground": "Caixinha de Música (Subterrâneo)", + "MusicBoxBoss1": "Caixinha de Música (Chefe 1)", + "MusicBoxJungle": "Caixinha de Música (Selva)", + "MusicBoxCorruption": "Caixinha de Música (Corrupção)", + "DemoniteBar": "Barra de Demonita", + "MusicBoxUndergroundCorruption": "Caixinha de Música (Corrupção no Submundo)", + "MusicBoxTheHallow": "Caixinha de Música (O Sagrado)", + "MusicBoxBoss2": "Caixinha de Música (Chefe 2)", + "MusicBoxUndergroundHallow": "Caixinha de Música (O Sagrado no Subterrâneo)", + "MusicBoxBoss3": "Caixinha de Música (Chefe 3)", + "SoulofFlight": "Alma do Voo", + "MusicBox": "Caixinha de Música", + "DemoniteBrick": "Tijolo de Demonita", + "HallowedRepeater": "Repetidora Consagrada", + "Drax": "Drax", + "Heart": "Coração", + "Explosives": "Explosivos", + "InletPump": "Bomba de Entrada", + "OutletPump": "Bomba de Saída", + "Timer1Second": "Temporizador de 1 Segundo", + "Timer3Second": "Temporizador de 3 Segundos", + "Timer5Second": "Temporizador de 5 Segundos", + "CandyCaneBlock": "Bloco de Coce", + "CandyCaneWall": "Parede de Doce", + "SantaHat": "Chapéu de Papai Noel", + "SantaShirt": "Camiseta de Papai Noel", + "CorruptSeeds": "Sementes Corrompidas", + "SantaPants": "Calça de Papai Noel", + "GreenCandyCaneBlock": "Bloco de Doce Verde", + "GreenCandyCaneWall": "Parede de Doce Verde", + "SnowBlock": "Bloco de Neve", + "SnowBrick": "Tijolo de Neve", + "SnowBrickWall": "Parede de Tijolos de Neve", + "BlueLight": "Luz Azul", + "RedLight": "Luz Vermelha", + "GreenLight": "Luz Verde", + "BluePresent": "Presente Azul", + "IronShortsword": "Espada Curta de Ferro", + "VileMushroom": "Cogumelo Infame", + "GreenPresent": "Presente Verde", + "YellowPresent": "Presente Amarelo", + "SnowGlobe": "Globo de Neve", + "Carrot": "Cenoura", + "AdamantiteBeam": "Viga de Adamantina", + "AdamantiteBeamWall": "Parede de Viga de Adamantina", + "DemoniteBrickWall": "Parede de Tijolos de Demonita", + "SandstoneBrick": "Tijolo de Arenito", + "SandstoneBrickWall": "Parede de Tijolo de Arenito", + "EbonstoneBrick": "Tijolo de Pedra de Ébano", + "EbonstoneBlock": "Bloco de Pedra Negra", + "EbonstoneBrickWall": "Parede de Tijolo de Pedra de Ébano", + "RedStucco": "Estuque Vermelho", + "YellowStucco": "Estuque Amarelo", + "GreenStucco": "Estuque Verde", + "GrayStucco": "Estuque Cinza", + "RedStuccoWall": "Parede de Estuque Vermelho", + "YellowStuccoWall": "Parede de Estuque Amarelo", + "GreenStuccoWall": "Parede de Estuque Verde", + "GrayStuccoWall": "Parede de Estuque Cinza", + "Ebonwood": "Madeira de Ébano", + "GrassSeeds": "Sementes de Grama", + "RichMahogany": "Mogno", + "Pearlwood": "Madeira Pérola", + "EbonwoodWall": "Parede de Madeira de Ébano", + "RichMahoganyWall": "Parede de Mogno", + "PearlwoodWall": "Parede de Madeira Pérola", + "EbonwoodChest": "Baú de Madeira de Ébano", + "RichMahoganyChest": "Baú de Mogno", + "PearlwoodChest": "Baú de Madeira Pérola", + "EbonwoodChair": "Cadeira de Madeira de Ébano", + "RichMahoganyChair": "Cadeira de Mogno", + "Sunflower": "Girassol", + "PearlwoodChair": "Cadeira de Madeira Pérola", + "EbonwoodPlatform": "Plataforma de Madeira de Ébano", + "RichMahoganyPlatform": "Plataforma de Mogno", + "PearlwoodPlatform": "Plataforma de Madeira Pérola", + "BonePlatform": "Plataforma de Osso", + "EbonwoodWorkBench": "Bancada de Trabalho de Madeira de Ébano", + "RichMahoganyWorkBench": "Bancada de Trabalho de Mogno", + "PearlwoodWorkBench": "Bancada de Trabalho de Madeira Pérola", + "EbonwoodTable": "Mesa de Madeira de Ébano", + "RichMahoganyTable": "Mesa de Mogno", + "Vilethorn": "Espinho Infame", + "PearlwoodTable": "Mesa de Madeira Pérola", + "EbonwoodPiano": "Piano de Madeira de Ébano", + "RichMahoganyPiano": "Piano de Mogno", + "PearlwoodPiano": "Piano de Madeira Pérola", + "EbonwoodBed": "Cama de Madeira de Ébano", + "RichMahoganyBed": "Cama de Mogno", + "PearlwoodBed": "Cama de Madeira Pérola", + "EbonwoodDresser": "Cômoda de Madeira de Ébano", + "RichMahoganyDresser": "Cômoda de Mogno", + "PearlwoodDresser": "Cômoda de Madeira Pérola", + "Starfury": "Fúria das Estrelas", + "EbonwoodDoor": "Porta de Madeira de Ébano", + "RichMahoganyDoor": "Porta de Mogno", + "PearlwoodDoor": "Porta de Madeira Pérola", + "EbonwoodSword": "Espada de Madeira de Ébano", + "EbonwoodHammer": "Martelo de Madeira de Ébano", + "EbonwoodBow": "Arco de Madeira de Ébano", + "RichMahoganySword": "Espada de Mogno", + "RichMahoganyHammer": "Martelo de Mogno", + "RichMahoganyBow": "Arco de Mogno", + "PearlwoodSword": "Espada de Madeira Pérola", + "PurificationPowder": "Pó Purificador", + "PearlwoodHammer": "Martelo de Madeira Pérola", + "PearlwoodBow": "Arco de Madeira Pérola", + "RainbowBrick": "Tijolo de Arco-íris", + "RainbowBrickWall": "Parede de Tijolos de Arco-íris", + "IceBlock": "Bloco de Gelo", + "RedsWings": "Asas de Redigit", + "RedsHelmet": "Elmo de Redigit", + "RedsBreastplate": "Peitoral de Redigit", + "RedsLeggings": "Calças de Redigit", + "Fish": "Peixes", + "VilePowder": "Pó Infame", + "IceBoomerang": "Bumerangue de Gelo", + "Keybrand": "Keybrand", + "Cutlass": "Cutlass", + "TrueExcalibur": "Verdadeira Excalibur", + "TrueNightsEdge": "Verdadeira Lâmina da Noite", + "Frostbrand": "Frostbrand", + "RedPotion": "Poção Vermelha", + "TacticalShotgun": "Espingarda Tática", + "RottenChunk": "Pedaço Podre", + "IvyChest": "Baú de Hera", + "Marrow": "Abóbora", + "UnholyTrident": "Tridente Profano", + "FrostHelmet": "Elmo Congelado", + "FrostBreastplate": "Peitoral Congelado", + "FrostLeggings": "Calças Congeladas", + "TinHelmet": "Elmo de Estanho", + "TinChainmail": "Cota de Malha de Estanho", + "TinGreaves": "Grevas de Estanho", + "WormTooth": "Presa de Verme", + "LeadHelmet": "Elmo de Chumbo", + "LeadChainmail": "Cota de Malha de Chumbo", + "LeadGreaves": "Grevas de Chumbo", + "TungstenHelmet": "Elmo de Tungstênio", + "TungstenChainmail": "Cota de Malha de Tungstênio", + "TungstenGreaves": "Grevas de Tungstênio", + "PlatinumHelmet": "Elmo de Platina", + "PlatinumChainmail": "Cota de Malha de Platina", + "PlatinumGreaves": "Grevas de Platina", + "TinOre": "Minério de Estanho", + "IronHammer": "Martelo de Ferro", + "WormFood": "Comida de Verme", + "LeadOre": "Minério de Chumbo", + "TungstenOre": "Minério de Tungstênio", + "PlatinumOre": "Minério de Platina", + "TinBar": "Barra de Estanho", + "LeadBar": "Barra de Chumbo", + "TungstenBar": "Barra de Tungstênio", + "PlatinumBar": "Barra de Platina", + "TinWatch": "Relógio de Estanho", + "TungstenWatch": "Relógio de Tungstênio", + "PlatinumWatch": "Relógio de Platina", + "CopperCoin": "Moeda de Cobre", + "TinChandelier": "Lustre de Estanho", + "TungstenChandelier": "Lustre de Tungstênio", + "PlatinumChandelier": "Lustre de Platina", + "PlatinumCandle": "Vela de Platina", + "PlatinumCandelabra": "Candelabro de Platina", + "PlatinumCrown": "Coroa de Platina", + "LeadAnvil": "Bigorna de Chumbo", + "TinBrick": "Tijolo de Estanho", + "TungstenBrick": "Tijolo de Tungstênio", + "PlatinumBrick": "Tijolo de Platina", + "SilverCoin": "Moeda de Prata", + "TinBrickWall": "Parede de Tijolos de Estanho", + "TungstenBrickWall": "Parede de Tijolos de Tungstênio", + "PlatinumBrickWall": "Parede de Tijolos de Platina", + "BeamSword": "Espada de Feixes", + "IceBlade": "Lâmina de Gelo", + "IceBow": "Arco de Gelo", + "FrostStaff": "Cajado Congelado", + "WoodHelmet": "Elmo de Madeira", + "WoodBreastplate": "Peitoral de Madeira", + "WoodGreaves": "Grevas de Madeira", + "GoldCoin": "Moeda de Ouro", + "EbonwoodHelmet": "Elmo de Madeira de Ébano", + "EbonwoodBreastplate": "Peitoral de Madeira de Ébano", + "EbonwoodGreaves": "Grevas de Madeira de Ébano", + "RichMahoganyHelmet": "Elmo de Mogno", + "RichMahoganyBreastplate": "Peitoral de Mogno", + "RichMahoganyGreaves": "Grevas de Mogno", + "PearlwoodHelmet": "Elmo de Madeira Pérola", + "PearlwoodBreastplate": "Peitoral de Madeira Pérola", + "PearlwoodGreaves": "Grevas de Madeira Pérola", + "AmethystStaff": "Cajado de Ametista", + "PlatinumCoin": "Moeda de Platina", + "TopazStaff": "Cajado de Topázio", + "SapphireStaff": "Cajado de Safira", + "EmeraldStaff": "Cajado de Esmeralda", + "RubyStaff": "Cajado de Rubi", + "DiamondStaff": "Cajado de Diamante", + "GrassWall": "Parede de Grama", + "JungleWall": "Parede de Selva", + "FlowerWall": "Parede de Flores", + "Jetpack": "Jetpack", + "ButterflyWings": "Asas de Borboleta", + "FallenStar": "Estrela Caída", + "CactusWall": "Parede de Cacto", + "Cloud": "Nuvem", + "CloudWall": "Parede de Nuvens", + "Seaweed": "Alga", + "RuneHat": "Chapéu de Runas", + "RuneRobe": "Roupão de Runas", + "MushroomSpear": "Lança de Cogumelos", + "TerraBlade": "Lâmina da Terra", + "GrenadeLauncher": "Lança-granadas", + "RocketLauncher": "Lança-foguetes", + "CopperGreaves": "Grevas de Cobre", + "ProximityMineLauncher": "Lança-minas de Proximidade", + "FairyWings": "Asas de Fada", + "SlimeBlock": "Bloco de Geleia", + "FleshBlock": "Bloco de Carne", + "MushroomWall": "Parede de Cogumelos", + "RainCloud": "Nuvem de Chuva", + "BoneBlock": "Bloco de Ossos", + "FrozenSlimeBlock": "Bloco de Geleia Congelada", + "BoneBlockWall": "Parede de Blocos de Ossos", + "SlimeBlockWall": "Parede de Blocos de Geleia", + "IronGreaves": "Grevas de Ferro", + "FleshBlockWall": "Parede de Blocos de Carne", + "RocketI": "Foguete I", + "RocketII": "Foguete II", + "RocketIII": "Foguete III", + "RocketIV": "Foguete IV", + "AsphaltBlock": "Bloco de Asfalto", + "CobaltPickaxe": "Picareta de Cobalto", + "MythrilPickaxe": "Picareta de Mithril", + "AdamantitePickaxe": "Picareta de Adamantina", + "Clentaminator": "Limpaminador", + "SilverGreaves": "Grevas de Prata", + "GreenSolution": "Solução Verde", + "BlueSolution": "Solução Azul", + "PurpleSolution": "Solução Roxa", + "DarkBlueSolution": "Solução Azul Escura", + "RedSolution": "Solução Vermelha", + "HarpyWings": "Asas de Harpia", + "BoneWings": "Asas de Osso", + "Hammush": "Cogumartelo", + "NettleBurst": "Explosão de Urtiga", + "AnkhBanner": "Bandeira de Ank", + "GoldGreaves": "Grevas de Ouro", + "SnakeBanner": "Bandeira da Cobra", + "OmegaBanner": "Bandeira de Ômega", + "CrimsonHelmet": "Elmo de Carmim", + "CrimsonScalemail": "Armadura de Placas de Carmim", + "CrimsonGreaves": "Grevas de Carmim", + "BloodButcherer": "Açougueiro Sangrento", + "TendonBow": "Arco do Tendão", + "FleshGrinder": "Moedor de Carne", + "DeathbringerPickaxe": "Picareta da Morte", + "BloodLustCluster": "Machado da Cobiça por Sangue", + "Torch": "Tocha", + "CopperChainmail": "Cota de Malha de Cobre", + "TheUndertaker": "O Coveiro", + "TheMeatball": "A Almôndega", + "TheRottedFork": "O Garfo Podre", + "LivingWoodChair": "Cadeira de Madeira Viva", + "CactusChair": "Cadeira de Cactos", + "BoneChair": "Cadeira de Osso", + "FleshChair": "Cadeira de Carne", + "IronChainmail": "Cota de Malha de Ferro", + "MushroomChair": "Cadeira de Cogumelo", + "BoneWorkBench": "Bancada de Trabalho de Osso", + "CactusWorkBench": "Bancada de Trabalho de Cactos", + "FleshWorkBench": "Bancada de Trabalho de Carne", + "MushroomWorkBench": "Bancada de Trabalho de Cogumelo", + "SlimeWorkBench": "Bancada de Trabalho de Geleia", + "CactusDoor": "Porta de Cactos", + "FleshDoor": "Porta de Carne", + "MushroomDoor": "Porta de Cogumelo", + "LivingWoodDoor": "Porta de Madeira Viva", + "SilverChainmail": "Cota de Malha de Prata", + "BoneDoor": "Porta de Osso", + "FlameWings": "Asas em Chamas", + "FrozenWings": "Asas Congeladas", + "GhostWings": "Asas do Espectro", + "SunplateBlock": "Bloco de Placa Solar", + "DiscWall": "Parede de Discos", + "SkywareChair": "Cadeira Celeste", + "BoneTable": "Mesa de Osso", + "FleshTable": "Mesa de Carne", + "LivingWoodTable": "Mesa de Madeira Viva", + "GoldChainmail": "Cota de Malha de Ouro", + "SkywareTable": "Mesa Celeste", + "LivingWoodChest": "Baú de Madeira Viva", + "LivingWoodWand": "Varinha de Madeira Viva", + "PurpleIceBlock": "Bloco de Gelo Roxo", + "PinkIceBlock": "Bloco de Gelo Cor-de-rosa", + "RedIceBlock": "Bloco de Gelo Vermelho", + "CrimstoneBlock": "Bloco de Pedra Carmim", + "SkywareDoor": "Porta Celeste", + "SkywareChest": "Baú Celeste", + "SteampunkHat": "Chapéu Steampunk", + "GrapplingHook": "Gancho com Corrente", + "SteampunkShirt": "Camisa Steampunk", + "SteampunkPants": "Calça Steampunk", + "BeeHat": "Chapéu de Abelha", + "BeeShirt": "Camisa de Abelha", + "BeePants": "Calça de Abelha", + "WorldBanner": "Bandeira do Mundo", + "SunBanner": "Bandeira do Sol", + "GravityBanner": "Bandeira da Gravidade", + "PharaohsMask": "Máscara do Faraó", + "Actuator": "Atuador", + "Chain": "Corrente", + "BlueWrench": "Chave Inglesa Azul", + "GreenWrench": "Chave Inglesa Verde", + "BluePressurePlate": "Placa de Pressão Azul", + "YellowPressurePlate": "Placa de Pressão Amarela", + "DiscountCard": "Cartão de Desconto", + "LuckyCoin": "Moeda da Sorte", + "UnicornonaStick": "Unicórnio de Pau", + "SandstorminaBottle": "Tempestade de Areia na Garrafa", + "BeachBall": "Bola de Praia", + "ShadowScale": "Placa das Sombras", + "CharmofMyths": "Amuleto dos Mitos", + "MoonShell": "Concha da Lua", + "StarVeil": "Véu das Estrelas", + "WaterWalkingBoots": "Botas para Andar Sobre a Água", + "Tiara": "Tiara", + "PrincessDress": "Vestido de Princesa", + "PharaohsRobe": "Roupão do Faraó", + "GreenCap": "Boné Verde", + "MushroomCap": "Boné de Cogumelo", + "TamOShanter": "Tam O' Shanter", + "PiggyBank": "Porquinho", + "MummyMask": "Máscara de Múmia", + "MummyShirt": "Camisa de Múmia", + "MummyPants": "Calça do Múmia", + "CowboyHat": "Chapéu de Cowboy", + "CowboyJacket": "Jaqueta de Cowboy", + "CowboyPants": "Calça de Cowboy", + "PirateHat": "Chapéu de Pirata", + "PirateShirt": "Camisa de Pirata", + "PiratePants": "Calça de Pirata", + "VikingHelmet": "Elmo de Viking", + "MiningHelmet": "Capacete de Minerador", + "CrimtaneOre": "Minério de Carmim", + "CactusSword": "Espada de Cacto", + "CactusPickaxe": "Picareta de Cacto", + "IceBrick": "Tijolo de Gelo", + "IceBrickWall": "Parede de Tijolos de Gelo", + "AdhesiveBandage": "Curativo Adesivo", + "ArmorPolish": "Polidor de Armadura", + "Bezoar": "Bezoar", + "Blindfold": "Venda", + "FastClock": "Relógio Adiantado", + "CopperHelmet": "Elmo de Cobre", + "Megaphone": "Megafone", + "Nazar": "Nazar", + "Vitamins": "Vitaminas", + "TrifoldMap": "Mapa em Três Partes", + "CactusHelmet": "Elmo de Cactos", + "CactusBreastplate": "Peitoral de Cactos", + "CactusLeggings": "Calças de Cactos", + "PowerGlove": "Luva do Poder", + "LightningBoots": "Botas Relâmpago", + "SunStone": "Pedra do Sol", + "Wood": "Madeira", + "IronHelmet": "Elmo de Ferro", + "MoonStone": "Pedra da Lua", + "ArmorBracing": "Reforço de Armadura", + "MedicatedBandage": "Curativo Medicado", + "ThePlan": "O Plano", + "CountercurseMantra": "Mantra Contra Maldições", + "CoinGun": "Pistola de Moedas", + "LavaCharm": "Amuleto de Lava", + "ObsidianWaterWalkingBoots": "Botas para Andar Sobre a Água de Obsidiana", + "LavaWaders": "Botas de Lava", + "PureWaterFountain": "Fonte de Água Pura", + "SilverHelmet": "Elmo de Prata", + "DesertWaterFountain": "Fonte d'água no Deserto", + "Shadewood": "Madeira Escura", + "ShadewoodDoor": "Porta de Madeira Escura", + "ShadewoodPlatform": "Plataforma de Madeira Escura", + "ShadewoodChest": "Baú de Madeira Escura", + "ShadewoodChair": "Cadeira de Madeira Escura", + "ShadewoodWorkBench": "Bancada de Trabalho de Madeira Escura", + "ShadewoodTable": "Mesa de Madeira Escura", + "ShadewoodDresser": "Cômoda de Madeira Escura", + "ShadewoodPiano": "Piano de Madeira Escura", + "GoldHelmet": "Elmo de Ouro", + "ShadewoodBed": "Cama de Madeira Escura", + "ShadewoodSword": "Espada de Madeira Escura", + "ShadewoodHammer": "Martelo de Madeira Escura", + "ShadewoodBow": "Arco de Madeira Escura", + "ShadewoodHelmet": "Elmo de Madeira Escura", + "ShadewoodBreastplate": "Peitoral de Madeira Escura", + "ShadewoodGreaves": "Grevas de Madeira Escura", + "ShadewoodWall": "Parede de Madeira Escura", + "Cannon": "Canhão", + "Cannonball": "Bala de Canhão", + "WoodWall": "Parede de Madeira", + "FlareGun": "Pistola de Sinalização", + "Flare": "Sinalizador", + "BoneWand": "Varinha de Osso", + "LeafWand": "Varinha de Folhas", + "FlyingCarpet": "Tapete Mágico", + "AvengerEmblem": "Emblema do Vingador", + "MechanicalGlove": "Luva Mecânica", + "LandMine": "Mina Terrestre", + "PaladinsShield": "Escudo do Paladino", + "WebSlinger": "Lançador de Teia", + "WoodPlatform": "Plataforma de Madeira", + "JungleWaterFountain": "Fonte de Água na Selva", + "IcyWaterFountain": "Fonte de Água Gelada", + "CorruptWaterFountain": "Fonte de Água Corrompida", + "CrimsonWaterFountain": "Fonte de Água de Carmim", + "HallowedWaterFountain": "Fonte de Água de Consagrada", + "BloodWaterFountain": "Fonte de Água Sangrenta", + "Umbrella": "Guarda-chuva", + "ChlorophyteOre": "Minério de Clorofita", + "SteampunkWings": "Asas Steampunk", + "Snowball": "Bola de Neve", + "FlintlockPistol": "Pistola Antiga", + "IceSkates": "Patins de Gelo", + "SnowballLauncher": "Lançador de Bolas de Neve", + "WebCoveredChest": "Baú Coberto de Teias", + "ClimbingClaws": "Garras para Escalada", + "AncientIronHelmet": "Elmo de Ferro Antigo", + "AncientGoldHelmet": "Elmo de Ouro Antigo", + "AncientShadowHelmet": "Elmo das Sombras Antigo", + "AncientShadowScalemail": "Armadura de Placas das Sombras Antiga", + "AncientShadowGreaves": "Grevas das Sombras Antiga", + "AncientNecroHelmet": "Elmo Necrosado Antigo", + "Musket": "Mosquete", + "AncientCobaltHelmet": "Elmo de Cobalto Antigo", + "AncientCobaltBreastplate": "Peitoral de Cobalto Antigo", + "AncientCobaltLeggings": "Calças de Cobalto Antigas", + "BlackBelt": "Faixa Preta", + "Boomstick": "Cabo de Vassoura", + "Rope": "Corda", + "Campfire": "Fogueira", + "Marshmallow": "Marshmallow", + "MarshmallowonaStick": "Marshmallow no Palito", + "CookedMarshmallow": "Marshmallow Assado", + "MusketBall": "Bola de Mosquete", + "RedRocket": "Foguete Vermelho", + "GreenRocket": "Foguete Verde", + "BlueRocket": "Foguete Azul", + "YellowRocket": "Foguete Amarelo", + "IceTorch": "Tocha de Gelo", + "ShoeSpikes": "Espetos para Sapatos", + "TigerClimbingGear": "Equipamento de Escalada de Tigre", + "Tabi": "Tabi", + "Minishark": "Mini-tubarão", + "PinkThread": "Fio Cor-de-rosa", + "ManaRegenerationBand": "Pulseira de Regeneração de Mana", + "SandstorminaBalloon": "Tempestade de Areia no Balão", + "MasterNinjaGear": "Equipamento de Mestre Ninja", + "RopeCoil": "Rolo de Corda", + "Blowgun": "Zarabatana", + "BlizzardinaBottle": "Nevasca na Garrafa", + "FrostburnArrow": "Flecha de Queimadura de Gelo", + "EnchantedSword": "Espada Encantada", + "IronBow": "Arco de Ferro", + "PickaxeAxe": "Machado Picareta", + "CobaltWaraxe": "Machado de Guerra de Cobalto", + "MythrilWaraxe": "Machado de Guerra de Mithril", + "AdamantiteWaraxe": "Machado de Guerra de Adamantina", + "EatersBone": "Osso do Devorador", + "BlendOMatic": "Misturador Automático", + "MeatGrinder": "Moedor de Carne", + "Extractinator": "Extrator", + "Solidifier": "Solidificador", + "Amber": "Âmbar", + "AcidDye": "Tintura Ácida", + "ActuationAccessory": "Pré-serra", + "ActuationRod": "Bastão Acionador", + "AlchemyTable": "Mesa do Alquimista", + "AlphabetStatue0": "'Estátua 0'", + "AlphabetStatue1": "'Estátua 1'", + "AlphabetStatue2": "'Estátua 2'", + "AlphabetStatue3": "'Estátua 3'", + "AlphabetStatue4": "'Estátua 4'", + "AlphabetStatue5": "'Estátua 5'", + "AlphabetStatue6": "'Estátua 6'", + "AlphabetStatue7": "'Estátua 7'", + "AlphabetStatue8": "'Estátua 8'", + "AlphabetStatue9": "'Estátua 9'", + "AlphabetStatueA": "'Estátua A'", + "AlphabetStatueB": "'Estátua B'", + "AlphabetStatueC": "'Estátua C'", + "AlphabetStatueD": "'Estátua D'", + "AlphabetStatueE": "'Estátua E'", + "AlphabetStatueF": "'Estátua F'", + "AlphabetStatueG": "'Estátua G'", + "AlphabetStatueH": "'Estátua H'", + "AlphabetStatueI": "'Estátua I'", + "AlphabetStatueJ": "'Estátua J'", + "AlphabetStatueK": "'Estátua K'", + "AlphabetStatueL": "'Estátua L'", + "AlphabetStatueM": "'Estátua M'", + "AlphabetStatueN": "'Estátua N'", + "AlphabetStatueO": "'Estátua O'", + "AlphabetStatueP": "'Estátua P'", + "AlphabetStatueQ": "'Estátua Q'", + "AlphabetStatueR": "'Estátua R'", + "AlphabetStatueS": "'Estátua S'", + "AlphabetStatueT": "'Estátua T'", + "AlphabetStatueU": "'Estátua U'", + "AlphabetStatueV": "'Estátua V'", + "AlphabetStatueW": "'Estátua W'", + "AlphabetStatueX": "'Estátua X'", + "AlphabetStatueY": "'Estátua Y'", + "AlphabetStatueZ": "'Estátua Z'", + "Amarok": "Amarok", + "AmberGemsparkWall": "Parede de Pedras de Âmbar Brilhantes", + "AmberGemsparkWallOff": "Parede de Pedras de Âmbar Brilhantes Offline", + "AmberStaff": "Cajado de Âmbar", + "AmethystGemsparkWall": "Parede de Pedras de Ametista Brilhantes", + "AmethystGemsparkWallOff": "Parede de Pedras de Ametista Brilhantes Offline", + "AncientArmorHat": "Cabeça Antiga", + "AncientArmorPants": "Calças Antigas", + "AncientArmorShirt": "Vestes Antigas", + "AncientBattleArmorHat": "Máscara Proibida", + "AncientBattleArmorMaterial": "Fragmento Proibido", + "AncientBattleArmorPants": "Botas Proibidas", + "AncientBattleArmorShirt": "Roupão Proibido", + "AncientCloth": "Tecido Antigo", + "AncientHorn": "Chifre Antigo", + "AnglerTackleBag": "Bolsa do Pescador", + "AngryBonesBanner": "Bandeira dos Ossos Furiosos", + "AnnouncementBox": "Caixa de Anúncios", + "AntiGravityHook": "Gancho Antigravitacional", + "AntlionClaw": "Lâmina da Mandíbula", + "ApprenticeBait": "Isca de Principiantes", + "ApprenticeHat": "Chapéu do Aprendiz", + "ApprenticeRobe": "Roupão do Aprendiz", + "ApprenticeScarf": "Cachecol do Aprendiz", + "ApprenticeTrousers": "Calças do Aprendiz", + "ArchitectGizmoPack": "Pacote de Itens do Arquiteto", + "Arkhalis": "Arkhalis", + "AviatorSunglasses": "Óculos de 0x33", + "Bacon": "Bacon", + "BalloonHorseshoeFart": "Balão da Ferradura Verde", + "BalloonHorseshoeHoney": "Balão da Ferradura de Âmbar", + "BalloonHorseshoeSharkron": "Balão da Ferradura Cor-de-rosa", + "BalloonPufferfish": "Balão de Baiacu", + "BeeMask": "Máscara da Abelha Rainha", + "BeesKnees": "Abelharco", + "BejeweledValkyrieBody": "Manto Valquíria de Lazure", + "BejeweledValkyrieHead": "Coroa Valquíria de Lazure", + "BejeweledValkyrieWing": "Barreira-plataforma de Lazure", + "BewitchingTable": "Mesa de Feitiçaria", + "BlackAndWhiteDye": "Tintura Preto e Branco", + "BlackCounterweight": "Contrapeso Preto", + "BlackString": "Cordão Preto", + "Bladetongue": "Espada-língua", + "BlessedApple": "Maçã Abençoada", + "BlinkrootPlanterBox": "Vaso de Raízes Brilhantes", + "BloodWater": "Água de Sangue", + "BloodZombieBanner": "Bandeira do Zumbi Sangrento", + "BloodZombieStatue": "Estátua do Zumbi Sangrento", + "BlueAcidDye": "Tintura Ácida Azul", + "BlueCounterweight": "Contrapeso Azul", + "BlueDungeonBathtub": "Banheira de Calabouço Azul", + "BlueDungeonCandelabra": "Candelabro de Calabouço Azul", + "BlueDungeonChandelier": "Lustre de Calabouço Azul", + "BlueDungeonChest": "Baú de Calabouço Azul", + "BlueDungeonLamp": "Lâmpada de Calabouço Azul", + "BlueDungeonSink": "Pia do Calabouço Azul", + "BlueFlameAndSilverDye": "Tintura de Fogo Azul e Prata", + "BlueLunaticHood": "Capuz do Cultista da Lua", + "BlueLunaticRobe": "Roupão do Cultista da Lua", + "BluePhasesaber": "Sabre de Luz Azul", + "BlueString": "Cordão Azul", + "BombFish": "Peixe Bomba", + "BoneArrow": "Flecha de Osso", + "BoneBathtub": "Banheira de Osso", + "BoneBed": "Cama de Osso", + "BoneBookcase": "Estante de Osso", + "BoneCampfire": "Fogueira de Ossos", + "BoneCandelabra": "Candelabro de Osso", + "BoneChandelier": "Lustre de Osso", + "BoneChest": "Baú de Osso", + "BoneClock": "Relógio de Osso", + "BoneDagger": "Faca de Arremessar de Osso", + "BoneGlove": "Luva de Osso", + "BoneJavelin": "Lança de Osso", + "BoneLamp": "Lâmpada de Osso", + "BoneLantern": "Lanterna de Osso", + "BoneRattle": "Chocalho de Osso", + "BoneSink": "Pia de Osso", + "BoneSkeletonStatue": "Estátua de Esqueleto de Osso", + "BoneTorch": "Tocha de Osso", + "BoosterTrack": "Trilho Motriz", + "BorealWood": "Madeira Boreal", + "BorealWoodBathtub": "Banheira de Madeira Boreal", + "BorealWoodBed": "Cama de Madeira Boreal", + "BorealWoodBookcase": "Estante de Madeira Boreal", + "BorealWoodBow": "Arco de Madeira Boreal", + "BorealWoodBreastplate": "Peitoral de Madeira Boreal", + "BorealWoodCandelabra": "Candelabro de Madeira Boreal", + "BorealWoodCandle": "Vela de Madeira Boreal", + "BorealWoodChair": "Cadeira de Madeira Boreal", + "BorealWoodChandelier": "Lustre de Madeira Boreal", + "BorealWoodChest": "Baú de Madeira Boreal", + "BorealWoodClock": "Relógio de Madeira Boreal", + "BorealWoodDoor": "Porta de Madeira Boreal", + "BorealWoodDresser": "Cômoda de Madeira Boreal", + "BorealWoodFence": "Cerca de Madeira Boreal", + "BorealWoodGreaves": "Grevas de Madeira Boreal", + "BorealWoodHammer": "Martelo de Madeira Boreal", + "BorealWoodHelmet": "Elmo de Madeira Boreal", + "BorealWoodLamp": "Lâmpada de Madeira Boreal", + "BorealWoodLantern": "Lanterna de Madeira Boreal", + "BorealWoodPiano": "Piano de Madeira Boreal", + "BorealWoodPlatform": "Plataforma de Madeira Boreal", + "BorealWoodSink": "Pia de Madeira Boreal", + "BorealWoodSofa": "Sofá de Madeira Boreal", + "BorealWoodSword": "Espada de Madeira Boreal", + "BorealWoodTable": "Mesa de Madeira Boreal", + "BorealWoodWall": "Parede de Madeira Boreal", + "BorealWoodWorkBench": "Bancada de Trabalho de Madeira Boreal", + "BossMaskMoonlord": "Máscara do Senhor da Lua", + "BottomlessBucket": "Balde Sem Fundo com Água", + "BouncyBomb": "Bomba Saltitante", + "BouncyDynamite": "Dinamite Saltitante", + "BouncyGlowstick": "Bastão Luminoso Saltitante", + "BouncyGrenade": "Granada Saltitante", + "BrainMask": "Máscara do Cérebro de Cthulhu", + "BrainOfConfusion": "Cérebro da Confusão", + "BrainOfCthulhuBossBag": "Bolsa do Tesouro", + "BrainScrambler": "Embaralhador de Cérebros", + "BrightBrownDye": "Tintura Marrom Brilhante", + "BrightSilverDye": "Tintura Prata Brilhante", + "BrownAndBlackDye": "Tintura Marrom e Preta", + "BrownAndSilverDye": "Tintura Marrom e Prata", + "BrownDye": "Tintura Marrom", + "BrownString": "Cordão Marrom", + "Bubble": "Bolha", + "BubbleGun": "Arma de Bolhas", + "BuccaneerBandana": "Pulseira do Bucaneiro", + "BuccaneerPants": "Pantalonas do Bucaneiro", + "BuccaneerShirt": "Túnica do Bucaneiro", + "Buggy": "Insetinho", + "BuggyStatue": "Estátua do Insetinho", + "BunnyfishTrophy": "Troféu do Peixe-coelho", + "BurningHadesDye": "Tintura de Hades em Chamas", + "ButcherBanner": "Bandeira do Açougueiro", + "ButchersChainsaw": "Serra-elétrica do Açougueiro", + "ButterflyStatue": "Estátua da Borboleta", + "CactusBathtub": "Banheira de Cacto", + "CactusBed": "Cama de Cacto", + "CactusBookcase": "Estante de Cacto", + "CactusCandelabra": "Candelabro de Cacto", + "CactusCandle": "Vela de Cacto", + "CactusChandelier": "Lustre de Cacto", + "CactusChest": "Baú de Cacto", + "CactusClock": "Relógio de Cacto", + "CactusLamp": "Lâmpada de Cacto", + "CactusLantern": "Lanterna de Cacto", + "CactusPlatform": "Plataforma de Cacto", + "CactusSink": "Pia do Cacto", + "CactusTable": "Mesa de Cacto", + "CageBuggy": "Jaula do Insetinho", + "CageEnchantedNightcrawler": "Jaula do Nightcrawler Encantado", + "CageGrubby": "Jaula da Larvinha", + "CageSluggy": "Jaula da Lesminha", + "Cascade": "Cascata", + "CelestialShell": "Casco Celestial", + "CelestialSigil": "Símbolo Celestial", + "CellPhone": "Telefone Celular", + "ChainGuillotines": "Guilhotinas com Corrente", + "ChargedBlasterCannon": "Canhão Detonador Carregado", + "Chik": "Chik", + "Chimney": "Chaminé", + "ChlorophyteBrick": "Tijolo de Clorofita", + "ChlorophyteBrickWall": "Tijolo de Parede de Clorofita", + "ChlorophyteDye": "Tintura de Clorofita", + "ClingerStaff": "Cajado do Agarrador", + "ClothierJacket": "Jaqueta do Alfaiate", + "ClothierPants": "Calça do Alfaiate", + "Code1": "Código 1", + "Code2": "Código 2", + "CogWall": "Parede de Engrenagens", + "CoinRing": "Anel de Moedas", + "CompanionCube": "Cubo Companheiro", + "CompassRose": "Rosa-dos-ventos", + "ConfettiBlock": "Bloco de Confetes", + "ConfettiBlockBlack": "Bloco de Confetes da Meia-noite", + "ConfettiCannon": "Canhão de Confetes", + "ConfettiWall": "Parede de Confetes", + "ConfettiWallBlack": "Parede de Confetes da Meia-noite", + "ConveyorBeltLeft": "Esteira (Sentido horário)", + "ConveyorBeltRight": "Esteira (Sentido anti-horário)", + "CordageGuide": "Medida para Fibras Vegetais", + "CorruptFishingCrate": "Caixote Corrompido", + "CorruptHardenedSand": "Bloco de Areia Escura Endurecida", + "CorruptHardenedSandWall": "Parede de Areia Escura Endurecida", + "CorruptPlanterBox": "Caixa de Erva da Morte", + "CorruptSandstone": "Vaso de Areia Escura", + "CorruptSandstoneWall": "Parede de Areia Escura", + "CorruptYoyo": "Malaise", + "CosmicCarKey": "Chave do Carro Cósmico", + "CrawdadBanner": "Bandeira do Caranguejo-Pai", + "CreatureFromTheDeepBanner": "Bandeira da Criatura das Profundezas", + "CrimsonFishingCrate": "Caixote Carmesim", + "CrimsonHardenedSand": "Bloco de Areia Carmim Endurecida", + "CrimsonHardenedSandWall": "Parede de Areia Carmim Endurecida", + "CrimsonHeart": "Coração de Carmesim", + "CrimsonPlanterBox": "Vaso de Erva da Morte", + "CrimsonSandstone": "Bloco de Pedras Vermelhas", + "CrimsonSandstoneWall": "Parede de Pedras Vermelhas", + "CrimsonYoyo": "Artéria", + "CrimtaneBrick": "Tijolo de Carmim", + "CrimtaneBrickWall": "Parede de Tijolos de Carmim", + "CrystalBlock": "Bloco de Cristal", + "CrystalBlockWall": "Parede de Blocos de Cristal", + "CrystalDart": "Dardo de Cristal", + "CrystalSerpent": "Serpente de Cristal", + "CrystalVileShard": "Fragmento de Cristal Infame", + "CultistBossBag": "Bolsa do Tesouro", + "CursedCampfire": "Fogueira Amaldiçoada", + "CursedDart": "Dardo Amaldiçoado", + "CyanString": "Cordão Ciano", + "DaedalusStormbow": "Arco Tempestuoso de Dédalo", + "DarkMummyBanner": "Bandeira da Múmia Sombria", + "DartPistol": "Pistola de Dardos", + "DartRifle": "Fuzil de Dardos", + "DayBloomPlanterBox": "Vaso da Nascer do Dia", + "DayBreak": "Nascer do Sol", + "DeadlySphereBanner": "Bandeira da Esfera Mortal", + "DeadlySphereStaff": "Cajado da Esfera Mortal", + "DefenderMedal": "Medalha do Defensor", + "DefendersForge": "Forja do Defensor", + "DemonCampfire": "Fogueira do Demônio", + "DemonHeart": "Coração do Demônio", + "DesertBasiliskBanner": "Bandeira do Basilisco", + "DesertDjinnBanner": "Bandeira do Espírito do Deserto", + "DesertFossil": "Fóssil do Deserto", + "DesertFossilWall": "Parede do Fóssil do Deserto", + "DesertGhoulBanner": "Bandeira do Ghoul", + "DesertLamiaBanner": "Bandeira de Lâmia", + "DestroyerBossBag": "Bolsa do Tesouro", + "DestroyerMask": "Máscara do Destruidor", + "Detonator": "Detonador", + "DiamondGemsparkWall": "Parede de Pedras de Diamante Brilhantes", + "DiamondGemsparkWallOff": "Parede de Pedras de Diamante Brilhantes Offline", + "DjinnLamp": "Lâmpada do Espírito do Deserto", + "DjinnsCurse": "Maldição do Djinn", + "DPSMeter": "Medidor de DPS", + "DrillContainmentUnit": "Unidade de Contenção da Furadeira", + "DripplerBanner": "Bandeira do Drippler", + "DripplerStatue": "Estátua do Drippler", + "DrManFlyBanner": "Bandeira do Dr. Homem-Mosca", + "DuckStatue": "Estátua de Pato", + "DukeFishronMask": "Máscara do Duque Peixe-dragão", + "DukeFishronTrophy": "Troféu do Duque Peixe-dragão", + "DuneSplicerBanner": "Bandeira do Verme Maldito", + "DungeonFishingCrate": "Caixote do Calabouço", + "DyeTradersScimitar": "Cimitarra Exótica", + "DyeTraderTurban": "Turbante do Comerciante de Tinturas", + "DynastyBathtub": "Banheira da Dinastia", + "DynastyBed": "Cama da Dinastia", + "DynastyBookcase": "Estante da Dinastia", + "DynastyBowl": "Tigela da Dinastia", + "DynastyCandelabra": "Vela Grande da Dinastia", + "DynastyCandle": "Vela da Dinastia", + "DynastyChair": "Cadeira da Dinastia", + "DynastyChandelier": "Lanterna da Dinastia", + "DynastyChest": "Baú da Dinastia", + "DynastyClock": "Relógio da Dinastia", + "DynastyCup": "Copo da Dinastia", + "DynastyLamp": "Lâmpada da Dinastia", + "DynastyLantern": "Lanterna da Dinastia", + "DynastySink": "Pia da Dinastia", + "DynastyWorkBench": "Bancada de Trabalho da Dinastia", + "EaterMask": "Máscara do Devorador de Mundos", + "EaterOfWorldsBossBag": "Bolsa do Tesouro", + "EbonwoodBathtub": "Banheira de Madeira de Ébano", + "EbonwoodBookcase": "Estante de Madeira de Ébano", + "EbonwoodCandelabra": "Candelabro de Madeira de Ébano", + "EbonwoodCandle": "Vela de Madeira de Ébano", + "EbonwoodChandelier": "Lustre de Madeira de Ébano", + "EbonwoodClock": "Relógio de Madeira de Ébano", + "EbonwoodLamp": "Lâmpada de Madeira de Ébano", + "EbonwoodLantern": "Lanterna de Madeira de Ébano", + "EbonwoodSink": "Pia de Ébano", + "ElectrosphereLauncher": "Lança-Eletroesfera", + "EmeraldGemsparkWall": "Parede de Pedras de Esmeralda Brilhantes", + "EmeraldGemsparkWallOff": "Parede de Pedras de Esmeralda Brilhantes Offline", + "EmptyDropper": "Colírio Vazio", + "EnchantedNightcrawler": "Nightcrawler Encantado", + "EndlessMusketPouch": "Bolsa do Mosquete Infinita", + "EndlessQuiver": "Aljava Infinita", + "EngineeringHelmet": "Capacete de Engenheiro", + "EoCShield": "Escudo de Cthulhu", + "EyeMask": "Máscara do Olho de Cthulhu", + "EyeOfCthulhuBossBag": "Bolsa do Tesouro", + "Fake_BlueDungeonChest": "Preso Baú de Calabouço Azul", + "Fake_BoneChest": "Preso Baú de Osso", + "Fake_BorealWoodChest": "Preso Baú de Madeira Boreal", + "Fake_CactusChest": "Preso Baú de Cacto", + "Fake_Chest": "Preso Baú", + "Fake_CorruptionChest": "Preso Baú Corrompido", + "Fake_CrimsonChest": "Preso Baú de Carmim", + "Fake_DynastyChest": "Preso Baú da Dinastia", + "Fake_EbonwoodChest": "Preso Baú de Madeira de Ébano", + "Fake_FleshChest": "Preso Baú de Carne", + "Fake_GlassChest": "Preso Baú de Vidro", + "Fake_GoldChest": "Preso Baú de Ouro", + "Fake_GraniteChest": "Preso Baú de Granito", + "Fake_GreenDungeonChest": "Preso Baú de Calabouço Verde", + "Fake_HallowedChest": "Preso Baú Consagrado", + "Fake_HoneyChest": "Preso Baú de Mel", + "Fake_IvyChest": "Preso Baú de Hera", + "Fake_JungleChest": "Preso Baú da Selva", + "Fake_LihzahrdChest": "Preso Baú Lagharto", + "Fake_LivingWoodChest": "Preso Baú de Madeira Viva", + "Fake_MarbleChest": "Preso Baú de Mármore", + "Fake_MartianChest": "Preso Baú de Marte", + "Fake_MeteoriteChest": "Preso Baú de Meteorito", + "Fake_MushroomChest": "Preso Baú de Cogumelo", + "Fake_ObsidianChest": "Preso Baú de Obsidiana", + "Fake_PalmWoodChest": "Preso Baú de Madeira de Palmeira", + "Fake_PearlwoodChest": "Preso Baú de Madeira Pérola", + "Fake_PinkDungeonChest": "Preso Baú de Calabouço Cor-de-rosa", + "Fake_PumpkinChest": "Preso Baú de Abóbora", + "Fake_RichMahoganyChest": "Preso Baú de Mogno", + "Fake_ShadewoodChest": "Preso Baú de Madeira Escura", + "Fake_ShadowChest": "Preso Baú das Sombras", + "Fake_SkywareChest": "Preso Baú Celeste", + "Fake_SlimeChest": "Preso Baú de Geleia", + "Fake_SpookyChest": "Preso Baú Assustador", + "Fake_SteampunkChest": "Preso Baú Steampunk", + "Fake_WaterChest": "Preso Baú d'água", + "Fake_WebCoveredChest": "Preso Baú Coberto de Teias", + "FalconBlade": "Lâmina do Falcão", + "FallenTuxedoPants": "Calça de Smoking Caída", + "FallenTuxedoShirt": "Camiseta de Smoking Caída", + "FancyDishes": "Pratos Elegantes", + "FetidBaghnakhs": "Baghnakhs Fétidas", + "FireBlossomPlanterBox": "Vaso da Flor de Fogo", + "FireflyStatue": "Estátua de Vagalume", + "Fireplace": "Lareira", + "FireworkFountain": "Fonte de Fogos de Artifício", + "FireworksBox": "Caixa de Fogos de Artifício", + "FireworksLauncher": "Comemoração", + "FishermansGuide": "Guia de Bolso do Pescador", + "FishFinder": "Detector de Peixes", + "FishronBossBag": "Bolsa do Tesouro", + "FishronWings": "Asas do Peixe-dragão", + "Flairon": "Mangual-Dragão", + "FlameAndSilverDye": "Tintura de Fogo e Prata", + "FleshBathtub": "Banheira de Carne", + "FleshBed": "Cama de Carne", + "FleshBookcase": "Estante de Carne", + "FleshCandelabra": "Candelabro de Carne", + "FleshCandle": "Vela de Carne", + "FleshChandelier": "Lustre de Carne", + "FleshChest": "Baú de Carne", + "FleshClock": "Relógio de Carne", + "FleshDresser": "Cômoda de Carne", + "FleshKnuckles": "Punhos de Carne", + "FleshLamp": "Lâmpada de Carne", + "FleshLantern": "Lanterna de Carne", + "FleshMask": "Máscara da Parede de Carne", + "FleshPiano": "Piano de Carne", + "FleshSink": "Pia de Carne", + "FleshSofa": "Sofá de Carne", + "FloatingIslandFishingCrate": "Caixote do Céu", + "FlowerBoots": "Botas de Flores", + "FlowerBoyHat": "Pétala de Girassol Bobo", + "FlowerBoyPants": "Calça de Girassol Bobo", + "FlowerBoyShirt": "Camisa de Girassol Bobo", + "FlyingAntlionBanner": "Bandeira da Formiga-leão Voadora", + "FlyingDutchmanTrophy": "Troféu do Holandês Voador", + "FlyingKnife": "Faca Voadora", + "FormatC": "Formato:C", + "FossilHelm": "Elmo de Fóssil", + "FossilOre": "Fóssil Resistente", + "FossilPants": "Grevas de Fóssil", + "FossilShirt": "Placa de Fóssil", + "FragmentNebula": "Fragmento de Nébula", + "FragmentSolar": "Fragmento do Sol", + "FragmentStardust": "Fragmento de Pó de Estrelas", + "FragmentVortex": "Fragmento de Vórtice", + "FritzBanner": "Bandeira de Fritz", + "FrogStatue": "Estátua de Rã", + "FrostDaggerfish": "Peixe-Adaga Congelado", + "FrozenBathtub": "Banheira Congelado", + "FrozenBed": "Cama Congelada", + "FrozenBookcase": "Estante Congelada", + "FrozenCampfire": "Fogueira Congelada", + "FrozenCandelabra": "Candelabro Congelado", + "FrozenCandle": "Vela Congelada", + "FrozenChair": "Cadeira Congelada", + "FrozenChandelier": "Lustre Congelado", + "FrozenClock": "Relógio Congelado", + "FrozenDoor": "Porta Congelada", + "FrozenLamp": "Lâmpada Congelada", + "FrozenLantern": "Lanterna Congelada", + "FrozenPiano": "Piano Congelado", + "FrozenSink": "Pia Congelado", + "FrozenSofa": "Sofá Congelado", + "FrozenTable": "Mesa Congelada", + "FrozenWorkBench": "Bancada de Trabalho Congelada", + "FuzzyCarrot": "Cenoura Albina", + "GelDye": "Tintura de Gel", + "GemLockAmber": "Trava da Joia de Âmbar", + "GemLockAmethyst": "Trava da Joia de Ametista", + "GemLockDiamond": "Trava da Joia de Diamante", + "GemLockEmerald": "Trava da Joia de Esmeralda", + "GemLockRuby": "Trava da Joia de Rubi", + "GemLockSapphire": "Trava da Joia de Safira", + "GemLockTopaz": "Trava da Joia de Topázio", + "GenderChangePotion": "Poção de Troca de Sexo", + "GeyserTrap": "Gêiser", + "GiantShellyBanner": "Bandeira de Shelly Gigante", + "GladiatorBreastplate": "Peitoral do Gladiador", + "GladiatorHelmet": "Elmo do Gladiador", + "GladiatorLeggings": "Calças do Gladiador", + "GlassBathtub": "Banheira de Vidro", + "GlassBookcase": "Estante de Vidro", + "GlassBowl": "Tigela de Vidro", + "GlassCandelabra": "Candelabro de Vidro", + "GlassCandle": "Vela de Vidro", + "GlassChandelier": "Lustre de Vidro", + "GlassChest": "Baú de Vidro", + "GlassClock": "Relógio de Vidro", + "GlassDresser": "Cômoda de Vidro", + "GlassLamp": "Lâmpada de Vidro", + "GlassLantern": "Lanterna de Vidro", + "GlassPiano": "Piano de Vidro", + "GlassSink": "Pia de Vidro", + "GlassWorkBench": "Bancada de Trabalho de Vidro", + "GoblinSummonerBanner": "Bandeira do Invocador Goblin", + "GoblinTech": "Tecnologia Goblin", + "GoldBird": "Pássaro de Ouro", + "GoldBirdCage": "Gaiola do Pássaro de Ouro", + "GoldBunny": "Coelhinho de Ouro", + "GoldBunnyCage": "Gaiola do Coelhinho de Ouro", + "GoldButterfly": "Borboleta de Ouro", + "GoldButterflyCage": "Pote da Borboleta de Ouro", + "GoldenBathtub": "Banheira Dourada", + "GoldenBookcase": "Estante Dourada", + "GoldenBugNet": "Pega-mosquitos de Ouro", + "GoldenCandelabra": "Candelabro Dourado", + "GoldenCandle": "Vela Dourada", + "GoldenChandelier": "Lustre Dourado", + "GoldenClock": "Relógio Dourado", + "GoldenLamp": "Lâmpada Dourada", + "GoldenLantern": "Lanterna Dourada", + "GoldenSink": "Pia Dourada", + "GoldfishTrophy": "Troféu de Peixe Dourado", + "GoldFrog": "Sapo de Ouro", + "GoldFrogCage": "Gaiola do Sapo de Ouro", + "GoldGrasshopper": "Gafanhoto de Ouro", + "GoldGrasshopperCage": "Gaiola do Gafanhoto de Ouro", + "GoldMouse": "Camundongo de Ouro", + "GoldMouseCage": "Gaiola do Camundongo de Ouro", + "GoldRing": "Anel de Ouro", + "GoldWorm": "Verme de Ouro", + "GoldWormCage": "Gaiola do Verme de Ouro", + "GolemBossBag": "Bolsa do Tesouro", + "GolemMask": "Máscara do Golem", + "Gradient": "Gradiente", + "Granite": "Bloco de Granito", + "GraniteBathtub": "Banheira de Granito", + "GraniteBed": "Cama de Granito", + "GraniteBlock": "Bloco de Granito Liso", + "GraniteBlockWall": "Parede de Granito Liso", + "GraniteBookcase": "Estante de Granito", + "GraniteCandelabra": "Candelabros de Granito", + "GraniteCandle": "Vela de Granito", + "GraniteChair": "Cadeira de Granito", + "GraniteChandelier": "Lustre de Granito", + "GraniteChest": "Baú de Granito", + "GraniteClock": "Relógio de Granito", + "GraniteDoor": "Porta de Granito", + "GraniteDresser": "Cômoda de Granito", + "GraniteFlyerBanner": "Bandeira do Elemental de Granito", + "GraniteGolemStatue": "Estátua do Golem de Granito", + "GraniteLamp": "Lâmpada de Granito", + "GraniteLantern": "Lanterna de Granito", + "GranitePiano": "Piano de Granito", + "GranitePlatform": "Plataforma de Granito", + "GraniteSink": "Pia de Granito", + "GraniteSofa": "Sofá de Granito", + "GraniteTable": "Mesa de Granito", + "GraniteWall": "Parede de Granito", + "GraniteWorkBench": "Bancada de Trabalho de Granito", + "Grasshopper": "Gafanhoto", + "GrasshopperCage": "Gaiola para Gafanhoto", + "GrasshopperStatue": "Estátua de Gafanhoto", + "GreedyRing": "Anel da Cobiça", + "GreekSkeletonBanner": "Bandeira do Hoplite", + "GreenCounterweight": "Contrapeso Verde", + "GreenDungeonBathtub": "Banheira de Calabouço Verde", + "GreenDungeonCandelabra": "Candelabro de Calabouço Verde", + "GreenDungeonChandelier": "Lustre de Calabouço verde", + "GreenDungeonChest": "Baú de Calabouço Verde", + "GreenDungeonLamp": "Lâmpada de Calabouço Verde", + "GreenDungeonSink": "Pia de Calabouço Verde", + "GreenFlameAndSilverDye": "Tintura de Fogo Verde e Prata", + "GreenJellyfishBanner": "Bandeira da Água-viva", + "GreenPhasesaber": "Sabre de Luz Verde", + "GreenString": "Cordão Verde", + "GrimDye": "Tintura Sombria", + "Grubby": "Larvinha", + "GrubSoup": "Sopa de Larvas", + "HadesDye": "Tintura de Hades", + "HallowedFishingCrate": "Caixote Consagrado", + "HallowHardenedSand": "Bloco de Areia-pérola Endurecida", + "HallowHardenedSandWall": "Parede de Areia-pérola Endurecida", + "HallowSandstone": "Bloco de Pedra-pérola", + "HallowSandstoneWall": "Parede de Pedra-pérola", + "HardenedSand": "Bloco de Areia Endurecida", + "HardenedSandWall": "Parede de Areia Endurecida", + "HardySaddle": "Sela Dura", + "HarpyStatue": "Estátua da Harpia", + "HelFire": "Fogo do Inferno", + "HellstoneBrickWall": "Parede de Tijolos de Pedra-do-Inferno", + "HellwingBow": "Arco de Asas do Inferno", + "HerbBag": "Bolsa de Ervas", + "HiTekSunglasses": "Óculos HiTek", + "HiveBackpack": "Pacote de Colmeias", + "HoneyBathtub": "Banheira de Mel", + "HoneyBookcase": "Estante de Mel", + "HoneyCandelabra": "Candelabro de Mel", + "HoneyCandle": "Vela de Mel", + "HoneyChandelier": "Lustre de Mel", + "HoneyChest": "Baú de Mel", + "HoneyClock": "Relógio de Mel", + "HoneyCup": "Copo de Mel", + "HoneyedGoggles": "Óculos de Mel", + "HoneyfallBlock": "Bloco de Cascata de Mel", + "HoneyfallWall": "Parede de Cascata de Mel", + "HoneyLamp": "Lâmpada de Mel", + "HoneyLantern": "Lanterna de Mel", + "HoneyPiano": "Piano de Mel", + "HoneyPlatform": "Plataforma de Mel", + "HoneySink": "Pia de Mel", + "HoneyWorkBench": "Bancada de Trabalho de Mel", + "HopliteStatue": "Estátua do Hoplite", + "HuntressBuckler": "Broquel da Caçadora", + "HuntressJerkin": "Jaqueta da Caçadora", + "HuntressPants": "Calça da Caçadora", + "HuntressWig": "Peruca da Caçadora", + "IceMirror": "Espelho de Gelo", + "IceTortoiseBanner": "Bandeira da Tartaruga de Gelo", + "IchorCampfire": "Fogueira de Ichor", + "IchorDart": "Dardo de Ichor", + "IlluminantHook": "Gancho Luminoso", + "InfernalWispDye": "Tintura de Luz Fantasma do Inferno", + "InfluxWaver": "Ondulador de Fluxo", + "ItemFrame": "Moldura do Item", + "Javelin": "Lança", + "JimsWings": "Asas de Jim", + "JourneymanBait": "Isca do Viajante", + "JungleFishingCrate": "Caixote da Selva", + "JungleYoyo": "Amazona", + "KingSlimeBossBag": "Bolsa do Tesouro", + "Kraken": "Kraken", + "LamiaHat": "Máscara de Lâmia", + "LamiaPants": "Cauda de Lâmia", + "LamiaShirt": "Vestes de Lâmia", + "LargeAmber": "Âmbar Grande", + "LaserDrill": "Furadeira Laser", + "LaserMachinegun": "Metralhadora Laser", + "LaserRuler": "Régua Mecânica", + "LastPrism": "Último Prisma", + "LavafallBlock": "Bloco de Cascata de Lava", + "LavaLamp": "Lâmpada de Lava", + "LifeformAnalyzer": "Analisador de Forma de Vida", + "LifePreserver": "Salva-vidas", + "LightKey": "Chave de Luz", + "LightMummyBanner": "Bandeira da Múmia da Luz", + "LihzahrdBathtub": "Banheira de Lagharto", + "LihzahrdBed": "Cama de Lagharto", + "LihzahrdBookcase": "Estante de Lagharto", + "LihzahrdCandelabra": "Candelabro de Lagharto", + "LihzahrdCandle": "Vela de Lagharto", + "LihzahrdChandelier": "Lustre de Lagharto", + "LihzahrdClock": "Relógio de Lagharto", + "LihzahrdLamp": "Lâmpada de Lagharto", + "LihzahrdLantern": "Lanterna Lagharto", + "LihzahrdSink": "Pia de Lagharto", + "LimeString": "Cordão Verde-Limão", + "LivingCursedFireBlock": "Bloco de Fogo Vivo Amaldiçoado", + "LivingDemonFireBlock": "Bloco de Fogo Vivo do Demônio", + "LivingFireBlock": "Bloco de Fogo Vivo", + "LivingFlameDye": "Tintura de Fogo Vivo", + "LivingFrostFireBlock": "Bloco de Fogo Congelado Vivo", + "LivingIchorBlock": "Bloco de Ichor Vivo", + "LivingLeafWall": "Parede de Folhas Vivas", + "LivingMahoganyLeafWand": "Varinha de Folhas de Mogno", + "LivingMahoganyWand": "Varinha de Mogno Vivo", + "LivingOceanDye": "Tintura do Oceano Vivo", + "LivingRainbowDye": "Tintura de Arco-íris Vivo", + "LivingUltrabrightFireBlock": "Bloco de Fogo Super Brilhante Vivo", + "LivingWoodBathtub": "Banheira de Madeira Viva", + "LivingWoodBed": "Cama de Madeira Viva", + "LivingWoodBookcase": "Estante de Madeira Viva", + "LivingWoodCandelabra": "Candelabro de Madeira Viva", + "LivingWoodCandle": "Vela de Madeira Viva", + "LivingWoodChandelier": "Lustre de Madeira Viva", + "LivingWoodClock": "Relógio de Madeira Viva", + "LivingWoodLamp": "Lâmpada de Madeira Viva", + "LivingWoodLantern": "Lanterna de Madeira Viva", + "LivingWoodPiano": "Piano de Madeira Viva", + "LivingWoodPlatform": "Plataforma de Madeira Viva", + "LivingWoodSink": "Pia de Madeira Viva", + "LivingWoodSofa": "Sofá de Madeira Viva", + "LivingWoodWorkBench": "Bancada de Trabalho de Madeira Viva", + "LockBox": "Cofre Dourado", + "LogicGateLamp_Faulty": "Lâmpada do Portão Lógico (Quebrada)", + "LogicGateLamp_Off": "Lâmpada do Portão Lógico (Desligada)", + "LogicGateLamp_On": "Lâmpada do Portão Lógico (Ligada)", + "LogicGate_AND": "Portão Lógico (AND)", + "LogicGate_NAND": "Portão Lógico (NAND)", + "LogicGate_NOR": "Portão Lógico (NOR)", + "LogicGate_NXOR": "Portão Lógico (XNOR)", + "LogicGate_OR": "Portão Lógico (OR)", + "LogicGate_XOR": "Portão Lógico (XOR)", + "LogicSensor_Above": "Sensor Lógico (Jogador Acima)", + "LogicSensor_Honey": "Sensor Líquido (Mel)", + "LogicSensor_Lava": "Sensor Líquido (Lava)", + "LogicSensor_Liquid": "Sensor Líquido (Qualquer)", + "LogicSensor_Moon": "Sensor Lógico (Noite)", + "LogicSensor_Sun": "Sensor Lógico (Dia)", + "LogicSensor_Water": "Sensor Líquido (Água)", + "LokisDye": "Tintura de Loki", + "LokisHelm": "Elmo de Loki", + "LokisPants": "Grevas de Loki", + "LokisShirt": "Peitoral de Loki", + "LokisWings": "Asas de Loki", + "LunarBar": "Barra de Luminita", + "LunarBlockNebula": "Bloco de Fragmento de Nébula", + "LunarBlockSolar": "Bloco de Fragmento do Sol", + "LunarBlockStardust": "Bloco de Fragmento de Pó de Estrelas", + "LunarBlockVortex": "Bloco de Fragmento de Vórtice", + "LunarBrick": "Tijolo de Luminita", + "LunarBrickWall": "Parede de Tijolos de Luminita", + "LunarCraftingStation": "Manipulador Antigo", + "LunarFlareBook": "Chamas da Lua", + "LunarHamaxeNebula": "Martelo-machado de Nébula", + "LunarHamaxeSolar": "Martelo-machado das Chamas do Sol", + "LunarHamaxeStardust": "Martelo-machado do Pó das Estrelas", + "LunarHamaxeVortex": "Martelo-machado do Vórtice", + "LunarHook": "Gancho da Lua", + "LunarOre": "Luminita", + "LunarTabletFragment": "Fragmento da Placa do Sol", + "MagicHoneyDropper": "Conta-gotas de Mel Mágico", + "MagicLantern": "Lanterna Mágica", + "MagicLavaDropper": "Conta-gotas de Lava Mágico", + "MagicSandDropper": "Conta-gotas de Areia Mágico", + "MagicWaterDropper": "Conta-gotas de Água Mágico", + "Marble": "Bloco de Mármore", + "MarbleBathtub": "Banheira de Mármore", + "MarbleBed": "Cama de Mármore", + "MarbleBlock": "Bloco de Mármore Liso", + "MarbleBlockWall": "Parede de Mármore Lisa", + "MarbleBookcase": "Estante de Mármore", + "MarbleCandelabra": "Candelabro de Mármore", + "MarbleCandle": "Vela de Mármore", + "MarbleChair": "Cadeira de Mármore", + "MarbleChandelier": "Lustre de Mármore", + "MarbleChest": "Baú de Mármore", + "MarbleClock": "Relógio de Mármore", + "MarbleDoor": "Porta de Mármore", + "MarbleDresser": "Cômoda de Mármore", + "MarbleLamp": "Lâmpada de Mármore", + "MarbleLantern": "Lanterna de Mármore", + "MarblePiano": "Piano de Mármore", + "MarblePlatform": "Plataforma de Mármore", + "MarbleSink": "Pia de Mármore", + "MarbleSofa": "Sofá de Mármore", + "MarbleTable": "Mesa de Mármore", + "MarbleWall": "Parede de Mármore", + "MarbleWorkBench": "Bancada de Trabalho de Mármore", + "MartianArmorDye": "Tintura de Marte", + "MartianAstroClock": "Relógio Astrológico de Marte", + "MartianBathtub": "Banheira de Marte", + "MartianBed": "Cama de Marte", + "MartianChandelier": "Lustre de Marte", + "MartianChest": "Baú de Marte", + "MartianConduitPlating": "Placa Condutora de Marte", + "MartianConduitWall": "Placa Condutora de Marte", + "MartianCostumeMask": "Máscara da Roupa de Marte", + "MartianCostumePants": "Calças da Roupa de Marte", + "MartianCostumeShirt": "Camisa da Roupa de Marte", + "MartianDoor": "Porta de Marte", + "MartianDresser": "Cômoda de Marte", + "MartianHairDye": "Tintura para Cabelo de Marte", + "MartianHolobookcase": "Holoestante de Marte", + "MartianHoverCandle": "Vela Flutuante de Marte", + "MartianHoverChair": "Cadeira Flutuante de Marte", + "MartianLamppost": "Poste de Marte", + "MartianLantern": "Lanterna de Marte", + "MartianPiano": "Piano de Marte", + "MartianPlatform": "Plataforma de Marte", + "MartianSaucerTrophy": "Troféu do Disco Voador de Marte", + "MartianSink": "Pia de Marte", + "MartianSofa": "Sofá de Marte", + "MartianTable": "Mesa de Marte", + "MartianTableLamp": "Lâmpada de Mesa de Marte", + "MartianUniformHelmet": "Elmo do Uniforme de Marte", + "MartianUniformPants": "Calças do Uniforme de Marte", + "MartianUniformTorso": "Torso do Uniforme de Marte", + "MartianWalkerBanner": "Bandeira do Andarilho de Marte", + "MartianWorkBench": "Bancada de Trabalho de Marte", + "MasterBait": "Isca Mestre", + "MechanicalBatteryPiece": "Peça da Bateria Mecânica", + "MechanicalLens": "Lente Mecânica", + "MechanicalWagonPiece": "Peça do Vagão Mecânico", + "MechanicalWheelPiece": "Peça da Roda Mecânica", + "MedusaBanner": "Bandeira da Medusa", + "MedusaHead": "Cabeça da Medusa", + "MedusaStatue": "Estátua da Medusa", + "Meowmere": "Espada-Gato", + "MetalDetector": "Detector de Metal", + "MetalSink": "Pia de Metal", + "MeteoriteBathtub": "Banheira de Meteorito", + "MeteoriteBed": "Cama de Meteorito", + "MeteoriteBookcase": "Estante de Meteorito", + "MeteoriteBrick": "Tijolo de Meteorito", + "MeteoriteBrickWall": "Parede de Tijolos de Meteorito", + "MeteoriteCandelabra": "Candelabro de Meteorito", + "MeteoriteCandle": "Vela de Meteorito", + "MeteoriteChair": "Cadeira de Meteorito", + "MeteoriteChandelier": "Lustre de Meteorito", + "MeteoriteChest": "Baú de Meteorito", + "MeteoriteClock": "Relógio de Meteorito", + "MeteoriteDoor": "Porta de Meteorito", + "MeteoriteDresser": "Cômoda de Meteorito", + "MeteoriteLamp": "Lâmpada de Meteorito", + "MeteoriteLantern": "Lanterna de Meteorito", + "MeteoritePiano": "Piano de Meteorito", + "MeteoritePlatform": "Plataforma de Meteorito", + "MeteoriteSink": "Pia de Meteorito", + "MeteoriteSofa": "Sofá de Meteorito", + "MeteoriteTable": "Mesa de Meteorito", + "MeteoriteWorkBench": "Bancada de Trabalho de Meteorito", + "MeteorStaff": "Cajado de Meteoro", + "MidnightRainbowDye": "Tintura de Arco-íris da Meia-noite", + "MinecartMech": "Carrinho Mecânico", + "MinecartTrack": "Trilho de Vagoneta", + "MirageDye": "Tintura de Miragem", + "MolotovCocktail": "Coquetel Molotov", + "MoneyTrough": "Comedouro de Dinheiro", + "MonkBelt": "Cinto do Monge", + "MonkBrows": "Boné do Monge Careca com Sobrancelha Cabeluda", + "MonkPants": "Calça do Monge", + "MonkShirt": "Camisa do Monge", + "MoonglowPlanterBox": "Vaso da Brilho da Lua", + "MoonlordArrow": "Flecha de Luminita", + "MoonLordBossBag": "Bolsa do Tesouro", + "MoonlordBullet": "Projétil de Luminita", + "MoonLordPainting": "Nem Polvo, Nem Lula", + "MoonLordTrophy": "Troféu do Senhor da Lua", + "MoonlordTurretStaff": "Cajado do Portal da Lua", + "MoonMask": "Máscara da Lua", + "MothronBanner": "Bandeira do Mothron", + "MothronWings": "Asas de Mothron", + "MouseStatue": "Estátua de Camundongo", + "MulticolorWrench": "Chave Inglesa Colorida", + "MushroomBathtub": "Banheira de Cogumelo", + "MushroomBed": "Cama de Cogumelo", + "MushroomBench": "Banco de Cogumelo", + "MushroomBookcase": "Estante de Cogumelo", + "MushroomCandelabra": "Candelabro de Cogumelo", + "MushroomCandle": "Vela de Cogumelo", + "MushroomChandelier": "Lustre de Cogumelo", + "MushroomChest": "Baú de Cogumelo", + "MushroomClock": "Relógio de Cogumelo", + "MushroomDresser": "Cômoda de Cogumelo", + "MushroomDye": "Tintura do Cogumelo Brilhante", + "MushroomLamp": "Lâmpada de Cogumelo", + "MushroomLantern": "Lanterna de Cogumelo", + "MushroomPiano": "Piano de Cogumelo", + "MushroomPlatform": "Plataforma de Cogumelo", + "MushroomSink": "Pia de Cogumelo", + "MushroomTable": "Mesa de Cogumelo", + "MusicBoxGoblins": "Caixinha de Música (Invasão dos Goblins)", + "MusicBoxHell": "Caixinha de Música (Inferno)", + "MusicBoxLunarBoss": "Caixinha de Música (Chefe da Lua)", + "MusicBoxMartians": "Caixinha de Música (Loucura de Marte)", + "MusicBoxPirates": "Caixinha de Música (Invasão Pirata)", + "MusicBoxSandstorm": "Caixinha de Música (Tempestade de Areia)", + "MusicBoxTowers": "Caixinha de Música (As Torres)", + "MusicBoxUndergroundCrimson": "Caixinha de Música (Submundo Carmim)", + "Nail": "Prego", + "NailGun": "Arma de Pregos", + "NailheadBanner": "Bandeira do Cabeça de Pregos", + "NebulaArcanum": "Arcano de Nébula", + "NebulaAxe": "Machado de Nébula", + "NebulaBeastBanner": "Bandeira da Fera da Evolução", + "NebulaBlaze": "Chama de Nébula", + "NebulaBrainBanner": "Bandeira do Flutuador de Nébula", + "NebulaBreastplate": "Peitoral de Nébula", + "NebulaChainsaw": "Serra-elétrica de Nébula", + "NebulaDrill": "Furadeira de Nébula", + "NebulaDye": "Tintura de Nébula", + "NebulaHammer": "Martelo de Nébula", + "NebulaHeadcrabBanner": "Bandeira do Sugador de Cérebros", + "NebulaHelmet": "Elmo de Nébula", + "NebulaLeggings": "Calças de Nébula", + "NebulaMonolith": "Monolito de Nébula", + "NebulaPickaxe": "Picareta de Nébula", + "NebulaPickup1": "Reforço nos Danos", + "NebulaPickup2": "Reforço na Vida", + "NebulaPickup3": "Reforço de Mana", + "NebulaSoldierBanner": "Bandeira do Vidente", + "NegativeDye": "Tintura Negativa", + "NightKey": "Chave da Noite", + "NightVisionHelmet": "Elmo de Visão Noturna", + "ObsidianBathtub": "Banheira de Obsidiana", + "ObsidianCandelabra": "Candelabro de Obsidiana", + "ObsidianCandle": "Vela de Obsidiana", + "ObsidianChandelier": "Lustre de Obsidiana", + "ObsidianChest": "Baú de Obsidiana", + "ObsidianClock": "Relógio de Obsidiana", + "ObsidianHelm": "Chapéu do Fora-da-lei de Obsidiana", + "ObsidianLamp": "Lâmpada de Obsidiana", + "ObsidianLantern": "Lanterna de Obsidiana", + "ObsidianPants": "Calças de Obsidiana", + "ObsidianShirt": "Casaco de Obsidiana", + "ObsidianSink": "Pia de Obsidiana", + "OnyxBlaster": "Detonador de Ônix", + "OrangeString": "Cordão Laranja", + "PainterPaintballGun": "Arma de Paintball", + "PaintingAcorns": "Bolotas", + "PaintingCastleMarsberg": "Castelo Marsberg", + "PaintingColdSnap": "Frio de Rachar", + "PaintingCursedSaint": "Santo Amaldiçoado", + "PaintingMartiaLisa": "Martia Lisa", + "PaintingSnowfellas": "Companheiros da Neve", + "PaintingTheSeason": "A Temporada", + "PaintingTheTruthIsUpThere": "A Verdade Está Lá Em Cima", + "PalmWood": "Madeira de Palmeira", + "PalmWoodBathtub": "Banheira de Madeira de Palmeira", + "PalmWoodBed": "Cama de Madeira de Palmeira", + "PalmWoodBench": "Banco de Madeira de Palmeira", + "PalmWoodBookcase": "Estante de Madeira de Palmeira", + "PalmWoodBow": "Arco de Madeira de Palmeira", + "PalmWoodBreastplate": "Peitoral de Madeira de Palmeira", + "PalmWoodCandelabra": "Candelabro de Madeira de Palmeira", + "PalmWoodCandle": "Vela de Madeira de Palmeira", + "PalmWoodChair": "Cadeira de Madeira de Palmeira", + "PalmWoodChandelier": "Lustre de Madeira de Palmeira", + "PalmWoodChest": "Baú de Madeira de Palmeira", + "PalmWoodClock": "Relógio de Madeira de Palmeira", + "PalmWoodDoor": "Porta de Madeira de Palmeira", + "PalmWoodDresser": "Cômoda de Madeira de Palmeira", + "PalmWoodFence": "Cerca de Madeira de Palmeira", + "PalmWoodGreaves": "Grevas de Madeira de Palmeira", + "PalmWoodHammer": "Martelo de Madeira de Palmeira", + "PalmWoodHelmet": "Elmo de Madeira de Palmeira", + "PalmWoodLamp": "Lâmpada de Madeira de Palmeira", + "PalmWoodLantern": "Lanterna de Madeira de Palmeira", + "PalmWoodPiano": "Piano de Madeira de Palmeira", + "PalmWoodPlatform": "Plataforma de Madeira de Palmeira", + "PalmWoodSink": "Pia de Madeira de Palmeira", + "PalmWoodSofa": "Sofá de Madeira de Palmeira", + "PalmWoodSword": "Espada de Madeira de Palmeira", + "PalmWoodTable": "Mesa de Madeira de Palmeira", + "PalmWoodWall": "Parede de Madeira de Palmeira", + "PalmWoodWorkBench": "Bancada de Trabalho de Madeira de Palmeira", + "PartyBalloonAnimal": "Balão de Animal", + "PartyBundleOfBalloonsAccessory": "Monte de Balões de Festa", + "PartyBundleOfBalloonTile": "Monte de Balões Bobos Amarrados", + "PartyGirlGrenade": "Granada Feliz", + "PartyHat": "Chapéu de Festa", + "PartyMonolith": "Centro de Festas", + "PartyPresent": "Presente de Festa", + "PDA": "PDA", + "PeaceCandle": "Vela da Paz", + "PearlwoodBathtub": "Banheira de Madeira Pérola", + "PearlwoodBookcase": "Estante de Madeira Pérola", + "PearlwoodCandelabra": "Candelabro de Madeira Pérola", + "PearlwoodCandle": "Vela de Madeira Pérola", + "PearlwoodChandelier": "Lustre de Madeira Pérola", + "PearlwoodClock": "Relógio de Madeira Pérola", + "PearlwoodLamp": "Lâmpada de Madeira Pérola", + "PearlwoodLantern": "Lanterna de Madeira Pérola", + "PearlwoodSink": "Pia de Madeira Pérola", + "PedguinHat": "Capuz de Pedguin", + "PedguinPants": "Calça de Pedguin", + "PedguinShirt": "Jaqueta de Pedguin", + "PenguinStatue": "Estátua de Pinguim", + "Phantasm": "Fantasma", + "PhaseDye": "Tintura de Fase", + "PhasicWarpEjector": "Ejetor de Dobra Fásica", + "Pigronata": "Piñata Suína", + "PigronStatue": "Estátua do Porco-dragão", + "PinkDungeonBathtub": "Banheira de Calabouço Cor-de-rosa", + "PinkDungeonCandelabra": "Candelabro de Calabouço Cor-de-rosa", + "PinkDungeonChandelier": "Lustre de Calabouço Cor-de-rosa", + "PinkDungeonChest": "Baú de Calabouço Cor-de-rosa", + "PinkDungeonLamp": "Lâmpada de Calabouço Cor-de-rosa", + "PinkDungeonSink": "Pia de Calabouço Cor-de-rosa", + "PinkGel": "Gel Cor-de-rosa", + "PinkGelDye": "Tintura de Gel Cor-de-rosa", + "PinkJellyfishBanner": "Bandeira da Água-viva Cor-de-rosa", + "PinkSlimeBlock": "Bloco de Geleia Cor-de-rosa", + "PinkString": "Cordão Cor-de-rosa", + "PinkTorch": "Tocha Cor-de-rosa", + "PirateCaptainBanner": "Bandeira do Capitão Pirata", + "PirateCorsairBanner": "Bandeira do Corsário Pirata", + "PirateCrossbowerBanner": "Bandeira do Pirata Atirador", + "PirateDeadeyeBanner": "Bandeira do Pirata Caolho", + "PirateStaff": "Cajado Pirata", + "PixelBox": "Caixa de Pixel", + "PixieDye": "Tintura de Pixie", + "PlanteraBossBag": "Bolsa do Tesouro", + "PlanteraMask": "Máscara da Plantera", + "PocketMirror": "Espelho de Bolso", + "PoisonousSporeBanner": "Bandeira dos Esporos Venenosos", + "PortalGun": "Pistola do Portal", + "PortalGunStation": "Estação da Pistola do Portal", + "PressureTrack": "Trilho de Placas de Pressão", + "ProjectilePressurePad": "Plataforma de Pressão Verde-azulada", + "PsychoBanner": "Bandeira do Psicopata", + "PsychoKnife": "Faca do Psicopata", + "PumpkinBathtub": "Banheira de Abóbora", + "PumpkinBed": "Cama de Abóbora", + "PumpkinBookcase": "Estante de Abóbora", + "PumpkinCandelabra": "Candelabro de Abóbora", + "PumpkinCandle": "Vela de Abóbora", + "PumpkinChandelier": "Lustre de Abóbora", + "PumpkinChest": "Baú de Abóbora", + "PumpkinClock": "Relógio de Abóbora", + "PumpkinDresser": "Cômoda de Abóbora", + "PumpkinLamp": "Lâmpada de Abóbora", + "PumpkinLantern": "Lanterna de Abóbora", + "PumpkinPiano": "Piano de Abóbora", + "PumpkinSink": "Pia de Abóbora", + "PurpleCounterweight": "Contrapeso Roxo", + "PurpleOozeDye": "Tintura de Gosma Roxa", + "PurplePhasesaber": "Sabre de Luz Roxo", + "PurpleString": "Cordão Roxo", + "PutridScent": "Aroma Podre", + "QueenBeeBossBag": "Bolsa do Tesouro", + "Radar": "Radar", + "RainbowCampfire": "Fogueira de Arco-íris", + "RainbowCrystalStaff": "Cajado de Cristal Arco-íris", + "RainbowString": "Cordão de Arco-íris", + "RainbowTorch": "Tocha Arco-íris", + "Rally": "Rally", + "RazorbladeTyphoon": "Tufão de Navalhas", + "RedAcidDye": "Tintura Ácida Vermelha", + "RedCounterweight": "Contrapeso Vermelho", + "RedDevilBanner": "Bandeira do Diabo Vermelho", + "RedPhasesaber": "Sabre de luz Vermelho", + "RedString": "Cordão Vermelho", + "RedsYoyo": "Arremesso de Redigit", + "ReflectiveCopperDye": "Tintura de Cobre Refletora", + "ReflectiveDye": "Tintura Refletora", + "ReflectiveGoldDye": "Tintura de Ouro Refletora", + "ReflectiveMetalDye": "Tintura de Metal Refletora", + "ReflectiveObsidianDye": "Tintura de Obsidiana Refletora", + "ReflectiveSilverDye": "Tintura de Prata Refletora", + "REK": "R.E.K. 3000", + "RichGravestone1": "Marcador de Cova com Cruz Dourada", + "RichGravestone2": "Lápide Dourada", + "RichGravestone3": "Marcador de Cova Dourada", + "RichGravestone4": "Lápide com Cruz Grande Dourada", + "RichGravestone5": "Lápide com Cruz Dourada", + "RichMahoganyBathtub": "Banheira de Mogno", + "RichMahoganyBookcase": "Estante de Mogno", + "RichMahoganyCandelabra": "Candelabro de Mogno", + "RichMahoganyCandle": "Vela de Mogno", + "RichMahoganyChandelier": "Lustre de Mogno", + "RichMahoganyClock": "Relógio de Mogno", + "RichMahoganyLamp": "Lâmpada de Mogno", + "RichMahoganyLantern": "Lanterna de Mogno", + "RichMahoganySink": "Pia de Mogno", + "RoyalGel": "Gel Real", + "RubyGemsparkWall": "Parede de Pedras de Rubi Brilhantes", + "RubyGemsparkWallOff": "Parede de Pedras de Rubi Brilhantes Offline", + "SailfishBoots": "Botas de Barbatanas", + "SalamanderBanner": "Bandeira da Salamandra", + "SandElementalBanner": "Bandeira do Elemental de Areia", + "SandFallWall": "Parede de Cascata de Areia", + "SandsharkBanner": "Bandeira do Tubarão de Areia", + "SandsharkCorruptBanner": "Bandeira do Mordedor de Ossos", + "SandsharkCrimsonBanner": "Bandeira do Ladrão de Carne", + "SandsharkHallowedBanner": "Bandeira do Moedor de Cristal", + "SandSlimeBanner": "Bandeira da Geleia de Areia", + "Sandstone": "Tijolo de Arenito", + "SandstoneWall": "Parede de Arenito", + "SapphireGemsparkWall": "Parede de Pedras de Safira Brilhantes", + "SapphireGemsparkWallOff": "Parede de Pedras de Safira Brilhantes Offline", + "ScalyTruffle": "Trufa Escamada", + "ScorpionStatue": "Estátua do Escorpião", + "Seashell": "Concha", + "SeaSnailBanner": "Bandeira do Caracol do Mar", + "Seedler": "Espada Espinho", + "SeveredHandBanner": "Bandeira da Mão Cortada", + "Sextant": "Sextante", + "ShadewoodBathtub": "Banheira de Madeira Escura", + "ShadewoodBookcase": "Estante de Madeira Escura", + "ShadewoodCandelabra": "Candelabro de Madeira Escura", + "ShadewoodCandle": "Vela de Madeira Escura", + "ShadewoodChandelier": "Lustre de Madeira Escura", + "ShadewoodClock": "Relógio de Madeira Escura", + "ShadewoodLamp": "Lâmpada de Madeira Escura", + "ShadewoodLantern": "Lanterna de Madeira Escura", + "ShadewoodSink": "Pia de Madeira Escura", + "ShadowDye": "Tintura das Sombras", + "ShadowFlameBow": "Arco da Chamas das Sombras", + "ShadowflameHadesDye": "Tintura de Hades das Chamas das Sombras", + "ShadowFlameHexDoll": "Boneca das Chamas das Sombras", + "ShadowFlameKnife": "Faca das Chamas das Sombras", + "SharkronBalloon": "Balão do Tubarão-Dragão", + "SharkStatue": "Estátua de Tubarão", + "SharkteethTrophy": "Troféu Dentes de Tubarão", + "SharkToothNecklace": "Colar do Dente de Tubarão", + "SharpeningStation": "Estação de Afiar", + "ShiftingPearlSandsDye": "Tintura de Areia-pérola Viva", + "ShiftingSandsDye": "Tintura de Areia Viva", + "ShinyStone": "Pedra Brilhante", + "ShipsWheel": "Leme", + "ShiverthornPlanterBox": "Vaso de Flores do Gelo", + "ShrimpyTruffle": "Trufa Cogumelita", + "ShroomitePlating": "Placas Cogumelitas", + "ShroomitePlatingWall": "Parede de Placas Cogumelitas", + "SilkRope": "Corda de Seda", + "SilkRopeCoil": "Rolo de Corda de Seda", + "SillyBalloonGreen": "Balão Verde Bobo", + "SillyBalloonGreenWall": "Parede de Balões Verdes Bobos", + "SillyBalloonMachine": "Máquina de Balões Bobos", + "SillyBalloonPink": "Balão Cor-de-rosa Bobo", + "SillyBalloonPinkWall": "Parede de Balões Cor-de-rosa Bobos", + "SillyBalloonPurple": "Balão Roxo Bobo", + "SillyBalloonPurpleWall": "Parede de Balões Roxos Bobos", + "SillyBalloonTiedGreen": "Balão Amarrado Bobo (Verde)", + "SillyBalloonTiedPink": "Balão Amarrado Bobo (Cor-de-rosa)", + "SillyBalloonTiedPurple": "Balão Amarrado Bobo (Roxo)", + "SillyStreamerBlue": "Bandeirolas Azuis", + "SillyStreamerGreen": "Bandeirolas Verdes", + "SillyStreamerPink": "Bandeirolas Cor-de-rosa", + "SilverAndBlackDye": "Tintura Prata e Preto", + "SkeletronBossBag": "Bolsa do Tesouro", + "SkeletronPrimeBossBag": "Bolsa do Tesouro", + "SkeletronPrimeMask": "Máscara do Esqueletron Alfa", + "SkyBlueString": "Cordão Azul Celeste", + "SkyFracture": "Fratura do Céu", + "SkywareBathtub": "Banheira Celeste", + "SkywareBed": "Cama Celeste", + "SkywareBookcase": "Estante Celeste", + "SkywareCandelabra": "Candelabro Celeste", + "SkywareCandle": "Vela Celeste", + "SkywareChandelier": "Lustre Celeste", + "SkywareClock": "Relógio Celeste", + "SkywareLamp": "Lâmpada Celeste", + "SkywareLantern": "Lanterna Celeste", + "SkywarePlatform": "Plataforma Celeste", + "SkywareSink": "Pia Celeste", + "SkywareWorkbench": "Bancada de Trabalho Celeste", + "SlapHand": "Ponteiro do Dar um Tapa", + "SliceOfCake": "Fatia de Bolo", + "SlimeBathtub": "Banheira de Geleia", + "SlimeBed": "Cama de Geleia", + "SlimeBookcase": "Estante de Geleia", + "SlimeCandelabra": "Candelabro de Geleia", + "SlimeCandle": "Vela de Geleia", + "SlimeChair": "Cadeira de Geleia", + "SlimeChandelier": "Lustre de Geleia", + "SlimeChest": "Baú de Geleia", + "SlimeClock": "Relógio de Geleia", + "SlimeDoor": "Porta de Geleia", + "SlimeDresser": "Cômoda de Geleia", + "SlimeGun": "Arma de Geleia", + "SlimeHook": "Gancho de Geleia", + "SlimeLamp": "Lâmpada de Geleia", + "SlimeLantern": "Lanterna de Geleia", + "SlimePiano": "Piano de Geleia", + "SlimePlatform": "Plataforma de Geleia", + "SlimeSink": "Pia de Geleia", + "SlimeSofa": "Sofá de Geleia", + "SlimeTable": "Mesa de Geleia", + "SlimySaddle": "Sela de Geleia", + "Sluggy": "Lesminha", + "SmokeBlock": "Bloco de Fumaça", + "SnailStatue": "Estátua de Lesma", + "SnowCloudBlock": "Nuvem de Neve", + "SnowFallWall": "Parede de Nevada", + "SolarCoriteBanner": "Bandeira de Corite", + "SolarCrawltipedeBanner": "Bandeira da Centopeia-Lacraia", + "SolarDrakomireBanner": "Bandeira do Dragão de Lava", + "SolarDrakomireRiderBanner": "Bandeira do Cavaleiro do Dragão de Lava", + "SolarDye": "Tintura do Sol", + "SolarEruption": "Erupção Solar", + "SolarFlareAxe": "Machado das Chamas do Sol", + "SolarFlareBreastplate": "Peitoral das Chamas do Sol", + "SolarFlareChainsaw": "Serra-elétrica das Chamas do Sol", + "SolarFlareDrill": "Furadeira das Chamas do Sol", + "SolarFlareHammer": "Martelo das Chamas do Sol", + "SolarFlareHelmet": "Elmo das Chamas do Sol", + "SolarFlareLeggings": "Calças das Chamas do Sol", + "SolarFlarePickaxe": "Picareta das Chamas do Sol", + "SolarMonolith": "Monolito Solar", + "SolarSolenianBanner": "Bandeira do Seleniano", + "SolarSrollerBanner": "Bandeira do Sroller", + "SolarTablet": "Placa do Sol", + "SoulDrain": "Drenagem da Vida", + "SparkyPainting": "Sparky", + "SpectreBar": "Barra Espectral", + "SpelunkerGlowstick": "Bastão Luminoso do Espeleólogo", + "SpiderFang": "Presa de Aranha", + "SpiderStaff": "Cajado de Aranha", + "SpiritFlame": "Chamas Espirituais", + "SpookyBathtub": "Banheira Assustadora", + "SpookyBed": "Cama Assustadora", + "SpookyBookcase": "Estante Assustadora", + "SpookyCandelabra": "Candelabro Assustador", + "SpookyCandle": "Vela Assustadora", + "SpookyChandelier": "Lustre Assustador", + "SpookyChest": "Baú Assustador", + "SpookyClock": "Relógio Assustador", + "SpookyLamp": "Lâmpada Assustadora", + "SpookyLantern": "Lanterna Assustadora", + "SpookySink": "Pia Assustador", + "SporeSac": "Bolsa de Esporos", + "SquireGreatHelm": "Elmo do Escudeiro", + "SquireGreaves": "Grevas do Escudeiro", + "SquirePlating": "Armadura de Placas do Escudeiro", + "SquireShield": "Escudo do Escudeiro", + "SquirrelGold": "Esquilo de Ouro", + "SquirrelGoldCage": "Gaiola do Esquilo de Ouro", + "SquirrelOrangeCage": "Gaiola do Esquilo Vermelho", + "SquirrelRed": "Esquilo Vermelho", + "SquirrelStatue": "Estátua do Esquilo", + "StardustAxe": "Machado de Pó das Estrelas", + "StardustBreastplate": "Armadura de Placas de Pó das Estrelas", + "StardustCellStaff": "Cajado de Células de Pó das Estrelas", + "StardustChainsaw": "Serra-elétrica de Pó das Estrelas", + "StardustDragonStaff": "Cajado do Dragão de Pó das Estrelas", + "StardustDrill": "Furadeira de Pó das Estrelas", + "StardustDye": "Tintura de Pó das Estrelas", + "StardustHammer": "Martelo de Pó das Estrelas", + "StardustHelmet": "Elmo de Pó das Estrelas", + "StardustJellyfishBanner": "Bandeira do Invasor de Fluxo", + "StardustLargeCellBanner": "Bandeira da Célula de Estrelas", + "StardustLeggings": "Calças de Pó de Estrelas", + "StardustMonolith": "Monolito de Pó das Estrelas", + "StardustPickaxe": "Picareta de Pó das Estrelas", + "StardustSmallCellBanner": "Bandeira Pequena da Célula de Estrelas", + "StardustSoldierBanner": "Bandeira do Observador das Estrelas", + "StardustSpiderBanner": "Bandeira do Criador de Brilhos", + "StardustWormBanner": "Bandeira do Explorador da Via-Láctea", + "Starfish": "Estrela do Mar", + "StarWrath": "Ira das Estrelas", + "StaticHook": "Gancho Estático", + "SteampunkBathtub": "Banheira Steampunk", + "SteampunkBookcase": "Estante Steampunk", + "SteampunkCandelabra": "Candelabro Steampunk", + "SteampunkCandle": "Vela Steampunk", + "SteampunkChandelier": "Lustre Steampunk", + "SteampunkChest": "Baú Steampunk", + "SteampunkClock": "Relógio Steampunk", + "SteampunkCup": "Cálice", + "SteampunkDresser": "Cômoda Steampunk", + "SteampunkLamp": "Lâmpada Steampunk", + "SteampunkLantern": "Lanterna Steampunk", + "SteampunkPiano": "Piano Steampunk", + "SteampunkPlatform": "Plataforma Steampunk", + "SteampunkSink": "Pia Steampunk", + "SteampunkWorkBench": "Bancada de Trabalho Steampunk", + "StickyDynamite": "Dinamite Adesiva", + "StickyGrenade": "Granada Adesiva", + "Stopwatch": "Cronômetro", + "StrangeBrew": "Bebida Estranha", + "StrangePlant1": "Planta Estranha", + "StrangePlant2": "Planta Estranha", + "StrangePlant3": "Planta Estranha", + "StrangePlant4": "Planta Estranha", + "StylistKilLaKillScissorsIWish": "Tesoura Elegante", + "SummonerEmblem": "Emblema do Invocador", + "Sundial": "Relógio Solar Encantado", + "SunMask": "Máscara do Sol", + "SuperAbsorbantSponge": "Esponja Super Absorvente", + "SuperHealingPotion": "Poção de Super Cura", + "SuspiciousLookingTentacle": "Tentáculo Suspeito", + "SwordfishTrophy": "Troféu do Peixe-espada", + "TallGate": "Portão Alto", + "TallyCounter": "Contador", + "TargetDummy": "Boneco para Treinamento", + "TartarSauce": "Molho Tártaro", + "TaxCollectorHat": "Chapéu do Cobrador de Impostos", + "TaxCollectorPants": "Calças do Cobrador de Impostos", + "TaxCollectorsStickOfDoom": "Bengala Elegante", + "TaxCollectorSuit": "Roupa do Cobrador de Impostos", + "TealString": "Cordão Ciano", + "TeamBlockBlue": "Bloco da Equipe Azul", + "TeamBlockBluePlatform": "Plataforma da Equipe Azul", + "TeamBlockGreen": "Bloco da Equipe Verde", + "TeamBlockGreenPlatform": "Plataforma da Equipe Verde", + "TeamBlockPink": "Bloco da Equipe Cor-de-rosa", + "TeamBlockPinkPlatform": "Plataforma da Equipe Cor-de-rosa", + "TeamBlockRed": "Bloco da Equipe Vermelha", + "TeamBlockRedPlatform": "Plataforma da Equipe Vermelha", + "TeamBlockWhite": "Bloco da Equipe Branca", + "TeamBlockWhitePlatform": "Plataforma da Equipe Branca", + "TeamBlockYellow": "Bloco da Equipe Amarela", + "TeamBlockYellowPlatform": "Plataforma da Equipe Amarela", + "TempestStaff": "Cajado da Tempestade", + "TendonHook": "Gancho do Tendão", + "Terrarian": "Terrariano", + "TheBrideDress": "Vestido de Casamento", + "TheBrideHat": "Véu de Casamento", + "TheEyeOfCthulhu": "O Olho de Cthulhu", + "ThePossessedBanner": "A Bandeira Possuída", + "ThornHook": "Gancho dos Espinhos", + "TinPlating": "Placa de Lata", + "TinPlatingWall": "Parede de Placas de Lata", + "TombCrawlerBanner": "Bandeira do Verme das Covas", + "TopazGemsparkWall": "Parede de Pedras de Topázio Brilhantes", + "TopazGemsparkWallOff": "Parede de Pedras de Topázio Brilhantes Offline", + "ToxicFlask": "Frasco Tóxico", + "Toxikarp": "Carpa-tóxica", + "Trapdoor": "Alçapão", + "TruffleWorm": "Verme da Trufa", + "Tsunami": "Tsunami", + "TsunamiInABottle": "Tsunami na Garrafa", + "TumbleweedBanner": "Bandeira dos Galhos Furiosos", + "TwilightDye": "Tintura do Crepúsculo", + "TwilightHairDye": "Tintura dos Cabelos do Crepúsculo", + "TwinMask": "Máscara dos Gêmeos", + "TwinsBossBag": "Bolsa do Tesouro", + "UndeadVikingStatue": "Estátua Viking Zumbi", + "UnicornStatue": "Estátua de Unicórnio", + "UnicornWispDye": "Tintura de Luz Fantasma do Unicórnio", + "ValkyrieYoyo": "Ioiô da Valquíria", + "Valor": "Valor", + "ViciousMushroom": "Cogumelo Terrível", + "ViciousPowder": "Pó Terrível", + "VineRope": "Corda de Vinha", + "VineRopeCoil": "Rolo de Corda de Vinha", + "VioletString": "Cordão Violeta", + "VoidDye": "Tintura do Vazio", + "VortexAxe": "Machado do Vórtice", + "VortexBeater": "Espingarda do Vórtice", + "VortexBreastplate": "Peitoral do Vórtice", + "VortexChainsaw": "Serra-elétrica do Vórtice", + "VortexDrill": "Furadeira do Vórtice", + "VortexDye": "Tintura do Vórtice", + "VortexHammer": "Martelo do Vórtice", + "VortexHelmet": "Elmo do Vórtice", + "VortexHornetBanner": "Bandeira da Vespa Alienígena", + "VortexHornetQueenBanner": "Bandeira da Rainha Vespa", + "VortexLarvaBanner": "Bandeira da Larva Alienígena", + "VortexLeggings": "Calças do Vórtice", + "VortexMonolith": "Monolito do Vórtice", + "VortexPickaxe": "Picareta do Vórtice", + "VortexRiflemanBanner": "Bandeira do Mergulhador da Tempestade", + "VortexSoldierBanner": "Bandeira do Filho do Vórtice", + "WalkingAntlionBanner": "Bandeira da Formiga-leão Corredora", + "WallAnchor": "Âncora na Parede", + "WallCreeperStatue": "Estátua da Aranha Trepadeira", + "WallOfFleshBossBag": "Bolsa do Tesouro", + "WandofSparking": "Varinha Brilhante", + "WarTable": "Mesa de Guerra", + "WarTableBanner": "Bandeira da Mesa de Guerra", + "WaterfallBlock": "Bloco da Cachoeira", + "WaterleafPlanterBox": "Vaso das Folhas d'água", + "WeaponRack": "Prateleira de Armas", + "WeatherRadio": "Rádio do Tempo", + "WebRope": "Corda de Teias", + "WebRopeCoil": "Rolo de Corda de Teias", + "WeightedPressurePlateCyan": "Placa de Pressão Ciano", + "WeightedPressurePlateOrange": "Placa de Pressão Laranja", + "WeightedPressurePlatePink": "Placa de Pressão Cor-de-rosa", + "WeightedPressurePlatePurple": "Placa de Pressão Roxa", + "WhiteLunaticHood": "Capuz do Cultista do Sol", + "WhiteLunaticRobe": "Roupão do Cultista do Sol", + "WhitePhasesaber": "Sabre de Luz Branco", + "WhiteString": "Cordão Branco", + "WineGlass": "Taça de Vinho", + "WingsNebula": "Manto de Nébula", + "WingsSolar": "Asas do Sol", + "WingsStardust": "Asas de Pó das Estrelas", + "WingsVortex": "Reforço do Vórtice", + "WireBulb": "Luz Multicolorida", + "WireKite": "O Grande Projeto", + "WirePipe": "Caixa de Passagem", + "WispDye": "Tintura da Luz Fantasma", + "WoodenSink": "Pia de Madeira", + "WoodYoyo": "Ioiô de Madeira", + "WormholePotion": "Poção do Teleporte", + "WormHook": "Gancho de Verme", + "WormScarf": "Cachecol de Verme", + "WormStatue": "Estátua de Verme", + "WraithStatue": "Estátua da Assombração", + "Xenopopper": "Xenopopper", + "XenoStaff": "Xeno Cajado", + "Yelets": "Yelets", + "YellowCounterweight": "Contrapeso Amarelo", + "YellowPhasesaber": "Sabre de Luz Amarelo", + "YellowString": "Cordão Amarelo", + "YellowWrench": "Chave Inglesa Amarela", + "Yoraiz0rDarkness": "Expressão Feroz de Yoraiz0r", + "Yoraiz0rHead": "Óculos Coloridos de Yoraiz0r", + "Yoraiz0rPants": "Saia de Yoraiz0r", + "Yoraiz0rShirt": "Uniforme de Yoraiz0r", + "Yoraiz0rWings": "Feitiço de Yoraiz0r", + "YoyoBag": "Bolsa de Ioiô", + "YoYoGlove": "Luvas de Ioiô", + "ZombieArmStatue": "Estátua do Zumbi Armado", + "AleThrowingGlove": "Arremessador de Cerveja", + "ApprenticeAltHead": "Chapéu do Artista Sombrio", + "ApprenticeAltPants": "Calças do Artista Sombrio", + "ApprenticeAltShirt": "Roupão do Artista Sombrio", + "ApprenticeStaffT3": "Ira de Betsy", + "BetsyWings": "Asas de Betsy", + "BookStaff": "Tomo da Sabedoria Infinita", + "BossMaskBetsy": "Máscara de Betsy", + "BossMaskDarkMage": "Máscara do Mago Sombrio", + "BossMaskOgre": "Máscara de Ogro", + "BossTrophyBetsy": "Troféu de Betsy", + "BossTrophyDarkmage": "Troféu do Mago Sombrio", + "BossTrophyOgre": "Troféu do Ogro", + "CrystalBathtub": "Banheira de Cristal", + "CrystalBed": "Cama de Cristal", + "CrystalBookCase": "Estante de Cristal", + "CrystalCandelabra": "Candelabro de Cristal", + "CrystalCandle": "Vela de Cristal", + "CrystalChair": "Cadeira de Cristal", + "CrystalChandelier": "Lustre de Cristal", + "CrystalChest": "Baú de Cristal", + "CrystalClock": "Relógio de Cristal", + "CrystalDoor": "Porta de Cristal", + "CrystalDresser": "Cômoda de Cristal", + "CrystalLamp": "Lâmpada de Cristal", + "CrystalLantern": "Lanterna de Cristal", + "CrystalPiano": "Piano de Cristal", + "CrystalPlatform": "Plataforma de Cristal", + "CrystalSink": "Pia de Cristal", + "CrystalSofaHowDoesThatEvenWork": "Sofá de Cristal", + "CrystalTable": "Mesa de Cristal", + "CrystalWorkbench": "Mesa de Trabalho de Cristal", + "DD2BallistraTowerT1Popper": "Bastão da Balista", + "DD2BallistraTowerT2Popper": "Bengala da Balista", + "DD2BallistraTowerT3Popper": "Cajado da Balista", + "DD2BetsyBow": "Maldição Aérea", + "DD2DrakinBanner": "Bandeira de Drakin", + "DD2ElderCrystal": "Cristal de Eternia", + "DD2ElderCrystalStand": "Base do Cristal de Eternia", + "DD2EnergyCrystal": "Mana de Éter", + "DD2ExplosiveTrapT1Popper": "Bastão da Armadilha Explosiva", + "DD2ExplosiveTrapT2Popper": "Bengala da Armadilha Explosiva", + "DD2ExplosiveTrapT3Popper": "Cajado da Armadilha Explosiva", + "DD2FlameburstTowerT1Popper": "Bastão das Chamas Explosivas", + "DD2FlameburstTowerT2Popper": "Bengala das Chamas Explosivas", + "DD2FlameburstTowerT3Popper": "Cajado das Chamas Explosivas", + "DD2GoblinBanner": "Bandeira do Goblin de Éter", + "DD2GoblinBomberBanner": "Bandeira do Goblin Bombardeiro de Éter", + "DD2JavelinThrowerBanner": "Bandeira do Lançador de Dardos de Éter", + "DD2KoboldBanner": "Bandeira do Kobold", + "DD2KoboldFlyerBanner": "Bandeira do Kobold Voador", + "DD2LightningAuraT1Popper": "Bastão da Aura de Relâmpagos", + "DD2LightningAuraT2Popper": "Bengala da Aura de Relâmpagos", + "DD2LightningAuraT3Popper": "Cajado da Aura de Relâmpagos", + "DD2LightningBugBanner": "Bandeira do Inseto Relâmpago de Éter", + "DD2PetDragon": "Ovo de Dragão", + "DD2PetGato": "Ovo de Gato", + "DD2PetGhost": "Ovo de Creeper", + "DD2PhoenixBow": "Fantasma da Fênix", + "DD2SkeletonBanner": "Bandeira do Esqueleto do Antigo", + "DD2SquireBetsySword": "Dragão Voador", + "DD2SquireDemonSword": "Marca do Inferno", + "DD2WitherBeastBanner": "Bandeira da Fera Definhada", + "DD2WyvernBanner": "Bandeira da Serpe de Éter", + "DungeonClockBlue": "Relógio de Calabouço Azul", + "DungeonClockGreen": "Relógio de Calabouço Verde", + "DungeonClockPink": "Relógio de Calabouço Cor-de-rosa", + "DynastyDresser": "Cômoda da Dinastia", + "DynastyPiano": "Piano da Dinastia", + "DynastySofa": "Sofá da Dinastia", + "Fake_CrystalChest": "Armadilha do Baú de Cristal", + "Fake_GoldenChest": "Armadilha do Baú de Ouro", + "FleshPlatform": "Plataforma de Carne", + "FrozenDresser": "Cômoda Congelada", + "FrozenPlatform": "Plataforma Congelada", + "GoldenChest": "Baú de Ouro", + "GoldenPlatform": "Plataforma de Ouro", + "GoldenWorkbench": "Mesa de Trabalho de Ouro", + "HuntressAltHead": "Chapeuzinho Vermelho", + "HuntressAltPants": "Calças Vermelhas", + "HuntressAltShirt": "Vestidinho Vermelho", + "LihzahrdPlatform": "Plataforma de Lagharto", + "LivingWoodDresser": "Cômoda de Madeira Viva", + "MonkAltHead": "Elmo do Shinobi Invasor", + "MonkAltPants": "Calças do Shinobi Invasor", + "MonkAltShirt": "Torso do Shinobi Invasor", + "MonkStaffT1": "Octopod Sonolento", + "MonkStaffT2": "Gládio Terrível", + "MonkStaffT3": "Fúria do Dragão Celeste", + "SquireAltHead": "Elmo do Cavaleiro de Valhalla", + "SquireAltPants": "Grevas do Cavaleiro de Valhalla", + "SquireAltShirt": "Peitoral do Cavaleiro de Valhalla", + "SkywareClock2": "Relógio Solar", + "LeinforsHat": "Protetor de Cabelos de Leinfors", + "LeinforsShirt": "Estilo Exagerado de Leinfors", + "LeinforsPants": "Calças Chiques de Leinfors", + "LeinforsWings": "Manto de Preênsil de Leinfors", + "LeinforsAccessory": "Shampoo de Luxo de Leinfors", + "GraniteGolemBanner": "Bandeira do Golem de Granito", + "RavagerScorpionBanner": "Bandeira do Caçador de Areia", + "MusicBoxDD2": "Caixinha de Música (Exército do Ancião)", + "BossBagBetsy": "{$ItemName.SkeletronBossBag}" + }, + "ItemTooltip": { + "ShadowGreaves": "7% de aumento na velocidade do ataque físico", + "ConfettiGun": "Atira confetes para todos os lados!", + "ChlorophyteMask": "16% de aumento nos danos por ataques físicos\n6% de aumento na chance de acerto crítico em ataque físico", + "ChlorophyteHelmet": "16% de aumento nos danos por ataque à distância\n20% de chance de não consumir munição", + "ChlorophyteHeadgear": "Aumenta o máximo de mana em 80 e reduz o uso de mana em 17%\n16% de aumento nos danos por magia", + "ChlorophytePlateMail": "5% de aumento nos danos\n7% de aumento na chance de acerto crítico", + "ChlorophyteGreaves": "8% de aumento na chance de acerto crítico\n5% de aumento na velocidade dos movimentos", + "ChlorophyteBar": "Reage à luz", + "ShadowScalemail": "7% de aumento na velocidade do ataque físico", + "ShadowHelmet": "7% de aumento na velocidade do ataque físico", + "NightmarePickaxe": "Permite a mineração de pedras infernais", + "Paintbrush": "Utiliza-se com tinta para colorir blocos", + "PaintRoller": "Utiliza-se com tinta para colorir paredes", + "ManaCrystal": "Aumenta a mana máxima permanentemente em 20", + "GolfBallDyedPink": "{$CommonItemTooltip.GolfBall}", + "TealMushroom": "Utiliza-se na criação de Tintura verde azulada", + "GreenMushroom": "Utiliza-se na criação de Tintura verde", + "SkyBlueFlower": "Utiliza-se na criação de Tintura azul celeste", + "BandofStarpower": "Aumenta a mana máxima em 20", + "YellowMarigold": "Utiliza-se na criação de Tintura amarela", + "BlueBerries": "Utiliza-se na criação de Tintura azul", + "LimeKelp": "Utiliza-se na criação de Tintura verde-limão", + "PinkPricklyPear": "Utiliza-se na criação de Tintura cor-de-rosa", + "OrangeBloodroot": "Utiliza-se na criação de Tintura laranja", + "RedHusk": "Utiliza-se na criação de Tintura vermelha", + "CyanHusk": "Utiliza-se na criação de Tintura ciano", + "VioletHusk": "Utiliza-se na criação de Tintura violeta", + "PurpleMucos": "Utiliza-se na criação de Tintura roxa", + "BlackInk": "Utiliza-se na criação de Tintura preta", + "FlowerofFire": "Arremessa bolas de fogo", + "DyeVat": "Utiliza-se na criação de tinturas", + "BeeGun": "Atira abelhas que perseguirão seus inimigos", + "PossessedHatchet": "Persegue seus inimigos", + "BeeKeeper": "Invoca abelhas assassinas depois de atacar seu inimigo\nPequena chance de causar confusão", + "HiveWand": "Cria colmeias", + "MagicMissile": "Lança um míssil controlável", + "Beenade": "Explode em um enxame de abelhas", + "GravityGlobe": "Permite que o usuário reverta a gravidade\nPressione PARA CIMA para alterar a gravidade", + "KiteRed": "{$CommonItemTooltip.Kite}", + "Abeemination": "Invoca a Abelha rainha", + "DirtRod": "Magicamente move a terra", + "TempleKey": "Abre a porta do templo da selva", + "LihzahrdWorkBench": "Serve para criação básica", + "ShadowOrb": "Cria uma esfera de sombra mágica", + "LihzahrdPressurePlate": "Ativa quando um jogador passar por cima", + "PiranhaGun": "Prende-se aos inimigos para causar dano contínuo", + "PygmyStaff": "Invoca um pigmeu para lutar por você", + "KiteBlueAndYellow": "{$CommonItemTooltip.Kite}", + "KiteBlue": "{$CommonItemTooltip.Kite}", + "KiteWyvern": "{$CommonItemTooltip.Kite}", + "GroxTheGreatGreaves": "{$CommonItemTooltip.DevItem}", + "LeafWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BlizzardinaBalloon": "Permite pulos duplos\nAumenta a altura dos pulos", + "BundleofBalloons": "Permite que o usuário execute pulos quádruplos\nAumenta a altura dos pulos", + "BatWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "HerculesBeetle": "Aumenta os danos de seus lacaios em 15%\nAumenta as quedas dos seus lacaios", + "BoneKey": "Invoca uma Cabeça de Esqueletron Bebê", + "MeteoriteBar": "Morno ao toque", + "Nectar": "Invoca um filhote de vespa", + "TikiTotem": "Invoca um espírito Tiki", + "LizardEgg": "Invoca um lagarto de estimação", + "LeafBlower": "Atira rapidamente folhas bem afiadas", + "ChlorophyteBullet": "Persegue seus inimigos", + "Hook": "Às vezes cai de esqueletos e piranhas", + "ParrotCracker": "Invoca um papagaio de estimação", + "StrangeGlowingMushroom": "Invoca um filhote de trufa", + "Seedling": "Invoca uma plantinha de estimação", + "WispinaBottle": "Invoca uma luz fantasma para iluminar seu caminho", + "PalladiumPickaxe": "Pode minerar mithril e oricalco", + "PalladiumDrill": "Pode minerar mithril e oricalco", + "OrichalcumPickaxe": "Pode minerar adamantino e titânio", + "OrichalcumDrill": "Pode minerar adamantino e titânio", + "MoltenFury": "Acende flechas de madeira", + "PalladiumMask": "8% de aumento nos danos por ataques físicos\n12% de aumento na velocidade do ataque físico", + "PalladiumHelmet": "9% de aumento nos danos por ataque à distância\n9% de aumento na chance de acerto crítico à distância", + "PalladiumHeadgear": "7% de aumento nos danos por magia e na chance de acerto crítico\nAumenta a mana máxima em 60", + "PalladiumBreastplate": "3% de aumento nos danos\n2% de aumento na chance de acerto crítico", + "PalladiumLeggings": "2% de aumento nos danos\n1% de aumento na chance de acerto crítico", + "FieryGreatsword": "É feita de fogo!", + "OrichalcumMask": "7% de aumento nos danos por ataques físicos\n7% de aumento na velocidade dos movimentos e dos ataques físicos", + "OrichalcumHelmet": "15% de aumento na chance de acerto crítico à distância\n8% de aumento na velocidade dos movimentos", + "OrichalcumHeadgear": "18% de aumento na chance de acerto crítico mágico\nAumenta a mana máxima em 80", + "OrichalcumBreastplate": "6% de aumento na chance de acerto crítico", + "OrichalcumLeggings": "11% de aumento na velocidade dos movimentos", + "TitaniumMask": "8% de aumento nos danos por ataque físico e na chance de ataque crítico\n8% de aumento na velocidade do ataque físico", + "TitaniumHelmet": "16% de aumento nos danos por ataque à distância\n7% de aumento na chance de acerto crítico à distância", + "TitaniumHeadgear": "16% de aumento nos danos por magia e 7% na chance de ataque mágico crítico\nAumenta a mana máxima em 100", + "TitaniumBreastplate": "4% de aumento nos danos\n3% de aumento na chance de acerto crítico", + "TitaniumLeggings": "3% de aumento nos danos e na chance de ataque crítico\n6% de aumento na velocidade dos movimentos", + "OrichalcumAnvil": "Serve para criar itens a partir de barras de mithril, oricalco, adamantino e titânio", + "TitaniumForge": "Serve para derreter minério de adamantino e de titânio", + "ChlorophyteClaymore": "Atira uma esfera poderosa", + "ChlorophyteSaber": "Atira uma nuvem de esporos", + "ChlorophytePartisan": "Atira uma nuvem de esporos", + "MeteorHelmet": "7% de aumento nos danos por magia", + "ChlorophyteArrow": "Rebate depois de acertar uma parede", + "MeteorSuit": "7% de aumento nos danos por magia", + "AmberMosquito": "Invoca um filhote de dinossauro", + "NimbusRod": "Invoca uma nuvem para fazer cair chuva em seus inimigos", + "GroxTheGreatArmor": "{$CommonItemTooltip.DevItem}", + "EyeoftheGolem": "10% de aumento na chance de acerto crítico", + "HoneyBalloon": "Aumenta a altura dos pulos\nLibera abelhas quando sofrer danos", + "MeteorLeggings": "7% de aumento nos danos por magia", + "BlueHorseshoeBalloon": "Permite pulos duplos\nAumenta a altura dos pulos e cancela danos por queda", + "WhiteHorseshoeBalloon": "Permite pulos duplos\nAumenta a altura dos pulos e cancela danos por queda", + "YellowHorseshoeBalloon": "Permite pulos duplos\nAumenta a altura dos pulos e cancela danos por queda", + "OceanCrate": "{$CommonItemTooltip.RightClickToOpen}", + "SniperRifle": "Atira um poderoso projétil a alta velocidade\n para afastar", + "VenusMagnum": "Atira um poderoso projétil a alta velocidade", + "CrimsonRod": "Invoca uma nuvem para fazer cair uma chuva de sangue em seus inimigos", + "SteampunkWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsVortex": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "RainbowGun": "Atira um arco-íris que causa danos contínuos", + "StyngerBolt": "Explode em estilhaços mortais", + "FlowerofFrost": "Atira uma bola de gelo", + "Uzi": "Atira um poderoso projétil a alta velocidade", + "RocketBoots": "Permite o voo", + "AmethystRobe": "Aumenta a mana máxima em 20\nReduz o custo de uso de mana em 5%", + "TopazRobe": "Aumenta a mana máxima em 40\nReduz o custo de uso de mana em 7%", + "SapphireRobe": "Aumenta a mana máxima em 40\nReduz o custo de uso de mana em 9%", + "EmeraldRobe": "Aumenta a mana máxima em 60\nReduz o custo de uso de mana em 11%", + "RubyRobe": "Aumenta a mana máxima em 60\nReduz o custo de uso de mana em 13%", + "DiamondRobe": "Aumenta a mana máxima em 80\nReduz o custo de uso de mana em 15%", + "GroxTheGreatHelm": "{$CommonItemTooltip.DevItem}", + "LifeFruit": "Aumenta a vida máxima permanentemente em 5", + "LihzahrdPowerCell": "Utilizada no Altar lagharto", + "Picksaw": "Capaz de minerar tijolos lagharto", + "JimsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "StaffofEarth": "Invoca um poderoso rochedo", + "GolemFist": "Dá um soco com a força de um golem", + "Binoculars": "Aumenta o alcance de visualização quando equipado", + "RifleScope": "Aumenta o alcance de visualização para armas\n para afastar", + "DestroyerEmblem": "10% de aumento nos danos\n8% de aumento na chance de acerto crítico", + "JellyfishNecklace": "Ilumina embaixo d'água", + "IceSickle": "Atira uma foice de gelo", + "ClothierVoodooDoll": "'Você é uma pessoa muito má.'", + "PoisonStaff": "Atira uma presa envenenada que perfura múltiplos inimigos", + "SlimeStaff": "Invoca um filhote de geleia para lutar por você", + "PoisonDart": "Envenena os inimigos", + "EyeSpring": "Invoca um olho saltitante", + "ToySled": "Invoca um filhote de boneco de neve", + "BookofSkulls": "Atira uma caveira", + "KOCannon": "Atira uma luva de boxe", + "PirateMap": "Invoca uma invasão pirata", + "TurtleHelmet": "6% de aumento nos danos por ataques físicos\nA chance dos inimigos mirarem em você é maior", + "TurtleScaleMail": "8% de aumento nos danos por ataque físico e na chance de ataque crítico\nA chance dos inimigos mirarem em você é maior", + "TurtleLeggings": "4% de aumento na chance de acerto crítico em ataque físico\nA chance dos inimigos mirarem em você é maior", + "KiteWorldFeeder": "{$CommonItemTooltip.Kite}", + "OasisCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "ObsidianRose": "Reduz danos sofridos ao entrar em contato com lava", + "RodofDiscord": "Teleporta até a posição do mouse", + "DeathSickle": "Atira uma foice mortal", + "BloodySpine": "Invoca o Cérebro de Cthulhu", + "Ichor": "\"O sangue dos deuses\"", + "IchorTorch": "Pode ser posicionado na água", + "IchorArrow": "Diminui a defesa do alvo", + "IchorBullet": "Diminui a defesa do alvo", + "GoldenShower": "Emite um espirro de ichor\nDiminui a defesa do alvo", + "OasisCrate": "{$CommonItemTooltip.RightClickToOpen}", + "ImbuingStation": "Utiliza-se na criação de frascos de efeitos para armas", + "EmptyBullet": "Utiliza-se na criação de vários tipos de munição", + "ShadowbeamStaff": "Cria um feixe de sombra que rebate nas paredes", + "InfernoFork": "Lança uma bola de fogo que explode em um violento fogo infernal", + "SpectreStaff": "Invoca uma alma perdida para perseguir seus inimigos", + "BubbleMachine": "Estoura bolhas", + "BubbleWand": "Estoura bolhas", + "WaterCandle": "Segurar isto pode atrair atenção indesejada", + "Book": "Contém símbolos estranhos", + "CopperWatch": "Diz a hora", + "SpectreHood": "40% de diminuição nos danos por magia", + "SpectreRobe": "7% de aumento nos danos por magia e na chance de acerto crítico", + "SpectrePants": "8% de aumento nos danos por magia\n8% de aumento na velocidade dos movimentos", + "NecroHelmet": "5% de aumento nos danos por ataque à distância.", + "PaladinsHammer": "Um poderoso martelo que volta para você", + "BeeWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "NecroBreastplate": "5% de aumento nos danos por ataque à distância.", + "LargeAmethyst": "Para Capturar a pedra preciosa. Cai quando você morre", + "LargeTopaz": "Para Capturar a pedra preciosa. Cai quando você morre", + "LargeSapphire": "Para Capturar a pedra preciosa. Cai quando você morre", + "LargeEmerald": "Para Capturar a pedra preciosa. Cai quando você morre", + "LargeRuby": "Para Capturar a pedra preciosa. Cai quando você morre", + "LargeDiamond": "Para Capturar a pedra preciosa. Cai quando você morre", + "NecroGreaves": "5% de aumento nos danos por ataque à distância.", + "JungleKey": "Desbloqueia um baú da selva no calabouço", + "CorruptionKey": "Desbloqueia um baú corrompido no calabouço", + "CrimsonKey": "Desbloqueia um baú de carmim no calabouço", + "HallowedKey": "Desbloqueia um baú consagrado no calabouço", + "Cherry": "{$CommonItemTooltip.MinorStats}", + "SpectrePaintbrush": "Utiliza-se com tinta para colorir blocos", + "SpectrePaintRoller": "Utiliza-se com tinta para colorir paredes", + "GolfBallDyedOrange": "{$CommonItemTooltip.GolfBall}", + "ShroomiteHeadgear": "15% de aumento nos danos por flechas\n5% de aumento na chance de acerto crítico à distância", + "ShroomiteMask": "15% de aumento nos danos por projéteis\n5% de aumento na chance de acerto crítico à distância", + "ShroomiteHelmet": "15% de aumento nos danos por foguetes\n5% de aumento na chance de acerto crítico à distância", + "KiteBoneSerpent": "{$CommonItemTooltip.Kite}", + "ShroomiteLeggings": "7% de aumento na chance de acerto crítico à distância\n12% de aumento na velocidade dos movimentos", + "Autohammer": "Converte Barras de Clorofita em Barras de Cogumelita", + "Jetpack": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressUpToBooster}", + "CenxsTiara": "{$CommonItemTooltip.DevItem}", + "CenxsBreastplate": "{$CommonItemTooltip.DevItem}", + "CenxsLeggings": "{$CommonItemTooltip.DevItem}", + "CrownosMask": "{$CommonItemTooltip.DevItem}", + "CrownosBreastplate": "{$CommonItemTooltip.DevItem}", + "CrownosLeggings": "{$CommonItemTooltip.DevItem}", + "CobaltShield": "Oferece imunidade a recuos", + "WillsHelmet": "{$CommonItemTooltip.DevItem}", + "WillsBreastplate": "{$CommonItemTooltip.DevItem}", + "WillsLeggings": "{$CommonItemTooltip.DevItem}", + "JimsHelmet": "{$CommonItemTooltip.DevItem}", + "JimsBreastplate": "{$CommonItemTooltip.DevItem}", + "JimsLeggings": "{$CommonItemTooltip.DevItem}", + "AaronsHelmet": "{$CommonItemTooltip.DevItem}", + "AaronsBreastplate": "{$CommonItemTooltip.DevItem}", + "AaronsLeggings": "{$CommonItemTooltip.DevItem}", + "VampireKnives": "Arremesse adagas que roubam vida rapidamente", + "AquaScepter": "Espirra água", + "ScourgeoftheCorruptor": "Uma poderosa lança que atira pequenos devoradores", + "Banana": "{$CommonItemTooltip.MinorStats}", + "SweetheartNecklace": "Lança abelhas e aumenta a velocidade dos movimentos quando sofrer danos", + "FlurryBoots": "Permite correr ultra veloz", + "LuckyHorseshoe": "Nega os danos por queda", + "DTownsHelmet": "{$CommonItemTooltip.DevItem}", + "DTownsBreastplate": "{$CommonItemTooltip.DevItem}", + "DTownsLeggings": "{$CommonItemTooltip.DevItem}", + "GroxTheGreatWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "StillLife": "{$PaintingArtist.Crowno}", + "BloodyGoblet": "{$PaintingArtist.Crowno}", + "WickedUndead": "{$PaintingArtist.Crowno}", + "CenxsDress": "{$CommonItemTooltip.DevItem}", + "CenxsDressPants": "{$CommonItemTooltip.DevItem}", + "ShinyRedBalloon": "Aumenta a altura dos pulos", + "MagicCuffs": "Aumenta a mana máxima em 20\nRestaura mana quando sofrer danos", + "SilverWatch": "Diz a hora", + "AnkhCharm": "Garante imunidade à maioria dos efeitos negativos", + "AnkhShield": "Oferece imunidade a quedas e a blocos de fogo\nGarante imunidade à maioria dos efeitos negativos", + "WaterBolt": "Lança um raio d'água lento", + "GolfBall": "{$CommonItemTooltip.GolfBall}", + "Dynamite": "Uma grande explosão que destruirá a maioria das peças", + "Grenade": "Uma pequena explosão que não destruirá peças", + "GoldWatch": "Diz a hora", + "FartinaJar": "Permite pulos duplos", + "HellstoneBar": "Quente ao toque", + "LeprechaunHat": "Para mim, parece um duende", + "LeprechaunShirt": "Eu só quero saber onde fica o ouro!", + "LeprechaunPants": "Eu quero o ouro. Eu quero o ouro. Eu quero o ouro. Me dá o ouro!", + "GoodieBag": "{$CommonItemTooltip.RightClickToOpen}", + "CandyCornRifle": "33% de chance de não consumir munição", + "Sickle": "Permite coletar feno de grama", + "KiteAngryTrapper": "{$CommonItemTooltip.Kite}", + "TatteredFairyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "SpiderEgg": "Invoca uma aranha de estimação", + "MagicalPumpkinSeed": "Invoca uma abóbora de estimação", + "DepthMeter": "Exibe a profundidade", + "BatScepter": "Invoca morcegos para atacar seus inimigos", + "RavenStaff": "Invoca um corvo para lutar por você", + "JungleKeyMold": "Serve para a criação de uma chave da selva", + "CorruptionKeyMold": "Serve para a criação de uma chave corrompida", + "CrimsonKeyMold": "Serve para a criação de uma chave de carmim", + "HallowedKeyMold": "Serve para a criação de uma chave consagrada", + "FrozenKeyMold": "Serve para a criação de uma chave congelada", + "RottenEgg": "Ótimo para pregar peças nos habitantes locais", + "UnluckyYarn": "Invoca um gatinho preto", + "TheHorsemansBlade": "Invoca cabeças de abóbora para atacar seus inimigos", + "SpookyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "GhostManifestation": "{$PaintingArtist.Crowno}", + "Graveyard": "{$PaintingArtist.Crowno}", + "Reborn": "{$PaintingArtist.Crowno}", + "CursedSapling": "Invoca uma plantinha amaldiçoada para seguir você", + "PumpkinMoonMedallion": "Invoca a Lua de abóbora", + "Nevermore": "{$PaintingArtist.Crowno}", + "SniperScope": "Aumenta o alcance de visualização para armas ( para afastar a visão)\n10% de aumento nos danos por ataque à distância e na chance de ataque crítico", + "BreathingReed": "Aumenta o fôlego e permite respirar embaixo d'água", + "JellyfishDivingGear": "Garante a habilidade de nadar e aumenta consideravelmente o fôlego embaixo d'água\nIlumina embaixo d'água", + "ArcticDivingGear": "Garante a habilidade de nadar e aumenta consideravelmente o fôlego embaixo d'água\nIlumina embaixo d'água e aumenta a mobilidade no gelo", + "GnomeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Gnome}", + "FartInABalloon": "Permite pulos duplos\nAumenta a altura dos pulos", + "DandelionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Dandelion}", + "GolfPainting3": "{$PaintingArtist.Crowno}", + "ArkhalisWings": "{$ItemTooltip.ArkhalisHat}\n{$CommonItemTooltip.FlightAndSlowfall}", + "Present": "{$CommonItemTooltip.RightClickToOpen}", + "Flipper": "Oferece a capacidade de nadar", + "RedRyder": "Não vá arrancar o próprio olho!", + "FestiveWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BladeofGrass": "Tem chance de envenenar seus inimigos", + "EldMelter": "Utiliza gel como munição", + "KiteGoldfish": "{$CommonItemTooltip.Kite}", + "ReindeerBells": "Invoca uma rena que pode ser montada", + "CnadyCanePickaxe": "Pode minerar meteoritos", + "KiteBunnyCrimson": "{$CommonItemTooltip.Kite}", + "KiteBunnyCorrupt": "{$CommonItemTooltip.Kite}", + "HandWarmer": "Garante imunidade contra efeitos de congelamento", + "Coal": "'Você foi malcriado este ano'", + "GolfPainting2": "{$PaintingArtist.Crowno}", + "DogWhistle": "Invoca um Filhote", + "ChristmasTreeSword": "Dispara decorações de Natal", + "ChainGun": "50% de chance de não consumir munição", + "ObsidianSkull": "Oferece imunidade a blocos de fogo", + "Razorpine": "Dispara espinhos afiados", + "BlizzardStaff": "Faz chover gelo em uma área", + "SnowmanCannon": "Lança mísseis teleguiados", + "NorthPole": "Dispara uma lança de gelo que faz chover flocos de neve", + "NaughtyPresent": "Invoca a Lua de Gelo", + "BabyGrinchMischiefWhistle": "Invoca um Filhote de Grinch", + "StarCannon": "Atira em estrelas cadentes", + "Fez": "'Fezzes são o máximo'", + "JungleRose": "Que lindo, ah que lindo", + "FeralClaws": "12% de aumento na velocidade do ataque físico", + "AnkletoftheWind": "10% de aumento na velocidade dos movimentos", + "GolfClubIron": "{$CommonItemTooltip.GolfIron}", + "WhoopieCushion": "Pode incomodar outras pessoas", + "HeavyWorkBench": "Utilizado na criação avançada", + "AmmoBox": "Reduz o consumo de munição em 20%", + "Flamelash": "Invoca uma bola de fogo controlável", + "VenomStaff": "Atira uma presa envenenada que perfura múltiplos inimigos", + "SpectreMask": "Aumenta o máximo de mana em 60 e reduz o uso de mana em 13%\n5% de aumento nos danos por magia e na chance de acerto crítico", + "BoneWelder": "{$CommonItemTooltip.SpecialCrafting}", + "FleshCloningVaat": "{$CommonItemTooltip.SpecialCrafting}", + "GlassKiln": "{$CommonItemTooltip.SpecialCrafting}", + "LihzahrdFurnace": "{$CommonItemTooltip.SpecialCrafting}", + "LivingLoom": "{$CommonItemTooltip.SpecialCrafting}", + "SkyMill": "{$CommonItemTooltip.SpecialCrafting}", + "IceMachine": "{$CommonItemTooltip.SpecialCrafting}", + "BeetleHelmet": "6% de aumento nos danos por ataques físicos\nA chance dos inimigos mirarem em você é maior", + "BeetleScaleMail": "8% de aumento nos danos por ataque físico e na chance de ataque crítico\n6% de aumento na velocidade dos movimentos e dos ataques físicos", + "BeetleShell": "5% de aumento nos danos por ataque físico e na chance de ataque crítico\nA chance dos inimigos mirarem em você é maior", + "BeetleLeggings": "6% de aumento na velocidade dos movimentos e dos ataques físicos\nA chance dos inimigos mirarem em você é maior", + "SteampunkBoiler": "{$CommonItemTooltip.SpecialCrafting}", + "HoneyDispenser": "{$CommonItemTooltip.SpecialCrafting}", + "BrickLayer": "Aumenta a velocidade do posicionamento de peças", + "GolfPainting1": "{$PaintingArtist.Crowno}", + "PaintSprayer": "Pinta automaticamente os objetos posicionados", + "PortableCementMixer": "Aumenta a velocidade de posicionamento das paredes", + "CelestialMagnet": "Aumenta o alcance de coleta das estrelas de mana", + "ClayPot": "Cultiva plantas", + "CelestialEmblem": "Aumenta o alcance de coleta das estrelas de mana\n15% de aumento nos danos por magia", + "CelestialCuffs": "Aumenta o alcance de coleta das estrelas de mana\nRestaura mana quando sofrer danos", + "PulseBow": "Atira uma flecha carregada", + "NaturesGift": "6% de redução no consumo de mana", + "KiteSandShark": "{$CommonItemTooltip.Kite}", + "KiteShark": "{$CommonItemTooltip.Kite}", + "RestorationPotion": "Reduz o tempo de recarga das poções", + "Gatligator": "50% de chance de não consumir munição\nBaixíssima precisão", + "WaterGun": "Espirra um jato d'água inofensivo", + "MagicHat": "7% de aumento nos danos por magia e na chance de acerto crítico", + "Gi": "5% de aumento nos danos e na chance de ataque crítico\n10% de aumento na velocidade do ataque físico e dos movimentos", + "GypsyRobe": "6% de aumento nos danos por magia e na chance de acerto crítico\nReduz o custo de uso de mana em 10%", + "JungleHat": "Aumenta a mana máxima em 40\n4% de aumento na chance de acerto crítico de magias", + "BeetleWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "JungleShirt": "Aumenta a mana máxima em 20\n4% de aumento na chance de acerto crítico de magias", + "Gel": "Tem um gosto bom e é inflamável", + "JunglePants": "Aumenta a mana máxima em 20\n4% de aumento na chance de acerto crítico de magias", + "NeonTetra": "'Suas escamas coloridas têm ótimo valor de revenda.'", + "Grapefruit": "{$CommonItemTooltip.MinorStats}", + "MiningPotion": "Aumenta a velocidade de mineração em 25%", + "HeartreachPotion": "Aumenta o alcance de coleta de corações", + "DungeonFishingCrateHard": "{$ItemTooltip.DungeonFishingCrate}", + "BuilderPotion": "Aumenta a velocidade e o alcance do posicionamento", + "TitanPotion": "Aumenta o recuo", + "FlipperPotion": "Permite que você mova-se rapidamente em líquidos", + "DivineEye": "{$PaintingArtist.Darthkitten}", + "TrapsightPotion": "Permite que você veja fontes de perigo próximas", + "WoodenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "IronCrate": "{$CommonItemTooltip.RightClickToOpen}", + "GoldenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "AmmoReservationPotion": "20% de chance de não consumir munição", + "LifeforcePotion": "Aumento de 20% no máximo de vida", + "EndurancePotion": "Danos sofridos reduzidos em 10%", + "RagePotion": "Aumento de 10% na chance de acerto crítico", + "InfernoPotion": "Incendeia os inimigos próximos", + "WrathPotion": "Aumenta os danos causados em 10%", + "GolfClubDriver": "{$CommonItemTooltip.GolfDriver}", + "RecallPotion": "Teleporta você para casa", + "TeleportationPotion": "Teleporta você para um local aleatório", + "LovePotion": "Arremesse isso para fazer alguém apaixonar-se", + "StinkPotion": "Arremesse isso para fazer alguém ficar fedendo", + "BandageBoy": "{$PaintingArtist.Darthkitten}", + "SonarPotion": "Detecta peixes no anzol", + "CratePotion": "Aumenta as chances de obter um caixote", + "WarmthPotion": "Reduz os danos sofridos por fontes de frio", + "VisitingThePyramids": "{$PaintingArtist.Leinfors}", + "Uluru": "{$PaintingArtist.darthmorf}", + "BeeGreaves": "Aumenta os danos causados por lacaios em 5%", + "HornetStaff": "Invoca uma vespa para lutar por você", + "ImpStaff": "Invoca um demônio para lutar por você", + "Oasis": "{$PaintingArtist.Khaios}", + "LifeAboveTheSand": "{$PaintingArtist.Zoomo}", + "SnakesIHateSnakes": "{$PaintingArtist.Xman101}", + "Sunglasses": "Vai te deixar na moda!", + "TheSandsOfSlime": "{$PaintingArtist.Criddle}", + "JawsOfDeath": "{$PaintingArtist.Darthkitten}", + "BurningSpirit": "{$PaintingArtist.Zoomo}", + "HighTestFishingLine": "Os fios de pesca nunca quebram", + "FruitSalad": "{$CommonItemTooltip.MinorStats}", + "TackleBox": "Diminui as chances de consumo de iscas", + "WizardHat": "15% de aumento nos danos por magia", + "ZephyrFish": "Invoca um Peixe do Zéfiro de estimação", + "FrogLeg": "Aumenta a velocidade dos pulos e permite o pulo automático\nAumenta a resistência a quedas", + "Dragonfruit": "{$CommonItemTooltip.MediumStats}", + "KiteJellyfishPink": "{$CommonItemTooltip.Kite}", + "KiteJellyfishBlue": "{$CommonItemTooltip.Kite}", + "FinWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "OpticStaff": "Invoca gêmeos para lutar por você", + "RedHat": "Cheirinho esquisito...", + "Goldfish": "Está sorrindo, então deve dar um bom lanche", + "Sandgun": "Esta é uma boa ideia!", + "GuideVoodooDoll": "\"Você é uma pessoa muito má.\"", + "DivingHelmet": "Aumento enorme no tempo embaixo d'água", + "DemonScythe": "Lança uma gadanha demoníaca", + "Blowpipe": "Permite juntar sementes para munição", + "Glowstick": "Funciona com água", + "Seed": "Para utilizar com a Zarabatana", + "Aglet": "5% de aumento na velocidade dos movimentos", + "ObsidianSkinPotion": "Fornece imunidade a lava", + "RegenerationPotion": "Fornece regeneração da vida", + "LifeCrystal": "Aumenta a vida máxima permanentemente em 20", + "SwiftnessPotion": "25% de aumento na velocidade dos movimentos", + "GillsPotion": "Respire água ao invés de ar", + "IronskinPotion": "Aumenta a defesa em 8", + "ManaRegenerationPotion": "Maior regeneração de mana", + "MagicPowerPotion": "20% de aumento nos danos por magia", + "FeatherfallPotion": "Diminui a velocidade da queda", + "SpelunkerPotion": "Exibe a localização de tesouros e minério", + "InvisibilityPotion": "Oferece invisibilidade", + "ShinePotion": "Emite uma aura de luz", + "NightOwlPotion": "Aumenta a visão noturna", + "BattlePotion": "Aumenta a taxa de criação de inimigos", + "ThornsPotion": "Atacantes também sofrem danos", + "WaterWalkingPotion": "Permite andar sobre a água", + "ArcheryPotion": "20% de aumento na velocidade e no dano causado por flechas", + "HunterPotion": "Exibe a localização dos inimigos", + "GravitationPotion": "Permite o controle da gravidade", + "IllegalGunParts": "Proibido na maioria dos lugares", + "GolfClubWedge": "{$CommonItemTooltip.GolfWedge}", + "BetsyWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "Furnace": "Serve para o derretimento de minério", + "Loom": "Utilizado na criação de tecido", + "IronAnvil": "Serve para a criação de itens a partir de barras de metal", + "Keg": "Utilizado na criação de bebidas", + "KiteManEater": "{$CommonItemTooltip.Kite}", + "WorkBench": "Serve para criação básica", + "GoblinBattleStandard": "Invoca um exército de goblins", + "Sawmill": "Utilizado na criação avançada com madeira", + "Pwnhammer": "Forte o suficiente para destruir Altares demoníacos", + "CobaltHat": "Aumenta a mana máxima em 40\n9% de aumento na chance de acerto crítico de magias", + "CobaltHelmet": "7% de aumento na velocidade dos movimentos\n12% de aumento na velocidade do ataque físico", + "CobaltMask": "10% de aumento nos danos por ataque à distância\n6% de aumento na chance de acerto crítico à distância", + "MythrilHood": "Aumenta a mana máxima em 60\n15% de aumento nos danos por magia", + "MythrilHelmet": "5% de aumento na chance de acerto crítico em ataque físico\n10% de aumento nos danos por ataques físicos", + "MythrilHat": "12% de aumento nos danos por ataque à distância\n7% de aumento na chance de acerto crítico à distância", + "CobaltDrill": "Pode minerar mithril e oricalco", + "MythrilDrill": "Pode minerar adamantino e titânio", + "WingsNebula": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "Compass": "Exibe a posição horizontal", + "DivingGear": "Oferece a capacidade de nadar\nAumento enorme no tempo embaixo d'água", + "GPS": "Exibe a posição\nDiz a hora", + "ObsidianHorseshoe": "Nega os danos por queda\nOferece imunidade a blocos de fogo", + "ObsidianShield": "Oferece imunidade a recuos\nOferece imunidade a blocos de fogo", + "TinkerersWorkshop": "Permite a combinação de alguns acessórios", + "CloudinaBalloon": "Permite pulos duplos\nAumenta a altura dos pulos", + "AdamantiteHeadgear": "Aumenta a mana máxima em 80\n11% de aumento nos danos por ataque mágico e na chance de ataque crítico", + "AdamantiteHelmet": "7% de aumento na chance de acerto crítico em ataque físico\n14% de aumento nos danos por ataques físicos", + "AdamantiteMask": "14% de aumento nos danos por ataque à distância\n8% de aumento na chance de acerto crítico à distância", + "AdamantiteBreastplate": "6% de aumento nos danos", + "AdamantiteLeggings": "4% de aumento na chance de acerto crítico\n5% de aumento na velocidade dos movimentos", + "SpectreBoots": "Permite o voo\nPermite que o usuário corra em alta velocidade", + "FruitJuice": "{$CommonItemTooltip.MinorStats}", + "HolyWater": "Espalha a Consagração a alguns blocos", + "CrimsonFishingCrateHard": "{$ItemTooltip.CrimsonFishingCrate}", + "FairyBell": "Invoca uma fada mágica", + "SuspiciousLookingEye": "Invoca o Olho de Cthulhu", + "ClockworkAssaultRifle": "Aceleração por três rodadas\nSó o primeiro disparo consome munição", + "MoonCharm": "Transforma quem estiver utilizando em lobisomem à noite", + "KiteCrawltipede": "{$CommonItemTooltip.Kite}", + "SorcererEmblem": "15% de aumento nos danos por magia", + "BandofRegeneration": "Lentamente regenera a vida", + "WarriorEmblem": "15% de aumento nos danos por ataques físicos", + "RangerEmblem": "15% de aumento nos danos por ataque à distância", + "DemonWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "AngelWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "RainbowRod": "Lança um arco-íris controlável", + "IceRod": "Invoca um bloco de gelo", + "NeptunesShell": "Transforma quem estiver utilizando em um habitante dos mares quando entrar na água", + "MagicMirror": "Olhe para o espelho para voltar para casa", + "Flamethrower": "Utiliza gel como munição", + "Wrench": "Cria fio vermelho", + "WireCutter": "Remove fios", + "CrystalBullet": "Cria vários estilhaços de cristal no impacto", + "HolyArrow": "Invoca estrelas cadentes no impacto", + "MagicDagger": "Uma adaga de retorno mágica", + "CrystalStorm": "Invoca estilhaços de cristal de disparo rápido", + "CursedFlames": "Invoca bolas de fogo profanas", + "SoulofLight": "A essência das criaturas da luz", + "SoulofNight": "A essência das criaturas das sombras", + "CursedFlame": "Nem mesmo a água pode apagar estas chamas", + "CursedTorch": "Pode ser posicionado na água", + "AdamantiteForge": "Serve para derreter minério de adamantino e de titânio", + "MythrilAnvil": "Serve para criar itens a partir de barras de mithril, oricalco, adamantino e titânio", + "UnicornHorn": "Afiado e mágico!", + "CrownosWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "LightShard": "Às vezes é encontrado com criaturas em desertos de luz", + "RedPressurePlate": "A ativação acontece quando alguém sobe em cima", + "CloudinaBottle": "Permite pulos duplos", + "SpellTome": "Pode ter encantamento", + "PrismaticPunch": "{$CommonItemTooltip.MediumStats}", + "Megashark": "50% de chance de não consumir munição\nO irmão mais velho do minitubarão", + "Shotgun": "Dispara projéteis em várias direções", + "FrozenCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "Mango": "{$CommonItemTooltip.MinorStats}", + "HermesBoots": "Permite correr ultra veloz", + "GreenPressurePlate": "A ativação acontece quando alguém sobe em cima", + "GrayPressurePlate": "Ativa quando um jogador passar por cima", + "BrownPressurePlate": "Ativa quando um jogador passar por cima", + "MechanicalEye": "Invoca Os gêmeos", + "SoulofFright": "A essência do puro terror", + "SoulofMight": "A essência do destruidor", + "SoulofSight": "A essência dos observadores oniscientes", + "HallowedPlateMail": "7% de aumento na chance de acerto crítico", + "HallowedGreaves": "7% de aumento nos danos\n8% de aumento na velocidade dos movimentos", + "HallowedHelmet": "15% de aumento nos danos por ataque à distância\n8% de aumento na chance de acerto crítico à distância", + "CrossNecklace": "Aumenta o tempo de invencibilidade depois de sofrer dano", + "ManaFlower": "8% de redução no consumo de mana\nUtiliza poções de mana automaticamente quando necessário", + "Elderberry": "{$CommonItemTooltip.MinorStats}", + "MechanicalSkull": "Invoca o Esqueletron Alfa", + "HallowedHeadgear": "Aumenta a mana máxima em 100\n12% de aumento nos danos por magia e na chance de acerto crítico", + "KiteYellow": "{$CommonItemTooltip.Kite}", + "DemoniteOre": "Pulsando com energia das trevas", + "SlimeCrown": "Invoca a Geleia rei", + "LightDisc": "Acumula até 5", + "DemoniteBar": "Pulsando com energia das trevas", + "SoulofFlight": "'A essência das poderosas criaturas voadoras'", + "MusicBox": "Tem chance gravar músicas", + "Drax": "'Não confundir com uma picareta'", + "Explosives": "Explode ao acionar", + "InletPump": "Envia água a saídas de bombas", + "OutletPump": "Recebe água de canos de entrada", + "Timer1Second": "Aciona a cada segundo", + "Timer3Second": "Aciona a cada 3 segundos", + "Timer5Second": "Aciona a cada 5 segundos", + "BluePresent": "{$CommonItemTooltip.RightClickToOpen}", + "GreenPresent": "{$CommonItemTooltip.RightClickToOpen}", + "YellowPresent": "{$CommonItemTooltip.RightClickToOpen}", + "SnowGlobe": "Invoca a Legião de Gelo", + "Carrot": "Invoca um coelhinho de estimação", + "Vilethorn": "Invoca um espinho infame", + "Starfury": "Faz com que estrelas caiam do céu\nForjada com a fúria dos céus", + "PurificationPowder": "Remove o mal", + "SmoothieofDarkness": "{$CommonItemTooltip.MinorStats}", + "RedsHelmet": "{$CommonItemTooltip.DevItem}", + "RedsBreastplate": "{$CommonItemTooltip.DevItem}", + "RedsLeggings": "{$CommonItemTooltip.DevItem}", + "Fish": "Invoca um filhote de pinguim", + "BloodOrange": "{$CommonItemTooltip.MinorStats}", + "Frostbrand": "Atira um raio de gelo", + "RedPotion": "Só para os que são dignos o suficiente", + "RottenChunk": "Parece ser gostoso!", + "UnholyTrident": "Invoca o tridente do diabo", + "FrostHelmet": "16% de aumento nos danos por ataques físicos e à distância", + "FrostBreastplate": "11% de aumento nos danos por ataque mágico e na chance de ataque crítico", + "FrostLeggings": "8% de aumento na velocidade dos movimentos\n7% de aumento na velocidade do ataque físico", + "WormFood": "Invoca o Devorador de mundos", + "TinWatch": "Diz a hora", + "TungstenWatch": "Diz a hora", + "PlatinumWatch": "Diz a hora", + "LeadAnvil": "Serve para a criação de itens a partir de barras de metal", + "BeamSword": "Atira um feixe de luz", + "IceBlade": "Atira um raio de gelo", + "IceBow": "Atira flechas congeladas", + "FrostStaff": "Atira um jato congelado", + "BlueCultistCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistDevote}", + "ButterflyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "FallenStar": "Desaparece depois do nascer do Sol", + "Seaweed": "Invoca uma tartaruga de estimação", + "FairyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "Clentaminator": "Cria e destrói biomas quando disparado\nUtiliza uma solução colorida", + "GreenSolution": "Utilizado pelo Limpaminador\nEspalha a Pureza", + "BlueSolution": "Utilizado pelo Limpaminador\nEspalha a Consagração", + "PurpleSolution": "Utilizado pelo Limpaminador\nEspalha a Corrupção", + "DarkBlueSolution": "Utilizado pelo Limpaminador\nEspalha Cogumelos brilhantes", + "RedSolution": "Utilizado pelo Limpaminador\nEspalha o Carmim", + "HarpyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BoneWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "Hammush": "Forte o suficiente para destruir Altares demoníacos", + "NettleBurst": "Invoca uma lança de espinho", + "CrimsonHelmet": "2% de aumento nos danos", + "CrimsonScalemail": "2% de aumento nos danos", + "CrimsonGreaves": "2% de aumento nos danos", + "DeathbringerPickaxe": "Permite a mineração de pedras infernais", + "Torch": "Fornece luz", + "FlameWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "FrozenWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "GhostWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "LivingWoodWand": "Cria madeira viva", + "GrapplingHook": "Vem aqui!", + "Actuator": "Permite alternar entre blocos sólidos ou não", + "Chain": "É possível usar em escalada", + "BlueWrench": "Cria fio azul", + "GreenWrench": "Cria fio verde", + "BluePressurePlate": "Ativa quando um jogador passar por cima", + "YellowPressurePlate": "Ativa quando qualquer coisa exceto pelo jogador passar por cima", + "FrozenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LuckyCoin": "Acertar inimigos às vezes faz com que deixem cair mais moedas", + "UnicornonaStick": "\"É diversão que não acaba!\"", + "SandstorminaBottle": "Permite que o usuário execute um pulo duplo aprimorado", + "CanOfWorms": "{$CommonItemTooltip.RightClickToOpen}", + "MoonShell": "Transforma o usuário em um lobisomem à noite e em um tritão quando entrar na água", + "StarVeil": "Faz com que estrelas caiam e aumenta a duração da invencibilidade depois de sofrer danos", + "BloodyMoscato": "{$CommonItemTooltip.MinorStats}", + "MiningHelmet": "Fornece luz a quem usar", + "AdhesiveBandage": "Imune a sangramentos", + "ArmorPolish": "Imune a armaduras quebradas", + "Bezoar": "Imune a venenos", + "Blindfold": "Imune à escuridão", + "FastClock": "Imune à lentidão", + "Megaphone": "Imune ao silêncio", + "Nazar": "Imune a maldições", + "Vitamins": "Imune à fraqueza", + "TrifoldMap": "Imune à confusão", + "Lemon": "{$CommonItemTooltip.MinorStats}", + "TropicalSmoothie": "{$CommonItemTooltip.MinorStats}", + "PinaColada": "{$CommonItemTooltip.MinorStats}", + "PeachSangria": "{$CommonItemTooltip.MinorStats}", + "ArmorBracing": "Imune à fraqueza e a armaduras quebradas", + "MedicatedBandage": "Imune a venenos e a sangramentos", + "ThePlan": "Imune à lentidão e à confusão", + "CountercurseMantra": "Imune ao silêncio e a maldições", + "CoinGun": "Utiliza moedas como munição\nMoedas de valor mais alto causam danos maiores", + "LavaCharm": "Oferece 7 segundos de imunidade a lava", + "BananaDaiquiri": "{$CommonItemTooltip.MinorStats}", + "Pineapple": "{$CommonItemTooltip.MinorStats}", + "BoneWand": "Cria um osso", + "LeafWand": "Cria folhas", + "FlyingCarpet": "Permite que o usuário flutue por alguns segundos", + "AvengerEmblem": "12% de aumento nos danos", + "Lemonade": "{$CommonItemTooltip.MinorStats}", + "LandMine": "Explode quando alguém sobe em cima", + "Starfruit": "{$CommonItemTooltip.MediumStats}", + "Umbrella": "Você vai cair mais lentamente enquanto estiver segurando isto", + "ChlorophyteOre": "'Reage à luz'", + "GrapeJuice": "{$CommonItemTooltip.MajorStats}", + "IceSkates": "Permite maior mobilidade no gelo\nO gelo não vai quebrar quando você cair nele", + "SnowballLauncher": "Lança bolas de neve rapidamente", + "ClimbingClaws": "Permite deslizar ao descer de paredes\nMaior habilidade se combinar com Espetos para sapatos", + "AncientShadowHelmet": "7% de aumento na velocidade do ataque físico", + "AncientShadowScalemail": "7% de aumento na velocidade do ataque físico", + "AncientShadowGreaves": "7% de aumento na velocidade do ataque físico", + "AncientNecroHelmet": "5% de aumento nos danos por ataque à distância.", + "AncientCobaltHelmet": "Aumenta a mana máxima em 40\n4% de aumento na chance de acerto crítico de magias", + "AncientCobaltBreastplate": "Aumenta a mana máxima em 20\n4% de aumento na chance de acerto crítico de magias", + "AncientCobaltLeggings": "Aumenta a mana máxima em 20\n4% de aumento na chance de acerto crítico de magias", + "BlackBelt": "Dá uma chance de se esquivar ataques", + "Boomstick": "Dispara projéteis em várias direções", + "Rope": "É possível usar em escalada", + "Campfire": "A regeneração de vida aumenta quando estiver próximo a uma fogueira", + "Marshmallow": "Ponha em um graveto e toste na fogueira", + "MarshmallowonaStick": "Toste em uma fogueira!", + "Coconut": "{$CommonItemTooltip.MinorStats}", + "ShoeSpikes": "Permite deslizar ao descer de paredes\nMaior habilidade se combinar com Garras para escalada", + "TigerClimbingGear": "Permite escalar paredes", + "Tabi": "Permite correr\nToque duas vezes em uma direção", + "Minishark": "33% de chance de não consumir munição\nMetade tubarão, metade arma, totalmente incrível.", + "ManaRegenerationBand": "Aumenta a mana máxima em 20\nAumenta a taxa de regeneração de mana", + "SandstorminaBalloon": "Permite pulos duplos\nAumenta a altura dos pulos", + "MasterNinjaGear": "Permite escalar paredes e correr\nDá uma chance de se esquivar ataques", + "RopeCoil": "Arremessa uma corda que pode ser usada em escalada", + "Blowgun": "Permite juntar sementes para munição", + "BlizzardinaBottle": "Permite pulos duplos", + "EnchantedSword": "Atira um feixe de espada encantado", + "PickaxeAxe": "\"Não confundir com um martelo-furadeira\"", + "EatersBone": "Invoca um filhote de Devorador de almas", + "BlendOMatic": "Utiliza-se na criação de objetos", + "MeatGrinder": "Utiliza-se na criação de objetos", + "Rambutan": "{$CommonItemTooltip.MinorStats}", + "Solidifier": "Utiliza-se na criação de objetos", + "ActuationAccessory": "Posiciona atuadores automaticamente em objetos posicionados", + "ActuationRod": "Ativa os Atuadores", + "AlchemyTable": "33% de chance de não consumir poções ao criar ingredientes", + "AncientBattleArmorHat": "15% de aumento nos danos por magia e dos lacaios", + "AppleJuice": "{$CommonItemTooltip.MinorStats}", + "WoodenCrateHard": "{$ItemTooltip.WoodenCrate}", + "AncientHorn": "Invoca um basilisco que pode ser montado", + "BloodNautilusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodNautilus}", + "GoblinSharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinShark}", + "AviatorSunglasses": "Ativa seu parceiro interior\n'Ótimo para fingir que é um streamer!'", + "KitePigron": "{$CommonItemTooltip.Kite}", + "BalloonHorseshoeFart": "Permite pulos duplos\nAumenta a altura dos pulos e cancela danos por queda", + "BalloonHorseshoeHoney": "Libera abelhas quando sofrer danos\nAumenta a altura dos pulos e cancela danos por queda", + "BalloonHorseshoeSharkron": "Permite pulos duplos\nAumenta a altura dos pulos e cancela danos por queda", + "BalloonPufferfish": "Aumenta a altura dos pulos", + "BeesKnees": "Flechas de madeira transformam-se em colunas de abelhas", + "BejeweledValkyrieBody": "{$CommonItemTooltip.DevItem}\nCheio de joias e elegante, para explorar os céus", + "BejeweledValkyrieHead": "{$CommonItemTooltip.DevItem}\nTorne-se o vento, domine os relâmpagos.", + "BloodEelBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodEelHead}", + "BewitchingTable": " para ter mais lacaios", + "Bladetongue": "Dá uma cusparada de fluxo de Ichor ao toque", + "BlessedApple": "Invoca um unicórnio que pode ser montado", + "CorruptFishingCrateHard": "{$ItemTooltip.CorruptFishingCrate}", + "JungleFishingCrateHard": "{$ItemTooltip.JungleFishingCrate}", + "BoneCampfire": "A regeneração de vida aumenta quando estiver próximo a uma fogueira", + "BoneRattle": "Invoca um Monstro Cara de Bebê", + "BoneTorch": "'Emite um brilho fatal'", + "BoosterTrack": "Use o martelo para mudar a direção", + "GolfClubPutter": "{$CommonItemTooltip.GolfPutter}", + "HallowedFishingCrateHard": "{$ItemTooltip.HallowedFishingCrate}", + "KiteRedAndYellow": "{$CommonItemTooltip.Kite}", + "BouncyGlowstick": "Funciona com água", + "BouncyGrenade": "Uma pequena explosão que não destruirá peças\nMuito borrachudo", + "WillsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "BrainScrambler": "Invoca um Scutlix que pode ser montado", + "BubbleGun": "Dispara fortes bolhas rapidamente", + "ButchersChainsaw": "Faíscas são emitidas de inimigos atingidos", + "BloodSquidBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodSquid}", + "CelestialSigil": "Invoca a Desgraça Iminente", + "CellPhone": "Exibe tudo\nPermite que você volte para casa em qualquer momento", + "ClingerStaff": "Invoca uma parede de chamas amaldiçoadas", + "CogWall": "Produtividade 200% maior", + "CoinRing": "Maior alcance da coleta de moedas\nAcertar inimigos às vezes faz com que deixem cair mais moedas", + "CompanionCube": "Vulnerável a lava!", + "CordageGuide": "Permite coletar Corda de Vinha das vinhas", + "CorruptFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "CosmicCarKey": "Invoca um OVNI que pode ser montado", + "CrimsonFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "CrimsonHeart": "Invoca um coração como fonte de luz", + "CrystalSerpent": "Atira uma carga de cristal explosivo", + "CrystalVileShard": "Invoca um cristal pontudo enorme", + "CursedCampfire": "A regeneração de vida aumenta quando estiver próximo a uma fogueira", + "DaedalusStormbow": "Atira flechas do céu", + "DayBreak": "'Elimine seus inimigos com uma lança de luz!'", + "DemonCampfire": "A regeneração de vida aumenta quando estiver próximo a uma fogueira", + "DemonHeart": "Aumenta permanentemente o número de espaços de acessórios", + "Detonator": "'Entranhas... e Nojo!'", + "DevDye": "{$CommonItemTooltip.DevItem}", + "DjinnsCurse": "Garante queda lenta em troca por seus pés", + "DPSMeter": "Exibe seus danos por segundo", + "DrillContainmentUnit": "Invoca uma Furadeira que pode ser montada", + "DungeonFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "EoCShield": "Permite que o jogador corra até o inimigo\nToque duas vezes em uma direção", + "FishermansGuide": "Exibe informações sobre a pesca", + "FishFinder": "Exibe informações sobre o tempo, a fase da Lua e a pesca", + "FishronWings": "{$CommonItemTooltip.FlightAndSlowfall}\nPermite o deslocamento acelerado na água", + "Flairon": "Joga bolhas perseguidoras.", + "FleshKnuckles": "A chance dos inimigos mirarem em você é maior", + "FloatingIslandFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "FlowerBoots": "Flores crescem no gramado enquanto você caminha", + "FlyingKnife": "Arremessa uma faca voadora controlável", + "GolfBallDyedBrown": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedBlue": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedBlack": "{$CommonItemTooltip.GolfBall}", + "FragmentNebula": "'O poder da galáxia vive neste fragmento'", + "FragmentSolar": "'A fúria do universo vive neste fragmento'", + "FragmentStardust": "'Partículas hipnotizantes envolvem este fragmento'", + "FragmentVortex": "'Energias circulam este fragmento'", + "FrozenCampfire": "A regeneração de vida aumenta quando estiver próximo a uma fogueira", + "FuzzyCarrot": "Invoca um Coelhinho que pode ser montado", + "GemLockAmber": " para posicionar ou remover Âmbares Grandes", + "GemLockAmethyst": " para posicionar ou remover Ametistas Grandes", + "GemLockDiamond": " para posicionar ou remover Diamantes Grandes", + "GemLockEmerald": " para posicionar ou remover Esmeraldas Grandes", + "GemLockRuby": " para posicionar ou remover Rubis Grandes", + "GemLockSapphire": " para posicionar ou remover Safiras Grandes", + "GemLockTopaz": " para posicionar ou remover Topázios Grandes", + "GoblinTech": "Exibe velocidade de movimento, danos por segundo e minérios valiosos", + "GoldPickaxe": "Pode minerar Meteoritos", + "GoldRing": "Maior alcance da coleta de moedas", + "Plum": "{$CommonItemTooltip.MinorStats}", + "KiteBunny": "{$CommonItemTooltip.Kite}", + "HallowedFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "HardySaddle": "Invoca uma Tartaruga que pode ser montada", + "HellwingBow": "Flechas de madeira transformam-se em morcegos em chamas", + "HerbBag": "{$CommonItemTooltip.RightClickToOpen}", + "HiveBackpack": "Aumenta a força das abelhas amigáveis", + "HoneyedGoggles": "Invoca uma Abelha que pode ser montada", + "IceMirror": "Olhe para o espelho para voltar para casa", + "IchorCampfire": "A regeneração de vida aumenta quando estiver próximo a uma fogueira", + "EyeballFlyingFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EyeballFlyingFish}", + "JungleFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LargeAmber": "Para Capturar a pedra preciosa. Cai quando você morre", + "LaserRuler": "Cria linhas com medidas na tela para o posicionamento de blocos", + "LastPrism": "'Dispare um arco-íris capaz de desintegrar formas de vida'", + "LifeformAnalyzer": "Exibe o nome de criaturas raras ao seu redor", + "LightKey": "'Carregado com a essência de muitas almas'", + "LivingMahoganyLeafWand": "Posiciona folhas de mogno", + "LivingMahoganyWand": "Posiciona mogno vivo", + "LockBox": "{$CommonItemTooltip.RightClickToOpen}\nExige uma Chave Dourada", + "LogicGateLamp_Faulty": "Posicione isto em lâmpadas de portão lógico para que sua ativação seja aleatória", + "LogicGateLamp_Off": "Posicione isto em portões lógicos para adicionar verificações", + "LogicGateLamp_On": "Posicione isto em portões lógicos para adicionar verificações", + "LogicGate_NOR": "Julga lâmpadas de portão lógico acima dele\nAtivado quando nenhuma lâmpada estiver acesa, caso contrário é Desativado", + "LogicGate_NXOR": "Julga lâmpadas de portão lógico acima dele\nAtivado quando o total de lâmpadas 'ligadas' for diferente de um, caso contrário é Desativado\nTambém chamado de NXOR", + "LogicGate_OR": "Julga lâmpadas de portão lógico acima dele\nAtivado quando qualquer lâmpada estiver acesa, caso contrário é Desativado", + "LogicGate_XOR": "Julga lâmpadas de portão lógico acima dele\nAtivado quando apenas uma lâmpada estiver acesa, caso contrário é Desativado", + "LogicSensor_Above": "Ativada quando o jogador estiver em cima dela, desativada em caso contrário", + "LogicSensor_Honey": "Ativada sempre que ocupada por mel, desativada em caso contrário", + "LogicSensor_Lava": "Ativada quando ocupada por lava, desativada em caso contrário", + "LogicSensor_Liquid": "Ativada quando ocupada por líquidos, desativada em caso contrário", + "LogicSensor_Moon": "Ativada com a chegada da noite", + "LogicSensor_Sun": "Ativada com a chegada do dia", + "LogicSensor_Water": "Ativada quando ocupada por água, desativada em caso contrário", + "LokisDye": "{$CommonItemTooltip.DevItem}", + "LokisHelm": "{$CommonItemTooltip.DevItem}\nO caos veio da ordem, o medo veio da coragem, e a fraqueza veio da força", + "LokisPants": "{$CommonItemTooltip.DevItem}\nAs rodas da justiça são lentas, mas esmagadoras.", + "LokisShirt": "{$CommonItemTooltip.DevItem}\nConheça a si mesmo, conheça o seu inimigo. Mil batalhas, mil vitórias...", + "ZombieMermanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieMerman}", + "LunarBar": "'Vibra com energia luminosa celestial'", + "LunarCraftingStation": "Serve para a criação de itens a partir de Fragmentos da Lua e Luminita", + "LunarFlareBook": "Faz chover chamas da Lua", + "LunarHook": "'Você quer a Lua? Basta agarrá-la e puxá-la para baixo!'", + "LunarOre": "'Uma pedrinha do paraíso'", + "MagicLantern": "Invoca uma lanterna mágica que expõe tesouros próximos", + "MechanicalLens": "Garante melhor visão dos cabos", + "MetalDetector": "Exibe os minérios mais valiosos ao seu redor", + "MeteorStaff": "Faz chover meteoros", + "Minecart": "Vamos andar nos trilhos", + "MinecartTrack": "Use o martelo na extremidade para mudar o estilo do freio\nUse o martelo em intersecções para mudar a direção", + "MolotovCocktail": "Uma pequena explosão que incendeia os inimigos\nIlumina a área próxima em chamas por um tempo", + "MoneyTrough": "Invoca um porquinho para armazenar seus itens", + "MoonlordArrow": "'Atirando neles na velocidade do som!'", + "MoonlordBullet": "'Alinhe e derrube eles...'", + "Apricot": "{$CommonItemTooltip.MinorStats}", + "MothronWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "MulticolorWrench": " enquanto segura para editar as configurações dos cabos", + "NebulaArcanum": "'Conjure massas de energia astral para perseguir seus inimigos'", + "NebulaBlaze": "'Do cinturão de Órion para a sua mão'", + "NebulaBreastplate": "9% de aumento nos danos por magia e na chance de acerto crítico", + "NebulaHelmet": "Aumenta o máximo de mana em 60 e reduz o uso de mana em 15%\n7% de aumento nos danos por magia e na chance de acerto crítico", + "NebulaLeggings": "10% de aumento nos danos por magia\n10% de aumento na velocidade dos movimentos", + "NebulaMonolith": "'Use uma pequena quantidade da energia da Torre de Nébula'", + "NightKey": "'Carregado com a essência de muitas almas'", + "NightVisionHelmet": "Visão aprimorada", + "GolfBallDyedLimeGreen": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedGreen": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedCyan": "{$CommonItemTooltip.GolfBall}", + "PartyBundleOfBalloonTile": "'Amarrado, para a alegria de todos'", + "PartyGirlGrenade": "Uma pequena explosão que não destruirá peças", + "PartyMonolith": "'Balões cairão do céu'", + "PartyPresent": "O que será que tem dentro?", + "PDA": "Exibe tudo", + "PeaceCandle": "Diminui a hostilidade das criaturas próximas", + "PedguinHat": "Torne-se o Pedguin\n'Ótimo para fingir que é um streamer!'", + "PedguinPants": "Torne-se o Pedguin\n'Ótimo para fingir que é um streamer!'", + "PedguinShirt": "Torne-se o Pedguin\n'Ótimo para fingir que é um streamer!'", + "Phantasm": "66% de chance de não consumir munição", + "Pigronata": "Bate até acabar com isso de uma vez!\nPode conter uma surpresa!", + "PinkGel": "'Borrachudo, e doce!'", + "PinkSlimeBlock": "Muito borrachudo", + "PirateStaff": "Invoca piratas para lutar por você", + "PixelBox": "Separa os caminhos dos cabos\nLuzes desligadas com sinais horizontais\nLuzes ligadas com sinais cruzados", + "PlatinumPickaxe": "Pode minerar Meteoritos", + "PocketMirror": "Imune à petrificação", + "PressureTrack": "Não utilizar em ladeiras", + "ProjectilePressurePad": "Ativado quando um projétil entra em contato", + "PsychoKnife": "Permite que você entre no modo sorrateiro", + "PutridScent": "Inimigos terão dificuldade em marcar você como alvo\n5% de aumento nos danos e na chance de ataque crítico", + "GolfBallDyedYellow": "{$CommonItemTooltip.GolfBall}", + "Radar": "Detecta inimigos ao seu redor", + "RainbowCampfire": "A regeneração de vida aumenta quando estiver próximo a uma fogueira", + "GolfBallDyedViolet": "{$CommonItemTooltip.GolfBall}", + "RazorbladeTyphoon": "Lança rodas laminadas de alta velocidade", + "RedsYoyo": "{$CommonItemTooltip.DevItem}", + "REK": "Exibe o número de monstros, de mortes, e de criaturas raras", + "RoyalGel": "As geleias ficarão amigáveis", + "SailfishBoots": "Permite que o usuário corra em alta velocidade", + "SandFallBlock": "Uma cascata de areia que você pode apreciar em segurança", + "SandFallWall": "Uma cascata de areia que você pode apreciar em segurança", + "ScalyTruffle": "Invoca um Porco-dragão que pode ser montado", + "Sextant": "Exibe a fase da Lua", + "ShadowFlameBow": "Atira Flechas das Chamas das Sombras", + "ShadowFlameHexDoll": "Invoca tentáculos das Chamas das Sombras para atacar seus inimigos", + "ShadowFlameKnife": "Inflige Chamas das Sombras ao entrar em contato", + "SharkronBalloon": "Aumenta a altura dos pulos\nPermite pulos duplos", + "SharkToothNecklace": "Aumenta a perfuração de blindagem em 5", + "SharpeningStation": "Aumenta a perfuração de blindagem com armas de ataque físico", + "ShinyStone": "Aumenta bastante a regeneração de vida quando parado", + "ShrimpyTruffle": "Atrai uma criatura lendária que floresce na água e no combate", + "SillyBalloonGreen": "'Tem cheiro de hortelã e alegria'", + "SillyBalloonGreenWall": "'Tem cheiro de hortelã e alegria'", + "SillyBalloonMachine": "A comemoração não acaba nunca!", + "SillyBalloonPink": "'Tem cheiro de chiclete e felicidade'", + "SillyBalloonPinkWall": "'Tem cheiro de chiclete e felicidade'", + "SillyBalloonPurple": "'Tem cheiro de lavanda e entusiasmo'", + "SillyBalloonPurpleWall": "'Tem cheiro de lavanda e entusiasmo'", + "SillyStreamerBlue": "Surpreendentemente durável em escaladas!", + "SillyStreamerGreen": "Surpreendentemente durável em escaladas!", + "SillyStreamerPink": "Surpreendentemente durável em escaladas!", + "SkiphsHelm": "{$CommonItemTooltip.DevItem}", + "SkiphsPants": "{$CommonItemTooltip.DevItem}", + "SkiphsShirt": "{$CommonItemTooltip.DevItem}", + "TheBrideBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TheBride}", + "DTownsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "SlimeGun": "Espirra um jato de geleia inofensivo", + "SlimySaddle": "Invoca uma Geleia que pode ser montada", + "KiteKoi": "{$CommonItemTooltip.Kite}", + "SnowFallBlock": "Bem mais frio que um globo de neve", + "SnowFallWall": "Bem mais frio que um globo de neve", + "SolarEruption": "'Ataque com a fúria do Sol'", + "RedsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "Hoverboard": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "CenxsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "SolarMonolith": "'Use uma pequena quantidade da energia da Torre Solar'", + "SolarTablet": "Invoca o Eclipse", + "SoulDrain": "Extrai vida dos inimigos", + "SpelunkerGlowstick": "Expõe tesouros próximos", + "SpiderStaff": "Invoca aranhas para lutar por você", + "SporeSac": "Invoca esporos que causarão danos aos inimigos", + "GolfClubChlorophyteDriver": "{$CommonItemTooltip.GolfDriver}", + "StardustCellStaff": "Invoca uma célula de pó das estrelas para lutar por você\n'Contive a mais linda infecção celular'", + "StardustDragonStaff": "Invoca um dragão de pó das estrelas para lutar por você\n'Quem precisa de uma horda de lacaios quando você tem um dragão gigante?'", + "GolfClubDiamondWedge": "{$CommonItemTooltip.GolfWedge}", + "GolfClubShroomitePutter": "{$CommonItemTooltip.GolfPutter}", + "StardustMonolith": "'Use uma pequena quantidade da energia da Torre de Pó das Estrelas'", + "FloatingIslandFishingCrateHard": "{$ItemTooltip.FloatingIslandFishingCrate}", + "StickyGrenade": "Uma pequena explosão que não destruirá peças\n'Pode ser difícil de arremessar.'", + "Stopwatch": "Exibe a velocidade dos movimentos do jogador", + "StrangeBrew": "'Tem aparência e cheiro terríveis'", + "StrangePlant1": "Pode ser trocado por tinturas raras", + "StrangePlant2": "Pode ser trocado por tinturas raras", + "StrangePlant3": "Pode ser trocado por tinturas raras", + "StrangePlant4": "Pode ser trocado por tinturas raras", + "SummonerEmblem": "15% de aumento nos danos por invocações", + "Sundial": "Permite que o tempo seja acelerado um dia por semana", + "SuperAbsorbantSponge": "Capaz de acumular uma quantidade infinita de água", + "SuspiciousLookingTentacle": "Chama um olho suspeito luminoso\n'Eu sei o que está pensando...'", + "TallyCounter": "Exibe quantos monstros foram mortos", + "TartarSauce": "Invoca um mini minotauro", + "TempestStaff": "Invoca tornados de tubarões para lutar por você", + "TheBrideDress": "'Casamento...'", + "TheBrideHat": "'Amor... amor verdadeiro...'", + "Toxikarp": "Cospe bolhas tóxicas", + "Tsunami": "Dispara 5 flechas ao mesmo tempo", + "TsunamiInABottle": "Permite pulos duplos", + "TungstenPickaxe": "Pode minerar Meteoritos", + "UltraBrightCampfire": "A regeneração de vida aumenta quando estiver próximo a uma fogueira", + "ValkyrieYoyo": "{$CommonItemTooltip.DevItem}", + "BlackCurrant": "{$CommonItemTooltip.MinorStats}", + "VineRopeCoil": "Arremesse para criar uma corda que pode ser usada em escalada", + "VortexBeater": "66% de chance de não consumir munição\n'A mistura catastrófica de pew pew e boom boom.'", + "VortexBreastplate": "12% de aumento nos danos por ataque à distância e na chance de ataque crítico\n25% de chance de não consumir munição", + "VortexHelmet": "16% de aumento nos danos por ataque à distância\n7% de aumento na chance de acerto crítico à distância", + "VortexLeggings": "8% de aumento nos danos por ataque à distância e na chance de ataque crítico\n10% de aumento na velocidade dos movimentos", + "VortexMonolith": "'Use uma pequena quantidade da energia da Torre de Vórtice'", + "WandofSparking": "Atira uma pequena faísca", + "WeaponRack": " para posicionar um item na prateleira de armas", + "WeatherRadio": "Exibir o clima", + "WeightedPressurePlateCyan": "Ativa quando um jogador pisa em cima ou sai de cima", + "WeightedPressurePlateOrange": "Ativa quando um jogador pisa em cima ou sai de cima", + "WeightedPressurePlatePink": "Ativa quando um jogador pisa em cima ou sai de cima", + "WeightedPressurePlatePurple": "Ativa quando um jogador pisa em cima ou sai de cima", + "Peach": "{$CommonItemTooltip.MinorStats}", + "WingsSolar": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsStardust": "{$CommonItemTooltip.FlightAndSlowfall}", + "GolfClubTitaniumIron": "{$CommonItemTooltip.GolfIron}", + "WireBulb": "Acende lâmpadas para cada fio de cor diferente", + "WireKite": "Permite o controle absoluto sobre os fios\n enquanto segura para editar as configurações dos cabos", + "WirePipe": "Separa os caminhos dos fios\nTambém pode ser alterado com o martelo!", + "WormholePotion": "Teleporta você até um colega de equipe\nClique em sua cabeça no mapa em tela cheia", + "WormScarf": "Reduz os danos sofridos em 17%", + "XenoStaff": "Invoca um OVNI para lutar por você", + "YellowWrench": "Cria fio amarelo", + "Yoraiz0rDarkness": "{$CommonItemTooltip.DevItem}\nSe aparecer para você, melhor sair correndo...", + "Yoraiz0rHead": "{$CommonItemTooltip.DevItem}", + "Yoraiz0rPants": "{$CommonItemTooltip.DevItem}", + "Yoraiz0rShirt": "{$CommonItemTooltip.DevItem}", + "GolfClubPearlwoodDriver": "{$CommonItemTooltip.GolfDriver}", + "YoyoBag": "Concede ao usuário habilidades de mestre do ioiô", + "YoYoGlove": "Permite o uso de dois ioiôs ao mesmo tempo", + "BloodMoonRising": "{$PaintingArtist.Garner}", + "TheHangedMan": "{$PaintingArtist.Garner}", + "GloryoftheFire": "{$PaintingArtist.Garner}", + "BoneWarp": "{$PaintingArtist.Garner}", + "SkellingtonJSkellingsworth": "{$PaintingArtist.Garner}", + "TheCursedMan": "{$PaintingArtist.Garner}", + "TheEyeSeestheEnd": "{$PaintingArtist.Garner}", + "SomethingEvilisWatchingYou": "{$PaintingArtist.Moosdijk}", + "TheTwinsHaveAwoken": "{$PaintingArtist.Moosdijk}", + "TheScreamer": "{$PaintingArtist.Crowno}", + "GoblinsPlayingPoker": "{$PaintingArtist.Garner}", + "Dryadisque": "{$PaintingArtist.Garner}", + "Sunflowers": "{$PaintingArtist.Garner}", + "TerrarianGothic": "{$PaintingArtist.Garner}", + "Impact": "{$PaintingArtist.Wright}", + "PoweredbyBirds": "{$PaintingArtist.Ness}", + "TheDestroyer": "{$PaintingArtist.Moosdijk}", + "ThePersistencyofEyes": "{$PaintingArtist.Crowno}", + "UnicornCrossingtheHallows": "{$PaintingArtist.Crowno}", + "GreatWave": "{$PaintingArtist.Crowno}", + "StarryNight": "{$PaintingArtist.Crowno}", + "GuidePicasso": "{$PaintingArtist.Crowno}", + "TheGuardiansGaze": "{$PaintingArtist.Kolf}", + "FatherofSomeone": "{$PaintingArtist.Crowno}", + "NurseLisa": "{$PaintingArtist.Garner}", + "DarkSoulReaper": "{$PaintingArtist.Myhre}", + "Land": "{$PaintingArtist.Myhre}", + "TrappedGhost": "{$PaintingArtist.Myhre}", + "DemonsEye": "{$PaintingArtist.Myhre}", + "FindingGold": "{$PaintingArtist.Myhre}", + "FirstEncounter": "{$PaintingArtist.Crowno}", + "GoodMorning": "{$PaintingArtist.Crowno}", + "UndergroundReward": "{$PaintingArtist.Crowno}", + "ThroughtheWindow": "{$PaintingArtist.Crowno}", + "PlaceAbovetheClouds": "{$PaintingArtist.Crowno}", + "DoNotStepontheGrass": "{$PaintingArtist.Crowno}", + "ColdWatersintheWhiteLand": "{$PaintingArtist.Crowno}", + "LightlessChasms": "{$PaintingArtist.Crowno}", + "TheLandofDeceivingLooks": "{$PaintingArtist.Crowno}", + "Daylight": "{$PaintingArtist.Crowno}", + "SecretoftheSands": "{$PaintingArtist.Crowno}", + "DeadlandComesAlive": "{$PaintingArtist.Crowno}", + "EvilPresence": "{$PaintingArtist.Crowno}", + "SkyGuardian": "{$PaintingArtist.Crowno}", + "AmericanExplosive": "{$PaintingArtist.Kolf}", + "Discover": "{$PaintingArtist.Myhre}", + "HandEarth": "{$PaintingArtist.Myhre}", + "OldMiner": "{$PaintingArtist.Myhre}", + "Skelehead": "{$PaintingArtist.Myhre}", + "FacingtheCerebralMastermind": "{$PaintingArtist.Kolf}", + "LakeofFire": "{$PaintingArtist.Garner}", + "TrioSuperHeroes": "{$PaintingArtist.Burczyk}", + "ImpFace": "{$PaintingArtist.Myhre}", + "OminousPresence": "{$PaintingArtist.Craig}", + "ShiningMoon": "{$PaintingArtist.Craig}", + "LivingGore": "{$PaintingArtist.Craig}", + "FlowingMagma": "{$PaintingArtist.Craig}", + "TheCreationoftheGuide": "{$PaintingArtist.Garner}", + "TheMerchant": "{$PaintingArtist.Garner}", + "CrownoDevoursHisLunch": "{$PaintingArtist.Garner}", + "RareEnchantment": "{$PaintingArtist.Phelps}", + "GloriousNight": "{$PaintingArtist.Duncan}", + "AnglerFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AnglerFish}", + "AngryNimbusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryNimbus}", + "AnomuraFungusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AnomuraFungus}", + "AntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Antlion}", + "ArapaimaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Arapaima}", + "ArmoredSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ArmoredSkeleton}", + "BatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CaveBat}", + "BirdBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Bird}", + "BlackRecluseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlackRecluse}", + "BloodFeederBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodFeeder}", + "BloodJellyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodJelly}", + "BloodCrawlerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodCrawler}", + "BoneSerpentBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BoneSerpentHead}", + "BunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Bunny}", + "ChaosElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ChaosElemental}", + "MimicBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mimic}", + "ClownBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Clown}", + "CorruptBunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptBunny}", + "CorruptGoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptGoldfish}", + "CrabBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crab}", + "CrimeraBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crimera}", + "CrimsonAxeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonAxe}", + "CursedHammerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CursedHammer}", + "DemonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Demon}", + "DemonEyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DemonEye}", + "DerplingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Derpling}", + "EaterofSoulsBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EaterofSouls}", + "EnchantedSwordBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EnchantedSword}", + "ZombieEskimoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieEskimo}", + "FaceMonsterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FaceMonster}", + "FloatyGrossBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FloatyGross}", + "FlyingFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingFish}", + "FlyingSnakeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingSnake}", + "FrankensteinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Frankenstein}", + "FungiBulbBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FungiBulb}", + "FungoFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FungoFish}", + "GastropodBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Gastropod}", + "GoblinThiefBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinThief}", + "GoblinSorcererBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinSorcerer}", + "GoblinPeonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinPeon}", + "GoblinScoutBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinScout}", + "GoblinWarriorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinWarrior}", + "GoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Goldfish}", + "HarpyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Harpy}", + "HellbatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hellbat}", + "HerplingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Herpling}", + "HornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hornet}", + "IceElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceElemental}", + "IcyMermanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IcyMerman}", + "FireImpBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FireImp}", + "JellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueJellyfish}", + "JungleCreeperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleCreeper}", + "LihzahrdBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LihzahrdCrawler}", + "ManEaterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ManEater}", + "MeteorHeadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MeteorHead}", + "MothBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Moth}", + "MummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mummy}", + "MushiLadybugBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MushiLadybug}", + "ParrotBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Parrot}", + "PigronBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PigronCorruption}", + "PiranhaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Piranha}", + "PirateBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateDeckhand}", + "PixieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Pixie}", + "RaincoatZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieRaincoat}", + "ReaperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Reaper}", + "SharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Shark}", + "SkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Skeleton}", + "SkeletonMageBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DarkCaster}", + "SlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueSlime}", + "SnowFlinxBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowFlinx}", + "SpiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WallCreeper}", + "SporeZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieMushroom}", + "SwampThingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SwampThing}", + "TortoiseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantTortoise}", + "ToxicSludgeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ToxicSludge}", + "UmbrellaSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UmbrellaSlime}", + "UnicornBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Unicorn}", + "VampireBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VampireBat}", + "VultureBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Vulture}", + "NypmhBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nymph}", + "WerewolfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Werewolf}", + "WolfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Wolf}", + "WorldFeederBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SeekerHead}", + "WormBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantWormHead}", + "WraithBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Wraith}", + "WyvernBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WyvernHead}", + "ZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Zombie}", + "JackingSkeletron": "{$PaintingArtist.Crowno}", + "BitterHarvest": "{$PaintingArtist.Lazure}", + "BloodMoonCountess": "{$PaintingArtist.Lazure}", + "HallowsEve": "{$PaintingArtist.Lazure}", + "MorbidCuriosity": "{$PaintingArtist.Lazure}", + "StarTopper1": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "StarTopper2": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "StarTopper3": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BowTopper": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndRedGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenAndWhiteGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "MulticoloredBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndYellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndRedBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndYellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "MulticoloredLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndYellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndBlueLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueAndYellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "PillaginMePixels": "{$PaintingArtist.Lazure}", + "PaintingCastleMarsberg": "{$PaintingArtist.Lazure}", + "PaintingMartiaLisa": "{$PaintingArtist.Lazure}", + "PaintingTheTruthIsUpThere": "{$PaintingArtist.Lazure}", + "AngryTrapperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryTrapper}", + "ArmoredVikingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ArmoredViking}", + "BlackSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlackSlime}", + "BlueArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueArmoredBones}", + "BlueCultistArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistArcherBlue}", + "SkiphsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "BlueCultistFighterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "BoneLeeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BoneLee}", + "ClingerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Clinger}", + "CochinealBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CochinealBeetle}", + "CorruptPenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptPenguin}", + "CorruptSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptSlime}", + "CorruptorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Corruptor}", + "CrimslimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crimslime}", + "CursedSkullBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CursedSkull}", + "CyanBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CyanBeetle}", + "DevourerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DevourerHead}", + "DiablolistBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DiabolistRed}", + "DoctorBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DoctorBones}", + "DungeonSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DungeonSlime}", + "DungeonSpiritBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DungeonSpirit}", + "ElfArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ElfArcher}", + "ElfCopterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ElfCopter}", + "EyezorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Eyezor}", + "FlockoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Flocko}", + "GhostBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Ghost}", + "GiantBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantBat}", + "GiantCursedSkullBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantCursedSkull}", + "GiantFlyingFoxBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantFlyingFox}", + "GingerbreadManBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GingerbreadMan}", + "GoblinArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinArcher}", + "GreenSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreenSlime}", + "HeadlessHorsemanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HeadlessHorseman}", + "HellArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HellArmoredBones}", + "HellhoundBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hellhound}", + "HoppinJackBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HoppinJack}", + "IceBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceBat}", + "IceGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceGolem}", + "IceSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceSlime}", + "IchorStickerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IchorSticker}", + "IlluminantBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IlluminantBat}", + "IlluminantSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IlluminantSlime}", + "JungleBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleBat}", + "JungleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleSlime}", + "KrampusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Krampus}", + "LacBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LacBeetle}", + "LavaBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Lavabat}", + "LavaSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LavaSlime}", + "MartianBrainscramblerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BrainScrambler}", + "MartianDroneBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianDrone}", + "MartianEngineerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianEngineer}", + "MartianGigazapperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GigaZapper}", + "MartianGreyGruntBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GrayGrunt}", + "MartianOfficerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianOfficer}", + "MartianRaygunnerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RayGunner}", + "MartianScutlixGunnerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ScutlixRider}", + "MartianTeslaTurretBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianTurret}", + "MisterStabbyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MisterStabby}", + "MotherSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MotherSlime}", + "NecromancerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Necromancer}", + "NutcrackerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nutcracker}", + "PaladinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Paladin}", + "PenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Penguin}", + "PinkyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Pinky}", + "PoltergeistBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Poltergeist}", + "PossessedArmorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PossessedArmor}", + "PresentMimicBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PresentMimic}", + "PurpleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PurpleSlime}", + "RaggedCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RaggedCaster}", + "RainbowSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RainbowSlime}", + "RavenBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Raven}", + "RedSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RedSlime}", + "RuneWizardBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RuneWizard}", + "RustyArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RustyArmoredBonesAxe}", + "ScarecrowBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Scarecrow1}", + "ScutlixBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Scutlix}", + "SkeletonArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonArcher}", + "SkeletonCommandoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonCommando}", + "SkeletonSniperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonSniper}", + "SlimerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Slimer}", + "SnatcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Snatcher}", + "SnowBallaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowBalla}", + "SnowmanGangstaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowmanGangsta}", + "SpikedIceSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SpikedIceSlime}", + "SpikedJungleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SpikedJungleSlime}", + "SplinterlingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Splinterling}", + "SquidBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Squid}", + "TacticalSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TacticalSkeleton}", + "TheGroomBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TheGroom}", + "TimBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Tim}", + "UndeadMinerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UndeadMiner}", + "UndeadVikingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UndeadViking}", + "WhiteCultistArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistArcherWhite}", + "WhiteCultistCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "WhiteCultistFighterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "YellowSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.YellowSlime}", + "YetiBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Yeti}", + "ZombieElfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieElf}", + "SparkyPainting": "{$PaintingArtist.Crowno}\n'Em memória'", + "PaintingAcorns": "{$PaintingArtist.Lazure}", + "PaintingColdSnap": "{$PaintingArtist.Lazure}", + "PaintingCursedSaint": "{$PaintingArtist.Lazure}", + "PaintingSnowfellas": "{$PaintingArtist.Lazure}", + "PaintingTheSeason": "{$PaintingArtist.Lazure}", + "RedString": "{$CommonItemTooltip.String}", + "OrangeString": "{$CommonItemTooltip.String}", + "YellowString": "{$CommonItemTooltip.String}", + "LimeString": "{$CommonItemTooltip.String}", + "GreenString": "{$CommonItemTooltip.String}", + "TealString": "{$CommonItemTooltip.String}", + "CyanString": "{$CommonItemTooltip.String}", + "SkyBlueString": "{$CommonItemTooltip.String}", + "BlueString": "{$CommonItemTooltip.String}", + "PurpleString": "{$CommonItemTooltip.String}", + "VioletString": "{$CommonItemTooltip.String}", + "PinkString": "{$CommonItemTooltip.String}", + "BrownString": "{$CommonItemTooltip.String}", + "WhiteString": "{$CommonItemTooltip.String}", + "RainbowString": "{$CommonItemTooltip.String}", + "BlackString": "{$CommonItemTooltip.String}", + "BlackCounterweight": "{$CommonItemTooltip.Counterweight}", + "BlueCounterweight": "{$CommonItemTooltip.Counterweight}", + "GreenCounterweight": "{$CommonItemTooltip.Counterweight}", + "PurpleCounterweight": "{$CommonItemTooltip.Counterweight}", + "RedCounterweight": "{$CommonItemTooltip.Counterweight}", + "YellowCounterweight": "{$CommonItemTooltip.Counterweight}", + "KingSlimeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "EyeOfCthulhuBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "EaterOfWorldsBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "BrainOfCthulhuBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "QueenBeeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "SkeletronBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "WallOfFleshBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "DestroyerBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "TwinsBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "SkeletronPrimeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "PlanteraBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "GolemBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "FishronBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "CultistBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "MoonLordBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "GoblinSummonerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinSummoner}", + "SalamanderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Salamander}", + "GiantShellyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantShelly}", + "CrawdadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crawdad}", + "FritzBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Fritz}", + "CreatureFromTheDeepBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CreatureFromTheDeep}", + "DrManFlyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DrManFly}", + "MothronBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mothron}", + "SeveredHandBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "ThePossessedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ThePossessed}", + "ButcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Butcher}", + "PsychoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Psycho}", + "DeadlySphereBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DeadlySphere}", + "NailheadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nailhead}", + "PoisonousSporeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "MedusaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Medusa}", + "GreekSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreekSkeleton}", + "GraniteFlyerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GraniteFlyer}", + "GraniteGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GraniteGolem}", + "BloodZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodZombie}", + "DripplerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Drippler}", + "TombCrawlerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TombCrawlerHead}", + "DuneSplicerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DuneSplicerHead}", + "FlyingAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingAntlion}", + "WalkingAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WalkingAntlion}", + "DesertGhoulBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertGhoul}", + "DesertLamiaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertLamiaDark}", + "DesertDjinnBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertDjinn}", + "DesertBasiliskBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertBeast}", + "RavagerScorpionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertScorpionWalk}", + "StardustSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustSoldier}", + "StardustWormBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustWormHead}", + "StardustJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustJellyfishBig}", + "StardustSpiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustSpiderBig}", + "StardustSmallCellBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "StardustLargeCellBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustCellBig}", + "SolarCoriteBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarCorite}", + "SolarSrollerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarSroller}", + "SolarCrawltipedeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarCrawltipedeHead}", + "SolarDrakomireRiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarDrakomireRider}", + "SolarDrakomireBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarDrakomire}", + "SolarSolenianBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarSolenian}", + "NebulaSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaSoldier}", + "NebulaHeadcrabBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaHeadcrab}", + "NebulaBrainBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaBrain}", + "NebulaBeastBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaBeast}", + "VortexLarvaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexLarva}", + "VortexHornetQueenBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexHornetQueen}", + "VortexHornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexHornet}", + "VortexSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexSoldier}", + "VortexRiflemanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexRifleman}", + "PirateCaptainBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCaptain}", + "PirateDeadeyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateDeadeye}", + "PirateCorsairBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCorsair}", + "PirateCrossbowerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCrossbower}", + "MartianWalkerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianWalker}", + "RedDevilBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RedDevil}", + "PinkJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PinkJellyfish}", + "GreenJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreenJellyfish}", + "DarkMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DarkMummy}", + "LightMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LightMummy}", + "AngryBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryBones}", + "IceTortoiseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceTortoise}", + "SandSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandSlime}", + "SeaSnailBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SeaSnail}", + "MoonLordPainting": "{$PaintingArtist.Crowno}", + "SandElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandElemental}", + "SandsharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandShark}", + "SandsharkCorruptBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkCorrupt}", + "SandsharkCrimsonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkCrimson}", + "SandsharkHallowedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkHallow}", + "TumbleweedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Tumbleweed}", + "BossBagBetsy": "{$CommonItemTooltip.RightClickToOpen}", + "BossBagOgre": "{$CommonItemTooltip.RightClickToOpen}", + "BossBagDarkMage": "{$CommonItemTooltip.RightClickToOpen}", + "ExplosiveBunny": "Para utilizar com o Canhão de coelhinhos", + "VialofVenom": "\"Extremamente tóxico\"", + "FlaskofVenom": "Ataques físicos envenenam seus inimigos", + "VenomArrow": "Envenena o alvo", + "VenomBullet": "Envenena o alvo", + "PartyBullet": "Explode em confetes ao entrar em contato", + "NanoBullet": "Causa confusão", + "ExplodingBullet": "Explode ao entrar em contato", + "GoldenBullet": "Inimigos mortos deixarão cair mais dinheiro", + "FlaskofCursedFlames": "Ataques físicos fazem com que seus inimigos queimem com chamas amaldiçoadas", + "FlaskofFire": "Ataques físicos incendeiam seus inimigos", + "FlaskofGold": "Ataques físicos fazem com que seus inimigos deixem cair mais ouro", + "FlaskofIchor": "Ataques físicos diminuem as defesas dos inimigos", + "FlaskofNanites": "Ataques físicos confundem seus inimigos", + "FlaskofParty": "Ataques físicos fazem com que confetes apareçam", + "FlaskofPoison": "Ataques físicos envenenam seus inimigos", + "CobaltBreastplate": "3% de aumento na chance de acerto crítico", + "CobaltLeggings": "10% de aumento na velocidade dos movimentos", + "MythrilChainmail": "5% de aumento nos danos", + "MythrilGreaves": "3% de aumento na chance de acerto crítico", + "RocketI": "Pequeno raio de impacto. Não destrói peças", + "RocketII": "Pequeno raio de impacto. Destrói peças", + "RocketIII": "Grande raio de impacto. Não destrói peças", + "RocketIV": "Grande raio de impacto. Destrói peças", + "AsphaltBlock": "Aumenta a velocidade de corrida", + "CobaltPickaxe": "Pode minerar mithril e oricalco", + "MythrilPickaxe": "Pode minerar adamantino e titânio", + "Cannonball": "Para utilizar com o canhão", + "Arkhalis": "'Eu não tirei isso de um Schmoo'", + "BoneGlove": "33% de chance de não gastar ossos", + "LogicGate_AND": "Ativado quando todas as lâmpadas estiverem acesas, caso contrário é Desativado", + "LogicGate_NAND": "Ativado quando nem todas as lâmpadas estiverem acesas, caso contrário é Desativado", + "DD2FlameburstTowerT2Popper": "{$ItemTooltip.DD2FlameburstTowerT1Popper}", + "DD2FlameburstTowerT3Popper": "{$ItemTooltip.DD2FlameburstTowerT1Popper}", + "DD2BallistraTowerT2Popper": "{$ItemTooltip.DD2BallistraTowerT1Popper}", + "DD2BallistraTowerT3Popper": "{$ItemTooltip.DD2BallistraTowerT1Popper}", + "DD2ExplosiveTrapT2Popper": "{$ItemTooltip.DD2ExplosiveTrapT1Popper}", + "DD2ExplosiveTrapT3Popper": "{$ItemTooltip.DD2ExplosiveTrapT1Popper}", + "DD2LightningAuraT2Popper": "{$ItemTooltip.DD2LightningAuraT1Popper}", + "DD2LightningAuraT3Popper": "{$ItemTooltip.DD2LightningAuraT1Popper}", + "ApprenticeScarf": "{$ItemTooltip.HuntressBuckler}", + "SquireShield": "{$ItemTooltip.HuntressBuckler}", + "MonkBelt": "{$ItemTooltip.HuntressBuckler}", + "GolfClubStoneIron": "{$CommonItemTooltip.GolfIron}", + "ApprenticeAltPants": "20% de aumento nos danos por lacaios e 25% de aumento nas chances de ataque mágico crítico", + "ApprenticeAltShirt": "30% de aumento nos danos por lacaios e 15% de aumento nos danos mágicos", + "GolfClubGoldWedge": "{$CommonItemTooltip.GolfWedge}", + "ApprenticeRobe": "20% de aumento nos danos por lacaios e 10% de aumento nos danos mágicos", + "ApprenticeStaffT3": "Jorra defesa, reduzindo o miasma!", + "GoldenCrateHard": "{$ItemTooltip.GoldenCrate}", + "BookStaff": "Quem será que enfiou um tomo de sabedoria infinita em um pedaço de madeira...\n para lançar um poderoso tornado", + "GolfBallDyedSkyBlue": "{$CommonItemTooltip.GolfBall}", + "DD2BetsyBow": "Dispara flechas que se dividem, causando danos maiores a inimigos aéreos", + "DD2ElderCrystal": "Coloque na Base do Cristal de Etheria para invocar os portais de Éter", + "DD2ElderCrystalStand": "Abriga o Cristal de Eternia", + "DD2EnergyCrystal": "Costuma ser usado para manifestar a força de vontade como forma física de defesa", + "GolfBallDyedRed": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedTeal": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedPurple": "{$CommonItemTooltip.GolfBall}", + "DD2PetDragon": "Invoca um dragão de estimação", + "DD2PetGato": "Invoca um gato de estimação", + "DD2PetGhost": "Invoca uma velinha de estimação, como fonte de luz", + "DD2PhoenixBow": "Controle o poder das chamas eternas", + "DD2SquireBetsySword": "Libera a energia do coração para frente", + "DD2SquireDemonSword": " para defender-se com um escudo", + "DefenderMedal": "Dinheiro para ser usado com o Taberneiro", + "ShuckedOyster": "{$CommonItemTooltip.MinorStats}", + "HuntressAltPants": "25% de aumento nos danos por lacaios e 20% de aumento na velocidade dos movimentos", + "HuntressAltShirt": "25% de aumento nos danos por lacaios e ataque à distância", + "GolfClubBronzeWedge": "{$CommonItemTooltip.GolfWedge}", + "HuntressJerkin": "20% de aumento nos danos por ataques dos lacaios e à distância", + "HuntressPants": "10% de aumento nos danos por lacaios e 20% de aumento na velocidade dos movimentos", + "GolfClubWoodDriver": "{$CommonItemTooltip.GolfDriver}", + "Oyster": "{$CommonItemTooltip.RightClickToOpen}", + "MonkAltPants": "20% de aumento nos danos por lacaios, na velocidade dos movimentos e na chance de acerto crítico", + "MonkAltShirt": "20% de aumento nos danos por lacaios e na velocidade dos ataques físicos", + "GolfClubMythrilIron": "{$CommonItemTooltip.GolfIron}", + "MonkPants": "10% de aumento nos danos por lacaios,\n10% de aumento na chance de acerto crítico e 20% de aumento na velocidade dos movimentos", + "MonkShirt": "20% de aumento nos danos por lacaios e por ataques físicos", + "MonkStaffT1": "Aumenta de poder enquanto você esmaga seus inimigos", + "MonkStaffT2": "Invoca fantasmas quando atinge inimigos", + "MonkStaffT3": " enquanto segura para um ataque alternativo!", + "GolfClubRustyPutter": "{$CommonItemTooltip.GolfPutter}", + "IronCrateHard": "{$ItemTooltip.IronCrate}", + "SquireAltShirt": "30% de aumento nos danos por lacaios e aumento enorme na regeneração de vida", + "GolfClubLeadPutter": "{$CommonItemTooltip.GolfPutter}", + "SquireGreaves": "15% de aumento nos danos por lacaios, 20% de aumento na chance de acerto físico crítico e na velocidade dos movimentos", + "SquirePlating": "15% de aumento nos danos por lacaios e por ataques físicos", + "ArkhalisShirt": "{$ItemTooltip.ArkhalisHat}", + "ArkhalisPants": "{$ItemTooltip.ArkhalisHat}", + "LobsterTail": "{$CommonItemTooltip.MediumStats}", + "ArkhalisHat": "{$CommonItemTooltip.DevItem}\n'Eu não encontrei isso na Rede'", + "LeinforsHat": "{$CommonItemTooltip.DevItem}\n'Para manter esses cachinhos exuberantes ainda mais lindos'", + "LeinforsShirt": "{$CommonItemTooltip.DevItem}\n'Sexy outra vez'", + "LeinforsPants": "{$CommonItemTooltip.DevItem}\n'Shia surpreso! Não esperava isso de um par de calças, né?'", + "OceanCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "LeinforsAccessory": "{$CommonItemTooltip.DevItem}\n'Para melhores resultados, use com uma dieta das massas'", + "KiteSpectrum": "{$CommonItemTooltip.Kite}", + "KiteWanderingEye": "{$CommonItemTooltip.Kite}", + "KiteUnicorn": "{$CommonItemTooltip.Kite}", + "FairyQueenBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "LavaCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LavaCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "HotlineFishingHook": "{$CommonItemTooltip.LavaFishing}", + "LavaFishingHook": "{$CommonItemTooltip.LavaFishing}", + "TeleportationPylonJungle": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonPurity": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonHallow": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonUnderground": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonOcean": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonDesert": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonSnow": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonMushroom": "{$CommonItemTooltip.TeleportationPylon}", + "RockGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RockGolem}", + "BloodMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodMummy}", + "SporeSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SporeSkeleton}", + "SporeBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SporeBat}", + "LarvaeAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LarvaeAntlion}", + "CrimsonBunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonBunny}", + "CrimsonGoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonGoldfish}", + "CrimsonPenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonPenguin}", + "BigMimicCorruptionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicCorruption}", + "BigMimicCrimsonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicCrimson}", + "BigMimicHallowBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicHallow}", + "MossHornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MossHornet}", + "WanderingEyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WanderingEye}", + "CreativeWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "RainbowWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressUpToBooster}", + "LongRainbowTrailWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}\n{$CommonItemTooltip.PressUpToBooster}" + }, + "CommonItemTooltip": { + "SpecialCrafting": "Usado em criações especiais", + "DevItem": "Ótimo para fingir que é um desenvolvedor!", + "FlightAndSlowfall": "Permite o voo e desaceleração da queda", + "RightClickToOpen": " para abrir", + "BannerBonus": "Jogadores próximos recebem um bônus contra: ", + "Counterweight": "Arremessa um contrapeso depois de atingir um inimigo com um ioiô", + "MinuteDuration": "{0} minuto(s) de duração", + "PlaceableOnXmasTree": "Pode ser usado em uma árvore de Natal", + "RestoresLife": "Restaura {0} de vida", + "RestoresMana": "Restaura {0} de mana", + "SecondDuration": "{0} segundo(s) de duração", + "String": "Aumenta o alcance do ioiô", + "UsesLife": "Usa {0} de vida", + "UsesMana": "Usa {0} de mana" + }, + "BuffDescription": { + "WellFed_Expert": "Pequenas melhorias em todas as estatísticas e aumento da regeneração de vida" + } +} \ No newline at end of file diff --git a/Localization/Content/pt-BR/Legacy.json b/Localization/Content/pt-BR/Legacy.json new file mode 100644 index 0000000..dd42177 --- /dev/null +++ b/Localization/Content/pt-BR/Legacy.json @@ -0,0 +1,1143 @@ +{ + "LegacyWorldGen": { + "0": "Gerando terreno do mundo", + "10": "Gerando cavernas na superfície", + "11": "Gerando selva", + "12": "Gerando ilhas flutuantes", + "13": "Adicionando terra com cogumelos", + "14": "Posicionando lama na terra", + "15": "Adicionando limo", + "16": "Adicionando brilhantes", + "17": "Adicionando teias", + "18": "Criando submundo", + "19": "Adicionando corpos d'água", + "1": "Adicionando areia", + "20": "Corrompendo o mundo", + "21": "Gerando cavernas nas montanhas", + "22": "Criando praias", + "23": "Adicionando gemas", + "24": "Gravitando areia", + "25": "Removendo fundos de terra", + "26": "Posicionando altares", + "27": "Acomodando líquidos", + "28": "Posicionando cristais da vida", + "29": "Posicionando estátuas", + "2": "Gerando colinas", + "30": "Escondendo tesouros", + "31": "Escondendo mais tesouros", + "32": "Escondendo tesouros na selva", + "33": "Escondendo tesouros na água", + "34": "Posicionando armadilhas", + "35": "Posicionando itens quebráveis", + "36": "Posicionando forjas infernais", + "37": "Espalhando grama", + "38": "Cultivando cactos", + "39": "Plantando girassóis", + "40": "Plantando árvores", + "41": "Plantando ervas", + "42": "Plantando ervas daninhas", + "43": "Cultivando vinhas", + "44": "Plantando flores", + "45": "Plantando cogumelos", + "46": "Liberando recursos não utilizados", + "47": "Redefinindo objetos do jogo", + "48": "Configurando modo difícil", + "49": "Salvando dados do mundo", + "4": "Posicionando pedras na terra", + "50": "Fazendo a cópia de segurança dos arquivos do mundo", + "51": "Carregando dados do mundo", + "52": "Verificando alinhamento de peças", + "53": "Falha no carregamento!", + "54": "Nenhum backup encontrado.", + "55": "Encontrando molduras de peças", + "56": "Adicionando neve", + "57": "Mundo", + "58": "Criando calabouço", + "59": "Um meteorito caiu!", + "5": "Posicionando terra nas pedras", + "60": "Nivelando o mundo", + "61": "Criando musgo", + "62": "Criando pedras preciosas", + "63": "Criando cavernas", + "64": "Aumentando as cavernas de aranhas", + "65": "Limpando os dados do mapa:", + "66": "Salvando os dados do mapa:", + "67": "Carregando os dados do mapa:", + "68": "Desenhando o mapa:", + "69": "Criando cachoeiras", + "6": "Adicionando argila", + "70": "Criando ruínas na selva", + "71": "Criando ninhos de vespas", + "72": "Ensanguentando o mundo", + "73": "Validando o mundo salvo:", + "74": "A geleia está caindo do céu!", + "75": "A geleia parou de cair do céu.", + "77": "Adicionando mais grama", + "78": "Criando desertos", + "7": "Criando buracos aleatórios", + "80": "Polindo o mármore", + "81": "Criando granito", + "8": "Gerando cavernas pequenas", + "9": "Gerando cavernas grandes" + }, + "LegacyDialog": { + "1": "Espero que um magricela como você não seja a única coisa entre nós e o Olho de Cthulhu.", + "10": "Olhe os meus blocos de terra. Eles estão bem sujos.", + "100": "Por que purificar o mundo quando você pode simplesmente explodir tudo?", + "101": "Se você arremessar na banheira e fechar todas as janelas, vai acabar com sua sinusite e você vai até ouvir melhor!", + "102": "Quer brincar de Fracote do pavio?", + "103": "Ei, você poderia assinar este Atestado de apelação?", + "104": "É PROIBIDO FUMAR AQUI DENTRO!!", + "105": "Explosivos estão bombando hoje em dia. Compre alguns agora!", + "106": "É uma boa maneira de se morrer!", + "107": "O que será que aconteceria se... (BUM!)... Ah, desculpa, você precisava daquela perna?", + "108": "Dinamite, minha cura especial para todos os problemas.", + "109": "Olha só minhas mercadorias. É uma explosão de ofertas!", + "11": "Rapaz, o Sol está quente! Eu tenho uma armadura com ventilação perfeita.", + "110": "Eu continuo tendo vagas memórias onde amarro uma mulher e a arremesso em um calabouço.", + "111": "... temos um problema! A lua de sangue está brilhando hoje!", + "112": "Se eu fosse mais jovem, convidaria a {Nurse} para sair. Eu era um belo garanhão.", + "113": "Aquele seu chapéu vermelho parece familiar...", + "114": "Obrigado mais uma vez por me libertar de minha maldição. A impressão que tive foi de que algo pulou e me mordeu.", + "115": "Mamãe sempre disse que eu seria um ótimo alfaiate.", + "116": "A vida é como uma caixa de roupas. Ninguém sabe o que vai vestir!", + "117": "Claro que o bordado é difícil! Se não fosse, ninguém o faria! É por isso que ele é o máximo.", + "118": "Eu sei tudo sobre o ramo da alfaiataria.", + "119": "Ter uma maldição significa viver uma vida solitária, por isso cheguei a criar um amigo de couro. Eu o chamava de Wilson.", + "12": "O Sol alto sobre nossas cabeças, mas meus preços continuam baixos.", + "120": "Obrigado por me libertar, humano. Os outros goblins me amarraram e me deixaram aqui. Pode-se dizer que nós não nos dávamos muito bem.", + "121": "Não acredito que me amarraram e me deixaram aqui só por ter falado que eles não estavam seguindo na direção leste!", + "122": "Depois que me expulsaram, posso jogar fora as bolas com espinhos? Meus bolsos doem.", + "123": "Procurando por um mestre em geringonças? Eu sou o seu goblin!", + "124": "Obrigado pela ajuda. Agora tenho que terminar de caminhar sem destino aqui. Tenho certeza que nos encontraremos novamente.", + "125": "Achei que você fosse mais alto.", + "126": "Ei... o que {Mechanic} está fazendo? Você... você por acaso falou com ela?", + "127": "Ei, seu chapéu precisa de um motor? Acho que tenho um motor que encaixaria perfeitamente esse chapéu.", + "128": "Ei, ouvi dizer que você gosta de foguetes e de botas para correr, por isso coloquei foguetes em suas botas para correr.", + "129": "O silêncio é dourado. A fita adesiva é prateada.", + "13": "Ah, ótimo. Consigo ouvir {Mechanic} e {Nurse} discutindo daqui.", + "130": "SIM, o ouro é mais forte que o ferro. O que eles tem ensinado aos humanos hoje em dia?", + "131": "Sabe, aquela combinação de capacete de minerador com pé-de-pato funcionava melhor no papel.", + "132": "É surpreendentemente fácil deixar um goblin com raiva. Na verdade, eles podem entrar em guerra por causa de um pedaço de pano!", + "133": "Para ser honesto, a maioria dos goblins não é lá muito inteligente. Bem, alguns deles são.", + "134": "Você sabe por que levamos estas bolas com espinhos para todos os lados? Porque eu não sei.", + "135": "Eu acabei de concluir minha mais nova criação! Esta versão não explode violentamente se você respirar fundo demais.", + "136": "Ladrões goblin não são muito bons em seu trabalho. Eles não conseguem nem roubar um baú destravado!", + "137": "Obrigado por me salvar, colega! Eu já estava começando a ficar irritado.", + "138": "Ah, meu herói!", + "139": "Ah, que heroico! Obrigado por me salvar, jovem senhora!", + "14": "Você viu Chith...Shith.. Bate-papo... O olho grande?", + "140": "Ah, que heroico! Obrigado por me salvar, jovem rapaz!", + "141": "Agora que nos conhecemos, posso me mudar pra sua casa, certo?", + "142": "Olá, olá, {Guide}! O que posso fazer por você hoje?", + "143": "Olá, olá, {Demolitionist}! O que posso fazer por você hoje?", + "144": "Olá, olá, {GoblinTinkerer}! O que posso fazer por você hoje?", + "145": "Olá, olá, {Nurse}! O que posso fazer por você hoje?", + "146": "Olá, olá, {GoblinTinkerer}! O que posso fazer por você hoje?", + "147": "Olá, olá, {Dryad}! O que posso fazer por você hoje?", + "148": "Quer que eu tire uma moeda da sua orelha? Não? Ok.", + "149": "Quer um doce mágico? Não? Ok.", + "15": "Ei, esta casa é segura, certo? Certo? {PlayerName}?", + "150": "Eu sei fazer um chocolate quente encantador, se você estiver inter... Não? Ok.", + "151": "Você veio dar uma olhadinha na minha bola de cristal?", + "152": "Já pensou em ter um anel encantado que transforma pedras em geleias? Bem, eu também não.", + "153": "Uma vez alguém me disse que a amizade é mágica. Isso é ridículo. Não é possível transformar pessoas em sapos usando a amizade.", + "154": "Posso ver seu futuro... Você vai comprar muitos dos meus itens!", + "155": "Uma vez eu tentei dar vida a uma Estátua de anjo. Não aconteceu nada.", + "156": "Obrigado! Era só uma questão de tempo até que eu terminasse igual aos esqueletos que tem aqui embaixo.", + "157": "Ei, presta atenção por onde anda! Eu estava ali quase agora!", + "158": "Espera, a Wi-Fi está quase funcionando aqui embaixo.", + "159": "Mas eu já estava terminando de instalar as luzinhas aqui!", + "16": "Nem mesmo uma lua de sangue pode impedir o capitalismo. Vamos negociar.", + "160": "NÃO SE MEXA. MINHA LENTE DE CONTATO CAIU.", + "161": "Eu só quero que o interruptor faça... O quê?!", + "162": "Ah, já sei. Não tem fio suficiente. Idiota.", + "163": "Só-você poderia só... Por favor! Ok? Ok. Ugh.", + "164": "Não estou gostando do jeito como você está olhando para mim. Estou TRABALHANDO agora.", + "165": "Ei, {PlayerName}, você acabou de chegar da casa do {GoblinTinkerer}? Ele por acaso falou de mim?", + "166": "{ArmsDealer} continua falando sobre apertar minha placa de pressão. Eu disse a ele que ela servia para subir em cima.", + "167": "Sempre compre mais fio do que precisa!", + "168": "Você verificou se o seu dispositivo está conectado à tomada?", + "169": "Ah, sabe o que está faltando nesta casa? Mais luzes piscando.", + "170": "Você sabe que a noite é de Lua de Sangue quando o céu fica vermelho. Há algo nela que faz com que monstros apareçam.", + "171": "Ei parceiro, você sabe onde encontro ervas da morte? Ah, por nada. Só pra saber mesmo.", + "172": "Se você olhar para cima, verá que a Lua está vermelha agora.", + "173": "É melhor ficar dentro de casa à noite. É muito perigoso andar por aí no escuro.", + "174": "Saudações, {PlayerName}. Há alguma coisa que eu possa fazer para ajudar?", + "175": "Estou aqui para oferecer conselhos sobre o que fazer. Recomenda-se que você fale comigo sempre que não souber o que fazer para continuar.", + "176": "Dizem que há uma pessoas que dirá como sobreviver nesta terra... opa, espera. Sou eu.", + "177": "Você pode utilizar sua picareta para cavar na areia e seu machado para cortar árvores. Basta colocar seu cursor sobre a peça e clicar!", + "178": "Se quiser sobreviver, terá que criar armas e abrigos. Comece cortando árvores e juntando madeira.", + "179": "Pressione {InventoryKey} para acessar seu menu de criação. Quando você tiver madeira suficiente, crie uma mesa de trabalho. Isto permitirá que você crie coisas mais complicadas, contanto que esteja próximo.", + "18": "Kosh, kapleck Mog. Oh desculpe, isso quer dizer \"Compre algo ou morra\" em klingon.", + "180": "Você pode construir abrigos utilizando madeira e outros blocos. Não esqueça de criar e posicionar paredes.", + "181": "Assim que tiver uma espada de madeira, pode tentar juntar um pouco de gel das geleias. Combine madeira com gel para criar uma tocha!", + "182": "Para interagir com o pano de fundo, use um martelo!", + "183": "Você deveria minerar até encontrar minério de ferro. Você pode criar coisas muito úteis com ele.", + "184": "Agora que tem algum minério, você terá que transformá-lo em uma barra para criar itens. Isto requer uma fornalha!", + "185": "Você pode criar uma fornalha com tochas, madeira e pedra. Certifique-se de que está próximo a uma bancada de trabalho.", + "186": "Você precisará de uma bigorna para criar a maioria dos objetos com barras de metal.", + "188": "Há corações de cristal no submundo que podem ser utilizados para aumentar o nível máximo de sua vida. Você pode destruí-los com uma picareta.", + "19": "{PlayerName}, não é isso? Ouvi falar bem de você, colega!", + "191": "Há muitas maneiras diferentes de se atrair pessoas para morar em nossa cidade. Obviamente elas precisarão de um lar.", + "192": "Para uma sala ser considerada um lar, ela precisa de uma porta, de uma cadeira, de uma mesa e de uma fonte de luz. Certifique-se de que a casa também tem paredes.", + "193": "Não é possível que duas pessoas morem no mesmo lar. Além disso, se seu lar for destruído, elas procurarão por um novo lugar para morar.", + "194": "Você pode utilizar a interface de alojamentos para definir e visualizar alojamentos. Abra seu inventário e clique no ícone da casa.", + "195": "Se você quiser que um comerciante venha morar aqui, terá que juntar bastante dinheiro. 50 moedas de prata devem ser o suficiente!", + "196": "Para que uma enfermeira mude-se para cá, seria bom você aumentar sua vida máxima.", + "197": "Se você tivesse uma arma, aposto que um comerciante de armas apareceria para vender munição!", + "198": "Você deveria provar seu valor derrotando um monstro forte. Isso chamaria a atenção de um dríade.", + "199": "Certifique-se de explorar o calabouço completamente. Pode haver prisioneiros em suas profundezas.", + "2": "Olha só a armadura barata que você está usando. Melhor comprar mais poções de cura.", + "20": "Ouvi falar de um tesouro secreto... ah, deixa pra lá.", + "200": "Talvez o velho ao lado do calabouço queira juntar-se a nós, agora que sua maldição foi quebrada.", + "201": "Guarde todas as bombas que encontrar. Um especialista em demolição pode querer dar uma olhada nelas.", + "202": "Os goblins são assim tão diferentes de nós a ponto de ser impossível uma convivência pacífica?", + "203": "Ouvi falar que havia um mago poderoso vivendo por aqui. Fique de olhos abertos da próxima vez que for ao subterrâneo.", + "204": "Se você combinar lentes em um altar demoníaco, talvez seja possível encontrar uma maneira de invocar um monstro poderoso. Mas é melhor esperar anoitecer antes de fazer isso.", + "205": "Você pode criar iscas para vermes com pedaços podres e pó infame. Certifique-se de que está em um local corrompido antes de usar.", + "206": "Altares demoníacos normalmente podem ser encontrados na corrupção. Você terá que estar próximo para criar alguns itens.", + "208": "Se vir um pote, não deixe de quebrá-lo. Eles contém todo tipo de suprimento.", + "209": "Há tesouros escondidos no mundo inteiro. Coisas impressionantes podem ser encontradas nas profundezas do subterrâneo!", + "21": "Você falou Estátua do Anjo? Desculpe, mas não negocio com lixo.", + "210": "Destruir uma esfera das sombras pode fazer com que um meteoro caia do céu. Esferas das sombras são normalmente encontradas nos abismos em áreas corrompidas.", + "211": "Você deve concentrar-se em juntar mais cristais da vida para aumentar sua vida máxima.", + "212": "Seu equipamento atual simplesmente não dá conta. Você precisa criar uma armadura melhor.", + "213": "Acho que você está pronto para sua primeira grande batalha. Junte algumas lentes de globos oculares à noite e leve-as a um altar demoníaco.", + "214": "É bom aumentar sua vida máxima antes de encarar o próximo desafio. Quinze corações devem ser o bastante.", + "215": "A pedra negra na corrupção pode ser purificada utilizando-se pó de um dríade, ou pode ser destruída com explosivos.", + "216": "A próxima etapa deve ser explorar os abismos corrompidos. Destrua qualquer esfera das sombras que encontrar.", + "217": "Há um velho calabouço não muito longe daqui. Não seria má ideia dar uma olhada nele agora.", + "218": "Você precisa tentar maximizar sua vida disponível. Tente juntar vinte corações.", + "219": "Há muitos tesouros a se descobrir na selva, se você estiver disposto a cavar fundo o suficiente.", + "22": "O último cara que veio aqui deixou algum lixo... uh, quero dizer... tesouros!", + "220": "O submundo é feito de um material chamado pedra infernal. É perfeito para a criação de armas e armaduras.", + "221": "Quando você estiver pronto para desafiar o guardião do submundo, você terá que fazer um sacrifício. Tudo que você precisa pode ser encontrado no submundo.", + "222": "Certifique-se de destruir qualquer altar demoníaco que encontrar. Algo bom vai acontecer se você fizer isso!", + "223": "Às vezes almas podem ser colhidas de criaturas derrotadas em lugares de luz ou de escuridão extrema.", + "224": "Ho ho ho, e uma garrafa de... Gemada!", + "225": "Você poderia assar alguns biscoitos para mim?", + "226": "O quê? Achou que eu não existia?", + "227": "Consegui costurar seu rosto de volta. Da próxima vez, tome mais cuidado.", + "228": "Isso provavelmente vai deixar uma cicatriz.", + "229": "Muito melhor. Eu não quero mais ver você pulando de colinas.", + "23": "Será que a Lua é feita de queijo... uh, o que? Ah sim, compra alguma coisa!", + "230": "Não doeu tanto assim, não foi?", + "231": "Como se viver no subterrâneo já não fosse o suficiente, idiotas como você vem aqui quando estou dormindo e roubam meus filhos.", + "232": "Cá entre nós, eu só confio em {Dryad}. Ela é a única por aqui que não tentou me comer ou me usar em uma poção.", + "233": "Eu tentei me lamber outro dia desses, queria saber o porquê alvoroço todo, e então tudo começou a brilhar azul.", + "234": "Sempre que eu vejo a cor azul, fico deprimido e com preguiça.", + "235": "Você não viu nenhum porco por aí, viu? Meu irmão perdeu sua perna por causa de um deles.", + "236": "Todos dessa cidade são um pouco esquisitos. Acordei com o alfaiate mordendo meu pé na noite passada.", + "237": "Eu vou te dar um desconto se você conseguir convencer {Truffle} a vir aqui para uns... ajustes.", + "238": "Acho que ninguém entende {Truffle}. Ele é um cara muito divertido.", + "24": "Você falou em ouro? Eu posso ficar com isso aí.", + "240": "Eu não conheço a 'Trufa Travessa,' então para de perguntar!", + "241": "Ouvi falar de boatos sobre mim. Algo sobre \"Se não pode com ele, coma-o!\"", + "242": "Opa, o que é que você tem aí?", + "243": "Você acha que eu deveria me tornar um pirata dos ares? Já pensei em virar pirata dos ares.", + "244": "De qualquer maneira, um jetpack cairia muito bem em você!", + "245": "Tenho me sentido meio rabugento ultimamente, por isso já basta de confusão, seu maltrapilho!", + "246": "Queria saber mais sobre aquele {Cyborg}. Como ele consegue manter aquele tipo de locomoção?", + "247": "Aquele capitão parece estar \"do outro lado do cais\", se é que você me entende!", + "248": "Quero ver as engrenagens!", + "249": "Eu gostei das suas... engrenagens. Tem versão em latão?", + "25": "É melhor você não me sujar com sangue.", + "250": "Assim que pisar nas terras consagradas, você verá um arco-íris no céu. Posso ajudar com sua pintura, se você quiser.", + "251": "Olha só a {PartyGirl}. Essa é uma garota que sabe como pintar uma cidade de vermelho!", + "252": "Eu sei qual é a diferença entre turquesa e verde azulado. Mas eu não vou te dizer.", + "253": "Estou sem titânio branco, não adianta pedir.", + "254": "Tente cor-de-rosa e roxo, funciona, juro!", + "255": "Não, não, não... Há MUITOS tons de cinza diferentes! Não começa...", + "256": "Espero que não chova antes da tinta secar. Seria um desastre!", + "257": "Eu trago comigo as cores mais vivas que existem em troca de suas riquezas!", + "258": "Meu amor, suas roupas não tem cor alguma. Você definitivamente precisa de algumas aulas sobre como tinturar suas velhas roupas!", + "259": "O único tipo de madeira que eu tinturaria é o MARAVILHOSO Mogno. Tingir qualquer outro tipo de madeira é um desperdício.", + "26": "Anda logo e estanca isso.", + "260": "Você precisa fazer algo sobre {Pirate}. Toda vez que ele vem aqui, seu cheiro fica por uma semana!", + "261": "Que tipo de médico eu sou? Sou o Médico Bruxo.", + "262": "O coração da magia é a natureza. A natureza dos corações é mágica.", + "263": "{Nurse} pode ajudar a curar seu corpo, mas eu posso fazer você incorporar a cura.", + "264": "Escolha sabiamente, {PlayerName}. Meus itens são voláteis e minhas artes sombrias, misteriosas.", + "265": "Temos que conversar. É... é sobre festas.", + "266": "Não consigo decidir de que gosto mais: festas ou coquetéis.", + "267": "Nós deveríamos organizar uma festa de raízes brilhantes, e um coquetel também, para depois da festa.", + "268": "Uau, {PlayerName}, conhecer um aventureiro como você me deu vontade de festejar!", + "269": "Consiga um globo de discoteca e depois eu te mostro como dar uma festa.", + "27": "Se você vai morrer, por favor, vá lá para fora.", + "270": "Eu já fui à Suécia uma vez, e eles sabem como dar uma festa por lá. Por que você não é assim?", + "271": "Meu nome é {PartyGirl}, mas todos me chamam de acaba-festa. Pois é, não sei por que. De qualquer maneira, parece ser maneiro.", + "272": "Você gosta de festas? Às vezes? Mmm, tudo bem, então podemos conversar...", + "273": "Eu não sou amante dos sete mares, mas é melhor ter amado e perdido do que nunca ter amado, não é?", + "274": "Ho ho ho, e uma garrafa de... raiz brilhante!", + "275": "YAR! Engraçado você falar em papagaios porque... é... você estava falando sobre o que mesmo?", + "276": "{PlayerName}, você é uma das garotas mais lindas que este capitão aqui viu há muito tempo!", + "277": "Sai do meu pé, seu patife!", + "278": "O que diabos você está dizendo? Moby Dick é meu!", + "279": "*Yarr Blarr Harrdarr*", + "28": "O que é que você quer dizer com isso?!", + "280": "E depois a Unidade 492-8 disse, \"Quem você acha que eu sou, Unidade 472-6?\" HA. HA. HA.", + "281": "A eficiência da minha expedição foi reduzida drasticamente quando um projétil atingiu o meu atuador de locomoção.", + "282": "Esta sentença é falsa, ou não é?", + "283": "Então aquela garota \"meio punk\" é inventora, né? Acho que eu poderia mostrar algumas coisinhas a ela!", + "284": "Claro, eu e {Pirate} somos colegas, eu só odeio quando o papagaio deles faz suas... necessidades... em mim. Esse troço é corrosivo!", + "285": "Eu construí um mecanismo de paladar para mim mesmo, assim posso apreciar algumas bebidas!", + "286": "Às vezes eu pareço ter perdido um parafuso... Entendeu? Um parafuso?", + "287": "Curto atrás e nos lados, certo?", + "288": "Essas luzes realmente destacam seus olhos!", + "289": "Minhas mãos estão pegajosas por causa da... cera.", + "29": "Não estou gostando do seu tom.", + "290": "Chá? Café? Ou só mais um pouco de suco de laranja?", + "291": "Meu amor, precisamos dar um jeito nessas pontas quebradas urgentemente.", + "292": "Garooooota! Quando o assunto é fofoca, ninguém é melhor que você.", + "293": "Que loção pós-barba você gostaria de passar hoje, senhor?", + "294": "Sente-se um pouco e eu deixarei você afiado rapidinho.", + "295": "Ou você tem estilo, ou pede para alguém.", + "296": "Para você, acho que ficaria bom algo... que exija pouca manutenção.", + "297": "Eu tentei usar um dos produtos do Mestre das Tintas uma vez. Queimei as pontas. Um desastre.", + "298": "Ah, pobrezinho. Só... só senta aqui. Vai ficar tudo bem. Shhhh.", + "299": "Se liga na minha novidade.", + "3": "Sinto como se uma presença maléfica estivesse me observando.", + "30": "Por que você está aqui mesmo? Se não está sangrando, não precisa estar aqui.. Saia.", + "300": "Olá senhor, eu sou a {Stylist}, e vou cortar seu cabelo hoje.", + "301": "Só um pouco da parte de cima? Isso não tem graça...", + "302": "Espero que você goste do que fiz com o cabelo da {PartyGirl}!", + "303": "Não há nada que eu possa fazer pela cabeça chamuscada do {Demolitionist}. Ele é uma causa perdida.", + "304": "Gorjetas SÃO opcionais, mas lembre-se de que eu tenho uma tesoura apontada para sua cabeça.", + "305": "A propósito, esta é uma lâmina de barbear.", + "306": "Melhor não me chatear hoje, meu amor. Acabei de amolar minha tesoura, e estou só esperando uma desculpa para usá-la!", + "307": "Mmm, ouvi falar da {PartyGirl} que a amiga de {Mechanic}, {Nurse}, gastou todo o salário do seu namorado comprando sapatos.", + "308": "Uma vez eu coloquei uma peruca no {Cyborg} só para poder cortar seu cabelo. Eu acho que ele até gostou!", + "309": "Tentei visitar a {Stylist} uma vez. Ela simplesmente olhou para mim e disse 'não'.", + "31": "O QUE?!", + "310": "Acho que já está na hora de fazer um penteado!", + "311": "Você sequer tentou escovar seu cabelo hoje?", + "312": "Então, um corte de pixie. Você gostaria de deixar um detalhe nos lados?", + "313": "Eu não vejo problema em tirar cabelos das orelhas e das sobrancelhas, mas o nariz já é demais.", + "314": "Muito bem, agora senta aí e espera um pouco. Eu volto para enxaguar daqui a 25 minutos...", + "315": "Obrigada, meu amor! Agora eu finalmente posso dar um jeito no meu cabelo.", + "316": "Eu te daria um corte grátis se você tivesse chegado antes.", + "317": "Não brinque com essa tesoura, eles disseram. Você não vai ficar presa em uma teia de aranha, eles disseram!", + "318": "Eca, meu cabelo, tem teia de aranha nele todo!", + "319": "Encontre-me atrás da casa do {Guide} em cerca de três horas, eu acho que tenho algo que você vai achar bem interessante.", + "32": "Você viu o velho andando pelo calabouço? Ele parece estar perturbado.", + "320": "Esse {Merchant}, ele realmente não aprecia um bom negócio.", + "321": "Eu só vendo o que posso conseguir. {Clothier} não para de perguntar se tenho roupas exóticas.", + "322": "Mmm, acho que você gostaria de uma Estátua de anjo! Eles são bem detalhistas, e deixam tudo uma maravilha!", + "323": "Eu não ofereço reembolso por \"compras por impulso...\" Na verdade, não ofereço por motivo algum.", + "324": "Compre agora e aproveite o frete grátis!", + "325": "Eu vendo produtos de lugares que talvez nem existam!", + "326": "Você quer dois tostões!? Se você fizer por um, nós fechamos negócio.", + "327": "Um combinado de narguilé e cafeteira! Também prepara fritas julienne!", + "328": "Venha dar uma olhada! Peixe de uma libra! Muito, muito bom! Peixe de uma libra!", + "329": "Se você está procurando por porcarias, veio ao lugar errado.", + "33": "Eu queria que {Demolitionist} tomasse mais cuidado. Costurar seus membros todos os dias está ficando cansativo.", + "330": "Um brechó? Não, eu só vendo itens de altíssima qualidade no mercado.", + "331": "Destruir um coração de carmim às vezes faz meteoros caírem do céu. Corações de Carmim podem ser encontrados em abismos em regiões de carmim.", + "332": "Você tentou utilizar o pó de purificação na pedra carmim do carmim?", + "333": "Você deve limpar o mundo deste carmim.", + "334": "Psst! Talvez eu tenha uma tarefa para você. E nem pense em dizer não!", + "335": "Eu quero um peixe e você vai encontrar um para mim! Pergunte para mim!", + "336": "Ei! Você é o sacrif- digo, o pescador experiente perfeito! ", + "337": "{Angler} quer que VOCÊ seja o faz tudo oficial de {WorldName}!", + "338": "O quêeee?! Você não está vendo que estou enrolando o fio da vara de pescar??", + "339": "Eu tenho peixes suficientes! Eu não preciso de sua ajuda agora!", + "34": "Ei, {ArmsDealer} falou algo sobre ir ao médico por algum motivo? Só estava pensando.", + "340": "Não há nenhum chef em toda {WorldName}, então eu terei que cozinhar todos esses peixes sozinho! ", + "341": "Ei! Olha só! Estou preparando armadilhas para minha maior pegadinha! Ninguém vai esperar por essa! Não atreva-se a contar a ninguém!", + "342": "Escute o conselho de um garoto, nunca encoste a língua em um bloco de gelo! Espera, esquece o que eu falei, eu quero muito ver você fazendo isso!", + "343": "Já ouviu falar em peixes latindo?! Eu não, só queria saber de você!", + "344": "{WorldName} já tem todos os tipos de peixe mais esquisitos que existem!", + "345": "Que droga! Provavelmente vários tipos de peixe entraram em extinção antes mesmo do meu nascimento, isso não é justo!", + "346": "Eu não tenho mãe nem pai, mas eu tenho muitos peixes! É quase a mesma coisa!", + "347": "Heh heh, você tinha que ver a cara de {Dryad} quando eu prendi aquele dente de piranha na cadeira!", + "348": "Eu tenho um pedido para você! Não, eu não estou nem aí para o apocalipse zumbi!", + "349": "Anda logo e escuta! Eu preciso que você pegue algo para mim nesse momento!", + "35": "Preciso ter uma conversa séria com {Guide}. Quantas vezes por semana você consegue vir aqui com queimaduras graves por lava?", + "350": "Eu odeio a Lua de Sangue! Eu não consigo dormir por causa daqueles barulhos assustadores!", + "351": "Pescar em noite de Lua de Sangue é terrível! Os peixes mordem, é verdade, mas os zumbis também!", + "352": "Há um zilhão de monstros por aí agora mesmo!", + "353": "Tipo, obrigado, por me salvar. Você seria um ótimo lacaio!", + "354": "Hã? Quem é você? Claro que eu não estava me afogando ou nada parecido!", + "355": "Você me salvou! Você é muito gentil, eu poderia usar você... é, digo, contratar seus serviços para fazer coisas incríveis para mim!", + "356": "Você tem ossos sobrando para vender? Estou querendo substituir minha bacia... outra vez.", + "357": "Excelente! Alguém finalmente apareceu para levar alguns desses meus vermes.", + "358": "Não há doença ou condição que não possa ser curada por um pouco do meu Óleo de Geleia! Confie em mim, funciona, olha só como estou em boa forma!", + "359": "Você tem coragem mesmo, para vir até aqui embaixo. Que tal comprar alguma coisa?", + "36": "Acho que você fica melhor assim.", + "360": "Você não vai acreditar nas coisas que algumas pessoas jogam em mim... Quer comprar algumas?", + "361": "Eu até te daria uma mãozinha, mas da última vez que fiz isso, passei um mês sem ela", + "362": "Fique longe das aranhas. Elas vão sugar tudo que tem dentro de você até sobrar apenas a casca de um homem. Confie em mim.", + "363": "As únicas constantes neste mundo são a morte e os impostos, e eu tenho os dois!", + "364": "Você outra vez? Imagino que você queira mais dinheiro!?", + "365": "Será que todo mundo por aqui abre e fecha portas fazendo tanto barulho assim?!", + "366": "Vejo que você está com tempo livre, como sempre. Não consigo imaginar como seria uma vida de trabalho para gente como você.", + "367": "Sim, sim, sim! Vou entregar sua parte daqui a pouquinho. Achei que você seria um pouco mais paciente, afinal de contas eu fiz todo o trabalho.", + "368": "O que eu preciso fazer para ter um pouco de paz por aqui? Vá incomodar alguém menos ocupado!", + "369": "...dois barris de melaço, mais... Ah, deixa pra lá, você está aqui. Aqui está seu dinheiro.", + "37": "Eca... O que aconteceu com seu rosto?", + "370": "Cá entre nós... Não entendo por que eles ainda pagam o aluguel", + "371": "Tentei fazer {Dryad} me pagar com favores uma vez e hoje tenho fungos que crescem em lugares estranhos.", + "372": "Vá dizer a {ArmsDealer} que pare de me oferecer pagamentos em munição. Eu nem sequer tenho uma arma.", + "373": "Por que VOCÊ não tenta receber dinheiro de {Demolitionist} sem perder uma mão, um pé, ou...", + "374": "Acabei de chegar do {Merchant}. Ele queria saber se eu aceito cartões de crédito.", + "38": "POXA VIDA! Eu mando bem, mas não TÃO bem assim.", + "380": "Esta é sua parte dos impostos que eu recebi da nossa população sobressalente!", + "381": "Você de novo, para levar todas as minhas moedas! Só peque e dê o fora daqui!", + "382": "Bah! Aqui, pegue seu trocado e dê o fora daqui!", + "383": "Isso é tudo que você vai receber por enquanto! Pegue e não vá desperdiçar por aí.", + "39": "Caros amigos, estamos reunidos aqui hoje para dar adeus... Ah, você vai ficar bem.", + "390": "...E as pessoas ainda dizem que sou ganancioso? Bem, não tenho mais nada para você.", + "391": "Ah, você acha que eu sou uma fábrica de moedas? Porque toda vez que você me vê, pergunta a mesma coisa.", + "392": "Você nunca aparece só pra dar um 'Oi'?", + "393": "Bah! Você outra vez? Você acabou de pegar algumas das minhas moedas, dê o fora e só volte mais tarde!", + "394": "Eu acabei de te dar metade de uma coroa cinco minutos atrás! Dá o fora!", + "395": "Já quer meter a mão na minha carteira!? E depois EU sou o ganancioso.", + "396": "Você acabou de receber seu pagamento, nem mais um centavo! Saia!", + "397": "Dinheiro não nascem em árvores, então não abuse com as minhas frutas! Bah! ", + "398": "Você já conseguiu gastar tudo que eu te paguei!? Bah, eu não sou instituição de caridade, vá matar geleias!", + "399": "Não tão rápido! Você recebeu seu dinheiro, agora vá embora! ", + "4": "A espada derrota o papel! Obtenha hoje mesmo.", + "40": "Você deixou seu braço ali. Deixe-me pegar pra você...", + "400": "Já está mendigando?! Não olha para mim como se eu fosse mudar de ideia da noite pro dia! ", + "401": "Destrua todo altar de carmim que você encontrar. Algo bom vai acontecer se você fizer isso!", + "402": "Altares de Carmim normalmente são encontrados no carmim. Você terá que estar próximo para criar alguns itens.", + "41": "Deixe de ser um bebezinho! Já vi piores.", + "42": "Você vai levar pontos!", + "43": "Problema com valentões de novo?", + "44": "Espera um pouco, tenho alguns curativos em algum lugar por aqui.", + "45": "Pode ir, {PlayerName}, você vai ficar bem. Poxa.", + "46": "Dói quando você faz isso? Não faça isso.", + "47": "Você parece até que foi digerido pela metade. Estava perseguindo geleias de novo?", + "48": "Gire a cabeça e tussa.", + "49": "Eu já vi maiores... Sim, com certeza já vi ferimentos maiores.", + "5": "Você quer maçãs? Você quer cenouras? Você quer abacaxis? Nós temos tochas.", + "50": "Você gostaria de um pirulito?", + "51": "Mostre-me onde dói.", + "52": "Sinto muito, mas você não tem dinheiro suficiente para mim.", + "53": "Vou precisar de mais ouro do que o que você tem.", + "54": "Eu não trabalho de graça, sabe?", + "55": "Eu não ofereço finais felizes.", + "56": "Não posso fazer mais nada por você sem uma cirurgia plástica.", + "57": "Pare de desperdiçar meu tempo.", + "58": "Ouvi falar que há um manequim que parece muito com {Guide} em algum lugar no submundo. Eu gostaria de praticar tiro ao alvo nele.", + "59": "Não demore! Tenho um encontro marcado com {Nurse} em uma hora.", + "6": "Bela manhã, não concorda? Você estava precisando de alguma coisa?", + "60": "Eu quero o que {Nurse} estiver vendendo. Como assim, ela não vende nada?", + "61": "{Dryad} é um espetáculo. É uma pena ela ser tão puritana.", + "62": "Não perca tempo com {Demolitionist}. Eu tenho tudo que você procura aqui mesmo.", + "63": "Qual o problema com {Demolitionist}? Ele tem noção que vendemos coisas completamente diferentes?", + "64": "Cara, essa noite está perfeita para se ficar em silêncio, não concorda, {PlayerName}?", + "65": "Eu adoro noites assim. Não faltam coisas para se matar!", + "66": "Vejo que você está de olho no Mini-tubarão. É melhor você não perguntar como ele é feito.", + "67": "Ei, isso não é um filme, colega. A munição é por fora.", + "68": "Tire suas mãos da minha arma, parceiro!", + "69": "Você tentou utilizar o pó de purificação na pedra negra da corrupção?", + "7": "Em breve a noite cairá, colega. Faça suas escolhas enquanto ainda pode.", + "70": "Eu gostaria que {ArmsDealer} parasse de flertar comigo. Será que ele não percebe que eu tenho 500 anos de idade?", + "72": "Você viu o velho caminhando pelo calabouço? Ele não parece estar bem...", + "73": "Eu vendo o que eu quiser! Se você não gosta, problema seu.", + "74": "Por que você quer tanto brigar numa hora destas?", + "75": "Não quero que você compre minhas coisas. Eu quero que você queira comprar minhas coisas, entendeu?", + "76": "Cara, é impressão minha ou há tipo um milhão de zumbis lá fora esta noite?", + "77": "Você deve limpar o mundo desta corrupção.", + "78": "Proteja-se. Terraria precisa de você!", + "79": "As areias do tempo estão fluindo. E, assim, você não está envelhecendo muito graciosamente.", + "8": "Você não faz ideia de quanto Blocos de Sujeira custam longe daqui.", + "80": "Que estória é essa de que eu lato mas não mordo?", + "81": "Então, dois goblins entram em um bar e um diz para o outro, \"Que tal um 'goble' de cerveja?!\"", + "82": "Eu não posso deixar que você entre antes de me libertar de minha maldição.", + "83": "Volte à noite se quiser entrar.", + "84": "Meu mestre não pode ser invocado sob a luz do dia.", + "85": "Você é fraco demais para derrotar minha maldição. Volte quando não for tão inútil.", + "86": "Seu tolo patético. Você não pode acreditar que tem chance contra meu mestre em seu estado atual.", + "87": "Espero que você tenha uns seis amigos em sua retaguarda.", + "88": "Por favor, não, forasteiro. Você vai acabar morrendo.", + "89": "Talvez você esteja forte o suficiente para me libertar de minha maldição...", + "9": "Ah, eles contarão estórias sobre {PlayerName} algum dia... e estórias boas, com certeza.", + "90": "Forasteiro, você possui a força para derrotar meu mestre?", + "91": "Por favor! Lute contra aquele que me raptou e me liberte! Eu imploro!", + "92": "Derrote meu mestre e eu abrirei a entrada do Calabouço.", + "93": "Tentando passar pela rocha negra, não é? Por que não adicionar alguns explosivos à equação?", + "94": "Ei, você viu um palhaço por aí?", + "95": "Havia uma bomba aqui mesmo e agora não consigo encontrá-la...", + "96": "Ah, eu tenho uma coisinha para os zumbis!", + "97": "Até {ArmsDealer} quer o que eu tenho para vender!", + "98": "Você preferiria um buraco de bala ou um de granada? É o que eu pensei.", + "99": "Tenho certeza que {Nurse} vai ajudar se você acidentalmente perder um membro." + }, + "LegacyMenu": { + "0": "Abra o Terraria para participar!", + "100": "Cenário Ligado", + "101": "Cenário Desligado", + "102": "Selecionar Idioma", + "103": "Idioma", + "104": "Sim", + "105": "Não", + "106": "Alternar Estilo do Mapa ", + "107": "Alternar Tela Cheia ", + "108": "Aproximar ", + "109": "Afastar ", + "10": "Carregar Backup", + "110": "Diminuir Transparência ", + "111": "Aumentar Transparência ", + "112": "Mapa Ativado", + "113": "Mapa Desativado", + "114": "Geral", + "115": "Controles do Mapa", + "116": "Iluminação Multicore:", + "117": "Desligado", + "118": "Fechar Menu", + "11": "Nenhum backup encontrado", + "120": "Cursor Inteligente ", + "121": "Modo do Cursor Inteligente: Alternar", + "122": "Modo do Cursor Inteligente: Segurar", + "123": "Barra de Progresso do Evento", + "124": "Desligado", + "125": "Cronometrado", + "126": "Ligado", + "127": "Estilo", + "128": "Prévia do Posicionamento Ligada", + "129": "Prévia do Posicionamento Desligada", + "12": "Um Jogador", + "130": "Montaria ", + "131": "Conquistas", + "132": "Sangue e Violência Ligados", + "133": "Sangue e Violência Desligados", + "134": "Aplicar", + "135": "Configurações de Servidor", + "136": "Multijogador no Steam: Desativado", + "137": "Multijogador no Steam: Ativado", + "138": "Usuários Permitidos: Apenas Convidados", + "139": "Usuários Permitidos: Amigos", + "13": "Multijogador", + "140": "Amigos Podem Convidar: Desligado", + "141": "Amigos Podem Convidar: Ligado", + "142": "Permitir Amigos de Amigos: Desligado", + "143": "Permitir Amigos de Amigos: Ligado", + "144": "Iniciar", + "145": "Entrar pelo Steam", + "146": "Entrar por IP", + "147": "Convidar Amigos", + "148": "Para Cima", + "149": "Para Baixo", + "14": "Configurações", + "150": "Esquerda", + "151": "Direita", + "152": "Pular", + "153": "Jogar Fora", + "154": "Inventário", + "155": "Prender", + "156": "Mana Rápida", + "157": "Bônus Rápido", + "158": "Montaria Rápida", + "159": "Cura Rápida", + "15": "Sair", + "160": "Selecionar Automaticamente", + "161": "Cursor Inteligente", + "162": "Utilizar Item", + "163": "Interagir", + "164": "Controles do Jogo", + "165": "Controles do Mapa", + "166": "Controles da Hotbar", + "167": "Configurações de Gamepad", + "168": "Aproximar", + "169": "Afastar", + "16": "Criar Personagem", + "170": "Aumentar Transparência", + "171": "Diminuir Transparência", + "172": "Alternar Estilo do Mapa", + "173": "Alternar Mapa Completo", + "174": "Alternar para a Esquerda", + "175": "Alternar para a Direita", + "176": "Hotbar #1", + "177": "Hotbar #2", + "178": "Hotbar #3", + "179": "Hotbar #4", + "17": "Excluir", + "180": "Hotbar #5", + "181": "Hotbar #6", + "182": "Hotbar #7", + "183": "Hotbar #8", + "184": "Hotbar #9", + "185": "Hotbar #10", + "186": "Marca Rápida #1", + "187": "Marca Rápida #2", + "188": "Marca Rápida #3", + "189": "Marca Rápida #4", + "18": "Cabelo", + "190": "Hotbar Radial", + "191": "Encaixe do Cursor para Cima", + "192": "Encaixe do Cursor para a Direita", + "193": "Encaixe do Cursor para Baixo", + "194": "Encaixe do Cursor para a Esquerda", + "195": "", + "196": "Encaixe do Cursor Direcional", + "197": "Hotbar Direcional", + "198": "Configurações Avançadas de Gamepad", + "199": "Deadzone dos Gatilhos", + "19": "Olhos", + "1": "Executado em versão ", + "200": "Deadzone dos Deslizadores", + "201": "Deadzone do Controle Esquerdo X", + "202": "Deadzone do Controle Esquerdo Y", + "203": "Deadzone do Controle Direito X", + "204": "Deadzone do Controle Direito Y", + "205": "Inverter Controle Esquerdo na Horizontal", + "206": "Inverter Controle Esquerdo na Vertical", + "207": "Inverter Controle Direito na Horizontal", + "208": "Inverter Controle Direito na Vertical", + "209": "Utilizar", + "20": "Pele", + "210": "Interface", + "211": "Senhas: Visível", + "212": "Senhas: Oculto", + "213": "Prioridade do Cursor Inteligente: Picareta -> Machado", + "214": "Prioridade do Cursor Inteligente: Machado -> Picareta", + "215": "Posicionamento de Blocos Inteligente: Para o Cursor", + "217": "Cor da Borda", + "218": "Cursor", + "219": "Controle", + "21": "Roupas", + "220": "Ativar Bônus Definido: Para Cima", + "221": "Ativar Bônus Definido: Para Baixo", + "222": "Definição de Teclas", + "223": "Descarte Rápido com Shift Esquerdo: Ativado", + "224": "Descarte Rápido com Shift Esquerdo: Desativado", + "225": "Substituição de Parede Rápida: Desativado", + "226": "Substituição de Parede Rápida: Ativado", + "227": "Tempo de Deslizamento da Hotbar para Radial: Ligado", + "228": "Tempo de Deslizamento da Hotbar para Radial: Desligado", + "229": "Grade de Blocos Ligada", + "22": "Masculino", + "230": "Grade de Blocos Desligada", + "231": "Trava Ligada", + "232": "Prioridade da Trava: Foco no Alvo", + "233": "Prioridade da Trava: Alvo Mais Próximo", + "234": "Prioridade da Trava: Linha Mais Livre", + "235": "abc / ABC / !@#", + "236": "Tecla Backspace", + "237": "Enviar", + "238": "Espaço", + "239": "<-", + "23": "Feminino", + "240": "->", + "241": "Instruções do Gamepad Desligadas", + "242": "Instruções do Gamepad Ligadas", + "243": "Controle do Menu", + "244": "Acesso Rápido Radial", + "245": "Janela sem Borda: Ativado", + "246": "Janela sem Borda: Desativado", + "247": "Frame Skip Desligado", + "248": "Frame Skip Ligado", + "249": "Frame Skip Sutil", + "24": "Hardcore", + "250": "Balanço do Minerador: Ativado", + "251": "Balanço do Minerador: Desativado", + "252": "Atraso de Movimentação da Interface", + "25": "Mediumcore", + "26": "Softcore", + "27": "Aleatório", + "28": "Criar", + "2": "Desconectar", + "32": "Selecione a dificuldade", + "33": "Camisa", + "34": "Camiseta de baixo", + "35": "Calças", + "36": "Sapatos", + "37": "Cabelo", + "38": "Cor do Cabelo", + "39": "Cor dos Olhos", + "3": "O Servidor Exige Senha:", + "40": "Cor da Pele", + "41": "Cor da Camiseta", + "42": "Cor da Camiseta de baixo", + "43": "Cor das Calças", + "44": "Cor do Sapato", + "45": "Digite o Nome do Personagem:", + "46": "Excluir", + "47": "Criar Mundo", + "48": "Digite o Nome do Mundo:", + "49": "Ativar Janela", + "4": "Aceitar", + "50": "Ativar Tela Cheia", + "51": "Resolução", + "52": "Parallax", + "53": "Frame Skip Desligado", + "54": "Frame Skip Ligado", + "55": "Iluminação: Colorida", + "56": "Iluminação: Branco", + "57": "Iluminação: Retrô", + "58": "Iluminação: Zoeira", + "59": "Qualidade: Automática", + "5": "Voltar", + "60": "Qualidade: Alta", + "61": "Qualidade: Média", + "62": "Qualidade: Baixa", + "63": "Vídeo", + "64": "Cor do Cursor", + "65": "Volume", + "66": "Controle", + "67": "Salvar Progresso Automaticamente Ligado", + "68": "Salvar Progresso Automaticamente Desigado", + "69": "Pausa Automática Ligada", + "6": "Cancelar", + "70": "Pausa Automática Desligada", + "71": "Descrição de Itens Ligada", + "72": "Descrição de Itens Desligada", + "73": "Resolução em Tela Cheia", + "74": "Para Cima ", + "75": "Para Baixo ", + "76": "Esquerda ", + "77": "Direita ", + "78": "Pular ", + "79": "Arremessar ", + "7": "Digite a Senha do Servidor:", + "80": "Inventário ", + "81": "Cura Rápida ", + "82": "Mana Rápida ", + "83": "Bônus Rápido ", + "84": "Prender ", + "85": "Selecionar Automaticamente ", + "86": "Redefinir Como o Padrão", + "87": "Entrar", + "88": "Criar e Jogar", + "89": "Insira o Endereço de IP do Servidor:", + "8": "Iniciando servidor...", + "90": "Insira a Porta do Servidor:", + "91": "Escolha o tamanho do mundo:", + "92": "Pequeno", + "93": "Médio", + "94": "Grande", + "95": "Vermelho:", + "96": "Verde:", + "97": "Azul:", + "98": "Som:", + "99": "Música:", + "9": "Falha no carregamento!", + "119": "Ambiente:" + }, + "LegacyTooltip": { + "0": "Equipado na entrada social", + "10": "Velocidade baixa", + "11": "Velocidade muito baixa", + "12": "Velocidade extremamente baixa", + "13": "Velocidade de lesma", + "14": "Sem recuos", + "15": "Recuo extremamente fraco", + "16": "Recuo muito fraco", + "17": "Recuo fraco", + "18": "Recuo normal", + "19": "Recuo forte", + "1": "Nenhuma estatística será alterada", + "20": "Recuo muito forte", + "21": "Recuo extremamente forte", + "22": "Recuo inacreditável", + "23": "Equipável", + "24": "Item decorativo", + "25": " defesa", + "26": "% de força da picareta", + "27": "% de força do machado", + "28": "% de força do martelo", + "29": "Restaurações", + "2": " danos por ataque físico", + "30": "vida", + "31": "mana", + "32": "Utilizações", + "33": "Pode ser posicionado", + "34": "Munição", + "35": "Consumível", + "36": "Material", + "37": " minuto(s) de duração", + "38": " segundo(s) de duração", + "39": "% de danos", + "3": " danos por ataque à distância", + "40": "% de velocidade", + "41": "% de chance de ataque crítico", + "42": "% de custo em mana", + "43": "% de tamanho", + "44": "% de velocidade", + "45": "% de recuo", + "46": "% de velocidade de movimentos", + "47": "% de velocidade em ataques físicos", + "48": "Bônus definido:", + "49": "Preço de venda:", + "4": " danos por magia", + "50": "Preço de compra:", + "51": "Sem valor", + "52": "Consome ", + "53": " dano por invocação", + "54": " alcance", + "55": " danos", + "56": "Marcado como favorito", + "57": "Descartar, empilhar e vender rapidamente serão bloqueados", + "58": " de danos por arremesso", + "59": "Isto foi amaldiçoado por uma poderosa criatura das Selvas.", + "5": "% de chance de ataque crítico", + "6": "Velocidade incrivelmente alta", + "7": "Velocidade muito alta", + "8": "Velocidade alta", + "9": "Velocidade média" + }, + "LegacyMultiplayer": { + "10": "Agora você está em um grupo!", + "11": "{0} ativou o JvJ!", + "12": "{0} desativou o JvJ!", + "13": "{0} não faz mais parte de um grupo.", + "14": "{0} juntou-se ao grupo vermelho.", + "15": "{0} juntou-se ao grupo verde.", + "16": "{0} juntou-se ao grupo azul.", + "17": "{0} juntou-se ao grupo amarelo.", + "18": "Boas-vindas a", + "19": "{0} entrou.", + "20": "{0} saiu.", + "21": "/jogadores", + "22": "{0} entrou no grupo cor-de-rosa.", + "2": "Operações inválidas neste estado.", + "3": "Você foi banido neste servidor.", + "4": "Você não está usando a mesma versão que o servidor.", + "5": "já está neste servidor.", + "6": "/jogando", + "7": "Jogadores no momento:", + "8": "/rolar", + "9": "rolou um", + "0": "Recebe:" + }, + "LegacyMisc": { + "0": "Um exército de goblins foi derrotado!", + "100": "Escolher mundo maléfico", + "101": "Corrupção", + "102": "Carmim", + "103": "Aleatório", + "10": "Você sente um calafrio terrível no corpo inteiro...", + "11": "Gritos ecoam ao seu redor...", + "12": "Seu mundo foi abençoado com o cobalto!", + "13": "Seu mundo foi abençoado com o mithril!", + "14": "Seu mundo foi abençoado com o adamantino!", + "15": "Os espíritos antigos da luz e das trevas foram libertados.", + "19": "{0} morreu...", + "1": "Um exército de goblins está se aproximando do oeste!", + "20": "Está acontecendo um eclipse solar!", + "21": "Seu mundo foi abençoado com o paládio!", + "22": "Seu mundo foi abençoado com o oricalco!", + "23": "Seu mundo foi abençoado com o titânio!", + "24": "Os piratas foram derrotados!", + "25": "Os piratas estão aproximando-se pelo oeste!", + "26": "Os piratas estão aproximando-se pelo leste!", + "27": "Os piratas chegaram!", + "28": "Você sente as vibrações das profundezas...", + "29": "Esta noite vai ser terrível...", + "2": "Um exército de goblins está se aproximando do leste!", + "30": "O ar está ficando mais frio ao seu redor...", + "31": "A lua de abóbora está subindo...", + "32": "A selva está cada vez mais inquieta...", + "33": "Gritos ecoam nas masmorras...", + "34": "A Lua Congelada está subindo...", + "35": "{0} partiu!", + "36": "{0} foi embora!", + "37": "Qualquer", + "38": "Placa de Pressão", + "39": " e maior regeneração da vida", + "3": "Um exército de goblins chegou!", + "40": "Aumenta a regeneração de vida", + "41": "Uma invasão de Marte!", + "42": "Os marcianos foram derrotados!", + "43": "Uma invasão de criaturas celestiais!", + "44": "Sua mente foi paralisada...", + "45": "Você foi tomado pela dor...", + "46": "Vozes de outro mundo acompanham você...", + "47": "O Senhor da Lua despertou!", + "48": "Os Gêmeos despertaram!", + "49": "Você acordou de um sonho estranho...", + "4": "A Legião de Gelo foi derrotada!", + "50": "foram derrotados!", + "51": "Fragmento da Lua", + "52": "A desgraça certa aproxima-se...", + "53": "Selecionar", + "54": "Pegar", + "55": "Pegar Um", + "56": "Fechar", + "57": "Prender", + "58": "Pular", + "59": "Alternar hotbar", + "5": "A Legião de Gelo está se aproximando do oeste!", + "60": "Atacar", + "61": "Construir", + "62": "Bebida", + "63": "Ação", + "64": "Alternar menu", + "65": "Lugar", + "66": "Alternar", + "67": "Equipar", + "68": "Remover", + "69": "Exibir bandeiras da sala", + "6": "A Legião de Gelo está se aproximando do leste!", + "70": "Conferir alojamento", + "71": "Criação de rápida", + "72": "Criar", + "73": "Selecionar", + "74": "Lixo", + "75": "Vender", + "76": "Transferir", + "77": "Exibir visual", + "78": "Ocultar visual", + "79": "Usar", + "7": "A Legião de Gelo chegou!", + "80": "Falar", + "81": "Ler", + "82": "Voltar", + "83": "Favorito", + "84": "Você não pode alterar equipes dentro dos blocos da sua equipe!", + "86": "Pato", + "87": "Borboleta", + "88": "Vagalume", + "89": "Opções de Cabeamento", + "8": "A Lua de Sangue está subindo...", + "90": "Comprar", + "91": "Comprar mais", + "92": "Vender", + "93": "Criar mais", + "94": "Tentar Remover", + "95": "Caracol", + "96": "Parece que ", + "97": " está dando uma festa", + "98": " estão dando uma festa", + "99": "A festa acabou!", + "9": "Você sente o olhar de uma presença maligna...", + "104": "Não pode ser usado sem Mana de Éter até que o Cristal de Eternia tenha sido defendido" + }, + "LegacyInterface": { + "0": "Vida:", + "100": "Número de criaturas", + "101": "Número de mortes", + "102": "Fase da Lua", + "103": "Velocidade de Movimentos", + "104": "Tesouro", + "105": "Criaturas Raras", + "106": "Saúde por Segundo", + "107": "Plantas Estranhas", + "108": "Abrir Mapa", + "109": "Fechar Mapa", + "10": "Defesa", + "110": "Abrir Pasta", + "111": "Capturar Imagem", + "112": "Primeiro você deve definir a moldura", + "113": "Disponível apenas em modo janela", + "114": "Disponível apenas se o mapa for ativado", + "115": "Modo de Câmera Desativado", + "116": "Destacar Itens Novos Desligado", + "117": "Destacar Itens Novos Ligado", + "118": "Aproximar", + "119": "Afastar", + "11": "Social", + "120": "Teleportar até aliado", + "121": "Largar Item", + "122": "Organizar Itens", + "123": "Clima Frio", + "12": "Elmo", + "13": "Camisa", + "14": "Calças", + "15": "platina", + "16": "ouro", + "17": "prata", + "18": "cobre", + "19": "Forjar novamente", + "1": "Respiração", + "20": "Coloque um item aqui para forjá-lo novamente", + "21": "Exibindo receitas que usem", + "22": "Objetos necessários:", + "23": "Nenhum", + "24": "Coloque um material aqui", + "25": "Criação", + "26": "Moedas", + "27": "Munição", + "28": "Loja", + "29": "Pegar Tudo", + "2": "Mana", + "30": "Depositar Tudo", + "31": "Pilha Rápida", + "32": "Porquinho", + "33": "Cofre", + "34": "Tempo", + "35": "Salvar e Sair", + "36": "Desconectar", + "37": "Itens", + "38": "Você morreu...", + "39": "Este alojamento é adequado.", + "3": "Lata de Lixo", + "40": "Este não é um alojamento adequado.", + "41": "Este alojamento já foi ocupado.", + "42": "Este alojamento está corrompido.", + "43": "A conexão expirou", + "44": "Recebendo dados sobre a peça", + "45": "Equipar", + "46": "Custo", + "47": "Salvar", + "48": "Editar", + "49": "Status", + "4": "Inventário", + "50": "Amaldiçoar", + "51": "Ajuda", + "52": "Fechar", + "53": "Água", + "54": "Curar", + "55": "Este alojamento não cumpre os requerimentos para um(a)", + "56": "Lava", + "57": "Tingir", + "58": "Mel", + "59": "Visível", + "5": "Hotbar desbloqueada", + "60": "Oculto", + "61": "Renomear", + "62": "Configurações", + "63": "Cancelar", + "64": "Missão", + "65": "Item da Missão", + "66": "Economias", + "67": "Capturar Imagem", + "68": "Configurações", + "69": "Fixar Moldura", + "6": "Hotbar bloqueada", + "70": "Definir Moldura", + "71": "Fechar", + "72": "Ligado", + "73": "Desligado", + "74": "Empacotamento de Imagem", + "75": "Capturar Entidades", + "76": "Capturar Cenário", + "77": "Seleção de Bioma", + "78": "Redefinir Moldura", + "79": "Equipamento", + "7": "Alojamento", + "80": "Alojamento", + "81": "Modo da Câmera", + "82": "Reabastecer", + "83": "Lua Congelada", + "84": "Lua de Abóbora", + "85": "Loucura de Marte", + "86": "Invasão Pirata", + "87": "Legião Congelada", + "88": "Exército Goblin", + "89": "Recolher", + "8": "Pesquisa de Casas", + "90": "Gancho com Corrente", + "91": "Montaria", + "92": "Animal de Estimação", + "93": "Vagoneta", + "94": "Animal Leve", + "95": "Tempo", + "96": "Clima", + "97": "Pescaria", + "98": "Posição", + "99": "Profundidade", + "9": "Acessório" + }, + "LegacyChestType": { + "0": "Baú", + "10": "Baú de Hera", + "12": "Baú de Madeira Viva", + "13": "Baú Celeste", + "14": "Baú de Madeira Escura", + "15": "Baú Coberto de Teias", + "16": "Baú Lagharto", + "17": "Baú d'água", + "18": "Baú da Selva", + "19": "Baú Corrompido", + "1": "Baú de Ouro", + "20": "Baú de Carmim", + "21": "Baú Consagrado", + "23": "Baú da Selva Bloqueado", + "24": "Baú Corrompido Bloqueado", + "25": "Baú de Carmim Bloqueado", + "26": "Baú Consagrado Bloqueado", + "28": "Baú da Dinastia", + "29": "Baú de Mel", + "2": "Baú de Ouro Bloqueado", + "30": "Baú Steampunk", + "31": "Baú de Madeira de Palmeira", + "32": "Baú de Cogumelo", + "33": "Baú de Madeira Boreal", + "34": "Baú de Geleia", + "35": "Baú de Calabouço Verde", + "36": "Baú de Calabouço Verde Bloqueado", + "37": "Baú de Calabouço Cor-de-rosa", + "38": "Baú de Calabouço Cor-de-rosa Bloqueado", + "39": "Baú de Calabouço Azul", + "3": "Baú das Sombras", + "40": "Baú de Calabouço Azul Bloqueado", + "41": "Baú de Osso", + "42": "Baú de Cacto", + "43": "Baú de Carne", + "44": "Baú de Obsidiana", + "45": "Baú de Abóbora", + "46": "Baú Assustador", + "47": "Baú de Vidro", + "48": "Baú de Marte", + "49": "Baú de Meteorito", + "4": "Baú das Sombras Bloqueado", + "50": "Baú de Granito", + "51": "Baú de Mármore", + "5": "Barril", + "6": "Lata de Lixo", + "7": "Baú de Madeira de Ébano", + "8": "Baú de Mogno", + "9": "Baú de Madeira Pérola" + }, + "LegacyDresserType": { + "0": "Cômoda", + "10": "Cômoda de Osso", + "11": "Cômoda de Cacto", + "12": "Cômoda Assustadora", + "13": "Cômoda Celeste", + "14": "Cômoda de Mel", + "15": "Cômoda de Lagharto", + "16": "Cômoda de Madeira de Palmeira", + "17": "Cômoda de Cogumelo", + "18": "Cômoda de Madeira Boreal", + "19": "Cômoda de Geleia", + "1": "Cômoda de Madeira de Ébano", + "20": "Cômoda de Abóbora", + "21": "Cômoda Steampunk", + "22": "Cômoda de Vidro", + "23": "Cômoda de Carne", + "24": "Cômoda de Marte", + "25": "Cômoda de Meteorito", + "26": "Cômoda de Granito", + "27": "Cômoda de Mármore", + "2": "Cômoda de Mogno", + "3": "Cômoda de Madeira Pérola", + "4": "Cômoda de Madeira Escura", + "5": "Cômoda de Calabouço Azul", + "6": "Cômoda de Calabouço Verde", + "7": "Cômoda de Calabouço Cor-de-rosa", + "8": "Cômoda Dourada", + "9": "Cômoda de Obsidiana", + "28": "{$ItemName.CrystalDresser}", + "29": "{$ItemName.DynastyDresser}", + "30": "{$ItemName.FrozenDresser}", + "31": "{$ItemName.LivingWoodDresser}", + "32": "{$ItemName.SpiderDresser}", + "33": "{$ItemName.LesionDresser}", + "34": "{$ItemName.SolarDresser}", + "35": "{$ItemName.VortexDresser}", + "36": "{$ItemName.NebulaDresser}", + "37": "{$ItemName.StardustDresser}", + "38": "{$ItemName.SandstoneDresser}", + "39": "{$ItemName.BambooDresser}" + }, + "LegacyChestType2": { + "1": "{$ItemName.GoldenChest}", + "0": "{$ItemName.CrystalChest}", + "2": "{$ItemName.SpiderChest}", + "3": "{$ItemName.LesionChest}", + "4": "{$ItemName.GoldChest}", + "5": "{$ItemName.SolarChest}", + "6": "{$ItemName.VortexChest}", + "7": "{$ItemName.NebulaChest}", + "8": "{$ItemName.StardustChest}", + "9": "{$ItemName.GolfChest}", + "10": "{$ItemName.DesertChest}", + "11": "{$ItemName.BambooChest}", + "12": "{$ItemName.DungeonDesertChest}" + } +} \ No newline at end of file diff --git a/Localization/Content/pt-BR/NPCs.json b/Localization/Content/pt-BR/NPCs.json new file mode 100644 index 0000000..7e8f2d2 --- /dev/null +++ b/Localization/Content/pt-BR/NPCs.json @@ -0,0 +1,582 @@ +{ + "NPCName": { + "BlueSlime": "Geleia Azul", + "GiantWormHead": "Verme Gigante", + "SeekerTail": "Alimentador de Mundos", + "Clinger": "Agarrador", + "AnglerFish": "Peixe-diabo", + "GreenJellyfish": "Água-viva Verde", + "Werewolf": "Lobisomem", + "BoundGoblin": "Goblin Amarrado", + "BoundWizard": "Mago Amarrado", + "GoblinTinkerer": "Inventor Goblin", + "Wizard": "Feiticeiro", + "Clown": "Palhaço", + "GiantWormBody": "Verme Gigante", + "SkeletonArcher": "Arqueiro Esqueleto", + "GoblinArcher": "Arqueiro Goblin", + "VileSpit": "Cusparada Infame", + "WallofFlesh": "Parede de Carne", + "WallofFleshEye": "Parede de Carne", + "TheHungry": "O Faminto", + "TheHungryII": "O Faminto", + "LeechHead": "Sanguessuga", + "LeechBody": "Sanguessuga", + "LeechTail": "Sanguessuga", + "GiantWormTail": "Verme Gigante", + "ChaosElemental": "Elemental do Caos", + "Slimer": "Geleia", + "Gastropod": "Gastrópode", + "BoundMechanic": "Mecânico Amarrado", + "Mechanic": "Mecânico", + "Retinazer": "Retinaser", + "Spazmatism": "Spazmatismo", + "SkeletronPrime": "Esqueletron Alfa", + "PrimeCannon": "Canhão Alfa", + "PrimeSaw": "Serra Alfa", + "EaterofWorldsHead": "Devorador de Mundos", + "PrimeVice": "Torno Alfa", + "PrimeLaser": "Laser Alfa", + "BaldZombie": "Zumbi", + "WanderingEye": "Olho Errante", + "TheDestroyer": "O Destruidor", + "TheDestroyerBody": "O Destruidor", + "TheDestroyerTail": "O Destruidor", + "IlluminantBat": "Morcego Luminoso", + "IlluminantSlime": "Geleia Luminosa", + "Probe": "Sonda", + "EaterofWorldsBody": "Devorador de Mundos", + "PossessedArmor": "Armadura Possuída", + "ToxicSludge": "Lama Tóxica", + "SantaClaus": "Papai Noel", + "SnowmanGangsta": "Boneco de Neve Mafioso", + "MisterStabby": "Senhor Facas", + "SnowBalla": "Malandro de Neve", + "IceSlime": "Geleia de Gelo", + "Penguin": "Pinguim", + "PenguinBlack": "Pinguim", + "EaterofWorldsTail": "Devorador de Mundos", + "IceBat": "Morcego de Gelo", + "Lavabat": "Morcego de Lava", + "GiantFlyingFox": "Raposa Voadora Gigante", + "GiantTortoise": "Tartaruga Gigante", + "IceTortoise": "Tartaruga de Gelo", + "Wolf": "Lobo", + "RedDevil": "Diabo Vermelho", + "Arapaima": "Arapaima", + "VampireBat": "Vampiro", + "Vampire": "Vampiro", + "MotherSlime": "Geleia Mãe", + "Truffle": "Trufa", + "Frankenstein": "Frankenstein", + "BlackRecluse": "Aranha Reclusa Negra", + "WallCreeper": "Aranha Trepadeira", + "WallCreeperWall": "Aranha Trepadeira", + "SwampThing": "Monstro do Pântano", + "UndeadViking": "Viking Zumbi", + "CorruptPenguin": "Pinguim Corrompido", + "IceElemental": "Elemental de Gelo", + "Merchant": "Comerciante", + "PigronCorruption": "Porco-dragão", + "PigronHallow": "Porco-dragão", + "RuneWizard": "Mago das Runas", + "Crimera": "Crimera", + "Herpling": "Herpling", + "AngryTrapper": "Planta Carnívora Furiosa", + "MossHornet": "Vespa de Musgo", + "Derpling": "Derpling", + "Steampunker": "Steampunker", + "CrimsonAxe": "Machado de Carmim", + "Nurse": "Enfermeira", + "PigronCrimson": "Porco-dragão", + "FaceMonster": "Monstro da Face", + "FloatyGross": "Nojento Flutuante", + "Crimslime": "Geleia de Carmim", + "SpikedIceSlime": "Geleia de Gelo com Espinhos", + "SnowFlinx": "Flinx de Neve", + "PincushionZombie": "Zumbi", + "SlimedZombie": "Zumbi", + "SwampZombie": "Zumbi", + "TwiggyZombie": "Zumbi", + "ArmsDealer": "Comerciante de Armas", + "CataractEye": "Olho Demoníaco", + "SleepyEye": "Olho Demoníaco", + "DialatedEye": "Olho Demoníaco", + "GreenEye": "Olho Demoníaco", + "PurpleEye": "Olho Demoníaco", + "LostGirl": "Garota Perdida", + "Nymph": "Ninfa", + "ArmoredViking": "Viking Armado", + "Lihzahrd": "Lagharto", + "LihzahrdCrawler": "Lagharto", + "DemonEye": "Olho Demoníaco", + "Dryad": "Dríade", + "FemaleZombie": "Zumbi", + "HeadacheSkeleton": "Esqueleto", + "MisassembledSkeleton": "Esqueleto", + "PantlessSkeleton": "Esqueleto", + "SpikedJungleSlime": "Geleia da Selva com Espinhos", + "Moth": "Mariposa", + "IcyMerman": "Tritão Gelado", + "DyeTrader": "Comerciante de Tinturas", + "PartyGirl": "Garota da Festa", + "Cyborg": "Ciborgue", + "Skeleton": "Esqueleto", + "Bee": "Abelha", + "BeeSmall": "Abelha", + "PirateDeckhand": "Marinheiro Pirata", + "PirateCorsair": "Corsário Pirata", + "PirateDeadeye": "Pirata Caolho", + "PirateCrossbower": "Pirata Atirador", + "PirateCaptain": "Capitão Pirata", + "CochinealBeetle": "Besouro da Cochonilha", + "CyanBeetle": "Besouro Ciano", + "LacBeetle": "Besouro da Laca", + "Guide": "Guia", + "SeaSnail": "Caracol do Mar", + "Squid": "Lula", + "QueenBee": "Abelha Rainha", + "ZombieRaincoat": "Zumbi com Capa de Chuva", + "FlyingFish": "Peixe Voador", + "UmbrellaSlime": "Geleia com Guarda-chuva", + "FlyingSnake": "Cobra Voadora", + "Painter": "Pintor", + "WitchDoctor": "Médico Bruxo", + "Pirate": "Pirata", + "MeteorHead": "Cabeça de Meteoro", + "GoldfishWalker": "Peixe-dourado", + "HornetFatty": "Vespa", + "HornetHoney": "Vespa", + "HornetLeafy": "Vespa", + "HornetSpikey": "Vespa", + "HornetStingy": "Vespa", + "JungleCreeper": "Aranha da Selva", + "JungleCreeperWall": "Aranha da Selva", + "BlackRecluseWall": "Aranha Reclusa Negra", + "BloodCrawler": "Aranha de Sangue", + "FireImp": "Demônio de Fogo", + "BloodCrawlerWall": "Aranha de Sangue", + "BloodFeeder": "Peixe de Sangue", + "BloodJelly": "Água-viva de Sangue", + "IceGolem": "Golem de Gelo", + "RainbowSlime": "Geleia do Arco-íris", + "Golem": "Golem", + "GolemHead": "Cabeça de Golem", + "GolemFistLeft": "Punho de Golem", + "GolemFistRight": "Punho de Golem", + "GolemHeadFree": "Cabeça de Golem", + "BurningSphere": "Esfera Ardente", + "AngryNimbus": "Nuvem com Raiva", + "Eyezor": "Zumbolho", + "Parrot": "Papagaio", + "Reaper": "Ceifador", + "ZombieMushroom": "Zumbi com Esporos", + "ZombieMushroomHat": "Zumbi com Esporos", + "FungoFish": "Fungo-peixe", + "AnomuraFungus": "Fungo Anomura", + "MushiLadybug": "Joaninha Azul", + "FungiBulb": "Bulbo de Fungos", + "GoblinPeon": "Peão Goblin", + "GiantFungiBulb": "Bulbo de Fungos Gigante", + "FungiSpore": "Esporo de Fungos", + "Plantera": "Plantera", + "PlanterasHook": "Gancho da Plantera", + "PlanterasTentacle": "Tentáculo da Plantera", + "Spore": "Esporo", + "BrainofCthulhu": "Cérebro de Cthulhu", + "Creeper": "Creeper", + "IchorSticker": "Adesivo de Ichor", + "RustyArmoredBonesAxe": "Ossos com Armadura Enferrujada", + "GoblinThief": "Ladrão Goblin", + "RustyArmoredBonesFlail": "Ossos com Armadura Enferrujada", + "RustyArmoredBonesSword": "Ossos com Armadura Enferrujada", + "RustyArmoredBonesSwordNoArmor": "Ossos com Armadura Enferrujada", + "BlueArmoredBones": "Ossos com Armadura Azul", + "BlueArmoredBonesMace": "Ossos com Armadura Azul", + "BlueArmoredBonesNoPants": "Ossos com Armadura Azul", + "BlueArmoredBonesSword": "Ossos com Armadura Azul", + "HellArmoredBones": "Ossos com Armadura Infernal", + "HellArmoredBonesSpikeShield": "Ossos com Armadura Infernal", + "HellArmoredBonesMace": "Ossos com Armadura Infernal", + "GoblinWarrior": "Guerreiro Goblin", + "HellArmoredBonesSword": "Ossos com Armadura Infernal", + "RaggedCaster": "Mago em Trapos", + "RaggedCasterOpenCoat": "Mago em Trapos", + "Necromancer": "Necromancer", + "NecromancerArmored": "Necromancer", + "DiabolistRed": "Satanista", + "DiabolistWhite": "Satanista", + "BoneLee": "Bone Lee", + "DungeonSpirit": "Espírito do Calabouço", + "GiantCursedSkull": "Caveira Gigante Amaldiçoada", + "GoblinSorcerer": "Feiticeiro Goblin", + "Paladin": "Paladino", + "SkeletonSniper": "Atirador Esqueleto", + "TacticalSkeleton": "Esqueleto Tático", + "SkeletonCommando": "Comando Esqueleto", + "AngryBonesBig": "Ossos Furiosos", + "AngryBonesBigMuscle": "Ossos Furiosos", + "AngryBonesBigHelmet": "Ossos Furiosos", + "BirdBlue": "Gaio-azul", + "BirdRed": "Cardeal", + "Squirrel": "Esquilo", + "Zombie": "Zumbi", + "ChaosBall": "Bola do Caos", + "Mouse": "Camundongo", + "Raven": "Corvo", + "SlimeMasked": "Geleia", + "BunnySlimed": "Coelhinho", + "HoppinJack": "Abóbora Saltitante", + "Scarecrow1": "Espantalho", + "Scarecrow2": "Espantalho", + "Scarecrow3": "Espantalho", + "Scarecrow4": "Espantalho", + "Scarecrow5": "Espantalho", + "AngryBones": "Ossos Furiosos", + "Scarecrow6": "Espantalho", + "Scarecrow7": "Espantalho", + "Scarecrow8": "Espantalho", + "Scarecrow9": "Espantalho", + "Scarecrow10": "Espantalho", + "HeadlessHorseman": "Cavaleiro sem Cabeça", + "Ghost": "Fantasma", + "DemonEyeOwl": "Olho Demoníaco", + "DemonEyeSpaceship": "Olho Demoníaco", + "ZombieDoctor": "Zumbi", + "DarkCaster": "Mago das Trevas", + "ZombieSuperman": "Zumbi", + "ZombiePixie": "Zumbi", + "SkeletonTopHat": "Esqueleto", + "SkeletonAstonaut": "Esqueleto", + "SkeletonAlien": "Esqueleto", + "MourningWood": "Árvore da Morte", + "Splinterling": "Galho Vivo", + "Pumpking": "Reibóbora", + "PumpkingBlade": "Reibóbora", + "Hellhound": "Cão do Inferno", + "WaterSphere": "Esfera d'água", + "Poltergeist": "Assombração", + "ZombieXmas": "Zumbi", + "ZombieSweater": "Zumbi", + "SlimeRibbonWhite": "Geleia", + "SlimeRibbonYellow": "Geleia", + "SlimeRibbonGreen": "Geleia", + "SlimeRibbonRed": "Geleia", + "BunnyXmas": "Coelhinho", + "ZombieElf": "Elfo Zumbi", + "ZombieElfBeard": "Elfo Zumbi", + "CursedSkull": "Caveira Amaldiçoada", + "ZombieElfGirl": "Elfo Zumbi", + "PresentMimic": "Presente Falso", + "GingerbreadMan": "Boneco de Gengibre", + "Yeti": "Yeti", + "Everscream": "Everscream", + "IceQueen": "Rainha do Gelo", + "SantaNK1": "Papai-Noel-NK1", + "ElfCopter": "Elf-icóptero", + "Nutcracker": "Quebra-nozes", + "NutcrackerSpinning": "Quebra-nozes", + "SkeletronHead": "Esqueletron", + "ElfArcher": "Arqueiro Elfo", + "Krampus": "Krampus", + "Flocko": "Flocko", + "Stylist": "Cabeleireira", + "WebbedStylist": "Cabeleireira nas Teias", + "Firefly": "Vagalume", + "Butterfly": "Borboleta", + "Worm": "Verme", + "LightningBug": "Inseto Relâmpago", + "Snail": "Caracol", + "SkeletronHand": "Esqueletron", + "GlowingSnail": "Lesma Brilhante", + "Frog": "Sapo", + "Duck": "Pato", + "Duck2": "Pato", + "DuckWhite": "Pato", + "DuckWhite2": "Pato", + "ScorpionBlack": "Escorpião", + "Scorpion": "Escorpião", + "TravellingMerchant": "Caixeiro-viajante", + "Angler": "Pescador", + "OldMan": "Velho", + "DukeFishron": "Duque Peixe-dragão", + "DetonatingBubble": "Bolha Explosiva", + "Sharkron": "Tubarão-dragão", + "Sharkron2": "Tubarão-dragão", + "TruffleWorm": "Verme da Trufa", + "TruffleWormDigger": "Verme da Trufa", + "SleepingAngler": "Pescador Adormecido", + "Grasshopper": "Gafanhoto", + "ChatteringTeethBomb": "Bomba de Dentes Falsos", + "Demolitionist": "Especialista em Demolição", + "BrainScrambler": "Embaralhador de Cérebros", + "RayGunner": "Atirador de Raios", + "MartianOfficer": "Oficial de Marte", + "ForceBubble": "Escudo de Bolhas", + "GrayGrunt": "Soldado Cinza", + "MartianEngineer": "Engenheiro de Marte", + "MartianTurret": "Torreão Tesla", + "MartianDrone": "Drone de Marte", + "GigaZapper": "Gigaelétrico", + "BoneSerpentHead": "Serpente de Ossos", + "ScutlixRider": "Atirador no Scutlix", + "Scutlix": "Scutlix", + "EyeofCthulhu": "Olho de Cthulhu", + "BoneSerpentBody": "Serpente de Ossos", + "BoneSerpentTail": "Serpente de Ossos", + "SolarCrawltipedeHead": "Centopeia-Lacraia", + "SolarCrawltipedeBody": "Centopeia-Lacraia", + "SolarCrawltipedeTail": "Centopeia-Lacraia", + "SolarDrakomire": "Dragão de Lava", + "SolarDrakomireRider": "Cavaleiro do Dragão de Lava", + "SolarSroller": "Sroller", + "SolarCorite": "Corite", + "SolarSolenian": "Seleniano", + "Hornet": "Vespa", + "ManEater": "Devorador de Homens", + "ArmedZombie": "Zumbi", + "ArmedZombiePincussion": "Zumbi", + "ArmedZombieSlimed": "Zumbi", + "ArmedZombieSwamp": "Zumbi", + "ArmedZombieTwiggy": "Zumbi", + "ArmedZombieCenx": "Zumbi", + "UndeadMiner": "Minerador Zumbi", + "GoldBird": "Pássaro de Ouro", + "GoldBunny": "Coelhinho de Ouro", + "GoldButterfly": "Borboleta de Ouro", + "GoldFrog": "Sapo de Ouro", + "GoldGrasshopper": "Gafanhoto de Ouro", + "GoldMouse": "Camundongo de Ouro", + "GoldWorm": "Verme de Ouro", + "BoneThrowingSkeleton": "Esqueleto", + "Tim": "Tim", + "BoneThrowingSkeleton2": "Esqueleto", + "BoneThrowingSkeleton3": "Esqueleto", + "BoneThrowingSkeleton4": "Esqueleto", + "Bunny": "Coelhinho", + "CorruptBunny": "Coelhinho Corrompido", + "Harpy": "Harpia", + "CaveBat": "Morcego de Caverna", + "ServantofCthulhu": "Servo de Cthulhu", + "KingSlime": "Geleia Rei", + "JungleBat": "Morcego da Selva", + "DoctorBones": "Doutor Bones", + "TheGroom": "O Noivo", + "Clothier": "Alfaiate", + "Goldfish": "Peixe-dourado", + "Snatcher": "Agarrador", + "CorruptGoldfish": "Peixe-dourado Corrompido", + "Piranha": "Piranha", + "LavaSlime": "Geleia de Lava", + "EaterofSouls": "Devorador de Almas", + "Hellbat": "Morcego Infernal", + "Vulture": "Abutre", + "Demon": "Demônio", + "BlueJellyfish": "Água-viva Azul", + "PinkJellyfish": "Água-viva Cor-de-rosa", + "Shark": "Tubarão", + "VoodooDemon": "Demônio Vodu", + "Crab": "Caranguejo", + "DungeonGuardian": "Guardião do Calabouço", + "Antlion": "Formiga-leão", + "DevourerHead": "Devorador", + "SpikeBall": "Bola com Espinhos", + "DungeonSlime": "Geleia do Calabouço", + "BlazingWheel": "Roda Flamejante", + "GoblinScout": "Batedor Goblin", + "Bird": "Pássaro", + "Pixie": "Pixie", + "ArmoredSkeleton": "Esqueleto com Armadura", + "Mummy": "Múmia", + "DarkMummy": "Múmia das Trevas", + "DevourerBody": "Devorador", + "LightMummy": "Múmia de Luz", + "CorruptSlime": "Geleia Corrompida", + "Wraith": "Assombração", + "CursedHammer": "Martelo Amaldiçoado", + "EnchantedSword": "Espada Encantada", + "Mimic": "Mímico", + "Unicorn": "Unicórnio", + "WyvernHead": "Serpe", + "WyvernLegs": "Serpe", + "WyvernBody": "Serpe", + "DevourerTail": "Devorador", + "WyvernBody2": "Serpe", + "WyvernBody3": "Serpe", + "WyvernTail": "Serpe", + "GiantBat": "Morcego Gigante", + "Corruptor": "Corruptor", + "DiggerHead": "Cavador", + "DiggerBody": "Cavador", + "DiggerTail": "Cavador", + "SeekerHead": "Alimentador de Mundos", + "SeekerBody": "Alimentador de Mundos", + "AncientCultistSquidhead": "Visão Antiga", + "AncientDoom": "Desgraça Antiga", + "AncientLight": "Luz Antiga", + "BigMimicCorruption": "Mímico Corrompido", + "BigMimicCrimson": "Mímico de Carmim", + "BigMimicHallow": "Mímico Consagrado", + "BigMimicJungle": "Mímico da Selva", + "BloodZombie": "Zumbi Sangrento", + "Buggy": "Insetinho", + "Butcher": "Açougueiro", + "Crawdad": "Caranguejo-Pai", + "Crawdad2": "Caranguejo-Pai", + "CreatureFromTheDeep": "Criatura das Profundezas", + "CrimsonPenguin": "Pinguim Terrível", + "CultistBoss": "Cultista Lunático", + "CultistBossClone": "Cultista Lunático", + "CultistDragonBody1": "Dragão Fantasma", + "CultistDragonBody2": "Dragão Fantasma", + "CultistDragonBody3": "Dragão Fantasma", + "CultistDragonBody4": "Dragão Fantasma", + "CultistDragonHead": "Dragão Fantasma", + "CultistDragonTail": "Dragão Fantasma", + "CultistTablet": "Placa Misteriosa", + "DD2AttackerTest": "???", + "DD2GoblinT3": "{$NPCName.DD2GoblinT1}", + "DD2GoblinBomberT3": "{$NPCName.DD2GoblinBomberT1}", + "DD2JavelinstT2": "{$NPCName.DD2JavelinstT1}", + "DD2JavelinstT3": "{$NPCName.DD2JavelinstT1}", + "DD2LanePortal": "Portal Misterioso", + "DD2GoblinT2": "{$NPCName.DD2GoblinT1}", + "DeadlySphere": "Esfera Mortal", + "DemonTaxCollector": "Alma Torturada", + "DesertBeast": "Basilisco", + "DesertDjinn": "Espírito do Deserto", + "DesertGhoul": "Ghoul", + "DesertGhoulCorruption": "Ghoul Terrível", + "DesertGhoulCrimson": "Ghoul Marcado", + "DesertGhoulHallow": "Ghoul Sonhador", + "DesertLamiaDark": "Cauda de Lâmia", + "DesertLamiaLight": "Cauda de Lâmia", + "DesertScorpionWalk": "Caçador de Areia", + "DesertScorpionWall": "Caçador de Areia", + "Drippler": "Drippler", + "DrManFly": "Dr. Homem-Mosca", + "DuneSplicerBody": "Verme Maldito", + "DuneSplicerHead": "Verme Maldito", + "DuneSplicerTail": "Verme Maldito", + "EnchantedNightcrawler": "Nightcrawler Encantado", + "GiantFlyingAntlion": "Formiga-leão Voadora", + "Fritz": "Fritz", + "GiantShelly": "Shelly Gigante", + "GiantShelly2": "Shelly Gigante", + "GoblinSummoner": "Invocador Goblin", + "GraniteFlyer": "Elemental de Granito", + "GraniteGolem": "Golem de Granito", + "GreekSkeleton": "Hoplite", + "Grubby": "Larvinha", + "LunarTowerNebula": "Coluna de Nébula", + "LunarTowerSolar": "Coluna do Sol", + "LunarTowerStardust": "Coluna de Pó das Estrelas", + "LunarTowerVortex": "Coluna do Vórtice", + "MartianProbe": "Sonda de Marte", + "MartianSaucer": "Disco Voador de Marte", + "MartianSaucerCannon": "Canhão do Disco Voador de Marte", + "MartianSaucerCore": "Disco Voador de Marte", + "MartianSaucerTurret": "Torreão do Disco Voador de Marte", + "MartianWalker": "Andarilho de Marte", + "Medusa": "Medusa", + "MoonLordCore": "Núcleo do Senhor da Lua", + "MoonLordHand": "Mão do Senhor da Lua", + "MoonLordHead": "Senhor da Lua", + "Mothron": "Mothron", + "MothronEgg": "Ovo de Mothron", + "MothronSpawn": "Filhote de Mothron", + "Nailhead": "Cabeça de Pregos", + "NebulaBeast": "Fera da Evolução", + "NebulaBrain": "Flutuador de Nébula", + "NebulaHeadcrab": "Sugador de Cérebros", + "NebulaSoldier": "Vidente", + "PartyBunny": "Coelhinho", + "Psycho": "Psicopata", + "Salamander": "Salamandra", + "Salamander2": "Salamandra", + "Salamander3": "Salamandra", + "Salamander4": "Salamandra", + "Salamander5": "Salamandra", + "Salamander6": "Salamandra", + "Salamander7": "Salamandra", + "Salamander8": "Salamandra", + "Salamander9": "Salamandra", + "SandElemental": "Elemental de Areia", + "SandShark": "Tubarão de Areia", + "SandsharkCorrupt": "Mordedor de Ossos", + "SandsharkCrimson": "Ladrão de Carne", + "SandsharkHallow": "Moedor de Cristal", + "SandSlime": "Geleia de Areia", + "SlimeSpiked": "Geleia com Espinhos", + "Sluggy": "Lesminha", + "SolarFlare": "Chamas do Sol", + "SolarGoop": "Fragmento do Sol", + "SolarSpearman": "Draconiano", + "SquirrelGold": "Esquilo de Ouro", + "SquirrelRed": "Esquilo Vermelho", + "StardustCellBig": "Célula de Estrelas", + "StardustCellSmall": "Célula de Estrelas", + "StardustJellyfishBig": "Invasor de Fluxo", + "StardustSoldier": "Observador das Estrelas", + "StardustSpiderBig": "Criador de Brilhos", + "StardustSpiderSmall": "Brilho", + "StardustWormHead": "Explorador da Via-Láctea", + "TargetDummy": "Boneco para Treinamento", + "TaxCollector": "Cobrador de Impostos", + "TheBride": "A Noiva", + "ThePossessed": "O Possuído", + "TombCrawlerBody": "Verme das Covas", + "TombCrawlerHead": "Verme das Covas", + "TombCrawlerTail": "Verme das Covas", + "Tumbleweed": "Galhos Furiosos", + "VortexHornet": "Vespa Alienígena", + "VortexHornetQueen": "Rainha Vespa", + "VortexLarva": "Larva Alienígena", + "VortexRifleman": "Mergulhador da Tempestade", + "VortexSoldier": "Filho do Vórtice", + "GiantWalkingAntlion": "Formiga-leão Corredora", + "DD2GoblinBomberT2": "{$NPCName.DD2GoblinBomberT1}", + "DD2WyvernT3": "{$NPCName.DD2WyvernT1}", + "DD2WyvernT2": "{$NPCName.DD2WyvernT1}", + "DD2OgreT3": "{$NPCName.DD2OgreT2}", + "DD2WitherBeastT3": "{$NPCName.DD2WitherBeastT2}", + "DD2SkeletonT3": "{$NPCName.DD2SkeletonT1}", + "DD2KoboldWalkerT3": "{$NPCName.DD2KoboldWalkerT2}", + "DD2DrakinT3": "{$NPCName.DD2DrakinT2}", + "DD2DarkMageT3": "{$NPCName.DD2DarkMageT1}", + "DD2KoboldFlyerT3": "{$NPCName.DD2KoboldFlyerT2}", + "BabySlime": "Bebê de Geleia", + "BigRainZombie": "Zumbi", + "BlackSlime": "Geleia preta", + "DD2Bartender": "Taberneiro", + "DD2Betsy": "Betsy", + "DD2DarkMageT1": "Mago Sombrio", + "DD2DrakinT2": "Drakin", + "DD2EterniaCrystal": "Cristal de Eternia", + "DD2GoblinBomberT1": "Bombardeiro Goblin de Éter", + "DD2GoblinT1": "Goblin de Éter", + "DD2JavelinstT1": "Lançador de Dardos de Éter", + "DD2KoboldFlyerT2": "Kobold Voador", + "DD2KoboldWalkerT2": "Kobold", + "DD2LightningBugT3": "Inseto Relâmpago de Éter", + "DD2OgreT2": "Ogro", + "DD2SkeletonT1": "Esqueleto do Ancião", + "DD2WitherBeastT2": "Fera Definhada", + "DD2WyvernT1": "Serpe de Éter", + "GreenSlime": "Geleia verde", + "JungleSlime": "Geleia da selva", + "Pinky": "Rosado", + "PurpleSlime": "Geleia roxa", + "RedSlime": "Geleia vermelha", + "Slimeling": "Geleinha", + "Slimer2": "Geleia", + "SmallRainZombie": "Zumbi", + "YellowSlime": "Geleia amarela", + "MoonLordFreeEye": "Verdadeiro Olho de Cthulhu", + "MoonLordLeechBlob": "Coágulo do Sanguessuga da Lua", + "SkeletonMerchant": "Comerciante Esqueleto", + "PirateShip": "Holandês Voador", + "PirateShipCannon": "Canhão do Holandês", + "BartenderUnconscious": "Homem Inconsciente" + } +} \ No newline at end of file diff --git a/Localization/Content/pt-BR/Projectiles.json b/Localization/Content/pt-BR/Projectiles.json new file mode 100644 index 0000000..14e0e13 --- /dev/null +++ b/Localization/Content/pt-BR/Projectiles.json @@ -0,0 +1,722 @@ +{ + "ProjectileName": { + "AdamantiteChainsaw": "Serra-elétrica de Adamantino", + "AdamantiteDrill": "Furadeira de Adamantino", + "AdamantiteGlaive": "Gládio de Adamantino", + "Amarok": "Ioiô", + "AmberBolt": "Raio de Âmbar", + "AmethystBolt": "Raio Ametista", + "Anchor": "Âncora", + "AncientDoomProjectile": "Fim da Profecia", + "AntiGravityHook": "Gancho Antigravitacional", + "Arkhalis": "Arkhalis", + "AshBallFalling": "Bola de Cinzas", + "BabyDino": "Filhote de Dinossauro", + "BabyEater": "Devorador de Bebês", + "BabyFaceMonster": "Monstro Cara de Bebê", + "BabyGrinch": "Filhote de Grinch", + "BabyHornet": "Filhote de Vespa", + "BabySkeletronHead": "Cabeça de Esqueletron Bebê", + "BabySlime": "Bebê de Geleia", + "BabySnowman": "Filhote de Boneco de Neve", + "BabySpider": "Filhote de Aranha", + "BallofFire": "Bola de Fogo", + "BallofFrost": "Bola Congelada", + "BallOHurt": "Bola de Dor", + "Bananarang": "Bananarangue", + "Bat": "Morcego", + "BatHook": "Gancho de Morcego", + "BeachBall": "Bola de Praia", + "Bee": "Abelha", + "BeeArrow": "Flecha de Abelha", + "BeeHive": "Colmeia", + "Beenade": "Granada de Abelhas", + "BlackBolt": "Detonador de Ônix", + "BlackCat": "Gato Preto", + "BlackCounterweight": "Contrapeso", + "Blizzard": "Nevasca", + "BloodCloudMoving": "Nuvem de Sangue", + "BloodCloudRaining": "Nuvem de Sangue", + "BloodRain": "Chuva de Sangue", + "BloodWater": "Água de Sangue", + "BloodyMachete": "Machadinha Sangrenta", + "BlowupSmoke": "Fumaça de Explosão", + "BlowupSmokeMoonlord": "Fumaça de Explosão", + "BlueCounterweight": "Contrapeso", + "BlueFairy": "Fada Azul", + "BlueFlare": "Chama Azul", + "BlueMoon": "Lua Azul", + "BobberFiberglass": "Isca Flutuante", + "BobberFisherOfSouls": "Isca Flutuante", + "BobberFleshcatcher": "Isca Flutuante", + "BobberGolden": "Isca Flutuante", + "BobberHotline": "Isca Flutuante", + "BobberMechanics": "Isca Flutuante", + "BobberReinforced": "Isca Flutuante", + "BobbersittingDuck": "Isca Flutuante", + "BobberWooden": "Isca Flutuante", + "Bomb": "Bomba", + "BombFish": "Peixe Bomba", + "BombSkeletronPrime": "Bomba", + "Bone": "Osso", + "BoneArrow": "Flecha de Osso", + "BoneArrowFromMerchant": "Flecha de Osso", + "BoneDagger": "Adaga de Osso", + "BoneGloveProj": "XBOsso", + "BoneJavelin": "Lança de Osso", + "Boulder": "Rochedo", + "BoulderStaffOfEarth": "Rochedo", + "BouncyBomb": "Bomba Saltitante", + "BouncyDynamite": "Dinamite Saltitante", + "BouncyGlowstick": "Bastão Luminoso Saltitante", + "BouncyGrenade": "Granada Saltitante", + "BoxingGlove": "Luva de Boxe", + "BrainOfConfusion": "Cérebro da Confusão", + "BrainScramblerBolt": "Raio Embaralhador de Cérebro", + "Bubble": "Bolha", + "Bullet": "Projétil", + "BulletDeadeye": "Projétil", + "BulletHighVelocity": "Projétil", + "BulletSnowman": "Projétil", + "Bunny": "Coelhinho", + "ButchersChainsaw": "Serra-elétrica do Açougueiro", + "CandyCaneHook": "Gancho de Doce", + "CandyCorn": "Doces", + "CannonballFriendly": "Bala de Canhão", + "CannonballHostile": "Bala de Canhão", + "Cascade": "Ioiô", + "ChainGuillotine": "Guilhotina com Corrente", + "ChainKnife": "Faca com Corrente", + "ChargedBlasterCannon": "Canhão Detonador Carregado", + "ChargedBlasterLaser": "Laser Detonador Carregado", + "ChargedBlasterOrb": "Esfera Detonadora Carregada", + "Chik": "Ioiô", + "ChlorophyteArrow": "Flecha de Clorofita", + "ChlorophyteBullet": "Projétil", + "ChlorophyteChainsaw": "Serra-elétrica de Clorofita", + "ChlorophyteDrill": "Furadeira de Clorofita", + "ChlorophyteJackhammer": "Britadeira de Clorofita", + "ChlorophyteOrb": "Esfera de Clorofita", + "ChlorophytePartisan": "Partisan de Clorofita", + "ChristmasHook": "Gancho de Natal", + "ClingerStaff": "Chamas Amaldiçoadas", + "ClothiersCurse": "Caveira", + "CobaltChainsaw": "Barra de Mithril", + "CobaltDrill": "Serra elétrica de Mithril", + "CobaltNaginata": "Naginata de Cobalto", + "Code1": "Ioiô", + "Code2": "Ioiô", + "CoinPortal": "Portal de Moedas", + "CompanionCube": "Cubo Companheiro", + "ConfettiGun": "Confetes", + "ConfettiMelee": "Confetes", + "CopperCoin": "Moeda de Cobre", + "CopperCoinsFalling": "Moedas de Cobre", + "CorruptSpray": "Jato Corrompido", + "CorruptYoyo": "Ioiô", + "CrimsandBallFalling": "Bola de Areia Vermelha", + "CrimsandBallGun": "Bola de Areia Vermelha", + "CrimsonHeart": "Coração de Carmesim", + "CrimsonSpray": "Jato de Carmesim", + "CrimsonYoyo": "Ioiô", + "CrossGraveMarker": "Lápide", + "CrystalBullet": "Projétil de Cristal", + "CrystalDart": "Dardo de Cristal", + "CrystalLeaf": "Folha de Cristal", + "CrystalLeafShot": "Folha de Cristal", + "CrystalPulse": "Carga de Cristal", + "CrystalPulse2": "Carga de Cristal", + "CrystalShard": "Fragmento de Cristal", + "CrystalStorm": "Tempestade de Cristal", + "CrystalVileShardHead": "Fragmento de Cristal Infame", + "CrystalVileShardShaft": "Fragmento de Cristal Infame", + "Cthulunado": "Cthulunado", + "CultistBossFireBall": "Bola de Fogo", + "CultistBossFireBallClone": "Bola de Fogo de Sombra", + "CultistBossIceMist": "Névoa de Gelo", + "CultistBossLightningOrb": "Esfera Relâmpago", + "CultistBossLightningOrbArc": "Arco de Esfera Relâmpago", + "CultistBossParticle": "Energia", + "CultistRitual": "Ritual do Relâmpago", + "CursedArrow": "Flecha Amaldiçoada", + "CursedBullet": "Projétil Amaldiçoada", + "CursedDart": "Dardo Amaldiçoado", + "CursedDartFlame": "Chama Amaldiçoada", + "CursedFlameFriendly": "Chama Amaldiçoada", + "CursedFlameHostile": "Chama Amaldiçoada", + "CursedSapling": "Plantinha Amaldiçoada", + "DangerousSpider": "Aranha Perigosa", + "DarkLance": "Lança das Trevas", + "Daybreak": "Nascer do Sol", + "DD2FlameBurstTowerT1": "Torre das Chamas Explosivas", + "DD2FlameBurstTowerT1Shot": "Torre das Chamas Explosivas", + "DD2FlameBurstTowerT2": "Torre das Chamas Explosivas", + "DD2FlameBurstTowerT2Shot": "Torre das Chamas Explosivas", + "DD2FlameBurstTowerT3": "Torre das Chamas Explosivas", + "DD2FlameBurstTowerT3Shot": "Torre das Chamas Explosivas", + "DD2JavelinHostile": "Lança", + "DeadlySphere": "Esfera Mortal", + "DeathLaser": "Laser da Morte", + "DeathSickle": "Foice da Morte", + "DemonScythe": "Gadanha Demoníaca", + "DemonSickle": "Foice Demoníaca", + "DesertDjinnCurse": "Maldição do Espírito do Deserto", + "DiamondBolt": "Raio Diamante", + "DirtBall": "Bola de Terra", + "DrillMountCrosshair": "Mira da Furadeira", + "DrManFlyFlask": "Frasco", + "DryadsWardCircle": "Proteção da Dríade", + "DualHookBlue": "Gancho", + "DualHookRed": "Gancho", + "Dynamite": "Dinamite", + "EatersBite": "Mordida do Devorador", + "EbonsandBallFalling": "Alabarda de Mithril", + "EbonsandBallGun": "Alabarda de Mithril", + "EighthNote": "Nota", + "Electrosphere": "Eletroesfera", + "ElectrosphereMissile": "Míssil de Eletroesfera", + "EmeraldBolt": "Raio Esmeralda", + "EnchantedBeam": "Feixe Encantado", + "EnchantedBoomerang": "Bumerangue Encantado", + "ExplosiveBullet": "Projétil Explosiva", + "ExplosiveBunny": "Coelhinho Explosivo", + "Explosives": "Explosivos", + "EyeBeam": "Feixe de Olhos", + "EyeFire": "Fogo dos Olhos", + "EyeLaser": "Laser dos Olhos", + "EyeSpring": "Olho com Mola", + "FallingStar": "Estrela Cadente", + "FireArrow": "Flecha de Fogo", + "Fireball": "Bola de Fogo", + "FireworkFountainBlue": "Fonte de Fogos de Artifício", + "FireworkFountainRainbow": "Fonte de Fogos de Artifício", + "FireworkFountainRed": "Fonte de Fogos de Artifício", + "FireworkFountainYellow": "Fonte de Fogos de Artifício", + "FishHook": "Anzol para Peixes", + "Flairon": "Mangual-Dragão", + "FlaironBubble": "Bolha do Mangual-Dragão", + "Flamarang": "Bumerangue Flamejante", + "Flamelash": "Chicote Flamejante", + "Flames": "Chamas", + "FlamesTrap": "Chamas", + "FlamethrowerTrap": "Lança-Chamas", + "FlamingArrow": "Flecha Flamejante", + "FlamingJack": "Abóbora Flamejante", + "FlamingScythe": "Foice em Chamas", + "FlamingWood": "Madeira em Chamas", + "Flare": "Sinalizador", + "FlowerPetal": "Pétala", + "FlowerPow": "Poder das Flores", + "FlowerPowPetal": "Poder das Flores", + "FlyingImp": "Demônio Voador", + "FlyingKnife": "Faca Voadora", + "FlyingPiggyBank": "Porquinho Voador", + "FormatC": "Ioiô", + "FoulPotion": "Poção Terrível", + "FrostArrow": "Flecha Congelada", + "FrostBeam": "Feixe Congelado", + "FrostBlastFriendly": "Explosão Congelante", + "FrostBlastHostile": "Explosão Congelante", + "FrostBoltStaff": "Raio Congelado", + "FrostBoltSword": "Raio Congelado", + "FrostburnArrow": "Flecha de Queimadura de Gelo", + "FrostDaggerfish": "Peixe-Adaga Congelado", + "FrostHydra": "Hidra Congelada", + "FrostShard": "Estilhaço Congelado", + "FrostWave": "Onda de Gelo", + "FruitcakeChakram": "Chakram com Frutas Cristalizadas", + "GemHookAmethyst": "Gancho de Pedras Preciosas", + "GemHookDiamond": "Gancho de Pedras Preciosas", + "GemHookEmerald": "Gancho de Pedras Preciosas", + "GemHookRuby": "Gancho de Pedras Preciosas", + "GemHookSapphire": "Gancho de Pedras Preciosas", + "GemHookTopaz": "Gancho de Pedras Preciosas", + "GeyserTrap": "Gêiser", + "GiantBee": "Abelha", + "GigaZapperSpear": "Ponta-de-Lança Gigaelétrica", + "Glowstick": "Bastão Luminoso", + "GoldCoin": "Moeda de Ouro", + "GoldCoinsFalling": "Moedas de Ouro", + "GoldenBullet": "Projétil Dourado", + "GoldenShowerFriendly": "Chuveiro Dourado", + "GoldenShowerHostile": "Chuveiro Dourado", + "GolemFist": "Punho de Golem", + "Gradient": "Ioiô", + "GraveMarker": "Lápide", + "Gravestone": "Lápide", + "GreekFire1": "Fogo Grego", + "GreekFire2": "Fogo Grego", + "GreekFire3": "Fogo Grego", + "GreenCounterweight": "Contrapeso", + "GreenFairy": "Fada Cor-de-rosa", + "GreenLaser": "Laser Verde", + "Grenade": "Granada", + "GrenadeI": "Granada", + "GrenadeII": "Granada", + "GrenadeIII": "Granada", + "GrenadeIV": "Granada", + "Gungnir": "Gungnir", + "HallowSpray": "Jato Consagrado", + "HallowStar": "Estrela Consagrada", + "Hamdrax": "Hamdrax", + "HappyBomb": "Bomba Feliz", + "Harpoon": "Arpão", + "HarpyFeather": "Pena de Harpia", + "Headstone": "Lápide", + "HeatRay": "Raio de Calor", + "HelFire": "Ioiô", + "HellfireArrow": "Flecha do Inferno", + "Hellwing": "Asa do Inferno", + "HolyArrow": "Flecha Consagrada", + "HolyWater": "Água Benta", + "Hook": "Gancho", + "Hornet": "Vespa", + "HornetStinger": "Ferroada de Vespa", + "IceBlock": "Bloco de Gelo", + "IceBolt": "Raio de Gelo", + "IceBoomerang": "Bumerangue de Gelo", + "IceSickle": "Foice de Gelo", + "IceSpike": "Espeto de Gelo", + "IcewaterSpit": "Cusparada de Água Gelada", + "IchorArrow": "Flecha de Ichor", + "IchorBullet": "Projétil de Ichor", + "IchorDart": "Dardo de Ichor", + "IchorSplash": "Respingo de Ichor", + "IlluminantHook": "Gancho", + "ImpFireball": "Bola de Fogo de Demônio", + "InfernoFriendlyBlast": "Inferno", + "InfernoFriendlyBolt": "Inferno", + "InfernoHostileBlast": "Inferno", + "InfernoHostileBolt": "Inferno", + "InfluxWaver": "Ondulador de Fluxo", + "IvyWhip": "Chicote de Hera", + "JackOLantern": "Abóbora do Dia das Bruxas", + "JavelinFriendly": "Lança", + "JavelinHostile": "Lança", + "JestersArrow": "Flecha do Jester", + "JumperSpider": "Aranha Saltitante", + "JungleSpike": "Espeto da Selva", + "JungleYoyo": "Ioiô", + "Kraken": "Ioiô", + "Landmine": "Mina Terrestre", + "LaserDrill": "Furadeira Laser", + "LaserMachinegun": "Metralhadora Laser", + "LaserMachinegunLaser": "Laser", + "LastPrism": "Último Prisma", + "LastPrismLaser": "Último Prisma", + "Leaf": "Folha", + "LightBeam": "Feixe de Luz", + "LightDisc": "Disco de Luz", + "LostSoulFriendly": "Alma Perdida", + "LostSoulHostile": "Alma Perdida", + "LovePotion": "Poção do Amor", + "LunarFlare": "Chamas da Lua", + "LunarHookNebula": "Gancho da Lua", + "LunarHookSolar": "Gancho da Lua", + "LunarHookStardust": "Gancho da Lua", + "LunarHookVortex": "Gancho da Lua", + "MagicDagger": "Adaga Mágica", + "MagicLantern": "Lanterna Mágica", + "MagicMissile": "Míssil Mágico", + "MagnetSphereBall": "Esfera Magnética", + "MagnetSphereBolt": "Esfera Magnética", + "MartianTurretBolt": "Raio Elétrico", + "MartianWalkerLaser": "Raio Laser", + "MechanicalPiranha": "Piranha Mecânica", + "MechanicWrench": "Ferramenta do Mecânico", + "MedusaHead": "Raio da Medusa", + "MedusaHeadRay": "Raio da Medusa", + "Meowmere": "Espada-Gato", + "Meteor1": "Meteoro", + "Meteor2": "Meteoro", + "Meteor3": "Meteoro", + "MeteorShot": "Tiro de Meteoros", + "MinecartMechLaser": "Laser da Vagoneta", + "MiniMinotaur": "Mini-Minotauro", + "MiniRetinaLaser": "Mini-Laser Retina", + "MiniSharkron": "Mini Tubarão-Dragão", + "Missile": "Míssil", + "MolotovCocktail": "Coquetel Molotov", + "MolotovFire": "Fogo Molotov", + "MolotovFire2": "Fogo Molotov", + "MolotovFire3": "Fogo Molotov", + "MoonLeech": "Sanguessuga da Lua", + "MoonlordArrow": "Flecha de Luminita", + "MoonlordArrowTrail": "Flecha de Luminita", + "MoonlordBullet": "Projétil de Luminita", + "MoonlordTurret": "Portal da Lua", + "MoonlordTurretLaser": "Laser do Portal da Lua", + "MudBall": "Bola de Lama", + "Mushroom": "Cogumelo", + "MushroomSpear": "Lança de Cogumelos", + "MushroomSpray": "Jato de Cogumelos", + "MythrilChainsaw": "Serra elétrica de Mithril", + "MythrilDrill": "Furadeira de Mithril", + "MythrilHalberd": "Alabarda de Mithril", + "Nail": "Prego", + "NailFriendly": "Prego", + "NanoBullet": "Nano-Projétil", + "NebulaArcanum": "Arcano de Nébula", + "NebulaArcanumExplosionShot": "Arcano de Nébula", + "NebulaArcanumExplosionShotShard": "Arcano de Nébula", + "NebulaArcanumSubshot": "Arcano de Nébula", + "NebulaBlaze1": "Chama de Nébula", + "NebulaBlaze2": "Chama de Nébula X", + "NebulaBolt": "Perfuratriz de Nébula", + "NebulaChainsaw": "Serra-elétrica de Nébula", + "NebulaDrill": "Furadeira de Nébula", + "NebulaEye": "Olho de Nébula", + "NebulaLaser": "Laser de Nébula", + "NebulaSphere": "Esfera de Nébula", + "NettleBurstEnd": "Explosão de Urtiga", + "NettleBurstLeft": "Explosão de Urtiga", + "NettleBurstRight": "Explosão de Urtiga", + "NightBeam": "Feixe da Noite", + "None": "", + "NorthPoleSnowflake": "Polo Norte", + "NorthPoleSpear": "Polo Norte", + "NorthPoleWeapon": "Polo Norte", + "NurseSyringeHeal": "Seringa", + "NurseSyringeHurt": "Seringa", + "Obelisk": "Lápide", + "ObsidianSwordfish": "Peixe-Espada de Obsidiana", + "OneEyedPirate": "Pirata de Um Olho Só", + "OrichalcumChainsaw": "Serra Elétrica de Oricalco", + "OrichalcumDrill": "Furadeira de Oricalco", + "OrichalcumHalberd": "Alabarda de Oricalco", + "OrnamentFriendly": "Ornamento", + "OrnamentHostile": "Ornamento", + "OrnamentHostileShrapnel": "Ornamento", + "PainterPaintball": "Paintball", + "PaladinsHammerFriendly": "Martelo do Paladino", + "PaladinsHammerHostile": "Martelo do Paladino", + "PalladiumChainsaw": "Serra Elétrica de Paládio", + "PalladiumDrill": "Furadeira de Paládio", + "PalladiumPike": "Pique de Paládio", + "Parrot": "Papagaio", + "PartyBullet": "Projétil de Festa", + "PartyGirlGrenade": "Granada de Confetes", + "PearlSandBallFalling": "Bola de Areia Pérola", + "PearlSandBallGun": "Bola de Areia Pérola", + "Penguin": "Pinguim", + "PetLizard": "Lagarto de Estimação", + "Phantasm": "Fantasma", + "PhantasmalBolt": "Raio Fantasmagórico", + "PhantasmalDeathray": "Raio da Morte Fantasmagórico", + "PhantasmalEye": "Olho Fantasmagórico", + "PhantasmalSphere": "Esfera Fantasmagórica", + "PhantasmArrow": "Fantasma", + "PhasicWarpDisc": "", + "PhasicWarpEjector": "", + "PineNeedleFriendly": "Agulha de Pinheiro", + "PineNeedleHostile": "Agulha de Pinheiro", + "PinkFairy": "Fada Cor-de-rosa", + "PinkLaser": "Laser Cor-de-rosa", + "PirateCaptain": "Capitão Pirata", + "PlatinumCoin": "Moeda de Platina", + "PlatinumCoinsFalling": "Moedas de Platina", + "PoisonDart": "Dardo Envenenado", + "PoisonDartBlowgun": "Dardo Envenenado", + "PoisonDartTrap": "Dardo Envenenado", + "PoisonedKnife": "Faca Envenenada", + "PoisonFang": "Presa Envenenada", + "PoisonSeedPlantera": "Semente Envenenada", + "PortalGun": "Pistola do Portal", + "PortalGunBolt": "Raio do Portal", + "PortalGunGate": "Entrada do Portal", + "PossessedHatchet": "Machadinha Possuída", + "Present": "Presente", + "ProximityMineI": "Minas de Proximidade", + "ProximityMineII": "Minas de Proximidade", + "ProximityMineIII": "Minas de Proximidade", + "ProximityMineIV": "Minas de Proximidade", + "PulseBolt": "Raio de Pulso", + "Puppy": "Cachorrinho", + "PureSpray": "Jato Puro", + "PurificationPowder": "Pó Purificador", + "PurpleCounterweight": "Contrapeso", + "PurpleLaser": "Laser Roxo", + "Pygmy": "Pigmeu", + "Pygmy2": "Pigmeu", + "Pygmy3": "Pigmeu", + "Pygmy4": "Pigmeu", + "PygmySpear": "Pigmeu", + "QuarterNote": "Nota", + "RainbowBack": "Arco-íris", + "RainbowCrystal": "Cristal Arco-íris", + "RainbowCrystalExplosion": "Explosão Arco-íris", + "RainbowFront": "Arco-íris", + "RainbowRodBullet": "Arco-íris", + "RainCloudMoving": "Nuvem de Chuva", + "RainCloudRaining": "Nuvem de Chuva", + "RainFriendly": "Chuva", + "RainNimbus": "Chuva", + "Rally": "Ioiô", + "Raven": "Corvo", + "RayGunnerLaser": "Raio Laser", + "RedCounterweight": "Contrapeso", + "RedsYoyo": "Ioiô", + "Retanimini": "Retanimini", + "RichGravestone1": "Lápide", + "RichGravestone2": "Lápide", + "RichGravestone3": "Lápide", + "RichGravestone4": "Lápide", + "RichGravestone5": "Lápide", + "RocketFireworkBlue": "Foguete", + "RocketFireworkGreen": "Foguete", + "RocketFireworkRed": "Foguete", + "RocketFireworksBoxBlue": "Foguete", + "RocketFireworksBoxGreen": "Foguete", + "RocketFireworksBoxRed": "Foguete", + "RocketFireworksBoxYellow": "Foguete", + "RocketFireworkYellow": "Foguete", + "RocketI": "Foguete", + "RocketII": "Foguete", + "RocketIII": "Foguete", + "RocketIV": "Foguete", + "RocketSkeleton": "Foguete", + "RocketSnowmanI": "Foguete", + "RocketSnowmanII": "Foguete", + "RocketSnowmanIII": "Foguete", + "RocketSnowmanIV": "Foguete", + "RopeCoil": "Rolo de Corda", + "RottenEgg": "Ovo Podre", + "RubyBolt": "Raio Rubi", + "RuneBlast": "Explosão de Runas", + "SalamanderSpit": "Cusparada de Veneno", + "SandBallFalling": "Bola de Areia", + "SandBallGun": "Bola de Areia", + "SandnadoFriendly": "Tempestade Antiga", + "SandnadoHostile": "Tempestade Antiga", + "SandnadoHostileMark": "Tempestade Antiga", + "SantaBombs": "Decoração de Natal", + "Sapling": "Muda", + "SapphireBolt": "Raio Safira", + "SaucerDeathray": "Raio da Morte de Marte", + "SaucerLaser": "Laser do Disco Voador", + "SaucerMissile": "Foguete de Marte", + "SaucerScrap": "Sucata de Disco Voador", + "SawtoothShark": "Tubarão de Dentes Serrados", + "ScutlixLaser": "Laser", + "ScutlixLaserCrosshair": "Mira do Scutlix", + "ScutlixLaserFriendly": "Laser do Scutlix", + "Seed": "Semente", + "SeedlerNut": "Espada Espinho", + "SeedlerThorn": "Espada Espinho", + "SeedPlantera": "Semente", + "ShadowBeamFriendly": "Feixe das Sombras", + "ShadowBeamHostile": "Feixe das Sombras", + "ShadowFlame": "Chamas das Sombras", + "ShadowFlameArrow": "Flecha das Chamas das Sombras", + "ShadowFlameKnife": "Faca das Chamas das Sombras", + "Shadowflames": "Chamas das Sombras", + "ShadowOrb": "Esfera das Sombras", + "Sharknado": "Tornado de Tubarões", + "SharknadoBolt": "Raio do Tornado de Tubarões", + "Shuriken": "Estrela Ninja", + "SilkRopeCoil": "Rolo de Corda", + "SiltBall": "Bola de Lodo", + "SilverCoin": "Moeda de Prata", + "SilverCoinsFalling": "Moedas de Prata", + "SkeletonBone": "Osso", + "SkeletronHand": "Mão de Esqueletron", + "Skull": "Caveira", + "SkyFracture": "Fratura do Céu", + "SlimeGun": "Arma de Geleia", + "SlimeHook": "Gancho de Geleia", + "SlushBall": "Bola de Lama com Neve", + "SmokeBomb": "Bomba de Fumaça", + "SniperBullet": "Projétil do Atirador", + "SnowBallFriendly": "Bola de Neve", + "SnowBallHostile": "Bola de Neve", + "SolarCounter": "Resplendor Solar", + "SolarFlareChainsaw": "Serra-elétrica das Chamas do Sol", + "SolarFlareDrill": "Furadeira das Chamas do Sol", + "SolarFlareRay": "Chamas do Sol", + "SolarWhipSword": "Erupção Solar", + "SolarWhipSwordExplosion": "Erupção Solar", + "SoulDrain": "Drenagem da Alma", + "SoulscourgePirate": "Pirata Atormentador de Almas", + "Spark": "Faísca", + "Spazmamini": "Spazmamini", + "Spear": "Lança", + "SpearTrap": "Lança", + "SpectreWrath": "Ira do Espectro", + "SpelunkerGlowstick": "Bastão Luminoso do Espeleólogo", + "Spider": "Aranha", + "SpiderEgg": "Ovo de Aranha", + "SpiderHiver": "Torreão Aranha", + "Spike": "Espinho", + "SpikedSlimeSpike": "Lança da Geleia", + "SpikyBall": "Bola com Espinhos", + "SpikyBallTrap": "Bola com Espinhos", + "SpiritFlame": "Chamas Espirituais", + "SpiritHeal": "Cura Espiritual", + "SporeCloud": "Nuvem de Esporos", + "SporeGas": "Esporo", + "SporeGas2": "Esporo", + "SporeGas3": "Esporo", + "SporeTrap": "Esporo", + "SporeTrap2": "Esporo", + "Squashling": "Abóbora", + "Stake": "Estaca", + "StarAnise": "Estrela Anise", + "StardustCellMinion": "Célula de Pó das Estrelas", + "StardustCellMinionShot": "Célula de Pó das Estrelas", + "StardustChainsaw": "Serra-elétrica de Pó das Estrelas", + "StardustDragon1": "Dragão de Pó das Estrelas", + "StardustDragon2": "Dragão de Pó das Estrelas", + "StardustDragon3": "Dragão de Pó das Estrelas", + "StardustDragon4": "Dragão de Pó das Estrelas", + "StardustDrill": "Furadeira de Pó das Estrelas", + "StardustGuardian": "Guardião de Pó das Estrelas", + "StardustGuardianExplosion": "Explosão das Estrelas", + "StardustJellyfishSmall": "Invasor de Fluxo", + "StardustSoldierLaser": "Laser de Pó das Estrelas", + "StardustTowerMark": "Marca das Estrelas", + "Starfury": "Fúria das Estrelas", + "StarWrath": "Ira das Estrelas", + "StaticHook": "Gancho Estático", + "StickyBomb": "Bomba Adesiva", + "StickyDynamite": "Dinamite Adesiva", + "StickyGlowstick": "Bastão Luminoso Adesivo", + "StickyGrenade": "Granada Adesiva", + "Stinger": "Ferroada", + "Stynger": "Ferroada", + "StyngerShrapnel": "Ferroada", + "Sunfury": "Fúria do Sol", + "SuspiciousTentacle": "Tentáculo Suspeito", + "SwordBeam": "Feixe de Espada", + "Swordfish": "Peixe-Espada", + "Tempest": "Tempestade", + "TendonHook": "Gancho", + "TerraBeam": "Feixe da Terra", + "Terrarian": "Terrariano", + "TerrarianBeam": "Terrariano", + "TheDaoofPow": "Corrente de Dao", + "TheEyeOfCthulhu": "Ioiô", + "TheMeatball": "A Almôndega", + "TheRottedFork": "O Garfo Podre", + "ThornBall": "Bola com Espinhos", + "ThornChakram": "Chakram com Espinhos", + "ThornHook": "Gancho", + "ThrowingKnife": "Faca de Arremessar", + "TiedEighthNote": "Nota", + "TikiSpirit": "Espírito Tiki", + "TinyEater": "Pequeno Devorador", + "TitaniumChainsaw": "Serra-elétrica de Titânio", + "TitaniumDrill": "Furadeira de Titânio", + "TitaniumTrident": "Tridente de Titânio", + "Tombstone": "Lápide", + "TopazBolt": "Raio Topázio", + "TowerDamageBolt": "Energia Liberada", + "ToxicBubble": "Bolha Tóxica", + "ToxicCloud": "Nuvem Tóxica", + "ToxicCloud2": "Nuvem Tóxica", + "ToxicCloud3": "Nuvem Tóxica", + "ToxicFlask": "Frasco Tóxico", + "TrackHook": "Gancho de Trilho", + "Trident": "Tridente", + "Truffle": "Trufa", + "TruffleSpore": "Esporo da Trufa", + "Turtle": "Tartaruga", + "Twinkle": "Brilho", + "Typhoon": "Tufão", + "UFOLaser": "Raio do OVNI", + "UFOMinion": "OVNI", + "UnholyArrow": "Flecha Profana", + "UnholyTridentFriendly": "Tridente Profano", + "UnholyTridentHostile": "Tridente Profano", + "UnholyWater": "Água Profana", + "ValkyrieYoyo": "Ioiô", + "Valor": "Ioiô", + "VampireHeal": "Cura do Vampiro", + "VampireKnife": "Faca do Vampiro", + "VenomArrow": "Flecha com Veneno", + "VenomBullet": "Projétil com Veneno", + "VenomFang": "Presa com Veneno", + "VenomSpider": "Aranha Venenosa", + "ViciousPowder": "Pó Terrível", + "VilePowder": "Pó Infame", + "VilethornBase": "Espinho Infame", + "VilethornTip": "Espinho Infame", + "VineRopeCoil": "Rolo de Vinha", + "VortexAcid": "Meleca Alienígena", + "VortexBeater": "Espingarda do Vórtice", + "VortexBeaterRocket": "Foguete do Vórtice", + "VortexChainsaw": "Serra-elétrica do Vórtice", + "VortexDrill": "Furadeira do Vórtice", + "VortexLaser": "Laser do Vórtice", + "VortexLightning": "Relâmpago do Vórtice", + "VortexVortexLightning": "Vórtice", + "VortexVortexPortal": "Vórtice", + "Wasp": "Vespa", + "WaterBolt": "Raio d'água", + "WaterGun": "Arma d'água", + "WaterStream": "Fio d'água", + "Web": "Teia", + "WebRopeCoil": "Rolo de Corda", + "WebSpit": "Cusparada de Teia", + "WireKite": "Kit de Cabos", + "Wisp": "Luz Fantasma", + "WoodenArrowFriendly": "Flecha de Madeira", + "WoodenArrowHostile": "Flecha de Madeira", + "WoodenBoomerang": "Bumerangue de Madeira", + "WoodHook": "Gancho de Madeira", + "WoodYoyo": "Ioiô", + "WormHook": "Gancho", + "Xenopopper": "Xenopopper", + "Yelets": "Ioiô", + "YellowCounterweight": "Contrapeso", + "ZephyrFish": "Peixe do Zéfiro", + "Ale": "Cerveja", + "ApprenticeStaffT3Shot": "Ira de Betsy", + "BookStaffShot": "Tomo da Sabedoria Infinita", + "DD2ApprenticeStorm": "Redemoinho da Sabedoria Infinita", + "DD2BallistraProj": "Balista", + "DD2BallistraTowerT1": "Balista", + "DD2BallistraTowerT2": "Balista", + "DD2BallistraTowerT3": "Balista", + "DD2BetsyArrow": "Maldição Aérea", + "DD2BetsyFireball": "Bola de Fogo de Betsy", + "DD2BetsyFlameBreath": "Sopro de Betsy", + "DD2DarkMageBolt": "Energia Sombria", + "DD2DarkMageHeal": "Símbolo Sombrio", + "DD2DarkMageRaise": "Símbolo Sombrio", + "DD2DrakinShot": "Drakin", + "DD2ElderWins": "Triste Fim", + "DD2ExplosiveTrapT1": "Armadilha Explosiva", + "DD2ExplosiveTrapT1Explosion": "Armadilha Explosiva", + "DD2ExplosiveTrapT2": "Armadilha Explosiva", + "DD2ExplosiveTrapT2Explosion": "Armadilha Explosiva", + "DD2ExplosiveTrapT3": "Armadilha Explosiva", + "DD2ExplosiveTrapT3Explosion": "Armadilha Explosiva", + "DD2GoblinBomb": "Bomba dos Goblins", + "DD2LightningAuraT1": "Aura de Relâmpagos", + "DD2LightningAuraT2": "Aura de Relâmpagos", + "DD2LightningAuraT3": "Aura de Relâmpagos", + "DD2LightningBugZap": "Raio da Definha", + "DD2OgreSmash": "Pisada do Ogro", + "DD2OgreSpit": "Cusparada do Ogro", + "DD2OgreStomp": "Pisada do Ogro", + "DD2PetDragon": "Coleciodragão", + "DD2PetGato": "Gato de Hélices", + "DD2PetGhost": "Velinha", + "DD2PhoenixBow": "Fantasma da Fênix", + "DD2PhoenixBowShot": "Fantasma da Fênix", + "DD2SquireSonicBoom": "Corte Poderoso", + "DD2Win": "Vitória!", + "MonkStaffT1": "Octopod Sonolento", + "MonkStaffT1Explosion": "Golpe com Vara", + "MonkStaffT2": "Gládio Terrível", + "MonkStaffT2Ghast": "Phantasma", + "MonkStaffT3": "Fúria do Dragão Celeste", + "MonkStaffT3_Alt": "Fúria do Dragão Celeste", + "MonkStaffT3_AltShot": "Fúria do Dragão Celeste", + "DD2JavelinHostileT3": "{$ProjectileName.DD2JavelinHostile}", + "Celeb2Rocket": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketExplosive": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketLarge": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketLargeExplosive": "{$ProjectileName.Celeb2Weapon}" + } +} \ No newline at end of file diff --git a/Localization/Content/pt-BR/Town.json b/Localization/Content/pt-BR/Town.json new file mode 100644 index 0000000..4428ad1 --- /dev/null +++ b/Localization/Content/pt-BR/Town.json @@ -0,0 +1,228 @@ +{ + "DryadSpecialText": { + "WorldStatusAll": "{0} é {1}% consagrado, {2}% corrompido, e {3}% carmesim.", + "WorldStatusHallowCorrupt": "{0} é {1}% consagrado e {2}% corrompido.", + "WorldDescriptionGrim": "A situação não está nada boa...", + "WorldDescriptionWork": "Você tem muito trabalho a fazer.", + "WorldDescriptionClose": "Você está tão perto!", + "WorldStatusHallowCrimson": "{0} é {1}% consagrado e {2}% carmesim.", + "WorldStatusCorruptCrimson": "{0} é {1}% corrompido e {2}% carmesim.", + "WorldStatusCorrupt": "{0} é {1}% corrompido.", + "WorldStatusCrimson": "{0} é {1}% carmesim.", + "WorldStatusHallow": "{0} é {1}% consagrado.", + "WorldStatusPure": "{0} é completamente puro. Você fez um trabalho incrível!", + "WorldDescriptionBalanced": "O mundo está equilibrado.", + "WorldDescriptionFairyTale": "Estamos vivendo em um conto de fadas.", + "Party": "Pensei em dar uma festa para comemorar nossas vitórias do passado, e as que ainda estão por vir.", + "AfterDD2Tier1": "Quando eu estive em Etheria, senti uma distância tão grande de {WorldName}. É bom estar de volta.", + "AfterDD2Tier2": "Quando estive em Etheria, a corrupção tentou me levar, mas ao invés disso, usei seu poder contra o Exército do Ancião!" + }, + "DyeTraderSpecialText": { + "HasPlant_0": "Brilhante! Você me trouxe uma amostra perfeita das mais lindas cores e aromes do mundo. Em troca, você pode pegar esta garrafa de tinta especial.", + "HasPlant_1": "Você vai trazer uma flor linda e rara... certo? Leve esta garrafa de tinta especial como pagamento, colega!", + "HasPlant_2": "Fantabuloso, incrível colega! Com esta espécie delicada, poderei misturar as tintas mais incríveis que {WorldName} já viu! Você pode levar essa agora mesmo!", + "NoPlant_0": "Ah, não, não, essa não serve. Para isso, dinheiro não adianta, você tem que voltar com uma espécie de planta rara!", + "NoPlant_1": "Você acha que consegue enganar o {DyeTrader}? Acho que não! Eu só aceito as flores mais raras em troca por estas garrafas especiais!", + "NoPlant_2": "Estas garrafas de tinta? Desculpe, colega, por elas, não aceito moedas. Eu só aceito as plantas mais preciosas em troca por elas!", + "Party": "Eu adoro festas, com cores lindas e pessoas felizes." + }, + "GuideSpecialText": { + "Party": "Você nunca foi a uma festa antes? Talvez seja bom conferir com os outros. Às vezes as pessoas fazem favores especiais para festas." + }, + "MerchantSpecialText": { + "Party": "Sabe como você pode aproveitar uma festa ao máximo? Comprando coisas para outras pessoas, especificamente para mim." + }, + "GoblinTinkererSpecialText": { + "Party": "Festas de goblins não muito parecidas com festas de humanos. As duas tem brincadeiras, tipo \"Coloca a Culpa no Humano\", digo... Eu não brinco disso nas minhas festas." + }, + "WitchDoctorSpecialText": { + "Party": "Eu queria ver como seu povo comemora, não estou decepcionado.", + "AfterDD2Tier1": "Sinto uma certa sincronia com os Magos Sombrios de Etheria. Uma pena que eles são nossos inimigos, eu gostaria muito de aprender com eles." + }, + "ClothierSpecialText": { + "Party": "Mamãe sempre dizia que você tem que deixar o passado para trás antes de começar uma festa." + }, + "TravellingMerchantSpecialText": { + "Party": "Dizem que as festão são a fonte das memórias mais valiosas. Então compre algo e torne essa uma memória valiosa!" + }, + "MechanicSpecialText": { + "Party": "Você acha que alguém se importaria se eu usasse lâmpadas ao invés de velas em um bolo?" + }, + "BartenderSpecialText": { + "AfterDD2Tier1": "Bom trabalho na batalha contra o Exército do Ancião! Mas eu tenho certeza que esse não foi o seu fim, eles não se esforçaram muito dessa vez.", + "AfterDD2Tier2": "O Exército do Ancião não para de ficar mais forte, mas você continua detendo-os! Mas algo me diz que eles ainda não desistiram.", + "AfterDD2Tier3": "Você conseguiu mesmo derrotar o Exército do Ancião? Talvez devesse visitar Etheria algum dia.", + "BeforeDD2Tier1": "Nós deveríamos fazer alguma coisa sobre o Exército do Ancião. Pergunte-me sobre o Cristal de Eternia se quiser mais informações.", + "FirstHelp": "Primeiramente, aceite algumas dessas Medalhas do Defensor, não precisa pagar! Tenho algumas defesas especiais que você pode comprar, mas só com Medalhas do Defensor!", + "FirstMeeting": "Hã? Como cheguei aqui? Minha última lembrança é de ver um portal abrindo na minha frente..." + }, + "PartyGirlSpecialText": { + "Party_1": "Mmm? Nada de especial hoje... brincadeira! Está na hora da festa, e então será hora da festa depois da festa!", + "Party_2": "Finalmente, chegou a minha hora!", + "AfterDD2Tier1": "Você já viu um ogro? Eu quero dar uma volta em um deles!" + }, + "PirateSpecialText": { + "Party": "Depois de todo esse bolo, talvez você precise me chamar de Barba Branca por algum tempo." + }, + "TruffleSpecialText": { + "Party": "Eu teria convidado todo mundo para a festa lá em casa, mas não temos cogumelos." + }, + "NurseSpecialText": { + "Party": "Não, eu não vou contar a você o número de velas no meu bolo." + }, + "WizardSpecialText": { + "Party": "Minhas festas são, claramente, as mais mágicas.", + "AfterDD2Tier1": "Sabe, acho que já vi um portal assim antes, mas era feito de ouro." + }, + "CyborgSpecialText": { + "Party": "Esta festa vai ser loucura completa!" + }, + "DemolitionistSpecialText": { + "Party": "Talvez seja melhor tomar cuidado hoje. Nós, anões, damos umas festas bem explosivas.", + "AfterDD2Start": "Por quê nós não simplesmente explodimos esses portais?" + }, + "ArmsDealerSpecialText": { + "Party": "Festas são ótimas para fazer as pessoas saírem de sua zona de conforto, igual às armas de fogo." + }, + "StylistSpecialText": { + "Party": "Eu posso ter arrumado meu cabelo para hoje, mas honestamente, só quero estourar os balões com minha tesoura." + }, + "PainterSpecialText": { + "Party": "Tentei fazer uma batalha de paintball, mas as pessoas queriam comida e decoração." + }, + "AnglerSpecialText": { + "Party": "O quê? Você acha que eu gosto de festas porque sou criança? Bem, você está certo, vamos começar a festa!" + }, + "AnglerQuestText": { + "NoQuest_1": "Eu não tenho nada para você fazer agora.", + "NoQuest_2": "Você já me divertiu o bastante por hoje, vá embora.", + "NoQuest_3": "Você acabou, o grande {Angler} rejeitou você!", + "NoQuest_4": "Só um peixe por dia, por favor, vá embora!", + "NoQuest_5": "Eu nem sequer usei o último peixe que você me deu. Não preciso de outro.", + "TurnIn_1": "Oh! Obrigado pelo peixe que eu pedi. Agora dê o fora!", + "TurnIn_2": "Belo peixe! Está tudo indo de acordo com o plano! He he he!", + "TurnIn_3": "Você é um ótimo burro de carga! Agora vá embora!", + "TurnIn_4": "Muahahahahaha! Você conseguiu! Mas ainda está inteiro, que chato!", + "TurnIn_5": "Uau!? Você fez mesmo o que eu pedi, e sobreviveu! Legal, agora entrega aqui e dá o fora!", + "Quest_Batfish": "Na na na na na na na Bat-PEIXE! Ou seja, vá cavar no submundo, pegue ele e traga-o para mim!\n\n(Capturado no Submundo e nas Cavernas)", + "Quest_BumblebeeTuna": "As selvas subterrâneas de {WorldName} têm as coisas mais esquisitas! Tipo um peixe que eu vi outro dia que parecia um abelhão gigante! Eu tenho alergia a abelhas, então você tem que pegá-lo para mim! Aposto que tem gosto de sanduíche de atum com mel!\n\n(Capturado no Mel)", + "Quest_Catfish": "Finalmente encontrei um gato selvagem que gosta de água! Acho que deve ser porque ele é parte peixe. Eu não sei por que isso aconteceu, nem quero saber. Eu só quero ele nas minhas mãos, e rápido!\n\n(Capturado na Superfície da Selva)", + "Quest_Cloudfish": "Existe um boato de que há ilhas que voam pelo céu, com tesouros incríveis! Mas quem se importa com isso, o mais legal é que às vezes surgem lagos nas nuvens, e nesses lagos há peixes feitos de nuvem! Eu quero saber que sabor eles têm, então é melhor você ir pegar um para mim!\n\n(Capturado em Lagos Celestes)", + "Quest_Cursedfish": "Há um peixe amaldiçoado nadando nas profundezas das águas corrompidas! Ele foi criado nas chamas amaldiçoadas que nascem das coisas aterrorizantes que vivem no fundo. Dizem que nem mesmo água é capaz de apagar este fogo, e que ele pode queimar para sempre. Já posso imaginar as coisas incríveis que eu poderia fazer com um peixe assim! Você vai lá buscar para mim ou vai ficar aí tremendo de medo!?\n\n(Capturado na Corrupção)", + "Quest_DynamiteFish": "O especialista em demolição estava bem nervoso porque havia perdido uma dinamite no lago, na floresta. Ele tem tantas, por que uma faria tanta diferença? Aparentemente porque a dinamite criou barbatanas e começou a nadar! Não sei onde ele encontra materiais para fazer coisas assim mas esse está claramente possuído! Pesque-o e traga-o para mim, eu sempre quis ter um peixe-bomba! Só não pergunte por quê...\n\n(Capturado na Superfície)", + "Quest_EaterofPlankton": "Aposto que você não vai ter coragem de encontrar o Devorador de Plâncton. Um peixe corrompido que nasceu de um pedaço do Devorador de Mundos! Capture-o e traga-o para mim, prove que não é um covarde!\n\n(Capturado na Corrupção)", + "Quest_FallenStarfish": "Eu adoro colecionar estrelas brilhantes e amarelinhas que caem do céu! Adoro ainda mais quando caem na cabeça de alguém. Mas... mas... nada é melhor que uma estrela que cai em um lago na floresta e se transforma em um peixe! Isso é maneiro demais, e você é maneiro suficiente para ir buscá-lo para mim!\n\n(Capturado em Lagos Celestes)", + "Quest_TheFishofCthulu": "Aparentemente os Olhos Demoníacos também podem ser anfíbios. Eles não voam, eles nadam! Quero ver a cara de alguém que entrar na banheira e encontrar ele lá! Eles sempre estão nas mesmas áreas. Ou seja, pegue um para mim!\n\n(Capturado em Lagos Celestes e na Superfície)", + "Quest_Fishotron": "Eu não sei o que é pior, um peixe de ossos ou um peixe de ossos com MÃOS. Este Peixe-Tron das profundezas das cavernas é de arrepiar! Acho que ele foi possuído pelos mesmos espíritos demoníacos que possuíram aquele velho no calabouço! Você não vai conseguir pescá-lo. Duvideodó!\n\n(Capturado nas Cavernas)", + "Quest_Harpyfish": "Eu estava tentando dormir perto da colina quando um peixe veio na minha direção. Ele estava voando! Ele tinha o rosto de uma mulher, e penas! Acho que gritei mais alto que ela! Faça ela pagar pelo susto que me deu!\n\n(Capturado em Lagos Celestes e na Superfície)", + "Quest_Hungerfish": "Há um pedaço do Faminto que saiu da Parede de Carne e transformou-se em um pequeno animal que lembra um peixe, nadando sem destino no submundo, é super nojento, e eu quero ele agora!\n\n(Capturado nas Cavernas)", + "Quest_Ichorfish": "Você sabia que nas profundezas do carmim algumas daquelas criaturas criam esta coisa amarela nojenta? Ouvi uma estória maluca sobre uma piscina dessa coisa ter acumulado e formado um peixe, que nada e tudo mais! Pegue-o para mim, quero colocar ele na privada de alguém!\n\n(Capturada no Carmesim)", + "Quest_Jewelfish": "Oooooohhh, vou ficar TÃO rico! Nas profundezas das cavernas, há um peixe feito de pedras preciosas! Não me pergunte como, eu não sei, só sei que esse peixe é simplesmente incrível e você vai pegar ele para mim!\n\n(Capturado no Submundo e nas Cavernas)", + "Quest_MirageFish": "Há criaturas interessantes a se encontrar nas profundezas da Terra Consagrada, garanto a você! Eles têm um brilho roxo esquisito que incomoda meus olhos! É muito legal, eu quero que você pegue um peixe assim para mim!\n\n(Capturado nas Terras Consagradas do Submundo)", + "Quest_MutantFlinxfin": "O que é branco, bronzeado e fofinho, e vive em um lago subterrâneo? Um flinxfin mutante! Eu não estava contando uma piada, existe mesmo uma variação mutante do Flinx que é mais adaptada ao estilo de vida aquático! Eu quero que ele adapte-se ao meu aquário, portanto faça acontecer!\n\n(Capturado na Tundra Subterrânea)", + "Quest_Pengfish": "É uma baleia! É um golfinho! Não, é um peixe pinguim! Ah, e olha só, é você! Você que vai trazer um para mim! Você sabe que eles só gostam de água gelada, certo?\n\n(Capturado na Tundra)", + "Quest_Pixiefish": "Há um tipo muito, muito raro de fada que nasce com tantas asas que não consegue voar! Ela nada com os peixes nos lagos rodeada por aquela grama azul. Meu aquário precisa de uma lâmpada, então eu quero que você pegue aquela fada para mim!\n\n(Capturada na Terra Consagrada)", + "Quest_Spiderfish": "Vi um peixe que tinha oito pernas! Não! Sem chance! Você vai pescar ele para mim, assim quando eu o segurar, ele não vai mais estar vivo! Essa é a última vez que eu vou pescar nas profundezas da caverna!\n\n(Capturado no Submundo e nas Cavernas)", + "Quest_UnicornFish": "Unicórnios e arco-íris são ótimos mesmo! Eles estão por todos os lados, até na água. Não, sério, eu vi um peixe-unicórnio no Lago Consagrado! Seu trabalho será pescá-lo, quero que ele seja meu bichinho de estimação!\n\n(Capturada na Terra Consagrada)", + "Quest_GuideVoodooFish": "Aqueles demônios no submundo gostam mesmo de bonecas vodu, mas eu acho que há uma boneca por aí que recebeu magia demais! Ela transformou-se em um peixe e começou a agir sozinha. Duvido que você consiga trazer uma para mim! Eu tomaria cuidado com a lava se fosse você, porque ela queima até você morrer e assim você não vai conseguiu pegar meu peixe!\n\n(Capturado nas Cavernas)", + "Quest_Wyverntail": "Eu sei de uma coisa que vocêeeeeee não sabe! Tudo bem, eu vou dizer. Há uma criatura aterrorizante que voa entre as estrelas! Eu não estou inventando! É a Serpe! Mas, mas, você já sabia disso, não é? Bem, o que você não sabe é que elas nascem e crescem como girinos! Então, na verdade, elas são... um sapo! Não fique parado, pegue uma para mim!\n\n(Capturado em Lagos Celestes)", + "Quest_ZombieFish": "Você não vai acreditar! Peguei um peixe na floresta à noite que já estava morto! Então ele tentou me devorar! Eu o joguei fora e fugi! Agora eu quero colocá-lo no armário de alguém, para ver o que acontece. Vá pescá-lo outra vez para mim, tá bom?!\n\n(Capturado na Superfície)", + "Quest_AmanitaFungifin": "Encontrei este lugar espetacular, repleto de cogumelos brilhantes! Tudo era azul! EU estava pegando alguns cogumelos que encontrei perto de um lago azul brilhante quando um dos cogumelos irritou-se comigo e foi embora! Eu quero que ele prove do próprio veneno, depois vou devorá-lo! O que eu quero dizer é, vá pegar ele para mim!\n\n(Capturado em Campos de Cogumelos Brilhantes)", + "Quest_Angelfish": "Você sabia que há ilhas mágicas que ficam suspensas no céu? Aposto que você não sabia! Dizem que anjos vivem no céu, e eu acredito que esse anjos tenham barbatanas e guelras, e que eles ficam nadando por aí! Eu acredito que você deve pegar um para mim!\n\n(Capturado em Lagos Celestes)", + "Quest_BloodyManowar": "Oh! Não venha para perto de mim! Levei uma picada de uma Caravela Sangrenta! Se você não for inteligente o suficiente para saber do que estou falando, é a água-viva mais perigosa de todo o {WorldName}! Vá até o carmim apodrecido e pegue uma, se tiver coragem! \n\n(Capturada no Carmesim)", + "Quest_Bonefish": "Eu normalmente não me importo ao ver ossos de peixes flutuando na água, mas estes estavam nadando! O que foi, você achou que só esqueletos humanos podiam continuar perambulando pelo {WorldName}? Capture-o para mim, quero colocá-lo na cama de alguém!\n\n(Capturado no Submundo e nas Cavernas)", + "Quest_Bunnyfish": "Na floresta, eu estava pescando, certo? Adivinha só! Um coelhinho veio pulando até onde eu estava! Depois outro, e mais um... de repente eu estava rodeado de coelhinhos! Um deles até veio nadando na minha direção, saindo da água, só que sem pernas! Eu caí da minha cadeira de tanta surpresa, e todos os coelhinhos fugiram! Eu quero aquele peixe coelhinho como animal de estimação, melhor você ir buscá-lo para mim! Agora mesmo!\n\n(Capturado na Superfície)", + "Quest_CapnTunabeard": "Yarr, marujo! Olho de vidro e perna de pau! Parem, cães do mar! Há um capitão pirata que tinha um peixe de estimação que se chamava Capitão Barba-de-Atum, mas durante uma tempestade seu aquário virou e caiu no mar! Ele tem um gancho ao invés de uma cauda, um tapa-olho e tudo mais! Você precisa pegar esse peixe para mim, assim eu serei tão descolado quanto um pirata! Obviamente ele está em algum lugar no oceano! Dãa!\n\n(Capturado no Oceano)", + "Quest_Clownfish": "Vi um peixe laranja brilhante no mar, e ele estava bem nervoso, como se estivesse procurando um membro de sua família! Vá pegá-lo para mim, assim outro nervoso como ele vai aparecer, procurando por ele!\n\n(Capturado no Oceano)", + "Quest_DemonicHellfish": "Ouvi dizer no submundo que o Rei de todos os demônios é, na verdade, um peixe! Imagine o poder absoluto que eu teria se você o pegasse para mim!\n\n(Capturado nas Cavernas)", + "Quest_Derpfish": "Os Derplings, que vivem na selva, são as criaturas mais assustadoras que eu já vi! Ainda bem que, às vezes, eles não têm pernas! Esses vivem na água e são bem menos assustadores! Pegue um para mim, assim eu saberei que gosto eles têm sem ter que morrer de medo!\n\n(Capturado na Superfície da Selva)", + "Quest_Fishron": "Diz a lenda que existe uma poderosa criatura chamada Peixe-Dragão! Ela é parte porco, parte dragão e parte PEIXE! Ouvi dizer que ela vive perto dos lagos congelados do submundo, na parte mais fria do mundo! Eu não vou lá, então VOCÊ vai garantir que ele venha parar nas minhas mãos! Que emocionante!\n\n(Capturado na Tundra Subterrânea)", + "Quest_InfectedScabbardfish": "Um peixe muito longo, que parece uma bainha, nada nas corrompidas águas obscuras! Ele parece muito com pedras de ébano, tome cuidado para não ser enganado! É isso mesmo, você. Você que vai pegá-lo, eu não!\n\n(Capturado na Corrupção)", + "Quest_Mudfish": "Cuidado por onde anda quando estiver atravessando as águas da selva! Por quê? Não, não é porque eu tenho medo que você seja devorado por piranhas. Eu tenho medo que você pise em um dos meus tipos de peixe favoritos, o Peixe de Lama! Também tenho medo que você esqueça de trazer um para mim!\n\n(Capturado na Selva)", + "Quest_TropicalBarracuda": "Piranhas e tubarões são feios! Tãaaao feio! Você sabia que existe um peixe que, além de ser bonito, é capaz de arrancar o seu rosto? Eu pagaria 2 platinas para ver isso acontecer... Mas voltando ao assunto, você vai pegar um para mim. Só traga ele antes que devore seu rosto!\n\n(Capturado na Superfície da Selva)", + "Quest_TundraTrout": "Você sabe por que os lagos na superfície das terras gélidas de {WorldName} nunca congelam? Eu não. Mas os peixes sabem! Um peixe feito de gelo seria uma ótima oferenda ao poderoso e incrível {Angler}! Vá, fiel servo, e traga-me rápido esta Truta da Tundra!\n\n(Capturado na Tundra da Superfície)" + }, + "AnglerChatter": { + "Chatter_1": "Por que o {Bartender} não vende cerveja? Eu quero experimentar! Que resmungão!" + }, + "BartenderChatter": { + "Chatter_1": "Eu tenho uma coisa que quero que você veja! Entendeu? Cerveja? Não?", + "Chatter_10": "Você acha que {Steampunker} tem uma arma daquelas sobrando? Eu conheço uma bruxa que quer uma.", + "Chatter_11": "Por isso {Demolitionist} sofre tantos acidentes. Você não faz ideia de quanta cerveja ele compra comigo.", + "Chatter_12": "Eu não costumo ser muito fã dos Goblins, mas {GoblinTinkerer} parece ser gente boa.", + "Chatter_13": "{?Day}Alguém viu para onde a Dríade foi?", + "Chatter_14": "{?!Day}Tudo muito calmo por aqui. Calmo demais...", + "Chatter_15": "{?!Day}Apresente-se e faça seu trabalho.", + "Chatter_16": "{?BloodMoon}Sabe, de onde eu venho, a Lua Sangrenta é só uma desculpa para sair e tomar um ar fresco.", + "Chatter_17": "{?MoonLordDefeated}Senhor da Lua, você não quis dizer Senhor do Abismo?", + "Chatter_18": "{?HardMode}Eu conheço um Lavamancer que adoraria pôr as mãos naquela pedra infernal que fica no submundo.", + "Chatter_19": "{?Homeless}Conhece algum lugar legal pra abrir um negócio? Eu adoraria abrir um bar aqui.", + "Chatter_2": "Dizem que você é forte, eu entendo de força. Vamos ver você merece essa fama.", + "Chatter_3": "De onde eu venho, nós só servimos Root Beer...", + "Chatter_4": "Isso é bem melhor que limpar aquela mesa o dia inteiro.", + "Chatter_5": "A vida é um desafio quando você é simplesmente melhor que todos os outros.", + "Chatter_6": "O que eu estou fazendo aqui...", + "Chatter_7": "Com muita insistência e um pouco de sorte, você vai longe...", + "Chatter_8": "Você viu algum Mebur por aqui?", + "Chatter_9": "{Dryad} parece ser gente boa. Eu deveria traze-la de volta comigo." + }, + "BartenderHelpText": { + "Help_1": "A primeira coisa que você precisa saber é que eu tenho alguns artefatos de defesa especiais à venda, mas só se você tiver algumas Medalhas do Defensor!", + "Help_10": "Se você conseguir impedir a invasão, receberá mais Medalhas do Defensor, que você pode trazer até aqui para comprar mais artefatos e receber algumas outras recompensa especiais!", + "Help_11": "Eu também ouvi falar que o poder dos próprios artefatos pode ser ampliado se você derrotar o Exército do Ancião. Talvez você consiga até usa-los na hora que quiser!", + "Help_2": "Você pode usar estes artefatos para criar armadilhas e torres de defesa. Fazer isso consumirá mana de Éter, uma energia especial que só pode ser obtida eliminando-se os membros do Exército do Ancião!", + "Help_3": "Desafiar o Exército do Ancião é algo muito simples. Eles são atraídos pelo poder dos Cristais de Eternia, que você pode usar como isca.", + "Help_4": "Para usar um Cristal de Eternia, você deve obter um deles além de uma base para colocá-los lá. Por acaso, você pode comprar comigo!", + "Help_5": "O ideal é você colocar a base do Cristal de Eternia em um espaço aberto e plano. Com muitas paredes seria muito difícil de proteger!", + "Help_6": "Quando sua base estiver pronta, basta interagir com ela enquanto estiver com um Cristal de Eternia, e prepare-se para a batalha!", + "Help_7": "Obviamente, você não pode deixar o Exército do Ancião destruir o Cristal de Eternia! As consequências seriam catastróficas em Etheria, minha terra natal!", + "Help_8": "Você pode posicionar defesas consumindo 10 mana de Éter. Depois de posicionado, o Cristal de Eternia liberará esta mana. Caso contrário, você terá que derrotar inimigos para obter mais.", + "Help_9": "Com a ajuda das defesas, você terá que deter várias ondas de invasores que estão tentando destruir você e o Cristal de Eternia!" + }, + "BartenderNames": { + "Name_1": "Ted", + "Name_10": "Javahawk", + "Name_11": "Elandrian", + "Name_12": "Driscan", + "Name_13": "Iamisom", + "Name_14": "Ferreiro", + "Name_15": "Dani Moo", + "Name_16": "Paddy", + "Name_2": "Barman", + "Name_3": "Jerry", + "Name_4": "Bill", + "Name_5": "Ernest", + "Name_6": "William", + "Name_7": "Dale", + "Name_8": "Bruce", + "Name_9": "Moe" + }, + "CyborgChatter": { + "Chatter_1": "{Bartender} disse que eu o lembrava uma tal de \"EV2\". Talvez eu devesse encontrá-la?" + }, + "GoblinTinkererChatter": { + "Chatter_1": "Sabe, esses Goblins de Éter são muito diferentes do meu povo. Um pessoal bem violento. Não que o meu povo seja muito melhor..." + }, + "GuideHelpText": { + "Help_1063": "Normalmente eu tentaria explicar a você tudo sobre o Exército do Ancião, mas seria melhor você falar com {Bartender} sobre isso." + }, + "MechanicChatter": { + "Chatter_1": "{Bartender} me ofereceu uma Root Beer. Eu pedi que a servisse em um copo quadrado." + }, + "NurseChatter": { + "Chatter_1": "Eu pedi vinho, mas o {Bartender} só me dava canecas de cerveja." + }, + "PirateChatter": { + "Chatter_1": "Já era hora de termos um barman por aqui! Meu rum já estava no fim!" + }, + "StylistChatter": { + "Chatter_1": "Eu ofereci fazer a barba do {Bartender}, mas ele recusou. Assim, eu poderia ter pelo menos arrumado seu bigode!" + }, + "TownNPCHousingFailureReasons": { + "HoleInWallIsTooBig": "Esta sala está sem uma parede!", + "RoomCheckStartedInASolidTile": "Isso é um bloco sólido!", + "RoomIsTooBig": "Esta sala é grande demais", + "RoomIsTooSmall": "Este valor é pequeno demais", + "TooCloseToWorldEdge": "Precisamos de um texto melhor para isso!!!" + } +} \ No newline at end of file diff --git a/Localization/Content/ru-RU.json b/Localization/Content/ru-RU.json new file mode 100644 index 0000000..8c4677e --- /dev/null +++ b/Localization/Content/ru-RU.json @@ -0,0 +1,697 @@ +{ + "GameTitle": { + "0": "Terraria: копай, пехотинец, копай!", + "1": "Terraria: легендарная грязь", + "10": "Terraria: Digger T' Blocks", + "11": "Terraria: нет слоя для коров", + "12": "Terraria: подозрительные глаза", + "13": "Terraria: фиолетовая трава!", + "14": "Terraria: всем копать!", + "15": "Terraria: водопад контента!", + "16": "Terraria: связь с землей", + "17": "Terraria: а у меня ничего нет", + "18": "Terraria: все руда, что хорошо кончается", + "19": "Terraria: судная глина", + "2": "Terraria: аДАмантит!", + "20": "Terraria: земляная проблема", + "21": "Terraria: обсессивно-компульсивный симулятор нахождения", + "22": "Terraria: искупление красного дьявола", + "23": "Terraria: восстание слизней", + "24": "Terraria: теперь еще больше желающих вас убить!", + "25": "Terraria: слухи о смерти Гида сильно преувеличены", + "26": "Terraria: жалко инструментов", + "27": "Terraria: шахтер говорит «ЧТО»?", + "28": "Terraria: и потом я сказал «кое-что об обновлении ПК»", + "29": "Terraria: да пребудут с вами блоки", + "3": "Terraria: песок осыпается", + "30": "Terraria: лучше жизни", + "31": "Terraria: Terraria: Terraria:", + "32": "Terraria: теперь в 1D", + "33": "Terraria: скоро в ближайшем компьютере", + "34": "Terraria: можно делить на ноль", + "35": "Terraria: теперь СО ЗВУКОМ", + "36": "Terraria: нажмите alt-f4", + "37": "Terraria: мне жаль инструменты", + "38": "Terraria: твой песок, бро?", + "39": "Terraria: сегодня подходящий день, чтобы копать", + "4": "Terraria, часть 3: возвращение Гида", + "40": "Terraria: можешь перекопать?", + "41": "Terraria: я не знаю, что... ааа!", + "42": "Terraria: что это за пурпурная шипастая штука?", + "43": "Terraria: я хочу быть гидом", + "44": "Terraria: Ктулху безумен... и без глаза!", + "45": "Terraria: ТОЛЬКО НЕ ПЧЕЛЫ!!!", + "46": "Terraria: легенда о Максе", + "47": "Terraria: культ Cenx", + "48": "Terraria 2: электрик-бугалу", + "49": "Terraria: также сыграйте в Minecraft!", + "5": "Terraria: сказка о кроликах", + "51": "Terraria: я просто хочу знать, где золото?", + "52": "Terraria: теперь еще больше уток!", + "53": "Terraria: 9 + 1 = 11", + "54": "Terraria: бесконечная Плантера", + "6": "Terraria: Д-р Бонс и храм кровавой луны", + "7": "Terraria: парк слизневского периода", + "8": "Terraria: на этой стороне трава зеленее", + "9": "Terraria: содержит мелкие детали, не для детей младше 5 лет", + "55": "Terraria: молчи и копай, Gaiden!" + }, + "Achievements": { + "ARCHAEOLOGIST_Description": "Убейте доктора Бонса.", + "ARCHAEOLOGIST_Name": "Археолог", + "BALEFUL_HARVEST_Description": "Дойдите до 15-й волны тыквенной луны, где зло таится среди осеннего урожая.", + "BALEFUL_HARVEST_Name": "Губительный урожай", + "BEGONE_EVIL_Description": "Уничтожьте демонический или багрянцевый алтарь мощным святым молотом.", + "BEGONE_EVIL_Name": "Прощай, зло!", + "BEHIND_THE_MASK_Description": "Убейте безумного культиста — сумасшедшего волшебника с мощными заклинаниями.", + "BEHIND_THE_MASK_Name": "За маской", + "BIG_BOOTY_Description": "Откройте один из больших загадочных сундуков темницы с помощью особого ключа.", + "BIG_BOOTY_Name": "Большой трофей", + "BLOODBATH_Description": "Переживите кровавую луну — ночное событие, когда реки становятся красными, а окрестности кишат монстрами.", + "BLOODBATH_Name": "Кровавая ванна", + "BONED_Description": "Победите Скелетрона — проклятого хранителя темницы.", + "BONED_Name": "Костяной", + "BUCKETS_OF_BOLTS_Description": "Победите три ночные механические угрозы: Близнецов, Уничтожителя, Скелетрона Прайма.", + "BUCKETS_OF_BOLTS_Name": "Ведро болтов", + "BULLDOZER_Description": "Уничтожьте в сумме 10 000 плиток.", + "BULLDOZER_Name": "Бульдозер", + "ChallengerCategory": "Претендент", + "CHAMPION_OF_TERRARIA_Description": "Победите лунного лорда.", + "CHAMPION_OF_TERRARIA_Name": "Чемпион Террарии", + "CollectorCategory": "Сборщик", + "Completed": "Достижение получено! {0}", + "COMPLETELY_AWESOME_Description": "Получите мини-акулу.", + "COMPLETELY_AWESOME_Name": "Полный безумец", + "DAVY_JONES_LOCKER_Description": "Победите Летучего Голландца — пиратскую грозу небес.", + "DAVY_JONES_LOCKER_Name": "Сундук Дэви Джонса.", + "DECEIVER_OF_FOOLS_Description": "Убейте нимфу.", + "DECEIVER_OF_FOOLS_Name": "Обманщик глупцов", + "DO_YOU_WANT_TO_SLAY_A_SNOWMAN_Description": "Победите ледяной легион — праздничную семейку снеговиков-маньяков.", + "DO_YOU_WANT_TO_SLAY_A_SNOWMAN_Name": "Кто хочет убить снеговика?", + "DRAX_ATTAX_Description": "Создайте молотобур или киркотопор из слитков освящения и душ трех механических боссов.", + "DRAX_ATTAX_Name": "Молотобур в действии", + "DUNGEON_HEIST_Description": "Украдите ключ нежити, живущей в подземелье, и откройте один из драгоценных золотых сундуков.", + "DUNGEON_HEIST_Name": "Ограбление темницы", + "DYE_HARD_Description": "Поместите красители во все доступные ячейки для красителей.", + "DYE_HARD_Name": "Красительнее некуда", + "ExplorerCategory": "Исследователь", + "EXTRA_SHINY_Description": "Добудьте мощную руду, которой недавно благословлен ваш мир.", + "EXTRA_SHINY_Name": "Особый блеск!", + "EYE_ON_YOU_Description": "Победите Глаз Ктулху — глазастую угрозу, которая появляется только ночью.", + "EYE_ON_YOU_Name": "В глаза смотреть!", + "FASHION_STATEMENT_Description": "Поместите броню или аксессуары во все три ячейки для украшений.", + "FASHION_STATEMENT_Name": "Модный приговор", + "FAST_AND_FISHIOUS_Description": "Выполните 50 заданий для рыбака.", + "FAST_AND_FISHIOUS_Name": "Ловись рыбка большая и маленькая", + "FISH_OUT_OF_WATER_Description": "Победите Герцога Рыброна — мутанта, терроризирующего моря.", + "FISH_OUT_OF_WATER_Name": "Рыба без воды", + "FREQUENT_FLYER_Description": "Потратьте более 1 золотого на лечение у медсестры.", + "FREQUENT_FLYER_Name": "Постоянный клиент", + "FUNKYTOWN_Description": "Посадите или найдите поле светящихся грибов под землей.", + "FUNKYTOWN_Name": "Вечеринка", + "GELATIN_WORLD_TOUR_Description": "Убейте слизней всех видов!", + "GELATIN_WORLD_TOUR_Name": "Мировой тур по желатиновым местам", + "GET_A_LIFE_Description": "Съешьте фрукт жизни, который светится в толще травы в подземных джунглях.", + "GET_A_LIFE_Name": "Кому жизнь?", + "GLORIOUS_GOLDEN_POLE_Description": "Получите золотую удочку.", + "GLORIOUS_GOLDEN_POLE_Name": "Славная золотая удочка", + "GOBLIN_PUNTER_Description": "Победите нашествие гоблинов — безумный полк грубых варварских остроухих воинов и их колдунов теневого пламени.", + "GOBLIN_PUNTER_Name": "Владыка гоблинов", + "GOOD_LITTLE_SLAVE_Description": "Выполните 10 заданий для рыбака.", + "GOOD_LITTLE_SLAVE_Name": "Хороший маленький раб", + "HEAD_IN_THE_CLOUDS_Description": "Наденьте пару крыльев.", + "HEAD_IN_THE_CLOUDS_Name": "Головой в облака", + "HEART_BREAKER_Description": "Найдите и разбейте свое первое хрустальное сердце под землей.", + "HEART_BREAKER_Name": "Сердцеед", + "HEAVY_METAL_Description": "Получите наковальню из железа или свинца.", + "HEAVY_METAL_Name": "Хеви-метал", + "HEX_EDUCATION_Description": "Победите Призывателя гоблинов — заклинателя темнейшего пламени.", + "HEX_EDUCATION_Name": "Обучение колдовству", + "HOLD_ON_TIGHT_Description": "Возьмите свой первый крюк-кошку.", + "HOLD_ON_TIGHT_Name": "Держитесь крепче!", + "ICE_SCREAM_Description": "Дойдите до 15-й волны морозной луны, где праздничный сезон быстро превращается в безумие.", + "ICE_SCREAM_Name": "Замороженое", + "INDEPENDENCE_DAY_Description": "Победите материнский корабль — сверхразум, контролирующий марсианских захватчиков.", + "INDEPENDENCE_DAY_Name": "День независимости", + "INTO_ORBIT_Description": "Отсюда можно только вниз!", + "INTO_ORBIT_Name": "На орбите", + "ITS_GETTING_HOT_IN_HERE_Description": "Опуститесь достаточно низко, чтобы найти лаву.", + "ITS_GETTING_HOT_IN_HERE_Name": "Тут становится жарковато", + "ITS_HARD_Description": "Выпускает древних духов света и тьмы в ваш мир, что делает врагов намного сильнее и добавляет в мир невероятные сокровища (и радуги!).", + "ITS_HARD_Name": "Какая сила!", + "IT_CAN_TALK_Description": "Постройте дом в грибном биоме и сделайте так, чтобы в нем поселился Трюфель.", + "IT_CAN_TALK_Name": "Это может говорить?!", + "I_AM_LOOT_Description": "Найдите золотой сундук под землей и взгляните на его содержимое.", + "I_AM_LOOT_Name": "Я есть добыча!", + "JEEPERS_CREEPERS_Description": "Наткнитесь на пещеру пауков под землей.", + "JEEPERS_CREEPERS_Name": "Черт побери!", + "KILL_THE_SUN_Description": "Переживите солнечное затмение — день темнее ночи, заполненный ужасными созданиями.", + "KILL_THE_SUN_Name": "Убить солнце", + "LIHZAHRDIAN_IDOL_Description": "Победите Голема — каменного ритуального идола племещи ящщеров.", + "LIHZAHRDIAN_IDOL_Name": "Идол ящщеров", + "LIKE_A_BOSS_Description": "Получите предмет для вызова босса.", + "LIKE_A_BOSS_Name": "Как босс", + "LUCKY_BREAK_Description": "Выживите после падения с высоты с минимумом здоровья.", + "LUCKY_BREAK_Name": "Удачное падение", + "MARATHON_MEDALIST_Description": "Пройдите пешком 42 километра.", + "MARATHON_MEDALIST_Name": "Победитель марафона", + "MASTERMIND_Description": "Победите Мозг Ктулху — огромный демонический мозг, который живет в зловещем Багрянце.", + "MASTERMIND_Name": "Повелитель мозга", + "MATCHING_ATTIRE_Description": "Поместите предметы брони во все три доступные ячейки: голова, грудь и ноги.", + "MATCHING_ATTIRE_Name": "Подходящий наряд ", + "MECHA_MAYHEM_Description": "Сразитесь с Близнецами, Уничтожителем и Скелетроном Праймом одновременно и одержите победу.", + "MECHA_MAYHEM_Name": "Механический кавардак", + "MINER_FOR_FIRE_Description": "Создайте литую кирку, используя самые горячие материалы.", + "MINER_FOR_FIRE_Name": "Шахтер-огневик", + "NoCategory": "Нет", + "NOT_THE_BEES_Description": "Выстрелите из пчеломета, когда на вас полный комплект пчелиной брони.", + "NOT_THE_BEES_Name": "Только не пчелы!", + "NO_HOBO_Description": "Постройте дом, подходящий для поселения вашего первого НИПа, например, Гида.", + "NO_HOBO_Name": "Без бездомных", + "OBSESSIVE_DEVOTION_Description": "Победите древнего культиста — фанатика и лидера клана темницы.", + "OBSESSIVE_DEVOTION_Name": "Одержимая преданность", + "OBTAIN_HAMMER_Description": "Получите свой первый молот, создав его или найдя.", + "OBTAIN_HAMMER_Name": "Стоп! Время молота!", + "OOO_SHINY_Description": "Добудьте первую порцию руды с помощью кирки.", + "OOO_SHINY_Name": "Ооо! Блестяшка!", + "PHOTOSYNTHESIS_Description": "Добудьте хлорофит — органическую руду, которую можно найти в глубине джунглей.", + "PHOTOSYNTHESIS_Name": "Фотосинтез", + "PRETTY_IN_PINK_Description": "Убейте Пинки.", + "PRETTY_IN_PINK_Name": "Розовая милота", + "PRISMANCER_Description": "Получите радужный жезл.", + "PRISMANCER_Name": "Призмант", + "PUMPKIN_SMASHER_Description": "Победите Тыквенного Короля — злобного повелителя Хэллоуина.", + "PUMPKIN_SMASHER_Name": "Разбиватель тыкв", + "RAINBOWS_AND_UNICORNS_Description": "Выстрелите из радужной пушки верхом на единороге.", + "RAINBOWS_AND_UNICORNS_Name": "Радуги и единороги", + "REAL_ESTATE_AGENT_Description": "Получите всех НИПов, доступных в вашем мире.", + "REAL_ESTATE_AGENT_Name": "Агент по недвижимости", + "ROBBING_THE_GRAVE_Description": "Получите редкое сокровище от сложного монстра в темнице.", + "ROBBING_THE_GRAVE_Name": "Ограбление могилы", + "ROCK_BOTTOM_Description": "Один путь — наверх!", + "ROCK_BOTTOM_Name": "Каменное дно", + "SERVANT_IN_TRAINING_Description": "Выполните 1 задание для рыбака.", + "SERVANT_IN_TRAINING_Name": "Подмастерье", + "SICK_THROW_Description": "Получите террарианина.", + "SICK_THROW_Name": "Ничего себе!", + "SlayerCategory": "Убийца", + "SLAYER_OF_WORLDS_Description": "Победите всех боссов в Terraria.", + "SLAYER_OF_WORLDS_Name": "Истребитель миров", + "SLIPPERY_SHINOBI_Description": "Победите Короля слизней — владыку всего скользкого.", + "SLIPPERY_SHINOBI_Name": "Скользкий Шиноби", + "SMASHING_POPPET_Description": "Используя взрывчатку или старый добрый молот, разбейте сферу тени или багряное сердце в злой части вашего мира.", + "SMASHING_POPPET_Name": "Отлично, марионетка!", + "STAR_DESTROYER_Description": "Уничтожьте четыре небесные башни луны.", + "STAR_DESTROYER_Name": "Звездный разрушитель", + "STAR_POWER_Description": "Создайте кристалл маны из падших звезд и используйте его.", + "STAR_POWER_Name": "Сила звезд", + "STICKY_SITUATION_Description": "Переживите дождь слизней, когда скользкие существа сыплются с неба.", + "STICKY_SITUATION_Name": "Липкая ситуация", + "STILL_HUNGRY_Description": "Победите Стену плоти — повелителя и сердце мира, который появляется после жертвоприношения в огне.", + "STILL_HUNGRY_Name": "Все еще голодный", + "STING_OPERATION_Description": "Победите Королеву пчел — повелительницу ульев в джунглях.", + "STING_OPERATION_Name": "Операция «Жало»", + "SUPREME_HELPER_MINION_Description": "Выполните в сумме 200 заданий для рыбака.", + "SUPREME_HELPER_MINION_Name": "Какой отличный прислужник!", + "SWORD_OF_THE_HERO_Description": "Получите Клинок Земли, выкованный из лучших мечей света и тьмы.", + "SWORD_OF_THE_HERO_Name": "Меч героя", + "TEMPLE_RAIDER_Description": "Пробейте непробиваемую стену храма джунглей.", + "TEMPLE_RAIDER_Name": "Расхититель храмов", + "THERE_ARE_SOME_WHO_CALL_HIM_Description": "Убить Тима.", + "THERE_ARE_SOME_WHO_CALL_HIM_Name": "Некоторые называют его...", + "THE_CAVALRY_Description": "Сядьте на средство передвижения.", + "THE_CAVALRY_Name": "Кавалерия", + "THE_GREAT_SOUTHERN_PLANTKILL_Description": "Победите Плантеру — монстра-переростка из глубин джунглей.", + "THE_GREAT_SOUTHERN_PLANTKILL_Name": "Великий южный плантоубийца", + "THROWING_LINES_Description": "Бросьте йо-йо.", + "THROWING_LINES_Name": "Метательные линии", + "TIL_DEATH_Description": "Убейте жениха.", + "TIL_DEATH_Name": "Пока смерть...", + "TIMBER_Description": "Срубите свое первое дерево.", + "TIMBER_Name": "Древесина!!!", + "TIN_FOIL_HATTER_Description": "Отразите нашествие марсиан — эти пришельцы с другого мира пришли, чтобы вскрыть ваши мозги и ставить на вас другие неприятные эксперименты.", + "TIN_FOIL_HATTER_Name": "Ненавистник жестянок", + "TOPPED_OFF_Name": "Под завязку", + "TROUT_MONKEY_Description": "Выполните 25 заданий для рыбака.", + "TROUT_MONKEY_Name": "Любитель порыбачить", + "VEHICULAR_MANSLAUGHTER_Description": "Победите врага, находясь в вагонетке.", + "VEHICULAR_MANSLAUGHTER_Name": "Убийца на колесах", + "WALK_THE_PLANK_Description": "Победите нашествие пиратов — группу морских грабителей, которые пришли по ваш кошелек... и жизнь!", + "WALK_THE_PLANK_Name": "Прогулка по доске", + "WATCH_YOUR_STEP_Description": "Станьте жертвой подлой подземной ловушки.", + "WATCH_YOUR_STEP_Name": "Смотри куда идешь!", + "WHERES_MY_HONEY_Description": "Найдите большой пчелиный улей в глубине джунглей.", + "WHERES_MY_HONEY_Name": "Где мистер Мед?", + "WINTERHEARTED_Description": "Победите Ледяную королеву — чокнутую ведьму из самых холодных ночей.", + "WINTERHEARTED_Name": "Зима на сердце", + "WORM_FODDER_Name": "Пища для червей", + "YOU_AND_WHAT_ARMY_Description": "Управляйте девятью призванными прислужниками одновременно.", + "YOU_AND_WHAT_ARMY_Name": "Ты и армия?", + "YOU_CAN_DO_IT_Description": "Переживите первую полную ночь своего персонажа.", + "YOU_CAN_DO_IT_Name": "У тебя получится!" + }, + "CLI": { + "AutomaticPortForward": "Автоматически перенаправить порт? (д/н): ", + "AvailableCommands": "Доступные команды:", + "BanMessage": "Заблокирован на сервере.", + "Ban_Command": "заблокировать", + "Ban_Description": "Блокирует игрока на сервере.", + "Ban_Example": "заблокировать игрока ", + "Ban_Usage": "Использование: заблокировать игрока ", + "ChooseDifficulty": "Выберите сложность: ", + "ChooseEvil": "Выберите зло мира: ", + "ChooseSize": "Выберите размер: ", + "ChooseWorld": "Выберите мир: ", + "Clear_Command": "очистить", + "Clear_Description": "Очистить окно консоли.", + "ClientWasBooted": "Игрок {0} отключен от сервера: {1}", + "Corrupt": "Порча", + "Crimson": "Багрянец", + "Dawn_Command": "рассвет", + "Dawn_Description": "Сменить время на рассвет.", + "DeleteConfirmation": "Вы действительно хотите удалить {0}?", + "DeleteWorld_Command": "у", + "DeleteWorld_Description": "Удалить мир", + "DeleteWorld_Example": "у ", + "Dusk_Command": "закат", + "Dusk_Description": "Сменить время на закат.", + "EnterServerPassword": "Пароль сервера (нажмите Enter, чтобы не использовать пароль): ", + "EnterWorldName": "Введите название мира: ", + "ExitNoSave_Command": "выход без сохранения", + "ExitNoSave_Description": "Отключиться от сервера без сохранения.", + "Exit_Command": "выход", + "Exit_Description": "Отключиться от сервера и сохранить игру.", + "FPS_Command": "кадры в секунду", + "HelpHint": "Введите «помощь», чтобы получить список команд.", + "Help_Command": "помощь", + "Help_Description": "Отображает список команд.", + "InvalidCommand": "Неверная команда.", + "KickMessage": "Исключен с сервера.", + "Kick_Command": "исключить", + "Kick_Description": "Исключает игрока с сервера.", + "Kick_Example": "исключить игрока ", + "Kick_Usage": "Использование: исключает игрока ", + "ListeningOnPort": "Прослушивание порта {0}", + "MaxPlayers_Command": "максимум игроков", + "MaxPlayers_Description": "Введите максимальное количество игроков.", + "Midnight_Command": "полночь", + "Midnight_Description": "Сменить время на полночь.", + "MOTD": "Сообщение дня: {0}", + "MOTD_Command": "сообщение дня", + "MOTD_Description": "Введите «сообщение дня».", + "NewWorld_Command": "н", + "NewWorld_Description": "Новый мир", + "No": "нет", + "NoMOTD": "Добро пожаловать в {0}!", + "Noon_Command": "полдень", + "Noon_Description": "Сменить время на полдень.", + "NoPassword": "Пароль не задан.", + "NoPlayers": "Нет подключенных игроков.", + "OnePlayerConnected": "Подключен 1 игрок.", + "Password": "Пароль: {0}", + "PasswordDisabled": "Пароль откючен.", + "PasswordSet": "Пароль: {0}", + "Password_Command": "пароль", + "Password_Description": "Показать пароль.", + "PlayerLimit": "Ограничение игроков: {0}", + "PlayersConnected": "Подключено игроков: {0}.", + "Playing_Command": "в игре", + "Playing_Description": "Показывает список игроков.", + "Port": "Порт: {0}", + "Port_Command": "порт", + "Port_Description": "Отобразить порт прослушивания.", + "Random": "Случайно", + "Save_Command": "сохранить", + "Save_Description": "Сохранить игровой мир.", + "Say_Command": "сказать", + "Say_Description": "Отправить сообщение.", + "Say_Example": "сказать ", + "Say_Usage": "Использование: сказать ", + "Server": "Сервер Terraria {0}", + "ServerMessage": " {0}", + "ServerStarted": "Сервер запущен", + "SetInitialPort": "Порт сервера (нажмите Enter, чтобы выбрать 7777): ", + "SetMOTD_Command": "сообщение дня", + "SetMOTD_Description": "Изменить сообщение дня.", + "SetMOTD_Example": "сообщение дня ", + "SetPassword_Command": "пароль", + "SetPassword_Description": "Изменить пароль.", + "SetPassword_Example": "пароль ", + "Settle_Command": "финализировать", + "Settle_Description": "Финализировать положение всей воды.", + "ShortNo": "н", + "ShortYes": "д", + "Time": "Время: {0}", + "Time_Command": "время", + "Time_Description": "Показать игровое время.", + "Version_Command": "версия", + "Version_Description": "Отобразить номер версии.", + "WaterIsAlreadySettling": "Положение воды уже финализировано", + "Yes": "да", + "DisplaySeed": "Семечко мира: {0}", + "EnterSeed": "Укажите семечко (не заполняйте для случайного выбора):", + "NoValidSeed": "Этот мир сгенерирован в предыдущей версии игры, которая не поддерживает семена.", + "Seed_Command": "семечко", + "Seed_Description": "Показывает семечко мира." + }, + "Controls": { + "RightClick": "Щелчок правой клавиши мыши" + }, + "Currency": { + "Copper": "мон. меди", + "DefenderMedals": "Медали защитника", + "Gold": "мон. золота", + "Platinum": "мон. платины", + "Silver": "мон. серебра" + }, + "Enemies": { + "MoonLord": "Лунный лорд", + "TheTwins": "Близнецы" + }, + "Error": { + "BadHeaderBufferOverflow": "Bad header lead to a read buffer overflow.", + "DataSentAfterConnectionLost": "Попытка отправки данных клиенту после разрыва соединения", + "Error": "Ошибка", + "ExceptionNormal": " Exception normal: {0}", + "LaunchFromSteam": "Запустите игру через ваш клиент Steam.", + "LoadFailed": "Ошибка загрузки!", + "LoadFailedNoBackup": "Ошибка загрузки! Резервные копии не найдены.", + "NetMessageError": "Ошибка при сообщении {0}", + "ServerCrash": "Сбой сервера: {0}\n{1}\nОтправьте файл crashlog.txt по адресу support@terraria.org", + "TriedToRunServerTwice": "Попытка запуска двух серверов с одного ПК", + "UnableToCapture": "Невозможно выполнить захват.", + "UnableToLoadWorld": "Невозможно загрузить мир:", + "UnableToWritePreferences": "Ошибка записи файла по адресу: {0}", + "InvalidLobbyFlag": "- флажок лобби использован без «{0}» или «{1}». Игнорируется." + }, + "Game": { + "Actuators": "Приводы", + "BallBounceResult": "{0} получил удары в количестве {1}, прежде чем упал на землю!", + "BedObstructed": "Доступ к кровати прегражден.", + "BlueWires": "Синие провода", + "DroppedCoins": "падения: {0}", + "EnemiesDefeatedAnnouncement": "{0}-й {1} побежден!", + "EnemiesDefeatedByAnnouncement": "Игроком {0} побежден {1}-й {2}!", + "FinalWave": "Последняя волна", + "FirstWave": "Первая волна", + "GreenWires": "Зеленые провода", + "HasTeleportedTo": "Игрок {0} телепортирован: {1}", + "HouseChair": "стул", + "HouseDoor": "дверь", + "HouseLightSource": "источник света", + "HouseMissing_1": "В этом доме не хватает: {0}.", + "HouseMissing_2": "В этом доме не хватает: {0} и {1}.", + "HouseMissing_3": "В этом доме не хватает: {0}, {1} и {2}.", + "HouseMissing_4": "В этом доме не хватает: {0}, {1}, {2} и {3}.", + "HouseTable": "стол", + "InvasionPoints": "{0} очк.", + "InvasionWave_Type1": "{0}: {1}", + "InvasionWave_Type2": "{0}: {1} и {2}", + "InvasionWave_Type3": "{0}: {1}, {2} и {3}", + "InvasionWave_Type4": "{0}: {1}, {2}, {3} и {4}", + "InvasionWave_Type5": "{0}: {1}, {2}, {3}, {4} и {5}", + "InvasionWave_Type6": "{0}: {1}, {2}, {3}, {4}, {5} и {6}", + "InvasionWave_Type7": "{0}: {1}, {2}, {3}, {4}, {5}, {6} и {7}", + "InvasionWave_Type8": "{0}: {1}, {2}, {3}, {4}, {5}, {6}, {7} и {8}", + "JoinGreeting": "Текущие игроки: {0}.", + "NPCTitle": "{0} — {1}", + "PlayerDeathTime": "{0} умер {1} назад", + "PvPFlag": "(ПВП)", + "RedWires": "Красные провода", + "SpawnPointRemoved": "Точка воскрешения удалена!", + "SpawnPointSet": "Точка воскрешения задана!", + "TeleportTo": "Телепортироваться к {0}", + "Time": "Время: {0}", + "Wave": "Волна: {0}", + "WaveCleared": "Пройдено {0}", + "WaveMessage": "Волна {0}: {1}", + "YellowWires": "Желтые провода", + "BirthdayParty_1": "Похоже, {0} устраивает вечеринку", + "BirthdayParty_2": "Похоже, {0} и {1} устраивают вечеринку", + "BirthdayParty_3": "Похоже, {0}, {1} и {2} устраивают вечеринку", + "RespawnInPrefix": "", + "RespawnInSuffix": "{0}" + }, + "GameUI": { + "ActuationDeviceOff": "Устройство активации ВЫКЛ.", + "ActuationDeviceOn": "Устройство активации ВКЛ.", + "BaitPower": "{0} % силы наживки", + "BaitRequired": "Для ловли рыбы нужна наживка", + "Bright": "Яркий", + "Buy": "Купить", + "BuyWithValue": "Купить ({0})", + "Cancel": "Отмена", + "Change": "Изменить", + "Clear": "Ясно", + "Cloudy": "Облачно", + "CompassCenter": "Центр", + "CompassEast": "{0} на восток", + "CompassWest": "{0} на запад", + "Depth": "{0}", + "DepthLevel": "Уровень", + "Disabled": "Отключено", + "DPS": "{0} ед. урона в секунду", + "EastWind": " ({0} миль в час с востока)", + "Enabled": "Включено", + "EnemiesNearby": "Врагов поблизости: {0}!", + "Expert": "Эксперт", + "Faded": "Полупрозрачный", + "FirstQuarter": "Первая четверть", + "FishingPower": "Мастерство рыбалки {0}", + "FishingWarning": "Внимание!", + "FullFishingPower": "Мастерство рыбалки {0} ({1} %)", + "FullMoon": "Полнолуние", + "HairStyle": "Прическа", + "HeatDistortion": "Марево от тепла: {0}", + "HeavyRain": "Тяжелый дождь", + "Hidden": "Скрыто", + "LayerCaverns": "Пещеры", + "LayerSpace": "Космос", + "LayerSurface": "Поверхность", + "LayerUnderground": "Подземелье", + "LayerUnderworld": "Преисподня", + "LightRain": "Легкий дождь", + "MechanicalRulerOff": "Механическая линейка ВЫКЛ.", + "MechanicalRulerOn": "Механическая линейка ВКЛ.", + "MostlyCloudy": "Преимущественно облачно", + "NewMoon": "Новолуние", + "NoDPS": "Н/Д", + "NoEnemiesNearby": "Нет врагов поблизости", + "NoKillCount": "Счетчик убийств недоступен", + "NoRareCreatures": "Нет редких существ поблизости", + "Normal": "Обычная", + "NotEnoughWater": "Недостаточно воды!", + "NoTreasureNearby": "Нет сокровищ поблизости", + "OneEnemyNearby": "1 враг поблизости!", + "OreDetected": "{0} обнаружено поблизости!", + "Overcast": "Густая облачность", + "PaintSprayerOff": "Краскопульт ВЫКЛ.", + "PaintSprayerOn": "Краскопульт ВКЛ.", + "PartlyCloudy": "Местами облачно", + "PlayerDistance": "({0} ф.)", + "PrecentFishingPower": "Мастерство рыбалки {0} %", + "Rain": "Дождь", + "RulerOff": "Линейка ВЫКЛ.", + "RulerOn": "Линейка ВКЛ.", + "SettingsMenu": "Меню настроек", + "OpenFileFolder": "{$LegacyInterface.110}", + "Speed": "{0} миль в час", + "StormEffects": "Эффекты шторма: {0}", + "ThirdQuarter": "Третья четверть", + "WaningCrescent": "Старая луна", + "WaningGibbous": "Убывающая луна", + "WaxingCrescent": "Молодая луна", + "WaxingGibbous": "Растущая луна", + "WestWind": " ({0} миль в час на запад)", + "WireModeForced": "Отображение механических элементов: принудительное", + "WireModeNormal": "Отображение механических элементов: обычное", + "Gameplay": "Геймплей", + "GameZoom": "Увеличение: {0} % ({1} %)", + "LightingUpdateEveryFrameOff": "Быстрое освещение ВЫКЛ.", + "LightingUpdateEveryFrameOn": "Быстрое освещение ВКЛ.", + "Misc": "Другое", + "QualityHigh": "Высокое", + "QualityLow": "Низкое", + "QualityMedium": "Среднее", + "QualityOff": "ВЫКЛ.", + "UIScale": "Масштаб пользовательского интерфейса: {0} % ({1} %)", + "WaveQuality": "Качество волн: {0}", + "ZoomCategory": "Приближение" + }, + "Misc": { + "ForceWaterSettling": "Принудительно финализирует положение воды.", + "ResolutionChanged": "Разрешение изменено на: {0}x{1}.", + "ShortDays": "дн.", + "ShortHours": "ч", + "ShortMinutes": "м", + "ShortSeconds": "с", + "WaterSettled": "Положение воды финализировано." + }, + "Net": { + "CheatingInvalid": "Обнаружена попытка жульничества: Неверное исключение", + "CheatingLiquidSpam": "Обнаружена попытка жульничества: Спам жидкости", + "CheatingProjectileSpam": "Обнаружена попытка жульничества: Спам боеприпасов", + "CheatingTileRemovalSpam": "Обнаружена попытка жульничества: Спам убирания проводов", + "CheatingTileSpam": "Обнаружена попытка жульничества: Спам добавления блоков", + "ClientConnecting": "{0} подключается...", + "ClientPlaying": "({0}) {1} в игре", + "ClientRequestedWorldInfo": "({0}) {1} запрашивает информацию о мире", + "ClientsConnected": "Подключено клиентов: {0}", + "ClientSendingData": "({0}) {1} отправляет данные игрока...", + "ClientStatusComplete": "({0}) {1} {2}: Выполнено!", + "ConnectingTo": "Подключение к {0}", + "EmptyName": "Пустое имя.", + "FoundServer": "Найден сервер", + "IsReceivingTileData": "получает данные о блоках", + "LostConnection": "Соединение потеряно", + "NameTooLong": "Слишком длинное имя.", + "RequestingTileData": "Запрос данных о блоках", + "RequestingWorldInformation": "Запрос информации о мире", + "SendingPlayerData": "Отправка данных игрока...", + "ServerAutoShutdown": "Остался локальный игрок. Автоматическое отключение началось.", + "StatusComplete": "{0} Выполнено!", + "WaitingForClients": "Ожидание клиентов..." + }, + "Social": { + "Joining": "Присоединение...", + "JoiningFriend": "Присоединение к {0}...", + "StatusInGame": "В игре по сети.", + "StatusJoining": "Присоединение к игре." + }, + "UI": { + "Achievements": "Достижения", + "Back": "Назад", + "Cancel": "Отмена", + "Delete": "Удалить", + "Effects": "Эффекты", + "EnterButton": "Вход", + "EnterMessage": "Введите сообщение:", + "EnterNewName": "Введите новое имя:", + "Expert": "Эксперт", + "ExpertDescription": "(намного более высокая сложность и лучшая добыча)", + "ExpertDescriptionFlavor": "Везение и слава, малыш.", + "Favorite": "Избранное", + "Hardcore": "Сложный режим", + "Keybindings": "Привязка клавиш", + "Mediumcore": "Средняя", + "More": "больше", + "MoveOffCloud": "Двигаться от облака", + "MoveToCloud": "Переместить в облако", + "New": "Новое", + "Normal": "Обычная", + "LightMode_White": "{$LegacyMenu.56}", + "LightMode_Color": "{$LegacyMenu.55}", + "Play": "Играть", + "RestoreButton": "Восстановить", + "Save": "Сохранить", + "SelectPlayer": "Выберите игрока", + "SelectWorld": "Выберите мир", + "Softcore": "Низкая", + "SpaceButton": "Пробел", + "Submit": "Подтвердить", + "Unfavorite": "Убрать из избранного", + "WorldCreatedFormat": "Создано: {0}", + "WorldSizeFormat": "Мир {0}", + "WorldSizeLarge": "Большой", + "WorldSizeMedium": "Средний", + "WorldSizeSmall": "Маленький", + "WorldSizeUnknown": "Неизвестно", + "BartenderHelp": "Этерианский кристалл", + "CopySeed": "Копировать семечко: {0}", + "EnterSeed": "Укажите семечко (не заполняйте для случайного выбора)", + "LoadingCode": "Загрузка:", + "SeedCopied": "Семечко скопировано", + "ZoomIn": "{$LegacyMenu.168}", + "ZoomOut": "{$LegacyMenu.169}", + "Ellipsis": "...", + "LightMode_Retro": "{$LegacyMenu.57}", + "LightMode_Trippy": "{$LegacyMenu.58}", + "PlayerEmptyName": "{$Net.EmptyName}" + }, + "DeathSource": { + "NPC": "{0} игроком {1}.", + "Player": "{0} оружием {2} игрока {1}.", + "Projectile": "{0} игроком {1}." + }, + "DeathText": { + "Burned": "Игрок {0} не смог погасить огонь.", + "Default": "{0}.", + "Drowned_1": "Игрок {0} забыл, как дышать.", + "Drowned_2": "Игрок {0} спит на дне.", + "Drowned_3": "Игрок {0} утонул.", + "Drowned_4": "Игрок {0} пошел на корм акулам.", + "Electrocuted": "Игрок {0} не выдержал напряжения.", + "Fell_1": "Игрок {0} разбился насмерть.", + "Fell_2": "Игрок {0} не отскочил.", + "Lava_1": "Игрок {0} был расплавлен.", + "Lava_2": "Игрок {0} превратился в пепел.", + "Lava_3": "Игрок {0} попытался плавать в лаве.", + "Lava_4": "Игрок {0} любит играть в магме.", + "Petrified_1": "{0} разлетелся на куски", + "Petrified_3": "Игрока {0} нужно смести в кучу.", + "Petrified_4": "Игрок {0} стал еще одной кучкой мусора.", + "Poisoned": "Игрок {0} не смог найти противоядие.", + "Slain": "Игрок {0} убит.", + "Stabbed": "Игрок {0} был слизан.", + "Suffocated": "Игрок {0} не смог дышать.", + "Teleport_1": "Игрок {0} не материализовался", + "Teleport_2_Female": "Игрок {0} оказалась с ногами вместо головы", + "Teleport_2_Male": "Игрок {0} оказался с ногами вместо головы", + "TriedToEscape": "Игрок {0} попытался сбежать.", + "WasLicked": "Игрок {0} был слизан." + }, + "DeathTextGeneric": { + "ArmTornOff": "Игроку {0} оторвали руки", + "Chopped": "Игрок {0} был нарублен", + "Cut": "Игрок {0} был разрезан пополам", + "Decapitated": "Игрок {0} был обезглавлен", + "Destroyed": "Игрок {0} был уничтожен", + "Dissected": "Игрок {0} был жестоко расчленен", + "EntrailsRippedOut": "Игроку {0} выпустили внутренности", + "Eviscerated": "Игрок {0} был выпотрошен", + "ExtremitiesDetached": "Конечности игрока {0} были отделены от тела", + "FaceTornOff": "Лицо игрока {0} было разорвано", + "Flailing": "Мучения игрока {0} были прерваны", + "HeadRemoved": "Голова игрока {0} была отделена от тела", + "Impaled": "Игрок {0} был проколот", + "InnardsBecameOutards": "Игрок {0} увидел свои внутренности снаружи", + "Mangled": "Тело игрока {0} было искалечено", + "Massacred": "Игрок {0} был принесен в жертву", + "Murdered": "Игрок {0} был убит", + "PileOfFlesh": "Игрок {0} был превращен в кучку плоти", + "Plead": "Игрок {0} молил о смерти и был услышан", + "Removed": "Игрок {0} был устранен из мира", + "Ripped": "Мясо игрока {0} было отделено от костей", + "Ruptured": "Жизненно важные органы игрока {0} были раздавлены", + "SkullCrushed": "Череп игрока {0} был раздавлен", + "Slain": "Игрок {0} убит", + "Snapped": "Игрок {0} был сложен вдвое", + "TornInHalf": "Игрок {0} был разорван напополам" + }, + "DungeonDefenders2": { + "BartenderWarning": "Этерианский кристалл не принимает эту зону и мгновенно телепортируется; трактирщик говорил, что кристалл перемещается на свободный ровный участок...", + "CantSummonTower": "Похоже, это не работает без этерианского кристалла поблизости...", + "InvasionProgressTitle": "Армия Старца", + "InvasionStart": "Приближается армия Старца!", + "InvasionWin": "Армия Старца побеждена!", + "WaveComplete": "Волна пройдена!" + }, + "Key": { + "DOWN": "ВНИЗ", + "UP": "ВВЕРХ" + }, + "Language": { + "English": "English (Английский)", + "German": "Deutsch (Немецкий)", + "Italian": "Italiano (Итальянский)", + "French": "Français (Французский)", + "Spanish": "Español (Испанский)", + "Russian": "Русский", + "Chinese": "简体中文 (Китайский упрощенный)", + "Portuguese": "Português brasileiro (Португальский (бразильский))", + "Polish": "Polski (Польский)" + }, + "RandomWorldName_Composition": { + "6": "{Adjective} {Location}" + } +} \ No newline at end of file diff --git a/Localization/Content/ru-RU/Game.json b/Localization/Content/ru-RU/Game.json new file mode 100644 index 0000000..968ff78 --- /dev/null +++ b/Localization/Content/ru-RU/Game.json @@ -0,0 +1,780 @@ +{ + "Announcement": { + "HasBeenDefeated_Plural": "{0} побеждены!", + "HasBeenDefeated_Single": "{0} побежден!", + "HasAwoken": "Пробудился босс {0}!", + "HasArrived": "Босс {0} прибыл!" + }, + "ArmorSetBonus": { + "MetalTier1": "2 ед. защиты", + "MetalTier2": "3 ед. защиты", + "CobaltRanged": "Шанс 20 % не потратить боеприпасы", + "MythrilCaster": "Снижает использование маны на 17 %", + "MythrilMelee": "Увеличивает шанс критического урона в ближнем бою на 5 %", + "MythrilRanged": "Шанс 20 % не потратить боеприпасы", + "AdamantiteCaster": "Снижает использование маны на 19 %", + "AdamantiteMelee": "Увеличивает скорость ближнего боя и передвижения на 18 %", + "AdamantiteRanged": "Шанс 25 % не потратить боеприпасы", + "ShadowScale": "Увеличивает скорость движения на 15 %", + "Wood": "1 ед. защиты", + "Crimson": "Значительно ускоряет восстановление жизни", + "Frost": "Ближние и дистанционные атаки вызывают ледяной ожог", + "Tiki": "Увеличивает ваше максимальное количество питомцев", + "Palladium": "Значительно ускоряет восстановление жизни после удара по врагу", + "Orichalcum": "На вашего врага будут падать лепестки цветов, нанося дополнительный урон", + "Titanium": "Получение невосприимчивости после удара по врагу", + "Chlorophyte": "Призывает мощный лиственный кристалл, который стреляет в ближайших врагов", + "Wizard": "Увеличивает шанс критического магического урона на 10 %", + "Meteor": "Космическая пушка стоит 0 маны", + "SpectreHealing": "Игроки с наименьшим количеством здоровья исцеляются на значение магического урона, нанесенного врагам", + "Shroomite": "Неподвижность дает невидимость,\nчто увеличивает дистанционные способности и снижает шанс врагов попасть в вас", + "Platinum": "4 ед. защиты", + "Pumpkin": "Увеличивает урон на 10 %", + "Spooky": "Увеличивает урон питомца на 25 %", + "SpectreDamage": "Магические атаки также будут наносить урон соседним врагам", + "MagicHat": "Увеличивает максимум маны на 60", + "BeetleDefense": "Жуки защищают вас от урона", + "BeetleDamage": "Жуки увеличивают вашу скорость и урон в ближнем бою", + "Bee": "Увеличивает урон питомца на 10 %", + "Spider": "Увеличивает урон питомца на 12 %", + "Vortex": "Дважды коснитесь {0}, чтобы включить невидимость,\nкоторая увеличивает дистанционные способности и снижает шанс врагов попасть в вас, но уменьшает вашу скорость движения", + "Stardust": "Дважды коснитесь {0}, чтобы направить вашего охранника в нужное место", + "Forbidden": "Дважды коснитесь {0}, чтобы вызвать старинный шторм в место курсора", + "Jungle": "Снижает использование маны на 16 %", + "Molten": "Увеличивает урон в ближнем бою на 17 %", + "Mining": "Увеличивает скорость добычи руды на 30 %", + "CobaltCaster": "Снижает использование маны на 14 %", + "CobaltMelee": "Увеличивает скорость ближнего боя 15 %", + "ApprenticeTier2": "Увеличивает ваше максимальное количество стражников\nПоле зрения и дальность стрельбы огнеметных стражников значительно увеличены", + "ApprenticeTier3": "Увеличивает ваше максимальное количество стражников\nСильно увеличивает эффективность огнеметных стражников", + "HuntressTier2": "Увеличивает ваше максимальное количество стражников\nЛовушки со взрывчаткой перезаряжаются быстрее и покрывают врагов маслом\nПоджигает врагов в масле, нанося дополнительный урон", + "HuntressTier3": "Увеличивает ваше максимальное количество стражников\nЗначительно увеличивает эффективность ловушек со взрывчаткой ", + "MonkTier2": "Увеличивает ваше максимальное количество стражников\nАура света теперь может наносить критический урон и бьет быстрее", + "MonkTier3": "Увеличивает ваше максимальное количество стражников\nЗначительно увеличивает эффективность Ауры света", + "SquireTier2": "Увеличивает ваше максимальное количество стражников\nБаллиста пронзает больше целей и паникует, когда вам наносится урон", + "SquireTier3": "Увеличивает ваше максимальное количество стражников\nЗначительно увеличивает эффективность баллисты" + }, + "BuffDescription": { + "AmmoBox": "Шанс 20 % не потратить боеприпасы", + "AmmoReservation": "Шанс 20 % не потратить боеприпасы", + "Archery": "Урон и скорость полета стрел увеличены на 20 %", + "BabyDinosaur": "Детеныш динозавра следует за вами", + "BabyEater": "Детеныш пожирателя душ следует за вами", + "BabyFaceMonster": "Детеныш лицевого монстра следует за вами", + "BabyGrinch": "Малыш Гринч следует за вами", + "BabyHornet": "Думает, что вы — его мама", + "BabyPenguin": "Думаю, он хочет вашу рыбку", + "BabySkeletronHead": "Даже не спрашивайте...", + "BabySlime": "Слизнячок сражается за вас", + "BabySnowman": "За вами следует детеныш снеговика", + "BabyTruffle": "Это тааак мило!", + "BallistaPanic": "Ваши баллисты быстро стреляют в панике!", + "BasiliskMount": "Бьет по всему... и по ВСЕМ!", + "Battle": "Ускоренное воскрешение врагов", + "BeeMount": "Бззз-бззз-бззз", + "BeetleEndurance1": "Получаемый урон снижен на 15 %", + "BeetleEndurance2": "Получаемый урон снижен на 30 %", + "BeetleEndurance3": "Получаемый урон снижен на 45 %", + "BeetleMight1": "Урон в ближнем бою и скорость увеличены на 10 %", + "BeetleMight2": "Урон в ближнем бою и скорость увеличены на 20 %", + "BeetleMight3": "Урон в ближнем бою и скорость увеличены на 30 %", + "BetsysCurse": "Снижает защиту", + "Bewitched": "Увеличивает максимальное количество питомцев", + "BlackCat": "За вами следует черный котенок", + "Blackout": "Значительно уменьшает видимость", + "Bleeding": "Не может восстанавливать жизнь", + "BoneJavelin": "Кровоточит", + "BrokenArmor": "Защита уменьшается наполовину", + "Builder": "Увеличивает скорость и дистанцию укладки блоков", + "BunnyMount": "Вам очень хочется морковки", + "Burning": "Потеря жизни и замедленное движение", + "DesertMinecartRight": "{$BuffDescription.MinecartRight}", + "Campfire": "Восстановление жизни немного ускорено", + "ChaosState": "При использовании жезла раздора расходуется жизнь", + "Chilled": "Скорость движения снижена", + "Clairvoyance": "Магические способности снижены", + "CompanionCube": "Никогда не будет грозить лизнуть вас и, впрочем, не может говорить", + "Confused": "Движение в противоположном направлении", + "Crate": "Увеличивает шанс выловить ящик", + "CrimsonHeart": "Магическое сердце, излучающее свет", + "Cursed": "Невозможно использовать предметы", + "CursedInferno": "Теряет здоровье", + "CursedSapling": "За вами следует проклятое растеньице", + "CuteFishronMount": "Просто не давайте ему ползти.", + "Dangersense": "Вы видите ближайшие опасности", + "Darkness": "Ухудшенное зрение на свету", + "Daybreak": "Сжигается солнечными лучами", + "Dazed": "Движение значительно замедлено", + "DeadlySphere": "Смертельная сфера будет сражаться за вас", + "DrillMount": "Ездит на летающем буре", + "DryadsWard": "Вас защищает сила природы", + "DryadsWardDebuff": "Вас принуждает сила природы", + "Electrified": "Вы не можете двигаться", + "Endurance": "Получаемый урон снижен на 10 %", + "EyeballSpring": "За вами следует прыгающий глаз", + "FairyBlue": "За вами следует фея", + "FairyGreen": "За вами следует фея", + "FairyRed": "За вами следует фея", + "Featherfall": "Нажми ВВЕРХ или ВНИЗ, чтобы контролировать скорость спуска", + "DesertMinecartLeft": "{$BuffDescription.MinecartLeft}", + "Flipper": "Движение, как в обычной воде", + "Frostburn": "Либо очень горячее, либо очень холодное. В любом случае, это ОЧЕНЬ больно", + "Frozen": "Вы не можете двигаться!", + "Gills": "Позволяет дышать водой вместо воздуха", + "Gravitation": "Нажмите ВВЕРХ, чтобы изменить гравитацию", + "HeartLamp": "Восстановление жизни ускорено", + "Heartreach": "Увеличивает дистанцию сбора сердец", + "Honey": "Восстановление жизни ускорено", + "HornetMinion": "За вас сражается шершень", + "Horrified": "Вы увидели что-то мерзкое, и выхода не было.", + "Hunter": "Показывает местоположение врагов", + "IceBarrier": "Получаемый урон снижен на 25 %", + "Ichor": "Сниженная защита", + "ImpMinion": "За вас сражается бес", + "Inferno": "Враги поблизости воспламеняются", + "Invisibility": "Дает невидимость", + "Ironskin": "Увеличивает защиту на 8", + "LeafCrystal": "Стреляет кристаллами в ближайших врагов", + "Lifeforce": "Увеличивает макс. уровень здоровья на 20 %", + "Lovestruck": "Вы влюблены!", + "MagicLantern": "Ваш путь освещает зачарованный фонарь", + "MagicPower": "Увеличивает магический урон на 20 %", + "ManaRegeneration": "Ускоряет регенерацию маны", + "ManaSickness": "Наносимый магический урон снижен на ", + "Merfolk": "Можно легко дышать и двигаться под водой", + "Midas": "Терять больше денег при смерти", + "MinecartLeft": "Едет в вагонетке", + "MinecartLeftMech": "Едет в вагонетке", + "MinecartLeftWood": "Едет в вагонетке", + "MinecartRight": "Едет в вагонетке", + "MinecartRightMech": "Едет в вагонетке", + "MinecartRightWood": "Едет в вагонетке", + "MiniMinotaur": "Как вы победите мини-минотавра?", + "Mining": "Увеличивает скорость добычи руды", + "MonsterBanner": "Увеличенные урон и защита от следующего:", + "MoonLeech": "Вы не можете получать эффекты исцеления", + "NebulaUpDmg1": "Увеличенный урон на 15 %", + "NebulaUpDmg2": "Увеличенный урон на 30 %", + "NebulaUpDmg3": "Увеличенный урон на 45 %", + "NebulaUpLife1": "Ускоренная регенерация здоровья", + "NebulaUpLife2": "Ускоренная регенерация здоровья", + "NebulaUpLife3": "Ускоренная регенерация здоровья", + "NebulaUpMana1": "Ускоренная регенерация маны", + "NebulaUpMana2": "Ускоренная регенерация маны", + "NebulaUpMana3": "Ускоренная регенерация маны", + "NightOwl": "Улучшенное ночное зрение", + "NoBuilding": "Вы утратили силу создателя!", + "ObsidianSkin": "Невосприимчивость к лаве", + "Obstructed": "Вы не можете видеть!", + "OgreSpit": "Движение сильно затруднено", + "Oiled": "Получает больше урона от огня", + "OnFire": "Медленно теряет здоровье", + "PaladinsShield": "25 % полученного урона будет перенаправлено другому игроку", + "Panic": "Скорость движения повышена", + "ParryDamageBuff": "+ 500 % к урону от следующего удара ближнего боя", + "PeaceCandle": "Уменьшенная скорость возрождения монстров", + "PetBunny": "Думаю, он хочет вашу морковку", + "PetDD2Dragon": "За вами следует жаднодракон", + "PetDD2Gato": "За вами следует котопропеллер", + "PetDD2Ghost": "За вами следует огонек", + "PetLizard": "Холодный как рептилия", + "FishMinecartRight": "{$BuffDescription.MinecartRight}", + "PetSapling": "За вами следует растеньице", + "PetSpider": "За вами следует паук", + "PetTurtle": "Счастливое черепашье время!", + "PigronMount": "Теперь ты меня видишь...", + "PirateMinion": "За вас сражается пират", + "Poisoned": "Медленно теряет здоровье", + "PotionSickness": "Невозможно использовать лечащие предметы", + "Puppy": "Щенок следует за вами", + "Pygmies": "Пигмеи сражаются за вас", + "Rabies": "Увеличенный урон, замедленное восстановление жизни, накладывает статусные эффекты", + "Rage": "Увеличивает шанс критического удара на 10 %", + "RapidHealing": "Восстановление жизни значительно ускорено", + "Ravens": "Вороны атакуют ваших врагов", + "Regeneration": "Восстанавливает жизнь", + "Rudolph": "Ездит на красноносом северном олене", + "ScutlixMount": "Пиф-паф", + "ShadowDodge": "Вы уклонитесь от следующей атаки", + "ShadowFlame": "Теряет здоровье", + "ShadowOrb": "Магическая сфера, излучающая свет", + "SharknadoMinion": "Акулонадо будет сражаться за вас", + "Sharpened": "Оружие ближнего боя пробивает броню", + "Shine": "Светится", + "Silenced": "Нельзя использовать предметы, требующие маны", + "Slimed": "Вы скользкие и липкие", + "SlimeMount": "БДЫНЬ!", + "Slow": "Скорость движения снижена", + "SolarShield1": "Получаемый урон снижен на 30 %, отпугивает врагов при получении урона", + "SolarShield2": "Получаемый урон снижен на 30 %, отпугивает врагов при получении урона", + "SolarShield3": "Получаемый урон снижен на 30 %, отпугивает врагов при получении урона", + "Sonar": "Вы видите, какая рыба клюет", + "SoulDrain": "Ускоренная регенерация здоровья", + "Spelunker": "Показывает местоположение сокровищ и руды", + "SpiderMinion": "Паук будет сражаться за вас", + "Squashling": "За вами следует тыковка", + "StardustDragonMinion": "Вас защищает дракон звездной пыли", + "StardustGuardianMinion": "Вас защищает хранитель звездной пыли", + "StardustMinion": "За вас сражается клетка звездной пыли", + "StardustMinionBleed": "поедается клетками", + "StarInBottle": "Ускоренная регенерация маны", + "Stinky": "Вы ужасно воняете", + "Stoned": "Вы окаменели!", + "Suffocation": "Теряет здоровье", + "Summoning": "Увеличивает максимальное количество питомцев", + "Sunflower": "Скорость движения увеличена, скорость воскрешения монстров снижена", + "SuspiciousTentacle": "Подозрительно выглядящий глаз, излучающий свет", + "Swiftness": "Увеличивает скорость движения на 25 %", + "TheTongue": "Вас затянуло в рот", + "Thorns": "Атакующие тоже получают урон", + "TikiSpirit": "Дружелюбный дух следует за вами", + "Tipsy": "Увеличивает способности в ближнем бою, снижает защиту", + "Titan": "Увеличивает отбрасывание", + "TurtleMount": "Замедляется на земле, увеличивается в море", + "TwinEyesMinion": "За вас сражаются близнецы", + "UFOMinion": "За вас сражается НЛО", + "UFOMount": "Хорошо, если у вас есть MAC", + "UnicornMount": "Заряд вперед... невероятно!", + "Venom": "Теряет здоровье", + "VortexDebuff": "Притяжение вокруг вас искажается", + "Warmth": "Снижает урон от источников холода", + "WaterCandle": "Увеличивает скорость возрождения монстров", + "WaterWalking": "Нажми ВНИЗ, чтобы войти в воду", + "Weak": "Физические способности снижены", + "WeaponImbueConfetti": "Ближние атаки вызывают появление конфетти", + "WeaponImbueCursedFlames": "Ближние атаки накладывают на врагов проклятый огонь", + "WeaponImbueFire": "Ближние атаки поджигают врагов", + "WeaponImbueGold": "При ближних атаках враги оставляют больше золота", + "WeaponImbueIchor": "Ближние атаки снижают защиту врагов", + "WeaponImbueNanites": "Ближние атаки накладывают на врагов запутанность", + "WeaponImbuePoison": "Ближние атаки отравляют врагов", + "WeaponImbueVenom": "Ближние атаки накладывают на ваши цели эффект яда", + "Webbed": "Вы застряли", + "FishMinecartLeft": "{$BuffDescription.MinecartLeft}", + "Werewolf": "Физические способности повышены", + "Wet": "С вас капает вода", + "WindPushed": "Вас сдвигает ветер!", + "Wisp": "За вами следует дух", + "WitheredArmor": "Ваша броня снижена!", + "WitheredWeapon": "Ваши атаки ослаблены!", + "Wrath": "Увеличивает урон на 10 %", + "ZephyrFish": "Любит плавать вокруг вас", + "BeeMinecartRight": "{$BuffDescription.MinecartRight}", + "BeeMinecartLeft": "{$BuffDescription.MinecartLeft}", + "LadybugMinecartRight": "{$BuffDescription.MinecartRight}", + "LadybugMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PigronMinecartRight": "{$BuffDescription.MinecartRight}", + "PigronMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SunflowerMinecartRight": "{$BuffDescription.MinecartRight}", + "SunflowerMinecartLeft": "{$BuffDescription.MinecartLeft}", + "HellMinecartRight": "{$BuffDescription.MinecartRight}", + "HellMinecartLeft": "{$BuffDescription.MinecartLeft}", + "ShroomMinecartRight": "{$BuffDescription.MinecartRight}", + "ShroomMinecartLeft": "{$BuffDescription.MinecartLeft}", + "AmethystMinecartRight": "{$BuffDescription.MinecartRight}", + "AmethystMinecartLeft": "{$BuffDescription.MinecartLeft}", + "TopazMinecartRight": "{$BuffDescription.MinecartRight}", + "TopazMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SapphireMinecartRight": "{$BuffDescription.MinecartRight}", + "SapphireMinecartLeft": "{$BuffDescription.MinecartLeft}", + "EmeraldMinecartRight": "{$BuffDescription.MinecartRight}", + "EmeraldMinecartLeft": "{$BuffDescription.MinecartLeft}", + "RubyMinecartRight": "{$BuffDescription.MinecartRight}", + "RubyMinecartLeft": "{$BuffDescription.MinecartLeft}", + "DiamondMinecartRight": "{$BuffDescription.MinecartRight}", + "DiamondMinecartLeft": "{$BuffDescription.MinecartLeft}", + "AmberMinecartRight": "{$BuffDescription.MinecartRight}", + "AmberMinecartLeft": "{$BuffDescription.MinecartLeft}", + "BeetleMinecartRight": "{$BuffDescription.MinecartRight}", + "BeetleMinecartLeft": "{$BuffDescription.MinecartLeft}", + "MeowmereMinecartRight": "{$BuffDescription.MinecartRight}", + "MeowmereMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PartyMinecartRight": "{$BuffDescription.MinecartRight}", + "PartyMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PirateMinecartRight": "{$BuffDescription.MinecartRight}", + "PirateMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SteampunkMinecartRight": "{$BuffDescription.MinecartRight}", + "SteampunkMinecartLeft": "{$BuffDescription.MinecartLeft}", + "CoffinMinecartRight": "{$BuffDescription.MinecartRight}", + "CoffinMinecartLeft": "{$BuffDescription.MinecartLeft}" + }, + "BuffName": { + "AmmoBox": "Ящик с боеприпасами", + "AmmoReservation": "Экономия патронов", + "Archery": "Лучник", + "BabyDinosaur": "Детеныш динозавра", + "BabyEater": "Детеныш пожирателя", + "BabyFaceMonster": "Детеныш лицевого монстра", + "BabyGrinch": "Малыш Гринч", + "BabyHornet": "Детеныш шершня", + "BabyPenguin": "Детеныш пингвина", + "BabySkeletronHead": "Детеныш головы Скелетрона", + "BabySlime": "Слизнячок", + "BabySnowman": "Детеныш снеговика", + "BabyTruffle": "Детеныш трюфеля", + "BallistaPanic": "Баллиста в панике!", + "BasiliskMount": "Ездовой василиск", + "Battle": "Бой", + "BeeMount": "Ездовая пчела", + "BeetleEndurance1": "Жучья выносливость", + "BeetleEndurance2": "Жучья выносливость", + "BeetleEndurance3": "Жучья выносливость", + "BeetleMight1": "Жучья сила", + "BeetleMight2": "Жучья сила", + "BeetleMight3": "Жучья сила", + "BetsysCurse": "Проклятие Бетси", + "Bewitched": "Колдовство", + "BlackCat": "Черная кошка", + "Blackout": "Затемнение", + "Bleeding": "Кровотечение", + "BoneJavelin": "Проникновение", + "BrokenArmor": "Сломанная броня", + "Builder": "Строитель", + "BunnyMount": "Ездовой кролик", + "Burning": "Ожог", + "Calm": "Спокойствие", + "Campfire": "Уютный огонь", + "ChaosState": "Состояние хаоса", + "Chilled": "Охлаждение", + "Clairvoyance": "Ясновидение", + "CompanionCube": "Куб-спутник", + "Confused": "Запутанность", + "Crate": "Ящики", + "CrimsonHeart": "Багряное сердце", + "Cursed": "Проклятие", + "CursedInferno": "Проклятие ада", + "CursedSapling": "Проклятое растеньице", + "CuteFishronMount": "Милый ездовой Рыброн", + "Dangersense": "Чувство опасности", + "Darkness": "Тьма", + "Daybreak": "Заря", + "Dazed": "Ошеломление", + "DeadlySphere": "Смертельная сфера", + "DrillMount": "Ездовой бур", + "DryadsWard": "Благословение Дриады", + "DryadsWardDebuff": "Проклятие Дриады", + "Electrified": "Электризация", + "Endurance": "Выносливость", + "EyeballSpring": "Прыгающий глаз", + "FairyBlue": "Фея", + "FairyGreen": "Фея", + "FairyRed": "Фея", + "Featherfall": "Перышки", + "Fishing": "Рыбалка", + "Flipper": "Ласты", + "Frostburn": "Ледяной ожог", + "Frozen": "Заморозка", + "Gills": "Жабры", + "Gravitation": "Гравитация", + "HeartLamp": "Сердечная лампа", + "Heartreach": "Сердечный магнит", + "Honey": "Мед", + "HornetMinion": "Шершень", + "Horrified": "В ужасе", + "Hunter": "Охотник", + "IceBarrier": "Ледяная преграда", + "Ichor": "Ихор", + "ImpMinion": "Бес", + "Inferno": "Инферно", + "Invisibility": "Невидимость", + "Ironskin": "Железная кожа", + "LeafCrystal": "Лиственный кристалл", + "Lifeforce": "Жизненная сила", + "Lovestruck": "Влюбленность", + "MagicLantern": "Магический светильник", + "MagicPower": "Магическая сила", + "ManaRegeneration": "Регенерация маны", + "ManaSickness": "Болезнь маны", + "Merfolk": "Морской народ", + "Midas": "Мидас", + "MinecartLeft": "Вагонетка", + "MinecartLeftMech": "Вагонетка", + "MinecartLeftWood": "Вагонетка", + "MinecartRight": "Вагонетка", + "MinecartRightMech": "Вагонетка", + "MinecartRightWood": "Вагонетка", + "MiniMinotaur": "Мини-минотавр", + "Mining": "Добыча", + "MonsterBanner": "Знамя", + "MoonLeech": "Лунный камень", + "NebulaUpDmg1": "Туманность урона", + "NebulaUpDmg2": "Туманность урона", + "NebulaUpDmg3": "Туманность урона", + "NebulaUpLife1": "Туманность жизни", + "NebulaUpLife2": "Туманность жизни", + "NebulaUpLife3": "Туманность жизни", + "NebulaUpMana1": "Туманность маны", + "NebulaUpMana2": "Туманность маны", + "NebulaUpMana3": "Туманность маны", + "NightOwl": "Полуночник", + "NoBuilding": "Креативный шок", + "ObsidianSkin": "Обсидиановая кожа", + "Obstructed": "Затемнение", + "OgreSpit": "Тормоз", + "Oiled": "В масле", + "OnFire": "Горит!", + "PaladinsShield": "Щит паладина", + "Panic": "Паника!", + "ParryDamageBuff": "Ударный момент", + "PeaceCandle": "Свеча спокойствия", + "PetBunny": "Ручной кролик", + "PetDD2Dragon": "Жаднодракон", + "PetDD2Gato": "Котопропеллер", + "PetDD2Ghost": "Огонек", + "PetLizard": "Ручная ящерица", + "PetParrot": "Ручной попугай", + "PetSapling": "Растеньице", + "PetSpider": "Ручной паук", + "PetTurtle": "Ручная черепаха", + "PigronMount": "Ездовой свинодракон", + "PirateMinion": "Пират", + "Poisoned": "Яд", + "PotionSickness": "Послезельевая болезнь", + "Puppy": "Щенок", + "Pygmies": "Пигмеи", + "Rabies": "Укус зверя", + "Rage": "Ярость", + "RapidHealing": "Быстрое лечение", + "Ravens": "Вороны", + "Regeneration": "Регенерация", + "Rudolph": "Рудольф", + "ScutlixMount": "Ездовой скутликс", + "DesertMinecartRight": "{$BuffName.MinecartRight}", + "ShadowFlame": "Теневое пламя", + "ShadowOrb": "Сфера тени", + "SharknadoMinion": "Акулонадо", + "Sharpened": "Заточено", + "Shine": "Сияние", + "Silenced": "Немота", + "Slimed": "Слизень", + "SlimeMount": "Ездовой слизень", + "Slow": "Медленный", + "SolarShield1": "Солнечное пламя", + "SolarShield2": "Солнечное пламя", + "SolarShield3": "Солнечное пламя", + "Sonar": "Сонар", + "SoulDrain": "Похититель жизни", + "Spelunker": "Спелеолог", + "SpiderMinion": "Паук", + "Squashling": "Тыковка", + "StardustDragonMinion": "Дракон звездной пыли", + "StardustGuardianMinion": "Хранитель звездной пыли", + "StardustMinion": "Клетка звездной пыли", + "StardustMinionBleed": "В клетке", + "StarInBottle": "Звезда в бутылке", + "Stinky": "Вонь", + "Stoned": "Окаменение", + "Suffocation": "Удушье", + "Summoning": "Призыватель", + "Sunflower": "Счастье!", + "SuspiciousTentacle": "Подозрительно выглядящий глаз", + "Swiftness": "Скорость", + "TheTongue": "Язык", + "Thorns": "Шипы", + "TikiSpirit": "Дух Тики", + "Tipsy": "Опьянение", + "Titan": "Титан", + "TurtleMount": "Ездовая черепаха", + "TwinEyesMinion": "Близнецы", + "UFOMinion": "НЛО", + "UFOMount": "Ездовое НЛО", + "UnicornMount": "Ездовой единорог", + "Venom": "Яд", + "VortexDebuff": "Искажение", + "Warmth": "Согревание", + "WaterCandle": "Водяная свеча", + "WaterWalking": "Хождение по воде", + "Weak": "Слабый", + "WeaponImbueConfetti": "Насыщение оружия: конфетти", + "WeaponImbueCursedFlames": "Насыщение оружия: проклятый огонь", + "WeaponImbueFire": "Насыщение оружия: огонь", + "WeaponImbueGold": "Насыщение оружия: золото", + "WeaponImbueIchor": "Насыщение оружия: ихор", + "WeaponImbueNanites": "Насыщение оружия: наниты", + "WeaponImbuePoison": "Насыщение оружия: яд", + "WeaponImbueVenom": "Насыщение оружия: отрава", + "Webbed": "Паутина", + "WellFed": "Сытость", + "Werewolf": "Оборотень", + "Wet": "Влага", + "WindPushed": "Сильный ветер", + "Wisp": "Дух", + "WitheredArmor": "Усохшие доспехи", + "WitheredWeapon": "Усохшее оружие", + "Wrath": "Месть", + "ZephyrFish": "Рыба-зефир", + "DesertMinecartLeft": "{$BuffName.MinecartLeft}", + "FishMinecartRight": "{$BuffName.MinecartRight}", + "FishMinecartLeft": "{$BuffName.MinecartLeft}", + "BeeMinecartRight": "{$BuffName.MinecartRight}", + "BeeMinecartLeft": "{$BuffName.MinecartLeft}", + "LadybugMinecartRight": "{$BuffName.MinecartRight}", + "LadybugMinecartLeft": "{$BuffName.MinecartLeft}", + "PigronMinecartRight": "{$BuffName.MinecartRight}", + "PigronMinecartLeft": "{$BuffName.MinecartLeft}", + "SunflowerMinecartRight": "{$BuffName.MinecartRight}", + "SunflowerMinecartLeft": "{$BuffName.MinecartLeft}", + "HellMinecartRight": "{$BuffName.MinecartRight}", + "HellMinecartLeft": "{$BuffName.MinecartLeft}", + "ShroomMinecartRight": "{$BuffName.MinecartRight}", + "ShroomMinecartLeft": "{$BuffName.MinecartLeft}", + "AmethystMinecartRight": "{$BuffName.MinecartRight}", + "AmethystMinecartLeft": "{$BuffName.MinecartLeft}", + "TopazMinecartRight": "{$BuffName.MinecartRight}", + "TopazMinecartLeft": "{$BuffName.MinecartLeft}", + "SapphireMinecartRight": "{$BuffName.MinecartRight}", + "SapphireMinecartLeft": "{$BuffName.MinecartLeft}", + "EmeraldMinecartRight": "{$BuffName.MinecartRight}", + "EmeraldMinecartLeft": "{$BuffName.MinecartLeft}", + "RubyMinecartRight": "{$BuffName.MinecartRight}", + "RubyMinecartLeft": "{$BuffName.MinecartLeft}", + "DiamondMinecartRight": "{$BuffName.MinecartRight}", + "DiamondMinecartLeft": "{$BuffName.MinecartLeft}", + "AmberMinecartRight": "{$BuffName.MinecartRight}", + "AmberMinecartLeft": "{$BuffName.MinecartLeft}", + "BeetleMinecartRight": "{$BuffName.MinecartRight}", + "BeetleMinecartLeft": "{$BuffName.MinecartLeft}", + "MeowmereMinecartRight": "{$BuffName.MinecartRight}", + "MeowmereMinecartLeft": "{$BuffName.MinecartLeft}", + "PartyMinecartRight": "{$BuffName.MinecartRight}", + "PartyMinecartLeft": "{$BuffName.MinecartLeft}", + "PirateMinecartRight": "{$BuffName.MinecartRight}", + "PirateMinecartLeft": "{$BuffName.MinecartLeft}", + "SteampunkMinecartRight": "{$BuffName.MinecartRight}", + "SteampunkMinecartLeft": "{$BuffName.MinecartLeft}", + "CoffinMinecartRight": "{$BuffName.MinecartRight}", + "CoffinMinecartLeft": "{$BuffName.MinecartLeft}" + }, + "MapObject": { + "Adamantite": "Адамантит", + "AnimalSkin": "Шкура животного", + "Anvil": "Наковальня", + "Banner": "Знамя", + "BeeHive": "Пчелиный улей", + "Chair": "Стул", + "Chandelier": "Люстра", + "Chlorophyte": "Хлорофит", + "ChristmasLight": "Рождественский фонарик", + "Cobalt": "Кобальт", + "Copper": "Медь", + "CrimsonAltar": "Багровый алтарь", + "Crimtane": "Кримтан", + "DemonAltar": "Алтарь демонов", + "Demonite": "Демонит", + "Door": "Дверь", + "DrippingHoney": "Капающий мед", + "DrippingLava": "Капающая лава", + "DrippingWater": "Капающая вода", + "FloorLamp": "Потолочная лампа", + "Fossil": "Ископаемое", + "GiantMushroom": "Гигантский гриб", + "Gold": "Золото", + "Iron": "Железо", + "ItemRack": "Стойка для предметов", + "Lantern": "Светильник", + "Larva": "Личинка", + "Lead": "Свинец", + "LivingWood": "Живая древесина", + "MetalBar": "Металлический слиток", + "Mythril": "Мифрил", + "OrangeSquirrelCage": "Клетка с оранжевой белкой", + "Orichalcum": "Орихалк", + "Painting": "Картина", + "Palladium": "Палладий", + "PalmTree": "Пальма", + "Picture": "Рисунок", + "PineTree": "Сосна", + "PlanterasBulb": "Лампа Плантеры", + "Platinum": "Платина", + "Pot": "Горшочек", + "Rocket": "Ракета", + "SandFlow": "Поток песка", + "Sapling": "Растеньице", + "SiltExtractinator": "Обогатитель ила", + "Silver": "Серебро", + "Sink": "Раковина", + "Statue": "Статуя", + "Table": "Стол", + "Thorn": "Шип", + "Thorns": "Шипы", + "Timer": "Таймер", + "Tin": "Олово", + "Titanium": "Титан", + "Trap": "Ловушка", + "Tree": "Дерево", + "Trophy": "Трофей", + "Tungsten": "Вольфрам", + "Turret": "Турель", + "Vase": "Ваза", + "WaterFountain": "Водяной фонтан", + "Web": "Паутина" + }, + "ChatCommand": { + "Playing_0": "{$LegacyMultiplayer.6}", + "Playing_1": "{$LegacyMultiplayer.21}", + "Roll": "{$LegacyMultiplayer.8}", + "Party": "/в", + "Emote": "/я" + }, + "Bestiary_ItemDropConditions": { + "NotExpert": "", + "NotMasterMode": "", + "LegacyHack_IsBossAndNotExpert": "", + "IsCrimsonAndNotExpert": "", + "IsCorruptionAndNotExpert": "", + "NotFromStatue": "" + }, + "Bestiary_FlavorText": { + "npc_JungleSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_YellowSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_RedSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_PurpleSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_BlackSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_GreenSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_BlueSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_DemonEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_Zombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_Skeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_AngryBones": "{$CommonBestiaryFlavor.AngryBones}", + "npc_Hornet": "{$CommonBestiaryFlavor.Hornet}", + "npc_Hellbat": "{$CommonBestiaryFlavor.LavaBat}", + "npc_BlueJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_PinkJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_Mummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_DarkMummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_LightMummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_Mimic": "{$CommonBestiaryFlavor.Mimic}", + "npc_GreenJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_BaldZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_WanderingEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_Penguin": "{$CommonBestiaryFlavor.Penguin}", + "npc_PenguinBlack": "{$CommonBestiaryFlavor.Penguin}", + "npc_Lavabat": "{$CommonBestiaryFlavor.LavaBat}", + "npc_PigronCorruption": "{$CommonBestiaryFlavor.Pigron}", + "npc_PigronHallow": "{$CommonBestiaryFlavor.Pigron}", + "npc_PigronCrimson": "{$CommonBestiaryFlavor.Pigron}", + "npc_PincushionZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_SwampZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_TwiggyZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_CataractEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_SleepyEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_DialatedEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_GreenEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_PurpleEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_FemaleZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_HeadacheSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_MisassembledSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_PantlessSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_HornetFatty": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetHoney": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetLeafy": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetSpikey": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetStingy": "{$CommonBestiaryFlavor.Hornet}", + "npc_ZombieMushroom": "{$CommonBestiaryFlavor.MushroomZombie}", + "npc_ZombieMushroomHat": "{$CommonBestiaryFlavor.MushroomZombie}", + "npc_FungiBulb": "{$CommonBestiaryFlavor.FungiBulb}", + "npc_GiantFungiBulb": "{$CommonBestiaryFlavor.FungiBulb}", + "npc_RustyArmoredBonesAxe": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesFlail": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesSword": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesSwordNoArmor": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_BlueArmoredBones": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesMace": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesNoPants": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesSword": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_HellArmoredBones": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesSpikeShield": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesMace": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesSword": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_RaggedCaster": "{$CommonBestiaryFlavor.RaggedCaster}", + "npc_RaggedCasterOpenCoat": "{$CommonBestiaryFlavor.RaggedCaster}", + "npc_Necromancer": "{$CommonBestiaryFlavor.Necromancer}", + "npc_NecromancerArmored": "{$CommonBestiaryFlavor.Necromancer}", + "npc_DiabolistRed": "{$CommonBestiaryFlavor.Diabolist}", + "npc_DiabolistWhite": "{$CommonBestiaryFlavor.Diabolist}", + "npc_AngryBonesBig": "{$CommonBestiaryFlavor.AngryBones}", + "npc_AngryBonesBigMuscle": "{$CommonBestiaryFlavor.AngryBones}", + "npc_AngryBonesBigHelmet": "{$CommonBestiaryFlavor.AngryBones}", + "npc_Scarecrow1": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow2": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow3": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow4": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow5": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow6": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow7": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow8": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow9": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow10": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_DemonEyeOwl": "{$CommonBestiaryFlavor.CostumeDemonEye}", + "npc_DemonEyeSpaceship": "{$CommonBestiaryFlavor.CostumeDemonEye}", + "npc_ZombieDoctor": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_ZombieSuperman": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_ZombiePixie": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_SkeletonTopHat": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_SkeletonAstonaut": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_SkeletonAlien": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_ZombieXmas": "{$CommonBestiaryFlavor.ZombieXmas}", + "npc_ZombieSweater": "{$CommonBestiaryFlavor.ZombieXmas}", + "npc_SlimeRibbonWhite": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonYellow": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonGreen": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonRed": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_ZombieElf": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ZombieElfBeard": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ZombieElfGirl": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ArmedZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombiePincushion": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieSwamp": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieTwiggy": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieCenx": "{$CommonBestiaryFlavor.Zombie}", + "npc_GoldBird": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldBunny": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldButterfly": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldFrog": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldGrasshopper": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldMouse": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldWorm": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_BoneThrowingSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton2": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton3": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton4": "{$CommonBestiaryFlavor.Skeleton}", + "npc_GiantWalkingAntlion": "{$CommonBestiaryFlavor.AntlionCharger}", + "npc_GiantFlyingAntlion": "{$CommonBestiaryFlavor.AntlionSwarmer}", + "npc_DesertLamiaLight": "{$CommonBestiaryFlavor.Lamia}", + "npc_DesertLamiaDark": "{$CommonBestiaryFlavor.Lamia}", + "npc_SquirrelGold": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_SandShark": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkCorrupt": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkCrimson": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkHallow": "{$CommonBestiaryFlavor.Sandshark}", + "npc_WalkingAntlion": "{$CommonBestiaryFlavor.AntlionCharger}", + "npc_FlyingAntlion": "{$CommonBestiaryFlavor.AntlionSwarmer}", + "npc_GoldGoldfish": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldGoldfishWalker": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_BlackDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_BlueDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_GreenDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_OrangeDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_RedDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_YellowDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_GoldDragonfly": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldLadyBug": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldWaterStrider": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldSeahorse": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_IceMimic": "{$CommonBestiaryFlavor.Mimic}", + "npc_GemSquirrelAmethyst": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelTopaz": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelSapphire": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelEmerald": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelRuby": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelDiamond": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelAmber": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemBunnyAmethyst": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyTopaz": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnySapphire": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyEmerald": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyRuby": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyDiamond": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyAmber": "{$CommonBestiaryFlavor.GemBunny}" + } +} \ No newline at end of file diff --git a/Localization/Content/ru-RU/Items.json b/Localization/Content/ru-RU/Items.json new file mode 100644 index 0000000..895d9a1 --- /dev/null +++ b/Localization/Content/ru-RU/Items.json @@ -0,0 +1,5511 @@ +{ + "PaintingArtist": { + "Crowno": "'V. Costa Moura'", + "Garner": "'W. Garner'", + "Moosdijk": "'R. Moosdijk'", + "Lazure": "'J. Hayes'", + "Myhre": "'J. T. Myhre'", + "Burczyk": "'C. Burczyk'", + "Craig": "'A. Craig'", + "Kolf": "'A. G. Kolf'", + "Wright": "'K. Wright'", + "Phelps": "'D. Phelps'", + "Duncan": "'M. J. Duncan'", + "Ness": "'C. J. Ness'" + }, + "Prefix": { + "Dull": "Тупой", + "Unhappy": "Невезучий", + "Bulky": "Массивный", + "Shameful": "Позорный", + "Heavy": "Тяжелый", + "Light": "Легкий", + "Sighted": "Пристрелянный", + "Rapid": "Быстрый", + "Hasty": "Стремительный", + "Intimidating": "Пугающий", + "Large": "Большой", + "Deadly": "Смертельный", + "Staunch": "Крепкий", + "Awful": "Отвратительный", + "Lethargic": "Летаргический", + "Awkward": "Странный", + "Powerful": "Мощный", + "Mystic": "Загадочный", + "Adept": "Экспертный", + "Masterful": "Грозный", + "Inept": "Неподходящий", + "Massive": "Массивный", + "Ignorant": "Грубый", + "Deranged": "Неуравновешенный", + "Intense": "Значительный", + "Taboo": "Запрещенный", + "Celestial": "Небесный", + "Furious": "Яростный", + "Keen": "Заточенный", + "Superior": "Превосходный", + "Forceful": "Неистовый", + "Broken": "Сломаный", + "Dangerous": "Опасный", + "Damaged": "Поврежденный", + "Shoddy": "Некачественный", + "Quick": "Быстрый", + "Deadly2": "Смертельный", + "Agile": "Подвижный", + "Nimble": "Шустрый", + "Murderous": "Убийственный", + "Slow": "Медленный", + "Sluggish": "Медлительный", + "Lazy": "Лентяйский", + "Savage": "Дикий", + "Annoying": "Раздражающий", + "Nasty": "Мерзкий", + "Manic": "Маниакальный", + "Hurtful": "Вредный", + "Strong": "Прочный", + "Unpleasant": "Неприятный", + "Weak": "Слабый", + "Ruthless": "Безжалостный", + "Frenzying": "Буйный", + "Godly": "Праведный", + "Sharp": "Острый", + "Demonic": "Демонический", + "Zealous": "Пылкий", + "Hard": "Твердый", + "Guarding": "Защитный", + "Armored": "Укрепленный", + "Warding": "Охранный", + "Arcane": "Тайный", + "Precise": "Точный", + "Lucky": "Счастливый", + "Jagged": "Зазубренный", + "Pointy": "Заостренный", + "Spiked": "Шипастый", + "Angry": "Сердящий", + "Menacing": "Грозный", + "Brisk": "Бойкий", + "Fleeting": "Молниеносный", + "Hasty2": "Стремительный", + "Quick2": "Быстрый", + "Wild": "Дикий", + "Rash": "Безудержный", + "Intrepid": "Отважный", + "Tiny": "Маленький", + "Violent": "Жестокий", + "Legendary": "Легендарный", + "Unreal": "Нереальный", + "Mythical": "Загадочный", + "Terrible": "Ужасный", + "Small": "Маленький" + }, + "ItemName": { + "IronPickaxe": "Железная кирка", + "IronAxe": "Железный топор", + "ShadowGreaves": "Теневые ботинки", + "ConfettiGun": "Конфетти-пушка", + "ChlorophyteMask": "Хлорофитовая маска", + "ChlorophyteHelmet": "Хлорофитовый шлем", + "ChlorophyteHeadgear": "Хлорофитовый наголовник", + "ChlorophytePlateMail": "Хлорофитовый нагрудник", + "ChlorophyteGreaves": "Хлорофитовые ботинки", + "ChlorophyteBar": "Хлорофитовый слиток", + "RedDye": "Красный краситель", + "OrangeDye": "Оранжевый краситель", + "YellowDye": "Желтый краситель", + "ShadowScalemail": "Теневая кольчуга", + "LimeDye": "Лаймовый краситель", + "GreenDye": "Зеленый краситель", + "TealDye": "Бирюзовый краситель", + "CyanDye": "Голубой краситель", + "SkyBlueDye": "Небесно-синий краситель", + "BlueDye": "Синий краситель", + "PurpleDye": "Пурпурный краситель", + "VioletDye": "Фиолетовый краситель", + "PinkDye": "Розовый краситель", + "RedandBlackDye": "Красный и черный краситель", + "ShadowHelmet": "Теневой шлем", + "OrangeandBlackDye": "Оранжевый и черный краситель", + "YellowandBlackDye": "Желтый и черный краситель", + "LimeandBlackDye": "Лаймовый и черный краситель", + "GreenandBlackDye": "Зеленый и черный краситель", + "TealandBlackDye": "Бирюзовый и черный краситель", + "CyanandBlackDye": "Голубой и черный краситель", + "SkyBlueandBlackDye": "Небесно-синий и черный краситель", + "BlueandBlackDye": "Синий и черный краситель", + "PurpleandBlackDye": "Пурпурный и черный краситель", + "VioletandBlackDye": "Фиолетовый и черный краситель", + "NightmarePickaxe": "Кошмарная кирка", + "PinkandBlackDye": "Розовый и черный краситель", + "FlameDye": "Пламенный краситель", + "FlameAndBlackDye": "Пламенный и черный краситель", + "GreenFlameDye": "Пламенно-зеленый краситель", + "GreenFlameAndBlackDye": "Пламенно-зеленый и черный краситель", + "BlueFlameDye": "Пламенно-синий краситель", + "BlueFlameAndBlackDye": "Пламенно-синий и черный краситель", + "SilverDye": "Серебристый краситель", + "BrightRedDye": "Светлый красный краситель", + "BrightOrangeDye": "Светлый оранжевый краситель", + "TheBreaker": "Разрушитель", + "BrightYellowDye": "Светлый желтый краситель", + "BrightLimeDye": "Светлый лаймовый краситель", + "BrightGreenDye": "Светлый зеленый краситель", + "BrightTealDye": "Светлый бирюзовый краситель", + "BrightCyanDye": "Светлый голубой краситель", + "BrightSkyBlueDye": "Светлый небесно-синий краситель", + "BrightBlueDye": "Светлый синий краситель", + "BrightPurpleDye": "Светлый пурпурный краситель", + "BrightVioletDye": "Светлый фиолетовый краситель", + "BrightPinkDye": "Светлый розовый краситель", + "Candle": "Свеча", + "BlackDye": "Черный краситель", + "RedandSilverDye": "Красный и серебристый краситель", + "OrangeandSilverDye": "Оранжевый и серебристый краситель", + "YellowandSilverDye": "Желтый и серебристый краситель", + "LimeandSilverDye": "Лаймовый и серебристый краситель", + "GreenandSilverDye": "Зеленый и серебристый краситель", + "TealandSilverDye": "Бирюзовый и серебристый краситель", + "CyanandSilverDye": "Голубой и серебристый краситель", + "SkyBlueandSilverDye": "Небесно-синий и серебристый краситель", + "BlueandSilverDye": "Синий и серебристый краситель", + "CopperChandelier": "Медная люстра", + "PurpleandSilverDye": "Пурпурный и серебристый краситель", + "VioletandSilverDye": "Фиолетовый и серебристый краситель", + "PinkandSilverDye": "Розовый и серебристый краситель", + "IntenseFlameDye": "Интенсивный пламенный краситель", + "IntenseGreenFlameDye": "Интенсивный пламенно-зеленый краситель", + "IntenseBlueFlameDye": "Интенсивный пламенно-синий краситель", + "RainbowDye": "Радужный краситель", + "IntenseRainbowDye": "Интенсивный радужный краситель", + "YellowGradientDye": "Желтый градиентный краситель", + "CyanGradientDye": "Голубой градиентный краситель", + "SilverChandelier": "Серебряная люстра", + "VioletGradientDye": "Фиолетовый градиентный краситель", + "Paintbrush": "Кисть", + "PaintRoller": "Малярный валик", + "RedPaint": "Красная краска", + "OrangePaint": "Оранжевая краска", + "YellowPaint": "Желтая краска", + "LimePaint": "Лаймовая краска", + "GreenPaint": "Лаймовая краска", + "TealPaint": "Бирюзовая краска", + "CyanPaint": "Голубая краска", + "GoldChandelier": "Золотая люстра", + "SkyBluePaint": "Небесно-синяя краска", + "BluePaint": "Синяя краска", + "PurplePaint": "Пурпурная краска", + "VioletPaint": "Фиолетовая краска", + "PinkPaint": "Розовая краска", + "DeepRedPaint": "Темно-красная краска", + "DeepOrangePaint": "Темно-оранжевая краска", + "DeepYellowPaint": "Темно-желтая краска", + "DeepLimePaint": "Темно-лаймовая краска", + "DeepGreenPaint": "Темно-зеленая краска", + "ManaCrystal": "Кристалл маны", + "DeepTealPaint": "Темно-бирюзовая краска", + "DeepCyanPaint": "Темно-голубая краска", + "DeepSkyBluePaint": "Темная небесно-синяя краска", + "DeepBluePaint": "Темно-синяя краска", + "DeepPurplePaint": "Темно-пурпурная краска", + "DeepVioletPaint": "Темно-фиолетовая краска", + "DeepPinkPaint": "Темно-розовая краска", + "BlackPaint": "Черная краска", + "WhitePaint": "Белая краска", + "GrayPaint": "Серая краска", + "IronOre": "Железная руда", + "LesserManaPotion": "Малое зелье маны", + "PaintScraper": "Шпатель", + "LihzahrdBrick": "Кирпич ящщеров", + "LihzahrdBrickWall": "Кирпичная стена ящщеров", + "SlushBlock": "Ил", + "PalladiumOre": "Палладиевая руда", + "OrichalcumOre": "Орихалковая руда", + "TitaniumOre": "Титановая руда", + "TealMushroom": "Бирюзовый гриб", + "GreenMushroom": "Зеленый гриб", + "SkyBlueFlower": "Небесно-синий гриб", + "BandofStarpower": "Браслет звездной силы", + "YellowMarigold": "Желтый бархатец", + "BlueBerries": "Синие ягоды", + "LimeKelp": "Лаймовая ламинария", + "PinkPricklyPear": "Розовая колючая груша", + "OrangeBloodroot": "Оранжевая лапчатка", + "RedHusk": "Красный хитин", + "CyanHusk": "Синий хитин", + "VioletHusk": "Фиолетовый хитин", + "BlackInk": "Чернила", + "FlowerofFire": "Огненный цветок", + "DyeVat": "Красильная барка", + "BeeGun": "Пчеломет", + "PossessedHatchet": "Одержимый топорик", + "BeeKeeper": "Пчеловод", + "Hive": "Блок улья", + "HoneyBlock": "Медовый блок", + "HiveWall": "Стена улья", + "CrispyHoneyBlock": "Хрустящий медовый блок", + "HoneyBucket": "Ведро с медом", + "HiveWand": "Жезл улья", + "MagicMissile": "Волшебная ракета", + "Beenade": "Пчелоната", + "GravityGlobe": "Шар гравитации", + "HoneyComb": "Мед в сотах", + "Abeemination": "Пчелиная масса", + "BottledHoney": "Бутылка с медом", + "RainHat": "Дождевая шляпа", + "RainCoat": "Дождевой плащ", + "LihzahrdDoor": "Дверь ящщеров", + "DungeonDoor": "Дверь темницы", + "LeadDoor": "Свинцовая дверь", + "DirtRod": "Жезл земли", + "IronDoor": "Железная дверь", + "TempleKey": "Ключ от храма", + "LihzahrdChest": "Сундук ящщеров", + "LihzahrdChair": "Стул ящщеров", + "LihzahrdTable": "Стол ящщеров", + "LihzahrdWorkBench": "Верстак ящщеров", + "SuperDartTrap": "Суперловушка с дротиком", + "FlameTrap": "Огненная ловушка", + "SpikyBallTrap": "Ловушка с колючим шаром", + "SpearTrap": "Ловушка с копьями", + "ShadowOrb": "Сфера тени", + "WoodenSpike": "Деревянное копье", + "LihzahrdPressurePlate": "Нажимная пластина ящщеров", + "LihzahrdStatue": "Статуя ящщеров", + "LihzahrdWatcherStatue": "Статуя наблюдателя ящщеров", + "LihzahrdGuardianStatue": "Статуя охранника ящщеров", + "WaspGun": "Осиная пушка", + "PiranhaGun": "Пиранья пушка", + "PygmyStaff": "Посох пигмеев", + "PygmyNecklace": "Ожерелье пигмеев", + "TikiMask": "Маска Тики", + "Meteorite": "Метеорит", + "TikiShirt": "Рубашка Тики", + "TikiPants": "Штаны Тики", + "LeafWings": "Лиственные крылья", + "BlizzardinaBalloon": "Снежная буря в шарике", + "BundleofBalloons": "Связка воздушных шариков", + "BatWings": "Крылья летучей мыши", + "BoneSword": "Костяной меч", + "HerculesBeetle": "Жук Геркулес", + "SmokeBomb": "Дымовая бомба", + "BoneKey": "Костяной ключ", + "MeteoriteBar": "Метеоритовый слиток", + "Nectar": "Нектар", + "TikiTotem": "Тотем Тики", + "LizardEgg": "Яйцо ящерицы", + "GraveMarker": "Надгробие", + "CrossGraveMarker": "Могильный крест", + "Headstone": "Могильный камень", + "Gravestone": "Могильная плита", + "Obelisk": "Обелиск", + "LeafBlower": "Листомет", + "ChlorophyteBullet": "Хлорофитовая пуля", + "Hook": "Крюк", + "ParrotCracker": "Крекер для попугая", + "StrangeGlowingMushroom": "Странный светящийся гриб", + "Seedling": "Проросток", + "WispinaBottle": "Дух в бутылке", + "PalladiumBar": "Палладиевый слиток", + "PalladiumSword": "Палладиевый меч", + "PalladiumPike": "Палладиевая пика", + "PalladiumRepeater": "Палладиевый арбалет", + "PalladiumPickaxe": "Палладиевая кирка", + "PalladiumDrill": "Палладиевый бур", + "Flamarang": "Огнеранг", + "PalladiumChainsaw": "Палладиевая бензопила", + "OrichalcumBar": "Орихалковый слиток", + "OrichalcumSword": "Орихалковый меч", + "OrichalcumHalberd": "Орихалковая алебарда", + "OrichalcumRepeater": "Орихалковый арбалет", + "OrichalcumPickaxe": "Орихалковая кирка", + "OrichalcumDrill": "Орихалковый бур", + "OrichalcumChainsaw": "Орихалковая бензопила", + "TitaniumBar": "Титановый слиток", + "TitaniumSword": "Титановый меч", + "CopperOre": "Медная руда", + "MoltenFury": "Литая ярость", + "TitaniumTrident": "Титановый трезубец", + "TitaniumRepeater": "Титановый арбалет", + "TitaniumPickaxe": "Титановая кирка", + "TitaniumDrill": "Титановый бур", + "TitaniumChainsaw": "Титановая бензопила", + "PalladiumMask": "Палладиевая маска", + "PalladiumHelmet": "Палладиевый шлем", + "PalladiumHeadgear": "Палладиевый наголовник", + "PalladiumBreastplate": "Палладиевый нагрудник", + "PalladiumLeggings": "Палладиевые ботинки", + "FieryGreatsword": "Пылкий великий меч", + "OrichalcumMask": "Орихалковая маска", + "OrichalcumHelmet": "Орихалковый шлем", + "OrichalcumHeadgear": "Орихалковый наголовник", + "OrichalcumBreastplate": "Орихалковый нагрудник", + "OrichalcumLeggings": "Орихалковый нагрудник", + "TitaniumMask": "Титановая маска", + "TitaniumHelmet": "Титановый шлем", + "TitaniumHeadgear": "Титановый наголовник", + "TitaniumBreastplate": "Титановый нагрудник", + "TitaniumLeggings": "Титановые ботинки", + "MoltenPickaxe": "Литая кирка", + "OrichalcumAnvil": "Орихалковая наковальня", + "TitaniumForge": "Титановая кузня", + "PalladiumWaraxe": "Палладиевый боевой топор", + "OrichalcumWaraxe": "Орихалковый боевой топор", + "TitaniumWaraxe": "Титановый боевой топор", + "HallowedBar": "Святой слиток", + "ChlorophyteClaymore": "Хлорофитовый клеймор", + "ChlorophyteSaber": "Хлорофитовая сабля", + "ChlorophytePartisan": "Хлорофитовый протазан", + "ChlorophyteShotbow": "Хлорофитовый арбалет", + "MeteorHelmet": "Метеоритовый шлем", + "ChlorophytePickaxe": "Хлорофитовая кирка", + "ChlorophyteDrill": "Хлорофитовый бур", + "ChlorophyteChainsaw": "Хлорофитовая бензопила", + "ChlorophyteGreataxe": "Хлорофитовый топор", + "ChlorophyteWarhammer": "Хлорофитовый молот", + "ChlorophyteArrow": "Хлорофитовая стрела", + "AmethystHook": "Аметистовый крюк", + "TopazHook": "Топазовый крюк", + "SapphireHook": "Сапфировый крюк", + "EmeraldHook": "Изумрудный крюк", + "MeteorSuit": "Метеоритовые доспехи", + "RubyHook": "Рубиновый крюк", + "DiamondHook": "Алмазный крюк", + "AmberMosquito": "Комар в янтаре", + "UmbrellaHat": "Шляпа-зонт", + "NimbusRod": "Дождевой жезл", + "OrangeTorch": "Оранжевый факел", + "CrimsandBlock": "Блок багрянцевого песка", + "BeeCloak": "Пчелиный плащ", + "EyeoftheGolem": "Глаз голема", + "HoneyBalloon": "Воздушный шарик в меде", + "MeteorLeggings": "Метеоритовые ботинки", + "BlueHorseshoeBalloon": "Синий подкованный шарик", + "WhiteHorseshoeBalloon": "Белый подкованный шарик", + "YellowHorseshoeBalloon": "Желтый подкованный шарик", + "FrozenTurtleShell": "Ледяной черепаший панцирь", + "SniperRifle": "Снайперское ружье", + "VenusMagnum": "Магнум Венеры", + "CrimsonRod": "Багровый жезл", + "CrimtaneBar": "Кримтановый слиток", + "Stynger": "Стингер", + "FlowerPow": "Цветочный удар", + "BottledWater": "Бутылка с водой", + "RainbowGun": "Радужная пушка", + "StyngerBolt": "Стрела стингера", + "ChlorophyteJackhammer": "Хлорофитовый пневмомолот", + "Teleporter": "Телепорт", + "FlowerofFrost": "Ледяной цветок", + "Uzi": "Узи", + "MagnetSphere": "Магнитная сфера", + "PurpleStainedGlass": "Пурпурный витраж", + "YellowStainedGlass": "Желтый витраж", + "BlueStainedGlass": "Синий витраж", + "SpaceGun": "Космическая пушка", + "GreenStainedGlass": "Зеленый витраж", + "RedStainedGlass": "Красный витраж", + "MulticoloredStainedGlass": "Разноцветный витраж", + "SkeletronHand": "Рука Скелетрона", + "Skull": "Череп", + "BallaHat": "Шляпа громилы", + "GangstaHat": "Шляпа гангстера", + "SailorHat": "Шапка моряка", + "EyePatch": "Глазная повязка", + "SailorShirt": "Рубашка моряка", + "RocketBoots": "Реактивные сапоги", + "SailorPants": "Штаны моряка", + "SkeletronMask": "Маска Скелетрона", + "AmethystRobe": "Аметистовая роба", + "TopazRobe": "Топазовая роба", + "SapphireRobe": "Сапфировая роба", + "EmeraldRobe": "Изумрудная роба", + "RubyRobe": "Рубиновая роба", + "DiamondRobe": "Алмазная роба", + "WhiteTuxedoShirt": "Пиджак белого фрака", + "WhiteTuxedoPants": "Брюки белого фрака", + "GrayBrick": "Серый кирпич", + "PanicNecklace": "Ожерелье паники", + "LifeFruit": "Фрукт жизни", + "LihzahrdAltar": "Алтарь ящщеров", + "LihzahrdPowerCell": "Батарейка ящщеров", + "Picksaw": "Киркопил", + "HeatRay": "Тепловой луч", + "StaffofEarth": "Посох земли", + "GolemFist": "Кулак Голема", + "WaterChest": "Водяной сундук", + "Binoculars": "Бинокль", + "GoldOre": "Золотая руда", + "GrayBrickWall": "Стена из серого кирпича", + "RifleScope": "Оптический прицел", + "DestroyerEmblem": "Эмблема уничтожителя", + "HighVelocityBullet": "Высокоскоростная пуля", + "JellyfishNecklace": "Ожерелье медузы", + "ZombieArm": "Рука зомби", + "TheAxe": "Тот самый топор", + "IceSickle": "Ледяная коса", + "ClothierVoodooDoll": "Кукла вуду портного", + "PoisonStaff": "Отравляющий посох", + "SlimeStaff": "Посох слизней", + "RedBrick": "Красный кирпич", + "PoisonDart": "Отравленный дротик", + "EyeSpring": "Глаз на пружинке", + "ToySled": "Игрушечные сани", + "BookofSkulls": "Книга черепов", + "KOCannon": "КО-пушка", + "PirateMap": "Пиратская карта", + "TurtleHelmet": "Черепаший шлем", + "TurtleScaleMail": "Черепашьи латы", + "TurtleLeggings": "Черепашьи ботинки", + "SnowballCannon": "Снежковая пушка", + "RedBrickWall": "Стена из красного кирпича", + "BonePickaxe": "Костяная кирка", + "MagicQuiver": "Магический колчан", + "MagmaStone": "Камень магмы", + "ObsidianRose": "Обсидиановая роза", + "Bananarang": "Бананаранг", + "ChainKnife": "Кинжал на цепи", + "RodofDiscord": "Жезл раздора", + "DeathSickle": "Коса смерти", + "TurtleShell": "Черепаший панцирь", + "TissueSample": "Образец ткани", + "ClayBlock": "Глина", + "Vertebrae": "Позвонок", + "BloodySpine": "Кровавый позвоночник", + "Ichor": "Ихор", + "IchorTorch": "Ихорный факел", + "IchorArrow": "Ихорная стрела", + "IchorBullet": "Ихорная пуля", + "GoldenShower": "Золотой душ", + "BunnyCannon": "Кроличья пушка", + "ExplosiveBunny": "Взрывокролик", + "VialofVenom": "Пузырек яда", + "BlueBrick": "Синий кирпич", + "FlaskofVenom": "Флакон с ядом", + "VenomArrow": "Ядовитая стрела", + "VenomBullet": "Ядовитая пуля", + "FireGauntlet": "Огненная рукавица", + "Cog": "Шестеренка", + "Confetti": "Конфетти", + "Nanites": "Наниты", + "ExplosivePowder": "Взрывной порошок", + "GoldDust": "Золотая пыль", + "PartyBullet": "Ядовитая пуля", + "BlueBrickWall": "Стена из синего кирпича", + "NanoBullet": "Нанопуля", + "ExplodingBullet": "Разрывная пуля", + "GoldenBullet": "Золотая пуля", + "FlaskofCursedFlames": "Флакон с проклятыми огнями", + "FlaskofFire": "Флакон с огнем", + "FlaskofGold": "Флакон с золотом", + "FlaskofIchor": "Флакон с ихором", + "FlaskofNanites": "Флакон с нанитами", + "FlaskofParty": "Флакон с праздником", + "FlaskofPoison": "Флакон с отравой", + "ChainLantern": "Фонарик", + "EyeofCthulhuTrophy": "Трофей Глаза Ктулху", + "EaterofWorldsTrophy": "Трофей Пожирателя Миров", + "BrainofCthulhuTrophy": "Трофей Мозга Ктулху", + "SkeletronTrophy": "Трофей Скелетрона", + "QueenBeeTrophy": "Трофей Королевы Пчел", + "WallofFleshTrophy": "Трофей Стены Плоти", + "DestroyerTrophy": "Трофей Уничтожителя", + "SkeletronPrimeTrophy": "Трофей Скелетрона Прайма", + "RetinazerTrophy": "Трофей Ретиназера", + "SpazmatismTrophy": "Трофей Спазматизма", + "GreenBrick": "Зеленый кирпич", + "PlanteraTrophy": "Трофей Плантеры", + "GolemTrophy": "Трофей Голема", + "BloodMoonRising": "Восход кровавой луны", + "TheHangedMan": "Повешенный человек", + "GloryoftheFire": "Слава огня", + "BoneWarp": "Искореженная кость", + "WallSkeleton": "Настенный скелет", + "HangingSkeleton": "Подвешенный скелет", + "BlueSlabWall": "Синяя плитка", + "BlueTiledWall": "Синяя черепица", + "GreenBrickWall": "Стена из зеленого кирпича", + "PinkSlabWall": "Розовая плитка", + "PinkTiledWall": "Розовая черепица", + "GreenSlabWall": "Зеленая плитка", + "GreenTiledWall": "Зеленая черепица", + "BlueBrickPlatform": "Синяя кирпичная платформа", + "PinkBrickPlatform": "Розовая кирпичная платформа", + "GreenBrickPlatform": "Зеленая кирпичная платформа", + "MetalShelf": "Металлическая полка", + "BrassShelf": "Латунная полка", + "WoodShelf": "Деревянная полка", + "PinkBrick": "Розовый кирпич", + "BrassLantern": "Латунный светильник", + "CagedLantern": "Решетчатый светильник", + "CarriageLantern": "Переносной светильник", + "AlchemyLantern": "Алхимический светильник", + "DiablostLamp": "Дьявольская лампа", + "BlueDungeonChair": "Синий стул темницы", + "BlueDungeonTable": "Синий стол темницы", + "BlueDungeonWorkBench": "Синий верстак темницы", + "GreenDungeonChair": "Зеленый стул темницы", + "SilverOre": "Серебряная руда", + "PinkBrickWall": "Стена из розового кирпича", + "GreenDungeonTable": "Зеленый стол темницы", + "GreenDungeonWorkBench": "Зеленый верстак темницы", + "PinkDungeonChair": "Розовый стул темницы", + "PinkDungeonTable": "Розовый стол темницы", + "PinkDungeonWorkBench": "Розовый верстак темницы", + "BlueDungeonCandle": "Синяя свеча темницы", + "GreenDungeonCandle": "Зеленая свеча темницы", + "PinkDungeonCandle": "Розовая свеча темницы", + "BlueDungeonVase": "Синяя ваза темницы", + "GreenDungeonVase": "Зеленая ваза темницы", + "GoldBrick": "Золотой кирпич", + "PinkDungeonVase": "Розовая ваза темницы", + "BlueDungeonDoor": "Синяя дверь темницы", + "GreenDungeonDoor": "Зеленая дверь темницы", + "PinkDungeonDoor": "Розовая дверь темницы", + "BlueDungeonBookcase": "Синий книжный шкаф темницы", + "GreenDungeonBookcase": "Зеленый книжный шкаф темницы", + "PinkDungeonBookcase": "Розовый книжный шкаф темницы", + "Catacomb": "Катакомба", + "DungeonShelf": "Полка темницы", + "SkellingtonJSkellingsworth": "Скеллингтон Джей Скеллингсворт", + "GoldBrickWall": "Стена из золотого кирпича", + "TheCursedMan": "Проклятый человек", + "TheEyeSeestheEnd": "Глаза видят конец", + "SomethingEvilisWatchingYou": "Что-то злобное следит за вами", + "TheTwinsHaveAwoken": "Близнецы пробудились", + "TheScreamer": "Крикун", + "GoblinsPlayingPoker": "Гоблины за игрой в покер", + "Dryadisque": "Дридалиска", + "Sunflowers": "Подсолнухи", + "TerrarianGothic": "Террарианская готика", + "Beanie": "Шапочка", + "SilverBrick": "Серебряный кирпич", + "ImbuingStation": "Наполняющий столик", + "StarinaBottle": "Звезда в бутылке", + "EmptyBullet": "Пустая пуля", + "Impact": "Столкновение", + "PoweredbyBirds": "Приводится в действие птицами", + "TheDestroyer": "Уничтожитель", + "ThePersistencyofEyes": "Постоянство глаз", + "UnicornCrossingtheHallows": "Единорог на перевале в Освящение", + "GreatWave": "Большая волна", + "StarryNight": "Звездная ночь", + "SilverBrickWall": "Стена из серебряного кирпича", + "GuidePicasso": "Гид от Пикассо", + "TheGuardiansGaze": "Взгляд хранителя", + "FatherofSomeone": "Чей-то отец", + "NurseLisa": "Сестра Лиза", + "ShadowbeamStaff": "Посох теневого луча", + "InfernoFork": "Адский трезубец", + "SpectreStaff": "Спектральный посох", + "WoodenFence": "Деревянный забор", + "LeadFence": "Свинцовый забор", + "BubbleMachine": "Генератор мыльных пузырей", + "CopperBrick": "Медный кирпич", + "BubbleWand": "Мыльная палочка", + "MarchingBonesBanner": "Знамя ходячего скелета", + "NecromanticSign": "Знак некроманта", + "RustedCompanyStandard": "Штандарт ржавой компании", + "RaggedBrotherhoodSigil": "Знак оборванного братства", + "MoltenLegionFlag": "Флаг расплавленного легиона", + "DiabolicSigil": "Дьявольский знак", + "ObsidianPlatform": "Обсидиановая платформа", + "ObsidianDoor": "Обсидиановая дверь", + "ObsidianChair": "Обсидиановый стул", + "CopperBrickWall": "Стена из медного кирпича", + "ObsidianTable": "Обсидиановый стол", + "ObsidianWorkBench": "Обсидиановый верстак", + "ObsidianVase": "Обсидиановая ваза", + "ObsidianBookcase": "Обсидиановый книжный шкаф", + "HellboundBanner": "Знамя обреченных", + "HellHammerBanner": "Знамя адского молота", + "HelltowerBanner": "Знамя адской башни", + "LostHopesofManBanner": "Знамя потерянных надежд", + "ObsidianWatcherBanner": "Знамя обсидианового дозорного", + "LavaEruptsBanner": "Знамя извержения лавы", + "Spike": "Шип", + "BlueDungeonBed": "Синяя кровать темницы", + "GreenDungeonBed": "Зеленая кровать темницы", + "PinkDungeonBed": "Розовая кровать темницы", + "ObsidianBed": "Обсидиановая кровать", + "Waldo": "Валдо", + "Darkness": "Тьма", + "DarkSoulReaper": "Темный жнец душ", + "Land": "Земля", + "TrappedGhost": "Пойманый призрак", + "DemonsEye": "Глаз демона", + "WaterCandle": "Водяная свеча", + "FindingGold": "В поисках золота", + "FirstEncounter": "Первая встреча", + "GoodMorning": "Доброе утро", + "UndergroundReward": "Подземная награда", + "ThroughtheWindow": "Через окно", + "PlaceAbovetheClouds": "Место над облаками", + "DoNotStepontheGrass": "По газонам не ходить", + "ColdWatersintheWhiteLand": "Холодные реки под белым снегом", + "LightlessChasms": "Бездна", + "TheLandofDeceivingLooks": "Обманчивая земля", + "Book": "Книга", + "Daylight": "Дневной свет", + "SecretoftheSands": "Тайна песков", + "DeadlandComesAlive": "Пустошь оживает", + "EvilPresence": "Присутствие зла", + "SkyGuardian": "Небесный хранитель", + "AmericanExplosive": "Американский взрыв", + "Discover": "Открытие", + "HandEarth": "Земля руки", + "OldMiner": "Старый шахтер", + "Skelehead": "Костяная голова", + "CopperWatch": "Медные часы", + "Cobweb": "Паутина", + "FacingtheCerebralMastermind": "Возле выдающегося мозга", + "LakeofFire": "Озеро огня", + "TrioSuperHeroes": "Трио супергероев", + "SpectreHood": "Спектральный капюшон", + "SpectreRobe": "Спектральная роба", + "SpectrePants": "Спектральные штаны", + "SpectrePickaxe": "Спектральная кирка", + "SpectreHamaxe": "Спектральный молотопор", + "Ectoplasm": "Эктоплазма", + "GothicChair": "Готический стул", + "NecroHelmet": "Шлем некроманта", + "GothicTable": "Готический стол", + "GothicWorkBench": "Готический верстак", + "GothicBookcase": "Готический книжный шкаф", + "PaladinsHammer": "Молот паладина", + "SWATHelmet": "Шлем SWAT", + "BeeWings": "Пчелиные крылья", + "GiantHarpyFeather": "Перо гигантской гарпии", + "BoneFeather": "Костяное перо", + "FireFeather": "Огненное перо", + "IceFeather": "Ледяное перо", + "NecroBreastplate": "Нагрудник некроманта", + "BrokenBatWing": "Сломанное крылья летучей мыши", + "TatteredBeeWing": "Изодранные пчелиные крылья", + "LargeAmethyst": "Большой аметист", + "LargeTopaz": "Большой топаз", + "LargeSapphire": "Большой сапфир", + "LargeEmerald": "Большой изумруд", + "LargeRuby": "Большой рубин", + "LargeDiamond": "Большой алмаз", + "JungleChest": "Сундук джунглей", + "CorruptionChest": "Сундук порчи", + "NecroGreaves": "Ботинки некроманта", + "CrimsonChest": "Багровый сундук", + "HallowedChest": "Сундук освящения", + "JungleKey": "Ключ джунглей", + "CorruptionKey": "Ключ порчи", + "CrimsonKey": "Багровый ключ", + "HallowedKey": "Ключ освящения", + "FrozenKey": "Замороженный ключ", + "ImpFace": "Лицо черта", + "OminousPresence": "Зловещее присутствие", + "Bone": "Кость", + "ShiningMoon": "Сияющая луна", + "LivingGore": "Живая кровь", + "FlowingMagma": "Поток магмы", + "SpectrePaintbrush": "Спектральная кисть", + "SpectrePaintRoller": "Спектральный валик", + "SpectrePaintScraper": "Спектральный шпатель", + "ShroomiteHeadgear": "Грибной наголовник", + "ShroomiteMask": "Грибная маска", + "ShroomiteHelmet": "Грибной шлем", + "ShroomiteBreastplate": "Грибной нагрудник", + "Muramasa": "Мурамаса", + "ShroomiteLeggings": "Грибные ботинки", + "Autohammer": "Автомолот", + "ShroomiteBar": "Грибной слиток", + "SDMG": "П.К.Д.", + "CenxsTiara": "Корона Cenx", + "CenxsBreastplate": "Нагрудник Cenx", + "CenxsLeggings": "Ботинки Cenx", + "CrownosMask": "Маска Crowno", + "CrownosBreastplate": "Нагрудник Crowno", + "CrownosLeggings": "Ботинки Crowno", + "CobaltShield": "Кобальтовый щит", + "WillsHelmet": "Шлем Will", + "WillsBreastplate": "Нагрудник Will", + "WillsLeggings": "Ботинки Will", + "JimsHelmet": "Шлем Jim", + "JimsBreastplate": "Нагрудник Jim", + "JimsLeggings": "Ботинки Jim", + "AaronsHelmet": "Шлем Aaron", + "AaronsBreastplate": "Нагрудник Aaron", + "AaronsLeggings": "Ботинки Aaron", + "VampireKnives": "Вампирские ножи", + "AquaScepter": "Водный скипетр", + "BrokenHeroSword": "Сломаный меч героя", + "ScourgeoftheCorruptor": "Плеть пожирателя", + "StaffoftheFrostHydra": "Посох ледяной гидры", + "TheCreationoftheGuide": "Сотворение Гида", + "TheMerchant": "Торговец", + "CrownoDevoursHisLunch": "Crowno, пожирающий свой обед", + "RareEnchantment": "Редкое очарование", + "GloriousNight": "Славная ночь", + "SweetheartNecklace": "Ожерелье возлюбленного", + "FlurryBoots": "Шквальные ботинки", + "LuckyHorseshoe": "Счастливая подкова", + "DTownsHelmet": "Шлем D-Town", + "DTownsBreastplate": "Нагрудник D-Town", + "DTownsLeggings": "Ботинки D-Town", + "DTownsWings": "Крылья D-Town", + "WillsWings": "Крылья Will", + "CrownosWings": "Крылья Crowno", + "CenxsWings": "Крылья Cenx", + "CenxsDress": "Платье Cenx", + "CenxsDressPants": "Штаны Cenx", + "PalladiumColumn": "Палладиевая колонна", + "ShinyRedBalloon": "Блестящий красный шарик", + "PalladiumColumnWall": "Стена из палладиевой колонны", + "BubblegumBlock": "Жвачка", + "BubblegumBlockWall": "Стена из жвачки", + "TitanstoneBlock": "Титановый камень", + "TitanstoneBlockWall": "Стена из титанового камня", + "MagicCuffs": "Магические наручники", + "MusicBoxSnow": "Музыкальная шкатулка (снег)", + "MusicBoxCrimson": "Музыкальная шкатулка (Багрянец)", + "MusicBoxBoss4": "Музыкальная шкатулка (Босс 4)", + "SilverWatch": "Серебряные часы", + "Harpoon": "Гарпун", + "MusicBoxAltOverworldDay": "Музыкальная шкатулка (другой день божественного мира)", + "MusicBoxRain": "Музыкальная шкатулка (дождь)", + "MusicBoxIce": "Музыкальная шкатулка (лед)", + "MusicBoxDesert": "Музыкальная шкатулка (пустыня)", + "MusicBoxDungeon": "Музыкальная шкатулка (темница)", + "MusicBoxPlantera": "Музыкальная шкатулка (Плантера)", + "MusicBoxBoss5": "Музыкальная шкатулка (босс 5)", + "MusicBoxTemple": "Музыкальная шкатулка (храм)", + "MusicBoxEclipse": "Музыкальная шкатулка (затмение)", + "SpikyBall": "Колючий шар", + "MusicBoxMushrooms": "Музыкальная шкатулка (грибы)", + "ButterflyDust": "Пыльца бабочки", + "AnkhCharm": "Амулет анха", + "AnkhShield": "Щит анха", + "BlueFlare": "Синяя сигнальная ракета", + "AnglerFishBanner": "Знамя рыбы-удильщика", + "AngryNimbusBanner": "Знамя злой тучи", + "AnomuraFungusBanner": "Знамя крабового гриба", + "AntlionBanner": "Знамя муравьиного льва", + "ArapaimaBanner": "Знамя арапиамы", + "BallOHurt": "Шар боли", + "ArmoredSkeletonBanner": "Знамя бронированного скелета", + "BatBanner": "Знамя пещерной летучей мыши", + "BirdBanner": "Знамя птицы", + "BlackRecluseBanner": "Знамя черного отшельника", + "BloodFeederBanner": "Знамя кровавой пираньи", + "BloodJellyBanner": "Знамя кровавой медузы", + "BloodCrawlerBanner": "Знамя кровавого ползуна", + "BoneSerpentBanner": "Знамя костяного змея", + "BunnyBanner": "Знамя кролика", + "ChaosElementalBanner": "Знамя элементаля хаоса", + "BlueMoon": "Синяя луна", + "MimicBanner": "Знамя мимика", + "ClownBanner": "Знамя клоуна", + "CorruptBunnyBanner": "Знамя порченого кролика", + "CorruptGoldfishBanner": "Знамя порченой золотой рыбки", + "CrabBanner": "Знамя краба", + "CrimeraBanner": "Знамя кримеры", + "CrimsonAxeBanner": "Знамя багрового топора", + "CursedHammerBanner": "Знамя проклятого молота", + "DemonBanner": "Знамя демона", + "DemonEyeBanner": "Знамя демонического глаза", + "Handgun": "Пистолет", + "DerplingBanner": "Знамя грибного рака-отшельника", + "EaterofSoulsBanner": "Знамя пожирателя душ", + "EnchantedSwordBanner": "Знамя зачарованного меча", + "FaceMonsterBanner": "Знамя лицевого монстра", + "FloatyGrossBanner": "Знамя летающей массы", + "FlyingFishBanner": "Знамя летающей рыбы", + "FlyingSnakeBanner": "Знамя крылатого змея", + "FrankensteinBanner": "Знамя Франкенштейна", + "FungiBulbBanner": "Знамя гриба-лампы", + "WaterBolt": "Водяной выстрел", + "FungoFishBanner": "Знамя грибной медузы", + "GastropodBanner": "Знамя брюхоногого", + "GoblinThiefBanner": "Знамя гоблина-воришки", + "GoblinSorcererBanner": "Знамя гоблина-волшебника", + "GoblinPeonBanner": "Знамя гоблина-пехотинца", + "GoblinScoutBanner": "Знамя гоблина-разведчика", + "GoblinWarriorBanner": "Знамя гоблина-воина", + "GoldfishBanner": "Знамя золотой рыбки", + "HarpyBanner": "Знамя гарпии", + "HellbatBanner": "Знамя адской летучей мыши", + "Bomb": "Бомба", + "HerplingBanner": "Знамя дурализня", + "HornetBanner": "Знамя шершня", + "IceElementalBanner": "Знамя ледяного элементаля", + "IcyMermanBanner": "Знамя ледяного тритона", + "FireImpBanner": "Знамя огненного черта", + "JellyfishBanner": "Знамя синей медузы", + "JungleCreeperBanner": "Знамя ползуна джунглей", + "LihzahrdBanner": "Знамя ящщеров", + "ManEaterBanner": "Знамя растения-людоеда", + "MeteorHeadBanner": "Знамя осколка метеора", + "Dynamite": "Динамит", + "MothBanner": "Знамя мотылька", + "MummyBanner": "Знамя мумии", + "MushiLadybugBanner": "Знамя грибной коровки", + "ParrotBanner": "Знамя попугая", + "PigronBanner": "Знамя свинодракона", + "PiranhaBanner": "Знамя пираньи", + "PirateBanner": "Знамя матроса", + "PixieBanner": "Знамя феи", + "RaincoatZombieBanner": "Знамя зомби в дождевике", + "ReaperBanner": "Знамя жнеца", + "Grenade": "Граната", + "SharkBanner": "Знамя акулы", + "SkeletonBanner": "Знамя скелета", + "SkeletonMageBanner": "Знамя темного мага", + "SlimeBanner": "Знамя синего слизня", + "SnowFlinxBanner": "Знамя снежного флинкса", + "SpiderBanner": "Знамя стенного ползуна", + "SporeZombieBanner": "Знамя спорового зомби", + "SwampThingBanner": "Знамя болотной твари", + "TortoiseBanner": "Знамя гигантской черепахи", + "ToxicSludgeBanner": "Знамя токсичного слизня", + "SandBlock": "Песок", + "UmbrellaSlimeBanner": "Знамя слизня с зонтом", + "UnicornBanner": "Знамя единорога", + "VampireBanner": "Знамя вампира", + "VultureBanner": "Знамя стервятника", + "NypmhBanner": "Знамя нимфы", + "WerewolfBanner": "Знамя оборотня", + "WolfBanner": "Знамя волка", + "WorldFeederBanner": "Знамя пожирателя миров", + "WormBanner": "Знамя червя", + "WraithBanner": "Знамя призрака", + "GoldWatch": "Золотые часы", + "Glass": "Стекло", + "WyvernBanner": "Знамя виверны", + "ZombieBanner": "Знамя зомби", + "GlassPlatform": "Стеклянная платформа", + "GlassChair": "Стеклянный стул", + "GoldenChair": "Золотой стул", + "GoldenToilet": "Золотой унитаз", + "BarStool": "Барный стул", + "HoneyChair": "Медовый стул", + "SteampunkChair": "Стимпанковый стул", + "GlassDoor": "Стеклянная дверь", + "Sign": "Знак", + "GoldenDoor": "Золотая дверь", + "HoneyDoor": "Медовая дверь", + "SteampunkDoor": "Стимпанковая дверь", + "GlassTable": "Стеклянный стол", + "BanquetTable": "Банкетный стол", + "Bar": "Бар", + "GoldenTable": "Золотой стол", + "HoneyTable": "Медовый стол", + "SteampunkTable": "Стимпанковый стол", + "GlassBed": "Стеклянная кровать", + "AshBlock": "Пепел", + "GoldenBed": "Золотая кровать", + "HoneyBed": "Медовая кровать", + "SteampunkBed": "Стимпанковая кровать", + "LivingWoodWall": "Стена из живой древесины", + "FartinaJar": "Пердушка в банке", + "Pumpkin": "Тыква", + "PumpkinWall": "Тыквенная стена", + "Hay": "Сено", + "HayWall": "Соломенная стена", + "SpookyWood": "Жуткая древесина", + "Obsidian": "Обсидиан", + "SpookyWoodWall": "Жуткая деревянная стена", + "PumpkinHelmet": "Тыквенный шлем", + "PumpkinBreastplate": "Тыквенный нагрудник", + "PumpkinLeggings": "Тыквенные ботинки", + "CandyApple": "Конфетное яблоко", + "SoulCake": "Кулич", + "NurseHat": "Шапка медсестры", + "NurseShirt": "Рубашка медсестры", + "NursePants": "Штаны медсестры", + "WizardsHat": "Шляпа волшебника", + "Hellstone": "Адский камень", + "GuyFawkesMask": "Маска Гая Фокса", + "DyeTraderRobe": "Рубашка продавца красителей", + "SteampunkGoggles": "Стимпанковые очки", + "CyborgHelmet": "Шлем киборга", + "CyborgShirt": "Нагрудник киборга", + "CyborgPants": "Ботинки киборга", + "CreeperMask": "Маска ползуна", + "CreeperShirt": "Рубашка ползуна", + "CreeperPants": "Штаны ползуна", + "CatMask": "Кошачья маска", + "HellstoneBar": "Слиток адского камня", + "CatShirt": "Кошачья рубашка", + "CatPants": "Кошачьи штаны", + "GhostMask": "Маска призрака", + "GhostShirt": "Рубашка призрака", + "PumpkinMask": "Маска тыквы", + "PumpkinShirt": "Рубашка тыквы", + "PumpkinPants": "Штаны тыквы", + "RobotMask": "Маска робота", + "RobotShirt": "Рубашка робота", + "RobotPants": "Штаны робота", + "MudBlock": "Грязь", + "UnicornMask": "Маска единорога", + "UnicornShirt": "Рубашка единорога", + "UnicornPants": "Штаны единорога", + "VampireMask": "Маска вампира", + "VampireShirt": "Рубашка вампира", + "VampirePants": "Штаны вампира", + "WitchHat": "Шляпа ведьмы", + "LeprechaunHat": "Шапка лепрекона", + "LeprechaunShirt": "Рубашка лепрекона", + "LeprechaunPants": "Штаны лепрекона", + "Sapphire": "Сапфир", + "PixieShirt": "Рубашка феи", + "PixiePants": "Штаны феи", + "PrincessHat": "Шляпа принцессы", + "PrincessDressNew": "Платье принцессы", + "GoodieBag": "Мешок с добром", + "WitchDress": "Платье ведьмы", + "WitchBoots": "Ботинки ведьмы", + "BrideofFrankensteinMask": "Маска невесты Франкенштейна", + "BrideofFrankensteinDress": "Платье невесты Франкенштейна", + "KarateTortoiseMask": "Маска черепашки-ниндзя", + "Ruby": "Рубин", + "KarateTortoiseShirt": "Нагрудник черепашки-ниндзя", + "KarateTortoisePants": "Штаны черепашки-ниндзя", + "CandyCornRifle": "Винтовка из кенди-корна", + "CandyCorn": "Кенди-корн", + "JackOLanternLauncher": "Светильникомет Джека", + "ExplosiveJackOLantern": "Разрывной светильник Джека", + "Sickle": "Коса", + "PumpkinPie": "Тыквенный пирог", + "ScarecrowHat": "Шляпа пугала", + "ScarecrowShirt": "Рубаха пугала", + "Emerald": "Изумруд", + "ScarecrowPants": "Штаны пугала", + "Cauldron": "Котел", + "PumpkinChair": "Тыквенный стул", + "PumpkinDoor": "Тыквенная дверь", + "PumpkinTable": "Тыквенный стол", + "PumpkinWorkBench": "Тыквенный верстак", + "PumpkinPlatform": "Тыквенная платформа", + "TatteredFairyWings": "Изодранные крылья феи", + "SpiderEgg": "Паучье яйцо", + "MagicalPumpkinSeed": "Волшебное тыквенное семечко", + "DepthMeter": "Глубиномер", + "Topaz": "Топаз", + "BatHook": "Крюк летучей мыши", + "BatScepter": "Скипетр летучей мыши", + "RavenStaff": "Посох ворона", + "JungleKeyMold": "Слепок ключа джунглей", + "CorruptionKeyMold": "Слепок ключа порчи", + "CrimsonKeyMold": "Слепок багрового ключа", + "HallowedKeyMold": "Слепок ключ освящения", + "FrozenKeyMold": "Слепок замороженного ключа", + "HangingJackOLantern": "Подвесной светильник Джека", + "RottenEgg": "Тухлое яйцо", + "Amethyst": "Аметист", + "UnluckyYarn": "Несчастливый клубок", + "BlackFairyDust": "Пыль черной феи", + "Jackelier": "Джеколюстра", + "JackOLantern": "Светильник Джека", + "SpookyChair": "Жуткий стул", + "SpookyDoor": "Жуткая дверь", + "SpookyTable": "Жуткий стол", + "SpookyWorkBench": "Жуткий верстак", + "ReaperHood": "Капюшон жнеца", + "Diamond": "Алмаз", + "ReaperRobe": "Роба жнеца", + "FoxMask": "Маска лисы", + "FoxShirt": "Рубашка лисы", + "FoxPants": "Штаны лисы", + "CatEars": "Кошачьи ушки", + "BloodyMachete": "Кровавый мачете", + "TheHorsemansBlade": "Клинок всадника", + "BladedGlove": "Перчатка с лезвиями", + "PumpkinSeed": "Тыквенное семечко", + "SpookyHook": "Жуткий крюк", + "GlowingMushroom": "Светящийся гриб", + "SpookyWings": "Жуткие крылья", + "SpookyTwig": "Жуткая ветвь", + "SpookyHelmet": "Жуткий шлем", + "SpookyBreastplate": "Жуткий нагрудник", + "SpookyLeggings": "Жуткие ботинки", + "StakeLauncher": "Коломет", + "Stake": "Кол", + "CursedSapling": "Проклятое растеньице", + "SpaceCreatureMask": "Маска чужого", + "SpaceCreatureShirt": "Нагрудник чужого", + "Star": "Звезда", + "SpaceCreaturePants": "Штаны чужого", + "WolfMask": "Маска волка", + "WolfShirt": "Рубашка волка", + "WolfPants": "Штаны волка", + "PumpkinMoonMedallion": "Медальон тыквенной луны", + "NecromanticScroll": "Свиток некроманта", + "JackingSkeletron": "Подъемный Скелетрон", + "BitterHarvest": "Горький урожай", + "BloodMoonCountess": "Графиня кровавой луны", + "HallowsEve": "Канун Освящения", + "IvyWhip": "Хлыст", + "MorbidCuriosity": "Нездоровое любопытство", + "TreasureHunterShirt": "Рубашка охотника за сокровищами", + "TreasureHunterPants": "Штаны охотника за сокровищами", + "DryadCoverings": "Топ дриады", + "DryadLoincloth": "Набедренная повязка дриады", + "MourningWoodTrophy": "Трофей Плакучего Древня", + "PumpkingTrophy": "Трофей Тыквенного Короля", + "JackOLanternMask": "Светильник-маска Джека", + "SniperScope": "Снайперский прицел", + "HeartLantern": "Светильник-сердце", + "BreathingReed": "Дыхательная трубка", + "JellyfishDivingGear": "Медузный водолазный костюм", + "ArcticDivingGear": "Арктический водолазный костюм", + "FrostsparkBoots": "Искрометные морозные ботинки", + "FartInABalloon": "Пердушка в шарике", + "PapyrusScarab": "Папирусный скарабей", + "CelestialStone": "Небесный камень", + "Hoverboard": "Летающая доска", + "CandyCane": "Карамель", + "SugarPlum": "Сахарная слива", + "Present": "Подарок", + "Flipper": "Ласты", + "RedRyder": "Красное пневматическое ружье", + "FestiveWings": "Праздничные крылья", + "PineTreeBlock": "Сосновый блок", + "ChristmasTree": "Новогодняя ель", + "StarTopper1": "Звезда на елку 1", + "StarTopper2": "Звезда на елку 2", + "StarTopper3": "Звезда на елку 3", + "BowTopper": "Украшение-бант", + "WhiteGarland": "Белый венок", + "WhiteAndRedGarland": "Красно-белый венок", + "HealingPotion": "Лечебное зелье", + "RedGardland": "Красный венок", + "RedAndGreenGardland": "Красно-зеленый венок", + "GreenGardland": "Зеленый венок", + "GreenAndWhiteGarland": "Бело-зеленый венок", + "MulticoloredBulb": "Разноцветные игрушки", + "RedBulb": "Красная игрушка", + "YellowBulb": "Желтая игрушка", + "GreenBulb": "Зеленая игрушка", + "RedAndGreenBulb": "Красная и зеленая игрушка", + "YellowAndGreenBulb": "Желтая и зеленая игрушка", + "ManaPotion": "Зелье маны", + "RedAndYellowBulb": "Красная и желтая игрушка", + "WhiteBulb": "Белая игрушка", + "WhiteAndRedBulb": "Красная и белая игрушка", + "WhiteAndYellowBulb": "Белая и желтая игрушка", + "WhiteAndGreenBulb": "Белая и зеленая игрушка", + "MulticoloredLights": "Разноцветная гирлянда", + "RedLights": "Красная гирлянда", + "GreenLights": "Зеленая гирлянда", + "BlueLights": "Синяя гирлянда", + "YellowLights": "Желтая гирлянда", + "GoldBar": "Золотой слиток", + "BladeofGrass": "Травяной клинок", + "RedAndYellowLights": "Красно-желтая гирлянда", + "RedAndGreenLights": "Красно-зеленая гирлянда", + "YellowAndGreenLights": "Желто-зеленая гирлянда", + "BlueAndGreenLights": "Сине-зеленая гирлянда", + "RedAndBlueLights": "Красно-синяя гирлянда", + "BlueAndYellowLights": "Сине-желтая гирлянда", + "GiantBow": "Большой бант", + "ReindeerAntlers": "Оленьи рога", + "Holly": "Холли", + "CandyCaneSword": "Карамельный меч", + "ThornChakram": "Колючий чакрам", + "EldMelter": "Тигель эльфа", + "ChristmasPudding": "Рождественский пудинг", + "Eggnog": "Алкогольный гоголь-моголь", + "StarAnise": "Звездчатый анис", + "ReindeerBells": "Оленьи колокольчики", + "CandyCaneHook": "Карамельный крюк", + "ChristmasHook": "Рождественский крюк", + "CnadyCanePickaxe": "Карамельная кирка", + "FruitcakeChakram": "Кексовый чакрам", + "SugarCookie": "Сахарное печенье", + "ObsidianBrick": "Обсидиановый кирпич", + "GingerbreadCookie": "Имбирное печенье", + "HandWarmer": "Варежка", + "Coal": "Уголь", + "Toolbox": "Сумка с инструментами", + "PineDoor": "Сосновая дверь", + "PineChair": "Сосновый стул", + "PineTable": "Сосновый стол", + "DogWhistle": "Свисток для собак", + "ChristmasTreeSword": "Елочный меч", + "ChainGun": "Пулемет", + "ObsidianSkull": "Обсидиановый череп", + "Razorpine": "Сосновый хвоемет", + "BlizzardStaff": "Посох волшебника", + "MrsClauseHat": "Шляпа миссис Клаус", + "MrsClauseShirt": "Рубашка миссис Клаус", + "MrsClauseHeels": "Туфельки миссис Клаус", + "ParkaHood": "Капюшон парки", + "ParkaCoat": "Куртка парки", + "ParkaPants": "Брюки парки", + "SnowHat": "Зимняя шапочка", + "UglySweater": "Уродливый свитер", + "MushroomGrassSeeds": "Семена грибной травы", + "TreeMask": "Маска дерева", + "TreeShirt": "Рубашка дерева", + "TreeTrunks": "Штаны дерева", + "ElfHat": "Шляпа эльфа", + "ElfShirt": "Рубашка эльфа", + "ElfPants": "Брюки эльфа", + "SnowmanCannon": "Пушка снеговика", + "NorthPole": "Северный полюс", + "ChristmasTreeWallpaper": "Обои с новогодней елью", + "OrnamentWallpaper": "Обои с орнаментом", + "JungleGrassSeeds": "Семена травы джунглей", + "CandyCaneWallpaper": "Обои с карамелью", + "FestiveWallpaper": "Праздничные обои", + "StarsWallpaper": "Обои со звездами", + "SquigglesWallpaper": "Обои с завитками", + "SnowflakeWallpaper": "Обои с загогулинами", + "KrampusHornWallpaper": "Обои с рогами черта", + "BluegreenWallpaper": "Сине-зеленые обои", + "GrinchFingerWallpaper": "Обои с пальцами Гринча", + "NaughtyPresent": "Гадкий подарок", + "BabyGrinchMischiefWhistle": "Проказный свисток малыша Гринча", + "WoodenHammer": "Деревянный молот", + "IceQueenTrophy": "Трофей ледяной королевы", + "SantaNK1Trophy": "Трофей Санты-NK1", + "EverscreamTrophy": "Трофей Злой Ели", + "MusicBoxPumpkinMoon": "Музыкальная шкатулка (тыквенная луна)", + "MusicBoxAltUnderground": "Музыкальная шкатулка (другое подземелье)", + "MusicBoxFrostMoon": "Музыкальная шкатулка (морозная луна)", + "BrownPaint": "Коричневая краска", + "ShadowPaint": "Теневая краска", + "NegativePaint": "Негативная краска", + "TeamDye": "Командная краска", + "StarCannon": "Звездная пушка", + "AmethystGemsparkBlock": "Аметистовый блок", + "TopazGemsparkBlock": "Топазовый блок", + "SapphireGemsparkBlock": "Сапфировый блок", + "EmeraldGemsparkBlock": "Изумрудный блок", + "RubyGemsparkBlock": "Рубиновый блок", + "DiamondGemsparkBlock": "Алмазный блок", + "AmberGemsparkBlock": "Янтарный блок", + "LifeHairDye": "Краска жизни", + "ManaHairDye": "Краска маны", + "DepthHairDye": "Краска глубины", + "BluePhaseblade": "Синий лазерный меч", + "MoneyHairDye": "Краска монет", + "TimeHairDye": "Краска времени", + "TeamHairDye": "Командная краска", + "BiomeHairDye": "Биомная краска", + "PartyHairDye": "Праздничная краска", + "RainbowHairDye": "Радужная краска", + "SpeedHairDye": "Краска скорости", + "AngelHalo": "Нимб", + "Fez": "Феска", + "Womannquin": "Женский манекен", + "RedPhaseblade": "Красный лазерный меч", + "HairDyeRemover": "Очиститель краски", + "BugNet": "Сачок", + "Firefly": "Светлячок", + "FireflyinaBottle": "Светлячок в бутылке", + "MonarchButterfly": "Монарх", + "PurpleEmperorButterfly": "Ивовая переливница", + "RedAdmiralButterfly": "Нимфалида", + "UlyssesButterfly": "Улисс", + "SulphurButterfly": "Желтушка", + "TreeNymphButterfly": "Дриада", + "DirtBlock": "Земля", + "CopperBar": "Медный слиток", + "GreenPhaseblade": "Зеленый лазерный меч", + "ZebraSwallowtailButterfly": "Графия марцел", + "JuliaButterfly": "Джулия \"Баттерфляй\"", + "Worm": "Червь", + "Mouse": "Мышь", + "LightningBug": "Светляк", + "LightningBuginaBottle": "Светляк в бутылке", + "Snail": "Улитка", + "GlowingSnail": "Светящаяся улитка", + "FancyGreyWallpaper": "Пестрые серые обои", + "IceFloeWallpaper": "Обои с льдинками", + "PurplePhaseblade": "Фиолетовый лазерный меч", + "MusicWallpaper": "Музыкальные обои", + "PurpleRainWallpaper": "Обои с пурпурным дождем", + "RainbowWallpaper": "Радужные обои", + "SparkleStoneWallpaper": "Обои с каменной крошкой", + "StarlitHeavenWallpaper": "Обои со звездным небом", + "Bird": "Птица", + "BlueJay": "Голубая сойка", + "Cardinal": "Кардинал", + "Squirrel": "Белка", + "Bunny": "Кролик", + "WhitePhaseblade": "Белый лазерный меч", + "YellowPhaseblade": "Желтый лазерный меч", + "MeteorHamaxe": "Метеоритовый молотопор", + "EmptyBucket": "Пустое ведро", + "WaterBucket": "Ведро с водой", + "LavaBucket": "Ведро с лавой", + "JungleRose": "Роза из джунглей", + "Stinger": "Жало", + "SilverBar": "Серебряный слиток", + "Vine": "Лоза", + "FeralClaws": "Звериные когти", + "BlacksmithRack": "Стойка кузнеца", + "CarpentryRack": "Стойка плотника", + "HelmetRack": "Стойка для шлемов", + "SpearRack": "Стойка для копий", + "SwordRack": "Стойка для мечей", + "StoneSlab": "Каменная пластина", + "AnkletoftheWind": "Браслет ветра", + "SandstoneSlab": "Песчаная пластина", + "Frog": "Лягушка", + "MallardDuck": "Кряква", + "Duck": "Утка", + "StaffofRegrowth": "Посох выращивания", + "HellstoneBrick": "Кирпич из адского камня", + "WhoopieCushion": "Подушка-пердушка", + "BlackScorpion": "Черный скорпион", + "Scorpion": "Скорпион", + "BubbleWallpaper": "Обои с пузырьками", + "CopperPipeWallpaper": "Обои с медными трубами", + "Shackle": "Кандалы", + "DuckyWallpaper": "Обои с уточками", + "FrostCore": "Морозное ядро", + "BunnyCage": "Клетка с кроликом", + "SquirrelCage": "Клетка с белкой", + "MallardDuckCage": "Клетка с кряквой", + "DuckCage": "Клетка с уткой", + "BirdCage": "Клетка с птицей", + "BlueJayCage": "Клетка с голубой сойкой", + "CardinalCage": "Клетка с кардиналом", + "WaterfallWall": "Водопадная стена", + "MoltenHamaxe": "Литой молотопор", + "LavafallWall": "Лавападная стена", + "CrimsonSeeds": "Семена багрянца", + "HeavyWorkBench": "Тяжелый верстак", + "CopperPlating": "Медная пластина", + "SnailCage": "Клетка с улиткой", + "GlowingSnailCage": "Клетка со светящейся улиткой", + "ShroomiteDiggingClaw": "Грибная шахтерская перчатка", + "AmmoBox": "Ящик с боеприпасами", + "MonarchButterflyJar": "Банка с монархом", + "PurpleEmperorButterflyJar": "Банка с ивовой переливницей", + "Flamelash": "Огнеплеть", + "RedAdmiralButterflyJar": "Банка с нимфалидой", + "UlyssesButterflyJar": "Банка с улиссом", + "SulphurButterflyJar": "Банка с желтушкой", + "TreeNymphButterflyJar": "Банка с дриадой", + "ZebraSwallowtailButterflyJar": "Банка с графией марцел", + "JuliaButterflyJar": "Банка с Джулией \"Баттерфляй\"", + "ScorpionCage": "Клетка со скорпионом", + "BlackScorpionCage": "Клетка с черным скорпионом", + "VenomStaff": "Посох яда", + "SpectreMask": "Спектральная маска", + "PhoenixBlaster": "Бластер феникса", + "FrogCage": "Клетка с лягушкой", + "MouseCage": "Клетка с мышью", + "BoneWelder": "Костяной сварочный аппарат", + "FleshCloningVaat": "Бак клонирования плоти", + "GlassKiln": "Печь для стекла", + "LihzahrdFurnace": "Печь ящщеров", + "LivingLoom": "Живой ткацкий станок", + "SkyMill": "Небесная мельница", + "IceMachine": "Ледовая машина", + "BeetleHelmet": "Жучий шлем", + "IronBar": "Железный слиток", + "Sunfury": "Солнечная ярость", + "BeetleScaleMail": "Жучьи латы", + "BeetleShell": "Жучий нагрудник", + "BeetleLeggings": "Жучьи латы", + "SteampunkBoiler": "Стимпанковый котел", + "HoneyDispenser": "Медовый диспенсер", + "Penguin": "Пингвин", + "PenguinCage": "Клетка с пингвином", + "WormCage": "Клетка с червем", + "Terrarium": "Террарий", + "SuperManaPotion": "Суперзелье маны", + "Hellforge": "Адская кузня", + "EbonwoodFence": "Забор из черной древесины", + "RichMahoganyFence": "Забор из красной древесины", + "PearlwoodFence": "Забор из жемчужной древесины", + "ShadewoodFence": "Забор из мрачной древесины", + "BrickLayer": "Мастерок", + "ExtendoGrip": "Ключ-удлинитель", + "PaintSprayer": "Краскопульт", + "PortableCementMixer": "Переносная бетономешалка", + "BeetleHusk": "Жучий панцирь", + "CelestialMagnet": "Небесный магнит", + "ClayPot": "Глиняный горшок", + "CelestialEmblem": "Небесная эмблема", + "CelestialCuffs": "Небесные наручники", + "PeddlersHat": "Шляпа торговца", + "PulseBow": "Пульсирующий лук", + "NaturesGift": "Дар природы", + "Bed": "Кровать", + "Silk": "Шелк", + "DynastyTable": "Родовой стол", + "LesserRestorationPotion": "Малое восстановительное зелье", + "DynastyWood": "Родовая древесина", + "RedDynastyShingles": "Красная родовая деревянная черепица", + "BlueDynastyShingles": "Синяя родовая деревянная черепица", + "WhiteDynastyWall": "Белая родовая стена", + "BlueDynastyWall": "Синяя родовая стена", + "DynastyDoor": "Родовая дверь", + "Sake": "Саке", + "PadThai": "Тайская еда", + "Pho": "Фо", + "Revolver": "Револьвер", + "RestorationPotion": "Восстановительное зелье", + "Gatligator": "Гатлингатор", + "ArcaneRuneWall": "Загадочная рунная стена", + "WaterGun": "Водяной пистолет", + "Katana": "Катана", + "UltrabrightTorch": "Ультраяркий факел", + "MagicHat": "Волшебная шляпа", + "DiamondRing": "Кольцо с алмазом", + "Gi": "Ги", + "Kimono": "Кимоно", + "GypsyRobe": "Цыганский плащ", + "JungleHat": "Шляпа джунглей", + "BeetleWings": "Крылья жука", + "TigerSkin": "Шкура тигра", + "LeopardSkin": "Шкура леопарда", + "ZebraSkin": "Шкура зебры", + "CrimsonCloak": "Багровая мантия", + "MysteriousCape": "Таинственная накидка", + "RedCape": "Красная накидка", + "WinterCape": "Зимняя накидка", + "WoodFishingPole": "Деревянная удочка", + "JungleShirt": "Рубашка джунглей", + "Bass": "Окунь", + "ReinforcedFishingPole": "Прочная удочка", + "FiberglassFishingPole": "Удочка из стекловолокна", + "FisherofSouls": "Рыбак-душелов", + "GoldenFishingRod": "Золотая удочка", + "MechanicsRod": "Удочка механика", + "SittingDucksFishingRod": "Удочка сидящей утки", + "Trout": "Форель", + "Salmon": "Лосось", + "AtlanticCod": "Атлантическая треска", + "Gel": "Гель", + "JunglePants": "Ботинки джунглей", + "Tuna": "Тунец", + "RedSnapper": "Красный луциан", + "NeonTetra": "Тетра-неон", + "ArmoredCavefish": "Бронечешуйчатая луцифуга", + "Damselfish": "Рыба-ласточка", + "CrimsonTigerfish": "Багряный терапон", + "FrostMinnow": "Морозный гальян", + "PrincessFish": "Рыба-принцесса", + "GoldenCarp": "Серебряный карась", + "SpecularFish": "Зеркальная рыба", + "MoltenHelmet": "Литой шлем", + "Prismite": "Призматическая рыба", + "VariegatedLardfish": "Пестрая жирнорыба", + "FlarefinKoi": "Фларефин кои", + "DoubleCod": "Двойная треска", + "Honeyfin": "Медовая рыба", + "Obsidifish": "Обсидирыба", + "Shrimp": "Креветка", + "ChaosFish": "Рыба хаоса", + "Ebonkoi": "Эбонкои", + "Hemopiranha": "Гемопиранья", + "MoltenBreastplate": "Литой нагрудник", + "Rockfish": "Морской окунь", + "Stinkfish": "Пескарка", + "MiningPotion": "Зелье добычи", + "HeartreachPotion": "Зелье сердечного магнита", + "CalmingPotion": "Успокаивающее зелье", + "BuilderPotion": "Зелье строителя", + "TitanPotion": "Зелье титана", + "FlipperPotion": "Зелье пловца", + "SummoningPotion": "Зелье призыва", + "TrapsightPotion": "Зелье чувства опасности", + "MoltenGreaves": "Литые ботинки", + "PurpleClubberfish": "Фиолетовая рыба-дубина", + "ObsidianSwordfish": "Обсидиановая рыба-меч", + "Swordfish": "Рыба-меч", + "IronFence": "Железный забор", + "WoodenCrate": "Деревянный ящик", + "IronCrate": "Железный ящик", + "GoldenCrate": "Золотой ящик", + "OldShoe": "Старый башмак", + "FishingSeaweed": "Водоросли", + "TinCan": "Жестяная банка", + "MeteorShot": "Метеоритовая пуля", + "ReaverShark": "Акула-похититель", + "SawtoothShark": "Пилозубая акула", + "Minecart": "Вагонетка", + "AmmoReservationPotion": "Зелье экономии патронов", + "LifeforcePotion": "Зелье жизненной силы", + "EndurancePotion": "Зелье выносливости", + "RagePotion": "Зелье ярости", + "InfernoPotion": "Зелье инферно", + "WrathPotion": "Зелье мести", + "StickyBomb": "Бомба-липучка", + "RecallPotion": "Зелье возврата", + "TeleportationPotion": "Зелье телепортации", + "LovePotion": "Любовное зелье", + "StinkPotion": "Вонючее зелье", + "FishingPotion": "Зелье рыбалки", + "SonarPotion": "Зелье сонара", + "CratePotion": "Зелье ящиков", + "ShiverthornSeeds": "Семечко дрожецвета", + "Shiverthorn": "Дрожецвет", + "WarmthPotion": "Зелье согревания", + "BlackLens": "Черная линза", + "FishHook": "Рыболовный крючок", + "BeeHeadgear": "Пчелиный наголовник", + "BeeBreastplate": "Пчелиный нагрудник", + "BeeGreaves": "Пчелиные ботинки", + "HornetStaff": "Посох шершня", + "ImpStaff": "Посох беса", + "QueenSpiderStaff": "Посох королевы пауков", + "AnglerHat": "Шляпа рыбака", + "AnglerVest": "Куртка рыбака", + "AnglerPants": "Брюки рыбака", + "Sunglasses": "Солнцезащитные очки", + "SpiderMask": "Паучья маска", + "SpiderBreastplate": "Паучий нагрудник", + "SpiderGreaves": "Паучьи брюки", + "HighTestFishingLine": "Прочная леска", + "AnglerEarring": "Серьга рыбака", + "TackleBox": "Ящик рыбацких снастей", + "BlueDungeonPiano": "Синее пианино темницы", + "GreenDungeonPiano": "Зеленое пианино темницы", + "PinkDungeonPiano": "Розовое пианино темницы", + "GoldenPiano": "Золотое пианино", + "WizardHat": "Шляпа колдуна", + "ObsidianPiano": "Обсидиановое пианино", + "BonePiano": "Костяное пианино", + "CactusPiano": "Кактусовое пианино", + "SpookyPiano": "Жуткое пианино", + "SkywarePiano": "Небесное пианино", + "LihzahrdPiano": "Пианино ящщеров", + "BlueDungeonDresser": "Синяя тумбочка темницы", + "GreenDungeonDresser": "Зеленая тумбочка темницы", + "PinkDungeonDresser": "Розовая тумбочка темницы", + "GoldenDresser": "Золотая тумбочка", + "TopHat": "Цилиндр", + "ObsidianDresser": "Обсидиановая тумбочка", + "BoneDresser": "Костяная тумбочка", + "CactusDresser": "Кактусовая тумбочка", + "SpookyDresser": "Жуткая тумбочка", + "SkywareDresser": "Небесная тумбочка", + "HoneyDresser": "Медовая тумбочка", + "LihzahrdDresser": "Тумбочка ящщеров", + "Sofa": "Диван", + "EbonwoodSofa": "Диван из черной древесины", + "RichMahoganySofa": "Диван из красной древесины", + "WoodenSword": "Деревянный меч", + "TuxedoShirt": "Пиджак", + "PearlwoodSofa": "Диван из жемчужной древесины", + "ShadewoodSofa": "Диван из мрачной древесины", + "BlueDungeonSofa": "Синий диван темницы", + "GreenDungeonSofa": "Зеленый диван темницы", + "PinkDungeonSofa": "Розовый диван темницы", + "GoldenSofa": "Золотой диван", + "ObsidianSofa": "Обсидиановый диван", + "BoneSofa": "Костяной диван", + "CactusSofa": "Кактусовый диван", + "SpookySofa": "Жуткий диван", + "TuxedoPants": "Брюки", + "SkywareSofa": "Небесный диван", + "HoneySofa": "Медовый диван", + "SteampunkSofa": "Стимпанковый диван", + "MushroomSofa": "Грибной диван", + "GlassSofa": "Стеклянный диван", + "PumpkinSofa": "Тыквенный диван", + "LihzahrdSofa": "Диван ящщеров", + "SeashellHairpin": "Ракушка-заколка", + "MermaidAdornment": "Украшение русалки", + "MermaidTail": "Хвост русалки", + "SummerHat": "Соломенная шляпа", + "ZephyrFish": "Рыба-зефир", + "Fleshcatcher": "Ловец плоти", + "HotlineFishingHook": "Горящий рыболовный крючок", + "FrogLeg": "Лягушачья лапка", + "Anchor": "Якорь", + "CookedFish": "Приготовленная рыба", + "CookedShrimp": "Приготовленная креветка", + "Sashimi": "Сашими", + "BunnyHood": "Кроличий капюшон", + "BeeWax": "Пчелиный воск", + "CopperPlatingWall": "Стена из медной пластины", + "StoneSlabWall": "Стена из каменной пластина", + "Sail": "Парус", + "CoralstoneBlock": "Коралловый блок", + "BlueJellyfish": "Синяя медуза", + "GreenJellyfish": "Зеленая медуза", + "PinkJellyfish": "Розовая медуза", + "BlueJellyfishJar": "Синяя медуза в банке", + "PlumbersHat": "Шляпа водопроводчика", + "GreenJellyfishJar": "Зеленая медуза в банке", + "PinkJellyfishJar": "Розовая медуза в банке", + "PlumbersShirt": "Рубашка водопроводчика", + "Batfish": "Летучая рыба-мышь", + "BumblebeeTuna": "Шмель-тунец", + "Catfish": "Рыба-кот", + "Cloudfish": "Рыба-облако", + "Cursedfish": "Прокляторыба", + "Dirtfish": "Землерыба", + "DynamiteFish": "Рыба-динамит", + "EaterofPlankton": "Пожиратель планктона", + "FallenStarfish": "Упавшая морская звезда", + "TheFishofCthulu": "Рыба Ктулху", + "PlumbersPants": "Штаны водопроводчика", + "Fishotron": "Колючкорыб", + "Harpyfish": "Гарпирыба", + "Hungerfish": "Рыбожорка", + "Ichorfish": "Гноерыба", + "Jewelfish": "Рыба-самоцвет", + "MirageFish": "Рыба-мираж", + "MutantFlinxfin": "Рыборысь-мутант", + "Pengfish": "Пингворыба", + "Pixiefish": "Рыба-фея", + "Spiderfish": "Паукорыба", + "HerosHat": "Шляпа героя", + "TundraTrout": "Тундровая форель", + "UnicornFish": "Рыба-единорог", + "GuideVoodooFish": "Рыба вуду Гида", + "Wyverntail": "Вивернохвостка", + "ZombieFish": "Рыба-зомби", + "AmanitaFungifin": "Аманитиновая гриборыба", + "Angelfish": "Рыба-ангел", + "BloodyManowar": "Кровавый мановар", + "Bonefish": "Альбула", + "Bunnyfish": "Рыба-кролик", + "HerosShirt": "Рубашка героя", + "CapnTunabeard": "Капитанский тунцебород", + "Clownfish": "Рыба-клоун", + "DemonicHellfish": "Адская демонорыба", + "Derpfish": "Тупорыба", + "Fishron": "Рыброн", + "InfectedScabbardfish": "Зараженная рыба-сабля", + "Mudfish": "Ильная рыба", + "Slimefish": "Слизнерыба", + "TropicalBarracuda": "Тропическая барракуда", + "KingSlimeTrophy": "Трофей Короля слизней", + "HerosPants": "Штаны героя", + "ShipInABottle": "Корабль в бутылке", + "KingSlimeMask": "Маска Короля слизней", + "FinWings": "Плавниковые крылья", + "TreasureMap": "Карта сокровищ", + "SeaweedPlanter": "Вазон с водорослями", + "PillaginMePixels": "Йо-хо-хо, хватайте пиксели", + "FishCostumeMask": "Маска костюма рыбы", + "FishCostumeShirt": "Рубашка костюма рыбы", + "WoodenDoor": "Деревянная дверь", + "FishBowl": "Аквариум", + "FishCostumeFinskirt": "Хвост костюма рыбы", + "GingerBeard": "Рыжая борода", + "ArchaeologistsHat": "Шляпа археолога", + "ArchaeologistsJacket": "Рубашка археолога", + "ArchaeologistsPants": "Штаны археолога", + "OpticStaff": "Оптический посох", + "BlackThread": "Черные нитки", + "GreenThread": "Зеленые нитки", + "NinjaHood": "Шлем ниндзя", + "NinjaShirt": "Рубашка ниндзя", + "NinjaPants": "Штаны ниндзя", + "Leather": "Кожа", + "StoneWall": "Каменная стена", + "RedHat": "Красная шапочка", + "Goldfish": "Золотая рыбка", + "Robe": "Платье", + "RobotHat": "Шапка робота", + "GoldCrown": "Золотая корона", + "HellfireArrow": "Стрела адского огня", + "Sandgun": "Песчаная пушка", + "GuideVoodooDoll": "Кукла вуду Гида", + "DivingHelmet": "Водолазный шлем", + "FamiliarShirt": "Обычная рубашка", + "Acorn": "Желудь", + "FamiliarPants": "Обычные брюки", + "FamiliarWig": "Обычный парик", + "DemonScythe": "Демоническая коса", + "NightsEdge": "Грань ночи", + "DarkLance": "Темное копье", + "Coral": "Коралл", + "Cactus": "Кактус", + "Trident": "Трезубец", + "SilverBullet": "Серебряная пуля", + "ThrowingKnife": "Метательный нож", + "LesserHealingPotion": "Малое лечебное зелье", + "Spear": "Копье", + "Blowpipe": "Духовая трубка", + "Glowstick": "Светящаяся палочка", + "Seed": "Семечко", + "WoodenBoomerang": "Деревянный бумеранг", + "Aglet": "Аксельбант", + "StickyGlowstick": "Липкая светящаяся палочка", + "PoisonedKnife": "Отравленный нож", + "ObsidianSkinPotion": "Зелье обсидиановой кожи", + "RegenerationPotion": "Зелье регенерации", + "AngryTrapperBanner": "Знамя злобного хватателя", + "ArmoredVikingBanner": "Знамя бронированного викинга", + "BlackSlimeBanner": "Знамя черного слизня", + "LifeCrystal": "Кристалл жизни", + "SwiftnessPotion": "Зелье скорости", + "BlueArmoredBonesBanner": "Знамя синего бронированного скелета", + "BlueCultistArcherBanner": "Знамя синего лучника-культиста", + "ManaCloakStar": "", + "BlueCultistFighterBanner": "Знамя синего бойца-культиста", + "BoneLeeBanner": "Знамя Костюса Ли", + "ClingerBanner": "Знамя хватателя", + "CochinealBeetleBanner": "Знамя кошенильного жука", + "CorruptPenguinBanner": "Знамя порченого пингвина", + "CorruptSlimeBanner": "Знамя порченого слизня", + "CorruptorBanner": "Знамя Разлагателя", + "GillsPotion": "Зелье подводного дыхания", + "CrimslimeBanner": "Знамя багрового слизня", + "CursedSkullBanner": "Знамя проклятого черепа", + "CyanBeetleBanner": "Знамя голубого жука", + "DevourerBanner": "Знамя пожирателя", + "DiablolistBanner": "Знамя сатаниста", + "DoctorBonesBanner": "Знамя доктора Бонса", + "DungeonSlimeBanner": "Знамя слизня из темницы", + "DungeonSpiritBanner": "Знамя духа из темницы", + "ElfArcherBanner": "Знамя эльфа-лучника", + "ElfCopterBanner": "Знамя эльфокоптера", + "IronskinPotion": "Зелье железной кожи", + "EyezorBanner": "Знамя глазора", + "FlockoBanner": "Знамя Флоко", + "GhostBanner": "Знамя призрака", + "GiantBatBanner": "Знамя гигантской летучей мыши", + "GiantCursedSkullBanner": "Знамя гигантского проклятого черепа", + "GiantFlyingFoxBanner": "Знамя гигантской летучей лисицы", + "GingerbreadManBanner": "Знамя пряничного человек", + "GoblinArcherBanner": "Знамя гоблина-лучника", + "GreenSlimeBanner": "Знамя зеленого слизня", + "HeadlessHorsemanBanner": "Знамя всадника без головы", + "ManaRegenerationPotion": "Зелье регенерации маны", + "HellArmoredBonesBanner": "Знамя адского бронированного скелета", + "HellhoundBanner": "Знамя адской гончей", + "HoppinJackBanner": "Знамя скачущей тыквы", + "IceBatBanner": "Знамя ледяной летучей мыши", + "IceGolemBanner": "Знамя ледяного голема", + "IceSlimeBanner": "Знамя ледяного слизня", + "IchorStickerBanner": "Знамя ихорного плевателя", + "IlluminantBatBanner": "Знамя светящейся летучей мыши", + "IlluminantSlimeBanner": "Знамя светящегося слизня", + "JungleBatBanner": "Знамя тропической летучей мыши", + "MagicPowerPotion": "Зелье магической силы", + "JungleSlimeBanner": "Знамя слизня джунглей", + "KrampusBanner": "Знамя крампуса", + "LacBeetleBanner": "Знамя лакового жука", + "LavaBatBanner": "Знамя лавовой летучей мыши", + "LavaSlimeBanner": "Знамя лавового слизня", + "MartianBrainscramblerBanner": "Знамя марсианского Мозгокрута", + "MartianDroneBanner": "Знамя марсианского дрона", + "MartianEngineerBanner": "Знамя марсианского инженера", + "MartianGigazapperBanner": "Знамя марсианского Гигазаппера", + "MartianGreyGruntBanner": "Знамя марсианского серого пехотинца", + "FeatherfallPotion": "Зелье перышка", + "MartianOfficerBanner": "Знамя марсианского офицера", + "MartianRaygunnerBanner": "Знамя марсианского лучевого стрелка", + "MartianScutlixGunnerBanner": "Знамя марсианского скутликса-стрелка", + "MartianTeslaTurretBanner": "Знамя марсианской турели Теслы", + "MisterStabbyBanner": "Знамя мистера Стэбби", + "MotherSlimeBanner": "Знамя матери слизней", + "NecromancerBanner": "Знамя некроманта", + "NutcrackerBanner": "Знамя щелкунчика", + "PaladinBanner": "Знамя паладина", + "PenguinBanner": "Знамя пингвина", + "SpelunkerPotion": "Зелье шахтера", + "PinkyBanner": "Знамя Пинки", + "PoltergeistBanner": "Знамя полтергейста", + "PossessedArmorBanner": "Знамя одержимых доспехов", + "PresentMimicBanner": "Знамя подарка мимика", + "PurpleSlimeBanner": "Знамя фиолетового слизня", + "RaggedCasterBanner": "Знамя оборванного колдуна", + "RainbowSlimeBanner": "Знамя радужного слизня", + "RavenBanner": "Знамя ворона", + "RedSlimeBanner": "Знамя красного слизня", + "RuneWizardBanner": "Знамя рунического мага", + "InvisibilityPotion": "Зелье невидимости", + "RustyArmoredBonesBanner": "Знамя ржавого бронированного скелета", + "ScarecrowBanner": "Знамя пугала", + "ScutlixBanner": "Знамя скутликса", + "SkeletonArcherBanner": "Знамя скелета-лучника", + "SkeletonCommandoBanner": "Знамя скелета-коммандос", + "SkeletonSniperBanner": "Знамя скелета-снайпера", + "SlimerBanner": "Знамя слизнера", + "SnatcherBanner": "Знамя хватателя", + "SnowBallaBanner": "Знамя снежного Баллы", + "SnowmanGangstaBanner": "Знамя снеговика-гангстера", + "ShinePotion": "Зелье света", + "SpikedIceSlimeBanner": "Знамя ледяного слизня", + "SpikedJungleSlimeBanner": "Знамя шипастого слизня джунглей", + "SplinterlingBanner": "Знамя занозца", + "SquidBanner": "Знамя кальмара", + "TacticalSkeletonBanner": "Знамя скелета-штурмовика", + "TheGroomBanner": "Знамя жениха", + "TimBanner": "Знамя Тима", + "UndeadMinerBanner": "Знамя мертвого шахтера", + "UndeadVikingBanner": "Знамя скелета-викинга", + "WhiteCultistArcherBanner": "Знамя белого культиста-лучника", + "NightOwlPotion": "Зелье ночного зрения", + "WhiteCultistCasterBanner": "Знамя белого культиста-мага", + "WhiteCultistFighterBanner": "Знамя белого культиста-бойца", + "YellowSlimeBanner": "Знамя желтого слизня", + "YetiBanner": "Знамя йети", + "ZombieElfBanner": "Знамя эльфа-зомби", + "StoneBlock": "Камень", + "DirtWall": "Земляная стена", + "BattlePotion": "Боевое зелье", + "ThornsPotion": "Зелье шипов", + "WaterWalkingPotion": "Зелье хождения по воде", + "ArcheryPotion": "Зелье лучника", + "HunterPotion": "Зелье охотника", + "GravitationPotion": "Зелье гравитации", + "GoldChest": "Золотой сундук", + "DaybloomSeeds": "Семена цветка дня", + "MoonglowSeeds": "Семена лунного сияния", + "BlinkrootSeeds": "Семена мерцающего корня", + "Bottle": "Бутылка", + "DeathweedSeeds": "Семена мертвой травы", + "WaterleafSeeds": "Семена воднолиста", + "FireblossomSeeds": "Семена огнецвета", + "Daybloom": "Цветок дня", + "Moonglow": "Лунное сияние", + "Blinkroot": "Мерцающий корень", + "Deathweed": "Мертвая трава", + "Waterleaf": "Воднолист", + "Fireblossom": "Огнецвет", + "SharkFin": "Акулий плавник", + "WoodenTable": "Деревянный стол", + "Feather": "Перо", + "Tombstone": "Надгробная плита", + "MimeMask": "Маска мима", + "AntlionMandible": "Муравьиная челюсть", + "IllegalGunParts": "Нелегальные части оружия", + "TheDoctorsShirt": "Пиджак доктора", + "TheDoctorsPants": "Штаны доктора", + "GoldenKey": "Золотой ключ", + "ShadowChest": "Теневой сундук", + "ShadowKey": "Теневой ключ", + "Furnace": "Печь", + "ObsidianBrickWall": "Стена из обсидианового кирпича", + "JungleSpores": "Споры джунглей", + "Loom": "Ткацкий станок", + "Piano": "Пианино", + "Dresser": "Тумбочка", + "Bench": "Скамья", + "Bathtub": "Ванна", + "RedBanner": "Красное знамя", + "GreenBanner": "Зеленое знамя", + "BlueBanner": "Синее знамя", + "WoodenChair": "Деревянный стул", + "YellowBanner": "Желтое знамя", + "LampPost": "Фонарный столб", + "TikiTorch": "Полинезийский факел", + "Barrel": "Бочка", + "ChineseLantern": "Китайский фонарь", + "CookingPot": "Котелок", + "Safe": "Сейф", + "SkullLantern": "Череп-фонарь", + "TrashCan": "Урна", + "PlatinumBow": "Платиновый лук", + "PlatinumHammer": "Платиновый молот", + "PlatinumAxe": "Платиновый топор", + "PlatinumShortsword": "Платиновый короткий меч", + "PlatinumBroadsword": "Платиновый меч", + "PlatinumPickaxe": "Платиновая кирка", + "TungstenBow": "Вольфрамовый лук", + "TungstenHammer": "Вольфрамовый молот", + "TungstenAxe": "Вольфрамовый топор", + "TungstenShortsword": "Вольфрамовый короткий меч", + "Candelabra": "Канделябр", + "TungstenBroadsword": "Вольфрамовый меч", + "TungstenPickaxe": "Вольфрамовая кирка", + "LeadBow": "Свинцовый лук", + "LeadHammer": "Свинцовый молот", + "LeadAxe": "Свинцовый топор", + "LeadShortsword": "Свинцовый короткий меч", + "LeadBroadsword": "Свинцовый меч", + "LeadPickaxe": "Свинцовая кирка", + "TinBow": "Оловянный лук", + "TinHammer": "Оловянный молот", + "IronAnvil": "Железная наковальня", + "PinkVase": "Розовая ваза", + "TinAxe": "Оловянный топор", + "TinShortsword": "Оловянный короткий меч", + "TinBroadsword": "Оловянный меч", + "TinPickaxe": "Оловянная кирка", + "CopperBow": "Медный лук", + "CopperHammer": "Медный молот", + "CopperAxe": "Медный топор", + "CopperShortsword": "Медный короткий меч", + "CopperBroadsword": "Медный меч", + "CopperPickaxe": "Медная кирка", + "Mug": "Чашка", + "SilverBow": "Серебряный лук", + "SilverHammer": "Серебряный молот", + "SilverAxe": "Серебряный топор", + "SilverShortsword": "Серебряный короткий меч", + "SilverBroadsword": "Серебряный меч", + "SilverPickaxe": "Серебряная кирка", + "GoldBow": "Золотой лук", + "GoldHammer": "Золотой молот", + "GoldAxe": "Золотой топор", + "GoldShortsword": "Золотой короткий меч", + "Keg": "Бочонок", + "GoldBroadsword": "Золотой меч", + "GoldPickaxe": "Золотая кирка", + "Ale": "Эль", + "Bookcase": "Книжный шкаф", + "Throne": "Трон", + "Bowl": "Миска", + "BowlofSoup": "Миска супа", + "Toilet": "Унитаз", + "GrandfatherClock": "Напольные часы", + "WorkBench": "Верстак", + "ArmorStatue": "Статуя доспехов", + "GoblinBattleStandard": "Боевое знамя гоблинов", + "TatteredCloth": "Потрепанная ткань", + "Sawmill": "Лесопилка", + "CobaltOre": "Кобальтовая руда", + "MythrilOre": "Мифриловая руда", + "AdamantiteOre": "Адамантитовая руда", + "Pwnhammer": "Святой молот", + "Excalibur": "Экскалибур", + "HallowedSeeds": "Святые семена", + "Goggles": "Очки", + "EbonsandBlock": "Эбонит", + "CobaltHat": "Кобальтовая шляпа", + "CobaltHelmet": "Кобальтовый шлем", + "CobaltMask": "Кобальтовая маска", + "CobaltBreastplate": "Кобальтовый нагрудник", + "CobaltLeggings": "Кобальтовые ботинки", + "MythrilHood": "Мифриловый капюшон", + "MythrilHelmet": "Мифриловый шлем", + "MythrilHat": "Мифриловая шляпа", + "MythrilChainmail": "Мифриловая кольчуга", + "Lens": "Линзы", + "MythrilGreaves": "Мифриловые ботинки", + "CobaltBar": "Кобальтовый слиток", + "MythrilBar": "Мифриловый слиток", + "CobaltChainsaw": "Кобальтовая бензопила", + "MythrilChainsaw": "Мифриловая бензопила", + "CobaltDrill": "Кобальтовый бур", + "MythrilDrill": "Мифриловый бур", + "AdamantiteChainsaw": "Адамантитовая бензопила", + "AdamantiteDrill": "Адамантитовый бур", + "DaoofPow": "Дао Пуха", + "WoodenBow": "Деревянный лук", + "MythrilHalberd": "Мифриловая алебарда", + "AdamantiteBar": "Адамантитовый слиток", + "GlassWall": "Стеклянная стена", + "Compass": "Компас", + "DivingGear": "Снаряжение для дайвинга", + "GPS": "GPS", + "ObsidianHorseshoe": "Обсидиановая подкова", + "ObsidianShield": "Обсидиановый щит", + "TinkerersWorkshop": "Мастерская изобретателя", + "CloudinaBalloon": "Облако в шарике", + "IronBroadsword": "Железный меч", + "WoodenArrow": "Деревянная стрела", + "AdamantiteHeadgear": "Адамантитовый наголовник", + "AdamantiteHelmet": "Адамантитовый шлем", + "AdamantiteMask": "Адамантитовая маска", + "AdamantiteBreastplate": "Адамантитовый нагрудник", + "AdamantiteLeggings": "Адамантитовые ботинки", + "SpectreBoots": "Спектральные ботинки", + "AdamantiteGlaive": "Адамантитовая глефа", + "Toolbelt": "Пояс с инструментами", + "PearlsandBlock": "Жемчужный песок", + "PearlstoneBlock": "Жемчужный камень", + "FlamingArrow": "Подожженная стрела", + "MiningShirt": "Рубашка шахтера", + "MiningPants": "Штаны шахтера", + "PearlstoneBrick": "Жемчужный кирпич", + "IridescentBrick": "Радужный кирпич", + "MudstoneBlock": "Аргиллитовый кирпич", + "CobaltBrick": "Кобальтовый кирпич", + "MythrilBrick": "Мифриловый кирпич", + "PearlstoneBrickWall": "Жемчужная стена", + "IridescentBrickWall": "Стена из радужного кирпича", + "MudstoneBrickWall": "Стена из аргиллитового кирпича", + "Shuriken": "Сюрикен", + "CobaltBrickWall": "Стена из кобальтового кирпича", + "MythrilBrickWall": "Стена из мифрилового кирпича", + "HolyWater": "Святая вода", + "UnholyWater": "Нечестивая вода", + "SiltBlock": "Ил", + "FairyBell": "Волшебный колокол", + "BreakerBlade": "Дробильщик", + "BlueTorch": "Синий факел", + "RedTorch": "Красный факел", + "GreenTorch": "Зеленый факел", + "SuspiciousLookingEye": "Подозрительно выглядящий глаз", + "PurpleTorch": "Фиолетовый факел", + "WhiteTorch": "Белый факел", + "YellowTorch": "Желтый факел", + "DemonTorch": "Демонический факел", + "ClockworkAssaultRifle": "Заводная штурмовая винтовка", + "CobaltRepeater": "Кобальтовый арбалет", + "MythrilRepeater": "Мифриловый арбалет", + "DualHook": "Двойная кошка", + "StarStatue": "Статуя звезды", + "SwordStatue": "Статуя меча", + "DemonBow": "Демонический лук", + "SlimeStatue": "Статуя слизня", + "GoblinStatue": "Статуя гоблина", + "ShieldStatue": "Статуя щита", + "BatStatue": "Статуя летучей мыши", + "FishStatue": "Статуя рыбы", + "BunnyStatue": "Статуя кролика", + "SkeletonStatue": "Статуя скелета", + "ReaperStatue": "Статуя жнеца", + "WomanStatue": "Статуя женщины", + "ImpStatue": "Статуя беса", + "WarAxeoftheNight": "Топор ночи", + "GargoyleStatue": "Статуя горгульи", + "GloomStatue": "Статуя черепа", + "HornetStatue": "Статуя шершня", + "BombStatue": "Статуя бомбы", + "CrabStatue": "Статуя краба", + "HammerStatue": "Статуя молота", + "PotionStatue": "Статуя зелья", + "SpearStatue": "Статуя копья", + "CrossStatue": "Статуя креста", + "JellyfishStatue": "Статуя медузы", + "LightsBane": "Бич света", + "BowStatue": "Статуя лука", + "BoomerangStatue": "Статуя бумеранга", + "BootStatue": "Статуя ботинка", + "ChestStatue": "Статуя сундука", + "BirdStatue": "Статуя птицы", + "AxeStatue": "Статуя топора", + "CorruptStatue": "Статуя порчи", + "TreeStatue": "Статуя дерева", + "AnvilStatue": "Статуя наковальни", + "PickaxeStatue": "Статуя кирки", + "UnholyArrow": "Нечестивая стрела", + "MushroomStatue": "Статуя гриба", + "EyeballStatue": "Статуя глаза", + "PillarStatue": "Статуя башни", + "HeartStatue": "Статуя сердца", + "PotStatue": "Статуя горшка", + "SunflowerStatue": "Статуя подсолнуха", + "KingStatue": "Статуя короля", + "QueenStatue": "Статуя королевы", + "PiranhaStatue": "Статуя пираньи", + "PlankedWall": "Деревянная стена", + "Chest": "Сундук", + "WoodenBeam": "Деревянная балка", + "AdamantiteRepeater": "Адамантитовый арбалет", + "AdamantiteSword": "Адамантитовый меч", + "CobaltSword": "Кобальтовый меч", + "MythrilSword": "Мифриловый меч", + "MoonCharm": "Зачарованная луна", + "Ruler": "Линейка", + "CrystalBall": "Хрустальный шар", + "DiscoBall": "Диско-шар", + "SorcererEmblem": "Эмблема мага", + "BandofRegeneration": "Браслет регенерации", + "WarriorEmblem": "Эмблема воина", + "RangerEmblem": "Эмблема лучника", + "DemonWings": "Крылья демона", + "AngelWings": "Крылья ангела", + "MagicalHarp": "Магическая арфа", + "RainbowRod": "Радужный жезл", + "IceRod": "Ледяной жезл", + "NeptunesShell": "Ракушка Нептуна", + "Mannequin": "Манекен", + "GreaterHealingPotion": "Большое лечебное зелье", + "Mushroom": "Гриб", + "MagicMirror": "Волшебное зеркало", + "GreaterManaPotion": "Большое зелье маны", + "PixieDust": "Пыль феи", + "CrystalShard": "Осколок кристалла", + "ClownHat": "Шапка клоуна", + "ClownShirt": "Куртка клоуна", + "ClownPants": "Штаны клоуна", + "Flamethrower": "Огнемет", + "Bell": "Колокольчик", + "Harp": "Арфа", + "Wrench": "Красный гаечный ключ", + "JestersArrow": "Стрела Джестера", + "WireCutter": "Кусачки", + "ActiveStoneBlock": "Активный каменный блок", + "InactiveStoneBlock": "Неактивный каменный блок", + "Lever": "Рычаг", + "LaserRifle": "Лазерная винтовка", + "CrystalBullet": "Кристальная пуля", + "HolyArrow": "Святая стрела", + "MagicDagger": "Магический кинжал", + "CrystalStorm": "Кристальный шторм", + "CursedFlames": "Проклятый огонь", + "AngelStatue": "Статуя ангела", + "SoulofLight": "Эссенция света", + "SoulofNight": "Эссенция тьмы", + "CursedFlame": "Проклятое пламя", + "CursedTorch": "Проклятый факел", + "AdamantiteForge": "Адамантитовая кузня", + "MythrilAnvil": "Мифриловая наковальня", + "UnicornHorn": "Рог единорога", + "DarkShard": "Осколок тьмы", + "LightShard": "Осколок света", + "RedPressurePlate": "Красная нажимная плита", + "CloudinaBottle": "Облако в бутылке", + "Wire": "Провод", + "SpellTome": "Книга заклинаний", + "StarCloak": "Звездный плащ", + "Megashark": "Мега-акула", + "Shotgun": "Дробовик", + "PhilosophersStone": "Философский камень", + "TitanGlove": "Перчатка титана", + "CobaltNaginata": "Кобальтовая нагината", + "Switch": "Выключатель", + "DartTrap": "Ловушка с дротиком", + "HermesBoots": "Сапоги Гермеса", + "Boulder": "Валун", + "GreenPressurePlate": "Зеленая нажимная плита", + "GrayPressurePlate": "Серая нажимная плита", + "BrownPressurePlate": "Коричневая нажимная плита", + "MechanicalEye": "Механический глаз", + "CursedArrow": "Проклятая стрела", + "CursedBullet": "Проклятая пуля", + "SoulofFright": "Эссенция ужаса", + "SoulofMight": "Эссенция могущества", + "SoulofSight": "Эссенция прозрения", + "EnchantedBoomerang": "Зачарованный бумеранг", + "Gungnir": "Гунгнир", + "HallowedPlateMail": "Святой нагрудник", + "HallowedGreaves": "Святые ботинки", + "HallowedHelmet": "Святой шлем", + "CrossNecklace": "Золотой крестик", + "ManaFlower": "Цветок маны", + "MechanicalWorm": "Механический червь", + "MechanicalSkull": "Механический череп", + "HallowedHeadgear": "Святой наголовник", + "HallowedMask": "Святая маска", + "DemoniteOre": "Демонитовая руда", + "SlimeCrown": "Корона слизней", + "LightDisc": "Диск света", + "MusicBoxOverworldDay": "Музыкальная шкатулка (день на поверхности)", + "MusicBoxEerie": "Музыкальная шкатулка (зло)", + "MusicBoxNight": "Музыкальная шкатулка (ночь)", + "MusicBoxTitle": "Музыкальная шкатулка (заставка)", + "MusicBoxUnderground": "Музыкальная шкатулка (подземелье)", + "MusicBoxBoss1": "Музыкальная шкатулка (босс 1)", + "MusicBoxJungle": "Музыкальная шкатулка (джунгли)", + "MusicBoxCorruption": "Музыкальная шкатулка (порча)", + "DemoniteBar": "Демонитовый слиток", + "MusicBoxUndergroundCorruption": "Музыкальная шкатулка (подземная порча)", + "MusicBoxTheHallow": "Музыкальная шкатулка (освящение)", + "MusicBoxBoss2": "Музыкальная шкатулка (босс 2)", + "MusicBoxUndergroundHallow": "Музыкальная шкатулка (подземное освящение)", + "MusicBoxBoss3": "Музыкальная шкатулка (босс 3)", + "SoulofFlight": "Эссенция воздуха", + "MusicBox": "Музыкальная шкатулка", + "DemoniteBrick": "Демонитовый кирпич", + "HallowedRepeater": "Святой арбалет", + "Drax": "Молотобур", + "Heart": "Сердце", + "Explosives": "Взрывчатка", + "InletPump": "Входная труба", + "OutletPump": "Выходная труба", + "Timer1Second": "1-секундный таймер", + "Timer3Second": "3-секундный таймер", + "Timer5Second": "5-секундный таймер", + "CandyCaneBlock": "Карамель", + "CandyCaneWall": "Карамельная стена", + "SantaHat": "Шапка Санты", + "SantaShirt": "Куртка Санты", + "CorruptSeeds": "Семена порчи", + "SantaPants": "Штаны Санты", + "GreenCandyCaneBlock": "Зеленая карамель", + "GreenCandyCaneWall": "Зеленая карамельная стена", + "SnowBlock": "Снег", + "SnowBrick": "Снежный кирпич", + "SnowBrickWall": "Стена из снежного кирпича", + "BlueLight": "Синяя лампочка", + "RedLight": "Красная лампочка", + "GreenLight": "Зеленая лампочка", + "BluePresent": "Синий подарок", + "IronShortsword": "Железный короткий меч", + "VileMushroom": "Ужасный гриб", + "GreenPresent": "Зеленый подарок", + "YellowPresent": "Желтый подарок", + "SnowGlobe": "Снежный шар", + "Carrot": "Морковка", + "AdamantiteBeam": "Адамантитовая балка", + "AdamantiteBeamWall": "Стена из адамантитовой балки", + "DemoniteBrickWall": "Стена из демонитового кирпича", + "SandstoneBrick": "Песочный кирпич", + "SandstoneBrickWall": "Стена из песочного кирпича", + "EbonstoneBrick": "Эбонитовый кирпич", + "EbonstoneBlock": "Эбонит", + "EbonstoneBrickWall": "Стена из эбонитового кирпича", + "RedStucco": "Красная лепнина", + "YellowStucco": "Желтая лепнина", + "GreenStucco": "Зеленая лепнина", + "GrayStucco": "Серая лепнина", + "RedStuccoWall": "Стена из красной лепнины", + "YellowStuccoWall": "Стена из желтой лепнины", + "GreenStuccoWall": "Стена из зеленой лепнины", + "GrayStuccoWall": "Стена из серой лепнины", + "Ebonwood": "Черная древесина", + "GrassSeeds": "Семена травы", + "RichMahogany": "Красная древесина", + "Pearlwood": "Жемчужная древесина", + "EbonwoodWall": "Стена из черной древесины", + "RichMahoganyWall": "Стена из красной древесины", + "PearlwoodWall": "Стена из жемчужной древесины", + "EbonwoodChest": "Сундук из черной древесины", + "RichMahoganyChest": "Сундук из красной древесины", + "PearlwoodChest": "Сундук из жемчужной древесины", + "EbonwoodChair": "Стул из черной древесины", + "RichMahoganyChair": "Стул из красной древесины", + "Sunflower": "Подсолнух", + "PearlwoodChair": "Стул из жемчужной древесины", + "EbonwoodPlatform": "Платформа из черной древесины", + "RichMahoganyPlatform": "Платформа из красной древесины", + "PearlwoodPlatform": "Платформа из жемчужной древесины", + "BonePlatform": "Костяная платформа", + "EbonwoodWorkBench": "Верстак из черной древесины", + "RichMahoganyWorkBench": "Верстак из красной древесины", + "PearlwoodWorkBench": "Верстак из жемчужной древесины", + "EbonwoodTable": "Стол из черной древесины", + "RichMahoganyTable": "Стол из красной древесины", + "Vilethorn": "Злая колючка", + "PearlwoodTable": "Стол из жемчужной древесины", + "EbonwoodPiano": "Пианино из черной древесины", + "RichMahoganyPiano": "Пианино из красной древесины", + "PearlwoodPiano": "Пианино из жемчужной древесины", + "EbonwoodBed": "Кровать из черной древесины", + "RichMahoganyBed": "Кровать из красной древесины", + "PearlwoodBed": "Кровать из жемчужной древесины", + "EbonwoodDresser": "Тумбочка из черной древесины", + "RichMahoganyDresser": "Тумбочка из красной древесины", + "PearlwoodDresser": "Тумбочка из жемчужной древесины", + "Starfury": "Звездная ярость", + "EbonwoodDoor": "Дверь из черной древесины", + "RichMahoganyDoor": "Дверь из красной древесины", + "PearlwoodDoor": "Дверь из жемчужной древесины", + "EbonwoodSword": "Меч из черной древесины", + "EbonwoodHammer": "Молот из черной древесины", + "EbonwoodBow": "Лук из черной древесины", + "RichMahoganySword": "Меч из красной древесины", + "RichMahoganyHammer": "Молот из красной древесины", + "RichMahoganyBow": "Лук из красной древесины", + "PearlwoodSword": "Меч из жемчужной древесины", + "PurificationPowder": "Очищающий порошок", + "PearlwoodHammer": "Молот из жемчужной древесины", + "PearlwoodBow": "Лук из жемчужной древесины", + "RainbowBrick": "Радужный кирпич", + "RainbowBrickWall": "Стена из радужного кирпича", + "IceBlock": "Лед", + "RedsWings": "Крылья Red", + "RedsHelmet": "Шлем Red", + "RedsBreastplate": "Нагрудник Red", + "RedsLeggings": "Ботинки Red", + "Fish": "Рыба", + "VilePowder": "Ужасный порошок", + "IceBoomerang": "Ледяной бумеранг", + "Keybrand": "Ключ-меч", + "Cutlass": "Абордажная сабля", + "TrueExcalibur": "Истинный экскалибур", + "TrueNightsEdge": "Истинная грань ночи", + "Frostbrand": "Ледяная марка", + "RedPotion": "Красное зелье", + "TacticalShotgun": "Тактический дробовик", + "RottenChunk": "Гниль", + "IvyChest": "Плющевой сундук", + "Marrow": "Сущность", + "UnholyTrident": "Нечестивый трезубец", + "FrostHelmet": "Морозный шлем", + "FrostBreastplate": "Морозный нагрудник", + "FrostLeggings": "Морозные ботинки", + "TinHelmet": "Оловянный шлем", + "TinChainmail": "Оловянный нагрудник", + "TinGreaves": "Оловянные ботинки", + "WormTooth": "Зуб червя", + "LeadHelmet": "Свинцовый шлем", + "LeadChainmail": "Свинцовый нагрудник", + "LeadGreaves": "Свинцовые ботинки", + "TungstenHelmet": "Вольфрамовый шлем", + "TungstenChainmail": "Вольфрамовый нагрудник", + "TungstenGreaves": "Вольфрамовые ботинки", + "PlatinumHelmet": "Платиновый шлем", + "PlatinumChainmail": "Платиновый нагрудник", + "PlatinumGreaves": "Платиновые ботинки", + "TinOre": "Оловянная руда", + "IronHammer": "Железный молот", + "WormFood": "Пища для червей", + "LeadOre": "Свинцовая руда", + "TungstenOre": "Вольфрамовая руда", + "PlatinumOre": "Платиновая руда", + "TinBar": "Оловянный слиток", + "LeadBar": "Свинцовый слиток", + "TungstenBar": "Вольфрамовый слиток", + "PlatinumBar": "Платиновый слиток", + "TinWatch": "Оловянные часы", + "TungstenWatch": "Вольфрамовые часы", + "PlatinumWatch": "Платиновые часы", + "CopperCoin": "Медная монета", + "TinChandelier": "Оловянная люстра", + "TungstenChandelier": "Вольфрамовая люстра", + "PlatinumChandelier": "Платиновая люстра", + "PlatinumCandle": "Платиновая свеча", + "PlatinumCandelabra": "Платиновый подсвечник", + "PlatinumCrown": "Платиновая корона", + "LeadAnvil": "Свинцовая наковальня", + "TinBrick": "Оловянный кирпич", + "TungstenBrick": "Вольфрамовый кирпич", + "PlatinumBrick": "Платиновый кирпич", + "SilverCoin": "Серебряная монета", + "TinBrickWall": "Стена из оловянного кирпича", + "TungstenBrickWall": "Стена из вольфрамового кирпича", + "PlatinumBrickWall": "Стена из платинового кирпича", + "BeamSword": "Лучевой меч", + "IceBlade": "Ледяной клинок", + "IceBow": "Ледяной лук", + "FrostStaff": "Морозный посох", + "WoodHelmet": "Деревянный шлем", + "WoodBreastplate": "Деревянный нагрудник", + "WoodGreaves": "Деревянные ботинки", + "GoldCoin": "Золотая монета", + "EbonwoodHelmet": "Шлем из черной древесины", + "EbonwoodBreastplate": "Нагрудник из черной древесины", + "EbonwoodGreaves": "Ботинки из черной древесины", + "RichMahoganyHelmet": "Шлем из красной древесины", + "RichMahoganyBreastplate": "Нагрудник из красной древесины", + "RichMahoganyGreaves": "Ботинки из красной древесины", + "PearlwoodHelmet": "Шлем из жемчужной древесины", + "PearlwoodBreastplate": "Нагрудник из жемчужной древесины", + "PearlwoodGreaves": "Ботинки из жемчужной древесины", + "AmethystStaff": "Аметистовый посох", + "PlatinumCoin": "Платиновая монета", + "TopazStaff": "Топазовый посох", + "SapphireStaff": "Сапфировый посох", + "EmeraldStaff": "Изумрудный посох", + "RubyStaff": "Рубиновый посох", + "DiamondStaff": "Алмазный посох", + "GrassWall": "Травяная стена", + "JungleWall": "Стена джунглей", + "FlowerWall": "Цветочная стена", + "Jetpack": "Реактивный ранец", + "ButterflyWings": "Крылья бабочки", + "FallenStar": "Упавшая звезда", + "CactusWall": "Кактусовая стена", + "Cloud": "Облако", + "CloudWall": "Облачная стена", + "Seaweed": "Водоросли", + "RuneHat": "Руническая шляпа", + "RuneRobe": "Руническая роба", + "MushroomSpear": "Грибное копье", + "TerraBlade": "Клинок Земли", + "GrenadeLauncher": "Гранатомет", + "RocketLauncher": "Ракетомет", + "CopperGreaves": "Медные сапоги", + "ProximityMineLauncher": "Миномет", + "FairyWings": "Крылья феи", + "SlimeBlock": "Гелевый блок", + "FleshBlock": "Плоть", + "MushroomWall": "Грибная стена", + "RainCloud": "Дождевое облако", + "BoneBlock": "Костяной блок", + "FrozenSlimeBlock": "Замороженный гелевый блок", + "BoneBlockWall": "Костяная стена", + "SlimeBlockWall": "Гелевая стена", + "IronGreaves": "Железные сапоги", + "FleshBlockWall": "Стена из плоти", + "RocketI": "Ракета I", + "RocketII": "Ракета II", + "RocketIII": "Ракета III", + "RocketIV": "Ракета IV", + "AsphaltBlock": "Асфальт", + "CobaltPickaxe": "Кобальтовая кирка", + "MythrilPickaxe": "Мифриловая кирка", + "AdamantitePickaxe": "Адамантитовая кирка", + "Clentaminator": "Очиститель", + "SilverGreaves": "Серебряные сапоги", + "GreenSolution": "Зеленый раствор", + "BlueSolution": "Синий раствор", + "PurpleSolution": "Пурпурный раствор", + "DarkBlueSolution": "Темно-синий раствор", + "RedSolution": "Красный раствор", + "HarpyWings": "Крылья гарпии", + "BoneWings": "Костяные крылья", + "Hammush": "Грибомолот", + "NettleBurst": "Крапивный взрыв", + "AnkhBanner": "Знамя анха", + "GoldGreaves": "Золотые сапоги", + "SnakeBanner": "Знамя змеи", + "OmegaBanner": "Знамя омеги", + "CrimsonHelmet": "Багровый шлем", + "CrimsonScalemail": "Багровый нагрудник", + "CrimsonGreaves": "Багровые ботинки", + "BloodButcherer": "Кровавый мясорез", + "TendonBow": "Лук плоти", + "FleshGrinder": "Мясорубка", + "DeathbringerPickaxe": "Смертоносная кирка", + "BloodLustCluster": "Кровожадная громадина", + "Torch": "Факел", + "CopperChainmail": "Медная кольчуга", + "TheUndertaker": "Гробовщик", + "TheMeatball": "Фрикаделька", + "TheRottedFork": "Гнилая вилка", + "LivingWoodChair": "Стул из живой древесины", + "CactusChair": "Кактусовый стул", + "BoneChair": "Костяной стул", + "FleshChair": "Стул из плоти", + "IronChainmail": "Железная кольчуга", + "MushroomChair": "Грибной стул", + "BoneWorkBench": "Костяной верстак", + "CactusWorkBench": "Кактусовый верстак", + "FleshWorkBench": "Верстак из плоти", + "MushroomWorkBench": "Грибной верстак", + "SlimeWorkBench": "Гелевый верстак", + "CactusDoor": "Кактусовая дверь", + "FleshDoor": "Дверь из плоти", + "MushroomDoor": "Грибная дверь", + "LivingWoodDoor": "Дверь из живой древесины", + "SilverChainmail": "Серебряная кольчуга", + "BoneDoor": "Костяная дверь", + "FlameWings": "Огненные крылья", + "FrozenWings": "Ледяные крылья", + "GhostWings": "Спектральные крылья", + "SunplateBlock": "Солнечная пластина", + "DiscWall": "Дисковая стена", + "SkywareChair": "Небесный стул", + "BoneTable": "Костяной стол", + "FleshTable": "Стол из плоти", + "LivingWoodTable": "Стол из живой древесины", + "GoldChainmail": "Золотая кольчуга", + "SkywareTable": "Небесный стол", + "LivingWoodChest": "Сундук из живой древесины", + "LivingWoodWand": "Жезл живой древесины", + "PurpleIceBlock": "Фиолетовый лед", + "PinkIceBlock": "Розовый лед", + "RedIceBlock": "Красный лед", + "CrimstoneBlock": "Багряный камень", + "SkywareDoor": "Небесная дверь", + "SkywareChest": "Небесный сундук", + "SteampunkHat": "Стимпанковая шляпа", + "GrapplingHook": "Крюк-кошка", + "SteampunkShirt": "Стимпанковая рубашка", + "SteampunkPants": "Стимпанковые штаны", + "BeeHat": "Пчелиная шляпа", + "BeeShirt": "Пчелиная рубашка", + "BeePants": "Пчелиные штаны", + "WorldBanner": "Знамя мира", + "SunBanner": "Знамя солнца", + "GravityBanner": "Знамя гравитации", + "PharaohsMask": "Маска фараона", + "Actuator": "Привод", + "Chain": "Железная цепь", + "BlueWrench": "Синий гаечный ключ", + "GreenWrench": "Зеленый гаечный ключ", + "BluePressurePlate": "Синяя нажимная пластина", + "YellowPressurePlate": "Желтая нажимная пластина", + "DiscountCard": "Дисконтная карта", + "LuckyCoin": "Счастливая монета", + "UnicornonaStick": "Единорог на палочке", + "SandstorminaBottle": "Песчаная буря в бутылке", + "BeachBall": "Пляжный мяч", + "ShadowScale": "Кусочек тени", + "CharmofMyths": "Очарование мифов", + "MoonShell": "Лунная ракушка", + "StarVeil": "Звездная завеса", + "WaterWalkingBoots": "Ботинки хождения по воде", + "Tiara": "Диадема", + "PrincessDress": "Платье принцессы", + "PharaohsRobe": "Платье фараона", + "GreenCap": "Зеленая кепка", + "MushroomCap": "Грибная шапочка", + "TamOShanter": "Тэм О'Шентер", + "PiggyBank": "Свинья-копилка", + "MummyMask": "Маска мумии", + "MummyShirt": "Рубашка мумии", + "MummyPants": "Штаны мумии", + "CowboyHat": "Ковбойская шляпа", + "CowboyJacket": "Ковбойская куртка", + "CowboyPants": "Ковбойские штаны", + "PirateHat": "Пиратская шляпа", + "PirateShirt": "Пиратская рубашка", + "PiratePants": "Пиратские штаны", + "VikingHelmet": "Шлем викинга", + "MiningHelmet": "Каска шахтера", + "CrimtaneOre": "Кримтановая руда", + "CactusSword": "Кактусовый меч", + "CactusPickaxe": "Кактусовая кирка", + "IceBrick": "Ледяной кирпич", + "IceBrickWall": "Стена из ледяного кирпича", + "AdhesiveBandage": "Липкий пластырь", + "ArmorPolish": "Полироль", + "Bezoar": "Безоар", + "Blindfold": "Повязка на глаза", + "FastClock": "Быстрые часы", + "CopperHelmet": "Медный шлем", + "Megaphone": "Мегафон", + "Nazar": "Назар", + "Vitamins": "Витамины", + "TrifoldMap": "Складная карта", + "CactusHelmet": "Кактусовый шлем", + "CactusBreastplate": "Кактусовый нагрудник", + "CactusLeggings": "Кактусовые ботинки", + "PowerGlove": "Перчатка силы", + "LightningBoots": "Молниеносные ботинки", + "SunStone": "Солнечный камень", + "Wood": "Древесина", + "IronHelmet": "Железный шлем", + "MoonStone": "Лунный камень", + "ArmorBracing": "Крепление для брони", + "MedicatedBandage": "Лечебный пластырь", + "ThePlan": "План", + "CountercurseMantra": "Антисглазная мантра", + "CoinGun": "Денежная пушка", + "LavaCharm": "Амулет лавы", + "ObsidianWaterWalkingBoots": "Обсидиановые ботинки хождения по воде", + "LavaWaders": "Ботинки хождения по лаве", + "PureWaterFountain": "Фонтан чистой вод", + "SilverHelmet": "Серебряный шлем", + "DesertWaterFountain": "Фонтан пустыни", + "Shadewood": "Мрачная древесина", + "ShadewoodDoor": "Дверь из мрачного дерева", + "ShadewoodPlatform": "Платформа из мрачного дерева", + "ShadewoodChest": "Сундук из мрачного дерева", + "ShadewoodChair": "Стул из мрачного дерева", + "ShadewoodWorkBench": "Верстак из мрачного дерева", + "ShadewoodTable": "Стол из мрачного дерева", + "ShadewoodDresser": "Тумбочка из мрачного дерева", + "ShadewoodPiano": "Пианино из мрачного дерева", + "GoldHelmet": "Золотой шлем", + "ShadewoodBed": "Кровать из мрачного дерева", + "ShadewoodSword": "Меч из мрачного дерева", + "ShadewoodHammer": "Молот из мрачного дерева", + "ShadewoodBow": "Лук из мрачного дерева", + "ShadewoodHelmet": "Шлем из мрачного дерева", + "ShadewoodBreastplate": "Нагрудник из мрачного дерева", + "ShadewoodGreaves": "Ботинки из мрачного дерева", + "ShadewoodWall": "Стена из мрачного дерева", + "Cannon": "Пушка", + "Cannonball": "Пушечное ядро", + "WoodWall": "Деревянная стена", + "FlareGun": "Сигнальная ракетница", + "Flare": "Сигнальная ракета", + "BoneWand": "Костяной жезл", + "LeafWand": "Жезл листьев", + "FlyingCarpet": "Ковер-самолет", + "AvengerEmblem": "Эмблема мстителя", + "MechanicalGlove": "Механическая перчатка", + "LandMine": "Противопехотная мина", + "PaladinsShield": "Щит паладина", + "WebSlinger": "Паутиновый ткач", + "WoodPlatform": "Деревянная платформа", + "JungleWaterFountain": "Фонтан джунглей", + "IcyWaterFountain": "Фонтан ледяной воды", + "CorruptWaterFountain": "Фонтан порчи", + "CrimsonWaterFountain": "Фонтан багрянца", + "HallowedWaterFountain": "Фонтан освящения", + "BloodWaterFountain": "Кровавый фонтан", + "Umbrella": "Зонт", + "ChlorophyteOre": "Хлорофитовая руда", + "SteampunkWings": "Стимпанковые крылья", + "Snowball": "Снежок", + "FlintlockPistol": "Кремневый пистолет", + "IceSkates": "Коньки", + "SnowballLauncher": "Снежкомет", + "WebCoveredChest": "Покрытый паутиной сундук", + "ClimbingClaws": "Когти альпиниста", + "AncientIronHelmet": "Древний железный шлем", + "AncientGoldHelmet": "Древний золотой шлем", + "AncientShadowHelmet": "Древний теневой шлем", + "AncientShadowScalemail": "Древний теневой нагрудник", + "AncientShadowGreaves": "Древние теневые ботинки", + "AncientNecroHelmet": "Древний шлем некроманта", + "Musket": "Мушкет", + "AncientCobaltHelmet": "Древний кобальтовый шлем", + "AncientCobaltBreastplate": "Древний кобальтовый нагрудник", + "AncientCobaltLeggings": "Древние кобальтовые ботинки", + "BlackBelt": "Черный пояс", + "Boomstick": "Обрез", + "Rope": "Веревка", + "Campfire": "Костер", + "Marshmallow": "Зефир", + "MarshmallowonaStick": "Зефир на палочке", + "CookedMarshmallow": "Приготовленный зефир", + "MusketBall": "Пуля для мушкета", + "RedRocket": "Красная ракета", + "GreenRocket": "Зеленая ракета", + "BlueRocket": "Синяя ракета", + "YellowRocket": "Желтая ракета", + "IceTorch": "Ледяной факел", + "ShoeSpikes": "Шипастые ботинки", + "TigerClimbingGear": "Альпинистский набор тигра", + "Tabi": "Таби", + "Minishark": "Мини-акула", + "PinkThread": "Розовые нитки", + "ManaRegenerationBand": "Браслет восстановления маны", + "SandstorminaBalloon": "Песчаная буря в шарике", + "MasterNinjaGear": "Снаряжения мастера ниндзя", + "RopeCoil": "Моток веревки", + "Blowgun": "Духовое ружье", + "BlizzardinaBottle": "Снежная буря в бутылке", + "FrostburnArrow": "Стрела ледяного ожога", + "EnchantedSword": "Зачарованный меч", + "IronBow": "Железный лук", + "PickaxeAxe": "Киркотопор", + "CobaltWaraxe": "Кобальтовый боевой топор", + "MythrilWaraxe": "Мифриловый боевой топор", + "AdamantiteWaraxe": "Адамантитовый боевой топор", + "EatersBone": "Кость пожирателя", + "BlendOMatic": "Гудронатор", + "MeatGrinder": "Мясорубка", + "Extractinator": "Обогатитель", + "Solidifier": "Отвердитель", + "Amber": "Янтарь", + "AcidDye": "Кислотный краситель", + "ActuationAccessory": "Нажиматель", + "ActuationRod": "Активирующий жезл", + "AlchemyTable": "Алхимический стол", + "AlphabetStatue0": "Статуя 0", + "AlphabetStatue1": "Статуя 1", + "AlphabetStatue2": "Статуя 2", + "AlphabetStatue3": "Статуя 3", + "AlphabetStatue4": "Статуя 4", + "AlphabetStatue5": "Статуя 5", + "AlphabetStatue6": "Статуя 6", + "AlphabetStatue7": "Статуя 7", + "AlphabetStatue8": "Статуя 8", + "AlphabetStatue9": "Статуя 9", + "AlphabetStatueA": "Статуя A", + "AlphabetStatueB": "Статуя B", + "AlphabetStatueC": "Статуя C", + "AlphabetStatueD": "Статуя D", + "AlphabetStatueE": "Статуя E", + "AlphabetStatueF": "Статуя F", + "AlphabetStatueG": "Статуя G", + "AlphabetStatueH": "Статуя H", + "AlphabetStatueI": "Статуя I", + "AlphabetStatueJ": "Статуя J", + "AlphabetStatueK": "Статуя K", + "AlphabetStatueL": "Статуя L", + "AlphabetStatueM": "Статуя M", + "AlphabetStatueN": "Статуя N", + "AlphabetStatueO": "Статуя O", + "AlphabetStatueP": "Статуя P", + "AlphabetStatueQ": "Статуя Q", + "AlphabetStatueR": "Статуя R", + "AlphabetStatueS": "Статуя S", + "AlphabetStatueT": "Статуя T", + "AlphabetStatueU": "Статуя U", + "AlphabetStatueV": "Статуя V", + "AlphabetStatueW": "Статуя W", + "AlphabetStatueX": "Статуя X", + "AlphabetStatueY": "Статуя Y", + "AlphabetStatueZ": "Статуя Z", + "Amarok": "Амарок", + "AmberGemsparkWall": "Стена из янтарных блоков", + "AmberGemsparkWallOff": "Выключенная стена из янтарных блоков", + "AmberStaff": "Янтарный посох", + "AmethystGemsparkWall": "Стена из аметистовых блоков", + "AmethystGemsparkWallOff": "Выключенная стена из аметистовых блоков", + "AncientArmorHat": "Древний головной убор", + "AncientArmorPants": "Древние штаны", + "AncientArmorShirt": "Древняя одежда", + "AncientBattleArmorHat": "Запретная маска", + "AncientBattleArmorMaterial": "Запретный фрагмент", + "AncientBattleArmorPants": "Запретные поножи", + "AncientBattleArmorShirt": "Запретная мантия", + "AncientCloth": "Древняя ткань", + "AncientHorn": "Древний рог", + "AnglerTackleBag": "Чемоданчик рыбака", + "AngryBonesBanner": "Знамя злого скелета", + "AnnouncementBox": "Сигнализирующая коробка", + "AntiGravityHook": "Антигравитационный крюк", + "AntlionClaw": "Челюстное лезвие", + "ApprenticeBait": "Наживка новичка", + "ApprenticeHat": "Шляпа ученика", + "ApprenticeRobe": "Роба ученика", + "ApprenticeScarf": "Шарф ученика", + "ApprenticeTrousers": "Брюки ученика", + "ArchitectGizmoPack": "Набор архитектора", + "Arkhalis": "Аркалис", + "AviatorSunglasses": "«Авиаторы» 0x33", + "Bacon": "Бекон", + "BalloonHorseshoeFart": "Зеленый шарик с подковой", + "BalloonHorseshoeHoney": "Янтарный шарик с подковой", + "BalloonHorseshoeSharkron": "Розовый шарик с подковой", + "BalloonPufferfish": "Воздушная рыба фугу", + "BeeMask": "Маска Королевы Пчел", + "BeesKnees": "Пчелиный лук", + "BejeweledValkyrieBody": "Плащ Валькирии Lazure", + "BejeweledValkyrieHead": "Браслет Валькирии Lazure", + "BejeweledValkyrieWing": "Платформа-барьер Lazure", + "BewitchingTable": "Колдовской стол", + "BlackAndWhiteDye": "Черно-белый краситель", + "BlackCounterweight": "Черный противовес", + "BlackString": "Черная нитка", + "Bladetongue": "Язык-лезвие", + "BlessedApple": "Благословенное яблоко", + "BlinkrootPlanterBox": "Кадка для светящегося корня", + "BloodWater": "Кровавая вода", + "BloodZombieBanner": "Знамя кровавого зомби", + "BloodZombieStatue": "Знамя статуи зомби", + "BlueAcidDye": "Синий кислотный краситель", + "BlueCounterweight": "Синий противовес", + "BlueDungeonBathtub": "Синяя ванна темницы", + "BlueDungeonCandelabra": "Синий канделябр темницы", + "BlueDungeonChandelier": "Синяя люстра темницы", + "BlueDungeonChest": "Синий сундук темницы", + "BlueDungeonLamp": "Синяя лампа темницы", + "BlueDungeonSink": "Синяя раковина темницы", + "BlueFlameAndSilverDye": "Пламенно-синий и серебристый краситель", + "BlueLunaticHood": "Капюшон лунного культиста", + "BlueLunaticRobe": "Роба лунного культиста", + "BluePhasesaber": "Синий световой меч", + "BlueString": "Синяя нитка", + "BombFish": "Рыба-бомба", + "BoneArrow": "Костяная стрела", + "BoneBathtub": "Костяная ванна", + "BoneBed": "Костяная кровать", + "BoneBookcase": "Костяной книжный шкаф", + "BoneCampfire": "Костяной костер", + "BoneCandelabra": "Костяной канделябр", + "BoneChandelier": "Костяная люстра", + "BoneChest": "Костяной сундук", + "BoneClock": "Костяные часы", + "BoneDagger": "Костяной метательный нож", + "BoneGlove": "Костяная перчатка", + "BoneJavelin": "Костяное копье", + "BoneLamp": "Костяная лампа", + "BoneLantern": "Костяной фонарь", + "BoneRattle": "Костяная погремушка", + "BoneSink": "Костяная раковина", + "BoneSkeletonStatue": "Костяная статуя скелета", + "BoneTorch": "Костяной факел", + "BoosterTrack": "Ускоряющие рельсы", + "BorealWood": "Заснеженная древесина", + "BorealWoodBathtub": "Ванна из заснеженной древесины", + "BorealWoodBed": "Кровать из заснеженной древесины", + "BorealWoodBookcase": "Книжный шкаф из заснеженной древесины", + "BorealWoodBow": "Лук из заснеженной древесины", + "BorealWoodBreastplate": "Нагрудник из заснеженной древесины", + "BorealWoodCandelabra": "Канделябр из заснеженной древесины", + "BorealWoodCandle": "Свеча из заснеженной древесины", + "BorealWoodChair": "Стул из заснеженной древесины", + "BorealWoodChandelier": "Люстра из заснеженной древесины", + "BorealWoodChest": "Сундук из заснеженной древесины", + "BorealWoodClock": "Часы из заснеженной древесины", + "BorealWoodDoor": "Дверь из заснеженной древесины", + "BorealWoodDresser": "Тумбочка из заснеженной древесины", + "BorealWoodFence": "Забор из заснеженной древесины", + "BorealWoodGreaves": "Ботинки из заснеженной древесины", + "BorealWoodHammer": "Молот из заснеженной древесины", + "BorealWoodHelmet": "Шлем из заснеженной древесины", + "BorealWoodLamp": "Лампа из заснеженной древесины", + "BorealWoodLantern": "Фонарь из заснеженной древесины", + "BorealWoodPiano": "Пианино из заснеженной древесины", + "BorealWoodPlatform": "Платформа из заснеженной древесины", + "BorealWoodSink": "Раковина из заснеженной древесины", + "BorealWoodSofa": "Диван из северной древесины", + "BorealWoodSword": "Меч из заснеженной древесины", + "BorealWoodTable": "Стол из северной древесины", + "BorealWoodWall": "Стена из заснеженной древесины", + "BorealWoodWorkBench": "Верстак из северной древесины", + "BossMaskMoonlord": "Маска лунного лорда", + "BottomlessBucket": "Бездонное ведро воды", + "BouncyBomb": "Прыгучая бомба", + "BouncyDynamite": "Прыгучий динамит", + "BouncyGlowstick": "Прыгучая светящаяся палочка", + "BouncyGrenade": "Прыгучая граната", + "BrainMask": "Маска Мозга Ктулху", + "BrainOfConfusion": "Мозги запутанности", + "BrainOfCthulhuBossBag": "Мешок с сокровищами", + "BrainScrambler": "Шифратор мозга", + "BrightBrownDye": "Светлый коричневый краситель", + "BrightSilverDye": "Светлый серебристый краситель", + "BrownAndBlackDye": "Коричневый и черный краситель", + "BrownAndSilverDye": "Коричневый и серебристый краситель", + "BrownDye": "Коричневый краситель", + "BrownString": "Коричневая нитка", + "Bubble": "Пузырь", + "BubbleGun": "Пузырная пушка", + "BuccaneerBandana": "Бандана морского разбойника", + "BuccaneerPants": "Штаны морского разбойника", + "BuccaneerShirt": "Мундир морского разбойника", + "Buggy": "Букашечка", + "BuggyStatue": "Статуя букашечки", + "BunnyfishTrophy": "Трофей рыбы-кролика", + "BurningHadesDye": "Краситель ледяного адского пламени", + "ButcherBanner": "Знамя мясника", + "ButchersChainsaw": "Бензопила мясника", + "ButterflyStatue": "Статуя бабочки", + "CactusBathtub": "Кактусовая ванна", + "CactusBed": "Кактусовая кровать", + "CactusBookcase": "Кактусовый книжный шкаф", + "CactusCandelabra": "Кактусовый канделябр", + "CactusCandle": "Кактусовая свеча", + "CactusChandelier": "Кактусовая люстра", + "CactusChest": "Кактусовый стул", + "CactusClock": "Кактусовые часы", + "CactusLamp": "Кактусовая лампа", + "CactusLantern": "Кактусовый фонарь", + "CactusPlatform": "Кактусовая платформа", + "CactusSink": "Кактусовая раковина", + "CactusTable": "Кактусовый стол", + "CageBuggy": "Клетка с букашечкой", + "CageEnchantedNightcrawler": "Клетка с зачарованным ночным ползуном", + "CageGrubby": "Клетка с личиночкой", + "CageSluggy": "Клетка со слизнячком", + "Cascade": "Каскад", + "CelestialShell": "Небесная ракушка", + "CelestialSigil": "Небесная печать", + "CellPhone": "Мобильный телефон", + "ChainGuillotines": "Гильотины на цепях", + "ChargedBlasterCannon": "Зарядная бластерная пушка", + "Chik": "Чик", + "Chimney": "Дымоход", + "ChlorophyteBrick": "Хлорофитовый кирпич", + "ChlorophyteBrickWall": "Стена из хлорофитового кирпича", + "ChlorophyteDye": "Хлорофитовый краситель", + "ClingerStaff": "Посох хватателя", + "ClothierJacket": "Жилет портного", + "ClothierPants": "Штаны портного", + "Code1": "Код 1", + "Code2": "Код 2", + "CogWall": "Стена из шестеренок", + "CoinRing": "Денежное кольцо", + "CompanionCube": "Куб-спутник", + "CompassRose": "Компасная роза", + "ConfettiBlock": "Блок из конфетти", + "ConfettiBlockBlack": "Блок из полуночного конфетти", + "ConfettiCannon": "Пушка конфетти", + "ConfettiWall": "Стена из конфетти", + "ConfettiWallBlack": "Стена из полуночного конфетти", + "ConveyorBeltLeft": "Конвейерная лента (по часовой)", + "ConveyorBeltRight": "Конвейерная лента (против часовой)", + "CordageGuide": "Руководство по волокнистым веревкам", + "CorruptFishingCrate": "Ящик порчи", + "CorruptHardenedSand": "Блок затвердевшего эбонитового песка", + "CorruptHardenedSandWall": "Стена из затвердевшего эбонитового песка", + "CorruptPlanterBox": "Кадка для мертвой травы", + "CorruptSandstone": "Эбонитовый песчаниковый блок", + "CorruptSandstoneWall": "Эбонитовая песчаниковая стена", + "CorruptYoyo": "Дискомфорт", + "CosmicCarKey": "Ключ от космического автомобиля", + "CrawdadBanner": "Знамя пресноводного рака", + "CreatureFromTheDeepBanner": "Знамя существа из глубин", + "CrimsonFishingCrate": "Ящик багрянца", + "CrimsonHardenedSand": "Блок затвердевшего багрянцевого песка", + "CrimsonHardenedSandWall": "Стена из затвердевшего багрянцевого песка", + "CrimsonHeart": "Багряное сердце", + "CrimsonPlanterBox": "Кадка для мертвой травы", + "CrimsonSandstone": "Багрянцевый песчаниковый блок", + "CrimsonSandstoneWall": "Багрянцевая песчаниковая стена", + "CrimsonYoyo": "Артерия", + "CrimtaneBrick": "Кримтановый кирпич", + "CrimtaneBrickWall": "Стена из кримтанового кирпича", + "CrystalBlock": "Кристальный блок", + "CrystalBlockWall": "Стена из кристального блока", + "CrystalDart": "Кристальный дротик", + "CrystalSerpent": "Кристальный змей", + "CrystalVileShard": "Мерзкий осколок кристалла", + "CultistBossBag": "Мешок с сокровищами", + "CursedCampfire": "Проклятый костер", + "CursedDart": "Проклятый дротик", + "CyanString": "Голубая нитка", + "DaedalusStormbow": "Штормовой лук Дедала", + "DarkMummyBanner": "Знамя темной мумии", + "DartPistol": "Темный пистолет", + "DartRifle": "Темная винтовка", + "DayBloomPlanterBox": "Кадка для цветка дня", + "DayBreak": "Заря", + "DeadlySphereBanner": "Знамя смертельной сферы", + "DeadlySphereStaff": "Посох смертельной сферы", + "DefenderMedal": "Медаль защитника", + "DefendersForge": "Печь защитника", + "DemonCampfire": "Демонический костер", + "DemonHeart": "Сердце демона", + "DesertBasiliskBanner": "Знамя василиска", + "DesertDjinnBanner": "Знамя духа пустыни", + "DesertFossil": "Окаменелость из пустыни", + "DesertFossilWall": "Стена из окаменелости из пустыни", + "DesertGhoulBanner": "Знамя вурдалака", + "DesertLamiaBanner": "Знамя ламии", + "DestroyerBossBag": "Мешок с сокровищами", + "DestroyerMask": "Маска Уничтожителя", + "Detonator": "Детонатор", + "DiamondGemsparkWall": "Стена из алмазных блоков", + "DiamondGemsparkWallOff": "Выключенная стена из алмазных блоков", + "DjinnLamp": "Лампа духа пустыни", + "DjinnsCurse": "Проклятие джина", + "DPSMeter": "Счетчик урона", + "DrillContainmentUnit": "Буросодержащий модуль", + "DripplerBanner": "Знамя стекателя", + "DripplerStatue": "Статуя стекателя", + "DrManFlyBanner": "Знамя человека-мухи", + "DuckStatue": "Статуя утки", + "DukeFishronMask": "Маска герцога Рыброна", + "DukeFishronTrophy": "Трофей герцога Рыброна", + "DuneSplicerBanner": "Знамя рассеивателя дюн", + "DungeonFishingCrate": "Ящик темницы", + "DyeTradersScimitar": "Экзотическая сабля", + "DyeTraderTurban": "Тюрбан продавца красителей", + "DynastyBathtub": "Родовая ванна", + "DynastyBed": "Родовая кровать", + "DynastyBookcase": "Родовой книжный шкаф", + "DynastyBowl": "Родовая миска", + "DynastyCandelabra": "Большая родовая свеча", + "DynastyCandle": "Родовая свеча", + "DynastyChair": "Родовой стул", + "DynastyChandelier": "Большой родовой фонарь", + "DynastyChest": "Родовой сундук", + "DynastyClock": "Родовые часы", + "DynastyCup": "Родовая чашка", + "DynastyLamp": "Родовая лампа", + "DynastyLantern": "Родовой фонарь", + "DynastySink": "Родовая раковина", + "DynastyWorkBench": "Родовой верстак", + "EaterMask": "Маска Пожирателя Миров", + "EaterOfWorldsBossBag": "Мешок с сокровищами", + "EbonwoodBathtub": "Ванна из черной древесины", + "EbonwoodBookcase": "Книжный шкаф из черной древесины", + "EbonwoodCandelabra": "Канделябр из черной древесины", + "EbonwoodCandle": "Свеча из черной древесины", + "EbonwoodChandelier": "Люстра из черной древесины", + "EbonwoodClock": "Часы из черной древесины", + "EbonwoodLamp": "Лампа из черной древесины", + "EbonwoodLantern": "Фонарь из черной древесины", + "EbonwoodSink": "Раковина из черной древесины", + "ElectrosphereLauncher": "Электроракетница", + "EmeraldGemsparkWall": "Стена из изумрудных блоков", + "EmeraldGemsparkWallOff": "Выключенная стена из изумрудных блоков", + "EmptyDropper": "Пустая пипетка", + "EnchantedNightcrawler": "Зачарованный ночной ползун", + "EndlessMusketPouch": "Бесконечная мушкетная сумка", + "EndlessQuiver": "Бесконечный колчан", + "EngineeringHelmet": "Инженерный шлем", + "EoCShield": "Щит Ктулху", + "EyeMask": "Маска Глаза Ктулху", + "EyeOfCthulhuBossBag": "Мешок с сокровищами", + "Fake_BlueDungeonChest": "Фальшивый Синий сундук темницы", + "Fake_BoneChest": "Фальшивый Костяной сундук", + "Fake_BorealWoodChest": "Фальшивый Сундук из заснеженной древесины", + "Fake_CactusChest": "Фальшивый Кактусовый стул", + "Fake_Chest": "Фальшивый Сундук", + "Fake_CorruptionChest": "Фальшивый Сундук порчи", + "Fake_CrimsonChest": "Фальшивый Багровый сундук", + "Fake_DynastyChest": "Фальшивый Родовой сундук", + "Fake_EbonwoodChest": "Фальшивый Сундук из черной древесины", + "Fake_FleshChest": "Фальшивый Сундук из плоти", + "Fake_GlassChest": "Фальшивый Стеклянный сундук", + "Fake_GoldChest": "Фальшивый Золотой сундук", + "Fake_GraniteChest": "Фальшивый Гранитный сундук", + "Fake_GreenDungeonChest": "Фальшивый Зеленый сундук темницы", + "Fake_HallowedChest": "Фальшивый Сундук освящения", + "Fake_HoneyChest": "Фальшивый Медовый сундук", + "Fake_IvyChest": "Фальшивый Плющевой сундук", + "Fake_JungleChest": "Фальшивый Сундук джунглей", + "Fake_LihzahrdChest": "Фальшивый Сундук ящщеров", + "Fake_LivingWoodChest": "Фальшивый Сундук из живой древесины", + "Fake_MarbleChest": "Фальшивый Мраморный сундук", + "Fake_MartianChest": "Фальшивый Марсианский стул", + "Fake_MeteoriteChest": "Фальшивый Метеоритовый сундук", + "Fake_MushroomChest": "Фальшивый Грибной сундук", + "Fake_ObsidianChest": "Фальшивый Обсидиановый сундук", + "Fake_PalmWoodChest": "Фальшивый Сундук из пальмовой древесины", + "Fake_PearlwoodChest": "Фальшивый Сундук из жемчужной древесины", + "Fake_PinkDungeonChest": "Фальшивый Розовый сундук темницы", + "Fake_PumpkinChest": "Фальшивый Тыквенный сундук", + "Fake_RichMahoganyChest": "Фальшивый Сундук из красной древесины", + "Fake_ShadewoodChest": "Фальшивый Сундук из мрачного дерева", + "Fake_ShadowChest": "Фальшивый Теневой сундук", + "Fake_SkywareChest": "Фальшивый Небесный сундук", + "Fake_SlimeChest": "Фальшивый Гелевый сундук", + "Fake_SpookyChest": "Фальшивый Жуткий стул", + "Fake_SteampunkChest": "Фальшивый Стимпанковый сундук", + "Fake_WaterChest": "Фальшивый Водяной сундук", + "Fake_WebCoveredChest": "Фальшивый Покрытый паутиной сундук", + "FalconBlade": "Соколиное лезвие", + "FallenTuxedoPants": "Падшие брюки", + "FallenTuxedoShirt": "Падший пиджак", + "FancyDishes": "Причудливые тарелки", + "FetidBaghnakhs": "Гниющие когти", + "FireBlossomPlanterBox": "Кадка для огнецвета", + "FireflyStatue": "Статуя светлячка", + "Fireplace": "Камин", + "FireworkFountain": "Фонтан фейерверков", + "FireworksBox": "Ящик с фейерверками", + "FireworksLauncher": "Празднование", + "FishermansGuide": "Карманное руководство рыбака", + "FishFinder": "Эхолот", + "FishronBossBag": "Мешок с сокровищами", + "FishronWings": "Крылья Рыброна", + "Flairon": "Флайрон", + "FlameAndSilverDye": "Пламенный и серебристый краситель", + "FleshBathtub": "Ванна из плоти", + "FleshBed": "Кровать из плоти", + "FleshBookcase": "Книжный шкаф из плоти", + "FleshCandelabra": "Канделябр из плоти", + "FleshCandle": "Свеча из плоти", + "FleshChandelier": "Люстра из плоти", + "FleshChest": "Сундук из плоти", + "FleshClock": "Часы из плоти", + "FleshDresser": "Тумбочка из плоти", + "FleshKnuckles": "Кастет из плоти", + "FleshLamp": "Лампа из плоти", + "FleshLantern": "Фонарь из плоти", + "FleshMask": "Маска Стены Плоти", + "FleshPiano": "Пианино из плоти", + "FleshSink": "Раковина из плоти", + "FleshSofa": "Диван из плоти", + "FloatingIslandFishingCrate": "Небесный ящик", + "FlowerBoots": "Цветочные сапоги", + "FlowerBoyHat": "Лепестки глупого подсолнуха", + "FlowerBoyPants": "Низ глупого подсолнуха", + "FlowerBoyShirt": "Верх глупого подсолнуха", + "FlyingAntlionBanner": "Знамя взрослого муравьиного льва", + "FlyingDutchmanTrophy": "Трофей Летучего голландца", + "FlyingKnife": "Летающий нож", + "FormatC": "Формат C", + "FossilHelm": "Ископаемый шлем", + "FossilOre": "Затвердевшая окаменелость", + "FossilPants": "Ископаемые ботинки", + "FossilShirt": "Ископаемый нагрудник", + "FragmentNebula": "Фрагмент туманности", + "FragmentSolar": "Солнечный фрагмент", + "FragmentStardust": "Фрагмент звездной пыли", + "FragmentVortex": "Фрагмент вихря", + "FritzBanner": "Знамя Фрица", + "FrogStatue": "Статуя лягушки", + "FrostDaggerfish": "Морозная рыба-меч", + "FrozenBathtub": "Замороженная ванна", + "FrozenBed": "Замороженная кровать", + "FrozenBookcase": "Замороженный книжный шкаф", + "FrozenCampfire": "Замороженный костер", + "FrozenCandelabra": "Замороженный канделябр", + "FrozenCandle": "Замороженная свеча", + "FrozenChair": "Замороженный стул", + "FrozenChandelier": "Замороженная люстра", + "FrozenClock": "Замороженные часы", + "FrozenDoor": "Замороженная дверь", + "FrozenLamp": "Замороженная лампа", + "FrozenLantern": "Замороженный фонарь", + "FrozenPiano": "Замороженное пианино", + "FrozenSink": "Замороженная раковина", + "FrozenSofa": "Замороженный диван", + "FrozenTable": "Замороженный стол", + "FrozenWorkBench": "Замороженный верстак", + "FuzzyCarrot": "Пушистая морковь", + "GelDye": "Краситель из геля", + "GemLockAmber": "Янтарный самоцветный замок", + "GemLockAmethyst": "Аметистовый самоцветный замок", + "GemLockDiamond": "Алмазный самоцветный замок", + "GemLockEmerald": "Изумрудный самоцветный замок", + "GemLockRuby": "Рубиновый самоцветный замок", + "GemLockSapphire": "Сапфировый самоцветный замок", + "GemLockTopaz": "Топазовый самоцветный замок", + "GenderChangePotion": "Зелье смены пола", + "GeyserTrap": "Гейзер", + "GiantShellyBanner": "Знамя гигантского ракушечника", + "GladiatorBreastplate": "Нагрудник гладиатора", + "GladiatorHelmet": "Шлем гладиатора", + "GladiatorLeggings": "Поножи гладиатора", + "GlassBathtub": "Стеклянная ванна", + "GlassBookcase": "Стеклянный книжный шкаф", + "GlassBowl": "Стеклянная миска", + "GlassCandelabra": "Стеклянный канделябр", + "GlassCandle": "Стеклянная свеча", + "GlassChandelier": "Стеклянная люстра", + "GlassChest": "Стеклянный сундук", + "GlassClock": "Стеклянные часы", + "GlassDresser": "Стеклянная тумбочка", + "GlassLamp": "Стеклянная лампа", + "GlassLantern": "Стеклянный фонарь", + "GlassPiano": "Стеклянное пианино", + "GlassSink": "Стеклянная раковина", + "GlassWorkBench": "Стеклянный верстак", + "GoblinSummonerBanner": "Знамя призывателя гоблинов", + "GoblinTech": "Технология гоблинов", + "GoldBird": "Золотая птица", + "GoldBirdCage": "Клетка с золотой птицей", + "GoldBunny": "Золотой кролик", + "GoldBunnyCage": "Клетка с золотым кроликом", + "GoldButterfly": "Золотая бабочка", + "GoldButterflyCage": "Банка с золотой бабочкой", + "GoldenBathtub": "Золотая ванна", + "GoldenBookcase": "Золотой книжный шкаф", + "GoldenBugNet": "Золотой сачок", + "GoldenCandelabra": "Золотой канделябр", + "GoldenCandle": "Золотая свеча", + "GoldenChandelier": "Золотая люстра", + "GoldenClock": "Золотые часы", + "GoldenLamp": "Золотая лампа", + "GoldenLantern": "Золотой фонарь", + "GoldenSink": "Золотая раковина", + "GoldfishTrophy": "Трофей золотой рыбки", + "GoldFrog": "Золотая лягушка", + "GoldFrogCage": "Клетка с золотой лягушкой", + "GoldGrasshopper": "Золотой кузнечик", + "GoldGrasshopperCage": "Клетка с золотым кузнечиком", + "GoldMouse": "Золотая мышь", + "GoldMouseCage": "Клетка с золотой мышью", + "GoldRing": "Золотое кольцо", + "GoldWorm": "Золотой червь", + "GoldWormCage": "Клетка с золотым червем", + "GolemBossBag": "Мешок с сокровищами", + "GolemMask": "Маска Голема", + "Gradient": "Градиент", + "Granite": "Гранитный блок", + "GraniteBathtub": "Гранитная ванная", + "GraniteBed": "Гранитная кровать", + "GraniteBlock": "Гладкий гранитный блок", + "GraniteBlockWall": "Гладкая гранитная стена", + "GraniteBookcase": "Гранитный книжный шкаф", + "GraniteCandelabra": "Гранитный канделябр", + "GraniteCandle": "Гранитная свеча", + "GraniteChair": "Гранитный стул", + "GraniteChandelier": "Гранитная люстра", + "GraniteChest": "Гранитный сундук", + "GraniteClock": "Гранитные часы", + "GraniteDoor": "Гранитная дверь", + "GraniteDresser": "Гранитная тумбочка", + "GraniteFlyerBanner": "Знамя гранитного элементаля", + "GraniteGolemStatue": "Статуя гранитного голема", + "GraniteLamp": "Гранитная лампа", + "GraniteLantern": "Гранитный фонарь", + "GranitePiano": "Гранитное пианино", + "GranitePlatform": "Гранитная платформа", + "GraniteSink": "Гранитная раковина", + "GraniteSofa": "Гранитный диван", + "GraniteTable": "Гранитный стол", + "GraniteWall": "Гранитная стена", + "GraniteWorkBench": "Гранитный верстак", + "Grasshopper": "Кузнечик", + "GrasshopperCage": "Клетка с кузнечиком", + "GrasshopperStatue": "Статуя кузнечика", + "GreedyRing": "Кольцо жадности", + "GreekSkeletonBanner": "Знамя гоплита", + "GreenCounterweight": "Зеленый противовес", + "GreenDungeonBathtub": "Зеленая ванна темницы", + "GreenDungeonCandelabra": "Зеленый канделябр темницы", + "GreenDungeonChandelier": "Зеленая люстра темницы", + "GreenDungeonChest": "Зеленый сундук темницы", + "GreenDungeonLamp": "Зеленая лампа темницы", + "GreenDungeonSink": "Зеленая раковина темницы", + "GreenFlameAndSilverDye": "Пламенно-зеленый и серебристый краситель", + "GreenJellyfishBanner": "Знамя зеленой медузы", + "GreenPhasesaber": "Зеленый световой меч", + "GreenString": "Зеленая нитка", + "GrimDye": "Мрачный краситель", + "Grubby": "Личиночка", + "GrubSoup": "Суп из личинок", + "HadesDye": "Краситель ледяного пламени", + "HallowedFishingCrate": "Ящик освящения", + "HallowHardenedSand": "Блок затвердевшего жемчужного песка", + "HallowHardenedSandWall": "Стена из затвердевшего жемчужного песка", + "HallowSandstone": "Жемчужный песчаниковый блок", + "HallowSandstoneWall": "Стена из жемчужного песчаникового блока", + "HardenedSand": "Блок затвердевшего песка", + "HardenedSandWall": "Стена из затвердевшего песка", + "HardySaddle": "Прочное седло", + "HarpyStatue": "Статуя гарпии", + "HelFire": "Пекло", + "HellstoneBrickWall": "Стена из адского кирпича", + "HellwingBow": "Адский лук", + "HerbBag": "Мешок с растениями", + "HiTekSunglasses": "Высокотехнологичные солнцезащитные очки", + "HiveBackpack": "Рюкзак-улей", + "HoneyBathtub": "Медовая ванна", + "HoneyBookcase": "Медовый книжный шкаф", + "HoneyCandelabra": "Медовый канделябр", + "HoneyCandle": "Медовая свеча", + "HoneyChandelier": "Медовая люстра", + "HoneyChest": "Медовый сундук", + "HoneyClock": "Медовые часы", + "HoneyCup": "Медовая чашка", + "HoneyedGoggles": "Медовые очки", + "HoneyfallBlock": "Блок-медопад", + "HoneyfallWall": "Стена-медопад", + "HoneyLamp": "Медовая лампа", + "HoneyLantern": "Медовый фонарь", + "HoneyPiano": "Медовое пианино", + "HoneyPlatform": "Медовая платформа", + "HoneySink": "Медовая раковина", + "HoneyWorkBench": "Медовый верстак", + "HopliteStatue": "Статуя гоплита", + "HuntressBuckler": "Щит охотницы", + "HuntressJerkin": "Куртка охотницы", + "HuntressPants": "Штаны охотницы", + "HuntressWig": "Парик охотницы", + "IceMirror": "Ледяное зеркало", + "IceTortoiseBanner": "Знамя ледяной черепахи", + "IchorCampfire": "Ихорный костер", + "IchorDart": "Ихорный дротик", + "IlluminantHook": "Светящийся крюк", + "InfernalWispDye": "Краситель адского духа", + "InfluxWaver": "Колебатель приливов", + "ItemFrame": "Рамка", + "Javelin": "Копье", + "JimsWings": "Крылья Jim", + "JourneymanBait": "Наживка для специалиста", + "JungleFishingCrate": "Ящик джунглей", + "JungleYoyo": "Амазония", + "KingSlimeBossBag": "Мешок с сокровищами", + "Kraken": "Кракен", + "LamiaHat": "Маска ламии", + "LamiaPants": "Хвост ламии", + "LamiaShirt": "Одеяния ламии", + "LargeAmber": "Большой янтарь", + "LaserDrill": "Лазерный бур", + "LaserMachinegun": "Лазерный пулемет", + "LaserRuler": "Механическая линейка", + "LastPrism": "Последняя призма", + "LavafallBlock": "Лавападный блок", + "LavaLamp": "Лавовая лампа", + "LifeformAnalyzer": "Анализатор форм жизни", + "LifePreserver": "Спасательный круг", + "LightKey": "Ключ света", + "LightMummyBanner": "Знамя светлой мумии", + "LihzahrdBathtub": "Ванна ящщеров", + "LihzahrdBed": "Кровать ящщеров", + "LihzahrdBookcase": "Книжный шкаф ящщеров", + "LihzahrdCandelabra": "Канделябр ящщеров", + "LihzahrdCandle": "Свеча ящщеров", + "LihzahrdChandelier": "Люстра ящщеров", + "LihzahrdClock": "Часы ящщеров", + "LihzahrdLamp": "Лампа ящщеров", + "LihzahrdLantern": "Фонарь ящеров", + "LihzahrdSink": "Раковина ящщеров", + "LimeString": "Лаймовая нитка", + "LivingCursedFireBlock": "Блок живого проклятого огня", + "LivingDemonFireBlock": "Блок живого демонического огня", + "LivingFireBlock": "Блок живого огня", + "LivingFlameDye": "Краситель живого пламени", + "LivingFrostFireBlock": "Блок живого морозного огня", + "LivingIchorBlock": "Живой ихорный блок", + "LivingLeafWall": "Стена из живой листвы", + "LivingMahoganyLeafWand": "Жезл листьев из красной древесины", + "LivingMahoganyWand": "Жезл из живой красной древесины", + "LivingOceanDye": "Краситель живого океана", + "LivingRainbowDye": "Краситель живой радуги", + "LivingUltrabrightFireBlock": "Блок живого сверхъяркого огня", + "LivingWoodBathtub": "Ванна из живой древесины", + "LivingWoodBed": "Кровать из живой древесины", + "LivingWoodBookcase": "Книжный шкаф из живой древесины", + "LivingWoodCandelabra": "Канделябр из живой древесины", + "LivingWoodCandle": "Свеча из живой древесины", + "LivingWoodChandelier": "Люстра из живой древесины", + "LivingWoodClock": "Часы из живой древесины", + "LivingWoodLamp": "Лампа из живой древесины", + "LivingWoodLantern": "Фонарь из живой древесины", + "LivingWoodPiano": "Пианино из живой древесины", + "LivingWoodPlatform": "Платформа из живой древесины", + "LivingWoodSink": "Раковина из живой древесины", + "LivingWoodSofa": "Диван из живой древесины", + "LivingWoodWorkBench": "Верстак из живой древесины", + "LockBox": "Золотая закрытая коробка", + "LogicGateLamp_Faulty": "Лампа логического вентиля (неисправная)", + "LogicGateLamp_Off": "Лампа логического вентиля (выкл.)", + "LogicGateLamp_On": "Лампа логического вентиля (вкл.)", + "LogicGate_AND": "Логический вентиль (И)", + "LogicGate_NAND": "Логический вентиль (НЕИ)", + "LogicGate_NOR": "Логический вентиль (НЕИЛИ)", + "LogicGate_NXOR": "Логический вентиль (ИСКЛЮЧАЮЩЕЕ НЕИЛИ)", + "LogicGate_OR": "Логический вентиль (ИЛИ)", + "LogicGate_XOR": "Логический вентиль (ИСКЛЮЧАЮЩЕЕ ИЛИ)", + "LogicSensor_Above": "Логический датчик (игрок наверху)", + "LogicSensor_Honey": "Датчик жидкости (мед)", + "LogicSensor_Lava": "Датчик жидкости (лава)", + "LogicSensor_Liquid": "Датчик жидкости (любая)", + "LogicSensor_Moon": "Логический датчик (ночь)", + "LogicSensor_Sun": "Логический датчик (день)", + "LogicSensor_Water": "Датчик жидкости (вода)", + "LokisDye": "Краситель Loki", + "LokisHelm": "Шлем Loki", + "LokisPants": "Ботинки Loki", + "LokisShirt": "Нагрудник Loki", + "LokisWings": "Крылья Loki", + "LunarBar": "Люминитовый слиток", + "LunarBlockNebula": "Блок фрагмента туманности", + "LunarBlockSolar": "Блок солнечного фрагмента", + "LunarBlockStardust": "Блок фрагмента звездной пыли", + "LunarBlockVortex": "Блок фрагмента вихря", + "LunarBrick": "Люминитовый кирпич", + "LunarBrickWall": "Стена из люминитового кирпича", + "LunarCraftingStation": "Древний манипулятор", + "LunarFlareBook": "Лунная вспышка", + "LunarHamaxeNebula": "Молотопор туманности", + "LunarHamaxeSolar": "Молотопор солнечной вспышки", + "LunarHamaxeStardust": "Молотопор звездной пыли", + "LunarHamaxeVortex": "Молотопор вихря", + "LunarHook": "Лунный крюк", + "LunarOre": "Люминит", + "LunarTabletFragment": "Фрагмент солнечной плиты", + "MagicHoneyDropper": "Магическая пипетка с медом", + "MagicLantern": "Магический светильник", + "MagicLavaDropper": "Магическая пипетка с лавой", + "MagicSandDropper": "Магическая пипетка с песком", + "MagicWaterDropper": "Магическая пипетка с водой", + "Marble": "Мраморный блок", + "MarbleBathtub": "Мраморная ванная", + "MarbleBed": "Мраморная кровать", + "MarbleBlock": "Гладкий мраморный блок", + "MarbleBlockWall": "Гладкая мраморная стена", + "MarbleBookcase": "Мраморный книжный шкаф", + "MarbleCandelabra": "Мраморный канделябр", + "MarbleCandle": "Мраморная свеча", + "MarbleChair": "Мраморный стул", + "MarbleChandelier": "Мраморная люстра", + "MarbleChest": "Мраморный сундук", + "MarbleClock": "Мраморные часы", + "MarbleDoor": "Мраморная дверь", + "MarbleDresser": "Мраморная тумбочка", + "MarbleLamp": "Мраморная лампа", + "MarbleLantern": "Мраморный светильник", + "MarblePiano": "Мраморное пианино", + "MarblePlatform": "Мраморная платформа", + "MarbleSink": "Мраморная раковина", + "MarbleSofa": "Мраморный диван", + "MarbleTable": "Мраморный стол", + "MarbleWall": "Мраморная стена", + "MarbleWorkBench": "Мраморный верстак", + "MartianArmorDye": "Марсианский краситель", + "MartianAstroClock": "Марсианские звездные часы", + "MartianBathtub": "Марсианская ванна", + "MartianBed": "Марсианская кровать", + "MartianChandelier": "Марсианская люстра", + "MartianChest": "Марсианский стул", + "MartianConduitPlating": "Марсианская проводящая пластина", + "MartianConduitWall": "Марсианская проводящая стена", + "MartianCostumeMask": "Маска марсианского костюма", + "MartianCostumePants": "Штаны марсианского костюма", + "MartianCostumeShirt": "Рубашка марсианского костюма", + "MartianDoor": "Марсианская дверь", + "MartianDresser": "Марсианская тумбочка", + "MartianHairDye": "Марсианская краска для волос", + "MartianHolobookcase": "Марсианский голографический книжный шкаф", + "MartianHoverCandle": "Марсианская левитирующая свеча", + "MartianHoverChair": "Марсианский левитирующий стул", + "MartianLamppost": "Марсианский фонарный столб", + "MartianLantern": "Марсианский светильник", + "MartianPiano": "Марсианское пианино", + "MartianPlatform": "Марсианская платформа", + "MartianSaucerTrophy": "Трофей летающей тарелки марсиан", + "MartianSink": "Марсианская раковина", + "MartianSofa": "Марсианский диван", + "MartianTable": "Марсианский стол", + "MartianTableLamp": "Марсианская настольная лампа", + "MartianUniformHelmet": "Шлем марсианской униформы", + "MartianUniformPants": "Штаны марсианской униформы", + "MartianUniformTorso": "Куртка марсианской униформы", + "MartianWalkerBanner": "Знамя марсианского шагохода", + "MartianWorkBench": "Марсианский верстак", + "MasterBait": "Наживка для мастера", + "MechanicalBatteryPiece": "Батарея механической вагонетки", + "MechanicalLens": "Механическая линза", + "MechanicalWagonPiece": "Рама механической вагонетки", + "MechanicalWheelPiece": "Колеса механической вагонетки", + "MedusaBanner": "Знамя медузы", + "MedusaHead": "Голова медузы", + "MedusaStatue": "Голова медузы", + "Meowmere": "Мяумур", + "MetalDetector": "Металлодетектор", + "MetalSink": "Металлическая раковина", + "MeteoriteBathtub": "Метеоритовая ванна", + "MeteoriteBed": "Метеоритовая кровать", + "MeteoriteBookcase": "Метеоритовый книжный шкаф", + "MeteoriteBrick": "Метеоритовый кирпич", + "MeteoriteBrickWall": "Стена из метеоритового кирпича", + "MeteoriteCandelabra": "Метеоритовый канделябр", + "MeteoriteCandle": "Метеоритовая свеча", + "MeteoriteChair": "Метеоритовый стул", + "MeteoriteChandelier": "Метеоритовая люстра", + "MeteoriteChest": "Метеоритовый сундук", + "MeteoriteClock": "Метеоритовые часы", + "MeteoriteDoor": "Метеоритовая дверь", + "MeteoriteDresser": "Метеоритовая тумбочка", + "MeteoriteLamp": "Метеоритовая лампа", + "MeteoriteLantern": "Метеоритовый светильник", + "MeteoritePiano": "Метеоритовое пианино", + "MeteoritePlatform": "Метеоритовая платформа", + "MeteoriteSink": "Метеоритовая раковина", + "MeteoriteSofa": "Метеоритовый диван", + "MeteoriteTable": "Метеоритовый стол", + "MeteoriteWorkBench": "Метеоритовый верстак", + "MeteorStaff": "Метеоритовый посох", + "MidnightRainbowDye": "Полуночный радужный краситель", + "MinecartMech": "Механическая вагонетка", + "MinecartTrack": "Вагонетка", + "MirageDye": "Миражевый краситель", + "MolotovCocktail": "Коктейль Молотова", + "MoneyTrough": "Денежное корыто", + "MonkBelt": "Пояс монаха", + "MonkBrows": "Шляпа лысого монаха с пышными бровями", + "MonkPants": "Штаны монаха", + "MonkShirt": "Рубашка монаха", + "MoonglowPlanterBox": "Кадка для луноцвета", + "MoonlordArrow": "Люминитовая стрела", + "MoonLordBossBag": "Мешок с сокровищами", + "MoonlordBullet": "Люминитовая пуля", + "MoonLordPainting": "Не ребенок, не кальмар", + "MoonLordTrophy": "Трофей лунного лорда", + "MoonlordTurretStaff": "Посох лунного портала", + "MoonMask": "Маска луны", + "MothronBanner": "Знамя Мотрона", + "MothronWings": "Крылья Мотрона", + "MouseStatue": "Статуя мыши", + "MulticolorWrench": "Разноцветный гаечный ключ", + "MushroomBathtub": "Грибная ванна", + "MushroomBed": "Грибная кровать", + "MushroomBench": "Грибная скамья", + "MushroomBookcase": "Грибной книжный шкаф", + "MushroomCandelabra": "Грибной канделябр", + "MushroomCandle": "Грибная свеча", + "MushroomChandelier": "Грибная люстра", + "MushroomChest": "Грибной сундук", + "MushroomClock": "Грибные часы", + "MushroomDresser": "Грибная тумбочка", + "MushroomDye": "Краситель из светящихся грибов", + "MushroomLamp": "Грибная лампа", + "MushroomLantern": "Грибной фонарь", + "MushroomPiano": "Грибное пианино", + "MushroomPlatform": "Грибная платформа", + "MushroomSink": "Грибная раковина", + "MushroomTable": "Грибной стол", + "MusicBoxGoblins": "Музыкальная шкатулка (вторжение гоблинов)", + "MusicBoxHell": "Музыкальная шкатулка (ад)", + "MusicBoxLunarBoss": "Музыкальная шкатулка (лунный босс)", + "MusicBoxMartians": "Музыкальная шкатулка (марсианское безумие)", + "MusicBoxPirates": "Музыкальная шкатулка (вторжение пиратов)", + "MusicBoxSandstorm": "Музыкальная шкатулка (песчаная буря)", + "MusicBoxTowers": "Музыкальная шкатулка (башни)", + "MusicBoxUndergroundCrimson": "Музыкальная шкатулка (подземный багрянец)", + "Nail": "Гвоздь", + "NailGun": "Гвоздемет", + "NailheadBanner": "Знамя гвоздеголова", + "NebulaArcanum": "Туманый арканум", + "NebulaAxe": "Топор туманности", + "NebulaBeastBanner": "Знамя чудовища эволюции", + "NebulaBlaze": "Пламя туманности", + "NebulaBrainBanner": "Знамя летуна туманности", + "NebulaBreastplate": "Нагрудник туманности", + "NebulaChainsaw": "Бензопила туманности", + "NebulaDrill": "Бур туманности", + "NebulaDye": "Туманый краситель", + "NebulaHammer": "Молот туманности", + "NebulaHeadcrabBanner": "Знамя Мозгососа", + "NebulaHelmet": "Шлем туманности", + "NebulaLeggings": "Ботинки туманности", + "NebulaMonolith": "Монолит туманности", + "NebulaPickaxe": "Кирка туманности", + "NebulaPickup1": "Усилитель урона", + "NebulaPickup2": "Усилитель здоровья", + "NebulaPickup3": "Усилитель маны", + "NebulaSoldierBanner": "Знамя предсказателя", + "NegativeDye": "Негативный краситель", + "NightKey": "Ключ ночи", + "NightVisionHelmet": "Шлем ночного видения", + "ObsidianBathtub": "Обсидиановая ванна", + "ObsidianCandelabra": "Обсидиановый канделябр", + "ObsidianCandle": "Обсидиановая свеча", + "ObsidianChandelier": "Обсидиановая люстра", + "ObsidianChest": "Обсидиановый сундук", + "ObsidianClock": "Обсидиановые часы", + "ObsidianHelm": "Обсидиановая бандитская шляпа", + "ObsidianLamp": "Обсидиановая лампа", + "ObsidianLantern": "Обсидиановый фонарь", + "ObsidianPants": "Обсидиановые штаны", + "ObsidianShirt": "Обсидиановое пальто", + "ObsidianSink": "Обсидиановая раковина", + "OnyxBlaster": "Ониксовый бластер", + "OrangeString": "Оранжевая нитка", + "PainterPaintballGun": "Пейнтбольный пистолет", + "PaintingAcorns": "Желуди", + "PaintingCastleMarsberg": "Замок Марсберг", + "PaintingColdSnap": "Холодная схватка", + "PaintingCursedSaint": "Проклятый святой", + "PaintingMartiaLisa": "Марсо Лиза", + "PaintingSnowfellas": "Снежные ребята", + "PaintingTheSeason": "Сезон", + "PaintingTheTruthIsUpThere": "Правда сверху", + "PalmWood": "Пальмовая древесина", + "PalmWoodBathtub": "Ванна из пальмовой древесины", + "PalmWoodBed": "Кровать из пальмовой древесины", + "PalmWoodBench": "Скамья из пальмовой древесины", + "PalmWoodBookcase": "Книжный шкаф из пальмовой древесины", + "PalmWoodBow": "Лук из пальмовой древесины", + "PalmWoodBreastplate": "Нагрудник из пальмовой древесины", + "PalmWoodCandelabra": "Канделябр из пальмовой древесины", + "PalmWoodCandle": "Свеча из пальмовой древесины", + "PalmWoodChair": "Стул из пальмовой древесины", + "PalmWoodChandelier": "Люстра из пальмовой древесины", + "PalmWoodChest": "Сундук из пальмовой древесины", + "PalmWoodClock": "Часы из пальмовой древесины", + "PalmWoodDoor": "Дверь из пальмовой древесины", + "PalmWoodDresser": "Тумбочка из пальмовой древесины", + "PalmWoodFence": "Забор из пальмовой древесины", + "PalmWoodGreaves": "Ботинки из пальмовой древесины", + "PalmWoodHammer": "Молот из пальмовой древесины", + "PalmWoodHelmet": "Шлем из пальмовой древесины", + "PalmWoodLamp": "Лампа из пальмовой древесины", + "PalmWoodLantern": "Фонарь из пальмовой древесины", + "PalmWoodPiano": "Пианино из пальмовой древесины", + "PalmWoodPlatform": "Платформа из пальмовой древесины", + "PalmWoodSink": "Раковина из пальмовой древесины", + "PalmWoodSofa": "Диван из пальмовой древесины", + "PalmWoodSword": "Меч из пальмовой древесины", + "PalmWoodTable": "Стол из пальмовой древесины", + "PalmWoodWall": "Стена из пальмовой древесины", + "PalmWoodWorkBench": "Верстак из пальмовой древесины", + "PartyBalloonAnimal": "Шарик-животное", + "PartyBundleOfBalloonsAccessory": "Связка праздничных шариков", + "PartyBundleOfBalloonTile": "Связка глуповатых шариков", + "PartyGirlGrenade": "Веселая граната", + "PartyHat": "Праздничный колпак", + "PartyMonolith": "Центр вечеринки", + "PartyPresent": "Праздничный подарок", + "PDA": "КПК", + "PeaceCandle": "Свеча спокойствия", + "PearlwoodBathtub": "Ванна из жемчужной древесины", + "PearlwoodBookcase": "Книжный шкаф из жемчужной древесины", + "PearlwoodCandelabra": "Канделябр из жемчужной древесины", + "PearlwoodCandle": "Свеча из жемчужной древесины", + "PearlwoodChandelier": "Люстра из жемчужной древесины", + "PearlwoodClock": "Часы из жемчужной древесины", + "PearlwoodLamp": "Лампа из жемчужной древесины", + "PearlwoodLantern": "Фонарь из жемчужной древесины", + "PearlwoodSink": "Раковина из жемчужной древесины", + "PedguinHat": "Капюшон Pedguin", + "PedguinPants": "Брюки Pedguin", + "PedguinShirt": "Куртка Pedguin", + "PenguinStatue": "Статуя пингвина", + "Phantasm": "Фантазм", + "PhaseDye": "Фазовый краситель", + "PhasicWarpEjector": "Фазовый варповый отражатель", + "Pigronata": "Пигроната", + "PigronStatue": "Статуя свинодракона", + "PinkDungeonBathtub": "Розовая ванна темницы", + "PinkDungeonCandelabra": "Розовый канделябр темницы", + "PinkDungeonChandelier": "Розовая люстра темницы", + "PinkDungeonChest": "Розовый сундук темницы", + "PinkDungeonLamp": "Розовая лампа темницы", + "PinkDungeonSink": "Розовая раковина темницы", + "PinkGel": "Розовый гель", + "PinkGelDye": "Краситель из розового геля", + "PinkJellyfishBanner": "Знамя розовой медузы", + "PinkSlimeBlock": "Блок из розовой слизи", + "PinkString": "Розовая нитка", + "PinkTorch": "Розовый факел", + "PirateCaptainBanner": "Знамя капитана пиратов", + "PirateCorsairBanner": "Знамя корсара", + "PirateCrossbowerBanner": "Знамя пирата-арбалетчика", + "PirateDeadeyeBanner": "Знамя одноглазого пирата", + "PirateStaff": "Пиратский посох", + "PixelBox": "Пиксельная коробка", + "PixieDye": "Краситель феи", + "PlanteraBossBag": "Мешок с сокровищами", + "PlanteraMask": "Маска Плантеры", + "PocketMirror": "Карманное зеркало", + "PoisonousSporeBanner": "Знамя ядовитой споры", + "PortalGun": "Портальная пушка", + "PortalGunStation": "Держатель портальной пушки", + "PressureTrack": "Рельсы с нажимной плитой", + "ProjectilePressurePad": "Бирюзовая нажимная плита", + "PsychoBanner": "Знамя психа", + "PsychoKnife": "Нож психа", + "PumpkinBathtub": "Тыквенная ванна", + "PumpkinBed": "Тыквенная кровать", + "PumpkinBookcase": "Тыквенный книжный шкаф", + "PumpkinCandelabra": "Тыквенный канделябр", + "PumpkinCandle": "Тыквенная свеча", + "PumpkinChandelier": "Тыквенная люстра", + "PumpkinChest": "Тыквенный сундук", + "PumpkinClock": "Тыквенные часы", + "PumpkinDresser": "Тыквенная тумбочка", + "PumpkinLamp": "Тыквенная лампа", + "PumpkinLantern": "Тыквенный фонарь", + "PumpkinPiano": "Тыквенное пианино", + "PumpkinSink": "Тыквенная раковина", + "PurpleCounterweight": "Фиолетовый противовес", + "PurpleOozeDye": "Пурпурный липкий краситель", + "PurplePhasesaber": "Фиолетовый световой меч", + "PurpleString": "Пурпурная нитка", + "PutridScent": "Гнилые останки", + "QueenBeeBossBag": "Мешок с сокровищами", + "Radar": "Радар", + "RainbowCampfire": "Радужный костер", + "RainbowCrystalStaff": "Радужный кристальный посох", + "RainbowString": "Радужная нитка", + "RainbowTorch": "Радужный факел", + "Rally": "Ралли", + "RazorbladeTyphoon": "Бритвенный тайфун", + "RedAcidDye": "Красный кислотный краситель", + "RedCounterweight": "Красный противовес", + "RedDevilBanner": "Знаямя красного дьявола", + "RedPhasesaber": "Красный световой меч", + "RedString": "Красная нитка", + "RedsYoyo": "Бросок Red", + "ReflectiveCopperDye": "Светоотражающий медный краситель", + "ReflectiveDye": "Светоотражающий краситель", + "ReflectiveGoldDye": "Светоотражающий золотистый краситель", + "ReflectiveMetalDye": "Светоотражающий металлический краситель", + "ReflectiveObsidianDye": "Светоотражающий обсидиановый краситель", + "ReflectiveSilverDye": "Светоотражающий серебристый краситель", + "REK": "R.E.K. 3000", + "RichGravestone1": "Золотой могильный крест", + "RichGravestone2": "Золотая надгробная плита", + "RichGravestone3": "Золотое надгробие", + "RichGravestone4": "Золотая могильная плита", + "RichGravestone5": "Золотой могильный камень", + "RichMahoganyBathtub": "Ванна из красной древесины", + "RichMahoganyBookcase": "Книжный шкаф из красной древесины", + "RichMahoganyCandelabra": "Канделябр из красной древесины", + "RichMahoganyCandle": "Свеча из красной древесины", + "RichMahoganyChandelier": "Люстра из красной древесины", + "RichMahoganyClock": "Часы из красной древесины", + "RichMahoganyLamp": "Лампа из красной древесины", + "RichMahoganyLantern": "Фонарь из красной древесины", + "RichMahoganySink": "Раковина из красной древесины", + "RoyalGel": "Королевский гель", + "RubyGemsparkWall": "Стена из рубиновых блоков", + "RubyGemsparkWallOff": "Выключенная стена из рубиновых блоков", + "SailfishBoots": "Ботинки парусника", + "SalamanderBanner": "Знамя саламандры", + "SandElementalBanner": "Знамя песчаного элементаля", + "SandFallWall": "Стена пескопада", + "SandsharkBanner": "Знамя песчаной акулы", + "SandsharkCorruptBanner": "Знамя костяного кусателя", + "SandsharkCrimsonBanner": "Знамя похитителя плоти", + "SandsharkHallowedBanner": "Знамя кристальной акулы", + "SandSlimeBanner": "Знамя песчаного слизня", + "Sandstone": "Песчаниковый блок", + "SandstoneWall": "Песчаниковая стена", + "SapphireGemsparkWall": "Стена из сапфировых блоков", + "SapphireGemsparkWallOff": "Выключенная стена из сапфировых блоков", + "ScalyTruffle": "Чешуйчатый трюфель", + "ScorpionStatue": "Статуя скорпиона", + "Seashell": "Ракушка", + "SeaSnailBanner": "Знамя морской улитки", + "Seedler": "Сеятель", + "SeveredHandBanner": "Знамя оторванной кисти", + "Sextant": "Секстант", + "ShadewoodBathtub": "Ванна из мрачной древесины", + "ShadewoodBookcase": "Книжный шкаф из мрачной древесины", + "ShadewoodCandelabra": "Канделябр из мрачной древесины", + "ShadewoodCandle": "Свеча из мрачной древесины", + "ShadewoodChandelier": "Люстра из мрачной древесины", + "ShadewoodClock": "Часы из мрачной древесины", + "ShadewoodLamp": "Лампа из мрачной древесины", + "ShadewoodLantern": "Фонарь из мрачной древесины", + "ShadewoodSink": "Раковина из мрачной древесины", + "ShadowDye": "Теневой краситель", + "ShadowFlameBow": "Лук теневого пламени", + "ShadowflameHadesDye": "Краситель ледяного теневого пламени", + "ShadowFlameHexDoll": "Кукла теневого пламени", + "ShadowFlameKnife": "Нож теневого пламени", + "SharkronBalloon": "Шарик-акулон", + "SharkStatue": "Статуя акулы", + "SharkteethTrophy": "Трофей акульей челюсти", + "SharkToothNecklace": "Ожерелье из акульих зубов", + "SharpeningStation": "Точильный камень", + "ShiftingPearlSandsDye": "Краситель жемчужного песка", + "ShiftingSandsDye": "Песчаный краситель", + "ShinyStone": "Блестящий камень", + "ShipsWheel": "Штурвал", + "ShiverthornPlanterBox": "Кадка для дрожецвета", + "ShrimpyTruffle": "Хлипкий трюфель", + "ShroomitePlating": "Грибная плитка", + "ShroomitePlatingWall": "Стена из грибной плитки", + "SilkRope": "Шелковая веревка", + "SilkRopeCoil": "Моток шелковой веревки", + "SillyBalloonGreen": "Зеленый глуповатый шарик", + "SillyBalloonGreenWall": "Стена из зеленых глуповатых шариков", + "SillyBalloonMachine": "Машина глуповатых шариков", + "SillyBalloonPink": "Розовый глуповатый шарик", + "SillyBalloonPinkWall": "Стена из розовых глуповатых шариков", + "SillyBalloonPurple": "Пурпурный глуповатый шарик", + "SillyBalloonPurpleWall": "Стена из пурпурных глуповатых шариков", + "SillyBalloonTiedGreen": "Зеленый привязанный глуповатый шарик", + "SillyBalloonTiedPink": "Розовый привязанный глуповатый шарик", + "SillyBalloonTiedPurple": "Пурпурный привязанный глуповатый шарик", + "SillyStreamerBlue": "Синяя праздничная лента", + "SillyStreamerGreen": "Зеленая праздничная лента", + "SillyStreamerPink": "Розовая праздничная лента", + "SilverAndBlackDye": "Серебристый и черный краситель", + "SkeletronBossBag": "Мешок с сокровищами", + "SkeletronPrimeBossBag": "Мешок с сокровищами", + "SkeletronPrimeMask": "Маска Скелетрона Прайма", + "SkyBlueString": "Небесно-синяя нитка", + "SkyFracture": "Небесный разлом", + "SkywareBathtub": "Небесная ванна", + "SkywareBed": "Небесная кровать", + "SkywareBookcase": "Небесный книжный шкаф", + "SkywareCandelabra": "Небесный канделябр", + "SkywareCandle": "Небесная свеча", + "SkywareChandelier": "Небесная люстра", + "SkywareClock": "Небесные часы", + "SkywareLamp": "Небесная лампа", + "SkywareLantern": "Небесный фонарь", + "SkywarePlatform": "Небесная платформа", + "SkywareSink": "Небесная раковина", + "SkywareWorkbench": "Небесный верстак", + "SlapHand": "Шлепающая рука", + "SliceOfCake": "Кусок торта", + "SlimeBathtub": "Гелевая ванная", + "SlimeBed": "Гелевая кровать", + "SlimeBookcase": "Гелевый книжный шкаф", + "SlimeCandelabra": "Гелевый канделябр", + "SlimeCandle": "Гелевая свеча", + "SlimeChair": "Гелевый стул", + "SlimeChandelier": "Гелевая люстра", + "SlimeChest": "Гелевый сундук", + "SlimeClock": "Гелевые часы", + "SlimeDoor": "Гелевая дверь", + "SlimeDresser": "Гелевая тумбочка", + "SlimeGun": "Слизневый пистолет", + "SlimeHook": "Слизневый крюк", + "SlimeLamp": "Гелевая лампа", + "SlimeLantern": "Гелевый фонарь", + "SlimePiano": "Гелевое пианино", + "SlimePlatform": "Гелевая платформа", + "SlimeSink": "Гелевая раковина", + "SlimeSofa": "Гелевый диван", + "SlimeTable": "Гелевый стол", + "SlimySaddle": "Слизневое седло", + "Sluggy": "Слизнячок", + "SmokeBlock": "Дымовой блок", + "SnailStatue": "Статуя улитки", + "SnowCloudBlock": "Снежное облако", + "SnowFallWall": "Стена снегопада", + "SolarCoriteBanner": "Знамя корита", + "SolarCrawltipedeBanner": "Знамя ползоножки", + "SolarDrakomireBanner": "Знамя дракомайра", + "SolarDrakomireRiderBanner": "Знамя наездника дракомайра", + "SolarDye": "Солнечный краситель", + "SolarEruption": "Солнечное извержение", + "SolarFlareAxe": "Топор солнечной вспышки", + "SolarFlareBreastplate": "Нагрудник солнечной вспышки", + "SolarFlareChainsaw": "Бензопила солнечной вспышки", + "SolarFlareDrill": "Бур солнечной вспышки", + "SolarFlareHammer": "Молот солнечной вспышки", + "SolarFlareHelmet": "Шлем солнечной вспышки", + "SolarFlareLeggings": "Ботинки солнечной вспышки", + "SolarFlarePickaxe": "Кирка солнечной вспышки", + "SolarMonolith": "Солнечный монолит", + "SolarSolenianBanner": "Знамя селенеанина", + "SolarSrollerBanner": "Знамя сроллера", + "SolarTablet": "Солнечная плита", + "SoulDrain": "Похитительжизни", + "SparkyPainting": "Спарки", + "SpectreBar": "Спектральный слиток", + "SpelunkerGlowstick": "Светящаяся палочка шахтера", + "SpiderFang": "Паучий клык", + "SpiderStaff": "Паучий посох", + "SpiritFlame": "Пламя духа", + "SpookyBathtub": "Жуткая ванна", + "SpookyBed": "Жуткая кровать", + "SpookyBookcase": "Жуткий книжный шкаф", + "SpookyCandelabra": "Жуткий канделябр", + "SpookyCandle": "Жуткая свеча", + "SpookyChandelier": "Жуткая люстра", + "SpookyChest": "Жуткий стул", + "SpookyClock": "Жуткие часы", + "SpookyLamp": "Жуткая лампа", + "SpookyLantern": "Жуткий фонарь", + "SpookySink": "Жуткая раковина", + "SporeSac": "Споровый мешок", + "SquireGreatHelm": "Великий шлем Squire", + "SquireGreaves": "Ботинки Squire", + "SquirePlating": "Нагрудник Squire", + "SquireShield": "Щит Squire", + "SquirrelGold": "Золотая белка", + "SquirrelGoldCage": "Клетка с золотой белкой", + "SquirrelOrangeCage": "Клетка с красной белкой", + "SquirrelRed": "Красная белка", + "SquirrelStatue": "Статуя белки", + "StardustAxe": "Топор звездной пыли", + "StardustBreastplate": "Нагрудник звездной пыли", + "StardustCellStaff": "Посох клетки звездной пыли", + "StardustChainsaw": "Бензопила звездной пыли", + "StardustDragonStaff": "Посох дракона звездной пыли", + "StardustDrill": "Бур звездной пыли", + "StardustDye": "Краситель звездной пыли", + "StardustHammer": "Молот звездной пыли", + "StardustHelmet": "Шлем звездной пыли", + "StardustJellyfishBanner": "Знамя захватчика потока", + "StardustLargeCellBanner": "Знамя звездной клетки", + "StardustLeggings": "Ботинки звездной пыли", + "StardustMonolith": "Монолит звездной пыли", + "StardustPickaxe": "Кирка звездной пыли", + "StardustSmallCellBanner": "Знамя малой звездной клетки", + "StardustSoldierBanner": "Знамя звездочета", + "StardustSpiderBanner": "Знамя мерцающего ловца", + "StardustWormBanner": "Знамя млечного ткача", + "Starfish": "Морская звезда", + "StarWrath": "Звездная ярость", + "StaticHook": "Неподвижный крюк", + "SteampunkBathtub": "Стимпанковая ванна", + "SteampunkBookcase": "Стимпанковый книжный шкаф", + "SteampunkCandelabra": "Стимпанковый канделябр", + "SteampunkCandle": "Стимпанковая свеча", + "SteampunkChandelier": "Стимпанковая люстра", + "SteampunkChest": "Стимпанковый сундук", + "SteampunkClock": "Стимпанковые часы", + "SteampunkCup": "Чаша", + "SteampunkDresser": "Стимпанковая тумбочка", + "SteampunkLamp": "Стимпанковая лампа", + "SteampunkLantern": "Стимпанковый фонарь", + "SteampunkPiano": "Стимпанковое пианино", + "SteampunkPlatform": "Стимпанковая платформа", + "SteampunkSink": "Стимпанковая раковина", + "SteampunkWorkBench": "Стимпанковый верстак", + "StickyDynamite": "Липкий динамит", + "StickyGrenade": "Липкая граната", + "Stopwatch": "Секундомер", + "StrangeBrew": "Странный отвар", + "StrangePlant1": "Странное растение", + "StrangePlant2": "Странное растение", + "StrangePlant3": "Странное растение", + "StrangePlant4": "Странное растение", + "StylistKilLaKillScissorsIWish": "Стильные ножницы", + "SummonerEmblem": "Эмблема призывателя", + "Sundial": "Зачарованные солнечные часы", + "SunMask": "Маска солнца", + "SuperAbsorbantSponge": "Супервпитывающая губка", + "SuperHealingPotion": "Превосходное лечебное зелье", + "SuspiciousLookingTentacle": "Подозрительно выглядящее щупальце", + "SwordfishTrophy": "Трофей рыбы-меча", + "TallGate": "Высокие врата", + "TallyCounter": "Числовой счетчик", + "TargetDummy": "Манекен-мишень", + "TartarSauce": "Соус тартар", + "TaxCollectorHat": "Шляпа сборщика налогов", + "TaxCollectorPants": "Штаны сборщика налогов", + "TaxCollectorsStickOfDoom": "Шикарная трость", + "TaxCollectorSuit": "Костюм сборщика налогов", + "TealString": "Бирюзовая нитка", + "TeamBlockBlue": "Блок команды синих", + "TeamBlockBluePlatform": "Платформа команды синих", + "TeamBlockGreen": "Блок команды зеленых", + "TeamBlockGreenPlatform": "Платформа команды зеленых", + "TeamBlockPink": "Блок команды розовых", + "TeamBlockPinkPlatform": "Платформа команды розовых", + "TeamBlockRed": "Блок команды красных", + "TeamBlockRedPlatform": "Платформа команды красных", + "TeamBlockWhite": "Блок команды белых", + "TeamBlockWhitePlatform": "Платформа команды белых", + "TeamBlockYellow": "Блок команды желтых", + "TeamBlockYellowPlatform": "Платформа команды желтых", + "TempestStaff": "Посох бури", + "TendonHook": "Сухожилистый крюк", + "Terrarian": "Террариан", + "TheBrideDress": "Свадебное платье", + "TheBrideHat": "Свадебная фата", + "TheEyeOfCthulhu": "Глаз Ктулху", + "ThePossessedBanner": "Знамя одержимой", + "ThornHook": "Колючий крюк", + "TinPlating": "Оловянная пластина", + "TinPlatingWall": "Стена из оловянной пластины", + "TombCrawlerBanner": "Знамя ползуна гробниц", + "TopazGemsparkWall": "Стена из топазовых блоков", + "TopazGemsparkWallOff": "Выключенная стена из топазовых блоков", + "ToxicFlask": "Колба с токсинами", + "Toxikarp": "Токсичный карп", + "Trapdoor": "Люк", + "TruffleWorm": "Трюфельный червь", + "Tsunami": "Цунами", + "TsunamiInABottle": "Цунами в бутылке", + "TumbleweedBanner": "Знамя злобного хватателя", + "TwilightDye": "Сумеречный краситель", + "TwilightHairDye": "Сумеречная краска для волос", + "TwinMask": "Маска Близнецов", + "TwinsBossBag": "Мешок с сокровищами", + "UndeadVikingStatue": "Статуя скелета-викинга", + "UnicornStatue": "Статуя единорога", + "UnicornWispDye": "Краситель единорога-духа", + "ValkyrieYoyo": "Йо-йо валькирии", + "Valor": "Доблесть", + "ViciousMushroom": "Порочный гриб", + "ViciousPowder": "Порочная пыль", + "VineRope": "Лоза", + "VineRopeCoil": "Моток лозы", + "VioletString": "Фиолетовая нитка", + "VoidDye": "Краситель пустоты", + "VortexAxe": "Топор вихря", + "VortexBeater": "Пушка вихря", + "VortexBreastplate": "Нагрудник вихря", + "VortexChainsaw": "Бензопила вихря", + "VortexDrill": "Бур вихря", + "VortexDye": "Вихревой краситель", + "VortexHammer": "Молот вихря", + "VortexHelmet": "Шлем вихря", + "VortexHornetBanner": "Знамя шершня чужих", + "VortexHornetQueenBanner": "Знамя матки чужих", + "VortexLarvaBanner": "Знамя личинки чужого", + "VortexLeggings": "Ботинки вихря", + "VortexMonolith": "Монолит вихря", + "VortexPickaxe": "Кирка вихря", + "VortexRiflemanBanner": "Знамя штормопроходца", + "VortexSoldierBanner": "Знамя вихревика", + "WalkingAntlionBanner": "Знамя пустынного муравья", + "WallAnchor": "Настенный якорь", + "WallCreeperStatue": "Статуя стенного ползуна", + "WallOfFleshBossBag": "Мешок с сокровищами", + "WandofSparking": "Жезл искр", + "WarTable": "Стол войны", + "WarTableBanner": "Знамя стола войны", + "WaterfallBlock": "Водопадный блок", + "WaterleafPlanterBox": "Кадка для воднолиста", + "WeaponRack": "Оружейная стойка", + "WeatherRadio": "Погодное радио", + "WebRope": "Веревка из паутины", + "WebRopeCoil": "Моток веревки из паутины", + "WeightedPressurePlateCyan": "Голубая утяжеленная нажимная плита", + "WeightedPressurePlateOrange": "Оранжевая утяжеленная нажимная плита", + "WeightedPressurePlatePink": "Розовая утяжеленная нажимная плита", + "WeightedPressurePlatePurple": "Пурпурная утяжеленная нажимная плита", + "WhiteLunaticHood": "Капюшон солнечного культиста", + "WhiteLunaticRobe": "Роба солнечного культиста", + "WhitePhasesaber": "Белый световой меч", + "WhiteString": "Белая нитка", + "WineGlass": "Бокал для вина", + "WingsNebula": "Мантия туманности", + "WingsSolar": "Солнечные крылья", + "WingsStardust": "Крылья звездной пыли", + "WingsVortex": "Вихревой ускоритель", + "WireBulb": "Проводная лампа", + "WireKite": "Великий план", + "WirePipe": "Распределительная коробка", + "WispDye": "Краситель духа", + "WoodenSink": "Деревянная раковина", + "WoodYoyo": "Деревянный йо-йо", + "WormholePotion": "Зелье червоточины", + "WormHook": "Крюк-червь", + "WormScarf": "Шарф-червь", + "WormStatue": "Статуя червя", + "WraithStatue": "Статуя призрака", + "Xenopopper": "Ксенопушка", + "XenoStaff": "Ксено-посох", + "Yelets": "Елец", + "YellowCounterweight": "Желтый противовес", + "YellowPhasesaber": "Желтый световой меч", + "YellowString": "Желтая нитка", + "YellowWrench": "Желтый гаечный ключ", + "Yoraiz0rDarkness": "Угрюмый вид Yoraiz0r", + "Yoraiz0rHead": "Очки Yoraiz0r", + "Yoraiz0rPants": "Юбка Yoraiz0r", + "Yoraiz0rShirt": "Униформа Yoraiz0r", + "Yoraiz0rWings": "Заклятие Yoraiz0r", + "YoyoBag": "Рюкзак для йо-йо", + "YoYoGlove": "Перчатка для йо-йо", + "ZombieArmStatue": "Статуя вооруженного зомби", + "AleThrowingGlove": "Элемёт", + "ApprenticeAltHead": "Шляпа темного мастера", + "ApprenticeAltPants": "Ботинки темного мастера", + "ApprenticeAltShirt": "Мантия темного мастера", + "ApprenticeStaffT3": "Ярость Бетси", + "BetsyWings": "Крылья Бетси", + "BookStaff": "Книга бесконечной мудрости", + "BossMaskBetsy": "Маска Бетси", + "BossMaskDarkMage": "Маска темного мага", + "BossMaskOgre": "Маска огра", + "BossTrophyBetsy": "Трофей Бетси", + "BossTrophyDarkmage": "Трофей темного мага", + "BossTrophyOgre": "Трофей огра", + "CrystalBathtub": "Хрустальная ванна", + "CrystalBed": "Хрустальная кровать", + "CrystalBookCase": "Хрустальный книжный шкаф", + "CrystalCandelabra": "Хрустальный канделябр", + "CrystalCandle": "Хрустальная свеча", + "CrystalChair": "Хрустальный стул", + "CrystalChandelier": "Хрустальная люстра", + "CrystalChest": "Хрустальный сундук", + "CrystalClock": "Хрустальные часы", + "CrystalDoor": "Хрустальная дверь", + "CrystalDresser": "Хрустальная тумбочка", + "CrystalLamp": "Хрустальная лампа", + "CrystalLantern": "Хрустальный фонарь", + "CrystalPiano": "Хрустальное пианино", + "CrystalPlatform": "Хрустальная платформа", + "CrystalSink": "Хрустальная раковина", + "CrystalSofaHowDoesThatEvenWork": "Хрустальный диван", + "CrystalTable": "Хрустальный стол", + "CrystalWorkbench": "Хрустальный верстак", + "DD2BallistraTowerT1Popper": "Жезл баллисты", + "DD2BallistraTowerT2Popper": "Трость баллисты", + "DD2BallistraTowerT3Popper": "Посох баллисты", + "DD2BetsyBow": "Воздушное проклятие", + "DD2DrakinBanner": "Знамя дракина", + "DD2ElderCrystal": "Этерианский кристалл", + "DD2ElderCrystalStand": "Стенд для этерианского кристалла", + "DD2EnergyCrystal": "Этерианская мана", + "DD2ExplosiveTrapT1Popper": "Жезл ловушки со взрывчаткой", + "DD2ExplosiveTrapT2Popper": "Трость ловушки со взрывчаткой", + "DD2ExplosiveTrapT3Popper": "Посох ловушки со взрывчаткой", + "DD2FlameburstTowerT1Popper": "Огнеметный жезл", + "DD2FlameburstTowerT2Popper": "Огнеметная трость", + "DD2FlameburstTowerT3Popper": "Огнеметный посох", + "DD2GoblinBanner": "Знамя этерианского гоблина", + "DD2GoblinBomberBanner": "Знамя этерианского гоблина-бомбардира", + "DD2JavelinThrowerBanner": "Знамя этерианского копьеметателя", + "DD2KoboldBanner": "Знамя кобольда", + "DD2KoboldFlyerBanner": "Знамя кобольда на глайдере", + "DD2LightningAuraT1Popper": "Жезл Ауры света", + "DD2LightningAuraT2Popper": "Трость Ауры света", + "DD2LightningAuraT3Popper": "Посох Ауры света", + "DD2LightningBugBanner": "Знамя этерианского светляка", + "DD2PetDragon": "Яйцо дракона", + "DD2PetGato": "Яйцо кота", + "DD2PetGhost": "Яйцо ползуна", + "DD2PhoenixBow": "Призрачный феникс", + "DD2SkeletonBanner": "Знамя скелета Старца", + "DD2SquireBetsySword": "Летающий дракон", + "DD2SquireDemonSword": "Адское клеймо", + "DD2WitherBeastBanner": "Знамя усохшего чудовища", + "DD2WyvernBanner": "Знамя этерианской виверны", + "DungeonClockBlue": "Синие часы темницы", + "DungeonClockGreen": "Зеленые часы темницы", + "DungeonClockPink": "Розовые часы темницы", + "DynastyDresser": "Родовая тумбочка", + "DynastyPiano": "Родовое пианино", + "DynastySofa": "Родовой диван", + "Fake_CrystalChest": "Фальшивый хрустальный сундук", + "Fake_GoldenChest": "Фальшивый золотой сундук", + "FleshPlatform": "Платформа из плоти", + "FrozenDresser": "Замороженная тумбочка", + "FrozenPlatform": "Замороженная платформа", + "GoldenChest": "Золотой сундук", + "GoldenPlatform": "Золотая платформа", + "GoldenWorkbench": "Золотой верстак", + "HuntressAltHead": "Красный капюшон наездника", + "HuntressAltPants": "Красные штаны наездника", + "HuntressAltShirt": "Красный костюм наездника", + "LihzahrdPlatform": "Платформа ящщеров", + "LivingWoodDresser": "Тумбочка из живой древесины", + "MonkAltHead": "Шлем лазутчика Шиноби", + "MonkAltPants": "Штаны лазутчика Шиноби", + "MonkAltShirt": "Нагрудник лазутчика Шиноби", + "MonkStaffT1": "Сонный осьминог", + "MonkStaffT2": "Жуткая глефа", + "MonkStaffT3": "Ярость небесного дракона", + "SquireAltHead": "Шлем рыцаря из Валгаллы", + "SquireAltPants": "Поножи рыцаря из Валгаллы", + "SquireAltShirt": "Нагрудник рыцаря из Валгаллы", + "SkywareClock2": "Часы солнечного диска", + "LeinforsHat": "Средство для защиты волос Линфорса", + "LeinforsShirt": "Излишний стиль Линфорса", + "LeinforsPants": "Модные штаны Линфорса", + "LeinforsWings": "Цепкая накидка Линфорса", + "LeinforsAccessory": "Модный шампунь Линфорса", + "GraniteGolemBanner": "Знамя гранитного голема", + "RavagerScorpionBanner": "Знамя песчаного браконьера", + "MusicBoxDD2": "Музыкальная шкатулка (Армия Старца)", + "BossBagBetsy": "{$ItemName.SkeletronBossBag}" + }, + "ItemTooltip": { + "ShadowGreaves": "Увеличивает скорость ближнего боя на 7 %", + "ConfettiGun": "Выстреливает конфетти повсюду!", + "ChlorophyteMask": "Увеличивает урон в ближнем бою на 16 %\nУвеличивает шанс критического удара в ближнем бою на 6 %", + "ChlorophyteHelmet": "Увеличивает дистанционный урон на 16 %\nШанс 20 % не потратить боеприпасы", + "ChlorophyteHeadgear": "Увеличивает максимальный запас маны на 80 и уменьшает использование маны на 17 %\nУвеличивает магический урон на 16 %", + "ChlorophytePlateMail": "Увеличивает урон на 5 %\nУвеличивает шанс критического удара на 7 %", + "ChlorophyteGreaves": "Увеличивает критический урон на 8 %\nУвеличивает скорость движения на 5 %", + "ChlorophyteBar": "Реагирует на свет", + "ShadowScalemail": "Увеличивает скорость ближнего боя на 7 %", + "ShadowHelmet": "Увеличивает скорость ближнего боя на 7 %", + "NightmarePickaxe": "Позволяет добывать адский камень", + "Paintbrush": "Используется с краской, чтобы красить блоки", + "PaintRoller": "Используется с краской, чтобы красить стены", + "ManaCrystal": "Навсегда увеличивает максимум маны на 20", + "GolfBallDyedPink": "{$CommonItemTooltip.GolfBall}", + "TealMushroom": "Используется для приготовления бирюзового красителя", + "GreenMushroom": "Используется для приготовления зеленого красителя", + "SkyBlueFlower": "Используется для приготовления небесно-синего красителя", + "BandofStarpower": "Увеличивает максимум маны на 20", + "YellowMarigold": "Используется для приготовления желтого красителя", + "BlueBerries": "Используется для приготовления синего красителя", + "LimeKelp": "Используется для приготовления лаймового красителя", + "PinkPricklyPear": "Используется для приготовления розового красителя", + "OrangeBloodroot": "Используется для приготовления оранжевого красителя", + "RedHusk": "Используется для приготовления красного красителя", + "CyanHusk": "Используется для приготовления голубого красителя", + "VioletHusk": "Используется для приготовления фиолетового красителя", + "PurpleMucos": "Используется для приготовления пурпурного красителя", + "BlackInk": "Используется для приготовления черного красителя", + "FlowerofFire": "Метает огненные шары", + "DyeVat": "Используется для изготовления красителей", + "BeeGun": "Стреляет пчелами, которые атакуют вашего врага", + "PossessedHatchet": "Атакует вашего врага", + "BeeKeeper": "Призывает пчел-убийц, которые атакую вашего врага\nНебольшой шанс вызвать запутанность", + "HiveWand": "Помещает блоки улья", + "MagicMissile": "Запускает управляемую ракету", + "Beenade": "Взрывается роем пчел", + "GravityGlobe": "Позволяет владельцу изменять гравитацию\nНажмите ВВЕРХ, чтобы изменить гравитацию", + "KiteRed": "{$CommonItemTooltip.Kite}", + "Abeemination": "Призывает королеву пчел", + "DirtRod": "Волшебным образом перемещает землю", + "TempleKey": "Открывает дверь храма джунглей", + "LihzahrdWorkBench": "Используется в базовых рецептах", + "ShadowOrb": "Создает волшебную теневую сферу", + "LihzahrdPressurePlate": "Активируется при нажатии игроком", + "PiranhaGun": "Цепляется за врага и наносит продолжительный урон", + "PygmyStaff": "Призывает пигмея, который сражается за вас", + "KiteBlueAndYellow": "{$CommonItemTooltip.Kite}", + "KiteBlue": "{$CommonItemTooltip.Kite}", + "KiteWyvern": "{$CommonItemTooltip.Kite}", + "GroxTheGreatGreaves": "{$CommonItemTooltip.DevItem}", + "LeafWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BlizzardinaBalloon": "Позволяет владельцу делать двойной прыжок\nУвеличивает высоту прыжка", + "BundleofBalloons": "Позволяет владельцу прыгать четыре раза\nУвеличивает высоту прыжка", + "BatWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "HerculesBeetle": "Увеличивает урон ваших питомцев на 15 %\nУвеличивает отбрасывание при атаках ваших питомцев", + "BoneKey": "Призывает детеныша головы Скелетрона", + "MeteoriteBar": "Теплый на ощупь", + "Nectar": "Призывает детеныша шершня", + "TikiTotem": "Призывает духа Тики", + "LizardEgg": "Призывает ручную ящерицу", + "LeafBlower": "Быстро стреляет острыми как бритва листьями", + "ChlorophyteBullet": "Атакует вашего врага", + "Hook": "Иногда остается после победы над скелетами и пираньями", + "ParrotCracker": "Призывает ручного попугая", + "StrangeGlowingMushroom": "Призывает детеныша трюфеля", + "Seedling": "Призывает растеньице", + "WispinaBottle": "Призывает духа, который дает свет", + "PalladiumPickaxe": "Может добывать мифрил и орихалк", + "PalladiumDrill": "Может добывать мифрил и орихалк", + "OrichalcumPickaxe": "Может добывать адамантит и титан", + "OrichalcumDrill": "Может добывать адамантит и титан", + "MoltenFury": "Зажигает деревянные стрелы", + "PalladiumMask": "Увеличивает урон в ближнем бою на 8 %\nУвеличивает скорость ближнего боя на 12 %", + "PalladiumHelmet": "Увеличивает дистанционный урон на 9 %\nУвеличивает шанс дистанционного критического удара на 9 %", + "PalladiumHeadgear": "Увеличивает на 7 % магический урон и шанс критического удара\nУвеличивает максимум маны на 60", + "PalladiumBreastplate": "Увеличивает урон на 3 %\nУвеличивает шанс критического удара на 2 %", + "PalladiumLeggings": "Увеличивает урон на 2 %\nУвеличивает шанс критического удара на 1 %", + "FieryGreatsword": "Это сделано из огня!", + "OrichalcumMask": "Увеличивает урон в ближнем бою на 7 %\nУвеличивает скорость движения и ближнего боя на 7 %", + "OrichalcumHelmet": "Увеличивает шанс дистанционного критического удара на 15 %\nУвеличивает скорость движения на 8 %", + "OrichalcumHeadgear": "Увеличивает шанс магического критического удара на 18 %\nУвеличивает максимум маны на 80", + "OrichalcumBreastplate": "Увеличивает шанс критического урона на 6 %", + "OrichalcumLeggings": "Увеличивает скорость движения на 11 %", + "TitaniumMask": "Увеличивает на 8 % урон в ближнем бою и шанс критического удара\nУвеличивает скорость ближнего боя на 8 %", + "TitaniumHelmet": "Увеличивает дистанционный урон на 16 %\nУвеличивает шанс критического дистанционного урона на 7 %", + "TitaniumHeadgear": "Увеличивает на 16 % магический урон и на 7 % шанс магического критического удара\nУвеличивает максимум маны на 100", + "TitaniumBreastplate": "Увеличивает урон на 4 %\nУвеличивает шанс критического урона на 3 %", + "TitaniumLeggings": "Увеличивает на 3 % урон и шанс критического удара\nУвеличивает скорость движения на 6 %", + "OrichalcumAnvil": "Используется для изготовления предметов из мифриловых, орихалковых, адамантитовых и титановых слитков", + "TitaniumForge": "Используется для плавки адамантитовой и титановой руды", + "ChlorophyteClaymore": "Стреляет мощной сферой", + "ChlorophyteSaber": "Выстреливает облаком спор", + "ChlorophytePartisan": "Выстреливает облаком спор", + "MeteorHelmet": "Увеличивает магический урон на 7 %", + "ChlorophyteArrow": "Отскакивает при ударе о стену", + "MeteorSuit": "Увеличивает магический урон на 7 %", + "AmberMosquito": "Призывает детеныша динозавра", + "NimbusRod": "Призывает облако дождя на ваших врагов", + "GroxTheGreatArmor": "{$CommonItemTooltip.DevItem}", + "EyeoftheGolem": "Увеличивает шанс критического удара на 10 %", + "HoneyBalloon": "Увеличивает высоту прыжка\nПри уроне выпускает пчел", + "MeteorLeggings": "Увеличивает магический урон на 7 %", + "BlueHorseshoeBalloon": "Позволяет владельцу делать двойной прыжок\nУвеличивает высоту прыжка и защищает от урона при падении", + "WhiteHorseshoeBalloon": "Позволяет владельцу делать двойной прыжок\nУвеличивает высоту прыжка и защищает от урона при падении", + "YellowHorseshoeBalloon": "Позволяет владельцу делать двойной прыжок\nУвеличивает высоту прыжка и защищает от урона при падении", + "OceanCrate": "{$CommonItemTooltip.RightClickToOpen}", + "SniperRifle": "Стреляет убойной высокоскоростной пулей\nНажмите , чтобы уменьшить масштаб", + "VenusMagnum": "Стреляет убойной высокоскоростной пулей", + "CrimsonRod": "Призывает облако крови на ваших врагов", + "SteampunkWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsVortex": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "RainbowGun": "Стреляет радугой, которая наносит продолжительный урон", + "StyngerBolt": "Взрывается смертоносными осколками", + "FlowerofFrost": "Стреляет морозным шаром", + "Uzi": "Стреляет убойной высокоскоростной пулей", + "RocketBoots": "Позволяет летать", + "AmethystRobe": "Увеличивает максимум маны на 20\nУменьшает использование маны на 5 %", + "TopazRobe": "Увеличивает максимум маны на 40\nУменьшает использование маны на 7 %", + "SapphireRobe": "Увеличивает максимум маны на 40\nУменьшает использование маны на 9 %", + "EmeraldRobe": "Увеличивает максимум маны на 60\nУменьшает использование маны на 11 %", + "RubyRobe": "Увеличивает максимум маны на 60\nУменьшает использование маны на 13 %", + "DiamondRobe": "Увеличивает максимум маны на 80\nУменьшает использование маны на 15 %", + "GroxTheGreatHelm": "{$CommonItemTooltip.DevItem}", + "LifeFruit": "Навсегда увеличивает максимальный уровень жизни на 5", + "LihzahrdPowerCell": "Используется на алтаре ящщеров", + "Picksaw": "Может добывать кирпичи ящеров", + "JimsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "StaffofEarth": "Призывает большой валун", + "GolemFist": "Бьет с силой голема", + "Binoculars": "Увеличивает дальность обзора", + "RifleScope": "Увеличивает обзор для оружия\nНажмите , чтобы уменьшить масштаб", + "DestroyerEmblem": "Увеличивает урон на 10 %\nУвеличивает критический урон на 8 %", + "JellyfishNecklace": "Дает свет под водой", + "IceSickle": "Бросает ледяную косу", + "ClothierVoodooDoll": "Ты ужасный человек.", + "PoisonStaff": "Стреляет отравленным клыком, который пронизывает несколько врагов", + "SlimeStaff": "Призывает слизнячка, который сражается за вас", + "PoisonDart": "Накладывает на врагов эффект отравления", + "EyeSpring": "Призывает прыгающий глаз", + "ToySled": "Призывает детеныша снеговика", + "BookofSkulls": "Стреляет черепом", + "KOCannon": "Стреляет боксерской перчаткой", + "PirateMap": "Вызывает нашествие пиратов", + "TurtleHelmet": "Увеличивает урон в ближнем бою на 6 %\nВраги с большей вероятностью атакуют вас", + "TurtleScaleMail": "Увеличивает на 8 % урон в ближнем бою и шанс критического удара\nВраги с большей вероятностью атакуют вас", + "TurtleLeggings": "Увеличивает шанс критического удара в ближнем бою на 4 %\nВраги с большей вероятностью атакуют вас", + "KiteWorldFeeder": "{$CommonItemTooltip.Kite}", + "OasisCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "ObsidianRose": "Снижает урон от прикосновения к лаве", + "RodofDiscord": "Телепортирует на позицию мыши", + "DeathSickle": "Бросает косу смерти", + "BloodySpine": "Призывает Мозг Ктулху", + "Ichor": "Кровь богов", + "IchorTorch": "Можно поместить в воду", + "IchorArrow": "Снижает защиту цели", + "IchorBullet": "Снижает защиту цели", + "GoldenShower": "Распыляет душ ихора\nСнижает защиту цели", + "OasisCrate": "{$CommonItemTooltip.RightClickToOpen}", + "ImbuingStation": "Используется для создания флаконов для усиления оружия", + "EmptyBullet": "Используется для создания различных боеприпасов", + "ShadowbeamStaff": "Создает луч тени, который отражается от стен", + "InfernoFork": "Запускает шар огня, который при попадании разлетается адским пламенем", + "SpectreStaff": "Призывает потерянную душу, которая атакует ваших врагов", + "BubbleMachine": "Выдувает мыльные пузыри", + "BubbleWand": "Выдувает мыльные пузыри", + "WaterCandle": "Держащий это может привлечь нежелательное внимание", + "Book": "Содержит странные символы", + "CopperWatch": "Сообщает время", + "SpectreHood": "Уменьшает на 40 % магический урон", + "SpectreRobe": "Увеличивает на 7 % магический урон и шанс критического удара", + "SpectrePants": "Увеличивает магический урон на 8 %\nУвеличивает скорость движения на 8 %", + "NecroHelmet": "Увеличивает дистанционный урон на 5 %.", + "PaladinsHammer": "Мощный возвращающийся молот", + "BeeWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "NecroBreastplate": "Увеличивает дистанционный урон на 5 %.", + "LargeAmethyst": "Для игры «Поймай самоцвет». Падает, когда вы умираете.", + "LargeTopaz": "Для игры «Поймай самоцвет». Падает, когда вы умираете.", + "LargeSapphire": "Для игры «Поймай самоцвет». Падает, когда вы умираете.", + "LargeEmerald": "Для игры «Поймай самоцвет». Падает, когда вы умираете.", + "LargeRuby": "Для игры «Поймай самоцвет». Падает, когда вы умираете.", + "LargeDiamond": "Для игры «Поймай самоцвет». Падает, когда вы умираете.", + "NecroGreaves": "Увеличивает дистанционный урон на 5 %.", + "JungleKey": "Открывает сундук джунглей в Темнице", + "CorruptionKey": "Открывает сундук порчи в Темнице", + "CrimsonKey": "Открывает багровый сундук в Темнице", + "HallowedKey": "Открывает сундук освящения в Темнице", + "Cherry": "{$CommonItemTooltip.MinorStats}", + "SpectrePaintbrush": "Используется с краской, чтобы красить блоки", + "SpectrePaintRoller": "Используется с краской, чтобы красить стены", + "GolfBallDyedOrange": "{$CommonItemTooltip.GolfBall}", + "ShroomiteHeadgear": "Увеличивает урон от стрел на 15 %\nУвеличивает шанс дистанционного критического удара на 5 %", + "ShroomiteMask": "Увеличивает урон от пуль на 15 %\nУвеличивает шанс дистанционного критического удара на 5 %", + "ShroomiteHelmet": "Увеличивает урон от ракет на 15 %\nУвеличивает шанс дистанционного критического удара на 5 %", + "KiteBoneSerpent": "{$CommonItemTooltip.Kite}", + "ShroomiteLeggings": "Увеличивает шанс критического дистанционного урона на 7 %\nУвеличивает скорость движения на 12 %", + "Autohammer": "Преобразует хлорофитовые слитки в грибные", + "Jetpack": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressUpToBooster}", + "CenxsTiara": "{$CommonItemTooltip.DevItem}", + "CenxsBreastplate": "{$CommonItemTooltip.DevItem}", + "CenxsLeggings": "{$CommonItemTooltip.DevItem}", + "CrownosMask": "{$CommonItemTooltip.DevItem}", + "CrownosBreastplate": "{$CommonItemTooltip.DevItem}", + "CrownosLeggings": "{$CommonItemTooltip.DevItem}", + "CobaltShield": "Дает невосприимчивость к отбрасыванию", + "WillsHelmet": "{$CommonItemTooltip.DevItem}", + "WillsBreastplate": "{$CommonItemTooltip.DevItem}", + "WillsLeggings": "{$CommonItemTooltip.DevItem}", + "JimsHelmet": "{$CommonItemTooltip.DevItem}", + "JimsBreastplate": "{$CommonItemTooltip.DevItem}", + "JimsLeggings": "{$CommonItemTooltip.DevItem}", + "AaronsHelmet": "{$CommonItemTooltip.DevItem}", + "AaronsBreastplate": "{$CommonItemTooltip.DevItem}", + "AaronsLeggings": "{$CommonItemTooltip.DevItem}", + "VampireKnives": "Быстро метает клинки, похищающие жизнь", + "AquaScepter": "Распыляет поток воды", + "ScourgeoftheCorruptor": "Мощное копье, которое выпускает маленьких пожирателей", + "Banana": "{$CommonItemTooltip.MinorStats}", + "SweetheartNecklace": "При уроне выпускает пчел и увеличивает скорость движения", + "FlurryBoots": "Носитель может бегать супербыстро", + "LuckyHorseshoe": "Нейтрализует урон от падения", + "DTownsHelmet": "{$CommonItemTooltip.DevItem}", + "DTownsBreastplate": "{$CommonItemTooltip.DevItem}", + "DTownsLeggings": "{$CommonItemTooltip.DevItem}", + "GroxTheGreatWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "StillLife": "{$PaintingArtist.Crowno}", + "BloodyGoblet": "{$PaintingArtist.Crowno}", + "WickedUndead": "{$PaintingArtist.Crowno}", + "CenxsDress": "{$CommonItemTooltip.DevItem}", + "CenxsDressPants": "{$CommonItemTooltip.DevItem}", + "ShinyRedBalloon": "Увеличивает высоту прыжка", + "MagicCuffs": "Увеличивает максимум маны на 20\nПри уроне восстанавливает ману", + "SilverWatch": "Сообщает время", + "AnkhCharm": "Дает иммунитет к большинству ослаблений", + "AnkhShield": "Дает иммунитет к отбрасыванию и огненным блокам\nДает иммунитет к большинству ослаблений", + "WaterBolt": "Создает медленно движущийся водяной выстрел", + "GolfBall": "{$CommonItemTooltip.GolfBall}", + "Dynamite": "Сильный взрыв, уничтожающий большинство плиток", + "Grenade": "Небольшой взрыв, не уничтожающий плитки", + "GoldWatch": "Сообщает время", + "FartinaJar": "Позволяет владельцу делать двойной прыжок", + "HellstoneBar": "Горячий на ощупь", + "LeprechaunHat": "Для меня это выглядит, как лепрекон", + "LeprechaunShirt": "Я просто хочу знать, где золото!", + "LeprechaunPants": "Я хочу золото. Я хочу золото. Я хочу золото. Гони золото!", + "GoodieBag": "{$CommonItemTooltip.RightClickToOpen}", + "CandyCornRifle": "Шанс 33 % не потратить боеприпасы", + "Sickle": "Позволяет собирать сено из травы", + "KiteAngryTrapper": "{$CommonItemTooltip.Kite}", + "TatteredFairyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "SpiderEgg": "Призывает ручного паука", + "MagicalPumpkinSeed": "Призывает ручную тыковку", + "DepthMeter": "Показывает глубину", + "BatScepter": "Призывает летучую мышь, которая атакует ваших врагов", + "RavenStaff": "Призывает ворона, который сражается за вас", + "JungleKeyMold": "Используется для создания ключа джунглей", + "CorruptionKeyMold": "Используется для создания ключа порчи", + "CrimsonKeyMold": "Используется для создания багрового ключа", + "HallowedKeyMold": "Используется для создания ключа освящения", + "FrozenKeyMold": "Используется для создания замороженного ключа", + "RottenEgg": "Лучше всего подходит, чтобы нервировать горожан", + "UnluckyYarn": "Призывает черного котенка", + "TheHorsemansBlade": "Призывает тыквы, которые атакуют ваших врагов", + "SpookyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "GhostManifestation": "{$PaintingArtist.Crowno}", + "Graveyard": "{$PaintingArtist.Crowno}", + "Reborn": "{$PaintingArtist.Crowno}", + "CursedSapling": "Вызывает проклятое растеньице, которое следует за вами", + "PumpkinMoonMedallion": "Вызывает тыквенную луну", + "Nevermore": "{$PaintingArtist.Crowno}", + "SniperScope": "Увеличивает обзор для оружия (нажмите , чтобы отдалить)\nУвеличивает на 10 % дистанционный урон и шанс критического удара", + "BreathingReed": "Увеличивает время дыхания и позволяет дышать в воде", + "JellyfishDivingGear": "Дает способность плавать и значительно увеличивает время дыхания под водой\nДает свет под водой", + "ArcticDivingGear": "Дает способность плавать и значительно увеличивает время дыхания под водой\nДает свет под водой и увеличивает подвижность на льду", + "GnomeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Gnome}", + "FartInABalloon": "Позволяет владельцу делать двойной прыжок\nУвеличивает высоту прыжка", + "DandelionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Dandelion}", + "GolfPainting3": "{$PaintingArtist.Crowno}", + "ArkhalisWings": "{$ItemTooltip.ArkhalisHat}\n{$CommonItemTooltip.FlightAndSlowfall}", + "Present": "{$CommonItemTooltip.RightClickToOpen}", + "Flipper": "Дает возможность плавать", + "RedRyder": "Не выстрелите себе в глаз!", + "FestiveWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BladeofGrass": "Имеет шанс отравить врагов", + "EldMelter": "Использует гель в качестве боеприпасов", + "KiteGoldfish": "{$CommonItemTooltip.Kite}", + "ReindeerBells": "Призывает ездового оленя", + "CnadyCanePickaxe": "Может добывать метеорит", + "KiteBunnyCrimson": "{$CommonItemTooltip.Kite}", + "KiteBunnyCorrupt": "{$CommonItemTooltip.Kite}", + "HandWarmer": "Дает невосприимчивость к охлаждению и заморозке", + "Coal": "В этом году вы вели себя плохо.", + "GolfPainting2": "{$PaintingArtist.Crowno}", + "DogWhistle": "Призывает щенка", + "ChristmasTreeSword": "Стреляет новогодними узорами", + "ChainGun": "Шанс 50 % не потратить боеприпасы", + "ObsidianSkull": "Дает невосприимчивость к огненным блокам", + "Razorpine": "Стреляет бритвенно-острыми сосновыми иголками", + "BlizzardStaff": "Вызывает дождь сосулек", + "SnowmanCannon": "Стреляет самонаводящимися ракетами", + "NorthPole": "Стреляет ледяным копьем, их которого сыплются снежинки", + "NaughtyPresent": "Вызывает морозную луну", + "BabyGrinchMischiefWhistle": "Призывает малыша Гринча", + "StarCannon": "Стреляет падающими звездами", + "Fez": "Фески крутые", + "JungleRose": "Это так мило, так мило", + "FeralClaws": "Увеличивает скорость ближнего боя на 12 %", + "AnkletoftheWind": "Увеличивает скорость движения на 10 %", + "GolfClubIron": "{$CommonItemTooltip.GolfIron}", + "WhoopieCushion": "Может докучать людям", + "HeavyWorkBench": "Используется в продвинутых рецептах", + "AmmoBox": "Уменьшает использование боеприпасов на 20 %", + "Flamelash": "Призывает управляемый огненный выстрел", + "VenomStaff": "Стреляет ядовитыми клыками, которые пронзают нескольких врагов", + "SpectreMask": "Увеличивает максимальный запас маны на 60 и уменьшает использование маны на 13 %\nУвеличивает на 5 % магический урон и шанс критического удара", + "BoneWelder": "{$CommonItemTooltip.SpecialCrafting}", + "FleshCloningVaat": "{$CommonItemTooltip.SpecialCrafting}", + "GlassKiln": "{$CommonItemTooltip.SpecialCrafting}", + "LihzahrdFurnace": "{$CommonItemTooltip.SpecialCrafting}", + "LivingLoom": "{$CommonItemTooltip.SpecialCrafting}", + "SkyMill": "{$CommonItemTooltip.SpecialCrafting}", + "IceMachine": "{$CommonItemTooltip.SpecialCrafting}", + "BeetleHelmet": "Увеличивает урон в ближнем бою на 6 %\nВраги с большей вероятностью атакуют вас", + "BeetleScaleMail": "Увеличивает на 8 % урон в ближнем бою и шанс критического удара\nУвеличивает скорость движения и ближнего боя на 6 %", + "BeetleShell": "Увеличивает на 5 % урон в ближнем бою и шанс критического удара\nВраги с большей вероятностью атакуют вас", + "BeetleLeggings": "Увеличивает скорость движения и ближнего боя на 6 %\nВраги с большей вероятностью атакуют вас", + "SteampunkBoiler": "{$CommonItemTooltip.SpecialCrafting}", + "HoneyDispenser": "{$CommonItemTooltip.SpecialCrafting}", + "BrickLayer": "Увеличивает скорость установки плитки", + "GolfPainting1": "{$PaintingArtist.Crowno}", + "PaintSprayer": "Автоматически красит установленные предметы", + "PortableCementMixer": "Увеличивает скорость установки стен", + "CelestialMagnet": "Увеличивает дистанцию взятия звезд маны", + "ClayPot": "Выращивает растения", + "CelestialEmblem": "Увеличивает дистанцию взятия звезд маны\nУвеличивает магический урон на 15 %", + "CelestialCuffs": "Увеличивает дистанцию взятия звезд маны\nПри уроне восстанавливает ману", + "PulseBow": "Стреляет заряженными стрелами", + "NaturesGift": "Снижает использование маны на 6 %", + "KiteSandShark": "{$CommonItemTooltip.Kite}", + "KiteShark": "{$CommonItemTooltip.Kite}", + "RestorationPotion": "Уменьшает время восстановления после употребления зелья", + "Gatligator": "Шанс 50 % не потратить боеприпасы\nКрайне низкая точность", + "WaterGun": "Брызгает безобидной струйкой воды", + "MagicHat": "Увеличивает на 7 % магический урон и шанс критического удара", + "Gi": "Увеличивает на 5 % урон и шанс критического удара\nУвеличивает скорость ближнего боя и передвижения на 10 %", + "GypsyRobe": "Увеличивает на 6 % магический урон и шанс критического удара\nУменьшает использование маны на 10 %", + "JungleHat": "Увеличивает максимум маны на 40\nУвеличивает шанс критического магического урона на 4 %", + "BeetleWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "JungleShirt": "Увеличивает максимум маны на 20\nУвеличивает шанс критического магического урона на 4 %", + "Gel": "Вкусный и огнеопасный", + "JunglePants": "Увеличивает максимум маны на 20\nУвеличивает шанс критического магического урона на 4 %", + "NeonTetra": "За эти цветные чешуйки можно неплохо выручить.", + "Grapefruit": "{$CommonItemTooltip.MinorStats}", + "MiningPotion": "Увеличивает скорость добычи руды на 25 %", + "HeartreachPotion": "Увеличивает дистанцию взятия сердец жизни", + "DungeonFishingCrateHard": "{$ItemTooltip.DungeonFishingCrate}", + "BuilderPotion": "Увеличивает скорость и дистанцию установки", + "TitanPotion": "Увеличивает отбрасывание", + "FlipperPotion": "Позволяет быстро двигаться в жидкостях", + "DivineEye": "{$PaintingArtist.Darthkitten}", + "TrapsightPotion": "Позволяет видеть ближайшие опасные места", + "WoodenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "IronCrate": "{$CommonItemTooltip.RightClickToOpen}", + "GoldenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "AmmoReservationPotion": "Шанс 20 % не потратить боеприпасы", + "LifeforcePotion": "Увеличивает макс. уровень здоровья на 20 %", + "EndurancePotion": "Получаемый урон снижен на 10 %", + "RagePotion": "Увеличивает шанс критического удара на 10 %", + "InfernoPotion": "Поджигает ближайших врагов", + "WrathPotion": "Увеличивает урон на 10 %", + "GolfClubDriver": "{$CommonItemTooltip.GolfDriver}", + "RecallPotion": "Телепортирует вас домой", + "TeleportationPotion": "Телепортирует вас в случайное место", + "LovePotion": "Бросьте это, чтобы заставить кого-то влюбиться", + "StinkPotion": "Бросьте это, чтобы заставить кого-то ужасно пахнуть", + "BandageBoy": "{$PaintingArtist.Darthkitten}", + "SonarPotion": "Находит рыбу на крючке", + "CratePotion": "Увеличивает вероятность получить ящик", + "WarmthPotion": "Снижает урон от источников холода", + "VisitingThePyramids": "{$PaintingArtist.Leinfors}", + "Uluru": "{$PaintingArtist.darthmorf}", + "BeeGreaves": "Увеличивает урон питомца на 5 %", + "HornetStaff": "Призывает шершня, который сражается за вас", + "ImpStaff": "Призывает беса, который сражается за вас", + "Oasis": "{$PaintingArtist.Khaios}", + "LifeAboveTheSand": "{$PaintingArtist.Zoomo}", + "SnakesIHateSnakes": "{$PaintingArtist.Xman101}", + "Sunglasses": "Позволяет выглядеть круто!", + "TheSandsOfSlime": "{$PaintingArtist.Criddle}", + "JawsOfDeath": "{$PaintingArtist.Darthkitten}", + "BurningSpirit": "{$PaintingArtist.Zoomo}", + "HighTestFishingLine": "Леска никогда не порвется", + "FruitSalad": "{$CommonItemTooltip.MinorStats}", + "TackleBox": "Уменьшает вероятность использования гнили", + "WizardHat": "Увеличивает магический урон на 15 %", + "ZephyrFish": "Призывает воздушную рыбу", + "FrogLeg": "Увеличивает скорость прыжка и активирует автопрыжок\nУвеличивает стойкость к падению", + "Dragonfruit": "{$CommonItemTooltip.MediumStats}", + "KiteJellyfishPink": "{$CommonItemTooltip.Kite}", + "KiteJellyfishBlue": "{$CommonItemTooltip.Kite}", + "FinWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "OpticStaff": "Призывает близнецов, которые сражаются за вас", + "RedHat": "Пахнет прикольно…", + "Goldfish": "Улыбается, может быть хорошим перекусом.", + "Sandgun": "Это отличная идея!", + "GuideVoodooDoll": "Ты ужасный человек.", + "DivingHelmet": "Значительно увеличивает возможность дыхания под водой", + "DemonScythe": "Вызывает демоническую косу", + "Blowpipe": "Позволяет собирать семена для зарядов", + "Glowstick": "Работает при намокании", + "Seed": "Используется с духовой трубкой", + "Aglet": "Увеличивает скорость движения на 5 %", + "ObsidianSkinPotion": "Дает неуязвимость к лаве", + "RegenerationPotion": "Восстанавливает жизнь", + "LifeCrystal": "Навсегда увеличивает жизнь на 20", + "SwiftnessPotion": "Увеличивает скорость движения на 25 %", + "GillsPotion": "Позволяет дышать водой вместо воздуха", + "IronskinPotion": "Увеличивает защиту на 8", + "ManaRegenerationPotion": "Ускоряет регенерацию маны", + "MagicPowerPotion": "Увеличивает магический урон на 20 %", + "FeatherfallPotion": "Снижает скорость падения", + "SpelunkerPotion": "Показывает местоположение сокровищ и руды", + "InvisibilityPotion": "Дает невидимость", + "ShinePotion": "Излучает ауру света", + "NightOwlPotion": "Улучшает ночное зрение", + "BattlePotion": "Ускоряет воскрешение врагов", + "ThornsPotion": "Атакующие тоже получают урон", + "WaterWalkingPotion": "Позволяет ходить по воде", + "ArcheryPotion": "Увеличивает скорость полета и урон стрел на 20 %", + "HunterPotion": "Показывает местоположение врагов", + "GravitationPotion": "Позволяет управлять гравитацией", + "IllegalGunParts": "Под запретом в большинстве мест", + "GolfClubWedge": "{$CommonItemTooltip.GolfWedge}", + "BetsyWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "Furnace": "Используется для переплавки руды", + "Loom": "Используется для изготовления ткани", + "IronAnvil": "Используется для изготовления предметов из слитков металла", + "Keg": "Используется для приготовления эля", + "KiteManEater": "{$CommonItemTooltip.Kite}", + "WorkBench": "Используется в базовых рецептах", + "GoblinBattleStandard": "Призывает армию гоблинов", + "Sawmill": "Используется для создания продвинутых предметов из древесины", + "Pwnhammer": "Достаточно мощный, чтобы уничтожать алтари демонов", + "CobaltHat": "Увеличивает максимум маны на 40\nУвеличивает шанс критического магического урона на 9 %", + "CobaltHelmet": "Увеличивает скорость движения на 7 %\nУвеличивает скорость ближнего боя на 12 %", + "CobaltMask": "Увеличивает дистанционный урон на 10 %\nУвеличивает шанс критического дистанционного урона на 6 %", + "MythrilHood": "Увеличивает максимум маны на 60\nУвеличивает магический урон на 15 %", + "MythrilHelmet": "Увеличивает шанс критического урона в ближнем бою на 5 %\nУвеличивает урон в ближнем бою на 10 %", + "MythrilHat": "Увеличивает дистанционный урон на 12 %\nУвеличивает шанс критического дистанционного урона на 7 %", + "CobaltDrill": "Может добывать мифрил и орихалк", + "MythrilDrill": "Может добывать адамантит и титан", + "WingsNebula": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "Compass": "Показывает горизонтальное местоположение", + "DivingGear": "Дает возможность плавать\nЗначительно увеличивает возможность дыхания под водой", + "GPS": "Показывает местоположение\nСообщает время", + "ObsidianHorseshoe": "Нейтрализует урон от падения\nДает невосприимчивость к огненным блокам", + "ObsidianShield": "Дает невосприимчивость к отбрасыванию\nДает невосприимчивость к огненным блокам", + "TinkerersWorkshop": "Позволяет объединять некоторые аксессуары", + "CloudinaBalloon": "Позволяет владельцу делать двойной прыжок\nУвеличивает высоту прыжка", + "AdamantiteHeadgear": "Увеличивает максимум маны на 80\nУвеличивает магический урон и шанс критического урона на 11 %", + "AdamantiteHelmet": "Увеличивает шанс критического урона в ближнем бою на 7 %\nУвеличивает урон в ближнем бою на 14 %", + "AdamantiteMask": "Увеличивает дистанционный урон на 14 %\nУвеличивает шанс критического дистанционного урона на 8 %", + "AdamantiteBreastplate": "Увеличивает урон на 6 %", + "AdamantiteLeggings": "Увеличивает шанс критического урона на 4 %\nУвеличивает скорость движения на 5 %", + "SpectreBoots": "Позволяет летать\nНоситель может бегать супербыстро", + "FruitJuice": "{$CommonItemTooltip.MinorStats}", + "HolyWater": "Распространяет освящение на некоторые блоки", + "CrimsonFishingCrateHard": "{$ItemTooltip.CrimsonFishingCrate}", + "FairyBell": "Призывает фею", + "SuspiciousLookingEye": "Призывает глаз Ктулху", + "ClockworkAssaultRifle": "Очередь из трех пуль\nБоеприпасы расходуются только на первый выстрел", + "MoonCharm": "Ночью превращает владельца в оборотня", + "KiteCrawltipede": "{$CommonItemTooltip.Kite}", + "SorcererEmblem": "Увеличивает магический урон на 15 %", + "BandofRegeneration": "Медленно восстанавливает жизнь", + "WarriorEmblem": "Увеличивает урон в ближнем бою на 15 %", + "RangerEmblem": "Увеличивает дистанционный урон на 15 %", + "DemonWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "AngelWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "RainbowRod": "Вызывает управляемую радугу", + "IceRod": "Призывает лед", + "NeptunesShell": "При входе в воду превращает владельца в амфибию", + "MagicMirror": "Посмотри в зеркало, чтобы вернуться домой", + "Flamethrower": "Использует гель в качестве боеприпасов", + "Wrench": "Помещает красный провод", + "WireCutter": "Убирает провода", + "CrystalBullet": "При ударе создает несколько осколков кристалла", + "HolyArrow": "При ударе вызывает падающие звезды", + "MagicDagger": "Волшебный возвращающийся кинжал", + "CrystalStorm": "Призывает осколки быстрого огненного кристалла", + "CursedFlames": "Призывает нечестивые огненные шары", + "SoulofLight": "Создания из эссенции света", + "SoulofNight": "Создания из эссенции тьмы", + "CursedFlame": "Даже вода не может погасить это пламя", + "CursedTorch": "Можно поместить в воду", + "AdamantiteForge": "Используется для плавки адамантитовой и титановой руды", + "MythrilAnvil": "Используется для изготовления предметов из мифриловых, орихалковых, адамантитовых и титановых слитков", + "UnicornHorn": "Острый и волшебный!", + "CrownosWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "LightShard": "Иногда бывает у существ в пустынях света", + "RedPressurePlate": "Активируется при наступании", + "CloudinaBottle": "Позволяет владельцу делать двойной прыжок", + "SpellTome": "Можно зачаровать", + "PrismaticPunch": "{$CommonItemTooltip.MediumStats}", + "Megashark": "Шанс 50 % не потратить боеприпасы\nСтарший брат мини-акулы", + "Shotgun": "Стреляет веером пуль", + "FrozenCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "Mango": "{$CommonItemTooltip.MinorStats}", + "HermesBoots": "Носитель может бегать супербыстро", + "GreenPressurePlate": "Активируется при наступании", + "GrayPressurePlate": "Активируется при нажатии игроком", + "BrownPressurePlate": "Активируется при нажатии игроком", + "MechanicalEye": "Призывает близнецов", + "SoulofFright": "Эссенция чистого ужаса", + "SoulofMight": "Эссенция Уничтожителя", + "SoulofSight": "Эссенция вездесущих стражников", + "HallowedPlateMail": "Увеличивает шанс критического удара на 7 %", + "HallowedGreaves": "Увеличивает урон на 7 %\nУвеличивает скорость движения на 8 %", + "HallowedHelmet": "Увеличивает дистанционный урон на 15 %\nУвеличивает шанс критического дистанционного урона на 8 %", + "CrossNecklace": "Увеличивает продолжительность неуязвимости после получения урона", + "ManaFlower": "Снижает использование маны на 8 %\nПри необходимости автоматически использует зелье маны", + "Elderberry": "{$CommonItemTooltip.MinorStats}", + "MechanicalSkull": "Призывает Скелетрона Прайма", + "HallowedHeadgear": "Увеличивает максимум маны на 100\nУвеличивает магический урон и шанс критического урона на 12 %", + "KiteYellow": "{$CommonItemTooltip.Kite}", + "DemoniteOre": "Пульсирует темной энергией", + "SlimeCrown": "Призывает короля слизней", + "LightDisc": "Собирается до 5 шт. в ячейке", + "DemoniteBar": "Пульсирует темной энергией", + "SoulofFlight": "Эссенция могущественных летающих созданий", + "MusicBox": "Может записывать песни", + "Drax": "Не путать с пилой для ветчины", + "Explosives": "Взрывается при активации", + "InletPump": "Направляет воду к выходной трубе", + "OutletPump": "Получает воду от входной трубы", + "Timer1Second": "Активируется каждую секунду", + "Timer3Second": "Активируется каждые 3 секунды", + "Timer5Second": "Активируется каждые 5 секунд", + "BluePresent": "{$CommonItemTooltip.RightClickToOpen}", + "GreenPresent": "{$CommonItemTooltip.RightClickToOpen}", + "YellowPresent": "{$CommonItemTooltip.RightClickToOpen}", + "SnowGlobe": "Призывает ледяной легион", + "Carrot": "Призывает ручного кролика", + "Vilethorn": "Призывает злую колючку", + "Starfury": "Вызывает падение звезд с неба\nВыковано с яростью рая", + "PurificationPowder": "Уничтожает зло", + "SmoothieofDarkness": "{$CommonItemTooltip.MinorStats}", + "RedsHelmet": "{$CommonItemTooltip.DevItem}", + "RedsBreastplate": "{$CommonItemTooltip.DevItem}", + "RedsLeggings": "{$CommonItemTooltip.DevItem}", + "Fish": "Призывает детеныша пингвина", + "BloodOrange": "{$CommonItemTooltip.MinorStats}", + "Frostbrand": "Стреляет ледяным снарядом", + "RedPotion": "Только для достойных", + "RottenChunk": "Выглядит вкусно!", + "UnholyTrident": "Призывает дьявольский трезубец", + "FrostHelmet": "Увеличивает урон в ближнем и дальнем бою на 16 %", + "FrostBreastplate": "Увеличивает магический урон и шанс критического урона на 11 %", + "FrostLeggings": "Увеличивает скорость движения на 8 %\nУвеличивает скорость атаки ближнего боя на 7 %", + "WormFood": "Призывает пожирателя миров", + "TinWatch": "Сообщает время", + "TungstenWatch": "Сообщает время", + "PlatinumWatch": "Сообщает время", + "LeadAnvil": "Используется для изготовления предметов из слитков металла", + "BeamSword": "Стреляет лучом света", + "IceBlade": "Стреляет ледяным снарядом", + "IceBow": "Стреляет морозными стрелами", + "FrostStaff": "Стреляет потоком холода", + "BlueCultistCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistDevote}", + "ButterflyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "FallenStar": "Исчезает после рассвета", + "Seaweed": "Призывает ручную черепаху", + "FairyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "Clentaminator": "При распылении создает и уничтожает биомы\nИспользует цветной раствор", + "GreenSolution": "Используется с очистителем\nРаспространяет Очищение", + "BlueSolution": "Используется с очистителем\nРаспыляет Святость", + "PurpleSolution": "Используется с очистителем\nРаспыляет Порчу", + "DarkBlueSolution": "Используется с очистителем\nСтранный светящиеся грибы", + "RedSolution": "Используется с очистителем\nРаспространяет Багрянец", + "HarpyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BoneWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "Hammush": "Достаточно мощный, чтобы уничтожать алтари демонов", + "NettleBurst": "Призывает колючее копье", + "CrimsonHelmet": "Увеличивает урон на 2 %", + "CrimsonScalemail": "Увеличивает урон на 2 %", + "CrimsonGreaves": "Увеличивает урон на 2 %", + "DeathbringerPickaxe": "Позволяет добывать адский камень", + "Torch": "Дает свет", + "FlameWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "FrozenWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "GhostWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "LivingWoodWand": "Помещает живую древесину", + "GrapplingHook": "Убирайся отсюда!", + "Actuator": "Позволяет переключать твердые блоки", + "Chain": "Можно взобраться", + "BlueWrench": "Помещает синий провод", + "GreenWrench": "Помещает зеленый провод", + "BluePressurePlate": "Активируется при нажатии игроком", + "YellowPressurePlate": "Активируется при нажатии кем угодно, кроме игрока", + "FrozenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LuckyCoin": "При ударе врагов иногда падают дополнительные монеты", + "UnicornonaStick": "Отличное проводим время!", + "SandstorminaBottle": "Позволяет владельцу дважды совершать более высокий прыжок", + "CanOfWorms": "{$CommonItemTooltip.RightClickToOpen}", + "MoonShell": "Ночью превращает владельца в оборотня, а в воде — в амфибию", + "StarVeil": "Вызывает падение звезд и при уроне увеличивает длительность неуязвимости", + "BloodyMoscato": "{$CommonItemTooltip.MinorStats}", + "MiningHelmet": "Дает свет при ношении", + "AdhesiveBandage": "Иммунитет к кровотечению", + "ArmorPolish": "Иммунитет к сломанной броне", + "Bezoar": "Иммунитет к отравлению", + "Blindfold": "Иммунитет к темноте", + "FastClock": "Иммунитет к замедленности", + "Megaphone": "Иммунитет к безмолвию", + "Nazar": "Иммунитет к проклятию", + "Vitamins": "Иммунитет к ослаблению", + "TrifoldMap": "Иммунитет к запутанности", + "Lemon": "{$CommonItemTooltip.MinorStats}", + "TropicalSmoothie": "{$CommonItemTooltip.MinorStats}", + "PinaColada": "{$CommonItemTooltip.MinorStats}", + "PeachSangria": "{$CommonItemTooltip.MinorStats}", + "ArmorBracing": "Иммунитет к ослаблению и сломанной броне", + "MedicatedBandage": "Иммунитет к отравлению и кровотечению", + "ThePlan": "Иммунитет к замедленности и запутанности", + "CountercurseMantra": "Иммунитет к безмолвию и проклятию", + "CoinGun": "Использует монеты в качестве оружия\nБолее ценные монеты наносят больше урона", + "LavaCharm": "Дает на 7 секунд иммунитет к лаве", + "BananaDaiquiri": "{$CommonItemTooltip.MinorStats}", + "Pineapple": "{$CommonItemTooltip.MinorStats}", + "BoneWand": "Помещает кость", + "LeafWand": "Помещает листья", + "FlyingCarpet": "Позволяет владельцу парить в воздухе несколько секунд", + "AvengerEmblem": "Увеличивает урон на 12 %", + "Lemonade": "{$CommonItemTooltip.MinorStats}", + "LandMine": "Взрывается, если наступить", + "Starfruit": "{$CommonItemTooltip.MediumStats}", + "Umbrella": "С этим вы будете падать медленнее", + "ChlorophyteOre": "Реагирует на свет", + "GrapeJuice": "{$CommonItemTooltip.MajorStats}", + "IceSkates": "Увеличивает подвижность на льду\nПри падении на лед он не сломается", + "SnowballLauncher": "Быстро стреляет снежками", + "ClimbingClaws": "Позволяет скользить по стенам\nРаботают лучше вместе с шипастыми ботинками", + "AncientShadowHelmet": "Увеличивает скорость ближнего боя на 7 %", + "AncientShadowScalemail": "Увеличивает скорость ближнего боя на 7 %", + "AncientShadowGreaves": "Увеличивает скорость ближнего боя на 7 %", + "AncientNecroHelmet": "Увеличивает дистанционный урон на 5 %.", + "AncientCobaltHelmet": "Увеличивает максимум маны на 40\nУвеличивает шанс критического магического урона на 4 %", + "AncientCobaltBreastplate": "Увеличивает максимум маны на 20\nУвеличивает шанс критического магического урона на 4 %", + "AncientCobaltLeggings": "Увеличивает максимум маны на 20\nУвеличивает шанс критического магического урона на 4 %", + "BlackBelt": "Дает шанс уклониться от атак", + "Boomstick": "Стреляет веером пуль", + "Rope": "Можно взобраться", + "Campfire": "Восстановление жизни увеличено рядом с костром", + "Marshmallow": "Наденьте на палку и приготовьте над костром", + "MarshmallowonaStick": "Поджарьте над костром!", + "Coconut": "{$CommonItemTooltip.MinorStats}", + "ShoeSpikes": "Позволяет скользить по стенам\nРаботают лучше вместе с когтями альпиниста", + "TigerClimbingGear": "Позволяет цепляться за стены", + "Tabi": "Позволяет уклоняться от противников\nДважды коснитесь нужного направления", + "Minishark": "Шанс 33 % не потратить боеприпасы\nНаполовину акула, наполовину оружие. С ума сойти!", + "ManaRegenerationBand": "Увеличивает максимум маны на 20\nУскоряет восстановление маны", + "SandstorminaBalloon": "Позволяет владельцу делать двойной прыжок\nУвеличивает высоту прыжка", + "MasterNinjaGear": "Позволяет цепляться за стены и уклоняться от противников\nДает шанс уклониться от атак", + "RopeCoil": "Метните, чтобы создать веревку, по которой можно залезть", + "Blowgun": "Позволяет собирать семена для зарядов", + "BlizzardinaBottle": "Позволяет владельцу делать двойной прыжок", + "EnchantedSword": "Стреляет лучом зачарованного меча", + "PickaxeAxe": "Не путать с пилой для ветчины", + "EatersBone": "Призывает детеныша пожирателя душ", + "BlendOMatic": "Используется для создания предметов", + "MeatGrinder": "Используется для создания предметов", + "Rambutan": "{$CommonItemTooltip.MinorStats}", + "Solidifier": "Используется для создания предметов", + "ActuationAccessory": "Автоматически помещает приводы под установленные предметы", + "ActuationRod": "Активирует приводы", + "AlchemyTable": "Шанс 33 % не потратить ингредиенты для создания зелий", + "AncientBattleArmorHat": "Увеличивает магический урон и урон питомцев на 15 %", + "AppleJuice": "{$CommonItemTooltip.MinorStats}", + "WoodenCrateHard": "{$ItemTooltip.WoodenCrate}", + "AncientHorn": "Призывает ездового василиска", + "BloodNautilusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodNautilus}", + "GoblinSharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinShark}", + "AviatorSunglasses": "Выпустите своего внутреннего wingman\nОтлично подходит для скрытия личности стримеров!", + "KitePigron": "{$CommonItemTooltip.Kite}", + "BalloonHorseshoeFart": "Позволяет владельцу делать двойной прыжок\nУвеличивает высоту прыжка и защищает от урона при падении", + "BalloonHorseshoeHoney": "При уроне выпускает пчел\nУвеличивает высоту прыжка и защищает от урона при падении", + "BalloonHorseshoeSharkron": "Позволяет владельцу делать двойной прыжок\nУвеличивает высоту прыжка и защищает от урона при падении", + "BalloonPufferfish": "Увеличивает высоту прыжка", + "BeesKnees": "Деревянные стрелы превращаются в столб пчел", + "BejeweledValkyrieBody": "{$CommonItemTooltip.DevItem}\nУкрашено самоцветами и элегантно, как раз для полетов под дождевыми облаками", + "BejeweledValkyrieHead": "{$CommonItemTooltip.DevItem}\nСтаньте ветром, оседлайте молнию.", + "BloodEelBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodEelHead}", + "BewitchingTable": "Нажмите , чтобы получить больше прислужников", + "Bladetongue": "При касании выплевывает струю ихора", + "BlessedApple": "Призывает ездового единорога", + "CorruptFishingCrateHard": "{$ItemTooltip.CorruptFishingCrate}", + "JungleFishingCrateHard": "{$ItemTooltip.JungleFishingCrate}", + "BoneCampfire": "Восстановление жизни увеличено рядом с костром", + "BoneRattle": "Призывает детеныша лицевого монстра", + "BoneTorch": "Испускает смертельное сияние", + "BoosterTrack": "Ударьте молотом, чтобы изменить направление", + "GolfClubPutter": "{$CommonItemTooltip.GolfPutter}", + "HallowedFishingCrateHard": "{$ItemTooltip.HallowedFishingCrate}", + "KiteRedAndYellow": "{$CommonItemTooltip.Kite}", + "BouncyGlowstick": "Работает при намокании", + "BouncyGrenade": "Небольшой взрыв, не уничтожающий плитки\nСильно отскакивает", + "WillsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "BrainScrambler": "Призывает ездового скутликса", + "BubbleGun": "Быстро стреляет силовыми шариками", + "ButchersChainsaw": "При ударам по врагам создаются искры", + "BloodSquidBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodSquid}", + "CelestialSigil": "Призывает Неотвратимую судьбу", + "CellPhone": "Показывает все\nПозволяет в любой момент вернуться домой", + "ClingerStaff": "Призывает стену проклятых огней", + "CogWall": "Увеличивает производительность на 200 %", + "CoinRing": "Увеличивает дистанцию сбора монет\nПри ударе врагов иногда падают дополнительные монеты", + "CompanionCube": "Поддается воздействию лавы!", + "CordageGuide": "Позволяет собирать лозу с виноградников", + "CorruptFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "CosmicCarKey": "Призывает ездовой НЛО", + "CrimsonFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "CrimsonHeart": "Призывает сердце, которое дает свет", + "CrystalSerpent": "Стреляет разрывным кристаллом", + "CrystalVileShard": "Вызывает массивный кристальный шип", + "CursedCampfire": "Восстановление жизни увеличено рядом с костром", + "DaedalusStormbow": "Стреляет стрелами с неба", + "DayBreak": "Разрывает врагов на куски световым копьем!", + "DemonCampfire": "Восстановление жизни увеличено рядом с костром", + "DemonHeart": "Навсегда увеличивает доступное количество ячеек", + "Detonator": "Кишки... и слава!", + "DevDye": "{$CommonItemTooltip.DevItem}", + "DjinnsCurse": "Дает замедление падения в обмен на вашу ногу", + "DPSMeter": "Показывает ваш урон в секунду", + "DrillContainmentUnit": "Призывает ездовой бур", + "DungeonFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "EoCShield": "Позволяет игроку бросаться на врагов\nДважды коснитесь нужного направления", + "FishermansGuide": "Показывает информацию о рыбалке", + "FishFinder": "Показывает погоду, фазу луны и информацию о рыбалке", + "FishronWings": "{$CommonItemTooltip.FlightAndSlowfall}\nПозволяет быстро передвигаться в воде", + "Flairon": "Выпускает самонаводящиеся пузыри", + "FleshKnuckles": "Враги с большей вероятностью атакуют вас", + "FloatingIslandFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "FlowerBoots": "Из ваших следов на траве вырастают цветы", + "FlyingKnife": "Метает управляемый летающий нож", + "GolfBallDyedBrown": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedBlue": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedBlack": "{$CommonItemTooltip.GolfBall}", + "FragmentNebula": "В этом фрагменте заключена сила галактики", + "FragmentSolar": "В этом фрагменте заключена ярость вселенной", + "FragmentStardust": "Вокруг этого фрагмента вращаются завораживающие частицы", + "FragmentVortex": "Из этого фрагмента исходит водоворот энергии", + "FrozenCampfire": "Восстановление жизни увеличено рядом с костром", + "FuzzyCarrot": "Призывает ездового кролика", + "GemLockAmber": "Нажмите , чтобы поместить или убрать большие янтарные камни", + "GemLockAmethyst": "Нажмите , чтобы поместить или убрать большие аметистовые камни", + "GemLockDiamond": "Нажмите , чтобы поместить или убрать большие бриллиантовые камни", + "GemLockEmerald": "Нажмите , чтобы поместить или убрать большие изумрудные камни", + "GemLockRuby": "Нажмите , чтобы поместить или убрать большие рубиновые камни", + "GemLockSapphire": "Нажмите , чтобы поместить или убрать большие сапфировые камни", + "GemLockTopaz": "Нажмите , чтобы поместить или убрать большие топазовые камни", + "GoblinTech": "Показывает скорость движения, урон в секунду и ценную руду", + "GoldPickaxe": "Может добывать метеорит", + "GoldRing": "Увеличивает дистанцию сбора монет", + "Plum": "{$CommonItemTooltip.MinorStats}", + "KiteBunny": "{$CommonItemTooltip.Kite}", + "HallowedFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "HardySaddle": "Призывает ездовую черепаху", + "HellwingBow": "Деревянные стрелы превращаются в огненных летучих мышей", + "HerbBag": "{$CommonItemTooltip.RightClickToOpen}", + "HiveBackpack": "Увеличивает силу дружественных пчел", + "HoneyedGoggles": "Призывает ездовую пчелу", + "IceMirror": "Посмотри в зеркало, чтобы вернуться домой", + "IchorCampfire": "Восстановление жизни увеличено рядом с костром", + "EyeballFlyingFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EyeballFlyingFish}", + "JungleFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LargeAmber": "Для игры «Поймай самоцвет». Падает, когда вы умираете.", + "LaserRuler": "Создает на экране линии для удобства установки блоков", + "LastPrism": "Выпускает радугу, разлагающую все формы жизни", + "LifeformAnalyzer": "Показывает названия редких существ вокруг вас", + "LightKey": "Заряжено субстанцией многих душ", + "LivingMahoganyLeafWand": "Помещает листья красной древесины", + "LivingMahoganyWand": "Помещает живую красную древесину", + "LockBox": "{$CommonItemTooltip.RightClickToOpen}\nТребует золотой ключ", + "LogicGateLamp_Faulty": "Поместите на логический вентиль, чтобы сделать его активацию случайной", + "LogicGateLamp_Off": "Поместите на логический вентиль, чтобы добавить проверки", + "LogicGateLamp_On": "Поместите на логический вентиль, чтобы добавить проверки", + "LogicGate_NOR": "Определяет лампы логического вентиля над ним\nРаботает при выключении всех ламп, иначе отключается", + "LogicGate_NXOR": "Определяет лампы логического вентиля над ним\nРаботает, когда включено больше одной лампы, иначе отключается\nТакже часто называется NXOR", + "LogicGate_OR": "Определяет лампы логического вентиля над ним\nРаботает при выключении любой лампы, иначе отключается", + "LogicGate_XOR": "Определяет лампы логического вентиля над ним\nРаботает при выключении только одной лампы, иначе отключается", + "LogicSensor_Above": "Включается, когда игрок сверху, в противном случае выключается", + "LogicSensor_Honey": "Включается при наличии меда, в противном случае выключается", + "LogicSensor_Lava": "Включается при наличии лавы, в противном случае выключается", + "LogicSensor_Liquid": "Включается при наличии жидкости, в противном случае выключается", + "LogicSensor_Moon": "Включается с началом ночи", + "LogicSensor_Sun": "Включается с началом дня", + "LogicSensor_Water": "Включается при наличии воды, в противном случае выключается", + "LokisDye": "{$CommonItemTooltip.DevItem}", + "LokisHelm": "{$CommonItemTooltip.DevItem}\nХаос пришел из порядка, страх — из смелости, слабость — из силы", + "LokisPants": "{$CommonItemTooltip.DevItem}\nЖернова правосудия мелят медленно, но в пыль.", + "LokisShirt": "{$CommonItemTooltip.DevItem}\nПознай себя, познай врага. Тысяча боев, тысяча побед...", + "ZombieMermanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieMerman}", + "LunarBar": "Пульсирует светящейся небесной энергией", + "LunarCraftingStation": "Используется для изготовления предметов из лунных фрагментов и люминита", + "LunarFlareBook": "Вызывает дождь из лунных вспышек", + "LunarHook": "Хочешь луну? Просто хватай ее и тащи вниз!", + "LunarOre": "Осколок небес", + "MagicLantern": "Призывает волшебный фонарь, который показывает ближайшее сокровище", + "MechanicalLens": "Дает улучшенное видение проводов", + "MetalDetector": "Отображает самую ценную руду вокруг вас", + "MeteorStaff": "Показывает метеоры", + "Minecart": "Прокатимся по рельсам!", + "MinecartTrack": "Ударьте по концу, чтобы изменить тип бампера\nУдарьте по пересечению, чтобы изменить направление", + "MolotovCocktail": "Небольшой взрыв, поджигающий врагов\nНенадолго освещает огнем поблизости", + "MoneyTrough": "Призывает летающую свинку, которая хранит ваши вещи", + "MoonlordArrow": "Стреляет со скоростью звука!", + "MoonlordBullet": "Выстраивай и сбивай...", + "Apricot": "{$CommonItemTooltip.MinorStats}", + "MothronWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "MulticolorWrench": "Нажмите при удержании, чтобы изменить настройки проводов", + "NebulaArcanum": "Вызывает астральную энергию и направляет ее на ваших врагов", + "NebulaBlaze": "Из пояса Ориона на ваши ладони", + "NebulaBreastplate": "Увеличивает на 9 % магический урон и шанс критического удара", + "NebulaHelmet": "Увеличивает максимальный запас маны на 60 и уменьшает использование маны на 15 %\nУвеличивает на 7 % магический урон и шанс критического удара", + "NebulaLeggings": "Увеличивает магический урон на 10 %\nУвеличивает скорость движения на 10 %", + "NebulaMonolith": "Использует немного силы от башни туманности", + "NightKey": "Заряжено субстанцией многих душ", + "NightVisionHelmet": "Улучшает зрение", + "GolfBallDyedLimeGreen": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedGreen": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedCyan": "{$CommonItemTooltip.GolfBall}", + "PartyBundleOfBalloonTile": "Связано для всеобщего удовольствия", + "PartyGirlGrenade": "Небольшой взрыв, не уничтожающий плитки", + "PartyMonolith": "Вызывает падение шариков с неба", + "PartyPresent": "Что там внутри?", + "PDA": "Показывает все", + "PeaceCandle": "Делает окружающих существ менее враждебными", + "PedguinHat": "Станьте Pedguin\nОтлично подходит для скрытия личности стримеров!", + "PedguinPants": "Станьте Pedguin\nОтлично подходит для скрытия личности стримеров!", + "PedguinShirt": "Станьте Pedguin\nОтлично подходит для скрытия личности стримеров!", + "Phantasm": "Шанс 66 % не потратить боеприпасы", + "Pigronata": "Выбейте из него все веселье!\nМожет содержать сюрприз!", + "PinkGel": "Упругий и сладкий!", + "PinkSlimeBlock": "Сильно отскакивает", + "PirateStaff": "Призывает пиратов, которые сражаются за вас", + "PixelBox": "Разделяет проложенные провода\nЛампы выключаются от горизонтальных сигналов\nЛампы включаются от пересекающихся сигналов", + "PlatinumPickaxe": "Может добывать метеорит", + "PocketMirror": "Иммунитет к окаменению", + "PressureTrack": "Не использовать на склонах", + "ProjectilePressurePad": "Активируется при попадании стрелкового оружия", + "PsychoKnife": "Позволяет передвигаться в режиме скрытности", + "PutridScent": "Враги с меньшей вероятностью атакуют вас\nУвеличивает на 5 % урон и шанс критического удара", + "GolfBallDyedYellow": "{$CommonItemTooltip.GolfBall}", + "Radar": "Обнаруживает врагов рядом с вами", + "RainbowCampfire": "Восстановление жизни увеличено рядом с костром", + "GolfBallDyedViolet": "{$CommonItemTooltip.GolfBall}", + "RazorbladeTyphoon": "Призывает быстро двигающиеся лезвия", + "RedsYoyo": "{$CommonItemTooltip.DevItem}", + "REK": "Показывает количество монстров, убийств и редких существ", + "RoyalGel": "Слизняки становятся дружественными", + "SailfishBoots": "Носитель может бегать супербыстро", + "SandFallBlock": "Падающий песок, на который можно безопасно смотреть", + "SandFallWall": "Падающий песок, на который можно безопасно смотреть", + "ScalyTruffle": "Призывает ездового свинодракона", + "Sextant": "Показывает фазу луны", + "ShadowFlameBow": "Стреляет стрелами теневого пламени", + "ShadowFlameHexDoll": "Призывает щупальца теневого пламени, которые атакуют вашего врага", + "ShadowFlameKnife": "При попадании вызывает адское пламя", + "SharkronBalloon": "Увеличивает высоту прыжка\nПозволяет владельцу делать двойной прыжок", + "SharkToothNecklace": "Увеличивает пробивание брони на 5", + "SharpeningStation": "Увеличивает пробивание брони для оружия ближнего боя", + "ShinyStone": "Значительно ускоряет восстановление жизни, когда вы не двигаетесь", + "ShrimpyTruffle": "Привлекает легендарное создание, которое разрастается в воде и в бою", + "SillyBalloonGreen": "Пахнет мятой и весельем", + "SillyBalloonGreenWall": "Пахнет мятой и весельем", + "SillyBalloonMachine": "Праздник никогда не прекращается!", + "SillyBalloonPink": "Пахнет жвачкой и счастьем", + "SillyBalloonPinkWall": "Пахнет жвачкой и счастьем", + "SillyBalloonPurple": "Пахнет лавандой и энтузиазмом", + "SillyBalloonPurpleWall": "Пахнет лавандой и энтузиазмом", + "SillyStreamerBlue": "Необычно прочное, чтобы взобраться!", + "SillyStreamerGreen": "Необычно прочное, чтобы взобраться!", + "SillyStreamerPink": "Необычно прочное, чтобы взобраться!", + "SkiphsHelm": "{$CommonItemTooltip.DevItem}", + "SkiphsPants": "{$CommonItemTooltip.DevItem}", + "SkiphsShirt": "{$CommonItemTooltip.DevItem}", + "TheBrideBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TheBride}", + "DTownsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "SlimeGun": "Брызгает безобидной струйкой слизи", + "SlimySaddle": "Призывает ездового слизня", + "KiteKoi": "{$CommonItemTooltip.Kite}", + "SnowFallBlock": "Намного холоднее, чем снежный шар", + "SnowFallWall": "Намного холоднее, чем снежный шар", + "SolarEruption": "Выковано с яростью солнца", + "RedsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "Hoverboard": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "CenxsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "SolarMonolith": "Использует немного силы от башни солнца", + "SolarTablet": "Вызывает солнечное затмение", + "SoulDrain": "Похищает здоровье у врагов", + "SpelunkerGlowstick": "Показывает ближайшее сокровище", + "SpiderStaff": "Призывает пауков, которые сражаются за вас", + "SporeSac": "В течение времени призывает споры, которые наносят врагам урон", + "GolfClubChlorophyteDriver": "{$CommonItemTooltip.GolfDriver}", + "StardustCellStaff": "Призывает клетку звездной пыли, которая сражается за вас\nВыводит самую красивую клеточную инфекцию", + "StardustDragonStaff": "Призывает дракона звездной пыли, который сражается за вас\nКому нужна орда питомцев, если у тебя есть гигантский дракон?", + "GolfClubDiamondWedge": "{$CommonItemTooltip.GolfWedge}", + "GolfClubShroomitePutter": "{$CommonItemTooltip.GolfPutter}", + "StardustMonolith": "Использует немного силы от башни звездной пыли", + "FloatingIslandFishingCrateHard": "{$ItemTooltip.FloatingIslandFishingCrate}", + "StickyGrenade": "Небольшой взрыв, не уничтожающий плитки\nБросить будет непросто.", + "Stopwatch": "Показывает скорость движения игрока", + "StrangeBrew": "Выглядит и пахнет ужасно", + "StrangePlant1": "Можно обменять на редкие красители", + "StrangePlant2": "Можно обменять на редкие красители", + "StrangePlant3": "Можно обменять на редкие красители", + "StrangePlant4": "Можно обменять на редкие красители", + "SummonerEmblem": "Увеличивает урон от призыва на 15 %", + "Sundial": "Позволяет один раз в неделю перемотать время вперед", + "SuperAbsorbantSponge": "Может поместить в себя бесконечное количество воды", + "SuspiciousLookingTentacle": "Вызывает подозрительно выглядящий глаз, излучающий свет\nЯ знаю твои мысли...", + "TallyCounter": "Показывает количество убитых монстров", + "TartarSauce": "Призывает мини-минотавра", + "TempestStaff": "Призывает акулонадо, которые сражаются за вас", + "TheBrideDress": "Суатьпа...", + "TheBrideHat": "Люофь.. Пуауда люофь...", + "Toxikarp": "Выпускает токсические пузыри", + "Tsunami": "Выпускает сразу 5 стрел", + "TsunamiInABottle": "Позволяет владельцу делать двойной прыжок", + "TungstenPickaxe": "Может добывать метеорит", + "UltraBrightCampfire": "Восстановление жизни увеличено рядом с костром", + "ValkyrieYoyo": "{$CommonItemTooltip.DevItem}", + "BlackCurrant": "{$CommonItemTooltip.MinorStats}", + "VineRopeCoil": "Метните, чтобы создать лозу, по которой можно залезть", + "VortexBeater": "Шанс 66 % не потратить боеприпасы\nКатастрофическая смесь бах-бах и бух-бух.", + "VortexBreastplate": "Увеличивает на 12 % дистанционный урон и шанс критического удара\nШанс 25 % не потратить боеприпасы", + "VortexHelmet": "Увеличивает дистанционный урон на 16 %\nУвеличивает шанс критического дистанционного урона на 7 %", + "VortexLeggings": "Увеличивает на 8 % дистанционный урон и шанс критического удара\nУвеличивает скорость движения на 10 %", + "VortexMonolith": "Использует немного силы от башни вихря", + "WandofSparking": "Стреляет искоркой", + "WeaponRack": "Нажмите , чтобы поместить предмет на оружейную стойку", + "WeatherRadio": "Показывает погоду", + "WeightedPressurePlateCyan": "Активируется, когда игрок наступает", + "WeightedPressurePlateOrange": "Активируется, когда игрок наступает", + "WeightedPressurePlatePink": "Активируется, когда игрок наступает", + "WeightedPressurePlatePurple": "Активируется, когда игрок наступает", + "Peach": "{$CommonItemTooltip.MinorStats}", + "WingsSolar": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsStardust": "{$CommonItemTooltip.FlightAndSlowfall}", + "GolfClubTitaniumIron": "{$CommonItemTooltip.GolfIron}", + "WireBulb": "Включает лампы для каждого цвета проводов", + "WireKite": "Дает полный контроль над проводами!\nНажмите при удержании, чтобы изменить настройки проводов", + "WirePipe": "Разделяет проложенные провода\nМожно бить молотом!", + "WormholePotion": "Телепортирует вас к участнику команды\nЩелкните по их голове на полноэкранной карте", + "WormScarf": "Получаемый урон снижен на 17 %", + "XenoStaff": "Призывает НЛО, который сражается за вас", + "YellowWrench": "Помещает желтый провод", + "Yoraiz0rDarkness": "{$CommonItemTooltip.DevItem}\nЕсли вы видите это, вам лучше бежать...", + "Yoraiz0rHead": "{$CommonItemTooltip.DevItem}", + "Yoraiz0rPants": "{$CommonItemTooltip.DevItem}", + "Yoraiz0rShirt": "{$CommonItemTooltip.DevItem}", + "GolfClubPearlwoodDriver": "{$CommonItemTooltip.GolfDriver}", + "YoyoBag": "Дает пользователю мастерство в использовании йо-йо", + "YoYoGlove": "Позволяет использовать два йо-йо одновременно", + "BloodMoonRising": "{$PaintingArtist.Garner}", + "TheHangedMan": "{$PaintingArtist.Garner}", + "GloryoftheFire": "{$PaintingArtist.Garner}", + "BoneWarp": "{$PaintingArtist.Garner}", + "SkellingtonJSkellingsworth": "{$PaintingArtist.Garner}", + "TheCursedMan": "{$PaintingArtist.Garner}", + "TheEyeSeestheEnd": "{$PaintingArtist.Garner}", + "SomethingEvilisWatchingYou": "{$PaintingArtist.Moosdijk}", + "TheTwinsHaveAwoken": "{$PaintingArtist.Moosdijk}", + "TheScreamer": "{$PaintingArtist.Crowno}", + "GoblinsPlayingPoker": "{$PaintingArtist.Garner}", + "Dryadisque": "{$PaintingArtist.Garner}", + "Sunflowers": "{$PaintingArtist.Garner}", + "TerrarianGothic": "{$PaintingArtist.Garner}", + "Impact": "{$PaintingArtist.Wright}", + "PoweredbyBirds": "{$PaintingArtist.Ness}", + "TheDestroyer": "{$PaintingArtist.Moosdijk}", + "ThePersistencyofEyes": "{$PaintingArtist.Crowno}", + "UnicornCrossingtheHallows": "{$PaintingArtist.Crowno}", + "GreatWave": "{$PaintingArtist.Crowno}", + "StarryNight": "{$PaintingArtist.Crowno}", + "GuidePicasso": "{$PaintingArtist.Crowno}", + "TheGuardiansGaze": "{$PaintingArtist.Kolf}", + "FatherofSomeone": "{$PaintingArtist.Crowno}", + "NurseLisa": "{$PaintingArtist.Garner}", + "DarkSoulReaper": "{$PaintingArtist.Myhre}", + "Land": "{$PaintingArtist.Myhre}", + "TrappedGhost": "{$PaintingArtist.Myhre}", + "DemonsEye": "{$PaintingArtist.Myhre}", + "FindingGold": "{$PaintingArtist.Myhre}", + "FirstEncounter": "{$PaintingArtist.Crowno}", + "GoodMorning": "{$PaintingArtist.Crowno}", + "UndergroundReward": "{$PaintingArtist.Crowno}", + "ThroughtheWindow": "{$PaintingArtist.Crowno}", + "PlaceAbovetheClouds": "{$PaintingArtist.Crowno}", + "DoNotStepontheGrass": "{$PaintingArtist.Crowno}", + "ColdWatersintheWhiteLand": "{$PaintingArtist.Crowno}", + "LightlessChasms": "{$PaintingArtist.Crowno}", + "TheLandofDeceivingLooks": "{$PaintingArtist.Crowno}", + "Daylight": "{$PaintingArtist.Crowno}", + "SecretoftheSands": "{$PaintingArtist.Crowno}", + "DeadlandComesAlive": "{$PaintingArtist.Crowno}", + "EvilPresence": "{$PaintingArtist.Crowno}", + "SkyGuardian": "{$PaintingArtist.Crowno}", + "AmericanExplosive": "{$PaintingArtist.Kolf}", + "Discover": "{$PaintingArtist.Myhre}", + "HandEarth": "{$PaintingArtist.Myhre}", + "OldMiner": "{$PaintingArtist.Myhre}", + "Skelehead": "{$PaintingArtist.Myhre}", + "FacingtheCerebralMastermind": "{$PaintingArtist.Kolf}", + "LakeofFire": "{$PaintingArtist.Garner}", + "TrioSuperHeroes": "{$PaintingArtist.Burczyk}", + "ImpFace": "{$PaintingArtist.Myhre}", + "OminousPresence": "{$PaintingArtist.Craig}", + "ShiningMoon": "{$PaintingArtist.Craig}", + "LivingGore": "{$PaintingArtist.Craig}", + "FlowingMagma": "{$PaintingArtist.Craig}", + "TheCreationoftheGuide": "{$PaintingArtist.Garner}", + "TheMerchant": "{$PaintingArtist.Garner}", + "CrownoDevoursHisLunch": "{$PaintingArtist.Garner}", + "RareEnchantment": "{$PaintingArtist.Phelps}", + "GloriousNight": "{$PaintingArtist.Duncan}", + "AnglerFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AnglerFish}", + "AngryNimbusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryNimbus}", + "AnomuraFungusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AnomuraFungus}", + "AntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Antlion}", + "ArapaimaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Arapaima}", + "ArmoredSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ArmoredSkeleton}", + "BatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CaveBat}", + "BirdBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Bird}", + "BlackRecluseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlackRecluse}", + "BloodFeederBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodFeeder}", + "BloodJellyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodJelly}", + "BloodCrawlerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodCrawler}", + "BoneSerpentBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BoneSerpentHead}", + "BunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Bunny}", + "ChaosElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ChaosElemental}", + "MimicBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mimic}", + "ClownBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Clown}", + "CorruptBunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptBunny}", + "CorruptGoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptGoldfish}", + "CrabBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crab}", + "CrimeraBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crimera}", + "CrimsonAxeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonAxe}", + "CursedHammerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CursedHammer}", + "DemonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Demon}", + "DemonEyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DemonEye}", + "DerplingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Derpling}", + "EaterofSoulsBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EaterofSouls}", + "EnchantedSwordBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EnchantedSword}", + "ZombieEskimoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieEskimo}", + "FaceMonsterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FaceMonster}", + "FloatyGrossBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FloatyGross}", + "FlyingFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingFish}", + "FlyingSnakeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingSnake}", + "FrankensteinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Frankenstein}", + "FungiBulbBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FungiBulb}", + "FungoFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FungoFish}", + "GastropodBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Gastropod}", + "GoblinThiefBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinThief}", + "GoblinSorcererBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinSorcerer}", + "GoblinPeonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinPeon}", + "GoblinScoutBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinScout}", + "GoblinWarriorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinWarrior}", + "GoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Goldfish}", + "HarpyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Harpy}", + "HellbatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hellbat}", + "HerplingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Herpling}", + "HornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hornet}", + "IceElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceElemental}", + "IcyMermanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IcyMerman}", + "FireImpBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FireImp}", + "JellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueJellyfish}", + "JungleCreeperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleCreeper}", + "LihzahrdBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LihzahrdCrawler}", + "ManEaterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ManEater}", + "MeteorHeadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MeteorHead}", + "MothBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Moth}", + "MummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mummy}", + "MushiLadybugBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MushiLadybug}", + "ParrotBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Parrot}", + "PigronBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PigronCorruption}", + "PiranhaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Piranha}", + "PirateBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateDeckhand}", + "PixieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Pixie}", + "RaincoatZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieRaincoat}", + "ReaperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Reaper}", + "SharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Shark}", + "SkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Skeleton}", + "SkeletonMageBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DarkCaster}", + "SlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueSlime}", + "SnowFlinxBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowFlinx}", + "SpiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WallCreeper}", + "SporeZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieMushroom}", + "SwampThingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SwampThing}", + "TortoiseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantTortoise}", + "ToxicSludgeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ToxicSludge}", + "UmbrellaSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UmbrellaSlime}", + "UnicornBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Unicorn}", + "VampireBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VampireBat}", + "VultureBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Vulture}", + "NypmhBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nymph}", + "WerewolfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Werewolf}", + "WolfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Wolf}", + "WorldFeederBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SeekerHead}", + "WormBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantWormHead}", + "WraithBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Wraith}", + "WyvernBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WyvernHead}", + "ZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Zombie}", + "JackingSkeletron": "{$PaintingArtist.Crowno}", + "BitterHarvest": "{$PaintingArtist.Lazure}", + "BloodMoonCountess": "{$PaintingArtist.Lazure}", + "HallowsEve": "{$PaintingArtist.Lazure}", + "MorbidCuriosity": "{$PaintingArtist.Lazure}", + "StarTopper1": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "StarTopper2": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "StarTopper3": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BowTopper": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndRedGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenAndWhiteGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "MulticoloredBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndYellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndRedBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndYellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "MulticoloredLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndYellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndBlueLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueAndYellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "PillaginMePixels": "{$PaintingArtist.Lazure}", + "PaintingCastleMarsberg": "{$PaintingArtist.Lazure}", + "PaintingMartiaLisa": "{$PaintingArtist.Lazure}", + "PaintingTheTruthIsUpThere": "{$PaintingArtist.Lazure}", + "AngryTrapperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryTrapper}", + "ArmoredVikingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ArmoredViking}", + "BlackSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlackSlime}", + "BlueArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueArmoredBones}", + "BlueCultistArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistArcherBlue}", + "SkiphsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "BlueCultistFighterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "BoneLeeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BoneLee}", + "ClingerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Clinger}", + "CochinealBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CochinealBeetle}", + "CorruptPenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptPenguin}", + "CorruptSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptSlime}", + "CorruptorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Corruptor}", + "CrimslimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crimslime}", + "CursedSkullBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CursedSkull}", + "CyanBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CyanBeetle}", + "DevourerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DevourerHead}", + "DiablolistBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DiabolistRed}", + "DoctorBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DoctorBones}", + "DungeonSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DungeonSlime}", + "DungeonSpiritBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DungeonSpirit}", + "ElfArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ElfArcher}", + "ElfCopterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ElfCopter}", + "EyezorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Eyezor}", + "FlockoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Flocko}", + "GhostBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Ghost}", + "GiantBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantBat}", + "GiantCursedSkullBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantCursedSkull}", + "GiantFlyingFoxBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantFlyingFox}", + "GingerbreadManBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GingerbreadMan}", + "GoblinArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinArcher}", + "GreenSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreenSlime}", + "HeadlessHorsemanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HeadlessHorseman}", + "HellArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HellArmoredBones}", + "HellhoundBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hellhound}", + "HoppinJackBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HoppinJack}", + "IceBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceBat}", + "IceGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceGolem}", + "IceSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceSlime}", + "IchorStickerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IchorSticker}", + "IlluminantBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IlluminantBat}", + "IlluminantSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IlluminantSlime}", + "JungleBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleBat}", + "JungleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleSlime}", + "KrampusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Krampus}", + "LacBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LacBeetle}", + "LavaBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Lavabat}", + "LavaSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LavaSlime}", + "MartianBrainscramblerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BrainScrambler}", + "MartianDroneBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianDrone}", + "MartianEngineerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianEngineer}", + "MartianGigazapperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GigaZapper}", + "MartianGreyGruntBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GrayGrunt}", + "MartianOfficerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianOfficer}", + "MartianRaygunnerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RayGunner}", + "MartianScutlixGunnerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ScutlixRider}", + "MartianTeslaTurretBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianTurret}", + "MisterStabbyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MisterStabby}", + "MotherSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MotherSlime}", + "NecromancerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Necromancer}", + "NutcrackerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nutcracker}", + "PaladinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Paladin}", + "PenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Penguin}", + "PinkyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Pinky}", + "PoltergeistBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Poltergeist}", + "PossessedArmorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PossessedArmor}", + "PresentMimicBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PresentMimic}", + "PurpleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PurpleSlime}", + "RaggedCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RaggedCaster}", + "RainbowSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RainbowSlime}", + "RavenBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Raven}", + "RedSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RedSlime}", + "RuneWizardBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RuneWizard}", + "RustyArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RustyArmoredBonesAxe}", + "ScarecrowBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Scarecrow1}", + "ScutlixBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Scutlix}", + "SkeletonArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonArcher}", + "SkeletonCommandoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonCommando}", + "SkeletonSniperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonSniper}", + "SlimerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Slimer}", + "SnatcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Snatcher}", + "SnowBallaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowBalla}", + "SnowmanGangstaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowmanGangsta}", + "SpikedIceSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SpikedIceSlime}", + "SpikedJungleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SpikedJungleSlime}", + "SplinterlingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Splinterling}", + "SquidBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Squid}", + "TacticalSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TacticalSkeleton}", + "TheGroomBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TheGroom}", + "TimBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Tim}", + "UndeadMinerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UndeadMiner}", + "UndeadVikingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UndeadViking}", + "WhiteCultistArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistArcherWhite}", + "WhiteCultistCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "WhiteCultistFighterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "YellowSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.YellowSlime}", + "YetiBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Yeti}", + "ZombieElfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieElf}", + "SparkyPainting": "{$PaintingArtist.Crowno}\nС любовью", + "PaintingAcorns": "{$PaintingArtist.Lazure}", + "PaintingColdSnap": "{$PaintingArtist.Lazure}", + "PaintingCursedSaint": "{$PaintingArtist.Lazure}", + "PaintingSnowfellas": "{$PaintingArtist.Lazure}", + "PaintingTheSeason": "{$PaintingArtist.Lazure}", + "RedString": "{$CommonItemTooltip.String}", + "OrangeString": "{$CommonItemTooltip.String}", + "YellowString": "{$CommonItemTooltip.String}", + "LimeString": "{$CommonItemTooltip.String}", + "GreenString": "{$CommonItemTooltip.String}", + "TealString": "{$CommonItemTooltip.String}", + "CyanString": "{$CommonItemTooltip.String}", + "SkyBlueString": "{$CommonItemTooltip.String}", + "BlueString": "{$CommonItemTooltip.String}", + "PurpleString": "{$CommonItemTooltip.String}", + "VioletString": "{$CommonItemTooltip.String}", + "PinkString": "{$CommonItemTooltip.String}", + "BrownString": "{$CommonItemTooltip.String}", + "WhiteString": "{$CommonItemTooltip.String}", + "RainbowString": "{$CommonItemTooltip.String}", + "BlackString": "{$CommonItemTooltip.String}", + "BlackCounterweight": "{$CommonItemTooltip.Counterweight}", + "BlueCounterweight": "{$CommonItemTooltip.Counterweight}", + "GreenCounterweight": "{$CommonItemTooltip.Counterweight}", + "PurpleCounterweight": "{$CommonItemTooltip.Counterweight}", + "RedCounterweight": "{$CommonItemTooltip.Counterweight}", + "YellowCounterweight": "{$CommonItemTooltip.Counterweight}", + "KingSlimeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "EyeOfCthulhuBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "EaterOfWorldsBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "BrainOfCthulhuBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "QueenBeeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "SkeletronBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "WallOfFleshBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "DestroyerBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "TwinsBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "SkeletronPrimeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "PlanteraBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "GolemBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "FishronBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "CultistBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "MoonLordBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "GoblinSummonerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinSummoner}", + "SalamanderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Salamander}", + "GiantShellyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantShelly}", + "CrawdadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crawdad}", + "FritzBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Fritz}", + "CreatureFromTheDeepBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CreatureFromTheDeep}", + "DrManFlyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DrManFly}", + "MothronBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mothron}", + "SeveredHandBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "ThePossessedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ThePossessed}", + "ButcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Butcher}", + "PsychoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Psycho}", + "DeadlySphereBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DeadlySphere}", + "NailheadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nailhead}", + "PoisonousSporeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "MedusaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Medusa}", + "GreekSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreekSkeleton}", + "GraniteFlyerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GraniteFlyer}", + "GraniteGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GraniteGolem}", + "BloodZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodZombie}", + "DripplerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Drippler}", + "TombCrawlerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TombCrawlerHead}", + "DuneSplicerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DuneSplicerHead}", + "FlyingAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingAntlion}", + "WalkingAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WalkingAntlion}", + "DesertGhoulBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertGhoul}", + "DesertLamiaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertLamiaDark}", + "DesertDjinnBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertDjinn}", + "DesertBasiliskBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertBeast}", + "RavagerScorpionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertScorpionWalk}", + "StardustSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustSoldier}", + "StardustWormBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustWormHead}", + "StardustJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustJellyfishBig}", + "StardustSpiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustSpiderBig}", + "StardustSmallCellBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "StardustLargeCellBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustCellBig}", + "SolarCoriteBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarCorite}", + "SolarSrollerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarSroller}", + "SolarCrawltipedeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarCrawltipedeHead}", + "SolarDrakomireRiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarDrakomireRider}", + "SolarDrakomireBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarDrakomire}", + "SolarSolenianBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarSolenian}", + "NebulaSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaSoldier}", + "NebulaHeadcrabBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaHeadcrab}", + "NebulaBrainBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaBrain}", + "NebulaBeastBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaBeast}", + "VortexLarvaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexLarva}", + "VortexHornetQueenBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexHornetQueen}", + "VortexHornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexHornet}", + "VortexSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexSoldier}", + "VortexRiflemanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexRifleman}", + "PirateCaptainBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCaptain}", + "PirateDeadeyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateDeadeye}", + "PirateCorsairBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCorsair}", + "PirateCrossbowerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCrossbower}", + "MartianWalkerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianWalker}", + "RedDevilBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RedDevil}", + "PinkJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PinkJellyfish}", + "GreenJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreenJellyfish}", + "DarkMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DarkMummy}", + "LightMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LightMummy}", + "AngryBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryBones}", + "IceTortoiseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceTortoise}", + "SandSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandSlime}", + "SeaSnailBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SeaSnail}", + "MoonLordPainting": "{$PaintingArtist.Crowno}", + "SandElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandElemental}", + "SandsharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandShark}", + "SandsharkCorruptBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkCorrupt}", + "SandsharkCrimsonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkCrimson}", + "SandsharkHallowedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkHallow}", + "TumbleweedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Tumbleweed}", + "BossBagBetsy": "{$CommonItemTooltip.RightClickToOpen}", + "BossBagOgre": "{$CommonItemTooltip.RightClickToOpen}", + "BossBagDarkMage": "{$CommonItemTooltip.RightClickToOpen}", + "ExplosiveBunny": "Для использования с кроличьей пушкой", + "VialofVenom": "Крайне токсично", + "FlaskofVenom": "Атаки ближнего боя накладывают на противников эффект «Яд»", + "VenomArrow": "Накладывает на цель эффект яда", + "VenomBullet": "Накладывает на цель эффект яда", + "PartyBullet": "При попадании выбрасывает конфетти", + "NanoBullet": "Вызывает запутанность", + "ExplodingBullet": "Взрывается при попадании", + "GoldenBullet": "Убитые враги оставляют больше денег", + "FlaskofCursedFlames": "Ближние атаки накладывают на врагов проклятый огонь", + "FlaskofFire": "Ближние атаки поджигают врагов", + "FlaskofGold": "При ближних атаках враги оставляют больше золота", + "FlaskofIchor": "Ближние атаки снижают защиту врагов", + "FlaskofNanites": "Ближние атаки накладывают на врагов запутанность", + "FlaskofParty": "Ближние атаки вызывают появление конфетти", + "FlaskofPoison": "Ближние атаки отравляют врагов", + "CobaltBreastplate": "Увеличивает шанс критического урона на 3 %", + "CobaltLeggings": "Увеличивает скорость движения на 10 %", + "MythrilChainmail": "Увеличивает урон на 5 %", + "MythrilGreaves": "Увеличивает шанс критического урона на 3 %", + "RocketI": "Маленький радиус взрыва. Не уничтожает плитки", + "RocketII": "Маленький радиус взрыва. Уничтожает плитки", + "RocketIII": "Большой радиус взрыва. Не уничтожает плитки", + "RocketIV": "Большой радиус взрыва. Уничтожает плитки", + "AsphaltBlock": "Увеличивает скорость бега", + "CobaltPickaxe": "Может добывать мифрил и орихалк", + "MythrilPickaxe": "Может добывать адамантит и титан", + "Cannonball": "Для использования с пушкой", + "Arkhalis": "Я не снял это с Чму", + "BoneGlove": "Шанс 33 % не потратить кость", + "LogicGate_AND": "Работает при включении всех ламп, иначе отключается", + "LogicGate_NAND": "Работает при выключении всех ламп, иначе отключается", + "DD2FlameburstTowerT2Popper": "{$ItemTooltip.DD2FlameburstTowerT1Popper}", + "DD2FlameburstTowerT3Popper": "{$ItemTooltip.DD2FlameburstTowerT1Popper}", + "DD2BallistraTowerT2Popper": "{$ItemTooltip.DD2BallistraTowerT1Popper}", + "DD2BallistraTowerT3Popper": "{$ItemTooltip.DD2BallistraTowerT1Popper}", + "DD2ExplosiveTrapT2Popper": "{$ItemTooltip.DD2ExplosiveTrapT1Popper}", + "DD2ExplosiveTrapT3Popper": "{$ItemTooltip.DD2ExplosiveTrapT1Popper}", + "DD2LightningAuraT2Popper": "{$ItemTooltip.DD2LightningAuraT1Popper}", + "DD2LightningAuraT3Popper": "{$ItemTooltip.DD2LightningAuraT1Popper}", + "ApprenticeScarf": "{$ItemTooltip.HuntressBuckler}", + "SquireShield": "{$ItemTooltip.HuntressBuckler}", + "MonkBelt": "{$ItemTooltip.HuntressBuckler}", + "GolfClubStoneIron": "{$CommonItemTooltip.GolfIron}", + "ApprenticeAltPants": "Увеличивает урон прислужников на 20 % и шанс критического магического удара на 25 %", + "ApprenticeAltShirt": "Увеличивает урон прислужников на 30 % и магический урон на 15 %", + "GolfClubGoldWedge": "{$CommonItemTooltip.GolfWedge}", + "ApprenticeRobe": "Увеличивает урон прислужников на 20 % и магический урон на 10 %", + "ApprenticeStaffT3": "Выпускает испарения, снижающие защиту!", + "GoldenCrateHard": "{$ItemTooltip.GoldenCrate}", + "BookStaff": "Интересно, кто умудрился насадить книгу бесконечной мудрости на палку...\n, чтобы призвать мощный торнадо", + "GolfBallDyedSkyBlue": "{$CommonItemTooltip.GolfBall}", + "DD2BetsyBow": "Стреляет разделяющимися стрелами, наносит повышенный урон летающим врагам", + "DD2ElderCrystal": "Поместите на стенд из этерианского кристалла, чтобы открыть этерианские порталы", + "DD2ElderCrystalStand": "Удерживает этерианский кристалл", + "DD2EnergyCrystal": "Часто используется, чтобы показать чью-то волю в качестве физической формы защиты", + "GolfBallDyedRed": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedTeal": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedPurple": "{$CommonItemTooltip.GolfBall}", + "DD2PetDragon": "Призывает ручного дракона", + "DD2PetGato": "Призывает ручного кота", + "DD2PetGhost": "Призывает огонек, который дает свет", + "DD2PhoenixBow": "Подчиняет силу неугасающих огней", + "DD2SquireBetsySword": "Выпускает вперед энергию сердца", + "DD2SquireDemonSword": ", чтобы закрыться щитом", + "DefenderMedal": "Валюта для торговли с трактирщиком", + "ShuckedOyster": "{$CommonItemTooltip.MinorStats}", + "HuntressAltPants": "Увеличивает урон прислужников на 25 % и скорость движения на 20 %", + "HuntressAltShirt": "Увеличивает урон прислужников и дистанционный урон на 25 %", + "GolfClubBronzeWedge": "{$CommonItemTooltip.GolfWedge}", + "HuntressJerkin": "Увеличивает урон прислужников и дистанционный урон на 20 %", + "HuntressPants": "Увеличивает урон прислужников на 10 % и скорость движения на 20 %", + "GolfClubWoodDriver": "{$CommonItemTooltip.GolfDriver}", + "Oyster": "{$CommonItemTooltip.RightClickToOpen}", + "MonkAltPants": "Увеличивает урон прислужников, скорость движения и шанс критического урона в ближнем бою на 20 %", + "MonkAltShirt": "Увеличивает урон прислужников и скорость ближнего боя на 20 %", + "GolfClubMythrilIron": "{$CommonItemTooltip.GolfIron}", + "MonkPants": "Увеличивает урон прислужников на 10 %\nУвеличивает шанс критического удара на 10 % и скорость движения на 20 %", + "MonkShirt": "Увеличивает урон прислужников и урон ближнего боя на 20 %", + "MonkStaffT1": "Накапливает энергию при вращении и нанесении врагам урона", + "MonkStaffT2": "При попадании во врагов призывает призраков", + "MonkStaffT3": ", когда держите в руке, чтобы провести альтернативную атаку!", + "GolfClubRustyPutter": "{$CommonItemTooltip.GolfPutter}", + "IronCrateHard": "{$ItemTooltip.IronCrate}", + "SquireAltShirt": "Увеличивает урон прислужников на 30 % и значительно ускоряет восстановление здоровья", + "GolfClubLeadPutter": "{$CommonItemTooltip.GolfPutter}", + "SquireGreaves": "Увеличивает урон прислужников на 15 %, шанс критического удара в ближнем бою и скорость движения на 20 %", + "SquirePlating": "Увеличивает урон прислужников и урон в ближнем бою на 15 %", + "ArkhalisShirt": "{$ItemTooltip.ArkhalisHat}", + "ArkhalisPants": "{$ItemTooltip.ArkhalisHat}", + "LobsterTail": "{$CommonItemTooltip.MediumStats}", + "ArkhalisHat": "{$CommonItemTooltip.DevItem}\n\"Мне досталось это не от Грида\"", + "LeinforsHat": "{$CommonItemTooltip.DevItem}\n\"Чтобы эти прекрасные замки всегда выглядели роскошно\"", + "LeinforsShirt": "{$CommonItemTooltip.DevItem}\n\"Делает попку сексуальной\"", + "LeinforsPants": "{$CommonItemTooltip.DevItem}\n\"Сюрприз Шии! Не ожидали этого от штанов?\"", + "OceanCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "LeinforsAccessory": "{$CommonItemTooltip.DevItem}\n\"Для лучшего результата сочетать с макаронной диетой\"", + "KiteSpectrum": "{$CommonItemTooltip.Kite}", + "KiteWanderingEye": "{$CommonItemTooltip.Kite}", + "KiteUnicorn": "{$CommonItemTooltip.Kite}", + "FairyQueenBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "LavaCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LavaCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "HotlineFishingHook": "{$CommonItemTooltip.LavaFishing}", + "LavaFishingHook": "{$CommonItemTooltip.LavaFishing}", + "TeleportationPylonJungle": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonPurity": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonHallow": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonUnderground": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonOcean": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonDesert": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonSnow": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonMushroom": "{$CommonItemTooltip.TeleportationPylon}", + "RockGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RockGolem}", + "BloodMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodMummy}", + "SporeSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SporeSkeleton}", + "SporeBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SporeBat}", + "LarvaeAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LarvaeAntlion}", + "CrimsonBunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonBunny}", + "CrimsonGoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonGoldfish}", + "CrimsonPenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonPenguin}", + "BigMimicCorruptionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicCorruption}", + "BigMimicCrimsonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicCrimson}", + "BigMimicHallowBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicHallow}", + "MossHornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MossHornet}", + "WanderingEyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WanderingEye}", + "CreativeWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "RainbowWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressUpToBooster}", + "LongRainbowTrailWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}\n{$CommonItemTooltip.PressUpToBooster}" + }, + "CommonItemTooltip": { + "SpecialCrafting": "Использоуется для создания особых предметов", + "DevItem": "Отлично подходит, чтобы впечатлить разработчиков!", + "FlightAndSlowfall": "Позволяет летать и замедляет падение", + "RightClickToOpen": "Нажмите , чтобы открыть", + "BannerBonus": "Игроки поблизости получают бонус против: ", + "Counterweight": "Бросает противовес после попадания йо-йо по врагу", + "MinuteDuration": "Длительность {0} мин.", + "PlaceableOnXmasTree": "Надевается на новогоднюю ель", + "RestoresLife": "Восстанавливает {0} ед. здоровья", + "RestoresMana": "Восстанавливает {0} ед. маны", + "SecondDuration": "Длительность {0} с", + "String": "Увеличивает дистанцию действия йо-йо", + "UsesLife": "Использует {0} ед. здоровья", + "UsesMana": "Использует {0} ед. маны" + }, + "BuffDescription": { + "WellFed_Expert": "Немного повышает все характеристики и ускоряет регенерацию здоровья" + } +} \ No newline at end of file diff --git a/Localization/Content/ru-RU/Legacy.json b/Localization/Content/ru-RU/Legacy.json new file mode 100644 index 0000000..0e73ded --- /dev/null +++ b/Localization/Content/ru-RU/Legacy.json @@ -0,0 +1,1143 @@ +{ + "LegacyWorldGen": { + "0": "Создание участка мира...", + "10": "Создание пещер у поверхности...", + "11": "Создание джунглей...", + "12": "Создание парящих островов...", + "13": "Добавление грибниц...", + "14": "Укладка грязи в землю...", + "15": "Добавление ила...", + "16": "Добавление блестяшек...", + "17": "Добавление паутины...", + "18": "Создание Преисподней...", + "19": "Добавление водных тел...", + "1": "Добавление песка...", + "20": "Обращение мира во зло...", + "21": "Создание горных пещер...", + "22": "Создание пляжей...", + "23": "Добавление самоцветов...", + "24": "Утяжеление песка...", + "25": "Очистка фонов земли...", + "26": "Установка алтарей...", + "27": "Настройка жидкостей...", + "28": "Установка кристаллов жизни...", + "29": "Установка статуй...", + "2": "Создание холмов...", + "30": "Сокрытие сокровищ...", + "31": "Сокрытие других сокровищ...", + "32": "Сокрытие сокровищ в джунглях...", + "33": "Сокрытие сокровищ в воде...", + "34": "Установка ловушек...", + "35": "Установка хрупких предметов...", + "36": "Установка адских кузниц...", + "37": "Посев травы...", + "38": "Выращивание кактусов...", + "39": "Высаживание подсолнухов...", + "40": "Высадка деревьев...", + "41": "Посев трав...", + "42": "Высадка водорослей...", + "43": "Выращивание лозы...", + "44": "Высадка цветов...", + "45": "Посев грибов...", + "46": "Освобождение неиспользованных ресурсов...", + "47": "Сброс игровых объектов...", + "48": "Настройка сложного режима...", + "49": "Сохранение данных о мире...", + "4": "Укладка камней в землю...", + "50": "Резервное копирование файла мира...", + "51": "Загрузка данных мира...", + "52": "Проверка выравнивания...", + "53": "Ошибка загрузки!", + "54": "Резервные копии не найдены.", + "55": "Поиск рамок блоков...", + "56": "Добавление снега...", + "57": "Мир", + "58": "Создание Темницы...", + "59": "Упал метеорит!", + "5": "Укладка земли на камни...", + "60": "Сглаживание мира...", + "61": "Добавление мха...", + "62": "Добавление самоцветов...", + "63": "Создание стен пещер...", + "64": "Увеличение паучьих пещер...", + "65": "Очистка данных карты...", + "66": "Очистка данных карты...", + "67": "Загрузка данных карты...", + "68": "Создание карты...", + "69": "Создание водопадов...", + "6": "Добавление глины...", + "70": "Создание руин в джунглях...", + "71": "Создание осиных гнезд...", + "72": "Добавление в мир крови...", + "73": "Подтверждение сохранения мира...", + "74": "Слизни падают с неба!", + "75": "Слизни прекратили падать с неба.", + "77": "Добавление травы...", + "78": "Опустынивание...", + "7": "Создание случайных отверстий...", + "80": "Долбление мрамора", + "81": "Выращивание гранита...", + "8": "Создание небольших пещер...", + "9": "Создание больших пещер..." + }, + "LegacyDialog": { + "1": "Надеюсь, что такой костлявы человек как ты — это не все, что стоит между нами и глазом Ктулху.", + "10": "Посмотри на мою землю, она очень сухая.", + "100": "Зачем очищать мир, если его можно просто взорвать?", + "101": "Если бросите это в ванну, закрыв все окна, вам прочистит пазухи и вынесет барабанные перепонки!", + "102": "Хотите сыграть в \"кто дольше удержит ракету\"?", + "103": "Не подпишите этот отказ от всех претензий?", + "104": "ЗДЕСЬ ЗАПРЕЩЕНО КУРИТЬ!!!", + "105": "Моя взрывчатка — это просто бомба! Налетай-покупай!", + "106": "Сегодня подходящий день, чтобы умереть!", + "107": "Интересно, а что если я... (БА-БАХ!)... Ой, простите — вам же не особо была нужна эта нога?", + "108": "Динамит — мое специальное и лучшее средство от всех болезней.", + "109": "Зацени мои товары — у меня взрывные цены!", + "11": "Парень, солнце печет! У меня есть броня с прекрасной вентиляцией.", + "110": "У меня остались смутные воспоминания о том, как женщину связывают и бросают в темницу.", + "111": "… у нас проблема! Взошла кровавая луна!", + "112": "Будь я помоложе, {Nurse} обязательно пошла бы со мной на свидание. Я был таким донжуаном.", + "113": "Кажется, я где-то видел эту твою красную шапку…", + "114": "Еще раз спасибо за то, что снял с меня проклятие. Я почувствовал как что-то прыгнуло и укусило меня.", + "115": "Мама всегда говорила, что я стану великим портным.", + "116": "Жизнь похожа на шкаф с одеждой; никогда не знаешь, что наденешь!", + "117": "Конечно, вышивание — это сложное дело. Если бы это было несложно, никто бы этим не занимался. Вот, в чем его ценность.", + "118": "Я знаю все о пошиве и продаже одежды.", + "119": "Пока на мне было проклятие, мне было очень одиноко, поэтому я смастерил себе друга из кожи. Я назвал его Уилсон.", + "12": "Солнце поднялось высоко, а мои цены — нет.", + "120": "Спасибо, что освободил меня, смертный. Меня связали и оставили здесь другие гоблины. Можно сказать, что мы не очень хорошо поладили.", + "121": "Не могу поверить, что они связали и оставили меня здесь только за то, что я сказал, что они идут не на восток!", + "122": "Теперь, когда я изгой, могу я выбросить эти шары с шипами? У меня порваны карманы.", + "123": "Ищешь специалиста по устройствам? Я твой гоблин!", + "124": "Спасибо за помощь. Пора заканчивать с бесцельным брожением здесь. Уверен, что мы еще встретимся.", + "125": "Я думал, что ты выше.", + "126": "Эй, о чем думает {Mechanic}? Ты... ты случайно не говорил с ней?", + "127": "Эй, у тебя в шляпе есть мотор? Думаю, что у меня есть мотор, который точно поместится в эту шляпу.", + "128": "Эй, я слышал, ты любишь ракеты и сапоги-скороходы, поэтому я приделал несколько ракет к твоим сапогам-скороходам.", + "129": "Молчание — золото. Клейкая лента — серебро.", + "13": "Ох, отлично! Я отсюда слышу, как ругаются {Mechanic} и {Nurse}.", + "130": "ДА, золото прочнее железа. Чему только учат сейчас людей?", + "131": "Знаешь, на бумаге эта конструкция из шахтерской каски с ластами смотрелась гораздо лучше.", + "132": "Гоблинов удивительно просто разгневать. На самом деле, они могут начать войну из-за куска ткани!", + "133": "Честно говоря, большинство гоблинов сложно назвать гениями. Ну, кроме некоторых.", + "134": "Ты знаешь, почему мы все таскаем эти шары с шипами? Я точно не знаю.", + "135": "Я только что закончил мое новое изобретение! Эта версия больше не взрывается, если на нее слишком сильно подуть.", + "136": "Гоблины не слишком сильны в воровстве. Они не могут украсть даже из открытого сундука!", + "137": "Спасибо, что спас меня, друг! Эта повязка уже начала натирать мне.", + "138": "О, ты настоящая героиня!", + "139": "Это так смело! Спасибо, что спасла меня, милая девушка!", + "14": "Ты видел Читха... Ситха... Чат... Тот большой глаз?", + "140": "Это так смело! Спасибо, что спас меня, милый парень!", + "141": "Теперь, когда мы познакомились, я могу ехать с вами, правда?", + "142": "Привет, {Guide}! Что я могу сделать для тебя сегодня?", + "143": "Привет, {Demolitionist}! Что я могу сделать для тебя сегодня?", + "144": "Привет, {GoblinTinkerer}! Что я могу сделать для тебя сегодня?", + "145": "Привет, {Nurse}! Что я могу сделать для тебя сегодня?", + "146": "Привет, {Mechanic}! Что я могу сделать для тебя сегодня?", + "147": "Привет, {Dryad}! Что я могу сделать для тебя сегодня?", + "148": "Может, мне достать монетку из-за уха? Нет? Ладно.", + "149": "Хочешь волшебную конфету? Нет? Ладно.", + "15": " Эй, этот дом ведь безопасен? Правда? {PlayerName}?", + "150": "Я приготовлю превосходный горячий шоколад, если ты... Нет? Ладно.", + "151": "Ты здесь, чтобы взглянуть на мой хрустальный шар?", + "152": "Тебе хотелось когда-нибудь иметь волшебное кольцо, которое превращает скалы в тину? Ну, мне тоже не хотелось.", + "153": "Кто-то рассказывал мне, что дружба — это волшебство. Это просто смешно. С помощью дружбы не превратишь людей в лягушек.", + "154": "Теперь я вижу твое будущее… Ты купишь у меня много товаров!", + "155": "Когда-то я пытался оживить статую ангела. Это ничего не дало.", + "156": "Спасибо! Это был лишь вопрос времени, когда я разделила бы судьбу всех этих скелетов.", + "157": "Эй, смотри куда прешь! Я только что тут стояла!", + "158": "Подожди, мне почти удалось провести сюда Wi-Fi.", + "159": "Но я почти закончила устанавливать здесь мерцающие огоньки!", + "16": "Даже кровавая луна не остановит капитализм. Давай займемся делом.", + "160": "НЕ ДВИГАЙСЯ. Я УРОНИЛА СВОЮ КОНТАКТНУЮ ЛИНЗУ.", + "161": "Все, что я хочу сделать с выключателем, это… Что?!", + "162": "О, дай я угадаю. Купил мало проводов? Идиот.", + "163": "Ты не мог бы просто... Пожалуйста! Хорошо? Ладно. Хм.", + "164": "Мне не нравится, как ты на меня смотришь. Я сейчас РАБОТАЮ.", + "165": "Эй, {PlayerName}, тебя прислал {GoblinTinkerer}? Он случайно ничего обо мне не говорил?", + "166": "{ArmsDealer} надоедает мне с расспросами о нажимной плите. Я сказала, что на нее нужно наступать.", + "167": "Всегда покупай больше проводов, чем нужно!", + "168": "Ты убедился, что твой прибор подключен?", + "169": "О, ты знаешь, чего не хватает этому дому? Мерцающих огоньков.", + "170": "Когда выходит кровавая луна, небо становится красным. Есть в ней что-то такое, что заставляет вылезать монстров.", + "171": "Эй, приятель, не знаешь, ты где-нибудь растет мертвая трава? О нет, мне просто интересно, вот и все.", + "172": "Если бы ты выглянул, то увидел бы, что луна стала красной.", + "173": "Этой ночью тебе лучше не выходить из дому. Бродить в темноте очень опасно.", + "174": "Поздравляю, {PlayerName}! Я могу тебе чем-то помочь?", + "175": "Я здесь, чтобы дать тебе совет в том, что делать дальше. Советую обращаться ко мне всякий раз, когда у тебя возникнут трудности.", + "176": "Говорят, есть человек, который подскажет тебе, как выжить на этой земле… погоди. Это я.", + "177": "Ты можешь использовать кирку, чтобы копать землю, и топор, чтобы рубить деревья. Просто помести курсор на ячейку и щелкни кнопку!", + "178": "Если хочешь выжить, тебе нужно создать оружие и построить жилье. Начни с рубки деревьев и сбора древесины.", + "179": "Нажми {InventoryKey}, чтобы перейти в меню изготовления. Когда у тебя будет достаточно дерева, сделай верстак. Это позволит тебе изготавливать более сложные вещи, находясь рядом с верстаком", + "18": "Кош, каплек Мог. Извини, на клингонском это значит «Купи что-нибудь или умри».", + "180": "Ты можешь построить жилье из древесины или других материалов, найденных в мире. Не забудь создать и установить стены.", + "181": "Когда у тебя появится деревянный меч, ты можешь попробовать добыть гель, убивая слизней. Объедини древесину и гель, чтобы сделать факел!", + "182": "Для взаимодействия с фоновыми предметами используй молот!", + "183": "Отправляйся под землю, чтобы добыть металлическую руду. Из нее можно делать очень полезные предметы.", + "184": "У тебя появилась руда, и теперь тебе нужно выплавить из нее слитки. Для этого нужна печь!", + "185": "Печь можно сделать из факелов, древесины и камня. Убедись, что стоишь у верстака.", + "186": "Для изготовления большинства предметов из слитков металла нужна наковальня.", + "188": "В подземелье можно найти хрустальные сердца, которые увеличивают максимальное количество здоровья. Их можно разбить киркой.", + "19": "{PlayerName}, да? Я слышал кое-что интересное, друг!", + "191": "Существует много способов привлечь новых жителей в свой город. Конечно, им нужны дома.", + "192": "Чтобы комната считалась домом, в ней должен быть дверь, стул, стол и источник света. Еще у дома должны быть стены.", + "193": "Два человека не будут жить в одном доме. Если дом уничтожают, люди будут искать новое место для жилья.", + "194": "Можно использовать интерфейс дома, чтобы задавать назначение дома и просматривать его. Откройте инвентарь и нажмите значок дома.", + "195": "Чтобы в городе поселился торговец, нужно много денег. 50 серебряных монет будет достаточно!", + "196": "Чтобы поселилась медсестра, нужно увеличить свой максимальный уровень жизни.", + "197": "Если у тебя есть огнестрельное оружие, то в городе обязательно поселится торговец оружием!", + "198": "Покажи свои силы и убей сильного монстра. Это привлечет в город дриаду.", + "199": "Не забывай тщательно исследовать темницу. Там могут удерживаться пленники.", + "2": "Ты только посмотри на свою дрянную броню. Лучше прикупи себе лечебных зелий.", + "20": "Мне говорили об одном тайном сокровище... Хотя, забудь.", + "200": "Возможно, теперь старик из темницы захочет к нам присоединиться, ведь его заклятие снято.", + "201": "Собирай все найденные бомбы. Ими может заинтересоваться подрывник.", + "202": "Гоблины действительно настолько отличаются от нас, что мы не можем жить в мире?", + "203": "Мне говорили, что в этих краях живет великий волшебник. Не забудь поискать его, когда снова отправишься в подземелье.", + "204": "Если соединить линзы с алтарем демонов, то можно найти способ вызвать могущественного монстра. Хотя, лучше дождаться ночи, прежде чем использовать это.", + "205": "Пищу для червей можно сделать, соединив гниль и ужасный порошок. Перед использованием не забудь убедиться, что ты находишься на земле, пораженной порчей.", + "206": "Алтари демонов обычно можно найти на Порче. Для создания предметов нужно быть рядом с ними.", + "208": "Найдя горшок, обязательно разбей его. В них бывают разные полезные вещи.", + "209": "Сокровища спрятаны по всему миру. Глубоко под землей можно найти столько замечательных вещей!", + "21": "Статуя ангела, говоришь? Извини, я не торгую барахлом.", + "210": "Иногда при разбитии теневой сферы на землю падает метеорит. Теневые сферы обычно можно найти в разломах вокруг земель Порчи.", + "211": "Чтобы увеличить свое максимальное здоровье, нужно сосредоточиться на поиске кристаллов жизни.", + "212": "Сейчас у тебя плохая экипировка. Тебе нужна броня получше.", + "213": "Думаю, тебе уже по плечу первая крупная битва. Собери несколько линз из демонических глаз ночью и принеси их к алтарю демонов.", + "214": "Прежде чем приступать к новым битвам, тебе будет неплохо увеличить уровень здоровья. Пятнадцати сердец будет достаточно.", + "215": "Эбонит из Порчи можно очистить с помощью пыли дриады или уничтожить взрывчаткой.", + "216": "Дальше тебе нужно исследовать зараженный порчей разлом. Найди и уничтожь теневую сферу.", + "217": "Недалеко отсюда есть старая темница. Думаю, пришло время туда прогуляться.", + "218": "Постарайся максимально увеличить свой запас здоровья. Попробуй собрать двадцать сердец.", + "219": "В джунглях можно найти много сокровищ, если у тебя хватит сил зарыться достаточно глубоко.", + "22": "Последний мой посетитель оставил мне кое-какое барахло... в смысле... сокровища!", + "220": "Преисподняя сделана из материала, называемого адский камень. Он идеально подходит для создания оружия и брони.", + "221": "Когда соберешься бросить вызов хранителю Преисподней, тебе придется принести живую жертву. Все нужное для этого ты найдешь в Преисподней.", + "222": "Не забудь разбивать все найденные алтари демонов. При этом обязательно будет происходить что-то хорошее!", + "223": "Иногда в самых темных или светлых уголках могут собираться души падших существ.", + "224": "Йо-хо-хо, и бутылка... Гоголя-моголя!", + "225": "Не испечешь ли ты мне печеньки?", + "226": "Что? Ты думал, что меня не существует?", + "227": "Мне удалось пришить твое лицо назад. Осторожнее в следующий раз.", + "228": "Думаю, от этого останется шрам.", + "229": "Так лучше. Больше не хочу смотреть на твои прыжки со скал.", + "23": "Интересно, а что если луна сделана из сыра... уф, что? О да, купи что-нибудь!", + "230": "Тогда было не слишком больно, не то что теперь?", + "231": "Жить в подземелье и так не сладко, а тут еще и придурки как ты приходят и крадут моих детей, пока я сплю.", + "232": "Скажу откровенно, {Dryad} — единственная, кому я доверяю. Только она никогда не пыталась съесть меня или использовать для приготовления зелья.", + "233": "Я как-то попробовал облизать себя, чтобы понять, с чего вся эта суета. Все начало светиться синим цветом.", + "234": "Каждый раз, когда я вижу синий цвет, это вводит меня в лень и депрессию.", + "235": "Вы тут поблизости не видели свиней? Мой брат потерял ногу из-за одной из них.", + "236": "Все в этом городе немного странные. Прошлой ночью я проснулся и увидел, что портной жует мою ногу.", + "237": "Я дам тебе скидку на одежду, если ты сделаешь так, чтобы {Truffle} пришел на... примерку.", + "238": "Думаю, {Truffle} просто немного своеобразный, но он очень славный малый.", + "24": "Золото, мне не послышалось? Я его у тебя заберу.", + "240": "Я не знаю, что такое танец трюфелей, поэтому хватит меня спрашивать!", + "241": "Обо мне ходили такие громкие слухи, что-то вроде «если не можешь победить его, то съешь его!»", + "242": "У тебя нет этой моей чертовой шняги?", + "243": "Может, мне стать воздушным пиратом? Я думал стать пиратом.", + "244": "Как бы там ни было, реактивный ранец отлично тебе подойдет!", + "245": "В последнее время чувствую себя немного раздражительным, поэтому хватит меня доставать, ты, оборванец!", + "246": "Меня очень интересует тот чувак {Cyborg}. На чем он работает, чтобы поддерживать такое перемещение?", + "247": "Тот кэп кажется мне нализавшимся в зюзю, если ты знаешь, что я имею в виду!", + "248": "Покажи мне экипировку!", + "249": "Мне нравится твоя... экипировка. Она из латуни?", + "25": "Лучше не поливать меня кровью.", + "250": "Попав в Освящение, ты увидишь радугу в небе. Могу помочь тебе покрасить это, если хочешь.", + "251": "Посмотри, это {PartyGirl}. Теперь это девушка, которая может выкрасить город в красный цвет!", + "252": "Я знаю разницу между лазурным и сине-зеленым. Но я тебе ее не скажу.", + "253": "У меня закончились титановые белила, поэтому даже не спрашивай.", + "254": "Попробуй яркий розовый и пурпурный — это подойдет, клянусь!", + "255": "Нет, нет, нет... Существует КУЧА оттенков серого! Не заставляй меня начать...", + "256": "Надеюсь, дождь не пойдет снова, пока краска не высохнет. Это будет катастрофа!", + "257": "Вот тебе самые богатые цвета в обмен на твои богатства!", + "258": "Милый человек, твоя одежда — нечто совершенно тусклое. Тебе непременно нужно взять урок окраски своих блеклых тканей!", + "259": "Единственный вид дерева, который стоит выкрасить — РОСКОШНОЕ красное дерево. Окрашивание других видов дерева — бесполезная трата времени.", + "26": "Поторопись и хватит истекать кровью.", + "260": "{Pirate} — проблема, с которой нужно что-то решать. Каждый раз, когда он заходит, я потом неделю вывожу его запах!", + "261": "Ну что я за доктор? Я — знахарь.", + "262": "В сердце магии — природа. Природа сердец — это магия.", + "263": "{Nurse} может исцелить твое тело, но я могу включить в твое тело исцеление.", + "264": "Выбирай тщательно, {PlayerName}, мои товары непостоянны, а мои темные искусства загадочны.", + "265": "Нам нужно поговорить. О... о вечеринках.", + "266": "Не знаю, что мне нравится больше — вечеринки или афтепати.", + "267": "Нужно устроить вечеринку мерцающего корня, а еще афтепати.", + "268": "Ух ты! {PlayerName}, от встречи с таким рискованным парнем как ты мне сразу захотелось на вечеринку!", + "269": "Повесь диско-шар, и я покажу тебе, как отрываться.", + "27": "Ты умрешь — лучше сделай это снаружи.", + "270": "Я однажды была в Швеции, и они там так отрываются, не то, что ты.", + "271": "Меня зовут {PartyGirl}, но люди зовут меня кайфоломщицей. Я не знаю, но это звучит круто", + "272": "Ты ходишь на вечеринки? Иногда? Хм, хорошо, тогда мы можем поговорить...", + "273": "Я не сухопутная крыса, но лучше поплыть один раз и проиграть, чем совсем никогда не плавать.", + "274": "Йо-хо-хо, и бутылка... мерцающего корня!", + "275": "ДА! Забавно, тебе стоило сказать о попугаях, потому что... эм... О чем мы там говорили?", + "276": "{PlayerName}, ты одна из самых милых дамочек, которые капитан видел за столько дней!", + "277": "Держись подальше от моей добычи, ты, прохвост!", + "278": "Что, черт возьми, ты несешь? Моби Дик мой!", + "279": "*Эррмм... Бармм... Абарм...*", + "28": "И что бы это значило?!", + "280": "А затем модуль 492-8 сказал: «Ты думаешь, кто я такой, модуль 472-6?» ХА. ХА. ХА.", + "281": "Моя скорость критически снизилась после попадания пули в мой двигательный привод.", + "282": "Это неправильное выражение, да?", + "283": "Значит, девушка-панк — это выдумки? Думаю, я бы смог показать ей пару интересных вещей!", + "284": "Конечно, {Pirate} — мой приятель, но я ненавижу, когда его попугай делает на меня свои дела. Эта штука едкая!", + "285": "Я построил себе вкусный механизм и теперь могу выпить немного эля!", + "286": "Иногда я немного выключаюсь... Понимаешь? Хоть немного?", + "287": "Сзади и с боков покороче?", + "288": "Эти тени так хорошо подчеркивают твои глаза!", + "289": "Мои руки липкие от всего этого... воска.", + "29": "Мне не нравится твой тон.", + "290": "Чай? Кофе? Или снова апельсиновый сок?", + "291": "Куколка, нам правда нужно убрать эти секущиеся кончики.", + "292": "Детка!!! Ты моя лучшая подружка!", + "293": "Какой лосьон после бритья могу я предложить вам сегодня, сэр?", + "294": "Присядь на секунду, и я забабахаю тебе шикарную стрижку.", + "295": "Либо у вас есть стиль, либо вам его наведут.", + "296": "Думаю, вам мы сделаем что-то... не требующее особого ухода.", + "297": "Однажды я испробовала средства от Dye Master. Сожгла все кончики. Катастрофа!", + "298": "Ой, бедняжка! Ты... просто присядь. Все будет в порядке. Тссс!", + "299": "Отлично выглядит", + "3": "Чувствую, на меня смотрит кто-то злобный.", + "30": "Почему ты вообще здесь? Если у тебя нет кровотечения, тебе нечего быть здесь. Убирайся!", + "300": "Здравствуйте, сэр! Меня зовут {Stylist}, и сегодня я буду вашим цирюльником.", + "301": "Снять только немного сверху? Ну, так не интересно...", + "302": "Надеюсь, вы оценили, какой прической может похвастаться {PartyGirl} после моих трудов?", + "303": "{Demolitionist} так спалил голову, что мои услуги тут бесполезны. Это дохлый номер.", + "304": "Чаевые — личное дело каждого, но не забывайте, что у меня есть доступ к ножницам и вашей голове.", + "305": "Между прочим, этим лезвием запросто можно перерезать горло.", + "306": "Сегодня мои волосы лучше не трогать, дорогой. Я только что наточила ножницы, и я ищу повода, чтобы использовать их.", + "307": "Хм, {PartyGirl} рассказывала, что {Mechanic} узнал о том, что его подруга {Nurse} потратила остаток зарплаты своего парня на туфли.", + "308": "Однажды я надела на {Cyborg} парик просто для того, чтобы подстричь его. Думаю, ему понравилось!", + "309": "Как то мне захотелось записаться к стилисту {Stylist}. Она просто посмотрела на меня и сказала «не-а».", + "31": "ЧТО?!", + "310": "Думаю, пора привести мои волосы в порядок!", + "311": "Вы сегодня не пробовали красить волосы?", + "312": "Итак, короткая стрижка. Волосы на висках оставить?", + "313": "Я без проблем удаляю волосы в ушах и выщипываю брови, но ни в коем случае не занимаюсь волосами в носу.", + "314": "Хорошо, сиди и ожидай. Я вернусь через 25 минут, чтобы смыть краску...", + "315": "Спасибо, дорогуша! Теперь я наконец-то смогу сделать прическу.", + "316": "Я бы сделала стрижку бесплатно, если бы вы пришли раньше.", + "317": "Не бери собой в дорогу ножницы, говорили они. Ты не застрянешь в паутине, говорили они!", + "318": "Фу, мои волосы все в паутине!", + "319": "Встречаемся через три часа за домом, в котором живет {Guide}. Думаю, у меня есть то, что очень тебе понравится.", + "32": "Вокруг темницы бродил старик? Он выглядел обеспокоенным.", + "320": "{Merchant} совершенно не ценит хорошие цены.", + "321": "Я продаю только то, что могу достать. {Clothier} вечно донимает меня поиском экзотических тканей.", + "322": "Вы выглядите так, словно смогли воспользоваться статуей ангела! Они режут-нарезают, и вокруг все украшают!", + "323": "Я не возвращаю деньги из-за «сожаления покупателей»... И по другим причинам тоже.", + "324": "Купите сейчас и получите бесплатную доставку!", + "325": "Я продаю товары из мест, которые даже могут не существовать!", + "326": "Вы хотите две копейки?! Одна копейка, и по рукам!", + "327": "Сочетание кальяна и кофеварки! А еще готовит фри соломкой!", + "328": "Подходи, посмотри! Крабы по пять! Крупные, но по пять! Крабы по три! Мелкие, но по три!", + "329": "Если вы ищете мусор, то вы не туда пришли.", + "33": "Жаль, что {Demolitionist} неосторожен. Мне надоело каждый день пришивать ему конечности.", + "330": "Комиссионный магазин? Нет, я продаю только самые лучшие товары.", + "331": "Иногда при разбитии багрового сердца на землю падает метеорит. Багровые сердца обычно можно найти в разломах вокруг земель Багрянца.", + "332": "А что если попробовать использовать очищающий порошок на багряном камне из Багрянца?", + "333": "Ты должен избавить мир от этого Багрянца.", + "334": "Эй! У меня есть для тебя работа. Думаю, ты в любом случае не откажешься!", + "335": "Мне нужна рыба, и ты ее мне раздобудешь! Просто спроси меня!", + "336": "Эй! Ты та самая жертв... я имел в виду, тот самый профессиональный рыбак, которого я искал! ", + "337": "{Angler} нуждается в ТЕБЕ в качестве официальной посыльной обезьянки в {WorldName}!", + "338": "Чтооо?! Ты не видишь, что я здесь леску наматываю???", + "339": "У меня достаточно рыбы! Сейчас мне твоя помощь не нужна!", + "34": "Эй, неужели {ArmsDealer} говорил, что к доктору нужно ходить по любому поводу? Просто спрашиваю.", + "340": "В {WorldName} нет поваров, поэтому приходится готовить всю эту рыбу самому! ", + "341": "Эй! Смотри! Я ставлю ловушки для своего самого большого розыгрыша! Никто ничего не заметит! И не смей никому рассказывать!", + "342": "Позволь ребенку дать тебе совет — никогда не пытайся лизнуть ледяной блок! Хотя, забудь об этом — я очень хочу посмотреть, как ты это сделаешь!", + "343": "А бывают лающие рыбы? Я таких не видал, но вдруг тебе повезло больше?", + "344": "В мире {WorldName} полно самых чудных рыб!", + "345": "Я расстроен! Наверное, это была рыба, которая вымерла еще до моего рождения, и это не честно!", + "346": "У меня нет мамы и папы, но у меня есть много рыбы! Это почти одно и то же!", + "347": "Нужно было видеть, какое лицо скорчила {Dryad}, когда я подложил ей на кресло пираний зуб!", + "348": "У меня для тебя есть задание! Мне наплевать на весть этот зомби-апокалипсис вокруг!", + "349": "Поторопись и слушай! Для меня срочно нужно кое-что поймать!", + "35": "Мне нужно серьезно поговорить с {Guide}. Сколько раз в неделю ты можешь приходить с серьезными ожогами от лавы?", + "350": "Ненавижу кровавую луну! Я не сплю всю ночь из-за всех этих страшных шорохов!", + "351": "Кровавая луна — худшее время для рыбалки! Рыба клюет, но и зомби тоже!", + "352": "Поблизости бродит целый базилион монстров!", + "353": "Спасибо за спасение, или как там. Из тебя получится отличный питомец-помощник!", + "354": "Чего? Ты кто вообще? Я совершенно не тонул, ничего подобного!", + "355": "Я спасен! Это очень мило, я могу использовать тебя... то есть, конечно, нанять тебя сделать кое-что отличное для меня!", + "356": "У тебя запасных костей не найдется? Мне нужно заменить сломанное бедро... опять.", + "357": "Прекрасно! Наконец-то кто-то пришел, чтобы снять этих червей с моих рук.", + "358": "Нет болезней, которые не лечатся моим маслом из слизней! Поверь мне, это действует, просто посмотри на мою прекрасную фигуру!", + "359": "У тебя кишка не тонка спуститься сюда, может, купишь что-нибудь?", + "36": "Кажется, так ты выглядишь лучше.", + "360": "Ты не поверишь, какими только предметами в меня не бросались люди... Хочешь купить что-то из этих предметов?", + "361": "Я бы одолжил тебе руку, но в прошлый раз, когда так сделал, мне не возвращали ее месяц.", + "362": "Держись подальше от пауков. Они высосут твои внутренности и оставят от тебя одну пустую оболочку. Уж в этом можешь мне поверить.", + "363": "Единственное, что не меняется в мире — это смерть и налоги. У меня есть и то, и другое!", + "364": "Снова ты? Хочешь больше денег!?", + "365": "Кому-то тут обязательно открывать и закрывать двери так громко?", + "366": "Вижу, у тебя всегда куча свободного времени? Не представляю, какая работа подошла бы таким как ты.", + "367": "Да, да, да! Я скоро отдам тебе твою долю. Тебе стоит запастись чуточкой терпения, ведь я тут делаю за тебя всю работу.", + "368": "И что мне сделать, чтобы от меня все отстали? Иди надоедай кому-то менее занятому!", + "369": "...две бочки патоки плюс..., ой, не обращай внимания — ты уже тут. Вот твои деньги.", + "37": "Эм... Что с твоим лицом?", + "370": "Только между нами... Понятия не имею, почему они пристают с вопросами об оплате аренды.", + "371": "Я как-то предложил, чтобы {Dryad} заплатила мне кое-чем интересным, так после этого у меня в странных местах появились плесень.", + "372": "Пусть {ArmsDealer} перестанет предлагать расплатиться со мной патронами, у меня даже пистолета нет.", + "373": "Почему бы ТЕБЕ не сходить самостоятельно и попросить, чтобы {Demolitionist} отдал деньги, и при этом не потерять руку или ногу, или еще что-то...", + "374": "{Merchant} и я только что говорили о делах. Он хотел узнать, не я ли взял его кредитные карты.", + "38": "О БОЖЕ! Я в порядке, но не НАСТОЛЬКО.", + "380": "Вот твоя доля с налогов, которые я собрал с нашего лишнего населения!", + "381": "Ты снова заберешь у меня все монеты? Просто бери их и убирайся с глаз моих!", + "382": "Блин! Бери свои деньги и убирайся с глаз долой!", + "383": "Это все, что ты получишь сейчас, и ни монетой больше! Бери эти деньги и трать их с умом.", + "39": "Дорогие друзья, сегодня мы собрались здесь, чтобы попрощаться... Ох, ты поправишься.", + "390": "...Кто-то зовет меня жадным? Нет, больше у меня для тебя ничего нет.", + "391": "То есть я для тебя просто денежный знак? Потому что ты спрашиваешь каждый раз, когда видишь меня.", + "392": "Ты когда-нибудь прекратишь говорить «Привет»?", + "393": "Блин! Снова ты? Последний раз я давал тебе монеты всего минуту назад, так что убирайся и приходи позже!", + "394": "Я же дал тебе деньги всего пять минут назад! Проваливай!", + "395": "Тебе снова нужны мои деньги?! И это ты МЕНЯ называешь жадным?", + "396": "Я только что заплатил тебе, и больше не дам ни копейки! Двигай отсюда!", + "397": "Деньги на деревьях не растут, так что хватит трусить мое дерево! Проклятье! ", + "398": "Как тебе удалось так быстро растранжирить все, что я дал тебе в прошлый раз? Черт, у меня тут не благотворительный фонд — пойди и убей слизня!", + "399": "Не так быстро! Я уже давал тебе деньги, теперь катись отсюда! ", + "4": "Меч бьет бумагу! Купи меч сегодня.", + "40": "Твоя рука осталась там. Я принесу ее...", + "400": "Умоляешь так быстро?! Не смотри на меня так, словно за ночь я передумаю! ", + "401": "Не забудь разбивать все найденные багровые алтари. При этом обязательно будет происходить что-то хорошее!", + "402": "Багровые алтари обычно можно найти в Багрянце. Для создания предметов нужно быть рядом с ними.", + "41": "Прекрати быть ребенком! Мне доводилось видеть и хуже.", + "42": "Здесь нужны швы!", + "43": "Снова проблемы с теми хулиганами?", + "44": "Погоди, у меня здесь где-то были повязки из мультфильма.", + "45": "Иди, {PlayerName}, с тобой все будет в порядке. Тьфу!", + "46": "Болит, когда так делаешь? Не делай так.", + "47": "Тебя будто наполовину переварили. Это снова были гонки за слизнями?", + "48": "Повращай головой и покашляй.", + "49": "Это не самое большое на моей памяти... Я однозначно видел раны и побольше.", + "5": "Хочешь яблок? Хочешь морковку? Хочешь ананасов? У нас есть факелы.", + "50": "Хочешь конфетку?", + "51": "Покажи мне, где болит.", + "52": "Жаль, но я тебе не по карману.", + "53": "Мне нужно будет больше золота, чем это.", + "54": "Знаешь, я бесплатно не работаю.", + "55": "Я не особо люблю хеппи-энды.", + "56": "Без пластической хирургии я больше ничего не могу для тебя сделать.", + "57": "Хватить тратить мое время.", + "58": "Я слышал, что где-то в Преисподней есть кукла, на которую очень похож {Guide}. Я бы хотел всадить в нее пару обойм.", + "59": "Давай в темпе! {Nurse} и я через час идем на свидание.", + "6": "Приятное утро, не правда ли? Тебе что-то было нужно?", + "60": "Я хочу то, что продает {Nurse}. Как это она ничего не продает?", + "61": "{Dryad} — красотка. Жаль, что она такая неприступная.", + "62": "Пусть {Demolitionist} тебя не беспокоит — у меня здесь есть все, что тебе нужно.", + "63": "{Demolitionist}, что с ним не так? Он хоть понимает, что мы продаем совершенно разные вещи?", + "64": "Друг, это хорошая ночь, чтобы не говорить ни с кем, ты не находишь, {PlayerName}?", + "65": "Мне нравятся такие ночи, как сегодня. Никогда нет недостатка в том, что убить!", + "66": "Вижу, ты поглядываешь на мини-акулу. Тебе лучше не знать, из чего это сделано.", + "67": "Эй, это тебе не кино, приятель. Боеприпасы продаются отдельно.", + "68": "Руки от моей пушки, дружок!", + "69": "А что если попробовать использовать очищающий порошок на эбоните из Порчи?", + "7": "Друг, ночь уже скоро. Делай выбор, пока можешь.", + "70": "Мне надоело, что {ArmsDealer} флиртует со мной. Он не понимает, что мне уже 500 лет?", + "72": "Ты видел старика, который бродит вокруг темницы? Он не очень хорошо выглядит…", + "73": "Я продаю, что хочу! Если тебе это не нравится, очень жаль.", + "74": "Почему в такие времена у тебя столько агрессии?", + "75": "Я не хочу, чтобы ты купил мой товар. Я хочу, чтобы ты захотел купить мой товар, понятно?", + "76": "Слушай, сегодня вечером только я на улице, или миллионы зомби тоже?", + "77": "Ты должен избавить мир от этой порчи.", + "78": "Будь осторожен; ты нужен Террарии!", + "79": "Песок времени утекает. Ну, и старость никого не украшает.", + "8": "Ты даже не знаешь, почем земля продается за границей.", + "80": "Что там насчет того, что я больше «лаю», чем кусаюсь?", + "81": "В общем, два гоблина заходят в бар, и один говорит другому: «Может, сядем у столика с гобеленом?»", + "82": "Я не могу разрешить тебе войти, пока ты не снимешь с меня проклятие.", + "83": "Если хочешь войти, возвращайся ночью.", + "84": "Моего хозяина нельзя вызвать при свете дня.", + "85": "У тебя еще не хватает сил, чтобы справиться с моим проклятием. Накопи сил и возвращайся.", + "86": "Ты выглядишь жалко. Можешь не надеяться победить моего хозяина в таком виде.", + "87": "Надеюсь, что тебя прикрывает шесть друзей.", + "88": "Пожалуйста, нет, незнакомец. Ты обрекаешь себя на смерть.", + "89": "Тебе нужно больше сил, чтобы снять с меня проклятие…", + "9": "Ах, когда-нибудь они расскажут тебе истории об игроке {PlayerName}... хорошие истории, скорее всего.", + "90": "Незнакомец, хватит ли у тебя силы победить моего хозяина?", + "91": "Пожалуйста! Сразись с моим поработителем и освободи меня! Умоляю тебя!", + "92": "Победи моего хозяина, и я обеспечу тебе проход в темницу.", + "93": "Пытаешь пройти этот эбонитовый камень, да? Почему бы не добавить его в одну из взрывчаток!", + "94": "Эй, ты не видел тут клоуна?", + "95": "Тут была заложена бомба, а теперь я что-то не могу ее найти…", + "96": "У меня тут есть кое-что для этих зомби!", + "97": "Даже {ArmsDealer} хочет то, что я продаю!", + "98": "Вы предпочитаете отверстие от пули или воронку от гранаты? Так я и думал.", + "99": "Уверен, {Nurse} тебе поможет, если это оторвет тебе руку или ногу." + }, + "LegacyMenu": { + "0": "Запустите вторую копию игры Terraria, чтобы присоединиться!", + "100": "Фон ВКЛ.", + "101": "Фон ВЫКЛ.", + "102": "Выберите язык", + "103": "Язык", + "104": "Да", + "105": "Нет", + "106": "Сменить стиль карты ", + "107": "Переключить полноэкранный режим ", + "108": "Приблизить ", + "109": "Отдалить ", + "10": "Загрузить резервную копию", + "110": "Уменьшить прозрачность ", + "111": "Увеличить прозрачность ", + "112": "Карта включена", + "113": "Карта выключена", + "114": "Основные", + "115": "Управление картой", + "116": "Многоядерная обработка освещения:", + "117": "ВЫКЛ.", + "118": "Закрыть меню", + "11": "Резервные копии не найдены", + "120": "Смарт-курсор ", + "121": "Режим смарт-курсора: переключение", + "122": "Режим смарт-курсора: удерживание", + "123": "Панель выполнения события", + "124": "ВЫКЛ.", + "125": "На время", + "126": "ВКЛ.", + "127": "Стиль", + "128": "Предпросмотр размещения ВКЛ.", + "129": "Предпросмотр размещения ВЫКЛ.", + "12": "Один игрок", + "130": "Транспорт ", + "131": "Достижения", + "132": "Кровь и насилие ВКЛ.", + "133": "Кровь и насилие ВЫКЛ.", + "134": "Применить", + "135": "Настройки сервера", + "136": "Многопользовательский режим Steam: ВЫКЛ.", + "137": "Многопользовательский режим Steam: ВКЛ.", + "138": "Разрешенные пользователи: Только по приглашению", + "139": "Разрешенные пользователи: Друзья", + "13": "Многопользовательская игра", + "140": "Друзья могут приглашать: ВЫКЛ.", + "141": "Друзья могут приглашать: ВКЛ.", + "142": "Разрешить друзей друзей: ВЫКЛ.", + "143": "Разрешить друзей друзей: ВКЛ.", + "144": "Начать", + "145": "Присоединиться через Steam", + "146": "Присоединиться по IP-адресу", + "147": "Пригласить друзей", + "148": "Вверх", + "149": "Вниз", + "14": "Настройки", + "150": "Влево", + "151": "Вправо", + "152": "Прыгнуть", + "153": "Бросить", + "154": "Инвентарь", + "155": "Взять", + "156": "Быстрая мана", + "157": "Быстрое усиление", + "158": "Быстрое средство перемещения", + "159": "Быстрое лечение", + "15": "Выход", + "160": "Автовыбор", + "161": "Смарт-курсор", + "162": "Использовать предмет", + "163": "Взаимодействовать", + "164": "Управление геймплеем", + "165": "Управление картой", + "166": "Управление панелью быстрого доступа", + "167": "Настройки геймпада", + "168": "Приблизить", + "169": "Отдалить", + "16": "Создать персонажа", + "170": "Увеличить прозрачность", + "171": "Уменьшить прозрачность", + "172": "Сменить стиль карты", + "173": "Переключиться на полную карту", + "174": "Прокручивать влево", + "175": "Прокручивать вправо", + "176": "Панель быстрого доступа 1", + "177": "Панель быстрого доступа 2", + "178": "Панель быстрого доступа 3", + "179": "Панель быстрого доступа 4", + "17": "Удалить", + "180": "Панель быстрого доступа 5", + "181": "Панель быстрого доступа 6", + "182": "Панель быстрого доступа 7", + "183": "Панель быстрого доступа 8", + "184": "Панель быстрого доступа 9", + "185": "Панель быстрого доступа 10", + "186": "Быстрая отметка 1", + "187": "Быстрая отметка 2", + "188": "Быстрая отметка 3", + "189": "Быстрая отметка 4", + "18": "Волосы", + "190": "Круговая панель быстрого доступа", + "191": "Перевод курсора вверх", + "192": "Перевод курсора вправо", + "193": "Перевод курсора вниз", + "194": "Перевод курсора влево", + "195": "", + "196": "Перевод курсора крестовины", + "197": "Панель быстрого доступа крестовины", + "198": "Расширенные гастройки геймпада", + "199": "Мертвая зона курков", + "19": "Глаза", + "1": "Использует порт ", + "200": "Мертвая зона ползунков", + "201": "Мертвая зона оси X левого мини-джойстика", + "202": "Мертвая зона оси Y левого мини-джойстика", + "203": "Мертвая зона оси X правого мини-джойстика", + "204": "Мертвая зона оси Y правого мини-джойстика", + "205": "Инвертировать левый мини-джойстик по горизонтали", + "206": "Инвертировать левый мини-джойстик по вертикали", + "207": "Инвертировать правый мини-джойстик по горизонтали", + "208": "Инвертировать правый мини-джойстик по вертикали", + "209": "Использовать", + "20": "Кожа", + "210": "Интерфейс", + "211": "Пароли: видны", + "212": "Пароли: скрыты", + "213": "Приоритет смарт-курсора: кирка -> топор", + "214": "Приоритет смарт-курсора: топор -> кирка", + "215": "Смарт-укладка блоков: к курсору", + "217": "Цвет границы", + "218": "Курсор", + "219": "Управление", + "21": "Одежда", + "220": "Активировать бонусы комплекта: вверх", + "221": "Активировать бонусы комплекта: вниз", + "222": "Привязка клавиш", + "223": "Быстрое помещение в корзину левой кнопкой Shift: ВКЛ.", + "224": "Быстрое помещение в корзину левой кнопкой Shift: ВЫКЛ.", + "225": "Быстрая замена стены: ВЫКЛ.", + "226": "Быстрая замена стены: ВКЛ.", + "227": "Время переключения панели быстрого доступа по кругу: ВКЛ.", + "228": "Время переключения панели быстрого доступа по кругу: ВЫКЛ.", + "229": "Решетка блоков ВКЛ.", + "22": "Мужчина", + "230": "Решетка блоков ВЫКЛ.", + "231": "Наведение", + "232": "Приоритет наведения: выбранная цель", + "233": "Приоритет наведения: ближайшая цель", + "234": "Приоритет наведения: свободная линия", + "235": "абв / АБВ / !@#", + "236": "Backspace", + "237": "Подтвердить", + "238": "Пробел", + "239": "<-", + "23": "Женщина", + "240": "->", + "241": "Инструкции по геймпаду ВЫКЛ.", + "242": "Инструкции по геймпаду ВКЛ.", + "243": "Управление меню", + "244": "Круговая панель быстрого доступа", + "245": "Окно без рамок: ВКЛ.", + "246": "Окно без рамок: ВЫКЛ.", + "247": "Пропуск кадров ВЫКЛ.", + "248": "Пропуск кадров ВКЛ.", + "249": "Плавный пропуск кадров", + "24": "Сложный режим", + "250": "Тряска блоков при добыче: ВКЛ.", + "251": "Тряска блоков при добыче: ВЫКЛ.", + "252": "Задержка движения интерфейса", + "25": "Средняя", + "26": "Низкая", + "27": "Случайно", + "28": "Создать", + "2": "Отключиться", + "32": "Выберите сложность", + "33": "Рубашка", + "34": "Нательная рубашка", + "35": "Брюки", + "36": "Обувь", + "37": "Волосы", + "38": "Цвет волос", + "39": "Цвет глаз", + "3": "Сервер запрашивает пароль:", + "40": "Цвет кожи", + "41": "Цвет рубашки", + "42": "Цвет нательной рубашки", + "43": "Цвет брюк", + "44": "Цвет обуви", + "45": "Введите имя персонажа:", + "46": "Удалить", + "47": "Создать мир", + "48": "Введите название мира:", + "49": "Оконный режим", + "4": "Принять", + "50": "Полноэкранный режим", + "51": "Разрешение", + "52": "Смещение", + "53": "Пропуск кадров ВЫКЛ.", + "54": "Пропуск кадров ВКЛ.", + "55": "Освещение: цвет", + "56": "Освещение: белое", + "57": "Освещение: ретро", + "58": "Освещение: глюки", + "59": "Качество Автоматически", + "5": "Назад", + "60": "Качество Высокое", + "61": "Качество Среднее", + "62": "Качество Низкое", + "63": "Видео", + "64": "Цвет курсора", + "65": "Громкость", + "66": "Управление", + "67": "Автоматическое сохранение ВКЛ.", + "68": "Автоматическое сохранение ВЫКЛ.", + "69": "Автоматическая пауза ВКЛ.", + "6": "Отмена", + "70": "Автоматическая пауза ВЫКЛ.", + "71": "Текст при поднятии ВКЛ.", + "72": "Текст при поднятии ВЫКЛ.", + "73": "Разрешение полноэкранного режима", + "74": "вверх ", + "75": "вниз ", + "76": "Влево ", + "77": "Вправо ", + "78": "Прыгнуть ", + "79": "Бросить ", + "7": "Введите пароль сервера:", + "80": "Инвентарь ", + "81": "Быстрое лечение ", + "82": "Быстрая мана ", + "83": "Быстрое усиление ", + "84": "Взять ", + "85": "Автовыбор ", + "86": "Сбросить к стандартным", + "87": "Присоединиться", + "88": "Создать и играть", + "89": "Введите IP-адрес сервера", + "8": "Инициализация сервера...", + "90": "Введите порт сервера:", + "91": "Выберите размер мира:", + "92": "Маленький", + "93": "Средний", + "94": "Большой", + "95": "Красные:", + "96": "Зеленые:", + "97": "Синие:", + "98": "Звук:", + "99": "Музыка:", + "9": "Ошибка загрузки!", + "119": "Звуки природы:" + }, + "LegacyTooltip": { + "0": "Помещено в ячейку для украшений", + "10": "Низкая скорость", + "11": "Очень низкая скорость", + "12": "Крайне низкая скорость", + "13": "Скорость улитки", + "14": "Без отбрасывания", + "15": "Крайне слабое отбрасывание", + "16": "Очень слабое отбрасывание", + "17": "Слабое отбрасывание", + "18": "Среднее отбрасывание", + "19": "Сильное отбрасывание", + "1": "Характеристики не будут улучшены", + "20": "Очень сильное отбрасывание", + "21": "Невероятно сильное отбрасывание", + "22": "Сумасшедшее отбрасывание", + "23": "Можно надеть", + "24": "Предмет украшения", + "25": " защита", + "26": "% мощности кирки", + "27": "% мощности топора", + "28": "% мощности молота", + "29": "Восстанавливает", + "2": " урон в ближнем бою", + "30": "жизнь", + "31": "ману", + "32": "Использует", + "33": "Можно поставить", + "34": "Амуниция", + "35": "Расходуется", + "36": "Материал", + "37": " мин длительность", + "38": " с длительность", + "39": "% урон", + "3": " дистанционный урон", + "40": "% скорость", + "41": "% шанс критического удара", + "42": "% стоимость маны", + "43": "% размер", + "44": "% быстрота", + "45": "% отбрасывание", + "46": "% скорость движения", + "47": "% скорость ближнего боя", + "48": "Бонус комплекта:", + "49": "Цена продажи:", + "4": " магический урон", + "50": "Цена покупки:", + "51": "Ничего не стоит", + "52": "Использует ", + "53": " Урон призываемого существа", + "54": " Дистанция", + "55": " Урон", + "56": "Помечено как избранное", + "57": "Быстрое выбрасывание, помещение в стопки и продажа будут заблокированы", + "58": " урона при метании", + "59": "Проклято мощным существом из джунглей", + "5": "% шанс критического удара", + "6": "Невероятно высокая скорость", + "7": "Очень высокая скорость", + "8": "Высокая скорость", + "9": "Средняя скорость" + }, + "LegacyMultiplayer": { + "10": "Вы не в команде!", + "11": "Игрок {0} включил режим PvP!", + "12": "Игрок {0} отключил режим PvP!", + "13": "Игрок {0} больше не входит в команду.", + "14": "Игрок {0} присоединился к команде красных.", + "15": "Игрок {0} присоединился к команде зеленых.", + "16": "Игрок {0} присоединился к команде синих.", + "17": "Игрок {0} присоединился к команде желтых.", + "18": "Добро пожаловать в", + "19": "Игрок {0} присоединился.", + "20": "Игрок {0} вышел.", + "21": "/игроки", + "22": "Игрок {0} присоединился к команде розовых.", + "2": "Недействительная операция в этом состоянии.", + "3": "Вы заблокированы на этом сервере.", + "4": "Ваша версия игры отличается от версии сервера.", + "5": "уже на этом сервере.", + "6": "/в игре", + "7": "Текущие игроки:", + "8": "/жребий", + "9": "выбрасывает", + "0": "Получить:" + }, + "LegacyMisc": { + "0": "Армия гоблинов побеждена!", + "100": "Выберите мировое зло", + "101": "Порча", + "102": "Багрянец", + "103": "Случайно", + "10": "Леденящий ужас спускается по твоему позвоночнику...", + "11": "Вокруг тебя эхом разносятся крики...", + "12": "Ваш мир благословенный кобальтом!", + "13": "Ваш мир благословенный мифрилом!", + "14": "Ваш мир благословенный адамантитом!", + "15": "На волю выпущены древние духи света и тьмы.", + "19": "Игрок {0} убит...", + "1": "Армия гоблинов приближается с запада!", + "20": "Наступило солнечное затмение!", + "21": "Ваш мир благословенный палладием!", + "22": "Ваш мир благословенный орихалком!", + "23": "Ваш мир благословенный титаном!", + "24": "Пираты побеждены!", + "25": "Пираты приближаются с запада!", + "26": "Пираты приближаются с востока!", + "27": "Пираты прибыли!", + "28": "Вы чувствуете вибрации из глубины...", + "29": "Это будет ужасная ночь...", + "2": "Армия гоблинов приближается с востока!", + "30": "Воздух вокруг вас холодеет...", + "31": "Восходит тыквенная луна...", + "32": "Джунгли растут непрерывно...", + "33": "Из Темницы доносится эхо криков...", + "34": "Восходит морозная луна...", + "35": "Игрок {0} упокоился!", + "36": "Игрок {0} покинул нас!", + "37": "Любое:", + "38": "Нажимная плита", + "39": " и ускоряет регенерацию здоровья", + "3": "Армия гоблинов прибыла!", + "40": "Ускоряет регенерацию здоровья", + "41": "Марсиане наступают!", + "42": "Марсиане побеждены!", + "43": "Небесные существа наступают!", + "44": "Ваш разум цепенеет...", + "45": "Вас затапливает боль...", + "46": "Потусторонние голоса звучат вокруг вас...", + "47": "Лунный лорд пробудился!", + "48": "Близнецы пробудились!", + "49": "Вы просыпаетесь после странного сна...", + "4": "Ледяной легион побежден!", + "50": "— вы победили!", + "51": "Лунный фрагмент", + "52": "Неотвратимая судьба приближается...", + "53": "Выбрать", + "54": "Взять", + "55": "Взять 1 шт.", + "56": "Закрыть", + "57": "Взять", + "58": "Прыгнуть", + "59": "Прокрутить панель быстрого доступа", + "5": "Ледяной легион приближается с запада!", + "60": "Атаковать", + "61": "Строить", + "62": "Выпить", + "63": "Действие", + "64": "Переключить меню", + "65": "Поместить", + "66": "Сменить", + "67": "Надеть/взять", + "68": "Снять/убрать", + "69": "Показать флаги комнат", + "6": "Ледяной легион приближается с востока!", + "70": "Проверить дом", + "71": "Быстрое создание", + "72": "Создать", + "73": "Выбрать", + "74": "Корзина", + "75": "Продать", + "76": "Передать", + "77": "Показать элементы внешнего вида", + "78": "Скрыть элементы внешнего вида", + "79": "Использовать", + "7": "Ледяной легион прибыл!", + "80": "Говорить", + "81": "Читать", + "82": "Назад", + "83": "Избранное", + "84": "Нельзя менять команды внутри командных блоков!", + "86": "Утка", + "87": "Бабочка", + "88": "Светлячок", + "89": "Параметры проводки", + "8": "Восходит кровавая луна...", + "90": "Купить", + "91": "Купить еще", + "92": "Продать", + "93": "Создать еще", + "94": "Попробовать убрать", + "95": "Улитка", + "96": "Похоже, ", + "97": " закатывает вечеринку", + "98": " закатывают вечеринку", + "99": "Вечеринка закончилась!", + "9": "Вы чувствуете чье-то злобное внимание...", + "104": "Нельзя использовать без этерианской маны, пока не будет побежден Этерианский кристалл" + }, + "LegacyInterface": { + "0": "Жизнь...", + "100": "Счетчик существ", + "101": "Счетчик убийств", + "102": "Фаза луны", + "103": "Скорость движения", + "104": "Сокровище", + "105": "Редкие существа", + "106": "Урон в секунду", + "107": "Странные растения", + "108": "Открыть карту", + "109": "Закрыть карту", + "10": "Защита", + "110": "Открыть папку", + "111": "Сделать снимок экрана", + "112": "Сначала нужно выбрать рамку", + "113": "Доступно только в оконном режиме", + "114": "Доступно только при включенной карте", + "115": "Режим камеры выключен", + "116": "Подсветка новых предметов ВЫКЛ.", + "117": "Подсветка новых предметов ВКЛ.", + "118": "Приблизить", + "119": "Отдалить", + "11": "Украшения", + "120": "Телепортироваться к союзнику", + "121": "Выбросить предмет", + "122": "Сортировать предметы", + "123": "Холодная погода", + "12": "Шлем", + "13": "Рубашка", + "14": "Брюки", + "15": "мон. платины", + "16": "мон. золота", + "17": "мон. серебра", + "18": "мон. меди", + "19": "Перековать", + "1": "Воздух", + "20": "Поместите предмет сюда, чтобы перековать", + "21": "Показывает рецепты, в которых используется:", + "22": "Необходимые предметы:", + "23": "Нет", + "24": "Поместите сюда материал", + "25": "Изготовление", + "26": "Монеты", + "27": "Амуниция", + "28": "Магазин", + "29": "Взять все", + "2": "Мана", + "30": "На хранение все", + "31": "Быстрая стопка", + "32": "Свинья-копилка", + "33": "Сейф", + "34": "Время", + "35": "Сохранить и выйти", + "36": "Отключиться", + "37": "Предметы", + "38": "Вы были убиты...", + "39": "Этот дом подходит.", + "3": "Урна", + "40": "Этот дом не подходит.", + "41": "Этот дом уже занят.", + "42": "Этот дом поражен порчей.", + "43": "Время соединения истекло", + "44": "Получение данных о блоках", + "45": "Надеть/взять", + "46": "Стоимость", + "47": "Сохранить", + "48": "Редактировать", + "49": "Статус", + "4": "Инвентарь", + "50": "Проклятие", + "51": "Помощь", + "52": "Закрыть", + "53": "Вода", + "54": "Лечение", + "55": "Этот дом не отвечает требованиям для", + "56": "Лава", + "57": "Краситель", + "58": "Мед", + "59": "видно", + "5": "Панель быстрого доступа разблокирована", + "60": "скрыто", + "61": "Переименовать", + "62": "Настройки", + "63": "Отмена", + "64": "Задание", + "65": "Предмет для задания", + "66": "Экономия", + "67": "Сделать снимок экрана", + "68": "Настройки", + "69": "Прикрепить рамку", + "6": "Панель быстрого доступа заблокирована", + "70": "Задать рамку", + "71": "Закрыть", + "72": "ВКЛ.", + "73": "ВЫКЛ.", + "74": "Состав изображения", + "75": "Снимать живых существ", + "76": "Снимать фон", + "77": "Biome Pick", + "78": "Сбросить рамку", + "79": "Экипировка", + "7": "Дом", + "80": "Дом", + "81": "Режим камеры", + "82": "Восполнить запасы", + "83": "Морозная луна", + "84": "Тыквенная луна", + "85": "Марсианское безумие", + "86": "Нашествие пиратов", + "87": "Ледяной легион", + "88": "Армия гоблинов", + "89": "Взять", + "8": "Проверка дома", + "90": "Крюк-кошка", + "91": "Транспорт", + "92": "Питомец", + "93": "Вагонетка", + "94": "Светящийся питомец", + "95": "Время", + "96": "Погода", + "97": "Рыбалка", + "98": "Положение", + "99": "Глубина", + "9": "Аксессуар" + }, + "LegacyChestType": { + "0": "Сундук", + "10": "Плющевой сундук", + "12": "Сундук из живой древесины", + "13": "Небесный сундук", + "14": "Сундук из мрачного дерева", + "15": "Покрытый паутиной сундук", + "16": "Сундук ящщеров", + "17": "Водяной сундук", + "18": "Сундук джунглей", + "19": "Сундук порчи", + "1": "Золотой сундук", + "20": "Багровый сундук", + "21": "Сундук освящения", + "23": "Запертый сундук джунглей", + "24": "Запертый сундук порчи", + "25": "Запертый сундук багрянца", + "26": "Запертый сундук освящения", + "28": "Родовой сундук", + "29": "Медовый сундук", + "2": "Запертый золотой сундук", + "30": "Стимпанковый сундук", + "31": "Сундук из пальмовой древесины", + "32": "Грибной сундук", + "33": "Сундук из заснеженной древесины", + "34": "Гелевый сундук", + "35": "Зеленый сундук темницы", + "36": "Запертый зеленый сундук темницы", + "37": "Розовый сундук темницы", + "38": "Запертый розовый сундук темницы", + "39": "Синий сундук темницы", + "3": "Теневой сундук", + "40": "Запертый синий сундук темницы", + "41": "Костяной сундук", + "42": "Кактусовый стул", + "43": "Сундук из плоти", + "44": "Обсидиановый сундук", + "45": "Тыквенный сундук", + "46": "Жуткий стул", + "47": "Стеклянный сундук", + "48": "Марсианский стул", + "49": "Метеоритовый сундук", + "4": "Запертый теневой сундук", + "50": "Гранитный сундук", + "51": "Мраморный сундук", + "5": "Бочка", + "6": "Урна", + "7": "Сундук из черной древесины", + "8": "Сундук из красной древесины", + "9": "Сундук из жемчужной древесины" + }, + "LegacyDresserType": { + "0": "Тумбочка", + "10": "Костяная тумбочка", + "11": "Кактусовая тумбочка", + "12": "Жуткая тумбочка", + "13": "Небесная тумбочка", + "14": "Медовая тумбочка", + "15": "Тумбочка ящщеров", + "16": "Тумбочка из пальмовой древесины", + "17": "Грибная тумбочка", + "18": "Тумбочка из заснеженной древесины", + "19": "Гелевая тумбочка", + "1": "Тумбочка из черной древесины", + "20": "Тыквенная тумбочка", + "21": "Стимпанковая тумбочка", + "22": "Стеклянная тумбочка", + "23": "Тумбочка из плоти", + "24": "Марсианская тумбочка", + "25": "Метеоритовая тумбочка", + "26": "Гранитная тумбочка", + "27": "Мраморная тумбочка", + "2": "Тумбочка из красной древесины", + "3": "Тумбочка из жемчужной древесины", + "4": "Тумбочка из мрачного дерева", + "5": "Синяя тумбочка темницы", + "6": "Зеленая тумбочка темницы", + "7": "Розовая тумбочка темницы", + "8": "Золотая тумбочка", + "9": "Обсидиановая тумбочка", + "28": "{$ItemName.CrystalDresser}", + "29": "{$ItemName.DynastyDresser}", + "30": "{$ItemName.FrozenDresser}", + "31": "{$ItemName.LivingWoodDresser}", + "32": "{$ItemName.SpiderDresser}", + "33": "{$ItemName.LesionDresser}", + "34": "{$ItemName.SolarDresser}", + "35": "{$ItemName.VortexDresser}", + "36": "{$ItemName.NebulaDresser}", + "37": "{$ItemName.StardustDresser}", + "38": "{$ItemName.SandstoneDresser}", + "39": "{$ItemName.BambooDresser}" + }, + "LegacyChestType2": { + "1": "{$ItemName.GoldenChest}", + "0": "{$ItemName.CrystalChest}", + "2": "{$ItemName.SpiderChest}", + "3": "{$ItemName.LesionChest}", + "4": "{$ItemName.GoldChest}", + "5": "{$ItemName.SolarChest}", + "6": "{$ItemName.VortexChest}", + "7": "{$ItemName.NebulaChest}", + "8": "{$ItemName.StardustChest}", + "9": "{$ItemName.GolfChest}", + "10": "{$ItemName.DesertChest}", + "11": "{$ItemName.BambooChest}", + "12": "{$ItemName.DungeonDesertChest}" + } +} \ No newline at end of file diff --git a/Localization/Content/ru-RU/NPCs.json b/Localization/Content/ru-RU/NPCs.json new file mode 100644 index 0000000..0af8438 --- /dev/null +++ b/Localization/Content/ru-RU/NPCs.json @@ -0,0 +1,582 @@ +{ + "NPCName": { + "BlueSlime": "Синий слизень", + "GiantWormHead": "Гигантский червь", + "SeekerTail": "Кормилец мира", + "Clinger": "Хвататель", + "AnglerFish": "Рыба-удильщик", + "GreenJellyfish": "Зеленая медуза", + "Werewolf": "Оборотень", + "BoundGoblin": "Пленный гоблин", + "BoundWizard": "Пленный волшебник", + "GoblinTinkerer": "Гоблин-изобретатель", + "Wizard": "Волшебник", + "Clown": "Клоун", + "GiantWormBody": "Гигантский червь", + "SkeletonArcher": "Скелет-лучник", + "GoblinArcher": "Гоблин-лучник", + "VileSpit": "Злой плевок", + "WallofFlesh": "Стена плоти", + "WallofFleshEye": "Стена плоти", + "TheHungry": "Голодный", + "TheHungryII": "Голодный", + "LeechHead": "Пиявка", + "LeechBody": "Пиявка", + "LeechTail": "Пиявка", + "GiantWormTail": "Гигантский червь", + "ChaosElemental": "Элементаль хаоса", + "Slimer": "Слизнер", + "Gastropod": "Брюхоногий", + "BoundMechanic": "Пленный механик", + "Mechanic": "Механик", + "Retinazer": "Ретиназер", + "Spazmatism": "Спазматизм", + "SkeletronPrime": "Скелетрон Прайм", + "PrimeCannon": "Пушка Прайма", + "PrimeSaw": "Пила Прайма", + "EaterofWorldsHead": "Пожиратель миров", + "PrimeVice": "Тиски Прайма", + "PrimeLaser": "Лазер Прайма", + "BaldZombie": "Зомби", + "WanderingEye": "Блуждающий глаз", + "TheDestroyer": "Уничтожитель", + "TheDestroyerBody": "Уничтожитель", + "TheDestroyerTail": "Уничтожитель", + "IlluminantBat": "Светящаяся летучая мышь", + "IlluminantSlime": "Светящийся слизень", + "Probe": "Зонд", + "EaterofWorldsBody": "Пожиратель миров", + "PossessedArmor": "Одержимые доспехи", + "ToxicSludge": "Токсичный слизень", + "SantaClaus": "Санта-Клаус", + "SnowmanGangsta": "Снеговик-гангстер", + "MisterStabby": "Мистер Стэбби", + "SnowBalla": "Снежный Балла", + "IceSlime": "Ледяной слизень", + "Penguin": "Пингвин", + "PenguinBlack": "Пингвин", + "EaterofWorldsTail": "Пожиратель миров", + "IceBat": "Ледяная летучая мышь", + "Lavabat": "Лавовая летучая мышь", + "GiantFlyingFox": "Гигантская летучая лисица", + "GiantTortoise": "Гигантская черепаха", + "IceTortoise": "Ледяная черепаха", + "Wolf": "Волк", + "RedDevil": "Красный дьявол", + "Arapaima": "Арапаима", + "VampireBat": "Вампир", + "Vampire": "Вампир", + "MotherSlime": "Мать слизней", + "Truffle": "Трюфель", + "Frankenstein": "Франкенштейн", + "BlackRecluse": "Черный отшельник", + "WallCreeper": "Стенной ползун", + "WallCreeperWall": "Стенной ползун", + "SwampThing": "Болотная тварь", + "UndeadViking": "Скелет-викинг", + "CorruptPenguin": "Порченый пингвин", + "IceElemental": "Ледяной элементаль", + "Merchant": "Торговец", + "PigronCorruption": "Свинодракон", + "PigronHallow": "Свинодракон", + "RuneWizard": "Рунический маг", + "Crimera": "Кримера", + "Herpling": "Дурализень", + "AngryTrapper": "Злобный хвататель", + "MossHornet": "Моховой шершень", + "Derpling": "Рак-отшельник", + "Steampunker": "Стимпанкер", + "CrimsonAxe": "Багровый топор", + "Nurse": "Медсестра", + "PigronCrimson": "Свинодракон", + "FaceMonster": "Лицевой монстр", + "FloatyGross": "Летающая масса", + "Crimslime": "Багровый слизень", + "SpikedIceSlime": "Ледяной слизень", + "SnowFlinx": "Снежный флинкс", + "PincushionZombie": "Зомби", + "SlimedZombie": "Зомби", + "SwampZombie": "Зомби", + "TwiggyZombie": "Зомби", + "ArmsDealer": "Оружейник", + "CataractEye": "Демонический глаз", + "SleepyEye": "Демонический глаз", + "DialatedEye": "Демонический глаз", + "GreenEye": "Демонический глаз", + "PurpleEye": "Демонический глаз", + "LostGirl": "Потерявшаяся девочка", + "Nymph": "Нимфа", + "ArmoredViking": "Бронированный викинг", + "Lihzahrd": "Ящщер", + "LihzahrdCrawler": "Ящщер", + "DemonEye": "Демонический глаз", + "Dryad": "Дриада", + "FemaleZombie": "Зомби", + "HeadacheSkeleton": "Скелет", + "MisassembledSkeleton": "Скелет", + "PantlessSkeleton": "Скелет", + "SpikedJungleSlime": "Шипастый слизень джунглей", + "Moth": "Мотылек", + "IcyMerman": "Ледяной тритон", + "DyeTrader": "Продавец красителей", + "PartyGirl": "Тусовщица", + "Cyborg": "Киборг", + "Skeleton": "Скелет", + "Bee": "Пчела", + "BeeSmall": "Пчела", + "PirateDeckhand": "Матрос", + "PirateCorsair": "Корсар", + "PirateDeadeye": "Одноглазый пират", + "PirateCrossbower": "Пират-арбалетчик", + "PirateCaptain": "Капитан пиратов", + "CochinealBeetle": "Кошенильный жук", + "CyanBeetle": "Синий жук", + "LacBeetle": "Лаковый жук", + "Guide": "Гид", + "SeaSnail": "Морская улитка", + "Squid": "Кальмар", + "QueenBee": "Королева пчел", + "ZombieRaincoat": "Зомби в дождевике", + "FlyingFish": "Летучая рыба", + "UmbrellaSlime": "Слизень с зонтом", + "FlyingSnake": "Летающая змея", + "Painter": "Маляр", + "WitchDoctor": "Знахарь", + "Pirate": "Пират", + "MeteorHead": "Осколок метеора", + "GoldfishWalker": "Золотая рыбка", + "HornetFatty": "Шершень", + "HornetHoney": "Шершень", + "HornetLeafy": "Шершень", + "HornetSpikey": "Шершень", + "HornetStingy": "Шершень", + "JungleCreeper": "Ползун джунглей", + "JungleCreeperWall": "Ползун джунглей", + "BlackRecluseWall": "Черный отшельник", + "BloodCrawler": "Кровавый ползун", + "FireImp": "Огненный бес", + "BloodCrawlerWall": "Кровавый ползун", + "BloodFeeder": "Кровосос", + "BloodJelly": "Кровавая медуза", + "IceGolem": "Ледяной голем", + "RainbowSlime": "Радужный слизняк", + "Golem": "Голем", + "GolemHead": "Голова Голема", + "GolemFistLeft": "Кулак Голема", + "GolemFistRight": "Кулак Голема", + "GolemHeadFree": "Голова Голема", + "BurningSphere": "Огненная сфера", + "AngryNimbus": "Злая туча", + "Eyezor": "Глазор", + "Parrot": "Попугай", + "Reaper": "Жнец", + "ZombieMushroom": "Грибной зомби", + "ZombieMushroomHat": "Грибной зомби", + "FungoFish": "Грибная медуза", + "AnomuraFungus": "Крабовый гриб", + "MushiLadybug": "Грибная коровка", + "FungiBulb": "Гриб-лампа", + "GoblinPeon": "Гоблин-пехотинец", + "GiantFungiBulb": "Гигантский гриб-лампа", + "FungiSpore": "Грибная спора", + "Plantera": "Плантера", + "PlanterasHook": "Крюк Плантеры", + "PlanterasTentacle": "Щупальце Плантеры", + "Spore": "Спора", + "BrainofCthulhu": "Мозг Ктулху", + "Creeper": "Ползун", + "IchorSticker": "Ихорный плеватель", + "RustyArmoredBonesAxe": "Ржавый бронированный скелет", + "GoblinThief": "Гоблин-воришка", + "RustyArmoredBonesFlail": "Ржавый бронированный скелет", + "RustyArmoredBonesSword": "Ржавый бронированный скелет", + "RustyArmoredBonesSwordNoArmor": "Ржавый бронированный скелет", + "BlueArmoredBones": "Синий бронированный скелет", + "BlueArmoredBonesMace": "Синий бронированный скелет", + "BlueArmoredBonesNoPants": "Синий бронированный скелет", + "BlueArmoredBonesSword": "Синий бронированный скелет", + "HellArmoredBones": "Адский бронированный скелет", + "HellArmoredBonesSpikeShield": "Адский бронированный скелет", + "HellArmoredBonesMace": "Адский бронированный скелет", + "GoblinWarrior": "Гоблин-воин", + "HellArmoredBonesSword": "Адский бронированный скелет", + "RaggedCaster": "Оборванный колдун", + "RaggedCasterOpenCoat": "Оборванный колдун", + "Necromancer": "Некромант", + "NecromancerArmored": "Некромант", + "DiabolistRed": "Сатанист", + "DiabolistWhite": "Сатанист", + "BoneLee": "Костюс Ли", + "DungeonSpirit": "Дух темницы", + "GiantCursedSkull": "Гигантский проклятый череп", + "GoblinSorcerer": "Гоблин-волшебник", + "Paladin": "Паладин", + "SkeletonSniper": "Скелет-снайпер", + "TacticalSkeleton": "Скелет-штурмовик", + "SkeletonCommando": "Скелет-коммандос", + "AngryBonesBig": "Злой скелет", + "AngryBonesBigMuscle": "Злой скелет", + "AngryBonesBigHelmet": "Злой скелет", + "BirdBlue": "Голубая сойка", + "BirdRed": "Кардинал", + "Squirrel": "Белка", + "Zombie": "Зомби", + "ChaosBall": "Шар хаоса", + "Mouse": "Мышь", + "Raven": "Ворон", + "SlimeMasked": "Слизень", + "BunnySlimed": "Кролик", + "HoppinJack": "Скачущая тыква", + "Scarecrow1": "Пугало", + "Scarecrow2": "Пугало", + "Scarecrow3": "Пугало", + "Scarecrow4": "Пугало", + "Scarecrow5": "Пугало", + "AngryBones": "Злой скелет", + "Scarecrow6": "Пугало", + "Scarecrow7": "Пугало", + "Scarecrow8": "Пугало", + "Scarecrow9": "Пугало", + "Scarecrow10": "Пугало", + "HeadlessHorseman": "Всадник без головы", + "Ghost": "Призрак", + "DemonEyeOwl": "Демонический глаз", + "DemonEyeSpaceship": "Демонический глаз", + "ZombieDoctor": "Зомби", + "DarkCaster": "Темный маг", + "ZombieSuperman": "Зомби", + "ZombiePixie": "Зомби", + "SkeletonTopHat": "Скелет", + "SkeletonAstonaut": "Скелет", + "SkeletonAlien": "Скелет", + "MourningWood": "Плакучий Древень", + "Splinterling": "Занозец", + "Pumpking": "Тыквенный Король", + "PumpkingBlade": "Тыквенный Король", + "Hellhound": "Адская гончая", + "WaterSphere": "Водяная сфера", + "Poltergeist": "Полтергейст", + "ZombieXmas": "Зомби", + "ZombieSweater": "Зомби", + "SlimeRibbonWhite": "Слизень", + "SlimeRibbonYellow": "Слизень", + "SlimeRibbonGreen": "Слизень", + "SlimeRibbonRed": "Слизень", + "BunnyXmas": "Кролик", + "ZombieElf": "Эльф-зомби", + "ZombieElfBeard": "Эльф-зомби", + "CursedSkull": "Проклятый череп", + "ZombieElfGirl": "Эльф-зомби", + "PresentMimic": "Подарочный мимик", + "GingerbreadMan": "Пряничный человек", + "Yeti": "Йети", + "Everscream": "Злая Ель", + "IceQueen": "Ледяная королева", + "SantaNK1": "Сантанк", + "ElfCopter": "Эльфокоптер", + "Nutcracker": "Щелкунчик", + "NutcrackerSpinning": "Щелкунчик", + "SkeletronHead": "Скелетрон", + "ElfArcher": "Эльф-лучник", + "Krampus": "Крампус", + "Flocko": "Флоко", + "Stylist": "Стилист", + "WebbedStylist": "Стилист в паутине", + "Firefly": "Светлячок", + "Butterfly": "Бабочка", + "Worm": "Червь", + "LightningBug": "Светляк", + "Snail": "Улитка", + "SkeletronHand": "Скелетрон", + "GlowingSnail": "Светящаяся улитка", + "Frog": "Лягушка", + "Duck": "Утка", + "Duck2": "Утка", + "DuckWhite": "Утка", + "DuckWhite2": "Утка", + "ScorpionBlack": "Скорпион", + "Scorpion": "Скорпион", + "TravellingMerchant": "Странствующий торговец", + "Angler": "Рыбак", + "OldMan": "Старик", + "DukeFishron": "Герцог Рыброн", + "DetonatingBubble": "Взрывчатый пузырь", + "Sharkron": "Акулон", + "Sharkron2": "Акулон", + "TruffleWorm": "Трюфельный червь", + "TruffleWormDigger": "Трюфельный червь", + "SleepingAngler": "Спящий рыбак", + "Grasshopper": "Кузнечик", + "ChatteringTeethBomb": "Болтающая зубастая бомба", + "Demolitionist": "Подрывник", + "BrainScrambler": "Мозгокрут", + "RayGunner": "Лучевой стрелок", + "MartianOfficer": "Марсианский офицер", + "ForceBubble": "Щит-пузырь", + "GrayGrunt": "Серый пехотинец", + "MartianEngineer": "Марсианский инженер", + "MartianTurret": "Турель Тесла", + "MartianDrone": "Марсианский дрон", + "GigaZapper": "Гигазаппер", + "BoneSerpentHead": "Костяной змей", + "ScutlixRider": "Скутликс-стрелок", + "Scutlix": "Скутликс", + "EyeofCthulhu": "Глаз Ктулху", + "BoneSerpentBody": "Костяной змей", + "BoneSerpentTail": "Костяной змей", + "SolarCrawltipedeHead": "Ползоножка", + "SolarCrawltipedeBody": "Ползоножка", + "SolarCrawltipedeTail": "Ползоножка", + "SolarDrakomire": "Дракомайр", + "SolarDrakomireRider": "Наездник дракомайра", + "SolarSroller": "Сроллер", + "SolarCorite": "Корит", + "SolarSolenian": "Селенеанин", + "Hornet": "Шершень", + "ManEater": "Людоед", + "ArmedZombie": "Зомби", + "ArmedZombiePincussion": "Зомби", + "ArmedZombieSlimed": "Зомби", + "ArmedZombieSwamp": "Зомби", + "ArmedZombieTwiggy": "Зомби", + "ArmedZombieCenx": "Зомби", + "UndeadMiner": "Мертвый шахтер", + "GoldBird": "Золотая птица", + "GoldBunny": "Золотой кролик", + "GoldButterfly": "Золотая бабочка", + "GoldFrog": "Золотая лягушка", + "GoldGrasshopper": "Золотой кузнечик", + "GoldMouse": "Золотая мышь", + "GoldWorm": "Золотой червь", + "BoneThrowingSkeleton": "Скелет", + "Tim": "Тим", + "BoneThrowingSkeleton2": "Скелет", + "BoneThrowingSkeleton3": "Скелет", + "BoneThrowingSkeleton4": "Скелет", + "Bunny": "Кролик", + "CorruptBunny": "Порченый кролик", + "Harpy": "Гарпия", + "CaveBat": "Пещерная летучая мышь", + "ServantofCthulhu": "Прислужник Ктулху", + "KingSlime": "Король слизней", + "JungleBat": "Тропическая летучая мышь", + "DoctorBones": "Доктор Бонс", + "TheGroom": "Жених", + "Clothier": "Портной", + "Goldfish": "Золотая рыбка", + "Snatcher": "Хвататель", + "CorruptGoldfish": "Порченая золотая рыбка", + "Piranha": "Пиранья", + "LavaSlime": "Лавовый слизень", + "EaterofSouls": "Пожиратель душ", + "Hellbat": "Адская летучая мышь", + "Vulture": "Стервятник", + "Demon": "Демон", + "BlueJellyfish": "Синяя медуза", + "PinkJellyfish": "Розовая медуза", + "Shark": "Акула", + "VoodooDemon": "Демон вуду", + "Crab": "Краб", + "DungeonGuardian": "Страж темницы", + "Antlion": "Муравьиный лев", + "DevourerHead": "Пожиратель", + "SpikeBall": "Булава на цепи", + "DungeonSlime": "Слизень из темницы", + "BlazingWheel": "Огненное колесо", + "GoblinScout": "Гоблин-разведчик", + "Bird": "Птица", + "Pixie": "Фея", + "ArmoredSkeleton": "Бронированный скелет", + "Mummy": "Мумия", + "DarkMummy": "Темная мумия", + "DevourerBody": "Пожиратель", + "LightMummy": "Светлая мумия", + "CorruptSlime": "Порченый слизень", + "Wraith": "Призрак", + "CursedHammer": "Проклятый молот", + "EnchantedSword": "Зачарованный меч", + "Mimic": "Мимик", + "Unicorn": "Единорог", + "WyvernHead": "Виверна", + "WyvernLegs": "Виверна", + "WyvernBody": "Виверна", + "DevourerTail": "Пожиратель", + "WyvernBody2": "Виверна", + "WyvernBody3": "Виверна", + "WyvernTail": "Виверна", + "GiantBat": "Гигантская летучая мышь", + "Corruptor": "Разлагатель", + "DiggerHead": "Землекоп", + "DiggerBody": "Землекоп", + "DiggerTail": "Землекоп", + "SeekerHead": "Кормилец мира", + "SeekerBody": "Кормилец мира", + "AncientCultistSquidhead": "Древнее видение", + "AncientDoom": "Древний рок", + "AncientLight": "Древний свет", + "BigMimicCorruption": "Порченый мимик", + "BigMimicCrimson": "Багряный мимик", + "BigMimicHallow": "Освященный мимик", + "BigMimicJungle": "Мимик джунглей", + "BloodZombie": "Кровавый зомби", + "Buggy": "Букашечка", + "Butcher": "Мясник", + "Crawdad": "Пресноводный рак", + "Crawdad2": "Пресноводный рак", + "CreatureFromTheDeep": "Существо из глубин", + "CrimsonPenguin": "Порочный пингвин", + "CultistBoss": "Культист-лунатик", + "CultistBossClone": "Культист-лунатик", + "CultistDragonBody1": "Иллюзорный дракон", + "CultistDragonBody2": "Иллюзорный дракон", + "CultistDragonBody3": "Иллюзорный дракон", + "CultistDragonBody4": "Иллюзорный дракон", + "CultistDragonHead": "Иллюзорный дракон", + "CultistDragonTail": "Иллюзорный дракон", + "CultistTablet": "Загадочная печать", + "DD2AttackerTest": "???", + "DD2GoblinT3": "{$NPCName.DD2GoblinT1}", + "DD2GoblinBomberT3": "{$NPCName.DD2GoblinBomberT1}", + "DD2JavelinstT2": "{$NPCName.DD2JavelinstT1}", + "DD2JavelinstT3": "{$NPCName.DD2JavelinstT1}", + "DD2LanePortal": "Загадочный портал", + "DD2GoblinT2": "{$NPCName.DD2GoblinT1}", + "DeadlySphere": "Смертельная сфера", + "DemonTaxCollector": "Измученная душа", + "DesertBeast": "Василиск", + "DesertDjinn": "Дух пустыни", + "DesertGhoul": "Вурдалак", + "DesertGhoulCorruption": "Ужасный вурдалак", + "DesertGhoulCrimson": "Гниющий вурдалак", + "DesertGhoulHallow": "Вурдалак-мечтатель", + "DesertLamiaDark": "Ламия", + "DesertLamiaLight": "Ламия", + "DesertScorpionWalk": "Песчаный браконьер", + "DesertScorpionWall": "Песчаный браконьер", + "Drippler": "Стекатель", + "DrManFly": "Человек-муха", + "DuneSplicerBody": "Рассеиватель дюн", + "DuneSplicerHead": "Рассеиватель дюн", + "DuneSplicerTail": "Рассеиватель дюн", + "EnchantedNightcrawler": "Зачарованный ночной ползун", + "GiantFlyingAntlion": "Взрослый муравьиный лев", + "Fritz": "Фриц", + "GiantShelly": "Гигантский ракушечник", + "GiantShelly2": "Гигантский ракушечник", + "GoblinSummoner": "Призыватель гоблинов", + "GraniteFlyer": "Гранитный элементаль", + "GraniteGolem": "Гранитный голем", + "GreekSkeleton": "Гоплит", + "Grubby": "Личиночка", + "LunarTowerNebula": "Башня туманности", + "LunarTowerSolar": "Башня солнца", + "LunarTowerStardust": "Башня звездной пыли", + "LunarTowerVortex": "Башня вихря", + "MartianProbe": "Марсианский зонд", + "MartianSaucer": "Летающая тарелка марсиан", + "MartianSaucerCannon": "Пушка летающей тарелки марсиан", + "MartianSaucerCore": "Летающая тарелка марсиан", + "MartianSaucerTurret": "Турель летающей тарелки марсиан", + "MartianWalker": "Марсианский шагоход", + "Medusa": "Горгона Медуза", + "MoonLordCore": "Тело лунного лорда", + "MoonLordHand": "Рука лунного лорда", + "MoonLordHead": "Лунный лорд", + "Mothron": "Мотрон", + "MothronEgg": "Яйцо Мотрона", + "MothronSpawn": "Детеныш Мотрона", + "Nailhead": "Гвоздеголов", + "NebulaBeast": "Чудовище эволюции", + "NebulaBrain": "Летун туманности", + "NebulaHeadcrab": "Мозгосос", + "NebulaSoldier": "Предсказатель", + "PartyBunny": "Кролик", + "Psycho": "Псих", + "Salamander": "Саламандра", + "Salamander2": "Саламандра", + "Salamander3": "Саламандра", + "Salamander4": "Саламандра", + "Salamander5": "Саламандра", + "Salamander6": "Саламандра", + "Salamander7": "Саламандра", + "Salamander8": "Саламандра", + "Salamander9": "Саламандра", + "SandElemental": "Песчаный элементаль", + "SandShark": "Песчаная акула", + "SandsharkCorrupt": "Костяной кусатель", + "SandsharkCrimson": "Похититель плоти", + "SandsharkHallow": "Кристальная акула", + "SandSlime": "Песчаный слизень", + "SlimeSpiked": "Шипастый слизень", + "Sluggy": "Слизнячок", + "SolarFlare": "Солнечная вспышка", + "SolarGoop": "Солнечный фрагмент", + "SolarSpearman": "Драканианин", + "SquirrelGold": "Золотая белка", + "SquirrelRed": "Красная белка", + "StardustCellBig": "Звездная клетка", + "StardustCellSmall": "Звездная клетка", + "StardustJellyfishBig": "Захватчик потока", + "StardustSoldier": "Звездочет", + "StardustSpiderBig": "Мерцающий ловец", + "StardustSpiderSmall": "Искорка", + "StardustWormHead": "Млечный ткач", + "TargetDummy": "Манекен-мишень", + "TaxCollector": "Сборщик налогов", + "TheBride": "Невеста", + "ThePossessed": "Одержимая", + "TombCrawlerBody": "Ползун гробниц", + "TombCrawlerHead": "Ползун гробниц", + "TombCrawlerTail": "Ползун гробниц", + "Tumbleweed": "Злобное перекати-поле", + "VortexHornet": "Шершень чужих", + "VortexHornetQueen": "Матка чужих", + "VortexLarva": "Личинка чужого", + "VortexRifleman": "Штормопроходец", + "VortexSoldier": "Вихревик", + "GiantWalkingAntlion": "Муравьиный лев-воин", + "DD2GoblinBomberT2": "{$NPCName.DD2GoblinBomberT1}", + "DD2WyvernT3": "{$NPCName.DD2WyvernT1}", + "DD2WyvernT2": "{$NPCName.DD2WyvernT1}", + "DD2OgreT3": "{$NPCName.DD2OgreT2}", + "DD2WitherBeastT3": "{$NPCName.DD2WitherBeastT2}", + "DD2SkeletonT3": "{$NPCName.DD2SkeletonT1}", + "DD2KoboldWalkerT3": "{$NPCName.DD2KoboldWalkerT2}", + "DD2DrakinT3": "{$NPCName.DD2DrakinT2}", + "DD2DarkMageT3": "{$NPCName.DD2DarkMageT1}", + "DD2KoboldFlyerT3": "{$NPCName.DD2KoboldFlyerT2}", + "BabySlime": "Слизнячок", + "BigRainZombie": "Зомби", + "BlackSlime": "Черный слизень", + "DD2Bartender": "Трактирщик", + "DD2Betsy": "Бетси", + "DD2DarkMageT1": "Темный маг", + "DD2DrakinT2": "Дракин", + "DD2EterniaCrystal": "Этерианский кристалл", + "DD2GoblinBomberT1": "Этерианский гоблин-бомбардир", + "DD2GoblinT1": "Этерианский гоблин", + "DD2JavelinstT1": "Этерианский копьеметатель", + "DD2KoboldFlyerT2": "Кобольд на глайдере", + "DD2KoboldWalkerT2": "Кобольд", + "DD2LightningBugT3": "Этерианский светляк", + "DD2OgreT2": "Огр", + "DD2SkeletonT1": "Скелет Старца", + "DD2WitherBeastT2": "Усохшее чудовище", + "DD2WyvernT1": "Этерианская виверна", + "GreenSlime": "Зеленый слизень", + "JungleSlime": "Слизень джунглей", + "Pinky": "Пинки", + "PurpleSlime": "Фиолетовый слизень", + "RedSlime": "Красный слизень", + "Slimeling": "Слизлинг", + "Slimer2": "Слизнер", + "SmallRainZombie": "Зомби", + "YellowSlime": "Желтый слизень", + "MoonLordFreeEye": "Настоящий глаз Ктулху", + "MoonLordLeechBlob": "Сгусток лунного Лича", + "SkeletonMerchant": "Торговец-скелет", + "PirateShip": "Летучий голландец", + "PirateShipCannon": "Пушка летучего голландца", + "BartenderUnconscious": "Человек без сознания" + } +} \ No newline at end of file diff --git a/Localization/Content/ru-RU/Projectiles.json b/Localization/Content/ru-RU/Projectiles.json new file mode 100644 index 0000000..907a89d --- /dev/null +++ b/Localization/Content/ru-RU/Projectiles.json @@ -0,0 +1,722 @@ +{ + "ProjectileName": { + "AdamantiteChainsaw": "Адамантитовая бензопила", + "AdamantiteDrill": "Адамантитовый бур", + "AdamantiteGlaive": "Адамантитовая глефа", + "Amarok": "Йо-йо", + "AmberBolt": "Янтарный снаряд", + "AmethystBolt": "Аметистовый снаряд", + "Anchor": "Якорь", + "AncientDoomProjectile": "Конец пророчества", + "AntiGravityHook": "Антигравитационный крюк", + "Arkhalis": "Аркалис", + "AshBallFalling": "Пепел", + "BabyDino": "Детеныш динозавра", + "BabyEater": "Детеныш пожирателя", + "BabyFaceMonster": "Детеныш лицевого монстра", + "BabyGrinch": "Малыш Гринч", + "BabyHornet": "Детеныш шершня", + "BabySkeletronHead": "Детеныш головы Скелетрона", + "BabySlime": "Слизнячок", + "BabySnowman": "Детеныш снеговика", + "BabySpider": "Детеныш паука", + "BallofFire": "Огненная пуля", + "BallofFrost": "Морозный шар", + "BallOHurt": "Шар боли", + "Bananarang": "Бананаранг", + "Bat": "Летучая мышь", + "BatHook": "Крюк летучей мыши", + "BeachBall": "Пляжный мяч", + "Bee": "Пчела", + "BeeArrow": "Пчелиная стрела", + "BeeHive": "Пчелиный улей", + "Beenade": "Пчелоната", + "BlackBolt": "Ониксовый бластер", + "BlackCat": "Черная кошка", + "BlackCounterweight": "Противовес", + "Blizzard": "Снежная буря", + "BloodCloudMoving": "Кровавое облако", + "BloodCloudRaining": "Кровавое облако", + "BloodRain": "Кровавый дождь", + "BloodWater": "Кровавая вода", + "BloodyMachete": "Кровавый мачете", + "BlowupSmoke": "Дым от взрыва", + "BlowupSmokeMoonlord": "Дым от взрыва", + "BlueCounterweight": "Противовес", + "BlueFairy": "Синяя фея", + "BlueFlare": "Синяя сигнальная ракета", + "BlueMoon": "Синяя луна", + "BobberFiberglass": "Поплавок", + "BobberFisherOfSouls": "Поплавок", + "BobberFleshcatcher": "Поплавок", + "BobberGolden": "Поплавок", + "BobberHotline": "Поплавок", + "BobberMechanics": "Поплавок", + "BobberReinforced": "Поплавок", + "BobbersittingDuck": "Поплавок", + "BobberWooden": "Поплавок", + "Bomb": "Бомба", + "BombFish": "Рыба-бомба", + "BombSkeletronPrime": "Бомба", + "Bone": "Кость", + "BoneArrow": "Костяная стрела", + "BoneArrowFromMerchant": "Костяная стрела", + "BoneDagger": "Костяной кинжал", + "BoneGloveProj": "Х-образная кость", + "BoneJavelin": "Костяное копье", + "Boulder": "Валун", + "BoulderStaffOfEarth": "Валун", + "BouncyBomb": "Прыгучая бомба", + "BouncyDynamite": "Прыгучий динамит", + "BouncyGlowstick": "Прыгучая светящаяся палочка", + "BouncyGrenade": "Прыгучая граната", + "BoxingGlove": "Боксерская перчатка", + "BrainOfConfusion": "Мозги запутанности", + "BrainScramblerBolt": "Снаряд Мозгокрута", + "Bubble": "Пузырь", + "Bullet": "Пуля", + "BulletDeadeye": "Пуля", + "BulletHighVelocity": "Пуля", + "BulletSnowman": "Пуля", + "Bunny": "Кролик", + "ButchersChainsaw": "Бензопила мясника", + "CandyCaneHook": "Карамельный крюк", + "CandyCorn": "Кенди-корн", + "CannonballFriendly": "Пушечное ядро", + "CannonballHostile": "Пушечное ядро", + "Cascade": "Йо-йо", + "ChainGuillotine": "Гильотина на цепях", + "ChainKnife": "Кинжал на цепи", + "ChargedBlasterCannon": "Зарядная бластерная пушка", + "ChargedBlasterLaser": "Зарядный бластерный лазер", + "ChargedBlasterOrb": "Зарядная бластерная сфера", + "Chik": "Йо-йо", + "ChlorophyteArrow": "Хлорофитовая стрела", + "ChlorophyteBullet": "Пуля", + "ChlorophyteChainsaw": "Хлорофитовая бензопила", + "ChlorophyteDrill": "Хлорофитовый бур", + "ChlorophyteJackhammer": "Хлорофитовый пневмомолот", + "ChlorophyteOrb": "Хлорофитовая сфера", + "ChlorophytePartisan": "Хлорофитовый протазан", + "ChristmasHook": "Рождественский крюк", + "ClingerStaff": "Проклятый огонь", + "ClothiersCurse": "Череп", + "CobaltChainsaw": "Кобальтовая бензопила", + "CobaltDrill": "Кобальтовый бур", + "CobaltNaginata": "Кобальтовая нагината", + "Code1": "Йо-йо", + "Code2": "Йо-йо", + "CoinPortal": "Денежный портал", + "CompanionCube": "Куб-спутник", + "ConfettiGun": "Конфетти", + "ConfettiMelee": "Конфетти", + "CopperCoin": "Медная монета", + "CopperCoinsFalling": "Медные монеты", + "CorruptSpray": "Раствор порчи", + "CorruptYoyo": "Йо-йо", + "CrimsandBallFalling": "Багрянцевый шар", + "CrimsandBallGun": "Багрянцевый шар", + "CrimsonHeart": "Багряное сердце", + "CrimsonSpray": "Раствор багрянца", + "CrimsonYoyo": "Йо-йо", + "CrossGraveMarker": "Надгробная плита", + "CrystalBullet": "Кристальная пуля", + "CrystalDart": "Кристальный дротик", + "CrystalLeaf": "Кристальный лист", + "CrystalLeafShot": "Кристальный лист", + "CrystalPulse": "Кристальный заряд", + "CrystalPulse2": "Кристальный заряд", + "CrystalShard": "Осколок кристалла", + "CrystalStorm": "Кристальный шторм", + "CrystalVileShardHead": "Мерзкий осколок кристалла", + "CrystalVileShardShaft": "Мерзкий осколок кристалла", + "Cthulunado": "Ктулхунадо", + "CultistBossFireBall": "Файербол", + "CultistBossFireBallClone": "Теневой файербол", + "CultistBossIceMist": "Ледяной туман", + "CultistBossLightningOrb": "Светящаяся сфера", + "CultistBossLightningOrbArc": "Дуга из светящейся сферы", + "CultistBossParticle": "Энергия", + "CultistRitual": "Ритуал молнии", + "CursedArrow": "Проклятая стрела", + "CursedBullet": "Проклятая пуля", + "CursedDart": "Проклятый дротик", + "CursedDartFlame": "Проклятое пламя", + "CursedFlameFriendly": "Проклятое пламя", + "CursedFlameHostile": "Проклятое пламя", + "CursedSapling": "Проклятое растеньице", + "DangerousSpider": "Опасный паук", + "DarkLance": "Темное копье", + "Daybreak": "Заря", + "DD2FlameBurstTowerT1": "Огнеметная башня", + "DD2FlameBurstTowerT1Shot": "Огнеметная башня", + "DD2FlameBurstTowerT2": "Огнеметная башня", + "DD2FlameBurstTowerT2Shot": "Огнеметная башня", + "DD2FlameBurstTowerT3": "Огнеметная башня", + "DD2FlameBurstTowerT3Shot": "Огнеметная башня", + "DD2JavelinHostile": "Копье", + "DeadlySphere": "Смертельная сфера", + "DeathLaser": "Смертельный лазер", + "DeathSickle": "Коса смерти", + "DemonScythe": "Демоническая коса", + "DemonSickle": "Демонический серп", + "DesertDjinnCurse": "Проклятие духа пустыни", + "DiamondBolt": "Алмазный снаряд", + "DirtBall": "Шар земли", + "DrillMountCrosshair": "Прицел бура", + "DrManFlyFlask": "Фляга", + "DryadsWardCircle": "Охрана Дриады", + "DualHookBlue": "Крюк", + "DualHookRed": "Крюк", + "Dynamite": "Динамит", + "EatersBite": "Укус пожирателя", + "EbonsandBallFalling": "Демонитовый песок", + "EbonsandBallGun": "Демонитовый песок", + "EighthNote": "Записка", + "Electrosphere": "Электросфера", + "ElectrosphereMissile": "Ракета электросферы", + "EmeraldBolt": "Изумрудный снаряд", + "EnchantedBeam": "Зачарованный луч", + "EnchantedBoomerang": "Зачарованный бумеранг", + "ExplosiveBullet": "Разрывная пуля", + "ExplosiveBunny": "Взрывокролик", + "Explosives": "Взрывчатка", + "EyeBeam": "Луч глаза", + "EyeFire": "Огненный глаз", + "EyeLaser": "Глазной лазер", + "EyeSpring": "Глаз на пружинке", + "FallingStar": "Падающая звезда", + "FireArrow": "Огненная стрела", + "Fireball": "Файербол", + "FireworkFountainBlue": "Фонтан фейерверков", + "FireworkFountainRainbow": "Фонтан фейерверков", + "FireworkFountainRed": "Фонтан фейерверков", + "FireworkFountainYellow": "Фонтан фейерверков", + "FishHook": "Рыболовный крючок", + "Flairon": "Флайрон", + "FlaironBubble": "Пузырь флайрона", + "Flamarang": "Огнеранг", + "Flamelash": "Огнеплеть", + "Flames": "Пламя", + "FlamesTrap": "Пламя", + "FlamethrowerTrap": "Огнемет", + "FlamingArrow": "Подожженная стрела", + "FlamingJack": "Пылающий Джек", + "FlamingScythe": "Пылающая коса", + "FlamingWood": "Пылающее дерево", + "Flare": "Сигнальная ракета", + "FlowerPetal": "Цветочный лепесток", + "FlowerPow": "Цветочный удар", + "FlowerPowPetal": "Цветочный удар", + "FlyingImp": "Летающий чертенок", + "FlyingKnife": "Летающий нож", + "FlyingPiggyBank": "Летающая свинья-копилка", + "FormatC": "Йо-йо", + "FoulPotion": "Отвратительное зелье", + "FrostArrow": "Морозная стрела", + "FrostBeam": "Морозный луч", + "FrostBlastFriendly": "Морозный снаряд", + "FrostBlastHostile": "Морозный снаряд", + "FrostBoltStaff": "Морозный снаряд", + "FrostBoltSword": "Морозный снаряд", + "FrostburnArrow": "Стрела ледяного ожога", + "FrostDaggerfish": "Морозная рыба-меч", + "FrostHydra": "Морозная гидра", + "FrostShard": "Морозный осколок", + "FrostWave": "Морозная волна", + "FruitcakeChakram": "Кексовый чакрам", + "GemHookAmethyst": "Самоцветный крюк", + "GemHookDiamond": "Самоцветный крюк", + "GemHookEmerald": "Самоцветный крюк", + "GemHookRuby": "Самоцветный крюк", + "GemHookSapphire": "Самоцветный крюк", + "GemHookTopaz": "Самоцветный крюк", + "GeyserTrap": "Гейзер", + "GiantBee": "Пчела", + "GigaZapperSpear": "Наконечник копья Гигазаппера", + "Glowstick": "Светящаяся палочка", + "GoldCoin": "Золотая монета", + "GoldCoinsFalling": "Золотые монеты", + "GoldenBullet": "Золотая пуля", + "GoldenShowerFriendly": "Золотой душ", + "GoldenShowerHostile": "Золотой душ", + "GolemFist": "Кулак Голема", + "Gradient": "Йо-йо", + "GraveMarker": "Надгробная плита", + "Gravestone": "Надгробная плита", + "GreekFire1": "Греческий огонь", + "GreekFire2": "Греческий огонь", + "GreekFire3": "Греческий огонь", + "GreenCounterweight": "Противовес", + "GreenFairy": "Розовая фея", + "GreenLaser": "Зеленый лазер", + "Grenade": "Граната", + "GrenadeI": "Граната", + "GrenadeII": "Граната", + "GrenadeIII": "Граната", + "GrenadeIV": "Граната", + "Gungnir": "Гунгнир", + "HallowSpray": "Раствор святости", + "HallowStar": "Звезда освящения", + "Hamdrax": "Мотобур", + "HappyBomb": "Веселая бомба", + "Harpoon": "Гарпун", + "HarpyFeather": "Перо гарпии", + "Headstone": "Надгробная плита", + "HeatRay": "Тепловой луч", + "HelFire": "Йо-йо", + "HellfireArrow": "Стрела адского огня", + "Hellwing": "Адское крыло", + "HolyArrow": "Святая стрела", + "HolyWater": "Святая вода", + "Hook": "Крюк", + "Hornet": "Шершень", + "HornetStinger": "Жало шершня", + "IceBlock": "Лед", + "IceBolt": "Ледяной снаряд", + "IceBoomerang": "Ледяной бумеранг", + "IceSickle": "Ледяная коса", + "IceSpike": "Ледяное копье", + "IcewaterSpit": "Ледяной плевок", + "IchorArrow": "Ихорная стрела", + "IchorBullet": "Ихорная пуля", + "IchorDart": "Ихорный дротик", + "IchorSplash": "Ихорный всплеск", + "IlluminantHook": "Крюк", + "ImpFireball": "Огненный шар чертенка", + "InfernoFriendlyBlast": "Инферно", + "InfernoFriendlyBolt": "Инферно", + "InfernoHostileBlast": "Инферно", + "InfernoHostileBolt": "Инферно", + "InfluxWaver": "Колебатель приливов", + "IvyWhip": "Хлыст", + "JackOLantern": "Светильник Джека", + "JavelinFriendly": "Копье", + "JavelinHostile": "Копье", + "JestersArrow": "Стрела Джестера", + "JumperSpider": "Паук-прыгун", + "JungleSpike": "Копье джунглей", + "JungleYoyo": "Йо-йо", + "Kraken": "Йо-йо", + "Landmine": "Противопехотная мина", + "LaserDrill": "Лазерный бур", + "LaserMachinegun": "Лазерный пулемет", + "LaserMachinegunLaser": "Лазер", + "LastPrism": "Последняя призма", + "LastPrismLaser": "Последняя призма", + "Leaf": "Лист", + "LightBeam": "Луч света", + "LightDisc": "Диск света", + "LostSoulFriendly": "Потерянная душа", + "LostSoulHostile": "Потерянная душа", + "LovePotion": "Любовное зелье", + "LunarFlare": "Лунная вспышка", + "LunarHookNebula": "Лунный крюк", + "LunarHookSolar": "Лунный крюк", + "LunarHookStardust": "Лунный крюк", + "LunarHookVortex": "Лунный крюк", + "MagicDagger": "Магический кинжал", + "MagicLantern": "Магический светильник", + "MagicMissile": "Волшебная ракета", + "MagnetSphereBall": "Магнитная сфера", + "MagnetSphereBolt": "Магнитная сфера", + "MartianTurretBolt": "Электрический снаряд", + "MartianWalkerLaser": "Лазерный луч", + "MechanicalPiranha": "Механическая пиранья", + "MechanicWrench": "Гаечный ключ механика", + "MedusaHead": "Луч медузы", + "MedusaHeadRay": "Луч медузы", + "Meowmere": "Мяумур", + "Meteor1": "Метеорит", + "Meteor2": "Метеорит", + "Meteor3": "Метеорит", + "MeteorShot": "Метеоритовая пуля", + "MinecartMechLaser": "Лазер вагонетки", + "MiniMinotaur": "Мини-минотавр", + "MiniRetinaLaser": "Лазер Ретанимини", + "MiniSharkron": "Мини-акулон", + "Missile": "Ракета", + "MolotovCocktail": "Коктейль Молотова", + "MolotovFire": "Огонь Молотова", + "MolotovFire2": "Огонь Молотова", + "MolotovFire3": "Огонь Молотова", + "MoonLeech": "Лунная пиявка", + "MoonlordArrow": "Люминитовая стрела", + "MoonlordArrowTrail": "Люминитовая стрела", + "MoonlordBullet": "Люминитовая пуля", + "MoonlordTurret": "Лунный портал", + "MoonlordTurretLaser": "Лазер лунного портала", + "MudBall": "Грязь", + "Mushroom": "Гриб", + "MushroomSpear": "Грибное копье", + "MushroomSpray": "Грибной раствор", + "MythrilChainsaw": "Мифриловая бензопила", + "MythrilDrill": "Мифриловый бур", + "MythrilHalberd": "Мифриловая алебарда", + "Nail": "Гвоздь", + "NailFriendly": "Гвоздь", + "NanoBullet": "Нанопуля", + "NebulaArcanum": "Туманный арканум", + "NebulaArcanumExplosionShot": "Туманный арканум", + "NebulaArcanumExplosionShotShard": "Туманый арканум", + "NebulaArcanumSubshot": "Туманный арканум", + "NebulaBlaze1": "Пламя туманности", + "NebulaBlaze2": "Пламя туманности X", + "NebulaBolt": "Разряд туманности", + "NebulaChainsaw": "Бензопила туманности", + "NebulaDrill": "Бур туманности", + "NebulaEye": "Глаз туманности", + "NebulaLaser": "Лазер туманности", + "NebulaSphere": "Сфера туманности", + "NettleBurstEnd": "Крапивный взрыв", + "NettleBurstLeft": "Крапивный взрыв", + "NettleBurstRight": "Крапивный взрыв", + "NightBeam": "Луч ночи", + "None": "", + "NorthPoleSnowflake": "Северный полюс", + "NorthPoleSpear": "Северный полюс", + "NorthPoleWeapon": "Северный полюс", + "NurseSyringeHeal": "Шприц", + "NurseSyringeHurt": "Шприц", + "Obelisk": "Надгробная плита", + "ObsidianSwordfish": "Обсидиановая рыба-меч", + "OneEyedPirate": "Одноглазый пират", + "OrichalcumChainsaw": "Орихалковая бензопила", + "OrichalcumDrill": "Орихалковый бур", + "OrichalcumHalberd": "Орихалковая алебарда", + "OrnamentFriendly": "Орнамент", + "OrnamentHostile": "Орнамент", + "OrnamentHostileShrapnel": "Орнамент", + "PainterPaintball": "Пейнтбол", + "PaladinsHammerFriendly": "Молот паладина", + "PaladinsHammerHostile": "Молот паладина", + "PalladiumChainsaw": "Палладиевая бензопила", + "PalladiumDrill": "Палладиевый бур", + "PalladiumPike": "Палладиевая пика", + "Parrot": "Попугай", + "PartyBullet": "Ядовитая пуля", + "PartyGirlGrenade": "Граната с конфетти", + "PearlSandBallFalling": "Жемчужный песок", + "PearlSandBallGun": "Жемчужный песок", + "Penguin": "Пингвин", + "PetLizard": "Ручная ящерица", + "Phantasm": "Фантазм", + "PhantasmalBolt": "Фантазматический снаряд", + "PhantasmalDeathray": "Фантазматический луч смерти", + "PhantasmalEye": "Фантазматический глаз", + "PhantasmalSphere": "Фантазматическая сфера", + "PhantasmArrow": "Фантазм", + "PhasicWarpDisc": "", + "PhasicWarpEjector": "", + "PineNeedleFriendly": "Сосновая иголка", + "PineNeedleHostile": "Сосновая иголка", + "PinkFairy": "Розовая фея", + "PinkLaser": "Розовый лазер", + "PirateCaptain": "Капитан пиратов", + "PlatinumCoin": "Платиновая монета", + "PlatinumCoinsFalling": "Платиновые монеты", + "PoisonDart": "Отравленный дротик", + "PoisonDartBlowgun": "Отравленный дротик", + "PoisonDartTrap": "Отравленный дротик", + "PoisonedKnife": "Отравленный нож", + "PoisonFang": "Ядовитый клык", + "PoisonSeedPlantera": "Ядовитое семечко", + "PortalGun": "Портальная пушка", + "PortalGunBolt": "Портальный снаряд", + "PortalGunGate": "Портальные врата", + "PossessedHatchet": "Одержимый топорик", + "Present": "Подарок", + "ProximityMineI": "Мина", + "ProximityMineII": "Мина", + "ProximityMineIII": "Мина", + "ProximityMineIV": "Мина", + "PulseBolt": "Импульсный снаряд", + "Puppy": "Щенок", + "PureSpray": "Раствор очищения", + "PurificationPowder": "Очищающий порошок", + "PurpleCounterweight": "Противовес", + "PurpleLaser": "Фиолетовый лазер", + "Pygmy": "Пигмей", + "Pygmy2": "Пигмей", + "Pygmy3": "Пигмей", + "Pygmy4": "Пигмей", + "PygmySpear": "Пигмей", + "QuarterNote": "Записка", + "RainbowBack": "Радуга", + "RainbowCrystal": "Радужный кристалл", + "RainbowCrystalExplosion": "Радужный взрыв", + "RainbowFront": "Радуга", + "RainbowRodBullet": "Радуга", + "RainCloudMoving": "Дождевое облако", + "RainCloudRaining": "Дождевое облако", + "RainFriendly": "Дождь", + "RainNimbus": "Дождь", + "Rally": "Йо-йо", + "Raven": "Ворон", + "RayGunnerLaser": "Лазерный луч", + "RedCounterweight": "Противовес", + "RedsYoyo": "Йо-йо", + "Retanimini": "Ретанимини", + "RichGravestone1": "Надгробная плита", + "RichGravestone2": "Надгробная плита", + "RichGravestone3": "Надгробная плита", + "RichGravestone4": "Надгробная плита", + "RichGravestone5": "Надгробная плита", + "RocketFireworkBlue": "Ракета", + "RocketFireworkGreen": "Ракета", + "RocketFireworkRed": "Ракета", + "RocketFireworksBoxBlue": "Ракета", + "RocketFireworksBoxGreen": "Ракета", + "RocketFireworksBoxRed": "Ракета", + "RocketFireworksBoxYellow": "Ракета", + "RocketFireworkYellow": "Ракета", + "RocketI": "Ракета", + "RocketII": "Ракета", + "RocketIII": "Ракета", + "RocketIV": "Ракета", + "RocketSkeleton": "Ракета", + "RocketSnowmanI": "Ракета", + "RocketSnowmanII": "Ракета", + "RocketSnowmanIII": "Ракета", + "RocketSnowmanIV": "Ракета", + "RopeCoil": "Моток веревки", + "RottenEgg": "Тухлое яйцо", + "RubyBolt": "Рубиновый снаряд", + "RuneBlast": "Рунический снаряд", + "SalamanderSpit": "Яд", + "SandBallFalling": "Песок", + "SandBallGun": "Песок", + "SandnadoFriendly": "Древний шторм", + "SandnadoHostile": "Древний шторм", + "SandnadoHostileMark": "Древний шторм", + "SantaBombs": "Новогодний узор", + "Sapling": "Растеньице", + "SapphireBolt": "Сапфировый снаряд", + "SaucerDeathray": "Марсианский луч смерти", + "SaucerLaser": "Лазер летающей тарелки", + "SaucerMissile": "Марсианская ракета", + "SaucerScrap": "Обломок летающей тарелки", + "SawtoothShark": "Пилозубая акула", + "ScutlixLaser": "Лазер", + "ScutlixLaserCrosshair": "Прицел скутликса", + "ScutlixLaserFriendly": "Лазер скутликса", + "Seed": "Семечко", + "SeedlerNut": "Сеятель", + "SeedlerThorn": "Сеятель", + "SeedPlantera": "Семечко", + "ShadowBeamFriendly": "Луч тени", + "ShadowBeamHostile": "Луч тени", + "ShadowFlame": "Теневое пламя", + "ShadowFlameArrow": "Стрела адского пламени", + "ShadowFlameKnife": "Нож теневого пламени", + "Shadowflames": "Теневое пламя", + "ShadowOrb": "Сфера тени", + "Sharknado": "Акулонадо", + "SharknadoBolt": "Снаряд акулонадо", + "Shuriken": "Сюрикен", + "SilkRopeCoil": "Моток веревки", + "SiltBall": "Ил", + "SilverCoin": "Серебряная монета", + "SilverCoinsFalling": "Серебряные монеты", + "SkeletonBone": "Кость", + "SkeletronHand": "Рука Скелетрона", + "Skull": "Череп", + "SkyFracture": "Небесный разлом", + "SlimeGun": "Слизневый пистолет", + "SlimeHook": "Слизневый крюк", + "SlushBall": "Слякоть", + "SmokeBomb": "Дымовая бомба", + "SniperBullet": "Снайперская пуля", + "SnowBallFriendly": "Снежок", + "SnowBallHostile": "Снежок", + "SolarCounter": "Солнечное излучение", + "SolarFlareChainsaw": "Бензопила солнечной вспышки", + "SolarFlareDrill": "Бур солнечной вспышки", + "SolarFlareRay": "Солнечная вспышка", + "SolarWhipSword": "Солнечное извержение", + "SolarWhipSwordExplosion": "Солнечное извержение", + "SoulDrain": "Похищение души", + "SoulscourgePirate": "Пират-душегуб", + "Spark": "Искра", + "Spazmamini": "Спазмамини", + "Spear": "Копье", + "SpearTrap": "Копье", + "SpectreWrath": "Спектральный гнев", + "SpelunkerGlowstick": "Светящаяся палочка шахтера", + "Spider": "Паук", + "SpiderEgg": "Паучье яйцо", + "SpiderHiver": "Паучья турель", + "Spike": "Шип", + "SpikedSlimeSpike": "Копье слизней", + "SpikyBall": "Колючий шар", + "SpikyBallTrap": "Колючий шар", + "SpiritFlame": "Пламя духа", + "SpiritHeal": "Духовное лечение", + "SporeCloud": "Споровое облако", + "SporeGas": "Спора", + "SporeGas2": "Спора", + "SporeGas3": "Спора", + "SporeTrap": "Спора", + "SporeTrap2": "Спора", + "Squashling": "Тыковка", + "Stake": "Кол", + "StarAnise": "Звездчатый анис", + "StardustCellMinion": "Клетка звездной пыли", + "StardustCellMinionShot": "Клетка звездной пыли", + "StardustChainsaw": "Бензопила звездной пыли", + "StardustDragon1": "Дракон звездной пыли", + "StardustDragon2": "Дракон звездной пыли", + "StardustDragon3": "Дракон звездной пыли", + "StardustDragon4": "Дракон звездной пыли", + "StardustDrill": "Бур звездной пыли", + "StardustGuardian": "Хранитель звездной пыли", + "StardustGuardianExplosion": "Звездная вспышка", + "StardustJellyfishSmall": "Захватчик потока", + "StardustSoldierLaser": "Лазер звездной пыли", + "StardustTowerMark": "Звездная отметка", + "Starfury": "Звездная ярость", + "StarWrath": "Звездная ярость", + "StaticHook": "Неподвижный крюк", + "StickyBomb": "Бомба-липучка", + "StickyDynamite": "Липкий динамит", + "StickyGlowstick": "Липкая светящаяся палочка", + "StickyGrenade": "Липкая граната", + "Stinger": "Жало", + "Stynger": "Стингер", + "StyngerShrapnel": "Стингер", + "Sunfury": "Солнечная ярость", + "SuspiciousTentacle": "Подозрительно выглядящее щупальце", + "SwordBeam": "Луч меча", + "Swordfish": "Рыба-меч", + "Tempest": "Буря", + "TendonHook": "Крюк", + "TerraBeam": "Луч земли", + "Terrarian": "Террариан", + "TerrarianBeam": "Террариан", + "TheDaoofPow": "Дао Пуха", + "TheEyeOfCthulhu": "Йо-йо", + "TheMeatball": "Фрикаделька", + "TheRottedFork": "Гнилая вилка", + "ThornBall": "Шипастый шар", + "ThornChakram": "Колючий чакрам", + "ThornHook": "Крюк", + "ThrowingKnife": "Метательный нож", + "TiedEighthNote": "Записка", + "TikiSpirit": "Дух Тики", + "TinyEater": "Малый пожиратель", + "TitaniumChainsaw": "Титановая бензопила", + "TitaniumDrill": "Титановый бур", + "TitaniumTrident": "Титановый трезубец", + "Tombstone": "Надгробная плита", + "TopazBolt": "Топазовый снаряд", + "TowerDamageBolt": "Выпущенная энергия", + "ToxicBubble": "Токсический пузырь", + "ToxicCloud": "Токсическое облако", + "ToxicCloud2": "Токсическое облако", + "ToxicCloud3": "Токсическое облако", + "ToxicFlask": "Колба с токсинами", + "TrackHook": "Рельсовый крюк", + "Trident": "Трезубец", + "Truffle": "Трюфель", + "TruffleSpore": "Спора трюфеля", + "Turtle": "Черепаха", + "Twinkle": "Искорка", + "Typhoon": "Тайфун", + "UFOLaser": "Луч НЛО", + "UFOMinion": "НЛО", + "UnholyArrow": "Нечестивая стрела", + "UnholyTridentFriendly": "Нечестивый трезубец", + "UnholyTridentHostile": "Нечестивый трезубец", + "UnholyWater": "Нечестивая вода", + "ValkyrieYoyo": "Йо-йо", + "Valor": "Йо-йо", + "VampireHeal": "Вампирское лечение", + "VampireKnife": "Вампирские ножи", + "VenomArrow": "Ядовитая стрела", + "VenomBullet": "Ядовитая пуля", + "VenomFang": "Ядовитый клык", + "VenomSpider": "Ядовитый паук", + "ViciousPowder": "Порочная пыль", + "VilePowder": "Ужасный порошок", + "VilethornBase": "Злая колючка", + "VilethornTip": "Злая колючка", + "VineRopeCoil": "Моток лозы", + "VortexAcid": "Замазка чужих", + "VortexBeater": "Пушка вихря", + "VortexBeaterRocket": "Ракета вихря", + "VortexChainsaw": "Бензопила вихря", + "VortexDrill": "Бур вихря", + "VortexLaser": "Лазер вихря", + "VortexLightning": "Молния вихря", + "VortexVortexLightning": "Вихрь", + "VortexVortexPortal": "Вихрь", + "Wasp": "Оса", + "WaterBolt": "Водяной выстрел", + "WaterGun": "Водяной пистолет", + "WaterStream": "Водный скипетр", + "Web": "Паутина", + "WebRopeCoil": "Моток веревки", + "WebSpit": "Плевок паутиной", + "WireKite": "Руководство по проволоке", + "Wisp": "Дух", + "WoodenArrowFriendly": "Деревянная стрела", + "WoodenArrowHostile": "Деревянная стрела", + "WoodenBoomerang": "Деревянный бумеранг", + "WoodHook": "Деревянный крюк", + "WoodYoyo": "Йо-йо", + "WormHook": "Крюк", + "Xenopopper": "Ксенопушка", + "Yelets": "Йо-йо", + "YellowCounterweight": "Противовес", + "ZephyrFish": "Рыба-зефир", + "Ale": "Эль", + "ApprenticeStaffT3Shot": "Ярость Бетси", + "BookStaffShot": "Книга бесконечной мудрости", + "DD2ApprenticeStorm": "Вихрь бесконечной мудрости", + "DD2BallistraProj": "Баллиста", + "DD2BallistraTowerT1": "Баллиста", + "DD2BallistraTowerT2": "Баллиста", + "DD2BallistraTowerT3": "Баллиста", + "DD2BetsyArrow": "Воздушное проклятие", + "DD2BetsyFireball": "Файербол Бетси", + "DD2BetsyFlameBreath": "Дыхание Бетси", + "DD2DarkMageBolt": "Темная энергия", + "DD2DarkMageHeal": "Темная печать", + "DD2DarkMageRaise": "Темная печать", + "DD2DrakinShot": "Дракин", + "DD2ElderWins": "Мрачный конец", + "DD2ExplosiveTrapT1": "Ловушка со взрывчаткой", + "DD2ExplosiveTrapT1Explosion": "Ловушка со взрывчаткой", + "DD2ExplosiveTrapT2": "Ловушка со взрывчаткой", + "DD2ExplosiveTrapT2Explosion": "Ловушка со взрывчаткой", + "DD2ExplosiveTrapT3": "Ловушка со взрывчаткой", + "DD2ExplosiveTrapT3Explosion": "Ловушка со взрывчаткой", + "DD2GoblinBomb": "Бомба гоблина", + "DD2LightningAuraT1": "Аура света", + "DD2LightningAuraT2": "Аура света", + "DD2LightningAuraT3": "Аура света", + "DD2LightningBugZap": "Иссушающий выстрел", + "DD2OgreSmash": "Топот огра", + "DD2OgreSpit": "Плевок огра", + "DD2OgreStomp": "Топот огра", + "DD2PetDragon": "Жаднодракон", + "DD2PetGato": "Котопропеллер", + "DD2PetGhost": "Огонек", + "DD2PhoenixBow": "Призрачный феникс", + "DD2PhoenixBowShot": "Призрачный феникс", + "DD2SquireSonicBoom": "Сердечная волна", + "DD2Win": "Победа!", + "MonkStaffT1": "Сонный осьминог", + "MonkStaffT1Explosion": "Встряска удочкой", + "MonkStaffT2": "Жуткая глефа", + "MonkStaffT2Ghast": "Жуть", + "MonkStaffT3": "Ярость небесного дракона", + "MonkStaffT3_Alt": "Ярость небесного дракона", + "MonkStaffT3_AltShot": "Ярость небесного дракона", + "DD2JavelinHostileT3": "{$ProjectileName.DD2JavelinHostile}", + "Celeb2Rocket": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketExplosive": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketLarge": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketLargeExplosive": "{$ProjectileName.Celeb2Weapon}" + } +} \ No newline at end of file diff --git a/Localization/Content/ru-RU/Town.json b/Localization/Content/ru-RU/Town.json new file mode 100644 index 0000000..6d51a68 --- /dev/null +++ b/Localization/Content/ru-RU/Town.json @@ -0,0 +1,228 @@ +{ + "DryadSpecialText": { + "WorldStatusAll": "{0} — на {1} % Освящение, на {2} % Порча и на {3} % Багрянец.", + "WorldStatusHallowCorrupt": "{0} — на {1} % Освящение и на {2} % Порча.", + "WorldDescriptionGrim": "Дела сильно испорчены...", + "WorldDescriptionWork": "У тебя много работы.", + "WorldDescriptionClose": "Ты так близко!", + "WorldStatusHallowCrimson": "{0} — на {1} % Освящение и на {2} % Багрянец.", + "WorldStatusCorruptCrimson": "{0} — на {1} % Порча и на {2} % Багрянец.", + "WorldStatusCorrupt": "{0} — на {1} % Порча.", + "WorldStatusCrimson": "{0} — на {1} % Багрянец.", + "WorldStatusHallow": "{0} — на {1} % Освящение.", + "WorldStatusPure": "{0} — полностью чист. Отличная работа!", + "WorldDescriptionBalanced": "Мир находится в равновесии.", + "WorldDescriptionFairyTale": "Мы живем как в сказке.", + "Party": "Думаю, нужно закатить вечеринку, чтобы отпраздновать наши победы, прошлые и будущие.", + "AfterDD2Tier1": "Когда я была на Этерии, я чувствовала себя такой отключенной от {WorldName}. Так приятно вернуться.", + "AfterDD2Tier2": "Когда я прибыла на Этерию, порча пыталась захватить меня, но вместо этого я использовала ее силу против армии Старца!" + }, + "DyeTraderSpecialText": { + "HasPlant_0": "Прекрасно, милый человек! Ты принес мне прекрасный образец чудесных красок и ароматов мира. Взамен ты можешь взять эту бутылочку особого красителя.", + "HasPlant_1": "Ты принес мне красивый редкий цветок... да, правда? За свои хлопоты возьми эту бутылочку особого красителя, друг!", + "HasPlant_2": "Восхихитительно, прекрасно, друг! С помощью этого нежного образца я могу получать самые замечательные красители, какие мир {WorldName} еще не видывал! Можешь взять вот этот прямо сейчас!", + "NoPlant_0": "О нет, это не пойдет. За эти деньги не пойдет, тебе лучше вернуться ко мне с каким-нибудь редким растением!", + "NoPlant_1": "Думаешь, {DyeTrader} такой наивный? А я так не думаю! Для этих особых бутылочек нужны только самые редкие растения!", + "NoPlant_2": "Те бутылочки с чернилами? Извини, друг, деньги не принимаю. В обмен на такие чернила мне нужны только самые ценные и редкие растения!", + "Party": "Я очень люблю тусовки, там всегда так ярко и весело." + }, + "GuideSpecialText": { + "Party": "Любишь ходить на вечеринки? Тебе может понадобиться узнать у других. Люди иногда приносят необычные подарочки." + }, + "MerchantSpecialText": { + "Party": "Ты знаешь, какая тусовка — самая лучшая? Та, на которой можно дарить подарочки." + }, + "GoblinTinkererSpecialText": { + "Party": "Гоблинские тусовки во многом похожи на человеческие. И на тех, и на других любят играть в игру «свали вину на соседа»... На своих тусовках я не играю в игры." + }, + "WitchDoctorSpecialText": { + "Party": "Я хотела увидеть, как тусуются такие как ты, и я не разочаровалась.", + "AfterDD2Tier1": "Я чувствую родственный дух в этерианских темных магах. Жаль, что они наши враги, мне бы хотелось у них поучиться." + }, + "ClothierSpecialText": { + "Party": "Мама всегда говорила, что сначала нужно отпустить прошлое, а потом уже тусоваться." + }, + "TravellingMerchantSpecialText": { + "Party": "Многие говорят, что их самые яркие воспоминания — о тусовках. Купи же что-нибудь, и пусть у тебя останутся хорошие воспоминания!" + }, + "MechanicSpecialText": { + "Party": "Думаешь, кто-то будет против, если вместо свечек я обмотаю провод лампочками?" + }, + "BartenderSpecialText": { + "AfterDD2Tier1": "Поздравляю с победой армии Старца! Но я уверен, что это была не вся армия, в этой битве они показали себя не полностью.", + "AfterDD2Tier2": "Армия Старца наращивает силы, но пока тебе удается отражать ее нападения! Хотя, что-то мне подсказывает, что на сегодня они с тобой еще не закончили.", + "AfterDD2Tier3": "Тебе действительно удалось сдержать все силы армии Старца? Возможно, тебе стоит как-нибудь посетить Этерию.", + "BeforeDD2Tier1": "Нам действительно нужно что-то решать с армией Старца. Спроси меня об этерниевом кристалле, если хочешь узнать об этом больше.", + "FirstHelp": "Для начала возьми несколько медалей защитника за счет заведения! У меня продаются некоторые особые средства обороны, но только за медали защитника!", + "FirstMeeting": "Ух! Как я тут оказался? Последнее, что я помню — как передо мной открылся портал..." + }, + "PartyGirlSpecialText": { + "Party_1": "Да? Сегодня ничего особенного... шучу! Пора тусоваться, а потом — афтепати!", + "Party_2": "Наконец-то настало мое время!", + "AfterDD2Tier1": "Тебе уже приходилось видеть огра? Мне хотелось бы прокатиться на спине одного из них!" + }, + "PirateSpecialText": { + "Party": "После такого торта можешь называть меня «белая борода»." + }, + "TruffleSpecialText": { + "Party": "Я бы пригласила всех на тусовку к себе домой, но у меня и гриб не поместится." + }, + "NurseSpecialText": { + "Party": "Нет, я не скажу, сколько свечек у меня на торте." + }, + "WizardSpecialText": { + "Party": "Я явно закатываю самые волшебные тусовки.", + "AfterDD2Tier1": "Знаешь, мне вроде уже встречался похожий портал, но он был из золота." + }, + "CyborgSpecialText": { + "Party": "Эта тусовка будет огонь! Или даже пожар!" + }, + "DemolitionistSpecialText": { + "Party": "Сегодня тебе нужно быть осторожнее. У нас, гномов, довольно взрывные вечеринки.", + "AfterDD2Start": "Не понимаю, почему мы не можем просто взорвать эти порталы." + }, + "ArmsDealerSpecialText": { + "Party": "Вечеринки хороши тем, что на них люди раскрываются, прямо как устрицы." + }, + "StylistSpecialText": { + "Party": "Наверное, мне бы стоило сегодня сделать укладку, но мне сегодня хочется только лопать шарики ножницами." + }, + "PainterSpecialText": { + "Party": "Мне хотелось устроить пейнтбольную вечеринку, но всем хотелось только еды и украшений." + }, + "AnglerSpecialText": { + "Party": "Думаешь, мне нравятся тусовки только из-за моего возраста? Именно! Так что давай тусоваться!" + }, + "AnglerQuestText": { + "NoQuest_1": "У меня для тебя пока нет поручений.", + "NoQuest_2": "Сегодня ты развлекал меня достаточно, иди.", + "NoQuest_3": "Ты уже все сделал. Великий {Angler} сегодня тебя не примет!", + "NoQuest_4": "Мне достаточно одной рыбы в день. Уходи, пожалуйста!", + "NoQuest_5": "Я пока даже не использовал предыдущую рыбу, которую ты мне принес. Мне больше не нужно.", + "TurnIn_1": "Ох! Спасибо за рыбу, которую я просил, а теперь проваливай!", + "TurnIn_2": "Отличный улов! Все идет по плану! Хе-хе-хе!", + "TurnIn_3": "Из тебя получается отличный мальчик на побегушках! А теперь уходи!", + "TurnIn_4": "Муа-ха-ха-ха-ха! У тебя получилось! Но ты остался невредимым — как же это скучно!", + "TurnIn_5": "Что?! Ты сделал то, что я просил, и выжил! Отлично, давай сюда и проваливай!", + "Quest_Batfish": "На на-на на-на, Бэт-РЫБ! Спускайся под землю, найди рыбу и принеси мне!\n\n(Поймано в подземелье и пещерах)", + "Quest_BumblebeeTuna": "В этих подземных джунглях {WorldName} столько всего невероятного! Например, я видел рыбу, точь-в-точь похожую на огромного шмеля. А на всяких пчел у меня аллергия, так что поймай ее для меня! Уверен, на вкус она как бутерброд с тунцом и медом!\n\n(Поймано в меде)", + "Quest_Catfish": "Наконец-то я нашел в джунглях кота, который любит воду! Наверное, потому что он наполовину рыба. Не знаю, как так получилось, да и знать не хочу. Я просто хочу заполучить его, и как можно быстрее!\n\n(Поймано в джунглях на поверхности)", + "Quest_Cloudfish": "До меня дошли слухи об островах, парящих высоко в небе. А еще говорят, что там скрываются невероятные сокровища! Хотя кому до этого дело, когда в облаках возникают озера, в которых плавают облачные рыбы! Хочу попробовать одну из таких на вкус, так что поймай мне ее поскорее!\n\n(Поймано в парящих озерах)", + "Quest_Cursedfish": "В водах Порчи в глубинах земли плавает проклятая рыба! Она создана из проклятого пламени павших ужасов, которые там скрываются. Говорят, этот огонь не может потушить даже вода, и он может гореть вечно. Я уже придумал несколько крутых применений для этой рыбы! Ты же принесешь ее мне или у тебя кишка тонка?!\n\n(Поймано в Порче)", + "Quest_DynamiteFish": "Подрывник поднял шум из-за того, что уронил динамитную шашку в лесное озеро. И чего он так переживает, у него же их целая куча? Наверное, потому что шашка обзавелась плавниками и уплыла! Не знаю, из чего он делает свою взрывчатку, но эта шашка явно одержима! Поймай ее и принеси мне — всегда хотел рыбу-бомбу в коллекцию! И не спрашивай, зачем...\n\n(Поймано на поверхности)", + "Quest_EaterofPlankton": "Уверен, у тебя не хватит смелости найти пожирателя планктона. Это искаженная рыба, мутировавшая из отрубленных частей самого Пожирателя миров! Поймай и принеси мне ее — докажи, что ты не трус!\n\n(Поймано в Порче)", + "Quest_FallenStarfish": "Как же я люблю собирать яркие желтые звезды, которые падают с неба! А еще больше мне нравится, когда они приземляются кому-нибудь на голову. Но… но… нет ничего круче звезды, которая падает в лесное озеро и превращается в рыбу! Ты же тоже крутой — сможешь достать ее для меня?\n\n(Поймано в парящих озерах)", + "Quest_TheFishofCthulu": "Похоже, некоторые Демонические глаза — водоплавающие. Вместо полетов они плавают! Я хочу увидеть лицо неудачника, обнаружившего это в своей ванне! Их можно найти там же, что и обычных. Поэтому ты должен выловить одного из них и принести ко мне!\n\n(Поймано в парящих озерах и на поверхности)", + "Quest_Fishotron": "Не знаю, что ужаснее — костяная рыба или костяная рыба с РУКАМИ. Этот Рыботрон в подземелье меня очень пугает! Думаю, он одержим теми же злыми духами, что завладели стариком, который охраняет темницу! Спорим, ты не сможешь поймать такую рыбку?\n\n(Поймано в пещерах)", + "Quest_Harpyfish": "Я только было задремал на берегу горного озера, как на меня накинулась страшная рыба. Она летала! А еще у нее было женское лицо и перья! Кажется, я тогда кричал громче, чем она! Расплатись с ней за то, что она напугала меня так сильно!\n\n(Поймано в парящих озерах и на поверхности)", + "Quest_Hungerfish": "Кусок Голода оторвался от Стены плоти и превратился в маленькую рыбоподобную штуку, которая теперь бесцельно плавает в преисподней. Она мерзкая и отвратительная, но я хочу заполучить ее немедленно!\n\n(Поймано в пещерах)", + "Quest_Ichorfish": "Ты знал, что в глубинах Багрянца водятся такие твари, которые вырабатывают это противное желтое вещество? Я слышал невероятную историю о том, что такая желтая лужа слилась воедино и приняла форму рыбы, а теперь плавает где-то неподалеку! Поймай ее — хочу подсунуть ее кому-нибудь в туалет!\n\n(Поймано в Багрянце)", + "Quest_Jewelfish": "Оооооххх, я стану ТАКИМ богатым! Глубоко в пещерах есть рыба из драгоценных камней! Не спрашивай, как так получилось, потому что я знаю только, что эта рыба очень крутая, и ты поймаешь ее для меня!\n\n(Поймано в подземелье и пещерах)", + "Quest_MirageFish": "В глубинах Освящения водятся очень интересные существа! Они светятся совершенно безумным фиолетовым цветом, от которого в глазах рябит! Я безумно хочу, чтобы ты мне поймал такую рыбу!\n\n(Поймано в подземном Освящении)", + "Quest_MutantFlinxfin": "Слушай загадку: белое, пушистое и живет в ледяном подземном озере? Рыборысь-мутант! Знаешь, я не шучу. Действительно, бывают такие рыси-мутанты, которые более приспособлены к водному образу жизни! А я хочу, чтобы она приспособилась к моему аквариуму, так что не подведи!\n\n(Поймано в подземной тундре)", + "Quest_Pengfish": "Это кит! Это дельфин! Нет, это рыба-пингвин! О, смотри, вот и ты! Ты должен принести мне такую рыбу! Ты же знаешь, что они любят только холодную воду, да?\n\n(Поймано в Тундре)", + "Quest_Pixiefish": "Есть такой очень-очень редкий вид фей, у которых от рождения так много крыльев, что они даже не могут летать! Они плавают с рыбами в озерах, окруженных такой голубой травой. Моему аквариуму нужна лампа, поэтому я хочу, чтобы ты поймал мне эту фею!\n\n(Поймано в Освящении)", + "Quest_Spiderfish": "Я видел восьминогую рыбу! Нет уж! Я и близко больше туда не подойду! Ты поймаешь мне эту рыбу, и чтоб она была мертвой, когда я возьму ее в руки! Рыбачить так глубоко в пещере я больше не собираюсь!\n\n(Поймано в подземелье и пещерах)", + "Quest_UnicornFish": "Единороги и радуги — это просто чудо! Они есть везде, даже в воде. Нет, серьезно — я действительно видел рыбу-единорога в освященном озере! Поймай ее — хочу сделать из нее питомца!\n\n(Поймано в Освящении)", + "Quest_GuideVoodooFish": "Демонам в подземном мире очень нравятся куклы вуду, но, кажется, там есть кукла, которую слишком накачали магической силой! Она превратилась в рыбу и действует по своей воле. Принеси мне ее! И остерегайся кипящей лавы, а то она сожжет тебя дотла и я не получу своей рыбы!\n\n(Поймано в пещерах)", + "Quest_Wyverntail": "Я знаю кое-что, чего тыыыы не знаешь! Ладно, скажу тебе. Среди звезд летает ужасное создание! И я не выдумываю! Его называю Виверна! Но тебе ведь это уже было известно, правда? А знаешь, что Виверны вырастают из головастиков? Так что они почти как… лягушки! Вперед, вприпрыжку, найди мне такого головастика!\n\n(Поймано в парящих озерах)", + "Quest_ZombieFish": "Ты мне не поверишь! Ночью я поймал в лесу уже мертвую рыбу! И она потом попыталась меня съесть! Я выбросил ее и убежал! А теперь хочу спрятать ее кому-нибудь в шкаф и посмотреть, что будет. Так что вылови мне ее обратно, хорошо?\n\n(Поймано на поверхности)", + "Quest_AmanitaFungifin": "Я нашел замечательное место с гигантскими светящимися грибами! Все вокруг светилось голубым! Я начал собирать грибы, которые нашел возле сверкающего голубого озера, но тут один из них цапнул меня и уплыл! Хочу отплатить ему тем же — хорошенько его потрепать! Поэтому найди его и принеси сюда!\n\n(Поймано на полях светящихся грибов)", + "Quest_Angelfish": "Ты знал, что высоко в небе парят волшебные острова? Уверен, не знал! Говорят, на небесах живут ангелы. А я думаю, что у этих ангелов есть плавники и жабры! Верю, ты сможешь поймать мне одного из них!\n\n(Поймано в парящих озерах)", + "Quest_BloodyManowar": "Ой! Не подходи! Меня ужалил Кровавый Мановар! Если ты недостаточно умен, чтобы знать о нем — это самая опасная медуза во всем мире {WorldName}! Отправляйся в этот гадкий багрянец и поймай ее, если тебе хватит мужества! \n\n(Поймано в Багрянце)", + "Quest_Bonefish": "Обычно меня совершенно не беспокоят рыбьи кости, плавающие в воде под землей, но эти кости плавали осознанно! Ты думал, только человеческие скелеты болтаются по этому миру {WorldName}? Поймай мне такую рыбу, чтобы я подложил ее кому-нибудь в кровать!\n\n(Поймано в подземелье и пещерах)", + "Quest_Bunnyfish": "В общем, вышел я как-то порыбачить в лес. И представь! На меня выпрыгнул кролик! А потом еще один, и еще один… внезапно оказалось, что я окружен целой стаей кроликов! Один даже подплыл ко мне по воде, но у него не было лап! Я от удивления свалился с кресла, и все кролики разбежались! Я хочу этого кролика-рыбу сделать своим питомцем, так что поймай его! И поживее!\n\n(Поймано на поверхности)", + "Quest_CapnTunabeard": "Эй, салага! Разрази меня гром! Тысяча чертей! У одного капитана пиратов была рыбка по имени Капитан Тунцовая Борода, но как-то во время сильного шторма аквариум упал за борт! У нее крюк вместо хвоста, повязка на глазу и все такое! Поймай мне эту рыбу, чтобы я стал крутым как пират! Ясное дело, она до сих пор где-то в океане! Намек понял?\n\n(Поймано в океане)", + "Quest_Clownfish": "На берегу океана я видел яркую оранжевую рыбу. Она оглядывалась вокруг в таком волнении, словно потеряла кого-то из семьи! Поймай ее мне — тогда на берегу уже другая рыба будет искать своего родича!\n\n(Поймано в океане)", + "Quest_DemonicHellfish": "Я слышал, что король всех демонов преисподней — это на самом деле рыба! Только представь, какой безграничной властью я буду обладать, если ты мне ее поймаешь!\n\n(Поймано в пещерах)", + "Quest_Derpfish": "Те чертовы блохи — самые страшные существа, что я видел! Хорошо, что у них иногда нет ног. Эта разновидность обитает в воде, она не такая опасная! Поймай мне это существо — хочу попробовать его на вкус, не перепугавшись до полусмерти!\n\n(Поймано в джунглях на поверхности)", + "Quest_Fishron": "Ходит легенда о могучем создании, известном как Рыброн! Это частично свинья, частично дракон, а частично РЫБА! Слышал, это существо обитает в ледяных подземных озерах в самой холодной части мира! Я туда не пойду, так что пойди ТЫ и поймай его! Так не терпится уже заполучить его!\n\n(Поймано в подземной тундре)", + "Quest_InfectedScabbardfish": "В мутных водах Порчи плавает очень длинная рыба, похожая на ножны меча! Она сильно напоминает черный камень, так что будь внимателен! Да, это я к тебе обращаюсь. Ты же будешь ее ловить, не я!\n\n(Поймано в Порче)", + "Quest_Mudfish": "Ступай осторожно через воды джунглей! Почему? Нет, не потому, что я беспокоюсь, что тебя сожрут пираньи. Просто не хочу, чтобы ты наступил на одну из моих любимых рыб — грязевую рыбу! А еще я очень хочу, чтобы ты поймал мне ее!\n\n(Поймано в джунглях)", + "Quest_TropicalBarracuda": "Пираньи и акулы — это такие уродливые существа! Ну ооочень уродливые! Ты знал, что даже если рыба выглядит очень красиво, она все равно может обглодать тебе лицо? Кстати, за такое зрелище я бы заплатил 2 платиновых монеты… Ладно, перейдем к делу — ты поймаешь мне эту рыбу. Только постарайся это сделать до того, как лишишься своего лица!\n\n(Поймано в джунглях на поверхности)", + "Quest_TundraTrout": "А у тебя когда-нибудь были мысли о том, почему озера в заснеженных областях этого мира {WorldName} никогда не замерзают? У меня — нет. А вот рыба замерзает! Рыба из льда будет отличным подношением, которое примет великий и ужасный {Angler}! Отправляйся в путь, мой верный подданный, и поскорее принеси мне тундровую форель!\n\n(Поймано в тундре на поверхности)" + }, + "AnglerChatter": { + "Chatter_1": "Почему не хочет продавать мне {Bartender}? Я хочу попробовать! Какой брюзга!" + }, + "BartenderChatter": { + "Chatter_1": "У меня есть лекарство от твоей болезни! Понимаешь? Эль! Нет?", + "Chatter_10": "Думаешь, {Steampunker} продает дополнения к этому оружию? Я знаю одну ведьму, которая продает.", + "Chatter_11": "Не удивительно, что {Demolitionist} вечно попадает в передряги. Ты даже не представляешь, сколько эля он у меня покупает.", + "Chatter_12": "Обычно я не большой фанат гоблинов, но {GoblinTinkerer}, похоже, правильный малый.", + "Chatter_13": "{?Day}Кто-нибудь видел, куда подевалась Дриада?", + "Chatter_14": "{?!Day}Тут как-то тихо. Даже слишком тихо...", + "Chatter_15": "{?!Day}Заходи ко мне и делай свою работу.", + "Chatter_16": "{?BloodMoon}Знаешь, там, откуда я родом, Кровавая луна — только лишний повод прогуляться.", + "Chatter_17": "{?MoonLordDefeated}Лунный лорд? Ты про Лорда преисподней?", + "Chatter_18": "{?HardMode}Я знаю одного лаваманта, которому бы очень понравились эти адские камни в преисподней.", + "Chatter_19": "{?Homeless}Знаешь хорошие места для лавки? Я бы открыл тут бар.", + "Chatter_2": "Говорят, ты сильный. Я знаю сильных. Посмотрим, сравнишься ли ты с ними.", + "Chatter_3": "Там, откуда я родом, мы подаем только пиво из корешков...", + "Chatter_4": "Это большое повышение после протирания стола целый день.", + "Chatter_5": "Жизнь — боль, когда ты от природы лучше всех.", + "Chatter_6": "Что я здесь делаю...", + "Chatter_7": "Много упорства и немного везения могут завести далеко...", + "Chatter_8": "Тебе тут не встречались Мёбрусы?", + "Chatter_9": "{Dryad} милая. Нужно увезти ее с собой." + }, + "BartenderHelpText": { + "Help_1": "Это первое, что тебе нужно знать об особых защитных артефактах, которые я продаю, но только если у тебя есть медали защитника!", + "Help_10": "Если ты успешно отражаешь нашествие, ты получаешь медали защитника, которые можешь принести мне и в обмен получить артефакты и другие особые награды.", + "Help_11": "Еще до меня доходили слухи о том, что силу артефактов можно увеличить, если победить армию Старца. Может, ты даже сможешь их использовать в любой момент!", + "Help_2": "Ты можешь использовать эти артефакты, чтобы создавать ловушки и защитные башни. На это расходуется этерианская мана — особая энергия, которая выпадает только с солдат армии Старца!", + "Help_3": "Победить армию Старца довольно просто. Ее привлекает сила этерианских кристаллов, которые можно использовать как наживку.", + "Help_4": "Чтобы установить этерианский кристалл, нужно найти такой кристалл и стенд. Так случилось, что я как раз их продаю!", + "Help_5": "Стенд для этерианского кристалла нужно ставить на ровной открытой области. Много стен и других предметов значительно усложняют оборону!", + "Help_6": "После установки стенда нужно просто активировать его, удерживая в руке этерианский кристалл, а потом готовиться к бою!", + "Help_7": "Разумеется, нельзя позволить армии Старца разрушить этерианский кристалл! Это окажет катастрофические последствия на мой родной мир — Этерию!", + "Help_8": "Можно устанавливать защитные механизмы за 10 единиц этерианской маны. После установки этерианский кристалл даст немного этой маны. Чтобы получить еще, нужно побеждать врагов.", + "Help_9": "С помощью защитных механизмов нужно отразить несколько волн захватчиков, которые будут пытаться уничтожить и тебя, и этерианский кристалл!" + }, + "BartenderNames": { + "Name_1": "Тед", + "Name_10": "Явахоук", + "Name_11": "Эландриан", + "Name_12": "Дрискан", + "Name_13": "Ямисом", + "Name_14": "Блэксмит", + "Name_15": "Дани Му", + "Name_16": "Пэдди", + "Name_2": "Барик", + "Name_3": "Джерри", + "Name_4": "Билл", + "Name_5": "Эрнест", + "Name_6": "Уиллиам", + "Name_7": "Дейл", + "Name_8": "Брюс", + "Name_9": "Моу" + }, + "CyborgChatter": { + "Chatter_1": "{Bartender} сказал, что я напоминаю ему о какой-то EV2. Возможно, стоит с ней встретится." + }, + "GoblinTinkererChatter": { + "Chatter_1": "Знаешь, те этерианские гоблины не имеют ничего общего с моим народом. Они — просто банда хулиганов. А мой народ — намного лучше..." + }, + "GuideHelpText": { + "Help_1063": "Я бы мог рассказать тебе все об этой армии Старца, но {Bartender} наверняка знает об этом больше." + }, + "MechanicChatter": { + "Chatter_1": "{Bartender} предложил мне пиво из корешков, а я попросил налить мне его в квадратный бокал." + }, + "NurseChatter": { + "Chatter_1": "Я прошу вино, а {Bartender} постоянно наливает мне эль." + }, + "PirateChatter": { + "Chatter_1": "В конце концов, нам пора уже обзавестись трактирщиком! Мой ром почти закончился!" + }, + "StylistChatter": { + "Chatter_1": "Я подумал, что {Bartender} выпьет за мой счет, но он отказался. Ну, я мог хотя бы привести в порядок его усы!" + }, + "TownNPCHousingFailureReasons": { + "HoleInWallIsTooBig": "В этой комнате не хватает стены", + "RoomCheckStartedInASolidTile": "Это твердый блок!", + "RoomIsTooBig": "Эта комната слишком большая", + "RoomIsTooSmall": "Эта комната слишком маленькая", + "TooCloseToWorldEdge": "Для этого нам нужен текст получше!!!" + } +} \ No newline at end of file diff --git a/Localization/Content/zh-Hans.json b/Localization/Content/zh-Hans.json new file mode 100644 index 0000000..2b94a34 --- /dev/null +++ b/Localization/Content/zh-Hans.json @@ -0,0 +1,708 @@ +{ + "GameTitle": { + "0": "泰拉瑞亚:劳工挖啊挖!", + "1": "泰拉瑞亚:神土", + "10": "泰拉瑞亚:挖土之王", + "11": "泰拉瑞亚:没有奶牛层", + "12": "泰拉瑞亚:可疑魔眼", + "13": "泰拉瑞亚:紫草地!", + "14": "泰拉瑞亚:没有人在后面挖!", + "15": "泰拉瑞亚:物竞天择!", + "16": "泰拉瑞亚:地球冒险", + "17": "泰拉瑞亚:挖挖总有收获", + "18": "泰拉瑞亚:有矿自有天相", + "19": "泰拉瑞亚:天罚粘土", + "2": "泰拉瑞亚:绝世精金!", + "20": "泰拉瑞亚:陆地生物的麻烦", + "21": "泰拉瑞亚:强迫症现象模仿者", + "22": "泰拉瑞亚:红色开发救赎", + "23": "泰拉瑞亚:史莱姆的崛起", + "24": "泰拉瑞亚:现在有更多东西想杀你!", + "25": "泰拉瑞亚:向导死亡的谣言被严重夸大了", + "26": "泰拉瑞亚:我同情这些工具...", + "27": "泰拉瑞亚:洞穴探险者惊道“那是什么”?", + "28": "泰拉瑞亚:我回答“一些关于PC版更新的东西...”", + "29": "泰拉瑞亚:愿块块与你同在", + "3": "泰拉瑞亚:沙子被制服了", + "30": "泰拉瑞亚:远超生命", + "31": "泰拉瑞亚:泰拉瑞亚:泰拉瑞亚:", + "32": "泰拉瑞亚:现推出1D", + "33": "泰拉瑞亚:邻机即将拥有", + "34": "泰拉瑞亚:除数为零", + "35": "泰拉瑞亚:现已加入音效", + "36": "泰拉瑞亚:按alt-f4", + "37": "泰拉瑞亚:我同情这些工具", + "38": "泰拉瑞亚:兄弟你疯了吧?", + "39": "泰拉瑞亚:挖矿吉日", + "4": "泰拉瑞亚第3部分:向导归来", + "40": "泰拉瑞亚:重挖好吗?", + "41": "泰拉瑞亚:我不知道--啊啊啊!", + "42": "泰拉瑞亚:那紫色的尖玩艺儿是什么?", + "43": "泰拉瑞亚:我想成为向导", + "44": "泰拉瑞亚:克苏鲁疯了...还弄丢了眼睛!", + "45": "泰拉瑞亚:伪蜜蜂!!!", + "46": "泰拉瑞亚:麦克斯传奇", + "47": "泰拉瑞亚:Cenx邪教", + "48": "泰拉瑞亚2:电布加洛舞", + "49": "泰拉瑞亚:试试《我的世界》!", + "5": "泰拉瑞亚:兔兔的传说", + "50": "泰拉瑞亚:试试《太空边缘》!", + "51": "泰拉瑞亚:我只想知道金子在哪?", + "52": "泰拉瑞亚:现在有更多鸭子!", + "53": "泰拉瑞亚:9 + 1 = 11", + "54": "泰拉瑞亚:无限世纪之花", + "6": "泰拉瑞亚:骷髅博士和血月神庙", + "7": "泰拉瑞亚:史莱姆侏罗纪公园", + "8": "泰拉瑞亚:这边的草地更绿", + "9": "泰拉瑞亚:5岁以下的儿童不宜使用小块块", + "55": "泰拉瑞亚:少说多挖之外传!" + }, + "Achievements": { + "ARCHAEOLOGIST_Description": "杀死骷髅博士。", + "ARCHAEOLOGIST_Name": "考古学家", + "BALEFUL_HARVEST_Description": "到达南瓜月的第15波攻击,恶魔潜伏在金秋丰收之中。", + "BALEFUL_HARVEST_Name": "邪恶丰收", + "BEGONE_EVIL_Description": "用强大而神圣的锤子砸碎恶魔或猩红祭坛。", + "BEGONE_EVIL_Name": "滚开,恶魔!", + "BEHIND_THE_MASK_Description": "杀死疯狂信徒,一位拥有强大法术的疯狂魔法师。", + "BEHIND_THE_MASK_Name": "面具背后", + "BIG_BOOTY_Description": "用一把特别的钥匙打开地牢中的其中一个神秘大宝箱。", + "BIG_BOOTY_Name": "丰厚战利品", + "BLOODBATH_Description": "在血月之夜中活下来,在这一夜间事件中,河流被染红,怪物蜂拥而至。", + "BLOODBATH_Name": "大屠杀", + "BONED_Description": "打败骷髅王,地牢中被诅咒的守卫。", + "BONED_Name": "粉身碎骨", + "BUCKETS_OF_BOLTS_Description": "打败三个夜间出没的危险机械怪物:双子魔眼、毁灭者和机械骷髅王。", + "BUCKETS_OF_BOLTS_Name": "万矢齐发", + "BULLDOZER_Description": "共破坏10,000个图格。", + "BULLDOZER_Name": "推土机", + "ChallengerCategory": "挑战者", + "CHAMPION_OF_TERRARIA_Description": "打败月亮领主。", + "CHAMPION_OF_TERRARIA_Name": "泰拉瑞亚战士", + "CollectorCategory": "收藏家", + "Completed": "成就已完成!{0}", + "COMPLETELY_AWESOME_Description": "获得一把迷你鲨。", + "COMPLETELY_AWESOME_Name": "妙不可言", + "DAVY_JONES_LOCKER_Description": "打败荷兰飞盗船,四处抢劫的船队。", + "DAVY_JONES_LOCKER_Name": "戴维·琼斯之箱", + "DECEIVER_OF_FOOLS_Description": "杀死宁芙。", + "DECEIVER_OF_FOOLS_Name": "傻瓜骗子", + "DO_YOU_WANT_TO_SLAY_A_SNOWMAN_Description": "征服雪人军团,疯狂雪人暴徒的欢乐家族。", + "DO_YOU_WANT_TO_SLAY_A_SNOWMAN_Name": "想要杀死雪人吗?", + "DRAX_ATTAX_Description": "用神圣锭和三个机械boss的灵魂制作斧钻或镐斧。", + "DRAX_ATTAX_Name": "斧钻战队", + "DUNGEON_HEIST_Description": "从地牢的活尸处偷取钥匙,打开其中一个珍贵的金箱。", + "DUNGEON_HEIST_Name": "地牢大劫案", + "DYE_HARD_Description": "尽可能在每个染料栏中装备一种染料。", + "DYE_HARD_Name": "处处遍染", + "ExplorerCategory": "探险家", + "EXTRA_SHINY_Description": "开采你的世界新获赐的强大矿石。", + "EXTRA_SHINY_Name": "光彩夺目!", + "EYE_ON_YOU_Description": "打败克苏鲁之眼,只在夜间出没的危险眼球怪。", + "EYE_ON_YOU_Name": "盯着你", + "FASHION_STATEMENT_Description": "在所有三种社交栏中装备盔甲或浮华服饰。", + "FASHION_STATEMENT_Name": "时尚宣言", + "FAST_AND_FISHIOUS_Description": "完成第50个渔夫任务。", + "FAST_AND_FISHIOUS_Name": "游刃有鱼", + "FISH_OUT_OF_WATER_Description": "打败猪龙鱼公爵,大海中的变异怪兽。", + "FISH_OUT_OF_WATER_Name": "离水之鱼", + "FREQUENT_FLYER_Description": "花费1个以上的金币接受护士的治疗。", + "FREQUENT_FLYER_Name": "屡攻飞行怪", + "FUNKYTOWN_Description": "打造或发现地表上的发光蘑菇地。", + "FUNKYTOWN_Name": "时髦小镇", + "GELATIN_WORLD_TOUR_Description": "打败每一种史莱姆!", + "GELATIN_WORLD_TOUR_Name": "明胶世界之旅", + "GET_A_LIFE_Description": "吃一个生命果,这种果子长在茂密的地下丛林草地中。", + "GET_A_LIFE_Name": "重获新生", + "GLORIOUS_GOLDEN_POLE_Description": "获得一根金钓竿。", + "GLORIOUS_GOLDEN_POLE_Name": "荣耀金杆", + "GOBLIN_PUNTER_Description": "击败哥布林入侵,一群低贱、野蛮、粗暴的尖耳朵战士和暗影焰巫士。", + "GOBLIN_PUNTER_Name": "哥布林草民", + "GOOD_LITTLE_SLAVE_Description": "完成第10个渔夫任务。", + "GOOD_LITTLE_SLAVE_Name": "三好小奴隶", + "HEAD_IN_THE_CLOUDS_Description": "装备一对翅膀。", + "HEAD_IN_THE_CLOUDS_Name": "冲上云霄", + "HEART_BREAKER_Description": "发现并粉碎第一颗地下水晶之心。", + "HEART_BREAKER_Name": "碎心", + "HEAVY_METAL_Description": "获得由铁或铅制成的砧子。", + "HEAVY_METAL_Name": "重金属", + "HEX_EDUCATION_Description": "打败哥布林召唤师,掌控黑暗烈焰的巫师。", + "HEX_EDUCATION_Name": "魔法教训", + "HOLD_ON_TIGHT_Description": "装备第一个抓钩。", + "HOLD_ON_TIGHT_Name": "钩紧!", + "ICE_SCREAM_Description": "到达霜月的第15波攻击,节日季将迅速沦为疯狂暴动。", + "ICE_SCREAM_Name": "寒冰尖啸", + "INDEPENDENCE_DAY_Description": "打败母舰,火星入侵者的宿主。", + "INDEPENDENCE_DAY_Name": "独立日", + "INTO_ORBIT_Description": "在这儿你只能往下走!", + "INTO_ORBIT_Name": "进入轨道", + "ITS_GETTING_HOT_IN_HERE_Description": "深入洞穴探险,到达熔岩地狱。", + "ITS_GETTING_HOT_IN_HERE_Name": "越来越热", + "ITS_HARD_Description": "在你的世界里释放古老的光明与黑暗之魂,打败无比强大的敌人,利用耀眼夺目的宝藏(和彩虹!)净化世界。", + "ITS_HARD_Name": "举步维艰!", + "IT_CAN_TALK_Description": "在蘑菇群落里建造一栋房屋并让松露人住进来。", + "IT_CAN_TALK_Name": "它能说话?!", + "I_AM_LOOT_Description": "发现一个地下金箱并偷看里面有什么。", + "I_AM_LOOT_Name": "我是战利品!", + "JEEPERS_CREEPERS_Description": "摸索进入地下蜘蛛洞。", + "JEEPERS_CREEPERS_Name": "毛骨悚然", + "KILL_THE_SUN_Description": "活着度过比黑夜还黑的日食之日,到处都是可怕生物。", + "KILL_THE_SUN_Name": "食日", + "LIHZAHRDIAN_IDOL_Description": "打败石巨人,丛林蜥蜴部落的石脸祭祀神像。", + "LIHZAHRDIAN_IDOL_Name": "丛林蜥蜴之神", + "LIKE_A_BOSS_Description": "获得召唤boss的物品。", + "LIKE_A_BOSS_Name": "怪气外露", + "LUCKY_BREAK_Description": "活着从高处跌落并且只剩下一丁点生命值。", + "LUCKY_BREAK_Name": "时来运转", + "MARATHON_MEDALIST_Description": "总共步行26.2英里。", + "MARATHON_MEDALIST_Name": "马拉松奖牌得主", + "MASTERMIND_Description": "打败克苏鲁之脑,这个巨大的恶魔大脑常常出现在毛骨茸然的猩红之地。", + "MASTERMIND_Name": "最强大脑", + "MATCHING_ATTIRE_Description": "在所有三个盔甲栏(头部、胸部和脚部)中装备盔甲。", + "MATCHING_ATTIRE_Name": "全副武装", + "MECHA_MAYHEM_Description": "同时与双子魔眼、毁灭者和机械骷髅王战斗并获胜。", + "MECHA_MAYHEM_Name": "机甲混战", + "MINER_FOR_FIRE_Description": "使用最热的材料制作熔岩镐。", + "MINER_FOR_FIRE_Name": "烈焰矿工", + "NoCategory": "无", + "NOT_THE_BEES_Description": "穿上一整套蜜蜂盔甲使用蜜蜂枪射击。", + "NOT_THE_BEES_Name": "伪蜜蜂!", + "NO_HOBO_Description": "建造一栋足够大的房屋,让第一个城镇的NPC(如向导)住进来。", + "NO_HOBO_Name": "有家可归", + "OBSESSIVE_DEVOTION_Description": "打败远古信徒,地牢女巫团的狂热首领。", + "OBSESSIVE_DEVOTION_Name": "虔诚信仰", + "OBTAIN_HAMMER_Description": "通过制作或其他方式获得第一把锤子。", + "OBTAIN_HAMMER_Name": "停!锤子时间到!", + "OOO_SHINY_Description": "用镐开采第一块矿石。", + "OOO_SHINY_Name": "哦!亮闪闪!", + "PHOTOSYNTHESIS_Description": "开采叶绿矿石,一种深藏在最稠密的植物中的有机矿石。", + "PHOTOSYNTHESIS_Name": "光合作用", + "PRETTY_IN_PINK_Description": "杀死粉史莱姆。", + "PRETTY_IN_PINK_Name": "粉红佳人", + "PRISMANCER_Description": "获得一根彩虹魔杖。", + "PRISMANCER_Name": "七彩法师", + "PUMPKIN_SMASHER_Description": "打败南瓜王,万圣节前夕的恐怖领主。", + "PUMPKIN_SMASHER_Name": "南瓜粉碎者", + "RAINBOWS_AND_UNICORNS_Description": "骑着独角兽使用彩虹枪射击。", + "RAINBOWS_AND_UNICORNS_Name": "彩虹和独角兽", + "REAL_ESTATE_AGENT_Description": "让所有可以的城镇NPC住在你的世界里。", + "REAL_ESTATE_AGENT_Name": "房地产经纪人", + "ROBBING_THE_GRAVE_Description": "从难对付的地牢怪兽那儿获得稀世珍宝。", + "ROBBING_THE_GRAVE_Name": "盗墓", + "ROCK_BOTTOM_Description": "唯一的出路是向上!", + "ROCK_BOTTOM_Name": "最底层", + "SERVANT_IN_TRAINING_Description": "完成第1个渔夫任务。", + "SERVANT_IN_TRAINING_Name": "受训仆人", + "SICK_THROW_Description": "获得泰拉悠悠球。", + "SICK_THROW_Name": "非凡投掷", + "SlayerCategory": "杀手", + "SLAYER_OF_WORLDS_Description": "打败泰拉瑞亚中的每个boss。", + "SLAYER_OF_WORLDS_Name": "世界杀手", + "SLIPPERY_SHINOBI_Description": "打败史莱姆王,所有黏滑生物的首领。", + "SLIPPERY_SHINOBI_Name": "黏滑忍者", + "SMASHING_POPPET_Description": "使用炸药或可靠锤子,在世界的邪恶地带中粉碎暗影珠或猩红之心。", + "SMASHING_POPPET_Name": "碎得漂亮,小乖乖!", + "STAR_DESTROYER_Description": "打败月亮上的四个天塔。", + "STAR_DESTROYER_Name": "灭星者", + "STAR_POWER_Description": "使用坠落之星制作魔力水晶并使用它。", + "STAR_POWER_Name": "星之魔力", + "STICKY_SITUATION_Description": "在史莱姆雨中活下来,在此期间胶状生物会成群结队地从天而降。", + "STICKY_SITUATION_Name": "黏黏糊糊", + "STILL_HUNGRY_Description": "打败血肉墙,它是世界的主宰与核心,会在大型的燃烧献祭后出现。", + "STILL_HUNGRY_Name": "野心依旧", + "STING_OPERATION_Description": "打败蜂王,统治丛林蜂巢的女王。", + "STING_OPERATION_Name": "蜇刺行动", + "SUPREME_HELPER_MINION_Description": "共完成200个渔夫任务。", + "SUPREME_HELPER_MINION_Name": "终极得力仆从!", + "SWORD_OF_THE_HERO_Description": "获得一把汲取了日月精华的锋刃锻造而成的泰拉刃。", + "SWORD_OF_THE_HERO_Name": "英雄之剑", + "TEMPLE_RAIDER_Description": "攻破丛林神庙坚不可摧的墙。", + "TEMPLE_RAIDER_Name": "神庙入侵者", + "THERE_ARE_SOME_WHO_CALL_HIM_Description": "杀死蒂姆。", + "THERE_ARE_SOME_WHO_CALL_HIM_Name": "有人要杀他...", + "THE_CAVALRY_Description": "装备坐骑。", + "THE_CAVALRY_Name": "骑兵", + "THE_GREAT_SOUTHERN_PLANTKILL_Description": "打败世纪之花,蔓生在丛林深处的畸形怪花。", + "THE_GREAT_SOUTHERN_PLANTKILL_Name": "大南方植物终结者", + "THROWING_LINES_Description": "投掷悠悠球。", + "THROWING_LINES_Name": "扔绳子", + "TIL_DEATH_Description": "杀死僵尸新郎。", + "TIL_DEATH_Name": "至死不渝...", + "TIMBER_Description": "砍倒第一棵树。", + "TIMBER_Name": "木材!!", + "TIN_FOIL_HATTER_Description": "击败火星人入侵,不属于这个世界的外星人会让你乱了套,令你心神不宁。", + "TIN_FOIL_HATTER_Name": "锡箔帽商", + "TOPPED_OFF_Description": "在没有配饰或增益的情况下获得最大生命值和魔力值。", + "TOPPED_OFF_Name": "满满当当", + "TROUT_MONKEY_Description": "完成第25个渔夫任务。", + "TROUT_MONKEY_Name": "顽皮鳟鱼", + "VEHICULAR_MANSLAUGHTER_Description": "通过开矿车辗轧敌人来打败敌人。", + "VEHICULAR_MANSLAUGHTER_Name": "开车谋杀", + "WALK_THE_PLANK_Description": "击败海盗入侵,这群来自海上的劫匪不仅要抢你的战利品...还要你的命!", + "WALK_THE_PLANK_Name": "稳走跳板", + "WATCH_YOUR_STEP_Description": "掉进险恶的地下机关。", + "WATCH_YOUR_STEP_Name": "当心脚下!", + "WHERES_MY_HONEY_Description": "发现丛林深处的巨蜂蜂巢。", + "WHERES_MY_HONEY_Name": "我的蜂蜜在哪儿?", + "WINTERHEARTED_Description": "打败冰雪女王,在最寒冷夜晚里出现的邪恶女巫。", + "WINTERHEARTED_Name": "冷若冰霜", + "WORM_FODDER_Description": "打败世界吞噬怪,居住在腐化之地的巨虫。", + "WORM_FODDER_Name": "虫粮", + "YOU_AND_WHAT_ARMY_Description": "同时控制九个召唤仆从。", + "YOU_AND_WHAT_ARMY_Name": "你和哪路神仙啊?", + "YOU_CAN_DO_IT_Description": "让你的角色安然度过第一晚。", + "YOU_CAN_DO_IT_Name": "你能行!" + }, + "CLI": { + "AutomaticPortForward": "自动转发端口?(是/否): ", + "AvailableCommands": "可用命令:", + "BanMessage": "已从服务器封禁。", + "Ban_Command": "封禁", + "Ban_Description": "从服务器封禁玩家。", + "Ban_Example": "封禁", + "Ban_Usage": "用途:封禁", + "ChooseDifficulty": "选择难度: ", + "ChooseEvil": "选择世界恶魔: ", + "ChooseSize": "选择大小: ", + "ChooseWorld": "选择世界: ", + "Clear_Command": "清除", + "Clear_Description": "清除控制台窗口。", + "ClientWasBooted": "{0}已踢出:{1}", + "Corrupt": "腐化", + "Crimson": "猩红", + "Dawn_Command": "黎明", + "Dawn_Description": "将时间更改为黎明。", + "DeleteConfirmation": "确定要删除{0}?", + "DeleteWorld_Command": "删除", + "DeleteWorld_Description": "删除世界", + "DeleteWorld_Example": "删除", + "Dusk_Command": "黄昏", + "Dusk_Description": "将时间更改为黄昏。", + "EnterServerPassword": "服务器密码(按enter表示不设置): ", + "EnterWorldName": "输入世界名称: ", + "ExitNoSave_Command": "退出并不保存", + "ExitNoSave_Description": "关闭服务器但不保存。", + "Exit_Command": "退出", + "Exit_Description": "关闭服务器并保存。", + "FPS_Command": "fps", + "HelpHint": "键入“帮助”可查看命令列表。", + "Help_Command": "帮助", + "Help_Description": "显示命令列表。", + "InvalidCommand": "无效命令。", + "KickMessage": "已从服务器踢除。", + "Kick_Command": "剔除", + "Kick_Description": "将玩家踢出服务器。", + "Kick_Example": "踢除", + "Kick_Usage": "用途:踢除", + "ListeningOnPort": "侦听端口{0}", + "MaxPlayers_Command": "最大玩家数", + "MaxPlayers_Description": "显示最大玩家数量。", + "Midnight_Command": "午夜", + "Midnight_Description": "将时间更改为午夜。", + "MOTD": "每日消息:{0}", + "MOTD_Command": "每日消息", + "MOTD_Description": "显示每日消息。", + "NewWorld_Command": "新", + "NewWorld_Description": "新世界", + "No": "否", + "NoMOTD": "欢迎来到{0}!", + "Noon_Command": "正午", + "Noon_Description": "将时间更改为正午。", + "NoPassword": "未设置密码。", + "NoPlayers": "无玩家连接。", + "OnePlayerConnected": "1个玩家已连接。", + "Password": "密码:{0}", + "PasswordDisabled": "密码已禁用。", + "PasswordSet": "密码:{0}", + "Password_Command": "密码", + "Password_Description": "显示密码。", + "PlayerLimit": "玩家限制:{0}", + "PlayersConnected": "{0}个玩家已连接。", + "Playing_Command": "游戏中", + "Playing_Description": "显示玩家列表。", + "Port": "端口:{0}", + "Port_Command": "端口", + "Port_Description": "显示侦听端口。", + "Random": "随机", + "Save_Command": "保存", + "Save_Description": "保存游戏世界。", + "Say_Command": "说", + "Say_Description": "发送消息。", + "Say_Example": "说", + "Say_Usage": "用途:说", + "Server": "泰拉瑞亚服务器{0}", + "ServerMessage": " {0}", + "ServerStarted": "服务器已启动", + "SetInitialMaxPlayers": "最大玩家数(按enter表示8): ", + "SetInitialPort": "服务器端口(按enter表示7777): ", + "SetMOTD_Command": "每日消息", + "SetMOTD_Description": "更改每日消息。", + "SetMOTD_Example": "每日消息", + "SetPassword_Command": "密码", + "SetPassword_Description": "更改密码。", + "SetPassword_Example": "密码", + "Settle_Command": "放置", + "Settle_Description": "放置所有水域。", + "ShortNo": "否", + "ShortYes": "是", + "Time": "时间:{0}", + "Time_Command": "时间", + "Time_Description": "显示游戏时间。", + "Version_Command": "版本", + "Version_Description": "显示版本号。", + "WaterIsAlreadySettling": "水域已放置", + "Yes": "是", + "DisplaySeed": "世界种子:{0}", + "EnterSeed": "输入种子(随机留空):", + "NoValidSeed": "本世界在不支持种子的较旧版本中生成。", + "Seed_Command": "种子", + "Seed_Description": "显示世界种子。" + }, + "Controls": { + "RightClick": "右键点击" + }, + "Currency": { + "Copper": "铜", + "DefenderMedals": "护卫奖章", + "Gold": "金", + "Platinum": "铂金", + "Silver": "银" + }, + "Enemies": { + "MoonLord": "月亮领主", + "TheTwins": "双子魔眼" + }, + "Error": { + "BadHeaderBufferOverflow": "标头错误导致读取缓冲区溢出。", + "CaptureError": "保存捕获数据时出错。正在重试...", + "DataSentAfterConnectionLost": "尝试在断开连接后将数据发送至客户端", + "Error": "错误", + "ExceptionNormal": " 普通异常:{0}", + "LaunchFromSteam": "请从 Steam 客户端启动游戏。", + "LoadFailed": "加载失败!", + "LoadFailedNoBackup": "加载失败!找不到备份。", + "NetMessageError": "消息 {0} 出错", + "ServerCrash": "服务器崩溃:{0}\n{1}\n请将 crashlog.txt 发送至 support@terraria.org", + "TriedToRunServerTwice": "尝试在同一台计算机上运行两个服务器", + "UnableToCapture": "无法捕获。", + "UnableToLoadWorld": "无法加载世界:", + "UnableToWritePreferences": "无法在以下位置写入文件:{0}", + "InvalidLobbyFlag": "-大厅旗帜已使用,没有\"{0}\"或\"{1}\"。请忽略它。" + }, + "Game": { + "Actuators": "制动器", + "BallBounceResult": "触地前,触击{0}{1}次!", + "BedObstructed": "你的床被挡住了。", + "BlueWires": "蓝电线", + "DroppedCoins": "掉了{0}", + "EnemiesDefeatedAnnouncement": "已打败第{0}个{1}!", + "EnemiesDefeatedByAnnouncement": "{0}打败了第{1}个{2}!", + "FinalWave": "最后一波", + "FirstWave": "第一波", + "GreenWires": "绿电线", + "HasTeleportedTo": "{0}已传送至{1}", + "HouseChair": "椅子", + "HouseDoor": "门", + "HouseLightSource": "光源", + "HouseMissing_1": "这个房屋缺少{0}。", + "HouseMissing_2": "这个房屋缺少{0}和{1}。", + "HouseMissing_3": "这个房屋缺少{0}、{1}和{2}。", + "HouseMissing_4": "这个房屋缺少{0}、{1}、{2}和{3}。", + "HouseTable": "桌子", + "InvasionPoints": "{0}点", + "InvasionWave_Type1": "{0}:{1}", + "InvasionWave_Type2": "{0}:{1}和{2}", + "InvasionWave_Type3": "{0}:{1}、{2}和{3}", + "InvasionWave_Type4": "{0}:{1}、{2}、{3}和{4}", + "InvasionWave_Type5": "{0}:{1}、{2}、{3}、{4}和{5}", + "InvasionWave_Type6": "{0}:{1}、{2}、{3}、{4}、{5}和{6}", + "InvasionWave_Type7": "{0}:{1}、{2}、{3}、{4}、{5}、{6}和{7}", + "InvasionWave_Type8": "{0}:{1}、{2}、{3}、{4}、{5}、{6}、{7}和{8}", + "JoinGreeting": "当前玩家:{0}。", + "NPCTitle": "{1}{0}", + "PlayerDeathTime": "{0}在{1}前死了", + "PvPFlag": "(玩家对决)", + "RedWires": "红电线", + "SpawnPointRemoved": "生成位置已移除!", + "SpawnPointSet": "生成位置已设置!", + "TeleportTo": "传送至{0}", + "Time": "时间:{0}", + "Wave": "波数:{0}", + "WaveCleared": "已清理{0}波", + "WaveMessage": "第{0}波:{1}", + "YellowWires": "黄电线", + "BirthdayParty_1": "好像{0}正在开派对", + "BirthdayParty_2": "好像{0}和{1}正在开派对", + "BirthdayParty_3": "好像{0}、{1}和{2}正在开派对", + "RespawnInPrefix": "", + "RespawnInSuffix": "{0}" + }, + "GameUI": { + "ActuationDeviceOff": "制动设备关", + "ActuationDeviceOn": "制动设备开", + "BaitPower": "{0}%鱼饵力", + "BaitRequired": "需要鱼饵才能抓鱼", + "Bright": "明亮", + "Buy": "购买", + "BuyWithValue": "购买({0})", + "Cancel": "取消", + "Change": "更改", + "Clear": "清除", + "Cloudy": "多云", + "CompassCenter": "中心", + "CompassEast": "{0}以东", + "CompassWest": "{0}以西", + "CraftingWindow": "制作窗口", + "Depth": "{0}的", + "DepthLevel": "级别", + "Disabled": "已禁用", + "DPS": "每秒{0}伤害", + "EastWind": " ({0} mph东风)", + "Enabled": "已启用", + "EnemiesNearby": "附近有{0}个敌人!", + "Expert": "专家", + "Faded": "褪色", + "FirstQuarter": "上弦月", + "FishingPower": "{0}点渔力", + "FishingWarning": "警告!", + "FullFishingPower": "{0}({1}%)点渔力", + "FullMoon": "满月", + "HairStyle": "发型", + "HeatDistortion": "热变形:{0}", + "HeavyRain": "暴雨", + "Hidden": "隐藏", + "LayerCaverns": "洞穴", + "LayerSpace": "太空", + "LayerSurface": "地表", + "LayerUnderground": "地下", + "LayerUnderworld": "地狱", + "LightRain": "小雨", + "MechanicalRulerOff": "机械标尺关", + "MechanicalRulerOn": "机械标尺开", + "MostlyCloudy": "大部多云", + "NewMoon": "新月", + "NoDPS": "无", + "NoEnemiesNearby": "附近没有敌人", + "NoKillCount": "杀敌数不可用", + "NoRareCreatures": "附近没有稀有生物", + "Normal": "普通", + "NotEnoughWater": "水量不够!", + "NoTreasureNearby": "附近没有宝藏", + "OneEnemyNearby": "附近有1个敌人!", + "OreDetected": "在附近发现{0}!", + "Overcast": "阴天", + "PaintSprayerOff": "喷漆器关", + "PaintSprayerOn": "喷漆器开", + "PartlyCloudy": "局部多云", + "PlayerDistance": "({0}英尺)", + "PrecentFishingPower": "{0}%渔力", + "QuickStackToNearby": "快速堆叠至附近的宝箱上", + "Rain": "雨", + "RulerOff": "标尺关", + "RulerOn": "标尺开", + "SettingsMenu": "设置菜单", + "SortInventory": "将物品栏分类", + "Speed": "{0} mph", + "StormEffects": "暴风雨影响:{0}", + "ThirdQuarter": "下弦月", + "WaningCrescent": "残月", + "WaningGibbous": "亏凸月", + "WaxingCrescent": "娥眉月", + "WaxingGibbous": "盈凸月", + "WestWind": " ({0} mph西风)", + "WireModeForced": "机械显示:始终显示", + "WireModeNormal": "机械显示:正常", + "Gameplay": "游戏设置", + "GameZoom": "缩放:{0}% ({1}%)", + "LightingUpdateEveryFrameOff": "快速照明关闭", + "LightingUpdateEveryFrameOn": "Rapid Lighting On", + "Misc": "其他", + "QualityHigh": "高", + "QualityLow": "低", + "QualityMedium": "中", + "QualityOff": "关", + "UIScale": "UI比例:{0}% ({1}%)", + "WaveQuality": "水波质量:{0}", + "ZoomCategory": "缩放", + "OpenFileFolder": "{$LegacyInterface.110}" + }, + "Misc": { + "ForceWaterSettling": "迫使流水停止。", + "ResolutionChanged": "分辨率更改为:{0}x{1}。", + "ShortDays": "天", + "ShortHours": "时", + "ShortMinutes": "分", + "ShortSeconds": "秒", + "WaterSettled": "流水已停止。" + }, + "Net": { + "CheatingInvalid": "检测到尝试作弊的操作:无效踢除", + "CheatingLiquidSpam": "检测到尝试作弊的操作:液体刷屏", + "CheatingProjectileSpam": "检测到尝试作弊的操作:射弹刷屏", + "CheatingTileRemovalSpam": "检测到尝试作弊的操作:移除图格刷屏", + "CheatingTileSpam": "检测到尝试作弊的操作:添加图格刷屏", + "ClientConnecting": "{0}正在连接...", + "ClientPlaying": "({0}) {1}正在玩游戏", + "ClientRequestedWorldInfo": "({0}) {1}请求了世界信息", + "ClientsConnected": "{0}个客户端已连接", + "ClientSendingData": "({0}) {1}正在发送玩家数据...", + "ClientStatusComplete": "({0}) {1} {2}:完成!", + "ConnectingTo": "连接到{0}", + "EmptyName": "空名称。", + "FoundServer": "发现服务器", + "IsReceivingTileData": "正在接收图格数据", + "LostConnection": "连接已丢失", + "NameTooLong": "名称太长。", + "RequestingTileData": "正在请求图格数据", + "RequestingWorldInformation": "正在请求世界信息", + "SendingPlayerData": "正在发送玩家数据...", + "ServerAutoShutdown": "本地玩家已离开。自动关闭开始。", + "StatusComplete": "{0}:完成!", + "WaitingForClients": "正在等待客户端..." + }, + "Social": { + "Joining": "正在加入...", + "JoiningFriend": "正在加入{0}...", + "StatusInGame": "在线玩游戏。", + "StatusJoining": "加入游戏。" + }, + "UI": { + "Achievements": "成就", + "Back": "返回", + "Cancel": "取消", + "Delete": "删除", + "Effects": "效果", + "EnterButton": "输入", + "EnterMessage": "输入消息:", + "EnterNewName": "输入新名称:", + "Expert": "专家", + "ExpertDescription": "(更大的难度和战利品)", + "ExpertDescriptionFlavor": "为财富和荣誉为战,孩子。", + "Favorite": "收藏", + "Hardcore": "硬核", + "Keybindings": "快捷键绑定", + "Mediumcore": "中核", + "More": "更多", + "MoveOffCloud": "移出云", + "MoveToCloud": "移入云", + "New": "新建", + "Normal": "普通", + "NormalDescription": "(标准泰拉瑞亚体验)", + "NormalDescriptionFlavor": "你的旅程即将开始...", + "Play": "开始游戏", + "RestoreButton": "恢复", + "Save": "保存", + "SelectPlayer": "选择玩家", + "SelectWorld": "选择世界", + "Softcore": "软核", + "SpaceButton": "太空", + "Submit": "提交", + "Unfavorite": "取消收藏", + "WorldCreatedFormat": "已创建:{0}", + "WorldSizeFormat": "{0}世界", + "WorldSizeLarge": "大", + "WorldSizeMedium": "中", + "WorldSizeSmall": "小", + "WorldSizeUnknown": "未知", + "BartenderHelp": "埃特尼亚水晶", + "CopySeed": "复制种子:{0}", + "EnterSeed": "输入种子(随机留空)", + "LoadingCode": "正在加载:", + "SeedCopied": "种子已复制", + "ZoomIn": "{$LegacyMenu.168}", + "ZoomOut": "{$LegacyMenu.169}", + "Ellipsis": "...", + "LightMode_Color": "{$LegacyMenu.55}", + "LightMode_White": "{$LegacyMenu.56}", + "LightMode_Retro": "{$LegacyMenu.57}", + "LightMode_Trippy": "{$LegacyMenu.58}", + "PlayerEmptyName": "{$Net.EmptyName}" + }, + "DeathSource": { + "NPC": "{0},凶手是{1}。", + "Player": "{0},凶手是{1}的{2}。", + "Projectile": "{0},凶手是{1}。" + }, + "DeathText": { + "Burned": "{0}无法把火扑灭。", + "Default": "{0}。", + "Drowned_1": "{0}忘了呼吸。", + "Drowned_2": "{0}与鱼同眠。", + "Drowned_3": "{0}溺死了。", + "Drowned_4": "{0}成了鲨鱼的食物。", + "Electrocuted": "{0}无法控制瓦数。", + "Fell_1": "{0}摔死了。", + "Fell_2": "{0}没有反弹。", + "Lava_1": "{0}被熔化了。", + "Lava_2": "{0}被烧成了灰。", + "Lava_3": "{0}试图在熔岩中游泳。", + "Lava_4": "{0}喜欢在岩浆中玩耍。", + "Petrified_1": "{0}碎成渣了。", + "Petrified_2": "{0}再也不能复原了。", + "Petrified_3": "{0}需要被清走了。", + "Petrified_4": "{0}变成了另一个土堆。", + "Poisoned": "{0}无法找到解药。", + "Slain": "{0}被杀死了...", + "Stabbed": "{0}被刺伤了。", + "Suffocated": "{0}无法呼吸。", + "Teleport_1": "{0}未能成形", + "Teleport_2_Female": "{0}的腿长到她的脑袋那儿了。", + "Teleport_2_Male": "{0}的腿长到他的脑袋那儿了。", + "TriedToEscape": "{0}试图逃跑。", + "WasLicked": "{0}被舔了。" + }, + "DeathTextGeneric": { + "ArmTornOff": "{0}的胳膊断了", + "Chopped": "{0}被千刀万剐了", + "Cut": "{0}的腰被斩断了", + "Decapitated": "{0}被斩首了", + "Destroyed": "{0}被毁了", + "Dissected": "{0}被野蛮地解剖了", + "EntrailsRippedOut": "{0}的内脏被扯掉了", + "Eviscerated": "{0}被取出内脏", + "ExtremitiesDetached": "{0}被截肢了", + "FaceTornOff": "{0}的脸被撕烂了", + "Flailing": "{0}的鞭刑终于停止了", + "HeadRemoved": "{0}的脑袋搬家了", + "Impaled": "{0}被刺穿了", + "InnardsBecameOutards": "{0}看着自己的内脏变成了“外脏”", + "Mangled": "{0}的身体血肉模糊了", + "Massacred": "{0}被屠杀了", + "Murdered": "{0}被谋杀了", + "PileOfFlesh": "{0}变成了一滩肉", + "Plead": "{0}求死的愿望实现了", + "Removed": "{0}被踢出了{1}", + "Ripped": "{0}被削肉去骨了", + "Ruptured": "{0}的重要器官毁了", + "SkullCrushed": "{0}的头骨被压碎了", + "Slain": "{0}被杀死了", + "Snapped": "{0}被折成两半了", + "TornInHalf": "{0}被撕成两半了" + }, + "DungeonDefenders2": { + "BartenderWarning": "埃特尼亚水晶排斥此区域并立即弹开,酒馆老板提到应将其放置在宽敞平坦的开阔区域...", + "CantSummonTower": "It doesn't seem to work without an Etheria Crystal nearby...", + "InvasionProgressTitle": "撒旦军队", + "InvasionStart": "撒旦军队正在逼近!", + "InvasionWin": "撒旦军队已被打败!", + "WaveComplete": "进攻波完成!" + }, + "Key": { + "DOWN": "DOWN", + "UP": "UP" + }, + "Language": { + "English": "English (英语)", + "German": "Deutsch (德语)", + "Italian": "Italiano (意大利语)", + "French": "Français (法语)", + "Spanish": "Español (西班牙语)", + "Russian": "Русский (俄语)", + "Chinese": "简体中文", + "Portuguese": "Português brasileiro (巴西葡萄牙语)", + "Polish": "Polski (波兰语)" + }, + "RandomWorldName_Composition": { + "6": "{Adjective} {Location}" + } +} \ No newline at end of file diff --git a/Localization/Content/zh-Hans/Game.json b/Localization/Content/zh-Hans/Game.json new file mode 100644 index 0000000..e0d468a --- /dev/null +++ b/Localization/Content/zh-Hans/Game.json @@ -0,0 +1,791 @@ +{ + "Announcement": { + "HasBeenDefeated_Plural": "{0}已被打败!", + "HasBeenDefeated_Single": "{0}已被打败!", + "HasAwoken": "{0}已苏醒!", + "HasArrived": "{0}已到达!" + }, + "ArmorSetBonus": { + "MetalTier1": "2点防御力", + "MetalTier2": "3点防御力", + "CobaltRanged": "20%的几率不消耗弹药", + "MythrilCaster": "魔力消耗减少17%", + "MythrilMelee": "近战暴击率增加5%", + "MythrilRanged": "20%的几率不消耗弹药", + "AdamantiteCaster": "魔力消耗减少19%", + "AdamantiteMelee": "近战和移动速度各提高18%", + "AdamantiteRanged": "25%的几率不消耗弹药", + "ShadowScale": "移动速度提高15%", + "Wood": "1点防御力", + "Crimson": "大大提高生命再生速度", + "Frost": "近战及远程攻击会造成冻伤", + "Tiki": "提高仆从数量上限", + "Palladium": "攻击敌人后大大提高生命再生速度", + "Orichalcum": "花瓣将落到目标身上以造成额外伤害", + "Titanium": "攻击敌人后进入免疫状态", + "Chlorophyte": "召唤强大的水晶叶瓣来射击附近的敌人", + "Wizard": "魔法暴击率增加10%", + "Turtle": "攻击者也会承受全部伤害", + "Meteor": "太空枪不消耗魔力", + "SpectreHealing": "对敌人造成的魔法伤害将使玩家获得最低生命值", + "Shroomite": "不移动则会隐身,\n增加远程能力和降低敌人瞄准你的几率", + "Platinum": "4点防御力", + "Pumpkin": "伤害增加10%", + "Spooky": "仆从伤害增加25%", + "SpectreDamage": "所造成的魔法伤害还能伤及附近的敌人", + "MagicHat": "最大魔力值增加60", + "BeetleDefense": "甲虫保护你不受伤害", + "BeetleDamage": "甲虫增加你的近战伤害和速度", + "Bee": "仆从伤害增加10%", + "Bone": "20%的几率不消耗弹药", + "Spider": "仆从伤害增加12%", + "Ninja": "33%的几率不消耗投掷类物品", + "Fossil": "50%的几率不消耗投掷类物品", + "Solar": "日耀护盾可以长时间保护你,\n使用护盾力猛冲,进而伤害敌人", + "Vortex": "双击{0}切换隐身,\n增加远程能力和降低敌人瞄准你的几率,但会减慢移动速度", + "Nebula": "伤害敌人就有机会生成增益强化道具,\n拾取强化道具可获得堆叠增益", + "Stardust": "双击{0}可将你的守卫引领到某位置", + "Forbidden": "双击{0}可将远古风暴召唤到光标位置", + "Jungle": "魔力消耗减少16%", + "Molten": "17%额外近战伤害", + "Mining": "挖矿速度增加30%", + "CobaltCaster": "魔力消耗减少14%", + "CobaltMelee": "近战速度提高15%", + "ApprenticeTier2": "提高哨兵数量上限\n爆炸烈焰视野和射程显著增加", + "ApprenticeTier3": "提高哨兵数量上限\n大幅提升爆炸烈焰效力", + "HuntressTier2": "提高哨兵数量上限\n爆炸机关重新装载得更快并为敌人涂油\n点燃涂油的敌人以造成额外伤害", + "HuntressTier3": "提高哨兵数量上限\n大幅提升爆炸机关效力", + "MonkTier2": "提高哨兵数量上限\n闪电光环现在可以更快地实施暴击", + "MonkTier3": "提高哨兵数量上限\n大幅提升闪电光环效力", + "SquireTier2": "提高哨兵数量上限\n弩车可以刺穿更多目标,但会在你承受伤害时陷入恐慌", + "SquireTier3": "提高哨兵数量上限\n大幅提升弩车效力" + }, + "BuffDescription": { + "AmmoBox": "20%的几率不消耗弹药", + "AmmoReservation": "20%的几率不消耗弹药", + "Archery": "箭的伤害和速度各增加20%", + "BabyDinosaur": "恐龙宝宝将跟着你", + "BabyEater": "噬魂怪宝宝将跟着你", + "BabyFaceMonster": "脸怪宝宝将跟着你", + "BabyGrinch": "格林奇宝宝将跟着你", + "BabyHornet": "它认为你是它的妈妈", + "BabyPenguin": "我想它想要你的鱼", + "BabySkeletronHead": "别问了...", + "BabySlime": "史莱姆宝宝将为你而战", + "BabySnowman": "雪人宝宝将跟着你", + "BabyTruffle": "这简直太可爱了!", + "BallistaPanic": "你的弩车在惊慌之下快速射击!", + "BasiliskMount": "撞向任何人...每个人!", + "Battle": "敌人生成速度提高", + "BeeMount": "嗡嗡嗡嗡", + "BeetleEndurance1": "所受伤害减少15%", + "BeetleEndurance2": "所受伤害减少30%", + "BeetleEndurance3": "所受伤害减少45%", + "BeetleMight1": "近战伤害和速度各增加10%", + "BeetleMight2": "近战伤害和速度各增加20%", + "BeetleMight3": "近战伤害和速度各增加30%", + "BetsysCurse": "防御力降低", + "Bewitched": "仆从数量上限提高", + "BlackCat": "黑猫将跟着你", + "Blackout": "光视能力严重下降", + "Bleeding": "无法再生生命", + "BoneJavelin": "血流不止", + "BrokenArmor": "防御力减半", + "Builder": "放置速度和范围增加", + "BunnyMount": "你渴望胡萝卜", + "Burning": "正在损失生命值且移动已放缓", + "Calm": "敌人攻击力降低", + "Campfire": "生命再生速度略有提高", + "ChaosState": "使用混沌传送杖将消耗生命值", + "Chilled": "你的移动速度已降低", + "Clairvoyance": "魔能增加", + "CompanionCube": "永远不会威胁刺伤你,而且事实上也无法讲话", + "Confused": "移动方向逆转", + "Crate": "钓上宝匣的几率更大", + "CrimsonHeart": "可提供照明的魔法心", + "Cursed": "无法使用任何物品", + "CursedInferno": "正在损失生命值", + "CursedSapling": "诅咒树苗将跟着你", + "CuteFishronMount": "不要让它爬行。", + "Dangersense": "你可以看到附近的危险", + "Darkness": "光视能力下降", + "Daybreak": "Incenerated by solar rays", + "Dazed": "移动大大放缓", + "DeadlySphere": "致命球将为你而战", + "DrillMount": "骑乘飞钻头", + "DryadsWard": "自然的力量保护你", + "DryadsWardDebuff": "自然的力量强迫你", + "Electrified": "你无法移动", + "Endurance": "伤害减少10%", + "EyeballSpring": "弹簧眼将跟着你", + "FairyBlue": "仙灵将跟着你", + "FairyGreen": "仙灵将跟着你", + "FairyRed": "仙灵将跟着你", + "Featherfall": "按UP或DOWN来控制下降速度", + "Fishing": "钓鱼水平提高", + "Flipper": "在水中正常移动", + "Frostburn": "要么特别热,要么特别冷。无论哪种方式都带来极大伤害", + "Frozen": "你不能动!", + "Gills": "可在水中而非空气中呼吸", + "Gravitation": "按UP可逆转重力", + "HeartLamp": "生命再生速度提高", + "Heartreach": "心拾取范围扩大", + "Honey": "生命再生速度提高", + "HornetMinion": "黄蜂将为你而战", + "Horrified": "你已经看到一些令人讨厌的东西,而且无路可逃。", + "Hunter": "显示敌人位置", + "IceBarrier": "所受伤害减少25%", + "Ichor": "防御力减少", + "ImpMinion": "小鬼将为你而战", + "Inferno": "附近的敌人被点燃", + "Invisibility": "可隐身", + "Ironskin": "防御力增加8点", + "LeafCrystal": "朝附近的敌人射出水晶叶", + "Lifeforce": "最大生命值增加20%", + "Lovestruck": "你已坠入爱河!", + "MagicLantern": "附魔灯笼将为你照亮前路", + "MagicPower": "魔法伤害增加20%", + "ManaRegeneration": "魔力再生增加", + "ManaSickness": "魔法伤害减少", + "Merfolk": "可在水下呼吸和轻松移动", + "Midas": "死亡时掉落更多钱", + "MinecartLeft": "驾驶矿车", + "MinecartLeftMech": "驾驶矿车", + "MinecartLeftWood": "驾驶矿车", + "MinecartRight": "驾驶矿车", + "MinecartRightMech": "驾驶矿车", + "MinecartRightWood": "驾驶矿车", + "MiniMinotaur": "你如何打败迷你牛头怪?", + "Mining": "挖矿速度增加25%", + "MonsterBanner": "伤害和防御力因下列原因增加:", + "MoonLeech": "你无法吸收治疗效果", + "NebulaUpDmg1": "伤害增加15%", + "NebulaUpDmg2": "伤害增加30%", + "NebulaUpDmg3": "伤害增加45%", + "NebulaUpLife1": "生命再生速度提高", + "NebulaUpLife2": "生命再生速度提高", + "NebulaUpLife3": "生命再生速度提高", + "NebulaUpMana1": "魔力再生增加", + "NebulaUpMana2": "魔力再生增加", + "NebulaUpMana3": "魔力再生增加", + "NightOwl": "夜视力提升", + "NoBuilding": "你已失去创造能力!", + "ObsidianSkin": "对熔岩免疫", + "Obstructed": "你看不到!", + "OgreSpit": "移动速度显著降低", + "Oiled": "因着火受到更多伤害", + "OnFire": "缓慢损失生命值", + "PaladinsShield": "所受伤害的25%将被重新定向到其他玩家", + "Panic": "移动速度提高", + "ParryDamageBuff": "下次近战暴击伤害增加500%", + "PeaceCandle": "怪物生成速度降低", + "PetBunny": "我想它想要你的胡萝卜", + "PetDD2Dragon": "Hoardagron将跟着你", + "PetDD2Gato": "飞翔Gato将跟着你", + "PetDD2Ghost": "闪烁灯芯将跟着你", + "PetLizard": "像爬行动物一样冷漠", + "PetParrot": "波利想要饼干", + "PetSapling": "小树苗将跟着你", + "PetSpider": "蜘蛛将跟着你", + "PetTurtle": "欢乐乌龟时光!", + "PigronMount": "你现在看到我了....", + "PirateMinion": "海盗将为你而战", + "Poisoned": "缓慢损失生命值", + "PotionSickness": "不能再消耗治疗物品", + "Puppy": "小狗将跟着你", + "Pygmies": "矮人将为你而战", + "Rabies": "伤害增加,生命再生速度降低,对状态造成影响", + "Rage": "暴击率增加10%", + "RapidHealing": "生命再生速度大幅提高", + "Ravens": "乌鸦将攻击你的敌人", + "Regeneration": "提供生命再生", + "Rudolph": "骑乘红鼻子驯鹿", + "ScutlixMount": "劈劈啪啪", + "ShadowDodge": "你将躲避下一次攻击", + "ShadowFlame": "正在损失生命值", + "ShadowOrb": "可提供照明的魔法球", + "SharknadoMinion": "鲨鱼旋风将为你而战", + "Sharpened": "近战武器具有盔甲穿透力", + "Shine": "发光", + "Silenced": "无法使用需要魔力的物品", + "Slimed": "你粘糊糊的", + "SlimeMount": "啵嘤!", + "Slow": "移动速度降低", + "SolarShield1": "所受伤害减少30%,受伤时驱除敌人", + "SolarShield2": "所受伤害减少30%,受伤时驱除敌人", + "SolarShield3": "所受伤害减少30%,受伤时驱除敌人", + "Sonar": "你能看到是什么在咬你的鱼钩", + "SoulDrain": "生命再生速度提高", + "Spelunker": "显示宝藏和矿石的位置", + "SpiderMinion": "蜘蛛将为你而战", + "Squashling": "南瓜娃娃将跟着你", + "StardustDragonMinion": "星尘之龙将保护你", + "StardustGuardianMinion": "星尘守卫将保护你", + "StardustMinion": "星尘细胞将为你而战", + "StardustMinionBleed": "being eaten by cells", + "StarInBottle": "魔力再生增加", + "Stinky": "你的味道真难闻", + "Stoned": "你已完全石化!", + "Suffocation": "正在损失生命值", + "Summoning": "仆从数量上限提高", + "Sunflower": "移动速度提高,怪物生成减少", + "SuspiciousTentacle": "可提供照明的可疑眼球", + "Swiftness": "移动速度提高25%", + "TheTongue": "你被吸入嘴中", + "Thorns": "攻击者也会受伤", + "TikiSpirit": "友好幽魂将跟着你", + "Tipsy": "近战能力提高,防御力降低", + "Titan": "击退力提高", + "TurtleMount": "陆地上速度缓慢,海上则可急速疾行", + "TwinEyesMinion": "双子魔眼将为你而战", + "UFOMinion": "UFO将为你而战", + "UFOMount": "你拥有MAC真是太好了", + "UnicornMount": "向前冲...太棒了!", + "Venom": "正在损失生命值", + "VortexDebuff": "你周围的重力是扭曲的", + "Warmth": "冷系伤害减少", + "WaterCandle": "怪物生成速度提高", + "WaterWalking": "按DOWN进入水中", + "Weak": "物理能力下降", + "WeaponImbueConfetti": "近战攻击会喷撒彩纸", + "WeaponImbueCursedFlames": "近战攻击会对敌人施放诅咒焰", + "WeaponImbueFire": "近战攻击会点燃敌人", + "WeaponImbueGold": "近战攻击会使敌人掉落更多金子", + "WeaponImbueIchor": "近战攻击会降低敌人防御力", + "WeaponImbueNanites": "近战攻击会迷惑敌人", + "WeaponImbuePoison": "近战攻击会使敌人中毒", + "WeaponImbueVenom": "近战攻击会对你的目标施放毒液", + "Webbed": "你被卡住了", + "WellFed": "所有属性小幅提升", + "Werewolf": "物理能力提高", + "Wet": "你在滴水", + "WindPushed": "风带着你四处移动!", + "Wisp": "妖灵将跟着你", + "WitheredArmor": "你的盔甲降级了!", + "WitheredWeapon": "你的攻击变弱了!", + "Wrath": "伤害增加10%", + "ZephyrFish": "它喜欢在你周围游泳", + "DesertMinecartRight": "{$BuffDescription.MinecartRight}", + "DesertMinecartLeft": "{$BuffDescription.MinecartLeft}", + "FishMinecartRight": "{$BuffDescription.MinecartRight}", + "FishMinecartLeft": "{$BuffDescription.MinecartLeft}", + "BeeMinecartRight": "{$BuffDescription.MinecartRight}", + "BeeMinecartLeft": "{$BuffDescription.MinecartLeft}", + "LadybugMinecartRight": "{$BuffDescription.MinecartRight}", + "LadybugMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PigronMinecartRight": "{$BuffDescription.MinecartRight}", + "PigronMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SunflowerMinecartRight": "{$BuffDescription.MinecartRight}", + "SunflowerMinecartLeft": "{$BuffDescription.MinecartLeft}", + "HellMinecartRight": "{$BuffDescription.MinecartRight}", + "HellMinecartLeft": "{$BuffDescription.MinecartLeft}", + "ShroomMinecartRight": "{$BuffDescription.MinecartRight}", + "ShroomMinecartLeft": "{$BuffDescription.MinecartLeft}", + "AmethystMinecartRight": "{$BuffDescription.MinecartRight}", + "AmethystMinecartLeft": "{$BuffDescription.MinecartLeft}", + "TopazMinecartRight": "{$BuffDescription.MinecartRight}", + "TopazMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SapphireMinecartRight": "{$BuffDescription.MinecartRight}", + "SapphireMinecartLeft": "{$BuffDescription.MinecartLeft}", + "EmeraldMinecartRight": "{$BuffDescription.MinecartRight}", + "EmeraldMinecartLeft": "{$BuffDescription.MinecartLeft}", + "RubyMinecartRight": "{$BuffDescription.MinecartRight}", + "RubyMinecartLeft": "{$BuffDescription.MinecartLeft}", + "DiamondMinecartRight": "{$BuffDescription.MinecartRight}", + "DiamondMinecartLeft": "{$BuffDescription.MinecartLeft}", + "AmberMinecartRight": "{$BuffDescription.MinecartRight}", + "AmberMinecartLeft": "{$BuffDescription.MinecartLeft}", + "BeetleMinecartRight": "{$BuffDescription.MinecartRight}", + "BeetleMinecartLeft": "{$BuffDescription.MinecartLeft}", + "MeowmereMinecartRight": "{$BuffDescription.MinecartRight}", + "MeowmereMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PartyMinecartRight": "{$BuffDescription.MinecartRight}", + "PartyMinecartLeft": "{$BuffDescription.MinecartLeft}", + "PirateMinecartRight": "{$BuffDescription.MinecartRight}", + "PirateMinecartLeft": "{$BuffDescription.MinecartLeft}", + "SteampunkMinecartRight": "{$BuffDescription.MinecartRight}", + "SteampunkMinecartLeft": "{$BuffDescription.MinecartLeft}", + "CoffinMinecartRight": "{$BuffDescription.MinecartRight}", + "CoffinMinecartLeft": "{$BuffDescription.MinecartLeft}" + }, + "BuffName": { + "AmmoBox": "弹药箱", + "AmmoReservation": "弹药储备", + "Archery": "箭术", + "BabyDinosaur": "恐龙宝宝", + "BabyEater": "吞噬怪宝宝", + "BabyFaceMonster": "脸怪宝宝", + "BabyGrinch": "格林奇宝宝", + "BabyHornet": "黄蜂宝宝", + "BabyPenguin": "企鹅宝宝", + "BabySkeletronHead": "骷髅王宝宝头", + "BabySlime": "史莱姆宝宝", + "BabySnowman": "雪人宝宝", + "BabyTruffle": "松露人宝宝", + "BallistaPanic": "弩车恐慌!", + "BasiliskMount": "蛇蜥怪坐骑", + "Battle": "战斗", + "BeeMount": "蜜蜂坐骑", + "BeetleEndurance1": "甲虫耐力", + "BeetleEndurance2": "甲虫耐力", + "BeetleEndurance3": "甲虫耐力", + "BeetleMight1": "甲虫力量", + "BeetleMight2": "甲虫力量", + "BeetleMight3": "甲虫力量", + "BetsysCurse": "双足翼龙诅咒", + "Bewitched": "着魔", + "BlackCat": "黑猫", + "Blackout": "灯火管制", + "Bleeding": "流血", + "BoneJavelin": "穿透", + "BrokenArmor": "破损盔甲", + "Builder": "建筑工", + "BunnyMount": "兔兔坐骑", + "Burning": "燃烧", + "Calm": "冷静", + "Campfire": "温馨之火", + "ChaosState": "混乱状态", + "Chilled": "冷冻", + "Clairvoyance": "千里眼", + "CompanionCube": "同伴方块", + "Confused": "困惑", + "Crate": "宝匣", + "CrimsonHeart": "猩红之心", + "Cursed": "被诅咒", + "CursedInferno": "诅咒地狱", + "CursedSapling": "诅咒树苗", + "CuteFishronMount": "可爱猪龙鱼坐骑", + "Dangersense": "危险感", + "Darkness": "黑暗", + "Daybreak": "破晓", + "Dazed": "眩晕", + "DeadlySphere": "致命球", + "DrillMount": "钻头坐骑", + "DryadsWard": "树妖祝福", + "DryadsWardDebuff": "树妖祸害", + "Electrified": "带电", + "Endurance": "耐力", + "EyeballSpring": "弹簧眼", + "FairyBlue": "仙灵", + "FairyGreen": "仙灵", + "FairyRed": "仙灵", + "Featherfall": "羽落", + "Fishing": "钓鱼", + "Flipper": "脚蹼", + "Frostburn": "霜冻", + "Frozen": "冰冻", + "Gills": "鱼鳃", + "Gravitation": "重力", + "HeartLamp": "心灯", + "Heartreach": "拾心", + "Honey": "蜂蜜", + "HornetMinion": "黄蜂", + "Horrified": "惊恐", + "Hunter": "猎人", + "IceBarrier": "冰障", + "Ichor": "灵液", + "ImpMinion": "小鬼", + "Inferno": "狱火", + "Invisibility": "隐身", + "Ironskin": "铁皮", + "LeafCrystal": "叶状水晶", + "Lifeforce": "生命力", + "Lovestruck": "热恋", + "MagicLantern": "魔法灯笼", + "MagicPower": "魔能", + "ManaRegeneration": "魔力再生", + "ManaSickness": "魔力疾病", + "Merfolk": "人鱼", + "Midas": "迈达斯", + "MinecartLeft": "矿车", + "MinecartLeftMech": "矿车", + "MinecartLeftWood": "矿车", + "MinecartRight": "矿车", + "MinecartRightMech": "矿车", + "MinecartRightWood": "矿车", + "MiniMinotaur": "迷你牛头怪", + "Mining": "采矿", + "MonsterBanner": "旗帜", + "MoonLeech": "月噬", + "NebulaUpDmg1": "伤害星云", + "NebulaUpDmg2": "伤害星云", + "NebulaUpDmg3": "伤害星云", + "NebulaUpLife1": "生命星云", + "NebulaUpLife2": "生命星云", + "NebulaUpLife3": "生命星云", + "NebulaUpMana1": "魔力星云", + "NebulaUpMana2": "魔力星云", + "NebulaUpMana3": "魔力星云", + "NightOwl": "夜猫子", + "NoBuilding": "创意震撼", + "ObsidianSkin": "黑曜石皮", + "Obstructed": "阻塞", + "OgreSpit": "渗出", + "Oiled": "涂油", + "OnFire": "着火了!", + "PaladinsShield": "圣骑士护盾", + "Panic": "恐慌!", + "ParryDamageBuff": "惊人一刻", + "PeaceCandle": "和平蜡烛", + "PetBunny": "宠物兔", + "PetDD2Dragon": "Hoardagron", + "PetDD2Gato": "飞翔Gato", + "PetDD2Ghost": "闪烁灯芯", + "PetLizard": "宠物蜥蜴", + "PetParrot": "宠物鹦鹉", + "PetSapling": "宠物树苗", + "PetSpider": "宠物蜘蛛", + "PetTurtle": "宠物海龟", + "PigronMount": "猪龙坐骑", + "PirateMinion": "海盗", + "Poisoned": "中毒", + "PotionSickness": "药水疾病", + "Puppy": "小狗", + "Pygmies": "矮人", + "Rabies": "野性咬噬", + "Rage": "暴怒", + "RapidHealing": "快速治疗", + "Ravens": "乌鸦", + "Regeneration": "再生", + "Rudolph": "鲁道夫", + "ScutlixMount": "鳞甲怪坐骑", + "ShadowDodge": "暗影躲避", + "ShadowFlame": "暗影焰", + "ShadowOrb": "暗影珠", + "SharknadoMinion": "鲨鱼旋风", + "Sharpened": "锋利", + "Shine": "光芒", + "Silenced": "寂静", + "Slimed": "史莱姆", + "SlimeMount": "史莱姆坐骑", + "Slow": "缓慢", + "SolarShield1": "太阳烈焰", + "SolarShield2": "太阳烈焰", + "SolarShield3": "太阳烈焰", + "Sonar": "声纳", + "SoulDrain": "夺命杖", + "Spelunker": "洞穴探险", + "SpiderMinion": "蜘蛛", + "Squashling": "南瓜娃娃", + "StardustDragonMinion": "星尘之龙", + "StardustGuardianMinion": "星尘守卫", + "StardustMinion": "星尘细胞", + "StardustMinionBleed": "Celled", + "StarInBottle": "星星瓶", + "Stinky": "恶臭", + "Stoned": "恍惚", + "Suffocation": "窒息", + "Summoning": "召唤", + "Sunflower": "快乐!", + "SuspiciousTentacle": "可疑眼球", + "Swiftness": "敏捷", + "TheTongue": "狂卷之舌", + "Thorns": "荆棘", + "TikiSpirit": "提基幽魂", + "Tipsy": "踉跄", + "Titan": "泰坦", + "TurtleMount": "海龟坐骑", + "TwinEyesMinion": "双子魔眼", + "UFOMinion": "UFO", + "UFOMount": "UFO坐骑", + "UnicornMount": "独角兽坐骑", + "Venom": "毒液", + "VortexDebuff": "扭曲", + "Warmth": "温暖", + "WaterCandle": "水蜡烛", + "WaterWalking": "水上漂", + "Weak": "软弱", + "WeaponImbueConfetti": "武器灌注:彩纸", + "WeaponImbueCursedFlames": "武器灌注:诅咒焰", + "WeaponImbueFire": "武器灌注:火焰", + "WeaponImbueGold": "武器灌注:金", + "WeaponImbueIchor": "武器灌注:灵液", + "WeaponImbueNanites": "武器灌注:纳米机器人", + "WeaponImbuePoison": "武器灌注:毒药", + "WeaponImbueVenom": "武器灌注:毒液", + "Webbed": "织网", + "WellFed": "吃得好", + "Werewolf": "狼人", + "Wet": "潮湿", + "WindPushed": "强风", + "Wisp": "妖灵", + "WitheredArmor": "枯萎盔甲", + "WitheredWeapon": "枯萎武器", + "Wrath": "怒气", + "ZephyrFish": "和风鱼", + "DesertMinecartRight": "{$BuffName.MinecartRight}", + "DesertMinecartLeft": "{$BuffName.MinecartLeft}", + "FishMinecartRight": "{$BuffName.MinecartRight}", + "FishMinecartLeft": "{$BuffName.MinecartLeft}", + "BeeMinecartRight": "{$BuffName.MinecartRight}", + "BeeMinecartLeft": "{$BuffName.MinecartLeft}", + "LadybugMinecartRight": "{$BuffName.MinecartRight}", + "LadybugMinecartLeft": "{$BuffName.MinecartLeft}", + "PigronMinecartRight": "{$BuffName.MinecartRight}", + "PigronMinecartLeft": "{$BuffName.MinecartLeft}", + "SunflowerMinecartRight": "{$BuffName.MinecartRight}", + "SunflowerMinecartLeft": "{$BuffName.MinecartLeft}", + "HellMinecartRight": "{$BuffName.MinecartRight}", + "HellMinecartLeft": "{$BuffName.MinecartLeft}", + "ShroomMinecartRight": "{$BuffName.MinecartRight}", + "ShroomMinecartLeft": "{$BuffName.MinecartLeft}", + "AmethystMinecartRight": "{$BuffName.MinecartRight}", + "AmethystMinecartLeft": "{$BuffName.MinecartLeft}", + "TopazMinecartRight": "{$BuffName.MinecartRight}", + "TopazMinecartLeft": "{$BuffName.MinecartLeft}", + "SapphireMinecartRight": "{$BuffName.MinecartRight}", + "SapphireMinecartLeft": "{$BuffName.MinecartLeft}", + "EmeraldMinecartRight": "{$BuffName.MinecartRight}", + "EmeraldMinecartLeft": "{$BuffName.MinecartLeft}", + "RubyMinecartRight": "{$BuffName.MinecartRight}", + "RubyMinecartLeft": "{$BuffName.MinecartLeft}", + "DiamondMinecartRight": "{$BuffName.MinecartRight}", + "DiamondMinecartLeft": "{$BuffName.MinecartLeft}", + "AmberMinecartRight": "{$BuffName.MinecartRight}", + "AmberMinecartLeft": "{$BuffName.MinecartLeft}", + "BeetleMinecartRight": "{$BuffName.MinecartRight}", + "BeetleMinecartLeft": "{$BuffName.MinecartLeft}", + "MeowmereMinecartRight": "{$BuffName.MinecartRight}", + "MeowmereMinecartLeft": "{$BuffName.MinecartLeft}", + "PartyMinecartRight": "{$BuffName.MinecartRight}", + "PartyMinecartLeft": "{$BuffName.MinecartLeft}", + "PirateMinecartRight": "{$BuffName.MinecartRight}", + "PirateMinecartLeft": "{$BuffName.MinecartLeft}", + "SteampunkMinecartRight": "{$BuffName.MinecartRight}", + "SteampunkMinecartLeft": "{$BuffName.MinecartLeft}", + "CoffinMinecartRight": "{$BuffName.MinecartRight}", + "CoffinMinecartLeft": "{$BuffName.MinecartLeft}" + }, + "MapObject": { + "Adamantite": "精金", + "AnimalSkin": "动物皮", + "Anvil": "砧", + "Banner": "旗帜", + "BeeHive": "蜂巢", + "Chair": "椅子", + "Chandelier": "吊灯", + "Chlorophyte": "叶绿", + "ChristmasLight": "圣诞灯", + "Cobalt": "钴", + "Copper": "铜", + "CrimsonAltar": "猩红祭坛", + "Crimtane": "猩红", + "DemonAltar": "恶魔祭坛", + "Demonite": "魔矿", + "Door": "门", + "DrippingHoney": "滴落蜂蜜", + "DrippingLava": "滴落熔岩", + "DrippingWater": "滴水", + "FloorLamp": "落地灯", + "Fossil": "化石", + "GiantMushroom": "巨型蘑菇", + "Gold": "金", + "Iron": "铁", + "ItemRack": "物品架", + "Lantern": "灯笼", + "Larva": "幼虫", + "Lead": "铅", + "LivingWood": "生命木", + "MetalBar": "金属棒", + "Mythril": "秘银", + "OrangeSquirrelCage": "橙松鼠笼", + "Orichalcum": "山铜", + "Painting": "喷漆", + "Palladium": "钯金", + "PalmTree": "棕榈树", + "Picture": "图片", + "PineTree": "松树", + "PlanterasBulb": "世纪之花灯泡", + "Platinum": "铂金", + "Pot": "罐子", + "Rocket": "火箭", + "SandFlow": "沙流", + "Sapling": "树苗", + "SiltExtractinator": "淤泥提炼机", + "Silver": "银", + "Sink": "水槽", + "Statue": "雕像", + "Table": "桌子", + "Thorn": "荆棘", + "Thorns": "荆棘", + "Timer": "计时器", + "Tin": "锡", + "Titanium": "钛金", + "Trap": "机关", + "Tree": "树", + "Trophy": "纪念章", + "Tungsten": "钨", + "Turret": "炮塔", + "Vase": "花瓶", + "WaterFountain": "喷泉", + "Web": "蛛丝" + }, + "ChatCommand": { + "Playing_0": "{$LegacyMultiplayer.6}", + "Playing_1": "{$LegacyMultiplayer.21}", + "Roll": "{$LegacyMultiplayer.8}", + "Party": "/队", + "Emote": "/表情" + }, + "Bestiary_ItemDropConditions": { + "NotExpert": "", + "NotMasterMode": "", + "LegacyHack_IsBossAndNotExpert": "", + "IsCrimsonAndNotExpert": "", + "IsCorruptionAndNotExpert": "", + "NotFromStatue": "" + }, + "Bestiary_FlavorText": { + "npc_JungleSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_YellowSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_RedSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_PurpleSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_BlackSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_GreenSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_BlueSlime": "{$CommonBestiaryFlavor.Slime}", + "npc_DemonEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_Zombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_Skeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_AngryBones": "{$CommonBestiaryFlavor.AngryBones}", + "npc_Hornet": "{$CommonBestiaryFlavor.Hornet}", + "npc_Hellbat": "{$CommonBestiaryFlavor.LavaBat}", + "npc_BlueJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_PinkJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_Mummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_DarkMummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_LightMummy": "{$CommonBestiaryFlavor.Mummy}", + "npc_Mimic": "{$CommonBestiaryFlavor.Mimic}", + "npc_GreenJellyfish": "{$CommonBestiaryFlavor.Jellyfish}", + "npc_BaldZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_WanderingEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_Penguin": "{$CommonBestiaryFlavor.Penguin}", + "npc_PenguinBlack": "{$CommonBestiaryFlavor.Penguin}", + "npc_Lavabat": "{$CommonBestiaryFlavor.LavaBat}", + "npc_PigronCorruption": "{$CommonBestiaryFlavor.Pigron}", + "npc_PigronHallow": "{$CommonBestiaryFlavor.Pigron}", + "npc_PigronCrimson": "{$CommonBestiaryFlavor.Pigron}", + "npc_PincushionZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_SwampZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_TwiggyZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_CataractEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_SleepyEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_DialatedEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_GreenEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_PurpleEye": "{$CommonBestiaryFlavor.DemonEye}", + "npc_FemaleZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_HeadacheSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_MisassembledSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_PantlessSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_HornetFatty": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetHoney": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetLeafy": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetSpikey": "{$CommonBestiaryFlavor.Hornet}", + "npc_HornetStingy": "{$CommonBestiaryFlavor.Hornet}", + "npc_ZombieMushroom": "{$CommonBestiaryFlavor.MushroomZombie}", + "npc_ZombieMushroomHat": "{$CommonBestiaryFlavor.MushroomZombie}", + "npc_FungiBulb": "{$CommonBestiaryFlavor.FungiBulb}", + "npc_GiantFungiBulb": "{$CommonBestiaryFlavor.FungiBulb}", + "npc_RustyArmoredBonesAxe": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesFlail": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesSword": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_RustyArmoredBonesSwordNoArmor": "{$CommonBestiaryFlavor.RustyArmoredBones}", + "npc_BlueArmoredBones": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesMace": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesNoPants": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_BlueArmoredBonesSword": "{$CommonBestiaryFlavor.BlueArmoredBones}", + "npc_HellArmoredBones": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesSpikeShield": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesMace": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_HellArmoredBonesSword": "{$CommonBestiaryFlavor.HellArmoredBones}", + "npc_RaggedCaster": "{$CommonBestiaryFlavor.RaggedCaster}", + "npc_RaggedCasterOpenCoat": "{$CommonBestiaryFlavor.RaggedCaster}", + "npc_Necromancer": "{$CommonBestiaryFlavor.Necromancer}", + "npc_NecromancerArmored": "{$CommonBestiaryFlavor.Necromancer}", + "npc_DiabolistRed": "{$CommonBestiaryFlavor.Diabolist}", + "npc_DiabolistWhite": "{$CommonBestiaryFlavor.Diabolist}", + "npc_AngryBonesBig": "{$CommonBestiaryFlavor.AngryBones}", + "npc_AngryBonesBigMuscle": "{$CommonBestiaryFlavor.AngryBones}", + "npc_AngryBonesBigHelmet": "{$CommonBestiaryFlavor.AngryBones}", + "npc_Scarecrow1": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow2": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow3": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow4": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow5": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow6": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow7": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow8": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow9": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_Scarecrow10": "{$CommonBestiaryFlavor.Scarecrow}", + "npc_DemonEyeOwl": "{$CommonBestiaryFlavor.CostumeDemonEye}", + "npc_DemonEyeSpaceship": "{$CommonBestiaryFlavor.CostumeDemonEye}", + "npc_ZombieDoctor": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_ZombieSuperman": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_ZombiePixie": "{$CommonBestiaryFlavor.CostumeZombie}", + "npc_SkeletonTopHat": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_SkeletonAstonaut": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_SkeletonAlien": "{$CommonBestiaryFlavor.CostumeSkeleton}", + "npc_ZombieXmas": "{$CommonBestiaryFlavor.ZombieXmas}", + "npc_ZombieSweater": "{$CommonBestiaryFlavor.ZombieXmas}", + "npc_SlimeRibbonWhite": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonYellow": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonGreen": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_SlimeRibbonRed": "{$CommonBestiaryFlavor.RibbonSlime}", + "npc_ZombieElf": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ZombieElfBeard": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ZombieElfGirl": "{$CommonBestiaryFlavor.ZombieElf}", + "npc_ArmedZombie": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombiePincushion": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieSwamp": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieTwiggy": "{$CommonBestiaryFlavor.Zombie}", + "npc_ArmedZombieCenx": "{$CommonBestiaryFlavor.Zombie}", + "npc_GoldBird": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldBunny": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldButterfly": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldFrog": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldGrasshopper": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldMouse": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldWorm": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_BoneThrowingSkeleton": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton2": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton3": "{$CommonBestiaryFlavor.Skeleton}", + "npc_BoneThrowingSkeleton4": "{$CommonBestiaryFlavor.Skeleton}", + "npc_GiantWalkingAntlion": "{$CommonBestiaryFlavor.AntlionCharger}", + "npc_GiantFlyingAntlion": "{$CommonBestiaryFlavor.AntlionSwarmer}", + "npc_DesertLamiaLight": "{$CommonBestiaryFlavor.Lamia}", + "npc_DesertLamiaDark": "{$CommonBestiaryFlavor.Lamia}", + "npc_SquirrelGold": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_SandShark": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkCorrupt": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkCrimson": "{$CommonBestiaryFlavor.Sandshark}", + "npc_SandsharkHallow": "{$CommonBestiaryFlavor.Sandshark}", + "npc_WalkingAntlion": "{$CommonBestiaryFlavor.AntlionCharger}", + "npc_FlyingAntlion": "{$CommonBestiaryFlavor.AntlionSwarmer}", + "npc_GoldGoldfish": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_GoldGoldfishWalker": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_BlackDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_BlueDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_GreenDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_OrangeDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_RedDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_YellowDragonfly": "{$CommonBestiaryFlavor.Dragonfly}", + "npc_GoldDragonfly": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldLadyBug": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldWaterStrider": "{$CommonBestiaryFlavor.GoldBaitCritter}", + "npc_GoldSeahorse": "{$CommonBestiaryFlavor.GoldCritter}", + "npc_IceMimic": "{$CommonBestiaryFlavor.Mimic}", + "npc_GemSquirrelAmethyst": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelTopaz": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelSapphire": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelEmerald": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelRuby": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelDiamond": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemSquirrelAmber": "{$CommonBestiaryFlavor.GemSquirrel}", + "npc_GemBunnyAmethyst": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyTopaz": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnySapphire": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyEmerald": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyRuby": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyDiamond": "{$CommonBestiaryFlavor.GemBunny}", + "npc_GemBunnyAmber": "{$CommonBestiaryFlavor.GemBunny}" + } +} \ No newline at end of file diff --git a/Localization/Content/zh-Hans/Items.json b/Localization/Content/zh-Hans/Items.json new file mode 100644 index 0000000..a4f7327 --- /dev/null +++ b/Localization/Content/zh-Hans/Items.json @@ -0,0 +1,5677 @@ +{ + "PaintingArtist": { + "Crowno": "'V. Costa Moura'", + "Garner": "'W. Garner'", + "Moosdijk": "'R. Moosdijk'", + "Lazure": "'J. Hayes'", + "Myhre": "'J. T. Myhre'", + "Burczyk": "'C. Burczyk'", + "Craig": "'A. Craig'", + "Kolf": "'A. G. Kolf'", + "Wright": "'K. Wright'", + "Phelps": "'D. Phelps'", + "Duncan": "'M. J. Duncan'", + "Ness": "'C. J. Ness'" + }, + "Prefix": { + "Dull": "钝", + "Unhappy": "倒霉", + "Bulky": "笨重", + "Shameful": "可耻", + "Heavy": "重", + "Light": "轻", + "Sighted": "精准", + "Rapid": "迅速", + "Hasty": "急速", + "Intimidating": "恐怖", + "Large": "大", + "Deadly": "致命", + "Staunch": "可靠", + "Awful": "可畏", + "Lethargic": "无力", + "Awkward": "粗笨", + "Powerful": "强大", + "Mystic": "神秘", + "Adept": "精巧", + "Masterful": "精湛", + "Inept": "笨拙", + "Massive": "巨大", + "Ignorant": "无知", + "Deranged": "错乱", + "Intense": "威猛", + "Taboo": "禁忌", + "Celestial": "天界", + "Furious": "狂怒", + "Keen": "锐利", + "Superior": "高端", + "Forceful": "强力", + "Broken": "碎裂", + "Dangerous": "危险", + "Damaged": "破损", + "Shoddy": "粗劣", + "Quick": "迅捷", + "Deadly2": "致命", + "Agile": "灵活", + "Nimble": "灵巧", + "Murderous": "残暴", + "Slow": "缓慢", + "Sluggish": "迟钝", + "Lazy": "呆滞", + "Savage": "凶残", + "Annoying": "惹恼", + "Nasty": "凶险", + "Manic": "狂躁", + "Hurtful": "致伤", + "Strong": "强劲", + "Unpleasant": "粗鲁", + "Weak": "软弱", + "Ruthless": "无情", + "Frenzying": "暴怒", + "Godly": "神级", + "Sharp": "锋利", + "Demonic": "恶魔", + "Zealous": "狂热", + "Hard": "坚硬", + "Guarding": "守护", + "Armored": "装甲", + "Warding": "护佑", + "Arcane": "奥秘", + "Precise": "精确", + "Lucky": "幸运", + "Jagged": "锯齿", + "Pointy": "尖锐", + "Spiked": "尖刺", + "Angry": "愤怒", + "Menacing": "险恶", + "Brisk": "轻快", + "Fleeting": "快速", + "Hasty2": "急速", + "Quick2": "迅捷", + "Wild": "狂野", + "Rash": "鲁莽", + "Intrepid": "勇猛", + "Tiny": "微小", + "Violent": "暴力", + "Legendary": "传奇", + "Unreal": "虚幻", + "Mythical": "神话", + "Terrible": "可怕", + "Small": "小" + }, + "ItemName": { + "IronPickaxe": "铁镐", + "IronAxe": "铁斧", + "ShadowGreaves": "暗影护胫", + "ConfettiGun": "彩纸枪", + "ChlorophyteMask": "叶绿面具", + "ChlorophyteHelmet": "叶绿头盔", + "ChlorophyteHeadgear": "叶绿头饰", + "ChlorophytePlateMail": "叶绿板甲", + "ChlorophyteGreaves": "叶绿护胫", + "ChlorophyteBar": "叶绿锭", + "RedDye": "红染料", + "OrangeDye": "橙染料", + "YellowDye": "黄染料", + "ShadowScalemail": "暗影鳞甲", + "LimeDye": "橙绿染料", + "GreenDye": "绿染料", + "TealDye": "青绿染料", + "CyanDye": "青染料", + "SkyBlueDye": "天蓝染料", + "BlueDye": "蓝染料", + "PurpleDye": "紫染料", + "VioletDye": "蓝紫染料", + "PinkDye": "粉染料", + "RedandBlackDye": "红黑染料", + "ShadowHelmet": "暗影头盔", + "OrangeandBlackDye": "橙黑染料", + "YellowandBlackDye": "黄黑染料", + "LimeandBlackDye": "橙绿黑染料", + "GreenandBlackDye": "绿黑染料", + "TealandBlackDye": "青绿黑染料", + "CyanandBlackDye": "青黑染料", + "SkyBlueandBlackDye": "天蓝黑染料", + "BlueandBlackDye": "蓝黑染料", + "PurpleandBlackDye": "紫黑染料", + "VioletandBlackDye": "蓝紫黑染料", + "NightmarePickaxe": "梦魇镐", + "PinkandBlackDye": "粉黑染料", + "FlameDye": "红焰染料", + "FlameAndBlackDye": "红焰黑染料", + "GreenFlameDye": "绿焰染料", + "GreenFlameAndBlackDye": "绿焰黑染料", + "BlueFlameDye": "蓝焰染料", + "BlueFlameAndBlackDye": "蓝焰黑染料", + "SilverDye": "银染料", + "BrightRedDye": "淡红染料", + "BrightOrangeDye": "淡橙染料", + "TheBreaker": "魔锤", + "BrightYellowDye": "淡黄染料", + "BrightLimeDye": "淡橙绿染料", + "BrightGreenDye": "淡绿染料", + "BrightTealDye": "淡青绿染料", + "BrightCyanDye": "淡青染料", + "BrightSkyBlueDye": "淡天蓝染料", + "BrightBlueDye": "淡蓝染料", + "BrightPurpleDye": "淡紫染料", + "BrightVioletDye": "淡蓝紫染料", + "BrightPinkDye": "淡粉染料", + "Candle": "蜡烛", + "BlackDye": "黑染料", + "RedandSilverDye": "红银染料", + "OrangeandSilverDye": "橙银染料", + "YellowandSilverDye": "黄银染料", + "LimeandSilverDye": "橙绿银染料", + "GreenandSilverDye": "绿银染料", + "TealandSilverDye": "青绿银染料", + "CyanandSilverDye": "青银染料", + "SkyBlueandSilverDye": "天蓝银染料", + "BlueandSilverDye": "蓝银染料", + "CopperChandelier": "铜吊灯", + "PurpleandSilverDye": "紫银染料", + "VioletandSilverDye": "蓝紫银染料", + "PinkandSilverDye": "粉银染料", + "IntenseFlameDye": "亮红焰染料", + "IntenseGreenFlameDye": "亮绿焰染料", + "IntenseBlueFlameDye": "亮蓝焰染料", + "RainbowDye": "彩虹染料", + "IntenseRainbowDye": "亮彩虹染料", + "YellowGradientDye": "渐变黄染料", + "CyanGradientDye": "渐变青染料", + "SilverChandelier": "银吊灯", + "VioletGradientDye": "渐变蓝紫染料", + "Paintbrush": "漆刷", + "PaintRoller": "涂漆滚刷", + "RedPaint": "红漆", + "OrangePaint": "橙漆", + "YellowPaint": "黄漆", + "LimePaint": "橙绿漆", + "GreenPaint": "绿漆", + "TealPaint": "青绿漆", + "CyanPaint": "青漆", + "GoldChandelier": "金吊灯", + "SkyBluePaint": "天蓝漆", + "BluePaint": "蓝漆", + "PurplePaint": "紫漆", + "VioletPaint": "蓝紫漆", + "PinkPaint": "粉漆", + "DeepRedPaint": "深红漆", + "DeepOrangePaint": "深橙漆", + "DeepYellowPaint": "深黄漆", + "DeepLimePaint": "深橙绿漆", + "DeepGreenPaint": "深绿漆", + "ManaCrystal": "魔力水晶", + "DeepTealPaint": "深青绿漆", + "DeepCyanPaint": "深青漆", + "DeepSkyBluePaint": "深天蓝漆", + "DeepBluePaint": "深蓝漆", + "DeepPurplePaint": "深紫漆", + "DeepVioletPaint": "深蓝紫漆", + "DeepPinkPaint": "深粉漆", + "BlackPaint": "黑漆", + "WhitePaint": "白漆", + "GrayPaint": "灰漆", + "IronOre": "铁矿", + "LesserManaPotion": "弱效魔力药水", + "PaintScraper": "漆铲", + "LihzahrdBrick": "丛林蜥蜴砖", + "LihzahrdBrickWall": "丛林蜥蜴砖墙", + "SlushBlock": "雪泥块", + "PalladiumOre": "钯金矿", + "OrichalcumOre": "山铜矿", + "TitaniumOre": "钛金矿", + "TealMushroom": "青绿蘑菇", + "GreenMushroom": "绿蘑菇", + "SkyBlueFlower": "天蓝花朵", + "BandofStarpower": "星力手环", + "YellowMarigold": "黄万寿菊", + "BlueBerries": "蓝浆果", + "LimeKelp": "橙绿海藻", + "PinkPricklyPear": "粉仙人球", + "OrangeBloodroot": "橙血根草", + "RedHusk": "红外壳", + "CyanHusk": "青外壳", + "VioletHusk": "蓝紫外壳", + "PurpleMucos": "紫粘液", + "BlackInk": "黑墨水", + "FlowerofFire": "火之花", + "DyeVat": "染缸", + "BeeGun": "蜜蜂枪", + "PossessedHatchet": "疯狂飞斧", + "BeeKeeper": "养蜂人", + "Hive": "蜂巢", + "HoneyBlock": "蜂蜜块", + "HiveWall": "蜂巢墙", + "CrispyHoneyBlock": "松脆蜂蜜块", + "HoneyBucket": "蜂蜜桶", + "HiveWand": "蜂巢魔棒", + "MagicMissile": "魔法导弹", + "Beenade": "蜜蜂手榴弹", + "GravityGlobe": "重力球", + "HoneyComb": "蜂窝", + "Abeemination": "憎恶之蜂", + "BottledHoney": "蜂蜜瓶", + "RainHat": "雨帽", + "RainCoat": "雨衣", + "LihzahrdDoor": "丛林蜥蜴门", + "DungeonDoor": "地牢门", + "LeadDoor": "铅门", + "DirtRod": "土魔杖", + "IronDoor": "铁门", + "TempleKey": "神庙钥匙", + "LihzahrdChest": "丛林蜥蜴箱", + "LihzahrdChair": "丛林蜥蜴椅", + "LihzahrdTable": "丛林蜥蜴桌", + "LihzahrdWorkBench": "丛林蜥蜴工作台", + "SuperDartTrap": "超级飞镖机关", + "FlameTrap": "烈焰机关", + "SpikyBallTrap": "尖球机关", + "SpearTrap": "长矛机关", + "ShadowOrb": "暗影珠", + "WoodenSpike": "木尖刺", + "LihzahrdPressurePlate": "丛林蜥蜴压力板", + "LihzahrdStatue": "丛林蜥蜴雕像", + "LihzahrdWatcherStatue": "丛林蜥蜴看守人雕像", + "LihzahrdGuardianStatue": "丛林蜥蜴守卫雕像", + "WaspGun": "胡蜂枪", + "PiranhaGun": "食人鱼枪", + "PygmyStaff": "矮人法杖", + "PygmyNecklace": "矮人项链", + "TikiMask": "提基面具", + "Meteorite": "陨石", + "TikiShirt": "提基衣", + "TikiPants": "提基裤", + "LeafWings": "叶之翼", + "BlizzardinaBalloon": "暴雪气球", + "BundleofBalloons": "气球束", + "BatWings": "蝙蝠之翼", + "BoneSword": "骨剑", + "HerculesBeetle": "大力士甲虫", + "SmokeBomb": "烟雾弹", + "BoneKey": "骨头钥匙", + "MeteoriteBar": "陨石锭", + "Nectar": "花蜜", + "TikiTotem": "提基图腾", + "LizardEgg": "蜥蜴蛋", + "GraveMarker": "墓石碑", + "CrossGraveMarker": "十字墓石碑", + "Headstone": "碑石", + "Gravestone": "墓碑", + "Obelisk": "方尖碑", + "LeafBlower": "吹叶机", + "ChlorophyteBullet": "叶绿弹", + "Hook": "爪钩", + "ParrotCracker": "鹦鹉饼干", + "StrangeGlowingMushroom": "奇异发光蘑菇", + "Seedling": "幼苗", + "WispinaBottle": "妖灵瓶", + "PalladiumBar": "钯金锭", + "PalladiumSword": "钯金剑", + "PalladiumPike": "钯金刺矛", + "PalladiumRepeater": "钯金连弩", + "PalladiumPickaxe": "钯金镐", + "PalladiumDrill": "钯金钻头", + "Flamarang": "烈焰回旋镖", + "PalladiumChainsaw": "钯金链锯", + "OrichalcumBar": "山铜锭", + "OrichalcumSword": "山铜剑", + "OrichalcumHalberd": "山铜长戟", + "OrichalcumRepeater": "山铜连弩", + "OrichalcumPickaxe": "山铜镐", + "OrichalcumDrill": "山铜钻头", + "OrichalcumChainsaw": "山铜链锯", + "TitaniumBar": "钛金锭", + "TitaniumSword": "钛金剑", + "CopperOre": "铜矿", + "MoltenFury": "熔火之怒", + "TitaniumTrident": "钛金三叉戟", + "TitaniumRepeater": "钛金连弩", + "TitaniumPickaxe": "钛金镐", + "TitaniumDrill": "钛金钻头", + "TitaniumChainsaw": "钛金链锯", + "PalladiumMask": "钯金面具", + "PalladiumHelmet": "钯金头盔", + "PalladiumHeadgear": "钯金头饰", + "PalladiumBreastplate": "钯金胸甲", + "PalladiumLeggings": "钯金护腿", + "FieryGreatsword": "炽焰巨剑", + "OrichalcumMask": "山铜面具", + "OrichalcumHelmet": "山铜头盔", + "OrichalcumHeadgear": "山铜头饰", + "OrichalcumBreastplate": "山铜胸甲", + "OrichalcumLeggings": "山铜护腿", + "TitaniumMask": "钛金面具", + "TitaniumHelmet": "钛金头盔", + "TitaniumHeadgear": "钛金头饰", + "TitaniumBreastplate": "钛金胸甲", + "TitaniumLeggings": "钛金护腿", + "MoltenPickaxe": "熔岩镐", + "OrichalcumAnvil": "山铜砧", + "TitaniumForge": "钛金熔炉", + "PalladiumWaraxe": "钯金战斧", + "OrichalcumWaraxe": "山铜战斧", + "TitaniumWaraxe": "钛金战斧", + "HallowedBar": "神圣锭", + "ChlorophyteClaymore": "叶绿双刃刀", + "ChlorophyteSaber": "叶绿军刀", + "ChlorophytePartisan": "叶绿镋", + "ChlorophyteShotbow": "叶绿连弩", + "MeteorHelmet": "流星头盔", + "ChlorophytePickaxe": "叶绿镐", + "ChlorophyteDrill": "叶绿钻头", + "ChlorophyteChainsaw": "叶绿链锯", + "ChlorophyteGreataxe": "叶绿巨斧", + "ChlorophyteWarhammer": "叶绿战锤", + "ChlorophyteArrow": "叶绿箭", + "AmethystHook": "紫晶钩", + "TopazHook": "黄玉钩", + "SapphireHook": "蓝玉钩", + "EmeraldHook": "翡翠钩", + "MeteorSuit": "流星护甲", + "RubyHook": "红玉钩", + "DiamondHook": "钻石钩", + "AmberMosquito": "蚊子琥珀", + "UmbrellaHat": "伞帽", + "NimbusRod": "雨云魔杖", + "OrangeTorch": "橙火把", + "CrimsandBlock": "猩红沙块", + "BeeCloak": "蜜蜂斗篷", + "EyeoftheGolem": "石巨人之眼", + "HoneyBalloon": "蜂蜜气球", + "MeteorLeggings": "流星护腿", + "BlueHorseshoeBalloon": "蓝马掌气球", + "WhiteHorseshoeBalloon": "白马掌气球", + "YellowHorseshoeBalloon": "黄马掌气球", + "FrozenTurtleShell": "冰冻海龟壳", + "SniperRifle": "狙击步枪", + "VenusMagnum": "维纳斯万能枪", + "CrimsonRod": "猩红魔杖", + "CrimtaneBar": "猩红矿锭", + "Stynger": "毒刺发射器", + "FlowerPow": "花冠", + "BottledWater": "水瓶", + "RainbowGun": "彩虹枪", + "StyngerBolt": "毒刺矢", + "ChlorophyteJackhammer": "叶绿手提钻", + "Teleporter": "传送机", + "FlowerofFrost": "寒霜之花", + "Uzi": "乌兹冲锋枪", + "MagnetSphere": "磁球", + "PurpleStainedGlass": "紫花窗玻璃", + "YellowStainedGlass": "黄花窗玻璃", + "BlueStainedGlass": "蓝花窗玻璃", + "SpaceGun": "太空枪", + "GreenStainedGlass": "绿花窗玻璃", + "RedStainedGlass": "红花窗玻璃", + "MulticoloredStainedGlass": "五彩花窗玻璃", + "SkeletronHand": "骷髅王之手", + "Skull": "骷髅头", + "BallaHat": "巴拉帽", + "GangstaHat": "黑帮帽", + "SailorHat": "水手帽", + "EyePatch": "眼罩", + "SailorShirt": "水手衣", + "RocketBoots": "火箭靴", + "SailorPants": "水手裤", + "SkeletronMask": "骷髅王面具", + "AmethystRobe": "紫晶长袍", + "TopazRobe": "黄玉长袍", + "SapphireRobe": "蓝玉长袍", + "EmeraldRobe": "翡翠长袍", + "RubyRobe": "红玉长袍", + "DiamondRobe": "钻石长袍", + "WhiteTuxedoShirt": "白西装衣", + "WhiteTuxedoPants": "白西装裤", + "GrayBrick": "灰砖", + "PanicNecklace": "恐慌项链", + "LifeFruit": "生命果", + "LihzahrdAltar": "丛林蜥蜴祭坛", + "LihzahrdPowerCell": "丛林蜥蜴电池", + "Picksaw": "锯刃镐", + "HeatRay": "高温射线枪", + "StaffofEarth": "大地法杖", + "GolemFist": "石巨人之拳", + "WaterChest": "水中箱", + "Binoculars": "双筒望远镜", + "GoldOre": "金矿", + "GrayBrickWall": "灰砖墙", + "RifleScope": "步枪瞄准镜", + "DestroyerEmblem": "毁灭者徽章", + "HighVelocityBullet": "高射速子弹", + "JellyfishNecklace": "水母项链", + "ZombieArm": "僵尸臂", + "TheAxe": "斧", + "IceSickle": "冰雪镰刀", + "ClothierVoodooDoll": "服装商巫毒娃娃", + "PoisonStaff": "剧毒法杖", + "SlimeStaff": "史莱姆法杖", + "RedBrick": "红砖", + "PoisonDart": "毒镖", + "EyeSpring": "弹簧眼", + "ToySled": "玩具雪橇", + "BookofSkulls": "骷髅头法书", + "KOCannon": "致胜炮", + "PirateMap": "海盗地图", + "TurtleHelmet": "海龟头盔", + "TurtleScaleMail": "海龟铠甲", + "TurtleLeggings": "海龟护腿", + "SnowballCannon": "雪球炮", + "RedBrickWall": "红砖墙", + "BonePickaxe": "骨镐", + "MagicQuiver": "魔法箭袋", + "MagmaStone": "岩浆石", + "ObsidianRose": "黑曜石玫瑰", + "Bananarang": "香蕉回旋镖", + "ChainKnife": "链刀", + "RodofDiscord": "混沌传送杖", + "DeathSickle": "死神镰刀", + "TurtleShell": "海龟壳", + "TissueSample": "组织样本", + "ClayBlock": "粘土块", + "Vertebrae": "椎骨", + "BloodySpine": "血腥脊椎", + "Ichor": "灵液", + "IchorTorch": "灵液火把", + "IchorArrow": "灵液箭", + "IchorBullet": "灵液弹", + "GoldenShower": "黄金雨", + "BunnyCannon": "兔兔炮", + "ExplosiveBunny": "爆炸兔", + "VialofVenom": "小瓶毒液", + "BlueBrick": "蓝砖", + "FlaskofVenom": "大瓶毒液", + "VenomArrow": "毒液箭", + "VenomBullet": "毒液弹", + "FireGauntlet": "烈火手套", + "Cog": "齿轮", + "Confetti": "彩纸", + "Nanites": "纳米机器人", + "ExplosivePowder": "爆炸粉", + "GoldDust": "金尘", + "PartyBullet": "派对弹", + "BlueBrickWall": "蓝砖墙", + "NanoBullet": "纳米弹", + "ExplodingBullet": "爆破弹", + "GoldenBullet": "金子弹", + "FlaskofCursedFlames": "诅咒焰瓶", + "FlaskofFire": "烈火瓶", + "FlaskofGold": "金瓶", + "FlaskofIchor": "灵液瓶", + "FlaskofNanites": "纳米机器人之瓶", + "FlaskofParty": "派对瓶", + "FlaskofPoison": "毒药瓶", + "ChainLantern": "挂链灯笼", + "EyeofCthulhuTrophy": "克苏鲁之眼纪念章", + "EaterofWorldsTrophy": "世界吞噬怪纪念章", + "BrainofCthulhuTrophy": "克苏鲁之脑纪念章", + "SkeletronTrophy": "骷髅王纪念章", + "QueenBeeTrophy": "蜂王纪念章", + "WallofFleshTrophy": "血肉墙纪念章", + "DestroyerTrophy": "毁灭者纪念章", + "SkeletronPrimeTrophy": "机械骷髅王纪念章", + "RetinazerTrophy": "激光眼纪念章", + "SpazmatismTrophy": "魔焰眼纪念章", + "GreenBrick": "绿砖", + "PlanteraTrophy": "世纪之花纪念章", + "GolemTrophy": "石巨人纪念章", + "BloodMoonRising": "血月升空", + "TheHangedMan": "倒吊人", + "GloryoftheFire": "烈火荣耀", + "BoneWarp": "扭曲的骨头", + "WallSkeleton": "壁挂骷髅", + "HangingSkeleton": "吊挂骷髅", + "BlueSlabWall": "蓝板墙", + "BlueTiledWall": "蓝瓷砖墙", + "GreenBrickWall": "绿砖墙", + "PinkSlabWall": "粉板墙", + "PinkTiledWall": "粉瓷砖墙", + "GreenSlabWall": "绿板墙", + "GreenTiledWall": "绿瓷砖墙", + "BlueBrickPlatform": "蓝砖平台", + "PinkBrickPlatform": "粉砖平台", + "GreenBrickPlatform": "绿砖平台", + "MetalShelf": "金属架", + "BrassShelf": "黄铜架", + "WoodShelf": "木架", + "PinkBrick": "粉砖", + "BrassLantern": "黄铜灯笼", + "CagedLantern": "笼式灯笼", + "CarriageLantern": "马车灯笼", + "AlchemyLantern": "炼金灯笼", + "DiablostLamp": "魔教徒灯", + "OilRagSconse": "油布烛台", + "BlueDungeonChair": "蓝地牢椅", + "BlueDungeonTable": "蓝地牢桌", + "BlueDungeonWorkBench": "蓝地牢工作台", + "GreenDungeonChair": "绿地牢椅", + "SilverOre": "银矿", + "PinkBrickWall": "粉砖墙", + "GreenDungeonTable": "绿地牢桌", + "GreenDungeonWorkBench": "绿地牢工作台", + "PinkDungeonChair": "粉地牢椅", + "PinkDungeonTable": "粉地牢桌", + "PinkDungeonWorkBench": "粉地牢工作台", + "BlueDungeonCandle": "蓝地牢蜡烛", + "GreenDungeonCandle": "绿地牢蜡烛", + "PinkDungeonCandle": "粉地牢蜡烛", + "BlueDungeonVase": "蓝地牢花瓶", + "GreenDungeonVase": "绿地牢花瓶", + "GoldBrick": "金砖", + "PinkDungeonVase": "粉地牢花瓶", + "BlueDungeonDoor": "蓝地牢门", + "GreenDungeonDoor": "绿地牢门", + "PinkDungeonDoor": "粉地牢门", + "BlueDungeonBookcase": "蓝地牢书架", + "GreenDungeonBookcase": "绿地牢书架", + "PinkDungeonBookcase": "粉地牢书架", + "Catacomb": "地下墓穴", + "DungeonShelf": "地牢架", + "SkellingtonJSkellingsworth": "骷髅杰克", + "GoldBrickWall": "金砖墙", + "TheCursedMan": "被诅咒的人", + "TheEyeSeestheEnd": "最后一眼", + "SomethingEvilisWatchingYou": "恶魔注视", + "TheTwinsHaveAwoken": "苏醒的双子魔眼", + "TheScreamer": "呐喊者", + "GoblinsPlayingPoker": "玩扑克牌的哥布林", + "Dryadisque": "树妖女", + "Sunflowers": "向日葵", + "TerrarianGothic": "泰拉式哥特", + "Beanie": "小便帽", + "SilverBrick": "银砖", + "ImbuingStation": "灌注站", + "StarinaBottle": "星星瓶", + "EmptyBullet": "空心子弹", + "Impact": "碰撞", + "PoweredbyBirds": "鸟力驱动", + "TheDestroyer": "毁灭者", + "ThePersistencyofEyes": "永恒之眼", + "UnicornCrossingtheHallows": "越过神圣之地的独角兽", + "GreatWave": "巨浪", + "StarryNight": "星空", + "SilverBrickWall": "银砖墙", + "GuidePicasso": "向导毕加索", + "TheGuardiansGaze": "守卫凝视", + "FatherofSomeone": "某人之父", + "NurseLisa": "丽莎护士", + "ShadowbeamStaff": "暗影束法杖", + "InfernoFork": "狱火叉", + "SpectreStaff": "幽灵法杖", + "WoodenFence": "木栅栏", + "LeadFence": "铅栅栏", + "BubbleMachine": "泡泡机", + "CopperBrick": "铜砖", + "BubbleWand": "泡泡魔棒", + "MarchingBonesBanner": "骷髅行军旗", + "NecromanticSign": "死灵标旗", + "RustedCompanyStandard": "秀逗连队旗", + "RaggedBrotherhoodSigil": "丐帮帮旗", + "MoltenLegionFlag": "熔火军团旗", + "DiabolicSigil": "魔教旗", + "ObsidianPlatform": "黑曜石平台", + "ObsidianDoor": "黑曜石门", + "ObsidianChair": "黑曜石椅", + "CopperBrickWall": "铜砖墙", + "ObsidianTable": "黑曜石桌", + "ObsidianWorkBench": "黑曜石工作台", + "ObsidianVase": "黑曜石花瓶", + "ObsidianBookcase": "黑曜石书架", + "HellboundBanner": "地狱之界旗", + "HellHammerBanner": "地狱之锤旗", + "HelltowerBanner": "地狱之塔旗", + "LostHopesofManBanner": "绝望人旗", + "ObsidianWatcherBanner": "黑曜石看守人旗", + "LavaEruptsBanner": "熔岩喷液旗", + "Spike": "尖刺", + "BlueDungeonBed": "蓝地牢床", + "GreenDungeonBed": "绿地牢床", + "PinkDungeonBed": "粉地牢床", + "ObsidianBed": "黑曜石床", + "Waldo": "沃尔多", + "Darkness": "黑暗", + "DarkSoulReaper": "暗魂死神", + "Land": "大地", + "TrappedGhost": "受困鬼魂", + "DemonsEye": "恶魔眼", + "WaterCandle": "水蜡烛", + "FindingGold": "淘金", + "FirstEncounter": "初次邂逅", + "GoodMorning": "早安", + "UndergroundReward": "地下馈赠", + "ThroughtheWindow": "窗外", + "PlaceAbovetheClouds": "云之上", + "DoNotStepontheGrass": "请勿践踏草坪", + "ColdWatersintheWhiteLand": "冰雪寒溪", + "LightlessChasms": "阴暗幽谷", + "TheLandofDeceivingLooks": "浮华假象的大地", + "Book": "书", + "Daylight": "黎明", + "SecretoftheSands": "沙漠的秘密", + "DeadlandComesAlive": "死地复生", + "EvilPresence": "恶灵现世", + "SkyGuardian": "天空守卫", + "AmericanExplosive": "美洲爆炸狂", + "Discover": "探索", + "HandEarth": "大地之手", + "OldMiner": "老矿工", + "Skelehead": "骨蛇之头", + "CopperWatch": "铜表", + "Cobweb": "蛛网", + "FacingtheCerebralMastermind": "直面摄魂师", + "LakeofFire": "火湖", + "TrioSuperHeroes": "超级英雄三剑客", + "SpectreHood": "幽灵兜帽", + "SpectreRobe": "幽灵长袍", + "SpectrePants": "幽灵裤", + "SpectrePickaxe": "幽灵镐", + "SpectreHamaxe": "幽灵锤斧", + "Ectoplasm": "灵气", + "GothicChair": "哥特椅", + "NecroHelmet": "死灵头盔", + "GothicTable": "哥特桌", + "GothicWorkBench": "哥特工作台", + "GothicBookcase": "哥特书架", + "PaladinsHammer": "圣骑士锤", + "SWATHelmet": "特战头盔", + "BeeWings": "蜜蜂之翼", + "GiantHarpyFeather": "巨型鸟妖之羽", + "BoneFeather": "骨之羽", + "FireFeather": "火羽", + "IceFeather": "冰雪羽", + "NecroBreastplate": "死灵胸甲", + "BrokenBatWing": "破蝙蝠之翼", + "TatteredBeeWing": "褴褛蜜蜂之翼", + "LargeAmethyst": "大紫晶", + "LargeTopaz": "大黄玉", + "LargeSapphire": "大蓝玉", + "LargeEmerald": "大翡翠", + "LargeRuby": "大红玉", + "LargeDiamond": "大钻石", + "JungleChest": "丛林箱", + "CorruptionChest": "腐化箱", + "NecroGreaves": "死灵护胫", + "CrimsonChest": "猩红箱", + "HallowedChest": "神圣箱", + "FrozenChest": "冰冻箱", + "JungleKey": "丛林钥匙", + "CorruptionKey": "腐化钥匙", + "CrimsonKey": "猩红钥匙", + "HallowedKey": "神圣钥匙", + "FrozenKey": "冰冻钥匙", + "ImpFace": "小鬼脸", + "OminousPresence": "凶兆", + "Bone": "骨头", + "ShiningMoon": "闪亮月亮", + "LivingGore": "血肉之躯", + "FlowingMagma": "岩浆漫流", + "SpectrePaintbrush": "幽灵漆刷", + "SpectrePaintRoller": "幽灵涂漆滚刷", + "SpectrePaintScraper": "幽灵漆铲", + "ShroomiteHeadgear": "蘑菇矿头饰", + "ShroomiteMask": "蘑菇矿面具", + "ShroomiteHelmet": "蘑菇矿头盔", + "ShroomiteBreastplate": "蘑菇矿胸甲", + "Muramasa": "村正大刀", + "ShroomiteLeggings": "蘑菇矿护腿", + "Autohammer": "自动锤炼机", + "ShroomiteBar": "蘑菇矿锭", + "SDMG": "太空海豚机枪", + "CenxsTiara": "Cenx的头冠", + "CenxsBreastplate": "Cenx的胸甲", + "CenxsLeggings": "Cenx的护腿", + "CrownosMask": "Crowno的面具", + "CrownosBreastplate": "Crowno的胸甲", + "CrownosLeggings": "Crowno的护腿", + "CobaltShield": "钴护盾", + "WillsHelmet": "Will的头盔", + "WillsBreastplate": "Will的胸甲", + "WillsLeggings": "Will的护腿", + "JimsHelmet": "Jim的头盔", + "JimsBreastplate": "Jim的胸甲", + "JimsLeggings": "Jim的护腿", + "AaronsHelmet": "Aaron的头盔", + "AaronsBreastplate": "Aaron的胸甲", + "AaronsLeggings": "Aaron的护腿", + "VampireKnives": "吸血鬼刀", + "AquaScepter": "海蓝权杖", + "BrokenHeroSword": "断裂英雄剑", + "ScourgeoftheCorruptor": "腐化者之戟", + "StaffoftheFrostHydra": "寒霜九头蛇法杖", + "TheCreationoftheGuide": "创造向导", + "TheMerchant": "商人", + "CrownoDevoursHisLunch": "Crowno吞噬其餐", + "RareEnchantment": "稀有魔力", + "GloriousNight": "荣耀之夜", + "SweetheartNecklace": "甜心项链", + "FlurryBoots": "疾风雪靴", + "LuckyHorseshoe": "幸运马掌", + "DTownsHelmet": "D-Town的头盔", + "DTownsBreastplate": "D-Town的胸甲", + "DTownsLeggings": "D-Town的护腿", + "DTownsWings": "D-Town的翅膀", + "WillsWings": "Will的翅膀", + "CrownosWings": "Crowno的翅膀", + "CenxsWings": "Cenx的翅膀", + "CenxsDress": "Cenx的上衣", + "CenxsDressPants": "Cenx的裤装", + "PalladiumColumn": "钯金柱", + "ShinyRedBalloon": "闪亮红气球", + "PalladiumColumnWall": "钯金柱墙", + "BubblegumBlock": "泡泡糖块", + "BubblegumBlockWall": "泡泡糖块墙", + "TitanstoneBlock": "钛石块", + "TitanstoneBlockWall": "钛石块墙", + "MagicCuffs": "魔法手铐", + "MusicBoxSnow": "八音盒(雪原)", + "MusicBoxSpace": "八音盒(太空)", + "MusicBoxCrimson": "八音盒(猩红之地)", + "MusicBoxBoss4": "八音盒(Boss 4)", + "SilverWatch": "银表", + "Harpoon": "鱼叉枪", + "MusicBoxAltOverworldDay": "八音盒(人间日备选曲)", + "MusicBoxRain": "八音盒(雨)", + "MusicBoxIce": "八音盒(冰雪)", + "MusicBoxDesert": "八音盒(沙漠)", + "MusicBoxOcean": "八音盒(海洋)", + "MusicBoxDungeon": "八音盒(地牢)", + "MusicBoxPlantera": "八音盒(世纪之花)", + "MusicBoxBoss5": "八音盒(Boss 5)", + "MusicBoxTemple": "八音盒(神庙)", + "MusicBoxEclipse": "八音盒(日食)", + "SpikyBall": "尖球", + "MusicBoxMushrooms": "八音盒(蘑菇)", + "ButterflyDust": "蝴蝶尘", + "AnkhCharm": "十字章护身符", + "AnkhShield": "十字章护盾", + "BlueFlare": "蓝照明弹", + "AnglerFishBanner": "琵琶鱼旗", + "AngryNimbusBanner": "愤怒雨云怪旗", + "AnomuraFungusBanner": "歪尾真菌旗", + "AntlionBanner": "蚁狮旗", + "ArapaimaBanner": "巨骨舌鱼旗", + "BallOHurt": "链球", + "ArmoredSkeletonBanner": "装甲骷髅旗", + "BatBanner": "洞穴蝙蝠旗", + "BirdBanner": "鸟旗", + "BlackRecluseBanner": "黑隐士旗", + "BloodFeederBanner": "嗜血怪旗", + "BloodJellyBanner": "血水母旗", + "BloodCrawlerBanner": "血爬虫旗", + "BoneSerpentBanner": "骨蛇旗", + "BunnyBanner": "兔兔旗", + "ChaosElementalBanner": "混沌精旗", + "BlueMoon": "蓝月", + "MimicBanner": "宝箱怪旗", + "ClownBanner": "小丑旗", + "CorruptBunnyBanner": "腐化兔兔旗", + "CorruptGoldfishBanner": "腐化金鱼旗", + "CrabBanner": "螃蟹旗", + "CrimeraBanner": "猩红喀迈拉旗", + "CrimsonAxeBanner": "猩红斧旗", + "CursedHammerBanner": "诅咒锤旗", + "DemonBanner": "恶魔旗", + "DemonEyeBanner": "恶魔眼旗", + "Handgun": "手枪", + "DerplingBanner": "跳跳兽旗", + "EaterofSoulsBanner": "噬魂怪旗", + "EnchantedSwordBanner": "附魔剑旗", + "ZombieEskimoBanner": "爱斯基摩僵尸旗", + "FaceMonsterBanner": "脸怪旗", + "FloatyGrossBanner": "恶心浮游怪旗", + "FlyingFishBanner": "飞鱼旗", + "FlyingSnakeBanner": "飞蛇旗", + "FrankensteinBanner": "科学怪人旗", + "FungiBulbBanner": "真菌球怪旗", + "WaterBolt": "水矢", + "FungoFishBanner": "蘑菇鱼旗", + "GastropodBanner": "腹足怪旗", + "GoblinThiefBanner": "哥布林盗贼旗", + "GoblinSorcererBanner": "哥布林巫士旗", + "GoblinPeonBanner": "哥布林苦力旗", + "GoblinScoutBanner": "哥布林侦察兵旗", + "GoblinWarriorBanner": "哥布林战士旗", + "GoldfishBanner": "金鱼旗", + "HarpyBanner": "鸟妖旗", + "HellbatBanner": "地狱蝙蝠旗", + "Bomb": "炸弹", + "HerplingBanner": "蹦蹦兽旗", + "HornetBanner": "黄蜂旗", + "IceElementalBanner": "冰雪精旗", + "IcyMermanBanner": "冰雪人鱼旗", + "FireImpBanner": "火焰小鬼旗", + "JellyfishBanner": "蓝水母旗", + "JungleCreeperBanner": "丛林蜘蛛旗", + "LihzahrdBanner": "丛林蜥蜴旗", + "ManEaterBanner": "食人怪旗", + "MeteorHeadBanner": "流星头旗", + "Dynamite": "雷管", + "MothBanner": "飞蛾旗", + "MummyBanner": "木乃伊旗", + "MushiLadybugBanner": "瓢虫旗", + "ParrotBanner": "鹦鹉旗", + "PigronBanner": "猪龙旗", + "PiranhaBanner": "食人鱼旗", + "PirateBanner": "海盗水手旗", + "PixieBanner": "妖精旗", + "RaincoatZombieBanner": "雨衣僵尸旗", + "ReaperBanner": "死神旗", + "Grenade": "手榴弹", + "SharkBanner": "鲨鱼旗", + "SkeletonBanner": "骷髅旗", + "SkeletonMageBanner": "暗黑法师旗", + "SlimeBanner": "蓝史莱姆旗", + "SnowFlinxBanner": "小雪怪旗", + "SpiderBanner": "爬墙蜘蛛旗", + "SporeZombieBanner": "孢子僵尸旗", + "SwampThingBanner": "沼泽怪旗", + "TortoiseBanner": "巨型陆龟旗", + "ToxicSludgeBanner": "毒泥旗", + "SandBlock": "沙块", + "UmbrellaSlimeBanner": "雨伞史莱姆旗", + "UnicornBanner": "独角兽旗", + "VampireBanner": "吸血鬼旗", + "VultureBanner": "秃鹰旗", + "NypmhBanner": "宁芙旗", + "WerewolfBanner": "狼人旗", + "WolfBanner": "狼旗", + "WorldFeederBanner": "吞世怪旗", + "WormBanner": "蠕虫旗", + "WraithBanner": "幻灵旗", + "GoldWatch": "金表", + "Glass": "玻璃", + "WyvernBanner": "飞龙旗", + "ZombieBanner": "僵尸旗", + "GlassPlatform": "玻璃平台", + "GlassChair": "玻璃椅", + "GoldenChair": "金椅", + "GoldenToilet": "金马桶", + "BarStool": "高脚凳", + "HoneyChair": "蜂蜜椅", + "SteampunkChair": "蒸汽朋克椅", + "GlassDoor": "玻璃门", + "Sign": "标牌", + "GoldenDoor": "金门", + "HoneyDoor": "蜂蜜门", + "SteampunkDoor": "蒸汽朋克门", + "GlassTable": "玻璃桌", + "BanquetTable": "宴会桌", + "Bar": "锭", + "GoldenTable": "金桌", + "HoneyTable": "蜂蜜桌", + "SteampunkTable": "蒸汽朋克桌", + "GlassBed": "玻璃床", + "AshBlock": "灰烬块", + "GoldenBed": "金床", + "HoneyBed": "蜂蜜床", + "SteampunkBed": "蒸汽朋克床", + "LivingWoodWall": "生命木墙", + "FartinaJar": "罐中臭屁", + "Pumpkin": "南瓜", + "PumpkinWall": "南瓜墙", + "Hay": "干草", + "HayWall": "干草墙", + "SpookyWood": "阴森木", + "Obsidian": "黑曜石", + "SpookyWoodWall": "阴森木墙", + "PumpkinHelmet": "南瓜头盔", + "PumpkinBreastplate": "南瓜胸甲", + "PumpkinLeggings": "南瓜护腿", + "CandyApple": "焦糖苹果", + "SoulCake": "灵魂蛋糕", + "NurseHat": "护士帽", + "NurseShirt": "护士衣", + "NursePants": "护士裤", + "WizardsHat": "巫师帽", + "Hellstone": "狱石", + "GuyFawkesMask": "盖伊·福克斯面具", + "DyeTraderRobe": "染料商长袍", + "SteampunkGoggles": "蒸汽朋克护目镜", + "CyborgHelmet": "机器侠头盔", + "CyborgShirt": "机器侠衣", + "CyborgPants": "机器侠裤", + "CreeperMask": "苦力怕面具", + "CreeperShirt": "苦力怕衣", + "CreeperPants": "苦力怕裤", + "CatMask": "猫咪面具", + "HellstoneBar": "狱石锭", + "CatShirt": "猫咪衣", + "CatPants": "猫咪裤", + "GhostMask": "鬼魂面具", + "GhostShirt": "鬼魂衣", + "PumpkinMask": "南瓜面具", + "PumpkinShirt": "南瓜衣", + "PumpkinPants": "南瓜裤", + "RobotMask": "机器人面具", + "RobotShirt": "机器人衣", + "RobotPants": "机器人裤", + "MudBlock": "泥块", + "UnicornMask": "独角兽面具", + "UnicornShirt": "独角兽衣", + "UnicornPants": "独角兽裤", + "VampireMask": "吸血鬼面具", + "VampireShirt": "吸血鬼衣", + "VampirePants": "吸血鬼裤", + "WitchHat": "女巫帽", + "LeprechaunHat": "矮妖帽", + "LeprechaunShirt": "矮妖衣", + "LeprechaunPants": "矮妖裤", + "Sapphire": "蓝玉", + "PixieShirt": "妖精衣", + "PixiePants": "妖精裤", + "PrincessHat": "公主帽", + "PrincessDressNew": "公主裙", + "GoodieBag": "礼袋", + "WitchDress": "女巫服", + "WitchBoots": "女巫靴", + "BrideofFrankensteinMask": "科学怪人新娘面具", + "BrideofFrankensteinDress": "科学怪人新娘服", + "KarateTortoiseMask": "空手道陆龟面具", + "Ruby": "红玉", + "KarateTortoiseShirt": "空手道陆龟衣", + "KarateTortoisePants": "空手道陆龟裤", + "CandyCornRifle": "玉米糖步枪", + "CandyCorn": "玉米糖", + "JackOLanternLauncher": "杰克南瓜灯发射器", + "ExplosiveJackOLantern": "爆炸杰克南瓜灯", + "Sickle": "镰刀", + "PumpkinPie": "南瓜饼", + "ScarecrowHat": "稻草人帽", + "ScarecrowShirt": "稻草人衣", + "Emerald": "翡翠", + "ScarecrowPants": "稻草人裤", + "Cauldron": "大锅", + "PumpkinChair": "南瓜椅", + "PumpkinDoor": "南瓜门", + "PumpkinTable": "南瓜桌", + "PumpkinWorkBench": "南瓜工作台", + "PumpkinPlatform": "南瓜平台", + "TatteredFairyWings": "褴褛仙灵之翼", + "SpiderEgg": "蜘蛛卵", + "MagicalPumpkinSeed": "魔法南瓜子", + "DepthMeter": "深度计", + "Topaz": "黄玉", + "BatHook": "蝙蝠钩", + "BatScepter": "蝙蝠权杖", + "RavenStaff": "乌鸦法杖", + "JungleKeyMold": "丛林钥匙模具", + "CorruptionKeyMold": "腐化钥匙模具", + "CrimsonKeyMold": "猩红钥匙模具", + "HallowedKeyMold": "神圣钥匙模具", + "FrozenKeyMold": "冰冻钥匙模具", + "HangingJackOLantern": "杰克南瓜挂灯", + "RottenEgg": "臭蛋", + "Amethyst": "紫晶", + "UnluckyYarn": "霉运纱线", + "BlackFairyDust": "黑色仙尘", + "Jackelier": "南瓜头吊灯", + "JackOLantern": "杰克南瓜灯", + "SpookyChair": "阴森椅", + "SpookyDoor": "阴森门", + "SpookyTable": "阴森桌", + "SpookyWorkBench": "阴森工作台", + "SpookyPlatform": "阴森平台", + "ReaperHood": "死神兜帽", + "Diamond": "钻石", + "ReaperRobe": "死神长袍", + "FoxMask": "狐狸面具", + "FoxShirt": "狐狸衣", + "FoxPants": "狐狸裤", + "CatEars": "猫耳", + "BloodyMachete": "血腥砍刀", + "TheHorsemansBlade": "无头骑士剑", + "BladedGlove": "利刃手套", + "PumpkinSeed": "南瓜子", + "SpookyHook": "阴森钩", + "GlowingMushroom": "发光蘑菇", + "SpookyWings": "阴森之翼", + "SpookyTwig": "阴森嫩枝", + "SpookyHelmet": "阴森头盔", + "SpookyBreastplate": "阴森胸甲", + "SpookyLeggings": "阴森护腿", + "StakeLauncher": "尖桩发射器", + "Stake": "尖桩", + "CursedSapling": "诅咒树苗", + "SpaceCreatureMask": "太空生物面具", + "SpaceCreatureShirt": "太空生物衣", + "Star": "星星", + "SpaceCreaturePants": "太空生物裤", + "WolfMask": "狼面具", + "WolfShirt": "狼衣", + "WolfPants": "狼裤", + "PumpkinMoonMedallion": "南瓜月勋章", + "NecromanticScroll": "死灵卷轴", + "JackingSkeletron": "骷髅夜惊魂", + "BitterHarvest": "苦涩收获", + "BloodMoonCountess": "血月伯爵夫人", + "HallowsEve": "万圣节前夕", + "IvyWhip": "常春藤鞭", + "MorbidCuriosity": "病态好奇心", + "TreasureHunterShirt": "寻宝人衣", + "TreasureHunterPants": "寻宝人裤", + "DryadCoverings": "树妖遮体服", + "DryadLoincloth": "树妖腰布", + "MourningWoodTrophy": "哀木纪念章", + "PumpkingTrophy": "南瓜王纪念章", + "JackOLanternMask": "杰克南瓜灯面具", + "SniperScope": "狙击镜", + "HeartLantern": "红心灯笼", + "BreathingReed": "芦苇呼吸管", + "JellyfishDivingGear": "水母潜水装备", + "ArcticDivingGear": "北极潜水装备", + "FrostsparkBoots": "霜花靴", + "FartInABalloon": "臭屁气球", + "PapyrusScarab": "甲虫莎草纸", + "CelestialStone": "天界石", + "Hoverboard": "悬浮板", + "CandyCane": "糖棒", + "SugarPlum": "蜜糖李", + "Present": "礼物", + "Flipper": "脚蹼", + "RedRyder": "红莱德枪", + "FestiveWings": "喜庆之翼", + "PineTreeBlock": "松树块", + "ChristmasTree": "圣诞树", + "StarTopper1": "星星礼帽1", + "StarTopper2": "星星礼帽2", + "StarTopper3": "星星礼帽3", + "BowTopper": "蝴蝶结礼帽", + "WhiteGarland": "白花环", + "WhiteAndRedGarland": "白红花环", + "HealingPotion": "治疗药水", + "RedGardland": "红花环", + "RedAndGreenGardland": "红绿花环", + "GreenGardland": "绿花环", + "GreenAndWhiteGarland": "绿白花环", + "MulticoloredBulb": "五彩灯泡", + "RedBulb": "红灯泡", + "YellowBulb": "黄灯泡", + "GreenBulb": "绿灯泡", + "RedAndGreenBulb": "红绿灯泡", + "YellowAndGreenBulb": "黄绿灯泡", + "ManaPotion": "魔力药水", + "RedAndYellowBulb": "红黄灯泡", + "WhiteBulb": "白灯泡", + "WhiteAndRedBulb": "白红灯泡", + "WhiteAndYellowBulb": "白黄灯泡", + "WhiteAndGreenBulb": "白绿灯泡", + "MulticoloredLights": "五彩光", + "RedLights": "红光", + "GreenLights": "绿光", + "BlueLights": "蓝光", + "YellowLights": "黄光", + "GoldBar": "金锭", + "BladeofGrass": "草剑", + "RedAndYellowLights": "红黄光", + "RedAndGreenLights": "红绿光", + "YellowAndGreenLights": "黄绿光", + "BlueAndGreenLights": "蓝绿光", + "RedAndBlueLights": "红蓝光", + "BlueAndYellowLights": "蓝黄光", + "GiantBow": "巨型蝴蝶结", + "ReindeerAntlers": "驯鹿角", + "Holly": "冬青树", + "CandyCaneSword": "糖棒剑", + "ThornChakram": "荆棘旋刃", + "EldMelter": "精灵熔炉", + "ChristmasPudding": "圣诞布丁", + "Eggnog": "蛋酒", + "StarAnise": "星形茴香", + "ReindeerBells": "驯鹿铃铛", + "CandyCaneHook": "糖棒钩", + "ChristmasHook": "圣诞钩", + "CnadyCanePickaxe": "糖棒镐", + "FruitcakeChakram": "水果蛋糕旋刃", + "SugarCookie": "蜜糖饼干", + "ObsidianBrick": "黑曜石砖", + "GingerbreadCookie": "姜饼", + "HandWarmer": "暖手宝", + "Coal": "煤", + "Toolbox": "工具箱", + "PineDoor": "松树门", + "PineChair": "松树椅", + "PineTable": "松树桌", + "DogWhistle": "狗哨", + "ChristmasTreeSword": "圣诞树剑", + "ChainGun": "链式机枪", + "ObsidianSkull": "黑曜石骷髅头", + "Razorpine": "剃刀松", + "BlizzardStaff": "暴雪法杖", + "MrsClauseHat": "圣诞夫人帽", + "MrsClauseShirt": "圣诞夫人衣", + "MrsClauseHeels": "圣诞夫人高跟鞋", + "ParkaHood": "派克兜帽", + "ParkaCoat": "派克大衣", + "ParkaPants": "派克裤", + "SnowHat": "雪帽", + "UglySweater": "丑毛衣", + "MushroomGrassSeeds": "蘑菇草种子", + "TreeMask": "树面具", + "TreeShirt": "树衣", + "TreeTrunks": "树干", + "ElfHat": "精灵帽", + "ElfShirt": "精灵衣", + "ElfPants": "精灵裤", + "SnowmanCannon": "雪人炮", + "NorthPole": "北极", + "ChristmasTreeWallpaper": "圣诞树壁纸", + "OrnamentWallpaper": "装饰壁纸", + "JungleGrassSeeds": "丛林草种子", + "CandyCaneWallpaper": "糖棒壁纸", + "FestiveWallpaper": "节日壁纸", + "StarsWallpaper": "星星壁纸", + "SquigglesWallpaper": "波浪条纹壁纸", + "SnowflakeWallpaper": "雪花壁纸", + "KrampusHornWallpaper": "坎卜斯犄角壁纸", + "BluegreenWallpaper": "蓝绿壁纸", + "GrinchFingerWallpaper": "格林奇手指壁纸", + "NaughtyPresent": "调皮礼物", + "BabyGrinchMischiefWhistle": "格林奇宝宝的恶作剧口哨", + "WoodenHammer": "木锤", + "IceQueenTrophy": "冰雪女王纪念章", + "SantaNK1Trophy": "圣诞坦克纪念章", + "EverscreamTrophy": "常绿尖叫怪纪念章", + "MusicBoxPumpkinMoon": "八音盒(南瓜月)", + "MusicBoxAltUnderground": "八音盒(地下备选曲)", + "MusicBoxFrostMoon": "八音盒(霜月)", + "BrownPaint": "棕漆", + "ShadowPaint": "暗影漆", + "NegativePaint": "反色漆", + "TeamDye": "团队染料", + "StarCannon": "星星炮", + "AmethystGemsparkBlock": "紫晶晶莹宝石块", + "TopazGemsparkBlock": "黄玉晶莹宝石块", + "SapphireGemsparkBlock": "蓝玉晶莹宝石块", + "EmeraldGemsparkBlock": "翡翠晶莹宝石块", + "RubyGemsparkBlock": "红玉晶莹宝石块", + "DiamondGemsparkBlock": "钻石晶莹宝石块", + "AmberGemsparkBlock": "琥珀晶莹宝石块", + "LifeHairDye": "生命染发剂", + "ManaHairDye": "魔力染发剂", + "DepthHairDye": "深度染发剂", + "BluePhaseblade": "蓝陨石光剑", + "MoneyHairDye": "钱币染发剂", + "TimeHairDye": "时间染发剂", + "TeamHairDye": "团队染发剂", + "BiomeHairDye": "生物群落染发剂", + "PartyHairDye": "派对染发剂", + "RainbowHairDye": "彩虹染发剂", + "SpeedHairDye": "速度染发剂", + "AngelHalo": "天使光环", + "Fez": "菲斯帽", + "Womannquin": "女模特", + "RedPhaseblade": "红陨石光剑", + "HairDyeRemover": "染发剂清除剂", + "BugNet": "虫网", + "Firefly": "萤火虫", + "FireflyinaBottle": "萤火虫瓶", + "MonarchButterfly": "帝王蝶", + "PurpleEmperorButterfly": "紫君王蝶", + "RedAdmiralButterfly": "红纹蝶", + "UlyssesButterfly": "尤利西斯蝶", + "SulphurButterfly": "硫磺蝶", + "TreeNymphButterfly": "树若虫蝴蝶", + "DirtBlock": "土块", + "CopperBar": "铜锭", + "GreenPhaseblade": "绿陨石光剑", + "ZebraSwallowtailButterfly": "斑纹燕尾蝶", + "JuliaButterfly": "茱莉娅蝶", + "Worm": "蠕虫", + "Mouse": "老鼠", + "LightningBug": "荧光虫", + "LightningBuginaBottle": "荧光虫瓶", + "Snail": "蜗牛", + "GlowingSnail": "发光蜗牛", + "FancyGreyWallpaper": "别致灰壁纸", + "IceFloeWallpaper": "浮冰壁纸", + "PurplePhaseblade": "紫陨石光剑", + "MusicWallpaper": "音符壁纸", + "PurpleRainWallpaper": "紫雨壁纸", + "RainbowWallpaper": "彩虹壁纸", + "SparkleStoneWallpaper": "烁石壁纸", + "StarlitHeavenWallpaper": "星光天堂壁纸", + "Bird": "鸟", + "BlueJay": "冠蓝鸦", + "Cardinal": "红雀", + "Squirrel": "松鼠", + "Bunny": "兔兔", + "WhitePhaseblade": "白陨石光剑", + "YellowPhaseblade": "黄陨石光剑", + "MeteorHamaxe": "流星锤斧", + "EmptyBucket": "空桶", + "WaterBucket": "水桶", + "LavaBucket": "熔岩桶", + "JungleRose": "丛林玫瑰", + "Stinger": "毒刺", + "SilverBar": "银锭", + "Vine": "藤蔓", + "FeralClaws": "猛爪手套", + "BlacksmithRack": "铁匠架", + "CarpentryRack": "木工架", + "HelmetRack": "头盔架", + "SpearRack": "长矛架", + "SwordRack": "剑架", + "StoneSlab": "石板", + "AnkletoftheWind": "疾风脚镯", + "SandstoneSlab": "沙岩板", + "Frog": "青蛙", + "MallardDuck": "野鸭", + "Duck": "鸭", + "StaffofRegrowth": "再生法杖", + "HellstoneBrick": "狱石砖", + "WhoopieCushion": "整蛊坐垫", + "BlackScorpion": "黑蝎子", + "Scorpion": "蝎子", + "BubbleWallpaper": "泡泡壁纸", + "CopperPipeWallpaper": "铜管壁纸", + "Shackle": "脚镣", + "DuckyWallpaper": "黄鸭壁纸", + "FrostCore": "寒霜核", + "BunnyCage": "兔兔笼", + "SquirrelCage": "松鼠笼", + "MallardDuckCage": "野鸭笼", + "DuckCage": "鸭笼", + "BirdCage": "鸟笼", + "BlueJayCage": "冠蓝鸦笼", + "CardinalCage": "红雀笼", + "WaterfallWall": "瀑布墙", + "MoltenHamaxe": "熔岩锤斧", + "LavafallWall": "熔岩瀑布墙", + "CrimsonSeeds": "猩红种子", + "HeavyWorkBench": "重型工作台", + "CopperPlating": "铜镀层", + "SnailCage": "蜗牛笼", + "GlowingSnailCage": "发光蜗牛笼", + "ShroomiteDiggingClaw": "蘑菇矿挖爪", + "AmmoBox": "弹药箱", + "MonarchButterflyJar": "帝王蝶罐", + "PurpleEmperorButterflyJar": "紫君王蝶罐", + "Flamelash": "烈焰火鞭", + "RedAdmiralButterflyJar": "红纹蝶罐", + "UlyssesButterflyJar": "尤利西斯蝶罐", + "SulphurButterflyJar": "硫磺蝶罐", + "TreeNymphButterflyJar": "树若虫蝴蝶罐", + "ZebraSwallowtailButterflyJar": "斑纹燕尾蝶罐", + "JuliaButterflyJar": "茱莉娅蝶罐", + "ScorpionCage": "蝎子笼", + "BlackScorpionCage": "黑蝎子笼", + "VenomStaff": "毒液法杖", + "SpectreMask": "幽灵面具", + "PhoenixBlaster": "凤凰爆破枪", + "FrogCage": "蛙笼", + "MouseCage": "老鼠笼", + "BoneWelder": "骨头焊机", + "FleshCloningVaat": "血肉克隆台", + "GlassKiln": "玻璃窑", + "LihzahrdFurnace": "丛林蜥蜴熔炉", + "LivingLoom": "生命木织机", + "SkyMill": "天磨", + "IceMachine": "冰雪机", + "BeetleHelmet": "甲虫头盔", + "IronBar": "铁锭", + "Sunfury": "阳炎之怒", + "BeetleScaleMail": "甲虫铠甲", + "BeetleShell": "甲虫壳", + "BeetleLeggings": "甲虫护腿", + "SteampunkBoiler": "蒸汽朋克锅炉", + "HoneyDispenser": "蜂蜜分配机", + "Penguin": "企鹅", + "PenguinCage": "企鹅笼", + "WormCage": "蠕虫笼", + "Terrarium": "泰拉制笼机", + "SuperManaPotion": "超级魔力药水", + "Hellforge": "地狱熔炉", + "EbonwoodFence": "乌木栅栏", + "RichMahoganyFence": "红木栅栏", + "PearlwoodFence": "珍珠木栅栏", + "ShadewoodFence": "暗影木栅栏", + "BrickLayer": "砖层", + "ExtendoGrip": "加长握爪", + "PaintSprayer": "喷漆器", + "PortableCementMixer": "便携式水泥搅拌机", + "BeetleHusk": "甲虫外壳", + "CelestialMagnet": "天界磁石", + "ClayPot": "粘土盆", + "CelestialEmblem": "天界徽章", + "CelestialCuffs": "天界手铐", + "PeddlersHat": "商贩帽", + "PulseBow": "脉冲弓", + "NaturesGift": "大自然的恩赐", + "Bed": "床", + "Silk": "丝绸", + "DynastyTable": "王朝桌", + "LesserRestorationPotion": "弱效恢复药水", + "DynastyWood": "王朝木", + "RedDynastyShingles": "红王朝瓦", + "BlueDynastyShingles": "蓝王朝瓦", + "WhiteDynastyWall": "白王朝墙", + "BlueDynastyWall": "蓝王朝墙", + "DynastyDoor": "王朝门", + "Sake": "清酒", + "PadThai": "泰式炒面", + "Pho": "越南河粉", + "Revolver": "左轮手枪", + "RestorationPotion": "恢复药水", + "Gatligator": "鳄鱼机关枪", + "ArcaneRuneWall": "奥术神符墙", + "WaterGun": "水枪", + "Katana": "武士刀", + "UltrabrightTorch": "超亮火把", + "MagicHat": "魔法帽", + "DiamondRing": "钻石戒指", + "Gi": "稽古衣", + "Kimono": "和服", + "GypsyRobe": "吉普赛长袍", + "JungleHat": "丛林帽", + "BeetleWings": "甲虫之翼", + "TigerSkin": "虎皮", + "LeopardSkin": "豹皮", + "ZebraSkin": "斑马皮", + "CrimsonCloak": "猩红斗篷", + "MysteriousCape": "神秘披风", + "RedCape": "红披风", + "WinterCape": "冬季披风", + "WoodFishingPole": "木钓竿", + "JungleShirt": "丛林衣", + "Bass": "鲈鱼", + "ReinforcedFishingPole": "强化钓竿", + "FiberglassFishingPole": "玻璃钢钓竿", + "FisherofSouls": "灵魂钓手", + "GoldenFishingRod": "金钓竿", + "MechanicsRod": "机械师钓竿", + "SittingDucksFishingRod": "冤大头钓竿", + "Trout": "鳟鱼", + "Salmon": "三文鱼", + "AtlanticCod": "大西洋鳕鱼", + "Gel": "凝胶", + "JunglePants": "丛林裤", + "Tuna": "金枪鱼", + "RedSnapper": "红鲷鱼", + "NeonTetra": "霓虹脂鲤", + "ArmoredCavefish": "装甲洞穴鱼", + "Damselfish": "雀鲷", + "CrimsonTigerfish": "猩红虎鱼", + "FrostMinnow": "寒霜鲦鱼", + "PrincessFish": "公主鱼", + "GoldenCarp": "金鲤鱼", + "SpecularFish": "镜面鱼", + "MoltenHelmet": "熔岩头盔", + "Prismite": "七彩矿鱼", + "VariegatedLardfish": "斑驳油鱼", + "FlarefinKoi": "闪鳍锦鲤", + "DoubleCod": "双鳍鳕鱼", + "Honeyfin": "蜂蜜鱼", + "Obsidifish": "黑曜石鱼", + "Shrimp": "虾", + "ChaosFish": "混沌鱼", + "Ebonkoi": "黑檀锦鲤", + "Hemopiranha": "血腥食人鱼", + "MoltenBreastplate": "熔岩胸甲", + "Rockfish": "岩鱼锤", + "Stinkfish": "臭味鱼", + "MiningPotion": "挖矿药水", + "HeartreachPotion": "拾心药水", + "CalmingPotion": "镇静药水", + "BuilderPotion": "建筑工药水", + "TitanPotion": "泰坦药水", + "FlipperPotion": "脚蹼药水", + "SummoningPotion": "召唤药水", + "TrapsightPotion": "危险感药水", + "MoltenGreaves": "熔岩护胫", + "PurpleClubberfish": "紫挥棒鱼", + "ObsidianSwordfish": "黑曜石剑鱼", + "Swordfish": "剑鱼", + "IronFence": "铁栅栏", + "WoodenCrate": "木匣", + "IronCrate": "铁匣", + "GoldenCrate": "金匣", + "OldShoe": "旧鞋", + "FishingSeaweed": "海草", + "TinCan": "锡罐", + "MeteorShot": "流星弹", + "ReaverShark": "掠夺鲨", + "SawtoothShark": "锯齿鲨", + "Minecart": "矿车", + "AmmoReservationPotion": "弹药储备药水", + "LifeforcePotion": "生命力药水", + "EndurancePotion": "耐力药水", + "RagePotion": "暴怒药水", + "InfernoPotion": "狱火药水", + "WrathPotion": "怒气药水", + "StickyBomb": "粘性炸弹", + "RecallPotion": "回忆药水", + "TeleportationPotion": "传送药水", + "LovePotion": "爱情药水", + "StinkPotion": "臭味药水", + "FishingPotion": "钓鱼药水", + "SonarPotion": "声纳药水", + "CratePotion": "宝匣药水", + "ShiverthornSeeds": "寒颤棘种子", + "Shiverthorn": "寒颤棘", + "WarmthPotion": "保暖药水", + "BlackLens": "黑晶状体", + "FishHook": "鱼钩", + "BeeHeadgear": "蜜蜂头饰", + "BeeBreastplate": "蜜蜂胸甲", + "BeeGreaves": "蜜蜂护胫", + "HornetStaff": "黄蜂法杖", + "ImpStaff": "小鬼法杖", + "QueenSpiderStaff": "蜘蛛女王法杖", + "AnglerHat": "渔夫帽", + "AnglerVest": "渔夫背心", + "AnglerPants": "渔夫裤", + "Sunglasses": "墨镜", + "SpiderMask": "蜘蛛面具", + "SpiderBreastplate": "蜘蛛胸甲", + "SpiderGreaves": "蜘蛛护胫", + "HighTestFishingLine": "优质钓鱼线", + "AnglerEarring": "渔夫耳环", + "TackleBox": "钓具箱", + "BlueDungeonPiano": "蓝地牢钢琴", + "GreenDungeonPiano": "绿地牢钢琴", + "PinkDungeonPiano": "粉地牢钢琴", + "GoldenPiano": "金钢琴", + "WizardHat": "巫师帽", + "ObsidianPiano": "黑曜石钢琴", + "BonePiano": "骨头钢琴", + "CactusPiano": "仙人掌钢琴", + "SpookyPiano": "阴森钢琴", + "SkywarePiano": "天域钢琴", + "LihzahrdPiano": "丛林蜥蜴钢琴", + "BlueDungeonDresser": "蓝地牢梳妆台", + "GreenDungeonDresser": "绿地牢梳妆台", + "PinkDungeonDresser": "粉地牢梳妆台", + "GoldenDresser": "金梳妆台", + "TopHat": "高顶礼帽", + "ObsidianDresser": "黑曜石梳妆台", + "BoneDresser": "骨头梳妆台", + "CactusDresser": "仙人掌梳妆台", + "SpookyDresser": "阴森梳妆台", + "SkywareDresser": "天域梳妆台", + "HoneyDresser": "蜂蜜梳妆台", + "LihzahrdDresser": "丛林蜥蜴梳妆台", + "Sofa": "沙发", + "EbonwoodSofa": "乌木沙发", + "RichMahoganySofa": "红木沙发", + "WoodenSword": "木剑", + "TuxedoShirt": "西装衣", + "PearlwoodSofa": "珍珠木沙发", + "ShadewoodSofa": "暗影木沙发", + "BlueDungeonSofa": "蓝地牢沙发", + "GreenDungeonSofa": "绿地牢沙发", + "PinkDungeonSofa": "粉地牢沙发", + "GoldenSofa": "金沙发", + "ObsidianSofa": "黑曜石沙发", + "BoneSofa": "骨头沙发", + "CactusSofa": "仙人掌沙发", + "SpookySofa": "阴森沙发", + "TuxedoPants": "西装裤", + "SkywareSofa": "天域沙发", + "HoneySofa": "蜂蜜沙发", + "SteampunkSofa": "蒸汽朋克沙发", + "MushroomSofa": "蘑菇沙发", + "GlassSofa": "玻璃沙发", + "PumpkinSofa": "南瓜沙发", + "LihzahrdSofa": "丛林蜥蜴沙发", + "SeashellHairpin": "贝壳发夹", + "MermaidAdornment": "美人鱼饰品", + "MermaidTail": "美人鱼鱼尾裤", + "SummerHat": "夏日草帽", + "ZephyrFish": "和风鱼", + "Fleshcatcher": "捕肉手", + "HotlineFishingHook": "熔线钓钩", + "FrogLeg": "蛙腿", + "Anchor": "锚", + "CookedFish": "熟鱼", + "CookedShrimp": "熟虾", + "Sashimi": "生鱼片", + "BunnyHood": "兔兔兜帽", + "BeeWax": "蜂蜡", + "CopperPlatingWall": "镀铜墙", + "StoneSlabWall": "石板墙", + "Sail": "船帆", + "CoralstoneBlock": "珊瑚石块", + "BlueJellyfish": "蓝水母", + "GreenJellyfish": "绿水母", + "PinkJellyfish": "粉水母", + "BlueJellyfishJar": "蓝水母罐", + "PlumbersHat": "管道工帽", + "GreenJellyfishJar": "绿水母罐", + "PinkJellyfishJar": "粉水母罐", + "PlumbersShirt": "管道工衣", + "Batfish": "蝙蝠鱼", + "BumblebeeTuna": "大黄蜂金枪鱼", + "Catfish": "鲶鱼", + "Cloudfish": "云鱼", + "Cursedfish": "诅咒鱼", + "Dirtfish": "土鱼", + "DynamiteFish": "雷管鱼", + "EaterofPlankton": "浮游噬鱼", + "FallenStarfish": "坠落海星", + "TheFishofCthulu": "克苏鲁鱼", + "PlumbersPants": "管道工背带裤", + "Fishotron": "骷髅鱼", + "Harpyfish": "鸟妖鱼", + "Hungerfish": "饥饿鱼", + "Ichorfish": "灵液鱼", + "Jewelfish": "珠宝鱼", + "MirageFish": "幻影鱼", + "MutantFlinxfin": "突变弗林鱼", + "Pengfish": "企鹅鱼", + "Pixiefish": "妖精鱼", + "Spiderfish": "蜘蛛鱼", + "HerosHat": "英雄帽", + "TundraTrout": "苔原鳟鱼", + "UnicornFish": "独角兽鱼", + "GuideVoodooFish": "向导巫毒鱼", + "Wyverntail": "飞龙尾", + "ZombieFish": "僵尸鱼", + "AmanitaFungifin": "毒菌鱼", + "Angelfish": "天使鱼", + "BloodyManowar": "血腥战神", + "Bonefish": "骷髅鱼", + "Bunnyfish": "兔兔鱼", + "HerosShirt": "英雄衣", + "CapnTunabeard": "金枪鱼须船长", + "Clownfish": "小丑鱼", + "DemonicHellfish": "恶魔地狱鱼", + "Derpfish": "跳跳鱼", + "Fishron": "猪龙鱼", + "InfectedScabbardfish": "染病鞘鱼", + "Mudfish": "泥鱼", + "Slimefish": "史莱姆鱼", + "TropicalBarracuda": "热带梭鱼", + "KingSlimeTrophy": "史莱姆王纪念章", + "HerosPants": "英雄裤", + "ShipInABottle": "船舶瓶", + "KingSlimeMask": "史莱姆王面具", + "FinWings": "鳍翼", + "TreasureMap": "宝藏地图", + "SeaweedPlanter": "海草花盆", + "PillaginMePixels": "海贼像素画", + "FishCostumeMask": "鱼装面具", + "FishCostumeShirt": "鱼装衣", + "WoodenDoor": "木门", + "FishBowl": "鱼缸", + "FishCostumeFinskirt": "鱼装鳍裙", + "GingerBeard": "姜须", + "ArchaeologistsHat": "考古帽", + "ArchaeologistsJacket": "考古夹克", + "ArchaeologistsPants": "考古裤", + "OpticStaff": "魔眼法杖", + "BlackThread": "黑线", + "GreenThread": "绿线", + "NinjaHood": "忍者兜帽", + "NinjaShirt": "忍者衣", + "NinjaPants": "忍者裤", + "Leather": "皮革", + "StoneWall": "石墙", + "RedHat": "红帽", + "Goldfish": "金鱼", + "Robe": "长袍", + "RobotHat": "机器人帽", + "GoldCrown": "金冠", + "HellfireArrow": "狱炎箭", + "Sandgun": "沙枪", + "GuideVoodooDoll": "向导巫毒娃娃", + "DivingHelmet": "潜水头盔", + "FamiliarShirt": "便装衣", + "Acorn": "橡实", + "FamiliarPants": "便装裤", + "FamiliarWig": "便装假发", + "DemonScythe": "恶魔锄刀", + "NightsEdge": "永夜刃", + "DarkLance": "暗黑长戟", + "Coral": "珊瑚", + "Cactus": "仙人掌", + "Trident": "三叉戟", + "SilverBullet": "银子弹", + "ThrowingKnife": "投刀", + "LesserHealingPotion": "弱效治疗药水", + "Spear": "长矛", + "Blowpipe": "吹管", + "Glowstick": "荧光棒", + "Seed": "种子", + "WoodenBoomerang": "木制回旋镖", + "Aglet": "金属带扣", + "StickyGlowstick": "粘性荧光棒", + "PoisonedKnife": "毒刀", + "ObsidianSkinPotion": "黑曜石皮药水", + "RegenerationPotion": "再生药水", + "AngryTrapperBanner": "愤怒捕手旗", + "ArmoredVikingBanner": "装甲维京海盗旗", + "BlackSlimeBanner": "黑史莱姆旗", + "LifeCrystal": "生命水晶", + "SwiftnessPotion": "敏捷药水", + "BlueArmoredBonesBanner": "蓝装甲骷髅旗", + "BlueCultistArcherBanner": "蓝邪教徒弓箭手旗", + "BlueCultistCasterBanner": "蓝邪教徒法师旗", + "BlueCultistFighterBanner": "蓝邪教徒战士旗", + "BoneLeeBanner": "骷髅李小龙旗", + "ClingerBanner": "爬藤怪旗", + "CochinealBeetleBanner": "胭脂虫旗", + "CorruptPenguinBanner": "腐化企鹅旗", + "CorruptSlimeBanner": "腐化史莱姆旗", + "CorruptorBanner": "腐化者旗", + "GillsPotion": "鱼鳃药水", + "CrimslimeBanner": "猩红史莱姆旗", + "CursedSkullBanner": "诅咒骷髅头旗", + "CyanBeetleBanner": "青壳虫旗", + "DevourerBanner": "吞噬怪旗", + "DiablolistBanner": "魔教徒旗", + "DoctorBonesBanner": "骷髅博士旗", + "DungeonSlimeBanner": "地牢史莱姆旗", + "DungeonSpiritBanner": "地牢幽魂旗", + "ElfArcherBanner": "精灵弓箭手旗", + "ElfCopterBanner": "精灵直升机旗", + "IronskinPotion": "铁皮药水", + "EyezorBanner": "眼怪旗", + "FlockoBanner": "雪花怪旗", + "GhostBanner": "鬼魂旗", + "GiantBatBanner": "巨型蝙蝠旗", + "GiantCursedSkullBanner": "巨型诅咒骷髅头旗", + "GiantFlyingFoxBanner": "巨型飞狐旗", + "GingerbreadManBanner": "姜饼人旗", + "GoblinArcherBanner": "哥布林弓箭手旗", + "GreenSlimeBanner": "绿史莱姆旗", + "HeadlessHorsemanBanner": "无头骑士旗", + "ManaRegenerationPotion": "魔力再生药水", + "HellArmoredBonesBanner": "地狱装甲骷髅旗", + "HellhoundBanner": "地狱犬旗", + "HoppinJackBanner": "弹跳杰克南瓜灯旗", + "IceBatBanner": "冰雪蝙蝠旗", + "IceGolemBanner": "冰雪巨人旗", + "IceSlimeBanner": "冰雪史莱姆旗", + "IchorStickerBanner": "灵液黏黏怪旗", + "IlluminantBatBanner": "夜明蝙蝠旗", + "IlluminantSlimeBanner": "夜明史莱姆旗", + "JungleBatBanner": "丛林蝙蝠旗", + "MagicPowerPotion": "魔能药水", + "JungleSlimeBanner": "丛林史莱姆旗", + "KrampusBanner": "坎卜斯旗", + "LacBeetleBanner": "紫胶虫旗", + "LavaBatBanner": "熔岩蝙蝠旗", + "LavaSlimeBanner": "熔岩史莱姆旗", + "MartianBrainscramblerBanner": "火星扰脑怪旗", + "MartianDroneBanner": "火星飞船旗", + "MartianEngineerBanner": "火星工程师旗", + "MartianGigazapperBanner": "火星电击怪旗", + "MartianGreyGruntBanner": "火星灰咕噜兽旗", + "FeatherfallPotion": "羽落药水", + "MartianOfficerBanner": "火星军官旗", + "MartianRaygunnerBanner": "火星激光枪手旗", + "MartianScutlixGunnerBanner": "火星鳞甲怪枪手旗", + "MartianTeslaTurretBanner": "火星特斯拉炮塔旗", + "MisterStabbyBanner": "戳刺先生旗", + "MotherSlimeBanner": "史莱姆之母旗", + "NecromancerBanner": "死灵法师旗", + "NutcrackerBanner": "胡桃夹士旗", + "PaladinBanner": "圣骑士旗", + "PenguinBanner": "企鹅旗", + "SpelunkerPotion": "洞穴探险药水", + "PinkyBanner": "粉史莱姆旗", + "PoltergeistBanner": "胡闹鬼旗", + "PossessedArmorBanner": "装甲幻影魔旗", + "PresentMimicBanner": "礼物宝箱怪旗", + "PurpleSlimeBanner": "紫史莱姆旗", + "RaggedCasterBanner": "褴褛邪教徒法师旗", + "RainbowSlimeBanner": "彩虹史莱姆旗", + "RavenBanner": "乌鸦旗", + "RedSlimeBanner": "红史莱姆旗", + "RuneWizardBanner": "符文巫师旗", + "InvisibilityPotion": "隐身药水", + "RustyArmoredBonesBanner": "生锈装甲骷髅旗", + "ScarecrowBanner": "稻草人旗", + "ScutlixBanner": "鳞甲怪旗", + "SkeletonArcherBanner": "骷髅弓箭手旗", + "SkeletonCommandoBanner": "骷髅突击手旗", + "SkeletonSniperBanner": "骷髅狙击手旗", + "SlimerBanner": "恶翅史莱姆旗", + "SnatcherBanner": "抓人草旗", + "SnowBallaBanner": "巴拉雪人旗", + "SnowmanGangstaBanner": "雪人暴徒旗", + "ShinePotion": "光芒药水", + "SpikedIceSlimeBanner": "尖刺冰雪史莱姆旗", + "SpikedJungleSlimeBanner": "尖刺丛林史莱姆旗", + "SplinterlingBanner": "树精旗", + "SquidBanner": "乌贼旗", + "TacticalSkeletonBanner": "骷髅特警旗", + "TheGroomBanner": "僵尸新郎旗", + "TimBanner": "蒂姆旗", + "UndeadMinerBanner": "不死矿工旗", + "UndeadVikingBanner": "亡灵维京海盗旗", + "WhiteCultistArcherBanner": "白邪教徒弓箭手旗", + "NightOwlPotion": "夜猫子药水", + "WhiteCultistCasterBanner": "白邪教徒法师旗", + "WhiteCultistFighterBanner": "白邪教徒战士旗", + "YellowSlimeBanner": "黄史莱姆旗", + "YetiBanner": "雪兽旗", + "ZombieElfBanner": "僵尸精灵旗", + "StoneBlock": "石块", + "DirtWall": "土墙", + "BattlePotion": "战斗药水", + "ThornsPotion": "荆棘药水", + "WaterWalkingPotion": "水上漂药水", + "ArcheryPotion": "箭术药水", + "HunterPotion": "狩猎药水", + "GravitationPotion": "重力药水", + "GoldChest": "金箱", + "DaybloomSeeds": "太阳花种子", + "MoonglowSeeds": "月光草种子", + "BlinkrootSeeds": "闪耀根种子", + "Bottle": "玻璃瓶", + "DeathweedSeeds": "死亡草种子", + "WaterleafSeeds": "幌菊种子", + "FireblossomSeeds": "火焰花种子", + "Daybloom": "太阳花", + "Moonglow": "月光草", + "Blinkroot": "闪耀根", + "Deathweed": "死亡草", + "Waterleaf": "幌菊", + "Fireblossom": "火焰花", + "SharkFin": "鲨鱼鳍", + "WoodenTable": "木桌", + "Feather": "羽毛", + "Tombstone": "墓石", + "MimeMask": "丑角面具", + "AntlionMandible": "蚁狮上颚", + "IllegalGunParts": "非法枪械部件", + "TheDoctorsShirt": "博士衣", + "TheDoctorsPants": "博士裤", + "GoldenKey": "金钥匙", + "ShadowChest": "暗影箱", + "ShadowKey": "暗影钥匙", + "Furnace": "熔炉", + "ObsidianBrickWall": "黑曜石砖墙", + "JungleSpores": "丛林孢子", + "Loom": "织布机", + "Piano": "钢琴", + "Dresser": "梳妆台", + "Bench": "长椅", + "Bathtub": "浴缸", + "RedBanner": "红旗", + "GreenBanner": "绿旗", + "BlueBanner": "蓝旗", + "WoodenChair": "木椅", + "YellowBanner": "黄旗", + "LampPost": "灯柱", + "TikiTorch": "提基火把", + "Barrel": "桶", + "ChineseLantern": "中式灯笼", + "CookingPot": "烹饪锅", + "Safe": "保险箱", + "SkullLantern": "骷髅头灯笼", + "TrashCan": "垃圾桶", + "PlatinumBow": "铂金弓", + "PlatinumHammer": "铂金锤", + "PlatinumAxe": "铂金斧", + "PlatinumShortsword": "铂金短剑", + "PlatinumBroadsword": "铂金宽剑", + "PlatinumPickaxe": "铂金镐", + "TungstenBow": "钨弓", + "TungstenHammer": "钨锤", + "TungstenAxe": "钨斧", + "TungstenShortsword": "钨短剑", + "Candelabra": "烛台", + "TungstenBroadsword": "钨宽剑", + "TungstenPickaxe": "钨镐", + "LeadBow": "铅弓", + "LeadHammer": "铅锤", + "LeadAxe": "铅斧", + "LeadShortsword": "铅短剑", + "LeadBroadsword": "铅宽剑", + "LeadPickaxe": "铅镐", + "TinBow": "锡弓", + "TinHammer": "锡锤", + "IronAnvil": "铁砧", + "PinkVase": "粉花瓶", + "TinAxe": "锡斧", + "TinShortsword": "锡短剑", + "TinBroadsword": "锡宽剑", + "TinPickaxe": "锡镐", + "CopperBow": "铜弓", + "CopperHammer": "铜锤", + "CopperAxe": "铜斧", + "CopperShortsword": "铜短剑", + "CopperBroadsword": "铜阔剑", + "CopperPickaxe": "铜镐", + "Mug": "玻璃杯", + "SilverBow": "银弓", + "SilverHammer": "银锤", + "SilverAxe": "银斧", + "SilverShortsword": "银短剑", + "SilverBroadsword": "银阔剑", + "SilverPickaxe": "银镐", + "GoldBow": "金弓", + "GoldHammer": "金锤", + "GoldAxe": "金斧", + "GoldShortsword": "金短剑", + "Keg": "酒桶", + "GoldBroadsword": "金阔剑", + "GoldPickaxe": "金镐", + "Ale": "麦芽酒", + "Bookcase": "书架", + "Throne": "王座", + "Bowl": "碗", + "BowlofSoup": "鱼菇汤", + "Toilet": "马桶", + "GrandfatherClock": "落地大摆钟", + "WorkBench": "工作台", + "ArmorStatue": "盔甲雕像", + "GoblinBattleStandard": "哥布林战旗", + "TatteredCloth": "破布", + "Sawmill": "锯木机", + "CobaltOre": "钴矿", + "MythrilOre": "秘银矿", + "AdamantiteOre": "精金矿", + "Pwnhammer": "神锤", + "Excalibur": "断钢剑", + "HallowedSeeds": "圣种", + "Goggles": "护目镜", + "EbonsandBlock": "黑檀沙块", + "CobaltHat": "钴帽", + "CobaltHelmet": "钴头盔", + "CobaltMask": "钴面具", + "CobaltBreastplate": "钴胸甲", + "CobaltLeggings": "钴护腿", + "MythrilHood": "秘银兜帽", + "MythrilHelmet": "秘银头盔", + "MythrilHat": "秘银帽", + "MythrilChainmail": "秘银链甲", + "Lens": "晶状体", + "MythrilGreaves": "秘银护胫", + "CobaltBar": "钴锭", + "MythrilBar": "秘银锭", + "CobaltChainsaw": "钴链锯", + "MythrilChainsaw": "秘银链锯", + "CobaltDrill": "钴钻头", + "MythrilDrill": "秘银钻头", + "AdamantiteChainsaw": "精金链锯", + "AdamantiteDrill": "精金钻头", + "DaoofPow": "太极连枷", + "WoodenBow": "木弓", + "MythrilHalberd": "秘银长戟", + "AdamantiteBar": "精金锭", + "GlassWall": "玻璃墙", + "Compass": "罗盘", + "DivingGear": "潜水装备", + "GPS": "全球定位系统", + "ObsidianHorseshoe": "黑曜石马掌", + "ObsidianShield": "黑曜石护盾", + "TinkerersWorkshop": "工匠作坊", + "CloudinaBalloon": "云朵气球", + "IronBroadsword": "铁阔剑", + "WoodenArrow": "木箭", + "AdamantiteHeadgear": "精金头饰", + "AdamantiteHelmet": "精金头盔", + "AdamantiteMask": "精金面具", + "AdamantiteBreastplate": "精金胸甲", + "AdamantiteLeggings": "精金护腿", + "SpectreBoots": "幽灵靴", + "AdamantiteGlaive": "精金关刀", + "Toolbelt": "工具腰带", + "PearlsandBlock": "珍珠沙块", + "PearlstoneBlock": "珍珠石块", + "FlamingArrow": "烈焰箭", + "MiningShirt": "挖矿衣", + "MiningPants": "挖矿裤", + "PearlstoneBrick": "珍珠石砖", + "IridescentBrick": "荧光砖", + "MudstoneBlock": "泥石砖", + "CobaltBrick": "钴砖", + "MythrilBrick": "秘银砖", + "PearlstoneBrickWall": "珍珠石砖墙", + "IridescentBrickWall": "荧光砖墙", + "MudstoneBrickWall": "泥石砖墙", + "Shuriken": "手里剑", + "CobaltBrickWall": "钴砖墙", + "MythrilBrickWall": "秘银砖墙", + "HolyWater": "圣水", + "UnholyWater": "邪水", + "SiltBlock": "泥沙块", + "FairyBell": "仙灵铃铛", + "BreakerBlade": "毁灭刃", + "BlueTorch": "蓝火把", + "RedTorch": "红火把", + "GreenTorch": "绿火把", + "SuspiciousLookingEye": "可疑眼球", + "PurpleTorch": "紫火把", + "WhiteTorch": "白火把", + "YellowTorch": "黄火把", + "DemonTorch": "恶魔火把", + "ClockworkAssaultRifle": "发条式突击步枪", + "CobaltRepeater": "钴连弩", + "MythrilRepeater": "秘银连弩", + "DualHook": "双钩", + "StarStatue": "星星雕像", + "SwordStatue": "宝剑雕像", + "DemonBow": "恶魔弓", + "SlimeStatue": "史莱姆雕像", + "GoblinStatue": "哥布林雕像", + "ShieldStatue": "护盾雕像", + "BatStatue": "蝙蝠雕像", + "FishStatue": "金鱼雕像", + "BunnyStatue": "兔兔雕像", + "SkeletonStatue": "骷髅雕像", + "ReaperStatue": "死神雕像", + "WomanStatue": "女人雕像", + "ImpStatue": "小鬼雕像", + "WarAxeoftheNight": "暗夜战斧", + "GargoyleStatue": "石像鬼雕像", + "GloomStatue": "幽冥雕像", + "HornetStatue": "黄蜂雕像", + "BombStatue": "炸弹雕像", + "CrabStatue": "螃蟹雕像", + "HammerStatue": "战锤雕像", + "PotionStatue": "药水雕像", + "SpearStatue": "长矛雕像", + "CrossStatue": "十字架雕像", + "JellyfishStatue": "水母雕像", + "LightsBane": "魔光剑", + "BowStatue": "弓雕像", + "BoomerangStatue": "回旋镖雕像", + "BootStatue": "靴子雕像", + "ChestStatue": "宝箱雕像", + "BirdStatue": "小鸟雕像", + "AxeStatue": "战斧雕像", + "CorruptStatue": "腐化雕像", + "TreeStatue": "树木雕像", + "AnvilStatue": "砧雕像", + "PickaxeStatue": "镐雕像", + "UnholyArrow": "邪箭", + "MushroomStatue": "蘑菇雕像", + "EyeballStatue": "魔眼雕像", + "PillarStatue": "石柱雕像", + "HeartStatue": "心形雕像", + "PotStatue": "陶罐雕像", + "SunflowerStatue": "向日葵雕像", + "KingStatue": "国王雕像", + "QueenStatue": "女王雕像", + "PiranhaStatue": "食人鱼雕像", + "PlankedWall": "板条墙", + "Chest": "宝箱", + "WoodenBeam": "木梁", + "AdamantiteRepeater": "精金连弩", + "AdamantiteSword": "精金剑", + "CobaltSword": "钴剑", + "MythrilSword": "秘银剑", + "MoonCharm": "月光护身符", + "Ruler": "标尺", + "CrystalBall": "水晶球", + "DiscoBall": "迪斯科球", + "SorcererEmblem": "巫士徽章", + "BandofRegeneration": "再生手环", + "WarriorEmblem": "战士徽章", + "RangerEmblem": "游侠徽章", + "DemonWings": "恶魔之翼", + "AngelWings": "天使之翼", + "MagicalHarp": "魔法竖琴", + "RainbowRod": "彩虹魔杖", + "IceRod": "冰雪魔杖", + "NeptunesShell": "海神贝壳", + "Mannequin": "人体模型", + "GreaterHealingPotion": "强效治疗药水", + "Mushroom": "蘑菇", + "MagicMirror": "魔镜", + "GreaterManaPotion": "强效魔力药水", + "PixieDust": "妖精尘", + "CrystalShard": "水晶碎块", + "ClownHat": "小丑帽", + "ClownShirt": "小丑衣", + "ClownPants": "小丑裤", + "Flamethrower": "火焰喷射器", + "Bell": "铃铛", + "Harp": "竖琴", + "Wrench": "红扳手", + "JestersArrow": "小丑之箭", + "WireCutter": "钢丝钳", + "ActiveStoneBlock": "通电石块", + "InactiveStoneBlock": "未通电石块", + "Lever": "控制杆", + "LaserRifle": "激光步枪", + "CrystalBullet": "水晶子弹", + "HolyArrow": "圣箭", + "MagicDagger": "魔法飞刀", + "CrystalStorm": "水晶风暴", + "CursedFlames": "诅咒焰", + "AngelStatue": "天使雕像", + "SoulofLight": "光明之魂", + "SoulofNight": "暗影之魂", + "CursedFlame": "诅咒焰", + "CursedTorch": "诅咒火把", + "AdamantiteForge": "精金熔炉", + "MythrilAnvil": "秘银砧", + "UnicornHorn": "独角兽角", + "DarkShard": "暗黑碎块", + "LightShard": "光明碎块", + "RedPressurePlate": "红压力板", + "CloudinaBottle": "云朵瓶", + "Wire": "电线", + "SpellTome": "魔法书", + "StarCloak": "星星斗篷", + "Megashark": "巨兽鲨", + "Shotgun": "霰弹枪", + "PhilosophersStone": "点金石", + "TitanGlove": "泰坦手套", + "CobaltNaginata": "钴剃刀", + "Switch": "开关", + "DartTrap": "飞镖机关", + "HermesBoots": "赫尔墨斯靴", + "Boulder": "巨石", + "GreenPressurePlate": "绿压力板", + "GrayPressurePlate": "灰压力板", + "BrownPressurePlate": "棕压力板", + "MechanicalEye": "机械魔眼", + "CursedArrow": "诅咒箭", + "CursedBullet": "诅咒弹", + "SoulofFright": "恐惧之魂", + "SoulofMight": "力量之魂", + "SoulofSight": "视域之魂", + "EnchantedBoomerang": "附魔回旋镖", + "Gungnir": "永恒之枪", + "HallowedPlateMail": "神圣板甲", + "HallowedGreaves": "神圣护胫", + "HallowedHelmet": "神圣头盔", + "CrossNecklace": "十字项链", + "ManaFlower": "魔力花", + "MechanicalWorm": "机械蠕虫", + "MechanicalSkull": "机械骷髅头", + "HallowedHeadgear": "神圣头饰", + "HallowedMask": "神圣面具", + "DemoniteOre": "魔矿", + "SlimeCrown": "史莱姆王冠", + "LightDisc": "光辉飞盘", + "MusicBoxOverworldDay": "八音盒(人间日)", + "MusicBoxEerie": "八音盒(恐惧)", + "MusicBoxNight": "八音盒(暗夜)", + "MusicBoxTitle": "八音盒(标题)", + "MusicBoxUnderground": "八音盒(地下)", + "MusicBoxBoss1": "八音盒(Boss 1)", + "MusicBoxJungle": "八音盒(丛林)", + "MusicBoxCorruption": "八音盒(腐化之地)", + "DemoniteBar": "魔矿锭", + "MusicBoxUndergroundCorruption": "八音盒(地下腐化之地)", + "MusicBoxTheHallow": "八音盒(神圣之地)", + "MusicBoxBoss2": "八音盒(Boss 2(", + "MusicBoxUndergroundHallow": "八音盒(地下神圣之地)", + "MusicBoxBoss3": "八音盒(Boss 3)", + "SoulofFlight": "飞翔之魂", + "MusicBox": "八音盒", + "DemoniteBrick": "魔矿砖", + "HallowedRepeater": "神圣连弩", + "Drax": "斧钻", + "Heart": "心", + "Explosives": "炸药", + "InletPump": "入水泵", + "OutletPump": "出水泵", + "Timer1Second": "1秒计时器", + "Timer3Second": "3秒计时器", + "Timer5Second": "5秒计时器", + "CandyCaneBlock": "糖棒块", + "CandyCaneWall": "糖棒墙", + "SantaHat": "圣诞帽", + "SantaShirt": "圣诞衣", + "CorruptSeeds": "腐化种子", + "SantaPants": "圣诞裤", + "GreenCandyCaneBlock": "绿糖棒块", + "GreenCandyCaneWall": "绿糖棒墙", + "SnowBlock": "雪块", + "SnowBrick": "雪砖", + "SnowBrickWall": "雪砖墙", + "BlueLight": "蓝灯", + "RedLight": "红灯", + "GreenLight": "绿灯", + "BluePresent": "蓝礼物", + "IronShortsword": "铁短剑", + "VileMushroom": "魔菇", + "GreenPresent": "绿礼物", + "YellowPresent": "黄礼物", + "SnowGlobe": "水晶雪球", + "Carrot": "胡萝卜", + "AdamantiteBeam": "精金梁", + "AdamantiteBeamWall": "精金梁墙", + "DemoniteBrickWall": "魔矿砖墙", + "SandstoneBrick": "沙岩砖", + "SandstoneBrickWall": "沙岩砖墙", + "EbonstoneBrick": "黑檀石砖", + "EbonstoneBlock": "黑檀石块", + "EbonstoneBrickWall": "黑檀石砖墙", + "RedStucco": "红泥灰", + "YellowStucco": "黄泥灰", + "GreenStucco": "绿泥灰", + "GrayStucco": "灰泥灰", + "RedStuccoWall": "红泥灰墙", + "YellowStuccoWall": "黄泥灰墙", + "GreenStuccoWall": "绿泥灰墙", + "GrayStuccoWall": "灰泥灰墙", + "Ebonwood": "乌木", + "GrassSeeds": "草种子", + "RichMahogany": "红木", + "Pearlwood": "珍珠木", + "EbonwoodWall": "乌木墙", + "RichMahoganyWall": "红木墙", + "PearlwoodWall": "珍珠木墙", + "EbonwoodChest": "乌木箱", + "RichMahoganyChest": "红木箱", + "PearlwoodChest": "珍珠木箱", + "EbonwoodChair": "乌木椅", + "RichMahoganyChair": "红木椅", + "Sunflower": "向日葵", + "PearlwoodChair": "珍珠木椅", + "EbonwoodPlatform": "乌木平台", + "RichMahoganyPlatform": "红木平台", + "PearlwoodPlatform": "珍珠木平台", + "BonePlatform": "骨头平台", + "EbonwoodWorkBench": "乌木工作台", + "RichMahoganyWorkBench": "红木工作台", + "PearlwoodWorkBench": "珍珠木工作台", + "EbonwoodTable": "乌木桌", + "RichMahoganyTable": "红木桌", + "Vilethorn": "魔刺", + "PearlwoodTable": "珍珠木桌", + "EbonwoodPiano": "乌木钢琴", + "RichMahoganyPiano": "红木钢琴", + "PearlwoodPiano": "珍珠木钢琴", + "EbonwoodBed": "乌木床", + "RichMahoganyBed": "红木床", + "PearlwoodBed": "珍珠木床", + "EbonwoodDresser": "乌木梳妆台", + "RichMahoganyDresser": "红木梳妆台", + "PearlwoodDresser": "珍珠木梳妆台", + "Starfury": "星怒", + "EbonwoodDoor": "乌木门", + "RichMahoganyDoor": "红木门", + "PearlwoodDoor": "珍珠木门", + "EbonwoodSword": "乌木剑", + "EbonwoodHammer": "乌木锤", + "EbonwoodBow": "乌木弓", + "RichMahoganySword": "红木剑", + "RichMahoganyHammer": "红木锤", + "RichMahoganyBow": "红木弓", + "PearlwoodSword": "珍珠木剑", + "PurificationPowder": "净化粉", + "PearlwoodHammer": "珍珠木锤", + "PearlwoodBow": "珍珠木弓", + "RainbowBrick": "彩虹砖", + "RainbowBrickWall": "彩虹砖墙", + "IceBlock": "冰雪块", + "RedsWings": "Red的翅膀", + "RedsHelmet": "Red的头盔", + "RedsBreastplate": "Red的胸甲", + "RedsLeggings": "Red的护腿", + "Fish": "鱼", + "VilePowder": "魔粉", + "IceBoomerang": "冰雪回旋镖", + "Keybrand": "钥匙剑", + "Cutlass": "短弯刀", + "TrueExcalibur": "原版断钢剑", + "TrueNightsEdge": "原版永夜刃", + "Frostbrand": "霜印剑", + "RedPotion": "红药水", + "TacticalShotgun": "战术霰弹枪", + "RottenChunk": "腐肉", + "IvyChest": "常春藤箱", + "IceChest": "冰雪箱", + "Marrow": "骸骨弓", + "UnholyTrident": "邪恶三叉戟", + "FrostHelmet": "寒霜头盔", + "FrostBreastplate": "寒霜胸甲", + "FrostLeggings": "寒霜护腿", + "TinHelmet": "锡头盔", + "TinChainmail": "锡链甲", + "TinGreaves": "锡护胫", + "WormTooth": "蠕虫毒牙", + "LeadHelmet": "铅头盔", + "LeadChainmail": "铅链甲", + "LeadGreaves": "铅护胫", + "TungstenHelmet": "钨头盔", + "TungstenChainmail": "钨链甲", + "TungstenGreaves": "钨护胫", + "PlatinumHelmet": "铂金头盔", + "PlatinumChainmail": "铂金链甲", + "PlatinumGreaves": "铂金护胫", + "TinOre": "锡矿", + "IronHammer": "铁锤", + "WormFood": "蠕虫诱饵", + "LeadOre": "铅矿", + "TungstenOre": "钨矿", + "PlatinumOre": "铂金矿", + "TinBar": "锡锭", + "LeadBar": "铅锭", + "TungstenBar": "钨锭", + "PlatinumBar": "铂金锭", + "TinWatch": "锡表", + "TungstenWatch": "钨表", + "PlatinumWatch": "铂金表", + "CopperCoin": "铜币", + "TinChandelier": "锡吊灯", + "TungstenChandelier": "钨吊灯", + "PlatinumChandelier": "铂金吊灯", + "PlatinumCandle": "铂金蜡烛", + "PlatinumCandelabra": "铂金烛台", + "PlatinumCrown": "铂金冠", + "LeadAnvil": "铅砧", + "TinBrick": "锡砖", + "TungstenBrick": "钨砖", + "PlatinumBrick": "铂金砖", + "SilverCoin": "银币", + "TinBrickWall": "锡砖墙", + "TungstenBrickWall": "钨砖墙", + "PlatinumBrickWall": "铂金砖墙", + "BeamSword": "光束剑", + "IceBlade": "冰雪刃", + "IceBow": "冰雪弓", + "FrostStaff": "寒霜法杖", + "WoodHelmet": "木头盔", + "WoodBreastplate": "木胸甲", + "WoodGreaves": "木护胫", + "GoldCoin": "金币", + "EbonwoodHelmet": "乌木头盔", + "EbonwoodBreastplate": "乌木胸甲", + "EbonwoodGreaves": "乌木护胫", + "RichMahoganyHelmet": "红木头盔", + "RichMahoganyBreastplate": "红木胸甲", + "RichMahoganyGreaves": "红木护胫", + "PearlwoodHelmet": "珍珠木头盔", + "PearlwoodBreastplate": "珍珠木胸甲", + "PearlwoodGreaves": "珍珠木护胫", + "AmethystStaff": "紫晶法杖", + "PlatinumCoin": "铂金币", + "TopazStaff": "黄玉法杖", + "SapphireStaff": "蓝玉法杖", + "EmeraldStaff": "翡翠法杖", + "RubyStaff": "红玉法杖", + "DiamondStaff": "钻石法杖", + "GrassWall": "草墙", + "JungleWall": "丛林墙", + "FlowerWall": "花墙", + "Jetpack": "喷气背包", + "ButterflyWings": "蝴蝶之翼", + "FallenStar": "坠落之星", + "CactusWall": "仙人掌墙", + "Cloud": "云", + "CloudWall": "云墙", + "Seaweed": "海草", + "RuneHat": "符文帽", + "RuneRobe": "符文长袍", + "MushroomSpear": "蘑菇长矛", + "TerraBlade": "泰拉刃", + "GrenadeLauncher": "手榴弹发射器", + "RocketLauncher": "火箭发射器", + "CopperGreaves": "铜护胫", + "ProximityMineLauncher": "感应雷发射器", + "FairyWings": "仙灵之翼", + "SlimeBlock": "史莱姆块", + "FleshBlock": "血肉块", + "MushroomWall": "蘑菇墙", + "RainCloud": "雨云", + "BoneBlock": "骨块", + "FrozenSlimeBlock": "冰冻史莱姆块", + "BoneBlockWall": "骨块墙", + "SlimeBlockWall": "史莱姆块墙", + "IronGreaves": "铁护胫", + "FleshBlockWall": "血肉块墙", + "RocketI": "初级火箭", + "RocketII": "二级火箭", + "RocketIII": "三级火箭", + "RocketIV": "四级火箭", + "AsphaltBlock": "沥青块", + "CobaltPickaxe": "钴镐", + "MythrilPickaxe": "秘银镐", + "AdamantitePickaxe": "精金镐", + "Clentaminator": "环境改造枪", + "SilverGreaves": "银护胫", + "GreenSolution": "绿溶液", + "BlueSolution": "蓝溶液", + "PurpleSolution": "紫溶液", + "DarkBlueSolution": "深蓝溶液", + "RedSolution": "红溶液", + "HarpyWings": "鸟妖之翼", + "BoneWings": "骨之翼", + "Hammush": "蘑菇锤", + "NettleBurst": "爆裂藤蔓", + "AnkhBanner": "十字章旗", + "GoldGreaves": "金护胫", + "SnakeBanner": "蛇旗", + "OmegaBanner": "欧米茄旗", + "CrimsonHelmet": "猩红头盔", + "CrimsonScalemail": "猩红鳞甲", + "CrimsonGreaves": "猩红护胫", + "BloodButcherer": "血腥屠刀", + "TendonBow": "肌腱弓", + "FleshGrinder": "血肉锤", + "DeathbringerPickaxe": "死亡使者镐", + "BloodLustCluster": "嗜血狂斧", + "Torch": "火把", + "CopperChainmail": "铜链甲", + "TheUndertaker": "夺命枪", + "TheMeatball": "血肉之球", + "TheRottedFork": "腐叉", + "EskimoHood": "爱斯基摩兜帽", + "EskimoCoat": "爱斯基摩大衣", + "EskimoPants": "爱斯基摩裤", + "LivingWoodChair": "生命木椅", + "CactusChair": "仙人掌椅", + "BoneChair": "骨头椅", + "FleshChair": "血肉椅", + "IronChainmail": "铁链甲", + "MushroomChair": "蘑菇椅", + "BoneWorkBench": "骨头工作台", + "CactusWorkBench": "仙人掌工作台", + "FleshWorkBench": "血肉工作台", + "MushroomWorkBench": "蘑菇工作台", + "SlimeWorkBench": "史莱姆工作台", + "CactusDoor": "仙人掌门", + "FleshDoor": "血肉门", + "MushroomDoor": "蘑菇门", + "LivingWoodDoor": "生命木门", + "SilverChainmail": "银链甲", + "BoneDoor": "骨头门", + "FlameWings": "烈焰之翼", + "FrozenWings": "冰冻之翼", + "GhostWings": "幽灵之翼", + "SunplateBlock": "日盘块", + "DiscWall": "飞盘墙", + "SkywareChair": "天域椅", + "BoneTable": "骨头桌", + "FleshTable": "血肉桌", + "LivingWoodTable": "生命木桌", + "GoldChainmail": "金链甲", + "SkywareTable": "天域桌", + "LivingWoodChest": "生命木箱", + "LivingWoodWand": "生命木魔棒", + "PurpleIceBlock": "紫冰雪块", + "PinkIceBlock": "粉冰雪块", + "RedIceBlock": "红冰雪块", + "CrimstoneBlock": "猩红石块", + "SkywareDoor": "天域门", + "SkywareChest": "天域箱", + "SteampunkHat": "蒸汽朋克帽", + "GrapplingHook": "抓钩", + "SteampunkShirt": "蒸汽朋克衣", + "SteampunkPants": "蒸汽朋克裤", + "BeeHat": "蜜蜂帽", + "BeeShirt": "蜜蜂衣", + "BeePants": "蜜蜂裤", + "WorldBanner": "世界旗", + "SunBanner": "太阳旗", + "GravityBanner": "重力旗", + "PharaohsMask": "法老面具", + "Actuator": "制动器", + "Chain": "链条", + "BlueWrench": "蓝扳手", + "GreenWrench": "绿扳手", + "BluePressurePlate": "蓝压力板", + "YellowPressurePlate": "黄压力板", + "DiscountCard": "优惠卡", + "LuckyCoin": "幸运币", + "UnicornonaStick": "棒棒独角兽", + "SandstorminaBottle": "沙暴瓶", + "BeachBall": "沙滩球", + "ShadowScale": "暗影鳞片", + "CharmofMyths": "神话护身符", + "MoonShell": "月亮贝壳", + "StarVeil": "星星面纱", + "WaterWalkingBoots": "水上漂靴", + "Tiara": "头冠", + "PrincessDress": "公主裙", + "PharaohsRobe": "法老长袍", + "GreenCap": "绿帽", + "MushroomCap": "蘑菇帽", + "TamOShanter": "苏格兰便帽", + "PiggyBank": "猪猪存钱罐", + "MummyMask": "木乃伊面具", + "MummyShirt": "木乃伊衣", + "MummyPants": "木乃伊裤", + "CowboyHat": "牛仔帽", + "CowboyJacket": "牛仔夹克", + "CowboyPants": "牛仔裤", + "PirateHat": "海盗帽", + "PirateShirt": "海盗衣", + "PiratePants": "海盗裤", + "VikingHelmet": "维京海盗头盔", + "MiningHelmet": "挖矿头盔", + "CrimtaneOre": "猩红矿", + "CactusSword": "仙人掌剑", + "CactusPickaxe": "仙人掌镐", + "IceBrick": "冰雪砖", + "IceBrickWall": "冰雪砖墙", + "AdhesiveBandage": "粘性绷带", + "ArmorPolish": "盔甲抛光剂", + "Bezoar": "牛黄", + "Blindfold": "蒙眼布", + "FastClock": "快走时钟", + "CopperHelmet": "铜头盔", + "Megaphone": "扩音器", + "Nazar": "邪眼", + "Vitamins": "维生素", + "TrifoldMap": "三折地图", + "CactusHelmet": "仙人掌头盔", + "CactusBreastplate": "仙人掌胸甲", + "CactusLeggings": "仙人掌护腿", + "PowerGlove": "强力手套", + "LightningBoots": "闪电靴", + "SunStone": "太阳石", + "Wood": "木材", + "IronHelmet": "铁头盔", + "MoonStone": "月亮石", + "ArmorBracing": "盔甲背带", + "MedicatedBandage": "药用绷带", + "ThePlan": "计划书", + "CountercurseMantra": "反诅咒咒语", + "CoinGun": "钱币枪", + "LavaCharm": "熔岩护身符", + "ObsidianWaterWalkingBoots": "黑曜石水上漂靴", + "LavaWaders": "熔岩靴", + "PureWaterFountain": "纯净喷泉", + "SilverHelmet": "银头盔", + "DesertWaterFountain": "沙漠喷泉", + "Shadewood": "暗影木", + "ShadewoodDoor": "暗影木门", + "ShadewoodPlatform": "暗影木平台", + "ShadewoodChest": "暗影木箱", + "ShadewoodChair": "暗影木椅", + "ShadewoodWorkBench": "暗影木工作台", + "ShadewoodTable": "暗影木桌", + "ShadewoodDresser": "暗影木梳妆台", + "ShadewoodPiano": "暗影木钢琴", + "GoldHelmet": "金头盔", + "ShadewoodBed": "暗影木床", + "ShadewoodSword": "暗影木剑", + "ShadewoodHammer": "暗影木锤", + "ShadewoodBow": "暗影木弓", + "ShadewoodHelmet": "暗影木头盔", + "ShadewoodBreastplate": "暗影木胸甲", + "ShadewoodGreaves": "暗影木护胫", + "ShadewoodWall": "暗影木墙", + "Cannon": "大炮", + "Cannonball": "炮弹", + "WoodWall": "木墙", + "FlareGun": "信号枪", + "Flare": "照明弹", + "BoneWand": "白骨魔棒", + "LeafWand": "树叶魔棒", + "FlyingCarpet": "飞毯", + "AvengerEmblem": "复仇者徽章", + "MechanicalGlove": "机械手套", + "LandMine": "地雷", + "PaladinsShield": "圣骑士护盾", + "WebSlinger": "蛛丝吊索", + "WoodPlatform": "木平台", + "JungleWaterFountain": "丛林喷泉", + "IcyWaterFountain": "冰雪喷泉", + "CorruptWaterFountain": "腐化喷泉", + "CrimsonWaterFountain": "猩红喷泉", + "HallowedWaterFountain": "神圣喷泉", + "BloodWaterFountain": "血水喷泉", + "Umbrella": "伞", + "ChlorophyteOre": "叶绿矿", + "SteampunkWings": "蒸汽朋克之翼", + "Snowball": "雪球", + "FlintlockPistol": "燧发枪", + "IceSkates": "溜冰鞋", + "SnowballLauncher": "雪球发射器", + "WebCoveredChest": "蛛丝箱", + "ClimbingClaws": "攀爬爪", + "AncientIronHelmet": "远古铁头盔", + "AncientGoldHelmet": "远古金头盔", + "AncientShadowHelmet": "远古暗影头盔", + "AncientShadowScalemail": "远古暗影鳞甲", + "AncientShadowGreaves": "远古暗影护胫", + "AncientNecroHelmet": "远古死灵头盔", + "Musket": "火枪", + "AncientCobaltHelmet": "远古钴头盔", + "AncientCobaltBreastplate": "远古钴胸甲", + "AncientCobaltLeggings": "远古钴护腿", + "BlackBelt": "黑腰带", + "Boomstick": "三发猎枪", + "Rope": "绳", + "Campfire": "篝火", + "Marshmallow": "棉花糖", + "MarshmallowonaStick": "棒棒棉花糖", + "CookedMarshmallow": "熟棉花糖", + "MusketBall": "火枪子弹", + "RedRocket": "红火箭", + "GreenRocket": "绿火箭", + "BlueRocket": "蓝火箭", + "YellowRocket": "黄火箭", + "IceTorch": "冰雪火把", + "ShoeSpikes": "鞋钉", + "TigerClimbingGear": "猛虎攀爬装备", + "Tabi": "分趾厚底袜", + "PinkEskimoHood": "粉爱斯基摩兜帽", + "PinkEskimoCoat": "粉爱斯基摩大衣", + "Minishark": "迷你鲨", + "PinkEskimoPants": "粉爱斯基摩裤", + "PinkThread": "粉线", + "ManaRegenerationBand": "魔力再生手环", + "SandstorminaBalloon": "沙暴气球", + "MasterNinjaGear": "忍者大师装备", + "RopeCoil": "绳圈", + "Blowgun": "吹箭筒", + "BlizzardinaBottle": "暴雪瓶", + "FrostburnArrow": "霜冻箭", + "EnchantedSword": "附魔剑", + "IronBow": "铁弓", + "PickaxeAxe": "镐斧", + "CobaltWaraxe": "钴战斧", + "MythrilWaraxe": "秘银战斧", + "AdamantiteWaraxe": "精金战斧", + "EatersBone": "吞噬怪骨头", + "BlendOMatic": "搅拌机", + "MeatGrinder": "绞肉机", + "Extractinator": "提炼机", + "Solidifier": "固化机", + "Amber": "琥珀", + "AcidDye": "酸性染料", + "ActuationAccessory": "自动安放器", + "ActuationRod": "制动魔杖", + "AlchemyTable": "炼药桌", + "AlphabetStatue0": "0字雕像", + "AlphabetStatue1": "1字雕像", + "AlphabetStatue2": "2字雕像", + "AlphabetStatue3": "3字雕像", + "AlphabetStatue4": "4字雕像", + "AlphabetStatue5": "5字雕像", + "AlphabetStatue6": "6字雕像", + "AlphabetStatue7": "7字雕像", + "AlphabetStatue8": "8字雕像", + "AlphabetStatue9": "9字雕像", + "AlphabetStatueA": "A字雕像", + "AlphabetStatueB": "B字雕像", + "AlphabetStatueC": "C字雕像", + "AlphabetStatueD": "D字雕像", + "AlphabetStatueE": "E字雕像", + "AlphabetStatueF": "F字雕像", + "AlphabetStatueG": "G字雕像", + "AlphabetStatueH": "H字雕像", + "AlphabetStatueI": "I字雕像", + "AlphabetStatueJ": "J字雕像", + "AlphabetStatueK": "K字雕像", + "AlphabetStatueL": "L字雕像", + "AlphabetStatueM": "M字雕像", + "AlphabetStatueN": "N字雕像", + "AlphabetStatueO": "O字雕像", + "AlphabetStatueP": "P字雕像", + "AlphabetStatueQ": "Q字雕像", + "AlphabetStatueR": "R字雕像", + "AlphabetStatueS": "S字雕像", + "AlphabetStatueT": "T字雕像", + "AlphabetStatueU": "U字雕像", + "AlphabetStatueV": "V字雕像", + "AlphabetStatueW": "W字雕像", + "AlphabetStatueX": "X字雕像", + "AlphabetStatueY": "Y字雕像", + "AlphabetStatueZ": "Z字雕像", + "Amarok": "冰雪悠悠球", + "AmberGemsparkWall": "琥珀晶莹宝石墙", + "AmberGemsparkWallOff": "黯淡琥珀晶莹宝石墙", + "AmberStaff": "琥珀法杖", + "AmethystGemsparkWall": "紫晶晶莹宝石墙", + "AmethystGemsparkWallOff": "黯淡紫晶晶莹宝石墙", + "AncientArmorHat": "远古头饰", + "AncientArmorPants": "远古裤", + "AncientArmorShirt": "远古上衣", + "AncientBattleArmorHat": "禁戒面具", + "AncientBattleArmorMaterial": "禁戒碎片", + "AncientBattleArmorPants": "禁戒裤", + "AncientBattleArmorShirt": "禁戒长袍", + "AncientCloth": "远古布匹", + "AncientCultistTrophy": "远古邪教徒纪念章", + "AncientHorn": "远古号角", + "AnglerTackleBag": "渔夫渔具袋", + "AngryBonesBanner": "愤怒骷髅怪旗", + "AnnouncementBox": "广播盒", + "AntiGravityHook": "反重力钩", + "AntlionClaw": "颌骨剑", + "ApprenticeBait": "学徒诱饵", + "ApprenticeHat": "学徒帽", + "ApprenticeRobe": "学徒长袍", + "ApprenticeScarf": "学徒围巾", + "ApprenticeTrousers": "学徒裤", + "ArchitectGizmoPack": "建筑师发明背包", + "Arkhalis": "Arkhalis剑", + "AviatorSunglasses": "0x33飞行员", + "Bacon": "培根", + "BalloonHorseshoeFart": "绿马蹄气球", + "BalloonHorseshoeHoney": "琥珀马掌气球", + "BalloonHorseshoeSharkron": "粉马蹄气球", + "BalloonPufferfish": "气球河豚鱼", + "BeeMask": "蜂王面具", + "BeesKnees": "蜂膝弓", + "BejeweledValkyrieBody": "Lazure的女武神斗蓬", + "BejeweledValkyrieHead": "Lazure的女武神头环", + "BejeweledValkyrieWing": "Lazure的屏障台", + "BewitchingTable": "施法桌", + "BlackAndWhiteDye": "黑白染料", + "BlackCounterweight": "黑平衡锤", + "BlackString": "黑绳", + "Bladetongue": "舌锋剑", + "BlessedApple": "恩赐苹果", + "BlinkrootPlanterBox": "闪耀根种植盆", + "BloodWater": "血水", + "BloodZombieBanner": "血腥僵尸旗", + "BloodZombieStatue": "血腥僵尸雕像", + "BlueAcidDye": "蓝酸性染料", + "BlueCounterweight": "蓝平衡锤", + "BlueDungeonBathtub": "蓝地牢浴缸", + "BlueDungeonCandelabra": "蓝地牢烛台", + "BlueDungeonChandelier": "蓝地牢吊灯", + "BlueDungeonChest": "蓝地牢箱", + "BlueDungeonLamp": "蓝地牢灯", + "BlueDungeonSink": "蓝地牢水槽", + "BlueFlameAndSilverDye": "蓝焰银染料", + "BlueLunaticHood": "月亮邪教徒兜帽", + "BlueLunaticRobe": "月亮邪教徒长袍", + "BluePhasesaber": "蓝晶光刃", + "BlueString": "蓝绳", + "BombFish": "炸弹鱼", + "BoneArrow": "骨箭", + "BoneBathtub": "骨头浴缸", + "BoneBed": "骨头床", + "BoneBookcase": "骨头书架", + "BoneCampfire": "骨头篝火", + "BoneCandelabra": "骨头烛台", + "BoneChandelier": "骨头吊灯", + "BoneChest": "骨箱", + "BoneClock": "骨头时钟", + "BoneDagger": "骨投刀", + "BoneGlove": "骨头手套", + "BoneJavelin": "骨头标枪", + "BoneLamp": "骨头灯", + "BoneLantern": "骨头灯笼", + "BoneRattle": "骨头宝", + "BoneSink": "骨头水槽", + "BoneSkeletonStatue": "骨头骷髅雕像", + "BoneTorch": "骨头火把", + "BoosterTrack": "增速轨道", + "BorealWood": "针叶木", + "BorealWoodBathtub": "针叶木浴缸", + "BorealWoodBed": "针叶木床", + "BorealWoodBookcase": "针叶木书架", + "BorealWoodBow": "针叶木弓", + "BorealWoodBreastplate": "针叶木胸甲", + "BorealWoodCandelabra": "针叶木烛台", + "BorealWoodCandle": "针叶木蜡烛", + "BorealWoodChair": "针叶木椅", + "BorealWoodChandelier": "针叶木吊灯", + "BorealWoodChest": "针叶木箱", + "BorealWoodClock": "针叶木时钟", + "BorealWoodDoor": "针叶木门", + "BorealWoodDresser": "针叶木梳妆台", + "BorealWoodFence": "针叶木栅栏", + "BorealWoodGreaves": "针叶木护胫", + "BorealWoodHammer": "针叶木锤", + "BorealWoodHelmet": "针叶木头盔", + "BorealWoodLamp": "针叶木灯", + "BorealWoodLantern": "针叶木灯笼", + "BorealWoodPiano": "针叶木钢琴", + "BorealWoodPlatform": "针叶木平台", + "BorealWoodSink": "针叶木水槽", + "BorealWoodSofa": "针叶木沙发", + "BorealWoodSword": "针叶木剑", + "BorealWoodTable": "针叶木桌", + "BorealWoodWall": "针叶木墙", + "BorealWoodWorkBench": "针叶木工作台", + "BossMaskCultist": "远古邪教徒面具", + "BossMaskMoonlord": "月亮领主面具", + "BottomlessBucket": "无底水桶", + "BouncyBomb": "弹力炸弹", + "BouncyDynamite": "弹力雷管", + "BouncyGlowstick": "弹力荧光棒", + "BouncyGrenade": "弹力手榴弹", + "BrainMask": "克苏鲁之脑面具", + "BrainOfConfusion": "混乱之脑", + "BrainOfCthulhuBossBag": "宝藏袋", + "BrainScrambler": "扰脑怪", + "BrightBrownDye": "蓝棕染料", + "BrightSilverDye": "淡银染料", + "BrownAndBlackDye": "棕黑染料", + "BrownAndSilverDye": "棕银染料", + "BrownDye": "棕染料", + "BrownString": "棕绳", + "Bubble": "泡泡", + "BubbleGun": "泡泡枪", + "BuccaneerBandana": "西域海盗头巾", + "BuccaneerPants": "西域海盗马裤", + "BuccaneerShirt": "西域海盗上装", + "Buggy": "蚜虫", + "BuggyStatue": "蚜虫雕像", + "BunnyfishTrophy": "兔兔鱼纪念章", + "BurningHadesDye": "烈焰冥王染料", + "ButcherBanner": "屠夫旗", + "ButchersChainsaw": "屠夫链锯", + "ButterflyStatue": "蝴蝶雕像", + "CactusBathtub": "仙人掌浴缸", + "CactusBed": "仙人掌床", + "CactusBookcase": "仙人掌书架", + "CactusCandelabra": "仙人掌烛台", + "CactusCandle": "仙人掌蜡烛", + "CactusChandelier": "仙人掌吊灯", + "CactusChest": "仙人掌箱", + "CactusClock": "仙人掌时钟", + "CactusLamp": "仙人掌灯", + "CactusLantern": "仙人掌灯笼", + "CactusPlatform": "仙人掌平台", + "CactusSink": "仙人掌水槽", + "CactusTable": "仙人掌桌", + "CageBuggy": "蚜虫笼", + "CageEnchantedNightcrawler": "附魔夜行者笼", + "CageGrubby": "蛆虫笼", + "CageSluggy": "鼻涕虫笼", + "Cascade": "喷流球", + "CelestialShell": "天界壳", + "CelestialSigil": "天界符", + "CellPhone": "手机", + "ChainGuillotines": "铁链血滴子", + "ChargedBlasterCannon": "带电爆破炮", + "Chik": "吉克球", + "Chimney": "烟囱", + "ChlorophyteBrick": "叶绿砖", + "ChlorophyteBrickWall": "叶绿砖墙", + "ChlorophyteDye": "叶绿染料", + "ClingerStaff": "爬藤怪法杖", + "ClothierJacket": "服装商夹克", + "ClothierPants": "服装商裤", + "Code1": "代码1球", + "Code2": "代码2球", + "CogWall": "齿轮墙", + "CoinRing": "钱币戒指", + "CompanionCube": "同伴方块", + "CompassRose": "罗盘针", + "ConfettiBlock": "彩纸块", + "ConfettiBlockBlack": "午夜彩纸块", + "ConfettiCannon": "彩纸炮", + "ConfettiWall": "彩纸墙", + "ConfettiWallBlack": "午夜彩纸墙", + "ConveyorBeltLeft": "传送带(顺时针)", + "ConveyorBeltRight": "传送带(逆时针)", + "CordageGuide": "植物纤维绳索宝典", + "CorruptFishingCrate": "腐化匣", + "CorruptHardenedSand": "硬化黑檀沙块", + "CorruptHardenedSandWall": "硬化黑檀沙墙", + "CorruptPlanterBox": "死亡草种植盆", + "CorruptSandstone": "黑檀沙岩块", + "CorruptSandstoneWall": "黑檀沙岩墙", + "CorruptYoyo": "抑郁球", + "CosmicCarKey": "宇宙车钥匙", + "CrawdadBanner": "龙虾旗", + "CreatureFromTheDeepBanner": "水月怪旗", + "CrimsonFishingCrate": "猩红匣", + "CrimsonHardenedSand": "硬化猩红沙块", + "CrimsonHardenedSandWall": "硬化猩红沙墙", + "CrimsonHeart": "猩红之心", + "CrimsonPlanterBox": "死亡草种植盆", + "CrimsonSandstone": "猩红沙岩块", + "CrimsonSandstoneWall": "猩红沙岩墙", + "CrimsonYoyo": "血脉球", + "CrimtaneBrick": "猩红矿砖", + "CrimtaneBrickWall": "猩红矿砖墙", + "CrystalBlock": "水晶块", + "CrystalBlockWall": "水晶块墙", + "CrystalDart": "水晶镖", + "CrystalSerpent": "水晶蛇", + "CrystalVileShard": "魔晶碎块", + "CultistBossBag": "宝藏袋", + "CursedCampfire": "诅咒篝火", + "CursedDart": "诅咒镖", + "CyanString": "蓝绿绳", + "DaedalusStormbow": "代达罗斯风暴弓", + "DarkMummyBanner": "暗黑木乃伊旗", + "DartPistol": "飞镖手枪", + "DartRifle": "飞镖步枪", + "DayBloomPlanterBox": "太阳花种植盆", + "DayBreak": "破晓之光", + "DeadlySphereBanner": "致命球旗", + "DeadlySphereStaff": "致命球法杖", + "DefenderMedal": "护卫奖章", + "DefendersForge": "护卫熔炉", + "DemonCampfire": "恶魔篝火", + "DemonHeart": "恶魔之心", + "DesertBasiliskBanner": "蛇蜥怪旗", + "DesertDjinnBanner": "沙漠幽魂旗", + "DesertFossil": "沙漠化石", + "DesertFossilWall": "沙漠化石墙", + "DesertGhoulBanner": "食尸鬼旗", + "DesertLamiaBanner": "拉弥亚旗", + "DestroyerBossBag": "宝藏袋", + "DestroyerMask": "毁灭者面具", + "Detonator": "引爆器", + "DevDye": "Skiphs的血", + "DiamondGemsparkWall": "钻石晶莹宝石墙", + "DiamondGemsparkWallOff": "黯淡钻石晶莹宝石墙", + "DjinnLamp": "沙漠幽魂灯", + "DjinnsCurse": "神灵诅咒", + "DPSMeter": "每秒伤害计数器", + "DrillContainmentUnit": "钻头控制装置", + "DripplerBanner": "滴滴怪旗", + "DripplerStatue": "滴滴怪雕像", + "DrManFlyBanner": "飞人博士旗", + "DuckStatue": "小鸭雕像", + "DukeFishronMask": "猪龙鱼公爵面具", + "DukeFishronTrophy": "猪龙鱼公爵纪念章", + "DuneSplicerBanner": "沙虫旗", + "DungeonFishingCrate": "地牢匣", + "DyeTradersScimitar": "外星弯刀", + "DyeTraderTurban": "染料商头巾", + "DynastyBathtub": "王朝浴缸", + "DynastyBed": "王朝床", + "DynastyBookcase": "王朝书架", + "DynastyBowl": "王朝碗", + "DynastyCandelabra": "大王朝蜡烛", + "DynastyCandle": "王朝蜡烛", + "DynastyChair": "王朝椅", + "DynastyChandelier": "大王朝灯笼", + "DynastyChest": "王朝箱", + "DynastyClock": "王朝时钟", + "DynastyCup": "王朝杯", + "DynastyLamp": "王朝灯", + "DynastyLantern": "王朝灯笼", + "DynastySink": "王朝水槽", + "DynastyWorkBench": "王朝工作台", + "EaterMask": "世界吞噬怪面具", + "EaterOfWorldsBossBag": "宝藏袋", + "EbonwoodBathtub": "乌木浴缸", + "EbonwoodBookcase": "乌木书架", + "EbonwoodCandelabra": "乌木烛台", + "EbonwoodCandle": "乌木蜡烛", + "EbonwoodChandelier": "乌木吊灯", + "EbonwoodClock": "乌木时钟", + "EbonwoodLamp": "乌木灯", + "EbonwoodLantern": "乌木灯笼", + "EbonwoodSink": "乌木水槽", + "ElectrosphereLauncher": "电圈发射器", + "EmeraldGemsparkWall": "翡翠晶莹宝石墙", + "EmeraldGemsparkWallOff": "黯淡翡翠晶莹宝石墙", + "EmptyDropper": "空滴管", + "EnchantedNightcrawler": "附魔夜行者", + "EndlessMusketPouch": "无尽火枪袋", + "EndlessQuiver": "无尽箭袋", + "EngineeringHelmet": "工程头盔", + "EoCShield": "克苏鲁护盾", + "EyeMask": "克苏鲁之眼面具", + "EyeOfCthulhuBossBag": "宝藏袋", + "Fake_BlueDungeonChest": "受困蓝地牢箱", + "Fake_BoneChest": "受困骨箱", + "Fake_BorealWoodChest": "受困针叶木箱", + "Fake_CactusChest": "受困仙人掌箱", + "Fake_Chest": "受困宝箱", + "Fake_CorruptionChest": "受困腐化箱", + "Fake_CrimsonChest": "受困猩红箱", + "Fake_DynastyChest": "受困王朝箱", + "Fake_EbonwoodChest": "受困乌木箱", + "Fake_FleshChest": "受困血肉箱", + "Fake_FrozenChest": "受困冰冻箱", + "Fake_GlassChest": "受困玻璃箱", + "Fake_GoldChest": "受困金箱", + "Fake_GraniteChest": "受困花岗岩箱", + "Fake_GreenDungeonChest": "受困绿地牢箱", + "Fake_HallowedChest": "受困神圣箱", + "Fake_HoneyChest": "受困蜂蜜箱", + "Fake_IceChest": "受困冰雪箱", + "Fake_IvyChest": "受困常春藤箱", + "Fake_JungleChest": "受困丛林箱", + "Fake_LihzahrdChest": "受困丛林蜥蜴箱", + "Fake_LivingWoodChest": "受困生命木箱", + "Fake_MarbleChest": "受困大理石箱", + "Fake_MartianChest": "受困火星箱", + "Fake_MeteoriteChest": "受困陨石箱", + "Fake_MushroomChest": "受困蘑菇箱", + "Fake_ObsidianChest": "受困黑曜石箱", + "Fake_PalmWoodChest": "受困棕榈木箱", + "Fake_PearlwoodChest": "受困珍珠木箱", + "Fake_PinkDungeonChest": "受困粉地牢箱", + "Fake_PumpkinChest": "受困南瓜箱", + "Fake_RichMahoganyChest": "受困红木箱", + "Fake_ShadewoodChest": "受困暗影木箱", + "Fake_ShadowChest": "受困暗影箱", + "Fake_SkywareChest": "受困天域箱", + "Fake_SlimeChest": "受困史莱姆箱", + "Fake_SpookyChest": "受困阴森箱", + "Fake_SteampunkChest": "受困蒸汽朋克箱", + "Fake_WaterChest": "受困水中箱", + "Fake_WebCoveredChest": "受困蛛丝箱", + "FalconBlade": "猎鹰刃", + "FallenTuxedoPants": "堕落西装裤", + "FallenTuxedoShirt": "堕落西装衣", + "FancyDishes": "精致餐具", + "FetidBaghnakhs": "臭虎爪", + "FireBlossomPlanterBox": "火焰花花盆", + "FireflyStatue": "萤火虫雕像", + "Fireplace": "壁炉", + "FireworkFountain": "烟花喷泉", + "FireworksBox": "烟花盒", + "FireworksLauncher": "喜庆弹射器", + "FishermansGuide": "渔民袖珍宝典", + "FishFinder": "探鱼器", + "FishronBossBag": "宝藏袋", + "FishronWings": "猪龙鱼之翼", + "Flairon": "猪鲨链球", + "FlameAndSilverDye": "红焰银染料", + "FleshBathtub": "血肉浴缸", + "FleshBed": "血肉床", + "FleshBookcase": "血肉书架", + "FleshCandelabra": "血肉烛台", + "FleshCandle": "血肉蜡烛", + "FleshChandelier": "血肉吊灯", + "FleshChest": "血肉箱", + "FleshClock": "血肉时钟", + "FleshDresser": "血肉梳妆台", + "FleshKnuckles": "血肉指关节", + "FleshLamp": "血肉灯", + "FleshLantern": "血肉灯笼", + "FleshMask": "血肉墙面具", + "FleshPiano": "血肉钢琴", + "FleshSink": "血肉水槽", + "FleshSofa": "血肉沙发", + "FloatingIslandFishingCrate": "天空匣", + "FlowerBoots": "花靴", + "FlowerBoyHat": "呆萌向日葵花瓣头盔", + "FlowerBoyPants": "呆萌向日葵裤装", + "FlowerBoyShirt": "呆萌向日葵上衣", + "FlyingAntlionBanner": "蚁狮蜂旗", + "FlyingDutchmanTrophy": "荷兰飞盗船纪念章", + "FlyingKnife": "飞刀", + "FormatC": "好胜球", + "FossilHelm": "化石头盔", + "FossilOre": "坚固头盔", + "FossilPants": "化石护胫", + "FossilShirt": "化石板甲", + "FragmentNebula": "星云碎片", + "FragmentSolar": "日耀碎片", + "FragmentStardust": "星尘碎片", + "FragmentVortex": "星旋碎片", + "FritzBanner": "弗里茨旗", + "FrogStatue": "青蛙雕像", + "FrostDaggerfish": "寒霜飞鱼", + "FrozenBathtub": "冰冻浴缸", + "FrozenBed": "冰冻床", + "FrozenBookcase": "冰冻书架", + "FrozenCampfire": "冰冻篝火", + "FrozenCandelabra": "冰冻烛台", + "FrozenCandle": "冰冻蜡烛", + "FrozenChair": "冰冻椅", + "FrozenChandelier": "冰冻吊灯", + "FrozenClock": "冰冻时钟", + "FrozenDoor": "冰冻门", + "FrozenLamp": "冰冻灯", + "FrozenLantern": "冰冻灯笼", + "FrozenPiano": "冰冻钢琴", + "FrozenSink": "冰冻水槽", + "FrozenSofa": "冰冻沙发", + "FrozenTable": "冰冻桌", + "FrozenWorkBench": "冰冻工作台", + "FuzzyCarrot": "绒毛胡萝卜", + "GelDye": "凝胶染料", + "GemLockAmber": "琥珀宝石锁", + "GemLockAmethyst": "紫晶宝石锁", + "GemLockDiamond": "钻石宝石锁", + "GemLockEmerald": "翡翠宝石锁", + "GemLockRuby": "红玉宝石锁", + "GemLockSapphire": "蓝玉宝石锁", + "GemLockTopaz": "黄玉宝石锁", + "GenderChangePotion": "变性药水", + "GeyserTrap": "喷泉", + "GiantShellyBanner": "巨型卷壳怪旗", + "GladiatorBreastplate": "勇士胸甲", + "GladiatorHelmet": "勇士头盔", + "GladiatorLeggings": "勇士护腿", + "GlassBathtub": "玻璃浴缸", + "GlassBookcase": "玻璃书架", + "GlassBowl": "玻璃碗", + "GlassCandelabra": "玻璃烛台", + "GlassCandle": "玻璃蜡烛", + "GlassChandelier": "玻璃吊灯", + "GlassChest": "玻璃箱", + "GlassClock": "玻璃时钟", + "GlassDresser": "玻璃梳妆台", + "GlassLamp": "玻璃灯", + "GlassLantern": "玻璃灯笼", + "GlassPiano": "玻璃钢琴", + "GlassSink": "玻璃水槽", + "GlassWorkBench": "玻璃工作台", + "GoblinSummonerBanner": "哥布林召唤师旗", + "GoblinTech": "哥布林数据仪", + "GoldBird": "金鸟", + "GoldBirdCage": "金鸟笼", + "GoldBunny": "金兔", + "GoldBunnyCage": "金兔笼", + "GoldButterfly": "金蝴蝶", + "GoldButterflyCage": "金蝴蝶罐", + "GoldenBathtub": "金浴缸", + "GoldenBookcase": "金书架", + "GoldenBugNet": "金虫网", + "GoldenCandelabra": "金烛台", + "GoldenCandle": "金蜡烛", + "GoldenChandelier": "金制吊灯", + "GoldenClock": "金时钟", + "GoldenLamp": "金灯", + "GoldenLantern": "金灯笼", + "GoldenSink": "金水槽", + "GoldfishTrophy": "金鱼纪念章", + "GoldFrog": "金蛙", + "GoldFrogCage": "金蛙笼", + "GoldGrasshopper": "金蚱蜢", + "GoldGrasshopperCage": "金蚱蜢笼", + "GoldMouse": "金老鼠", + "GoldMouseCage": "金老鼠笼", + "GoldRing": "金戒指", + "GoldWorm": "金蠕虫", + "GoldWormCage": "金蠕虫笼", + "GolemBossBag": "宝藏袋", + "GolemMask": "石巨人面具", + "Gradient": "渐变球", + "Granite": "花岗岩块", + "GraniteBathtub": "花岗岩浴缸", + "GraniteBed": "花岗岩床", + "GraniteBlock": "光面花岗岩块", + "GraniteBlockWall": "光面花岗岩墙", + "GraniteBookcase": "花岗岩书架", + "GraniteCandelabra": "花岗岩烛台", + "GraniteCandle": "花岗岩蜡烛", + "GraniteChair": "花岗岩椅", + "GraniteChandelier": "花岗岩吊灯", + "GraniteChest": "花岗岩箱", + "GraniteClock": "花岗岩时钟", + "GraniteDoor": "花岗岩门", + "GraniteDresser": "花岗岩梳妆台", + "GraniteFlyerBanner": "花岗精旗", + "GraniteGolemStatue": "花岗岩巨人雕像", + "GraniteLamp": "花岗岩灯", + "GraniteLantern": "花岗岩灯笼", + "GranitePiano": "花岗岩钢琴", + "GranitePlatform": "花岗岩平台", + "GraniteSink": "花岗岩水槽", + "GraniteSofa": "花岗岩沙发", + "GraniteTable": "花岗岩桌", + "GraniteWall": "花岗岩墙", + "GraniteWorkBench": "花岗岩工作台", + "Grasshopper": "蚱蜢", + "GrasshopperCage": "蚱蜢笼", + "GrasshopperStatue": "蚱蜢雕像", + "GreedyRing": "贪婪戒指", + "GreekSkeletonBanner": "装甲步兵旗", + "GreenCounterweight": "绿平衡锤", + "GreenDungeonBathtub": "绿地牢浴缸", + "GreenDungeonCandelabra": "绿地牢烛台", + "GreenDungeonChandelier": "绿地牢吊灯", + "GreenDungeonChest": "绿地牢箱", + "GreenDungeonLamp": "绿地牢灯", + "GreenDungeonSink": "绿地牢水槽", + "GreenFlameAndSilverDye": "绿焰银染料", + "GreenJellyfishBanner": "绿水母旗", + "GreenPhasesaber": "绿晶光刃", + "GreenString": "绿绳", + "GrimDye": "恐怖染料", + "Grubby": "蛆虫", + "GrubSoup": "蛆虫汤", + "HadesDye": "冥王染料", + "HallowedFishingCrate": "神圣匣", + "HallowHardenedSand": "硬化珍珠沙块", + "HallowHardenedSandWall": "硬化珍珠沙墙", + "HallowSandstone": "珍珠沙岩块", + "HallowSandstoneWall": "珍珠沙岩墙", + "HardenedSand": "硬化沙块", + "HardenedSandWall": "硬化沙墙", + "HardySaddle": "海龟鞍", + "HarpyStatue": "鸟妖雕像", + "HelFire": "狱火球", + "HellstoneBrickWall": "狱石砖墙", + "HellwingBow": "地狱之翼弓", + "HerbBag": "草药袋", + "HiTekSunglasses": "高科技墨镜", + "HiveBackpack": "蜂巢背包", + "HoneyBathtub": "蜂蜜浴缸", + "HoneyBookcase": "蜂蜜书架", + "HoneyCandelabra": "蜂蜜烛台", + "HoneyCandle": "蜂蜜蜡烛", + "HoneyChandelier": "蜂蜜吊灯", + "HoneyChest": "蜂蜜箱", + "HoneyClock": "蜂蜜时钟", + "HoneyCup": "蜂蜜杯", + "HoneyedGoggles": "涂蜜护目镜", + "HoneyfallBlock": "蜂蜜瀑布块", + "HoneyfallWall": "蜂蜜瀑布墙", + "HoneyLamp": "蜂蜜灯", + "HoneyLantern": "蜂蜜灯笼", + "HoneyPiano": "蜂蜜钢琴", + "HoneyPlatform": "蜂蜜平台", + "HoneySink": "蜂蜜水槽", + "HoneyWorkBench": "蜂蜜工作台", + "HopliteStatue": "装甲步兵雕像", + "HuntressBuckler": "女猎人圆盾", + "HuntressJerkin": "女猎人上衣", + "HuntressPants": "女猎人裤", + "HuntressWig": "女猎人假发", + "IceMirror": "冰雪镜", + "IceTortoiseBanner": "冰雪陆龟旗", + "IchorCampfire": "灵液篝火", + "IchorDart": "灵液镖", + "IlluminantHook": "荧光钩", + "InfernalWispDye": "地狱妖灵染料", + "InfluxWaver": "波涌之刃", + "ItemFrame": "物品框", + "Javelin": "标枪", + "JimsWings": "Jim的翅膀", + "JourneymanBait": "熟手诱饵", + "JungleFishingCrate": "丛林匣", + "JungleYoyo": "亚马逊球", + "KingSlimeBossBag": "宝藏袋", + "Kraken": "克拉肯球", + "LamiaHat": "拉弥亚面具", + "LamiaPants": "拉弥亚蛇尾裤", + "LamiaShirt": "拉弥亚披肩", + "LargeAmber": "大琥珀", + "LaserDrill": "激光钻头", + "LaserMachinegun": "激光机枪", + "LaserRuler": "机械标尺", + "LastPrism": "终极棱镜", + "LavafallBlock": "熔岩瀑布块", + "LavaLamp": "熔岩灯", + "LifeformAnalyzer": "生命体分析机", + "LifePreserver": "救生圈", + "LightKey": "光明钥匙", + "LightMummyBanner": "光明木乃伊旗", + "LihzahrdBathtub": "丛林蜥蜴浴缸", + "LihzahrdBed": "丛林蜥蜴床", + "LihzahrdBookcase": "丛林蜥蜴书架", + "LihzahrdCandelabra": "丛林蜥蜴烛台", + "LihzahrdCandle": "丛林蜥蜴蜡烛", + "LihzahrdChandelier": "丛林蜥蜴吊灯", + "LihzahrdClock": "丛林蜥蜴时钟", + "LihzahrdLamp": "丛林蜥蜴灯", + "LihzahrdLantern": "丛林蜥蜴灯笼", + "LihzahrdSink": "丛林蜥蜴水槽", + "LimeString": "绿黄绳", + "LivingCursedFireBlock": "诅咒活火块", + "LivingDemonFireBlock": "恶魔活火块", + "LivingFireBlock": "活火块", + "LivingFlameDye": "鲜艳红焰染料", + "LivingFrostFireBlock": "寒霜活火块", + "LivingIchorBlock": "灵液活火块", + "LivingLeafWall": "生命树叶墙", + "LivingMahoganyLeafWand": "红木树叶魔棒", + "LivingMahoganyWand": "生命红木魔棒", + "LivingOceanDye": "鲜艳海蓝染料", + "LivingRainbowDye": "鲜艳彩虹染料", + "LivingUltrabrightFireBlock": "超亮活火块", + "LivingWoodBathtub": "生命木浴缸", + "LivingWoodBed": "生命木床", + "LivingWoodBookcase": "生命木书架", + "LivingWoodCandelabra": "生命木烛台", + "LivingWoodCandle": "生命木蜡烛", + "LivingWoodChandelier": "生命木吊灯", + "LivingWoodClock": "生命木时钟", + "LivingWoodLamp": "生命木灯", + "LivingWoodLantern": "生命木灯笼", + "LivingWoodPiano": "生命木钢琴", + "LivingWoodPlatform": "生命木平台", + "LivingWoodSink": "生命木水槽", + "LivingWoodSofa": "生命木沙发", + "LivingWoodWorkBench": "生命木工作台", + "LockBox": "金锁盒", + "LogicGateLamp_Faulty": "逻辑门灯(故障)", + "LogicGateLamp_Off": "逻辑门灯(关)", + "LogicGateLamp_On": "逻辑门灯(开)", + "LogicGate_AND": "逻辑门(与)", + "LogicGate_NAND": "逻辑门(与非)", + "LogicGate_NOR": "逻辑门(或非)", + "LogicGate_NXOR": "逻辑门(同或)", + "LogicGate_OR": "逻辑门(或)", + "LogicGate_XOR": "逻辑门(异或)", + "LogicSensor_Above": "逻辑感应器(玩家出入上方)", + "LogicSensor_Honey": "液体感应器(蜂蜜)", + "LogicSensor_Lava": "液体感应器(熔岩)", + "LogicSensor_Liquid": "液体感应器(任何)", + "LogicSensor_Moon": "逻辑感应器(夜)", + "LogicSensor_Sun": "逻辑感应器(昼)", + "LogicSensor_Water": "液体感应器(水)", + "LokisDye": "Loki的染料", + "LokisHelm": "Loki的头盔", + "LokisPants": "Loki的护胫", + "LokisShirt": "Loki的胸甲", + "LokisWings": "Loki的翅膀", + "LunarBar": "夜明锭", + "LunarBlockNebula": "星云碎片块", + "LunarBlockSolar": "日耀碎片块", + "LunarBlockStardust": "星尘碎片块", + "LunarBlockVortex": "星旋碎片块", + "LunarBrick": "夜明砖", + "LunarBrickWall": "夜明砖墙", + "LunarCraftingStation": "远古操纵机", + "LunarFlareBook": "月耀", + "LunarHamaxeNebula": "星云锤斧", + "LunarHamaxeSolar": "耀斑锤斧", + "LunarHamaxeStardust": "星尘锤斧", + "LunarHamaxeVortex": "星旋锤斧", + "LunarHook": "月钩", + "LunarOre": "夜明矿", + "LunarTabletFragment": "日耀碑牌碎片", + "MagicHoneyDropper": "魔法蜂蜜滴管", + "MagicLantern": "魔法灯笼", + "MagicLavaDropper": "魔法熔岩滴管", + "MagicSandDropper": "魔法沙粒滴管", + "MagicWaterDropper": "魔法滴水管", + "Marble": "大理石块", + "MarbleBathtub": "大理石浴缸", + "MarbleBed": "大理石床", + "MarbleBlock": "光面大理石块", + "MarbleBlockWall": "光面大理石墙", + "MarbleBookcase": "大理石书架", + "MarbleCandelabra": "大理石烛台", + "MarbleCandle": "大理石蜡烛", + "MarbleChair": "大理石椅", + "MarbleChandelier": "大理石吊灯", + "MarbleChest": "大理石箱", + "MarbleClock": "大理石时钟", + "MarbleDoor": "大理石门", + "MarbleDresser": "大理石梳妆台", + "MarbleLamp": "大理石灯", + "MarbleLantern": "大理石灯笼", + "MarblePiano": "大理石钢琴", + "MarblePlatform": "大理石平台", + "MarbleSink": "大理石水槽", + "MarbleSofa": "大理石沙发", + "MarbleTable": "大理石桌", + "MarbleWall": "大理石墙", + "MarbleWorkBench": "大理石工作台", + "MartianArmorDye": "火星染料", + "MartianAstroClock": "火星占星钟", + "MartianBathtub": "火星浴缸", + "MartianBed": "火星床", + "MartianChandelier": "火星吊灯", + "MartianChest": "火星箱", + "MartianConduitPlating": "火星管道镀层", + "MartianConduitWall": "火星管道墙", + "MartianCostumeMask": "火星制服面具", + "MartianCostumePants": "火星时装裤", + "MartianCostumeShirt": "火星制服衣", + "MartianDoor": "火星门", + "MartianDresser": "火星梳妆台", + "MartianHairDye": "火星染发剂", + "MartianHolobookcase": "火星整体书架", + "MartianHoverCandle": "火星摇摆蜡烛", + "MartianHoverChair": "火星摇摆椅", + "MartianLamppost": "火星灯柱", + "MartianLantern": "火星灯笼", + "MartianPiano": "火星钢琴", + "MartianPlatform": "火星平台", + "MartianSaucerTrophy": "火星飞碟纪念章", + "MartianSink": "火星水槽", + "MartianSofa": "火星沙发", + "MartianTable": "火星桌", + "MartianTableLamp": "火星桌灯", + "MartianUniformHelmet": "火星制服头盔", + "MartianUniformPants": "火星制服裤", + "MartianUniformTorso": "火星制服上衣", + "MartianWalkerBanner": "火星走妖旗", + "MartianWorkBench": "火星工作台", + "MasterBait": "大师诱饵", + "MechanicalBatteryPiece": "机械电池片", + "MechanicalLens": "机械晶状体", + "MechanicalWagonPiece": "机械车体片", + "MechanicalWheelPiece": "机械车轮片", + "MedusaBanner": "蛇发女妖旗", + "MedusaHead": "蛇发女妖头", + "MedusaStatue": "蛇发女妖雕像", + "Meowmere": "彩虹猫之刃", + "MetalDetector": "金属探测器", + "MetalSink": "金属水槽", + "MeteoriteBathtub": "陨石浴缸", + "MeteoriteBed": "陨石床", + "MeteoriteBookcase": "陨石书架", + "MeteoriteBrick": "陨石砖", + "MeteoriteBrickWall": "陨石砖墙", + "MeteoriteCandelabra": "陨石烛台", + "MeteoriteCandle": "陨石蜡烛", + "MeteoriteChair": "陨石椅", + "MeteoriteChandelier": "陨石吊灯", + "MeteoriteChest": "陨石箱", + "MeteoriteClock": "陨石钟", + "MeteoriteDoor": "陨石门", + "MeteoriteDresser": "陨石梳妆台", + "MeteoriteLamp": "陨石灯", + "MeteoriteLantern": "陨石灯笼", + "MeteoritePiano": "陨石钢琴", + "MeteoritePlatform": "陨石平台", + "MeteoriteSink": "陨石水槽", + "MeteoriteSofa": "陨石沙发", + "MeteoriteTable": "陨石桌", + "MeteoriteWorkBench": "陨石工作台", + "MeteorStaff": "流星法杖", + "MidnightRainbowDye": "午夜彩虹染料", + "MinecartMech": "机械货车", + "MinecartTrack": "矿车轨道", + "MirageDye": "幻象染料", + "MolotovCocktail": "莫洛托夫鸡尾酒", + "MoneyTrough": "钱币槽", + "MonkBelt": "和尚腰带", + "MonkBrows": "和尚浓眉秃头帽", + "MonkPants": "和尚裤", + "MonkShirt": "和尚衣", + "MoonglowPlanterBox": "月光草花盆", + "MoonlordArrow": "夜明箭", + "MoonLordBossBag": "宝藏袋", + "MoonlordBullet": "夜明弹", + "MoonLordPainting": "不是小孩,也不是乌贼", + "MoonLordTrophy": "月亮领主纪念章", + "MoonlordTurretStaff": "月亮传送门法杖", + "MoonMask": "月亮面具", + "MothronBanner": "蛾怪旗", + "MothronWings": "蛾怪之翼", + "MouseStatue": "老鼠雕像", + "MulticolorWrench": "五彩扳手", + "MushroomBathtub": "蘑菇浴缸", + "MushroomBed": "蘑菇床", + "MushroomBench": "蘑菇长椅", + "MushroomBookcase": "蘑菇书架", + "MushroomCandelabra": "蘑菇烛台", + "MushroomCandle": "蘑菇蜡烛", + "MushroomChandelier": "蘑菇吊灯", + "MushroomChest": "蘑菇箱", + "MushroomClock": "蘑菇时钟", + "MushroomDresser": "蘑菇梳妆台", + "MushroomDye": "发光蘑菇染料", + "MushroomLamp": "蘑菇灯", + "MushroomLantern": "蘑菇灯笼", + "MushroomPiano": "蘑菇钢琴", + "MushroomPlatform": "蘑菇平台", + "MushroomSink": "蘑菇水槽", + "MushroomTable": "蘑菇桌", + "MusicBoxGoblins": "八音盒(哥布林入侵)", + "MusicBoxHell": "八音盒(地狱)", + "MusicBoxLunarBoss": "八音盒(月亮Boss)", + "MusicBoxMartians": "八音盒(火星暴乱)", + "MusicBoxPirates": "八音盒(海盗入侵)", + "MusicBoxSandstorm": "八音盒(沙尘暴)", + "MusicBoxTowers": "八音盒(神塔)", + "MusicBoxUndergroundCrimson": "八音盒(地下猩红之地)", + "Nail": "钉子", + "NailGun": "钉枪", + "NailheadBanner": "钉头旗", + "NebulaArcanum": "星云奥秘", + "NebulaAxe": "星云斧", + "NebulaBeastBanner": "进化兽旗", + "NebulaBlaze": "星云烈焰", + "NebulaBrainBanner": "星云浮怪旗", + "NebulaBreastplate": "星云胸甲", + "NebulaChainsaw": "星云链锯", + "NebulaDrill": "星云钻头", + "NebulaDye": "星云燃料", + "NebulaHammer": "星云锤", + "NebulaHeadcrabBanner": "吮脑怪旗", + "NebulaHelmet": "星云头盔", + "NebulaLeggings": "星云护腿", + "NebulaMonolith": "星云天塔柱", + "NebulaPickaxe": "星云镐", + "NebulaPickup1": "伤害强化焰", + "NebulaPickup2": "生命强化焰", + "NebulaPickup3": "魔力强化焰", + "NebulaSoldierBanner": "预言帝旗", + "NegativeDye": "阴暗染料", + "NightKey": "夜光钥匙", + "NightVisionHelmet": "夜视头盔", + "ObsidianBathtub": "黑曜石浴缸", + "ObsidianCandelabra": "黑曜石烛台", + "ObsidianCandle": "黑曜石蜡烛", + "ObsidianChandelier": "黑曜石吊灯", + "ObsidianChest": "黑曜石箱", + "ObsidianClock": "黑曜石时钟", + "ObsidianHelm": "黑曜石逃犯帽", + "ObsidianLamp": "黑曜石灯", + "ObsidianLantern": "黑曜石灯笼", + "ObsidianPants": "黑曜石裤", + "ObsidianShirt": "黑曜石风衣", + "ObsidianSink": "黑曜石水槽", + "OnyxBlaster": "玛瑙爆破枪", + "OrangeString": "橙绳", + "PainterPaintballGun": "彩弹枪", + "PaintingAcorns": "橡果", + "PaintingCastleMarsberg": "火星贝格城堡", + "PaintingColdSnap": "寒冰英姿", + "PaintingCursedSaint": "诅咒的圣诞骷髅王", + "PaintingMartiaLisa": "火娜丽莎", + "PaintingSnowfellas": "吉祥三雪宝", + "PaintingTheSeason": "圣诞雪季", + "PaintingTheTruthIsUpThere": "真理就在火星", + "PalmWood": "棕榈木", + "PalmWoodBathtub": "棕榈木浴缸", + "PalmWoodBed": "棕榈木床", + "PalmWoodBench": "棕榈木长椅", + "PalmWoodBookcase": "棕榈木书架", + "PalmWoodBow": "棕榈木弓", + "PalmWoodBreastplate": "棕榈木胸甲", + "PalmWoodCandelabra": "棕榈木烛台", + "PalmWoodCandle": "棕榈木蜡烛", + "PalmWoodChair": "棕榈木椅", + "PalmWoodChandelier": "棕榈木吊灯", + "PalmWoodChest": "棕榈木箱", + "PalmWoodClock": "棕榈木时钟", + "PalmWoodDoor": "棕榈木门", + "PalmWoodDresser": "棕榈木梳妆台", + "PalmWoodFence": "棕榈木栅栏", + "PalmWoodGreaves": "棕榈木护胫", + "PalmWoodHammer": "棕榈木锤", + "PalmWoodHelmet": "棕榈木头盔", + "PalmWoodLamp": "棕榈木灯", + "PalmWoodLantern": "棕榈木灯笼", + "PalmWoodPiano": "棕榈木钢琴", + "PalmWoodPlatform": "棕榈木平台", + "PalmWoodSink": "棕榈木水槽", + "PalmWoodSofa": "棕榈木沙发", + "PalmWoodSword": "棕榈木剑", + "PalmWoodTable": "棕榈木桌", + "PalmWoodWall": "棕榈木墙", + "PalmWoodWorkBench": "棕榈木工作台", + "PartyBalloonAnimal": "气球兔兔", + "PartyBundleOfBalloonsAccessory": "派对气球束", + "PartyBundleOfBalloonTile": "呆萌丝带派对气球束", + "PartyGirlGrenade": "快乐手榴弹", + "PartyHat": "派对帽", + "PartyMonolith": "派对中心", + "PartyPresent": "派对礼物", + "PDA": "个人数字助手", + "PeaceCandle": "和平蜡烛", + "PearlwoodBathtub": "珍珠木浴缸", + "PearlwoodBookcase": "珍珠木书架", + "PearlwoodCandelabra": "珍珠木烛台", + "PearlwoodCandle": "珍珠木蜡烛", + "PearlwoodChandelier": "珍珠木吊灯", + "PearlwoodClock": "珍珠木时钟", + "PearlwoodLamp": "珍珠木灯", + "PearlwoodLantern": "珍珠木灯笼", + "PearlwoodSink": "珍珠木水槽", + "PedguinHat": "企鹅兜帽", + "PedguinPants": "企鹅裤", + "PedguinShirt": "企鹅夹克", + "PenguinStatue": "企鹅雕像", + "Phantasm": "幻影弓", + "PhaseDye": "闪光染料", + "PhasicWarpEjector": "Phasic Warp Ejector", + "Pigronata": "猪龙彩罐", + "PigronStatue": "猪龙雕像", + "PinkDungeonBathtub": "粉地牢浴缸", + "PinkDungeonCandelabra": "粉地牢烛台", + "PinkDungeonChandelier": "粉地牢吊灯", + "PinkDungeonChest": "粉地牢箱", + "PinkDungeonLamp": "粉地牢灯", + "PinkDungeonSink": "粉地牢水槽", + "PinkGel": "粉凝胶", + "PinkGelDye": "粉凝胶染料", + "PinkJellyfishBanner": "粉水母旗", + "PinkSlimeBlock": "粉史莱姆块", + "PinkString": "粉绳", + "PinkTorch": "粉火把", + "PirateCaptainBanner": "海盗船长旗", + "PirateCorsairBanner": "私船海盗旗", + "PirateCrossbowerBanner": "海盗弩手旗", + "PirateDeadeyeBanner": "海盗神射手旗", + "PirateStaff": "海盗法杖", + "PixelBox": "像素盒", + "PixieDye": "妖精染料", + "PlanteraBossBag": "宝藏袋", + "PlanteraMask": "世纪之花面具", + "PocketMirror": "袖珍镜", + "PoisonousSporeBanner": "毒孢旗", + "PortalGun": "传送枪", + "PortalGunStation": "传送枪站", + "PressureTrack": "压力板轨道", + "ProjectilePressurePad": "青绿压力垫板", + "PsychoBanner": "变态人旗", + "PsychoKnife": "变态刀", + "PumpkinBathtub": "南瓜浴缸", + "PumpkinBed": "南瓜床", + "PumpkinBookcase": "南瓜书架", + "PumpkinCandelabra": "南瓜烛台", + "PumpkinCandle": "南瓜蜡烛", + "PumpkinChandelier": "南瓜吊灯", + "PumpkinChest": "南瓜箱", + "PumpkinClock": "南瓜时钟", + "PumpkinDresser": "南瓜梳妆台", + "PumpkinLamp": "南瓜灯", + "PumpkinLantern": "南瓜灯笼", + "PumpkinPiano": "南瓜钢琴", + "PumpkinSink": "南瓜水槽", + "PurpleCounterweight": "紫平衡锤", + "PurpleOozeDye": "紫泥染料", + "PurplePhasesaber": "紫晶光刃", + "PurpleString": "紫绳", + "PutridScent": "腐香囊", + "QueenBeeBossBag": "宝藏袋", + "Radar": "雷达", + "RainbowCampfire": "彩虹篝火", + "RainbowCrystalStaff": "七彩水晶法杖", + "RainbowString": "彩虹绳", + "RainbowTorch": "彩虹火把", + "Rally": "对打球", + "RazorbladeTyphoon": "利刃台风", + "RedAcidDye": "红酸性染料", + "RedCounterweight": "红平衡锤", + "RedDevilBanner": "红魔鬼旗", + "RedPhasesaber": "红晶光刃", + "RedString": "红绳", + "RedsYoyo": "Red的抛球", + "ReflectiveCopperDye": "反光铜染料", + "ReflectiveDye": "反光染料", + "ReflectiveGoldDye": "反光金染料", + "ReflectiveMetalDye": "反光金属染料", + "ReflectiveObsidianDye": "反光黑曜石染料", + "ReflectiveSilverDye": "反光银染料", + "REK": "R.E.K.3000", + "RichGravestone1": "金十字墓石碑", + "RichGravestone2": "金墓石", + "RichGravestone3": "金墓石碑", + "RichGravestone4": "金墓碑", + "RichGravestone5": "金碑石", + "RichMahoganyBathtub": "红木浴缸", + "RichMahoganyBookcase": "红木书架", + "RichMahoganyCandelabra": "红木大烛台", + "RichMahoganyCandle": "红木蜡烛", + "RichMahoganyChandelier": "红木吊灯", + "RichMahoganyClock": "红木时钟", + "RichMahoganyLamp": "红木灯", + "RichMahoganyLantern": "红木灯笼", + "RichMahoganySink": "红木水槽", + "RoyalGel": "皇家凝胶", + "RubyGemsparkWall": "红玉晶莹宝石墙", + "RubyGemsparkWallOff": "黯淡红玉晶莹宝石墙", + "SailfishBoots": "航鱼靴", + "SalamanderBanner": "蝾螈旗", + "SandElementalBanner": "沙尘精旗", + "SandFallBlock": "沙暴", + "SandFallWall": "沙暴墙", + "SandsharkBanner": "沙鲨旗", + "SandsharkCorruptBanner": "噬骨沙鲨旗", + "SandsharkCrimsonBanner": "戮血沙鲨旗", + "SandsharkHallowedBanner": "晶狐沙鲨旗", + "SandSlimeBanner": "沙史莱姆旗", + "Sandstone": "沙岩块", + "SandstoneWall": "沙岩墙", + "SapphireGemsparkWall": "蓝玉晶莹宝石墙", + "SapphireGemsparkWallOff": "黯淡蓝玉晶莹宝石墙", + "ScalyTruffle": "带鳞松露", + "ScorpionStatue": "蝎子雕像", + "Seashell": "贝壳", + "SeaSnailBanner": "海蜗牛旗", + "Seedler": "种子弯刀", + "SeveredHandBanner": "残手旗", + "Sextant": "六分仪", + "ShadewoodBathtub": "暗影木浴缸", + "ShadewoodBookcase": "暗影木书架", + "ShadewoodCandelabra": "暗影木烛台", + "ShadewoodCandle": "暗影木蜡烛", + "ShadewoodChandelier": "暗影木吊灯", + "ShadewoodClock": "暗影木时钟", + "ShadewoodLamp": "暗影木灯", + "ShadewoodLantern": "暗影木灯笼", + "ShadewoodSink": "暗影木水槽", + "ShadowDye": "暗影染料", + "ShadowFlameBow": "暗影焰弓", + "ShadowflameHadesDye": "暗影焰冥王染料", + "ShadowFlameHexDoll": "暗影焰妖娃", + "ShadowFlameKnife": "暗影焰刀", + "SharkronBalloon": "鲨鱼龙气球", + "SharkStatue": "鲨鱼雕像", + "SharkteethTrophy": "鲨牙纪念章", + "SharkToothNecklace": "鲨牙项链", + "SharpeningStation": "利器站", + "ShiftingPearlSandsDye": "珍珠流沙染料", + "ShiftingSandsDye": "流沙染料", + "ShinyStone": "闪亮石", + "ShipsWheel": "舵轮", + "ShiverthornPlanterBox": "寒颤棘种植盆", + "ShrimpyTruffle": "虾松露", + "ShroomitePlating": "蘑菇矿镀层", + "ShroomitePlatingWall": "蘑菇矿镀层墙", + "SilkRope": "丝绸绳", + "SilkRopeCoil": "丝绸绳圈", + "SillyBalloonGreen": "呆萌绿气球", + "SillyBalloonGreenWall": "呆萌绿气球墙", + "SillyBalloonMachine": "呆萌气球机", + "SillyBalloonPink": "呆萌粉气球", + "SillyBalloonPinkWall": "呆萌粉气球墙", + "SillyBalloonPurple": "呆萌紫气球", + "SillyBalloonPurpleWall": "呆萌紫气球墙", + "SillyBalloonTiedGreen": "呆萌丝带气球(绿)", + "SillyBalloonTiedPink": "呆萌丝带气球(粉)", + "SillyBalloonTiedPurple": "呆萌丝带气球(紫)", + "SillyStreamerBlue": "蓝饰带", + "SillyStreamerGreen": "绿饰带", + "SillyStreamerPink": "粉饰带", + "SilverAndBlackDye": "银黑染料", + "SkeletronBossBag": "宝藏袋", + "SkeletronPrimeBossBag": "宝藏袋", + "SkeletronPrimeMask": "机械骷髅王面具", + "SkiphsHelm": "Skiphs的面具", + "SkiphsPants": "Skiphs的熊裤", + "SkiphsShirt": "Skiphs的皮肤", + "SkiphsWings": "Skiphs的爪子", + "SkyBlueString": "天蓝绳", + "SkyFracture": "裂天剑", + "SkywareBathtub": "天域浴缸", + "SkywareBed": "天域床", + "SkywareBookcase": "天域书架", + "SkywareCandelabra": "天域烛台", + "SkywareCandle": "天域蜡烛", + "SkywareChandelier": "天域吊灯", + "SkywareClock": "天域时钟", + "SkywareLamp": "天域灯", + "SkywareLantern": "天域灯笼", + "SkywarePlatform": "天域平台", + "SkywareSink": "天域水槽", + "SkywareWorkbench": "天域工作台", + "SlapHand": "拍拍手", + "SliceOfCake": "蛋糕块", + "SlimeBathtub": "史莱姆浴缸", + "SlimeBed": "史莱姆床", + "SlimeBookcase": "史莱姆书架", + "SlimeCandelabra": "史莱姆烛台", + "SlimeCandle": "史莱姆蜡烛", + "SlimeChair": "史莱姆椅", + "SlimeChandelier": "史莱姆吊灯", + "SlimeChest": "史莱姆箱", + "SlimeClock": "史莱姆时钟", + "SlimeDoor": "史莱姆门", + "SlimeDresser": "史莱姆梳妆台", + "SlimeGun": "史莱姆枪", + "SlimeHook": "史莱姆钩", + "SlimeLamp": "史莱姆灯", + "SlimeLantern": "史莱姆灯笼", + "SlimePiano": "史莱姆钢琴", + "SlimePlatform": "史莱姆平台", + "SlimeSink": "史莱姆水槽", + "SlimeSofa": "史莱姆沙发", + "SlimeTable": "史莱姆桌", + "SlimySaddle": "粘鞍", + "Sluggy": "鼻涕虫", + "SmokeBlock": "烟雾块", + "SnailStatue": "蜗牛雕像", + "SnowCloudBlock": "雪云", + "SnowFallBlock": "降雪", + "SnowFallWall": "降雪墙", + "SolarCoriteBanner": "流星火怪旗", + "SolarCrawltipedeBanner": "千足蜈蚣旗", + "SolarDrakomireBanner": "火龙怪旗", + "SolarDrakomireRiderBanner": "火龙怪骑士旗", + "SolarDye": "日耀染料", + "SolarEruption": "日耀喷发剑", + "SolarFlareAxe": "耀斑斧", + "SolarFlareBreastplate": "耀斑胸甲", + "SolarFlareChainsaw": "耀斑链锯", + "SolarFlareDrill": "耀斑钻头", + "SolarFlareHammer": "耀斑锤", + "SolarFlareHelmet": "耀斑头盔", + "SolarFlareLeggings": "耀斑护腿", + "SolarFlarePickaxe": "耀斑镐斧", + "SolarMonolith": "日耀天塔柱", + "SolarSolenianBanner": "火月怪旗", + "SolarSrollerBanner": "火滚怪旗", + "SolarTablet": "日耀碑牌", + "SoulDrain": "夺命杖", + "SparkyPainting": "狗狗斯派基", + "SpectreBar": "幽灵锭", + "SpelunkerGlowstick": "洞穴探险荧光棒", + "SpiderFang": "蜘蛛牙", + "SpiderStaff": "蜘蛛法杖", + "SpiritFlame": "神灯烈焰", + "SpookyBathtub": "阴森浴缸", + "SpookyBed": "阴森床", + "SpookyBookcase": "阴森书架", + "SpookyCandelabra": "阴森大烛台", + "SpookyCandle": "阴森蜡烛", + "SpookyChandelier": "阴森吊灯", + "SpookyChest": "阴森箱", + "SpookyClock": "阴森时钟", + "SpookyLamp": "阴森灯", + "SpookyLantern": "阴森灯笼", + "SpookySink": "阴森水槽", + "SporeSac": "孢子囊", + "SquireGreatHelm": "侍卫大头盔", + "SquireGreaves": "侍卫护胫", + "SquirePlating": "侍卫板甲", + "SquireShield": "侍卫护盾", + "SquirrelGold": "金松鼠", + "SquirrelGoldCage": "金松鼠笼", + "SquirrelOrangeCage": "红松鼠笼", + "SquirrelRed": "红松鼠", + "SquirrelStatue": "松鼠雕像", + "StardustAxe": "星尘斧", + "StardustBreastplate": "星尘板甲", + "StardustCellStaff": "星尘细胞法杖", + "StardustChainsaw": "星尘链锯", + "StardustDragonStaff": "星尘之龙法杖", + "StardustDrill": "星尘钻头", + "StardustDye": "星尘染料", + "StardustHammer": "星尘锤", + "StardustHelmet": "星尘头盔", + "StardustJellyfishBanner": "液体入侵怪旗", + "StardustLargeCellBanner": "星细胞法杖旗", + "StardustLeggings": "星尘护腿", + "StardustMonolith": "星尘天塔柱", + "StardustPickaxe": "星尘镐", + "StardustSmallCellBanner": "小星细胞法杖旗", + "StardustSoldierBanner": "观星怪旗", + "StardustSpiderBanner": "闪耀炮手旗", + "StardustWormBanner": "银河织妖旗", + "Starfish": "海星", + "StarWrath": "狂星之怒", + "StaticHook": "静止钩", + "SteampunkBathtub": "蒸汽朋克浴缸", + "SteampunkBookcase": "蒸汽朋克书架", + "SteampunkCandelabra": "蒸汽朋克烛台", + "SteampunkCandle": "蒸汽朋克蜡烛", + "SteampunkChandelier": "蒸汽朋克吊灯", + "SteampunkChest": "蒸汽朋克箱", + "SteampunkClock": "蒸汽朋克时钟", + "SteampunkCup": "圣餐杯", + "SteampunkDresser": "蒸汽朋克梳妆台", + "SteampunkLamp": "蒸汽朋克灯", + "SteampunkLantern": "蒸汽朋克灯笼", + "SteampunkPiano": "蒸汽朋克钢琴", + "SteampunkPlatform": "蒸汽朋克平台", + "SteampunkSink": "蒸汽朋克水槽", + "SteampunkWorkBench": "蒸汽朋克工作台", + "StickyDynamite": "粘性雷管", + "StickyGrenade": "粘性手榴弹", + "Stopwatch": "秒表", + "StrangeBrew": "诡药", + "StrangePlant1": "奇异植物", + "StrangePlant2": "奇异植物", + "StrangePlant3": "奇异植物", + "StrangePlant4": "奇异植物", + "StylistKilLaKillScissorsIWish": "时尚剪刀", + "SummonerEmblem": "召唤师徽章", + "Sundial": "附魔日晷", + "SunMask": "太阳面具", + "SuperAbsorbantSponge": "超级吸水棉", + "SuperHealingPotion": "超级治疗药水", + "SuspiciousLookingTentacle": "可疑触手", + "SwordfishTrophy": "剑鱼纪念章", + "TallGate": "高门", + "TallyCounter": "杀怪计数器", + "TargetDummy": "傀儡", + "TartarSauce": "塔塔酱", + "TaxCollectorHat": "税收官帽", + "TaxCollectorPants": "税收官裤", + "TaxCollectorsStickOfDoom": "精致手杖", + "TaxCollectorSuit": "税收官套装", + "TealString": "青绳", + "TeamBlockBlue": "蓝团队块", + "TeamBlockBluePlatform": "蓝团队平台", + "TeamBlockGreen": "绿团队块", + "TeamBlockGreenPlatform": "绿团队平台", + "TeamBlockPink": "粉团队块", + "TeamBlockPinkPlatform": "粉团队平台", + "TeamBlockRed": "红团队块", + "TeamBlockRedPlatform": "红团队平台", + "TeamBlockWhite": "白团队块", + "TeamBlockWhitePlatform": "白团队平台", + "TeamBlockYellow": "黄团队块", + "TeamBlockYellowPlatform": "黄团队平台", + "TempestStaff": "暴风雨法杖", + "TendonHook": "肌腱钩", + "Terrarian": "泰拉悠悠球", + "TheBrideDress": "婚裙", + "TheBrideHat": "面纱", + "TheEyeOfCthulhu": "克苏鲁之眼", + "ThePossessedBanner": "攀爬魔旗", + "ThornHook": "刺钩", + "TinPlating": "锡镀层", + "TinPlatingWall": "镀锡墙", + "TombCrawlerBanner": "墓穴爬虫旗", + "TopazGemsparkWall": "黄玉晶莹宝石墙", + "TopazGemsparkWallOff": "黯淡黄玉晶莹宝石墙", + "ToxicFlask": "毒气瓶", + "Toxikarp": "毒弹枪", + "Trapdoor": "机关门", + "TruffleWorm": "松露虫", + "Tsunami": "海啸", + "TsunamiInABottle": "海啸瓶", + "TumbleweedBanner": "愤怒翻滚怪旗", + "TwilightDye": "暮光染料", + "TwilightHairDye": "暮光染发剂", + "TwinMask": "双子魔眼面具", + "TwinsBossBag": "宝藏袋", + "UltraBrightCampfire": "超亮篝火", + "UndeadVikingStatue": "亡灵维京海盗雕像", + "UnicornStatue": "独角兽雕像", + "UnicornWispDye": "独角妖灵染料", + "ValkyrieYoyo": "女武神悠悠球", + "Valor": "英勇球", + "ViciousMushroom": "毒蘑菇", + "ViciousPowder": "毒粉", + "VineRope": "藤蔓绳", + "VineRopeCoil": "藤蔓绳圈", + "VioletString": "紫罗兰绳", + "VoidDye": "缥缈染料", + "VortexAxe": "星旋斧", + "VortexBeater": "星旋机枪", + "VortexBreastplate": "星旋胸甲", + "VortexChainsaw": "星旋链锯", + "VortexDrill": "星旋钻头", + "VortexDye": "星旋染料", + "VortexHammer": "星旋锤", + "VortexHelmet": "星旋头盔", + "VortexHornetBanner": "异星黄蜂旗", + "VortexHornetQueenBanner": "异星蜂王旗", + "VortexLarvaBanner": "异星幼虫旗", + "VortexLeggings": "星旋护腿", + "VortexMonolith": "星旋天塔柱", + "VortexPickaxe": "星旋镐", + "VortexRiflemanBanner": "漩泥怪旗", + "VortexSoldierBanner": "星旋怪旗", + "WalkingAntlionBanner": "蚁狮马旗", + "WallAnchor": "墙锚", + "WallCreeperStatue": "爬墙蜘蛛雕像", + "WallOfFleshBossBag": "宝藏袋", + "WandofSparking": "火花魔棒", + "WarTable": "战争桌", + "WarTableBanner": "战争桌旗", + "WaterfallBlock": "瀑布块", + "WaterleafPlanterBox": "幌菊花盆", + "WeaponRack": "武器架", + "WeatherRadio": "天气收音机", + "WebRope": "蛛丝绳", + "WebRopeCoil": "蛛丝绳圈", + "WeightedPressurePlateCyan": "青色加重压力板", + "WeightedPressurePlateOrange": "橙色加重压力板", + "WeightedPressurePlatePink": "粉色加重压力板", + "WeightedPressurePlatePurple": "紫色加重压力板", + "WhiteLunaticHood": "日耀邪教徒兜帽", + "WhiteLunaticRobe": "日耀邪教徒长袍", + "WhitePhasesaber": "白晶光刃", + "WhiteString": "白绳", + "WineGlass": "葡萄酒杯", + "WingsNebula": "星云斗篷", + "WingsSolar": "日耀之翼", + "WingsStardust": "星尘之翼", + "WingsVortex": "星旋强化翼", + "WireBulb": "彩线灯泡", + "WireKite": "精密线控仪", + "WirePipe": "分线盒", + "WispDye": "妖灵染料", + "WoodenSink": "木水槽", + "WoodYoyo": "木悠悠球", + "WormholePotion": "虫洞药水", + "WormHook": "蠕虫钩", + "WormScarf": "蠕虫围巾", + "WormStatue": "蠕虫雕像", + "WraithStatue": "幻灵雕像", + "Xenopopper": "外星霰弹枪", + "XenoStaff": "外星法杖", + "Yelets": "叶列茨球", + "YellowCounterweight": "黄平衡锤", + "YellowPhasesaber": "黄晶光刃", + "YellowString": "黄绳", + "YellowWrench": "黄扳手", + "Yoraiz0rDarkness": "Yoraiz0r的怒容", + "Yoraiz0rHead": "Yoraiz0r的染色护目镜", + "Yoraiz0rPants": "Yoraiz0r的裙", + "Yoraiz0rShirt": "Yoraiz0r的制服", + "Yoraiz0rWings": "Yoraiz0r的魔法", + "YoyoBag": "悠悠球袋", + "YoYoGlove": "悠悠球手套", + "ZombieArmStatue": "武装僵尸雕像", + "AleThrowingGlove": "麦芽酒投掷器", + "ApprenticeAltHead": "暗黑艺术家帽子", + "ApprenticeAltPants": "暗黑艺术家护腿", + "ApprenticeAltShirt": "暗黑艺术家长袍", + "ApprenticeStaffT3": "双足翼龙怒气", + "BetsyWings": "双足翼龙之翼", + "BookStaff": "无限智慧巨著", + "BossMaskBetsy": "双足翼龙面具", + "BossMaskDarkMage": "暗黑魔法师面具", + "BossMaskOgre": "食人魔面具", + "BossTrophyBetsy": "双足翼龙纪念章", + "BossTrophyDarkmage": "暗黑魔法师纪念章", + "BossTrophyOgre": "食人魔纪念章", + "CrystalBathtub": "水晶浴缸", + "CrystalBed": "水晶床", + "CrystalBookCase": "水晶书架", + "CrystalCandelabra": "水晶烛台", + "CrystalCandle": "水晶蜡烛", + "CrystalChair": "水晶椅子", + "CrystalChandelier": "水晶吊灯", + "CrystalChest": "水晶宝箱", + "CrystalClock": "水晶时钟", + "CrystalDoor": "水晶门", + "CrystalDresser": "水晶梳妆台", + "CrystalLamp": "水晶灯", + "CrystalLantern": "水晶灯笼", + "CrystalPiano": "水晶钢琴", + "CrystalPlatform": "水晶平台", + "CrystalSink": "水晶水槽", + "CrystalSofaHowDoesThatEvenWork": "水晶沙发", + "CrystalTable": "水晶桌", + "CrystalWorkbench": "水晶工作台", + "DD2BallistraTowerT1Popper": "弩车魔杖", + "DD2BallistraTowerT2Popper": "弩车手杖", + "DD2BallistraTowerT3Popper": "弩车法杖", + "DD2BetsyBow": "空中祸害", + "DD2DrakinBanner": "德拉克龙旗", + "DD2ElderCrystal": "埃特尼亚水晶", + "DD2ElderCrystalStand": "埃特尼亚水晶座", + "DD2EnergyCrystal": "天国魔力", + "DD2ExplosiveTrapT1Popper": "爆炸机关魔杖", + "DD2ExplosiveTrapT2Popper": "爆炸机关手杖", + "DD2ExplosiveTrapT3Popper": "爆炸机关法杖", + "DD2FlameburstTowerT1Popper": "爆炸烈焰魔杖", + "DD2FlameburstTowerT2Popper": "爆炸烈焰手杖", + "DD2FlameburstTowerT3Popper": "爆炸烈焰法杖", + "DD2GoblinBanner": "天国哥布林旗", + "DD2GoblinBomberBanner": "天国哥布林投弹手旗", + "DD2JavelinThrowerBanner": "天国标枪投掷怪旗", + "DD2KoboldBanner": "小妖魔旗", + "DD2KoboldFlyerBanner": "小妖魔滑翔怪旗", + "DD2LightningAuraT1Popper": "闪电光环魔杖", + "DD2LightningAuraT2Popper": "闪电光环手杖", + "DD2LightningAuraT3Popper": "闪电光环法杖", + "DD2LightningBugBanner": "天国荧光虫旗", + "DD2PetDragon": "龙蛋", + "DD2PetGato": "Gato蛋", + "DD2PetGhost": "飞眼怪蛋", + "DD2PhoenixBow": "幽灵凤凰", + "DD2SkeletonBanner": "撒旦骷髅旗", + "DD2SquireBetsySword": "飞龙", + "DD2SquireDemonSword": "地狱烙印", + "DD2WitherBeastBanner": "枯萎兽旗", + "DD2WyvernBanner": "天国飞龙旗", + "DungeonClockBlue": "蓝地牢时钟", + "DungeonClockGreen": "绿地牢时钟", + "DungeonClockPink": "粉地牢时钟", + "DynastyDresser": "王朝梳妆台", + "DynastyPiano": "王朝钢琴", + "DynastyPlatform": "王朝平台", + "DynastySofa": "王朝沙发", + "Fake_CrystalChest": "受困水晶宝箱", + "Fake_GoldenChest": "受困金色宝箱", + "FleshPlatform": "血肉平台", + "FrozenDresser": "冰冻梳妆台", + "FrozenPlatform": "冰冻平台", + "GoldenChest": "金色宝箱", + "GoldenPlatform": "金色平台", + "GoldenWorkbench": "金色工作台", + "HuntressAltHead": "红色骑术兜帽", + "HuntressAltPants": "红色骑术护腿", + "HuntressAltShirt": "红色骑术服", + "LihzahrdPlatform": "丛林蜥蜴平台", + "LivingWoodDresser": "生命木梳妆台", + "MonkAltHead": "渗透忍者头盔", + "MonkAltPants": "渗透忍者裤装", + "MonkAltShirt": "渗透忍者上衣", + "MonkStaffT1": "瞌睡章鱼", + "MonkStaffT2": "恐怖关刀", + "MonkStaffT3": "天龙之怒", + "SquireAltHead": "英灵殿骑士头盔", + "SquireAltPants": "英灵殿骑士护胫", + "SquireAltShirt": "英灵殿骑士胸甲", + "SkywareClock2": "日盘时钟", + "ArkhalisHat": "Arkhalis的兜帽", + "ArkhalisShirt": "Arkhalis的紧身衣", + "ArkhalisPants": "Arkhalis的紧身服", + "ArkhalisWings": "Arkhalis的飞翼", + "LeinforsHat": "Leinfors的护发器", + "LeinforsShirt": "Leinfors的奇异风", + "LeinforsPants": "Leinfors的潮裤", + "LeinforsWings": "Leinfors的卷缠斗篷", + "LeinforsAccessory": "Leinfors的奢华洗发液", + "GraniteGolemBanner": "花岗岩巨人横幅", + "RavagerScorpionBanner": "沙贼横幅", + "MusicBoxDD2": "音乐盒(撒旦军队)", + "BossBagBetsy": "{$ItemName.SkeletronBossBag}", + "ManaCloakStar": "" + }, + "ItemTooltip": { + "ShadowGreaves": "近战速度提高7%", + "ConfettiGun": "到处喷射彩纸!", + "ChlorophyteMask": "近战伤害增加16%\n近战暴击率增加6%", + "ChlorophyteHelmet": "远程伤害增加16%\n20%的几率不消耗弹药", + "ChlorophyteHeadgear": "最大魔力值增加80,同时魔力使用率减少17%\n魔法伤害增加16%", + "ChlorophytePlateMail": "伤害增加5%\n暴击率增加7%", + "ChlorophyteGreaves": "暴击率增加8%\n移动速度提高5%", + "ChlorophyteBar": "对光作出反应", + "ShadowScalemail": "近战速度提高7%", + "ShadowHelmet": "近战速度提高7%", + "NightmarePickaxe": "能够开采狱石", + "Paintbrush": "与漆结合使用,给块涂色", + "PaintRoller": "与漆结合使用,给墙壁涂色", + "ManaCrystal": "最大魔力值永久增加20", + "PaintScraper": "用于除漆", + "TealMushroom": "用于制作青绿染料", + "GreenMushroom": "用于制作绿染料", + "SkyBlueFlower": "用于制作天蓝染料", + "BandofStarpower": "最大魔力值增加20", + "YellowMarigold": "用于制作黄染料", + "BlueBerries": "用于制作蓝染料", + "LimeKelp": "用于制作橙绿染料", + "PinkPricklyPear": "用于制作粉染料", + "OrangeBloodroot": "用于制作橙染料", + "RedHusk": "用于制作红染料", + "CyanHusk": "用于制作青染料", + "VioletHusk": "用于制作蓝紫染料", + "PurpleMucos": "用于制作紫染料", + "BlackInk": "用于制作黑染料", + "FlowerofFire": "投掷火光球", + "DyeVat": "用于制作燃料", + "BeeGun": "射出会追杀敌人的蜜蜂", + "PossessedHatchet": "追杀敌人", + "BeeKeeper": "攻击敌人后召唤杀人蜂\n有较小的几率造成混乱", + "HiveWand": "放置蜂巢", + "MagicMissile": "投掷一枚可控的导弹", + "Beenade": "爆炸成一大群蜜蜂", + "GravityGlobe": "可让持有者反转重力\n按UP可更改重力", + "HoneyComb": "受伤时释放蜜蜂", + "Abeemination": "召唤蜂王", + "DirtRod": "用魔法移动土", + "TempleKey": "打开丛林神庙门", + "LihzahrdWorkBench": "用于基础制作", + "ShadowOrb": "制作魔法暗影珠", + "LihzahrdPressurePlate": "玩家踩上时激活", + "PiranhaGun": "缠住敌人以造成连续伤害", + "PygmyStaff": "召唤矮人来为你战斗", + "PygmyNecklace": "提高仆从数量上限", + "TikiMask": "提高仆从数量上限\n仆从伤害增加10%", + "TikiShirt": "提高仆从数量上限\n仆从伤害增加10%", + "TikiPants": "提高仆从数量上限\n仆从伤害增加10%", + "LeafWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BlizzardinaBalloon": "可让持有者二连跳\n增加跳跃高度", + "BundleofBalloons": "可让持有者四连跳\n增加跳跃高度", + "BatWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "HerculesBeetle": "仆从的伤害增加15%\n提高仆从的击退力", + "BoneKey": "召唤骷髅王宝宝头", + "MeteoriteBar": "“摸起来很温暖”", + "Nectar": "召唤黄蜂宝宝", + "TikiTotem": "召唤提基幽魂", + "LizardEgg": "召唤宠物蜥蜴", + "LeafBlower": "迅速射出锋利的树叶", + "ChlorophyteBullet": "追杀敌人", + "Hook": "有时会从骷髅和食人鱼身上掉落", + "ParrotCracker": "召唤宠物鹦鹉", + "StrangeGlowingMushroom": "召唤松露人宝宝", + "Seedling": "召唤宠物树苗", + "WispinaBottle": "召唤妖灵来提供照明", + "PalladiumPickaxe": "可开采秘银和山铜", + "PalladiumDrill": "可开采秘银和山铜", + "OrichalcumPickaxe": "可开采精金和钛金", + "OrichalcumDrill": "可开采精金和钛金", + "MoltenFury": "点燃闪耀的木箭", + "PalladiumMask": "近战伤害增加8%\n近战速度提高12%", + "PalladiumHelmet": "远程伤害增加9%\n远程暴击率增加9%", + "PalladiumHeadgear": "魔法伤害和暴击率各增加7%\n最大魔力值增加60", + "PalladiumBreastplate": "伤害增加3%\n暴击率增加2%", + "PalladiumLeggings": "伤害增加2%\n暴击率增加1%", + "FieryGreatsword": "“它是火焰做的!”", + "OrichalcumMask": "近战伤害增加7%\n移动和近战速度各提高7%", + "OrichalcumHelmet": "远程暴击率增加15%\n移动速度提高8%", + "OrichalcumHeadgear": "魔法暴击率增加18%\n最大魔力值增加80", + "OrichalcumBreastplate": "暴击率增加6%", + "OrichalcumLeggings": "移动速度提高11%", + "TitaniumMask": "近战伤害和暴击率各增加8%\n近战速度提高8%", + "TitaniumHelmet": "远程伤害增加16%\n远程暴击率增加7%", + "TitaniumHeadgear": "魔法伤害增加16%,魔法暴击率增加7%\n最大魔力值增加100", + "TitaniumBreastplate": "伤害增加4%\n暴击率增加3%", + "TitaniumLeggings": "伤害和暴击率各增加3%\n移动速度提高6%", + "OrichalcumAnvil": "用于制作以秘银、山铜、精金和钛金锭为原料的物品", + "TitaniumForge": "用于熔炼精金和钛金矿", + "ChlorophyteClaymore": "射出强大的球珠", + "ChlorophyteSaber": "射出孢子云", + "ChlorophytePartisan": "射出孢子云", + "MeteorHelmet": "魔法伤害增加7%", + "ChlorophyteArrow": "撞墙后弹回", + "MeteorSuit": "魔法伤害增加7%", + "AmberMosquito": "召唤恐龙宝宝", + "NimbusRod": "召唤云来让敌人淋雨", + "BeeCloak": "受伤时会使星星坠落并释放蜜蜂", + "EyeoftheGolem": "暴击率增加10%", + "HoneyBalloon": "增加跳跃高度\n受伤时释放蜜蜂", + "MeteorLeggings": "魔法伤害增加7%", + "BlueHorseshoeBalloon": "可让持有者二连跳\n增加跳跃高度,减轻坠落伤害", + "WhiteHorseshoeBalloon": "可让持有者二连跳\n增加跳跃高度,减轻坠落伤害", + "YellowHorseshoeBalloon": "可让持有者二连跳\n增加跳跃高度,减轻坠落伤害", + "FrozenTurtleShell": "生命值低于50%时在所有者周围放置可减少伤害的外壳", + "SniperRifle": "射出威力无穷的高射速子弹\n可缩小", + "VenusMagnum": "射出威力无穷的高射速子弹", + "CrimsonRod": "召唤云来让敌人淋血雨", + "Stynger": "射出爆炸矢", + "FlowerPow": "朝附近的敌人射出锋利的花瓣", + "RainbowGun": "射出造成连续伤害的彩虹", + "StyngerBolt": "爆炸成致命的弹片", + "FlowerofFrost": "射出寒霜球", + "Uzi": "射出威力无穷的高射速子弹", + "RocketBoots": "可飞行", + "AmethystRobe": "最大魔力值增加20\n魔力使用率减少5%", + "TopazRobe": "最大魔力值增加40\n魔力使用率减少7%", + "SapphireRobe": "最大魔力值增加40\n魔力使用率减少9%", + "EmeraldRobe": "最大魔力值增加60\n魔力使用率减少11%", + "RubyRobe": "最大魔力值增加60\n魔力使用率减少13%", + "DiamondRobe": "最大魔力值增加80\n魔力使用率减少15%", + "PanicNecklace": "被击中后提高移动速度", + "LifeFruit": "最大生命值永久增加5", + "LihzahrdPowerCell": "在丛林蜥蜴祭坛使用", + "Picksaw": "可开采丛林蜥蜴砖", + "HeatRay": "射出锐利的高温射线\n“喔啦!”", + "StaffofEarth": "召唤强大的巨石", + "GolemFist": "以石巨人之力出拳", + "Binoculars": "持握时扩大视野范围", + "RifleScope": "增加枪的可视范围\n可缩小", + "DestroyerEmblem": "伤害增加10%\n暴击率增加8%", + "JellyfishNecklace": "在水下提供照明", + "IceSickle": "射出冰雪镰刀", + "ClothierVoodooDoll": "“你是个可怕的人”", + "PoisonStaff": "射出刺穿多个敌人的毒牙", + "SlimeStaff": "召唤史莱姆宝宝来为你战斗", + "PoisonDart": "对敌人施毒", + "EyeSpring": "召唤弹簧眼", + "ToySled": "召唤雪人宝宝", + "BookofSkulls": "射出骷髅头", + "KOCannon": "射出拳击手套", + "PirateMap": "召唤海盗入侵", + "TurtleHelmet": "近战伤害增加6%\n敌人更有可能瞄准你", + "TurtleScaleMail": "近战伤害和暴击率各增加8%\n敌人更有可能瞄准你", + "TurtleLeggings": "近战暴击率增加4%\n敌人更有可能瞄准你", + "MagicQuiver": "伤害增加10%,箭头速度大大提高\n20%的几率不消耗箭", + "MagmaStone": "攻击时造成燃火伤害", + "ObsidianRose": "减少因触碰熔岩而受到的伤害", + "RodofDiscord": "将你传送至鼠标的位置", + "DeathSickle": "射出致命镰刀", + "BloodySpine": "召唤克苏鲁之脑", + "Ichor": "“众神之血”", + "IchorTorch": "可放置在水中", + "IchorArrow": "降低目标的防御力", + "IchorBullet": "降低目标的防御力", + "GoldenShower": "喷射一阵灵液\n降低目标的防御力", + "FireGauntlet": "攻击时提高近战击退力并造成燃火伤害\n近战伤害和速度各增加10%", + "ImbuingStation": "用于制作武器灌注瓶", + "EmptyBullet": "用于制作各种弹药", + "ShadowbeamStaff": "产生会从墙上弹回的暗影光束", + "InfernoFork": "发射爆炸成熊熊狱火的火光球", + "SpectreStaff": "召唤亡魂来追杀敌人", + "BubbleMachine": "吹泡泡", + "BubbleWand": "吹泡泡", + "WaterCandle": "持此物可能会引起不必要的注意", + "Book": "“上面写着奇怪的符号”", + "CopperWatch": "报时", + "SpectreHood": "魔法伤害减少40%", + "SpectreRobe": "魔法伤害和暴击率各增加7%", + "SpectrePants": "魔法伤害增加8%\n移动速度提高8%", + "NecroHelmet": "远程伤害增加5%。", + "PaladinsHammer": "威力强大的回旋锤", + "BeeWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "NecroBreastplate": "远程伤害增加5%。", + "LargeAmethyst": "适合夺取宝石。你死后掉落", + "LargeTopaz": "适合夺取宝石。你死后掉落", + "LargeSapphire": "适合夺取宝石。你死后掉落", + "LargeEmerald": "适合夺取宝石。你死后掉落", + "LargeRuby": "适合夺取宝石。你死后掉落", + "LargeDiamond": "适合夺取宝石。你死后掉落", + "NecroGreaves": "远程伤害增加5%。", + "JungleKey": "打开地牢中的丛林箱", + "CorruptionKey": "打开地牢中的腐化箱", + "CrimsonKey": "打开地牢中的猩红箱", + "HallowedKey": "打开地牢中的神圣箱", + "FrozenKey": "打开地牢中的冰冻箱", + "SpectrePaintbrush": "与漆结合使用,给块涂色", + "SpectrePaintRoller": "与漆结合使用,给墙壁涂色", + "SpectrePaintScraper": "用于除漆", + "ShroomiteHeadgear": "箭的伤害增加15%\n远程暴击率增加5%", + "ShroomiteMask": "子弹的伤害增加15%\n远程暴击率增加5%", + "ShroomiteHelmet": "火箭伤害增加15%\n远程暴击率增加5%", + "ShroomiteBreastplate": "远程暴击率增加13%\n20%的几率不消耗弹药", + "ShroomiteLeggings": "远程暴击率增加7%\n移动速度提高12%", + "Autohammer": "将叶绿锭转化成蘑菇矿锭", + "SDMG": "50%的几率不消耗弹药\n“它来自太空边缘”", + "CenxsTiara": "{$CommonItemTooltip.DevItem}", + "CenxsBreastplate": "{$CommonItemTooltip.DevItem}", + "CenxsLeggings": "{$CommonItemTooltip.DevItem}", + "CrownosMask": "{$CommonItemTooltip.DevItem}", + "CrownosBreastplate": "{$CommonItemTooltip.DevItem}", + "CrownosLeggings": "{$CommonItemTooltip.DevItem}", + "CobaltShield": "对击退免疫", + "WillsHelmet": "{$CommonItemTooltip.DevItem}", + "WillsBreastplate": "{$CommonItemTooltip.DevItem}", + "WillsLeggings": "{$CommonItemTooltip.DevItem}", + "JimsHelmet": "{$CommonItemTooltip.DevItem}", + "JimsBreastplate": "{$CommonItemTooltip.DevItem}", + "JimsLeggings": "{$CommonItemTooltip.DevItem}", + "AaronsHelmet": "{$CommonItemTooltip.DevItem}", + "AaronsBreastplate": "{$CommonItemTooltip.DevItem}", + "AaronsLeggings": "{$CommonItemTooltip.DevItem}", + "VampireKnives": "快速投掷出夺命飞刀", + "AquaScepter": "喷射一阵水", + "ScourgeoftheCorruptor": "能释放小吞噬怪的强大标枪", + "StaffoftheFrostHydra": "召唤强大的寒霜九头蛇,以朝敌人吐冰雪", + "SweetheartNecklace": "受伤时释放蜜蜂并提高移动速度", + "FlurryBoots": "穿戴者可飞速奔跑", + "LuckyHorseshoe": "使掉落伤害无效", + "DTownsHelmet": "{$CommonItemTooltip.DevItem}", + "DTownsBreastplate": "{$CommonItemTooltip.DevItem}", + "DTownsLeggings": "{$CommonItemTooltip.DevItem}", + "DTownsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "WillsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "CrownosWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "CenxsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "CenxsDress": "{$CommonItemTooltip.DevItem}", + "CenxsDressPants": "{$CommonItemTooltip.DevItem}", + "ShinyRedBalloon": "增加跳跃高度", + "MagicCuffs": "最大魔力值增加20\n受伤时恢复魔力", + "SilverWatch": "报时", + "AnkhCharm": "对大部分减益免疫", + "AnkhShield": "对击退和火块免疫\n对大部分减益免疫", + "WaterBolt": "投出移动缓慢的水矢", + "Bomb": "可摧毁一些图格的小炸弹", + "Dynamite": "可摧毁大部分图格的大炸弹", + "Grenade": "不会摧毁图格的小炸弹", + "GoldWatch": "报时", + "FartinaJar": "可让持有者二连跳", + "HellstoneBar": "“摸起来烫手”", + "LeprechaunHat": "对我来说,它让我看起来就像个矮妖", + "LeprechaunShirt": "我只想知道金子在哪儿!", + "LeprechaunPants": "我要金子。我要金子。我要金子。给我金子!", + "GoodieBag": "{$CommonItemTooltip.RightClickToOpen}", + "CandyCornRifle": "33%的几率不消耗弹药", + "Sickle": "可从草地收集干草", + "PumpkinPie": "{$CommonItemTooltip.MinorStats}", + "TatteredFairyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "SpiderEgg": "召唤宠物蜘蛛", + "MagicalPumpkinSeed": "召唤宠物南瓜娃娃", + "DepthMeter": "显示深度", + "BatScepter": "召唤蝙蝠攻击敌人", + "RavenStaff": "召唤乌鸦来为你战斗", + "JungleKeyMold": "用于制作丛林钥匙", + "CorruptionKeyMold": "用于制作腐化钥匙", + "CrimsonKeyMold": "用于制作猩红钥匙", + "HallowedKeyMold": "用于制作神圣钥匙", + "FrozenKeyMold": "用于制作冰冻钥匙", + "RottenEgg": "最适合用于戏弄乡亲", + "UnluckyYarn": "召唤黑猫", + "TheHorsemansBlade": "召唤南瓜头来攻击敌人", + "SpookyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "SpookyHelmet": "提高仆从数量上限\n仆从伤害增加11%", + "SpookyBreastplate": "提高仆从数量上限\n仆从伤害增加11%", + "SpookyLeggings": "提高仆从数量上限\n仆从伤害增加11%", + "CursedSapling": "召唤诅咒树苗来跟着你", + "PumpkinMoonMedallion": "召唤南瓜月", + "NecromanticScroll": "提高仆从数量上限\n仆从伤害增加10%", + "SniperScope": "增加枪的可视范围(可缩小)\n远程伤害和暴击率各增加10%", + "BreathingReed": "延长呼吸时间并可在水中呼吸", + "JellyfishDivingGear": "可游泳并大大延长水下呼吸时间\n在水下提供照明", + "ArcticDivingGear": "可游泳并大大延长水下呼吸时间\n在水下提供照明,并额外提供冰上移动能力", + "FrostsparkBoots": "可飞行、飞速奔跑,还可在冰上行走\n移动速度提高7%", + "FartInABalloon": "可让持有者二连跳\n增加跳跃高度", + "PapyrusScarab": "提高仆从数量上限\n提高仆从的伤害和击退力", + "CelestialStone": "小幅增加伤害、近战速度、暴击率、\n生命再生、防御力、拾取速度和仆从击退力", + "Hoverboard": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "Present": "{$CommonItemTooltip.RightClickToOpen}", + "Flipper": "可游泳", + "RedRyder": "“别把自己的眼球射出来了!”", + "FestiveWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BladeofGrass": "有机会使敌人中毒", + "EldMelter": "将凝胶用作弹药", + "ChristmasPudding": "{$CommonItemTooltip.MinorStats}", + "ReindeerBells": "召唤可骑乘的驯鹿", + "CnadyCanePickaxe": "可开采陨石", + "SugarCookie": "{$CommonItemTooltip.MinorStats}", + "GingerbreadCookie": "{$CommonItemTooltip.MinorStats}", + "HandWarmer": "对寒冷和冰冻效果免疫", + "Coal": "“你今年很淘气”", + "Toolbox": "物品放置和工具范围增加1", + "DogWhistle": "召唤小狗", + "ChristmasTreeSword": "射出圣诞装饰", + "ChainGun": "50%的几率不消耗弹药", + "ObsidianSkull": "对火块免疫", + "Razorpine": "射出锋利的松针", + "BlizzardStaff": "降落一定范围的冰锥", + "SnowmanCannon": "发射自动寻的导弹", + "NorthPole": "射出下雪花的冰矛", + "NaughtyPresent": "召唤霜月", + "BabyGrinchMischiefWhistle": "召唤格林奇宝宝", + "StarCannon": "射出坠落之星", + "Fez": "“土耳其毡帽很酷”", + "JungleRose": "“美,太美了”", + "FeralClaws": "近战速度提高12%", + "AnkletoftheWind": "移动速度提高10%", + "StaffofRegrowth": "在土和石头上创建草地与苔藓\n用它收集时,可提高炼金植物收集速度", + "WhoopieCushion": "“会惹恼别人”", + "HeavyWorkBench": "用于高级制作", + "AmmoBox": "弹药使用率减少20%", + "Flamelash": "召唤可控的火光球", + "VenomStaff": "射出刺穿多个敌人的毒液尖牙", + "SpectreMask": "最大魔力值增加60,同时魔力使用率减少13%\n魔法伤害和暴击率各增加5%", + "BoneWelder": "{$CommonItemTooltip.SpecialCrafting}", + "FleshCloningVaat": "{$CommonItemTooltip.SpecialCrafting}", + "GlassKiln": "{$CommonItemTooltip.SpecialCrafting}", + "LihzahrdFurnace": "{$CommonItemTooltip.SpecialCrafting}", + "LivingLoom": "{$CommonItemTooltip.SpecialCrafting}", + "SkyMill": "{$CommonItemTooltip.SpecialCrafting}", + "IceMachine": "{$CommonItemTooltip.SpecialCrafting}", + "BeetleHelmet": "近战伤害增加6%\n敌人更有可能瞄准你", + "BeetleScaleMail": "近战伤害和暴击率各增加8%\n移动和近战速度各提高6%", + "BeetleShell": "近战伤害和暴击率各增加5%\n敌人更有可能瞄准你", + "BeetleLeggings": "移动和近战速度各提高6%\n敌人更有可能瞄准你", + "SteampunkBoiler": "{$CommonItemTooltip.SpecialCrafting}", + "HoneyDispenser": "{$CommonItemTooltip.SpecialCrafting}", + "BrickLayer": "增加图格放置速度", + "ExtendoGrip": "扩大图格触及范围", + "PaintSprayer": "自动喷涂放置好的物品", + "PortableCementMixer": "提高砌墙速度", + "CelestialMagnet": "扩大魔力星的拾取范围", + "ClayPot": "种植物", + "CelestialEmblem": "扩大魔力星的拾取范围\n魔法伤害增加15%", + "CelestialCuffs": "扩大魔力星的拾取范围\n受伤时恢复魔力", + "PulseBow": "射出带电的箭", + "NaturesGift": "魔力消耗减少6%", + "PadThai": "{$CommonItemTooltip.MinorStats}", + "Pho": "{$CommonItemTooltip.MinorStats}", + "RestorationPotion": "缩短药水冷却时间", + "Gatligator": "50%的几率不消耗弹药\n非常不准确", + "WaterGun": "喷射无害水流", + "MagicHat": "魔法伤害和暴击率各增加7%", + "Gi": "伤害和暴击率各增加5%\n近战和移动速度各提高10%", + "GypsyRobe": "魔法伤害和暴击率各增加6%\n魔力使用率减少10%", + "JungleHat": "最大魔力值增加40\n魔法暴击率增加4%", + "BeetleWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "JungleShirt": "最大魔力值增加20\n魔法暴击率增加4%", + "Gel": "“既好吃,又易燃”", + "JunglePants": "最大魔力值增加20\n魔法暴击率增加4%", + "NeonTetra": "“它的鳞片五光十色,可能很好卖。”", + "GoldenCarp": "亮闪闪。这大概会很畅销。", + "MiningPotion": "采矿速度提高25%", + "HeartreachPotion": "扩大生命之心的拾取范围", + "CalmingPotion": "降低敌人攻击力", + "BuilderPotion": "提高放置速度和扩大放置范围", + "TitanPotion": "提高击退力", + "FlipperPotion": "让你在液体中迅速移动", + "SummoningPotion": "提高仆从数量上限", + "TrapsightPotion": "允许你查看附近的危险源", + "WoodenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "IronCrate": "{$CommonItemTooltip.RightClickToOpen}", + "GoldenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "AmmoReservationPotion": "20%的几率不消耗弹药", + "LifeforcePotion": "最大生命值增加20%", + "EndurancePotion": "所受伤害减少10%", + "RagePotion": "暴击率增加10%", + "InfernoPotion": "点燃附近的敌人", + "WrathPotion": "伤害增加10%", + "StickyBomb": "“投出去可不是件易事。”", + "RecallPotion": "将你传送回家", + "TeleportationPotion": "将你传送至随机位置", + "LovePotion": "投掷此物可让人坠入爱河", + "StinkPotion": "投掷此物可让人闻起来恶心", + "FishingPotion": "提高钓鱼技能", + "SonarPotion": "查明上钩的鱼", + "CratePotion": "增加获得宝匣的几率", + "WarmthPotion": "减少冷系伤害", + "BeeHeadgear": "仆从伤害增加4%\n提高仆从数量上限", + "BeeBreastplate": "仆从伤害增加4%\n提高仆从数量上限", + "BeeGreaves": "仆从伤害增加5%", + "HornetStaff": "召唤黄蜂来为你战斗", + "ImpStaff": "召唤小鬼来为你战斗", + "AnglerHat": "提高钓鱼水平", + "AnglerVest": "提高钓鱼水平", + "AnglerPants": "提高钓鱼水平", + "Sunglasses": "“让你看起来酷酷的!”", + "SpiderMask": "提高仆从数量上限\n仆从伤害增加6%", + "SpiderBreastplate": "提高仆从数量上限\n仆从伤害增加6%", + "SpiderGreaves": "提高仆从数量上限\n仆从伤害增加6%", + "HighTestFishingLine": "钓鱼线永远都不会断", + "AnglerEarring": "提高钓鱼技能", + "TackleBox": "减少鱼饵消耗率", + "WizardHat": "魔法伤害增加15%", + "ZephyrFish": "召唤宠物和风鱼", + "FrogLeg": "提高跳跃速度,并允许自动跳跃\n增加坠落阻力", + "CookedFish": "{$CommonItemTooltip.MinorStats}", + "CookedShrimp": "{$CommonItemTooltip.MinorStats}", + "Sashimi": "{$CommonItemTooltip.MinorStats}", + "FinWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "OpticStaff": "召唤双子魔眼来为你战斗", + "RedHat": "闻起来怪怪的...", + "Goldfish": "“它笑眯眯的,应该是个不错的零食”", + "Sandgun": "“这主意不错!”", + "GuideVoodooDoll": "“你是个可怕的人。”", + "DivingHelmet": "大大延长水下呼吸时间", + "DemonScythe": "投掷恶魔锄刀", + "Blowpipe": "可收集种子作为弹药", + "Glowstick": "弄湿后有效", + "Seed": "搭配吹管使用", + "Aglet": "移动速度提高5%", + "ObsidianSkinPotion": "对熔岩免疫", + "RegenerationPotion": "提供生命再生", + "LifeCrystal": "最大生命值永久增加20", + "SwiftnessPotion": "移动速度提高25%", + "GillsPotion": "可在水中而非空气中呼吸", + "IronskinPotion": "防御力增加8点", + "ManaRegenerationPotion": "增加魔力再生", + "MagicPowerPotion": "魔法伤害增加20%", + "FeatherfallPotion": "减缓坠落速度", + "SpelunkerPotion": "显示宝藏和矿石的位置", + "InvisibilityPotion": "可隐身", + "ShinePotion": "发出光环", + "NightOwlPotion": "提升夜视力", + "BattlePotion": "提高敌人生成速度", + "ThornsPotion": "攻击者也会受伤", + "WaterWalkingPotion": "可在水上行走", + "ArcheryPotion": "箭的速度和伤害各增加20%", + "HunterPotion": "显示敌人位置", + "GravitationPotion": "可控制重力", + "IllegalGunParts": "“在大多数地方禁用”", + "GoldenKey": "打开一个金箱或地牢箱", + "ShadowKey": "打开所有暗影箱", + "Furnace": "用于熔炼矿石", + "Loom": "用于制作衣服", + "IronAnvil": "用于制作以金属锭为原料的物品", + "Keg": "用于酿造麦芽酒", + "BowlofSoup": "{$CommonItemTooltip.MinorStats}", + "WorkBench": "用于基础制作", + "GoblinBattleStandard": "召唤哥布林军队", + "Sawmill": "用于高级木材工艺", + "Pwnhammer": "强大到足以摧毁恶魔祭坛", + "CobaltHat": "最大魔力值增加40\n魔法暴击率增加9%", + "CobaltHelmet": "移动速度提高7%\n近战速度提高12%", + "CobaltMask": "远程伤害增加10%\n远程暴击率增加6%", + "MythrilHood": "最大魔力值增加60\n魔法伤害增加15%", + "MythrilHelmet": "近战暴击率增加5%\n近战伤害增加10%", + "MythrilHat": "远程伤害增加12%\n远程暴击率增加7%", + "CobaltDrill": "可开采秘银和山铜", + "MythrilDrill": "可开采精金和钛金", + "DaoofPow": "有机会造成混乱\n“找到你内心的碎片”", + "Compass": "显示水平位置", + "DivingGear": "可游泳\n大大延长水下呼吸时间", + "GPS": "显示位置\n报时", + "ObsidianHorseshoe": "使掉落伤害无效\n对火块免疫", + "ObsidianShield": "对击退免疫\n对火块免疫", + "TinkerersWorkshop": "可合成一些配饰", + "CloudinaBalloon": "可让持有者二连跳\n增加跳跃高度", + "AdamantiteHeadgear": "最大魔力值增加80\n魔法伤害和暴击率各增加11%", + "AdamantiteHelmet": "近战暴击率增加7%\n近战伤害增加14%", + "AdamantiteMask": "远程伤害增加14%\n远程暴击率增加8%", + "AdamantiteBreastplate": "伤害增加6%", + "AdamantiteLeggings": "暴击率增加4%\n移动速度提高5%", + "SpectreBoots": "可飞行\n穿戴者可飞速奔跑", + "Toolbelt": "扩大放置块的范围", + "HolyWater": "使多个块蔓延神圣之地", + "UnholyWater": "使多个块蔓延腐化之地", + "FairyBell": "召唤魔法仙灵", + "SuspiciousLookingEye": "召唤克苏鲁之眼", + "ClockworkAssaultRifle": "三轮爆炸\n只有第一枪消耗弹药", + "MoonCharm": "在晚上将持有者变成狼人", + "BetsyWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "SorcererEmblem": "魔法伤害增加15%", + "BandofRegeneration": "缓慢再生生命", + "WarriorEmblem": "近战伤害增加15%", + "RangerEmblem": "远程伤害增加15%", + "DemonWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "AngelWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "RainbowRod": "投射可控的彩虹", + "IceRod": "召唤一块冰", + "NeptunesShell": "入水时将持有者变成人鱼", + "MagicMirror": "盯着镜子便可回家", + "Flamethrower": "将凝胶用作弹药", + "Wrench": "放置红电线", + "WireCutter": "移除电线", + "CrystalBullet": "碰撞时产生若干魔晶碎片", + "HolyArrow": "碰撞时召唤陨星", + "MagicDagger": "有魔力的回旋匕首", + "CrystalStorm": "召唤速射魔晶碎片", + "CursedFlames": "召唤邪恶的火球", + "SoulofLight": "“光明生物的精华”", + "SoulofNight": "“黑暗生物的精华”", + "CursedFlame": "“连水都无法将火焰浇灭”", + "CursedTorch": "可放置在水中", + "AdamantiteForge": "用于熔炼精金和钛金矿", + "MythrilAnvil": "用于制作以秘银、山铜、精金和钛金锭为原料的物品", + "UnicornHorn": "“即锋利,又有魔力!”", + "DarkShard": "“腐化沙漠中的生物有时会携带”", + "LightShard": "“光明沙漠中的生物有时会携带”", + "RedPressurePlate": "踩上时激活", + "CloudinaBottle": "可让持有者二连跳", + "SpellTome": "可附魔", + "StarCloak": "受伤时会使星星坠落", + "Megashark": "50%的几率不消耗弹药\n“迷你鲨的老哥”", + "Shotgun": "射出一连串子弹", + "PhilosophersStone": "缩短治疗药水的冷却时间", + "TitanGlove": "提高近战击退力", + "HermesBoots": "穿戴者可飞速奔跑", + "GreenPressurePlate": "踩上时激活", + "GrayPressurePlate": "玩家踩上时激活", + "BrownPressurePlate": "玩家踩上时激活", + "MechanicalEye": "召唤双子魔眼", + "SoulofFright": "“纯粹恐惧的精华”", + "SoulofMight": "“毁灭者的精华”", + "SoulofSight": "“全知看守人的精华”", + "HallowedPlateMail": "暴击率增加7%", + "HallowedGreaves": "伤害增加7%\n移动速度提高8%", + "HallowedHelmet": "远程伤害增加15%\n远程暴击率增加8%", + "CrossNecklace": "受伤后增加无敌状态时间", + "ManaFlower": "魔力消耗减少8%\n需要时自动使用魔力药水", + "MechanicalWorm": "召唤毁灭者", + "MechanicalSkull": "召唤机械骷髅王", + "HallowedHeadgear": "最大魔力值增加100\n魔法伤害和暴击率各增加12%", + "HallowedMask": "近战伤害和暴击率各增加10%\n近战急速提高10%", + "DemoniteOre": "“与黑暗能量休戚与共”", + "SlimeCrown": "召唤史莱姆王", + "LightDisc": "最多堆叠5个", + "DemoniteBar": "“与黑暗能量休戚与共”", + "SoulofFlight": "“强大飞行生物的精华”", + "MusicBox": "有机会录制歌曲", + "Drax": "“不要跟锯刃镐混淆”", + "Explosives": "激活时爆炸", + "InletPump": "从出水泵出水", + "OutletPump": "从入水泵进水", + "Timer1Second": "每1秒激活", + "Timer3Second": "每3秒激活", + "Timer5Second": "每5秒激活", + "BluePresent": "{$CommonItemTooltip.RightClickToOpen}", + "GreenPresent": "{$CommonItemTooltip.RightClickToOpen}", + "YellowPresent": "{$CommonItemTooltip.RightClickToOpen}", + "SnowGlobe": "召唤雪人军团", + "Carrot": "召唤宠物兔", + "Vilethorn": "召唤魔刺", + "Starfury": "使星星从天而降\n“用天堂怒火锻造而成”", + "PurificationPowder": "净化邪恶", + "RedsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "RedsHelmet": "{$CommonItemTooltip.DevItem}", + "RedsBreastplate": "{$CommonItemTooltip.DevItem}", + "RedsLeggings": "{$CommonItemTooltip.DevItem}", + "Fish": "召唤企鹅宝宝", + "VilePowder": "驱逐出神圣之地", + "Frostbrand": "射出冰雪矢", + "RedPotion": "仅献给配得上的人", + "RottenChunk": "“看上去很好吃!”", + "UnholyTrident": "召唤恶魔三叉戟", + "FrostHelmet": "近战和远程伤害各增加16%", + "FrostBreastplate": "近战和远程暴击率各增加11%", + "FrostLeggings": "移动速度提高8%\n近战攻击速度增加7%", + "WormFood": "召唤世界吞噬怪", + "TinWatch": "报时", + "TungstenWatch": "报时", + "PlatinumWatch": "报时", + "LeadAnvil": "用于制作以金属锭为原料的物品", + "BeamSword": "射出一束光", + "IceBlade": "射出冰雪矢", + "IceBow": "射出寒霜箭", + "FrostStaff": "射出寒霜流", + "Jetpack": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressUpToBooster}", + "ButterflyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "FallenStar": "日出后消失", + "Seaweed": "召唤宠物海龟", + "FairyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "Clentaminator": "喷射时生成和摧毁生物群落\n使用彩色溶液", + "GreenSolution": "由环境改造枪使用\n蔓延纯净之地", + "BlueSolution": "由环境改造枪使用\n蔓延神圣之地", + "PurpleSolution": "由环境改造枪使用\n蔓延腐化之地", + "DarkBlueSolution": "由环境改造枪使用\n蔓延发光蘑菇", + "RedSolution": "由环境改造枪使用\n蔓延猩红之地", + "HarpyWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "BoneWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "Hammush": "强大到足以摧毁恶魔祭坛", + "NettleBurst": "召唤刺矛", + "CrimsonHelmet": "伤害增加2%", + "CrimsonScalemail": "伤害增加2%", + "CrimsonGreaves": "伤害增加2%", + "DeathbringerPickaxe": "能够开采狱石", + "Torch": "提供照明", + "FlameWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "FrozenWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "GhostWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "LivingWoodWand": "放置生命木", + "GrapplingHook": "“给我过来!”", + "Actuator": "使实心块能够打开和关闭", + "Chain": "可供攀爬", + "BlueWrench": "放置蓝电线", + "GreenWrench": "放置绿电线", + "BluePressurePlate": "玩家踩上时激活", + "YellowPressurePlate": "除玩家以外的任何东西踩上时激活", + "DiscountCard": "商店纷纷降价", + "LuckyCoin": "击中敌人有时会掉落额外的钱币", + "UnicornonaStick": "“玩得开心!”", + "SandstorminaBottle": "可让持有者更好地二连跳", + "CharmofMyths": "提供生命再生并缩短治疗药水的冷却时间", + "MoonShell": "在晚上将持有者变成狼人,入水时将持有者变成人鱼", + "StarVeil": "受伤后会使星星坠落并延长无敌状态时间", + "WaterWalkingBoots": "可让人在水上行走", + "MiningHelmet": "穿戴时可提供照明", + "AdhesiveBandage": "对流血免疫", + "ArmorPolish": "对破损盔甲免疫", + "Bezoar": "对毒药免疫", + "Blindfold": "对黑暗免疫", + "FastClock": "对减缓免疫", + "Megaphone": "对寂静免疫", + "Nazar": "对诅咒免疫", + "Vitamins": "对软弱免疫", + "TrifoldMap": "对混乱免疫", + "PowerGlove": "提高近战击退力\n近战速度提高12%", + "LightningBoots": "可飞行\n穿戴者可超速奔跑", + "SunStone": "白天穿戴可提升所有属性", + "MoonStone": "夜晚穿戴可提升所有属性", + "ArmorBracing": "对软弱和破损盔甲免疫", + "MedicatedBandage": "对毒药和流血免疫", + "ThePlan": "对减缓和混乱免疫", + "CountercurseMantra": "对寂静和诅咒免疫", + "CoinGun": "将钱币用作弹药\n钱币价值更高,伤害越大", + "LavaCharm": "7秒内对熔岩免疫", + "ObsidianWaterWalkingBoots": "可让人在水上行走\n对火块免疫", + "LavaWaders": "可让人在水和熔岩上行走\n对火块免疫并在7秒内对熔岩免疫", + "BoneWand": "放置骨头", + "LeafWand": "放置树叶", + "FlyingCarpet": "可让持有者漂浮几秒钟", + "AvengerEmblem": "伤害增加12%", + "MechanicalGlove": "提高近战击退力\n伤害和近战速度各增加12%", + "LandMine": "踩上时爆炸", + "PaladinsShield": "吸收团队中玩家所受伤害的25%\n仅当生命值高于25%时有效", + "Umbrella": "持有此物可减缓坠落速度", + "ChlorophyteOre": "“对光作出反应”", + "SteampunkWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "IceSkates": "提供额外冰面行动力\n跌倒在冰上时冰不会碎", + "SnowballLauncher": "迅速发射雪球", + "ClimbingClaws": "可沿墙滑下\n结合鞋钉使用时可提升能力", + "AncientShadowHelmet": "近战速度提高7%", + "AncientShadowScalemail": "近战速度提高7%", + "AncientShadowGreaves": "近战速度提高7%", + "AncientNecroHelmet": "远程伤害增加5%。", + "AncientCobaltHelmet": "最大魔力值增加40\n魔法暴击率增加4%", + "AncientCobaltBreastplate": "最大魔力值增加20\n魔法暴击率增加4%", + "AncientCobaltLeggings": "最大魔力值增加20\n魔法暴击率增加4%", + "BlackBelt": "有机会避开攻击", + "Boomstick": "射出一连串子弹", + "Rope": "可供攀爬", + "Campfire": "靠近篝火时生命再生提速", + "Marshmallow": "放在棍子上,放到篝火上烤", + "MarshmallowonaStick": "放在篝火上烤!", + "CookedMarshmallow": "{$CommonItemTooltip.MinorStats}", + "ShoeSpikes": "可沿墙滑下\n结合攀爬爪使用时可提升能力", + "TigerClimbingGear": "可爬墙", + "Tabi": "可猛冲\n双击一个方向", + "Minishark": "33%的几率不消耗弹药\n“半鲨,半枪,帅呆了。”", + "ManaRegenerationBand": "最大魔力值增加20\n提高魔力再生速度", + "SandstorminaBalloon": "可让持有者二连跳\n增加跳跃高度", + "MasterNinjaGear": "可爬墙和猛冲\n有机会避开攻击", + "RopeCoil": "抛出以形成可攀爬的绳索", + "Blowgun": "可收集种子作为弹药", + "BlizzardinaBottle": "可让持有者二连跳", + "EnchantedSword": "射出附魔剑束", + "PickaxeAxe": "“不要与锤钻混淆”", + "EatersBone": "召唤噬魂怪宝宝", + "BlendOMatic": "用于制作物品", + "MeatGrinder": "用于制作物品", + "Extractinator": "将淤泥/雪泥/化石变成更有用的东西\n要使用:“将淤泥/雪泥/化石放置在提炼机中”", + "Solidifier": "用于制作物品", + "ActuationAccessory": "自动将制动器放置在已放好的物品上", + "ActuationRod": "激活制动器", + "AlchemyTable": "33%的几率不消耗制作材料的药水", + "AncientBattleArmorHat": "魔法和仆从伤害各增加15%", + "AncientBattleArmorPants": "提高仆从数量上限", + "AncientBattleArmorShirt": "最大魔力值增加80", + "AncientHorn": "召唤可骑乘的蛇蜥怪坐骑", + "AnglerTackleBag": "钓鱼线永远都不会断,将减少鱼饵消耗率,提高钓鱼技能", + "ArchitectGizmoPack": "增加放置图格和墙的速度及范围\n自动喷涂放置好的物品", + "AviatorSunglasses": "激发你内心的飞人\n“非常适合冒充游戏主播!”", + "Bacon": "{$CommonItemTooltip.MinorStats}\n培根?“培根。”", + "BalloonHorseshoeFart": "可让持有者二连跳\n增加跳跃高度,减轻坠落伤害", + "BalloonHorseshoeHoney": "受伤时释放蜜蜂\n增加跳跃高度,减轻坠落伤害", + "BalloonHorseshoeSharkron": "可让持有者二连跳\n增加跳跃高度,减轻坠落伤害", + "BalloonPufferfish": "增加跳跃高度", + "BeesKnees": "木箭变成一队蜜蜂", + "BejeweledValkyrieBody": "{$CommonItemTooltip.DevItem}\n用珠宝装饰且非常优雅,在雷鸣的高空翱翔", + "BejeweledValkyrieHead": "{$CommonItemTooltip.DevItem}\n变成风,驾驭闪电。", + "BejeweledValkyrieWing": "{$CommonItemTooltip.DevItem}\n女武神卫星屏障平台是绝对安全的。大部分时间是这样。", + "BewitchingTable": "可拥有更多仆从", + "Bladetongue": "碰到物体喷一串灵液", + "BlessedApple": "召唤可骑乘的独角兽坐骑", + "BloodWater": "使多个块蔓延猩红之地", + "BombFish": "可摧毁一些图格的小炸弹", + "BoneCampfire": "靠近篝火时生命再生提速", + "BoneRattle": "召唤脸怪宝宝", + "BoneTorch": "“发出致命光芒”", + "BoosterTrack": "锤击可改变方向", + "BottomlessBucket": "含有无限多的水", + "BouncyBomb": "可摧毁一些图格的小炸弹\n非常有弹性", + "BouncyDynamite": "“这将是一个可怕的想法”", + "BouncyGlowstick": "弄湿后有效", + "BouncyGrenade": "不会摧毁图格的小炸弹\n非常有弹性", + "BrainOfConfusion": "可使附近被击中的敌人陷入混乱", + "BrainScrambler": "召唤可骑乘的鳞甲怪坐骑", + "BubbleGun": "快速射出强劲的泡泡", + "ButchersChainsaw": "被击中的敌人发出火花", + "CelestialShell": "在晚上将持有者变成狼人,入水时将持有者变成人鱼\n所有属性小幅提升", + "CelestialSigil": "召唤月亮末日", + "CellPhone": "显示所有信息\n允许你随意回家", + "ClingerStaff": "召唤诅咒焰墙", + "CogWall": "生产力提高200%", + "CoinRing": "扩大钱币拾取范围\n击中敌人有时会掉落额外的钱币", + "CompanionCube": "易受熔岩伤害!", + "CordageGuide": "允许从葡萄藤收集藤蔓绳", + "CorruptFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "CosmicCarKey": "召唤可骑乘的UFO坐骑", + "CrimsonFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "CrimsonHeart": "召唤一颗心来提供照明", + "CrystalSerpent": "射出爆炸水晶弹", + "CrystalVileShard": "召唤巨大的水晶尖刺", + "CursedCampfire": "靠近篝火时生命再生提速", + "DaedalusStormbow": "从天上射箭", + "DayBreak": "“用光明之矛将敌人四分五裂!”", + "DemonCampfire": "靠近篝火时生命再生提速", + "DemonHeart": "永久增加配饰栏数量", + "Detonator": "“炸裂内脏...鲜血淋淋!”", + "DevDye": "{$CommonItemTooltip.DevItem}", + "DjinnsCurse": "允许用双脚换取缓慢坠落的效果", + "DPSMeter": "显示你的每秒伤害", + "DrillContainmentUnit": "召唤可骑乘的钻头坐骑", + "DungeonFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "EoCShield": "允许玩家冲入敌人\n双击一个方向", + "FishermansGuide": "显示钓鱼信息", + "FishFinder": "显示天气、月相和钓鱼信息", + "FishronWings": "{$CommonItemTooltip.FlightAndSlowfall}\n允许快速在水中行走", + "Flairon": "喷出自动寻的泡泡", + "FleshKnuckles": "敌人更有可能瞄准你", + "FloatingIslandFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "FlowerBoots": "你走过的草地上会生长花朵", + "FlyingKnife": "投掷可控的飞刀", + "FossilHelm": "投掷射速提高20%", + "FossilPants": "投掷暴击率增加15%", + "FossilShirt": "投掷伤害增加20%", + "FragmentNebula": "“银河之力存在于此碎片内”", + "FragmentSolar": "“宇宙之怒存在于此碎片内”", + "FragmentStardust": "“令人神魂颠倒的粒子围绕此碎片旋转”", + "FragmentVortex": "“旋涡能量源于此碎片”", + "FrozenCampfire": "靠近篝火时生命再生提速", + "FuzzyCarrot": "召唤可骑乘的兔兔坐骑", + "GemLockAmber": "可放置或移除大琥珀", + "GemLockAmethyst": "可放置或移除大紫晶", + "GemLockDiamond": "可放置或移除大钻石", + "GemLockEmerald": "可放置或移除大翡翠", + "GemLockRuby": "可放置或移除大红玉", + "GemLockSapphire": "可放置或移除大蓝玉", + "GemLockTopaz": "可放置或移除大黄玉", + "GoblinTech": "显示移动速度、每秒伤害和贵重矿石", + "GoldPickaxe": "可开采陨石", + "GoldRing": "扩大钱币拾取范围", + "GreedyRing": "扩大钱币拾取范围,降低商店的商品价格\n击中敌人有时会掉落额外的钱币", + "GrubSoup": "{$CommonItemTooltip.MinorStats}", + "HallowedFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "HardySaddle": "召唤可骑乘的海龟坐骑", + "HellwingBow": "木箭变成烈焰蝙蝠", + "HerbBag": "{$CommonItemTooltip.RightClickToOpen}", + "HiveBackpack": "增加友好蜜蜂的力量", + "HoneyedGoggles": "召唤可骑乘的蜜蜂坐骑", + "IceMirror": "盯着镜子便可回家", + "IchorCampfire": "靠近篝火时生命再生提速", + "JimsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "JungleFishingCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LargeAmber": "适合夺取宝石。你死后掉落", + "LaserRuler": "在屏幕上创建用于放置块的测量线", + "LastPrism": "“发射分束生命彩虹”", + "LifeformAnalyzer": "显示你周围稀有生物的名称", + "LightKey": "“汇聚了大量灵魂的精华”", + "LivingMahoganyLeafWand": "放置红木树叶", + "LivingMahoganyWand": "放置生命红木", + "LockBox": "{$CommonItemTooltip.RightClickToOpen}\n需要金钥匙", + "LogicGateLamp_Faulty": "将此物放置在逻辑门灯上,可随机激活", + "LogicGateLamp_Off": "将此物放置在逻辑门上,以添加检测方法", + "LogicGateLamp_On": "将此物放置在逻辑门上,以添加检测方法", + "LogicGate_NOR": "判断它上面的逻辑门灯\n没有灯亮时激活,其他情况下停用", + "LogicGate_NXOR": "判断它上面的逻辑门灯\n所有灯亮且“亮”灯总数不止一盏时激活,其他情况下停用\n通常也称为“同或门”", + "LogicGate_OR": "判断它上面的逻辑门灯\n任意一盏灯亮时激活,其他情况下停用", + "LogicGate_XOR": "判断它上面的逻辑门灯\n仅有一盏灯亮时激活,其他情况下停用", + "LogicSensor_Above": "当玩家越过时激活,其他情况下停用", + "LogicSensor_Honey": "上面有蜂蜜时激活,其他情况下停用", + "LogicSensor_Lava": "上面有熔岩时激活,其他情况下停用", + "LogicSensor_Liquid": "上面有液体时激活,其他情况下停用", + "LogicSensor_Moon": "夜幕降临时激活", + "LogicSensor_Sun": "黎明破晓时激活", + "LogicSensor_Water": "上面有水时激活,其他情况下停用", + "LokisDye": "{$CommonItemTooltip.DevItem}", + "LokisHelm": "{$CommonItemTooltip.DevItem}\n乱生于治,怯生于勇,弱生于强", + "LokisPants": "{$CommonItemTooltip.DevItem}\n公正之轮,其速慢,其效优。", + "LokisShirt": "{$CommonItemTooltip.DevItem}\n知己知彼。百战不殆…", + "LokisWings": "{$CommonItemTooltip.DevItem}\n难知如阴,动如雷震。", + "LunarBar": "“它汇聚了闪耀的天界能量”", + "LunarCraftingStation": "用来通过月亮碎片和夜明矿制作物品", + "LunarFlareBook": "降落月耀球", + "LunarHook": "“想要得到月亮?抓住它然后拉下来!”", + "LunarOre": "“天堂卵石”", + "MagicLantern": "召唤用来显露附近宝藏的魔法灯笼", + "MechanicalLens": "允许扩大电线视野", + "MetalDetector": "显示你周围最贵重的矿石", + "MeteorStaff": "降落流星雨", + "Minecart": "让我们乘矿车吧", + "MinecartTrack": "锤击轨道尾片可改变缓冲方式\n锤击交叉点可改变方向", + "MolotovCocktail": "让敌人着火的小炸弹\n在一段时间内照亮附近着火区域", + "MoneyTrough": "召唤飞猪存钱罐,储存你的物品", + "MoonlordArrow": "“以音速射下它们!”", + "MoonlordBullet": "“鬼怪排成行,一发百中...”", + "MoonlordTurretStaff": "召唤月亮传送门,向敌人发射激光", + "MothronWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "MulticolorWrench": "时按住不放可编辑电线设置", + "NebulaArcanum": "“召唤大量星际能量,用来追杀敌人”", + "NebulaBlaze": "“从猎户腰带到你的手掌”", + "NebulaBreastplate": "魔法伤害和暴击率各增加9%", + "NebulaHelmet": "最大魔力值增加60,同时魔力使用率减少15%\n魔法伤害和暴击率各增加7%", + "NebulaLeggings": "魔法伤害增加10%\n移动速度提高10%", + "NebulaMonolith": "“施展来自星云塔的少量魔力”", + "NightKey": "“汇聚了大量灵魂的精华”", + "NightVisionHelmet": "扩大视野", + "NinjaHood": "投掷射速提高15%", + "NinjaPants": "投掷暴击率增加10%", + "NinjaShirt": "投掷伤害增加15%", + "PartyBundleOfBalloonTile": "“系起来让大家都开心”", + "PartyGirlGrenade": "不会摧毁图格的小炸弹", + "PartyMonolith": "“气球将从天而降”", + "PartyPresent": "想知道里面有什么?", + "PDA": "显示所有信息", + "PeaceCandle": "减少周围生物的敌意", + "PedguinHat": "加入企鹅在线\n“非常适合冒充游戏主播!”", + "PedguinPants": "加入企鹅在线\n“非常适合冒充游戏主播!”", + "PedguinShirt": "加入企鹅在线\n“非常适合冒充游戏主播!”", + "Phantasm": "66%的几率不消耗弹药", + "Pigronata": "打出狂欢派对!\n可能会有惊喜!", + "PinkGel": "“弹弹的,多可爱!”", + "PinkSlimeBlock": "非常有弹性", + "PirateStaff": "召唤海盗来为你战斗", + "PixelBox": "分离电线路径\n水平信号熄灯\n交叉信号开灯", + "PlatinumPickaxe": "可开采陨石", + "PocketMirror": "对石化术免疫", + "PressureTrack": "不可用于斜坡", + "ProjectilePressurePad": "射弹触碰到它时激活", + "PsychoKnife": "允许你进入隐身模式", + "PutridScent": "敌人将不太可能瞄准你\n伤害和暴击率各增加5%", + "QueenSpiderStaff": "召唤蜘蛛女王,以朝敌人吐蜘蛛蛋", + "Radar": "探测你周围的敌人", + "RainbowCampfire": "靠近篝火时生命再生提速", + "RainbowCrystalStaff": "召唤用来驱逐敌人的发光水晶\n“公爵,多么缤纷的颜色!”", + "RazorbladeTyphoon": "投射出快速移动的剃刀轮", + "RedsYoyo": "{$CommonItemTooltip.DevItem}", + "REK": "显示怪物数量、杀敌数和稀有生物", + "RoyalGel": "史莱姆变得友好了", + "SailfishBoots": "穿戴者可飞速奔跑", + "SandFallBlock": "你可以安全观看的落沙", + "SandFallWall": "你可以安全观看的落沙", + "ScalyTruffle": "召唤可骑乘的猪龙坐骑", + "Sextant": "显示月相", + "ShadowFlameBow": "射出暗影焰箭", + "ShadowFlameHexDoll": "召唤暗影焰触手来攻击敌人", + "ShadowFlameKnife": "击中后产生暗影焰", + "SharkronBalloon": "增加跳跃高度\n可让持有者二连跳", + "SharkToothNecklace": "增加5点盔甲穿透力", + "SharpeningStation": "增加近战武器的盔甲穿透力", + "ShinyStone": "不移动时,大大提高生命再生速度", + "ShrimpyTruffle": "吸引一种在水中或战斗中十分活跃的传奇生物", + "SillyBalloonGreen": "“闻起来像薄荷,象征着欢乐”", + "SillyBalloonGreenWall": "“闻起来像薄荷,象征着欢乐”", + "SillyBalloonMachine": "它永远不会停止庆祝!", + "SillyBalloonPink": "“闻起来像泡泡糖,象征着幸福”", + "SillyBalloonPinkWall": "“闻起来像泡泡糖,象征着幸福”", + "SillyBalloonPurple": "“闻起来像薰衣草,象征着热情”", + "SillyBalloonPurpleWall": "“闻起来像薰衣草,象征着热情”", + "SillyStreamerBlue": "异常耐用,足以用来攀登!", + "SillyStreamerGreen": "异常耐用,足以用来攀登!", + "SillyStreamerPink": "异常耐用,足以用来攀登!", + "SkiphsHelm": "{$CommonItemTooltip.DevItem}", + "SkiphsPants": "{$CommonItemTooltip.DevItem}", + "SkiphsShirt": "{$CommonItemTooltip.DevItem}", + "SkiphsWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "SliceOfCake": "你大快朵颐。其他人大快朵颐。管它呢。", + "SlimeGun": "喷射一群无害的史莱姆", + "SlimySaddle": "召唤可骑乘的史莱姆坐骑", + "SnowCloudBlock": "上面好冷", + "SnowFallBlock": "比雪球冷多了", + "SnowFallWall": "比雪球冷多了", + "SolarEruption": "“利用太阳之怒暴击”", + "SolarFlareBreastplate": "近战伤害增加22%\n敌人更有可能瞄准你", + "SolarFlareHelmet": "近战暴击率增加17%\n敌人更有可能瞄准你", + "SolarFlareLeggings": "移动和近战速度各提高15%\n敌人更有可能瞄准你", + "SolarMonolith": "“施展来自日耀塔的少量魔力”", + "SolarTablet": "召唤日食", + "SoulDrain": "吸掉敌人的生命", + "SpelunkerGlowstick": "显露附近的宝藏", + "SpiderStaff": "召唤蜘蛛来为你战斗", + "SporeSac": "随着时间推移召唤可以伤害敌人的孢子", + "StardustBreastplate": "提高仆从数量上限\n仆从伤害增加22%", + "StardustCellStaff": "召唤星尘细胞来为你战斗\n“培养最美丽的细胞传染病菌”", + "StardustDragonStaff": "召唤星尘之龙来为你战斗\n“有了巨龙后,谁还需要一群仆从呢?”", + "StardustHelmet": "提高仆从数量上限\n仆从伤害增加22%", + "StardustLeggings": "提高仆从数量上限\n仆从伤害增加22%", + "StardustMonolith": "“施展来自星尘塔的少量魔力”", + "StickyDynamite": "“投出去可不是件易事。”", + "StickyGrenade": "不会摧毁图格的小炸弹\n“投出去可不是件易事。”", + "Stopwatch": "显示玩家移动的速度", + "StrangeBrew": "“它看起来、闻起来都很可怕”", + "StrangePlant1": "可用于交换稀有染料", + "StrangePlant2": "可用于交换稀有染料", + "StrangePlant3": "可用于交换稀有染料", + "StrangePlant4": "可用于交换稀有染料", + "SummonerEmblem": "召唤伤害增加15%", + "Sundial": "允许时间每周快进一天", + "SuperAbsorbantSponge": "能够吸收无限多的水", + "SuspiciousLookingTentacle": "召唤可疑眼球可提供照明\n“我知道你在想什么...”", + "TallyCounter": "显示被杀的怪物数量", + "TartarSauce": "召唤迷你牛头怪", + "TempestStaff": "召唤鲨鱼旋风来为你战斗", + "TheBrideDress": "“妢礼...”", + "TheBrideHat": "“耐...真耐...”", + "Toxikarp": "吐出毒泡", + "Tsunami": "一次射出5支箭", + "TsunamiInABottle": "可让持有者二连跳", + "TungstenPickaxe": "可开采陨石", + "UltraBrightCampfire": "靠近篝火时生命再生提速", + "ValkyrieYoyo": "{$CommonItemTooltip.DevItem}", + "ViciousPowder": "驱逐出神圣之地", + "VineRopeCoil": "投掷可形成一道可攀爬的藤蔓绳", + "VortexBeater": "66%的几率不消耗弹药\n“劈劈啪啪,乒乒乓乓,一顿混乱,惨绝人寰。”", + "VortexBreastplate": "远程伤害和暴击率各增加12%\n25%的几率不消耗弹药", + "VortexHelmet": "远程伤害增加16%\n远程暴击率增加7%", + "VortexLeggings": "远程伤害和暴击率各增加8%\n移动速度提高10%", + "VortexMonolith": "“施展来自星旋塔的少量魔力”", + "WandofSparking": "射出小火花", + "WeaponRack": "可将物品放置在武器架", + "WeatherRadio": "显示天气", + "WeightedPressurePlateCyan": "玩家上去或下来时激活", + "WeightedPressurePlateOrange": "玩家上去或下来时激活", + "WeightedPressurePlatePink": "玩家上去或下来时激活", + "WeightedPressurePlatePurple": "玩家上去或下来时激活", + "WingsNebula": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "WingsSolar": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsStardust": "{$CommonItemTooltip.FlightAndSlowfall}", + "WingsVortex": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}", + "WireBulb": "点亮每种电线颜色对应的灯泡", + "WireKite": "允许对电线进行终极控制!\n时按住不放可编辑电线设置", + "WirePipe": "分离电线路径\n可锤击!", + "WormholePotion": "将你传送至一个队伍成员\n在全屏地图上点击他们的头", + "WormScarf": "所受伤害减少17%", + "XenoStaff": "召唤UFO可让它为你作战", + "YellowWrench": "放置黄电线", + "Yoraiz0rDarkness": "{$CommonItemTooltip.DevItem}\n如果看到这种情况,你应该逃跑...", + "Yoraiz0rHead": "{$CommonItemTooltip.DevItem}", + "Yoraiz0rPants": "{$CommonItemTooltip.DevItem}", + "Yoraiz0rShirt": "{$CommonItemTooltip.DevItem}", + "Yoraiz0rWings": "{$CommonItemTooltip.DevItem}\n无论此配饰对你产生什么作用,逃跑都没错!", + "YoyoBag": "使主人掌握悠悠球技能", + "YoYoGlove": "允许同时使用两个悠悠球", + "BloodMoonRising": "{$PaintingArtist.Garner}", + "TheHangedMan": "{$PaintingArtist.Garner}", + "GloryoftheFire": "{$PaintingArtist.Garner}", + "BoneWarp": "{$PaintingArtist.Garner}", + "SkellingtonJSkellingsworth": "{$PaintingArtist.Garner}", + "TheCursedMan": "{$PaintingArtist.Garner}", + "TheEyeSeestheEnd": "{$PaintingArtist.Garner}", + "SomethingEvilisWatchingYou": "{$PaintingArtist.Moosdijk}", + "TheTwinsHaveAwoken": "{$PaintingArtist.Moosdijk}", + "TheScreamer": "{$PaintingArtist.Crowno}", + "GoblinsPlayingPoker": "{$PaintingArtist.Garner}", + "Dryadisque": "{$PaintingArtist.Garner}", + "Sunflowers": "{$PaintingArtist.Garner}", + "TerrarianGothic": "{$PaintingArtist.Garner}", + "Impact": "{$PaintingArtist.Wright}", + "PoweredbyBirds": "{$PaintingArtist.Ness}", + "TheDestroyer": "{$PaintingArtist.Moosdijk}", + "ThePersistencyofEyes": "{$PaintingArtist.Crowno}", + "UnicornCrossingtheHallows": "{$PaintingArtist.Crowno}", + "GreatWave": "{$PaintingArtist.Crowno}", + "StarryNight": "{$PaintingArtist.Crowno}", + "GuidePicasso": "{$PaintingArtist.Crowno}", + "TheGuardiansGaze": "{$PaintingArtist.Kolf}", + "FatherofSomeone": "{$PaintingArtist.Crowno}", + "NurseLisa": "{$PaintingArtist.Garner}", + "DarkSoulReaper": "{$PaintingArtist.Myhre}", + "Land": "{$PaintingArtist.Myhre}", + "TrappedGhost": "{$PaintingArtist.Myhre}", + "DemonsEye": "{$PaintingArtist.Myhre}", + "FindingGold": "{$PaintingArtist.Myhre}", + "FirstEncounter": "{$PaintingArtist.Crowno}", + "GoodMorning": "{$PaintingArtist.Crowno}", + "UndergroundReward": "{$PaintingArtist.Crowno}", + "ThroughtheWindow": "{$PaintingArtist.Crowno}", + "PlaceAbovetheClouds": "{$PaintingArtist.Crowno}", + "DoNotStepontheGrass": "{$PaintingArtist.Crowno}", + "ColdWatersintheWhiteLand": "{$PaintingArtist.Crowno}", + "LightlessChasms": "{$PaintingArtist.Crowno}", + "TheLandofDeceivingLooks": "{$PaintingArtist.Crowno}", + "Daylight": "{$PaintingArtist.Crowno}", + "SecretoftheSands": "{$PaintingArtist.Crowno}", + "DeadlandComesAlive": "{$PaintingArtist.Crowno}", + "EvilPresence": "{$PaintingArtist.Crowno}", + "SkyGuardian": "{$PaintingArtist.Crowno}", + "AmericanExplosive": "{$PaintingArtist.Kolf}", + "Discover": "{$PaintingArtist.Myhre}", + "HandEarth": "{$PaintingArtist.Myhre}", + "OldMiner": "{$PaintingArtist.Myhre}", + "Skelehead": "{$PaintingArtist.Myhre}", + "FacingtheCerebralMastermind": "{$PaintingArtist.Kolf}", + "LakeofFire": "{$PaintingArtist.Garner}", + "TrioSuperHeroes": "{$PaintingArtist.Burczyk}", + "ImpFace": "{$PaintingArtist.Myhre}", + "OminousPresence": "{$PaintingArtist.Craig}", + "ShiningMoon": "{$PaintingArtist.Craig}", + "LivingGore": "{$PaintingArtist.Craig}", + "FlowingMagma": "{$PaintingArtist.Craig}", + "TheCreationoftheGuide": "{$PaintingArtist.Garner}", + "TheMerchant": "{$PaintingArtist.Garner}", + "CrownoDevoursHisLunch": "{$PaintingArtist.Garner}", + "RareEnchantment": "{$PaintingArtist.Phelps}", + "GloriousNight": "{$PaintingArtist.Duncan}", + "AnglerFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AnglerFish}", + "AngryNimbusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryNimbus}", + "AnomuraFungusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AnomuraFungus}", + "AntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Antlion}", + "ArapaimaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Arapaima}", + "ArmoredSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ArmoredSkeleton}", + "BatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CaveBat}", + "BirdBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Bird}", + "BlackRecluseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlackRecluse}", + "BloodFeederBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodFeeder}", + "BloodJellyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodJelly}", + "BloodCrawlerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodCrawler}", + "BoneSerpentBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BoneSerpentHead}", + "BunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Bunny}", + "ChaosElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ChaosElemental}", + "MimicBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mimic}", + "ClownBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Clown}", + "CorruptBunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptBunny}", + "CorruptGoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptGoldfish}", + "CrabBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crab}", + "CrimeraBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crimera}", + "CrimsonAxeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonAxe}", + "CursedHammerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CursedHammer}", + "DemonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Demon}", + "DemonEyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DemonEye}", + "DerplingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Derpling}", + "EaterofSoulsBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EaterofSouls}", + "EnchantedSwordBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EnchantedSword}", + "ZombieEskimoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieEskimo}", + "FaceMonsterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FaceMonster}", + "FloatyGrossBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FloatyGross}", + "FlyingFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingFish}", + "FlyingSnakeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingSnake}", + "FrankensteinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Frankenstein}", + "FungiBulbBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FungiBulb}", + "FungoFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FungoFish}", + "GastropodBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Gastropod}", + "GoblinThiefBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinThief}", + "GoblinSorcererBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinSorcerer}", + "GoblinPeonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinPeon}", + "GoblinScoutBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinScout}", + "GoblinWarriorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinWarrior}", + "GoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Goldfish}", + "HarpyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Harpy}", + "HellbatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hellbat}", + "HerplingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Herpling}", + "HornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hornet}", + "IceElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceElemental}", + "IcyMermanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IcyMerman}", + "FireImpBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FireImp}", + "JellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueJellyfish}", + "JungleCreeperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleCreeper}", + "LihzahrdBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LihzahrdCrawler}", + "ManEaterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ManEater}", + "MeteorHeadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MeteorHead}", + "MothBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Moth}", + "MummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mummy}", + "MushiLadybugBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MushiLadybug}", + "ParrotBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Parrot}", + "PigronBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PigronCorruption}", + "PiranhaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Piranha}", + "PirateBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateDeckhand}", + "PixieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Pixie}", + "RaincoatZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieRaincoat}", + "ReaperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Reaper}", + "SharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Shark}", + "SkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Skeleton}", + "SkeletonMageBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DarkCaster}", + "SlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueSlime}", + "SnowFlinxBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowFlinx}", + "SpiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WallCreeper}", + "SporeZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieMushroom}", + "SwampThingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SwampThing}", + "TortoiseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantTortoise}", + "ToxicSludgeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ToxicSludge}", + "UmbrellaSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UmbrellaSlime}", + "UnicornBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Unicorn}", + "VampireBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VampireBat}", + "VultureBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Vulture}", + "NypmhBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nymph}", + "WerewolfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Werewolf}", + "WolfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Wolf}", + "WorldFeederBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SeekerHead}", + "WormBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantWormHead}", + "WraithBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Wraith}", + "WyvernBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WyvernHead}", + "ZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Zombie}", + "JackingSkeletron": "{$PaintingArtist.Crowno}", + "BitterHarvest": "{$PaintingArtist.Lazure}", + "BloodMoonCountess": "{$PaintingArtist.Lazure}", + "HallowsEve": "{$PaintingArtist.Lazure}", + "MorbidCuriosity": "{$PaintingArtist.Lazure}", + "StarTopper1": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "StarTopper2": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "StarTopper3": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BowTopper": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndRedGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenGardland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenAndWhiteGarland": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "MulticoloredBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndYellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndRedBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndYellowBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "WhiteAndGreenBulb": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "MulticoloredLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "GreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndYellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "YellowAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueAndGreenLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "RedAndBlueLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "BlueAndYellowLights": "{$CommonItemTooltip.PlaceableOnXmasTree}", + "PillaginMePixels": "{$PaintingArtist.Lazure}", + "PaintingCastleMarsberg": "{$PaintingArtist.Lazure}", + "PaintingMartiaLisa": "{$PaintingArtist.Lazure}", + "PaintingTheTruthIsUpThere": "{$PaintingArtist.Lazure}", + "AngryTrapperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryTrapper}", + "ArmoredVikingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ArmoredViking}", + "BlackSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlackSlime}", + "BlueArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BlueArmoredBones}", + "BlueCultistArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistArcherBlue}", + "BlueCultistCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistDevote}", + "BlueCultistFighterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "BoneLeeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BoneLee}", + "ClingerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Clinger}", + "CochinealBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CochinealBeetle}", + "CorruptPenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptPenguin}", + "CorruptSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CorruptSlime}", + "CorruptorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Corruptor}", + "CrimslimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crimslime}", + "CursedSkullBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CursedSkull}", + "CyanBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CyanBeetle}", + "DevourerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DevourerHead}", + "DiablolistBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DiabolistRed}", + "DoctorBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DoctorBones}", + "DungeonSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DungeonSlime}", + "DungeonSpiritBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DungeonSpirit}", + "ElfArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ElfArcher}", + "ElfCopterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ElfCopter}", + "EyezorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Eyezor}", + "FlockoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Flocko}", + "GhostBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Ghost}", + "GiantBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantBat}", + "GiantCursedSkullBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantCursedSkull}", + "GiantFlyingFoxBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantFlyingFox}", + "GingerbreadManBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GingerbreadMan}", + "GoblinArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinArcher}", + "GreenSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreenSlime}", + "HeadlessHorsemanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HeadlessHorseman}", + "HellArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HellArmoredBones}", + "HellhoundBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Hellhound}", + "HoppinJackBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.HoppinJack}", + "IceBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceBat}", + "IceGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceGolem}", + "IceSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceSlime}", + "IchorStickerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IchorSticker}", + "IlluminantBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IlluminantBat}", + "IlluminantSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IlluminantSlime}", + "JungleBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleBat}", + "JungleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.JungleSlime}", + "KrampusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Krampus}", + "LacBeetleBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LacBeetle}", + "LavaBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Lavabat}", + "LavaSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LavaSlime}", + "MartianBrainscramblerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BrainScrambler}", + "MartianDroneBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianDrone}", + "MartianEngineerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianEngineer}", + "MartianGigazapperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GigaZapper}", + "MartianGreyGruntBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GrayGrunt}", + "MartianOfficerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianOfficer}", + "MartianRaygunnerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RayGunner}", + "MartianScutlixGunnerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ScutlixRider}", + "MartianTeslaTurretBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianTurret}", + "MisterStabbyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MisterStabby}", + "MotherSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MotherSlime}", + "NecromancerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Necromancer}", + "NutcrackerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nutcracker}", + "PaladinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Paladin}", + "PenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Penguin}", + "PinkyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Pinky}", + "PoltergeistBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Poltergeist}", + "PossessedArmorBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PossessedArmor}", + "PresentMimicBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PresentMimic}", + "PurpleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PurpleSlime}", + "RaggedCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RaggedCaster}", + "RainbowSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RainbowSlime}", + "RavenBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Raven}", + "RedSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RedSlime}", + "RuneWizardBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RuneWizard}", + "RustyArmoredBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RustyArmoredBonesAxe}", + "ScarecrowBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Scarecrow1}", + "ScutlixBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Scutlix}", + "SkeletonArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonArcher}", + "SkeletonCommandoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonCommando}", + "SkeletonSniperBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SkeletonSniper}", + "SlimerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Slimer}", + "SnatcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Snatcher}", + "SnowBallaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowBalla}", + "SnowmanGangstaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SnowmanGangsta}", + "SpikedIceSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SpikedIceSlime}", + "SpikedJungleSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SpikedJungleSlime}", + "SplinterlingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Splinterling}", + "SquidBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Squid}", + "TacticalSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TacticalSkeleton}", + "TheGroomBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TheGroom}", + "TimBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Tim}", + "UndeadMinerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UndeadMiner}", + "UndeadVikingBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.UndeadViking}", + "WhiteCultistArcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CultistArcherWhite}", + "WhiteCultistCasterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "WhiteCultistFighterBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "YellowSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.YellowSlime}", + "YetiBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Yeti}", + "ZombieElfBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieElf}", + "SparkyPainting": "{$PaintingArtist.Crowno}\n“爱的回忆”", + "PaintingAcorns": "{$PaintingArtist.Lazure}", + "PaintingColdSnap": "{$PaintingArtist.Lazure}", + "PaintingCursedSaint": "{$PaintingArtist.Lazure}", + "PaintingSnowfellas": "{$PaintingArtist.Lazure}", + "PaintingTheSeason": "{$PaintingArtist.Lazure}", + "RedString": "{$CommonItemTooltip.String}", + "OrangeString": "{$CommonItemTooltip.String}", + "YellowString": "{$CommonItemTooltip.String}", + "LimeString": "{$CommonItemTooltip.String}", + "GreenString": "{$CommonItemTooltip.String}", + "TealString": "{$CommonItemTooltip.String}", + "CyanString": "{$CommonItemTooltip.String}", + "SkyBlueString": "{$CommonItemTooltip.String}", + "BlueString": "{$CommonItemTooltip.String}", + "PurpleString": "{$CommonItemTooltip.String}", + "VioletString": "{$CommonItemTooltip.String}", + "PinkString": "{$CommonItemTooltip.String}", + "BrownString": "{$CommonItemTooltip.String}", + "WhiteString": "{$CommonItemTooltip.String}", + "RainbowString": "{$CommonItemTooltip.String}", + "BlackString": "{$CommonItemTooltip.String}", + "BlackCounterweight": "{$CommonItemTooltip.Counterweight}", + "BlueCounterweight": "{$CommonItemTooltip.Counterweight}", + "GreenCounterweight": "{$CommonItemTooltip.Counterweight}", + "PurpleCounterweight": "{$CommonItemTooltip.Counterweight}", + "RedCounterweight": "{$CommonItemTooltip.Counterweight}", + "YellowCounterweight": "{$CommonItemTooltip.Counterweight}", + "KingSlimeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "EyeOfCthulhuBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "EaterOfWorldsBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "BrainOfCthulhuBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "QueenBeeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "SkeletronBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "WallOfFleshBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "DestroyerBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "TwinsBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "SkeletronPrimeBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "PlanteraBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "GolemBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "FishronBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "CultistBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "MoonLordBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "GoblinSummonerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinSummoner}", + "SalamanderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Salamander}", + "GiantShellyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GiantShelly}", + "CrawdadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Crawdad}", + "FritzBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Fritz}", + "CreatureFromTheDeepBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CreatureFromTheDeep}", + "DrManFlyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DrManFly}", + "MothronBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Mothron}", + "SeveredHandBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "ThePossessedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ThePossessed}", + "ButcherBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Butcher}", + "PsychoBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Psycho}", + "DeadlySphereBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DeadlySphere}", + "NailheadBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Nailhead}", + "PoisonousSporeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "MedusaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Medusa}", + "GreekSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreekSkeleton}", + "GraniteFlyerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GraniteFlyer}", + "GraniteGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GraniteGolem}", + "BloodZombieBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodZombie}", + "DripplerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Drippler}", + "TombCrawlerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TombCrawlerHead}", + "DuneSplicerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DuneSplicerHead}", + "FlyingAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.FlyingAntlion}", + "WalkingAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WalkingAntlion}", + "DesertGhoulBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertGhoul}", + "DesertLamiaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertLamiaDark}", + "DesertDjinnBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertDjinn}", + "DesertBasiliskBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertBeast}", + "RavagerScorpionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DesertScorpionWalk}", + "StardustSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustSoldier}", + "StardustWormBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustWormHead}", + "StardustJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustJellyfishBig}", + "StardustSpiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustSpiderBig}", + "StardustSmallCellBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.None}", + "StardustLargeCellBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.StardustCellBig}", + "SolarCoriteBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarCorite}", + "SolarSrollerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarSroller}", + "SolarCrawltipedeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarCrawltipedeHead}", + "SolarDrakomireRiderBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarDrakomireRider}", + "SolarDrakomireBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarDrakomire}", + "SolarSolenianBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SolarSolenian}", + "NebulaSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaSoldier}", + "NebulaHeadcrabBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaHeadcrab}", + "NebulaBrainBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaBrain}", + "NebulaBeastBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.NebulaBeast}", + "VortexLarvaBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexLarva}", + "VortexHornetQueenBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexHornetQueen}", + "VortexHornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexHornet}", + "VortexSoldierBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexSoldier}", + "VortexRiflemanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.VortexRifleman}", + "PirateCaptainBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCaptain}", + "PirateDeadeyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateDeadeye}", + "PirateCorsairBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCorsair}", + "PirateCrossbowerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PirateCrossbower}", + "MartianWalkerBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MartianWalker}", + "RedDevilBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RedDevil}", + "PinkJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.PinkJellyfish}", + "GreenJellyfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GreenJellyfish}", + "DarkMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.DarkMummy}", + "LightMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LightMummy}", + "AngryBonesBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.AngryBones}", + "IceTortoiseBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.IceTortoise}", + "SandSlimeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandSlime}", + "SeaSnailBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SeaSnail}", + "MoonLordPainting": "{$PaintingArtist.Crowno}", + "SandElementalBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandElemental}", + "SandsharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandShark}", + "SandsharkCorruptBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkCorrupt}", + "SandsharkCrimsonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkCrimson}", + "SandsharkHallowedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SandsharkHallow}", + "TumbleweedBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Tumbleweed}", + "BossBagBetsy": "{$CommonItemTooltip.RightClickToOpen}", + "BossBagOgre": "{$CommonItemTooltip.RightClickToOpen}", + "BossBagDarkMage": "{$CommonItemTooltip.RightClickToOpen}", + "ExplosiveBunny": "搭配兔兔炮使用", + "VialofVenom": "“剧毒”", + "FlaskofVenom": "近战攻击会对敌人施放毒液", + "VenomArrow": "对目标施放毒液", + "VenomBullet": "对目标施放毒液", + "PartyBullet": "碰撞时爆炸成彩纸", + "NanoBullet": "造成混乱", + "ExplodingBullet": "碰撞时爆炸", + "GoldenBullet": "杀死的敌人会掉落更多的钱", + "FlaskofCursedFlames": "近战攻击会对敌人施放诅咒焰", + "FlaskofFire": "近战攻击会点燃敌人", + "FlaskofGold": "近战攻击会使敌人掉落更多金子", + "FlaskofIchor": "近战攻击会降低敌人防御力", + "FlaskofNanites": "近战攻击会迷惑敌人", + "FlaskofParty": "近战攻击会喷撒彩纸", + "FlaskofPoison": "近战攻击会使敌人中毒", + "CobaltBreastplate": "暴击率增加3%", + "CobaltLeggings": "移动速度提高10%", + "MythrilChainmail": "伤害增加5%", + "MythrilGreaves": "暴击率增加3%", + "RocketI": "爆破半径小。不会破坏图格", + "RocketII": "爆破半径小。会破坏图格", + "RocketIII": "爆破半径大。不会破坏图格", + "RocketIV": "爆破半径大。会破坏图格", + "AsphaltBlock": "提高奔跑速度", + "CobaltPickaxe": "可开采秘银和山铜", + "MythrilPickaxe": "可开采精金和钛金", + "Cannonball": "搭配大炮使用", + "Arkhalis": "“我没拿到真空之刃”", + "BoneGlove": "33%的几率不消耗骨头", + "LogicGate_AND": "所有灯亮时激活,其他情况下停用", + "LogicGate_NAND": "部分灯亮时激活,其他情况下停用", + "DD2FlameburstTowerT2Popper": "{$ItemTooltip.DD2FlameburstTowerT1Popper}", + "DD2FlameburstTowerT3Popper": "{$ItemTooltip.DD2FlameburstTowerT1Popper}", + "DD2BallistraTowerT2Popper": "{$ItemTooltip.DD2BallistraTowerT1Popper}", + "DD2BallistraTowerT3Popper": "{$ItemTooltip.DD2BallistraTowerT1Popper}", + "DD2ExplosiveTrapT2Popper": "{$ItemTooltip.DD2ExplosiveTrapT1Popper}", + "DD2ExplosiveTrapT3Popper": "{$ItemTooltip.DD2ExplosiveTrapT1Popper}", + "DD2LightningAuraT2Popper": "{$ItemTooltip.DD2LightningAuraT1Popper}", + "DD2LightningAuraT3Popper": "{$ItemTooltip.DD2LightningAuraT1Popper}", + "ApprenticeScarf": "{$ItemTooltip.HuntressBuckler}", + "SquireShield": "{$ItemTooltip.HuntressBuckler}", + "MonkBelt": "{$ItemTooltip.HuntressBuckler}", + "ApprenticeAltHead": "提高哨兵数量上限\n仆从和魔法伤害各增加10%", + "ApprenticeAltPants": "仆从伤害增加20%,魔法暴击率增加25%", + "ApprenticeAltShirt": "仆从伤害增加30%,魔法伤害增加15%", + "ApprenticeHat": "提高哨兵数量上限,魔力花费减少10%", + "ApprenticeRobe": "仆从伤害增加20%,魔法伤害增加10%", + "ApprenticeStaffT3": "溅弹防御减少瘴气!", + "ApprenticeTrousers": "仆从伤害增加10%,移动速度提高20%", + "BookStaff": "想知道是谁把一本无限智慧巨著戳在一根棍子上...\n以施放强大的龙卷风", + "DD2BallistraTowerT1Popper": "速度缓慢但伤害力极高的塔,可以射出穿透性箭矢\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2BetsyBow": "射出分裂的箭,对空中的敌人造成更多伤害", + "DD2ElderCrystal": "放入埃特尼亚水晶座以召唤埃特尼亚的传送门", + "DD2ElderCrystalStand": "可托住埃特尼亚水晶", + "DD2EnergyCrystal": "经常用于以物理形式的防御表现一个人的意志力", + "DD2ExplosiveTrapT1Popper": "可在敌人来到附近时爆炸的机关\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2FlameburstTowerT1Popper": "普通速度的塔,可以射出爆炸的火球\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2LightningAuraT1Popper": "可以反复击打进入其内部的敌人的光环\n{$CommonItemTooltip.EtherianManaCost10}", + "DD2PetDragon": "召唤宠物龙", + "DD2PetGato": "召唤宠物Gato", + "DD2PetGhost": "召唤宠物闪烁灯芯来提供照明", + "DD2PhoenixBow": "利用不朽火焰的力量", + "DD2SquireBetsySword": "向前释放心的能量", + "DD2SquireDemonSword": "以用护盾防护", + "DefenderMedal": "用于与酒馆老板进行交易的货币", + "HuntressAltHead": "提高哨兵数量上限\n仆从伤害和远程暴击率各增加10%", + "HuntressAltPants": "仆从伤害增加25%,移动速度提高20%", + "HuntressAltShirt": "仆从和远程伤害增加25%", + "HuntressBuckler": "提高哨兵数量上限\n仆从伤害增加10%", + "HuntressJerkin": "仆从和远程伤害各增加20%", + "HuntressPants": "仆从伤害增加10%,移动速度提高20%", + "HuntressWig": "提高哨兵数量上限,远程暴击率提高10%", + "MonkAltHead": "提高哨兵数量上限,近战和仆从伤害增加20%", + "MonkAltPants": "仆从伤害、移动速度和近战暴击率各增加20%", + "MonkAltShirt": "仆从伤害和近战速度各增加20%", + "MonkBrows": "提高哨兵数量上限,近战攻击速度提高20%", + "MonkPants": "仆从伤害增加10%,\n暴击率增加10%,移动速度提高20%", + "MonkShirt": "仆从和近战伤害各增加20%", + "MonkStaffT1": "可在挥动以粉碎敌人时补充能量", + "MonkStaffT2": "可在击打敌人时召唤鬼魂", + "MonkStaffT3": "握持时则可交替展开攻击!", + "SquireAltHead": "提高哨兵数量上限,为你带来10%的仆从伤害", + "SquireAltPants": "仆从伤害、暴击率各增加20%,移动速度提高30%", + "SquireAltShirt": "仆从伤害增加30%,生命再生速度大幅提高", + "SquireGreatHelm": "提高哨兵数量上限,提高生命再生速度", + "SquireGreaves": "仆从伤害增加15%,近战暴击率和移动速度各提高20%", + "SquirePlating": "仆从和近战伤害各增加15%", + "ArkhalisShirt": "{$ItemTooltip.ArkhalisHat}", + "ArkhalisPants": "{$ItemTooltip.ArkhalisHat}", + "ArkhalisWings": "{$ItemTooltip.ArkhalisHat}\n{$CommonItemTooltip.FlightAndSlowfall}", + "ArkhalisHat": "{$CommonItemTooltip.DevItem}\n'我没有从网格中拿到'", + "LeinforsHat": "{$CommonItemTooltip.DevItem}\n'为了保持甜美动人的风格'", + "LeinforsShirt": "{$CommonItemTooltip.DevItem}\n'重获性感'", + "LeinforsPants": "{$CommonItemTooltip.DevItem}\n'什叶的惊喜!没想到会用在裤子上吧?'", + "LeinforsWings": "{$CommonItemTooltip.DevItem}\n'羽翼丰满!神马意思?!'", + "LeinforsAccessory": "{$CommonItemTooltip.DevItem}\n'为了获得最佳结果,请搭配意大利面食'", + "WoodenCrateHard": "{$ItemTooltip.WoodenCrate}", + "IronCrateHard": "{$ItemTooltip.IronCrate}", + "GoldenCrateHard": "{$ItemTooltip.GoldenCrate}", + "CorruptFishingCrateHard": "{$ItemTooltip.CorruptFishingCrate}", + "CrimsonFishingCrateHard": "{$ItemTooltip.CrimsonFishingCrate}", + "DungeonFishingCrateHard": "{$ItemTooltip.DungeonFishingCrate}", + "FloatingIslandFishingCrateHard": "{$ItemTooltip.FloatingIslandFishingCrate}", + "HallowedFishingCrateHard": "{$ItemTooltip.HallowedFishingCrate}", + "JungleFishingCrateHard": "{$ItemTooltip.JungleFishingCrate}", + "GolfBall": "{$CommonItemTooltip.GolfBall}", + "GolfClubIron": "{$CommonItemTooltip.GolfIron}", + "GolfClubPutter": "{$CommonItemTooltip.GolfPutter}", + "GolfClubWedge": "{$CommonItemTooltip.GolfWedge}", + "GolfClubDriver": "{$CommonItemTooltip.GolfDriver}", + "GolfBallDyedBlack": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedBlue": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedBrown": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedCyan": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedGreen": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedLimeGreen": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedOrange": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedPink": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedPurple": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedRed": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedSkyBlue": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedTeal": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedViolet": "{$CommonItemTooltip.GolfBall}", + "GolfBallDyedYellow": "{$CommonItemTooltip.GolfBall}", + "Apricot": "{$CommonItemTooltip.MinorStats}", + "Banana": "{$CommonItemTooltip.MinorStats}", + "BlackCurrant": "{$CommonItemTooltip.MinorStats}", + "BloodOrange": "{$CommonItemTooltip.MinorStats}", + "Cherry": "{$CommonItemTooltip.MinorStats}", + "Coconut": "{$CommonItemTooltip.MinorStats}", + "Dragonfruit": "{$CommonItemTooltip.MediumStats}", + "Elderberry": "{$CommonItemTooltip.MinorStats}", + "Grapefruit": "{$CommonItemTooltip.MinorStats}", + "Lemon": "{$CommonItemTooltip.MinorStats}", + "Mango": "{$CommonItemTooltip.MinorStats}", + "Peach": "{$CommonItemTooltip.MinorStats}", + "Pineapple": "{$CommonItemTooltip.MinorStats}", + "Plum": "{$CommonItemTooltip.MinorStats}", + "Rambutan": "{$CommonItemTooltip.MinorStats}", + "Starfruit": "{$CommonItemTooltip.MediumStats}", + "CanOfWorms": "{$CommonItemTooltip.RightClickToOpen}", + "FrozenCrate": "{$CommonItemTooltip.RightClickToOpen}", + "FrozenCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "OasisCrate": "{$CommonItemTooltip.RightClickToOpen}", + "OasisCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "OceanCrate": "{$CommonItemTooltip.RightClickToOpen}", + "OceanCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "LobsterTail": "{$CommonItemTooltip.MediumStats}", + "Oyster": "{$CommonItemTooltip.RightClickToOpen}", + "ShuckedOyster": "{$CommonItemTooltip.MinorStats}", + "GolfClubStoneIron": "{$CommonItemTooltip.GolfIron}", + "GolfClubRustyPutter": "{$CommonItemTooltip.GolfPutter}", + "GolfClubBronzeWedge": "{$CommonItemTooltip.GolfWedge}", + "GolfClubWoodDriver": "{$CommonItemTooltip.GolfDriver}", + "GolfClubMythrilIron": "{$CommonItemTooltip.GolfIron}", + "GolfClubLeadPutter": "{$CommonItemTooltip.GolfPutter}", + "GolfClubGoldWedge": "{$CommonItemTooltip.GolfWedge}", + "GolfClubPearlwoodDriver": "{$CommonItemTooltip.GolfDriver}", + "GolfClubTitaniumIron": "{$CommonItemTooltip.GolfIron}", + "GolfClubShroomitePutter": "{$CommonItemTooltip.GolfPutter}", + "GolfClubDiamondWedge": "{$CommonItemTooltip.GolfWedge}", + "GolfClubChlorophyteDriver": "{$CommonItemTooltip.GolfDriver}", + "TheBrideBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.TheBride}", + "ZombieMermanBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.ZombieMerman}", + "EyeballFlyingFishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.EyeballFlyingFish}", + "BloodSquidBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodSquid}", + "BloodEelBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodEelHead}", + "GoblinSharkBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.GoblinShark}", + "BloodNautilusBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodNautilus}", + "AppleJuice": "{$CommonItemTooltip.MinorStats}", + "GrapeJuice": "{$CommonItemTooltip.MajorStats}", + "Lemonade": "{$CommonItemTooltip.MinorStats}", + "BananaDaiquiri": "{$CommonItemTooltip.MinorStats}", + "PeachSangria": "{$CommonItemTooltip.MinorStats}", + "PinaColada": "{$CommonItemTooltip.MinorStats}", + "TropicalSmoothie": "{$CommonItemTooltip.MinorStats}", + "BloodyMoscato": "{$CommonItemTooltip.MinorStats}", + "SmoothieofDarkness": "{$CommonItemTooltip.MinorStats}", + "PrismaticPunch": "{$CommonItemTooltip.MediumStats}", + "FruitJuice": "{$CommonItemTooltip.MinorStats}", + "FruitSalad": "{$CommonItemTooltip.MinorStats}", + "BurningSpirit": "{$PaintingArtist.Zoomo}", + "JawsOfDeath": "{$PaintingArtist.Darthkitten}", + "TheSandsOfSlime": "{$PaintingArtist.Criddle}", + "SnakesIHateSnakes": "{$PaintingArtist.Xman101}", + "LifeAboveTheSand": "{$PaintingArtist.Zoomo}", + "Oasis": "{$PaintingArtist.Khaios}", + "Uluru": "{$PaintingArtist.darthmorf}", + "VisitingThePyramids": "{$PaintingArtist.Leinfors}", + "BandageBoy": "{$PaintingArtist.Darthkitten}", + "DivineEye": "{$PaintingArtist.Darthkitten}", + "GolfPainting1": "{$PaintingArtist.Crowno}", + "GolfPainting2": "{$PaintingArtist.Crowno}", + "GolfPainting3": "{$PaintingArtist.Crowno}", + "DandelionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Dandelion}", + "GnomeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.Gnome}", + "Nevermore": "{$PaintingArtist.Crowno}", + "Reborn": "{$PaintingArtist.Crowno}", + "Graveyard": "{$PaintingArtist.Crowno}", + "GhostManifestation": "{$PaintingArtist.Crowno}", + "WickedUndead": "{$PaintingArtist.Crowno}", + "BloodyGoblet": "{$PaintingArtist.Crowno}", + "StillLife": "{$PaintingArtist.Crowno}", + "GroxTheGreatWings": "{$CommonItemTooltip.DevItem}\n{$CommonItemTooltip.FlightAndSlowfall}", + "GroxTheGreatHelm": "{$CommonItemTooltip.DevItem}", + "GroxTheGreatArmor": "{$CommonItemTooltip.DevItem}", + "GroxTheGreatGreaves": "{$CommonItemTooltip.DevItem}", + "KiteWyvern": "{$CommonItemTooltip.Kite}", + "KiteBlue": "{$CommonItemTooltip.Kite}", + "KiteBlueAndYellow": "{$CommonItemTooltip.Kite}", + "KiteRed": "{$CommonItemTooltip.Kite}", + "KiteRedAndYellow": "{$CommonItemTooltip.Kite}", + "KiteYellow": "{$CommonItemTooltip.Kite}", + "KiteBoneSerpent": "{$CommonItemTooltip.Kite}", + "KiteWorldFeeder": "{$CommonItemTooltip.Kite}", + "KiteBunny": "{$CommonItemTooltip.Kite}", + "KitePigron": "{$CommonItemTooltip.Kite}", + "KiteManEater": "{$CommonItemTooltip.Kite}", + "KiteJellyfishBlue": "{$CommonItemTooltip.Kite}", + "KiteJellyfishPink": "{$CommonItemTooltip.Kite}", + "KiteShark": "{$CommonItemTooltip.Kite}", + "KiteSandShark": "{$CommonItemTooltip.Kite}", + "KiteBunnyCorrupt": "{$CommonItemTooltip.Kite}", + "KiteBunnyCrimson": "{$CommonItemTooltip.Kite}", + "KiteGoldfish": "{$CommonItemTooltip.Kite}", + "KiteAngryTrapper": "{$CommonItemTooltip.Kite}", + "KiteKoi": "{$CommonItemTooltip.Kite}", + "KiteCrawltipede": "{$CommonItemTooltip.Kite}", + "KiteSpectrum": "{$CommonItemTooltip.Kite}", + "KiteWanderingEye": "{$CommonItemTooltip.Kite}", + "KiteUnicorn": "{$CommonItemTooltip.Kite}", + "FairyQueenBossBag": "{$CommonItemTooltip.RightClickToOpen}", + "LavaCrate": "{$CommonItemTooltip.RightClickToOpen}", + "LavaCrateHard": "{$CommonItemTooltip.RightClickToOpen}", + "HotlineFishingHook": "{$CommonItemTooltip.LavaFishing}", + "LavaFishingHook": "{$CommonItemTooltip.LavaFishing}", + "TeleportationPylonJungle": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonPurity": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonHallow": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonUnderground": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonOcean": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonDesert": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonSnow": "{$CommonItemTooltip.TeleportationPylon}", + "TeleportationPylonMushroom": "{$CommonItemTooltip.TeleportationPylon}", + "RockGolemBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.RockGolem}", + "BloodMummyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BloodMummy}", + "SporeSkeletonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SporeSkeleton}", + "SporeBatBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.SporeBat}", + "LarvaeAntlionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.LarvaeAntlion}", + "CrimsonBunnyBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonBunny}", + "CrimsonGoldfishBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonGoldfish}", + "CrimsonPenguinBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.CrimsonPenguin}", + "BigMimicCorruptionBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicCorruption}", + "BigMimicCrimsonBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicCrimson}", + "BigMimicHallowBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.BigMimicHallow}", + "MossHornetBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.MossHornet}", + "WanderingEyeBanner": "{$CommonItemTooltip.BannerBonus}{$NPCName.WanderingEye}", + "CreativeWings": "{$CommonItemTooltip.FlightAndSlowfall}", + "RainbowWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressUpToBooster}", + "LongRainbowTrailWings": "{$CommonItemTooltip.FlightAndSlowfall}\n{$CommonItemTooltip.PressDownToHover}\n{$CommonItemTooltip.PressUpToBooster}" + }, + "CommonItemTooltip": { + "SpecialCrafting": "用于特殊制作", + "DevItem": "“非常适合冒充开发者!”", + "FlightAndSlowfall": "可飞行和缓慢坠落", + "RightClickToOpen": "可打开", + "MinorStats": "所有属性小幅提升", + "BannerBonus": "附近的玩家针对以下情况获得奖励:", + "Counterweight": "用悠悠球击中一个敌人后,投掷平衡锤", + "EtherianManaCost10": "使用10点天国魔力召唤多个", + "MinuteDuration": "{0}分钟持续时间", + "PlaceableOnXmasTree": "可放置在圣诞树上", + "RestoresLife": "恢复{0}生命值", + "RestoresMana": "恢复{0}魔力", + "SecondDuration": "{0}秒持续时间", + "String": "扩大悠悠球效力范围", + "UsesLife": "使用{0}生命值", + "UsesMana": "使用{0}魔力" + }, + "BuffDescription": { + "WellFed_Expert": "所有属性小幅提升,生命再生速度提高" + } +} \ No newline at end of file diff --git a/Localization/Content/zh-Hans/Legacy.json b/Localization/Content/zh-Hans/Legacy.json new file mode 100644 index 0000000..9626e58 --- /dev/null +++ b/Localization/Content/zh-Hans/Legacy.json @@ -0,0 +1,1162 @@ +{ + "LegacyWorldGen": { + "0": "正在生成世界版图", + "10": "正在生成地表洞穴", + "11": "正在生成丛林", + "12": "正在生成漂浮岛", + "13": "正在添加蘑菇地块", + "14": "正在将泥置于土中", + "15": "正在添加泥沙", + "16": "正在添加发光物品", + "17": "正在添加蛛丝", + "18": "正在创建地狱", + "19": "正在添加水体", + "1": "正在添加沙子", + "20": "正在使世界变得邪恶", + "21": "正在生成山洞", + "22": "正在创建沙滩", + "23": "正在添加宝石", + "24": "沙子正在沉淀", + "25": "正在清理土背景", + "26": "正在放置祭坛", + "27": "正在安置液体", + "28": "正在放置生命水晶", + "29": "正在放置雕像", + "2": "正在生成小山", + "30": "正在隐藏宝藏", + "31": "正在隐藏更多宝藏", + "32": "正在隐藏丛林宝藏", + "33": "正在隐藏水下宝藏", + "34": "正在放置机关", + "35": "正在放置易碎物品", + "36": "正在放置地狱熔炉", + "37": "正在扩大草地", + "38": "正在种仙人掌", + "39": "正在种向日葵", + "3": "正在将土置于土后", + "40": "正在种树", + "41": "正在种草药", + "42": "正在种草", + "43": "正在种藤蔓", + "44": "正在种花", + "45": "正在种蘑菇", + "46": "正在释放未用资源", + "47": "正在重置游戏物品", + "48": "正在设置困难模式", + "49": "正在保存世界数据:", + "4": "正在将岩石置于土中", + "50": "正在备份世界文件", + "51": "正在加载世界数据:", + "52": "正在检查图格对齐:", + "53": "加载失败!", + "54": "找不到备份。", + "55": "正在寻找图格框架:", + "56": "正在添加雪", + "57": "世界", + "58": "正在创建地牢", + "59": "陨石已落地!", + "5": "正在将土放入岩石间", + "60": "正在令世界平坦", + "61": "青苔化", + "62": "宝石化", + "63": "正在建造洞壁", + "64": "正在扩大蜘蛛洞", + "65": "正在清除地图数据:", + "66": "正在保存地图数据:", + "67": "正在加载地图数据:", + "68": "正在绘制地图:", + "69": "正在创建瀑布", + "6": "正在添加粘土", + "70": "正在创建丛林废墟", + "71": "正在创建黄蜂巢", + "72": "正在使世界变得血腥", + "73": "正在验证世界保存数据:", + "74": "史莱姆从天而降!", + "75": "史莱姆已停止从天而降。", + "76": "正在生成建筑物。", + "77": "正在添加更多草地", + "78": "沙漠化", + "79": "正在将墙切片", + "7": "正在随机挖洞", + "80": "正在凿刻大理石", + "81": "正在生长花岗岩", + "8": "正在生成小洞穴", + "9": "正在生成大洞穴" + }, + "LegacyDialog": { + "1": "我希望在我们和克苏鲁之眼的对抗中,不只有你这么个瘦弱的孩子保护我们。", + "10": "看看我的土块;脏死了。", + "100": "如果这个世界可以炸得一干二净,何须再净化它?", + "101": "如果你把这个扔到浴缸后关上所有的窗户,你的鼻子和耳朵就都通了!", + "102": "想玩爆炸试胆吗?", + "103": "喂,你能签了这份不恶意捣乱的承诺书吗?", + "104": "此处禁止吸烟!!", + "105": "炸药如今十分火爆。马上买一些!", + "106": "今天是个找死的好日子!", + "107": "如果我...会发生什么...(砰!)...哦,对不起,你还要那条腿吗?", + "108": "雷管,这是我特别为你准备的灵丹妙药,包治百病。", + "109": "看看我的商品;都是惊爆价!", + "11": "老兄,这太阳真晒啊!我确实拥有一款很通风的盔甲。", + "110": "我依稀记得把一个女人捆了起来,然后扔到了地牢里。", + "111": "...我们遇到麻烦了!那有个血月!", + "112": "如果我更年轻点,我一定会约{Nurse}出来。我以前可迷倒了许多女人。", + "113": "你的小红帽看上去很熟悉...", + "114": "再次感谢你帮我解了诅咒。感觉像是什么东西跳起来咬了我一口。", + "115": "妈妈总是说我会成为一位伟大的裁缝。", + "116": "生活就像一箱衣服;你永远也不知道自己要穿什么!", + "117": "刺绣当然难了!如果不难,就没人绣了!所以刺绣是件难能可贵的事。", + "118": "他们想了解服装行业,而我无所不知。", + "119": "遭到诅咒时很孤独,于是我用皮革制作了一个朋友。我叫他威尔森。", + "12": "太阳很高,但我的价格可不高。", + "120": "谢谢你解救我,人类。其他哥布林把我捆了起来,然后扔在这里。可以说,我们关系不太好。", + "121": "我说他们走的方向不是东边,我们就把我捆起来扔在这里了!", + "122": "我无家可归了,那我能扔掉这些尖刺球吗?我的口袋扎得疼。", + "123": "想找一个工具大师?我是你要找的人!", + "124": "谢谢你的帮助。现在,我不想再这些无缘无故地走来走去了。我相信我们会再见面的。", + "125": "你没我想象中的那么高。", + "126": "嗨...{Mechanic}在做什么?你有没有...你有没有和她谈过?", + "127": "嗨,需要为你那顶帽子配个马达吗?我想我有一个马达和那顶帽子很配。", + "128": "唷,我听说你喜欢火箭和跑鞋,所以我在你的跑鞋上加了一些火箭。", + "129": "沉默是金。导管胶布是银。", + "13": "哦,太好了。我在这儿就能听到{Mechanic}和{Nurse}的争吵声。", + "130": "是的,黄金比铁坚硬。如今的人类都在学些什么知识?", + "131": "你知道吧,理论上,潜水帽和脚蹼应该配套使用。", + "132": "哥布林太容易生气了。事实上,他们能为了一些破布发动战争!", + "133": "老实说,大部分哥布林都不是真正的火箭科学家。而有一些是。", + "134": "你知不知道为什么大家到哪儿都带着这些尖刺球?因为我不知道。", + "135": "我刚刚完成了最新的作品!如果你用力对着它吸气,这个新作品也不会猛烈爆炸。", + "136": "哥布林盗贼不太擅长偷东西。没上锁的箱子都不会偷!", + "137": "谢谢你救了我,朋友!这个奴仆开始生气了。", + "138": "哦,我的英雄!", + "139": "哦,多么英勇!谢谢你救了我,年轻的女士!", + "14": "你有没有看到克斯...克史...克赛...那个大眼睛?", + "140": "哦,多么英勇!谢谢你救了我,年轻人!", + "141": "现在我们已经认识了,我可以搬给你那里去了吧?", + "142": "你好,{Guide}!今天有什么可以为你效劳?", + "143": "你好,{Demolitionist}!今天有什么可以为你效劳?", + "144": "你好,{GoblinTinkerer}!今天有什么可以为你效劳?", + "145": "你好,{Nurse}!今天有什么可以为你效劳?", + "146": "你好,{Mechanic}!今天有什么可以为你效劳?", + "147": "你好,{Dryad}!今天有什么可以为你效劳?", + "148": "想让我从你耳朵后面变出一个钱币吗?不想?好吧。", + "149": "想要一些魔法糖果吗?不想?好吧。", + "15": "这个房屋安全吧?对不对?{PlayerName}?", + "150": "我做了一杯诱人的热巧克力,你感不感...不感兴趣?好吧。", + "151": "你来这里是不是想看看我的水晶球?", + "152": "想不想要一枚魔戒,可以把石头变成史莱姆?好吧,我也没不想要。", + "153": "有人告诉我友谊是神奇的。太荒谬了。友谊不可能把人变成青蛙。", + "154": "我现在能看到你的未来...你会从我这里买很多物品!", + "155": "我曾经试过复活一座天使雕像。然并卵。", + "156": "谢谢!迟早有一天,我的结局也会和这里的其他骷髅一样。", + "157": "嗨,当心脚下!我刚刚走过!", + "158": "等一下,我在这下面快要接收到wifi了。", + "159": "但我快要把闪光灯放到上面了!", + "16": "即便是血月也无法阻挡资本主义。做点生意吧。", + "160": "别动。我的隐形眼镜掉了。", + "161": "我要做的就是找个开关...干嘛?!", + "162": "哦,让我猜猜。买的电线不够。白痴。", + "163": "你能不能...求你了?好吗?好吧。唉。", + "164": "我不喜欢你这样看着我。我在工作呢。", + "165": "嗨,{PlayerName},你是不是刚刚从{GoblinTinkerer}家过来?他有没有提到过我?", + "166": "{ArmsDealer}一直在说怎么按我的压力板。我告诉他,这是用脚踩的。", + "167": "一定要多买些电线!", + "168": "你确定你的设备插好电源了?", + "169": "哦,你知道这个房屋需要什么?需要更多的闪光灯。", + "17": "注意盯着奖励,买个晶状体吧!", + "170": "天空变红的时候,你就知道血月升起来了。血月有一种魔力,能吸引怪物蜂拥而来。", + "171": "嗨,兄弟,你知道哪儿有死亡草吗?哦,没有原因,问问而已。", + "172": "如果你向上看,你就能看到此刻月亮是红色的。", + "173": "晚上你应该呆在家里。黑夜在外面转悠非常危险。", + "174": "嗨,{PlayerName}。有什么可以帮你?", + "175": "我的工作是为你接下来的任务提供建议。如果遇到困难,建议你随时问我。", + "176": "他们说,有个人会告诉你如何在这个地方生存...打住。那个人就是我。", + "177": "你可以用镐子挖土,用斧子砍树。只需把光标放到图格上并点击!", + "178": "如果你想活下来,你需要制造武器和建造房屋。先开始砍树和收集木材。", + "179": "按{InventoryKey}访问制作菜单。拥有足够的木材时,制作工作台。这将让你能够制作更为复杂的东西,但必须接近工作台。", + "18": "Kosh, kapleck Mog。哦,对不起,这是克林贡语,意思是“要么买,要么死。”", + "180": "你可以建造房屋,方法是将木材和其他砖块放在是世界里。别忘了建造和放置墙。", + "181": "拥有一把木剑后,你可以试试从史莱姆身上收集一些凝胶。用木材和凝胶制作一个火把!", + "182": "要执行背景设置,使用锤子!", + "183": "你应该挖矿,找到金属矿石。你可以用它来制作非常有用的物品。", + "184": "现在你拥有了一些矿石,你需要将它铸成矿锭,才能用来制作物品。这需要熔炉!", + "185": "你可以用火把、木材和石头制作熔炉。请务必站在工作台旁边。", + "186": "你需要一个砧子才能充分锤炼金属锭。", + "187": "砧子可以用铁制作或者从商人那里购买。", + "188": "地下有水晶之心,可以用来提高你的最大生命值。你可以用镐子来打碎它们。", + "189": "如果你收集5颗坠落之星,就可以合制成一个物品,以提升你的魔法能力。", + "19": "是{PlayerName}吗?我听到过有人说好话,朋友!", + "190": "夜晚,星星在坠落,洒满全世界。它们的用途极为广泛。如果那你看到一颗,一定要拿到手,因为星星在日出后就会消失。", + "191": "吸引他人搬进镇子的方法有很多种。他们当然需要有个家。", + "192": "要将房间打造成家,则需要门、椅子、桌子和光源。记得房屋还要有墙。", + "193": "两个人不能住一个家。还有,如果家被摧毁了,就要找个新的住处。", + "194": "你可以使用房屋界面来分配和查看住房情况。打开物品栏并点击房屋图标。", + "195": "如果想让商人搬进来,你需要收集很多钱。50枚银币就能搞定!", + "196": "要让护士搬进来,你需要提高自己的最大生命值。", + "197": "如果你有一支枪,军火商会来向你出售弹药!", + "198": "你需要打败一只强大的怪物来证明自己。这样才能吸引树妖的注意。", + "199": "务必彻底探索整个地牢。深处可能关押了囚犯。", + "2": "看看你穿的破盔甲。最好多买点治疗药水。", + "20": "我听说有一个秘密宝藏...哦,没什么。", + "200": "地牢旁边的老人已经解除诅咒了,现在他也许愿意加入我们。", + "201": "拿好你能够找到的任何炸弹。爆破专家也许想瞧一瞧。", + "202": "哥布林和我们的差别有那么大吗,都没法和平相处了吗?", + "203": "我听说,这些地方住着一名强大的巫师。下次你去地下的时候一定要留心他。", + "204": "如果在恶魔祭坛上合成晶状体,你也许能够找到召唤一个强大怪物的方法。不过,你最好等到夜晚再用它。", + "205": "你可以用腐肉和魔粉制作虫饵。你必须在腐化区域才能使用它。", + "206": "恶魔祭坛在腐化之地随处可见。你必须靠近它们才能制作一些物品。", + "207": "你可以用一个爪钩和三条链子制作一个抓钩。地下深处的骷髅们通常带着爪钩,而链子可以用铁锭制作。", + "208": "如果你看到罐子,一定要砸开它。罐子里有各种有用的补给。", + "209": "整个世界都藏着宝藏。地下深处能够找到一些有意思的东西!", + "21": "你是说天使雕像?对不起,我不是收废品的。", + "210": "砸碎暗影珠有时会导致流星坠落天际。暗影珠通常位于在腐化区域周围的裂缝中。", + "211": "你应当专注于收集更多的生命水晶,以提高最大生命值。", + "212": "你现有的装备根本做不到。你需要制作更好的盔甲。", + "213": "我认为你已经准备好迎接第一场大型战斗了。晚上收集眼球中的一些晶状体,并将其带到恶魔祭坛。", + "214": "在面对下一个挑战时,建议你提高生命值。十五颗心应该足够了。", + "215": "腐化之地的黑檀石可用一些树妖的粉末净化,或者用炸药摧毁。", + "216": "下一步应当探索腐化裂缝。寻找并摧毁你找到的任何暗影珠。", + "217": "离这里不远有一个古老的地牢。现在正是查探一番的好时机。", + "218": "你应当试试提高到最大的生命值。试着收集二十颗心。", + "219": "如果你愿意挖得足够深,丛林中就有很多宝藏等着你去发现。", + "22": "以前守护这儿的人留给了我一些垃圾...呃,我意思是...一些宝藏!", + "220": "地狱由一种名为狱石的材料构成。它非常适合制作武器和盔甲。", + "221": "在你准备好挑战地狱的守卫时,必须进行活祭。它所需要的一切都能在地狱中找到。", + "222": "务必砸毁你能找到的所有恶魔祭坛。这样做一定会有好处的!", + "223": "有时,从极明或极暗的地方坠落的生物中能收集到灵魂。", + "224": "哈哈哈,一瓶...蛋酒!", + "225": "你愿意给我烤些饼干吗?", + "226": "什么?你认为我不是真的?", + "227": "我把你的脸缝好了。下次要多小心。", + "228": "很可能会留疤。", + "229": "情况好多了。我不想再看到你跳崖。", + "23": "不知道月亮是不是芝士做的...什么?对了,买点东西!", + "230": "并不是很疼吧。现在呢?", + "231": "生活在地下已经够惨的了,像你这样的败类还要趁我睡觉来偷我的孩子。", + "232": "只有你知我知,{Dryad}是我唯一信任的人。她是这里唯一一个不想吃掉我或用我来炼药的人。", + "233": "有一天,我试着舔了舔自己,看看会发生什么大不了的事,然后全身都开始发蓝光。", + "234": "每次看到蓝色,我都感到郁闷和懒散。", + "235": "你在这附近看到过猪吗?我弟弟的一条腿被猪叼走了。", + "236": "镇上的每个人都感到有点古怪。昨晚,我醒来时,服装商正在啃我的脚。", + "237": "如果能说服{Truffle}过来了试一下...尺码,我会给你打折。", + "238": "我觉得{Truffle}被人误会了,他真的是个好人。", + "24": "你是说黄金?我要把它抖出来。", + "240": "我不知道什么是“肚皮波浪”,所以别问了!", + "241": "人们正盛传着一个关于我的谣言:“如果不能击败他,就吃掉他!”", + "242": "欧嘿,可有宝物否?", + "243": "我应该做劫机大盗?我考虑过做劫机大盗。", + "244": "不管怎样,喷气背包和你很搭!", + "245": "近来我感觉有点暴躁,所以别再拍马屁了,跟个叫花子似的!", + "246": "我对那个叫{Cyborg}的家伙特别好奇。他的移动能力这么强,功耗是怎样的?", + "247": "我觉得,那个船长“烂醉如泥”,你知道我的意思吧!", + "248": "给我一些装备!", + "249": "我喜欢你的...装备。是用黄铜做的吗?", + "25": "你最好不要让血沾到我身上。", + "250": "进入神圣之地后,你将看到天空中挂着一道彩虹。如果你喜欢,我帮你画下来。", + "251": "查一查{PartyGirl}。她就是那个将整个镇子漆成红色的女孩!", + "252": "我知道青绿色和蓝绿色之间的差别。但我不会告诉你。", + "253": "钛白色用完了,别问了。", + "254": "尝试旋涡粉色和紫色,肯定管用,我发誓!", + "255": "不、不、不...灰色也分很多种!别让我开始...", + "256": "我希望别下雨了,漆还没干。下雨就惨了!", + "257": "我带给你最丰富的色彩,以换取你的财富!", + "258": "亲爱的,你的穿着太单调了。你一定得好好学学,怎么给单调的衣服染色!", + "259": "我唯一愿意染的木材是红木。给任何其他木材染色都是浪费。", + "26": "快点,别再流血了。", + "260": "你必须对{Pirate}做点什么。每次他来这儿,我都要用一整个星期才能去掉气味!", + "261": "我是啥医?我是巫医。", + "262": "法术的核心是自然。自然的本质是法术。", + "263": "{Nurse}可以治愈你的身体,但我可以让治愈过程更体面。", + "264": "认真选,{PlayerName},我的商品不稳定,我的黑魔法很神秘。", + "265": "我们得谈谈。这...聚会的事。", + "266": "我不知道我是更喜欢派对还是庆功派对。", + "267": "我们应该办一个闪耀根派对,而且我们还应该办一个庆功派对。", + "268": "哇,{PlayerName},认识像你这样的冒险家,让我有股想开派对的冲动!", + "269": "装个迪斯科球,我告诉你如何开派对。", + "27": "如果你要死,去外面死。", + "270": "我去过一次瑞典,他们经常开派对,你怎么和他们不一样?", + "271": "我叫{PartyGirl},但人们叫我派对扫把星。是啊,我也不知道,但听起来酷酷的。", + "272": "你开派对吗?有时开?好吧,那我们谈谈...", + "273": "我不是旱鸭子,但即便试水失败也比永远不试强。", + "274": "哟嗬嗬,一瓶...闪耀根!", + "275": "呀!贼溜了,唠扯唠扯鹦鹉吧,因...噶...哈...唠啥嗑呢?", + "276": "{PlayerName},你是俺船长这半个月见过的最漂亮的妞!", + "277": "别碰我的战利品,淘气鬼!", + "278": "说啥呢?白鲸是我的!", + "279": "*卜拉卜拉卡卡*", + "28": "什么意思?!", + "280": "然后,第492-8队说,“你认为我是谁?第472-6队?”哈。哈。哈。", + "281": "射弹击中火车制动器时,我前进的速度大大减慢了。", + "282": "这句话是个假命题,是不是?", + "283": "所以那个“朋克”样的小妞是个发明家,是吗?我想我要给她看一两件东西!", + "284": "当然,虽然我和{Pirate}是好朋友,但当他的鹦鹉在我身上拉粪时,我特别烦他。那东西还有腐蚀性!", + "285": "我为自己建立了品尝机制,这样就能喝一点麦芽酒!", + "286": "有时候我有一点...懂了吗?有一点吗?", + "287": "背部和两侧都很短?", + "288": "那些亮点真会吸引你的眼球!", + "289": "我的手黏糊糊的...是蜡。", + "29": "我不喜欢你说话的口气。", + "290": "茶?咖啡?干脆再来点橙汁?", + "291": "美女,我们真的需要补一补那些开叉。", + "292": "啊呼!你是我最喜欢的八婆。", + "293": "先生,您今天想试试哪种须后水?", + "294": "坐一会儿,我给你剃须刀。", + "295": "要么天生有型,要么变得有型。", + "296": "对于你,我想我们会弄个...容易保养的发型。", + "297": "我曾用过一次染发大师的一款产品。结果变得焦黄。简直就是灾难。", + "298": "哦,真可怜,可怜的家伙。来...在这儿坐下。会没事的。嘘。", + "299": "看看我的新发型。", + "3": "我觉着像是有个邪恶的东西在看着我。", + "30": "你怎么会在这儿?如果你没流血,就没必要在这儿。出去。", + "300": "你好,先生,我是{Stylist},今天我来为你理发。", + "301": "就剃掉上面一点吗?那可真没意思...", + "302": "希望你会喜欢我给{PartyGirl}设计的发型!", + "303": "对于{Demolitionist}烧焦的头发,我无力回天了。他注定没救了。", + "304": "给不给小费你看着办,但别忘了剪刀和你的脑袋都在我手上。", + "305": "对了,这可是一把割喉的剃刀。", + "306": "你今晚最好别碰我的头发,哼。我刚磨快我的剪刀,正想找个借口用用它!", + "307": "呣,我听{PartyGirl}说,{Mechanic}的朋友{Nurse}买了双鞋,花光了她男友上个月的工资。", + "308": "有一次,我给{Cyborg}套上假发,这样我就能给他理发了。我觉得他还挺喜欢的!", + "309": "有一次,我试过去拜访{Stylist}。她看了我一下 就说“不行。”", + "31": "什么?!", + "310": "我觉得我该做头发了!", + "311": "你今天到底有没有梳过头发?", + "312": "那么剪个妖精发型,你想留点女士鬓角吗?", + "313": "修剪发髻和眉毛可以,但是不能修剪鼻毛。", + "314": "好吧,你边坐边染。25分钟后我再来将染发剂冲洗干净...", + "315": "谢谢啊!现在,我终于可以做头发了。", + "316": "如果你再早点来,我就会免费给你理发。", + "317": "他们说,不要玩弄剪刀。他们说,你不会被困在蜘蛛网中!", + "318": "啊,我的头发,上面都是蜘蛛网!", + "319": "大约三小时后到{Guide}家后面来找我,我想我有件你会很感兴趣的东西。", + "32": "看到那个在地牢周围转来转去的老人没?他看上去遇到麻烦了。", + "320": "那个{Merchant},他真的没头脑,不懂什么是好交易。", + "321": "我只卖我能弄到的。{Clothier}老缠着我要异国情调的衣服。", + "322": "嗯,看上去你会使用天使雕像!他们切片,又切丁,让一切都如此美好!", + "323": "我不会因“买家后悔...”而退款也不会因任何其它原因退款,不骗你。", + "324": "现在购买还包邮!", + "325": "我卖的商品来自可能根本就不存在的地方!", + "326": "你想要两文钱!?一文钱就成交。", + "327": "既能抽水烟,也能煮咖啡!还能炸切丝薯条!", + "328": "看一看,瞧一瞧!一斤重的鱼!新鲜味美!一斤重的鱼!", + "329": "如果你是在找垃圾,那就来错地方了。", + "33": "我希望{Demolitionist}会更小心些。每天都得为他缝合肢体,我都烦死了。", + "330": "旧货店?不,我只卖市场上的尖货。", + "331": "砸碎一颗猩红之心有时会令流星坠落天际。猩红之心通常位于猩红矿区周围的裂缝中。", + "332": "你试过对猩红之地的猩红石使用净化粉吗?", + "333": "你必须净化这个猩红的世界。", + "334": "嘿!我有一个活儿给你。不要以为你能拒绝,怎么都不行!", + "335": "我想要一条鱼,你去给我弄一条来!问我它的信息吧!", + "336": "嘿!你就是我一直在找的牺...我是说称职的钓鱼大师! ", + "337": "{Angler}想让你正式成为{WorldName}的跑腿官!", + "338": "什....么?!难道你没看见我在收钓鱼线吗??", + "339": "我的鱼够了!我现在不需要你的帮助!", + "34": "嗨,{ArmsDealer}有没有提过为什么要去看医生?只是好奇罢了。", + "340": "整个{WorldName}中都没有厨师,所以我不得不自己烹鱼! ", + "341": "嘿!当心!我设了许多机关,用来实施史上最大的恶作剧!没人会发觉!你胆敢告诉任何人!", + "342": "听听小孩的忠告吧,永远不要用舌头碰冰块!等一下,就当我没说,我就想看你这样做!", + "343": "听说过会叫的鱼吗?!我没听说过,只是想知道你听说过没!", + "344": "{WorldName}到处都是各种稀奇古怪的鱼!", + "345": "太失望了!有些鱼可能在我出生之前就灭绝了,真不公平!", + "346": "我没有妈妈,也没有爸爸,但我有很多鱼!这就够了!", + "347": "嘿嘿,你真该看看当我把食人鱼的牙齿刺进椅子之后,{Dryad}的表情!", + "348": "我有个任务给你!不,现在我才不管什么僵尸大灾难呢!", + "349": "快点,听着!我要你马上去抓个东西给我!", + "35": "我要和{Guide}认真谈一谈。你一周到底有多少次被熔岩烫成重伤?", + "350": "我恨血月!各种可怕的噪音害我一整夜都没睡!", + "351": "血月是最不适合钓鱼的时候!这鱼咬人,没错,但僵尸也咬人!", + "352": "现在有一大群怪物在附近跑来跑去!", + "353": "谢谢,我想,谢谢你救了我之类的。你是个优秀的得力仆从!", + "354": "啥?你是哪位?我绝对不只是溺水之类的!", + "355": "你救了我!你太好了,我可以使唤你...呃,我是说,雇你帮我做些了不起的事!", + "356": "还有多余的骨头卖吗?我的髋骨断了,我想再...换一次。", + "357": "太好了!终于有人来拿掉我手上的蛆虫了。", + "358": "没有我家史莱姆油治不好的病!相信我,很管用,看看我这生龙活虎的身板就知道了!", + "359": "真正的脊骨就快到货了,你要不买点什么?", + "36": "我认为你这样看上去好多了。", + "360": "你肯定想不到大家扔了些什么给我...想买点?", + "361": "我会帮你一把,但这是最后一次,我一个月都没把它弄回来", + "362": "离蜘蛛远点。它们会吸掉你的内脏,留下一副空壳。这次一定要信我。", + "363": "这个世界上永恒不变的就只有死亡和税收,我两样都有!", + "364": "你又来了?你是想要更多钱吧!?", + "365": "每个人一定要又是开门又是关门,整得这里吵死人吗?!", + "366": "看得出你一如往常的闲。实在无法想象你这种人的工作生活会是啥样。", + "367": "是,是,是!-- 我一会儿就把你那份给你。我以为你会更耐心点,等我把所有工作都做完。", + "368": "一个人独自留在这个地方要做些什么?去打扰不太忙的人!", + "369": "...两桶糖浆,还有...哦,别介意,你在这啊。这是你的钱。", + "37": "呃...你的脸怎么了?", + "370": "别告诉别人...我实在不明白他们为什么懒得付租金", + "371": "有一次试过让{Dryad}给我点好处,现在我在一些奇特的地方种了些菌类。", + "372": "告诉{ArmsDealer}别再用弹药抵缴税款了,我连把枪都没有。", + "373": "你为什么不试着收{Demolitionist}的钱,并且不会断胳膊断脚...", + "374": "我刚从{Merchant}那儿回来。他想知道我是否接受信用卡。", + "38": "我的天啊!我很好,但没有“那么”好。", + "380": "这是我从其余人那儿收缴的税款的抽成!", + "381": "给你,再次拿走我所有的钱币!抓好,赶紧从我视野里消失!", + "382": "呸!给,拿好你的铜板,滚出我的视线!", + "383": "这是你目前能拿到的所有钱,一分也不能多!拿去,花得精明点。", + "39": "亲爱的朋友,今天我们集聚于此道声告别...喔,你会没事儿的。", + "390": "...人们说我贪婪?不,我没什么能给你。", + "391": "哦,你就把我当作钱币符号,啊?因为每次你一看到我就问我要钱。", + "392": "你就不能只是停下来说句“嗨?”", + "393": "呸!你又来了?你刚刚才拿走了我的钱币,给我滚开,晚点再回来!", + "394": "我五分钟前才给了你半个铜板!啊啊啊!", + "395": "又伸进我的钱袋了!?你可以说我很贪心。", + "396": "你刚刚才拿到你的酬劳,多一分钱也没有!滚开!", + "397": "钱不是从树上掉下来的,所以我的钱你别拿太多了!呸! ", + "398": "你已经花光了我付给你的每一分钱!?呸,我可不是慈善家,去杀死史莱姆!", + "399": "没那么快!你已经拿到钱了,赶紧滚开! ", + "4": "剑克纸!赶紧买一把。", + "40": "你把武器落在那边了。我给你拿来...", + "400": "这么快就乞讨了?!别看我,别以为过了一晚上我就会改变主意! ", + "401": "务必砸毁你能找到的所有猩红祭坛。这样做一定会有好处的!", + "402": "猩红祭坛通常出现在猩红之地。你必须靠近它们才能制作一些物品。", + "403": "你可以使用脊椎骨制作血腥脊椎。你必须在猩红矿区中才能使用它。", + "41": "别像个孩子似的!我见过更糟的。", + "42": "这需要缝针!", + "43": "又惹上流氓了?", + "44": "坚持住,我已经在附近找到卡通绷带了。", + "45": "走走看,{PlayerName},你会没事儿的。嘶。", + "46": "你这么做的时候疼吗?别那么做。", + "47": "你看着就像被消化了一半一样。你又在追史莱姆了?", + "48": "转过头去咳嗽。", + "49": "我见过更大的...是的,我确实见过更大的伤口。", + "5": "你想要苹果?你想要胡萝卜?你想要菠萝?我们只有火把。", + "50": "你吃棒棒糖吗?", + "51": "让我看看哪里受伤了。", + "52": "抱歉,你雇不起我。", + "53": "我需要更多金子。", + "54": "你知道的,我干活得收钱。", + "55": "我给不了完美的结局。", + "56": "我能为你做的就只有整容了。", + "57": "别浪费我时间了。", + "58": "我听说在地狱中的某个地方,有一个娃娃看上去很像{Guide}。我很想打它几枪。", + "59": "快点!一个小时后我要和{Nurse}约会呢。", + "6": "美好的清晨,你说呢?你需要什么?", + "60": "我想买{Nurse}卖的东西。你说啥?她什么也不卖?", + "61": "{Dryad}很漂亮。可惜她是个假正经。", + "62": "别和{Demolitionist}浪费时间了。我这边有你要的一切。", + "63": "{Demolitionist}怎么回事啊?难道他发现我们卖的东西完全不同?", + "64": "伙计,这么美妙的夜晚就不要和别人交谈了,你认为呢,{PlayerName}?", + "65": "我喜欢今夜这样的夜晚。有杀不完的小怪!", + "66": "我看你在盯着迷你鲨..你绝对想不到它是怎么做成的。", + "67": "嘿,这可不是演电影,兄弟。弹药得另外购买。", + "68": "把手从我的枪上拿开,哥们!", + "69": "你有没有试过对腐化之地的黑檀石使用净化粉?", + "7": "快要天黑了,朋友。快做决定吧,不然就晚了。", + "70": "我希望{ArmsDealer}不要再挑逗我了。难道他不知道我已经500岁了?", + "71": "为什么{Merchant}老向我推销天使雕像呢?大家都知道它们没一点用。", + "72": "你看到那个在地牢周围转来转去的老人没?他看起来不太好...", + "73": "我想卖啥就卖啥!你要是不喜欢,那真是太可惜了。", + "74": "你为什么一定要在这种时候作对呢?", + "75": "我不想让你买我的东西。我只是想让你想买我的东西,好吗?", + "76": "哥们,今晚就只有我一个人,还是真的有无数僵尸出现?", + "77": "你必须净化这个腐化的世界。", + "78": "注意安全!泰拉瑞亚需要你!", + "79": "时间的沙漏在缓缓流逝。而你并没有优雅地变老。", + "8": "你是不知道土块能在国外卖多少钱。", + "80": "说我雷声大雨点小是啥意思?", + "81": "两个哥布林走进一个酒吧,其中一个对另一个说:“来杯啤酒?!”", + "82": "如果你不解除我的诅咒,我是不会让你进的。", + "83": "你要想进来,那就晚上再来。", + "84": "白天可召唤不了我的主人。", + "85": "你太弱了,破解不了我的诅咒。等你强大点了再来吧。", + "86": "你个可怜的白痴。你现在这样就别指望能对抗我的主人了。", + "87": "我还盼着你身边能有几个帮手呢。", + "88": "求你了,别,陌生人。你只会让自己送命的。", + "89": "你的能力也只够将我从诅咒中解救出来...", + "9": "总有一天他们会讲述{PlayerName}的传奇,肯定会是好故事。", + "90": "陌生人,你是否拥有能打败我主人的力量?", + "91": "请帮帮我!打败捉住我的人,救我出去!求你了!", + "92": "打败我的主人,我就让你进入地牢。", + "93": "想通过那个黑檀石,嗯?为什么不用炸药炸掉它!", + "94": "你有没有在附近看到一个小丑?", + "95": "原来有个炸弹就在这儿,但现在我似乎找不到了...", + "96": "我为这些僵尸准备了些东西!", + "97": "就连{ArmsDealer}都想要我卖的东西!", + "98": "你是想挨子弹呢,还是挨手榴弹?反正我是这么想的。", + "99": "如果你不小心因此而断胳膊断腿,我相信{Nurse}会帮忙的。" + }, + "LegacyMenu": { + "0": "启动泰拉瑞亚新副本来加入!", + "100": "背景开", + "101": "背景关", + "102": "选择语言", + "103": "语言", + "104": "是", + "105": "否", + "106": "切换地图类型 ", + "107": "切换全屏 ", + "108": "放大 ", + "109": "缩小 ", + "10": "加载备份", + "110": "减少透明度 ", + "111": "增加透明度 ", + "112": "地图已启用", + "113": "地图已禁用", + "114": "常规", + "115": "地图控件", + "116": "多核照明:", + "117": "关", + "118": "关闭菜单", + "11": "找不到备份", + "120": "智能光标 ", + "121": "智能光标模式:切换", + "122": "智能光标模式:长按", + "123": "事件进度条", + "124": "关", + "125": "定时", + "126": "开", + "127": "类型", + "128": "放置预览开", + "129": "放置预览关", + "12": "单人模式", + "130": "坐骑 ", + "131": "成就", + "132": "溅血效果开", + "133": "溅血效果关", + "134": "应用", + "135": "服务器设置", + "136": "Steam多人模式:已禁用", + "137": "Steam多人模式:已启用", + "138": "允许用户:仅限邀请", + "139": "允许用户:好友", + "13": "多人模式", + "140": "好友可邀请:关", + "141": "好友可邀请:开", + "142": "允许好友添加好友:关", + "143": "允许好友添加好友:开", + "144": "开始", + "145": "通过Steam加入", + "146": "通过IP加入", + "147": "邀请好友", + "148": "向上", + "149": "向下", + "14": "设置", + "150": "向左", + "151": "向右", + "152": "跳", + "153": "投掷", + "154": "物品栏", + "155": "抓钩", + "156": "快速魔力", + "157": "快速增益", + "158": "快速坐骑", + "159": "快速治疗", + "15": "退出", + "160": "自动选择", + "161": "智能光标", + "162": "使用物品", + "163": "交互", + "164": "游戏玩法控件", + "165": "地图控件", + "166": "快捷键控件", + "167": "手柄设置", + "168": "放大", + "169": "缩小", + "16": "创建角色", + "170": "增加透明度", + "171": "减少透明度", + "172": "切换地图类型", + "173": "切换完整地图", + "174": "向左循环", + "175": "向右循环", + "176": "快捷键#1", + "177": "快捷键#2", + "178": "快捷键#3", + "179": "快捷键#4", + "17": "删除", + "180": "快捷键#5", + "181": "快捷键#6", + "182": "快捷键#7", + "183": "快捷键#8", + "184": "快捷键#9", + "185": "快捷键#10", + "186": "二维码识别器#1", + "187": "二维码识别器#2", + "188": "二维码识别器#3", + "189": "二维码识别器#4", + "18": "头发", + "190": "圆形热键栏", + "191": "光标捕捉向上", + "192": "光标捕捉向右", + "193": "光标捕捉向下", + "194": "光标捕捉向左", + "195": "<未绑定>", + "196": "方向键光标捕捉", + "197": "方向键快捷键", + "198": "手柄高级设置", + "199": "触发器盲区", + "19": "眼睛", + "1": "运行于端口 ", + "200": "滑块盲区", + "201": "左摇杆盲区X", + "202": "左摇杆盲区Y", + "203": "右摇杆盲区X", + "204": "右摇杆盲区Y", + "205": "水平翻转左摇杆", + "206": "垂直翻转左摇杆", + "207": "水平翻转右摇杆", + "208": "垂直反转右控制棒", + "209": "使用", + "20": "皮肤", + "210": "界面", + "211": "密码:可见", + "212": "密码:隐藏", + "213": "智能光标优先级:镐 -> 斧", + "214": "智能光标优先级:斧 -> 镐", + "215": "智能放置块:到光标", + "216": "智能放置块:填充", + "217": "边框颜色", + "218": "光标", + "219": "控件", + "21": "衣服", + "220": "激活套装奖励:向上", + "221": "激活套装奖励:向下", + "222": "快捷键绑定", + "223": "左Shift快速丢弃:已启用", + "224": "左Shift快速丢弃:已禁用", + "225": "快速换墙:已禁用", + "226": "快速换墙:已启用", + "227": "快捷键径向滚动时间:开", + "228": "快捷键径向滚动时间:关", + "229": "图格网格开", + "22": "男", + "230": "图格网格关", + "231": "锁定", + "232": "锁定优先级:焦点目标", + "233": "锁定优先级:最近的目标", + "234": "锁定优先级:最清楚的线", + "235": "abc / ABC / !@#", + "236": "退格键", + "237": "提交", + "238": "太空", + "239": "<-", + "23": "女", + "240": "->", + "241": "手柄说明关", + "242": "手柄说明开", + "243": "菜单控件", + "244": "圆形快捷栏", + "245": "无边框窗口:已启用", + "246": "无边框窗口:已禁用", + "247": "跳帧关", + "248": "跳帧开", + "249": "跳帧隐蔽", + "24": "硬核", + "250": "采矿晃动效果:已启用", + "251": "采矿晃动效果:已禁用", + "252": "界面移动延迟", + "25": "中核", + "26": "软核", + "27": "随机", + "28": "创建", + "29": "硬核角色死后无法复活", + "2": "断开连接", + "30": "中核角色死后掉落物品", + "31": "软核角色死后掉落钱币", + "32": "选择难度", + "33": "上衣", + "34": "内衣", + "35": "裤装", + "36": "鞋子", + "37": "头发", + "38": "头发颜色", + "39": "眼睛颜色", + "3": "服务器需要密码:", + "40": "皮肤颜色", + "41": "上衣颜色", + "42": "内衣颜色", + "43": "裤装颜色", + "44": "鞋子颜色", + "45": "输入角色姓名:", + "46": "删除", + "47": "创建世界", + "48": "输入世界名称:", + "49": "转到窗口模式", + "4": "接受", + "50": "转到全屏", + "51": "分辨率", + "52": "视差", + "53": "跳帧关", + "54": "跳帧开", + "55": "照明:颜色", + "56": "照明:白", + "57": "照明:复古", + "58": "照明:迷幻", + "59": "质量:自动", + "5": "返回", + "60": "质量:高", + "61": "质量:中", + "62": "质量:低", + "63": "视频", + "64": "光标颜色", + "65": "音量", + "66": "控件", + "67": "自动保存开", + "68": "自动保存关", + "69": "自动暂停开", + "6": "取消", + "70": "自动暂停关", + "71": "拾取提示开", + "72": "拾取提示关", + "73": "全屏分辨率", + "74": "向上 ", + "75": "向下 ", + "76": "向左 ", + "77": "向右 ", + "78": "跳 ", + "79": "投掷 ", + "7": "输入服务器密码:", + "80": "物品栏 ", + "81": "快速治疗 ", + "82": "快速魔力 ", + "83": "快速增益 ", + "84": "抓钩 ", + "85": "自动选择 ", + "86": "重置为默认", + "87": "加入", + "88": "开服并开始游戏", + "89": "输入服务器IP地址:", + "8": "正在启动服务器...", + "90": "输入服务器端口:", + "91": "选择世界大小:", + "92": "小", + "93": "中", + "94": "大", + "95": "红:", + "96": "绿:", + "97": "蓝:", + "98": "音效:", + "99": "音乐:", + "9": "加载失败!", + "119": "环境:" + }, + "LegacyTooltip": { + "0": "装备在社交栏", + "10": "慢速度", + "11": "很慢速度", + "12": "极慢速度", + "13": "蜗牛速度", + "14": "无击退力", + "15": "极弱击退力", + "16": "很弱击退力", + "17": "较弱击退力", + "18": "普通击退力", + "19": "较强击退力", + "1": "不会获得任何属性", + "20": "很强击退力", + "21": "极强击退力", + "22": "疯狂击退力", + "23": "可装备", + "24": "时装物品", + "25": " 防御力", + "26": "%镐力", + "27": "%斧力", + "28": "%锤力", + "29": "恢复", + "2": " 近战伤害", + "30": "生命值", + "31": "魔力", + "32": "使用", + "33": "可放置", + "34": "弹药", + "35": "消耗品", + "36": "材料", + "37": " 分钟持续时间", + "38": " 秒持续时间", + "39": "%伤害", + "3": " 远程伤害", + "40": "%速度", + "41": "%暴击率", + "42": "%魔力花费", + "43": "%大小", + "44": "%射速", + "45": "%击退力", + "46": "%移动速度", + "47": "%近战速度", + "48": "套装奖励:", + "49": "售价:", + "4": " 魔法伤害", + "50": "买价:", + "51": "无价", + "52": "消耗 ", + "53": " 召唤伤害", + "54": " 范围", + "55": " 伤害", + "56": "标记为收藏", + "57": "快速丢弃、堆叠和出售将被阻止", + "58": " 投掷伤害", + "59": "它已被一个强大的丛林生物诅咒", + "5": "%暴击率", + "6": "超快速度", + "7": "很快速度", + "8": "快速度", + "9": "普通速度" + }, + "LegacyMultiplayer": { + "10": "你不在队伍中!", + "11": "{0}已启用PvP!", + "12": "{0}已禁用PvP!", + "13": "{0}不再属于任何队伍。", + "14": "{0}加入了红队。", + "15": "{0}加入了绿队。", + "16": "{0}加入了蓝队。", + "17": "{0}加入了黄队。", + "18": "欢迎来到", + "19": "{0}已加入。", + "1": "密码错误。", + "20": "{0}已离开。", + "21": "/玩家", + "22": "{0}加入了粉队。", + "2": "目前状态下操作无效。", + "3": "你已被此服务器封禁。", + "4": "你使用的版本与此服务器不同。", + "5": "已在此服务器上。", + "6": "/玩", + "7": "当前玩家:", + "8": "/滚动", + "9": "滚动一个", + "0": "获得:" + }, + "LegacyMisc": { + "0": "哥布林军队已被打败!", + "100": "选择世界恶魔", + "101": "腐化", + "102": "猩红", + "103": "随机", + "10": "不寒而栗,毛骨悚然...", + "11": "四面回荡着尖叫声...", + "12": "你的世界已获赐钴!", + "13": "你的世界已获赐秘银!", + "14": "你的世界已获赐精金!", + "15": "古老的光明与黑暗之魂已经释放。", + "19": "{0}被杀死了...", + "1": "一支哥布林军队正从西边逼近!", + "20": "正在发生日食!", + "21": "你的世界已获赐钯金!", + "22": "你的世界已获赐山铜!", + "23": "你的世界已获赐钛金!", + "24": "海盗已被打败!", + "25": "海盗正从西边逼近!", + "26": "海盗正从东边逼近!", + "27": "海盗来了!", + "28": "你感受到地下深处的震动...", + "29": "这将是一个可怕的夜晚...", + "2": "一支哥布林军队正从东边逼近!", + "30": "周围的空气越来越冷...", + "31": "南瓜月正在升起...", + "32": "丛林变得焦躁不安...", + "33": "地牢中回荡着尖叫声...", + "34": "霜月正在升起...", + "35": "{0}已死去!", + "36": "{0}已离开!", + "37": "任何", + "38": "压力板", + "39": " 提高了生命再生速度", + "3": "哥布林军队来了!", + "40": "提高生命再生速度", + "41": "火星人要入侵了!", + "42": "火星人已被打败!", + "43": "天界生物要入侵了!", + "44": "你的头脑变得麻木...", + "45": "你痛苦不堪...", + "46": "阴森的声音在你耳边萦绕不绝...", + "47": "月亮领主已苏醒!", + "48": "双子魔眼已经醒来!", + "49": "你从一个奇怪的梦中醒来...", + "4": "雪人军团已被打败!", + "50": "已被打败!", + "51": "月亮碎片", + "52": "月亮末日慢慢逼近...", + "53": "选择", + "54": "拿走", + "55": "拿走一个", + "56": "关闭", + "57": "抓钩", + "58": "跳", + "59": "循环快捷键", + "5": "雪人军团正从西边逼近!", + "60": "攻击", + "61": "建造", + "62": "饮用", + "63": "操作", + "64": "切换菜单", + "65": "放置", + "66": "交换", + "67": "装备", + "68": "卸下装备", + "69": "显示房间旗帜", + "6": "雪人军团正从东边逼近!", + "70": "检查房屋", + "71": "快速制作", + "72": "制作", + "73": "选择", + "74": "丢弃", + "75": "出售", + "76": "转让", + "77": "显示画面", + "78": "隐藏画面", + "79": "使用", + "7": "雪人军团来了!", + "80": "交谈", + "81": "阅读", + "82": "返回", + "83": "收藏", + "84": "你不能在团队块内更改团队!", + "85": "Bug", + "86": "鸭", + "87": "蝴蝶", + "88": "萤火虫", + "89": "接线选项", + "8": "血月正在升起...", + "90": "购买", + "91": "购买更多", + "92": "出售", + "93": "制作更多", + "94": "尝试移除", + "95": "蜗牛", + "96": "看起来像 ", + "97": " 在举办派对", + "98": " 在举办派对", + "99": "派对时间结束!", + "9": "你感到有个邪恶的东西在看着你...", + "104": "在埃特尼亚水晶得到保护之前,无法在没有天国魔力的情况下使用" + }, + "LegacyInterface": { + "0": "生命:", + "100": "生物数", + "101": "杀敌数", + "102": "月相", + "103": "移动速度", + "104": "宝藏", + "105": "稀有生物", + "106": "每秒伤害", + "107": "奇异植物", + "108": "打开地图", + "109": "关闭地图", + "10": "防御力", + "110": "打开文件夹", + "111": "截图", + "112": "你必须先设置边框", + "113": "仅在窗口模式中可用", + "114": "仅在启用地图时可用", + "115": "相机模式已禁用", + "116": "突出显示新物品关", + "117": "突出显示新物品开", + "118": "放大", + "119": "缩小", + "11": "装扮", + "120": "传送至盟友", + "121": "掉落物品", + "122": "排列物品", + "123": "冷天气", + "12": "头盔", + "13": "上衣", + "14": "裤装", + "15": "铂金", + "16": "金", + "17": "银", + "18": "铜", + "19": "重铸", + "1": "呼吸", + "20": "将物品放到此处重铸", + "21": "显示使用以下物品的配方", + "22": "所需物品:", + "23": "无", + "24": "在此放置物品", + "25": "制作", + "26": "钱币", + "27": "弹药", + "28": "商店", + "29": "强夺全部", + "2": "魔力", + "30": "存放全部", + "31": "快速堆叠", + "32": "猪猪存钱罐", + "33": "保险箱", + "34": "时间", + "35": "保存并退出", + "36": "断开连接", + "37": "物品", + "38": "你被杀死了...", + "39": "此房屋很适合。", + "3": "垃圾桶", + "40": "这不是有效的房屋。", + "41": "此房屋已被占领。", + "42": "此房屋已腐化。", + "43": "连接超时", + "44": "正在接收图格数据", + "45": "装备", + "46": "花费", + "47": "保存", + "48": "编辑", + "49": "状态", + "4": "物品栏", + "50": "诅咒", + "51": "帮助", + "52": "关闭", + "53": "水", + "54": "治疗", + "55": "此房屋不符合", + "56": "熔岩", + "57": "染料", + "58": "蜂蜜", + "59": "可见", + "5": "快捷键已解锁", + "60": "隐藏", + "61": "重命名", + "62": "设置", + "63": "取消", + "64": "任务", + "65": "任务物品", + "66": "存款", + "67": "拍快照", + "68": "设置", + "69": "固定边框", + "6": "快捷键已锁定", + "70": "设置边框", + "71": "关闭", + "72": "开", + "73": "关", + "74": "图像整合", + "75": "捕捉生命体", + "76": "捕捉背景", + "77": "生物群落选择", + "78": "重置边框", + "79": "装备", + "7": "房屋", + "80": "房屋", + "81": "相机模式", + "82": "补货", + "83": "霜月", + "84": "南瓜月", + "85": "火星暴乱", + "86": "海盗入侵", + "87": "雪人军团", + "88": "哥布林军队", + "89": "收集", + "8": "房屋查询", + "90": "抓钩", + "91": "坐骑", + "92": "宠物", + "93": "矿车", + "94": "照明宠物", + "95": "时间", + "96": "天气", + "97": "钓鱼", + "98": "位置", + "99": "深度", + "9": "配饰" + }, + "LegacyChestType": { + "0": "宝箱", + "10": "常春藤箱", + "11": "冰雪箱", + "12": "生命木箱", + "13": "天域箱", + "14": "暗影木箱", + "15": "蛛丝箱", + "16": "丛林蜥蜴箱", + "17": "水中箱", + "18": "丛林箱", + "19": "腐化箱", + "1": "金箱", + "20": "猩红箱", + "21": "神圣箱", + "22": "冰冻箱", + "23": "加锁丛林箱", + "24": "加锁腐化箱", + "25": "加锁猩红箱", + "26": "加锁神圣箱", + "27": "加锁冰冻箱", + "28": "王朝箱", + "29": "蜂蜜箱", + "2": "加锁金箱", + "30": "蒸汽朋克箱", + "31": "棕榈木箱", + "32": "蘑菇箱", + "33": "针叶木箱", + "34": "史莱姆箱", + "35": "绿地牢箱", + "36": "加锁绿地牢箱", + "37": "粉地牢箱", + "38": "加锁粉地牢箱", + "39": "蓝地牢箱", + "3": "暗影箱", + "40": "加锁蓝地牢箱", + "41": "骨箱", + "42": "仙人掌箱", + "43": "血肉箱", + "44": "黑曜石箱", + "45": "南瓜箱", + "46": "阴森箱", + "47": "玻璃箱", + "48": "火星箱", + "49": "陨石箱", + "4": "加锁暗影箱", + "50": "花岗岩箱", + "51": "大理石箱", + "5": "桶", + "6": "垃圾桶", + "7": "乌木箱", + "8": "红木箱", + "9": "珍珠木箱" + }, + "LegacyDresserType": { + "0": "梳妆台", + "10": "骨头梳妆台", + "11": "仙人掌梳妆台", + "12": "阴森梳妆台", + "13": "天域梳妆台", + "14": "蜂蜜梳妆台", + "15": "丛林蜥蜴梳妆台", + "16": "棕榈木梳妆台", + "17": "蘑菇梳妆台", + "18": "针叶木梳妆台", + "19": "史莱姆梳妆台", + "1": "乌木梳妆台", + "20": "南瓜梳妆台", + "21": "蒸汽朋克梳妆台", + "22": "玻璃梳妆台", + "23": "血肉梳妆台", + "24": "火星梳妆台", + "25": "陨石梳妆台", + "26": "花岗岩梳妆台", + "27": "大理石梳妆台", + "2": "红木梳妆台", + "3": "珍珠木梳妆台", + "4": "暗影木梳妆台", + "5": "蓝地牢梳妆台", + "6": "绿地牢梳妆台", + "7": "粉地牢梳妆台", + "8": "金梳妆台", + "9": "黑曜石梳妆台", + "28": "{$ItemName.CrystalDresser}", + "29": "{$ItemName.DynastyDresser}", + "30": "{$ItemName.FrozenDresser}", + "31": "{$ItemName.LivingWoodDresser}", + "32": "{$ItemName.SpiderDresser}", + "33": "{$ItemName.LesionDresser}", + "34": "{$ItemName.SolarDresser}", + "35": "{$ItemName.VortexDresser}", + "36": "{$ItemName.NebulaDresser}", + "37": "{$ItemName.StardustDresser}", + "38": "{$ItemName.SandstoneDresser}", + "39": "{$ItemName.BambooDresser}" + }, + "LegacyChestType2": { + "0": "{$ItemName.CrystalChest}", + "1": "{$ItemName.GoldenChest}", + "2": "{$ItemName.SpiderChest}", + "3": "{$ItemName.LesionChest}", + "4": "{$ItemName.GoldChest}", + "5": "{$ItemName.SolarChest}", + "6": "{$ItemName.VortexChest}", + "7": "{$ItemName.NebulaChest}", + "8": "{$ItemName.StardustChest}", + "9": "{$ItemName.GolfChest}", + "10": "{$ItemName.DesertChest}", + "11": "{$ItemName.BambooChest}", + "12": "{$ItemName.DungeonDesertChest}" + } +} \ No newline at end of file diff --git a/Localization/Content/zh-Hans/NPCs.json b/Localization/Content/zh-Hans/NPCs.json new file mode 100644 index 0000000..7e0f422 --- /dev/null +++ b/Localization/Content/zh-Hans/NPCs.json @@ -0,0 +1,590 @@ +{ + "NPCName": { + "BlueSlime": "蓝史莱姆", + "GiantWormHead": "巨型蠕虫", + "SeekerTail": "吞世怪", + "Clinger": "爬藤怪", + "AnglerFish": "琵琶鱼", + "GreenJellyfish": "绿水母", + "Werewolf": "狼人", + "BoundGoblin": "受缚哥布林", + "BoundWizard": "受缚巫师", + "GoblinTinkerer": "哥布林工匠", + "Wizard": "巫师", + "Clown": "小丑", + "GiantWormBody": "巨型蠕虫", + "SkeletonArcher": "骷髅弓箭手", + "GoblinArcher": "哥布林弓箭手", + "VileSpit": "魔唾液", + "WallofFlesh": "血肉墙", + "WallofFleshEye": "血肉墙", + "TheHungry": "饿鬼", + "TheHungryII": "饿鬼", + "LeechHead": "血蛭", + "LeechBody": "血蛭", + "LeechTail": "血蛭", + "GiantWormTail": "巨型蠕虫", + "ChaosElemental": "混沌精", + "Slimer": "恶翅史莱姆", + "Gastropod": "腹足怪", + "BoundMechanic": "受缚机械师", + "Mechanic": "机械师", + "Retinazer": "激光眼", + "Spazmatism": "魔焰眼", + "SkeletronPrime": "机械骷髅王", + "PrimeCannon": "机械炮", + "PrimeSaw": "机械锯", + "EaterofWorldsHead": "世界吞噬怪", + "PrimeVice": "机械钳", + "PrimeLaser": "机械激光", + "BaldZombie": "僵尸", + "WanderingEye": "游荡眼球怪", + "TheDestroyer": "毁灭者", + "TheDestroyerBody": "毁灭者", + "TheDestroyerTail": "毁灭者", + "IlluminantBat": "夜明蝙蝠", + "IlluminantSlime": "夜明史莱姆", + "Probe": "探测怪", + "EaterofWorldsBody": "世界吞噬怪", + "PossessedArmor": "装甲幻影魔", + "ToxicSludge": "毒泥", + "SantaClaus": "圣诞老人", + "SnowmanGangsta": "雪人暴徒", + "MisterStabby": "戳刺先生", + "SnowBalla": "巴拉雪人", + "IceSlime": "冰雪史莱姆", + "Penguin": "企鹅", + "PenguinBlack": "企鹅", + "EaterofWorldsTail": "世界吞噬怪", + "IceBat": "冰雪蝙蝠", + "Lavabat": "熔岩蝙蝠", + "GiantFlyingFox": "巨型飞狐", + "GiantTortoise": "巨型陆龟", + "IceTortoise": "冰雪陆龟", + "Wolf": "狼", + "RedDevil": "红魔鬼", + "Arapaima": "巨骨舌鱼", + "VampireBat": "吸血鬼", + "Vampire": "吸血鬼", + "MotherSlime": "史莱姆之母", + "Truffle": "松露人", + "ZombieEskimo": "爱斯基摩僵尸", + "Frankenstein": "科学怪人", + "BlackRecluse": "黑隐士", + "WallCreeper": "爬墙蜘蛛", + "WallCreeperWall": "爬墙蜘蛛", + "SwampThing": "沼泽怪", + "UndeadViking": "亡灵维京海盗", + "CorruptPenguin": "腐化企鹅", + "IceElemental": "冰雪精", + "Merchant": "商人", + "PigronCorruption": "猪龙", + "PigronHallow": "猪龙", + "RuneWizard": "符文巫师", + "Crimera": "猩红喀迈拉", + "Herpling": "蹦蹦兽", + "AngryTrapper": "愤怒捕手", + "MossHornet": "青苔黄蜂", + "Derpling": "跳跳兽", + "Steampunker": "蒸汽朋克人", + "CrimsonAxe": "猩红斧", + "Nurse": "护士", + "PigronCrimson": "猪龙", + "FaceMonster": "脸怪", + "FloatyGross": "恶心浮游怪", + "Crimslime": "猩红史莱姆", + "SpikedIceSlime": "尖刺冰雪史莱姆", + "SnowFlinx": "小雪怪", + "PincushionZombie": "僵尸", + "SlimedZombie": "僵尸", + "SwampZombie": "僵尸", + "TwiggyZombie": "僵尸", + "ArmsDealer": "军火商", + "CataractEye": "恶魔眼", + "SleepyEye": "恶魔眼", + "DialatedEye": "恶魔眼", + "GreenEye": "恶魔眼", + "PurpleEye": "恶魔眼", + "LostGirl": "迷失女孩", + "Nymph": "宁芙", + "ArmoredViking": "装甲维京海盗", + "Lihzahrd": "丛林蜥蜴", + "LihzahrdCrawler": "丛林蜥蜴", + "DemonEye": "恶魔眼", + "Dryad": "树妖", + "FemaleZombie": "僵尸", + "HeadacheSkeleton": "骷髅", + "MisassembledSkeleton": "骷髅", + "PantlessSkeleton": "骷髅", + "SpikedJungleSlime": "尖刺丛林史莱姆", + "Moth": "蛾", + "IcyMerman": "冰雪人鱼", + "DyeTrader": "染料商", + "PartyGirl": "派对女孩", + "Cyborg": "机器侠", + "Skeleton": "骷髅", + "Bee": "蜜蜂", + "BeeSmall": "蜜蜂", + "PirateDeckhand": "海盗水手", + "PirateCorsair": "私船海盗", + "PirateDeadeye": "海盗神射手", + "PirateCrossbower": "海盗弩手", + "PirateCaptain": "海盗船长", + "CochinealBeetle": "胭脂虫", + "CyanBeetle": "青壳虫", + "LacBeetle": "紫胶虫", + "Guide": "向导", + "SeaSnail": "海蜗牛", + "Squid": "乌贼", + "QueenBee": "蜂王", + "ZombieRaincoat": "雨衣僵尸", + "FlyingFish": "飞鱼", + "UmbrellaSlime": "雨伞史莱姆", + "FlyingSnake": "飞蛇", + "Painter": "油漆工", + "WitchDoctor": "巫医", + "Pirate": "海盗", + "MeteorHead": "流星头", + "GoldfishWalker": "金鱼", + "HornetFatty": "黄蜂", + "HornetHoney": "黄蜂", + "HornetLeafy": "黄蜂", + "HornetSpikey": "黄蜂", + "HornetStingy": "黄蜂", + "JungleCreeper": "丛林蜘蛛", + "JungleCreeperWall": "丛林蜘蛛", + "BlackRecluseWall": "黑隐士", + "BloodCrawler": "血爬虫", + "FireImp": "火焰小鬼", + "BloodCrawlerWall": "血爬虫", + "BloodFeeder": "嗜血怪", + "BloodJelly": "血水母", + "IceGolem": "冰雪巨人", + "RainbowSlime": "彩虹史莱姆", + "Golem": "石巨人", + "GolemHead": "石巨人头", + "GolemFistLeft": "石巨人之拳", + "GolemFistRight": "石巨人之拳", + "GolemHeadFree": "石巨人头", + "BurningSphere": "烈焰球", + "AngryNimbus": "愤怒雨云怪", + "Eyezor": "眼怪", + "Parrot": "鹦鹉", + "Reaper": "死神", + "ZombieMushroom": "孢子僵尸", + "ZombieMushroomHat": "孢子僵尸", + "FungoFish": "蘑菇鱼", + "AnomuraFungus": "歪尾真菌", + "MushiLadybug": "瓢虫", + "FungiBulb": "真菌球怪", + "GoblinPeon": "哥布林苦力", + "GiantFungiBulb": "巨型真菌球怪", + "FungiSpore": "真菌孢子", + "Plantera": "世纪之花", + "PlanterasHook": "世纪之花钩", + "PlanterasTentacle": "世纪之花触手", + "Spore": "孢子", + "BrainofCthulhu": "克苏鲁之脑", + "Creeper": "飞眼怪", + "IchorSticker": "灵液黏黏怪", + "RustyArmoredBonesAxe": "生锈装甲骷髅", + "GoblinThief": "哥布林盗贼", + "RustyArmoredBonesFlail": "生锈装甲骷髅", + "RustyArmoredBonesSword": "生锈装甲骷髅", + "RustyArmoredBonesSwordNoArmor": "生锈装甲骷髅", + "BlueArmoredBones": "蓝装甲骷髅", + "BlueArmoredBonesMace": "蓝装甲骷髅", + "BlueArmoredBonesNoPants": "蓝装甲骷髅", + "BlueArmoredBonesSword": "蓝装甲骷髅", + "HellArmoredBones": "地狱装甲骷髅", + "HellArmoredBonesSpikeShield": "地狱装甲骷髅", + "HellArmoredBonesMace": "地狱装甲骷髅", + "GoblinWarrior": "哥布林战士", + "HellArmoredBonesSword": "地狱装甲骷髅", + "RaggedCaster": "褴褛邪教徒法师", + "RaggedCasterOpenCoat": "褴褛邪教徒法师", + "Necromancer": "死灵法师", + "NecromancerArmored": "死灵法师", + "DiabolistRed": "魔教徒", + "DiabolistWhite": "魔教徒", + "BoneLee": "骷髅李小龙", + "DungeonSpirit": "地牢幽魂", + "GiantCursedSkull": "巨型诅咒骷髅头", + "GoblinSorcerer": "哥布林巫士", + "Paladin": "圣骑士", + "SkeletonSniper": "骷髅狙击手", + "TacticalSkeleton": "骷髅特警", + "SkeletonCommando": "骷髅突击手", + "AngryBonesBig": "愤怒骷髅怪", + "AngryBonesBigMuscle": "愤怒骷髅怪", + "AngryBonesBigHelmet": "愤怒骷髅怪", + "BirdBlue": "冠蓝鸦", + "BirdRed": "红雀", + "Squirrel": "松鼠", + "Zombie": "僵尸", + "ChaosBall": "混沌球", + "Mouse": "老鼠", + "Raven": "乌鸦", + "SlimeMasked": "史莱姆", + "BunnySlimed": "兔兔", + "HoppinJack": "弹跳杰克南瓜灯", + "Scarecrow1": "稻草人", + "Scarecrow2": "稻草人", + "Scarecrow3": "稻草人", + "Scarecrow4": "稻草人", + "Scarecrow5": "稻草人", + "AngryBones": "愤怒骷髅怪", + "Scarecrow6": "稻草人", + "Scarecrow7": "稻草人", + "Scarecrow8": "稻草人", + "Scarecrow9": "稻草人", + "Scarecrow10": "稻草人", + "HeadlessHorseman": "无头骑士", + "Ghost": "鬼魂", + "DemonEyeOwl": "恶魔眼", + "DemonEyeSpaceship": "恶魔眼", + "ZombieDoctor": "僵尸", + "DarkCaster": "暗黑法师", + "ZombieSuperman": "僵尸", + "ZombiePixie": "僵尸", + "SkeletonTopHat": "骷髅", + "SkeletonAstonaut": "骷髅", + "SkeletonAlien": "骷髅", + "MourningWood": "哀木", + "Splinterling": "树精", + "Pumpking": "南瓜王", + "PumpkingBlade": "南瓜王", + "Hellhound": "地狱犬", + "WaterSphere": "水球", + "Poltergeist": "胡闹鬼", + "ZombieXmas": "僵尸", + "ZombieSweater": "僵尸", + "SlimeRibbonWhite": "史莱姆", + "SlimeRibbonYellow": "史莱姆", + "SlimeRibbonGreen": "史莱姆", + "SlimeRibbonRed": "史莱姆", + "BunnyXmas": "兔兔", + "ZombieElf": "僵尸精灵", + "ZombieElfBeard": "僵尸精灵", + "CursedSkull": "诅咒骷髅头", + "ZombieElfGirl": "僵尸精灵", + "PresentMimic": "礼物宝箱怪", + "GingerbreadMan": "姜饼人", + "Yeti": "雪兽", + "Everscream": "常绿尖叫怪", + "IceQueen": "冰雪女王", + "SantaNK1": "圣诞坦克", + "ElfCopter": "精灵直升机", + "Nutcracker": "胡桃夹士", + "NutcrackerSpinning": "胡桃夹士", + "SkeletronHead": "骷髅王", + "ElfArcher": "精灵弓箭手", + "Krampus": "坎卜斯", + "Flocko": "雪花怪", + "Stylist": "发型师", + "WebbedStylist": "织网发型师", + "Firefly": "萤火虫", + "Butterfly": "蝴蝶", + "Worm": "蠕虫", + "LightningBug": "荧光虫", + "Snail": "蜗牛", + "SkeletronHand": "骷髅王", + "GlowingSnail": "发光蜗牛", + "Frog": "青蛙", + "Duck": "鸭", + "Duck2": "鸭", + "DuckWhite": "鸭", + "DuckWhite2": "鸭", + "ScorpionBlack": "蝎子", + "Scorpion": "蝎子", + "TravellingMerchant": "旅商", + "Angler": "渔夫", + "OldMan": "老人", + "DukeFishron": "猪龙鱼公爵", + "DetonatingBubble": "爆炸泡泡", + "Sharkron": "鲨鱼龙", + "Sharkron2": "鲨鱼龙", + "TruffleWorm": "松露虫", + "TruffleWormDigger": "松露虫", + "SleepingAngler": "沉睡渔夫", + "Grasshopper": "蚱蜢", + "ChatteringTeethBomb": "嗒嗒牙齿炸弹", + "CultistArcherBlue": "蓝邪教徒弓箭手", + "Demolitionist": "爆破专家", + "CultistArcherWhite": "白邪教徒弓箭手", + "BrainScrambler": "扰脑怪", + "RayGunner": "激光枪手", + "MartianOfficer": "火星军官", + "ForceBubble": "泡泡护盾", + "GrayGrunt": "灰咕噜兽旗", + "MartianEngineer": "火星工程师", + "MartianTurret": "特斯拉炮塔", + "MartianDrone": "火星飞船", + "GigaZapper": "电击怪", + "BoneSerpentHead": "骨蛇", + "ScutlixRider": "鳞甲怪枪手", + "Scutlix": "鳞甲怪", + "EyeofCthulhu": "克苏鲁之眼", + "BoneSerpentBody": "骨蛇", + "BoneSerpentTail": "骨蛇", + "SolarCrawltipedeHead": "千足蜈蚣", + "SolarCrawltipedeBody": "千足蜈蚣", + "SolarCrawltipedeTail": "千足蜈蚣", + "SolarDrakomire": "火龙怪", + "SolarDrakomireRider": "火龙怪骑士", + "SolarSroller": "火滚怪", + "SolarCorite": "流星火怪", + "SolarSolenian": "火月怪", + "Hornet": "黄蜂", + "ManEater": "食人怪", + "ArmedZombie": "僵尸", + "ArmedZombieEskimo": "爱斯基摩僵尸", + "ArmedZombiePincussion": "僵尸", + "ArmedZombieSlimed": "僵尸", + "ArmedZombieSwamp": "僵尸", + "ArmedZombieTwiggy": "僵尸", + "ArmedZombieCenx": "僵尸", + "UndeadMiner": "不死矿工", + "GoldBird": "金鸟", + "GoldBunny": "金兔", + "GoldButterfly": "金蝴蝶", + "GoldFrog": "金蛙", + "GoldGrasshopper": "金蚱蜢", + "GoldMouse": "金老鼠", + "GoldWorm": "金蠕虫", + "BoneThrowingSkeleton": "骷髅", + "Tim": "蒂姆", + "BoneThrowingSkeleton2": "骷髅", + "BoneThrowingSkeleton3": "骷髅", + "BoneThrowingSkeleton4": "骷髅", + "Bunny": "兔兔", + "CorruptBunny": "腐化兔", + "Harpy": "鸟妖", + "CaveBat": "洞穴蝙蝠", + "ServantofCthulhu": "克苏鲁之仆", + "KingSlime": "史莱姆王", + "JungleBat": "丛林蝙蝠", + "DoctorBones": "骷髅博士", + "TheGroom": "僵尸新郎", + "Clothier": "服装商", + "Goldfish": "金鱼", + "Snatcher": "抓人草", + "CorruptGoldfish": "腐化金鱼", + "Piranha": "食人鱼", + "LavaSlime": "熔岩史莱姆", + "EaterofSouls": "噬魂怪", + "Hellbat": "地狱蝙蝠", + "Vulture": "秃鹰", + "Demon": "恶魔", + "BlueJellyfish": "蓝水母", + "PinkJellyfish": "粉水母", + "Shark": "鲨鱼", + "VoodooDemon": "巫毒恶魔", + "Crab": "螃蟹", + "DungeonGuardian": "地牢守卫", + "Antlion": "蚁狮", + "DevourerHead": "吞噬怪", + "SpikeBall": "尖刺球", + "DungeonSlime": "地牢史莱姆", + "BlazingWheel": "烈焰火轮", + "GoblinScout": "哥布林侦察兵", + "Bird": "鸟", + "Pixie": "妖精", + "ArmoredSkeleton": "装甲骷髅", + "Mummy": "木乃伊", + "DarkMummy": "暗黑木乃伊", + "DevourerBody": "吞噬怪", + "LightMummy": "光明木乃伊", + "CorruptSlime": "腐化史莱姆", + "Wraith": "幻灵", + "CursedHammer": "诅咒锤", + "EnchantedSword": "附魔剑", + "Mimic": "宝箱怪", + "Unicorn": "独角兽", + "WyvernHead": "飞龙", + "WyvernLegs": "飞龙", + "WyvernBody": "飞龙", + "DevourerTail": "吞噬怪", + "WyvernBody2": "飞龙", + "WyvernBody3": "飞龙", + "WyvernTail": "飞龙", + "GiantBat": "巨型蝙蝠", + "Corruptor": "腐化者", + "DiggerHead": "挖掘怪", + "DiggerBody": "挖掘怪", + "DiggerTail": "挖掘怪", + "SeekerHead": "吞世怪", + "SeekerBody": "吞世怪", + "AncientCultistSquidhead": "远古幻影妖", + "AncientDoom": "远古噩运妖", + "AncientLight": "远古光明妖", + "BigMimicCorruption": "腐化宝箱怪", + "BigMimicCrimson": "猩红宝箱怪", + "BigMimicHallow": "神圣宝箱怪", + "BigMimicJungle": "丛林宝箱怪", + "BloodZombie": "血腥僵尸", + "Buggy": "蚜虫", + "Butcher": "屠夫", + "Crawdad": "龙虾", + "Crawdad2": "龙虾", + "CreatureFromTheDeep": "水月怪", + "CrimsonBunny": "猩红矿兔兔", + "CrimsonGoldfish": "猩红矿金鱼", + "CrimsonPenguin": "毒企鹅", + "CultistBoss": "拜月教邪教徒", + "CultistBossClone": "拜月教邪教徒", + "CultistDevote": "拜月教忠教徒", + "CultistDragonBody1": "幻影弓龙", + "CultistDragonBody2": "幻影弓龙", + "CultistDragonBody3": "幻影弓龙", + "CultistDragonBody4": "幻影弓龙", + "CultistDragonHead": "幻影弓龙", + "CultistDragonTail": "幻影弓龙", + "CultistTablet": "神秘碑牌", + "DD2AttackerTest": "???", + "DD2GoblinT3": "{$NPCName.DD2GoblinT1}", + "DD2GoblinBomberT3": "{$NPCName.DD2GoblinBomberT1}", + "DD2JavelinstT2": "{$NPCName.DD2JavelinstT1}", + "DD2JavelinstT3": "{$NPCName.DD2JavelinstT1}", + "DD2LanePortal": "神秘传送门", + "DD2GoblinT2": "{$NPCName.DD2GoblinT1}", + "DeadlySphere": "致命球", + "DemonTaxCollector": "痛苦亡魂", + "DesertBeast": "蛇蜥怪", + "DesertDjinn": "沙漠幽魂", + "DesertGhoul": "食尸鬼", + "DesertGhoulCorruption": "腐恶食尸鬼", + "DesertGhoulCrimson": "红染食尸鬼", + "DesertGhoulHallow": "神梦食尸鬼", + "DesertLamiaDark": "拉弥亚", + "DesertLamiaLight": "拉弥亚", + "DesertScorpionWalk": "沙贼", + "DesertScorpionWall": "沙贼", + "Drippler": "滴滴怪", + "DrManFly": "飞人博士", + "DuneSplicerBody": "沙虫", + "DuneSplicerHead": "沙虫", + "DuneSplicerTail": "沙虫", + "EnchantedNightcrawler": "附魔夜行者", + "GiantFlyingAntlion": "蚁狮蜂", + "Fritz": "弗里茨", + "GiantShelly": "巨型卷壳怪", + "GiantShelly2": "巨型卷壳怪", + "GoblinSummoner": "哥布林召唤师", + "GraniteFlyer": "花岗精", + "GraniteGolem": "花岗岩巨人", + "GreekSkeleton": "装甲步兵", + "Grubby": "蛆虫", + "LunarTowerNebula": "星云柱", + "LunarTowerSolar": "日耀柱", + "LunarTowerStardust": "星尘柱", + "LunarTowerVortex": "星旋柱", + "MartianProbe": "火星探测器", + "MartianSaucer": "火星飞碟", + "MartianSaucerCannon": "火星飞碟炮", + "MartianSaucerCore": "火星飞碟", + "MartianSaucerTurret": "火星飞碟炮塔", + "MartianWalker": "火星走妖", + "Medusa": "蛇发女妖", + "MoonLordCore": "月亮领主心脏", + "MoonLordHand": "月亮领主手", + "MoonLordHead": "月亮领主", + "Mothron": "蛾怪", + "MothronEgg": "蛾怪蛋", + "MothronSpawn": "蛾怪宝宝", + "Nailhead": "钉头", + "NebulaBeast": "进化兽", + "NebulaBrain": "星云浮怪", + "NebulaHeadcrab": "吮脑怪", + "NebulaSoldier": "预言帝", + "PartyBunny": "兔兔", + "Psycho": "变态人", + "Salamander": "蝾螈", + "Salamander2": "蝾螈", + "Salamander3": "蝾螈", + "Salamander4": "蝾螈", + "Salamander5": "蝾螈", + "Salamander6": "蝾螈", + "Salamander7": "蝾螈", + "Salamander8": "蝾螈", + "Salamander9": "蝾螈", + "SandElemental": "沙尘精", + "SandShark": "沙鲨", + "SandsharkCorrupt": "噬骨沙鲨", + "SandsharkCrimson": "戮血沙鲨", + "SandsharkHallow": "晶狐沙鲨", + "SandSlime": "沙史莱姆", + "ShadowFlameApparition": "暗影焰幻鬼", + "SlimeSpiked": "尖刺史莱姆", + "Sluggy": "鼻涕虫", + "SolarFlare": "耀斑", + "SolarGoop": "日耀碎片", + "SolarSpearman": "火龙战士", + "SquirrelGold": "金松鼠", + "SquirrelRed": "红松鼠", + "StardustCellBig": "星细胞", + "StardustCellSmall": "星细胞", + "StardustJellyfishBig": "流体入侵怪", + "StardustSoldier": "观星怪", + "StardustSpiderBig": "闪耀炮手", + "StardustSpiderSmall": "闪耀怪", + "StardustWormHead": "银河织妖", + "TargetDummy": "傀儡", + "TaxCollector": "税收官", + "TheBride": "新娘", + "ThePossessed": "攀爬魔", + "TombCrawlerBody": "墓穴爬虫", + "TombCrawlerHead": "墓穴爬虫", + "TombCrawlerTail": "墓穴爬虫", + "Tumbleweed": "愤怒翻滚怪", + "VortexHornet": "异星黄蜂", + "VortexHornetQueen": "异星蜂王", + "VortexLarva": "异星幼虫", + "VortexRifleman": "漩泥怪", + "VortexSoldier": "星旋怪", + "GiantWalkingAntlion": "蚁狮马", + "DD2GoblinBomberT2": "{$NPCName.DD2GoblinBomberT1}", + "DD2WyvernT3": "{$NPCName.DD2WyvernT1}", + "DD2WyvernT2": "{$NPCName.DD2WyvernT1}", + "DD2OgreT3": "{$NPCName.DD2OgreT2}", + "DD2WitherBeastT3": "{$NPCName.DD2WitherBeastT2}", + "DD2SkeletonT3": "{$NPCName.DD2SkeletonT1}", + "DD2KoboldWalkerT3": "{$NPCName.DD2KoboldWalkerT2}", + "DD2DrakinT3": "{$NPCName.DD2DrakinT2}", + "DD2DarkMageT3": "{$NPCName.DD2DarkMageT1}", + "DD2KoboldFlyerT3": "{$NPCName.DD2KoboldFlyerT2}", + "BabySlime": "史莱姆宝宝", + "BigRainZombie": "僵尸", + "BlackSlime": "黑史莱姆", + "DD2Bartender": "酒馆老板", + "DD2Betsy": "双足翼龙", + "DD2DarkMageT1": "黑暗魔法师", + "DD2DrakinT2": "德拉克龙", + "DD2EterniaCrystal": "埃特尼亚水晶", + "DD2GoblinBomberT1": "天国哥布林投弹手", + "DD2GoblinT1": "天国哥布林", + "DD2JavelinstT1": "天国标枪投掷怪", + "DD2KoboldFlyerT2": "小妖魔滑翔怪", + "DD2KoboldWalkerT2": "小妖魔", + "DD2LightningBugT3": "天国荧光虫", + "DD2OgreT2": "食人魔", + "DD2SkeletonT1": "撒旦骷髅", + "DD2WitherBeastT2": "枯萎兽", + "DD2WyvernT1": "天国飞龙", + "GreenSlime": "绿史莱姆", + "JungleSlime": "丛林史莱姆", + "Pinky": "粉史莱姆", + "PurpleSlime": "紫史莱姆", + "RedSlime": "红史莱姆", + "Slimeling": "小史莱姆", + "Slimer2": "恶翅史莱姆", + "SmallRainZombie": "僵尸", + "YellowSlime": "黄史莱姆", + "MoonLordFreeEye": "克苏鲁真眼", + "MoonLordLeechBlob": "月蛭凝块", + "SkeletonMerchant": "骷髅商人", + "PirateShip": "荷兰飞盗船", + "PirateShipCannon": "荷兰大炮", + "BartenderUnconscious": "昏迷男子" + } +} \ No newline at end of file diff --git a/Localization/Content/zh-Hans/Projectiles.json b/Localization/Content/zh-Hans/Projectiles.json new file mode 100644 index 0000000..d6da34d --- /dev/null +++ b/Localization/Content/zh-Hans/Projectiles.json @@ -0,0 +1,722 @@ +{ + "ProjectileName": { + "AdamantiteChainsaw": "精金链锯", + "AdamantiteDrill": "精金钻头", + "AdamantiteGlaive": "精金关刀", + "Amarok": "悠悠球", + "AmberBolt": "琥珀矢", + "AmethystBolt": "紫晶矢", + "Anchor": "锚", + "AncientDoomProjectile": "预言之末", + "AntiGravityHook": "反重力钩", + "Arkhalis": "Arkhalis剑", + "AshBallFalling": "尘球", + "BabyDino": "恐龙宝宝", + "BabyEater": "吞噬怪宝宝", + "BabyFaceMonster": "脸怪宝宝", + "BabyGrinch": "格林奇宝宝", + "BabyHornet": "黄蜂宝宝", + "BabySkeletronHead": "骷髅王宝宝头", + "BabySlime": "史莱姆宝宝", + "BabySnowman": "雪人宝宝", + "BabySpider": "蜘蛛宝宝", + "BallofFire": "火球", + "BallofFrost": "寒霜球", + "BallOHurt": "链球", + "Bananarang": "香蕉回旋镖", + "Bat": "蝙蝠", + "BatHook": "蝙蝠钩", + "BeachBall": "沙滩球", + "Bee": "蜜蜂", + "BeeArrow": "蜜蜂箭", + "BeeHive": "蜂巢", + "Beenade": "蜜蜂手榴弹", + "BlackBolt": "玛瑙爆破枪", + "BlackCat": "黑猫", + "BlackCounterweight": "平衡锤", + "Blizzard": "暴雪", + "BloodCloudMoving": "血云", + "BloodCloudRaining": "血云", + "BloodRain": "血雨", + "BloodWater": "血水", + "BloodyMachete": "血腥砍刀", + "BlowupSmoke": "爆炸烟", + "BlowupSmokeMoonlord": "爆炸烟", + "BlueCounterweight": "平衡锤", + "BlueFairy": "蓝仙灵", + "BlueFlare": "蓝照明弹", + "BlueMoon": "蓝月", + "BobberFiberglass": "浮标", + "BobberFisherOfSouls": "浮标", + "BobberFleshcatcher": "浮标", + "BobberGolden": "浮标", + "BobberHotline": "浮标", + "BobberMechanics": "浮标", + "BobberReinforced": "浮标", + "BobbersittingDuck": "浮标", + "BobberWooden": "浮标", + "Bomb": "炸弹", + "BombFish": "炸弹鱼", + "BombSkeletronPrime": "炸弹", + "Bone": "骨头", + "BoneArrow": "骨箭", + "BoneArrowFromMerchant": "骨箭", + "BoneDagger": "骨刀", + "BoneGloveProj": "X骨头", + "BoneJavelin": "骨头标枪", + "Boulder": "巨石", + "BoulderStaffOfEarth": "巨石", + "BouncyBomb": "弹力炸弹", + "BouncyDynamite": "弹力雷管", + "BouncyGlowstick": "弹力荧光棒", + "BouncyGrenade": "弹力手榴弹", + "BoxingGlove": "拳击手套", + "BrainOfConfusion": "混乱之脑", + "BrainScramblerBolt": "扰心矢", + "Bubble": "泡泡", + "Bullet": "子弹", + "BulletDeadeye": "子弹", + "BulletHighVelocity": "子弹", + "BulletSnowman": "子弹", + "Bunny": "兔兔", + "ButchersChainsaw": "屠夫链锯", + "CandyCaneHook": "糖棒钩", + "CandyCorn": "玉米糖", + "CannonballFriendly": "炮弹", + "CannonballHostile": "炮弹", + "Cascade": "悠悠球", + "ChainGuillotine": "铁链血滴子", + "ChainKnife": "链刀", + "ChargedBlasterCannon": "带电爆破炮", + "ChargedBlasterLaser": "带电爆破激光", + "ChargedBlasterOrb": "带电爆破珠", + "Chik": "悠悠球", + "ChlorophyteArrow": "叶绿箭", + "ChlorophyteBullet": "子弹", + "ChlorophyteChainsaw": "叶绿链锯", + "ChlorophyteDrill": "叶绿钻头", + "ChlorophyteJackhammer": "叶绿手提钻", + "ChlorophyteOrb": "叶绿珠", + "ChlorophytePartisan": "叶绿镋", + "ChristmasHook": "圣诞钩", + "ClingerStaff": "诅咒焰", + "ClothiersCurse": "骷髅头", + "CobaltChainsaw": "钴链锯", + "CobaltDrill": "钴钻头", + "CobaltNaginata": "钴剃刀", + "Code1": "悠悠球", + "Code2": "悠悠球", + "CoinPortal": "钱币传送门", + "CompanionCube": "同伴方块", + "ConfettiGun": "彩纸", + "ConfettiMelee": "彩纸", + "CopperCoin": "铜币", + "CopperCoinsFalling": "铜币", + "CorruptSpray": "腐化喷射", + "CorruptYoyo": "悠悠球", + "CrimsandBallFalling": "血沙球", + "CrimsandBallGun": "血沙球", + "CrimsonHeart": "猩红之心", + "CrimsonSpray": "猩红喷射", + "CrimsonYoyo": "悠悠球", + "CrossGraveMarker": "墓石", + "CrystalBullet": "水晶子弹", + "CrystalDart": "水晶镖", + "CrystalLeaf": "水晶叶", + "CrystalLeafShot": "水晶叶", + "CrystalPulse": "水晶弹", + "CrystalPulse2": "水晶弹", + "CrystalShard": "水晶碎块", + "CrystalStorm": "水晶风暴", + "CrystalVileShardHead": "魔晶碎块", + "CrystalVileShardShaft": "魔晶碎块", + "Cthulunado": "克苏鲁旋风", + "CultistBossFireBall": "火光球", + "CultistBossFireBallClone": "暗影火球", + "CultistBossIceMist": "冰雪雾", + "CultistBossLightningOrb": "闪电珠", + "CultistBossLightningOrbArc": "闪电珠弧", + "CultistBossParticle": "能量", + "CultistRitual": "闪电祭礼", + "CursedArrow": "诅咒箭", + "CursedBullet": "诅咒弹", + "CursedDart": "诅咒镖", + "CursedDartFlame": "诅咒焰", + "CursedFlameFriendly": "诅咒焰", + "CursedFlameHostile": "诅咒焰", + "CursedSapling": "诅咒树苗", + "DangerousSpider": "危险蜘蛛", + "DarkLance": "暗黑长戟", + "Daybreak": "破晓之光", + "DD2FlameBurstTowerT1": "爆炸烈焰塔", + "DD2FlameBurstTowerT1Shot": "爆炸烈焰塔", + "DD2FlameBurstTowerT2": "爆炸烈焰塔", + "DD2FlameBurstTowerT2Shot": "爆炸烈焰塔", + "DD2FlameBurstTowerT3": "爆炸烈焰塔", + "DD2FlameBurstTowerT3Shot": "爆炸烈焰塔", + "DD2JavelinHostile": "标枪", + "DeadlySphere": "致命球", + "DeathLaser": "死亡激光", + "DeathSickle": "死神镰刀", + "DemonScythe": "恶魔锄刀", + "DemonSickle": "恶魔镰刀", + "DesertDjinnCurse": "沙漠幽魂诅咒", + "DiamondBolt": "钻石矢", + "DirtBall": "土球", + "DrillMountCrosshair": "钻头准星", + "DrManFlyFlask": "瓶子", + "DryadsWardCircle": "树妖庇护", + "DualHookBlue": "钩子", + "DualHookRed": "钩子", + "Dynamite": "雷管", + "EatersBite": "吞噬怪咬刺", + "EbonsandBallFalling": "黑檀沙球", + "EbonsandBallGun": "黑檀沙球", + "EighthNote": "音符", + "Electrosphere": "电圈", + "ElectrosphereMissile": "电圈导弹", + "EmeraldBolt": "翡翠矢", + "EnchantedBeam": "附魔光束", + "EnchantedBoomerang": "附魔回旋镖", + "ExplosiveBullet": "爆炸子弹", + "ExplosiveBunny": "爆炸兔", + "Explosives": "炸药", + "EyeBeam": "魔眼光束", + "EyeFire": "魔眼烈火", + "EyeLaser": "魔眼激光", + "EyeSpring": "弹簧眼", + "FallingStar": "陨星", + "FireArrow": "烈火箭", + "Fireball": "火光球", + "FireworkFountainBlue": "烟花喷泉", + "FireworkFountainRainbow": "烟花喷泉", + "FireworkFountainRed": "烟花喷泉", + "FireworkFountainYellow": "烟花喷泉", + "FishHook": "鱼钩", + "Flairon": "猪鲨链球", + "FlaironBubble": "猪鲨链球泡", + "Flamarang": "烈焰回旋镖", + "Flamelash": "烈焰火鞭", + "Flames": "火焰", + "FlamesTrap": "火焰", + "FlamethrowerTrap": "火焰喷射器", + "FlamingArrow": "烈焰箭", + "FlamingJack": "烈焰杰克南瓜", + "FlamingScythe": "烈焰镰刀", + "FlamingWood": "烈焰木", + "Flare": "照明弹", + "FlowerPetal": "花瓣", + "FlowerPow": "花冠", + "FlowerPowPetal": "花冠", + "FlyingImp": "飞行小鬼", + "FlyingKnife": "飞刀", + "FlyingPiggyBank": "飞猪存钱罐", + "FormatC": "悠悠球", + "FoulPotion": "恶臭药水", + "FrostArrow": "寒霜箭", + "FrostBeam": "寒霜束", + "FrostBlastFriendly": "寒霜爆破弹", + "FrostBlastHostile": "寒霜爆破弹", + "FrostBoltStaff": "寒霜矢", + "FrostBoltSword": "寒霜矢", + "FrostburnArrow": "霜冻箭", + "FrostDaggerfish": "寒霜飞鱼", + "FrostHydra": "寒霜九头蛇", + "FrostShard": "寒霜碎块", + "FrostWave": "寒霜波", + "FruitcakeChakram": "水果蛋糕旋刃", + "GemHookAmethyst": "宝石钩", + "GemHookDiamond": "宝石钩", + "GemHookEmerald": "宝石钩", + "GemHookRuby": "宝石钩", + "GemHookSapphire": "宝石钩", + "GemHookTopaz": "宝石钩", + "GeyserTrap": "喷泉", + "GiantBee": "蜜蜂", + "GigaZapperSpear": "电击怪矛尖", + "Glowstick": "荧光棒", + "GoldCoin": "金币", + "GoldCoinsFalling": "金币", + "GoldenBullet": "金子弹", + "GoldenShowerFriendly": "黄金雨", + "GoldenShowerHostile": "黄金雨", + "GolemFist": "石巨人之拳", + "Gradient": "悠悠球", + "GraveMarker": "墓石", + "Gravestone": "墓石", + "GreekFire1": "希腊烈火", + "GreekFire2": "希腊烈火", + "GreekFire3": "希腊烈火", + "GreenCounterweight": "平衡锤", + "GreenFairy": "粉仙灵", + "GreenLaser": "绿激光", + "Grenade": "手榴弹", + "GrenadeI": "手榴弹", + "GrenadeII": "手榴弹", + "GrenadeIII": "手榴弹", + "GrenadeIV": "手榴弹", + "Gungnir": "永恒之枪", + "HallowSpray": "神圣喷射", + "HallowStar": "神圣之星", + "Hamdrax": "锤斧钻", + "HappyBomb": "快乐炸弹", + "Harpoon": "鱼叉枪", + "HarpyFeather": "鸟妖之羽", + "Headstone": "墓石", + "HeatRay": "高温射线枪", + "HelFire": "悠悠球", + "HellfireArrow": "狱炎箭", + "Hellwing": "地狱之翼", + "HolyArrow": "圣箭", + "HolyWater": "圣水", + "Hook": "钩子", + "Hornet": "黄蜂", + "HornetStinger": "黄蜂毒刺", + "IceBlock": "冰雪块", + "IceBolt": "冰雪矢", + "IceBoomerang": "冰雪回旋镖", + "IceSickle": "冰雪镰刀", + "IceSpike": "冰雪尖刺", + "IcewaterSpit": "冰雪唾液", + "IchorArrow": "灵液箭", + "IchorBullet": "灵液弹", + "IchorDart": "灵液镖", + "IchorSplash": "灵液溅弹", + "IlluminantHook": "钩子", + "ImpFireball": "小鬼火球", + "InfernoFriendlyBlast": "狱火", + "InfernoFriendlyBolt": "狱火", + "InfernoHostileBlast": "狱火", + "InfernoHostileBolt": "狱火", + "InfluxWaver": "波涌之刃", + "IvyWhip": "常春藤鞭", + "JackOLantern": "杰克南瓜灯", + "JavelinFriendly": "标枪", + "JavelinHostile": "标枪", + "JestersArrow": "小丑之箭", + "JumperSpider": "跳跃蜘蛛", + "JungleSpike": "丛林尖刺", + "JungleYoyo": "悠悠球", + "Kraken": "悠悠球", + "Landmine": "地雷", + "LaserDrill": "激光钻头", + "LaserMachinegun": "激光机枪", + "LaserMachinegunLaser": "激光", + "LastPrism": "终极棱镜", + "LastPrismLaser": "终极棱镜", + "Leaf": "树叶", + "LightBeam": "光束", + "LightDisc": "光辉飞盘", + "LostSoulFriendly": "亡魂", + "LostSoulHostile": "亡魂", + "LovePotion": "爱情药水", + "LunarFlare": "月耀", + "LunarHookNebula": "月钩", + "LunarHookSolar": "月钩", + "LunarHookStardust": "月钩", + "LunarHookVortex": "月钩", + "MagicDagger": "魔法飞刀", + "MagicLantern": "魔法灯笼", + "MagicMissile": "魔法导弹", + "MagnetSphereBall": "磁球", + "MagnetSphereBolt": "磁球", + "MartianTurretBolt": "电击矢", + "MartianWalkerLaser": "激光射线", + "MechanicalPiranha": "机械食人鱼", + "MechanicWrench": "机械师扳手", + "MedusaHead": "蛇发女妖射线", + "MedusaHeadRay": "蛇发女妖射线", + "Meowmere": "彩虹猫之刃", + "Meteor1": "流星", + "Meteor2": "流星", + "Meteor3": "流星", + "MeteorShot": "流星弹", + "MinecartMechLaser": "矿车激光", + "MiniMinotaur": "迷你牛头怪", + "MiniRetinaLaser": "迷你视网膜激光", + "MiniSharkron": "迷你鲨鱼龙", + "Missile": "导弹", + "MolotovCocktail": "莫洛托夫鸡尾酒", + "MolotovFire": "莫洛托夫之火", + "MolotovFire2": "莫洛托夫之火", + "MolotovFire3": "莫洛托夫之火", + "MoonLeech": "月蛭", + "MoonlordArrow": "夜明箭", + "MoonlordArrowTrail": "夜明箭", + "MoonlordBullet": "夜明弹", + "MoonlordTurret": "月亮传送门", + "MoonlordTurretLaser": "月亮传送门激光", + "MudBall": "泥球", + "Mushroom": "蘑菇", + "MushroomSpear": "蘑菇长矛", + "MushroomSpray": "蘑菇喷射", + "MythrilChainsaw": "秘银链锯", + "MythrilDrill": "秘银钻头", + "MythrilHalberd": "秘银长戟", + "Nail": "钉子", + "NailFriendly": "钉子", + "NanoBullet": "纳米弹", + "NebulaArcanum": "星云奥秘", + "NebulaArcanumExplosionShot": "星云奥秘", + "NebulaArcanumExplosionShotShard": "星云奥秘", + "NebulaArcanumSubshot": "星云奥秘", + "NebulaBlaze1": "星云烈焰", + "NebulaBlaze2": "星云烈焰炮弹", + "NebulaBolt": "星云针弹", + "NebulaChainsaw": "星云链锯", + "NebulaDrill": "星云钻头", + "NebulaEye": "星云之眼", + "NebulaLaser": "星云激光", + "NebulaSphere": "星云球", + "NettleBurstEnd": "爆裂藤蔓", + "NettleBurstLeft": "爆裂藤蔓", + "NettleBurstRight": "爆裂藤蔓", + "NightBeam": "夜光束", + "None": "", + "NorthPoleSnowflake": "北极", + "NorthPoleSpear": "北极", + "NorthPoleWeapon": "北极", + "NurseSyringeHeal": "注射器", + "NurseSyringeHurt": "注射器", + "Obelisk": "墓石", + "ObsidianSwordfish": "黑曜石剑鱼", + "OneEyedPirate": "独眼海盗", + "OrichalcumChainsaw": "山铜链锯", + "OrichalcumDrill": "山铜钻头", + "OrichalcumHalberd": "山铜长戟", + "OrnamentFriendly": "装饰", + "OrnamentHostile": "装饰", + "OrnamentHostileShrapnel": "装饰", + "PainterPaintball": "彩弹", + "PaladinsHammerFriendly": "圣骑士锤", + "PaladinsHammerHostile": "圣骑士锤", + "PalladiumChainsaw": "钯金链锯", + "PalladiumDrill": "钯金钻头", + "PalladiumPike": "钯金刺矛", + "Parrot": "鹦鹉", + "PartyBullet": "派对弹", + "PartyGirlGrenade": "彩纸手榴弹", + "PearlSandBallFalling": "珍珠沙球", + "PearlSandBallGun": "珍珠沙球", + "Penguin": "企鹅", + "PetLizard": "宠物蜥蜴", + "Phantasm": "幻影弓", + "PhantasmalBolt": "幻影矢", + "PhantasmalDeathray": "幻影致命光", + "PhantasmalEye": "幻影眼", + "PhantasmalSphere": "幻影球", + "PhantasmArrow": "幻影弓", + "PhasicWarpDisc": "", + "PhasicWarpEjector": "", + "PineNeedleFriendly": "松针", + "PineNeedleHostile": "松针", + "PinkFairy": "粉仙灵", + "PinkLaser": "粉激光", + "PirateCaptain": "海盗船长", + "PlatinumCoin": "铂金币", + "PlatinumCoinsFalling": "铂金币", + "PoisonDart": "毒镖", + "PoisonDartBlowgun": "毒镖", + "PoisonDartTrap": "毒镖", + "PoisonedKnife": "毒刀", + "PoisonFang": "毒牙", + "PoisonSeedPlantera": "毒种子", + "PortalGun": "传送枪", + "PortalGunBolt": "传送矢", + "PortalGunGate": "传送通道", + "PossessedHatchet": "疯狂飞斧", + "Present": "礼物", + "ProximityMineI": "感应雷", + "ProximityMineII": "感应雷", + "ProximityMineIII": "感应雷", + "ProximityMineIV": "感应雷", + "PulseBolt": "脉冲矢", + "Puppy": "小狗", + "PureSpray": "纯净喷射", + "PurificationPowder": "净化粉", + "PurpleCounterweight": "平衡锤", + "PurpleLaser": "紫激光", + "Pygmy": "矮人", + "Pygmy2": "矮人", + "Pygmy3": "矮人", + "Pygmy4": "矮人", + "PygmySpear": "矮人", + "QuarterNote": "音符", + "RainbowBack": "彩虹", + "RainbowCrystal": "七彩水晶", + "RainbowCrystalExplosion": "七彩爆炸", + "RainbowFront": "彩虹", + "RainbowRodBullet": "彩虹", + "RainCloudMoving": "雨云", + "RainCloudRaining": "雨云", + "RainFriendly": "雨", + "RainNimbus": "雨", + "Rally": "悠悠球", + "Raven": "乌鸦", + "RayGunnerLaser": "激光射线", + "RedCounterweight": "平衡锤", + "RedsYoyo": "悠悠球", + "Retanimini": "小激光眼", + "RichGravestone1": "墓石", + "RichGravestone2": "墓石", + "RichGravestone3": "墓石", + "RichGravestone4": "墓石", + "RichGravestone5": "墓石", + "RocketFireworkBlue": "火箭", + "RocketFireworkGreen": "火箭", + "RocketFireworkRed": "火箭", + "RocketFireworksBoxBlue": "火箭", + "RocketFireworksBoxGreen": "火箭", + "RocketFireworksBoxRed": "火箭", + "RocketFireworksBoxYellow": "火箭", + "RocketFireworkYellow": "火箭", + "RocketI": "火箭", + "RocketII": "火箭", + "RocketIII": "火箭", + "RocketIV": "火箭", + "RocketSkeleton": "火箭", + "RocketSnowmanI": "火箭", + "RocketSnowmanII": "火箭", + "RocketSnowmanIII": "火箭", + "RocketSnowmanIV": "火箭", + "RopeCoil": "绳圈", + "RottenEgg": "臭蛋", + "RubyBolt": "红玉矢", + "RuneBlast": "符文爆破弹", + "SalamanderSpit": "毒唾液", + "SandBallFalling": "沙球", + "SandBallGun": "沙球", + "SandnadoFriendly": "远古风暴", + "SandnadoHostile": "远古风暴", + "SandnadoHostileMark": "远古风暴", + "SantaBombs": "圣诞装饰", + "Sapling": "树苗", + "SapphireBolt": "蓝玉矢", + "SaucerDeathray": "火星致命光", + "SaucerLaser": "飞碟激光", + "SaucerMissile": "火星火箭", + "SaucerScrap": "飞碟碎片", + "SawtoothShark": "锯齿鲨", + "ScutlixLaser": "激光", + "ScutlixLaserCrosshair": "鳞甲怪准星", + "ScutlixLaserFriendly": "鳞甲怪激光", + "Seed": "种子", + "SeedlerNut": "种子弯刀", + "SeedlerThorn": "种子弯刀", + "SeedPlantera": "种子", + "ShadowBeamFriendly": "暗影光束", + "ShadowBeamHostile": "暗影光束", + "ShadowFlame": "暗影焰", + "ShadowFlameArrow": "暗影焰箭", + "ShadowFlameKnife": "暗影焰刀", + "Shadowflames": "暗影焰", + "ShadowOrb": "暗影珠", + "Sharknado": "鲨鱼旋风", + "SharknadoBolt": "鲨鱼旋风矢", + "Shuriken": "手里剑", + "SilkRopeCoil": "绳圈", + "SiltBall": "泥沙球", + "SilverCoin": "银币", + "SilverCoinsFalling": "银币", + "SkeletonBone": "骨头", + "SkeletronHand": "骷髅王之手", + "Skull": "骷髅头", + "SkyFracture": "裂天剑", + "SlimeGun": "史莱姆枪", + "SlimeHook": "史莱姆钩", + "SlushBall": "雪泥球", + "SmokeBomb": "烟雾弹", + "SniperBullet": "狙击弹", + "SnowBallFriendly": "雪球", + "SnowBallHostile": "雪球", + "SolarCounter": "太阳辐射", + "SolarFlareChainsaw": "耀斑链锯", + "SolarFlareDrill": "耀斑钻头", + "SolarFlareRay": "耀斑", + "SolarWhipSword": "日耀喷发剑", + "SolarWhipSwordExplosion": "日耀喷发剑", + "SoulDrain": "夺命弹", + "SoulscourgePirate": "恶魂海盗", + "Spark": "火花", + "Spazmamini": "小魔焰眼", + "Spear": "长矛", + "SpearTrap": "长矛", + "SpectreWrath": "幽灵怒气", + "SpelunkerGlowstick": "洞穴探险荧光棒", + "Spider": "蜘蛛", + "SpiderEgg": "蜘蛛卵", + "SpiderHiver": "蜘蛛炮塔", + "Spike": "尖刺", + "SpikedSlimeSpike": "史莱姆尖刺", + "SpikyBall": "尖球", + "SpikyBallTrap": "尖球", + "SpiritFlame": "神灯烈焰", + "SpiritHeal": "幽灵治愈", + "SporeCloud": "孢子云", + "SporeGas": "孢子", + "SporeGas2": "孢子", + "SporeGas3": "孢子", + "SporeTrap": "孢子", + "SporeTrap2": "孢子", + "Squashling": "南瓜娃娃", + "Stake": "尖桩", + "StarAnise": "星形茴香", + "StardustCellMinion": "星尘细胞", + "StardustCellMinionShot": "星尘细胞", + "StardustChainsaw": "星尘链锯", + "StardustDragon1": "星尘之龙", + "StardustDragon2": "星尘之龙", + "StardustDragon3": "星尘之龙", + "StardustDragon4": "星尘之龙", + "StardustDrill": "星尘钻头", + "StardustGuardian": "星尘守卫", + "StardustGuardianExplosion": "爆星", + "StardustJellyfishSmall": "流体入侵怪", + "StardustSoldierLaser": "星尘激光", + "StardustTowerMark": "星标", + "Starfury": "星怒", + "StarWrath": "狂星之怒", + "StaticHook": "静止钩", + "StickyBomb": "粘性炸弹", + "StickyDynamite": "粘性雷管", + "StickyGlowstick": "粘性荧光棒", + "StickyGrenade": "粘性手榴弹", + "Stinger": "毒刺", + "Stynger": "毒刺发射器", + "StyngerShrapnel": "毒刺发射器", + "Sunfury": "阳炎之怒", + "SuspiciousTentacle": "可疑触手", + "SwordBeam": "剑束", + "Swordfish": "剑鱼", + "Tempest": "暴风雨", + "TendonHook": "钩子", + "TerraBeam": "泰拉光束", + "Terrarian": "泰拉悠悠球", + "TerrarianBeam": "泰拉悠悠球", + "TheDaoofPow": "太极连枷", + "TheEyeOfCthulhu": "悠悠球", + "TheMeatball": "血肉之球", + "TheRottedFork": "腐叉", + "ThornBall": "刺球", + "ThornChakram": "荆棘旋刃", + "ThornHook": "钩子", + "ThrowingKnife": "投刀", + "TiedEighthNote": "音符", + "TikiSpirit": "提基幽魂", + "TinyEater": "小吞噬怪", + "TitaniumChainsaw": "钛金链锯", + "TitaniumDrill": "钛金钻头", + "TitaniumTrident": "钛金三叉戟", + "Tombstone": "墓石", + "TopazBolt": "黄玉矢", + "TowerDamageBolt": "释能", + "ToxicBubble": "毒泡", + "ToxicCloud": "毒云", + "ToxicCloud2": "毒云", + "ToxicCloud3": "毒云", + "ToxicFlask": "毒气瓶", + "TrackHook": "跟踪钩", + "Trident": "三叉戟", + "Truffle": "松露人", + "TruffleSpore": "松露孢子", + "Turtle": "海龟", + "Twinkle": "闪耀怪", + "Typhoon": "台风", + "UFOLaser": "UFO射线", + "UFOMinion": "UFO", + "UnholyArrow": "邪箭", + "UnholyTridentFriendly": "邪恶三叉戟", + "UnholyTridentHostile": "邪恶三叉戟", + "UnholyWater": "邪水", + "ValkyrieYoyo": "悠悠球", + "Valor": "悠悠球", + "VampireHeal": "吸血鬼灵飞刀", + "VampireKnife": "吸血鬼飞刀", + "VenomArrow": "毒液箭", + "VenomBullet": "毒液弹", + "VenomFang": "毒液尖牙", + "VenomSpider": "毒液蜘蛛", + "ViciousPowder": "毒粉", + "VilePowder": "魔粉", + "VilethornBase": "魔刺", + "VilethornTip": "魔刺", + "VineRopeCoil": "藤蔓绳圈", + "VortexAcid": "异星笨蛋", + "VortexBeater": "星旋机枪", + "VortexBeaterRocket": "星旋火箭", + "VortexChainsaw": "星旋链锯", + "VortexDrill": "星旋钻头", + "VortexLaser": "星旋激光", + "VortexLightning": "星旋闪电", + "VortexVortexLightning": "星旋", + "VortexVortexPortal": "星旋", + "Wasp": "胡蜂", + "WaterBolt": "水矢", + "WaterGun": "水枪", + "WaterStream": "水流", + "Web": "蛛丝", + "WebRopeCoil": "绳圈", + "WebSpit": "蛛丝唾液", + "WireKite": "线路蓝图", + "Wisp": "妖灵", + "WoodenArrowFriendly": "木箭", + "WoodenArrowHostile": "木箭", + "WoodenBoomerang": "木制回旋镖", + "WoodHook": "木钩", + "WoodYoyo": "悠悠球", + "WormHook": "爪钩", + "Xenopopper": "外星霰弹枪", + "Yelets": "悠悠球", + "YellowCounterweight": "平衡锤", + "ZephyrFish": "和风鱼", + "Ale": "麦芽酒", + "ApprenticeStaffT3Shot": "双足翼龙怒气", + "BookStaffShot": "无限智慧巨著", + "DD2ApprenticeStorm": "无限智慧旋风", + "DD2BallistraProj": "弩车", + "DD2BallistraTowerT1": "弩车", + "DD2BallistraTowerT2": "弩车", + "DD2BallistraTowerT3": "弩车", + "DD2BetsyArrow": "空中祸害", + "DD2BetsyFireball": "双足翼龙火球", + "DD2BetsyFlameBreath": "双足翼龙呼吸", + "DD2DarkMageBolt": "暗黑能量", + "DD2DarkMageHeal": "暗黑魔符", + "DD2DarkMageRaise": "暗黑魔符", + "DD2DrakinShot": "德拉克龙", + "DD2ElderWins": "残酷末日", + "DD2ExplosiveTrapT1": "爆炸机关", + "DD2ExplosiveTrapT1Explosion": "爆炸机关", + "DD2ExplosiveTrapT2": "爆炸机关", + "DD2ExplosiveTrapT2Explosion": "爆炸机关", + "DD2ExplosiveTrapT3": "爆炸机关", + "DD2ExplosiveTrapT3Explosion": "爆炸机关", + "DD2GoblinBomb": "哥布林炸弹", + "DD2LightningAuraT1": "闪电光环", + "DD2LightningAuraT2": "闪电光环", + "DD2LightningAuraT3": "闪电光环", + "DD2LightningBugZap": "枯萎矢", + "DD2OgreSmash": "食人魔重踏", + "DD2OgreSpit": "食人魔唾液", + "DD2OgreStomp": "食人魔重踏", + "DD2PetDragon": "Hoardagron", + "DD2PetGato": "飞翔Gato", + "DD2PetGhost": "闪烁灯芯", + "DD2PhoenixBow": "幽灵凤凰", + "DD2PhoenixBowShot": "幽灵凤凰", + "DD2SquireSonicBoom": "畅快猛斩", + "DD2Win": "胜利!", + "MonkStaffT1": "瞌睡章鱼", + "MonkStaffT1Explosion": "法棒粉碎", + "MonkStaffT2": "恐怖关刀", + "MonkStaffT2Ghast": "恶魂", + "MonkStaffT3": "天龙之怒", + "MonkStaffT3_Alt": "天龙之怒", + "MonkStaffT3_AltShot": "天龙之怒", + "DD2JavelinHostileT3": "{$ProjectileName.DD2JavelinHostile}", + "Celeb2Rocket": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketExplosive": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketLarge": "{$ProjectileName.Celeb2Weapon}", + "Celeb2RocketLargeExplosive": "{$ProjectileName.Celeb2Weapon}" + } +} \ No newline at end of file diff --git a/Localization/Content/zh-Hans/Town.json b/Localization/Content/zh-Hans/Town.json new file mode 100644 index 0000000..43a56d1 --- /dev/null +++ b/Localization/Content/zh-Hans/Town.json @@ -0,0 +1,233 @@ +{ + "DryadSpecialText": { + "WorldStatusAll": "{0}中{1}%为神圣之地,{2}%为腐化之地,{3}%为猩红之地。", + "WorldStatusHallowCorrupt": "{0}中{1}%为神圣之地,{2}%为腐化之地。", + "WorldDescriptionGrim": "情况确实严峻...", + "WorldDescriptionWork": "你有许多工作要做。", + "WorldDescriptionClose": "你就要成功了!", + "WorldStatusHallowCrimson": "{0}中{1}%为神圣之地,{2}%为猩红之地。", + "WorldStatusCorruptCrimson": "{0}中{1}%为腐化之地,{2}%为猩红之地。", + "WorldStatusCorrupt": "{0}中{1}%为腐化之地。", + "WorldStatusCrimson": "{0}中{1}%为猩红之地。", + "WorldStatusHallow": "{0}中{1}%为神圣之地。", + "WorldStatusPure": "{0}已完全变得纯净。干得漂亮!", + "WorldDescriptionBalanced": "世界处于平衡状态。", + "WorldDescriptionFairyTale": "我们生活在童话之中。", + "Party": "我想我要为了我们过去取得的胜利办一个庆功派对,未来的胜利也一起吧。", + "AfterDD2Tier1": "身处埃特尼亚时,我感觉与{WorldName}断了联系。能回来真是太好了。", + "AfterDD2Tier2": "腐化之地曾经企图在我前往埃特尼亚时掌控我,但我反而利用它的力量来对抗撒旦军队!" + }, + "DyeTraderSpecialText": { + "HasPlant_0": "太棒了,亲爱的!你给我带来了全世界最缤纷、最芬香的精致样本。作为交换,你可以拿走这瓶特别的染料。", + "HasPlant_1": "你给我带来了稀有的美丽花朵...是吧,是吧?这瓶特别的染料你就拿去吧,朋友!", + "HasPlant_2": "棒极了,我的好朋友!有了这精致的样本,我就能混合出从未在{WorldName}见过的极品染料!这瓶染料你现在就可以带走!", + "NoPlant_0": "噢,不行,不行,这样是不行的。有钱也没用,你必须拿一种稀有的植物样本来和我交换!", + "NoPlant_1": "你以为可以骗过{DyeTrader},我可不这么想!我只接受用最稀有的花来交换这些特别的瓶子!", + "NoPlant_2": "这些染料瓶?抱歉,亲爱的朋友,这些是非卖品。我只接受用最珍稀的植物来交换染料!", + "Party": "我真心喜欢派对,到处都是五彩缤纷,还有快乐的人们。" + }, + "GuideSpecialText": { + "Party": "从没参加过派对?你可能要看看其他人。人们有时会带来特别的派对礼品哦。" + }, + "MerchantSpecialText": { + "Party": "你知道参加派对的最佳方式吗?给别人买点礼物,特别是从我这儿买。" + }, + "GoblinTinkererSpecialText": { + "Party": "哥布林的派对和人类的差不多。都有像“把责任推给人类”的游戏,呃...我从不在我的派对上玩这种游戏。" + }, + "WitchDoctorSpecialText": { + "Party": "我想看看你们是怎么庆祝的,我没失望。", + "AfterDD2Tier1": "我感觉与天国黑暗魔法师志趣相投。可惜他们是我们的敌人,我本来希望向他们学习来着。" + }, + "ClothierSpecialText": { + "Party": "妈妈常说你得把往事抛诸脑后,这样才能玩得开心。" + }, + "TravellingMerchantSpecialText": { + "Party": "很多人说派对会给你丰富多彩的记忆。所以买点东西让记忆更加丰富多彩吧!" + }, + "MechanicSpecialText": { + "Party": "你觉得会有人介意我把蛋糕上的蜡烛换成灯泡吗?" + }, + "BartenderSpecialText": { + "AfterDD2Tier1": "你在击退撒旦军队时做得很棒!但我敢肯定他们还会再来,他们这次并未奋勇作战。", + "AfterDD2Tier2": "撒旦军队变得越来越强,但你始终能将他们击退!但我感觉他们不会轻易罢手。", + "AfterDD2Tier3": "你真的让撒旦军队的全部力量陷入绝境了吗?或许你应该找个时间去埃特尼亚看看。", + "BeforeDD2Tier1": "我们真的应该给撒旦军队一点颜色看看。如想了解有关埃特尼亚水晶的更多信息,你可以问我。", + "FirstHelp": "新手可以在房屋上获得几个护卫奖章!你可以向我购买一些特殊防御道具,但你只能用护卫奖章来买!", + "FirstMeeting": "嗯?我怎么到这里了?我记得的最后一件事是有个传送门在我面前打开..." + }, + "PartyGirlSpecialText": { + "Party_1": "嗯?今天没什么特别的…逗你玩呢!现在是派对时间!接下来就是派对后时间!", + "Party_2": "终于,我的机会来了!", + "AfterDD2Tier1": "你见过食人魔吗?我想骑在一个食人魔的背上!" + }, + "PirateSpecialText": { + "Party": "吃完这块蛋糕后,你可能就得暂时叫我白胡子了。" + }, + "TruffleSpecialText": { + "Party": "我本来想邀请所有人去我家开派对,但是没有蘑菇了。" + }, + "NurseSpecialText": { + "Party": "不,我才不会告诉你我的蛋糕上有几根蜡烛。" + }, + "WizardSpecialText": { + "Party": "显然,我办了最神奇的派对。", + "AfterDD2Tier1": "你知道吗,我想我以前看过一个像这样的传送门,但它是黄金的。" + }, + "SteampunkerSpecialText": { + "Party": "所有人都说他们喜欢吃多层蛋糕,所以我在我的蛋糕上安了烟囱。" + }, + "CyborgSpecialText": { + "Party": "这个派对要变成螺母了,甚至可能会变成螺栓!" + }, + "DemolitionistSpecialText": { + "Party": "今天你可得小心点。我们矮人族喜欢开火爆的派对。", + "AfterDD2Start": "我不明白为什么我们不能干脆炸掉这些传送门。" + }, + "ArmsDealerSpecialText": { + "Party": "派对是让人们抛开束缚的好方法,就像子弹一样。" + }, + "StylistSpecialText": { + "Party": "我今天特地剪了新发型,但是老实说,我现在只想用我的剪刀戳破这些气球。" + }, + "PainterSpecialText": { + "Party": "我试过举办一次彩弹大战,但是每个人反而更想要食物和装饰品。" + }, + "AnglerSpecialText": { + "Party": "什么?你说我喜欢派对是因为我是个小孩?好吧,你说对了,那就开始派对吧!" + }, + "AnglerQuestText": { + "NoQuest_1": "现在没有任务要分配给你。", + "NoQuest_2": "你今天已经让我够开心了,可以走了。", + "NoQuest_3": "你完蛋了,伟大的 {Angler} 会解雇你!", + "NoQuest_4": "一天就一条鱼,请离开!", + "NoQuest_5": "你上次给我的鱼还没用呢。我不需要了。", + "TurnIn_1": "哦!谢谢你抓来我要的鱼,可以滚了!", + "TurnIn_2": "抓到啦!一切都是按计划进行的!哈哈哈!", + "TurnIn_3": "你这跑腿的活干得挺不错嘛!现在走开!", + "TurnIn_4": "哈哈哈哈!你做到了!你竟然毫发无伤,真没劲!", + "TurnIn_5": "哇!?你竟然完成了任务,还活了下来!不错,把它交上来,再滚远点!", + "Quest_Batfish": "呐呐呐呐呐呐呐,蝙蝠鱼! 意思是去地下深挖,抓住它,再带来给我!\n\n(抓捕位置:地下和洞穴)", + "Quest_BumblebeeTuna": "在 {WorldName} 的地下丛林中有许多光怪陆离的生物! 比如说,我看见过这种鱼,像一只超级大黄蜂! 我对蜜蜂过敏,所以你必须去把它给我抓来!它的味道肯定像金枪鱼和蜂蜜三明治!\n\n(抓捕位置:蜂蜜)", + "Quest_Catfish": "我终于找到一只喜欢水的丛林猫!我想这是因为它还有鱼的天性。 我不知道为什么会这样,我也不想知道。 我只是希望它能到我手里,你得快点!\n\n(抓捕位置:丛林地表)", + "Quest_Cloudfish": "有谣言说天上漂浮着许多岛屿,岛上有许多宝藏! 但是谁会在意呢,更有意思的是,云彩中有时会形成湖泊,湖泊中游荡着云朵做成的鱼! 我想尝尝它的味道,所以你最好去把它抓来给我!\n\n(抓捕位置:天湖)", + "Quest_Cursedfish": "有条受诅咒的鱼在腐化之地最深处的水中游来游去! 它由诅咒焰化成,诅咒焰在潜藏的恐惧中蔓延。 他们说,诅咒焰连水都无法扑灭,可以永远燃烧。 有一条这样的鱼,我就可以做许多好玩的事!你去抓给我!还是你太胆小!?\n\n(抓捕位置:腐化之地)", + "Quest_Dirtfish": "正当我在收线钓起一条大鱼时,这个僵尸从森林湖中蹦出来,不仅很搞笑还会说话,然后开始大说特说这只“凶残”的泥鱼! 他说,这鱼能闷死10个像他这个块头的小伙子...我要得到它!马上!\n\n(抓捕位置:地表、地下和洞穴)", + "Quest_DynamiteFish": "爆破专家在森林里的湖中弄丢了一捆雷管,一直很着急。他有那么多炸药,丢的那捆炸药有这么重要吗? 显然,因为这捆炸药长出了鳍,开始游走了!我不知道他做炸药的材料是哪儿弄的,但那一捆肯定已经走火入魔了! 钓回来给我,我一直想要一条自杀式炸弹鱼!不要问为什么...\n\n(抓捕位置:地表)", + "Quest_EaterofPlankton": "你肯定不敢去找浮游噬鱼。 它是由世界吞噬怪的残块变异而来的腐化鱼! 把它抓来给我,证明你不是胆小鬼!\n\n(抓捕位置:腐化之地)", + "Quest_FallenStarfish": "我喜欢收集天上落下来的亮黄色星星!如果落在某个人的脑袋上,我会更喜欢。 但是..但是..我最喜欢的还是星星落在森林湖中变成鱼! 那条鱼简直酷毙了,而你又这么牛,快去抓来给我!\n\n(抓捕位置:天湖)", + "Quest_TheFishofCthulu": "显然,恶魔眼有时能在水里和陆地上生存。他们不会飞,但会游泳! 我想知道有人在浴缸中发现一条时会有怎样的表情! 他们总是在相同的地方晃悠。所以,你要钓一条给我!\n\n(抓捕位置:天湖和地表)", + "Quest_Fishotron": "我不知道哪种情况更惨:骷髅鱼还是长手的骷髅鱼。这条深藏在洞穴中的德隆鱼真把我吓了一跳! 我认为在通过地牢抓住那个老男人的幽魂手中! 我给你两个胆,你去把它抓来给我!\n\n(抓捕位置:洞穴)", + "Quest_Harpyfish": "我正要在山上的湖畔睡觉时,这条鱼向我俯冲下来。它在飞! 它长着一张女人的脸,还有羽毛!我想我叫得比她还大声! 嘿,你去,她把我吓成那样,总得付出代价!\n\n(抓捕位置:天湖和地表)", + "Quest_Hungerfish": "有一个饿死鬼,是由血肉墙变形而成,像小鱼一样,漫无目的地在地狱游泳,很恶心,但我现在就要!\n\n(抓捕位置:洞穴)", + "Quest_Ichorfish": "你知道吗?在猩红之地的深处,一些生物在制作这种恶心的黄东西。 我听说一池黄东西融合成鱼形,然后开始游来游去,太离奇了! 去抓一条给我,我可把它塞在别人的马桶里!\n\n(抓捕位置:猩红之地)", + "Quest_Jewelfish": "哦哦,我马上就要发大财啦!在洞穴的深处,有一种宝石做的鱼! 别问我怎么做,我不知道,我知道的是,这种鱼非常美丽,你去把它抓来给我!\n\n(抓捕位置:地下和洞穴)", + "Quest_MirageFish": "我告诉你,在神圣之地的更深处可以找到一些有趣的小动物! 他们闪耀着疯狂的紫色,让我的眼睛眼花缭乱! 这鱼是绝对野生的,因此我希望你能抓一条给我!\n\n(抓捕位置:地下神圣之地)", + "Quest_MutantFlinxfin": "棕白色的,毛茸茸的,住在冰冻地下湖中,是什么鱼?突变弗林鱼! 我没有开玩笑,确实有一种更适应水生生活的突变弗林鱼! 我希望它能够适应我的鱼缸,一定要抓一条!\n\n(抓捕位置:地下苔原)", + "Quest_Pengfish": "这是鲸鱼!这是海豚!不,这是企鹅鱼!哦,瞧瞧,该你出马了! 你去给我抓一条!你知道他们只喜欢冷水吧?\n\n(抓捕位置:苔原)", + "Quest_Pixiefish": "有一种十分十分罕见的妖精,长了太多翅膀,所以完全飞不起来! 在蓝草湖中与鱼儿一起游来游去。 我的鱼缸需要一盏灯,所以我想让你把那个妖精抓来给我!\n\n(抓捕位置:神圣之地)", + "Quest_Spiderfish": "我看到一条八条腿的鱼!不!不可能! 你为我钓它,这样到我手里的时候就是死的了! 这是我最后一次去这么深的洞穴钓鱼!\n\n(抓捕位置:地下和洞穴)", + "Quest_UnicornFish": "独角兽和彩虹都是好东西!它们无处不在,甚至在水中。 真的,我居然在圣湖中看到一条独角兽鱼! 你的任务就是把它钓起来,我会拿它当宠物!\n\n(抓捕位置:神圣之地)", + "Quest_GuideVoodooFish": "地狱的恶魔真的很喜欢巫毒娃娃,但我觉得有一个娃娃身藏着特别多的魔法! 它变成了一条鱼,还可以对自己施法。我命令你去地狱,给我带一个来! 如果是我的话,我会小心沸腾的熔岩,因为它会把你烧死,这样我就得不到鱼了!\n\n(抓捕位置:洞穴)", + "Quest_Wyverntail": "我知道一些你...你不知道的事!好吧,我告诉你,有一只可怕的怪物在星空中飞来飞去!这不是我自己编出来的! 它叫飞龙!可是,可是,你已经知道了,是不是?你不知道的是,他们的出生和成长历程和蝌蚪一样! 所以,他们实际上像...像青蛙!开始行动,给我抓一只!\n\n(抓捕位置:天湖)", + "Quest_ZombieFish": "你相信吗?!我晚上在森林里抓到一条已经死了的鱼!然后,它想吃我!我把它扔掉,然后扭头就跑! 现在,我要把它粘在别人的梳妆台上,看看会发生什么,所以你去把那条鱼给我抓回来,好吗?!\n\n(抓捕位置:地表)", + "Quest_AmanitaFungifin": "我在巨大的发光蘑菇中发现了这个惊人的地方!一切都是蓝的!我正在采摘蓝光湖畔的一些蘑菇,其中一只蘑菇突然咬了我一口,然后游走了!我想以其人之道还治其人之身,并狂咬他一顿!我的意思是,你去把它弄回来给我!\n\n(抓捕位置:发光蘑菇地)", + "Quest_Angelfish": "你知道吗,天空中漂浮着许多神奇的岛屿?你肯定不知道!他们说,天使住在天上,我相信这些天使都有鳍和鳃,在那游来游去!我相信你肯定能抓一个给我!\n\n(抓捕位置:天湖)", + "Quest_BloodyManowar": "噢!别靠近我!我被一条血水母蜇了!怕你不聪明,不知道血水母是什么,所以我告诉你,它是整个 {WorldName} 中最凶险的水母!如果你敢,接近这个恶臭的猩红之地,把它抓来! \n\n(抓捕位置:猩红之地)", + "Quest_Bonefish": "如果看到地下水中漂浮着鱼骨,我通常不怎么好奇,但是这只鱼骨竟然在游泳!什么,你以为在 {WorldName} 中只有人骷髅吗?去抓一只给我,这样我可以把它粘在别人的床上!\n\n(抓捕位置:地下和洞穴)", + "Quest_Bunnyfish": "我正在森林里钓鱼,对吧?你猜发生了什么!一只兔兔朝我跳了过来!然后,又有一只跳过来,又有一只...突然我被兔兔包围了!甚至有一只从水里向我游过来,但它没有腿!我惊讶地从椅子上跌下来,把所有兔兔都吓跑了!我想要那条兔兔鱼作为宠物,因此你最好去把它抓来给我!马上!\n\n(抓捕位置:地表)", + "Quest_CapnTunabeard": "哟,朋友!吓本大盗一跳!停船,我的乖乖!有一个海盗船长,养了一条叫“金枪鱼须船长”的宠物鱼,但在一场大风暴中,鱼缸落水了!它有一个尾钩,一个眼罩,还有别的!你需要把那条鱼抓给我,这样我就能像海盗一样酷酷的!显然,它就在大海的某个地方!咄!\n\n(抓捕位置:海洋)", + "Quest_Clownfish": "我在海边看到过这条明橙色的彩鱼,它在疯狂地游来游去,好像在找走丢的家人!去把它抓来给我,这样又会有一条游出来找它!\n\n(抓捕位置:海洋)", + "Quest_DemonicHellfish": "我听说在地狱,所有恶魔的大王其实是一条鱼!想像一下,如果你去抓一条给我,我将拥有强大的王权!\n\n(抓捕位置:洞穴)", + "Quest_Derpfish": "丛林里的那些跳跳兽是我见过的最可怕的怪物!好的一面是,有时候他们没有腿!这些生活在水中,就没那么可怕了!马上去给我抓一只,这样我可以品尝他们的味道,还不会被吓个半死!\n\n(抓捕位置:丛林地表)", + "Quest_Fishron": "有一个名为猪龙鱼的传奇生物!它一部分是猪,一部分是龙,还有一部分是鱼!我听说,它在世界最寒冷的冰封地下湖中游荡!我不会去那里,因此你去抓它,一定要到我的手里!我太激动了!\n\n(抓捕位置:地下苔原)", + "Quest_InfectedScabbardfish": "一条很长的鱼,看起来像剑鞘,在腐化之地的浑水中游来游去!它看起来很像黑檀石,所以不要让它骗了你!没错,就你啦。你去抓它,而不是我去!\n\n(抓捕位置:腐化之地)", + "Quest_Mudfish": "经过丛林的水域时,要注意脚下!为什么?不,我不担心你会被食人鱼吃掉。我担心你会踩到我最喜欢的一种鱼,泥鱼!我还希望,你会抓一条来给我当宠物!\n\n(抓捕位置:丛林)", + "Quest_Slimefish": "森林里的史莱姆有点恶心。史莱姆鱼更恶心!我可不想与史莱姆们一起游泳,所以你快去从水里抓一条给我!\n\n(抓捕位置:任何地方)", + "Quest_TropicalBarracuda": "食人鱼和鲨鱼都很丑!太...丑了!你知道吗?有一种鱼长得很漂亮,但可以把你的脸咬掉。我会付2块铂金来看这场表演,顺便...不过关键是,你要抓一条给我。一定要在你的脸被咬掉之前,把它交给我!\n\n(抓捕位置:丛林地表)", + "Quest_TundraTrout": "你知道位于{WorldName}雪域表面上的湖泊为什么从不结冰吗?我不知道。但鱼知道!用冰制成的鱼会作为上佳的祭品进贡给伟大且神奇的{Angler}!去吧,我的忠诚仆人,赶快把这条苔原鳟鱼带给我!\n\n(抓捕位置:地表苔原)" + }, + "AnglerChatter": { + "Chatter_1": "{Bartender}为什么一点麦芽酒都不卖给我?我想尝一尝!真是个满腹牢骚的人!" + }, + "BartenderChatter": { + "Chatter_1": "我有办法治愈你的伤痛了!明白吗?麦芽酒?不是吗?", + "Chatter_10": "你认为{Steampunker}有额外的枪吗?我知道有个女巫可能想要一把。", + "Chatter_11": "难怪{Demolitionist}出了那么多的意外。你简直无法想象他从我这里买了多少麦芽酒。", + "Chatter_12": "通常情况下,我算不上哥布林的粉丝,但{GoblinTinkerer}似乎还不赖。", + "Chatter_13": "{?Day}有人看见树妖去哪儿了吗?", + "Chatter_14": "{?!Day}那里真的很安静。有点太过安静了...", + "Chatter_15": "{?!Day}在我这里签到,然后就去干你的活儿。", + "Chatter_16": "{?BloodMoon}你知道我从哪里来,血月其实不过是我想要散散心的一个借口。", + "Chatter_17": "{?MoonLordDefeated}月亮领主,你指的难道不是深渊领主吗?", + "Chatter_18": "{?HardMode}我知道一个熔岩术士,他肯定会非常喜欢地狱中的狱石。", + "Chatter_19": "{?Homeless}知道有什么好地方可以设立商店吗?很想在这里开一家酒吧。", + "Chatter_2": "他们说你很强壮,我可知道什么是真正的强壮。让我们来看看你是否名副其实。", + "Chatter_3": "在我的家乡,我们只供应根汁饮料...", + "Chatter_4": "这可比成天擦桌子强多了。", + "Chatter_5": "如果你天生就比其他人都优秀,那么生命就成为了一项挑战。", + "Chatter_6": "我在这是要干嘛啊...", + "Chatter_7": "始终坚韧不屈,再加上一点点运气,就可以走得很远...", + "Chatter_8": "你在这附近见过任何Mebur吗?", + "Chatter_9": "{Dryad}似乎很不错。我应该带她回来。" + }, + "BartenderHelpText": { + "Help_1": "你首先需要了解的是我准备出售的特殊防御道具,但前提是你拥有些护卫奖章!", + "Help_10": "如果你成功击退入侵,你将获得更多护卫奖章,把护卫奖章拿给我,你就可以购买更多道具和一些其他的特殊奖励!", + "Help_11": "我还听到传言,如果你击败撒旦军队,这些道具本身的能量可能会进一步解锁。或许你甚至可以随时使用它们!", + "Help_2": "你可以使用这些道具制造机关和防御塔楼。这样做会消耗天国魔力,也就是只有撒旦军队成员才会掉落的特殊能量!", + "Help_3": "挑战撒旦军队相当简单。埃特尼亚水晶的能量会将他们吸引到附近,因而可以用于将他们引诱出来。", + "Help_4": "要放置埃特尼亚水晶,你必须获得埃特尼亚水晶和其放置支座。凑巧了,你可以从我这里购买它们!", + "Help_5": "你会希望将埃特尼亚水晶座放置在相当开阔平坦的区域。众多墙壁和物品可能会使其难以保护!", + "Help_6": "安好支座后,你只需拿着埃特尼亚水晶与支座互动,并准备战斗!", + "Help_7": "当然,你不能让撒旦军队摧毁埃特尼亚水晶!这将为我的家园—埃特尼亚世界带来灾难性的后果!", + "Help_8": "你可以花费10点天国魔力设置防御工事。设置完毕后,埃特尼亚水晶将释放其中一些天国魔力。否则,您将需要打败敌人才能获得更多天国魔力。", + "Help_9": "你必须借助这些防御工事,击退几波企图摧毁你和埃特尼亚水晶的入侵者!" + }, + "BartenderNames": { + "Name_1": "泰德", + "Name_10": "贾瓦霍克", + "Name_11": "伊兰德里安", + "Name_12": "德里斯肯", + "Name_13": "伊安米松", + "Name_14": "布莱克史密斯", + "Name_15": "丹尼穆", + "Name_16": "帕迪", + "Name_2": "巴基普", + "Name_3": "杰里", + "Name_4": "比尔", + "Name_5": "欧内斯特", + "Name_6": "威廉", + "Name_7": "戴尔", + "Name_8": "布鲁斯", + "Name_9": "穆厄" + }, + "CyborgChatter": { + "Chatter_1": "{Bartender}说我让他想起某个“EV2”。或许我应该见见她。" + }, + "GoblinTinkererChatter": { + "Chatter_1": "要知道,这些天国哥布林与我的人完全不同。真是一伙粗暴之徒。这并不是说我的人要优秀很多..." + }, + "GuideHelpText": { + "Help_1063": "通常情况下,我会尝试将有关撒旦军队的一切信息都教给你,但你或许应该向{Bartender}询问这些信息。" + }, + "MechanicChatter": { + "Chatter_1": "{Bartender}给了我一杯根汁饮料,我告诉他将饮料倒在方形的杯子里拿给我。" + }, + "NurseChatter": { + "Chatter_1": "我一直要求喝葡萄酒,但所有{Bartender}给我拿的都是用马克杯装的麦芽酒。" + }, + "PirateChatter": { + "Chatter_1": "差不多是时候让酒吧老板过来一趟了!我的朗姆酒都快喝没了!" + }, + "StylistChatter": { + "Chatter_1": "我主动提出免费为{Bartender}修剪头发,但他拒绝了。我的意思是,我本来至少可以为他修剪下胡子!" + }, + "TownNPCHousingFailureReasons": { + "HoleInWallIsTooBig": "这个房间少了一面墙", + "RoomCheckStartedInASolidTile": "这是个实心块!", + "RoomIsTooBig": "这个房间太大了", + "RoomIsTooSmall": "这个房间太小了", + "TooCloseToWorldEdge": "我们需要为此提供更好的文本!!!" + } +} \ No newline at end of file diff --git a/Localization/GameCulture.cs b/Localization/GameCulture.cs new file mode 100644 index 0000000..d0d1849 --- /dev/null +++ b/Localization/GameCulture.cs @@ -0,0 +1,106 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Localization.GameCulture +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; + +namespace Terraria.Localization +{ + public class GameCulture + { + private static Dictionary _NamedCultures = new Dictionary() + { + { + GameCulture.CultureName.English, + new GameCulture("en-US", 1) + }, + { + GameCulture.CultureName.German, + new GameCulture("de-DE", 2) + }, + { + GameCulture.CultureName.Italian, + new GameCulture("it-IT", 3) + }, + { + GameCulture.CultureName.French, + new GameCulture("fr-FR", 4) + }, + { + GameCulture.CultureName.Spanish, + new GameCulture("es-ES", 5) + }, + { + GameCulture.CultureName.Russian, + new GameCulture("ru-RU", 6) + }, + { + GameCulture.CultureName.Chinese, + new GameCulture("zh-Hans", 7) + }, + { + GameCulture.CultureName.Portuguese, + new GameCulture("pt-BR", 8) + }, + { + GameCulture.CultureName.Polish, + new GameCulture("pl-PL", 9) + } + }; + private static Dictionary _legacyCultures; + public readonly CultureInfo CultureInfo; + public readonly int LegacyId; + + public static GameCulture DefaultCulture { get; set; } + + public bool IsActive => Language.ActiveCulture == this; + + public string Name => this.CultureInfo.Name; + + public static GameCulture FromCultureName(GameCulture.CultureName name) => !GameCulture._NamedCultures.ContainsKey(name) ? GameCulture.DefaultCulture : GameCulture._NamedCultures[name]; + + public static GameCulture FromLegacyId(int id) + { + if (id < 1) + id = 1; + return !GameCulture._legacyCultures.ContainsKey(id) ? GameCulture.DefaultCulture : GameCulture._legacyCultures[id]; + } + + public static GameCulture FromName(string name) => GameCulture._legacyCultures.Values.SingleOrDefault((Func) (culture => culture.Name == name)) ?? GameCulture.DefaultCulture; + + static GameCulture() => GameCulture.DefaultCulture = GameCulture._NamedCultures[GameCulture.CultureName.English]; + + public GameCulture(string name, int legacyId) + { + this.CultureInfo = new CultureInfo(name); + this.LegacyId = legacyId; + GameCulture.RegisterLegacyCulture(this, legacyId); + } + + private static void RegisterLegacyCulture(GameCulture culture, int legacyId) + { + if (GameCulture._legacyCultures == null) + GameCulture._legacyCultures = new Dictionary(); + GameCulture._legacyCultures.Add(legacyId, culture); + } + + public enum CultureName + { + English = 1, + German = 2, + Italian = 3, + French = 4, + Spanish = 5, + Russian = 6, + Chinese = 7, + Portuguese = 8, + Polish = 9, + Unknown = 9999, // 0x0000270F + } + } +} diff --git a/Localization/Language.cs b/Localization/Language.cs new file mode 100644 index 0000000..08418a8 --- /dev/null +++ b/Localization/Language.cs @@ -0,0 +1,52 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Localization.Language +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Text.RegularExpressions; +using Terraria.Utilities; + +namespace Terraria.Localization +{ + public static class Language + { + public static GameCulture ActiveCulture => LanguageManager.Instance.ActiveCulture; + + public static LocalizedText GetText(string key) => LanguageManager.Instance.GetText(key); + + public static string GetTextValue(string key) => LanguageManager.Instance.GetTextValue(key); + + public static string GetTextValue(string key, object arg0) => LanguageManager.Instance.GetTextValue(key, arg0); + + public static string GetTextValue(string key, object arg0, object arg1) => LanguageManager.Instance.GetTextValue(key, arg0, arg1); + + public static string GetTextValue(string key, object arg0, object arg1, object arg2) => LanguageManager.Instance.GetTextValue(key, arg0, arg1, arg2); + + public static string GetTextValue(string key, params object[] args) => LanguageManager.Instance.GetTextValue(key, args); + + public static string GetTextValueWith(string key, object obj) => LanguageManager.Instance.GetText(key).FormatWith(obj); + + public static bool Exists(string key) => LanguageManager.Instance.Exists(key); + + public static int GetCategorySize(string key) => LanguageManager.Instance.GetCategorySize(key); + + public static LocalizedText[] FindAll(Regex regex) => LanguageManager.Instance.FindAll(regex); + + public static LocalizedText[] FindAll(LanguageSearchFilter filter) => LanguageManager.Instance.FindAll(filter); + + public static LocalizedText SelectRandom( + LanguageSearchFilter filter, + UnifiedRandom random = null) + { + return LanguageManager.Instance.SelectRandom(filter, random); + } + + public static LocalizedText RandomFromCategory( + string categoryName, + UnifiedRandom random = null) + { + return LanguageManager.Instance.RandomFromCategory(categoryName, random); + } + } +} diff --git a/Localization/LanguageChangeCallback.cs b/Localization/LanguageChangeCallback.cs new file mode 100644 index 0000000..a885cd4 --- /dev/null +++ b/Localization/LanguageChangeCallback.cs @@ -0,0 +1,10 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Localization.LanguageChangeCallback +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Localization +{ + public delegate void LanguageChangeCallback(LanguageManager languageManager); +} diff --git a/Localization/LanguageManager.cs b/Localization/LanguageManager.cs new file mode 100644 index 0000000..f78f874 --- /dev/null +++ b/Localization/LanguageManager.cs @@ -0,0 +1,230 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Localization.LanguageManager +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Newtonsoft.Json; +using ReLogic.Content; +using ReLogic.Graphics; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text.RegularExpressions; +using System.Threading; +using Terraria.GameContent; +using Terraria.Utilities; + +namespace Terraria.Localization +{ + public class LanguageManager + { + public static LanguageManager Instance = new LanguageManager(); + private readonly Dictionary _localizedTexts = new Dictionary(); + private readonly Dictionary> _categoryGroupedKeys = new Dictionary>(); + private GameCulture _fallbackCulture = GameCulture.DefaultCulture; + + public event LanguageChangeCallback OnLanguageChanging; + + public event LanguageChangeCallback OnLanguageChanged; + + public GameCulture ActiveCulture { get; private set; } + + private LanguageManager() => this._localizedTexts[""] = LocalizedText.Empty; + + public int GetCategorySize(string name) => this._categoryGroupedKeys.ContainsKey(name) ? this._categoryGroupedKeys[name].Count : 0; + + public void SetLanguage(int legacyId) => this.SetLanguage(GameCulture.FromLegacyId(legacyId)); + + public void SetLanguage(string cultureName) => this.SetLanguage(GameCulture.FromName(cultureName)); + + private void SetAllTextValuesToKeys() + { + foreach (KeyValuePair localizedText in this._localizedTexts) + localizedText.Value.SetValue(localizedText.Key); + } + + private string[] GetLanguageFilesForCulture(GameCulture culture) + { + Assembly.GetExecutingAssembly(); + return Array.FindAll(typeof (Program).Assembly.GetManifestResourceNames(), (Predicate) (element => element.StartsWith("Terraria.Localization.Content." + culture.CultureInfo.Name) && element.EndsWith(".json"))); + } + + public void SetLanguage(GameCulture culture) + { + if (this.ActiveCulture == culture) + return; + if (culture != this._fallbackCulture && this.ActiveCulture != this._fallbackCulture) + { + this.SetAllTextValuesToKeys(); + this.LoadLanguage(this._fallbackCulture); + } + this.LoadLanguage(culture); + this.ActiveCulture = culture; + Thread.CurrentThread.CurrentCulture = culture.CultureInfo; + Thread.CurrentThread.CurrentUICulture = culture.CultureInfo; + if (this.OnLanguageChanged != null) + this.OnLanguageChanged(this); + Asset deathText = FontAssets.DeathText; + } + + private void LoadLanguage(GameCulture culture) + { + this.LoadFilesForCulture(culture); + if (this.OnLanguageChanging != null) + this.OnLanguageChanging(this); + this.ProcessCopyCommandsInTexts(); + } + + private void LoadFilesForCulture(GameCulture culture) + { + foreach (string path in this.GetLanguageFilesForCulture(culture)) + { + try + { + string fileText = Utils.ReadEmbeddedResource(path); + if (fileText == null || fileText.Length < 2) + throw new FileFormatException(); + this.LoadLanguageFromFileText(fileText); + } + catch (Exception ex) + { + if (Debugger.IsAttached) + Debugger.Break(); + Console.WriteLine("Failed to load language file: " + path); + break; + } + } + } + + private void ProcessCopyCommandsInTexts() + { + Regex regex = new Regex("{\\$(\\w+\\.\\w+)}", RegexOptions.Compiled); + foreach (KeyValuePair localizedText1 in this._localizedTexts) + { + LocalizedText localizedText2 = localizedText1.Value; + for (int index = 0; index < 100; ++index) + { + string text = regex.Replace(localizedText2.Value, (MatchEvaluator) (match => this.GetTextValue(match.Groups[1].ToString()))); + if (!(text == localizedText2.Value)) + localizedText2.SetValue(text); + else + break; + } + } + } + + public void LoadLanguageFromFileText(string fileText) + { + foreach (KeyValuePair> keyValuePair1 in JsonConvert.DeserializeObject>>(fileText)) + { + string key1 = keyValuePair1.Key; + foreach (KeyValuePair keyValuePair2 in keyValuePair1.Value) + { + string key2 = keyValuePair1.Key + "." + keyValuePair2.Key; + if (this._localizedTexts.ContainsKey(key2)) + { + this._localizedTexts[key2].SetValue(keyValuePair2.Value); + } + else + { + this._localizedTexts.Add(key2, new LocalizedText(key2, keyValuePair2.Value)); + if (!this._categoryGroupedKeys.ContainsKey(keyValuePair1.Key)) + this._categoryGroupedKeys.Add(keyValuePair1.Key, new List()); + this._categoryGroupedKeys[keyValuePair1.Key].Add(keyValuePair2.Key); + } + } + } + } + + [Conditional("DEBUG")] + private void ValidateAllCharactersContainedInFont(DynamicSpriteFont font) + { + if (font == null) + return; + foreach (LocalizedText localizedText in this._localizedTexts.Values) + { + foreach (int num in localizedText.Value) + ; + } + } + + public LocalizedText[] FindAll(Regex regex) + { + int length = 0; + foreach (KeyValuePair localizedText in this._localizedTexts) + { + if (regex.IsMatch(localizedText.Key)) + ++length; + } + LocalizedText[] localizedTextArray = new LocalizedText[length]; + int index = 0; + foreach (KeyValuePair localizedText in this._localizedTexts) + { + if (regex.IsMatch(localizedText.Key)) + { + localizedTextArray[index] = localizedText.Value; + ++index; + } + } + return localizedTextArray; + } + + public LocalizedText[] FindAll(LanguageSearchFilter filter) + { + LinkedList source = new LinkedList(); + foreach (KeyValuePair localizedText in this._localizedTexts) + { + if (filter(localizedText.Key, localizedText.Value)) + source.AddLast(localizedText.Value); + } + return source.ToArray(); + } + + public LocalizedText SelectRandom( + LanguageSearchFilter filter, + UnifiedRandom random = null) + { + int maxValue = 0; + foreach (KeyValuePair localizedText in this._localizedTexts) + { + if (filter(localizedText.Key, localizedText.Value)) + ++maxValue; + } + int num = (random ?? Main.rand).Next(maxValue); + foreach (KeyValuePair localizedText in this._localizedTexts) + { + if (filter(localizedText.Key, localizedText.Value) && --maxValue == num) + return localizedText.Value; + } + return LocalizedText.Empty; + } + + public LocalizedText RandomFromCategory(string categoryName, UnifiedRandom random = null) + { + if (!this._categoryGroupedKeys.ContainsKey(categoryName)) + return new LocalizedText(categoryName + ".RANDOM", categoryName + ".RANDOM"); + List categoryGroupedKey = this._categoryGroupedKeys[categoryName]; + return this.GetText(categoryName + "." + categoryGroupedKey[(random ?? Main.rand).Next(categoryGroupedKey.Count)]); + } + + public bool Exists(string key) => this._localizedTexts.ContainsKey(key); + + public LocalizedText GetText(string key) => !this._localizedTexts.ContainsKey(key) ? new LocalizedText(key, key) : this._localizedTexts[key]; + + public string GetTextValue(string key) => this._localizedTexts.ContainsKey(key) ? this._localizedTexts[key].Value : key; + + public string GetTextValue(string key, object arg0) => this._localizedTexts.ContainsKey(key) ? this._localizedTexts[key].Format(arg0) : key; + + public string GetTextValue(string key, object arg0, object arg1) => this._localizedTexts.ContainsKey(key) ? this._localizedTexts[key].Format(arg0, arg1) : key; + + public string GetTextValue(string key, object arg0, object arg1, object arg2) => this._localizedTexts.ContainsKey(key) ? this._localizedTexts[key].Format(arg0, arg1, arg2) : key; + + public string GetTextValue(string key, params object[] args) => this._localizedTexts.ContainsKey(key) ? this._localizedTexts[key].Format(args) : key; + + public void SetFallbackCulture(GameCulture culture) => this._fallbackCulture = culture; + } +} diff --git a/Localization/LanguageSearchFilter.cs b/Localization/LanguageSearchFilter.cs new file mode 100644 index 0000000..717567c --- /dev/null +++ b/Localization/LanguageSearchFilter.cs @@ -0,0 +1,10 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Localization.LanguageSearchFilter +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Localization +{ + public delegate bool LanguageSearchFilter(string key, LocalizedText text); +} diff --git a/Localization/LocalizedText.cs b/Localization/LocalizedText.cs new file mode 100644 index 0000000..982dcbb --- /dev/null +++ b/Localization/LocalizedText.cs @@ -0,0 +1,73 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Localization.LocalizedText +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.ComponentModel; +using System.Text.RegularExpressions; + +namespace Terraria.Localization +{ + public class LocalizedText + { + public static readonly LocalizedText Empty = new LocalizedText("", ""); + private static Regex _substitutionRegex = new Regex("{(\\?(?:!)?)?([a-zA-Z][\\w\\.]*)}", RegexOptions.Compiled); + public readonly string Key; + + public string Value { get; private set; } + + internal LocalizedText(string key, string text) + { + this.Key = key; + this.Value = text; + } + + internal void SetValue(string text) => this.Value = text; + + public string FormatWith(object obj) + { + string input = this.Value; + PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(obj); + return LocalizedText._substitutionRegex.Replace(input, (MatchEvaluator) (match => + { + if (match.Groups[1].Length != 0) + return ""; + PropertyDescriptor propertyDescriptor = properties.Find(match.Groups[2].ToString(), false); + return propertyDescriptor == null ? "" : (propertyDescriptor.GetValue(obj) ?? (object) "").ToString(); + })); + } + + public bool CanFormatWith(object obj) + { + PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(obj); + foreach (Match match in LocalizedText._substitutionRegex.Matches(this.Value)) + { + string name = match.Groups[2].ToString(); + PropertyDescriptor propertyDescriptor = properties.Find(name, false); + if (propertyDescriptor == null) + return false; + object obj1 = propertyDescriptor.GetValue(obj); + if (obj1 == null || match.Groups[1].Length != 0 && (((int) (obj1 as bool?) ?? 0) ^ (match.Groups[1].Length == 1 ? 1 : 0)) != 0) + return false; + } + return true; + } + + public NetworkText ToNetworkText() => NetworkText.FromKey(this.Key); + + public NetworkText ToNetworkText(params object[] substitutions) => NetworkText.FromKey(this.Key, substitutions); + + public static explicit operator string(LocalizedText text) => text.Value; + + public string Format(object arg0) => string.Format(this.Value, arg0); + + public string Format(object arg0, object arg1) => string.Format(this.Value, arg0, arg1); + + public string Format(object arg0, object arg1, object arg2) => string.Format(this.Value, arg0, arg1, arg2); + + public string Format(params object[] args) => string.Format(this.Value, args); + + public override string ToString() => this.Value; + } +} diff --git a/Localization/NetworkText.cs b/Localization/NetworkText.cs new file mode 100644 index 0000000..0140050 --- /dev/null +++ b/Localization/NetworkText.cs @@ -0,0 +1,156 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Localization.NetworkText +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.IO; +using System.Text; + +namespace Terraria.Localization +{ + public class NetworkText + { + public static readonly NetworkText Empty = NetworkText.FromLiteral(""); + private NetworkText[] _substitutions; + private string _text; + private NetworkText.Mode _mode; + + private NetworkText(string text, NetworkText.Mode mode) + { + this._text = text; + this._mode = mode; + } + + private static NetworkText[] ConvertSubstitutionsToNetworkText(object[] substitutions) + { + NetworkText[] networkTextArray = new NetworkText[substitutions.Length]; + for (int index = 0; index < substitutions.Length; ++index) + { + if (!(substitutions[index] is NetworkText networkText2)) + networkText2 = NetworkText.FromLiteral(substitutions[index].ToString()); + networkTextArray[index] = networkText2; + } + return networkTextArray; + } + + public static NetworkText FromFormattable(string text, params object[] substitutions) => new NetworkText(text, NetworkText.Mode.Formattable) + { + _substitutions = NetworkText.ConvertSubstitutionsToNetworkText(substitutions) + }; + + public static NetworkText FromLiteral(string text) => new NetworkText(text, NetworkText.Mode.Literal); + + public static NetworkText FromKey(string key, params object[] substitutions) => new NetworkText(key, NetworkText.Mode.LocalizationKey) + { + _substitutions = NetworkText.ConvertSubstitutionsToNetworkText(substitutions) + }; + + public int GetMaxSerializedSize() + { + int num = 0 + 1 + (4 + Encoding.UTF8.GetByteCount(this._text)); + if (this._mode != NetworkText.Mode.Literal) + { + ++num; + for (int index = 0; index < this._substitutions.Length; ++index) + num += this._substitutions[index].GetMaxSerializedSize(); + } + return num; + } + + public void Serialize(BinaryWriter writer) + { + writer.Write((byte) this._mode); + writer.Write(this._text); + this.SerializeSubstitutionList(writer); + } + + private void SerializeSubstitutionList(BinaryWriter writer) + { + if (this._mode == NetworkText.Mode.Literal) + return; + writer.Write((byte) this._substitutions.Length); + for (int index = 0; index < (this._substitutions.Length & (int) byte.MaxValue); ++index) + this._substitutions[index].Serialize(writer); + } + + public static NetworkText Deserialize(BinaryReader reader) + { + NetworkText.Mode mode = (NetworkText.Mode) reader.ReadByte(); + NetworkText networkText = new NetworkText(reader.ReadString(), mode); + networkText.DeserializeSubstitutionList(reader); + return networkText; + } + + public static NetworkText DeserializeLiteral(BinaryReader reader) + { + NetworkText.Mode mode = (NetworkText.Mode) reader.ReadByte(); + NetworkText networkText = new NetworkText(reader.ReadString(), mode); + networkText.DeserializeSubstitutionList(reader); + if (mode != NetworkText.Mode.Literal) + networkText.SetToEmptyLiteral(); + return networkText; + } + + private void DeserializeSubstitutionList(BinaryReader reader) + { + if (this._mode == NetworkText.Mode.Literal) + return; + this._substitutions = new NetworkText[(int) reader.ReadByte()]; + for (int index = 0; index < this._substitutions.Length; ++index) + this._substitutions[index] = NetworkText.Deserialize(reader); + } + + private void SetToEmptyLiteral() + { + this._mode = NetworkText.Mode.Literal; + this._text = string.Empty; + this._substitutions = (NetworkText[]) null; + } + + public override string ToString() + { + try + { + switch (this._mode) + { + case NetworkText.Mode.Literal: + return this._text; + case NetworkText.Mode.Formattable: + return string.Format(this._text, (object[]) this._substitutions); + case NetworkText.Mode.LocalizationKey: + return Language.GetTextValue(this._text, (object[]) this._substitutions); + default: + return this._text; + } + } + catch (Exception ex) + { + string str = "NetworkText.ToString() threw an exception.\n" + this.ToDebugInfoString() + "\n" + "Exception: " + (object) ex; + this.SetToEmptyLiteral(); + } + return this._text; + } + + private string ToDebugInfoString(string linePrefix = "") + { + string str = string.Format("{0}Mode: {1}\n{0}Text: {2}\n", (object) linePrefix, (object) this._mode, (object) this._text); + if (this._mode == NetworkText.Mode.LocalizationKey) + str += string.Format("{0}Localized Text: {1}\n", (object) linePrefix, (object) Language.GetTextValue(this._text)); + if (this._mode != NetworkText.Mode.Literal) + { + for (int index = 0; index < this._substitutions.Length; ++index) + str = str + string.Format("{0}Substitution {1}:\n", (object) linePrefix, (object) index) + this._substitutions[index].ToDebugInfoString(linePrefix + "\t"); + } + return str; + } + + private enum Mode : byte + { + Literal, + Formattable, + LocalizationKey, + } + } +} diff --git a/Main.cs b/Main.cs new file mode 100644 index 0000000..6868f42 --- /dev/null +++ b/Main.cs @@ -0,0 +1,49553 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Main +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Win32; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Audio; +using Microsoft.Xna.Framework.Content; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Input; +using ReLogic.Content; +using ReLogic.Content.Sources; +using ReLogic.Graphics; +using ReLogic.Localization.IME; +using ReLogic.OS; +using ReLogic.Peripherals.RGB; +using ReLogic.Utilities; +using System; +using System.Collections; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using Terraria.Achievements; +using Terraria.Audio; +using Terraria.Chat; +using Terraria.Cinematics; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.GameContent; +using Terraria.GameContent.Achievements; +using Terraria.GameContent.Ambience; +using Terraria.GameContent.Bestiary; +using Terraria.GameContent.Creative; +using Terraria.GameContent.Drawing; +using Terraria.GameContent.Events; +using Terraria.GameContent.Golf; +using Terraria.GameContent.ItemDropRules; +using Terraria.GameContent.Liquid; +using Terraria.GameContent.NetModules; +using Terraria.GameContent.Skies; +using Terraria.GameContent.UI; +using Terraria.GameContent.UI.BigProgressBar; +using Terraria.GameContent.UI.Chat; +using Terraria.GameContent.UI.States; +using Terraria.GameInput; +using Terraria.Graphics; +using Terraria.Graphics.Capture; +using Terraria.Graphics.Effects; +using Terraria.Graphics.Light; +using Terraria.Graphics.Renderers; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.Initializers; +using Terraria.IO; +using Terraria.Localization; +using Terraria.Map; +using Terraria.Net; +using Terraria.ObjectData; +using Terraria.Social; +using Terraria.UI; +using Terraria.UI.Chat; +using Terraria.UI.Gamepad; +using Terraria.Utilities; +using Terraria.WorldBuilding; + +namespace Terraria +{ + public class Main : Game + { + private const string versionStringBecauseTheyreTheSame = "v1.4.0.5"; + public const int curRelease = 230; + public const string assemblyVersionNumber = "1.4.0.5"; + public const string copyrightText = "Copyright © 2020 Re-Logic"; + public const ulong WorldGeneratorVersion = 987842478081; + public static Dictionary MinimapFrames = new Dictionary(); + public static MinimapFrame ActiveMinimapFrame; + public static Dictionary PlayerResourcesSets = new Dictionary(); + public static IPlayerResourcesDisplaySet ActivePlayerResourcesSet; + public static int mapDelay = 2; + public const string TerrariaSaveFolderPath = "Terraria"; + public static IAssetRepository Assets; + public static AssetSourceController AssetSourceController; + private volatile bool _musicLoaded; + private volatile bool _artLoaded; + private volatile bool _begunMainAsyncLoad; + public static int CurrentDrawnEntityShader; + public static Entity CurrentDrawnEntity; + private static bool _WeGameReqExit = false; + public static float ForcedMinimumZoom = 1f; + public static SpriteViewMatrix GameViewMatrix; + public static SpriteViewMatrix BackgroundViewMatrix; + private static Matrix _currentWantedZoomMatrix; + private static Matrix _uiScaleMatrix; + private static float _uiScaleWanted = 1f; + private static float _uiScaleUsed = 1f; + public static float GameZoomTarget = 1f; + public static bool LightingEveryFrame = true; + public static bool SettingsUnlock_WorldEvil; + public static bool SettingsEnabled_MinersWobble = true; + public static bool SettingBlockGamepadsEntirely; + public static bool SettingDontScaleMainMenuUp; + public static bool SettingsEnabled_OpaqueBoxBehindTooltips = true; + public static bool SettingMusicReplayDelayEnabled = false; + public static bool HidePassword; + public static bool ReversedUpDownArmorSetBonuses; + public static Microsoft.Xna.Framework.Color MouseBorderColor = new Microsoft.Xna.Framework.Color(64, 64, 64, 64); + public static bool MouseShowBuildingGrid; + public static bool AllowUnfocusedInputOnGamepad; + public static bool InvisibleCursorForGamepad = true; + public static bool GamepadDisableCursorItemIconInner = true; + public static bool GamepadDisableInstructionsDisplay; + public static bool CrouchingEnabled = false; + private static GameNotificationType _flashNotificationType = GameNotificationType.All; + public static float MouseBuildingGridAlpha; + public static bool CaptureModeDisabled = false; + public bool unityMouseOver; + public static Main instance; + public static ChromaEngine Chroma; + public static ChromaHotkeyPainter ChromaPainter; + public static World ActiveWorld = new World(); + public static Camera Camera = new Camera(); + public static IPlayerRenderer PlayerRenderer = (IPlayerRenderer) new LegacyPlayerRenderer(); + public static IPlayerRenderer PotionOfReturnRenderer = (IPlayerRenderer) new ReturnGatePlayerRenderer(); + public static MapHeadRenderer MapPlayerRenderer = new MapHeadRenderer(); + public static NPCHeadRenderer TownNPCHeadRenderer = (NPCHeadRenderer) null; + public static NPCHeadRenderer BossNPCHeadRenderer = (NPCHeadRenderer) null; + public static string versionNumber = "v1.4.0.5"; + public static string versionNumber2 = "v1.4.0.5"; + public static string SavePath = Program.LaunchParameters.ContainsKey("-savedirectory") ? Program.LaunchParameters["-savedirectory"] : Platform.Get().GetStoragePath("Terraria"); + public static bool AnnouncementBoxDisabled; + public static int AnnouncementBoxRange = -1; + public static string AutogenSeedName; + private static GameModeData _currentGameModeInfo = GameModeData.NormalMode; + public static Dictionary RegisterdGameModes = new Dictionary() + { + { + 0, + GameModeData.NormalMode + }, + { + 1, + GameModeData.ExpertMode + }, + { + 2, + GameModeData.MasterMode + }, + { + 3, + GameModeData.CreativeMode + } + }; + private static bool? _overrideForExpertMode = new bool?(); + private static bool? _overrideForMasterMode = new bool?(); + public static bool drunkWorld = false; + public static bool getGoodWorld = false; + public static Vector2 destroyerHB = new Vector2(0.0f, 0.0f); + public static FavoritesFile LocalFavoriteData = new FavoritesFile(Main.SavePath + "/favorites.json", false); + public static FavoritesFile CloudFavoritesData = new FavoritesFile("/favorites.json", true); + public static FileMetadata WorldFileMetadata; + public static FileMetadata MapFileMetadata; + public static PingMapLayer Pings = new PingMapLayer(); + public static MapIconOverlay MapIcons = new MapIconOverlay().AddLayer((IMapLayer) new SpawnMapLayer()).AddLayer((IMapLayer) new TeleportPylonsMapLayer()).AddLayer((IMapLayer) Main.Pings); + public static CreativeUI CreativeMenu = new CreativeUI(); + private static Vector2 _lastPingMousePosition = Vector2.Zero; + private static double _lastPingMouseDownTime = 0.0; + private AchievementManager _achievements; + private AchievementAdvisor _achievementAdvisor; + public static BigProgressBarSystem BigBossProgressBar = new BigProgressBarSystem(); + public static UserInterface MenuUI = new UserInterface(); + public static UserInterface InGameUI = new UserInterface(); + private static Main.OnPlayerSelected _pendingCharacterSelect; + public static bool drawBackGore; + public static ulong LobbyId = 0; + private static Microsoft.Xna.Framework.Color[] _mapColorCacheArray = new Microsoft.Xna.Framework.Color[30000]; + public WaterfallManager waterfallManager; + public static WorldSections sectionManager; + public static bool ServerSideCharacter; + public static string clientUUID; + public static bool ContentLoaded = false; + private static int toolTipDistance = 6; + public static float GlobalTimeWrappedHourly; + public static bool GlobalTimerPaused = false; + public static GameTime gameTimeCache = new GameTime(); + public static ulong TileFrameSeed = (ulong) Guid.NewGuid().GetHashCode(); + private static ulong _drawCycleCounter; + public static ContentManager ShaderContentManager; + public static Ref ScreenShaderRef = new Ref(); + public static Ref PixelShaderRef = new Ref(); + public static Ref TileShaderRef = new Ref(); + public static Ref VertexPixelShaderRef = new Ref(); + public static int WaveQuality = 3; + public static bool UseStormEffects = true; + public static bool UseHeatDistortion = true; + public static int npcStreamSpeed = 30; + public static int musicError; + public static bool dedServFPS; + public static int dedServCount1; + public static int dedServCount2; + public static bool superFast = false; + public const int offLimitBorderTiles = 40; + public const int maxItemTypes = 5045; + public const int maxProjectileTypes = 950; + public const int maxNPCTypes = 663; + public const int maxTileSets = 623; + public const int maxWallTypes = 316; + public const int maxBuffTypes = 323; + public const int maxGlowMasks = 301; + public const int maxExtras = 212; + public const int maxGoreTypes = 1269; + public const int maxMusic = 89; + public const int MaxBannerTypes = 289; + public const int numArmorHead = 266; + public const int numArmorBody = 235; + public const int numArmorLegs = 218; + public const int numAccHandsOn = 22; + public const int numAccHandsOff = 14; + public const int numAccNeck = 11; + public const int numAccBack = 30; + public const int numAccFront = 9; + public const int numAccShoes = 25; + public const int numAccWaist = 17; + public const int numAccShield = 10; + public const int numAccFace = 16; + public const int numAccBalloon = 18; + public const int maxWings = 47; + public const int maxBackgrounds = 298; + public const int MaxShopIDs = 100; + private static float cameraLerp; + private static int cameraLerpTimer; + private static int cameraLerpTimeToggle; + private static bool cameraGamePadLerp; + public static Vector2[] OffsetsNPCOffhand = new Vector2[5] + { + new Vector2(14f, 34f), + new Vector2(14f, 32f), + new Vector2(14f, 26f), + new Vector2(14f, 22f), + new Vector2(14f, 18f) + }; + public static Vector2[] OffsetsPlayerOffhand = new Vector2[20] + { + new Vector2(14f, 20f), + new Vector2(14f, 20f), + new Vector2(14f, 20f), + new Vector2(14f, 18f), + new Vector2(14f, 20f), + new Vector2(16f, 4f), + new Vector2(16f, 16f), + new Vector2(18f, 14f), + new Vector2(18f, 14f), + new Vector2(18f, 14f), + new Vector2(16f, 16f), + new Vector2(16f, 16f), + new Vector2(16f, 16f), + new Vector2(16f, 16f), + new Vector2(14f, 14f), + new Vector2(14f, 14f), + new Vector2(12f, 14f), + new Vector2(14f, 16f), + new Vector2(16f, 16f), + new Vector2(16f, 16f) + }; + public static Vector2[] OffsetsPlayerOnhand = new Vector2[20] + { + new Vector2(6f, 19f), + new Vector2(5f, 10f), + new Vector2(12f, 10f), + new Vector2(13f, 17f), + new Vector2(12f, 19f), + new Vector2(5f, 10f), + new Vector2(7f, 17f), + new Vector2(6f, 16f), + new Vector2(6f, 16f), + new Vector2(6f, 16f), + new Vector2(6f, 17f), + new Vector2(7f, 17f), + new Vector2(7f, 17f), + new Vector2(7f, 17f), + new Vector2(8f, 17f), + new Vector2(9f, 16f), + new Vector2(9f, 12f), + new Vector2(8f, 17f), + new Vector2(7f, 17f), + new Vector2(7f, 17f) + }; + public static Vector2[] OffsetsPlayerHeadgear = new Vector2[20] + { + new Vector2(0.0f, 2f), + new Vector2(0.0f, 2f), + new Vector2(0.0f, 2f), + new Vector2(0.0f, 2f), + new Vector2(0.0f, 2f), + new Vector2(0.0f, 2f), + new Vector2(0.0f, 2f), + new Vector2(0.0f, 0.0f), + new Vector2(0.0f, 0.0f), + new Vector2(0.0f, 0.0f), + new Vector2(0.0f, 2f), + new Vector2(0.0f, 2f), + new Vector2(0.0f, 2f), + new Vector2(0.0f, 2f), + new Vector2(0.0f, 0.0f), + new Vector2(0.0f, 0.0f), + new Vector2(0.0f, 0.0f), + new Vector2(0.0f, 2f), + new Vector2(0.0f, 2f), + new Vector2(0.0f, 2f) + }; + public static Vector2 CurrentPan = Vector2.Zero; + public static float sunCircle; + public static int BlackFadeIn; + public static bool noWindowBorder = false; + public static RasterizerState Rasterizer = RasterizerState.CullCounterClockwise; + private string _cachedTitle; + public static int undergroundBackground; + public static int oldUndergroundBackground; + public static bool skipMenu = false; + public static bool verboseNetplay = false; + public static bool stopTimeOuts = false; + public static bool showSpam = false; + public static bool showItemOwner = false; + public static bool[] townNPCCanSpawn = new bool[663]; + public static int musicBox2 = -1; + public static byte HealthBarDrawSettings = 1; + public static bool runningCollectorsEdition; + public static float wFrCounter; + public static float wFrame; + public static float upTimer; + public static float upTimerMax; + public static float upTimerMaxDelay; + public static bool drawDiag; + public static bool drawRelease; + public static bool drawBetterDebug; + public static bool betterDebugRelease; + public static bool renderNow; + public static bool drawToScreen; + public static bool targetSet; + public static int mouseX; + public static int mouseY; + public static int lastMouseX; + public static int lastMouseY; + private static ConcurrentQueue _mainThreadActions = new ConcurrentQueue(); + public static bool mouseLeft; + public static bool mouseRight; + public static bool isMouseLeftConsumedByUI = false; + public static float essScale = 1f; + public static int essDir = -1; + public static float[] cloudBGX = new float[2]; + public static float cloudBGAlpha; + public static float cloudBGActive; + public static int[] cloudBG = new int[2]{ 112, 113 }; + public static int[] treeMntBGSet1 = new int[2]; + public static int[] treeMntBGSet2 = new int[2]; + public static int[] treeMntBGSet3 = new int[2]; + public static int[] treeMntBGSet4 = new int[2]; + public static int[] treeBGSet1 = new int[3]; + public static int[] treeBGSet2 = new int[3]; + public static int[] treeBGSet3 = new int[3]; + public static int[] treeBGSet4 = new int[3]; + public static int[] corruptBG = new int[3]; + public static int[] jungleBG = new int[3]; + public static int[] snowMntBG = new int[2]; + public static int[] snowBG = new int[3]; + public static int[] hallowBG = new int[3]; + public static int[] crimsonBG = new int[3]; + public static int[] desertBG = new int[3]; + public static int[] mushroomBG = new int[3]; + public static int oceanBG; + public static int[] underworldBG = new int[5]; + public static int[] treeX = new int[4]; + public static int[] treeStyle = new int[4]; + public static int[] caveBackX = new int[4]; + public static int[] caveBackStyle = new int[4]; + public static int iceBackStyle; + public static int hellBackStyle; + public static int jungleBackStyle; + public static string debugWords = ""; + public static bool gamePad = false; + public static bool xMas; + public static bool halloween; + public static bool forceXMasForToday; + public static bool forceHalloweenForToday; + public static bool DisableIntenseVisualEffects = false; + public static int snowDust = 0; + public static bool changeTheTitle; + public static bool hairWindow; + public static bool clothesWindow; + public static bool ingameOptionsWindow = false; + public static bool inFancyUI = false; + public static int keyCount; + public static string[] keyString = new string[10]; + public static int[] keyInt = new int[10]; + public static byte gFade; + public static float gFader; + public static byte gFadeDir = 1; + public static bool shouldDrawNetDiagnosticsUI; + public static INetDiagnosticsUI ActiveNetDiagnosticsUI = (INetDiagnosticsUI) new NetDiagnosticsUI(); + public static IMultiplayerClosePlayersOverlay ActiveClosePlayersTeamOverlay = (IMultiplayerClosePlayersOverlay) new NewMultiplayerClosePlayersOverlay(); + public static double UpdateTimeAccumulator; + public static bool drawSkip; + public static int fpsCount; + public static Stopwatch fpsTimer = new Stopwatch(); + public bool gammaTest; + private const bool USE_ASYNC_LOAD = true; + private static bool _isAsyncLoadComplete; + public static bool showSplash = true; + public static bool ignoreErrors = true; + public static string defaultIP = ""; + public static int dayRate = 1; + public static int desiredWorldTilesUpdateRate = 1; + public static int maxScreenW = 1920; + public static int maxScreenH = 1200; + public static int minScreenW = 800; + public static int minScreenH = 600; + public static float iS = 1f; + public static bool render; + public static int qaStyle; + public static int buffScanAreaWidth = (Main.maxScreenW + 800) / 16 - 1; + public static int buffScanAreaHeight = (Main.maxScreenH + 800) / 16 - 1; + public static float musicPitch = 0.0f; + public static bool[] projHostile = new bool[950]; + public static bool[] projHook = new bool[950]; + public static bool[] pvpBuff = new bool[323]; + public static bool[] persistentBuff = new bool[323]; + public static bool[] vanityPet = new bool[323]; + public static bool[] lightPet = new bool[323]; + public static bool[] meleeBuff = new bool[323]; + public static bool[] debuff = new bool[323]; + public static bool[] buffNoSave = new bool[323]; + public static bool[] buffNoTimeDisplay = new bool[323]; + public static bool[] buffDoubleApply = new bool[323]; + public static int maxMP = 10; + public static string[] recentWorld = new string[Main.maxMP]; + public static string[] recentIP = new string[Main.maxMP]; + public static int[] recentPort = new int[Main.maxMP]; + public static bool shortRender = true; + public static bool BackgroundEnabled = true; + public static int instantBGTransitionCounter = 2; + public static int bgDelay; + public static int bgStyle; + private const int BG_STYLES_COUNT = 14; + public static float[] bgAlphaFrontLayer = new float[14]; + public static float[] bgAlphaFarBackLayer = new float[14]; + public static int[] bgFrame = new int[14]; + public static int[] bgFrameCounter = new int[14]; + public static int EquipPage; + public static int EquipPageSelected; + public int mouseNPCIndex = -1; + public int mouseNPCType = -1; + public static int wofNPCIndex = -1; + public static int wofDrawAreaTop; + public static int wofDrawAreaBottom; + public static int wofDrawFrameIndex; + public static int offScreenRange = 200; + private RenderTarget2D backWaterTarget; + public static RenderTarget2D waterTarget; + private RenderTarget2D tileTarget; + private RenderTarget2D blackTarget; + private RenderTarget2D tile2Target; + private RenderTarget2D wallTarget; + private RenderTarget2D backgroundTarget; + public static RenderTarget2D screenTarget; + public static RenderTarget2D screenTargetSwap; + public static int maxMapUpdates = 250000; + public static bool refreshMap; + public static int loadMapLastX; + public static bool loadMapLock; + public static bool loadMap; + public static bool mapReady; + public static int textureMaxWidth = 2000; + public static int textureMaxHeight = 1800; + public static bool updateMap; + public static int mapMinX = 0; + public static int mapMaxX = 0; + public static int mapMinY; + public static int mapMaxY; + public static int mapTimeMax = 30; + public static int mapTime = Main.mapTimeMax; + public static bool clearMap; + public static int mapTargetX = 5; + public static int mapTargetY = 2; + private RenderTarget2D[,] mapTarget = new RenderTarget2D[Main.mapTargetX, Main.mapTargetY]; + private RenderTarget2D mapSectionTexture; + public static bool[,] initMap = new bool[Main.mapTargetX, Main.mapTargetY]; + public static bool[,] mapWasContentLost = new bool[Main.mapTargetX, Main.mapTargetY]; + public const int numInfoIcons = 13; + public static Microsoft.Xna.Framework.Color OurFavoriteColor = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 231, 69); + public static bool mapInit; + public static bool mapEnabled = true; + public static int mapStyle = 1; + public static float grabMapX; + public static float grabMapY; + public static int miniMapX; + public static int miniMapY; + public static int miniMapWidth; + public static int miniMapHeight; + public static float mapMinimapDefaultScale = 1.05f; + public static float mapMinimapScale = Main.mapMinimapDefaultScale; + public static float mapMinimapAlpha = 1f; + public static float mapOverlayScale = 2.5f; + public static float mapOverlayAlpha = 0.35f; + public static bool mapFullscreen; + public static bool resetMapFull; + public static float mapFullscreenScale = 4f; + public static Vector2 mapFullscreenPos = new Vector2(-1f, -1f); + private static bool IsEnginePreloaded; + private static bool IsEngineLoaded; + private static uint _gameUpdateCount; + public static bool SkipAssemblyLoad; + private int firstTileX; + private int lastTileX; + private int firstTileY; + private int lastTileY; + private double bgParallax; + private int bgStartX; + private int bgLoops; + private int bgStartY; + private int bgLoopsY; + private int bgTopY; + public static int renderCount = 99; + private const int MF_BYPOSITION = 1024; + public static GraphicsDeviceManager graphics; + public static SpriteBatch spriteBatch; + public static TileBatch tileBatch; + public static BasicDebugDrawer DebugDrawer; + public static SamplerState SamplerStateForCursor = SamplerState.LinearClamp; + public static GenerationProgress AutogenProgress = new GenerationProgress(); + private static Process tServer; + private static Stopwatch saveTime = new Stopwatch(); + public static KeyboardState keyState; + public static KeyboardState oldKeyState; + public static Microsoft.Xna.Framework.Color mcColor = new Microsoft.Xna.Framework.Color(1f, 0.6f, 0.0f); + public static Microsoft.Xna.Framework.Color hcColor = new Microsoft.Xna.Framework.Color(1f, 0.15f, 0.1f); + public static Microsoft.Xna.Framework.Color creativeModeColor = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.HotPink, Microsoft.Xna.Framework.Color.White, 0.1f); + public static Microsoft.Xna.Framework.Color highVersionColor = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, 0); + public static Microsoft.Xna.Framework.Color errorColor = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 0, 0); + public static bool craftingHide; + public static bool armorHide; + public static float craftingAlpha = 1f; + public static float armorAlpha = 1f; + public static float[] buffAlpha = new float[323]; + public static bool hardMode; + public float chestLootScale = 1f; + public bool chestLootHover; + public float chestStackScale = 1f; + public bool chestStackHover; + public float chestDepositScale = 1f; + public bool chestDepositHover; + public float chestRenameScale = 1f; + public bool chestRenameHover; + public float chestCancelScale = 1f; + public bool chestCancelHover; + public static Vector2 sceneWaterPos = Vector2.Zero; + public static Vector2 sceneTilePos = Vector2.Zero; + public static Vector2 sceneTile2Pos = Vector2.Zero; + public static Vector2 sceneWallPos = Vector2.Zero; + public static Vector2 sceneBackgroundPos = Vector2.Zero; + public static bool maxQ = true; + public static float gfxQuality = 1f; + public static float gfxRate = 0.01f; + public int DiscoStyle; + public static int DiscoR = (int) byte.MaxValue; + public static int DiscoB; + public static int DiscoG; + public static int teamCooldown; + public static int teamCooldownLen = 300; + public static bool gamePaused; + public static bool gameInactive; + public static int updatesCountedForFPS; + public static int drawsCountedForFPS; + public static int uCount; + public static int updateRate; + public static int frameRate; + public static bool RGBRelease; + public static bool qRelease = false; + public static bool netRelease; + public static bool frameRelease; + public static bool showFrameRate = false; + public static int magmaBGFrame; + public static int magmaBGFrameCounter; + public static int saveTimer = 0; + public static bool autoJoin; + public static bool serverStarting = false; + public static float leftWorld = 0.0f; + public static float rightWorld = 134400f; + public static float topWorld = 0.0f; + public static float bottomWorld = 38400f; + public static int maxTilesX = (int) Main.rightWorld / 16 + 1; + public static int maxTilesY = (int) Main.bottomWorld / 16 + 1; + public const int sectionWidth = 200; + public const int sectionHeight = 150; + public static int maxSectionsX = Main.maxTilesX / 200; + public static int maxSectionsY = Main.maxTilesY / 150; + public const int maxDust = 6000; + public static int maxDustToDraw = 6000; + public const int maxCombatText = 100; + public const int maxItemText = 20; + public const int maxPlayers = 255; + public static int maxNetPlayers = (int) byte.MaxValue; + public const int maxChests = 8000; + public const int maxItems = 400; + public const int maxProjectiles = 1000; + public const int maxNPCs = 200; + private static UICharacterSelect _characterSelectMenu = new UICharacterSelect(); + private static UIWorldSelect _worldSelectMenu = new UIWorldSelect(); + public static UIManageControls ManageControlsMenu = new UIManageControls(); + public static UIAchievementsMenu AchievementsMenu = new UIAchievementsMenu(); + public static int maxRain = 750; + public static int slimeWarningTime; + public static int slimeWarningDelay = 420; + public static float slimeRainNPCSlots = 0.65f; + public static bool[] slimeRainNPC = new bool[663]; + public static double slimeRainTime; + public static bool slimeRain; + public static int slimeRainKillCount; + private const double slimeRainMaxTime = 54000.0; + private const double slimeRainMinTime = 32400.0; + private const double slimeRainMaxDelay = 604800.0; + private const double slimeRainMinDelay = 302400.0; + private const double slimeRainChance = 1728000.0; + public const int maxGore = 600; + public const int InventoryItemSlotsStart = 0; + public const int InventoryItemSlotsCount = 50; + public const int InventoryCoinSlotsStart = 50; + public const int InventoryCoinSlotsCount = 4; + public const int InventoryAmmoSlotsStart = 54; + public const int InventoryAmmoSlotsCount = 4; + public const int InventorySlotsTotal = 58; + public int invBottom = 210; + public const int maxLiquidTypes = 13; + public static float cameraX; + public static bool drewLava; + public static float[] liquidAlpha = new float[13]; + public static int waterStyle; + public static int WorldRollingBackupsCountToKeep = 2; + private static bool TOWMusicUnlocked = false; + private static bool swapMusic = false; + public static float caveParallax = 0.88f; + public static int dungeonX; + public static int dungeonY; + public static Terraria.Liquid[] liquid = new Terraria.Liquid[Terraria.Liquid.maxLiquid]; + public static LiquidBuffer[] liquidBuffer = new LiquidBuffer[50000]; + public static bool dedServ; + public static int spamCount = 0; + public static int curMusic; + public static int dayMusic; + public static int ugMusic; + public int newMusic; + public static bool showItemText = true; + public static bool autoSave = true; + public static bool validateSaves = true; + public static bool bannerMouseOver; + public static string buffString = ""; + public static string libPath = ""; + public static int lo; + public static int LogoA = (int) byte.MaxValue; + public static int LogoB; + public static bool LogoT; + public static string statusText = ""; + public static string worldName = ""; + public static int worldID; + public static int background; + public static int caveBackground = 0; + public static float ugBackTransition; + public static Microsoft.Xna.Framework.Color tileColor; + public static double worldSurface; + public static double rockLayer; + public static Microsoft.Xna.Framework.Color[] teamColor = new Microsoft.Xna.Framework.Color[6]; + public const double dayLength = 54000.0; + public const double nightLength = 32400.0; + public static bool dayTime = true; + public static double time = 13500.0; + public static double timeForVisualEffects; + public static int moonPhase; + public static short sunModY; + public static short moonModY; + public static bool alreadyGrabbingSunOrMoon; + public static bool bloodMoon; + public static bool pumpkinMoon; + public static bool snowMoon; + public static float cloudAlpha; + public static float maxRaining; + public static float oldMaxRaining; + public static int rainTime; + public static bool raining; + public static bool eclipse; + public static float eclipseLight; + public static int checkForSpawns; + public static int helpText; + public static int BartenderHelpTextIndex = 0; + public static bool autoGen; + public static bool autoPause = false; + public static int[] projFrames = new int[950]; + public static bool[] projPet = new bool[950]; + public static float demonTorch = 1f; + public static int demonTorchDir = 1; + public static float martianLight = 1f; + public static int martianLightDir = 1; + public static float masterColor = 1f; + public static int masterColorDir = 1; + public static bool placementPreview = true; + public static SceneMetrics SceneMetrics; + public const int maxStars = 400; + public static int numStars; + public const int maxStarTypes = 4; + public const int maxClouds = 200; + public const int maxCloudTypes = 37; + public static int weatherCounter; + public static int numClouds = 200; + public static int numCloudsTemp = Main.numClouds; + public static float windSpeedCurrent; + public static float windSpeedTarget; + public static int windCounter; + public static int extremeWindCounter; + public static bool windPhysics = false; + public static float windPhysicsStrength = 0.1f; + public static bool SettingsEnabled_TilesSwayInWind = true; + public static Cloud[] cloud = new Cloud[200]; + public static bool resetClouds = true; + public static float SmoothedMushroomLightInfluence; + public static int fadeCounter; + public static float invAlpha = 1f; + public static float invDir = 1f; + [ThreadStatic] + public static UnifiedRandom rand; + public static bool allChestStackHover; + public static bool inventorySortMouseOver; + public static float GraveyardVisualIntensity; + public const int maxMoons = 9; + public static int moonType = 0; + public const int numTileColors = 32; + public const int numTreeStyles = 31; + public const int numberOfHairstyles = 162; + public const int maxHairStyles = 162; + public const int maxCharSelectHair = 51; + public const int maxHairOfStylistDefault = 123; + public static bool UseExperimentalFeatures; + public static string DefaultSeed = ""; + public static AudioEngine engine; + public static SoundBank soundBank; + public static WaveBank waveBank; + public static Cue[] music = new Cue[89]; + public static bool[] musicNoCrossFade = new bool[89]; + public static float[] musicFade = new float[89]; + public static float musicVolume = 1f; + public static float ambientVolume = 1f; + public static float soundVolume = 1f; + public static ServerMode MenuServerMode = ServerMode.Lobby | ServerMode.FriendsCanJoin; + public static bool[] tileLighted = new bool[623]; + public static bool[] tileMergeDirt = new bool[623]; + public static bool[] tileCut = new bool[623]; + public static bool[] tileAlch = new bool[623]; + public static int[] tileShine = new int[623]; + public static bool[] tileShine2 = new bool[623]; + public static bool[] wallHouse = new bool[316]; + public static bool[] wallDungeon = new bool[316]; + public static bool[] wallLight = new bool[316]; + public static int[] wallBlend = new int[316]; + public static bool[] tileStone = new bool[623]; + public static bool[] tileAxe = new bool[623]; + public static bool[] tileHammer = new bool[623]; + public static bool[] tileWaterDeath = new bool[623]; + public static bool[] tileLavaDeath = new bool[623]; + public static bool[] tileTable = new bool[623]; + public static bool[] tileBlockLight = new bool[623]; + public static bool[] tileNoSunLight = new bool[623]; + public static bool[] tileDungeon = new bool[623]; + public static bool[] tileSpelunker = new bool[623]; + public static bool[] tileSolidTop = new bool[623]; + public static bool[] tileSolid = new bool[623]; + public static bool[] tileBouncy = new bool[623]; + public static short[] tileOreFinderPriority = new short[623]; + public static byte[] tileLargeFrames = new byte[623]; + public static byte[] wallLargeFrames = new byte[316]; + public static bool[] tileRope = new bool[623]; + public static bool[] tileBrick = new bool[623]; + public static bool[] tileMoss = new bool[623]; + public static bool[] tileNoAttach = new bool[623]; + public static bool[] tileNoFail = new bool[623]; + public static bool[] tileCracked = new bool[623]; + public static bool[] tileObsidianKill = new bool[623]; + public static bool[] tileFrameImportant = new bool[623]; + public static bool[] tilePile = new bool[623]; + public static bool[] tileBlendAll = new bool[623]; + public static short[] tileGlowMask = new short[623]; + public static bool[] tileContainer = new bool[623]; + public static bool[] tileSign = new bool[623]; + public static bool[][] tileMerge = new bool[623][]; + public static int cageFrames = 25; + public static bool critterCage; + public static int[] bunnyCageFrame = new int[Main.cageFrames]; + public static int[] bunnyCageFrameCounter = new int[Main.cageFrames]; + public static int[] squirrelCageFrame = new int[Main.cageFrames]; + public static int[] squirrelCageFrameCounter = new int[Main.cageFrames]; + public static int[] squirrelCageFrameOrange = new int[Main.cageFrames]; + public static int[] squirrelCageFrameCounterOrange = new int[Main.cageFrames]; + public static int[] mallardCageFrame = new int[Main.cageFrames]; + public static int[] mallardCageFrameCounter = new int[Main.cageFrames]; + public static int[] duckCageFrame = new int[Main.cageFrames]; + public static int[] duckCageFrameCounter = new int[Main.cageFrames]; + public static int[] grebeCageFrame = new int[Main.cageFrames]; + public static int[] grebeCageFrameCounter = new int[Main.cageFrames]; + public static int[] seagullCageFrame = new int[Main.cageFrames]; + public static int[] seagullCageFrameCounter = new int[Main.cageFrames]; + public static int[] birdCageFrame = new int[Main.cageFrames]; + public static int[] birdCageFrameCounter = new int[Main.cageFrames]; + public static int[] redBirdCageFrame = new int[Main.cageFrames]; + public static int[] redBirdCageFrameCounter = new int[Main.cageFrames]; + public static int[] blueBirdCageFrame = new int[Main.cageFrames]; + public static int[] blueBirdCageFrameCounter = new int[Main.cageFrames]; + public static byte[,] butterflyCageMode = new byte[9, Main.cageFrames]; + public static int[,] butterflyCageFrame = new int[9, Main.cageFrames]; + public static int[,] butterflyCageFrameCounter = new int[9, Main.cageFrames]; + public static int[,] dragonflyJarFrameCounter = new int[7, Main.cageFrames]; + public static int[,] dragonflyJarFrame = new int[7, Main.cageFrames]; + public static int[,] scorpionCageFrame = new int[2, Main.cageFrames]; + public static int[,] scorpionCageFrameCounter = new int[2, Main.cageFrames]; + public static int[] snailCageFrame = new int[Main.cageFrames]; + public static int[] snailCageFrameCounter = new int[Main.cageFrames]; + public static int[] snail2CageFrame = new int[Main.cageFrames]; + public static int[] snail2CageFrameCounter = new int[Main.cageFrames]; + public static byte[] fishBowlFrameMode = new byte[Main.cageFrames]; + public static int[] fishBowlFrame = new int[Main.cageFrames]; + public static int[] fishBowlFrameCounter = new int[Main.cageFrames]; + public static int[] lavaFishBowlFrame = new int[Main.cageFrames]; + public static int[] lavaFishBowlFrameCounter = new int[Main.cageFrames]; + public static int[] frogCageFrame = new int[Main.cageFrames]; + public static int[] frogCageFrameCounter = new int[Main.cageFrames]; + public static int[] mouseCageFrame = new int[Main.cageFrames]; + public static int[] mouseCageFrameCounter = new int[Main.cageFrames]; + public static int[] turtleCageFrame = new int[Main.cageFrames]; + public static int[] turtleCageFrameCounter = new int[Main.cageFrames]; + public static int[] fairyJarFrame = new int[Main.cageFrames]; + public static int[] fairyJarFrameCounter = new int[Main.cageFrames]; + public static byte[,] jellyfishCageMode = new byte[3, Main.cageFrames]; + public static int[,] jellyfishCageFrame = new int[3, Main.cageFrames]; + public static int[,] jellyfishCageFrameCounter = new int[3, Main.cageFrames]; + public static int[] wormCageFrame = new int[Main.cageFrames]; + public static int[] wormCageFrameCounter = new int[Main.cageFrames]; + public static int[] maggotCageFrame = new int[Main.cageFrames]; + public static int[] maggotCageFrameCounter = new int[Main.cageFrames]; + public static int[] ratCageFrame = new int[Main.cageFrames]; + public static int[] ratCageFrameCounter = new int[Main.cageFrames]; + public static int[] ladybugCageFrame = new int[Main.cageFrames]; + public static int[] ladybugCageFrameCounter = new int[Main.cageFrames]; + public static int[] penguinCageFrame = new int[Main.cageFrames]; + public static int[] penguinCageFrameCounter = new int[Main.cageFrames]; + public static int[] waterStriderCageFrame = new int[Main.cageFrames]; + public static int[] waterStriderCageFrameCounter = new int[Main.cageFrames]; + public static int[] seahorseCageFrame = new int[Main.cageFrames]; + public static int[] seahorseCageFrameCounter = new int[Main.cageFrames]; + public static int[,] slugCageFrame = new int[3, Main.cageFrames]; + public static int[,] slugCageFrameCounter = new int[3, Main.cageFrames]; + public static int[] owlCageFrame = new int[Main.cageFrames]; + public static int[] owlCageFrameCounter = new int[Main.cageFrames]; + public static int[] grasshopperCageFrame = new int[Main.cageFrames]; + public static int[] grasshopperCageFrameCounter = new int[Main.cageFrames]; + public static bool[] tileSand = new bool[623]; + public static bool[] tileFlame = new bool[623]; + public static bool[] npcCatchable = new bool[663]; + public static int[] tileFrame = new int[623]; + public static int[] tileFrameCounter = new int[623]; + public static byte[] wallFrame = new byte[316]; + public static byte[] wallFrameCounter = new byte[316]; + public static int[] backgroundWidth = new int[298]; + public static int[] backgroundHeight = new int[298]; + public static HairstyleUnlocksHelper Hairstyles = new HairstyleUnlocksHelper(); + public static bool tilesLoaded = false; + public static WorldMap Map = new WorldMap(Main.maxTilesX, Main.maxTilesY); + public static Tile[,] tile = new Tile[Main.maxTilesX, Main.maxTilesY]; + public static Dust[] dust = new Dust[6001]; + public static Star[] star = new Star[400]; + public static Item[] item = new Item[401]; + public static int[] timeItemSlotCannotBeReusedFor = new int[401]; + public static NPC[] npc = new NPC[201]; + public static Gore[] gore = new Gore[601]; + public static Rain[] rain = new Rain[Main.maxRain + 1]; + public static Projectile[] projectile = new Projectile[1001]; + public static int[,] projectileIdentity = new int[256, 1001]; + public static CombatText[] combatText = new CombatText[100]; + public static PopupText[] popupText = new PopupText[20]; + public static Chest[] chest = new Chest[8000]; + public static Sign[] sign = new Sign[1000]; + public static int[] itemFrame = new int[401]; + public static int[] itemFrameCounter = new int[401]; + public static DrawAnimation[] itemAnimations = new DrawAnimation[5045]; + private static DrawAnimation _coinOnWorldAnimation = (DrawAnimation) new DrawAnimationVertical(6, 8); + private static DrawAnimation _monkStaffT3OnWorldAnimation = (DrawAnimation) new DrawAnimationVertical(5, 3); + public static List itemAnimationsRegistered = new List(); + public static Vector2 screenPosition; + public static Vector2 screenLastPosition; + public static int screenWidth = 1152; + public static int screenHeight = 864; + public static bool screenMaximized = true; + public static bool screenBorderless = true; + public static int screenBorderlessPendingResizes; + public static int teamNamePlateDistance = 2000; + public static int multiplayerNPCSmoothingRange = 300; + public static bool Setting_UseReducedMaxLiquids = false; + public static int PlayerOverheadChatMessageDisplayTime = 400; + public static object CurrentInputTextTakerOverride; + public static bool drawingPlayerChat; + public static bool chatRelease; + public static string chatText = ""; + public static bool inputTextEnter; + public static bool inputTextEscape; + public static float[] hotbarScale = new float[10] + { + 1f, + 0.75f, + 0.75f, + 0.75f, + 0.75f, + 0.75f, + 0.75f, + 0.75f, + 0.75f, + 0.75f + }; + public static byte mouseTextColor; + public static int mouseTextColorChange = 1; + public static bool mouseLeftRelease; + public static bool mouseRightRelease; + public static bool playerInventory; + public static int stackSplit; + public static bool preventStackSplitReset; + public static int stackCounter; + public static int stackDelay = 7; + public static int superFastStack; + public static Item mouseItem = new Item(); + public static Item guideItem = new Item(); + public static Item reforgeItem = new Item(); + public static float inventoryScale = 0.75f; + public static bool hasFocus; + public static Microsoft.Xna.Framework.Point rulerLineDisplayValues = new Microsoft.Xna.Framework.Point(); + public static bool recFastScroll; + public static bool recBigList; + public static int recStart; + public static Recipe[] recipe = new Recipe[Recipe.maxRecipes]; + public static int[] availableRecipe = new int[Recipe.maxRecipes]; + public static float[] availableRecipeY = new float[Recipe.maxRecipes]; + public static int numAvailableRecipes; + public static int focusRecipe; + public static int myPlayer; + public static Player[] player = new Player[256]; + public static Player[] playerVisualClone = new Player[256]; + public static bool[] countsAsHostForGameplay = new bool[256]; + public static int spawnTileX; + public static int spawnTileY; + public static bool npcChatRelease; + public static bool editSign; + public static bool editChest; + public static bool blockInput = false; + public static string blockKey = Microsoft.Xna.Framework.Input.Keys.None.ToString(); + public static string defaultChestName = string.Empty; + public static string npcChatText = ""; + public static bool npcChatFocus1; + public static bool npcChatFocus2; + public static bool npcChatFocus3; + public static bool npcChatFocus4; + public static int oldNPCShop; + public static int npcChatCornerItem; + public Chest[] shop = new Chest[100]; + public static ItemShopSellbackHelper shopSellbackHelper = new ItemShopSellbackHelper(); + public static int[] travelShop = new int[40]; + public static List anglerWhoFinishedToday = new List(); + public static bool anglerQuestFinished; + public static int anglerQuest; + public static int[] anglerQuestItemNetIDs = new int[41] + { + 2450, + 2451, + 2452, + 2453, + 2454, + 2455, + 2456, + 2457, + 2458, + 2459, + 2460, + 2461, + 2462, + 2463, + 2464, + 2465, + 2466, + 2467, + 2468, + 2469, + 2470, + 2471, + 2472, + 2473, + 2474, + 2475, + 2476, + 2477, + 2478, + 2479, + 2480, + 2481, + 2482, + 2483, + 2484, + 2485, + 2486, + 2487, + 2488, + 4393, + 4394 + }; + public static AmbienceServer AmbienceServer; + public static ItemDropDatabase ItemDropsDB; + public static BestiaryDatabase BestiaryDB; + public static ItemDropResolver ItemDropSolver; + public static BestiaryUnlocksTracker BestiaryTracker; + public static UIBestiaryTest BestiaryUI; + public static TeleportPylonsSystem PylonSystem; + public static ShopHelper ShopHelper; + public static GolfState LocalGolfState = new GolfState(); + public static bool Support4K = true; + public static float MinimumZoomComparerX = 1920f; + public static float MinimumZoomComparerY = 1200f; + private static int _renderTargetMaxSize = 2048; + private static GraphicsProfile _selectedGraphicsProfile = GraphicsProfile.Reach; + private static GraphicsProfile _currentGraphicsProfile = GraphicsProfile.Reach; + public static int LogicCheckScreenWidth = 1920; + public static int LogicCheckScreenHeight = 1200; + private static Main.WorldPreparationState _worldPreparationState = Main.WorldPreparationState.AwaitingData; + public static float temporaryGUIScaleSlider = -1f; + public static bool temporaryGUIScaleSliderUpdate = false; + public static bool InGuideCraftMenu; + public static bool InReforgeMenu; + public static Item HoverItem = new Item(); + private static int backSpaceCount; + private static float backSpaceRate; + public static string motd = ""; + public static bool toggleFullscreen; + public static int numDisplayModes; + public static int[] displayWidth = new int[99]; + public static int[] displayHeight = new int[99]; + public static bool gameMenu = true; + public static bool menuBGChangedDay = false; + public static bool menuBGChangedNight = false; + public static bool lockMenuBGChange = false; + private static int maxLoadPlayer = 1000; + private static int maxLoadWorld = 1000; + public static List PlayerList = new List(); + public static PlayerFileData ActivePlayerFileData = new PlayerFileData(); + public static Player PendingPlayer = (Player) null; + public static List WorldList = new List(); + public static WorldFileData ActiveWorldFileData = new WorldFileData(); + public static string WorldPath = Path.Combine(Main.SavePath, "Worlds"); + public static string CloudWorldPath = "worlds"; + public static string PlayerPath = Path.Combine(Main.SavePath, "Players"); + public static string CloudPlayerPath = "players"; + public static Preferences Configuration = new Preferences(Main.SavePath + Path.DirectorySeparatorChar.ToString() + "config.json"); + public static Preferences InputProfiles = new Preferences(Main.SavePath + Path.DirectorySeparatorChar.ToString() + "input profiles.json"); + public static KeyboardState inputText; + public static KeyboardState oldInputText; + public static int PendingResolutionWidth = 800; + public static int PendingResolutionHeight = 600; + public static bool PendingBorderlessState; + public static int invasionType; + public static double invasionX; + public static int invasionSize; + public static int invasionDelay; + public static int invasionWarn; + public static int invasionSizeStart; + public static bool invasionProgressNearInvasion; + public static int invasionProgressMode = 2; + public static int invasionProgressIcon; + public static int invasionProgress; + public static int invasionProgressMax; + public static int invasionProgressWave; + public static int invasionProgressDisplayLeft; + public static float invasionProgressAlpha; + public static bool HasInteractibleObjectThatIsNotATile = false; + public int currentNPCShowingChatBubble = -1; + public static int[] npcFrameCount = new int[663] + { + 1, + 2, + 2, + 3, + 6, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 25, + 23, + 25, + 21, + 15, + 26, + 2, + 10, + 1, + 16, + 16, + 16, + 3, + 1, + 15, + 3, + 1, + 3, + 1, + 1, + 21, + 25, + 1, + 1, + 1, + 3, + 3, + 15, + 3, + 7, + 7, + 6, + 5, + 6, + 5, + 3, + 3, + 23, + 6, + 3, + 6, + 6, + 2, + 5, + 6, + 5, + 7, + 7, + 4, + 5, + 8, + 1, + 5, + 1, + 2, + 4, + 16, + 5, + 4, + 4, + 15, + 16, + 16, + 16, + 2, + 4, + 6, + 6, + 18, + 16, + 1, + 1, + 1, + 1, + 1, + 1, + 4, + 3, + 1, + 1, + 1, + 1, + 1, + 1, + 5, + 6, + 7, + 16, + 1, + 1, + 25, + 23, + 12, + 20, + 21, + 1, + 2, + 2, + 3, + 6, + 1, + 1, + 1, + 15, + 4, + 11, + 1, + 23, + 6, + 6, + 3, + 1, + 2, + 2, + 1, + 3, + 4, + 1, + 2, + 1, + 4, + 2, + 1, + 15, + 3, + 25, + 4, + 5, + 7, + 3, + 2, + 12, + 12, + 4, + 4, + 4, + 8, + 8, + 13, + 5, + 6, + 4, + 15, + 23, + 3, + 15, + 8, + 5, + 4, + 13, + 15, + 12, + 4, + 14, + 14, + 3, + 2, + 5, + 3, + 2, + 3, + 23, + 5, + 14, + 16, + 5, + 2, + 2, + 12, + 3, + 3, + 3, + 3, + 2, + 2, + 2, + 2, + 2, + 7, + 14, + 15, + 16, + 8, + 3, + 15, + 15, + 16, + 2, + 3, + 20, + 25, + 23, + 26, + 4, + 4, + 16, + 16, + 20, + 20, + 20, + 2, + 2, + 2, + 2, + 8, + 12, + 3, + 4, + 2, + 4, + 25, + 26, + 26, + 6, + 3, + 3, + 3, + 3, + 3, + 3, + 4, + 4, + 5, + 4, + 6, + 7, + 15, + 4, + 7, + 6, + 1, + 1, + 2, + 4, + 3, + 5, + 3, + 3, + 3, + 4, + 5, + 6, + 4, + 2, + 1, + 8, + 4, + 4, + 1, + 8, + 1, + 4, + 15, + 15, + 15, + 15, + 15, + 15, + 16, + 15, + 15, + 15, + 15, + 15, + 3, + 3, + 3, + 3, + 3, + 3, + 16, + 3, + 6, + 12, + 21, + 21, + 20, + 16, + 15, + 15, + 5, + 5, + 6, + 6, + 5, + 2, + 7, + 2, + 6, + 6, + 6, + 6, + 6, + 15, + 15, + 15, + 15, + 15, + 11, + 4, + 2, + 2, + 3, + 3, + 3, + 16, + 15, + 16, + 10, + 14, + 12, + 1, + 10, + 8, + 3, + 3, + 2, + 2, + 2, + 2, + 7, + 15, + 15, + 15, + 6, + 3, + 10, + 10, + 6, + 9, + 8, + 9, + 8, + 20, + 10, + 6, + 23, + 1, + 4, + 24, + 2, + 4, + 6, + 6, + 13, + 15, + 15, + 15, + 15, + 4, + 4, + 26, + 23, + 8, + 2, + 4, + 4, + 4, + 4, + 2, + 2, + 4, + 12, + 12, + 9, + 9, + 9, + 1, + 9, + 11, + 2, + 2, + 9, + 5, + 6, + 4, + 18, + 8, + 11, + 1, + 4, + 5, + 8, + 4, + 1, + 1, + 1, + 1, + 4, + 2, + 5, + 4, + 11, + 5, + 11, + 1, + 1, + 1, + 10, + 10, + 15, + 8, + 17, + 6, + 6, + 1, + 12, + 12, + 13, + 15, + 9, + 5, + 10, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 4, + 4, + 16, + 16, + 25, + 5, + 7, + 3, + 13, + 2, + 6, + 2, + 19, + 19, + 19, + 20, + 26, + 3, + 1, + 1, + 1, + 1, + 1, + 16, + 21, + 9, + 16, + 7, + 6, + 18, + 13, + 20, + 12, + 12, + 20, + 6, + 14, + 14, + 14, + 14, + 6, + 1, + 3, + 25, + 19, + 20, + 22, + 2, + 4, + 4, + 4, + 11, + 9, + 8, + 1, + 9, + 1, + 8, + 8, + 12, + 12, + 11, + 11, + 11, + 11, + 11, + 11, + 11, + 11, + 11, + 1, + 6, + 9, + 1, + 1, + 1, + 1, + 1, + 1, + 4, + 1, + 10, + 1, + 8, + 4, + 1, + 5, + 8, + 8, + 8, + 8, + 9, + 9, + 5, + 4, + 8, + 16, + 8, + 2, + 3, + 3, + 6, + 6, + 7, + 13, + 4, + 4, + 4, + 4, + 1, + 1, + 1, + 8, + 25, + 11, + 14, + 14, + 14, + 17, + 17, + 17, + 5, + 5, + 5, + 14, + 14, + 14, + 9, + 9, + 9, + 9, + 17, + 17, + 16, + 16, + 18, + 18, + 10, + 10, + 10, + 10, + 4, + 1, + 6, + 9, + 6, + 4, + 4, + 4, + 14, + 4, + 25, + 13, + 3, + 7, + 6, + 6, + 1, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 15, + 15, + 8, + 8, + 2, + 6, + 15, + 15, + 6, + 13, + 5, + 5, + 7, + 5, + 14, + 14, + 4, + 6, + 21, + 1, + 1, + 1, + 11, + 12, + 6, + 6, + 17, + 6, + 16, + 21, + 16, + 23, + 5, + 16, + 2, + 28, + 28, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 3, + 4, + 6, + 27, + 16, + 2, + 2, + 4, + 3, + 4 + }; + public static Dictionary npcLifeBytes = new Dictionary(); + public static bool mouseExit; + public static float exitScale = 0.8f; + public static bool mouseReforge; + public static float reforgeScale = 0.8f; + public static Player clientPlayer = new Player(); + public static string getIP = Main.defaultIP; + public static string getPort = Convert.ToString(Netplay.ListenPort); + public static bool menuMultiplayer; + public static bool menuServer; + public static int netMode; + private static int _targetNetMode; + private static bool _hasPendingNetmodeChange; + public const int MaxTimeout = 120; + public static int netPlayCounter; + public static int lastNPCUpdate; + public static int lastItemUpdate; + public static int maxNPCUpdates = 5; + public static int maxItemUpdates = 5; + public static string cUp = "W"; + public static string cLeft = "A"; + public static string cDown = "S"; + public static string cRight = "D"; + public static string cJump = "Space"; + public static string cThrowItem = "T"; + public static string cHeal = "H"; + public static string cMana = "J"; + public static string cBuff = "B"; + public static string cHook = "E"; + public static string cTorch = "LeftShift"; + public static string cInv = "Escape"; + public static string cSmart = "LeftControl"; + public static string cMount = "R"; + public static string cFavoriteKey = "LeftAlt"; + public static bool cSmartCursorModeIsToggleAndNotHold = true; + public static bool SmartCursorEnabled = false; + public static bool SmartCursorShowing = false; + public static int SmartCursorX; + public static int SmartCursorY; + public static bool SmartInteractShowingGenuine; + public static bool SmartInteractShowingFake; + public static int SmartInteractX; + public static int SmartInteractY; + public static int SmartInteractNPC; + public static int SmartInteractProj; + public static bool SmartInteractPotionOfReturn; + public static List SmartInteractTileCoords = new List(); + public static List SmartInteractTileCoordsSelected = new List(); + public static int TileInteractionLX = -1; + public static int TileInteractionLY = -1; + public static int TileInteractionHX = -1; + public static int TileInteractionHY = -1; + public static int cursorOverride = -1; + public static int signHover = -1; + public static string cMapZoomIn = "Add"; + public static string cMapZoomOut = "Subtract"; + public static string cMapAlphaUp = "PageUp"; + public static string cMapAlphaDown = "PageDown"; + public static string cMapFull = "M"; + public static string cMapStyle = "Tab"; + public static Microsoft.Xna.Framework.Input.Keys FavoriteKey = Microsoft.Xna.Framework.Input.Keys.LeftAlt; + public static ColorSlidersSet mouseColorSlider = new ColorSlidersSet(); + public static ColorSlidersSet mouseBorderColorSlider = new ColorSlidersSet(); + public static Microsoft.Xna.Framework.Color mouseColor = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 50, 95); + public static Microsoft.Xna.Framework.Color cursorColor = Microsoft.Xna.Framework.Color.White; + public static int cursorColorDirection = 1; + public static float cursorAlpha; + public static float cursorScale; + public static bool signBubble; + public static int signX = 0; + public static int signY = 0; + public static bool hideUI; + public static bool releaseUI; + public static int FrameSkipMode = 2; + public static bool terrariasFixedTiming = true; + private int splashCounter; + public List DrawCacheNPCsMoonMoon = new List(200); + public List DrawCacheNPCsOverPlayers = new List(200); + public List DrawCacheNPCProjectiles = new List(200); + public List DrawCacheNPCsBehindNonSolidTiles = new List(200); + public List DrawCacheProjsBehindNPCsAndTiles = new List(1000); + public List DrawCacheProjsBehindNPCs = new List(1000); + public List DrawCacheProjsBehindProjectiles = new List(1000); + public List DrawCacheProjsOverWiresUI = new List(1000); + public List DrawCacheProjsOverPlayers = new List(1000); + public List DrawCacheFirstFractals = new List(1000); + public static ParticleRenderer ParticleSystem_World_OverPlayers = new ParticleRenderer(); + public static ParticleRenderer ParticleSystem_World_BehindPlayers = new ParticleRenderer(); + private static WindowStateController _windowMover; + public static AnchoredEntitiesCollection sittingManager; + public static AnchoredEntitiesCollection sleepingManager; + private static bool shouldSetDefaultUIScale = true; + private static float newDefaultUIScale = 0.0f; + private static bool startFullscreen = false; + public static string oldStatusText = ""; + public static string autoGenFileLocation = (string) null; + public static bool autoShutdown; + private uint previousExecutionState; + public static int sundialCooldown; + public static bool fastForwardTime; + private static Stopwatch splashTimer = new Stopwatch(); + private IEnumerator _gameContentLoadProcess; + private int _musicReplayDelay; + public static bool _shouldUseWindyDayMusic = false; + public static bool _shouldUseStormMusic = false; + private int lastMusicPlayed = -1; + private bool playOldTile; + private static float _minWind = 0.34f; + private static float _maxWind = 0.4f; + private static float _minRain = 0.4f; + private static float _maxRain = 0.5f; + public static float ambientWaterfallX = -1f; + public static float ambientWaterfallY = -1f; + public static float ambientWaterfallStrength = 0.0f; + public static float ambientLavafallX = -1f; + public static float ambientLavafallY = -1f; + public static float ambientLavafallStrength = 0.0f; + public static float ambientLavaX = -1f; + public static float ambientLavaY = -1f; + public static float ambientLavaStrength; + public static int ambientCounter; + private static bool _isWaterfallMusicPlaying = false; + private static bool _isLavafallMusicPlaying = false; + public static IChatMonitor chatMonitor = (IChatMonitor) new RemadeChatMonitor(); + public static int ProjectileUpdateLoopIndex = -1; + public static GameTipsDisplay gameTips; + private Stopwatch _worldUpdateTimeTester = new Stopwatch(); + public SpelunkerProjectileHelper SpelunkerProjectileHelper = new SpelunkerProjectileHelper(); + public ChumBucketProjectileHelper ChumBucketProjectileHelper = new ChumBucketProjectileHelper(); + public static int weatherVaneBobframe = 0; + private float logoRotation; + private float logoRotationDirection = -1f; + private float logoRotationSpeed = 1f; + private float logoScale = 1f; + private float logoScaleDirection = 1f; + private float logoScaleSpeed = 1f; + private static int maxMenuItems = 16; + private float[] menuItemScale = new float[Main.maxMenuItems]; + private int focusMenu = -1; + private int selectedMenu = -1; + private int selectedMenu2 = -1; + public static int selectedPlayer = 0; + public static int selectedWorld; + public static int menuMode; + public static int menuSkip; + private static bool _needsLanguageSelect = true; + private static Item tooltipPrefixComparisonItem = new Item(); + private Main.MouseTextCache _mouseTextCache; + public int textBlinkerCount; + public int textBlinkerState; + public static string newWorldName = ""; + private static int[] specX = new int[1000]; + private static int[] specY = new int[1000]; + public TilePaintSystemV2 TilePaintSystem; + public TileDrawing TilesRenderer; + public WallDrawing WallsRenderer; + private AmbientWindSystem _ambientWindSys = new AmbientWindSystem(); + private List _playersThatDrawBehindNPCs = new List((int) byte.MaxValue); + private List _playersThatDrawAfterProjectiles = new List((int) byte.MaxValue); + private List _voidLensData = new List(); + private List _voidLensDataSillouette = new List(); + private List _voidLensDataSillouette2 = new List(); + private Main.TextDisplayCache _textDisplayCache = new Main.TextDisplayCache(); + private List _occupantsListToDrawNPCHouses = new List(); + private List _npcsWithBannersToDraw = new List(); + private bool _imeToggle; + private List _npcTypesThatAlreadyDrewAHead = new List(); + private int[] _npcIndexWhoHoldsHeadIndex = new int[45]; + private static List _requiredObjecsForCraftingText = new List(); + private static bool _preventCraftingBecauseClickWasUsedToChangeFocusedRecipe; + private static int _currentRecipeBeingCrafted = -1; + private static bool hidePVPIcons = false; + public static bool HoveringOverAnNPC; + public static string hoverItemName = ""; + public static Microsoft.Xna.Framework.Color inventoryBack = new Microsoft.Xna.Framework.Color(220, 220, 220, 220); + public static bool mouseText; + private static int mH; + private static int rare; + public static int hairStart; + private static int oldHairStyle; + private static Microsoft.Xna.Framework.Color oldHairColor; + public static int selClothes; + private static Microsoft.Xna.Framework.Color[] oldClothesColor = new Microsoft.Xna.Framework.Color[6]; + private static int oldClothesStyle; + public static int interactedDresserTopLeftX; + public static int interactedDresserTopLeftY; + public static Player dresserInterfaceDummy; + private bool _needToSetupDrawInterfaceLayers = true; + private List _gameInterfaceLayers; + private static GameTime _drawInterfaceGameTime; + private static bool _settingsButtonIsPushedToSide; + private static bool _MouseOversCanClear; + private static Vector2 _itemIconCacheScreenPosition; + private static int _itemIconCacheSelectedItemID; + private static int _itemIconCacheTime; + private static bool _cannotDrawAccessoriesHorizontally = false; + public static Microsoft.Xna.Framework.Color selColor = Microsoft.Xna.Framework.Color.White; + public static int focusColor; + public static int colorDelay; + public static int setKey = -1; + public static int bgScroll; + public static bool autoPass; + public static int menuFocus = 0; + public static float hBar = -1f; + public static float sBar = -1f; + public static float lBar = 1f; + public static float aBar = 1f; + private int grabColorSlider; + public static bool blockMouse; + private static bool _blockFancyUIWhileLoading; + private bool[] menuWide = new bool[100]; + public static float GamepadCursorAlpha = 0.0f; + private bool _needsMenuUIRecalculation; + public static float MenuXMovement = 0.0f; + private float _splashFrameCount; + private bool quickSplash; + private float hellBlackBoxBottom; + public static float MapScale = 1f; + private static int _minimapTopRightAnchorOffsetTowardsLeft = 52; + private static int _minimapTopRightAnchorOffsetTowardsBottom = 90; + public static bool cancelWormHole = false; + private static VertexColors _glowPaintColors = new VertexColors(Microsoft.Xna.Framework.Color.White); + protected List> DrawWiresSpecialTiles = new List>(); + public static float lightning; + private static float lightningDecay = 1f; + private static float lightningSpeed = 0.0f; + private static int thunderDelay; + public static int thunderDistance; + private static string[] MonolithFilterNames = new string[5] + { + "MonolithVortex", + "MonolithNebula", + "MonolithStardust", + "MonolithSolar", + "MonolithMoonLord" + }; + private static string[] MonolithSkyNames = new string[5] + { + "MonolithVortex", + "MonolithNebula", + "MonolithStardust", + "MonolithSolar", + "MonolithMoonLord" + }; + private static float backgroundLayerTransitionSpeed = 0.05f; + public static float atmo; + private static float bgScale = 1f; + private static int bgWidthScaled = (int) (1024.0 * (double) Main.bgScale); + public static Microsoft.Xna.Framework.Color ColorOfTheSkies; + private static Microsoft.Xna.Framework.Color ColorOfSurfaceBackgroundsBase = Microsoft.Xna.Framework.Color.White; + private static Microsoft.Xna.Framework.Color ColorOfSurfaceBackgroundsModified = Microsoft.Xna.Framework.Color.White; + private float screenOff; + private float scAdj; + private float cTop; + private bool _isDrawingOrUpdating; + public static List ContentThatNeedsRenderTargets = new List(); + private static string _oldNetplayStatusText; + private static TextSnippet[] _netplayStatusTextSnippets; + public static int ladyBugRainBoost = 0; + private static bool _canShowMeteorFall; + + public static Vector2 ViewPosition => Main.screenPosition + Main.GameViewMatrix.Translation; + + public static Vector2 ViewSize => new Vector2((float) Main.screenWidth, (float) Main.screenHeight) / Main.GameViewMatrix.Zoom; + + public static Matrix CurrentWantedZoomMatrix => Main._currentWantedZoomMatrix; + + public static void SetRecommendedZoomContext(Matrix matrix) => Main._currentWantedZoomMatrix = matrix; + + public static Matrix UIScaleMatrix => Main._uiScaleMatrix; + + public static float UIScaleWanted => Main._uiScaleWanted; + + public static float UIScale + { + get => Main._uiScaleUsed; + set + { + Main._uiScaleWanted = value; + float uiScaleMax = Main.instance.UIScaleMax; + if ((double) value > (double) uiScaleMax) + value = uiScaleMax; + Main._uiScaleUsed = value; + Main._uiScaleMatrix = Matrix.CreateScale(value, value, 1f); + } + } + + public float UIScaleMax => Math.Max(1f, Math.Min((float) PlayerInput.RealScreenWidth / 800f, (float) PlayerInput.RealScreenHeight / 600f)); + + public static bool RenderTargetsRequired => (double) Main.GameZoomTarget > 1.0 || (double) Main.GameViewMatrix.TransformationMatrix.M11 > 1.0; + + public static bool IsItRaining => (double) Main.cloudAlpha > 0.0; + + public static bool ThickMouse => Main.MouseBorderColor != Microsoft.Xna.Framework.Color.Transparent; + + public static bool GamepadDisableCursorItemIcon => PlayerInput.UsingGamepad && Main.GamepadDisableCursorItemIconInner; + + public static void FindAnnouncementBoxStatus() + { + Main.AnnouncementBoxDisabled = Program.LaunchParameters.ContainsKey("-disableannouncementbox"); + string s; + int result; + if (!Program.LaunchParameters.TryGetValue("-announcementboxrange", out s) || !int.TryParse(s, out result)) + return; + Main.AnnouncementBoxRange = result; + } + + public static GameModeData GameModeInfo => Main._currentGameModeInfo; + + public static int GameMode + { + get => Main.ActiveWorldFileData == null ? 0 : Main.ActiveWorldFileData.GameMode; + set + { + GameModeData gameModeData; + if (Main.ActiveWorldFileData == null || !Main.RegisterdGameModes.TryGetValue(value, out gameModeData)) + return; + Main.ActiveWorldFileData.GameMode = value; + Main._currentGameModeInfo = gameModeData; + } + } + + public static bool masterMode + { + get + { + if (Main.ActiveWorldFileData == null) + return false; + return Main._overrideForMasterMode.HasValue ? Main._overrideForMasterMode.Value : Main._currentGameModeInfo.IsMasterMode; + } + } + + public static bool expertMode + { + get + { + if (Main.ActiveWorldFileData == null) + return false; + return Main._overrideForExpertMode.HasValue ? Main._overrideForExpertMode.Value : Main._currentGameModeInfo.IsExpertMode; + } + } + + public static AchievementManager Achievements => Main.instance._achievements; + + public static AchievementAdvisor AchievementAdvisor => Main.instance._achievementAdvisor; + + public static ulong UnpausedUpdateSeed { get; private set; } + + public static Effect screenShader => Main.ScreenShaderRef.Value; + + public static Effect pixelShader => Main.PixelShaderRef.Value; + + public static Effect vertexPixelShader => Main.VertexPixelShaderRef.Value; + + public static Effect tileShader => Main.TileShaderRef.Value; + + public static void SetCameraLerp(float lerp, int time) + { + Main.cameraLerp = lerp; + Main.cameraLerpTimer = 0; + Main.cameraLerpTimeToggle = time; + Main.cameraGamePadLerp = false; + } + + public static void SetCameraGamepadLerp(float lerp) + { + double cameraLerp = (double) Main.cameraLerp; + } + + [Obsolete("Transform is deprecated. Please use GameViewMatrix & GUIViewMatrix")] + public static Matrix Transform => Main.GameViewMatrix.TransformationMatrix; + + public static Vector2 MouseScreen => new Vector2((float) Main.mouseX, (float) Main.mouseY); + + public static Vector2 MouseWorld + { + get + { + Vector2 vector2 = Main.MouseScreen + Main.screenPosition; + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + vector2.Y = Main.screenPosition.Y + (float) Main.screenHeight - (float) Main.mouseY; + return vector2; + } + } + + public static Vector2 ReverseGravitySupport(Vector2 pos, float height = 0.0f) + { + if ((double) Main.player[Main.myPlayer].gravDir != -1.0) + return pos; + pos.Y = (float) Main.screenHeight - pos.Y - height; + return pos; + } + + public static Microsoft.Xna.Framework.Point ReverseGravitySupport(Microsoft.Xna.Framework.Point pos, int height = 0) + { + if ((double) Main.player[Main.myPlayer].gravDir != -1.0) + return pos; + pos.Y = Main.screenHeight - pos.Y - height; + return pos; + } + + public static Microsoft.Xna.Framework.Rectangle ReverseGravitySupport(Microsoft.Xna.Framework.Rectangle box) + { + if ((double) Main.player[Main.myPlayer].gravDir != -1.0) + return box; + box.Y = Main.screenHeight - box.Y - box.Height; + return box; + } + + public void SetMouseNPC(int index, int type) + { + this.mouseNPCIndex = index; + this.mouseNPCType = type; + } + + public void SetMouseNPC_ToHousingQuery() => this.SetMouseNPC(-1, 0); + + public static event Action OnEnginePreload; + + public static event Action OnResolutionChanged; + + public static event Action OnEngineLoad; + + public static uint GameUpdateCount => Main._gameUpdateCount; + + public static event Action OnTickForThirdPartySoftwareOnly; + + public static event Action OnTickForInternalCodeOnly; + + public static event Action OnPreDraw; + + public static event Action OnPostDraw; + + public static event Action OnPostFullscreenMapDraw; + + public static event Action OnRenderTargetsReleased; + + public static event ResolutionChangeEvent OnRenderTargetsInitialized; + + [DllImport("User32")] + private static extern int RemoveMenu(IntPtr hMenu, int nPosition, int wFlags); + + [DllImport("User32")] + private static extern IntPtr GetSystemMenu(IntPtr hWnd, bool bRevert); + + [DllImport("User32")] + private static extern int GetMenuItemCount(IntPtr hWnd); + + [DllImport("kernel32.dll")] + public static extern IntPtr LoadLibrary(string dllToLoad); + + public static SamplerState DefaultSamplerState => !Main.drawToScreen ? SamplerState.PointClamp : SamplerState.LinearClamp; + + public static int UnderworldLayer => Main.maxTilesY - 200; + + public static MoonPhase GetMoonPhase() => (MoonPhase) Main.moonPhase; + + public static float WindForVisuals => Main.windSpeedCurrent; + + public static Vector2 DrawPlayerItemPos(float gravdir, int itemtype) + { + float num = 10f; + Main.instance.LoadItem(itemtype); + Vector2 vector2 = new Vector2((float) (TextureAssets.Item[itemtype].Width() / 2), (float) (TextureAssets.Item[itemtype].Height() / 2)); + if (itemtype == 95) + { + num = 6f; + vector2.Y += 2f * gravdir; + } + else if (itemtype == 1295) + num = 4f; + else if (itemtype == 3611) + num = 2f; + else if (itemtype == 3350) + num = 2f; + else if (itemtype == 2624) + num = 4f; + else if (itemtype == 3018) + num = 2f; + else if (itemtype == 3007) + { + num = 4f; + vector2.Y -= 1f * gravdir; + } + else if (itemtype == 3107) + { + num = 4f; + vector2.Y += 2f * gravdir; + } + else if (itemtype == 3008) + { + num = -7f; + vector2.Y += 2f * gravdir; + } + else if (itemtype == 1255) + { + num = 6f; + vector2.Y += 0.0f * gravdir; + } + else if (itemtype == 2269) + { + num = 2f; + vector2.Y += 2f * gravdir; + } + else if (itemtype == 1265) + { + num = -8f; + vector2.Y += 4f * gravdir; + } + else if (itemtype == 2272) + { + num = 0.0f; + vector2.Y += 4f * gravdir; + } + else if (itemtype == 3029) + num = 4f; + else if (itemtype == 4381) + num = 4f; + else if (itemtype == 2796) + { + num = -28f; + vector2.Y += 2f * gravdir; + } + else if (itemtype == 2797) + num = 0.0f; + else if (itemtype == 2610) + num = 0.0f; + else if (itemtype == 2623) + { + num = -30f; + vector2.Y -= 4f * gravdir; + } + else if (itemtype == 3546) + { + num = -14f; + vector2.Y -= 6f * gravdir; + } + else if (itemtype == 1835) + { + num = -2f; + vector2.Y += 2f * gravdir; + } + else if (itemtype == 2624) + num = -4f; + else if (itemtype == 3859) + num = -2f; + else if (itemtype == 2888) + num = 6f; + else if (itemtype == 2223) + { + num = 2f; + vector2.Y -= 2f * gravdir; + } + else if (itemtype == 1782) + { + num = 0.0f; + vector2.Y += 4f * gravdir; + } + else if (itemtype == 1929) + { + num = 0.0f; + vector2.Y += 2f * gravdir; + } + else if (itemtype == 2270) + num = -4f; + else if (itemtype == 1784) + { + num = 0.0f; + vector2.Y += 4f * gravdir; + } + else if (itemtype == 1000) + { + num = 6f; + vector2.Y += 0.0f * gravdir; + } + else if (itemtype == 1178) + { + num = 4f; + vector2.Y += 0.0f * gravdir; + } + else if (itemtype == 1319) + { + num = 0.0f; + vector2.Y += 0.0f * gravdir; + } + else if (itemtype == 1297) + { + num = -8f; + vector2.Y += 0.0f * gravdir; + } + else if (itemtype == 1121) + { + num = 6f; + vector2.Y -= 2f * gravdir; + } + else if (itemtype == 1314) + num = 2f; + else if (itemtype == 1258) + { + num = 2f; + vector2.Y -= 2f * gravdir; + } + else if (itemtype == 1155) + { + num = -10f; + vector2.Y -= 2f * gravdir; + } + else if (itemtype == 1156) + num = -2f; + else if (itemtype == 4703) + { + num = -3f; + vector2.Y -= 2f * gravdir; + } + else if (itemtype == 96) + { + num = -8f; + vector2.Y += 2f * gravdir; + } + else if (itemtype == 1870) + { + num = -8f; + vector2.Y += 2f * gravdir; + } + else if (itemtype == 1260) + { + num = -8f; + vector2.Y += 2f * gravdir; + } + else if (itemtype == 1254) + { + num = -6f; + vector2.Y += 2f * gravdir; + } + else if (itemtype == 98) + { + num = -5f; + vector2.Y -= 2f * gravdir; + } + else if (itemtype == 534) + { + num = -2f; + vector2.Y += 1f * gravdir; + } + else if (itemtype == 679) + { + num = 0.0f; + vector2.Y += 2f * gravdir; + } + else if (itemtype == 964) + { + num = 0.0f; + vector2.Y += 0.0f * gravdir; + } + else if (itemtype == 533) + { + num = -7f; + vector2.Y -= 2f * gravdir; + } + else if (itemtype == 1553) + { + num = -10f; + vector2.Y -= 2f * gravdir; + } + else if (itemtype == 506) + { + num = 0.0f; + vector2.Y -= 2f * gravdir; + } + else if (itemtype == 1910) + { + num = 0.0f; + vector2.Y -= 2f * gravdir; + } + else if (itemtype == 494 || itemtype == 508) + { + num = -2f; + } + else + { + switch (itemtype) + { + case 434: + num = 0.0f; + vector2.Y -= 2f * gravdir; + break; + case 514: + num = 0.0f; + vector2.Y += 3f * gravdir; + break; + default: + if (itemtype == 435 || itemtype == 436 || itemtype == 481 || itemtype == 578 || itemtype == 1187 || itemtype == 1194 || itemtype == 1201 || itemtype == 1229) + { + num = -2f; + vector2.Y -= 2f * gravdir; + break; + } + switch (itemtype) + { + case 126: + num = 4f; + vector2.Y += 4f * gravdir; + break; + case (int) sbyte.MaxValue: + num = 4f; + vector2.Y += 2f * gravdir; + break; + case 157: + num = 6f; + vector2.Y += 2f * gravdir; + break; + case 160: + num = -8f; + break; + case 197: + num = -5f; + vector2.Y += 4f * gravdir; + break; + case 800: + num = 4f; + vector2.Y += 2f * gravdir; + break; + case 4060: + num = -2f; + vector2.Y += 4f * gravdir; + break; + default: + if (itemtype == 164 || itemtype == 219) + { + num = 0.0f; + vector2.Y += 2f * gravdir; + break; + } + if (itemtype == 165 || itemtype == 272) + { + num = 4f; + vector2.Y += 4f * gravdir; + break; + } + switch (itemtype) + { + case 266: + num = 0.0f; + vector2.Y += 2f * gravdir; + break; + case 281: + num = 6f; + vector2.Y -= 6f * gravdir; + break; + case 682: + num = 4f; + break; + case 758: + num -= 20f; + vector2.Y += 0.0f * gravdir; + break; + case 759: + num -= 18f; + vector2.Y += 2f * gravdir; + break; + case 760: + num -= 12f; + vector2.Y += 2f * gravdir; + break; + case 779: + num = 0.0f; + vector2.Y += 2f * gravdir; + break; + case 905: + num = -5f; + vector2.Y += 0.0f * gravdir; + break; + case 930: + num = 4f; + vector2.Y += 2f * gravdir; + break; + case 986: + num = 6f; + vector2.Y -= 10f * gravdir; + break; + case 1946: + num -= 12f; + vector2.Y += 2f * gravdir; + break; + case 3788: + num = 2f; + vector2.Y += 2f * gravdir; + break; + case 3870: + num = 4f; + vector2.Y += 4f * gravdir; + break; + case 4953: + num = -4f; + break; + } + break; + } + break; + } + } + vector2.X = num; + return vector2; + } + + public static void SetupTileMerge() + { + int length = 623; + Main.tileMerge = new bool[length][]; + for (int index = 0; index < Main.tileMerge.Length; ++index) + Main.tileMerge[index] = new bool[length]; + } + + public static void RegisterItemAnimation(int index, DrawAnimation animation) + { + if (!Main.itemAnimationsRegistered.Contains(index)) + Main.itemAnimationsRegistered.Add(index); + Main.itemAnimations[index] = animation; + } + + public static void InitializeItemAnimations() + { + for (int index = 0; index < Main.itemAnimations.Length; ++index) + Main.itemAnimations[index] = (DrawAnimation) null; + Main.itemAnimationsRegistered.Clear(); + Main.RegisterItemAnimation(3581, (DrawAnimation) new DrawAnimationVertical(4, 4)); + Main.RegisterItemAnimation(3580, (DrawAnimation) new DrawAnimationVertical(6, 4)); + Main.RegisterItemAnimation(75, (DrawAnimation) new DrawAnimationVertical(5, 8) + { + PingPong = true + }); + Main.RegisterItemAnimation(575, (DrawAnimation) new DrawAnimationVertical(6, 4)); + Main.RegisterItemAnimation(547, (DrawAnimation) new DrawAnimationVertical(6, 4)); + Main.RegisterItemAnimation(520, (DrawAnimation) new DrawAnimationVertical(6, 4)); + Main.RegisterItemAnimation(548, (DrawAnimation) new DrawAnimationVertical(6, 4)); + Main.RegisterItemAnimation(521, (DrawAnimation) new DrawAnimationVertical(6, 4)); + Main.RegisterItemAnimation(549, (DrawAnimation) new DrawAnimationVertical(6, 4)); + Main.RegisterItemAnimation(3453, (DrawAnimation) new DrawAnimationVertical(6, 4)); + Main.RegisterItemAnimation(3454, (DrawAnimation) new DrawAnimationVertical(6, 4)); + Main.RegisterItemAnimation(3455, (DrawAnimation) new DrawAnimationVertical(6, 4)); + Main.RegisterItemAnimation(4068, (DrawAnimation) new DrawAnimationVertical(6, 4) + { + NotActuallyAnimating = true + }); + Main.RegisterItemAnimation(4069, (DrawAnimation) new DrawAnimationVertical(6, 4) + { + NotActuallyAnimating = true + }); + Main.RegisterItemAnimation(4070, (DrawAnimation) new DrawAnimationVertical(6, 4) + { + NotActuallyAnimating = true + }); + for (int index = 0; index < ItemID.Sets.IsFood.Length; ++index) + { + if (ItemID.Sets.IsFood[index]) + Main.RegisterItemAnimation(index, (DrawAnimation) new DrawAnimationVertical(int.MaxValue, 3)); + } + } + + public static Player LocalPlayer => Main.player[Main.myPlayer]; + + public static CreativeUnlocksTracker LocalPlayerCreativeTracker => Main.player[Main.myPlayer].creativeTracker; + + public static int npcShop { get; private set; } + + public static void SetGraphicsProfile(GraphicsProfile profile) + { + if (Main._currentGraphicsProfile == profile) + return; + Main._selectedGraphicsProfile = profile; + Main.SetGraphicsProfileInternal(); + } + + private static void SetGraphicsProfileInternal() + { + Main._currentGraphicsProfile = Main._selectedGraphicsProfile; + Main.graphics.GraphicsProfile = Main._selectedGraphicsProfile; + switch (Main._selectedGraphicsProfile) + { + case GraphicsProfile.Reach: + Main.maxScreenW = 1920; + Main.maxScreenH = 1200; + Main._renderTargetMaxSize = 2048; + break; + case GraphicsProfile.HiDef: + Main.maxScreenW = 4096; + Main.maxScreenH = 4096; + Main._renderTargetMaxSize = 4096; + Main.TrySupporting8K(); + break; + } + try + { + Main.graphics.ApplyChanges(); + } + catch (NoSuitableGraphicsDeviceException ex) + { + if (Main._currentGraphicsProfile == GraphicsProfile.HiDef) + { + Main._selectedGraphicsProfile = GraphicsProfile.Reach; + Main.SetGraphicsProfileInternal(); + } + } + Main.instance.EnsureRenderTargetContent(); + } + + private static void TrySupporting8K() + { + if (!Platform.IsWindows) + return; + Main.instance.ReleaseTargets(); + System.Type type = Assembly.GetAssembly(typeof (GraphicsProfile)).GetType("Microsoft.Xna.Framework.Graphics.ProfileCapabilities", true); + if (!(type != (System.Type) null)) + return; + FieldInfo field1 = type.GetField("MaxTextureSize", BindingFlags.Instance | BindingFlags.NonPublic); + FieldInfo field2 = type.GetField("HiDef", BindingFlags.Static | BindingFlags.NonPublic); + if (!(field1 != (FieldInfo) null) || !(field2 != (FieldInfo) null)) + return; + field1.SetValue(field2.GetValue((object) null), (object) 8192); + } + + public static void AnglerQuestSwap() + { + if (Main.netMode == 1) + return; + Main.anglerWhoFinishedToday.Clear(); + Main.anglerQuestFinished = false; + bool flag1 = NPC.downedBoss1 || NPC.downedBoss2 || NPC.downedBoss3 || Main.hardMode || NPC.downedSlimeKing || NPC.downedQueenBee; + bool flag2 = true; + while (flag2) + { + flag2 = false; + Main.anglerQuest = Main.rand.Next(Main.anglerQuestItemNetIDs.Length); + int anglerQuestItemNetId = Main.anglerQuestItemNetIDs[Main.anglerQuest]; + if (anglerQuestItemNetId == 2454 && (!Main.hardMode || WorldGen.crimson)) + flag2 = true; + if (anglerQuestItemNetId == 2457 && WorldGen.crimson) + flag2 = true; + if (anglerQuestItemNetId == 2462 && !Main.hardMode) + flag2 = true; + if (anglerQuestItemNetId == 2463 && (!Main.hardMode || !WorldGen.crimson)) + flag2 = true; + if (anglerQuestItemNetId == 2465 && !Main.hardMode) + flag2 = true; + if (anglerQuestItemNetId == 2468 && !Main.hardMode) + flag2 = true; + if (anglerQuestItemNetId == 2471 && !Main.hardMode) + flag2 = true; + if (anglerQuestItemNetId == 2473 && !Main.hardMode) + flag2 = true; + if (anglerQuestItemNetId == 2477 && !WorldGen.crimson) + flag2 = true; + if (anglerQuestItemNetId == 2480 && !Main.hardMode) + flag2 = true; + if (anglerQuestItemNetId == 2483 && !Main.hardMode) + flag2 = true; + if (anglerQuestItemNetId == 2484 && !Main.hardMode) + flag2 = true; + if (anglerQuestItemNetId == 2485 && WorldGen.crimson) + flag2 = true; + if ((anglerQuestItemNetId == 2476 || anglerQuestItemNetId == 2453 || anglerQuestItemNetId == 2473) && !flag1) + flag2 = true; + } + NetMessage.SendAnglerQuest(-1); + } + + public static string playerPathName => Main.ActivePlayerFileData.Path; + + public static string worldPathName => Main.ActiveWorldFileData.Path; + + public static bool HasSmartInteractTarget => Main.SmartInteractNPC != -1 || Main.SmartInteractX != -1 && Main.SmartInteractY != -1 || Main.SmartInteractProj != -1; + + public void UpdateParticleSystems() + { + Main.ParticleSystem_World_OverPlayers.Update(); + Main.ParticleSystem_World_BehindPlayers.Update(); + } + + public static void TrySetPreparationState(Main.WorldPreparationState state) + { + if (state != Main.WorldPreparationState.ProcessingData) + return; + Main._worldPreparationState = state; + } + + public static void UpdateWorldPreparationState() + { + if (Main.netMode != 1) + { + Main._worldPreparationState = Main.WorldPreparationState.Ready; + } + else + { + if (Main.netMode == 1 && Main.gameMenu && Main._worldPreparationState == Main.WorldPreparationState.Ready) + Main._worldPreparationState = Main.WorldPreparationState.AwaitingData; + if (Main.netMode != 1 || Main._worldPreparationState != Main.WorldPreparationState.ProcessingData) + return; + Main._worldPreparationState = Main.WorldPreparationState.Ready; + Main.gameMenu = false; + Main.FixUIScale(); + ChatHelper.ShowCachedMessages(); + ChatHelper.ClearDelayedMessagesCache(); + } + } + + public static bool InSmartCursorHighlightArea(int x, int y, out bool actuallySelected) + { + actuallySelected = Main.SmartInteractTileCoordsSelected.Contains(new Microsoft.Xna.Framework.Point(x, y)); + return !Main.hideUI && Collision.InTileBounds(x, y, Main.TileInteractionLX, Main.TileInteractionLY, Main.TileInteractionHX, Main.TileInteractionHY) && Main.SmartInteractTileCoords.Contains(new Microsoft.Xna.Framework.Point(x, y)); + } + + public static void LoadWorlds() + { + Main.WorldList.Clear(); + if (!Utils.TryCreatingDirectory(Main.WorldPath)) + return; + string[] files = Directory.GetFiles(Main.WorldPath, "*.wld"); + int num = Math.Min(files.Length, Main.maxLoadWorld); + for (int index = 0; index < num; ++index) + { + WorldFileData allMetadata = WorldFile.GetAllMetadata(files[index], false); + if (allMetadata != null) + Main.WorldList.Add(allMetadata); + else + Main.WorldList.Add(WorldFileData.FromInvalidWorld(files[index], false)); + } + if (SocialAPI.Cloud != null) + { + foreach (string str in SocialAPI.Cloud.GetFiles().Where((Func) (path => path.StartsWith(Main.CloudWorldPath, StringComparison.CurrentCultureIgnoreCase) && path.EndsWith(".wld", StringComparison.CurrentCultureIgnoreCase)))) + { + WorldFileData allMetadata = WorldFile.GetAllMetadata(str, true); + if (allMetadata != null) + Main.WorldList.Add(allMetadata); + else + Main.WorldList.Add(WorldFileData.FromInvalidWorld(str, true)); + } + } + Main.WorldList.Sort(new Comparison(Main.WorldListSortMethod)); + } + + private static int WorldListSortMethod(WorldFileData data1, WorldFileData data2) => data1.Name.CompareTo(data2.Name); + + public static void LoadPlayers() + { + Main.PlayerList.Clear(); + if (!Utils.TryCreatingDirectory(Main.PlayerPath)) + return; + string[] files = Directory.GetFiles(Main.PlayerPath, "*.plr"); + int num = Math.Min(Main.maxLoadPlayer, files.Length); + for (int index = 0; index < num; ++index) + { + PlayerFileData fileData = Player.GetFileData(files[index], false); + if (fileData != null) + Main.PlayerList.Add(fileData); + } + if (SocialAPI.Cloud != null) + { + foreach (string file in SocialAPI.Cloud.GetFiles().Where((Func) (path => path.StartsWith(Main.CloudPlayerPath, StringComparison.CurrentCultureIgnoreCase) && path.EndsWith(".plr", StringComparison.CurrentCultureIgnoreCase)))) + { + PlayerFileData fileData = Player.GetFileData(file, true); + if (fileData != null) + Main.PlayerList.Add(fileData); + } + } + Main.PlayerList.Sort(new Comparison(Main.PlayerListSortMethod)); + } + + private static int PlayerListSortMethod(PlayerFileData data1, PlayerFileData data2) => data1.Name.CompareTo(data2.Name); + + protected void OpenRecent() + { + try + { + if (!File.Exists(Main.SavePath + Path.DirectorySeparatorChar.ToString() + "servers.dat")) + return; + using (FileStream fileStream = new FileStream(Main.SavePath + Path.DirectorySeparatorChar.ToString() + "servers.dat", FileMode.Open)) + { + using (BinaryReader binaryReader = new BinaryReader((Stream) fileStream)) + { + binaryReader.ReadInt32(); + for (int index = 0; index < 10; ++index) + { + Main.recentWorld[index] = binaryReader.ReadString(); + Main.recentIP[index] = binaryReader.ReadString(); + Main.recentPort[index] = binaryReader.ReadInt32(); + } + } + } + } + catch + { + } + } + + public static void SaveRecent() + { + Utils.TryCreatingDirectory(Main.SavePath); + try + { + File.SetAttributes(Main.SavePath + Path.DirectorySeparatorChar.ToString() + "servers.dat", FileAttributes.Normal); + } + catch + { + } + try + { + using (FileStream fileStream = new FileStream(Main.SavePath + Path.DirectorySeparatorChar.ToString() + "servers.dat", FileMode.Create)) + { + using (BinaryWriter binaryWriter = new BinaryWriter((Stream) fileStream)) + { + binaryWriter.Write(230); + for (int index = 0; index < 10; ++index) + { + binaryWriter.Write(Main.recentWorld[index]); + binaryWriter.Write(Main.recentIP[index]); + binaryWriter.Write(Main.recentPort[index]); + } + } + } + } + catch + { + } + } + + public static bool SaveSettings() + { + Main.Configuration.Clear(); + Main.Configuration.Put("ResetDefaultUIScale", (object) false); + Main.Configuration.Put("SmartCursorToggle", (object) Main.cSmartCursorModeIsToggleAndNotHold); + Main.Configuration.Put("MapEnabled", (object) Main.mapEnabled); + Main.Configuration.Put("InvasionBarMode", (object) Main.invasionProgressMode); + Main.Configuration.Put("AutoSave", (object) Main.autoSave); + Main.Configuration.Put("AutoPause", (object) Main.autoPause); + Main.Configuration.Put("Language", (object) Language.ActiveCulture.Name); + Main.Configuration.Put("PlacementPreview", (object) Main.placementPreview); + Main.Configuration.Put("GoreVisualsAllowed", (object) ChildSafety.Disabled); + Main.Configuration.Put("WorldRollbacksToKeep", (object) Main.WorldRollingBackupsCountToKeep); + Main.Configuration.Put("TeamNameplateDistance", (object) Main.teamNamePlateDistance); + Main.Configuration.Put("MultiplayerNPCSmoothingRange", (object) Main.multiplayerNPCSmoothingRange); + Main.Configuration.Put("VolumeSound", (object) Main.soundVolume); + Main.Configuration.Put("VolumeAmbient", (object) Main.ambientVolume); + Main.Configuration.Put("VolumeMusic", (object) Main.musicVolume); + Main.Configuration.Put("UnlockMusicSwap", (object) Main.TOWMusicUnlocked); + Main.Configuration.Put("UseExperimentalFeatures", (object) Main.UseExperimentalFeatures); + Main.Configuration.Put("Fullscreen", (object) Main.graphics.IsFullScreen); + Main.Configuration.Put("WindowMaximized", (object) Main.screenMaximized); + Main.Configuration.Put("WindowBorderless", (object) Main.screenBorderless); + Main.Configuration.Put("DisplayWidth", (object) Main.graphics.PreferredBackBufferWidth); + Main.Configuration.Put("DisplayHeight", (object) Main.graphics.PreferredBackBufferHeight); + Main.Configuration.Put("GraphicsQuality", (object) Main.qaStyle); + Main.Configuration.Put("BackgroundEnabled", (object) Main.BackgroundEnabled); + Main.Configuration.Put("FrameSkipMode", (object) Main.FrameSkipMode); + Main.Configuration.Put("LightingMode", (object) Lighting.Mode); + Main.Configuration.Put("BackgroundParallax", (object) Main.bgScroll); + Main.Configuration.Put("ShowItemText", (object) Main.showItemText); + Main.Configuration.Put("LastLaunchedVersion", (object) 230); + Main.Configuration.Put("ClientUUID", (object) Main.clientUUID); + Main.Configuration.Put("UseSmartCursorForCommonBlocks", (object) Player.SmartCursorSettings.SmartBlocksEnabled); + Main.Configuration.Put("UseSmartAxeAfterSmartPickaxe", (object) Player.SmartCursorSettings.SmartAxeAfterPickaxe); + Main.Configuration.Put("DisableLeftShiftTrashCan", (object) ItemSlot.Options.DisableLeftShiftTrashCan); + Main.Configuration.Put("HighlightNewItems", (object) ItemSlot.Options.HighlightNewItems); + Main.Configuration.Put("HidePasswords", (object) Main.HidePassword); + Main.Configuration.Put("ReverseUpDownForArmorSetBonuses", (object) Main.ReversedUpDownArmorSetBonuses); + Main.Configuration.Put("MouseShowBuildingGrid", (object) Main.MouseShowBuildingGrid); + Main.Configuration.Put("AllowUnfocusedInputOnGamepad", (object) Main.AllowUnfocusedInputOnGamepad); + Main.Configuration.Put("LockOnPriority", (object) LockOnHelper.UseMode); + Main.Configuration.Put("InvisibleCursorForGamepad", (object) Main.InvisibleCursorForGamepad); + Main.Configuration.Put("GamepadDisableInstructionsDisplay", (object) Main.GamepadDisableInstructionsDisplay); + Main.Configuration.Put("SettingsUnlock_WorldEvil", (object) Main.SettingsUnlock_WorldEvil); + Main.Configuration.Put("SettingsEnabled_MinersWobble", (object) Main.SettingsEnabled_MinersWobble); + Main.Configuration.Put("SettingBlockGamepadsEntirely", (object) Main.SettingBlockGamepadsEntirely); + Main.Configuration.Put("SettingsEnabled_OpaqueBoxBehindTooltips", (object) Main.SettingsEnabled_OpaqueBoxBehindTooltips); + Main.Configuration.Put("SettingDontScaleMainMenuUp", (object) Main.SettingDontScaleMainMenuUp); + Main.Configuration.Put("SettingsEnabled_TilesSwayInWind", (object) Main.SettingsEnabled_TilesSwayInWind); + Main.Configuration.Put("UseStormEffect", (object) Main.UseStormEffects); + Main.Configuration.Put("UseHeatDistortion", (object) Main.UseHeatDistortion); + Main.Configuration.Put("WaveQuality", (object) Main.WaveQuality); + Main.Configuration.Put("Support4K", (object) Main.Support4K); + Main.Configuration.Put("MouseColor", (object) new Dictionary() + { + { + "R", + Main.mouseColor.R + }, + { + "G", + Main.mouseColor.G + }, + { + "B", + Main.mouseColor.B + } + }); + Main.Configuration.Put("MouseBorderColor", (object) new Dictionary() + { + { + "R", + Main.MouseBorderColor.R + }, + { + "G", + Main.MouseBorderColor.G + }, + { + "B", + Main.MouseBorderColor.B + }, + { + "A", + Main.MouseBorderColor.A + } + }); + Main.Configuration.Put("QuickLaunch", (object) Main.SkipAssemblyLoad); + Main.Configuration.Put("Zoom", (object) Main.GameZoomTarget); + Main.Configuration.Put("UIScale", (object) Main._uiScaleWanted); + Main.Configuration.Put("MapScale", (object) Main.MapScale); + if (Main.AssetSourceController != null) + Main.Configuration.Put("ResourcePacks", (object) Main.AssetSourceController.ActiveResourcePackList.ToJson()); + Main.Configuration.Put("FlashIconForEvents", (object) Enum.GetName(typeof (GameNotificationType), (object) Main._flashNotificationType)); + Main.Configuration.Put("Display", (object) Main._windowMover.ScreenDeviceName); + Main.Configuration.Put("DisplayScreen", (object) Main._windowMover.ScreenDeviceName); + Main.Configuration.Put("ThrottleWhenInactive", (object) (Main.instance.InactiveSleepTime != TimeSpan.Zero)); + Main.Configuration.Put("DoorAutoOpeningMode", (object) DoorOpeningHelper.PreferenceSettings); + Main.Configuration.Put("WaterfallDrawLimit", (object) Main.instance.waterfallManager.maxWaterfallCount); + Main.Configuration.Put("DisableIntenseVisualEffects", (object) Main.DisableIntenseVisualEffects); + return Main.Configuration.Save() && PlayerInput.Save(); + } + + protected void CheckBunny() + { + try + { + RegistryKey subKey = Registry.CurrentUser.CreateSubKey("Software\\Terraria"); + if (subKey == null || subKey.GetValue("Bunny") == null || !(subKey.GetValue("Bunny").ToString() == "1")) + return; + Main.runningCollectorsEdition = true; + } + catch + { + Main.runningCollectorsEdition = false; + } + } + + private static void TryPickingDefaultUIScale(float displayHeight) + { + if (!Main.shouldSetDefaultUIScale) + return; + Main.newDefaultUIScale = (float) ((double) displayHeight / 1080.0 * 1.10000002384186); + Main.shouldSetDefaultUIScale = false; + Main.Configuration.Put("UIScale", (object) Main.newDefaultUIScale); + Main.Configuration.Save(); + } + + protected void LoadSettings() + { + if (File.Exists(Main.SavePath + Path.DirectorySeparatorChar.ToString() + "config.dat")) + { + this.OpenLegacySettings(); + if (!Main.SaveSettings()) + return; + File.Delete(Main.SavePath + Path.DirectorySeparatorChar.ToString() + "config.dat"); + } + else + { + Main.Configuration.Load(); + int currentValue1 = 0; + Main.Configuration.Get("LastLaunchedVersion", ref currentValue1); + bool flag = false; + if (currentValue1 < 219) + flag = true; + if (!flag) + { + Main.Configuration.Get("ResetDefaultUIScale", ref Main.shouldSetDefaultUIScale); + Main.Configuration.Get("Fullscreen", ref Main.startFullscreen); + Main.Configuration.Get("WindowMaximized", ref Main.screenMaximized); + Main.Configuration.Get("WindowBorderless", ref Main.screenBorderless); + } + Main.PendingBorderlessState = Main.screenBorderless; + Main.screenBorderlessPendingResizes = Main.screenBorderless ? 6 : 0; + if (!Main.startFullscreen) + { + int preferredBackBufferWidth = Main.graphics.PreferredBackBufferWidth; + int backBufferHeight = Main.graphics.PreferredBackBufferHeight; + Main.Configuration.Get("DisplayWidth", ref preferredBackBufferWidth); + Main.Configuration.Get("DisplayHeight", ref backBufferHeight); + if (Main.PendingBorderlessState) + Main.screenBorderlessPendingResizes = 1; + Main.SetDisplayMode(preferredBackBufferWidth, backBufferHeight, false); + Main.TryPickingDefaultUIScale((float) backBufferHeight); + } + Main.Configuration.Get("SmartCursorToggle", ref Main.cSmartCursorModeIsToggleAndNotHold); + Main.Configuration.Get("MapEnabled", ref Main.mapEnabled); + Main.Configuration.Get("InvasionBarMode", ref Main.invasionProgressMode); + Main.Configuration.Get("AutoSave", ref Main.autoSave); + Main.Configuration.Get("AutoPause", ref Main.autoPause); + Main._needsLanguageSelect = !Main.Configuration.Contains("Language"); + string str = Main.Configuration.Get("Language", "en-US"); + int result1 = 0; + if (int.TryParse(str, out result1)) + { + LanguageManager.Instance.SetLanguage(result1); + this.SetTitle(); + } + else + { + LanguageManager.Instance.SetLanguage(str); + this.SetTitle(); + } + Main.Configuration.Get("PlacementPreview", ref Main.placementPreview); + Main.Configuration.Get("GoreVisualsAllowed", ref ChildSafety.Disabled); + Main.Configuration.Get("DisableIntenseVisualEffects", ref Main.DisableIntenseVisualEffects); + if (!flag) + { + Main.Configuration.Get("VolumeSound", ref Main.soundVolume); + Main.Configuration.Get("VolumeAmbient", ref Main.ambientVolume); + Main.Configuration.Get("VolumeMusic", ref Main.musicVolume); + } + Main.Configuration.Get("KeyFavoriteModifier", ref Main.cFavoriteKey); + Microsoft.Xna.Framework.Input.Keys result2; + if (Enum.TryParse(Main.cFavoriteKey, out result2)) + Main.FavoriteKey = result2; + if (!flag) + { + Main.Configuration.Get("GraphicsQuality", ref Main.qaStyle); + Main.Configuration.Get("BackgroundEnabled", ref Main.BackgroundEnabled); + } + if (Main.Configuration.GetAllKeys().Contains("FrameSkip")) + { + bool currentValue2 = false; + Main.Configuration.Get("FrameSkip", ref currentValue2); + Main.terrariasFixedTiming = !currentValue2; + Main.FrameSkipMode = !Main.terrariasFixedTiming ? 1 : 2; + } + Main.Configuration.Get("FrameSkipMode", ref Main.FrameSkipMode); + if (Main.FrameSkipMode < 0) + Main.FrameSkipMode = 0; + if (Main.FrameSkipMode > 2) + Main.FrameSkipMode = 2; + int mode = (int) Lighting.Mode; + if (!flag) + Main.Configuration.Get("LightingMode", ref mode); + Lighting.Mode = (LightMode) mode; + Main.Configuration.Get("UnlockMusicSwap", ref Main.TOWMusicUnlocked); + Main.Configuration.Get("Parallax", ref Main.caveParallax); + Main.bgScroll = (int) ((1.0 - (double) Main.caveParallax) * 500.0); + Main.Configuration.Get("BackgroundParallax", ref Main.bgScroll); + Main.caveParallax = (float) (1.0 - (double) Main.bgScroll / 500.0); + Main.Configuration.Get("ShowItemText", ref Main.showItemText); + Main.Configuration.Get("ClientUUID", ref Main.clientUUID); + Main.Configuration.Get("UseSmartCursorForCommonBlocks", ref Player.SmartCursorSettings.SmartBlocksEnabled); + Main.Configuration.Get("UseSmartAxeAfterSmartPickaxe", ref Player.SmartCursorSettings.SmartAxeAfterPickaxe); + if (!flag) + Main.Configuration.Get("DisableLeftShiftTrashCan", ref ItemSlot.Options.DisableLeftShiftTrashCan); + Main.Configuration.Get("HidePasswords", ref Main.HidePassword); + Main.Configuration.Get("HighlightNewItems", ref ItemSlot.Options.HighlightNewItems); + Main.Configuration.Get("ReverseUpDownForArmorSetBonuses", ref Main.ReversedUpDownArmorSetBonuses); + Main.Configuration.Get("MouseShowBuildingGrid", ref Main.MouseShowBuildingGrid); + Main.Configuration.Get("AllowUnfocusedInputOnGamepad", ref Main.AllowUnfocusedInputOnGamepad); + Main.Configuration.Get("GamepadDisableInstructionsDisplay", ref Main.GamepadDisableInstructionsDisplay); + Main.Configuration.Get("SettingDontScaleMainMenuUp", ref Main.SettingDontScaleMainMenuUp); + Main.Configuration.Get("WorldRollbacksToKeep", ref Main.WorldRollingBackupsCountToKeep); + Main.Configuration.Get("TeamNameplateDistance", ref Main.teamNamePlateDistance); + if (currentValue1 < 230) + Main.Configuration.Get("MultiplayerNPCSmoothingRange", ref Main.multiplayerNPCSmoothingRange); + Main.Configuration.Get("UseStormEffect", ref Main.UseStormEffects); + Main.Configuration.Get("UseHeatDistortion", ref Main.UseHeatDistortion); + Main.Configuration.Get("WaveQuality", ref Main.WaveQuality); + if (Main.WaveQuality > 3) + Main.WaveQuality = 3; + if (Main.WaveQuality < 0) + Main.WaveQuality = 0; + Dictionary currentValue3 = new Dictionary(); + Main.Configuration.Get>("MouseColor", ref currentValue3); + byte num; + if (currentValue3.TryGetValue("R", out num)) + Main.mouseColor.R = num; + if (currentValue3.TryGetValue("G", out num)) + Main.mouseColor.G = num; + if (currentValue3.TryGetValue("B", out num)) + Main.mouseColor.B = num; + currentValue3.Clear(); + Main.Configuration.Get>("MouseBorderColor", ref currentValue3); + if (currentValue3.TryGetValue("R", out num)) + Main.MouseBorderColor.R = num; + if (currentValue3.TryGetValue("G", out num)) + Main.MouseBorderColor.G = num; + if (currentValue3.TryGetValue("B", out num)) + Main.MouseBorderColor.B = num; + if (currentValue3.TryGetValue("A", out num)) + Main.MouseBorderColor.A = num; + Main.Configuration.Get("QuickLaunch", ref Main.SkipAssemblyLoad); + if (!flag) + Main.GameZoomTarget = Main.Configuration.Get("Zoom", 1f); + if (!flag) + Main.UIScale = Main.Configuration.Get("UIScale", Platform.Get().GetScaling()); + if ((double) Main.newDefaultUIScale > 0.0) + { + Main.UIScale = Main.newDefaultUIScale; + Main.newDefaultUIScale = 0.0f; + } + Main.MapScale = MathHelper.Clamp(Main.Configuration.Get("MapScale", 1f), 0.5f, 1f); + int currentValue4 = -1; + Main.Configuration.Get("LockOnPriority", ref currentValue4); + if (currentValue4 < 0) + currentValue4 = 0; + if (currentValue4 > 2) + currentValue4 = 2; + LockOnHelper.UseMode = (LockOnHelper.LockOnMode) currentValue4; + if (LockOnHelper.UseMode == LockOnHelper.LockOnMode.FocusTarget) + LockOnHelper.UseMode = LockOnHelper.LockOnMode.ThreeDS; + Main.Configuration.Get("InvisibleCursorForGamepad", ref Main.InvisibleCursorForGamepad); + GameNotificationType result3; + if (Enum.TryParse(Main.Configuration.Get("FlashIconForEvents", "All"), out result3)) + Main._flashNotificationType = result3; + if (!flag) + { + string screenDeviceName = Main.Configuration.Get("DisplayScreen", ""); + Main._windowMover.TryMovingToScreen(screenDeviceName); + this.InactiveSleepTime = TimeSpan.FromMilliseconds(Main.Configuration.Get("ThrottleWhenInactive", true) ? 20.0 : 0.0); + } + Form form = (Form) Control.FromHandle(Main.instance.Window.Handle); + if (Main.screenBorderless) + Main.SetBorderlessFormStyle(form); + else if (Main.screenMaximized) + { + form.WindowState = FormWindowState.Maximized; + form.FormBorderStyle = FormBorderStyle.Sizable; + } + else + form.FormBorderStyle = FormBorderStyle.Sizable; + Control.FromHandle(Main.instance.Window.Handle).BringToFront(); + if (!flag) + Main.Configuration.Get("Support4K", ref Main.Support4K); + Main.Configuration.Get("UseExperimentalFeatures", ref Main.UseExperimentalFeatures); + Main.Configuration.Get("SettingsUnlock_WorldEvil", ref Main.SettingsUnlock_WorldEvil); + Main.Configuration.Get("SettingsEnabled_MinersWobble", ref Main.SettingsEnabled_MinersWobble); + Main.Configuration.Get("SettingBlockGamepadsEntirely", ref Main.SettingBlockGamepadsEntirely); + Main.Configuration.Get("SettingsEnabled_OpaqueBoxBehindTooltips", ref Main.SettingsEnabled_OpaqueBoxBehindTooltips); + Main.Configuration.Get("SettingsEnabled_TilesSwayInWind", ref Main.SettingsEnabled_TilesSwayInWind); + int preferenceSettings = (int) DoorOpeningHelper.PreferenceSettings; + Main.Configuration.Get("DoorAutoOpeningMode", ref preferenceSettings); + DoorOpeningHelper.PreferenceSettings = (DoorOpeningHelper.DoorAutoOpeningPreference) preferenceSettings; + if (currentValue1 <= 147) + Main.terrariasFixedTiming = !Main.terrariasFixedTiming; + if (currentValue1 <= 162) + { + bool currentValue5 = false; + uint currentValue6 = 0; + Main.Configuration.Get("ThickMouseEdges", ref currentValue5); + if (currentValue5) + { + Main.Configuration.Get("ThickMouseEdgesPackedColor", ref currentValue6); + Main.MouseBorderColor.PackedValue = currentValue6; + Main.mouseColor.R = Main.Configuration.Get("MouseColorR", Main.mouseColor.R); + Main.mouseColor.G = Main.Configuration.Get("MouseColorG", Main.mouseColor.G); + Main.mouseColor.B = Main.Configuration.Get("MouseColorB", Main.mouseColor.B); + } + } + if (currentValue1 <= 162) + { + Main.Configuration.Get("KeyUp", ref Main.cUp); + Main.Configuration.Get("KeyDown", ref Main.cDown); + Main.Configuration.Get("KeyLeft", ref Main.cLeft); + Main.Configuration.Get("KeyRight", ref Main.cRight); + Main.Configuration.Get("KeyJump", ref Main.cJump); + Main.Configuration.Get("KeyThrowItem", ref Main.cThrowItem); + Main.Configuration.Get("KeyInventory", ref Main.cInv); + Main.Configuration.Get("KeyQuickHeal", ref Main.cHeal); + Main.Configuration.Get("KeyQuickMana", ref Main.cMana); + Main.Configuration.Get("KeyQuickBuff", ref Main.cBuff); + Main.Configuration.Get("KeyUseHook", ref Main.cHook); + Main.Configuration.Get("KeyAutoSelect", ref Main.cTorch); + Main.Configuration.Get("KeySmartCursor", ref Main.cSmart); + Main.Configuration.Get("KeyMount", ref Main.cMount); + Main.Configuration.Get("KeyMapStyle", ref Main.cMapStyle); + Main.Configuration.Get("KeyFullscreenMap", ref Main.cMapFull); + Main.Configuration.Get("KeyMapZoomIn", ref Main.cMapZoomIn); + Main.Configuration.Get("KeyMapZoomOut", ref Main.cMapZoomOut); + Main.Configuration.Get("KeyMapAlphaUp", ref Main.cMapAlphaUp); + Main.Configuration.Get("KeyMapAlphaDown", ref Main.cMapAlphaDown); + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["Up"] = new List() + { + Main.cUp + }; + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["Down"] = new List() + { + Main.cDown + }; + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["Left"] = new List() + { + Main.cLeft + }; + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["Right"] = new List() + { + Main.cRight + }; + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["Jump"] = new List() + { + Main.cJump + }; + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["Throw"] = new List() + { + Main.cThrowItem + }; + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["Inventory"] = new List() + { + Main.cInv + }; + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["QuickHeal"] = new List() + { + Main.cHeal + }; + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["QuickMana"] = new List() + { + Main.cMana + }; + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["QuickBuff"] = new List() + { + Main.cBuff + }; + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["Grapple"] = new List() + { + Main.cHook + }; + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["SmartSelect"] = new List() + { + Main.cTorch + }; + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["SmartCursor"] = new List() + { + Main.cSmart + }; + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["QuickMount"] = new List() + { + Main.cMount + }; + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["MapStyle"] = new List() + { + Main.cMapStyle + }; + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["MapFull"] = new List() + { + Main.cMapFull + }; + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["MapZoomIn"] = new List() + { + Main.cMapZoomIn + }; + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["MapZoomOut"] = new List() + { + Main.cMapZoomOut + }; + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["MapAlphaUp"] = new List() + { + Main.cMapAlphaUp + }; + PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["MapAlphaDown"] = new List() + { + Main.cMapAlphaDown + }; + } + PlayerInput.Load(); + if (currentValue1 < 165) + { + try + { + PlayerInput.ManageVersion_1_3(); + } + catch (Exception ex) + { + } + } + Main.mouseColorSlider.SetHSL(Main.mouseColor); + Main.mouseBorderColorSlider.SetHSL(Main.MouseBorderColor); + Main.mouseBorderColorSlider.Alpha = (float) Main.MouseBorderColor.A / (float) byte.MaxValue; + if (currentValue1 == 230) + return; + Main.SaveSettings(); + } + } + + protected void OpenLegacySettings() + { + try + { + if (!File.Exists(Main.SavePath + Path.DirectorySeparatorChar.ToString() + "config.dat")) + return; + using (FileStream fileStream = new FileStream(Main.SavePath + Path.DirectorySeparatorChar.ToString() + "config.dat", FileMode.Open)) + { + using (BinaryReader binaryReader = new BinaryReader((Stream) fileStream)) + { + int num1 = binaryReader.ReadInt32(); + if (num1 >= 68) + { + if (num1 >= 67) + Main.clientUUID = binaryReader.ReadString(); + bool fullscreen = binaryReader.ReadBoolean(); + Main.mouseColor.R = binaryReader.ReadByte(); + Main.mouseColor.G = binaryReader.ReadByte(); + Main.mouseColor.B = binaryReader.ReadByte(); + Main.soundVolume = binaryReader.ReadSingle(); + if (num1 >= 90) + Main.ambientVolume = binaryReader.ReadSingle(); + Main.musicVolume = binaryReader.ReadSingle(); + Main.cUp = binaryReader.ReadString(); + Main.cDown = binaryReader.ReadString(); + Main.cLeft = binaryReader.ReadString(); + Main.cRight = binaryReader.ReadString(); + Main.cJump = binaryReader.ReadString(); + Main.cThrowItem = binaryReader.ReadString(); + if (num1 >= 1) + Main.cInv = binaryReader.ReadString(); + if (num1 >= 12) + { + Main.cHeal = binaryReader.ReadString(); + Main.cMana = binaryReader.ReadString(); + Main.cBuff = binaryReader.ReadString(); + } + if (num1 >= 13) + Main.cHook = binaryReader.ReadString(); + Main.caveParallax = binaryReader.ReadSingle(); + if (num1 >= 2) + Main.terrariasFixedTiming = binaryReader.ReadBoolean(); + if (num1 >= 91 && binaryReader.ReadBoolean()) + ((Form) Control.FromHandle(this.Window.Handle)).WindowState = FormWindowState.Maximized; + if (num1 >= 4) + Main.SetDisplayMode(binaryReader.ReadInt32(), binaryReader.ReadInt32(), fullscreen); + if (num1 >= 8) + Main.autoSave = binaryReader.ReadBoolean(); + if (num1 >= 9) + Main.autoPause = binaryReader.ReadBoolean(); + if (num1 >= 19) + Main.showItemText = binaryReader.ReadBoolean(); + if (num1 >= 30) + { + Main.cTorch = binaryReader.ReadString(); + Lighting.Mode = (LightMode) binaryReader.ReadByte(); + Main.qaStyle = (int) binaryReader.ReadByte(); + } + if (num1 >= 37) + Main.BackgroundEnabled = binaryReader.ReadBoolean(); + if (num1 >= 39) + { + byte num2 = binaryReader.ReadByte(); + Main._needsLanguageSelect = num2 == (byte) 0; + LanguageManager.Instance.SetLanguage((int) num2); + } + if (num1 >= 46) + { + Main.mapEnabled = binaryReader.ReadBoolean(); + Main.cMapStyle = binaryReader.ReadString(); + Main.cMapFull = binaryReader.ReadString(); + Main.cMapZoomIn = binaryReader.ReadString(); + Main.cMapZoomOut = binaryReader.ReadString(); + Main.cMapAlphaUp = binaryReader.ReadString(); + Main.cMapAlphaDown = binaryReader.ReadString(); + } + if (num1 >= 89) + binaryReader.ReadInt32(); + if (num1 >= 100) + { + Main.cSmart = binaryReader.ReadString(); + Main.cSmartCursorModeIsToggleAndNotHold = binaryReader.ReadBoolean(); + } + if (num1 >= 107) + Main.invasionProgressMode = (int) binaryReader.ReadByte(); + if (num1 >= 111) + Main.placementPreview = binaryReader.ReadBoolean(); + if (num1 >= 111) + Main.placementPreview = binaryReader.ReadBoolean(); + Main.SetFullScreen(fullscreen); + } + binaryReader.Close(); + } + } + } + catch + { + } + } + + private static void ErasePlayer(int i) + { + try + { + FileUtilities.Delete(Main.PlayerList[i].Path, Main.PlayerList[i].IsCloudSave); + FileUtilities.Delete(Main.PlayerList[i].Path + ".bak", Main.PlayerList[i].IsCloudSave); + } + catch + { + } + try + { + string path = Main.PlayerList[i].Path.Substring(0, Main.PlayerList[i].Path.Length - 4); + if (path.Substring(path.Length - 1) != "." && path.Substring(path.Length - 1) != "\\" && Directory.Exists(path)) + Directory.Delete(path, true); + Main.LoadPlayers(); + } + catch + { + } + } + + private static void EraseWorld(int i) + { + try + { + if (!Main.WorldList[i].IsCloudSave) + { + FileOperationAPIWrapper.MoveToRecycleBin(Main.WorldList[i].Path); + FileOperationAPIWrapper.MoveToRecycleBin(Main.WorldList[i].Path + ".bak"); + } + else if (SocialAPI.Cloud != null) + SocialAPI.Cloud.Delete(Main.WorldList[i].Path); + Main.LoadWorlds(); + } + catch + { + } + } + + public static string GetPlayerPathFromName(string playerName, bool cloudSave) + { + char[] invalidFileNameChars = Path.GetInvalidFileNameChars(); + string str1 = ""; + playerName = playerName.Replace(".", "_"); + playerName = playerName.Replace("*", "_"); + for (int index = 0; index < playerName.Length; ++index) + { + char ch1 = playerName[index]; + char ch2 = !((IEnumerable) invalidFileNameChars).Contains(ch1) ? (ch1 != ' ' ? ch1 : '_') : '-'; + str1 += ch2.ToString(); + } + string str2 = cloudSave ? Main.CloudPlayerPath : Main.PlayerPath; + if (FileUtilities.GetFullPath(str2 + Path.DirectorySeparatorChar.ToString() + str1 + ".plr", cloudSave).StartsWith("\\\\.\\", StringComparison.Ordinal)) + str1 += "_"; + string str3 = str2; + char directorySeparatorChar = Path.DirectorySeparatorChar; + string str4 = directorySeparatorChar.ToString(); + string str5 = str1; + if (FileUtilities.Exists(str3 + str4 + str5 + ".plr", cloudSave)) + { + int num = 2; + while (true) + { + object[] objArray = new object[5] + { + (object) str2, + null, + null, + null, + null + }; + directorySeparatorChar = Path.DirectorySeparatorChar; + objArray[1] = (object) directorySeparatorChar.ToString(); + objArray[2] = (object) str1; + objArray[3] = (object) num; + objArray[4] = (object) ".plr"; + if (FileUtilities.Exists(string.Concat(objArray), cloudSave)) + ++num; + else + break; + } + str1 += (string) (object) num; + } + string str6 = str2; + directorySeparatorChar = Path.DirectorySeparatorChar; + string str7 = directorySeparatorChar.ToString(); + string str8 = str1; + return str6 + str7 + str8 + ".plr"; + } + + public static string GetWorldPathFromName(string worldName, bool cloudSave) + { + char[] invalidFileNameChars = Path.GetInvalidFileNameChars(); + string str1 = worldName; + string str2 = ""; + for (int index = 0; index < str1.Length; ++index) + { + char ch1 = str1[index]; + char ch2 = !((IEnumerable) invalidFileNameChars).Contains(ch1) ? (ch1 != ' ' ? ch1 : '_') : '-'; + str2 += ch2.ToString(); + } + string str3 = str2.Replace(".", "_").Replace("*", "_"); + string str4 = cloudSave ? Main.CloudWorldPath : Main.WorldPath; + if (FileUtilities.GetFullPath(str4 + Path.DirectorySeparatorChar.ToString() + str3 + ".wld", cloudSave).StartsWith("\\\\.\\", StringComparison.Ordinal)) + str3 += "_"; + string str5 = str4; + char directorySeparatorChar = Path.DirectorySeparatorChar; + string str6 = directorySeparatorChar.ToString(); + string str7 = str3; + if (FileUtilities.Exists(str5 + str6 + str7 + ".wld", cloudSave)) + { + int num = 2; + while (true) + { + object[] objArray = new object[5] + { + (object) str4, + null, + null, + null, + null + }; + directorySeparatorChar = Path.DirectorySeparatorChar; + objArray[1] = (object) directorySeparatorChar.ToString(); + objArray[2] = (object) str3; + objArray[3] = (object) num; + objArray[4] = (object) ".wld"; + if (FileUtilities.Exists(string.Concat(objArray), cloudSave)) + ++num; + else + break; + } + str3 += (string) (object) num; + } + string str8 = str4; + directorySeparatorChar = Path.DirectorySeparatorChar; + string str9 = directorySeparatorChar.ToString(); + string str10 = str3; + return str8 + str9 + str10 + ".wld"; + } + + public void setServerWorldRollbacks(string rollBacksToKeep) => Main.WorldRollingBackupsCountToKeep = Convert.ToInt32(rollBacksToKeep); + + public void autoCreate(string worldSize) + { + if (worldSize == "0") + Main.autoGen = false; + else if (worldSize == "1") + { + Main.maxTilesX = 4200; + Main.maxTilesY = 1200; + Main.autoGen = true; + } + else if (worldSize == "2") + { + Main.maxTilesX = 6300; + Main.maxTilesY = 1800; + Main.autoGen = true; + } + else + { + if (!(worldSize == "3")) + return; + Main.maxTilesX = 8400; + Main.maxTilesY = 2400; + Main.autoGen = true; + } + } + + public void NewMOTD(string newMOTD) => Main.motd = newMOTD; + + public static string ConvertToSafeArgument(string arg) => Uri.EscapeDataString(arg); + + public static string ConvertFromSafeArgument(string arg) => Uri.UnescapeDataString(arg); + + public void LoadDedConfig(string configPath) + { + if (!File.Exists(configPath)) + return; + using (StreamReader streamReader = new StreamReader(configPath)) + { + string line; + while ((line = streamReader.ReadLine()) != null) + { + try + { + if (line.Length > 6 && line.Substring(0, 6).ToLower() == "world=") + { + string str = line.Substring(6); + Main.autoGenFileLocation = str; + Main.ActiveWorldFileData = WorldFile.GetAllMetadata(Platform.Get().ExpandPathVariables(str), false); + } + if (line.Length > 5 && line.Substring(0, 5).ToLower() == "port=") + { + string str = line.Substring(5); + try + { + Netplay.ListenPort = Convert.ToInt32(str); + } + catch + { + } + } + if (line.Length > 11 && line.Substring(0, 21).ToLower() == "worldrollbackstokeep=") + { + string str = line.Substring(21); + try + { + Main.WorldRollingBackupsCountToKeep = Convert.ToInt32(str); + } + catch + { + } + } + if (line.Length > 11 && line.Substring(0, 11).ToLower() == "maxplayers=") + { + string str = line.Substring(11); + try + { + Main.maxNetPlayers = Convert.ToInt32(str); + } + catch + { + } + } + if (line.Length > 11 && line.Substring(0, 9).ToLower() == "priority=" && !Program.LaunchParameters.ContainsKey("-forcepriority")) + { + string str = line.Substring(9); + try + { + int int32 = Convert.ToInt32(str); + switch (int32) + { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + Process currentProcess = Process.GetCurrentProcess(); + if (int32 == 0) + { + currentProcess.PriorityClass = ProcessPriorityClass.RealTime; + break; + } + if (int32 == 1) + { + currentProcess.PriorityClass = ProcessPriorityClass.High; + break; + } + if (int32 == 2) + { + currentProcess.PriorityClass = ProcessPriorityClass.AboveNormal; + break; + } + if (int32 == 3) + { + currentProcess.PriorityClass = ProcessPriorityClass.Normal; + break; + } + if (int32 == 4) + { + currentProcess.PriorityClass = ProcessPriorityClass.BelowNormal; + break; + } + if (int32 == 5) + { + currentProcess.PriorityClass = ProcessPriorityClass.Idle; + break; + } + break; + } + } + catch + { + } + } + if (line.Length > 9 && line.Substring(0, 9).ToLower() == "password=") + Netplay.ServerPassword = Main.ConvertFromSafeArgument(line.Substring(9)); + if (line.Length > 5 && line.Substring(0, 5).ToLower() == "motd=") + Main.motd = line.Substring(5); + if (line.Length > 5 && line.Substring(0, 5).ToLower() == "lang=") + { + string str = line.Substring(5); + LanguageManager.Instance.SetLanguage(Convert.ToInt32(str)); + } + if (line.Length > 5 && line.Substring(0, 5).ToLower() == "language=") + { + string cultureName = line.Substring(9); + LanguageManager.Instance.SetLanguage(cultureName); + } + if (line.Length >= 10 && line.Substring(0, 10).ToLower() == "worldpath=") + { + string str = line.Substring(10); + Main.WorldPath = Platform.Get().ExpandPathVariables(str); + } + if (line.Length >= 10 && line.Substring(0, 10).ToLower() == "worldname=") + Main.worldName = line.Substring(10); + if (line.Length >= 5 && line.Substring(0, 5).ToLower() == "seed=") + Main.AutogenSeedName = line.Substring(5); + if (line.Length > 8 && line.Substring(0, 8).ToLower() == "banlist=") + { + string str = line.Substring(8); + Netplay.BanFilePath = Platform.Get().ExpandPathVariables(str); + } + if (line.Length > 11 && line.Substring(0, 11).ToLower() == "difficulty=") + { + string str = line.Substring(11); + if (str == "0") + Main.GameMode = 0; + else if (str == "1") + Main.GameMode = 1; + else if (str == "2") + Main.GameMode = 2; + else if (str == "3") + Main.GameMode = 3; + } + if (line.Length > 11 && line.Substring(0, 11).ToLower() == "autocreate=") + { + string str = line.Substring(11); + if (str == "0") + Main.autoGen = false; + else if (str == "1") + { + Main.maxTilesX = 4200; + Main.maxTilesY = 1200; + Main.autoGen = true; + } + else if (str == "2") + { + Main.maxTilesX = 6300; + Main.maxTilesY = 1800; + Main.autoGen = true; + } + else if (str == "3") + { + Main.maxTilesX = 8400; + Main.maxTilesY = 2400; + Main.autoGen = true; + } + } + if (line.Length > 7 && line.Substring(0, 7).ToLower() == "secure=" && line.Substring(7) == "1") + Netplay.SpamCheck = true; + if (line.Length > 5 && line.Substring(0, 5).ToLower() == "upnp=" && line.Substring(5) != "1") + Netplay.UseUPNP = false; + string str1 = "slowliquids="; + if (line.Length > str1.Length && line.Substring(0, str1.Length).ToLower() == str1 && line.Substring(str1.Length) == "1") + Main.Setting_UseReducedMaxLiquids = true; + if (line.Length > 10 && line.Substring(0, 10).ToLower() == "npcstream=") + { + string str2 = line.Substring(10); + try + { + Main.npcStreamSpeed = Convert.ToInt32(str2); + } + catch + { + } + } + CreativePowerManager.TryListingPermissionsFrom(line); + } + catch + { + } + } + } + } + + public void SetNetPlayers(int mPlayers) => Main.maxNetPlayers = mPlayers; + + public void SetWorld(string world, bool cloud) => Main.ActiveWorldFileData = WorldFile.GetAllMetadata(world, cloud); + + public void SetWorldName(string world) => Main.worldName = world; + + public void EnableAutoShutdown() => Main.autoShutdown = true; + + [DllImport("user32.dll")] + public static extern IntPtr FindWindow(string lpClassName, string lpWindowName); + + [DllImport("user32.dll")] + private static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); + + public void AutoPass() => Main.autoPass = true; + + public void AutoJoin(string IP) + { + Main.defaultIP = IP; + Main.getIP = IP; + Netplay.SetRemoteIP(Main.defaultIP); + Main.autoJoin = true; + } + + public void AutoHost() + { + Main.menuMultiplayer = true; + Main.menuServer = true; + Main.ClearPendingPlayerSelectCallbacks(); + Main.menuMode = 1; + } + + public void loadLib(string path) + { + Main.libPath = path; + Main.LoadLibrary(Main.libPath); + } + + public void NeverSleep() => this.previousExecutionState = Main.NativeMethods.SetThreadExecutionState(2147483649U); + + public void YouCanSleepNow() + { + if (this.previousExecutionState == 0U) + return; + int num = (int) Main.NativeMethods.SetThreadExecutionState(this.previousExecutionState); + } + + public void DedServ() + { + this.NeverSleep(); + Main.rand = new UnifiedRandom(); + if (Main.autoShutdown) + { + string lpWindowName = "terraria" + (object) Main.rand.Next(int.MaxValue); + Console.Title = lpWindowName; + IntPtr window = Main.FindWindow((string) null, lpWindowName); + if (window != IntPtr.Zero) + Main.ShowWindow(window, 0); + } + else + Console.Title = "Terraria Server " + Main.versionNumber2; + Main.dedServ = true; + Main.showSplash = false; + this.Initialize(); +label_126: + if (Main.worldPathName != null) + goto label_127; +label_5: + bool flag1 = true; + while (flag1) + { + Main.LoadWorlds(); + Console.WriteLine(Language.GetTextValue("CLI.Server", (object) Main.versionNumber2)); + Console.WriteLine(""); + for (int index = 0; index < Main.WorldList.Count; ++index) + Console.WriteLine((index + 1).ToString() + "\t\t" + Main.WorldList[index].Name); + string textValue1 = Language.GetTextValue("CLI.NewWorld_Command"); + string textValue2 = Language.GetTextValue("CLI.DeleteWorld_Example"); + int num1 = (Math.Max(Main.newWorldName.Length, textValue2.Length) + 1) / 8 + 1; + string str1 = textValue1 + new string('\t', num1 - textValue1.Length / 8) + Language.GetTextValue("CLI.NewWorld_Description"); + string str2 = textValue2 + new string('\t', num1 - textValue2.Length / 8) + Language.GetTextValue("CLI.DeleteWorld_Description"); + Console.WriteLine(str1); + Console.WriteLine(str2); + Console.WriteLine(""); + Console.Write(Language.GetTextValue("CLI.ChooseWorld")); + string str3 = Console.ReadLine() ?? ""; + try + { + Console.Clear(); + } + catch + { + } + if (str3.StartsWith(Language.GetTextValue("CLI.DeleteWorld_Command") + " ")) + { + try + { + int length = Language.GetTextValue("CLI.DeleteWorld_Command").Length; + int num2 = Convert.ToInt32(str3.Substring(length + 1)) - 1; + if (num2 < Main.WorldList.Count) + { + Console.WriteLine(Language.GetTextValue("CLI.Server", (object) Main.versionNumber2)); + Console.WriteLine(""); + Console.WriteLine(Language.GetTextValue("CLI.DeleteConfirmation", (object) Main.WorldList[num2].Name)); + Console.Write("({0}/{1}): ", (object) Language.GetTextValue("CLI.ShortYes"), (object) Language.GetTextValue("CLI.ShortNo")); + if (Console.ReadLine().ToLower() == Language.GetTextValue("CLI.ShortYes").ToLower()) + Main.EraseWorld(num2); + } + } + catch + { + } + try + { + Console.Clear(); + } + catch + { + } + } + else + { + if (!(str3 == "n")) + { + if (!(str3 == "N")) + { + try + { + int index = Convert.ToInt32(str3) - 1; + if (index >= 0) + { + if (index < Main.WorldList.Count) + { + bool flag2 = true; + while (flag2) + { + Console.WriteLine(Language.GetTextValue("CLI.Server", (object) Main.versionNumber2)); + Console.WriteLine(""); + Console.Write(Language.GetTextValue("CLI.SetInitialMaxPlayers")); + string str4 = Console.ReadLine(); + try + { + if (str4 == "") + str4 = "16"; + int int32 = Convert.ToInt32(str4); + if (int32 <= (int) byte.MaxValue && int32 >= 1) + { + Main.maxNetPlayers = int32; + flag2 = false; + } + flag2 = false; + } + catch + { + } + try + { + Console.Clear(); + } + catch + { + } + } + bool flag3 = true; + while (flag3) + { + Console.WriteLine(Language.GetTextValue("CLI.Server", (object) Main.versionNumber2)); + Console.WriteLine(""); + Console.Write(Language.GetTextValue("CLI.SetInitialPort")); + string str5 = Console.ReadLine(); + try + { + if (str5 == "") + str5 = "7777"; + int int32 = Convert.ToInt32(str5); + if (int32 <= (int) ushort.MaxValue) + { + Netplay.ListenPort = int32; + flag3 = false; + } + } + catch + { + } + try + { + Console.Clear(); + } + catch + { + } + } + bool flag4 = true; + while (flag4) + { + Console.WriteLine(Language.GetTextValue("CLI.Server", (object) Main.versionNumber2)); + Console.WriteLine(""); + Console.Write(Language.GetTextValue("CLI.AutomaticPortForward", (object) Language.GetTextValue("CLI.ShortYes"), (object) Language.GetTextValue("CLI.ShortNo"))); + string str6 = Console.ReadLine(); + try + { + if (str6 == "" || str6.ToLower() == Language.GetTextValue("CLI.ShortYes").ToLower() || str6.ToLower() == Language.GetTextValue("CLI.Yes").ToLower()) + { + Netplay.UseUPNP = true; + flag4 = false; + } + else + { + if (!(str6.ToLower() == Language.GetTextValue("CLI.ShortNo").ToLower())) + { + if (!(str6.ToLower() == Language.GetTextValue("CLI.No").ToLower())) + goto label_117; + } + Netplay.UseUPNP = false; + flag4 = false; + } + } + catch + { + } +label_117: + try + { + Console.Clear(); + } + catch + { + } + } + Console.WriteLine(Language.GetTextValue("CLI.Server", (object) Main.versionNumber2)); + Console.WriteLine(""); + Console.Write(Language.GetTextValue("CLI.EnterServerPassword")); + Netplay.ServerPassword = Console.ReadLine(); + Main.ActiveWorldFileData = Main.WorldList[index]; + flag1 = false; + try + { + Console.Clear(); + continue; + } + catch + { + continue; + } + } + else + continue; + } + else + continue; + } + catch + { + continue; + } + } + } + bool flag5 = true; + while (flag5) + { + Console.WriteLine(Language.GetTextValue("CLI.Server", (object) Main.versionNumber2)); + Console.WriteLine(""); + Console.WriteLine("1\t" + Language.GetTextValue("UI.WorldSizeSmall")); + Console.WriteLine("2\t" + Language.GetTextValue("UI.WorldSizeMedium")); + Console.WriteLine("3\t" + Language.GetTextValue("UI.WorldSizeLarge")); + Console.WriteLine(""); + Console.Write(Language.GetTextValue("CLI.ChooseSize")); + string str7 = Console.ReadLine(); + try + { + switch (Convert.ToInt32(str7)) + { + case 1: + Main.maxTilesX = 4200; + Main.maxTilesY = 1200; + flag5 = false; + break; + case 2: + Main.maxTilesX = 6400; + Main.maxTilesY = 1800; + flag5 = false; + break; + case 3: + Main.maxTilesX = 8400; + Main.maxTilesY = 2400; + flag5 = false; + break; + } + } + catch + { + } + try + { + Console.Clear(); + } + catch + { + } + } + bool flag6 = true; + while (flag6) + { + Console.WriteLine(Language.GetTextValue("CLI.Server", (object) Main.versionNumber2)); + Console.WriteLine(""); + Console.WriteLine("1\t" + Language.GetTextValue("UI.Normal")); + Console.WriteLine("2\t" + Language.GetTextValue("UI.Expert")); + Console.WriteLine("3\t" + Language.GetTextValue("UI.Master")); + Console.WriteLine("4\t" + Language.GetTextValue("UI.Creative")); + Console.WriteLine(""); + Console.Write(Language.GetTextValue("CLI.ChooseDifficulty")); + string str8 = Console.ReadLine(); + try + { + switch (Convert.ToInt32(str8)) + { + case 1: + Main.GameMode = 0; + flag6 = false; + break; + case 2: + Main.GameMode = 1; + flag6 = false; + break; + case 3: + Main.GameMode = 2; + flag6 = false; + break; + case 4: + Main.GameMode = 3; + flag6 = false; + break; + } + } + catch + { + } + try + { + Console.Clear(); + } + catch + { + } + } + if (Main.SettingsUnlock_WorldEvil) + { + bool flag7 = true; + while (flag7) + { + Console.WriteLine(Language.GetTextValue("CLI.Server", (object) Main.versionNumber2)); + Console.WriteLine(""); + Console.WriteLine("1\t" + Language.GetTextValue("CLI.Random")); + Console.WriteLine("2\t" + Language.GetTextValue("CLI.Corrupt")); + Console.WriteLine("3\t" + Language.GetTextValue("CLI.Crimson")); + Console.WriteLine(""); + Console.Write(Language.GetTextValue("CLI.ChooseEvil")); + string str9 = Console.ReadLine(); + try + { + switch (Convert.ToInt32(str9)) + { + case 1: + WorldGen.WorldGenParam_Evil = -1; + flag7 = false; + break; + case 2: + WorldGen.WorldGenParam_Evil = 0; + flag7 = false; + break; + case 3: + WorldGen.WorldGenParam_Evil = 1; + flag7 = false; + break; + } + } + catch + { + } + try + { + Console.Clear(); + } + catch + { + } + } + } + bool flag8 = true; + while (flag8) + { + Console.WriteLine(Language.GetTextValue("CLI.Server", (object) Main.versionNumber2)); + Console.WriteLine(""); + Console.Write(Language.GetTextValue("CLI.EnterWorldName")); + Main.newWorldName = Console.ReadLine(); + if (Main.newWorldName != "" && Main.newWorldName != " " && Main.newWorldName != null) + flag8 = false; + try + { + Console.Clear(); + } + catch + { + } + } + string str10 = ""; + bool flag9 = true; + while (flag9) + { + Console.WriteLine(Language.GetTextValue("CLI.Server", (object) Main.versionNumber2)); + Console.WriteLine(""); + Console.Write(Language.GetTextValue("CLI.EnterSeed")); + str10 = Console.ReadLine(); + if (str10 != null) + flag9 = false; + else + str10 = ""; + try + { + Console.Clear(); + } + catch + { + } + } + Main.worldName = Main.newWorldName; + Main.ActiveWorldFileData = WorldFile.CreateMetadata(Main.worldName, SocialAPI.Cloud != null && SocialAPI.Cloud.EnabledByDefault, Main.GameMode); + string seedText = str10.Trim(); + if (seedText.Length == 0) + Main.ActiveWorldFileData.SetSeedToRandom(); + else + Main.ActiveWorldFileData.SetSeed(seedText); + Main.menuMode = 10; + GenerationProgress progress = new GenerationProgress(); + Task newWorld = WorldGen.CreateNewWorld(progress); + while (Main.menuMode == 10) + { + if (Main.oldStatusText != Main.statusText && !WorldGen.drunkWorldGen) + { + Main.oldStatusText = Main.statusText; + Console.WriteLine(Main.statusText); + } + } + try + { + Console.Clear(); + } + catch + { + } + while (!newWorld.IsCompleted) + { + Main.statusText = string.Format("{0:0.0%} - " + progress.Message + " - {1:0.0%}", (object) progress.TotalProgress, (object) progress.Value); + if (Main.oldStatusText != Main.statusText) + { + Main.oldStatusText = Main.statusText; + Console.WriteLine(Main.statusText); + } + } + } + } + goto label_126; +label_127: + if (!(Main.worldPathName == "")) + { + try + { + Console.Clear(); + } + catch + { + } + Task task = WorldGen.serverLoadWorld(); + Console.WriteLine(Language.GetTextValue("CLI.Server", (object) Main.versionNumber)); + Console.WriteLine(""); + while (!task.IsCompleted) + { + if (WorldFile.LastThrownLoadException == null) + { + if ((double) Main.AutogenProgress.TotalProgress != 0.0) + Main.statusText = string.Format("{0:0.0%} - " + Main.AutogenProgress.Message + " - {1:0.0%}", (object) Main.AutogenProgress.TotalProgress, (object) Main.AutogenProgress.Value); + if (Main.oldStatusText != Main.statusText) + { + Main.oldStatusText = Main.statusText; + Console.WriteLine(Main.statusText); + } + } + } + try + { + if (WorldFile.LastThrownLoadException == null) + Console.Clear(); + } + catch + { + } + if (WorldGen.loadFailed || !WorldGen.loadSuccess) + { + Main.WriteFancyWorldLoadErrorToConsole(); + if (!Main.autoShutdown) + Console.ReadKey(); + this.YouCanSleepNow(); + } + else + { + Console.WriteLine(Language.GetTextValue("CLI.Server", (object) Main.versionNumber)); + Console.WriteLine(""); + Console.WriteLine(Language.GetTextValue("CLI.ListeningOnPort", (object) Netplay.ListenPort)); + Console.WriteLine(Language.GetTextValue("CLI.HelpHint")); + Console.WriteLine(""); + Console.Title = "Terraria Server: " + Main.worldName; + Stopwatch stopwatch = new Stopwatch(); + if (!Main.autoShutdown) + Main.startDedInput(); + stopwatch.Start(); + double num3 = 50.0 / 3.0; + double num4 = 0.0; + int num5 = 0; + new Stopwatch().Start(); + Netplay.StartServer(); + Main.gameMenu = false; + while (!Netplay.Disconnect) + { + TimeSpan elapsed = stopwatch.Elapsed; + double totalMilliseconds = elapsed.TotalMilliseconds; + if (totalMilliseconds + num4 >= num3) + { + ++num5; + num4 += totalMilliseconds - num3; + stopwatch.Reset(); + stopwatch.Start(); + if (Main.oldStatusText != Main.statusText) + { + Main.oldStatusText = Main.statusText; + Console.WriteLine(Main.statusText); + } + if (Netplay.HasClients) + this.Update(new GameTime()); + else if (Main.saveTime.IsRunning) + Main.saveTime.Stop(); + if (Main.OnTickForThirdPartySoftwareOnly != null) + Main.OnTickForThirdPartySoftwareOnly(); + elapsed = stopwatch.Elapsed; + double num6 = elapsed.TotalMilliseconds + num4; + if (num6 < num3) + { + int num7 = (int) (num3 - num6) - 1; + if (num7 > 1) + { + Thread.Sleep(num7 - 1); + if (!Netplay.HasClients) + { + num4 = 0.0; + Thread.Sleep(10); + } + } + } + } + Thread.Sleep(0); + } + this.YouCanSleepNow(); + } + } + else + goto label_5; + } + + private static void WriteFancyWorldLoadErrorToConsole() + { + Console.WriteLine(); + Console.WriteLine(WorldFile.LastThrownLoadException.ToString()); + } + + public static void startDedInput() => new Thread(new ThreadStart(Main.startDedInputCallBack)) + { + IsBackground = true, + Name = "Server Input Thread" + }.Start(); + + public static void startDedInputCallBack() + { + while (!Netplay.Disconnect) + { + Console.Write(": "); + string str1 = Console.ReadLine(); + string str2 = str1; + string lower1 = str1.ToLower(); + try + { + if (lower1 == Language.GetTextValue("CLI.Help_Command")) + { + Console.WriteLine(Language.GetTextValue("CLI.AvailableCommands")); + Console.WriteLine(""); + List stringList = new List() + { + "Help", + "Playing", + "Clear", + "Exit", + "ExitNoSave", + "Save", + "Kick", + "Ban", + "Password", + "SetPassword", + "Version", + "Time", + "Port", + "MaxPlayers", + "Say", + "MOTD", + "SetMOTD", + "Dawn", + "Noon", + "Dusk", + "Midnight", + "Settle", + "Seed" + }; + int num1 = 0; + for (int index = 0; index < stringList.Count; ++index) + { + string str3 = Language.Exists("CLI." + stringList[index] + "_Example") ? Language.GetTextValue("CLI." + stringList[index] + "_Example") : Language.GetTextValue("CLI." + stringList[index] + "_Command"); + if (str3.Length > num1) + num1 = str3.Length; + } + int num2 = (num1 + 1) / 8; + for (int index = 0; index < stringList.Count; ++index) + { + string str4 = Language.Exists("CLI." + stringList[index] + "_Example") ? Language.GetTextValue("CLI." + stringList[index] + "_Example") : Language.GetTextValue("CLI." + stringList[index] + "_Command"); + Console.WriteLine(str4 + new string('\t', num2 - str4.Length / 8) + Language.GetTextValue("CLI." + stringList[index] + "_Description")); + } + } + else if (lower1 == Language.GetTextValue("CLI.Settle_Command")) + { + if (!Terraria.Liquid.panicMode) + Terraria.Liquid.StartPanic(); + else + Console.WriteLine(Language.GetTextValue("CLI.WaterIsAlreadySettling")); + } + else if (lower1 == Language.GetTextValue("CLI.Dawn_Command")) + { + Main.dayTime = true; + Main.time = 0.0; + NetMessage.SendData(7); + } + else if (lower1 == Language.GetTextValue("CLI.Dusk_Command")) + { + Main.dayTime = false; + Main.time = 0.0; + NetMessage.SendData(7); + } + else if (lower1 == Language.GetTextValue("CLI.Noon_Command")) + { + Main.dayTime = true; + Main.time = 27000.0; + NetMessage.SendData(7); + } + else if (lower1 == Language.GetTextValue("CLI.Midnight_Command")) + { + Main.dayTime = false; + Main.time = 16200.0; + NetMessage.SendData(7); + } + else if (lower1 == Language.GetTextValue("CLI.ExitNoSave_Command")) + Netplay.Disconnect = true; + else if (lower1 == Language.GetTextValue("CLI.Exit_Command")) + { + WorldFile.SaveWorld(); + Netplay.Disconnect = true; + SocialAPI.Shutdown(); + } + else if (lower1 == Language.GetTextValue("CLI.FPS_Command")) + { + if (!Main.dedServFPS) + { + Main.dedServFPS = true; + Main.fpsTimer.Reset(); + } + else + { + Main.dedServCount1 = 0; + Main.dedServCount2 = 0; + Main.dedServFPS = false; + } + } + else if (lower1 == Language.GetTextValue("CLI.Save_Command")) + WorldFile.SaveWorld(); + else if (lower1 == Language.GetTextValue("CLI.Time_Command")) + { + string textValue = Language.GetTextValue("GameUI.TimeAtMorning"); + double time = Main.time; + if (!Main.dayTime) + time += 54000.0; + double num3 = time / 86400.0 * 24.0 - 7.5 - 12.0; + if (num3 < 0.0) + num3 += 24.0; + if (num3 >= 12.0) + textValue = Language.GetTextValue("GameUI.TimePastMorning"); + int num4 = (int) num3; + double num5 = (double) (int) ((num3 - (double) num4) * 60.0); + string str5 = string.Concat((object) num5); + if (num5 < 10.0) + str5 = "0" + str5; + if (num4 > 12) + num4 -= 12; + if (num4 == 0) + num4 = 12; + Console.WriteLine(Language.GetTextValue("CLI.Time", (object) (num4.ToString() + ":" + str5 + " " + textValue))); + } + else if (lower1 == Language.GetTextValue("CLI.MaxPlayers_Command")) + Console.WriteLine(Language.GetTextValue("CLI.PlayerLimit", (object) Main.maxNetPlayers)); + else if (lower1 == Language.GetTextValue("CLI.Port_Command")) + Console.WriteLine(Language.GetTextValue("CLI.Port", (object) Netplay.ListenPort)); + else if (lower1 == Language.GetTextValue("CLI.Version_Command")) + Console.WriteLine(Language.GetTextValue("CLI.Server", (object) Main.versionNumber)); + else if (lower1 == Language.GetTextValue("CLI.Clear_Command")) + { + try + { + Console.Clear(); + } + catch + { + } + } + else if (lower1 == Language.GetTextValue("CLI.Playing_Command")) + { + int num = 0; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active) + { + ++num; + Console.WriteLine(Main.player[index].name + " (" + (object) Netplay.Clients[index].Socket.GetRemoteAddress() + ")"); + } + } + switch (num) + { + case 0: + Console.WriteLine(Language.GetTextValue("CLI.NoPlayers")); + continue; + case 1: + Console.WriteLine(Language.GetTextValue("CLI.OnePlayerConnected")); + continue; + default: + Console.WriteLine(Language.GetTextValue("CLI.PlayersConnected", (object) num)); + continue; + } + } + else if (!(lower1 == "")) + { + if (lower1 == Language.GetTextValue("CLI.MOTD_Command")) + { + if (Main.motd == "") + Console.WriteLine(Language.GetTextValue("CLI.NoMOTD", (object) Main.worldName)); + else + Console.WriteLine(Language.GetTextValue("CLI.MOTD", (object) Main.motd)); + } + else if (lower1.StartsWith(Language.GetTextValue("CLI.SetMOTD_Command") + " ")) + Main.motd = str2.Substring(Language.GetTextValue("CLI.SetMOTD_Command").Length + 1); + else if (lower1 == Language.GetTextValue("CLI.Password_Command")) + { + if (Netplay.ServerPassword == "") + Console.WriteLine(Language.GetTextValue("CLI.NoPassword")); + else + Console.WriteLine(Language.GetTextValue("CLI.Password", (object) Netplay.ServerPassword)); + } + else if (lower1.StartsWith(Language.GetTextValue("CLI.SetPassword_Command") + " ")) + { + string str6 = str2.Substring(Language.GetTextValue("CLI.SetPassword_Command").Length + 1); + if (str6 == "") + { + Netplay.ServerPassword = ""; + Console.WriteLine(Language.GetTextValue("CLI.PasswordDisabled")); + } + else + { + Netplay.ServerPassword = str6; + Console.WriteLine(Language.GetTextValue("CLI.PasswordSet", (object) Netplay.ServerPassword)); + } + } + else if (lower1 == Language.GetTextValue("CLI.Say_Command")) + Console.WriteLine(Language.GetTextValue("CLI.Say_Usage")); + else if (lower1.StartsWith(Language.GetTextValue("CLI.Say_Command") + " ")) + { + int length = Language.GetTextValue("CLI.Say_Command").Length; + if (lower1.Length <= length + 1) + { + Console.WriteLine(Language.GetTextValue("CLI.Say_Usage")); + } + else + { + string str7 = str2.Substring(length + 1); + Console.WriteLine(Language.GetTextValue("CLI.ServerMessage", (object) str7)); + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("CLI.ServerMessage", (object) str7), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 240, 20)); + } + } + else if (lower1 == Language.GetTextValue("CLI.Kick_Command")) + Console.WriteLine(Language.GetTextValue("CLI.Kick_Usage")); + else if (lower1.StartsWith(Language.GetTextValue("CLI.Kick_Command") + " ")) + { + int length = Language.GetTextValue("CLI.Kick_Command").Length; + if (lower1.Length <= length + 1) + { + Console.WriteLine(Language.GetTextValue("CLI.Kick_Usage")); + } + else + { + string lower2 = lower1.Substring(length + 1).ToLower(); + for (int remoteClient = 0; remoteClient < (int) byte.MaxValue; ++remoteClient) + { + if (Main.player[remoteClient].active && Main.player[remoteClient].name.ToLower() == lower2) + NetMessage.SendData(2, remoteClient, text: NetworkText.FromKey("CLI.KickMessage")); + } + } + } + else if (lower1 == Language.GetTextValue("CLI.Seed_Command")) + { + if (Main.ActiveWorldFileData == null || !Main.ActiveWorldFileData.HasValidSeed) + Console.WriteLine(Language.GetTextValue("CLI.NoValidSeed")); + else + Console.WriteLine(Language.GetTextValue("CLI.DisplaySeed", (object) Main.ActiveWorldFileData.GetFullSeedText())); + } + else if (lower1 == Language.GetTextValue("CLI.Ban_Command")) + Console.WriteLine(Language.GetTextValue("CLI.Ban_Usage")); + else if (lower1.StartsWith(Language.GetTextValue("CLI.Ban_Command") + " ")) + { + int length = Language.GetTextValue("CLI.Ban_Command").Length; + if (lower1.Length <= length + 1) + { + Console.WriteLine(Language.GetTextValue("CLI.Ban_Usage")); + } + else + { + string lower3 = lower1.Substring(4).ToLower(); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && Main.player[index].name.ToLower() == lower3) + { + Netplay.AddBan(index); + NetMessage.SendData(2, index, text: NetworkText.FromKey("CLI.BanMessage")); + } + } + } + } + else + Console.WriteLine(Language.GetTextValue("CLI.InvalidCommand")); + } + } + catch + { + Console.WriteLine(Language.GetTextValue("CLI.InvalidCommand")); + } + } + } + + public static void Sundialing() + { + if (Main.sundialCooldown != 0) + return; + if (Main.netMode == 1) + { + NetMessage.SendData(51, number: Main.myPlayer, number2: 3f); + } + else + { + Main.fastForwardTime = true; + Main.sundialCooldown = 8; + NetMessage.SendData(7); + } + } + + public static void UpdateTimeRate() + { + if (Main.fastForwardTime) + { + Main.dayRate = 60; + Main.desiredWorldTilesUpdateRate = 1; + } + else + { + int num1 = CreativePowerManager.Instance.GetPower().Enabled ? 1 : 0; + int targetTimeRate = CreativePowerManager.Instance.GetPower().TargetTimeRate; + bool flag = Main.CurrentFrameFlags.SleepingPlayersCount == Main.CurrentFrameFlags.ActivePlayersCount && Main.CurrentFrameFlags.SleepingPlayersCount > 0; + int num2 = targetTimeRate; + if (!Main.gameMenu & flag) + num2 *= 5; + if (num1 != 0) + num2 = 0; + Main.dayRate = num2; + Main.desiredWorldTilesUpdateRate = num2; + } + } + + public Main() + { + Main.instance = this; + Main.UnpausedUpdateSeed = (ulong) Guid.NewGuid().GetHashCode(); + Main.Configuration.Load(); + Main.graphics = new GraphicsDeviceManager(this as Game); + this.Content.RootDirectory = "Content"; + } + + private static void SetDisplayMonitor() + { + Main.Configuration.Get("Display", ""); + Main.graphics.PreparingDeviceSettings += new EventHandler(Main.SetMonitorOnce); + } + + private static void SetMonitorOnce(object sender, PreparingDeviceSettingsEventArgs e) + { + string displayName = Main.Configuration.Get("Display", ""); + GraphicsAdapter graphicsAdapter = GraphicsAdapter.Adapters.Where((Func) (adapter => adapter.DeviceName == displayName)).FirstOrDefault(); + if (graphicsAdapter != null) + e.GraphicsDeviceInformation.Adapter = graphicsAdapter; + Main.graphics.PreparingDeviceSettings -= new EventHandler(Main.SetMonitorOnce); + } + + protected void SetTitle() + { + this._cachedTitle = Lang.GetRandomGameTitle(); + Platform.Get().SetUnicodeTitle(this.Window, this._cachedTitle); + } + + private static void SetTileValue() + { + Main.tileOreFinderPriority[28] = (short) 100; + Main.tileOreFinderPriority[407] = (short) 150; + Main.tileOreFinderPriority[404] = (short) 150; + Main.tileOreFinderPriority[7] = (short) 200; + Main.tileOreFinderPriority[166] = (short) 210; + Main.tileOreFinderPriority[6] = (short) 220; + Main.tileOreFinderPriority[167] = (short) 230; + Main.tileOreFinderPriority[9] = (short) 240; + Main.tileOreFinderPriority[168] = (short) 250; + Main.tileOreFinderPriority[8] = (short) 260; + Main.tileOreFinderPriority[169] = (short) 270; + Main.tileOreFinderPriority[22] = (short) 300; + Main.tileOreFinderPriority[204] = (short) 310; + Main.tileOreFinderPriority[37] = (short) 400; + Main.tileOreFinderPriority[21] = (short) 500; + Main.tileOreFinderPriority[467] = (short) 500; + Main.tileOreFinderPriority[441] = (short) 500; + Main.tileOreFinderPriority[468] = (short) 500; + Main.tileOreFinderPriority[107] = (short) 600; + Main.tileOreFinderPriority[221] = (short) 610; + Main.tileOreFinderPriority[108] = (short) 620; + Main.tileOreFinderPriority[222] = (short) 630; + Main.tileOreFinderPriority[111] = (short) 640; + Main.tileOreFinderPriority[223] = (short) 650; + Main.tileOreFinderPriority[211] = (short) 700; + Main.tileOreFinderPriority[227] = (short) 750; + Main.tileOreFinderPriority[12] = (short) 800; + Main.tileOreFinderPriority[236] = (short) 810; + } + + private static void ResetGameCounter() => Main._gameUpdateCount = 0U; + + protected override void Initialize() + { + Main.musicFade[50] = 1f; + for (int index = 0; index < 10; ++index) + { + Main.recentWorld[index] = ""; + Main.recentIP[index] = ""; + Main.recentPort[index] = 0; + } + if (Main.rand == null) + Main.rand = new UnifiedRandom((int) DateTime.Now.Ticks); + this.SetTitle(); + Main.lo = Main.rand.Next(6); + this.waterfallManager = new WaterfallManager(); + Main._windowMover = new WindowStateController(); + Main.sittingManager = new AnchoredEntitiesCollection(); + Main.sleepingManager = new AnchoredEntitiesCollection(); + Main.gameTips = new GameTipsDisplay(); + if (Main.player[Main.myPlayer] == null) + Main.player[Main.myPlayer] = new Player(); + ContentSamples.Initialize(); + PlayerInput.Initialize(); + Main.player[Main.myPlayer] = new Player(); + WorldGen.Hooks.OnWorldLoad += (Action) (() => + { + Main.AmbienceServer = new AmbienceServer(); + Main.LocalGolfState = new GolfState(); + Lighting.Clear(); + }); + PlayerInput.OnActionableInput += (Action) (() => + { + if (Main.LocalGolfState == null) + return; + Main.LocalGolfState.CancelBallTracking(); + }); + Main.SceneMetrics = new SceneMetrics(Main.ActiveWorld); + TimeLogger.Initialize(); + this.LoadContent_TryEnteringHiDef(); + this.ClientInitialize(); + base.Initialize(); + } + + private void Initialize_AlmostEverything() + { + this.TilePaintSystem = new TilePaintSystemV2(); + this.TilesRenderer = new TileDrawing(this.TilePaintSystem); + this.WallsRenderer = new WallDrawing(this.TilePaintSystem); + CreativePowerManager.Initialize(); + Main.LocalFavoriteData.Load(); + Main.CloudFavoritesData.Load(); + this.Initialize_Entities(); + Main.FindAnnouncementBoxStatus(); + CustomCurrencyManager.Initialize(); + WingStatsInitializer.Load(); + TileObjectData.Initialize(); + Animation.Initialize(); + Chest.Initialize(); + Wiring.Initialize(); + Framing.Initialize(); + ItemRarity.Initialize(); + TileEntity.InitializeAll(); + Projectile.InitializeStaticThings(); + TorchID.Initialize(); + Main.InitializeItemAnimations(); + BestiaryDatabase database1 = new BestiaryDatabase(); + new BestiaryDatabaseNPCsPopulator().Populate(database1); + Main.BestiaryDB = database1; + ContentSamples.RebuildBestiarySortingIDsByBestiaryDatabaseContents(database1); + Main.BestiaryTracker = new BestiaryUnlocksTracker(); + ItemDropDatabase database2 = new ItemDropDatabase(); + database2.Populate(); + Main.ItemDropsDB = database2; + database1.Merge(Main.ItemDropsDB); + Main.PylonSystem = new TeleportPylonsSystem(); + Main.ItemDropSolver = new ItemDropResolver(database2); + Main.ShopHelper = new ShopHelper(); + CreativeItemSacrificesCatalog.Instance.Initialize(); + Main.BestiaryUI = new UIBestiaryTest(Main.BestiaryDB); + Main.ContentThatNeedsRenderTargets.Add((INeedRenderTargetContent) Main.MapPlayerRenderer); + Lighting.Initialize(); + MapHelper.Initialize(); + WorldGen.RandomizeBackgrounds(Main.rand); + if (Main.treeBGSet1[0] == 173) + WorldGen.RandomizeBackgrounds(Main.rand); + if (Main.treeBGSet1[0] == 173) + WorldGen.RandomizeBackgrounds(Main.rand); + WorldGen.RandomizeCaveBackgrounds(); + WorldGen.Hooks.Initialize(); + WorldGen.Hooks.OnWorldLoad += new Action(Main.ResetGameCounter); + Main.bgAlphaFrontLayer[0] = 1f; + Main.bgAlphaFarBackLayer[0] = 1f; + this.invBottom = 258; + Main.Initialize_TileAndNPCData1(); + Main.Initialize_TileAndNPCData2(); + Main.Initialize_Items(); + for (int index = 0; index < Recipe.maxRecipes; ++index) + { + Main.recipe[index] = new Recipe(); + Main.availableRecipeY[index] = (float) (65 * index); + } + Recipe.SetupRecipes(); + ContentSamples.FixItemsAfterRecipesAreAdded(); + for (int index = 0; index < Terraria.Liquid.maxLiquid; ++index) + Main.liquid[index] = new Terraria.Liquid(); + for (int index = 0; index < 50000; ++index) + Main.liquidBuffer[index] = new LiquidBuffer(); + this.shop[0] = new Chest(); + Chest.SetupTravelShop(); + for (int type = 1; type < 100; ++type) + { + this.shop[type] = new Chest(); + this.shop[type].SetupShop(type); + } + Main.teamColor[0] = Microsoft.Xna.Framework.Color.White; + Main.teamColor[1] = new Microsoft.Xna.Framework.Color(218, 59, 59); + Main.teamColor[2] = new Microsoft.Xna.Framework.Color(59, 218, 85); + Main.teamColor[3] = new Microsoft.Xna.Framework.Color(59, 149, 218); + Main.teamColor[4] = new Microsoft.Xna.Framework.Color(242, 221, 100); + Main.teamColor[5] = new Microsoft.Xna.Framework.Color(224, 100, 242); + for (int Type = 1; Type < 950; ++Type) + { + Projectile projectile = new Projectile(); + projectile.SetDefaults(Type); + if (projectile.hostile) + Main.projHostile[Type] = true; + if (projectile.aiStyle == 7) + Main.projHook[Type] = true; + } + Netplay.Initialize(); + NetworkInitializer.Load(); + ChatInitializer.Load(); + if (Main.menuMode == 1) + Main.LoadPlayers(); + if (Main.skipMenu) + { + WorldGen.clearWorld(); + Main.gameMenu = false; + Main.LoadPlayers(); + Main.PlayerList[0].SetAsActive(); + Main.LoadWorlds(); + WorldGen.GenerateWorld(new UnifiedRandom().Next()); + WorldGen.EveryTileFrame(); + Main.player[Main.myPlayer].Spawn(PlayerSpawnContext.SpawningIntoWorld); + Main.ActivePlayerFileData.StartPlayTimer(); + Player.Hooks.EnterWorld(Main.myPlayer); + } + else + { + IntPtr systemMenu = Main.GetSystemMenu(this.Window.Handle, false); + Main.RemoveMenu(systemMenu, Main.GetMenuItemCount(systemMenu) - 1, 1024); + } + SoundID.FillAccessMap(); + Star.SpawnStars(); + ItemSorting.SetupWhiteLists(); + } + + private void Initialize_Entities() + { + for (int index = 0; index < Main.maxMenuItems; ++index) + this.menuItemScale[index] = 0.8f; + for (int index = 0; index < 6001; ++index) + { + Main.dust[index] = new Dust(); + Main.dust[index].dustIndex = index; + } + for (int index = 0; index < 401; ++index) + Main.item[index] = new Item(); + for (int index = 0; index < 201; ++index) + { + Main.npc[index] = new NPC(); + Main.npc[index].whoAmI = index; + } + for (int index = 0; index < 256; ++index) + Main.player[index] = new Player(); + for (int index = 0; index < 1001; ++index) + Main.projectile[index] = new Projectile(); + for (int index = 0; index < 601; ++index) + Main.gore[index] = new Gore(); + for (int index = 0; index < Main.maxRain + 1; ++index) + Main.rain[index] = new Rain(); + for (int index = 0; index < 200; ++index) + Main.cloud[index] = new Cloud(); + for (int index = 0; index < 100; ++index) + Main.combatText[index] = new CombatText(); + for (int index = 0; index < 20; ++index) + Main.popupText[index] = new PopupText(); + } + + private static void Initialize_Items() + { + for (int Type = 0; Type < 5045; ++Type) + { + Item obj = new Item(); + obj.SetDefaults(Type); + if (obj.headSlot > 0) + Item.headType[obj.headSlot] = obj.type; + if (obj.bodySlot > 0) + Item.bodyType[obj.bodySlot] = obj.type; + if (obj.legSlot > 0) + Item.legType[obj.legSlot] = obj.type; + switch (obj.type) + { + case 683: + case 723: + case 726: + case 739: + case 740: + case 741: + case 742: + case 743: + case 744: + case 788: + case 1296: + case 1308: + case 1326: + case 1444: + case 1445: + case 1446: + case 1801: + case 1930: + case 1931: + case 2188: + case 2750: + case 3006: + case 3051: + case 3209: + case 3210: + case 3377: + case 3476: + case 3569: + case 3571: + case 3787: + case 3852: + case 3870: + case 4062: + Item.staff[obj.type] = true; + break; + case 1827: + case 3245: + Item.claw[obj.type] = true; + break; + } + } + } + + private static void Initialize_TileAndNPCData2() + { + Main.critterCage = true; + for (int index = 0; index < 3600; ++index) + Main.AnimateTiles_CritterCages(); + Main.critterCage = false; + Main.tileBlockLight[549] = true; + Main.tileBrick[477] = true; + Main.tileSolid[477] = true; + Main.tileBlockLight[477] = true; + Main.tileBrick[492] = true; + Main.tileSolid[492] = true; + Main.tileBlockLight[492] = true; + Main.tileBrick[1] = true; + Main.tileBrick[54] = true; + Main.tileBrick[118] = true; + Main.tileBrick[119] = true; + Main.tileBrick[120] = true; + Main.tileBrick[121] = true; + Main.tileBrick[122] = true; + Main.tileBrick[140] = true; + Main.tileBrick[148] = true; + Main.tileBrick[150] = true; + Main.tileBrick[151] = true; + Main.tileBrick[152] = true; + Main.tileBrick[30] = true; + Main.tileBrick[38] = true; + Main.tileBrick[39] = true; + Main.tileBrick[41] = true; + Main.tileBrick[43] = true; + Main.tileBrick[44] = true; + Main.tileBrick[481] = true; + Main.tileBrick[482] = true; + Main.tileBrick[483] = true; + Main.tileBrick[45] = true; + Main.tileBrick[46] = true; + Main.tileBrick[47] = true; + Main.tileBrick[75] = true; + Main.tileBrick[76] = true; + Main.tileBrick[160] = true; + Main.tileBrick[2] = true; + Main.tileBrick[199] = true; + Main.tileBrick[23] = true; + Main.tileBrick[60] = true; + Main.tileBrick[70] = true; + Main.tileBrick[109] = true; + Main.tileBrick[53] = true; + Main.tileBrick[116] = true; + Main.tileBrick[234] = true; + Main.tileBrick[112] = true; + Main.tileBrick[147] = true; + Main.tileBrick[153] = true; + Main.tileBrick[154] = true; + Main.tileBrick[155] = true; + Main.tileBrick[156] = true; + Main.tileBrick[157] = true; + Main.tileBrick[158] = true; + Main.tileBrick[159] = true; + Main.tileBrick[273] = true; + Main.tileBrick[274] = true; + Main.tileMergeDirt[202] = true; + Main.tileBrick[202] = true; + Main.tileSolid[202] = true; + Main.tileBlockLight[202] = true; + Main.tileMergeDirt[498] = true; + Main.tileBrick[161] = true; + Main.tileBlockLight[161] = true; + Main.tileBlockLight[163] = true; + Main.tileBlockLight[164] = true; + Main.tileSolid[188] = true; + Main.tileBlockLight[188] = true; + Main.tileBrick[188] = true; + Main.tileMergeDirt[188] = true; + Main.tileBrick[179] = true; + Main.tileSolid[179] = true; + Main.tileBlockLight[179] = true; + Main.tileMoss[179] = true; + Main.tileBrick[381] = true; + Main.tileSolid[381] = true; + Main.tileBlockLight[381] = true; + Main.tileMoss[381] = true; + Main.tileBrick[534] = true; + Main.tileSolid[534] = true; + Main.tileBlockLight[534] = true; + Main.tileMoss[534] = true; + Main.tileBrick[536] = true; + Main.tileSolid[536] = true; + Main.tileBlockLight[536] = true; + Main.tileMoss[536] = true; + Main.tileBrick[539] = true; + Main.tileSolid[539] = true; + Main.tileBlockLight[539] = true; + Main.tileMoss[539] = true; + Main.tileBrick[180] = true; + Main.tileSolid[180] = true; + Main.tileBlockLight[180] = true; + Main.tileMoss[180] = true; + Main.tileBrick[181] = true; + Main.tileSolid[181] = true; + Main.tileBlockLight[181] = true; + Main.tileMoss[181] = true; + Main.tileBrick[182] = true; + Main.tileSolid[182] = true; + Main.tileBlockLight[182] = true; + Main.tileMoss[182] = true; + Main.tileBrick[183] = true; + Main.tileSolid[183] = true; + Main.tileBlockLight[183] = true; + Main.tileMoss[183] = true; + Main.tileBrick[512] = true; + Main.tileSolid[512] = true; + Main.tileBlockLight[512] = true; + Main.tileBrick[513] = true; + Main.tileSolid[513] = true; + Main.tileBlockLight[513] = true; + Main.tileBrick[514] = true; + Main.tileSolid[514] = true; + Main.tileBlockLight[514] = true; + Main.tileBrick[515] = true; + Main.tileSolid[515] = true; + Main.tileBlockLight[515] = true; + Main.tileBrick[516] = true; + Main.tileSolid[516] = true; + Main.tileBlockLight[516] = true; + Main.tileBrick[517] = true; + Main.tileSolid[517] = true; + Main.tileBlockLight[517] = true; + Main.tileLighted[517] = true; + Main.tileBrick[535] = true; + Main.tileSolid[535] = true; + Main.tileBlockLight[535] = true; + Main.tileLighted[535] = true; + Main.tileBrick[537] = true; + Main.tileSolid[537] = true; + Main.tileBlockLight[537] = true; + Main.tileLighted[537] = true; + Main.tileBrick[540] = true; + Main.tileSolid[540] = true; + Main.tileBlockLight[540] = true; + Main.tileLighted[540] = true; + Main.tileLighted[592] = true; + Main.tileMergeDirt[177] = true; + Main.tileMergeDirt[190] = true; + Main.tileSolid[196] = true; + Main.tileSolid[197] = true; + Main.tileMergeDirt[197] = true; + Main.tileBlockLight[197] = true; + Main.tileNoSunLight[197] = true; + Main.tileBrick[175] = true; + Main.tileSolid[175] = true; + Main.tileBlockLight[175] = true; + Main.tileBrick[176] = true; + Main.tileSolid[176] = true; + Main.tileBlockLight[176] = true; + Main.tileBrick[177] = true; + Main.tileSolid[177] = true; + Main.tileBlockLight[177] = true; + Main.tileBrick[225] = true; + Main.tileBrick[229] = true; + Main.tileShine[221] = 925; + Main.tileShine[222] = 875; + Main.tileShine[223] = 825; + Main.tileShine2[221] = true; + Main.tileShine2[222] = true; + Main.tileShine2[223] = true; + Main.tileMergeDirt[175] = true; + Main.tileMergeDirt[176] = true; + Main.tileMergeDirt[177] = true; + Main.tileMergeDirt[208] = true; + Main.tileBrick[162] = true; + Main.tileSolid[162] = true; + Main.tileBlockLight[162] = false; + Main.tileBrick[163] = true; + Main.tileSolid[163] = true; + Main.tileBrick[164] = true; + Main.tileSolid[164] = true; + Main.tileShine2[6] = true; + Main.tileShine2[7] = true; + Main.tileShine2[8] = true; + Main.tileShine2[9] = true; + Main.tileShine2[166] = true; + Main.tileShine2[167] = true; + Main.tileShine2[168] = true; + Main.tileShine2[169] = true; + Main.tileShine2[12] = true; + Main.tileShine2[21] = true; + Main.tileShine2[467] = true; + Main.tileShine2[441] = true; + Main.tileShine2[468] = true; + Main.tileShine2[22] = true; + Main.tileShine2[25] = true; + Main.tileShine2[45] = true; + Main.tileShine2[46] = true; + Main.tileShine2[47] = true; + Main.tileShine2[63] = true; + Main.tileShine2[64] = true; + Main.tileShine2[65] = true; + Main.tileShine2[66] = true; + Main.tileShine2[67] = true; + Main.tileShine2[68] = true; + Main.tileShine2[566] = true; + Main.tileShine2[107] = true; + Main.tileShine2[108] = true; + Main.tileShine2[111] = true; + Main.tileShine2[121] = true; + Main.tileShine2[122] = true; + Main.tileShine2[117] = true; + Main.tileShine2[211] = true; + Main.tileShine[129] = 300; + Main.tileNoFail[81] = true; + Main.tileCracked[481] = true; + Main.tileCracked[482] = true; + Main.tileCracked[483] = true; + Main.tileNoFail[481] = true; + Main.tileNoFail[482] = true; + Main.tileNoFail[483] = true; + Main.tileNoFail[330] = true; + Main.tileNoFail[331] = true; + Main.tileNoFail[332] = true; + Main.tileNoFail[333] = true; + Main.tileNoFail[254] = true; + Main.tileNoFail[324] = true; + Main.tileNoFail[129] = true; + Main.tileNoFail[192] = true; + Main.tileHammer[26] = true; + Main.tileHammer[31] = true; + Main.tileAxe[5] = true; + Main.tileAxe[72] = true; + Main.tileAxe[80] = true; + Main.tileAxe[488] = true; + Main.tileAxe[323] = true; + Main.tileAxe[596] = true; + Main.tileAxe[616] = true; + Main.tileAxe[589] = true; + Main.tileAxe[584] = true; + Main.tileAxe[588] = true; + Main.tileAxe[586] = true; + Main.tileAxe[587] = true; + Main.tileAxe[585] = true; + Main.tileAxe[583] = true; + Main.tileBrick[59] = true; + Main.tileBrick[234] = true; + Main.tileSolid[234] = true; + Main.tileMergeDirt[234] = true; + Main.tileSand[53] = true; + Main.tileSand[112] = true; + Main.tileSand[116] = true; + Main.tileSand[234] = true; + Main.tileFrameImportant[571] = true; + Main.tileLavaDeath[571] = true; + Main.tileFrameImportant[579] = true; + Main.tileLavaDeath[579] = true; + Main.tileFrameImportant[591] = true; + Main.tileLavaDeath[591] = true; + Main.tileFrameImportant[592] = true; + Main.tileLavaDeath[592] = false; + Main.tileFrameImportant[538] = true; + Main.tileLavaDeath[538] = true; + Main.tileFrameImportant[544] = true; + Main.tileLavaDeath[544] = true; + Main.tileFrameImportant[550] = true; + Main.tileLavaDeath[550] = true; + Main.tileFrameImportant[551] = true; + Main.tileLavaDeath[551] = true; + Main.tileFrameImportant[533] = true; + Main.tileLavaDeath[533] = true; + Main.tileFrameImportant[553] = true; + Main.tileLavaDeath[553] = true; + Main.tileFrameImportant[554] = true; + Main.tileLavaDeath[554] = true; + Main.tileFrameImportant[555] = true; + Main.tileLavaDeath[555] = true; + Main.tileFrameImportant[556] = true; + Main.tileLavaDeath[556] = true; + Main.tileFrameImportant[558] = true; + Main.tileLavaDeath[558] = true; + Main.tileFrameImportant[559] = true; + Main.tileLavaDeath[559] = true; + Main.tileFrameImportant[599] = true; + Main.tileLavaDeath[599] = true; + Main.tileFrameImportant[600] = true; + Main.tileLavaDeath[600] = true; + Main.tileFrameImportant[601] = true; + Main.tileLavaDeath[601] = true; + Main.tileFrameImportant[602] = true; + Main.tileLavaDeath[602] = true; + Main.tileFrameImportant[603] = true; + Main.tileLavaDeath[603] = true; + Main.tileFrameImportant[604] = true; + Main.tileLavaDeath[604] = true; + Main.tileFrameImportant[605] = true; + Main.tileLavaDeath[605] = true; + Main.tileFrameImportant[606] = true; + Main.tileLavaDeath[606] = true; + Main.tileFrameImportant[607] = true; + Main.tileLavaDeath[607] = true; + Main.tileFrameImportant[608] = true; + Main.tileLavaDeath[608] = true; + Main.tileFrameImportant[609] = true; + Main.tileLavaDeath[609] = true; + Main.tileFrameImportant[610] = true; + Main.tileLavaDeath[610] = true; + Main.tileFrameImportant[611] = true; + Main.tileLavaDeath[611] = true; + Main.tileFrameImportant[612] = true; + Main.tileLavaDeath[612] = true; + Main.tileFrameImportant[568] = true; + Main.tileNoAttach[568] = true; + Main.tileLavaDeath[568] = true; + Main.tileLighted[568] = true; + Main.tileFrameImportant[569] = true; + Main.tileNoAttach[569] = true; + Main.tileLavaDeath[569] = true; + Main.tileLighted[569] = true; + Main.tileFrameImportant[570] = true; + Main.tileNoAttach[570] = true; + Main.tileLavaDeath[570] = true; + Main.tileLighted[570] = true; + Main.tileFrameImportant[580] = true; + Main.tileNoAttach[580] = true; + Main.tileLavaDeath[580] = true; + Main.tileLighted[580] = true; + Main.tileFrameImportant[582] = true; + Main.tileLavaDeath[582] = true; + Main.tileLighted[582] = true; + Main.tileFrameImportant[619] = true; + Main.tileLavaDeath[619] = true; + Main.tileLighted[619] = true; + Main.tileFrameImportant[620] = true; + Main.tileNoAttach[620] = true; + Main.tileLavaDeath[620] = true; + Main.tileLighted[620] = true; + Main.tileFrameImportant[572] = true; + Main.tileNoAttach[572] = true; + Main.tileLavaDeath[572] = true; + Main.tileLighted[572] = true; + Main.tileFrameImportant[560] = true; + Main.tileLavaDeath[560] = true; + Main.tileFrameImportant[564] = true; + Main.tileNoAttach[564] = true; + Main.tileLavaDeath[564] = true; + Main.tileLighted[564] = true; + Main.tileFrameImportant[567] = true; + Main.tileLavaDeath[567] = true; + Main.tileFrameImportant[565] = true; + Main.tileNoAttach[565] = true; + Main.tileLavaDeath[565] = true; + Main.tileFrameImportant[593] = true; + Main.tileNoAttach[593] = true; + Main.tileLavaDeath[593] = false; + Main.tileLighted[593] = true; + Main.tileFrameImportant[594] = true; + Main.tileNoAttach[594] = true; + Main.tileLavaDeath[594] = false; + Main.tileLighted[594] = true; + Main.tileLighted[548] = true; + Main.tileLighted[613] = true; + Main.tileLighted[614] = true; + Main.tileFrameImportant[518] = true; + Main.tileCut[518] = true; + Main.tileNoFail[518] = true; + Main.tileFrameImportant[519] = true; + Main.tileCut[519] = true; + Main.tileNoFail[519] = true; + Main.tileLighted[519] = true; + Main.tileFrameImportant[549] = true; + Main.tileCut[549] = true; + Main.tileNoFail[549] = true; + Main.tileFrameImportant[529] = true; + Main.tileCut[529] = true; + Main.tileNoFail[529] = true; + Main.tileLavaDeath[529] = true; + Main.tileFrameImportant[530] = true; + Main.tileNoFail[530] = true; + Main.tileLavaDeath[530] = true; + Main.tileFrameImportant[233] = true; + Main.tileFrameImportant[485] = true; + Main.tileLighted[215] = true; + Main.tileFrameImportant[227] = true; + Main.tileFrameImportant[228] = true; + Main.tileFrameImportant[231] = true; + Main.tileCut[231] = true; + Main.tileFrameImportant[216] = true; + Main.tileFrameImportant[217] = true; + Main.tileFrameImportant[218] = true; + Main.tileFrameImportant[219] = true; + Main.tileFrameImportant[220] = true; + Main.tileFrameImportant[338] = true; + Main.tileFrameImportant[453] = true; + Main.tileFrameImportant[456] = true; + Main.tileFrameImportant[165] = true; + Main.tileFrameImportant[209] = true; + Main.tileFrameImportant[215] = true; + Main.tileFrameImportant[210] = true; + Main.tileFrameImportant[212] = true; + Main.tileFrameImportant[207] = true; + Main.tileFrameImportant[178] = true; + Main.tileFrameImportant[184] = true; + Main.tileFrameImportant[185] = true; + Main.tileFrameImportant[186] = true; + Main.tileFrameImportant[187] = true; + Main.tileFrameImportant[173] = true; + Main.tileFrameImportant[174] = true; + Main.tileLighted[173] = true; + Main.tileLighted[174] = true; + Main.tileFrameImportant[139] = true; + Main.tileLighted[160] = true; + Main.tileLighted[149] = true; + Main.tileFrameImportant[149] = true; + Main.tileFrameImportant[142] = true; + Main.tileFrameImportant[143] = true; + Main.tileFrameImportant[144] = true; + Main.tileStone[131] = true; + Main.tileFrameImportant[136] = true; + Main.tileFrameImportant[137] = true; + Main.tileFrameImportant[138] = true; + Main.tileFrameImportant[484] = true; + Main.tileLavaDeath[484] = true; + Main.tileNoFail[484] = true; + Main.tileBlockLight[137] = true; + Main.tileSolid[137] = true; + Main.tileBlockLight[160] = true; + Main.tileSolid[160] = true; + Main.tileMergeDirt[160] = true; + Main.tileBlockLight[161] = true; + Main.tileSolid[161] = true; + Main.tileBlockLight[145] = true; + Main.tileSolid[145] = true; + Main.tileMergeDirt[145] = true; + Main.tileBlockLight[146] = true; + Main.tileSolid[146] = true; + Main.tileMergeDirt[146] = true; + Main.tileBlockLight[147] = true; + Main.tileSolid[147] = true; + Main.tileBlockLight[148] = true; + Main.tileSolid[148] = true; + Main.tileMergeDirt[148] = true; + Main.tileSolid[138] = true; + Main.tileSolid[484] = true; + Main.tileCut[484] = true; + Main.tileBlockLight[140] = true; + Main.tileSolid[140] = true; + Main.tileBlockLight[151] = true; + Main.tileSolid[151] = true; + Main.tileMergeDirt[151] = true; + Main.tileBlockLight[152] = true; + Main.tileSolid[152] = true; + Main.tileMergeDirt[152] = true; + Main.tileBlockLight[153] = true; + Main.tileSolid[153] = true; + Main.tileMergeDirt[153] = true; + Main.tileBlockLight[154] = true; + Main.tileSolid[154] = true; + Main.tileMergeDirt[154] = true; + Main.tileBlockLight[155] = true; + Main.tileSolid[155] = true; + Main.tileMergeDirt[155] = true; + Main.tileBlockLight[156] = true; + Main.tileSolid[156] = true; + Main.tileMergeDirt[156] = true; + Main.tileMergeDirt[150] = true; + Main.tileBlockLight[157] = true; + Main.tileSolid[157] = true; + Main.tileMergeDirt[157] = true; + Main.tileBlockLight[158] = true; + Main.tileSolid[158] = true; + Main.tileMergeDirt[158] = true; + Main.tileBlockLight[159] = true; + Main.tileSolid[159] = true; + Main.tileMergeDirt[159] = true; + Main.tileFrameImportant[320] = true; + Main.tileFrameImportant[49] = true; + Main.tileShine[22] = 1150; + Main.tileShine[6] = 1150; + Main.tileShine[7] = 1100; + Main.tileShine[8] = 1000; + Main.tileShine[9] = 1050; + Main.tileShine[166] = 1125; + Main.tileShine[167] = 1075; + Main.tileShine[168] = 1025; + Main.tileShine[169] = 975; + Main.tileShine[617] = 400; + Main.tileShine[178] = 500; + Main.tileShine2[178] = true; + Main.tileShine[12] = 300; + Main.tileShine[21] = 1200; + Main.tileShine[467] = 1200; + Main.tileShine[441] = 1200; + Main.tileShine[468] = 1200; + Main.tileShine[63] = 900; + Main.tileShine[64] = 900; + Main.tileShine[65] = 900; + Main.tileShine[66] = 900; + Main.tileShine[67] = 900; + Main.tileShine[68] = 900; + Main.tileShine[566] = 900; + Main.tileShine[45] = 1900; + Main.tileShine[46] = 2000; + Main.tileShine[47] = 2100; + Main.tileShine[122] = 1800; + Main.tileShine[121] = 1850; + Main.tileShine[125] = 600; + Main.tileShine[109] = 9000; + Main.tileShine[110] = 9000; + Main.tileShine[116] = 9000; + Main.tileShine[117] = 9000; + Main.tileShine[118] = 8000; + Main.tileShine[107] = 950; + Main.tileShine[108] = 900; + Main.tileShine[111] = 850; + Main.tileShine[211] = 500; + Main.tileLighted[4] = true; + Main.tileLighted[17] = true; + Main.tileLighted[133] = true; + Main.tileLighted[31] = true; + Main.tileLighted[33] = true; + Main.tileLighted[34] = true; + Main.tileLighted[35] = true; + Main.tileLighted[37] = true; + Main.tileLighted[42] = true; + Main.tileLighted[49] = true; + Main.tileLighted[58] = true; + Main.tileLighted[61] = true; + Main.tileLighted[70] = true; + Main.tileLighted[71] = true; + Main.tileLighted[72] = true; + Main.tileLighted[76] = true; + Main.tileLighted[77] = true; + Main.tileLighted[19] = true; + Main.tileLighted[22] = true; + Main.tileLighted[26] = true; + Main.tileLighted[83] = true; + Main.tileLighted[84] = true; + Main.tileLighted[92] = true; + Main.tileLighted[93] = true; + Main.tileLighted[95] = true; + Main.tileLighted[98] = true; + Main.tileLighted[100] = true; + Main.tileLighted[109] = true; + Main.tileLighted[125] = true; + Main.tileLighted[126] = true; + Main.tileLighted[129] = true; + Main.tileLighted[140] = true; + Main.tileLighted[270] = true; + Main.tileLighted[271] = true; + Main.tileLighted[581] = true; + Main.tileLighted[578] = true; + Main.tileMergeDirt[1] = true; + Main.tileMergeDirt[6] = true; + Main.tileMergeDirt[7] = true; + Main.tileMergeDirt[8] = true; + Main.tileMergeDirt[9] = true; + Main.tileMergeDirt[166] = true; + Main.tileMergeDirt[167] = true; + Main.tileMergeDirt[168] = true; + Main.tileMergeDirt[169] = true; + Main.tileMergeDirt[22] = true; + Main.tileMergeDirt[25] = true; + Main.tileMergeDirt[30] = true; + Main.tileMergeDirt[37] = true; + Main.tileMergeDirt[38] = true; + Main.tileMergeDirt[40] = true; + Main.tileMergeDirt[53] = true; + Main.tileMergeDirt[56] = true; + Main.tileMergeDirt[107] = true; + Main.tileMergeDirt[108] = true; + Main.tileMergeDirt[111] = true; + Main.tileMergeDirt[112] = true; + Main.tileMergeDirt[116] = true; + Main.tileMergeDirt[117] = true; + Main.tileMergeDirt[123] = true; + Main.tileMergeDirt[140] = true; + Main.tileMergeDirt[39] = true; + Main.tileMergeDirt[122] = true; + Main.tileMergeDirt[121] = true; + Main.tileMergeDirt[120] = true; + Main.tileMergeDirt[119] = true; + Main.tileMergeDirt[118] = true; + Main.tileMergeDirt[47] = true; + Main.tileMergeDirt[46] = true; + Main.tileMergeDirt[45] = true; + Main.tileMergeDirt[41] = true; + Main.tileMergeDirt[43] = true; + Main.tileMergeDirt[44] = true; + Main.tileMergeDirt[481] = true; + Main.tileMergeDirt[482] = true; + Main.tileMergeDirt[483] = true; + Main.tileFrameImportant[380] = true; + Main.tileFrameImportant[201] = true; + Main.tileFrameImportant[3] = true; + Main.tileFrameImportant[4] = true; + Main.tileFrameImportant[5] = true; + Main.tileFrameImportant[10] = true; + Main.tileFrameImportant[11] = true; + Main.tileFrameImportant[12] = true; + Main.tileFrameImportant[13] = true; + Main.tileFrameImportant[14] = true; + Main.tileFrameImportant[469] = true; + Main.tileFrameImportant[486] = true; + Main.tileFrameImportant[488] = true; + Main.tileFrameImportant[487] = true; + Main.tileFrameImportant[489] = true; + Main.tileFrameImportant[490] = true; + Main.tileFrameImportant[15] = true; + Main.tileFrameImportant[497] = true; + Main.tileFrameImportant[16] = true; + Main.tileFrameImportant[17] = true; + Main.tileFrameImportant[18] = true; + Main.tileFrameImportant[19] = true; + Main.tileFrameImportant[20] = true; + Main.tileFrameImportant[21] = true; + Main.tileFrameImportant[467] = true; + Main.tileFrameImportant[441] = true; + Main.tileFrameImportant[468] = true; + Main.tileFrameImportant[24] = true; + Main.tileFrameImportant[26] = true; + Main.tileFrameImportant[27] = true; + Main.tileFrameImportant[28] = true; + Main.tileFrameImportant[29] = true; + Main.tileFrameImportant[31] = true; + Main.tileFrameImportant[33] = true; + Main.tileFrameImportant[34] = true; + Main.tileFrameImportant[35] = true; + Main.tileFrameImportant[42] = true; + Main.tileFrameImportant[50] = true; + Main.tileFrameImportant[55] = true; + Main.tileFrameImportant[61] = true; + Main.tileFrameImportant[71] = true; + Main.tileFrameImportant[72] = true; + Main.tileFrameImportant[73] = true; + Main.tileFrameImportant[74] = true; + Main.tileFrameImportant[77] = true; + Main.tileFrameImportant[78] = true; + Main.tileFrameImportant[79] = true; + Main.tileFrameImportant[81] = true; + Main.tileFrameImportant[82] = true; + Main.tileFrameImportant[83] = true; + Main.tileFrameImportant[84] = true; + Main.tileFrameImportant[85] = true; + Main.tileFrameImportant[86] = true; + Main.tileFrameImportant[87] = true; + Main.tileFrameImportant[88] = true; + Main.tileFrameImportant[89] = true; + Main.tileFrameImportant[90] = true; + Main.tileFrameImportant[91] = true; + Main.tileFrameImportant[92] = true; + Main.tileFrameImportant[93] = true; + Main.tileFrameImportant[94] = true; + Main.tileFrameImportant[95] = true; + Main.tileFrameImportant[96] = true; + Main.tileFrameImportant[97] = true; + Main.tileFrameImportant[98] = true; + Main.tileFrameImportant[99] = true; + Main.tileFrameImportant[101] = true; + Main.tileFrameImportant[102] = true; + Main.tileFrameImportant[103] = true; + Main.tileFrameImportant[104] = true; + Main.tileFrameImportant[105] = true; + Main.tileFrameImportant[100] = true; + Main.tileFrameImportant[106] = true; + Main.tileFrameImportant[110] = true; + Main.tileFrameImportant[113] = true; + Main.tileFrameImportant[114] = true; + Main.tileFrameImportant[125] = true; + Main.tileFrameImportant[287] = true; + Main.tileFrameImportant[126] = true; + Main.tileFrameImportant[128] = true; + Main.tileFrameImportant[129] = true; + Main.tileFrameImportant[132] = true; + Main.tileFrameImportant[133] = true; + Main.tileFrameImportant[134] = true; + Main.tileFrameImportant[135] = true; + Main.tileFrameImportant[172] = true; + Main.tileFrameImportant[319] = true; + Main.tileFrameImportant[323] = true; + Main.tileFrameImportant[335] = true; + Main.tileFrameImportant[337] = true; + Main.tileFrameImportant[349] = true; + Main.tileFrameImportant[376] = true; + Main.tileFrameImportant[378] = true; + Main.tileFrameImportant[425] = true; + Main.tileFrameImportant[465] = true; + Main.tileFrameImportant[506] = true; + Main.tileFrameImportant[510] = true; + Main.tileFrameImportant[511] = true; + Main.tileFrameImportant[531] = true; + Main.tileFrameImportant[545] = true; + Main.tileFrameImportant[547] = true; + Main.tileFrameImportant[548] = true; + Main.tileFrameImportant[552] = true; + Main.tileFrameImportant[573] = true; + Main.tileFrameImportant[613] = true; + Main.tileFrameImportant[614] = true; + Main.tileFrameImportant[621] = true; + Main.tileFrameImportant[622] = true; + Main.tileFrameImportant[141] = true; + Main.tileFrameImportant[270] = true; + Main.tileFrameImportant[271] = true; + Main.tileFrameImportant[581] = true; + Main.tileFrameImportant[314] = true; + Main.tileSolidTop[376] = true; + Main.tileTable[376] = true; + Main.tileTable[380] = true; + Main.tileFrameImportant[583] = true; + Main.tileFrameImportant[584] = true; + Main.tileFrameImportant[585] = true; + Main.tileFrameImportant[586] = true; + Main.tileFrameImportant[587] = true; + Main.tileFrameImportant[588] = true; + Main.tileFrameImportant[589] = true; + Main.tileFrameImportant[590] = true; + Main.tileNoAttach[590] = true; + Main.tileFrameImportant[595] = true; + Main.tileNoAttach[595] = true; + Main.tileFrameImportant[596] = true; + Main.tileFrameImportant[615] = true; + Main.tileNoAttach[615] = true; + Main.tileFrameImportant[616] = true; + Main.tileCut[201] = true; + Main.tileCut[3] = true; + Main.tileCut[24] = true; + Main.tileCut[28] = true; + Main.tileCut[32] = true; + Main.tileCut[51] = true; + Main.tileCut[52] = true; + Main.tileCut[61] = true; + Main.tileCut[62] = true; + Main.tileCut[69] = true; + Main.tileCut[71] = true; + Main.tileCut[73] = true; + Main.tileCut[74] = true; + Main.tileCut[82] = true; + Main.tileCut[83] = true; + Main.tileCut[84] = true; + Main.tileCut[110] = true; + Main.tileCut[113] = true; + Main.tileCut[115] = true; + Main.tileCut[184] = true; + Main.tileCut[205] = true; + Main.tileCut[352] = true; + Main.tileCut[382] = true; + Main.tileCut[528] = true; + Main.tileLighted[528] = true; + Main.tileCut[444] = true; + Main.tileCut[485] = true; + Main.tileAlch[82] = true; + Main.tileAlch[83] = true; + Main.tileAlch[84] = true; + Main.tileSolid[(int) sbyte.MaxValue] = true; + Main.tileSolid[130] = true; + Main.tileBlockLight[130] = true; + Main.tileBlockLight[131] = true; + Main.tileNoAttach[232] = true; + Main.tileSolid[107] = true; + Main.tileBlockLight[107] = true; + Main.tileSolid[108] = true; + Main.tileBlockLight[108] = true; + Main.tileSolid[111] = true; + Main.tileBlockLight[111] = true; + Main.tileSolid[109] = true; + Main.tileBlockLight[109] = true; + Main.tileSolid[110] = false; + Main.tileNoAttach[110] = true; + Main.tileNoFail[110] = true; + Main.tileSolid[112] = true; + Main.tileBlockLight[112] = true; + Main.tileSolid[116] = true; + Main.tileBlockLight[116] = true; + Main.tileBrick[117] = true; + Main.tileBrick[25] = true; + Main.tileBrick[203] = true; + Main.tileSolid[117] = true; + Main.tileBlockLight[117] = true; + Main.tileSolid[123] = true; + Main.tileBlockLight[123] = true; + Main.tileNoFail[165] = true; + Main.tileNoFail[184] = true; + Main.tileNoFail[185] = true; + Main.tileNoFail[186] = true; + Main.tileNoFail[187] = true; + Main.tileSolid[118] = true; + Main.tileBlockLight[118] = true; + Main.tileSolid[119] = true; + Main.tileBlockLight[119] = true; + Main.tileSolid[120] = true; + Main.tileBlockLight[120] = true; + Main.tileSolid[121] = true; + Main.tileBlockLight[121] = true; + Main.tileSolid[122] = true; + Main.tileBlockLight[122] = true; + Main.tileSolid[150] = true; + Main.tileBlockLight[150] = true; + Main.tileBlockLight[115] = true; + Main.tileSolid[199] = true; + Main.tileBlockLight[199] = true; + Main.tileNoFail[162] = true; + Main.tileSolid[0] = true; + Main.tileBlockLight[0] = true; + Main.tileSolid[1] = true; + Main.tileBlockLight[1] = true; + Main.tileSolid[2] = true; + Main.tileBlockLight[2] = true; + Main.tileSolid[3] = false; + Main.tileNoAttach[3] = true; + Main.tileNoFail[3] = true; + Main.tileNoFail[201] = true; + Main.tileSolid[4] = false; + Main.tileNoAttach[4] = true; + Main.tileNoFail[4] = true; + Main.tileNoFail[24] = true; + Main.tileSolid[5] = false; + Main.tileSolid[6] = true; + Main.tileBlockLight[6] = true; + Main.tileSolid[7] = true; + Main.tileBlockLight[7] = true; + Main.tileSolid[8] = true; + Main.tileBlockLight[8] = true; + Main.tileSolid[9] = true; + Main.tileBlockLight[9] = true; + Main.tileSolid[166] = true; + Main.tileBlockLight[166] = true; + Main.tileSolid[167] = true; + Main.tileBlockLight[167] = true; + Main.tileSolid[168] = true; + Main.tileBlockLight[168] = true; + Main.tileSolid[169] = true; + Main.tileBlockLight[169] = true; + Main.tileBlockLight[10] = true; + Main.tileSolid[10] = true; + Main.tileNoAttach[10] = true; + Main.tileBlockLight[10] = true; + Main.tileSolid[11] = false; + Main.tileSolidTop[19] = true; + Main.tileSolid[19] = true; + Main.tileSolid[22] = true; + Main.tileSolid[23] = true; + Main.tileSolid[25] = true; + Main.tileSolid[30] = true; + Main.tileNoFail[32] = true; + Main.tileBlockLight[32] = true; + Main.tileNoFail[352] = true; + Main.tileBlockLight[352] = true; + Main.tileSolid[37] = true; + Main.tileBlockLight[37] = true; + Main.tileSolid[38] = true; + Main.tileBlockLight[38] = true; + Main.tileSolid[39] = true; + Main.tileBlockLight[39] = true; + Main.tileSolid[40] = true; + Main.tileBlockLight[40] = true; + Main.tileSolid[41] = true; + Main.tileBlockLight[41] = true; + Main.tileSolid[43] = true; + Main.tileBlockLight[43] = true; + Main.tileSolid[44] = true; + Main.tileBlockLight[44] = true; + Main.tileSolid[481] = true; + Main.tileBlockLight[481] = true; + Main.tileSolid[482] = true; + Main.tileBlockLight[482] = true; + Main.tileSolid[483] = true; + Main.tileBlockLight[483] = true; + Main.tileSolid[45] = true; + Main.tileBlockLight[45] = true; + Main.tileSolid[46] = true; + Main.tileBlockLight[46] = true; + Main.tileSolid[47] = true; + Main.tileBlockLight[47] = true; + Main.tileSolid[48] = true; + Main.tileSolid[53] = true; + Main.tileBlockLight[53] = true; + Main.tileSolid[54] = true; + Main.tileBlockLight[52] = true; + Main.tileBlockLight[205] = true; + Main.tileSolid[56] = true; + Main.tileBlockLight[56] = true; + Main.tileSolid[57] = true; + Main.tileBlockLight[57] = true; + Main.tileSolid[58] = true; + Main.tileBlockLight[58] = true; + Main.tileBlockLight[382] = true; + Main.tileSolid[59] = true; + Main.tileBlockLight[59] = true; + Main.tileSolid[60] = true; + Main.tileBlockLight[60] = true; + Main.tileSolid[63] = true; + Main.tileBlockLight[63] = true; + Main.tileStone[63] = true; + Main.tileStone[130] = true; + Main.tileSolid[64] = true; + Main.tileBlockLight[64] = true; + Main.tileStone[64] = true; + Main.tileSolid[65] = true; + Main.tileBlockLight[65] = true; + Main.tileStone[65] = true; + Main.tileSolid[66] = true; + Main.tileBlockLight[66] = true; + Main.tileStone[66] = true; + Main.tileSolid[67] = true; + Main.tileBlockLight[67] = true; + Main.tileStone[67] = true; + Main.tileSolid[68] = true; + Main.tileBlockLight[68] = true; + Main.tileStone[68] = true; + Main.tileSolid[566] = true; + Main.tileBlockLight[566] = true; + Main.tileStone[566] = true; + Main.tileSolid[75] = true; + Main.tileBlockLight[75] = true; + Main.tileSolid[76] = true; + Main.tileBlockLight[76] = true; + Main.tileSolid[70] = true; + Main.tileBlockLight[70] = true; + Main.tileNoFail[50] = true; + Main.tileNoAttach[50] = true; + Main.tileDungeon[41] = true; + Main.tileDungeon[43] = true; + Main.tileDungeon[44] = true; + Main.tileBlockLight[30] = true; + Main.tileBlockLight[25] = true; + Main.tileBlockLight[23] = true; + Main.tileBlockLight[22] = true; + Main.tileBlockLight[62] = true; + Main.tileSolidTop[18] = true; + Main.tileSolidTop[14] = true; + Main.tileSolidTop[469] = true; + Main.tileSolidTop[16] = true; + Main.tileSolidTop[134] = true; + Main.tileSolidTop[114] = true; + Main.tileNoAttach[20] = true; + Main.tileNoAttach[19] = true; + Main.tileNoAttach[13] = true; + Main.tileNoAttach[14] = true; + Main.tileNoAttach[469] = true; + Main.tileNoAttach[486] = true; + Main.tileNoAttach[488] = true; + Main.tileNoAttach[487] = true; + Main.tileNoAttach[489] = true; + Main.tileNoAttach[490] = true; + Main.tileNoAttach[15] = true; + Main.tileNoAttach[497] = true; + Main.tileNoAttach[16] = true; + Main.tileNoAttach[134] = true; + Main.tileNoAttach[17] = true; + Main.tileNoAttach[18] = true; + Main.tileNoAttach[21] = true; + Main.tileNoAttach[467] = true; + Main.tileNoAttach[441] = true; + Main.tileNoAttach[468] = true; + Main.tileNoAttach[27] = true; + Main.tileNoAttach[114] = true; + Main.tileTable[14] = true; + Main.tileTable[469] = true; + Main.tileTable[18] = true; + Main.tileTable[19] = true; + Main.tileTable[114] = true; + Main.tileNoAttach[86] = true; + Main.tileNoAttach[87] = true; + Main.tileNoAttach[88] = true; + Main.tileNoAttach[89] = true; + Main.tileNoAttach[90] = true; + Main.tileTable[101] = true; + Main.tileNoAttach[101] = true; + Main.tileNoAttach[102] = true; + Main.tileNoAttach[94] = true; + Main.tileNoAttach[95] = true; + Main.tileNoAttach[96] = true; + Main.tileNoAttach[97] = true; + Main.tileNoAttach[98] = true; + Main.tileNoAttach[99] = true; + Main.tileTable[87] = true; + Main.tileTable[88] = true; + Main.tileSolidTop[87] = true; + Main.tileSolidTop[88] = true; + Main.tileSolidTop[101] = true; + Main.tileNoAttach[91] = true; + Main.tileNoAttach[92] = true; + Main.tileNoAttach[93] = true; + Main.tileLighted[190] = true; + Main.tileBlockLight[192] = true; + Main.tileWaterDeath[215] = true; + Main.tileWaterDeath[4] = true; + Main.tileWaterDeath[51] = true; + Main.tileWaterDeath[93] = true; + Main.tileWaterDeath[98] = true; + Main.tileWaterDeath[552] = true; + Main.tileLavaDeath[3] = true; + Main.tileLavaDeath[5] = true; + Main.tileLavaDeath[10] = true; + Main.tileLavaDeath[11] = true; + Main.tileLavaDeath[12] = true; + Main.tileLavaDeath[13] = true; + Main.tileLavaDeath[14] = true; + Main.tileLavaDeath[469] = true; + Main.tileLavaDeath[486] = true; + Main.tileLavaDeath[488] = true; + Main.tileLavaDeath[487] = true; + Main.tileLavaDeath[489] = true; + Main.tileLavaDeath[490] = true; + Main.tileLavaDeath[15] = true; + Main.tileLavaDeath[497] = true; + Main.tileLavaDeath[16] = true; + Main.tileLavaDeath[17] = true; + Main.tileLavaDeath[18] = true; + Main.tileLavaDeath[19] = true; + Main.tileLavaDeath[20] = true; + Main.tileLavaDeath[24] = true; + Main.tileLavaDeath[27] = true; + Main.tileLavaDeath[28] = true; + Main.tileLavaDeath[29] = true; + Main.tileLavaDeath[32] = true; + Main.tileLavaDeath[33] = true; + Main.tileLavaDeath[34] = true; + Main.tileLavaDeath[35] = true; + Main.tileLavaDeath[36] = true; + Main.tileLavaDeath[42] = true; + Main.tileLavaDeath[49] = true; + Main.tileLavaDeath[50] = true; + Main.tileLavaDeath[51] = true; + Main.tileLavaDeath[52] = true; + Main.tileLavaDeath[55] = true; + Main.tileLavaDeath[61] = true; + Main.tileLavaDeath[62] = true; + Main.tileLavaDeath[69] = true; + Main.tileLavaDeath[71] = true; + Main.tileLavaDeath[72] = true; + Main.tileLavaDeath[73] = true; + Main.tileLavaDeath[74] = true; + Main.tileLavaDeath[79] = true; + Main.tileLavaDeath[80] = true; + Main.tileLavaDeath[81] = true; + Main.tileLavaDeath[86] = true; + Main.tileLavaDeath[87] = true; + Main.tileLavaDeath[88] = true; + Main.tileLavaDeath[89] = true; + Main.tileLavaDeath[90] = true; + Main.tileLavaDeath[91] = true; + Main.tileLavaDeath[92] = true; + Main.tileLavaDeath[93] = true; + Main.tileLavaDeath[94] = true; + Main.tileLavaDeath[95] = true; + Main.tileLavaDeath[96] = true; + Main.tileLavaDeath[97] = true; + Main.tileLavaDeath[98] = true; + Main.tileLavaDeath[100] = true; + Main.tileLavaDeath[101] = true; + Main.tileLavaDeath[102] = true; + Main.tileLavaDeath[103] = true; + Main.tileLavaDeath[104] = true; + Main.tileLavaDeath[106] = true; + Main.tileLavaDeath[110] = true; + Main.tileLavaDeath[113] = true; + Main.tileLavaDeath[115] = true; + Main.tileLavaDeath[125] = true; + Main.tileLavaDeath[126] = true; + Main.tileLavaDeath[128] = true; + Main.tileLavaDeath[149] = true; + Main.tileLavaDeath[172] = true; + Main.tileLavaDeath[173] = true; + Main.tileLavaDeath[174] = true; + Main.tileLavaDeath[184] = true; + Main.tileLavaDeath[201] = true; + Main.tileLavaDeath[205] = true; + Main.tileLavaDeath[201] = true; + Main.tileLavaDeath[209] = true; + Main.tileLavaDeath[210] = true; + Main.tileLavaDeath[212] = true; + Main.tileLavaDeath[213] = true; + Main.tileLavaDeath[353] = true; + Main.tileLavaDeath[214] = true; + Main.tileLavaDeath[215] = true; + Main.tileLavaDeath[216] = true; + Main.tileLavaDeath[217] = true; + Main.tileLavaDeath[218] = true; + Main.tileLavaDeath[219] = true; + Main.tileLavaDeath[220] = true; + Main.tileLavaDeath[227] = true; + Main.tileLavaDeath[228] = true; + Main.tileLavaDeath[233] = true; + Main.tileLavaDeath[236] = true; + Main.tileLavaDeath[238] = true; + Main.tileLavaDeath[240] = true; + Main.tileLavaDeath[241] = true; + Main.tileLavaDeath[242] = true; + Main.tileLavaDeath[243] = true; + Main.tileLavaDeath[244] = true; + Main.tileLavaDeath[245] = true; + Main.tileLavaDeath[246] = true; + Main.tileLavaDeath[247] = true; + Main.tileLavaDeath[254] = true; + Main.tileLavaDeath[269] = true; + Main.tileLavaDeath[270] = true; + Main.tileLavaDeath[271] = true; + Main.tileLavaDeath[581] = true; + Main.tileLavaDeath[275] = true; + Main.tileLavaDeath[413] = true; + Main.tileLavaDeath[276] = true; + Main.tileLavaDeath[277] = true; + Main.tileLavaDeath[278] = true; + Main.tileLavaDeath[279] = true; + Main.tileLavaDeath[280] = true; + Main.tileLavaDeath[281] = true; + Main.tileLavaDeath[282] = true; + Main.tileLavaDeath[283] = true; + Main.tileLavaDeath[285] = true; + Main.tileLavaDeath[286] = true; + Main.tileLavaDeath[287] = true; + Main.tileLavaDeath[288] = true; + Main.tileLavaDeath[289] = true; + Main.tileLavaDeath[290] = true; + Main.tileLavaDeath[291] = true; + Main.tileLavaDeath[292] = true; + Main.tileLavaDeath[293] = true; + Main.tileLavaDeath[294] = true; + Main.tileLavaDeath[295] = true; + Main.tileLavaDeath[296] = true; + Main.tileLavaDeath[297] = true; + Main.tileLavaDeath[298] = true; + Main.tileLavaDeath[299] = true; + Main.tileLavaDeath[300] = true; + Main.tileLavaDeath[301] = true; + Main.tileLavaDeath[302] = true; + Main.tileLavaDeath[303] = true; + Main.tileLavaDeath[304] = true; + Main.tileLavaDeath[305] = true; + Main.tileLavaDeath[306] = true; + Main.tileLavaDeath[307] = true; + Main.tileLavaDeath[308] = true; + Main.tileLavaDeath[309] = true; + Main.tileLavaDeath[310] = true; + Main.tileLavaDeath[532] = true; + Main.tileLavaDeath[316] = true; + Main.tileLavaDeath[317] = true; + Main.tileLavaDeath[318] = true; + Main.tileLavaDeath[319] = true; + Main.tileLavaDeath[354] = true; + Main.tileLavaDeath[355] = true; + Main.tileLavaDeath[499] = true; + Main.tileLavaDeath[323] = true; + Main.tileLavaDeath[335] = true; + Main.tileLavaDeath[338] = true; + Main.tileLavaDeath[339] = true; + Main.tileLavaDeath[528] = true; + Main.tileLavaDeath[352] = true; + Main.tileLavaDeath[382] = true; + Main.tileLavaDeath[425] = true; + Main.tileLavaDeath[453] = true; + Main.tileLavaDeath[456] = true; + Main.tileLavaDeath[463] = true; + Main.tileLavaDeath[464] = true; + Main.tileLavaDeath[465] = true; + Main.tileLavaDeath[485] = true; + Main.tileLavaDeath[511] = true; + Main.tileLavaDeath[510] = true; + Main.tileLavaDeath[547] = true; + Main.tileLavaDeath[548] = true; + Main.tileLavaDeath[552] = true; + Main.tileLavaDeath[573] = true; + Main.tileLavaDeath[621] = true; + Main.tileLavaDeath[622] = true; + Main.tileLighted[316] = true; + Main.tileLighted[317] = true; + Main.tileLighted[318] = true; + Main.tileFrameImportant[493] = true; + Main.tileLavaDeath[493] = true; + for (int index = 0; index < 623; ++index) + { + if (Main.tileLavaDeath[index]) + Main.tileObsidianKill[index] = true; + } + Main.tileObsidianKill[546] = true; + Main.tileObsidianKill[77] = true; + Main.tileObsidianKill[78] = true; + Main.tileObsidianKill[82] = true; + Main.tileObsidianKill[83] = true; + Main.tileObsidianKill[84] = true; + Main.tileObsidianKill[85] = true; + Main.tileObsidianKill[105] = true; + Main.tileObsidianKill[129] = true; + Main.tileObsidianKill[132] = true; + Main.tileObsidianKill[133] = true; + Main.tileObsidianKill[134] = true; + Main.tileObsidianKill[135] = true; + Main.tileObsidianKill[136] = true; + Main.tileObsidianKill[139] = true; + Main.tileObsidianKill[165] = true; + Main.tileObsidianKill[178] = true; + Main.tileObsidianKill[185] = true; + Main.tileObsidianKill[186] = true; + Main.tileObsidianKill[187] = true; + Main.tileObsidianKill[231] = true; + Main.tileObsidianKill[337] = true; + Main.tileObsidianKill[349] = true; + Main.tileObsidianKill[506] = true; + Main.tileObsidianKill[314] = true; + Main.tileSolid[384] = true; + Main.tileBlockLight[384] = true; + Main.tileNoFail[384] = true; + Main.tileFrameImportant[395] = true; + Main.tileLavaDeath[395] = true; + Main.tileFrameImportant[520] = true; + Main.tileLavaDeath[520] = true; + Main.tileLavaDeath[471] = true; + Main.tileFrameImportant[405] = true; + Main.tileLavaDeath[405] = true; + Main.tileSolidTop[405] = true; + Main.tileTable[405] = true; + Main.tileLighted[405] = true; + Main.tileWaterDeath[405] = true; + Main.tileFrameImportant[406] = true; + Main.tileLavaDeath[406] = true; + Main.tileFrameImportant[452] = true; + Main.tileLavaDeath[452] = true; + Main.tileFrameImportant[411] = true; + Main.tileLavaDeath[411] = false; + Main.tileFrameImportant[457] = true; + Main.tileLavaDeath[457] = true; + Main.tileFrameImportant[462] = true; + Main.tileFrameImportant[454] = true; + Main.tileLavaDeath[454] = true; + Main.tileCut[454] = true; + Main.tileFrameImportant[494] = true; + Main.tileLavaDeath[494] = true; + Main.tileFrameImportant[455] = true; + Main.tileFrameImportant[412] = true; + for (int index = 0; index < 316; ++index) + Main.wallBlend[index] = index != 20 ? (index != 19 ? (index != 18 ? (index != 17 ? (index == 16 || index == 59 || index == 261 ? 2 : (index == 1 || index >= 48 && index <= 53 ? 1 : index)) : 7) : 8) : 9) : 14; + Main.wallBlend[65] = 63; + Main.wallBlend[66] = 63; + Main.wallBlend[68] = 63; + Main.wallBlend[67] = 64; + Main.wallBlend[80] = 74; + Main.wallBlend[81] = 77; + Main.wallBlend[94] = 7; + Main.wallBlend[95] = 7; + Main.wallBlend[100] = 7; + Main.wallBlend[101] = 7; + Main.wallBlend[96] = 8; + Main.wallBlend[97] = 8; + Main.wallBlend[102] = 8; + Main.wallBlend[103] = 8; + Main.wallBlend[98] = 9; + Main.wallBlend[99] = 9; + Main.wallBlend[104] = 9; + Main.wallBlend[105] = 9; + Main.tileNoFail[24] = true; + Main.tileNoFail[3] = true; + Main.tileNoFail[52] = true; + Main.tileNoFail[62] = true; + Main.tileNoFail[32] = true; + Main.tileNoFail[61] = true; + Main.tileNoFail[69] = true; + Main.tileNoFail[73] = true; + Main.tileNoFail[74] = true; + Main.tileNoFail[82] = true; + Main.tileNoFail[83] = true; + Main.tileNoFail[84] = true; + Main.tileNoFail[110] = true; + Main.tileNoFail[113] = true; + Main.tileNoFail[115] = true; + Main.tileNoFail[165] = true; + Main.tileNoFail[184] = true; + Main.tileNoFail[201] = true; + Main.tileNoFail[205] = true; + Main.tileNoFail[227] = true; + Main.tileNoFail[233] = true; + Main.tileNoFail[352] = true; + Main.tileNoFail[382] = true; + Main.tileNoFail[528] = true; + Main.tileNoFail[485] = true; + Main.tileFrameImportant[387] = true; + Main.tileSolid[387] = true; + Main.tileBlockLight[387] = true; + Main.tileNoAttach[387] = true; + Main.tileLavaDeath[387] = true; + Main.tileFrameImportant[386] = true; + Main.tileLavaDeath[386] = true; + Main.tileNoSunLight[386] = true; + Main.tileFrameImportant[388] = true; + Main.tileSolid[388] = true; + Main.tileBlockLight[388] = true; + Main.tileNoAttach[388] = true; + Main.tileLavaDeath[388] = true; + Main.tileFrameImportant[389] = true; + Main.tileLavaDeath[389] = true; + Main.tileNoSunLight[389] = true; + for (int index = 0; index < 623; ++index) + { + if (Main.tileSolid[index]) + Main.tileNoSunLight[index] = true; + Main.tileFrame[index] = 0; + Main.tileFrameCounter[index] = 0; + } + Main.tileNoSunLight[546] = false; + Main.tileNoSunLight[379] = false; + Main.tileNoSunLight[54] = false; + Main.tileNoSunLight[328] = false; + Main.tileNoSunLight[459] = false; + Main.tileNoSunLight[19] = false; + Main.tileNoSunLight[11] = true; + Main.tileNoSunLight[189] = false; + Main.tileNoSunLight[196] = false; + Main.tileNoSunLight[48] = false; + Main.tileNoSunLight[232] = false; + Main.tileNoSunLight[460] = false; + Main.tileNoSunLight[541] = false; + Main.tileNoSunLight[388] = false; + } + + private static void Initialize_TileAndNPCData1() + { + for (int index = 0; index < 623; ++index) + Main.tileGlowMask[index] = (short) -1; + for (int index = 0; index < 950; ++index) + Main.projFrames[index] = 1; + Main.projFrames[736] = 3; + Main.projFrames[737] = 3; + Main.projFrames[738] = 3; + Main.projFrames[779] = 4; + Main.projFrames[783] = 4; + Main.projFrames[862] = 4; + Main.projFrames[863] = 4; + Main.projFrames[820] = 4; + Main.projFrames[916] = 6; + Main.projFrames[34] = 6; + Main.projFrames[706] = 8; + Main.projFrames[712] = 8; + Main.projFrames[663] = 7; + Main.projFrames[665] = 9; + Main.projFrames[667] = 9; + Main.projFrames[677] = 6; + Main.projFrames[678] = 6; + Main.projFrames[679] = 6; + Main.projFrames[688] = 6; + Main.projFrames[689] = 6; + Main.projFrames[690] = 8; + Main.projFrames[691] = 4; + Main.projFrames[692] = 4; + Main.projFrames[693] = 4; + Main.projFrames[694] = 4; + Main.projFrames[695] = 4; + Main.projFrames[696] = 5; + Main.projFrames[700] = 4; + Main.projFrames[643] = 8; + Main.projFrames[566] = 4; + Main.projFrames[565] = 4; + Main.projFrames[525] = 5; + Main.projFrames[519] = 4; + Main.projFrames[509] = 2; + Main.projFrames[485] = 5; + Main.projFrames[492] = 8; + Main.projFrames[500] = 4; + Main.projFrames[499] = 12; + Main.projFrames[518] = 4; + Main.projFrames[585] = 4; + Main.projFrames[593] = 4; + Main.projFrames[595] = 28; + Main.projFrames[735] = 28; + Main.projFrames[596] = 4; + Main.projFrames[612] = 5; + Main.projFrames[613] = 4; + Main.projFrames[614] = 4; + Main.projFrames[615] = 7; + Main.projFrames[623] = 19; + Main.projFrames[633] = 5; + Main.projFrames[645] = 7; + Main.projFrames[650] = 4; + Main.projFrames[652] = 6; + Main.projFrames[659] = 4; + Main.projFrames[714] = 7; + Main.projFrames[734] = 8; + Main.projFrames[755] = 5; + Main.projFrames[759] = 5; + Main.projFrames[765] = 10; + Main.projFrames[384] = 6; + Main.projFrames[385] = 3; + Main.projFrames[386] = 6; + Main.projFrames[390] = 11; + Main.projFrames[391] = 11; + Main.projFrames[392] = 11; + Main.projFrames[393] = 15; + Main.projFrames[394] = 15; + Main.projFrames[395] = 15; + Main.projFrames[398] = 10; + Main.projFrames[407] = 6; + Main.projFrames[408] = 2; + Main.projFrames[409] = 3; + Main.projFrames[387] = 3; + Main.projFrames[388] = 3; + Main.projFrames[334] = 11; + Main.projFrames[324] = 10; + Main.projFrames[351] = 2; + Main.projFrames[349] = 5; + Main.projFrames[423] = 4; + Main.projFrames[435] = 4; + Main.projFrames[682] = 4; + Main.projFrames[436] = 4; + Main.projFrames[439] = 6; + Main.projFrames[443] = 4; + Main.projFrames[447] = 4; + Main.projFrames[448] = 3; + Main.projFrames[450] = 5; + Main.projFrames[454] = 2; + Main.projFrames[456] = 4; + Main.projFrames[459] = 3; + Main.projFrames[462] = 5; + Main.projFrames[465] = 4; + Main.projFrames[467] = 4; + Main.projFrames[468] = 4; + Main.projFrames[533] = 21; + Main.projFrames[535] = 12; + Main.projFrames[539] = 4; + Main.projFrames[575] = 4; + Main.projFrames[574] = 2; + Main.projFrames[634] = 4; + Main.projFrames[635] = 4; + Main.projFrames[709] = 3; + Main.projFrames[353] = 14; + Main.projFrames[346] = 2; + Main.projFrames[347] = 2; + Main.projFrames[335] = 4; + Main.projFrames[344] = 3; + Main.projFrames[337] = 5; + Main.projFrames[317] = 8; + Main.projFrames[321] = 3; + Main.projFrames[308] = 10; + Main.projFrames[316] = 4; + Main.projFrames[275] = 2; + Main.projFrames[276] = 2; + Main.projFrames[254] = 5; + Main.projFrames[307] = 2; + Main.projFrames[72] = 4; + Main.projFrames[86] = 4; + Main.projFrames[87] = 4; + Main.projFrames[102] = 2; + Main.projFrames[111] = 8; + Main.projFrames[112] = 3; + Main.projFrames[(int) sbyte.MaxValue] = 16; + Main.projFrames[175] = 2; + Main.projFrames[181] = 4; + Main.projFrames[189] = 4; + Main.projFrames[191] = 18; + Main.projFrames[192] = 18; + Main.projFrames[193] = 18; + Main.projFrames[194] = 18; + Main.projFrames[190] = 4; + Main.projFrames[198] = 4; + Main.projFrames[199] = 8; + Main.projFrames[200] = 10; + Main.projFrames[206] = 5; + Main.projFrames[208] = 5; + Main.projFrames[209] = 12; + Main.projFrames[210] = 12; + Main.projFrames[211] = 10; + Main.projFrames[221] = 3; + Main.projFrames[237] = 4; + Main.projFrames[238] = 6; + Main.projFrames[221] = 3; + Main.projFrames[228] = 5; + Main.projFrames[229] = 4; + Main.projFrames[236] = 13; + Main.projFrames[243] = 4; + Main.projFrames[244] = 6; + Main.projFrames[249] = 5; + Main.projFrames[252] = 4; + Main.projFrames[266] = 6; + Main.projFrames[268] = 8; + Main.projFrames[269] = 7; + Main.projFrames[270] = 3; + Main.projFrames[313] = 12; + Main.projFrames[314] = 13; + Main.projFrames[319] = 11; + Main.projFrames[373] = 3; + Main.projFrames[375] = 8; + Main.projFrames[377] = 9; + Main.projFrames[379] = 4; + Main.projFrames[380] = 4; + Main.projFrames[601] = 2; + Main.projFrames[602] = 4; + Main.projFrames[703] = 8; + Main.projFrames[701] = 3; + Main.projFrames[702] = 4; + Main.projFrames[732] = 4; + Main.projFrames[731] = 4; + Main.projFrames[758] = 24; + Main.projFrames[766] = 4; + Main.projFrames[767] = 4; + Main.projFrames[768] = 4; + Main.projFrames[769] = 4; + Main.projFrames[770] = 4; + Main.projFrames[774] = 8; + Main.projFrames[773] = 4; + Main.projFrames[815] = 10; + Main.projFrames[816] = 17; + Main.projFrames[817] = 18; + Main.projFrames[821] = 23; + Main.projFrames[824] = 4; + Main.projFrames[825] = 26; + Main.projFrames[826] = 3; + Main.projFrames[828] = 2; + Main.projFrames[829] = 2; + Main.projFrames[831] = 6; + Main.projFrames[833] = 10; + Main.projFrames[834] = 12; + Main.projFrames[835] = 12; + Main.projFrames[836] = 4; + Main.projFrames[837] = 3; + Main.projFrames[839] = 4; + Main.projFrames[840] = 4; + Main.projFrames[851] = 4; + Main.projFrames[853] = 4; + Main.projFrames[854] = 19; + Main.projFrames[855] = 4; + Main.projFrames[858] = 14; + Main.projFrames[859] = 24; + Main.projFrames[860] = 14; + Main.projFrames[861] = 4; + Main.projFrames[864] = 2; + Main.projFrames[866] = 4; + Main.projFrames[870] = 4; + Main.projFrames[875] = 11; + Main.projFrames[881] = 12; + Main.projFrames[882] = 20; + Main.projFrames[883] = 3; + Main.projFrames[884] = 14; + Main.projFrames[885] = 10; + Main.projFrames[886] = 8; + Main.projFrames[887] = 3; + Main.projFrames[888] = 36; + Main.projFrames[889] = 11; + Main.projFrames[890] = 12; + Main.projFrames[891] = 15; + Main.projFrames[892] = 6; + Main.projFrames[893] = 4; + Main.projFrames[894] = 8; + Main.projFrames[895] = 6; + Main.projFrames[896] = 16; + Main.projFrames[897] = 11; + Main.projFrames[898] = 16; + Main.projFrames[899] = 14; + Main.projFrames[900] = 14; + Main.projFrames[901] = 12; + Main.projFrames[908] = 12; + Main.projFrames[909] = 6; + Main.projFrames[920] = 3; + Main.projFrames[934] = 12; + Main.projFrames[880] = 8; + Main.projFrames[929] = 8; + Main.projPet[492] = true; + Main.projPet[499] = true; + Main.projPet[653] = true; + Main.projPet[701] = true; + Main.projPet[703] = true; + Main.projPet[702] = true; + Main.projPet[764] = true; + Main.projPet[765] = true; + Main.projPet[319] = true; + Main.projPet[334] = true; + Main.projPet[324] = true; + Main.projPet[266] = true; + Main.projPet[313] = true; + Main.projPet[314] = true; + Main.projPet[317] = true; + Main.projPet[175] = true; + Main.projPet[111] = true; + Main.projPet[112] = true; + Main.projPet[(int) sbyte.MaxValue] = true; + Main.projPet[191] = true; + Main.projPet[192] = true; + Main.projPet[193] = true; + Main.projPet[194] = true; + Main.projPet[197] = true; + Main.projPet[198] = true; + Main.projPet[199] = true; + Main.projPet[200] = true; + Main.projPet[208] = true; + Main.projPet[209] = true; + Main.projPet[210] = true; + Main.projPet[211] = true; + Main.projPet[236] = true; + Main.projPet[268] = true; + Main.projPet[269] = true; + Main.projPet[353] = true; + Main.projPet[373] = true; + Main.projPet[375] = true; + Main.projPet[380] = true; + Main.projPet[387] = true; + Main.projPet[388] = true; + Main.projPet[390] = true; + Main.projPet[391] = true; + Main.projPet[392] = true; + Main.projPet[393] = true; + Main.projPet[394] = true; + Main.projPet[395] = true; + Main.projPet[398] = true; + Main.projPet[407] = true; + Main.projPet[423] = true; + Main.projPet[533] = true; + Main.projPet[613] = true; + Main.projPet[623] = true; + Main.projPet[625] = true; + Main.projPet[626] = true; + Main.projPet[627] = true; + Main.projPet[628] = true; + Main.projPet[755] = true; + Main.projPet[758] = true; + Main.projPet[759] = true; + Main.projPet[774] = true; + Main.projPet[815] = true; + Main.projPet[816] = true; + Main.projPet[817] = true; + Main.projPet[821] = true; + Main.projPet[825] = true; + Main.projPet[831] = true; + Main.projPet[833] = true; + Main.projPet[834] = true; + Main.projPet[835] = true; + Main.projPet[854] = true; + Main.projPet[858] = true; + Main.projPet[859] = true; + Main.projPet[860] = true; + Main.projPet[864] = true; + Main.projPet[875] = true; + Main.projPet[946] = true; + Main.projPet[881] = true; + Main.projPet[882] = true; + Main.projPet[883] = true; + Main.projPet[884] = true; + Main.projPet[885] = true; + Main.projPet[886] = true; + Main.projPet[887] = true; + Main.projPet[888] = true; + Main.projPet[889] = true; + Main.projPet[890] = true; + Main.projPet[891] = true; + Main.projPet[892] = true; + Main.projPet[893] = true; + Main.projPet[894] = true; + Main.projPet[895] = true; + Main.projPet[896] = true; + Main.projPet[897] = true; + Main.projPet[898] = true; + Main.projPet[899] = true; + Main.projPet[900] = true; + Main.projPet[901] = true; + Main.projPet[934] = true; + Main.tileLighted[237] = true; + Main.tileLighted[27] = true; + Main.tileLighted[381] = true; + Main.tileLighted[534] = true; + Main.tileLighted[536] = true; + Main.tileLighted[539] = true; + Main.tileLighted[184] = true; + Main.tileLighted[463] = true; + Main.tileLighted[491] = true; + Main.slimeRainNPC[1] = true; + Main.debuff[158] = true; + Main.debuff[160] = true; + Main.debuff[20] = true; + Main.debuff[21] = true; + Main.debuff[22] = true; + Main.debuff[23] = true; + Main.debuff[24] = true; + Main.debuff[25] = true; + Main.debuff[28] = true; + Main.debuff[30] = true; + Main.debuff[31] = true; + Main.debuff[32] = true; + Main.debuff[33] = true; + Main.debuff[34] = true; + Main.debuff[35] = true; + Main.debuff[36] = true; + Main.debuff[37] = true; + Main.debuff[38] = true; + Main.debuff[39] = true; + Main.debuff[44] = true; + Main.debuff[46] = true; + Main.debuff[47] = true; + Main.debuff[67] = true; + Main.debuff[68] = true; + Main.debuff[69] = true; + Main.debuff[70] = true; + Main.debuff[80] = true; + Main.debuff[86] = true; + Main.debuff[87] = true; + Main.debuff[88] = true; + Main.debuff[89] = true; + Main.debuff[94] = true; + Main.debuff[103] = true; + Main.debuff[119] = true; + Main.debuff[120] = true; + Main.debuff[137] = true; + Main.debuff[145] = true; + Main.debuff[146] = true; + Main.debuff[147] = true; + Main.debuff[148] = true; + Main.debuff[149] = true; + Main.debuff[156] = true; + Main.debuff[157] = true; + Main.debuff[163] = true; + Main.debuff[164] = true; + Main.debuff[144] = true; + Main.debuff[194] = true; + Main.debuff[195] = true; + Main.debuff[196] = true; + Main.debuff[197] = true; + Main.debuff[199] = true; + Main.debuff[215] = true; + Main.debuff[320] = true; + Main.debuff[321] = true; + Main.pvpBuff[20] = true; + Main.pvpBuff[24] = true; + Main.pvpBuff[31] = true; + Main.pvpBuff[39] = true; + Main.pvpBuff[44] = true; + Main.pvpBuff[20] = true; + Main.pvpBuff[69] = true; + Main.pvpBuff[103] = true; + Main.pvpBuff[119] = true; + Main.pvpBuff[120] = true; + Main.pvpBuff[137] = true; + Main.pvpBuff[320] = true; + Main.meleeBuff[71] = true; + Main.meleeBuff[73] = true; + Main.meleeBuff[74] = true; + Main.meleeBuff[75] = true; + Main.meleeBuff[76] = true; + Main.meleeBuff[77] = true; + Main.meleeBuff[78] = true; + Main.meleeBuff[79] = true; + Main.buffNoSave[20] = true; + Main.buffNoSave[22] = true; + Main.buffNoSave[23] = true; + Main.buffNoSave[24] = true; + Main.buffNoSave[28] = true; + Main.buffNoSave[30] = true; + Main.buffNoSave[31] = true; + Main.buffNoSave[34] = true; + Main.buffNoSave[35] = true; + Main.buffNoSave[37] = true; + Main.buffNoSave[38] = true; + Main.buffNoSave[39] = true; + Main.buffNoSave[43] = true; + Main.buffNoSave[44] = true; + Main.buffNoSave[46] = true; + Main.buffNoSave[47] = true; + Main.buffNoSave[48] = true; + Main.buffNoSave[58] = true; + Main.buffNoSave[59] = true; + Main.buffNoSave[60] = true; + Main.buffNoSave[62] = true; + Main.buffNoSave[63] = true; + Main.buffNoSave[64] = true; + Main.buffNoSave[67] = true; + Main.buffNoSave[68] = true; + Main.buffNoSave[69] = true; + Main.buffNoSave[70] = true; + Main.buffNoSave[72] = true; + Main.buffNoSave[80] = true; + Main.buffNoSave[87] = true; + Main.buffNoSave[158] = true; + Main.buffNoSave[146] = true; + Main.buffNoSave[147] = true; + Main.buffNoSave[215] = true; + Main.buffNoSave[88] = true; + Main.buffNoSave[89] = true; + Main.buffNoSave[94] = true; + Main.buffNoSave[95] = true; + Main.buffNoSave[96] = true; + Main.buffNoSave[97] = true; + Main.buffNoSave[98] = true; + Main.buffNoSave[99] = true; + Main.buffNoSave[100] = true; + Main.buffNoSave[103] = true; + Main.buffNoSave[118] = true; + Main.buffNoSave[138] = true; + Main.buffNoSave[167] = true; + Main.buffNoSave[166] = true; + Main.buffNoSave[184] = true; + Main.buffNoSave[185] = true; + Main.buffNoSave[211] = true; + Main.buffNoSave[210] = true; + Main.buffNoSave[119] = true; + Main.buffNoSave[120] = true; + Main.buffNoSave[90] = true; + Main.buffNoSave[125] = true; + Main.buffNoSave[126] = true; + Main.buffNoSave[128] = true; + Main.buffNoSave[129] = true; + Main.buffNoSave[130] = true; + Main.buffNoSave[131] = true; + Main.buffNoSave[132] = true; + Main.buffNoSave[133] = true; + Main.buffNoSave[134] = true; + Main.buffNoSave[135] = true; + Main.buffNoSave[139] = true; + Main.buffNoSave[140] = true; + Main.buffNoSave[141] = true; + Main.buffNoSave[142] = true; + Main.buffNoSave[143] = true; + Main.buffNoSave[137] = true; + Main.buffNoSave[144] = true; + Main.buffNoSave[161] = true; + Main.buffNoSave[162] = true; + Main.buffNoSave[163] = true; + Main.buffNoSave[164] = true; + Main.buffNoSave[168] = true; + Main.buffNoSave[170] = true; + Main.buffNoSave[171] = true; + Main.buffNoSave[172] = true; + Main.buffNoSave[182] = true; + Main.buffNoSave[187] = true; + Main.buffNoSave[188] = true; + Main.buffNoSave[193] = true; + Main.buffNoSave[194] = true; + Main.buffNoSave[195] = true; + Main.buffNoSave[196] = true; + Main.buffNoSave[197] = true; + Main.buffNoSave[198] = true; + Main.buffNoSave[199] = true; + Main.buffNoSave[205] = true; + Main.buffNoSave[212] = true; + Main.buffNoSave[213] = true; + Main.buffNoSave[214] = true; + Main.buffNoSave[230] = true; + Main.buffNoSave[263] = true; + Main.buffNoSave[265] = true; + Main.buffNoSave[271] = true; + Main.buffNoSave[322] = true; + Main.buffNoSave[275] = true; + Main.buffNoSave[276] = true; + Main.buffNoSave[277] = true; + Main.buffNoSave[278] = true; + Main.buffNoSave[279] = true; + Main.buffNoSave[280] = true; + Main.buffNoSave[281] = true; + Main.buffNoSave[282] = true; + Main.buffNoSave[283] = true; + Main.buffNoSave[305] = true; + Main.buffNoSave[318] = true; + Main.buffNoSave[320] = true; + Main.buffNoSave[321] = true; + for (int index = 173; index <= 181; ++index) + Main.buffNoSave[index] = true; + Main.buffNoTimeDisplay[19] = true; + Main.buffNoTimeDisplay[27] = true; + Main.buffNoTimeDisplay[28] = true; + Main.buffNoTimeDisplay[34] = true; + Main.buffNoTimeDisplay[37] = true; + Main.buffNoTimeDisplay[38] = true; + Main.buffNoTimeDisplay[40] = true; + Main.buffNoTimeDisplay[41] = true; + Main.buffNoTimeDisplay[42] = true; + Main.buffNoTimeDisplay[43] = true; + Main.buffNoTimeDisplay[45] = true; + Main.buffNoTimeDisplay[49] = true; + Main.buffNoTimeDisplay[60] = true; + Main.buffNoTimeDisplay[62] = true; + Main.buffNoTimeDisplay[64] = true; + Main.buffNoTimeDisplay[68] = true; + Main.buffNoTimeDisplay[81] = true; + Main.buffNoTimeDisplay[82] = true; + Main.buffNoTimeDisplay[83] = true; + Main.buffNoTimeDisplay[90] = true; + Main.buffNoTimeDisplay[95] = true; + Main.buffNoTimeDisplay[96] = true; + Main.buffNoTimeDisplay[97] = true; + Main.buffNoTimeDisplay[98] = true; + Main.buffNoTimeDisplay[99] = true; + Main.buffNoTimeDisplay[100] = true; + Main.buffNoTimeDisplay[101] = true; + Main.buffNoTimeDisplay[102] = true; + Main.buffNoTimeDisplay[118] = true; + Main.buffNoTimeDisplay[138] = true; + Main.buffNoTimeDisplay[167] = true; + Main.buffNoTimeDisplay[166] = true; + Main.buffNoTimeDisplay[184] = true; + Main.buffNoTimeDisplay[185] = true; + Main.buffNoTimeDisplay[211] = true; + Main.buffNoTimeDisplay[210] = true; + Main.buffNoTimeDisplay[125] = true; + Main.buffNoTimeDisplay[126] = true; + Main.buffNoTimeDisplay[128] = true; + Main.buffNoTimeDisplay[129] = true; + Main.buffNoTimeDisplay[130] = true; + Main.buffNoTimeDisplay[131] = true; + Main.buffNoTimeDisplay[132] = true; + Main.buffNoTimeDisplay[133] = true; + Main.buffNoTimeDisplay[134] = true; + Main.buffNoTimeDisplay[135] = true; + Main.buffNoTimeDisplay[136] = true; + Main.buffNoTimeDisplay[139] = true; + Main.buffNoTimeDisplay[140] = true; + Main.buffNoTimeDisplay[141] = true; + Main.buffNoTimeDisplay[142] = true; + Main.buffNoTimeDisplay[143] = true; + Main.buffNoTimeDisplay[137] = true; + Main.buffNoTimeDisplay[200] = true; + Main.buffNoTimeDisplay[202] = true; + Main.buffNoTimeDisplay[201] = true; + Main.buffNoTimeDisplay[161] = true; + Main.buffNoTimeDisplay[162] = true; + Main.buffNoTimeDisplay[163] = true; + Main.buffNoTimeDisplay[168] = true; + Main.buffNoTimeDisplay[170] = true; + Main.buffNoTimeDisplay[171] = true; + Main.buffNoTimeDisplay[172] = true; + Main.buffNoTimeDisplay[182] = true; + Main.buffNoTimeDisplay[165] = true; + Main.buffNoTimeDisplay[186] = true; + Main.buffNoTimeDisplay[187] = true; + Main.buffNoTimeDisplay[188] = true; + Main.buffNoTimeDisplay[193] = true; + Main.buffNoTimeDisplay[199] = true; + Main.buffNoTimeDisplay[212] = true; + Main.buffNoTimeDisplay[213] = true; + Main.buffNoTimeDisplay[214] = true; + Main.buffNoTimeDisplay[216] = true; + Main.buffNoTimeDisplay[217] = true; + Main.buffNoTimeDisplay[219] = true; + Main.buffNoTimeDisplay[230] = true; + Main.buffNoTimeDisplay[258] = true; + Main.buffNoTimeDisplay[259] = true; + Main.buffNoTimeDisplay[260] = true; + Main.buffNoTimeDisplay[261] = true; + Main.buffNoTimeDisplay[262] = true; + Main.buffNoTimeDisplay[263] = true; + Main.buffNoTimeDisplay[264] = true; + Main.buffNoTimeDisplay[265] = true; + Main.buffNoTimeDisplay[266] = true; + Main.buffNoTimeDisplay[267] = true; + Main.buffNoTimeDisplay[268] = true; + Main.buffNoTimeDisplay[271] = true; + Main.buffNoTimeDisplay[322] = true; + Main.buffNoTimeDisplay[274] = true; + Main.buffNoTimeDisplay[275] = true; + Main.buffNoTimeDisplay[276] = true; + Main.buffNoTimeDisplay[277] = true; + Main.buffNoTimeDisplay[278] = true; + Main.buffNoTimeDisplay[279] = true; + Main.buffNoTimeDisplay[280] = true; + Main.buffNoTimeDisplay[281] = true; + Main.buffNoTimeDisplay[282] = true; + Main.buffNoTimeDisplay[283] = true; + Main.buffNoTimeDisplay[284] = true; + Main.buffNoTimeDisplay[285] = true; + Main.buffNoTimeDisplay[286] = true; + Main.buffNoTimeDisplay[287] = true; + Main.buffNoTimeDisplay[288] = true; + Main.buffNoTimeDisplay[289] = true; + Main.buffNoTimeDisplay[290] = true; + Main.buffNoTimeDisplay[291] = true; + Main.buffNoTimeDisplay[292] = true; + Main.buffNoTimeDisplay[293] = true; + Main.buffNoTimeDisplay[294] = true; + Main.buffNoTimeDisplay[295] = true; + Main.buffNoTimeDisplay[296] = true; + Main.buffNoTimeDisplay[297] = true; + Main.buffNoTimeDisplay[298] = true; + Main.buffNoTimeDisplay[299] = true; + Main.buffNoTimeDisplay[300] = true; + Main.buffNoTimeDisplay[301] = true; + Main.buffNoTimeDisplay[302] = true; + Main.buffNoTimeDisplay[303] = true; + Main.buffNoTimeDisplay[304] = true; + Main.buffNoTimeDisplay[305] = true; + Main.buffNoTimeDisplay[317] = true; + Main.buffNoTimeDisplay[318] = true; + Main.buffNoTimeDisplay[320] = true; + Main.persistentBuff[71] = true; + Main.persistentBuff[73] = true; + Main.persistentBuff[74] = true; + Main.persistentBuff[75] = true; + Main.persistentBuff[76] = true; + Main.persistentBuff[77] = true; + Main.persistentBuff[78] = true; + Main.persistentBuff[79] = true; + for (int index = 0; index < BuffID.Sets.BasicMountData.Length; ++index) + { + if (BuffID.Sets.BasicMountData[index] != null) + { + Main.buffNoTimeDisplay[index] = true; + Main.buffNoSave[index] = true; + } + } + Main.vanityPet[40] = true; + Main.vanityPet[41] = true; + Main.vanityPet[42] = true; + Main.vanityPet[45] = true; + Main.vanityPet[50] = true; + Main.vanityPet[51] = true; + Main.vanityPet[52] = true; + Main.vanityPet[53] = true; + Main.vanityPet[54] = true; + Main.vanityPet[55] = true; + Main.vanityPet[56] = true; + Main.vanityPet[61] = true; + Main.vanityPet[154] = true; + Main.vanityPet[65] = true; + Main.vanityPet[66] = true; + Main.vanityPet[81] = true; + Main.vanityPet[82] = true; + Main.vanityPet[84] = true; + Main.vanityPet[85] = true; + Main.vanityPet[91] = true; + Main.vanityPet[92] = true; + Main.vanityPet[(int) sbyte.MaxValue] = true; + Main.vanityPet[136] = true; + Main.vanityPet[191] = true; + Main.vanityPet[202] = true; + Main.vanityPet[200] = true; + Main.vanityPet[218] = true; + Main.vanityPet[219] = true; + Main.vanityPet[217] = true; + Main.vanityPet[258] = true; + Main.vanityPet[259] = true; + Main.vanityPet[260] = true; + Main.vanityPet[261] = true; + Main.vanityPet[262] = true; + Main.vanityPet[264] = true; + Main.vanityPet[266] = true; + Main.vanityPet[267] = true; + Main.vanityPet[268] = true; + Main.vanityPet[274] = true; + Main.vanityPet[284] = true; + Main.vanityPet[285] = true; + Main.vanityPet[286] = true; + Main.vanityPet[287] = true; + Main.vanityPet[288] = true; + Main.vanityPet[289] = true; + Main.vanityPet[290] = true; + Main.vanityPet[291] = true; + Main.vanityPet[292] = true; + Main.vanityPet[293] = true; + Main.vanityPet[295] = true; + Main.vanityPet[296] = true; + Main.vanityPet[297] = true; + Main.vanityPet[300] = true; + Main.vanityPet[301] = true; + Main.vanityPet[302] = true; + Main.vanityPet[303] = true; + Main.vanityPet[304] = true; + Main.vanityPet[317] = true; + Main.lightPet[19] = true; + Main.lightPet[155] = true; + Main.lightPet[27] = true; + Main.lightPet[101] = true; + Main.lightPet[102] = true; + Main.lightPet[57] = true; + Main.lightPet[190] = true; + Main.lightPet[152] = true; + Main.lightPet[201] = true; + Main.lightPet[294] = true; + Main.lightPet[298] = true; + Main.lightPet[299] = true; + Main.tileFlame[4] = true; + Main.tileFlame[33] = true; + Main.tileFlame[34] = true; + Main.tileFlame[35] = true; + Main.tileFlame[42] = true; + Main.tileFlame[49] = true; + Main.tileFlame[93] = true; + Main.tileFlame[98] = true; + Main.tileFlame[100] = true; + Main.tileFlame[173] = true; + Main.tileFlame[174] = true; + Main.tileFlame[372] = true; + Main.tileRope[213] = true; + Main.tileRope[214] = true; + Main.tileRope[353] = true; + Main.tileRope[365] = true; + Main.tileRope[366] = true; + Main.tileRope[504] = true; + Main.tileRope[449] = true; + Main.tileRope[450] = true; + Main.tileRope[451] = true; + Main.tilePile[330] = true; + Main.tilePile[331] = true; + Main.tilePile[332] = true; + Main.tilePile[333] = true; + for (int index = 0; index < 663; ++index) + Main.npcCatchable[index] = false; + Main.npcCatchable[46] = true; + Main.npcCatchable[55] = true; + Main.npcCatchable[74] = true; + Main.npcCatchable[148] = true; + Main.npcCatchable[149] = true; + Main.npcCatchable[297] = true; + Main.npcCatchable[298] = true; + Main.npcCatchable[299] = true; + Main.npcCatchable[300] = true; + Main.npcCatchable[355] = true; + Main.npcCatchable[356] = true; + Main.npcCatchable[357] = true; + Main.npcCatchable[358] = true; + Main.npcCatchable[359] = true; + Main.npcCatchable[360] = true; + Main.npcCatchable[361] = true; + Main.npcCatchable[362] = true; + Main.npcCatchable[363] = true; + Main.npcCatchable[364] = true; + Main.npcCatchable[365] = true; + Main.npcCatchable[366] = true; + Main.npcCatchable[367] = true; + Main.npcCatchable[374] = true; + Main.npcCatchable[377] = true; + Main.npcCatchable[539] = true; + Main.npcCatchable[538] = true; + Main.npcCatchable[484] = true; + Main.npcCatchable[485] = true; + Main.npcCatchable[486] = true; + Main.npcCatchable[487] = true; + Main.npcCatchable[583] = true; + Main.npcCatchable[584] = true; + Main.npcCatchable[585] = true; + Main.npcCatchable[592] = true; + Main.npcCatchable[593] = true; + Main.npcCatchable[595] = true; + Main.npcCatchable[596] = true; + Main.npcCatchable[597] = true; + Main.npcCatchable[598] = true; + Main.npcCatchable[599] = true; + Main.npcCatchable[600] = true; + Main.npcCatchable[601] = true; + Main.npcCatchable[604] = true; + Main.npcCatchable[605] = true; + Main.npcCatchable[602] = true; + Main.npcCatchable[603] = true; + Main.npcCatchable[606] = true; + Main.npcCatchable[607] = true; + Main.npcCatchable[608] = true; + Main.npcCatchable[609] = true; + Main.npcCatchable[610] = true; + Main.npcCatchable[611] = true; + Main.npcCatchable[612] = true; + Main.npcCatchable[613] = true; + Main.npcCatchable[614] = true; + Main.npcCatchable[616] = true; + Main.npcCatchable[617] = true; + Main.npcCatchable[626] = true; + Main.npcCatchable[627] = true; + Main.npcCatchable[639] = true; + Main.npcCatchable[640] = true; + Main.npcCatchable[641] = true; + Main.npcCatchable[642] = true; + Main.npcCatchable[643] = true; + Main.npcCatchable[644] = true; + Main.npcCatchable[645] = true; + Main.npcCatchable[646] = true; + Main.npcCatchable[647] = true; + Main.npcCatchable[648] = true; + Main.npcCatchable[649] = true; + Main.npcCatchable[650] = true; + Main.npcCatchable[651] = true; + Main.npcCatchable[652] = true; + Main.npcCatchable[653] = true; + Main.npcCatchable[654] = true; + Main.npcCatchable[655] = true; + Main.npcCatchable[661] = true; + for (int index = 442; index <= 448; ++index) + Main.npcCatchable[index] = true; + Main.SetTileValue(); + Main.tileSpelunker[6] = true; + Main.tileSpelunker[7] = true; + Main.tileSpelunker[8] = true; + Main.tileSpelunker[9] = true; + Main.tileSpelunker[12] = true; + Main.tileSpelunker[21] = true; + Main.tileSpelunker[467] = true; + Main.tileSpelunker[441] = true; + Main.tileSpelunker[468] = true; + Main.tileSpelunker[28] = true; + Main.tileSpelunker[107] = true; + Main.tileSpelunker[108] = true; + Main.tileSpelunker[111] = true; + Main.tileSpelunker[63] = true; + Main.tileSpelunker[64] = true; + Main.tileSpelunker[65] = true; + Main.tileSpelunker[66] = true; + Main.tileSpelunker[67] = true; + Main.tileSpelunker[68] = true; + Main.tileSpelunker[566] = true; + Main.tileSpelunker[166] = true; + Main.tileSpelunker[167] = true; + Main.tileSpelunker[168] = true; + Main.tileSpelunker[169] = true; + Main.tileSpelunker[178] = true; + Main.tileSpelunker[211] = true; + Main.tileSpelunker[221] = true; + Main.tileSpelunker[222] = true; + Main.tileSpelunker[223] = true; + Main.tileSpelunker[236] = true; + Main.tileSpelunker[37] = true; + Main.tileSpelunker[407] = true; + Main.tileSpelunker[227] = true; + Main.tileSpelunker[84] = true; + Main.tileSpelunker[83] = true; + Main.tileSpelunker[404] = true; + Main.SetupTileMerge(); + Main.tileSolid[379] = true; + Main.tileMergeDirt[249] = true; + Main.tileBrick[268] = true; + Main.tileBrick[262] = true; + Main.tileBrick[267] = true; + Main.tileBrick[265] = true; + Main.tileBrick[266] = true; + Main.tileBrick[264] = true; + Main.tileBrick[263] = true; + Main.tileSolid[371] = true; + Main.tileMergeDirt[371] = true; + Main.tileBlockLight[371] = true; + Main.tileBouncy[371] = true; + Main.tileBouncy[448] = true; + Main.tileBouncy[446] = true; + Main.tileBouncy[447] = true; + Main.tileFrameImportant[377] = true; + Main.tileFrameImportant[373] = true; + Main.tileFrameImportant[375] = true; + Main.tileFrameImportant[374] = true; + Main.tileFrameImportant[461] = true; + Main.tileLighted[372] = true; + Main.tileFrameImportant[372] = true; + Main.tileWaterDeath[372] = true; + Main.tileLavaDeath[372] = true; + Main.tileSolid[357] = true; + Main.tileBrick[357] = true; + Main.tileBrick[311] = true; + Main.tileSolid[408] = true; + Main.tileMergeDirt[408] = true; + Main.tileBrick[408] = true; + Main.tileSolid[409] = true; + Main.tileBrick[409] = true; + Main.tileSolid[415] = true; + Main.tileBrick[415] = true; + Main.tileLighted[415] = true; + Main.tileSolid[416] = true; + Main.tileBrick[416] = true; + Main.tileLighted[416] = true; + Main.tileSolid[417] = true; + Main.tileBrick[417] = true; + Main.tileLighted[417] = true; + Main.tileSolid[418] = true; + Main.tileBrick[418] = true; + Main.tileLighted[418] = true; + Main.tileSolid[498] = true; + Main.tileBrick[498] = true; + Main.tileBlockLight[498] = true; + Main.tileBrick[37] = true; + Main.tileBrick[117] = true; + Main.tileBrick[25] = true; + Main.tileBrick[203] = true; + Main.tileSolid[232] = true; + Main.tileSolid[311] = true; + Main.tileSolid[312] = true; + Main.tileSolid[313] = true; + Main.tileMergeDirt[311] = true; + Main.tileSolid[315] = true; + Main.tileMergeDirt[315] = true; + Main.tileSolid[321] = true; + Main.tileSolid[322] = true; + Main.tileBlockLight[321] = true; + Main.tileBlockLight[322] = true; + Main.tileMergeDirt[321] = true; + Main.tileMergeDirt[322] = true; + Main.tileBrick[321] = true; + Main.tileBrick[322] = true; + Main.tileShine[239] = 1100; + Main.tileSolid[239] = true; + Main.tileSolidTop[239] = true; + Main.tileSolid[380] = true; + Main.tileSolidTop[380] = true; + Main.tileFrameImportant[358] = true; + Main.tileFrameImportant[359] = true; + Main.tileFrameImportant[360] = true; + Main.tileFrameImportant[361] = true; + Main.tileFrameImportant[362] = true; + Main.tileFrameImportant[363] = true; + Main.tileFrameImportant[364] = true; + Main.tileFrameImportant[391] = true; + Main.tileLighted[391] = true; + Main.tileFrameImportant[392] = true; + Main.tileFrameImportant[393] = true; + Main.tileFrameImportant[394] = true; + Main.tileFrameImportant[542] = true; + Main.tileFrameImportant[505] = true; + Main.tileFrameImportant[521] = true; + Main.tileFrameImportant[522] = true; + Main.tileFrameImportant[523] = true; + Main.tileFrameImportant[524] = true; + Main.tileFrameImportant[525] = true; + Main.tileFrameImportant[526] = true; + Main.tileFrameImportant[527] = true; + Main.tileFrameImportant[543] = true; + Main.tileFrameImportant[568] = true; + Main.tileFrameImportant[569] = true; + Main.tileFrameImportant[570] = true; + Main.tileFrameImportant[598] = true; + Main.tileFrameImportant[356] = true; + Main.tileFrameImportant[334] = true; + Main.tileFrameImportant[440] = true; + Main.tileFrameImportant[471] = true; + Main.tileFrameImportant[300] = true; + Main.tileFrameImportant[301] = true; + Main.tileFrameImportant[302] = true; + Main.tileFrameImportant[303] = true; + Main.tileFrameImportant[304] = true; + Main.tileFrameImportant[305] = true; + Main.tileFrameImportant[306] = true; + Main.tileFrameImportant[307] = true; + Main.tileFrameImportant[308] = true; + Main.tileFrameImportant[354] = true; + Main.tileLighted[354] = true; + Main.tileFrameImportant[499] = true; + Main.tileFrameImportant[355] = true; + Main.tileFrameImportant[324] = true; + Main.tileObsidianKill[324] = true; + Main.tileLavaDeath[324] = true; + Main.tileFrameImportant[463] = true; + Main.tileFrameImportant[491] = true; + Main.tileFrameImportant[464] = true; + Main.tileFrameImportant[466] = true; + Main.tileFrameImportant[419] = true; + Main.tileFrameImportant[442] = true; + Main.tileFrameImportant[443] = true; + Main.tileFrameImportant[444] = true; + Main.tileFrameImportant[420] = true; + Main.tileFrameImportant[423] = true; + Main.tileFrameImportant[424] = true; + Main.tileFrameImportant[428] = true; + Main.tileFrameImportant[520] = true; + Main.tileFrameImportant[429] = true; + Main.tileFrameImportant[445] = true; + Main.tileFrameImportant[476] = true; + Main.tileFrameImportant[283] = true; + Main.tileFrameImportant[288] = true; + Main.tileFrameImportant[289] = true; + Main.tileFrameImportant[290] = true; + Main.tileFrameImportant[291] = true; + Main.tileFrameImportant[292] = true; + Main.tileFrameImportant[293] = true; + Main.tileFrameImportant[294] = true; + Main.tileFrameImportant[295] = true; + Main.tileFrameImportant[296] = true; + Main.tileFrameImportant[297] = true; + Main.tileFrameImportant[316] = true; + Main.tileFrameImportant[317] = true; + Main.tileFrameImportant[318] = true; + Main.tileLargeFrames[284] = (byte) 1; + Main.wallHouse[224] = true; + Main.wallLargeFrames[224] = (byte) 2; + Main.wallHouse[60] = true; + Main.wallHouse[225] = true; + Main.wallHouse[226] = true; + Main.wallHouse[227] = true; + Main.wallHouse[231] = true; + Main.wallHouse[232] = true; + Main.wallHouse[233] = true; + Main.wallHouse[235] = true; + Main.wallHouse[234] = true; + Main.wallHouse[312] = true; + Main.wallHouse[313] = true; + Main.wallHouse[237] = true; + Main.wallHouse[238] = true; + Main.wallHouse[239] = true; + Main.wallHouse[240] = true; + Main.tileLargeFrames[409] = (byte) 2; + Main.tileFrameImportant[410] = true; + Main.tileFrameImportant[480] = true; + Main.tileFrameImportant[509] = true; + Main.wallHouse[173] = true; + Main.wallHouse[183] = true; + Main.wallHouse[179] = true; + Main.wallLargeFrames[179] = (byte) 1; + Main.tileSolid[367] = true; + Main.tileBlockLight[367] = true; + Main.tileMergeDirt[367] = true; + Main.tileSolid[357] = true; + Main.tileBlockLight[357] = true; + Main.tileLargeFrames[357] = (byte) 1; + Main.tileBlendAll[357] = true; + Main.wallHouse[184] = true; + Main.wallHouse[181] = true; + Main.tileSolid[368] = true; + Main.tileBlockLight[368] = true; + Main.tileMergeDirt[368] = true; + Main.tileSolid[369] = true; + Main.tileBlockLight[369] = true; + Main.tileBrick[369] = true; + Main.tileMergeDirt[369] = true; + Main.wallHouse[186] = true; + Main.tileLargeFrames[325] = (byte) 1; + Main.tileSolid[325] = true; + Main.tileBlockLight[325] = true; + Main.wallLargeFrames[146] = (byte) 1; + Main.wallLargeFrames[147] = (byte) 1; + Main.wallLargeFrames[167] = (byte) 1; + Main.wallLargeFrames[185] = (byte) 2; + Main.wallLargeFrames[274] = (byte) 2; + Main.tileSolid[460] = true; + Main.tileSolid[326] = true; + Main.tileBlockLight[326] = true; + Main.tileBrick[326] = true; + Main.tileSolid[458] = true; + Main.tileBlockLight[458] = true; + Main.tileBrick[458] = true; + Main.tileSolid[459] = true; + Main.tileBrick[459] = true; + Main.tileSolid[327] = true; + Main.tileBlockLight[327] = true; + Main.tileBrick[327] = true; + Main.tileSolid[345] = true; + Main.tileBlockLight[345] = true; + Main.tileBrick[345] = true; + Main.tileLighted[327] = true; + Main.tileSolid[328] = true; + Main.tileBrick[328] = true; + Main.tileSolid[329] = true; + Main.tileBrick[329] = true; + Main.tileBlockLight[329] = true; + Main.tileSolid[507] = true; + Main.tileBlockLight[507] = true; + Main.tileBrick[507] = true; + Main.tileSolid[508] = true; + Main.tileBlockLight[508] = true; + Main.tileBrick[508] = true; + Main.tileLighted[336] = true; + Main.tileLighted[340] = true; + Main.tileLighted[341] = true; + Main.tileLighted[342] = true; + Main.tileLighted[343] = true; + Main.tileLighted[344] = true; + Main.tileLighted[349] = true; + Main.tileLighted[598] = true; + Main.tileSolid[421] = true; + Main.tileBlockLight[421] = true; + Main.tileSolid[422] = true; + Main.tileBlockLight[422] = true; + Main.tileSolid[426] = true; + Main.tileBlockLight[426] = true; + Main.tileSolid[430] = true; + Main.tileBlockLight[430] = true; + Main.tileSolid[431] = true; + Main.tileBlockLight[431] = true; + Main.tileSolid[432] = true; + Main.tileBlockLight[432] = true; + Main.tileSolid[433] = true; + Main.tileBlockLight[433] = true; + Main.tileSolid[434] = true; + Main.tileBlockLight[434] = true; + Main.tileSolid[446] = true; + Main.tileSolid[447] = true; + Main.tileSolid[448] = true; + Main.tileFrameImportant[427] = true; + Main.tileSolidTop[427] = true; + Main.tileSolid[427] = true; + Main.tileNoAttach[427] = true; + Main.tileTable[427] = true; + Main.tileLavaDeath[427] = true; + Main.tileNoSunLight[427] = false; + Main.tileSolid[476] = true; + for (int index = 435; index <= 439; ++index) + { + Main.tileFrameImportant[index] = true; + Main.tileSolidTop[index] = true; + Main.tileSolid[index] = true; + Main.tileNoAttach[index] = true; + Main.tileTable[index] = true; + Main.tileLavaDeath[index] = true; + Main.tileNoSunLight[index] = false; + } + Main.tileSolid[284] = true; + Main.tileBlockLight[284] = true; + Main.tileSolid[346] = true; + Main.tileBlockLight[346] = true; + Main.tileLighted[346] = true; + Main.tileShine[346] = 2000; + Main.tileShine2[346] = true; + Main.tileBrick[346] = true; + Main.tileMergeDirt[346] = true; + Main.tileSolid[347] = true; + Main.tileBlockLight[347] = true; + Main.tileLighted[347] = true; + Main.tileShine[347] = 1900; + Main.tileShine2[347] = true; + Main.tileBrick[347] = true; + Main.tileMergeDirt[347] = true; + Main.tileSolid[348] = true; + Main.tileBlockLight[348] = true; + Main.tileLighted[348] = true; + Main.tileShine[348] = 1800; + Main.tileShine2[348] = true; + Main.tileBrick[348] = true; + Main.tileMergeDirt[348] = true; + Main.tileSolid[350] = true; + Main.tileBlockLight[350] = true; + Main.tileLighted[350] = true; + Main.tileBrick[350] = true; + Main.tileMergeDirt[350] = true; + Main.tileGlowMask[350] = (short) 94; + Main.tileGlowMask[390] = (short) 130; + Main.tileGlowMask[381] = (short) 126; + Main.tileGlowMask[517] = (short) 258; + Main.tileGlowMask[534] = (short) 259; + Main.tileGlowMask[535] = (short) 260; + Main.tileGlowMask[536] = (short) 261; + Main.tileGlowMask[537] = (short) 262; + Main.tileGlowMask[539] = (short) 263; + Main.tileGlowMask[540] = (short) 264; + Main.tileGlowMask[370] = (short) 111; + Main.tileGlowMask[429] = (short) 214; + Main.tileGlowMask[209] = (short) 215; + Main.tileGlowMask[445] = (short) 214; + Main.tileGlowMask[129] = (short) -2; + Main.tileLighted[429] = true; + Main.tileLighted[209] = true; + Main.tileGlowMask[410] = (short) 201; + Main.tileGlowMask[509] = (short) 265; + Main.tileSolid[370] = true; + Main.tileBlockLight[370] = true; + Main.tileLighted[370] = true; + Main.tileShine[370] = 1900; + Main.tileShine2[370] = true; + Main.tileBrick[370] = true; + Main.tileMergeDirt[370] = true; + Main.tileContainer[21] = true; + Main.tileContainer[467] = true; + Main.tileContainer[88] = true; + Main.tileContainer[470] = true; + Main.tileContainer[475] = true; + Main.tileSign[55] = true; + Main.tileSign[85] = true; + Main.tileSign[425] = true; + Main.tileSign[573] = true; + Main.tileSolid[383] = true; + Main.tileBrick[383] = true; + Main.tileBlockLight[383] = true; + Main.tileSolid[385] = true; + Main.tileBrick[385] = true; + Main.tileBlockLight[385] = true; + Main.tileSolid[472] = true; + Main.tileBrick[472] = true; + Main.tileMergeDirt[472] = true; + Main.tileBlockLight[472] = true; + Main.tileSolid[473] = true; + Main.tileBrick[473] = true; + Main.tileMergeDirt[473] = true; + Main.tileBlockLight[473] = true; + Main.tileSolid[500] = true; + Main.tileBrick[500] = true; + Main.tileLighted[500] = true; + Main.tileMergeDirt[500] = true; + Main.tileBlockLight[500] = true; + Main.tileSolid[501] = true; + Main.tileBrick[501] = true; + Main.tileLighted[501] = true; + Main.tileMergeDirt[501] = true; + Main.tileBlockLight[501] = true; + Main.tileSolid[502] = true; + Main.tileBrick[502] = true; + Main.tileLighted[502] = true; + Main.tileMergeDirt[502] = true; + Main.tileBlockLight[502] = true; + Main.tileSolid[503] = true; + Main.tileBrick[503] = true; + Main.tileLighted[503] = true; + Main.tileMergeDirt[503] = true; + Main.tileBlockLight[503] = true; + Main.tileSolid[541] = true; + Main.tileBlockLight[541] = false; + Main.tileSolid[546] = true; + Main.tileBlockLight[546] = false; + Main.tileSolid[557] = true; + Main.tileBlockLight[557] = true; + Main.tileSolid[474] = true; + Main.tileBrick[474] = true; + Main.tileMergeDirt[474] = true; + Main.tileBlockLight[474] = true; + Main.tileSolid[478] = true; + Main.tileBrick[478] = true; + Main.tileMergeDirt[478] = true; + Main.tileBlockLight[478] = true; + Main.tileSolid[479] = true; + Main.tileBrick[479] = true; + Main.tileMergeDirt[479] = true; + Main.tileBlockLight[479] = true; + Main.tileSolid[562] = true; + Main.tileBrick[562] = true; + Main.tileBlockLight[562] = true; + Main.tileMergeDirt[562] = true; + Main.tileSolid[563] = true; + Main.tileBrick[563] = true; + Main.tileBlockLight[563] = true; + Main.tileMergeDirt[563] = true; + Main.tileSolid[496] = true; + Main.tileBrick[496] = true; + Main.tileMergeDirt[496] = true; + Main.tileBlockLight[496] = true; + Main.tileSolid[495] = true; + Main.tileBrick[495] = true; + Main.tileMergeDirt[495] = true; + Main.tileBlockLight[495] = true; + Main.tileSolid[396] = true; + Main.tileBlockLight[396] = true; + Main.tileSolid[397] = true; + Main.tileBlockLight[397] = true; + Main.tileSolid[399] = true; + Main.tileBlockLight[399] = true; + Main.tileSolid[401] = true; + Main.tileBlockLight[401] = true; + Main.tileSolid[398] = true; + Main.tileBlockLight[398] = true; + Main.tileSolid[400] = true; + Main.tileBlockLight[400] = true; + Main.tileSolid[402] = true; + Main.tileBlockLight[402] = true; + Main.tileSolid[403] = true; + Main.tileBlockLight[403] = true; + Main.tileSolid[404] = true; + Main.tileBlockLight[404] = true; + Main.tileSolid[407] = true; + Main.tileBlockLight[407] = true; + Main.tileShine2[407] = true; + Main.tileShine[407] = 1000; + Main.tileFrameImportant[36] = true; + Main.tileFrameImportant[275] = true; + Main.tileFrameImportant[276] = true; + Main.tileFrameImportant[277] = true; + Main.tileFrameImportant[278] = true; + Main.tileFrameImportant[279] = true; + Main.tileFrameImportant[280] = true; + Main.tileFrameImportant[281] = true; + Main.tileFrameImportant[282] = true; + Main.tileFrameImportant[285] = true; + Main.tileFrameImportant[286] = true; + Main.tileFrameImportant[414] = true; + Main.tileFrameImportant[413] = true; + Main.tileFrameImportant[309] = true; + Main.tileFrameImportant[310] = true; + Main.tileFrameImportant[339] = true; + Main.tileFrameImportant[532] = true; + Main.tileLighted[286] = true; + Main.tileLighted[302] = true; + Main.tileFrameImportant[298] = true; + Main.tileFrameImportant[299] = true; + Main.tileSolid[170] = true; + Main.tileBlockLight[170] = true; + Main.tileFrameImportant[171] = true; + Main.tileLighted[171] = true; + Main.tileFrameImportant[247] = true; + Main.tileFrameImportant[245] = true; + Main.tileFrameImportant[246] = true; + Main.tileFrameImportant[239] = true; + Main.tileFrameImportant[240] = true; + Main.tileFrameImportant[241] = true; + Main.tileFrameImportant[242] = true; + Main.tileFrameImportant[243] = true; + Main.tileFrameImportant[244] = true; + Main.tileFrameImportant[254] = true; + Main.tileSolid[221] = true; + Main.tileBlockLight[221] = true; + Main.tileMergeDirt[221] = true; + Main.tileLighted[96] = true; + Main.tileMergeDirt[250] = true; + Main.tileSolid[272] = true; + Main.tileBlockLight[272] = true; + Main.tileSolid[229] = true; + Main.tileBlockLight[229] = true; + Main.tileMergeDirt[229] = true; + Main.tileSolid[230] = true; + Main.tileBlockLight[230] = true; + Main.tileMergeDirt[230] = true; + Main.tileSolid[222] = true; + Main.tileBlockLight[222] = true; + Main.tileMergeDirt[222] = true; + Main.tileSolid[223] = true; + Main.tileBlockLight[223] = true; + Main.tileMergeDirt[223] = true; + Main.tileSolid[224] = true; + Main.tileBlockLight[224] = true; + Main.tileFrameImportant[237] = true; + Main.tileFrameImportant[238] = true; + Main.tileSolid[225] = true; + Main.tileBlockLight[225] = true; + Main.tileBrick[225] = true; + Main.tileSolid[226] = true; + Main.tileBlockLight[226] = true; + Main.tileBrick[226] = true; + Main.tileSolid[235] = true; + Main.tileBlockLight[235] = true; + Main.tileFrameImportant[235] = true; + Main.tileLighted[238] = true; + Main.tileCut[254] = true; + Main.tileFrameImportant[236] = true; + Main.tileCut[236] = true; + Main.tileSolid[191] = true; + Main.tileBrick[191] = true; + Main.tileBlockLight[191] = true; + Main.tileSolid[211] = true; + Main.tileBlockLight[211] = true; + Main.tileSolid[208] = true; + Main.tileBrick[208] = true; + Main.tileBlockLight[208] = true; + Main.tileSolid[192] = true; + Main.tileBlockLight[192] = true; + Main.tileSolid[193] = true; + Main.tileBrick[193] = true; + Main.tileBlockLight[193] = true; + Main.tileMergeDirt[193] = true; + Main.tileSolid[194] = true; + Main.tileBrick[194] = true; + Main.tileBlockLight[194] = true; + Main.tileSolid[195] = true; + Main.tileBrick[195] = true; + Main.tileMergeDirt[195] = true; + Main.tileBlockLight[195] = true; + Main.tileBlockLight[200] = true; + Main.tileSolid[200] = true; + Main.tileBrick[200] = true; + Main.tileBlockLight[203] = true; + Main.tileSolid[203] = true; + Main.tileMergeDirt[203] = true; + Main.tileBlockLight[204] = true; + Main.tileSolid[204] = true; + Main.tileMergeDirt[204] = true; + Main.tileBlockLight[165] = true; + Main.tileShine2[147] = true; + Main.tileShine2[161] = true; + Main.tileShine2[163] = true; + Main.tileShine2[164] = true; + Main.tileSolid[189] = true; + Main.tileBlockLight[51] = true; + Main.tileLighted[204] = true; + Main.tileShine[204] = 1150; + Main.tileShine2[204] = true; + Main.tileSolid[190] = true; + Main.tileBlockLight[190] = true; + Main.tileBrick[190] = true; + Main.tileSolid[198] = true; + Main.tileMergeDirt[198] = true; + Main.tileBrick[198] = true; + Main.tileBlockLight[198] = true; + Main.tileSolid[206] = true; + Main.tileBlockLight[206] = true; + Main.tileMergeDirt[206] = true; + Main.tileBrick[206] = true; + Main.tileBlockLight[234] = true; + Main.tileSolid[248] = true; + Main.tileSolid[249] = true; + Main.tileSolid[250] = true; + Main.tileBrick[248] = true; + Main.tileBrick[249] = true; + Main.tileBrick[250] = true; + Main.tileSolid[251] = true; + Main.tileSolid[252] = true; + Main.tileBrick[252] = true; + Main.tileSolid[253] = true; + Main.tileBrick[253] = true; + Main.tileMergeDirt[251] = true; + Main.tileMergeDirt[252] = true; + Main.tileMergeDirt[253] = true; + Main.tileBlockLight[251] = true; + Main.tileBlockLight[252] = true; + Main.tileBlockLight[253] = true; + Main.tileBlockLight[248] = true; + Main.tileBlockLight[249] = true; + Main.tileBlockLight[250] = true; + Main.tileLargeFrames[273] = (byte) 1; + Main.tileSolid[273] = true; + Main.tileBlockLight[273] = true; + Main.tileLargeFrames[274] = (byte) 1; + Main.tileSolid[274] = true; + Main.tileBlockLight[274] = true; + Main.tileLargeFrames[618] = (byte) 1; + Main.tileSolid[618] = true; + Main.tileBlockLight[618] = true; + for (int maxValue = (int) byte.MaxValue; maxValue <= 268; ++maxValue) + { + Main.tileSolid[maxValue] = true; + if (maxValue > 261) + { + Main.tileLighted[maxValue] = true; + Main.tileShine2[maxValue] = true; + } + } + Main.tileFrameImportant[269] = true; + Main.tileFrameImportant[470] = true; + Main.tileFrameImportant[475] = true; + Main.tileFrameImportant[390] = true; + Main.tileFrameImportant[597] = true; + Main.tileLighted[597] = true; + Main.tileNoAttach[390] = true; + Main.tileLavaDeath[390] = true; + Main.tileLighted[390] = true; + Main.tileFrameImportant[617] = true; + Main.wallHouse[168] = true; + Main.wallHouse[169] = true; + Main.wallHouse[142] = true; + Main.wallHouse[143] = true; + Main.wallHouse[144] = true; + Main.wallHouse[149] = true; + Main.wallHouse[151] = true; + Main.wallHouse[150] = true; + Main.wallHouse[152] = true; + Main.wallHouse[145] = true; + Main.wallHouse[148] = true; + Main.wallHouse[175] = true; + Main.wallHouse[176] = true; + Main.wallHouse[182] = true; + for (int index = 153; index < 167; ++index) + Main.wallHouse[index] = true; + Main.wallHouse[146] = true; + Main.wallHouse[147] = true; + Main.wallHouse[149] = true; + Main.wallHouse[167] = true; + Main.wallHouse[168] = true; + Main.wallHouse[133] = true; + Main.wallHouse[134] = true; + Main.wallHouse[135] = true; + Main.wallHouse[136] = true; + Main.wallHouse[137] = true; + Main.wallHouse[75] = true; + Main.wallHouse[76] = true; + Main.wallHouse[78] = true; + Main.wallHouse[82] = true; + Main.wallHouse[77] = true; + Main.wallHouse[1] = true; + Main.wallHouse[4] = true; + Main.wallHouse[5] = true; + Main.wallHouse[6] = true; + Main.wallHouse[10] = true; + Main.wallHouse[11] = true; + Main.wallHouse[12] = true; + Main.wallHouse[16] = true; + Main.wallHouse[17] = true; + Main.wallHouse[18] = true; + Main.wallHouse[19] = true; + Main.wallHouse[20] = true; + Main.wallHouse[21] = true; + Main.wallHouse[22] = true; + Main.wallHouse[23] = true; + Main.wallHouse[24] = true; + Main.wallHouse[25] = true; + Main.wallHouse[26] = true; + Main.wallHouse[27] = true; + Main.wallHouse[29] = true; + Main.wallHouse[30] = true; + Main.wallHouse[31] = true; + Main.wallHouse[32] = true; + Main.wallHouse[33] = true; + Main.wallHouse[34] = true; + Main.wallHouse[35] = true; + Main.wallHouse[36] = true; + Main.wallHouse[37] = true; + Main.wallHouse[38] = true; + Main.wallHouse[39] = true; + Main.wallHouse[41] = true; + Main.wallHouse[42] = true; + Main.wallHouse[43] = true; + Main.wallHouse[44] = true; + Main.wallHouse[45] = true; + Main.wallHouse[46] = true; + Main.wallHouse[47] = true; + Main.wallHouse[66] = true; + Main.wallHouse[67] = true; + Main.wallHouse[68] = true; + Main.wallHouse[72] = true; + Main.wallHouse[73] = true; + Main.wallHouse[107] = true; + Main.wallHouse[106] = true; + Main.wallHouse[245] = true; + Main.wallHouse[315] = true; + Main.wallHouse[109] = true; + Main.wallHouse[110] = true; + Main.wallHouse[111] = true; + Main.wallHouse[112] = true; + Main.wallHouse[113] = true; + Main.wallHouse[114] = true; + Main.wallHouse[115] = true; + Main.wallHouse[116] = true; + Main.wallHouse[117] = true; + Main.wallHouse[118] = true; + Main.wallHouse[119] = true; + Main.wallHouse[120] = true; + Main.wallHouse[121] = true; + Main.wallHouse[122] = true; + Main.wallHouse[123] = true; + Main.wallHouse[124] = true; + Main.wallHouse[125] = true; + Main.wallHouse[108] = true; + Main.wallHouse[100] = true; + Main.wallHouse[101] = true; + Main.wallHouse[102] = true; + Main.wallHouse[103] = true; + Main.wallHouse[104] = true; + Main.wallHouse[105] = true; + Main.wallHouse[84] = true; + Main.wallHouse[74] = true; + Main.wallHouse[241] = true; + Main.wallHouse[85] = true; + Main.wallHouse[88] = true; + Main.wallHouse[89] = true; + Main.wallHouse[90] = true; + Main.wallHouse[91] = true; + Main.wallHouse[92] = true; + Main.wallHouse[93] = true; + Main.wallHouse[126] = true; + Main.wallHouse[(int) sbyte.MaxValue] = true; + Main.wallHouse[128] = true; + Main.wallHouse[129] = true; + Main.wallHouse[130] = true; + Main.wallHouse[131] = true; + Main.wallHouse[132] = true; + Main.wallHouse[138] = true; + Main.wallHouse[139] = true; + Main.wallHouse[140] = true; + Main.wallHouse[141] = true; + Main.wallHouse[177] = true; + Main.wallHouse[172] = true; + Main.wallHouse[242] = true; + Main.wallHouse[243] = true; + Main.wallHouse[174] = true; + Main.wallHouse[223] = true; + Main.wallHouse[230] = true; + Main.wallHouse[228] = true; + Main.wallHouse[229] = true; + Main.wallHouse[236] = true; + Main.wallHouse[246] = true; + Main.wallHouse[247] = true; + Main.wallHouse[248] = true; + Main.wallHouse[249] = true; + Main.wallHouse[250] = true; + Main.wallHouse[251] = true; + Main.wallHouse[252] = true; + Main.wallHouse[253] = true; + Main.wallHouse[254] = true; + Main.wallHouse[(int) byte.MaxValue] = true; + Main.wallHouse[314] = true; + Main.wallHouse[256] = true; + Main.wallHouse[257] = true; + Main.wallHouse[258] = true; + Main.wallHouse[259] = true; + Main.wallHouse[260] = true; + Main.wallHouse[261] = true; + Main.wallHouse[262] = true; + Main.wallHouse[263] = true; + Main.wallHouse[264] = true; + Main.wallHouse[265] = true; + Main.wallHouse[266] = true; + Main.wallHouse[267] = true; + Main.wallHouse[268] = true; + Main.wallHouse[269] = true; + Main.wallHouse[270] = true; + Main.wallHouse[271] = true; + Main.wallHouse[272] = true; + Main.wallHouse[273] = true; + Main.wallHouse[274] = true; + Main.wallHouse[275] = true; + Main.wallHouse[276] = true; + Main.wallHouse[277] = true; + Main.wallHouse[278] = true; + Main.wallHouse[279] = true; + Main.wallHouse[280] = true; + Main.wallHouse[281] = true; + Main.wallHouse[282] = true; + Main.wallHouse[283] = true; + Main.wallHouse[284] = true; + Main.wallHouse[285] = true; + Main.wallHouse[286] = true; + Main.wallHouse[287] = true; + Main.wallHouse[288] = true; + Main.wallHouse[289] = true; + Main.wallHouse[290] = true; + Main.wallHouse[291] = true; + Main.wallHouse[292] = true; + Main.wallHouse[293] = true; + Main.wallHouse[294] = true; + Main.wallHouse[295] = true; + Main.wallHouse[296] = true; + Main.wallHouse[297] = true; + Main.wallHouse[298] = true; + Main.wallHouse[299] = true; + Main.wallHouse[300] = true; + Main.wallHouse[301] = true; + Main.wallHouse[302] = true; + Main.wallHouse[303] = true; + Main.wallHouse[304] = true; + Main.wallHouse[305] = true; + Main.wallHouse[306] = true; + Main.wallHouse[307] = true; + Main.wallHouse[308] = true; + Main.wallHouse[309] = true; + Main.wallHouse[310] = true; + Main.wallHouse[311] = true; + Main.wallLight[0] = true; + Main.wallLight[21] = true; + Main.wallLight[106] = true; + Main.wallLight[107] = true; + Main.wallLight[138] = true; + Main.wallLight[140] = true; + Main.wallLight[141] = true; + Main.wallLight[139] = true; + Main.wallLight[145] = true; + Main.wallLight[150] = true; + Main.wallLight[152] = true; + Main.wallLight[245] = true; + Main.wallLight[315] = true; + Main.wallLight[168] = true; + for (int index = 0; index < 316; ++index) + Main.wallDungeon[index] = false; + Main.wallDungeon[7] = true; + Main.wallDungeon[8] = true; + Main.wallDungeon[9] = true; + Main.wallDungeon[94] = true; + Main.wallDungeon[95] = true; + Main.wallDungeon[96] = true; + Main.wallDungeon[97] = true; + Main.wallDungeon[98] = true; + Main.wallDungeon[99] = true; + } + + private void ClientInitialize() + { + MessageBuffer.OnTileChangeReceived += new TileChangeReceivedEvent(this.OnTileChangeEvent); + LanguageManager.Instance.OnLanguageChanged += (LanguageChangeCallback) (languageManager => ItemTooltip.InvalidateTooltips()); + PlayerInput.OnBindingChange += new Action(ItemTooltip.InvalidateTooltips); + Main.clientUUID = Guid.NewGuid().ToString(); + FilterManager scene = Terraria.Graphics.Effects.Filters.Scene; + ((Platform) Platform.Current).InitializeClientServices(this.Window.Handle); + Platform.Get().AddKeyListener((Action) (keyStroke => + { + if (Main.keyCount >= 10) + return; + Main.keyInt[Main.keyCount] = (int) keyStroke; + Main.keyString[Main.keyCount] = keyStroke.ToString() ?? ""; + ++Main.keyCount; + })); + this.Window.AllowUserResizing = true; + this.LoadSettings(); + Main.SetDisplayMonitor(); + if (Main.screenWidth > GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width) + Main.screenWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width; + if (Main.screenHeight > GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height) + Main.screenHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height; + Main.graphics.ApplyChanges(); + if (Main.OnResolutionChanged != null) + Main.OnResolutionChanged(new Vector2((float) Main.screenWidth, (float) Main.screenHeight)); + this.CheckBunny(); + this.GraphicsDevice.DeviceLost += new EventHandler(this.GraphicsDeviceLost); + this.GraphicsDevice.DeviceReset += new EventHandler(this.GraphicsDeviceLost); + this.GraphicsDevice.DeviceResetting += new EventHandler(this.GraphicsDeviceLost); + if (Main._needsLanguageSelect) + Main.menuMode = 1212; + this._achievements = new AchievementManager(); + this._achievementAdvisor = new AchievementAdvisor(); + this.OpenRecent(); + UILinksInitializer.Load(); + Main.Chroma = new ChromaEngine(); + Main.ChromaPainter = new ChromaHotkeyPainter(); + Main.ChromaPainter.CollectBoundKeys(); + Main.CacheSupportedDisplaySizes(); + if (Main.autoJoin) + { + Main.LoadPlayers(); + Main.menuMode = 1; + Main.menuMultiplayer = true; + } + Main.fpsTimer.Start(); + } + + private static void CacheSupportedDisplaySizes() + { + Main.numDisplayModes = 0; + foreach (DisplayMode supportedDisplayMode in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes) + { + if (supportedDisplayMode.Width >= Main.minScreenW && supportedDisplayMode.Height >= Main.minScreenH && supportedDisplayMode.Width <= Main.maxScreenW && supportedDisplayMode.Height <= Main.maxScreenH) + { + bool flag = true; + for (int index = 0; index < Main.numDisplayModes; ++index) + { + if (supportedDisplayMode.Width == Main.displayWidth[index] && supportedDisplayMode.Height == Main.displayHeight[index]) + { + flag = false; + break; + } + } + if (flag) + { + Main.displayHeight[Main.numDisplayModes] = supportedDisplayMode.Height; + Main.displayWidth[Main.numDisplayModes] = supportedDisplayMode.Width; + ++Main.numDisplayModes; + } + } + } + } + + public static void LoadTestLog(string logname) + { + } + + private void OnceFailedLoadingAnAsset(string assetPath, Exception e) => FancyErrorPrinter.ShowFailedToLoadAssetError(e, assetPath); + + protected override void LoadContent() + { + SoundEngine.Initialize(); + if (XnaExtensions.Get((System.IServiceProvider) this.Services) == null) + AssetInitializer.CreateAssetServices(this.Services); + Main.Assets = XnaExtensions.Get((System.IServiceProvider) this.Services); + // ISSUE: method pointer + Main.Assets.AssetLoadFailHandler = new FailedToLoadAssetCustomAction((object) this, __methodptr(OnceFailedLoadingAnAsset)); + this.mapSectionTexture = new RenderTarget2D(this.GraphicsDevice, 200, 150); + Main.ShaderContentManager = new ContentManager(this.Content.ServiceProvider, this.Content.RootDirectory); + Main.PixelShaderRef.Value = Main.ShaderContentManager.Load("PixelShader"); + Main.VertexPixelShaderRef.Value = Main.ShaderContentManager.Load("PixelShader"); + Main.TileShaderRef.Value = Main.ShaderContentManager.Load("TileShader"); + Main.ScreenShaderRef.Value = Main.ShaderContentManager.Load("ScreenShader"); + Main.spriteBatch = new SpriteBatch(this.GraphicsDevice); + Main.tileBatch = new TileBatch(this.GraphicsDevice); + Main.DebugDrawer = new BasicDebugDrawer(this.GraphicsDevice); + Main.GameViewMatrix = new SpriteViewMatrix(this.GraphicsDevice); + Main.BackgroundViewMatrix = new SpriteViewMatrix(this.GraphicsDevice); + Main.AssetSourceController = new AssetSourceController(Main.Assets, (IEnumerable) new IContentSource[1] + { + (IContentSource) new XnaContentSource(this.Content.RootDirectory) + }); + VanillaContentValidator.Instance = new VanillaContentValidator("Terraria.IO.Data.ResourcePacksDefaultInfo.tsv"); + Main.AssetSourceController.UseResourcePacks(AssetInitializer.CreateResourcePackList((System.IServiceProvider) this.Services)); + AssetInitializer.LoadSplashAssets(true); + ChromaInitializer.Load(); + this._gameContentLoadProcess = this.LoadContent_Deferred(); + } + + private void LoadContent_TryEnteringHiDef() + { + Main.Configuration.Load(); + Main.Configuration.Get("UseExperimentalFeatures", ref Main.UseExperimentalFeatures); + Main.Configuration.Get("Support4K", ref Main.Support4K); + bool flag = Main.Support4K && this.GraphicsDevice.Adapter.IsProfileSupported(GraphicsProfile.HiDef); + if (GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width <= 1920 && GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height <= 1200) + flag = false; + if (!(Main.Support4K & flag) || this.GraphicsDevice.GraphicsProfile == GraphicsProfile.HiDef) + return; + Main.SetGraphicsProfile(GraphicsProfile.HiDef); + } + + protected IEnumerator LoadContent_Deferred() + { + yield return (object) null; + AssetInitializer.LoadAssetsWhileInInitialBlackScreen(); + yield return (object) null; + bool doneLoadingMusic = false; + IEnumerator musicLoadProcedure = this.LoadMusic_InSteps(); + while (!doneLoadingMusic) + { + try + { + if (!musicLoadProcedure.MoveNext()) + doneLoadingMusic = true; + } + catch + { + doneLoadingMusic = true; + Main.musicVolume = 0.0f; + Main.soundVolume = 0.0f; + } + yield return (object) null; + } + this._musicLoaded = true; + Main.splashTimer.Start(); + yield return (object) null; + this._begunMainAsyncLoad = true; + AssetInitializer.Load(true); + this._artLoaded = true; + Main.TownNPCHeadRenderer = new NPCHeadRenderer(TextureAssets.NpcHead); + Main.ContentThatNeedsRenderTargets.Add((INeedRenderTargetContent) Main.TownNPCHeadRenderer); + Main.BossNPCHeadRenderer = new NPCHeadRenderer(TextureAssets.NpcHeadBoss); + Main.ContentThatNeedsRenderTargets.Add((INeedRenderTargetContent) Main.BossNPCHeadRenderer); + } + + private void TickLoadProcess() => this._gameContentLoadProcess.MoveNext(); + + private void LoadContent_Music() => ((ThreadStart) (() => + { + try + { + this.LoadMusic(); + } + catch + { + Main.musicVolume = 0.0f; + Main.soundVolume = 0.0f; + } + this._musicLoaded = true; + Main.splashTimer.Start(); + }))(); + + private static void PostContentLoadInitialize() + { + LiquidRenderer.LoadContent(); + AchievementInitializer.Load(); + Main.AchievementAdvisor.Initialize(); + DyeInitializer.Load(); + ScreenEffectInitializer.Load(); + InGameNotificationsTracker.Initialize(); + Main.moonType = Main.rand.Next(9); + Main.windSpeedCurrent = (float) Main.rand.Next(-800, 801) * (1f / 1000f); + Main.windSpeedTarget = Main.windSpeedCurrent; + Main.numClouds = Main.rand.Next(200); + Mount.Initialize(); + Minecart.Initialize(); + Main.CacheSupportedDisplaySizes(); + ContentSamples.RebuildItemCreativeSortingIDsAfterRecipesAreSetUp(); + ContentSamples.CommonlyUsedContentSamples.PrepareAfterEverythingElseLoaded(); + } + + private void LoadMusic() + { + if (!SoundEngine.IsAudioSupported) + return; + Main.engine = new AudioEngine("Content\\TerrariaMusic.xgs"); + Main.soundBank = new SoundBank(Main.engine, "Content\\Sound Bank.xsb"); + Main.waveBank = new WaveBank(Main.engine, "Content\\Wave Bank.xwb"); + for (int index = 1; index < 89; ++index) + Main.music[index] = Main.soundBank.GetCue("Music_" + (object) index); + } + + private IEnumerator LoadMusic_InSteps() + { + Main.engine = new AudioEngine("Content\\TerrariaMusic.xgs"); + Main.soundBank = new SoundBank(Main.engine, "Content\\Sound Bank.xsb"); + Main.waveBank = new WaveBank(Main.engine, "Content\\Wave Bank.xwb"); + yield return (object) null; + for (int i = 1; i < 89; ++i) + { + Main.music[i] = Main.soundBank.GetCue("Music_" + (object) i); + yield return (object) null; + } + } + + protected override void UnloadContent() + { + } + + public static void CheckForMoonEventsStartingTemporarySeasons() + { + if (Main.netMode == 1) + return; + int num1 = Main.forceHalloweenForToday ? 1 : 0; + bool forceXmasForToday = Main.forceXMasForToday; + Main.forceXMasForToday = false; + Main.forceHalloweenForToday = false; + int waveNumber = NPC.waveNumber; + double waveKills = (double) NPC.waveKills; + if (Main.pumpkinMoon && waveNumber >= 15) + Main.forceHalloweenForToday = true; + if (Main.snowMoon && waveNumber >= 20) + Main.forceXMasForToday = true; + Microsoft.Xna.Framework.Color color = new Microsoft.Xna.Framework.Color(50, (int) byte.MaxValue, 130); + int num2 = Main.forceHalloweenForToday ? 1 : 0; + if (num1 != num2) + WorldGen.BroadcastText(NetworkText.FromKey(Main.forceHalloweenForToday ? "Misc.StartedVictoryHalloween" : "Misc.EndedVictoryHalloween"), color); + if (forceXmasForToday == Main.forceXMasForToday) + return; + WorldGen.BroadcastText(NetworkText.FromKey(Main.forceXMasForToday ? "Misc.StartedVictoryXmas" : "Misc.EndedVictoryXmas"), color); + } + + public static void stopMoonEvent() + { + int waveNumber = NPC.waveNumber; + double waveKills = (double) NPC.waveKills; + if (Main.pumpkinMoon) + { + Main.pumpkinMoon = false; + if (Main.netMode != 1) + { + NPC.waveKills = 0.0f; + NPC.waveNumber = 0; + } + } + if (!Main.snowMoon) + return; + Main.snowMoon = false; + if (Main.netMode == 1) + return; + NPC.waveKills = 0.0f; + NPC.waveNumber = 0; + } + + public static void startPumpkinMoon() + { + Main.pumpkinMoon = true; + Main.snowMoon = false; + Main.bloodMoon = false; + Main.invasionProgress = -1; + Main.invasionProgressDisplayLeft = 0; + Main.invasionProgressAlpha = 0.0f; + Main.invasionProgressIcon = 0; + if (Main.netMode == 1) + return; + NPC.waveKills = 0.0f; + NPC.waveNumber = 1; + NetworkText invasionWaveText = Lang.GetInvasionWaveText(1, (short) 305); + if (Main.netMode == 0) + { + Main.NewText(invasionWaveText.ToString(), (byte) 175, (byte) 75); + } + else + { + if (Main.netMode != 2) + return; + ChatHelper.BroadcastChatMessage(invasionWaveText, new Microsoft.Xna.Framework.Color(175, 75, (int) byte.MaxValue)); + } + } + + public static void startSnowMoon() + { + Main.snowMoon = true; + Main.pumpkinMoon = false; + Main.bloodMoon = false; + Main.invasionProgress = -1; + Main.invasionProgressDisplayLeft = 0; + Main.invasionProgressAlpha = 0.0f; + Main.invasionProgressIcon = 0; + if (Main.netMode == 1) + return; + NPC.waveKills = 0.0f; + NPC.waveNumber = 1; + NetworkText invasionWaveText = Lang.GetInvasionWaveText(1, (short) 338, (short) 342); + if (Main.netMode == 0) + { + Main.NewText(invasionWaveText.ToString(), (byte) 175, (byte) 75); + } + else + { + if (Main.netMode != 2) + return; + ChatHelper.BroadcastChatMessage(invasionWaveText, new Microsoft.Xna.Framework.Color(175, 75, (int) byte.MaxValue)); + } + } + + protected void UpdateAudio() + { + if (!SoundEngine.IsAudioSupported || !this._musicLoaded) + return; + if (!Main.showSplash) + SoundEngine.Update(); + if ((double) Main.musicVolume == 0.0) + Main.curMusic = 0; + try + { + if (Main.dedServ) + return; + bool isActive = this.IsActive; + if (!isActive) + { + for (int index = 0; index < Main.music.Length; ++index) + { + if (Main.music[index] != null && !Main.music[index].IsPaused && Main.music[index].IsPlaying) + { + if ((double) Main.musicFade[index] > 0.0) + { + try + { + Main.music[index].Pause(); + } + catch (Exception ex) + { + } + } + } + } + SoundEngine.StopAmbientSounds(); + } + else + { + for (int index = 0; index < Main.music.Length; ++index) + { + if (Main.music[index] != null && Main.music[index].IsPaused) + { + if ((double) Main.musicFade[index] > 0.0) + { + try + { + Main.music[index].Resume(); + } + catch (Exception ex) + { + } + } + } + } + } + if (Main.drunkWorld) + Main.TOWMusicUnlocked = true; + if (Main.gameMenu) + Main.swapMusic = false; + if (Main.swapMusic) + { + if (Main.drunkWorld) + this.UpdateAudio_DecideOnNewMusic(); + else + this.UpdateAudio_DecideOnTOWMusic(); + } + else if (!Main.gameMenu && Main.drunkWorld) + this.UpdateAudio_DecideOnTOWMusic(); + else + this.UpdateAudio_DecideOnNewMusic(); + if (Main.gameMenu || (double) Main.musicVolume == 0.0) + { + Main.musicBox2 = -1; + Main.SceneMetrics.ActiveMusicBox = -1; + } + if (Main.musicBox2 >= 0) + Main.SceneMetrics.ActiveMusicBox = Main.musicBox2; + if (Main.SceneMetrics.ActiveMusicBox >= 0) + { + if (Main.SceneMetrics.ActiveMusicBox == 0) + this.newMusic = 1; + if (Main.SceneMetrics.ActiveMusicBox == 1) + this.newMusic = 2; + if (Main.SceneMetrics.ActiveMusicBox == 2) + this.newMusic = 3; + if (Main.SceneMetrics.ActiveMusicBox == 4) + this.newMusic = 4; + if (Main.SceneMetrics.ActiveMusicBox == 5) + this.newMusic = 5; + if (Main.SceneMetrics.ActiveMusicBox == 3) + this.newMusic = 6; + if (Main.SceneMetrics.ActiveMusicBox == 6) + this.newMusic = 7; + if (Main.SceneMetrics.ActiveMusicBox == 7) + this.newMusic = 8; + if (Main.SceneMetrics.ActiveMusicBox == 9) + this.newMusic = 9; + if (Main.SceneMetrics.ActiveMusicBox == 8) + this.newMusic = 10; + if (Main.SceneMetrics.ActiveMusicBox == 11) + this.newMusic = 11; + if (Main.SceneMetrics.ActiveMusicBox == 10) + this.newMusic = 12; + if (Main.SceneMetrics.ActiveMusicBox == 12) + this.newMusic = 13; + if (Main.SceneMetrics.ActiveMusicBox == 13) + this.newMusic = 14; + if (Main.SceneMetrics.ActiveMusicBox == 14) + this.newMusic = 15; + if (Main.SceneMetrics.ActiveMusicBox == 15) + this.newMusic = 16; + if (Main.SceneMetrics.ActiveMusicBox == 16) + this.newMusic = 17; + if (Main.SceneMetrics.ActiveMusicBox == 17) + this.newMusic = 18; + if (Main.SceneMetrics.ActiveMusicBox == 18) + this.newMusic = 19; + if (Main.SceneMetrics.ActiveMusicBox == 19) + this.newMusic = 20; + if (Main.SceneMetrics.ActiveMusicBox == 20) + this.newMusic = 21; + if (Main.SceneMetrics.ActiveMusicBox == 21) + this.newMusic = 22; + if (Main.SceneMetrics.ActiveMusicBox == 22) + this.newMusic = 23; + if (Main.SceneMetrics.ActiveMusicBox == 23) + this.newMusic = 24; + if (Main.SceneMetrics.ActiveMusicBox == 24) + this.newMusic = 25; + if (Main.SceneMetrics.ActiveMusicBox == 25) + this.newMusic = 26; + if (Main.SceneMetrics.ActiveMusicBox == 26) + this.newMusic = 27; + if (Main.SceneMetrics.ActiveMusicBox == 27) + this.newMusic = 29; + if (Main.SceneMetrics.ActiveMusicBox == 28) + this.newMusic = 30; + if (Main.SceneMetrics.ActiveMusicBox == 29) + this.newMusic = 31; + if (Main.SceneMetrics.ActiveMusicBox == 30) + this.newMusic = 32; + if (Main.SceneMetrics.ActiveMusicBox == 31) + this.newMusic = 33; + if (Main.SceneMetrics.ActiveMusicBox == 32) + this.newMusic = 38; + if (Main.SceneMetrics.ActiveMusicBox == 33) + this.newMusic = 37; + if (Main.SceneMetrics.ActiveMusicBox == 34) + this.newMusic = 35; + if (Main.SceneMetrics.ActiveMusicBox == 35) + this.newMusic = 36; + if (Main.SceneMetrics.ActiveMusicBox == 36) + this.newMusic = 34; + if (Main.SceneMetrics.ActiveMusicBox == 37) + this.newMusic = 39; + if (Main.SceneMetrics.ActiveMusicBox == 38) + this.newMusic = 40; + if (Main.SceneMetrics.ActiveMusicBox == 39) + this.newMusic = 41; + if (Main.SceneMetrics.ActiveMusicBox == 40) + this.newMusic = 44; + if (Main.SceneMetrics.ActiveMusicBox == 41) + this.newMusic = 48; + if (Main.SceneMetrics.ActiveMusicBox == 42) + this.newMusic = 42; + if (Main.SceneMetrics.ActiveMusicBox == 43) + this.newMusic = 43; + if (Main.SceneMetrics.ActiveMusicBox == 44) + this.newMusic = 46; + if (Main.SceneMetrics.ActiveMusicBox == 45) + this.newMusic = 47; + if (Main.SceneMetrics.ActiveMusicBox == 46) + this.newMusic = 49; + if (Main.SceneMetrics.ActiveMusicBox == 47) + this.newMusic = 51; + if (Main.SceneMetrics.ActiveMusicBox == 48) + this.newMusic = 52; + if (Main.SceneMetrics.ActiveMusicBox == 49) + this.newMusic = 53; + if (Main.SceneMetrics.ActiveMusicBox == 50) + this.newMusic = 54; + if (Main.SceneMetrics.ActiveMusicBox == 51) + this.newMusic = 55; + if (Main.SceneMetrics.ActiveMusicBox == 52) + this.newMusic = 56; + if (Main.SceneMetrics.ActiveMusicBox == 53) + this.newMusic = 57; + if (Main.SceneMetrics.ActiveMusicBox == 54) + this.newMusic = 58; + if (Main.SceneMetrics.ActiveMusicBox == 55) + this.newMusic = 59; + if (Main.SceneMetrics.ActiveMusicBox == 56) + this.newMusic = 60; + if (Main.SceneMetrics.ActiveMusicBox == 57) + this.newMusic = 61; + if (Main.SceneMetrics.ActiveMusicBox == 58) + this.newMusic = 62; + if (Main.SceneMetrics.ActiveMusicBox == 59) + this.newMusic = 63; + if (Main.SceneMetrics.ActiveMusicBox == 60) + this.newMusic = 64; + if (Main.SceneMetrics.ActiveMusicBox == 61) + this.newMusic = 65; + if (Main.SceneMetrics.ActiveMusicBox == 62) + this.newMusic = 66; + if (Main.SceneMetrics.ActiveMusicBox == 63) + this.newMusic = 67; + if (Main.SceneMetrics.ActiveMusicBox == 64) + this.newMusic = 68; + if (Main.SceneMetrics.ActiveMusicBox == 65) + this.newMusic = 69; + if (Main.SceneMetrics.ActiveMusicBox == 66) + this.newMusic = 70; + if (Main.SceneMetrics.ActiveMusicBox == 67) + this.newMusic = 71; + if (Main.SceneMetrics.ActiveMusicBox == 68) + this.newMusic = 72; + if (Main.SceneMetrics.ActiveMusicBox == 69) + this.newMusic = 73; + if (Main.SceneMetrics.ActiveMusicBox == 70) + this.newMusic = 74; + if (Main.SceneMetrics.ActiveMusicBox == 71) + this.newMusic = 75; + if (Main.SceneMetrics.ActiveMusicBox == 72) + this.newMusic = 76; + if (Main.SceneMetrics.ActiveMusicBox == 73) + this.newMusic = 77; + if (Main.SceneMetrics.ActiveMusicBox == 74) + this.newMusic = 78; + if (Main.SceneMetrics.ActiveMusicBox == 75) + this.newMusic = 79; + if (Main.SceneMetrics.ActiveMusicBox == 76) + this.newMusic = 80; + if (Main.SceneMetrics.ActiveMusicBox == 77) + this.newMusic = 81; + if (Main.SceneMetrics.ActiveMusicBox == 78) + this.newMusic = 82; + if (Main.SceneMetrics.ActiveMusicBox == 79) + this.newMusic = 83; + if (Main.SceneMetrics.ActiveMusicBox == 80) + this.newMusic = 84; + if (Main.SceneMetrics.ActiveMusicBox == 81) + this.newMusic = 85; + if (Main.SceneMetrics.ActiveMusicBox == 82) + this.newMusic = 86; + if (Main.SceneMetrics.ActiveMusicBox == 83) + this.newMusic = 87; + if (Main.SceneMetrics.ActiveMusicBox == 84) + this.newMusic = 88; + } + if (Main.curMusic != this.newMusic) + this._musicReplayDelay = 0; + if (this._musicReplayDelay > 0) + --this._musicReplayDelay; + Main.curMusic = this.newMusic; + float num1 = 1f; + if (NPC.MoonLordCountdown > 0) + { + float num2 = (float) NPC.MoonLordCountdown / 3600f; + float amount = num2 * num2; + if (NPC.MoonLordCountdown > 720) + { + num1 = MathHelper.Lerp(0.0f, 1f, amount); + } + else + { + num1 = 0.0f; + Main.curMusic = 0; + } + if (NPC.MoonLordCountdown == 1 && Main.curMusic >= 1 && Main.curMusic < 89) + Main.musicFade[Main.curMusic] = 0.0f; + } + for (int index = 1; index < 89; ++index) + { + float num3 = Main.musicFade[index] * Main.musicVolume * num1; + if (index >= 62 && index <= 88) + num3 *= 0.9f; + else if (index == 52) + { + num3 *= 1.15f; + if ((double) num3 > 1.0) + num3 = 1f; + } + if (index == 28) + { + float num4 = 0.5f; + float num5 = (float) ((double) Main.cloudAlpha / 9.0 * 10.0 * (double) num4 + (1.0 - (double) num4)); + if ((double) num5 > 1.0) + num5 = 1f; + if (Main.gameMenu) + num5 = 0.0f; + float num6 = num5 * (float) Math.Pow((double) Main.atmo, 4.0); + if ((double) Main.cloudAlpha > 0.0 && (double) Main.player[Main.myPlayer].position.Y < Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2) && !Main.player[Main.myPlayer].ZoneSnow) + { + if ((double) Main.ambientVolume == 0.0 || (double) num6 == 0.0) + { + if (Main.music[index].IsPlaying) + Main.music[index].Stop(AudioStopOptions.Immediate); + } + else if (!Main.music[index].IsPlaying) + { + Main.music[index] = Main.soundBank.GetCue("Music_" + (object) index); + Main.music[index].Play(); + Main.music[index].SetVariable("Volume", Main.musicFade[index] * Main.ambientVolume * num6); + } + else if (Main.music[index].IsPaused && this.IsActive) + { + Main.music[index].Resume(); + } + else + { + Main.musicFade[index] += 0.005f; + if ((double) Main.musicFade[index] > 1.0) + Main.musicFade[index] = 1f; + Main.music[index].SetVariable("Volume", Main.musicFade[index] * Main.ambientVolume * num6); + } + } + else if (Main.music[index].IsPlaying) + { + if ((double) Main.musicFade[index] > 0.0) + Main.musicFade[index] -= 0.005f; + if ((double) Main.musicFade[index] <= 0.0) + { + Main.musicFade[index] -= 0.0f; + Main.music[index].Stop(AudioStopOptions.Immediate); + } + else + Main.music[index].SetVariable("Volume", Main.musicFade[index] * Main.ambientVolume * num6); + } + else + Main.musicFade[index] = 0.0f; + } + else if (index == 45) + { + float num7 = 0.7f; + float num8 = (float) ((double) Math.Abs(Main.windSpeedCurrent) * (double) num7 + (1.0 - (double) num7)); + if ((double) num8 > 1.0) + num8 = 1f; + float num9 = num8 * 0.9f; + float num10 = 20f; + float num11 = num9 * (float) Math.Pow((double) Main.atmo, 4.0); + if (!Main.gameMenu && (double) Math.Abs(Main.windSpeedCurrent) >= (double) num10 / 50.0 && (double) Main.player[Main.myPlayer].position.Y < Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2)) + { + if ((double) Main.ambientVolume == 0.0 || (double) num11 == 0.0) + { + if (Main.music[index].IsPlaying) + Main.music[index].Stop(AudioStopOptions.Immediate); + } + else if (!Main.music[index].IsPlaying) + { + Main.music[index] = Main.soundBank.GetCue("Music_" + (object) index); + Main.music[index].Play(); + Main.music[index].SetVariable("Volume", Main.musicFade[index] * Main.ambientVolume * num11); + } + else if (Main.music[index].IsPaused && this.IsActive) + { + Main.music[index].Resume(); + } + else + { + Main.musicFade[index] += 0.005f; + if ((double) Main.musicFade[index] > 1.0) + Main.musicFade[index] = 1f; + Main.music[index].SetVariable("Volume", Main.musicFade[index] * Main.ambientVolume * num11); + } + } + else if (Main.music[index].IsPlaying) + { + if ((double) Main.musicFade[index] > 0.0) + Main.musicFade[index] -= 0.005f; + if ((double) Main.musicFade[index] <= 0.0) + { + Main.musicFade[index] -= 0.0f; + Main.music[index].Stop(AudioStopOptions.Immediate); + } + else + Main.music[index].SetVariable("Volume", Main.musicFade[index] * Main.ambientVolume * num11); + } + else + Main.musicFade[index] = 0.0f; + } + else if (index == Main.curMusic) + { + if (!Main.music[index].IsPlaying & isActive) + { + if (this._musicReplayDelay == 0) + { + if (Main.SettingMusicReplayDelayEnabled) + this._musicReplayDelay = Main.rand.Next(14400, 21601); + Main.music[index].Stop(AudioStopOptions.Immediate); + Main.music[index] = Main.soundBank.GetCue("Music_" + (object) index); + Main.music[index].SetVariable("Volume", num3); + Main.music[index].Play(); + } + } + else + { + Main.musicFade[index] += 0.005f; + if ((double) Main.musicFade[index] > 1.0) + Main.musicFade[index] = 1f; + Main.music[index].SetVariable("Volume", num3); + } + } + else if (Main.music[index].IsPlaying || !Main.music[index].IsStopped) + { + if ((double) Main.musicFade[Main.curMusic] > 0.25) + Main.musicFade[index] -= 0.005f; + else if (Main.curMusic == 0) + Main.musicFade[index] = 0.0f; + if ((double) Main.musicFade[index] <= 0.0) + { + Main.musicFade[index] = 0.0f; + Main.music[index].SetVariable("Volume", 0.0f); + Main.music[index].Stop(AudioStopOptions.Immediate); + } + else + Main.music[index].SetVariable("Volume", num3); + } + else + Main.musicFade[index] = 0.0f; + } + if (Main.musicError <= 0) + return; + --Main.musicError; + } + catch + { + ++Main.musicError; + if (Main.musicError < 100) + return; + Main.musicError = 0; + Main.musicVolume = 0.0f; + } + } + + public static bool IsItAHappyWindyDay => Main._shouldUseWindyDayMusic; + + public static bool IsItStorming => Main._shouldUseStormMusic; + + public static bool WindyEnoughForKiteDrops => (double) Math.Abs(Main.windSpeedTarget) >= (double) Main._maxWind; + + private void UpdateAudio_DecideOnTOWMusic() + { + bool flag1 = false; + bool flag2 = false; + bool flag3 = false; + bool flag4 = false; + bool flag5 = false; + bool flag6 = false; + bool flag7 = false; + bool flag8 = false; + bool flag9 = false; + bool flag10 = false; + bool flag11 = false; + bool flag12 = false; + bool flag13 = false; + bool flag14 = false; + bool flag15 = false; + if (!Main.showSplash) + { + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle((int) Main.screenPosition.X, (int) Main.screenPosition.Y, Main.screenWidth, Main.screenHeight); + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active) + { + int num1 = 5000; + int num2 = 0; + switch (Main.npc[index].type) + { + case 13: + case 14: + case 15: + num2 = 1; + break; + case 26: + case 27: + case 28: + case 29: + case 111: + case 471: + num2 = 11; + break; + case 113: + case 114: + num2 = 3; + break; + case 125: + case 126: + num2 = 2; + break; + case (int) sbyte.MaxValue: + case 134: + num2 = 2; + break; + case 143: + case 144: + case 145: + num2 = 11; + break; + case 212: + case 213: + case 214: + case 215: + case 216: + case 491: + num2 = 8; + break; + case 222: + num2 = 1; + break; + case 245: + num2 = 2; + break; + case 262: + case 263: + case 264: + num2 = 6; + break; + case 266: + num2 = 1; + break; + case 370: + num2 = 15; + break; + case 381: + case 382: + case 383: + case 385: + case 386: + case 388: + case 389: + case 390: + case 391: + case 395: + case 520: + num2 = 9; + break; + case 398: + num2 = 7; + break; + case 422: + case 493: + case 507: + case 517: + num2 = 10; + break; + case 438: + if ((double) Main.npc[index].ai[1] == 1.0) + { + num1 = 1600; + num2 = 2; + break; + } + break; + case 439: + num2 = 2; + break; + case 636: + num2 = 14; + break; + case 657: + num2 = 13; + break; + } + if (NPCID.Sets.BelongsToInvasionOldOnesArmy[Main.npc[index].type]) + num2 = 12; + if (num2 == 0 && Main.npc[index].boss) + num2 = 1; + if (num2 != 0) + { + Microsoft.Xna.Framework.Rectangle rectangle2 = new Microsoft.Xna.Framework.Rectangle((int) ((double) Main.npc[index].position.X + (double) (Main.npc[index].width / 2)) - num1, (int) ((double) Main.npc[index].position.Y + (double) (Main.npc[index].height / 2)) - num1, num1 * 2, num1 * 2); + if (rectangle1.Intersects(rectangle2)) + { + switch (num2) + { + case 1: + flag1 = true; + goto label_49; + case 2: + flag2 = true; + goto label_49; + case 3: + flag3 = true; + goto label_49; + case 4: + flag4 = true; + goto label_49; + case 5: + flag5 = true; + goto label_49; + case 6: + flag6 = true; + goto label_49; + case 7: + flag7 = true; + goto label_49; + case 8: + flag8 = true; + goto label_49; + case 9: + flag9 = true; + goto label_49; + case 10: + flag10 = true; + goto label_49; + case 11: + flag11 = true; + goto label_49; + case 12: + flag12 = true; + goto label_49; + case 13: + flag13 = true; + goto label_49; + case 14: + flag14 = true; + goto label_49; + case 15: + flag15 = true; + goto label_49; + default: + goto label_49; + } + } + } + } + } + } +label_49: + double num3 = ((double) Main.screenPosition.X + (double) (Main.screenWidth / 2)) / 16.0; + if ((double) Main.musicVolume == 0.0) + { + this.newMusic = 0; + } + else + { + float num4 = (float) (Main.maxTilesX / 4200); + float num5 = num4 * num4; + float num6 = (float) ((((double) Main.screenPosition.Y + (double) (Main.screenHeight / 2)) / 16.0 - (65.0 + 10.0 * (double) num5)) / (Main.worldSurface / 5.0)); + if (flag7) + this.newMusic = 84; + else if (flag9) + this.newMusic = 82; + else if (flag10) + this.newMusic = 83; + else if (flag6) + this.newMusic = 85; + else if (flag14) + this.newMusic = 80; + else if (flag15) + this.newMusic = 80; + else if (flag2) + this.newMusic = 80; + else if (flag1) + this.newMusic = 81; + else if (flag3) + this.newMusic = 87; + else if (flag4) + this.newMusic = 81; + else if (flag5) + this.newMusic = 81; + else if (flag13) + this.newMusic = 80; + else if (flag8) + this.newMusic = 82; + else if (flag11) + this.newMusic = 82; + else if (flag12) + this.newMusic = 82; + else if (Main.eclipse && (double) Main.player[Main.myPlayer].position.Y < Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2)) + this.newMusic = 79; + else if (Main.player[Main.myPlayer].ZoneSandstorm) + this.newMusic = 66; + else if ((double) Main.player[Main.myPlayer].position.Y > (double) (Main.UnderworldLayer * 16)) + this.newMusic = 71; + else if ((double) num6 < 1.0) + this.newMusic = 70; + else if (Main.tile[(int) ((double) Main.player[Main.myPlayer].Center.X / 16.0), (int) ((double) Main.player[Main.myPlayer].Center.Y / 16.0)].wall == (ushort) 87) + this.newMusic = 69; + else if (Main.player[Main.myPlayer].ZoneDungeon) + this.newMusic = 69; + else if (Main.bgStyle == 9 && (double) Main.player[Main.myPlayer].position.Y < Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2) || Main.undergroundBackground == 2) + this.newMusic = 68; + else if (Main.player[Main.myPlayer].ZoneCorrupt) + this.newMusic = !Main.player[Main.myPlayer].ZoneCrimson || Main.SceneMetrics.BloodTileCount <= Main.SceneMetrics.EvilTileCount ? ((double) Main.player[Main.myPlayer].position.Y <= Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2) ? 73 : 74) : ((double) Main.player[Main.myPlayer].position.Y <= Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2) ? 75 : 76); + else if (Main.player[Main.myPlayer].ZoneCrimson) + this.newMusic = (double) Main.player[Main.myPlayer].position.Y <= Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2) ? 75 : 76; + else if (Main.player[Main.myPlayer].ZoneMeteor) + this.newMusic = 79; + else if (Main.player[Main.myPlayer].ZoneGraveyard) + this.newMusic = 79; + else if (Main.player[Main.myPlayer].ZoneJungle) + this.newMusic = 86; + else if (Main.player[Main.myPlayer].ZoneSnow) + this.newMusic = (double) Main.player[Main.myPlayer].position.Y <= Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2) ? 72 : 77; + else if ((double) Main.player[Main.myPlayer].position.Y >= Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2) && !WorldGen.oceanDepths((int) ((double) Main.screenPosition.X + (double) (Main.screenWidth / 2)) / 16, (int) ((double) Main.screenPosition.Y + (double) (Main.screenHeight / 2)) / 16)) + this.newMusic = !Main.player[Main.myPlayer].ZoneHallow ? (!Main.player[Main.myPlayer].ZoneUndergroundDesert ? 65 : 66) : 78; + else if (Main.dayTime && Main.player[Main.myPlayer].ZoneHallow) + this.newMusic = (double) Main.cloudAlpha <= 0.0 || Main.gameMenu ? 88 : 62; + else if (Main._shouldUseStormMusic) + this.newMusic = !Main.bloodMoon ? 62 : 79; + else if (WorldGen.oceanDepths((int) ((double) Main.screenPosition.X + (double) (Main.screenWidth / 2)) / 16, (int) ((double) Main.screenPosition.Y + (double) (Main.screenHeight / 2)) / 16)) + this.newMusic = !Main.bloodMoon ? 67 : 79; + else if (Main.player[Main.myPlayer].ZoneDesert) + this.newMusic = 66; + else if (Main.dayTime) + this.newMusic = (double) Main.cloudAlpha <= 0.0 || Main.gameMenu ? 63 : 62; + else if (!Main.dayTime) + this.newMusic = !Main.bloodMoon ? ((double) Main.cloudAlpha <= 0.0 || Main.gameMenu ? 64 : 64) : 79; + if ((double) Main.screenPosition.Y / 16.0 < Main.worldSurface + 10.0 && Main.pumpkinMoon) + this.newMusic = 82; + if ((double) Main.screenPosition.Y / 16.0 >= Main.worldSurface + 10.0 || !Main.snowMoon) + return; + this.newMusic = 82; + } + } + + private void UpdateAudio_DecideOnNewMusic() + { + bool flag1 = false; + bool flag2 = false; + bool flag3 = false; + bool flag4 = false; + bool flag5 = false; + bool flag6 = false; + bool flag7 = false; + bool flag8 = false; + bool flag9 = false; + bool flag10 = false; + bool flag11 = false; + bool flag12 = false; + bool flag13 = false; + bool flag14 = false; + bool flag15 = false; + bool flag16 = (double) Main.LocalPlayer.townNPCs > 2.0; + bool slimeRain = Main.slimeRain; + float num1 = 0.0f; + for (int index = 0; index < 89; ++index) + { + if ((double) Main.musicFade[index] > (double) num1) + { + num1 = Main.musicFade[index]; + if ((double) num1 == 1.0) + this.lastMusicPlayed = index; + } + } + if (this.lastMusicPlayed == 50) + Main.musicNoCrossFade[51] = true; + if (!Main.showSplash) + { + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle((int) Main.screenPosition.X, (int) Main.screenPosition.Y, Main.screenWidth, Main.screenHeight); + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active) + { + int num2 = 5000; + int num3 = 0; + switch (Main.npc[index].type) + { + case 13: + case 14: + case 15: + num3 = 1; + break; + case 26: + case 27: + case 28: + case 29: + case 111: + case 471: + num3 = 11; + break; + case 113: + case 114: + case 125: + case 126: + num3 = 2; + break; + case 134: + case 143: + case 144: + case 145: + case 266: + num3 = 3; + break; + case 212: + case 213: + case 214: + case 215: + case 216: + case 491: + num3 = 8; + break; + case 222: + num3 = 5; + break; + case 245: + num3 = 4; + break; + case 262: + case 263: + case 264: + num3 = 6; + break; + case 370: + num3 = 15; + break; + case 381: + case 382: + case 383: + case 385: + case 386: + case 388: + case 389: + case 390: + case 391: + case 395: + case 520: + num3 = 9; + break; + case 398: + num3 = 7; + break; + case 422: + case 493: + case 507: + case 517: + num3 = 10; + break; + case 438: + if ((double) Main.npc[index].ai[1] == 1.0) + { + num2 = 1600; + num3 = 4; + break; + } + break; + case 439: + num3 = 4; + break; + case 636: + num3 = 14; + break; + case 657: + num3 = 13; + break; + } + if (NPCID.Sets.BelongsToInvasionOldOnesArmy[Main.npc[index].type]) + num3 = 12; + if (num3 == 0 && Main.npc[index].boss) + num3 = 1; + if (num3 != 0) + { + Microsoft.Xna.Framework.Rectangle rectangle2 = new Microsoft.Xna.Framework.Rectangle((int) ((double) Main.npc[index].position.X + (double) (Main.npc[index].width / 2)) - num2, (int) ((double) Main.npc[index].position.Y + (double) (Main.npc[index].height / 2)) - num2, num2 * 2, num2 * 2); + if (rectangle1.Intersects(rectangle2)) + { + switch (num3) + { + case 1: + flag1 = true; + goto label_56; + case 2: + flag2 = true; + goto label_56; + case 3: + flag3 = true; + goto label_56; + case 4: + flag4 = true; + goto label_56; + case 5: + flag5 = true; + goto label_56; + case 6: + flag6 = true; + goto label_56; + case 7: + flag7 = true; + goto label_56; + case 8: + flag8 = true; + goto label_56; + case 9: + flag9 = true; + goto label_56; + case 10: + flag10 = true; + goto label_56; + case 11: + flag11 = true; + goto label_56; + case 12: + flag12 = true; + goto label_56; + case 13: + flag13 = true; + goto label_56; + case 14: + flag14 = true; + goto label_56; + case 15: + flag15 = true; + goto label_56; + default: + goto label_56; + } + } + } + } + } + } +label_56: + double num4 = ((double) Main.screenPosition.X + (double) (Main.screenWidth / 2)) / 16.0; + if ((double) Main.musicVolume == 0.0) + this.newMusic = 0; + else if (Main.gameMenu) + { + if (Main.netMode != 2) + { + if (WorldGen.drunkWorldGen) + this.newMusic = 60; + else if (this.playOldTile) + this.newMusic = 6; + else if (!Main._isAsyncLoadComplete) + { + this.newMusic = 50; + } + else + { + if (Main.music[50].IsPlaying) + return; + this.newMusic = 51; + if (!Main.musicNoCrossFade[51]) + return; + Main.musicFade[51] = 1f; + } + } + else + this.newMusic = 0; + } + else + { + float num5 = (float) (Main.maxTilesX / 4200); + float num6 = num5 * num5; + float num7 = (float) ((((double) Main.screenPosition.Y + (double) (Main.screenHeight / 2)) / 16.0 - (65.0 + 10.0 * (double) num6)) / (Main.worldSurface / 5.0)); + if (Main.player[Main.myPlayer].happyFunTorchTime) + this.newMusic = 13; + else if (flag7) + this.newMusic = 38; + else if (flag9) + this.newMusic = 37; + else if (flag10) + this.newMusic = 34; + else if (flag6) + this.newMusic = 24; + else if (flag14) + this.newMusic = 57; + else if (flag15) + this.newMusic = 58; + else if (flag2) + this.newMusic = 12; + else if (flag1) + this.newMusic = 5; + else if (flag3) + this.newMusic = 13; + else if (flag4) + this.newMusic = 17; + else if (flag5) + this.newMusic = 25; + else if (flag13) + this.newMusic = 56; + else if (flag8) + this.newMusic = 35; + else if (flag11) + this.newMusic = 39; + else if (flag12) + this.newMusic = 41; + else if (Main.eclipse && (double) Main.player[Main.myPlayer].position.Y < Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2)) + this.newMusic = 27; + else if (slimeRain && !Main.player[Main.myPlayer].ZoneGraveyard && (!Main.bloodMoon || Main.dayTime) && (double) Main.player[Main.myPlayer].position.Y < Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2)) + this.newMusic = 48; + else if (flag16 && Main.dayTime && ((double) Main.cloudAlpha == 0.0 && !Main._shouldUseWindyDayMusic || (double) Main.player[Main.myPlayer].position.Y >= Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2)) && !Main.player[Main.myPlayer].ZoneGraveyard) + this.newMusic = 46; + else if (flag16 && !Main.dayTime && (!Main.bloodMoon && (double) Main.cloudAlpha == 0.0 || (double) Main.player[Main.myPlayer].position.Y >= Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2)) && !Main.player[Main.myPlayer].ZoneGraveyard) + this.newMusic = 47; + else if (Main.player[Main.myPlayer].ZoneSandstorm) + this.newMusic = 40; + else if ((double) Main.player[Main.myPlayer].position.Y > (double) (Main.UnderworldLayer * 16)) + this.newMusic = 36; + else if ((double) num7 < 1.0) + this.newMusic = Main.dayTime ? 42 : 15; + else if (Main.tile[(int) ((double) Main.player[Main.myPlayer].Center.X / 16.0), (int) ((double) Main.player[Main.myPlayer].Center.Y / 16.0)].wall == (ushort) 87) + this.newMusic = 26; + else if (Main.player[Main.myPlayer].ZoneDungeon) + this.newMusic = 23; + else if (Main.bgStyle == 9 && (double) Main.player[Main.myPlayer].position.Y < Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2) || Main.undergroundBackground == 2) + this.newMusic = 29; + else if (Main.player[Main.myPlayer].ZoneCorrupt) + this.newMusic = !Main.player[Main.myPlayer].ZoneCrimson || Main.SceneMetrics.BloodTileCount <= Main.SceneMetrics.EvilTileCount ? ((double) Main.player[Main.myPlayer].position.Y <= Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2) ? 8 : 10) : ((double) Main.player[Main.myPlayer].position.Y <= Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2) ? 16 : 33); + else if (Main.player[Main.myPlayer].ZoneCrimson) + this.newMusic = (double) Main.player[Main.myPlayer].position.Y <= Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2) ? 16 : 33; + else if (Main.player[Main.myPlayer].ZoneMeteor) + this.newMusic = 2; + else if (Main.player[Main.myPlayer].ZoneGraveyard) + this.newMusic = 53; + else if (Main.player[Main.myPlayer].ZoneJungle) + this.newMusic = (double) Main.player[Main.myPlayer].position.Y <= Main.rockLayer * 16.0 + (double) (Main.screenHeight / 2) ? (this.newMusic != 54 || (double) Main.player[Main.myPlayer].position.Y <= (Main.rockLayer - 50.0) * 16.0 + (double) (Main.screenHeight / 2) ? (!Main._shouldUseStormMusic || (double) Main.player[Main.myPlayer].position.Y >= Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2) ? (!Main.dayTime ? 55 : 7) : 52) : 54) : 54; + else if (Main.player[Main.myPlayer].ZoneSnow) + this.newMusic = (double) Main.player[Main.myPlayer].position.Y <= Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2) ? 14 : 20; + else if ((double) Main.player[Main.myPlayer].position.Y >= Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2) && !WorldGen.oceanDepths((int) ((double) Main.screenPosition.X + (double) (Main.screenWidth / 2)) / 16, (int) ((double) Main.screenPosition.Y + (double) (Main.screenHeight / 2)) / 16)) + { + if (Main.player[Main.myPlayer].ZoneHallow) + this.newMusic = 11; + else if (Main.player[Main.myPlayer].ZoneUndergroundDesert) + { + this.newMusic = (double) Main.player[Main.myPlayer].position.Y < Main.worldSurface * 16.0 + (double) (Main.screenHeight / 2) ? 21 : 61; + } + else + { + if (Main.ugMusic == 0) + Main.ugMusic = 4; + if (!Main.music[4].IsPlaying && !Main.music[31].IsPlaying) + { + if ((double) Main.musicFade[4] == 1.0) + Main.musicFade[31] = 1f; + if ((double) Main.musicFade[31] == 1.0) + Main.musicFade[4] = 1f; + switch (Main.rand.Next(2)) + { + case 0: + Main.ugMusic = 4; + Main.musicFade[31] = 0.0f; + break; + case 1: + Main.ugMusic = 31; + Main.musicFade[4] = 0.0f; + break; + } + } + this.newMusic = Main.ugMusic; + } + } + else if (Main.dayTime && Main.player[Main.myPlayer].ZoneHallow) + this.newMusic = !Main._shouldUseStormMusic ? ((double) Main.cloudAlpha <= 0.0 || Main.gameMenu ? (!Main._shouldUseWindyDayMusic ? 9 : 44) : 19) : 52; + else if (Main._shouldUseStormMusic) + this.newMusic = !Main.bloodMoon ? 52 : 2; + else if (WorldGen.oceanDepths((int) ((double) Main.screenPosition.X + (double) (Main.screenWidth / 2)) / 16, (int) ((double) Main.screenPosition.Y + (double) (Main.screenHeight / 2)) / 16)) + this.newMusic = !Main.bloodMoon ? (!flag16 ? (Main.dayTime ? 22 : 43) : (!Main.dayTime ? 47 : 46)) : 2; + else if (Main.player[Main.myPlayer].ZoneDesert) + { + if ((double) Main.player[Main.myPlayer].position.Y >= Main.worldSurface * 16.0) + { + int x = (int) ((double) Main.player[Main.myPlayer].Center.X / 16.0); + int y = (int) ((double) Main.player[Main.myPlayer].Center.Y / 16.0); + this.newMusic = !WorldGen.InWorld(x, y) || !WallID.Sets.Conversion.Sandstone[(int) Main.tile[x, y].wall] && !WallID.Sets.Conversion.HardenedSand[(int) Main.tile[x, y].wall] ? 21 : 61; + } + else + this.newMusic = 21; + } + else if (Main.dayTime) + { + if ((double) Main.cloudAlpha > 0.0 && !Main.gameMenu) + { + this.newMusic = Main.time >= 10800.0 ? 19 : 59; + } + else + { + if (Main.dayMusic == 0) + Main.dayMusic = 1; + if (!Main.music[1].IsPlaying && !Main.music[18].IsPlaying) + Main.dayMusic = Main.rand.Next(2) != 0 ? 18 : 1; + this.newMusic = Main.dayMusic; + if (Main._shouldUseWindyDayMusic) + this.newMusic = 44; + } + } + else if (!Main.dayTime) + this.newMusic = !Main.bloodMoon ? ((double) Main.cloudAlpha <= 0.0 || Main.gameMenu ? 3 : 19) : 2; + if ((double) Main.screenPosition.Y / 16.0 < Main.worldSurface + 10.0 && Main.pumpkinMoon) + this.newMusic = 30; + if ((double) Main.screenPosition.Y / 16.0 >= Main.worldSurface + 10.0 || !Main.snowMoon) + return; + this.newMusic = 32; + } + } + + private void UpdateWindyDayState() + { + if ((double) Main.cloudAlpha == 0.0) + { + Main._shouldUseStormMusic = false; + if (Main.time < 10800.0 || Main.time > 43200.0 || !Main.dayTime) + { + Main._shouldUseWindyDayMusic = false; + } + else + { + if ((double) Math.Abs(Main.windSpeedTarget) < (double) Main._minWind) + Main._shouldUseWindyDayMusic = false; + if ((double) Math.Abs(Main.windSpeedTarget) < (double) Main._maxWind) + return; + Main._shouldUseWindyDayMusic = true; + } + } + else + { + if ((double) Main.cloudAlpha < (double) Main._minRain || (double) Math.Abs(Main.windSpeedTarget) < (double) Main._minWind) + Main._shouldUseStormMusic = false; + else if ((double) Main.cloudAlpha >= (double) Main._maxRain && (double) Math.Abs(Main.windSpeedTarget) >= (double) Main._maxWind) + Main._shouldUseStormMusic = true; + Main._shouldUseWindyDayMusic = false; + } + } + + public static void snowing() + { + Vector2 scaledSize = Main.Camera.ScaledSize; + Vector2 scaledPosition = Main.Camera.ScaledPosition; + if (Main.gamePaused || Main.SceneMetrics.SnowTileCount <= 0 || (double) Main.player[Main.myPlayer].position.Y >= Main.worldSurface * 16.0) + return; + float num1 = (float) Main.SceneMetrics.SnowTileCount / (float) SceneMetrics.SnowTileMax; + float num2 = num1 * num1; + float num3 = num2 * num2; + int num4 = (int) ((double) (int) (500.0 * (double) (Main.Camera.ScaledSize.X / (float) Main.maxScreenW)) * (1.0 + 2.0 * (double) Main.cloudAlpha)); + float num5 = (float) (1.0 + 50.0 * (double) Main.cloudAlpha); + for (int index1 = 0; (double) index1 < (double) num5; ++index1) + { + try + { + if ((double) Main.snowDust >= (double) num4 * ((double) Main.gfxQuality / 2.0 + 0.5) + (double) num4 * 0.100000001490116) + break; + if ((double) Main.rand.NextFloat() < (double) num3) + { + int num6 = Main.rand.Next((int) scaledSize.X + 1500) - 750; + int num7 = (int) scaledPosition.Y - Main.rand.Next(50); + if ((double) Main.player[Main.myPlayer].velocity.Y > 0.0) + num7 -= (int) Main.player[Main.myPlayer].velocity.Y; + if (Main.rand.Next(5) == 0) + num6 = Main.rand.Next(500) - 500; + else if (Main.rand.Next(5) == 0) + num6 = Main.rand.Next(500) + (int) scaledSize.X; + if (num6 < 0 || (double) num6 > (double) scaledSize.X) + num7 += Main.rand.Next((int) ((double) scaledSize.Y * 0.8)) + (int) ((double) scaledSize.Y * 0.1); + int num8 = num6 + (int) scaledPosition.X; + int x = num8 / 16; + int y = num7 / 16; + if (WorldGen.InWorld(x, y)) + { + if (Main.tile[x, y] != null) + { + if (!Main.tile[x, y].nactive()) + { + if (Main.tile[x, y].wall == (ushort) 0) + { + int index2 = Dust.NewDust(new Vector2((float) num8, (float) num7), 10, 10, 76); + Main.dust[index2].scale += Main.cloudAlpha * 0.2f; + Main.dust[index2].velocity.Y = (float) (3.0 + (double) Main.rand.Next(30) * 0.100000001490116); + Main.dust[index2].velocity.Y *= Main.dust[index2].scale; + if (!Main.raining) + { + Main.dust[index2].velocity.X = Main.windSpeedCurrent + (float) Main.rand.Next(-10, 10) * 0.1f; + Main.dust[index2].velocity.X += Main.windSpeedCurrent * 15f; + } + else + { + Main.dust[index2].velocity.X = (float) (Math.Sqrt((double) Math.Abs(Main.windSpeedCurrent)) * (double) Math.Sign(Main.windSpeedCurrent) * ((double) Main.cloudAlpha + 0.5) * 10.0 + (double) Main.rand.NextFloat() * 0.200000002980232 - 0.100000001490116); + Main.dust[index2].velocity.Y *= 0.5f; + } + Main.dust[index2].velocity.Y *= (float) (1.0 + 0.300000011920929 * (double) Main.cloudAlpha); + Main.dust[index2].scale += Main.cloudAlpha * 0.2f; + Main.dust[index2].velocity *= (float) (1.0 + (double) Main.cloudAlpha * 0.5); + } + } + } + } + } + } + catch + { + } + } + } + + public static void checkXMas() + { + DateTime now = DateTime.Now; + int day = now.Day; + int month = now.Month; + Main.xMas = day >= 15 && month == 12; + if (!Main.forceXMasForToday) + return; + Main.xMas = true; + } + + public static void checkHalloween() + { + DateTime now = DateTime.Now; + int day = now.Day; + int month = now.Month; + Main.halloween = day >= 10 && month == 10 || day <= 1 && month == 11; + if (!Main.forceHalloweenForToday) + return; + Main.halloween = true; + } + + public void updateCloudLayer() + { + switch (Main.netMode) + { + case 0: + if (Main.gameMenu) + return; + break; + case 1: + return; + } + int num1 = 86400; + int minValue = num1 / 24; + float num2 = Math.Max(1f, (float) (1.0 + 4.0 * (double) Main.cloudAlpha)); + if ((double) Main.cloudBGActive > 0.0) + { + if ((double) Main.cloudBGActive > 1.0) + Main.cloudBGActive -= (float) Main.dayRate / num2; + if ((double) Main.cloudBGActive < 1.0) + Main.cloudBGActive = 1f; + if ((double) Main.cloudBGActive != 1.0 || Main.rand.Next((int) ((double) (minValue * 2 / Math.Max(Main.dayRate, 1)) * (double) num2)) != 0) + return; + Main.cloudBGActive = (float) -Main.rand.Next(minValue * 4, num1 * 4); + if (Main.netMode != 2) + return; + NetMessage.SendData(7); + } + else + { + if ((double) Main.cloudBGActive < 0.0) + { + Main.cloudBGActive += (float) Main.dayRate * num2; + if (Main.raining) + Main.cloudBGActive += (float) (2 * Main.dayRate) * num2; + } + if ((double) Main.cloudBGActive > 0.0) + Main.cloudBGActive = 0.0f; + if ((double) Main.cloudBGActive == 0.0 && Main.rand.Next((int) ((double) (minValue * 12 / (Main.dayRate == 0 ? 1 : Main.dayRate)) / (double) num2)) == 0) + { + Main.cloudBGActive = (float) Main.rand.Next(minValue * 3, num1 * 2); + if (Main.netMode != 2) + return; + NetMessage.SendData(7); + } + else + { + if (!Main.IsItStorming) + return; + Main.cloudBGActive = (float) Main.rand.Next(minValue, minValue * 4); + if (Main.netMode != 2) + return; + NetMessage.SendData(7); + } + } + } + + public static void TeleportEffect( + Microsoft.Xna.Framework.Rectangle effectRect, + int Style, + int extraInfo = 0, + float dustCountMult = 1f, + TeleportationSide side = TeleportationSide.Entry, + Vector2 otherPosition = default (Vector2)) + { + switch (Style) + { + case 0: + SoundEngine.PlaySound(SoundID.Item6, effectRect.X + effectRect.Width / 2, effectRect.Y + effectRect.Height / 2); + int num1 = (int) ((double) (effectRect.Width * effectRect.Height / 5) * (double) dustCountMult); + for (int index1 = 0; index1 < num1; ++index1) + { + int index2 = Dust.NewDust(new Vector2((float) effectRect.X, (float) effectRect.Y), effectRect.Width, effectRect.Height, 159); + Main.dust[index2].scale = (float) Main.rand.Next(20, 70) * 0.01f; + if (index1 < 10) + Main.dust[index2].scale += 0.25f; + if (index1 < 5) + Main.dust[index2].scale += 0.25f; + } + break; + case 1: + SoundEngine.PlaySound(SoundID.Item8, effectRect.X + effectRect.Width / 2, effectRect.Y + effectRect.Height / 2); + int num2 = (int) ((double) (effectRect.Width * effectRect.Height / 5) * (double) dustCountMult); + for (int index3 = 0; index3 < num2; ++index3) + { + int index4 = Dust.NewDust(new Vector2((float) effectRect.X, (float) effectRect.Y), effectRect.Width, effectRect.Height, 164); + Main.dust[index4].scale = (float) Main.rand.Next(20, 70) * 0.01f; + if (index3 < 10) + Main.dust[index4].scale += 0.25f; + if (index3 < 5) + Main.dust[index4].scale += 0.25f; + } + break; + case 2: + int num3 = (int) (50.0 * (double) dustCountMult); + for (int index = 0; index < num3; ++index) + Main.dust[Dust.NewDust(new Vector2((float) effectRect.X, (float) effectRect.Y), effectRect.Width, effectRect.Height, 58, Alpha: 150, newColor: Microsoft.Xna.Framework.Color.GhostWhite, Scale: 1.2f)].velocity *= 0.5f; + break; + case 3: + SoundEngine.PlaySound(SoundID.Item6, effectRect.X + effectRect.Width / 2, effectRect.Y + effectRect.Height / 2); + int num4 = (int) (50.0 * (double) dustCountMult); + for (int index5 = 0; index5 < num4; ++index5) + { + int index6 = Dust.NewDust(new Vector2((float) effectRect.X, (float) effectRect.Y), effectRect.Width, effectRect.Height, 180); + Main.dust[index6].noGravity = true; + for (int index7 = 0; index7 < 5; ++index7) + { + if (Main.rand.Next(3) == 0) + Main.dust[index6].velocity *= 0.75f; + } + if (Main.rand.Next(3) == 0) + { + Main.dust[index6].velocity *= 2f; + Main.dust[index6].scale *= 1.2f; + } + if (Main.rand.Next(3) == 0) + { + Main.dust[index6].velocity *= 2f; + Main.dust[index6].scale *= 1.2f; + } + if (Main.rand.Next(2) == 0) + { + Main.dust[index6].fadeIn = (float) Main.rand.Next(75, 100) * 0.01f; + Main.dust[index6].scale = (float) Main.rand.Next(25, 75) * 0.01f; + } + Main.dust[index6].scale *= 0.8f; + } + break; + case 4: + SoundEngine.PlaySound(SoundID.Item8, effectRect.X + effectRect.Width / 2, effectRect.Y + effectRect.Height / 2); + int num5 = (int) ((double) (effectRect.Width * effectRect.Height / 5) * (double) dustCountMult); + for (int index = 0; index < num5; ++index) + { + Dust dust = Main.dust[Dust.NewDust(effectRect.TopLeft(), effectRect.Width, effectRect.Height, 263)]; + dust.color = PortalHelper.GetPortalColor(extraInfo); + dust.noLight = true; + dust.noGravity = true; + dust.scale = 1.2f; + dust.fadeIn = 0.4f; + dust.color.A = byte.MaxValue; + } + break; + case 5: + Vector2 Position1 = effectRect.TopLeft(); + int num6 = (int) (100.0 * (double) dustCountMult); + for (int index = 0; index < num6; ++index) + { + Dust dust = Dust.NewDustDirect(Position1, effectRect.Width, effectRect.Height + 24, Dust.dustWater()); + dust.velocity.Y *= 0.0f; + dust.velocity.Y -= 3.5f; + dust.velocity.X *= 1.5f; + dust.scale = 0.8f; + dust.alpha = 130; + dust.noGravity = true; + dust.fadeIn = 1.2f; + } + SoundEngine.PlaySound(19, effectRect.Center.ToVector2(), 0); + break; + case 7: + Vector2 Position2 = effectRect.TopLeft(); + int num7 = (int) (50.0 * (double) dustCountMult); + for (int index = 0; index < num7; ++index) + { + Dust dust = Dust.NewDustDirect(Position2, effectRect.Width, effectRect.Height + 24, 35); + dust.velocity.Y *= 0.0f; + dust.velocity.Y -= 3.5f; + dust.velocity.X *= 1.5f; + dust.scale = 0.8f; + dust.alpha = 130; + dust.noGravity = true; + dust.fadeIn = 1.2f; + } + SoundEngine.PlaySound(SoundID.Item8, effectRect.Center.ToVector2()); + break; + case 9: + effectRect.Inflate(15, 15); + int num8 = (int) (100.0 * (double) dustCountMult); + for (int index = 0; index < num8; ++index) + TeleportPylonsSystem.SpawnInWorldDust(extraInfo, effectRect); + SoundEngine.PlaySound(SoundID.Item6, effectRect.Center.X, effectRect.Center.Y); + break; + case 10: + effectRect.Inflate(15, 15); + int num9 = (int) (60.0 * (double) dustCountMult); + Vector2 vector2 = otherPosition - effectRect.TopLeft(); + for (int index = 0; index < num9; ++index) + { + float num10 = 0.4f + Main.rand.NextFloat(); + float num11 = 0.4f + Main.rand.NextFloat(); + Microsoft.Xna.Framework.Color rgb = Main.hslToRgb((float) (0.660000026226044 + (double) Main.rand.NextFloat() * 0.239999994635582), 1f, 0.5f); + Dust rf = Dust.NewDustDirect(effectRect.TopLeft(), effectRect.Width, effectRect.Height, 267, Alpha: ((int) sbyte.MaxValue), newColor: rgb); + rf.scale = (float) Main.rand.Next(20, 70) * 0.01f; + if (index < 10) + rf.scale += 0.25f; + if (index < 5) + rf.scale += 0.25f; + if ((double) index < (double) num9 * 0.800000011920929) + rf.velocity += vector2 * 0.1f * Main.rand.NextFloat(); + rf.noGravity = true; + rf.noLight = true; + rf.scale = num11; + rf.fadeIn = num10; + if (rf.dustIndex != 6000) + { + Dust dust = Dust.CloneDust(rf); + dust.scale *= 0.65f; + dust.fadeIn *= 0.65f; + dust.color = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + } + } + SoundEngine.PlaySound(SoundID.Item8, effectRect.Center.X, effectRect.Center.Y); + break; + } + } + + public static void Ambience() + { + ++Main.ambientCounter; + if (Main.ambientCounter < 15) + return; + Main.ambientCounter = 0; + Microsoft.Xna.Framework.Point point = Main.LocalPlayer.Center.ToPoint(); + if ((double) Main.ambientWaterfallStrength > 0.0) + { + SoundEngine.PlaySound(34, (int) Main.ambientWaterfallX, (int) Main.ambientWaterfallY, (int) Main.ambientWaterfallStrength); + Main._isWaterfallMusicPlaying = true; + } + else + { + if (Main._isWaterfallMusicPlaying) + SoundEngine.PlaySound(34, point.X, point.Y, 0); + Main._isWaterfallMusicPlaying = false; + } + float num1 = Math.Abs(Main.ambientLavaX - (Main.screenPosition.X + (float) (Main.screenWidth / 2))) + Math.Abs(Main.ambientLavaY - (Main.screenPosition.Y + (float) (Main.screenHeight / 2))); + double num2 = (double) Math.Abs(Main.ambientLavafallX - (Main.screenPosition.X + (float) (Main.screenWidth / 2))) + (double) Math.Abs(Main.ambientLavafallY - (Main.screenPosition.Y + (float) (Main.screenHeight / 2))); + float num3 = Main.ambientLavaX; + float num4 = Main.ambientLavaY; + double num5 = (double) num1; + if (num2 < num5) + { + num3 = Main.ambientLavafallX; + num4 = Main.ambientLavafallY; + } + float num6 = Main.ambientLavafallStrength + Main.ambientLavaStrength; + if ((double) Main.ambientLavafallStrength > 0.0) + { + SoundEngine.PlaySound(35, (int) num3, (int) num4, (int) num6); + Main._isLavafallMusicPlaying = true; + } + else + { + if (Main._isLavafallMusicPlaying) + SoundEngine.PlaySound(35, point.X, point.Y, 0); + Main._isLavafallMusicPlaying = false; + } + } + + public static void AnimateTiles_CritterCages() + { + if (!Main.critterCage) + return; + for (int index = 0; index < Main.cageFrames; ++index) + { + if (Main.bunnyCageFrame[index] == 0) + { + ++Main.bunnyCageFrameCounter[index]; + if (Main.bunnyCageFrameCounter[index] > Main.rand.Next(30, 900)) + { + if (Main.rand.Next(3) != 0) + { + int num = Main.rand.Next(7); + Main.bunnyCageFrame[index] = num != 0 ? (num > 2 ? 1 : 2) : 4; + } + Main.bunnyCageFrameCounter[index] = 0; + } + } + else if (Main.bunnyCageFrame[index] == 1) + { + ++Main.bunnyCageFrameCounter[index]; + if (Main.bunnyCageFrameCounter[index] >= 10) + { + Main.bunnyCageFrameCounter[index] = 0; + Main.bunnyCageFrame[index] = 0; + } + } + else if (Main.bunnyCageFrame[index] >= 2 && Main.bunnyCageFrame[index] <= 3) + { + ++Main.bunnyCageFrameCounter[index]; + if (Main.bunnyCageFrameCounter[index] >= 10) + { + Main.bunnyCageFrameCounter[index] = 0; + ++Main.bunnyCageFrame[index]; + } + if (Main.bunnyCageFrame[index] > 3) + Main.bunnyCageFrame[index] = 0; + } + else if (Main.bunnyCageFrame[index] >= 4 && Main.bunnyCageFrame[index] <= 10) + { + ++Main.bunnyCageFrameCounter[index]; + if (Main.bunnyCageFrameCounter[index] >= 5) + { + Main.bunnyCageFrameCounter[index] = 0; + ++Main.bunnyCageFrame[index]; + } + } + else if (Main.bunnyCageFrame[index] == 11) + { + ++Main.bunnyCageFrameCounter[index]; + if (Main.bunnyCageFrameCounter[index] > Main.rand.Next(30, 900)) + { + if (Main.rand.Next(3) != 0) + Main.bunnyCageFrame[index] = Main.rand.Next(7) != 0 ? 12 : 13; + Main.bunnyCageFrameCounter[index] = 0; + } + } + else if (Main.bunnyCageFrame[index] == 12) + { + ++Main.bunnyCageFrameCounter[index]; + if (Main.bunnyCageFrameCounter[index] >= 10) + { + Main.bunnyCageFrameCounter[index] = 0; + Main.bunnyCageFrame[index] = 11; + } + } + else if (Main.bunnyCageFrame[index] >= 13) + { + ++Main.bunnyCageFrameCounter[index]; + if (Main.bunnyCageFrameCounter[index] >= 5) + { + Main.bunnyCageFrameCounter[index] = 0; + ++Main.bunnyCageFrame[index]; + } + if (Main.bunnyCageFrame[index] > 21) + Main.bunnyCageFrame[index] = 0; + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + if (Main.squirrelCageFrame[index] == 0) + { + ++Main.squirrelCageFrameCounter[index]; + if (Main.squirrelCageFrameCounter[index] > Main.rand.Next(30, 900)) + { + if (Main.rand.Next(3) != 0) + { + int num = Main.rand.Next(7); + Main.squirrelCageFrame[index] = num != 0 ? (num > 2 ? 1 : 2) : 4; + } + Main.squirrelCageFrameCounter[index] = 0; + } + } + else if (Main.squirrelCageFrame[index] == 1) + { + ++Main.squirrelCageFrameCounter[index]; + if (Main.squirrelCageFrameCounter[index] >= 10) + { + Main.squirrelCageFrameCounter[index] = 0; + Main.squirrelCageFrame[index] = 0; + } + } + else if (Main.squirrelCageFrame[index] >= 2 && Main.squirrelCageFrame[index] <= 3) + { + ++Main.squirrelCageFrameCounter[index]; + if (Main.squirrelCageFrameCounter[index] >= 5) + { + Main.squirrelCageFrameCounter[index] = 0; + ++Main.squirrelCageFrame[index]; + } + if (Main.squirrelCageFrame[index] > 3) + Main.squirrelCageFrame[index] = Main.rand.Next(5) != 0 ? 2 : 0; + } + else if (Main.squirrelCageFrame[index] >= 4 && Main.squirrelCageFrame[index] <= 8) + { + ++Main.squirrelCageFrameCounter[index]; + if (Main.squirrelCageFrameCounter[index] >= 5) + { + Main.squirrelCageFrameCounter[index] = 0; + ++Main.squirrelCageFrame[index]; + } + } + else if (Main.squirrelCageFrame[index] == 9) + { + ++Main.squirrelCageFrameCounter[index]; + if (Main.squirrelCageFrameCounter[index] > Main.rand.Next(30, 900)) + { + if (Main.rand.Next(3) != 0) + { + int num = Main.rand.Next(7); + Main.squirrelCageFrame[index] = num != 0 ? (num > 2 ? 10 : 11) : 13; + } + Main.squirrelCageFrameCounter[index] = 0; + } + } + else if (Main.squirrelCageFrame[index] == 10) + { + ++Main.squirrelCageFrameCounter[index]; + if (Main.squirrelCageFrameCounter[index] >= 10) + { + Main.squirrelCageFrameCounter[index] = 0; + Main.squirrelCageFrame[index] = 9; + } + } + else if (Main.squirrelCageFrame[index] == 11 || Main.squirrelCageFrame[index] == 12) + { + ++Main.squirrelCageFrameCounter[index]; + if (Main.squirrelCageFrameCounter[index] >= 5) + { + ++Main.squirrelCageFrame[index]; + if (Main.squirrelCageFrame[index] > 12) + Main.squirrelCageFrame[index] = Main.rand.Next(5) == 0 ? 9 : 11; + Main.squirrelCageFrameCounter[index] = 0; + } + } + else if (Main.squirrelCageFrame[index] >= 13) + { + ++Main.squirrelCageFrameCounter[index]; + if (Main.squirrelCageFrameCounter[index] >= 5) + { + Main.squirrelCageFrameCounter[index] = 0; + ++Main.squirrelCageFrame[index]; + } + if (Main.squirrelCageFrame[index] > 17) + Main.squirrelCageFrame[index] = 0; + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + if (Main.squirrelCageFrameOrange[index] == 0) + { + ++Main.squirrelCageFrameCounterOrange[index]; + if (Main.squirrelCageFrameCounterOrange[index] > Main.rand.Next(30, 900)) + { + if (Main.rand.Next(3) != 0) + { + int num = Main.rand.Next(7); + Main.squirrelCageFrameOrange[index] = num != 0 ? (num > 2 ? 1 : 2) : 4; + } + Main.squirrelCageFrameCounterOrange[index] = 0; + } + } + else if (Main.squirrelCageFrameOrange[index] == 1) + { + ++Main.squirrelCageFrameCounterOrange[index]; + if (Main.squirrelCageFrameCounterOrange[index] >= 10) + { + Main.squirrelCageFrameCounterOrange[index] = 0; + Main.squirrelCageFrameOrange[index] = 0; + } + } + else if (Main.squirrelCageFrameOrange[index] >= 2 && Main.squirrelCageFrameOrange[index] <= 3) + { + ++Main.squirrelCageFrameCounterOrange[index]; + if (Main.squirrelCageFrameCounterOrange[index] >= 5) + { + Main.squirrelCageFrameCounterOrange[index] = 0; + ++Main.squirrelCageFrameOrange[index]; + } + if (Main.squirrelCageFrameOrange[index] > 3) + Main.squirrelCageFrameOrange[index] = Main.rand.Next(5) != 0 ? 2 : 0; + } + else if (Main.squirrelCageFrameOrange[index] >= 4 && Main.squirrelCageFrameOrange[index] <= 8) + { + ++Main.squirrelCageFrameCounterOrange[index]; + if (Main.squirrelCageFrameCounterOrange[index] >= 5) + { + Main.squirrelCageFrameCounterOrange[index] = 0; + ++Main.squirrelCageFrameOrange[index]; + } + } + else if (Main.squirrelCageFrameOrange[index] == 9) + { + ++Main.squirrelCageFrameCounterOrange[index]; + if (Main.squirrelCageFrameCounterOrange[index] > Main.rand.Next(30, 900)) + { + if (Main.rand.Next(3) != 0) + { + int num = Main.rand.Next(7); + Main.squirrelCageFrameOrange[index] = num != 0 ? (num > 2 ? 10 : 11) : 13; + } + Main.squirrelCageFrameCounterOrange[index] = 0; + } + } + else if (Main.squirrelCageFrameOrange[index] == 10) + { + ++Main.squirrelCageFrameCounterOrange[index]; + if (Main.squirrelCageFrameCounterOrange[index] >= 10) + { + Main.squirrelCageFrameCounterOrange[index] = 0; + Main.squirrelCageFrameOrange[index] = 9; + } + } + else if (Main.squirrelCageFrameOrange[index] == 11 || Main.squirrelCageFrameOrange[index] == 12) + { + ++Main.squirrelCageFrameCounterOrange[index]; + if (Main.squirrelCageFrameCounterOrange[index] >= 5) + { + ++Main.squirrelCageFrameOrange[index]; + if (Main.squirrelCageFrameOrange[index] > 12) + Main.squirrelCageFrameOrange[index] = Main.rand.Next(5) == 0 ? 9 : 11; + Main.squirrelCageFrameCounterOrange[index] = 0; + } + } + else if (Main.squirrelCageFrameOrange[index] >= 13) + { + ++Main.squirrelCageFrameCounterOrange[index]; + if (Main.squirrelCageFrameCounterOrange[index] >= 5) + { + Main.squirrelCageFrameCounterOrange[index] = 0; + ++Main.squirrelCageFrameOrange[index]; + } + if (Main.squirrelCageFrameOrange[index] > 17) + Main.squirrelCageFrameOrange[index] = 0; + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + if (Main.mallardCageFrame[index] == 0 || Main.mallardCageFrame[index] == 4) + { + ++Main.mallardCageFrameCounter[index]; + if (Main.mallardCageFrameCounter[index] > Main.rand.Next(45, 2700)) + { + if (Main.mallardCageFrame[index] == 0 && Main.rand.Next(3) != 0 || Main.mallardCageFrame[index] == 4 && Main.rand.Next(5) == 0) + Main.mallardCageFrame[index] = Main.rand.Next(6) != 0 ? (Main.rand.Next(3) != 0 ? 1 : (Main.mallardCageFrame[index] != 4 ? 4 : 0)) : 5; + Main.mallardCageFrameCounter[index] = 0; + } + } + else if (Main.mallardCageFrame[index] >= 1 && Main.mallardCageFrame[index] <= 3) + { + ++Main.mallardCageFrameCounter[index]; + if (Main.mallardCageFrameCounter[index] >= 5) + { + Main.mallardCageFrameCounter[index] = 0; + ++Main.mallardCageFrame[index]; + } + if (Main.mallardCageFrame[index] > 3) + Main.mallardCageFrame[index] = Main.rand.Next(5) != 0 ? 1 : 0; + } + else if (Main.mallardCageFrame[index] >= 5 && Main.mallardCageFrame[index] <= 11) + { + ++Main.mallardCageFrameCounter[index]; + if (Main.mallardCageFrameCounter[index] >= 5) + { + Main.mallardCageFrameCounter[index] = 0; + ++Main.mallardCageFrame[index]; + } + } + else if (Main.mallardCageFrame[index] == 12 || Main.mallardCageFrame[index] == 16) + { + ++Main.mallardCageFrameCounter[index]; + if (Main.mallardCageFrameCounter[index] > Main.rand.Next(45, 2700)) + { + if (Main.mallardCageFrame[index] == 12 && Main.rand.Next(3) != 0 || Main.mallardCageFrame[index] == 16 && Main.rand.Next(5) == 0) + Main.mallardCageFrame[index] = Main.rand.Next(6) != 0 ? (Main.rand.Next(3) != 0 ? 13 : (Main.mallardCageFrame[index] != 16 ? 16 : 12)) : 17; + Main.mallardCageFrameCounter[index] = 0; + } + } + else if (Main.mallardCageFrame[index] >= 13 && Main.mallardCageFrame[index] <= 15) + { + ++Main.mallardCageFrameCounter[index]; + if (Main.mallardCageFrameCounter[index] >= 5) + { + ++Main.mallardCageFrame[index]; + if (Main.mallardCageFrame[index] > 15) + Main.mallardCageFrame[index] = Main.rand.Next(5) == 0 ? 13 : 12; + Main.mallardCageFrameCounter[index] = 0; + } + } + else if (Main.mallardCageFrame[index] >= 17) + { + ++Main.mallardCageFrameCounter[index]; + if (Main.mallardCageFrameCounter[index] >= 5) + { + Main.mallardCageFrameCounter[index] = 0; + ++Main.mallardCageFrame[index]; + } + if (Main.mallardCageFrame[index] > 23) + Main.mallardCageFrame[index] = 0; + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + if (Main.duckCageFrame[index] == 0 || Main.duckCageFrame[index] == 4) + { + ++Main.duckCageFrameCounter[index]; + if (Main.duckCageFrameCounter[index] > Main.rand.Next(45, 2700)) + { + if (Main.duckCageFrame[index] == 0 && Main.rand.Next(3) != 0 || Main.duckCageFrame[index] == 4 && Main.rand.Next(5) == 0) + Main.duckCageFrame[index] = Main.rand.Next(6) != 0 ? (Main.rand.Next(3) != 0 ? 1 : (Main.duckCageFrame[index] != 4 ? 4 : 0)) : 5; + Main.duckCageFrameCounter[index] = 0; + } + } + else if (Main.duckCageFrame[index] >= 1 && Main.duckCageFrame[index] <= 3) + { + ++Main.duckCageFrameCounter[index]; + if (Main.duckCageFrameCounter[index] >= 5) + { + Main.duckCageFrameCounter[index] = 0; + ++Main.duckCageFrame[index]; + } + if (Main.duckCageFrame[index] > 3) + Main.duckCageFrame[index] = Main.rand.Next(5) != 0 ? 1 : 0; + } + else if (Main.duckCageFrame[index] >= 5 && Main.duckCageFrame[index] <= 11) + { + ++Main.duckCageFrameCounter[index]; + if (Main.duckCageFrameCounter[index] >= 5) + { + Main.duckCageFrameCounter[index] = 0; + ++Main.duckCageFrame[index]; + } + } + else if (Main.duckCageFrame[index] == 12 || Main.duckCageFrame[index] == 16) + { + ++Main.duckCageFrameCounter[index]; + if (Main.duckCageFrameCounter[index] > Main.rand.Next(45, 2700)) + { + if (Main.duckCageFrame[index] == 12 && Main.rand.Next(3) != 0 || Main.duckCageFrame[index] == 16 && Main.rand.Next(5) == 0) + Main.duckCageFrame[index] = Main.rand.Next(6) != 0 ? (Main.rand.Next(3) != 0 ? 13 : (Main.duckCageFrame[index] != 16 ? 16 : 12)) : 17; + Main.duckCageFrameCounter[index] = 0; + } + } + else if (Main.duckCageFrame[index] >= 13 && Main.duckCageFrame[index] <= 15) + { + ++Main.duckCageFrameCounter[index]; + if (Main.duckCageFrameCounter[index] >= 5) + { + ++Main.duckCageFrame[index]; + if (Main.duckCageFrame[index] > 15) + Main.duckCageFrame[index] = Main.rand.Next(5) == 0 ? 13 : 12; + Main.duckCageFrameCounter[index] = 0; + } + } + else if (Main.duckCageFrame[index] >= 17) + { + ++Main.duckCageFrameCounter[index]; + if (Main.duckCageFrameCounter[index] >= 5) + { + Main.duckCageFrameCounter[index] = 0; + ++Main.duckCageFrame[index]; + } + if (Main.duckCageFrame[index] > 23) + Main.duckCageFrame[index] = 0; + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + ++Main.grebeCageFrameCounter[index]; + bool flag = Main.grebeCageFrame[index] == 0 || Main.grebeCageFrame[index] == 7; + int num1 = Main.grebeCageFrame[index] == 16 ? 1 : (Main.grebeCageFrame[index] == 20 ? 1 : 0); + int num2 = 5; + if (flag) + num2 = Main.rand.Next(300, 400); + if (num1 != 0) + num2 = Main.rand.Next(480, 600); + if (Main.grebeCageFrameCounter[index] >= num2) + { + Main.grebeCageFrameCounter[index] = 0; + if (Main.grebeCageFrame[index] >= 25 && Main.grebeCageFrame[index] <= 27) + { + ++Main.grebeCageFrame[index]; + if (Main.grebeCageFrame[index] > 27) + Main.grebeCageFrame[index] = Main.rand.Next(5) != 0 ? 25 : 7; + } + else if (Main.grebeCageFrame[index] >= 22 && Main.grebeCageFrame[index] <= 24) + { + ++Main.grebeCageFrame[index]; + if (Main.grebeCageFrame[index] > 24) + Main.grebeCageFrame[index] = Main.rand.Next(5) != 0 ? 22 : 0; + } + else if (Main.grebeCageFrame[index] == 0 && Main.rand.Next(3) == 0) + Main.grebeCageFrame[index] = Main.rand.Next(2) == 0 ? 22 : 14; + else if (Main.grebeCageFrame[index] == 7 && Main.rand.Next(3) == 0) + Main.grebeCageFrame[index] = Main.rand.Next(2) == 0 ? 25 : 18; + else if (Main.grebeCageFrame[index] == 13 || Main.grebeCageFrame[index] == 17) + Main.grebeCageFrame[index] = 0; + else if (Main.grebeCageFrame[index] == 21) + Main.grebeCageFrame[index] = 7; + else + ++Main.grebeCageFrame[index]; + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + ++Main.seagullCageFrameCounter[index]; + bool flag1 = Main.seagullCageFrame[index] == 0 || Main.seagullCageFrame[index] == 14; + bool flag2 = Main.seagullCageFrame[index] >= 15 && Main.seagullCageFrame[index] <= 18; + int num3 = Main.seagullCageFrame[index] < 9 ? 0 : (Main.seagullCageFrame[index] <= 13 ? 1 : 0); + int num4 = 6; + if (flag1) + num4 = Main.rand.Next(180, 250); + if (flag2) + num4 = 66; + if (num3 != 0) + num4 = 78; + if (Main.seagullCageFrameCounter[index] >= num4) + { + Main.seagullCageFrameCounter[index] = 0; + if (Main.seagullCageFrame[index] == 0 && Main.rand.Next(3) == 0) + Main.seagullCageFrame[index] = 9; + else if (Main.seagullCageFrame[index] == 14) + Main.seagullCageFrame[index] = Main.rand.Next(2) != 0 ? 19 : 15; + else if (Main.seagullCageFrame[index] == 9) + Main.seagullCageFrame[index] = 0; + else if (Main.seagullCageFrame[index] == 8 || Main.seagullCageFrame[index] == 15) + { + Main.seagullCageFrame[index] = 14; + } + else + { + ++Main.seagullCageFrame[index]; + if (Main.seagullCageFrame[index] > 26) + Main.seagullCageFrame[index] = 0; + } + } + else if (Main.seagullCageFrame[index] >= 15 && Main.seagullCageFrame[index] <= 18) + { + int num5 = Main.seagullCageFrameCounter[index] % 66; + Main.seagullCageFrame[index] = num5 <= 60 ? (num5 <= 54 ? (num5 <= 48 ? (num5 <= 42 ? (num5 <= 36 ? (num5 <= 30 ? (num5 <= 24 ? (num5 <= 18 ? (num5 <= 12 ? (num5 <= 6 ? 15 : 16) : 17) : 18) : 17) : 16) : 17) : 18) : 17) : 16) : 15; + } + else if (Main.seagullCageFrame[index] >= 9 && Main.seagullCageFrame[index] <= 13) + { + int num6 = Main.seagullCageFrameCounter[index] % 78; + Main.seagullCageFrame[index] = num6 <= 72 ? (num6 <= 66 ? (num6 <= 60 ? (num6 <= 54 ? (num6 <= 48 ? (num6 <= 42 ? (num6 <= 36 ? (num6 <= 30 ? (num6 <= 24 ? (num6 <= 18 ? (num6 <= 12 ? (num6 <= 6 ? 9 : 10) : 11) : 12) : 13) : 12) : 11) : 12) : 13) : 12) : 11) : 10) : 9; + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + if (Main.birdCageFrame[index] == 0) + { + ++Main.birdCageFrameCounter[index]; + if (Main.birdCageFrameCounter[index] > Main.rand.Next(30, 2700)) + { + if (Main.rand.Next(3) != 0) + Main.birdCageFrame[index] = Main.rand.Next(3) == 0 ? 1 : 2; + Main.birdCageFrameCounter[index] = 0; + } + } + else if (Main.birdCageFrame[index] == 1) + { + ++Main.birdCageFrameCounter[index]; + if (Main.birdCageFrameCounter[index] > Main.rand.Next(900, 18000) && Main.rand.Next(3) == 0) + { + Main.birdCageFrameCounter[index] = 0; + Main.birdCageFrame[index] = 0; + } + } + else if (Main.birdCageFrame[index] >= 2 && Main.birdCageFrame[index] <= 5) + { + ++Main.birdCageFrameCounter[index]; + if (Main.birdCageFrameCounter[index] >= 5) + { + Main.birdCageFrameCounter[index] = 0; + if (Main.birdCageFrame[index] == 3 && Main.rand.Next(3) == 0) + Main.birdCageFrame[index] = 13; + else + ++Main.birdCageFrame[index]; + } + } + else if (Main.birdCageFrame[index] == 6) + { + ++Main.birdCageFrameCounter[index]; + if (Main.birdCageFrameCounter[index] > Main.rand.Next(45, 2700)) + { + if (Main.rand.Next(3) != 0) + { + if (Main.rand.Next(6) == 0) + Main.birdCageFrame[index] = 7; + else if (Main.rand.Next(6) == 0) + Main.birdCageFrame[index] = 11; + } + Main.birdCageFrameCounter[index] = 0; + } + } + else if (Main.birdCageFrame[index] >= 7 && Main.birdCageFrame[index] <= 10) + { + ++Main.birdCageFrameCounter[index]; + if (Main.birdCageFrameCounter[index] >= 5) + { + ++Main.birdCageFrame[index]; + if (Main.birdCageFrame[index] > 10) + Main.birdCageFrame[index] = 0; + Main.birdCageFrameCounter[index] = 0; + } + } + else if (Main.birdCageFrame[index] >= 11 && Main.birdCageFrame[index] <= 13) + { + ++Main.birdCageFrameCounter[index]; + if (Main.birdCageFrameCounter[index] >= 5) + { + ++Main.birdCageFrame[index]; + Main.birdCageFrameCounter[index] = 0; + } + } + else if (Main.birdCageFrame[index] == 14) + { + ++Main.birdCageFrameCounter[index]; + if (Main.birdCageFrameCounter[index] > Main.rand.Next(5, 600)) + { + Main.birdCageFrame[index] = Main.rand.Next(20) != 0 ? (Main.rand.Next(20) != 0 ? 15 : 4) : 16; + Main.birdCageFrameCounter[index] = 0; + } + } + else if (Main.birdCageFrame[index] == 15) + { + ++Main.birdCageFrameCounter[index]; + if (Main.birdCageFrameCounter[index] >= 10) + { + Main.birdCageFrameCounter[index] = 0; + Main.birdCageFrame[index] = 14; + } + } + else if (Main.birdCageFrame[index] >= 16 && Main.birdCageFrame[index] <= 18) + { + ++Main.birdCageFrameCounter[index]; + if (Main.birdCageFrameCounter[index] >= 5) + { + ++Main.birdCageFrame[index]; + if (Main.birdCageFrame[index] > 18) + Main.birdCageFrame[index] = 0; + Main.birdCageFrameCounter[index] = 0; + } + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + if (Main.blueBirdCageFrame[index] == 0) + { + ++Main.blueBirdCageFrameCounter[index]; + if (Main.blueBirdCageFrameCounter[index] > Main.rand.Next(30, 2700)) + { + if (Main.rand.Next(3) != 0) + Main.blueBirdCageFrame[index] = Main.rand.Next(3) == 0 ? 1 : 2; + Main.blueBirdCageFrameCounter[index] = 0; + } + } + else if (Main.blueBirdCageFrame[index] == 1) + { + ++Main.blueBirdCageFrameCounter[index]; + if (Main.blueBirdCageFrameCounter[index] > Main.rand.Next(900, 18000) && Main.rand.Next(3) == 0) + { + Main.blueBirdCageFrameCounter[index] = 0; + Main.blueBirdCageFrame[index] = 0; + } + } + else if (Main.blueBirdCageFrame[index] >= 2 && Main.blueBirdCageFrame[index] <= 5) + { + ++Main.blueBirdCageFrameCounter[index]; + if (Main.blueBirdCageFrameCounter[index] >= 5) + { + Main.blueBirdCageFrameCounter[index] = 0; + if (Main.blueBirdCageFrame[index] == 3 && Main.rand.Next(3) == 0) + Main.blueBirdCageFrame[index] = 13; + else + ++Main.blueBirdCageFrame[index]; + } + } + else if (Main.blueBirdCageFrame[index] == 6) + { + ++Main.blueBirdCageFrameCounter[index]; + if (Main.blueBirdCageFrameCounter[index] > Main.rand.Next(45, 2700)) + { + if (Main.rand.Next(3) != 0) + { + if (Main.rand.Next(6) == 0) + Main.blueBirdCageFrame[index] = 7; + else if (Main.rand.Next(6) == 0) + Main.blueBirdCageFrame[index] = 11; + } + Main.blueBirdCageFrameCounter[index] = 0; + } + } + else if (Main.blueBirdCageFrame[index] >= 7 && Main.blueBirdCageFrame[index] <= 10) + { + ++Main.blueBirdCageFrameCounter[index]; + if (Main.blueBirdCageFrameCounter[index] >= 5) + { + ++Main.blueBirdCageFrame[index]; + if (Main.blueBirdCageFrame[index] > 10) + Main.blueBirdCageFrame[index] = 0; + Main.blueBirdCageFrameCounter[index] = 0; + } + } + else if (Main.blueBirdCageFrame[index] >= 11 && Main.blueBirdCageFrame[index] <= 13) + { + ++Main.blueBirdCageFrameCounter[index]; + if (Main.blueBirdCageFrameCounter[index] >= 5) + { + ++Main.blueBirdCageFrame[index]; + Main.blueBirdCageFrameCounter[index] = 0; + } + } + else if (Main.blueBirdCageFrame[index] == 14) + { + ++Main.blueBirdCageFrameCounter[index]; + if (Main.blueBirdCageFrameCounter[index] > Main.rand.Next(5, 600)) + { + Main.blueBirdCageFrame[index] = Main.rand.Next(20) != 0 ? (Main.rand.Next(20) != 0 ? 15 : 4) : 16; + Main.blueBirdCageFrameCounter[index] = 0; + } + } + else if (Main.blueBirdCageFrame[index] == 15) + { + ++Main.blueBirdCageFrameCounter[index]; + if (Main.blueBirdCageFrameCounter[index] >= 10) + { + Main.blueBirdCageFrameCounter[index] = 0; + Main.blueBirdCageFrame[index] = 14; + } + } + else if (Main.blueBirdCageFrame[index] >= 16 && Main.blueBirdCageFrame[index] <= 18) + { + ++Main.blueBirdCageFrameCounter[index]; + if (Main.blueBirdCageFrameCounter[index] >= 5) + { + ++Main.blueBirdCageFrame[index]; + if (Main.blueBirdCageFrame[index] > 18) + Main.blueBirdCageFrame[index] = 0; + Main.blueBirdCageFrameCounter[index] = 0; + } + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + if (Main.redBirdCageFrame[index] == 0) + { + ++Main.redBirdCageFrameCounter[index]; + if (Main.redBirdCageFrameCounter[index] > Main.rand.Next(30, 2700)) + { + if (Main.rand.Next(3) != 0) + Main.redBirdCageFrame[index] = Main.rand.Next(3) == 0 ? 1 : 2; + Main.redBirdCageFrameCounter[index] = 0; + } + } + else if (Main.redBirdCageFrame[index] == 1) + { + ++Main.redBirdCageFrameCounter[index]; + if (Main.redBirdCageFrameCounter[index] > Main.rand.Next(900, 18000) && Main.rand.Next(3) == 0) + { + Main.redBirdCageFrameCounter[index] = 0; + Main.redBirdCageFrame[index] = 0; + } + } + else if (Main.redBirdCageFrame[index] >= 2 && Main.redBirdCageFrame[index] <= 5) + { + ++Main.redBirdCageFrameCounter[index]; + if (Main.redBirdCageFrameCounter[index] >= 5) + { + Main.redBirdCageFrameCounter[index] = 0; + if (Main.redBirdCageFrame[index] == 3 && Main.rand.Next(3) == 0) + Main.redBirdCageFrame[index] = 13; + else + ++Main.redBirdCageFrame[index]; + } + } + else if (Main.redBirdCageFrame[index] == 6) + { + ++Main.redBirdCageFrameCounter[index]; + if (Main.redBirdCageFrameCounter[index] > Main.rand.Next(45, 2700)) + { + if (Main.rand.Next(3) != 0) + { + if (Main.rand.Next(6) == 0) + Main.redBirdCageFrame[index] = 7; + else if (Main.rand.Next(6) == 0) + Main.redBirdCageFrame[index] = 11; + } + Main.redBirdCageFrameCounter[index] = 0; + } + } + else if (Main.redBirdCageFrame[index] >= 7 && Main.redBirdCageFrame[index] <= 10) + { + ++Main.redBirdCageFrameCounter[index]; + if (Main.redBirdCageFrameCounter[index] >= 5) + { + ++Main.redBirdCageFrame[index]; + if (Main.redBirdCageFrame[index] > 10) + Main.redBirdCageFrame[index] = 0; + Main.redBirdCageFrameCounter[index] = 0; + } + } + else if (Main.redBirdCageFrame[index] >= 11 && Main.redBirdCageFrame[index] <= 13) + { + ++Main.redBirdCageFrameCounter[index]; + if (Main.redBirdCageFrameCounter[index] >= 5) + { + ++Main.redBirdCageFrame[index]; + Main.redBirdCageFrameCounter[index] = 0; + } + } + else if (Main.redBirdCageFrame[index] == 14) + { + ++Main.redBirdCageFrameCounter[index]; + if (Main.redBirdCageFrameCounter[index] > Main.rand.Next(5, 600)) + { + Main.redBirdCageFrame[index] = Main.rand.Next(20) != 0 ? (Main.rand.Next(20) != 0 ? 15 : 4) : 16; + Main.redBirdCageFrameCounter[index] = 0; + } + } + else if (Main.redBirdCageFrame[index] == 15) + { + ++Main.redBirdCageFrameCounter[index]; + if (Main.redBirdCageFrameCounter[index] >= 10) + { + Main.redBirdCageFrameCounter[index] = 0; + Main.redBirdCageFrame[index] = 14; + } + } + else if (Main.redBirdCageFrame[index] >= 16 && Main.redBirdCageFrame[index] <= 18) + { + ++Main.redBirdCageFrameCounter[index]; + if (Main.redBirdCageFrameCounter[index] >= 5) + { + ++Main.redBirdCageFrame[index]; + if (Main.redBirdCageFrame[index] > 18) + Main.redBirdCageFrame[index] = 0; + Main.redBirdCageFrameCounter[index] = 0; + } + } + } + for (int index1 = 0; index1 < 2; ++index1) + { + for (int index2 = 0; index2 < Main.cageFrames; ++index2) + { + if (Main.scorpionCageFrame[index1, index2] == 0 || Main.scorpionCageFrame[index1, index2] == 7) + { + ++Main.scorpionCageFrameCounter[index1, index2]; + if (Main.scorpionCageFrameCounter[index1, index2] > Main.rand.Next(30, 3600)) + { + if (Main.scorpionCageFrame[index1, index2] == 7) + Main.scorpionCageFrame[index1, index2] = 0; + else if (Main.rand.Next(3) == 0) + Main.scorpionCageFrame[index1, index2] = Main.rand.Next(7) != 0 ? (Main.rand.Next(4) != 0 ? (Main.rand.Next(3) != 0 ? 14 : 7) : 8) : 1; + Main.scorpionCageFrameCounter[index1, index2] = 0; + } + } + else if (Main.scorpionCageFrame[index1, index2] >= 1 && Main.scorpionCageFrame[index1, index2] <= 2) + { + ++Main.scorpionCageFrameCounter[index1, index2]; + if (Main.scorpionCageFrameCounter[index1, index2] >= 10) + { + Main.scorpionCageFrameCounter[index1, index2] = 0; + ++Main.scorpionCageFrame[index1, index2]; + } + } + else if (Main.scorpionCageFrame[index1, index2] >= 8 && Main.scorpionCageFrame[index1, index2] <= 10) + { + ++Main.scorpionCageFrameCounter[index1, index2]; + if (Main.scorpionCageFrameCounter[index1, index2] >= 10) + { + Main.scorpionCageFrameCounter[index1, index2] = 0; + ++Main.scorpionCageFrame[index1, index2]; + } + } + else if (Main.scorpionCageFrame[index1, index2] == 11) + { + ++Main.scorpionCageFrameCounter[index1, index2]; + if (Main.scorpionCageFrameCounter[index1, index2] > Main.rand.Next(45, 5400)) + { + if (Main.rand.Next(6) == 0) + Main.scorpionCageFrame[index1, index2] = 12; + Main.scorpionCageFrameCounter[index1, index2] = 0; + } + } + else if (Main.scorpionCageFrame[index1, index2] >= 12 && Main.scorpionCageFrame[index1, index2] <= 13) + { + ++Main.scorpionCageFrameCounter[index1, index2]; + if (Main.scorpionCageFrameCounter[index1, index2] >= 10) + { + Main.scorpionCageFrameCounter[index1, index2] = 0; + ++Main.scorpionCageFrame[index1, index2]; + if (Main.scorpionCageFrame[index1, index2] > 13) + Main.scorpionCageFrame[index1, index2] = 0; + } + } + else if (Main.scorpionCageFrame[index1, index2] >= 14 && Main.scorpionCageFrame[index1, index2] <= 15) + { + ++Main.scorpionCageFrameCounter[index1, index2]; + if (Main.scorpionCageFrameCounter[index1, index2] >= 5) + { + Main.scorpionCageFrameCounter[index1, index2] = 0; + ++Main.scorpionCageFrame[index1, index2]; + if (Main.scorpionCageFrame[index1, index2] > 15) + Main.scorpionCageFrame[index1, index2] = 14; + if (Main.rand.Next(5) == 0) + Main.scorpionCageFrame[index1, index2] = 0; + } + } + else if (Main.scorpionCageFrame[index1, index2] == 4 || Main.scorpionCageFrame[index1, index2] == 3) + { + ++Main.scorpionCageFrameCounter[index1, index2]; + if (Main.scorpionCageFrameCounter[index1, index2] > Main.rand.Next(30, 3600)) + { + if (Main.scorpionCageFrame[index1, index2] == 3) + Main.scorpionCageFrame[index1, index2] = 4; + else if (Main.rand.Next(3) == 0) + Main.scorpionCageFrame[index1, index2] = Main.rand.Next(5) != 0 ? (Main.rand.Next(3) != 0 ? 16 : 3) : 5; + Main.scorpionCageFrameCounter[index1, index2] = 0; + } + } + else if (Main.scorpionCageFrame[index1, index2] >= 5 && Main.scorpionCageFrame[index1, index2] <= 6) + { + ++Main.scorpionCageFrameCounter[index1, index2]; + if (Main.scorpionCageFrameCounter[index1, index2] >= 10) + { + Main.scorpionCageFrameCounter[index1, index2] = 0; + ++Main.scorpionCageFrame[index1, index2]; + if (Main.scorpionCageFrame[index1, index2] > 7) + Main.scorpionCageFrame[index1, index2] = 0; + } + } + else if (Main.scorpionCageFrame[index1, index2] >= 16 && Main.scorpionCageFrame[index1, index2] <= 17) + { + ++Main.scorpionCageFrameCounter[index1, index2]; + if (Main.scorpionCageFrameCounter[index1, index2] >= 5) + { + Main.scorpionCageFrameCounter[index1, index2] = 0; + ++Main.scorpionCageFrame[index1, index2]; + if (Main.scorpionCageFrame[index1, index2] > 17) + Main.scorpionCageFrame[index1, index2] = 16; + if (Main.rand.Next(5) == 0) + Main.scorpionCageFrame[index1, index2] = 4; + } + } + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + if (Main.penguinCageFrame[index] == 0) + { + ++Main.penguinCageFrameCounter[index]; + if (Main.penguinCageFrameCounter[index] > Main.rand.Next(30, 1800)) + { + if (Main.rand.Next(2) == 0) + Main.penguinCageFrame[index] = Main.rand.Next(10) != 0 ? (Main.rand.Next(7) != 0 ? (Main.rand.Next(3) != 0 ? 1 : 2) : 15) : 4; + Main.penguinCageFrameCounter[index] = 0; + } + } + else if (Main.penguinCageFrame[index] == 1) + { + ++Main.penguinCageFrameCounter[index]; + if (Main.penguinCageFrameCounter[index] >= 10) + { + Main.penguinCageFrameCounter[index] = 0; + Main.penguinCageFrame[index] = 0; + } + } + else if (Main.penguinCageFrame[index] >= 2 && Main.penguinCageFrame[index] <= 3) + { + ++Main.penguinCageFrameCounter[index]; + if (Main.penguinCageFrameCounter[index] >= 5) + { + Main.penguinCageFrameCounter[index] = 0; + ++Main.penguinCageFrame[index]; + if (Main.penguinCageFrame[index] > 3) + Main.penguinCageFrame[index] = Main.rand.Next(3) != 0 ? 2 : 0; + } + } + else if (Main.penguinCageFrame[index] >= 4 && Main.penguinCageFrame[index] <= 6) + { + ++Main.penguinCageFrameCounter[index]; + if (Main.penguinCageFrameCounter[index] >= 10) + { + Main.penguinCageFrameCounter[index] = 0; + ++Main.penguinCageFrame[index]; + } + } + else if (Main.penguinCageFrame[index] == 15) + { + ++Main.penguinCageFrameCounter[index]; + if (Main.penguinCageFrameCounter[index] > Main.rand.Next(10, 1800)) + { + if (Main.rand.Next(2) == 0) + Main.penguinCageFrame[index] = 0; + Main.penguinCageFrameCounter[index] = 0; + } + } + else if (Main.penguinCageFrame[index] == 8) + { + ++Main.penguinCageFrameCounter[index]; + if (Main.penguinCageFrameCounter[index] > Main.rand.Next(30, 3600)) + { + if (Main.rand.Next(2) == 0) + Main.penguinCageFrame[index] = Main.rand.Next(10) != 0 ? (Main.rand.Next(7) != 0 ? (Main.rand.Next(3) != 0 ? 9 : 10) : 7) : 12; + Main.penguinCageFrameCounter[index] = 0; + } + } + else if (Main.penguinCageFrame[index] == 9) + { + ++Main.penguinCageFrameCounter[index]; + if (Main.penguinCageFrameCounter[index] >= 10) + { + Main.penguinCageFrameCounter[index] = 0; + Main.penguinCageFrame[index] = 8; + } + } + else if (Main.penguinCageFrame[index] >= 10 && Main.penguinCageFrame[index] <= 11) + { + ++Main.penguinCageFrameCounter[index]; + if (Main.penguinCageFrameCounter[index] >= 5) + { + Main.penguinCageFrameCounter[index] = 0; + ++Main.penguinCageFrame[index]; + if (Main.penguinCageFrame[index] > 3) + Main.penguinCageFrame[index] = Main.rand.Next(3) != 0 ? 10 : 8; + } + } + else if (Main.penguinCageFrame[index] >= 12 && Main.penguinCageFrame[index] <= 14) + { + ++Main.penguinCageFrameCounter[index]; + if (Main.penguinCageFrameCounter[index] >= 10) + { + Main.penguinCageFrameCounter[index] = 0; + ++Main.penguinCageFrame[index]; + } + } + else if (Main.penguinCageFrame[index] == 7) + { + ++Main.penguinCageFrameCounter[index]; + if (Main.penguinCageFrameCounter[index] > Main.rand.Next(10, 3600)) + { + if (Main.rand.Next(2) == 0) + Main.penguinCageFrame[index] = 8; + Main.penguinCageFrameCounter[index] = 0; + } + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + ++Main.turtleCageFrameCounter[index]; + int num7 = Main.turtleCageFrame[index] == 0 || Main.turtleCageFrame[index] == 15 ? 1 : (Main.turtleCageFrame[index] == 31 ? 1 : 0); + int num8 = 8; + if (num7 != 0) + num8 = Main.rand.Next(180, 250); + if (Main.turtleCageFrameCounter[index] >= num8) + { + Main.turtleCageFrameCounter[index] = 0; + if (Main.turtleCageFrame[index] == 29) + Main.turtleCageFrame[index] = 0; + else if (Main.turtleCageFrame[index] == 15 && Main.rand.Next(3) == 0) + { + Main.turtleCageFrame[index] = 30; + } + else + { + ++Main.turtleCageFrame[index]; + if (Main.turtleCageFrame[index] > 32) + Main.turtleCageFrame[index] = 15; + } + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + ++Main.seahorseCageFrameCounter[index]; + bool flag3 = Main.seahorseCageFrame[index] == 0 || Main.seahorseCageFrame[index] == 13; + int num9 = Main.seahorseCageFrame[index] == 4 || Main.seahorseCageFrame[index] == 9 || Main.seahorseCageFrame[index] == 17 ? 1 : (Main.seahorseCageFrame[index] == 22 ? 1 : 0); + bool flag4 = Main.seahorseCageFrame[index] >= 25; + int num10 = 7; + if (flag3) + num10 = Main.rand.Next(220, 340); + if (num9 != 0) + num10 = 10; + if (flag4) + num10 = 6; + if (Main.seahorseCageFrameCounter[index] >= num10) + { + Main.seahorseCageFrameCounter[index] = 0; + if (Main.seahorseCageFrame[index] == 0 && Main.rand.Next(2) == 0) + Main.seahorseCageFrame[index] = 25; + else if (Main.seahorseCageFrame[index] == 24) + { + Main.seahorseCageFrame[index] = 0; + } + else + { + ++Main.seahorseCageFrame[index]; + if (Main.seahorseCageFrame[index] > 33) + Main.seahorseCageFrame[index] = 0; + } + } + } + Main.UpdateOwlCageFrames(); + for (int index = 0; index < Main.cageFrames; ++index) + { + if (Main.snailCageFrame[index] >= 0 && Main.snailCageFrame[index] <= 13) + { + ++Main.snailCageFrameCounter[index]; + if (Main.snailCageFrameCounter[index] > Main.rand.Next(45, 3600)) + { + if (Main.snailCageFrame[index] == 8 && Main.rand.Next(2) == 0) + Main.snailCageFrame[index] = 14; + else if (Main.snailCageFrame[index] == 1 && Main.rand.Next(3) == 0) + Main.snailCageFrame[index] = 19; + else if (Main.snailCageFrame[index] == 1 && Main.rand.Next(3) == 0) + { + Main.snailCageFrame[index] = 20; + } + else + { + ++Main.snailCageFrame[index]; + if (Main.snailCageFrame[index] > 13) + Main.snailCageFrame[index] = 0; + } + Main.snailCageFrameCounter[index] = 0; + } + } + else if (Main.snailCageFrame[index] >= 14 && Main.snailCageFrame[index] <= 18) + { + ++Main.snailCageFrameCounter[index]; + if (Main.snailCageFrameCounter[index] >= 5) + { + Main.snailCageFrameCounter[index] = 0; + ++Main.snailCageFrame[index]; + } + if (Main.snailCageFrame[index] > 18) + Main.snailCageFrame[index] = 20; + } + else if (Main.snailCageFrame[index] == 19 || Main.snailCageFrame[index] == 20) + { + ++Main.snailCageFrameCounter[index]; + if (Main.snailCageFrameCounter[index] > Main.rand.Next(60, 7200)) + { + Main.snailCageFrameCounter[index] = 0; + if (Main.rand.Next(4) == 0) + Main.snailCageFrame[index] = Main.rand.Next(3) != 0 ? (Main.snailCageFrame[index] != 19 ? 19 : 20) : 2; + } + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + if (Main.snail2CageFrame[index] >= 0 && Main.snail2CageFrame[index] <= 13) + { + ++Main.snail2CageFrameCounter[index]; + if (Main.snail2CageFrameCounter[index] > Main.rand.Next(30, 2700)) + { + if (Main.snail2CageFrame[index] == 8 && Main.rand.Next(2) == 0) + Main.snail2CageFrame[index] = 14; + else if (Main.snail2CageFrame[index] == 1 && Main.rand.Next(3) == 0) + Main.snail2CageFrame[index] = 19; + else if (Main.snail2CageFrame[index] == 1 && Main.rand.Next(3) == 0) + { + Main.snail2CageFrame[index] = 20; + } + else + { + ++Main.snail2CageFrame[index]; + if (Main.snail2CageFrame[index] > 13) + Main.snail2CageFrame[index] = 0; + } + Main.snail2CageFrameCounter[index] = 0; + } + } + else if (Main.snail2CageFrame[index] >= 14 && Main.snail2CageFrame[index] <= 18) + { + ++Main.snail2CageFrameCounter[index]; + if (Main.snail2CageFrameCounter[index] >= 5) + { + Main.snail2CageFrameCounter[index] = 0; + ++Main.snail2CageFrame[index]; + } + if (Main.snail2CageFrame[index] > 18) + Main.snail2CageFrame[index] = 20; + } + else if (Main.snail2CageFrame[index] == 19 || Main.snail2CageFrame[index] == 20) + { + ++Main.snail2CageFrameCounter[index]; + if (Main.snail2CageFrameCounter[index] > Main.rand.Next(45, 5400)) + { + Main.snail2CageFrameCounter[index] = 0; + if (Main.rand.Next(4) == 0) + Main.snail2CageFrame[index] = Main.rand.Next(3) != 0 ? (Main.snail2CageFrame[index] != 19 ? 19 : 20) : 2; + } + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + if (Main.frogCageFrame[index] == 0) + { + ++Main.frogCageFrameCounter[index]; + if (Main.frogCageFrameCounter[index] > Main.rand.Next(45, 3600)) + { + Main.frogCageFrame[index] = Main.rand.Next(10) != 0 ? 12 : 1; + Main.frogCageFrameCounter[index] = 0; + } + } + else if (Main.frogCageFrame[index] >= 1 && Main.frogCageFrame[index] <= 5) + { + ++Main.frogCageFrameCounter[index]; + if (Main.frogCageFrameCounter[index] >= 5) + { + ++Main.frogCageFrame[index]; + Main.frogCageFrameCounter[index] = 0; + } + } + else if (Main.frogCageFrame[index] >= 12 && Main.frogCageFrame[index] <= 17) + { + ++Main.frogCageFrameCounter[index]; + if (Main.frogCageFrameCounter[index] >= 5) + { + Main.frogCageFrameCounter[index] = 0; + ++Main.frogCageFrame[index]; + } + if (Main.frogCageFrame[index] > 17) + Main.frogCageFrame[index] = Main.rand.Next(3) != 0 ? 12 : 0; + } + else if (Main.frogCageFrame[index] == 6) + { + ++Main.frogCageFrameCounter[index]; + if (Main.frogCageFrameCounter[index] > Main.rand.Next(45, 3600)) + { + Main.frogCageFrame[index] = Main.rand.Next(10) != 0 ? 18 : 7; + Main.frogCageFrameCounter[index] = 0; + } + } + else if (Main.frogCageFrame[index] >= 7 && Main.frogCageFrame[index] <= 11) + { + ++Main.frogCageFrameCounter[index]; + if (Main.frogCageFrameCounter[index] >= 5) + { + ++Main.frogCageFrame[index]; + Main.frogCageFrameCounter[index] = 0; + if (Main.frogCageFrame[index] > 11) + Main.frogCageFrame[index] = 0; + } + } + else if (Main.frogCageFrame[index] >= 18 && Main.frogCageFrame[index] <= 23) + { + ++Main.frogCageFrameCounter[index]; + if (Main.frogCageFrameCounter[index] >= 5) + { + Main.frogCageFrameCounter[index] = 0; + ++Main.frogCageFrame[index]; + } + if (Main.frogCageFrame[index] > 17) + Main.frogCageFrame[index] = Main.rand.Next(3) != 0 ? 18 : 6; + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + if (Main.mouseCageFrame[index] >= 0 && Main.mouseCageFrame[index] <= 1) + { + ++Main.mouseCageFrameCounter[index]; + if (Main.mouseCageFrameCounter[index] >= 5) + { + ++Main.mouseCageFrame[index]; + if (Main.mouseCageFrame[index] > 1) + Main.mouseCageFrame[index] = 0; + Main.mouseCageFrameCounter[index] = 0; + if (Main.rand.Next(15) == 0) + Main.mouseCageFrame[index] = 4; + } + } + else if (Main.mouseCageFrame[index] >= 4 && Main.mouseCageFrame[index] <= 7) + { + ++Main.mouseCageFrameCounter[index]; + if (Main.mouseCageFrameCounter[index] >= 5) + { + Main.mouseCageFrameCounter[index] = 0; + ++Main.mouseCageFrame[index]; + } + if (Main.mouseCageFrame[index] > 7) + Main.mouseCageFrame[index] = 2; + } + else if (Main.mouseCageFrame[index] >= 2 && Main.mouseCageFrame[index] <= 3) + { + ++Main.mouseCageFrameCounter[index]; + if (Main.mouseCageFrameCounter[index] >= 5) + { + ++Main.mouseCageFrame[index]; + if (Main.mouseCageFrame[index] > 3) + Main.mouseCageFrame[index] = 2; + Main.mouseCageFrameCounter[index] = 0; + if (Main.rand.Next(15) == 0) + Main.mouseCageFrame[index] = 8; + else if (Main.rand.Next(15) == 0) + Main.mouseCageFrame[index] = 12; + } + } + else if (Main.mouseCageFrame[index] >= 8 && Main.mouseCageFrame[index] <= 11) + { + ++Main.mouseCageFrameCounter[index]; + if (Main.mouseCageFrameCounter[index] >= 5) + { + Main.mouseCageFrameCounter[index] = 0; + ++Main.mouseCageFrame[index]; + } + if (Main.mouseCageFrame[index] > 11) + Main.mouseCageFrame[index] = 0; + } + else if (Main.mouseCageFrame[index] >= 12 && Main.mouseCageFrame[index] <= 13) + { + ++Main.mouseCageFrameCounter[index]; + if (Main.mouseCageFrameCounter[index] >= 5) + { + Main.mouseCageFrameCounter[index] = 0; + ++Main.mouseCageFrame[index]; + } + } + else if (Main.mouseCageFrame[index] >= 14 && Main.mouseCageFrame[index] <= 17) + { + ++Main.mouseCageFrameCounter[index]; + if (Main.mouseCageFrameCounter[index] >= 5) + { + Main.mouseCageFrameCounter[index] = 0; + ++Main.mouseCageFrame[index]; + if (Main.mouseCageFrame[index] > 17 && Main.rand.Next(20) != 0) + Main.mouseCageFrame[index] = 14; + } + } + else if (Main.mouseCageFrame[index] >= 18 && Main.mouseCageFrame[index] <= 19) + { + ++Main.mouseCageFrameCounter[index]; + if (Main.mouseCageFrameCounter[index] >= 5) + { + Main.mouseCageFrameCounter[index] = 0; + ++Main.mouseCageFrame[index]; + if (Main.mouseCageFrame[index] > 19) + Main.mouseCageFrame[index] = 0; + } + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + ++Main.wormCageFrameCounter[index]; + if (Main.wormCageFrameCounter[index] >= Main.rand.Next(30, 91)) + { + Main.wormCageFrameCounter[index] = 0; + if (Main.rand.Next(4) == 0) + { + ++Main.wormCageFrame[index]; + if (Main.wormCageFrame[index] == 9 && Main.rand.Next(2) == 0) + Main.wormCageFrame[index] = 0; + if (Main.wormCageFrame[index] > 18) + Main.wormCageFrame[index] = Main.rand.Next(2) != 0 ? 0 : 9; + } + } + } + int num11 = 0; + for (int index3 = 0; index3 < 3; ++index3) + { + switch (index3) + { + case 0: + num11 = 24; + break; + case 1: + num11 = 31; + break; + case 2: + num11 = 34; + break; + } + for (int index4 = 0; index4 < Main.cageFrames; ++index4) + { + if (++Main.slugCageFrameCounter[index3, index4] >= Main.rand.Next(5, 15)) + { + Main.slugCageFrameCounter[index3, index4] = 0; + if (++Main.slugCageFrame[index3, index4] >= num11) + Main.slugCageFrame[index3, index4] = 0; + } + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + if (Main.grasshopperCageFrame[index] >= 0 && Main.grasshopperCageFrame[index] <= 1) + { + ++Main.grasshopperCageFrameCounter[index]; + if (Main.grasshopperCageFrameCounter[index] >= 5) + { + ++Main.grasshopperCageFrame[index]; + if (Main.grasshopperCageFrame[index] > 1) + Main.grasshopperCageFrame[index] = 0; + Main.grasshopperCageFrameCounter[index] = 0; + if (Main.rand.Next(15) == 0) + Main.grasshopperCageFrame[index] = 2; + } + } + else if (Main.grasshopperCageFrame[index] >= 2 && Main.grasshopperCageFrame[index] <= 5) + { + ++Main.grasshopperCageFrameCounter[index]; + if (Main.grasshopperCageFrameCounter[index] >= 5) + { + Main.grasshopperCageFrameCounter[index] = 0; + ++Main.grasshopperCageFrame[index]; + } + if (Main.grasshopperCageFrame[index] > 5) + Main.grasshopperCageFrame[index] = 6; + } + else if (Main.grasshopperCageFrame[index] >= 6 && Main.grasshopperCageFrame[index] <= 7) + { + ++Main.grasshopperCageFrameCounter[index]; + if (Main.grasshopperCageFrameCounter[index] >= 5) + { + ++Main.grasshopperCageFrame[index]; + if (Main.grasshopperCageFrame[index] > 7) + Main.grasshopperCageFrame[index] = 6; + Main.grasshopperCageFrameCounter[index] = 0; + if (Main.rand.Next(15) == 0) + Main.grasshopperCageFrame[index] = 8; + } + } + else if (Main.grasshopperCageFrame[index] >= 8 && Main.grasshopperCageFrame[index] <= 11) + { + ++Main.grasshopperCageFrameCounter[index]; + if (Main.grasshopperCageFrameCounter[index] >= 5) + { + Main.grasshopperCageFrameCounter[index] = 0; + ++Main.grasshopperCageFrame[index]; + } + if (Main.grasshopperCageFrame[index] > 11) + Main.grasshopperCageFrame[index] = 0; + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + ++Main.maggotCageFrameCounter[index]; + int num12 = Main.maggotCageFrame[index] == 0 || Main.maggotCageFrame[index] == 6 ? 1 : (Main.maggotCageFrame[index] == 18 ? 1 : 0); + int num13 = 8; + if (num12 != 0) + num13 = Main.rand.Next(100, 140); + if (Main.maggotCageFrameCounter[index] >= num13) + { + Main.maggotCageFrameCounter[index] = 0; + if (Main.maggotCageFrame[index] == 0) + Main.maggotCageFrame[index] = Main.rand.Next(3) != 0 ? 1 : 13; + else if (Main.maggotCageFrame[index] == 12) + { + Main.maggotCageFrame[index] = 0; + } + else + { + ++Main.maggotCageFrame[index]; + if (Main.maggotCageFrame[index] > 23) + Main.maggotCageFrame[index] = 6; + } + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + ++Main.ladybugCageFrameCounter[index]; + bool flag = Main.ladybugCageFrame[index] == 3 || Main.ladybugCageFrame[index] == 7 || Main.ladybugCageFrame[index] >= 17; + int num14 = Main.rand.Next(10, 12); + if (Main.ladybugCageFrame[index] == 18) + num14 = Main.rand.Next(160, 241); + else if (flag) + num14 = Main.rand.Next(198, 206); + else if (Main.ladybugCageFrame[index] >= 8 && Main.ladybugCageFrame[index] <= 16) + num14 = 5; + if (Main.ladybugCageFrameCounter[index] >= num14) + { + Main.ladybugCageFrameCounter[index] = 0; + if (Main.ladybugCageFrame[index] < 18) + { + if ((Main.ladybugCageFrame[index] == 2 || Main.ladybugCageFrame[index] == 5) && Main.rand.Next(3) == 0) + Main.ladybugCageFrame[index] = 17; + else if (Main.ladybugCageFrame[index] == 3 || Main.ladybugCageFrame[index] == 12) + { + switch (Main.rand.Next(3)) + { + case 0: + case 1: + Main.ladybugCageFrame[index] = 4; + continue; + case 2: + Main.ladybugCageFrame[index] = 13; + continue; + default: + continue; + } + } + else if (Main.ladybugCageFrame[index] == 7 || Main.ladybugCageFrame[index] == 16) + { + switch (Main.rand.Next(3)) + { + case 0: + case 1: + Main.ladybugCageFrame[index] = 0; + continue; + case 2: + Main.ladybugCageFrame[index] = 8; + continue; + default: + continue; + } + } + else + ++Main.ladybugCageFrame[index]; + } + else + Main.ladybugCageFrame[index] = Main.rand.Next(2) == 0 ? 13 : 4; + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + ++Main.ratCageFrameCounter[index]; + bool flag5 = Main.ratCageFrame[index] == 0 || Main.ratCageFrame[index] == 4; + int num15 = Main.ratCageFrame[index] == 8 || Main.ratCageFrame[index] == 9 || Main.ratCageFrame[index] == 10 ? 1 : (Main.ratCageFrame[index] == 11 ? 1 : 0); + bool flag6 = Main.ratCageFrame[index] > 11; + int num16 = 5; + if (flag5) + num16 = Main.rand.Next(40, 70); + if (num15 != 0) + num16 = Main.rand.Next(70, 110); + if (flag6) + num16 = 180; + if (Main.ratCageFrameCounter[index] >= num16) + { + Main.ratCageFrameCounter[index] = 0; + if (Main.ratCageFrame[index] == 0 && Main.rand.Next(2) == 0) + Main.ratCageFrame[index] = Main.rand.Next(3) == 0 ? 8 : 12; + else if (Main.ratCageFrame[index] == 4 && Main.rand.Next(2) == 0) + Main.ratCageFrame[index] = 10; + else if (Main.ratCageFrame[index] == 7 || Main.ratCageFrame[index] == 9 || Main.ratCageFrame[index] == 12) + Main.ratCageFrame[index] = 0; + else if (Main.ratCageFrame[index] == 11) + { + Main.ratCageFrame[index] = 4; + } + else + { + ++Main.ratCageFrame[index]; + if (Main.ratCageFrame[index] > 16) + Main.ratCageFrame[index] = 0; + } + } + else if (Main.ratCageFrame[index] > 11) + { + int num17 = Main.ratCageFrameCounter[index] % 90; + Main.ratCageFrame[index] = num17 <= 80 ? (num17 <= 70 ? (num17 <= 60 ? (num17 <= 50 ? (num17 <= 40 ? (num17 <= 30 ? (num17 <= 20 ? (num17 <= 10 ? 12 : 13) : 14) : 15) : 16) : 15) : 14) : 13) : 12; + } + else if (Main.ratCageFrameCounter[index] % 10 == 0) + { + if (Main.ratCageFrame[index] == 8 || Main.ratCageFrame[index] == 10) + ++Main.ratCageFrame[index]; + else if (Main.ratCageFrame[index] == 9 || Main.ratCageFrame[index] == 11) + --Main.ratCageFrame[index]; + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + ++Main.waterStriderCageFrameCounter[index]; + bool flag = Main.waterStriderCageFrame[index] == 0 || Main.waterStriderCageFrame[index] == 8; + int num18 = Main.waterStriderCageFrame[index] == 17 ? 1 : (Main.waterStriderCageFrame[index] == 20 ? 1 : 0); + int num19 = 5; + if (flag) + num19 = Main.rand.Next(110, 210); + if (num18 != 0) + num19 = Main.rand.Next(150, 260); + if (Main.waterStriderCageFrameCounter[index] >= num19) + { + Main.waterStriderCageFrameCounter[index] = 0; + if (Main.waterStriderCageFrame[index] == 0 && Main.rand.Next(2) == 0) + Main.waterStriderCageFrame[index] = 16; + else if (Main.waterStriderCageFrame[index] == 8 && Main.rand.Next(2) == 0) + Main.waterStriderCageFrame[index] = 19; + else if (Main.waterStriderCageFrame[index] == 15 || Main.waterStriderCageFrame[index] == 18) + { + Main.waterStriderCageFrame[index] = 0; + } + else + { + ++Main.waterStriderCageFrame[index]; + if (Main.waterStriderCageFrame[index] > 21) + Main.waterStriderCageFrame[index] = 8; + } + } + } + ++Main.fairyJarFrameCounter[0]; + if (Main.fairyJarFrameCounter[0] > 5) + { + Main.fairyJarFrameCounter[0] = 0; + ++Main.fairyJarFrame[0]; + if (Main.fairyJarFrame[0] > 11) + Main.fairyJarFrame[0] = 0; + } + for (int index = 1; index < Main.cageFrames; ++index) + { + int num20 = Main.fairyJarFrame[0] + index % 12; + if (index % 2 == 0) + ++num20; + if (index % 5 == 0) + ++num20; + if (index % 8 == 0) + ++num20; + while (num20 >= 12) + num20 -= 12; + Main.fairyJarFrame[index] = num20; + } + for (int index = 0; index < Main.cageFrames; ++index) + { + byte num21 = 5; + if (Main.fishBowlFrameMode[index] == (byte) 1) + { + if (Main.rand.Next(900) == 0) + Main.fishBowlFrameMode[index] = (byte) Main.rand.Next((int) num21); + ++Main.fishBowlFrameCounter[index]; + if (Main.fishBowlFrameCounter[index] >= 5) + { + Main.fishBowlFrameCounter[index] = 0; + if (Main.fishBowlFrame[index] == 10) + { + if (Main.rand.Next(20) == 0) + { + Main.fishBowlFrame[index] = 11; + Main.fishBowlFrameMode[index] = (byte) 0; + } + else + Main.fishBowlFrame[index] = 1; + } + else + ++Main.fishBowlFrame[index]; + } + } + else if (Main.fishBowlFrameMode[index] == (byte) 2) + { + if (Main.rand.Next(3600) == 0) + Main.fishBowlFrameMode[index] = (byte) Main.rand.Next((int) num21); + ++Main.fishBowlFrameCounter[index]; + if (Main.fishBowlFrameCounter[index] >= 20) + { + Main.fishBowlFrameCounter[index] = 0; + if (Main.fishBowlFrame[index] == 10) + { + if (Main.rand.Next(20) == 0) + { + Main.fishBowlFrame[index] = 11; + Main.fishBowlFrameMode[index] = (byte) 0; + } + else + Main.fishBowlFrame[index] = 1; + } + else + ++Main.fishBowlFrame[index]; + } + } + else if (Main.fishBowlFrameMode[index] == (byte) 3) + { + if (Main.rand.Next(3600) == 0) + Main.fishBowlFrameMode[index] = (byte) Main.rand.Next((int) num21); + ++Main.fishBowlFrameCounter[index]; + if (Main.fishBowlFrameCounter[index] >= Main.rand.Next(5, 3600)) + { + Main.fishBowlFrameCounter[index] = 0; + if (Main.fishBowlFrame[index] == 10) + { + if (Main.rand.Next(20) == 0) + { + Main.fishBowlFrame[index] = 11; + Main.fishBowlFrameMode[index] = (byte) 0; + } + else + Main.fishBowlFrame[index] = 1; + } + else + ++Main.fishBowlFrame[index]; + } + } + else if (Main.fishBowlFrame[index] <= 10) + { + if (Main.rand.Next(3600) == 0) + Main.fishBowlFrameMode[index] = (byte) Main.rand.Next((int) num21); + ++Main.fishBowlFrameCounter[index]; + if (Main.fishBowlFrameCounter[index] >= 10) + { + Main.fishBowlFrameCounter[index] = 0; + if (Main.fishBowlFrame[index] == 10) + Main.fishBowlFrame[index] = Main.rand.Next(12) != 0 ? 1 : 11; + else + ++Main.fishBowlFrame[index]; + } + } + else if (Main.fishBowlFrame[index] == 12 || Main.fishBowlFrame[index] == 13) + { + ++Main.fishBowlFrameCounter[index]; + if (Main.fishBowlFrameCounter[index] >= 10) + { + Main.fishBowlFrameCounter[index] = 0; + ++Main.fishBowlFrame[index]; + if (Main.fishBowlFrame[index] > 13) + Main.fishBowlFrame[index] = Main.rand.Next(20) != 0 ? 12 : 14; + } + } + else if (Main.fishBowlFrame[index] >= 11) + { + ++Main.fishBowlFrameCounter[index]; + if (Main.fishBowlFrameCounter[index] >= 10) + { + Main.fishBowlFrameCounter[index] = 0; + ++Main.fishBowlFrame[index]; + if (Main.fishBowlFrame[index] > 16) + Main.fishBowlFrame[index] = 4; + } + } + } + for (int index = 0; index < Main.cageFrames; ++index) + { + ++Main.lavaFishBowlFrameCounter[index]; + if (Main.lavaFishBowlFrameCounter[index] > 4 + Main.rand.Next(3)) + { + Main.lavaFishBowlFrameCounter[index] = 0; + ++Main.lavaFishBowlFrame[index]; + if (Main.lavaFishBowlFrame[index] > 26) + Main.lavaFishBowlFrame[index] = 0; + } + } + for (int index5 = 0; index5 < 9; ++index5) + { + for (int index6 = 0; index6 < Main.cageFrames; ++index6) + { + ++Main.butterflyCageFrameCounter[index5, index6]; + if (Main.rand.Next(3600) == 0) + { + Main.butterflyCageMode[index5, index6] = (byte) Main.rand.Next(5); + if (Main.rand.Next(2) == 0) + Main.butterflyCageMode[index5, index6] += (byte) 10; + } + int num22 = Main.rand.Next(3, 16); + if (Main.butterflyCageMode[index5, index6] == (byte) 1 || Main.butterflyCageMode[index5, index6] == (byte) 11) + num22 = 3; + if (Main.butterflyCageMode[index5, index6] == (byte) 2 || Main.butterflyCageMode[index5, index6] == (byte) 12) + num22 = 5; + if (Main.butterflyCageMode[index5, index6] == (byte) 3 || Main.butterflyCageMode[index5, index6] == (byte) 13) + num22 = 10; + if (Main.butterflyCageMode[index5, index6] == (byte) 4 || Main.butterflyCageMode[index5, index6] == (byte) 14) + num22 = 15; + if (Main.butterflyCageMode[index5, index6] >= (byte) 10) + { + if (Main.butterflyCageFrame[index5, index6] <= 7) + { + if (Main.butterflyCageFrameCounter[index5, index6] >= num22) + { + Main.butterflyCageFrameCounter[index5, index6] = 0; + --Main.butterflyCageFrame[index5, index6]; + if (Main.butterflyCageFrame[index5, index6] < 0) + Main.butterflyCageFrame[index5, index6] = 7; + if (Main.butterflyCageFrame[index5, index6] == 1 || Main.butterflyCageFrame[index5, index6] == 4 || Main.butterflyCageFrame[index5, index6] == 6) + { + if (Main.rand.Next(20) == 0) + Main.butterflyCageFrame[index5, index6] += 8; + else if (Main.rand.Next(6) == 0) + { + if (Main.butterflyCageMode[index5, index6] >= (byte) 10) + Main.butterflyCageMode[index5, index6] -= (byte) 10; + else + Main.butterflyCageMode[index5, index6] += (byte) 10; + } + } + } + } + else if (Main.butterflyCageFrameCounter[index5, index6] >= num22) + { + Main.butterflyCageFrameCounter[index5, index6] = 0; + --Main.butterflyCageFrame[index5, index6]; + if (Main.butterflyCageFrame[index5, index6] < 8) + Main.butterflyCageFrame[index5, index6] = 14; + if (Main.butterflyCageFrame[index5, index6] == 9 || Main.butterflyCageFrame[index5, index6] == 12 || Main.butterflyCageFrame[index5, index6] == 14) + { + if (Main.rand.Next(20) == 0) + Main.butterflyCageFrame[index5, index6] -= 8; + else if (Main.rand.Next(6) == 0) + { + if (Main.butterflyCageMode[index5, index6] >= (byte) 10) + Main.butterflyCageMode[index5, index6] -= (byte) 10; + else + Main.butterflyCageMode[index5, index6] += (byte) 10; + } + } + } + } + else if (Main.butterflyCageFrame[index5, index6] <= 7) + { + if (Main.butterflyCageFrameCounter[index5, index6] >= num22) + { + Main.butterflyCageFrameCounter[index5, index6] = 0; + ++Main.butterflyCageFrame[index5, index6]; + if (Main.butterflyCageFrame[index5, index6] > 7) + Main.butterflyCageFrame[index5, index6] = 0; + if ((Main.butterflyCageFrame[index5, index6] == 1 || Main.butterflyCageFrame[index5, index6] == 4 || Main.butterflyCageFrame[index5, index6] == 6) && Main.rand.Next(10) == 0) + Main.butterflyCageFrame[index5, index6] += 8; + } + } + else if (Main.butterflyCageFrameCounter[index5, index6] >= num22) + { + Main.butterflyCageFrameCounter[index5, index6] = 0; + ++Main.butterflyCageFrame[index5, index6]; + if (Main.butterflyCageFrame[index5, index6] > 15) + Main.butterflyCageFrame[index5, index6] = 8; + if ((Main.butterflyCageFrame[index5, index6] == 9 || Main.butterflyCageFrame[index5, index6] == 12 || Main.butterflyCageFrame[index5, index6] == 14) && Main.rand.Next(10) == 0) + Main.butterflyCageFrame[index5, index6] -= 8; + } + } + } + Main.UpdateDragonflyJarFrames(); + for (int index7 = 0; index7 < 3; ++index7) + { + for (int index8 = 0; index8 < Main.cageFrames; ++index8) + { + ++Main.jellyfishCageFrameCounter[index7, index8]; + if (Main.jellyfishCageMode[index7, index8] == (byte) 0 && Main.rand.Next(1800) == 0) + Main.jellyfishCageMode[index7, index8] = (byte) 1; + if (Main.jellyfishCageMode[index7, index8] == (byte) 2 && Main.rand.Next(60) == 0) + Main.jellyfishCageMode[index7, index8] = (byte) 3; + int num23 = 1; + if (Main.jellyfishCageMode[index7, index8] == (byte) 0) + num23 = Main.rand.Next(10, 20); + if (Main.jellyfishCageMode[index7, index8] == (byte) 1) + num23 = Main.rand.Next(15, 25); + if (Main.jellyfishCageMode[index7, index8] == (byte) 2) + num23 = Main.rand.Next(4, 9); + if (Main.jellyfishCageMode[index7, index8] == (byte) 3) + num23 = Main.rand.Next(15, 25); + if (Main.jellyfishCageMode[index7, index8] == (byte) 0 && Main.jellyfishCageFrame[index7, index8] <= 3 && Main.jellyfishCageFrameCounter[index7, index8] >= num23) + { + Main.jellyfishCageFrameCounter[index7, index8] = 0; + ++Main.jellyfishCageFrame[index7, index8]; + if (Main.jellyfishCageFrame[index7, index8] >= 4) + Main.jellyfishCageFrame[index7, index8] = 0; + } + if (Main.jellyfishCageMode[index7, index8] == (byte) 1 && Main.jellyfishCageFrame[index7, index8] <= 7 && Main.jellyfishCageFrameCounter[index7, index8] >= num23) + { + Main.jellyfishCageFrameCounter[index7, index8] = 0; + ++Main.jellyfishCageFrame[index7, index8]; + if (Main.jellyfishCageFrame[index7, index8] >= 7) + Main.jellyfishCageMode[index7, index8] = (byte) 2; + } + if (Main.jellyfishCageMode[index7, index8] == (byte) 2 && Main.jellyfishCageFrame[index7, index8] <= 9 && Main.jellyfishCageFrameCounter[index7, index8] >= num23) + { + Main.jellyfishCageFrameCounter[index7, index8] = 0; + ++Main.jellyfishCageFrame[index7, index8]; + if (Main.jellyfishCageFrame[index7, index8] >= 9) + Main.jellyfishCageFrame[index7, index8] = 7; + } + if (Main.jellyfishCageMode[index7, index8] == (byte) 3 && Main.jellyfishCageFrame[index7, index8] <= 10 && Main.jellyfishCageFrameCounter[index7, index8] >= num23) + { + Main.jellyfishCageFrameCounter[index7, index8] = 0; + ++Main.jellyfishCageFrame[index7, index8]; + if (Main.jellyfishCageFrame[index7, index8] >= 10) + { + Main.jellyfishCageFrame[index7, index8] = 3; + Main.jellyfishCageMode[index7, index8] = (byte) 0; + } + } + } + } + } + + private static void UpdateOwlCageFrames() + { + for (int style = 0; style < Main.cageFrames; ++style) + Main.UpdateOwlCageFrame(Main.owlCageFrame, Main.owlCageFrameCounter, style); + } + + private static void UpdateDragonflyJarFrames() + { + for (int style = 0; style < Main.dragonflyJarFrameCounter.GetLength(0); ++style) + { + for (int variation = 0; variation < Main.cageFrames; ++variation) + Main.UpdateDragonflyJarFrame(Main.dragonflyJarFrame, Main.dragonflyJarFrameCounter, style, variation); + } + } + + private static void UpdateOwlCageFrame(int[] frames, int[] frameCounters, int style) + { + if (frameCounters[style] % 40 != 0 || Main.rand.Next(80) == 0) + ++frameCounters[style]; + if ((frameCounters[style] + 1) % 40 == 39) + frameCounters[style] = 40 * Main.rand.Next(4); + int num1 = frameCounters[style] % 40 / 10; + int num2 = frameCounters[style] / 40; + int num3 = 0; + switch (num2) + { + case 0: + if (num1 == 3) + num1 = 1; + num3 = num1; + break; + case 1: + if (num1 == 3) + num1 = 1; + num3 = 0; + if (num1 != 0) + { + num3 = 8 - num1; + break; + } + break; + case 2: + num3 = 0; + if (num1 != 0) + { + num3 = 7 + num1; + break; + } + break; + case 3: + num3 = 0; + if (num1 != 0) + { + num3 = 11 + num1; + break; + } + break; + } + frames[style] = num3; + } + + private static void UpdateDragonflyJarFrame( + int[,] frames, + int[,] frameCounters, + int style, + int variation) + { + ++frameCounters[style, variation]; + switch (frames[style, variation]) + { + case 0: + if (frameCounters[style, variation] < 300 || Main.rand.Next(60) != 0) + break; + frameCounters[style, variation] = 0; + frames[style, variation] = Main.rand.NextFromList(1, 5, 9); + break; + case 1: + case 5: + case 9: + if (frameCounters[style, variation] >= 100) + { + frameCounters[style, variation] = 0; + if (frames[style, variation] == 1) + { + frames[style, variation] = Main.rand.NextFromList(0, 5, 5, 9, 9); + break; + } + frames[style, variation] = 1; + break; + } + if (frameCounters[style, variation] < 6) + break; + frameCounters[style, variation] = 0; + ++frames[style, variation]; + break; + case 2: + case 3: + case 4: + case 6: + case 7: + case 8: + case 10: + case 11: + case 12: + int num1 = frames[style, variation] - 1; + int num2 = num1 % 4 - 1; + int num3 = frameCounters[style, variation] / 4 % 4; + if (num3 > 2) + num3 = 4 - num3; + int num4 = num1 - num2 + 1 + num3; + frames[style, variation] = num4; + if (frameCounters[style, variation] < 40 || Main.rand.Next(30) != 0) + break; + frameCounters[style, variation] = 100; + frames[style, variation] = num1 - num2 + 1 - 1; + break; + } + } + + public static void DoUpdate_AnimateItemIcons() + { + for (int index1 = 0; index1 < Main.itemAnimationsRegistered.Count; ++index1) + { + int index2 = Main.itemAnimationsRegistered[index1]; + if (Main.itemAnimations[index2] != null) + Main.itemAnimations[index2].Update(); + } + } + + public static void QueueMainThreadAction(Action action) => Main._mainThreadActions.Enqueue(action); + + private static void ConsumeAllMainThreadActions() + { + Action result; + while (Main._mainThreadActions.TryDequeue(out result)) + result(); + } + + protected override void Update(GameTime gameTime) + { + if (!Main.IsEnginePreloaded) + { + Main.IsEnginePreloaded = true; + if (Main.OnEnginePreload != null) + Main.OnEnginePreload(); + } + if (!this._isDrawingOrUpdating) + { + this._isDrawingOrUpdating = true; + this.DoUpdate(gameTime); + CinematicManager.Instance.Update(gameTime); + switch (Main.netMode) + { + case 1: + Netplay.Connection.Socket.SendQueuedPackets(); + break; + case 2: + for (int index = 0; index < 256; ++index) + { + if (Netplay.Clients[index].Socket != null) + Netplay.Clients[index].Socket.SendQueuedPackets(); + } + break; + } + this._isDrawingOrUpdating = false; + } + Main.ConsumeAllMainThreadActions(); + if (!Main._WeGameReqExit) + return; + this.QuitGame(); + } + + public void UpdateViewZoomKeys() + { + if (Main.inFancyUI) + return; + float num = 0.01f; + if (PlayerInput.Triggers.Current.ViewZoomIn) + Main.GameZoomTarget = Utils.Clamp(Main.GameZoomTarget + num, 1f, 2f); + if (!PlayerInput.Triggers.Current.ViewZoomOut) + return; + Main.GameZoomTarget = Utils.Clamp(Main.GameZoomTarget - num, 1f, 2f); + } + + public static void NotifyOfEvent(GameNotificationType type) + { + if (Main.instance.IsActive || !Main._flashNotificationType.HasFlag((Enum) type)) + return; + Main.QueueMainThreadAction((Action) (() => Platform.Get().StartFlashingIcon(Main.instance.Window))); + } + + protected void DoUpdate(GameTime gameTime) + { + Main.gameTimeCache = gameTime; + if (Main.showSplash) + { + this.UpdateAudio(); + } + else + { + PartySky.MultipleSkyWorkaroundFix = true; + Main.LocalPlayer.cursorItemIconReversed = false; + TimeSpan timeSpan; + if (!Main.GlobalTimerPaused) + { + timeSpan = gameTime.TotalGameTime; + Main.GlobalTimeWrappedHourly = (float) (timeSpan.TotalSeconds % 3600.0); + } + Main._overrideForExpertMode = new bool?(); + Main._overrideForMasterMode = new bool?(); + if (!Main.gameMenu && Main._currentGameModeInfo.IsJourneyMode) + { + CreativePowers.DifficultySliderPower power = CreativePowerManager.Instance.GetPower(); + if (power.GetIsUnlocked()) + { + if ((double) power.StrengthMultiplierToGiveNPCs >= 2.0) + Main._overrideForExpertMode = new bool?(true); + if ((double) power.StrengthMultiplierToGiveNPCs >= 3.0) + Main._overrideForMasterMode = new bool?(true); + } + } + Main.UpdateWorldPreparationState(); + if (Player.BlockInteractionWithProjectiles > 0 && !Main.mouseRight && Main.mouseRightRelease) + --Player.BlockInteractionWithProjectiles; + PlayerInput.SetZoom_UI(); + if (!Main.gameMenu || Main.menuMode != 888) + Main.MenuUI.SetState((UIState) null); + else + Main.InGameUI.SetState((UIState) null); + Main.CurrentInputTextTakerOverride = (object) null; + Main.AchievementAdvisor.Update(); + PlayerInput.SetZoom_Unscaled(); + Main.MouseOversTryToClear(); + PlayerInput.ResetInputsOnActiveStateChange(); + if (Main.OnTickForThirdPartySoftwareOnly != null) + Main.OnTickForThirdPartySoftwareOnly(); + if (Main._hasPendingNetmodeChange) + { + Main.netMode = Main._targetNetMode; + Main._hasPendingNetmodeChange = false; + } + if (CaptureManager.Instance.IsCapturing) + return; + if (Main.ActivePlayerFileData != null) + Main.ActivePlayerFileData.UpdatePlayTimer(); + Netplay.Update(); + Main.gameInactive = !this.IsActive; + if (Main.changeTheTitle) + { + Main.changeTheTitle = false; + this.SetTitle(); + } + this._worldUpdateTimeTester.Restart(); + if (!WorldGen.gen) + WorldGen.destroyObject = false; + if (Main.gameMenu) + Main.mapFullscreen = false; + Main.UpdateSettingUnlocks(); + if (Main.dedServ) + { + if (Main.dedServFPS) + { + ++Main.updatesCountedForFPS; + if (!Main.fpsTimer.IsRunning) + Main.fpsTimer.Restart(); + if (Main.fpsTimer.ElapsedMilliseconds >= 1000L) + { + Main.dedServCount1 += Main.updatesCountedForFPS; + ++Main.dedServCount2; + float num = (float) Main.dedServCount1 / (float) Main.dedServCount2; + Console.WriteLine(Main.updatesCountedForFPS.ToString() + " (" + (object) num + ")"); + Main.updatesCountedForFPS = 0; + Main.fpsTimer.Restart(); + } + } + else + { + if (Main.fpsTimer.IsRunning) + Main.fpsTimer.Stop(); + Main.updatesCountedForFPS = 0; + } + } + Main.DoUpdate_AutoSave(); + if (!Main.dedServ) + { + Main.Chroma.Update(Main.GlobalTimeWrappedHourly); + if (Main.superFast) + { + this.IsFixedTimeStep = false; + Main.graphics.SynchronizeWithVerticalRetrace = false; + } + else + { + if (Main.FrameSkipMode == 0 || Main.FrameSkipMode == 2) + { + if (this.IsActive) + this.IsFixedTimeStep = false; + else + this.IsFixedTimeStep = true; + } + else + { + this.IsFixedTimeStep = true; + Main.graphics.SynchronizeWithVerticalRetrace = true; + } + Main.graphics.SynchronizeWithVerticalRetrace = true; + } + if (Main.showSplash) + return; + ++Main.updatesCountedForFPS; + if (Main.fpsTimer.ElapsedMilliseconds >= 1000L) + { + if ((double) Main.fpsCount >= 30.0 + 30.0 * (double) Main.gfxQuality) + { + Main.gfxQuality += Main.gfxRate; + Main.gfxRate += 0.005f; + } + else if ((double) Main.fpsCount < 29.0 + 30.0 * (double) Main.gfxQuality) + { + Main.gfxRate = 0.01f; + Main.gfxQuality -= 0.1f; + } + if ((double) Main.gfxQuality < 0.0) + Main.gfxQuality = 0.0f; + if ((double) Main.gfxQuality > 1.0) + Main.gfxQuality = 1f; + if (Main.maxQ && this.IsActive) + { + Main.gfxQuality = 1f; + Main.maxQ = false; + } + Main.updateRate = Main.uCount; + Main.frameRate = Main.fpsCount; + Main.fpsCount = 0; + Main.fpsTimer.Restart(); + Main.updatesCountedForFPS = 0; + Main.drawsCountedForFPS = 0; + Main.uCount = 0; + Main.mapTimeMax = (double) Main.gfxQuality >= 0.800000011920929 ? 0 : (int) ((1.0 - (double) Main.gfxQuality) * 60.0); + } + if (Main.FrameSkipMode == 0 || Main.FrameSkipMode == 2) + { + double updateTimeAccumulator = Main.UpdateTimeAccumulator; + timeSpan = gameTime.ElapsedGameTime; + double totalSeconds = timeSpan.TotalSeconds; + Main.UpdateTimeAccumulator = updateTimeAccumulator + totalSeconds; + if (Main.UpdateTimeAccumulator < 0.0166666675359011 && !Main.superFast) + { + if (Main.FrameSkipMode != 2) + return; + Main.instance.SuppressDraw(); + return; + } + gameTime = new GameTime(gameTime.TotalGameTime, new TimeSpan(166666L)); + Main.UpdateTimeAccumulator -= 0.0166666675359011; + Main.UpdateTimeAccumulator = Math.Min(Main.UpdateTimeAccumulator, 0.0166666675359011); + } + ++Main.uCount; + Main.drawSkip = false; + PlayerInput.SetZoom_UI(); + Main.UpdateUIStates(gameTime); + PlayerInput.SetZoom_Unscaled(); + Terraria.Graphics.Effects.Filters.Scene.Update(gameTime); + Overlays.Scene.Update(gameTime); + LiquidRenderer.Instance.Update(gameTime); + this.UpdateAudio(); + InGameNotificationsTracker.Update(); + ItemSlot.UpdateInterface(); + if (Main.teamCooldown > 0) + --Main.teamCooldown; + Main.DoUpdate_AnimateBackgrounds(); + Animation.UpdateAll(); + switch (Main.qaStyle) + { + case 1: + Main.gfxQuality = 1f; + break; + case 2: + Main.gfxQuality = 0.5f; + break; + case 3: + Main.gfxQuality = 0.0f; + break; + } + Main.maxDustToDraw = (int) (6000.0 * ((double) Main.gfxQuality * 0.699999988079071 + 0.300000011920929)); + if ((double) Main.gfxQuality < 0.9) + Main.maxDustToDraw = (int) ((double) Main.maxDustToDraw * (double) Main.gfxQuality); + if (Main.maxDustToDraw < 1000) + Main.maxDustToDraw = 1000; + Gore.goreTime = (int) (600.0 * (double) Main.gfxQuality); + if (!WorldGen.gen) + { + Terraria.Liquid.cycles = (int) (17.0 - 10.0 * (double) Main.gfxQuality); + Terraria.Liquid.curMaxLiquid = (int) ((double) Terraria.Liquid.maxLiquid * 0.25 + (double) Terraria.Liquid.maxLiquid * 0.75 * (double) Main.gfxQuality); + if (Main.Setting_UseReducedMaxLiquids) + Terraria.Liquid.curMaxLiquid = (int) (2500.0 + 2500.0 * (double) Main.gfxQuality); + } + if (Main.superFast) + { + Main.graphics.SynchronizeWithVerticalRetrace = false; + Main.drawSkip = false; + } + LegacyLighting.RenderPhases = (double) Main.gfxQuality >= 0.2 ? ((double) Main.gfxQuality >= 0.4 ? ((double) Main.gfxQuality >= 0.6 ? ((double) Main.gfxQuality >= 0.8 ? 4 : 5) : 6) : 7) : 8; + if (!WorldGen.gen && Terraria.Liquid.quickSettle) + { + Terraria.Liquid.curMaxLiquid = Terraria.Liquid.maxLiquid; + if (Main.Setting_UseReducedMaxLiquids) + Terraria.Liquid.curMaxLiquid = 5000; + Terraria.Liquid.cycles = 1; + } + if (WorldGen.drunkWorldGen) + { + if (!Main.gameMenu) + { + WorldGen.drunkWorldGen = false; + this.logoRotation = 0.0f; + this.logoRotationSpeed = 0.0f; + this.logoScale = 1f; + } + } + else if (Main.gameMenu && (double) Math.Abs(this.logoRotationSpeed) > 1000.0) + { + this.logoRotation = 0.0f; + this.logoRotationSpeed = 0.0f; + this.logoScale = 1f; + } + Main.UpdateOldNPCShop(); + Main.hasFocus = this.IsActive; + Main.hasFocus |= Form.ActiveForm == Control.FromHandle(this.Window.Handle) as Form; + if (!this.IsActive && Main.netMode == 0) + { + if (!Platform.IsOSX) + this.IsMouseVisible = true; + if (Main.netMode != 2 && Main.myPlayer >= 0) + Main.player[Main.myPlayer].delayUseItem = true; + Main.mouseLeftRelease = false; + Main.mouseRightRelease = false; + if (Main.gameMenu) + Main.UpdateMenu(); + Main.gamePaused = true; + return; + } + if (!Platform.IsOSX) + this.IsMouseVisible = false; + SkyManager.Instance.Update(gameTime); + if (!Main.gamePaused) + EmoteBubble.UpdateAll(); + ScreenObstruction.Update(); + ScreenDarkness.Update(); + MoonlordDeathDrama.Update(); + Main.DoUpdate_AnimateCursorColors(); + Main.DoUpdate_AnimateTileGlows(); + this.DoUpdate_AnimateDiscoRGB(); + Main.DoUpdate_AnimateVisualPlayerAura(); + this.DoUpdate_AnimateWaterfalls(); + Main.DoUpdate_AnimateWalls(); + Main.AnimateTiles(); + Main.DoUpdate_AnimateItemIcons(); + Main.DoUpdate_F10_ToggleFPS(); + Main.DoUpdate_F9_ToggleLighting(); + Main.DoUpdate_F8_ToggleNetDiagnostics(); + Main.DoUpdate_F7_ToggleGraphicsDiagnostics(); + Main.DoUpdate_F11_ToggleUI(); + Main.DoUpdate_AltEnter_ToggleFullscreen(); + this.DoUpdate_HandleInput(); + Main.DoUpdate_HandleChat(); + Main.DoUpdate_Enter_ToggleChat(); + if (Main.gameMenu) + { + Main.UpdateMenu(); + if (Main.netMode != 2) + return; + Main.gamePaused = false; + } + Main.CheckInvasionProgressDisplay(); + } + this.UpdateWindyDayState(); + if (Main.netMode == 2) + Main.cloudAlpha = Main.maxRaining; + bool isActive = this.IsActive; + if (Main.netMode == 1) + Main.TrySyncingMyPlayer(); + if (Main.CanPauseGame()) + { + Main.DoUpdate_WhilePaused(); + Main.gamePaused = true; + } + else + { + Main.gamePaused = false; + if (Main.OnTickForInternalCodeOnly != null) + Main.OnTickForInternalCodeOnly(); + if (Main.netMode != 1 && !Main.gameMenu && !Main.gamePaused && Main.AmbienceServer != null) + Main.AmbienceServer.Update(); + WorldGen.BackgroundsCache.UpdateFlashValues(); + if (Main.LocalGolfState != null) + Main.LocalGolfState.Update(); + if ((isActive || Main.netMode == 1) && (double) Main.cloudAlpha > 0.0) + Rain.MakeRain(); + if (Main.netMode != 1) + this.updateCloudLayer(); + for (int index = 0; index < Main.dayRate; ++index) + this.UpdateWeather(gameTime); + if (++Main.timeForVisualEffects >= 216000.0) + Main.timeForVisualEffects = 0.0; + Main.UnpausedUpdateSeed = Utils.RandomNextSeed(Main.UnpausedUpdateSeed); + Main.Ambience(); + if (Main.netMode != 2) + { + try + { + Main.snowing(); + } + catch + { + if (!Main.ignoreErrors) + throw; + } + Sandstorm.EmitDust(); + } + if (!Main.dedServ && (double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0 && Main.netMode != 2) + { + Star.UpdateStars(); + Cloud.UpdateClouds(); + } + PortalHelper.UpdatePortalPoints(); + if (this.ShouldUpdateEntities()) + this.DoUpdateInWorld(this._worldUpdateTimeTester); + if (Main.netMode != 2) + Main.ChromaPainter.Update(); + base.Update(gameTime); + } + } + } + + private static bool CanPauseGame() + { + bool flag = false; + if (Main.netMode == 0) + flag = ((flag | Main.ingameOptionsWindow ? 1 : 0) | (!Main.autoPause ? 0 : (Main.playerInventory || Main.LocalPlayer.sign >= 0 ? 1 : (Main.InGameUI.IsVisible ? 1 : 0)))) != 0; + return flag; + } + + private static void DoUpdate_WhilePaused() + { + if (!Main.drawingPlayerChat && !Main.editSign && !Main.editChest && !Main.blockInput) + { + Main.player[Main.myPlayer].controlInv = PlayerInput.Triggers.Current.Inventory; + if (Main.player[Main.myPlayer].controlInv) + { + if (Main.player[Main.myPlayer].releaseInventory) + Main.player[Main.myPlayer].ToggleInv(); + Main.player[Main.myPlayer].releaseInventory = false; + } + else + Main.player[Main.myPlayer].releaseInventory = true; + } + if (Main.playerInventory) + { + Recipe.GetThroughDelayedFindRecipes(); + int num1 = PlayerInput.ScrollWheelDelta / 120; + bool flag = true; + if (Main.recBigList) + { + int num2 = 42; + int y = 340; + int x = 310; + PlayerInput.SetZoom_UI(); + int num3 = (Main.screenWidth - x - 280) / num2; + int num4 = (Main.screenHeight - y - 20) / num2; + if (new Microsoft.Xna.Framework.Rectangle(x, y, num3 * num2, num4 * num2).Contains(Main.MouseScreen.ToPoint())) + { + int num5 = Math.Sign(num1); + for (; num1 != 0; num1 -= num5) + { + if (num1 < 0) + { + Main.recStart -= num3; + if (Main.recStart < 0) + Main.recStart = 0; + } + else + { + Main.recStart += num3; + SoundEngine.PlaySound(12); + if (Main.recStart > Main.numAvailableRecipes - num3) + Main.recStart = Main.numAvailableRecipes - num3; + } + } + } + PlayerInput.SetZoom_World(); + } + if (flag) + { + Main.focusRecipe += num1; + if (Main.focusRecipe > Main.numAvailableRecipes - 1) + Main.focusRecipe = Main.numAvailableRecipes - 1; + if (Main.focusRecipe < 0) + Main.focusRecipe = 0; + } + Main.player[Main.myPlayer].dropItemCheck(); + } + Main.player[Main.myPlayer].head = Main.player[Main.myPlayer].armor[0].headSlot; + Main.player[Main.myPlayer].body = Main.player[Main.myPlayer].armor[1].bodySlot; + Main.player[Main.myPlayer].legs = Main.player[Main.myPlayer].armor[2].legSlot; + if (!Main.player[Main.myPlayer].hostile) + { + if (Main.player[Main.myPlayer].armor[10].headSlot >= 0) + Main.player[Main.myPlayer].head = Main.player[Main.myPlayer].armor[10].headSlot; + if (Main.player[Main.myPlayer].armor[11].bodySlot >= 0) + Main.player[Main.myPlayer].body = Main.player[Main.myPlayer].armor[11].bodySlot; + if (Main.player[Main.myPlayer].armor[12].legSlot >= 0) + Main.player[Main.myPlayer].legs = Main.player[Main.myPlayer].armor[12].legSlot; + } + if (Main.editSign) + { + if (Main.player[Main.myPlayer].sign == -1) + Main.editSign = false; + else + Main.InputTextSign(); + } + else if (Main.editChest && Main.player[Main.myPlayer].chest == -1) + Main.editChest = false; + Player.tileTargetX = (int) (((double) Main.mouseX + (double) Main.screenPosition.X) / 16.0); + Player.tileTargetY = (int) (((double) Main.mouseY + (double) Main.screenPosition.Y) / 16.0); + Main.player[Main.myPlayer].LookForTileInteractions(); + Main.player[Main.myPlayer].lastChest = Main.player[Main.myPlayer].chest; + if (!Main.playerInventory) + return; + Main.player[Main.myPlayer].AdjTiles(); + } + + private static void UpdateUIStates(GameTime gameTime) + { + if (Main.MenuUI != null) + Main.MenuUI.Update(gameTime); + if (Main.InGameUI != null) + Main.InGameUI.Update(gameTime); + Main.CreativeMenu.Update(gameTime); + Main.BigBossProgressBar.Update(); + } + + private void DoDebugFunctions() + { + } + + private void PreUpdateAllProjectiles() + { + this.SpelunkerProjectileHelper.OnPreUpdateAllProjectiles(); + this.ChumBucketProjectileHelper.OnPreUpdateAllProjectiles(); + } + + private void PostUpdateAllProjectiles() + { + } + + private static void TrySyncingMyPlayer() + { + Player clientPlayer = Main.clientPlayer; + bool flag1 = false; + for (int index = 0; index < 59; ++index) + { + if (Main.player[Main.myPlayer].inventory[index].IsNotTheSameAs(clientPlayer.inventory[index])) + { + flag1 = true; + NetMessage.SendData(5, number: Main.myPlayer, number2: ((float) index), number3: ((float) Main.player[Main.myPlayer].inventory[index].prefix)); + } + } + for (int index = 0; index < Main.player[Main.myPlayer].armor.Length; ++index) + { + if (Main.player[Main.myPlayer].armor[index].IsNotTheSameAs(clientPlayer.armor[index])) + { + flag1 = true; + NetMessage.SendData(5, number: Main.myPlayer, number2: ((float) (59 + index)), number3: ((float) Main.player[Main.myPlayer].armor[index].prefix)); + } + } + for (int index = 0; index < Main.player[Main.myPlayer].miscEquips.Length; ++index) + { + if (Main.player[Main.myPlayer].miscEquips[index].IsNotTheSameAs(clientPlayer.miscEquips[index])) + { + flag1 = true; + NetMessage.SendData(5, number: Main.myPlayer, number2: ((float) (58 + Main.player[Main.myPlayer].armor.Length + Main.player[Main.myPlayer].dye.Length + 1 + index)), number3: ((float) Main.player[Main.myPlayer].miscEquips[index].prefix)); + } + } + for (int index = 0; index < Main.player[Main.myPlayer].miscDyes.Length; ++index) + { + if (Main.player[Main.myPlayer].miscDyes[index].IsNotTheSameAs(clientPlayer.miscDyes[index])) + { + flag1 = true; + NetMessage.SendData(5, number: Main.myPlayer, number2: ((float) (58 + Main.player[Main.myPlayer].armor.Length + Main.player[Main.myPlayer].dye.Length + Main.player[Main.myPlayer].miscEquips.Length + 1 + index)), number3: ((float) Main.player[Main.myPlayer].miscDyes[index].prefix)); + } + } + for (int index = 0; index < Main.player[Main.myPlayer].bank.item.Length; ++index) + { + if (Main.player[Main.myPlayer].bank.item[index].IsNotTheSameAs(clientPlayer.bank.item[index])) + { + flag1 = true; + NetMessage.SendData(5, number: Main.myPlayer, number2: ((float) (58 + Main.player[Main.myPlayer].armor.Length + Main.player[Main.myPlayer].dye.Length + Main.player[Main.myPlayer].miscEquips.Length + Main.player[Main.myPlayer].miscDyes.Length + 1 + index)), number3: ((float) Main.player[Main.myPlayer].bank.item[index].prefix)); + } + } + for (int index = 0; index < Main.player[Main.myPlayer].bank2.item.Length; ++index) + { + if (Main.player[Main.myPlayer].bank2.item[index].IsNotTheSameAs(clientPlayer.bank2.item[index])) + { + flag1 = true; + NetMessage.SendData(5, number: Main.myPlayer, number2: ((float) (58 + Main.player[Main.myPlayer].armor.Length + Main.player[Main.myPlayer].dye.Length + Main.player[Main.myPlayer].miscEquips.Length + Main.player[Main.myPlayer].miscDyes.Length + Main.player[Main.myPlayer].bank.item.Length + 1 + index)), number3: ((float) Main.player[Main.myPlayer].bank2.item[index].prefix)); + } + } + if (Main.player[Main.myPlayer].trashItem.IsNotTheSameAs(clientPlayer.trashItem)) + { + flag1 = true; + NetMessage.SendData(5, number: Main.myPlayer, number2: ((float) (58 + Main.player[Main.myPlayer].armor.Length + Main.player[Main.myPlayer].dye.Length + Main.player[Main.myPlayer].miscEquips.Length + Main.player[Main.myPlayer].miscDyes.Length + Main.player[Main.myPlayer].bank.item.Length + Main.player[Main.myPlayer].bank2.item.Length + 1)), number3: ((float) Main.player[Main.myPlayer].trashItem.prefix)); + } + for (int index = 0; index < Main.player[Main.myPlayer].bank3.item.Length; ++index) + { + if (Main.player[Main.myPlayer].bank3.item[index].IsNotTheSameAs(clientPlayer.bank3.item[index])) + { + flag1 = true; + NetMessage.SendData(5, number: Main.myPlayer, number2: ((float) (58 + Main.player[Main.myPlayer].armor.Length + Main.player[Main.myPlayer].dye.Length + Main.player[Main.myPlayer].miscEquips.Length + Main.player[Main.myPlayer].miscDyes.Length + Main.player[Main.myPlayer].bank.item.Length + Main.player[Main.myPlayer].bank2.item.Length + 2 + index)), number3: ((float) Main.player[Main.myPlayer].bank3.item[index].prefix)); + } + } + for (int index = 0; index < Main.player[Main.myPlayer].bank4.item.Length; ++index) + { + if (Main.player[Main.myPlayer].bank4.item[index].IsNotTheSameAs(clientPlayer.bank4.item[index])) + { + flag1 = true; + NetMessage.SendData(5, number: Main.myPlayer, number2: ((float) (58 + Main.player[Main.myPlayer].armor.Length + Main.player[Main.myPlayer].dye.Length + Main.player[Main.myPlayer].miscEquips.Length + Main.player[Main.myPlayer].miscDyes.Length + Main.player[Main.myPlayer].bank.item.Length + Main.player[Main.myPlayer].bank2.item.Length + Main.player[Main.myPlayer].bank3.item.Length + 2 + index)), number3: ((float) Main.player[Main.myPlayer].bank4.item[index].prefix)); + } + } + for (int index = 0; index < Main.player[Main.myPlayer].dye.Length; ++index) + { + if (Main.player[Main.myPlayer].dye[index].IsNotTheSameAs(clientPlayer.dye[index])) + { + flag1 = true; + NetMessage.SendData(5, number: Main.myPlayer, number2: ((float) (58 + Main.player[Main.myPlayer].armor.Length + 1 + index)), number3: ((float) Main.player[Main.myPlayer].dye[index].prefix)); + } + } + if (Main.player[Main.myPlayer].chest != clientPlayer.chest && Main.player[Main.myPlayer].chest < 0 && clientPlayer.chest >= 0) + { + if (Main.player[Main.myPlayer].editedChestName) + { + if (Main.chest[clientPlayer.chest] != null) + NetMessage.SendData(33, text: NetworkText.FromLiteral(Main.chest[clientPlayer.chest].name), number: Main.player[Main.myPlayer].chest, number2: 1f); + else + NetMessage.SendData(33, number: Main.player[Main.myPlayer].chest); + Main.player[Main.myPlayer].editedChestName = false; + } + else + NetMessage.SendData(33, number: Main.player[Main.myPlayer].chest); + } + if (Main.player[Main.myPlayer].talkNPC != clientPlayer.talkNPC) + NetMessage.SendData(40, number: Main.myPlayer); + if (Main.LocalPlayer.tileEntityAnchor.interactEntityID != clientPlayer.tileEntityAnchor.interactEntityID && Main.LocalPlayer.tileEntityAnchor.interactEntityID < 0) + NetMessage.SendData(122, number: -1, number2: ((float) Main.myPlayer)); + bool flag2 = false; + if ((int) (byte) Main.player[Main.myPlayer].zone1 != (int) (byte) clientPlayer.zone1) + flag2 = true; + if ((int) (byte) Main.player[Main.myPlayer].zone2 != (int) (byte) clientPlayer.zone2) + flag2 = true; + if ((int) (byte) Main.player[Main.myPlayer].zone3 != (int) (byte) clientPlayer.zone3) + flag2 = true; + if ((int) (byte) Main.player[Main.myPlayer].zone4 != (int) (byte) clientPlayer.zone4) + flag2 = true; + if (flag2) + NetMessage.SendData(36, number: Main.myPlayer); + if (Main.player[Main.myPlayer].statLife != clientPlayer.statLife || Main.player[Main.myPlayer].statLifeMax != clientPlayer.statLifeMax) + Main.player[Main.myPlayer].netLife = true; + if (Main.player[Main.myPlayer].netLifeTime > 0) + --Main.player[Main.myPlayer].netLifeTime; + else if (Main.player[Main.myPlayer].netLife) + { + Main.player[Main.myPlayer].netLife = false; + Main.player[Main.myPlayer].netLifeTime = 60; + NetMessage.SendData(16, number: Main.myPlayer); + } + if (Main.player[Main.myPlayer].statMana != clientPlayer.statMana || Main.player[Main.myPlayer].statManaMax != clientPlayer.statManaMax) + Main.player[Main.myPlayer].netMana = true; + if (Main.player[Main.myPlayer].netManaTime > 0) + --Main.player[Main.myPlayer].netManaTime; + else if (Main.player[Main.myPlayer].netMana) + { + Main.player[Main.myPlayer].netMana = false; + Main.player[Main.myPlayer].netManaTime = 60; + NetMessage.SendData(42, number: Main.myPlayer); + } + bool flag3 = false; + for (int index = 0; index < 22; ++index) + { + if (Main.player[Main.myPlayer].buffType[index] != clientPlayer.buffType[index]) + flag3 = true; + } + if (flag3) + { + NetMessage.SendData(50, number: Main.myPlayer); + NetMessage.SendData(13, number: Main.myPlayer); + } + bool flag4 = false; + if (Main.player[Main.myPlayer].MinionRestTargetPoint != clientPlayer.MinionRestTargetPoint) + flag4 = true; + if (flag4) + NetMessage.SendData(99, number: Main.myPlayer); + bool flag5 = false; + if (Main.player[Main.myPlayer].MinionAttackTargetNPC != clientPlayer.MinionAttackTargetNPC) + flag5 = true; + if (flag5) + NetMessage.SendData(115, number: Main.myPlayer); + if (clientPlayer.shieldRaised != Main.player[Main.myPlayer].shieldRaised) + NetMessage.SendData(13, number: Main.myPlayer); + if (flag1) + NetMessage.SendData(138); + Main.clientPlayer = (Player) Main.player[Main.myPlayer].clientClone(); + } + + public bool ShouldUpdateEntities() => Main._worldPreparationState == Main.WorldPreparationState.Ready; + + private void DoUpdateInWorld(Stopwatch sw) + { + this.UpdateParticleSystems(); + Main.tileSolid[379] = false; + int num1 = 0; + int num2 = 0; + Main.sittingManager.ClearPlayerAnchors(); + Main.sleepingManager.ClearPlayerAnchors(); + for (int i = 0; i < (int) byte.MaxValue; ++i) + { + try + { + Main.player[i].Update(i); + if (Main.player[i].active) + { + ++num1; + if (Main.player[i].sleeping.FullyFallenAsleep) + ++num2; + } + } + catch + { + if (!Main.ignoreErrors) + throw; + } + } + Main.CurrentFrameFlags.ActivePlayersCount = num1; + Main.CurrentFrameFlags.SleepingPlayersCount = num2; + if (Main.netMode != 2) + { + int player = Main.myPlayer; + if (Main.player[player].creativeGodMode) + { + Main.player[player].statLife = Main.player[player].statLifeMax2; + Main.player[player].statMana = Main.player[player].statManaMax2; + Main.player[player].breath = Main.player[player].breathMax; + } + } + ++Main._gameUpdateCount; + NPC.RevengeManager.Update(); + if (Main.netMode != 1) + { + try + { + NPC.SpawnNPC(); + } + catch + { + } + } + if (Main.netMode != 1) + PressurePlateHelper.Update(); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + Main.player[index].nearbyActiveNPCs = 0.0f; + Main.player[index].townNPCs = 0.0f; + } + Main.CheckBossIndexes(); + Main.sittingManager.ClearNPCAnchors(); + Main.sleepingManager.ClearNPCAnchors(); + NPC.taxCollector = false; + NPC.ClearFoundActiveNPCs(); + NPC.UpdateFoundActiveNPCs(); + FixExploitManEaters.Update(); + if (Main.netMode != 1) + Main.BestiaryTracker.Sights.ScanWorldForFinds(); + bool flag = false; + if (NPC.offSetDelayTime > 0) + --NPC.offSetDelayTime; + for (int i = 0; i < 200; ++i) + { + if (Main.ignoreErrors) + { + try + { + Main.npc[i].UpdateNPC(i); + if (Main.npc[i].active) + { + if (!Main.npc[i].boss) + { + if (!NPCID.Sets.DangerThatPreventsOtherDangers[Main.npc[i].type]) + continue; + } + flag = true; + } + } + catch (Exception ex) + { + Main.npc[i] = new NPC(); + } + } + else + Main.npc[i].UpdateNPC(i); + } + Main.CurrentFrameFlags.AnyActiveBossNPC = flag; + for (int index = 0; index < 600; ++index) + { + if (Main.ignoreErrors) + { + try + { + Main.gore[index].Update(); + } + catch + { + Main.gore[index] = new Gore(); + } + } + else + Main.gore[index].Update(); + } + LockOnHelper.SetUP(); + Main.CurrentFrameFlags.HadAnActiveInteractibleProjectile = false; + this.PreUpdateAllProjectiles(); + for (int i = 0; i < 1000; ++i) + { + Main.ProjectileUpdateLoopIndex = i; + if (Main.ignoreErrors) + { + try + { + Main.projectile[i].Update(i); + } + catch + { + Main.projectile[i] = new Projectile(); + } + } + else + Main.projectile[i].Update(i); + } + Main.ProjectileUpdateLoopIndex = -1; + this.PostUpdateAllProjectiles(); + LockOnHelper.SetDOWN(); + Item.numberOfNewItems = 0; + for (int i = 0; i < 400; ++i) + { + if (Main.ignoreErrors) + { + try + { + Main.item[i].UpdateItem(i); + } + catch + { + Main.item[i] = new Item(); + } + } + else + Main.item[i].UpdateItem(i); + } + if (Main.ignoreErrors) + { + try + { + Dust.UpdateDust(); + } + catch + { + for (int index = 0; index < 6000; ++index) + { + Main.dust[index] = new Dust(); + Main.dust[index].dustIndex = index; + } + } + } + else + Dust.UpdateDust(); + if (Main.netMode != 2) + { + CombatText.UpdateCombatText(); + PopupText.UpdateItemText(); + } + if (Main.ignoreErrors) + { + try + { + Main.UpdateTime(); + } + catch + { + Main.checkForSpawns = 0; + } + } + else + Main.UpdateTime(); + Main.tileSolid[379] = true; + if (Main.gameMenu && Main.netMode != 2) + return; + if (Main.netMode != 1) + { + if (Main.ignoreErrors) + { + try + { + WorldGen.UpdateWorld(); + Main.UpdateInvasion(); + } + catch + { + } + } + else + { + WorldGen.UpdateWorld(); + Main.UpdateInvasion(); + } + } + if (Main.ignoreErrors) + { + try + { + if (Main.netMode == 2) + Main.UpdateServer(); + if (Main.netMode == 1) + Main.UpdateClient(); + } + catch + { + int netMode = Main.netMode; + } + } + else + { + if (Main.netMode == 2) + Main.UpdateServer(); + if (Main.netMode == 1) + Main.UpdateClient(); + } + Main.chatMonitor.Update(); + Main.upTimer = (float) sw.Elapsed.TotalMilliseconds; + if ((double) Main.upTimerMaxDelay > 0.0) + --Main.upTimerMaxDelay; + else + Main.upTimerMax = 0.0f; + if ((double) Main.upTimer > (double) Main.upTimerMax) + { + Main.upTimerMax = Main.upTimer; + Main.upTimerMaxDelay = 400f; + } + Chest.UpdateChestFrames(); + this._ambientWindSys.Update(); + this.TilesRenderer.Update(); + if ((double) Main.cameraLerp <= 0.0) + return; + ++Main.cameraLerpTimer; + if (Main.cameraLerpTimer >= Main.cameraLerpTimeToggle) + Main.cameraLerp += (float) ((Main.cameraLerpTimer - Main.cameraLerpTimeToggle) / 3 + 1) * (1f / 1000f); + if ((double) Main.cameraLerp <= 1.0) + return; + Main.cameraLerp = 1f; + } + + private static void CheckBossIndexes() + { + if (!Main.IsNPCActiveAndOneOfTypes(Main.wofNPCIndex, 113)) + Main.wofNPCIndex = -1; + if (!Main.IsNPCActiveAndOneOfTypes(NPC.golemBoss, 245)) + NPC.golemBoss = -1; + if (!Main.IsNPCActiveAndOneOfTypes(NPC.plantBoss, 262)) + NPC.plantBoss = -1; + if (Main.IsNPCActiveAndOneOfTypes(NPC.crimsonBoss, 266)) + return; + NPC.crimsonBoss = -1; + } + + private static bool IsNPCActiveAndOneOfTypes(int npcIndex, params int[] types) + { + if (npcIndex < 0) + return false; + NPC npc = Main.npc[npcIndex]; + if (!npc.active) + return false; + for (int index = 0; index < types.Length; ++index) + { + if (npc.type == types[index]) + return true; + } + return false; + } + + private static void UpdateOldNPCShop() + { + if (Main.npcShop == Main.oldNPCShop) + return; + Main.oldNPCShop = Main.npcShop; + Main.shopSellbackHelper.Clear(); + } + + private static void DoUpdate_AnimateCursorColors() + { + Main.CursorColor(); + Main.mouseTextColor += (byte) Main.mouseTextColorChange; + if (Main.mouseTextColor >= byte.MaxValue) + Main.mouseTextColorChange = -1; + if (Main.mouseTextColor <= (byte) 190) + Main.mouseTextColorChange = 1; + Main.masterColor += (float) Main.masterColorDir * 0.05f; + if ((double) Main.masterColor > 1.0) + { + Main.masterColor = 1f; + Main.masterColorDir = -1; + } + if ((double) Main.masterColor >= 0.0) + return; + Main.masterColor = 0.0f; + Main.masterColorDir = 1; + } + + private static void DoUpdate_AnimateTileGlows() + { + Main.demonTorch += (float) Main.demonTorchDir * 0.01f; + if ((double) Main.demonTorch > 1.0) + { + Main.demonTorch = 1f; + Main.demonTorchDir = -1; + } + if ((double) Main.demonTorch < 0.0) + { + Main.demonTorch = 0.0f; + Main.demonTorchDir = 1; + } + Main.martianLight += (float) Main.martianLightDir * 0.015f; + if ((double) Main.martianLight > 1.0) + { + Main.martianLight = 1f; + Main.martianLightDir = -1; + } + if ((double) Main.martianLight >= 0.0) + return; + Main.martianLight = 0.0f; + Main.martianLightDir = 1; + } + + private static void DoUpdate_Enter_ToggleChat() + { + if (((!Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Enter) ? 0 : (Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.LeftAlt) ? 0 : (!Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.RightAlt) ? 1 : 0))) == 0 ? 0 : (Main.hasFocus ? 1 : 0)) != 0) + { + if (Main.chatRelease && !Main.drawingPlayerChat && !Main.editSign && !Main.editChest && !Main.gameMenu && !Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Escape)) + { + SoundEngine.PlaySound(10); + Main.OpenPlayerChat(); + Main.chatText = ""; + } + Main.chatRelease = false; + } + else + Main.chatRelease = true; + } + + public static void OpenPlayerChat() + { + if (Main.CurrentInputTextTakerOverride != null) + return; + Main.drawingPlayerChat = true; + Main.clrInput(); + } + + public static void ClosePlayerChat() + { + Main.drawingPlayerChat = false; + PlayerInput.WritingText = true; + Main.player[Main.myPlayer].releaseHook = false; + Main.player[Main.myPlayer].releaseThrow = false; + } + + private static void DoUpdate_HandleChat() + { + if (Main.CurrentInputTextTakerOverride != null) + { + Main.drawingPlayerChat = false; + } + else + { + if (Main.editSign) + Main.drawingPlayerChat = false; + if (PlayerInput.UsingGamepad) + Main.drawingPlayerChat = false; + if (!Main.drawingPlayerChat) + { + Main.chatMonitor.ResetOffset(); + } + else + { + int linesOffset = 0; + if (Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Up)) + linesOffset = 1; + else if (Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Down)) + linesOffset = -1; + Main.chatMonitor.Offset(linesOffset); + if (Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Escape)) + Main.drawingPlayerChat = false; + string chatText = Main.chatText; + Main.chatText = Main.GetInputText(Main.chatText); + int num1 = (int) ((double) Main.screenWidth * (1.0 / (double) Main.UIScale)) - 330; + if (chatText != Main.chatText) + { + for (float x = ChatManager.GetStringSize(FontAssets.MouseText.Value, Main.chatText, Vector2.One).X; (double) x > (double) num1; x = ChatManager.GetStringSize(FontAssets.MouseText.Value, Main.chatText, Vector2.One).X) + { + int num2 = Math.Max(0, (int) ((double) x - (double) num1) / 100); + Main.chatText = Main.chatText.Substring(0, Main.chatText.Length - 1 - num2); + } + } + if (chatText != Main.chatText) + SoundEngine.PlaySound(12); + if (!Main.inputTextEnter || !Main.chatRelease) + return; + if (Main.chatText != "") + { + ChatMessage outgoingMessage = ChatManager.Commands.CreateOutgoingMessage(Main.chatText); + switch (Main.netMode) + { + case 0: + ChatManager.Commands.ProcessIncomingMessage(outgoingMessage, Main.myPlayer); + break; + case 1: + ChatHelper.SendChatMessageFromClient(outgoingMessage); + break; + } + } + Main.chatText = ""; + Main.ClosePlayerChat(); + Main.chatRelease = false; + SoundEngine.PlaySound(11); + } + } + } + + private void DoUpdate_HandleInput() + { + PlayerInput.UpdateInput(); + this.UpdateViewZoomKeys(); + PlayerInput.SetZoom_Unscaled(); + UILinkPointNavigator.Update(); + PlayerInput.CacheMousePositionForZoom(); + PlayerInput.SetZoom_MouseInWorld(); + Main.oldKeyState = Main.keyState; + Main.keyState = Keyboard.GetState(); + } + + private static void DoUpdate_AltEnter_ToggleFullscreen() + { + if ((Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.LeftAlt) || Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.RightAlt)) && Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Enter) && Main.hasFocus) + { + if (Main.toggleFullscreen) + { + Main.ToggleFullScreen(); + Main.chatRelease = false; + } + Main.toggleFullscreen = false; + } + else + Main.toggleFullscreen = true; + } + + private static void DoUpdate_F11_ToggleUI() + { + if (Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.F11)) + { + if (Main.releaseUI) + { + Main.hideUI = !Main.hideUI; + SoundEngine.PlaySound(12); + } + Main.releaseUI = false; + } + else + Main.releaseUI = true; + } + + private static void DoUpdate_F7_ToggleGraphicsDiagnostics() + { + if (Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.F7) && !Main.drawingPlayerChat && !Main.editSign && !Main.editChest) + { + if (Main.drawRelease) + { + SoundEngine.PlaySound(12); + if (Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.LeftAlt) || Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.RightAlt)) + TimeLogger.Start(); + else + Main.drawDiag = !Main.drawDiag; + } + Main.drawRelease = false; + } + else + Main.drawRelease = true; + } + + private static void DoUpdate_F8_ToggleNetDiagnostics() + { + if (Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.F8) && !Main.drawingPlayerChat && !Main.editSign && !Main.editChest) + { + if (Main.netRelease) + { + SoundEngine.PlaySound(12); + Main.shouldDrawNetDiagnosticsUI = !Main.shouldDrawNetDiagnosticsUI; + } + Main.netRelease = false; + } + else + Main.netRelease = true; + } + + private static void DoUpdate_F9_ToggleLighting() + { + if (Main.keyState.PressingShift() && Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.F9) && !Main.drawingPlayerChat && !Main.editSign && !Main.editChest) + { + if (Main.RGBRelease) + { + SoundEngine.PlaySound(12); + Lighting.NextLightMode(); + } + Main.RGBRelease = false; + } + else + Main.RGBRelease = true; + } + + private static void DoUpdate_F10_ToggleFPS() + { + if (Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.F10) && !Main.drawingPlayerChat && !Main.editSign && !Main.editChest) + { + if (Main.frameRelease) + { + SoundEngine.PlaySound(12); + Main.showFrameRate = !Main.showFrameRate; + } + Main.frameRelease = false; + } + else + Main.frameRelease = true; + } + + private static void AnimateTiles() + { + ++Main.tileFrameCounter[12]; + if (Main.tileFrameCounter[12] > 5) + { + Main.tileFrameCounter[12] = 0; + ++Main.tileFrame[12]; + if (Main.tileFrame[12] >= 10) + Main.tileFrame[12] = 0; + } + ++Main.tileFrameCounter[17]; + if (Main.tileFrameCounter[17] > 5) + { + Main.tileFrameCounter[17] = 0; + ++Main.tileFrame[17]; + if (Main.tileFrame[17] >= 12) + Main.tileFrame[17] = 0; + } + if (++Main.tileFrameCounter[133] >= 4) + { + Main.tileFrameCounter[133] = 0; + if (++Main.tileFrame[133] >= 6) + Main.tileFrame[133] = 0; + } + ++Main.tileFrameCounter[31]; + if (Main.tileFrameCounter[31] > 10) + { + Main.tileFrameCounter[31] = 0; + ++Main.tileFrame[31]; + if (Main.tileFrame[31] > 1) + Main.tileFrame[31] = 0; + } + ++Main.tileFrameCounter[77]; + if (Main.tileFrameCounter[77] > 5) + { + Main.tileFrameCounter[77] = 0; + ++Main.tileFrame[77]; + if (Main.tileFrame[77] >= 12) + Main.tileFrame[77] = 0; + } + ++Main.tileFrameCounter[106]; + if (Main.tileFrameCounter[106] > 4) + { + Main.tileFrameCounter[106] = 0; + ++Main.tileFrame[106]; + if (Main.tileFrame[106] >= 2) + Main.tileFrame[106] = 0; + } + ++Main.tileFrameCounter[207]; + if (Main.tileFrameCounter[207] > 4) + { + Main.tileFrameCounter[207] = 0; + ++Main.tileFrame[207]; + if (Main.tileFrame[207] >= 6) + Main.tileFrame[207] = 0; + } + ++Main.tileFrameCounter[215]; + if (Main.tileFrameCounter[215] >= 4) + { + Main.tileFrameCounter[215] = 0; + ++Main.tileFrame[215]; + if (Main.tileFrame[215] >= 8) + Main.tileFrame[215] = 0; + } + ++Main.tileFrameCounter[592]; + if (Main.tileFrameCounter[592] >= 5) + { + Main.tileFrameCounter[592] = 0; + ++Main.tileFrame[592]; + if (Main.tileFrame[592] >= 8) + Main.tileFrame[592] = 0; + } + ++Main.tileFrameCounter[217]; + if (Main.tileFrameCounter[217] > 4) + { + Main.tileFrameCounter[217] = 0; + ++Main.tileFrame[217]; + if (Main.tileFrame[217] >= 5) + Main.tileFrame[217] = 0; + } + ++Main.tileFrameCounter[218]; + if (Main.tileFrameCounter[218] > 4) + { + Main.tileFrameCounter[218] = 0; + ++Main.tileFrame[218]; + if (Main.tileFrame[218] >= 2) + Main.tileFrame[218] = 0; + } + ++Main.tileFrameCounter[219]; + if (Main.tileFrameCounter[219] > 4) + { + Main.tileFrameCounter[219] = 0; + ++Main.tileFrame[219]; + if (Main.tileFrame[219] >= 10) + Main.tileFrame[219] = 0; + } + ++Main.tileFrameCounter[220]; + if (Main.tileFrameCounter[220] > 4) + { + Main.tileFrameCounter[220] = 0; + ++Main.tileFrame[220]; + if (Main.tileFrame[220] >= 4) + Main.tileFrame[220] = 0; + } + ++Main.tileFrameCounter[231]; + if (Main.tileFrameCounter[231] > 16) + { + Main.tileFrameCounter[231] = 0; + ++Main.tileFrame[231]; + if (Main.tileFrame[231] >= 7) + Main.tileFrame[231] = 0; + } + ++Main.tileFrameCounter[235]; + if (Main.tileFrameCounter[235] > 20) + { + Main.tileFrameCounter[235] = 0; + ++Main.tileFrame[235]; + if (Main.tileFrame[235] >= 4) + Main.tileFrame[235] = 0; + Main.tileLighted[235] = Main.tileFrame[235] > 1; + } + ++Main.tileFrameCounter[238]; + if (Main.tileFrameCounter[238] > 20) + { + Main.tileFrameCounter[238] = 0; + ++Main.tileFrame[238]; + if (Main.tileFrame[238] >= 4) + Main.tileFrame[238] = 0; + } + ++Main.tileFrameCounter[243]; + if (Main.tileFrameCounter[243] > 4) + { + Main.tileFrameCounter[243] = 0; + ++Main.tileFrame[243]; + if (Main.tileFrame[243] >= 6) + Main.tileFrame[243] = 0; + } + ++Main.tileFrameCounter[244]; + if (Main.tileFrameCounter[244] > 4) + { + Main.tileFrameCounter[244] = 0; + ++Main.tileFrame[244]; + if (Main.tileFrame[244] >= 6) + Main.tileFrame[244] = 0; + } + ++Main.tileFrameCounter[247]; + if (Main.tileFrameCounter[247] > 4) + { + Main.tileFrameCounter[247] = 0; + ++Main.tileFrame[247]; + if (Main.tileFrame[247] > 7) + Main.tileFrame[247] = 0; + } + ++Main.tileFrameCounter[96]; + if (Main.tileFrameCounter[96] > 4) + { + Main.tileFrameCounter[96] = 0; + ++Main.tileFrame[96]; + if (Main.tileFrame[96] > 3) + Main.tileFrame[96] = 0; + } + ++Main.tileFrameCounter[171]; + if (Main.tileFrameCounter[171] > 16) + { + Main.tileFrameCounter[171] = 0; + ++Main.tileFrame[171]; + if (Main.tileFrame[171] > 3) + Main.tileFrame[171] = 0; + } + ++Main.tileFrameCounter[270]; + if (Main.tileFrameCounter[270] > 8) + { + Main.tileFrameCounter[270] = 0; + ++Main.tileFrame[270]; + if (Main.tileFrame[270] > 5) + Main.tileFrame[270] = 0; + } + Main.tileFrame[271] = Main.tileFrame[270]; + Main.tileFrame[581] = Main.tileFrame[270]; + ++Main.tileFrameCounter[272]; + if (Main.tileFrameCounter[272] >= 10) + { + Main.tileFrameCounter[272] = 0; + ++Main.tileFrame[272]; + if (Main.tileFrame[272] > 1) + Main.tileFrame[272] = 0; + } + ++Main.tileFrameCounter[300]; + if (Main.tileFrameCounter[300] >= 5) + { + Main.tileFrameCounter[300] = 0; + ++Main.tileFrame[300]; + if (Main.tileFrame[300] > 6) + Main.tileFrame[300] = 0; + } + ++Main.tileFrameCounter[301]; + if (Main.tileFrameCounter[301] >= 5) + { + Main.tileFrameCounter[301] = 0; + ++Main.tileFrame[301]; + if (Main.tileFrame[301] > 7) + Main.tileFrame[301] = 0; + } + ++Main.tileFrameCounter[302]; + if (Main.tileFrameCounter[302] >= 5) + { + Main.tileFrameCounter[302] = 0; + ++Main.tileFrame[302]; + if (Main.tileFrame[302] > 3) + Main.tileFrame[302] = 0; + } + ++Main.tileFrameCounter[303]; + if (Main.tileFrameCounter[303] >= 5) + { + Main.tileFrameCounter[303] = 0; + ++Main.tileFrame[303]; + if (Main.tileFrame[303] > 4) + Main.tileFrame[303] = 0; + } + ++Main.tileFrameCounter[305]; + if (Main.tileFrameCounter[305] >= 5) + { + Main.tileFrameCounter[305] = 0; + ++Main.tileFrame[305]; + if (Main.tileFrame[305] > 11) + Main.tileFrame[305] = 0; + } + ++Main.tileFrameCounter[306]; + if (Main.tileFrameCounter[306] >= 5) + { + Main.tileFrameCounter[306] = 0; + ++Main.tileFrame[306]; + if (Main.tileFrame[306] > 11) + Main.tileFrame[306] = 0; + } + ++Main.tileFrameCounter[307]; + if (Main.tileFrameCounter[307] >= 5) + { + Main.tileFrameCounter[307] = 0; + ++Main.tileFrame[307]; + if (Main.tileFrame[307] > 1) + Main.tileFrame[307] = 0; + } + ++Main.tileFrameCounter[308]; + if (Main.tileFrameCounter[308] >= 5) + { + Main.tileFrameCounter[308] = 0; + ++Main.tileFrame[308]; + if (Main.tileFrame[308] > 7) + Main.tileFrame[308] = 0; + } + ++Main.tileFrameCounter[314]; + if (Main.tileFrameCounter[314] >= 10) + { + Main.tileFrameCounter[314] = 0; + ++Main.tileFrame[314]; + if (Main.tileFrame[314] > 4) + Main.tileFrame[314] = 0; + } + ++Main.tileFrameCounter[326]; + if (Main.tileFrameCounter[326] >= 5) + { + Main.tileFrameCounter[326] = 0; + ++Main.tileFrame[326]; + if (Main.tileFrame[326] > 7) + Main.tileFrame[326] = 0; + } + ++Main.tileFrameCounter[327]; + if (Main.tileFrameCounter[327] >= 10) + { + Main.tileFrameCounter[327] = 0; + ++Main.tileFrame[327]; + if (Main.tileFrame[327] > 7) + Main.tileFrame[327] = 0; + } + ++Main.tileFrameCounter[345]; + if (Main.tileFrameCounter[345] >= 10) + { + Main.tileFrameCounter[345] = 0; + ++Main.tileFrame[345]; + if (Main.tileFrame[345] > 7) + Main.tileFrame[345] = 0; + } + ++Main.tileFrameCounter[458]; + if (Main.tileFrameCounter[458] >= 10) + { + Main.tileFrameCounter[458] = 0; + ++Main.tileFrame[458]; + if (Main.tileFrame[458] > 7) + Main.tileFrame[458] = 0; + } + ++Main.tileFrameCounter[459]; + if (Main.tileFrameCounter[459] >= 10) + { + Main.tileFrameCounter[459] = 0; + ++Main.tileFrame[459]; + if (Main.tileFrame[459] > 7) + Main.tileFrame[459] = 0; + } + ++Main.tileFrameCounter[336]; + if (Main.tileFrameCounter[336] >= 5) + { + Main.tileFrameCounter[336] = 0; + ++Main.tileFrame[336]; + if (Main.tileFrame[336] > 3) + Main.tileFrame[336] = 0; + } + ++Main.tileFrameCounter[328]; + if (Main.tileFrameCounter[328] >= 5) + { + Main.tileFrameCounter[328] = 0; + ++Main.tileFrame[328]; + if (Main.tileFrame[328] > 7) + Main.tileFrame[328] = 0; + } + ++Main.tileFrameCounter[329]; + if (Main.tileFrameCounter[329] >= 5) + { + Main.tileFrameCounter[329] = 0; + ++Main.tileFrame[329]; + if (Main.tileFrame[329] > 7) + Main.tileFrame[329] = 0; + } + int num1 = 20; + if (++Main.tileFrameCounter[507] >= num1 * 8) + Main.tileFrameCounter[507] = 0; + if (++Main.tileFrameCounter[508] >= num1 * 8) + Main.tileFrameCounter[508] = 0; + for (int index = 340; index <= 344; ++index) + { + ++Main.tileFrameCounter[index]; + if (Main.tileFrameCounter[index] >= 5) + { + Main.tileFrameCounter[index] = 0; + ++Main.tileFrame[index]; + if (Main.tileFrame[index] > 3) + Main.tileFrame[index] = 0; + } + } + ++Main.tileFrameCounter[351]; + if (Main.tileFrameCounter[351] >= 5) + { + Main.tileFrameCounter[351] = 0; + ++Main.tileFrame[351]; + if (Main.tileFrame[351] > 2) + Main.tileFrame[351] = 0; + } + ++Main.tileFrameCounter[354]; + if (Main.tileFrameCounter[354] >= 5) + { + Main.tileFrameCounter[354] = 0; + ++Main.tileFrame[354]; + if (Main.tileFrame[354] >= 8) + Main.tileFrame[354] = 0; + } + Main.tileFrame[355] = Main.tileFrame[354]; + ++Main.tileFrameCounter[377]; + if (Main.tileFrameCounter[377] >= 5) + { + Main.tileFrameCounter[377] = 0; + ++Main.tileFrame[377]; + if (Main.tileFrame[377] >= 4) + Main.tileFrame[377] = 0; + } + ++Main.tileFrameCounter[379]; + if (Main.tileFrameCounter[379] >= 10) + { + Main.tileFrameCounter[379] = 0; + ++Main.tileFrame[379]; + if (Main.tileFrame[379] >= 4) + Main.tileFrame[379] = 0; + } + if (++Main.tileFrameCounter[390] >= 8) + { + Main.tileFrameCounter[390] = 0; + if (++Main.tileFrame[390] >= 7) + Main.tileFrame[390] = 0; + } + if (++Main.tileFrameCounter[228] >= 5) + { + Main.tileFrameCounter[228] = 0; + if (++Main.tileFrame[228] >= 3) + Main.tileFrame[228] = 0; + } + if (++Main.tileFrameCounter[405] >= 5) + { + Main.tileFrameCounter[405] = 0; + if (++Main.tileFrame[405] >= 8) + Main.tileFrame[405] = 0; + } + if (++Main.tileFrameCounter[406] >= 8) + { + Main.tileFrameCounter[406] = 0; + if (++Main.tileFrame[406] >= 6) + Main.tileFrame[406] = 0; + } + if (++Main.tileFrameCounter[452] >= 5) + { + Main.tileFrameCounter[452] = 0; + if (++Main.tileFrame[452] >= 15) + Main.tileFrame[452] = 0; + } + if (++Main.tileFrameCounter[455] >= 5) + { + Main.tileFrameCounter[455] = 0; + if (++Main.tileFrame[455] >= 6) + Main.tileFrame[455] = 0; + } + if (++Main.tileFrameCounter[499] >= 5) + { + Main.tileFrameCounter[499] = 0; + if (++Main.tileFrame[499] >= 8) + Main.tileFrame[499] = 0; + } + if (++Main.tileFrameCounter[129] >= 8) + { + Main.tileFrameCounter[129] = 0; + if (++Main.tileFrame[129] >= 6) + Main.tileFrame[129] = 0; + } + Main.tileFrameCounter[453] += WorldGen.gen ? 0 : Main.rand.Next(3); + if (++Main.tileFrameCounter[453] >= 60) + Main.tileFrameCounter[453] = 0; + if (++Main.tileFrame[412] >= 240) + Main.tileFrame[412] = 0; + Main.tileFrameCounter[456] += WorldGen.gen ? 0 : Main.rand.Next(3); + if (++Main.tileFrameCounter[456] >= 80) + Main.tileFrameCounter[456] = 0; + if (++Main.tileFrame[456] >= 240) + Main.tileFrame[456] = 0; + if (++Main.tileFrameCounter[410] >= 8) + { + Main.tileFrameCounter[410] = 0; + if (++Main.tileFrame[410] >= 8) + Main.tileFrame[410] = 0; + } + if (++Main.tileFrameCounter[480] >= 8) + { + Main.tileFrameCounter[480] = 0; + if (++Main.tileFrame[480] >= 8) + Main.tileFrame[480] = 0; + } + if (++Main.tileFrameCounter[509] >= 8) + { + Main.tileFrameCounter[509] = 0; + if (++Main.tileFrame[509] >= 8) + Main.tileFrame[509] = 0; + } + if (++Main.tileFrameCounter[421] >= 4) + { + Main.tileFrameCounter[421] = 0; + if (++Main.tileFrame[421] >= 4) + Main.tileFrame[421] = 0; + } + if (++Main.tileFrameCounter[422] >= 4) + { + Main.tileFrameCounter[422] = 0; + if (--Main.tileFrame[422] < 0) + Main.tileFrame[422] = 3; + } + if (++Main.tileFrameCounter[463] >= 10) + { + Main.tileFrameCounter[463] = 0; + if (++Main.tileFrame[463] >= 6) + Main.tileFrame[463] = 0; + } + if (++Main.tileFrameCounter[464] >= 5) + { + Main.tileFrameCounter[464] = 0; + if (++Main.tileFrame[464] >= 23) + Main.tileFrame[464] = 0; + } + if (++Main.tileFrameCounter[485] >= 20) + Main.tileFrameCounter[485] = 0; + if (++Main.tileFrameCounter[491] >= 40) + Main.tileFrameCounter[491] = 0; + if (++Main.tileFrameCounter[564] >= 5) + { + Main.tileFrameCounter[564] = 0; + ++Main.tileFrame[564]; + if (Main.tileFrame[564] >= 36) + Main.tileFrame[564] = 0; + } + if (++Main.tileFrameCounter[593] >= 5) + { + Main.tileFrameCounter[593] = 0; + ++Main.tileFrame[593]; + if (Main.tileFrame[593] >= 9) + Main.tileFrame[593] = 5; + } + if (++Main.tileFrameCounter[594] >= 5) + { + Main.tileFrameCounter[594] = 0; + ++Main.tileFrame[594]; + if (Main.tileFrame[594] >= 9) + Main.tileFrame[594] = 5; + } + if (++Main.tileFrameCounter[614] >= 5) + { + Main.tileFrameCounter[614] = 0; + ++Main.tileFrame[614]; + if (Main.tileFrame[614] >= 6) + Main.tileFrame[614] = 0; + } + if (++Main.tileFrameCounter[565] >= 4) + { + Main.tileFrameCounter[565] = 0; + ++Main.tileFrame[565]; + if (Main.tileFrame[565] >= 5) + Main.tileFrame[565] = 0; + } + if (++Main.tileFrameCounter[572] >= 8) + { + Main.tileFrameCounter[572] = 0; + if (++Main.tileFrame[572] >= 6) + Main.tileFrame[572] = 0; + } + if (++Main.tileFrameCounter[597] >= 64) + Main.tileFrameCounter[597] = 0; + int num2 = (int) MathHelper.Clamp((float) Math.Floor((double) Math.Abs(Main.WindForVisuals) * 10.0) * (float) Math.Sign(Main.WindForVisuals), -5f, 5f); + Main.tileFrameCounter[489] += num2; + Main.tileFrameCounter[489] %= 320; + if (Main.tileFrameCounter[489] < 0) + Main.tileFrameCounter[489] += 320; + Main.AnimateTiles_WeatherVane(); + int num3 = (int) MathHelper.Clamp((float) Math.Floor((double) Math.Abs(Main.WindForVisuals) * 10.0) * (float) Math.Sign(Main.WindForVisuals), -5f, 5f); + Main.tileFrameCounter[493] += num3; + Main.tileFrameCounter[493] %= 120; + if (Main.tileFrameCounter[493] < 0) + Main.tileFrameCounter[493] += 120; + Main.AnimateTiles_CritterCages(); + } + + private static void AnimateTiles_WeatherVane() + { + int num1 = Math.Sign(Main.WindForVisuals); + int num2 = (int) MathHelper.Clamp((float) Math.Floor((double) Math.Abs(Main.WindForVisuals) * 10.0), -5f, 5f); + int num3 = 6; + Main.tileFrameCounter[490] += num2; + if (Main.tileFrameCounter[490] < num3) + return; + Main.tileFrameCounter[490] -= num3 * Main.tileFrameCounter[490]; + if ((Main.tileFrame[490] != 0 || num1 != -1 ? (Main.tileFrame[490] != 6 ? 0 : (num1 == 1 ? 1 : 0)) : 1) == 0) + { + if (++Main.tileFrame[490] < 12) + return; + Main.tileFrame[490] = 0; + Main.weatherVaneBobframe = 0; + } + else + { + if ((double) Main.rand.NextFloat() >= (double) Math.Abs(Main.WindForVisuals) * 0.5 || ++Main.weatherVaneBobframe != 8) + return; + Main.weatherVaneBobframe = 0; + } + } + + private static void DoUpdate_AnimateWalls() + { + ++Main.wallFrameCounter[136]; + if (Main.wallFrameCounter[136] >= (byte) 5) + { + Main.wallFrameCounter[136] = (byte) 0; + ++Main.wallFrame[136]; + if (Main.wallFrame[136] > (byte) 7) + Main.wallFrame[136] = (byte) 0; + } + ++Main.wallFrameCounter[137]; + if (Main.wallFrameCounter[137] >= (byte) 10) + { + Main.wallFrameCounter[137] = (byte) 0; + ++Main.wallFrame[137]; + if (Main.wallFrame[137] > (byte) 7) + Main.wallFrame[137] = (byte) 0; + } + int index1 = 226; + ++Main.wallFrameCounter[index1]; + if (Main.wallFrameCounter[index1] >= (byte) 10) + { + Main.wallFrameCounter[index1] = (byte) 0; + ++Main.wallFrame[index1]; + if (Main.wallFrame[index1] > (byte) 7) + Main.wallFrame[index1] = (byte) 0; + } + int index2 = 227; + ++Main.wallFrameCounter[index2]; + if (Main.wallFrameCounter[index2] >= (byte) 5) + { + Main.wallFrameCounter[index2] = (byte) 0; + ++Main.wallFrame[index2]; + if (Main.wallFrame[index2] > (byte) 7) + Main.wallFrame[index2] = (byte) 0; + } + int index3 = 225; + ++Main.wallFrameCounter[index3]; + if (Main.wallFrameCounter[index3] >= (byte) 5) + { + Main.wallFrameCounter[index3] = (byte) 0; + ++Main.wallFrame[index3]; + if (Main.wallFrame[index3] > (byte) 1) + Main.wallFrame[index3] = (byte) 0; + } + ++Main.wallFrameCounter[172]; + if (Main.wallFrameCounter[172] >= (byte) 10) + { + Main.wallFrameCounter[172] = (byte) 0; + ++Main.wallFrame[172]; + if (Main.wallFrame[172] > (byte) 7) + Main.wallFrame[172] = (byte) 0; + } + ++Main.wallFrameCounter[168]; + if (Main.wallFrameCounter[168] >= (byte) 5) + { + Main.wallFrameCounter[168] = (byte) 0; + ++Main.wallFrame[168]; + if (Main.wallFrame[168] > (byte) 7) + Main.wallFrame[168] = (byte) 0; + } + ++Main.wallFrameCounter[169]; + if (Main.wallFrameCounter[169] >= (byte) 5) + { + Main.wallFrameCounter[169] = (byte) 0; + ++Main.wallFrame[169]; + if (Main.wallFrame[169] > (byte) 7) + Main.wallFrame[169] = (byte) 0; + } + int num1 = 20; + if ((int) ++Main.wallFrameCounter[242] >= num1 * 8) + Main.wallFrameCounter[242] = (byte) 0; + if ((int) ++Main.wallFrameCounter[243] >= num1 * 8) + Main.wallFrameCounter[243] = (byte) 0; + ++Main.wallFrameCounter[144]; + int num2 = 5; + int num3 = 10; + if ((int) Main.wallFrameCounter[144] < num2) + Main.wallFrame[144] = (byte) 0; + else if ((int) Main.wallFrameCounter[144] < num2) + Main.wallFrame[144] = (byte) 1; + else if ((int) Main.wallFrameCounter[144] < num2 * 2) + Main.wallFrame[144] = (byte) 2; + else if ((int) Main.wallFrameCounter[144] < num2 * 3) + Main.wallFrame[144] = (byte) 3; + else if ((int) Main.wallFrameCounter[144] < num2 * 4) + Main.wallFrame[144] = (byte) 4; + else if ((int) Main.wallFrameCounter[144] < num2 * 5) + Main.wallFrame[144] = (byte) 5; + else if ((int) Main.wallFrameCounter[144] < num2 * 6) + Main.wallFrame[144] = (byte) 6; + else if ((int) Main.wallFrameCounter[144] < num2 * 7) + Main.wallFrame[144] = (byte) 7; + else if ((int) Main.wallFrameCounter[144] < num2 * (8 + num3)) + Main.wallFrame[144] = (byte) 8; + else if ((int) Main.wallFrameCounter[144] < num2 * (9 + num3)) + Main.wallFrame[144] = (byte) 7; + else if ((int) Main.wallFrameCounter[144] < num2 * (10 + num3)) + Main.wallFrame[144] = (byte) 6; + else if ((int) Main.wallFrameCounter[144] < num2 * (11 + num3)) + Main.wallFrame[144] = (byte) 5; + else if ((int) Main.wallFrameCounter[144] < num2 * (12 + num3)) + Main.wallFrame[144] = (byte) 4; + else if ((int) Main.wallFrameCounter[144] < num2 * (13 + num3)) + Main.wallFrame[144] = (byte) 3; + else if ((int) Main.wallFrameCounter[144] < num2 * (14 + num3)) + Main.wallFrame[144] = (byte) 2; + else if ((int) Main.wallFrameCounter[144] < num2 * (15 + num3)) + { + Main.wallFrame[144] = (byte) 1; + } + else + { + Main.wallFrame[144] = (byte) 0; + if ((int) Main.wallFrameCounter[144] <= num2 * (16 + num3 * 2)) + return; + Main.wallFrameCounter[144] = (byte) 0; + } + } + + private void DoUpdate_AnimateWaterfalls() + { + Main.wFrCounter += Main.windSpeedCurrent * 2f; + if ((double) Main.wFrCounter > 4.0) + { + Main.wFrCounter = 0.0f; + ++Main.wFrame; + } + if ((double) Main.wFrCounter < 0.0) + { + Main.wFrCounter = 4f; + --Main.wFrame; + } + if ((double) Main.wFrame > 16.0) + Main.wFrame = 1f; + if ((double) Main.wFrame < 1.0) + Main.wFrame = 16f; + this.waterfallManager.UpdateFrame(); + } + + private static void DoUpdate_AnimateVisualPlayerAura() + { + if (Main.gFadeDir == (byte) 1) + { + Main.gFader += 0.1f; + Main.gFade = (byte) Main.gFader; + if (Main.gFade <= (byte) 150) + return; + Main.gFadeDir = (byte) 0; + } + else + { + Main.gFader -= 0.1f; + Main.gFade = (byte) Main.gFader; + if (Main.gFade >= (byte) 100) + return; + Main.gFadeDir = (byte) 1; + } + } + + private void DoUpdate_AnimateDiscoRGB() + { + int num = 7; + if (this.DiscoStyle == 0) + { + Main.DiscoG += num; + if (Main.DiscoG >= (int) byte.MaxValue) + { + Main.DiscoG = (int) byte.MaxValue; + ++this.DiscoStyle; + } + } + if (this.DiscoStyle == 1) + { + Main.DiscoR -= num; + if (Main.DiscoR <= 0) + { + Main.DiscoR = 0; + ++this.DiscoStyle; + } + } + if (this.DiscoStyle == 2) + { + Main.DiscoB += num; + if (Main.DiscoB >= (int) byte.MaxValue) + { + Main.DiscoB = (int) byte.MaxValue; + ++this.DiscoStyle; + } + } + if (this.DiscoStyle == 3) + { + Main.DiscoG -= num; + if (Main.DiscoG <= 0) + { + Main.DiscoG = 0; + ++this.DiscoStyle; + } + } + if (this.DiscoStyle == 4) + { + Main.DiscoR += num; + if (Main.DiscoR >= (int) byte.MaxValue) + { + Main.DiscoR = (int) byte.MaxValue; + ++this.DiscoStyle; + } + } + if (this.DiscoStyle != 5) + return; + Main.DiscoB -= num; + if (Main.DiscoB > 0) + return; + Main.DiscoB = 0; + this.DiscoStyle = 0; + } + + private static void DoUpdate_AnimateBackgrounds() + { + Main.DoUpdate_AnimateBackgrounds_UpdateForest(0, Main.treeMntBGSet1); + Main.DoUpdate_AnimateBackgrounds_UpdateForest(10, Main.treeMntBGSet2); + Main.DoUpdate_AnimateBackgrounds_UpdateForest(11, Main.treeMntBGSet3); + Main.DoUpdate_AnimateBackgrounds_UpdateForest(12, Main.treeMntBGSet4); + } + + private static void DoUpdate_AnimateBackgrounds_UpdateForest(int bgIndex, int[] bgSet) + { + if (bgSet[1] == 94 || bgSet[1] >= 114 && bgSet[1] <= 116) + { + ++Main.bgFrameCounter[bgIndex]; + if (Main.bgFrameCounter[bgIndex] >= 6) + { + Main.bgFrameCounter[bgIndex] = 0; + ++Main.bgFrame[bgIndex]; + if (Main.bgFrame[bgIndex] >= 4) + Main.bgFrame[bgIndex] = 0; + } + bgSet[1] = Main.bgFrame[bgIndex] != 0 ? (Main.bgFrame[bgIndex] != 1 ? (Main.bgFrame[bgIndex] != 2 ? 116 : 115) : 114) : 94; + bgSet[0] = Main.bgFrame[bgIndex] != 0 ? (Main.bgFrame[bgIndex] != 1 ? (Main.bgFrame[bgIndex] != 2 ? 170 : 169) : 168) : 93; + } + if (bgSet[1] < 180 || bgSet[1] > 183) + return; + ++Main.bgFrameCounter[bgIndex]; + if (Main.bgFrameCounter[bgIndex] >= 6) + { + Main.bgFrameCounter[bgIndex] = 0; + ++Main.bgFrame[bgIndex]; + if (Main.bgFrame[bgIndex] >= 4) + Main.bgFrame[bgIndex] = 0; + } + if (Main.bgFrame[bgIndex] == 0) + bgSet[1] = 180; + else if (Main.bgFrame[bgIndex] == 1) + bgSet[1] = 181; + else if (Main.bgFrame[bgIndex] == 2) + bgSet[1] = 182; + else + bgSet[1] = 183; + } + + private static void DoUpdate_AutoSave() + { + if (!Main.gameMenu && Main.netMode == 1) + { + if (!Main.saveTime.IsRunning) + Main.saveTime.Start(); + if (Main.saveTime.ElapsedMilliseconds <= 300000L) + return; + Main.saveTime.Reset(); + WorldGen.saveToonWhilePlaying(); + } + else if (!Main.gameMenu && (Main.autoSave || Main.netMode == 2)) + { + if (!Main.saveTime.IsRunning) + Main.saveTime.Start(); + if (Main.saveTime.ElapsedMilliseconds <= 600000L) + return; + Main.saveTime.Reset(); + if (Main.netMode != 2) + WorldGen.saveToonWhilePlaying(); + WorldGen.saveAndPlay(); + } + else + { + if (!Main.saveTime.IsRunning) + return; + Main.saveTime.Stop(); + } + } + + private static void UpdateSettingUnlocks() + { + if (Main.netMode == 2 || Main.dedServ || !Main.hardMode || Main.SettingsUnlock_WorldEvil) + return; + Main.SettingsUnlock_WorldEvil = true; + Main.SaveSettings(); + } + + public static void InputTextSign() + { + if (IngameFancyUI.CanShowVirtualKeyboard(1) && UIVirtualKeyboard.KeyboardContext == 1) + return; + PlayerInput.WritingText = true; + Main.instance.HandleIME(); + Main.npcChatText = Main.GetInputText(Main.npcChatText, true); + if (Main.inputTextEnter) + { + byte[] bytes = new byte[1]{ (byte) 10 }; + Main.npcChatText += Encoding.ASCII.GetString(bytes); + } + else + { + if (!Main.inputTextEscape) + return; + Main.InputTextSignCancel(); + } + } + + public static void InputTextChest() + { + if (IngameFancyUI.CanShowVirtualKeyboard(2) && UIVirtualKeyboard.KeyboardContext == 2) + return; + Main.npcChatText = Main.GetInputText(Main.npcChatText); + if (Main.inputTextEnter) + { + ChestUI.RenameChestSubmit(Main.player[Main.myPlayer]); + } + else + { + if (!Main.inputTextEscape) + return; + ChestUI.RenameChestCancel(); + } + } + + public static void InputTextSignCancel() + { + SoundEngine.PlaySound(12); + Main.editSign = false; + Main.blockKey = Microsoft.Xna.Framework.Input.Keys.Escape.ToString(); + UIVirtualKeyboard.CacheCancelledInput(1); + Main.npcChatText = Main.sign[Main.player[Main.myPlayer].sign].text; + } + + private static void UpdateMenu() + { + if (WorldGen.drunkWorldGen) + { + Main.screenPosition.X -= 20f; + if (WorldGen.drunkWorldGenText) + { + Main.numClouds = Main.rand.Next(100, 200); + Main.statusText = string.Concat((object) Main.rand.Next(999999999)); + for (int index = 0; index < 3; ++index) + { + if (Main.rand.Next(2) == 0) + Main.statusText += (string) (object) Main.rand.Next(999999999); + } + } + } + Main.gamePaused = false; + Main.thunderDelay = 0; + Main.lightning = 0.0f; + Main.lightningSpeed = 0.0f; + Main.GraveyardVisualIntensity = 0.0f; + InGameNotificationsTracker.Clear(); + Main.playerInventory = false; + Main.exitScale = 0.8f; + switch (Main.netMode) + { + case 0: + if ((!Main.instance.IsActive ? 0 : (Main.hasFocus ? 1 : 0)) != 0 && !Main.dayTime && (Main.rand.Next(12) == 0 || WorldGen.drunkWorldGen)) + { + int index = Main.rand.Next(Main.numStars); + if (Main.star[index] != null && !Main.star[index].hidden && !Main.star[index].falling) + Main.star[index].Fall(); + } + if (Main.gameMenu) + { + if (WorldGen.gen) + Main.lockMenuBGChange = true; + else if (Main.menuMode == 0) + Main.lockMenuBGChange = false; + if (!Main.lockMenuBGChange) + { + if (Main.dayTime) + Main.menuBGChangedDay = false; + else if (!Main.menuBGChangedDay && Main.time >= 16200.0) + { + Main.menuBGChangedDay = true; + int corruptBg = WorldGen.corruptBG; + WorldGen.RandomizeBackgrounds(Main.rand); + if (Main.treeBGSet1[0] == 173) + WorldGen.RandomizeBackgrounds(Main.rand); + if (Main.treeBGSet1[0] == 173) + WorldGen.RandomizeBackgrounds(Main.rand); + WorldGen.setBG(1, corruptBg); + } + if (!Main.dayTime) + Main.menuBGChangedNight = false; + else if (!Main.menuBGChangedNight && Main.time >= 27000.0) + { + Main.moonType = Main.rand.Next(9); + Main.menuBGChangedNight = true; + int treeBg1 = WorldGen.treeBG1; + WorldGen.RandomizeBackgrounds(Main.rand); + WorldGen.setBG(0, treeBg1); + } + } + else + { + Main.menuBGChangedDay = true; + Main.menuBGChangedNight = true; + } + } + if (Main.alreadyGrabbingSunOrMoon) + break; + if (WorldGen.drunkWorldGen) + { + Main.time -= 6.0; + if (Main.dayTime) + Main.time -= 1000.0; + if (Main.time < 0.0) + { + Main.time = 32400.0; + Main.dayTime = false; + } + } + else if (Main.dayTime) + Main.time += 576.0 / 17.0; + else + Main.time += 216.0 / 7.0; + if (!Main.dayTime) + { + if (Main.time <= 32400.0) + break; + Main.bloodMoon = false; + Main.time = 0.0; + Main.dayTime = true; + ++Main.moonPhase; + if (Main.moonPhase < 7) + break; + Main.moonPhase = 0; + break; + } + if (Main.time <= 54000.0) + break; + Main.time = 0.0; + Main.dayTime = false; + break; + case 1: + Main.UpdateTime(); + break; + } + } + + public static void clrInput() => Main.keyCount = 0; + + [DllImport("user32.dll", CharSet = CharSet.Auto)] + public static extern short GetKeyState(int keyCode); + + public static string GetInputText(string oldString, bool allowMultiLine = false) + { + if (!Main.hasFocus) + return oldString; + Main.inputTextEnter = false; + Main.inputTextEscape = false; + string str1 = oldString; + string newKeys = ""; + if (str1 == null) + str1 = ""; + bool flag1 = false; + if (Main.inputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.LeftControl) || Main.inputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.RightControl)) + { + if (Main.inputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Z) && !Main.oldInputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Z)) + str1 = ""; + else if (Main.inputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.X) && !Main.oldInputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.X)) + { + Platform.Get().Value = oldString; + str1 = ""; + } + else if (Main.inputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.C) && !Main.oldInputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.C) || Main.inputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Insert) && !Main.oldInputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Insert)) + Platform.Get().Value = oldString; + else if (Main.inputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.V) && !Main.oldInputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.V)) + newKeys = Main.PasteTextIn(allowMultiLine, newKeys); + } + else + { + if (Main.inputText.PressingShift()) + { + if (Main.inputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Delete) && !Main.oldInputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Delete)) + { + Platform.Get().Value = oldString; + str1 = ""; + } + if (Main.inputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Insert) && !Main.oldInputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Insert)) + newKeys = Main.PasteTextIn(allowMultiLine, newKeys); + } + for (int index = 0; index < Main.keyCount; ++index) + { + int num = Main.keyInt[index]; + string str2 = Main.keyString[index]; + switch (num) + { + case 13: + Main.inputTextEnter = true; + break; + case 27: + Main.inputTextEscape = true; + break; + default: + if (num >= 32 && num != (int) sbyte.MaxValue) + { + newKeys += str2; + break; + } + break; + } + } + } + Main.keyCount = 0; + string text = str1 + newKeys; + Main.oldInputText = Main.inputText; + Main.inputText = Keyboard.GetState(); + Microsoft.Xna.Framework.Input.Keys[] pressedKeys1 = Main.inputText.GetPressedKeys(); + Microsoft.Xna.Framework.Input.Keys[] pressedKeys2 = Main.oldInputText.GetPressedKeys(); + if (Main.inputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Back) && Main.oldInputText.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Back)) + { + Main.backSpaceRate -= 0.05f; + if ((double) Main.backSpaceRate < 0.0) + Main.backSpaceRate = 0.0f; + if (Main.backSpaceCount <= 0) + { + Main.backSpaceCount = (int) Math.Round((double) Main.backSpaceRate); + flag1 = true; + } + --Main.backSpaceCount; + } + else + { + Main.backSpaceRate = 7f; + Main.backSpaceCount = 15; + } + for (int index1 = 0; index1 < pressedKeys1.Length; ++index1) + { + bool flag2 = true; + for (int index2 = 0; index2 < pressedKeys2.Length; ++index2) + { + if (pressedKeys1[index1] == pressedKeys2[index2]) + flag2 = false; + } + if (string.Concat((object) pressedKeys1[index1]) == "Back" && flag2 | flag1 && text.Length > 0) + { + TextSnippet[] array = ChatManager.ParseMessage(text, Microsoft.Xna.Framework.Color.White).ToArray(); + text = !array[array.Length - 1].DeleteWhole ? text.Substring(0, text.Length - 1) : text.Substring(0, text.Length - array[array.Length - 1].TextOriginal.Length); + } + } + return text; + } + + private static string PasteTextIn(bool allowMultiLine, string newKeys) + { + newKeys = !allowMultiLine ? newKeys + Platform.Get().Value : newKeys + Platform.Get().MultiLineValue; + return newKeys; + } + + public void MouseTextHackZoom(string text, string buffTooltip = null) => this.MouseTextHackZoom(text, 0, buffTooltip: buffTooltip); + + public void MouseTextHackZoom(string text, int itemRarity, byte diff = 0, string buffTooltip = null) => this.MouseText(text, buffTooltip, itemRarity, diff); + + public void MouseTextNoOverride( + string cursorText, + int rare = 0, + byte diff = 0, + int hackedMouseX = -1, + int hackedMouseY = -1, + int hackedScreenWidth = -1, + int hackedScreenHeight = -1, + int pushWidthX = 0) + { + this.MouseText(cursorText, (string) null, rare, diff, hackedMouseX, hackedMouseY, hackedScreenWidth, hackedScreenHeight, pushWidthX, true); + } + + public void MouseText( + string cursorText, + int rare = 0, + byte diff = 0, + int hackedMouseX = -1, + int hackedMouseY = -1, + int hackedScreenWidth = -1, + int hackedScreenHeight = -1, + int pushWidthX = 0) + { + this.MouseText(cursorText, (string) null, rare, diff, hackedMouseX, hackedMouseY, hackedScreenWidth, hackedScreenHeight, pushWidthX); + } + + public void MouseText( + string cursorText, + string buffTooltip, + int rare = 0, + byte diff = 0, + int hackedMouseX = -1, + int hackedMouseY = -1, + int hackedScreenWidth = -1, + int hackedScreenHeight = -1, + int pushWidthX = 0, + bool noOverride = false) + { + if (this._mouseTextCache.noOverride) + return; + this._mouseTextCache = new Main.MouseTextCache() + { + noOverride = noOverride, + isValid = true, + cursorText = cursorText, + rare = rare, + diff = diff, + X = hackedMouseX, + Y = hackedMouseY, + hackedScreenWidth = hackedScreenWidth, + hackedScreenHeight = hackedScreenHeight, + buffTooltip = buffTooltip + }; + } + + private void MouseTextInner(Main.MouseTextCache info) + { + string cursorText = info.cursorText; + int rare = info.rare; + byte diff = info.diff; + int x = info.X; + int y = info.Y; + int hackedScreenWidth = info.hackedScreenWidth; + int hackedScreenHeight = info.hackedScreenHeight; + if (this.mouseNPCType > -1 || cursorText == null) + return; + int X = Main.mouseX + 14; + int Y = Main.mouseY + 14; + if (x != -1 && y != -1) + { + X = x + 10; + Y = y + 10; + } + if (Main.ThickMouse) + { + X += 6; + Y += 6; + } + if (!Main.mouseItem.IsAir) + X += 34; + Microsoft.Xna.Framework.Color color = new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor); + if (Main.HoverItem.type > 0) + { + this.MouseText_DrawItemTooltip(info, rare, diff, X, Y); + } + else + { + if (info.buffTooltip != null && info.buffTooltip != "") + this.MouseText_DrawBuffTooltip(info.buffTooltip, ref X, ref Y); + Vector2 vector2 = FontAssets.MouseText.Value.MeasureString(cursorText); + if (hackedScreenHeight != -1 && hackedScreenWidth != -1) + { + if ((double) X + (double) vector2.X + 4.0 > (double) hackedScreenWidth) + X = (int) ((double) hackedScreenWidth - (double) vector2.X - 4.0); + if ((double) Y + (double) vector2.Y + 4.0 > (double) hackedScreenHeight) + Y = (int) ((double) hackedScreenHeight - (double) vector2.Y - 4.0); + } + else + { + if ((double) X + (double) vector2.X + 4.0 > (double) Main.screenWidth) + X = (int) ((double) Main.screenWidth - (double) vector2.X - 4.0); + if ((double) Y + (double) vector2.Y + 4.0 > (double) Main.screenHeight) + Y = (int) ((double) Main.screenHeight - (double) vector2.Y - 4.0); + } + float num = (float) Main.mouseTextColor / (float) byte.MaxValue; + Microsoft.Xna.Framework.Color baseColor = new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor); + if (rare == -13) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num), (int) (byte) ((double) Main.masterColor * 200.0 * (double) num), 0, (int) Main.mouseTextColor); + if (rare == -11) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num), (int) (byte) (175.0 * (double) num), (int) (byte) (0.0 * (double) num), (int) Main.mouseTextColor); + if (rare == -10) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (65.0 * (double) num), (int) (byte) ((double) byte.MaxValue * (double) num), (int) (byte) (110.0 * (double) num), (int) Main.mouseTextColor); + if (rare == -1) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (130.0 * (double) num), (int) (byte) (130.0 * (double) num), (int) (byte) (130.0 * (double) num), (int) Main.mouseTextColor); + if (rare == 1) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (150.0 * (double) num), (int) (byte) (150.0 * (double) num), (int) (byte) ((double) byte.MaxValue * (double) num), (int) Main.mouseTextColor); + if (rare == 2) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (150.0 * (double) num), (int) (byte) ((double) byte.MaxValue * (double) num), (int) (byte) (150.0 * (double) num), (int) Main.mouseTextColor); + if (rare == 3) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num), (int) (byte) (200.0 * (double) num), (int) (byte) (150.0 * (double) num), (int) Main.mouseTextColor); + if (rare == 4) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num), (int) (byte) (150.0 * (double) num), (int) (byte) (150.0 * (double) num), (int) Main.mouseTextColor); + if (rare == 5) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num), (int) (byte) (150.0 * (double) num), (int) (byte) ((double) byte.MaxValue * (double) num), (int) Main.mouseTextColor); + if (rare == 6) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (210.0 * (double) num), (int) (byte) (160.0 * (double) num), (int) (byte) ((double) byte.MaxValue * (double) num), (int) Main.mouseTextColor); + if (rare == 7) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (150.0 * (double) num), (int) (byte) ((double) byte.MaxValue * (double) num), (int) (byte) (10.0 * (double) num), (int) Main.mouseTextColor); + if (rare == 8) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num), (int) (byte) ((double) byte.MaxValue * (double) num), (int) (byte) (10.0 * (double) num), (int) Main.mouseTextColor); + if (rare == 9) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (5.0 * (double) num), (int) (byte) (200.0 * (double) num), (int) (byte) ((double) byte.MaxValue * (double) num), (int) Main.mouseTextColor); + if (rare == 10) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num), (int) (byte) (40.0 * (double) num), (int) (byte) (100.0 * (double) num), (int) Main.mouseTextColor); + if (rare >= 11) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (180.0 * (double) num), (int) (byte) (40.0 * (double) num), (int) (byte) ((double) byte.MaxValue * (double) num), (int) Main.mouseTextColor); + if (Main.HoverItem.expert || rare == -12) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) Main.DiscoR * (double) num), (int) (byte) ((double) Main.DiscoG * (double) num), (int) (byte) ((double) Main.DiscoB * (double) num), (int) Main.mouseTextColor); + if (diff == (byte) 1) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) Main.mcColor.R * (double) num), (int) (byte) ((double) Main.mcColor.G * (double) num), (int) (byte) ((double) Main.mcColor.B * (double) num), (int) Main.mouseTextColor); + if (diff == (byte) 2) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) Main.hcColor.R * (double) num), (int) (byte) ((double) Main.hcColor.G * (double) num), (int) (byte) ((double) Main.hcColor.B * (double) num), (int) Main.mouseTextColor); + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, FontAssets.MouseText.Value, cursorText, new Vector2((float) X, (float) Y), baseColor, 0.0f, Vector2.Zero, Vector2.One); + } + } + + private void MouseText_DrawItemTooltip( + Main.MouseTextCache info, + int rare, + byte diff, + int X, + int Y) + { + bool boxBehindTooltips = Main.SettingsEnabled_OpaqueBoxBehindTooltips; + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor); + Item hoverItem = Main.HoverItem; + int yoyoLogo = -1; + int researchLine = -1; + rare = hoverItem.rare; + float knockBack = hoverItem.knockBack; + float num1 = 1f; + if (hoverItem.melee && Main.player[Main.myPlayer].kbGlove) + ++num1; + if (Main.player[Main.myPlayer].kbBuff) + num1 += 0.5f; + if ((double) num1 != 1.0) + hoverItem.knockBack *= num1; + if (hoverItem.ranged && Main.player[Main.myPlayer].shroomiteStealth) + hoverItem.knockBack *= (float) (1.0 + (1.0 - (double) Main.player[Main.myPlayer].stealth) * 0.5); + int length = 30; + int index1 = 1; + string[] strArray = new string[length]; + bool[] preFixLine = new bool[length]; + bool[] badPreFixLine = new bool[length]; + for (int index2 = 0; index2 < length; ++index2) + { + preFixLine[index2] = false; + badPreFixLine[index2] = false; + } + Main.MouseText_DrawItemTooltip_GetLinesInfo(Main.HoverItem, ref yoyoLogo, ref researchLine, knockBack, ref index1, strArray, preFixLine, badPreFixLine); + float num2 = (float) Main.mouseTextColor / (float) byte.MaxValue; + int mouseTextColor = (int) Main.mouseTextColor; + if (Main.npcShop > 0 && hoverItem.value >= 0 && (hoverItem.type < 71 || hoverItem.type > 74)) + { + int calcForSelling; + int calcForBuying; + Main.LocalPlayer.GetItemExpectedPrice(hoverItem, out calcForSelling, out calcForBuying); + int price = hoverItem.isAShopItem || hoverItem.buyOnce ? calcForBuying : calcForSelling; + if (hoverItem.shopSpecialCurrency != -1) + { + CustomCurrencyManager.GetPriceText(hoverItem.shopSpecialCurrency, strArray, ref index1, price); + color1 = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num2), (int) (byte) ((double) byte.MaxValue * (double) num2), (int) (byte) ((double) byte.MaxValue * (double) num2), mouseTextColor); + } + else if (price > 0) + { + string str = ""; + int num3 = 0; + int num4 = 0; + int num5 = 0; + int num6 = 0; + int num7 = price * hoverItem.stack; + if (!hoverItem.buy) + { + int num8 = price / 5; + if (num8 < 1) + num8 = 1; + int num9 = num8; + num7 = num8 * hoverItem.stack; + int amount = Main.shopSellbackHelper.GetAmount(hoverItem); + if (amount > 0) + num7 += (-num9 + calcForBuying) * Math.Min(amount, hoverItem.stack); + } + if (num7 < 1) + num7 = 1; + if (num7 >= 1000000) + { + num3 = num7 / 1000000; + num7 -= num3 * 1000000; + } + if (num7 >= 10000) + { + num4 = num7 / 10000; + num7 -= num4 * 10000; + } + if (num7 >= 100) + { + num5 = num7 / 100; + num7 -= num5 * 100; + } + if (num7 >= 1) + num6 = num7; + if (num3 > 0) + str = str + (object) num3 + " " + Lang.inter[15].Value + " "; + if (num4 > 0) + str = str + (object) num4 + " " + Lang.inter[16].Value + " "; + if (num5 > 0) + str = str + (object) num5 + " " + Lang.inter[17].Value + " "; + if (num6 > 0) + str = str + (object) num6 + " " + Lang.inter[18].Value + " "; + strArray[index1] = hoverItem.buy ? Lang.tip[50].Value + " " + str : Lang.tip[49].Value + " " + str; + ++index1; + if (num3 > 0) + color1 = new Microsoft.Xna.Framework.Color((int) (byte) (220.0 * (double) num2), (int) (byte) (220.0 * (double) num2), (int) (byte) (198.0 * (double) num2), mouseTextColor); + else if (num4 > 0) + color1 = new Microsoft.Xna.Framework.Color((int) (byte) (224.0 * (double) num2), (int) (byte) (201.0 * (double) num2), (int) (byte) (92.0 * (double) num2), mouseTextColor); + else if (num5 > 0) + color1 = new Microsoft.Xna.Framework.Color((int) (byte) (181.0 * (double) num2), (int) (byte) (192.0 * (double) num2), (int) (byte) (193.0 * (double) num2), mouseTextColor); + else if (num6 > 0) + color1 = new Microsoft.Xna.Framework.Color((int) (byte) (246.0 * (double) num2), (int) (byte) (138.0 * (double) num2), (int) (byte) (96.0 * (double) num2), mouseTextColor); + } + else if (hoverItem.type != 3817) + { + strArray[index1] = Lang.tip[51].Value; + ++index1; + color1 = new Microsoft.Xna.Framework.Color((int) (byte) (120.0 * (double) num2), (int) (byte) (120.0 * (double) num2), (int) (byte) (120.0 * (double) num2), mouseTextColor); + } + } + Vector2 zero = Vector2.Zero; + int num10 = 0; + for (int index3 = 0; index3 < index1; ++index3) + { + Vector2 stringSize = ChatManager.GetStringSize(FontAssets.MouseText.Value, strArray[index3], Vector2.One); + if ((double) stringSize.X > (double) zero.X) + zero.X = stringSize.X; + zero.Y += stringSize.Y + (float) num10; + } + if (yoyoLogo != -1) + zero.Y += 24f; + X += Main.toolTipDistance; + Y += Main.toolTipDistance; + int num11 = 4; + if (boxBehindTooltips) + { + X += 8; + Y += 2; + num11 = 18; + } + int screenWidth = Main.screenWidth; + int screenHeight = Main.screenHeight; + if ((double) X + (double) zero.X + (double) num11 > (double) screenWidth) + X = (int) ((double) screenWidth - (double) zero.X - (double) num11); + if ((double) Y + (double) zero.Y + (double) num11 > (double) screenHeight) + Y = (int) ((double) screenHeight - (double) zero.Y - (double) num11); + int num12 = 0; + float num13 = (float) Main.mouseTextColor / (float) byte.MaxValue; + if (boxBehindTooltips) + { + MathHelper.Lerp(num13, 1f, 1f); + int num14 = 14; + int num15 = 9; + Utils.DrawInvBG(Main.spriteBatch, new Microsoft.Xna.Framework.Rectangle(X - num14, Y - num15, (int) zero.X + num14 * 2, (int) zero.Y + num15 + num15 / 2), new Microsoft.Xna.Framework.Color(23, 25, 81, (int) byte.MaxValue) * 0.925f); + } + for (int index4 = 0; index4 < index1; ++index4) + { + if (index4 == yoyoLogo) + { + float num16 = 1f; + int num17 = (int) ((double) Main.mouseTextColor * (double) num16); + Microsoft.Xna.Framework.Color color2 = Microsoft.Xna.Framework.Color.Black; + for (int index5 = 0; index5 < 5; ++index5) + { + int num18 = X; + int num19 = Y + num12; + if (index5 == 4) + color2 = new Microsoft.Xna.Framework.Color(num17, num17, num17, num17); + if (index5 == 0) + --num18; + else if (index5 == 1) + ++num18; + else if (index5 == 2) + --num19; + else if (index5 == 3) + ++num19; + Main.spriteBatch.Draw(TextureAssets.OneDropLogo.Value, new Vector2((float) num18, (float) num19), new Microsoft.Xna.Framework.Rectangle?(), color2, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + else + { + Microsoft.Xna.Framework.Color baseColor = Microsoft.Xna.Framework.Color.Black; + baseColor = new Microsoft.Xna.Framework.Color(num2, num2, num2, num2); + if (index4 == 0) + { + if (rare == -13) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num2), (int) (byte) ((double) Main.masterColor * 200.0 * (double) num2), 0, mouseTextColor); + if (rare == -11) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num2), (int) (byte) (175.0 * (double) num2), (int) (byte) (0.0 * (double) num2), mouseTextColor); + if (rare == -1) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (130.0 * (double) num2), (int) (byte) (130.0 * (double) num2), (int) (byte) (130.0 * (double) num2), mouseTextColor); + if (rare == 1) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (150.0 * (double) num2), (int) (byte) (150.0 * (double) num2), (int) (byte) ((double) byte.MaxValue * (double) num2), mouseTextColor); + if (rare == 2) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (150.0 * (double) num2), (int) (byte) ((double) byte.MaxValue * (double) num2), (int) (byte) (150.0 * (double) num2), mouseTextColor); + if (rare == 3) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num2), (int) (byte) (200.0 * (double) num2), (int) (byte) (150.0 * (double) num2), mouseTextColor); + if (rare == 4) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num2), (int) (byte) (150.0 * (double) num2), (int) (byte) (150.0 * (double) num2), mouseTextColor); + if (rare == 5) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num2), (int) (byte) (150.0 * (double) num2), (int) (byte) ((double) byte.MaxValue * (double) num2), mouseTextColor); + if (rare == 6) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (210.0 * (double) num2), (int) (byte) (160.0 * (double) num2), (int) (byte) ((double) byte.MaxValue * (double) num2), mouseTextColor); + if (rare == 7) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (150.0 * (double) num2), (int) (byte) ((double) byte.MaxValue * (double) num2), (int) (byte) (10.0 * (double) num2), mouseTextColor); + if (rare == 8) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num2), (int) (byte) ((double) byte.MaxValue * (double) num2), (int) (byte) (10.0 * (double) num2), mouseTextColor); + if (rare == 9) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (5.0 * (double) num2), (int) (byte) (200.0 * (double) num2), (int) (byte) ((double) byte.MaxValue * (double) num2), mouseTextColor); + if (rare == 10) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num2), (int) (byte) (40.0 * (double) num2), (int) (byte) (100.0 * (double) num2), mouseTextColor); + if (rare >= 11) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) (180.0 * (double) num2), (int) (byte) (40.0 * (double) num2), (int) (byte) ((double) byte.MaxValue * (double) num2), mouseTextColor); + if (diff == (byte) 1) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) Main.mcColor.R * (double) num2), (int) (byte) ((double) Main.mcColor.G * (double) num2), (int) (byte) ((double) Main.mcColor.B * (double) num2), mouseTextColor); + if (diff == (byte) 2) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) Main.hcColor.R * (double) num2), (int) (byte) ((double) Main.hcColor.G * (double) num2), (int) (byte) ((double) Main.hcColor.B * (double) num2), mouseTextColor); + if (hoverItem.expert || rare == -12) + baseColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) Main.DiscoR * (double) num2), (int) (byte) ((double) Main.DiscoG * (double) num2), (int) (byte) ((double) Main.DiscoB * (double) num2), mouseTextColor); + } + else if (preFixLine[index4]) + baseColor = !badPreFixLine[index4] ? new Microsoft.Xna.Framework.Color((int) (byte) (120.0 * (double) num2), (int) (byte) (190.0 * (double) num2), (int) (byte) (120.0 * (double) num2), mouseTextColor) : new Microsoft.Xna.Framework.Color((int) (byte) (190.0 * (double) num2), (int) (byte) (120.0 * (double) num2), (int) (byte) (120.0 * (double) num2), mouseTextColor); + else if (index4 == index1 - 1) + baseColor = color1; + if (index4 == researchLine) + baseColor = Colors.JourneyMode; + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, FontAssets.MouseText.Value, strArray[index4], new Vector2((float) X, (float) (Y + num12)), baseColor, 0.0f, Vector2.Zero, Vector2.One); + } + num12 += (int) ((double) FontAssets.MouseText.Value.MeasureString(strArray[index4]).Y + (double) num10); + } + } + + public static void MouseText_DrawItemTooltip_GetLinesInfo( + Item item, + ref int yoyoLogo, + ref int researchLine, + float oldKB, + ref int numLines, + string[] toolTipLine, + bool[] preFixLine, + bool[] badPreFixLine) + { + Item obj1 = item; + toolTipLine[0] = obj1.HoverName; + if (obj1.favorited) + { + toolTipLine[numLines++] = Lang.tip[56].Value; + toolTipLine[numLines++] = Lang.tip[57].Value; + if (Main.LocalPlayer.chest != -1) + { + Item[] chestinv; + ChestUI.GetContainerUsageInfo(out bool _, out chestinv); + if (ChestUI.IsBlockedFromTransferIntoChest(obj1, chestinv)) + toolTipLine[numLines++] = Language.GetTextValue("UI.ItemCannotBePlacedInsideItself"); + } + } + if (obj1.social) + { + toolTipLine[numLines] = Lang.tip[0].Value; + ++numLines; + toolTipLine[numLines] = Lang.tip[1].Value; + ++numLines; + } + else + { + if (obj1.damage > 0 && (!obj1.notAmmo || obj1.useStyle != 0) && (obj1.type < 71 || obj1.type > 74 || Main.player[Main.myPlayer].HasItem(905))) + { + float num1 = 5E-06f; + int num2 = (int) ((double) obj1.damage * (double) ItemID.Sets.ToolTipDamageMultiplier[obj1.type]); + if (obj1.melee) + { + toolTipLine[numLines] = string.Concat((object) (int) ((double) Main.player[Main.myPlayer].meleeDamage * (double) num2 + (double) num1)); + // ISSUE: explicit reference operation + ^ref toolTipLine[numLines] += Lang.tip[2].Value; + } + else if (obj1.ranged) + { + float num3 = (float) num2 * Main.player[Main.myPlayer].rangedDamage; + if (obj1.useAmmo == AmmoID.Arrow || obj1.useAmmo == AmmoID.Stake) + { + num3 *= Main.player[Main.myPlayer].arrowDamage; + if (Main.player[Main.myPlayer].archery) + num3 *= 1.2f; + } + if (obj1.useAmmo == AmmoID.Bullet || obj1.useAmmo == AmmoID.CandyCorn) + num3 *= Main.player[Main.myPlayer].bulletDamage; + if (obj1.useAmmo == AmmoID.Rocket || obj1.useAmmo == AmmoID.StyngerBolt || obj1.useAmmo == AmmoID.JackOLantern || obj1.useAmmo == AmmoID.NailFriendly) + num3 *= Main.player[Main.myPlayer].rocketDamage; + toolTipLine[numLines] = string.Concat((object) (int) ((double) num3 + (double) num1)); + // ISSUE: explicit reference operation + ^ref toolTipLine[numLines] += Lang.tip[3].Value; + } + else if (obj1.magic) + { + toolTipLine[numLines] = string.Concat((object) (int) ((double) Main.player[Main.myPlayer].magicDamage * (double) num2 + (double) num1)); + // ISSUE: explicit reference operation + ^ref toolTipLine[numLines] += Lang.tip[4].Value; + } + else if (obj1.summon) + { + toolTipLine[numLines] = string.Concat((object) (int) ((double) Main.player[Main.myPlayer].minionDamage * (double) num2 + (double) num1)); + // ISSUE: explicit reference operation + ^ref toolTipLine[numLines] += Lang.tip[53].Value; + } + else + { + toolTipLine[numLines] = string.Concat((object) num2); + // ISSUE: explicit reference operation + ^ref toolTipLine[numLines] += Lang.tip[55].Value; + } + ++numLines; + if (obj1.melee) + { + int num4 = Main.player[Main.myPlayer].meleeCrit - Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].crit + obj1.crit; + toolTipLine[numLines] = num4.ToString() + Lang.tip[5].Value; + ++numLines; + } + else if (obj1.ranged) + { + int num5 = Main.player[Main.myPlayer].rangedCrit - Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].crit + obj1.crit; + toolTipLine[numLines] = num5.ToString() + Lang.tip[5].Value; + ++numLines; + } + else if (obj1.magic) + { + int num6 = Main.player[Main.myPlayer].magicCrit - Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].crit + obj1.crit; + toolTipLine[numLines] = num6.ToString() + Lang.tip[5].Value; + ++numLines; + } + if (obj1.useStyle != 0 && !obj1.summon) + { + toolTipLine[numLines] = obj1.useAnimation > 8 ? (obj1.useAnimation > 20 ? (obj1.useAnimation > 25 ? (obj1.useAnimation > 30 ? (obj1.useAnimation > 35 ? (obj1.useAnimation > 45 ? (obj1.useAnimation > 55 ? Lang.tip[13].Value : Lang.tip[12].Value) : Lang.tip[11].Value) : Lang.tip[10].Value) : Lang.tip[9].Value) : Lang.tip[8].Value) : Lang.tip[7].Value) : Lang.tip[6].Value; + ++numLines; + } + float num7 = obj1.knockBack; + if (obj1.summon) + num7 += Main.player[Main.myPlayer].minionKB; + if (Main.player[Main.myPlayer].magicQuiver && obj1.useAmmo == AmmoID.Arrow || obj1.useAmmo == AmmoID.Stake) + num7 = (float) (int) ((double) num7 * 1.10000002384186); + if (Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type == 3106 && obj1.type == 3106) + num7 += num7 * (1f - Main.player[Main.myPlayer].stealth); + toolTipLine[numLines] = (double) num7 != 0.0 ? ((double) num7 > 1.5 ? ((double) num7 > 3.0 ? ((double) num7 > 4.0 ? ((double) num7 > 6.0 ? ((double) num7 > 7.0 ? ((double) num7 > 9.0 ? ((double) num7 > 11.0 ? Lang.tip[22].Value : Lang.tip[21].Value) : Lang.tip[20].Value) : Lang.tip[19].Value) : Lang.tip[18].Value) : Lang.tip[17].Value) : Lang.tip[16].Value) : Lang.tip[15].Value) : Lang.tip[14].Value; + ++numLines; + } + if (obj1.fishingPole > 0) + { + toolTipLine[numLines] = Language.GetTextValue("GameUI.PrecentFishingPower", (object) obj1.fishingPole); + ++numLines; + toolTipLine[numLines] = Language.GetTextValue("GameUI.BaitRequired"); + ++numLines; + } + if (obj1.bait > 0) + { + toolTipLine[numLines] = Language.GetTextValue("GameUI.BaitPower", (object) obj1.bait); + ++numLines; + } + if (obj1.headSlot > 0 || obj1.bodySlot > 0 || obj1.legSlot > 0 || obj1.accessory || Main.projHook[obj1.shoot] || obj1.mountType != -1 || obj1.buffType > 0 && (Main.lightPet[obj1.buffType] || Main.vanityPet[obj1.buffType])) + { + toolTipLine[numLines] = obj1.type != 854 && obj1.type != 3035 || Main.npcShop <= 0 ? Lang.tip[23].Value : Lang.tip[60].Value; + ++numLines; + } + if (obj1.tileWand > 0) + { + toolTipLine[numLines] = Lang.tip[52].Value + Lang.GetItemNameValue(obj1.tileWand); + ++numLines; + } + if (obj1.questItem) + { + toolTipLine[numLines] = Lang.inter[65].Value; + ++numLines; + } + if (obj1.vanity) + { + toolTipLine[numLines] = Lang.tip[24].Value; + ++numLines; + } + if (!obj1.vanity && obj1.FitsAccessoryVanitySlot) + { + toolTipLine[numLines] = Language.GetText("Misc.CanBePlacedInVanity").Value; + ++numLines; + } + if (obj1.defense > 0) + { + toolTipLine[numLines] = obj1.defense.ToString() + Lang.tip[25].Value; + ++numLines; + } + if (obj1.pick > 0) + { + toolTipLine[numLines] = obj1.pick.ToString() + Lang.tip[26].Value; + ++numLines; + } + if (obj1.axe > 0) + { + toolTipLine[numLines] = (obj1.axe * 5).ToString() + Lang.tip[27].Value; + ++numLines; + } + if (obj1.hammer > 0) + { + toolTipLine[numLines] = obj1.hammer.ToString() + Lang.tip[28].Value; + ++numLines; + } + if (obj1.tileBoost != 0) + { + int tileBoost = obj1.tileBoost; + toolTipLine[numLines] = tileBoost <= 0 ? tileBoost.ToString() + Lang.tip[54].Value : "+" + (object) tileBoost + Lang.tip[54].Value; + ++numLines; + } + if (obj1.healLife > 0) + { + toolTipLine[numLines] = Language.GetTextValue("CommonItemTooltip.RestoresLife", (object) obj1.healLife); + ++numLines; + } + if (obj1.healMana > 0) + { + toolTipLine[numLines] = Language.GetTextValue("CommonItemTooltip.RestoresMana", (object) obj1.healMana); + ++numLines; + } + if (obj1.mana > 0 && (obj1.type != (int) sbyte.MaxValue || !Main.player[Main.myPlayer].spaceGun)) + { + toolTipLine[numLines] = Language.GetTextValue("CommonItemTooltip.UsesMana", (object) (int) ((double) obj1.mana * (double) Main.player[Main.myPlayer].manaCost)); + ++numLines; + } + if (obj1.createWall > 0 || obj1.createTile > -1) + { + if (obj1.type != 213 && obj1.tileWand < 1) + { + toolTipLine[numLines] = Lang.tip[33].Value; + ++numLines; + } + } + else if (obj1.ammo > 0 && !obj1.notAmmo) + { + toolTipLine[numLines] = Lang.tip[34].Value; + ++numLines; + } + else if (obj1.consumable) + { + toolTipLine[numLines] = Lang.tip[35].Value; + ++numLines; + } + if (obj1.material) + { + toolTipLine[numLines] = Lang.tip[36].Value; + ++numLines; + } + if (obj1.ToolTip != null) + { + for (int line = 0; line < obj1.ToolTip.Lines; ++line) + { + if (line == 0 && ItemID.Sets.UsesCursedByPlanteraTooltip[obj1.type] && !NPC.downedPlantBoss) + { + toolTipLine[numLines] = Lang.tip[59].Value; + ++numLines; + } + else + { + toolTipLine[numLines] = obj1.ToolTip.GetLine(line); + ++numLines; + } + } + } + if ((obj1.type == 3818 || obj1.type == 3819 || obj1.type == 3820 || obj1.type == 3824 || obj1.type == 3825 || obj1.type == 3826 || obj1.type == 3829 || obj1.type == 3830 || obj1.type == 3831 || obj1.type == 3832 || obj1.type == 3833 || obj1.type == 3834) && !Main.player[Main.myPlayer].downedDD2EventAnyDifficulty) + { + toolTipLine[numLines] = Lang.misc[104].Value; + ++numLines; + } + if (obj1.buffType > 0 && BuffID.Sets.IsWellFed[obj1.buffType] && Main.expertMode) + { + toolTipLine[numLines] = Lang.misc[40].Value; + ++numLines; + } + if (obj1.buffTime > 0) + { + string str = obj1.buffTime / 60 < 60 ? Language.GetTextValue("CommonItemTooltip.SecondDuration", (object) Math.Round((double) obj1.buffTime / 60.0)) : Language.GetTextValue("CommonItemTooltip.MinuteDuration", (object) Math.Round((double) (obj1.buffTime / 60) / 60.0)); + toolTipLine[numLines] = str; + ++numLines; + } + if (obj1.type == 3262 || obj1.type == 3282 || obj1.type == 3283 || obj1.type == 3284 || obj1.type == 3285 || obj1.type == 3286 || obj1.type == 3316 || obj1.type == 3315 || obj1.type == 3317 || obj1.type == 3291 || obj1.type == 3389) + { + toolTipLine[numLines] = " "; + yoyoLogo = numLines; + ++numLines; + } + if (obj1.prefix > (byte) 0) + { + Item obj2 = Main.tooltipPrefixComparisonItem; + if (obj2 == null || obj2.netID != obj1.netID) + { + obj2 = new Item(); + obj2.netDefaults(obj1.netID); + } + if (obj2.damage != obj1.damage) + { + double num = Math.Round(((double) obj1.damage - (double) obj2.damage) / (double) obj2.damage * 100.0); + toolTipLine[numLines] = num <= 0.0 ? num.ToString() + Lang.tip[39].Value : "+" + (object) num + Lang.tip[39].Value; + if (num < 0.0) + badPreFixLine[numLines] = true; + preFixLine[numLines] = true; + ++numLines; + } + if (obj2.useAnimation != obj1.useAnimation) + { + double num = Math.Round(((double) obj1.useAnimation - (double) obj2.useAnimation) / (double) obj2.useAnimation * 100.0) * -1.0; + toolTipLine[numLines] = num <= 0.0 ? num.ToString() + Lang.tip[40].Value : "+" + (object) num + Lang.tip[40].Value; + if (num < 0.0) + badPreFixLine[numLines] = true; + preFixLine[numLines] = true; + ++numLines; + } + if (obj2.crit != obj1.crit) + { + double num = (double) obj1.crit - (double) obj2.crit; + toolTipLine[numLines] = num <= 0.0 ? num.ToString() + Lang.tip[41].Value : "+" + (object) num + Lang.tip[41].Value; + if (num < 0.0) + badPreFixLine[numLines] = true; + preFixLine[numLines] = true; + ++numLines; + } + if (obj2.mana != obj1.mana) + { + double num = Math.Round(((double) obj1.mana - (double) obj2.mana) / (double) obj2.mana * 100.0); + toolTipLine[numLines] = num <= 0.0 ? num.ToString() + Lang.tip[42].Value : "+" + (object) num + Lang.tip[42].Value; + if (num > 0.0) + badPreFixLine[numLines] = true; + preFixLine[numLines] = true; + ++numLines; + } + if ((double) obj2.scale != (double) obj1.scale) + { + double num = Math.Round(((double) obj1.scale - (double) obj2.scale) / (double) obj2.scale * 100.0); + toolTipLine[numLines] = num <= 0.0 ? num.ToString() + Lang.tip[43].Value : "+" + (object) num + Lang.tip[43].Value; + if (num < 0.0) + badPreFixLine[numLines] = true; + preFixLine[numLines] = true; + ++numLines; + } + if ((double) obj2.shootSpeed != (double) obj1.shootSpeed) + { + double num = Math.Round(((double) obj1.shootSpeed - (double) obj2.shootSpeed) / (double) obj2.shootSpeed * 100.0); + toolTipLine[numLines] = num <= 0.0 ? num.ToString() + Lang.tip[44].Value : "+" + (object) num + Lang.tip[44].Value; + if (num < 0.0) + badPreFixLine[numLines] = true; + preFixLine[numLines] = true; + ++numLines; + } + if ((double) obj2.knockBack != (double) oldKB) + { + double num = Math.Round(((double) oldKB - (double) obj2.knockBack) / (double) obj2.knockBack * 100.0); + toolTipLine[numLines] = num <= 0.0 ? num.ToString() + Lang.tip[45].Value : "+" + (object) num + Lang.tip[45].Value; + if (num < 0.0) + badPreFixLine[numLines] = true; + preFixLine[numLines] = true; + ++numLines; + } + if (obj1.prefix == (byte) 62) + { + toolTipLine[numLines] = "+1" + Lang.tip[25].Value; + preFixLine[numLines] = true; + ++numLines; + } + if (obj1.prefix == (byte) 63) + { + toolTipLine[numLines] = "+2" + Lang.tip[25].Value; + preFixLine[numLines] = true; + ++numLines; + } + if (obj1.prefix == (byte) 64) + { + toolTipLine[numLines] = "+3" + Lang.tip[25].Value; + preFixLine[numLines] = true; + ++numLines; + } + if (obj1.prefix == (byte) 65) + { + toolTipLine[numLines] = "+4" + Lang.tip[25].Value; + preFixLine[numLines] = true; + ++numLines; + } + if (obj1.prefix == (byte) 66) + { + toolTipLine[numLines] = "+20 " + Lang.tip[31].Value; + preFixLine[numLines] = true; + ++numLines; + } + if (obj1.prefix == (byte) 67) + { + toolTipLine[numLines] = "+2" + Lang.tip[5].Value; + preFixLine[numLines] = true; + ++numLines; + } + if (obj1.prefix == (byte) 68) + { + toolTipLine[numLines] = "+4" + Lang.tip[5].Value; + preFixLine[numLines] = true; + ++numLines; + } + if (obj1.prefix == (byte) 69) + { + toolTipLine[numLines] = "+1" + Lang.tip[39].Value; + preFixLine[numLines] = true; + ++numLines; + } + if (obj1.prefix == (byte) 70) + { + toolTipLine[numLines] = "+2" + Lang.tip[39].Value; + preFixLine[numLines] = true; + ++numLines; + } + if (obj1.prefix == (byte) 71) + { + toolTipLine[numLines] = "+3" + Lang.tip[39].Value; + preFixLine[numLines] = true; + ++numLines; + } + if (obj1.prefix == (byte) 72) + { + toolTipLine[numLines] = "+4" + Lang.tip[39].Value; + preFixLine[numLines] = true; + ++numLines; + } + if (obj1.prefix == (byte) 73) + { + toolTipLine[numLines] = "+1" + Lang.tip[46].Value; + preFixLine[numLines] = true; + ++numLines; + } + if (obj1.prefix == (byte) 74) + { + toolTipLine[numLines] = "+2" + Lang.tip[46].Value; + preFixLine[numLines] = true; + ++numLines; + } + if (obj1.prefix == (byte) 75) + { + toolTipLine[numLines] = "+3" + Lang.tip[46].Value; + preFixLine[numLines] = true; + ++numLines; + } + if (obj1.prefix == (byte) 76) + { + toolTipLine[numLines] = "+4" + Lang.tip[46].Value; + preFixLine[numLines] = true; + ++numLines; + } + if (obj1.prefix == (byte) 77) + { + toolTipLine[numLines] = "+1" + Lang.tip[47].Value; + preFixLine[numLines] = true; + ++numLines; + } + if (obj1.prefix == (byte) 78) + { + toolTipLine[numLines] = "+2" + Lang.tip[47].Value; + preFixLine[numLines] = true; + ++numLines; + } + if (obj1.prefix == (byte) 79) + { + toolTipLine[numLines] = "+3" + Lang.tip[47].Value; + preFixLine[numLines] = true; + ++numLines; + } + if (obj1.prefix == (byte) 80) + { + toolTipLine[numLines] = "+4" + Lang.tip[47].Value; + preFixLine[numLines] = true; + ++numLines; + } + } + if (obj1.wornArmor && Main.player[Main.myPlayer].setBonus != "") + { + toolTipLine[numLines] = Lang.tip[48].Value + " " + Main.player[Main.myPlayer].setBonus; + ++numLines; + } + } + if (obj1.expert) + { + toolTipLine[numLines] = Language.GetTextValue("GameUI.Expert"); + ++numLines; + } + if (obj1.rare == -13) + { + toolTipLine[numLines] = Language.GetTextValue("GameUI.Master"); + ++numLines; + } + int amountNeeded; + if ((obj1.tooltipContext == 0 || obj1.tooltipContext == 2 || obj1.tooltipContext == 1 || obj1.tooltipContext == 3 || obj1.tooltipContext == 4 || obj1.tooltipContext == 15 ? 1 : (obj1.tooltipContext == 6 ? 1 : 0)) != 0 && Main.LocalPlayer.difficulty == (byte) 3 && CreativeItemSacrificesCatalog.Instance.TryGetSacrificeCountCapToUnlockInfiniteItems(obj1.type, out amountNeeded)) + { + int sacrificeCount = Main.LocalPlayerCreativeTracker.ItemSacrifices.GetSacrificeCount(obj1.type); + if (amountNeeded - sacrificeCount > 0) + { + toolTipLine[numLines] = Language.GetTextValue("CommonItemTooltip.CreativeSacrificeNeeded", (object) (amountNeeded - sacrificeCount)); + researchLine = numLines; + ++numLines; + } + } + string bestiaryNotes = obj1.BestiaryNotes; + if (string.IsNullOrWhiteSpace(bestiaryNotes)) + return; + string str1 = bestiaryNotes; + char[] chArray = new char[1]{ '\n' }; + foreach (string str2 in str1.Split(chArray)) + toolTipLine[numLines++] = str2; + } + + private void MouseText_DrawBuffTooltip(string buffString, ref int X, ref int Y) + { + Microsoft.Xna.Framework.Point p = new Microsoft.Xna.Framework.Point(X, Y); + int num1 = 220; + int num2 = 72; + int num3 = -1; + float num4 = 1f; + List vector2List = new List(); + Vector2 vector2_1 = FontAssets.MouseText.Value.MeasureString(buffString); + vector2List.Add(vector2_1); + int num5 = (int) ((double) (Main.screenHeight - Y - 24 - num2) * (double) num4) / 20; + if (num5 < 1) + num5 = 1; + if (Main.bannerMouseOver) + { + int num6 = 0; + for (int index1 = 0; index1 < 289; ++index1) + { + if (Item.BannerToNPC(index1) != 0 && Main.player[Main.myPlayer].HasNPCBannerBuff(index1)) + { + ++num6; + string npcNameValue = Lang.GetNPCNameValue(Item.BannerToNPC(index1)); + Vector2 vector2_2 = FontAssets.MouseText.Value.MeasureString(npcNameValue); + int num7 = X; + int num8 = Y + (int) vector2_2.Y + num6 * 20 + 10; + int num9 = 0; + int num10 = num6 / num5; + for (int index2 = 0; index2 < num10; ++index2) + { + ++num9; + num7 += num1; + num8 -= num5 * 20; + } + if ((double) (num7 - 24 - num1) > (double) Main.screenWidth * (double) num4) + { + num3 = num6; + break; + } + vector2List.Add(new Vector2((float) num7, (float) num8) + vector2_2 - p.ToVector2()); + } + } + } + Vector2 zero = Vector2.Zero; + foreach (Vector2 vector2_3 in vector2List) + { + if ((double) zero.X < (double) vector2_3.X) + zero.X = vector2_3.X; + if ((double) zero.Y < (double) vector2_3.Y) + zero.Y = vector2_3.Y; + } + if ((double) X + (double) zero.X + 24.0 > (double) Main.screenWidth * (double) num4) + X = (int) ((double) Main.screenWidth * (double) num4 - (double) zero.X - 24.0); + if ((double) Y + (double) zero.Y + 4.0 > (double) Main.screenHeight * (double) num4) + Y = (int) ((double) Main.screenHeight * (double) num4 - (double) zero.Y - 4.0); + for (int index = 0; index < 5; ++index) + { + int num11 = X; + int num12 = Y + (int) FontAssets.MouseText.Value.MeasureString(buffString).Y; + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.Black; + if (index == 0) + num11 -= 2; + else if (index == 1) + num11 += 2; + else if (index == 2) + num12 -= 2; + else if (index == 3) + num12 += 2; + else + color = new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, buffString, new Vector2((float) num11, (float) num12), color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (!Main.bannerMouseOver) + return; + int num13 = 0; + for (int index3 = 0; index3 < 289; ++index3) + { + if (Item.BannerToNPC(index3) != 0 && Main.player[Main.myPlayer].HasNPCBannerBuff(index3)) + { + ++num13; + bool flag = false; + for (int index4 = 0; index4 < 5; ++index4) + { + int num14 = X; + int num15 = Y + (int) vector2_1.Y + num13 * 20 + 10; + int num16 = (num13 - 1) / num5; + int num17 = num14 + num1 * num16; + int num18 = num15 - num5 * 20 * num16; + string str = Lang.GetNPCNameValue(Item.BannerToNPC(index3)); + if (num3 == num13) + { + str = Language.GetTextValue("UI.Ellipsis"); + flag = true; + } + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.Black; + switch (index4) + { + case 0: + num17 -= 2; + break; + case 1: + num17 += 2; + break; + case 2: + num18 -= 2; + break; + case 3: + num18 += 2; + break; + default: + float num19 = (float) Main.mouseTextColor / (float) byte.MaxValue; + color = new Microsoft.Xna.Framework.Color((int) (byte) (80.0 * (double) num19), (int) (byte) ((double) byte.MaxValue * (double) num19), (int) (byte) (120.0 * (double) num19), (int) Main.mouseTextColor); + break; + } + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, str, new Vector2((float) num17, (float) num18), color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (flag) + break; + } + } + } + + protected void DrawFPS() + { + if (!Main.showFrameRate) + return; + string str = string.Concat((object) Main.frameRate) + " (" + (object) (Terraria.Liquid.numLiquid + LiquidBuffer.numLiquidBuffer) + ")" + " (" + (object) (int) ((double) Main.gfxQuality * 100.0) + "%)" + " " + Main.debugWords; + int num = 4; + if (!Main.gameMenu) + num = Main.screenHeight - 24; + Vector2 vector2_1 = new Vector2(4f, (float) num); + Vector2 vector2_2 = new Vector2(0.0f, 0.0f); + Vector2 vector2_3 = FontAssets.MouseText.Value.MeasureString(str); + if (PlayerInput.UsingGamepad && !Main.gameMenu) + vector2_1.X = (float) (Main.screenWidth - 4) - vector2_3.X; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, str, vector2_1, new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor), 0.0f, vector2_2, 1f, SpriteEffects.None, 0.0f); + } + + public static void DrawGamepadInstructions() + { + if (Main.drawingPlayerChat) + return; + string text = PlayerInput.ComposeInstructionsForGamepad(); + if (Main.GamepadDisableInstructionsDisplay || text.Length <= 0 || Main.player[Main.myPlayer].dead && !Main.gameMenu) + return; + float num1 = 35f; + float num2 = 1f; + Vector2 baseScale = new Vector2(num2); + if (Main.gameMenu) + num1 = 55f; + Vector2 stringSize = ChatManager.GetStringSize(FontAssets.MouseText.Value, text, new Vector2(1f)); + float t2 = num2; + Utils.Swap(ref GlyphTagHandler.GlyphsScale, ref t2); + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, FontAssets.MouseText.Value, text, new Vector2(12f, (float) Main.screenHeight - num1) - stringSize * new Vector2(0.0f, 0.0f), Microsoft.Xna.Framework.Color.White, 0.0f, Vector2.Zero, baseScale, spread: (num2 * 2f)); + Utils.Swap(ref GlyphTagHandler.GlyphsScale, ref t2); + } + + public static Microsoft.Xna.Framework.Color shine(Microsoft.Xna.Framework.Color newColor, int type) + { + int num1 = (int) newColor.R; + int g = (int) newColor.G; + int b = (int) newColor.B; + float num2 = 0.6f; + int num3; + int num4; + switch (type) + { + case 25: + num1 = (int) ((double) newColor.R * 0.949999988079071); + num3 = (int) ((double) newColor.G * 0.850000023841858); + num4 = (int) ((double) newColor.B * 1.1); + break; + case 117: + num1 = (int) ((double) newColor.R * 1.10000002384186); + num3 = (int) ((double) newColor.G * 1.0); + num4 = (int) ((double) newColor.B * 1.2); + break; + case 147: + case 161: + num1 = (int) ((double) newColor.R * 1.10000002384186); + num3 = (int) ((double) newColor.G * 1.12000000476837); + num4 = (int) ((double) newColor.B * 1.15); + break; + case 163: + num1 = (int) ((double) newColor.R * 1.04999995231628); + num3 = (int) ((double) newColor.G * 1.10000002384186); + num4 = (int) ((double) newColor.B * 1.15); + break; + case 164: + num1 = (int) ((double) newColor.R * 1.10000002384186); + num3 = (int) ((double) newColor.G * 1.10000002384186); + num4 = (int) ((double) newColor.B * 1.2); + break; + case 178: + float num5 = 0.5f; + num1 = (int) ((double) newColor.R * (1.0 + (double) num5)); + num3 = (int) ((double) newColor.G * (1.0 + (double) num5)); + num4 = (int) ((double) newColor.B * (1.0 + (double) num5)); + break; + case 185: + case 186: + float num6 = 0.3f; + num1 = (int) ((double) newColor.R * (1.0 + (double) num6)); + num3 = (int) ((double) newColor.G * (1.0 + (double) num6)); + num4 = (int) ((double) newColor.B * (1.0 + (double) num6)); + break; + case 204: + float num7 = (float) (0.300000011920929 + (double) Main.mouseTextColor / 300.0); + int r = (int) ((double) newColor.R * (1.29999995231628 * (double) num7)); + if (r > (int) byte.MaxValue) + r = (int) byte.MaxValue; + return new Microsoft.Xna.Framework.Color(r, g, b, (int) byte.MaxValue); + case 211: + float num8 = (float) (0.300000011920929 + (double) Main.mouseTextColor / 300.0); + num3 = (int) ((double) newColor.G * (1.5 * (double) num8)); + num4 = (int) ((double) newColor.B * (1.10000002384186 * (double) num8)); + break; + case 262: + case 263: + case 264: + case 265: + case 266: + case 267: + case 268: + num4 = b + 100; + num1 += 100; + num3 = g + 100; + break; + default: + num1 = (int) ((double) newColor.R * (1.0 + (double) num2)); + num3 = (int) ((double) newColor.G * (1.0 + (double) num2)); + num4 = (int) ((double) newColor.B * (1.0 + (double) num2)); + break; + } + if (num1 > (int) byte.MaxValue) + num1 = (int) byte.MaxValue; + if (num3 > (int) byte.MaxValue) + num3 = (int) byte.MaxValue; + if (num4 > (int) byte.MaxValue) + num4 = (int) byte.MaxValue; + newColor.R = (byte) num1; + newColor.G = (byte) num3; + newColor.B = (byte) num4; + return new Microsoft.Xna.Framework.Color((int) (byte) num1, (int) (byte) num3, (int) (byte) num4, (int) newColor.A); + } + + public static void shine(ref Vector3 newColor, int type) + { + float num1 = 0.6f; + switch (type) + { + case 25: + newColor.X *= 0.95f; + newColor.Y *= 0.85f; + newColor.Z *= 1.1f; + break; + case 117: + newColor.X *= 1.1f; + newColor.Z *= 1.2f; + break; + case 147: + case 161: + newColor.X *= 1.1f; + newColor.Y *= 1.12f; + newColor.Z *= 1.15f; + break; + case 163: + newColor.X *= 1.05f; + newColor.Y *= 1.1f; + newColor.Z *= 1.15f; + break; + case 164: + newColor.X *= 1.1f; + newColor.Y *= 1.1f; + newColor.Z *= 1.2f; + break; + case 178: + float num2 = 0.5f; + newColor.X *= 1f + num2; + newColor.Y *= 1f + num2; + newColor.Z *= 1f + num2; + break; + case 185: + case 186: + float num3 = 0.3f; + newColor.X *= 1f + num3; + newColor.Y *= 1f + num3; + newColor.Z *= 1f + num3; + break; + case 204: + float num4 = (float) (0.300000011920929 + (double) Main.mouseTextColor / 300.0); + newColor.X *= 1.3f * num4; + break; + case 211: + float num5 = (float) (0.300000011920929 + (double) Main.mouseTextColor / 300.0); + newColor.Y *= 1.5f * num5; + newColor.Z *= 1.1f * num5; + break; + case 262: + case 263: + case 264: + case 265: + case 266: + case 267: + case 268: + newColor.X += 0.39f; + newColor.Y += 0.39f; + newColor.Z += 0.39f; + break; + default: + newColor.X *= 1f + num1; + newColor.Y *= 1f + num1; + newColor.Z *= 1f + num1; + break; + } + } + + private void DrawTileEntities(bool solidLayer, bool overRenderTargets, bool intoRenderTargets) => this.TilesRenderer.PostDrawTiles(solidLayer, overRenderTargets, intoRenderTargets); + + public void ClearCachedTileDraws() + { + this.TilesRenderer.ClearCachedTileDraws(false); + this.TilesRenderer.ClearCachedTileDraws(true); + } + + public static bool IsTileSpelunkable(Tile t) => Main.IsTileSpelunkable(t.type, t.frameX, t.frameY); + + public static bool IsTileSpelunkable(ushort typeCache, short tileFrameX, short tileFrameY) => Main.tileSpelunker[(int) typeCache] || typeCache == (ushort) 185 && tileFrameY == (short) 18 && tileFrameX >= (short) 576 && tileFrameX <= (short) 882 || typeCache == (ushort) 186 && tileFrameX >= (short) 864 && tileFrameX <= (short) 1170; + + protected void DrawTiles( + bool solidLayer, + bool forRenderTargets, + bool intoRenderTargets, + int waterStyleOverride = -1) + { + this.TilesRenderer.Draw(solidLayer, forRenderTargets, intoRenderTargets, waterStyleOverride); + } + + protected void DrawGoreBehind() + { + for (int index = 0; index < 600; ++index) + { + if (Main.gore[index].active && Main.gore[index].type > 0) + { + bool flag = false; + if ((Main.gore[index].type >= 706 && Main.gore[index].type <= 717 || Main.gore[index].type == 943 || Main.gore[index].type == 1147 || Main.gore[index].type >= 1160 && Main.gore[index].type <= 1162) && (Main.gore[index].frame < (byte) 7 || Main.gore[index].frame > (byte) 9)) + flag = true; + if (flag) + { + this.LoadGore(Main.gore[index].type); + if (Main.gore[index].Frame.ColumnCount > (byte) 1 || Main.gore[index].Frame.RowCount > (byte) 1) + { + Microsoft.Xna.Framework.Rectangle sourceRectangle = Main.gore[index].Frame.GetSourceRectangle(TextureAssets.Gore[Main.gore[index].type].Value); + Microsoft.Xna.Framework.Color alpha = Main.gore[index].GetAlpha(Lighting.GetColor((int) ((double) Main.gore[index].position.X + (double) sourceRectangle.Width * 0.5) / 16, (int) (((double) Main.gore[index].position.Y + (double) sourceRectangle.Height * 0.5) / 16.0))); + Main.spriteBatch.Draw(TextureAssets.Gore[Main.gore[index].type].Value, new Vector2(Main.gore[index].position.X - Main.screenPosition.X + (float) (sourceRectangle.Width / 2), (float) ((double) Main.gore[index].position.Y - (double) Main.screenPosition.Y + (double) (sourceRectangle.Height / 2) - 2.0)), new Microsoft.Xna.Framework.Rectangle?(sourceRectangle), alpha, Main.gore[index].rotation, new Vector2((float) (sourceRectangle.Width / 2), (float) (sourceRectangle.Height / 2)), Main.gore[index].scale, SpriteEffects.None, 0.0f); + } + else + { + Microsoft.Xna.Framework.Color alpha = Main.gore[index].GetAlpha(Lighting.GetColor((int) ((double) Main.gore[index].position.X + (double) TextureAssets.Gore[Main.gore[index].type].Width() * 0.5) / 16, (int) (((double) Main.gore[index].position.Y + (double) TextureAssets.Gore[Main.gore[index].type].Height() * 0.5) / 16.0))); + Main.spriteBatch.Draw(TextureAssets.Gore[Main.gore[index].type].Value, new Vector2(Main.gore[index].position.X - Main.screenPosition.X + (float) (TextureAssets.Gore[Main.gore[index].type].Width() / 2), Main.gore[index].position.Y - Main.screenPosition.Y + (float) (TextureAssets.Gore[Main.gore[index].type].Height() / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Gore[Main.gore[index].type].Width(), TextureAssets.Gore[Main.gore[index].type].Height())), alpha, Main.gore[index].rotation, new Vector2((float) (TextureAssets.Gore[Main.gore[index].type].Width() / 2), (float) (TextureAssets.Gore[Main.gore[index].type].Height() / 2)), Main.gore[index].scale, SpriteEffects.None, 0.0f); + } + } + } + } + } + + protected void DrawGore() + { + Main.drawBackGore = false; + for (int index = 0; index < 600; ++index) + { + if (Main.gore[index].active && Main.gore[index].type > 0) + { + if ((Main.gore[index].type >= 706 && Main.gore[index].type <= 717 || Main.gore[index].type == 943 || Main.gore[index].type == 1147 || Main.gore[index].type >= 1160 && Main.gore[index].type <= 1162) && (Main.gore[index].frame < (byte) 7 || Main.gore[index].frame > (byte) 9)) + { + Main.drawBackGore = true; + } + else + { + this.LoadGore(Main.gore[index].type); + if (Main.gore[index].Frame.ColumnCount > (byte) 1 || Main.gore[index].Frame.RowCount > (byte) 1) + { + Microsoft.Xna.Framework.Rectangle sourceRectangle = Main.gore[index].Frame.GetSourceRectangle(TextureAssets.Gore[Main.gore[index].type].Value); + Vector2 vector2 = new Vector2(0.0f, 0.0f); + if (Main.gore[index].type == 1217) + vector2.Y += 4f; + Microsoft.Xna.Framework.Color alpha = Main.gore[index].GetAlpha(Lighting.GetColor((int) ((double) Main.gore[index].position.X + (double) sourceRectangle.Width * 0.5) / 16, (int) (((double) Main.gore[index].position.Y + (double) sourceRectangle.Height * 0.5) / 16.0))); + Main.spriteBatch.Draw(TextureAssets.Gore[Main.gore[index].type].Value, new Vector2(Main.gore[index].position.X - Main.screenPosition.X + (float) (sourceRectangle.Width / 2), (float) ((double) Main.gore[index].position.Y - (double) Main.screenPosition.Y + (double) (sourceRectangle.Height / 2) - 2.0)) + vector2, new Microsoft.Xna.Framework.Rectangle?(sourceRectangle), alpha, Main.gore[index].rotation, new Vector2((float) (sourceRectangle.Width / 2), (float) (sourceRectangle.Height / 2)), Main.gore[index].scale, SpriteEffects.None, 0.0f); + } + else + { + Microsoft.Xna.Framework.Color alpha = Main.gore[index].GetAlpha(Lighting.GetColor((int) ((double) Main.gore[index].position.X + (double) TextureAssets.Gore[Main.gore[index].type].Width() * 0.5) / 16, (int) (((double) Main.gore[index].position.Y + (double) TextureAssets.Gore[Main.gore[index].type].Height() * 0.5) / 16.0))); + Main.spriteBatch.Draw(TextureAssets.Gore[Main.gore[index].type].Value, new Vector2(Main.gore[index].position.X - Main.screenPosition.X + (float) (TextureAssets.Gore[Main.gore[index].type].Width() / 2), Main.gore[index].position.Y - Main.screenPosition.Y + (float) (TextureAssets.Gore[Main.gore[index].type].Height() / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Gore[Main.gore[index].type].Width(), TextureAssets.Gore[Main.gore[index].type].Height())), alpha, Main.gore[index].rotation, new Vector2((float) (TextureAssets.Gore[Main.gore[index].type].Width() / 2), (float) (TextureAssets.Gore[Main.gore[index].type].Height() / 2)), Main.gore[index].scale, SpriteEffects.None, 0.0f); + } + } + } + } + TimeLogger.DetailedDrawTime(24); + } + + public void DrawHealthBar( + float X, + float Y, + int Health, + int MaxHealth, + float alpha, + float scale = 1f, + bool noFlip = false) + { + if (Health <= 0) + return; + float num1 = (float) Health / (float) MaxHealth; + if ((double) num1 > 1.0) + num1 = 1f; + int num2 = (int) (36.0 * (double) num1); + float num3 = X - 18f * scale; + float num4 = Y; + if ((double) Main.player[Main.myPlayer].gravDir == -1.0 && !noFlip) + { + float num5 = num4 - Main.screenPosition.Y; + num4 = Main.screenPosition.Y + (float) Main.screenHeight - num5; + } + float num6 = 0.0f; + float maxValue = (float) byte.MaxValue; + float num7 = num1 - 0.1f; + float num8; + float num9; + if ((double) num7 > 0.5) + { + num8 = (float) byte.MaxValue; + num9 = (float) ((double) byte.MaxValue * (1.0 - (double) num7) * 2.0); + } + else + { + num8 = (float) ((double) byte.MaxValue * (double) num7 * 2.0); + num9 = (float) byte.MaxValue; + } + float num10 = 0.95f; + float num11 = num9 * alpha * num10; + float num12 = num8 * alpha * num10; + float num13 = maxValue * alpha * num10; + if ((double) num11 < 0.0) + num11 = 0.0f; + if ((double) num11 > (double) byte.MaxValue) + num11 = (float) byte.MaxValue; + if ((double) num12 < 0.0) + num12 = 0.0f; + if ((double) num12 > (double) byte.MaxValue) + num12 = (float) byte.MaxValue; + if ((double) num13 < 0.0) + num13 = 0.0f; + if ((double) num13 > (double) byte.MaxValue) + num13 = (float) byte.MaxValue; + Microsoft.Xna.Framework.Color color = new Microsoft.Xna.Framework.Color((int) (byte) num11, (int) (byte) num12, (int) (byte) num6, (int) (byte) num13); + if (num2 < 3) + num2 = 3; + if (num2 < 34) + { + if (num2 < 36) + Main.spriteBatch.Draw(TextureAssets.Hb2.Value, new Vector2((float) ((double) num3 - (double) Main.screenPosition.X + (double) num2 * (double) scale), num4 - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(2, 0, 2, TextureAssets.Hb2.Height())), color, 0.0f, new Vector2(0.0f, 0.0f), scale, SpriteEffects.None, 0.0f); + if (num2 < 34) + Main.spriteBatch.Draw(TextureAssets.Hb2.Value, new Vector2((float) ((double) num3 - (double) Main.screenPosition.X + (double) (num2 + 2) * (double) scale), num4 - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(num2 + 2, 0, 36 - num2 - 2, TextureAssets.Hb2.Height())), color, 0.0f, new Vector2(0.0f, 0.0f), scale, SpriteEffects.None, 0.0f); + if (num2 > 2) + Main.spriteBatch.Draw(TextureAssets.Hb1.Value, new Vector2(num3 - Main.screenPosition.X, num4 - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, num2 - 2, TextureAssets.Hb1.Height())), color, 0.0f, new Vector2(0.0f, 0.0f), scale, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.Hb1.Value, new Vector2((float) ((double) num3 - (double) Main.screenPosition.X + (double) (num2 - 2) * (double) scale), num4 - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(32, 0, 2, TextureAssets.Hb1.Height())), color, 0.0f, new Vector2(0.0f, 0.0f), scale, SpriteEffects.None, 0.0f); + } + else + { + if (num2 < 36) + Main.spriteBatch.Draw(TextureAssets.Hb2.Value, new Vector2((float) ((double) num3 - (double) Main.screenPosition.X + (double) num2 * (double) scale), num4 - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(num2, 0, 36 - num2, TextureAssets.Hb2.Height())), color, 0.0f, new Vector2(0.0f, 0.0f), scale, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.Hb1.Value, new Vector2(num3 - Main.screenPosition.X, num4 - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, num2, TextureAssets.Hb1.Height())), color, 0.0f, new Vector2(0.0f, 0.0f), scale, SpriteEffects.None, 0.0f); + } + } + + public static float NPCAddHeight(NPC theNPC) + { + float num = 0.0f; + if (theNPC.type == 125) + num = 30f; + else if (theNPC.type == 54) + num = 2f; + else if (theNPC.type == 205) + num = 8f; + else if (theNPC.type == 182) + num = 24f; + else if (theNPC.type == 178) + num = 2f; + else if (theNPC.type == 126) + num = 30f; + else if (theNPC.type == 6 || theNPC.type == 173) + num = 26f; + else if (theNPC.type == 94) + num = 14f; + else if (theNPC.type == 7 || theNPC.type == 8 || theNPC.type == 9) + num = 13f; + else if (theNPC.type == 98 || theNPC.type == 99 || theNPC.type == 100) + num = 13f; + else if (theNPC.type == 95 || theNPC.type == 96 || theNPC.type == 97) + num = 13f; + else if (theNPC.type == 10 || theNPC.type == 11 || theNPC.type == 12) + num = 8f; + else if (theNPC.type == 13 || theNPC.type == 14 || theNPC.type == 15) + num = 26f; + else if (theNPC.type == 175) + num = 4f; + else if (theNPC.type == 520) + num = 2f; + else if (theNPC.type >= 412 && theNPC.type <= 414) + num = 18f; + else if (theNPC.type == 48) + num = 32f; + else if (theNPC.type == 49 || theNPC.type == 51) + num = 4f; + else if (theNPC.type == 60) + num = 10f; + else if (theNPC.type == 62 || theNPC.type == 66 || theNPC.type == 156) + num = 14f; + else if (theNPC.type == 63 || theNPC.type == 64 || theNPC.type == 103) + num = 4f; + else if (theNPC.type == 65) + num = 5f; + else if (theNPC.type == 69) + num = 4f; + else if (theNPC.type == 70) + num = -4f; + else if (theNPC.type == 72) + num = -2f; + else if (theNPC.type == 83 || theNPC.type == 84) + num = 20f; + else if (theNPC.type == 150 || theNPC.type == 151 || theNPC.type == 158) + num = 10f; + else if (theNPC.type == 152) + num = 6f; + else if (theNPC.type == 153 || theNPC.type == 154) + num = 2f; + else if (theNPC.type == 165 || theNPC.type == 237 || theNPC.type == 238 || theNPC.type == 240 || theNPC.type == 531) + num = 10f; + else if (theNPC.type == 39 || theNPC.type == 40 || theNPC.type == 41) + num = 26f; + else if (theNPC.type >= 87 && theNPC.type <= 92) + num = 56f; + else if (theNPC.type >= 134 && theNPC.type <= 136) + num = 30f; + else if (theNPC.type == 169) + num = 8f; + else if (theNPC.type == 174) + num = 6f; + else if (theNPC.type == 369) + num = 2f; + else if (theNPC.type == 376) + num = 6f; + else if (theNPC.type == 579) + num = -2f; + else if (theNPC.type == 613 || theNPC.type == 612) + num = 2f; + switch (theNPC.type) + { + case 269: + case 270: + case 271: + case 274: + case 277: + num -= 2f; + break; + } + if (theNPC.townNPC && (double) theNPC.ai[0] == 5.0) + { + num -= 4f; + if (theNPC.type == 637 || theNPC.type == 656) + num -= 10f; + } + return num * theNPC.scale; + } + + protected void DrawProjectiles() + { + PlayerInput.SetZoom_MouseInWorld(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + int num = 0; + Main.CurrentDrawnEntity = (Entity) null; + Main.CurrentDrawnEntityShader = 0; + if (Main.ignoreErrors) + { + for (int i = 0; i < 1000; ++i) + { + if (Main.projectile[i].active && Main.projectile[i].type > 0 && !Main.projectile[i].hide) + { + ++num; + try + { + this.DrawProj(i); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + Main.projectile[i].active = false; + } + } + } + } + else + { + for (int i = 0; i < 1000; ++i) + { + if (Main.projectile[i].active && Main.projectile[i].type > 0 && !Main.projectile[i].hide) + this.DrawProj(i); + } + } + Main.CurrentDrawnEntity = (Entity) null; + Main.CurrentDrawnEntityShader = 0; + Main.spriteBatch.End(); + TimeLogger.DetailedDrawTime(20); + } + + public static int GetProjectileDesiredShader(int i) + { + int num = 0; + if (Main.projectile[i].minion && Main.projectile[i].owner != (int) byte.MaxValue) + num = Main.player[Main.projectile[i].owner].cMinion; + if (Main.projHook[Main.projectile[i].type] && Main.projectile[i].owner != (int) byte.MaxValue) + num = Main.player[Main.projectile[i].owner].cGrapple; + if (Main.projPet[Main.projectile[i].type] && !Main.projectile[i].minion && Main.projectile[i].owner != (int) byte.MaxValue && Main.projectile[i].damage == 0 && !ProjectileID.Sets.LightPet[Main.projectile[i].type]) + num = Main.player[Main.projectile[i].owner].cPet; + if (!Main.projectile[i].minion && Main.projectile[i].owner != (int) byte.MaxValue && Main.projectile[i].damage == 0 && ProjectileID.Sets.LightPet[Main.projectile[i].type]) + num = Main.player[Main.projectile[i].owner].cLight; + if (Main.projectile[i].type == 623 && Main.projectile[i].owner != (int) byte.MaxValue) + num = Main.player[Main.projectile[i].owner].cPet; + return num; + } + + private void RefreshPlayerDrawOrder() + { + this._playersThatDrawBehindNPCs.Clear(); + this._playersThatDrawAfterProjectiles.Clear(); + if (Main.gameMenu) + return; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + Player player = Main.player[index]; + if (index != Main.myPlayer && player.active && !player.outOfRange) + { + if (player.isLockedToATile) + this._playersThatDrawBehindNPCs.Add(player); + else + this._playersThatDrawAfterProjectiles.Add(player); + } + } + Player localPlayer = Main.LocalPlayer; + if (localPlayer.isLockedToATile) + this._playersThatDrawBehindNPCs.Add(localPlayer); + else + this._playersThatDrawAfterProjectiles.Add(localPlayer); + } + + protected void DrawPlayers_BehindNPCs() + { + Main.PotionOfReturnRenderer.DrawPlayers(Main.Camera, this._playersThatDrawBehindNPCs.Where((Func) (p => p.PotionOfReturnOriginalUsePosition.HasValue))); + Main.PlayerRenderer.DrawPlayers(Main.Camera, (IEnumerable) this._playersThatDrawBehindNPCs); + } + + protected void DrawPlayers_AfterProjectiles() + { + Main.PotionOfReturnRenderer.DrawPlayers(Main.Camera, this._playersThatDrawAfterProjectiles.Where((Func) (p => p.PotionOfReturnOriginalUsePosition.HasValue))); + Main.PlayerRenderer.DrawPlayers(Main.Camera, (IEnumerable) this._playersThatDrawAfterProjectiles); + } + + protected void DrawElderEye( + SpriteBatch spriteBatch, + Vector2 worldPosition, + float opacity, + float scale, + int frameNumber, + Microsoft.Xna.Framework.Color passedColor) + { + Texture2D texture2D = TextureAssets.Extra[78].Value; + Vector2 origin = new Vector2(68f, 94f); + Microsoft.Xna.Framework.Rectangle rectangle = texture2D.Frame(verticalFrames: 8, frameY: frameNumber); + Vector2 position = worldPosition - Main.screenPosition; + passedColor *= opacity; + spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(rectangle), passedColor, 0.0f, origin, scale, SpriteEffects.None, 0.0f); + } + + protected void DrawNPCs(bool behindTiles = false) + { + bool flag1 = false; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) Main.screenPosition.X - 800, (int) Main.screenPosition.Y - 800, Main.screenWidth + 1600, Main.screenHeight + 1600); + for (int iNPCIndex = 199; iNPCIndex >= 0; --iNPCIndex) + { + try + { + if (Main.npc[iNPCIndex].active) + { + if (Main.npc[iNPCIndex].type > 0) + { + if (Main.npc[iNPCIndex].type < 663) + { + if (!Main.npc[iNPCIndex].hide) + { + NPC npc1 = Main.npc[iNPCIndex]; + npc1.position = npc1.position + Main.npc[iNPCIndex].netOffset; + if (Main.npc[iNPCIndex].behindTiles == behindTiles) + { + if (Main.npc[iNPCIndex].type == 125 || Main.npc[iNPCIndex].type == 126) + { + if (!flag1) + { + flag1 = true; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && iNPCIndex != index && (Main.npc[index].type == 125 || Main.npc[index].type == 126)) + { + float num1 = Main.npc[index].position.X + (float) Main.npc[index].width * 0.5f; + float num2 = Main.npc[index].position.Y + (float) Main.npc[index].height * 0.5f; + Vector2 vector2 = new Vector2(Main.npc[iNPCIndex].position.X + (float) Main.npc[iNPCIndex].width * 0.5f, Main.npc[iNPCIndex].position.Y + (float) Main.npc[iNPCIndex].height * 0.5f); + float num3 = num1 - vector2.X; + float num4 = num2 - vector2.Y; + float rotation = (float) Math.Atan2((double) num4, (double) num3) - 1.57f; + bool flag2 = true; + if (Math.Sqrt((double) num3 * (double) num3 + (double) num4 * (double) num4) > 2000.0) + flag2 = false; + while (flag2) + { + float num5 = (float) Math.Sqrt((double) num3 * (double) num3 + (double) num4 * (double) num4); + if ((double) num5 < 40.0) + { + flag2 = false; + } + else + { + float num6 = (float) TextureAssets.Chain12.Height() / num5; + float num7 = num3 * num6; + float num8 = num4 * num6; + vector2.X += num7; + vector2.Y += num8; + num3 = num1 - vector2.X; + num4 = num2 - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(TextureAssets.Chain12.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain12.Width(), TextureAssets.Chain12.Height())), color, rotation, new Vector2((float) TextureAssets.Chain12.Width() * 0.5f, (float) TextureAssets.Chain12.Height() * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + } + } + } + } + else if (Main.npc[iNPCIndex].type == 263 && Main.npc[iNPCIndex].aiStyle == 52 && NPC.plantBoss >= 0) + { + Vector2 vector2 = new Vector2(Main.npc[iNPCIndex].position.X + (float) (Main.npc[iNPCIndex].width / 2), Main.npc[iNPCIndex].position.Y + (float) (Main.npc[iNPCIndex].height / 2)); + float num9 = Main.npc[NPC.plantBoss].Center.X - vector2.X; + float num10 = Main.npc[NPC.plantBoss].Center.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num10, (double) num9) - 1.57f; + bool flag3 = true; + while (flag3) + { + int height = 16; + int num11 = 32; + float num12 = (float) Math.Sqrt((double) num9 * (double) num9 + (double) num10 * (double) num10); + if ((double) num12 < (double) num11) + { + height = (int) num12 - num11 + height; + flag3 = false; + } + float num13 = (float) height / num12; + float num14 = num9 * num13; + float num15 = num10 * num13; + vector2.X += num14; + vector2.Y += num15; + num9 = Main.npc[NPC.plantBoss].Center.X - vector2.X + Main.npc[NPC.plantBoss].netOffset.X; + num10 = Main.npc[NPC.plantBoss].Center.Y - vector2.Y + Main.npc[NPC.plantBoss].netOffset.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(TextureAssets.Chain26.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain26.Width(), height)), color, rotation, new Vector2((float) TextureAssets.Chain26.Width() * 0.5f, (float) TextureAssets.Chain26.Height() * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + else if (Main.npc[iNPCIndex].type == 264 && Main.npc[iNPCIndex].aiStyle == 53 && NPC.plantBoss >= 0) + { + int index = NPC.plantBoss; + if ((double) Main.npc[iNPCIndex].ai[3] > 0.0) + index = (int) Main.npc[iNPCIndex].ai[3] - 1; + Vector2 vector2 = new Vector2(Main.npc[iNPCIndex].position.X + (float) (Main.npc[iNPCIndex].width / 2), Main.npc[iNPCIndex].position.Y + (float) (Main.npc[iNPCIndex].height / 2)); + float num16 = Main.npc[index].Center.X - vector2.X; + float num17 = Main.npc[index].Center.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num17, (double) num16) - 1.57f; + bool flag4 = true; + while (flag4) + { + int height = 16; + int num18 = 32; + float num19 = (float) Math.Sqrt((double) num16 * (double) num16 + (double) num17 * (double) num17); + if ((double) num19 < (double) num18) + { + height = (int) num19 - num18 + height; + flag4 = false; + } + float num20 = (float) height / num19; + float num21 = num16 * num20; + float num22 = num17 * num20; + vector2.X += num21; + vector2.Y += num22; + num16 = Main.npc[index].Center.X - vector2.X + Main.npc[index].netOffset.X; + num17 = Main.npc[index].Center.Y - vector2.Y + Main.npc[index].netOffset.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(TextureAssets.Chain27.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain27.Width(), height)), color, rotation, new Vector2((float) TextureAssets.Chain27.Width() * 0.5f, (float) TextureAssets.Chain27.Height() * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + if (NPCID.Sets.MustAlwaysDraw[Main.npc[iNPCIndex].type] || rectangle.Intersects(new Microsoft.Xna.Framework.Rectangle((int) Main.npc[iNPCIndex].position.X, (int) Main.npc[iNPCIndex].position.Y, Main.npc[iNPCIndex].width, Main.npc[iNPCIndex].height))) + { + this.DrawNPCCheckAlt(Main.npc[iNPCIndex]); + this.DrawNPC(iNPCIndex, behindTiles); + } + } + NPC npc2 = Main.npc[iNPCIndex]; + npc2.position = npc2.position - Main.npc[iNPCIndex].netOffset; + } + } + } + } + } + catch + { + Main.npc[iNPCIndex].active = false; + } + } + } + + protected void DrawNPCCheckAlt(NPC n) + { + ITownNPCProfile profile; + if (!TownNPCProfiles.Instance.GetProfile(n.type, out profile)) + return; + TextureAssets.Npc[n.type] = profile.GetTextureNPCShouldUse(n); + } + + protected void DrawNPC(int iNPCIndex, bool behindTiles) + { + NPC rCurrentNPC = Main.npc[iNPCIndex]; + Vector2 screenPosition = Main.screenPosition; + this.DrawNPCDirect(Main.spriteBatch, rCurrentNPC, behindTiles, screenPosition); + } + + public void DrawNPCDirect_QueenSlimeWings( + NPC rCurrentNPC, + SpriteBatch mySpriteBatch, + Vector2 screenPos, + Vector2 drawCenter, + Microsoft.Xna.Framework.Color originColor) + { + Texture2D texture2D = TextureAssets.Extra[185].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 4, frameY: ((int) rCurrentNPC.localAI[3] / 6)); + float scale = 0.8f; + for (int index = 0; index < 2; ++index) + { + float x = 1f; + float num1 = 0.0f; + SpriteEffects effects = SpriteEffects.None; + if (index == 1) + { + x = 0.0f; + num1 = (float) (-(double) num1 + 2.0); + effects = SpriteEffects.FlipHorizontally; + } + Vector2 origin = r.Size() * new Vector2(x, 0.5f); + Vector2 vector2 = new Vector2(drawCenter.X + num1, drawCenter.Y); + if ((double) rCurrentNPC.rotation != 0.0) + vector2 = vector2.RotatedBy((double) rCurrentNPC.rotation, rCurrentNPC.Bottom); + vector2 -= screenPos; + float num2 = MathHelper.Clamp(rCurrentNPC.velocity.Y, -6f, 6f) * -0.1f; + if (index == 0) + num2 *= -1f; + mySpriteBatch.Draw(texture2D, vector2, new Microsoft.Xna.Framework.Rectangle?(r), originColor, rCurrentNPC.rotation + num2, origin, scale, effects, 0.0f); + } + } + + public void DrawNPCDirect( + SpriteBatch mySpriteBatch, + NPC rCurrentNPC, + bool behindTiles, + Vector2 screenPos) + { + int type = rCurrentNPC.type; + rCurrentNPC.SetFrameSize(); + Vector3 vector3; + if (rCurrentNPC.realLife == -1 && rCurrentNPC.life >= rCurrentNPC.lifeMax && !rCurrentNPC.boss) + { + vector3 = Lighting.GetColor((int) ((double) rCurrentNPC.position.X + (double) rCurrentNPC.width * 0.5) / 16, (int) (((double) rCurrentNPC.position.Y + (double) rCurrentNPC.height * 0.5) / 16.0)).ToVector3(); + bool flag1 = (double) vector3.Length() > 0.432500004768372; + bool flag2 = false; + if (LockOnHelper.AimedTarget == rCurrentNPC) + flag2 = true; + else if ((double) rCurrentNPC.Distance(Main.player[Main.myPlayer].Center) < 350.0 & flag1) + flag2 = true; + if (flag2 && rCurrentNPC.lifeMax < 5) + flag2 = false; + if (flag2 && rCurrentNPC.aiStyle == 25 && (double) rCurrentNPC.ai[0] == 0.0) + flag2 = false; + rCurrentNPC.nameOver = !flag2 ? MathHelper.Clamp(rCurrentNPC.nameOver - 0.025f, 0.0f, 1f) : MathHelper.Clamp(rCurrentNPC.nameOver + 0.025f, 0.0f, 1f); + } + else + rCurrentNPC.nameOver = MathHelper.Clamp(rCurrentNPC.nameOver - 0.025f, 0.0f, 1f); + if (type == 1 && (double) rCurrentNPC.ai[0] == -999.0) + return; + if (type == 101) + { + bool flag3 = true; + Vector2 vector2 = new Vector2(rCurrentNPC.position.X + (float) (rCurrentNPC.width / 2), rCurrentNPC.position.Y + (float) (rCurrentNPC.height / 2)); + float num1 = (float) ((double) rCurrentNPC.ai[0] * 16.0 + 8.0) - vector2.X; + float num2 = (float) ((double) rCurrentNPC.ai[1] * 16.0 + 8.0) - vector2.Y; + float rotation = (float) Math.Atan2((double) num2, (double) num1) - 1.57f; + bool flag4 = true; + while (flag4) + { + float scale = 0.75f; + int height = 28; + float num3 = (float) Math.Sqrt((double) num1 * (double) num1 + (double) num2 * (double) num2); + if ((double) num3 < 28.0 * (double) scale) + { + height = (int) num3 - 40 + 28; + flag4 = false; + } + float num4 = 20f * scale / num3; + float num5 = num1 * num4; + float num6 = num2 * num4; + vector2.X += num5; + vector2.Y += num6; + num1 = (float) ((double) rCurrentNPC.ai[0] * 16.0 + 8.0) - vector2.X; + num2 = (float) ((double) rCurrentNPC.ai[1] * 16.0 + 8.0) - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + if (rCurrentNPC.IsABestiaryIconDummy) + color = rCurrentNPC.GetBestiaryEntryColor(); + if (!flag3) + { + flag3 = true; + mySpriteBatch.Draw(TextureAssets.Chain10.Value, new Vector2(vector2.X - screenPos.X, vector2.Y - screenPos.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain10.Width(), height)), color, rotation, new Vector2((float) TextureAssets.Chain10.Width() * 0.5f, (float) TextureAssets.Chain10.Height() * 0.5f), scale, SpriteEffects.None, 0.0f); + } + else + { + flag3 = false; + mySpriteBatch.Draw(TextureAssets.Chain11.Value, new Vector2(vector2.X - screenPos.X, vector2.Y - screenPos.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain10.Width(), height)), color, rotation, new Vector2((float) TextureAssets.Chain10.Width() * 0.5f, (float) TextureAssets.Chain10.Height() * 0.5f), scale, SpriteEffects.None, 0.0f); + } + } + } + else if (rCurrentNPC.aiStyle == 13) + { + Vector2 vector2 = new Vector2(rCurrentNPC.position.X + (float) (rCurrentNPC.width / 2), rCurrentNPC.position.Y + (float) (rCurrentNPC.height / 2)); + float num7 = (float) ((double) rCurrentNPC.ai[0] * 16.0 + 8.0) - vector2.X; + float num8 = (float) ((double) rCurrentNPC.ai[1] * 16.0 + 8.0) - vector2.Y; + float rotation = (float) Math.Atan2((double) num8, (double) num7) - 1.57f; + bool flag = true; + while (flag) + { + int height = 28; + int num9 = 40; + if (type == 259 || type == 260) + { + num9 = 20; + height = 12; + } + float num10 = (float) Math.Sqrt((double) num7 * (double) num7 + (double) num8 * (double) num8); + if ((double) num10 < (double) num9) + { + height = (int) num10 - num9 + height; + flag = false; + } + float num11 = (float) height / num10; + float num12 = num7 * num11; + float num13 = num8 * num11; + vector2.X += num12; + vector2.Y += num13; + num7 = (float) ((double) rCurrentNPC.ai[0] * 16.0 + 8.0) - vector2.X; + num8 = (float) ((double) rCurrentNPC.ai[1] * 16.0 + 8.0) - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + if (rCurrentNPC.IsABestiaryIconDummy) + color = rCurrentNPC.GetBestiaryEntryColor(); + if (type == 259 || type == 260) + { + color.B = byte.MaxValue; + if (color.R < (byte) 100) + color.R = (byte) 100; + if (color.G < (byte) 150) + color.G = (byte) 150; + } + switch (type) + { + case 56: + mySpriteBatch.Draw(TextureAssets.Chain5.Value, new Vector2(vector2.X - screenPos.X, vector2.Y - screenPos.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain4.Width(), height)), color, rotation, new Vector2((float) TextureAssets.Chain4.Width() * 0.5f, (float) TextureAssets.Chain4.Height() * 0.5f), 1f, SpriteEffects.None, 0.0f); + continue; + case 175: + mySpriteBatch.Draw(TextureAssets.Chain14.Value, new Vector2(vector2.X - screenPos.X, vector2.Y - screenPos.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain14.Width(), height)), color, rotation, new Vector2((float) TextureAssets.Chain14.Width() * 0.5f, (float) TextureAssets.Chain14.Height() * 0.5f), 1f, SpriteEffects.None, 0.0f); + continue; + case 259: + mySpriteBatch.Draw(TextureAssets.Chain24.Value, new Vector2(vector2.X - screenPos.X, vector2.Y - screenPos.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain24.Width(), height)), color, rotation, new Vector2((float) TextureAssets.Chain24.Width() * 0.5f, (float) TextureAssets.Chain24.Height() * 0.5f), 1f, SpriteEffects.None, 0.0f); + continue; + case 260: + mySpriteBatch.Draw(TextureAssets.Chain25.Value, new Vector2(vector2.X - screenPos.X, vector2.Y - screenPos.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain25.Width(), height)), color, rotation, new Vector2((float) TextureAssets.Chain25.Width() * 0.5f, (float) TextureAssets.Chain25.Height() * 0.5f), 1f, SpriteEffects.None, 0.0f); + continue; + default: + mySpriteBatch.Draw(TextureAssets.Chain4.Value, new Vector2(vector2.X - screenPos.X, vector2.Y - screenPos.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain4.Width(), height)), color, rotation, new Vector2((float) TextureAssets.Chain4.Width() * 0.5f, (float) TextureAssets.Chain4.Height() * 0.5f), 1f, SpriteEffects.None, 0.0f); + continue; + } + } + } + if (type == 327) + { + float rotation = 0.0f; + Vector2 vector2 = new Vector2(rCurrentNPC.Center.X, rCurrentNPC.Center.Y + 80f); + int num = (int) rCurrentNPC.localAI[1]; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + mySpriteBatch.Draw(TextureAssets.PumpkingCloak.Value, new Vector2(vector2.X - screenPos.X, vector2.Y - screenPos.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, TextureAssets.PumpkingCloak.Height() / 5 * num, TextureAssets.PumpkingCloak.Width(), TextureAssets.PumpkingCloak.Height() / 5)), color, rotation, new Vector2((float) TextureAssets.PumpkingCloak.Width() * 0.5f, (float) ((double) TextureAssets.PumpkingCloak.Height() * 0.5 / 5.0)), 1f, SpriteEffects.None, 0.0f); + } + if (type == 328) + { + Vector2 vector2 = new Vector2((float) ((double) rCurrentNPC.position.X + (double) rCurrentNPC.width * 0.5 - 5.0 * (double) rCurrentNPC.ai[0]), rCurrentNPC.position.Y + 20f); + for (int index = 0; index < 2; ++index) + { + float num14 = Main.npc[(int) rCurrentNPC.ai[1]].position.X + (float) (Main.npc[(int) rCurrentNPC.ai[1]].width / 2) - vector2.X; + float num15 = (float) ((double) Main.npc[(int) rCurrentNPC.ai[1]].position.Y + (double) (Main.npc[(int) rCurrentNPC.ai[1]].height / 2) - 30.0) - vector2.Y; + float num16; + float num17; + float num18; + if (index == 0) + { + num16 = num14 - 200f * rCurrentNPC.ai[0]; + num17 = num15 + 130f; + num18 = 92f / (float) Math.Sqrt((double) num16 * (double) num16 + (double) num17 * (double) num17); + vector2.X += num16 * num18; + vector2.Y += num17 * num18; + } + else + { + num16 = num14 - 50f * rCurrentNPC.ai[0]; + num17 = num15 + 80f; + num18 = 60f / (float) Math.Sqrt((double) num16 * (double) num16 + (double) num17 * (double) num17); + vector2.X += num16 * num18; + vector2.Y += num17 * num18; + } + float rotation = (float) Math.Atan2((double) num17, (double) num16) - 1.57f; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + mySpriteBatch.Draw(TextureAssets.PumpkingArm.Value, new Vector2(vector2.X - screenPos.X, vector2.Y - screenPos.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.PumpkingArm.Width(), TextureAssets.PumpkingArm.Height())), color, rotation, new Vector2((float) TextureAssets.PumpkingArm.Width() * 0.5f, (float) TextureAssets.PumpkingArm.Height() * 0.5f), 1f, SpriteEffects.None, 0.0f); + if (index == 0) + { + vector2.X += (float) ((double) num16 * (double) num18 / 2.0); + vector2.Y += (float) ((double) num17 * (double) num18 / 2.0); + } + } + } + if (type == 36) + { + Vector2 vector2 = new Vector2((float) ((double) rCurrentNPC.position.X + (double) rCurrentNPC.width * 0.5 - 5.0 * (double) rCurrentNPC.ai[0]), rCurrentNPC.position.Y + 20f); + for (int index1 = 0; index1 < 2; ++index1) + { + float num19 = Main.npc[(int) rCurrentNPC.ai[1]].position.X + (float) (Main.npc[(int) rCurrentNPC.ai[1]].width / 2) - vector2.X; + float num20 = Main.npc[(int) rCurrentNPC.ai[1]].position.Y + (float) (Main.npc[(int) rCurrentNPC.ai[1]].height / 2) - vector2.Y; + float num21; + float num22; + float num23; + if (index1 == 0) + { + num21 = num19 - 200f * rCurrentNPC.ai[0]; + num22 = num20 + 130f; + num23 = 92f / (float) Math.Sqrt((double) num21 * (double) num21 + (double) num22 * (double) num22); + vector2.X += num21 * num23; + vector2.Y += num22 * num23; + } + else + { + num21 = num19 - 50f * rCurrentNPC.ai[0]; + num22 = num20 + 80f; + num23 = 60f / (float) Math.Sqrt((double) num21 * (double) num21 + (double) num22 * (double) num22); + vector2.X += num21 * num23; + vector2.Y += num22 * num23; + } + float rotation = (float) Math.Atan2((double) num22, (double) num21) - 1.57f; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + mySpriteBatch.Draw(TextureAssets.BoneArm.Value, new Vector2(vector2.X - screenPos.X, vector2.Y - screenPos.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.BoneArm.Width(), TextureAssets.BoneArm.Height())), color, rotation, new Vector2((float) TextureAssets.BoneArm.Width() * 0.5f, (float) TextureAssets.BoneArm.Height() * 0.5f), 1f, SpriteEffects.None, 0.0f); + if (index1 == 0) + { + vector2.X += (float) ((double) num21 * (double) num23 / 2.0); + vector2.Y += (float) ((double) num22 * (double) num23 / 2.0); + } + else if (this.IsActive) + { + vector2.X += (float) ((double) num21 * (double) num23 - 16.0); + vector2.Y += (float) ((double) num22 * (double) num23 - 6.0); + int index2 = Dust.NewDust(new Vector2(vector2.X, vector2.Y), 30, 10, 5, num21 * 0.02f, num22 * 0.02f, Scale: 2f); + Main.dust[index2].noGravity = true; + } + } + } + if (rCurrentNPC.aiStyle == 47) + { + float scale = 1f; + Vector2 vector2 = new Vector2(rCurrentNPC.Center.X, rCurrentNPC.Center.Y); + Vector2 center = rCurrentNPC.Center; + if (NPC.golemBoss != -1) + center = Main.npc[NPC.golemBoss].Center; + float num24 = center.X - vector2.X; + float num25 = center.Y - vector2.Y - 7f; + float num26 = type != 247 ? num24 + 66f : num24 - 70f; + if (Main.getGoodWorld) + { + if (type == 247) + num26 += 40f; + else + num26 -= 40f; + scale = 0.5f; + } + float rotation = (float) Math.Atan2((double) num25, (double) num26) - 1.57f; + bool flag = true; + while (flag) + { + float num27 = (float) Math.Sqrt((double) num26 * (double) num26 + (double) num25 * (double) num25); + if ((double) num27 < 16.0) + { + flag = false; + } + else + { + float num28 = 16f * scale / num27; + float num29 = num26 * num28; + float num30 = num25 * num28; + vector2.X += num29; + vector2.Y += num30; + float num31 = center.X - vector2.X; + num25 = center.Y - vector2.Y - 7f; + num26 = type != 247 ? num31 + 66f : num31 - 70f; + if (Main.getGoodWorld) + { + num25 += 8f; + if (type == 247) + num26 += 40f; + else + num26 -= 40f; + scale = 0.5f; + } + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + mySpriteBatch.Draw(TextureAssets.Chain21.Value, new Vector2(vector2.X - screenPos.X, vector2.Y - screenPos.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain21.Width(), TextureAssets.Chain21.Height())), color, rotation, new Vector2((float) TextureAssets.Chain21.Width() * 0.5f, (float) TextureAssets.Chain21.Height() * 0.5f), scale, SpriteEffects.None, 0.0f); + } + } + } + if (rCurrentNPC.aiStyle >= 33 && rCurrentNPC.aiStyle <= 36) + { + Vector2 vector2 = new Vector2((float) ((double) rCurrentNPC.position.X + (double) rCurrentNPC.width * 0.5 - 5.0 * (double) rCurrentNPC.ai[0]), rCurrentNPC.position.Y + 20f); + for (int index3 = 0; index3 < 2; ++index3) + { + float num32 = Main.npc[(int) rCurrentNPC.ai[1]].position.X + (float) (Main.npc[(int) rCurrentNPC.ai[1]].width / 2) - vector2.X; + float num33 = Main.npc[(int) rCurrentNPC.ai[1]].position.Y + (float) (Main.npc[(int) rCurrentNPC.ai[1]].height / 2) - vector2.Y; + float num34; + float num35; + float num36; + if (index3 == 0) + { + num34 = num32 - 200f * rCurrentNPC.ai[0]; + num35 = num33 + 130f; + num36 = 92f / (float) Math.Sqrt((double) num34 * (double) num34 + (double) num35 * (double) num35); + vector2.X += num34 * num36; + vector2.Y += num35 * num36; + } + else + { + num34 = num32 - 50f * rCurrentNPC.ai[0]; + num35 = num33 + 80f; + num36 = 60f / (float) Math.Sqrt((double) num34 * (double) num34 + (double) num35 * (double) num35); + vector2.X += num34 * num36; + vector2.Y += num35 * num36; + } + float rotation = (float) Math.Atan2((double) num35, (double) num34) - 1.57f; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + mySpriteBatch.Draw(TextureAssets.BoneArm2.Value, new Vector2(vector2.X - screenPos.X, vector2.Y - screenPos.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.BoneArm.Width(), TextureAssets.BoneArm.Height())), color, rotation, new Vector2((float) TextureAssets.BoneArm.Width() * 0.5f, (float) TextureAssets.BoneArm.Height() * 0.5f), 1f, SpriteEffects.None, 0.0f); + if (index3 == 0) + { + vector2.X += (float) ((double) num34 * (double) num36 / 2.0); + vector2.Y += (float) ((double) num35 * (double) num36 / 2.0); + } + else if (this.IsActive) + { + vector2.X += (float) ((double) num34 * (double) num36 - 16.0); + vector2.Y += (float) ((double) num35 * (double) num36 - 6.0); + int index4 = Dust.NewDust(new Vector2(vector2.X, vector2.Y), 30, 10, 6, num34 * 0.02f, num35 * 0.02f, Scale: 2.5f); + Main.dust[index4].noGravity = true; + } + } + } + if (rCurrentNPC.aiStyle == 20) + { + Vector2 vector2 = new Vector2(rCurrentNPC.position.X + (float) (rCurrentNPC.width / 2), rCurrentNPC.position.Y + (float) (rCurrentNPC.height / 2)); + float num37 = rCurrentNPC.ai[1] - vector2.X; + float num38 = rCurrentNPC.ai[2] - vector2.Y; + float rotation = (float) Math.Atan2((double) num38, (double) num37) - 1.57f; + rCurrentNPC.rotation = rotation; + bool flag = true; + while (flag) + { + int height = 12; + float num39 = (float) Math.Sqrt((double) num37 * (double) num37 + (double) num38 * (double) num38); + if ((double) num39 < 20.0) + { + height = (int) num39 - 20 + 12; + flag = false; + } + float num40 = 12f / num39; + float num41 = num37 * num40; + float num42 = num38 * num40; + vector2.X += num41; + vector2.Y += num42; + num37 = rCurrentNPC.ai[1] - vector2.X; + num38 = rCurrentNPC.ai[2] - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + mySpriteBatch.Draw(TextureAssets.Chain.Value, new Vector2(vector2.X - screenPos.X, vector2.Y - screenPos.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain.Width(), height)), color, rotation, new Vector2((float) TextureAssets.Chain.Width() * 0.5f, (float) TextureAssets.Chain.Height() * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + mySpriteBatch.Draw(TextureAssets.SpikeBase.Value, new Vector2(rCurrentNPC.ai[1] - screenPos.X, rCurrentNPC.ai[2] - screenPos.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.SpikeBase.Width(), TextureAssets.SpikeBase.Height())), Lighting.GetColor((int) rCurrentNPC.ai[1] / 16, (int) ((double) rCurrentNPC.ai[2] / 16.0)), rotation - 0.75f, new Vector2((float) TextureAssets.SpikeBase.Width() * 0.5f, (float) TextureAssets.SpikeBase.Height() * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + Microsoft.Xna.Framework.Color npcColor1 = Lighting.GetColor((int) ((double) rCurrentNPC.position.X + (double) rCurrentNPC.width * 0.5) / 16, (int) (((double) rCurrentNPC.position.Y + (double) rCurrentNPC.height * 0.5) / 16.0)); + if (rCurrentNPC.IsABestiaryIconDummy) + npcColor1 = rCurrentNPC.GetBestiaryEntryColor(); + if (type >= 277 && type <= 280) + { + if (npcColor1.R < byte.MaxValue) + npcColor1.R = byte.MaxValue; + if (npcColor1.G < (byte) 175) + npcColor1.G = (byte) 175; + } + if (type == -4) + { + int r1 = (int) npcColor1.R; + int g1 = (int) npcColor1.G; + int b1 = (int) npcColor1.B; + int r2 = r1 * 2; + if (r2 > (int) byte.MaxValue) + r2 = (int) byte.MaxValue; + int g2 = g1 * 2; + if (g2 > (int) byte.MaxValue) + g2 = (int) byte.MaxValue; + int b2 = b1 * 2; + if (b2 > (int) byte.MaxValue) + b2 = (int) byte.MaxValue; + npcColor1 = new Microsoft.Xna.Framework.Color(r2, g2, b2); + } + if (behindTiles && type != 113 && type != 114) + { + int num43 = (int) (((double) rCurrentNPC.position.X - 8.0) / 16.0); + int num44 = (int) (((double) rCurrentNPC.position.X + (double) rCurrentNPC.width + 8.0) / 16.0); + int num45 = (int) (((double) rCurrentNPC.position.Y - 8.0) / 16.0); + int num46 = (int) (((double) rCurrentNPC.position.Y + (double) rCurrentNPC.height + 8.0) / 16.0); + for (int x = num43; x <= num44; ++x) + { + for (int y = num45; y <= num46; ++y) + { + if ((double) Lighting.Brightness(x, y) == 0.0) + npcColor1 = Microsoft.Xna.Framework.Color.Black; + } + } + } + Microsoft.Xna.Framework.Color npcColor2 = rCurrentNPC.GetNPCColorTintedByBuffs(npcColor1); + if (type == 50) + { + Vector2 zero = Vector2.Zero; + float num = 0.0f; + zero.Y -= rCurrentNPC.velocity.Y; + zero.X -= rCurrentNPC.velocity.X * 2f; + float rotation = num + rCurrentNPC.velocity.X * 0.05f; + if (rCurrentNPC.frame.Y == 120) + zero.Y += 2f; + if (rCurrentNPC.frame.Y == 360) + zero.Y -= 2f; + if (rCurrentNPC.frame.Y == 480) + zero.Y -= 6f; + mySpriteBatch.Draw(TextureAssets.Ninja.Value, new Vector2(rCurrentNPC.position.X - screenPos.X + (float) (rCurrentNPC.width / 2) + zero.X, rCurrentNPC.position.Y - screenPos.Y + (float) (rCurrentNPC.height / 2) + zero.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Ninja.Width(), TextureAssets.Ninja.Height())), npcColor2, rotation, new Vector2((float) (TextureAssets.Ninja.Width() / 2), (float) (TextureAssets.Ninja.Height() / 2)), 1f, SpriteEffects.None, 0.0f); + } + if (type == 71) + { + Vector2 zero = Vector2.Zero; + float num = 0.0f; + zero.Y -= rCurrentNPC.velocity.Y * 0.3f; + zero.X -= rCurrentNPC.velocity.X * 0.6f; + float rotation = num + rCurrentNPC.velocity.X * 0.09f; + if (rCurrentNPC.frame.Y == 120) + zero.Y += 2f; + if (rCurrentNPC.frame.Y == 360) + zero.Y -= 2f; + if (rCurrentNPC.frame.Y == 480) + zero.Y -= 6f; + Main.instance.LoadItem(327); + mySpriteBatch.Draw(TextureAssets.Item[327].Value, new Vector2(rCurrentNPC.position.X - screenPos.X + (float) (rCurrentNPC.width / 2) + zero.X, rCurrentNPC.position.Y - screenPos.Y + (float) (rCurrentNPC.height / 2) + zero.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Item[327].Width(), TextureAssets.Item[327].Height())), npcColor2, rotation, new Vector2((float) (TextureAssets.Item[327].Width() / 2), (float) (TextureAssets.Item[327].Height() / 2)), 1f, SpriteEffects.None, 0.0f); + } + if (type == 69) + mySpriteBatch.Draw(TextureAssets.AntLion.Value, new Vector2(rCurrentNPC.position.X - screenPos.X + (float) (rCurrentNPC.width / 2), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height + 14.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.AntLion.Width(), TextureAssets.AntLion.Height())), npcColor2, (float) (-(double) rCurrentNPC.rotation * 0.300000011920929), new Vector2((float) (TextureAssets.AntLion.Width() / 2), (float) (TextureAssets.AntLion.Height() / 2)), 1f, SpriteEffects.None, 0.0f); + if (type == 1 && (double) rCurrentNPC.ai[1] > 0.0) + Main.DrawNPC_SlimeItem(rCurrentNPC, type, npcColor2, 0.0f); + float addY = 0.0f; + float addHeight = Main.NPCAddHeight(rCurrentNPC); + Vector2 halfSize = new Vector2((float) (TextureAssets.Npc[type].Width() / 2), (float) (TextureAssets.Npc[type].Height() / Main.npcFrameCount[type] / 2)); + if (type == 108 || type == 124 || type == 625) + { + addY = 2f; + } + else + { + switch (type) + { + case 357: + addY = rCurrentNPC.localAI[0]; + break; + case 467: + addY = 7f; + break; + case 477: + addHeight = 22f; + break; + case 478: + addY -= 2f; + break; + case 483: + addY = 14f; + break; + case 484: + addY = 2f; + break; + case 490: + addY = 4f; + break; + case 537: + addY = 2f; + break; + case 581: + addY = -6f; + break; + case 606: + addY -= 2f; + break; + default: + if (type == 612 || type == 613) + { + addY -= 2f; + break; + } + if (type == 469 && (double) rCurrentNPC.ai[2] == 1.0) + { + addY = 14f; + break; + } + switch (type) + { + case 4: + halfSize = new Vector2(55f, 107f); + break; + case 125: + halfSize = new Vector2(55f, 107f); + break; + case 126: + halfSize = new Vector2(55f, 107f); + break; + default: + if (type == 626 || type == 627) + { + if (rCurrentNPC.wet) + { + addY = -2f; + halfSize = rCurrentNPC.frame.Size() * new Vector2(0.5f, 0.5f) + new Vector2(0.0f, -4f); + break; + } + addY = 2f; + break; + } + if (type == 63 || type == 64 || type == 103) + { + halfSize.Y += 4f; + break; + } + switch (type) + { + case 69: + halfSize.Y += 8f; + break; + case 262: + halfSize.Y = 77f; + addHeight += 26f; + break; + case 264: + halfSize.Y = 21f; + addHeight += 2f; + break; + case 266: + addHeight += 50f; + break; + case 268: + addHeight += 16f; + break; + case 288: + addHeight += 6f; + break; + } + break; + } + break; + } + } + if (rCurrentNPC.aiStyle == 10 || type == 72) + npcColor2 = Microsoft.Xna.Framework.Color.White; + SpriteEffects spriteEffects = SpriteEffects.None; + if (rCurrentNPC.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + if (type == 124 && (double) rCurrentNPC.localAI[0] == 0.0) + { + int num = 0; + if (rCurrentNPC.frame.Y > 56) + num += 4; + int index = num + rCurrentNPC.frame.Y / 56; + if (index >= Main.OffsetsPlayerHeadgear.Length) + index = 0; + float y = Main.OffsetsPlayerHeadgear[index].Y; + this.LoadProjectile(582); + Texture2D texture2D = TextureAssets.Projectile[582].Value; + Vector2 position = rCurrentNPC.Center - screenPos - new Vector2((float) texture2D.Width, (float) (texture2D.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY + y) + new Vector2((float) (-rCurrentNPC.spriteDirection * 2), -2f); + mySpriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), rCurrentNPC.GetAlpha(npcColor2), rCurrentNPC.rotation, texture2D.Size() * new Vector2(0.0f, 0.5f), rCurrentNPC.scale, spriteEffects, 0.0f); + } + if (type == 427 || type == 426 || type == 428 || type == 581 || type == 521 || type == 523 || type == 541 || type >= 542 && type <= 545 || type == 546 || type == 552 || type == 553 || type == 554 || type == 561 || type == 562 || type == 563 || type == 555 || type == 556 || type == 557 || type == 558 || type == 559 || type == 560 || type == 574 || type == 575 || type == 568 || type == 569 || type == 572 || type == 573 || type == 566 || type == 567 || type == 570 || type == 578 || type == 571 || type == 583 || type == 584 || type == 585 || type == 618 || type == 620 || type == 661) + { + Texture2D texture = TextureAssets.Npc[type].Value; + Microsoft.Xna.Framework.Color secondColor = Microsoft.Xna.Framework.Color.White; + float amount1 = 0.0f; + float amount2 = 0.0f; + int num47 = 0; + int num48 = 0; + int num49 = 1; + int num50 = 15; + int num51 = 0; + float scale1 = rCurrentNPC.scale; + float num52 = rCurrentNPC.scale; + int num53 = 0; + float t1 = 0.0f; + float num54 = 0.0f; + float num55 = 0.0f; + Microsoft.Xna.Framework.Color newColor1 = npcColor2; + Vector2 origin1 = halfSize; + switch (type) + { + case 426: + num53 = 4; + num54 = 4f; + t1 = (float) (Math.Cos((double) Main.GlobalTimeWrappedHourly % 1.20000004768372 / 1.20000004768372 * 6.28318548202515) / 2.0 + 0.5); + secondColor = Microsoft.Xna.Framework.Color.Turquoise; + amount1 = 0.5f; + num47 = 6; + num48 = 2; + num50 = num47; + break; + case 427: + num47 = 8; + num48 = 2; + num50 = num47 * 3; + break; + case 521: + num47 = 10; + num48 = 2; + num50 = num47; + num51 = 1; + num52 = 0.3f; + break; + case 523: + num53 = 3; + num54 = 10f * rCurrentNPC.scale; + amount1 = 0.5f; + amount2 = 0.8f; + secondColor = Microsoft.Xna.Framework.Color.HotPink; + secondColor.A = (byte) 128; + num55 = rCurrentNPC.localAI[0]; + t1 = rCurrentNPC.localAI[1]; + break; + case 541: + num53 = 4; + num54 = 6f; + t1 = (float) (Math.Cos((double) Main.GlobalTimeWrappedHourly % 2.40000009536743 / 2.40000009536743 * 6.28318548202515) / 2.0 + 0.5); + secondColor = Microsoft.Xna.Framework.Color.Gold; + amount1 = 0.5f; + break; + case 542: + case 543: + case 544: + case 545: + num47 = 6; + num48 = 3; + num50 = num47 * 2; + break; + case 546: + num47 = 8; + num48 = 2; + num50 = num47 * 3; + break; + case 552: + case 553: + case 554: + case 555: + case 556: + case 557: + case 561: + case 562: + case 563: + case 568: + case 569: + case 570: + case 571: + case 572: + case 573: + num47 = 0; + if (type == 561 || type == 562 || type == 563) + addHeight = -8f; + if (type == 555 || type == 556 || type == 557) + addHeight = -5f; + if (type == 572 || type == 573) + addHeight = -4f; + if (type == 570 || type == 571) + { + spriteEffects ^= SpriteEffects.FlipHorizontally; + addHeight = -2f; + } + if (type == 568 || type == 569) + { + spriteEffects ^= SpriteEffects.FlipHorizontally; + addHeight = -3f; + num53 = 4; + num54 = 4f; + t1 = (float) (Math.Cos((double) Main.GlobalTimeWrappedHourly % 1.5 / 1.5 * 6.28318548202515) / 6.0 + 0.75); + secondColor = Microsoft.Xna.Framework.Color.HotPink; + secondColor.A = (byte) 127; + amount1 = 0.5f; + } + if ((double) rCurrentNPC.localAI[3] < 60.0) + { + float num56 = rCurrentNPC.localAI[3] / 60f; + num53 = 3; + t1 = (float) (1.0 - (double) num56 * (double) num56); + num54 = 8f; + secondColor = new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue, 0, (int) byte.MaxValue, 0); + amount2 = 1f; + newColor1 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, newColor1, num56 * num56); + break; + } + break; + case 558: + case 559: + case 560: + case 574: + case 575: + if ((double) rCurrentNPC.ai[0] != 2.0) + { + num47 = 0; + break; + } + num47 = 6; + num48 = 2; + num50 = num47 * 3; + num51 = 1; + break; + case 566: + case 567: + case 578: + num47 = 0; + addHeight = -2f; + break; + case 581: + num47 = 6; + num48 = 2; + num50 = num47 * 3; + break; + case 618: + float num57 = 90f; + float num58 = 180f; + if ((double) rCurrentNPC.ai[0] == 1.0 && (double) rCurrentNPC.ai[1] < (double) num57) + { + int num59 = 3; + float num60 = num57 / (float) num59; + double num61 = (double) rCurrentNPC.ai[1] % (double) num60 / (double) num60; + num53 = 6; + num54 = 15f; + t1 = (float) (num61 * 0.800000011920929 + 0.200000002980232); + } + if ((double) rCurrentNPC.ai[0] == 3.0 && (double) rCurrentNPC.ai[1] < (double) num58) + { + int num62 = 1; + float num63 = num58 / (float) num62; + float num64 = rCurrentNPC.ai[1] % num63 / num63; + num53 = 4; + num54 = 25f; + t1 = num64; + Vector2 vector2 = rCurrentNPC.scale * new Vector2(1f, (float) (0.5 + (double) num64 * 0.75)); + Texture2D texture2D = TextureAssets.Extra[59].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(); + Vector2 origin2 = r.Size() * new Vector2(0.5f, 0.5f); + for (int index = 0; index < num53; ++index) + { + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.White * (float) ((double) Utils.GetLerpValue(0.0f, 0.5f, t1, false) * (double) Utils.GetLerpValue(1f, 0.5f, t1, false) * 0.25); + color.A = (byte) 0; + color.G = (byte) 0; + color.B = (byte) 0; + float num65 = (float) ((double) index / (double) num53 * 6.28318548202515) + rCurrentNPC.rotation + num55; + Vector2 position = rCurrentNPC.Center + num65.ToRotationVector2() * num54 * t1 - screenPos - new Vector2((float) texture.Width, (float) (texture.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)); + mySpriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), color, num65, origin2, vector2 * 1.8f, spriteEffects, 0.0f); + } + for (int index = 0; index < num53; ++index) + { + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.White * (float) ((double) Utils.GetLerpValue(0.0f, 0.5f, t1, false) * (double) Utils.GetLerpValue(1f, 0.5f, t1, false) * 0.25); + color.A = (byte) 0; + float num66 = (float) ((double) index / (double) num53 * 6.28318548202515) + rCurrentNPC.rotation + num55; + Vector2 position = rCurrentNPC.Center + num66.ToRotationVector2() * num54 * t1 - screenPos - new Vector2((float) texture.Width, (float) (texture.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)); + mySpriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), color, num66, origin2, vector2 * 1.5f, spriteEffects, 0.0f); + } + break; + } + break; + case 620: + addHeight = -9f; + origin1 = rCurrentNPC.frame.Size() * new Vector2(0.5f, 0.5f) + new Vector2((float) (-4 * rCurrentNPC.spriteDirection), 0.0f); + num53 = 4; + num54 = 6f; + t1 = (float) (Math.Cos((double) Main.GlobalTimeWrappedHourly % 2.40000009536743 / 2.40000009536743 * 6.28318548202515) / 2.0 + 0.5); + secondColor = Microsoft.Xna.Framework.Color.Gold; + amount1 = 0.5f; + num47 = 6; + num48 = 2; + num50 = num47 * 3; + num51 = 1; + break; + case 661: + num53 = 6; + num54 = 6f; + t1 = MathHelper.Max((float) (Math.Cos((double) Main.GlobalTimeWrappedHourly % 2.40000009536743 / 2.40000009536743 * 6.28318548202515) / 2.0 + 0.5), Utils.GetLerpValue(0.0f, 60f, rCurrentNPC.ai[2], true)); + amount1 = 0.5f; + break; + } + for (int index = num49; index < num47; index += num48) + { + ref Vector2 local = ref rCurrentNPC.oldPos[index]; + Microsoft.Xna.Framework.Color newColor2 = Microsoft.Xna.Framework.Color.Lerp(newColor1, secondColor, amount1); + Microsoft.Xna.Framework.Color color = rCurrentNPC.GetAlpha(newColor2) * ((float) (num47 - index) / (float) num50); + double rotation = (double) rCurrentNPC.rotation; + if (num51 == 1) + { + double num67 = (double) rCurrentNPC.oldRot[index]; + } + float scale2 = MathHelper.Lerp(scale1, num52, (float) (1.0 - (double) (num47 - index) / (double) num50)); + Vector2 position = rCurrentNPC.oldPos[index] + new Vector2((float) rCurrentNPC.width, (float) rCurrentNPC.height) / 2f - screenPos - new Vector2((float) texture.Width, (float) (texture.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)); + mySpriteBatch.Draw(texture, position, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color, rCurrentNPC.rotation, halfSize, scale2, spriteEffects, 0.0f); + } + for (int index = 0; index < num53; ++index) + { + Microsoft.Xna.Framework.Color newColor3 = Microsoft.Xna.Framework.Color.Lerp(npcColor2, secondColor, amount1); + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.Lerp(rCurrentNPC.GetAlpha(newColor3), secondColor, amount2) * (1f - t1); + Vector2 position = rCurrentNPC.Center + ((float) ((double) index / (double) num53 * 6.28318548202515) + rCurrentNPC.rotation + num55).ToRotationVector2() * num54 * t1 - screenPos - new Vector2((float) texture.Width, (float) (texture.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)); + mySpriteBatch.Draw(texture, position, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color, rCurrentNPC.rotation, origin1, rCurrentNPC.scale, spriteEffects, 0.0f); + } + Vector2 position1 = rCurrentNPC.Center - screenPos - new Vector2((float) texture.Width, (float) (texture.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)); + mySpriteBatch.Draw(texture, position1, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), rCurrentNPC.GetAlpha(newColor1), rCurrentNPC.rotation, origin1, rCurrentNPC.scale, spriteEffects, 0.0f); + if (type == 427) + mySpriteBatch.Draw(TextureAssets.GlowMask[152].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + else if (type == 426) + mySpriteBatch.Draw(TextureAssets.GlowMask[153].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + if (type == 541) + { + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue - rCurrentNPC.alpha, (int) sbyte.MaxValue - rCurrentNPC.alpha, (int) sbyte.MaxValue - rCurrentNPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Gold); + for (int index = 0; index < num53; ++index) + { + Microsoft.Xna.Framework.Color newColor4 = color1; + Microsoft.Xna.Framework.Color color2 = rCurrentNPC.GetAlpha(newColor4) * (1f - t1); + Vector2 position2 = rCurrentNPC.Center + ((float) ((double) index / (double) num53 * 6.28318548202515) + rCurrentNPC.rotation + num55).ToRotationVector2() * (float) (4.0 * (double) t1 + 2.0) - screenPos - new Vector2((float) texture.Width, (float) (texture.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)); + mySpriteBatch.Draw(TextureAssets.GlowMask[216].Value, position2, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color2, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + mySpriteBatch.Draw(TextureAssets.GlowMask[216].Value, position1, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color1, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + if (type == 661) + { + num55 = MathHelper.Lerp(0.0f, 3f, Utils.GetLerpValue(0.0f, 60f, rCurrentNPC.ai[2], true)); + for (int index = 0; index < num53; ++index) + { + Microsoft.Xna.Framework.Color newColor5 = new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue - rCurrentNPC.alpha, (int) sbyte.MaxValue - rCurrentNPC.alpha, (int) sbyte.MaxValue - rCurrentNPC.alpha, 0).MultiplyRGBA(Main.hslToRgb((float) (((double) Main.GlobalTimeWrappedHourly + (double) index / (double) num53) % 1.0), 1f, 0.5f)); + Microsoft.Xna.Framework.Color color = rCurrentNPC.GetAlpha(newColor5) * (float) (1.0 - (double) t1 * 0.5); + color.A = (byte) 0; + float num68 = 2f + rCurrentNPC.ai[2]; + Vector2 position3 = rCurrentNPC.Center + ((float) ((double) index / (double) num53 * 6.28318548202515) + rCurrentNPC.rotation + num55).ToRotationVector2() * (float) ((double) num68 * (double) t1 + 2.0) - screenPos - new Vector2((float) texture.Width, (float) (texture.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)); + mySpriteBatch.Draw(texture, position3, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + mySpriteBatch.Draw(texture, position1, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * 0.1f, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + if ((type == 568 || type == 569) && (double) rCurrentNPC.localAI[3] >= 60.0) + { + Microsoft.Xna.Framework.Color color3 = new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue - rCurrentNPC.alpha, (int) sbyte.MaxValue - rCurrentNPC.alpha, (int) sbyte.MaxValue - rCurrentNPC.alpha, 0).MultiplyRGBA(secondColor); + for (int index = 0; index < num53; ++index) + { + Microsoft.Xna.Framework.Color newColor6 = color3; + Microsoft.Xna.Framework.Color color4 = rCurrentNPC.GetAlpha(newColor6) * (1f - t1); + Vector2 position4 = rCurrentNPC.Center + ((float) ((double) index / (double) num53 * 6.28318548202515) + rCurrentNPC.rotation + num55).ToRotationVector2() * (float) (4.0 * (double) t1 + 2.0) - screenPos - new Vector2((float) texture.Width, (float) (texture.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)); + mySpriteBatch.Draw(TextureAssets.GlowMask[224].Value, position4, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color4, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + mySpriteBatch.Draw(TextureAssets.GlowMask[224].Value, position1, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color3, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + float t2 = rCurrentNPC.localAI[0]; + if ((double) t2 > 0.0) + { + Microsoft.Xna.Framework.Color color5 = new Microsoft.Xna.Framework.Color(180, 90, (int) byte.MaxValue, (int) (byte) ((Math.Cos((double) t2 * 6.28318548202515 / 60.0) * 0.5 + 0.5) * 32.0 + 0.0)) * 0.75f; + float num69 = 1f; + if ((double) t2 < 60.0) + { + float lerpValue = Utils.GetLerpValue(0.0f, 60f, t2, false); + color5 *= lerpValue; + num69 = MathHelper.Lerp(1f, 0.5f, (float) (1.0 - (double) lerpValue * (double) lerpValue)); + } + Texture2D texture2D = TextureAssets.Extra[89].Value; + Vector2 origin3 = texture2D.Size() / 2f; + Vector2 scale3 = new Vector2(num69); + float num70 = t2 * ((float) Math.PI / 750f); + float num71 = 1.570796f; + scale3.Y *= 1f; + scale3.X *= 1f; + for (float num72 = 0.0f; (double) num72 < 16.0; ++num72) + { + float f = num70 + (float) (6.28318548202515 * ((double) num72 / 16.0)); + Vector2 position5 = rCurrentNPC.Center - screenPos + f.ToRotationVector2() * 400f * num69; + mySpriteBatch.Draw(texture2D, position5, new Microsoft.Xna.Framework.Rectangle?(), color5, f + 1.570796f + num71, origin3, scale3, SpriteEffects.None, 0.0f); + } + } + } + if (type == 546) + mySpriteBatch.Draw(TextureAssets.Extra[76].Value, position1, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 200), MathHelper.Clamp(rCurrentNPC.velocity.X * 0.1f, -0.3926991f, 0.3926991f), halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + if ((type == 566 || type == 567) && (double) rCurrentNPC.localAI[3] >= 115.0) + { + int frameY = (int) ((double) Main.GlobalTimeWrappedHourly % 0.5 / 0.5 * 4.0); + Texture2D texture2D = TextureAssets.Extra[80].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 4, frameY: frameY); + Vector2 vector2 = new Vector2((float) (rCurrentNPC.spriteDirection * 8), -26f) * rCurrentNPC.scale; + int num73 = rCurrentNPC.frame.Y / rCurrentNPC.frame.Height; + int num74 = 0; + switch (num73) + { + case 0: + num74 = 6; + break; + case 1: + num74 = 4; + break; + case 2: + num74 = 2; + break; + case 3: + num74 = 6; + break; + case 4: + num74 = 8; + break; + case 5: + num74 = 6; + break; + case 6: + num74 = 4; + break; + case 7: + num74 = 6; + break; + case 8: + num74 = 2; + break; + } + Microsoft.Xna.Framework.Color color = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 130); + vector2.Y += (float) num74; + mySpriteBatch.Draw(texture2D, position1 + vector2 * rCurrentNPC.scale, new Microsoft.Xna.Framework.Rectangle?(r), color, MathHelper.Clamp(rCurrentNPC.velocity.X * 0.1f, -0.3926991f, 0.3926991f), r.Size() / 2f, rCurrentNPC.scale * 0.7f, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + } + if (type != 618) + return; + mySpriteBatch.Draw(TextureAssets.Extra[129].Value, position1, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), rCurrentNPC.GetAlpha(newColor1), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + else + { + switch (type) + { + case 551: + Texture2D texture1 = TextureAssets.Npc[type].Value; + Vector2 position6 = rCurrentNPC.Center - screenPos; + Microsoft.Xna.Framework.Rectangle frame1 = rCurrentNPC.frame; + Vector2 vector2_1 = frame1.Size() / 2f; + SpriteEffects effects1 = spriteEffects ^ SpriteEffects.FlipHorizontally; + float rotation1 = rCurrentNPC.rotation; + Microsoft.Xna.Framework.Color color6 = npcColor2; + Microsoft.Xna.Framework.Color color7 = Microsoft.Xna.Framework.Color.Lerp(color6, Microsoft.Xna.Framework.Color.White, 0.6f); + color7.A = (byte) 66; + Vector2 vector2_2 = new Vector2(171f, 44f); + Vector2 vector2_3 = new Vector2(230f, 52f); + Vector2 origin4 = Vector2.Lerp(vector2_2, vector2_3, 0.5f) + new Vector2(-50f, 30f); + int num75 = (int) rCurrentNPC.localAI[0] / 4; + Vector2 spinningpoint1 = vector2_2 - origin4; + Vector2 spinningpoint2 = vector2_3 - origin4; + Texture2D texture2D1 = TextureAssets.Extra[82].Value; + if (effects1.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + spinningpoint2.X *= -1f; + Microsoft.Xna.Framework.Rectangle rectangle1 = texture2D1.Frame(2, 5, num75 / 5, num75 % 5); + Vector2 origin5 = new Vector2(16f, 176f); + if (effects1.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + origin5.X = (float) rectangle1.Width - origin5.X; + if (effects1.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + origin4.X = (float) frame1.Width - origin4.X; + Texture2D texture2D2 = TextureAssets.Extra[81].Value; + if (effects1.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + spinningpoint1.X *= -1f; + Microsoft.Xna.Framework.Rectangle rectangle2 = texture2D2.Frame(2, 5, num75 / 5, num75 % 5); + Vector2 origin6 = new Vector2(215f, 170f); + if (effects1.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + origin6.X = (float) rectangle2.Width - origin6.X; + if ((double) Utils.GetLerpValue(0.0f, 30f, rCurrentNPC.localAI[1], true) == 1.0) + Utils.GetLerpValue(60f, 30f, rCurrentNPC.localAI[1], true); + float num76 = 2f; + Vector2 vector2_4 = rCurrentNPC.Size / 2f - screenPos; + int num77 = -3; + int num78 = 0; + byte num79 = 2; + for (int index = 9; index > num78; index += num77) + { + Vector2 position7 = rCurrentNPC.oldPos[index] + vector2_4; + float rotation2 = rCurrentNPC.oldRot[index]; + Microsoft.Xna.Framework.Color color8 = color6 * (float) (1.0 - (double) index / 10.0) * 0.35f; + color8.A /= num79; + mySpriteBatch.Draw(texture2D1, position7 + spinningpoint2.RotatedBy((double) rotation2), new Microsoft.Xna.Framework.Rectangle?(rectangle1), color8, rotation2, origin5, 1f, effects1, 0.0f); + mySpriteBatch.Draw(texture1, position7, new Microsoft.Xna.Framework.Rectangle?(frame1), color8, rotation2, origin4, 1f, effects1, 0.0f); + mySpriteBatch.Draw(texture2D2, position7 + spinningpoint1.RotatedBy((double) rotation2), new Microsoft.Xna.Framework.Rectangle?(rectangle2), color8, rotation2, origin6, 1f, effects1, 0.0f); + } + mySpriteBatch.Draw(texture2D1, position6 + spinningpoint2.RotatedBy((double) rotation1), new Microsoft.Xna.Framework.Rectangle?(rectangle1), color6, rotation1, origin5, 1f, effects1, 0.0f); + mySpriteBatch.Draw(texture1, position6, new Microsoft.Xna.Framework.Rectangle?(frame1), color6, rotation1, origin4, 1f, effects1, 0.0f); + mySpriteBatch.Draw(TextureAssets.GlowMask[226].Value, position6, new Microsoft.Xna.Framework.Rectangle?(frame1), color7 * (float) (0.699999988079071 + 0.300000011920929 * (double) num76), rotation1, origin4, 1f, effects1, 0.0f); + mySpriteBatch.Draw(texture2D2, position6 + spinningpoint1.RotatedBy((double) rotation1), new Microsoft.Xna.Framework.Rectangle?(rectangle2), color6, rotation1, origin6, 1f, effects1, 0.0f); + break; + case 657: + Texture2D texture2D3 = TextureAssets.Npc[type].Value; + Vector2 vector2_5 = rCurrentNPC.Bottom - screenPos; + vector2_5.Y += 2f; + int num80 = Main.npcFrameCount[rCurrentNPC.type]; + int num81 = rCurrentNPC.frame.Y / rCurrentNPC.frame.Height; + Microsoft.Xna.Framework.Rectangle r3 = texture2D3.Frame(2, 16, num81 / num80, num81 % num80); + r3.Inflate(0, -2); + Vector2 origin7 = r3.Size() * new Vector2(0.5f, 1f); + Microsoft.Xna.Framework.Color color9 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.White, npcColor2, 0.5f); + if (rCurrentNPC.life <= rCurrentNPC.lifeMax / 2) + this.DrawNPCDirect_QueenSlimeWings(rCurrentNPC, mySpriteBatch, screenPos, rCurrentNPC.Center, color9); + Texture2D texture2D4 = TextureAssets.Extra[186].Value; + Microsoft.Xna.Framework.Rectangle r4 = texture2D4.Frame(); + Vector2 origin8 = r4.Size() * new Vector2(0.5f, 0.5f); + Vector2 spinningpoint3 = new Vector2(rCurrentNPC.Center.X, rCurrentNPC.Center.Y); + float num82 = 0.0f; + switch (num81) + { + case 1: + case 6: + num82 -= 10f; + break; + case 3: + case 5: + num82 += 10f; + break; + case 4: + case 12: + case 13: + case 14: + case 15: + num82 += 18f; + break; + case 7: + case 8: + num82 -= 14f; + break; + case 9: + num82 -= 16f; + break; + case 10: + num82 -= 18f; + break; + case 11: + num82 += 20f; + break; + case 20: + num82 -= 14f; + break; + case 21: + case 23: + num82 -= 18f; + break; + case 22: + num82 -= 22f; + break; + } + spinningpoint3.Y += num82; + if ((double) rCurrentNPC.rotation != 0.0) + spinningpoint3 = spinningpoint3.RotatedBy((double) rCurrentNPC.rotation, rCurrentNPC.Bottom); + Vector2 position8 = spinningpoint3 - screenPos; + if (!rCurrentNPC.IsABestiaryIconDummy) + { + mySpriteBatch.End(); + mySpriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.Default, RasterizerState.CullNone, (Effect) null, Main.Transform); + } + GameShaders.Misc["QueenSlime"].Apply(new DrawData?()); + if ((double) rCurrentNPC.ai[0] == 4.0 && (double) rCurrentNPC.velocity.Y != 0.0) + { + float num83 = 1f; + if ((double) rCurrentNPC.ai[2] == 1.0) + num83 = 6f; + for (int index = 7; index >= 0; --index) + { + float num84 = (float) (1.0 - (double) index / 8.0); + Vector2 vector2_6 = rCurrentNPC.oldPos[index] + new Vector2((float) rCurrentNPC.width * 0.5f, (float) rCurrentNPC.height); + Vector2 position9 = vector2_6 - (rCurrentNPC.Bottom - Vector2.Lerp(vector2_6, rCurrentNPC.Bottom, 0.75f)) * num83 - screenPos; + Microsoft.Xna.Framework.Color color10 = color9 * num84; + mySpriteBatch.Draw(texture2D3, position9, new Microsoft.Xna.Framework.Rectangle?(r3), color10, rCurrentNPC.rotation, origin7, rCurrentNPC.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + } + } + if (!rCurrentNPC.IsABestiaryIconDummy) + { + mySpriteBatch.End(); + mySpriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + } + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + mySpriteBatch.Draw(texture2D4, position8, new Microsoft.Xna.Framework.Rectangle?(r4), color9, rCurrentNPC.rotation, origin8, 1f, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + GameShaders.Misc["QueenSlime"].Apply(new DrawData?()); + if (!rCurrentNPC.IsABestiaryIconDummy) + { + mySpriteBatch.End(); + mySpriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.Default, RasterizerState.CullNone, (Effect) null, Main.Transform); + } + DrawData drawData1 = new DrawData(texture2D3, vector2_5, new Microsoft.Xna.Framework.Rectangle?(r3), rCurrentNPC.GetAlpha(color9), rCurrentNPC.rotation, origin7, rCurrentNPC.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0); + GameShaders.Misc["QueenSlime"].Apply(new DrawData?(drawData1)); + drawData1.Draw(mySpriteBatch); + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + if (!rCurrentNPC.IsABestiaryIconDummy) + { + mySpriteBatch.End(); + mySpriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + } + Texture2D texture2D5 = TextureAssets.Extra[177].Value; + Microsoft.Xna.Framework.Rectangle r5 = texture2D5.Frame(); + Vector2 origin9 = r5.Size() * new Vector2(0.5f, 0.5f); + vector2_5 = new Vector2(rCurrentNPC.Center.X, (float) ((double) rCurrentNPC.Top.Y - (double) r5.Bottom + 44.0)); + float num85 = 0.0f; + switch (num81) + { + case 1: + num85 -= 10f; + break; + case 3: + case 5: + case 6: + num85 += 10f; + break; + case 4: + case 12: + case 13: + case 14: + case 15: + num85 += 18f; + break; + case 7: + case 8: + num85 -= 14f; + break; + case 9: + num85 -= 16f; + break; + case 10: + num85 -= 18f; + break; + case 11: + num85 += 20f; + break; + case 20: + num85 -= 14f; + break; + case 21: + case 23: + num85 -= 18f; + break; + case 22: + num85 -= 22f; + break; + } + vector2_5.Y += num85; + if ((double) rCurrentNPC.rotation != 0.0) + vector2_5 = vector2_5.RotatedBy((double) rCurrentNPC.rotation, rCurrentNPC.Bottom); + Vector2 position10 = vector2_5 - screenPos; + mySpriteBatch.Draw(texture2D5, position10, new Microsoft.Xna.Framework.Rectangle?(r5), color9, rCurrentNPC.rotation, origin9, 1f, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + break; + default: + if (type == 576 || type == 577) + { + Texture2D texture2D6 = TextureAssets.Npc[type].Value; + Vector2 position11 = rCurrentNPC.Bottom - screenPos; + Microsoft.Xna.Framework.Rectangle r6 = texture2D6.Frame(5, 10, rCurrentNPC.frame.Y / 10, rCurrentNPC.frame.Y % 10); + Vector2 origin10 = r6.Size() * new Vector2(0.5f, 1f); + origin10.Y -= 4f; + int num86 = 94; + origin10.X = rCurrentNPC.spriteDirection != 1 ? (float) (r6.Width - num86) : (float) num86; + Microsoft.Xna.Framework.Color color11 = Microsoft.Xna.Framework.Color.White; + float amount3 = 0.0f; + float amount4 = 0.0f; + int num87 = 0; + float num88 = 0.0f; + Microsoft.Xna.Framework.Color newColor7 = npcColor2; + if ((double) rCurrentNPC.localAI[3] < 60.0) + { + float num89 = rCurrentNPC.localAI[3] / 60f; + num87 = 3; + num88 = (float) (1.0 - (double) num89 * (double) num89); + color11 = new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue, 0, (int) byte.MaxValue, 0); + amount4 = 1f; + newColor7 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, newColor7, num89 * num89); + } + for (int index = 0; index < num87; ++index) + { + Microsoft.Xna.Framework.Color newColor8 = Microsoft.Xna.Framework.Color.Lerp(npcColor2, color11, amount3); + Microsoft.Xna.Framework.Color color12 = Microsoft.Xna.Framework.Color.Lerp(rCurrentNPC.GetAlpha(newColor8), color11, amount4) * (1f - num88); + Vector2 position12 = position11 - new Vector2((float) texture2D6.Width, (float) (texture2D6.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)); + mySpriteBatch.Draw(texture2D6, position12, new Microsoft.Xna.Framework.Rectangle?(r6), color12, rCurrentNPC.rotation, origin10, rCurrentNPC.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + } + mySpriteBatch.Draw(texture2D6, position11, new Microsoft.Xna.Framework.Rectangle?(r6), rCurrentNPC.GetAlpha(newColor7), rCurrentNPC.rotation, origin10, rCurrentNPC.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + break; + } + if (type == 594) + { + Texture2D texture2D7 = TextureAssets.Npc[type].Value; + Vector2 position13 = rCurrentNPC.Top - screenPos; + Microsoft.Xna.Framework.Rectangle r7 = texture2D7.Frame(8, frameX: rCurrentNPC.frame.Y); + Microsoft.Xna.Framework.Rectangle rectangle3 = texture2D7.Frame(8); + Vector2 origin11 = r7.Size() * new Vector2(0.5f, 0.0f); + Microsoft.Xna.Framework.Color color13 = npcColor2; + float scale = 1f; + NPC slaveNpc = rCurrentNPC.AI_113_WindyBalloon_GetSlaveNPC(); + if (slaveNpc != null) + { + scale = slaveNpc.scale; + if ((double) slaveNpc.ai[1] > 0.0) + Main.DrawNPC_SlimeItem(slaveNpc, slaveNpc.type, color13, rCurrentNPC.rotation); + mySpriteBatch.Draw(texture2D7, position13, new Microsoft.Xna.Framework.Rectangle?(rectangle3), slaveNpc.GetAlpha(color13), rCurrentNPC.rotation, origin11, scale, spriteEffects, 0.0f); + mySpriteBatch.Draw(texture2D7, position13, new Microsoft.Xna.Framework.Rectangle?(rectangle3), slaveNpc.GetColor(color13), rCurrentNPC.rotation, origin11, scale, spriteEffects, 0.0f); + } + mySpriteBatch.Draw(texture2D7, position13, new Microsoft.Xna.Framework.Rectangle?(r7), rCurrentNPC.GetAlpha(color13), rCurrentNPC.rotation, origin11, scale, spriteEffects, 0.0f); + break; + } + if (type == 564 || type == 565) + { + Texture2D texture2D8 = TextureAssets.Npc[type].Value; + Vector2 position14 = rCurrentNPC.Bottom - screenPos; + Microsoft.Xna.Framework.Rectangle r8 = texture2D8.Frame(5, 9, rCurrentNPC.frame.Y / 9, rCurrentNPC.frame.Y % 9); + Vector2 origin12 = r8.Size() * new Vector2(0.5f, 1f); + origin12.Y -= 10f; + int num90 = 52; + origin12.X = rCurrentNPC.spriteDirection != 1 ? (float) (r8.Width - num90) : (float) num90; + Microsoft.Xna.Framework.Color color14 = Microsoft.Xna.Framework.Color.White; + float amount5 = 0.0f; + float amount6 = 0.0f; + int num91 = 0; + float num92 = 0.0f; + float num93 = 0.0f; + Microsoft.Xna.Framework.Color newColor9 = npcColor2; + if ((double) rCurrentNPC.localAI[3] < 60.0) + { + float num94 = rCurrentNPC.localAI[3] / 60f; + num91 = 3; + num92 = (float) (1.0 - (double) num94 * (double) num94); + num93 = 8f; + color14 = new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue, 0, (int) byte.MaxValue, 0); + amount6 = 1f; + newColor9 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, newColor9, num94 * num94); + } + for (int index = 0; index < num91; ++index) + { + Microsoft.Xna.Framework.Color newColor10 = Microsoft.Xna.Framework.Color.Lerp(npcColor2, color14, amount5); + Microsoft.Xna.Framework.Color color15 = Microsoft.Xna.Framework.Color.Lerp(rCurrentNPC.GetAlpha(newColor10), color14, amount6) * (1f - num92); + Vector2 position15 = position14 - new Vector2((float) texture2D8.Width, (float) (texture2D8.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)) + ((float) ((double) index / (double) num91 * 6.28318548202515)).ToRotationVector2() * num93 * num92; + mySpriteBatch.Draw(texture2D8, position15, new Microsoft.Xna.Framework.Rectangle?(r8), color15, rCurrentNPC.rotation, origin12, rCurrentNPC.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + } + Microsoft.Xna.Framework.Color alpha = rCurrentNPC.GetAlpha(newColor9); + int num95 = 4; + float num96 = 4f; + float num97 = (float) (0.625 + Math.Sin((double) Main.GlobalTimeWrappedHourly * 6.28318548202515 * 0.75 + 3.14159274101257) * 0.125); + for (int index = 0; index < num95; ++index) + { + Microsoft.Xna.Framework.Color color16 = alpha * (1f - num97); + Vector2 position16 = position14 - new Vector2((float) texture2D8.Width, (float) (texture2D8.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)) + ((float) ((double) index / (double) num95 * 6.28318548202515)).ToRotationVector2() * num96 * num97; + mySpriteBatch.Draw(texture2D8, position16, new Microsoft.Xna.Framework.Rectangle?(r8), color16, rCurrentNPC.rotation, origin12, rCurrentNPC.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + } + mySpriteBatch.Draw(texture2D8, position14, new Microsoft.Xna.Framework.Rectangle?(r8), alpha, rCurrentNPC.rotation, origin12, rCurrentNPC.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + if ((double) rCurrentNPC.Opacity <= 0.0) + break; + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + white.A /= (byte) 2; + white *= rCurrentNPC.Opacity; + mySpriteBatch.Draw(TextureAssets.GlowMask[225].Value, position14, new Microsoft.Xna.Framework.Rectangle?(r8), white, rCurrentNPC.rotation, origin12, rCurrentNPC.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + int num98 = 4; + float num99 = 4f; + float num100 = (float) (0.5 + Math.Sin((double) Main.GlobalTimeWrappedHourly * 6.28318548202515 * 0.75) * 0.5); + for (int index = 0; index < num98; ++index) + { + Microsoft.Xna.Framework.Color color17 = white * 0.35f * (1f - num100); + Vector2 position17 = position14 - new Vector2((float) texture2D8.Width, (float) (texture2D8.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)) + ((float) ((double) index / (double) num98 * 6.28318548202515)).ToRotationVector2() * num99 * num100; + mySpriteBatch.Draw(TextureAssets.GlowMask[225].Value, position17, new Microsoft.Xna.Framework.Rectangle?(r8), color17, rCurrentNPC.rotation, origin12, rCurrentNPC.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + } + break; + } + if (type == 548) + { + Texture2D texture2D9 = TextureAssets.Npc[type].Value; + Vector2 position18 = rCurrentNPC.Bottom - screenPos; + Microsoft.Xna.Framework.Rectangle r9 = texture2D9.Frame(); + Vector2 origin13 = r9.Size() / 2f; + origin13.Y += 30f; + origin13.Y += 8f; + --origin13.X; + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + float amount7 = 0.0f; + float amount8 = 0.0f; + int num101 = 0; + float num102 = 0.0f; + float num103 = 0.0f; + Microsoft.Xna.Framework.Color newColor11 = npcColor2; + for (int index = 0; index < num101; ++index) + { + Microsoft.Xna.Framework.Color newColor12 = Microsoft.Xna.Framework.Color.Lerp(npcColor2, white, amount7); + Microsoft.Xna.Framework.Color color18 = Microsoft.Xna.Framework.Color.Lerp(rCurrentNPC.GetAlpha(newColor12), white, amount8) * (1f - num102); + Vector2 position19 = position18 - new Vector2((float) texture2D9.Width, (float) (texture2D9.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)) + ((float) ((double) index / (double) num101 * 6.28318548202515)).ToRotationVector2() * num103 * num102; + mySpriteBatch.Draw(texture2D9, position19, new Microsoft.Xna.Framework.Rectangle?(r9), color18, rCurrentNPC.rotation, origin13, rCurrentNPC.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + } + Microsoft.Xna.Framework.Color alpha = rCurrentNPC.GetAlpha(newColor11); + int num104 = 4; + float num105 = 4f; + float num106 = (float) (0.625 + Math.Sin((double) Main.GlobalTimeWrappedHourly * 6.28318548202515 * 0.75 + 3.14159274101257) * 0.125); + for (int index = 0; index < num104; ++index) + { + Microsoft.Xna.Framework.Color color19 = alpha; + color19.A = (byte) 0; + Microsoft.Xna.Framework.Color color20 = color19 * (1f - num106); + Vector2 position20 = position18 - new Vector2((float) texture2D9.Width, (float) (texture2D9.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)) + ((float) ((double) index / (double) num104 * 6.28318548202515)).ToRotationVector2() * num105 * num106; + mySpriteBatch.Draw(texture2D9, position20, new Microsoft.Xna.Framework.Rectangle?(r9), color20, rCurrentNPC.rotation, origin13, rCurrentNPC.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + } + mySpriteBatch.Draw(texture2D9, position18, new Microsoft.Xna.Framework.Rectangle?(r9), alpha, rCurrentNPC.rotation, origin13, rCurrentNPC.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + if ((double) rCurrentNPC.ai[1] == 2.0) + { + float num107 = Math.Min(1f, rCurrentNPC.ai[0] / 120f); + mySpriteBatch.Draw(texture2D9, position18, new Microsoft.Xna.Framework.Rectangle?(r9), new Microsoft.Xna.Framework.Color(1f, 1f, 1f, 0.0f) * num107, rCurrentNPC.rotation, origin13, rCurrentNPC.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + float progress = MathHelper.Clamp(rCurrentNPC.ai[0] / 450f, 0.0f, 1f); + if (!Terraria.Graphics.Effects.Filters.Scene["CrystalWin"].IsActive()) + Terraria.Graphics.Effects.Filters.Scene.Activate("CrystalWin", rCurrentNPC.Center); + else + Terraria.Graphics.Effects.Filters.Scene["CrystalWin"].GetShader().UseProgress(progress); + Terraria.Graphics.Effects.Filters.Scene["CrystalWin"].GetShader().UseTargetPosition(rCurrentNPC.Center); + } + int num108 = 4; + float num109 = 4f; + float num110 = (float) (0.625 + Math.Sin((double) Main.GlobalTimeWrappedHourly * 6.28318548202515 * 0.75) * 0.125); + for (int index = 0; index < num108; ++index) + { + Microsoft.Xna.Framework.Color color21 = alpha; + color21.A = (byte) 0; + Microsoft.Xna.Framework.Color color22 = color21 * 0.3f * (1f - num110); + Vector2 position21 = position18 - new Vector2((float) texture2D9.Width, (float) (texture2D9.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)) + ((float) ((double) index / (double) num108 * 6.28318548202515)).ToRotationVector2() * num109 * num110; + mySpriteBatch.Draw(texture2D9, position21, new Microsoft.Xna.Framework.Rectangle?(r9), color22, rCurrentNPC.rotation, origin13, rCurrentNPC.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + } + if (rCurrentNPC.alpha >= (int) byte.MaxValue) + break; + float num111 = (float) ((double) Main.GlobalTimeWrappedHourly % 3.0 / 3.0); + float num112 = num111; + if ((double) num112 > 0.5) + num112 = 1f - num111; + if ((double) num112 < 0.0) + num112 = 0.0f; + float num113 = (float) (((double) num111 + 0.5) % 1.0); + float num114 = num113; + if ((double) num114 > 0.5) + num114 = 1f - num113; + if ((double) num114 < 0.0) + num114 = 0.0f; + Texture2D texture2D10 = TextureAssets.GlowMask[239].Value; + Microsoft.Xna.Framework.Rectangle r10 = texture2D10.Frame(); + origin13 = r10.Size() / 2f; + Vector2 position22 = position18 + new Vector2(0.0f, -40f); + Microsoft.Xna.Framework.Color color23 = new Microsoft.Xna.Framework.Color(140, 50, (int) byte.MaxValue, 0) * 0.6f; + mySpriteBatch.Draw(texture2D10, position22, new Microsoft.Xna.Framework.Rectangle?(r10), color23, rCurrentNPC.rotation, origin13, rCurrentNPC.scale * 0.75f, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + float num115 = (float) (1.0 + (double) num111 * 0.75); + mySpriteBatch.Draw(texture2D10, position22, new Microsoft.Xna.Framework.Rectangle?(r10), color23 * num112, rCurrentNPC.rotation, origin13, rCurrentNPC.scale * 0.75f * num115, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + float num116 = (float) (1.0 + (double) num113 * 0.75); + mySpriteBatch.Draw(texture2D10, position22, new Microsoft.Xna.Framework.Rectangle?(r10), color23 * num114, rCurrentNPC.rotation, origin13, rCurrentNPC.scale * 0.75f * num116, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + Texture2D texture2D11 = TextureAssets.Extra[89].Value; + Microsoft.Xna.Framework.Rectangle r11 = texture2D11.Frame(); + origin13 = r11.Size() / 2f; + Vector2 scale = new Vector2(0.75f, 1f + num116) * 1.5f; + float num117 = (float) (1.0 + (double) num113 * 0.75); + if (rCurrentNPC.dontTakeDamageFromHostiles) + scale.Y *= 0.6f; + position22.Y -= 6f; + mySpriteBatch.Draw(texture2D11, position22, new Microsoft.Xna.Framework.Rectangle?(r11), color23 * num114, rCurrentNPC.rotation + 1.570796f, origin13, scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + mySpriteBatch.Draw(texture2D11, position22, new Microsoft.Xna.Framework.Rectangle?(r11), Microsoft.Xna.Framework.Color.Lerp(color23, Microsoft.Xna.Framework.Color.White, 0.5f), rCurrentNPC.rotation + 1.570796f, origin13, 1.5f, spriteEffects ^ SpriteEffects.FlipHorizontally, 0.0f); + break; + } + if (type == 371 || type >= 454 && type <= 459 || type >= 621 && type <= 623) + { + Texture2D texture2 = TextureAssets.Npc[type].Value; + Vector2 position23 = rCurrentNPC.Center - screenPos - new Vector2((float) texture2.Width, (float) (texture2.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)); + mySpriteBatch.Draw(texture2, position23, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), rCurrentNPC.GetAlpha(npcColor2), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + } + switch (type) + { + case 549: + Texture2D texture3 = TextureAssets.Npc[type].Value; + Vector2 position24 = rCurrentNPC.Center - screenPos; + Microsoft.Xna.Framework.Rectangle frame2 = rCurrentNPC.frame; + Vector2 origin14 = new Vector2(70f, (float) sbyte.MaxValue); + origin14.Y += 8f; + Vector2 scale4 = new Vector2(rCurrentNPC.scale); + float t3 = rCurrentNPC.localAI[0]; + if ((double) t3 < 120.0) + scale4 *= (float) ((double) t3 / 240.0 + 0.5); + Microsoft.Xna.Framework.Color alpha1 = rCurrentNPC.GetAlpha(npcColor2); + float lerpValue1 = Utils.GetLerpValue(0.0f, 120f, t3, true); + float num118 = MathHelper.Lerp(32f, 0.0f, lerpValue1); + Microsoft.Xna.Framework.Color color24 = alpha1; + color24.A = (byte) MathHelper.Lerp((float) color24.A, 0.0f, lerpValue1); + Microsoft.Xna.Framework.Color color25 = color24 * lerpValue1; + if ((double) t3 >= 120.0) + color25 = alpha1; + mySpriteBatch.Draw(texture3, position24, new Microsoft.Xna.Framework.Rectangle?(frame2), color25, rCurrentNPC.rotation, origin14, scale4, spriteEffects, 0.0f); + float y1 = ((float) ((((double) rCurrentNPC.ai[0] + 54.0) % 180.0 - 120.0) / 180.0 * 2.0 * 6.28318548202515)).ToRotationVector2().Y; + if ((double) t3 >= 120.0) + { + num118 = y1 * 0.0f; + color25.A = (byte) ((double) color25.A * 0.5); + color25 *= (float) ((double) y1 / 2.0 + 0.5); + float num119 = 1f; + for (float num120 = 0.0f; (double) num120 < (double) num119; ++num120) + mySpriteBatch.Draw(texture3, position24 + (6.283185f / num119 * num120).ToRotationVector2() * num118, new Microsoft.Xna.Framework.Rectangle?(frame2), color25, rCurrentNPC.rotation, origin14, scale4, spriteEffects, 0.0f); + } + float t4 = (float) ((double) rCurrentNPC.ai[0] / 180.0 - 0.759999990463257); + if ((double) t4 < 0.0) + ++t4; + float amount9 = 0.0f; + float scale5 = 0.0f; + float from1 = 0.6f; + float to1 = 0.8f; + if ((double) t4 >= (double) from1 && (double) t4 <= (double) to1) + { + amount9 = Utils.GetLerpValue(from1, to1, t4, false); + scale5 = MathHelper.Lerp(0.75f, 0.85f, amount9); + } + float from2 = to1; + float to2 = from2 + 0.13f; + if ((double) t4 >= (double) from2 && (double) t4 <= (double) to2) + { + amount9 = 1f - Utils.GetLerpValue(from2, to2, t4, false); + scale5 = MathHelper.Lerp(1.3f, 0.85f, amount9); + } + Vector2 vector2_7 = new Vector2(0.0f, -150f); + int frameNumber = frame2.Y / frame2.Height; + float num121 = MathHelper.Clamp((float) (((double) t3 - 100.0) / 40.0), 0.0f, 1f); + this.DrawElderEye(mySpriteBatch, rCurrentNPC.Center + vector2_7, 0.75f * num121, 0.75f, frameNumber, Microsoft.Xna.Framework.Color.White); + this.DrawElderEye(mySpriteBatch, rCurrentNPC.Center + vector2_7, 0.75f * num121, 0.75f, frameNumber, new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue) * (float) ((double) y1 / 2.0 + 0.5)); + if ((double) amount9 > 0.0 && (double) scale5 > 0.0) + this.DrawElderEye(mySpriteBatch, rCurrentNPC.Center + vector2_7, amount9 * 0.5f, scale5, frameNumber, new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue)); + if ((double) t3 >= 120.0) + return; + float num122 = (float) (6.28318548202515 * (double) lerpValue1 * Math.Pow((double) lerpValue1, 2.0) * 2.0) + lerpValue1; + color25.A = (byte) ((double) alpha1.A * Math.Pow((double) lerpValue1, 2.0) * 0.5); + float num123 = 3f; + for (float num124 = 0.0f; (double) num124 < (double) num123; ++num124) + mySpriteBatch.Draw(texture3, position24 + (num122 + 6.283185f / num123 * num124).ToRotationVector2() * num118, new Microsoft.Xna.Framework.Rectangle?(frame2), color25, rCurrentNPC.rotation, origin14, scale4, spriteEffects, 0.0f); + return; + case 636: + Main.DrawNPCDirect_HallowBoss(mySpriteBatch, rCurrentNPC, ref screenPos, type, ref npcColor2, ref halfSize, spriteEffects); + return; + default: + if (type == 493 || type == 507 || type == 422 || type == 517) + { + Texture2D texture4 = TextureAssets.Npc[type].Value; + Vector2 vector2_8 = rCurrentNPC.Center - screenPos; + Vector2 vector2_9 = vector2_8 - new Vector2(300f, 310f); + Vector2 position25 = vector2_8 - new Vector2((float) texture4.Width, (float) (texture4.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)); + mySpriteBatch.Draw(texture4, position25, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), rCurrentNPC.GetAlpha(npcColor2), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + switch (type) + { + case 422: + Texture2D texture5 = TextureAssets.GlowMask[149].Value; + vector3 = rCurrentNPC.GetAlpha(npcColor2).ToVector3() - new Vector3(0.5f); + float num125 = (float) (4.0 + (double) vector3.Length() * 4.0); + for (int index = 0; index < 4; ++index) + mySpriteBatch.Draw(texture5, position25 + rCurrentNPC.velocity.RotatedBy((double) index * 1.57079637050629) * num125, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0) * rCurrentNPC.Opacity, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 493: + Texture2D texture6 = TextureAssets.GlowMask[132].Value; + vector3 = rCurrentNPC.GetAlpha(npcColor2).ToVector3() - new Vector3(0.5f); + float num126 = (float) (4.0 + (double) vector3.Length() * 4.0); + for (int index = 0; index < 4; ++index) + mySpriteBatch.Draw(texture6, position25 + rCurrentNPC.velocity.RotatedBy((double) index * 1.57079637050629) * num126, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0) * rCurrentNPC.Opacity, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 507: + Texture2D texture7 = TextureAssets.GlowMask[143].Value; + vector3 = rCurrentNPC.GetAlpha(npcColor2).ToVector3() - new Vector3(0.5f); + float num127 = (float) (4.0 + (double) vector3.Length() * 4.0); + for (int index = 0; index < 4; ++index) + mySpriteBatch.Draw(texture7, position25 + rCurrentNPC.velocity.RotatedBy((double) index * 1.57079637050629) * num127, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0) * rCurrentNPC.Opacity, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 517: + Texture2D texture8 = TextureAssets.GlowMask[162].Value; + vector3 = rCurrentNPC.GetAlpha(npcColor2).ToVector3() - new Vector3(0.5f); + float num128 = (float) (2.0 + (double) vector3.Length() * 9.0); + for (int index = 0; index < 4; ++index) + mySpriteBatch.Draw(texture8, position25 + rCurrentNPC.velocity.RotatedBy((double) index * 1.57079637050629) * num128 + Vector2.UnitX * 2f, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0) * rCurrentNPC.Opacity, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + } + int num129 = 0; + string key = ""; + if (type <= 493) + { + if (type != 422) + { + if (type == 493) + { + num129 = NPC.ShieldStrengthTowerStardust; + key = "Stardust"; + } + } + else + { + num129 = NPC.ShieldStrengthTowerVortex; + key = "Vortex"; + } + } + else if (type != 507) + { + if (type == 517) + { + num129 = NPC.ShieldStrengthTowerSolar; + key = "Solar"; + } + } + else + { + num129 = NPC.ShieldStrengthTowerNebula; + key = "Nebula"; + } + float num130 = (float) num129 / (float) NPC.ShieldStrengthTowerMax; + if (rCurrentNPC.IsABestiaryIconDummy) + return; + if (num129 > 0) + { + mySpriteBatch.End(); + mySpriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointWrap, DepthStencilState.Default, RasterizerState.CullNone, (Effect) null, Main.Transform); + float num131 = 0.0f; + if ((double) rCurrentNPC.ai[3] > 0.0 && (double) rCurrentNPC.ai[3] <= 30.0) + num131 = (float) (1.0 - (double) rCurrentNPC.ai[3] / 30.0); + Terraria.Graphics.Effects.Filters.Scene[key].GetShader().UseIntensity(1f + num131).UseProgress(0.0f); + DrawData drawData2 = new DrawData(Main.Assets.Request("Images/Misc/Perlin", (AssetRequestMode) 1).Value, vector2_9 + new Vector2(300f, 300f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 600, 600)), Microsoft.Xna.Framework.Color.White * (float) ((double) num130 * 0.800000011920929 + 0.200000002980232), rCurrentNPC.rotation, new Vector2(300f, 300f), rCurrentNPC.scale * (float) (1.0 + (double) num131 * 0.0500000007450581), spriteEffects, 0); + GameShaders.Misc["ForceField"].UseColor(new Vector3((float) (1.0 + (double) num131 * 0.5))); + GameShaders.Misc["ForceField"].Apply(new DrawData?(drawData2)); + drawData2.Draw(mySpriteBatch); + mySpriteBatch.End(); + mySpriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + return; + } + if ((double) rCurrentNPC.ai[3] > 0.0) + { + mySpriteBatch.End(); + mySpriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointWrap, DepthStencilState.Default, RasterizerState.CullNone, (Effect) null, Main.Transform); + float progress = rCurrentNPC.ai[3] / 120f; + float num132 = Math.Min(rCurrentNPC.ai[3] / 30f, 1f); + Terraria.Graphics.Effects.Filters.Scene[key].GetShader().UseIntensity(Math.Min(5f, 15f * progress) + 1f).UseProgress(progress); + DrawData drawData3 = new DrawData(Main.Assets.Request("Images/Misc/Perlin", (AssetRequestMode) 1).Value, vector2_9 + new Vector2(300f, 300f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 600, 600)), new Microsoft.Xna.Framework.Color(new Vector4(1f - (float) Math.Sqrt((double) num132))), rCurrentNPC.rotation, new Vector2(300f, 300f), rCurrentNPC.scale * (1f + num132), spriteEffects, 0); + GameShaders.Misc["ForceField"].UseColor(new Vector3(2f)); + GameShaders.Misc["ForceField"].Apply(new DrawData?(drawData3)); + drawData3.Draw(mySpriteBatch); + mySpriteBatch.End(); + mySpriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + return; + } + Terraria.Graphics.Effects.Filters.Scene[key].GetShader().UseIntensity(0.0f).UseProgress(0.0f); + return; + } + switch (type) + { + case 402: + this.LoadNPC(403); + this.LoadNPC(404); + NPC npc1 = rCurrentNPC; + Texture2D texture2D12 = TextureAssets.Npc[npc1.type].Value; + Vector2 position26 = npc1.Center - screenPos - new Vector2((float) texture2D12.Width, (float) (texture2D12.Height / Main.npcFrameCount[npc1.type])) * npc1.scale / 2f + (halfSize * npc1.scale + new Vector2(0.0f, addY + addHeight + npc1.gfxOffY)); + int num133 = 0; + float num134 = (float) (2.0 / (double) npc1.oldPos.Length * 0.699999988079071); + for (int index = npc1.oldPos.Length - 1; (double) index >= 1.0; index -= 2) + { + Texture2D texture9 = num133 != 0 ? TextureAssets.Npc[403].Value : TextureAssets.Npc[404].Value; + mySpriteBatch.Draw(texture9, position26 + npc1.oldPos[index] - npc1.position, new Microsoft.Xna.Framework.Rectangle?(), npc1.GetAlpha(npcColor2) * (float) (0.800000011920929 - (double) num134 * (double) index / 2.0), npc1.oldRot[index], halfSize, npc1.scale, spriteEffects, 0.0f); + Texture2D texture10 = num133 != 0 ? TextureAssets.GlowMask[133].Value : TextureAssets.GlowMask[134].Value; + mySpriteBatch.Draw(texture10, position26 + npc1.oldPos[index] - npc1.position, new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * (float) (1.0 - (double) num134 * (double) index / 2.0), npc1.oldRot[index], halfSize, npc1.scale, spriteEffects, 0.0f); + ++num133; + } + Texture2D texture11 = TextureAssets.Npc[npc1.type].Value; + mySpriteBatch.Draw(texture11, position26, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), rCurrentNPC.GetAlpha(npcColor2), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + Texture2D texture12 = TextureAssets.GlowMask[135].Value; + mySpriteBatch.Draw(texture12, position26, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + return; + case 488: + return; + case 519: + NPC npc2 = rCurrentNPC; + Texture2D texture2D13 = TextureAssets.Npc[npc2.type].Value; + Vector2 position27 = npc2.Center - screenPos - new Vector2((float) texture2D13.Width, (float) (texture2D13.Height / Main.npcFrameCount[npc2.type])) * npc2.scale / 2f + (halfSize * npc2.scale + new Vector2(0.0f, addY + addHeight + npc2.gfxOffY)); + Texture2D texture13 = TextureAssets.Npc[npc2.type].Value; + mySpriteBatch.Draw(texture13, position27, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), rCurrentNPC.GetAlpha(npcColor2), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + int num135 = 0; + float num136 = (float) (1.0 / (double) npc2.oldPos.Length * 0.699999988079071); + for (int index = npc2.oldPos.Length - 1; (double) index >= 0.0; --index) + { + float amount10 = (float) (npc2.oldPos.Length - index) / (float) npc2.oldPos.Length; + Microsoft.Xna.Framework.Color color26 = Microsoft.Xna.Framework.Color.Pink * (float) (1.0 - (double) num136 * (double) index / 1.0); + color26.A = (byte) ((double) color26.A * (1.0 - (double) amount10)); + mySpriteBatch.Draw(texture13, position27 + npc2.oldPos[index] - npc2.position, new Microsoft.Xna.Framework.Rectangle?(), color26, npc2.oldRot[index], halfSize, npc2.scale * MathHelper.Lerp(0.3f, 1.1f, amount10), spriteEffects, 0.0f); + ++num135; + } + return; + case 522: + NPC npc3 = rCurrentNPC; + Texture2D texture14 = TextureAssets.Npc[npc3.type].Value; + Vector2 position28 = npc3.Center - screenPos - new Vector2((float) texture14.Width, (float) (texture14.Height / Main.npcFrameCount[npc3.type])) * npc3.scale / 2f + (halfSize * npc3.scale + new Vector2(0.0f, addY + addHeight + npc3.gfxOffY)); + int num137 = 0; + float num138 = (float) (1.0 / (double) npc3.oldPos.Length * 1.10000002384186); + for (int index = npc3.oldPos.Length - 1; (double) index >= 0.0; --index) + { + float amount11 = (float) (npc3.oldPos.Length - index) / (float) npc3.oldPos.Length; + Microsoft.Xna.Framework.Color color27 = Microsoft.Xna.Framework.Color.White * (float) (1.0 - (double) num138 * (double) index / 1.0); + color27.A = (byte) ((double) color27.A * (1.0 - (double) amount11)); + mySpriteBatch.Draw(texture14, position28 + npc3.oldPos[index] - npc3.position, new Microsoft.Xna.Framework.Rectangle?(), color27, npc3.oldRot[index], halfSize, npc3.scale * MathHelper.Lerp(0.8f, 0.3f, amount11), spriteEffects, 0.0f); + ++num137; + } + Texture2D texture2D14 = TextureAssets.Extra[57].Value; + mySpriteBatch.Draw(texture2D14, position28, new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), 0.0f, texture2D14.Size() / 2f, rCurrentNPC.scale, spriteEffects, 0.0f); + return; + default: + if (type == 370 || type == 372 || type == 373) + { + Texture2D texture15 = TextureAssets.Npc[type].Value; + Microsoft.Xna.Framework.Color color28 = Microsoft.Xna.Framework.Color.White; + float amount12 = 0.0f; + bool flag = type == 370 && (double) rCurrentNPC.ai[0] > 4.0; + int num139 = type != 370 ? 0 : ((double) rCurrentNPC.ai[0] > 9.0 ? 1 : 0); + int num140 = 120; + int num141 = 60; + Microsoft.Xna.Framework.Color color29 = npcColor2; + if (num139 != 0) + npcColor2 = Main.buffColor(npcColor2, 0.4f, 0.8f, 0.4f, 1f); + else if (flag) + npcColor2 = Main.buffColor(npcColor2, 0.5f, 0.7f, 0.5f, 1f); + else if (type == 370 && (double) rCurrentNPC.ai[0] == 4.0 && (double) rCurrentNPC.ai[2] > (double) num140) + { + float num142 = (rCurrentNPC.ai[2] - (float) num140) / (float) num141; + npcColor2 = Main.buffColor(npcColor2, (float) (1.0 - 0.5 * (double) num142), (float) (1.0 - 0.300000011920929 * (double) num142), (float) (1.0 - 0.5 * (double) num142), 1f); + } + int num143 = 10; + int num144 = 2; + if (type == 370) + { + if ((double) rCurrentNPC.ai[0] == -1.0) + num143 = 0; + if ((double) rCurrentNPC.ai[0] == 0.0 || (double) rCurrentNPC.ai[0] == 5.0 || (double) rCurrentNPC.ai[0] == 10.0) + num143 = 7; + if ((double) rCurrentNPC.ai[0] == 1.0) + { + color28 = Microsoft.Xna.Framework.Color.Blue; + amount12 = 0.5f; + } + else + color29 = npcColor2; + } + else if ((type == 372 || type == 373) && (double) rCurrentNPC.ai[0] == 1.0) + { + color28 = Microsoft.Xna.Framework.Color.Blue; + amount12 = 0.5f; + } + for (int index = 1; index < num143; index += num144) + { + ref Vector2 local = ref rCurrentNPC.oldPos[index]; + Microsoft.Xna.Framework.Color newColor = Microsoft.Xna.Framework.Color.Lerp(color29, color28, amount12); + Microsoft.Xna.Framework.Color color30 = rCurrentNPC.GetAlpha(newColor) * ((float) (num143 - index) / 15f); + Vector2 position29 = rCurrentNPC.oldPos[index] + new Vector2((float) rCurrentNPC.width, (float) rCurrentNPC.height) / 2f - screenPos - new Vector2((float) texture15.Width, (float) (texture15.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)); + mySpriteBatch.Draw(texture15, position29, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color30, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + int num145 = 0; + float num146 = 0.0f; + float num147 = 0.0f; + if (type == 370) + { + if ((double) rCurrentNPC.ai[0] == -1.0) + num145 = 0; + if ((double) rCurrentNPC.ai[0] == 3.0 || (double) rCurrentNPC.ai[0] == 8.0) + { + int num148 = 60; + int num149 = 30; + if ((double) rCurrentNPC.ai[2] > (double) num148) + { + num145 = 6; + num146 = (1f - (float) Math.Cos(((double) rCurrentNPC.ai[2] - (double) num148) / (double) num149 * 6.28318548202515)) / 3f; + num147 = 40f; + } + } + if ((double) rCurrentNPC.ai[0] == 4.0 && (double) rCurrentNPC.ai[2] > (double) num140) + { + num145 = 6; + num146 = (1f - (float) Math.Cos(((double) rCurrentNPC.ai[2] - (double) num140) / (double) num141 * 6.28318548202515)) / 3f; + num147 = 60f; + } + if ((double) rCurrentNPC.ai[0] == 9.0 && (double) rCurrentNPC.ai[2] > (double) num140) + { + num145 = 6; + num146 = (1f - (float) Math.Cos(((double) rCurrentNPC.ai[2] - (double) num140) / (double) num141 * 6.28318548202515)) / 3f; + num147 = 60f; + } + if ((double) rCurrentNPC.ai[0] == 12.0) + { + num145 = 6; + num146 = (1f - (float) Math.Cos((double) rCurrentNPC.ai[2] / 30.0 * 6.28318548202515)) / 3f; + num147 = 20f; + } + } + for (int index = 0; index < num145; ++index) + { + Microsoft.Xna.Framework.Color newColor = Microsoft.Xna.Framework.Color.Lerp(npcColor2, color28, amount12); + Microsoft.Xna.Framework.Color color31 = rCurrentNPC.GetAlpha(newColor) * (1f - num146); + Vector2 position30 = rCurrentNPC.Center + ((float) ((double) index / (double) num145 * 6.28318548202515) + rCurrentNPC.rotation).ToRotationVector2() * num147 * num146 - screenPos - new Vector2((float) texture15.Width, (float) (texture15.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)); + mySpriteBatch.Draw(texture15, position30, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color31, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + Vector2 position31 = rCurrentNPC.Center - screenPos - new Vector2((float) texture15.Width, (float) (texture15.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)); + mySpriteBatch.Draw(texture15, position31, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), rCurrentNPC.GetAlpha(npcColor2), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + if (type != 370 || (double) rCurrentNPC.ai[0] < 4.0) + return; + Texture2D texture16 = TextureAssets.DukeFishron.Value; + Microsoft.Xna.Framework.Color color32 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.White, Microsoft.Xna.Framework.Color.Yellow, 0.5f); + Microsoft.Xna.Framework.Color yellow = Microsoft.Xna.Framework.Color.Yellow; + float amount13 = 1f; + float num150 = 0.5f; + float num151 = 10f; + int num152 = 1; + if ((double) rCurrentNPC.ai[0] == 4.0) + { + float num153 = (rCurrentNPC.ai[2] - (float) num140) / (float) num141; + yellow *= num153; + color32 *= num153; + } + if ((double) rCurrentNPC.ai[0] == 12.0) + { + float num154 = rCurrentNPC.ai[2] / 30f; + if ((double) num154 > 0.5) + num154 = 1f - num154; + float num155 = 1f - num154 * 2f; + yellow *= num155; + color32 *= num155; + } + for (int index = 1; index < num143; index += num152) + { + ref Vector2 local = ref rCurrentNPC.oldPos[index]; + Microsoft.Xna.Framework.Color color33 = Microsoft.Xna.Framework.Color.Lerp(color32, yellow, amount13) * ((float) (num143 - index) / 15f); + Vector2 position32 = rCurrentNPC.oldPos[index] + new Vector2((float) rCurrentNPC.width, (float) rCurrentNPC.height) / 2f - screenPos - new Vector2((float) texture16.Width, (float) (texture16.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)); + mySpriteBatch.Draw(texture16, position32, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color33, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + for (int index = 1; index < num145; ++index) + { + Microsoft.Xna.Framework.Color newColor = Microsoft.Xna.Framework.Color.Lerp(color32, yellow, amount13); + Microsoft.Xna.Framework.Color color34 = rCurrentNPC.GetAlpha(newColor) * (1f - num150); + Vector2 position33 = rCurrentNPC.Center + ((float) ((double) index / (double) num145 * 6.28318548202515) + rCurrentNPC.rotation).ToRotationVector2() * num151 * num150 - screenPos - new Vector2((float) texture16.Width, (float) (texture16.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)); + mySpriteBatch.Draw(texture16, position33, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color34, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + mySpriteBatch.Draw(texture16, position31, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color32, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + return; + } + if (type == 439 || type == 440) + { + int num156 = rCurrentNPC.frame.Y / (TextureAssets.Npc[type].Height() / Main.npcFrameCount[type]); + Texture2D texture17 = TextureAssets.Npc[type].Value; + Texture2D texture2D15 = TextureAssets.Extra[30].Value; + Microsoft.Xna.Framework.Rectangle r12 = texture2D15.Frame(); + r12.Height /= 2; + if (num156 >= 4) + r12.Y += r12.Height; + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + float amount14 = 0.0f; + Microsoft.Xna.Framework.Color color35 = npcColor2; + int num157 = 0; + int num158 = 0; + int num159 = 0; + if ((double) rCurrentNPC.ai[0] == -1.0) + { + if ((double) rCurrentNPC.ai[1] >= 320.0 && (double) rCurrentNPC.ai[1] < 960.0) + { + white = Microsoft.Xna.Framework.Color.White; + amount14 = 0.5f; + num157 = 6; + num158 = 2; + num159 = 1; + } + } + else if ((double) rCurrentNPC.ai[0] == 1.0) + { + white = Microsoft.Xna.Framework.Color.White; + amount14 = 0.5f; + num157 = 4; + num158 = 2; + num159 = 1; + } + else + color35 = npcColor2; + for (int index = num159; index < num157; index += num158) + { + ref Vector2 local = ref rCurrentNPC.oldPos[index]; + Microsoft.Xna.Framework.Color color36 = color35; + color36 = Microsoft.Xna.Framework.Color.Lerp(color36, white, amount14); + color36 = rCurrentNPC.GetAlpha(color36); + color36 *= (float) (num157 - index) / (float) num157; + color36.A = (byte) 100; + Vector2 position34 = rCurrentNPC.oldPos[index] + new Vector2((float) rCurrentNPC.width, (float) rCurrentNPC.height) / 2f - screenPos - r12.Size() * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)); + mySpriteBatch.Draw(texture2D15, position34, new Microsoft.Xna.Framework.Rectangle?(r12), color36, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + int num160 = 0; + float num161 = 0.0f; + float num162 = 0.0f; + if ((double) rCurrentNPC.ai[0] == 5.0 && (double) rCurrentNPC.ai[1] >= 0.0 && (double) rCurrentNPC.ai[1] < 30.0) + { + num160 = 4; + num161 = (1f - (float) Math.Cos(((double) rCurrentNPC.ai[1] - 0.0) / 30.0 * 3.14159274101257)) / 2f; + num162 = 70f; + } + for (int index = 0; index < num160; ++index) + { + Microsoft.Xna.Framework.Color newColor = Microsoft.Xna.Framework.Color.Lerp(npcColor2, white, amount14); + Microsoft.Xna.Framework.Color color37 = rCurrentNPC.GetAlpha(newColor) * (1f - num161); + Vector2 position35 = rCurrentNPC.Center + ((float) ((double) index / (double) num160 * 6.28318548202515) + rCurrentNPC.rotation).ToRotationVector2() * num162 * num161 - screenPos - new Vector2((float) texture17.Width, (float) (texture17.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)); + mySpriteBatch.Draw(texture2D15, position35, new Microsoft.Xna.Framework.Rectangle?(r12), color37, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + Vector2 position36 = rCurrentNPC.Center - screenPos - new Vector2((float) texture17.Width, (float) (texture17.Height / Main.npcFrameCount[type])) * rCurrentNPC.scale / 2f + (halfSize * rCurrentNPC.scale + new Vector2(0.0f, addY + addHeight + rCurrentNPC.gfxOffY)); + mySpriteBatch.Draw(texture17, position36, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), rCurrentNPC.GetAlpha(npcColor2), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + return; + } + if (type == 392 || type == 393 || type == 394 || type == 395) + { + Texture2D texture18 = TextureAssets.Npc[type].Value; + Vector2 position37 = (rCurrentNPC.Center - screenPos + Vector2.UnitY * rCurrentNPC.gfxOffY).Floor(); + float num163 = 0.0f; + if (type == 393) + num163 = -8f; + mySpriteBatch.Draw(texture18, position37, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), rCurrentNPC.GetAlpha(npcColor2), rCurrentNPC.rotation, halfSize + Vector2.UnitY * num163, rCurrentNPC.scale, spriteEffects, 0.0f); + if (type == 392) + mySpriteBatch.Draw(TextureAssets.GlowMask[48].Value, position37, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(200, 200, 200, 0), rCurrentNPC.rotation, halfSize + Vector2.UnitY * num163, rCurrentNPC.scale, spriteEffects, 0.0f); + if (type == 395) + mySpriteBatch.Draw(TextureAssets.GlowMask[49].Value, position37, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(200, 200, 200, 0), rCurrentNPC.rotation, halfSize + Vector2.UnitY * num163, rCurrentNPC.scale, spriteEffects, 0.0f); + if (type != 394) + return; + mySpriteBatch.Draw(TextureAssets.GlowMask[50].Value, position37, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(200, 200, 200, 0), rCurrentNPC.rotation, halfSize + Vector2.UnitY * num163, rCurrentNPC.scale, spriteEffects, 0.0f); + return; + } + if (type == 83 || type == 84 || type == 179) + { + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), Microsoft.Xna.Framework.Color.White, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + return; + } + if (type >= 87 && type <= 92) + { + Microsoft.Xna.Framework.Color alpha2 = rCurrentNPC.GetAlpha(npcColor2); + byte num164 = (byte) (((int) Main.tileColor.R + (int) Main.tileColor.G + (int) Main.tileColor.B) / 3); + if ((int) alpha2.R < (int) num164) + alpha2.R = num164; + if ((int) alpha2.G < (int) num164) + alpha2.G = num164; + if ((int) alpha2.B < (int) num164) + alpha2.B = num164; + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), alpha2, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + return; + } + switch (type) + { + case 94: + for (int index = 1; index < 6; index += 2) + { + ref Vector2 local = ref rCurrentNPC.oldPos[index]; + Microsoft.Xna.Framework.Color alpha3 = rCurrentNPC.GetAlpha(npcColor2); + alpha3.R = (byte) ((int) alpha3.R * (10 - index) / 15); + alpha3.G = (byte) ((int) alpha3.G * (10 - index) / 15); + alpha3.B = (byte) ((int) alpha3.B * (10 - index) / 15); + alpha3.A = (byte) ((int) alpha3.A * (10 - index) / 15); + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) rCurrentNPC.oldPos[index].X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.oldPos[index].Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), alpha3, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + break; + case 384: + return; + case 396: + Texture2D texture19 = TextureAssets.Npc[type].Value; + Vector2 origin15 = new Vector2(191f, 130f); + Texture2D texture20 = TextureAssets.Extra[18].Value; + Texture2D texture21 = TextureAssets.Extra[19].Value; + Vector2 origin16 = new Vector2(19f, 34f); + Vector2 vector2_10 = new Vector2(27f, 59f); + Vector2 vector2_11 = new Vector2(0.0f, 0.0f); + Texture2D texture2D16 = TextureAssets.Extra[25].Value; + Vector2 vector2_12 = new Vector2(0.0f, 214f).RotatedBy((double) rCurrentNPC.rotation); + Microsoft.Xna.Framework.Rectangle r13 = texture2D16.Frame(); + r13.Height /= 3; + r13.Y += r13.Height * (int) ((double) rCurrentNPC.localAI[2] / 7.0); + Texture2D texture2D17 = TextureAssets.Extra[29].Value; + Vector2 vector2_13 = new Vector2(0.0f, 4f).RotatedBy((double) rCurrentNPC.rotation); + Microsoft.Xna.Framework.Rectangle r14 = texture2D17.Frame(); + r14.Height /= 4; + r14.Y += r14.Height * (int) ((double) rCurrentNPC.localAI[3] / 5.0); + Texture2D texture2D18 = TextureAssets.Extra[26].Value; + Microsoft.Xna.Framework.Rectangle rectangle4 = texture2D18.Frame(); + rectangle4.Height /= 4; + Vector2 center1 = Main.npc[(int) rCurrentNPC.ai[3]].Center; + Microsoft.Xna.Framework.Point tileCoordinates1 = rCurrentNPC.Center.ToTileCoordinates(); + Microsoft.Xna.Framework.Color alpha4 = rCurrentNPC.GetAlpha(Microsoft.Xna.Framework.Color.Lerp(Lighting.GetColor(tileCoordinates1.X, tileCoordinates1.Y), Microsoft.Xna.Framework.Color.White, 0.3f)); + if ((double) rCurrentNPC.ai[0] < 0.0) + { + int num165 = (int) rCurrentNPC.ai[1] / 8; + rectangle4.Y += rectangle4.Height * num165; + mySpriteBatch.Draw(texture2D18, rCurrentNPC.Center - screenPos, new Microsoft.Xna.Framework.Rectangle?(rectangle4), alpha4, rCurrentNPC.rotation, origin16 + new Vector2(4f, 4f), 1f, spriteEffects, 0.0f); + } + else + { + mySpriteBatch.Draw(texture20, rCurrentNPC.Center - screenPos, new Microsoft.Xna.Framework.Rectangle?(), alpha4, rCurrentNPC.rotation, origin16, 1f, spriteEffects, 0.0f); + Vector2 vector2_14 = Utils.Vector2FromElipse(rCurrentNPC.localAI[0].ToRotationVector2(), vector2_10 * rCurrentNPC.localAI[1]); + mySpriteBatch.Draw(texture21, rCurrentNPC.Center - screenPos + vector2_14 + vector2_11, new Microsoft.Xna.Framework.Rectangle?(), alpha4, rCurrentNPC.rotation, new Vector2((float) texture21.Width, (float) texture21.Height) / 2f, 1f, SpriteEffects.None, 0.0f); + } + mySpriteBatch.Draw(texture19, rCurrentNPC.Center - screenPos, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), alpha4, rCurrentNPC.rotation, origin15, 1f, spriteEffects, 0.0f); + mySpriteBatch.Draw(texture2D17, (rCurrentNPC.Center - screenPos + vector2_13).Floor(), new Microsoft.Xna.Framework.Rectangle?(r14), alpha4, rCurrentNPC.rotation, r14.Size() / 2f, 1f, spriteEffects, 0.0f); + mySpriteBatch.Draw(texture2D16, (rCurrentNPC.Center - screenPos + vector2_12).Floor(), new Microsoft.Xna.Framework.Rectangle?(r13), alpha4, rCurrentNPC.rotation, r13.Size() / 2f, 1f, spriteEffects, 0.0f); + return; + case 397: + Texture2D texture22 = TextureAssets.Npc[type].Value; + float num166 = 0.5f; + Vector2 vector2_15 = new Vector2(220f, -60f); + Vector2 vector2_16 = new Vector2(0.0f, 76f); + Texture2D texture23 = TextureAssets.Extra[15].Value; + Vector2 vector2_17 = new Vector2(60f, 30f); + float num167 = 340f; + Vector2 center2 = Main.npc[(int) rCurrentNPC.ai[3]].Center; + Microsoft.Xna.Framework.Point tileCoordinates2 = rCurrentNPC.Center.ToTileCoordinates(); + Microsoft.Xna.Framework.Color alpha5 = rCurrentNPC.GetAlpha(Microsoft.Xna.Framework.Color.Lerp(Lighting.GetColor(tileCoordinates2.X, tileCoordinates2.Y), Microsoft.Xna.Framework.Color.White, 0.3f)); + bool flag5 = (double) rCurrentNPC.ai[2] == 0.0; + Vector2 vector2_18 = new Vector2(flag5 ? -1f : 1f, 1f); + Vector2 origin17 = new Vector2(120f, 180f); + if (!flag5) + origin17.X = (float) texture22.Width - origin17.X; + Texture2D texture24 = TextureAssets.Extra[17].Value; + Texture2D texture25 = TextureAssets.Extra[19].Value; + Vector2 origin18 = new Vector2(26f, 42f); + if (!flag5) + origin18.X = (float) texture24.Width - origin18.X; + Vector2 vector2_19 = new Vector2(30f, 66f); + Vector2 vector2_20 = new Vector2((float) (1.0 * -(double) vector2_18.X), 3f); + Texture2D texture2D19 = TextureAssets.Extra[26].Value; + Microsoft.Xna.Framework.Rectangle rectangle5 = texture2D19.Frame(); + rectangle5.Height /= 4; + Vector2 vector2_21 = vector2_15 * vector2_18; + Vector2 vector2_22 = center2 + vector2_21; + Vector2 vector2_23 = rCurrentNPC.Center + vector2_16; + Vector2 vector2_24 = vector2_23; + Vector2 v1 = (vector2_22 - vector2_24) * (1f - num166); + Vector2 origin19 = vector2_17; + if (!flag5) + origin19.X = (float) texture23.Width - origin19.X; + float num168 = (float) Math.Acos((double) v1.Length() / (double) num167) * -vector2_18.X; + mySpriteBatch.Draw(texture23, vector2_23 - screenPos, new Microsoft.Xna.Framework.Rectangle?(), alpha5, (float) ((double) v1.ToRotation() + (double) num168 - 1.57079637050629), origin19, 1f, spriteEffects, 0.0f); + if ((double) rCurrentNPC.ai[0] == -2.0) + { + int num169 = (int) rCurrentNPC.ai[1] / 8; + rectangle5.Y += rectangle5.Height * num169; + mySpriteBatch.Draw(texture2D19, rCurrentNPC.Center - screenPos, new Microsoft.Xna.Framework.Rectangle?(rectangle5), alpha5, 0.0f, origin18 - new Vector2(4f, 4f), 1f, spriteEffects, 0.0f); + } + else + { + mySpriteBatch.Draw(texture24, rCurrentNPC.Center - screenPos, new Microsoft.Xna.Framework.Rectangle?(), alpha5, 0.0f, origin18, 1f, spriteEffects, 0.0f); + Vector2 vector2_25 = Utils.Vector2FromElipse(rCurrentNPC.localAI[0].ToRotationVector2(), vector2_19 * rCurrentNPC.localAI[1]); + mySpriteBatch.Draw(texture25, rCurrentNPC.Center - screenPos + vector2_25 + vector2_20, new Microsoft.Xna.Framework.Rectangle?(), alpha5, 0.0f, new Vector2((float) texture25.Width, (float) texture25.Height) / 2f, 1f, SpriteEffects.None, 0.0f); + } + mySpriteBatch.Draw(texture22, rCurrentNPC.Center - screenPos, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), alpha5, 0.0f, origin17, 1f, spriteEffects, 0.0f); + return; + case 398: + bool flag6 = false; + Texture2D texture26 = TextureAssets.Npc[type].Value; + Texture2D texture27 = TextureAssets.Extra[16].Value; + Texture2D texture28 = TextureAssets.Extra[14].Value; + float y2 = 340f; + float num170 = 0.5f; + Vector2 vector2_26 = new Vector2(220f, -60f); + Vector2 vector2_27 = new Vector2(76f, 66f); + Texture2D texture29 = TextureAssets.Extra[13].Value; + Vector2 origin20 = new Vector2((float) texture29.Width, 278f); + Vector2 origin21 = new Vector2(0.0f, 278f); + Vector2 vector2_28 = new Vector2(0.0f, 76f); + Vector2 center3 = rCurrentNPC.Center; + Microsoft.Xna.Framework.Point tileCoordinates3 = (rCurrentNPC.Center + new Vector2(0.0f, -150f)).ToTileCoordinates(); + Microsoft.Xna.Framework.Color alpha6 = rCurrentNPC.GetAlpha(Microsoft.Xna.Framework.Color.Lerp(Lighting.GetColor(tileCoordinates3.X, tileCoordinates3.Y), Microsoft.Xna.Framework.Color.White, 0.3f)); + for (int index5 = 0; index5 < 2; ++index5) + { + bool flag7 = index5 == 0; + Vector2 vector2_29 = new Vector2(flag7 ? -1f : 1f, 1f); + int index6 = -1; + for (int index7 = 0; index7 < 200; ++index7) + { + if (Main.npc[index7].active && Main.npc[index7].type == 397 && (double) Main.npc[index7].ai[2] == (double) index5 && (double) Main.npc[index7].ai[3] == (double) rCurrentNPC.whoAmI) + { + index6 = index7; + break; + } + } + if (index6 != -1) + { + Vector2 Position = center3 + vector2_26 * vector2_29; + Vector2 v2 = (Main.npc[index6].Center + vector2_28 - Position) * num170; + if (flag6) + Main.dust[Dust.NewDust(Position + v2, 0, 0, 6)].noGravity = true; + float num171 = (float) Math.Acos((double) v2.Length() / (double) y2) * -vector2_29.X; + SpriteEffects effects2 = flag7 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + Vector2 origin22 = vector2_27; + if (!flag7) + origin22.X = (float) texture28.Width - origin22.X; + mySpriteBatch.Draw(texture28, Position - screenPos, new Microsoft.Xna.Framework.Rectangle?(), alpha6, (float) ((double) v2.ToRotation() - (double) num171 - 1.57079637050629), origin22, 1f, effects2, 0.0f); + if (flag6) + Main.dust[Dust.NewDust(Position, 0, 0, 6)].noGravity = true; + if (flag6) + Main.dust[Dust.NewDust(center3, 0, 0, 6)].noGravity = true; + if (flag6) + Main.dust[Dust.NewDust(Position + new Vector2(0.0f, y2).RotatedBy((double) v2.ToRotation() - (double) num171 - 1.57079637050629), 0, 0, 6)].noGravity = true; + } + } + mySpriteBatch.Draw(texture29, center3 - screenPos, new Microsoft.Xna.Framework.Rectangle?(), alpha6, 0.0f, origin20, 1f, SpriteEffects.None, 0.0f); + mySpriteBatch.Draw(texture29, center3 - screenPos, new Microsoft.Xna.Framework.Rectangle?(), alpha6, 0.0f, origin21, 1f, SpriteEffects.FlipHorizontally, 0.0f); + mySpriteBatch.Draw(texture27, center3 - screenPos, new Microsoft.Xna.Framework.Rectangle?(), alpha6, 0.0f, new Vector2(112f, 101f), 1f, SpriteEffects.None, 0.0f); + mySpriteBatch.Draw(texture26, center3 - screenPos, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), alpha6, 0.0f, rCurrentNPC.frame.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + return; + case 399: + Texture2D texture30 = TextureAssets.Npc[type].Value; + (rCurrentNPC.position - screenPos + Vector2.UnitY * rCurrentNPC.gfxOffY).Floor(); + float num172 = 5f; + for (int index8 = 0; (double) index8 < (double) num172; ++index8) + { + float num173 = (float) (1.0 - ((double) Main.GlobalTimeWrappedHourly + (double) index8) % (double) num172 / (double) num172); + Microsoft.Xna.Framework.Color color38 = Microsoft.Xna.Framework.Color.LimeGreen; + if ((double) rCurrentNPC.ai[0] == 1.0) + color38 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.LimeGreen, Microsoft.Xna.Framework.Color.Red, MathHelper.Clamp(rCurrentNPC.ai[1] / 20f, 0.0f, 1f)); + if ((double) rCurrentNPC.ai[0] == 2.0) + color38 = Microsoft.Xna.Framework.Color.Red; + Microsoft.Xna.Framework.Color color39 = color38 * (1f - num173); + color39.A = (byte) 0; + for (int index9 = 0; index9 < 2; ++index9) + mySpriteBatch.Draw(TextureAssets.Extra[27].Value, rCurrentNPC.Center - screenPos + Vector2.UnitY * (float) ((double) rCurrentNPC.gfxOffY - 4.0 + 6.0), new Microsoft.Xna.Framework.Rectangle?(), color39, 1.570796f, new Vector2(10f, 48f), num173 * 4f, SpriteEffects.None, 0.0f); + } + mySpriteBatch.Draw(texture30, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), rCurrentNPC.GetAlpha(npcColor2), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + Texture2D texture31 = TextureAssets.GlowMask[100].Value; + mySpriteBatch.Draw(texture31, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue - rCurrentNPC.alpha / 2, (int) sbyte.MaxValue - rCurrentNPC.alpha / 2, (int) sbyte.MaxValue - rCurrentNPC.alpha / 2, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + Texture2D texture2D20 = TextureAssets.Extra[20].Value; + Microsoft.Xna.Framework.Rectangle rectangle6 = texture2D20.Frame(verticalFrames: 4, frameY: ((int) rCurrentNPC.ai[0] + 1)); + Vector2 position38 = new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) texture2D20.Width * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale + (double) addHeight + (double) addY + (double) rCurrentNPC.gfxOffY + 18.0 + 6.0)); + mySpriteBatch.Draw(texture2D20, position38, new Microsoft.Xna.Framework.Rectangle?(rectangle6), rCurrentNPC.GetAlpha(npcColor2), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + Texture2D texture32 = TextureAssets.GlowMask[101].Value; + mySpriteBatch.Draw(texture32, position38, new Microsoft.Xna.Framework.Rectangle?(rectangle6), new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue - rCurrentNPC.alpha / 2, (int) sbyte.MaxValue - rCurrentNPC.alpha / 2, (int) sbyte.MaxValue - rCurrentNPC.alpha / 2, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + return; + case 400: + Texture2D texture33 = TextureAssets.Npc[type].Value; + Texture2D texture2D21 = TextureAssets.Extra[19].Value; + Vector2 origin23 = new Vector2(40f, 40f); + Vector2 vector2_30 = new Vector2(30f, 30f); + Vector2 center4 = rCurrentNPC.Center; + Microsoft.Xna.Framework.Point tileCoordinates4 = rCurrentNPC.Center.ToTileCoordinates(); + Microsoft.Xna.Framework.Color alpha7 = rCurrentNPC.GetAlpha(Microsoft.Xna.Framework.Color.Lerp(Lighting.GetColor(tileCoordinates4.X, tileCoordinates4.Y), Microsoft.Xna.Framework.Color.White, 0.3f)); + mySpriteBatch.Draw(texture33, rCurrentNPC.Center - screenPos, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), alpha7, rCurrentNPC.rotation, origin23, 1f, spriteEffects, 0.0f); + Vector2 vector2_31 = Utils.Vector2FromElipse(rCurrentNPC.localAI[0].ToRotationVector2(), vector2_30 * rCurrentNPC.localAI[1]); + mySpriteBatch.Draw(texture2D21, rCurrentNPC.Center - screenPos + vector2_31, new Microsoft.Xna.Framework.Rectangle?(), alpha7, rCurrentNPC.rotation, texture2D21.Size() / 2f, rCurrentNPC.localAI[2], SpriteEffects.None, 0.0f); + return; + case 416: + int index10 = -1; + int index11 = (int) rCurrentNPC.ai[0]; + Vector2 position39 = rCurrentNPC.position; + Vector2 spinningpoint4 = Vector2.Zero; + if (Main.npc[index11].active && Main.npc[index11].type == 415) + index10 = index11; + if (index10 != -1) + { + Vector2 position40 = rCurrentNPC.position; + rCurrentNPC.Bottom = Main.npc[index10].Bottom; + position39 = rCurrentNPC.position; + rCurrentNPC.position = position40; + rCurrentNPC.gfxOffY = Main.npc[index10].gfxOffY; + spinningpoint4 = Main.npc[index10].velocity; + } + Microsoft.Xna.Framework.Rectangle frame3 = rCurrentNPC.frame; + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) position39.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) position39.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame3), rCurrentNPC.GetAlpha(npcColor2), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + if (rCurrentNPC.color != new Microsoft.Xna.Framework.Color()) + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) position39.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) position39.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame3), rCurrentNPC.GetColor(npcColor2), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + mySpriteBatch.Draw(TextureAssets.GlowMask[156].Value, position39 + rCurrentNPC.Size * new Vector2(0.5f, 1f) - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + vector3 = rCurrentNPC.GetAlpha(npcColor2).ToVector3() - new Vector3(0.5f); + float num174 = (float) (0.5 + (double) vector3.Length() * 0.5); + for (int index12 = 0; index12 < 4; ++index12) + mySpriteBatch.Draw(TextureAssets.GlowMask[156].Value, position39 + rCurrentNPC.Size * new Vector2(0.5f, 1f) - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY) + spinningpoint4.RotatedBy((double) index12 * 1.57079637050629) * num174, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + return; + case 491: + NPC npc4 = rCurrentNPC; + Texture2D texture34 = TextureAssets.Npc[npc4.type].Value; + Microsoft.Xna.Framework.Rectangle frame4 = npc4.frame; + Vector2 origin24 = frame4.OriginFlip(new Vector2(208f, 460f), spriteEffects); + Vector2 position41 = npc4.Center - screenPos; + Vector2 vector2_32 = new Vector2(spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally) ? -1f : 1f, 1f); + Microsoft.Xna.Framework.Color alpha8 = npc4.GetAlpha(npcColor2); + mySpriteBatch.Draw(texture34, position41, new Microsoft.Xna.Framework.Rectangle?(frame4), alpha8, npc4.rotation, origin24, npc4.scale, spriteEffects, 0.0f); + int num175 = (int) npc4.localAI[3] / 8; + Texture2D texture2D22 = TextureAssets.Extra[40].Value; + Microsoft.Xna.Framework.Rectangle r15 = texture2D22.Frame(verticalFrames: 4, frameY: (num175 % 4)); + Vector2 origin25 = r15.Size() * new Vector2(0.5f, 1f); + mySpriteBatch.Draw(texture2D22, position41 + (new Vector2(102f, -384f) * vector2_32).RotatedBy((double) npc4.rotation), new Microsoft.Xna.Framework.Rectangle?(r15), alpha8, npc4.rotation, origin25, npc4.scale, spriteEffects, 0.0f); + Texture2D texture2D23 = TextureAssets.Extra[41].Value; + Microsoft.Xna.Framework.Rectangle r16 = texture2D23.Frame(verticalFrames: 8, frameY: (num175 % 8)); + Vector2 origin26 = r16.Size() * new Vector2(0.5f, 0.0f) + new Vector2(0.0f, 10f); + for (int index13 = 0; index13 < 5; ++index13) + mySpriteBatch.Draw(texture2D23, position41 + (new Vector2((float) (34 * index13 - 96), 40f) * vector2_32).RotatedBy((double) npc4.rotation), new Microsoft.Xna.Framework.Rectangle?(r16), alpha8, npc4.rotation, origin26, npc4.scale, spriteEffects, 0.0f); + Texture2D texture2D24 = TextureAssets.Extra[42].Value; + Microsoft.Xna.Framework.Rectangle r17 = texture2D24.Frame(verticalFrames: 4, frameY: (num175 % 4)); + Vector2 origin27 = r17.Size() * new Vector2(0.5f, 0.0f); + for (int index14 = 0; index14 < 2; ++index14) + mySpriteBatch.Draw(texture2D24, position41 + (new Vector2((float) (158 - 106 * index14), -302f) * vector2_32).RotatedBy((double) npc4.rotation), new Microsoft.Xna.Framework.Rectangle?(r17), alpha8, npc4.rotation, origin27, npc4.scale, spriteEffects, 0.0f); + Texture2D texture2D25 = TextureAssets.Extra[43].Value; + Microsoft.Xna.Framework.Rectangle r18 = texture2D25.Frame(verticalFrames: 4, frameY: (num175 % 4)); + Vector2 origin28 = r18.Size() * new Vector2(0.5f, 0.0f); + for (int index15 = 0; index15 < 2; ++index15) + mySpriteBatch.Draw(texture2D25, position41 + (new Vector2((float) (42 - 178 * index15), -444f) * vector2_32).RotatedBy((double) npc4.rotation), new Microsoft.Xna.Framework.Rectangle?(r18), alpha8, npc4.rotation, origin28, npc4.scale, spriteEffects, 0.0f); + Texture2D texture2D26 = TextureAssets.Extra[44].Value; + Microsoft.Xna.Framework.Rectangle r19 = texture2D26.Frame(verticalFrames: 4, frameY: (num175 % 4)); + Vector2 origin29 = r19.Size() * new Vector2(0.5f, 0.0f); + mySpriteBatch.Draw(texture2D26, position41 + (new Vector2(-134f, -302f) * vector2_32).RotatedBy((double) npc4.rotation), new Microsoft.Xna.Framework.Rectangle?(r19), alpha8, npc4.rotation, origin29, npc4.scale, spriteEffects, 0.0f); + Texture2D texture2D27 = TextureAssets.Extra[45].Value; + Microsoft.Xna.Framework.Rectangle r20 = texture2D27.Frame(verticalFrames: 4, frameY: ((2 + num175) % 4)); + Vector2 origin30 = r20.Size() * new Vector2(0.5f, 0.0f); + mySpriteBatch.Draw(texture2D27, position41 + (new Vector2(-60f, -330f) * vector2_32).RotatedBy((double) npc4.rotation), new Microsoft.Xna.Framework.Rectangle?(r20), alpha8, npc4.rotation, origin30, npc4.scale, spriteEffects, 0.0f); + this.LoadNPC(492); + if (!TextureAssets.Npc[492].IsLoaded) + return; + Texture2D texture2D28 = TextureAssets.Npc[492].Value; + Microsoft.Xna.Framework.Rectangle r21 = texture2D28.Frame(verticalFrames: 9); + Vector2 origin31 = r21.Size() * new Vector2(0.5f, 0.0f) + new Vector2(0.0f, 10f); + for (int index16 = 0; index16 < 4; ++index16) + { + int index17 = (int) npc4.ai[index16]; + if (index17 >= 0) + { + r21.Y = Main.npc[index17].frame.Y; + mySpriteBatch.Draw(texture2D28, position41 + (new Vector2((float) (68 * index16 - 122), -20f) * vector2_32).RotatedBy((double) npc4.rotation), new Microsoft.Xna.Framework.Rectangle?(r21), alpha8, npc4.rotation, origin31, npc4.scale, spriteEffects, 0.0f); + } + } + return; + } + if (type == 125 || type == 126 || type == (int) sbyte.MaxValue || type == 128 || type == 129 || type == 130 || type == 131 || type == 139 || type == 140) + { + for (int index18 = 9; index18 >= 0; index18 -= 2) + { + ref Vector2 local = ref rCurrentNPC.oldPos[index18]; + Microsoft.Xna.Framework.Color alpha9 = rCurrentNPC.GetAlpha(npcColor2); + alpha9.R = (byte) ((int) alpha9.R * (10 - index18) / 20); + alpha9.G = (byte) ((int) alpha9.G * (10 - index18) / 20); + alpha9.B = (byte) ((int) alpha9.B * (10 - index18) / 20); + alpha9.A = (byte) ((int) alpha9.A * (10 - index18) / 20); + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) rCurrentNPC.oldPos[index18].X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.oldPos[index18].Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), alpha9, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + } + if (type == 417 && (double) rCurrentNPC.ai[0] >= 6.0 && (double) rCurrentNPC.ai[0] <= 6.0) + { + for (int index19 = 5; index19 >= 0; --index19) + { + ref Vector2 local = ref rCurrentNPC.oldPos[index19]; + Microsoft.Xna.Framework.Color alpha10 = rCurrentNPC.GetAlpha(npcColor2); + alpha10.R = (byte) ((int) alpha10.R * (10 - index19) / 20); + alpha10.G = (byte) ((int) alpha10.G * (10 - index19) / 20); + alpha10.B = (byte) ((int) alpha10.B * (10 - index19) / 20); + alpha10.A = (byte) ((int) alpha10.A * (10 - index19) / 20); + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) rCurrentNPC.oldPos[index19].X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.oldPos[index19].Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), alpha10, rCurrentNPC.oldRot[index19], halfSize, MathHelper.Lerp(0.5f, 1f, (float) ((5.0 - (double) index19) / 6.0)), spriteEffects, 0.0f); + } + } + if (type == 419 && (double) rCurrentNPC.ai[2] <= -9.0) + { + int num176 = TextureAssets.GlowMask[154].Height() / Main.npcFrameCount[type]; + int num177 = rCurrentNPC.frame.Y / num176; + for (int index20 = 6; index20 >= 0; --index20) + { + ref Vector2 local = ref rCurrentNPC.oldPos[index20]; + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + white.R = (byte) ((int) byte.MaxValue * (10 - index20) / 20); + white.G = (byte) ((int) byte.MaxValue * (10 - index20) / 20); + white.B = (byte) ((int) byte.MaxValue * (10 - index20) / 20); + white.A = (byte) 0; + Microsoft.Xna.Framework.Rectangle frame5 = rCurrentNPC.frame; + int num178 = (num177 - 3 - index20) % 3; + if (num178 < 0) + num178 += 3; + int num179 = num178 + 5; + frame5.Y = num176 * num179; + mySpriteBatch.Draw(TextureAssets.GlowMask[154].Value, new Vector2((float) ((double) rCurrentNPC.oldPos[index20].X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.oldPos[index20].Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(frame5), white, rCurrentNPC.oldRot[index20], halfSize, MathHelper.Lerp(0.75f, 1.2f, (float) ((10.0 - (double) index20) / 10.0)), spriteEffects, 0.0f); + } + } + if (type == 418 && ((double) rCurrentNPC.ai[0] == 2.0 || (double) rCurrentNPC.ai[0] == 4.0)) + { + Texture2D texture2D29 = TextureAssets.Extra[55].Value; + Vector2 origin32 = new Vector2((float) (texture2D29.Width / 2), (float) (texture2D29.Height / 8 + 14)); + int num180 = (int) rCurrentNPC.ai[1] / 2; + float num181 = -1.570796f * (float) rCurrentNPC.spriteDirection; + float amount15 = rCurrentNPC.ai[1] / 45f; + if ((double) amount15 > 1.0) + amount15 = 1f; + int num182 = num180 % 4; + for (int index21 = 6; index21 >= 0; --index21) + { + ref Vector2 local = ref rCurrentNPC.oldPos[index21]; + Microsoft.Xna.Framework.Color color40 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Gold, Microsoft.Xna.Framework.Color.OrangeRed, amount15); + color40 = Microsoft.Xna.Framework.Color.Lerp(color40, Microsoft.Xna.Framework.Color.Blue, (float) index21 / 12f); + color40.A = (byte) (64.0 * (double) amount15); + color40.R = (byte) ((int) color40.R * (10 - index21) / 20); + color40.G = (byte) ((int) color40.G * (10 - index21) / 20); + color40.B = (byte) ((int) color40.B * (10 - index21) / 20); + color40.A = (byte) ((int) color40.A * (10 - index21) / 20); + color40 *= amount15; + int frameY = (num182 - index21) % 4; + if (frameY < 0) + frameY += 4; + Microsoft.Xna.Framework.Rectangle rectangle7 = texture2D29.Frame(verticalFrames: 4, frameY: frameY); + mySpriteBatch.Draw(texture2D29, new Vector2((float) ((double) rCurrentNPC.oldPos[index21].X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.oldPos[index21].Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(rectangle7), color40, rCurrentNPC.oldRot[index21] + num181, origin32, MathHelper.Lerp(0.1f, 1.2f, (float) ((10.0 - (double) index21) / 10.0)), spriteEffects, 0.0f); + } + } + if (type == 516) + { + int num183 = TextureAssets.Npc[type].Height() / Main.npcFrameCount[type]; + int num184 = rCurrentNPC.frame.Y / num183; + for (int index22 = 6; index22 >= 0; --index22) + { + ref Vector2 local = ref rCurrentNPC.oldPos[index22]; + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + white.R = (byte) ((int) byte.MaxValue * (10 - index22) / 20); + white.G = (byte) ((int) byte.MaxValue * (10 - index22) / 20); + white.B = (byte) ((int) byte.MaxValue * (10 - index22) / 20); + white.A = (byte) ((int) byte.MaxValue * (10 - index22) / 20); + Microsoft.Xna.Framework.Color color41 = Microsoft.Xna.Framework.Color.Lerp(white, Microsoft.Xna.Framework.Color.Transparent, (float) index22 / 6f); + Microsoft.Xna.Framework.Rectangle frame6 = rCurrentNPC.frame; + int num185 = (num184 - 4 - index22) % 4; + if (num185 < 0) + num185 += 4; + frame6.Y = num183 * num185; + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) rCurrentNPC.oldPos[index22].X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.oldPos[index22].Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(frame6), color41, rCurrentNPC.rotation, halfSize, MathHelper.Lerp(0.35f, 1.2f, (float) ((10.0 - (double) index22) / 10.0)), spriteEffects, 0.0f); + } + } + if (rCurrentNPC.type == 390 && rCurrentNPC.IsABestiaryIconDummy) + { + this.LoadNPC(391); + Texture2D texture2D30 = TextureAssets.Npc[391].Value; + Microsoft.Xna.Framework.Rectangle rectangle8 = texture2D30.Frame(verticalFrames: Main.npcFrameCount[391], frameY: ((int) rCurrentNPC.localAI[3])); + Vector2 vector2_33 = new Vector2((float) (-rCurrentNPC.width - 8), 10f); + mySpriteBatch.Draw(texture2D30, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY) + vector2_33, new Microsoft.Xna.Framework.Rectangle?(rectangle8), rCurrentNPC.GetAlpha(npcColor2), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + Microsoft.Xna.Framework.Rectangle frame7 = rCurrentNPC.frame; + if (type == 182 || type == 289) + frame7.Height -= 2; + if ((uint) (type - 420) > 1U && (uint) (type - 423) > 1U) + { + if (type == 662) + { + float num186 = (float) (4.0 + 2.0 * Math.Cos(6.28318548202515 * (double) Main.GlobalTimeWrappedHourly)); + Vector2 spinningpoint5 = Vector2.UnitX * num186; + Microsoft.Xna.Framework.Color color42 = Microsoft.Xna.Framework.Color.Cyan * (num186 / 12f) * 0.4f; + color42.A /= (byte) 4; + for (float num187 = 0.9f; (double) num187 >= 0.0; num187 -= 0.125f) + { + Vector2 vector2_34 = rCurrentNPC.position - rCurrentNPC.velocity * 10f * num187; + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) vector2_34.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) vector2_34.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), color42 * (1f - num187), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + for (float num188 = 0.0f; (double) num188 < 6.28318548202515; num188 += 1.570796f) + { + Vector2 vector2_35 = rCurrentNPC.position + spinningpoint5.RotatedBy((double) num188); + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) vector2_35.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) vector2_35.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), color42, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + } + } + else + { + float num189 = (float) (9.0 + 3.0 * Math.Cos(6.28318548202515 * (double) Main.GlobalTimeWrappedHourly)); + Vector2 spinningpoint6 = Vector2.UnitX * num189; + Microsoft.Xna.Framework.Color color43 = Microsoft.Xna.Framework.Color.Teal * (num189 / 12f) * 0.8f; + color43.A /= (byte) 2; + for (float num190 = 0.0f; (double) num190 < 6.28318548202515; num190 += 1.570796f) + { + Vector2 vector2_36 = rCurrentNPC.position + spinningpoint6.RotatedBy((double) num190); + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) vector2_36.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) vector2_36.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), color43, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + } + if (rCurrentNPC.aiStyle == 7) + this.DrawNPCExtras(rCurrentNPC, true, addHeight, addY, npcColor2, halfSize, spriteEffects, screenPos); + if (type == 346 && (double) rCurrentNPC.life < (double) rCurrentNPC.lifeMax * 0.5) + { + mySpriteBatch.Draw(TextureAssets.SantaTank.Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), rCurrentNPC.GetAlpha(npcColor2), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + else + { + switch (type) + { + case 356: + --frame7.Height; + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), rCurrentNPC.GetAlpha(npcColor2), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 360: + float num191 = 0.0f; + if ((double) rCurrentNPC.ai[2] == 0.0) + { + if ((double) rCurrentNPC.rotation == 3.14000010490417 || (double) rCurrentNPC.rotation == -3.14000010490417) + addHeight = 2f; + if (rCurrentNPC.direction < 0 && ((double) rCurrentNPC.rotation == 1.57000005245209 || (double) rCurrentNPC.rotation == 4.71000003814697)) + num191 = 1f; + if (rCurrentNPC.direction > 0 && ((double) rCurrentNPC.rotation == 1.57000005245209 || (double) rCurrentNPC.rotation == 4.71000003814697)) + num191 = -1f; + } + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale) + num191, (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), rCurrentNPC.GetAlpha(npcColor2), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 655: + float num192 = 0.0f; + if ((double) rCurrentNPC.ai[2] == 0.0) + { + if ((double) rCurrentNPC.rotation == 3.14000010490417 || (double) rCurrentNPC.rotation == -3.14000010490417) + addHeight = 2f; + if (rCurrentNPC.direction < 0 && ((double) rCurrentNPC.rotation == 1.57000005245209 || (double) rCurrentNPC.rotation == 4.71000003814697)) + num192 = 1f; + if (rCurrentNPC.direction > 0 && ((double) rCurrentNPC.rotation == 1.57000005245209 || (double) rCurrentNPC.rotation == 4.71000003814697)) + num192 = -1f; + } + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale) + num192, (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), rCurrentNPC.GetAlpha(Microsoft.Xna.Framework.Color.Orange), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + default: + if (type == 266 && rCurrentNPC.life < rCurrentNPC.lifeMax && (Main.expertMode || Main.getGoodWorld)) + { + Microsoft.Xna.Framework.Color alpha11 = rCurrentNPC.GetAlpha(npcColor2); + float num193 = (float) (1.0 - (double) rCurrentNPC.life / (double) rCurrentNPC.lifeMax); + float num194 = num193 * num193; + if (Main.getGoodWorld) + num194 = 1f; + alpha11.R = (byte) ((double) alpha11.R * (double) num194); + alpha11.G = (byte) ((double) alpha11.G * (double) num194); + alpha11.B = (byte) ((double) alpha11.B * (double) num194); + alpha11.A = (byte) ((double) alpha11.A * (double) num194); + for (int index23 = 0; index23 < 4; ++index23) + { + Vector2 position42 = rCurrentNPC.position; + float num195 = Math.Abs(rCurrentNPC.Center.X - Main.player[Main.myPlayer].Center.X); + float num196 = Math.Abs(rCurrentNPC.Center.Y - Main.player[Main.myPlayer].Center.Y); + position42.X = index23 == 0 || index23 == 2 ? Main.player[Main.myPlayer].Center.X + num195 : Main.player[Main.myPlayer].Center.X - num195; + position42.X -= (float) (rCurrentNPC.width / 2); + position42.Y = index23 == 0 || index23 == 1 ? Main.player[Main.myPlayer].Center.Y + num196 : Main.player[Main.myPlayer].Center.Y - num196; + position42.Y -= (float) (rCurrentNPC.height / 2); + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) position42.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) position42.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), alpha11, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), rCurrentNPC.GetAlpha(npcColor2), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + } + if (type == 421 && (double) rCurrentNPC.ai[0] == 5.0) + { + Player player = Main.player[rCurrentNPC.target]; + if ((double) player.gravDir == -1.0) + spriteEffects |= SpriteEffects.FlipVertically; + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) (player.direction * 4), player.gfxOffY) + ((double) player.gravDir == 1.0 ? player.Top : player.Bottom) - screenPos, new Microsoft.Xna.Framework.Rectangle?(frame7), rCurrentNPC.GetAlpha(npcColor2), rCurrentNPC.rotation, frame7.Size() / 2f, rCurrentNPC.scale, spriteEffects, 0.0f); + mySpriteBatch.Draw(TextureAssets.GlowMask[146].Value, new Vector2((float) (player.direction * 4), player.gfxOffY) + ((double) player.gravDir == 1.0 ? player.Top : player.Bottom) - screenPos, new Microsoft.Xna.Framework.Rectangle?(frame7), rCurrentNPC.GetAlpha(npcColor2), rCurrentNPC.rotation, frame7.Size() / 2f, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + } + if (type == 518) + { + Vector2 vector2_37 = new Vector2(-10f, 0.0f); + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), rCurrentNPC.GetAlpha(npcColor2), rCurrentNPC.rotation, halfSize + vector2_37, rCurrentNPC.scale, spriteEffects, 0.0f); + if (rCurrentNPC.color != new Microsoft.Xna.Framework.Color()) + { + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), rCurrentNPC.GetColor(npcColor2), rCurrentNPC.rotation, halfSize + vector2_37, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + } + break; + } + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), rCurrentNPC.GetAlpha(npcColor2), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + if (rCurrentNPC.color != new Microsoft.Xna.Framework.Color()) + { + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), rCurrentNPC.GetColor(npcColor2), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + } + break; + } + } + if (rCurrentNPC.confused) + mySpriteBatch.Draw(TextureAssets.Confuse.Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale + (double) addHeight + (double) addY - (double) TextureAssets.Confuse.Height() - 20.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Confuse.Width(), TextureAssets.Confuse.Height())), new Microsoft.Xna.Framework.Color(250, 250, 250, 70), rCurrentNPC.velocity.X * -0.05f, new Vector2((float) (TextureAssets.Confuse.Width() / 2), (float) (TextureAssets.Confuse.Height() / 2)), Main.essScale + 0.2f, SpriteEffects.None, 0.0f); + if (type >= 639 && type <= 645) + mySpriteBatch.Draw(TextureAssets.GlowMask[286].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), rCurrentNPC.GetAlpha(Microsoft.Xna.Framework.Color.White), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + if (type >= 646 && type <= 652) + mySpriteBatch.Draw(TextureAssets.GlowMask[287].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), rCurrentNPC.GetAlpha(Microsoft.Xna.Framework.Color.White), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + if (type >= 134 && type <= 136 && npcColor2 != Microsoft.Xna.Framework.Color.Black) + { + mySpriteBatch.Draw(TextureAssets.Dest[type - 134].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * (float) (1.0 - (double) rCurrentNPC.alpha / (double) byte.MaxValue), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + else + { + switch (type) + { + case 120: + for (int index24 = 1; index24 < rCurrentNPC.oldPos.Length; ++index24) + { + ref Vector2 local = ref rCurrentNPC.oldPos[index24]; + mySpriteBatch.Draw(TextureAssets.Chaos.Value, new Vector2((float) ((double) rCurrentNPC.oldPos[index24].X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.oldPos[index24].Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color() + { + R = (byte) (150 * (10 - index24) / 15), + G = (byte) (100 * (10 - index24) / 15), + B = (byte) (150 * (10 - index24) / 15), + A = (byte) (50 * (10 - index24) / 15) + }, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + break; + case 125: + mySpriteBatch.Draw(TextureAssets.EyeLaser.Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case (int) sbyte.MaxValue: + mySpriteBatch.Draw(TextureAssets.BoneEyes.Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(200, 200, 200, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 131: + mySpriteBatch.Draw(TextureAssets.BoneLaser.Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(200, 200, 200, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 139: + mySpriteBatch.Draw(TextureAssets.Probe.Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + default: + if (type == 137 || type == 138) + { + for (int index25 = 1; index25 < rCurrentNPC.oldPos.Length; ++index25) + { + ref Vector2 local = ref rCurrentNPC.oldPos[index25]; + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) rCurrentNPC.oldPos[index25].X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.oldPos[index25].Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color() + { + R = (byte) (150 * (10 - index25) / 15), + G = (byte) (100 * (10 - index25) / 15), + B = (byte) (150 * (10 - index25) / 15), + A = (byte) (50 * (10 - index25) / 15) + }, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + break; + } + switch (type) + { + case 82: + mySpriteBatch.Draw(TextureAssets.WraithEye.Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), Microsoft.Xna.Framework.Color.White, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + for (int index26 = 1; index26 < 10; ++index26) + { + Microsoft.Xna.Framework.Color color44 = new Microsoft.Xna.Framework.Color(110 - index26 * 10, 110 - index26 * 10, 110 - index26 * 10, 110 - index26 * 10); + mySpriteBatch.Draw(TextureAssets.WraithEye.Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight) - rCurrentNPC.velocity * (float) index26 * 0.5f, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color44, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + break; + case 253: + mySpriteBatch.Draw(TextureAssets.ReaperEye.Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 3.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), Microsoft.Xna.Framework.Color.White, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + for (int index27 = 1; index27 < 20; ++index27) + { + Microsoft.Xna.Framework.Color color45 = new Microsoft.Xna.Framework.Color(210 - index27 * 20, 210 - index27 * 20, 210 - index27 * 20, 210 - index27 * 20); + mySpriteBatch.Draw(TextureAssets.ReaperEye.Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 3.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight) - rCurrentNPC.velocity * (float) index27 * 0.5f, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color45, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + break; + case 325: + mySpriteBatch.Draw(TextureAssets.TreeFace.Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), Microsoft.Xna.Framework.Color.White, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + for (int index28 = 1; index28 < 10; ++index28) + { + Microsoft.Xna.Framework.Color color46 = new Microsoft.Xna.Framework.Color(110 - index28 * 10, 110 - index28 * 10, 110 - index28 * 10, 110 - index28 * 10); + Vector2 vector2_38 = new Vector2((float) Main.rand.Next(-10, 11) * 0.2f, (float) Main.rand.Next(-10, 11) * 0.2f); + mySpriteBatch.Draw(TextureAssets.TreeFace.Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight) + vector2_38, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color46, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + break; + case 327: + mySpriteBatch.Draw(TextureAssets.PumpkingFace.Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), Microsoft.Xna.Framework.Color.White, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + for (int index29 = 1; index29 < 10; ++index29) + { + Microsoft.Xna.Framework.Color color47 = new Microsoft.Xna.Framework.Color(110 - index29 * 10, 110 - index29 * 10, 110 - index29 * 10, 110 - index29 * 10); + Vector2 vector2_39 = new Vector2((float) Main.rand.Next(-10, 11) * 0.2f, (float) Main.rand.Next(-10, 11) * 0.2f); + mySpriteBatch.Draw(TextureAssets.PumpkingFace.Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight) + vector2_39, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color47, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + break; + case 345: + mySpriteBatch.Draw(TextureAssets.IceQueen.Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), Microsoft.Xna.Framework.Color.White, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + for (int index30 = 1; index30 < 5; ++index30) + { + Microsoft.Xna.Framework.Color color48 = new Microsoft.Xna.Framework.Color(100 - index30 * 10, 100 - index30 * 10, 100 - index30 * 10, 100 - index30 * 10); + mySpriteBatch.Draw(TextureAssets.IceQueen.Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight) - rCurrentNPC.velocity * (float) index30 * 0.2f, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color48, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + break; + case 355: + mySpriteBatch.Draw(TextureAssets.Firefly.Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 358: + mySpriteBatch.Draw(TextureAssets.Lightningbug.Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 653: + mySpriteBatch.Draw(TextureAssets.GlowMask[288].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 3.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 654: + mySpriteBatch.Draw(TextureAssets.GlowMask[290].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + default: + if (type == 245 && rCurrentNPC.alpha == 0 && !Main.getGoodWorld) + { + Microsoft.Xna.Framework.Color color49 = new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, 0); + mySpriteBatch.Draw(TextureAssets.Golem[3].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), color49, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + } + if (type == 246 && !Main.getGoodWorld) + { + Microsoft.Xna.Framework.Color color50 = new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, 0); + if (rCurrentNPC.frame.Y < 222) + { + mySpriteBatch.Draw(TextureAssets.Golem[1].Value, new Vector2((float) ((double) rCurrentNPC.Center.X - (double) screenPos.X - 20.0), (float) ((double) rCurrentNPC.Center.Y - (double) screenPos.Y - 27.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Golem[1].Width(), TextureAssets.Golem[1].Height() / 2)), color50, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + Microsoft.Xna.Framework.Rectangle rectangle9 = frame7; + rectangle9.Y = 0; + mySpriteBatch.Draw(TextureAssets.Extra[107].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle9), color50, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + } + if (rCurrentNPC.frame.Y < 444) + { + mySpriteBatch.Draw(TextureAssets.Golem[2].Value, new Vector2((float) ((double) rCurrentNPC.Center.X - (double) screenPos.X + 26.0), (float) ((double) rCurrentNPC.Center.Y - (double) screenPos.Y - 28.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Golem[2].Width(), TextureAssets.Golem[2].Height() / 4)), color50, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + break; + } + mySpriteBatch.Draw(TextureAssets.Golem[2].Value, new Vector2((float) ((double) rCurrentNPC.Center.X - (double) screenPos.X - 38.0), (float) ((double) rCurrentNPC.Center.Y - (double) screenPos.Y - 28.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, TextureAssets.Golem[2].Height() / 2, TextureAssets.Golem[2].Width(), TextureAssets.Golem[2].Height() / 4)), color50, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + break; + } + if (type == 249 && !Main.getGoodWorld) + { + Microsoft.Xna.Framework.Color color51 = new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, 0); + mySpriteBatch.Draw(TextureAssets.Golem[1].Value, new Vector2((float) ((double) rCurrentNPC.Center.X - (double) screenPos.X - 20.0), (float) ((double) rCurrentNPC.Center.Y - (double) screenPos.Y - 47.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Golem[1].Width(), TextureAssets.Golem[1].Height() / 2)), color51, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + int num197 = (int) rCurrentNPC.frameCounter / 4; + Texture2D texture2D31 = TextureAssets.Extra[106].Value; + Microsoft.Xna.Framework.Rectangle rectangle10 = texture2D31.Frame(verticalFrames: 8); + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + rectangle10.Y += rectangle10.Height * 2 * num197 + frame7.Y; + mySpriteBatch.Draw(texture2D31, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle10), color51, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + Texture2D texture35 = TextureAssets.Extra[107].Value; + Microsoft.Xna.Framework.Rectangle rectangle11 = frame7; + mySpriteBatch.Draw(texture35, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle11), color51, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + } + switch (type) + { + case 381: + Vector2 zero1 = Vector2.Zero; + Vector2 origin33 = Vector2.Zero; + int num198 = TextureAssets.Npc[type].Height() / Main.npcFrameCount[type]; + int num199 = rCurrentNPC.frame.Y / num198; + Microsoft.Xna.Framework.Rectangle rectangle12 = new Microsoft.Xna.Framework.Rectangle(0, 0, 32, 42); + switch (num199) + { + case 0: + zero1 += new Vector2(8f, 32f); + break; + case 1: + zero1 += new Vector2(6f, 72f); + break; + case 2: + zero1 += new Vector2(8f, 126f); + break; + case 3: + zero1 += new Vector2(6f, 174f); + break; + case 4: + zero1 += new Vector2(6f, 224f); + break; + case 5: + zero1 += new Vector2(8f, 272f); + break; + case 6: + zero1 += new Vector2(10f, 318f); + break; + case 7: + zero1 += new Vector2(14f, 366f); + break; + case 8: + zero1 += new Vector2(10f, 414f); + break; + } + zero1.Y -= (float) (num198 * num199); + Vector2 vector2_40 = zero1 - halfSize; + int num200 = 2; + if ((double) rCurrentNPC.ai[2] > 0.0) + num200 = (int) rCurrentNPC.ai[2] - 1; + if ((double) rCurrentNPC.velocity.Y != 0.0) + num200 = 3; + rectangle12.Y += 44 * num200; + switch (num200) + { + case 0: + origin33 = new Vector2(10f, 18f); + break; + case 1: + origin33 = new Vector2(8f, 20f); + break; + case 2: + origin33 = new Vector2(8f, 20f); + break; + case 3: + origin33 = new Vector2(8f, 20f); + break; + case 4: + origin33 = new Vector2(6f, 18f); + break; + } + if (spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + { + vector2_40.X *= -1f; + origin33.X = (float) rectangle12.Width - origin33.X; + } + Vector2 position43 = vector2_40 + rCurrentNPC.Center - screenPos; + position43.Y += rCurrentNPC.gfxOffY; + mySpriteBatch.Draw(TextureAssets.Extra[0].Value, position43, new Microsoft.Xna.Framework.Rectangle?(rectangle12), npcColor2, rCurrentNPC.rotation, origin33, rCurrentNPC.scale, spriteEffects, 0.0f); + mySpriteBatch.Draw(TextureAssets.GlowMask[24].Value, position43, new Microsoft.Xna.Framework.Rectangle?(rectangle12), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), rCurrentNPC.rotation, origin33, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 382: + Vector2 zero2 = Vector2.Zero; + Vector2 origin34 = Vector2.Zero; + int num201 = TextureAssets.Npc[type].Height() / Main.npcFrameCount[type]; + int num202 = rCurrentNPC.frame.Y / num201; + Microsoft.Xna.Framework.Rectangle rectangle13 = new Microsoft.Xna.Framework.Rectangle(0, 0, 30, 42); + switch (num202) + { + case 0: + zero2 += new Vector2(8f, 30f); + break; + case 1: + zero2 += new Vector2(6f, 68f); + break; + case 2: + zero2 += new Vector2(8f, 120f); + break; + case 3: + zero2 += new Vector2(6f, 166f); + break; + case 4: + zero2 += new Vector2(6f, 214f); + break; + case 5: + zero2 += new Vector2(8f, 260f); + break; + case 6: + zero2 += new Vector2(14f, 304f); + break; + case 7: + zero2 += new Vector2(14f, 350f); + break; + case 8: + zero2 += new Vector2(10f, 396f); + break; + } + zero2.Y -= (float) (num201 * num202); + Vector2 vector2_41 = zero2 - halfSize; + int num203 = 2; + if ((double) rCurrentNPC.ai[2] > 0.0) + num203 = (int) rCurrentNPC.ai[2] - 1; + if ((double) rCurrentNPC.velocity.Y != 0.0) + num203 = 3; + rectangle13.Y += 44 * num203; + switch (num203) + { + case 0: + origin34 = new Vector2(10f, 18f); + break; + case 1: + origin34 = new Vector2(8f, 20f); + break; + case 2: + origin34 = new Vector2(8f, 20f); + break; + case 3: + origin34 = new Vector2(8f, 20f); + break; + case 4: + origin34 = new Vector2(6f, 18f); + break; + } + if (spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + { + vector2_41.X *= -1f; + origin34.X = (float) rectangle13.Width - origin34.X; + } + Vector2 position44 = vector2_41 + rCurrentNPC.Center - screenPos; + position44.Y += rCurrentNPC.gfxOffY; + mySpriteBatch.Draw(TextureAssets.Extra[1].Value, position44, new Microsoft.Xna.Framework.Rectangle?(rectangle13), npcColor2, rCurrentNPC.rotation, origin34, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 383: + mySpriteBatch.Draw(TextureAssets.GlowMask[11].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + if ((double) rCurrentNPC.ai[2] != 0.0 && Main.npc[(int) rCurrentNPC.ai[2] - 1].active && Main.npc[(int) rCurrentNPC.ai[2] - 1].type == 384) + { + double num204 = (double) rCurrentNPC.ai[2]; + mySpriteBatch.Draw(TextureAssets.Npc[384].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color(100, 100, 100, 0), rCurrentNPC.rotation, new Vector2((float) TextureAssets.Npc[384].Width(), (float) TextureAssets.Npc[384].Height()) / 2f, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + } + break; + case 386: + mySpriteBatch.Draw(TextureAssets.GlowMask[31].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 387: + Microsoft.Xna.Framework.Color color52 = new Microsoft.Xna.Framework.Color(1f, 1f, 1f, 1f) * 0.75f; + if ((double) rCurrentNPC.ai[0] > 0.0) + { + float amount16 = (float) (((double) rCurrentNPC.ai[0] + 1.0) / 60.0); + color52 = Microsoft.Xna.Framework.Color.Lerp(color52, Microsoft.Xna.Framework.Color.White, amount16); + color52.A = (byte) MathHelper.Lerp((float) color52.A, 0.0f, amount16); + } + Microsoft.Xna.Framework.Color color53 = color52 * (float) (((double) byte.MaxValue - (double) rCurrentNPC.alpha) / (double) byte.MaxValue); + mySpriteBatch.Draw(TextureAssets.GlowMask[32].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), color53, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 388: + mySpriteBatch.Draw(TextureAssets.GlowMask[33].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 389: + mySpriteBatch.Draw(TextureAssets.GlowMask[34].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 520: + mySpriteBatch.Draw(TextureAssets.GlowMask[164].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + Vector2 zero3 = Vector2.Zero; + Vector2 origin35 = new Vector2(4f, 4f); + int num205 = TextureAssets.Npc[type].Height() / Main.npcFrameCount[type]; + int num206 = rCurrentNPC.frame.Y / num205; + if (spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + { + zero3.X *= -1f; + origin35.X = (float) TextureAssets.Extra[56].Width() - origin35.X; + } + Vector2 position45 = zero3 + (rCurrentNPC.Top + new Vector2(0.0f, 20f)) - screenPos; + position45.Y += rCurrentNPC.gfxOffY; + float rotation3 = rCurrentNPC.localAI[3]; + if (spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + rotation3 += 3.141593f; + mySpriteBatch.Draw(TextureAssets.Extra[56].Value, position45, new Microsoft.Xna.Framework.Rectangle?(), npcColor2, rotation3, origin35, rCurrentNPC.scale, spriteEffects, 0.0f); + mySpriteBatch.Draw(TextureAssets.GlowMask[165].Value, position45, new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), rotation3, origin35, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + default: + if (type == 4 && (double) rCurrentNPC.ai[1] >= 4.0 && (double) rCurrentNPC.ai[0] == 3.0) + { + for (int index31 = 1; index31 < rCurrentNPC.oldPos.Length; ++index31) + { + ref Vector2 local = ref rCurrentNPC.oldPos[index31]; + Microsoft.Xna.Framework.Color color54 = npcColor2; + color54.R = (byte) (0.5 * (double) color54.R * (double) (10 - index31) / 20.0); + color54.G = (byte) (0.5 * (double) color54.G * (double) (10 - index31) / 20.0); + color54.B = (byte) (0.5 * (double) color54.B * (double) (10 - index31) / 20.0); + color54.A = (byte) (0.5 * (double) color54.A * (double) (10 - index31) / 20.0); + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) rCurrentNPC.oldPos[index31].X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.oldPos[index31].Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color54, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + break; + } + if (type == 437) + { + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + white.A = (byte) 200; + mySpriteBatch.Draw(TextureAssets.GlowMask[109].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(frame7), white, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + mySpriteBatch.Draw(TextureAssets.GlowMask[108].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + addY + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(), white, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + } + if (type == 471 && (double) rCurrentNPC.ai[3] < 0.0) + { + for (int index32 = 1; index32 < rCurrentNPC.oldPos.Length; ++index32) + { + ref Vector2 local = ref rCurrentNPC.oldPos[index32]; + Microsoft.Xna.Framework.Color color55 = npcColor2; + color55.R = (byte) (0.5 * (double) color55.R * (double) (10 - index32) / 20.0); + color55.G = (byte) (0.5 * (double) color55.G * (double) (10 - index32) / 20.0); + color55.B = (byte) (0.5 * (double) color55.B * (double) (10 - index32) / 20.0); + color55.A = (byte) (0.5 * (double) color55.A * (double) (10 - index32) / 20.0); + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) rCurrentNPC.oldPos[index32].X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.oldPos[index32].Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color55, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + break; + } + if (type == 477 && (double) rCurrentNPC.velocity.Length() > 9.0) + { + for (int index33 = 1; index33 < rCurrentNPC.oldPos.Length; ++index33) + { + ref Vector2 local = ref rCurrentNPC.oldPos[index33]; + Microsoft.Xna.Framework.Color color56 = npcColor2; + color56.R = (byte) (0.5 * (double) color56.R * (double) (10 - index33) / 20.0); + color56.G = (byte) (0.5 * (double) color56.G * (double) (10 - index33) / 20.0); + color56.B = (byte) (0.5 * (double) color56.B * (double) (10 - index33) / 20.0); + color56.A = (byte) (0.5 * (double) color56.A * (double) (10 - index33) / 20.0); + Microsoft.Xna.Framework.Rectangle frame8 = rCurrentNPC.frame; + int num207 = TextureAssets.Npc[type].Height() / Main.npcFrameCount[type]; + frame8.Y -= num207 * index33; + while (frame8.Y < 0) + frame8.Y += num207 * Main.npcFrameCount[type]; + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) rCurrentNPC.oldPos[index33].X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.oldPos[index33].Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(frame8), color56, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + break; + } + break; + } + break; + } + break; + } + } + if (type == 479 && (double) rCurrentNPC.velocity.Length() > 6.5) + { + for (int index34 = 1; index34 < rCurrentNPC.oldPos.Length; ++index34) + { + ref Vector2 local = ref rCurrentNPC.oldPos[index34]; + Microsoft.Xna.Framework.Color color57 = npcColor2; + color57.R = (byte) (0.5 * (double) color57.R * (double) (10 - index34) / 20.0); + color57.G = (byte) (0.5 * (double) color57.G * (double) (10 - index34) / 20.0); + color57.B = (byte) (0.5 * (double) color57.B * (double) (10 - index34) / 20.0); + color57.A = (byte) (0.5 * (double) color57.A * (double) (10 - index34) / 20.0); + Microsoft.Xna.Framework.Rectangle frame9 = rCurrentNPC.frame; + int num208 = TextureAssets.Npc[type].Height() / Main.npcFrameCount[type]; + frame9.Y -= num208 * index34; + while (frame9.Y < 0) + frame9.Y += num208 * Main.npcFrameCount[type]; + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) rCurrentNPC.oldPos[index34].X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.oldPos[index34].Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(frame9), color57, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + } + else if (type == 472) + mySpriteBatch.Draw(TextureAssets.GlowMask[110].Value, new Vector2((float) ((double) rCurrentNPC.position.X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.position.Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + else if (rCurrentNPC.aiStyle == 87) + { + if ((int) rCurrentNPC.ai[0] == 4 || (double) rCurrentNPC.ai[0] == 5.0 || (double) rCurrentNPC.ai[0] == 6.0) + { + for (int index35 = 1; index35 < rCurrentNPC.oldPos.Length; ++index35) + { + ref Vector2 local = ref rCurrentNPC.oldPos[index35]; + Microsoft.Xna.Framework.Color color58 = npcColor2; + color58.R = (byte) (0.5 * (double) color58.R * (double) (10 - index35) / 20.0); + color58.G = (byte) (0.5 * (double) color58.G * (double) (10 - index35) / 20.0); + color58.B = (byte) (0.5 * (double) color58.B * (double) (10 - index35) / 20.0); + color58.A = (byte) (0.5 * (double) color58.A * (double) (10 - index35) / 20.0); + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, new Vector2((float) ((double) rCurrentNPC.oldPos[index35].X - (double) screenPos.X + (double) (rCurrentNPC.width / 2) - (double) TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) rCurrentNPC.oldPos[index35].Y - (double) screenPos.Y + (double) rCurrentNPC.height - (double) TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color58, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + } + } + } + else + { + switch (type) + { + case 50: + Texture2D texture2D32 = TextureAssets.Extra[39].Value; + Vector2 center5 = rCurrentNPC.Center; + float num209 = 0.0f; + switch (rCurrentNPC.frame.Y / (TextureAssets.Npc[type].Height() / Main.npcFrameCount[type])) + { + case 0: + num209 = 2f; + break; + case 1: + num209 = -6f; + break; + case 2: + num209 = 2f; + break; + case 3: + num209 = 10f; + break; + case 4: + num209 = 2f; + break; + case 5: + num209 = 0.0f; + break; + } + center5.Y += rCurrentNPC.gfxOffY - (70f - num209) * rCurrentNPC.scale; + mySpriteBatch.Draw(texture2D32, center5 - screenPos, new Microsoft.Xna.Framework.Rectangle?(), npcColor2, 0.0f, texture2D32.Size() / 2f, 1f, spriteEffects, 0.0f); + break; + case 405: + mySpriteBatch.Draw(TextureAssets.GlowMask[141].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 406: + mySpriteBatch.Draw(TextureAssets.GlowMask[142].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 407: + mySpriteBatch.Draw(TextureAssets.GlowMask[139].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 409: + mySpriteBatch.Draw(TextureAssets.GlowMask[138].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 410: + mySpriteBatch.Draw(TextureAssets.GlowMask[137].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 411: + mySpriteBatch.Draw(TextureAssets.GlowMask[136].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 418: + mySpriteBatch.Draw(TextureAssets.GlowMask[161].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + vector3 = rCurrentNPC.GetAlpha(npcColor2).ToVector3() - new Vector3(0.5f); + float num210 = (float) (0.25 + (double) vector3.Length() * 0.25); + for (int index36 = 0; index36 < 4; ++index36) + mySpriteBatch.Draw(TextureAssets.GlowMask[161].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY) + rCurrentNPC.velocity.RotatedBy((double) index36 * 1.57079637050629) * num210, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 420: + mySpriteBatch.Draw(TextureAssets.GlowMask[147].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 421: + mySpriteBatch.Draw(TextureAssets.GlowMask[146].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 423: + mySpriteBatch.Draw(TextureAssets.GlowMask[145].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 424: + mySpriteBatch.Draw(TextureAssets.GlowMask[144].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 425: + mySpriteBatch.Draw(TextureAssets.GlowMask[150].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 429: + mySpriteBatch.Draw(TextureAssets.GlowMask[151].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + default: + if (type >= 412 && type <= 414) + { + Microsoft.Xna.Framework.Color color59 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, 0); + int index37 = 157 + type - 412; + if (type == 414 && (double) rCurrentNPC.localAI[2] != 0.0) + { + int num211 = (int) rCurrentNPC.localAI[2]; + if ((double) rCurrentNPC.localAI[2] < 0.0) + num211 = 128 + (int) rCurrentNPC.localAI[2]; + int num212 = (int) byte.MaxValue - num211; + color59 = new Microsoft.Xna.Framework.Color(num212, num211, num211, num212); + } + mySpriteBatch.Draw(TextureAssets.GlowMask[index37].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color59, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + } + switch (type) + { + case 160: + mySpriteBatch.Draw(TextureAssets.GlowMask[166].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 209: + mySpriteBatch.Draw(TextureAssets.GlowMask[167].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 128 - rCurrentNPC.alpha / 2, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 315: + float num213 = 2f; + for (int index38 = 0; index38 < 4; ++index38) + mySpriteBatch.Draw(TextureAssets.GlowMask[(int) byte.MaxValue].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY) + Vector2.UnitX.RotatedBy((double) index38 * 1.57079637050629) * num213, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + mySpriteBatch.Draw(TextureAssets.GlowMask[(int) byte.MaxValue].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(200, 200, 200, 200), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 344: + mySpriteBatch.Draw(TextureAssets.GlowMask[253].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(200, 200, 200, 100) * 0.5f, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 346: + float num214 = 4f; + for (int index39 = 0; index39 < 4; ++index39) + mySpriteBatch.Draw(TextureAssets.GlowMask[254].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY) + Vector2.UnitX.RotatedBy((double) index39 * 1.57079637050629) * num214, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + mySpriteBatch.Draw(TextureAssets.GlowMask[254].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(200, 200, 200, 100), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 415: + mySpriteBatch.Draw(TextureAssets.GlowMask[155].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + vector3 = rCurrentNPC.GetAlpha(npcColor2).ToVector3() - new Vector3(0.5f); + float num215 = (float) (0.5 + (double) vector3.Length() * 0.5); + for (int index40 = 0; index40 < 4; ++index40) + mySpriteBatch.Draw(TextureAssets.GlowMask[155].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY) + rCurrentNPC.velocity.RotatedBy((double) index40 * 1.57079637050629) * num215, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 417: + mySpriteBatch.Draw(TextureAssets.GlowMask[160].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + vector3 = rCurrentNPC.GetAlpha(npcColor2).ToVector3() - new Vector3(0.5f); + float num216 = (float) (0.25 + (double) vector3.Length() * 0.25); + for (int index41 = 0; index41 < 4; ++index41) + mySpriteBatch.Draw(TextureAssets.GlowMask[160].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY) + rCurrentNPC.velocity.RotatedBy((double) index41 * 1.57079637050629) * num216, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 419: + mySpriteBatch.Draw(TextureAssets.GlowMask[154].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + if ((double) rCurrentNPC.ai[2] >= -6.0) + { + vector3 = rCurrentNPC.GetAlpha(npcColor2).ToVector3() - new Vector3(0.5f); + float num217 = (float) (0.5 + (double) vector3.Length() * 0.5); + for (int index42 = 0; index42 < 4; ++index42) + mySpriteBatch.Draw(TextureAssets.GlowMask[154].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY) + rCurrentNPC.velocity.RotatedBy((double) index42 * 1.57079637050629) * num217, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + } + float num218 = 4f; + for (int index43 = 0; index43 < 4; ++index43) + mySpriteBatch.Draw(TextureAssets.GlowMask[154].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY) + Vector2.UnitX.RotatedBy((double) index43 * 1.57079637050629) * num218, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 516: + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + vector3 = rCurrentNPC.GetAlpha(npcColor2).ToVector3() - new Vector3(0.5f); + float num219 = (float) (0.5 + (double) vector3.Length() * 0.5); + for (int index44 = 0; index44 < 4; ++index44) + mySpriteBatch.Draw(TextureAssets.Npc[type].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY) + rCurrentNPC.velocity.RotatedBy((double) index44 * 1.57079637050629) * num219, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 518: + Vector2 vector2_42 = new Vector2(-10f, 0.0f); + mySpriteBatch.Draw(TextureAssets.GlowMask[163].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha, (int) byte.MaxValue - rCurrentNPC.alpha), rCurrentNPC.rotation, halfSize + vector2_42, rCurrentNPC.scale, spriteEffects, 0.0f); + vector3 = rCurrentNPC.GetAlpha(npcColor2).ToVector3() - new Vector3(0.5f); + float num220 = (float) (0.5 + (double) vector3.Length() * 0.5); + for (int index45 = 0; index45 < 4; ++index45) + mySpriteBatch.Draw(TextureAssets.GlowMask[163].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY) + rCurrentNPC.velocity.RotatedBy((double) index45 * 1.57079637050629) * num220, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(64, 64, 64, 0), rCurrentNPC.rotation, halfSize + vector2_42, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 525: + mySpriteBatch.Draw(TextureAssets.GlowMask[169].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(200, 200, 200, 100), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 526: + mySpriteBatch.Draw(TextureAssets.GlowMask[170].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(200, 200, 200, 100), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 527: + mySpriteBatch.Draw(TextureAssets.GlowMask[171].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color(200, 200, 200, 100), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + case 533: + mySpriteBatch.Draw(TextureAssets.GlowMask[172].Value, rCurrentNPC.Bottom - screenPos + new Vector2((float) ((double) -TextureAssets.Npc[type].Width() * (double) rCurrentNPC.scale / 2.0 + (double) halfSize.X * (double) rCurrentNPC.scale), (float) ((double) -TextureAssets.Npc[type].Height() * (double) rCurrentNPC.scale / (double) Main.npcFrameCount[type] + 4.0 + (double) halfSize.Y * (double) rCurrentNPC.scale) + addHeight + rCurrentNPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 100), rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, spriteEffects, 0.0f); + break; + } + break; + } + } + if (rCurrentNPC.aiStyle != 7) + return; + this.DrawNPCExtras(rCurrentNPC, false, addHeight, addY, npcColor2, halfSize, spriteEffects, screenPos); + return; + } + } + } + } + } + + private static void DrawNPCDirect_HallowBoss( + SpriteBatch mySpriteBatch, + NPC rCurrentNPC, + ref Vector2 screenPos, + int typeCache, + ref Microsoft.Xna.Framework.Color npcColor, + ref Vector2 halfSize, + SpriteEffects npcSpriteEffect) + { + Texture2D texture1 = TextureAssets.Npc[typeCache].Value; + Vector2 position1 = rCurrentNPC.Center - screenPos; + bool flag = rCurrentNPC.AI_120_HallowBoss_IsInPhase2(); + int num1 = (int) rCurrentNPC.ai[0]; + Texture2D texture2D1 = TextureAssets.Extra[159].Value; + Microsoft.Xna.Framework.Rectangle r1 = texture2D1.Frame(verticalFrames: 11, frameY: ((int) ((double) rCurrentNPC.localAI[0] / 4.0) % 11)); + Microsoft.Xna.Framework.Color color1 = rCurrentNPC.GetAlpha(npcColor); + Texture2D texture2D2 = TextureAssets.Extra[158].Value; + Texture2D texture2D3 = TextureAssets.Extra[160].Value; + Texture2D texture2 = TextureAssets.Extra[157].Value; + int armFrame_Count; + int armFrameToUseLeft; + int armFrameToUseRight; + Main.DrawNPCDirect_GetHallowBossArmFrame(rCurrentNPC, out armFrame_Count, out armFrameToUseLeft, out armFrameToUseRight); + Microsoft.Xna.Framework.Rectangle r2 = texture2D2.Frame(verticalFrames: armFrame_Count, frameY: armFrameToUseLeft); + Microsoft.Xna.Framework.Rectangle r3 = texture2D3.Frame(verticalFrames: armFrame_Count, frameY: armFrameToUseRight); + Vector2 origin1 = r2.Size() / 2f; + Vector2 origin2 = r3.Size() / 2f; + int num2 = 0; + int num3 = 0; + if (armFrameToUseLeft == 5) + num2 = 1; + if (armFrameToUseRight == 5) + num3 = 1; + float num4 = 1f; + int num5 = 0; + int num6 = 0; + float amount1 = 0.0f; + float num7 = 0.0f; + float num8 = 0.0f; + if (num1 == 8 || num1 == 9) + { + amount1 = Utils.GetLerpValue(0.0f, 30f, rCurrentNPC.ai[1], true) * Utils.GetLerpValue(90f, 30f, rCurrentNPC.ai[1], true); + num7 = Utils.GetLerpValue(0.0f, 30f, rCurrentNPC.ai[1], true) * Utils.GetLerpValue(90f, 70f, rCurrentNPC.ai[1], true); + num8 = Utils.GetLerpValue(0.0f, 15f, rCurrentNPC.ai[1], true) * Utils.GetLerpValue(45f, 30f, rCurrentNPC.ai[1], true); + color1 = Microsoft.Xna.Framework.Color.Lerp(color1, Microsoft.Xna.Framework.Color.White, amount1); + num4 *= 1f - num8; + num5 = 4; + num6 = 3; + } + if (num1 == 10) + { + amount1 = Utils.GetLerpValue(30f, 90f, rCurrentNPC.ai[1], true) * Utils.GetLerpValue(165f, 90f, rCurrentNPC.ai[1], true); + num7 = Utils.GetLerpValue(0.0f, 60f, rCurrentNPC.ai[1], true) * Utils.GetLerpValue(180f, 120f, rCurrentNPC.ai[1], true); + num8 = Utils.GetLerpValue(0.0f, 60f, rCurrentNPC.ai[1], true) * Utils.GetLerpValue(180f, 120f, rCurrentNPC.ai[1], true); + color1 = Microsoft.Xna.Framework.Color.Lerp(color1, Microsoft.Xna.Framework.Color.White, amount1); + num4 *= 1f - num8; + num6 = 4; + } + if (num6 + num5 > 0) + { + for (int index1 = -num6; index1 <= num6 + num5; ++index1) + { + if (index1 != 0) + { + Microsoft.Xna.Framework.Color color2 = Microsoft.Xna.Framework.Color.White; + Vector2 position2 = position1; + if (num1 == 8 || num1 == 9) + { + double num9 = (double) ((float) index1 + 5f) / 10.0; + float num10 = 200f; + float num11 = (float) Main.timeForVisualEffects / 60f; + Vector3 vector3 = Vector3.Transform(Vector3.Forward, Matrix.CreateRotationX((float) (((double) num11 - 0.300000011920929 + (double) index1 * 0.100000001490116) * 0.699999988079071 * 6.28318548202515)) * Matrix.CreateRotationY((float) (((double) num11 - 0.800000011920929 + (double) index1 * 0.300000011920929) * 0.699999988079071 * 6.28318548202515)) * Matrix.CreateRotationZ((float) (((double) num11 + (double) index1 * 0.5) * 0.100000001490116 * 6.28318548202515))); + float num12 = num10 + Utils.GetLerpValue(-1f, 1f, vector3.Z, true) * 150f; + Vector2 spinningpoint = new Vector2(vector3.X, vector3.Y) * num12 * amount1; + double num13 = (double) MathHelper.Lerp(0.5f, 1f, Utils.GetLerpValue(90f, 0.0f, rCurrentNPC.ai[1], true)); + color2 = Main.hslToRgb((float) num9, 1f, (float) num13) * 0.8f * num7; + color2.A /= (byte) 3; + position2 += spinningpoint.RotatedBy((double) rCurrentNPC.ai[1] / 180.0 * 6.28318548202515); + } + if (num1 == 10) + { + if ((double) rCurrentNPC.ai[1] >= 90.0) + { + float num14 = (float) Main.timeForVisualEffects / 90f; + int num15 = index1; + if (num15 < 0) + ++num15; + Vector2 rotationVector2 = ((float) (((double) num15 + 0.5) * 0.785398185253143 + 6.28318548202515 * (double) num14)).ToRotationVector2(); + position2 += rotationVector2 * new Vector2(600f * amount1, 150f * amount1); + } + else + position2 += 200f * new Vector2((float) index1, 0.0f) * amount1; + color2 = Microsoft.Xna.Framework.Color.White * 0.8f * num7 * num4; + color2.A /= (byte) 3; + } + if (index1 > num6) + { + float lerpValue = Utils.GetLerpValue(30f, 70f, rCurrentNPC.ai[1], true); + if ((double) lerpValue != 0.0) + { + position2 = position1 + rCurrentNPC.velocity * -3f * ((float) index1 - 4f) * lerpValue; + color2 *= 1f - num8; + } + else + continue; + } + mySpriteBatch.Draw(texture2D1, position2, new Microsoft.Xna.Framework.Rectangle?(r1), color2, rCurrentNPC.rotation, r1.Size() / 2f, rCurrentNPC.scale * 2f, npcSpriteEffect, 0.0f); + mySpriteBatch.Draw(texture2, position2, new Microsoft.Xna.Framework.Rectangle?(r1), color2, rCurrentNPC.rotation, r1.Size() / 2f, rCurrentNPC.scale * 2f, npcSpriteEffect, 0.0f); + if (flag) + { + Texture2D texture2D4 = TextureAssets.Extra[187].Value; + Microsoft.Xna.Framework.Rectangle rectangle = texture2D4.Frame(verticalFrames: 8, frameY: ((int) ((double) rCurrentNPC.localAI[0] / 4.0) % 8)); + mySpriteBatch.Draw(texture2D4, position2, new Microsoft.Xna.Framework.Rectangle?(rectangle), color2, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, npcSpriteEffect, 0.0f); + } + mySpriteBatch.Draw(texture1, position2, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color2, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, npcSpriteEffect, 0.0f); + for (int index2 = 0; index2 < 2; ++index2) + { + if (index2 == num2) + mySpriteBatch.Draw(texture2D2, position2, new Microsoft.Xna.Framework.Rectangle?(r2), color2, rCurrentNPC.rotation, origin1, rCurrentNPC.scale, npcSpriteEffect, 0.0f); + if (index2 == num3) + mySpriteBatch.Draw(texture2D3, position2, new Microsoft.Xna.Framework.Rectangle?(r3), color2, rCurrentNPC.rotation, origin2, rCurrentNPC.scale, npcSpriteEffect, 0.0f); + } + } + } + } + Microsoft.Xna.Framework.Color color3 = color1 * num4; + mySpriteBatch.Draw(texture2D1, position1, new Microsoft.Xna.Framework.Rectangle?(r1), color3, rCurrentNPC.rotation, r1.Size() / 2f, rCurrentNPC.scale * 2f, npcSpriteEffect, 0.0f); + if (!rCurrentNPC.IsABestiaryIconDummy) + { + mySpriteBatch.End(); + mySpriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.Default, RasterizerState.CullNone, (Effect) null, Main.Transform); + } + DrawData drawData = new DrawData(texture2, position1, new Microsoft.Xna.Framework.Rectangle?(r1), color3, rCurrentNPC.rotation, r1.Size() / 2f, rCurrentNPC.scale * 2f, npcSpriteEffect, 0); + GameShaders.Misc["HallowBoss"].Apply(new DrawData?(drawData)); + drawData.Draw(mySpriteBatch); + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + if (!rCurrentNPC.IsABestiaryIconDummy) + { + mySpriteBatch.End(); + mySpriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + } + float amount2 = (float) (Math.Sin((double) Main.GlobalTimeWrappedHourly * 6.28318548202515 * 0.5) * 0.5 + 0.5); + Microsoft.Xna.Framework.Color color4 = Main.hslToRgb((float) (((double) amount2 * 0.0799999982118607 + 0.600000023841858) % 1.0), 1f, 0.5f); + color4.A = (byte) 0; + color4 *= 0.6f; + if (NPC.ShouldEmpressBeEnraged()) + { + color4 = Main.OurFavoriteColor; + color4.A = (byte) 0; + color4 *= 0.3f; + } + color4 *= num4 * rCurrentNPC.Opacity; + if (flag) + { + Texture2D texture2D5 = TextureAssets.Extra[187].Value; + Microsoft.Xna.Framework.Rectangle rectangle = texture2D5.Frame(verticalFrames: 8, frameY: ((int) ((double) rCurrentNPC.localAI[0] / 4.0) % 8)); + mySpriteBatch.Draw(texture2D5, position1, new Microsoft.Xna.Framework.Rectangle?(rectangle), color3, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, npcSpriteEffect, 0.0f); + for (float num16 = 0.0f; (double) num16 < 1.0; num16 += 0.25f) + { + Vector2 vector2 = rCurrentNPC.rotation.ToRotationVector2().RotatedBy((double) num16 * 6.28318548202515 + 0.785398185253143) * MathHelper.Lerp(2f, 8f, amount2); + mySpriteBatch.Draw(texture2D5, position1 + vector2, new Microsoft.Xna.Framework.Rectangle?(rectangle), color4, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, npcSpriteEffect, 0.0f); + } + } + mySpriteBatch.Draw(texture1, position1, new Microsoft.Xna.Framework.Rectangle?(rCurrentNPC.frame), color3, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, npcSpriteEffect, 0.0f); + if (flag) + { + Texture2D texture3 = TextureAssets.Extra[188].Value; + for (float num17 = 0.0f; (double) num17 < 1.0; num17 += 0.25f) + { + Vector2 vector2 = rCurrentNPC.rotation.ToRotationVector2().RotatedBy((double) num17 * 6.28318548202515 + 0.785398185253143) * MathHelper.Lerp(2f, 8f, amount2); + mySpriteBatch.Draw(texture3, position1 + vector2, new Microsoft.Xna.Framework.Rectangle?(), color4, rCurrentNPC.rotation, halfSize, rCurrentNPC.scale, npcSpriteEffect, 0.0f); + } + } + for (int index = 0; index < 2; ++index) + { + if (index == num2) + mySpriteBatch.Draw(texture2D2, position1, new Microsoft.Xna.Framework.Rectangle?(r2), color3, rCurrentNPC.rotation, origin1, rCurrentNPC.scale, npcSpriteEffect, 0.0f); + if (index == num3) + mySpriteBatch.Draw(texture2D3, position1, new Microsoft.Xna.Framework.Rectangle?(r3), color3, rCurrentNPC.rotation, origin2, rCurrentNPC.scale, npcSpriteEffect, 0.0f); + } + } + + private static void DrawNPCDirect_GetHallowBossArmFrame( + NPC rCurrentNPC, + out int armFrame_Count, + out int armFrameToUseLeft, + out int armFrameToUseRight) + { + int num1 = 0; + int num2 = 1; + int num3 = 2; + int num4 = 3; + int num5 = 4; + int num6 = 5; + int num7 = 6; + armFrame_Count = 7; + armFrameToUseLeft = num1; + armFrameToUseRight = num1; + float num8 = rCurrentNPC.ai[1]; + switch ((int) rCurrentNPC.ai[0]) + { + case 0: + int num9 = (double) num8 >= 106.0 ? ((double) num8 >= 110.0 ? num1 : num3) : num2; + armFrameToUseLeft = num9; + armFrameToUseRight = num9; + break; + case 2: + case 11: + int num10 = (double) num8 >= 5.0 ? ((double) num8 >= 65.0 ? num3 : num4) : num3; + armFrameToUseLeft = num10; + break; + case 4: + case 10: + int num11 = (double) num8 >= 6.0 ? ((double) num8 >= 54.0 ? num3 : num4) : num3; + armFrameToUseLeft = num11; + armFrameToUseRight = num11; + break; + case 5: + int num12 = (double) num8 >= 6.0 ? ((double) num8 >= 54.0 ? num3 : num4) : num3; + armFrameToUseRight = num12; + break; + case 6: + int num13 = (double) num8 >= 6.0 ? ((double) num8 >= 174.0 ? ((double) num8 >= 180.0 ? num1 : num3) : num4) : num3; + armFrameToUseLeft = num13; + armFrameToUseRight = num13; + break; + case 7: + bool isExpertMode = Main.GameModeInfo.IsExpertMode; + int num14 = isExpertMode ? 40 : 60; + int num15 = 0; + int num16 = 5; + if ((double) num8 < (double) (num15 + num16)) + { + armFrameToUseLeft = num3; + break; + } + int num17 = num15 + num16; + if ((double) num8 < (double) (num17 + num14 - num16)) + { + armFrameToUseLeft = num4; + break; + } + int num18 = num17 + (num14 - num16); + if ((double) num8 < (double) (num18 + num16)) + { + armFrameToUseLeft = num4; + armFrameToUseRight = num3; + break; + } + int num19 = num18 + num16; + if ((double) num8 < (double) (num19 + num14 - num16)) + { + armFrameToUseLeft = num4; + armFrameToUseRight = num4; + break; + } + int num20 = num19 + (num14 - num16); + if ((double) num8 < (double) (num20 + num14)) + { + armFrameToUseLeft = num5; + armFrameToUseRight = num4; + break; + } + int num21 = num20 + num14; + if ((double) num8 < (double) (num21 + num14)) + { + armFrameToUseLeft = num5; + armFrameToUseRight = num5; + break; + } + int num22 = num21 + num14; + if (isExpertMode) + { + if ((double) num8 < (double) (num22 + num16)) + { + armFrameToUseLeft = num4; + armFrameToUseRight = num5; + break; + } + int num23 = num22 + num16; + if ((double) num8 < (double) (num23 + num14 - num16)) + { + armFrameToUseLeft = num2; + armFrameToUseRight = num5; + break; + } + int num24 = num23 + (num14 - num16); + if ((double) num8 < (double) (num24 + num16)) + { + armFrameToUseLeft = num2; + armFrameToUseRight = num4; + break; + } + int num25 = num24 + num16; + if ((double) num8 < (double) (num25 + num14 - num16)) + { + armFrameToUseLeft = num2; + armFrameToUseRight = num2; + break; + } + num22 = num25 + (num14 - num16); + } + if ((double) num8 < (double) num22) + break; + armFrameToUseLeft = num3; + armFrameToUseRight = num3; + break; + case 8: + case 9: + int num26 = (double) num8 >= 10.0 ? ((double) num8 >= 20.0 ? ((double) num8 >= 30.0 ? num6 : num3) : num4) : num3; + int num27 = num26; + int num28 = num26; + int num29 = (int) rCurrentNPC.ai[3]; + int num30 = -1; + if ((double) num8 < 30.0) + { + if (num29 == -1 * num30) + num28 = num2; + if (num29 == num30) + num27 = num2; + } + int num31 = num6; + int num32 = num7; + if (num29 == num30 && num28 == num31) + num28 = num32; + if (num29 == -1 * num30 && num27 == num31) + num27 = num32; + armFrameToUseLeft = num28; + armFrameToUseRight = num27; + break; + } + } + + private static void DrawNPC_SlimeItem( + NPC rCurrentNPC, + int typeCache, + Microsoft.Xna.Framework.Color npcColor, + float addedRotation) + { + int i = (int) rCurrentNPC.ai[1]; + float scale = 1f; + float num1 = 22f * rCurrentNPC.scale; + float num2 = 18f * rCurrentNPC.scale; + Main.instance.LoadItem(i); + float num3 = (float) TextureAssets.Item[i].Width(); + float num4 = (float) TextureAssets.Item[i].Height(); + int num5 = (int) rCurrentNPC.ai[0] == -999 ? 1 : 0; + if (num5 != 0) + { + num1 = 14f * rCurrentNPC.scale; + num2 = 14f * rCurrentNPC.scale; + } + if ((double) num3 > (double) num1) + { + scale *= num1 / num3; + num3 *= scale; + num4 *= scale; + } + if ((double) num4 > (double) num2) + { + scale *= num2 / num4; + num3 *= scale; + float num6 = num4 * scale; + } + float num7 = -1f; + float num8 = 1f; + int num9 = rCurrentNPC.frame.Y / (TextureAssets.Npc[typeCache].Height() / Main.npcFrameCount[typeCache]); + float num10 = num8 - (float) num9; + float num11 = num7 + (float) (num9 * 2); + float rotation = 0.2f - 0.3f * (float) num9; + if (num5 != 0) + { + rotation = 0.0f; + num10 -= 6f; + num11 -= num3 * addedRotation; + } + Main.spriteBatch.Draw(TextureAssets.Item[i].Value, new Vector2(rCurrentNPC.Center.X - Main.screenPosition.X + num11, rCurrentNPC.Center.Y - Main.screenPosition.Y + rCurrentNPC.gfxOffY + num10), new Microsoft.Xna.Framework.Rectangle?(), npcColor, rotation, new Vector2((float) (TextureAssets.Item[i].Width() / 2), (float) (TextureAssets.Item[i].Height() / 2)), scale, SpriteEffects.None, 0.0f); + } + + protected void DrawNPCExtras( + NPC n, + bool beforeDraw, + float addHeight, + float addY, + Microsoft.Xna.Framework.Color npcColor, + Vector2 halfSize, + SpriteEffects npcSpriteEffect, + Vector2 screenPosition) + { + if (!beforeDraw && n.UsesPartyHat()) + { + int index = n.frame.Y / n.frame.Height; + int[] npCsFramingGroup = NPCID.Sets.TownNPCsFramingGroups[NPCID.Sets.NPCFramingGroup[n.type]]; + if (index >= npCsFramingGroup.Length) + index = 0; + Texture2D texture2D = TextureAssets.Extra[72].Value; + int num1 = 0; + switch (n.GetPartyHatColor()) + { + case PartyHatColor.Pink: + num1 = 16; + break; + case PartyHatColor.Cyan: + num1 = 17; + break; + case PartyHatColor.Purple: + num1 = 18; + break; + case PartyHatColor.White: + num1 = 19; + break; + } + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(20, frameX: (num1 % 20)); + r.Width -= 2; + r.Height -= 2; + int num2 = 0; + if (n.type == 637) + { + num2 = 6; + switch (index) + { + case 11: + case 12: + case 13: + case 14: + case 15: + num2 += 2; + break; + case 19: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + num2 -= 2; + break; + } + } + if (n.type == 638) + num2 = 12; + if (n.type == 656) + { + num2 = 6; + switch (index) + { + case 1: + case 2: + case 3: + num2 -= 2; + break; + case 8: + num2 -= 2; + break; + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + num2 -= 4; + break; + } + } + Vector2 vector2 = n.Top + new Vector2((float) (-2 * n.spriteDirection), n.gfxOffY); + vector2.X += (float) (num2 * n.spriteDirection); + vector2.Y += (float) npCsFramingGroup[index]; + vector2.Y += (float) NPCID.Sets.HatOffsetY[n.type]; + int num3 = 0; + if ((double) n.ai[0] == 5.0) + { + num3 = -4; + if (n.type == 38) + num3 = -8; + if (n.type == 124) + num3 = -2; + if (n.type == 550) + num3 = -4; + if (n.type == 588) + num3 = -4; + if (n.type == 108 || n.type == 178) + num3 = -6; + if (n.type == 637) + num3 = -12; + } + vector2.Y += (float) num3; + if (n.type == 229 && (double) n.ai[0] == 12.0) + vector2.X -= (float) (n.spriteDirection * 4); + if (n.type == 550 && (double) n.ai[0] == 5.0) + vector2.X += (float) (n.spriteDirection * 7); + Vector2 origin = r.Size() - new Vector2((float) (r.Width / 2), 12f); + int num4 = 0; + switch (n.type) + { + case 17: + case 18: + case 19: + case 20: + case 22: + case 124: + case 229: + case 353: + case 633: + case 637: + case 638: + case 656: + num4 = -1; + break; + case 37: + case 38: + case 54: + case 107: + case 108: + case 160: + case 207: + case 209: + num4 = -3; + break; + case 178: + case 208: + case 369: + num4 = 1; + break; + case 227: + num4 = -4; + break; + case 228: + num4 = -2; + break; + case 550: + num4 = -4; + break; + case 588: + num4 = 0; + break; + } + vector2.X += (float) (num4 * n.spriteDirection); + vector2.X += (float) (4 * n.spriteDirection); + Main.spriteBatch.Draw(texture2D, new Vector2(vector2.X - screenPosition.X, vector2.Y - screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(r), npcColor * n.Opacity, 0.0f, origin, n.scale, npcSpriteEffect, 0.0f); + } + if (NPCID.Sets.AttackType[n.type] == 1 && (double) n.ai[0] == 12.0 && !beforeDraw) + { + if (n.type == 228 || n.type == 229 || n.type == 209) + return; + double num5 = (double) n.ai[2]; + Vector2 vector2_1 = Main.OffsetsNPCOffhand[2]; + if (n.spriteDirection == 1) + vector2_1.X *= -1f; + Vector2 vector2_2 = n.Bottom - vector2_1; + if (n.type == 22 && (double) n.ai[2] > -0.100000001490116) + vector2_2.Y += 4f; + if (n.type == 368 && Main.hardMode && (double) n.ai[2] > -0.100000001490116) + vector2_2.Y += 4f; + if (n.type == 368 && !Main.hardMode && (double) n.ai[2] < -0.100000001490116) + vector2_2.Y -= 8f; + float rotation = (float) (num5 * 1.57079637050629) * (float) n.spriteDirection; + float num6 = 1f; + int index = 0; + int num7 = 4; + if (n.type == 19) + { + index = Main.hardMode ? 98 : 95; + if (Main.hardMode) + { + vector2_2.X -= (float) (10 * n.direction); + vector2_2.Y += 4f; + } + } + else if (n.type == 22) + { + index = 39; + num7 = 18; + } + else if (n.type == 178) + index = 434; + else if (n.type == 227) + { + index = 3350; + num7 = 16; + num6 = 0.85f; + } + else if (n.type == 368) + { + index = Main.hardMode ? 2223 : 2269; + if (Main.hardMode) + { + num7 = 18; + } + else + { + if ((double) n.ai[2] < -0.100000001490116) + num7 = 28; + num6 = 0.75f; + } + } + Main.instance.LoadItem(index); + Texture2D texture = TextureAssets.Item[index].Value; + int num8 = (int) Main.DrawPlayerItemPos(1f, index).X - num7; + Vector2 origin = new Vector2((float) -num8, (float) (texture.Height / 2)); + if (n.spriteDirection == -1) + origin = new Vector2((float) (texture.Width + num8), (float) (texture.Height / 2)); + Main.spriteBatch.Draw(texture, new Vector2((float) (int) ((double) vector2_2.X - (double) screenPosition.X), (float) (int) ((double) vector2_2.Y - (double) screenPosition.Y)), new Microsoft.Xna.Framework.Rectangle?(), npcColor, rotation, origin, n.scale * num6, npcSpriteEffect ^ SpriteEffects.FlipHorizontally, 0.0f); + if (n.type == 22 && n.frame.Y / (TextureAssets.Npc[n.type].Height() / Main.npcFrameCount[n.type]) >= 21) + { + Texture2D texture2D = TextureAssets.Extra[52].Value; + Microsoft.Xna.Framework.Rectangle rectangle = texture2D.Frame(verticalFrames: 5, frameY: (n.frame.Y / (TextureAssets.Npc[n.type].Height() / Main.npcFrameCount[n.type]) - 21)); + Main.spriteBatch.Draw(texture2D, new Vector2((float) ((double) n.position.X - (double) screenPosition.X + (double) (n.width / 2) - (double) TextureAssets.Npc[n.type].Width() * (double) n.scale / 2.0 + (double) halfSize.X * (double) n.scale), (float) ((double) n.position.Y - (double) screenPosition.Y + (double) n.height - (double) TextureAssets.Npc[n.type].Height() * (double) n.scale / (double) Main.npcFrameCount[n.type] + 4.0 + (double) halfSize.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle), n.GetAlpha(npcColor), n.rotation, halfSize, n.scale, npcSpriteEffect, 0.0f); + } + else if (n.type == 368 && n.frame.Y / (TextureAssets.Npc[n.type].Height() / Main.npcFrameCount[n.type]) >= 21) + { + Texture2D texture2D = TextureAssets.Extra[53].Value; + Microsoft.Xna.Framework.Rectangle rectangle = texture2D.Frame(verticalFrames: 5, frameY: (n.frame.Y / (TextureAssets.Npc[n.type].Height() / Main.npcFrameCount[n.type]) - 21)); + Main.spriteBatch.Draw(texture2D, new Vector2((float) ((double) n.position.X - (double) screenPosition.X + (double) (n.width / 2) - (double) TextureAssets.Npc[n.type].Width() * (double) n.scale / 2.0 + (double) halfSize.X * (double) n.scale), (float) ((double) n.position.Y - (double) screenPosition.Y + (double) n.height - (double) TextureAssets.Npc[n.type].Height() * (double) n.scale / (double) Main.npcFrameCount[n.type] + 4.0 + (double) halfSize.Y * (double) n.scale) + addHeight + addY + n.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle), n.GetAlpha(npcColor), n.rotation, halfSize, n.scale, npcSpriteEffect, 0.0f); + } + } + if (NPCID.Sets.AttackType[n.type] == 2 && (double) n.ai[0] == 14.0 && !beforeDraw) + { + Texture2D texture2D = TextureAssets.Extra[51].Value; + Vector2 vector2 = n.Bottom + new Vector2(0.0f, n.gfxOffY + 4f); + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 4, frameY: ((int) n.frameCounter % 48 / 12)); + Vector2 origin = r.Size() * new Vector2(0.5f, 1f); + Main.spriteBatch.Draw(texture2D, new Vector2((float) (int) ((double) vector2.X - (double) screenPosition.X), (float) (int) ((double) vector2.Y - (double) screenPosition.Y)), new Microsoft.Xna.Framework.Rectangle?(r), NPCID.Sets.MagicAuraColor[n.type], 0.0f, origin, n.scale, npcSpriteEffect ^ SpriteEffects.FlipHorizontally, 0.0f); + } + if (NPCID.Sets.AttackType[n.type] == 3 && (double) n.ai[0] == 15.0) + { + Main.instance.LoadItem(4); + Texture2D texture2D = TextureAssets.Item[4].Value; + int num9 = 32; + float num10 = 0.0f; + Vector2 zero = Vector2.Zero; + if (n.type == 207) + { + Main.instance.LoadItem(3349); + texture2D = TextureAssets.Item[3349].Value; + num10 = 0.15f; + if (beforeDraw) + return; + if ((double) n.ai[1] > (double) NPCID.Sets.AttackTime[n.type] * 0.660000026226044) + zero.Y = 12f; + } + else if (n.type == 353) + { + Main.instance.LoadItem(3352); + texture2D = TextureAssets.Item[3352].Value; + num10 = 0.15f; + if (!beforeDraw) + return; + if ((double) n.ai[1] > (double) NPCID.Sets.AttackTime[n.type] * 0.660000026226044) + zero.Y = 12f; + } + else if (n.type == 441) + { + Main.instance.LoadItem(3351); + texture2D = TextureAssets.Item[3351].Value; + num9 = 28; + num10 = 0.1f; + if (!beforeDraw) + return; + if ((double) n.ai[1] > (double) NPCID.Sets.AttackTime[n.type] * 0.660000026226044) + zero.Y = 12f; + } + Tuple swingStats = n.GetSwingStats(NPCID.Sets.AttackTime[n.type] * 2, (int) n.ai[1], n.spriteDirection, num9, num9); + Vector2 vector2 = swingStats.Item1 + (swingStats.Item1 - n.Center) * num10 + zero; + Vector2 origin = texture2D.Size() * new Vector2(n.spriteDirection == 1 ? 0.0f : 1f, 1f); + Main.spriteBatch.Draw(texture2D, new Vector2((float) (int) ((double) vector2.X - (double) screenPosition.X), (float) (int) ((double) vector2.Y - (double) screenPosition.Y)), new Microsoft.Xna.Framework.Rectangle?(), n.GetAlpha(npcColor), swingStats.Item2, origin, n.scale, npcSpriteEffect ^ SpriteEffects.FlipHorizontally, 0.0f); + } + if (n.type != 550 || (double) n.ai[0] != 18.0 || beforeDraw) + return; + Main.instance.LoadItem(353); + Texture2D texture2D1 = TextureAssets.Item[353].Value; + int num11 = 32; + float num12 = 0.15f; + Vector2 zero1 = Vector2.Zero; + Microsoft.Xna.Framework.Rectangle r1 = texture2D1.Frame(verticalFrames: 3, frameY: 1); + int index1 = (int) n.ai[2]; + if (index1 >= 0 && index1 < (int) byte.MaxValue) + { + Player player = Main.player[index1]; + bool flag = player.HeldItem.type == 353 && player.direction == Math.Sign(n.Center.X - player.Center.X); + double num13 = (double) player.Hitbox.Distance(n.Center); + float num14 = n.localAI[3]; + if (num13 < 46.0 & flag) + { + n.localAI[3] = 1f; + if ((double) n.localAI[3] != (double) num14) + { + Vector2 vector2_3 = n.Center + new Vector2((float) (n.spriteDirection * 30), -6f); + Vector2 vector2_4 = new Vector2(10f, 10f); + for (int index2 = 0; index2 < 30; ++index2) + { + Dust dust = Dust.NewDustDirect(vector2_3 - vector2_4 / 2f, (int) vector2_4.X, (int) vector2_4.Y, 4, Alpha: 50, newColor: new Microsoft.Xna.Framework.Color(245, 200, 30, 155), Scale: 0.7f); + dust.noGravity = true; + dust.velocity *= 1f; + Dust.NewDustDirect(vector2_3 - vector2_4 / 2f, (int) vector2_4.X, (int) vector2_4.Y, 4, Alpha: 50, newColor: new Microsoft.Xna.Framework.Color(245, 200, 30, 155), Scale: 0.6f).velocity *= 2f; + } + } + } + else if ((double) n.localAI[3] == 1.0) + n.localAI[3] = 2f; + } + Tuple swingStats1 = n.GetSwingStats(40, 12, n.spriteDirection, num11, num11); + Vector2 vector2_5 = swingStats1.Item1 + (swingStats1.Item1 - n.Center) * num12 + zero1; + Vector2 origin1 = r1.Size() * new Vector2(n.spriteDirection == 1 ? 0.0f : 1f, 1f); + Main.spriteBatch.Draw(texture2D1, new Vector2((float) (int) ((double) vector2_5.X - (double) screenPosition.X), (float) (int) ((double) vector2_5.Y - (double) screenPosition.Y)), new Microsoft.Xna.Framework.Rectangle?(r1), n.GetAlpha(npcColor), swingStats1.Item2, origin1, n.scale, npcSpriteEffect ^ SpriteEffects.FlipHorizontally, 0.0f); + } + + public void DrawProj(int i) + { + this.PrepareDrawnEntityDrawing((Entity) Main.projectile[i], Main.GetProjectileDesiredShader(i)); + int num1 = ProjectileID.Sets.DrawScreenCheckFluff[Main.projectile[i].type]; + if (!new Microsoft.Xna.Framework.Rectangle((int) Main.Camera.ScaledPosition.X - num1, (int) Main.Camera.ScaledPosition.Y - num1, (int) Main.Camera.ScaledSize.X + num1 * 2, (int) Main.Camera.ScaledSize.Y + num1 * 2).Intersects(Main.projectile[i].Hitbox)) + return; + Projectile projectile1 = Main.projectile[i]; + if (projectile1.type == 734) + { + VoidLensHelper voidLensHelper = new VoidLensHelper(projectile1); + this._voidLensData.Clear(); + int selectionMode = Main.TryInteractingWithVoidLens(projectile1); + voidLensHelper.DrawToDrawData(this._voidLensData, selectionMode); + foreach (DrawData data in this._voidLensData) + Main.EntitySpriteDraw(data); + } + else + { + float polePosX = 0.0f; + float polePosY = 0.0f; + this.LoadProjectile(projectile1.type); + Vector2 mountedCenter = Main.player[projectile1.owner].MountedCenter; + if (projectile1.aiStyle == 99) + { + Vector2 vector2 = mountedCenter; + vector2.Y += Main.player[projectile1.owner].gfxOffY; + float num2 = projectile1.Center.X - vector2.X; + float num3 = projectile1.Center.Y - vector2.Y; + Math.Sqrt((double) num2 * (double) num2 + (double) num3 * (double) num3); + float num4 = (float) Math.Atan2((double) num3, (double) num2) - 1.57f; + if (!projectile1.counterweight) + { + int num5 = -1; + if ((double) projectile1.position.X + (double) (projectile1.width / 2) < (double) Main.player[projectile1.owner].position.X + (double) (Main.player[projectile1.owner].width / 2)) + num5 = 1; + int num6 = num5 * -1; + Main.player[projectile1.owner].itemRotation = (float) Math.Atan2((double) num3 * (double) num6, (double) num2 * (double) num6); + } + bool flag = true; + if ((double) num2 == 0.0 && (double) num3 == 0.0) + { + flag = false; + } + else + { + float num7 = 12f / (float) Math.Sqrt((double) num2 * (double) num2 + (double) num3 * (double) num3); + float num8 = num2 * num7; + float num9 = num3 * num7; + vector2.X -= num8 * 0.1f; + vector2.Y -= num9 * 0.1f; + num2 = projectile1.position.X + (float) projectile1.width * 0.5f - vector2.X; + num3 = projectile1.position.Y + (float) projectile1.height * 0.5f - vector2.Y; + } + while (flag) + { + float num10 = 12f; + float f1 = (float) Math.Sqrt((double) num2 * (double) num2 + (double) num3 * (double) num3); + float f2 = f1; + if (float.IsNaN(f1) || float.IsNaN(f2)) + { + flag = false; + } + else + { + if ((double) f1 < 20.0) + { + num10 = f1 - 8f; + flag = false; + } + float num11 = 12f / f1; + float num12 = num2 * num11; + float num13 = num3 * num11; + vector2.X += num12; + vector2.Y += num13; + num2 = projectile1.position.X + (float) projectile1.width * 0.5f - vector2.X; + num3 = projectile1.position.Y + (float) projectile1.height * 0.1f - vector2.Y; + if ((double) f2 > 12.0) + { + float num14 = 0.3f; + float num15 = Math.Abs(projectile1.velocity.X) + Math.Abs(projectile1.velocity.Y); + if ((double) num15 > 16.0) + num15 = 16f; + float num16 = (float) (1.0 - (double) num15 / 16.0); + float num17 = num14 * num16; + float num18 = f2 / 80f; + if ((double) num18 > 1.0) + num18 = 1f; + float num19 = num17 * num18; + if ((double) num19 < 0.0) + num19 = 0.0f; + float num20 = num19 * num18 * 0.5f; + if ((double) num3 > 0.0) + { + num3 *= 1f + num20; + num2 *= 1f - num20; + } + else + { + float num21 = Math.Abs(projectile1.velocity.X) / 3f; + if ((double) num21 > 1.0) + num21 = 1f; + float num22 = num21 - 0.5f; + float num23 = num20 * num22; + if ((double) num23 > 0.0) + num23 *= 2f; + num3 *= 1f + num23; + num2 *= 1f - num23; + } + } + float rotation = (float) Math.Atan2((double) num3, (double) num2) - 1.57f; + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.White; + color.A = (byte) ((double) color.A * 0.400000005960464); + color = Main.TryApplyingPlayerStringColor(Main.player[projectile1.owner].stringColor, color); + float num24 = 0.5f; + color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0), color); + color = new Microsoft.Xna.Framework.Color((int) (byte) ((double) color.R * (double) num24), (int) (byte) ((double) color.G * (double) num24), (int) (byte) ((double) color.B * (double) num24), (int) (byte) ((double) color.A * (double) num24)); + Main.EntitySpriteDraw(TextureAssets.FishingLine.Value, new Vector2((float) ((double) vector2.X - (double) Main.screenPosition.X + (double) TextureAssets.FishingLine.Width() * 0.5), (float) ((double) vector2.Y - (double) Main.screenPosition.Y + (double) TextureAssets.FishingLine.Height() * 0.5)) - new Vector2(6f, 0.0f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.FishingLine.Width(), (int) num10)), color, rotation, new Vector2((float) TextureAssets.FishingLine.Width() * 0.5f, 0.0f), 1f, SpriteEffects.None, 0); + } + } + } + else + { + if (projectile1.aiStyle == 160) + { + this.DrawKite(projectile1); + return; + } + if (projectile1.aiStyle == 165) + { + this.DrawWhip(projectile1); + return; + } + } + if (projectile1.type == 879 || projectile1.type == 877 || projectile1.type == 878) + projectile1.position.Y -= Main.player[projectile1.owner].gfxOffY; + if (projectile1.aiStyle == 174) + { + this.DrawMultisegmentPet(projectile1); + } + else + { + if (projectile1.type == 34) + new FlameLashDrawer().Draw(projectile1); + if (projectile1.type == 16) + new MagicMissileDrawer().Draw(projectile1); + if (projectile1.type == 933) + new FinalFractalHelper().Draw(projectile1); + if (projectile1.type == 79) + new RainbowRodDrawer().Draw(projectile1); + if (projectile1.type == 919) + this.DrawProj_FairyQueenLance(projectile1); + else if (projectile1.type == 932) + this.DrawProj_FairyQueenRangedItemShot(projectile1); + else if (projectile1.type == 946) + { + EmpressBladeDrawer empressBladeDrawer = new EmpressBladeDrawer(); + float num25 = (float) ((double) Main.GlobalTimeWrappedHourly % 3.0 / 3.0); + float num26 = MathHelper.Max(1f, (float) Main.player[projectile1.owner].maxMinions); + float hueOverride = (float) projectile1.identity % num26 / num26 + num25; + Microsoft.Xna.Framework.Color queenWeaponsColor1 = projectile1.GetFairyQueenWeaponsColor(0.0f, rawHueOverride: new float?(hueOverride % 1f)); + Microsoft.Xna.Framework.Color queenWeaponsColor2 = projectile1.GetFairyQueenWeaponsColor(0.0f, rawHueOverride: new float?((float) (((double) hueOverride + 0.5) % 1.0))); + empressBladeDrawer.ColorStart = queenWeaponsColor1; + empressBladeDrawer.ColorEnd = queenWeaponsColor2; + empressBladeDrawer.Draw(projectile1); + this.DrawProj_EmpressBlade(projectile1, hueOverride); + } + else if (projectile1.type == 927) + this.DrawProj_PiercingStarlight(projectile1); + else if (projectile1.type == 917) + this.DrawProj_CoolWhipMinion(projectile1); + else if (projectile1.type == 923) + { + Vector2 position = projectile1.Center - Main.screenPosition; + Texture2D texture2D = TextureAssets.Projectile[projectile1.type].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 2); + Microsoft.Xna.Framework.Rectangle rectangle = texture2D.Frame(verticalFrames: 2, frameY: 1); + Vector2 origin = r.Size() * new Vector2(0.03f, 0.5f); + float from = 180f; + double num27 = (double) projectile1.ai[0] / 6.28318548202515 + (double) projectile1.localAI[0] / (double) from; + float num28 = Utils.GetLerpValue(0.0f, 30f, projectile1.localAI[0], true) * Utils.GetLerpValue(from, from - 30f, projectile1.localAI[0], true); + Microsoft.Xna.Framework.Color color1 = Main.hslToRgb((float) (num27 % 1.0), 1f, 1f) * num28; + float lerpValue = Utils.GetLerpValue(40f, 60f, projectile1.localAI[0], true); + Vector2 scale = new Vector2(1f, MathHelper.Lerp(0.25f, 0.7f, lerpValue)) * projectile1.scale; + Microsoft.Xna.Framework.Color color2 = Main.hslToRgb((float) ((num27 + 0.300000011920929) % 1.0), 1f, MathHelper.Lerp(0.3f, 0.66f, lerpValue)) * num28; + if (NPC.ShouldEmpressBeEnraged()) + color2 = Main.OurFavoriteColor * num28; + Microsoft.Xna.Framework.Color color3 = Microsoft.Xna.Framework.Color.Lerp(color2, Microsoft.Xna.Framework.Color.White, 0.1f); + color3.A /= (byte) 2; + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(rectangle), color3, projectile1.rotation, origin, scale * 1.2f, SpriteEffects.None, 0.0f); + Microsoft.Xna.Framework.Color color4 = Main.hslToRgb((float) ((num27 + 0.150000005960464) % 1.0), 1f, MathHelper.Lerp(0.3f, 0.5f, lerpValue)) * num28; + if (NPC.ShouldEmpressBeEnraged()) + color4 = Main.OurFavoriteColor * num28; + Microsoft.Xna.Framework.Color color5 = Microsoft.Xna.Framework.Color.Lerp(color4, Microsoft.Xna.Framework.Color.White, 0.1f); + color5.A /= (byte) 2; + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(rectangle), color5, projectile1.rotation, origin, scale * 1.1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), color1 * 0.5f, projectile1.rotation, origin, scale, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(rectangle), color1 * lerpValue, projectile1.rotation, origin, scale, SpriteEffects.None, 0.0f); + } + else if (projectile1.type == 888) + this.DrawTwinsPet(projectile1); + else if (projectile1.type == 874) + this.DrawMurderAurora(projectile1); + else if (projectile1.type == 871) + { + Texture2D texture2D = TextureAssets.Projectile[projectile1.type].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 4); + Vector2 origin = r.Size() / 2f; + Microsoft.Xna.Framework.Color color6 = Microsoft.Xna.Framework.Color.White * projectile1.Opacity; + SpriteEffects effects = SpriteEffects.None; + color6.A /= (byte) 2; + Microsoft.Xna.Framework.Color color7 = projectile1.AI_171_GetColor(); + color7.A /= (byte) 2; + float scale = projectile1.scale * 1.3f; + float num29 = 1f; + int pelletStormsCount = projectile1.AI_172_GetPelletStormsCount(); + bool flag = false; + float num30 = float.PositiveInfinity; + for (int stormIndex = 0; stormIndex < pelletStormsCount; ++stormIndex) + { + Projectile.HallowBossPelletStormInfo pelletStormInfo = projectile1.AI_172_GetPelletStormInfo(stormIndex); + for (int bulletIndex = 0; bulletIndex < pelletStormInfo.BulletsInStorm; ++bulletIndex) + { + float bulletProgress = pelletStormInfo.GetBulletProgress(bulletIndex); + if ((double) bulletProgress < (double) num30) + num30 = bulletProgress; + if (pelletStormInfo.IsValid(bulletIndex)) + { + if (stormIndex == pelletStormsCount - 1 && (double) bulletProgress > 0.0) + flag = true; + r = texture2D.Frame(verticalFrames: 4, frameY: ((int) ((double) (bulletIndex + stormIndex * 6) + Main.timeForVisualEffects / 4.0) % 4)); + float num31 = Utils.GetLerpValue(0.0f, 0.1f, bulletProgress, true) * Utils.GetLerpValue(1f, 0.8f, bulletProgress, true); + Vector2 bulletPosition = pelletStormInfo.GetBulletPosition(bulletIndex, projectile1.Center); + Main.EntitySpriteDraw(texture2D, bulletPosition - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r), color7 * num31, projectile1.rotation, origin, scale * num29, effects, 0); + Main.EntitySpriteDraw(texture2D, bulletPosition - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r), color6 * num31, projectile1.rotation, origin, projectile1.scale * num29, effects, 0); + } + } + } + if (flag || (double) num30 > 1.0) + return; + Main.EntitySpriteDraw(texture2D, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r), color7, projectile1.rotation, origin, scale, effects, 0); + Main.EntitySpriteDraw(texture2D, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r), color6, projectile1.rotation, origin, projectile1.scale, effects, 0); + } + else + { + if (projectile1.bobber && Main.player[projectile1.owner].inventory[Main.player[projectile1.owner].selectedItem].holdStyle != 0) + Main.DrawProj_FishingLine(projectile1, ref polePosX, ref polePosY, mountedCenter); + else if (projectile1.type == 32) + { + Vector2 vector2 = new Vector2(projectile1.position.X + (float) projectile1.width * 0.5f, projectile1.position.Y + (float) projectile1.height * 0.5f); + float num32 = mountedCenter.X - vector2.X; + float num33 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num33, (double) num32) - 1.57f; + bool flag = true; + if ((double) num32 == 0.0 && (double) num33 == 0.0) + { + flag = false; + } + else + { + float num34 = 8f / (float) Math.Sqrt((double) num32 * (double) num32 + (double) num33 * (double) num33); + float num35 = num32 * num34; + float num36 = num33 * num34; + vector2.X -= num35; + vector2.Y -= num36; + num32 = mountedCenter.X - vector2.X; + num33 = mountedCenter.Y - vector2.Y; + } + while (flag) + { + float f = (float) Math.Sqrt((double) num32 * (double) num32 + (double) num33 * (double) num33); + if ((double) f < 28.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num37 = 28f / f; + float num38 = num32 * num37; + float num39 = num33 * num37; + vector2.X += num38; + vector2.Y += num39; + num32 = mountedCenter.X - vector2.X; + num33 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.EntitySpriteDraw(TextureAssets.Chain5.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain5.Width(), TextureAssets.Chain5.Height())), color, rotation, new Vector2((float) TextureAssets.Chain5.Width() * 0.5f, (float) TextureAssets.Chain5.Height() * 0.5f), 1f, SpriteEffects.None, 0); + } + } + } + else if (projectile1.type == 73) + { + Vector2 vector2 = new Vector2(projectile1.position.X + (float) projectile1.width * 0.5f, projectile1.position.Y + (float) projectile1.height * 0.5f); + float num40 = mountedCenter.X - vector2.X; + float num41 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num41, (double) num40) - 1.57f; + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num40 * (double) num40 + (double) num41 * (double) num41); + if ((double) f < 25.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num42 = 12f / f; + float num43 = num40 * num42; + float num44 = num41 * num42; + vector2.X += num43; + vector2.Y += num44; + num40 = mountedCenter.X - vector2.X; + num41 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.EntitySpriteDraw(TextureAssets.Chain8.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain8.Width(), TextureAssets.Chain8.Height())), color, rotation, new Vector2((float) TextureAssets.Chain8.Width() * 0.5f, (float) TextureAssets.Chain8.Height() * 0.5f), 1f, SpriteEffects.None, 0); + } + } + } + else if (projectile1.type == 186) + { + Vector2 vector2 = new Vector2(projectile1.localAI[0], projectile1.localAI[1]); + float num45 = Vector2.Distance(projectile1.Center, vector2) - projectile1.velocity.Length(); + float num46 = (float) TextureAssets.Chain17.Height() - num45; + if ((double) num45 > 0.0 && (double) projectile1.ai[1] > 0.0) + { + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) projectile1.position.X / 16, (int) projectile1.position.Y / 16); + Main.EntitySpriteDraw(TextureAssets.Chain17.Value, vector2 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, (int) num46, TextureAssets.Chain17.Width(), (int) num45)), color, projectile1.rotation, new Vector2((float) (TextureAssets.Chain17.Width() / 2), 0.0f), 1f, SpriteEffects.None, 0); + } + } + else if (projectile1.type == 74) + { + Vector2 vector2 = new Vector2(projectile1.position.X + (float) projectile1.width * 0.5f, projectile1.position.Y + (float) projectile1.height * 0.5f); + float num47 = mountedCenter.X - vector2.X; + float num48 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num48, (double) num47) - 1.57f; + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num47 * (double) num47 + (double) num48 * (double) num48); + if ((double) f < 25.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num49 = 12f / f; + float num50 = num47 * num49; + float num51 = num48 * num49; + vector2.X += num50; + vector2.Y += num51; + num47 = mountedCenter.X - vector2.X; + num48 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.EntitySpriteDraw(TextureAssets.Chain9.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain8.Width(), TextureAssets.Chain8.Height())), color, rotation, new Vector2((float) TextureAssets.Chain8.Width() * 0.5f, (float) TextureAssets.Chain8.Height() * 0.5f), 1f, SpriteEffects.None, 0); + } + } + } + else if (projectile1.type == 171) + { + Vector2 vector2 = new Vector2(projectile1.position.X + (float) projectile1.width * 0.5f, projectile1.position.Y + (float) projectile1.height * 0.5f); + float num52 = -projectile1.velocity.X; + float num53 = -projectile1.velocity.Y; + float num54 = 1f; + if ((double) projectile1.ai[0] <= 17.0) + num54 = projectile1.ai[0] / 17f; + int length = (int) (30.0 * (double) num54); + float num55 = 1f; + if ((double) projectile1.ai[0] <= 30.0) + num55 = projectile1.ai[0] / 30f; + float num56 = 0.4f * num55; + float num57 = num56; + float num58 = num53 + num57; + Vector2[] vector2Array = new Vector2[length]; + float[] numArray = new float[length]; + for (int index = 0; index < length; ++index) + { + float num59 = (float) Math.Sqrt((double) num52 * (double) num52 + (double) num58 * (double) num58); + float num60 = 5.6f; + if ((double) Math.Abs(num52) + (double) Math.Abs(num58) < 1.0) + num60 *= Math.Abs(num52) + Math.Abs(num58) / 1f; + float num61 = num60 / num59; + float num62 = num52 * num61; + float num63 = num58 * num61; + float num64 = (float) Math.Atan2((double) num63, (double) num62) - 1.57f; + vector2Array[index].X = vector2.X; + vector2Array[index].Y = vector2.Y; + numArray[index] = num64; + vector2.X += num62; + vector2.Y += num63; + num52 = -projectile1.velocity.X; + float num65 = -projectile1.velocity.Y; + num57 += num56; + num58 = num65 + num57; + } + int num66; + for (int index = num66 = length - 1; index >= 0; --index) + { + vector2.X = vector2Array[index].X; + vector2.Y = vector2Array[index].Y; + float rotation = numArray[index]; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.EntitySpriteDraw(TextureAssets.Chain16.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain16.Width(), TextureAssets.Chain16.Height())), color, rotation, new Vector2((float) TextureAssets.Chain16.Width() * 0.5f, (float) TextureAssets.Chain16.Height() * 0.5f), 0.8f, SpriteEffects.None, 0); + } + } + else if (projectile1.type == 475) + { + Vector2 vector2 = new Vector2(projectile1.position.X + (float) projectile1.width * 0.5f, projectile1.position.Y + (float) projectile1.height * 0.5f); + float num67 = -projectile1.velocity.X; + float num68 = -projectile1.velocity.Y; + float num69 = 1f; + if ((double) projectile1.ai[0] <= 17.0) + num69 = projectile1.ai[0] / 17f; + int length = (int) (30.0 * (double) num69); + float num70 = 1f; + if ((double) projectile1.ai[0] <= 30.0) + num70 = projectile1.ai[0] / 30f; + float num71 = 0.4f * num70; + float num72 = num71; + float num73 = num68 + num72; + Vector2[] vector2Array = new Vector2[length]; + float[] numArray = new float[length]; + for (int index = 0; index < length; ++index) + { + float num74 = (float) Math.Sqrt((double) num67 * (double) num67 + (double) num73 * (double) num73); + float num75 = 5.6f; + if ((double) Math.Abs(num67) + (double) Math.Abs(num73) < 1.0) + num75 *= Math.Abs(num67) + Math.Abs(num73) / 1f; + float num76 = num75 / num74; + float num77 = num67 * num76; + float num78 = num73 * num76; + float num79 = (float) Math.Atan2((double) num78, (double) num77) - 1.57f; + vector2Array[index].X = vector2.X; + vector2Array[index].Y = vector2.Y; + numArray[index] = num79; + vector2.X += num77; + vector2.Y += num78; + num67 = -projectile1.velocity.X; + float num80 = -projectile1.velocity.Y; + num72 += num71; + num73 = num80 + num72; + } + int num81 = 0; + int num82; + for (int index = num82 = length - 1; index >= 0; --index) + { + vector2.X = vector2Array[index].X; + vector2.Y = vector2Array[index].Y; + float rotation = numArray[index]; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + if (num81 % 2 == 0) + Main.EntitySpriteDraw(TextureAssets.Chain38.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain38.Width(), TextureAssets.Chain38.Height())), color, rotation, new Vector2((float) TextureAssets.Chain38.Width() * 0.5f, (float) TextureAssets.Chain38.Height() * 0.5f), 0.8f, SpriteEffects.None, 0); + else + Main.EntitySpriteDraw(TextureAssets.Chain39.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain39.Width(), TextureAssets.Chain39.Height())), color, rotation, new Vector2((float) TextureAssets.Chain39.Width() * 0.5f, (float) TextureAssets.Chain39.Height() * 0.5f), 0.8f, SpriteEffects.None, 0); + ++num81; + } + } + else if (projectile1.type == 505 || projectile1.type == 506) + { + Vector2 vector2 = new Vector2(projectile1.position.X + (float) projectile1.width * 0.5f, projectile1.position.Y + (float) projectile1.height * 0.5f); + float num83 = -projectile1.velocity.X; + float num84 = -projectile1.velocity.Y; + float num85 = 1f; + if ((double) projectile1.ai[0] <= 17.0) + num85 = projectile1.ai[0] / 17f; + int length = (int) (30.0 * (double) num85); + float num86 = 1f; + if ((double) projectile1.ai[0] <= 30.0) + num86 = projectile1.ai[0] / 30f; + float num87 = 0.4f * num86; + float num88 = num87; + float num89 = num84 + num88; + Vector2[] vector2Array = new Vector2[length]; + float[] numArray = new float[length]; + for (int index = 0; index < length; ++index) + { + float num90 = (float) Math.Sqrt((double) num83 * (double) num83 + (double) num89 * (double) num89); + float num91 = 5.6f; + if ((double) Math.Abs(num83) + (double) Math.Abs(num89) < 1.0) + num91 *= Math.Abs(num83) + Math.Abs(num89) / 1f; + float num92 = num91 / num90; + float num93 = num83 * num92; + float num94 = num89 * num92; + float num95 = (float) Math.Atan2((double) num94, (double) num93) - 1.57f; + vector2Array[index].X = vector2.X; + vector2Array[index].Y = vector2.Y; + numArray[index] = num95; + vector2.X += num93; + vector2.Y += num94; + num83 = -projectile1.velocity.X; + float num96 = -projectile1.velocity.Y; + num88 += num87; + num89 = num96 + num88; + } + int num97 = 0; + int num98; + for (int index1 = num98 = length - 1; index1 >= 0; --index1) + { + vector2.X = vector2Array[index1].X; + vector2.Y = vector2Array[index1].Y; + float rotation = numArray[index1]; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + int num99 = 4; + if (projectile1.type == 506) + num99 = 6; + int index2 = num99 + num97 % 2; + Main.EntitySpriteDraw(TextureAssets.Chains[index2].Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chains[index2].Width(), TextureAssets.Chains[index2].Height())), color, rotation, new Vector2((float) TextureAssets.Chains[index2].Width() * 0.5f, (float) TextureAssets.Chains[index2].Height() * 0.5f), 0.8f, SpriteEffects.None, 0); + ++num97; + } + } + else if (projectile1.type == 165) + { + Vector2 vector2 = new Vector2(projectile1.position.X + (float) projectile1.width * 0.5f, projectile1.position.Y + (float) projectile1.height * 0.5f); + float num100 = mountedCenter.X - vector2.X; + float num101 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num101, (double) num100) - 1.57f; + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num100 * (double) num100 + (double) num101 * (double) num101); + if ((double) f < 25.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num102 = 24f / f; + float num103 = num100 * num102; + float num104 = num101 * num102; + vector2.X += num103; + vector2.Y += num104; + num100 = mountedCenter.X - vector2.X; + num101 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.EntitySpriteDraw(TextureAssets.Chain15.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain15.Width(), TextureAssets.Chain15.Height())), color, rotation, new Vector2((float) TextureAssets.Chain15.Width() * 0.5f, (float) TextureAssets.Chain15.Height() * 0.5f), 1f, SpriteEffects.None, 0); + } + } + } + else if (projectile1.type >= 230 && projectile1.type <= 235) + { + int index = projectile1.type - 229; + Vector2 vector2 = new Vector2(projectile1.position.X + (float) projectile1.width * 0.5f, projectile1.position.Y + (float) projectile1.height * 0.5f); + float num105 = mountedCenter.X - vector2.X; + float num106 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num106, (double) num105) - 1.57f; + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num105 * (double) num105 + (double) num106 * (double) num106); + if ((double) f < 25.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num107 = (float) TextureAssets.GemChain[index].Height() / f; + float num108 = num105 * num107; + float num109 = num106 * num107; + vector2.X += num108; + vector2.Y += num109; + num105 = mountedCenter.X - vector2.X; + num106 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.EntitySpriteDraw(TextureAssets.GemChain[index].Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.GemChain[index].Width(), TextureAssets.GemChain[index].Height())), color, rotation, new Vector2((float) TextureAssets.GemChain[index].Width() * 0.5f, (float) TextureAssets.GemChain[index].Height() * 0.5f), 1f, SpriteEffects.None, 0); + } + } + } + else if (projectile1.type == 753) + { + Vector2 vector2 = new Vector2(projectile1.position.X + (float) projectile1.width * 0.5f, projectile1.position.Y + (float) projectile1.height * 0.5f); + float num110 = mountedCenter.X - vector2.X; + float num111 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num111, (double) num110) - 1.57f; + bool flag = true; + Texture2D texture2D = TextureAssets.Extra[95].Value; + while (flag) + { + float f = (float) Math.Sqrt((double) num110 * (double) num110 + (double) num111 * (double) num111); + if ((double) f < 25.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num112 = (float) texture2D.Height / f; + float num113 = num110 * num112; + float num114 = num111 * num112; + vector2.X += num113; + vector2.Y += num114; + num110 = mountedCenter.X - vector2.X; + num111 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.EntitySpriteDraw(texture2D, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(), color, rotation, texture2D.Size() / 2f, 1f, SpriteEffects.None, 0); + } + } + } + else if (projectile1.type == 865) + { + Vector2 vector2 = new Vector2(projectile1.position.X + (float) projectile1.width * 0.5f, projectile1.position.Y + (float) projectile1.height * 0.5f); + float num115 = mountedCenter.X - vector2.X; + float num116 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num116, (double) num115) - 1.57f; + bool flag1 = true; + bool flag2 = true; + Texture2D texture2D = TextureAssets.Extra[154].Value; + while (flag1) + { + float f = (float) Math.Sqrt((double) num115 * (double) num115 + (double) num116 * (double) num116); + if ((double) f < 25.0) + flag1 = false; + else if (float.IsNaN(f)) + { + flag1 = false; + } + else + { + float num117 = (float) texture2D.Height / f; + float num118 = num115 * num117; + float num119 = num116 * num117; + vector2.X += num118; + vector2.Y += num119; + num115 = mountedCenter.X - vector2.X; + num116 = mountedCenter.Y - vector2.Y; + if (!flag2) + { + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.EntitySpriteDraw(texture2D, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(), color, rotation, texture2D.Size() / 2f, 1f, SpriteEffects.None, 0); + } + flag2 = false; + } + } + } + else if (projectile1.type == 935) + { + Vector2 vector2 = new Vector2(projectile1.position.X + (float) projectile1.width * 0.5f, projectile1.position.Y + (float) projectile1.height * 0.5f); + float num120 = mountedCenter.X - vector2.X; + float num121 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num121, (double) num120) - 1.57f; + bool flag3 = true; + bool flag4 = true; + Texture2D texture2D = TextureAssets.Extra[208].Value; + while (flag3) + { + float f = (float) Math.Sqrt((double) num120 * (double) num120 + (double) num121 * (double) num121); + if ((double) f < 8.0) + flag3 = false; + else if (float.IsNaN(f)) + { + flag3 = false; + } + else + { + float num122 = (float) texture2D.Height / f; + float num123 = num120 * num122; + float num124 = num121 * num122; + vector2.X += num123; + vector2.Y += num124; + num120 = mountedCenter.X - vector2.X; + num121 = mountedCenter.Y - vector2.Y; + if (!flag4) + { + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.EntitySpriteDraw(texture2D, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(), color, rotation, texture2D.Size() / 2f, 1f, SpriteEffects.None, 0); + } + flag4 = false; + } + } + } + else if (projectile1.type == 256) + { + Vector2 vector2 = new Vector2(projectile1.position.X + (float) projectile1.width * 0.5f, projectile1.position.Y + (float) projectile1.height * 0.5f); + float num125 = mountedCenter.X - vector2.X; + float num126 = mountedCenter.Y - vector2.Y; + float num127 = (float) Math.Atan2((double) num126, (double) num125) - 1.57f; + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num125 * (double) num125 + (double) num126 * (double) num126); + if ((double) f < 26.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num128 = 26f / f; + float num129 = num125 * num128; + float num130 = num126 * num128; + vector2.X += num129; + vector2.Y += num130; + num125 = Main.player[projectile1.owner].position.X + (float) (Main.player[projectile1.owner].width / 2) - vector2.X; + num126 = Main.player[projectile1.owner].position.Y + (float) (Main.player[projectile1.owner].height / 2) - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.EntitySpriteDraw(TextureAssets.Chain20.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain20.Width(), TextureAssets.Chain20.Height())), color, num127 - 0.785f, new Vector2((float) TextureAssets.Chain20.Width() * 0.5f, (float) TextureAssets.Chain20.Height() * 0.5f), 1f, SpriteEffects.None, 0); + } + } + } + else if (projectile1.type == 322) + { + Vector2 vector2 = new Vector2(projectile1.position.X + (float) projectile1.width * 0.5f, projectile1.position.Y + (float) projectile1.height * 0.5f); + float num131 = mountedCenter.X - vector2.X; + float num132 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num132, (double) num131) - 1.57f; + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num131 * (double) num131 + (double) num132 * (double) num132); + if ((double) f < 22.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num133 = 22f / f; + float num134 = num131 * num133; + float num135 = num132 * num133; + vector2.X += num134; + vector2.Y += num135; + num131 = mountedCenter.X - vector2.X; + num132 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.EntitySpriteDraw(TextureAssets.Chain29.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain29.Width(), TextureAssets.Chain29.Height())), color, rotation, new Vector2((float) TextureAssets.Chain29.Width() * 0.5f, (float) TextureAssets.Chain29.Height() * 0.5f), 1f, SpriteEffects.None, 0); + } + } + } + else if (projectile1.type == 315) + { + Vector2 vector2 = new Vector2(projectile1.position.X + (float) projectile1.width * 0.5f, projectile1.position.Y + (float) projectile1.height * 0.5f); + float num136 = mountedCenter.X - vector2.X; + float num137 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num137, (double) num136) - 1.57f; + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num136 * (double) num136 + (double) num137 * (double) num137); + if ((double) f < 50.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num138 = 40f / f; + float num139 = num136 * num138; + float num140 = num137 * num138; + vector2.X += num139; + vector2.Y += num140; + num136 = mountedCenter.X - vector2.X; + num137 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.EntitySpriteDraw(TextureAssets.Chain28.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain28.Width(), TextureAssets.Chain28.Height())), color, rotation, new Vector2((float) TextureAssets.Chain28.Width() * 0.5f, (float) TextureAssets.Chain28.Height() * 0.5f), 1f, SpriteEffects.None, 0); + } + } + } + else if (projectile1.type == 331) + { + Vector2 vector2 = new Vector2(projectile1.position.X + (float) projectile1.width * 0.5f, projectile1.position.Y + (float) projectile1.height * 0.5f); + float num141 = mountedCenter.X - vector2.X; + float num142 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num142, (double) num141) - 1.57f; + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num141 * (double) num141 + (double) num142 * (double) num142); + if ((double) f < 30.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num143 = 24f / f; + float num144 = num141 * num143; + float num145 = num142 * num143; + vector2.X += num144; + vector2.Y += num145; + num141 = mountedCenter.X - vector2.X; + num142 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.EntitySpriteDraw(TextureAssets.Chain30.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain30.Width(), TextureAssets.Chain30.Height())), color, rotation, new Vector2((float) TextureAssets.Chain30.Width() * 0.5f, (float) TextureAssets.Chain30.Height() * 0.5f), 1f, SpriteEffects.None, 0); + } + } + } + else if (projectile1.type == 332) + { + int num146 = 0; + Vector2 vector2 = new Vector2(projectile1.position.X + (float) projectile1.width * 0.5f, projectile1.position.Y + (float) projectile1.height * 0.5f); + float num147 = mountedCenter.X - vector2.X; + float num148 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num148, (double) num147) - 1.57f; + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num147 * (double) num147 + (double) num148 * (double) num148); + if ((double) f < 30.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + int i1 = (int) vector2.X / 16; + int j = (int) vector2.Y / 16; + if (num146 == 0) + Lighting.AddLight(i1, j, 0.0f, 0.2f, 0.2f); + if (num146 == 1) + Lighting.AddLight(i1, j, 0.1f, 0.2f, 0.0f); + if (num146 == 2) + Lighting.AddLight(i1, j, 0.2f, 0.1f, 0.0f); + if (num146 == 3) + Lighting.AddLight(i1, j, 0.2f, 0.0f, 0.2f); + float num149 = 16f / f; + float num150 = num147 * num149; + float num151 = num148 * num149; + vector2.X += num150; + vector2.Y += num151; + num147 = mountedCenter.X - vector2.X; + num148 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.EntitySpriteDraw(TextureAssets.Chain31.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, TextureAssets.Chain31.Height() / 4 * num146, TextureAssets.Chain31.Width(), TextureAssets.Chain31.Height() / 4)), color, rotation, new Vector2((float) TextureAssets.Chain30.Width() * 0.5f, (float) (TextureAssets.Chain30.Height() / 8)), 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(TextureAssets.Chain32.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, TextureAssets.Chain31.Height() / 4 * num146, TextureAssets.Chain31.Width(), TextureAssets.Chain31.Height() / 4)), new Microsoft.Xna.Framework.Color(200, 200, 200, 0), rotation, new Vector2((float) TextureAssets.Chain30.Width() * 0.5f, (float) (TextureAssets.Chain30.Height() / 8)), 1f, SpriteEffects.None, 0); + ++num146; + if (num146 > 3) + num146 = 0; + } + } + } + else if (projectile1.type == 372 || projectile1.type == 383 || projectile1.type == 396 || projectile1.type == 403 || projectile1.type == 404 || projectile1.type == 446 || projectile1.type >= 486 && projectile1.type <= 489 || projectile1.type >= 646 && projectile1.type <= 649 || projectile1.type == 652) + { + Texture2D texture1 = (Texture2D) null; + Microsoft.Xna.Framework.Color color8 = Microsoft.Xna.Framework.Color.Transparent; + Texture2D texture2 = TextureAssets.Chain33.Value; + if (projectile1.type == 383) + texture2 = TextureAssets.Chain34.Value; + if (projectile1.type == 396) + texture2 = TextureAssets.Chain35.Value; + if (projectile1.type == 403) + texture2 = TextureAssets.Chain36.Value; + if (projectile1.type == 404) + texture2 = TextureAssets.Chain37.Value; + if (projectile1.type == 446) + texture2 = TextureAssets.Extra[3].Value; + if (projectile1.type >= 486 && projectile1.type <= 489) + texture2 = TextureAssets.Chains[projectile1.type - 486].Value; + if (projectile1.type >= 646 && projectile1.type <= 649) + { + texture2 = TextureAssets.Chains[projectile1.type - 646 + 8].Value; + texture1 = TextureAssets.Chains[projectile1.type - 646 + 12].Value; + color8 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue); + } + if (projectile1.type == 652) + texture2 = TextureAssets.Chains[16].Value; + Vector2 position = projectile1.Center; + Microsoft.Xna.Framework.Rectangle? sourceRectangle = new Microsoft.Xna.Framework.Rectangle?(); + Vector2 origin = new Vector2((float) texture2.Width * 0.5f, (float) texture2.Height * 0.5f); + float height = (float) texture2.Height; + float num152 = 0.0f; + if (projectile1.type == 446) + { + int num153 = 7; + int num154 = (int) projectile1.localAI[0] / num153; + sourceRectangle = new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, texture2.Height / 4 * num154, texture2.Width, texture2.Height / 4)); + origin.Y /= 4f; + height /= 4f; + } + switch (projectile1.type) + { + case 383: + num152 = 14f; + break; + case 446: + num152 = 20f; + break; + case 487: + num152 = 8f; + break; + case 489: + num152 = 10f; + break; + } + if ((double) num152 != 0.0) + { + float num155 = -1.57f; + Vector2 vector2_1 = new Vector2((float) Math.Cos((double) projectile1.rotation + (double) num155), (float) Math.Sin((double) projectile1.rotation + (double) num155)); + Vector2 vector2_2 = position - vector2_1 * num152; + Vector2 vector2_3 = mountedCenter - vector2_2; + vector2_3.Normalize(); + position = vector2_2 - vector2_3 * height / 2f; + } + Vector2 vector2_4 = mountedCenter - position; + float rotation = (float) Math.Atan2((double) vector2_4.Y, (double) vector2_4.X) - 1.57f; + bool flag = true; + if (float.IsNaN(position.X) && float.IsNaN(position.Y)) + flag = false; + if (float.IsNaN(vector2_4.X) && float.IsNaN(vector2_4.Y)) + flag = false; + while (flag) + { + if ((double) vector2_4.Length() < (double) height + 1.0) + { + flag = false; + } + else + { + Vector2 vector2_5 = vector2_4; + vector2_5.Normalize(); + position += vector2_5 * height; + vector2_4 = mountedCenter - position; + Microsoft.Xna.Framework.Color color9 = Lighting.GetColor((int) position.X / 16, (int) ((double) position.Y / 16.0)); + if (projectile1.type == 396) + color9 *= (float) ((int) byte.MaxValue - projectile1.alpha) / (float) byte.MaxValue; + if (projectile1.type == 446) + color9 = projectile1.GetAlpha(color9); + if (projectile1.type == 488) + { + Lighting.AddLight(position, 0.2f, 0.0f, 0.175f); + color9 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + } + if (projectile1.type >= 646 && projectile1.type <= 649) + color9 = projectile1.GetAlpha(color9); + Main.EntitySpriteDraw(texture2, position - Main.screenPosition, sourceRectangle, color9, rotation, origin, 1f, SpriteEffects.None, 0); + if (texture1 != null) + Main.EntitySpriteDraw(texture1, position - Main.screenPosition, sourceRectangle, color8, rotation, origin, 1f, SpriteEffects.None, 0); + } + } + } + else if (projectile1.aiStyle == 7) + { + Vector2 vector2 = new Vector2(projectile1.position.X + (float) projectile1.width * 0.5f, projectile1.position.Y + (float) projectile1.height * 0.5f); + float num156 = mountedCenter.X - vector2.X; + float num157 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num157, (double) num156) - 1.57f; + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num156 * (double) num156 + (double) num157 * (double) num157); + if ((double) f < 25.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num158 = 12f / f; + float num159 = num156 * num158; + float num160 = num157 * num158; + vector2.X += num159; + vector2.Y += num160; + num156 = mountedCenter.X - vector2.X; + num157 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.EntitySpriteDraw(TextureAssets.Chain.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain.Width(), TextureAssets.Chain.Height())), color, rotation, new Vector2((float) TextureAssets.Chain.Width() * 0.5f, (float) TextureAssets.Chain.Height() * 0.5f), 1f, SpriteEffects.None, 0); + } + } + } + else if (projectile1.type == 262) + { + float x1 = projectile1.Center.X; + float y1 = projectile1.Center.Y; + float x2 = projectile1.velocity.X; + float y2 = projectile1.velocity.Y; + float num161 = 4f / (float) Math.Sqrt((double) x2 * (double) x2 + (double) y2 * (double) y2); + float x3; + float y3; + if ((double) projectile1.ai[0] == 0.0) + { + x3 = x1 - projectile1.velocity.X * num161; + y3 = y1 - projectile1.velocity.Y * num161; + } + else + { + x3 = x1 + projectile1.velocity.X * num161; + y3 = y1 + projectile1.velocity.Y * num161; + } + Vector2 vector2 = new Vector2(x3, y3); + float num162 = mountedCenter.X - vector2.X; + float num163 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num163, (double) num162) - 1.57f; + if (projectile1.alpha == 0) + { + int num164 = -1; + if ((double) projectile1.position.X + (double) (projectile1.width / 2) < (double) mountedCenter.X) + num164 = 1; + Main.player[projectile1.owner].itemRotation = Main.player[projectile1.owner].direction != 1 ? (float) Math.Atan2((double) num163 * (double) num164, (double) num162 * (double) num164) : (float) Math.Atan2((double) num163 * (double) num164, (double) num162 * (double) num164); + } + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num162 * (double) num162 + (double) num163 * (double) num163); + if ((double) f < 25.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num165 = 12f / f; + float num166 = num162 * num165; + float num167 = num163 * num165; + vector2.X += num166; + vector2.Y += num167; + num162 = mountedCenter.X - vector2.X; + num163 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.EntitySpriteDraw(TextureAssets.Chain22.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain22.Width(), TextureAssets.Chain22.Height())), color, rotation, new Vector2((float) TextureAssets.Chain22.Width() * 0.5f, (float) TextureAssets.Chain22.Height() * 0.5f), 1f, SpriteEffects.None, 0); + } + } + } + else if (projectile1.type == 273) + { + float x4 = projectile1.Center.X; + float y4 = projectile1.Center.Y; + float x5 = projectile1.velocity.X; + float y5 = projectile1.velocity.Y; + float num168 = 4f / (float) Math.Sqrt((double) x5 * (double) x5 + (double) y5 * (double) y5); + float x6; + float y6; + if ((double) projectile1.ai[0] == 0.0) + { + x6 = x4 - projectile1.velocity.X * num168; + y6 = y4 - projectile1.velocity.Y * num168; + } + else + { + x6 = x4 + projectile1.velocity.X * num168; + y6 = y4 + projectile1.velocity.Y * num168; + } + Vector2 vector2 = new Vector2(x6, y6); + float num169 = mountedCenter.X - vector2.X; + float num170 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num170, (double) num169) - 1.57f; + if (projectile1.alpha == 0) + { + int num171 = -1; + if ((double) projectile1.position.X + (double) (projectile1.width / 2) < (double) mountedCenter.X) + num171 = 1; + Main.player[projectile1.owner].itemRotation = Main.player[projectile1.owner].direction != 1 ? (float) Math.Atan2((double) num170 * (double) num171, (double) num169 * (double) num171) : (float) Math.Atan2((double) num170 * (double) num171, (double) num169 * (double) num171); + } + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num169 * (double) num169 + (double) num170 * (double) num170); + if ((double) f < 25.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num172 = 12f / f; + float num173 = num169 * num172; + float num174 = num170 * num172; + vector2.X += num173; + vector2.Y += num174; + num169 = mountedCenter.X - vector2.X; + num170 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.EntitySpriteDraw(TextureAssets.Chain23.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain23.Width(), TextureAssets.Chain23.Height())), color, rotation, new Vector2((float) TextureAssets.Chain23.Width() * 0.5f, (float) TextureAssets.Chain23.Height() * 0.5f), 1f, SpriteEffects.None, 0); + } + } + } + else if (projectile1.type == 481) + { + float x7 = projectile1.Center.X; + float y7 = projectile1.Center.Y; + float x8 = projectile1.velocity.X; + float y8 = projectile1.velocity.Y; + float num175 = 4f / (float) Math.Sqrt((double) x8 * (double) x8 + (double) y8 * (double) y8); + float x9; + float y9; + if ((double) projectile1.ai[0] == 0.0) + { + x9 = x7 - projectile1.velocity.X * num175; + y9 = y7 - projectile1.velocity.Y * num175; + } + else + { + x9 = x7 + projectile1.velocity.X * num175; + y9 = y7 + projectile1.velocity.Y * num175; + } + Vector2 vector2 = new Vector2(x9, y9); + float num176 = mountedCenter.X - vector2.X; + float num177 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num177, (double) num176) - 1.57f; + if (projectile1.alpha == 0) + { + int num178 = -1; + if ((double) projectile1.position.X + (double) (projectile1.width / 2) < (double) mountedCenter.X) + num178 = 1; + Main.player[projectile1.owner].itemRotation = Main.player[projectile1.owner].direction != 1 ? (float) Math.Atan2((double) num177 * (double) num178, (double) num176 * (double) num178) : (float) Math.Atan2((double) num177 * (double) num178, (double) num176 * (double) num178); + } + bool flag = true; + while (flag) + { + float scale = 0.85f; + float f3 = (float) Math.Sqrt((double) num176 * (double) num176 + (double) num177 * (double) num177); + float num179 = f3; + if ((double) f3 < (double) TextureAssets.Chain40.Height() * 1.5) + flag = false; + else if (float.IsNaN(f3)) + { + flag = false; + } + else + { + float num180 = (float) TextureAssets.Chain40.Height() * scale / f3; + float num181 = num176 * num180; + float num182 = num177 * num180; + vector2.X += num181; + vector2.Y += num182; + num176 = mountedCenter.X - vector2.X; + num177 = mountedCenter.Y - vector2.Y; + if ((double) num179 > (double) (TextureAssets.Chain40.Height() * 2)) + { + for (int index = 0; index < 2; ++index) + { + float num183 = 0.75f; + float num184 = index != 0 ? Math.Abs(Main.player[projectile1.owner].velocity.Y) : Math.Abs(Main.player[projectile1.owner].velocity.X); + if ((double) num184 > 10.0) + num184 = 10f; + float num185 = num184 / 10f; + float num186 = num183 * num185; + float num187 = num179 / 80f; + if ((double) num187 > 1.0) + num187 = 1f; + float f4 = num186 * num187; + if ((double) f4 < 0.0) + f4 = 0.0f; + if (!float.IsNaN(f4)) + { + if (index == 0) + { + if ((double) Main.player[projectile1.owner].velocity.X < 0.0 && (double) projectile1.Center.X < (double) mountedCenter.X) + num177 *= 1f - f4; + if ((double) Main.player[projectile1.owner].velocity.X > 0.0 && (double) projectile1.Center.X > (double) mountedCenter.X) + num177 *= 1f - f4; + } + else + { + if ((double) Main.player[projectile1.owner].velocity.Y < 0.0 && (double) projectile1.Center.Y < (double) mountedCenter.Y) + num176 *= 1f - f4; + if ((double) Main.player[projectile1.owner].velocity.Y > 0.0 && (double) projectile1.Center.Y > (double) mountedCenter.Y) + num176 *= 1f - f4; + } + } + } + } + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.EntitySpriteDraw(TextureAssets.Chain40.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain40.Width(), TextureAssets.Chain40.Height())), color, rotation, new Vector2((float) TextureAssets.Chain40.Width() * 0.5f, (float) TextureAssets.Chain40.Height() * 0.5f), scale, SpriteEffects.None, 0); + } + } + } + else if (projectile1.type == 271) + { + float x10 = projectile1.Center.X; + float y10 = projectile1.Center.Y; + float x11 = projectile1.velocity.X; + float y11 = projectile1.velocity.Y; + float num188 = 4f / (float) Math.Sqrt((double) x11 * (double) x11 + (double) y11 * (double) y11); + float x12; + float y12; + if ((double) projectile1.ai[0] == 0.0) + { + x12 = x10 - projectile1.velocity.X * num188; + y12 = y10 - projectile1.velocity.Y * num188; + } + else + { + x12 = x10 + projectile1.velocity.X * num188; + y12 = y10 + projectile1.velocity.Y * num188; + } + Vector2 vector2 = new Vector2(x12, y12); + float num189 = mountedCenter.X - vector2.X; + float num190 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num190, (double) num189) - 1.57f; + if (projectile1.alpha == 0) + { + int num191 = -1; + if ((double) projectile1.position.X + (double) (projectile1.width / 2) < (double) mountedCenter.X) + num191 = 1; + Main.player[projectile1.owner].itemRotation = Main.player[projectile1.owner].direction != 1 ? (float) Math.Atan2((double) num190 * (double) num191, (double) num189 * (double) num191) : (float) Math.Atan2((double) num190 * (double) num191, (double) num189 * (double) num191); + } + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num189 * (double) num189 + (double) num190 * (double) num190); + if ((double) f < 25.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num192 = 12f / f; + float num193 = num189 * num192; + float num194 = num190 * num192; + vector2.X += num193; + vector2.Y += num194; + num189 = mountedCenter.X - vector2.X; + num190 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.EntitySpriteDraw(TextureAssets.Chain18.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain18.Width(), TextureAssets.Chain18.Height())), color, rotation, new Vector2((float) TextureAssets.Chain18.Width() * 0.5f, (float) TextureAssets.Chain18.Height() * 0.5f), 1f, SpriteEffects.None, 0); + } + } + } + else if (projectile1.aiStyle == 13) + { + float num195 = projectile1.position.X + 8f; + float num196 = projectile1.position.Y + 2f; + float x13 = projectile1.velocity.X; + float num197 = projectile1.velocity.Y; + if ((double) x13 == 0.0 && (double) num197 == 0.0) + num197 = 0.0001f; + float num198 = 20f / (float) Math.Sqrt((double) x13 * (double) x13 + (double) num197 * (double) num197); + float x14; + float y; + if ((double) projectile1.ai[0] == 0.0) + { + x14 = num195 - projectile1.velocity.X * num198; + y = num196 - projectile1.velocity.Y * num198; + } + else + { + x14 = num195 + projectile1.velocity.X * num198; + y = num196 + projectile1.velocity.Y * num198; + } + Vector2 vector2 = new Vector2(x14, y); + float num199 = mountedCenter.X - vector2.X; + float num200 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num200, (double) num199) - 1.57f; + if (projectile1.alpha == 0) + { + int num201 = -1; + if ((double) projectile1.position.X + (double) (projectile1.width / 2) < (double) mountedCenter.X) + num201 = 1; + Main.player[projectile1.owner].itemRotation = Main.player[projectile1.owner].direction != 1 ? (float) Math.Atan2((double) num200 * (double) num201, (double) num199 * (double) num201) : (float) Math.Atan2((double) num200 * (double) num201, (double) num199 * (double) num201); + } + bool flag = true; + while (flag) + { + float f = (float) Math.Sqrt((double) num199 * (double) num199 + (double) num200 * (double) num200); + if ((double) f < 25.0) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num202 = 12f / f; + float num203 = num199 * num202; + float num204 = num200 * num202; + vector2.X += num203; + vector2.Y += num204; + num199 = mountedCenter.X - vector2.X; + num200 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.EntitySpriteDraw(TextureAssets.Chain.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain.Width(), TextureAssets.Chain.Height())), color, rotation, new Vector2((float) TextureAssets.Chain.Width() * 0.5f, (float) TextureAssets.Chain.Height() * 0.5f), 1f, SpriteEffects.None, 0); + } + } + } + else if (projectile1.type == 190) + { + float x15 = projectile1.position.X + (float) (projectile1.width / 2); + float y13 = projectile1.position.Y + (float) (projectile1.height / 2); + float x16 = projectile1.velocity.X; + float y14 = projectile1.velocity.Y; + Math.Sqrt((double) x16 * (double) x16 + (double) y14 * (double) y14); + Vector2 vector2 = new Vector2(x15, y13); + float num205 = mountedCenter.X - vector2.X; + float num206 = mountedCenter.Y + Main.player[projectile1.owner].gfxOffY - vector2.Y; + Math.Atan2((double) num206, (double) num205); + if (projectile1.alpha == 0) + { + int num207 = -1; + if ((double) projectile1.position.X + (double) (projectile1.width / 2) < (double) mountedCenter.X) + num207 = 1; + Main.player[projectile1.owner].itemRotation = Main.player[projectile1.owner].direction != 1 ? (float) Math.Atan2((double) num206 * (double) num207, (double) num205 * (double) num207) : (float) Math.Atan2((double) num206 * (double) num207, (double) num205 * (double) num207); + } + } + else if (projectile1.aiStyle == 15) + Main.DrawProj_FlailChains(projectile1, mountedCenter); + Microsoft.Xna.Framework.Color color10 = Lighting.GetColor((int) ((double) projectile1.position.X + (double) projectile1.width * 0.5) / 16, (int) (((double) projectile1.position.Y + (double) projectile1.height * 0.5) / 16.0)); + if (projectile1.hide && !ProjectileID.Sets.DontAttachHideToAlpha[projectile1.type]) + color10 = Lighting.GetColor((int) mountedCenter.X / 16, (int) ((double) mountedCenter.Y / 16.0)); + if (projectile1.type == 14) + color10 = Microsoft.Xna.Framework.Color.White; + int num208 = 0; + int num209 = 0; + if (projectile1.type == 175) + num208 = 10; + if (projectile1.type == 392) + num208 = -2; + if (projectile1.type == 499) + num208 = 12; + if (projectile1.type == 765) + { + num208 = 22; + num209 = -16; + } + if (projectile1.bobber) + num208 = 8; + if (projectile1.type == 519) + { + num208 = 6; + num209 -= 6; + } + if (projectile1.type == 520) + num208 = 12; + if (projectile1.type == 492) + { + num209 -= 4; + num208 += 5; + } + if (projectile1.type == 498) + num208 = 6; + if (projectile1.type == 489) + num208 = -2; + if (projectile1.type == 486) + num208 = -6; + if (projectile1.type == 525) + num208 = 5; + if (projectile1.type == 488) + num209 -= 8; + if (projectile1.type == 373) + { + num209 = -10; + num208 = 6; + } + if (projectile1.type == 375) + { + num209 = -11; + num208 = 12; + } + if (projectile1.type == 423) + num209 = -5; + if (projectile1.type == 346) + num208 = 4; + if (projectile1.type == 331) + num209 = -4; + if (projectile1.type == 254) + num208 = 3; + if (projectile1.type == 273) + num209 = 2; + if (projectile1.type == 335) + num208 = 6; + if (projectile1.type == 162) + { + num208 = 1; + num209 = 1; + } + if (projectile1.type == 377) + num208 = -6; + if (projectile1.type == 353) + { + num208 = 36; + num209 = -12; + } + if (projectile1.type == 324) + { + num208 = 22; + num209 = -6; + } + if (projectile1.type == 266) + { + num208 = 10; + num209 = -10; + } + if (projectile1.type == 319) + { + num208 = 10; + num209 = -12; + } + if (projectile1.type == 315) + { + num208 = -13; + num209 = -6; + } + if (projectile1.type == 313 && projectile1.height != 54) + { + num209 = -12; + num208 = 20; + } + if (projectile1.type == 314) + { + num209 = -8; + num208 = 0; + } + if (projectile1.type == 269) + { + num208 = 18; + num209 = -14; + } + if (projectile1.type == 268) + { + num208 = 22; + num209 = -2; + } + if (projectile1.type == 18) + { + num208 = 3; + num209 = 3; + } + if (projectile1.type == 16) + num208 = 6; + if (projectile1.type == 17 || projectile1.type == 31) + num208 = 2; + if (projectile1.type == 25 || projectile1.type == 26 || projectile1.type == 35 || projectile1.type == 63 || projectile1.type == 154) + { + num208 = 6; + num209 -= 6; + } + if (projectile1.type == 947 || projectile1.type == 948) + { + num208 = 4; + num209 -= 4; + } + if (projectile1.type == 28 || projectile1.type == 37 || projectile1.type == 75) + num208 = 8; + if (projectile1.type == 29 || projectile1.type == 470 || projectile1.type == 637) + num208 = 11; + if (projectile1.type == 43) + num208 = 4; + if (projectile1.type == 208) + { + num208 = 2; + num209 -= 12; + } + if (projectile1.type == 209) + { + num208 = 4; + num209 -= 8; + } + if (projectile1.type == 210) + { + num208 = 2; + num209 -= 22; + } + if (projectile1.type == 251) + { + num208 = 18; + num209 -= 10; + } + if (projectile1.type == 163 || projectile1.type == 310) + num208 = 10; + if (projectile1.type == 69 || projectile1.type == 70) + { + num208 = 4; + num209 = 4; + } + float x17 = (float) ((double) (TextureAssets.Projectile[projectile1.type].Width() - projectile1.width) * 0.5 + (double) projectile1.width * 0.5); + if (projectile1.type == 50 || projectile1.type == 53 || projectile1.type == 515 || projectile1.type == 870) + num209 = -8; + if (projectile1.type == 473) + { + num209 = -6; + num208 = 2; + } + if (projectile1.type == 72 || projectile1.type == 86 || projectile1.type == 87) + { + num209 = -16; + num208 = 8; + } + if (projectile1.type == 74) + num209 = -6; + if (projectile1.type == 138 || projectile1.type == 484) + num208 = 1; + if (projectile1.type == 655) + num208 = 1; + if (projectile1.type == 111) + { + num208 = 18; + num209 = -16; + } + if (projectile1.type == 875) + { + num208 = 16; + num209 = -16; + } + if (projectile1.type == 881) + { + num208 = 14; + num209 = -8; + } + if (projectile1.type == 934) + { + num208 = 14; + num209 = -20; + } + if (projectile1.type == 884) + { + num208 = 16; + num209 = -12; + } + if (projectile1.type == 890) + { + num208 = 26; + num209 = -9; + } + if (projectile1.type == 891) + { + num208 = 30; + num209 = -12; + } + if (projectile1.type == 897) + { + num208 = 38; + num209 = -13; + } + if (projectile1.type == 899) + { + num208 = 28; + num209 = -12; + } + if (projectile1.type == 900) + { + num208 = 54; + num209 = -30; + } + if (projectile1.type == 334) + { + num209 = -18; + num208 = 8; + } + if (projectile1.type == 816) + { + num209 = -19; + num208 = 6; + } + if (projectile1.type == 821) + { + num209 = -10; + num208 = 6; + } + if (projectile1.type == 825) + { + num209 = -19; + num208 = 14; + } + if (projectile1.type == 854) + { + num209 = -14; + num208 = -4; + } + if (projectile1.type == 858) + { + num209 = -8; + num208 = 16; + } + if (projectile1.type == 859) + { + num209 = -8; + num208 = 8; + } + if (projectile1.type == 860) + { + num209 = -8; + num208 = 34; + } + if (projectile1.type == 200) + { + num208 = 12; + num209 = -12; + } + if (projectile1.type == 211) + { + num208 = 14; + num209 = 0; + } + if (projectile1.type == 236) + { + num208 = 30; + num209 = -14; + } + if (projectile1.type >= 191 && projectile1.type <= 194) + { + num208 = 26; + num209 = projectile1.direction != 1 ? -22 : -10; + } + if (projectile1.type >= 390 && projectile1.type <= 392) + num209 = 4 * projectile1.direction; + if (projectile1.type == 112) + num208 = 12; + int type1 = projectile1.type; + if (projectile1.type == 517 || projectile1.type == 681) + num208 = 6; + if (projectile1.type == 516) + num208 = 6; + if (projectile1.type == (int) sbyte.MaxValue) + num208 = 8; + if (projectile1.type == 155) + { + num208 = 3; + num209 = 3; + } + if (projectile1.type == 397) + { + --x17; + num208 = -2; + num209 = -2; + } + if (projectile1.type == 398) + num208 = 8; + SpriteEffects spriteEffects = SpriteEffects.None; + if (projectile1.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + if (projectile1.type == 681 && (double) projectile1.velocity.X > 0.0) + spriteEffects ^= SpriteEffects.FlipHorizontally; + if (projectile1.type == 221) + { + for (int index = 1; index < 10; ++index) + { + float num210 = (float) ((double) projectile1.velocity.X * (double) index * 0.5); + float num211 = (float) ((double) projectile1.velocity.Y * (double) index * 0.5); + Microsoft.Xna.Framework.Color alpha = projectile1.GetAlpha(color10); + float num212 = 0.0f; + if (index == 1) + num212 = 0.9f; + if (index == 2) + num212 = 0.8f; + if (index == 3) + num212 = 0.7f; + if (index == 4) + num212 = 0.6f; + if (index == 5) + num212 = 0.5f; + if (index == 6) + num212 = 0.4f; + if (index == 7) + num212 = 0.3f; + if (index == 8) + num212 = 0.2f; + if (index == 9) + num212 = 0.1f; + alpha.R = (byte) ((double) alpha.R * (double) num212); + alpha.G = (byte) ((double) alpha.G * (double) num212); + alpha.B = (byte) ((double) alpha.B * (double) num212); + alpha.A = (byte) ((double) alpha.A * (double) num212); + int height = TextureAssets.Projectile[projectile1.type].Height() / Main.projFrames[projectile1.type]; + int y = height * projectile1.frame; + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209 - num210, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY - num211), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, TextureAssets.Projectile[projectile1.type].Width(), height)), alpha, projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale, spriteEffects, 0); + } + } + if (projectile1.type == 408 || projectile1.type == 435 || projectile1.type == 436 || projectile1.type == 438 || projectile1.type == 452 || projectile1.type == 454 || projectile1.type == 459 || projectile1.type == 462 || projectile1.type == 503 || projectile1.type == 532 || projectile1.type == 533 || projectile1.type == 573 || projectile1.type == 582 || projectile1.type == 585 || projectile1.type == 592 || projectile1.type == 601 || projectile1.type == 636 || projectile1.type == 638 || projectile1.type == 640 || projectile1.type == 639 || projectile1.type == 424 || projectile1.type == 425 || projectile1.type == 426 || projectile1.type == 660 || projectile1.type == 661 || projectile1.type == 671 || projectile1.type == 664 || projectile1.type == 666 || projectile1.type == 668 || projectile1.type == 675 || projectile1.type == 680 || projectile1.type == 682 || projectile1.type == 684 || projectile1.type == 686 || projectile1.type == 700 || projectile1.type == 706 || projectile1.type == 709 || projectile1.type == 710 || projectile1.type == 711 || projectile1.type == 261 || ProjectileID.Sets.IsAGolfBall[projectile1.type] || projectile1.type == 729 || projectile1.type == 732 || projectile1.type == 731 || projectile1.type == 755 || projectile1.type == 811 || projectile1.type == 814 || projectile1.type == 819 || projectile1.type == 864 || projectile1.type == 873 || projectile1.type == 872 || projectile1.type == 833 || projectile1.type == 834 || projectile1.type == 835 || projectile1.type == 818 || projectile1.type == 902 || projectile1.type == 894 || projectile1.type == 901 || projectile1.type == 909 || projectile1.type == 916 || projectile1.type == 931 || projectile1.type == 933) + { + Texture2D texture2D1 = TextureAssets.Projectile[projectile1.type].Value; + int height = TextureAssets.Projectile[projectile1.type].Height() / Main.projFrames[projectile1.type]; + Microsoft.Xna.Framework.Rectangle r1 = new Microsoft.Xna.Framework.Rectangle(0, height * projectile1.frame, texture2D1.Width, height); + Vector2 origin1 = r1.Size() / 2f; + Vector2 zero = Vector2.Zero; + float num213 = 0.0f; + if (projectile1.type == 503) + origin1.Y = 70f; + if (projectile1.type == 686 || projectile1.type == 711) + origin1.Y = (float) (r1.Height - 70); + if (projectile1.type == 438) + r1.Y = 0; + if (projectile1.type == 452) + r1.Y = 0; + if (projectile1.type == 408) + r1.Y = height; + if (projectile1.type == 636) + origin1.Y = 10f; + if (projectile1.type == 638) + origin1.Y = 2f; + if (projectile1.type == 640 || projectile1.type == 639 || projectile1.type == 710) + origin1.Y = 5f; + if (projectile1.type == 700) + origin1.X = projectile1.spriteDirection == 1 ? (float) (r1.Width - 20) : 20f; + if (projectile1.type == 872) + { + r1.Width /= 2; + origin1.X /= 2f; + } + if (projectile1.type == 933) + { + int index = (int) projectile1.ai[1]; + if (TextureAssets.Item.IndexInRange>(index)) + { + Main.instance.LoadItem(index); + texture2D1 = TextureAssets.Item[index].Value; + r1 = texture2D1.Frame(); + origin1 = r1.Size() / 2f; + num213 = -0.7853982f * (float) projectile1.spriteDirection; + } + } + if (projectile1.type == 833 && projectile1.frame != 8) + { + zero.Y += (float) (projectile1.height / 2); + origin1 = r1.Size() * new Vector2(0.5f, 1f); + origin1.Y -= 4f; + origin1.X -= (float) (7 * spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally).ToDirectionInt()); + } + if ((projectile1.type == 834 || projectile1.type == 835) && projectile1.frame != 10) + { + zero.Y += (float) (projectile1.height / 2); + origin1 = r1.Size() * new Vector2(0.5f, 1f); + origin1.Y -= 4f; + origin1.X -= (float) (2 * spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally).ToDirectionInt()); + } + int num214 = 8; + int num215 = 2; + int num216 = 1; + float num217 = 1f; + float num218 = 15f; + float num219 = 0.0f; + Microsoft.Xna.Framework.Rectangle rectangle1 = r1; + UnifiedRandom r2 = (UnifiedRandom) null; + if (projectile1.type == 503) + { + num214 = 9; + num215 = 3; + num217 = 0.5f; + } + else if (projectile1.type == 261) + { + num216 = 18; + num214 = 0; + num215 = -2; + num217 = 1.3f; + } + else if (projectile1.type == 833 || projectile1.type == 834 || projectile1.type == 835) + { + num216 = 6; + num214 = 0; + num215 = -1; + num217 = 1.5f; + } + else if (projectile1.type == 818) + { + num216 = 18; + num214 = 0; + num215 = -2; + num217 = 1f; + } + else if (projectile1.type == 729) + { + num216 = 18; + num214 = 0; + num215 = -2; + num217 = 1.3f; + } + else if (projectile1.type == 686 || projectile1.type == 711) + { + num216 = 19; + num214 = 0; + num215 = -3; + num217 = 0.5f; + } + else if (ProjectileID.Sets.IsAGolfBall[projectile1.type]) + { + num216 = 0; + num214 = 0; + num215 = -1; + num217 = 2f; + } + else if (projectile1.type == 671) + { + num216 = 5; + num214 = 0; + num215 = -1; + num217 = 2.6f; + } + else if (projectile1.type == 811) + { + num216 = 5; + num214 = 0; + num215 = -1; + num217 = 2.6f; + } + else if (projectile1.type == 814) + { + num216 = 18; + num214 = 0; + num215 = -1; + num217 = 1f; + } + else if (projectile1.type == 755) + { + num216 = 5; + num214 = 0; + num215 = -1; + num217 = 2.6f; + } + else if (projectile1.type == 700) + { + num214 = 5; + num215 = 1; + num217 = 2.6f; + } + else if (projectile1.type == 731) + { + num216 = 19; + num214 = 0; + num215 = -1; + num217 = 0.5f; + } + else if (projectile1.type == 864) + { + num216 = 12; + num214 = 0; + num215 = -1; + num217 = 1.4f; + rectangle1.Y += rectangle1.Height; + } + else if (projectile1.type == 916) + { + num216 = 19; + num214 = 0; + num215 = -1; + num217 = 1.4f; + rectangle1.Y += rectangle1.Height; + r2 = new UnifiedRandom(projectile1.timeLeft); + } + else if (projectile1.type == 873) + { + num216 = 39; + num218 = 40f; + num214 = 0; + num215 = -1; + num217 = 1.4f; + } + else if (projectile1.type == 931) + { + num216 = 19; + num218 = 20f; + num214 = 0; + num215 = -1; + num217 = 0.7f; + } + else if (projectile1.type == 933) + { + num216 = 60; + num218 = 60f; + num214 = 0; + num215 = -15; + num217 = 1f; + } + else if (projectile1.type == 872) + { + num216 = 79; + num218 = 10f; + num214 = 0; + num215 = -1; + num217 = 1f; + rectangle1.X += rectangle1.Width; + } + else if (projectile1.type == 664 || projectile1.type == 666 || projectile1.type == 668) + { + num214 = 8; + num215 = 2; + num217 = 0.4f; + } + else if (projectile1.type == 582 || projectile1.type == 902) + { + num214 = 10; + num215 = 2; + num217 = 0.7f; + num219 = 0.2f; + } + else if (projectile1.type == 675) + { + num214 = 5; + num215 = 1; + num217 = 0.4f; + } + else if (projectile1.type == 638) + { + num214 = 5; + num215 = 1; + num217 = 1f; + } + else if (projectile1.type == 660) + { + num214 = 3; + num215 = 1; + num217 = 8f; + r1 = new Microsoft.Xna.Framework.Rectangle(38 * projectile1.frame, 0, 38, 38); + rectangle1 = r1; + origin1 = r1.Size() / 2f; + } + else if (projectile1.type == 684) + { + num214 = 8; + num215 = 1; + num217 = 0.75f; + } + else if (projectile1.type == 639) + { + num214 = 10; + num215 = 1; + num217 = 1f; + } + else if (projectile1.type == 710) + { + num216 = 9; + num214 = 0; + num215 = -2; + num217 = 0.5f; + } + else if (projectile1.type == 640) + { + num214 = 20; + num215 = 1; + num217 = 1f; + } + else if (projectile1.type == 436) + { + num215 = 2; + num217 = 0.5f; + } + else if (projectile1.type == 424 || projectile1.type == 425 || projectile1.type == 426) + { + num214 = 10; + num215 = 2; + num217 = 0.6f; + } + else if (projectile1.type == 438) + { + num214 = 10; + num215 = 2; + num217 = 1f; + } + else if (projectile1.type == 452) + { + num214 = 10; + num215 = 3; + num217 = 0.5f; + } + else if (projectile1.type == 454) + { + num214 = 5; + num215 = 1; + num217 = 0.2f; + } + else if (projectile1.type == 462) + { + num214 = 7; + num215 = 1; + num217 = 0.2f; + } + else if (projectile1.type == 661) + { + num214 = 0; + num215 = 1; + num217 = 0.5f; + } + else if (projectile1.type == 706) + { + num216 = 9; + num214 = 0; + num215 = -2; + num217 = 0.5f; + } + else if (projectile1.type == 585) + { + num214 = 7; + num215 = 1; + num217 = 0.2f; + } + else if (projectile1.type == 459) + { + num214 = (int) ((double) projectile1.scale * 8.0); + num215 = num214 / 4; + if (num215 < 1) + num215 = 1; + num217 = 0.3f; + } + else if (projectile1.type == 709) + { + num214 = 8; + num215 = num214 / 4; + if (num215 < 1) + num215 = 1; + num217 = 0.5f; + } + else if (projectile1.type == 532) + { + num214 = 10; + num215 = 1; + num217 = 0.7f; + num219 = 0.2f; + } + else if (projectile1.type == 592) + { + num214 = 10; + num215 = 2; + num217 = 1f; + } + else if (projectile1.type == 601) + { + num214 = 8; + num215 = 1; + num217 = 0.3f; + } + else if (projectile1.type == 636) + { + num214 = 20; + num215 = 3; + num217 = 0.5f; + } + else if (projectile1.type == 680) + { + num214 = 9; + num215 = 3; + num217 = 0.5f; + } + else if (projectile1.type == 533) + { + if ((double) projectile1.ai[0] >= 6.0 && (double) projectile1.ai[0] <= 8.0) + { + num214 = (double) projectile1.ai[0] == 6.0 ? 8 : 4; + num215 = 1; + if ((double) projectile1.ai[0] != 7.0) + num219 = 0.2f; + } + else + num214 = num215 = 0; + } + for (int index = num216; num215 > 0 && index < num214 || num215 < 0 && index > num214; index += num215) + { + if (index < projectile1.oldPos.Length) + { + Microsoft.Xna.Framework.Color color11 = color10; + if (projectile1.type == 408 || projectile1.type == 435 || projectile1.type == 682 || projectile1.type == 732 || projectile1.type == 731) + color11 = Microsoft.Xna.Framework.Color.Lerp(color11, Microsoft.Xna.Framework.Color.Blue, 0.5f); + else if (projectile1.type == 436) + color11 = Microsoft.Xna.Framework.Color.Lerp(color11, Microsoft.Xna.Framework.Color.LimeGreen, 0.5f); + else if (projectile1.type >= 424 && projectile1.type <= 426) + color11 = Microsoft.Xna.Framework.Color.Lerp(color11, Microsoft.Xna.Framework.Color.Red, 0.5f); + else if (projectile1.type == 640 || projectile1.type == 639) + color11.A = (byte) 127; + else if (projectile1.type == 671) + color11 = Microsoft.Xna.Framework.Color.Lerp(color11, Microsoft.Xna.Framework.Color.Purple, (float) index / (float) num214); + else if (projectile1.type == 811) + color11 = Microsoft.Xna.Framework.Color.Lerp(color11, Microsoft.Xna.Framework.Color.Crimson * 0.5f, (float) index / (float) num214); + else if (projectile1.type == 814) + color11 = Microsoft.Xna.Framework.Color.Lerp(color11, color11 * 0.5f, (float) index / (float) num214); + else if (projectile1.type == 261) + color11 = Microsoft.Xna.Framework.Color.Lerp(color11, new Microsoft.Xna.Framework.Color(60, 60, 60, 60), (float) index / (float) num214); + else if (ProjectileID.Sets.IsAGolfBall[projectile1.type]) + color11 = Microsoft.Xna.Framework.Color.Lerp(color11, new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 230, 40, 20), (float) index / (float) num214); + color11 = projectile1.GetAlpha(color11); + if (projectile1.type == 438) + { + color11.G /= (byte) index; + color11.B /= (byte) index; + } + else if (projectile1.type == 755) + color11 = projectile1.AI_156_GetColor(); + else if (projectile1.type == 873) + { + color11 = projectile1.AI_171_GetColor(); + color11.A /= (byte) 2; + color11 *= Utils.GetLerpValue(0.0f, 20f, (float) projectile1.timeLeft, true); + } + else if (projectile1.type == 931) + { + color11 = projectile1.GetFairyQueenWeaponsColor(0.5f); + color11 *= Utils.GetLerpValue(0.0f, 20f, (float) projectile1.timeLeft, true); + } + else if (projectile1.type == 872) + { + color11 = projectile1.AI_173_GetColor(); + color11 *= 0.4f; + color11.A = (byte) ((double) color11.A * 0.600000023841858); + if (index > 80) + color11 *= 0.15f * Utils.GetLerpValue(120f, 80f, (float) index, true); + } + else if (projectile1.type == 864) + { + color11 = projectile1.GetFloatingDaggerMinionGlowColor(); + color11.A /= (byte) 4; + } + else if (projectile1.type == 682) + color11.G /= (byte) index; + else if (projectile1.type == 686) + { + if (!(projectile1.oldPos[index] == Vector2.Zero)) + { + float t = (float) index / (float) num216; + color11 = (double) t >= 0.5 ? Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Purple, Microsoft.Xna.Framework.Color.Black, Utils.GetLerpValue(0.5f, 1f, t, false)) : Microsoft.Xna.Framework.Color.Lerp(color11, Microsoft.Xna.Framework.Color.Purple, Utils.GetLerpValue(0.0f, 0.5f, t, false)); + } + else + continue; + } + else if (projectile1.type == 711) + { + if (!(projectile1.oldPos[index] == Vector2.Zero)) + { + float t = (float) index / (float) num216; + color11 = (double) t >= 0.5 ? Microsoft.Xna.Framework.Color.Lerp(new Microsoft.Xna.Framework.Color(128, 0, (int) byte.MaxValue, 180), Microsoft.Xna.Framework.Color.Black, Utils.GetLerpValue(0.5f, 1f, t, false)) : Microsoft.Xna.Framework.Color.Lerp(color11, new Microsoft.Xna.Framework.Color(128, 0, (int) byte.MaxValue, 180), Utils.GetLerpValue(0.0f, 0.5f, t, false)); + } + else + continue; + } + else if (projectile1.type == 684) + { + if (index == 1) + { + color11.B /= (byte) 2; + color11.G /= (byte) 2; + color11.A /= (byte) 2; + } + color11.B /= (byte) index; + color11.G /= (byte) index; + color11.A /= (byte) index; + } + else if (projectile1.type == 706 || projectile1.type == 710) + { + color11.B /= (byte) index; + color11.G /= (byte) index; + color11.A /= (byte) index; + } + else if (projectile1.type == 818) + { + float to = 0.3f; + float amount = Utils.GetLerpValue(0.0f, to, projectile1.ai[0], true) * Utils.GetLerpValue(1f, 1f - to, projectile1.ai[0], true); + double lerpValue1 = (double) Utils.GetLerpValue(0.0f, (float) (num215 * -3), (float) index, true); + double lerpValue2 = (double) Utils.GetLerpValue((float) num216, (float) (num216 + num215 * 3), (float) index, true); + Microsoft.Xna.Framework.Color color12 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + Microsoft.Xna.Framework.Color favoriteColor = Main.OurFavoriteColor; + favoriteColor.A = (byte) 0; + favoriteColor *= amount; + color11 = Microsoft.Xna.Framework.Color.Lerp(favoriteColor, color12, amount); + } + else if (projectile1.type == 833 || projectile1.type == 834 || projectile1.type == 835) + { + float lerpValue = Utils.GetLerpValue(0.0f, 6f, projectile1.velocity.Length(), true); + color11 = Microsoft.Xna.Framework.Color.Lerp(color11, Microsoft.Xna.Framework.Color.White, lerpValue * 0.5f); + color11.A = (byte) 0; + color11 *= lerpValue; + } + else if (projectile1.type == 592) + { + color11.R /= (byte) index; + color11.G /= (byte) index; + } + else if (projectile1.type == 640) + { + color11.R /= (byte) index; + color11.A /= (byte) index; + } + else if (projectile1.type >= 424 && projectile1.type <= 426) + { + color11.B /= (byte) index; + color11.G /= (byte) index; + color11.A /= (byte) index; + } + float t1 = (float) (num214 - index); + if (num215 < 0) + t1 = (float) (num216 - index); + color11 *= t1 / ((float) ProjectileID.Sets.TrailCacheLength[projectile1.type] * 1.5f); + Vector2 oldPo = projectile1.oldPos[index]; + float rotation = projectile1.rotation; + SpriteEffects effects = spriteEffects; + if (ProjectileID.Sets.TrailingMode[projectile1.type] == 2 || ProjectileID.Sets.TrailingMode[projectile1.type] == 3 || ProjectileID.Sets.TrailingMode[projectile1.type] == 4) + { + rotation = projectile1.oldRot[index]; + effects = projectile1.oldSpriteDirection[index] == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + } + if (!(oldPo == Vector2.Zero)) + { + if (projectile1.type == 916) + { + rectangle1.Y += rectangle1.Height; + rectangle1.Y %= rectangle1.Height * Main.projFrames[projectile1.type]; + double num220 = (double) t1 / ((double) ProjectileID.Sets.TrailCacheLength[projectile1.type] * 1.5); + Microsoft.Xna.Framework.Color color13 = new Microsoft.Xna.Framework.Color(0, 0, 0, (int) byte.MaxValue); + switch (r2.Next(3)) + { + case 1: + case 2: + color13 = Microsoft.Xna.Framework.Color.Lerp(new Microsoft.Xna.Framework.Color(106, 90, 205, (int) sbyte.MaxValue), Microsoft.Xna.Framework.Color.Black, (float) (0.200000002980232 + 0.800000011920929 * (double) r2.NextFloat())); + break; + } + color11 = color13; + float num221 = t1 / (float) ProjectileID.Sets.TrailCacheLength[projectile1.type]; + float lerpValue = Utils.GetLerpValue(0.0f, (float) ProjectileID.Sets.TrailCacheLength[projectile1.type] * 0.75f, t1, true); + color11 *= lerpValue; + oldPo += r2.NextVector2Circular(8f, 8f); + } + if (projectile1.type == 933) + { + float t2 = projectile1.localAI[0] - (float) index; + float num222 = Utils.GetLerpValue(0.0f, 20f, t2, true) * Utils.GetLerpValue(68f, 60f, t2, true); + color11 = Microsoft.Xna.Framework.Color.White * Utils.GetLerpValue(0.0f, (float) ProjectileID.Sets.TrailCacheLength[projectile1.type], t1, true) * projectile1.Opacity * num222; + } + Vector2 position = oldPo + zero + projectile1.Size / 2f - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY); + Main.EntitySpriteDraw(texture2D1, position, new Microsoft.Xna.Framework.Rectangle?(rectangle1), color11, (float) ((double) rotation + (double) num213 + (double) projectile1.rotation * (double) num219 * (double) (index - 1) * (double) -spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally).ToDirectionInt()), origin1, MathHelper.Lerp(projectile1.scale, num217, (float) index / num218), effects, 0); + } + } + } + if (projectile1.type == 661) + { + Microsoft.Xna.Framework.Color color14 = new Microsoft.Xna.Framework.Color(120, 40, 222, 120); + for (int index = 0; index < 4; ++index) + Main.EntitySpriteDraw(TextureAssets.Extra[75].Value, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY) + projectile1.rotation.ToRotationVector2().RotatedBy(1.57079637050629 * (double) index) * 4f, new Microsoft.Xna.Framework.Rectangle?(r1), color14, projectile1.rotation, origin1, projectile1.scale, spriteEffects, 0); + } + if (projectile1.type == 864) + { + Microsoft.Xna.Framework.Color daggerMinionGlowColor = projectile1.GetFloatingDaggerMinionGlowColor(); + daggerMinionGlowColor.A /= (byte) 4; + Microsoft.Xna.Framework.Rectangle rectangle2 = r1; + rectangle2.Y += rectangle2.Height; + for (int index = 0; index < 4; ++index) + Main.EntitySpriteDraw(texture2D1, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY) + projectile1.rotation.ToRotationVector2().RotatedBy(1.57079637050629 * (double) index) * 2f, new Microsoft.Xna.Framework.Rectangle?(rectangle2), daggerMinionGlowColor, projectile1.rotation, origin1, projectile1.scale, spriteEffects, 0); + } + if (projectile1.type == 873 || projectile1.type == 931) + { + Microsoft.Xna.Framework.Color color15 = projectile1.AI_171_GetColor() * 0.5f; + color15.A = (byte) 0; + if (projectile1.type == 931) + color15 = projectile1.GetFairyQueenWeaponsColor(0.0f); + Vector2 position1 = projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY); + Main.EntitySpriteDraw(texture2D1, position1, new Microsoft.Xna.Framework.Rectangle?(r1), color15, projectile1.rotation, origin1, projectile1.scale * 0.9f, spriteEffects, 0); + Texture2D texture2D2 = TextureAssets.Extra[98].Value; + Microsoft.Xna.Framework.Color color16 = color15; + Vector2 origin2 = texture2D2.Size() / 2f; + Microsoft.Xna.Framework.Color color17 = color15 * 0.5f; + float num223 = (float) ((double) Utils.GetLerpValue(15f, 30f, (float) projectile1.timeLeft, true) * (double) Utils.GetLerpValue(240f, 200f, (float) projectile1.timeLeft, true) * (1.0 + 0.200000002980232 * Math.Cos((double) Main.GlobalTimeWrappedHourly % 30.0 / 0.5 * 6.28318548202515 * 3.0)) * 0.800000011920929); + Vector2 scale1 = new Vector2(0.5f, 5f) * num223; + Vector2 scale2 = new Vector2(0.5f, 2f) * num223; + Microsoft.Xna.Framework.Color color18 = color16 * num223; + Microsoft.Xna.Framework.Color color19 = color17 * num223; + int num224 = 0; + Vector2 position2 = position1 + projectile1.velocity.SafeNormalize(Vector2.Zero) * MathHelper.Lerp(0.5f, 1f, projectile1.localAI[0] / 60f) * (float) num224; + if (projectile1.type == 931) + { + scale1 *= 0.4f; + scale2 *= 0.4f; + } + Main.EntitySpriteDraw(texture2D2, position2, new Microsoft.Xna.Framework.Rectangle?(), color18, 1.570796f, origin2, scale1, spriteEffects, 0); + Main.EntitySpriteDraw(texture2D2, position2, new Microsoft.Xna.Framework.Rectangle?(), color18, 0.0f, origin2, scale2, spriteEffects, 0); + Main.EntitySpriteDraw(texture2D2, position2, new Microsoft.Xna.Framework.Rectangle?(), color19, 1.570796f, origin2, scale1 * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture2D2, position2, new Microsoft.Xna.Framework.Rectangle?(), color19, 0.0f, origin2, scale2 * 0.6f, spriteEffects, 0); + } + if (projectile1.type == 755) + { + Microsoft.Xna.Framework.Color color20 = projectile1.AI_156_GetColor(); + color20.A = (byte) 120; + for (int index = 0; index < 4; ++index) + Main.EntitySpriteDraw(texture2D1, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY) + projectile1.rotation.ToRotationVector2().RotatedBy(1.57079637050629 * (double) index) * 2f, new Microsoft.Xna.Framework.Rectangle?(r1), color20, projectile1.rotation, origin1, projectile1.scale, spriteEffects, 0); + } + else if (projectile1.type == 684) + { + float x18 = ((float) ((double) projectile1.localAI[0] * 6.28318548202515 / 30.0)).ToRotationVector2().X; + Microsoft.Xna.Framework.Color color21 = new Microsoft.Xna.Framework.Color(220, 40, 30, 40); + color21 *= (float) (0.75 + 0.25 * (double) x18); + for (int index = 0; index < 8; ++index) + Main.EntitySpriteDraw(texture2D1, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY) + projectile1.rotation.ToRotationVector2().RotatedBy(0.785398185253143 * (double) index) * (float) (4.0 + 1.0 * (double) x18), new Microsoft.Xna.Framework.Rectangle?(r1), color21, projectile1.rotation, origin1, projectile1.scale, spriteEffects, 0); + } + else if (ProjectileID.Sets.IsAGolfBall[projectile1.type]) + { + Player player = Main.player[projectile1.owner]; + bool flag5 = GolfHelper.IsPlayerHoldingClub(player); + bool flag6 = false; + if (flag5) + flag6 = (((flag6 ? 1 : 0) | (player.ownedProjectileCounts[722] <= 0 ? 0 : (player.itemAnimation >= player.itemAnimationMax ? 1 : 0))) != 0 | player.itemAnimation == 0) & (double) player.velocity.Y == 0.0; + Vector2 shotVector = Main.MouseWorld - projectile1.Center; + if (projectile1.owner == Main.myPlayer & flag5 & flag6 && GolfHelper.IsGolfBallResting(projectile1) && GolfHelper.ValidateShot((Entity) projectile1, player, ref shotVector)) + { + color10 = Microsoft.Xna.Framework.Color.White; + Projectile golfHelper = (Projectile) null; + for (int index = 0; index < 1000; ++index) + { + Projectile projectile2 = Main.projectile[index]; + if (projectile2.active && projectile2.owner == player.whoAmI && projectile2.type == 722) + { + golfHelper = projectile2; + break; + } + } + if (golfHelper != null) + { + GolfHelper.ShotStrength shotStrength = GolfHelper.CalculateShotStrength(golfHelper, (Entity) projectile1); + Vector2 impactVelocity = Vector2.Normalize(shotVector) * shotStrength.AbsoluteStrength; + if ((double) impactVelocity.Length() > 0.0500000007450581) + GolfHelper.DrawPredictionLine((Entity) projectile1, impactVelocity, shotStrength.RelativeStrength, shotStrength.RoughLandResistance); + } + } + if (!GolfHelper.IsGolfBallResting(projectile1)) + { + Microsoft.Xna.Framework.Color golfTrailColor = Projectile.GetGolfTrailColor(projectile1); + float num225 = projectile1.velocity.Length() / 16f; + if ((double) num225 > 1.0) + num225 = 1f; + Microsoft.Xna.Framework.Color color22 = golfTrailColor * num225; + if (projectile1.oldPos[4] != Vector2.Zero) + { + color10 = Microsoft.Xna.Framework.Color.White; + for (float amount = 0.0f; (double) amount <= 1.0; amount += 0.04f) + Main.EntitySpriteDraw(texture2D1, Vector2.Lerp(projectile1.oldPos[4], projectile1.position, amount) + projectile1.Size / 2f - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r1), color22 * amount, projectile1.rotation, origin1, projectile1.scale * MathHelper.Lerp(0.7f, 1.5f, amount), spriteEffects, 0); + } + Main.EntitySpriteDraw(texture2D1, projectile1.position + projectile1.Size / 2f - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r1), color22, projectile1.rotation, origin1, projectile1.scale * 1.5f, spriteEffects, 0); + } + } + Microsoft.Xna.Framework.Color color23 = projectile1.GetAlpha(color10); + float scale = projectile1.scale; + float rotation1 = projectile1.rotation + num213; + if (projectile1.type == 640) + color23 = Microsoft.Xna.Framework.Color.Transparent; + if (projectile1.type == 684) + color23.A = (byte) 127; + if (projectile1.type == 873) + color23.A /= (byte) 2; + if (projectile1.type == 931) + color23.A /= (byte) 2; + if (projectile1.type == 872) + { + color23 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * projectile1.Opacity; + scale *= 0.9f; + } + if (projectile1.type == 818) + color23 = Microsoft.Xna.Framework.Color.Transparent; + if (projectile1.type == 916) + color23 = Microsoft.Xna.Framework.Color.Black; + if (projectile1.type == 933) + { + float t = projectile1.localAI[0]; + float num226 = Utils.GetLerpValue(0.0f, 20f, t, true) * Utils.GetLerpValue(68f, 60f, t, true); + color23 *= num226; + } + Main.EntitySpriteDraw(texture2D1, projectile1.Center + zero - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r1), color23, rotation1, origin1, scale, spriteEffects, 0); + if (projectile1.type == 894) + { + float num227 = Utils.WrappedLerp(0.6f, 1f, (float) ((int) Main.timeForVisualEffects % 70) / 70f); + Microsoft.Xna.Framework.Color color24 = new Microsoft.Xna.Framework.Color(num227, num227, num227, 150f); + Main.EntitySpriteDraw(TextureAssets.GlowMask[282].Value, projectile1.Center + zero - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r1), color24, projectile1.rotation, origin1, projectile1.scale, spriteEffects, 0); + } + if (projectile1.type == 503) + Main.EntitySpriteDraw(TextureAssets.Extra[36].Value, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r1), Microsoft.Xna.Framework.Color.White, projectile1.localAI[0], origin1, projectile1.scale, spriteEffects, 0); + else if (projectile1.type == 533) + Main.EntitySpriteDraw(TextureAssets.GlowMask[128].Value, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r1), Microsoft.Xna.Framework.Color.White * 0.3f, projectile1.rotation, origin1, projectile1.scale, spriteEffects, 0); + else if (projectile1.type == 261) + { + float num228 = 0.7f; + float t = projectile1.velocity.Length(); + if ((double) t < 0.300000011920929 && (double) projectile1.velocity.Y == 0.0) + num228 = Utils.GetLerpValue(0.02f, 0.3f, t, true) * 0.7f; + Main.EntitySpriteDraw(TextureAssets.GlowMask[252].Value, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r1), Microsoft.Xna.Framework.Color.White * num228, projectile1.rotation, origin1, projectile1.scale, spriteEffects, 0); + } + else if (projectile1.type == 601) + { + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + white.A = (byte) 0; + Main.EntitySpriteDraw(texture2D1, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r1), white, projectile1.rotation, origin1, projectile1.scale * 0.7f, spriteEffects, 0); + } + else if (ProjectileID.Sets.IsAGolfBall[projectile1.type] && GolfHelper.IsGolfBallResting(projectile1) && GolfHelper.IsPlayerHoldingClub(Main.LocalPlayer) && GolfHelper.IsGolfShotValid((Entity) projectile1, Main.LocalPlayer) && projectile1.owner == Main.myPlayer) + Main.EntitySpriteDraw(TextureAssets.GolfBallOutline.Value, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r1), Microsoft.Xna.Framework.Color.White, projectile1.rotation, origin1, projectile1.scale, spriteEffects, 0); + if (projectile1.type != 933) + return; + float t3 = projectile1.localAI[0]; + float num229 = Utils.GetLerpValue(0.0f, 20f, t3, true) * Utils.GetLerpValue(68f, 60f, t3, true); + Main.EntitySpriteDraw(texture2D1, projectile1.Center + zero - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r1), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue) * projectile1.Opacity * num229, rotation1, origin1, scale * 1.25f, spriteEffects, 0); + FinalFractalHelper.FinalFractalProfile finalFractalProfile = FinalFractalHelper.GetFinalFractalProfile((int) projectile1.ai[1]); + Microsoft.Xna.Framework.Color trailColor = finalFractalProfile.trailColor; + trailColor.A /= (byte) 2; + Main.DrawPrettyStarSparkle(projectile1, spriteEffects, projectile1.Center + zero - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY) + (projectile1.rotation - 1.570796f).ToRotationVector2() * finalFractalProfile.trailWidth, Microsoft.Xna.Framework.Color.White * num229, trailColor * num229); + } + else if (projectile1.type == 672) + { + Vector2 position = projectile1.Center - Main.screenPosition; + if ((double) projectile1.localAI[1] == 0.0) + { + position.Y += 60f; + float num230 = projectile1.localAI[0] / 120f; + for (int index = 0; index < 4; ++index) + { + float num231 = MathHelper.Clamp((float) ((double) num230 * 2.0 - (double) index / 3.0), 0.0f, 1f); + float num232 = 1f - MathHelper.Clamp((float) (((double) num230 - 0.800000011920929) / 0.200000002980232), 0.0f, 1f); + Main.EntitySpriteDraw(TextureAssets.MagicPixel.Value, position, new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color(0.4f, 0.17f, 0.4f, 0.0f) * (num231 * num232) * 1.3f, 0.0f, new Vector2((float) TextureAssets.MagicPixel.Width() / 2f, (float) TextureAssets.MagicPixel.Height()), new Vector2((float) Math.Sqrt((double) num231) * 100f, num231 * 2f), SpriteEffects.None, 0); + } + } + else if ((double) projectile1.localAI[1] == 1.0) + { + double num233 = (double) projectile1.localAI[0] / 300.0; + float num234 = Math.Min(1f, projectile1.localAI[0] / 30f); + int frameNumber = (int) ((double) Main.GlobalTimeWrappedHourly * 10.0) % 8; + this.DrawElderEye(Main.spriteBatch, projectile1.Center, 1f, 1f, frameNumber, Microsoft.Xna.Framework.Color.White * num234); + this.DrawElderEye(Main.spriteBatch, projectile1.Center, 1f, 1f, (frameNumber + 1) % 8, new Microsoft.Xna.Framework.Color(0.2f, 0.2f, 0.2f, 0.0f) * num234); + } + else + { + if ((double) projectile1.localAI[1] != 2.0) + return; + int frameNumber = (int) ((double) Main.GlobalTimeWrappedHourly * 10.0) % 8; + this.DrawElderEye(Main.spriteBatch, projectile1.Center, 1f, 1f, frameNumber, Microsoft.Xna.Framework.Color.White); + this.DrawElderEye(Main.spriteBatch, projectile1.Center, 1f, 1f, (frameNumber + 1) % 8, new Microsoft.Xna.Framework.Color(0.2f, 0.2f, 0.2f, 0.0f)); + } + } + else + { + if (projectile1.type == 713) + return; + if (projectile1.type == 754) + { + Texture2D texture2D = TextureAssets.Projectile[projectile1.type].Value; + Microsoft.Xna.Framework.Rectangle rectangle3 = texture2D.Frame(5, 2, projectile1.frame); + rectangle3.Width -= 2; + rectangle3.Height -= 2; + Vector2 origin = new Vector2((float) (rectangle3.Width / 2), 0.0f); + float y = projectile1.position.Y; + float num235 = (float) ((double) projectile1.ai[0] + 8.0 + 2.0 - (double) rectangle3.Height + 2.0); + projectile1.GetAlpha(color10); + Vector2 top = projectile1.Top; + if ((double) projectile1.ai[1] == 2.0) + { + Microsoft.Xna.Framework.Rectangle rectangle4 = texture2D.Frame(5, 2, 4); + rectangle4.Width -= 2; + rectangle4.Height -= 2; + origin = new Vector2((float) (rectangle4.Width / 2), 0.0f); + Microsoft.Xna.Framework.Color alpha = projectile1.GetAlpha(Lighting.GetColor((int) ((double) top.X + (double) (rectangle4.Width / 2)) / 16, (int) (((double) num235 - 2.0 + (double) (rectangle4.Height / 2)) / 16.0))); + Main.EntitySpriteDraw(texture2D, new Vector2(top.X, num235 - 2f) - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle4), alpha, projectile1.rotation, origin, projectile1.scale, spriteEffects, 0); + } + else + { + for (float num236 = y; (double) num236 < (double) num235; num236 += (float) rectangle3.Height) + { + Vector2 vector2 = top; + vector2.Y = num236; + Microsoft.Xna.Framework.Rectangle rectangle5 = rectangle3; + float num237 = num235 - num236; + if ((double) num237 < (double) rectangle5.Height) + rectangle5.Height = (int) num237; + Microsoft.Xna.Framework.Color alpha = projectile1.GetAlpha(Lighting.GetColor((int) ((double) vector2.X + (double) (rectangle5.Width / 2)) / 16, (int) (((double) vector2.Y + (double) (rectangle5.Height / 2)) / 16.0))); + Main.EntitySpriteDraw(texture2D, vector2 - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle5), alpha, projectile1.rotation, origin, projectile1.scale, spriteEffects, 0); + if (rectangle3.Y == 0) + rectangle3.Y += rectangle3.Height + 2; + } + Microsoft.Xna.Framework.Rectangle rectangle6 = texture2D.Frame(5, 2, 4); + rectangle6.Width -= 2; + rectangle6.Height -= 2; + origin = new Vector2((float) (rectangle6.Width / 2), 0.0f); + Microsoft.Xna.Framework.Color alpha1 = projectile1.GetAlpha(Lighting.GetColor((int) ((double) top.X + (double) (rectangle6.Width / 2)) / 16, (int) (((double) num235 - 2.0 + (double) (rectangle6.Height / 2)) / 16.0))); + Main.EntitySpriteDraw(texture2D, new Vector2(top.X, num235 - 2f) - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle6), alpha1, projectile1.rotation, origin, projectile1.scale, spriteEffects, 0); + } + } + else if (projectile1.type == 12 || projectile1.type == 728) + { + Texture2D texture = TextureAssets.Projectile[projectile1.type].Value; + Microsoft.Xna.Framework.Rectangle r = new Microsoft.Xna.Framework.Rectangle(0, 0, texture.Width, texture.Height); + Vector2 origin3 = r.Size() / 2f; + Microsoft.Xna.Framework.Color alpha = projectile1.GetAlpha(color10); + Texture2D texture2D = TextureAssets.Extra[91].Value; + Microsoft.Xna.Framework.Rectangle rectangle = texture2D.Frame(); + Vector2 origin4 = new Vector2((float) rectangle.Width / 2f, 10f); + Microsoft.Xna.Framework.Color color25 = Microsoft.Xna.Framework.Color.Cyan * 0.5f; + Vector2 vector2_6 = new Vector2(0.0f, projectile1.gfxOffY); + Vector2 spinningpoint = new Vector2(0.0f, -10f); + float num238 = (float) Main.timeForVisualEffects / 60f; + Vector2 vector2_7 = projectile1.Center + projectile1.velocity; + Microsoft.Xna.Framework.Color color26 = Microsoft.Xna.Framework.Color.Blue * 0.2f; + Microsoft.Xna.Framework.Color color27 = Microsoft.Xna.Framework.Color.White * 0.5f; + color27.A = (byte) 0; + float num239 = 0.0f; + if (projectile1.type == 728) + { + color26 = Microsoft.Xna.Framework.Color.Orange * 0.2f; + color27 = Microsoft.Xna.Framework.Color.Gold * 0.5f; + color27.A = (byte) 50; + num239 = -0.2f; + } + Microsoft.Xna.Framework.Color color28 = color26; + color28.A = (byte) 0; + Microsoft.Xna.Framework.Color color29 = color26; + color29.A = (byte) 0; + Microsoft.Xna.Framework.Color color30 = color26; + color30.A = (byte) 0; + Main.EntitySpriteDraw(texture2D, vector2_7 - Main.screenPosition + vector2_6 + spinningpoint.RotatedBy(6.28318548202515 * (double) num238), new Microsoft.Xna.Framework.Rectangle?(rectangle), color28, projectile1.velocity.ToRotation() + 1.570796f, origin4, 1.5f + num239, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D, vector2_7 - Main.screenPosition + vector2_6 + spinningpoint.RotatedBy(6.28318548202515 * (double) num238 + 2.09439516067505), new Microsoft.Xna.Framework.Rectangle?(rectangle), color29, projectile1.velocity.ToRotation() + 1.570796f, origin4, 1.1f + num239, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D, vector2_7 - Main.screenPosition + vector2_6 + spinningpoint.RotatedBy(6.28318548202515 * (double) num238 + 4.1887903213501), new Microsoft.Xna.Framework.Rectangle?(rectangle), color30, projectile1.velocity.ToRotation() + 1.570796f, origin4, 1.3f + num239, SpriteEffects.None, 0); + Vector2 vector2_8 = projectile1.Center - projectile1.velocity * 0.5f; + for (float num240 = 0.0f; (double) num240 < 1.0; num240 += 0.5f) + { + float num241 = (float) (((double) num238 % 0.5 / 0.5 + (double) num240) % 1.0); + float num242 = num241 * 2f; + if ((double) num242 > 1.0) + num242 = 2f - num242; + Main.EntitySpriteDraw(texture2D, vector2_8 - Main.screenPosition + vector2_6, new Microsoft.Xna.Framework.Rectangle?(rectangle), color27 * num242, projectile1.velocity.ToRotation() + 1.570796f, origin4, (float) (0.300000011920929 + (double) num241 * 0.5), SpriteEffects.None, 0); + } + Main.EntitySpriteDraw(texture, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r), alpha, projectile1.rotation, origin3, projectile1.scale + 0.1f, spriteEffects, 0); + } + else if (projectile1.type == 756) + { + Texture2D texture2D = TextureAssets.Projectile[projectile1.type].Value; + Microsoft.Xna.Framework.Rectangle rectangle = texture2D.Frame(verticalFrames: 6, frameY: projectile1.frame); + Vector2 origin = new Vector2(16f, (float) (rectangle.Height / 2)); + Microsoft.Xna.Framework.Color alpha = projectile1.GetAlpha(color10); + Vector2 scale = new Vector2(projectile1.scale); + float lerpValue = Utils.GetLerpValue(30f, 25f, projectile1.ai[0], true); + scale.Y *= lerpValue; + Vector4 vector4_1 = color10.ToVector4(); + Vector4 vector4_2 = new Microsoft.Xna.Framework.Color(67, 17, 17).ToVector4() * vector4_1; + Main.EntitySpriteDraw(TextureAssets.Extra[98].Value, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY) - projectile1.velocity * projectile1.scale * 0.5f, new Microsoft.Xna.Framework.Rectangle?(), projectile1.GetAlpha(new Microsoft.Xna.Framework.Color(vector4_2.X, vector4_2.Y, vector4_2.Z, vector4_2.W)) * 1f, projectile1.rotation + 1.570796f, TextureAssets.Extra[98].Value.Size() / 2f, projectile1.scale * 0.9f, spriteEffects, 0); + Main.EntitySpriteDraw(texture2D, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle), alpha, projectile1.rotation, origin, scale, spriteEffects, 0); + } + else if (projectile1.type == 723 || projectile1.type == 726 || projectile1.type == 725 || projectile1.type == 724) + { + Texture2D texture = TextureAssets.Projectile[projectile1.type].Value; + Microsoft.Xna.Framework.Rectangle r = new Microsoft.Xna.Framework.Rectangle(0, 0, texture.Width, texture.Height); + Vector2 origin5 = r.Size() / 2f; + Microsoft.Xna.Framework.Color alpha = projectile1.GetAlpha(color10); + Texture2D texture2D = TextureAssets.Extra[91].Value; + Microsoft.Xna.Framework.Rectangle rectangle = texture2D.Frame(); + Vector2 origin6 = new Vector2((float) rectangle.Width / 2f, 10f); + Microsoft.Xna.Framework.Color color31 = Microsoft.Xna.Framework.Color.White * 0.2f; + Vector2 vector2_9 = new Vector2(0.0f, projectile1.gfxOffY); + Vector2 spinningpoint = new Vector2(0.0f, -5f); + float num243 = (float) Main.timeForVisualEffects / 60f; + Vector2 vector2_10 = projectile1.Center + projectile1.velocity; + float scale3 = 1.5f; + float scale4 = 1.1f; + float scale5 = 1.3f; + Microsoft.Xna.Framework.Color color32 = Microsoft.Xna.Framework.Color.Blue * 0.1f; + Microsoft.Xna.Framework.Color color33 = Microsoft.Xna.Framework.Color.White * 0.3f; + color33.A = (byte) 0; + byte num244 = 0; + if (projectile1.type == 726) + { + Microsoft.Xna.Framework.Color color34 = new Microsoft.Xna.Framework.Color(180, 20, (int) byte.MaxValue); + color32 = color34 * 0.3f; + color33 = color34 * 0.3f; + num244 = (byte) 60; + float num245 = 0.6f; + scale3 -= num245; + scale4 -= num245; + scale5 -= num245; + } + if (projectile1.type == 725) + { + Microsoft.Xna.Framework.Color color35 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 80, (int) byte.MaxValue); + Microsoft.Xna.Framework.Color color36 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, 0); + color32 = Microsoft.Xna.Framework.Color.Lerp(color35, color36, 0.2f) * 0.3f; + color33 = Microsoft.Xna.Framework.Color.Lerp(color35, color36, 0.8f) * 0.4f; + num244 = (byte) 50; + float num246 = 0.5f; + scale3 -= num246; + scale4 -= num246; + scale5 -= num246; + } + if (projectile1.type == 724) + { + Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Black, Microsoft.Xna.Framework.Color.Orange, 0.75f); + Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Black, Microsoft.Xna.Framework.Color.Yellow, 0.5f); + Microsoft.Xna.Framework.Color color37 = Microsoft.Xna.Framework.Color.Orange * 0.75f; + Microsoft.Xna.Framework.Color color38 = Microsoft.Xna.Framework.Color.Yellow * 0.5f; + color32 = Microsoft.Xna.Framework.Color.Lerp(color37, color38, 0.2f) * 0.3f; + color33 = Microsoft.Xna.Framework.Color.Lerp(color37, color38, 0.8f) * 0.4f; + num244 = (byte) 0; + float num247 = 0.5f; + scale3 -= num247; + scale4 -= num247; + scale5 -= num247; + } + Microsoft.Xna.Framework.Color color39 = color32; + color39.A = num244; + Microsoft.Xna.Framework.Color color40 = color32; + color40.A = num244; + Microsoft.Xna.Framework.Color color41 = color32; + color41.A = num244; + Main.EntitySpriteDraw(texture2D, vector2_10 - Main.screenPosition + vector2_9 + spinningpoint.RotatedBy(6.28318548202515 * (double) num243), new Microsoft.Xna.Framework.Rectangle?(rectangle), color39, projectile1.velocity.ToRotation() + 1.570796f, origin6, scale3, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D, vector2_10 - Main.screenPosition + vector2_9 + spinningpoint.RotatedBy(6.28318548202515 * (double) num243 + 2.09439516067505), new Microsoft.Xna.Framework.Rectangle?(rectangle), color40, projectile1.velocity.ToRotation() + 1.570796f, origin6, scale4, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D, vector2_10 - Main.screenPosition + vector2_9 + spinningpoint.RotatedBy(6.28318548202515 * (double) num243 + 4.1887903213501), new Microsoft.Xna.Framework.Rectangle?(rectangle), color41, projectile1.velocity.ToRotation() + 1.570796f, origin6, scale5, SpriteEffects.None, 0); + Vector2 vector2_11 = projectile1.Center - projectile1.velocity * 0.5f; + for (float num248 = 0.0f; (double) num248 < 1.0; num248 += 0.5f) + { + float num249 = (float) (((double) num243 % 0.5 / 0.5 + (double) num248) % 1.0); + float num250 = num249 * 2f; + if ((double) num250 > 1.0) + num250 = 2f - num250; + Main.EntitySpriteDraw(texture2D, vector2_11 - Main.screenPosition + vector2_9, new Microsoft.Xna.Framework.Rectangle?(rectangle), color33 * num250, projectile1.velocity.ToRotation() + 1.570796f, origin6, (float) (0.5 + (double) num249 * 0.5), SpriteEffects.None, 0); + } + Main.EntitySpriteDraw(texture, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(r), alpha, projectile1.rotation, origin5, projectile1.scale + 0.1f, spriteEffects, 0); + } + else if (projectile1.type == 674) + { + Texture2D texture = TextureAssets.Extra[60].Value; + Vector2 origin = new Vector2(66f, 86f); + Vector2 position = projectile1.Center - Main.screenPosition; + Vector2 one = Vector2.One; + Vector2 vector2_12 = new Vector2(4f, 1f) * 1.4f; + Microsoft.Xna.Framework.Color color42 = new Microsoft.Xna.Framework.Color(115, 0, 155, 0); + Microsoft.Xna.Framework.Color color43 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 180, (int) byte.MaxValue, 0); + float t = 0.0f; + if ((double) projectile1.ai[0] < 30.0) + t = Utils.GetLerpValue(0.0f, 30f, projectile1.ai[0], true); + else if ((double) projectile1.ai[0] < 40.0) + t = 1f + Utils.GetLerpValue(30f, 40f, projectile1.ai[0], true); + Vector2 vector2_13 = new Vector2(1f, 1f); + Vector2 vector2_14 = new Vector2(0.8f, 2f); + if ((double) t < 1.0) + vector2_13.X *= t; + Vector2 vector2_15 = vector2_12 * t; + if ((double) t < 1.0) + { + color42 *= t; + color43 *= t; + } + if ((double) t > 1.5) + { + float lerpValue = Utils.GetLerpValue(2f, 1.5f, t, true); + color42 *= lerpValue; + color43 *= lerpValue; + } + float num251 = 0.42f; + Microsoft.Xna.Framework.Color color44 = color42 * num251; + Microsoft.Xna.Framework.Color color45 = color43 * num251; + Main.EntitySpriteDraw(texture, position, new Microsoft.Xna.Framework.Rectangle?(), color44, 0.0f, origin, vector2_15 * vector2_13, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, position, new Microsoft.Xna.Framework.Rectangle?(), color45, 0.0f, origin, vector2_15 * vector2_14, SpriteEffects.None, 0); + Main.EntitySpriteDraw(TextureAssets.Extra[59].Value, position, new Microsoft.Xna.Framework.Rectangle?(), color44, 0.0f, origin, vector2_15 * vector2_13 * new Vector2(1f, 0.3f), SpriteEffects.None, 0); + } + else if (projectile1.type == 440 || projectile1.type == 449 || projectile1.type == 606) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) Main.screenPosition.X - 500, (int) Main.screenPosition.Y - 500, Main.screenWidth + 1000, Main.screenHeight + 1000); + if (!projectile1.getRect().Intersects(rectangle)) + return; + Vector2 vector2_16 = new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY); + float num252 = 100f; + float num253 = 3f; + if (projectile1.type == 606) + { + num252 = 150f; + num253 = 3f; + } + if ((double) projectile1.ai[1] == 1.0) + num252 = (float) (int) projectile1.localAI[0]; + for (int index = 1; index <= (int) projectile1.localAI[0]; ++index) + { + Vector2 vector2_17 = Vector2.Normalize(projectile1.velocity) * (float) index * num253; + Microsoft.Xna.Framework.Color color46 = projectile1.GetAlpha(color10) * ((num252 - (float) index) / num252); + color46.A = (byte) 0; + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, vector2_16 - vector2_17, new Microsoft.Xna.Framework.Rectangle?(), color46, projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale, spriteEffects, 0); + } + } + else if (projectile1.type == 687) + { + Vector2 vector2_18 = projectile1.Center - Main.screenPosition; + float num254 = 40f; + float num255 = num254 * 2f; + float num256 = (float) projectile1.frameCounter / num254; + Texture2D texture2D = TextureAssets.Projectile[projectile1.type].Value; + Microsoft.Xna.Framework.Color transparent = Microsoft.Xna.Framework.Color.Transparent; + Microsoft.Xna.Framework.Color color47 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + Microsoft.Xna.Framework.Color color48 = new Microsoft.Xna.Framework.Color(180, 30, 30, 200); + Microsoft.Xna.Framework.Color color49 = new Microsoft.Xna.Framework.Color(0, 0, 0, 30); + ulong seed = 1; + for (float num257 = 0.0f; (double) num257 < 15.0; ++num257) + { + float num258 = (float) ((double) Utils.RandomFloat(ref seed) * 0.25 - 0.125); + Vector2 rotationVector2 = (projectile1.rotation + num258).ToRotationVector2(); + Vector2 vector2_19 = vector2_18 + rotationVector2 * 400f; + float num259 = num256 + num257 * 0.06666667f; + int num260 = (int) ((double) num259 / 0.0666666701436043); + float num261 = num259 % 1f; + if (((double) num261 <= (double) num256 % 1.0 || (double) projectile1.frameCounter >= (double) num254) && ((double) num261 >= (double) num256 % 1.0 || (double) projectile1.frameCounter < (double) num255 - (double) num254)) + { + Microsoft.Xna.Framework.Color color50 = (double) num261 >= 0.100000001490116 ? ((double) num261 >= 0.349999994039536 ? ((double) num261 >= 0.699999988079071 ? ((double) num261 >= 0.899999976158142 ? ((double) num261 >= 1.0 ? Microsoft.Xna.Framework.Color.Transparent : Microsoft.Xna.Framework.Color.Lerp(color49, Microsoft.Xna.Framework.Color.Transparent, Utils.GetLerpValue(0.9f, 1f, num261, true))) : Microsoft.Xna.Framework.Color.Lerp(color48, color49, Utils.GetLerpValue(0.7f, 0.9f, num261, true))) : Microsoft.Xna.Framework.Color.Lerp(color47, color48, Utils.GetLerpValue(0.35f, 0.7f, num261, true))) : color47) : Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, color47, Utils.GetLerpValue(0.0f, 0.1f, num261, true)); + float num262 = (float) (0.899999976158142 + (double) num261 * 0.800000011920929); + float scale = num262 * num262 * 0.8f; + Vector2 position = Vector2.SmoothStep(vector2_18, vector2_19, num261); + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 7, frameY: ((int) ((double) num261 * 7.0))); + Main.EntitySpriteDraw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), color50, (float) ((double) projectile1.rotation + 6.28318548202515 * ((double) num261 + (double) Main.GlobalTimeWrappedHourly * 1.20000004768372) * 0.200000002980232 + (double) num260 * 1.25663709640503), r.Size() / 2f, scale, SpriteEffects.None, 0); + } + } + } + else if (projectile1.type == 651) + { + if (projectile1.owner != Main.myPlayer) + return; + Player player = Main.player[projectile1.owner]; + Microsoft.Xna.Framework.Point point = new Vector2(projectile1.ai[0], projectile1.ai[1]).ToPoint(); + Microsoft.Xna.Framework.Point tileCoordinates = projectile1.Center.ToTileCoordinates(); + Microsoft.Xna.Framework.Color color51 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + Microsoft.Xna.Framework.Color color52 = new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue, (int) sbyte.MaxValue, (int) sbyte.MaxValue, 0); + int num263 = 1; + float num264 = 0.0f; + WiresUI.Settings.MultiToolMode toolMode = WiresUI.Settings.ToolMode; + bool flag7 = toolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Actuator); + if (toolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Red)) + { + ++num264; + color52 = Microsoft.Xna.Framework.Color.Lerp(color52, Microsoft.Xna.Framework.Color.Red, 1f / num264); + } + if (toolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Blue)) + { + ++num264; + color52 = Microsoft.Xna.Framework.Color.Lerp(color52, Microsoft.Xna.Framework.Color.Blue, 1f / num264); + } + if (toolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Green)) + { + ++num264; + color52 = Microsoft.Xna.Framework.Color.Lerp(color52, new Microsoft.Xna.Framework.Color(0, (int) byte.MaxValue, 0), 1f / num264); + } + if (toolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Yellow)) + { + float num265 = num264 + 1f; + color52 = Microsoft.Xna.Framework.Color.Lerp(color52, new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, 0), 1f / num265); + } + if (toolMode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Cutter)) + color51 = new Microsoft.Xna.Framework.Color(50, 50, 50, (int) byte.MaxValue); + color52.A = (byte) 0; + if (point == tileCoordinates) + { + Vector2 position = tileCoordinates.ToVector2() * 16f - Main.screenPosition; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16); + if (flag7) + Main.EntitySpriteDraw(TextureAssets.WireUi[11].Value, position, new Microsoft.Xna.Framework.Rectangle?(), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position, new Microsoft.Xna.Framework.Rectangle?(rectangle), color52, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + rectangle.Y = 18; + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position, new Microsoft.Xna.Framework.Rectangle?(rectangle), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + else if (point.X == tileCoordinates.X) + { + int num266 = tileCoordinates.Y - point.Y; + int num267 = Math.Sign(num266); + Vector2 position3 = point.ToVector2() * 16f - Main.screenPosition; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(num266 * num263 > 0 ? 72 : 18, 0, 16, 16); + if (flag7) + Main.EntitySpriteDraw(TextureAssets.WireUi[11].Value, position3, new Microsoft.Xna.Framework.Rectangle?(), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position3, new Microsoft.Xna.Framework.Rectangle?(rectangle), color52, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + rectangle.Y = 18; + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position3, new Microsoft.Xna.Framework.Rectangle?(rectangle), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + for (int index = point.Y + num267; index != tileCoordinates.Y; index += num267) + { + Vector2 position4 = new Vector2((float) (point.X * 16), (float) (index * 16)) - Main.screenPosition; + rectangle.Y = 0; + rectangle.X = 90; + if (flag7) + Main.EntitySpriteDraw(TextureAssets.WireUi[11].Value, position4, new Microsoft.Xna.Framework.Rectangle?(), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position4, new Microsoft.Xna.Framework.Rectangle?(rectangle), color52, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + rectangle.Y = 18; + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position4, new Microsoft.Xna.Framework.Rectangle?(rectangle), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + Vector2 position5 = tileCoordinates.ToVector2() * 16f - Main.screenPosition; + rectangle = new Microsoft.Xna.Framework.Rectangle(num266 * num263 > 0 ? 18 : 72, 0, 16, 16); + if (flag7) + Main.EntitySpriteDraw(TextureAssets.WireUi[11].Value, position5, new Microsoft.Xna.Framework.Rectangle?(), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position5, new Microsoft.Xna.Framework.Rectangle?(rectangle), color52, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + rectangle.Y = 18; + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position5, new Microsoft.Xna.Framework.Rectangle?(rectangle), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + else if (point.Y == tileCoordinates.Y) + { + int num268 = tileCoordinates.X - point.X; + int num269 = Math.Sign(num268); + Vector2 position6 = point.ToVector2() * 16f - Main.screenPosition; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(num268 > 0 ? 36 : 144, 0, 16, 16); + if (flag7) + Main.EntitySpriteDraw(TextureAssets.WireUi[11].Value, position6, new Microsoft.Xna.Framework.Rectangle?(), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position6, new Microsoft.Xna.Framework.Rectangle?(rectangle), color52, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + rectangle.Y = 18; + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position6, new Microsoft.Xna.Framework.Rectangle?(rectangle), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + for (int index = point.X + num269; index != tileCoordinates.X; index += num269) + { + Vector2 position7 = new Vector2((float) (index * 16), (float) (point.Y * 16)) - Main.screenPosition; + rectangle.Y = 0; + rectangle.X = 180; + if (flag7) + Main.EntitySpriteDraw(TextureAssets.WireUi[11].Value, position7, new Microsoft.Xna.Framework.Rectangle?(), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position7, new Microsoft.Xna.Framework.Rectangle?(rectangle), color52, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + rectangle.Y = 18; + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position7, new Microsoft.Xna.Framework.Rectangle?(rectangle), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + Vector2 position8 = tileCoordinates.ToVector2() * 16f - Main.screenPosition; + rectangle = new Microsoft.Xna.Framework.Rectangle(num268 > 0 ? 144 : 36, 0, 16, 16); + if (flag7) + Main.EntitySpriteDraw(TextureAssets.WireUi[11].Value, position8, new Microsoft.Xna.Framework.Rectangle?(), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position8, new Microsoft.Xna.Framework.Rectangle?(rectangle), color52, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + rectangle.Y = 18; + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position8, new Microsoft.Xna.Framework.Rectangle?(rectangle), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + else + { + Math.Abs(point.X - tileCoordinates.X); + Math.Abs(point.Y - tileCoordinates.Y); + int num270 = Math.Sign(tileCoordinates.X - point.X); + int num271 = Math.Sign(tileCoordinates.Y - point.Y); + Microsoft.Xna.Framework.Point p = new Microsoft.Xna.Framework.Point(); + bool flag8 = false; + bool flag9 = player.direction == 1; + int num272; + int num273; + int num274; + if (flag9) + { + p.X = point.X; + num272 = point.Y; + num273 = tileCoordinates.Y; + num274 = num271; + } + else + { + p.Y = point.Y; + num272 = point.X; + num273 = tileCoordinates.X; + num274 = num270; + } + Vector2 position9 = point.ToVector2() * 16f - Main.screenPosition; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16); + rectangle.X = flag9 ? (num274 > 0 ? 72 : 18) : (num274 > 0 ? 36 : 144); + if (flag7) + Main.EntitySpriteDraw(TextureAssets.WireUi[11].Value, position9, new Microsoft.Xna.Framework.Rectangle?(), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position9, new Microsoft.Xna.Framework.Rectangle?(rectangle), color52, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + rectangle.Y = 18; + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position9, new Microsoft.Xna.Framework.Rectangle?(rectangle), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + for (int index = num272 + num274; index != num273 && !flag8; index += num274) + { + if (flag9) + p.Y = index; + else + p.X = index; + if (WorldGen.InWorld(p.X, p.Y, 1) && Main.tile[p.X, p.Y] != null) + { + Vector2 position10 = p.ToVector2() * 16f - Main.screenPosition; + rectangle.Y = 0; + rectangle.X = flag9 ? 90 : 180; + if (flag7) + Main.EntitySpriteDraw(TextureAssets.WireUi[11].Value, position10, new Microsoft.Xna.Framework.Rectangle?(), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position10, new Microsoft.Xna.Framework.Rectangle?(rectangle), color52, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + rectangle.Y = 18; + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position10, new Microsoft.Xna.Framework.Rectangle?(rectangle), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + } + int num275; + int num276; + int num277; + if (flag9) + { + p.Y = tileCoordinates.Y; + num275 = point.X; + num276 = tileCoordinates.X; + num277 = num270; + } + else + { + p.X = tileCoordinates.X; + num275 = point.Y; + num276 = tileCoordinates.Y; + num277 = num271; + } + Vector2 position11 = p.ToVector2() * 16f - Main.screenPosition; + rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16); + if (!flag9) + { + rectangle.X += num270 > 0 ? 144 : 36; + rectangle.X += num271 * num263 > 0 ? 72 : 18; + } + else + { + rectangle.X += num270 > 0 ? 36 : 144; + rectangle.X += num271 * num263 > 0 ? 18 : 72; + } + if (flag7) + Main.EntitySpriteDraw(TextureAssets.WireUi[11].Value, position11, new Microsoft.Xna.Framework.Rectangle?(), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position11, new Microsoft.Xna.Framework.Rectangle?(rectangle), color52, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + rectangle.Y = 18; + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position11, new Microsoft.Xna.Framework.Rectangle?(rectangle), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + for (int index = num275 + num277; index != num276 && !flag8; index += num277) + { + if (!flag9) + p.Y = index; + else + p.X = index; + if (WorldGen.InWorld(p.X, p.Y, 1) && Main.tile[p.X, p.Y] != null) + { + Vector2 position12 = p.ToVector2() * 16f - Main.screenPosition; + rectangle.Y = 0; + rectangle.X = flag9 ? 180 : 90; + if (flag7) + Main.EntitySpriteDraw(TextureAssets.WireUi[11].Value, position12, new Microsoft.Xna.Framework.Rectangle?(), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position12, new Microsoft.Xna.Framework.Rectangle?(rectangle), color52, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + rectangle.Y = 18; + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position12, new Microsoft.Xna.Framework.Rectangle?(rectangle), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + } + Vector2 position13 = tileCoordinates.ToVector2() * 16f - Main.screenPosition; + rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16); + if (!flag9) + rectangle.X += num271 * num263 > 0 ? 18 : 72; + else + rectangle.X += num270 > 0 ? 144 : 36; + if (flag7) + Main.EntitySpriteDraw(TextureAssets.WireUi[11].Value, position13, new Microsoft.Xna.Framework.Rectangle?(), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position13, new Microsoft.Xna.Framework.Rectangle?(rectangle), color52, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + rectangle.Y = 18; + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position13, new Microsoft.Xna.Framework.Rectangle?(rectangle), color51, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + } + else if (projectile1.type == 586) + { + float num278 = 300f; + if ((double) projectile1.ai[0] >= 100.0) + num278 = MathHelper.Lerp(300f, 600f, (float) (((double) projectile1.ai[0] - 100.0) / 200.0)); + if ((double) num278 > 600.0) + num278 = 600f; + if ((double) projectile1.ai[0] >= 500.0) + num278 = MathHelper.Lerp(600f, 1200f, (float) (((double) projectile1.ai[0] - 500.0) / 100.0)); + float rotation2 = projectile1.rotation; + Texture2D texture2D = TextureAssets.Projectile[projectile1.type].Value; + int num279 = (int) ((double) projectile1.ai[0] / 6.0); + Vector2 spinningpoint = new Vector2(0.0f, -num278); + for (int index = 0; (double) index < 10.0; ++index) + { + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 5, frameY: ((num279 + index) % 5)); + float rotation3 = rotation2 + 0.6283185f * (float) index; + Vector2 vec = spinningpoint.RotatedBy((double) rotation3) / 3f + projectile1.Center; + Microsoft.Xna.Framework.Color alpha = projectile1.GetAlpha(Lighting.GetColor(vec.ToTileCoordinates())); + alpha.A /= (byte) 2; + Main.EntitySpriteDraw(texture2D, vec - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(r), alpha, rotation3, r.Size() / 2f, projectile1.scale, SpriteEffects.None, 0); + } + for (int index = 0; (double) index < 20.0; ++index) + { + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 5, frameY: ((num279 + index) % 5)); + float rotation4 = (float) (-(double) rotation2 + 0.314159274101257 * (double) index) * 2f; + Vector2 vec = spinningpoint.RotatedBy((double) rotation4) + projectile1.Center; + Microsoft.Xna.Framework.Color alpha = projectile1.GetAlpha(Lighting.GetColor(vec.ToTileCoordinates())); + alpha.A /= (byte) 2; + Main.EntitySpriteDraw(texture2D, vec - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(r), alpha, rotation4, r.Size() / 2f, projectile1.scale, SpriteEffects.None, 0); + } + } + else if (projectile1.type == 536 || projectile1.type == 591 || projectile1.type == 607) + { + Texture2D texture2D = TextureAssets.Projectile[projectile1.type].Value; + Vector2 position = projectile1.position + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Vector2 scale = new Vector2(1f, projectile1.velocity.Length() / (float) texture2D.Height); + Main.EntitySpriteDraw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), projectile1.GetAlpha(color10), projectile1.rotation, texture2D.Frame().Bottom(), scale, spriteEffects, 0); + } + else if (projectile1.type == 688 || projectile1.type == 689 || projectile1.type == 690) + { + Texture2D texture2D3 = TextureAssets.Projectile[projectile1.type].Value; + Vector2 position14 = projectile1.Top + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Microsoft.Xna.Framework.Rectangle r3 = texture2D3.Frame(verticalFrames: Main.projFrames[projectile1.type], frameY: projectile1.frame); + Vector2 origin7 = r3.Size() * new Vector2(0.5f, 0.0f); + Microsoft.Xna.Framework.Color color53 = Microsoft.Xna.Framework.Color.Lerp(projectile1.GetAlpha(color10), Microsoft.Xna.Framework.Color.White, 0.5f); + Microsoft.Xna.Framework.Color color54 = color53; + color54.A = (byte) 127; + Texture2D texture = (Texture2D) null; + Texture2D texture2D4 = (Texture2D) null; + switch (projectile1.type) + { + case 688: + texture = TextureAssets.GlowMask[228].Value; + texture2D4 = TextureAssets.Extra[86].Value; + break; + case 689: + texture = TextureAssets.GlowMask[229].Value; + texture2D4 = TextureAssets.Extra[87].Value; + break; + case 690: + texture = TextureAssets.GlowMask[230].Value; + texture2D4 = TextureAssets.Extra[88].Value; + break; + } + Main.EntitySpriteDraw(texture2D3, position14, new Microsoft.Xna.Framework.Rectangle?(r3), color53, projectile1.rotation, origin7, projectile1.scale, spriteEffects, 0); + if (texture != null) + Main.EntitySpriteDraw(texture, position14, new Microsoft.Xna.Framework.Rectangle?(r3), color54, projectile1.rotation, origin7, projectile1.scale, spriteEffects, 0); + if (texture2D4 == null) + return; + Vector2 position15 = projectile1.Center + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Microsoft.Xna.Framework.Rectangle r4 = texture2D4.Frame(); + Vector2 origin8 = r4.Size() * new Vector2(0.5f, 1f); + origin8.Y -= 2f; + Main.EntitySpriteDraw(texture2D4, position15, new Microsoft.Xna.Framework.Rectangle?(r4), color53, projectile1.rotation, origin8, projectile1.scale, spriteEffects, 0); + } + else if (projectile1.type == 694 || projectile1.type == 695 || projectile1.type == 696) + { + Texture2D texture2D = TextureAssets.Projectile[projectile1.type].Value; + Vector2 position = projectile1.Bottom + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: Main.projFrames[projectile1.type], frameY: projectile1.frame); + Vector2 origin = r.Size() * new Vector2(0.5f, 1f); + origin.Y -= 8f; + switch (projectile1.type) + { + case 694: + case 695: + origin.X += 3f; + break; + } + Microsoft.Xna.Framework.Color color55 = Microsoft.Xna.Framework.Color.Lerp(projectile1.GetAlpha(color10), Microsoft.Xna.Framework.Color.White, 0.0f); + Main.EntitySpriteDraw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), color55, projectile1.rotation, origin, projectile1.scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), color55 * 0.3f, projectile1.rotation, origin, projectile1.scale * 1.1f, spriteEffects, 0); + } + else if (projectile1.type == 409) + { + Texture2D texture = TextureAssets.Projectile[projectile1.type].Value; + int height = TextureAssets.Projectile[projectile1.type].Height() / Main.projFrames[projectile1.type]; + int y = height * projectile1.frame; + int num280 = 10; + int num281 = 2; + float num282 = 0.5f; + for (int index = 1; index < num280; index += num281) + { + ref Vector2 local = ref projectile1.oldPos[index]; + Microsoft.Xna.Framework.Color newColor = color10; + Microsoft.Xna.Framework.Color color56 = projectile1.GetAlpha(newColor) * ((float) (num280 - index) / 15f); + Vector2 vector2 = projectile1.oldPos[index] - Main.screenPosition + new Vector2(x17 + (float) num209, (float) (projectile1.height / 2) + projectile1.gfxOffY); + Main.EntitySpriteDraw(texture, projectile1.oldPos[index] + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, texture.Width, height)), color56, projectile1.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), MathHelper.Lerp(projectile1.scale, num282, (float) index / 15f), spriteEffects, 0); + } + Main.EntitySpriteDraw(texture, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, texture.Width, height)), projectile1.GetAlpha(color10), projectile1.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile1.scale, spriteEffects, 0); + } + else if (projectile1.type == 437) + { + Texture2D texture = TextureAssets.Projectile[projectile1.type].Value; + int height = TextureAssets.Projectile[projectile1.type].Height() / Main.projFrames[projectile1.type]; + int y = height * projectile1.frame; + int num283 = 10; + int num284 = 2; + float num285 = 0.2f; + for (int index = 1; index < num283; index += num284) + { + ref Vector2 local = ref projectile1.oldPos[index]; + Microsoft.Xna.Framework.Color newColor = color10; + Microsoft.Xna.Framework.Color color57 = projectile1.GetAlpha(newColor) * ((float) (num283 - index) / 15f); + Vector2 vector2 = projectile1.oldPos[index] - Main.screenPosition + new Vector2(x17 + (float) num209, (float) (projectile1.height / 2) + projectile1.gfxOffY); + Main.EntitySpriteDraw(texture, projectile1.oldPos[index] + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, texture.Width, height)), color57, projectile1.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), MathHelper.Lerp(projectile1.scale, num285, (float) index / 15f), spriteEffects, 0); + } + Main.EntitySpriteDraw(texture, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, texture.Width, height)), Microsoft.Xna.Framework.Color.White, projectile1.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile1.scale + 0.2f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, texture.Width, height)), projectile1.GetAlpha(Microsoft.Xna.Framework.Color.White), projectile1.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile1.scale + 0.2f, spriteEffects, 0); + } + else if (projectile1.type == 384 || projectile1.type == 386) + { + Texture2D texture = TextureAssets.Projectile[projectile1.type].Value; + int height = TextureAssets.Projectile[projectile1.type].Height() / Main.projFrames[projectile1.type]; + int y = height * projectile1.frame; + Main.EntitySpriteDraw(texture, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, texture.Width, height)), projectile1.GetAlpha(color10), projectile1.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile1.scale, spriteEffects, 0); + } + else if (projectile1.type == 439 || projectile1.type == 460 || projectile1.type == 600 || projectile1.type == 615 || projectile1.type == 630 || projectile1.type == 633 || projectile1.type == 705 || projectile1.type == 714) + { + Texture2D texture = TextureAssets.Projectile[projectile1.type].Value; + if ((double) Main.player[projectile1.owner].gravDir == -1.0) + { + if (projectile1.type == 705) + spriteEffects |= SpriteEffects.FlipVertically; + if (projectile1.type == 615 || projectile1.type == 714) + { + if (Main.player[projectile1.owner].direction == 1) + spriteEffects = SpriteEffects.FlipVertically; + else if (Main.player[projectile1.owner].direction == -1) + spriteEffects = SpriteEffects.FlipHorizontally | SpriteEffects.FlipVertically; + } + else if (projectile1.type == 600 || projectile1.type == 439) + { + if (Main.player[projectile1.owner].direction == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + else if (Main.player[projectile1.owner].direction == -1) + spriteEffects = SpriteEffects.None; + } + } + int height = TextureAssets.Projectile[projectile1.type].Height() / Main.projFrames[projectile1.type]; + int y15 = height * projectile1.frame; + Vector2 position = (projectile1.position + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition).Floor(); + float num286 = 1f; + if (Main.player[projectile1.owner].shroomiteStealth && Main.player[projectile1.owner].inventory[Main.player[projectile1.owner].selectedItem].ranged) + { + float num287 = Main.player[projectile1.owner].stealth; + if ((double) num287 < 0.03) + num287 = 0.03f; + double num288 = (1.0 + (double) num287 * 10.0) / 11.0; + color10 *= num287; + num286 = num287; + } + if (Main.player[projectile1.owner].setVortex && Main.player[projectile1.owner].inventory[Main.player[projectile1.owner].selectedItem].ranged) + { + float num289 = Main.player[projectile1.owner].stealth; + if ((double) num289 < 0.03) + num289 = 0.03f; + double num290 = (1.0 + (double) num289 * 10.0) / 11.0; + color10 = color10.MultiplyRGBA(new Microsoft.Xna.Framework.Color(Vector4.Lerp(Vector4.One, new Vector4(0.0f, 0.12f, 0.16f, 0.0f), 1f - num289))); + num286 = num289; + } + if (projectile1.type == 714) + { + y15 = 0; + Main.instance.LoadItem(3930); + texture = TextureAssets.Item[3930].Value; + } + Main.EntitySpriteDraw(texture, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y15, texture.Width, height)), projectile1.GetAlpha(color10), projectile1.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile1.scale, spriteEffects, 0); + if (projectile1.type == 439) + Main.EntitySpriteDraw(TextureAssets.GlowMask[35].Value, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y15, texture.Width, height)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * num286, projectile1.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile1.scale, spriteEffects, 0); + else if (projectile1.type == 714) + { + int y16 = height * projectile1.frame; + Microsoft.Xna.Framework.Color rgb = Main.hslToRgb((float) ((double) projectile1.ai[0] / 90.0 % 1.0), 1f, 0.5f); + rgb.A = (byte) 120; + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y16, texture.Width, height)), rgb * num286, projectile1.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile1.scale, spriteEffects, 0); + } + else if (projectile1.type == 615) + Main.EntitySpriteDraw(TextureAssets.GlowMask[192].Value, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y15, texture.Width, height)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue) * num286, projectile1.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile1.scale, spriteEffects, 0); + else if (projectile1.type == 630) + { + Main.EntitySpriteDraw(TextureAssets.GlowMask[200].Value, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y15, texture.Width, height)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue) * num286, projectile1.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile1.scale, spriteEffects, 0); + if ((double) projectile1.localAI[0] <= 0.0) + return; + int frameY = 6 - (int) ((double) projectile1.localAI[0] / 1.0); + Texture2D texture2D = TextureAssets.Extra[65].Value; + Main.EntitySpriteDraw(texture2D, position + Vector2.Normalize(projectile1.velocity) * 2f, new Microsoft.Xna.Framework.Rectangle?(texture2D.Frame(verticalFrames: 6, frameY: frameY)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue) * num286, projectile1.rotation, new Vector2(spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally) ? (float) texture2D.Width : 0.0f, (float) ((double) height / 2.0 - 2.0)), projectile1.scale, spriteEffects, 0); + } + else if (projectile1.type == 600) + { + Microsoft.Xna.Framework.Color portalColor = PortalHelper.GetPortalColor(projectile1.owner, (int) projectile1.ai[1]); + portalColor.A = (byte) 70; + Main.EntitySpriteDraw(TextureAssets.GlowMask[173].Value, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y15, texture.Width, height)), portalColor, projectile1.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile1.scale, spriteEffects, 0); + } + else if (projectile1.type == 460) + { + if ((double) Math.Abs(projectile1.rotation - 1.570796f) > 1.57079637050629) + spriteEffects |= SpriteEffects.FlipVertically; + Main.EntitySpriteDraw(TextureAssets.GlowMask[102].Value, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y15, texture.Width, height)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), projectile1.rotation - 1.570796f, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile1.scale, spriteEffects, 0); + if ((double) projectile1.ai[0] <= 180.0 || Main.projectile[(int) projectile1.ai[1]].type != 461) + return; + this.DrawProj((int) projectile1.ai[1]); + } + else + { + if (projectile1.type != 633) + return; + float num291 = (float) (Math.Cos(6.28318548202515 * ((double) projectile1.ai[0] / 30.0)) * 2.0 + 2.0); + if ((double) projectile1.ai[0] > 120.0) + num291 = 4f; + for (float num292 = 0.0f; (double) num292 < 4.0; ++num292) + Main.EntitySpriteDraw(texture, position + Vector2.UnitY.RotatedBy((double) num292 * 6.28318548202515 / 4.0) * num291, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y15, texture.Width, height)), projectile1.GetAlpha(color10).MultiplyRGBA(new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0)) * 0.03f, projectile1.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile1.scale, spriteEffects, 0); + } + } + else if (projectile1.type == 442) + { + Texture2D texture = TextureAssets.Projectile[projectile1.type].Value; + int height = TextureAssets.Projectile[projectile1.type].Height() / Main.projFrames[projectile1.type]; + int y = height * projectile1.frame; + Vector2 position = projectile1.position + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Main.EntitySpriteDraw(texture, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, texture.Width, height)), projectile1.GetAlpha(color10), projectile1.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile1.scale, spriteEffects, 0); + Main.EntitySpriteDraw(TextureAssets.GlowMask[37].Value, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, texture.Width, height)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * (float) (1.0 - (double) projectile1.alpha / (double) byte.MaxValue), projectile1.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile1.scale, spriteEffects, 0); + } + else if (projectile1.type == 447) + { + Texture2D texture = TextureAssets.Projectile[projectile1.type].Value; + Texture2D texture2D = TextureAssets.Extra[4].Value; + int num293 = texture.Height / Main.projFrames[projectile1.type]; + int num294 = num293 * projectile1.frame; + int height = texture2D.Height / Main.projFrames[projectile1.type]; + int y = height * projectile1.frame; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, y, texture2D.Width, height); + Vector2 position = projectile1.position + new Vector2((float) projectile1.width, 0.0f) / 2f + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Main.EntitySpriteDraw(TextureAssets.Extra[4].Value, position, new Microsoft.Xna.Framework.Rectangle?(rectangle), projectile1.GetAlpha(color10), projectile1.rotation, new Vector2((float) (texture2D.Width / 2), 0.0f), projectile1.scale, spriteEffects, 0); + int num295 = projectile1.height - num293 - 14; + if (num295 < 0) + num295 = 0; + if (num295 > 0) + { + if (y == height * 3) + y = height * 2; + Main.EntitySpriteDraw(TextureAssets.Extra[4].Value, position + Vector2.UnitY * (float) (height - 1), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y + height - 1, texture2D.Width, 1)), projectile1.GetAlpha(color10), projectile1.rotation, new Vector2((float) (texture2D.Width / 2), 0.0f), new Vector2(1f, (float) num295), spriteEffects, 0); + } + rectangle.Width = texture.Width; + rectangle.Y = num294; + Main.EntitySpriteDraw(texture, position + Vector2.UnitY * (float) (height - 1 + num295), new Microsoft.Xna.Framework.Rectangle?(rectangle), projectile1.GetAlpha(color10), projectile1.rotation, new Vector2((float) texture.Width / 2f, 0.0f), projectile1.scale, spriteEffects, 0); + } + else if (projectile1.type == 455) + { + if (projectile1.velocity == Vector2.Zero) + return; + Texture2D texture2D5 = TextureAssets.Projectile[projectile1.type].Value; + Texture2D texture = TextureAssets.Extra[21].Value; + Texture2D texture2D6 = TextureAssets.Extra[22].Value; + float num296 = projectile1.localAI[1]; + Microsoft.Xna.Framework.Color color58 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * 0.9f; + Main.EntitySpriteDraw(texture2D5, projectile1.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(), color58, projectile1.rotation, texture2D5.Size() / 2f, projectile1.scale, SpriteEffects.None, 0); + float num297 = num296 - (float) (texture2D5.Height / 2 + texture2D6.Height) * projectile1.scale; + Vector2 vector2 = projectile1.Center + projectile1.velocity * projectile1.scale * (float) texture2D5.Height / 2f; + if ((double) num297 > 0.0) + { + float num298 = 0.0f; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 16 * (projectile1.timeLeft / 3 % 5), texture.Width, 16); + while ((double) num298 + 1.0 < (double) num297) + { + if ((double) num297 - (double) num298 < (double) rectangle.Height) + rectangle.Height = (int) ((double) num297 - (double) num298); + Main.EntitySpriteDraw(texture, vector2 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(rectangle), color58, projectile1.rotation, new Vector2((float) (rectangle.Width / 2), 0.0f), projectile1.scale, SpriteEffects.None, 0); + num298 += (float) rectangle.Height * projectile1.scale; + vector2 += projectile1.velocity * (float) rectangle.Height * projectile1.scale; + rectangle.Y += 16; + if (rectangle.Y + rectangle.Height > texture.Height) + rectangle.Y = 0; + } + } + Main.EntitySpriteDraw(texture2D6, vector2 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(), color58, projectile1.rotation, texture2D6.Frame().Top(), projectile1.scale, SpriteEffects.None, 0); + } + else if (projectile1.type == 461) + { + if (projectile1.velocity == Vector2.Zero) + return; + Texture2D texture2D = TextureAssets.Projectile[projectile1.type].Value; + float num299 = projectile1.localAI[1]; + Microsoft.Xna.Framework.Color color59 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * 0.9f; + Microsoft.Xna.Framework.Rectangle r = new Microsoft.Xna.Framework.Rectangle(0, 0, texture2D.Width, 22); + Vector2 vector2_20 = new Vector2(0.0f, Main.player[projectile1.owner].gfxOffY); + Main.EntitySpriteDraw(texture2D, projectile1.Center.Floor() - Main.screenPosition + vector2_20, new Microsoft.Xna.Framework.Rectangle?(r), color59, projectile1.rotation, r.Size() / 2f, projectile1.scale, SpriteEffects.None, 0); + float num300 = num299 - 33f * projectile1.scale; + Vector2 vector2_21 = projectile1.Center.Floor() + projectile1.velocity * projectile1.scale * 10.5f; + r = new Microsoft.Xna.Framework.Rectangle(0, 25, texture2D.Width, 28); + if ((double) num300 > 0.0) + { + float num301 = 0.0f; + while ((double) num301 + 1.0 < (double) num300) + { + if ((double) num300 - (double) num301 < (double) r.Height) + r.Height = (int) ((double) num300 - (double) num301); + Main.EntitySpriteDraw(texture2D, vector2_21 - Main.screenPosition + vector2_20, new Microsoft.Xna.Framework.Rectangle?(r), color59, projectile1.rotation, new Vector2((float) (r.Width / 2), 0.0f), projectile1.scale, SpriteEffects.None, 0); + num301 += (float) r.Height * projectile1.scale; + vector2_21 += projectile1.velocity * (float) r.Height * projectile1.scale; + } + } + r = new Microsoft.Xna.Framework.Rectangle(0, 56, texture2D.Width, 22); + Main.EntitySpriteDraw(texture2D, vector2_21 - Main.screenPosition + vector2_20, new Microsoft.Xna.Framework.Rectangle?(r), color59, projectile1.rotation, texture2D.Frame().Top(), projectile1.scale, SpriteEffects.None, 0); + } + else if (projectile1.type == 632) + { + if (projectile1.velocity == Vector2.Zero) + return; + Texture2D tex = TextureAssets.Projectile[projectile1.type].Value; + float num302 = projectile1.localAI[1]; + float laserLuminance = 0.5f; + float laserAlphaMultiplier = 0.0f; + Microsoft.Xna.Framework.Color rgb = Main.hslToRgb(projectile1.GetLastPrismHue(projectile1.ai[0], ref laserLuminance, ref laserAlphaMultiplier), 1f, laserLuminance); + rgb.A = (byte) ((double) rgb.A * (double) laserAlphaMultiplier); + Vector2 vector2_22 = projectile1.Center.Floor() + projectile1.velocity * projectile1.scale * 10.5f; + float num303 = num302 - projectile1.scale * 14.5f * projectile1.scale; + Vector2 scale = new Vector2(projectile1.scale); + DelegateMethods.f_1 = 1f; + DelegateMethods.c_1 = rgb * 0.75f * projectile1.Opacity; + Vector2 vector2_23 = projectile1.oldPos[0] + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Utils.DrawLaser(Main.spriteBatch, tex, vector2_22 - Main.screenPosition, vector2_22 + projectile1.velocity * num303 - Main.screenPosition, scale, new Utils.LaserLineFraming(DelegateMethods.RainbowLaserDraw)); + DelegateMethods.c_1 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue) * 0.75f * projectile1.Opacity; + Utils.DrawLaser(Main.spriteBatch, tex, vector2_22 - Main.screenPosition, vector2_22 + projectile1.velocity * num303 - Main.screenPosition, scale / 2f, new Utils.LaserLineFraming(DelegateMethods.RainbowLaserDraw)); + } + else if (projectile1.type == 642) + { + if (projectile1.velocity == Vector2.Zero) + return; + Texture2D tex = TextureAssets.Projectile[projectile1.type].Value; + float num304 = projectile1.localAI[1]; + Microsoft.Xna.Framework.Color color60 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue); + Vector2 vector2_24 = projectile1.Center.Floor(); + float num305 = num304 - projectile1.scale * 10.5f; + Vector2 scale = new Vector2(projectile1.scale); + DelegateMethods.f_1 = 1f; + DelegateMethods.c_1 = color60; + DelegateMethods.i_1 = 54000 - (int) Main.time / 2; + Vector2 vector2_25 = projectile1.oldPos[0] + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Utils.DrawLaser(Main.spriteBatch, tex, vector2_24 - Main.screenPosition, vector2_24 + projectile1.velocity * num305 - Main.screenPosition, scale, new Utils.LaserLineFraming(DelegateMethods.TurretLaserDraw)); + DelegateMethods.c_1 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue) * 0.75f * projectile1.Opacity; + Utils.DrawLaser(Main.spriteBatch, tex, vector2_24 - Main.screenPosition, vector2_24 + projectile1.velocity * num305 - Main.screenPosition, scale / 2f, new Utils.LaserLineFraming(DelegateMethods.TurretLaserDraw)); + } + else if (projectile1.type == 611) + { + Vector2 vector2_26 = projectile1.position + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Texture2D texture2D = TextureAssets.Projectile[projectile1.type].Value; + Microsoft.Xna.Framework.Color alpha = projectile1.GetAlpha(color10); + if (projectile1.velocity == Vector2.Zero) + return; + float num306 = projectile1.velocity.Length() + 16f; + bool flag = (double) num306 < 100.0; + Vector2 vector2_27 = Vector2.Normalize(projectile1.velocity); + Microsoft.Xna.Framework.Rectangle r = new Microsoft.Xna.Framework.Rectangle(0, 2, texture2D.Width, 40); + Vector2 vector2_28 = new Vector2(0.0f, Main.player[projectile1.owner].gfxOffY); + float rotation = projectile1.rotation + 3.141593f; + Main.EntitySpriteDraw(texture2D, projectile1.Center.Floor() - Main.screenPosition + vector2_28, new Microsoft.Xna.Framework.Rectangle?(r), alpha, rotation, r.Size() / 2f - Vector2.UnitY * 4f, projectile1.scale, SpriteEffects.None, 0); + float num307 = num306 - 40f * projectile1.scale; + Vector2 vector2_29 = projectile1.Center.Floor() + vector2_27 * projectile1.scale * 24f; + r = new Microsoft.Xna.Framework.Rectangle(0, 68, texture2D.Width, 18); + if ((double) num307 > 0.0) + { + float num308 = 0.0f; + while ((double) num308 + 1.0 < (double) num307) + { + if ((double) num307 - (double) num308 < (double) r.Height) + r.Height = (int) ((double) num307 - (double) num308); + Main.EntitySpriteDraw(texture2D, vector2_29 - Main.screenPosition + vector2_28, new Microsoft.Xna.Framework.Rectangle?(r), alpha, rotation, new Vector2((float) (r.Width / 2), 0.0f), projectile1.scale, SpriteEffects.None, 0); + num308 += (float) r.Height * projectile1.scale; + vector2_29 += vector2_27 * (float) r.Height * projectile1.scale; + } + } + Vector2 vector2_30 = vector2_29; + Vector2 vector2_31 = projectile1.Center.Floor() + vector2_27 * projectile1.scale * 24f; + r = new Microsoft.Xna.Framework.Rectangle(0, 46, texture2D.Width, 18); + int num309 = 18; + if (flag) + num309 = 9; + float num310 = num307; + if ((double) num307 > 0.0) + { + float num311 = 0.0f; + float num312 = num310 / (float) num309; + float num313 = num311 + num312 * 0.25f; + Vector2 vector2_32 = vector2_31 + vector2_27 * num312 * 0.25f; + for (int index = 0; index < num309; ++index) + { + float num314 = num312; + if (index == 0) + num314 *= 0.75f; + Main.EntitySpriteDraw(texture2D, vector2_32 - Main.screenPosition + vector2_28, new Microsoft.Xna.Framework.Rectangle?(r), alpha, rotation, new Vector2((float) (r.Width / 2), 0.0f), projectile1.scale, SpriteEffects.None, 0); + num313 += num314; + vector2_32 += vector2_27 * num314; + } + } + r = new Microsoft.Xna.Framework.Rectangle(0, 90, texture2D.Width, 48); + Main.EntitySpriteDraw(texture2D, vector2_30 - Main.screenPosition + vector2_28, new Microsoft.Xna.Framework.Rectangle?(r), alpha, rotation, texture2D.Frame().Top(), projectile1.scale, SpriteEffects.None, 0); + } + else if (projectile1.type == 537) + { + if (projectile1.velocity == Vector2.Zero) + return; + Texture2D texture2D = TextureAssets.Projectile[projectile1.type].Value; + float num315 = projectile1.localAI[1]; + Microsoft.Xna.Framework.Color color61 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * 0.9f; + Microsoft.Xna.Framework.Rectangle r = new Microsoft.Xna.Framework.Rectangle(0, 0, texture2D.Width, 22); + Vector2 vector2_33 = new Vector2(0.0f, Main.npc[(int) projectile1.ai[1]].gfxOffY); + Main.EntitySpriteDraw(texture2D, projectile1.Center.Floor() - Main.screenPosition + vector2_33, new Microsoft.Xna.Framework.Rectangle?(r), color61, projectile1.rotation, r.Size() / 2f, projectile1.scale, SpriteEffects.None, 0); + float num316 = num315 - 33f * projectile1.scale; + Vector2 vector2_34 = projectile1.Center.Floor() + projectile1.velocity * projectile1.scale * 10.5f; + r = new Microsoft.Xna.Framework.Rectangle(0, 25, texture2D.Width, 28); + if ((double) num316 > 0.0) + { + float num317 = 0.0f; + while ((double) num317 + 1.0 < (double) num316) + { + if ((double) num316 - (double) num317 < (double) r.Height) + r.Height = (int) ((double) num316 - (double) num317); + Main.EntitySpriteDraw(texture2D, vector2_34 - Main.screenPosition + vector2_33, new Microsoft.Xna.Framework.Rectangle?(r), color61, projectile1.rotation, new Vector2((float) (r.Width / 2), 0.0f), projectile1.scale, SpriteEffects.None, 0); + num317 += (float) r.Height * projectile1.scale; + vector2_34 += projectile1.velocity * (float) r.Height * projectile1.scale; + } + } + r = new Microsoft.Xna.Framework.Rectangle(0, 56, texture2D.Width, 22); + Main.EntitySpriteDraw(texture2D, vector2_34 - Main.screenPosition + vector2_33, new Microsoft.Xna.Framework.Rectangle?(r), color61, projectile1.rotation, texture2D.Frame().Top(), projectile1.scale, SpriteEffects.None, 0); + } + else if (projectile1.type == 456) + { + Texture2D texture2D7 = TextureAssets.Projectile[projectile1.type].Value; + Texture2D texture = TextureAssets.Extra[23].Value; + Texture2D texture2D8 = TextureAssets.Extra[24].Value; + Vector2 vector2_35 = new Vector2(0.0f, 216f); + Vector2 vector2_36 = Main.npc[(int) Math.Abs(projectile1.ai[0]) - 1].Center - projectile1.Center + vector2_35; + float num318 = vector2_36.Length(); + Vector2 vector2_37 = Vector2.Normalize(vector2_36); + Microsoft.Xna.Framework.Rectangle r5 = texture2D7.Frame(); + r5.Height /= 4; + r5.Y += projectile1.frame * r5.Height; + Microsoft.Xna.Framework.Color newColor1 = Microsoft.Xna.Framework.Color.Lerp(color10, Microsoft.Xna.Framework.Color.White, 0.3f); + Main.EntitySpriteDraw(texture2D7, projectile1.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(r5), projectile1.GetAlpha(newColor1), projectile1.rotation, r5.Size() / 2f, projectile1.scale, SpriteEffects.None, 0); + float num319 = num318 - (float) (r5.Height / 2 + texture2D8.Height) * projectile1.scale; + Vector2 vec = projectile1.Center + vector2_37 * projectile1.scale * (float) r5.Height / 2f; + if ((double) num319 > 0.0) + { + float num320 = 0.0f; + Microsoft.Xna.Framework.Rectangle r6 = new Microsoft.Xna.Framework.Rectangle(0, 0, texture.Width, texture.Height); + while ((double) num320 + 1.0 < (double) num319) + { + if ((double) num319 - (double) num320 < (double) r6.Height) + r6.Height = (int) ((double) num319 - (double) num320); + Microsoft.Xna.Framework.Point tileCoordinates = vec.ToTileCoordinates(); + Microsoft.Xna.Framework.Color newColor2 = Microsoft.Xna.Framework.Color.Lerp(Lighting.GetColor(tileCoordinates.X, tileCoordinates.Y), Microsoft.Xna.Framework.Color.White, 0.3f); + Main.EntitySpriteDraw(texture, vec - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(r6), projectile1.GetAlpha(newColor2), projectile1.rotation, r6.Bottom(), projectile1.scale, SpriteEffects.None, 0); + num320 += (float) r6.Height * projectile1.scale; + vec += vector2_37 * (float) r6.Height * projectile1.scale; + } + } + Microsoft.Xna.Framework.Point tileCoordinates1 = vec.ToTileCoordinates(); + Microsoft.Xna.Framework.Color color62 = Microsoft.Xna.Framework.Color.Lerp(Lighting.GetColor(tileCoordinates1.X, tileCoordinates1.Y), Microsoft.Xna.Framework.Color.White, 0.3f); + Microsoft.Xna.Framework.Rectangle rectangle = texture2D8.Frame(); + if ((double) num319 < 0.0) + rectangle.Height += (int) num319; + Main.EntitySpriteDraw(texture2D8, vec - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(rectangle), color62, projectile1.rotation, new Vector2((float) rectangle.Width / 2f, (float) rectangle.Height), projectile1.scale, SpriteEffects.None, 0); + } + else if (projectile1.type == 443) + { + Texture2D texture = TextureAssets.Projectile[projectile1.type].Value; + float num321 = 30f; + float num322 = num321 * 4f; + float num323 = 6.283185f * projectile1.ai[0] / num321; + float num324 = 6.283185f * projectile1.ai[0] / num322; + Vector2 vector2 = -Vector2.UnitY.RotatedBy((double) num323); + float scale6 = (float) (0.75 + (double) vector2.Y * 0.25); + float scale7 = (float) (0.800000011920929 - (double) vector2.Y * 0.200000002980232); + int height = TextureAssets.Projectile[projectile1.type].Height() / Main.projFrames[projectile1.type]; + int y = height * projectile1.frame; + Vector2 position = projectile1.position + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Main.EntitySpriteDraw(texture, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, texture.Width, height)), projectile1.GetAlpha(color10), projectile1.rotation + num324, new Vector2((float) texture.Width / 2f, (float) height / 2f), scale6, spriteEffects, 0); + Main.EntitySpriteDraw(texture, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, texture.Width, height)), projectile1.GetAlpha(color10), projectile1.rotation + (6.283185f - num324), new Vector2((float) texture.Width / 2f, (float) height / 2f), scale7, spriteEffects, 0); + } + else if (projectile1.type == 656 || projectile1.type == 657) + { + float num325 = 900f; + if (projectile1.type == 657) + num325 = 300f; + float num326 = 15f; + float num327 = 15f; + float num328 = projectile1.ai[0]; + float num329 = MathHelper.Clamp(num328 / 30f, 0.0f, 1f); + if ((double) num328 > (double) num325 - 60.0) + num329 = MathHelper.Lerp(1f, 0.0f, (float) (((double) num328 - ((double) num325 - 60.0)) / 60.0)); + Microsoft.Xna.Framework.Point tileCoordinates = projectile1.Center.ToTileCoordinates(); + int topY; + int bottomY; + Collision.ExpandVertically(tileCoordinates.X, tileCoordinates.Y, out topY, out bottomY, (int) num326, (int) num327); + ++topY; + --bottomY; + float num330 = 0.2f; + Vector2 vector2_38 = new Vector2((float) tileCoordinates.X, (float) topY) * 16f + new Vector2(8f); + Vector2 vector2_39 = new Vector2((float) tileCoordinates.X, (float) bottomY) * 16f + new Vector2(8f); + Vector2.Lerp(vector2_38, vector2_39, 0.5f); + Vector2 vector2_40 = new Vector2(0.0f, vector2_39.Y - vector2_38.Y); + vector2_40.X = vector2_40.Y * num330; + Vector2 vector2_41 = new Vector2(vector2_38.X - vector2_40.X / 2f, vector2_38.Y); + Texture2D texture2D = TextureAssets.Projectile[projectile1.type].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(); + Vector2 origin = r.Size() / 2f; + float num331 = -0.06283186f * num328; + Vector2 spinningpoint = Vector2.UnitY.RotatedBy((double) num328 * 0.100000001490116); + float num332 = 0.0f; + float num333 = 5.1f; + Microsoft.Xna.Framework.Color color63 = new Microsoft.Xna.Framework.Color(212, 192, 100); + for (float y = (float) (int) vector2_39.Y; (double) y > (double) (int) vector2_38.Y; y -= num333) + { + num332 += num333; + float num334 = num332 / vector2_40.Y; + float num335 = (float) ((double) num332 * 6.28318548202515 / -20.0); + float num336 = num334 - 0.15f; + Vector2 vector2_42 = spinningpoint.RotatedBy((double) num335); + Vector2 vector2_43 = new Vector2(0.0f, num334 + 1f); + vector2_43.X = vector2_43.Y * num330; + Microsoft.Xna.Framework.Color color64 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, color63, num334 * 2f); + if ((double) num334 > 0.5) + color64 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, color63, (float) (2.0 - (double) num334 * 2.0)); + color64.A = (byte) ((double) color64.A * 0.5); + Microsoft.Xna.Framework.Color color65 = color64 * num329; + Vector2 vector2_44 = vector2_42 * (vector2_43 * 100f); + vector2_44.Y = 0.0f; + vector2_44.X = 0.0f; + Vector2 position = vector2_44 + (new Vector2(vector2_39.X, y) - Main.screenPosition); + Main.EntitySpriteDraw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), color65, num331 + num335, origin, 1f + num336, SpriteEffects.None, 0); + } + } + else if (projectile1.type == 704) + { + float num337 = 300f; + float num338 = projectile1.ai[0]; + float num339 = MathHelper.Clamp(num338 / 30f, 0.0f, 1f); + if ((double) num338 > (double) num337 - 60.0) + num339 = MathHelper.Lerp(1f, 0.0f, (float) (((double) num338 - ((double) num337 - 60.0)) / 60.0)); + float num340 = 0.2f; + Vector2 top = projectile1.Top; + Vector2 bottom = projectile1.Bottom; + Vector2.Lerp(top, bottom, 0.5f); + Vector2 vector2_45 = new Vector2(0.0f, bottom.Y - top.Y); + vector2_45.X = vector2_45.Y * num340; + Vector2 vector2_46 = new Vector2(top.X - vector2_45.X / 2f, top.Y); + Texture2D texture2D = TextureAssets.Projectile[projectile1.type].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(); + Vector2 origin = r.Size() / 2f; + float num341 = (float) (-0.157079637050629 * (double) num338 * ((double) projectile1.velocity.X > 0.0 ? -1.0 : 1.0)); + SpriteEffects effects = (double) projectile1.velocity.X > 0.0 ? SpriteEffects.FlipVertically : SpriteEffects.None; + bool flag10 = (double) projectile1.velocity.X > 0.0; + Vector2 spinningpoint = Vector2.UnitY.RotatedBy((double) num338 * 0.140000000596046); + float num342 = 0.0f; + float num343 = (float) (5.01000022888184 + (double) num338 / 150.0 * -0.899999976158142); + if ((double) num343 < 4.1100001335144) + num343 = 4.11f; + Microsoft.Xna.Framework.Color color66 = new Microsoft.Xna.Framework.Color(160, 140, 100, (int) sbyte.MaxValue); + Microsoft.Xna.Framework.Color color67 = new Microsoft.Xna.Framework.Color(140, 160, (int) byte.MaxValue, (int) sbyte.MaxValue); + float t = num338 % 60f; + Microsoft.Xna.Framework.Color color68 = (double) t >= 30.0 ? color67 * Utils.GetLerpValue(38f, 30f, t, true) : color67 * Utils.GetLerpValue(22f, 30f, t, true); + bool flag11 = color68 != Microsoft.Xna.Framework.Color.Transparent; + for (float y = (float) (int) bottom.Y; (double) y > (double) (int) top.Y; y -= num343) + { + num342 += num343; + float num344 = num342 / vector2_45.Y; + float num345 = (float) ((double) num342 * 6.28318548202515 / -20.0); + if (flag10) + num345 *= -1f; + float num346 = num344 - 0.35f; + Vector2 vector2_47 = spinningpoint.RotatedBy((double) num345); + Vector2 vector2_48 = new Vector2(0.0f, num344 + 1f); + vector2_48.X = vector2_48.Y * num340; + Microsoft.Xna.Framework.Color color69 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, color66, num344 * 2f); + if ((double) num344 > 0.5) + color69 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, color66, (float) (2.0 - (double) num344 * 2.0)); + color69.A = (byte) ((double) color69.A * 0.5); + Microsoft.Xna.Framework.Color color70 = color69 * num339; + Vector2 vector2_49 = vector2_47 * (vector2_48 * 100f); + vector2_49.Y = 0.0f; + vector2_49.X = 0.0f; + Vector2 position = vector2_49 + (new Vector2(bottom.X, y) - Main.screenPosition); + if (flag11) + { + Microsoft.Xna.Framework.Color color71 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, color68, num344 * 2f); + if ((double) num344 > 0.5) + color71 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, color68, (float) (2.0 - (double) num344 * 2.0)); + color71.A = (byte) ((double) color71.A * 0.5); + Microsoft.Xna.Framework.Color color72 = color71 * num339; + Main.EntitySpriteDraw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), color72, num341 + num345, origin, (float) ((1.0 + (double) num346) * 0.800000011920929), effects, 0); + } + Main.EntitySpriteDraw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), color70, num341 + num345, origin, 1f + num346, effects, 0); + } + } + else if (projectile1.type == 444 || projectile1.type == 446 || projectile1.type == 490 || projectile1.type == 464 || projectile1.type == 502 || projectile1.type == 538 || projectile1.type == 540 || projectile1.type == 579 || projectile1.type == 578 || projectile1.type == 813 || projectile1.type == 583 || projectile1.type == 584 || projectile1.type == 616 || projectile1.type == 617 || projectile1.type == 618 || projectile1.type == 641 || projectile1.type >= 646 && projectile1.type <= 649 || projectile1.type == 653 || projectile1.type == 186 || projectile1.type == 662 || projectile1.type == 685 || projectile1.type == 673 || projectile1.type == 676 || projectile1.type == 697 || projectile1.type == 699 || projectile1.type == 707 || projectile1.type == 708 || projectile1.type == 719 || projectile1.type == 761 || projectile1.type == 762 || projectile1.type == 763 || projectile1.type == 772 || projectile1.type == 802 || projectile1.type == 842 || projectile1.type == 865 || projectile1.type == 921 || projectile1.type == 926 || projectile1.type == 757 || projectile1.type == 25 || projectile1.type == 35 || projectile1.type == 63 || projectile1.type == 154 || projectile1.type == 247 || projectile1.type == 26 || projectile1.type == 928 || projectile1.type == 16 || projectile1.type == 34 || projectile1.type == 79 || projectile1.type == 936 || projectile1.type == 937 || projectile1.type == 938 || projectile1.type == 939 || projectile1.type == 940 || projectile1.type == 941 || projectile1.type == 942 || projectile1.type == 943 || projectile1.type == 944 || projectile1.type == 945 || (projectile1.type >= 776 && projectile1.type <= 801 || projectile1.type >= 803 && projectile1.type <= 810) && projectile1.type != 779 && projectile1.type != 783 && projectile1.type != 862 && projectile1.type != 863) + { + Vector2 position16 = projectile1.position + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Texture2D texture2D9 = TextureAssets.Projectile[projectile1.type].Value; + Microsoft.Xna.Framework.Color color73 = projectile1.GetAlpha(color10); + Vector2 origin9 = new Vector2((float) texture2D9.Width, (float) texture2D9.Height) / 2f; + float rotation5 = projectile1.rotation; + Vector2 scale8 = Vector2.One * projectile1.scale; + Microsoft.Xna.Framework.Rectangle? sourceRectangle = new Microsoft.Xna.Framework.Rectangle?(); + if (projectile1.type == 446) + origin9.Y = 4f; + if (projectile1.type == 865) + { + position16 += new Vector2(1f, -1f); + spriteEffects = (double) projectile1.DirectionFrom(Main.player[projectile1.owner].Center).SafeNormalize(Vector2.Zero).X > 0.0 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + } + if (projectile1.type == 16) + { + float lerpValue = Utils.GetLerpValue(0.0f, 8f, projectile1.velocity.Length(), true); + rotation5 *= lerpValue; + scale8 *= 0.6f; + scale8.Y *= MathHelper.Lerp(1f, 0.8f, lerpValue); + scale8.X *= MathHelper.Lerp(1f, 1.5f, lerpValue); + } + if (projectile1.type == 34) + { + float lerpValue = Utils.GetLerpValue(0.0f, 8f, projectile1.velocity.Length(), true); + float num347 = rotation5 * lerpValue; + scale8.X *= MathHelper.Lerp(1f, 0.8f, lerpValue); + rotation5 = num347 + -1.570796f * lerpValue; + sourceRectangle = new Microsoft.Xna.Framework.Rectangle?(texture2D9.Frame(verticalFrames: Main.projFrames[projectile1.type], frameY: projectile1.frame)); + origin9 = sourceRectangle.Value.Size() / 2f; + Vector2 vector2 = position16 - projectile1.velocity * 1f; + position16 = projectile1.oldPos[0] + projectile1.Size / 2f - Main.screenPosition - projectile1.velocity / 2f; + } + if (projectile1.type == 79) + { + rotation5 = 0.0f; + scale8 *= Utils.GetLerpValue(32f, 0.0f, projectile1.position.Distance(projectile1.oldPos[12]), true); + color73 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + } + if (projectile1.type == 761 || projectile1.type == 762) + spriteEffects = projectile1.spriteDirection > 0 ? SpriteEffects.None : SpriteEffects.FlipVertically; + if (projectile1.type == 662 || projectile1.type == 685) + origin9 = new Vector2(6f, 6f); + if (projectile1.type == 699 || projectile1.type == 708) + { + Player player = Main.player[projectile1.owner]; + origin9 = new Vector2(projectile1.spriteDirection == 1 ? (float) texture2D9.Width - -8f : -8f, (double) player.gravDir == 1.0 ? -8f : (float) texture2D9.Height - -8f); + if ((double) player.gravDir == -1.0) + { + spriteEffects |= SpriteEffects.FlipVertically; + rotation5 += 1.570796f * (float) -projectile1.spriteDirection; + } + } + if (projectile1.type == 938 || projectile1.type == 939 || projectile1.type == 940 || projectile1.type == 941 || projectile1.type == 942 || projectile1.type == 943 || projectile1.type == 944 || projectile1.type == 945) + rotation5 -= 0.7853982f * (float) projectile1.spriteDirection; + if (projectile1.type == 502) + { + this.LoadProjectile(250); + Texture2D texture = TextureAssets.Projectile[250].Value; + Vector2 origin10 = new Vector2((float) (texture.Width / 2), 0.0f); + Vector2 vector2_50 = new Vector2((float) projectile1.width, (float) projectile1.height) / 2f; + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + white.A = (byte) 127; + for (int index = projectile1.oldPos.Length - 1; index > 0; --index) + { + Vector2 vector2_51 = projectile1.oldPos[index] + vector2_50; + if (!(vector2_51 == vector2_50)) + { + Vector2 vector2_52 = projectile1.oldPos[index - 1] + vector2_50; + float rotation6 = (vector2_52 - vector2_51).ToRotation() - 1.570796f; + Vector2 scale9 = new Vector2(1f, Vector2.Distance(vector2_51, vector2_52) / (float) texture.Height); + Microsoft.Xna.Framework.Color color74 = white * (float) (1.0 - (double) index / (double) projectile1.oldPos.Length); + Main.EntitySpriteDraw(texture, vector2_51 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(), color74, rotation6, origin10, scale9, spriteEffects, 0); + } + } + } + else if (projectile1.type == 540 && projectile1.velocity != Vector2.Zero) + { + float num348 = 0.0f; + if ((double) projectile1.ai[0] >= 10.0) + num348 = (float) (((double) projectile1.ai[0] - 10.0) / 10.0); + if ((double) projectile1.ai[0] >= 20.0) + num348 = (float) ((20.0 - (double) projectile1.ai[0]) / 10.0); + if ((double) num348 > 1.0) + num348 = 1f; + if ((double) num348 < 0.0) + num348 = 0.0f; + if ((double) num348 != 0.0) + { + Texture2D texture = TextureAssets.Extra[47].Value; + Vector2 origin11 = new Vector2((float) (texture.Width / 2), 0.0f); + Microsoft.Xna.Framework.Color color75 = color73 * num348 * 0.7f; + Vector2 vector2_53 = projectile1.Center - Main.screenPosition; + Vector2 vector2_54 = projectile1.velocity.ToRotation().ToRotationVector2() * (float) texture2D9.Width / 3f; + Vector2 zero = Vector2.Zero; + Vector2 position17 = vector2_53 + zero; + float rotation7 = projectile1.velocity.ToRotation() - 1.570796f; + Vector2 scale10 = new Vector2(1f, (projectile1.velocity.Length() - zero.Length() * 2f) / (float) texture.Height); + Main.EntitySpriteDraw(texture, position17, new Microsoft.Xna.Framework.Rectangle?(), color75, rotation7, origin11, scale10, SpriteEffects.None, 0); + } + } + if (projectile1.type == 578 || projectile1.type == 579 || projectile1.type == 641 || projectile1.type == 813) + { + Microsoft.Xna.Framework.Color color76 = color73 * 0.8f; + color76.A /= (byte) 2; + Microsoft.Xna.Framework.Color color77 = Microsoft.Xna.Framework.Color.Lerp(color73, Microsoft.Xna.Framework.Color.Black, 0.5f); + color77.A = color73.A; + float num349 = (float) (0.949999988079071 + (double) (projectile1.rotation * 0.75f).ToRotationVector2().Y * 0.100000001490116); + Microsoft.Xna.Framework.Color color78 = color77 * num349; + float scale11 = (float) (0.600000023841858 + (double) projectile1.scale * 0.600000023841858 * (double) num349); + Texture2D texture2D10 = TextureAssets.Extra[50].Value; + bool flag = true; + if (projectile1.type == 813) + { + flag = false; + texture2D10 = TextureAssets.Extra[131].Value; + } + Vector2 origin12 = texture2D10.Size() / 2f; + Main.EntitySpriteDraw(texture2D10, position16, new Microsoft.Xna.Framework.Rectangle?(), color78, (float) (-(double) rotation5 + 0.349999994039536), origin12, scale11, spriteEffects ^ SpriteEffects.FlipHorizontally, 0); + Main.EntitySpriteDraw(texture2D10, position16, new Microsoft.Xna.Framework.Rectangle?(), color73, -rotation5, origin12, projectile1.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0); + if (flag) + Main.EntitySpriteDraw(texture2D9, position16, new Microsoft.Xna.Framework.Rectangle?(), color76, (float) (-(double) rotation5 * 0.699999988079071), origin9, projectile1.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0); + Main.EntitySpriteDraw(texture2D10, position16, new Microsoft.Xna.Framework.Rectangle?(), color73 * 0.8f, rotation5 * 0.5f, origin12, projectile1.scale * 0.9f, spriteEffects, 0); + color73.A = (byte) 0; + if (projectile1.type == 813) + rotation5 = 0.0f; + } + if (projectile1.type == 617) + { + Microsoft.Xna.Framework.Color color79 = color73 * 0.8f; + color79.A /= (byte) 2; + Microsoft.Xna.Framework.Color color80 = Microsoft.Xna.Framework.Color.Lerp(color73, Microsoft.Xna.Framework.Color.Black, 0.5f); + color80.A = color73.A; + float num350 = (float) (0.949999988079071 + (double) (projectile1.rotation * 0.75f).ToRotationVector2().Y * 0.100000001490116); + Microsoft.Xna.Framework.Color color81 = color80 * num350; + float scale12 = (float) (0.600000023841858 + (double) projectile1.scale * 0.600000023841858 * (double) num350); + Main.EntitySpriteDraw(TextureAssets.Extra[50].Value, position16, new Microsoft.Xna.Framework.Rectangle?(), color81, (float) (-(double) projectile1.rotation + 0.349999994039536), origin9, scale12, spriteEffects ^ SpriteEffects.FlipHorizontally, 0); + Main.EntitySpriteDraw(TextureAssets.Extra[50].Value, position16, new Microsoft.Xna.Framework.Rectangle?(), color73, -projectile1.rotation, origin9, projectile1.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0); + Main.EntitySpriteDraw(texture2D9, position16, new Microsoft.Xna.Framework.Rectangle?(), color79, (float) (-(double) projectile1.rotation * 0.699999988079071), origin9, projectile1.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0); + Main.EntitySpriteDraw(TextureAssets.Extra[50].Value, position16, new Microsoft.Xna.Framework.Rectangle?(), color73 * 0.8f, projectile1.rotation * 0.5f, origin9, projectile1.scale * 0.9f, spriteEffects, 0); + color73.A = (byte) 0; + } + if (projectile1.type == 757 || projectile1.type == 25 || projectile1.type == 35 || projectile1.type == 63 || projectile1.type == 154 || projectile1.type == 247 || projectile1.type == 26) + { + if ((double) projectile1.ai[0] == 1.0) + { + Microsoft.Xna.Framework.Color color82 = color73; + color82.A = (byte) 127; + color82 *= 0.5f; + int num351 = (int) projectile1.ai[1]; + if (num351 > 5) + num351 = 5; + for (float num352 = 1f; (double) num352 >= 0.0; num352 -= 0.125f) + { + float amount = 1f - num352; + Vector2 vector2 = projectile1.velocity * (float) -num351 * num352; + Main.EntitySpriteDraw(texture2D9, position16 + vector2, new Microsoft.Xna.Framework.Rectangle?(), color82 * amount, rotation5, origin9, projectile1.scale * 1.15f * MathHelper.Lerp(0.5f, 1f, amount), spriteEffects, 0); + } + } + } + else if (projectile1.type == 79) + { + Vector2 scale13 = scale8 * 1.4f; + Vector2 spinningpoint = new Vector2((float) (2.0 * (double) scale13.X + Math.Cos((double) Main.GlobalTimeWrappedHourly * 6.28318548202515) * 0.400000005960464), 0.0f).RotatedBy((double) rotation5 + (double) Main.GlobalTimeWrappedHourly * 6.28318548202515); + for (float Hue = 0.0f; (double) Hue < 1.0; Hue += 0.1666667f) + { + Microsoft.Xna.Framework.Color color83 = Main.hslToRgb(Hue, 1f, 0.5f) * 0.3f; + color83.A = (byte) 0; + Main.EntitySpriteDraw(texture2D9, position16 + spinningpoint.RotatedBy((double) Hue * 6.28318548202515), new Microsoft.Xna.Framework.Rectangle?(), color83, rotation5, origin9, scale13, spriteEffects, 0); + } + Main.EntitySpriteDraw(texture2D9, position16, new Microsoft.Xna.Framework.Rectangle?(), color73, rotation5, origin9, scale8, spriteEffects, 0); + } + if ((0 | (projectile1.type != 464 ? 0 : ((double) projectile1.ai[1] != 1.0 ? 1 : 0))) == 0) + Main.EntitySpriteDraw(texture2D9, position16, sourceRectangle, color73, rotation5, origin9, scale8, spriteEffects, 0); + if (projectile1.type == 464 && (double) projectile1.ai[1] != 1.0) + { + Texture2D texture2D11 = TextureAssets.Extra[35].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D11.Frame(verticalFrames: 3); + origin9 = r.Size() / 2f; + Vector2 spinningpoint = new Vector2(0.0f, -720f).RotatedBy((double) projectile1.velocity.ToRotation()) * (float) ((double) projectile1.ai[0] % 45.0 / 45.0); + for (int index = 0; index < 6; ++index) + { + float num353 = (float) ((double) index * 6.28318548202515 / 6.0); + Vector2 vector2 = projectile1.Center + spinningpoint.RotatedBy((double) num353); + Main.EntitySpriteDraw(texture2D11, vector2 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(r), color73, (float) ((double) num353 + (double) projectile1.velocity.ToRotation() + 3.14159274101257), origin9, projectile1.scale, spriteEffects, 0); + r.Y += r.Height; + if (r.Y >= texture2D11.Height) + r.Y = 0; + } + } + else if (projectile1.type == 490) + { + Main.EntitySpriteDraw(TextureAssets.Extra[34].Value, position16, new Microsoft.Xna.Framework.Rectangle?(), color73, -projectile1.rotation, TextureAssets.Extra[34].Value.Size() / 2f, projectile1.scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture2D9, position16, new Microsoft.Xna.Framework.Rectangle?(), color73, projectile1.rotation, origin9, projectile1.scale * 0.42f, spriteEffects, 0); + Main.EntitySpriteDraw(TextureAssets.Extra[34].Value, position16, new Microsoft.Xna.Framework.Rectangle?(), color73, -projectile1.rotation, TextureAssets.Extra[34].Value.Size() / 2f, projectile1.scale * 0.42f, spriteEffects, 0); + } + else if (projectile1.type == 616) + Main.EntitySpriteDraw(TextureAssets.GlowMask[193].Value, position16, new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue, (int) sbyte.MaxValue, (int) sbyte.MaxValue, 0), projectile1.rotation, origin9, projectile1.scale, spriteEffects, 0); + else if (projectile1.type >= 646 && projectile1.type <= 649) + Main.EntitySpriteDraw(TextureAssets.GlowMask[203 + projectile1.type - 646].Value, position16, new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue), projectile1.rotation, origin9, projectile1.scale, spriteEffects, 0); + else if (projectile1.type == 699) + Main.EntitySpriteDraw(TextureAssets.GlowMask[231].Value, position16, new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue), rotation5, origin9, projectile1.scale, spriteEffects, 0); + else if (projectile1.type == 707 || projectile1.type == 708) + { + float num354 = 0.5f; + Texture2D texture2D12 = TextureAssets.GlowMask[232].Value; + Microsoft.Xna.Framework.Rectangle rectangle = texture2D12.Frame(verticalFrames: 3, frameY: ((int) ((double) projectile1.ai[0] % 9.0) / 3)); + if (projectile1.type == 708) + { + rectangle = texture2D12.Frame(verticalFrames: 3, frameY: (Main.player[projectile1.owner].itemAnimation % 9 / 3)); + num354 = 0.75f; + } + Microsoft.Xna.Framework.Color color84 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue) * num354; + Vector2 spinningpoint = new Vector2(2f, 0.0f).RotatedBy((double) projectile1.rotation); + for (float num355 = 0.0f; (double) num355 < 4.0; ++num355) + Main.EntitySpriteDraw(texture2D12, position16 + spinningpoint.RotatedBy((double) num355 * 1.57079637050629), new Microsoft.Xna.Framework.Rectangle?(rectangle), color84 * 0.5f, projectile1.rotation, origin9, projectile1.scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture2D12, position16, new Microsoft.Xna.Framework.Rectangle?(rectangle), color84, projectile1.rotation, origin9, projectile1.scale, spriteEffects, 0); + } + else if (projectile1.type == 719) + { + Microsoft.Xna.Framework.Color color85 = new Microsoft.Xna.Framework.Color(80, 80, 80, (int) byte.MaxValue) * 0.3f; + float scale14 = projectile1.scale * 1.5f; + Vector2 spinningpoint = new Vector2(2f * scale14, 0.0f).RotatedBy((double) projectile1.rotation); + for (float num356 = 0.0f; (double) num356 < 4.0; ++num356) + Main.EntitySpriteDraw(texture2D9, position16 + -projectile1.velocity * num356 * 1.25f, new Microsoft.Xna.Framework.Rectangle?(), color85 * 0.7f, projectile1.rotation, origin9, scale14, spriteEffects, 0); + for (float num357 = 0.0f; (double) num357 < 3.0; ++num357) + Main.EntitySpriteDraw(texture2D9, position16 + spinningpoint.RotatedBy((double) num357 * 1.57079637050629), new Microsoft.Xna.Framework.Rectangle?(), color85 * 0.9f, projectile1.rotation, origin9, scale14, spriteEffects, 0); + Main.EntitySpriteDraw(texture2D9, position16, new Microsoft.Xna.Framework.Rectangle?(), color73, projectile1.rotation, origin9, projectile1.scale, spriteEffects, 0); + } + else if (projectile1.type == 16) + { + Microsoft.Xna.Framework.Color color86 = new Microsoft.Xna.Framework.Color(80, 80, 80, 0); + Vector2 scale15 = scale8 + scale8 * (float) Math.Cos((double) Main.GlobalTimeWrappedHourly * 6.28318548202515) * 0.4f; + Vector2 spinningpoint = new Vector2(2f * scale15.X, 0.0f).RotatedBy((double) rotation5); + for (float num358 = 0.0f; (double) num358 < 1.0; num358 += 0.25f) + Main.EntitySpriteDraw(texture2D9, position16 + spinningpoint.RotatedBy((double) num358 * 6.28318548202515), new Microsoft.Xna.Framework.Rectangle?(), color86, rotation5, origin9, scale15, spriteEffects, 0); + Main.EntitySpriteDraw(texture2D9, position16, new Microsoft.Xna.Framework.Rectangle?(), color73, rotation5, origin9, scale8, spriteEffects, 0); + } + else + { + if (projectile1.type != 34) + return; + float lerpValue = Utils.GetLerpValue(0.0f, 6f, projectile1.localAI[0], true); + Microsoft.Xna.Framework.Color color87 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue) * 0.75f; + Vector2 scale16 = new Vector2(lerpValue); + Vector2 spinningpoint = new Vector2(4f * scale16.X, 0.0f).RotatedBy((double) rotation5); + for (float num359 = 0.0f; (double) num359 < 1.0; num359 += 0.25f) + Main.EntitySpriteDraw(texture2D9, position16 + spinningpoint.RotatedBy((double) num359 * 6.28318548202515), sourceRectangle, color87, rotation5, origin9, scale16, spriteEffects, 0); + } + } + else if (projectile1.type == 465 || projectile1.type == 467 || projectile1.type == 468 || projectile1.type == 500 || projectile1.type == 518 || projectile1.type == 535 || projectile1.type == 539 || projectile1.type == 575 || projectile1.type == 574 || projectile1.type == 589 || projectile1.type == 590 || projectile1.type == 593 || projectile1.type == 602 || projectile1.type == 596 || projectile1.type == 612 || projectile1.type == 613 || projectile1.type == 614 || projectile1.type == 623 || projectile1.type == 625 || projectile1.type == 626 || projectile1.type == 627 || projectile1.type == 628 || projectile1.type == 634 || projectile1.type == 635 || projectile1.type == 643 || projectile1.type == 644 || projectile1.type == 645 || projectile1.type == 650 || projectile1.type == 652 || projectile1.type == 658 || projectile1.type == 659 || projectile1.type == 663 || projectile1.type == 665 || projectile1.type == 667 || projectile1.type == 677 || projectile1.type == 678 || projectile1.type == 679 || projectile1.type == 691 || projectile1.type == 692 || projectile1.type == 693 || projectile1.type == 702 || projectile1.type == 703 || projectile1.type == 701 || projectile1.type == 712 || projectile1.type == 715 || projectile1.type == 716 || projectile1.type == 717 || projectile1.type == 718 || projectile1.type == 758 || projectile1.type == 759 || projectile1.type == 764 || projectile1.type == 779 || projectile1.type == 783 || projectile1.type == 773 || projectile1.type == 820 || projectile1.type == 831 || projectile1.type == 836 || projectile1.type == 851 || projectile1.type == 855 || projectile1.type == 856 || projectile1.type == 857 || projectile1.type == 861 || projectile1.type == 862 || projectile1.type == 863 || projectile1.type == 866 || projectile1.type == 870 || projectile1.type == 882 || projectile1.type == 885 || projectile1.type == 889 || projectile1.type == 895 || projectile1.type == 896 || projectile1.type == 898 || projectile1.type == 903 || projectile1.type == 904 || projectile1.type == 905 || projectile1.type == 906 || projectile1.type == 908 || projectile1.type == 910 || projectile1.type == 911) + { + Vector2 vector2_55 = projectile1.position + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Texture2D target = TextureAssets.Projectile[projectile1.type].Value; + Microsoft.Xna.Framework.Rectangle r = target.Frame(verticalFrames: Main.projFrames[projectile1.type], frameY: projectile1.frame); + Microsoft.Xna.Framework.Color color88 = projectile1.GetAlpha(color10); + Vector2 origin13 = r.Size() / 2f; + if (projectile1.type == 703) + r.Height -= 2; + if (projectile1.type == 895 || projectile1.type == 896 || projectile1.type == 898) + vector2_55.Y += (float) (Math.Cos((double) Main.mouseTextColor / (double) byte.MaxValue * 6.28318548202515 * 2.0) * 4.0) - 2f; + if (projectile1.type == 855) + { + float y17 = ((float) ((double) Main.GlobalTimeWrappedHourly % 6.0 / 6.0 * 6.28318548202515)).ToRotationVector2().Y; + float num360 = (float) ((double) y17 * 0.300000011920929 + 0.699999988079071); + Microsoft.Xna.Framework.Color color89 = color88 * num360 * 0.3f; + for (int index = 0; index < 4; ++index) + { + float x19 = 0.0f; + float y18 = 0.0f; + switch (index) + { + case 0: + x19 = 4f; + break; + case 1: + x19 = -4f; + break; + case 2: + y18 = 4f; + break; + case 3: + y18 = -4f; + break; + } + Vector2 vector2_56 = new Vector2(x19, y18).RotatedBy(6.28318548202515 * (double) i + (double) projectile1.rotation) * y17; + Main.spriteBatch.Draw(target, vector2_55 + vector2_56, new Microsoft.Xna.Framework.Rectangle?(r), color89, projectile1.rotation, r.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + } + } + else if (projectile1.type == 908) + { + PlayerTitaniumStormBuffTextureContent titaniumStormBuff = TextureAssets.RenderTargets.PlayerTitaniumStormBuff; + vector2_55 += (Main.GlobalTimeWrappedHourly * 8f + (float) projectile1.whoAmI).ToRotationVector2() * 4f; + titaniumStormBuff.Request(); + if (titaniumStormBuff.IsReady) + target = (Texture2D) titaniumStormBuff.GetTarget(); + r = target.Frame(Main.projFrames[projectile1.type], frameX: projectile1.frame); + origin13 = r.Size() / 2f; + } + else if (projectile1.type == 764) + this.DrawProjWithStarryTrail(projectile1, color10, spriteEffects); + else if (projectile1.type == 856) + this.DrawProjWithStarryTrail(projectile1, color10, spriteEffects); + else if (projectile1.type == 857) + { + this.DrawProjWithStarryTrail(projectile1, color10, spriteEffects); + color88 = Microsoft.Xna.Framework.Color.White * projectile1.Opacity * 0.9f; + color88.A /= (byte) 2; + r = target.Frame(15, frameX: projectile1.frame); + origin13 = r.Size() / 2f; + Main.DrawPrettyStarSparkle(projectile1, spriteEffects, vector2_55, color88, projectile1.GetFirstFractalColor()); + } + else if (projectile1.type == 539) + { + if ((double) projectile1.ai[0] >= 210.0) + { + float num361 = (projectile1.ai[0] - 210f) / 20f; + if ((double) num361 > 1.0) + num361 = 1f; + Main.EntitySpriteDraw(TextureAssets.Extra[46].Value, vector2_55, new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 128) * num361, projectile1.rotation, new Vector2(17f, 22f), projectile1.scale, spriteEffects, 0); + } + } + else if (projectile1.type == 773) + origin13.Y = (float) (r.Height - 12); + else if (projectile1.type == 866) + origin13.X += 14f; + else if (projectile1.type == 759) + { + origin13.Y = (float) (r.Height - 2); + origin13.X += spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally) ? 1f : -1f; + } + else if (projectile1.type == 758) + { + vector2_55.Y += (float) (projectile1.height / 2); + origin13 = r.Size() * new Vector2(0.5f, 1f); + origin13.Y -= 4f; + } + else if (projectile1.type == 833) + { + if (projectile1.frame != 8) + { + vector2_55.Y += (float) (projectile1.height / 2); + origin13 = r.Size() * new Vector2(0.5f, 1f); + origin13.Y -= 4f; + origin13.X -= (float) (7 * spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally).ToDirectionInt()); + } + } + else if (projectile1.type == 834 || projectile1.type == 835) + { + if (projectile1.frame != 10) + { + vector2_55.Y += (float) (projectile1.height / 2); + origin13 = r.Size() * new Vector2(0.5f, 1f); + origin13.Y -= 4f; + origin13.X -= (float) (2 * spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally).ToDirectionInt()); + } + } + else if (projectile1.type == 715 || projectile1.type == 716 || projectile1.type == 717 || projectile1.type == 718) + { + r = target.Frame(3); + origin13 = r.Size() / 2f; + int num362 = (int) projectile1.ai[0]; + Vector2 origin14 = new Vector2((float) (r.Width / 2), 0.0f); + Vector2 vector2_57 = projectile1.Size / 2f; + Microsoft.Xna.Framework.Color celeb2Color = projectile1.GetCeleb2Color(); + celeb2Color.A = (byte) 127; + Microsoft.Xna.Framework.Color color90 = celeb2Color * 0.8f; + Microsoft.Xna.Framework.Rectangle rectangle = r; + rectangle.X += rectangle.Width * 2; + for (int index = projectile1.oldPos.Length - 1; index > 0; --index) + { + Vector2 vector2_58 = projectile1.oldPos[index] + vector2_57; + if (!(vector2_58 == vector2_57)) + { + Vector2 vector2_59 = projectile1.oldPos[index - 1] + vector2_57; + float num363 = projectile1.oldRot[index]; + Vector2 scale = new Vector2(Vector2.Distance(vector2_58, vector2_59) / (float) r.Width, 1f); + Microsoft.Xna.Framework.Color color91 = color90 * (float) (1.0 - (double) index / (double) projectile1.oldPos.Length); + switch (num362) + { + case 2: + Vector2 rotationVector2 = num363.ToRotationVector2(); + int num364 = index + projectile1.timeLeft; + if (num364 < 0) + num364 += 20 * (num364 / -20) + 20; + int num365 = num364 % 20; + float num366 = 0.0f; + scale *= 0.6f; + switch (num365) + { + case 1: + num366 = 1f; + break; + case 2: + num366 = 2f; + break; + case 3: + num366 = 3f; + break; + case 4: + num366 = 2f; + break; + case 5: + num366 = 1f; + break; + case 7: + num366 = -1f; + break; + case 8: + num366 = -2f; + break; + case 9: + num366 = -3f; + break; + case 10: + num366 = -2f; + break; + case 11: + num366 = -1f; + break; + } + vector2_58 += rotationVector2 * num366 * 4f; + break; + case 5: + scale *= 0.5f; + break; + } + Main.EntitySpriteDraw(target, vector2_58 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(rectangle), color91, num363, origin14, scale, spriteEffects, 0); + } + } + } + else if (projectile1.type == 663 || projectile1.type == 665 || projectile1.type == 667) + { + vector2_55 = projectile1.Bottom + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + origin13 = r.Size() * new Vector2(0.5f, 1f); + origin13.Y -= 2f; + origin13.Y -= 2f; + } + else if (projectile1.type == 691 || projectile1.type == 692 || projectile1.type == 693) + { + vector2_55 = projectile1.Bottom + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + origin13 = r.Size() * new Vector2(0.5f, 1f); + origin13.Y -= 2f; + origin13.Y -= 2f; + } + else if (projectile1.type == 677 || projectile1.type == 678 || projectile1.type == 679) + { + if (projectile1.spriteDirection == -1) + spriteEffects ^= SpriteEffects.FlipHorizontally | SpriteEffects.FlipVertically; + Texture2D texture2D = TextureAssets.Extra[83].Value; + if (projectile1.type == 678) + texture2D = TextureAssets.Extra[84].Value; + if (projectile1.type == 679) + texture2D = TextureAssets.Extra[85].Value; + Vector2 position = projectile1.Bottom + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Vector2 origin15 = texture2D.Size() * new Vector2(0.5f, 1f); + origin15.Y -= 2f; + Main.EntitySpriteDraw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), color88, 0.0f, origin15, 1f, spriteEffects & SpriteEffects.FlipHorizontally, 0); + origin13.X += (float) spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally).ToDirectionInt(); + ++vector2_55.Y; + vector2_55.Y += 2f; + if (projectile1.type == 678) + vector2_55.Y += -4f; + if (projectile1.type == 679) + { + vector2_55.Y -= 2f; + if (!spriteEffects.HasFlag((Enum) SpriteEffects.FlipVertically)) + origin13.Y += 4f; + else + origin13.Y -= 4f; + origin13.X += (float) (spriteEffects.HasFlag((Enum) SpriteEffects.FlipHorizontally).ToDirectionInt() * 4); + } + } + else if (projectile1.type == 602) + { + origin13.X = (float) (r.Width - 6); + --origin13.Y; + r.Height -= 2; + } + else if (projectile1.type == 589) + { + r = target.Frame(5, frameX: ((int) projectile1.ai[1])); + origin13 = r.Size() / 2f; + } + else if (projectile1.type == 590) + { + r = target.Frame(3, frameX: projectile1.frame); + origin13 = r.Size() / 2f; + } + else if (projectile1.type == 836) + { + r = target.Frame(4, frameX: projectile1.frame); + origin13 = r.Size() / 2f; + } + else if (projectile1.type == 650 || projectile1.type == 882 || projectile1.type == 888 || projectile1.type == 894 || projectile1.type == 895 || projectile1.type == 896 || projectile1.type == 898 || projectile1.type == 901) + origin13.Y -= 4f; + else if (projectile1.type == 623) + { + if ((double) projectile1.ai[0] == 2.0) + vector2_55 += Main.rand.NextVector2Circular(2f, 2f); + if (Main.CurrentDrawnEntityShader == 0) + color88.A /= (byte) 2; + } + else if (projectile1.type >= 625 && projectile1.type <= 628) + color88.A /= (byte) 2; + else if (projectile1.type == 644) + { + Microsoft.Xna.Framework.Color color92 = Main.hslToRgb(projectile1.ai[0], 1f, 0.5f).MultiplyRGBA(new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0)); + Main.EntitySpriteDraw(target, vector2_55, new Microsoft.Xna.Framework.Rectangle?(r), color92, projectile1.rotation, origin13, projectile1.scale * 2f, spriteEffects, 0); + Main.EntitySpriteDraw(target, vector2_55, new Microsoft.Xna.Framework.Rectangle?(r), color92, 0.0f, origin13, projectile1.scale * 2f, spriteEffects, 0); + if ((double) projectile1.ai[1] != -1.0 && (double) projectile1.Opacity > 0.300000011920929) + { + Vector2 v = Main.projectile[(int) projectile1.ai[1]].Center - projectile1.Center; + Vector2 scale = new Vector2(1f, v.Length() / (float) target.Height); + float rotation = v.ToRotation() + 1.570796f; + float num367 = MathHelper.Clamp(MathHelper.Distance(30f, projectile1.localAI[1]) / 20f, 0.0f, 1f); + if ((double) num367 > 0.0) + { + Main.EntitySpriteDraw(target, vector2_55 + v / 2f, new Microsoft.Xna.Framework.Rectangle?(r), color92 * num367, rotation, origin13, scale, spriteEffects, 0); + Main.EntitySpriteDraw(target, vector2_55 + v / 2f, new Microsoft.Xna.Framework.Rectangle?(r), color88 * num367, rotation, origin13, scale / 2f, spriteEffects, 0); + } + } + } + else if (projectile1.type == 658) + { + Microsoft.Xna.Framework.Color color93 = Main.hslToRgb(0.136f, 1f, 0.5f).MultiplyRGBA(new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0)); + Main.EntitySpriteDraw(target, vector2_55, new Microsoft.Xna.Framework.Rectangle?(r), color93, 0.0f, origin13, new Vector2(1f, 5f) * projectile1.scale * 2f, spriteEffects, 0); + } + Main.EntitySpriteDraw(target, vector2_55, new Microsoft.Xna.Framework.Rectangle?(r), color88, projectile1.rotation, origin13, projectile1.scale, spriteEffects, 0); + if (projectile1.type == 896) + { + Texture2D texture = TextureAssets.GlowMask[278].Value; + Microsoft.Xna.Framework.Color color94 = new Microsoft.Xna.Framework.Color(150, 150, 150, 100); + for (int index = 0; index < 2; ++index) + { + Vector2 position = vector2_55 + new Vector2((float) Main.rand.Next(-10, 11) * 0.1f, (float) Main.rand.Next(-10, 11) * 0.1f); + Main.EntitySpriteDraw(texture, position, new Microsoft.Xna.Framework.Rectangle?(r), color94, projectile1.rotation, origin13, projectile1.scale, spriteEffects, 0); + } + Main.EntitySpriteDraw(texture, vector2_55, new Microsoft.Xna.Framework.Rectangle?(r), Microsoft.Xna.Framework.Color.White, projectile1.rotation, origin13, projectile1.scale, spriteEffects, 0); + } + if (projectile1.type == 889) + { + Texture2D texture = TextureAssets.GlowMask[276].Value; + Microsoft.Xna.Framework.Color color95 = Microsoft.Xna.Framework.Color.White * (float) Main.mouseTextColor; + Main.EntitySpriteDraw(texture, vector2_55, new Microsoft.Xna.Framework.Rectangle?(r), color95, projectile1.rotation, origin13, projectile1.scale, spriteEffects, 0); + for (int index = 0; index < 4; ++index) + { + int num368 = 28; + int frameY = 7 + index; + float num369 = 100f; + bool flag = frameY == 8; + Microsoft.Xna.Framework.Rectangle rectangle = target.Frame(verticalFrames: Main.projFrames[projectile1.type], frameY: frameY); + Vector2 vector2_60 = vector2_55; + Vector2 vector2_61 = vector2_55; + SpriteEffects effects = SpriteEffects.None; + float num370 = Main.GlobalTimeWrappedHourly * 2f; + switch (index - 1) + { + case 0: + num370 += 1.570796f; + break; + case 1: + num370 += 3.141593f; + break; + case 2: + num370 += 4.712389f; + break; + } + float f = num370 * 3f; + float rotation8 = f; + Vector2 position18 = vector2_61 + f.ToRotationVector2() * (float) num368; + if ((double) projectile1.localAI[0] == (double) num369) + { + Main.EntitySpriteDraw(target, position18, new Microsoft.Xna.Framework.Rectangle?(rectangle), color88, rotation8, origin13, projectile1.scale, effects, 0); + if (flag) + Main.EntitySpriteDraw(texture, position18, new Microsoft.Xna.Framework.Rectangle?(rectangle), color95, rotation8, origin13, projectile1.scale, effects, 0); + } + else + { + Vector2 vector2_62 = new Vector2((float) num368, -16f) + projectile1.velocity * 1.5f; + float num371 = 4f; + float num372 = -0.35f; + switch (index) + { + case 1: + vector2_62.X *= -1f; + effects = SpriteEffects.FlipHorizontally; + num372 = 0.35f; + num371 = -3f; + break; + case 2: + vector2_62.Y = 16f; + num372 = 0.35f; + num371 = 2f; + break; + case 3: + vector2_62.X *= -1f; + vector2_62.Y = 16f; + effects = SpriteEffects.FlipHorizontally; + num372 = -0.35f; + num371 = -1f; + break; + } + Vector2 vector2_63 = vector2_62 + (Main.GlobalTimeWrappedHourly * num371).ToRotationVector2() * 4f; + Vector2 vector2_64 = vector2_60 + vector2_63; + float amount = projectile1.localAI[0] / num369; + Vector2 position19 = Vector2.Lerp(vector2_64, position18, amount); + float rotation9 = (double) amount > 0.5 ? f : num372; + Main.EntitySpriteDraw(target, position19, new Microsoft.Xna.Framework.Rectangle?(rectangle), color88, rotation9, origin13, projectile1.scale, effects, 0); + if (flag) + Main.EntitySpriteDraw(texture, position19, new Microsoft.Xna.Framework.Rectangle?(rectangle), color95, rotation9, origin13, projectile1.scale, effects, 0); + } + } + } + if (projectile1.type == 885) + { + for (int index = 0; index < 2; ++index) + { + SpriteEffects effects = SpriteEffects.None; + int num373 = -30; + if (index == 1) + { + num373 = 30; + effects = SpriteEffects.FlipHorizontally; + } + int num374 = (int) projectile1.localAI[0]; + if (projectile1.frame == 6) + num374 = 0; + else if (index == 1) + num374 = 2 - num374; + int frameY = num374 + 7; + Microsoft.Xna.Framework.Rectangle rectangle = target.Frame(verticalFrames: Main.projFrames[projectile1.type], frameY: frameY); + Vector2 vector2_65 = vector2_55 + new Vector2((float) num373, 0.0f); + Vector2 vector2_66 = (Main.GlobalTimeWrappedHourly * 2f).ToRotationVector2() * 4f + projectile1.velocity * -1.5f; + Vector2 vector2_67 = (Main.GlobalTimeWrappedHourly * 1f).ToRotationVector2() * 3f; + Vector2 position = index != 1 ? vector2_65 - vector2_66 : vector2_65 + (vector2_66 + vector2_67); + Main.EntitySpriteDraw(target, position, new Microsoft.Xna.Framework.Rectangle?(rectangle), color88, 0.0f, origin13, projectile1.scale, effects, 0); + } + } + if (projectile1.type == 535) + { + for (int i2 = 0; i2 < 1000; ++i2) + { + if (Main.projectile[i2].active && Main.projectile[i2].owner == projectile1.owner && Main.projectile[i2].type == 536) + this.DrawProj(i2); + } + } + else if (projectile1.type == 715 || projectile1.type == 716 || projectile1.type == 717 || projectile1.type == 718) + { + r.X += r.Width; + Microsoft.Xna.Framework.Color celeb2Color = projectile1.GetCeleb2Color(); + celeb2Color.A = (byte) 80; + Main.EntitySpriteDraw(target, vector2_55, new Microsoft.Xna.Framework.Rectangle?(r), celeb2Color, projectile1.rotation, origin13, projectile1.scale, spriteEffects, 0); + } + else if (projectile1.type == 702) + { + Texture2D texture2D = TextureAssets.Flames[5].Value; + Vector2 origin16 = texture2D.Size() / 2f; + Vector2 vector2_68 = new Vector2((float) (5 * projectile1.spriteDirection), -10f).RotatedBy((double) projectile1.rotation); + ulong seed = (ulong) ((double) projectile1.localAI[0] / 4.0); + for (int index = 0; index < 5; ++index) + { + Microsoft.Xna.Framework.Color color96 = new Microsoft.Xna.Framework.Color(100, 100, 100, 0); + float x20 = (float) Utils.RandomInt(ref seed, -10, 11) * 0.15f; + float y = (float) Utils.RandomInt(ref seed, -10, 1) * 0.35f; + Main.EntitySpriteDraw(texture2D, vector2_55 + vector2_68 + new Vector2(x20, y), new Microsoft.Xna.Framework.Rectangle?(), color96, projectile1.rotation, origin16, 1f, spriteEffects, 0); + } + } + else if (projectile1.type == 663 || projectile1.type == 665 || projectile1.type == 667) + { + Texture2D texture = TextureAssets.GlowMask[221].Value; + switch (projectile1.type) + { + case 665: + texture = TextureAssets.GlowMask[222].Value; + break; + case 667: + texture = TextureAssets.GlowMask[223].Value; + break; + } + float num375 = (float) ((double) ((float) ((double) projectile1.localAI[0] / 100.0 * 6.28318548202515)).ToRotationVector2().X * 1.0 + 1.0); + Microsoft.Xna.Framework.Color color97 = new Microsoft.Xna.Framework.Color(140, 100, 40, 0) * (float) ((double) num375 / 4.0 + 0.5) * 1f; + for (float num376 = 0.0f; (double) num376 < 4.0; ++num376) + Main.EntitySpriteDraw(texture, vector2_55 + (num376 * 1.570796f).ToRotationVector2() * num375, new Microsoft.Xna.Framework.Rectangle?(r), color97, projectile1.rotation, origin13, projectile1.scale, spriteEffects, 0); + } + else if (projectile1.type == 644) + Main.EntitySpriteDraw(target, vector2_55, new Microsoft.Xna.Framework.Rectangle?(r), color88, 0.0f, origin13, projectile1.scale, spriteEffects, 0); + else if (projectile1.type == 773 && (double) projectile1.velocity.Length() == 0.0) + { + Texture2D texture = TextureAssets.GlowMask[266].Value; + Microsoft.Xna.Framework.Color color98 = Microsoft.Xna.Framework.Color.White * (float) Main.mouseTextColor; + Vector2 position = vector2_55; + Microsoft.Xna.Framework.Rectangle? sourceRectangle = new Microsoft.Xna.Framework.Rectangle?(r); + Microsoft.Xna.Framework.Color color99 = color98; + double rotation = (double) projectile1.rotation; + Vector2 origin17 = origin13; + double scale = (double) projectile1.scale; + int num377 = (int) spriteEffects; + Main.EntitySpriteDraw(texture, position, sourceRectangle, color99, (float) rotation, origin17, (float) scale, (SpriteEffects) num377, 0); + } + else if (projectile1.type == 658) + Main.EntitySpriteDraw(target, vector2_55, new Microsoft.Xna.Framework.Rectangle?(r), color88, 0.0f, origin13, new Vector2(1f, 8f) * projectile1.scale, spriteEffects, 0); + else if (projectile1.type == 602) + { + Texture2D texture2D13 = TextureAssets.Extra[60].Value; + Microsoft.Xna.Framework.Color color100 = color88; + color100.A = (byte) 0; + color100 *= 0.3f; + origin13 = texture2D13.Size() / 2f; + Main.EntitySpriteDraw(texture2D13, vector2_55, new Microsoft.Xna.Framework.Rectangle?(), color100, projectile1.rotation - 1.570796f, origin13, projectile1.scale, spriteEffects, 0); + Texture2D texture2D14 = TextureAssets.Extra[59].Value; + color100 = color88; + color100.A = (byte) 0; + color100 *= 0.13f; + origin13 = texture2D14.Size() / 2f; + Main.EntitySpriteDraw(texture2D14, vector2_55, new Microsoft.Xna.Framework.Rectangle?(), color100, projectile1.rotation - 1.570796f, origin13, projectile1.scale * 0.9f, spriteEffects, 0); + } + else if (projectile1.type == 539) + Main.EntitySpriteDraw(TextureAssets.GlowMask[140].Value, vector2_55, new Microsoft.Xna.Framework.Rectangle?(r), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), projectile1.rotation, origin13, projectile1.scale, spriteEffects, 0); + else if (projectile1.type == 613) + Main.EntitySpriteDraw(TextureAssets.GlowMask[189].Value, vector2_55, new Microsoft.Xna.Framework.Rectangle?(r), new Microsoft.Xna.Framework.Color(128 - projectile1.alpha / 2, 128 - projectile1.alpha / 2, 128 - projectile1.alpha / 2, 0), projectile1.rotation, origin13, projectile1.scale, spriteEffects, 0); + else if (projectile1.type == 614) + Main.EntitySpriteDraw(TextureAssets.GlowMask[190].Value, vector2_55, new Microsoft.Xna.Framework.Rectangle?(r), new Microsoft.Xna.Framework.Color(128 - projectile1.alpha / 2, 128 - projectile1.alpha / 2, 128 - projectile1.alpha / 2, 0), projectile1.rotation, origin13, projectile1.scale, spriteEffects, 0); + else if (projectile1.type == 574) + Main.EntitySpriteDraw(TextureAssets.GlowMask[148].Value, vector2_55, new Microsoft.Xna.Framework.Rectangle?(r), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), projectile1.rotation, origin13, projectile1.scale, spriteEffects, 0); + else if (projectile1.type == 691 || projectile1.type == 692 || projectile1.type == 693) + { + Texture2D texture = TextureAssets.GlowMask[235].Value; + switch (projectile1.type) + { + case 692: + texture = TextureAssets.GlowMask[236].Value; + break; + case 693: + texture = TextureAssets.GlowMask[237].Value; + break; + } + Main.EntitySpriteDraw(texture, vector2_55, new Microsoft.Xna.Framework.Rectangle?(r), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue), projectile1.rotation, origin13, projectile1.scale, spriteEffects, 0); + } + else if (projectile1.type == 590) + Main.EntitySpriteDraw(TextureAssets.GlowMask[168].Value, vector2_55, new Microsoft.Xna.Framework.Rectangle?(r), new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue - projectile1.alpha / 2, (int) sbyte.MaxValue - projectile1.alpha / 2, (int) sbyte.MaxValue - projectile1.alpha / 2, 0), projectile1.rotation, origin13, projectile1.scale, spriteEffects, 0); + else if (projectile1.type == 623 || projectile1.type >= 625 && projectile1.type <= 628) + { + if ((double) Main.player[projectile1.owner].ghostFade != 0.0) + { + float num378 = Main.player[projectile1.owner].ghostFade * 5f; + for (float num379 = 0.0f; (double) num379 < 4.0; ++num379) + Main.EntitySpriteDraw(target, vector2_55 + Vector2.UnitY.RotatedBy((double) num379 * 6.28318548202515 / 4.0) * num378, new Microsoft.Xna.Framework.Rectangle?(r), color88 * 0.1f, projectile1.rotation, origin13, projectile1.scale, spriteEffects, 0); + } + if (projectile1.type != 623 || (double) projectile1.ai[0] != 2.0 || projectile1.frame < 14) + return; + this.DrawProj_StardustGuardianPunching(projectile1); + } + else if (projectile1.type == 643) + { + float num380 = (float) (Math.Cos(6.28318548202515 * ((double) projectile1.localAI[0] / 60.0)) + 3.0 + 3.0); + for (float num381 = 0.0f; (double) num381 < 4.0; ++num381) + Main.EntitySpriteDraw(target, vector2_55 + Vector2.UnitY.RotatedBy((double) num381 * 1.57079637050629) * num380, new Microsoft.Xna.Framework.Rectangle?(r), color88 * 0.2f, projectile1.rotation, origin13, projectile1.scale, spriteEffects, 0); + } + else + { + if (projectile1.type != 650) + return; + int num382 = (int) ((double) projectile1.localAI[0] / 6.28318548202515); + float f = (float) ((double) projectile1.localAI[0] % 6.28318548202515 - 3.14159274101257); + float num383 = (float) Math.IEEERemainder((double) projectile1.localAI[1], 1.0); + if ((double) num383 < 0.0) + ++num383; + int num384 = (int) Math.Floor((double) projectile1.localAI[1]); + float num385 = 5f; + float scale = (float) (1.0 + (double) num384 * 0.0199999995529652); + if ((double) num382 == 1.0) + num385 = 7f; + Vector2 vector2_69 = f.ToRotationVector2() * num383 * num385 * projectile1.scale; + Texture2D texture2D = TextureAssets.Extra[66].Value; + Main.EntitySpriteDraw(texture2D, vector2_55 + vector2_69, new Microsoft.Xna.Framework.Rectangle?(), color88, projectile1.rotation, texture2D.Size() / 2f, scale, SpriteEffects.None, 0); + } + } + else if (projectile1.type == 466) + { + Vector2 end1 = projectile1.position + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Texture2D tex = TextureAssets.Extra[33].Value; + projectile1.GetAlpha(color10); + Vector2 vector2 = new Vector2(projectile1.scale) / 2f; + for (int index3 = 0; index3 < 3; ++index3) + { + Vector2 scale; + if (index3 == 0) + { + scale = new Vector2(projectile1.scale) * 0.6f; + DelegateMethods.c_1 = new Microsoft.Xna.Framework.Color(115, 204, 219, 0) * 0.5f; + } + else if (index3 == 1) + { + scale = new Vector2(projectile1.scale) * 0.4f; + DelegateMethods.c_1 = new Microsoft.Xna.Framework.Color(113, 251, (int) byte.MaxValue, 0) * 0.5f; + } + else + { + scale = new Vector2(projectile1.scale) * 0.2f; + DelegateMethods.c_1 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * 0.5f; + } + DelegateMethods.f_1 = 1f; + for (int index4 = projectile1.oldPos.Length - 1; index4 > 0; --index4) + { + if (!(projectile1.oldPos[index4] == Vector2.Zero)) + { + Vector2 start = projectile1.oldPos[index4] + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Vector2 end2 = projectile1.oldPos[index4 - 1] + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Utils.DrawLaser(Main.spriteBatch, tex, start, end2, scale, new Utils.LaserLineFraming(DelegateMethods.LightningLaserDraw)); + } + } + if (projectile1.oldPos[0] != Vector2.Zero) + { + DelegateMethods.f_1 = 1f; + Vector2 start = projectile1.oldPos[0] + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Utils.DrawLaser(Main.spriteBatch, tex, start, end1, scale, new Utils.LaserLineFraming(DelegateMethods.LightningLaserDraw)); + } + } + } + else if (projectile1.type == 580) + { + Vector2 end3 = projectile1.position + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Texture2D tex = TextureAssets.Extra[33].Value; + projectile1.GetAlpha(color10); + Vector2 vector2 = new Vector2(projectile1.scale) / 2f; + for (int index5 = 0; index5 < 2; ++index5) + { + float num386 = (double) projectile1.localAI[1] == -1.0 || (double) projectile1.localAI[1] == 1.0 ? -0.2f : 0.0f; + Vector2 scale; + if (index5 == 0) + { + scale = new Vector2(projectile1.scale) * (0.5f + num386); + DelegateMethods.c_1 = new Microsoft.Xna.Framework.Color(115, 244, 219, 0) * 0.5f; + } + else + { + scale = new Vector2(projectile1.scale) * (0.3f + num386); + DelegateMethods.c_1 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * 0.5f; + } + DelegateMethods.f_1 = 1f; + for (int index6 = projectile1.oldPos.Length - 1; index6 > 0; --index6) + { + if (!(projectile1.oldPos[index6] == Vector2.Zero)) + { + Vector2 start = projectile1.oldPos[index6] + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Vector2 end4 = projectile1.oldPos[index6 - 1] + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Utils.DrawLaser(Main.spriteBatch, tex, start, end4, scale, new Utils.LaserLineFraming(DelegateMethods.LightningLaserDraw)); + } + } + if (projectile1.oldPos[0] != Vector2.Zero) + { + DelegateMethods.f_1 = 1f; + Vector2 start = projectile1.oldPos[0] + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Utils.DrawLaser(Main.spriteBatch, tex, start, end3, scale, new Utils.LaserLineFraming(DelegateMethods.LightningLaserDraw)); + } + } + } + else if (projectile1.type == 445) + { + if ((double) Main.player[Main.projectile[i].owner].gravDir == -1.0) + spriteEffects |= SpriteEffects.FlipVertically; + Vector2 position = projectile1.position + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f + Vector2.UnitY * projectile1.gfxOffY - Main.screenPosition; + Texture2D texture3 = TextureAssets.Projectile[projectile1.type].Value; + Microsoft.Xna.Framework.Color alpha = projectile1.GetAlpha(color10); + Vector2 vector2_70 = Main.player[projectile1.owner].RotatedRelativePoint(mountedCenter) + Vector2.UnitY * Main.player[projectile1.owner].gfxOffY; + Vector2 v = position + Main.screenPosition - vector2_70; + Vector2 vector2_71 = Vector2.Normalize(v); + float num387 = v.Length(); + float rotation = v.ToRotation() + 1.570796f; + float num388 = -5f; + float num389 = num388 + 30f; + Vector2 vector2_72 = new Vector2(2f, num387 - num389); + Vector2 vector2_73 = Vector2.Lerp(position + Main.screenPosition, vector2_70 + vector2_71 * num389, 0.5f); + Vector2 spinningpoint = -Vector2.UnitY.RotatedBy((double) projectile1.localAI[0] / 60.0 * 3.14159274101257); + Vector2[] vector2Array = new Vector2[4] + { + spinningpoint, + spinningpoint.RotatedBy(1.57079637050629), + spinningpoint.RotatedBy(3.14159274101257), + spinningpoint.RotatedBy(4.71238899230957) + }; + if ((double) num387 > (double) num389) + { + for (int index = 0; index < 2; ++index) + { + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + Microsoft.Xna.Framework.Color color101; + if (index % 2 == 0) + { + Microsoft.Xna.Framework.Color limeGreen = Microsoft.Xna.Framework.Color.LimeGreen; + limeGreen.A = (byte) 128; + color101 = limeGreen * 0.5f; + } + else + { + Microsoft.Xna.Framework.Color cornflowerBlue = Microsoft.Xna.Framework.Color.CornflowerBlue; + cornflowerBlue.A = (byte) 128; + color101 = cornflowerBlue * 0.5f; + } + Vector2 vector2_74 = new Vector2(vector2Array[index].X, 0.0f).RotatedBy((double) rotation) * 4f; + Main.EntitySpriteDraw(TextureAssets.MagicPixel.Value, vector2_73 - Main.screenPosition + vector2_74, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 1, 1)), color101, rotation, Vector2.One / 2f, new Vector2(2f, num387 - num389), spriteEffects, 0); + } + } + int type2 = Main.player[projectile1.owner].inventory[Main.player[projectile1.owner].selectedItem].type; + Main.instance.LoadItem(type2); + Texture2D texture4 = TextureAssets.Item[type2].Value; + Microsoft.Xna.Framework.Color color102 = Lighting.GetColor((int) vector2_70.X / 16, (int) vector2_70.Y / 16); + Main.EntitySpriteDraw(texture4, vector2_70 - Main.screenPosition + vector2_71 * num388, new Microsoft.Xna.Framework.Rectangle?(), color102, (float) ((double) projectile1.rotation + 1.57079637050629 + (spriteEffects == SpriteEffects.None || spriteEffects == SpriteEffects.FlipVertically ? 3.14159274101257 : 0.0)), new Vector2(spriteEffects == SpriteEffects.None || spriteEffects == SpriteEffects.FlipVertically ? 0.0f : (float) texture4.Width, (float) texture4.Height / 2f) + Vector2.UnitY * 1f, Main.player[projectile1.owner].inventory[Main.player[projectile1.owner].selectedItem].scale, spriteEffects, 0); + Main.EntitySpriteDraw(TextureAssets.GlowMask[39].Value, vector2_70 - Main.screenPosition + vector2_71 * num388, new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), (float) ((double) projectile1.rotation + 1.57079637050629 + (spriteEffects == SpriteEffects.None || spriteEffects == SpriteEffects.FlipVertically ? 3.14159274101257 : 0.0)), new Vector2(spriteEffects == SpriteEffects.None || spriteEffects == SpriteEffects.FlipVertically ? 0.0f : (float) texture4.Width, (float) texture4.Height / 2f) + Vector2.UnitY * 1f, Main.player[projectile1.owner].inventory[Main.player[projectile1.owner].selectedItem].scale, spriteEffects, 0); + if ((double) num387 > (double) num389) + { + for (int index = 2; index < 4; ++index) + { + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + Microsoft.Xna.Framework.Color color103; + if (index % 2 == 0) + { + Microsoft.Xna.Framework.Color limeGreen = Microsoft.Xna.Framework.Color.LimeGreen; + limeGreen.A = (byte) 128; + color103 = limeGreen * 0.5f; + } + else + { + Microsoft.Xna.Framework.Color cornflowerBlue = Microsoft.Xna.Framework.Color.CornflowerBlue; + cornflowerBlue.A = (byte) 128; + color103 = cornflowerBlue * 0.5f; + } + Vector2 vector2_75 = new Vector2(vector2Array[index].X, 0.0f).RotatedBy((double) rotation) * 4f; + Main.EntitySpriteDraw(TextureAssets.MagicPixel.Value, vector2_73 - Main.screenPosition + vector2_75, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 1, 1)), color103, rotation, Vector2.One / 2f, new Vector2(2f, num387 - num389), spriteEffects, 0); + } + } + float num390 = projectile1.localAI[0] / 60f; + if ((double) num390 > 0.5) + num390 = 1f - num390; + Main.EntitySpriteDraw(texture3, position, new Microsoft.Xna.Framework.Rectangle?(), alpha * num390 * 2f, projectile1.rotation, new Vector2((float) texture3.Width, (float) texture3.Height) / 2f, projectile1.scale, spriteEffects, 0); + Main.EntitySpriteDraw(TextureAssets.GlowMask[40].Value, position, new Microsoft.Xna.Framework.Rectangle?(), alpha * (0.5f - num390) * 2f, projectile1.rotation, new Vector2((float) texture3.Width, (float) texture3.Height) / 2f, projectile1.scale, spriteEffects, 0); + } + else if (projectile1.type >= 393 && projectile1.type <= 395 || projectile1.type == 398 || projectile1.type == 423 || projectile1.type == 450) + { + Texture2D texture5 = TextureAssets.Projectile[projectile1.type].Value; + int height = TextureAssets.Projectile[projectile1.type].Height() / Main.projFrames[projectile1.type]; + int y = height * projectile1.frame; + Main.EntitySpriteDraw(texture5, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY - 2f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, texture5.Width, height)), projectile1.GetAlpha(color10), projectile1.rotation, new Vector2((float) texture5.Width / 2f, (float) height / 2f), projectile1.scale, spriteEffects, 0); + if (projectile1.type == 398) + { + Texture2D texture6 = TextureAssets.MiniMinotaur.Value; + Main.EntitySpriteDraw(texture6, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY - 2f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, texture6.Width, height)), new Microsoft.Xna.Framework.Color(250, 250, 250, projectile1.alpha), projectile1.rotation, new Vector2((float) texture6.Width / 2f, (float) height / 2f), projectile1.scale, spriteEffects, 0); + } + if (projectile1.type != 423) + return; + Texture2D texture7 = TextureAssets.GlowMask[0].Value; + Main.EntitySpriteDraw(texture7, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY - 2f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, texture7.Width, height)), new Microsoft.Xna.Framework.Color(250, 250, 250, projectile1.alpha), projectile1.rotation, new Vector2((float) texture7.Width / 2f, (float) height / 2f), projectile1.scale, spriteEffects, 0); + } + else if (projectile1.type == 385) + { + Texture2D texture = TextureAssets.Projectile[projectile1.type].Value; + int height = texture.Height / Main.projFrames[projectile1.type]; + int y = height * projectile1.frame; + int num391 = 8; + int num392 = 2; + float num393 = 0.4f; + for (int index = 1; index < num391; index += num392) + { + ref Vector2 local = ref projectile1.oldPos[index]; + Microsoft.Xna.Framework.Color newColor = color10; + Microsoft.Xna.Framework.Color color104 = projectile1.GetAlpha(newColor) * ((float) (num391 - index) / 15f); + Microsoft.Xna.Framework.Color alpha = projectile1.GetAlpha(color10); + Vector2 vector2 = projectile1.oldPos[index] - Main.screenPosition + new Vector2(x17 + (float) num209, (float) (projectile1.height / 2) + projectile1.gfxOffY); + Main.EntitySpriteDraw(texture, projectile1.oldPos[index] + new Vector2((float) projectile1.width, (float) projectile1.height) / 2f - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, texture.Width, height)), Microsoft.Xna.Framework.Color.Lerp(alpha, color104, 0.3f), projectile1.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), MathHelper.Lerp(projectile1.scale, num393, (float) index / 15f), spriteEffects, 0); + } + Main.EntitySpriteDraw(texture, projectile1.Center - Main.screenPosition + new Vector2(0.0f, projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, texture.Width, height)), projectile1.GetAlpha(color10), projectile1.rotation, new Vector2((float) texture.Width / 2f, (float) height / 2f), projectile1.scale, spriteEffects, 0); + } + else if (projectile1.type == 388) + { + Texture2D texture = TextureAssets.Projectile[projectile1.type].Value; + int height = texture.Height / Main.projFrames[projectile1.type]; + int y = height * projectile1.frame; + int num394; + int num395; + if ((double) projectile1.ai[0] == 2.0) + { + num394 = 10; + num395 = 1; + } + else + { + num395 = 2; + num394 = 5; + } + for (int index = 1; index < num394; index += num395) + { + ref Vector2 local = ref projectile1.oldPos[index]; + Microsoft.Xna.Framework.Color newColor = color10; + Microsoft.Xna.Framework.Color color105 = projectile1.GetAlpha(newColor) * ((float) (num394 - index) / 15f); + Vector2 position = projectile1.oldPos[index] - Main.screenPosition + new Vector2(x17 + (float) num209, (float) (projectile1.height / 2) + projectile1.gfxOffY); + Main.EntitySpriteDraw(texture, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, texture.Width, height)), color105, projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale, spriteEffects, 0); + } + Main.EntitySpriteDraw(texture, projectile1.position - Main.screenPosition + new Vector2(x17 + (float) num209, (float) (projectile1.height / 2) + projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, texture.Width, height)), projectile1.GetAlpha(color10), projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale, spriteEffects, 0); + } + else if (Main.projFrames[projectile1.type] > 1) + { + int height = TextureAssets.Projectile[projectile1.type].Height() / Main.projFrames[projectile1.type]; + int y = height * projectile1.frame; + if (projectile1.type == 111) + { + Microsoft.Xna.Framework.Color oldColor = new Microsoft.Xna.Framework.Color((int) Main.player[projectile1.owner].shirtColor.R, (int) Main.player[projectile1.owner].shirtColor.G, (int) Main.player[projectile1.owner].shirtColor.B); + Microsoft.Xna.Framework.Color color106 = Lighting.GetColor((int) ((double) projectile1.position.X + (double) projectile1.width * 0.5) / 16, (int) (((double) projectile1.position.Y + (double) projectile1.height * 0.5) / 16.0), oldColor); + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, TextureAssets.Projectile[projectile1.type].Width(), height)), projectile1.GetAlpha(color106), projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale, spriteEffects, 0); + } + else + { + Microsoft.Xna.Framework.Color alpha = projectile1.GetAlpha(color10); + if (projectile1.type == 211 && Main.CurrentDrawnEntityShader != 0) + alpha.A = (byte) 127; + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, TextureAssets.Projectile[projectile1.type].Width(), height - 1)), alpha, projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale, spriteEffects, 0); + if (projectile1.type == 335) + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, TextureAssets.Projectile[projectile1.type].Width(), height - 1)), new Microsoft.Xna.Framework.Color(100, 100, 100, 0), projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale, spriteEffects, 0); + if (projectile1.type == 897 || projectile1.type == 899) + { + int index = 279; + if (projectile1.type == 899) + index = 281; + Main.EntitySpriteDraw(TextureAssets.GlowMask[index].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, TextureAssets.Projectile[projectile1.type].Width(), height - 1)), Microsoft.Xna.Framework.Color.White, projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale, spriteEffects, 0); + } + if (projectile1.type == 891) + { + float num396 = Utils.WrappedLerp(0.6f, 1f, (float) ((int) Main.timeForVisualEffects % 100) / 100f); + Microsoft.Xna.Framework.Color color107 = new Microsoft.Xna.Framework.Color(num396, num396, num396, 150f); + Main.EntitySpriteDraw(TextureAssets.GlowMask[277].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, TextureAssets.Projectile[projectile1.type].Width(), height - 1)), color107, projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale, spriteEffects, 0); + } + if (projectile1.type == 595) + { + Player player = Main.player[projectile1.owner]; + if (player.active && player.body == 208) + { + for (float amount = 0.0f; (double) amount <= 1.0; amount += 0.2f) + { + Microsoft.Xna.Framework.Color underShirtColor = player.underShirtColor; + underShirtColor.A = (byte) (120.0 * (1.0 - (double) amount * 0.5)); + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, TextureAssets.Projectile[projectile1.type].Width(), height - 1)), underShirtColor, projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale * MathHelper.Lerp(0.8f, 1.3f, amount), spriteEffects, 0); + } + } + } + if (projectile1.type == 387) + Main.EntitySpriteDraw(TextureAssets.EyeLaserSmall.Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, TextureAssets.Projectile[projectile1.type].Width(), height)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0), projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale, spriteEffects, 0); + if (projectile1.type != 525) + return; + int num397 = Main.TryInteractingWithMoneyTrough(projectile1); + if (num397 == 0) + return; + int averageTileLighting = ((int) color10.R + (int) color10.G + (int) color10.B) / 3; + if (averageTileLighting <= 10) + return; + Microsoft.Xna.Framework.Color selectionGlowColor = Colors.GetSelectionGlowColor(num397 == 2, averageTileLighting); + Main.EntitySpriteDraw(TextureAssets.Extra[94].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y, TextureAssets.Projectile[projectile1.type].Width(), height - 1)), selectionGlowColor, 0.0f, new Vector2(x17, (float) (projectile1.height / 2 + num208)), 1f, spriteEffects, 0); + } + } + else if (projectile1.type == 383 || projectile1.type == 399) + { + Texture2D texture = TextureAssets.Projectile[projectile1.type].Value; + Main.EntitySpriteDraw(texture, projectile1.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(), projectile1.GetAlpha(color10), projectile1.rotation, new Vector2((float) texture.Width, (float) texture.Height) / 2f, projectile1.scale, spriteEffects, 0); + } + else if (projectile1.type == 157 || projectile1.type == 378) + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + (float) (projectile1.width / 2), projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[projectile1.type].Width(), TextureAssets.Projectile[projectile1.type].Height())), projectile1.GetAlpha(color10), projectile1.rotation, new Vector2((float) (TextureAssets.Projectile[projectile1.type].Width() / 2), (float) (TextureAssets.Projectile[projectile1.type].Height() / 2)), projectile1.scale, spriteEffects, 0); + else if (projectile1.type == 306) + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + (float) (projectile1.width / 2), projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[projectile1.type].Width(), TextureAssets.Projectile[projectile1.type].Height())), projectile1.GetAlpha(color10), projectile1.rotation, new Vector2((float) (TextureAssets.Projectile[projectile1.type].Width() / 2), (float) (TextureAssets.Projectile[projectile1.type].Height() / 2)), projectile1.scale, spriteEffects, 0); + else if (projectile1.type == 256) + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + (float) (projectile1.width / 2), projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[projectile1.type].Width(), TextureAssets.Projectile[projectile1.type].Height())), projectile1.GetAlpha(color10), projectile1.rotation, new Vector2((float) (TextureAssets.Projectile[projectile1.type].Width() / 2), (float) (TextureAssets.Projectile[projectile1.type].Height() / 2)), projectile1.scale, spriteEffects, 0); + else if (projectile1.aiStyle == 27) + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + (float) (projectile1.width / 2), projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[projectile1.type].Width(), TextureAssets.Projectile[projectile1.type].Height())), projectile1.GetAlpha(color10), projectile1.rotation, new Vector2((float) TextureAssets.Projectile[projectile1.type].Width(), 0.0f), projectile1.scale, spriteEffects, 0); + else if (projectile1.aiStyle == 19) + { + SpriteEffects effects = SpriteEffects.None; + float rotation = (float) Math.Atan2((double) projectile1.velocity.Y, (double) projectile1.velocity.X) + 2.355f; + Vector2 origin = Vector2.Zero; + if (Main.player[projectile1.owner].direction > 0) + { + effects = SpriteEffects.FlipHorizontally; + origin.X = (float) TextureAssets.Projectile[projectile1.type].Width(); + rotation -= 1.570796f; + } + if ((double) Main.player[projectile1.owner].gravDir == -1.0) + { + if (projectile1.direction == 1) + { + effects = SpriteEffects.FlipHorizontally | SpriteEffects.FlipVertically; + origin = new Vector2((float) TextureAssets.Projectile[projectile1.type].Width(), (float) TextureAssets.Projectile[projectile1.type].Height()); + rotation -= 1.570796f; + } + else if (projectile1.direction == -1) + { + effects = SpriteEffects.FlipVertically; + origin = new Vector2(0.0f, (float) TextureAssets.Projectile[projectile1.type].Height()); + rotation += 1.570796f; + } + } + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + (float) (projectile1.width / 2), projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[projectile1.type].Width(), TextureAssets.Projectile[projectile1.type].Height())), projectile1.GetAlpha(color10), rotation, origin, projectile1.scale, effects, 0); + } + else if (projectile1.type == 451) + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, projectile1.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(), projectile1.GetAlpha(color10), projectile1.rotation, new Vector2((float) TextureAssets.Projectile[projectile1.type].Width(), 0.0f), projectile1.scale, spriteEffects, 0); + else if (projectile1.type == 434) + { + Vector2 vector2_76 = new Vector2(projectile1.ai[0], projectile1.ai[1]); + Vector2 v = projectile1.position - vector2_76; + float y = (float) Math.Sqrt((double) v.X * (double) v.X + (double) v.Y * (double) v.Y); + Vector2 vector2_77 = new Vector2(4f, y); + float rotation = v.ToRotation() + 1.570796f; + Vector2 vector2_78 = Vector2.Lerp(projectile1.position, vector2_76, 0.5f); + Microsoft.Xna.Framework.Color red = Microsoft.Xna.Framework.Color.Red; + red.A = (byte) 0; + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + Microsoft.Xna.Framework.Color color108 = red * projectile1.localAI[0]; + Microsoft.Xna.Framework.Color color109 = white * projectile1.localAI[0]; + float num398 = (float) Math.Sqrt((double) (projectile1.damage / 50)); + Main.EntitySpriteDraw(TextureAssets.MagicPixel.Value, vector2_78 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 1, 1)), color108, rotation, Vector2.One / 2f, new Vector2(2f * num398, y + 8f), spriteEffects, 0); + Main.EntitySpriteDraw(TextureAssets.MagicPixel.Value, vector2_78 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 1, 1)), color108, rotation, Vector2.One / 2f, new Vector2(4f * num398, y), spriteEffects, 0); + Main.EntitySpriteDraw(TextureAssets.MagicPixel.Value, vector2_78 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 1, 1)), color109, rotation, Vector2.One / 2f, new Vector2(2f * num398, y), spriteEffects, 0); + } + else + { + if (projectile1.type == 94 && (double) projectile1.ai[1] > 6.0) + { + for (int index = 0; index < 10; ++index) + { + Microsoft.Xna.Framework.Color alpha = projectile1.GetAlpha(color10); + float num399 = (float) (9 - index) / 9f; + alpha.R = (byte) ((double) alpha.R * (double) num399); + alpha.G = (byte) ((double) alpha.G * (double) num399); + alpha.B = (byte) ((double) alpha.B * (double) num399); + alpha.A = (byte) ((double) alpha.A * (double) num399); + float num400 = (float) (9 - index) / 9f; + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.oldPos[index].X - Main.screenPosition.X + x17 + (float) num209, projectile1.oldPos[index].Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[projectile1.type].Width(), TextureAssets.Projectile[projectile1.type].Height())), alpha, projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), num400 * projectile1.scale, spriteEffects, 0); + } + } + if (projectile1.type == 301) + { + for (int index = 0; index < 10; ++index) + { + Microsoft.Xna.Framework.Color alpha = projectile1.GetAlpha(color10); + float num401 = (float) (9 - index) / 9f; + alpha.R = (byte) ((double) alpha.R * (double) num401); + alpha.G = (byte) ((double) alpha.G * (double) num401); + alpha.B = (byte) ((double) alpha.B * (double) num401); + alpha.A = (byte) ((double) alpha.A * (double) num401); + float num402 = (float) (9 - index) / 9f; + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.oldPos[index].X - Main.screenPosition.X + x17 + (float) num209, projectile1.oldPos[index].Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[projectile1.type].Width(), TextureAssets.Projectile[projectile1.type].Height())), alpha, projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), num402 * projectile1.scale, spriteEffects, 0); + } + } + if (projectile1.type == 323 && projectile1.alpha == 0) + { + for (int index = 1; index < 8; ++index) + { + float num403 = projectile1.velocity.X * (float) index; + float num404 = projectile1.velocity.Y * (float) index; + Microsoft.Xna.Framework.Color alpha = projectile1.GetAlpha(color10); + float num405 = 0.0f; + if (index == 1) + num405 = 0.7f; + if (index == 2) + num405 = 0.6f; + if (index == 3) + num405 = 0.5f; + if (index == 4) + num405 = 0.4f; + if (index == 5) + num405 = 0.3f; + if (index == 6) + num405 = 0.2f; + if (index == 7) + num405 = 0.1f; + alpha.R = (byte) ((double) alpha.R * (double) num405); + alpha.G = (byte) ((double) alpha.G * (double) num405); + alpha.B = (byte) ((double) alpha.B * (double) num405); + alpha.A = (byte) ((double) alpha.A * (double) num405); + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209 - num403, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY - num404), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[projectile1.type].Width(), TextureAssets.Projectile[projectile1.type].Height())), alpha, projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), num405 + 0.2f, spriteEffects, 0); + } + } + if (projectile1.type == 117 && (double) projectile1.ai[0] > 3.0) + { + for (int index = 1; index < 5; ++index) + { + float num406 = projectile1.velocity.X * (float) index; + float num407 = projectile1.velocity.Y * (float) index; + Microsoft.Xna.Framework.Color alpha = projectile1.GetAlpha(color10); + float num408 = 0.0f; + if (index == 1) + num408 = 0.4f; + if (index == 2) + num408 = 0.3f; + if (index == 3) + num408 = 0.2f; + if (index == 4) + num408 = 0.1f; + alpha.R = (byte) ((double) alpha.R * (double) num408); + alpha.G = (byte) ((double) alpha.G * (double) num408); + alpha.B = (byte) ((double) alpha.B * (double) num408); + alpha.A = (byte) ((double) alpha.A * (double) num408); + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209 - num406, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY - num407), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[projectile1.type].Width(), TextureAssets.Projectile[projectile1.type].Height())), alpha, projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale, spriteEffects, 0); + } + } + if (projectile1.bobber) + { + if ((double) projectile1.ai[1] > 0.0 && (double) projectile1.ai[1] < 5045.0 && (double) projectile1.ai[0] == 1.0) + { + int i3 = (int) projectile1.ai[1]; + Vector2 center = projectile1.Center; + float num409 = projectile1.rotation; + Vector2 vector2 = center; + float num410 = polePosX - vector2.X; + float num411 = polePosY - vector2.Y; + num409 = (float) Math.Atan2((double) num411, (double) num410); + float rotation; + if ((double) projectile1.velocity.X > 0.0) + { + spriteEffects = SpriteEffects.None; + rotation = (float) Math.Atan2((double) num411, (double) num410) + 0.785f; + if ((double) projectile1.ai[1] == 2342.0) + rotation -= 0.785f; + } + else + { + spriteEffects = SpriteEffects.FlipHorizontally; + rotation = (float) Math.Atan2(-(double) num411, -(double) num410) - 0.785f; + if ((double) projectile1.ai[1] == 2342.0) + rotation += 0.785f; + } + Main.instance.LoadItem(i3); + Main.EntitySpriteDraw(TextureAssets.Item[i3].Value, new Vector2(center.X - Main.screenPosition.X, center.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Item[i3].Width(), TextureAssets.Item[i3].Height())), color10, rotation, new Vector2((float) (TextureAssets.Item[i3].Width() / 2), (float) (TextureAssets.Item[i3].Height() / 2)), projectile1.scale, spriteEffects, 0); + } + else if ((double) projectile1.ai[0] <= 1.0) + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[projectile1.type].Width(), TextureAssets.Projectile[projectile1.type].Height())), projectile1.GetAlpha(color10), projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale, spriteEffects, 0); + } + else + { + if (projectile1.ownerHitCheck && (double) Main.player[projectile1.owner].gravDir == -1.0) + { + if (Main.player[projectile1.owner].direction == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + else if (Main.player[projectile1.owner].direction == -1) + spriteEffects = SpriteEffects.None; + } + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[projectile1.type].Width(), TextureAssets.Projectile[projectile1.type].Height())), projectile1.GetAlpha(color10), projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale, spriteEffects, 0); + if (projectile1.glowMask != (short) -1) + Main.EntitySpriteDraw(TextureAssets.GlowMask[(int) projectile1.glowMask].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[projectile1.type].Width(), TextureAssets.Projectile[projectile1.type].Height())), new Microsoft.Xna.Framework.Color(250, 250, 250, projectile1.alpha), projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale, spriteEffects, 0); + if (projectile1.type == 473) + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[projectile1.type].Width(), TextureAssets.Projectile[projectile1.type].Height())), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, 0, 0), projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale, spriteEffects, 0); + if (projectile1.type == 312) + { + ulong tileFrameSeed = Main.TileFrameSeed; + for (int index = 0; index < 4; ++index) + { + Vector2 vector2 = new Vector2((float) Utils.RandomInt(ref tileFrameSeed, -2, 3), (float) Utils.RandomInt(ref tileFrameSeed, -2, 3)); + Main.EntitySpriteDraw(TextureAssets.GlowMask[(int) projectile1.glowMask].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[projectile1.type].Width(), TextureAssets.Projectile[projectile1.type].Height())), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue) * 0.2f, projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale, spriteEffects, 0); + } + } + } + if (projectile1.type == 106) + Main.EntitySpriteDraw(TextureAssets.LightDisc.Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[projectile1.type].Width(), TextureAssets.Projectile[projectile1.type].Height())), new Microsoft.Xna.Framework.Color(200, 200, 200, 0), projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale, spriteEffects, 0); + if (projectile1.type >= 326 && projectile1.type <= 328) + { + ulong tileFrameSeed = Main.TileFrameSeed; + for (int index = 0; index < 4; ++index) + { + Vector2 vector2 = new Vector2((float) Utils.RandomInt(ref tileFrameSeed, -2, 3), (float) Utils.RandomInt(ref tileFrameSeed, -2, 3)); + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2)) + vector2 - projectile1.velocity * 0.25f * (float) index, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[projectile1.type].Width(), TextureAssets.Projectile[projectile1.type].Height())), new Microsoft.Xna.Framework.Color(120, 120, 120, 60) * 1f, projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale - (float) index * 0.2f, spriteEffects, 0); + } + } + if (projectile1.type == 554 || projectile1.type == 603) + { + for (int index = 1; index < 5; ++index) + { + float num412 = (float) ((double) projectile1.velocity.X * (double) index * 0.5); + float num413 = (float) ((double) projectile1.velocity.Y * (double) index * 0.5); + Microsoft.Xna.Framework.Color alpha = projectile1.GetAlpha(color10); + float num414 = 0.0f; + if (index == 1) + num414 = 0.4f; + if (index == 2) + num414 = 0.3f; + if (index == 3) + num414 = 0.2f; + if (index == 4) + num414 = 0.1f; + alpha.R = (byte) ((double) alpha.R * (double) num414); + alpha.G = (byte) ((double) alpha.G * (double) num414); + alpha.B = (byte) ((double) alpha.B * (double) num414); + alpha.A = (byte) ((double) alpha.A * (double) num414); + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209 - num412, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY - num413), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[projectile1.type].Width(), TextureAssets.Projectile[projectile1.type].Height())), alpha, projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale, spriteEffects, 0); + } + } + else if (projectile1.type == 604) + { + int num415 = (int) projectile1.ai[1] + 1; + if (num415 > 7) + num415 = 7; + for (int index = 1; index < num415; ++index) + { + float num416 = (float) ((double) projectile1.velocity.X * (double) index * 1.5); + float num417 = (float) ((double) projectile1.velocity.Y * (double) index * 1.5); + Microsoft.Xna.Framework.Color alpha = projectile1.GetAlpha(color10); + float num418 = 0.0f; + if (index == 1) + num418 = 0.4f; + if (index == 2) + num418 = 0.3f; + if (index == 3) + num418 = 0.2f; + if (index == 4) + num418 = 0.1f; + float num419 = (float) (0.400000005960464 - (double) index * 0.0599999986588955) * (float) (1.0 - (double) projectile1.alpha / (double) byte.MaxValue); + alpha.R = (byte) ((double) alpha.R * (double) num419); + alpha.G = (byte) ((double) alpha.G * (double) num419); + alpha.B = (byte) ((double) alpha.B * (double) num419); + alpha.A = (byte) ((double) alpha.A * (double) num419 / 2.0); + float scale = projectile1.scale - (float) index * 0.1f; + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209 - num416, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY - num417), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[projectile1.type].Width(), TextureAssets.Projectile[projectile1.type].Height())), alpha, projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), scale, spriteEffects, 0); + } + } + else + { + if (projectile1.type != 553) + return; + for (int index = 1; index < 5; ++index) + { + float num420 = (float) ((double) projectile1.velocity.X * (double) index * 0.400000005960464); + float num421 = (float) ((double) projectile1.velocity.Y * (double) index * 0.400000005960464); + Microsoft.Xna.Framework.Color alpha = projectile1.GetAlpha(color10); + float num422 = 0.0f; + if (index == 1) + num422 = 0.4f; + if (index == 2) + num422 = 0.3f; + if (index == 3) + num422 = 0.2f; + if (index == 4) + num422 = 0.1f; + alpha.R = (byte) ((double) alpha.R * (double) num422); + alpha.G = (byte) ((double) alpha.G * (double) num422); + alpha.B = (byte) ((double) alpha.B * (double) num422); + alpha.A = (byte) ((double) alpha.A * (double) num422); + Main.EntitySpriteDraw(TextureAssets.Projectile[projectile1.type].Value, new Vector2(projectile1.position.X - Main.screenPosition.X + x17 + (float) num209 - num420, projectile1.position.Y - Main.screenPosition.Y + (float) (projectile1.height / 2) + projectile1.gfxOffY - num421), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[projectile1.type].Width(), TextureAssets.Projectile[projectile1.type].Height())), alpha, projectile1.rotation, new Vector2(x17, (float) (projectile1.height / 2 + num208)), projectile1.scale, spriteEffects, 0); + } + } + } + } + } + } + } + } + + private static void DrawPrettyStarSparkle( + Projectile proj, + SpriteEffects dir, + Vector2 drawpos, + Microsoft.Xna.Framework.Color drawColor, + Microsoft.Xna.Framework.Color shineColor) + { + Texture2D texture2D = TextureAssets.Extra[98].Value; + Microsoft.Xna.Framework.Color color1 = shineColor * proj.Opacity * 0.5f; + color1.A = (byte) 0; + Vector2 origin = texture2D.Size() / 2f; + Microsoft.Xna.Framework.Color color2 = drawColor * 0.5f; + float num = Utils.GetLerpValue(15f, 30f, proj.localAI[0], true) * Utils.GetLerpValue(45f, 30f, proj.localAI[0], true); + Vector2 scale1 = new Vector2(0.5f, 5f) * num; + Vector2 scale2 = new Vector2(0.5f, 2f) * num; + Microsoft.Xna.Framework.Color color3 = color1 * num; + Microsoft.Xna.Framework.Color color4 = color2 * num; + Vector2 position = drawpos; + Main.EntitySpriteDraw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), color3, 1.570796f, origin, scale1, dir, 0); + Main.EntitySpriteDraw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), color3, 0.0f, origin, scale2, dir, 0); + Main.EntitySpriteDraw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), color4, 1.570796f, origin, scale1 * 0.6f, dir, 0); + Main.EntitySpriteDraw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), color4, 0.0f, origin, scale2 * 0.6f, dir, 0); + } + + private static void DrawProj_FlailChains(Projectile proj, Vector2 mountedCenter) + { + Player player = Main.player[proj.owner]; + Vector2 playerArmPosition = Main.GetPlayerArmPosition(proj); + Asset asset1 = (Asset) null; + Microsoft.Xna.Framework.Rectangle? sourceRectangle = new Microsoft.Xna.Framework.Rectangle?(); + float num1 = 0.0f; + Asset asset2; + switch (proj.type) + { + case 25: + asset2 = TextureAssets.Chain2; + break; + case 35: + asset2 = TextureAssets.Chain6; + break; + case 63: + asset2 = TextureAssets.Chain7; + break; + case 154: + asset2 = TextureAssets.Chain13; + break; + case 247: + asset2 = TextureAssets.Chain19; + break; + case 757: + asset2 = TextureAssets.Extra[99]; + sourceRectangle = new Microsoft.Xna.Framework.Rectangle?(asset2.Frame(verticalFrames: 6)); + num1 = -2f; + break; + case 947: + asset2 = TextureAssets.Chain41; + break; + case 948: + asset2 = TextureAssets.Chain43; + break; + default: + asset2 = TextureAssets.Chain3; + break; + } + Vector2 origin = sourceRectangle.HasValue ? sourceRectangle.Value.Size() / 2f : asset2.Size() / 2f; + Vector2 center = proj.Center; + Vector2 v1 = playerArmPosition.MoveTowards(center, 4f) - center; + Vector2 v2 = v1.SafeNormalize(Vector2.Zero); + float num2 = (sourceRectangle.HasValue ? (float) sourceRectangle.Value.Height : (float) asset2.Height()) + num1; + float rotation = v2.ToRotation() + 1.570796f; + int num3 = 0; + float num4 = v1.Length() + num2 / 2f; + int num5 = 0; + for (; (double) num4 > 0.0; num4 -= num2) + { + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) center.X / 16, (int) ((double) center.Y / 16.0)); + switch (proj.type) + { + case 757: + sourceRectangle = new Microsoft.Xna.Framework.Rectangle?(asset2.Frame(verticalFrames: 6, frameY: (num3 % 6))); + break; + case 948: + if (num5 >= 6) + asset2 = asset1 = TextureAssets.Chain41; + else if (num5 >= 4) + { + asset2 = asset1 = TextureAssets.Chain42; + byte num6 = 140; + if ((int) color.R < (int) num6) + color.R = num6; + if ((int) color.G < (int) num6) + color.G = num6; + if ((int) color.B < (int) num6) + color.B = num6; + } + else + color = Microsoft.Xna.Framework.Color.White; + ++num5; + break; + } + Main.spriteBatch.Draw(asset2.Value, center - Main.screenPosition, sourceRectangle, color, rotation, origin, 1f, SpriteEffects.None, 0.0f); + center += v2 * num2; + ++num3; + } + } + + private static void DrawProj_FlailChains_Old(Projectile proj, Vector2 mountedCenter) + { + Vector2 vector2 = new Vector2(proj.position.X + (float) proj.width * 0.5f, proj.position.Y + (float) proj.height * 0.5f); + float num1 = mountedCenter.X - vector2.X; + float num2 = mountedCenter.Y - vector2.Y; + float rotation = (float) Math.Atan2((double) num2, (double) num1) - 1.57f; + if (proj.alpha == 0) + { + int num3 = -1; + if ((double) proj.position.X + (double) (proj.width / 2) < (double) mountedCenter.X) + num3 = 1; + Main.player[proj.owner].itemRotation = Main.player[proj.owner].direction != 1 ? (float) Math.Atan2((double) num2 * (double) num3, (double) num1 * (double) num3) : (float) Math.Atan2((double) num2 * (double) num3, (double) num1 * (double) num3); + } + bool flag = true; + int num4 = 0; + int num5 = 25; + if (proj.type == 757) + num5 = 12; + while (flag) + { + float f = (float) Math.Sqrt((double) num1 * (double) num1 + (double) num2 * (double) num2); + if ((double) f < (double) num5) + flag = false; + else if (float.IsNaN(f)) + { + flag = false; + } + else + { + float num6 = proj.type == 154 || proj.type == 247 ? 18f / f : (proj.type != 757 ? 12f / f : 16f / f); + float num7 = num1 * num6; + float num8 = num2 * num6; + vector2.X += num7; + vector2.Y += num8; + num1 = mountedCenter.X - vector2.X; + num2 = mountedCenter.Y - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + if (proj.type == 25) + Main.EntitySpriteDraw(TextureAssets.Chain2.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain2.Width(), TextureAssets.Chain2.Height())), color, rotation, new Vector2((float) TextureAssets.Chain2.Width() * 0.5f, (float) TextureAssets.Chain2.Height() * 0.5f), 1f, SpriteEffects.None, 0); + else if (proj.type == 35) + Main.EntitySpriteDraw(TextureAssets.Chain6.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain6.Width(), TextureAssets.Chain6.Height())), color, rotation, new Vector2((float) TextureAssets.Chain6.Width() * 0.5f, (float) TextureAssets.Chain6.Height() * 0.5f), 1f, SpriteEffects.None, 0); + else if (proj.type == 757) + { + Texture2D texture2D = TextureAssets.Extra[99].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 6, frameY: (num4 % 6)); + Main.EntitySpriteDraw(texture2D, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(texture2D.Frame(verticalFrames: 6, frameY: (num4 % 6))), color, rotation, r.Size() / 2f, 1f, SpriteEffects.None, 0); + } + else if (proj.type == 247) + Main.EntitySpriteDraw(TextureAssets.Chain19.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain19.Width(), TextureAssets.Chain19.Height())), color, rotation, new Vector2((float) TextureAssets.Chain19.Width() * 0.5f, (float) TextureAssets.Chain19.Height() * 0.5f), 1f, SpriteEffects.None, 0); + else if (proj.type == 63) + Main.EntitySpriteDraw(TextureAssets.Chain7.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain7.Width(), TextureAssets.Chain7.Height())), color, rotation, new Vector2((float) TextureAssets.Chain7.Width() * 0.5f, (float) TextureAssets.Chain7.Height() * 0.5f), 1f, SpriteEffects.None, 0); + else if (proj.type == 154) + Main.EntitySpriteDraw(TextureAssets.Chain13.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain13.Width(), TextureAssets.Chain13.Height())), color, rotation, new Vector2((float) TextureAssets.Chain13.Width() * 0.5f, (float) TextureAssets.Chain13.Height() * 0.5f), 1f, SpriteEffects.None, 0); + else + Main.EntitySpriteDraw(TextureAssets.Chain3.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain3.Width(), TextureAssets.Chain3.Height())), color, rotation, new Vector2((float) TextureAssets.Chain3.Width() * 0.5f, (float) TextureAssets.Chain3.Height() * 0.5f), 1f, SpriteEffects.None, 0); + } + ++num4; + } + } + + private static Microsoft.Xna.Framework.Color TryApplyingPlayerStringColor( + int playerStringColor, + Microsoft.Xna.Framework.Color stringColor) + { + if (playerStringColor > 0) + { + stringColor = WorldGen.paintColor(playerStringColor); + if (stringColor.R < (byte) 75) + stringColor.R = (byte) 75; + if (stringColor.G < (byte) 75) + stringColor.G = (byte) 75; + if (stringColor.B < (byte) 75) + stringColor.B = (byte) 75; + switch (playerStringColor) + { + case 0: + case 14: + stringColor = new Microsoft.Xna.Framework.Color(200, 200, 200); + break; + case 13: + stringColor = new Microsoft.Xna.Framework.Color(20, 20, 20); + break; + case 27: + stringColor = new Microsoft.Xna.Framework.Color(Main.DiscoR, Main.DiscoG, Main.DiscoB); + break; + case 28: + stringColor = new Microsoft.Xna.Framework.Color(163, 116, 91); + break; + } + stringColor.A = (byte) ((double) stringColor.A * 0.400000005960464); + } + return stringColor; + } + + private static void DrawProj_FishingLine( + Projectile proj, + ref float polePosX, + ref float polePosY, + Vector2 mountedCenter) + { + polePosX = mountedCenter.X; + polePosY = mountedCenter.Y; + polePosY += Main.player[proj.owner].gfxOffY; + int type = Main.player[proj.owner].inventory[Main.player[proj.owner].selectedItem].type; + Microsoft.Xna.Framework.Color stringColor = new Microsoft.Xna.Framework.Color(200, 200, 200, 100); + if (type == 2294) + stringColor = new Microsoft.Xna.Framework.Color(100, 180, 230, 100); + if (type == 2295) + stringColor = new Microsoft.Xna.Framework.Color(250, 90, 70, 100); + if (type == 2293) + stringColor = new Microsoft.Xna.Framework.Color(203, 190, 210, 100); + if (type == 2421) + stringColor = new Microsoft.Xna.Framework.Color(183, 77, 112, 100); + if (type == 2422) + stringColor = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 226, 116, 100); + if (type == 4325) + stringColor = new Microsoft.Xna.Framework.Color(200, 100, 100, 100); + if (type == 4442) + stringColor = new Microsoft.Xna.Framework.Color(100, 100, 200, 100); + Microsoft.Xna.Framework.Color oldColor = Main.TryApplyingPlayerStringColor(Main.player[proj.owner].stringColor, stringColor); + float gravDir = Main.player[proj.owner].gravDir; + if (type == 2289) + { + polePosX += (float) (43 * Main.player[proj.owner].direction); + if (Main.player[proj.owner].direction < 0) + polePosX -= 13f; + polePosY -= 36f * gravDir; + } + else if (type == 2291) + { + polePosX += (float) (43 * Main.player[proj.owner].direction); + if (Main.player[proj.owner].direction < 0) + polePosX -= 13f; + polePosY -= 34f * gravDir; + } + else if (type == 2292) + { + polePosX += (float) (46 * Main.player[proj.owner].direction); + if (Main.player[proj.owner].direction < 0) + polePosX -= 13f; + polePosY -= 34f * gravDir; + } + else if (type == 2293) + { + polePosX += (float) (43 * Main.player[proj.owner].direction); + if (Main.player[proj.owner].direction < 0) + polePosX -= 13f; + polePosY -= 34f * gravDir; + } + else if (type == 2294) + { + polePosX += (float) (43 * Main.player[proj.owner].direction); + if (Main.player[proj.owner].direction < 0) + polePosX -= 13f; + polePosY -= 30f * gravDir; + } + else if (type == 2295) + { + polePosX += (float) (43 * Main.player[proj.owner].direction); + if (Main.player[proj.owner].direction < 0) + polePosX -= 13f; + polePosY -= 30f * gravDir; + } + else if (type == 2296) + { + polePosX += (float) (43 * Main.player[proj.owner].direction); + if (Main.player[proj.owner].direction < 0) + polePosX -= 13f; + polePosY -= 30f * gravDir; + } + else if (type == 2421) + { + polePosX += (float) (47 * Main.player[proj.owner].direction); + if (Main.player[proj.owner].direction < 0) + polePosX -= 13f; + polePosY -= 36f * gravDir; + } + else if (type == 2422) + { + polePosX += (float) (47 * Main.player[proj.owner].direction); + if (Main.player[proj.owner].direction < 0) + polePosX -= 13f; + polePosY -= 32f * gravDir; + } + else if (type == 4325) + { + polePosX += (float) (44 * Main.player[proj.owner].direction); + if (Main.player[proj.owner].direction < 0) + polePosX -= 13f; + polePosY -= 32f * gravDir; + } + else if (type == 4442) + { + polePosX += (float) (44 * Main.player[proj.owner].direction); + if (Main.player[proj.owner].direction < 0) + polePosX -= 13f; + polePosY -= 32f * gravDir; + } + if ((double) gravDir == -1.0) + polePosY -= 12f; + Vector2 vector2_1 = new Vector2(polePosX, polePosY); + Vector2 vector2_2 = Main.player[proj.owner].RotatedRelativePoint(vector2_1 + new Vector2(8f)) - new Vector2(8f); + float num1 = proj.position.X + (float) proj.width * 0.5f - vector2_2.X; + float num2 = proj.position.Y + (float) proj.height * 0.5f - vector2_2.Y; + Math.Sqrt((double) num1 * (double) num1 + (double) num2 * (double) num2); + float num3 = (float) Math.Atan2((double) num2, (double) num1) - 1.57f; + bool flag = true; + if ((double) num1 == 0.0 && (double) num2 == 0.0) + { + flag = false; + } + else + { + float num4 = 12f / (float) Math.Sqrt((double) num1 * (double) num1 + (double) num2 * (double) num2); + float num5 = num1 * num4; + float num6 = num2 * num4; + vector2_2.X -= num5; + vector2_2.Y -= num6; + num1 = proj.position.X + (float) proj.width * 0.5f - vector2_2.X; + num2 = proj.position.Y + (float) proj.height * 0.5f - vector2_2.Y; + } + while (flag) + { + float num7 = 12f; + float f1 = (float) Math.Sqrt((double) num1 * (double) num1 + (double) num2 * (double) num2); + float f2 = f1; + if (float.IsNaN(f1) || float.IsNaN(f2)) + { + flag = false; + } + else + { + if ((double) f1 < 20.0) + { + num7 = f1 - 8f; + flag = false; + } + float num8 = 12f / f1; + float num9 = num1 * num8; + float num10 = num2 * num8; + vector2_2.X += num9; + vector2_2.Y += num10; + num1 = proj.position.X + (float) proj.width * 0.5f - vector2_2.X; + num2 = proj.position.Y + (float) proj.height * 0.1f - vector2_2.Y; + if ((double) f2 > 12.0) + { + float num11 = 0.3f; + float num12 = Math.Abs(proj.velocity.X) + Math.Abs(proj.velocity.Y); + if ((double) num12 > 16.0) + num12 = 16f; + float num13 = (float) (1.0 - (double) num12 / 16.0); + float num14 = num11 * num13; + float num15 = f2 / 80f; + if ((double) num15 > 1.0) + num15 = 1f; + float num16 = num14 * num15; + if ((double) num16 < 0.0) + num16 = 0.0f; + float num17 = (float) (1.0 - (double) proj.localAI[0] / 100.0); + float num18 = num16 * num17; + if ((double) num2 > 0.0) + { + num2 *= 1f + num18; + num1 *= 1f - num18; + } + else + { + float num19 = Math.Abs(proj.velocity.X) / 3f; + if ((double) num19 > 1.0) + num19 = 1f; + float num20 = num19 - 0.5f; + float num21 = num18 * num20; + if ((double) num21 > 0.0) + num21 *= 2f; + num2 *= 1f + num21; + num1 *= 1f - num21; + } + } + float rotation = (float) Math.Atan2((double) num2, (double) num1) - 1.57f; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2_2.X / 16, (int) ((double) vector2_2.Y / 16.0), oldColor); + Main.EntitySpriteDraw(TextureAssets.FishingLine.Value, new Vector2((float) ((double) vector2_2.X - (double) Main.screenPosition.X + (double) TextureAssets.FishingLine.Width() * 0.5), (float) ((double) vector2_2.Y - (double) Main.screenPosition.Y + (double) TextureAssets.FishingLine.Height() * 0.5)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.FishingLine.Width(), (int) num7)), color, rotation, new Vector2((float) TextureAssets.FishingLine.Width() * 0.5f, 0.0f), 1f, SpriteEffects.None, 0); + } + } + } + + private void DrawProj_StardustGuardianPunching(Projectile proj) + { + int num1 = 6; + Texture2D texture2D = TextureAssets.Extra[46].Value; + int num2 = 20; + Vector2 vector2 = proj.Center - proj.rotation.ToRotationVector2() * (float) num2 * (float) proj.spriteDirection; + for (int index = 0; index < num1; ++index) + { + float num3 = Main.rand.NextFloat(); + float num4 = Utils.GetLerpValue(0.0f, 0.3f, num3, true) * Utils.GetLerpValue(1f, 0.5f, num3, true); + float num5 = MathHelper.Lerp(0.6f, 1f, Utils.GetLerpValue(0.0f, 0.3f, num3, true) * Utils.GetLerpValue(1f, 0.5f, num3, true)); + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue) * (num4 * 0.5f); + Vector2 origin = texture2D.Size() / 2f; + Microsoft.Xna.Framework.Color color2 = Microsoft.Xna.Framework.Color.White * num4; + color2.A /= (byte) 2; + Microsoft.Xna.Framework.Color color3 = color2 * 0.5f; + float num6 = 1f; + float num7 = (float) (1.0 + (double) Main.rand.NextFloat() * 0.5); + float num8 = Main.rand.NextFloatDirection(); + Vector2 scale = new Vector2(0.8f) * num7 * num6 * num5; + float num9 = (float) (20.0 + (double) MathHelper.Lerp(0.0f, 20f, num3) + (double) num7 * 16.0); + float f = (float) ((double) proj.rotation + (proj.direction == 1 ? 0.0 : 3.14159274101257) + (double) num8 * 6.28318548202515 * 0.0399999991059303); + float rotation = f + 1.570796f; + Vector2 position = vector2 + f.ToRotationVector2() * num9 + Main.rand.NextVector2Circular(20f, 20f) - Main.screenPosition; + Microsoft.Xna.Framework.Color color4 = color1 * num6; + Microsoft.Xna.Framework.Color color5 = color3 * num6; + SpriteEffects effects = SpriteEffects.None; + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), color4, rotation, origin, scale, effects, 0.0f); + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), color5, rotation, origin, scale * 0.8f, effects, 0.0f); + } + } + + private void DrawProj_PiercingStarlight(Projectile proj) + { + int num1 = 3; + this.LoadProjectile(proj.type); + this.LoadItem(4923); + int num2 = 2; + Vector2 vector2_1 = proj.Center - proj.rotation.ToRotationVector2() * (float) num2; + for (int index = 0; index < 1; ++index) + { + float num3 = Main.rand.NextFloat(); + float num4 = Utils.GetLerpValue(0.0f, 0.3f, num3, true) * Utils.GetLerpValue(1f, 0.5f, num3, true); + Microsoft.Xna.Framework.Color color = proj.GetAlpha(Lighting.GetColor(proj.Center.ToTileCoordinates())) * num4; + Texture2D texture2D = TextureAssets.Item[4923].Value; + Vector2 origin = texture2D.Size() / 2f; + float num5 = Main.rand.NextFloatDirection(); + float num6 = (float) (8.0 + (double) MathHelper.Lerp(0.0f, 20f, num3) + (double) Main.rand.NextFloat() * 6.0); + float f = proj.rotation + (float) ((double) num5 * 6.28318548202515 * 0.0399999991059303); + float rotation = f + 0.7853982f; + Vector2 position = vector2_1 + f.ToRotationVector2() * num6 + Main.rand.NextVector2Circular(8f, 8f) - Main.screenPosition; + SpriteEffects effects = SpriteEffects.None; + if ((double) proj.rotation < -1.57079637050629 || (double) proj.rotation > 1.57079637050629) + { + rotation += 1.570796f; + effects |= SpriteEffects.FlipHorizontally; + } + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), color, rotation, origin, 1f, effects, 0.0f); + } + for (int index = 0; index < num1; ++index) + { + float num7 = Main.rand.NextFloat(); + float num8 = Utils.GetLerpValue(0.0f, 0.3f, num7, true) * Utils.GetLerpValue(1f, 0.5f, num7, true); + float num9 = MathHelper.Lerp(0.6f, 1f, Utils.GetLerpValue(0.0f, 0.3f, num7, true) * Utils.GetLerpValue(1f, 0.5f, num7, true)); + Microsoft.Xna.Framework.Color queenWeaponsColor = proj.GetFairyQueenWeaponsColor(0.25f, rawHueOverride: new float?((float) (((double) Main.rand.NextFloat() * 0.330000013113022 + (double) Main.GlobalTimeWrappedHourly) % 1.0))); + Texture2D texture2D = TextureAssets.Projectile[proj.type].Value; + Microsoft.Xna.Framework.Color color1 = queenWeaponsColor * (num8 * 0.5f); + Vector2 origin = texture2D.Size() / 2f; + Microsoft.Xna.Framework.Color color2 = Microsoft.Xna.Framework.Color.White * num8; + color2.A /= (byte) 2; + Microsoft.Xna.Framework.Color color3 = color2 * 0.5f; + float num10 = 1f; + float num11 = Main.rand.NextFloat() * 2f; + float num12 = Main.rand.NextFloatDirection(); + Vector2 scale = new Vector2(2.8f + num11, 1f) * num10 * num9; + Vector2 vector2_2 = new Vector2((float) (1.5 + (double) num11 * 0.5), 1f) * num10 * num9; + int num13 = 50; + Vector2 vector2_3 = proj.rotation.ToRotationVector2() * (index >= 1 ? 56f : 0.0f); + float num14 = (float) (0.0299999993294477 - (double) index * 0.0120000001043081); + float num15 = (float) (30.0 + (double) MathHelper.Lerp(0.0f, (float) num13, num7) + (double) num11 * 16.0); + float f = proj.rotation + num12 * 6.283185f * num14; + float rotation = f; + Vector2 position = vector2_1 + f.ToRotationVector2() * num15 + Main.rand.NextVector2Circular(20f, 20f) + vector2_3 - Main.screenPosition; + Microsoft.Xna.Framework.Color color4 = color1 * num10; + Microsoft.Xna.Framework.Color color5 = color3 * num10; + SpriteEffects effects = SpriteEffects.None; + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), color4, rotation, origin, scale, effects, 0.0f); + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), color5, rotation, origin, scale * 0.6f, effects, 0.0f); + } + } + + private void DrawProj_FairyQueenLance(Projectile proj) + { + Vector2 position = proj.Center - Main.screenPosition; + int num1 = 180 * 40 / 2; + Microsoft.Xna.Framework.Color color1 = proj.AI_171_GetColor(); + Microsoft.Xna.Framework.Color color2 = color1; + color1.A = (byte) 0; + color2.A /= (byte) 2; + Texture2D texture2D1 = TextureAssets.Extra[178].Value; + Vector2 origin1 = texture2D1.Frame().Size() * new Vector2(0.0f, 0.5f); + Vector2 scale1 = new Vector2((float) (num1 / texture2D1.Width), 2f); + Vector2 scale2 = new Vector2((float) (num1 / texture2D1.Width) * 0.5f, 2f); + Microsoft.Xna.Framework.Color color3 = color1 * Utils.GetLerpValue(60f, 55f, proj.localAI[0], true) * Utils.GetLerpValue(0.0f, 10f, proj.localAI[0], true); + Main.spriteBatch.Draw(texture2D1, position, new Microsoft.Xna.Framework.Rectangle?(), color3, proj.rotation, origin1, scale2, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(texture2D1, position, new Microsoft.Xna.Framework.Rectangle?(), color3 * 0.3f, proj.rotation, origin1, scale1, SpriteEffects.None, 0.0f); + Texture2D texture2D2 = TextureAssets.Projectile[proj.type].Value; + Vector2 origin2 = texture2D2.Frame().Size() / 2f; + Microsoft.Xna.Framework.Color color4 = Microsoft.Xna.Framework.Color.White * Utils.GetLerpValue(0.0f, 20f, proj.localAI[0], true); + color4.A /= (byte) 2; + float scale3 = MathHelper.Lerp(0.7f, 1f, Utils.GetLerpValue(55f, 60f, proj.localAI[0], true)); + float lerpValue1 = Utils.GetLerpValue(10f, 60f, proj.localAI[0], false); + if ((double) lerpValue1 > 0.0) + { + float lerpValue2 = Utils.GetLerpValue(0.0f, 1f, proj.velocity.Length(), true); + for (float num2 = 1f; (double) num2 > 0.0; num2 -= 0.1666667f) + { + Vector2 vector2 = proj.rotation.ToRotationVector2() * -120f * num2 * lerpValue2; + Main.spriteBatch.Draw(texture2D2, position + vector2, new Microsoft.Xna.Framework.Rectangle?(), color1 * lerpValue1 * (1f - num2), proj.rotation, origin2, scale3, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(texture2D2, position + vector2, new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * 0.15f * lerpValue1 * (1f - num2), proj.rotation, origin2, scale3 * 0.85f, SpriteEffects.None, 0.0f); + } + for (float num3 = 0.0f; (double) num3 < 1.0; num3 += 0.25f) + { + Vector2 vector2 = (num3 * 6.283185f + proj.rotation).ToRotationVector2() * 2f * scale3; + Main.spriteBatch.Draw(texture2D2, position + vector2, new Microsoft.Xna.Framework.Rectangle?(), color2 * lerpValue1, proj.rotation, origin2, scale3, SpriteEffects.None, 0.0f); + } + Main.spriteBatch.Draw(texture2D2, position, new Microsoft.Xna.Framework.Rectangle?(), color2 * lerpValue1, proj.rotation, origin2, scale3 * 1.1f, SpriteEffects.None, 0.0f); + } + Main.spriteBatch.Draw(texture2D2, position, new Microsoft.Xna.Framework.Rectangle?(), color4, proj.rotation, origin2, scale3, SpriteEffects.None, 0.0f); + } + + private void DrawProj_FairyQueenRangedItemShot(Projectile proj) + { + Vector2 position = proj.Center - Main.screenPosition; + Microsoft.Xna.Framework.Color queenWeaponsColor1 = proj.GetFairyQueenWeaponsColor(0.0f); + Microsoft.Xna.Framework.Color queenWeaponsColor2 = proj.GetFairyQueenWeaponsColor(0.5f); + Texture2D texture2D = TextureAssets.Projectile[proj.type].Value; + Vector2 origin = texture2D.Frame().Size() / 2f; + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.White * proj.Opacity; + color.A /= (byte) 2; + float scale = MathHelper.Lerp(0.7f, 1f, Utils.GetLerpValue(0.0f, 5f, proj.ai[0], true)); + float opacity = proj.Opacity; + if ((double) opacity > 0.0) + { + float lerpValue = Utils.GetLerpValue(0.0f, 1f, proj.velocity.Length(), true); + for (float num = 0.0f; (double) num < 1.0; num += 0.1666667f) + { + Vector2 vector2 = proj.rotation.ToRotationVector2() * -120f * num * lerpValue; + Main.spriteBatch.Draw(texture2D, position + vector2, new Microsoft.Xna.Framework.Rectangle?(), queenWeaponsColor1 * opacity * (1f - num), proj.rotation, origin, scale, SpriteEffects.None, 0.0f); + } + for (float num = 0.0f; (double) num < 1.0; num += 0.25f) + { + Vector2 vector2 = (num * 6.283185f + proj.rotation).ToRotationVector2() * 4f * scale; + Main.spriteBatch.Draw(texture2D, position + vector2, new Microsoft.Xna.Framework.Rectangle?(), queenWeaponsColor2 * opacity, proj.rotation, origin, scale, SpriteEffects.None, 0.0f); + } + } + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), color, proj.rotation, origin, scale, SpriteEffects.None, 0.0f); + } + + private void DrawProj_EmpressBlade(Projectile proj, float hueOverride) + { + Main.CurrentDrawnEntityShader = -1; + this.PrepareDrawnEntityDrawing((Entity) proj, Main.GetProjectileDesiredShader(proj.whoAmI)); + Vector2 position = proj.Center - Main.screenPosition; + proj.GetFairyQueenWeaponsColor(0.0f, rawHueOverride: new float?(hueOverride)); + Microsoft.Xna.Framework.Color queenWeaponsColor = proj.GetFairyQueenWeaponsColor(0.5f, rawHueOverride: new float?(hueOverride)); + Texture2D texture2D = TextureAssets.Projectile[proj.type].Value; + Vector2 origin = texture2D.Frame().Size() / 2f; + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.White * proj.Opacity; + color.A = (byte) ((double) color.A * 0.699999988079071); + queenWeaponsColor.A /= (byte) 2; + float scale = proj.scale; + float num1 = proj.rotation - 1.570796f; + float num2 = proj.Opacity * 0.3f; + if ((double) num2 > 0.0) + { + float lerpValue = Utils.GetLerpValue(60f, 50f, proj.ai[0], true); + float num3 = Utils.GetLerpValue(70f, 50f, proj.ai[0], true) * Utils.GetLerpValue(40f, 45f, proj.ai[0], true); + for (float num4 = 0.0f; (double) num4 < 1.0; num4 += 0.1666667f) + { + Vector2 vector2 = num1.ToRotationVector2() * -120f * num4 * lerpValue; + Main.EntitySpriteDraw(texture2D, position + vector2, new Microsoft.Xna.Framework.Rectangle?(), queenWeaponsColor * num2 * (1f - num4) * num3, num1, origin, scale * 1.5f, SpriteEffects.None, 0); + } + for (float num5 = 0.0f; (double) num5 < 1.0; num5 += 0.25f) + { + Vector2 vector2 = (num5 * 6.283185f + num1).ToRotationVector2() * 4f * scale; + Main.EntitySpriteDraw(texture2D, position + vector2, new Microsoft.Xna.Framework.Rectangle?(), queenWeaponsColor * num2, num1, origin, scale, SpriteEffects.None, 0); + } + } + Main.EntitySpriteDraw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), color, num1, origin, scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), queenWeaponsColor * num2 * 0.5f, num1, origin, scale, SpriteEffects.None, 0); + } + + private void DrawProj_CoolWhipMinion(Projectile proj) + { + Vector2 position = proj.Center - Main.screenPosition; + Microsoft.Xna.Framework.Color color1 = Microsoft.Xna.Framework.Color.White * 0.5f; + color1.A = (byte) 0; + Microsoft.Xna.Framework.Color color2 = color1; + color2.A = (byte) 127; + Texture2D texture2D = TextureAssets.Projectile[proj.type].Value; + Vector2 origin = texture2D.Frame().Size() / 2f; + Microsoft.Xna.Framework.Color color3 = Microsoft.Xna.Framework.Color.White * proj.Opacity; + color3.A /= (byte) 2; + int num1 = 1; + float opacity = proj.Opacity; + if ((double) opacity > 0.0) + { + for (float num2 = 0.0f; (double) num2 < 4.0; ++num2) + { + Vector2 vector2 = proj.velocity * -num2; + Main.spriteBatch.Draw(texture2D, position + vector2, new Microsoft.Xna.Framework.Rectangle?(), color1 * opacity * (float) ((4.0 - (double) num2) / 4.0), proj.rotation, origin, (float) num1, SpriteEffects.None, 0.0f); + } + for (float num3 = 0.0f; (double) num3 < 1.0; num3 += 0.25f) + { + Vector2 vector2 = (num3 * 6.283185f + proj.rotation).ToRotationVector2() * 4f * (float) num1; + Main.spriteBatch.Draw(texture2D, position + vector2, new Microsoft.Xna.Framework.Rectangle?(), color2 * opacity, proj.rotation, origin, (float) num1, SpriteEffects.None, 0.0f); + } + } + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), color3, proj.rotation, origin, (float) num1, SpriteEffects.None, 0.0f); + } + + private void DrawMurderAurora(Projectile proj) + { + Texture2D texture2D = TextureAssets.Projectile[proj.type].Value; + Vector2 origin = texture2D.Size() / 2f; + float num1 = (float) ((double) Main.GlobalTimeWrappedHourly % 10.0 / 10.0); + Vector2 vector2_1 = proj.Center - Main.screenPosition; + float[] numArray1 = new float[15]; + float[] numArray2 = new float[15]; + float[] numArray3 = new float[15]; + float[] numArray4 = new float[15]; + float[] numArray5 = new float[15]; + int num2 = 210; + float num3 = Utils.GetLerpValue(0.0f, 60f, (float) proj.timeLeft, true) * Utils.GetLerpValue((float) num2, (float) (num2 - 60), (float) proj.timeLeft, true); + float num4 = MathHelper.Lerp(0.2f, 0.5f, Utils.GetLerpValue(0.0f, 60f, (float) proj.timeLeft, true) * Utils.GetLerpValue((float) num2, 90f, (float) proj.timeLeft, true)); + double num5 = 800.0 / (double) texture2D.Width; + float num6 = (float) (num5 * 0.800000011920929); + float num7 = (float) ((num5 - (double) num6) / 15.0); + float num8 = 30f; + float num9 = 300f; + Vector2 vector2_2 = new Vector2(3f, 6f); + for (int index = 0; index < 15; ++index) + { + double num10 = (double) (index + 1) / 50.0; + float num11 = (float) Math.Sin((double) num1 * 6.28318548202515 + 1.57079637050629 + (double) index / 2.0); + numArray1[index] = num11 * (num9 - (float) index * 3f); + numArray2[index] = (float) Math.Sin((double) num1 * 6.28318548202515 * 2.0 + 1.04719758033752 + (double) index) * num8; + numArray2[index] -= (float) index * 3f; + numArray3[index] = (float) ((double) index / 15.0 * 2.0) + num1; + numArray3[index] = (float) (((double) num11 * 0.5 + 0.5) * 0.600000023841858) + num1; + numArray4[index] = (float) (1.0 - Math.Pow(1.0 * (double) index / 15.0, 2.0)); + numArray5[index] = num6 + (float) (index + 1) * num7; + numArray5[index] *= 0.3f; + Microsoft.Xna.Framework.Color color = Main.hslToRgb(numArray3[index] % 1f, 1f, 0.5f) * num3 * num4; + color.A /= (byte) 4; + float rotation = (float) (1.57079637050629 + (double) num11 * 0.785398185253143 * -0.300000011920929 + 3.14159274101257 * (double) index); + Main.EntitySpriteDraw(texture2D, vector2_1 + new Vector2(numArray1[index], numArray2[index]), new Microsoft.Xna.Framework.Rectangle?(), color, rotation, origin, new Vector2(numArray5[index], numArray5[index]) * vector2_2, SpriteEffects.None, 0); + } + } + + private void DrawWhip(Projectile proj) + { + List controlPoints = new List(); + Projectile.FillWhipControlPoints(proj, controlPoints); + Texture2D texture2D = TextureAssets.FishingLine.Value; + Microsoft.Xna.Framework.Rectangle rectangle = texture2D.Frame(); + Vector2 origin = new Vector2((float) (rectangle.Width / 2), 2f); + Microsoft.Xna.Framework.Color originalColor = Microsoft.Xna.Framework.Color.White; + switch (proj.type) + { + case 847: + originalColor = Microsoft.Xna.Framework.Color.OrangeRed; + break; + case 848: + originalColor = Microsoft.Xna.Framework.Color.DarkBlue; + break; + case 849: + Microsoft.Xna.Framework.Color slateBlue = Microsoft.Xna.Framework.Color.SlateBlue; + originalColor = Microsoft.Xna.Framework.Color.Black; + break; + case 912: + originalColor = Microsoft.Xna.Framework.Color.LightBlue; + break; + case 913: + originalColor = Microsoft.Xna.Framework.Color.Firebrick; + break; + case 914: + originalColor = Microsoft.Xna.Framework.Color.ForestGreen; + break; + case 915: + originalColor = Microsoft.Xna.Framework.Color.White; + break; + } + Vector2 vector2_1 = controlPoints[0]; + for (int index = 0; index < controlPoints.Count - 1; ++index) + { + Vector2 vec = controlPoints[index]; + Vector2 v = controlPoints[index + 1] - vec; + float rotation = v.ToRotation() - 1.570796f; + Microsoft.Xna.Framework.Color color = Lighting.GetColor(vec.ToTileCoordinates(), originalColor); + Vector2 scale = new Vector2(1f, (v.Length() + 2f) / (float) rectangle.Height); + Main.spriteBatch.Draw(texture2D, vector2_1 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(rectangle), color, rotation, origin, scale, SpriteEffects.None, 0.0f); + vector2_1 += v; + } + Vector2 vector2_2; + switch (proj.type) + { + case 841: + vector2_2 = Main.DrawWhip_WhipBland(proj, controlPoints); + break; + case 847: + vector2_2 = Main.DrawWhip_WhipSword(proj, controlPoints); + break; + case 848: + vector2_2 = Main.DrawWhip_WhipMace(proj, controlPoints); + break; + case 849: + vector2_2 = Main.DrawWhip_WhipScythe(proj, controlPoints); + break; + case 912: + vector2_2 = Main.DrawWhip_CoolWhip(proj, controlPoints); + break; + case 913: + vector2_2 = Main.DrawWhip_FireWhip(proj, controlPoints); + break; + case 914: + vector2_2 = Main.DrawWhip_ThornWhip(proj, controlPoints); + break; + case 915: + vector2_2 = Main.DrawWhip_RainbowWhip(proj, controlPoints); + break; + } + } + + private static Vector2 DrawWhip_CoolWhip(Projectile proj, List controlPoints) + { + Texture2D texture2D = TextureAssets.Projectile[proj.type].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 5); + int height = r.Height; + r.Height -= 2; + Vector2 vector2 = r.Size() / 2f; + Vector2 controlPoint1 = controlPoints[0]; + for (int index = 0; index < controlPoints.Count - 1; ++index) + { + bool flag = true; + Vector2 origin = vector2; + switch (index) + { + case 0: + origin.Y -= 4f; + break; + case 3: + case 5: + case 7: + r.Y = height; + break; + case 9: + case 11: + case 13: + r.Y = height * 2; + break; + case 15: + case 17: + r.Y = height * 3; + break; + case 19: + r.Y = height * 4; + break; + default: + flag = false; + break; + } + Vector2 controlPoint2 = controlPoints[index]; + Vector2 v = controlPoints[index + 1] - controlPoint2; + if (flag) + { + float rotation = v.ToRotation() - 1.570796f; + Microsoft.Xna.Framework.Color alpha = proj.GetAlpha(Lighting.GetColor(controlPoint2.ToTileCoordinates())); + Main.spriteBatch.Draw(texture2D, controlPoint1 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(r), alpha, rotation, origin, 1f, SpriteEffects.None, 0.0f); + } + controlPoint1 += v; + } + return controlPoint1; + } + + private static Vector2 DrawWhip_FireWhip(Projectile proj, List controlPoints) + { + Texture2D texture2D = TextureAssets.Projectile[proj.type].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 5); + int height = r.Height; + r.Height -= 2; + Vector2 vector2 = r.Size() / 2f; + Vector2 controlPoint1 = controlPoints[0]; + for (int index = 0; index < controlPoints.Count - 1; ++index) + { + bool flag = true; + Vector2 origin = vector2; + switch (index) + { + case 0: + origin.Y -= 4f; + break; + case 3: + case 5: + case 7: + r.Y = height; + break; + case 9: + case 11: + case 13: + r.Y = height * 2; + break; + case 15: + case 17: + r.Y = height * 3; + break; + case 19: + r.Y = height * 4; + break; + default: + flag = false; + break; + } + Vector2 controlPoint2 = controlPoints[index]; + Vector2 v = controlPoints[index + 1] - controlPoint2; + if (flag) + { + float rotation = v.ToRotation() - 1.570796f; + Microsoft.Xna.Framework.Color alpha = proj.GetAlpha(Lighting.GetColor(controlPoint2.ToTileCoordinates())); + Main.spriteBatch.Draw(texture2D, controlPoint1 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(r), alpha, rotation, origin, 1f, SpriteEffects.None, 0.0f); + } + controlPoint1 += v; + } + return controlPoint1; + } + + private static Vector2 DrawWhip_RainbowWhip(Projectile proj, List controlPoints) + { + Texture2D texture2D = TextureAssets.Projectile[proj.type].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 5); + int height = r.Height; + r.Height -= 2; + Vector2 vector2 = r.Size() / 2f; + Vector2 controlPoint1 = controlPoints[0]; + float counterNormalized = Main.player[proj.owner].miscCounterNormalized; + for (int index = 0; index < controlPoints.Count - 1; ++index) + { + bool flag = true; + Vector2 origin = vector2; + switch (index) + { + case 0: + origin.Y -= 4f; + break; + case 39: + r.Y = height * 4; + break; + default: + flag = index % 2 == 0; + r.Y = height * (1 + index % 3); + break; + } + Vector2 controlPoint2 = controlPoints[index]; + Vector2 v = controlPoints[index + 1] - controlPoint2; + if (flag) + { + Microsoft.Xna.Framework.Color rgb = Main.hslToRgb((float) (((double) counterNormalized * 5.0 + (double) index * 0.0500000007450581) % 1.0), 1f, 0.5f); + Microsoft.Xna.Framework.Color color1 = rgb; + float lerpValue = Utils.GetLerpValue((float) (controlPoints.Count - 10), (float) (controlPoints.Count - 2), (float) index, true); + float scale = MathHelper.Lerp(1f, 1f, lerpValue); + color1.A /= (byte) 2; + color1.A = (byte) ((double) color1.A * (double) lerpValue); + float rotation = v.ToRotation() - 1.570796f; + Microsoft.Xna.Framework.Color color2 = Lighting.GetColor(controlPoint2.ToTileCoordinates()); + Main.spriteBatch.Draw(texture2D, controlPoint1 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(r), Microsoft.Xna.Framework.Color.Lerp(color2, color1, 0.5f), rotation, origin, scale, SpriteEffects.None, 0.0f); + color1.A = (byte) 0; + Main.spriteBatch.Draw(texture2D, controlPoint1 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(r), color1 * 0.1f, rotation, origin, scale * 1.2f, SpriteEffects.None, 0.0f); + if (index == 39) + { + color1 = rgb; + color1.A = (byte) 127; + Main.spriteBatch.Draw(texture2D, controlPoint1 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(r), color1 * 0.3f, rotation, origin, scale * 1.4f, SpriteEffects.None, 0.0f); + } + } + controlPoint1 += v; + } + return controlPoint1; + } + + private static Vector2 DrawWhip_ThornWhip(Projectile proj, List controlPoints) + { + Texture2D texture2D = TextureAssets.Projectile[proj.type].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 5); + int height = r.Height; + r.Height -= 2; + Vector2 vector2 = r.Size() / 2f; + Vector2 controlPoint1 = controlPoints[0]; + for (int index = 0; index < controlPoints.Count - 1; ++index) + { + bool flag = true; + Vector2 origin = vector2; + float scale = 1f; + switch (index) + { + case 0: + origin.Y -= 4f; + break; + case 19: + r.Y = height * 4; + scale = 1.1f; + break; + default: + r.Y = height * (1 + index % 3); + scale = 0.8f; + break; + } + Vector2 controlPoint2 = controlPoints[index]; + Vector2 v = controlPoints[index + 1] - controlPoint2; + if (flag) + { + float rotation = v.ToRotation() - 1.570796f; + Microsoft.Xna.Framework.Color color = Lighting.GetColor(controlPoint2.ToTileCoordinates()); + Main.spriteBatch.Draw(texture2D, controlPoint1 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(r), color, rotation, origin, scale, SpriteEffects.None, 0.0f); + } + controlPoint1 += v; + } + return controlPoint1; + } + + private static Vector2 DrawWhip_WhipSword(Projectile proj, List controlPoints) + { + Texture2D texture2D = TextureAssets.Projectile[proj.type].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 5); + int height = r.Height; + r.Height -= 2; + Vector2 vector2 = r.Size() / 2f; + Vector2 controlPoint1 = controlPoints[0]; + for (int index = 0; index < controlPoints.Count - 1; ++index) + { + bool flag = true; + Vector2 origin = vector2; + switch (index) + { + case 0: + origin.Y -= 4f; + break; + case 3: + case 5: + case 7: + r.Y = height; + break; + case 9: + case 11: + case 13: + r.Y = height * 2; + break; + case 15: + case 17: + r.Y = height * 3; + break; + case 19: + r.Y = height * 4; + break; + default: + flag = false; + break; + } + Vector2 controlPoint2 = controlPoints[index]; + Vector2 v = controlPoints[index + 1] - controlPoint2; + if (flag) + { + float rotation = v.ToRotation() - 1.570796f; + Microsoft.Xna.Framework.Color color = Lighting.GetColor(controlPoint2.ToTileCoordinates()); + Main.spriteBatch.Draw(texture2D, controlPoint1 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(r), color, rotation, origin, 1f, SpriteEffects.None, 0.0f); + } + controlPoint1 += v; + } + return controlPoint1; + } + + private static Vector2 DrawWhip_WhipMace(Projectile proj, List controlPoints) + { + SpriteEffects effects = SpriteEffects.None; + if (proj.spriteDirection == 1) + effects ^= SpriteEffects.FlipHorizontally; + Texture2D texture2D = TextureAssets.Projectile[proj.type].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 5); + int height = r.Height; + r.Height -= 2; + Vector2 vector2 = r.Size() / 2f; + Vector2 controlPoint1 = controlPoints[0]; + for (int index = 0; index < controlPoints.Count - 1; ++index) + { + bool flag = false; + Vector2 origin = vector2; + float scale = 1f; + if (index == 0) + { + origin.Y -= 4f; + flag = true; + } + else if (index % 2 == 0) + { + flag = true; + int num = 1; + if (index > 10) + num = 2; + if (index > 20) + num = 3; + r.Y = height * num; + } + if (index == controlPoints.Count - 2) + { + flag = true; + r.Y = height * 4; + float timeToFlyOut; + Projectile.GetWhipSettings(proj, out timeToFlyOut, out int _, out float _); + float t = proj.ai[0] / timeToFlyOut; + scale = MathHelper.Lerp(0.5f, 2f, Utils.GetLerpValue(0.1f, 0.7f, t, true) * Utils.GetLerpValue(0.9f, 0.7f, t, true)); + } + Vector2 controlPoint2 = controlPoints[index]; + Vector2 v = controlPoints[index + 1] - controlPoint2; + if (flag) + { + float rotation = v.ToRotation() - 1.570796f; + Microsoft.Xna.Framework.Color color = Lighting.GetColor(controlPoint2.ToTileCoordinates()); + Main.spriteBatch.Draw(texture2D, controlPoint1 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(r), color, rotation, origin, scale, effects, 0.0f); + } + controlPoint1 += v; + } + return controlPoint1; + } + + private static Vector2 DrawWhip_WhipScythe(Projectile proj, List controlPoints) + { + SpriteEffects effects = SpriteEffects.None; + if (proj.spriteDirection == 1) + effects ^= SpriteEffects.FlipHorizontally; + Texture2D texture2D = TextureAssets.Projectile[proj.type].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 5); + int height = r.Height; + r.Height -= 2; + Vector2 vector2 = r.Size() / 2f; + Vector2 controlPoint1 = controlPoints[0]; + for (int index = 0; index < controlPoints.Count - 1; ++index) + { + bool flag = false; + Vector2 origin = vector2; + float scale = 1f; + if (index == 0) + { + origin.Y -= 4f; + flag = true; + } + else if (index % 2 == 0) + { + flag = true; + int num = 1; + if (index > 10) + num = 2; + if (index > 20) + num = 3; + r.Y = height * num; + } + if (index == controlPoints.Count - 2) + { + flag = true; + r.Y = height * 4; + float timeToFlyOut; + Projectile.GetWhipSettings(proj, out timeToFlyOut, out int _, out float _); + float t = proj.ai[0] / timeToFlyOut; + scale = MathHelper.Lerp(0.5f, 1.5f, Utils.GetLerpValue(0.1f, 0.7f, t, true) * Utils.GetLerpValue(0.9f, 0.7f, t, true)); + } + Vector2 controlPoint2 = controlPoints[index]; + Vector2 v = controlPoints[index + 1] - controlPoint2; + if (flag) + { + float rotation = v.ToRotation() - 1.570796f; + Microsoft.Xna.Framework.Color color = Lighting.GetColor(controlPoint2.ToTileCoordinates()); + Main.spriteBatch.Draw(texture2D, controlPoint1 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(r), color, rotation, origin, scale, effects, 0.0f); + } + controlPoint1 += v; + } + return controlPoint1; + } + + private static Vector2 DrawWhip_WhipBland(Projectile proj, List controlPoints) + { + SpriteEffects effects = SpriteEffects.None; + if (proj.spriteDirection == 1) + effects ^= SpriteEffects.FlipHorizontally; + Texture2D texture2D = TextureAssets.Projectile[proj.type].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 5); + int height = r.Height; + r.Height -= 2; + Vector2 vector2 = r.Size() / 2f; + Vector2 controlPoint1 = controlPoints[0]; + for (int index = 0; index < controlPoints.Count - 1; ++index) + { + Vector2 origin = vector2; + float scale = 1f; + bool flag; + if (index == 0) + { + origin.Y -= 4f; + flag = true; + } + else + { + flag = true; + int num = 1; + if (index > 10) + num = 2; + if (index > 20) + num = 3; + r.Y = height * num; + } + if (index == controlPoints.Count - 2) + { + flag = true; + r.Y = height * 4; + float timeToFlyOut; + Projectile.GetWhipSettings(proj, out timeToFlyOut, out int _, out float _); + float t = proj.ai[0] / timeToFlyOut; + scale = MathHelper.Lerp(0.5f, 1.5f, Utils.GetLerpValue(0.1f, 0.7f, t, true) * Utils.GetLerpValue(0.9f, 0.7f, t, true)); + } + Vector2 controlPoint2 = controlPoints[index]; + Vector2 v = controlPoints[index + 1] - controlPoint2; + if (flag) + { + float rotation = v.ToRotation() - 1.570796f; + Microsoft.Xna.Framework.Color color = Lighting.GetColor(controlPoint2.ToTileCoordinates()); + Main.spriteBatch.Draw(texture2D, controlPoint1 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(r), color, rotation, origin, scale, effects, 0.0f); + } + controlPoint1 += v; + } + return controlPoint1; + } + + private void DrawWhipOld(Projectile proj) + { + List vector2List = new List(); + float num1 = 100f; + float num2 = proj.ai[0] / num1; + if ((double) num2 <= 1.0) + { + float num3 = (float) (12.5663709640503 * (1.0 - (double) num2) * (double) -proj.spriteDirection / 20.0); + float num4 = (float) ((double) proj.velocity.Length() * ((double) proj.ai[0] - 1.0) / 20.0); + float num5 = num2; + Vector2 vector2_1 = Main.player[proj.owner].Center; + Vector2 vector2_2 = vector2_1; + float f1 = proj.rotation - 1.570796f; + float f2 = (float) ((double) proj.rotation - 1.57079637050629 + 1.57079637050629 * (double) proj.spriteDirection); + for (int index = 0; index < 20; ++index) + { + float num6 = (float) index / 20f; + Vector2 vector2_3 = vector2_1 + f1.ToRotationVector2() * num4; + Vector2 vector2_4 = vector2_2 + f2.ToRotationVector2() * (num4 * 2f); + float num7 = num3 * num6 * num5; + f1 += num7; + f2 += num7; + vector2List.Add(Vector2.Lerp(vector2_4, vector2_3, (float) ((double) num2 * 0.5 + 0.5))); + vector2_1 = vector2_3; + vector2_2 = vector2_4; + } + } + Texture2D texture2D = TextureAssets.FishingLine.Value; + Microsoft.Xna.Framework.Rectangle rectangle = texture2D.Frame(); + Vector2 origin = new Vector2((float) (rectangle.Width / 2), 2f); + for (int index = 0; index < vector2List.Count - 1; ++index) + { + Vector2 vector2 = vector2List[index]; + Vector2 Target = vector2List[index + 1]; + float rotation = vector2.DirectionTo(Target).ToRotation() - 1.570796f; + Microsoft.Xna.Framework.Color color = Lighting.GetColor(vector2.ToTileCoordinates()); + Vector2 scale = new Vector2(1f, ((Target - vector2).Length() + 2f) / (float) rectangle.Height); + Main.spriteBatch.Draw(texture2D, vector2 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(rectangle), color, rotation, origin, scale, SpriteEffects.None, 0.0f); + } + } + + private void DrawTwinsPet(Projectile proj) + { + Texture2D texture2D = TextureAssets.Projectile[proj.type].Value; + SpriteEffects effects = proj.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: Main.projFrames[proj.type], frameY: proj.frame); + Vector2 origin = r.Size() / 2f; + Vector2 vector2 = proj.Center - Main.screenPosition; + Microsoft.Xna.Framework.Color alpha = proj.GetAlpha(Lighting.GetColor(proj.Center.ToTileCoordinates())); + Vector2 position1 = vector2 + (Main.GlobalTimeWrappedHourly * 2f).ToRotationVector2() * 18f; + Main.EntitySpriteDraw(texture2D, position1, new Microsoft.Xna.Framework.Rectangle?(r), alpha, proj.rotation, origin, proj.scale, effects, 0); + Vector2 position2 = vector2 - (Main.GlobalTimeWrappedHourly * 2f).ToRotationVector2() * 18f; + Microsoft.Xna.Framework.Rectangle rectangle = texture2D.Frame(verticalFrames: Main.projFrames[proj.type], frameY: (proj.frame + 18)); + Main.EntitySpriteDraw(texture2D, position2, new Microsoft.Xna.Framework.Rectangle?(rectangle), alpha, proj.rotation, origin, proj.scale, effects, 0); + } + + private void DrawMultisegmentPet(Projectile proj) + { + Texture2D texture2D = TextureAssets.Projectile[proj.type].Value; + Texture2D texture = (Texture2D) null; + if (proj.type == 887) + texture = TextureAssets.GlowMask[275].Value; + int num1 = 5; + int num2 = 16; + switch (proj.type) + { + case 883: + num1 = 5; + num2 = 16; + break; + case 887: + num1 = 6; + num2 = 16; + break; + case 893: + num1 = 8; + num2 = 20; + break; + } + SpriteEffects effects1 = proj.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: Main.projFrames[proj.type]); + Vector2 origin = r.Size() / 2f; + Vector2 position1 = proj.Center - Main.screenPosition; + Microsoft.Xna.Framework.Color alpha = proj.GetAlpha(Lighting.GetColor(proj.Center.ToTileCoordinates())); + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.White * ((float) Main.mouseTextColor / (float) byte.MaxValue); + Vector2 vector2_1 = proj.Center; + int num3 = 1; + int num4 = Main.projFrames[proj.type] - 1; + for (int index = 1; index < num1; ++index) + { + int frameY = num3; + if (index == num1 - 1) + frameY = num4; + else if (proj.type == 893 && index != 2 && index != 5) + frameY = 2; + Microsoft.Xna.Framework.Rectangle rectangle = texture2D.Frame(verticalFrames: Main.projFrames[proj.type], frameY: frameY); + Vector2 vector2_2 = proj.oldPos[index * 10] + proj.Size / 2f; + float rotation1 = (vector2_1 - vector2_2).ToRotation(); + Vector2 vec = vector2_1 - new Vector2((float) num2, 0.0f).RotatedBy((double) rotation1, Vector2.Zero); + float rotation2 = (vector2_1 - vec).ToRotation() + 1.570796f; + Vector2 position2 = vec - Main.screenPosition; + SpriteEffects effects2 = (double) vec.X < (double) vector2_1.X ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + vector2_1 = vec; + Main.EntitySpriteDraw(texture2D, position2, new Microsoft.Xna.Framework.Rectangle?(rectangle), proj.GetAlpha(Lighting.GetColor(vec.ToTileCoordinates())), rotation2, origin, proj.scale, effects2, 0); + if (texture != null) + Main.EntitySpriteDraw(texture, position2, new Microsoft.Xna.Framework.Rectangle?(rectangle), proj.GetAlpha(color), rotation2, origin, proj.scale, effects2, 0); + } + Main.EntitySpriteDraw(texture2D, position1, new Microsoft.Xna.Framework.Rectangle?(r), alpha, proj.rotation, origin, proj.scale, effects1, 0); + if (texture == null) + return; + Main.EntitySpriteDraw(texture, position1, new Microsoft.Xna.Framework.Rectangle?(r), color, proj.rotation, origin, proj.scale, effects1, 0); + } + + private void DrawKite(Projectile proj) + { + Texture2D texture2D1 = TextureAssets.Projectile[proj.type].Value; + Texture2D texture2D2 = TextureAssets.Extra[103].Value; + int horizontalFrames = 15; + float num1 = 0.0f; + int num2 = 10; + int num3 = 5; + float num4 = 10f; + float num5 = 0.0f; + int num6 = -14; + int num7 = -2; + int num8 = -1; + int num9 = -1; + int num10 = 8; + int num11 = 0; + int num12 = 1; + int num13 = 0; + int num14 = 0; + bool flag1 = true; + bool flag2 = false; + switch (proj.type) + { + case 766: + case 767: + case 768: + case 769: + case 770: + num11 = (proj.type - 766) * 3 + 3; + break; + case 771: + texture2D2 = TextureAssets.Extra[104].Value; + horizontalFrames = 12; + num11 = 12; + num1 = proj.spriteDirection == 1 ? 1.570796f : -1.570796f; + num2 = 12; + num4 = 22f; + num5 += 0.3926991f * (float) proj.spriteDirection; + num6 = -8; + num7 = -6; + num8 = 10; + num9 = 8; + num10 = 12; + break; + case 822: + texture2D2 = TextureAssets.Extra[132].Value; + horizontalFrames = 7; + num11 = 7; + num1 = proj.spriteDirection == 1 ? 1.570796f : -1.570796f; + num2 = 7; + num4 = 22f; + num5 += 0.2617994f * (float) proj.spriteDirection; + num6 = -20; + num7 = -6; + num10 = 12; + break; + case 823: + case 846: + texture2D2 = TextureAssets.Extra[133].Value; + if (proj.type == 846) + texture2D2 = TextureAssets.Extra[146].Value; + horizontalFrames = 6; + num11 = 6; + num1 = proj.spriteDirection == 1 ? 1.570796f : -1.570796f; + num2 = 6; + num4 = 40f; + num5 += 0.2617994f * (float) proj.spriteDirection; + num6 = -16; + num7 = -10; + num10 = 30; + break; + case 824: + case 826: + case 839: + case 840: + case 853: + num12 = 0; + break; + case 827: + case 844: + texture2D2 = TextureAssets.Extra[135].Value; + if (proj.type == 844) + texture2D2 = TextureAssets.Extra[144].Value; + horizontalFrames = 4; + num11 = 3; + num1 = proj.spriteDirection == 1 ? 1.570796f : -1.570796f; + num2 = 16; + num4 = 10f; + num5 += 0.2617994f * (float) proj.spriteDirection; + num7 = -4; + num3 = 4; + flag2 = true; + break; + case 828: + case 829: + texture2D2 = TextureAssets.Extra[136].Value; + if (proj.type == 829) + texture2D2 = TextureAssets.Extra[137].Value; + horizontalFrames = 2; + num11 = 1; + num1 = proj.spriteDirection == 1 ? 1.570796f : -1.570796f; + num2 = 6; + num4 = 10f; + num5 += 0.2617994f * (float) proj.spriteDirection; + num10 = 10; + num7 = -4; + num12 = 3; + flag1 = false; + flag2 = true; + break; + case 830: + case 838: + texture2D2 = TextureAssets.Extra[138].Value; + if (proj.type == 838) + texture2D2 = TextureAssets.Extra[139].Value; + horizontalFrames = 3; + num11 = 3; + num1 = proj.spriteDirection == 1 ? 1.570796f : -1.570796f; + num2 = 3; + num4 = 60f; + num9 = 40; + num8 = 3; + num5 += 0.2617994f * (float) proj.spriteDirection; + num10 = 50; + num7 = -20; + num13 = -10; + break; + case 843: + texture2D2 = TextureAssets.Extra[140].Value; + horizontalFrames = 2; + num11 = 2; + num1 = proj.spriteDirection == 1 ? 1.570796f : -1.570796f; + num2 = 2; + num4 = 30f; + num5 += 0.2617994f * (float) proj.spriteDirection; + num10 = 20; + num7 = -16; + num13 = -10; + break; + case 845: + texture2D2 = TextureAssets.Extra[145].Value; + horizontalFrames = 3; + num11 = 3; + num1 = proj.spriteDirection == 1 ? 1.570796f : -1.570796f; + num2 = 3; + num4 = 42f; + num9 = 50; + num8 = 2; + num5 += 0.2617994f * (float) proj.spriteDirection; + num10 = 30; + num7 = -8; + num13 = -10; + break; + case 850: + texture2D2 = TextureAssets.Extra[147].Value; + horizontalFrames = 8; + num11 = 8; + num1 = proj.spriteDirection == 1 ? 1.570796f : -1.570796f; + num2 = 8; + num4 = 22f; + num5 += 0.2617994f * (float) proj.spriteDirection; + num6 = -20; + num7 = -38; + num10 = 12; + num13 = 6; + num14 = 2; + flag1 = false; + break; + case 852: + texture2D2 = TextureAssets.Extra[148].Value; + horizontalFrames = 2; + num11 = 1; + num1 = proj.spriteDirection == 1 ? 1.570796f : -1.570796f; + num2 = 6; + num4 = 10f; + num5 += 0.2617994f * (float) proj.spriteDirection; + num10 = 10; + num7 = -4; + num12 = 4; + flag1 = false; + flag2 = true; + break; + } + SpriteEffects effects = proj.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + Microsoft.Xna.Framework.Rectangle r1 = texture2D1.Frame(Main.projFrames[proj.type], frameX: proj.frame); + Vector2 origin1 = r1.Size() / 2f; + Vector2 position = proj.Center - Main.screenPosition; + Microsoft.Xna.Framework.Color color1 = Lighting.GetColor(proj.Center.ToTileCoordinates()); + Microsoft.Xna.Framework.Color alpha = proj.GetAlpha(color1); + Texture2D texture2D3 = TextureAssets.FishingLine.Value; + Microsoft.Xna.Framework.Rectangle rectangle1 = texture2D3.Frame(); + Vector2 origin2 = new Vector2((float) (rectangle1.Width / 2), 2f); + Microsoft.Xna.Framework.Rectangle r2 = texture2D2.Frame(horizontalFrames); + int width = r2.Width; + r2.Width -= 2; + Vector2 origin3 = r2.Size() / 2f; + r2.X = width * (horizontalFrames - 1); + Vector2 playerArmPosition = Main.GetPlayerArmPosition(proj); + Vector2 center = proj.Center; + double num15 = (double) Vector2.Distance(center, playerArmPosition); + float num16 = 12f; + Vector2 vector2_1 = (playerArmPosition - center).SafeNormalize(Vector2.Zero) * num16; + Vector2 vector2_2 = playerArmPosition; + Vector2 v1 = center - vector2_2; + Vector2 velocity = proj.velocity; + if ((double) Math.Abs(velocity.X) > (double) Math.Abs(velocity.Y)) + Utils.Swap(ref velocity.X, ref velocity.Y); + float num17 = v1.Length(); + float num18 = 16f; + float num19 = 80f; + bool flag3 = true; + if ((double) num17 == 0.0) + { + flag3 = false; + } + else + { + Vector2 vector2_3 = v1 * (12f / num17); + vector2_2 -= vector2_3; + v1 = center - vector2_2; + } + while (flag3) + { + float num20 = 12f; + float f = v1.Length(); + float num21 = f; + if (float.IsNaN(f) || (double) f == 0.0) + { + flag3 = false; + } + else + { + if ((double) f < 20.0) + { + num20 = f - 8f; + flag3 = false; + } + float num22 = 12f / f; + Vector2 vector2_4 = v1 * num22; + vector2_2 += vector2_4; + v1 = center - vector2_2; + if ((double) num21 > 12.0) + { + float num23 = 0.3f; + float num24 = Math.Abs(velocity.X) + Math.Abs(velocity.Y); + if ((double) num24 > (double) num18) + num24 = num18; + float num25 = (float) (1.0 - (double) num24 / (double) num18); + float num26 = num23 * num25; + float num27 = num21 / num19; + if ((double) num27 > 1.0) + num27 = 1f; + float num28 = num26 * num27; + if ((double) num28 < 0.0) + num28 = 0.0f; + float num29 = 1f; + float num30 = num28 * num29; + if ((double) v1.Y > 0.0) + { + v1.Y *= 1f + num30; + v1.X *= 1f - num30; + } + else + { + float num31 = Math.Abs(velocity.X) / 3f; + if ((double) num31 > 1.0) + num31 = 1f; + float num32 = num31 - 0.5f; + float num33 = num30 * num32; + if ((double) num33 > 0.0) + num33 *= 2f; + v1.Y *= 1f + num33; + v1.X *= 1f - num33; + } + } + float rotation = v1.ToRotation() - 1.570796f; + if (!flag3) + rectangle1.Height = (int) num20; + Microsoft.Xna.Framework.Color color2 = Lighting.GetColor(center.ToTileCoordinates()); + Main.EntitySpriteDraw(texture2D3, vector2_2 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(rectangle1), color2, rotation, origin2, 1f, SpriteEffects.None, 0); + } + } + Vector2 vector2_5 = proj.Size / 2f; + float num34 = Math.Abs(Main.WindForVisuals); + float num35 = MathHelper.Lerp(0.5f, 1f, num34); + float num36 = num34; + if ((double) v1.Y >= -0.0199999995529652 && (double) v1.Y < 1.0) + num36 = Utils.GetLerpValue(0.2f, 0.5f, num34, true); + int num37 = num3; + int num38 = num2 + 1; + for (int index1 = 0; index1 < num12; ++index1) + { + r2.X = width * (horizontalFrames - 1); + List vector2List = new List(); + Vector2 vector2_6 = new Vector2(num35 * (float) num10 * (float) proj.spriteDirection, (float) Math.Sin(Main.timeForVisualEffects / 300.0 * 6.28318548202515) * num36) * 2f; + float num39 = (float) (num6 + num13); + float y = (float) (num7 + num14); + switch (index1) + { + case 1: + vector2_6 = new Vector2(num35 * (float) num10 * (float) proj.spriteDirection, (float) (Math.Sin(Main.timeForVisualEffects / 300.0 * 6.28318548202515) * (double) num36 + 0.5)) * 2f; + num39 -= 8f; + y -= 8f; + break; + case 2: + vector2_6 = new Vector2(num35 * (float) num10 * (float) proj.spriteDirection, (float) (Math.Sin(Main.timeForVisualEffects / 300.0 * 6.28318548202515) * (double) num36 + 1.0)) * 2f; + num39 -= 4f; + y -= 4f; + break; + case 3: + vector2_6 = new Vector2(num35 * (float) num10 * (float) proj.spriteDirection, (float) (Math.Sin(Main.timeForVisualEffects / 300.0 * 6.28318548202515) * (double) num36 + 1.5)) * 2f; + num39 -= 12f; + y -= 12f; + break; + } + Vector2 vector2_7 = proj.Center + new Vector2(((float) r1.Width * 0.5f + num39) * (float) proj.spriteDirection, y).RotatedBy((double) proj.rotation + (double) num5); + vector2List.Add(vector2_7); + int index2 = num37; + int num40 = 1; + while (index2 < num38 * num37) + { + if (num8 != -1 && num8 == num40) + num4 = (float) num9; + Vector2 oldPo = proj.oldPos[index2]; + if ((double) oldPo.X == 0.0 && (double) oldPo.Y == 0.0) + { + vector2List.Add(vector2_7); + } + else + { + Vector2 vector2_8 = oldPo + (vector2_5 + new Vector2(((float) r1.Width * 0.5f + num39) * (float) proj.oldSpriteDirection[index2], y).RotatedBy((double) proj.oldRot[index2] + (double) num5)) + vector2_6 * (float) (num40 + 1); + Vector2 vector2_9 = vector2_7 - vector2_8; + float num41 = vector2_9.Length(); + if ((double) num41 > (double) num4) + vector2_9 *= num4 / num41; + Vector2 vector2_10 = vector2_7 - vector2_9; + vector2List.Add(vector2_10); + vector2_7 = vector2_10; + } + index2 += num37; + ++num40; + } + if (flag1) + { + Microsoft.Xna.Framework.Rectangle rectangle2 = texture2D3.Frame(); + for (int index3 = vector2List.Count - 2; index3 >= 0; --index3) + { + Vector2 vector2_11 = vector2List[index3]; + Vector2 v2 = vector2List[index3 + 1] - vector2_11; + float num42 = v2.Length(); + if ((double) num42 >= 2.0) + { + float rotation = v2.ToRotation() - 1.570796f; + Main.EntitySpriteDraw(texture2D3, vector2_11 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(rectangle2), alpha, rotation, origin2, new Vector2(1f, num42 / (float) rectangle2.Height), SpriteEffects.None, 0); + } + } + } + for (int index4 = vector2List.Count - 2; index4 >= 0; --index4) + { + Vector2 vector2_12 = vector2List[index4]; + Vector2 vector2_13 = vector2List[index4 + 1]; + Vector2 v3 = vector2_13 - vector2_12; + double num43 = (double) v3.Length(); + float rotation = v3.ToRotation() - 1.570796f + num1; + Main.EntitySpriteDraw(texture2D2, vector2_13 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(r2), alpha, rotation, origin3, proj.scale, effects, 0); + r2.X -= width; + if (r2.X < 0) + { + int num44 = num11; + if (flag2) + --num44; + r2.X = num44 * width; + } + } + } + Main.EntitySpriteDraw(texture2D1, position, new Microsoft.Xna.Framework.Rectangle?(r1), alpha, proj.rotation + num5, origin1, proj.scale, effects, 0); + } + + public static Vector2 GetPlayerArmPosition(Projectile proj) + { + Player player = Main.player[proj.owner]; + Vector2 vector2_1 = Main.OffsetsPlayerOnhand[player.bodyFrame.Y / 56] * 2f; + if (player.direction != 1) + vector2_1.X = (float) player.bodyFrame.Width - vector2_1.X; + if ((double) player.gravDir != 1.0) + vector2_1.Y = (float) player.bodyFrame.Height - vector2_1.Y; + Vector2 vector2_2 = vector2_1 - new Vector2((float) (player.bodyFrame.Width - player.width), (float) (player.bodyFrame.Height - 42)) / 2f; + return player.RotatedRelativePoint(player.MountedCenter - new Vector2(20f, 42f) / 2f + vector2_2 + Vector2.UnitY * player.gfxOffY); + } + + private void DrawProjWithStarryTrail(Projectile proj, Microsoft.Xna.Framework.Color projectileColor, SpriteEffects dir) + { + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) projectileColor.A - proj.alpha); + Vector2 v = proj.velocity; + Microsoft.Xna.Framework.Color color2 = Microsoft.Xna.Framework.Color.Blue * 0.1f; + Vector2 spinningpoint = new Vector2(0.0f, -4f); + float num1 = 0.0f; + float num2 = Utils.GetLerpValue(3f, 5f, v.Length(), true); + bool flag = true; + if (proj.type == 856 || proj.type == 857) + { + Vector2 vector2 = proj.position - proj.oldPos[1]; + float num3 = vector2.Length(); + v = (double) num3 != 0.0 ? vector2 * (5f / num3) : Vector2.UnitY; + Vector2 Origin = new Vector2(proj.ai[0], proj.ai[1]); + Vector2 center = Main.player[proj.owner].Center; + float lerpValue1 = Utils.GetLerpValue(0.0f, 120f, Origin.Distance(center), true); + float from = 90f; + if (proj.type == 857) + { + from = 60f; + flag = false; + } + float lerpValue2 = Utils.GetLerpValue(from, from * 0.8333333f, proj.localAI[0], true); + float lerpValue3 = Utils.GetLerpValue(0.0f, 120f, proj.Center.Distance(center), true); + float num4 = lerpValue1 * lerpValue3; + float num5 = lerpValue2 * Utils.GetLerpValue(0.0f, 15f, proj.localAI[0], true); + color2 = Microsoft.Xna.Framework.Color.HotPink * 0.15f * (num5 * num4); + if (proj.type == 857) + color2 = proj.GetFirstFractalColor() * 0.15f * (num5 * num4); + spinningpoint = new Vector2(0.0f, -2f); + num1 = ((float) (-0.300000011920929 * (1.0 - (double) (Utils.GetLerpValue(from, from * 0.6666667f, proj.localAI[0], true) * Utils.GetLerpValue(0.0f, 20f, proj.localAI[0], true)))) + -1f * Utils.GetLerpValue(15f, 0.0f, proj.localAI[0], true)) * num4; + num2 = num5 * num4; + } + Vector2 vector2_1 = proj.Center + v; + Texture2D texture2D1 = TextureAssets.Projectile[proj.type].Value; + Vector2 vector2_2 = new Microsoft.Xna.Framework.Rectangle(0, 0, texture2D1.Width, texture2D1.Height).Size() / 2f; + Texture2D texture2D2 = TextureAssets.Extra[91].Value; + Microsoft.Xna.Framework.Rectangle rectangle = texture2D2.Frame(); + Vector2 origin1 = new Vector2((float) rectangle.Width / 2f, 10f); + Microsoft.Xna.Framework.Color color3 = Microsoft.Xna.Framework.Color.Cyan * 0.5f * num2; + Vector2 vector2_3 = new Vector2(0.0f, proj.gfxOffY); + float num6 = (float) Main.timeForVisualEffects / 60f; + Vector2 vector2_4 = vector2_1 + v * 0.5f; + Microsoft.Xna.Framework.Color color4 = Microsoft.Xna.Framework.Color.White * 0.5f * num2; + color4.A = (byte) 0; + Microsoft.Xna.Framework.Color color5 = color2 * num2; + color5.A = (byte) 0; + Microsoft.Xna.Framework.Color color6 = color2 * num2; + color6.A = (byte) 0; + Microsoft.Xna.Framework.Color color7 = color2 * num2; + color7.A = (byte) 0; + float rotation1 = v.ToRotation(); + Main.EntitySpriteDraw(texture2D2, vector2_4 - Main.screenPosition + vector2_3 + spinningpoint.RotatedBy(6.28318548202515 * (double) num6), new Microsoft.Xna.Framework.Rectangle?(rectangle), color5, rotation1 + 1.570796f, origin1, 1.5f + num1, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D2, vector2_4 - Main.screenPosition + vector2_3 + spinningpoint.RotatedBy(6.28318548202515 * (double) num6 + 2.09439516067505), new Microsoft.Xna.Framework.Rectangle?(rectangle), color6, rotation1 + 1.570796f, origin1, 1.1f + num1, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D2, vector2_4 - Main.screenPosition + vector2_3 + spinningpoint.RotatedBy(6.28318548202515 * (double) num6 + 4.1887903213501), new Microsoft.Xna.Framework.Rectangle?(rectangle), color7, rotation1 + 1.570796f, origin1, 1.3f + num1, SpriteEffects.None, 0); + Vector2 vector2_5 = vector2_1 - v * 0.5f; + for (float num7 = 0.0f; (double) num7 < 1.0; num7 += 0.5f) + { + float num8 = (float) (((double) num6 % 0.5 / 0.5 + (double) num7) % 1.0); + float num9 = num8 * 2f; + if ((double) num9 > 1.0) + num9 = 2f - num9; + Main.EntitySpriteDraw(texture2D2, vector2_5 - Main.screenPosition + vector2_3, new Microsoft.Xna.Framework.Rectangle?(rectangle), color4 * num9, rotation1 + 1.570796f, origin1, (float) (0.300000011920929 + (double) num8 * 0.5), SpriteEffects.None, 0); + } + if (!flag) + return; + float rotation2 = proj.rotation + proj.localAI[1]; + double num10 = Main.timeForVisualEffects / 240.0; + double timeWrappedHourly = (double) Main.GlobalTimeWrappedHourly; + float num11 = Main.GlobalTimeWrappedHourly % 5f / 2.5f; + if ((double) num11 >= 1.0) + num11 = 2f - num11; + float num12 = (float) ((double) num11 * 0.5 + 0.5); + Vector2 position = proj.Center - Main.screenPosition; + Main.instance.LoadItem(75); + Texture2D texture2D3 = TextureAssets.Item[75].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D3.Frame(verticalFrames: 8); + Vector2 origin2 = r.Size() / 2f; + Main.EntitySpriteDraw(texture2D3, position, new Microsoft.Xna.Framework.Rectangle?(r), color1, rotation2, origin2, proj.scale, SpriteEffects.None, 0); + } + + private static int TryInteractingWithVoidLens(Projectile proj) + { + if (Main.gamePaused || Main.gameMenu) + return 0; + bool flag1 = !Main.SmartCursorEnabled && !PlayerInput.UsingGamepad; + Player localPlayer = Main.LocalPlayer; + Microsoft.Xna.Framework.Point tileCoordinates = proj.Center.ToTileCoordinates(); + Vector2 center = localPlayer.Center; + if (!localPlayer.IsProjectileInteractibleAndInInteractionRange(proj, ref center)) + return 0; + Matrix matrix1 = Matrix.Invert(Main.GameViewMatrix.ZoomMatrix); + Vector2 position = Main.ReverseGravitySupport(Main.MouseScreen); + Vector2.Transform(Main.screenPosition, matrix1); + Matrix matrix2 = matrix1; + Vector2 v = Vector2.Transform(position, matrix2) + Main.screenPosition; + bool flag2 = proj.Hitbox.Contains(v.ToPoint()); + if (((flag2 ? 1 : (Main.SmartInteractProj == proj.whoAmI ? 1 : 0)) & (!localPlayer.lastMouseInterface ? 1 : 0)) == 0) + return !flag1 ? 1 : 0; + Main.HasInteractibleObjectThatIsNotATile = true; + if (flag2) + { + localPlayer.noThrow = 2; + localPlayer.cursorItemIconEnabled = true; + localPlayer.cursorItemIconID = 4131; + } + if (PlayerInput.UsingGamepad) + localPlayer.GamepadEnableGrappleCooldown(); + if (Main.mouseRight && Main.mouseRightRelease && Player.BlockInteractionWithProjectiles == 0) + { + Main.mouseRightRelease = false; + localPlayer.tileInteractAttempted = true; + localPlayer.tileInteractionHappened = true; + localPlayer.releaseUseTile = false; + if (localPlayer.chest == -5) + { + localPlayer.chest = -1; + SoundEngine.PlaySound(SoundID.Item130); + Recipe.FindRecipes(); + } + else + { + localPlayer.chest = -5; + for (int index = 0; index < 40; ++index) + ItemSlot.SetGlow(index, -1f, true); + localPlayer.voidLensChest = proj.whoAmI; + localPlayer.chestX = tileCoordinates.X; + localPlayer.chestY = tileCoordinates.Y; + localPlayer.SetTalkNPC(-1); + Main.SetNPCShopIndex(0); + Main.playerInventory = true; + SoundEngine.PlaySound(SoundID.Item130); + Recipe.FindRecipes(); + } + } + return !Main.SmartCursorEnabled && !PlayerInput.UsingGamepad || flag1 ? 0 : 2; + } + + private static int TryInteractingWithMoneyTrough(Projectile proj) + { + if (Main.gamePaused || Main.gameMenu) + return 0; + bool flag1 = !Main.SmartCursorEnabled && !PlayerInput.UsingGamepad; + Player localPlayer = Main.LocalPlayer; + Microsoft.Xna.Framework.Point tileCoordinates = proj.Center.ToTileCoordinates(); + Vector2 center = localPlayer.Center; + if (!localPlayer.IsProjectileInteractibleAndInInteractionRange(proj, ref center)) + return 0; + Matrix matrix1 = Matrix.Invert(Main.GameViewMatrix.ZoomMatrix); + Vector2 position = Main.ReverseGravitySupport(Main.MouseScreen); + Vector2.Transform(Main.screenPosition, matrix1); + Matrix matrix2 = matrix1; + Vector2 v = Vector2.Transform(position, matrix2) + Main.screenPosition; + bool flag2 = proj.Hitbox.Contains(v.ToPoint()); + if (((flag2 ? 1 : (Main.SmartInteractProj == proj.whoAmI ? 1 : 0)) & (!localPlayer.lastMouseInterface ? 1 : 0)) == 0) + return !flag1 ? 1 : 0; + Main.HasInteractibleObjectThatIsNotATile = true; + if (flag2) + { + localPlayer.noThrow = 2; + localPlayer.cursorItemIconEnabled = true; + localPlayer.cursorItemIconID = 3213; + } + if (PlayerInput.UsingGamepad) + localPlayer.GamepadEnableGrappleCooldown(); + if (Main.mouseRight && Main.mouseRightRelease && Player.BlockInteractionWithProjectiles == 0) + { + Main.mouseRightRelease = false; + localPlayer.tileInteractAttempted = true; + localPlayer.tileInteractionHappened = true; + localPlayer.releaseUseTile = false; + if (localPlayer.chest == -2) + { + localPlayer.chest = -1; + SoundEngine.PlaySound(SoundID.Item59); + Recipe.FindRecipes(); + } + else + { + localPlayer.chest = -2; + for (int index = 0; index < 40; ++index) + ItemSlot.SetGlow(index, -1f, true); + localPlayer.flyingPigChest = proj.whoAmI; + localPlayer.chestX = tileCoordinates.X; + localPlayer.chestY = tileCoordinates.Y; + localPlayer.SetTalkNPC(-1); + Main.SetNPCShopIndex(0); + Main.playerInventory = true; + SoundEngine.PlaySound(SoundID.Item59); + Recipe.FindRecipes(); + } + } + return !Main.SmartCursorEnabled && !PlayerInput.UsingGamepad || flag1 ? 0 : 2; + } + + public static void PrintTimedMessage(string message, params object[] arguments) => Console.WriteLine(string.Format("{0} {1}", (object) (int) Main.time, (object) string.Format(message, arguments))); + + private static void TryInteractingWithMoneyTrough2(Projectile proj) + { + if (Main.gamePaused && !Main.gameMenu) + return; + Vector2 vector2 = proj.position - Main.screenPosition; + if ((double) Main.mouseX <= (double) vector2.X || (double) Main.mouseX >= (double) vector2.X + (double) proj.width || (double) Main.mouseY <= (double) vector2.Y || (double) Main.mouseY >= (double) vector2.Y + (double) proj.height) + return; + int num1 = (int) ((double) Main.player[Main.myPlayer].Center.X / 16.0); + int num2 = (int) ((double) Main.player[Main.myPlayer].Center.Y / 16.0); + int num3 = (int) proj.Center.X / 16; + int num4 = (int) proj.Center.Y / 16; + int lastTileRangeX = Main.player[Main.myPlayer].lastTileRangeX; + int lastTileRangeY = Main.player[Main.myPlayer].lastTileRangeY; + if (num1 < num3 - lastTileRangeX || num1 > num3 + lastTileRangeX + 1 || num2 < num4 - lastTileRangeY || num2 > num4 + lastTileRangeY + 1) + return; + Player localPlayer = Main.LocalPlayer; + Main.player[Main.myPlayer].noThrow = 2; + Main.player[Main.myPlayer].cursorItemIconEnabled = true; + Main.player[Main.myPlayer].cursorItemIconID = 3213; + if (PlayerInput.UsingGamepad) + Main.player[Main.myPlayer].GamepadEnableGrappleCooldown(); + if (!Main.mouseRight || !Main.mouseRightRelease || Player.BlockInteractionWithProjectiles != 0) + return; + Main.mouseRightRelease = false; + localPlayer.tileInteractAttempted = true; + localPlayer.tileInteractionHappened = true; + localPlayer.releaseUseTile = false; + if (Main.player[Main.myPlayer].chest == -2) + { + SoundEngine.PlaySound(SoundID.Item59); + Main.player[Main.myPlayer].chest = -1; + Recipe.FindRecipes(); + } + else + { + Main.player[Main.myPlayer].flyingPigChest = proj.whoAmI; + Main.player[Main.myPlayer].chest = -2; + Main.player[Main.myPlayer].chestX = (int) ((double) proj.Center.X / 16.0); + Main.player[Main.myPlayer].chestY = (int) ((double) proj.Center.Y / 16.0); + Main.player[Main.myPlayer].SetTalkNPC(-1); + Main.SetNPCShopIndex(0); + Main.playerInventory = true; + SoundEngine.PlaySound(SoundID.Item59); + Recipe.FindRecipes(); + } + } + + public void PrepareDrawnEntityDrawing(Entity entity, int intendedShader) + { + Main.CurrentDrawnEntity = entity; + if (intendedShader != 0) + { + if (Main.CurrentDrawnEntityShader == 0 || Main.CurrentDrawnEntityShader == -1) + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + } + } + else if (Main.CurrentDrawnEntityShader != 0 && Main.CurrentDrawnEntityShader != -1) + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + } + Main.CurrentDrawnEntityShader = intendedShader; + } + + public static void EntitySpriteDraw( + Texture2D texture, + Vector2 position, + Microsoft.Xna.Framework.Rectangle? sourceRectangle, + Microsoft.Xna.Framework.Color color, + float rotation, + Vector2 origin, + float scale, + SpriteEffects effects, + int worthless) + { + Main.EntitySpriteDraw(texture, position, sourceRectangle, color, rotation, origin, new Vector2(scale), effects, worthless); + } + + public static void EntitySpriteDraw( + Texture2D texture, + Vector2 position, + Microsoft.Xna.Framework.Rectangle? sourceRectangle, + Microsoft.Xna.Framework.Color color, + float rotation, + Vector2 origin, + Vector2 scale, + SpriteEffects effects, + int worthless) + { + if (Main.CurrentDrawnEntityShader > 0) + { + DrawData drawData = new DrawData(texture, position, sourceRectangle, color, rotation, origin, scale, effects, worthless); + GameShaders.Armor.Apply(Main.CurrentDrawnEntityShader, Main.CurrentDrawnEntity, new DrawData?(drawData)); + drawData.Draw(Main.spriteBatch); + } + else + Main.spriteBatch.Draw(texture, position, sourceRectangle, color, rotation, origin, scale, effects, (float) worthless); + } + + public static void EntitySpriteDraw(DrawData data) + { + if (Main.CurrentDrawnEntityShader > 0) + { + GameShaders.Armor.Apply(Main.CurrentDrawnEntityShader, Main.CurrentDrawnEntity, new DrawData?(data)); + data.Draw(Main.spriteBatch); + } + else + data.Draw(Main.spriteBatch); + } + + public static Microsoft.Xna.Framework.Color buffColor( + Microsoft.Xna.Framework.Color newColor, + float R, + float G, + float B, + float A) + { + newColor.R = (byte) ((double) newColor.R * (double) R); + newColor.G = (byte) ((double) newColor.G * (double) G); + newColor.B = (byte) ((double) newColor.B * (double) B); + newColor.A = (byte) ((double) newColor.A * (double) A); + return newColor; + } + + protected void CacheNPCDraws() + { + this.DrawCacheNPCsMoonMoon.Clear(); + this.DrawCacheNPCsOverPlayers.Clear(); + this.DrawCacheNPCProjectiles.Clear(); + this.DrawCacheNPCsBehindNonSolidTiles.Clear(); + for (int index1 = 0; index1 < 200; ++index1) + { + if (Main.npc[index1].active) + { + if (Main.npc[index1].type == 398 && (double) Main.npc[index1].ai[0] >= 0.0) + { + int num1 = index1; + int num2 = -1; + int num3 = -1; + int num4 = -1; + for (int index2 = 0; index2 < 200; ++index2) + { + if (Main.npc[index2].active && (double) Main.npc[index2].ai[3] == (double) num1) + { + if (num2 == -1 && Main.npc[index2].type == 397 && (double) Main.npc[index2].ai[2] == 0.0) + num2 = index2; + if (num3 == -1 && Main.npc[index2].type == 397 && (double) Main.npc[index2].ai[2] == 1.0) + num3 = index2; + if (num4 == -1 && Main.npc[index2].type == 396) + num4 = index2; + if (num2 != -1 && num3 != -1 && num4 != -1) + break; + } + } + if (num2 != -1 && num3 != -1 && num4 != -1) + { + this.DrawCacheNPCsMoonMoon.Add(num1); + if (num2 != -1) + this.DrawCacheNPCsMoonMoon.Add(num2); + if (num3 != -1) + this.DrawCacheNPCsMoonMoon.Add(num3); + if (num4 != -1) + this.DrawCacheNPCsMoonMoon.Add(num4); + } + } + else if (Main.npc[index1].type == 421 && (double) Main.npc[index1].ai[0] == 5.0) + this.DrawCacheNPCsOverPlayers.Add(index1); + else if (Main.npc[index1].type == 516 || Main.npc[index1].type == 519) + this.DrawCacheNPCProjectiles.Add(index1); + else if (Main.npc[index1].type == 548) + this.DrawCacheNPCsBehindNonSolidTiles.Add(index1); + } + } + } + + protected void CacheProjDraws() + { + this.DrawCacheProjsBehindNPCsAndTiles.Clear(); + this.DrawCacheProjsBehindNPCs.Clear(); + this.DrawCacheProjsBehindProjectiles.Clear(); + this.DrawCacheProjsOverWiresUI.Clear(); + this.DrawCacheProjsOverPlayers.Clear(); + this.DrawCacheFirstFractals.Clear(); + for (int index1 = 0; index1 < 1000; ++index1) + { + if (Main.projectile[index1].active) + { + if (Main.projectile[index1].type == 857) + this.DrawCacheFirstFractals.Add(index1); + if (Main.projectile[index1].type == 578 || Main.projectile[index1].type == 579 || Main.projectile[index1].type == 641 || Main.projectile[index1].type == 617 || Main.projectile[index1].type == 813) + this.DrawCacheProjsBehindNPCsAndTiles.Add(index1); + if (Main.projectile[index1].type == 625 || Main.projectile[index1].type == 626 || Main.projectile[index1].type == 627 || Main.projectile[index1].type == 628 || Main.projectile[index1].type == 525 || Main.projectile[index1].type == 734 || Main.projectile[index1].type == 946 || Main.projectile[index1].type == 908 && (double) Main.projectile[index1].localAI[0] <= 0.0) + this.DrawCacheProjsBehindProjectiles.Add(index1); + if (Main.projectile[index1].type == 759 || Main.projectile[index1].type == 908 && (double) Main.projectile[index1].localAI[0] > 0.0) + this.DrawCacheProjsOverPlayers.Add(index1); + if (Main.projectile[index1].type == 651) + this.DrawCacheProjsOverWiresUI.Add(index1); + if (Main.projectile[index1].type == 673 || Main.projectile[index1].type == 674 || Main.projectile[index1].type == 691 || Main.projectile[index1].type == 692 || Main.projectile[index1].type == 693 || Main.projectile[index1].type == 923) + this.DrawCacheProjsBehindNPCs.Add(index1); + if (Main.projectile[index1].type == 636 || Main.projectile[index1].type == 598) + { + bool flag = true; + if ((double) Main.projectile[index1].ai[0] == 1.0) + { + int index2 = (int) Main.projectile[index1].ai[1]; + if (index2 >= 0 && index2 < 200 && Main.npc[index2].active && Main.npc[index2].type != 492) + { + if (Main.npc[index2].behindTiles) + this.DrawCacheProjsBehindNPCsAndTiles.Add(index1); + else + this.DrawCacheProjsBehindNPCs.Add(index1); + flag = false; + } + } + if (flag) + this.DrawCacheProjsBehindProjectiles.Add(index1); + } + } + } + } + + protected void DrawCachedNPCs(List npcCache, bool behindTiles) + { + for (int index = 0; index < npcCache.Count; ++index) + { + try + { + this.DrawNPC(npcCache[index], behindTiles); + } + catch + { + Main.npc[npcCache[index]].active = false; + } + } + } + + protected void DrawCachedProjs(List projCache, bool startSpriteBatch = true) + { + if (startSpriteBatch) + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + for (int index = 0; index < projCache.Count; ++index) + { + try + { + this.DrawProj(projCache[index]); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + Main.projectile[projCache[index]].active = false; + } + } + if (!startSpriteBatch) + return; + Main.spriteBatch.End(); + } + + protected void DrawSuperSpecialProjectiles(List projCache, bool startSpriteBatch = true) + { + if (startSpriteBatch) + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + for (int index1 = 0; index1 < projCache.Count; ++index1) + { + try + { + int index2 = projCache[index1]; + Projectile projectile = Main.projectile[index2]; + int owner = projectile.owner; + Player other = Main.player[owner]; + if (Main.playerVisualClone[owner] == null) + Main.playerVisualClone[owner] = new Player(); + Player drawPlayer = Main.playerVisualClone[owner]; + drawPlayer.CopyVisuals(other); + drawPlayer.isFirstFractalAfterImage = true; + drawPlayer.firstFractalAfterImageOpacity = projectile.Opacity * 1f; + drawPlayer.ResetEffects(); + drawPlayer.ResetVisibleAccessories(); + drawPlayer.UpdateDyes(); + drawPlayer.DisplayDollUpdate(); + drawPlayer.UpdateSocialShadow(); + drawPlayer.itemAnimationMax = 60; + drawPlayer.itemAnimation = (int) projectile.localAI[0]; + drawPlayer.itemRotation = projectile.velocity.ToRotation(); + drawPlayer.heldProj = index2; + drawPlayer.Center = projectile.Center - projectile.velocity.SafeNormalize(Vector2.Zero) * 42f; + drawPlayer.direction = (double) projectile.velocity.X > 0.0 ? 1 : -1; + drawPlayer.itemRotation = (float) Math.Atan2((double) projectile.velocity.Y * (double) drawPlayer.direction, (double) projectile.velocity.X * (double) drawPlayer.direction); + drawPlayer.velocity.Y = 0.01f; + drawPlayer.wingFrame = 2; + drawPlayer.PlayerFrame(); + drawPlayer.socialIgnoreLight = true; + Main.PlayerRenderer.DrawPlayer(Main.Camera, drawPlayer, drawPlayer.position, 0.0f, drawPlayer.fullRotationOrigin); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + Main.projectile[projCache[index1]].active = false; + } + } + if (!startSpriteBatch) + return; + Main.spriteBatch.End(); + } + + protected void SortDrawCacheWorms() + { + this.SortBabyBirdProjectiles(this.DrawCacheProjsOverPlayers); + this.SortStardustDragonProjectiles(this.DrawCacheProjsBehindProjectiles); + } + + private void SortBabyBirdProjectiles(List list) + { + List intList = new List(); + for (int index1 = list.Count - 1; index1 >= 0; --index1) + { + int index2 = list[index1]; + if (Main.projectile[index2].type == 759) + { + intList.Add(index2); + list.RemoveAt(index1); + Projectile projectile = Main.projectile[index2]; + Player master = Main.player[projectile.owner]; + int stackedIndex = (int) projectile.localAI[0]; + if (projectile.frame == Main.projFrames[projectile.type] - 1) + { + projectile.Center = Projectile.AI_158_GetHomeLocation(master, stackedIndex); + projectile.velocity = Vector2.Zero; + } + } + } + list.AddRange((IEnumerable) intList); + intList.Clear(); + } + + private void SortStardustDragonProjectiles(List list) + { + List> intListList = new List>(); + for (int index1 = 0; index1 < list.Count; ++index1) + { + int index2 = list[index1]; + if (Main.projectile[index2].type == 628) + { + list.Remove(index2); + List intList1 = new List(); + intList1.Insert(0, index2); + for (int byUuid = Projectile.GetByUUID(Main.projectile[index2].owner, Main.projectile[index2].ai[0]); byUuid >= 0 && !intList1.Contains(byUuid) && Main.projectile[byUuid].active && Main.projectile[byUuid].type >= 625 && Main.projectile[byUuid].type <= 627; byUuid = Projectile.GetByUUID(Main.projectile[byUuid].owner, Main.projectile[byUuid].ai[0])) + { + intList1.Add(byUuid); + list.Remove(byUuid); + } + List intList2 = new List(); + for (int index3 = intList1.Count - 2; index3 >= 0; --index3) + intList2.Add(intList1[index3]); + intList2.Add(intList1[intList1.Count - 1]); + intListList.Add(intList2); + index1 = -1; + } + } + List intList = new List((IEnumerable) list); + intListList.Add(intList); + list.Clear(); + for (int index4 = 0; index4 < intListList.Count; ++index4) + { + for (int index5 = 0; index5 < intListList[index4].Count; ++index5) + list.Add(intListList[index4][index5]); + } + for (int index = 0; index < list.Count; ++index) + { + Projectile projectile1 = Main.projectile[list[index]]; + int byUuid = Projectile.GetByUUID(projectile1.owner, projectile1.ai[0]); + if (projectile1.type >= 626 && projectile1.type <= 628 && byUuid >= 0 && ProjectileID.Sets.StardustDragon[Main.projectile[byUuid].type]) + { + Vector2 vector2 = Main.projectile[byUuid].Center - projectile1.Center; + if (vector2 != Vector2.Zero) + { + float num = Main.projectile[byUuid].scale * 16f - vector2.Length(); + if ((double) num != 0.0) + { + Projectile projectile2 = projectile1; + projectile2.Center = projectile2.Center + Vector2.Normalize(vector2) * -num; + } + } + } + } + } + + protected void DrawWoF() + { + if ((Main.wofNPCIndex < 0 || !Main.npc[Main.wofNPCIndex].active ? 0 : (Main.npc[Main.wofNPCIndex].life > 0 ? 1 : 0)) == 0) + return; + for (int i = 0; i < (int) byte.MaxValue; ++i) + { + if (Main.player[i].active && Main.player[i].tongued && !Main.player[i].dead) + Main.DrawWOFTongueToPlayer(i); + } + for (int i = 0; i < 200; ++i) + { + if (Main.npc[i].active && Main.npc[i].aiStyle == 29) + Main.DrawWOFRopeToTheHungry(i); + } + Main.DrawWOFBody(); + } + + private static void DrawWOFBody() + { + int num1 = TextureAssets.Wof.Height() / 3; + float wofDrawAreaTop = (float) Main.wofDrawAreaTop; + float wofDrawAreaBottom = (float) Main.wofDrawAreaBottom; + float num2 = Main.screenPosition.Y + (float) Main.screenHeight; + float num3 = (float) ((int) (((double) wofDrawAreaTop - (double) Main.screenPosition.Y) / (double) num1) + 1); + if ((double) num3 > 12.0) + return; + float num4 = num3 * (float) num1; + if ((double) num4 > 0.0) + wofDrawAreaTop -= num4; + float x1 = Main.npc[Main.wofNPCIndex].position.X; + if (Main.npc[Main.wofNPCIndex].direction > 0) + x1 -= 80f; + SpriteEffects effects = SpriteEffects.None; + if (Main.npc[Main.wofNPCIndex].spriteDirection == 1) + effects = SpriteEffects.FlipHorizontally; + int num5 = Main.wofDrawFrameIndex / 6 * num1; + if (!Main.gamePaused && ++Main.wofDrawFrameIndex >= 18) + Main.wofDrawFrameIndex = 0; + float num6 = num2 - wofDrawAreaTop; + for (int index1 = (int) wofDrawAreaTop; (double) index1 < (double) num2; index1 += num1) + { + float num7 = num2 - (float) index1; + if ((double) num7 > (double) num1) + num7 = (float) num1; + for (int index2 = 0; (double) index2 < (double) num7; index2 += 16) + { + int x2 = (int) ((double) x1 + (double) (TextureAssets.Wof.Width() / 2)) / 16; + int y = (index1 + index2) / 16; + Main.spriteBatch.Draw(TextureAssets.Wof.Value, new Vector2(x1 - Main.screenPosition.X, (float) (index1 + index2) - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, num5 + index2, TextureAssets.Wof.Width(), 16)), Lighting.GetColor(x2, y), 0.0f, new Vector2(), 1f, effects, 0.0f); + } + } + } + + private static void DrawWOFRopeToTheHungry(int i) + { + float num1 = Main.npc[Main.wofNPCIndex].position.X + (float) (Main.npc[Main.wofNPCIndex].width / 2); + float y = Main.npc[Main.wofNPCIndex].position.Y; + float num2 = (float) (Main.wofDrawAreaBottom - Main.wofDrawAreaTop); + bool flag1 = false; + if (Main.npc[i].frameCounter > 7.0) + flag1 = true; + float num3 = (float) Main.wofDrawAreaTop + num2 * Main.npc[i].ai[0]; + Vector2 vector2 = new Vector2(Main.npc[i].position.X + (float) (Main.npc[i].width / 2), Main.npc[i].position.Y + (float) (Main.npc[i].height / 2)); + float num4 = num1 - vector2.X; + float num5 = num3 - vector2.Y; + float rotation = (float) Math.Atan2((double) num5, (double) num4) - 1.57f; + bool flag2 = true; + while (flag2) + { + SpriteEffects effects = SpriteEffects.None; + if (flag1) + { + effects = SpriteEffects.FlipHorizontally; + flag1 = false; + } + else + flag1 = true; + int height = 28; + float num6 = (float) Math.Sqrt((double) num4 * (double) num4 + (double) num5 * (double) num5); + if ((double) num6 < 40.0) + { + height = (int) num6 - 40 + 28; + flag2 = false; + } + float num7 = 28f / num6; + float num8 = num4 * num7; + float num9 = num5 * num7; + vector2.X += num8; + vector2.Y += num9; + num4 = num1 - vector2.X; + num5 = num3 - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(TextureAssets.Chain12.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain4.Width(), height)), color, rotation, new Vector2((float) TextureAssets.Chain4.Width() * 0.5f, (float) TextureAssets.Chain4.Height() * 0.5f), 1f, effects, 0.0f); + } + } + + private static void DrawWOFTongueToPlayer(int i) + { + float num1 = Main.npc[Main.wofNPCIndex].position.X + (float) (Main.npc[Main.wofNPCIndex].width / 2); + float num2 = Main.npc[Main.wofNPCIndex].position.Y + (float) (Main.npc[Main.wofNPCIndex].height / 2); + Vector2 vector2 = new Vector2(Main.player[i].position.X + (float) Main.player[i].width * 0.5f, Main.player[i].position.Y + (float) Main.player[i].height * 0.5f); + float num3 = num1 - vector2.X; + float num4 = num2 - vector2.Y; + float rotation = (float) Math.Atan2((double) num4, (double) num3) - 1.57f; + bool flag = true; + while (flag) + { + float num5 = (float) Math.Sqrt((double) num3 * (double) num3 + (double) num4 * (double) num4); + if ((double) num5 < 40.0) + { + flag = false; + } + else + { + float num6 = (float) TextureAssets.Chain12.Height() / num5; + float num7 = num3 * num6; + float num8 = num4 * num6; + vector2.X += num7; + vector2.Y += num8; + num3 = num1 - vector2.X; + num4 = num2 - vector2.Y; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) vector2.X / 16, (int) ((double) vector2.Y / 16.0)); + Main.spriteBatch.Draw(TextureAssets.Chain12.Value, new Vector2(vector2.X - Main.screenPosition.X, vector2.Y - Main.screenPosition.Y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain12.Width(), TextureAssets.Chain12.Height())), color, rotation, new Vector2((float) TextureAssets.Chain12.Width() * 0.5f, (float) TextureAssets.Chain12.Height() * 0.5f), 1f, SpriteEffects.None, 0.0f); + } + } + } + + public static Microsoft.Xna.Framework.Color quickAlpha(Microsoft.Xna.Framework.Color oldColor, float Alpha) + { + Microsoft.Xna.Framework.Color color = oldColor; + color.R = (byte) ((double) color.R * (double) Alpha); + color.G = (byte) ((double) color.G * (double) Alpha); + color.B = (byte) ((double) color.B * (double) Alpha); + color.A = (byte) ((double) color.A * (double) Alpha); + return color; + } + + private void DrawItem_GetBasics( + Item item, + int slot, + out Texture2D texture, + out Microsoft.Xna.Framework.Rectangle frame) + { + this.LoadItem(item.type); + if (ItemID.Sets.AnimatesAsSoul[item.type] || ItemID.Sets.NebulaPickup[item.type]) + { + this.DrawItem_AnimateSlot(slot, Main.itemAnimations[item.type].TicksPerFrame, Main.itemAnimations[item.type].FrameCount); + texture = TextureAssets.Item[item.type].Value; + } + else if (ItemID.Sets.IsFood[item.type]) + { + texture = TextureAssets.Item[item.type].Value; + } + else + { + switch (item.type) + { + case 71: + case 72: + case 73: + case 74: + int index = item.type - 71; + texture = TextureAssets.Coin[index].Value; + this.DrawItem_AnimateSlot(slot, 6, 8); + frame = Main._coinOnWorldAnimation.GetFrame(texture, Main.itemFrameCounter[slot]); + return; + case 75: + texture = TextureAssets.Item[item.type].Value; + this.DrawItem_AnimateSlot(slot, Main.itemAnimations[item.type].TicksPerFrame, Main.itemAnimations[item.type].FrameCount * 2 - 1); + break; + case 3858: + texture = TextureAssets.Item[item.type].Value; + this.DrawItem_AnimateSlot(slot, 5, 3); + break; + default: + texture = TextureAssets.Item[item.type].Value; + break; + } + } + if (Main.itemAnimations[item.type] != null) + frame = Main.itemAnimations[item.type].GetFrame(texture, Main.itemFrameCounter[slot]); + else + frame = texture.Frame(); + } + + private void DrawItem_AnimateSlot( + int slot, + int gameFramesPerSpriteFrame, + int spriteFramesAmount) + { + if (++Main.itemFrameCounter[slot] < gameFramesPerSpriteFrame * spriteFramesAmount) + return; + Main.itemFrameCounter[slot] = 0; + } + + protected void DrawItem(Item item, int whoami) + { + if (!item.active || item.IsAir) + return; + Main.instance.LoadItem(item.type); + Texture2D texture; + Microsoft.Xna.Framework.Rectangle frame; + this.DrawItem_GetBasics(item, whoami, out texture, out frame); + Vector2 origin = frame.Size() / 2f; + Vector2 vector2 = new Vector2((float) (item.width / 2) - origin.X, (float) (item.height - frame.Height)); + Vector2 position = item.position - Main.screenPosition + origin + vector2; + float rotation = item.velocity.X * 0.2f; + float scale = 1f; + Microsoft.Xna.Framework.Color color = Lighting.GetColor(item.Center.ToTileCoordinates()); + Microsoft.Xna.Framework.Color currentColor = item.GetAlpha(color); + ItemSlot.GetItemLight(ref currentColor, ref scale, item); + int index1 = (int) item.glowMask; + if (!Main.gamePaused && this.IsActive && (item.type >= 71 && item.type <= 74 || item.type == 58 || item.type == 109) && color.R > (byte) 60 && (double) Main.rand.Next(500) - ((double) Math.Abs(item.velocity.X) + (double) Math.Abs(item.velocity.Y)) * 10.0 < (double) ((int) color.R / 50)) + { + int index2 = Dust.NewDust(item.position, item.width, item.height, 43, Alpha: 254, newColor: Microsoft.Xna.Framework.Color.White, Scale: 0.5f); + Main.dust[index2].velocity *= 0.0f; + } + if (item.type >= 3318 && item.type <= 3332 || item.type == 3860 || item.type == 3862 || item.type == 3861 || item.type == 4782 || item.type == 4957) + { + float num1 = (float) ((double) item.timeSinceItemSpawned / 240.0 + (double) Main.GlobalTimeWrappedHourly * 0.0399999991059303); + float num2 = Main.GlobalTimeWrappedHourly % 4f / 2f; + if ((double) num2 >= 1.0) + num2 = 2f - num2; + float num3 = (float) ((double) num2 * 0.5 + 0.5); + for (float num4 = 0.0f; (double) num4 < 1.0; num4 += 0.25f) + Main.spriteBatch.Draw(texture, position + new Vector2(0.0f, 8f).RotatedBy(((double) num4 + (double) num1) * 6.28318548202515) * num3, new Microsoft.Xna.Framework.Rectangle?(frame), new Microsoft.Xna.Framework.Color(90, 70, (int) byte.MaxValue, 50), rotation, origin, scale, SpriteEffects.None, 0.0f); + for (float num5 = 0.0f; (double) num5 < 1.0; num5 += 0.34f) + Main.spriteBatch.Draw(texture, position + new Vector2(0.0f, 4f).RotatedBy(((double) num5 + (double) num1) * 6.28318548202515) * num3, new Microsoft.Xna.Framework.Rectangle?(frame), new Microsoft.Xna.Framework.Color(140, 120, (int) byte.MaxValue, 77), rotation, origin, scale, SpriteEffects.None, 0.0f); + } + else if (item.type == 75) + { + float num6 = (float) ((double) item.timeSinceItemSpawned / 240.0 + (double) Main.GlobalTimeWrappedHourly * 0.0399999991059303); + float num7 = Main.GlobalTimeWrappedHourly % 5f / 2.5f; + if ((double) num7 >= 1.0) + num7 = 2f - num7; + float num8 = (float) ((double) num7 * 0.5 + 0.5); + for (float num9 = 0.0f; (double) num9 < 1.0; num9 += 0.25f) + Main.spriteBatch.Draw(TextureAssets.Item[item.type].Value, position + new Vector2(0.0f, 8f).RotatedBy(((double) num9 + (double) num6) * 6.28318548202515) * num8, new Microsoft.Xna.Framework.Rectangle?(frame), new Microsoft.Xna.Framework.Color(50, 50, (int) byte.MaxValue, 50), rotation, origin, scale, SpriteEffects.None, 0.0f); + for (float num10 = 0.0f; (double) num10 < 1.0; num10 += 0.34f) + Main.spriteBatch.Draw(TextureAssets.Item[item.type].Value, position + new Vector2(0.0f, 4f).RotatedBy(((double) num10 + (double) num6) * 6.28318548202515) * num8, new Microsoft.Xna.Framework.Rectangle?(frame), new Microsoft.Xna.Framework.Color(120, 120, (int) byte.MaxValue, (int) sbyte.MaxValue), rotation, origin, scale, SpriteEffects.None, 0.0f); + } + else if (item.type == 4143) + { + float num11 = (float) ((double) item.timeSinceItemSpawned / 240.0 + (double) Main.GlobalTimeWrappedHourly * 0.0399999991059303); + float num12 = Main.GlobalTimeWrappedHourly % 5f / 2.5f; + if ((double) num12 >= 1.0) + num12 = 2f - num12; + float num13 = (float) ((double) num12 * 0.5 + 0.5); + for (float num14 = 0.0f; (double) num14 < 1.0; num14 += 0.34f) + Main.spriteBatch.Draw(TextureAssets.Item[item.type].Value, position + new Vector2(0.0f, 8f).RotatedBy(((double) num14 + (double) num11) * 6.28318548202515) * num13, new Microsoft.Xna.Framework.Rectangle?(frame), new Microsoft.Xna.Framework.Color(30, 30, 155, 60), rotation, origin, scale, SpriteEffects.None, 0.0f); + for (float num15 = 0.0f; (double) num15 < 1.0; num15 += 0.34f) + Main.spriteBatch.Draw(TextureAssets.Item[item.type].Value, position + new Vector2(0.0f, 4f).RotatedBy(((double) num15 + (double) num11) * 6.28318548202515) * num13, new Microsoft.Xna.Framework.Rectangle?(frame), new Microsoft.Xna.Framework.Color(60, 60, (int) sbyte.MaxValue, 57), rotation, origin, scale, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(texture, position, new Microsoft.Xna.Framework.Rectangle?(frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 128), rotation, origin, scale, SpriteEffects.None, 0.0f); + } + if (item.type >= 1522 && item.type <= 1527 || item.type == 3643) + { + currentColor = new Microsoft.Xna.Framework.Color(250, 250, 250, (int) Main.mouseTextColor / 2); + scale = (float) ((double) Main.mouseTextColor / 1000.0 + 0.800000011920929); + } + if (item.type == 3779) + index1 = -1; + Main.spriteBatch.Draw(texture, position, new Microsoft.Xna.Framework.Rectangle?(frame), currentColor, rotation, origin, scale, SpriteEffects.None, 0.0f); + if (item.color != Microsoft.Xna.Framework.Color.Transparent) + Main.spriteBatch.Draw(texture, position, new Microsoft.Xna.Framework.Rectangle?(frame), item.GetColor(color), rotation, origin, scale, SpriteEffects.None, 0.0f); + if (index1 != -1) + Main.spriteBatch.Draw(TextureAssets.GlowMask[index1].Value, position, new Microsoft.Xna.Framework.Rectangle?(frame), new Microsoft.Xna.Framework.Color(250, 250, 250, item.alpha), rotation, origin, scale, SpriteEffects.None, 0.0f); + if (ItemID.Sets.TrapSigned[item.type]) + Main.spriteBatch.Draw(TextureAssets.Wire.Value, position + frame.Size().RotatedBy((double) rotation) * 0.45f * item.scale, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(4, 58, 8, 8)), currentColor, 0.0f, new Vector2(4f), 1f, SpriteEffects.None, 0.0f); + if (item.type != 3858) + return; + Main.spriteBatch.Draw(TextureAssets.GlowMask[233].Value, position, new Microsoft.Xna.Framework.Rectangle?(frame), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 63) * 0.75f, rotation, frame.Size() / 2f, scale, SpriteEffects.None, 0.0f); + } + + public void DrawItems() + { + for (int whoami = 0; whoami < 400; ++whoami) + this.DrawItem(Main.item[whoami], whoami); + } + + protected void DrawRain() + { + bool flag = this.IsActive || Main.netMode == 1; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 2, 40); + Texture2D texture = TextureAssets.Rain.Value; + Vector2 zero = Vector2.Zero; + for (int index = 0; index < Main.maxRain; ++index) + { + Rain rain = Main.rain[index]; + if (rain.active) + { + rectangle.X = (int) rain.type * 4; + Main.spriteBatch.Draw(texture, rain.position - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(rectangle), Lighting.GetColor((int) ((double) rain.position.X + 4.0) >> 4, (int) ((double) rain.position.Y + 4.0) >> 4) * 0.85f, rain.rotation, zero, rain.scale, SpriteEffects.None, 0.0f); + if (flag) + rain.Update(); + } + } + TimeLogger.DetailedDrawTime(23); + } + + protected void DrawDust() + { + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle((int) Main.screenPosition.X - 500, (int) Main.screenPosition.Y - 50, Main.screenWidth + 1000, Main.screenHeight + 100); + rectangle1 = new Microsoft.Xna.Framework.Rectangle((int) Main.screenPosition.X - 1000, (int) Main.screenPosition.Y - 1050, Main.screenWidth + 2000, Main.screenHeight + 2100); + Microsoft.Xna.Framework.Rectangle rectangle2 = rectangle1; + ArmorShaderData armorShaderData = (ArmorShaderData) null; + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullNone, (Effect) null, Main.Transform); + for (int index1 = 0; index1 < Main.maxDustToDraw; ++index1) + { + Dust dust = Main.dust[index1]; + if (dust.active) + { + if (dust.type >= 130 && dust.type <= 134 || dust.type >= 219 && dust.type <= 223 || dust.type == 226 || dust.type == 278) + rectangle1 = rectangle2; + if (new Microsoft.Xna.Framework.Rectangle((int) dust.position.X, (int) dust.position.Y, 4, 4).Intersects(rectangle1)) + { + float scale1 = dust.scale; + if (dust.shader != armorShaderData) + { + Main.spriteBatch.End(); + armorShaderData = dust.shader; + if (armorShaderData == null) + { + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullNone, (Effect) null, Main.Transform); + } + else + { + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullNone, (Effect) null, Main.Transform); + dust.shader.Apply((Entity) null); + } + } + if (dust.type >= 130 && dust.type <= 134) + { + float num = (Math.Abs(dust.velocity.X) + Math.Abs(dust.velocity.Y)) * 0.3f * 10f; + if ((double) num > 10.0) + num = 10f; + for (int index2 = 0; (double) index2 < (double) num; ++index2) + { + Vector2 velocity = dust.velocity; + Vector2 vector2 = dust.position - velocity * (float) index2; + float scale2 = dust.scale * (float) (1.0 - (double) index2 / 10.0); + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) ((double) dust.position.X + 4.0) / 16, (int) ((double) dust.position.Y + 4.0) / 16); + Microsoft.Xna.Framework.Color alpha = dust.GetAlpha(color); + Main.spriteBatch.Draw(TextureAssets.Dust.Value, vector2 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(dust.frame), alpha, dust.rotation, new Vector2(4f, 4f), scale2, SpriteEffects.None, 0.0f); + } + } + else if (dust.type == 278) + { + float num = (Math.Abs(dust.velocity.X) + Math.Abs(dust.velocity.Y)) * 0.3f * 10f; + if ((double) num > 10.0) + num = 10f; + Vector2 origin = new Vector2(4f, 4f); + for (int index3 = 0; (double) index3 < (double) num; ++index3) + { + Vector2 velocity = dust.velocity; + Vector2 vector2 = dust.position - velocity * (float) index3; + float scale3 = dust.scale * (float) (1.0 - (double) index3 / 10.0); + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) ((double) dust.position.X + 4.0) / 16, (int) ((double) dust.position.Y + 4.0) / 16); + Microsoft.Xna.Framework.Color alpha = dust.GetAlpha(color); + Main.spriteBatch.Draw(TextureAssets.Dust.Value, vector2 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(dust.frame), alpha, dust.rotation, origin, scale3, SpriteEffects.None, 0.0f); + } + } + else if (dust.type >= 219 && dust.type <= 223 && (double) dust.fadeIn == 0.0) + { + float num = (Math.Abs(dust.velocity.X) + Math.Abs(dust.velocity.Y)) * 0.3f * 10f; + if ((double) num > 10.0) + num = 10f; + for (int index4 = 0; (double) index4 < (double) num; ++index4) + { + Vector2 velocity = dust.velocity; + Vector2 vector2 = dust.position - velocity * (float) index4; + float scale4 = dust.scale * (float) (1.0 - (double) index4 / 10.0); + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) ((double) dust.position.X + 4.0) / 16, (int) ((double) dust.position.Y + 4.0) / 16); + Microsoft.Xna.Framework.Color alpha = dust.GetAlpha(color); + Main.spriteBatch.Draw(TextureAssets.Dust.Value, vector2 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(dust.frame), alpha, dust.rotation, new Vector2(4f, 4f), scale4, SpriteEffects.None, 0.0f); + } + } + else if (dust.type == 264 && (double) dust.fadeIn == 0.0) + { + float num = (Math.Abs(dust.velocity.X) + Math.Abs(dust.velocity.Y)) * 10f; + if ((double) num > 10.0) + num = 10f; + for (int index5 = 0; (double) index5 < (double) num; ++index5) + { + Vector2 velocity = dust.velocity; + Vector2 vector2 = dust.position - velocity * (float) index5; + float scale5 = dust.scale * (float) (1.0 - (double) index5 / 10.0); + Microsoft.Xna.Framework.Color color1 = Lighting.GetColor((int) ((double) dust.position.X + 4.0) / 16, (int) ((double) dust.position.Y + 4.0) / 16); + Microsoft.Xna.Framework.Color color2 = dust.GetAlpha(color1) * 0.3f; + Main.spriteBatch.Draw(TextureAssets.Dust.Value, vector2 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(dust.frame), color2, dust.rotation, new Vector2(5f), scale5, SpriteEffects.None, 0.0f); + Microsoft.Xna.Framework.Color color3 = dust.GetColor(color2); + Main.spriteBatch.Draw(TextureAssets.Dust.Value, vector2 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(dust.frame), color3, dust.rotation, new Vector2(5f), scale5, SpriteEffects.None, 0.0f); + } + } + else if ((dust.type == 226 || dust.type == 272) && (double) dust.fadeIn == 0.0) + { + float num = (Math.Abs(dust.velocity.X) + Math.Abs(dust.velocity.Y)) * 0.3f * 10f; + if ((double) num > 10.0) + num = 10f; + for (int index6 = 0; (double) index6 < (double) num; ++index6) + { + Vector2 velocity = dust.velocity; + Vector2 vector2 = dust.position - velocity * (float) index6; + float scale6 = dust.scale * (float) (1.0 - (double) index6 / 10.0); + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) ((double) dust.position.X + 4.0) / 16, (int) ((double) dust.position.Y + 4.0) / 16); + Microsoft.Xna.Framework.Color alpha = dust.GetAlpha(color); + Main.spriteBatch.Draw(TextureAssets.Dust.Value, vector2 - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(dust.frame), alpha, dust.rotation, new Vector2(4f, 4f), scale6, SpriteEffects.None, 0.0f); + } + } + Microsoft.Xna.Framework.Color newColor = Lighting.GetColor((int) ((double) dust.position.X + 4.0) / 16, (int) ((double) dust.position.Y + 4.0) / 16); + if (dust.type == 6 || dust.type == 15 || dust.type >= 59 && dust.type <= 64) + newColor = Microsoft.Xna.Framework.Color.White; + Microsoft.Xna.Framework.Color alpha1 = dust.GetAlpha(newColor); + if (dust.type == 213) + scale1 = 1f; + Main.spriteBatch.Draw(TextureAssets.Dust.Value, dust.position - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(dust.frame), alpha1, dust.rotation, new Vector2(4f, 4f), scale1, SpriteEffects.None, 0.0f); + if (dust.color.PackedValue != 0U) + { + Microsoft.Xna.Framework.Color color = dust.GetColor(alpha1); + if (color.PackedValue != 0U) + Main.spriteBatch.Draw(TextureAssets.Dust.Value, dust.position - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(dust.frame), color, dust.rotation, new Vector2(4f, 4f), scale1, SpriteEffects.None, 0.0f); + } + if (alpha1 == Microsoft.Xna.Framework.Color.Black) + dust.active = false; + } + else + dust.active = false; + } + } + Main.spriteBatch.End(); + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + TimeLogger.DetailedDrawTime(25); + } + + private static void HelpText() + { + bool flag1 = false; + if (Main.player[Main.myPlayer].statLifeMax > 100) + flag1 = true; + bool flag2 = false; + if (Main.player[Main.myPlayer].statManaMax > 20) + flag2 = true; + bool flag3 = true; + bool flag4 = false; + bool flag5 = false; + bool flag6 = false; + bool flag7 = false; + bool flag8 = false; + bool flag9 = false; + bool flag10 = false; + bool flag11 = false; + bool flag12 = false; + bool flag13 = false; + for (int index = 0; index < 58; ++index) + { + if (Main.player[Main.myPlayer].inventory[index].pick > 0 && Main.player[Main.myPlayer].inventory[index].Name != "Copper Pickaxe") + flag3 = false; + if (Main.player[Main.myPlayer].inventory[index].axe > 0 && Main.player[Main.myPlayer].inventory[index].Name != "Copper Axe") + flag3 = false; + if (Main.player[Main.myPlayer].inventory[index].hammer > 0) + flag3 = false; + if (Main.player[Main.myPlayer].inventory[index].type == 11 || Main.player[Main.myPlayer].inventory[index].type == 12 || Main.player[Main.myPlayer].inventory[index].type == 13 || Main.player[Main.myPlayer].inventory[index].type == 14 || Main.player[Main.myPlayer].inventory[index].type == 699 || Main.player[Main.myPlayer].inventory[index].type == 700 || Main.player[Main.myPlayer].inventory[index].type == 701 || Main.player[Main.myPlayer].inventory[index].type == 702) + flag4 = true; + if (Main.player[Main.myPlayer].inventory[index].type == 19 || Main.player[Main.myPlayer].inventory[index].type == 20 || Main.player[Main.myPlayer].inventory[index].type == 21 || Main.player[Main.myPlayer].inventory[index].type == 22 || Main.player[Main.myPlayer].inventory[index].type == 703 || Main.player[Main.myPlayer].inventory[index].type == 704 || Main.player[Main.myPlayer].inventory[index].type == 705 || Main.player[Main.myPlayer].inventory[index].type == 706) + flag5 = true; + if (Main.player[Main.myPlayer].inventory[index].type == 75) + flag6 = true; + if (Main.player[Main.myPlayer].inventory[index].type == 38) + flag7 = true; + if (Main.player[Main.myPlayer].inventory[index].type == 68 || Main.player[Main.myPlayer].inventory[index].type == 70 || Main.player[Main.myPlayer].inventory[index].type == 1330 || Main.player[Main.myPlayer].inventory[index].type == 1331 || Main.player[Main.myPlayer].inventory[index].type == 67 || Main.player[Main.myPlayer].inventory[index].type == 2886) + flag8 = true; + if (Main.player[Main.myPlayer].inventory[index].type == 84 || Main.player[Main.myPlayer].inventory[index].type == 1236 || Main.player[Main.myPlayer].inventory[index].type == 1237 || Main.player[Main.myPlayer].inventory[index].type == 1238 || Main.player[Main.myPlayer].inventory[index].type == 1239 || Main.player[Main.myPlayer].inventory[index].type == 1240 || Main.player[Main.myPlayer].inventory[index].type == 1241 || Main.player[Main.myPlayer].inventory[index].type == 939 || Main.player[Main.myPlayer].inventory[index].type == 1273 || Main.player[Main.myPlayer].inventory[index].type == 2585 || Main.player[Main.myPlayer].inventory[index].type == 2360 || Main.player[Main.myPlayer].inventory[index].type == 185 || Main.player[Main.myPlayer].inventory[index].type == 1800 || Main.player[Main.myPlayer].inventory[index].type == 1915) + flag9 = true; + if (Main.player[Main.myPlayer].inventory[index].type == 3347) + flag10 = true; + if (Main.player[Main.myPlayer].inventory[index].type == 174) + flag11 = true; + if (Main.player[Main.myPlayer].inventory[index].type == 1141) + flag12 = true; + if (Main.player[Main.myPlayer].inventory[index].type == 1533 || Main.player[Main.myPlayer].inventory[index].type == 1534 || Main.player[Main.myPlayer].inventory[index].type == 1535 || Main.player[Main.myPlayer].inventory[index].type == 1536 || Main.player[Main.myPlayer].inventory[index].type == 1537 || Main.player[Main.myPlayer].inventory[index].type == 4714) + flag13 = true; + } + bool flag14 = false; + bool flag15 = false; + bool flag16 = false; + bool flag17 = false; + bool flag18 = false; + bool flag19 = false; + bool flag20 = false; + bool flag21 = false; + bool flag22 = false; + bool flag23 = false; + bool flag24 = false; + bool flag25 = false; + bool flag26 = false; + bool flag27 = false; + bool flag28 = false; + bool flag29 = false; + bool flag30 = false; + bool flag31 = false; + bool flag32 = false; + bool flag33 = false; + bool flag34 = false; + bool flag35 = false; + bool flag36 = false; + bool flag37 = false; + bool flag38 = false; + int num = 0; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active) + { + if (Main.npc[index].townNPC && Main.npc[index].type != 37) + ++num; + if (Main.npc[index].type == 17) + flag14 = true; + if (Main.npc[index].type == 18) + flag15 = true; + if (Main.npc[index].type == 19) + flag17 = true; + if (Main.npc[index].type == 20) + flag16 = true; + if (Main.npc[index].type == 54) + flag22 = true; + if (Main.npc[index].type == 124) + flag19 = true; + if (Main.npc[index].type == 38) + flag18 = true; + if (Main.npc[index].type == 108) + flag20 = true; + if (Main.npc[index].type == 107) + flag21 = true; + if (Main.npc[index].type == 228) + flag23 = true; + if (Main.npc[index].type == 178) + flag24 = true; + if (Main.npc[index].type == 209) + flag25 = true; + if (Main.npc[index].type == 353) + flag26 = true; + if (Main.npc[index].type == 633) + flag38 = true; + if (Main.npc[index].type == 369) + flag27 = true; + if (Main.npc[index].type == 441) + flag28 = true; + if (Main.npc[index].type == 229) + flag29 = true; + if (Main.npc[index].type == 207) + flag30 = true; + if (Main.npc[index].type == 160) + flag31 = true; + if (Main.npc[index].type == 588) + flag32 = true; + if (Main.npc[index].type == 227) + flag33 = true; + if (Main.npc[index].type == 208) + flag34 = true; + if (Main.npc[index].type == 550) + flag35 = true; + if (Main.npc[index].type == 368) + flag36 = true; + if (Main.npc[index].type == 453) + flag37 = true; + } + } + object substitutionObject = Lang.CreateDialogSubstitutionObject(); + while (true) + { + do + { + ++Main.helpText; + if (Language.Exists("GuideHelpText.Help_" + (object) Main.helpText)) + { + LocalizedText text = Language.GetText("GuideHelpText.Help_" + (object) Main.helpText); + if (text.CanFormatWith(substitutionObject)) + { + Main.npcChatText = text.FormatWith(substitutionObject); + return; + } + } + if (flag3) + { + switch (Main.helpText) + { + case 1: + Main.npcChatText = Lang.dialog(177); + return; + case 2: + Main.npcChatText = Lang.dialog(178); + return; + case 3: + Main.npcChatText = Lang.dialog(179); + return; + case 4: + Main.npcChatText = Lang.dialog(180); + return; + case 5: + Main.npcChatText = Lang.dialog(181); + return; + case 6: + Main.npcChatText = Lang.dialog(182); + return; + } + } + if (flag3 && !flag4 && !flag5 && Main.helpText == 11) + { + Main.npcChatText = Lang.dialog(183); + return; + } + if (flag3 & flag4 && !flag5) + { + if (Main.helpText == 21) + { + Main.npcChatText = Lang.dialog(184); + return; + } + if (Main.helpText == 22) + { + Main.npcChatText = Lang.dialog(185); + return; + } + } + if (flag3 & flag5) + { + if (Main.helpText == 31) + { + Main.npcChatText = Lang.dialog(186); + return; + } + if (Main.helpText == 32) + { + Main.npcChatText = Lang.dialog(187); + return; + } + } + if (!flag1 && Main.helpText == 41) + { + Main.npcChatText = Lang.dialog(188); + return; + } + if (!flag2 && Main.helpText == 42) + { + Main.npcChatText = Lang.dialog(189); + return; + } + if (!flag2 && !flag6 && Main.helpText == 43) + { + Main.npcChatText = Lang.dialog(190); + return; + } + if (!flag14 && !flag15) + { + switch (Main.helpText) + { + case 51: + Main.npcChatText = Lang.dialog(191); + return; + case 52: + Main.npcChatText = Lang.dialog(192); + return; + case 53: + Main.npcChatText = Lang.dialog(193); + return; + case 54: + Main.npcChatText = Lang.dialog(194); + return; + } + } + if (!flag14 && Main.helpText == 61) + { + Main.npcChatText = Lang.dialog(195); + return; + } + if (!flag15 && Main.helpText == 62) + { + Main.npcChatText = Lang.dialog(196); + return; + } + if (!flag17 && Main.helpText == 63) + { + Main.npcChatText = Lang.dialog(197); + return; + } + if (!flag16 && Main.helpText == 64) + { + Main.npcChatText = Lang.dialog(198); + return; + } + if (!flag19 && Main.helpText == 65 && NPC.downedBoss3) + { + Main.npcChatText = Lang.dialog(199); + return; + } + if (!flag22 && Main.helpText == 66 && NPC.downedBoss3) + { + Main.npcChatText = Lang.dialog(200); + return; + } + if (!flag18 && Main.helpText == 67) + { + Main.npcChatText = Lang.dialog(201); + return; + } + if (!flag21 && NPC.downedBoss2 && Main.helpText == 68) + { + Main.npcChatText = Lang.dialog(202); + return; + } + if (!flag20 && Main.hardMode && Main.helpText == 69) + { + Main.npcChatText = Lang.dialog(203); + return; + } + if (!flag23 && Main.helpText == 70 && NPC.downedBoss2) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1100"); + return; + } + if (!flag24 && Main.helpText == 71 && Main.hardMode) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1101"); + return; + } + if (!flag25 && Main.helpText == 72 && NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1102"); + return; + } + if (!flag26 && Main.helpText == 73) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1103"); + return; + } + if (!flag27 && Main.helpText == 74) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1104"); + return; + } + if (!flag28 && Main.helpText == 75 && Main.hardMode) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1105"); + return; + } + if (!flag29 && Main.helpText == 76 && Main.hardMode) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1106"); + return; + } + if (!flag30 && Main.helpText == 77) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1107"); + return; + } + if (!flag31 && Main.helpText == 78 && Main.hardMode) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1108"); + return; + } + if (!flag32 && Main.helpText == 79) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1109"); + return; + } + if (!flag33 && Main.helpText == 80 && num >= 5) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1110"); + return; + } + if (!flag34 && Main.helpText == 81 && num >= 11) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1111"); + return; + } + if (!flag35 && NPC.downedBoss2 && Main.helpText == 82) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1112"); + return; + } + if (((flag36 ? 0 : (Main.helpText == 83 ? 1 : 0)) & (flag14 ? 1 : 0)) != 0) + { + Main.npcChatText = Language.GetTextValueWith("GuideHelpTextSpecific.Help_1113", substitutionObject); + return; + } + if (!flag37 && Main.helpText == 84 && !Main.hardMode) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1114"); + return; + } + if (!flag38 && Main.helpText == 85 && !Main.hardMode) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1115"); + return; + } + if (flag7 && !WorldGen.crimson && Main.helpText == 100) + { + Main.npcChatText = Lang.dialog(204); + return; + } + if (flag8 && Main.helpText == 101) + { + Main.npcChatText = Lang.dialog(WorldGen.crimson ? 403 : 205); + return; + } + if (flag7 | flag8 && Main.helpText == 102) + { + Main.npcChatText = Lang.dialog(WorldGen.crimson ? 402 : 206); + return; + } + if (flag7 && WorldGen.crimson && Main.helpText == 103) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1159"); + return; + } + if (!flag9 && Main.LocalPlayer.miscEquips[4].IsAir && Main.helpText == 201 && !Main.hardMode && !NPC.downedBoss3 && !NPC.downedBoss2) + { + Main.npcChatText = Lang.dialog(207); + return; + } + if (Main.helpText == 202 && !Main.hardMode && Main.player[Main.myPlayer].statLifeMax >= 140) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1120"); + return; + } + if (Main.helpText == 203 && Main.hardMode && NPC.downedMechBossAny) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1121"); + return; + } + if (Main.helpText == 204 && !NPC.downedGoblins && Main.player[Main.myPlayer].statLifeMax >= 200 && WorldGen.shadowOrbSmashed) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1122"); + return; + } + if (Main.helpText == 205 && Main.hardMode && !NPC.downedPirates && Main.player[Main.myPlayer].statLifeMax >= 200) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1123"); + return; + } + if (Main.helpText == 206 && Main.hardMode && NPC.downedGolemBoss && !NPC.downedMartians) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1124"); + return; + } + if (Main.helpText == 207 && (NPC.downedBoss1 || NPC.downedBoss2 || NPC.downedBoss3)) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1125"); + return; + } + if (Main.helpText == 208 && !Main.hardMode) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1130"); + return; + } + if (Main.helpText == 209 && !Main.hardMode) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1131"); + return; + } + if (Main.helpText == 210 && !Main.hardMode) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1132"); + return; + } + if (Main.helpText == 211 && !Main.hardMode) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1133"); + return; + } + if (Main.helpText == 212 && !Main.hardMode) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1134"); + return; + } + if (Main.helpText == 213 && !Main.hardMode) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1135"); + return; + } + if (Main.helpText == 214 && !Main.hardMode && flag4 | flag5) + { + Main.npcChatText = Language.GetTextValueWith("GuideHelpTextSpecific.Help_1136", substitutionObject); + return; + } + if (Main.helpText == 215 && Main.LocalPlayer.anglerQuestsFinished < 1) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1137"); + return; + } + if (Main.helpText == 216 && !Main.hardMode) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1138"); + return; + } + if (Main.helpText == 1000 && !NPC.downedBoss1 && !NPC.downedBoss2) + { + Main.npcChatText = Lang.dialog(208); + return; + } + if (Main.helpText == 1001 && !NPC.downedBoss1 && !NPC.downedBoss2) + { + Main.npcChatText = Lang.dialog(209); + return; + } + if (Main.helpText == 1002 && !NPC.downedBoss2) + { + if (WorldGen.crimson) + { + Main.npcChatText = Lang.dialog(331); + return; + } + Main.npcChatText = Lang.dialog(210); + return; + } + if (Main.helpText == 1050 && !NPC.downedBoss1 && Main.player[Main.myPlayer].statLifeMax < 200) + { + Main.npcChatText = Lang.dialog(211); + return; + } + if (Main.helpText == 1051 && !NPC.downedBoss1 && Main.player[Main.myPlayer].statDefense <= 10) + { + Main.npcChatText = Lang.dialog(212); + return; + } + if (Main.helpText == 1052 && !NPC.downedBoss1 && Main.player[Main.myPlayer].statLifeMax >= 200 && Main.player[Main.myPlayer].statDefense > 10) + { + Main.npcChatText = Lang.dialog(WorldGen.crimson ? 404 : 213); + return; + } + if (Main.helpText == 1053 && NPC.downedBoss1 && !NPC.downedBoss2 && Main.player[Main.myPlayer].statLifeMax < 300) + { + Main.npcChatText = Lang.dialog(214); + return; + } + if (Main.helpText == 1054 && NPC.downedBoss1 && !NPC.downedBoss2 && !WorldGen.crimson && Main.player[Main.myPlayer].statLifeMax >= 300) + { + Main.npcChatText = Lang.dialog(215); + return; + } + if (Main.helpText == 1055 && NPC.downedBoss1 && !NPC.downedBoss2 && !WorldGen.crimson && Main.player[Main.myPlayer].statLifeMax >= 300) + { + Main.npcChatText = Lang.dialog(216); + return; + } + if (Main.helpText == 1056 && NPC.downedBoss1 && NPC.downedBoss2 && !NPC.downedBoss3) + { + Main.npcChatText = Lang.dialog(217); + return; + } + if (Main.helpText == 1057 && NPC.downedBoss1 && NPC.downedBoss2 && NPC.downedBoss3 && !Main.hardMode && Main.player[Main.myPlayer].statLifeMax < 400) + { + Main.npcChatText = Lang.dialog(218); + return; + } + if (Main.helpText == 1058 && NPC.downedBoss1 && NPC.downedBoss2 && NPC.downedBoss3 && !Main.hardMode && Main.player[Main.myPlayer].statLifeMax >= 400) + { + Main.npcChatText = Lang.dialog(219); + return; + } + if (Main.helpText == 1059 && NPC.downedBoss1 && NPC.downedBoss2 && NPC.downedBoss3 && !Main.hardMode && Main.player[Main.myPlayer].statLifeMax >= 400) + { + Main.npcChatText = Lang.dialog(220); + return; + } + if (Main.helpText == 1060 && NPC.downedBoss1 && NPC.downedBoss2 && NPC.downedBoss3 && !Main.hardMode && Main.player[Main.myPlayer].statLifeMax >= 400) + { + Main.npcChatText = Lang.dialog(221); + return; + } + if (Main.helpText == 1061 && Main.hardMode && !NPC.downedPlantBoss) + { + Main.npcChatText = Lang.dialog(WorldGen.crimson ? 401 : 222); + return; + } + if (Main.helpText == 1062 && Main.hardMode && !NPC.downedPlantBoss) + { + Main.npcChatText = Lang.dialog(223); + return; + } + if (Main.helpText == 1140 && NPC.downedBoss1 && !NPC.downedBoss2 && WorldGen.crimson && Main.player[Main.myPlayer].statLifeMax >= 300) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1140"); + return; + } + if (Main.helpText == 1141 && NPC.downedBoss1 && !NPC.downedBoss2 && WorldGen.crimson && Main.player[Main.myPlayer].statLifeMax >= 300) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1141"); + return; + } + if (Main.helpText == 1142 && NPC.downedBoss2 && !Main.hardMode) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1142"); + return; + } + if (Main.helpText == 1143 && NPC.downedBoss2 && !NPC.downedQueenBee && Main.player[Main.myPlayer].statLifeMax >= 300) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1143"); + return; + } + if (Main.helpText == 1144 & flag10) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1144"); + return; + } + if (Main.helpText == 1145 & flag11 && !Main.hardMode) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1145"); + return; + } + if (Main.helpText == 1146 && Main.hardMode && Main.player[Main.myPlayer].wingsLogic == 0 && !Main.LocalPlayer.mount.Active && !NPC.downedPlantBoss) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1146"); + return; + } + if (Main.helpText == 1147 && Main.hardMode && WorldGen.SavedOreTiers.Adamantite == 111 && !NPC.downedMechBossAny) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1147"); + return; + } + if (Main.helpText == 1148 && Main.hardMode && WorldGen.SavedOreTiers.Adamantite == 223 && !NPC.downedMechBossAny) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1148"); + return; + } + if (Main.helpText == 1149 && Main.hardMode && NPC.downedMechBossAny && Main.player[Main.myPlayer].statLifeMax < 500) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1149"); + return; + } + if (Main.helpText == 1150 && Main.hardMode && NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3 && !NPC.downedPlantBoss) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1150"); + return; + } + if (((Main.helpText != 1151 || !Main.hardMode || !NPC.downedPlantBoss ? 0 : (!NPC.downedGolemBoss ? 1 : 0)) & (flag12 ? 1 : 0)) != 0) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1151"); + return; + } + if (Main.helpText == 1152 && Main.hardMode && NPC.downedPlantBoss && !NPC.downedGolemBoss && !flag12) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1152"); + return; + } + if (((Main.helpText != 1153 ? 0 : (Main.hardMode ? 1 : 0)) & (flag13 ? 1 : 0)) != 0) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1153"); + return; + } + if (Main.helpText == 1154 && Main.hardMode && !NPC.downedFishron) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1154"); + return; + } + if (Main.helpText == 1155 && Main.hardMode && NPC.downedGolemBoss && !NPC.downedHalloweenTree && !NPC.downedHalloweenKing) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1155"); + return; + } + if (Main.helpText == 1156 && Main.hardMode && NPC.downedGolemBoss && !NPC.downedChristmasIceQueen && !NPC.downedChristmasTree && !NPC.downedChristmasSantank) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1156"); + return; + } + if (Main.helpText == 1157 && Main.hardMode && NPC.downedGolemBoss && NPC.AnyNPCs(437) && !NPC.downedMoonlord) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1157"); + return; + } + if (Main.helpText == 1158 && Main.hardMode && NPC.LunarApocalypseIsUp && !NPC.downedMoonlord) + { + Main.npcChatText = Language.GetTextValue("GuideHelpTextSpecific.Help_1158"); + return; + } + } + while (Main.helpText <= 1200); + Main.helpText = 0; + } + } + + protected void GUIChatDrawInner() + { + if (Main.player[Main.myPlayer].talkNPC < 0 && Main.player[Main.myPlayer].sign == -1) + { + Main.npcChatText = ""; + } + else + { + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color(200, 200, 200, 200); + int num1 = ((int) Main.mouseTextColor * 2 + (int) byte.MaxValue) / 3; + Microsoft.Xna.Framework.Color color2 = new Microsoft.Xna.Framework.Color(num1, num1, num1, num1); + bool flag1 = Main.InGameUI.CurrentState is UIVirtualKeyboard && PlayerInput.UsingGamepad; + this._textDisplayCache.PrepareCache(Main.npcChatText); + string[] textLines = this._textDisplayCache.TextLines; + int amountOfLines = this._textDisplayCache.AmountOfLines; + bool flag2 = false; + if (Main.editSign) + { + ++this.textBlinkerCount; + if (this.textBlinkerCount >= 20) + { + this.textBlinkerState = this.textBlinkerState != 0 ? 0 : 1; + this.textBlinkerCount = 0; + } + if (this.textBlinkerState == 1) + flag2 = true; + Main.instance.DrawWindowsIMEPanel(new Vector2((float) (Main.screenWidth / 2), 90f), 0.5f); + } + int numLines = amountOfLines + 1; + Main.spriteBatch.Draw(TextureAssets.ChatBack.Value, new Vector2((float) (Main.screenWidth / 2 - TextureAssets.ChatBack.Width() / 2), 100f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.ChatBack.Width(), (numLines + 1) * 30)), color1, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.ChatBack.Value, new Vector2((float) (Main.screenWidth / 2 - TextureAssets.ChatBack.Width() / 2), (float) (100 + (numLines + 1) * 30)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, TextureAssets.ChatBack.Height() - 30, TextureAssets.ChatBack.Width(), 30)), color1, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + for (int index = 0; index < numLines; ++index) + { + string text = textLines[index]; + if (text != null) + { + if (index == numLines - 1 & flag2) + text += "|"; + Utils.DrawBorderStringFourWay(Main.spriteBatch, FontAssets.MouseText.Value, text, (float) (170 + (Main.screenWidth - 800) / 2), (float) (120 + index * 30), color2, Microsoft.Xna.Framework.Color.Black, Vector2.Zero); + } + } + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(Main.screenWidth / 2 - TextureAssets.ChatBack.Width() / 2, 100, TextureAssets.ChatBack.Width(), (numLines + 2) * 30); + int num2 = 120 + numLines * 30 + 30 - 235; + UIVirtualKeyboard.ShouldHideText = !PlayerInput.UsingGamepad; + if (!PlayerInput.UsingGamepad) + num2 = 9999; + UIVirtualKeyboard.OffsetDown = num2; + if (Main.npcChatCornerItem != 0) + { + Vector2 position = new Vector2((float) (Main.screenWidth / 2 + TextureAssets.ChatBack.Width() / 2), (float) (100 + (numLines + 1) * 30 + 30)) - Vector2.One * 8f; + Item obj = new Item(); + obj.netDefaults(Main.npcChatCornerItem); + float scale = 1f; + this.LoadItem(obj.type); + Texture2D texture = TextureAssets.Item[obj.type].Value; + if (texture.Width > 32 || texture.Height > 32) + scale = texture.Width <= texture.Height ? 32f / (float) texture.Height : 32f / (float) texture.Width; + Main.spriteBatch.Draw(texture, position, new Microsoft.Xna.Framework.Rectangle?(), obj.GetAlpha(Microsoft.Xna.Framework.Color.White), 0.0f, new Vector2((float) texture.Width, (float) texture.Height), scale, SpriteEffects.None, 0.0f); + if (obj.color != new Microsoft.Xna.Framework.Color()) + Main.spriteBatch.Draw(texture, position, new Microsoft.Xna.Framework.Rectangle?(), obj.GetColor(obj.color), 0.0f, new Vector2((float) texture.Width, (float) texture.Height), scale, SpriteEffects.None, 0.0f); + if (new Microsoft.Xna.Framework.Rectangle((int) position.X - (int) ((double) texture.Width * (double) scale), (int) position.Y - (int) ((double) texture.Height * (double) scale), (int) ((double) texture.Width * (double) scale), (int) ((double) texture.Height * (double) scale)).Contains(new Microsoft.Xna.Framework.Point(Main.mouseX, Main.mouseY))) + this.MouseText(obj.Name, -11); + } + int mouseTextColor = (int) Main.mouseTextColor; + color2 = new Microsoft.Xna.Framework.Color(mouseTextColor, (int) ((double) mouseTextColor / 1.1), mouseTextColor / 2, mouseTextColor); + string focusText = ""; + string focusText3 = ""; + int num3 = Main.player[Main.myPlayer].statLifeMax2 - Main.player[Main.myPlayer].statLife; + for (int index1 = 0; index1 < 22; ++index1) + { + int index2 = Main.player[Main.myPlayer].buffType[index1]; + if (Main.debuff[index2] && Main.player[Main.myPlayer].buffTime[index1] > 60 && index2 != 28 && index2 != 34 && index2 != 87 && index2 != 89 && index2 != 21 && index2 != 86 && index2 != 199) + num3 += 100; + } + if (NPC.downedGolemBoss) + num3 *= 200; + else if (NPC.downedPlantBoss) + num3 *= 150; + else if (NPC.downedMechBossAny) + num3 *= 100; + else if (Main.hardMode) + num3 *= 60; + else if (NPC.downedBoss3 || NPC.downedQueenBee) + num3 *= 25; + else if (NPC.downedBoss2) + num3 *= 10; + else if (NPC.downedBoss1) + num3 *= 3; + if (Main.expertMode) + num3 *= 2; + int num4 = (int) ((double) num3 * Main.player[Main.myPlayer].currentShoppingSettings.PriceAdjustment); + string str1 = (string) null; + string text1 = (string) null; + if (Main.player[Main.myPlayer].sign > -1) + focusText = !Main.editSign ? Lang.inter[48].Value : Lang.inter[47].Value; + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 20) + { + focusText = Lang.inter[28].Value; + focusText3 = Lang.inter[49].Value; + } + else if (NPCID.Sets.IsTownPet[Main.npc[Main.player[Main.myPlayer].talkNPC].type]) + focusText = Language.GetTextValue("UI.PetTheAnimal"); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 207) + { + focusText = Lang.inter[28].Value; + if (Main.hardMode) + focusText3 = Lang.inter[107].Value; + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 453) + focusText = Lang.inter[28].Value; + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 550) + { + focusText = Lang.inter[28].Value; + focusText3 = Language.GetTextValue("UI.BartenderHelp"); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 588) + focusText = Lang.inter[28].Value; + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 633) + focusText = Lang.inter[28].Value; + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 353) + { + focusText = Lang.inter[28].Value; + focusText3 = Language.GetTextValue("GameUI.HairStyle"); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 368) + focusText = Lang.inter[28].Value; + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 369) + focusText = Lang.inter[64].Value; + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 208) + { + focusText = Lang.inter[28].Value; + if (Main.TOWMusicUnlocked) + focusText3 = Language.GetTextValue("GameUI.Music"); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 17 || Main.npc[Main.player[Main.myPlayer].talkNPC].type == 19 || Main.npc[Main.player[Main.myPlayer].talkNPC].type == 38 || Main.npc[Main.player[Main.myPlayer].talkNPC].type == 54 || Main.npc[Main.player[Main.myPlayer].talkNPC].type == 107 || Main.npc[Main.player[Main.myPlayer].talkNPC].type == 108 || Main.npc[Main.player[Main.myPlayer].talkNPC].type == 124 || Main.npc[Main.player[Main.myPlayer].talkNPC].type == 142 || Main.npc[Main.player[Main.myPlayer].talkNPC].type == 160 || Main.npc[Main.player[Main.myPlayer].talkNPC].type == 178 || Main.npc[Main.player[Main.myPlayer].talkNPC].type == 207 || Main.npc[Main.player[Main.myPlayer].talkNPC].type == 209 || Main.npc[Main.player[Main.myPlayer].talkNPC].type == 227 || Main.npc[Main.player[Main.myPlayer].talkNPC].type == 228 || Main.npc[Main.player[Main.myPlayer].talkNPC].type == 229) + { + focusText = Lang.inter[28].Value; + if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 107) + focusText3 = Lang.inter[19].Value; + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 37) + { + if (!Main.dayTime) + focusText = Lang.inter[50].Value; + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 22) + { + focusText = Lang.inter[51].Value; + focusText3 = Lang.inter[25].Value; + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 441) + { + if (Main.player[Main.myPlayer].taxMoney <= 0) + { + focusText = Lang.inter[89].Value; + } + else + { + string str2 = ""; + int num5 = 0; + int num6 = 0; + int num7 = 0; + int num8 = 0; + int num9 = (int) ((double) Main.player[Main.myPlayer].taxMoney / Main.player[Main.myPlayer].currentShoppingSettings.PriceAdjustment); + if (num9 < 0) + num9 = 0; + num4 = num9; + if (num9 >= 1000000) + { + num5 = num9 / 1000000; + num9 -= num5 * 1000000; + } + if (num9 >= 10000) + { + num6 = num9 / 10000; + num9 -= num6 * 10000; + } + if (num9 >= 100) + { + num7 = num9 / 100; + num9 -= num7 * 100; + } + if (num9 >= 1) + num8 = num9; + if (num5 > 0) + str2 = str2 + (object) num5 + " " + Lang.inter[15].Value + " "; + if (num6 > 0) + str2 = str2 + (object) num6 + " " + Lang.inter[16].Value + " "; + if (num7 > 0) + str2 = str2 + (object) num7 + " " + Lang.inter[17].Value + " "; + if (num8 > 0) + str2 = str2 + (object) num8 + " " + Lang.inter[18].Value + " "; + float num10 = (float) Main.mouseTextColor / (float) byte.MaxValue; + if (num5 > 0) + color2 = new Microsoft.Xna.Framework.Color((int) (byte) (220.0 * (double) num10), (int) (byte) (220.0 * (double) num10), (int) (byte) (198.0 * (double) num10), (int) Main.mouseTextColor); + else if (num6 > 0) + color2 = new Microsoft.Xna.Framework.Color((int) (byte) (224.0 * (double) num10), (int) (byte) (201.0 * (double) num10), (int) (byte) (92.0 * (double) num10), (int) Main.mouseTextColor); + else if (num7 > 0) + color2 = new Microsoft.Xna.Framework.Color((int) (byte) (181.0 * (double) num10), (int) (byte) (192.0 * (double) num10), (int) (byte) (193.0 * (double) num10), (int) Main.mouseTextColor); + else if (num8 > 0) + color2 = new Microsoft.Xna.Framework.Color((int) (byte) (246.0 * (double) num10), (int) (byte) (138.0 * (double) num10), (int) (byte) (96.0 * (double) num10), (int) Main.mouseTextColor); + string str3; + if (str2 == "") + { + str3 = Lang.inter[89].Value; + } + else + { + string str4 = str2.Substring(0, str2.Length - 1); + str3 = Lang.inter[89].Value + " (" + str4 + ")"; + } + string str5 = Lang.inter[89].Value; + text1 = str5; + str1 = ""; + for (int index = 0; index < str5.Length; ++index) + str1 += " "; + focusText = str5 + str1 + " "; + } + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 18) + { + string str6 = ""; + int num11 = 0; + int num12 = 0; + int num13 = 0; + int num14 = 0; + int num15 = num4; + if (num15 > 0 && num15 < 1) + num15 = 1; + if (num15 < 0) + num15 = 0; + num4 = num15; + if (num15 >= 1000000) + { + num11 = num15 / 1000000; + num15 -= num11 * 1000000; + } + if (num15 >= 10000) + { + num12 = num15 / 10000; + num15 -= num12 * 10000; + } + if (num15 >= 100) + { + num13 = num15 / 100; + num15 -= num13 * 100; + } + if (num15 >= 1) + num14 = num15; + if (num11 > 0) + str6 = str6 + (object) num11 + " " + Lang.inter[15].Value + " "; + if (num12 > 0) + str6 = str6 + (object) num12 + " " + Lang.inter[16].Value + " "; + if (num13 > 0) + str6 = str6 + (object) num13 + " " + Lang.inter[17].Value + " "; + if (num14 > 0) + str6 = str6 + (object) num14 + " " + Lang.inter[18].Value + " "; + float num16 = (float) Main.mouseTextColor / (float) byte.MaxValue; + if (num11 > 0) + color2 = new Microsoft.Xna.Framework.Color((int) (byte) (220.0 * (double) num16), (int) (byte) (220.0 * (double) num16), (int) (byte) (198.0 * (double) num16), (int) Main.mouseTextColor); + else if (num12 > 0) + color2 = new Microsoft.Xna.Framework.Color((int) (byte) (224.0 * (double) num16), (int) (byte) (201.0 * (double) num16), (int) (byte) (92.0 * (double) num16), (int) Main.mouseTextColor); + else if (num13 > 0) + color2 = new Microsoft.Xna.Framework.Color((int) (byte) (181.0 * (double) num16), (int) (byte) (192.0 * (double) num16), (int) (byte) (193.0 * (double) num16), (int) Main.mouseTextColor); + else if (num14 > 0) + color2 = new Microsoft.Xna.Framework.Color((int) (byte) (246.0 * (double) num16), (int) (byte) (138.0 * (double) num16), (int) (byte) (96.0 * (double) num16), (int) Main.mouseTextColor); + if (str6 == "") + { + focusText = Lang.inter[54].Value; + } + else + { + string str7 = str6.Substring(0, str6.Length - 1); + focusText = Lang.inter[54].Value + " (" + str7 + ")"; + } + } + if (!flag1) + { + Main.DrawNPCChatButtons(mouseTextColor, color2, numLines, focusText, focusText3); + if (str1 != null) + { + float num17 = (float) (130 + numLines * 30); + float shopx = (float) (180 + (Main.screenWidth - 800) / 2) + (ChatManager.GetStringSize(FontAssets.MouseText.Value, text1, new Vector2(0.9f)).X - 20f); + int num18 = (int) ((double) Main.player[Main.myPlayer].taxMoney / Main.player[Main.myPlayer].currentShoppingSettings.PriceAdjustment); + ItemSlot.DrawMoney(Main.spriteBatch, "", shopx, num17 - 40f, Utils.CoinsSplit((long) num18), true); + } + } + if (PlayerInput.IgnoreMouseInterface) + return; + if (rectangle.Contains(new Microsoft.Xna.Framework.Point(Main.mouseX, Main.mouseY))) + Main.player[Main.myPlayer].mouseInterface = true; + if (!Main.mouseLeft || !Main.mouseLeftRelease || !rectangle.Contains(new Microsoft.Xna.Framework.Point(Main.mouseX, Main.mouseY))) + return; + Main.mouseLeftRelease = false; + Main.player[Main.myPlayer].releaseUseItem = false; + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.npcChatFocus1) + Main.CloseNPCChatOrSign(); + else if (Main.npcChatFocus2) + { + if (Main.player[Main.myPlayer].sign != -1) + { + if (Main.editSign) + Main.SubmitSignText(); + else + IngameFancyUI.OpenVirtualKeyboard(1); + } + else if (NPCID.Sets.IsTownPet[Main.npc[Main.player[Main.myPlayer].talkNPC].type]) + Main.player[Main.myPlayer].PetAnimal(Main.player[Main.myPlayer].talkNPC); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 369) + { + Main.npcChatCornerItem = 0; + SoundEngine.PlaySound(12); + bool turnIn = false; + if (!Main.anglerQuestFinished && !Main.anglerWhoFinishedToday.Contains(Main.player[Main.myPlayer].name)) + { + int index = Main.player[Main.myPlayer].FindItem(Main.anglerQuestItemNetIDs[Main.anglerQuest]); + if (index != -1) + { + --Main.player[Main.myPlayer].inventory[index].stack; + if (Main.player[Main.myPlayer].inventory[index].stack <= 0) + Main.player[Main.myPlayer].inventory[index] = new Item(); + turnIn = true; + SoundEngine.PlaySound(24); + ++Main.player[Main.myPlayer].anglerQuestsFinished; + Main.player[Main.myPlayer].GetAnglerReward(); + } + } + Main.npcChatText = Lang.AnglerQuestChat(turnIn); + if (!turnIn) + return; + Main.anglerQuestFinished = true; + if (Main.netMode == 1) + NetMessage.SendData(75); + else + Main.anglerWhoFinishedToday.Add(Main.player[Main.myPlayer].name); + AchievementsHelper.HandleAnglerService(); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 17) + this.OpenShop(1); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 19) + this.OpenShop(2); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 124) + this.OpenShop(8); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 142) + this.OpenShop(9); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 37) + { + if (Main.netMode == 0) + NPC.SpawnSkeletron(); + else + NetMessage.SendData(51, number: Main.myPlayer, number2: 1f); + Main.npcChatText = ""; + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 20) + this.OpenShop(3); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 38) + this.OpenShop(4); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 54) + this.OpenShop(5); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 107) + this.OpenShop(6); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 108) + this.OpenShop(7); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 160) + this.OpenShop(10); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 178) + this.OpenShop(11); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 207) + this.OpenShop(12); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 208) + this.OpenShop(13); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 209) + this.OpenShop(14); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 227) + this.OpenShop(15); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 228) + this.OpenShop(16); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 229) + this.OpenShop(17); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 353) + this.OpenShop(18); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 368) + this.OpenShop(19); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 453) + this.OpenShop(20); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 550) + this.OpenShop(21); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 588) + this.OpenShop(22); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 633) + this.OpenShop(23); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 22) + { + SoundEngine.PlaySound(12); + Main.HelpText(); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 441) + { + if (Main.player[Main.myPlayer].taxMoney > 0) + { + int num19 = (int) ((double) Main.player[Main.myPlayer].taxMoney / Main.player[Main.myPlayer].currentShoppingSettings.PriceAdjustment); + while (num19 > 0) + { + if (num19 > 1000000) + { + int Stack = num19 / 1000000; + num19 -= 1000000 * Stack; + int number = Item.NewItem((int) Main.player[Main.myPlayer].position.X, (int) Main.player[Main.myPlayer].position.Y, Main.player[Main.myPlayer].width, Main.player[Main.myPlayer].height, 74, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + } + else if (num19 > 10000) + { + int Stack = num19 / 10000; + num19 -= 10000 * Stack; + int number = Item.NewItem((int) Main.player[Main.myPlayer].position.X, (int) Main.player[Main.myPlayer].position.Y, Main.player[Main.myPlayer].width, Main.player[Main.myPlayer].height, 73, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + } + else if (num19 > 100) + { + int Stack = num19 / 100; + num19 -= 100 * Stack; + int number = Item.NewItem((int) Main.player[Main.myPlayer].position.X, (int) Main.player[Main.myPlayer].position.Y, Main.player[Main.myPlayer].width, Main.player[Main.myPlayer].height, 72, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + } + else + { + int Stack = num19; + if (Stack < 1) + Stack = 1; + num19 -= Stack; + int number = Item.NewItem((int) Main.player[Main.myPlayer].position.X, (int) Main.player[Main.myPlayer].position.Y, Main.player[Main.myPlayer].width, Main.player[Main.myPlayer].height, 71, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + } + } + Main.npcChatText = Lang.dialog(Main.rand.Next(380, 382)); + Main.player[Main.myPlayer].taxMoney = 0; + } + else + Main.npcChatText = Lang.dialog(Main.rand.Next(390, 401)); + } + else + { + if (Main.npc[Main.player[Main.myPlayer].talkNPC].type != 18) + return; + SoundEngine.PlaySound(12); + if (num4 > 0) + { + if (Main.player[Main.myPlayer].BuyItem(num4)) + { + AchievementsHelper.HandleNurseService(num4); + SoundEngine.PlaySound(SoundID.Item4); + Main.player[Main.myPlayer].HealEffect(Main.player[Main.myPlayer].statLifeMax2 - Main.player[Main.myPlayer].statLife); + Main.npcChatText = (double) Main.player[Main.myPlayer].statLife >= (double) Main.player[Main.myPlayer].statLifeMax2 * 0.25 ? ((double) Main.player[Main.myPlayer].statLife >= (double) Main.player[Main.myPlayer].statLifeMax2 * 0.5 ? ((double) Main.player[Main.myPlayer].statLife >= (double) Main.player[Main.myPlayer].statLifeMax2 * 0.75 ? Lang.dialog(230) : Lang.dialog(229)) : Lang.dialog(228)) : Lang.dialog(227); + Main.player[Main.myPlayer].statLife = Main.player[Main.myPlayer].statLifeMax2; + for (int b = 0; b < 22; ++b) + { + int index = Main.player[Main.myPlayer].buffType[b]; + if (Main.debuff[index] && Main.player[Main.myPlayer].buffTime[b] > 0 && index != 28 && index != 34 && index != 87 && index != 89 && index != 21 && index != 86 && index != 199) + { + Main.player[Main.myPlayer].DelBuff(b); + b = -1; + } + } + } + else + { + int num20 = Main.rand.Next(3); + if (num20 == 0) + Main.npcChatText = Lang.dialog(52); + if (num20 == 1) + Main.npcChatText = Lang.dialog(53); + if (num20 != 2) + return; + Main.npcChatText = Lang.dialog(54); + } + } + else + { + int num21 = Main.rand.Next(3); + if (!ChildSafety.Disabled) + num21 = Main.rand.Next(1, 3); + switch (num21) + { + case 0: + Main.npcChatText = Lang.dialog(55); + break; + case 1: + Main.npcChatText = Lang.dialog(56); + break; + case 2: + Main.npcChatText = Lang.dialog(57); + break; + } + } + } + } + else if (Main.npcChatFocus4) + { + Main.npcChatCornerItem = 0; + SoundEngine.PlaySound(12); + Main.npcChatText = Main.player[Main.myPlayer].currentShoppingSettings.HappinessReport; + } + else + { + if (!Main.npcChatFocus3 || Main.player[Main.myPlayer].talkNPC < 0) + return; + if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 20) + { + SoundEngine.PlaySound(12); + Main.npcChatText = Lang.GetDryadWorldStatusDialog(); + } + if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 208) + { + SoundEngine.PlaySound(12); + Main.npcChatText = Language.GetTextValue("PartyGirlSpecialText.Music" + (object) Main.rand.Next(1, 4)); + Main.swapMusic = !Main.swapMusic; + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 22) + { + Main.playerInventory = true; + Main.npcChatText = ""; + SoundEngine.PlaySound(12); + Main.InGuideCraftMenu = true; + UILinkPointNavigator.GoToDefaultPage(); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 107) + { + Main.playerInventory = true; + Main.npcChatText = ""; + SoundEngine.PlaySound(12); + Main.InReforgeMenu = true; + UILinkPointNavigator.GoToDefaultPage(); + } + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 353) + Main.OpenHairWindow(); + else if (Main.npc[Main.player[Main.myPlayer].talkNPC].type == 207) + { + Main.npcChatCornerItem = 0; + SoundEngine.PlaySound(12); + bool gotDye = false; + int index = Main.player[Main.myPlayer].FindItem(ItemID.Sets.ExoticPlantsForDyeTrade); + if (index != -1) + { + --Main.player[Main.myPlayer].inventory[index].stack; + if (Main.player[Main.myPlayer].inventory[index].stack <= 0) + Main.player[Main.myPlayer].inventory[index] = new Item(); + gotDye = true; + SoundEngine.PlaySound(24); + Main.player[Main.myPlayer].GetDyeTraderReward(); + } + Main.npcChatText = Lang.DyeTraderQuestChat(gotDye); + } + else + { + if (Main.npc[Main.player[Main.myPlayer].talkNPC].type != 550) + return; + SoundEngine.PlaySound(12); + Main.HelpText(); + Main.npcChatText = Lang.BartenderHelpText(Main.npc[Main.player[Main.myPlayer].talkNPC]); + } + } + } + } + + private void OpenShop(int shopIndex) + { + Main.playerInventory = true; + Main.stackSplit = 9999; + Main.npcChatText = ""; + Main.SetNPCShopIndex(shopIndex); + this.shop[Main.npcShop].SetupShop(Main.npcShop); + SoundEngine.PlaySound(12); + } + + public static void SetNPCShopIndex(int index) => Main.npcShop = index; + + private static void DrawNPCChatButtons( + int superColor, + Microsoft.Xna.Framework.Color chatColor, + int numLines, + string focusText, + string focusText3) + { + float y = (float) (130 + numLines * 30); + int num1 = 180 + (Main.screenWidth - 800) / 2; + Vector2 vec = new Vector2((float) Main.mouseX, (float) Main.mouseY); + Player player = Main.player[Main.myPlayer]; + Vector2 vector2_1 = new Vector2((float) num1, y); + string text1 = focusText; + DynamicSpriteFont font1 = FontAssets.MouseText.Value; + Vector2 minimum1 = vector2_1; + Vector2 baseScale = new Vector2(0.9f); + Vector2 stringSize1 = ChatManager.GetStringSize(font1, text1, baseScale); + Microsoft.Xna.Framework.Color baseColor1 = chatColor; + Microsoft.Xna.Framework.Color black = Microsoft.Xna.Framework.Color.Black; + Vector2 vector2_2 = new Vector2(1f); + Microsoft.Xna.Framework.Color brown = Microsoft.Xna.Framework.Color.Brown; + float num2 = 1.2f; + if ((double) stringSize1.X > 260.0) + vector2_2.X *= 260f / stringSize1.X; + if (vec.Between(minimum1, minimum1 + stringSize1 * baseScale * vector2_2.X) && !PlayerInput.IgnoreMouseInterface) + { + player.mouseInterface = true; + player.releaseUseItem = false; + baseScale *= num2; + if (!Main.npcChatFocus2) + SoundEngine.PlaySound(12); + Main.npcChatFocus2 = true; + } + else + { + if (Main.npcChatFocus2) + SoundEngine.PlaySound(12); + Main.npcChatFocus2 = false; + } + Microsoft.Xna.Framework.Color baseColor2 = !Main.npcChatFocus2 ? Microsoft.Xna.Framework.Color.Black : brown; + ChatManager.DrawColorCodedStringShadow(Main.spriteBatch, font1, text1, minimum1 + stringSize1 * vector2_2 * 0.5f, baseColor2, 0.0f, stringSize1 * 0.5f, baseScale * vector2_2); + ChatManager.DrawColorCodedString(Main.spriteBatch, font1, text1, minimum1 + stringSize1 * vector2_2 * 0.5f, baseColor1, 0.0f, stringSize1 * 0.5f, baseScale * vector2_2); + if (text1.Length > 0) + { + UILinkPointNavigator.SetPosition(2500, minimum1 + stringSize1 * 0.5f); + UILinkPointNavigator.Shortcuts.NPCCHAT_ButtonsLeft = true; + } + Vector2 vector2_3 = new Vector2((float) ((double) num1 + (double) stringSize1.X * (double) vector2_2.X + 30.0), y); + string text2 = Lang.inter[52].Value; + DynamicSpriteFont font2 = FontAssets.MouseText.Value; + Vector2 minimum2 = vector2_3; + baseScale = new Vector2(0.9f); + Vector2 stringSize2 = ChatManager.GetStringSize(font2, text2, baseScale); + baseColor1 = new Microsoft.Xna.Framework.Color(superColor, (int) ((double) superColor / 1.1), superColor / 2, superColor); + vector2_2 = new Vector2(1f); + if (vec.Between(minimum2, minimum2 + stringSize2 * baseScale * vector2_2.X) && !PlayerInput.IgnoreMouseInterface) + { + player.mouseInterface = true; + player.releaseUseItem = false; + baseScale *= num2; + if (!Main.npcChatFocus1) + SoundEngine.PlaySound(12); + Main.npcChatFocus1 = true; + } + else + { + if (Main.npcChatFocus1) + SoundEngine.PlaySound(12); + Main.npcChatFocus1 = false; + } + Microsoft.Xna.Framework.Color baseColor3 = !Main.npcChatFocus1 ? Microsoft.Xna.Framework.Color.Black : brown; + ChatManager.DrawColorCodedStringShadow(Main.spriteBatch, font2, text2, minimum2 + stringSize2 * vector2_2 * 0.5f, baseColor3, 0.0f, stringSize2 * 0.5f, baseScale * vector2_2); + ChatManager.DrawColorCodedString(Main.spriteBatch, font2, text2, minimum2 + stringSize2 * vector2_2 * 0.5f, baseColor1, 0.0f, stringSize2 * 0.5f, baseScale * vector2_2); + if (text2.Length > 0) + { + UILinkPointNavigator.SetPosition(2501, minimum2 + stringSize2 * 0.5f); + UILinkPointNavigator.Shortcuts.NPCCHAT_ButtonsMiddle = true; + } + if (string.IsNullOrWhiteSpace(focusText3)) + { + Main.npcChatFocus3 = false; + UILinkPointNavigator.Shortcuts.NPCCHAT_ButtonsRight = false; + } + else + { + Vector2 vector2_4 = new Vector2((float) ((double) vector2_3.X + (double) stringSize2.X * (double) vector2_2.X + 30.0), y); + string text3 = focusText3; + DynamicSpriteFont font3 = FontAssets.MouseText.Value; + Vector2 minimum3 = vector2_4; + baseScale = new Vector2(0.9f); + stringSize2 = ChatManager.GetStringSize(font3, text3, baseScale); + baseColor1 = chatColor; + vector2_2 = new Vector2(1f); + vector2_3.X = vector2_4.X; + if (vec.Between(minimum3, minimum3 + stringSize2 * baseScale * vector2_2.X) && !PlayerInput.IgnoreMouseInterface) + { + player.mouseInterface = true; + player.releaseUseItem = false; + baseScale *= num2; + if (!Main.npcChatFocus3) + SoundEngine.PlaySound(12); + Main.npcChatFocus3 = true; + } + else + { + if (Main.npcChatFocus3) + SoundEngine.PlaySound(12); + Main.npcChatFocus3 = false; + } + Microsoft.Xna.Framework.Color baseColor4 = !Main.npcChatFocus3 ? Microsoft.Xna.Framework.Color.Black : brown; + ChatManager.DrawColorCodedStringShadow(Main.spriteBatch, font3, text3, minimum3 + stringSize2 * vector2_2 * 0.5f, baseColor4, 0.0f, stringSize2 * 0.5f, baseScale * vector2_2); + ChatManager.DrawColorCodedString(Main.spriteBatch, font3, text3, minimum3 + stringSize2 * vector2_2 * 0.5f, baseColor1, 0.0f, stringSize2 * 0.5f, baseScale * vector2_2); + UILinkPointNavigator.SetPosition(2502, minimum3 + stringSize2 * 0.5f); + UILinkPointNavigator.Shortcuts.NPCCHAT_ButtonsRight = true; + } + if (Main.player[Main.myPlayer].currentShoppingSettings.HappinessReport == "") + { + Main.npcChatFocus4 = false; + UILinkPointNavigator.Shortcuts.NPCCHAT_ButtonsRight2 = false; + } + else + { + string textValue = Language.GetTextValue("UI.NPCCheckHappiness"); + Vector2 vector2_5 = new Vector2((float) ((double) vector2_3.X + (double) stringSize2.X * (double) vector2_2.X + 30.0), y); + string text4 = textValue; + DynamicSpriteFont font4 = FontAssets.MouseText.Value; + Vector2 minimum4 = vector2_5; + baseScale = new Vector2(0.9f); + Vector2 stringSize3 = ChatManager.GetStringSize(font4, text4, baseScale); + baseColor1 = new Microsoft.Xna.Framework.Color(superColor, (int) ((double) superColor / 1.1), superColor / 2, superColor); + vector2_2 = new Vector2(1f); + if (vec.Between(minimum4, minimum4 + stringSize3 * baseScale * vector2_2.X) && !PlayerInput.IgnoreMouseInterface) + { + player.mouseInterface = true; + player.releaseUseItem = false; + baseScale *= num2; + if (!Main.npcChatFocus4) + SoundEngine.PlaySound(12); + Main.npcChatFocus4 = true; + } + else + { + if (Main.npcChatFocus4) + SoundEngine.PlaySound(12); + Main.npcChatFocus4 = false; + } + Microsoft.Xna.Framework.Color baseColor5 = !Main.npcChatFocus4 ? Microsoft.Xna.Framework.Color.Black : brown; + ChatManager.DrawColorCodedStringShadow(Main.spriteBatch, font4, text4, minimum4 + stringSize3 * vector2_2 * 0.5f, baseColor5, 0.0f, stringSize3 * 0.5f, baseScale * vector2_2); + ChatManager.DrawColorCodedString(Main.spriteBatch, font4, text4, minimum4 + stringSize3 * vector2_2 * 0.5f, baseColor1, 0.0f, stringSize3 * 0.5f, baseScale * vector2_2); + UILinkPointNavigator.SetPosition(2503, minimum4 + stringSize3 * 0.5f); + UILinkPointNavigator.Shortcuts.NPCCHAT_ButtonsRight2 = true; + } + } + + public static void CloseNPCChatOrSign() + { + Main.player[Main.myPlayer].sign = -1; + Main.editSign = false; + Main.player[Main.myPlayer].SetTalkNPC(-1); + Main.npcChatCornerItem = 0; + Main.npcChatText = ""; + SoundEngine.PlaySound(11); + Main.player[Main.myPlayer].releaseMount = false; + } + + public static void SubmitSignText() + { + SoundEngine.PlaySound(12); + int sign = Main.player[Main.myPlayer].sign; + Sign.TextSign(sign, Main.npcChatText); + Main.editSign = false; + if (Main.netMode != 1) + return; + NetMessage.SendData(47, number: sign); + } + + private int NPCBannerSorter(int npcIndex1, int npcIndex2) => -Main.npc[npcIndex1].housingCategory.CompareTo(Main.npc[npcIndex2].housingCategory); + + protected void DrawNPCHousesInWorld() + { + this._npcsWithBannersToDraw.Clear(); + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].townNPC && !Main.npc[index].homeless && Main.npc[index].homeTileX > 0 && Main.npc[index].homeTileY > 0 && Main.npc[index].type != 37) + this._npcsWithBannersToDraw.Add(index); + } + this._npcsWithBannersToDraw.Sort(new Comparison(this.NPCBannerSorter)); + for (int index1 = 0; index1 < this._npcsWithBannersToDraw.Count; ++index1) + { + int n = this._npcsWithBannersToDraw[index1]; + NPC npc = Main.npc[n]; + if (npc.active && npc.townNPC && !npc.homeless && npc.homeTileX > 0 && npc.homeTileY > 0 && npc.type != 37) + { + int bannerStyle = 0; + int housingCategory = npc.housingCategory; + int homeTileX = npc.homeTileX; + int index2 = npc.homeTileY - 1; + WorldGen.TownManager.AddOccupantsToList(homeTileX, index2 + 1, this._occupantsListToDrawNPCHouses); + if (this._occupantsListToDrawNPCHouses.Contains(npc.type)) + bannerStyle = 1; + int num1 = 0; + for (int index3 = this._npcsWithBannersToDraw.Count - 1; index3 > index1; --index3) + { + int index4 = this._npcsWithBannersToDraw[index3]; + if (Main.npc[index4].homeTileX == homeTileX && Main.npc[index4].homeTileY == index2 + 1) + ++num1; + } + int num2 = num1 * 26; + if (Main.tile[homeTileX, index2] != null) + { + bool flag = false; + while (!Main.tile[homeTileX, index2].active() || !Main.tileSolid[(int) Main.tile[homeTileX, index2].type]) + { + --index2; + if (index2 >= 10) + { + if (Main.tile[homeTileX, index2] == null) + { + flag = true; + break; + } + } + else + break; + } + if (!flag) + { + int num3 = 8; + int num4 = 18; + if (Main.tile[homeTileX, index2].type == (ushort) 19) + num4 -= 8; + int y = index2 + 1; + int num5 = 0; + float num6 = (float) (y * 16) + (float) num2; + SpriteEffects effects = SpriteEffects.None; + Texture2D texture2D = TextureAssets.HouseBanner.Value; + Microsoft.Xna.Framework.Rectangle rectangle = texture2D.Frame(2, 2); + if (bannerStyle > 0) + rectangle.X += rectangle.Width * bannerStyle; + if (housingCategory > 0) + rectangle.Y += rectangle.Height * housingCategory; + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + { + float num7 = num6 - Main.screenPosition.Y; + num6 = Main.screenPosition.Y + (float) Main.screenHeight - num7 - (float) rectangle.Height; + effects = SpriteEffects.FlipVertically; + num5 = 4; + } + Main.spriteBatch.Draw(texture2D, new Vector2((float) (homeTileX * 16 - (int) Main.screenPosition.X + num3), num6 - (float) (int) Main.screenPosition.Y + (float) num4 + (float) num5), new Microsoft.Xna.Framework.Rectangle?(rectangle), Lighting.GetColor(homeTileX, y), 0.0f, new Vector2((float) (rectangle.Width / 2), (float) (rectangle.Height / 2)), 1f, effects, 0.0f); + ITownNPCProfile profile; + int index5 = !TownNPCProfiles.Instance.GetProfile(npc.type, out profile) ? NPC.TypeToDefaultHeadIndex(npc.type) : profile.GetHeadTextureIndex(npc); + float scale = 1f; + float num8 = TextureAssets.NpcHead[index5].Width() <= TextureAssets.NpcHead[index5].Height() ? (float) TextureAssets.NpcHead[index5].Height() : (float) TextureAssets.NpcHead[index5].Width(); + if ((double) num8 > 24.0) + scale = 24f / num8; + Main.spriteBatch.Draw(TextureAssets.NpcHead[index5].Value, new Vector2((float) (homeTileX * 16 - (int) Main.screenPosition.X + num3), (float) ((double) num6 - (double) (int) Main.screenPosition.Y + (double) num4 + 2.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.NpcHead[index5].Width(), TextureAssets.NpcHead[index5].Height())), Lighting.GetColor(homeTileX, y), 0.0f, new Vector2((float) (TextureAssets.NpcHead[index5].Width() / 2), (float) (TextureAssets.NpcHead[index5].Height() / 2)), scale, effects, 0.0f); + int num9 = homeTileX * 16 - (int) Main.screenPosition.X + num3 - rectangle.Width / 2; + int num10 = (int) num6 - (int) Main.screenPosition.Y + 4; + int num11 = -8; + if (Main.mouseX >= num9 && Main.mouseX <= num9 + rectangle.Width && Main.mouseY >= num10 && Main.mouseY <= num10 + rectangle.Height + num11) + { + this.MouseText(Lang.GetNPCHouseBannerText(npc, bannerStyle)); + if (Main.mouseRightRelease && Main.mouseRight) + { + Main.mouseRightRelease = false; + WorldGen.kickOut(n); + SoundEngine.PlaySound(12); + } + } + } + } + } + } + } + + public void DrawWindowsIMEPanel(Vector2 position, float xAnchor = 0.0f) + { + if (!Platform.Get().IsCandidateListVisible) + return; + List stringList = new List(); + for (uint index = 0; index < Platform.Get().CandidateCount; ++index) + { + string candidate = Platform.Get().GetCandidate(index); + stringList.Add(candidate); + } + if (stringList.Count == 0) + return; + uint selectedCandidate = Platform.Get().SelectedCandidate; + DynamicSpriteFont dynamicSpriteFont = FontAssets.MouseText.Value; + float scale = 0.85f; + float num1 = 14f; + float num2 = 0.0f; + int num3 = 32; + float width = num2 + num1; + string str1 = "{0,2}: {1}"; + string str2 = " "; + for (int index = 0; index < stringList.Count; ++index) + { + int num4 = index + 1; + string format = str1; + if (index < stringList.Count - 1) + format += str2; + width = width + dynamicSpriteFont.MeasureString(string.Format(format, (object) num4, (object) stringList[index])).X * scale + num1; + } + Vector2 vector2_1 = new Vector2(width * -xAnchor, 0.0f); + Utils.DrawSettings2Panel(Main.spriteBatch, position + vector2_1 + new Vector2(0.0f, (float) -num3), width, new Microsoft.Xna.Framework.Color(63, 65, 151, (int) byte.MaxValue) * 0.785f); + Vector2 pos = position + new Vector2(10f, (float) (-num3 / 2)) + vector2_1; + for (uint index = 0; (long) index < (long) stringList.Count; ++index) + { + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.Gray; + if ((int) index == (int) selectedCandidate) + color = Microsoft.Xna.Framework.Color.White; + uint num5 = index + 1U; + string format = str1; + if ((long) index < (long) (stringList.Count - 1)) + format += str2; + string text = string.Format(format, (object) num5, (object) stringList[(int) index]); + Vector2 vector2_2 = dynamicSpriteFont.MeasureString(text) * scale; + Utils.DrawBorderString(Main.spriteBatch, text, pos, color, scale, anchory: 0.4f); + pos.X += vector2_2.X + num1; + } + } + + public void HandleIME() + { + if (this._imeToggle == PlayerInput.WritingText) + return; + this._imeToggle = PlayerInput.WritingText; + if (this._imeToggle) + Platform.Get().Enable(); + else + Platform.Get().Disable(); + } + + protected void DrawPlayerChat() + { + TextSnippet[] snippets = (TextSnippet[]) null; + if (Main.drawingPlayerChat) + PlayerInput.WritingText = true; + this.HandleIME(); + if (Main.drawingPlayerChat) + { + ++this.textBlinkerCount; + if (this.textBlinkerCount >= 20) + { + this.textBlinkerState = this.textBlinkerState != 0 ? 0 : 1; + this.textBlinkerCount = 0; + } + string chatText = Main.chatText; + if (Main.screenWidth > 800) + { + int num1 = Main.screenWidth - 300; + int num2 = 78; + Main.spriteBatch.Draw(TextureAssets.TextBack.Value, new Vector2((float) num2, (float) (Main.screenHeight - 36)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.TextBack.Width() - 100, TextureAssets.TextBack.Height())), new Microsoft.Xna.Framework.Color(100, 100, 100, 100), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + int num3 = num1 - 400; + int num4 = num2 + 400; + while (num3 > 0) + { + if (num3 > 300) + { + Main.spriteBatch.Draw(TextureAssets.TextBack.Value, new Vector2((float) num4, (float) (Main.screenHeight - 36)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(100, 0, TextureAssets.TextBack.Width() - 200, TextureAssets.TextBack.Height())), new Microsoft.Xna.Framework.Color(100, 100, 100, 100), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + num3 -= 300; + num4 += 300; + } + else + { + Main.spriteBatch.Draw(TextureAssets.TextBack.Value, new Vector2((float) num4, (float) (Main.screenHeight - 36)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(TextureAssets.TextBack.Width() - num3, 0, TextureAssets.TextBack.Width() - (TextureAssets.TextBack.Width() - num3), TextureAssets.TextBack.Height())), new Microsoft.Xna.Framework.Color(100, 100, 100, 100), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + num3 = 0; + } + } + } + else + Main.spriteBatch.Draw(TextureAssets.TextBack.Value, new Vector2(78f, (float) (Main.screenHeight - 36)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.TextBack.Width(), TextureAssets.TextBack.Height())), new Microsoft.Xna.Framework.Color(100, 100, 100, 100), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + int hoveredSnippet = -1; + List message = ChatManager.ParseMessage(chatText, Microsoft.Xna.Framework.Color.White); + string compositionString = Platform.Get().CompositionString; + if (compositionString != null && compositionString.Length > 0) + message.Add(new TextSnippet(compositionString, new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 240, 20))); + if (this.textBlinkerState == 1) + message.Add(new TextSnippet("|", Microsoft.Xna.Framework.Color.White)); + snippets = message.ToArray(); + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, FontAssets.MouseText.Value, snippets, new Vector2(88f, (float) (Main.screenHeight - 30)), 0.0f, Vector2.Zero, Vector2.One, out hoveredSnippet); + if (hoveredSnippet > -1) + { + snippets[hoveredSnippet].OnHover(); + if (Main.mouseLeft && Main.mouseLeftRelease) + snippets[hoveredSnippet].OnClick(); + } + } + Main.chatMonitor.DrawChat(Main.drawingPlayerChat); + if (Main.drawingPlayerChat && snippets != null) + { + Vector2 stringSize = ChatManager.GetStringSize(FontAssets.MouseText.Value, snippets, Vector2.Zero); + this.DrawWindowsIMEPanel(new Vector2(88f, (float) (Main.screenHeight - 30)) + new Vector2(stringSize.X + 10f, -6f)); + } + TimeLogger.DetailedDrawTime(10); + } + + public static bool ShouldPVPDraw => Main.netMode == 1; + + protected void DrawInventory() + { + Recipe.GetThroughDelayedFindRecipes(); + if (Main.ShouldPVPDraw) + Main.DrawPVPIcons(); + int pivotTopLeftX = 0; + int pivotTopLeftY = 0; + int screenWidth1 = Main.screenWidth; + int num1 = 0; + int screenWidth2 = Main.screenWidth; + int num2 = 0; + Vector2 vector2_1 = new Vector2((float) pivotTopLeftX, (float) pivotTopLeftY); + Vector2 vector2_2 = new Vector2((float) screenWidth1, (float) num1); + Vector2 vector2_3 = new Vector2((float) screenWidth2, (float) num2); + Main.DrawBestiaryIcon(pivotTopLeftX, pivotTopLeftY); + Main.DrawEmoteBubblesButton(pivotTopLeftX, pivotTopLeftY); + Main.DrawTrashItemSlot(pivotTopLeftX, pivotTopLeftY); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, Lang.inter[4].Value, new Vector2(40f, 0.0f) + vector2_1, new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + Main.inventoryScale = 0.85f; + if (Main.mouseX > 20 && Main.mouseX < (int) (20.0 + 560.0 * (double) Main.inventoryScale) && Main.mouseY > 20 && Main.mouseY < (int) (20.0 + 280.0 * (double) Main.inventoryScale) && !PlayerInput.IgnoreMouseInterface) + Main.player[Main.myPlayer].mouseInterface = true; + for (int index1 = 0; index1 < 10; ++index1) + { + for (int index2 = 0; index2 < 5; ++index2) + { + int num3 = (int) (20.0 + (double) (index1 * 56) * (double) Main.inventoryScale) + pivotTopLeftX; + int num4 = (int) (20.0 + (double) (index2 * 56) * (double) Main.inventoryScale) + pivotTopLeftY; + int slot = index1 + index2 * 10; + Microsoft.Xna.Framework.Color color = new Microsoft.Xna.Framework.Color(100, 100, 100, 100); + if (Main.mouseX >= num3 && (double) Main.mouseX <= (double) num3 + (double) TextureAssets.InventoryBack.Width() * (double) Main.inventoryScale && Main.mouseY >= num4 && (double) Main.mouseY <= (double) num4 + (double) TextureAssets.InventoryBack.Height() * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + ItemSlot.OverrideHover(Main.player[Main.myPlayer].inventory, slot: slot); + if (Main.player[Main.myPlayer].inventoryChestStack[slot] && (Main.player[Main.myPlayer].inventory[slot].type == 0 || Main.player[Main.myPlayer].inventory[slot].stack == 0)) + Main.player[Main.myPlayer].inventoryChestStack[slot] = false; + if (!Main.player[Main.myPlayer].inventoryChestStack[slot]) + { + ItemSlot.LeftClick(Main.player[Main.myPlayer].inventory, slot: slot); + ItemSlot.RightClick(Main.player[Main.myPlayer].inventory, slot: slot); + if (Main.mouseLeftRelease && Main.mouseLeft) + Recipe.FindRecipes(); + } + ItemSlot.MouseHover(Main.player[Main.myPlayer].inventory, slot: slot); + } + ItemSlot.Draw(Main.spriteBatch, Main.player[Main.myPlayer].inventory, 0, slot, new Vector2((float) num3, (float) num4)); + } + } + int totalDrawnIcons; + Main.GetBuilderAccsCountToShow(Main.LocalPlayer, out int _, out int _, out totalDrawnIcons); + bool pushSideToolsUp = totalDrawnIcons >= 10; + if (!PlayerInput.UsingGamepad) + this.DrawHotbarLockIcon(pivotTopLeftX, pivotTopLeftY, pushSideToolsUp); + ItemSlot.DrawRadialDpad(Main.spriteBatch, new Vector2(20f) + new Vector2((float) (56.0 * (double) Main.inventoryScale * 10.0), (float) (56.0 * (double) Main.inventoryScale * 5.0)) + new Vector2(26f, 70f) + vector2_1); + if (this._achievementAdvisor.CanDrawAboveCoins) + { + int num5 = (int) (20.0 + 560.0 * (double) Main.inventoryScale) + pivotTopLeftX; + int num6 = (int) (20.0 + 0.0 * (double) Main.inventoryScale) + pivotTopLeftY; + this._achievementAdvisor.DrawOneAchievement(Main.spriteBatch, new Vector2((float) num5, (float) num6) + new Vector2(5f), true); + } + if (Main.mapEnabled) + { + bool flag = false; + int num7 = screenWidth1 - 440; + int num8 = 40 + num1; + if (Main.screenWidth < 940) + flag = true; + if (flag) + { + num7 = screenWidth2 - 40; + num8 = num2 - 200; + } + int num9 = 0; + for (int index3 = 0; index3 < 4; ++index3) + { + int num10 = num7 + index3 * 32 - num9; + int num11 = num8; + if (flag) + { + num10 = num7; + num11 = num8 + index3 * 32 - num9; + } + int index4 = index3; + int num12 = 120; + if (index3 > 0 && Main.mapStyle == index3 - 1) + num12 = 200; + if (Main.mouseX >= num10 && Main.mouseX <= num10 + 32 && Main.mouseY >= num11 && Main.mouseY <= num11 + 30 && !PlayerInput.IgnoreMouseInterface) + { + num12 = (int) byte.MaxValue; + index4 += 4; + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + if (index3 == 0) + { + Main.playerInventory = false; + Main.player[Main.myPlayer].SetTalkNPC(-1); + Main.npcChatCornerItem = 0; + SoundEngine.PlaySound(10); + Main.mapFullscreenScale = 2.5f; + Main.mapFullscreen = true; + Main.resetMapFull = true; + } + if (index3 == 1) + { + Main.mapStyle = 0; + SoundEngine.PlaySound(12); + } + if (index3 == 2) + { + Main.mapStyle = 1; + SoundEngine.PlaySound(12); + } + if (index3 == 3) + { + Main.mapStyle = 2; + SoundEngine.PlaySound(12); + } + } + } + Main.spriteBatch.Draw(TextureAssets.MapIcon[index4].Value, new Vector2((float) num10, (float) num11), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.MapIcon[index4].Width(), TextureAssets.MapIcon[index4].Height())), new Microsoft.Xna.Framework.Color(num12, num12, num12, num12), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + if (Main.armorHide) + { + Main.armorAlpha -= 0.1f; + if ((double) Main.armorAlpha < 0.0) + Main.armorAlpha = 0.0f; + } + else + { + Main.armorAlpha += 0.025f; + if ((double) Main.armorAlpha > 1.0) + Main.armorAlpha = 1f; + } + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color((int) (byte) ((double) Main.mouseTextColor * (double) Main.armorAlpha), (int) (byte) ((double) Main.mouseTextColor * (double) Main.armorAlpha), (int) (byte) ((double) Main.mouseTextColor * (double) Main.armorAlpha), (int) (byte) ((double) Main.mouseTextColor * (double) Main.armorAlpha)); + Main.armorHide = false; + int num13 = 8 + Main.player[Main.myPlayer].GetAmountOfExtraAccessorySlotsToShow(); + int num14 = 174 + Main.mH; + int num15 = 950; + Main._cannotDrawAccessoriesHorizontally = false; + if (Main.screenHeight < num15 && num13 >= 10) + { + num14 -= (int) (56.0 * (double) Main.inventoryScale * (double) (num13 - 9)); + Main._cannotDrawAccessoriesHorizontally = true; + } + int num16 = Main.DrawPageIcons(num14 - 32); + if (num16 > -1) + { + Main.HoverItem = new Item(); + switch (num16) + { + case 1: + Main.hoverItemName = Lang.inter[80].Value; + break; + case 2: + Main.hoverItemName = Lang.inter[79].Value; + break; + case 3: + Main.hoverItemName = Main.CaptureModeDisabled ? Lang.inter[115].Value : Lang.inter[81].Value; + break; + } + } + switch (Main.EquipPage) + { + case 1: + this.DrawNPCHousesInUI(); + break; + case 2: + Microsoft.Xna.Framework.Point point1 = new Microsoft.Xna.Framework.Point(Main.mouseX, Main.mouseY); + Microsoft.Xna.Framework.Rectangle r1 = new Microsoft.Xna.Framework.Rectangle(0, 0, (int) ((double) TextureAssets.InventoryBack.Width() * (double) Main.inventoryScale), (int) ((double) TextureAssets.InventoryBack.Height() * (double) Main.inventoryScale)); + Item[] inv = Main.player[Main.myPlayer].miscEquips; + int num17 = Main.screenWidth - 92; + int num18 = Main.mH + 174; + for (int index = 0; index < 2; ++index) + { + if (index == 0) + inv = Main.player[Main.myPlayer].miscEquips; + else if (index == 1) + inv = Main.player[Main.myPlayer].miscDyes; + r1.X = num17 + index * -47; + for (int slot = 0; slot < 5; ++slot) + { + int context = 0; + int key = -1; + switch (slot) + { + case 0: + context = 19; + key = 0; + break; + case 1: + context = 20; + key = 1; + break; + case 2: + context = 18; + break; + case 3: + context = 17; + break; + case 4: + context = 16; + break; + } + if (index == 1) + { + context = 12; + key = -1; + } + r1.Y = num18 + slot * 47; + Texture2D texture = TextureAssets.InventoryTickOn.Value; + if (Main.player[Main.myPlayer].hideMisc[key]) + texture = TextureAssets.InventoryTickOff.Value; + Microsoft.Xna.Framework.Rectangle r2 = new Microsoft.Xna.Framework.Rectangle(r1.Left + 34, r1.Top - 2, texture.Width, texture.Height); + int num19 = 0; + bool flag = false; + if (r2.Contains(point1) && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + flag = true; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + if (key == 0) + Main.player[Main.myPlayer].TogglePet(); + if (key == 1) + Main.player[Main.myPlayer].ToggleLight(); + Main.mouseLeftRelease = false; + SoundEngine.PlaySound(12); + if (Main.netMode == 1) + NetMessage.SendData(4, number: Main.myPlayer); + } + num19 = !Main.player[Main.myPlayer].hideMisc[key] ? 1 : 2; + } + if (r1.Contains(point1) && !flag && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + Main.armorHide = true; + ItemSlot.Handle(inv, context, slot); + } + ItemSlot.Draw(Main.spriteBatch, inv, context, slot, r1.TopLeft()); + if (key != -1) + { + Main.spriteBatch.Draw(texture, r2.TopLeft(), Microsoft.Xna.Framework.Color.White * 0.7f); + if (num19 > 0) + { + Main.HoverItem = new Item(); + Main.hoverItemName = Lang.inter[58 + num19].Value; + } + } + } + } + int num20 = num18 + 247; + int num21 = num17 + 8; + int drawBuffText = -1; + int num22 = 0; + int num23 = 3; + int num24 = 260; + if (Main.screenHeight > 630 + num24 * (Main.mapStyle == 1).ToInt()) + ++num23; + if (Main.screenHeight > 680 + num24 * (Main.mapStyle == 1).ToInt()) + ++num23; + if (Main.screenHeight > 730 + num24 * (Main.mapStyle == 1).ToInt()) + ++num23; + int num25 = 46; + for (int buffSlotOnPlayer = 0; buffSlotOnPlayer < 22; ++buffSlotOnPlayer) + { + if (Main.player[Main.myPlayer].buffType[buffSlotOnPlayer] != 0) + { + int num26 = num22 / num23; + int num27 = num22 % num23; + Microsoft.Xna.Framework.Point point2 = new Microsoft.Xna.Framework.Point(num21 + num26 * -num25, num20 + num27 * num25); + drawBuffText = Main.DrawBuffIcon(drawBuffText, buffSlotOnPlayer, point2.X, point2.Y); + UILinkPointNavigator.SetPosition(9000 + num22, new Vector2((float) (point2.X + 30), (float) (point2.Y + 30))); + ++num22; + if ((double) Main.buffAlpha[buffSlotOnPlayer] < 0.649999976158142) + Main.buffAlpha[buffSlotOnPlayer] = 0.65f; + } + } + UILinkPointNavigator.Shortcuts.BUFFS_DRAWN = num22; + UILinkPointNavigator.Shortcuts.BUFFS_PER_COLUMN = num23; + if (drawBuffText >= 0) + { + int index = Main.player[Main.myPlayer].buffType[drawBuffText]; + if (index > 0) + { + string buffName = Lang.GetBuffName(index); + string buffTooltip = Main.GetBuffTooltip(Main.player[Main.myPlayer], index); + if (index == 147) + Main.bannerMouseOver = true; + if (Main.meleeBuff[index]) + { + this.MouseTextHackZoom(buffName, -10, buffTooltip: buffTooltip); + break; + } + this.MouseTextHackZoom(buffName, buffTooltip); + break; + } + break; + } + break; + default: + int num28 = 4; + if (Main.mouseX > Main.screenWidth - 64 - 28 && Main.mouseX < (int) ((double) (Main.screenWidth - 64 - 28) + 56.0 * (double) Main.inventoryScale) && Main.mouseY > num14 && Main.mouseY < (int) ((double) num14 + 448.0 * (double) Main.inventoryScale) && !PlayerInput.IgnoreMouseInterface) + Main.player[Main.myPlayer].mouseInterface = true; + float inventoryScale = Main.inventoryScale; + bool flag1 = false; + int num29 = num13 - 1; + bool flag2 = Main.LocalPlayer.CanDemonHeartAccessoryBeShown(); + bool flag3 = Main.LocalPlayer.CanMasterModeAccessoryBeShown(); + if (Main._settingsButtonIsPushedToSide) + --num29; + int num30 = num29 - 1; + Microsoft.Xna.Framework.Color inventoryBack1 = Main.inventoryBack; + Microsoft.Xna.Framework.Color color2 = new Microsoft.Xna.Framework.Color(80, 80, 80, 80); + int num31 = -1; + for (int slot = 0; slot < 10; ++slot) + { + if ((slot != 8 || flag2) && (slot != 9 || flag3)) + { + ++num31; + bool flag4 = Main.LocalPlayer.IsAValidEquipmentSlotForIteration(slot); + if (!flag4) + flag1 = true; + int inventoryX = Main.screenWidth - 64 - 28; + int inventoryY = (int) ((double) num14 + (double) (num31 * 56) * (double) Main.inventoryScale); + Microsoft.Xna.Framework.Color color3 = new Microsoft.Xna.Framework.Color(100, 100, 100, 100); + int x = Main.screenWidth - 58; + int y = (int) ((double) (num14 - 2) + (double) (num31 * 56) * (double) Main.inventoryScale); + int context = 8; + if (slot > 2) + { + inventoryY += num28; + y += num28; + context = 10; + } + if (num31 == num30 && !this._achievementAdvisor.CanDrawAboveCoins) + { + this._achievementAdvisor.DrawOneAchievement(Main.spriteBatch, new Vector2((float) (inventoryX - 10 - 47 - 47 - 14 - 14), (float) (inventoryY + 8)), false); + UILinkPointNavigator.SetPosition(1570, new Vector2((float) (inventoryX - 10 - 47 - 47 - 14 - 14), (float) (inventoryY + 8)) + new Vector2(20f) * Main.inventoryScale); + } + if (num31 == num29) + Main.DrawDefenseCounter(inventoryX, inventoryY); + Texture2D texture = TextureAssets.InventoryTickOn.Value; + if (Main.player[Main.myPlayer].hideVisibleAccessory[slot]) + texture = TextureAssets.InventoryTickOff.Value; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(x, y, texture.Width, texture.Height); + int num32 = 0; + if (slot > 2 && rectangle.Contains(new Microsoft.Xna.Framework.Point(Main.mouseX, Main.mouseY)) && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + Main.player[Main.myPlayer].hideVisibleAccessory[slot] = !Main.player[Main.myPlayer].hideVisibleAccessory[slot]; + SoundEngine.PlaySound(12); + if (Main.netMode == 1) + NetMessage.SendData(4, number: Main.myPlayer); + } + num32 = !Main.player[Main.myPlayer].hideVisibleAccessory[slot] ? 1 : 2; + } + else if (Main.mouseX >= inventoryX && (double) Main.mouseX <= (double) inventoryX + (double) TextureAssets.InventoryBack.Width() * (double) Main.inventoryScale && Main.mouseY >= inventoryY && (double) Main.mouseY <= (double) inventoryY + (double) TextureAssets.InventoryBack.Height() * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + { + Main.armorHide = true; + Main.player[Main.myPlayer].mouseInterface = true; + ItemSlot.OverrideHover(Main.player[Main.myPlayer].armor, context, slot); + if ((flag4 ? 0 : (!Main.mouseItem.IsAir ? 1 : 0)) == 0) + ItemSlot.LeftClick(Main.player[Main.myPlayer].armor, context, slot); + ItemSlot.MouseHover(Main.player[Main.myPlayer].armor, context, slot); + } + if (flag1) + Main.inventoryBack = color2; + ItemSlot.Draw(Main.spriteBatch, Main.player[Main.myPlayer].armor, context, slot, new Vector2((float) inventoryX, (float) inventoryY)); + if (slot > 2) + { + Main.spriteBatch.Draw(texture, new Vector2((float) x, (float) y), Microsoft.Xna.Framework.Color.White * 0.7f); + if (num32 > 0) + { + Main.HoverItem = new Item(); + Main.hoverItemName = Lang.inter[58 + num32].Value; + } + } + } + } + Main.inventoryBack = inventoryBack1; + if (Main.mouseX > Main.screenWidth - 64 - 28 - 47 && Main.mouseX < (int) ((double) (Main.screenWidth - 64 - 20 - 47) + 56.0 * (double) Main.inventoryScale) && Main.mouseY > num14 && Main.mouseY < (int) ((double) num14 + 168.0 * (double) Main.inventoryScale) && !PlayerInput.IgnoreMouseInterface) + Main.player[Main.myPlayer].mouseInterface = true; + int num33 = -1; + for (int slot = 10; slot < 20; ++slot) + { + if ((slot != 18 || flag2) && (slot != 19 || flag3)) + { + ++num33; + int num34 = Main.LocalPlayer.IsAValidEquipmentSlotForIteration(slot) ? 1 : 0; + bool flag5 = num34 == 0; + bool flag6 = num34 == 0 && !Main.mouseItem.IsAir; + int num35 = Main.screenWidth - 64 - 28 - 47; + int num36 = (int) ((double) num14 + (double) (num33 * 56) * (double) Main.inventoryScale); + Microsoft.Xna.Framework.Color color4 = new Microsoft.Xna.Framework.Color(100, 100, 100, 100); + if (slot > 12) + num36 += num28; + int context = 9; + if (slot > 12) + context = 11; + if (Main.mouseX >= num35 && (double) Main.mouseX <= (double) num35 + (double) TextureAssets.InventoryBack.Width() * (double) Main.inventoryScale && Main.mouseY >= num36 && (double) Main.mouseY <= (double) num36 + (double) TextureAssets.InventoryBack.Height() * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + Main.armorHide = true; + ItemSlot.OverrideHover(Main.player[Main.myPlayer].armor, context, slot); + if (!flag6) + { + ItemSlot.LeftClick(Main.player[Main.myPlayer].armor, context, slot); + ItemSlot.RightClick(Main.player[Main.myPlayer].armor, context, slot); + } + ItemSlot.MouseHover(Main.player[Main.myPlayer].armor, context, slot); + } + if (flag5) + Main.inventoryBack = color2; + ItemSlot.Draw(Main.spriteBatch, Main.player[Main.myPlayer].armor, context, slot, new Vector2((float) num35, (float) num36)); + } + } + Main.inventoryBack = inventoryBack1; + if (Main.mouseX > Main.screenWidth - 64 - 28 - 47 && Main.mouseX < (int) ((double) (Main.screenWidth - 64 - 20 - 47) + 56.0 * (double) Main.inventoryScale) && Main.mouseY > num14 && Main.mouseY < (int) ((double) num14 + 168.0 * (double) Main.inventoryScale) && !PlayerInput.IgnoreMouseInterface) + Main.player[Main.myPlayer].mouseInterface = true; + int num37 = -1; + for (int slot = 0; slot < 10; ++slot) + { + if ((slot != 8 || flag2) && (slot != 9 || flag3)) + { + ++num37; + int num38 = Main.LocalPlayer.IsAValidEquipmentSlotForIteration(slot) ? 1 : 0; + bool flag7 = num38 == 0; + bool flag8 = num38 == 0 && !Main.mouseItem.IsAir; + int num39 = Main.screenWidth - 64 - 28 - 47 - 47; + int num40 = (int) ((double) num14 + (double) (num37 * 56) * (double) Main.inventoryScale); + Microsoft.Xna.Framework.Color color5 = new Microsoft.Xna.Framework.Color(100, 100, 100, 100); + if (slot > 2) + num40 += num28; + if (Main.mouseX >= num39 && (double) Main.mouseX <= (double) num39 + (double) TextureAssets.InventoryBack.Width() * (double) Main.inventoryScale && Main.mouseY >= num40 && (double) Main.mouseY <= (double) num40 + (double) TextureAssets.InventoryBack.Height() * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + Main.armorHide = true; + ItemSlot.OverrideHover(Main.player[Main.myPlayer].dye, 12, slot); + if (!flag8) + { + if (Main.mouseRightRelease && Main.mouseRight) + ItemSlot.RightClick(Main.player[Main.myPlayer].dye, 12, slot); + ItemSlot.LeftClick(Main.player[Main.myPlayer].dye, 12, slot); + } + ItemSlot.MouseHover(Main.player[Main.myPlayer].dye, 12, slot); + } + if (flag7) + Main.inventoryBack = color2; + ItemSlot.Draw(Main.spriteBatch, Main.player[Main.myPlayer].dye, 12, slot, new Vector2((float) num39, (float) num40)); + } + } + Main.inventoryBack = inventoryBack1; + Main.inventoryScale = inventoryScale; + break; + } + int adjY = (Main.screenHeight - 600) / 2; + int num41 = (int) ((double) Main.screenHeight / 600.0 * 250.0); + if (Main.screenHeight < 700) + { + adjY = (Main.screenHeight - 508) / 2; + num41 = (int) ((double) Main.screenHeight / 600.0 * 200.0); + } + else if (Main.screenHeight < 850) + num41 = (int) ((double) Main.screenHeight / 600.0 * 225.0); + if (Main.craftingHide) + { + Main.craftingAlpha -= 0.1f; + if ((double) Main.craftingAlpha < 0.0) + Main.craftingAlpha = 0.0f; + } + else + { + Main.craftingAlpha += 0.025f; + if ((double) Main.craftingAlpha > 1.0) + Main.craftingAlpha = 1f; + } + Microsoft.Xna.Framework.Color craftingTipColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) Main.mouseTextColor * (double) Main.craftingAlpha), (int) (byte) ((double) Main.mouseTextColor * (double) Main.craftingAlpha), (int) (byte) ((double) Main.mouseTextColor * (double) Main.craftingAlpha), (int) (byte) ((double) Main.mouseTextColor * (double) Main.craftingAlpha)); + Main.craftingHide = false; + if (Main.InReforgeMenu) + { + if (Main.mouseReforge) + { + if ((double) Main.reforgeScale < 1.0) + Main.reforgeScale += 0.02f; + } + else if ((double) Main.reforgeScale > 1.0) + Main.reforgeScale -= 0.02f; + if (Main.player[Main.myPlayer].chest != -1 || Main.npcShop != 0 || Main.player[Main.myPlayer].talkNPC == -1 || Main.InGuideCraftMenu) + { + Main.InReforgeMenu = false; + Main.player[Main.myPlayer].dropItemCheck(); + Recipe.FindRecipes(); + } + else + { + int num42 = 50; + int num43 = 270; + string text1 = Lang.inter[46].Value + ": "; + if (Main.reforgeItem.type > 0) + { + int num44 = Main.reforgeItem.value; + if (Main.player[Main.myPlayer].discount) + num44 = (int) ((double) num44 * 0.8); + int price = (int) ((double) num44 * Main.player[Main.myPlayer].currentShoppingSettings.PriceAdjustment) / 3; + string text2 = ""; + int num45 = 0; + int num46 = 0; + int num47 = 0; + int num48 = 0; + int num49 = price; + if (num49 < 1) + num49 = 1; + if (num49 >= 1000000) + { + num45 = num49 / 1000000; + num49 -= num45 * 1000000; + } + if (num49 >= 10000) + { + num46 = num49 / 10000; + num49 -= num46 * 10000; + } + if (num49 >= 100) + { + num47 = num49 / 100; + num49 -= num47 * 100; + } + if (num49 >= 1) + num48 = num49; + if (num45 > 0) + text2 = text2 + "[c/" + Colors.AlphaDarken(Colors.CoinPlatinum).Hex3() + ":" + (object) num45 + " " + Lang.inter[15].Value + "] "; + if (num46 > 0) + text2 = text2 + "[c/" + Colors.AlphaDarken(Colors.CoinGold).Hex3() + ":" + (object) num46 + " " + Lang.inter[16].Value + "] "; + if (num47 > 0) + text2 = text2 + "[c/" + Colors.AlphaDarken(Colors.CoinSilver).Hex3() + ":" + (object) num47 + " " + Lang.inter[17].Value + "] "; + if (num48 > 0) + text2 = text2 + "[c/" + Colors.AlphaDarken(Colors.CoinCopper).Hex3() + ":" + (object) num48 + " " + Lang.inter[18].Value + "] "; + ItemSlot.DrawSavings(Main.spriteBatch, (float) (num42 + 130), (float) this.invBottom, true); + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, FontAssets.MouseText.Value, text2, new Vector2((float) (num42 + 50) + FontAssets.MouseText.Value.MeasureString(text1).X, (float) num43), Microsoft.Xna.Framework.Color.White, 0.0f, Vector2.Zero, Vector2.One); + int num50 = num42 + 70; + int num51 = num43 + 40; + int num52 = Main.mouseX <= num50 - 15 || Main.mouseX >= num50 + 15 || Main.mouseY <= num51 - 15 || Main.mouseY >= num51 + 15 ? 0 : (!PlayerInput.IgnoreMouseInterface ? 1 : 0); + Texture2D texture2D = TextureAssets.Reforge[0].Value; + if (num52 != 0) + texture2D = TextureAssets.Reforge[1].Value; + Main.spriteBatch.Draw(texture2D, new Vector2((float) num50, (float) num51), new Microsoft.Xna.Framework.Rectangle?(), Microsoft.Xna.Framework.Color.White, 0.0f, texture2D.Size() / 2f, Main.reforgeScale, SpriteEffects.None, 0.0f); + UILinkPointNavigator.SetPosition(304, new Vector2((float) num50, (float) num51) + texture2D.Size() / 4f); + if (num52 != 0) + { + Main.hoverItemName = Lang.inter[19].Value; + if (!Main.mouseReforge) + SoundEngine.PlaySound(12); + Main.mouseReforge = true; + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeftRelease && Main.mouseLeft && Main.player[Main.myPlayer].BuyItem(price)) + { + bool favorited = Main.reforgeItem.favorited; + Main.reforgeItem.netDefaults(Main.reforgeItem.netID); + Main.reforgeItem.Prefix(-2); + Main.reforgeItem.position.X = Main.player[Main.myPlayer].position.X + (float) (Main.player[Main.myPlayer].width / 2) - (float) (Main.reforgeItem.width / 2); + Main.reforgeItem.position.Y = Main.player[Main.myPlayer].position.Y + (float) (Main.player[Main.myPlayer].height / 2) - (float) (Main.reforgeItem.height / 2); + Main.reforgeItem.favorited = favorited; + PopupText.NewText(PopupTextContext.ItemReforge, Main.reforgeItem, Main.reforgeItem.stack, true); + SoundEngine.PlaySound(SoundID.Item37); + } + } + else + Main.mouseReforge = false; + } + else + text1 = Lang.inter[20].Value; + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, FontAssets.MouseText.Value, text1, new Vector2((float) (num42 + 50), (float) num43), new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor), 0.0f, Vector2.Zero, Vector2.One); + if (Main.mouseX >= num42 && (double) Main.mouseX <= (double) num42 + (double) TextureAssets.InventoryBack.Width() * (double) Main.inventoryScale && Main.mouseY >= num43 && (double) Main.mouseY <= (double) num43 + (double) TextureAssets.InventoryBack.Height() * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + Main.craftingHide = true; + ItemSlot.LeftClick(ref Main.reforgeItem, 5); + if (Main.mouseLeftRelease && Main.mouseLeft) + Recipe.FindRecipes(); + ItemSlot.RightClick(ref Main.reforgeItem, 5); + ItemSlot.MouseHover(ref Main.reforgeItem, 5); + } + ItemSlot.Draw(Main.spriteBatch, ref Main.reforgeItem, 5, new Vector2((float) num42, (float) num43)); + } + } + else if (Main.InGuideCraftMenu) + { + if (Main.player[Main.myPlayer].chest != -1 || Main.npcShop != 0 || Main.player[Main.myPlayer].talkNPC == -1 || Main.InReforgeMenu) + { + Main.InGuideCraftMenu = false; + Main.player[Main.myPlayer].dropItemCheck(); + Recipe.FindRecipes(); + } + else + { + int inventoryX; + int inventoryY; + Main.DrawGuideCraftText(adjY, craftingTipColor, out inventoryX, out inventoryY); + Microsoft.Xna.Framework.Color color6 = new Microsoft.Xna.Framework.Color(100, 100, 100, 100); + if (Main.mouseX >= inventoryX && (double) Main.mouseX <= (double) inventoryX + (double) TextureAssets.InventoryBack.Width() * (double) Main.inventoryScale && Main.mouseY >= inventoryY && (double) Main.mouseY <= (double) inventoryY + (double) TextureAssets.InventoryBack.Height() * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + Main.craftingHide = true; + ItemSlot.OverrideHover(ref Main.guideItem, 7); + ItemSlot.LeftClick(ref Main.guideItem, 7); + if (Main.mouseLeftRelease && Main.mouseLeft) + Recipe.FindRecipes(); + ItemSlot.RightClick(ref Main.guideItem, 7); + ItemSlot.MouseHover(ref Main.guideItem, 7); + } + ItemSlot.Draw(Main.spriteBatch, ref Main.guideItem, 7, new Vector2((float) inventoryX, (float) inventoryY)); + } + } + Main.CreativeMenu.Draw(Main.spriteBatch); + bool flag9 = Main.CreativeMenu.Enabled && !Main.CreativeMenu.Blocked; + if (!Main.InReforgeMenu && !Main.LocalPlayer.tileEntityAnchor.InUse && !flag9) + { + UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeBig = -1; + UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeSmall = -1; + if (Main.numAvailableRecipes > 0) + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, Lang.inter[25].Value, new Vector2(76f, (float) (414 + adjY)), craftingTipColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + for (int recipeIndex = 0; recipeIndex < Recipe.maxRecipes; ++recipeIndex) + { + Main.inventoryScale = (float) (100.0 / ((double) Math.Abs(Main.availableRecipeY[recipeIndex]) + 100.0)); + if ((double) Main.inventoryScale < 0.75) + Main.inventoryScale = 0.75f; + if (Main.recFastScroll) + Main.inventoryScale = 0.75f; + if ((double) Main.availableRecipeY[recipeIndex] < (double) ((recipeIndex - Main.focusRecipe) * 65)) + { + if ((double) Main.availableRecipeY[recipeIndex] == 0.0 && !Main.recFastScroll) + SoundEngine.PlaySound(12); + Main.availableRecipeY[recipeIndex] += 6.5f; + if (Main.recFastScroll) + Main.availableRecipeY[recipeIndex] += 130000f; + if ((double) Main.availableRecipeY[recipeIndex] > (double) ((recipeIndex - Main.focusRecipe) * 65)) + Main.availableRecipeY[recipeIndex] = (float) ((recipeIndex - Main.focusRecipe) * 65); + } + else if ((double) Main.availableRecipeY[recipeIndex] > (double) ((recipeIndex - Main.focusRecipe) * 65)) + { + if ((double) Main.availableRecipeY[recipeIndex] == 0.0 && !Main.recFastScroll) + SoundEngine.PlaySound(12); + Main.availableRecipeY[recipeIndex] -= 6.5f; + if (Main.recFastScroll) + Main.availableRecipeY[recipeIndex] -= 130000f; + if ((double) Main.availableRecipeY[recipeIndex] < (double) ((recipeIndex - Main.focusRecipe) * 65)) + Main.availableRecipeY[recipeIndex] = (float) ((recipeIndex - Main.focusRecipe) * 65); + } + else + Main.recFastScroll = false; + if (recipeIndex < Main.numAvailableRecipes && (double) Math.Abs(Main.availableRecipeY[recipeIndex]) <= (double) num41) + { + int num53 = (int) (46.0 - 26.0 * (double) Main.inventoryScale); + int num54 = (int) (410.0 + (double) Main.availableRecipeY[recipeIndex] * (double) Main.inventoryScale - 30.0 * (double) Main.inventoryScale + (double) adjY); + double num55 = (double) ((int) Main.inventoryBack.A + 50); + double num56 = (double) byte.MaxValue; + if ((double) Math.Abs(Main.availableRecipeY[recipeIndex]) > (double) num41 - 100.0) + { + num55 = 150.0 * (100.0 - ((double) Math.Abs(Main.availableRecipeY[recipeIndex]) - ((double) num41 - 100.0))) * 0.01; + num56 = (double) byte.MaxValue * (100.0 - ((double) Math.Abs(Main.availableRecipeY[recipeIndex]) - ((double) num41 - 100.0))) * 0.01; + } + Microsoft.Xna.Framework.Color color7 = new Microsoft.Xna.Framework.Color((int) (byte) num55, (int) (byte) num55, (int) (byte) num55, (int) (byte) num55); + Microsoft.Xna.Framework.Color lightColor = new Microsoft.Xna.Framework.Color((int) (byte) num56, (int) (byte) num56, (int) (byte) num56, (int) (byte) num56); + if (!Main.LocalPlayer.creativeInterface && Main.mouseX >= num53 && (double) Main.mouseX <= (double) num53 + (double) TextureAssets.InventoryBack.Width() * (double) Main.inventoryScale && Main.mouseY >= num54 && (double) Main.mouseY <= (double) num54 + (double) TextureAssets.InventoryBack.Height() * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + Main.HoverOverCraftingItemButton(recipeIndex); + if (Main.numAvailableRecipes > 0) + { + double num57 = num55 - 50.0; + if (num57 < 0.0) + num57 = 0.0; + if (recipeIndex == Main.focusRecipe) + { + UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeSmall = 0; + if (!PlayerInput.UsingGamepad) + ItemSlot.DrawGoldBGForCraftingMaterial = true; + } + else + UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeSmall = -1; + Microsoft.Xna.Framework.Color inventoryBack2 = Main.inventoryBack; + Main.inventoryBack = new Microsoft.Xna.Framework.Color((int) (byte) num57, (int) (byte) num57, (int) (byte) num57, (int) (byte) num57); + ItemSlot.Draw(Main.spriteBatch, ref Main.recipe[Main.availableRecipe[recipeIndex]].createItem, 22, new Vector2((float) num53, (float) num54), lightColor); + Main.inventoryBack = inventoryBack2; + } + } + } + if (Main.numAvailableRecipes > 0) + { + UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeBig = -1; + UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeSmall = -1; + for (int i = 0; i < Recipe.maxRequirements; ++i) + { + if (Main.recipe[Main.availableRecipe[Main.focusRecipe]].requiredItem[i].type == 0) + { + UILinkPointNavigator.Shortcuts.CRAFT_CurrentIngridientsCount = i + 1; + break; + } + int num58 = 80 + i * 40; + int num59 = 380 + adjY; + double num60 = (double) ((int) Main.inventoryBack.A + 50); + Microsoft.Xna.Framework.Color white1 = Microsoft.Xna.Framework.Color.White; + Microsoft.Xna.Framework.Color white2 = Microsoft.Xna.Framework.Color.White; + double num61 = (double) ((int) Main.inventoryBack.A + 50) - (double) Math.Abs(Main.availableRecipeY[Main.focusRecipe]) * 2.0; + double num62 = (double) byte.MaxValue - (double) Math.Abs(Main.availableRecipeY[Main.focusRecipe]) * 2.0; + if (num61 < 0.0) + num61 = 0.0; + if (num62 < 0.0) + num62 = 0.0; + white1.R = (byte) num61; + white1.G = (byte) num61; + white1.B = (byte) num61; + white1.A = (byte) num61; + white2.R = (byte) num62; + white2.G = (byte) num62; + white2.B = (byte) num62; + white2.A = (byte) num62; + Main.inventoryScale = 0.6f; + if (num61 != 0.0) + { + if (Main.mouseX >= num58 && (double) Main.mouseX <= (double) num58 + (double) TextureAssets.InventoryBack.Width() * (double) Main.inventoryScale && Main.mouseY >= num59 && (double) Main.mouseY <= (double) num59 + (double) TextureAssets.InventoryBack.Height() * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + { + Main.craftingHide = true; + Main.player[Main.myPlayer].mouseInterface = true; + Main.SetRecipeMaterialDisplayName(i); + } + double num63 = num61 - 50.0; + if (num63 < 0.0) + num63 = 0.0; + UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeSmall = 1 + i; + Microsoft.Xna.Framework.Color inventoryBack3 = Main.inventoryBack; + Main.inventoryBack = new Microsoft.Xna.Framework.Color((int) (byte) num63, (int) (byte) num63, (int) (byte) num63, (int) (byte) num63); + ItemSlot.Draw(Main.spriteBatch, ref Main.recipe[Main.availableRecipe[Main.focusRecipe]].requiredItem[i], 22, new Vector2((float) num58, (float) num59)); + Main.inventoryBack = inventoryBack3; + } + else + break; + } + } + if (Main.numAvailableRecipes == 0) + { + Main.recBigList = false; + } + else + { + int num64 = 94; + int num65 = 450 + adjY; + if (Main.InGuideCraftMenu) + num65 -= 150; + bool flag10 = Main.mouseX > num64 - 15 && Main.mouseX < num64 + 15 && Main.mouseY > num65 - 15 && Main.mouseY < num65 + 15 && !PlayerInput.IgnoreMouseInterface; + int index = Main.recBigList.ToInt() * 2 + flag10.ToInt(); + Main.spriteBatch.Draw(TextureAssets.CraftToggle[index].Value, new Vector2((float) num64, (float) num65), new Microsoft.Xna.Framework.Rectangle?(), Microsoft.Xna.Framework.Color.White, 0.0f, TextureAssets.CraftToggle[index].Value.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + if (flag10) + { + this.MouseText(Language.GetTextValue("GameUI.CraftingWindow")); + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + if (!Main.recBigList) + { + Main.recBigList = true; + SoundEngine.PlaySound(12); + } + else + { + Main.recBigList = false; + SoundEngine.PlaySound(12); + } + } + } + } + } + if (Main.recBigList && !flag9) + { + UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeBig = -1; + UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeSmall = -1; + int num66 = 42; + if ((double) Main.inventoryScale < 0.75) + Main.inventoryScale = 0.75f; + int num67 = 340; + int num68 = 310; + int num69 = (Main.screenWidth - num68 - 280) / num66; + int num70 = (Main.screenHeight - num67 - 20) / num66; + UILinkPointNavigator.Shortcuts.CRAFT_IconsPerRow = num69; + UILinkPointNavigator.Shortcuts.CRAFT_IconsPerColumn = num70; + int num71 = 0; + int num72 = 0; + int num73 = num68; + int num74 = num67; + int num75 = num68 - 20; + int num76 = num67 + 2; + if (Main.recStart > Main.numAvailableRecipes - num69 * num70) + { + Main.recStart = Main.numAvailableRecipes - num69 * num70; + if (Main.recStart < 0) + Main.recStart = 0; + } + if (Main.recStart > 0) + { + if (Main.mouseX >= num75 && Main.mouseX <= num75 + TextureAssets.CraftUpButton.Width() && Main.mouseY >= num76 && Main.mouseY <= num76 + TextureAssets.CraftUpButton.Height() && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeftRelease && Main.mouseLeft) + { + Main.recStart -= num69; + if (Main.recStart < 0) + Main.recStart = 0; + SoundEngine.PlaySound(12); + Main.mouseLeftRelease = false; + } + } + Main.spriteBatch.Draw(TextureAssets.CraftUpButton.Value, new Vector2((float) num75, (float) num76), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.CraftUpButton.Width(), TextureAssets.CraftUpButton.Height())), new Microsoft.Xna.Framework.Color(200, 200, 200, 200), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (Main.recStart < Main.numAvailableRecipes - num69 * num70) + { + int num77 = num76 + 20; + if (Main.mouseX >= num75 && Main.mouseX <= num75 + TextureAssets.CraftUpButton.Width() && Main.mouseY >= num77 && Main.mouseY <= num77 + TextureAssets.CraftUpButton.Height() && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeftRelease && Main.mouseLeft) + { + Main.recStart += num69; + SoundEngine.PlaySound(12); + if (Main.recStart > Main.numAvailableRecipes - num69) + Main.recStart = Main.numAvailableRecipes - num69; + Main.mouseLeftRelease = false; + } + } + Main.spriteBatch.Draw(TextureAssets.CraftDownButton.Value, new Vector2((float) num75, (float) num77), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.CraftUpButton.Width(), TextureAssets.CraftUpButton.Height())), new Microsoft.Xna.Framework.Color(200, 200, 200, 200), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + for (int recStart = Main.recStart; recStart < Recipe.maxRecipes && recStart < Main.numAvailableRecipes; ++recStart) + { + int num78 = num73; + int num79 = num74; + double num80 = (double) ((int) Main.inventoryBack.A + 50); + double maxValue = (double) byte.MaxValue; + Microsoft.Xna.Framework.Color color8 = new Microsoft.Xna.Framework.Color((int) (byte) num80, (int) (byte) num80, (int) (byte) num80, (int) (byte) num80); + Microsoft.Xna.Framework.Color color9 = new Microsoft.Xna.Framework.Color((int) (byte) maxValue, (int) (byte) maxValue, (int) (byte) maxValue, (int) (byte) maxValue); + if (Main.mouseX >= num78 && (double) Main.mouseX <= (double) num78 + (double) TextureAssets.InventoryBack.Width() * (double) Main.inventoryScale && Main.mouseY >= num79 && (double) Main.mouseY <= (double) num79 + (double) TextureAssets.InventoryBack.Height() * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeftRelease && Main.mouseLeft) + { + Main.focusRecipe = recStart; + Main.recFastScroll = true; + Main.recBigList = false; + SoundEngine.PlaySound(12); + Main.mouseLeftRelease = false; + if (PlayerInput.UsingGamepadUI) + { + UILinkPointNavigator.ChangePage(9); + Main.LockCraftingForThisCraftClickDuration(); + } + } + Main.craftingHide = true; + Main.hoverItemName = Main.recipe[Main.availableRecipe[recStart]].createItem.Name; + Main.HoverItem = Main.recipe[Main.availableRecipe[recStart]].createItem.Clone(); + if (Main.recipe[Main.availableRecipe[recStart]].createItem.stack > 1) + Main.hoverItemName = Main.hoverItemName + " (" + (object) Main.recipe[Main.availableRecipe[recStart]].createItem.stack + ")"; + } + if (Main.numAvailableRecipes > 0) + { + double num81 = num80 - 50.0; + if (num81 < 0.0) + num81 = 0.0; + UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeBig = recStart - Main.recStart; + Microsoft.Xna.Framework.Color inventoryBack4 = Main.inventoryBack; + Main.inventoryBack = new Microsoft.Xna.Framework.Color((int) (byte) num81, (int) (byte) num81, (int) (byte) num81, (int) (byte) num81); + ItemSlot.Draw(Main.spriteBatch, ref Main.recipe[Main.availableRecipe[recStart]].createItem, 22, new Vector2((float) num78, (float) num79)); + Main.inventoryBack = inventoryBack4; + } + num73 += num66; + ++num71; + if (num71 >= num69) + { + num73 = num68; + num74 += num66; + num71 = 0; + ++num72; + if (num72 >= num70) + break; + } + } + } + Vector2 vector2_4 = FontAssets.MouseText.Value.MeasureString("Coins"); + Vector2 vector2_5 = FontAssets.MouseText.Value.MeasureString(Lang.inter[26].Value); + float num82 = vector2_4.X / vector2_5.X; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, Lang.inter[26].Value, new Vector2(496f, (float) (84.0 + ((double) vector2_4.Y - (double) vector2_4.Y * (double) num82) / 2.0)), new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor), 0.0f, new Vector2(), 0.75f * num82, SpriteEffects.None, 0.0f); + Main.inventoryScale = 0.6f; + for (int index = 0; index < 4; ++index) + { + int num83 = 497; + int num84 = (int) (85.0 + (double) (index * 56) * (double) Main.inventoryScale + 20.0); + int slot = index + 50; + Microsoft.Xna.Framework.Color color10 = new Microsoft.Xna.Framework.Color(100, 100, 100, 100); + if (Main.mouseX >= num83 && (double) Main.mouseX <= (double) num83 + (double) TextureAssets.InventoryBack.Width() * (double) Main.inventoryScale && Main.mouseY >= num84 && (double) Main.mouseY <= (double) num84 + (double) TextureAssets.InventoryBack.Height() * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + ItemSlot.OverrideHover(Main.player[Main.myPlayer].inventory, 1, slot); + ItemSlot.LeftClick(Main.player[Main.myPlayer].inventory, 1, slot); + ItemSlot.RightClick(Main.player[Main.myPlayer].inventory, 1, slot); + if (Main.mouseLeftRelease && Main.mouseLeft) + Recipe.FindRecipes(); + ItemSlot.MouseHover(Main.player[Main.myPlayer].inventory, 1, slot); + } + ItemSlot.Draw(Main.spriteBatch, Main.player[Main.myPlayer].inventory, 1, slot, new Vector2((float) num83, (float) num84)); + } + Vector2 vector2_6 = FontAssets.MouseText.Value.MeasureString("Ammo"); + Vector2 vector2_7 = FontAssets.MouseText.Value.MeasureString(Lang.inter[27].Value); + float num85 = vector2_6.X / vector2_7.X; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, Lang.inter[27].Value, new Vector2(532f, (float) (84.0 + ((double) vector2_6.Y - (double) vector2_6.Y * (double) num85) / 2.0)), new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor), 0.0f, new Vector2(), 0.75f * num85, SpriteEffects.None, 0.0f); + Main.inventoryScale = 0.6f; + for (int index = 0; index < 4; ++index) + { + int num86 = 534; + int num87 = (int) (85.0 + (double) (index * 56) * (double) Main.inventoryScale + 20.0); + int slot = 54 + index; + Microsoft.Xna.Framework.Color color11 = new Microsoft.Xna.Framework.Color(100, 100, 100, 100); + if (Main.mouseX >= num86 && (double) Main.mouseX <= (double) num86 + (double) TextureAssets.InventoryBack.Width() * (double) Main.inventoryScale && Main.mouseY >= num87 && (double) Main.mouseY <= (double) num87 + (double) TextureAssets.InventoryBack.Height() * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + ItemSlot.OverrideHover(Main.player[Main.myPlayer].inventory, 2, slot); + ItemSlot.LeftClick(Main.player[Main.myPlayer].inventory, 2, slot); + ItemSlot.RightClick(Main.player[Main.myPlayer].inventory, 2, slot); + if (Main.mouseLeftRelease && Main.mouseLeft) + Recipe.FindRecipes(); + ItemSlot.MouseHover(Main.player[Main.myPlayer].inventory, 2, slot); + } + ItemSlot.Draw(Main.spriteBatch, Main.player[Main.myPlayer].inventory, 2, slot, new Vector2((float) num86, (float) num87)); + } + if (Main.npcShop > 0 && (!Main.playerInventory || Main.player[Main.myPlayer].talkNPC == -1)) + Main.SetNPCShopIndex(0); + if (Main.npcShop > 0 && !Main.recBigList) + { + Utils.DrawBorderStringFourWay(Main.spriteBatch, FontAssets.MouseText.Value, Lang.inter[28].Value, 504f, (float) this.invBottom, Microsoft.Xna.Framework.Color.White * ((float) Main.mouseTextColor / (float) byte.MaxValue), Microsoft.Xna.Framework.Color.Black, Vector2.Zero); + ItemSlot.DrawSavings(Main.spriteBatch, 504f, (float) this.invBottom); + Main.inventoryScale = 0.755f; + if (Main.mouseX > 73 && Main.mouseX < (int) (73.0 + 560.0 * (double) Main.inventoryScale) && Main.mouseY > this.invBottom && Main.mouseY < (int) ((double) this.invBottom + 224.0 * (double) Main.inventoryScale) && !PlayerInput.IgnoreMouseInterface) + Main.player[Main.myPlayer].mouseInterface = true; + for (int index5 = 0; index5 < 10; ++index5) + { + for (int index6 = 0; index6 < 4; ++index6) + { + int num88 = (int) (73.0 + (double) (index5 * 56) * (double) Main.inventoryScale); + int num89 = (int) ((double) this.invBottom + (double) (index6 * 56) * (double) Main.inventoryScale); + int slot = index5 + index6 * 10; + Microsoft.Xna.Framework.Color color12 = new Microsoft.Xna.Framework.Color(100, 100, 100, 100); + if (Main.mouseX >= num88 && (double) Main.mouseX <= (double) num88 + (double) TextureAssets.InventoryBack.Width() * (double) Main.inventoryScale && Main.mouseY >= num89 && (double) Main.mouseY <= (double) num89 + (double) TextureAssets.InventoryBack.Height() * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + { + ItemSlot.OverrideHover(this.shop[Main.npcShop].item, 15, slot); + Main.player[Main.myPlayer].mouseInterface = true; + ItemSlot.LeftClick(this.shop[Main.npcShop].item, 15, slot); + ItemSlot.RightClick(this.shop[Main.npcShop].item, 15, slot); + ItemSlot.MouseHover(this.shop[Main.npcShop].item, 15, slot); + } + ItemSlot.Draw(Main.spriteBatch, this.shop[Main.npcShop].item, 15, slot, new Vector2((float) num88, (float) num89)); + } + } + } + if (Main.player[Main.myPlayer].chest > -1 && !Main.tileContainer[(int) Main.tile[Main.player[Main.myPlayer].chestX, Main.player[Main.myPlayer].chestY].type]) + { + Main.player[Main.myPlayer].chest = -1; + Recipe.FindRecipes(); + } + int num90 = 0; + UIVirtualKeyboard.ShouldHideText = !PlayerInput.UsingGamepad; + if (!PlayerInput.UsingGamepad) + num90 = 9999; + UIVirtualKeyboard.OffsetDown = num90; + ChestUI.Draw(Main.spriteBatch); + Main.LocalPlayer.tileEntityAnchor.GetTileEntity()?.OnInventoryDraw(Main.LocalPlayer, Main.spriteBatch); + if (Main.player[Main.myPlayer].chest == -1 && Main.npcShop == 0) + { + int index = 0; + int num91 = 498; + int num92 = 244; + int num93 = TextureAssets.ChestStack[index].Width(); + int num94 = TextureAssets.ChestStack[index].Height(); + UILinkPointNavigator.SetPosition(301, new Vector2((float) num91 + (float) num93 * 0.75f, (float) num92 + (float) num94 * 0.75f)); + if (Main.mouseX >= num91 && Main.mouseX <= num91 + num93 && Main.mouseY >= num92 && Main.mouseY <= num92 + num94 && !PlayerInput.IgnoreMouseInterface) + { + index = 1; + if (!Main.allChestStackHover) + { + SoundEngine.PlaySound(12); + Main.allChestStackHover = true; + } + if (Main.mouseLeft && Main.mouseLeftRelease) + { + Main.mouseLeftRelease = false; + Main.player[Main.myPlayer].QuickStackAllChests(); + Recipe.FindRecipes(); + } + Main.player[Main.myPlayer].mouseInterface = true; + } + else if (Main.allChestStackHover) + { + SoundEngine.PlaySound(12); + Main.allChestStackHover = false; + } + Main.spriteBatch.Draw(TextureAssets.ChestStack[index].Value, new Vector2((float) num91, (float) num92), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.ChestStack[index].Width(), TextureAssets.ChestStack[index].Height())), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + if (!Main.mouseText && index == 1) + this.MouseText(Language.GetTextValue("GameUI.QuickStackToNearby")); + } + if (Main.player[Main.myPlayer].chest != -1 || Main.npcShop != 0) + return; + int num95 = 0; + int num96 = 534; + int num97 = 244; + int num98 = 30; + int num99 = 30; + UILinkPointNavigator.SetPosition(302, new Vector2((float) num96 + (float) num98 * 0.75f, (float) num97 + (float) num99 * 0.75f)); + bool flag11 = false; + if (Main.mouseX >= num96 && Main.mouseX <= num96 + num98 && Main.mouseY >= num97 && Main.mouseY <= num97 + num99 && !PlayerInput.IgnoreMouseInterface) + { + num95 = 1; + flag11 = true; + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + Main.mouseLeftRelease = false; + ItemSorting.SortInventory(); + Recipe.FindRecipes(); + } + } + if (flag11 != Main.inventorySortMouseOver) + { + SoundEngine.PlaySound(12); + Main.inventorySortMouseOver = flag11; + } + Texture2D texture1 = TextureAssets.InventorySort[Main.inventorySortMouseOver ? 1 : 0].Value; + Main.spriteBatch.Draw(texture1, new Vector2((float) num96, (float) num97), new Microsoft.Xna.Framework.Rectangle?(), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + if (Main.mouseText || num95 != 1) + return; + this.MouseText(Language.GetTextValue("GameUI.SortInventory")); + } + + private void DrawNPCHousesInUI() + { + UILinkPointNavigator.Shortcuts.NPCS_LastHovered = -2; + if (Main.mouseX > Main.screenWidth - 64 - 28 && Main.mouseX < (int) ((double) (Main.screenWidth - 64 - 28) + 56.0 * (double) Main.inventoryScale) && Main.mouseY > 174 + Main.mH && Main.mouseY < (int) ((double) (174 + Main.mH) + 448.0 * (double) Main.inventoryScale) && !PlayerInput.IgnoreMouseInterface) + Main.player[Main.myPlayer].mouseInterface = true; + int num1 = 0; + string cursorText = ""; + int num2 = 0; + int num3 = 0; + this._npcTypesThatAlreadyDrewAHead.Clear(); + for (int index = 0; index < this._npcIndexWhoHoldsHeadIndex.Length; ++index) + this._npcIndexWhoHoldsHeadIndex[index] = -1; + for (int index1 = 0; index1 < 200; ++index1) + { + if (Main.npc[index1].active && !this._npcTypesThatAlreadyDrewAHead.Contains(Main.npc[index1].type)) + { + ITownNPCProfile profile; + int index2 = !TownNPCProfiles.Instance.GetProfile(Main.npc[index1].type, out profile) ? NPC.TypeToDefaultHeadIndex(Main.npc[index1].type) : profile.GetHeadTextureIndex(Main.npc[index1]); + if (index2 > 0 && index2 <= 45 && !NPCHeadID.Sets.CannotBeDrawnInHousingUI[index2] && this._npcIndexWhoHoldsHeadIndex[index2] == -1) + { + this._npcIndexWhoHoldsHeadIndex[index2] = index1; + this._npcTypesThatAlreadyDrewAHead.Add(Main.npc[index1].type); + } + } + } + Main.hidePVPIcons = false; + for (int index3 = 0; index3 < TextureAssets.NpcHead.Length; ++index3) + { + if (index3 == 0 || this._npcIndexWhoHoldsHeadIndex[index3] != -1) + { + int index4 = this._npcIndexWhoHoldsHeadIndex[index3]; + int num4 = Main.screenWidth - 64 - 28 + num3; + int num5 = (int) ((double) (174 + Main.mH) + (double) (num1 * 56) * (double) Main.inventoryScale) + num2; + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color(100, 100, 100, 100); + if (num5 > Main.screenHeight - 80) + { + num3 -= 48; + num2 -= num5 - (174 + Main.mH); + num4 = Main.screenWidth - 64 - 28 + num3; + num5 = (int) ((double) (174 + Main.mH) + (double) (num1 * 56) * (double) Main.inventoryScale) + num2; + UILinkPointNavigator.Shortcuts.NPCS_IconsPerColumn = num1; + if (num3 <= -144) + Main.hidePVPIcons = true; + } + if (Main.mouseX >= num4 && (double) Main.mouseX <= (double) num4 + (double) TextureAssets.InventoryBack.Width() * (double) Main.inventoryScale && Main.mouseY >= num5 && (double) Main.mouseY <= (double) num5 + (double) TextureAssets.InventoryBack.Height() * (double) Main.inventoryScale) + { + UILinkPointNavigator.Shortcuts.NPCS_LastHovered = index4; + Main.mouseText = true; + cursorText = index3 != 0 ? Main.npc[index4].FullName : Lang.inter[8].Value; + if (!PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeftRelease && Main.mouseLeft && !PlayerInput.UsingGamepadUI && Main.mouseItem.type == 0) + { + SoundEngine.PlaySound(12); + if (index3 == 0) + this.SetMouseNPC_ToHousingQuery(); + else + this.SetMouseNPC(index4, Main.npc[index4].type); + Main.mouseLeftRelease = false; + } + } + } + UILinkPointNavigator.SetPosition(600 + num1, new Vector2((float) num4, (float) num5) + TextureAssets.InventoryBack.Value.Size() * 0.75f); + Texture2D texture = TextureAssets.InventoryBack11.Value; + Microsoft.Xna.Framework.Color color2 = Main.inventoryBack; + if (UILinkPointNavigator.CurrentPoint - 600 == num1) + { + texture = TextureAssets.InventoryBack14.Value; + color2 = Microsoft.Xna.Framework.Color.White; + } + Main.spriteBatch.Draw(texture, new Vector2((float) num4, (float) num5), new Microsoft.Xna.Framework.Rectangle?(), color2, 0.0f, new Vector2(), Main.inventoryScale, SpriteEffects.None, 0.0f); + color1 = Microsoft.Xna.Framework.Color.White; + int index5 = index3; + float scale = 1f; + float num6 = TextureAssets.NpcHead[index5].Width() <= TextureAssets.NpcHead[index5].Height() ? (float) TextureAssets.NpcHead[index5].Height() : (float) TextureAssets.NpcHead[index5].Width(); + if ((double) num6 > 36.0) + scale = 36f / num6; + Main.spriteBatch.Draw(TextureAssets.NpcHead[index5].Value, new Vector2((float) num4 + 26f * Main.inventoryScale, (float) num5 + 26f * Main.inventoryScale), new Microsoft.Xna.Framework.Rectangle?(), color1, 0.0f, new Vector2((float) (TextureAssets.NpcHead[index5].Width() / 2), (float) (TextureAssets.NpcHead[index5].Height() / 2)), scale, SpriteEffects.None, 0.0f); + ++num1; + } + } + UILinkPointNavigator.Shortcuts.NPCS_IconsTotal = num1; + if (!(cursorText != "") || Main.mouseItem.type != 0) + return; + this.MouseText(cursorText); + } + + private static void DrawDefenseCounter(int inventoryX, int inventoryY) + { + Vector2 vector2_1 = new Vector2((float) (inventoryX - 10 - 47 - 47 - 14), (float) inventoryY + (float) TextureAssets.InventoryBack.Height() * 0.5f); + Main.spriteBatch.Draw(TextureAssets.Extra[58].Value, vector2_1, new Microsoft.Xna.Framework.Rectangle?(), Microsoft.Xna.Framework.Color.White, 0.0f, TextureAssets.Extra[58].Value.Size() / 2f, Main.inventoryScale, SpriteEffects.None, 0.0f); + Vector2 vector2_2 = FontAssets.MouseText.Value.MeasureString(Main.player[Main.myPlayer].statDefense.ToString()); + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, FontAssets.MouseText.Value, Main.player[Main.myPlayer].statDefense.ToString(), vector2_1 - vector2_2 * 0.5f * Main.inventoryScale, Microsoft.Xna.Framework.Color.White, 0.0f, Vector2.Zero, new Vector2(Main.inventoryScale)); + if (Utils.CenteredRectangle(vector2_1, TextureAssets.Extra[58].Value.Size()).Contains(new Microsoft.Xna.Framework.Point(Main.mouseX, Main.mouseY)) && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + string str = Main.player[Main.myPlayer].statDefense.ToString() + " " + Lang.inter[10].Value; + if (!string.IsNullOrEmpty(str)) + Main.hoverItemName = str; + } + UILinkPointNavigator.SetPosition(1557, vector2_1 + TextureAssets.Extra[58].Value.Size() * Main.inventoryScale / 4f); + } + + private static void DrawGuideCraftText( + int adjY, + Microsoft.Xna.Framework.Color craftingTipColor, + out int inventoryX, + out int inventoryY) + { + inventoryX = 73; + inventoryY = 331; + inventoryY += adjY; + Main._requiredObjecsForCraftingText.Clear(); + string str1; + if (Main.guideItem.IsAir) + { + str1 = Lang.inter[24].Value; + } + else + { + str1 = Lang.inter[21].Value + " " + Main.guideItem.Name; + Recipe recipe = Main.recipe[Main.availableRecipe[Main.focusRecipe]]; + for (int index = 0; index < Recipe.maxRequirements; ++index) + { + int num = recipe.requiredTile[index]; + if (num != -1) + { + int requiredTileStyle = Recipe.GetRequiredTileStyle(num); + string mapObjectName = Lang.GetMapObjectName(MapHelper.TileToLookup(num, requiredTileStyle)); + Main._requiredObjecsForCraftingText.Add(mapObjectName); + } + else + break; + } + if (recipe.needWater) + Main._requiredObjecsForCraftingText.Add(Lang.inter[53].Value); + if (recipe.needHoney) + Main._requiredObjecsForCraftingText.Add(Lang.inter[58].Value); + if (recipe.needLava) + Main._requiredObjecsForCraftingText.Add(Lang.inter[56].Value); + if (recipe.needSnowBiome) + Main._requiredObjecsForCraftingText.Add(Lang.inter[123].Value); + if (recipe.needGraveyardBiome) + Main._requiredObjecsForCraftingText.Add(Lang.inter[124].Value); + if (Main._requiredObjecsForCraftingText.Count == 0) + { + string str2 = Lang.inter[23].Value; + Main._requiredObjecsForCraftingText.Add(str2); + } + } + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor); + Vector2 vector2_1 = new Vector2((float) (inventoryX + 50), (float) (inventoryY + 12)); + DynamicSpriteFont dynamicSpriteFont = FontAssets.MouseText.Value; + if (Main._requiredObjecsForCraftingText.Count > 0) + { + vector2_1.Y -= 14f; + Vector2 vector2_2 = vector2_1 + new Vector2(0.0f, 26f); + Microsoft.Xna.Framework.Color color2 = color1; + string str3 = Lang.inter[22].Value + " " + string.Join(", ", (IEnumerable) Main._requiredObjecsForCraftingText); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, dynamicSpriteFont, str3, vector2_2, color2, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, dynamicSpriteFont, str1, vector2_1, color1, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + + private static void DrawGuideCraftText_Old( + int adjY, + Microsoft.Xna.Framework.Color craftingTipColor, + out int inventoryX, + out int inventoryY) + { + inventoryX = 73; + inventoryY = 331; + inventoryY += adjY; + int num1 = 0; + int num2 = 0; + inventoryX += num1; + inventoryY += num2; + string str; + if (Main.guideItem.type > 0) + { + str = Lang.inter[21].Value + " " + Main.guideItem.Name; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, Lang.inter[22].Value, new Vector2((float) inventoryX, (float) (inventoryY + 118)), craftingTipColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + int focusRecipe = Main.focusRecipe; + int num3 = 0; + for (int index = 0; index < Recipe.maxRequirements; ++index) + { + int num4 = (index + 1) * 26; + if (Main.recipe[Main.availableRecipe[focusRecipe]].requiredTile[index] == -1) + { + if (index == 0 && !Main.recipe[Main.availableRecipe[focusRecipe]].needWater && !Main.recipe[Main.availableRecipe[focusRecipe]].needHoney && !Main.recipe[Main.availableRecipe[focusRecipe]].needLava && !Main.recipe[Main.availableRecipe[focusRecipe]].needSnowBiome && !Main.recipe[Main.availableRecipe[focusRecipe]].needGraveyardBiome) + { + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, Lang.inter[23].Value, new Vector2((float) inventoryX, (float) (inventoryY + 118 + num4)), craftingTipColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + break; + } + break; + } + ++num3; + int num5 = Main.recipe[Main.availableRecipe[focusRecipe]].requiredTile[index]; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, Lang.GetMapObjectName(MapHelper.TileToLookup(num5, Recipe.GetRequiredTileStyle(num5))), new Vector2((float) inventoryX, (float) (inventoryY + 118 + num4)), craftingTipColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (Main.recipe[Main.availableRecipe[focusRecipe]].needWater) + { + int num6 = (num3 + 1) * 26; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, Lang.inter[53].Value, new Vector2((float) inventoryX, (float) (inventoryY + 118 + num6)), craftingTipColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (Main.recipe[Main.availableRecipe[focusRecipe]].needHoney) + { + int num7 = (num3 + 1) * 26; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, Lang.inter[58].Value, new Vector2((float) inventoryX, (float) (inventoryY + 118 + num7)), craftingTipColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (Main.recipe[Main.availableRecipe[focusRecipe]].needLava) + { + int num8 = (num3 + 1) * 26; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, Lang.inter[56].Value, new Vector2((float) inventoryX, (float) (inventoryY + 118 + num8)), craftingTipColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (Main.recipe[Main.availableRecipe[focusRecipe]].needSnowBiome) + { + int num9 = (num3 + 1) * 26; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, Lang.inter[123].Value, new Vector2((float) inventoryX, (float) (inventoryY + 118 + num9)), craftingTipColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (Main.recipe[Main.availableRecipe[focusRecipe]].needGraveyardBiome) + { + int num10 = (num3 + 1) * 26; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, Lang.inter[124].Value, new Vector2((float) inventoryX, (float) (inventoryY + 118 + num10)), craftingTipColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + else + str = Lang.inter[24].Value; + inventoryX -= num1; + inventoryY -= num2; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, str, new Vector2((float) (inventoryX + 50), (float) (inventoryY + 12)), new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + + public static void LockCraftingForThisCraftClickDuration() => Main._preventCraftingBecauseClickWasUsedToChangeFocusedRecipe = true; + + private static void HoverOverCraftingItemButton(int recipeIndex) + { + Recipe recipe = Main.recipe[Main.availableRecipe[recipeIndex]]; + Main.player[Main.myPlayer].mouseInterface = true; + bool flag1 = Main.mouseLeftRelease && Main.mouseLeft || Main.mouseRightRelease && Main.mouseRight; + bool flag2 = Main.mouseLeft || Main.mouseRight; + if (Main.focusRecipe == recipeIndex && Main.guideItem.IsAir) + { + bool flag3 = Main.LocalPlayer.ItemTimeIsZero && Main.LocalPlayer.itemAnimation == 0 && !Main.player[Main.myPlayer].HasLockedInventory() && !Main._preventCraftingBecauseClickWasUsedToChangeFocusedRecipe; + bool flag4 = ((Main._currentRecipeBeingCrafted == -1 ? 0 : (Main._currentRecipeBeingCrafted != Main.availableRecipe[recipeIndex] ? 1 : 0)) | (Main._currentRecipeBeingCrafted == -1 ? (false ? 1 : 0) : (Main.recipe[Main._currentRecipeBeingCrafted].createItem.maxStack == 1 ? 1 : 0))) != 0; + if (((!flag2 ? 0 : (!flag4 ? 1 : 0)) & (flag3 ? 1 : 0)) != 0 && Main.stackSplit <= 1) + { + bool usingGamepad = PlayerInput.UsingGamepad; + bool movedAnItemToAllowCrafting; + int num = Main.TryAllowingToCraftRecipe(recipe, usingGamepad, out movedAnItemToAllowCrafting) ? 1 : 0; + if (movedAnItemToAllowCrafting) + Main._preventCraftingBecauseClickWasUsedToChangeFocusedRecipe = true; + if (num != 0 && !movedAnItemToAllowCrafting) + { + if (Main._currentRecipeBeingCrafted == -1) + Main._currentRecipeBeingCrafted = Main.availableRecipe[recipeIndex]; + ItemSlot.RefreshStackSplitCooldown(); + Main.CraftItem(recipe); + } + } + } + else if (flag1) + { + Main.focusRecipe = recipeIndex; + Main.stackSplit = 15; + Main._preventCraftingBecauseClickWasUsedToChangeFocusedRecipe = true; + } + Main.craftingHide = true; + Main.hoverItemName = recipe.createItem.Name; + Main.HoverItem = recipe.createItem.Clone(); + if (recipe.createItem.stack > 1) + Main.hoverItemName = Main.hoverItemName + " (" + (object) recipe.createItem.stack + ")"; + if (flag2) + return; + Main._preventCraftingBecauseClickWasUsedToChangeFocusedRecipe = false; + Main._currentRecipeBeingCrafted = -1; + } + + private static bool TryAllowingToCraftRecipe( + Recipe currentRecipe, + bool tryFittingItemInInventoryToAllowCrafting, + out bool movedAnItemToAllowCrafting) + { + movedAnItemToAllowCrafting = false; + if (Main.mouseItem.IsAir || Main.mouseItem.IsTheSameAs(currentRecipe.createItem) && Main.mouseItem.stack + currentRecipe.createItem.stack <= Main.mouseItem.maxStack) + return true; + if (tryFittingItemInInventoryToAllowCrafting && Main.LocalPlayer.ItemSpace(Main.mouseItem).CanTakeItemToPersonalInventory) + { + Main.mouseItem = Main.LocalPlayer.GetItem(Main.myPlayer, Main.mouseItem, GetItemSettings.InventoryUIToInventorySettingsShowAsNew); + if (Main.mouseItem.IsAir) + { + movedAnItemToAllowCrafting = true; + return true; + } + if (Main.mouseItem.IsTheSameAs(currentRecipe.createItem) && Main.mouseItem.stack + currentRecipe.createItem.stack <= Main.mouseItem.maxStack) + { + movedAnItemToAllowCrafting = true; + return true; + } + } + return false; + } + + private static void DrawTrashItemSlot(int pivotTopLeftX, int pivotTopLeftY) + { + Main.inventoryScale = 0.85f; + int num1 = 448 + pivotTopLeftX; + int num2 = 258 + pivotTopLeftY; + if ((Main.player[Main.myPlayer].chest != -1 || Main.npcShop > 0) && !Main.recBigList) + { + num2 += 168; + Main.inventoryScale = 0.755f; + num1 += 5; + } + Microsoft.Xna.Framework.Color color = new Microsoft.Xna.Framework.Color(150, 150, 150, 150); + if (Main.mouseX >= num1 && (double) Main.mouseX <= (double) num1 + (double) TextureAssets.InventoryBack.Width() * (double) Main.inventoryScale && Main.mouseY >= num2 && (double) Main.mouseY <= (double) num2 + (double) TextureAssets.InventoryBack.Height() * (double) Main.inventoryScale && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + ItemSlot.LeftClick(ref Main.player[Main.myPlayer].trashItem, 6); + if (Main.mouseLeftRelease && Main.mouseLeft) + Recipe.FindRecipes(); + ItemSlot.MouseHover(ref Main.player[Main.myPlayer].trashItem, 6); + } + ItemSlot.Draw(Main.spriteBatch, ref Main.player[Main.myPlayer].trashItem, 6, new Vector2((float) num1, (float) num2)); + } + + private static void DrawEmoteBubblesButton(int pivotTopLeftX, int pivotTopLeftY) + { + Main.inventoryScale = 0.85f; + int num1 = (int) ((double) (450 + pivotTopLeftX) - 56.0 * (double) Main.inventoryScale); + int num2 = 258 + pivotTopLeftY; + int num3 = 244; + int width = 30; + int height = 30; + int x = 534; + int y = num3 + height + 4; + if ((Main.player[Main.myPlayer].chest != -1 || Main.npcShop > 0) && !Main.recBigList) + { + y += 168; + Main.inventoryScale = 0.755f; + x += 5; + int num4 = num3 + 24; + } + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(x, y, (int) ((double) TextureAssets.InventoryBack.Width() * (double) Main.inventoryScale), (int) ((double) TextureAssets.InventoryBack.Height() * (double) Main.inventoryScale)); + rectangle = new Microsoft.Xna.Framework.Rectangle(x, y, width, height); + bool flag = false; + if (rectangle.Contains(new Microsoft.Xna.Framework.Point(Main.mouseX, Main.mouseY)) && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + flag = true; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + Main.player[Main.myPlayer].SetTalkNPC(-1); + Main.npcChatCornerItem = 0; + Main.npcChatText = ""; + Main.mouseLeftRelease = false; + SoundEngine.PlaySound(12); + IngameFancyUI.OpenUIState((UIState) new UIEmotesMenu()); + } + } + Texture2D texture2D = TextureAssets.EmoteMenuButton.Value; + Vector2 vector2 = rectangle.Center.ToVector2(); + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(2, frameX: (flag ? 1 : 0)); + r.Width -= 2; + r.Height -= 2; + Vector2 origin = r.Size() / 2f; + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + Main.spriteBatch.Draw(texture2D, vector2, new Microsoft.Xna.Framework.Rectangle?(r), white, 0.0f, origin, 1f, SpriteEffects.None, 0.0f); + UILinkPointNavigator.SetPosition(309, vector2); + if (!(!Main.mouseText & flag)) + return; + Main.instance.MouseText(Language.GetTextValue("GameUI.Emote")); + } + + private static void DrawBestiaryIcon(int pivotTopLeftX, int pivotTopLeftY) + { + Main.inventoryScale = 0.85f; + int num1 = (int) ((double) (450 + pivotTopLeftX) - 56.0 * (double) Main.inventoryScale * 2.0); + int num2 = 258 + pivotTopLeftY; + int num3 = 244; + int width = 30; + int height = 30; + int num4 = 244; + int x = 498; + int y = num4 + height + 4; + if ((Main.player[Main.myPlayer].chest != -1 || Main.npcShop > 0) && !Main.recBigList) + { + y += 168; + Main.inventoryScale = 0.755f; + x += 5; + num3 = num4 + 24; + } + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(x, y, (int) ((double) TextureAssets.InventoryBack.Width() * (double) Main.inventoryScale), (int) ((double) TextureAssets.InventoryBack.Height() * (double) Main.inventoryScale)); + rectangle = new Microsoft.Xna.Framework.Rectangle(x, y, width, height); + bool flag = false; + if (rectangle.Contains(new Microsoft.Xna.Framework.Point(Main.mouseX, Main.mouseY)) && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + flag = true; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + Main.player[Main.myPlayer].SetTalkNPC(-1); + Main.npcChatCornerItem = 0; + Main.npcChatText = ""; + Main.mouseLeftRelease = false; + SoundEngine.PlaySound(12); + IngameFancyUI.OpenUIState((UIState) Main.BestiaryUI); + Main.BestiaryUI.OnOpenPage(); + } + } + Texture2D texture2D = TextureAssets.BestiaryMenuButton.Value; + Vector2 vector2 = rectangle.Center.ToVector2(); + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(2, frameX: (flag ? 1 : 0)); + r.Width -= 2; + r.Height -= 2; + Vector2 origin = r.Size() / 2f; + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + Main.spriteBatch.Draw(texture2D, vector2, new Microsoft.Xna.Framework.Rectangle?(r), white, 0.0f, origin, 1f, SpriteEffects.None, 0.0f); + UILinkPointNavigator.SetPosition(310, vector2); + if (!(!Main.mouseText & flag)) + return; + Main.instance.MouseText(Language.GetTextValue("GameUI.Bestiary")); + } + + private static void SetRecipeMaterialDisplayName(int i) + { + Main.hoverItemName = Main.recipe[Main.availableRecipe[Main.focusRecipe]].requiredItem[i].Name; + Main.HoverItem = Main.recipe[Main.availableRecipe[Main.focusRecipe]].requiredItem[i].Clone(); + string theText; + if (Main.recipe[Main.availableRecipe[Main.focusRecipe]].ProcessGroupsForText(Main.recipe[Main.availableRecipe[Main.focusRecipe]].requiredItem[i].type, out theText)) + Main.HoverItem.SetNameOverride(theText); + if (Main.recipe[Main.availableRecipe[Main.focusRecipe]].anyIronBar && Main.recipe[Main.availableRecipe[Main.focusRecipe]].requiredItem[i].type == 22) + Main.HoverItem.SetNameOverride(Lang.misc[37].Value + " " + Lang.GetItemNameValue(22)); + else if (Main.recipe[Main.availableRecipe[Main.focusRecipe]].anyWood && Main.recipe[Main.availableRecipe[Main.focusRecipe]].requiredItem[i].type == 9) + Main.HoverItem.SetNameOverride(Lang.misc[37].Value + " " + Lang.GetItemNameValue(9)); + else if (Main.recipe[Main.availableRecipe[Main.focusRecipe]].anySand && Main.recipe[Main.availableRecipe[Main.focusRecipe]].requiredItem[i].type == 169) + Main.HoverItem.SetNameOverride(Lang.misc[37].Value + " " + Lang.GetItemNameValue(169)); + else if (Main.recipe[Main.availableRecipe[Main.focusRecipe]].anyFragment && Main.recipe[Main.availableRecipe[Main.focusRecipe]].requiredItem[i].type == 3458) + Main.HoverItem.SetNameOverride(Lang.misc[37].Value + " " + Lang.misc[51].Value); + else if (Main.recipe[Main.availableRecipe[Main.focusRecipe]].anyPressurePlate && Main.recipe[Main.availableRecipe[Main.focusRecipe]].requiredItem[i].type == 542) + Main.HoverItem.SetNameOverride(Lang.misc[37].Value + " " + Lang.misc[38].Value); + if (Main.recipe[Main.availableRecipe[Main.focusRecipe]].requiredItem[i].stack <= 1) + return; + Main.hoverItemName = Main.hoverItemName + " (" + (object) Main.recipe[Main.availableRecipe[Main.focusRecipe]].requiredItem[i].stack + ")"; + } + + private void DrawHotbarLockIcon(int pivotTopLeftX, int pivotTopLeftY, bool pushSideToolsUp) + { + int num1 = pivotTopLeftX; + int num2 = 21 + pivotTopLeftY; + Player player = Main.player[Main.myPlayer]; + if (pushSideToolsUp) + num2 = pivotTopLeftY; + float scale = 0.9f; + Texture2D texture2D = TextureAssets.HbLock[Main.player[Main.myPlayer].hbLocked ? 0 : 1].Value; + Microsoft.Xna.Framework.Rectangle rectangle = texture2D.Frame(2); + bool flag = false; + if (Main.mouseX > num1 && (double) Main.mouseX < (double) num1 + (double) rectangle.Width * (double) scale && Main.mouseY > num2 && (double) Main.mouseY < (double) num2 + (double) rectangle.Height * (double) scale) + { + flag = true; + Main.player[Main.myPlayer].mouseInterface = true; + if (!Main.player[Main.myPlayer].hbLocked) + this.MouseText(Lang.inter[5].Value); + else + this.MouseText(Lang.inter[6].Value); + Main.mouseText = true; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + SoundEngine.PlaySound(22); + Main.player[Main.myPlayer].hbLocked = !Main.player[Main.myPlayer].hbLocked; + } + } + Main.spriteBatch.Draw(texture2D, new Vector2((float) num1, (float) num2), new Microsoft.Xna.Framework.Rectangle?(rectangle), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), scale, SpriteEffects.None, 0.0f); + if (!flag) + return; + Main.spriteBatch.Draw(texture2D, new Vector2((float) num1, (float) num2), new Microsoft.Xna.Framework.Rectangle?(texture2D.Frame(2, frameX: 1)), Main.OurFavoriteColor, 0.0f, new Vector2(), scale, SpriteEffects.None, 0.0f); + } + + private void DrawBlockReplacementIcon( + int pivotTopLeftX, + int pivotTopLeftY, + bool pushSideToolsUp, + int gamepadPointOffset) + { + if (!Main.playerInventory) + return; + int num1 = pivotTopLeftX; + int num2 = 44 + pivotTopLeftY; + Player player = Main.player[Main.myPlayer]; + if (pushSideToolsUp) + num2 = 23 + pivotTopLeftY; + float scale = 0.9f; + int index = 10; + bool flag1 = Main.player[Main.myPlayer].builderAccStatus[index] == 0; + Texture2D texture2D = TextureAssets.blockReplaceIcon[0].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(3, frameX: (flag1 ? 0 : 1)); + bool flag2 = false; + if (Main.mouseX > num1 && (double) Main.mouseX < (double) num1 + (double) r.Width * (double) scale && Main.mouseY > num2 && (double) Main.mouseY < (double) num2 + (double) r.Height * (double) scale) + { + flag2 = true; + Main.player[Main.myPlayer].mouseInterface = true; + this.MouseText(flag1 ? Language.GetTextValue("GameUI.BlockReplacerOn") : Language.GetTextValue("GameUI.BlockReplacerOff")); + Main.mouseText = true; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + SoundEngine.PlaySound(22); + Main.player[Main.myPlayer].builderAccStatus[index] = flag1 ? 1 : 0; + } + } + Vector2 position = new Vector2((float) num1, (float) num2); + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), scale, SpriteEffects.None, 0.0f); + if (flag2) + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(texture2D.Frame(3, frameX: 2)), Main.OurFavoriteColor, 0.0f, new Vector2(), scale, SpriteEffects.None, 0.0f); + UILinkPointNavigator.SetPosition(6000 + gamepadPointOffset, position + r.Size() * 0.65f); + } + + private void DrawTorchBiomeSwapIcon( + int pivotTopLeftX, + int pivotTopLeftY, + bool pushSideToolsUp, + int gamepadPointOffset) + { + if (!Main.playerInventory) + return; + int num1 = pivotTopLeftX; + int num2 = 68 + pivotTopLeftY; + Player player = Main.player[Main.myPlayer]; + if (pushSideToolsUp) + num2 = 47 + pivotTopLeftY; + float scale = 0.9f; + int index = 11; + bool flag1 = Main.player[Main.myPlayer].builderAccStatus[index] == 0; + Texture2D texture2D = TextureAssets.Extra[211].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(4, frameX: (flag1 ? 1 : 0)); + bool flag2 = false; + if (Main.mouseX > num1 && (double) Main.mouseX < (double) num1 + (double) r.Width * (double) scale && Main.mouseY > num2 && (double) Main.mouseY < (double) num2 + (double) r.Height * (double) scale) + { + flag2 = true; + Main.player[Main.myPlayer].mouseInterface = true; + this.MouseText(flag1 ? Language.GetTextValue("GameUI.TorchTypeSwapperOn") : Language.GetTextValue("GameUI.TorchTypeSwapperOff")); + Main.mouseText = true; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + SoundEngine.PlaySound(22); + Main.player[Main.myPlayer].builderAccStatus[index] = flag1 ? 1 : 0; + } + } + Vector2 position = new Vector2((float) num1, (float) num2); + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), scale, SpriteEffects.None, 0.0f); + if (flag2) + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(texture2D.Frame(4, frameX: (flag1 ? 3 : 2))), Main.OurFavoriteColor, 0.0f, new Vector2(), scale, SpriteEffects.None, 0.0f); + UILinkPointNavigator.SetPosition(6000 + gamepadPointOffset, position + r.Size() * 0.65f); + } + + public static void CraftItem(Recipe r) + { + int stack = Main.mouseItem.stack; + Main.mouseItem = r.createItem.Clone(); + Main.mouseItem.stack += stack; + if (stack <= 0) + Main.mouseItem.Prefix(-1); + Main.mouseItem.position.X = Main.player[Main.myPlayer].position.X + (float) (Main.player[Main.myPlayer].width / 2) - (float) (Main.mouseItem.width / 2); + Main.mouseItem.position.Y = Main.player[Main.myPlayer].position.Y + (float) (Main.player[Main.myPlayer].height / 2) - (float) (Main.mouseItem.height / 2); + PopupText.NewText(PopupTextContext.ItemCraft, Main.mouseItem, r.createItem.stack); + r.Create(); + if (Main.mouseItem.type <= 0 && r.createItem.type <= 0) + return; + SoundEngine.PlaySound(7); + } + + private static void DrawPVPIcons() + { + if (Main.EquipPage == 1) + { + if (Main.hidePVPIcons) + return; + } + else + Main.hidePVPIcons = false; + Main.inventoryScale = 0.6f; + int num1 = (int) (52.0 * (double) Main.inventoryScale); + int num2 = 707 - num1 * 4 + Main.screenWidth - 800; + int num3 = 114 + Main.mH + num1 * 2 + num1 / 2 - 12; + if (Main.EquipPage == 2) + num2 += num1 + num1 / 2; + int num4 = Main.player[Main.myPlayer].hostile ? 2 : 0; + if (Main.mouseX > num2 - 7 && Main.mouseX < num2 + 25 && Main.mouseY > num3 - 2 && Main.mouseY < num3 + 37 && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.teamCooldown == 0) + ++num4; + if (Main.mouseLeft && Main.mouseLeftRelease && Main.teamCooldown == 0) + { + Main.teamCooldown = Main.teamCooldownLen; + SoundEngine.PlaySound(12); + Main.player[Main.myPlayer].hostile = !Main.player[Main.myPlayer].hostile; + NetMessage.SendData(30, number: Main.myPlayer); + } + } + Microsoft.Xna.Framework.Rectangle r1 = TextureAssets.Pvp[0].Frame(4, 6); + r1.Location = new Microsoft.Xna.Framework.Point(r1.Width * num4, r1.Height * Main.player[Main.myPlayer].team); + r1.Width -= 2; + --r1.Height; + Main.spriteBatch.Draw(TextureAssets.Pvp[0].Value, new Vector2((float) (num2 - 10), (float) num3), new Microsoft.Xna.Framework.Rectangle?(r1), Microsoft.Xna.Framework.Color.White, 0.0f, Vector2.Zero, Vector2.One, SpriteEffects.None, 0.0f); + UILinkPointNavigator.SetPosition(1550, new Vector2((float) (num2 - 10), (float) num3) + r1.Size() * 0.75f); + int num5 = num3 + 60; + int num6 = num2 - 10; + Microsoft.Xna.Framework.Rectangle rectangle1 = TextureAssets.Pvp[1].Frame(6); + Microsoft.Xna.Framework.Rectangle r2 = rectangle1; + for (int index = 0; index < 6; ++index) + { + r2.Location = new Microsoft.Xna.Framework.Point(num6 + index % 2 * 20, num5 + index / 2 * 20); + rectangle1.X = rectangle1.Width * index; + bool flag = false; + if (r2.Contains(Main.MouseScreen.ToPoint()) && !PlayerInput.IgnoreMouseInterface) + { + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.teamCooldown == 0) + flag = true; + if (Main.mouseLeft && Main.mouseLeftRelease && Main.player[Main.myPlayer].team != index && Main.teamCooldown == 0) + { + if (!Main.player[Main.myPlayer].TeamChangeAllowed()) + { + Main.NewText(Lang.misc[84].Value, G: (byte) 240, B: (byte) 20); + } + else + { + Main.teamCooldown = Main.teamCooldownLen; + SoundEngine.PlaySound(12); + Main.player[Main.myPlayer].team = index; + NetMessage.SendData(45, number: Main.myPlayer); + } + } + } + r2.Width = rectangle1.Width - 2; + if (flag) + Main.spriteBatch.Draw(TextureAssets.Pvp[2].Value, r2.Location.ToVector2() + new Vector2(-2f), Microsoft.Xna.Framework.Color.White); + Microsoft.Xna.Framework.Rectangle rectangle2 = rectangle1; + rectangle2.Width -= 2; + Main.spriteBatch.Draw(TextureAssets.Pvp[1].Value, r2.Location.ToVector2(), new Microsoft.Xna.Framework.Rectangle?(rectangle2), Microsoft.Xna.Framework.Color.White); + UILinkPointNavigator.SetPosition(1550 + index + 1, r2.Location.ToVector2() + r2.Size() * 0.75f); + } + } + + private static int DrawPageIcons(int yPos) + { + int num = -1; + Vector2 vector2 = new Vector2((float) (Main.screenWidth - 162), (float) yPos); + vector2.X += 82f; + Texture2D texture2D1 = TextureAssets.EquipPage[Main.EquipPage == 2 ? 3 : 2].Value; + if (Collision.CheckAABBvAABBCollision(vector2, texture2D1.Size(), new Vector2((float) Main.mouseX, (float) Main.mouseY), Vector2.One) && (Main.mouseItem.stack < 1 || Main.mouseItem.dye > (byte) 0)) + num = 2; + if (num == 2) + Main.spriteBatch.Draw(TextureAssets.EquipPage[6].Value, vector2, new Microsoft.Xna.Framework.Rectangle?(), Main.OurFavoriteColor, 0.0f, new Vector2(2f), 0.9f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(texture2D1, vector2, new Microsoft.Xna.Framework.Rectangle?(), Microsoft.Xna.Framework.Color.White, 0.0f, Vector2.Zero, 0.9f, SpriteEffects.None, 0.0f); + UILinkPointNavigator.SetPosition(305, vector2 + texture2D1.Size() * 0.75f); + vector2.X -= 48f; + Texture2D texture2D2 = TextureAssets.EquipPage[Main.EquipPage == 1 ? 5 : 4].Value; + if (Collision.CheckAABBvAABBCollision(vector2, texture2D2.Size(), new Vector2((float) Main.mouseX, (float) Main.mouseY), Vector2.One) && Main.mouseItem.stack < 1) + num = 1; + if (num == 1) + Main.spriteBatch.Draw(TextureAssets.EquipPage[7].Value, vector2, new Microsoft.Xna.Framework.Rectangle?(), Main.OurFavoriteColor, 0.0f, new Vector2(2f), 0.9f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(texture2D2, vector2, new Microsoft.Xna.Framework.Rectangle?(), Microsoft.Xna.Framework.Color.White, 0.0f, Vector2.Zero, 0.9f, SpriteEffects.None, 0.0f); + UILinkPointNavigator.SetPosition(306, vector2 + texture2D2.Size() * 0.75f); + vector2.X -= 48f; + Texture2D texture2D3 = TextureAssets.EquipPage[Main.EquipPage == 3 ? 10 : 8].Value; + if (Collision.CheckAABBvAABBCollision(vector2, texture2D3.Size(), new Vector2((float) Main.mouseX, (float) Main.mouseY), Vector2.One) && Main.mouseItem.stack < 1) + num = 3; + if (num == 3 && !Main.CaptureModeDisabled) + Main.spriteBatch.Draw(TextureAssets.EquipPage[9].Value, vector2, new Microsoft.Xna.Framework.Rectangle?(), Main.OurFavoriteColor, 0.0f, Vector2.Zero, 0.9f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(texture2D3, vector2, new Microsoft.Xna.Framework.Rectangle?(), Main.CaptureModeDisabled ? Microsoft.Xna.Framework.Color.Red : Microsoft.Xna.Framework.Color.White, 0.0f, Vector2.Zero, 0.9f, SpriteEffects.None, 0.0f); + UILinkPointNavigator.SetPosition(307, vector2 + texture2D3.Size() * 0.75f); + if (num != -1) + { + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + bool flag = true; + if (num == 3) + { + if (Main.CaptureModeDisabled) + flag = false; + else if (PlayerInput.UsingGamepad) + { + CaptureInterface.QuickScreenshot(); + } + else + { + CaptureManager.Instance.Active = true; + Main.blockMouse = true; + } + } + else + Main.EquipPageSelected = Main.EquipPageSelected == num ? 0 : num; + if (flag) + SoundEngine.PlaySound(10); + } + } + ItemSlot.SelectEquipPage(Main.mouseItem); + if (Main.EquipPage == -1) + Main.EquipPage = Main.EquipPageSelected; + return num; + } + + public void DrawMouseOver() + { + PlayerInput.SetZoom_Unscaled(); + PlayerInput.SetZoom_MouseInWorld(); + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle((int) ((double) Main.mouseX + (double) Main.screenPosition.X), (int) ((double) Main.mouseY + (double) Main.screenPosition.Y), 1, 1); + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + rectangle1.Y = (int) Main.screenPosition.Y + Main.screenHeight - Main.mouseY; + PlayerInput.SetZoom_UI(); + if (!Main.LocalPlayer.ghost) + Main.ActivePlayerResourcesSet.TryToHover(); + Main.AchievementAdvisor.DrawMouseHover(); + IngameOptions.MouseOver(); + IngameFancyUI.MouseOver(); + if (!Main.mouseText) + { + for (int index = 0; index < 400; ++index) + { + if (Main.item[index].active) + { + Microsoft.Xna.Framework.Rectangle drawHitbox = Item.GetDrawHitbox(Main.item[index].type, (Player) null); + Vector2 bottom = Main.item[index].Bottom; + Microsoft.Xna.Framework.Rectangle rectangle2 = new Microsoft.Xna.Framework.Rectangle((int) ((double) bottom.X - (double) drawHitbox.Width * 0.5), (int) ((double) bottom.Y - (double) drawHitbox.Height), drawHitbox.Width, drawHitbox.Height); + if (rectangle1.Intersects(rectangle2)) + { + Main.player[Main.myPlayer].cursorItemIconEnabled = false; + string text = Main.item[index].AffixName(); + if (Main.item[index].stack > 1) + text = text + " (" + (object) Main.item[index].stack + ")"; + if (Main.item[index].playerIndexTheItemIsReservedFor < (int) byte.MaxValue && Main.showItemOwner) + text = text + " <" + Main.player[Main.item[index].playerIndexTheItemIsReservedFor].name + ">"; + Main.rare = Main.item[index].rare; + if (Main.item[index].expert) + Main.rare = -12; + this.MouseTextHackZoom(text, Main.rare); + Main.mouseText = true; + break; + } + } + } + } + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && Main.myPlayer != index && !Main.player[index].dead && !Main.player[index].ShouldNotDraw && (double) Main.player[index].stealth > 0.5) + { + Microsoft.Xna.Framework.Rectangle rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) ((double) Main.player[index].position.X + (double) Main.player[index].width * 0.5 - 16.0), (int) ((double) Main.player[index].position.Y + (double) Main.player[index].height - 48.0), 32, 48); + if (!Main.mouseText && rectangle1.Intersects(rectangle3)) + { + Main.player[Main.myPlayer].cursorItemIconEnabled = false; + int num = Main.player[index].statLife; + if (num < 0) + num = 0; + string text = Main.player[index].name + ": " + (object) num + "/" + (object) Main.player[index].statLifeMax2; + if (Main.player[index].hostile) + text = text + " " + Language.GetTextValue("Game.PvPFlag"); + this.MouseTextHackZoom(text, 0, Main.player[index].difficulty); + Main.mouseText = true; + } + } + } + Main.HoveringOverAnNPC = false; + if (!Main.mouseText) + { + for (int npcIndex = 0; npcIndex < 200; ++npcIndex) + { + if (Main.npc[npcIndex].active) + { + this.LoadNPC(Main.npc[npcIndex].type); + NPC npc1 = Main.npc[npcIndex]; + npc1.position = npc1.position + Main.npc[npcIndex].netOffset; + Microsoft.Xna.Framework.Rectangle rectangle4 = new Microsoft.Xna.Framework.Rectangle((int) Main.npc[npcIndex].Bottom.X - Main.npc[npcIndex].frame.Width / 2, (int) Main.npc[npcIndex].Bottom.Y - Main.npc[npcIndex].frame.Height, Main.npc[npcIndex].frame.Width, Main.npc[npcIndex].frame.Height); + if (Main.npc[npcIndex].type >= 87 && Main.npc[npcIndex].type <= 92) + rectangle4 = new Microsoft.Xna.Framework.Rectangle((int) ((double) Main.npc[npcIndex].position.X + (double) Main.npc[npcIndex].width * 0.5 - 32.0), (int) ((double) Main.npc[npcIndex].position.Y + (double) Main.npc[npcIndex].height * 0.5 - 32.0), 64, 64); + bool flag1 = rectangle1.Intersects(rectangle4); + bool flag2 = flag1 || Main.SmartInteractShowingGenuine && Main.SmartInteractNPC == npcIndex; + if (flag2 && (Main.npc[npcIndex].type != 85 && Main.npc[npcIndex].type != 341 && Main.npc[npcIndex].type != 629 && Main.npc[npcIndex].aiStyle != 87 || (double) Main.npc[npcIndex].ai[0] != 0.0) && Main.npc[npcIndex].type != 488) + { + bool flag3 = Main.SmartInteractShowingGenuine && Main.SmartInteractNPC == npcIndex; + if ((Main.npc[npcIndex].townNPC || Main.npc[npcIndex].type == 105 || Main.npc[npcIndex].type == 106 || Main.npc[npcIndex].type == 123 || Main.npc[npcIndex].type == 354 || Main.npc[npcIndex].type == 376 || Main.npc[npcIndex].type == 579 || Main.npc[npcIndex].type == 453 || Main.npc[npcIndex].type == 589) && new Microsoft.Xna.Framework.Rectangle((int) ((double) Main.player[Main.myPlayer].position.X + (double) (Main.player[Main.myPlayer].width / 2) - (double) (Player.tileRangeX * 16)), (int) ((double) Main.player[Main.myPlayer].position.Y + (double) (Main.player[Main.myPlayer].height / 2) - (double) (Player.tileRangeY * 16)), Player.tileRangeX * 16 * 2, Player.tileRangeY * 16 * 2).Intersects(new Microsoft.Xna.Framework.Rectangle((int) Main.npc[npcIndex].position.X, (int) Main.npc[npcIndex].position.Y, Main.npc[npcIndex].width, Main.npc[npcIndex].height))) + flag3 = true; + if (Main.player[Main.myPlayer].ownedProjectileCounts[651] > 0) + flag3 = false; + if (flag3 && !Main.player[Main.myPlayer].dead) + { + PlayerInput.SetZoom_MouseInWorld(); + Main.HoveringOverAnNPC = true; + this.currentNPCShowingChatBubble = npcIndex; + if (Main.mouseRight && Main.npcChatRelease) + { + Main.npcChatRelease = false; + if (PlayerInput.UsingGamepad) + Main.player[Main.myPlayer].releaseInventory = false; + if (Main.player[Main.myPlayer].talkNPC != npcIndex && !Main.player[Main.myPlayer].tileInteractionHappened) + { + Main.CancelHairWindow(); + Main.SetNPCShopIndex(0); + Main.InGuideCraftMenu = false; + Main.player[Main.myPlayer].dropItemCheck(); + Main.npcChatCornerItem = 0; + Main.player[Main.myPlayer].sign = -1; + Main.editSign = false; + Main.player[Main.myPlayer].SetTalkNPC(npcIndex); + Main.playerInventory = false; + Main.player[Main.myPlayer].chest = -1; + Recipe.FindRecipes(); + Main.npcChatText = Main.npc[npcIndex].GetChat(); + SoundEngine.PlaySound(24); + } + } + } + if (flag1 && !Main.player[Main.myPlayer].mouseInterface) + { + Main.player[Main.myPlayer].cursorItemIconEnabled = false; + string text = Main.npc[npcIndex].GivenOrTypeName; + int index = npcIndex; + if (Main.npc[npcIndex].realLife >= 0) + index = Main.npc[npcIndex].realLife; + if (Main.npc[index].lifeMax > 1 && !Main.npc[index].dontTakeDamage) + text = text + ": " + (object) Main.npc[index].life + "/" + (object) Main.npc[index].lifeMax; + this.MouseTextHackZoom(text); + Main.mouseText = true; + NPC npc2 = Main.npc[npcIndex]; + npc2.position = npc2.position - Main.npc[npcIndex].netOffset; + break; + } + if (flag2) + { + NPC npc3 = Main.npc[npcIndex]; + npc3.position = npc3.position - Main.npc[npcIndex].netOffset; + break; + } + } + NPC npc4 = Main.npc[npcIndex]; + npc4.position = npc4.position - Main.npc[npcIndex].netOffset; + } + } + } + if (!Main.mouseText && Main.signHover != -1 && Main.sign[Main.signHover] != null && !Main.player[Main.myPlayer].mouseInterface && !string.IsNullOrWhiteSpace(Main.sign[Main.signHover].text)) + { + int lineAmount; + string[] strArray = Utils.WordwrapString(Main.sign[Main.signHover].text, FontAssets.MouseText.Value, 460, 10, out lineAmount); + ++lineAmount; + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, (BlendState) null, (SamplerState) null, (DepthStencilState) null, (RasterizerState) null, (Effect) null, Main._uiScaleMatrix); + PlayerInput.SetZoom_UI(); + int screenWidth = Main.screenWidth; + int screenHeight = Main.screenHeight; + int mouseX = Main.mouseX; + int mouseY = Main.mouseY; + PlayerInput.SetZoom_UI(); + PlayerInput.SetZoom_Test(); + float num1 = 0.0f; + for (int index = 0; index < lineAmount; ++index) + { + float x = FontAssets.MouseText.Value.MeasureString(strArray[index]).X; + if ((double) num1 < (double) x) + num1 = x; + } + if ((double) num1 > 460.0) + num1 = 460f; + int num2 = Main.SettingsEnabled_OpaqueBoxBehindTooltips ? 1 : 0; + Vector2 vector2 = new Vector2((float) mouseX, (float) mouseY) + new Vector2(16f); + if (num2 != 0) + vector2 += new Vector2(8f, 2f); + if ((double) vector2.Y > (double) (screenHeight - 30 * lineAmount)) + vector2.Y = (float) (screenHeight - 30 * lineAmount); + if ((double) vector2.X > (double) screenWidth - (double) num1) + vector2.X = (float) screenWidth - num1; + Microsoft.Xna.Framework.Color textColor = new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor); + if (num2 != 0) + { + textColor = Microsoft.Xna.Framework.Color.Lerp(textColor, Microsoft.Xna.Framework.Color.White, 1f); + int num3 = 10; + int num4 = 5; + Utils.DrawInvBG(Main.spriteBatch, new Microsoft.Xna.Framework.Rectangle((int) vector2.X - num3, (int) vector2.Y - num4, (int) num1 + num3 * 2, 30 * lineAmount + num4 + num4 / 2), new Microsoft.Xna.Framework.Color(23, 25, 81, (int) byte.MaxValue) * 0.925f * 0.85f); + } + for (int index = 0; index < lineAmount; ++index) + Utils.DrawBorderStringFourWay(Main.spriteBatch, FontAssets.MouseText.Value, strArray[index], vector2.X, vector2.Y + (float) (index * 30), textColor, Microsoft.Xna.Framework.Color.Black, Vector2.Zero); + Main.mouseText = true; + } + PlayerInput.SetZoom_UI(); + } + + private static void DrawNPCChatBubble(int i) + { + int num = -(Main.npc[i].width / 2 + 8); + float y = Main.npc[i].position.Y - (float) TextureAssets.Chat.Height() - (float) (int) Main.screenPosition.Y; + if (Main.npc[i].type == 637 && (double) Main.npc[i].ai[0] == 5.0) + y -= 18f; + SpriteEffects effects = SpriteEffects.None; + if (Main.npc[i].spriteDirection == -1) + { + effects = SpriteEffects.FlipHorizontally; + num = Main.npc[i].width / 2 + 8; + } + if ((double) Main.player[Main.myPlayer].gravDir != 1.0) + { + effects |= SpriteEffects.FlipVertically; + y = (float) Main.screenHeight - y - (float) TextureAssets.Chat.Height(); + } + Vector2 position = new Vector2(Main.npc[i].position.X + (float) (Main.npc[i].width / 2) - Main.screenPosition.X - (float) (TextureAssets.Chat.Width() / 2) - (float) num, y); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, (BlendState) null, SamplerState.PointClamp, (DepthStencilState) null, (RasterizerState) null, (Effect) null, Main.GameViewMatrix.ZoomMatrix); + PlayerInput.SetZoom_UI(); + Main.spriteBatch.Draw(TextureAssets.Chat.Value, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chat.Width(), TextureAssets.Chat.Height())), new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor), 0.0f, new Vector2(), 1f, effects, 0.0f); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, (BlendState) null, (SamplerState) null, (DepthStencilState) null, (RasterizerState) null, (Effect) null, Main._uiScaleMatrix); + } + + public void GUIBarsDraw() + { + if (Main.ignoreErrors) + { + try + { + this.GUIBarsDrawInner(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + this.GUIBarsDrawInner(); + } + + protected void GUIBarsDrawInner() + { + Main.ActivePlayerResourcesSet.Draw(); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, Main.UIScaleMatrix); + Main.DrawInterface_Resources_Breath(); + Main.DrawInterface_Resources_ClearBuffs(); + if (Main.ingameOptionsWindow || Main.playerInventory || Main.inFancyUI) + return; + this.DrawInterface_Resources_Buffs(); + } + + private static void DrawInterface_Resources_ClearBuffs() + { + Main.buffString = ""; + Main.bannerMouseOver = false; + if (Main.recBigList) + return; + Main.recStart = 0; + } + + private void DrawInterface_Resources_Buffs() + { + Main.recBigList = false; + int drawBuffText = -1; + int num1 = 11; + for (int buffSlotOnPlayer = 0; buffSlotOnPlayer < 22; ++buffSlotOnPlayer) + { + if (Main.player[Main.myPlayer].buffType[buffSlotOnPlayer] > 0) + { + int num2 = Main.player[Main.myPlayer].buffType[buffSlotOnPlayer]; + int x = 32 + buffSlotOnPlayer * 38; + int y = 76; + if (buffSlotOnPlayer >= num1) + { + x = 32 + (buffSlotOnPlayer - num1) * 38; + y += 50; + } + drawBuffText = Main.DrawBuffIcon(drawBuffText, buffSlotOnPlayer, x, y); + } + else + Main.buffAlpha[buffSlotOnPlayer] = 0.4f; + } + if (drawBuffText < 0) + return; + int index = Main.player[Main.myPlayer].buffType[drawBuffText]; + if (index <= 0) + return; + string buffName = Lang.GetBuffName(index); + string buffTooltip = Main.GetBuffTooltip(Main.player[Main.myPlayer], index); + if (index == 147) + Main.bannerMouseOver = true; + if (Main.meleeBuff[index]) + this.MouseTextHackZoom(buffName, -10, buffTooltip: buffTooltip); + else + this.MouseTextHackZoom(buffName, buffTooltip); + } + + private static string GetBuffTooltip(Player player, int buffType) + { + string str = Lang.GetBuffDescription(buffType); + switch (buffType) + { + case 26: + if (Main.expertMode) + { + str = Language.GetTextValue("BuffDescription.WellFed_Expert"); + break; + } + break; + case 94: + int num = (int) ((double) player.manaSickReduction * 100.0) + 1; + str = str + (object) num + "%"; + break; + case 206: + if (Main.expertMode) + { + str = Language.GetTextValue("BuffDescription.WellFed2_Expert"); + break; + } + break; + case 207: + if (Main.expertMode) + { + str = Language.GetTextValue("BuffDescription.WellFed3_Expert"); + break; + } + break; + } + return str; + } + + private static bool TryGetBuffTime(int buffSlotOnPlayer, out int buffTimeValue) + { + int index = Main.player[Main.myPlayer].buffType[buffSlotOnPlayer]; + buffTimeValue = 0; + if (Main.vanityPet[index] || Main.lightPet[index] || Main.buffNoTimeDisplay[index] || Main.player[Main.myPlayer].honeyWet && index == 48 || Main.player[Main.myPlayer].wet && Main.expertMode && index == 46) + return false; + buffTimeValue = Main.player[Main.myPlayer].buffTime[buffSlotOnPlayer]; + return true; + } + + private static int DrawBuffIcon(int drawBuffText, int buffSlotOnPlayer, int x, int y) + { + int b = Main.player[Main.myPlayer].buffType[buffSlotOnPlayer]; + if (b == 0) + return drawBuffText; + Microsoft.Xna.Framework.Color color = new Microsoft.Xna.Framework.Color(Main.buffAlpha[buffSlotOnPlayer], Main.buffAlpha[buffSlotOnPlayer], Main.buffAlpha[buffSlotOnPlayer], Main.buffAlpha[buffSlotOnPlayer]); + Main.spriteBatch.Draw(TextureAssets.Buff[b].Value, new Vector2((float) x, (float) y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Buff[b].Width(), TextureAssets.Buff[b].Height())), color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + int buffTimeValue; + if (Main.TryGetBuffTime(buffSlotOnPlayer, out buffTimeValue) && buffTimeValue > 2) + { + string str = Lang.LocalizedDuration(new TimeSpan(0, 0, buffTimeValue / 60), true, false); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.ItemStack.Value, str, new Vector2((float) x, (float) (y + TextureAssets.Buff[b].Height())), color, 0.0f, new Vector2(), 0.8f, SpriteEffects.None, 0.0f); + } + if (Main.mouseX < x + TextureAssets.Buff[b].Width() && Main.mouseY < y + TextureAssets.Buff[b].Height() && Main.mouseX > x && Main.mouseY > y) + { + drawBuffText = buffSlotOnPlayer; + Main.buffAlpha[buffSlotOnPlayer] += 0.1f; + bool flag = Main.mouseRight && Main.mouseRightRelease; + if (PlayerInput.UsingGamepad) + { + flag = Main.mouseLeft && Main.mouseLeftRelease && Main.playerInventory; + if (Main.playerInventory) + Main.player[Main.myPlayer].mouseInterface = true; + } + else + Main.player[Main.myPlayer].mouseInterface = true; + if (flag) + Main.TryRemovingBuff(buffSlotOnPlayer, b); + } + else + Main.buffAlpha[buffSlotOnPlayer] -= 0.05f; + if ((double) Main.buffAlpha[buffSlotOnPlayer] > 1.0) + Main.buffAlpha[buffSlotOnPlayer] = 1f; + else if ((double) Main.buffAlpha[buffSlotOnPlayer] < 0.4) + Main.buffAlpha[buffSlotOnPlayer] = 0.4f; + if (PlayerInput.UsingGamepad && !Main.playerInventory) + drawBuffText = -1; + return drawBuffText; + } + + private static void TryRemovingBuff(int i, int b) + { + bool flag = false; + if (Main.debuff[b] || b == 60 || b == 151) + return; + if (Main.player[Main.myPlayer].mount.Active && Main.player[Main.myPlayer].mount.CheckBuff(b)) + { + Main.player[Main.myPlayer].mount.Dismount(Main.player[Main.myPlayer]); + flag = true; + } + Main.TryRemovingBuff_CheckBuffHideMisc(0, b); + Main.TryRemovingBuff_CheckBuffHideMisc(1, b); + SoundEngine.PlaySound(12); + if (flag) + return; + Main.player[Main.myPlayer].DelBuff(i); + } + + private static void TryRemovingBuff_CheckBuffHideMisc(int slot, int buffID) + { + if (Main.player[Main.myPlayer].hideMisc[slot]) + return; + bool flag = Main.player[Main.myPlayer].miscEquips[slot].buffType == buffID; + if (!flag && (buffID == 102 || buffID == 101)) + flag = Main.player[Main.myPlayer].miscEquips[slot].buffType == 27; + if (!flag) + return; + Main.player[Main.myPlayer].hideMisc[slot] = true; + } + + private static void DrawInterface_Resources_Breath() + { + bool flag = false; + if (Main.player[Main.myPlayer].dead) + return; + if (Main.player[Main.myPlayer].lavaTime < Main.player[Main.myPlayer].lavaMax && Main.player[Main.myPlayer].lavaWet) + flag = true; + else if (Main.player[Main.myPlayer].lavaTime < Main.player[Main.myPlayer].lavaMax && Main.player[Main.myPlayer].breath == Main.player[Main.myPlayer].breathMax) + flag = true; + Vector2 vector2_1 = Main.player[Main.myPlayer].Top + new Vector2(0.0f, Main.player[Main.myPlayer].gfxOffY); + if (Main.playerInventory && Main.screenHeight < 1000) + vector2_1.Y += (float) (Main.player[Main.myPlayer].height - 20); + Vector2 vector2_2 = Vector2.Transform(vector2_1 - Main.screenPosition, Main.GameViewMatrix.ZoomMatrix); + if (!Main.playerInventory || Main.screenHeight >= 1000) + vector2_2.Y -= 100f; + Vector2 vector2_3 = vector2_2 / Main.UIScale; + if (Main.ingameOptionsWindow || Main.InGameUI.IsVisible) + { + vector2_3 = new Vector2((float) (Main.screenWidth / 2), (float) (Main.screenHeight / 2 + 236)); + if (Main.InGameUI.IsVisible) + vector2_3.Y = (float) (Main.screenHeight - 64); + } + if (Main.player[Main.myPlayer].breath < Main.player[Main.myPlayer].breathMax && !Main.player[Main.myPlayer].ghost && !flag) + { + int num1 = Main.player[Main.myPlayer].breathMax / 20; + int num2 = 20; + for (int index = 1; index < Main.player[Main.myPlayer].breathMax / num2 + 1; ++index) + { + float scale = 1f; + int num3; + if (Main.player[Main.myPlayer].breath >= index * num2) + { + num3 = (int) byte.MaxValue; + } + else + { + float num4 = (float) (Main.player[Main.myPlayer].breath - (index - 1) * num2) / (float) num2; + num3 = (int) (30.0 + 225.0 * (double) num4); + if (num3 < 30) + num3 = 30; + scale = (float) ((double) num4 / 4.0 + 0.75); + if ((double) scale < 0.75) + scale = 0.75f; + } + int num5 = 0; + int num6 = 0; + if (index > 10) + { + num5 -= 260; + num6 += 26; + } + Main.spriteBatch.Draw(TextureAssets.Bubble.Value, vector2_3 + new Vector2((float) (26 * (index - 1) + num5) - 125f, (float) (32.0 + ((double) TextureAssets.Bubble.Height() - (double) TextureAssets.Bubble.Height() * (double) scale) / 2.0) + (float) num6), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Bubble.Width(), TextureAssets.Bubble.Height())), new Microsoft.Xna.Framework.Color(num3, num3, num3, num3), 0.0f, new Vector2(), scale, SpriteEffects.None, 0.0f); + } + } + if (((Main.player[Main.myPlayer].lavaTime >= Main.player[Main.myPlayer].lavaMax ? 0 : (!Main.player[Main.myPlayer].ghost ? 1 : 0)) & (flag ? 1 : 0)) == 0) + return; + int num7 = Main.player[Main.myPlayer].lavaMax / 10; + int num8 = Main.player[Main.myPlayer].breathMax / num7; + for (int index = 1; index < Main.player[Main.myPlayer].lavaMax / num7 + 1; ++index) + { + float scale = 1f; + int num9; + if (Main.player[Main.myPlayer].lavaTime >= index * num7) + { + num9 = (int) byte.MaxValue; + } + else + { + float num10 = (float) (Main.player[Main.myPlayer].lavaTime - (index - 1) * num7) / (float) num7; + num9 = (int) (30.0 + 225.0 * (double) num10); + if (num9 < 30) + num9 = 30; + scale = (float) ((double) num10 / 4.0 + 0.75); + if ((double) scale < 0.75) + scale = 0.75f; + } + int num11 = 0; + int num12 = 0; + if (index > 10) + { + num11 -= 260; + num12 += 26; + } + Main.spriteBatch.Draw(TextureAssets.Flame.Value, vector2_3 + new Vector2((float) (26 * (index - 1) + num11) - 125f, (float) (32.0 + ((double) TextureAssets.Flame.Height() - (double) TextureAssets.Flame.Height() * (double) scale) / 2.0) + (float) num12), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Bubble.Width(), TextureAssets.Bubble.Height())), new Microsoft.Xna.Framework.Color(num9, num9, num9, num9), 0.0f, new Vector2(), scale, SpriteEffects.None, 0.0f); + } + } + + private static void DrawInterface_Resources_GolfPower() + { + Projectile golfHelper = (Projectile) null; + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && projectile.owner == Main.myPlayer && projectile.type == 722) + { + golfHelper = projectile; + break; + } + } + if (golfHelper == null) + return; + Projectile golfBallForHelper = GolfHelper.FindGolfBallForHelper(golfHelper); + if (golfBallForHelper == null) + return; + float relativeStrength = GolfHelper.CalculateShotStrength(golfHelper, (Entity) golfBallForHelper).RelativeStrength; + if ((double) relativeStrength < 1.0 / 1000.0) + return; + Vector2 position = (Main.LocalPlayer.Bottom - Main.Camera.ScaledPosition) * Main.GameViewMatrix.Zoom / Main.UIScale; + position.X -= 27f; + position.Y += 14f; + Main.spriteBatch.Draw(TextureAssets.GolfSwingBarPanel.Value, position, new Microsoft.Xna.Framework.Rectangle?(), Microsoft.Xna.Framework.Color.White); + Main.spriteBatch.Draw(TextureAssets.GolfSwingBarFill.Value, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, (int) (54.0 * (double) relativeStrength), 14)), Microsoft.Xna.Framework.Color.White); + } + + private static void DrawInterface_GolfBallIndicator() + { + if (!Item.IsAGolfingItem(Main.LocalPlayer.HeldItem)) + return; + Projectile lastHitBall = Main.LocalGolfState.GetLastHitBall(); + if (lastHitBall == null || !GolfHelper.IsGolfBallResting(lastHitBall)) + return; + Vector2 vector2_1 = (lastHitBall.Top - Main.Camera.ScaledPosition) * Main.GameViewMatrix.Zoom / Main.UIScale; + float num1 = MathHelper.Clamp((float) (((double) (Main.LocalPlayer.position - lastHitBall.position).Length() - 150.0) / 50.0), 0.0f, 1f); + Vector2 vector2_2 = Vector2.Clamp(vector2_1, new Vector2(20f), Main.Camera.UnscaledSize - new Vector2(20f)); + float rotation = 0.0f; + if (vector2_2 != vector2_1) + rotation = (vector2_2 - vector2_1).ToRotation() + 1.570796f; + Vector2 position = vector2_2 - (rotation + 1.570796f).ToRotationVector2() * (float) ((Math.Sin((double) Main.GlobalTimeWrappedHourly * 4.0) * 0.5 + 0.5) * 5.0 + 14.0); + Texture2D texture2D = TextureAssets.GolfBallArrow.Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(2); + Vector2 origin = r.Size() * new Vector2(0.5f, 1f); + Microsoft.Xna.Framework.Rectangle rectangle = texture2D.Frame(2, frameX: 1); + Main.spriteBatch.Draw(TextureAssets.GolfBallArrowShadow.Value, position + new Vector2(-4f, 4f) * 1.5f, new Microsoft.Xna.Framework.Rectangle?(r), Microsoft.Xna.Framework.Color.White * num1, rotation, origin, 1.5f, SpriteEffects.None, 0.0f); + float amount = (float) (Math.Sin((double) Main.GlobalTimeWrappedHourly * 4.0) * 0.5 + 0.5); + for (float num2 = 0.0f; (double) num2 < 1.0; num2 += 0.25f) + Main.spriteBatch.Draw(texture2D, position + (6.283185f * num2 + rotation).ToRotationVector2() * MathHelper.Lerp(2f, 2f, amount), new Microsoft.Xna.Framework.Rectangle?(rectangle), Microsoft.Xna.Framework.Color.Black * num1 * MathHelper.Lerp(1f, 1f, amount), rotation, origin, 1.5f, SpriteEffects.None, 0.0f); + for (float num3 = 0.0f; (double) num3 < 1.0; num3 += 0.25f) + Main.spriteBatch.Draw(texture2D, position + (6.283185f * num3 + rotation).ToRotationVector2() * MathHelper.Lerp(0.0f, 0.0f, amount), new Microsoft.Xna.Framework.Rectangle?(rectangle), Microsoft.Xna.Framework.Color.White * num1 * MathHelper.Lerp(0.8f, 0.8f, amount), rotation, origin, 1.5f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), Main.mouseColor * num1, rotation, origin, 1.5f, SpriteEffects.None, 0.0f); + } + + protected void GUIHotbarDrawInner() + { + if (Main.playerInventory || Main.player[Main.myPlayer].ghost) + return; + string str = Lang.inter[37].Value; + if (Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].Name != null && Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].Name != "") + str = Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].AffixName(); + Vector2 vector2 = FontAssets.MouseText.Value.MeasureString(str) / 2f; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, str, new Vector2(236f - vector2.X, 0.0f), new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + int num1 = 20; + for (int slot = 0; slot < 10; ++slot) + { + if (slot == Main.player[Main.myPlayer].selectedItem) + { + if ((double) Main.hotbarScale[slot] < 1.0) + Main.hotbarScale[slot] += 0.05f; + } + else if ((double) Main.hotbarScale[slot] > 0.75) + Main.hotbarScale[slot] -= 0.05f; + float num2 = Main.hotbarScale[slot]; + int num3 = (int) (20.0 + 22.0 * (1.0 - (double) num2)); + Microsoft.Xna.Framework.Color lightColor = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) (75.0 + 150.0 * (double) num2)); + if (!Main.player[Main.myPlayer].hbLocked && !PlayerInput.IgnoreMouseInterface && Main.mouseX >= num1 && (double) Main.mouseX <= (double) num1 + (double) TextureAssets.InventoryBack.Width() * (double) Main.hotbarScale[slot] && Main.mouseY >= num3 && (double) Main.mouseY <= (double) num3 + (double) TextureAssets.InventoryBack.Height() * (double) Main.hotbarScale[slot] && !Main.player[Main.myPlayer].channel) + { + Main.player[Main.myPlayer].mouseInterface = true; + Main.player[Main.myPlayer].cursorItemIconEnabled = false; + if (Main.mouseLeft && !Main.player[Main.myPlayer].hbLocked && !Main.blockMouse) + Main.player[Main.myPlayer].changeItem = slot; + Main.hoverItemName = Main.player[Main.myPlayer].inventory[slot].AffixName(); + if (Main.player[Main.myPlayer].inventory[slot].stack > 1) + Main.hoverItemName = Main.hoverItemName + " (" + (object) Main.player[Main.myPlayer].inventory[slot].stack + ")"; + Main.rare = Main.player[Main.myPlayer].inventory[slot].rare; + } + double inventoryScale = (double) Main.inventoryScale; + Main.inventoryScale = num2; + ItemSlot.Draw(Main.spriteBatch, Main.player[Main.myPlayer].inventory, 13, slot, new Vector2((float) num1, (float) num3), lightColor); + Main.inventoryScale = (float) inventoryScale; + num1 += (int) ((double) TextureAssets.InventoryBack.Width() * (double) Main.hotbarScale[slot]) + 4; + } + int selectedItem = Main.player[Main.myPlayer].selectedItem; + if (selectedItem < 10 || selectedItem == 58 && Main.mouseItem.type <= 0) + return; + float num4 = 1f; + int num5 = (int) (20.0 + 22.0 * (1.0 - (double) num4)); + Microsoft.Xna.Framework.Color lightColor1 = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) (75.0 + 150.0 * (double) num4)); + double inventoryScale1 = (double) Main.inventoryScale; + Main.inventoryScale = num4; + ItemSlot.Draw(Main.spriteBatch, Main.player[Main.myPlayer].inventory, 13, selectedItem, new Vector2((float) num1, (float) num5), lightColor1); + Main.inventoryScale = (float) inventoryScale1; + } + + public static void OpenHairWindow() + { + Main.hBar = -1f; + Main.lBar = -1f; + Main.sBar = -1f; + Main.playerInventory = false; + Main.npcChatText = ""; + Main.oldHairStyle = Main.player[Main.myPlayer].hair; + Main.oldHairColor = Main.player[Main.myPlayer].hairColor; + Main.hairWindow = true; + SoundEngine.PlaySound(10); + } + + public static void CancelHairWindow() + { + if (!Main.hairWindow) + return; + Main.player[Main.myPlayer].hair = Main.oldHairStyle; + Main.player[Main.myPlayer].hairColor = Main.oldHairColor; + Main.hairWindow = false; + if (Main.player[Main.myPlayer].talkNPC > -1 && Main.npc[Main.player[Main.myPlayer].talkNPC].type == 353) + Main.player[Main.myPlayer].SetTalkNPC(-1); + SoundEngine.PlaySound(11); + } + + public static void BuyHairWindow() + { + SoundEngine.PlaySound(18); + Main.hairWindow = false; + Main.player[Main.myPlayer].SetTalkNPC(-1); + Main.npcChatCornerItem = 0; + NetMessage.SendData(4, number: Main.myPlayer); + } + + public static int UnlockedMaxHair() + { + int num = 151; + if (NPC.downedMartians) + num += 10; + if (NPC.downedMartians && NPC.downedMoonlord) + ++num; + return num; + } + + protected void DrawHairWindow() + { + if (Main.npcChatText != "" || Main.playerInventory || Main.player[Main.myPlayer].chest != -1 || Main.npcShop != 0 || Main.player[Main.myPlayer].talkNPC == -1 || Main.InGuideCraftMenu) + { + Main.CancelHairWindow(); + } + else + { + Main.Hairstyles.UpdateUnlocks(); + int count = Main.Hairstyles.AvailableHairstyles.Count; + int y1 = Main.screenHeight / 2 + 60; + int x1 = Main.screenWidth / 2 - TextureAssets.HairStyleBack.Width() / 2; + int num1 = y1 + 42; + int num2 = x1 + 22; + int num3 = x1 + 234; + int num4 = y1 + 18; + Main.selColor = Main.player[Main.myPlayer].hairColor; + Main.spriteBatch.Draw(TextureAssets.HairStyleBack.Value, new Vector2((float) x1, (float) y1), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.HairStyleBack.Width(), TextureAssets.HairStyleBack.Height())), new Microsoft.Xna.Framework.Color(200, 200, 200, 200), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + if (new Microsoft.Xna.Framework.Rectangle(x1, y1, TextureAssets.HairStyleBack.Width(), TextureAssets.HairStyleBack.Height()).Contains(Main.MouseScreen.ToPoint())) + { + int num5 = -(PlayerInput.ScrollWheelDelta / 120); + int num6 = Math.Sign(num5); + for (; num5 != 0; num5 -= num6) + { + if (num5 < 0) + { + Main.hairStart -= 5; + SoundEngine.PlaySound(12); + } + else + { + Main.hairStart += 5; + SoundEngine.PlaySound(12); + } + } + } + if (Main.mouseX > x1 && Main.mouseX < x1 + TextureAssets.HairStyleBack.Width() && Main.mouseY > y1 && Main.mouseY < y1 + TextureAssets.HairStyleBack.Height()) + Main.player[Main.myPlayer].mouseInterface = true; + int num7 = num3 - 18; + int num8 = num4 + 74; + if (Main.hairStart > 1) + { + if (Main.mouseX >= num7 && Main.mouseX <= num7 + TextureAssets.CraftUpButton.Width() && Main.mouseY >= num8 && Main.mouseY <= num8 + TextureAssets.CraftUpButton.Height()) + { + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeftRelease && Main.mouseLeft) + { + Main.hairStart -= 15; + SoundEngine.PlaySound(12); + } + } + Main.spriteBatch.Draw(TextureAssets.ScrollLeftButton.Value, new Vector2((float) num7, (float) num8), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.CraftUpButton.Width(), TextureAssets.CraftUpButton.Height())), new Microsoft.Xna.Framework.Color(200, 200, 200, 200), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (Main.hairStart + 15 < count) + { + int num9 = num7 + 296; + if (Main.mouseX >= num9 && Main.mouseX <= num9 + TextureAssets.CraftUpButton.Width() && Main.mouseY >= num8 && Main.mouseY <= num8 + TextureAssets.CraftUpButton.Height()) + { + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeftRelease && Main.mouseLeft) + { + Main.hairStart += 15; + SoundEngine.PlaySound(12); + } + } + Main.spriteBatch.Draw(TextureAssets.ScrollRightButton.Value, new Vector2((float) num9, (float) num8), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.CraftUpButton.Width(), TextureAssets.CraftUpButton.Height())), new Microsoft.Xna.Framework.Color(200, 200, 200, 200), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (Main.hairStart + 15 >= count) + Main.hairStart = count - 15; + if (Main.hairStart < 0) + Main.hairStart = 0; + int num10 = 0; + if (Main.oldHairStyle != Main.player[Main.myPlayer].hair) + { + if (Main.player[Main.myPlayer].hair > 51) + num10 += 200000; + else + num10 += 20000; + } + if (Main.oldHairColor != Main.player[Main.myPlayer].hairColor) + num10 += 20000; + int num11 = (int) Math.Round((double) (int) ((double) num10 * Main.player[Main.myPlayer].currentShoppingSettings.PriceAdjustment) / 10000.0) * 10000; + string str1 = ""; + int num12 = 0; + int num13 = 0; + int num14 = 0; + int num15 = 0; + int num16 = num11; + if (num16 < 0) + num16 = 0; + int price = num16; + if (num16 >= 1000000) + { + num12 = num16 / 1000000; + num16 -= num12 * 1000000; + } + if (num16 >= 10000) + { + num13 = num16 / 10000; + num16 -= num13 * 10000; + } + if (num16 >= 100) + { + num14 = num16 / 100; + num16 -= num14 * 100; + } + if (num16 >= 1) + num15 = num16; + if (num12 > 0) + str1 = str1 + (object) num12 + " " + Lang.inter[15].Value + " "; + if (num13 > 0) + str1 = str1 + (object) num13 + " " + Lang.inter[16].Value + " "; + if (num14 > 0) + str1 = str1 + (object) num14 + " " + Lang.inter[17].Value + " "; + if (num15 > 0) + str1 = str1 + (object) num15 + " " + Lang.inter[18].Value + " "; + string textValue1 = Language.GetTextValue("GameUI.BuyWithValue", (object) str1); + if (price == 0) + textValue1 = Language.GetTextValue("GameUI.Buy"); + int num17 = ((int) Main.mouseTextColor * 2 + (int) byte.MaxValue) / 3; + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color(num17, (int) ((double) num17 / 1.1), num17 / 2, num17); + float num18 = 0.9f; + string str2 = textValue1; + int num19 = x1 + 18; + int num20 = y1 + 156; + bool flag1 = false; + if (price > 0) + ItemSlot.DrawSavings(Main.spriteBatch, (float) num19, (float) (num20 - 70), true); + if (price > 0 && Main.mouseX > num19 && (double) Main.mouseX < (double) num19 + (double) FontAssets.MouseText.Value.MeasureString(str2).X && Main.mouseY > num20 && (double) Main.mouseY < (double) num20 + (double) FontAssets.MouseText.Value.MeasureString(str2).Y) + { + flag1 = true; + num18 = 1.1f; + if (!Main.npcChatFocus1) + SoundEngine.PlaySound(12); + Main.npcChatFocus1 = true; + Main.player[Main.myPlayer].releaseUseItem = false; + } + else + { + if (Main.npcChatFocus1) + SoundEngine.PlaySound(12); + Main.npcChatFocus1 = false; + } + Vector2 vector2_1 = FontAssets.MouseText.Value.MeasureString(str2) * 0.5f; + UILinkPointNavigator.SetPosition(2603, new Vector2((float) num19, (float) num20) + vector2_1); + for (int index = 0; index < 5; ++index) + { + int num21 = num19; + int num22 = num20; + Microsoft.Xna.Framework.Color color2 = Microsoft.Xna.Framework.Color.Black; + if (flag1) + color2 = Microsoft.Xna.Framework.Color.Brown; + if (index == 0) + num21 -= 2; + if (index == 1) + num21 += 2; + if (index == 2) + num22 -= 2; + if (index == 3) + num22 += 2; + if (index == 4) + color2 = price != 0 ? color1 : new Microsoft.Xna.Framework.Color(100, 100, 100); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, str2, new Vector2((float) num21 + vector2_1.X, (float) num22 + vector2_1.Y), color2, 0.0f, vector2_1, num18, SpriteEffects.None, 0.0f); + } + float num23 = 0.9f; + string textValue2 = Language.GetTextValue("GameUI.Cancel"); + int num24 = num19 + 130; + bool flag2 = false; + if (Main.mouseX > num24 && (double) Main.mouseX < (double) num24 + (double) FontAssets.MouseText.Value.MeasureString(textValue2).X && Main.mouseY > num20 && (double) Main.mouseY < (double) num20 + (double) FontAssets.MouseText.Value.MeasureString(textValue2).Y) + { + flag2 = true; + num23 = 1.1f; + if (!Main.npcChatFocus2) + SoundEngine.PlaySound(12); + Main.npcChatFocus2 = true; + Main.player[Main.myPlayer].releaseUseItem = false; + } + else + { + if (Main.npcChatFocus2) + SoundEngine.PlaySound(12); + Main.npcChatFocus2 = false; + } + Vector2 vector2_2 = FontAssets.MouseText.Value.MeasureString(textValue2) * 0.5f; + UILinkPointNavigator.SetPosition(2604, new Vector2((float) num24, (float) num20) + vector2_2); + for (int index = 0; index < 5; ++index) + { + int num25 = num24; + int num26 = num20; + Microsoft.Xna.Framework.Color color3 = Microsoft.Xna.Framework.Color.Black; + if (flag2) + color3 = Microsoft.Xna.Framework.Color.Brown; + if (index == 0) + num25 -= 2; + if (index == 1) + num25 += 2; + if (index == 2) + num26 -= 2; + if (index == 3) + num26 += 2; + if (index == 4) + color3 = color1; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, textValue2, new Vector2((float) num25 + vector2_2.X, (float) num26 + vector2_2.Y), color3, 0.0f, vector2_2, num23, SpriteEffects.None, 0.0f); + } + if (Main.mouseLeft && Main.mouseLeftRelease) + { + if (Main.npcChatFocus1) + { + if (Main.player[Main.myPlayer].BuyItem(price)) + { + Main.BuyHairWindow(); + return; + } + } + else if (Main.npcChatFocus2) + { + Main.CancelHairWindow(); + return; + } + } + if (!Main.mouseLeft) + { + this.grabColorSlider = 0; + Main.blockMouse = false; + } + int num27 = 167; + Vector3 hsl = Main.rgbToHsl(Main.selColor); + float Hue = hsl.X; + float Saturation1 = hsl.Y; + float Luminosity1 = hsl.Z; + float num28 = (float) Main.selColor.A / (float) byte.MaxValue; + if ((double) Main.hBar == -1.0 || (double) Main.sBar == -1.0 || (double) Main.lBar == -1.0 || (double) Main.aBar == -1.0) + { + Main.hBar = Hue; + Main.sBar = Saturation1; + Main.lBar = Luminosity1; + Main.aBar = (float) Main.selColor.A / (float) byte.MaxValue; + } + else + { + Hue = Main.hBar; + Saturation1 = Main.sBar; + Luminosity1 = Main.lBar; + Main.aBar = num28; + } + UILinkPointNavigator.SetPosition(2600, new Vector2((float) num2, (float) num1) + TextureAssets.Hue.Value.Size() / 2f); + Main.spriteBatch.Draw(TextureAssets.Hue.Value, new Vector2((float) num2, (float) num1), Microsoft.Xna.Framework.Color.White); + if (Main.mouseX > num2 - 4 && Main.mouseX < num2 + TextureAssets.Hue.Width() + 4 && Main.mouseY > num1 - 4 && Main.mouseY < num1 + TextureAssets.Hue.Height() + 4 || this.grabColorSlider == 1) + Main.spriteBatch.Draw(TextureAssets.ColorHighlight.Value, new Vector2((float) num2, (float) num1), Main.OurFavoriteColor); + Main.spriteBatch.Draw(TextureAssets.ColorSlider.Value, new Vector2((float) num2 + (float) (TextureAssets.Hue.Width() - 2) * Main.hBar - (float) (TextureAssets.ColorSlider.Width() / 2), (float) (num1 - TextureAssets.ColorSlider.Height() / 2 + TextureAssets.Hue.Height() / 2)), Microsoft.Xna.Framework.Color.White); + if ((Main.mouseX > num2 - 4 && Main.mouseX < num2 + TextureAssets.Hue.Width() + 4 && Main.mouseY > num1 - 4 && Main.mouseY < num1 + TextureAssets.Hue.Height() + 4 || this.grabColorSlider == 1) && Main.mouseLeft && !Main.blockMouse) + { + this.grabColorSlider = 1; + Hue = (float) (Main.mouseX - num2) / (float) TextureAssets.Hue.Width(); + if ((double) Hue < 0.0) + Hue = 0.0f; + if ((double) Hue > 1.0) + Hue = 1f; + Main.hBar = Hue; + } + int num29 = num1 + 26; + UILinkPointNavigator.SetPosition(2601, new Vector2((float) num2, (float) num29) + TextureAssets.ColorBar.Value.Size() / 2f); + Main.spriteBatch.Draw(TextureAssets.ColorBar.Value, new Vector2((float) num2, (float) num29), Microsoft.Xna.Framework.Color.White); + for (int index = 0; index <= num27; ++index) + { + float Saturation2 = (float) index / (float) num27; + Microsoft.Xna.Framework.Color rgb = Main.hslToRgb(Hue, Saturation2, Luminosity1); + Main.spriteBatch.Draw(TextureAssets.ColorBlip.Value, new Vector2((float) (num2 + index + 5), (float) (num29 + 4)), rgb); + } + if (Main.mouseX > num2 - 4 && Main.mouseX < num2 + TextureAssets.Hue.Width() + 4 && Main.mouseY > num29 - 4 && Main.mouseY < num29 + TextureAssets.Hue.Height() + 4 || this.grabColorSlider == 2) + Main.spriteBatch.Draw(TextureAssets.ColorHighlight.Value, new Vector2((float) num2, (float) num29), Main.OurFavoriteColor); + Main.spriteBatch.Draw(TextureAssets.ColorSlider.Value, new Vector2((float) num2 + (float) (TextureAssets.Hue.Width() - 2) * Main.sBar - (float) (TextureAssets.ColorSlider.Width() / 2), (float) (num29 - TextureAssets.ColorSlider.Height() / 2 + TextureAssets.Hue.Height() / 2)), Microsoft.Xna.Framework.Color.White); + if ((Main.mouseX > num2 - 4 && Main.mouseX < num2 + TextureAssets.Hue.Width() + 4 && Main.mouseY > num29 - 4 && Main.mouseY < num29 + TextureAssets.Hue.Height() + 4 || this.grabColorSlider == 2) && Main.mouseLeft && !Main.blockMouse) + { + this.grabColorSlider = 2; + Saturation1 = (float) (Main.mouseX - num2) / (float) TextureAssets.Hue.Width(); + if ((double) Saturation1 < 0.0) + Saturation1 = 0.0f; + if ((double) Saturation1 > 1.0) + Saturation1 = 1f; + Main.sBar = Saturation1; + } + int num30 = num29 + 26; + UILinkPointNavigator.SetPosition(2602, new Vector2((float) num2, (float) num30) + TextureAssets.ColorBar.Value.Size() / 2f); + Main.spriteBatch.Draw(TextureAssets.ColorBar.Value, new Vector2((float) num2, (float) num30), Microsoft.Xna.Framework.Color.White); + float num31 = 0.15f; + for (int index = 0; index <= num27; ++index) + { + float Luminosity2 = (float) index / (float) num27; + Microsoft.Xna.Framework.Color rgb = Main.hslToRgb(Hue, Saturation1, Luminosity2); + Main.spriteBatch.Draw(TextureAssets.ColorBlip.Value, new Vector2((float) (num2 + index + 5), (float) (num30 + 4)), rgb); + } + if (Main.mouseX > num2 - 4 && Main.mouseX < num2 + TextureAssets.Hue.Width() + 4 && Main.mouseY > num30 - 4 && Main.mouseY < num30 + TextureAssets.Hue.Height() + 4 || this.grabColorSlider == 3) + Main.spriteBatch.Draw(TextureAssets.ColorHighlight.Value, new Vector2((float) num2, (float) num30), Main.OurFavoriteColor); + Main.spriteBatch.Draw(TextureAssets.ColorSlider.Value, new Vector2((float) num2 + (float) (TextureAssets.Hue.Width() - 2) * (float) (((double) Main.lBar - (double) num31) / (1.0 - (double) num31)) - (float) (TextureAssets.ColorSlider.Width() / 2), (float) (num30 - TextureAssets.ColorSlider.Height() / 2 + TextureAssets.Hue.Height() / 2)), Microsoft.Xna.Framework.Color.White); + if ((Main.mouseX > num2 - 4 && Main.mouseX < num2 + TextureAssets.Hue.Width() + 4 && Main.mouseY > num30 - 4 && Main.mouseY < num30 + TextureAssets.Hue.Height() + 4 || this.grabColorSlider == 3) && Main.mouseLeft && !Main.blockMouse) + { + this.grabColorSlider = 3; + float num32 = (float) (Main.mouseX - num2) / (float) TextureAssets.Hue.Width(); + if ((double) num32 < 0.0) + num32 = 0.0f; + if ((double) num32 > 1.0) + num32 = 1f; + Main.lBar = num32 * (1f - num31) + num31; + } + Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + Main.player[Main.myPlayer].hairColor = Main.selColor; + int x2 = num3; + int y2 = num4; + int hairStart = Main.hairStart; + int index1 = 0; + int num33 = 0; + for (int index2 = 0; index2 < 15; ++index2) + { + int availableHairstyle = Main.Hairstyles.AvailableHairstyles[Main.hairStart + index2]; + UILinkPointNavigator.SetPosition(2605 + index2, new Vector2((float) x2, (float) y2) + TextureAssets.InventoryBack.Value.Size() * 0.75f); + if (Main.player[Main.myPlayer].hair == availableHairstyle) + Main.spriteBatch.Draw(TextureAssets.InventoryBack14.Value, new Vector2((float) x2, (float) y2), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.InventoryBack.Width(), TextureAssets.InventoryBack.Height())), new Microsoft.Xna.Framework.Color(200, 200, 200, 200), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + else + Main.spriteBatch.Draw(TextureAssets.InventoryBack8.Value, new Vector2((float) x2, (float) y2), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.InventoryBack.Width(), TextureAssets.InventoryBack.Height())), new Microsoft.Xna.Framework.Color(200, 200, 200, 200), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + if ((Main.mouseX <= x2 || Main.mouseX >= x2 + TextureAssets.InventoryBack.Width() || Main.mouseY <= y2 ? 0 : (Main.mouseY < y2 + TextureAssets.InventoryBack.Height() ? 1 : 0)) != 0) + { + Asset asset = Main.Assets.Request("Images/UI/PanelBorder", (AssetRequestMode) 1); + Utils.DrawSplicedPanel(Main.spriteBatch, asset.Value, x2, y2, TextureAssets.InventoryBack.Width(), TextureAssets.InventoryBack.Height(), asset.Width() / 2 - 1, asset.Width() / 2 - 1, asset.Height() / 2 - 1, asset.Height() / 2 - 1, Main.OurFavoriteColor); + if (Main.mouseLeft && Main.mouseLeftRelease) + { + Main.mouseLeftRelease = false; + Main.player[Main.myPlayer].hair = availableHairstyle; + SoundEngine.PlaySound(12); + } + } + this.LoadHair(availableHairstyle); + float x3 = (float) (x2 + TextureAssets.InventoryBack.Width() / 2 - TextureAssets.PlayerHair[availableHairstyle].Width() / 2); + float y3 = (float) (y2 + 4); + Main.spriteBatch.Draw(TextureAssets.Players[index1, 0].Value, new Vector2(x3, y3), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.PlayerHair[availableHairstyle].Width(), 56)), Main.player[Main.myPlayer].skinColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.Players[index1, 1].Value, new Vector2(x3, y3), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.PlayerHair[availableHairstyle].Width(), 56)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.Players[index1, 2].Value, new Vector2(x3, y3), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.PlayerHair[availableHairstyle].Width(), 56)), Main.player[Main.myPlayer].eyeColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.PlayerHair[availableHairstyle].Value, new Vector2(x3, y3), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.PlayerHair[availableHairstyle].Width(), 56)), Main.selColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + ++num33; + x2 += 56; + if (num33 >= 5) + { + num33 = 0; + x2 = num3; + y2 += 56; + } + } + } + } + + public static void OpenClothesWindow() + { + if (Main.clothesWindow) + { + Main.CancelClothesWindow(); + } + else + { + Main.hBar = -1f; + Main.lBar = -1f; + Main.sBar = -1f; + Main.playerInventory = false; + Main.npcChatText = ""; + Main.clothesWindow = true; + SoundEngine.PlaySound(10); + Main.selClothes = 0; + Main.oldClothesColor[0] = Main.player[Main.myPlayer].shirtColor; + Main.oldClothesColor[1] = Main.player[Main.myPlayer].underShirtColor; + Main.oldClothesColor[2] = Main.player[Main.myPlayer].pantsColor; + Main.oldClothesColor[3] = Main.player[Main.myPlayer].shoeColor; + Main.oldClothesColor[4] = Main.player[Main.myPlayer].eyeColor; + Main.oldClothesColor[5] = Main.player[Main.myPlayer].skinColor; + if (Main.dresserInterfaceDummy == null) + Main.dresserInterfaceDummy = new Player(); + Main.oldClothesStyle = Main.player[Main.myPlayer].skinVariant; + } + } + + public static void CancelClothesWindow(bool quiet = false) + { + if (!Main.clothesWindow) + return; + Main.clothesWindow = false; + if (!quiet) + SoundEngine.PlaySound(11); + Main.player[Main.myPlayer].shirtColor = Main.oldClothesColor[0]; + Main.player[Main.myPlayer].underShirtColor = Main.oldClothesColor[1]; + Main.player[Main.myPlayer].pantsColor = Main.oldClothesColor[2]; + Main.player[Main.myPlayer].shoeColor = Main.oldClothesColor[3]; + Main.player[Main.myPlayer].eyeColor = Main.oldClothesColor[4]; + Main.player[Main.myPlayer].skinColor = Main.oldClothesColor[5]; + Main.dresserInterfaceDummy.skinVariant = Main.oldClothesStyle; + Main.dresserInterfaceDummy.Male = Main.player[Main.myPlayer].Male; + Main.player[Main.myPlayer].skinVariant = Main.dresserInterfaceDummy.skinVariant; + } + + public static void SaveClothesWindow() + { + SoundEngine.PlaySound(7); + Main.clothesWindow = false; + NetMessage.SendData(4, number: Main.myPlayer); + } + + protected void DrawClothesWindow() + { + if (Main.npcChatText != "" || Main.playerInventory || Main.player[Main.myPlayer].chest != -1 || Main.npcShop != 0 || Main.player[Main.myPlayer].talkNPC != -1 || Main.InGuideCraftMenu) + Main.CancelClothesWindow(); + else if (!Main.LocalPlayer.IsInInteractionRangeToMultiTileHitbox(Main.interactedDresserTopLeftX, Main.interactedDresserTopLeftY) || !Main.tile[Main.interactedDresserTopLeftX, Main.interactedDresserTopLeftY].active()) + { + Main.CancelClothesWindow(); + } + else + { + int num1 = 477 / 2; + int num2 = 180; + int num3 = 511; + int width = num3 - (num3 / 2 - num2 - 26); + int y1 = Main.screenHeight / 2 + 60; + int x1 = Main.screenWidth / 2 - width / 2; + int num4 = y1 + 32; + int num5 = x1 + 22; + int num6 = num4 - 16; + int num7 = x1 + width - num2; + int num8 = y1 + 18; + if (Main.selClothes == 0) + Main.selColor = Main.player[Main.myPlayer].shirtColor; + if (Main.selClothes == 1) + Main.selColor = Main.player[Main.myPlayer].underShirtColor; + if (Main.selClothes == 2) + Main.selColor = Main.player[Main.myPlayer].pantsColor; + if (Main.selClothes == 3) + Main.selColor = Main.player[Main.myPlayer].shoeColor; + if (Main.selClothes == 4) + Main.selColor = Main.player[Main.myPlayer].eyeColor; + if (Main.selClothes == 5) + Main.selColor = Main.player[Main.myPlayer].skinColor; + Utils.DrawInvBG(Main.spriteBatch, new Microsoft.Xna.Framework.Rectangle(x1, y1, width, 133)); + if (!PlayerInput.IgnoreMouseInterface && Main.mouseX > x1 && Main.mouseX < x1 + TextureAssets.ClothesStyleBack.Width() && Main.mouseY > y1 && Main.mouseY < y1 + TextureAssets.ClothesStyleBack.Height()) + Main.player[Main.myPlayer].mouseInterface = true; + Vector2 vector2_1 = new Vector2((float) (x1 + width / 2 - 16 - 28), (float) (y1 + 66 + Main.dresserInterfaceDummy.height / 2 - 20)); + vector2_1.Y += 18f; + vector2_1.X += 58f; + Microsoft.Xna.Framework.Rectangle R = new Microsoft.Xna.Framework.Rectangle((int) vector2_1.X - Main.dresserInterfaceDummy.width / 2 - 15, (int) vector2_1.Y - Main.dresserInterfaceDummy.height - 33, Main.dresserInterfaceDummy.width + 30, Main.dresserInterfaceDummy.height + 66); + bool flag1 = R.Contains(Main.MouseScreen.ToPoint()); + int selClothes = Main.selClothes; + int num9 = ((int) Main.mouseTextColor * 2 + (int) byte.MaxValue) / 3; + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color(num9, (int) ((double) num9 / 1.1), num9 / 2, num9); + float num10 = 0.9f; + string textValue1 = Language.GetTextValue("GameUI.Change"); + int num11 = x1 + width - num2 + 22; + int num12 = x1 + 22; + int num13 = y1 + 94; + bool flag2 = false; + if (Main.oldClothesColor[0] != Main.player[Main.myPlayer].shirtColor || Main.oldClothesColor[1] != Main.player[Main.myPlayer].underShirtColor || Main.oldClothesColor[2] != Main.player[Main.myPlayer].pantsColor || Main.oldClothesColor[3] != Main.player[Main.myPlayer].shoeColor || Main.oldClothesColor[4] != Main.player[Main.myPlayer].eyeColor || Main.oldClothesColor[5] != Main.player[Main.myPlayer].skinColor || Main.oldClothesStyle != Main.player[Main.myPlayer].skinVariant) + flag2 = true; + Vector2 vector2_2 = FontAssets.MouseText.Value.MeasureString(textValue1); + bool flag3 = false; + UILinkPointNavigator.SetPosition(2803, new Vector2((float) num12, (float) num13) + vector2_2 * num10 * 0.5f); + if (flag2 && Main.mouseX > num12 && (double) Main.mouseX < (double) num12 + (double) vector2_2.X && Main.mouseY > num13 && (double) Main.mouseY < (double) num13 + (double) vector2_2.Y) + { + flag3 = true; + num10 = 1.1f; + if (!Main.npcChatFocus1) + SoundEngine.PlaySound(12); + Main.npcChatFocus1 = true; + Main.player[Main.myPlayer].releaseUseItem = false; + } + else + { + if (Main.npcChatFocus1) + SoundEngine.PlaySound(12); + Main.npcChatFocus1 = false; + } + for (int index = 0; index < 5; ++index) + { + int num14 = num12; + int num15 = num13; + Microsoft.Xna.Framework.Color color2 = Microsoft.Xna.Framework.Color.Black; + if (flag3) + color2 = Microsoft.Xna.Framework.Color.Brown; + if (index == 0) + num14 -= 2; + if (index == 1) + num14 += 2; + if (index == 2) + num15 -= 2; + if (index == 3) + num15 += 2; + if (index == 4) + color2 = flag2 ? color1 : new Microsoft.Xna.Framework.Color(100, 100, 100); + Vector2 vector2_3 = FontAssets.MouseText.Value.MeasureString(textValue1) * 0.5f; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, textValue1, new Vector2((float) num14 + vector2_3.X, (float) num15 + vector2_3.Y), color2, 0.0f, vector2_3, num10, SpriteEffects.None, 0.0f); + } + float num16 = 0.9f; + string textValue2 = Language.GetTextValue("GameUI.Cancel"); + int num17 = num12 + 130; + bool flag4 = false; + Vector2 vector2_4 = FontAssets.MouseText.Value.MeasureString(textValue2); + UILinkPointNavigator.SetPosition(2804, new Vector2((float) num17, (float) num13) + vector2_4 * num16 * 0.5f); + if (Main.mouseX > num17 && (double) Main.mouseX < (double) num17 + (double) vector2_4.X && Main.mouseY > num13 && (double) Main.mouseY < (double) num13 + (double) vector2_4.Y) + { + flag4 = true; + num16 = 1.1f; + if (!Main.npcChatFocus2) + SoundEngine.PlaySound(12); + Main.npcChatFocus2 = true; + Main.player[Main.myPlayer].releaseUseItem = false; + } + else + { + if (Main.npcChatFocus2) + SoundEngine.PlaySound(12); + Main.npcChatFocus2 = false; + } + for (int index = 0; index < 5; ++index) + { + int num18 = num17; + int num19 = num13; + Microsoft.Xna.Framework.Color color3 = Microsoft.Xna.Framework.Color.Black; + if (flag4) + color3 = Microsoft.Xna.Framework.Color.Brown; + if (index == 0) + num18 -= 2; + if (index == 1) + num18 += 2; + if (index == 2) + num19 -= 2; + if (index == 3) + num19 += 2; + if (index == 4) + color3 = color1; + Vector2 vector2_5 = FontAssets.MouseText.Value.MeasureString(textValue2) * 0.5f; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, textValue2, new Vector2((float) num18 + vector2_5.X, (float) num19 + vector2_5.Y), color3, 0.0f, vector2_5, num16, SpriteEffects.None, 0.0f); + } + if (Main.mouseLeft && Main.mouseLeftRelease) + { + if (Main.npcChatFocus1) + { + Main.SaveClothesWindow(); + return; + } + if (Main.npcChatFocus2) + { + Main.CancelClothesWindow(); + return; + } + } + if (!Main.mouseLeft) + { + this.grabColorSlider = 0; + Main.blockMouse = false; + } + int num20 = 167; + Vector3 hsl = Main.rgbToHsl(Main.selColor); + float Hue = hsl.X; + float Saturation1 = hsl.Y; + float Luminosity1 = hsl.Z; + if ((double) Main.hBar == -1.0 || (double) Main.sBar == -1.0 || (double) Main.lBar == -1.0) + { + Main.hBar = Hue; + Main.sBar = Saturation1; + Main.lBar = Luminosity1; + } + else + { + Hue = Main.hBar; + Saturation1 = Main.sBar; + Luminosity1 = Main.lBar; + } + Main.spriteBatch.Draw(TextureAssets.Hue.Value, new Vector2((float) num5, (float) num6), Microsoft.Xna.Framework.Color.White); + if (Main.mouseX > num5 - 4 && Main.mouseX < num5 + TextureAssets.Hue.Width() + 4 && Main.mouseY > num6 - 4 && Main.mouseY < num6 + TextureAssets.Hue.Height() + 4 || this.grabColorSlider == 1) + Main.spriteBatch.Draw(TextureAssets.ColorHighlight.Value, new Vector2((float) num5, (float) num6), Main.OurFavoriteColor); + Main.spriteBatch.Draw(TextureAssets.ColorSlider.Value, new Vector2((float) num5 + (float) (TextureAssets.Hue.Width() - 2) * Main.hBar - (float) (TextureAssets.ColorSlider.Width() / 2), (float) (num6 - TextureAssets.ColorSlider.Height() / 2 + TextureAssets.Hue.Height() / 2)), Microsoft.Xna.Framework.Color.White); + if ((Main.mouseX > num5 - 4 && Main.mouseX < num5 + TextureAssets.Hue.Width() + 4 && Main.mouseY > num6 - 4 && Main.mouseY < num6 + TextureAssets.Hue.Height() + 4 || this.grabColorSlider == 1) && Main.mouseLeft && !Main.blockMouse) + { + this.grabColorSlider = 1; + Hue = (float) (Main.mouseX - num5) / (float) TextureAssets.Hue.Width(); + if ((double) Hue < 0.0) + Hue = 0.0f; + if ((double) Hue > 1.0) + Hue = 1f; + Main.hBar = Hue; + } + UILinkPointNavigator.SetPosition(2800, new Vector2((float) num5, (float) num6) + TextureAssets.Hue.Value.Size() / 2f); + int num21 = num6 + 26; + Main.spriteBatch.Draw(TextureAssets.ColorBar.Value, new Vector2((float) num5, (float) num21), Microsoft.Xna.Framework.Color.White); + for (int index = 0; index <= num20; ++index) + { + float Saturation2 = (float) index / (float) num20; + Microsoft.Xna.Framework.Color rgb = Main.hslToRgb(Hue, Saturation2, Luminosity1); + Main.spriteBatch.Draw(TextureAssets.ColorBlip.Value, new Vector2((float) (num5 + index + 5), (float) (num21 + 4)), rgb); + } + if (Main.mouseX > num5 - 4 && Main.mouseX < num5 + TextureAssets.Hue.Width() + 4 && Main.mouseY > num21 - 4 && Main.mouseY < num21 + TextureAssets.Hue.Height() + 4 || this.grabColorSlider == 2) + Main.spriteBatch.Draw(TextureAssets.ColorHighlight.Value, new Vector2((float) num5, (float) num21), Main.OurFavoriteColor); + Main.spriteBatch.Draw(TextureAssets.ColorSlider.Value, new Vector2((float) num5 + (float) (TextureAssets.Hue.Width() - 2) * Main.sBar - (float) (TextureAssets.ColorSlider.Width() / 2), (float) (num21 - TextureAssets.ColorSlider.Height() / 2 + TextureAssets.Hue.Height() / 2)), Microsoft.Xna.Framework.Color.White); + if ((Main.mouseX > num5 - 4 && Main.mouseX < num5 + TextureAssets.Hue.Width() + 4 && Main.mouseY > num21 - 4 && Main.mouseY < num21 + TextureAssets.Hue.Height() + 4 || this.grabColorSlider == 2) && Main.mouseLeft && !Main.blockMouse) + { + this.grabColorSlider = 2; + Saturation1 = (float) (Main.mouseX - num5) / (float) TextureAssets.Hue.Width(); + if ((double) Saturation1 < 0.0) + Saturation1 = 0.0f; + if ((double) Saturation1 > 1.0) + Saturation1 = 1f; + Main.sBar = Saturation1; + } + UILinkPointNavigator.SetPosition(2801, new Vector2((float) num5, (float) num21) + TextureAssets.Hue.Value.Size() / 2f); + int num22 = num21 + 26; + Main.spriteBatch.Draw(TextureAssets.ColorBar.Value, new Vector2((float) num5, (float) num22), Microsoft.Xna.Framework.Color.White); + float num23 = 0.15f; + for (int index = 0; index <= num20; ++index) + { + float Luminosity2 = (float) index / (float) num20; + Microsoft.Xna.Framework.Color rgb = Main.hslToRgb(Hue, Saturation1, Luminosity2); + Main.spriteBatch.Draw(TextureAssets.ColorBlip.Value, new Vector2((float) (num5 + index + 5), (float) (num22 + 4)), rgb); + } + if (Main.mouseX > num5 - 4 && Main.mouseX < num5 + TextureAssets.Hue.Width() + 4 && Main.mouseY > num22 - 4 && Main.mouseY < num22 + TextureAssets.Hue.Height() + 4 || this.grabColorSlider == 3) + Main.spriteBatch.Draw(TextureAssets.ColorHighlight.Value, new Vector2((float) num5, (float) num22), Main.OurFavoriteColor); + Main.spriteBatch.Draw(TextureAssets.ColorSlider.Value, new Vector2((float) num5 + (float) (TextureAssets.Hue.Width() - 2) * (float) (((double) Main.lBar - (double) num23) / (1.0 - (double) num23)) - (float) (TextureAssets.ColorSlider.Width() / 2), (float) (num22 - TextureAssets.ColorSlider.Height() / 2 + TextureAssets.Hue.Height() / 2)), Microsoft.Xna.Framework.Color.White); + if ((Main.mouseX > num5 - 4 && Main.mouseX < num5 + TextureAssets.Hue.Width() + 4 && Main.mouseY > num22 - 4 && Main.mouseY < num22 + TextureAssets.Hue.Height() + 4 || this.grabColorSlider == 3) && Main.mouseLeft && !Main.blockMouse) + { + this.grabColorSlider = 3; + float num24 = (float) (Main.mouseX - num5) / (float) TextureAssets.Hue.Width(); + if ((double) num24 < 0.0) + num24 = 0.0f; + if ((double) num24 > 1.0) + num24 = 1f; + Main.lBar = num24 * (1f - num23) + num23; + } + UILinkPointNavigator.SetPosition(2802, new Vector2((float) num5, (float) num22) + TextureAssets.Hue.Value.Size() / 2f); + Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + if (Main.selClothes == 0) + Main.player[Main.myPlayer].shirtColor = Main.selColor; + if (Main.selClothes == 1) + Main.player[Main.myPlayer].underShirtColor = Main.selColor; + if (Main.selClothes == 2) + Main.player[Main.myPlayer].pantsColor = Main.selColor; + if (Main.selClothes == 3) + Main.player[Main.myPlayer].shoeColor = Main.selColor; + if (Main.selClothes == 4) + Main.player[Main.myPlayer].eyeColor = Main.selColor; + if (Main.selClothes == 5) + Main.player[Main.myPlayer].skinColor = Main.selColor; + int num25 = num7; + int num26 = num8 - 8; + for (int index = 0; index < 6; ++index) + { + if (selClothes == index) + Main.spriteBatch.Draw(TextureAssets.InventoryBack14.Value, new Vector2((float) num25, (float) num26), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.InventoryBack.Width(), TextureAssets.InventoryBack.Height())), new Microsoft.Xna.Framework.Color(200, 200, 200, 200), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + else + Main.spriteBatch.Draw(TextureAssets.InventoryBack8.Value, new Vector2((float) num25, (float) num26), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.InventoryBack.Width(), TextureAssets.InventoryBack.Height())), new Microsoft.Xna.Framework.Color(200, 200, 200, 200), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + if (Main.mouseX > num25 && Main.mouseX < num25 + TextureAssets.InventoryBack.Width() && Main.mouseY > num26 && Main.mouseY < num26 + TextureAssets.InventoryBack.Height() && Main.mouseLeft && Main.mouseLeftRelease) + { + Main.mouseLeftRelease = false; + Main.selClothes = index; + SoundEngine.PlaySound(12); + Main.hBar = -1f; + Main.lBar = -1f; + Main.sBar = -1f; + } + float x2 = (float) (num25 + TextureAssets.InventoryBack.Width() / 2 - TextureAssets.Clothes[index].Width() / 2); + float y2 = (float) (num26 + TextureAssets.InventoryBack.Height() / 2 - TextureAssets.Clothes[index].Height() / 2); + Microsoft.Xna.Framework.Color color4 = Microsoft.Xna.Framework.Color.White; + if (index == 0) + color4 = Main.player[Main.myPlayer].shirtColor; + if (index == 1) + color4 = Main.player[Main.myPlayer].underShirtColor; + if (index == 2) + color4 = Main.player[Main.myPlayer].pantsColor; + if (index == 3) + color4 = Main.player[Main.myPlayer].shoeColor; + if (index == 4) + color4 = Main.player[Main.myPlayer].eyeColor; + if (index == 5) + color4 = Main.player[Main.myPlayer].skinColor; + Main.spriteBatch.Draw(TextureAssets.Clothes[index].Value, new Vector2(x2, y2), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Clothes[index].Width(), TextureAssets.Clothes[index].Height())), color4, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + if (index == 4) + { + Texture2D texture2D = Main.Assets.Request("Images/UI/CharCreation/ColorEyeBack", (AssetRequestMode) 1).Value; + Main.spriteBatch.Draw(texture2D, new Vector2(x2, y2), new Microsoft.Xna.Framework.Rectangle?(texture2D.Frame()), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + UILinkPointNavigator.SetPosition(2806 + index, new Vector2(x2, y2) + TextureAssets.Clothes[index].Value.Size() * 0.75f); + num25 += 56; + if (index == 1) + { + num25 -= 112; + num26 += 56; + } + if (index == 3) + num26 -= 56; + if (index == 4) + { + num26 += 56; + num25 -= 56; + } + } + Main.dresserInterfaceDummy.skinVariant = Main.player[Main.myPlayer].skinVariant; + Main.dresserInterfaceDummy.eyeColor = Main.player[Main.myPlayer].eyeColor; + Main.dresserInterfaceDummy.hairColor = Main.player[Main.myPlayer].hairColor; + Main.dresserInterfaceDummy.hair = Main.player[Main.myPlayer].hair; + Main.dresserInterfaceDummy.skinColor = Main.player[Main.myPlayer].skinColor; + Main.dresserInterfaceDummy.shirtColor = Main.player[Main.myPlayer].shirtColor; + Main.dresserInterfaceDummy.underShirtColor = Main.player[Main.myPlayer].underShirtColor; + Main.dresserInterfaceDummy.shoeColor = Main.player[Main.myPlayer].shoeColor; + Main.dresserInterfaceDummy.pantsColor = Main.player[Main.myPlayer].pantsColor; + Main.dresserInterfaceDummy.Bottom = Main.screenPosition + vector2_1; + Main.dresserInterfaceDummy.direction = -1; + Main.dresserInterfaceDummy.gravDir = 1f; + Main.dresserInterfaceDummy.PlayerFrame(); + Main.dresserInterfaceDummy.socialIgnoreLight = true; + Microsoft.Xna.Framework.Color c = new Microsoft.Xna.Framework.Color(46, 106, 98) * 0.6f; + if (flag1) + { + c = new Microsoft.Xna.Framework.Color(46, 106, 98) * 2f * 0.6f; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + Main.mouseLeftRelease = false; + SoundEngine.PlaySound(12); + Main.CycleClothingStyle(Main.player[Main.myPlayer]); + } + } + UILinkPointNavigator.SetPosition(2805, R.Center.ToVector2()); + Utils.DrawInvBG(Main.spriteBatch, R, c); + Main.PlayerRenderer.DrawPlayer(Main.Camera, Main.dresserInterfaceDummy, Main.dresserInterfaceDummy.position, Main.dresserInterfaceDummy.fullRotation, Main.dresserInterfaceDummy.fullRotationOrigin); + } + } + + private void DrawInterface_Tests() + { + } + + private void SetupDrawInterfaceLayers() + { + if (!this._needToSetupDrawInterfaceLayers) + return; + this._needToSetupDrawInterfaceLayers = false; + this._gameInterfaceLayers = new List(); + this._gameInterfaceLayers.AddRange((IEnumerable) new GameInterfaceLayer[43] + { + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Interface Logic 1", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_0_InterfaceLogic1(); + return true; + })), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: MP Player Names", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_20_MultiplayerPlayerNames(); + return true; + })), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Emote Bubbles", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_1_1_DrawEmoteBubblesInWorld(); + return true; + })), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Entity Markers", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_1_2_DrawEntityMarkersInWorld(); + return true; + })), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Smart Cursor Targets", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_2_SmartCursorTargets(); + return true; + })), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Laser Ruler", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_3_LaserRuler(); + return true; + })), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Ruler", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_4_Ruler(); + return true; + })), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Gamepad Lock On", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_5_GamepadLockOn(); + return true; + })), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Tile Grid Option", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_6_TileGridOption(); + return true; + })), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Town NPC House Banners", (GameInterfaceDrawMethod) (() => + { + this.DrawInterface_7_TownNPCHouseBanners(); + return true; + })), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Hide UI Toggle", new GameInterfaceDrawMethod(Main.DrawInterface_8_CheckF11UIHideToggle), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Wire Selection", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_9_WireSelection(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Capture Manager Check", new GameInterfaceDrawMethod(Main.DrawInterface_10_CheckCaptureManager)), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Ingame Options", new GameInterfaceDrawMethod(this.DrawInterface_11_IngameOptionsMenu), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Fancy UI", new GameInterfaceDrawMethod(Main.DrawInterface_12_IngameFancyUI), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Achievement Complete Popups", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_13_AchievementCompletePopups(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Entity Health Bars", (GameInterfaceDrawMethod) (() => + { + this.DrawInterface_14_EntityHealthBars(); + return true; + })), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Invasion Progress Bars", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_15_InvasionProgressBars(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Map / Minimap", (GameInterfaceDrawMethod) (() => + { + this.DrawInterface_16_MapOrMinimap(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Diagnose Net", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_17_DiagnoseNet(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Diagnose Video", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_18_DiagnoseVideo(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Sign Tile Bubble", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_19_SignTileBubble(); + return true; + })), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Hair Window", (GameInterfaceDrawMethod) (() => + { + this.DrawInterface_21_HairWindow(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Dresser Window", (GameInterfaceDrawMethod) (() => + { + this.DrawInterface_22_DresserWindow(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: NPC / Sign Dialog", (GameInterfaceDrawMethod) (() => + { + this.DrawInterface_23_NPCSignsDialog(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Interface Logic 2", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_24_InterfaceLogic2(); + return true; + })), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Resource Bars", (GameInterfaceDrawMethod) (() => + { + this.DrawInterface_25_ResourceBars(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Interface Logic 3", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_26_InterfaceLogic3(); + return true; + })), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Inventory", (GameInterfaceDrawMethod) (() => + { + this.DrawInterface_27_Inventory(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Info Accessories Bar", (GameInterfaceDrawMethod) (() => + { + this.DrawInterface_28_InfoAccs(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Settings Button", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_29_SettingsButton(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Hotbar", (GameInterfaceDrawMethod) (() => + { + this.DrawInterface_30_Hotbar(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Builder Accessories Bar", (GameInterfaceDrawMethod) (() => + { + this.DrawInterface_31_BuilderAccToggles(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Radial Hotbars", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_32_GamepadRadialHotbars(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Mouse Text", (GameInterfaceDrawMethod) (() => + { + this.DrawInterface_33_MouseText(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Player Chat", (GameInterfaceDrawMethod) (() => + { + this.DrawInterface_34_PlayerChat(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Death Text", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_35_YouDied(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Cursor", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_36_Cursor(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Debug Stuff", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_37_DebugStuff(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Mouse Item / NPC Head", (GameInterfaceDrawMethod) (() => + { + this.DrawInterface_38_MouseCarriedObject(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Mouse Over", (GameInterfaceDrawMethod) (() => + { + this.DrawInterface_39_MouseOver(); + return true; + })), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Interact Item Icon", (GameInterfaceDrawMethod) (() => + { + this.DrawInterface_40_InteractItemIcon(); + return true; + }), InterfaceScaleType.UI), + (GameInterfaceLayer) new LegacyGameInterfaceLayer("Vanilla: Interface Logic 4", (GameInterfaceDrawMethod) (() => + { + Main.DrawInterface_41_InterfaceLogic4(); + return true; + }), InterfaceScaleType.UI) + }); + } + + protected void DrawInterface(GameTime gameTime) + { + Main._drawInterfaceGameTime = gameTime; + if (this._needToSetupDrawInterfaceLayers) + this.SetupDrawInterfaceLayers(); + PlayerInput.SetZoom_UI(); + foreach (GameInterfaceLayer gameInterfaceLayer in this._gameInterfaceLayers) + { + if (!gameInterfaceLayer.Draw()) + break; + } + PlayerInput.SetZoom_World(); + } + + private static void DrawWallOfCopperShortswords() + { + UnifiedRandom r = new UnifiedRandom(5000); + Texture2D texture = TextureAssets.Cloud[28].Value; + Vector2 vector2_1 = Main.ScreenSize.ToVector2(); + Main.spriteBatch.Begin(); + for (int index = 0; index < 20000; ++index) + { + Vector2 vector2_2 = r.NextVector2Square(-0.1f, 1.1f); + vector2_2.X -= 0.1f; + vector2_2.X += (float) ((double) Main.GlobalTimeWrappedHourly % 10.0 / 10.0 * 1.20000004768372); + vector2_2.Y -= (float) ((double) Main.GlobalTimeWrappedHourly % 10.0 / 10.0); + if ((double) vector2_2.Y < -0.200000002980232) + vector2_2.Y += 1.4f; + if ((double) vector2_2.X > 1.10000002384186) + vector2_2.X -= 1.2f; + Vector2 position = vector2_2 * vector2_1; + Main.spriteBatch.Draw(texture, position, Microsoft.Xna.Framework.Color.White); + } + Main.spriteBatch.End(); + } + + private static void DrawWallOfBoulders() + { + UnifiedRandom r = new UnifiedRandom(5000); + Main.instance.LoadProjectile(99); + Texture2D texture = TextureAssets.Projectile[99].Value; + Vector2 vector2_1 = Main.ScreenSize.ToVector2(); + Main.spriteBatch.Begin(); + for (int index = 0; index < 20000; ++index) + { + Vector2 vector2_2 = r.NextVector2Square(-0.1f, 1.1f); + vector2_2.X *= 0.1f; + vector2_2.X -= 0.1f; + vector2_2.X += (float) ((double) Main.GlobalTimeWrappedHourly % 10.0 / 10.0 * 1.20000004768372); + vector2_2.Y -= (float) ((double) Main.GlobalTimeWrappedHourly % 10.0 / 10.0); + if ((double) vector2_2.Y < -0.200000002980232) + vector2_2.Y += 1.4f; + if ((double) vector2_2.X > 1.10000002384186) + vector2_2.X -= 1.2f; + Vector2 position = vector2_2 * vector2_1; + Main.spriteBatch.Draw(texture, position, Microsoft.Xna.Framework.Color.White); + } + Main.spriteBatch.End(); + } + + private static void DrawInterface_41_InterfaceLogic4() + { + Main.npcChatRelease = !Main.mouseRight; + Main._MouseOversCanClear = true; + Main.DrawPendingMouseText(); + Main.cursorOverride = -1; + } + + private static void DrawPendingMouseText() + { + Main.DrawGamepadInstructions(); + if (!Main.instance._mouseTextCache.isValid) + return; + Main.instance.MouseTextInner(Main.instance._mouseTextCache); + Main.DrawInterface_36_Cursor(); + Main.instance._mouseTextCache.isValid = false; + Main.instance._mouseTextCache.noOverride = false; + } + + private void DrawInterface_40_InteractItemIcon() + { + if (Main.HoveringOverAnNPC || Main.LocalPlayer.mouseInterface) + return; + int index = Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type; + if (index == 8 && Main.player[Main.myPlayer].UsingBiomeTorches) + index = Main.player[Main.myPlayer].BiomeTorchHoldStyle(index); + if (Main.player[Main.myPlayer].cursorItemIconID != 0) + index = Main.player[Main.myPlayer].cursorItemIconID; + bool flag1 = Main.player[Main.myPlayer].cursorItemIconEnabled && (Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type > 0 || (uint) Main.player[Main.myPlayer].cursorItemIconID > 0U); + Main.ItemIconCacheVerification(); + bool flag2 = Main._itemIconCacheTime > 0 && Main.mouseItem.type < 1; + if (!(flag1 | flag2)) + return; + int cacheSelectedItemId = Main._itemIconCacheSelectedItemID; + if (!flag1) + Utils.Swap(ref cacheSelectedItemId, ref Main.player[Main.myPlayer].cursorItemIconID); + Microsoft.Xna.Framework.Color currentColor = Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].GetAlpha(Microsoft.Xna.Framework.Color.White); + Microsoft.Xna.Framework.Color color = Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].GetColor(Microsoft.Xna.Framework.Color.White); + if (Main.player[Main.myPlayer].cursorItemIconID != 0) + { + currentColor = Microsoft.Xna.Framework.Color.White; + color = new Microsoft.Xna.Framework.Color(); + } + if (Main.player[Main.myPlayer].cursorItemIconID == 269) + currentColor = Main.player[Main.myPlayer].shirtColor; + float cursorScale = Main.cursorScale; + ItemSlot.GetItemLight(ref currentColor, index); + SpriteEffects effects = SpriteEffects.None; + if (Main.player[Main.myPlayer].cursorItemIconReversed) + effects = SpriteEffects.FlipHorizontally; + if (index > 0) + { + Main.instance.LoadItem(index); + Main.spriteBatch.Draw(TextureAssets.Item[index].Value, new Vector2((float) (Main.mouseX + 10), (float) (Main.mouseY + 10)), new Microsoft.Xna.Framework.Rectangle?(Item.GetDrawHitbox(index, (Player) null)), currentColor, 0.0f, new Vector2(), cursorScale, effects, 0.0f); + } + if (Main.player[Main.myPlayer].cursorItemIconText != "") + this.MouseText(Main.player[Main.myPlayer].cursorItemIconText); + if (Main.player[Main.myPlayer].cursorItemIconID == 0 && Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].color != new Microsoft.Xna.Framework.Color()) + { + Main.instance.LoadItem(Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type); + Main.spriteBatch.Draw(TextureAssets.Item[Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type].Value, new Vector2((float) (Main.mouseX + 10), (float) (Main.mouseY + 10)), new Microsoft.Xna.Framework.Rectangle?(Item.GetDrawHitbox(Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type, (Player) null)), color, 0.0f, new Vector2(), cursorScale, SpriteEffects.None, 0.0f); + } + if (flag1) + return; + Utils.Swap(ref cacheSelectedItemId, ref Main.player[Main.myPlayer].cursorItemIconID); + } + + private void DrawInterface_39_MouseOver() + { + if (Main.ignoreErrors) + { + try + { + this.DrawMouseOver(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + this.DrawMouseOver(); + } + + private void DrawInterface_38_MouseCarriedObject() + { + if (Main.mouseItem.type > 0 && Main.mouseItem.stack > 0) + { + this.SetMouseNPC(-1, -1); + Main.player[Main.myPlayer].cursorItemIconEnabled = false; + Main.player[Main.myPlayer].cursorItemIconID = 0; + Main.mouseText = true; + double inventoryScale = (double) Main.inventoryScale; + Main.inventoryScale = Main.cursorScale; + ItemSlot.Draw(Main.spriteBatch, ref Main.mouseItem, 21, new Vector2((float) Main.mouseX, (float) Main.mouseY)); + Main.inventoryScale = (float) inventoryScale; + } + else + { + if (this.mouseNPCType <= -1) + return; + float scale = 1f * Main.cursorScale; + if (this.mouseNPCIndex >= 0) + { + NPC npc = Main.npc[this.mouseNPCIndex]; + if (!npc.active || npc.type != this.mouseNPCType) + this.SetMouseNPC_ToHousingQuery(); + } + int mouseNpcType = this.mouseNPCType; + ITownNPCProfile profile; + int index = this.mouseNPCIndex < 0 || !TownNPCProfiles.Instance.GetProfile(mouseNpcType, out profile) ? NPC.TypeToDefaultHeadIndex(mouseNpcType) : profile.GetHeadTextureIndex(Main.npc[this.mouseNPCIndex]); + Texture2D texture = TextureAssets.NpcHead[index].Value; + Main.spriteBatch.Draw(texture, new Vector2((float) ((double) Main.mouseX + 26.0 * (double) scale - (double) texture.Width * 0.5 * (double) scale), (float) ((double) Main.mouseY + 26.0 * (double) scale - (double) texture.Height * 0.5 * (double) scale)), new Microsoft.Xna.Framework.Rectangle?(), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), scale, SpriteEffects.None, 0.0f); + if (PlayerInput.IgnoreMouseInterface) + return; + Main.player[Main.myPlayer].mouseInterface = true; + Main.mouseText = false; + if (Main.mouseRight && Main.mouseRightRelease) + { + SoundEngine.PlaySound(12); + this.SetMouseNPC(-1, -1); + } + if (!Main.mouseLeft || !Main.mouseLeftRelease) + return; + if (this.mouseNPCType == 0) + { + PlayerInput.SetZoom_Unscaled(); + PlayerInput.SetZoom_MouseInWorld(); + int x = (int) (((double) Main.mouseX + (double) Main.screenPosition.X) / 16.0); + int num1 = (int) (((double) Main.mouseY + (double) Main.screenPosition.Y) / 16.0); + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + num1 = (int) (((double) Main.screenPosition.Y + (double) Main.screenHeight - (double) Main.mouseY) / 16.0); + PlayerInput.SetZoom_Unscaled(); + int num2 = -1; + int y = num1; + int n = num2; + if (!WorldGen.MoveTownNPC(x, y, n)) + return; + Main.NewText(Lang.inter[39].Value, G: (byte) 240, B: (byte) 20); + } + else + { + int mouseNpcIndex = this.mouseNPCIndex; + if (mouseNpcIndex < 0) + return; + PlayerInput.SetZoom_Unscaled(); + PlayerInput.SetZoom_MouseInWorld(); + int x = (int) (((double) Main.mouseX + (double) Main.screenPosition.X) / 16.0); + int y = (int) (((double) Main.mouseY + (double) Main.screenPosition.Y) / 16.0); + PlayerInput.SetZoom_Unscaled(); + if (!WorldGen.MoveTownNPC(x, y, mouseNpcIndex)) + return; + this.SetMouseNPC(-1, -1); + WorldGen.moveRoom(x, y, mouseNpcIndex); + SoundEngine.PlaySound(12); + } + } + } + + private static void DrawInterface_37_DebugStuff() + { + } + + private static void DrawInterface_36_Cursor() + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.SamplerStateForCursor, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, Main.UIScaleMatrix); + if (Main.cursorOverride != -1) + { + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color((int) ((double) Main.cursorColor.R * 0.200000002980232), (int) ((double) Main.cursorColor.G * 0.200000002980232), (int) ((double) Main.cursorColor.B * 0.200000002980232), (int) ((double) Main.cursorColor.A * 0.5)); + Microsoft.Xna.Framework.Color color2 = Main.cursorColor; + bool flag1 = true; + bool flag2 = true; + float rotation = 0.0f; + Vector2 vector2 = new Vector2(); + float num = 1f; + if (Main.cursorOverride == 2) + { + flag1 = false; + color2 = Microsoft.Xna.Framework.Color.White; + num = 0.7f; + vector2 = new Vector2(0.1f); + } + switch (Main.cursorOverride - 2) + { + case 0: + flag1 = false; + color2 = Microsoft.Xna.Framework.Color.White; + num = 0.7f; + vector2 = new Vector2(0.1f); + break; + case 1: + case 4: + case 5: + case 6: + case 7: + case 8: + flag1 = false; + color2 = Microsoft.Xna.Framework.Color.White; + break; + } + if (flag1) + Main.spriteBatch.Draw(TextureAssets.Cursors[Main.cursorOverride].Value, new Vector2((float) (Main.mouseX + 1), (float) (Main.mouseY + 1)), new Microsoft.Xna.Framework.Rectangle?(), color1, rotation, vector2 * TextureAssets.Cursors[Main.cursorOverride].Value.Size(), Main.cursorScale * 1.1f * num, SpriteEffects.None, 0.0f); + if (!flag2) + return; + Main.spriteBatch.Draw(TextureAssets.Cursors[Main.cursorOverride].Value, new Vector2((float) Main.mouseX, (float) Main.mouseY), new Microsoft.Xna.Framework.Rectangle?(), color2, rotation, vector2 * TextureAssets.Cursors[Main.cursorOverride].Value.Size(), Main.cursorScale * num, SpriteEffects.None, 0.0f); + } + else if (Main.SmartCursorEnabled) + Main.DrawCursor(Main.DrawThickCursor(true), true); + else + Main.DrawCursor(Main.DrawThickCursor()); + } + + private static void DrawInterface_35_YouDied() + { + if (!Main.player[Main.myPlayer].dead) + return; + float num1 = -60f; + string str = Lang.inter[38].Value; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.DeathText.Value, str, new Vector2((float) (Main.screenWidth / 2) - FontAssets.DeathText.Value.MeasureString(str).X / 2f, (float) (Main.screenHeight / 2) + num1), Main.player[Main.myPlayer].GetDeathAlpha(Microsoft.Xna.Framework.Color.Transparent), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + if (Main.player[Main.myPlayer].lostCoins > 0) + { + num1 += 50f; + string textValue = Language.GetTextValue("Game.DroppedCoins", (object) Main.player[Main.myPlayer].lostCoinString); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, textValue, new Vector2((float) (Main.screenWidth / 2) - FontAssets.MouseText.Value.MeasureString(textValue).X / 2f, (float) (Main.screenHeight / 2) + num1), Main.player[Main.myPlayer].GetDeathAlpha(Microsoft.Xna.Framework.Color.Transparent), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + float num2 = num1 + (Main.player[Main.myPlayer].lostCoins > 0 ? 24f : 50f) + 20f; + float num3 = 0.7f; + string textValue1 = Language.GetTextValue("Game.RespawnInSuffix", (object) ((float) (int) (1.0 + (double) Main.player[Main.myPlayer].respawnTimer / 60.0)).ToString()); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.DeathText.Value, textValue1, new Vector2((float) (Main.screenWidth / 2) - (float) ((double) FontAssets.MouseText.Value.MeasureString(textValue1).X * (double) num3 / 2.0), (float) (Main.screenHeight / 2) + num2), Main.player[Main.myPlayer].GetDeathAlpha(Microsoft.Xna.Framework.Color.Transparent), 0.0f, new Vector2(), num3, SpriteEffects.None, 0.0f); + } + + private void DrawInterface_34_PlayerChat() + { + if (Main.ignoreErrors) + { + try + { + this.DrawPlayerChat(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + this.DrawPlayerChat(); + } + + private void DrawInterface_33_MouseText() + { + if (Main.mouseItem.stack <= 0) + Main.mouseItem.type = 0; + if (Main.hoverItemName != null && Main.hoverItemName != "" && Main.mouseItem.type == 0) + { + Main.player[Main.myPlayer].cursorItemIconEnabled = false; + if (Main.SettingsEnabled_OpaqueBoxBehindTooltips) + this.MouseText(Main.hoverItemName, Main.rare, hackedMouseX: (Main.mouseX + 6), hackedMouseY: (Main.mouseY + 6)); + else + this.MouseText(Main.hoverItemName, Main.rare); + Main.mouseText = true; + } + if (!Main.LocalPlayer.rulerLine || Main.LocalPlayer.builderAccStatus[0] != 0 || (double) Main.LocalPlayer.velocity.Length() > 6.0) + return; + int num1 = Math.Abs(Main.rulerLineDisplayValues.X) + 1; + int num2 = Math.Abs(Main.rulerLineDisplayValues.Y) + 1; + if (num1 <= 1 && num2 <= 1) + return; + Utils.DrawBorderString(Main.spriteBatch, num1.ToString() + "x" + (object) num2, Main.MouseScreen + new Vector2(16f, 0.0f), new Microsoft.Xna.Framework.Color(0.24f, 0.8f, 0.9f, 1f), Main.GameZoomTarget, anchory: 0.8f); + } + + private static void DrawInterface_32_GamepadRadialHotbars() + { + ItemSlot.DrawRadialCircular(Main.spriteBatch, new Vector2((float) Main.screenWidth, (float) Main.screenHeight) / 2f); + ItemSlot.DrawRadialQuicks(Main.spriteBatch, new Vector2((float) Main.screenWidth, (float) Main.screenHeight) / 2f); + } + + private void DrawInterface_31_BuilderAccToggles() => this.DrawBuilderAccToggles(new Vector2(10f, 77f)); + + public static void DrawInterface_29_SettingsButton() + { + Main._settingsButtonIsPushedToSide = false; + if (!Main.playerInventory && !Main.ingameOptionsWindow && !Main.player[Main.myPlayer].ghost && !Main.player[Main.myPlayer].dead) + return; + string text = Lang.inter[62].Value; + string textSizeMatcher = "Settings"; + int posX = Main.screenWidth - 110; + int posY = Main.screenHeight - 20; + int num1 = 620; + int num2 = 870; + int accessorySlotsToShow = Main.player[Main.myPlayer].GetAmountOfExtraAccessorySlotsToShow(); + if (accessorySlotsToShow > 1) + { + int num3 = (int) (56.0 * (double) Main.inventoryScale * (double) (accessorySlotsToShow - 1)); + num1 += num3; + num2 += num3; + } + if (accessorySlotsToShow >= 1 && (Main.screenHeight < num1 || Main.screenHeight < num2 && Main.mapStyle == 1)) + { + posX -= 140; + posY -= PlayerInput.UsingGamepad.ToInt() * 30; + Main._settingsButtonIsPushedToSide = true; + } + Action clickAction = new Action(IngameOptions.Open); + if (Main.ingameOptionsWindow) + clickAction = new Action(IngameOptions.Close); + Main.DrawSettingButton(ref Main.mouseExit, ref Main.exitScale, posX, posY, text, textSizeMatcher, clickAction); + } + + public static void DrawSettingButton( + ref bool mouseOver, + ref float scale, + int posX, + int posY, + string text, + string textSizeMatcher, + Action clickAction) + { + Vector2 vector2_1 = FontAssets.MouseText.Value.MeasureString(textSizeMatcher); + Vector2 vector2_2 = FontAssets.MouseText.Value.MeasureString(text); + Vector2 vector2_3 = FontAssets.DeathText.Value.MeasureString(text); + float num1 = vector2_1.X / vector2_2.X; + if (mouseOver) + { + if ((double) scale < 0.96) + scale += 0.02f; + } + else if ((double) scale > 0.8) + scale -= 0.02f; + UILinkPointNavigator.SetPosition(308, new Vector2((float) posX, (float) posY)); + for (int index = 0; index < 5; ++index) + { + int num2 = 0; + int num3 = 0; + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.Black; + if (index == 0) + num2 = -2; + if (index == 1) + num2 = 2; + if (index == 2) + num3 = -2; + if (index == 3) + num3 = 2; + if (index == 4) + color = Microsoft.Xna.Framework.Color.White; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.DeathText.Value, text, new Vector2((float) (posX + num2), (float) (posY + num3)), color, 0.0f, new Vector2(vector2_3.X / 2f, vector2_3.Y / 2f), (scale - 0.2f) * num1, SpriteEffects.None, 0.0f); + } + if ((double) Main.mouseX > (double) posX - (double) vector2_3.X / 2.0 && (double) Main.mouseX < (double) posX + (double) vector2_3.X / 2.0 && (double) Main.mouseY > (double) posY - (double) vector2_3.Y / 2.0 && (double) Main.mouseY < (double) posY + (double) vector2_3.Y / 2.0 - 10.0 && !Main.LocalPlayer.mouseInterface) + { + if (PlayerInput.IgnoreMouseInterface) + return; + if (!mouseOver) + SoundEngine.PlaySound(12); + mouseOver = true; + Main.player[Main.myPlayer].mouseInterface = true; + if (!Main.mouseLeftRelease || !Main.mouseLeft) + return; + mouseOver = false; + scale = 0.8f; + clickAction(); + } + else + mouseOver = false; + } + + private void DrawInterface_28_InfoAccs() + { + double inventoryScale = (double) Main.inventoryScale; + Main.inventoryScale = 0.6f; + this.DrawInfoAccs(); + Main.inventoryScale = (float) inventoryScale; + } + + private void DrawInterface_27_Inventory() + { + if (Main.playerInventory) + { + if (Main.player[Main.myPlayer].chest != -1) + Main.CreativeMenu.CloseMenu(); + if (Main.ignoreErrors) + { + try + { + this.DrawInventory(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + this.DrawInventory(); + } + else + { + Main.CreativeMenu.CloseMenu(); + Main.recFastScroll = true; + this.SetMouseNPC(-1, -1); + Main.EquipPage = 0; + } + } + + private static void DrawInterface_26_InterfaceLogic3() + { + bool playerInventory = Main.playerInventory; + if (Main.player[Main.myPlayer].dead) + Main.playerInventory = false; + if (!Main.playerInventory) + { + Main.player[Main.myPlayer].chest = -1; + Main.InGuideCraftMenu = false; + Main.InReforgeMenu = false; + if (playerInventory) + Recipe.FindRecipes(); + } + Main.hoverItemName = ""; + } + + private void DrawInterface_25_ResourceBars() => this.GUIBarsDraw(); + + private static void DrawInterface_24_InterfaceLogic2() + { + Main.invAlpha += Main.invDir * 0.2f; + if ((double) Main.invAlpha > 240.0) + { + Main.invAlpha = 240f; + Main.invDir = -1f; + } + if ((double) Main.invAlpha < 180.0) + { + Main.invAlpha = 180f; + Main.invDir = 1f; + } + Main.inventoryBack = new Microsoft.Xna.Framework.Color((int) (byte) Main.invAlpha, (int) (byte) Main.invAlpha, (int) (byte) Main.invAlpha, (int) (byte) Main.invAlpha); + Main.mouseText = false; + Main.rare = 0; + } + + private void DrawInterface_23_NPCSignsDialog() => this.GUIChatDraw(); + + private void DrawInterface_22_DresserWindow() + { + if (!Main.clothesWindow) + return; + this.DrawClothesWindow(); + } + + private void DrawInterface_21_HairWindow() + { + if (!Main.hairWindow) + return; + this.DrawHairWindow(); + } + + private static void DrawInterface_20_MultiplayerPlayerNames() => Main.ActiveClosePlayersTeamOverlay.Draw(); + + private static void DrawInterface_19_SignTileBubble() + { + if (!Main.signBubble) + return; + int num1 = (int) ((double) Main.signX - (double) Main.screenPosition.X); + int num2 = (int) ((double) Main.signY - (double) Main.screenPosition.Y); + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + num2 = Main.screenHeight - (int) ((double) Main.signY - (double) Main.screenPosition.Y) - 32; + SpriteEffects effects = SpriteEffects.None; + int num3; + if ((double) Main.signX > (double) Main.player[Main.myPlayer].position.X + (double) Main.player[Main.myPlayer].width) + { + effects = SpriteEffects.FlipHorizontally; + num3 = num1 + (-8 - TextureAssets.Chat2.Width()); + } + else + num3 = num1 + 8; + int num4 = num2 - 22; + Main.spriteBatch.Draw(TextureAssets.Chat2.Value, new Vector2((float) num3, (float) num4), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chat2.Width(), TextureAssets.Chat2.Height())), new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor), 0.0f, new Vector2(), 1f, effects, 0.0f); + Main.signBubble = false; + } + + private static void DrawInterface_18_DiagnoseVideo() + { + if (!Main.drawDiag) + return; + if (PlayerInput.UsingGamepad) + { + for (int index = 0; index < 2; ++index) + { + string str = ""; + int num1 = 20; + int num2 = 160 + index * 16; + if (index == 0) + str = "Gamepad Left Thumbstick : " + string.Format("{0,-10} , {1,-10}", (object) PlayerInput.GamepadThumbstickLeft.X.ToString("P2"), (object) PlayerInput.GamepadThumbstickLeft.Y.ToString("P2")); + if (index == 1) + str = "Gamepad Right Thumbstick: " + string.Format("{0,-10} , {1,-10}", (object) PlayerInput.GamepadThumbstickRight.X.ToString("P2"), (object) PlayerInput.GamepadThumbstickRight.Y.ToString("P2")); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, str, new Vector2((float) num1, (float) num2), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + for (int index = 0; index < 7; ++index) + { + string str = ""; + int num3 = 20; + int num4 = 220 + index * 16; + if (index == 0) + str = "Solid Tiles:"; + if (index == 1) + str = "Misc. Tiles:"; + if (index == 2) + str = "Walls Tiles:"; + if (index == 3) + str = "Background Tiles:"; + if (index == 4) + str = "Water Tiles:"; + if (index == 5) + str = "Black Tiles:"; + if (index == 6) + str = "Total Render:"; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, str, new Vector2((float) num3, (float) num4), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + for (int drawType = 0; drawType < 7; ++drawType) + { + int num5 = 180; + int num6 = 220 + drawType * 16; + string str = string.Format("{0:F2}ms", (object) (float) (drawType != 6 ? (double) TimeLogger.GetDrawTime(drawType) : (double) TimeLogger.GetDrawTotal())); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, str, new Vector2((float) num5, (float) num6), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + for (int index = 0; index < 6; ++index) + { + string str = ""; + int num7 = 20; + int num8 = 346 + index * 16; + if (index == 0) + str = "Lighting Init:"; + if (index == 1) + str = "Lighting Phase #1:"; + if (index == 2) + str = "Lighting Phase #2:"; + if (index == 3) + str = "Lighting Phase #3"; + if (index == 4) + str = "Lighting Phase #4"; + if (index == 5) + str = "Total Lighting:"; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, str, new Vector2((float) num7, (float) num8), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + for (int lightingType = 0; lightingType < 6; ++lightingType) + { + int num9 = 180; + int num10 = 346 + lightingType * 16; + string str = string.Format("{0:F2}ms", (object) (float) (lightingType != 5 ? (double) TimeLogger.GetLightingTime(lightingType) : (double) TimeLogger.GetLightingTotal())); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, str, new Vector2((float) num9, (float) num10), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + int num11 = 5; + for (int index = 0; index < num11; ++index) + { + int num12 = 20; + int num13 = 456 + index * 16; + string str = "Render #" + (object) index + ":"; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, str, new Vector2((float) num12, (float) num13), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + for (int renderType = 0; renderType < num11; ++renderType) + { + int num14 = 180; + int num15 = 456 + renderType * 16; + string str = string.Format("{0:F2}ms", (object) TimeLogger.GetRenderTime(renderType)); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, str, new Vector2((float) num14, (float) num15), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + for (int renderType = 0; renderType < num11; ++renderType) + { + int num16 = 230; + int num17 = 456 + renderType * 16; + int num18 = num16 + 10; + string str = string.Format("{0:F2}ms", (object) TimeLogger.GetRenderMax(renderType)); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, str, new Vector2((float) num18, (float) num17), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + string str1 = ""; + int num19 = 20; + int num20 = 456 + 16 * num11 + 16; + string str2 = "Update:"; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, str2, new Vector2((float) num19, (float) num20), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + str1 = ""; + int num21 = 180; + string str3 = string.Format("{0:F2}ms", (object) Main.upTimer); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, str3, new Vector2((float) num21, (float) num20), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + str1 = ""; + int num22 = 240; + string str4 = string.Format("{0:F2}ms", (object) Main.upTimerMax); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, str4, new Vector2((float) num22, (float) num20), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + + private static void DrawInterface_17_DiagnoseNet() + { + if (!Main.shouldDrawNetDiagnosticsUI) + return; + Main.ActiveNetDiagnosticsUI.Draw(Main.spriteBatch); + } + + private void DrawInterface_16_MapOrMinimap() + { + Main.mH = 0; + if (!Main.mapEnabled) + return; + if (!Main.mapFullscreen && Main.mapStyle == 1) + { + Main.mH = 256; + try + { + this.DrawMap(new GameTime()); + } + catch (Exception ex) + { + if (Main.ignoreErrors) + TimeLogger.DrawException(ex); + else + throw; + } + } + PlayerInput.SetZoom_UI(); + if (Main.mH + this.RecommendedEquipmentAreaPushUp <= Main.screenHeight) + return; + Main.mH = Main.screenHeight - this.RecommendedEquipmentAreaPushUp; + } + + public int RecommendedEquipmentAreaPushUp => Main.player[Main.myPlayer].CanDemonHeartAccessoryBeShown() ? 610 + PlayerInput.UsingGamepad.ToInt() * 30 : 600; + + private static void DrawInterface_15_InvasionProgressBars() + { + Main.DrawInvasionProgress(); + if (Main.HealthBarDrawSettings == (byte) 0) + return; + Main.BigBossProgressBar.Draw(Main.spriteBatch); + } + + private void DrawInterface_14_EntityHealthBars() + { + if (Main.HealthBarDrawSettings == (byte) 0) + return; + int index1 = -1; + if (PlayerInput.UsingGamepad) + { + Player localPlayer = Main.LocalPlayer; + for (int index2 = 0; index2 < 200; ++index2) + { + NPC npc = Main.npc[index2]; + if ((npc.life == npc.lifeMax || npc.dontTakeDamage) && !npc.dontTakeDamage && (double) npc.nameOver > 0.0 && (index1 == -1 || (double) npc.Distance(localPlayer.Center) < (double) Main.npc[index1].Distance(localPlayer.Center))) + index1 = index2; + } + } + bool flag = false; + for (int i = 199; i >= 0; --i) + { + if (Main.npc[i].active && Main.npc[i].type > 0) + { + NPC npc1 = Main.npc[i]; + npc1.position = npc1.position + Main.npc[i].netOffset; + if (Main.npc[i].life != Main.npc[i].lifeMax && !Main.npc[i].dontTakeDamage) + { + float scale1 = 1f; + int type = Main.npc[i].type; + if (type == 4) + scale1 = 1.5f; + if (type == 35) + scale1 = 1.5f; + if (type == 36) + scale1 = 1.5f; + if (type == 50) + scale1 = 1.5f; + if (type == 113) + scale1 = 1.5f; + if (type == 114) + scale1 = 1.5f; + if (type == 125) + scale1 = 1.5f; + if (type == 126) + scale1 = 1.5f; + if (type == (int) sbyte.MaxValue) + scale1 = 1.5f; + if (type == 128) + scale1 = 1.5f; + if (type == 129) + scale1 = 1.5f; + if (type == 130) + scale1 = 1.5f; + if (type == 131) + scale1 = 1.5f; + if (type == 222) + scale1 = 1.5f; + if (type >= 245 && type <= 249) + scale1 = 1.5f; + if (type == 262) + scale1 = 1.5f; + if (type == 266) + scale1 = 1.5f; + if (type == 564 || type == 565 || type == 551 || type == 576 || type == 577) + scale1 = 1.5f; + if (type == 87) + scale1 = 1.5f; + if (type == 510 || type == 454 || type == 621) + scale1 = 1.5f; + if (type == 439 || type == 370) + scale1 = 1.5f; + if ((!Main.expertMode || type != 266) && (type != 439 && type != 440 || (double) Main.npc[i].ai[0] != 5.0)) + { + if (type >= 134 && type <= 136) + { + float scale2 = 1.5f; + if (!flag) + { + flag = true; + Vector2 vector2_1 = new Vector2(); + float num = 999999f; + for (int index3 = 0; index3 < 200; ++index3) + { + if (Main.npc[index3].active && Main.npc[index3].type >= 134 && Main.npc[index3].type <= 136) + { + Vector2 vector2_2 = Main.player[Main.myPlayer].Center - Main.npc[index3].Center; + if ((double) vector2_2.Length() < (double) num && Collision.CanHit(Main.player[Main.myPlayer].Center, 1, 1, Main.npc[index3].Center, 1, 1)) + { + num = vector2_2.Length(); + vector2_1 = Main.npc[index3].position; + } + } + } + if ((double) num < (double) Main.screenWidth) + { + Main.destroyerHB = (double) Main.destroyerHB.X >= 100.0 || (double) Main.destroyerHB.Y >= 100.0 ? (Main.destroyerHB * 49f + vector2_1) / 50f : vector2_1; + Vector2 destroyerHb = Main.destroyerHB; + int index4 = i; + if (type != 134 && Main.npc[i].realLife != -1) + index4 = Main.npc[i].realLife; + float alpha = (float) (((double) Lighting.Brightness((int) (((double) Main.npc[i].position.X + (double) (Main.npc[i].width / 2)) / 16.0), (int) (((double) Main.npc[i].position.Y + (double) (Main.npc[i].height / 2) + (double) Main.npc[i].gfxOffY) / 16.0)) + 1.0) / 2.0); + this.DrawHealthBar(destroyerHb.X + (float) (Main.npc[i].width / 2), destroyerHb.Y + (float) (Main.npc[i].height / 2), Main.npc[index4].life, Main.npc[index4].lifeMax, alpha, scale2); + } + else + Main.destroyerHB = new Vector2(0.0f, 0.0f); + } + } + else if (type == 7) + this.DrawInterface_Healthbar_Worm(Main.npc[i], 9, scale1); + else if (type != 8 && type != 9) + { + if (type == 95) + this.DrawInterface_Healthbar_Worm(Main.npc[i], 97, scale1); + else if (type != 96 && type != 97) + { + if (type == 10) + this.DrawInterface_Healthbar_Worm(Main.npc[i], 12, scale1); + else if (type != 11 && type != 12) + { + if (type == 87) + this.DrawInterface_Healthbar_Worm(Main.npc[i], 92, scale1); + else if (type < 88 || type > 92) + { + if (type == 412) + this.DrawInterface_Healthbar_Worm(Main.npc[i], 414, scale1); + else if (type != 414 && type != 413) + { + if (type == 39) + this.DrawInterface_Healthbar_Worm(Main.npc[i], 41, scale1); + else if (type != 40 && type != 41) + { + if (type == 98) + this.DrawInterface_Healthbar_Worm(Main.npc[i], 100, scale1); + else if (type != 99 && type != 100) + { + if (type == 454) + this.DrawInterface_Healthbar_Worm(Main.npc[i], 459, scale1); + else if (type < 455 || type > 459) + { + if (type == 510) + this.DrawInterface_Healthbar_Worm(Main.npc[i], 512, scale1); + else if (type != 511 && type != 512) + { + if (type == 621) + this.DrawInterface_Healthbar_Worm(Main.npc[i], 623, scale1); + else if (type != 622 && type != 623) + { + if (type == 513) + this.DrawInterface_Healthbar_Worm(Main.npc[i], 515, scale1); + else if (type != 514 && type != 515) + { + if (type == 117) + this.DrawInterface_Healthbar_Worm(Main.npc[i], 119, scale1); + else if (type != 118 && type != 119) + { + switch (Main.HealthBarDrawSettings) + { + case 1: + float num1 = 10f + Main.NPCAddHeight(Main.npc[i]); + this.DrawHealthBar(Main.npc[i].position.X + (float) (Main.npc[i].width / 2), Main.npc[i].position.Y + (float) Main.npc[i].height + num1 + Main.npc[i].gfxOffY, Main.npc[i].life, Main.npc[i].lifeMax, Lighting.Brightness((int) (((double) Main.npc[i].position.X + (double) (Main.npc[i].width / 2)) / 16.0), (int) (((double) Main.npc[i].position.Y + (double) (Main.npc[i].height / 2) + (double) Main.npc[i].gfxOffY) / 16.0)), scale1); + break; + case 2: + float num2 = -24f - Main.NPCAddHeight(Main.npc[i]) / 2f; + this.DrawHealthBar(Main.npc[i].position.X + (float) (Main.npc[i].width / 2), Main.npc[i].position.Y + num2 + Main.npc[i].gfxOffY, Main.npc[i].life, Main.npc[i].lifeMax, Lighting.Brightness((int) (((double) Main.npc[i].position.X + (double) (Main.npc[i].width / 2)) / 16.0), (int) (((double) Main.npc[i].position.Y + (double) (Main.npc[i].height / 2) + (double) Main.npc[i].gfxOffY) / 16.0)), scale1); + break; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + else if (!Main.npc[i].dontTakeDamage && (double) Main.npc[i].nameOver > 0.0 && PlayerInput.UsingGamepad && i == index1) + { + Vector2 stringSize = ChatManager.GetStringSize(FontAssets.MouseText.Value, Main.npc[i].GivenOrTypeName, Vector2.One); + Vector2 vector2_3 = Main.npc[i].Bottom - Main.screenPosition + new Vector2(0.0f, 10f); + Vector2 pos; + if (NPC.GetNPCLocation(i, true, true, out int _, out pos)) + { + Vector2 vector2_4 = pos - Main.screenPosition + new Vector2(0.0f, (float) (10 + Main.npc[i].height / 2)); + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + vector2_4 = Main.ReverseGravitySupport(vector2_4, (float) (-Main.npc[i].height - 20)); + Vector2 origin = stringSize * new Vector2(0.5f, 0.0f); + ChatManager.DrawColorCodedStringShadow(Main.spriteBatch, FontAssets.MouseText.Value, Main.npc[i].GivenOrTypeName, vector2_4, Microsoft.Xna.Framework.Color.Black * Main.npc[i].nameOver * 0.5f, 0.0f, origin, Vector2.One); + ChatManager.DrawColorCodedString(Main.spriteBatch, FontAssets.MouseText.Value, Main.npc[i].GivenOrTypeName, vector2_4, Microsoft.Xna.Framework.Color.White * Main.npc[i].nameOver, 0.0f, origin, Vector2.One); + } + } + if (Main.npc[i].type == 548 && !Main.npc[i].dontTakeDamageFromHostiles && DD2Event.TimeLeftBetweenWaves > 0 && !Main.hideUI) + { + Vector2 position = Main.npc[i].Bottom - Main.screenPosition + new Vector2(0.0f, -100f); + string text = string.Format("{0}", (object) (DD2Event.TimeLeftBetweenWaves / 60)); + DynamicSpriteFont font = FontAssets.MouseText.Value; + float num = 1f; + Vector2 origin = font.MeasureString(text) * num * new Vector2(0.5f, 0.5f); + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, font, text, position, Microsoft.Xna.Framework.Color.White, 0.0f, origin, Vector2.One * num); + } + NPC npc2 = Main.npc[i]; + npc2.position = npc2.position - Main.npc[i].netOffset; + } + } + for (int index5 = 0; index5 < (int) byte.MaxValue; ++index5) + { + if (index5 != Main.myPlayer && Main.player[index5].active && !Main.player[index5].ghost && !Main.player[index5].dead && !Main.player[index5].invis && Main.player[index5].statLife != Main.player[index5].statLifeMax2) + { + switch (Main.HealthBarDrawSettings) + { + case 1: + int num3 = 10; + this.DrawHealthBar(Main.player[index5].position.X + (float) (Main.player[index5].width / 2), Main.player[index5].position.Y + (float) Main.player[index5].height + (float) num3 + Main.player[index5].gfxOffY, Main.player[index5].statLife, Main.player[index5].statLifeMax2, Main.player[index5].stealth * Lighting.Brightness((int) (((double) Main.player[index5].position.X + (double) (Main.player[index5].width / 2)) / 16.0), (int) (((double) Main.player[index5].position.Y + (double) (Main.player[index5].height / 2) + (double) Main.player[index5].gfxOffY) / 16.0))); + continue; + case 2: + int num4 = -20; + this.DrawHealthBar(Main.player[index5].position.X + (float) (Main.player[index5].width / 2), Main.player[index5].position.Y + (float) num4 + Main.player[index5].gfxOffY, Main.player[index5].statLife, Main.player[index5].statLifeMax2, Main.player[index5].stealth * Lighting.Brightness((int) (((double) Main.player[index5].position.X + (double) (Main.player[index5].width / 2)) / 16.0), (int) (((double) Main.player[index5].position.Y + (double) (Main.player[index5].height / 2) + (double) Main.player[index5].gfxOffY) / 16.0))); + continue; + default: + continue; + } + } + } + } + + private void DrawInterface_Healthbar_Worm(NPC head, int tailID, float scale) + { + NPC npc = head; + for (int index = head.whoAmI + 1; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == tailID) + { + npc = Main.npc[index]; + break; + } + } + Vector2 vector2 = (head.position + npc.position) / 2f; + this.DrawHealthBar(vector2.X + (float) (head.width / 2), vector2.Y + (float) (head.height / 2), head.life, head.lifeMax, Lighting.Brightness((int) (((double) head.position.X + (double) (head.width / 2)) / 16.0), (int) (((double) head.position.Y + (double) (head.height / 2) + (double) head.gfxOffY) / 16.0)), scale); + } + + private static void DrawInterface_13_AchievementCompletePopups() => InGameNotificationsTracker.DrawInGame(Main.spriteBatch); + + private static bool DrawInterface_12_IngameFancyUI() + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.SamplerStateForCursor, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, Main.UIScaleMatrix); + Main.InGameUI.Draw(Main.spriteBatch, Main._drawInterfaceGameTime); + bool flag = true; + if (Main.inFancyUI && !IngameFancyUI.Draw(Main.spriteBatch, Main._drawInterfaceGameTime)) + { + flag = false; + Main.DrawPendingMouseText(); + } + return flag; + } + + private bool DrawInterface_11_IngameOptionsMenu() + { + bool flag = true; + if (Main.ingameOptionsWindow) + { + this.DrawInterface_16_MapOrMinimap(); + PlayerInput.SetZoom_UI(); + Matrix uiScaleMatrix = Main.UIScaleMatrix; + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, (BlendState) null, (SamplerState) null, (DepthStencilState) null, (RasterizerState) null, (Effect) null, uiScaleMatrix); + IngameOptions.Draw(this, Main.spriteBatch); + this.DrawInterface_40_InteractItemIcon(); + Main.DrawPendingMouseText(); + flag = false; + Main._MouseOversCanClear = true; + } + return flag; + } + + private static bool DrawInterface_8_CheckF11UIHideToggle() + { + bool flag = true; + if (Main.hideUI) + { + Main.maxQ = true; + flag = false; + Main._MouseOversCanClear = true; + Main.DrawPendingMouseText(); + } + return flag; + } + + private static bool DrawInterface_10_CheckCaptureManager() + { + bool flag = true; + PlayerInput.SetDesiredZoomContext(ZoomContext.Unscaled_MouseInWorld); + CaptureManager.Instance.Update(); + if (CaptureManager.Instance.Active) + { + CaptureManager.Instance.Draw(Main.spriteBatch); + flag = false; + Main._MouseOversCanClear = true; + PlayerInput.SetZoom_UI(); + Matrix uiScaleMatrix = Main.UIScaleMatrix; + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, (BlendState) null, (SamplerState) null, (DepthStencilState) null, (RasterizerState) null, (Effect) null, uiScaleMatrix); + Main.DrawPendingMouseText(); + } + return flag; + } + + private static void DrawInterface_9_WireSelection() + { + if (!Main.hideUI) + { + Main.DrawInterface_Resources_GolfPower(); + Main.DrawInterface_GolfBallIndicator(); + } + WiresUI.HandleWiresUI(Main.spriteBatch); + } + + private static void DrawInterface_0_InterfaceLogic1() + { + if (Main.player[Main.myPlayer].selectedItem != 58 || Main.player[Main.myPlayer].itemAnimation <= 0) + return; + Main.mouseLeftRelease = false; + } + + private void DrawInterface_7_TownNPCHouseBanners() + { + if (Main.EquipPage != 1 && (!UILinkPointNavigator.Shortcuts.NPCS_IconsDisplay || !PlayerInput.UsingGamepad)) + return; + if (Main.ignoreErrors) + { + try + { + this.DrawNPCHousesInWorld(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + this.DrawNPCHousesInWorld(); + } + + private static void DrawInterface_6_TileGridOption() + { + bool flag = Main.MouseShowBuildingGrid && !Main.SmartCursorEnabled; + int num1 = !PlayerInput.UsingGamepad || Main.SmartCursorEnabled ? 0 : (!PlayerInput.UsingGamepadUI ? 1 : 0); + if (flag && !Main.player[Main.myPlayer].dead && !PlayerInput.CursorIsBusy) + { + float num2 = MathHelper.Lerp(0.0f, 0.7f, MathHelper.Clamp((float) (1.0 - (double) Main.player[Main.myPlayer].velocity.Length() / 6.0), 0.0f, 1f)); + Main.MouseBuildingGridAlpha = MathHelper.Lerp(Main.MouseBuildingGridAlpha, num2, 0.2f); + float buildingGridAlpha = Main.MouseBuildingGridAlpha; + if ((double) buildingGridAlpha <= 0.0) + return; + Vector2 vector2_1 = Main.MouseWorld.ToTileCoordinates().ToVector2() * 16f; + Vector2 vector2_2 = new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange); + int num3 = Main.drawToScreen ? 1 : 0; + Vector2 position = vector2_1 - Main.screenPosition + new Vector2(8f); + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + position.Y = (float) Main.screenHeight - position.Y; + Texture2D texture2D = TextureAssets.CursorRadial.Value; + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), Microsoft.Xna.Framework.Color.White * 0.5f * buildingGridAlpha, 0.0f, texture2D.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + } + else + Main.MouseBuildingGridAlpha = MathHelper.Clamp(Main.MouseBuildingGridAlpha - 0.05f, 0.0f, 1f); + } + + private static void DrawInterface_5_GamepadLockOn() => LockOnHelper.Draw(Main.spriteBatch); + + private static void DrawInterface_4_Ruler() + { + if (!Main.player[Main.myPlayer].rulerLine || Main.player[Main.myPlayer].builderAccStatus[0] != 0) + return; + float num1 = Main.player[Main.myPlayer].velocity.Length(); + float num2 = 6f; + float num3 = 2f; + if ((double) num1 > (double) num2) + return; + float num4 = 1f; + if ((double) num1 >= (double) num3) + num4 = (float) (1.0 - ((double) num1 - (double) num3) / (double) num2); + int num5 = 1; + if ((double) Main.mouseX + (double) Main.screenPosition.X < (double) Main.player[Main.myPlayer].Center.X) + num5 = -1; + int num6 = (int) ((double) Main.player[Main.myPlayer].position.X + (double) (Main.player[Main.myPlayer].width / 2)) / 16; + int num7 = (int) ((double) Main.player[Main.myPlayer].position.Y + (double) Main.player[Main.myPlayer].height - 2.0) / 16; + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + --num7; + Vector2 mouseWorld = Main.MouseWorld; + if (Math.Abs(num6 - (int) ((double) Main.MouseWorld.X / 16.0)) > 0) + num6 += num5; + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + mouseWorld.Y += 16f; + Vector2 vector2_1 = mouseWorld / 16f; + Vector2 vector2_2 = new Vector2((float) num6, (float) num7); + int num8 = (int) vector2_1.X - num6; + int num9 = (int) vector2_1.Y - num7; + Math.Abs(num8); + Math.Abs(num9); + Main.rulerLineDisplayValues.X = num8; + Main.rulerLineDisplayValues.Y = num9; + if (num8 == 0 && num9 == 0) + return; + Texture2D texture = TextureAssets.Extra[2].Value; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16); + int num10 = num6; + int num11 = num7; + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + --num11; + float r = 0.24f; + float g = 0.8f; + float b = 0.9f; + float a = 1f; + float num12 = 0.8f; + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color(r, g, b, a) * num12 * num4; + Main.spriteBatch.Draw(texture, Main.ReverseGravitySupport(new Vector2((float) num10, (float) num11) * 16f - Main.screenPosition, 16f), new Microsoft.Xna.Framework.Rectangle?(rectangle), color1, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + if (num8 != 0) + { + int num13 = Math.Sign(num8); + rectangle.Y = num13 == 1 ? 16 : 32; + while (num8 != 0) + { + num8 -= num13; + num10 += num13; + if (num8 == 0) + rectangle.Y = 0; + Microsoft.Xna.Framework.Color color2 = new Microsoft.Xna.Framework.Color(r, g, b, a) * num12 * num4; + Main.spriteBatch.Draw(texture, Main.ReverseGravitySupport(new Vector2((float) num10, (float) num11) * 16f - Main.screenPosition, 16f), new Microsoft.Xna.Framework.Rectangle?(rectangle), color2, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } + if (num9 == 0) + return; + int num14 = Math.Sign(num9); + rectangle.Y = num14 == 1 ? 48 : 64; + while (num9 != 0) + { + num9 -= num14; + num11 += num14; + if (num9 == 0) + rectangle.Y = 0; + Microsoft.Xna.Framework.Color color3 = new Microsoft.Xna.Framework.Color(r, g, b, a) * num12 * num4; + Main.spriteBatch.Draw(texture, Main.ReverseGravitySupport(new Vector2((float) num10, (float) num11) * 16f - Main.screenPosition, 16f), new Microsoft.Xna.Framework.Rectangle?(rectangle), color3, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } + + private static void DrawInterface_3_LaserRuler() + { + if (!Main.player[Main.myPlayer].rulerGrid || Main.player[Main.myPlayer].builderAccStatus[1] != 0) + return; + Main.player[Main.myPlayer].velocity.Length(); + float num1 = Vector2.Distance(Main.player[Main.myPlayer].position, Main.player[Main.myPlayer].shadowPos[2]); + float num2 = 6f; + Texture2D texture = TextureAssets.Extra[68].Value; + float num3 = MathHelper.Lerp(0.2f, 0.7f, MathHelper.Clamp((float) (1.0 - (double) num1 / (double) num2), 0.0f, 1f)); + Vector2 vector2_1 = (Main.screenPosition + new Vector2(-50f)).ToTileCoordinates().ToVector2() * 16f; + int num4 = (Main.screenWidth + 100) / 16; + int num5 = (Main.screenHeight + 100) / 16; + Microsoft.Xna.Framework.Point tileCoordinates = Main.MouseWorld.ToTileCoordinates(); + tileCoordinates.X -= (int) vector2_1.X / 16; + tileCoordinates.Y -= (int) vector2_1.Y / 16; + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color(0.24f, 0.8f, 0.9f, 0.5f) * 0.4f * num3; + Microsoft.Xna.Framework.Color color2 = new Microsoft.Xna.Framework.Color(1f, 0.8f, 0.9f, 0.5f) * 0.5f * num3; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 18, 18, 18); + Vector2 vector2_2 = vector2_1 - Vector2.One; + for (int index1 = 0; index1 < num4; ++index1) + { + for (int index2 = 0; index2 < num5; ++index2) + { + Microsoft.Xna.Framework.Color color3 = color1; + Vector2 zero = Vector2.Zero; + if (index1 != tileCoordinates.X && index2 != tileCoordinates.Y) + { + if (index1 != tileCoordinates.X + 1) + { + rectangle.X = 0; + rectangle.Width = 16; + } + else + { + rectangle.X = 2; + rectangle.Width = 14; + zero.X = 2f; + } + if (index2 != tileCoordinates.Y + 1) + { + rectangle.Y = 18; + rectangle.Height = 16; + } + else + { + rectangle.Y = 2; + rectangle.Height = 14; + zero.Y = 2f; + } + Main.spriteBatch.Draw(texture, Main.ReverseGravitySupport(new Vector2((float) index1, (float) index2) * 16f - Main.screenPosition + vector2_2 + zero, 16f), new Microsoft.Xna.Framework.Rectangle?(rectangle), color3, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } + } + rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 18); + for (int index = 0; index < num4; ++index) + { + if (index == tileCoordinates.X) + Main.spriteBatch.Draw(texture, Main.ReverseGravitySupport(new Vector2((float) index, (float) tileCoordinates.Y) * 16f - Main.screenPosition + vector2_2, 16f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16)), color2, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + else + Main.spriteBatch.Draw(texture, Main.ReverseGravitySupport(new Vector2((float) index, (float) tileCoordinates.Y) * 16f - Main.screenPosition + vector2_2, 16f), new Microsoft.Xna.Framework.Rectangle?(rectangle), color2, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 18, 16); + for (int index = 0; index < num5; ++index) + { + if (index != tileCoordinates.Y) + Main.spriteBatch.Draw(texture, Main.ReverseGravitySupport(new Vector2((float) tileCoordinates.X, (float) index) * 16f - Main.screenPosition + vector2_2, 16f), new Microsoft.Xna.Framework.Rectangle?(rectangle), color2, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + } + + private static void DrawInterface_2_SmartCursorTargets() => Main.DrawSmartCursor(); + + private static void DrawInterface_1_1_DrawEmoteBubblesInWorld() + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, (BlendState) null, SamplerState.PointClamp, (DepthStencilState) null, (RasterizerState) null, (Effect) null, Main.GameViewMatrix.ZoomMatrix); + EmoteBubble.DrawAll(Main.spriteBatch); + if (Main.instance.currentNPCShowingChatBubble != -1) + Main.DrawNPCChatBubble(Main.instance.currentNPCShowingChatBubble); + Main.instance.currentNPCShowingChatBubble = -1; + } + + private static void DrawInterface_1_2_DrawEntityMarkersInWorld() + { + Player localPlayer = Main.LocalPlayer; + if ((localPlayer.dead ? 0 : (localPlayer.HeldItem.summon ? 1 : 0)) == 0) + return; + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, (BlendState) null, SamplerState.PointClamp, (DepthStencilState) null, (RasterizerState) null, (Effect) null, Main.GameViewMatrix.ZoomMatrix); + Texture2D texture2D = TextureAssets.Extra[199].Value; + Vector2 zero = Vector2.Zero; + int minionAttackTargetNpc = localPlayer.MinionAttackTargetNPC; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) Main.screenPosition.X, (int) Main.screenPosition.Y, Main.screenWidth, Main.screenHeight); + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && npc.Hitbox.Intersects(rectangle)) + { + Vector2 vector2 = npc.Center - Main.screenPosition; + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + vector2.Y = (float) Main.screenHeight - vector2.Y; + Vector2 position = vector2 + zero; + if (index == minionAttackTargetNpc) + { + int frameY = (int) ((double) Main.GlobalTimeWrappedHourly * 10.0) % 4; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: 4, frameY: frameY, sizeOffsetY: -2); + Vector2 origin = r.Size() / 2f; + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.White * 0.7f; + color.A /= (byte) 2; + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), color, 0.0f, origin, 1f, SpriteEffects.None, 0.0f); + } + } + } + } + + private static void MouseOversTryToClear() + { + if (!Main._MouseOversCanClear) + return; + Main._MouseOversCanClear = false; + Main.MouseOversClear(); + } + + private static void MouseOversClear() + { + Main.player[Main.myPlayer].cursorItemIconEnabled = false; + Main.player[Main.myPlayer].cursorItemIconID = 0; + Main.player[Main.myPlayer].cursorItemIconText = string.Empty; + Main.signHover = -1; + } + + public static void ItemIconCacheUpdate(int selectedItemID) + { + Main._itemIconCacheScreenPosition = Main.MouseScreen; + Main._itemIconCacheSelectedItemID = selectedItemID; + Main._itemIconCacheTime = 10; + } + + public static void ItemIconCacheVerification() + { + if (Main._itemIconCacheTime <= 0) + return; + double num = (double) Vector2.Distance(Main._itemIconCacheScreenPosition, Main.MouseScreen); + if (num != 0.0) + --Main._itemIconCacheTime; + if (num > 4.0) + Main._itemIconCacheTime = 0; + if (Main._itemIconCacheSelectedItemID == Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type) + return; + Main._itemIconCacheTime = 0; + } + + public static void DrawWallOfFish() + { + List intList = new List(); + for (int index = 2297; index <= 2321; ++index) + intList.Add(index); + for (int index = 2450; index <= 2488; ++index) + intList.Add(index); + for (int index1 = 0; index1 < 5; ++index1) + { + float num = 10f; + Vector2 position = new Vector2((float) ((double) Main.screenWidth / (double) num * ((double) Main.GlobalTimeWrappedHourly % (double) num)), -100f); + position.X += (float) (14 * index1); + position.Y += (float) (index1 % 2 * 14); + int index2 = 30 * index1; + while ((double) position.Y < (double) (Main.screenHeight + 100)) + { + if (++index2 >= intList.Count) + index2 = 0; + position.Y += 26f; + Main.instance.LoadItem(intList[index2]); + Texture2D texture2D = TextureAssets.Item[intList[index2]].Value; + Microsoft.Xna.Framework.Point tileCoordinates = (position + Main.screenPosition).ToTileCoordinates(); + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), Lighting.GetColor(tileCoordinates.X, tileCoordinates.Y), 0.7853982f, texture2D.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + } + } + } + + public static void DrawWallOfStars() + { + bool flag = true; + if (flag) + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + int i = Projectile.NewProjectile(Vector2.Zero, Vector2.UnitX, 12, 0, 0.0f, Main.myPlayer); + Projectile projectile = Main.projectile[i]; + for (int index = 0; index < 5; ++index) + { + float num = 10f; + Vector2 vector2 = new Vector2((float) ((double) Main.screenWidth / (double) num * ((double) Main.GlobalTimeWrappedHourly % (double) num)), -100f); + vector2.X += (float) (14 * index); + vector2.Y += (float) (index % 2 * 14); + while ((double) vector2.Y < (double) (Main.screenHeight + 100)) + { + vector2.Y += 26f; + projectile.position = Vector2.One * 10f; + projectile.velocity = Vector2.UnitX * 10f; + projectile.rotation = Main.GlobalTimeWrappedHourly * 6.283185f; + projectile.Update(i); + projectile.position = vector2 + Main.screenPosition; + Main.instance.DrawProj(i); + } + } + projectile.position = Vector2.One * 10f; + projectile.Kill(); + if (!flag) + return; + Main.spriteBatch.End(); + } + + private static void DrawSmartCursor() + { + if (!Main.SmartCursorShowing || Main.player[Main.myPlayer].dead) + return; + Vector2 vector2_1 = new Vector2((float) Main.SmartCursorX, (float) Main.SmartCursorY) * 16f; + Vector2 vector2_2 = new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange); + int num1 = Main.drawToScreen ? 1 : 0; + Vector2 position = vector2_1 - Main.screenPosition; + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + position.Y = (float) ((double) Main.screenHeight - (double) position.Y - 16.0); + Microsoft.Xna.Framework.Color newColor = Lighting.GetColor(Main.SmartCursorX, Main.SmartCursorY) * 1f; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 1, 1); + float R = 1f; + float G1 = 0.9f; + float B1 = 0.1f; + float A1 = 1f; + float num2 = 0.6f; + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position, new Microsoft.Xna.Framework.Rectangle?(rectangle), Main.buffColor(newColor, R, G1, B1, A1) * num2, 0.0f, Vector2.Zero, 8f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position + Vector2.UnitX * 8f, new Microsoft.Xna.Framework.Rectangle?(rectangle), Main.buffColor(newColor, R, G1, B1, A1) * num2, 0.0f, Vector2.Zero, 8f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position + Vector2.UnitY * 8f, new Microsoft.Xna.Framework.Rectangle?(rectangle), Main.buffColor(newColor, R, G1, B1, A1) * num2, 0.0f, Vector2.Zero, 8f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position + Vector2.One * 8f, new Microsoft.Xna.Framework.Rectangle?(rectangle), Main.buffColor(newColor, R, G1, B1, A1) * num2, 0.0f, Vector2.Zero, 8f, SpriteEffects.None, 0.0f); + float B2 = 0.3f; + float G2 = 0.95f; + float num3; + float A2 = num3 = 1f; + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position + Vector2.UnitX * -2f, new Microsoft.Xna.Framework.Rectangle?(rectangle), Main.buffColor(newColor, R, G2, B2, A2) * num3, 0.0f, Vector2.Zero, new Vector2(2f, 16f), SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position + Vector2.UnitX * 16f, new Microsoft.Xna.Framework.Rectangle?(rectangle), Main.buffColor(newColor, R, G2, B2, A2) * num3, 0.0f, Vector2.Zero, new Vector2(2f, 16f), SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position + Vector2.UnitY * -2f, new Microsoft.Xna.Framework.Rectangle?(rectangle), Main.buffColor(newColor, R, G2, B2, A2) * num3, 0.0f, Vector2.Zero, new Vector2(16f, 2f), SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position + Vector2.UnitY * 16f, new Microsoft.Xna.Framework.Rectangle?(rectangle), Main.buffColor(newColor, R, G2, B2, A2) * num3, 0.0f, Vector2.Zero, new Vector2(16f, 2f), SpriteEffects.None, 0.0f); + } + + private static void DrawSmartInteract() + { + if (!Main.SmartInteractShowingGenuine || Main.SmartInteractNPC != -1 || Main.SmartInteractProj != -1 || Main.player[Main.myPlayer].dead) + return; + Vector2 vector2_1 = new Vector2((float) Main.SmartInteractX, (float) Main.SmartInteractY) * 16f; + Vector2 vector2_2 = new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange); + int num1 = Main.drawToScreen ? 1 : 0; + Vector2 position = vector2_1 - Main.screenPosition; + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + position.Y = (float) ((double) Main.screenHeight - (double) position.Y - 16.0); + Microsoft.Xna.Framework.Color newColor = Lighting.GetColor(Main.SmartInteractX, Main.SmartInteractY) * 1f; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 1, 1); + float R1 = 0.1f; + float G1 = 0.9f; + float B = 1f; + float A1 = 1f; + float num2 = 0.6f; + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position, new Microsoft.Xna.Framework.Rectangle?(rectangle), Main.buffColor(newColor, R1, G1, B, A1) * num2, 0.0f, Vector2.Zero, 8f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position + Vector2.UnitX * 8f, new Microsoft.Xna.Framework.Rectangle?(rectangle), Main.buffColor(newColor, R1, G1, B, A1) * num2, 0.0f, Vector2.Zero, 8f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position + Vector2.UnitY * 8f, new Microsoft.Xna.Framework.Rectangle?(rectangle), Main.buffColor(newColor, R1, G1, B, A1) * num2, 0.0f, Vector2.Zero, 8f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position + Vector2.One * 8f, new Microsoft.Xna.Framework.Rectangle?(rectangle), Main.buffColor(newColor, R1, G1, B, A1) * num2, 0.0f, Vector2.Zero, 8f, SpriteEffects.None, 0.0f); + float R2 = 0.3f; + float G2 = 0.95f; + float num3; + float A2 = num3 = 1f; + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position + Vector2.UnitX * -2f, new Microsoft.Xna.Framework.Rectangle?(rectangle), Main.buffColor(newColor, R2, G2, B, A2) * num3, 0.0f, Vector2.Zero, new Vector2(2f, 16f), SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position + Vector2.UnitX * 16f, new Microsoft.Xna.Framework.Rectangle?(rectangle), Main.buffColor(newColor, R2, G2, B, A2) * num3, 0.0f, Vector2.Zero, new Vector2(2f, 16f), SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position + Vector2.UnitY * -2f, new Microsoft.Xna.Framework.Rectangle?(rectangle), Main.buffColor(newColor, R2, G2, B, A2) * num3, 0.0f, Vector2.Zero, new Vector2(16f, 2f), SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position + Vector2.UnitY * 16f, new Microsoft.Xna.Framework.Rectangle?(rectangle), Main.buffColor(newColor, R2, G2, B, A2) * num3, 0.0f, Vector2.Zero, new Vector2(16f, 2f), SpriteEffects.None, 0.0f); + } + + private void DrawInterface_30_Hotbar() + { + try + { + this.GUIHotbarDrawInner(); + } + catch (Exception ex) + { + if (Main.ignoreErrors) + TimeLogger.DrawException(ex); + else + throw; + } + } + + public void GUIChatDraw() + { + if (Main.ignoreErrors) + { + try + { + if (!(Main.npcChatText != "") && Main.player[Main.myPlayer].sign == -1 || Main.editChest) + return; + this.GUIChatDrawInner(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + { + if (!(Main.npcChatText != "") && Main.player[Main.myPlayer].sign == -1 || Main.editChest) + return; + this.GUIChatDrawInner(); + } + } + + public static bool ShouldDrawInfoIconsHorizontally => !Main._cannotDrawAccessoriesHorizontally && (Main.mapStyle != 1 || !Main.mapEnabled || Main.screenHeight >= 820) && (Main.mapStyle == 1 || Main.screenWidth >= 855) && !PlayerInput.UsingGamepad; + + public static bool CanShowInfoAccs => (Main.npcChatText == null || Main.npcChatText == "" || Main.player[Main.myPlayer].chest > -1) && Main.player[Main.myPlayer].sign < 0; + + public static void DrawItemIcon( + SpriteBatch spriteBatch, + Item theItem, + Vector2 screenPositionForItemCenter, + Microsoft.Xna.Framework.Color itemLightColor, + float sizeLimit) + { + Main.instance.LoadItem(theItem.type); + Texture2D texture2D = TextureAssets.Item[theItem.type].Value; + Microsoft.Xna.Framework.Rectangle rectangle = Main.itemAnimations[theItem.type] == null ? texture2D.Frame() : Main.itemAnimations[theItem.type].GetFrame(texture2D); + int width = rectangle.Width; + int height = rectangle.Height; + float num1 = 1f; + if ((double) width > (double) sizeLimit || (double) height > (double) sizeLimit) + num1 = width <= height ? sizeLimit / (float) height : sizeLimit / (float) width; + float num2 = num1 * theItem.scale; + SpriteEffects effects = SpriteEffects.None; + Microsoft.Xna.Framework.Color currentColor = itemLightColor; + float scale1 = 1f; + ItemSlot.GetItemLight(ref currentColor, ref scale1, theItem); + float scale2 = num2 * scale1; + spriteBatch.Draw(texture2D, screenPositionForItemCenter, new Microsoft.Xna.Framework.Rectangle?(rectangle), currentColor, 0.0f, new Vector2((float) (width / 2), (float) (height / 2)), scale2, effects, 0.0f); + if (!(theItem.color != new Microsoft.Xna.Framework.Color())) + return; + spriteBatch.Draw(texture2D, screenPositionForItemCenter, new Microsoft.Xna.Framework.Rectangle?(rectangle), theItem.GetColor(itemLightColor), 0.0f, new Vector2((float) (width / 2), (float) (height / 2)), scale2, effects, 0.0f); + } + + private void DrawInfoAccs() + { + if (!Main.CanShowInfoAccs) + return; + bool flag1 = false; + bool flag2 = false; + bool flag3 = false; + bool flag4 = false; + bool flag5 = false; + bool flag6 = false; + bool flag7 = false; + bool flag8 = false; + bool flag9 = false; + bool flag10 = false; + bool flag11 = false; + bool flag12 = false; + int index1 = -1; + int num1 = -10; + int drawnCount = 0; + string cursorText = ""; + float num2 = 215f; + int StartX = 0; + if (GameCulture.FromCultureName(GameCulture.CultureName.Russian).IsActive) + { + StartX = -50; + num2 += 50f; + } + for (int index2 = 0; index2 < 12; ++index2) + { + string str1 = ""; + string str2 = ""; + if (Main.player[Main.myPlayer].accWatch > 0 && !flag1 && (!Main.player[Main.myPlayer].hideInfo[0] || Main.playerInventory)) + { + index1 = 0; + str2 = Lang.inter[95].Value; + string textValue = Language.GetTextValue("GameUI.TimeAtMorning"); + double time = Main.time; + if (!Main.dayTime) + time += 54000.0; + double num3 = time / 86400.0 * 24.0 - 7.5 - 12.0; + if (num3 < 0.0) + num3 += 24.0; + if (num3 >= 12.0) + textValue = Language.GetTextValue("GameUI.TimePastMorning"); + int num4 = (int) num3; + double num5 = (double) (int) ((num3 - (double) num4) * 60.0); + string str3 = string.Concat((object) num5); + if (num5 < 10.0) + str3 = "0" + str3; + if (num4 > 12) + num4 -= 12; + if (num4 == 0) + num4 = 12; + if (Main.player[Main.myPlayer].accWatch == 1) + str3 = "00"; + else if (Main.player[Main.myPlayer].accWatch == 2) + str3 = num5 >= 30.0 ? "30" : "00"; + str1 = num4.ToString() + ":" + str3 + " " + textValue; + flag1 = true; + } + else if (Main.player[Main.myPlayer].accWeatherRadio && !flag5 && (!Main.player[Main.myPlayer].hideInfo[1] || Main.playerInventory)) + { + index1 = 1; + str2 = Lang.inter[96].Value; + str1 = !Main.IsItStorming ? ((double) Main.maxRaining <= 0.6 ? ((double) Main.maxRaining < 0.2 ? ((double) Main.maxRaining <= 0.0 ? ((double) Main.cloudBGActive <= 0.0 ? (Main.numClouds <= 90 ? (Main.numClouds <= 55 ? (Main.numClouds <= 15 ? Language.GetTextValue("GameUI.Clear") : Language.GetTextValue("GameUI.PartlyCloudy")) : Language.GetTextValue("GameUI.Cloudy")) : Language.GetTextValue("GameUI.MostlyCloudy")) : Language.GetTextValue("GameUI.Overcast")) : Language.GetTextValue("GameUI.LightRain")) : Language.GetTextValue("GameUI.Rain")) : Language.GetTextValue("GameUI.HeavyRain")) : Language.GetTextValue("GameUI.Storm"); + int num6 = (int) ((double) Main.windSpeedCurrent * 50.0); + if (num6 < 0) + str1 += Language.GetTextValue("GameUI.EastWind", (object) Math.Abs(num6)); + else if (num6 > 0) + str1 += Language.GetTextValue("GameUI.WestWind", (object) num6); + flag5 = true; + } + else if (Main.player[Main.myPlayer].accCalendar && !flag8 && (!Main.player[Main.myPlayer].hideInfo[7] || Main.playerInventory)) + { + index1 = !Main.bloodMoon || Main.dayTime ? (!Main.eclipse || !Main.dayTime ? 7 : 8) : 8; + str2 = Lang.inter[102].Value; + switch (Main.moonPhase) + { + case 0: + str1 = Language.GetTextValue("GameUI.FullMoon"); + break; + case 1: + str1 = Language.GetTextValue("GameUI.WaningGibbous"); + break; + case 2: + str1 = Language.GetTextValue("GameUI.ThirdQuarter"); + break; + case 3: + str1 = Language.GetTextValue("GameUI.WaningCrescent"); + break; + case 4: + str1 = Language.GetTextValue("GameUI.NewMoon"); + break; + case 5: + str1 = Language.GetTextValue("GameUI.WaxingCrescent"); + break; + case 6: + str1 = Language.GetTextValue("GameUI.FirstQuarter"); + break; + case 7: + str1 = Language.GetTextValue("GameUI.WaxingGibbous"); + break; + } + flag8 = true; + } + else if (Main.player[Main.myPlayer].accFishFinder && !flag4 && (!Main.player[Main.myPlayer].hideInfo[2] || Main.playerInventory)) + { + bool flag13 = false; + index1 = 2; + str2 = Lang.inter[97].Value; + for (int index3 = 0; index3 < 1000; ++index3) + { + if (Main.projectile[index3].active && Main.projectile[index3].owner == Main.myPlayer && Main.projectile[index3].bobber) + { + flag13 = true; + break; + } + } + if (flag13) + { + str1 = Main.player[Main.myPlayer].displayedFishingInfo; + } + else + { + PlayerFishingConditions fishingConditions = Main.player[Main.myPlayer].GetFishingConditions(); + str1 = fishingConditions.BaitItemType != 2673 ? (Main.player[Main.myPlayer].displayedFishingInfo = Language.GetTextValue("GameUI.FishingPower", (object) fishingConditions.FinalFishingLevel)) : Language.GetTextValue("GameUI.FishingWarning"); + } + flag4 = true; + } + else if (Main.player[Main.myPlayer].accOreFinder && !flag10 && (!Main.player[Main.myPlayer].hideInfo[10] || Main.playerInventory)) + { + index1 = 10; + str2 = Lang.inter[104].Value; + if (Main.SceneMetrics.bestOre <= 0) + { + str1 = Language.GetTextValue("GameUI.NoTreasureNearby"); + } + else + { + int baseOption = 0; + int tileType = Main.SceneMetrics.bestOre; + Microsoft.Xna.Framework.Point? closestOrePosition = Main.SceneMetrics.ClosestOrePosition; + if (closestOrePosition.HasValue) + { + closestOrePosition = Main.SceneMetrics.ClosestOrePosition; + Microsoft.Xna.Framework.Point pt = closestOrePosition.Value; + Tile tileSafely = Framing.GetTileSafely(pt); + if (tileSafely.active()) + { + MapHelper.GetTileBaseOption(pt.Y, tileSafely, ref baseOption); + tileType = (int) tileSafely.type; + if (TileID.Sets.BasicChest[tileType] || TileID.Sets.BasicChestFake[tileType]) + baseOption = 0; + } + } + str1 = Language.GetTextValue("GameUI.OreDetected", (object) Lang.GetMapObjectName(MapHelper.TileToLookup(tileType, baseOption))); + } + flag10 = true; + } + else if (Main.player[Main.myPlayer].accCritterGuide && !flag11 && (!Main.player[Main.myPlayer].hideInfo[11] || Main.playerInventory)) + { + flag11 = true; + index1 = 11; + str2 = Lang.inter[105].Value; + int num7 = 1300; + int num8 = 0; + int index4 = -1; + if (Main.player[Main.myPlayer].accCritterGuideCounter <= (byte) 0) + { + Main.player[Main.myPlayer].accCritterGuideCounter = (byte) 15; + for (int index5 = 0; index5 < 200; ++index5) + { + if (Main.npc[index5].active && Main.npc[index5].rarity > num8 && (double) (Main.npc[index5].Center - Main.player[Main.myPlayer].Center).Length() < (double) num7) + { + index4 = index5; + num8 = Main.npc[index5].rarity; + } + } + Main.player[Main.myPlayer].accCritterGuideNumber = (byte) index4; + } + else + { + --Main.player[Main.myPlayer].accCritterGuideCounter; + index4 = (int) Main.player[Main.myPlayer].accCritterGuideNumber; + } + str1 = index4 < 0 || index4 >= 200 || !Main.npc[index4].active || Main.npc[index4].rarity <= 0 ? Language.GetTextValue("GameUI.NoRareCreatures") : Main.npc[index4].GivenOrTypeName; + } + else if (Main.player[Main.myPlayer].accThirdEye && !flag6 && (!Main.player[Main.myPlayer].hideInfo[5] || Main.playerInventory)) + { + flag6 = true; + index1 = 5; + str2 = Lang.inter[100].Value; + int num9 = 2000; + if (Main.player[Main.myPlayer].accThirdEyeCounter == (byte) 0) + { + Main.player[Main.myPlayer].accThirdEyeNumber = (byte) 0; + Main.player[Main.myPlayer].accThirdEyeCounter = (byte) 15; + for (int index6 = 0; index6 < 200; ++index6) + { + if (Main.npc[index6].active && !Main.npc[index6].friendly && Main.npc[index6].damage > 0 && Main.npc[index6].lifeMax > 5 && !Main.npc[index6].dontCountMe && (double) (Main.npc[index6].Center - Main.player[Main.myPlayer].Center).Length() < (double) num9) + ++Main.player[Main.myPlayer].accThirdEyeNumber; + } + } + else + --Main.player[Main.myPlayer].accThirdEyeCounter; + str1 = Main.player[Main.myPlayer].accThirdEyeNumber != (byte) 0 ? (Main.player[Main.myPlayer].accThirdEyeNumber != (byte) 1 ? Language.GetTextValue("GameUI.EnemiesNearby", (object) Main.player[Main.myPlayer].accThirdEyeNumber) : Language.GetTextValue("GameUI.OneEnemyNearby")) : Language.GetTextValue("GameUI.NoEnemiesNearby"); + } + else if (Main.player[Main.myPlayer].accJarOfSouls && !flag7 && (!Main.player[Main.myPlayer].hideInfo[6] || Main.playerInventory)) + { + flag7 = true; + index1 = 6; + str2 = Lang.inter[101].Value; + int lastCreatureHit = Main.player[Main.myPlayer].lastCreatureHit; + str1 = lastCreatureHit > 0 ? Lang.GetNPCNameValue(Item.BannerToNPC(lastCreatureHit)) + ": " + (object) NPC.killCount[lastCreatureHit] : Language.GetTextValue("GameUI.NoKillCount"); + } + else if (Main.player[Main.myPlayer].accDreamCatcher && !flag12 && (!Main.player[Main.myPlayer].hideInfo[12] || Main.playerInventory)) + { + index1 = 12; + str2 = Lang.inter[106].Value; + Main.player[Main.myPlayer].checkDPSTime(); + int dps = Main.player[Main.myPlayer].getDPS(); + flag12 = true; + str1 = dps != 0 ? Language.GetTextValue("GameUI.DPS", (object) Main.player[Main.myPlayer].getDPS()) : Language.GetTextValue("GameUI.NoDPS"); + } + else if (Main.player[Main.myPlayer].accStopwatch && !flag9 && (!Main.player[Main.myPlayer].hideInfo[9] || Main.playerInventory)) + { + index1 = 9; + str2 = Lang.inter[103].Value; + Vector2 vector2 = Main.player[Main.myPlayer].velocity + Main.player[Main.myPlayer].instantMovementAccumulatedThisFrame; + if (Main.player[Main.myPlayer].mount.Active && Main.player[Main.myPlayer].mount.IsConsideredASlimeMount && (double) Main.player[Main.myPlayer].velocity.Y != 0.0 && !Main.player[Main.myPlayer].SlimeDontHyperJump) + vector2.Y += Main.player[Main.myPlayer].velocity.Y; + int num10 = (int) (1.0 + (double) vector2.Length() * 6.0); + if (num10 > Main.player[Main.myPlayer].speedSlice.Length) + num10 = Main.player[Main.myPlayer].speedSlice.Length; + float num11 = 0.0f; + for (int index7 = num10 - 1; index7 > 0; --index7) + Main.player[Main.myPlayer].speedSlice[index7] = Main.player[Main.myPlayer].speedSlice[index7 - 1]; + Main.player[Main.myPlayer].speedSlice[0] = vector2.Length(); + for (int index8 = 0; index8 < Main.player[Main.myPlayer].speedSlice.Length; ++index8) + { + if (index8 < num10) + num11 += Main.player[Main.myPlayer].speedSlice[index8]; + else + Main.player[Main.myPlayer].speedSlice[index8] = num11 / (float) num10; + } + float num12 = num11 / (float) num10; + int num13 = 42240; + int num14 = 216000; + float num15 = num12 * (float) num14 / (float) num13; + if (!Main.player[Main.myPlayer].merman && !Main.player[Main.myPlayer].ignoreWater) + { + if (Main.player[Main.myPlayer].honeyWet) + num15 /= 4f; + else if (Main.player[Main.myPlayer].wet) + num15 /= 2f; + } + str1 = Language.GetTextValue("GameUI.Speed", (object) Math.Round((double) num15)); + flag9 = true; + } + else if (Main.player[Main.myPlayer].accCompass > 0 && !flag3 && (!Main.player[Main.myPlayer].hideInfo[3] || Main.playerInventory)) + { + index1 = 3; + str2 = Lang.inter[98].Value; + int num16 = (int) (((double) Main.player[Main.myPlayer].position.X + (double) (Main.player[Main.myPlayer].width / 2)) * 2.0 / 16.0 - (double) Main.maxTilesX); + str1 = num16 <= 0 ? (num16 >= 0 ? Language.GetTextValue("GameUI.CompassCenter") : Language.GetTextValue("GameUI.CompassWest", (object) -num16)) : Language.GetTextValue("GameUI.CompassEast", (object) num16); + flag3 = true; + } + else if (Main.player[Main.myPlayer].accDepthMeter > 0 && !flag2 && (!Main.player[Main.myPlayer].hideInfo[4] || Main.playerInventory)) + { + index1 = 4; + str2 = Lang.inter[99].Value; + int num17 = (int) (((double) Main.player[Main.myPlayer].position.Y + (double) Main.player[Main.myPlayer].height) * 2.0 / 16.0 - Main.worldSurface * 2.0); + float num18 = (float) (Main.maxTilesX / 4200); + float num19 = num18 * num18; + int num20 = 1200; + float num21 = (float) (((double) Main.player[Main.myPlayer].Center.Y / 16.0 - (65.0 + 10.0 * (double) num19)) / (Main.worldSurface / 5.0)); + string str4 = (double) Main.player[Main.myPlayer].position.Y <= (double) ((Main.maxTilesY - 204) * 16) ? ((double) Main.player[Main.myPlayer].position.Y <= Main.rockLayer * 16.0 + (double) (num20 / 2) + 16.0 ? (num17 <= 0 ? ((double) num21 < 1.0 ? Language.GetTextValue("GameUI.LayerSpace") : Language.GetTextValue("GameUI.LayerSurface")) : Language.GetTextValue("GameUI.LayerUnderground")) : Language.GetTextValue("GameUI.LayerCaverns")) : Language.GetTextValue("GameUI.LayerUnderworld"); + int num22 = Math.Abs(num17); + str1 = (num22 != 0 ? Language.GetTextValue("GameUI.Depth", (object) num22) : Language.GetTextValue("GameUI.DepthLevel")) + " " + str4; + flag2 = true; + } + if (str1 != "") + { + int X; + int Y; + Main.GetInfoAccIconPosition(drawnCount, StartX, out X, out Y); + if (index1 >= 0) + { + ++drawnCount; + int num23 = 22; + if (Main.screenHeight < 650) + num23 = 20; + Vector2 position = new Vector2((float) X, (float) (Y + 74 + num23 * index2 + 52)); + int index9 = index1; + if (index9 == 8) + index9 = 7; + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.White; + bool flag14 = false; + if (Main.playerInventory) + { + position = new Vector2((float) X, (float) Y); + if ((double) Main.mouseX >= (double) position.X && (double) Main.mouseY >= (double) position.Y && (double) Main.mouseX <= (double) position.X + (double) TextureAssets.InfoIcon[index1].Width() && (double) Main.mouseY <= (double) position.Y + (double) TextureAssets.InfoIcon[index1].Height() && !PlayerInput.IgnoreMouseInterface) + { + flag14 = true; + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + SoundEngine.PlaySound(12); + Main.mouseLeftRelease = false; + Main.player[Main.myPlayer].hideInfo[index9] = !Main.player[Main.myPlayer].hideInfo[index9]; + } + if (!Main.mouseText) + { + cursorText = str2; + Main.mouseText = true; + } + } + if (Main.player[Main.myPlayer].hideInfo[index9]) + color = new Microsoft.Xna.Framework.Color(80, 80, 80, 70); + } + else if ((double) Main.mouseX >= (double) position.X && (double) Main.mouseY >= (double) position.Y && (double) Main.mouseX <= (double) position.X + (double) TextureAssets.InfoIcon[index1].Width() && (double) Main.mouseY <= (double) position.Y + (double) TextureAssets.InfoIcon[index1].Height() && !Main.mouseText) + { + num1 = index2; + cursorText = str2; + Main.mouseText = true; + } + UILinkPointNavigator.SetPosition(1558 + drawnCount - 1, position + TextureAssets.InfoIcon[index1].Value.Size() * 0.75f); + Main.spriteBatch.Draw(TextureAssets.InfoIcon[index1].Value, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.InfoIcon[index1].Width(), TextureAssets.InfoIcon[index1].Height())), color, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + if (flag14) + Main.spriteBatch.Draw(TextureAssets.InfoIcon[13].Value, position - Vector2.One * 2f, new Microsoft.Xna.Framework.Rectangle?(), Main.OurFavoriteColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + X += 20; + } + UILinkPointNavigator.Shortcuts.INFOACCCOUNT = drawnCount; + if (!Main.playerInventory) + { + Vector2 vector2_1 = new Vector2(1f); + Vector2 vector2_2 = FontAssets.MouseText.Value.MeasureString(str1); + if ((double) vector2_2.X > (double) num2) + vector2_1.X = num2 / vector2_2.X; + if ((double) vector2_1.X < 0.579999983310699) + vector2_1.Y = (float) (1.0 - (double) vector2_1.X / 3.0); + for (int index10 = 0; index10 < 5; ++index10) + { + int num24 = 0; + int num25 = 0; + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.Black; + if (index10 == 0) + num24 = -2; + if (index10 == 1) + num24 = 2; + if (index10 == 2) + num25 = -2; + if (index10 == 3) + num25 = 2; + if (index10 == 4) + color = new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor); + if (index2 > num1 && index2 < num1 + 2) + color = new Microsoft.Xna.Framework.Color((int) color.R / 3, (int) color.G / 3, (int) color.B / 3, (int) color.A / 3); + int num26 = 22; + if (Main.screenHeight < 650) + num26 = 20; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, str1, new Vector2((float) (X + num24), (float) (Y + 74 + num26 * index2 + num25 + 48)), color, 0.0f, new Vector2(), vector2_1, SpriteEffects.None, 0.0f); + } + } + } + } + if (string.IsNullOrEmpty(cursorText)) + return; + if (Main.playerInventory) + Main.player[Main.myPlayer].mouseInterface = true; + this.MouseText(cursorText); + } + + private static void GetInfoAccIconPosition(int drawnCount, int StartX, out int X, out int Y) + { + if (!Main.playerInventory) + { + X = Main.screenWidth - 280; + Y = -32; + if (Main.mapStyle == 1 && Main.mapEnabled) + Y += 261; + } + else if (Main.ShouldDrawInfoIconsHorizontally) + { + X = Main.screenWidth - 280 + 20 * drawnCount - 10; + Y = 94; + if (Main.mapStyle == 1 && Main.mapEnabled) + Y += 261; + } + else + { + int num = (int) (52.0 * (double) Main.inventoryScale); + X = 697 - num * 4 + Main.screenWidth - 800 + 20 * (drawnCount % 2); + Y = 114 + Main.mH + num * 7 + num / 2 + 20 * (drawnCount / 2) + 8 * (drawnCount / 4) - 20; + if (Main.EquipPage == 2) + { + X += num + num / 2; + Y -= num; + } + } + X += StartX; + } + + private void DrawBuilderAccToggles(Vector2 start) + { + if (!Main.playerInventory) + return; + string.IsNullOrEmpty(Main.npcChatText); + if (Main.player[Main.myPlayer].sign >= 0) + return; + int num1 = 0; + Player plr = Main.player[Main.myPlayer]; + int[] builderAccStatus = Main.player[Main.myPlayer].builderAccStatus; + int blockReplaceIcons; + int torchGodIcons; + int totalDrawnIcons; + Main.GetBuilderAccsCountToShow(plr, out blockReplaceIcons, out torchGodIcons, out totalDrawnIcons); + start.Y += (float) (24 * torchGodIcons); + bool pushSideToolsUp = totalDrawnIcons >= 10; + int num2 = 10; + for (int index1 = 0; index1 < num2; ++index1) + { + int index2 = index1 - 2; + switch (index1) + { + case 0: + index2 = 8; + break; + case 1: + index2 = 9; + break; + } + Texture2D texture = TextureAssets.BuilderAcc.Value; + Microsoft.Xna.Framework.Rectangle r = new Microsoft.Xna.Framework.Rectangle(0, 16, 14, 14); + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.White; + Microsoft.Xna.Framework.Color firstColor = new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue, (int) sbyte.MaxValue, (int) sbyte.MaxValue); + Vector2 vector2 = start + new Vector2(0.0f, (float) (num1 * 24)); + if (pushSideToolsUp) + vector2.Y -= 24f; + bool flag1 = Utils.CenteredRectangle(vector2, new Vector2(14f)).Contains(Main.MouseScreen.ToPoint()) && !PlayerInput.IgnoreMouseInterface; + bool flag2 = flag1 && Main.mouseLeft && Main.mouseLeftRelease; + switch (index2) + { + case 0: + if (plr.rulerLine) + { + r.X = index2 * 16; + color = builderAccStatus[index2] == 0 ? color : firstColor; + if (flag1) + { + plr.mouseInterface = true; + this.MouseText(builderAccStatus[index2] == 0 ? Language.GetTextValue("GameUI.RulerOn") : Language.GetTextValue("GameUI.RulerOff")); + Main.mouseText = true; + } + if (flag2) + { + builderAccStatus[index2] = builderAccStatus[index2] == 0 ? 1 : 0; + SoundEngine.PlaySound(12); + Main.mouseLeftRelease = false; + break; + } + break; + } + continue; + case 1: + if (plr.rulerGrid) + { + r.X = index2 * 16; + color = builderAccStatus[index2] == 0 ? color : firstColor; + if (flag1) + { + plr.mouseInterface = true; + this.MouseText(builderAccStatus[index2] == 0 ? Language.GetTextValue("GameUI.MechanicalRulerOn") : Language.GetTextValue("GameUI.MechanicalRulerOff")); + Main.mouseText = true; + } + if (flag2) + { + builderAccStatus[index2] = builderAccStatus[index2] == 0 ? 1 : 0; + SoundEngine.PlaySound(12); + Main.mouseLeftRelease = false; + break; + } + break; + } + continue; + case 2: + if (plr.autoActuator) + { + r.X = index2 * 16; + color = builderAccStatus[index2] == 0 ? color : firstColor; + if (flag1) + { + plr.mouseInterface = true; + this.MouseText(builderAccStatus[index2] == 0 ? Language.GetTextValue("GameUI.ActuationDeviceOn") : Language.GetTextValue("GameUI.ActuationDeviceOff")); + Main.mouseText = true; + } + if (flag2) + { + builderAccStatus[index2] = builderAccStatus[index2] == 0 ? 1 : 0; + SoundEngine.PlaySound(12); + Main.mouseLeftRelease = false; + break; + } + break; + } + continue; + case 3: + if (plr.autoPaint) + { + r.X = index2 * 16; + color = builderAccStatus[index2] == 0 ? color : firstColor; + if (flag1) + { + plr.mouseInterface = true; + this.MouseText(builderAccStatus[index2] == 0 ? Language.GetTextValue("GameUI.PaintSprayerOn") : Language.GetTextValue("GameUI.PaintSprayerOff")); + Main.mouseText = true; + } + if (flag2) + { + builderAccStatus[index2] = builderAccStatus[index2] == 0 ? 1 : 0; + SoundEngine.PlaySound(12); + Main.mouseLeftRelease = false; + break; + } + break; + } + continue; + case 4: + case 5: + case 6: + case 7: + case 9: + if (plr.InfoAccMechShowWires) + { + r.X = index2 * 16; + color = builderAccStatus[index2] == 0 ? color : (builderAccStatus[index2] == 1 ? firstColor : (builderAccStatus[index2] == 2 ? firstColor.MultiplyRGBA(new Microsoft.Xna.Framework.Color(0.66f, 0.66f, 0.66f, 0.66f)) : firstColor.MultiplyRGBA(new Microsoft.Xna.Framework.Color(0.33f, 0.33f, 0.33f, 0.33f)))); + if (flag1) + { + plr.mouseInterface = true; + string str1 = ""; + switch (index2) + { + case 4: + str1 = Language.GetTextValue("Game.RedWires"); + break; + case 5: + str1 = Language.GetTextValue("Game.BlueWires"); + break; + case 6: + str1 = Language.GetTextValue("Game.GreenWires"); + break; + case 7: + str1 = Language.GetTextValue("Game.YellowWires"); + break; + case 9: + str1 = Language.GetTextValue("Game.Actuators"); + break; + } + string str2 = ""; + switch (builderAccStatus[index2]) + { + case 0: + str2 = Language.GetTextValue("GameUI.Bright"); + break; + case 1: + str2 = Language.GetTextValue("GameUI.Normal"); + break; + case 2: + str2 = Language.GetTextValue("GameUI.Faded"); + break; + case 3: + str2 = Language.GetTextValue("GameUI.Hidden"); + break; + } + this.MouseText(string.Format("{0}: {1}", (object) str1, (object) str2)); + Main.mouseText = true; + } + if (flag2) + { + builderAccStatus[index2] = builderAccStatus[index2] + 1; + if (builderAccStatus[index2] >= 3) + builderAccStatus[index2] = 0; + SoundEngine.PlaySound(12); + Main.mouseLeftRelease = false; + break; + } + break; + } + continue; + case 8: + if (plr.InfoAccMechShowWires) + { + r.X = index2 * 16; + color = builderAccStatus[index2] == 0 ? color : firstColor; + if (flag1) + { + plr.mouseInterface = true; + this.MouseText(builderAccStatus[index2] == 0 ? Language.GetTextValue("GameUI.WireModeForced") : Language.GetTextValue("GameUI.WireModeNormal")); + Main.mouseText = true; + } + if (flag2) + { + builderAccStatus[index2] = builderAccStatus[index2] == 0 ? 1 : 0; + SoundEngine.PlaySound(12); + Main.mouseLeftRelease = false; + break; + } + break; + } + continue; + case 11: + continue; + } + Main.spriteBatch.Draw(texture, vector2, new Microsoft.Xna.Framework.Rectangle?(r), color, 0.0f, r.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + if (flag1) + Main.spriteBatch.Draw(TextureAssets.InfoIcon[13].Value, vector2, new Microsoft.Xna.Framework.Rectangle?(), Main.OurFavoriteColor, 0.0f, TextureAssets.InfoIcon[13].Value.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + UILinkPointNavigator.SetPosition(6000 + num1 + blockReplaceIcons + torchGodIcons, vector2 + r.Size() * 0.15f); + ++num1; + } + this.DrawBlockReplacementIcon(0, 0, pushSideToolsUp, 0); + int num3 = num1 + 1; + if (plr.unlockedBiomeTorches) + { + this.DrawTorchBiomeSwapIcon(0, 0, pushSideToolsUp, 0); + ++num3; + } + UILinkPointNavigator.Shortcuts.BUILDERACCCOUNT = num3; + } + + private static void GetBuilderAccsCountToShow( + Player plr, + out int blockReplaceIcons, + out int torchGodIcons, + out int totalDrawnIcons) + { + blockReplaceIcons = 1; + torchGodIcons = plr.unlockedBiomeTorches ? 1 : 0; + totalDrawnIcons = plr.InfoAccMechShowWires.ToInt() * 6 + plr.rulerLine.ToInt() + plr.rulerGrid.ToInt() + plr.autoActuator.ToInt() + plr.autoPaint.ToInt() + blockReplaceIcons + torchGodIcons; + } + + public static void CheckInvasionProgressDisplay() + { + if (Main.invasionProgressMode != 2) + { + Main.invasionProgressNearInvasion = false; + } + else + { + bool flag = false; + Player player = Main.player[Main.myPlayer]; + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle((int) Main.screenPosition.X, (int) Main.screenPosition.Y, Main.screenWidth, Main.screenHeight); + int num = 5000; + int icon = 0; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active) + { + icon = 0; + switch (Main.npc[index].type) + { + case 26: + case 27: + case 28: + case 29: + case 111: + icon = 4; + break; + case 143: + case 144: + case 145: + icon = 5; + break; + case 212: + case 213: + case 214: + case 215: + case 216: + case 491: + icon = 6; + break; + case 305: + case 306: + case 307: + case 308: + case 309: + case 310: + case 311: + case 312: + case 313: + case 314: + case 315: + case 325: + case 326: + case 327: + case 329: + case 330: + icon = 2; + break; + case 338: + case 339: + case 340: + case 341: + case 342: + case 343: + case 344: + case 345: + case 346: + case 347: + case 348: + case 349: + case 350: + icon = 1; + break; + case 381: + case 382: + case 383: + case 385: + case 386: + case 388: + case 389: + case 390: + case 391: + case 395: + icon = 7; + break; + case 548: + case 549: + case 551: + case 552: + case 553: + case 554: + case 555: + case 556: + case 557: + case 558: + case 559: + case 560: + case 561: + case 562: + case 563: + case 564: + case 565: + case 568: + case 569: + case 570: + case 571: + case 572: + case 573: + case 574: + case 575: + case 576: + case 577: + case 578: + icon = 3; + break; + } + if (icon != 0 && (icon != 1 || (double) player.position.Y <= Main.worldSurface * 16.0 && !Main.dayTime && Main.snowMoon) && (icon != 2 || (double) player.position.Y <= Main.worldSurface * 16.0 && !Main.dayTime && Main.pumpkinMoon) && (icon != 3 || DD2Event.Ongoing) && (icon <= 3 || (double) player.position.Y <= Main.worldSurface * 16.0 && Main.invasionType == icon - 3)) + { + Microsoft.Xna.Framework.Rectangle rectangle2 = new Microsoft.Xna.Framework.Rectangle((int) ((double) Main.npc[index].position.X + (double) (Main.npc[index].width / 2)) - num, (int) ((double) Main.npc[index].position.Y + (double) (Main.npc[index].height / 2)) - num, num * 2, num * 2); + if (rectangle1.Intersects(rectangle2)) + { + flag = true; + break; + } + } + } + } + Main.invasionProgressNearInvasion = flag; + if (!flag || Main.invasionProgressIcon != 0) + return; + int waveNumber = NPC.waveNumber; + if (Main.snowMoon) + { + int progressMax = new int[21] + { + 0, + 25, + 15, + 10, + 30, + 100, + 160, + 180, + 200, + 250, + 300, + 375, + 450, + 525, + 675, + 850, + 1025, + 1325, + 1550, + 2000, + 0 + }[waveNumber]; + Main.ReportInvasionProgress((int) NPC.waveKills, progressMax, 1, waveNumber); + } + else if (Main.pumpkinMoon) + { + int progressMax = new int[16] + { + 0, + 25, + 40, + 50, + 80, + 100, + 160, + 180, + 200, + 250, + 300, + 375, + 450, + 525, + 675, + 0 + }[waveNumber]; + Main.ReportInvasionProgress((int) NPC.waveKills, progressMax, 2, waveNumber); + } + else if (DD2Event.Ongoing) + { + DD2Event.ReportEventProgress(); + } + else + { + int progressMax = 1; + if (Main.invasionType != 0 && Main.invasionSizeStart != 0) + progressMax = Main.invasionSizeStart; + Main.ReportInvasionProgress(Main.invasionSizeStart - Main.invasionSize, progressMax, icon, 0); + } + } + } + + public static void SyncAnInvasion(int toWho) + { + int waveNumber = NPC.waveNumber; + if (Main.snowMoon) + { + int num = new int[21] + { + 0, + 25, + 15, + 10, + 30, + 100, + 160, + 180, + 200, + 250, + 300, + 375, + 450, + 525, + 675, + 850, + 1025, + 1325, + 1550, + 2000, + 0 + }[waveNumber]; + NetMessage.SendData(78, toWho, number: ((int) NPC.waveKills), number2: ((float) num), number3: 1f, number4: ((float) waveNumber)); + } + else if (Main.pumpkinMoon) + { + int num = new int[16] + { + 0, + 25, + 40, + 50, + 80, + 100, + 160, + 180, + 200, + 250, + 300, + 375, + 450, + 525, + 675, + 0 + }[waveNumber]; + NetMessage.SendData(78, toWho, number: ((int) NPC.waveKills), number2: ((float) num), number3: 2f, number4: ((float) waveNumber)); + } + else if (DD2Event.Ongoing) + { + DD2Event.SyncInvasionProgress(toWho); + } + else + { + if (Main.invasionType <= 0) + return; + int num = 1; + if (Main.invasionType != 0 && Main.invasionSizeStart != 0) + num = Main.invasionSizeStart; + NetMessage.SendData(78, toWho, number: (Main.invasionSizeStart - Main.invasionSize), number2: ((float) num), number3: ((float) (Main.invasionType + 3))); + } + } + + public static void ReportInvasionProgress( + int progress, + int progressMax, + int icon, + int progressWave) + { + Main.invasionProgress = progress; + Main.invasionProgressMax = progressMax; + Main.invasionProgressIcon = icon; + Main.invasionProgressWave = progressWave; + Main.invasionProgressDisplayLeft = 160; + } + + public static void DrawInvasionProgress() + { + if (Main.invasionProgress == -1) + return; + if (Main.invasionProgressMode == 2 && Main.invasionProgressNearInvasion && Main.invasionProgressDisplayLeft < 160) + Main.invasionProgressDisplayLeft = 160; + if (!Main.gamePaused && Main.invasionProgressDisplayLeft > 0) + --Main.invasionProgressDisplayLeft; + if (Main.invasionProgressDisplayLeft > 0) + Main.invasionProgressAlpha += 0.05f; + else + Main.invasionProgressAlpha -= 0.05f; + if (Main.invasionProgressMode == 0) + { + Main.invasionProgressDisplayLeft = 0; + Main.invasionProgressAlpha = 0.0f; + } + if ((double) Main.invasionProgressAlpha < 0.0) + Main.invasionProgressAlpha = 0.0f; + if ((double) Main.invasionProgressAlpha > 1.0) + Main.invasionProgressAlpha = 1f; + if ((double) Main.invasionProgressAlpha <= 0.0) + return; + float scale1 = (float) (0.5 + (double) Main.invasionProgressAlpha * 0.5); + Texture2D texture1 = TextureAssets.Extra[9].Value; + string text = ""; + Microsoft.Xna.Framework.Color c = Microsoft.Xna.Framework.Color.White; + switch (Main.invasionProgressIcon) + { + case 1: + texture1 = TextureAssets.Extra[8].Value; + text = Lang.inter[83].Value; + c = new Microsoft.Xna.Framework.Color(64, 109, 164) * 0.5f; + break; + case 2: + texture1 = TextureAssets.Extra[12].Value; + text = Lang.inter[84].Value; + c = new Microsoft.Xna.Framework.Color(112, 86, 114) * 0.5f; + break; + case 3: + texture1 = TextureAssets.Extra[79].Value; + text = Language.GetTextValue("DungeonDefenders2.InvasionProgressTitle"); + c = new Microsoft.Xna.Framework.Color(88, 0, 160) * 0.5f; + break; + case 4: + texture1 = TextureAssets.Extra[9].Value; + text = Lang.inter[88].Value; + c = new Microsoft.Xna.Framework.Color(94, 72, 131) * 0.5f; + break; + case 5: + texture1 = TextureAssets.Extra[7].Value; + text = Lang.inter[87].Value; + c = new Microsoft.Xna.Framework.Color(173, 135, 140) * 0.5f; + break; + case 6: + texture1 = TextureAssets.Extra[11].Value; + text = Lang.inter[86].Value; + c = new Microsoft.Xna.Framework.Color(148, 122, 72) * 0.5f; + break; + case 7: + texture1 = TextureAssets.Extra[10].Value; + text = Lang.inter[85].Value; + c = new Microsoft.Xna.Framework.Color(165, 160, 155) * 0.5f; + break; + } + if (Main.invasionProgressWave > 0) + { + int width = (int) (200.0 * (double) scale1); + int height = (int) (45.0 * (double) scale1); + Vector2 position1 = new Vector2((float) (Main.screenWidth - 120), (float) (Main.screenHeight - 40)); + Microsoft.Xna.Framework.Rectangle R = new Microsoft.Xna.Framework.Rectangle((int) position1.X - width / 2, (int) position1.Y - height / 2, width, height); + Utils.DrawInvBG(Main.spriteBatch, R, new Microsoft.Xna.Framework.Color(63, 65, 151, (int) byte.MaxValue) * 0.785f); + string str = Main.invasionProgressMax != 0 ? ((int) ((double) Main.invasionProgress * 100.0 / (double) Main.invasionProgressMax)).ToString() + "%" : Language.GetTextValue("Game.InvasionPoints", (object) Main.invasionProgress); + string textValue = Language.GetTextValue("Game.WaveMessage", (object) Main.invasionProgressWave, (object) str); + Texture2D texture2 = TextureAssets.ColorBar.Value; + Texture2D texture2D = TextureAssets.ColorBlip.Value; + float num1 = MathHelper.Clamp((float) Main.invasionProgress / (float) Main.invasionProgressMax, 0.0f, 1f); + if (Main.invasionProgressMax == 0) + num1 = 1f; + float num2 = 169f * scale1; + float y = 8f * scale1; + Vector2 pos = position1 + Vector2.UnitY * y + Vector2.UnitX * 1f; + Utils.DrawBorderString(Main.spriteBatch, textValue, pos, Microsoft.Xna.Framework.Color.White * Main.invasionProgressAlpha, scale1, 0.5f, 1f); + Main.spriteBatch.Draw(texture2, position1, new Microsoft.Xna.Framework.Rectangle?(), Microsoft.Xna.Framework.Color.White * Main.invasionProgressAlpha, 0.0f, new Vector2((float) (texture2.Width / 2), 0.0f), scale1, SpriteEffects.None, 0.0f); + Vector2 position2 = pos + Vector2.UnitX * (num1 - 0.5f) * num2; + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 1, 1)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 241, 51) * Main.invasionProgressAlpha, 0.0f, new Vector2(1f, 0.5f), new Vector2(num2 * num1, y), SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 1, 1)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 165, 0, (int) sbyte.MaxValue) * Main.invasionProgressAlpha, 0.0f, new Vector2(1f, 0.5f), new Vector2(2f, y), SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 1, 1)), Microsoft.Xna.Framework.Color.Black * Main.invasionProgressAlpha, 0.0f, new Vector2(0.0f, 0.5f), new Vector2(num2 * (1f - num1), y), SpriteEffects.None, 0.0f); + } + else + { + int width = (int) (200.0 * (double) scale1); + int height = (int) (45.0 * (double) scale1); + Vector2 position3 = new Vector2((float) (Main.screenWidth - 120), (float) (Main.screenHeight - 40)); + Microsoft.Xna.Framework.Rectangle R = new Microsoft.Xna.Framework.Rectangle((int) position3.X - width / 2, (int) position3.Y - height / 2, width, height); + Utils.DrawInvBG(Main.spriteBatch, R, new Microsoft.Xna.Framework.Color(63, 65, 151, (int) byte.MaxValue) * 0.785f); + string textValue = Language.GetTextValue("Game.WaveCleared", Main.invasionProgressMax != 0 ? (object) (((int) ((double) Main.invasionProgress * 100.0 / (double) Main.invasionProgressMax)).ToString() + "%") : (object) Main.invasionProgress.ToString()); + Texture2D texture3 = TextureAssets.ColorBar.Value; + Texture2D texture2D = TextureAssets.ColorBlip.Value; + if (Main.invasionProgressMax != 0) + { + Main.spriteBatch.Draw(texture3, position3, new Microsoft.Xna.Framework.Rectangle?(), Microsoft.Xna.Framework.Color.White * Main.invasionProgressAlpha, 0.0f, new Vector2((float) (texture3.Width / 2), 0.0f), scale1, SpriteEffects.None, 0.0f); + float num3 = MathHelper.Clamp((float) Main.invasionProgress / (float) Main.invasionProgressMax, 0.0f, 1f); + Vector2 vector2_1 = FontAssets.MouseText.Value.MeasureString(textValue); + float scale2 = scale1; + if ((double) vector2_1.Y > 22.0) + scale2 *= 22f / vector2_1.Y; + float num4 = 169f * scale1; + float y = 8f * scale1; + Vector2 vector2_2 = position3 + Vector2.UnitY * y + Vector2.UnitX * 1f; + Utils.DrawBorderString(Main.spriteBatch, textValue, vector2_2 + new Vector2(0.0f, -4f), Microsoft.Xna.Framework.Color.White * Main.invasionProgressAlpha, scale2, 0.5f, 1f); + Vector2 position4 = vector2_2 + Vector2.UnitX * (num3 - 0.5f) * num4; + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position4, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 1, 1)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 241, 51) * Main.invasionProgressAlpha, 0.0f, new Vector2(1f, 0.5f), new Vector2(num4 * num3, y), SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position4, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 1, 1)), new Microsoft.Xna.Framework.Color((int) byte.MaxValue, 165, 0, (int) sbyte.MaxValue) * Main.invasionProgressAlpha, 0.0f, new Vector2(1f, 0.5f), new Vector2(2f, y), SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, position4, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 1, 1)), Microsoft.Xna.Framework.Color.Black * Main.invasionProgressAlpha, 0.0f, new Vector2(0.0f, 0.5f), new Vector2(num4 * (1f - num3), y), SpriteEffects.None, 0.0f); + } + } + Vector2 vector2 = FontAssets.MouseText.Value.MeasureString(text); + float num = 120f; + if ((double) vector2.X > 200.0) + num += vector2.X - 200f; + Microsoft.Xna.Framework.Rectangle rectangle = Utils.CenteredRectangle(new Vector2((float) Main.screenWidth - num, (float) (Main.screenHeight - 80)), (vector2 + new Vector2((float) (texture1.Width + 12), 6f)) * scale1); + Utils.DrawInvBG(Main.spriteBatch, rectangle, c); + Main.spriteBatch.Draw(texture1, rectangle.Left() + Vector2.UnitX * scale1 * 8f, new Microsoft.Xna.Framework.Rectangle?(), Microsoft.Xna.Framework.Color.White * Main.invasionProgressAlpha, 0.0f, new Vector2(0.0f, (float) (texture1.Height / 2)), scale1 * 0.8f, SpriteEffects.None, 0.0f); + Utils.DrawBorderString(Main.spriteBatch, text, rectangle.Right() + Vector2.UnitX * scale1 * -22f, Microsoft.Xna.Framework.Color.White * Main.invasionProgressAlpha, scale1 * 0.9f, 1f, 0.4f); + } + + protected void QuitGame() + { + Main.SaveSettings(); + SocialAPI.Shutdown(); + this.Exit(); + } + + protected Microsoft.Xna.Framework.Color randColor() + { + int r = 0; + int g = 0; + int b; + for (b = 0; r + b + g <= 150; b = Main.rand.Next(256)) + { + r = Main.rand.Next(256); + g = Main.rand.Next(256); + } + return new Microsoft.Xna.Framework.Color(r, g, b, (int) byte.MaxValue); + } + + public static Microsoft.Xna.Framework.Color hslToRgb(Vector3 hslVector) => Main.hslToRgb(hslVector.X, hslVector.Y, hslVector.Z); + + public static Microsoft.Xna.Framework.Color hslToRgb( + float Hue, + float Saturation, + float Luminosity) + { + byte num1; + byte num2; + byte num3; + if ((double) Saturation == 0.0) + { + num1 = (byte) Math.Round((double) Luminosity * (double) byte.MaxValue); + num2 = (byte) Math.Round((double) Luminosity * (double) byte.MaxValue); + num3 = (byte) Math.Round((double) Luminosity * (double) byte.MaxValue); + } + else + { + double num4 = (double) Hue; + double t2_1 = (double) Luminosity >= 0.5 ? (double) Luminosity + (double) Saturation - (double) Luminosity * (double) Saturation : (double) Luminosity * (1.0 + (double) Saturation); + double t1_1 = 2.0 * (double) Luminosity - t2_1; + double c1 = num4 + 1.0 / 3.0; + double c2 = num4; + double c3 = num4 - 1.0 / 3.0; + double num5 = Main.hue2rgb(c1, t1_1, t2_1); + double num6 = Main.hue2rgb(c2, t1_1, t2_1); + double t1_2 = t1_1; + double t2_2 = t2_1; + double num7 = Main.hue2rgb(c3, t1_2, t2_2); + num1 = (byte) Math.Round(num5 * (double) byte.MaxValue); + num2 = (byte) Math.Round(num6 * (double) byte.MaxValue); + num3 = (byte) Math.Round(num7 * (double) byte.MaxValue); + } + return new Microsoft.Xna.Framework.Color((int) num1, (int) num2, (int) num3); + } + + public static double hue2rgb(double c, double t1, double t2) + { + if (c < 0.0) + ++c; + if (c > 1.0) + --c; + if (6.0 * c < 1.0) + return t1 + (t2 - t1) * 6.0 * c; + if (2.0 * c < 1.0) + return t2; + return 3.0 * c < 2.0 ? t1 + (t2 - t1) * (2.0 / 3.0 - c) * 6.0 : t1; + } + + public static Vector3 rgbToHsl(Microsoft.Xna.Framework.Color newColor) + { + float r = (float) newColor.R; + float g = (float) newColor.G; + float b = (float) newColor.B; + float val1 = r / (float) byte.MaxValue; + float val2_1 = g / (float) byte.MaxValue; + float val2_2 = b / (float) byte.MaxValue; + float num1 = Math.Max(Math.Max(val1, val2_1), val2_2); + float num2 = Math.Min(Math.Min(val1, val2_1), val2_2); + float num3 = 0.0f; + float z = (float) (((double) num1 + (double) num2) / 2.0); + float y; + float x; + if ((double) num1 == (double) num2) + { + x = y = 0.0f; + } + else + { + float num4 = num1 - num2; + y = (double) z > 0.5 ? num4 / (2f - num1 - num2) : num4 / (num1 + num2); + if ((double) num1 == (double) val1) + num3 = (float) (((double) val2_1 - (double) val2_2) / (double) num4 + ((double) val2_1 < (double) val2_2 ? 6.0 : 0.0)); + if ((double) num1 == (double) val2_1) + num3 = (float) (((double) val2_2 - (double) val1) / (double) num4 + 2.0); + if ((double) num1 == (double) val2_2) + num3 = (float) (((double) val1 - (double) val2_1) / (double) num4 + 4.0); + x = num3 / 6f; + } + return new Vector3(x, y, z); + } + + public static void DrawCursor(Vector2 bonus, bool smart = false) + { + if (Main.gameMenu && Main.alreadyGrabbingSunOrMoon) + return; + if (Main.player[Main.myPlayer].dead || Main.player[Main.myPlayer].mouseInterface) + { + Main.ClearSmartInteract(); + int num; + Main.TileInteractionHY = num = -1; + Main.TileInteractionLY = num; + Main.TileInteractionHX = num; + Main.TileInteractionLX = num; + } + bool flag1 = UILinkPointNavigator.Available && !PlayerInput.InBuildingMode; + Microsoft.Xna.Framework.Color cursorColor = Main.cursorColor; + if (PlayerInput.UsingGamepad) + { + if (Main.player[Main.myPlayer].dead && !Main.player[Main.myPlayer].ghost && !Main.gameMenu || PlayerInput.InvisibleGamepadInMenus) + return; + Vector2 t1 = new Vector2((float) Main.mouseX, (float) Main.mouseY); + Vector2 t2 = Vector2.Zero; + bool flag2 = Main.SmartCursorEnabled; + if (flag2) + { + PlayerInput.smartSelectPointer.UpdateCenter(Main.ScreenSize.ToVector2() / 2f); + t2 = PlayerInput.smartSelectPointer.GetPointerPosition(); + if ((double) Vector2.Distance(t2, t1) < 1.0) + flag2 = false; + else + Utils.Swap(ref t1, ref t2); + } + float num = 1f; + if (flag2) + { + num = 0.3f; + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.White * Main.GamepadCursorAlpha; + int index = 17; + int frameX = 0; + Main.spriteBatch.Draw(TextureAssets.Cursors[index].Value, t2 + bonus, new Microsoft.Xna.Framework.Rectangle?(TextureAssets.Cursors[index].Frame(frameX: frameX)), color, 1.570796f * Main.GlobalTimeWrappedHourly, TextureAssets.Cursors[index].Frame(frameX: frameX).Size() / 2f, Main.cursorScale, SpriteEffects.None, 0.0f); + } + if (smart && !flag1) + { + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.White * Main.GamepadCursorAlpha * num; + int index = 13; + int frameX = 0; + Main.spriteBatch.Draw(TextureAssets.Cursors[index].Value, t1 + bonus, new Microsoft.Xna.Framework.Rectangle?(TextureAssets.Cursors[index].Frame(2, frameX: frameX)), color, 0.0f, TextureAssets.Cursors[index].Frame(2, frameX: frameX).Size() / 2f, Main.cursorScale, SpriteEffects.None, 0.0f); + } + else + { + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + int index = 15; + Main.spriteBatch.Draw(TextureAssets.Cursors[index].Value, new Vector2((float) Main.mouseX, (float) Main.mouseY) + bonus, new Microsoft.Xna.Framework.Rectangle?(), white, 0.0f, TextureAssets.Cursors[index].Value.Size() / 2f, Main.cursorScale, SpriteEffects.None, 0.0f); + } + } + else + { + int index = smart.ToInt(); + Main.spriteBatch.Draw(TextureAssets.Cursors[index].Value, new Vector2((float) Main.mouseX, (float) Main.mouseY) + bonus + Vector2.One, new Microsoft.Xna.Framework.Rectangle?(), new Microsoft.Xna.Framework.Color((int) ((double) cursorColor.R * 0.200000002980232), (int) ((double) cursorColor.G * 0.200000002980232), (int) ((double) cursorColor.B * 0.200000002980232), (int) ((double) cursorColor.A * 0.5)), 0.0f, new Vector2(), Main.cursorScale * 1.1f, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.Cursors[index].Value, new Vector2((float) Main.mouseX, (float) Main.mouseY) + bonus, new Microsoft.Xna.Framework.Rectangle?(), cursorColor, 0.0f, new Vector2(), Main.cursorScale, SpriteEffects.None, 0.0f); + } + } + + public static void ClearSmartInteract() + { + Main.SmartInteractShowingGenuine = false; + Main.SmartInteractShowingFake = false; + Main.SmartInteractNPC = -1; + Main.SmartInteractProj = -1; + Main.SmartInteractTileCoords.Clear(); + Main.SmartInteractTileCoordsSelected.Clear(); + } + + public static Vector2 DrawThickCursor(bool smart = false) + { + if (!Main.ThickMouse || Main.gameMenu && Main.alreadyGrabbingSunOrMoon || PlayerInput.UsingGamepad && PlayerInput.InvisibleGamepadInMenus || PlayerInput.UsingGamepad && Main.player[Main.myPlayer].dead && !Main.player[Main.myPlayer].ghost && !Main.gameMenu) + return Vector2.Zero; + bool flag = UILinkPointNavigator.Available && !PlayerInput.InBuildingMode; + Microsoft.Xna.Framework.Color mouseBorderColor = Main.MouseBorderColor; + int index1 = 11 + smart.ToInt(); + for (int index2 = 0; index2 < 4; ++index2) + { + Vector2 vector2_1 = Vector2.Zero; + switch (index2) + { + case 0: + vector2_1 = new Vector2(0.0f, 1f); + break; + case 1: + vector2_1 = new Vector2(1f, 0.0f); + break; + case 2: + vector2_1 = new Vector2(0.0f, -1f); + break; + case 3: + vector2_1 = new Vector2(-1f, 0.0f); + break; + } + Vector2 vector2_2 = vector2_1 * 1f + Vector2.One * 2f; + Vector2 origin = new Vector2(2f); + Microsoft.Xna.Framework.Rectangle? sourceRectangle = new Microsoft.Xna.Framework.Rectangle?(); + float scale = Main.cursorScale * 1.1f; + if (PlayerInput.UsingGamepad) + { + if (smart && !flag) + { + index1 = 13; + int frameX = 0; + vector2_2 = Vector2.One; + sourceRectangle = new Microsoft.Xna.Framework.Rectangle?(TextureAssets.Cursors[index1].Frame(2, frameX: frameX)); + origin = TextureAssets.Cursors[index1].Frame(2, frameX: frameX).Size() / 2f; + mouseBorderColor *= Main.GamepadCursorAlpha; + } + else + { + index1 = 15; + vector2_2 = Vector2.One; + origin = TextureAssets.Cursors[index1].Value.Size() / 2f; + } + } + Main.spriteBatch.Draw(TextureAssets.Cursors[index1].Value, new Vector2((float) Main.mouseX, (float) Main.mouseY) + vector2_2, sourceRectangle, mouseBorderColor, 0.0f, origin, scale, SpriteEffects.None, 0.0f); + } + return new Vector2(2f); + } + + private void OnCharacterNamed(string text) + { + Main.PendingPlayer.name = text.Trim(); + PlayerFileData.CreateAndSave(Main.PendingPlayer); + Main.LoadPlayers(); + Main.menuMode = 1; + } + + private void OnSeedSelected(string text) + { + text = text.Trim(); + if (text.Length == 0) + Main.ActiveWorldFileData.SetSeedToRandom(); + else + Main.ActiveWorldFileData.SetSeed(text); + Main.menuMode = 10; + WorldGen.CreateNewWorld(); + } + + private void OnWorldNamed(string text) + { + Main.menuMode = 10; + Main.worldName = text.Trim(); + Main.ActiveWorldFileData = WorldFile.CreateMetadata(Main.worldName, SocialAPI.Cloud != null && SocialAPI.Cloud.EnabledByDefault, Main.GameMode); + Main.menuMode = 5000; + } + + private static Action CreateGoToMenuEvent(int menu) => (Action) (() => + { + Main.menuMode = menu; + UILinkPointNavigator.Shortcuts.FANCYUI_SPECIAL_INSTRUCTIONS = 0; + }); + + public static Microsoft.Xna.Framework.Point ScreenSize => new Microsoft.Xna.Framework.Point(Main.screenWidth, Main.screenHeight); + + public static void GoToWorldSelect() + { + Main.MenuUI.SetState((UIState) Main._worldSelectMenu); + Main.menuMode = 888; + } + + public static void StartClientGameplay() + { + Main.menuMode = 10; + Netplay.StartTcpClient(); + } + + public static void ReleaseHostAndPlayProcess() + { + if (Main.tServer == null) + return; + Main.tServer = (Process) null; + } + + protected void DrawMenu(GameTime gameTime) + { + if (!Main.IsEngineLoaded) + { + Main.IsEngineLoaded = true; + if (Main.OnEngineLoad != null) + Main.OnEngineLoad(); + } + GamepadMainMenuHandler.Update(); + GamepadMainMenuHandler.MenuItemPositions.Clear(); + int menuMode1 = Main.menuMode; + if (Main.menuMode <= 1 && Main.slimeRain) + Main.StopSlimeRain(); + Main.render = false; + Main.SceneMetrics.Reset(); + Main.drawingPlayerChat = false; + Main.chatMonitor.Clear(); + Main.screenLastPosition = Main.screenPosition; + Main.screenPosition.Y = (float) (Main.worldSurface * 16.0) - (float) Main.screenHeight; + Main.MenuXMovement = 4f; + if (Main.alreadyGrabbingSunOrMoon) + this.playOldTile = true; + Main.screenPosition.X += Main.MenuXMovement; + if ((double) Main.screenPosition.X > 2147483520.0) + Main.screenPosition.X = 0.0f; + if ((double) Main.screenPosition.X < -2147483520.0) + Main.screenPosition.X = 0.0f; + Star.UpdateStars(); + Cloud.UpdateClouds(); + this.DrawFPS(); + Main.background = 0; + byte num1 = (byte) (((int) byte.MaxValue + (int) Main.tileColor.R * 2) / 3); + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color((int) num1, (int) num1, (int) num1, (int) byte.MaxValue); + if (WorldGen.drunkWorldGen) + { + this.logoRotation += this.logoRotationSpeed * 4E-06f; + if ((double) this.logoRotationSpeed > 0.0) + this.logoRotationSpeed += 1500f; + else + this.logoRotationSpeed -= 1500f; + this.logoScale -= 0.05f; + if ((double) this.logoScale < 0.0) + this.logoScale = 0.0f; + } + else + { + this.logoRotation += this.logoRotationSpeed * 4E-06f; + if ((double) this.logoRotation > 0.08) + this.logoRotationDirection = -1f; + else if ((double) this.logoRotation < -0.08) + this.logoRotationDirection = 1f; + if ((double) this.logoRotationSpeed < 20.0 && (double) this.logoRotationDirection == 1.0) + ++this.logoRotationSpeed; + else if ((double) this.logoRotationSpeed > -20.0 && (double) this.logoRotationDirection == -1.0) + --this.logoRotationSpeed; + this.logoScale += this.logoScaleSpeed * 9E-06f; + if ((double) this.logoScale > 1.35) + this.logoScaleDirection = -1f; + else if ((double) this.logoScale < 1.0) + this.logoScaleDirection = 1f; + if ((double) this.logoScaleSpeed < 50.0 && (double) this.logoScaleDirection == 1.0) + ++this.logoScaleSpeed; + else if ((double) this.logoScaleSpeed > -50.0 && (double) this.logoScaleDirection == -1.0) + --this.logoScaleSpeed; + } + Microsoft.Xna.Framework.Color color2 = new Microsoft.Xna.Framework.Color((int) (byte) ((double) color1.R * ((double) Main.LogoA / (double) byte.MaxValue)), (int) (byte) ((double) color1.G * ((double) Main.LogoA / (double) byte.MaxValue)), (int) (byte) ((double) color1.B * ((double) Main.LogoA / (double) byte.MaxValue)), (int) (byte) ((double) color1.A * ((double) Main.LogoA / (double) byte.MaxValue))); + Microsoft.Xna.Framework.Color color3 = new Microsoft.Xna.Framework.Color((int) (byte) ((double) color1.R * ((double) Main.LogoB / (double) byte.MaxValue)), (int) (byte) ((double) color1.G * ((double) Main.LogoB / (double) byte.MaxValue)), (int) (byte) ((double) color1.B * ((double) Main.LogoB / (double) byte.MaxValue)), (int) (byte) ((double) color1.A * ((double) Main.LogoB / (double) byte.MaxValue))); + if (this.playOldTile) + { + Main.spriteBatch.Draw(TextureAssets.Logo3.Value, new Vector2((float) (Main.screenWidth / 2), 100f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Logo.Width(), TextureAssets.Logo.Height())), color2, this.logoRotation, new Vector2((float) (TextureAssets.Logo.Width() / 2), (float) (TextureAssets.Logo.Height() / 2)), this.logoScale, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.Logo4.Value, new Vector2((float) (Main.screenWidth / 2), 100f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Logo.Width(), TextureAssets.Logo.Height())), color3, this.logoRotation, new Vector2((float) (TextureAssets.Logo.Width() / 2), (float) (TextureAssets.Logo.Height() / 2)), this.logoScale, SpriteEffects.None, 0.0f); + } + else + { + Main.spriteBatch.Draw(TextureAssets.Logo.Value, new Vector2((float) (Main.screenWidth / 2), 100f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Logo.Width(), TextureAssets.Logo.Height())), color2, this.logoRotation, new Vector2((float) (TextureAssets.Logo.Width() / 2), (float) (TextureAssets.Logo.Height() / 2)), this.logoScale, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.Logo2.Value, new Vector2((float) (Main.screenWidth / 2), 100f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Logo.Width(), TextureAssets.Logo.Height())), color3, this.logoRotation, new Vector2((float) (TextureAssets.Logo.Width() / 2), (float) (TextureAssets.Logo.Height() / 2)), this.logoScale, SpriteEffects.None, 0.0f); + } + if (Main.dayTime) + { + Main.LogoA += 2; + if (Main.LogoA > (int) byte.MaxValue) + Main.LogoA = (int) byte.MaxValue; + --Main.LogoB; + if (Main.LogoB < 0) + Main.LogoB = 0; + } + else + { + Main.LogoB += 2; + if (Main.LogoB > (int) byte.MaxValue) + Main.LogoB = (int) byte.MaxValue; + --Main.LogoA; + if (Main.LogoA < 0) + { + Main.LogoA = 0; + Main.LogoT = true; + } + } + int num2 = 250; + int num3 = Main.screenWidth / 2; + int num4 = 80; + int num5 = 0; + int menuMode2 = Main.menuMode; + int num6 = 0; + int num7 = 0; + bool flag1 = false; + bool flag2 = false; + bool flag3 = false; + int num8 = 0; + bool[] flagArray1 = new bool[Main.maxMenuItems]; + bool[] flagArray2 = new bool[Main.maxMenuItems]; + bool[] flagArray3 = new bool[Main.maxMenuItems]; + int[] numArray1 = new int[Main.maxMenuItems]; + int[] numArray2 = new int[Main.maxMenuItems]; + byte[] numArray3 = new byte[Main.maxMenuItems]; + float[] numArray4 = new float[Main.maxMenuItems]; + bool[] flagArray4 = new bool[Main.maxMenuItems]; + bool flag4 = false; + bool flag5 = UILinkPointNavigator.Shortcuts.BackButtonInUse && !UILinkPointNavigator.Shortcuts.BackButtonLock; + for (int index = 0; index < Main.maxMenuItems; ++index) + { + flagArray1[index] = false; + flagArray2[index] = false; + numArray1[index] = 0; + numArray2[index] = 0; + numArray4[index] = 1f; + } + string[] strArray1 = new string[Main.maxMenuItems]; + if (Main.menuMode == -1) + Main.menuMode = 0; + if (Program.LoadedEverything) + GamepadMainMenuHandler.CanRun = true; + switch (Main.menuMode) + { + case 1212: + strArray1[0] = Lang.menu[102].Value; + num4 = 33; + num2 = 200; + numArray1[0] = -20; + numArray1[1] = 25; + numArray1[2] = 25; + numArray1[3] = 25; + numArray1[4] = 25; + numArray1[5] = 25; + numArray1[6] = 25; + numArray1[7] = 25; + numArray1[8] = 25; + numArray1[9] = 25; + flagArray1[0] = true; + strArray1[1] = Language.GetTextValue("Language.English"); + strArray1[2] = Language.GetTextValue("Language.German"); + strArray1[3] = Language.GetTextValue("Language.Italian"); + strArray1[4] = Language.GetTextValue("Language.French"); + strArray1[5] = Language.GetTextValue("Language.Spanish"); + strArray1[6] = Language.GetTextValue("Language.Russian"); + strArray1[7] = Language.GetTextValue("Language.Chinese"); + strArray1[8] = Language.GetTextValue("Language.Portuguese"); + strArray1[9] = Language.GetTextValue("Language.Polish"); + num5 = 10; + for (int index = 0; index < num5; ++index) + numArray4[index] = 0.75f; + numArray4[0] = 1f; + if (this.selectedMenu >= 1) + { + Main.changeTheTitle = true; + LanguageManager.Instance.SetLanguage(this.selectedMenu); + Main.menuMode = 0; + SoundEngine.PlaySound(10); + Main.SaveSettings(); + break; + } + break; + case 1213: + strArray1[0] = Lang.menu[102].Value; + flagArray1[0] = true; + strArray1[1] = Language.GetTextValue("Language.English"); + strArray1[2] = Language.GetTextValue("Language.German"); + strArray1[3] = Language.GetTextValue("Language.Italian"); + strArray1[4] = Language.GetTextValue("Language.French"); + strArray1[5] = Language.GetTextValue("Language.Spanish"); + strArray1[6] = Language.GetTextValue("Language.Russian"); + strArray1[7] = Language.GetTextValue("Language.Chinese"); + strArray1[8] = Language.GetTextValue("Language.Portuguese"); + strArray1[9] = Language.GetTextValue("Language.Polish"); + strArray1[10] = Lang.menu[5].Value; + num5 = 11; + if (this.selectedMenu == 10 | flag5) + { + flag5 = false; + Main.menuMode = 11; + SoundEngine.PlaySound(11); + } + else if (this.selectedMenu >= 1) + { + Main.changeTheTitle = true; + LanguageManager.Instance.SetLanguage(this.selectedMenu); + SoundEngine.PlaySound(12); + Main.SaveSettings(); + } + num4 = 33; + num2 = 200; + numArray1[0] = -20; + numArray1[10] = 10; + for (int index = 0; index < num5; ++index) + numArray4[index] = 0.75f; + numArray4[0] = 0.85f; + numArray4[10] = 0.95f; + break; + default: + if (Main.netMode == 2) + { + bool flag6 = true; + for (int index = 0; index < 8; ++index) + { + if (index < (int) byte.MaxValue) + { + try + { + strArray1[index] = Netplay.Clients[index].StatusText; + if (Netplay.Clients[index].IsActive) + { + if (Main.showSpam) + { + ref string local = ref strArray1[index]; + local = local + " (" + (object) NetMessage.buffer[index].spamCount + ")"; + } + } + } + catch + { + strArray1[index] = ""; + } + flagArray1[index] = true; + if (strArray1[index] != "" && strArray1[index] != null) + flag6 = false; + } + } + if (flag6) + { + strArray1[0] = Lang.menu[0].Value; + strArray1[1] = Lang.menu[1].Value + (object) Netplay.ListenPort + "."; + } + num5 = 11; + strArray1[9] = Main.statusText; + flagArray1[9] = true; + num2 = 170; + num4 = 30; + numArray1[10] = 20; + numArray1[10] = 40; + strArray1[10] = Lang.menu[2].Value; + if (this.selectedMenu == 10 | flag5) + { + flag5 = false; + Netplay.Disconnect = true; + SoundEngine.PlaySound(11); + break; + } + break; + } + if (Main.menuMode == 31) + { + string serverPassword1 = Netplay.ServerPassword; + PlayerInput.WritingText = true; + flag5 = false; + Main.instance.HandleIME(); + Netplay.ServerPassword = Main.GetInputText(Netplay.ServerPassword); + string serverPassword2 = Netplay.ServerPassword; + if (serverPassword1 != serverPassword2) + SoundEngine.PlaySound(12); + strArray1[0] = Lang.menu[3].Value; + ++this.textBlinkerCount; + if (this.textBlinkerCount >= 20) + { + this.textBlinkerState = this.textBlinkerState != 0 ? 0 : 1; + this.textBlinkerCount = 0; + } + strArray1[1] = Netplay.ServerPassword; + if (Main.HidePassword) + { + strArray1[1] = ""; + for (int index = 0; index < Netplay.ServerPassword.Length; ++index) + { + // ISSUE: explicit reference operation + ^ref strArray1[1] += "*"; + } + } + if (this.textBlinkerState == 1) + { + // ISSUE: explicit reference operation + ^ref strArray1[1] += "|"; + numArray2[1] = 1; + } + else + { + // ISSUE: explicit reference operation + ^ref strArray1[1] += " "; + } + flagArray1[0] = true; + flagArray1[1] = true; + numArray1[1] = -20; + numArray1[2] = 20; + strArray1[2] = Lang.menu[4].Value; + strArray1[3] = Lang.menu[5].Value; + num5 = 4; + if (this.selectedMenu == 3 | flag5) + { + flag5 = false; + SoundEngine.PlaySound(11); + Main.menuMode = 0; + Netplay.Disconnect = true; + Netplay.ServerPassword = ""; + break; + } + if (this.selectedMenu == 2 || Main.inputTextEnter) + { + NetMessage.SendData(38); + Main.menuMode = 14; + break; + } + break; + } + if (Main.netMode != 1) + { + switch (Main.menuMode) + { + case -71: + num2 = 200; + num4 = 60; + numArray1[1] = 30; + numArray1[2] = 30; + numArray1[3] = 30; + numArray1[4] = 70; + num5 = 5; + int index1 = 0; + strArray1[index1] = Lang.misc[100].Value; + flagArray1[index1] = true; + int index2 = index1 + 1; + strArray1[index2] = Lang.misc[101].Value; + if (this.selectedMenu == index2) + { + WorldGen.WorldGenParam_Evil = 0; + SoundEngine.PlaySound(10); + Main.menuMode = 7; + } + int index3 = index2 + 1; + strArray1[index3] = Lang.misc[102].Value; + if (this.selectedMenu == index3) + { + WorldGen.WorldGenParam_Evil = 1; + SoundEngine.PlaySound(10); + Main.menuMode = 7; + } + int index4 = index3 + 1; + strArray1[index4] = Lang.misc[103].Value; + if (this.selectedMenu == index4) + { + WorldGen.WorldGenParam_Evil = -1; + SoundEngine.PlaySound(10); + Main.menuMode = 7; + } + int index5 = index4 + 1; + strArray1[index5] = Language.GetTextValue("UI.Back"); + if (this.selectedMenu == index5 | flag5) + { + flag5 = false; + SoundEngine.PlaySound(11); + Main.menuMode = -7; + } + int num9 = index5 + 1; + Main.clrInput(); + goto label_623; + case -7: + num2 = 200; + num4 = 60; + numArray1[2] = 30; + numArray1[3] = 30; + numArray1[4] = 30; + numArray3[3] = (byte) 1; + numArray3[4] = (byte) 2; + numArray1[5] = 70; + if (this.focusMenu == 2) + strArray1[1] = Language.GetTextValue("UI.WorldDescriptionNormal"); + else if (this.focusMenu == 3) + strArray1[1] = Language.GetTextValue("UI.WorldDescriptionExpert"); + else if (this.focusMenu == 4) + strArray1[1] = Language.GetTextValue("UI.WorldDescriptionMaster"); + strArray1[0] = Lang.menu[32].Value; + flagArray1[0] = true; + flagArray1[1] = true; + strArray1[2] = Language.GetTextValue("UI.Normal"); + strArray1[3] = Language.GetTextValue("UI.Expert"); + strArray1[4] = Language.GetTextValue("UI.Master"); + strArray1[5] = Language.GetTextValue("UI.Back"); + num5 = 6; + if (this.selectedMenu == 2) + { + Main.GameMode = 0; + SoundEngine.PlaySound(10); + Main.menuMode = 7; + if (Main.SettingsUnlock_WorldEvil) + Main.menuMode = -71; + } + else if (this.selectedMenu == 3) + { + Main.GameMode = 1; + SoundEngine.PlaySound(10); + Main.menuMode = 7; + if (Main.SettingsUnlock_WorldEvil) + Main.menuMode = -71; + } + else if (this.selectedMenu == 4) + { + Main.GameMode = 2; + SoundEngine.PlaySound(10); + Main.menuMode = 7; + if (Main.SettingsUnlock_WorldEvil) + Main.menuMode = -71; + } + else if (this.selectedMenu == 5 | flag5) + { + flag5 = false; + SoundEngine.PlaySound(11); + Main.menuMode = 16; + } + Main.clrInput(); + goto label_623; + case 0: + Main._blockFancyUIWhileLoading = false; + Main._pendingCharacterSelect = (Main.OnPlayerSelected) null; + DD2Event.Ongoing = false; + Main.eclipse = false; + Main.pumpkinMoon = false; + Main.snowMoon = false; + Main.ServerSideCharacter = false; + Main.menuMultiplayer = false; + Main.menuServer = false; + Main.netMode = 0; + Main.ClearVisualPostProcessEffects(); + int index6 = 0; + num5 = 6; + num4 = 60; + strArray1[index6] = Lang.menu[12].Value; + if (this.selectedMenu == index6) + { + SoundEngine.PlaySound(10); + Main.ClearPendingPlayerSelectCallbacks(); + Main.menuMode = 1; + } + int index7 = index6 + 1; + strArray1[index7] = Lang.menu[13].Value; + if (this.selectedMenu == index7) + { + SoundEngine.PlaySound(10); + Main.menuMode = 12; + } + int index8 = index7 + 1; + strArray1[index8] = Lang.menu[131].Value; + if (this.selectedMenu == index8) + { + SoundEngine.PlaySound(10); + Main.MenuUI.SetState((UIState) Main.AchievementsMenu); + Main.menuMode = 888; + } + int index9 = index8 + 1; + strArray1[index9] = Language.GetText("UI.ResourcePacks").Value; + if (this.selectedMenu == index9) + { + SoundEngine.PlaySound(10); + Main.MenuUI.SetState((UIState) new UIResourcePackSelectionMenu(Main.AssetSourceController, AssetInitializer.CreateResourcePackList((System.IServiceProvider) this.Services))); + Main.menuMode = 888; + } + int index10 = index9 + 1; + strArray1[index10] = Lang.menu[14].Value; + if (this.selectedMenu == index10) + { + SoundEngine.PlaySound(10); + Main.menuMode = 11; + } + int index11 = index10 + 1; + strArray1[index11] = Lang.menu[15].Value; + if (this.selectedMenu == index11) + this.QuitGame(); + int num10 = index11 + 1; + goto label_623; + case 1: + Main.OpenCharacterSelectUI(); + goto label_623; + case 2: + flag4 = true; + if (this.selectedMenu == 0) + { + Main.menuMode = 17; + SoundEngine.PlaySound(10); + Main.selColor = Main.PendingPlayer.hairColor; + } + if (this.selectedMenu == 1) + { + Main.menuMode = 18; + SoundEngine.PlaySound(10); + Main.selColor = Main.PendingPlayer.eyeColor; + } + if (this.selectedMenu == 2) + { + Main.menuMode = 19; + SoundEngine.PlaySound(10); + Main.selColor = Main.PendingPlayer.skinColor; + } + if (this.selectedMenu == 3) + { + Main.menuMode = 20; + SoundEngine.PlaySound(10); + } + strArray1[0] = Lang.menu[18].Value; + strArray1[1] = Lang.menu[19].Value; + strArray1[2] = Lang.menu[20].Value; + strArray1[3] = Lang.menu[21].Value; + num2 = 220; + for (int index12 = 0; index12 < 9; ++index12) + numArray4[index12] = index12 >= 6 ? 0.9f : 0.75f; + num4 = 38; + numArray1[6] = 6; + numArray1[7] = 12; + numArray1[8] = 18; + num6 = Main.screenWidth / 2 - 16; + num7 = 176; + strArray1[4] = !Main.PendingPlayer.Male ? Lang.menu[23].Value : Lang.menu[22].Value; + if (this.selectedMenu == 4) + { + if (Main.PendingPlayer.Male) + { + SoundEngine.PlaySound(20); + Main.PendingPlayer.Male = false; + } + else + { + SoundEngine.PlaySound(1); + Main.PendingPlayer.Male = true; + } + } + if (Main.PendingPlayer.difficulty == (byte) 2) + { + strArray1[5] = Lang.menu[24].Value; + numArray3[5] = Main.PendingPlayer.difficulty; + } + else if (Main.PendingPlayer.difficulty == (byte) 1) + { + strArray1[5] = Lang.menu[25].Value; + numArray3[5] = Main.PendingPlayer.difficulty; + } + else + strArray1[5] = Lang.menu[26].Value; + if (this.selectedMenu == 5) + { + SoundEngine.PlaySound(10); + Main.menuMode = 222; + } + if (this.selectedMenu == 7) + { + SoundEngine.PlaySound(12); + Main.PendingPlayer.hair = Main.rand.Next(51); + Main.PendingPlayer.eyeColor = this.randColor(); + while ((int) Main.PendingPlayer.eyeColor.R + (int) Main.PendingPlayer.eyeColor.G + (int) Main.PendingPlayer.eyeColor.B > 300) + Main.PendingPlayer.eyeColor = this.randColor(); + Main.PendingPlayer.hairColor = this.randColor(); + Main.PendingPlayer.pantsColor = this.randColor(); + Main.PendingPlayer.shirtColor = this.randColor(); + Main.PendingPlayer.shoeColor = this.randColor(); + Main.PendingPlayer.skinColor = this.randColor(); + float num11 = (float) Main.rand.Next(60, 120) * 0.01f; + if ((double) num11 > 1.0) + num11 = 1f; + Main.PendingPlayer.skinColor.R = (byte) ((double) Main.rand.Next(240, (int) byte.MaxValue) * (double) num11); + Main.PendingPlayer.skinColor.G = (byte) ((double) Main.rand.Next(110, 140) * (double) num11); + Main.PendingPlayer.skinColor.B = (byte) ((double) Main.rand.Next(75, 110) * (double) num11); + Main.PendingPlayer.underShirtColor = this.randColor(); + switch (Main.PendingPlayer.hair + 1) + { + case 5: + case 6: + case 7: + case 10: + case 12: + case 19: + case 22: + case 23: + case 26: + case 27: + case 30: + case 33: + Main.PendingPlayer.Male = false; + break; + default: + Main.PendingPlayer.Male = true; + break; + } + Main.PendingPlayer.skinVariant = Main.rand.Next(12); + } + strArray1[7] = Lang.menu[27].Value; + strArray1[6] = Lang.menu[28].Value; + strArray1[8] = Lang.menu[5].Value; + num5 = 9; + if (this.selectedMenu == 8 | flag5) + { + flag5 = false; + SoundEngine.PlaySound(11); + Main.menuMode = 1; + goto label_623; + } + else if (this.selectedMenu == 6) + { + SoundEngine.PlaySound(10); + Main.PendingPlayer.name = ""; + Main.menuMode = 3; + Main.clrInput(); + goto label_623; + } + else + goto label_623; + case 3: + UIVirtualKeyboard uiVirtualKeyboard = new UIVirtualKeyboard(Lang.menu[45].Value, "", new UIVirtualKeyboard.KeyboardSubmitEvent(this.OnCharacterNamed), Main.CreateGoToMenuEvent(2)); + uiVirtualKeyboard.SetMaxInputLength(20); + Main.MenuUI.SetState((UIState) uiVirtualKeyboard); + Main.menuMode = 888; + goto label_623; + case 5: + strArray1[0] = Lang.menu[46].Value + " " + Main.PlayerList[Main.selectedPlayer].Player.name + "?"; + flagArray1[0] = true; + strArray1[1] = Lang.menu[104].Value; + strArray1[2] = Lang.menu[105].Value; + num5 = 3; + if (this.selectedMenu == 1) + { + Main.ErasePlayer(Main.selectedPlayer); + SoundEngine.PlaySound(10); + Main.menuMode = 1; + goto label_623; + } + else if (this.selectedMenu == 2 | flag5) + { + flag5 = false; + SoundEngine.PlaySound(11); + Main.menuMode = 1; + goto label_623; + } + else + goto label_623; + case 6: + Main.MenuUI.SetState((UIState) Main._worldSelectMenu); + Main.menuMode = 888; + goto label_623; + case 7: + Main.MenuUI.SetState((UIState) new UIVirtualKeyboard(Lang.menu[48].Value, "", new UIVirtualKeyboard.KeyboardSubmitEvent(this.OnWorldNamed), Main.CreateGoToMenuEvent(-7))); + Main.menuMode = 888; + goto label_623; + case 8: + num2 = 180; + num4 = 40; + num5 = 8; + numArray1[7] += 30; + for (int index13 = 0; index13 < num5; ++index13) + numArray4[index13] = 0.8f; + strArray1[7] = Lang.menu[5].Value; + for (int index14 = 0; index14 < 7; ++index14) + { + if (index14 < Main.WorldList.Count) + { + strArray1[index14] = Main.WorldList[index14 + Main.menuSkip].Name; + if (Main.WorldList[index14 + Main.menuSkip].GameMode == 1) + numArray3[index14] = (byte) 1; + else if (Main.WorldList[index14 + Main.menuSkip].GameMode == 2) + numArray3[index14] = (byte) 2; + } + else + strArray1[index14] = (string) null; + } + if (Main.WorldList.Count > 7 + Main.menuSkip) + { + strArray1[6] = Language.GetTextValue("UI.More"); + strArray1[6] = "▼"; + numArray4[6] = 0.6f; + numArray1[6] += 8; + this.menuWide[6] = true; + } + if (Main.menuSkip > 0) + { + strArray1[0] = "▲"; + numArray4[0] = 0.6f; + numArray1[0] += 8; + this.menuWide[0] = true; + } + if (this.selectedMenu == 0 && Main.menuSkip > 0) + { + SoundEngine.PlaySound(12); + Main.menuSkip -= 5; + if (Main.menuSkip < 0) + { + Main.menuSkip = 0; + goto label_623; + } + else + goto label_623; + } + else if (this.selectedMenu == 6 && Main.menuSkip < Main.WorldList.Count - 7) + { + SoundEngine.PlaySound(12); + Main.menuSkip += 5; + if (Main.menuSkip >= Main.PlayerList.Count - 7) + { + Main.menuSkip = Main.WorldList.Count - 7; + goto label_623; + } + else + goto label_623; + } + else if (this.selectedMenu == 7 | flag5) + { + flag5 = false; + SoundEngine.PlaySound(11); + Main.menuMode = 6; + goto label_623; + } + else if (this.selectedMenu >= 0) + { + Main.selectedWorld = this.selectedMenu + Main.menuSkip; + SoundEngine.PlaySound(10); + Main.menuMode = 9; + goto label_623; + } + else + goto label_623; + case 9: + strArray1[0] = Lang.menu[46].Value + " " + Main.WorldList[Main.selectedWorld].Name + "?"; + flagArray1[0] = true; + strArray1[1] = Lang.menu[104].Value; + strArray1[2] = Lang.menu[105].Value; + num5 = 3; + if (this.selectedMenu == 1) + { + Main.EraseWorld(Main.selectedWorld); + SoundEngine.PlaySound(10); + Main.menuMode = 6; + goto label_623; + } + else if (this.selectedMenu == 2 | flag5) + { + SoundEngine.PlaySound(11); + Main.menuMode = 6; + goto label_623; + } + else + goto label_623; + case 10: + num5 = 1; + strArray1[0] = Main.statusText; + flagArray1[0] = true; + num2 = 300; + Main.gameTips.Update(); + Main.gameTips.Draw(); + goto label_623; + case 11: + num2 = 210; + num4 = 37; + num5 = 8; + numArray1[num5 - 1] = 8; + for (int index15 = 0; index15 < num5; ++index15) + numArray4[index15] = 0.75f; + int index16 = 0; + strArray1[index16] = Lang.menu[114].Value; + if (this.selectedMenu == index16) + { + SoundEngine.PlaySound(10); + Main.menuMode = 112; + } + int index17 = index16 + 1; + strArray1[index17] = Lang.menu[210].Value; + if (this.selectedMenu == index17) + { + SoundEngine.PlaySound(10); + Main.menuMode = 1112; + } + int index18 = index17 + 1; + strArray1[index18] = Lang.menu[63].Value; + if (this.selectedMenu == index18) + { + SoundEngine.PlaySound(10); + Main.menuMode = 1111; + } + int index19 = index18 + 1; + strArray1[index19] = Lang.menu[65].Value; + if (this.selectedMenu == index19) + { + SoundEngine.PlaySound(11); + Main.menuMode = 26; + } + int index20 = index19 + 1; + strArray1[index20] = Lang.menu[218].Value; + if (this.selectedMenu == index20) + { + SoundEngine.PlaySound(10); + Main.menuMode = 1125; + } + int index21 = index20 + 1; + strArray1[index21] = Lang.menu[219].Value; + if (this.selectedMenu == index21) + { + SoundEngine.PlaySound(10); + Main.menuMode = 1127; + } + int index22 = index21 + 1; + strArray1[index22] = Lang.menu[103].Value; + if (this.selectedMenu == index22) + { + SoundEngine.PlaySound(10); + Main.menuMode = 1213; + } + int index23 = index22 + 1; + strArray1[index23] = Lang.menu[5].Value; + if (this.selectedMenu == index23 | flag5) + { + flag5 = false; + SoundEngine.PlaySound(11); + Main.menuMode = 0; + Main.SaveSettings(); + goto label_623; + } + else + goto label_623; + case 12: + int num12 = SocialAPI.Network != null ? 1 : 0; + Main.menuServer = false; + strArray1[0] = Lang.menu[SocialAPI.Network != null ? 146 : 87].Value; + strArray1[1] = Lang.menu[145].Value; + strArray1[1 + num12] = Lang.menu[88].Value; + strArray1[2 + num12] = Lang.menu[5].Value; + if (this.selectedMenu == 0) + { + Main.LoadPlayers(); + Main.menuMultiplayer = true; + SoundEngine.PlaySound(10); + Main.ClearPendingPlayerSelectCallbacks(); + Main.menuMode = 1; + } + else if (this.selectedMenu == 1 + num12) + { + Main.LoadPlayers(); + SoundEngine.PlaySound(10); + Main.ClearPendingPlayerSelectCallbacks(); + Main.menuMode = 1; + Main.menuMultiplayer = true; + Main.menuServer = true; + } + else if (this.selectedMenu == 1) + { + SoundEngine.PlaySound(10); + SocialAPI.Friends.OpenJoinInterface(); + } + else if (this.selectedMenu == 2 + num12 | flag5) + { + flag5 = false; + SoundEngine.PlaySound(11); + Main.menuMode = 0; + } + num5 = 3 + num12; + goto label_623; + case 13: + string getIp1 = Main.getIP; + PlayerInput.WritingText = true; + flag5 = false; + Main.instance.HandleIME(); + Main.getIP = Main.GetInputText(Main.getIP); + string getIp2 = Main.getIP; + if (getIp1 != getIp2) + SoundEngine.PlaySound(12); + strArray1[0] = Lang.menu[89].Value; + flagArray2[9] = true; + if (Main.getIP != "") + { + if (Main.getIP.Substring(0, 1) == " ") + Main.getIP = ""; + for (int index24 = 0; index24 < Main.getIP.Length; ++index24) + { + if (Main.getIP != " ") + flagArray2[9] = false; + } + } + ++this.textBlinkerCount; + if (this.textBlinkerCount >= 20) + { + this.textBlinkerState = this.textBlinkerState != 0 ? 0 : 1; + this.textBlinkerCount = 0; + } + strArray1[1] = Main.getIP; + if (this.textBlinkerState == 1) + { + // ISSUE: explicit reference operation + ^ref strArray1[1] += "|"; + numArray2[1] = 1; + } + else + { + // ISSUE: explicit reference operation + ^ref strArray1[1] += " "; + } + flagArray1[0] = true; + flagArray1[1] = true; + numArray1[9] = 44; + numArray1[10] = 64; + strArray1[9] = Lang.menu[4].Value; + strArray1[10] = Lang.menu[5].Value; + num5 = 11; + num2 = 180; + num4 = 30; + numArray1[1] = 19; + for (int index25 = 2; index25 < 9; ++index25) + { + int index26 = index25 - 2; + if (Main.recentWorld[index26] != null && Main.recentWorld[index26] != "") + { + strArray1[index25] = Main.recentWorld[index26] + " (" + Main.recentIP[index26] + ":" + (object) Main.recentPort[index26] + ")"; + } + else + { + strArray1[index25] = ""; + flagArray1[index25] = true; + } + numArray4[index25] = 0.6f; + numArray1[index25] = 40; + } + if (this.selectedMenu >= 2 && this.selectedMenu < 9) + { + Main.autoPass = false; + int index27 = this.selectedMenu - 2; + Netplay.ListenPort = Main.recentPort[index27]; + Main.getIP = Main.recentIP[index27]; + Netplay.SetRemoteIPAsync(Main.getIP, new Action(Main.StartClientGameplay)); + Main.menuMode = 14; + Main.statusText = Language.GetTextValue("Net.ConnectingTo", (object) Main.getIP); + } + if (this.selectedMenu == 10 | flag5) + { + flag5 = false; + SoundEngine.PlaySound(11); + Main.menuMode = 1; + } + if (this.selectedMenu == 9 || !flagArray2[2] && Main.inputTextEnter) + { + SoundEngine.PlaySound(12); + Main.menuMode = 131; + Main.clrInput(); + goto label_623; + } + else + goto label_623; + case 14: + break; + case 15: + num5 = 2; + strArray1[0] = Main.statusText; + flagArray1[0] = true; + num2 = 80; + num4 = 400; + strArray1[1] = Lang.menu[5].Value; + if (this.selectedMenu == 1 | flag5) + { + flag5 = false; + Netplay.Disconnect = true; + SoundEngine.PlaySound(11); + Main.menuMode = 0; + Main.netMode = 0; + goto label_623; + } + else + goto label_623; + case 16: + num2 = 200; + num4 = 60; + numArray1[1] = 30; + numArray1[2] = 30; + numArray1[3] = 30; + numArray1[4] = 70; + strArray1[0] = Lang.menu[91].Value; + flagArray1[0] = true; + strArray1[1] = Lang.menu[92].Value; + strArray1[2] = Lang.menu[93].Value; + strArray1[3] = Lang.menu[94].Value; + strArray1[4] = Lang.menu[5].Value; + num5 = 5; + if (this.selectedMenu == 4 | flag5) + { + flag5 = false; + Main.menuMode = 6; + SoundEngine.PlaySound(11); + goto label_623; + } + else if (this.selectedMenu > 0) + { + if (this.selectedMenu == 1) + { + Main.maxTilesX = 4200; + Main.maxTilesY = 1200; + } + else if (this.selectedMenu == 2) + { + Main.maxTilesX = 6400; + Main.maxTilesY = 1800; + } + else + { + Main.maxTilesX = 8400; + Main.maxTilesY = 2400; + } + Main.clrInput(); + Main.menuMode = -7; + SoundEngine.PlaySound(10); + WorldGen.setWorldSize(); + goto label_623; + } + else + goto label_623; + case 17: + flag4 = true; + num6 = Main.screenWidth / 2 - 16; + num7 = 210; + flag1 = true; + num8 = 390; + num2 = 260; + num4 = 60; + Main.PendingPlayer.hairColor = Main.selColor; + num5 = 3; + strArray1[0] = Lang.menu[37].Value + " " + (object) (Main.PendingPlayer.hair + 1); + strArray1[1] = Lang.menu[38].Value; + flagArray1[1] = true; + numArray1[2] = 150; + numArray1[1] = 10; + strArray1[2] = Lang.menu[5].Value; + int num13 = 51; + if (this.focusMenu == 0) + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 9; + if (this.selectedMenu == 0) + { + SoundEngine.PlaySound(12); + ++Main.PendingPlayer.hair; + if (Main.PendingPlayer.hair >= num13) + Main.PendingPlayer.hair = 0; + } + else if (this.selectedMenu2 == 0) + { + SoundEngine.PlaySound(12); + --Main.PendingPlayer.hair; + if (Main.PendingPlayer.hair < 0) + Main.PendingPlayer.hair = num13 - 1; + } + if (this.selectedMenu == 2 | flag5) + { + flag5 = false; + Main.menuMode = 2; + SoundEngine.PlaySound(11); + goto label_623; + } + else + goto label_623; + case 18: + flag4 = true; + num6 = Main.screenWidth / 2 - 16; + num7 = 210; + flag1 = true; + num8 = 370; + num2 = 240; + num4 = 60; + Main.PendingPlayer.eyeColor = Main.selColor; + num5 = 3; + strArray1[0] = ""; + strArray1[1] = Lang.menu[39].Value; + flagArray1[1] = true; + numArray1[2] = 170; + numArray1[1] = 10; + strArray1[2] = Lang.menu[5].Value; + if (this.selectedMenu == 2 | flag5) + { + flag5 = false; + Main.menuMode = 2; + SoundEngine.PlaySound(11); + goto label_623; + } + else + goto label_623; + case 19: + flag4 = true; + num6 = Main.screenWidth / 2 - 16; + num7 = 210; + flag1 = true; + num8 = 370; + num2 = 240; + num4 = 60; + Main.PendingPlayer.skinColor = Main.selColor; + num5 = 3; + strArray1[0] = ""; + strArray1[1] = Lang.menu[40].Value; + flagArray1[1] = true; + numArray1[2] = 170; + numArray1[1] = 10; + strArray1[2] = Lang.menu[5].Value; + if (this.selectedMenu == 2 | flag5) + { + flag5 = false; + Main.menuMode = 2; + SoundEngine.PlaySound(11); + goto label_623; + } + else + goto label_623; + case 20: + flag4 = true; + if (this.selectedMenu == 0) + { + Main.menuMode = 21; + SoundEngine.PlaySound(10); + Main.selColor = Main.PendingPlayer.shirtColor; + } + if (this.selectedMenu == 1) + { + Main.menuMode = 22; + SoundEngine.PlaySound(10); + Main.selColor = Main.PendingPlayer.underShirtColor; + } + if (this.selectedMenu == 2) + { + Main.menuMode = 23; + SoundEngine.PlaySound(10); + Main.selColor = Main.PendingPlayer.pantsColor; + } + if (this.selectedMenu == 3) + { + Main.selColor = Main.PendingPlayer.shoeColor; + Main.menuMode = 24; + SoundEngine.PlaySound(10); + } + if (this.selectedMenu == 5 | flag5) + { + flag5 = false; + SoundEngine.PlaySound(11); + Main.menuMode = 2; + } + if (this.selectedMenu == 4) + { + SoundEngine.PlaySound(12); + Main.CycleClothingStyle(Main.PendingPlayer); + } + num6 = Main.screenWidth / 2 - 16; + num7 = 210; + num2 = 260; + num4 = 50; + num5 = 6; + strArray1[0] = Lang.menu[33].Value; + strArray1[1] = Lang.menu[34].Value; + strArray1[2] = Lang.menu[35].Value; + strArray1[3] = Lang.menu[36].Value; + strArray1[4] = Lang.menu[(int) sbyte.MaxValue].Value; + strArray1[5] = Lang.menu[5].Value; + numArray1[5] = 20; + goto label_623; + case 21: + flag4 = true; + num6 = Main.screenWidth / 2 - 16; + num7 = 210; + flag1 = true; + num8 = 370; + num2 = 240; + num4 = 60; + Main.PendingPlayer.shirtColor = Main.selColor; + num5 = 3; + strArray1[0] = ""; + strArray1[1] = Lang.menu[41].Value; + flagArray1[1] = true; + numArray1[2] = 170; + numArray1[1] = 10; + strArray1[2] = Lang.menu[5].Value; + if (this.selectedMenu == 2 | flag5) + { + flag5 = false; + Main.menuMode = 20; + SoundEngine.PlaySound(11); + goto label_623; + } + else + goto label_623; + case 22: + flag4 = true; + num6 = Main.screenWidth / 2 - 16; + num7 = 210; + flag1 = true; + num8 = 370; + num2 = 240; + num4 = 60; + Main.PendingPlayer.underShirtColor = Main.selColor; + num5 = 3; + strArray1[0] = ""; + strArray1[1] = Lang.menu[42].Value; + flagArray1[1] = true; + numArray1[2] = 170; + numArray1[1] = 10; + strArray1[2] = Lang.menu[5].Value; + if (this.selectedMenu == 2 | flag5) + { + flag5 = false; + Main.menuMode = 20; + SoundEngine.PlaySound(11); + goto label_623; + } + else + goto label_623; + case 23: + flag4 = true; + num6 = Main.screenWidth / 2 - 16; + num7 = 210; + flag1 = true; + num8 = 370; + num2 = 240; + num4 = 60; + Main.PendingPlayer.pantsColor = Main.selColor; + num5 = 3; + strArray1[0] = ""; + strArray1[1] = Lang.menu[43].Value; + flagArray1[1] = true; + numArray1[2] = 170; + numArray1[1] = 10; + strArray1[2] = Lang.menu[5].Value; + if (this.selectedMenu == 2 | flag5) + { + flag5 = false; + Main.menuMode = 20; + SoundEngine.PlaySound(11); + goto label_623; + } + else + goto label_623; + case 24: + flag4 = true; + num6 = Main.screenWidth / 2 - 16; + num7 = 210; + flag1 = true; + num8 = 370; + num2 = 240; + num4 = 60; + Main.PendingPlayer.shoeColor = Main.selColor; + num5 = 3; + strArray1[0] = ""; + strArray1[1] = Lang.menu[44].Value; + flagArray1[1] = true; + numArray1[2] = 170; + numArray1[1] = 10; + strArray1[2] = Lang.menu[5].Value; + if (this.selectedMenu == 2 | flag5) + { + flag5 = false; + Main.menuMode = 20; + SoundEngine.PlaySound(11); + goto label_623; + } + else + goto label_623; + case 25: + flag1 = true; + num8 = 320; + num2 = 200; + num4 = 10; + Main.mouseColor = Main.selColor; + Main.mouseColorSlider.SetHSL(Main.mouseColor); + num5 = 3; + strArray1[0] = ""; + strArray1[1] = Lang.menu[64].Value; + flagArray1[1] = true; + numArray1[2] = 250; + numArray1[1] = 10; + strArray1[2] = Lang.menu[5].Value; + if (this.selectedMenu == 2 | flag5) + { + flag5 = false; + Main.menuMode = 1125; + SoundEngine.PlaySound(11); + goto label_623; + } + else + goto label_623; + case 26: + flag2 = true; + num2 = 200; + num4 = 10; + num5 = 3; + strArray1[0] = ""; + strArray1[1] = Lang.menu[65].Value; + flagArray1[1] = true; + numArray1[2] = 250; + numArray1[1] = 10; + strArray1[2] = Lang.menu[5].Value; + if (this.selectedMenu == 2 | flag5) + { + flag5 = false; + Main.menuMode = 11; + SoundEngine.PlaySound(11); + goto label_623; + } + else + goto label_623; + case 27: + num2 = 176; + num4 = 22; + num5 = 16; + string[] strArray2 = new string[14] + { + Main.cUp, + Main.cDown, + Main.cLeft, + Main.cRight, + Main.cJump, + Main.cThrowItem, + Main.cInv, + Main.cHeal, + Main.cMana, + Main.cBuff, + Main.cHook, + Main.cTorch, + Main.cSmart, + Main.cMount + }; + if (Main.setKey >= 0) + strArray2[Main.setKey] = "_"; + strArray1[0] = Lang.menu[74].Value + strArray2[0]; + strArray1[1] = Lang.menu[75].Value + strArray2[1]; + strArray1[2] = Lang.menu[76].Value + strArray2[2]; + strArray1[3] = Lang.menu[77].Value + strArray2[3]; + strArray1[4] = Lang.menu[78].Value + strArray2[4]; + strArray1[5] = Lang.menu[79].Value + strArray2[5]; + strArray1[6] = Lang.menu[80].Value + strArray2[6]; + strArray1[7] = Lang.menu[81].Value + strArray2[7]; + strArray1[8] = Lang.menu[82].Value + strArray2[8]; + strArray1[9] = Lang.menu[83].Value + strArray2[9]; + strArray1[10] = Lang.menu[84].Value + strArray2[10]; + strArray1[11] = Lang.menu[85].Value + strArray2[11]; + strArray1[12] = Lang.menu[120].Value + strArray2[12]; + strArray1[13] = Lang.menu[130].Value + strArray2[13]; + for (int index28 = 0; index28 < 14; ++index28) + { + flagArray4[index28] = true; + numArray4[index28] = 0.45f; + numArray2[index28] = -80; + } + numArray4[14] = 0.8f; + numArray1[14] = 6; + strArray1[14] = Lang.menu[86].Value; + numArray4[15] = 0.8f; + numArray1[15] = 16; + strArray1[15] = Lang.menu[5].Value; + if (this.selectedMenu == 15 | flag5) + { + flag5 = false; + Main.menuMode = 11; + SoundEngine.PlaySound(11); + } + else if (this.selectedMenu == 14) + { + Main.ResetKeyBindings(); + Main.setKey = -1; + SoundEngine.PlaySound(11); + } + else if (this.selectedMenu >= 0) + Main.setKey = this.selectedMenu; + if (Main.setKey >= 0) + { + List pressedKeys = PlayerInput.GetPressedKeys(); + if (pressedKeys.Count > 0) + { + string str = string.Concat((object) pressedKeys[0]); + if (str != "None") + { + if (Main.setKey == 0) + Main.cUp = str; + if (Main.setKey == 1) + Main.cDown = str; + if (Main.setKey == 2) + Main.cLeft = str; + if (Main.setKey == 3) + Main.cRight = str; + if (Main.setKey == 4) + Main.cJump = str; + if (Main.setKey == 5) + Main.cThrowItem = str; + if (Main.setKey == 6) + Main.cInv = str; + if (Main.setKey == 7) + Main.cHeal = str; + if (Main.setKey == 8) + Main.cMana = str; + if (Main.setKey == 9) + Main.cBuff = str; + if (Main.setKey == 10) + Main.cHook = str; + if (Main.setKey == 11) + Main.cTorch = str; + if (Main.setKey == 12) + Main.cSmart = str; + if (Main.setKey == 13) + Main.cMount = str; + Main.setKey = -1; + goto label_623; + } + else + goto label_623; + } + else + goto label_623; + } + else + goto label_623; + case 28: + Main.caveParallax = (float) (1.0 - (double) Main.bgScroll / 500.0); + flag3 = true; + num2 = 240; + num4 = 60; + num5 = 3; + strArray1[0] = ""; + strArray1[1] = Lang.menu[52].Value; + flagArray1[1] = true; + numArray1[2] = 170; + numArray1[1] = 10; + strArray1[2] = Lang.menu[5].Value; + if (this.selectedMenu == 2 | flag5) + { + flag5 = false; + Main.menuMode = 1111; + SoundEngine.PlaySound(11); + goto label_623; + } + else + goto label_623; + case 30: + string serverPassword3 = Netplay.ServerPassword; + PlayerInput.WritingText = true; + flag5 = false; + Main.instance.HandleIME(); + Netplay.ServerPassword = Main.GetInputText(Netplay.ServerPassword); + string serverPassword4 = Netplay.ServerPassword; + if (serverPassword3 != serverPassword4) + SoundEngine.PlaySound(12); + strArray1[0] = Lang.menu[7].Value; + ++this.textBlinkerCount; + if (this.textBlinkerCount >= 20) + { + this.textBlinkerState = this.textBlinkerState != 0 ? 0 : 1; + this.textBlinkerCount = 0; + } + strArray1[1] = Netplay.ServerPassword; + if (Main.HidePassword) + { + strArray1[1] = ""; + for (int index29 = 0; index29 < Netplay.ServerPassword.Length; ++index29) + { + // ISSUE: explicit reference operation + ^ref strArray1[1] += "*"; + } + } + if (this.textBlinkerState == 1) + { + // ISSUE: explicit reference operation + ^ref strArray1[1] += "|"; + numArray2[1] = 1; + } + else + { + // ISSUE: explicit reference operation + ^ref strArray1[1] += " "; + } + flagArray1[0] = true; + flagArray1[1] = true; + numArray1[1] = -20; + numArray1[2] = 20; + strArray1[2] = Lang.menu[4].Value; + strArray1[3] = Lang.menu[5].Value; + num5 = 4; + if (this.selectedMenu == 3 | flag5) + { + flag5 = false; + Main.menuMode = SocialAPI.Network == null ? 6 : 889; + Netplay.ServerPassword = ""; + goto label_623; + } + else if (this.selectedMenu == 2 || Main.inputTextEnter || Main.autoPass) + { + string str1 = "-autoshutdown -password \"" + Main.ConvertToSafeArgument(Netplay.ServerPassword) + "\" -lang " + (object) Language.ActiveCulture.LegacyId; + string str2 = (!Main.ActiveWorldFileData.IsCloudSave ? (object) (str1 + " -world \"" + Main.worldPathName + "\"") : (object) (str1 + " -cloudworld \"" + Main.worldPathName + "\"")).ToString() + " -worldrollbackstokeep " + (object) Main.WorldRollingBackupsCountToKeep; + Main.tServer = new Process(); + Main.tServer.StartInfo.FileName = "TerrariaServer.exe"; + Main.tServer.StartInfo.Arguments = str2; + if (Main.libPath != "") + { + ProcessStartInfo startInfo = Main.tServer.StartInfo; + startInfo.Arguments = startInfo.Arguments + " -loadlib " + Main.libPath; + } + Main.tServer.StartInfo.UseShellExecute = false; + Main.tServer.StartInfo.CreateNoWindow = true; + if (SocialAPI.Network != null) + SocialAPI.Network.LaunchLocalServer(Main.tServer, Main.MenuServerMode); + else + Main.tServer.Start(); + Netplay.SetRemoteIP("127.0.0.1"); + Main.autoPass = true; + Main.statusText = Lang.menu[8].Value; + Netplay.StartTcpClient(); + Main.menuMode = 10; + goto label_623; + } + else + goto label_623; + case 100: + num5 = 1; + strArray1[0] = Main.statusText; + flagArray1[0] = true; + num2 = 300; + goto label_623; + case 111: + for (int index30 = 0; index30 < 9; ++index30) + numArray4[index30] = 0.85f; + num2 = 210; + num4 = 55; + int index31 = 0; + strArray1[index31] = Lang.menu[73].Value + ": " + (object) Main.PendingResolutionWidth + "x" + (object) Main.PendingResolutionHeight; + if (this.selectedMenu == index31) + { + SoundEngine.PlaySound(12); + int num14 = 0; + for (int index32 = 0; index32 < Main.numDisplayModes; ++index32) + { + if (Main.displayWidth[index32] == Main.PendingResolutionWidth && Main.displayHeight[index32] == Main.PendingResolutionHeight) + { + num14 = index32; + break; + } + } + int index33 = (num14 + 1) % Main.numDisplayModes; + Main.PendingResolutionWidth = Main.displayWidth[index33]; + Main.PendingResolutionHeight = Main.displayHeight[index33]; + } + int index34 = index31 + 1; + if (Main.IsBorderlessDisplayAvailable()) + { + strArray1[index34] = Lang.menu[Main.PendingBorderlessState ? 245 : 246].Value; + if (this.selectedMenu == index34) + { + SoundEngine.PlaySound(12); + Main.PendingBorderlessState = !Main.PendingBorderlessState; + } + ++index34; + } + numArray1[index34] = 100; + strArray1[index34] = Lang.menu[134].Value; + if (this.selectedMenu == index34) + { + if (Main.graphics.IsFullScreen || Main.PendingBorderlessState != Main.screenBorderless || Main.PendingResolutionWidth != Main.screenWidth || Main.PendingResolutionHeight != Main.screenHeight) + { + Main.screenBorderless = Main.PendingBorderlessState; + Main.screenBorderlessPendingResizes = Main.screenBorderless ? 6 : 0; + Main.SetResolution(Main.PendingResolutionWidth, Main.PendingResolutionHeight); + } + SoundEngine.PlaySound(11); + Main.menuMode = 1111; + } + int index35 = index34 + 1; + strArray1[index35] = Lang.menu[5].Value; + numArray1[index35] = 100; + if (this.selectedMenu == index35 | flag5) + { + flag5 = false; + Main.PendingResolutionWidth = Main.graphics.PreferredBackBufferWidth; + Main.PendingResolutionHeight = Main.graphics.PreferredBackBufferHeight; + Main.PendingBorderlessState = Main.screenBorderless; + Main.menuMode = 1111; + SoundEngine.PlaySound(11); + } + num5 = index35 + 1; + goto label_623; + case 112: + num2 = 250; + num4 = 52; + num5 = 5; + numArray1[num5 - 1] = 18; + for (int index36 = 0; index36 < num5; ++index36) + numArray4[index36] = 0.78f; + int index37 = 0; + strArray1[index37] = !Main.autoSave ? Lang.menu[68].Value : Lang.menu[67].Value; + if (this.selectedMenu == index37) + { + SoundEngine.PlaySound(12); + Main.autoSave = !Main.autoSave; + } + int index38 = index37 + 1; + strArray1[index38] = !Main.autoPause ? Lang.menu[70].Value : Lang.menu[69].Value; + if (this.selectedMenu == index38) + { + SoundEngine.PlaySound(12); + Main.autoPause = !Main.autoPause; + } + int index39 = index38 + 1; + strArray1[index39] = !Main.mapEnabled ? Lang.menu[113].Value : Lang.menu[112].Value; + if (this.selectedMenu == index39) + { + SoundEngine.PlaySound(12); + Main.mapEnabled = !Main.mapEnabled; + } + int index40 = index39 + 1; + strArray1[index40] = Main.HidePassword ? Lang.menu[212].Value : Lang.menu[211].Value; + if (this.selectedMenu == index40) + { + SoundEngine.PlaySound(12); + Main.HidePassword = !Main.HidePassword; + } + int index41 = index40 + 1; + strArray1[index41] = Lang.menu[5].Value; + if (this.selectedMenu == index41 | flag5) + { + flag5 = false; + Main.menuMode = 11; + SoundEngine.PlaySound(11); + goto label_623; + } + else + goto label_623; + case 131: + int num15 = 7777; + PlayerInput.WritingText = true; + flag5 = false; + Main.instance.HandleIME(); + string getPort1 = Main.getPort; + Main.getPort = Main.GetInputText(Main.getPort); + string getPort2 = Main.getPort; + if (getPort1 != getPort2) + SoundEngine.PlaySound(12); + strArray1[0] = Lang.menu[90].Value; + flagArray2[2] = true; + if (Main.getPort != "") + { + bool flag7 = false; + try + { + num15 = Convert.ToInt32(Main.getPort); + if (num15 > 0) + { + if (num15 <= (int) ushort.MaxValue) + flag7 = true; + } + } + catch + { + } + if (flag7) + flagArray2[2] = false; + } + ++this.textBlinkerCount; + if (this.textBlinkerCount >= 20) + { + this.textBlinkerState = this.textBlinkerState != 0 ? 0 : 1; + this.textBlinkerCount = 0; + } + strArray1[1] = Main.getPort; + if (this.textBlinkerState == 1) + { + // ISSUE: explicit reference operation + ^ref strArray1[1] += "|"; + numArray2[1] = 1; + } + else + { + // ISSUE: explicit reference operation + ^ref strArray1[1] += " "; + } + flagArray1[0] = true; + flagArray1[1] = true; + numArray1[1] = -20; + numArray1[2] = 20; + strArray1[2] = Lang.menu[4].Value; + strArray1[3] = Lang.menu[5].Value; + num5 = 4; + if (this.selectedMenu == 3 | flag5) + { + flag5 = false; + SoundEngine.PlaySound(11); + Main.menuMode = 1; + } + if (this.selectedMenu == 2 || !flagArray2[2] && Main.inputTextEnter) + { + Netplay.ListenPort = num15; + Main.autoPass = false; + Netplay.SetRemoteIPAsync(Main.getIP, new Action(Main.StartClientGameplay)); + Main.menuMode = 14; + Main.statusText = Language.GetTextValue("Net.ConnectingTo", (object) Main.getIP); + goto label_623; + } + else + goto label_623; + case 200: + num5 = 3; + strArray1[0] = Lang.menu[9].Value; + flagArray1[0] = true; + num2 -= 30; + numArray1[1] = 70; + numArray1[2] = 50; + strArray1[1] = Lang.menu[10].Value; + strArray1[2] = Lang.menu[6].Value; + if (this.selectedMenu == 1) + { + if (FileUtilities.Exists(Main.worldPathName + ".bak", Main.ActiveWorldFileData.IsCloudSave)) + { + FileUtilities.Move(Main.worldPathName, Main.worldPathName + ".bad", Main.ActiveWorldFileData.IsCloudSave); + FileUtilities.Move(Main.worldPathName + ".bak", Main.worldPathName, Main.ActiveWorldFileData.IsCloudSave); + SoundEngine.PlaySound(10); + WorldGen.playWorld(); + Main.menuMode = 10; + } + else + { + SoundEngine.PlaySound(11); + Main.menuMode = 0; + Main.netMode = 0; + } + } + if (this.selectedMenu == 2 | flag5) + { + flag5 = false; + SoundEngine.PlaySound(11); + Main.menuMode = 0; + Main.netMode = 0; + goto label_623; + } + else + goto label_623; + case 201: + num5 = 3; + strArray1[0] = Lang.menu[9].Value; + flagArray1[0] = true; + flagArray1[1] = true; + num2 -= 30; + numArray1[1] = -30; + numArray1[2] = 50; + strArray1[1] = Lang.menu[11].Value; + strArray1[2] = Lang.menu[5].Value; + if (this.selectedMenu == 2 | flag5) + { + flag5 = false; + SoundEngine.PlaySound(11); + Main.menuMode = 0; + Main.netMode = 0; + goto label_623; + } + else + goto label_623; + case 222: + strArray1[0] = this.focusMenu != 3 ? (this.focusMenu != 2 ? (this.focusMenu != 1 ? Lang.menu[32].Value : Lang.menu[31].Value) : Lang.menu[30].Value) : Lang.menu[29].Value; + num4 = 50; + numArray1[1] = 25; + numArray1[2] = 25; + numArray1[3] = 25; + flagArray1[0] = true; + strArray1[1] = Lang.menu[26].Value; + strArray1[2] = Lang.menu[25].Value; + numArray3[2] = (byte) 1; + strArray1[3] = Lang.menu[24].Value; + numArray3[3] = (byte) 2; + num5 = 4; + if (this.selectedMenu == 1) + { + Main.PendingPlayer.difficulty = (byte) 0; + Main.menuMode = 2; + goto label_623; + } + else if (this.selectedMenu == 2) + { + Main.menuMode = 2; + Main.PendingPlayer.difficulty = (byte) 1; + goto label_623; + } + else if (this.selectedMenu == 3) + { + Main.PendingPlayer.difficulty = (byte) 2; + Main.menuMode = 2; + goto label_623; + } + else + goto label_623; + case 252: + flag1 = true; + num8 = 320; + num2 = 200; + num4 = 10; + Main.MouseBorderColor = Main.selColor; + Main.mouseBorderColorSlider.SetHSL(Main.mouseColor); + num5 = 3; + strArray1[0] = ""; + strArray1[1] = Lang.menu[217].Value; + flagArray1[1] = true; + numArray1[2] = 250; + numArray1[1] = 10; + strArray1[2] = Lang.menu[5].Value; + if (this.selectedMenu == 2 | flag5) + { + flag5 = false; + Main.menuMode = 1125; + SoundEngine.PlaySound(11); + goto label_623; + } + else + goto label_623; + case 882: + num5 = 2; + flagArray1[0] = true; + num2 = 300; + strArray1[0] = Main.statusText; + strArray1[1] = Lang.menu[6].Value; + if (this.selectedMenu == 1 | flag5) + { + flag5 = false; + SoundEngine.PlaySound(11); + Main.menuMode = 0; + Main.netMode = 0; + if (SocialAPI.Network != null) + { + SocialAPI.Network.CancelJoin(); + goto label_623; + } + else + goto label_623; + } + else + goto label_623; + case 889: + num2 = 200; + num4 = 60; + numArray1[1] = 30; + numArray1[2] = 30; + numArray1[3] = 30; + numArray1[4] = 70; + numArray1[5] = 70; + num5 = 6; + strArray1[0] = Lang.menu[135].Value; + strArray1[4] = Lang.menu[144].Value; + strArray1[5] = Lang.menu[5].Value; + flagArray1[0] = true; + if (!Main.MenuServerMode.HasFlag((Enum) ServerMode.Lobby)) + { + Main.MenuServerMode = ServerMode.None; + flagArray1[2] = true; + flagArray1[3] = true; + strArray1[1] = Lang.menu[136].Value; + strArray1[2] = ""; + strArray1[3] = ""; + } + else + { + strArray1[1] = Lang.menu[137].Value; + if (Main.MenuServerMode.HasFlag((Enum) ServerMode.FriendsCanJoin)) + { + strArray1[2] = Lang.menu[139].Value; + strArray1[3] = !Main.MenuServerMode.HasFlag((Enum) ServerMode.FriendsOfFriends) ? Lang.menu[142].Value : Lang.menu[143].Value; + } + else + { + strArray1[2] = Lang.menu[138].Value; + strArray1[3] = !Main.MenuServerMode.HasFlag((Enum) ServerMode.FriendsOfFriends) ? Lang.menu[140].Value : Lang.menu[141].Value; + } + } + if (flag5) + { + flag5 = false; + this.selectedMenu = 5; + } + switch (this.selectedMenu) + { + case 1: + Main.MenuServerMode ^= ServerMode.Lobby; + SoundEngine.PlaySound(12); + goto label_623; + case 2: + Main.MenuServerMode ^= ServerMode.FriendsCanJoin; + SoundEngine.PlaySound(12); + goto label_623; + case 3: + Main.MenuServerMode ^= ServerMode.FriendsOfFriends; + SoundEngine.PlaySound(12); + goto label_623; + case 4: + Main.clrInput(); + Netplay.ServerPassword = ""; + Main.GetInputText(""); + Main.autoPass = false; + Main.menuMode = 30; + SoundEngine.PlaySound(10); + goto label_623; + case 5: + Main.menuMode = 6; + SoundEngine.PlaySound(11); + goto label_623; + default: + goto label_623; + } + case 1111: + Main.bgScroll = (int) Math.Round((1.0 - (double) Main.caveParallax) * 500.0); + int index42 = 0; + strArray1[index42] = Main.graphics.IsFullScreen ? Lang.menu[49].Value : Lang.menu[50].Value; + if (this.selectedMenu == index42) + Main.ToggleFullScreen(); + int index43 = index42 + 1; + strArray1[index43] = Lang.menu[51].Value; + if (this.selectedMenu == index43) + { + SoundEngine.PlaySound(10); + Main.menuMode = 111; + } + int index44 = index43 + 1; + strArray1[index44] = Lang.menu[52].Value; + if (this.selectedMenu == index44) + { + SoundEngine.PlaySound(11); + Main.menuMode = 28; + } + int index45 = index44 + 1; + strArray1[index45] = Lang.menu[247 + Main.FrameSkipMode].Value; + if (this.selectedMenu == index45) + { + SoundEngine.PlaySound(12); + ++Main.FrameSkipMode; + if (Main.FrameSkipMode < 0 || Main.FrameSkipMode > 2) + Main.FrameSkipMode = 0; + } + int index46 = index45 + 1; + strArray1[index46] = Language.GetTextValue("UI.LightMode_" + (object) Lighting.Mode); + if (this.selectedMenu == index46) + { + SoundEngine.PlaySound(12); + Lighting.NextLightMode(); + } + int index47 = index46 + 1; + switch (Main.qaStyle) + { + case 0: + strArray1[index47] = Lang.menu[59].Value; + break; + case 1: + strArray1[index47] = Lang.menu[60].Value; + break; + case 2: + strArray1[index47] = Lang.menu[61].Value; + break; + default: + strArray1[index47] = Lang.menu[62].Value; + break; + } + if (this.selectedMenu == index47) + { + SoundEngine.PlaySound(12); + if (++Main.qaStyle > 3) + Main.qaStyle = 0; + } + int index48 = index47 + 1; + strArray1[index48] = Main.BackgroundEnabled ? Lang.menu[100].Value : Lang.menu[101].Value; + if (this.selectedMenu == index48) + { + SoundEngine.PlaySound(12); + Main.BackgroundEnabled = !Main.BackgroundEnabled; + } + int index49 = index48 + 1; + strArray1[index49] = ChildSafety.Disabled ? Lang.menu[132].Value : Lang.menu[133].Value; + if (this.selectedMenu == index49) + { + SoundEngine.PlaySound(12); + ChildSafety.Disabled = !ChildSafety.Disabled; + } + int index50 = index49 + 1; + strArray1[index50] = Main.SettingsEnabled_MinersWobble ? Lang.menu[250].Value : Lang.menu[251].Value; + if (this.selectedMenu == index50) + { + SoundEngine.PlaySound(12); + Main.SettingsEnabled_MinersWobble = !Main.SettingsEnabled_MinersWobble; + } + int index51 = index50 + 1; + strArray1[index51] = Main.SettingsEnabled_TilesSwayInWind ? Language.GetTextValue("UI.TilesSwayInWindOn") : Language.GetTextValue("UI.TilesSwayInWindOff"); + if (this.selectedMenu == index51) + { + SoundEngine.PlaySound(12); + Main.SettingsEnabled_TilesSwayInWind = !Main.SettingsEnabled_TilesSwayInWind; + } + int index52 = index51 + 1; + strArray1[index52] = Language.GetTextValue("UI.Effects"); + if (this.selectedMenu == index52) + { + SoundEngine.PlaySound(11); + Main.menuMode = 2008; + } + int num16 = index52; + int index53 = num16; + strArray1[index53] = Lang.menu[5].Value; + numArray1[index53] = 8; + if (this.selectedMenu == index53 | flag5) + { + flag5 = false; + SoundEngine.PlaySound(11); + Main.SaveSettings(); + Main.menuMode = 11; + } + num2 = 186; + num4 = 30; + num5 = index53 + 1; + for (int index54 = 0; index54 < num16; ++index54) + numArray4[index54] = 0.6f; + goto label_623; + case 1112: + num2 = 210; + num4 = 36; + num5 = 9; + numArray1[num5 - 1] = 18; + for (int index55 = 0; index55 < num5; ++index55) + numArray4[index55] = 0.75f; + int index56 = 0; + strArray1[index56] = !Main.showItemText ? Lang.menu[72].Value : Lang.menu[71].Value; + if (this.selectedMenu == index56) + { + SoundEngine.PlaySound(12); + Main.showItemText = !Main.showItemText; + } + int index57 = index56 + 1; + strArray1[index57] = Lang.menu[123].Value + " " + Lang.menu[124 + Main.invasionProgressMode].Value; + if (this.selectedMenu == index57) + { + SoundEngine.PlaySound(12); + ++Main.invasionProgressMode; + if (Main.invasionProgressMode >= 3) + Main.invasionProgressMode = 0; + } + int index58 = index57 + 1; + strArray1[index58] = Main.placementPreview ? Lang.menu[128].Value : Lang.menu[129].Value; + if (this.selectedMenu == index58) + { + SoundEngine.PlaySound(12); + Main.placementPreview = !Main.placementPreview; + } + int index59 = index58 + 1; + strArray1[index59] = ItemSlot.Options.HighlightNewItems ? Lang.inter[117].Value : Lang.inter[116].Value; + if (this.selectedMenu == index59) + { + SoundEngine.PlaySound(12); + ItemSlot.Options.HighlightNewItems = !ItemSlot.Options.HighlightNewItems; + } + int index60 = index59 + 1; + strArray1[index60] = Main.MouseShowBuildingGrid ? Lang.menu[229].Value : Lang.menu[230].Value; + if (this.selectedMenu == index60) + { + SoundEngine.PlaySound(12); + Main.MouseShowBuildingGrid = !Main.MouseShowBuildingGrid; + } + int index61 = index60 + 1; + strArray1[index61] = Main.GamepadDisableInstructionsDisplay ? Lang.menu[241].Value : Lang.menu[242].Value; + if (this.selectedMenu == index61) + { + SoundEngine.PlaySound(12); + Main.GamepadDisableInstructionsDisplay = !Main.GamepadDisableInstructionsDisplay; + } + int index62 = index61 + 1; + string str3 = ""; + MinimapFrame minimapFrame1 = (MinimapFrame) null; + foreach (KeyValuePair minimapFrame2 in Main.MinimapFrames) + { + MinimapFrame minimapFrame3 = minimapFrame2.Value; + if (minimapFrame3 == Main.ActiveMinimapFrame) + { + str3 = Language.GetTextValue("UI.MinimapFrame_" + minimapFrame2.Key); + break; + } + minimapFrame1 = minimapFrame3; + } + if (minimapFrame1 == null) + minimapFrame1 = Main.MinimapFrames.Values.Last(); + strArray1[index62] = Language.GetTextValue("UI.SelectMapBorder", (object) str3); + if (this.selectedMenu == index62) + Main.ActiveMinimapFrame = minimapFrame1; + int index63 = index62 + 1; + string str4 = ""; + IPlayerResourcesDisplaySet resourcesDisplaySet1 = (IPlayerResourcesDisplaySet) null; + foreach (KeyValuePair playerResourcesSet in Main.PlayerResourcesSets) + { + IPlayerResourcesDisplaySet resourcesDisplaySet2 = playerResourcesSet.Value; + if (resourcesDisplaySet2 == Main.ActivePlayerResourcesSet) + { + str4 = Language.GetTextValue("UI.HealthManaStyle_" + playerResourcesSet.Key); + break; + } + resourcesDisplaySet1 = resourcesDisplaySet2; + } + if (resourcesDisplaySet1 == null) + resourcesDisplaySet1 = Main.PlayerResourcesSets.Values.Last(); + strArray1[index63] = Language.GetTextValue("UI.SelectHealthStyle", (object) str4); + if (this.selectedMenu == index63) + Main.ActivePlayerResourcesSet = resourcesDisplaySet1; + int index64 = index63 + 1; + strArray1[index64] = Lang.menu[5].Value; + if (this.selectedMenu == index64 | flag5) + { + flag5 = false; + Main.menuMode = 11; + SoundEngine.PlaySound(11); + goto label_623; + } + else + goto label_623; + case 1125: + num2 = 232; + num4 = 38; + num5 = 7; + numArray1[num5 - 1] = 18; + for (int index65 = 0; index65 < num5; ++index65) + numArray4[index65] = 0.73f; + int index66 = 0; + strArray1[index66] = Lang.menu[64].Value; + if (this.selectedMenu == index66) + { + SoundEngine.PlaySound(10); + Main.selColor = Main.mouseColor; + Main.mouseColorSlider.SetHSL(Main.mouseColor); + Main.menuMode = 25; + } + int index67 = index66 + 1; + strArray1[index67] = Lang.menu[217].Value; + if (this.selectedMenu == index67) + { + SoundEngine.PlaySound(10); + Main.selColor = Main.MouseBorderColor; + Main.mouseBorderColorSlider.SetHSL(Main.mouseColor); + Main.menuMode = 252; + } + int index68 = index67 + 1; + strArray1[index68] = Main.cSmartCursorModeIsToggleAndNotHold ? Lang.menu[121].Value : Lang.menu[122].Value; + if (this.selectedMenu == index68) + { + SoundEngine.PlaySound(12); + Main.cSmartCursorModeIsToggleAndNotHold = !Main.cSmartCursorModeIsToggleAndNotHold; + } + int index69 = index68 + 1; + strArray1[index69] = Player.SmartCursorSettings.SmartAxeAfterPickaxe ? Lang.menu[214].Value : Lang.menu[213].Value; + if (this.selectedMenu == index69) + { + SoundEngine.PlaySound(12); + Player.SmartCursorSettings.SmartAxeAfterPickaxe = !Player.SmartCursorSettings.SmartAxeAfterPickaxe; + } + int index70 = index69 + 1; + strArray1[index70] = Player.SmartCursorSettings.SmartBlocksEnabled ? Lang.menu[215].Value : Lang.menu[216].Value; + if (this.selectedMenu == index70) + { + SoundEngine.PlaySound(12); + Player.SmartCursorSettings.SmartBlocksEnabled = !Player.SmartCursorSettings.SmartBlocksEnabled; + } + int index71 = index70 + 1; + switch (LockOnHelper.UseMode) + { + case LockOnHelper.LockOnMode.FocusTarget: + strArray1[index71] = Lang.menu[232].Value; + break; + case LockOnHelper.LockOnMode.TargetClosest: + strArray1[index71] = Lang.menu[233].Value; + break; + case LockOnHelper.LockOnMode.ThreeDS: + strArray1[index71] = Lang.menu[234].Value; + break; + } + if (this.selectedMenu == index71) + { + SoundEngine.PlaySound(12); + LockOnHelper.CycleUseModes(); + } + int index72 = index71 + 1; + strArray1[index72] = Lang.menu[5].Value; + if (this.selectedMenu == index72 | flag5) + { + flag5 = false; + Main.menuMode = 11; + SoundEngine.PlaySound(11); + goto label_623; + } + else + goto label_623; + case 1127: + num2 = 250; + num4 = 52; + num5 = 4; + numArray1[num5 - 1] = 18; + for (int index73 = 0; index73 < num5; ++index73) + numArray4[index73] = 0.78f; + int index74 = 0; + strArray1[index74] = Main.ReversedUpDownArmorSetBonuses ? Lang.menu[220].Value : Lang.menu[221].Value; + if (this.selectedMenu == index74) + { + SoundEngine.PlaySound(12); + Main.ReversedUpDownArmorSetBonuses = !Main.ReversedUpDownArmorSetBonuses; + } + int index75 = index74 + 1; + strArray1[index75] = ItemSlot.Options.DisableLeftShiftTrashCan ? Lang.menu[224].Value : Lang.menu[223].Value; + if (this.selectedMenu == index75) + { + SoundEngine.PlaySound(12); + ItemSlot.Options.DisableLeftShiftTrashCan = !ItemSlot.Options.DisableLeftShiftTrashCan; + } + int index76 = index75 + 1; + strArray1[index76] = Lang.menu[222].Value; + if (this.selectedMenu == index76) + { + SoundEngine.PlaySound(10); + Main.MenuUI.SetState((UIState) Main.ManageControlsMenu); + Main.menuMode = 888; + } + int index77 = index76 + 1; + strArray1[index77] = Lang.menu[5].Value; + if (this.selectedMenu == index77 | flag5) + { + flag5 = false; + Main.menuMode = 11; + SoundEngine.PlaySound(11); + goto label_623; + } + else + goto label_623; + case 2008: + num2 = 240; + num4 = 60; + num5 = 6; + strArray1[0] = ""; + strArray1[1] = Language.GetTextValue("UI.Effects"); + flagArray1[1] = true; + numArray1[1] = 10; + strArray1[2] = Language.GetTextValue("GameUI.StormEffects", Main.UseStormEffects ? (object) Language.GetTextValue("GameUI.Enabled") : (object) Language.GetTextValue("GameUI.Disabled")); + numArray4[2] = 0.8f; + strArray1[3] = Language.GetTextValue("GameUI.HeatDistortion", Main.UseHeatDistortion ? (object) Language.GetTextValue("GameUI.Enabled") : (object) Language.GetTextValue("GameUI.Disabled")); + numArray4[3] = 0.8f; + string textValue; + switch (Main.WaveQuality) + { + case 1: + textValue = Language.GetTextValue("GameUI.QualityLow"); + break; + case 2: + textValue = Language.GetTextValue("GameUI.QualityMedium"); + break; + case 3: + textValue = Language.GetTextValue("GameUI.QualityHigh"); + break; + default: + textValue = Language.GetTextValue("GameUI.QualityOff"); + break; + } + strArray1[4] = Language.GetTextValue("GameUI.WaveQuality", (object) textValue); + numArray4[4] = 0.8f; + strArray1[5] = Lang.menu[5].Value; + if (this.selectedMenu == 2) + Main.UseStormEffects = !Main.UseStormEffects; + if (this.selectedMenu == 3) + Main.UseHeatDistortion = !Main.UseHeatDistortion; + if (this.selectedMenu == 4) + Main.WaveQuality = (Main.WaveQuality + 1) % 4; + if (this.selectedMenu == 5 | flag5) + { + flag5 = false; + Main.menuMode = 1111; + SoundEngine.PlaySound(11); + goto label_623; + } + else + goto label_623; + case 5000: + Main.MenuUI.SetState((UIState) new UIVirtualKeyboard(Language.GetTextValue("UI.EnterSeed"), "", new UIVirtualKeyboard.KeyboardSubmitEvent(this.OnSeedSelected), Main.CreateGoToMenuEvent(7), allowEmpty: true)); + Main.menuMode = 888; + goto label_623; + case 272727: + num2 = 200; + num4 = 30; + num5 = 14; + string[] strArray3 = new string[12] + { + Main.cMapStyle, + Main.cMapFull, + Main.cMapZoomIn, + Main.cMapZoomOut, + Main.cMapAlphaUp, + Main.cMapAlphaDown, + null, + null, + null, + null, + null, + null + }; + if (Main.setKey >= 0) + strArray3[Main.setKey] = "_"; + strArray1[0] = Lang.menu[106].Value + strArray3[0]; + strArray1[1] = Lang.menu[107].Value + strArray3[1]; + strArray1[2] = Lang.menu[108].Value + strArray3[2]; + strArray1[3] = Lang.menu[109].Value + strArray3[3]; + strArray1[4] = Lang.menu[110].Value + strArray3[4]; + strArray1[5] = Lang.menu[111].Value + strArray3[5]; + for (int index78 = 0; index78 < 6; ++index78) + { + flagArray4[index78] = true; + numArray4[index78] = 0.55f; + numArray2[index78] = -140; + } + numArray4[6] = 0.8f; + numArray4[6] = 0.8f; + numArray1[6] = 6; + strArray1[6] = Lang.menu[86].Value; + numArray1[7] = 16; + strArray1[7] = Lang.menu[5].Value; + if (this.selectedMenu == 7 | flag5) + { + flag5 = false; + Main.menuMode = 11; + SoundEngine.PlaySound(11); + } + else if (this.selectedMenu == 6) + { + Main.cMapStyle = "Tab"; + Main.cMapFull = "M"; + Main.cMapZoomIn = "Add"; + Main.cMapZoomOut = "Subtract"; + Main.cMapAlphaUp = "PageUp"; + Main.cMapAlphaDown = "PageDown"; + Main.setKey = -1; + SoundEngine.PlaySound(11); + } + else if (this.selectedMenu >= 0) + Main.setKey = this.selectedMenu; + if (Main.setKey >= 0) + { + List pressedKeys = PlayerInput.GetPressedKeys(); + if (pressedKeys.Count > 0) + { + string str5 = string.Concat((object) pressedKeys[0]); + if (str5 != "None") + { + if (Main.setKey == 0) + Main.cMapStyle = str5; + if (Main.setKey == 1) + Main.cMapFull = str5; + if (Main.setKey == 2) + Main.cMapZoomIn = str5; + if (Main.setKey == 3) + Main.cMapZoomOut = str5; + if (Main.setKey == 4) + Main.cMapAlphaUp = str5; + if (Main.setKey == 5) + Main.cMapAlphaDown = str5; + Main.setKey = -1; + goto label_623; + } + else + goto label_623; + } + else + goto label_623; + } + else + goto label_623; + case 1000000: + num5 = 2; + strArray1[0] = Main.statusText; + flagArray1[0] = true; + num2 = 220; + num4 = 250; + strArray1[1] = Lang.menu[5].Value; + if (this.selectedMenu == 1 | flag5) + { + flag5 = false; + SoundEngine.PlaySound(11); + Main.menuMode = 6; + Main.netMode = 0; + goto label_623; + } + else + goto label_623; + default: + goto label_623; + } + } + num5 = 2; + strArray1[0] = Main.statusText; + flagArray1[0] = true; + num2 = 300; + int num17 = Main.statusText.Split('\n').Length - 1; + numArray4[0] = (float) (1.0 - (double) num17 * 0.0399999991059303); + numArray1[0] = num17 * -18; + numArray1[1] = num17 * 28; + strArray1[1] = Lang.menu[6].Value; + if (this.selectedMenu == 1 | flag5) + { + flag5 = false; + Netplay.InvalidateAllOngoingIPSetAttempts(); + Netplay.Disconnect = true; + Netplay.Connection.Socket.Close(); + SoundEngine.PlaySound(11); + Main.menuMode = 0; + Main.netMode = 0; + if (Main.tServer != null) + { + try + { + Main.tServer.Kill(); + Main.tServer = (Process) null; + break; + } + catch + { + break; + } + } + else + break; + } + else + break; + } +label_623: + if (Main.menuMode == 888) + { + if (!Main._blockFancyUIWhileLoading) + Main.MenuUI.Draw(Main.spriteBatch, gameTime); + } + else + Main.MenuUI.SetState((UIState) null); + if (UILinkPointNavigator.Shortcuts.BackButtonInUse && !flag5) + UILinkPointNavigator.Shortcuts.BackButtonLock = true; + int num18 = this.focusMenu; + if (Main.menuMode != menuMode2) + { + if (Main.menuMode == 10) + Main.gameTips.ClearTips(); + Main.blockMouse = true; + Main.menuSkip = 0; + num5 = 0; + if (PlayerInput.UsingGamepad && Main.InvisibleCursorForGamepad) + { + this.focusMenu = num18 = -1; + int num19; + PlayerInput.MouseY = num19 = 0; + PlayerInput.MouseX = num19; + Main.mouseY = num19; + Main.mouseX = num19; + } + for (int index79 = 0; index79 < Main.maxMenuItems; ++index79) + this.menuItemScale[index79] = 0.8f; + } + if (!Main.mouseLeft) + Main.blockMouse = true; + this.selectedMenu = -1; + this.selectedMenu2 = -1; + this.focusMenu = -1; + bool flag8 = Main.mouseLeft && !PlayerInput.UsingGamepad; + if (!flag1) + { + this.grabColorSlider = 0; + Main.hBar = -1f; + Main.sBar = -1f; + Main.lBar = -1f; + Main.aBar = -1f; + } + if (flag1) + { + if (!Main.mouseLeft) + { + this.grabColorSlider = 0; + Main.blockMouse = false; + } + int focusColor = Main.focusColor; + Main.focusColor = 0; + int num20 = num8; + int num21 = Main.screenWidth / 2 - TextureAssets.Hue.Width() / 2; + int num22 = 167; + Vector3 hsl = Main.rgbToHsl(Main.selColor); + float Hue = hsl.X; + float Saturation1 = hsl.Y; + float Luminosity1 = hsl.Z; + float num23 = (float) Main.selColor.A / (float) byte.MaxValue; + if ((double) Main.hBar == -1.0 || (double) Main.sBar == -1.0 || (double) Main.lBar == -1.0 || (double) Main.aBar == -1.0) + { + Main.hBar = Hue; + Main.sBar = Saturation1; + Main.lBar = Luminosity1; + Main.aBar = num23; + } + else + { + Hue = Main.hBar; + Saturation1 = Main.sBar; + Luminosity1 = Main.lBar; + float aBar = Main.aBar; + } + Main.spriteBatch.Draw(TextureAssets.Hue.Value, new Vector2((float) num21, (float) num20), Microsoft.Xna.Framework.Color.White); + if (Main.mouseX > num21 - 4 && Main.mouseX < num21 + TextureAssets.Hue.Width() + 4 && Main.mouseY > num20 - 4 && Main.mouseY < num20 + TextureAssets.Hue.Height() + 4 && this.grabColorSlider == 0 || this.grabColorSlider == 1) + Main.spriteBatch.Draw(TextureAssets.ColorHighlight.Value, new Vector2((float) num21, (float) num20), Main.OurFavoriteColor); + Main.spriteBatch.Draw(TextureAssets.ColorSlider.Value, new Vector2((float) num21 + (float) (TextureAssets.Hue.Width() - 2) * Main.hBar - (float) (TextureAssets.ColorSlider.Width() / 2), (float) (num20 - TextureAssets.ColorSlider.Height() / 2 + TextureAssets.Hue.Height() / 2)), Microsoft.Xna.Framework.Color.White); + if (Main.mouseX > num21 - 4 && Main.mouseX < num21 + TextureAssets.Hue.Width() + 4 && Main.mouseY > num20 - 4 && Main.mouseY < num20 + TextureAssets.Hue.Height() + 4 && this.grabColorSlider == 0 || this.grabColorSlider == 1) + { + Main.focusColor = 1; + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 5; + if (flag8 && !Main.blockMouse) + { + this.grabColorSlider = 1; + Hue = (float) (Main.mouseX - num21) / (float) TextureAssets.Hue.Width(); + if ((double) Hue < 0.0) + Hue = 0.0f; + if ((double) Hue > 1.0) + Hue = 1f; + Main.hBar = Hue; + } + } + GamepadMainMenuHandler.MenuItemPositions.Add(new Vector2((float) num21, (float) num20) + TextureAssets.ColorBar.Value.Size() / 2f); + int num24 = num20 + 26; + Main.spriteBatch.Draw(TextureAssets.ColorBar.Value, new Vector2((float) num21, (float) num24), Microsoft.Xna.Framework.Color.White); + for (int index80 = 0; index80 <= num22; ++index80) + { + float Saturation2 = (float) index80 / (float) num22; + Microsoft.Xna.Framework.Color rgb = Main.hslToRgb(Hue, Saturation2, Luminosity1); + Main.spriteBatch.Draw(TextureAssets.ColorBlip.Value, new Vector2((float) (num21 + index80 + 5), (float) (num24 + 4)), rgb); + } + if (Main.mouseX > num21 - 4 && Main.mouseX < num21 + TextureAssets.Hue.Width() + 4 && Main.mouseY > num24 - 4 && Main.mouseY < num24 + TextureAssets.Hue.Height() + 4 && this.grabColorSlider == 0 || this.grabColorSlider == 2) + Main.spriteBatch.Draw(TextureAssets.ColorHighlight.Value, new Vector2((float) num21, (float) num24), Main.OurFavoriteColor); + Main.spriteBatch.Draw(TextureAssets.ColorSlider.Value, new Vector2((float) num21 + (float) (TextureAssets.Hue.Width() - 2) * Main.sBar - (float) (TextureAssets.ColorSlider.Width() / 2), (float) (num24 - TextureAssets.ColorSlider.Height() / 2 + TextureAssets.Hue.Height() / 2)), Microsoft.Xna.Framework.Color.White); + if (Main.mouseX > num21 - 4 && Main.mouseX < num21 + TextureAssets.Hue.Width() + 4 && Main.mouseY > num24 - 4 && Main.mouseY < num24 + TextureAssets.Hue.Height() + 4 && this.grabColorSlider == 0 || this.grabColorSlider == 2) + { + Main.focusColor = 2; + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 6; + if (flag8 && !Main.blockMouse) + { + this.grabColorSlider = 2; + Saturation1 = (float) (Main.mouseX - num21) / (float) TextureAssets.Hue.Width(); + if ((double) Saturation1 < 0.0) + Saturation1 = 0.0f; + if ((double) Saturation1 > 1.0) + Saturation1 = 1f; + Main.sBar = Saturation1; + } + } + GamepadMainMenuHandler.MenuItemPositions.Add(new Vector2((float) num21, (float) num24) + TextureAssets.ColorBar.Value.Size() / 2f); + int num25 = num24 + 26; + Main.spriteBatch.Draw(TextureAssets.ColorBar.Value, new Vector2((float) num21, (float) num25), Microsoft.Xna.Framework.Color.White); + float num26 = 0.15f; + if (Main.menuMode == 252) + num26 = 0.0f; + for (int index81 = 0; index81 <= num22; ++index81) + { + float Luminosity2 = (float) index81 / (float) num22; + Microsoft.Xna.Framework.Color rgb = Main.hslToRgb(Hue, Saturation1, Luminosity2); + Main.spriteBatch.Draw(TextureAssets.ColorBlip.Value, new Vector2((float) (num21 + index81 + 5), (float) (num25 + 4)), rgb); + } + if (Main.mouseX > num21 - 4 && Main.mouseX < num21 + TextureAssets.Hue.Width() + 4 && Main.mouseY > num25 - 4 && Main.mouseY < num25 + TextureAssets.Hue.Height() + 4 && this.grabColorSlider == 0 || this.grabColorSlider == 3) + Main.spriteBatch.Draw(TextureAssets.ColorHighlight.Value, new Vector2((float) num21, (float) num25), Main.OurFavoriteColor); + Main.spriteBatch.Draw(TextureAssets.ColorSlider.Value, new Vector2((float) num21 + (float) (TextureAssets.Hue.Width() - 2) * (float) (((double) Main.lBar - (double) num26) / (1.0 - (double) num26)) - (float) (TextureAssets.ColorSlider.Width() / 2), (float) (num25 - TextureAssets.ColorSlider.Height() / 2 + TextureAssets.Hue.Height() / 2)), Microsoft.Xna.Framework.Color.White); + if (Main.mouseX > num21 - 4 && Main.mouseX < num21 + TextureAssets.Hue.Width() + 4 && Main.mouseY > num25 - 4 && Main.mouseY < num25 + TextureAssets.Hue.Height() + 4 && this.grabColorSlider == 0 || this.grabColorSlider == 3) + { + Main.focusColor = 3; + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 7; + if (flag8 && !Main.blockMouse) + { + this.grabColorSlider = 3; + float num27 = (float) (Main.mouseX - num21) / (float) TextureAssets.Hue.Width(); + if ((double) num27 < 0.0) + num27 = 0.0f; + if ((double) num27 > 1.0) + num27 = 1f; + Luminosity1 = num27 * (1f - num26) + num26; + Main.lBar = Luminosity1; + } + } + GamepadMainMenuHandler.MenuItemPositions.Add(new Vector2((float) num21, (float) num25) + TextureAssets.ColorBar.Value.Size() / 2f); + bool flag9 = false; + if (Main.menuMode == 252) + { + int num28 = num25 + 26; + flag9 = true; + Main.spriteBatch.Draw(TextureAssets.ColorBar.Value, new Vector2((float) num21, (float) num28), Microsoft.Xna.Framework.Color.White); + Microsoft.Xna.Framework.Color rgb = Main.hslToRgb(Hue, Saturation1, Luminosity1); + for (int index82 = 0; index82 <= num22; ++index82) + { + float num29 = (float) index82 / (float) num22; + Microsoft.Xna.Framework.Color color4 = rgb * num29; + Main.spriteBatch.Draw(TextureAssets.ColorBlip.Value, new Vector2((float) (num21 + index82 + 5), (float) (num28 + 4)), color4); + } + if (Main.mouseX > num21 - 4 && Main.mouseX < num21 + TextureAssets.Hue.Width() + 4 && Main.mouseY > num28 - 4 && Main.mouseY < num28 + TextureAssets.Hue.Height() + 4 && this.grabColorSlider == 0 || this.grabColorSlider == 4) + Main.spriteBatch.Draw(TextureAssets.ColorHighlight.Value, new Vector2((float) num21, (float) num28), Main.OurFavoriteColor); + Main.spriteBatch.Draw(TextureAssets.ColorSlider.Value, new Vector2((float) num21 + (float) (TextureAssets.Hue.Width() - 2) * Main.aBar - (float) (TextureAssets.ColorSlider.Width() / 2), (float) (num28 - TextureAssets.ColorSlider.Height() / 2 + TextureAssets.Hue.Height() / 2)), Microsoft.Xna.Framework.Color.White); + if (Main.mouseX > num21 - 4 && Main.mouseX < num21 + TextureAssets.Hue.Width() + 4 && Main.mouseY > num28 - 4 && Main.mouseY < num28 + TextureAssets.Hue.Height() + 4 && this.grabColorSlider == 0 || this.grabColorSlider == 4) + { + Main.focusColor = 4; + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 8; + if (Main.mouseLeft && !Main.blockMouse) + { + this.grabColorSlider = 4; + float num30 = (float) (Main.mouseX - num21) / (float) TextureAssets.Hue.Width(); + if ((double) num30 < 0.0) + num30 = 0.0f; + if ((double) num30 > 1.0) + num30 = 1f; + Main.aBar = num30; + } + } + GamepadMainMenuHandler.MenuItemPositions.Add(new Vector2((float) num21, (float) num28) + TextureAssets.ColorBar.Value.Size() / 2f); + } + if (focusColor != Main.focusColor) + SoundEngine.PlaySound(12); + Main.selColor = Main.hslToRgb(Main.hBar, Main.sBar, Main.lBar); + if (flag9) + Main.selColor.A = (byte) ((double) Main.aBar * (double) byte.MaxValue); + } + else if (flag1) + { + string str6 = ""; + for (int index83 = 0; index83 < 6; ++index83) + { + int num31 = num8; + int num32 = 370 + Main.screenWidth / 2 - 400; + if (index83 == 0) + str6 = Lang.menu[95].Value; + if (index83 == 1) + { + str6 = Lang.menu[96].Value; + num31 += 30; + } + if (index83 == 2) + { + str6 = Lang.menu[97].Value; + num31 += 60; + } + if (index83 == 3) + { + str6 = string.Concat((object) Main.selColor.R); + num32 += 90; + } + if (index83 == 4) + { + str6 = string.Concat((object) Main.selColor.G); + num32 += 90; + num31 += 30; + } + if (index83 == 5) + { + str6 = string.Concat((object) Main.selColor.B); + num32 += 90; + num31 += 60; + } + for (int index84 = 0; index84 < 5; ++index84) + { + Microsoft.Xna.Framework.Color color5 = Microsoft.Xna.Framework.Color.Black; + if (index84 == 4) + { + color5 = color1; + color5.R = (byte) (((int) byte.MaxValue + (int) color5.R) / 2); + color5.G = (byte) (((int) byte.MaxValue + (int) color5.R) / 2); + color5.B = (byte) (((int) byte.MaxValue + (int) color5.R) / 2); + } + int maxValue = (int) byte.MaxValue; + int num33 = (int) color5.R - ((int) byte.MaxValue - maxValue); + if (num33 < 0) + num33 = 0; + color5 = new Microsoft.Xna.Framework.Color((int) (byte) num33, (int) (byte) num33, (int) (byte) num33, (int) (byte) maxValue); + int num34 = 0; + int num35 = 0; + if (index84 == 0) + num34 = -2; + if (index84 == 1) + num34 = 2; + if (index84 == 2) + num35 = -2; + if (index84 == 3) + num35 = 2; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.DeathText.Value, str6, new Vector2((float) (num32 + num34), (float) (num31 + num35)), color5, 0.0f, new Vector2(), 0.5f, SpriteEffects.None, 0.0f); + } + } + bool flag10 = false; + for (int index85 = 0; index85 < 2; ++index85) + { + for (int index86 = 0; index86 < 3; ++index86) + { + int num36 = num8 + index86 * 30 - 12; + int num37 = 360 + Main.screenWidth / 2 - 400; + float num38 = 0.9f; + int num39; + if (index85 == 0) + { + num39 = num37 - 70; + num36 += 2; + } + else + num39 = num37 - 40; + string str7 = "-"; + if (index85 == 1) + str7 = "+"; + Vector2 vector2 = new Vector2(24f, 24f); + int num40 = 142; + if (Main.mouseX > num39 && (double) Main.mouseX < (double) num39 + (double) vector2.X && Main.mouseY > num36 + 13 && (double) Main.mouseY < (double) (num36 + 13) + (double) vector2.Y) + { + if (Main.focusColor != (index85 + 1) * (index86 + 10)) + SoundEngine.PlaySound(12); + Main.focusColor = (index85 + 1) * (index86 + 10); + flag10 = true; + num40 = (int) byte.MaxValue; + if (Main.mouseLeft) + { + if (Main.colorDelay <= 1) + { + Main.colorDelay = Main.colorDelay != 0 ? 3 : 40; + int num41 = index85; + if (index85 == 0) + { + num41 = -1; + if ((int) Main.selColor.R + (int) Main.selColor.G + (int) Main.selColor.B <= 150) + num41 = 0; + } + if (index86 == 0 && (int) Main.selColor.R + num41 >= 0 && (int) Main.selColor.R + num41 <= (int) byte.MaxValue) + Main.selColor.R += (byte) num41; + if (index86 == 1 && (int) Main.selColor.G + num41 >= 0 && (int) Main.selColor.G + num41 <= (int) byte.MaxValue) + Main.selColor.G += (byte) num41; + if (index86 == 2 && (int) Main.selColor.B + num41 >= 0 && (int) Main.selColor.B + num41 <= (int) byte.MaxValue) + Main.selColor.B += (byte) num41; + } + --Main.colorDelay; + } + else + Main.colorDelay = 0; + } + for (int index87 = 0; index87 < 5; ++index87) + { + Microsoft.Xna.Framework.Color color6 = Microsoft.Xna.Framework.Color.Black; + if (index87 == 4) + { + color6 = color1; + color6.R = (byte) (((int) byte.MaxValue + (int) color6.R) / 2); + color6.G = (byte) (((int) byte.MaxValue + (int) color6.R) / 2); + color6.B = (byte) (((int) byte.MaxValue + (int) color6.R) / 2); + } + int num42 = (int) color6.R - ((int) byte.MaxValue - num40); + if (num42 < 0) + num42 = 0; + color6 = new Microsoft.Xna.Framework.Color((int) (byte) num42, (int) (byte) num42, (int) (byte) num42, (int) (byte) num40); + int num43 = 0; + int num44 = 0; + if (index87 == 0) + num43 = -2; + if (index87 == 1) + num43 = 2; + if (index87 == 2) + num44 = -2; + if (index87 == 3) + num44 = 2; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.DeathText.Value, str7, new Vector2((float) (num39 + num43), (float) (num36 + num44)), color6, 0.0f, new Vector2(), num38, SpriteEffects.None, 0.0f); + } + } + } + if (!flag10) + { + Main.focusColor = 0; + Main.colorDelay = 0; + } + } + if (flag2) + { + float x = (float) (Main.screenWidth / 2 - 40 + 37); + int num45 = 320; + string text = ""; + for (int index88 = 0; index88 < 6; ++index88) + { + int num46 = num45; + int num47 = 370 + Main.screenWidth / 2 - 400 + 37; + switch (index88) + { + case 0: + text = Lang.menu[98].Value; + num46 += 30; + break; + case 1: + text = Lang.menu[99].Value; + break; + case 2: + text = Lang.menu[119].Value; + num46 += 60; + break; + case 3: + text = Math.Round((double) Main.musicVolume * 100.0).ToString() + "%"; + num47 += 90; + break; + case 4: + text = Math.Round((double) Main.soundVolume * 100.0).ToString() + "%"; + num47 += 90; + num46 += 30; + break; + case 5: + text = Math.Round((double) Main.ambientVolume * 100.0).ToString() + "%"; + num47 += 90; + num46 += 60; + break; + } + Microsoft.Xna.Framework.Color textColor = color1; + textColor.R = (byte) (((int) byte.MaxValue + (int) textColor.R) / 2); + textColor.G = (byte) (((int) byte.MaxValue + (int) textColor.R) / 2); + textColor.B = (byte) (((int) byte.MaxValue + (int) textColor.R) / 2); + int maxValue = (int) byte.MaxValue; + int num48 = (int) textColor.R - ((int) byte.MaxValue - maxValue); + if (num48 < 0) + num48 = 0; + textColor = new Microsoft.Xna.Framework.Color((int) (byte) num48, (int) (byte) num48, (int) (byte) num48, (int) (byte) maxValue); + Utils.DrawBorderStringFourWay(Main.spriteBatch, FontAssets.DeathText.Value, text, (float) num47, (float) num46, textColor, Microsoft.Xna.Framework.Color.Black, Vector2.Zero, 0.5f); + } + int rightHover = IngameOptions.rightHover; + IngameOptions.rightHover = -1; + if (!Main.mouseLeft) + IngameOptions.rightLock = -1; + IngameOptions.valuePosition = new Vector2(x, (float) (num45 - 18 + 30)); + GamepadMainMenuHandler.MenuItemPositions.Add(IngameOptions.valuePosition - TextureAssets.ColorBar.Value.Size() * new Vector2(0.5f, 0.0f)); + float num49 = IngameOptions.DrawValueBar(Main.spriteBatch, 1f, Main.musicVolume); + if (IngameOptions.inBar || IngameOptions.rightLock == 3) + { + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 2; + IngameOptions.rightHover = 3; + if (flag8 && IngameOptions.rightLock == 3) + Main.musicVolume = num49; + } + IngameOptions.valuePosition = new Vector2(x, (float) (num45 - 18 + 60)); + GamepadMainMenuHandler.MenuItemPositions.Add(IngameOptions.valuePosition - TextureAssets.ColorBar.Value.Size() * new Vector2(0.5f, 0.0f)); + float num50 = IngameOptions.DrawValueBar(Main.spriteBatch, 1f, Main.soundVolume); + if (IngameOptions.inBar || IngameOptions.rightLock == 2) + { + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 3; + IngameOptions.rightHover = 2; + if (flag8 && IngameOptions.rightLock == 2) + Main.soundVolume = num50; + } + IngameOptions.valuePosition = new Vector2(x, (float) (num45 - 18 + 90)); + GamepadMainMenuHandler.MenuItemPositions.Add(IngameOptions.valuePosition - TextureAssets.ColorBar.Value.Size() * new Vector2(0.5f, 0.0f)); + float num51 = IngameOptions.DrawValueBar(Main.spriteBatch, 1f, Main.ambientVolume); + if (IngameOptions.inBar || IngameOptions.rightLock == 4) + { + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 4; + IngameOptions.rightHover = 4; + if (flag8 && IngameOptions.rightLock == 4) + Main.ambientVolume = num51; + } + if (IngameOptions.rightHover != -1) + IngameOptions.rightLock = IngameOptions.rightHover; + if (IngameOptions.rightHover != rightHover) + SoundEngine.PlaySound(12); + } + if (flag3) + { + int num52 = 400; + string str8 = ""; + for (int index89 = 0; index89 < 4; ++index89) + { + int num53 = num52; + int num54 = 370 + Main.screenWidth / 2 - 400; + if (index89 == 0) + str8 = Lang.menu[52].Value + ": " + (object) Main.bgScroll; + for (int index90 = 0; index90 < 5; ++index90) + { + Microsoft.Xna.Framework.Color color7 = Microsoft.Xna.Framework.Color.Black; + if (index90 == 4) + { + color7 = color1; + color7.R = (byte) (((int) byte.MaxValue + (int) color7.R) / 2); + color7.G = (byte) (((int) byte.MaxValue + (int) color7.R) / 2); + color7.B = (byte) (((int) byte.MaxValue + (int) color7.R) / 2); + } + int maxValue = (int) byte.MaxValue; + int num55 = (int) color7.R - ((int) byte.MaxValue - maxValue); + if (num55 < 0) + num55 = 0; + color7 = new Microsoft.Xna.Framework.Color((int) (byte) num55, (int) (byte) num55, (int) (byte) num55, (int) (byte) maxValue); + int num56 = 0; + int num57 = 0; + if (index90 == 0) + num56 = -2; + if (index90 == 1) + num56 = 2; + if (index90 == 2) + num57 = -2; + if (index90 == 3) + num57 = 2; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.DeathText.Value, str8, new Vector2((float) (num54 + num56), (float) (num53 + num57)), color7, 0.0f, new Vector2(), 0.5f, SpriteEffects.None, 0.0f); + } + } + IngameOptions.rightHover = -1; + if (!Main.mouseLeft) + IngameOptions.rightLock = -1; + IngameOptions.valuePosition = new Vector2((float) (Main.screenWidth / 2 - 40), (float) (num52 + 12)); + GamepadMainMenuHandler.MenuItemPositions.Add(IngameOptions.valuePosition - TextureAssets.ColorBar.Value.Size() * new Vector2(0.5f, 0.0f)); + float num58 = IngameOptions.DrawValueBar(Main.spriteBatch, 1f, (float) Main.bgScroll / 100f); + if (IngameOptions.inBar || IngameOptions.rightLock == 2) + { + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 1; + IngameOptions.rightHover = 2; + if (flag8 && IngameOptions.rightLock == 2) + { + Main.bgScroll = (int) ((double) num58 * 100.0); + Main.caveParallax = (float) (1.0 - (double) Main.bgScroll / 500.0); + } + } + if (IngameOptions.rightHover != -1) + IngameOptions.rightLock = IngameOptions.rightHover; + } + bool flag11 = false; + for (int index91 = 0; index91 < num5; ++index91) + { + if (strArray1[index91] != null) + { + Vector2 vector2_1 = FontAssets.DeathText.Value.MeasureString(strArray1[index91]); + vector2_1.X *= 0.5f; + vector2_1.Y *= 0.5f; + for (int index92 = 0; index92 < 5; ++index92) + { + Microsoft.Xna.Framework.Color color8 = Microsoft.Xna.Framework.Color.Black; + if (index92 == 4) + { + switch (numArray3[index91]) + { + case 0: + color8 = color1; + break; + case 1: + color8 = Main.mcColor; + break; + case 2: + color8 = Main.hcColor; + break; + case 3: + color8 = Main.highVersionColor; + break; + case 4: + case 5: + case 6: + color8 = Main.errorColor; + break; + default: + color8 = color1; + break; + } + color8.R = (byte) (((int) byte.MaxValue + (int) color8.R) / 2); + color8.G = (byte) (((int) byte.MaxValue + (int) color8.G) / 2); + color8.B = (byte) (((int) byte.MaxValue + (int) color8.B) / 2); + } + int num59 = (int) ((double) byte.MaxValue * ((double) this.menuItemScale[index91] * 2.0 - 1.0)); + if (flagArray1[index91]) + num59 = (int) byte.MaxValue; + int num60 = (int) color8.R - ((int) byte.MaxValue - num59); + if (num60 < 0) + num60 = 0; + int num61 = (int) color8.G - ((int) byte.MaxValue - num59); + if (num61 < 0) + num61 = 0; + int num62 = (int) color8.B - ((int) byte.MaxValue - num59); + if (num62 < 0) + num62 = 0; + if (num18 == index91 && index92 == 4) + { + float num63 = (float) num59 / (float) byte.MaxValue; + num60 = (int) ((double) num60 * (1.0 - (double) num63) + (double) byte.MaxValue * (double) num63); + num61 = (int) ((double) num61 * (1.0 - (double) num63) + 215.0 * (double) num63); + num62 = (int) ((double) num62 * (1.0 - (double) num63) + 0.0 * (double) num63); + } + color8 = new Microsoft.Xna.Framework.Color((int) (byte) num60, (int) (byte) num61, (int) (byte) num62, (int) (byte) num59); + if (flagArray3[index91]) + { + if (index92 == 4) + { + color8.R = (byte) ((int) color8.R * (int) Main.mouseTextColor / 300); + color8.G = (byte) ((int) color8.G * (int) Main.mouseTextColor / 300); + color8.B = (byte) ((int) color8.B * (int) Main.mouseTextColor / 300); + color8.A = (byte) ((int) color8.A * (int) Main.mouseTextColor / 300); + } + else + color8.A -= (byte) ((uint) Main.mouseTextColor / 5U); + } + int num64 = 0; + int num65 = 0; + if (index92 == 0) + num64 = -2; + if (index92 == 1) + num64 = 2; + if (index92 == 2) + num65 = -2; + if (index92 == 3) + num65 = 2; + float num66 = this.menuItemScale[index91]; + if (Main.menuMode == 15 && index91 == 0) + num66 *= 0.35f; + else if (Main.menuMode == 1000000 && index91 == 0) + num66 *= 0.75f; + else if (Main.netMode == 2) + num66 *= 0.5f; + float num67 = num66 * numArray4[index91]; + if (!flagArray4[index91]) + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.DeathText.Value, strArray1[index91], new Vector2((float) (num3 + num64 + numArray2[index91]), (float) (num2 + num4 * index91 + num65) + vector2_1.Y * numArray4[index91] + (float) numArray1[index91]), color8, 0.0f, vector2_1, num67, SpriteEffects.None, 0.0f); + else + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.DeathText.Value, strArray1[index91], new Vector2((float) (num3 + num64 + numArray2[index91]), (float) (num2 + num4 * index91 + num65) + vector2_1.Y * numArray4[index91] + (float) numArray1[index91]), color8, 0.0f, new Vector2(0.0f, vector2_1.Y), num67, SpriteEffects.None, 0.0f); + } + if (!flagArray1[index91] && !flagArray2[index91]) + GamepadMainMenuHandler.MenuItemPositions.Add(new Vector2((float) (num3 + numArray2[index91]), (float) (num2 + num4 * index91) + vector2_1.Y * numArray4[index91] + (float) numArray1[index91])); + if (!flagArray4[index91]) + { + int num68 = 0; + this.menuWide[index91] = false; + Vector2 vector2_2 = FontAssets.DeathText.Value.MeasureString(strArray1[index91]) * numArray4[index91]; + if ((double) Main.mouseX > (double) num3 - (double) vector2_2.X * 0.5 + (double) numArray2[index91] - (double) num68 && (double) Main.mouseX < (double) num3 + (double) vector2_2.X * 0.5 * (double) numArray4[index91] + (double) numArray2[index91] + (double) num68 && Main.mouseY > num2 + num4 * index91 + numArray1[index91] && (double) Main.mouseY < (double) (num2 + num4 * index91 + numArray1[index91]) + 50.0 * (double) numArray4[index91] && Main.hasFocus) + { + this.focusMenu = index91; + if (flagArray1[index91] || flagArray2[index91]) + { + this.focusMenu = -1; + } + else + { + if (num18 != this.focusMenu) + flag11 = true; + if (Main.mouseLeftRelease && Main.mouseLeft) + this.selectedMenu = index91; + if (Main.mouseRightRelease && Main.mouseRight) + this.selectedMenu2 = index91; + } + } + } + else + { + Vector2 vector2_3 = FontAssets.DeathText.Value.MeasureString(strArray1[index91]) * numArray4[index91]; + if (Main.mouseX > num3 + numArray2[index91] && (double) Main.mouseX < (double) num3 + (double) vector2_3.X + (double) numArray2[index91] && Main.mouseY > num2 + num4 * index91 + numArray1[index91] && (double) Main.mouseY < (double) (num2 + num4 * index91 + numArray1[index91]) + 50.0 * (double) numArray4[index91] && Main.hasFocus) + { + this.focusMenu = index91; + if (flagArray1[index91] || flagArray2[index91]) + { + this.focusMenu = -1; + } + else + { + if (num18 != this.focusMenu) + flag11 = true; + if (Main.mouseLeftRelease && Main.mouseLeft) + this.selectedMenu = index91; + if (Main.mouseRightRelease && Main.mouseRight) + this.selectedMenu2 = index91; + } + } + } + } + } + if (flag11 && num18 != this.focusMenu) + SoundEngine.PlaySound(12); + if (GamepadMainMenuHandler.MenuItemPositions.Count == 0) + { + Vector2 vector2 = new Vector2((float) Math.Cos((double) Main.GlobalTimeWrappedHourly * 6.28318548202515), (float) Math.Sin((double) Main.GlobalTimeWrappedHourly * 6.28318548202515 * 2.0)) * new Vector2(30f, 15f) + Vector2.UnitY * 20f; + UILinkPointNavigator.SetPosition(2000, new Vector2((float) Main.screenWidth, (float) Main.screenHeight) / 2f + vector2); + } + for (int index93 = 0; index93 < Main.maxMenuItems; ++index93) + { + if (index93 == this.focusMenu) + { + if ((double) this.menuItemScale[index93] < 1.0) + this.menuItemScale[index93] += 0.02f; + if ((double) this.menuItemScale[index93] > 1.0) + this.menuItemScale[index93] = 1f; + } + else if ((double) this.menuItemScale[index93] > 0.8) + this.menuItemScale[index93] -= 0.02f; + } + if (flag4) + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, Main.UIScaleMatrix); + Player pendingPlayer = Main.PendingPlayer; + pendingPlayer.PlayerFrame(); + pendingPlayer.position.X = (float) num6 + Main.screenPosition.X; + pendingPlayer.position.Y = (float) num7 + Main.screenPosition.Y; + Main.PlayerRenderer.DrawPlayer(Main.Camera, pendingPlayer, pendingPlayer.position, 0.0f, Vector2.Zero); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, Main.UIScaleMatrix); + } + if (!WorldGen.drunkWorldGen) + { + for (int index94 = 0; index94 < 5; ++index94) + { + Microsoft.Xna.Framework.Color color9 = Microsoft.Xna.Framework.Color.Black; + if (index94 == 4) + { + color9 = color1; + color9.R = (byte) (((int) byte.MaxValue + (int) color9.R) / 2); + color9.G = (byte) (((int) byte.MaxValue + (int) color9.R) / 2); + color9.B = (byte) (((int) byte.MaxValue + (int) color9.R) / 2); + } + color9.A = (byte) ((double) color9.A * 0.300000011920929); + int num69 = 0; + int num70 = 0; + if (index94 == 0) + num69 = -2; + if (index94 == 1) + num69 = 2; + if (index94 == 2) + num70 = -2; + if (index94 == 3) + num70 = 2; + Vector2 vector2 = FontAssets.MouseText.Value.MeasureString(Main.versionNumber); + vector2.X *= 0.5f; + vector2.Y *= 0.5f; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, Main.versionNumber, new Vector2((float) ((double) vector2.X + (double) num69 + 10.0), (float) ((double) Main.screenHeight - (double) vector2.Y + (double) num70 - 2.0)), color9, 0.0f, vector2, 1f, SpriteEffects.None, 0.0f); + } + } + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.SamplerStateForCursor, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, Main.UIScaleMatrix); + Main.DrawCursor(Main.DrawThickCursor()); + Main.DrawPendingMouseText(); + if (Main.fadeCounter > 0) + { + Microsoft.Xna.Framework.Color color10 = Microsoft.Xna.Framework.Color.White; + --Main.fadeCounter; + float num71 = (float) ((double) Main.fadeCounter / 120.0 * (double) byte.MaxValue); + if (this.quickSplash) + num71 = (float) ((double) Main.fadeCounter / 75.0 * (double) byte.MaxValue); + byte num72 = (byte) num71; + color10 = new Microsoft.Xna.Framework.Color((int) num72, (int) num72, (int) num72, (int) num72); + Main.spriteBatch.Draw(TextureAssets.Fade.Value, new Microsoft.Xna.Framework.Rectangle(-5, -5, Main.screenWidth + 10, Main.screenHeight + 10), color10); + } + Main.spriteBatch.End(); + Main.mouseLeftRelease = !Main.mouseLeft; + Main.mouseRightRelease = !Main.mouseRight; + if (Main.menuMode != menuMode1) + return; + GamepadMainMenuHandler.LastDrew = menuMode1; + } + + private static void ClearVisualPostProcessEffects() + { + for (int index = 0; index < 13; ++index) + { + string key = ""; + switch (index) + { + case 0: + key = "Solar"; + break; + case 1: + key = "Vortex"; + break; + case 2: + key = "Nebula"; + break; + case 3: + key = "Stardust"; + break; + case 4: + key = "MoonLord"; + break; + case 5: + key = "MonolithSolar"; + break; + case 6: + key = "MonolithVortex"; + break; + case 7: + key = "MonolithNebula"; + break; + case 8: + key = "MonolithStardust"; + break; + case 9: + key = "Blizzard"; + break; + case 10: + key = "HeatDistortion"; + break; + case 11: + key = "Sandstorm"; + break; + case 12: + key = "MonolithMoonLord"; + break; + } + if (SkyManager.Instance[key] != null && SkyManager.Instance[key].IsActive()) + SkyManager.Instance[key].Deactivate(); + if (Overlays.Scene[key] != null && Overlays.Scene[key].IsVisible()) + Overlays.Scene[key].Deactivate(); + if (Terraria.Graphics.Effects.Filters.Scene[key] != null && Terraria.Graphics.Effects.Filters.Scene[key].IsActive()) + Terraria.Graphics.Effects.Filters.Scene[key].Deactivate(); + } + if (Terraria.Graphics.Effects.Filters.Scene["BloodMoon"].IsActive()) + Terraria.Graphics.Effects.Filters.Scene["BloodMoon"].Deactivate(); + if (Terraria.Graphics.Effects.Filters.Scene["Graveyard"].IsActive()) + Terraria.Graphics.Effects.Filters.Scene["Graveyard"].Deactivate(); + if (Terraria.Graphics.Effects.Filters.Scene["BloodMoon"].IsActive()) + Terraria.Graphics.Effects.Filters.Scene["BloodMoon"].Deactivate(); + if (Terraria.Graphics.Effects.Filters.Scene["MoonLordShake"].IsActive()) + Terraria.Graphics.Effects.Filters.Scene["MoonLordShake"].Deactivate(); + if (Terraria.Graphics.Effects.Filters.Scene["WaterDistortion"].IsActive()) + Terraria.Graphics.Effects.Filters.Scene["WaterDistortion"].Deactivate(); + if (SkyManager.Instance["Martian"].IsActive()) + SkyManager.Instance["Martian"].Deactivate(); + if (SkyManager.Instance["Party"].IsActive()) + SkyManager.Instance["Party"].Deactivate(); + if (SkyManager.Instance["Slime"].IsActive()) + SkyManager.Instance["Slime"].Deactivate(); + if (SkyManager.Instance["Ambience"].IsActive()) + SkyManager.Instance["Ambience"].Deactivate(); + Main.slimeRain = false; + Main.slimeRainTime = 0.0; + Main.slimeWarningTime = 0; + BirthdayParty.WorldClear(); + LanternNight.WorldClear(); + Sandstorm.WorldClear(); + Main.maxRaining = 0.0f; + Main.raining = false; + } + + private static void PostDrawMenu(Microsoft.Xna.Framework.Point screenSizeCache, Microsoft.Xna.Framework.Point screenSizeCacheAfterScaling) + { + if (!(Main.ScreenSize == screenSizeCacheAfterScaling)) + return; + Main.screenPosition.Y -= (float) (screenSizeCache.Y - Main.screenHeight); + } + + private void PreDrawMenu(out Microsoft.Xna.Framework.Point screenSizeCache, out Microsoft.Xna.Framework.Point screenSizeCacheAfterScaling) + { + double uiScaleWanted = (double) Main._uiScaleWanted; + float num = (float) Main.screenHeight / 900f; + if ((double) num < 1.0) + num = 1f; + if (Main.SettingDontScaleMainMenuUp) + num = 1f; + screenSizeCache = Main.ScreenSize; + Main.UIScale = num; + PlayerInput.SetZoom_UI(); + screenSizeCacheAfterScaling = Main.ScreenSize; + if (this._needsMenuUIRecalculation) + { + this._needsMenuUIRecalculation = false; + Main.MenuUI.Recalculate(); + } + Main._uiScaleWanted = (float) uiScaleWanted; + } + + private static bool IsBorderlessDisplayAvailable() => true; + + private static void SetDisplayModeAsBorderless(ref int width, ref int height, Form form) + { + if (!Main.screenBorderless || Main.graphics.IsFullScreen || Main.screenBorderlessPendingResizes <= 0) + return; + --Main.screenBorderlessPendingResizes; + System.Drawing.Rectangle bounds = Screen.FromPoint(form.Location).Bounds; + width = bounds.Width; + height = bounds.Height; + Main.TryPickingDefaultUIScale((float) height); + } + + private static void ApplyBorderlessResolution(Form form) + { + if (Main.screenBorderlessPendingResizes <= 0) + return; + --Main.screenBorderlessPendingResizes; + System.Drawing.Rectangle bounds = Screen.FromPoint(form.Location).Bounds; + form.Location = new System.Drawing.Point(bounds.X, bounds.Y); + form.FormBorderStyle = FormBorderStyle.None; + form.Width = bounds.Width; + form.Height = bounds.Height; + } + + private static void SetBorderlessFormStyle(Form form) + { + form.Location = new System.Drawing.Point(0, 0); + form.FormBorderStyle = FormBorderStyle.None; + } + + public static void OpenCharacterSelectUI() + { + Main.MenuUI.SetState((UIState) Main._characterSelectMenu); + Main.menuMode = 888; + } + + public static void OpenWorldSelectUI() + { + Main.MenuUI.SetState((UIState) Main._worldSelectMenu); + Main.menuMode = 888; + } + + private static void CycleClothingStyle(Player plr) + { + Main.CycleClothingStyle_Inner(plr); + while (!Main.IsValidPlayerStyle(plr)) + Main.CycleClothingStyle_Inner(plr); + } + + private static bool IsValidPlayerStyle(Player plr) + { + switch (plr.skinVariant) + { + case 10: + case 11: + return false; + default: + return true; + } + } + + private static void CycleClothingStyle_Inner(Player plr) + { + if (plr.Male) + { + int num = 0; + int[] variantOrderMale = PlayerVariantID.Sets.VariantOrderMale; + for (int index = 0; index < variantOrderMale.Length; ++index) + { + if (variantOrderMale[index] == plr.skinVariant) + { + num = index; + break; + } + } + if (num == variantOrderMale.Length - 1) + plr.skinVariant = variantOrderMale[0]; + else + plr.skinVariant = variantOrderMale[num + 1]; + } + else + { + int num = 0; + int[] variantOrderFemale = PlayerVariantID.Sets.VariantOrderFemale; + for (int index = 0; index < variantOrderFemale.Length; ++index) + { + if (variantOrderFemale[index] == plr.skinVariant) + { + num = index; + break; + } + } + if (num == variantOrderFemale.Length - 1) + plr.skinVariant = variantOrderFemale[0]; + else + plr.skinVariant = variantOrderFemale[num + 1]; + } + } + + public static void ResetKeyBindings() + { + Main.cUp = "W"; + Main.cDown = "S"; + Main.cLeft = "A"; + Main.cRight = "D"; + Main.cJump = "Space"; + Main.cThrowItem = "T"; + Main.cInv = "Escape"; + Main.cHeal = "H"; + Main.cMana = "J"; + Main.cBuff = "B"; + Main.cHook = "E"; + Main.cTorch = "LeftShift"; + Main.cSmart = "LeftControl"; + Main.cMount = "R"; + } + + public static void CursorColor() + { + Main.cursorAlpha += (float) Main.cursorColorDirection * 0.015f; + if ((double) Main.cursorAlpha >= 1.0) + { + Main.cursorAlpha = 1f; + Main.cursorColorDirection = -1; + } + if ((double) Main.cursorAlpha <= 0.6) + { + Main.cursorAlpha = 0.6f; + Main.cursorColorDirection = 1; + } + float num = (float) ((double) Main.cursorAlpha * 0.300000011920929 + 0.699999988079071); + Main.cursorColor = new Microsoft.Xna.Framework.Color((int) (byte) ((double) Main.mouseColor.R * (double) Main.cursorAlpha), (int) (byte) ((double) Main.mouseColor.G * (double) Main.cursorAlpha), (int) (byte) ((double) Main.mouseColor.B * (double) Main.cursorAlpha), (int) (byte) ((double) byte.MaxValue * (double) num)); + Main.cursorScale = (float) ((double) Main.cursorAlpha * 0.300000011920929 + 0.699999988079071 + 0.100000001490116); + } + + protected void DrawSplash(GameTime gameTime) + { + int num1 = 10000; + this.GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Black); + base.Draw(gameTime); + this.TickLoadProcess(); + long num2 = Main.splashTimer.ElapsedMilliseconds; + if ((double) Main.musicVolume == 0.0) + { + this.quickSplash = true; + num2 = 999999L; + num1 = 0; + } + if (Main.Assets.PendingAssets == 0 && this._musicLoaded && this._artLoaded && Program.LoadedEverything) + Main._isAsyncLoadComplete = true; + Main.spriteBatch.Begin(); + ++this.splashCounter; + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.White; + byte num3 = 0; + if (this.quickSplash) + { + if (this.splashCounter <= 75) + num3 = (byte) ((double) this.splashCounter / 75.0 * (double) byte.MaxValue); + else if (this.splashCounter <= 125) + num3 = byte.MaxValue; + else if (this.splashCounter <= 200) + { + if (!Main._isAsyncLoadComplete) + this.splashCounter = 125; + num3 = (byte) ((double) (75 - (this.splashCounter - 125)) / 75.0 * (double) byte.MaxValue); + } + else + { + this.Initialize_AlmostEverything(); + Main.PostContentLoadInitialize(); + Main.showSplash = false; + Main.fadeCounter = 75; + Main.splashTimer.Stop(); + } + } + else + { + int num4 = 90; + int num5 = 410; + int num6 = 620; + int num7 = 60; + if (this.splashCounter >= num4) + { + if (this.splashCounter <= num5) + { + float num8 = (float) (this.splashCounter - num4) / (float) (num5 - num4); + num3 = (byte) (num8 * (num8 * num8 * num8) * (float) byte.MaxValue); + } + else if (this.splashCounter <= num6) + { + num3 = byte.MaxValue; + if (this.splashCounter >= num6 - num7) + num3 = (byte) ((double) (num7 - (this.splashCounter - (num6 - num7))) / (double) num7 * (double) byte.MaxValue); + } + else if (!Main._isAsyncLoadComplete) + { + num3 = (byte) 0; + num1 = 1; + } + else + { + this.Initialize_AlmostEverything(); + Main.PostContentLoadInitialize(); + Main.showSplash = false; + Main.fadeCounter = 120; + Main.splashTimer.Stop(); + } + } + } + color = new Microsoft.Xna.Framework.Color((int) num3, (int) num3, (int) num3, (int) num3); + Asset splashTextureLegoBack = TextureAssets.SplashTextureLegoBack; + if (splashTextureLegoBack.Width() > 0 && splashTextureLegoBack.Height() > 0) + { + Vector2 vector2_1 = new Vector2((float) Main.screenWidth / (float) splashTextureLegoBack.Width(), (float) Main.screenHeight / (float) splashTextureLegoBack.Height()); + Vector2 vector2_2 = splashTextureLegoBack.Size() / 2f; + Vector2 position = new Vector2((float) Main.screenWidth, (float) Main.screenHeight) / 2f; + Vector2 scale1 = vector2_1; + if ((double) scale1.X > (double) scale1.Y) + scale1.X = scale1.Y; + else + scale1.Y = scale1.X; + Vector2 scale2 = vector2_1; + if ((double) scale2.X < (double) scale2.Y) + scale2.X = scale2.Y; + else + scale2.Y = scale2.X; + Main.spriteBatch.Draw(splashTextureLegoBack.Value, position, new Microsoft.Xna.Framework.Rectangle?(), color, 0.0f, splashTextureLegoBack.Size() / 2f, scale2, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.SplashTextureLegoTree.Value, Main.ScreenSize.ToVector2(), new Microsoft.Xna.Framework.Rectangle?(), color, 0.0f, TextureAssets.SplashTextureLegoTree.Size(), scale1, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.SplashTextureLegoFront.Value, position, new Microsoft.Xna.Framework.Rectangle?(), color, 0.0f, TextureAssets.SplashTextureLegoFront.Size() / 2f, scale1, SpriteEffects.None, 0.0f); + } + int num9 = 70; + if (num1 == 1) + this.DrawSplash_LoadingFlower(Microsoft.Xna.Framework.Color.White); + else if (num2 > (long) num1) + this.DrawSplash_LoadingFlower(color); + ++this._splashFrameCount; + if ((double) this._splashFrameCount >= (double) num9) + this._splashFrameCount = 0.0f; + Main.spriteBatch.End(); + } + + private void DrawSplash_LoadingFlower(Microsoft.Xna.Framework.Color splashColor) + { + float val2_1 = (float) Main.screenWidth / Main.MinimumZoomComparerX; + float val2_2 = (float) Main.screenHeight / Main.MinimumZoomComparerY; + float scale = Math.Max(Math.Max(1f, val2_1), val2_2); + Texture2D texture2D = TextureAssets.LoadingSunflower.Value; + int num1 = 3; + int verticalFrames = 19; + Vector2 position = new Vector2((float) (Main.screenWidth / 2), (float) Main.screenHeight) - new Vector2(0.0f, 50f) * scale; + int num2 = (int) this._splashFrameCount / num1; + if (num2 >= verticalFrames) + num2 = 0; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(verticalFrames: verticalFrames, frameY: ((num2 + 10) % verticalFrames)); + float rotation = 0.0f; + Vector2 origin = r.Size() / 2f; + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(r), splashColor, rotation, origin, scale, SpriteEffects.None, 0.0f); + } + + private void DrawSplash_LoadingStar(Microsoft.Xna.Framework.Color splashColor) + { + int num = 4; + Vector2 position = new Vector2((float) Main.screenWidth, (float) Main.screenHeight) - new Vector2(30f); + int frameY = (int) this._splashFrameCount / num; + if (frameY >= 15) + frameY = 0; + if (frameY >= 8) + frameY = 14 - frameY; + Microsoft.Xna.Framework.Rectangle r = TextureAssets.Item[75].Frame(verticalFrames: 8, frameY: frameY); + r.Height -= 2; + float rotation = 0.0f; + Vector2 origin = r.Size() / 2f; + origin.Y += 2f; + Main.spriteBatch.Draw(TextureAssets.Item[75].Value, position, new Microsoft.Xna.Framework.Rectangle?(r), splashColor, rotation, origin, 1f, SpriteEffects.None, 0.0f); + } + + protected void DrawUnderworldBackground(bool flat) + { + if ((double) Main.screenPosition.Y + (double) Main.screenHeight < (double) (Main.maxTilesY - 220) * 16.0) + return; + Vector2 screenOffset = Main.screenPosition + new Vector2((float) (Main.screenWidth >> 1), (float) (Main.screenHeight >> 1)); + float pushUp = (float) (((double) Main.GameViewMatrix.Zoom.Y - 1.0) * 0.5 * 200.0); + SkyManager.Instance.ResetDepthTracker(); + for (int layerTextureIndex = 4; layerTextureIndex >= 0; --layerTextureIndex) + Main.DrawUnderworldBackgroudLayer(flat, screenOffset, pushUp, layerTextureIndex); + if (!Main.mapFullscreen) + SkyManager.Instance.DrawRemainingDepth(Main.spriteBatch); + this.DrawSurfaceBG_DrawChangeOverlay(12); + } + + private static void DrawUnderworldBackgroudLayer( + bool flat, + Vector2 screenOffset, + float pushUp, + int layerTextureIndex) + { + int index1 = Main.underworldBG[layerTextureIndex]; + Asset asset = TextureAssets.Underworld[index1]; + if (!asset.IsLoaded) + Main.Assets.Request(asset.Name, (AssetRequestMode) 1); + Texture2D texture = asset.Value; + Vector2 vector2_1 = new Vector2((float) texture.Width, (float) texture.Height) * 0.5f; + float num1 = flat ? 1f : (float) (layerTextureIndex * 2) + 3f; + Vector2 vector2_2 = new Vector2(1f / num1); + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, texture.Width, texture.Height); + float scale = 1.3f; + Vector2 zero = Vector2.Zero; + int num2 = 0; + switch (index1) + { + case 1: + int num3 = (int) ((double) Main.GlobalTimeWrappedHourly * 8.0) % 4; + rectangle = new Microsoft.Xna.Framework.Rectangle((num3 >> 1) * (texture.Width >> 1), num3 % 2 * (texture.Height >> 1), texture.Width >> 1, texture.Height >> 1); + vector2_1 *= 0.5f; + zero.Y += 175f; + break; + case 2: + zero.Y += 100f; + break; + case 3: + zero.Y += 75f; + break; + case 4: + scale = 0.5f; + zero.Y -= 0.0f; + break; + case 5: + zero.Y += (float) num2; + break; + case 6: + int num4 = (int) ((double) Main.GlobalTimeWrappedHourly * 8.0) % 4; + rectangle = new Microsoft.Xna.Framework.Rectangle(num4 % 2 * (texture.Width >> 1), (num4 >> 1) * (texture.Height >> 1), texture.Width >> 1, texture.Height >> 1); + vector2_1 *= 0.5f; + zero.Y += (float) num2; + zero.Y += -60f; + break; + case 7: + int num5 = (int) ((double) Main.GlobalTimeWrappedHourly * 8.0) % 4; + rectangle = new Microsoft.Xna.Framework.Rectangle(num5 % 2 * (texture.Width >> 1), (num5 >> 1) * (texture.Height >> 1), texture.Width >> 1, texture.Height >> 1); + vector2_1 *= 0.5f; + zero.Y += (float) num2; + zero.X -= 400f; + zero.Y += 90f; + break; + case 8: + int num6 = (int) ((double) Main.GlobalTimeWrappedHourly * 8.0) % 4; + rectangle = new Microsoft.Xna.Framework.Rectangle(num6 % 2 * (texture.Width >> 1), (num6 >> 1) * (texture.Height >> 1), texture.Width >> 1, texture.Height >> 1); + vector2_1 *= 0.5f; + zero.Y += (float) num2; + zero.Y += 90f; + break; + case 9: + zero.Y += (float) num2; + zero.Y -= 30f; + break; + case 10: + zero.Y += 250f * num1; + break; + case 11: + zero.Y += 100f * num1; + break; + case 12: + zero.Y += 20f * num1; + break; + case 13: + zero.Y += 20f * num1; + int num7 = (int) ((double) Main.GlobalTimeWrappedHourly * 8.0) % 4; + rectangle = new Microsoft.Xna.Framework.Rectangle(num7 % 2 * (texture.Width >> 1), (num7 >> 1) * (texture.Height >> 1), texture.Width >> 1, texture.Height >> 1); + vector2_1 *= 0.5f; + break; + } + if (flat) + scale *= 1.5f; + Vector2 vec = vector2_1 * scale; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / vector2_2.X); + if (flat) + zero.Y += (float) (TextureAssets.Underworld[0].Height() >> 1) * 1.3f - vec.Y; + zero.Y -= pushUp; + float num8 = scale * (float) rectangle.Width; + int num9 = (int) ((double) (int) ((double) screenOffset.X * (double) vector2_2.X - (double) vec.X + (double) zero.X - (double) (Main.screenWidth >> 1)) / (double) num8); + Vector2 vector2_3 = vec.Floor(); + int num10 = (int) Math.Ceiling((double) Main.screenWidth / (double) num8); + int num11 = (int) ((double) scale * ((double) (rectangle.Width - 1) / (double) vector2_2.X)); + Vector2 position; + for (position = ((new Vector2((float) ((num9 - 2) * num11), (float) Main.UnderworldLayer * 16f) + vector2_3 - screenOffset) * vector2_2 + screenOffset - Main.screenPosition - vector2_3 + zero).Floor(); (double) position.X + (double) num8 < 0.0; position.X += num8) + ++num9; + for (int index2 = num9 - 2; index2 <= num9 + 4 + num10; ++index2) + { + Main.spriteBatch.Draw(texture, position, new Microsoft.Xna.Framework.Rectangle?(rectangle), Microsoft.Xna.Framework.Color.White, 0.0f, Vector2.Zero, scale, SpriteEffects.None, 0.0f); + if (layerTextureIndex == 0) + { + int y = (int) ((double) position.Y + (double) rectangle.Height * (double) scale); + Main.spriteBatch.Draw(TextureAssets.BlackTile.Value, new Microsoft.Xna.Framework.Rectangle((int) position.X, y, (int) ((double) rectangle.Width * (double) scale), Math.Max(0, Main.screenHeight - y)), new Microsoft.Xna.Framework.Color(11, 3, 7)); + } + position.X += num8; + } + } + + protected void DrawBackground() + { + if (!Main.BackgroundEnabled) + { + this.OldDrawBackground(); + } + else + { + Microsoft.Xna.Framework.Color[] slices = new Microsoft.Xna.Framework.Color[9]; + Stopwatch stopwatch = new Stopwatch(); + stopwatch.Start(); + double num1 = (double) ((int) (((double) (Main.maxTilesY - 330) - Main.worldSurface) / 6.0) * 6); + double num2 = Main.worldSurface + num1 - 5.0; + int num3 = (int) ((double) byte.MaxValue * (1.0 - (double) Main.gfxQuality) + 140.0 * (double) Main.gfxQuality); + int num4 = (int) (200.0 * (1.0 - (double) Main.gfxQuality) + 40.0 * (double) Main.gfxQuality); + Vector2 vector2 = Main.drawToScreen ? Vector2.Zero : new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange); + Vector3 vector3 = new Vector3(0.9f); + float num5 = MathHelper.Clamp((float) (((double) Main.screenPosition.Y - Main.worldSurface * 16.0) / 300.0), 0.0f, 1f); + Lighting.GlobalBrightness = (float) ((double) Lighting.GlobalBrightness * (1.0 - (double) num5) + 1.0 * (double) num5); + float num6 = MathHelper.Clamp((float) ((double) Main.screenPosition.Y - (double) (Main.screenHeight / 2) + 200.0 - Main.rockLayer * 16.0) / 300f, 0.0f, 1f); + int num7 = (int) (((double) Main.screenPosition.X + (double) (Main.screenWidth / 2)) / 16.0); + int num8 = (num7 > Main.caveBackX[0] ? (num7 > Main.caveBackX[1] ? (num7 > Main.caveBackX[2] ? Main.caveBackStyle[3] : Main.caveBackStyle[2]) : Main.caveBackStyle[1]) : Main.caveBackStyle[0]) + 3; + if (Main.SceneMetrics.SnowTileCount > SceneMetrics.SnowTileThreshold && ((double) Main.screenPosition.Y + (double) Main.screenHeight + 1200.0) / 16.0 < (double) (Main.maxTilesY - 250)) + num8 = 1; + if (Main.SceneMetrics.JungleTileCount > SceneMetrics.JungleTileThreshold) + { + if (num8 == 1) + { + if (Main.SceneMetrics.JungleTileCount > Main.SceneMetrics.SnowTileCount) + num8 = 11; + } + else + num8 = 11; + } + if (WorldGen.oceanDepths((int) ((double) Main.screenPosition.X + (double) (Main.screenHeight / 2)) / 16, (int) ((double) Main.screenPosition.Y + (double) (Main.screenHeight / 2)) / 16)) + num8 = !Main.player[Main.myPlayer].ZoneCorrupt ? (!Main.player[Main.myPlayer].ZoneCrimson ? (!Main.player[Main.myPlayer].ZoneHallow ? 18 : 20) : 21) : 19; + else if ((double) Main.screenPosition.Y / 16.0 > Main.rockLayer + 60.0 && (double) Main.screenPosition.Y / 16.0 < num2 - 60.0) + { + if (Main.player[Main.myPlayer].ZoneSnow) + { + if (Main.player[Main.myPlayer].ZoneCorrupt) + num8 = 15; + else if (Main.player[Main.myPlayer].ZoneCrimson) + num8 = 16; + else if (Main.player[Main.myPlayer].ZoneHallow) + num8 = 17; + } + else if (Main.player[Main.myPlayer].ZoneCorrupt) + num8 = 12; + else if (Main.player[Main.myPlayer].ZoneCrimson) + num8 = 13; + else if (Main.player[Main.myPlayer].ZoneHallow) + num8 = 14; + } + if (Main.SceneMetrics.MushroomTileCount > SceneMetrics.MushroomTileMax) + num8 = 2; + if (num8 != Main.undergroundBackground) + { + Main.oldUndergroundBackground = Main.undergroundBackground; + Main.undergroundBackground = num8; + Main.ugBackTransition = 1f; + } + if ((double) Main.ugBackTransition > 0.0) + Main.ugBackTransition -= 0.25f; + if ((double) Main.ugBackTransition < 0.0) + Main.ugBackTransition = 0.0f; + int[] numArray1 = new int[7]; + int[] numArray2 = new int[7]; + for (int index1 = 0; index1 < 2; ++index1) + { + int undergroundBackground = Main.undergroundBackground; + if (index1 == 1) + undergroundBackground = Main.oldUndergroundBackground; + int[] numArray3 = new int[7]; + switch (undergroundBackground) + { + case 0: + numArray3[0] = 1; + numArray3[1] = 2; + numArray3[2] = 4; + numArray3[3] = 3; + numArray3[4] = 6; + numArray3[5] = 5; + break; + case 1: + switch (Main.iceBackStyle) + { + case 0: + numArray3[1] = 33; + numArray3[3] = 32; + numArray3[0] = 40; + numArray3[2] = 34; + break; + case 1: + numArray3[1] = 118; + numArray3[3] = 117; + numArray3[0] = 160; + numArray3[2] = 161; + break; + case 2: + numArray3[1] = 165; + numArray3[3] = 167; + numArray3[0] = 164; + numArray3[2] = 166; + break; + default: + numArray3[1] = 120; + numArray3[3] = 119; + numArray3[0] = 162; + numArray3[2] = 163; + break; + } + numArray3[4] = 128 + Main.hellBackStyle; + break; + case 2: + numArray3[0] = 62; + numArray3[1] = 63; + numArray3[2] = 64; + numArray3[3] = 65; + numArray3[4] = 143 + Main.hellBackStyle; + break; + case 3: + numArray3[0] = 66; + numArray3[1] = 67; + numArray3[2] = 68; + numArray3[3] = 69; + numArray3[4] = 128 + Main.hellBackStyle; + break; + case 4: + numArray3[0] = 70; + numArray3[1] = 71; + numArray3[2] = 68; + numArray3[3] = 72; + numArray3[4] = 128 + Main.hellBackStyle; + break; + case 5: + numArray3[0] = 73; + numArray3[1] = 74; + numArray3[2] = 75; + numArray3[3] = 76; + numArray3[4] = 131 + Main.hellBackStyle; + break; + case 6: + numArray3[0] = 77; + numArray3[1] = 78; + numArray3[2] = 79; + numArray3[3] = 80; + numArray3[4] = 134 + Main.hellBackStyle; + break; + case 7: + numArray3[0] = 77; + numArray3[1] = 81; + numArray3[2] = 79; + numArray3[3] = 82; + numArray3[4] = 134 + Main.hellBackStyle; + break; + case 8: + numArray3[0] = 83; + numArray3[1] = 84; + numArray3[2] = 85; + numArray3[3] = 86; + numArray3[4] = 137 + Main.hellBackStyle; + break; + case 9: + numArray3[0] = 83; + numArray3[1] = 87; + numArray3[2] = 88; + numArray3[3] = 89; + numArray3[4] = 137 + Main.hellBackStyle; + break; + case 10: + numArray3[0] = 121; + numArray3[1] = 122; + numArray3[2] = 123; + numArray3[3] = 124; + numArray3[4] = 140 + Main.hellBackStyle; + break; + case 11: + if (Main.jungleBackStyle == 0) + { + numArray3[0] = 153; + numArray3[1] = 147; + numArray3[2] = 148; + numArray3[3] = 149; + numArray3[4] = 150 + Main.hellBackStyle; + break; + } + numArray3[0] = 146; + numArray3[1] = 154; + numArray3[2] = 155; + numArray3[3] = 156; + numArray3[4] = 157 + Main.hellBackStyle; + break; + default: + if (undergroundBackground >= 12 && undergroundBackground <= 14) + { + numArray3[0] = 66; + numArray3[1] = 67; + numArray3[2] = 68; + numArray3[4] = 128 + Main.hellBackStyle; + switch (undergroundBackground) + { + case 12: + numArray3[3] = 193 + Main.worldID % 4; + break; + case 13: + numArray3[3] = 188 + Main.worldID % 5; + break; + case 14: + numArray3[3] = 197 + Main.worldID % 3; + break; + } + } + else if (undergroundBackground >= 15 && undergroundBackground <= 17) + { + numArray3[0] = 40; + numArray3[1] = 33; + numArray3[2] = 34; + numArray3[4] = 128 + Main.hellBackStyle; + switch (undergroundBackground) + { + case 15: + numArray3[3] = 200; + break; + case 16: + numArray3[3] = 201 + Main.worldID % 2; + break; + case 17: + numArray3[3] = 203 + Main.worldID % 4; + break; + } + } + else + { + switch (undergroundBackground) + { + case 18: + numArray3[0] = 290; + numArray3[1] = 291; + break; + case 19: + numArray3[0] = 292; + numArray3[1] = 293; + break; + case 20: + numArray3[0] = 294; + numArray3[1] = 295; + break; + case 21: + numArray3[0] = 296; + numArray3[1] = 297; + break; + } + } + break; + } + if (Main.hellBackStyle == 0) + numArray3[5] = 125; + if (Main.hellBackStyle == 1) + numArray3[5] = 126; + if (Main.hellBackStyle == 2) + numArray3[5] = (int) sbyte.MaxValue; + numArray3[6] = 185 + Main.hellBackStyle; + this.LoadBackground(numArray3[0]); + this.LoadBackground(numArray3[1]); + this.LoadBackground(numArray3[2]); + this.LoadBackground(numArray3[3]); + this.LoadBackground(numArray3[4]); + this.LoadBackground(numArray3[5]); + this.LoadBackground(numArray3[6]); + if (index1 == 0) + { + for (int index2 = 0; index2 < 7; ++index2) + numArray1[index2] = numArray3[index2]; + } + else + { + for (int index3 = 0; index3 < 7; ++index3) + numArray2[index3] = numArray3[index3]; + } + } + float num9 = (float) (1.20000004768372 - 0.200000002980232 * (double) num6); + float x1 = vector3.X; + float y1 = vector3.Y; + float z = vector3.Z; + int num10 = TextureAssets.Background[numArray1[0]].Width() - 32; + this.bgParallax = (double) Main.caveParallax; + this.bgStartX = (int) (-Math.IEEERemainder((double) num10 + (double) Main.screenPosition.X * this.bgParallax, (double) num10) - (double) (num10 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num10 + 2; + this.bgTopY = (int) ((double) ((int) Main.worldSurface * 16 - 16) - (double) Main.screenPosition.Y + 16.0); + for (int index4 = 0; index4 < this.bgLoops; ++index4) + { + for (int index5 = 0; index5 < num10 / 16; ++index5) + { + int num11 = (int) (float) Math.Round(-Math.IEEERemainder((double) this.bgStartX + (double) Main.screenPosition.X, 16.0)); + if (num11 == -8) + num11 = 8; + double num12 = (double) (this.bgStartX + num10 * index4 + index5 * 16 + 8); + float bgTopY = (float) this.bgTopY; + double x2 = (double) Main.screenPosition.X; + Microsoft.Xna.Framework.Color color = Lighting.GetColor((int) ((num12 + x2) / 16.0), (int) (((double) Main.screenPosition.Y + (double) bgTopY) / 16.0)); + color.R = (byte) ((double) color.R * (double) x1); + color.G = (byte) ((double) color.G * (double) y1); + color.B = (byte) ((double) color.B * (double) z); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[0]].Value, new Vector2((float) (this.bgStartX + num10 * index4 + 16 * index5 + num11), (float) this.bgTopY) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index5 + num11 + 16, 0, 16, 16)), color); + } + } + if ((double) Main.ugBackTransition > 0.0) + { + num10 = TextureAssets.Background[numArray2[0]].Width() - 32; + this.bgStartX = (int) (-Math.IEEERemainder((double) num10 + (double) Main.screenPosition.X * this.bgParallax, (double) num10) - (double) (num10 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num10 + 2; + for (int index6 = 0; index6 < this.bgLoops; ++index6) + { + for (int index7 = 0; index7 < num10 / 16; ++index7) + { + int num13 = (int) (float) Math.Round(-Math.IEEERemainder((double) this.bgStartX + (double) Main.screenPosition.X, 16.0)); + if (num13 == -8) + num13 = 8; + double num14 = (double) (this.bgStartX + num10 * index6 + index7 * 16 + 8); + float bgTopY = (float) this.bgTopY; + double x3 = (double) Main.screenPosition.X; + Microsoft.Xna.Framework.Color color1 = Lighting.GetColor((int) ((num14 + x3) / 16.0), (int) (((double) Main.screenPosition.Y + (double) bgTopY) / 16.0)); + color1.R = (byte) ((double) color1.R * (double) x1); + color1.G = (byte) ((double) color1.G * (double) y1); + color1.B = (byte) ((double) color1.B * (double) z); + Microsoft.Xna.Framework.Color color2 = color1; + color2.R = (byte) ((double) color2.R * (double) Main.ugBackTransition); + color2.G = (byte) ((double) color2.G * (double) Main.ugBackTransition); + color2.B = (byte) ((double) color2.B * (double) Main.ugBackTransition); + color2.A = (byte) ((double) color2.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[0]].Value, new Vector2((float) (this.bgStartX + num10 * index6 + 16 * index7 + num13), (float) this.bgTopY) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index7 + num13 + 16, 0, 16, 16)), color2); + } + } + } + bool flag1 = false; + bool flag2 = false; + this.bgTopY = (int) ((double) ((int) Main.worldSurface * 16) - (double) Main.screenPosition.Y + 16.0); + if (Main.worldSurface * 16.0 <= (double) Main.screenPosition.Y + (double) Main.screenHeight + (double) Main.offScreenRange) + { + this.bgParallax = (double) Main.caveParallax; + int num15 = TextureAssets.Background[numArray1[1]].Width() - 32; + this.bgStartX = (int) (-Math.IEEERemainder((double) num15 + (double) Main.screenPosition.X * this.bgParallax, (double) num15) - (double) (num15 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num15 + 2; + if (Main.worldSurface * 16.0 < (double) Main.screenPosition.Y - 16.0) + { + this.bgStartY = (int) (Math.IEEERemainder((double) this.bgTopY, (double) Main.backgroundHeight[2]) - (double) Main.backgroundHeight[2]); + this.bgLoopsY = (Main.screenHeight - this.bgStartY + (int) vector2.Y * 2) / Main.backgroundHeight[2] + 1; + } + else + { + this.bgStartY = this.bgTopY; + this.bgLoopsY = (Main.screenHeight - this.bgTopY + (int) vector2.Y * 2) / Main.backgroundHeight[2] + 1; + } + if (Main.rockLayer * 16.0 < (double) Main.Camera.ScaledPosition.Y + 600.0) + { + this.bgLoopsY = (int) (Main.rockLayer * 16.0 - (double) Main.screenPosition.Y + 600.0 - (double) this.bgStartY) / Main.backgroundHeight[2]; + flag2 = true; + } + int num16 = (int) (float) Math.Round(-Math.IEEERemainder((double) this.bgStartX + (double) Main.screenPosition.X, 16.0)); + if (num16 == -8) + num16 = 8; + for (int index8 = 0; index8 < this.bgLoops; ++index8) + { + for (int index9 = 0; index9 < this.bgLoopsY; ++index9) + { + for (int index10 = 0; index10 < num15 / 16; ++index10) + { + for (int index11 = 0; index11 < 6; ++index11) + { + double num17 = (double) (this.bgStartY + index9 * 96 + index11 * 16 + 8); + int index12 = (int) (((double) (this.bgStartX + num15 * index8 + index10 * 16 + 8) + (double) Main.screenPosition.X) / 16.0); + double y2 = (double) Main.screenPosition.Y; + int index13 = (int) ((num17 + y2) / 16.0); + Microsoft.Xna.Framework.Color color3 = Lighting.GetColor(index12, index13); + if (WorldGen.InWorld(index12, index13)) + { + if (Main.tile[index12, index13] == null) + Main.tile[index12, index13] = new Tile(); + if (color3.R > (byte) 0 || color3.G > (byte) 0 || color3.B > (byte) 0) + { + if (!Main.drawToScreen) + { + VertexColors vertices; + Lighting.GetCornerColors(index12, index13, out vertices); + vertices.BottomLeftColor = new Microsoft.Xna.Framework.Color(vertices.BottomLeftColor.ToVector3() * vector3); + vertices.BottomRightColor = new Microsoft.Xna.Framework.Color(vertices.BottomRightColor.ToVector3() * vector3); + Main.tileBatch.Draw(TextureAssets.Background[numArray1[1]].Value, new Vector2((float) (this.bgStartX + num15 * index8 + 16 * index10 + num16), (float) (this.bgStartY + Main.backgroundHeight[numArray2[1]] * index9 + 16 * index11)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index10 + num16 + 16, 16 * index11, 16, 16)), vertices, Vector2.Zero, 1f, SpriteEffects.None); + } + else if (((int) color3.R > num3 || (double) color3.G > (double) num3 * 1.1 || (double) color3.B > (double) num3 * 1.2) && !Main.tile[index12, index13].active() && Main.wallLight[(int) Main.tile[index12, index13].wall] && (double) Main.ugBackTransition == 0.0) + { + Lighting.GetColor9Slice(index12, index13, ref slices); + try + { + for (int index14 = 0; index14 < 9; ++index14) + { + int num18 = 0; + int num19 = 0; + int width = 4; + int height = 4; + Microsoft.Xna.Framework.Color color4 = color3; + Microsoft.Xna.Framework.Color color5 = color3; + switch (index14) + { + case 0: + if (!Main.tile[index12 - 1, index13 - 1].active()) + { + color5 = slices[index14]; + break; + } + break; + case 1: + width = 8; + num18 = 4; + if (!Main.tile[index12, index13 - 1].active()) + { + color5 = slices[index14]; + break; + } + break; + case 2: + num18 = 12; + if (!Main.tile[index12 + 1, index13 - 1].active()) + { + color5 = slices[index14]; + break; + } + break; + case 3: + height = 8; + num19 = 4; + if (!Main.tile[index12 - 1, index13].active()) + { + color5 = slices[index14]; + break; + } + break; + case 4: + width = 8; + height = 8; + num18 = 4; + num19 = 4; + break; + case 5: + num18 = 12; + num19 = 4; + height = 8; + if (!Main.tile[index12 + 1, index13].active()) + { + color5 = slices[index14]; + break; + } + break; + case 6: + num19 = 12; + if (!Main.tile[index12 - 1, index13 + 1].active()) + { + color5 = slices[index14]; + break; + } + break; + case 7: + width = 8; + height = 4; + num18 = 4; + num19 = 12; + if (!Main.tile[index12, index13 + 1].active()) + { + color5 = slices[index14]; + break; + } + break; + case 8: + num18 = 12; + num19 = 12; + if (!Main.tile[index12 + 1, index13 + 1].active()) + { + color5 = slices[index14]; + break; + } + break; + } + color4.R = (byte) (((int) color3.R + (int) color5.R) / 2); + color4.G = (byte) (((int) color3.G + (int) color5.G) / 2); + color4.B = (byte) (((int) color3.B + (int) color5.B) / 2); + color4.R = (byte) ((double) color4.R * (double) x1); + color4.G = (byte) ((double) color4.G * (double) y1); + color4.B = (byte) ((double) color4.B * (double) z); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[1]].Value, new Vector2((float) (this.bgStartX + num15 * index8 + 16 * index10 + num18 + num16), (float) (this.bgStartY + Main.backgroundHeight[numArray1[1]] * index9 + 16 * index11 + num19)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index10 + num18 + num16 + 16, 16 * index11 + num19, width, height)), color4); + if ((double) Main.ugBackTransition > 0.0) + { + Microsoft.Xna.Framework.Color color6 = color4; + color6.R = (byte) ((double) color6.R * (double) Main.ugBackTransition); + color6.G = (byte) ((double) color6.G * (double) Main.ugBackTransition); + color6.B = (byte) ((double) color6.B * (double) Main.ugBackTransition); + color6.A = (byte) ((double) color6.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[1]].Value, new Vector2((float) (this.bgStartX + num15 * index8 + 16 * index10 + num18 + num16), (float) (this.bgStartY + Main.backgroundHeight[numArray2[1]] * index9 + 16 * index11 + num19)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index10 + num18 + num16 + 16, 16 * index11 + num19, width, height)), color6); + } + } + } + catch + { + color3.R = (byte) ((double) color3.R * (double) x1); + color3.G = (byte) ((double) color3.G * (double) y1); + color3.B = (byte) ((double) color3.B * (double) z); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[1]].Value, new Vector2((float) (this.bgStartX + num15 * index8 + 16 * index10 + num16), (float) (this.bgStartY + Main.backgroundHeight[numArray1[1]] * index9 + 16 * index11)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index10 + num16 + 16, 16 * index11, 16, 16)), color3); + } + } + else if (((int) color3.R > num4 || (double) color3.G > (double) num4 * 1.1 || (double) color3.B > (double) num4 * 1.2) && (double) Main.ugBackTransition == 0.0) + { + Lighting.GetColor4Slice(index12, index13, ref slices); + for (int index15 = 0; index15 < 4; ++index15) + { + int num20 = 0; + int num21 = 0; + Microsoft.Xna.Framework.Color color7 = color3; + Microsoft.Xna.Framework.Color color8 = slices[index15]; + switch (index15 - 1) + { + case 0: + num20 = 8; + break; + case 1: + num21 = 8; + break; + case 2: + num20 = 8; + num21 = 8; + break; + } + color7.R = (byte) (((int) color3.R + (int) color8.R) / 2); + color7.G = (byte) (((int) color3.G + (int) color8.G) / 2); + color7.B = (byte) (((int) color3.B + (int) color8.B) / 2); + color7.R = (byte) ((double) color7.R * (double) x1); + color7.G = (byte) ((double) color7.G * (double) y1); + color7.B = (byte) ((double) color7.B * (double) z); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[1]].Value, new Vector2((float) (this.bgStartX + num15 * index8 + 16 * index10 + num20 + num16), (float) (this.bgStartY + Main.backgroundHeight[numArray1[1]] * index9 + 16 * index11 + num21)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index10 + num20 + num16 + 16, 16 * index11 + num21, 8, 8)), color7); + if ((double) Main.ugBackTransition > 0.0) + { + Microsoft.Xna.Framework.Color color9 = color7; + color9.R = (byte) ((double) color9.R * (double) Main.ugBackTransition); + color9.G = (byte) ((double) color9.G * (double) Main.ugBackTransition); + color9.B = (byte) ((double) color9.B * (double) Main.ugBackTransition); + color9.A = (byte) ((double) color9.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[1]].Value, new Vector2((float) (this.bgStartX + num15 * index8 + 16 * index10 + num20 + num16), (float) (this.bgStartY + Main.backgroundHeight[numArray2[1]] * index9 + 16 * index11 + num21)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index10 + num20 + num16 + 16, 16 * index11 + num21, 8, 8)), color9); + } + } + } + else + { + color3.R = (byte) ((double) color3.R * (double) x1); + color3.G = (byte) ((double) color3.G * (double) y1); + color3.B = (byte) ((double) color3.B * (double) z); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[1]].Value, new Vector2((float) (this.bgStartX + num15 * index8 + 16 * index10 + num16), (float) (this.bgStartY + Main.backgroundHeight[numArray1[1]] * index9 + 16 * index11)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index10 + num16 + 16, 16 * index11, 16, 16)), color3); + if ((double) Main.ugBackTransition > 0.0) + { + Microsoft.Xna.Framework.Color color10 = color3; + color10.R = (byte) ((double) color10.R * (double) Main.ugBackTransition); + color10.G = (byte) ((double) color10.G * (double) Main.ugBackTransition); + color10.B = (byte) ((double) color10.B * (double) Main.ugBackTransition); + color10.A = (byte) ((double) color10.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[1]].Value, new Vector2((float) (this.bgStartX + num15 * index8 + 16 * index10 + num16), (float) (this.bgStartY + Main.backgroundHeight[numArray2[1]] * index9 + 16 * index11)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index10 + num16 + 16, 16 * index11, 16, 16)), color10); + } + } + } + else + { + color3.R = (byte) ((double) color3.R * (double) x1); + color3.G = (byte) ((double) color3.G * (double) y1); + color3.B = (byte) ((double) color3.B * (double) z); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[1]].Value, new Vector2((float) (this.bgStartX + num15 * index8 + 16 * index10 + num16), (float) (this.bgStartY + Main.backgroundHeight[numArray1[1]] * index9 + 16 * index11)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index10 + num16 + 16, 16 * index11, 16, 16)), color3); + } + } + } + } + } + } + if ((double) Main.ugBackTransition > 0.0) + { + int num22 = TextureAssets.Background[numArray2[1]].Width() - 32; + this.bgStartX = (int) (-Math.IEEERemainder((double) num22 + (double) Main.screenPosition.X * this.bgParallax, (double) num22) - (double) (num22 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num22 + 2; + num16 = (int) (float) Math.Round(-Math.IEEERemainder((double) this.bgStartX + (double) Main.screenPosition.X, 16.0)); + if (num16 == -8) + num16 = 8; + for (int index16 = 0; index16 < this.bgLoops; ++index16) + { + for (int index17 = 0; index17 < this.bgLoopsY; ++index17) + { + for (int index18 = 0; index18 < num22 / 16; ++index18) + { + for (int index19 = 0; index19 < 6; ++index19) + { + double num23 = (double) (this.bgStartY + index17 * 96 + index19 * 16 + 8); + int index20 = (int) (((double) (this.bgStartX + num22 * index16 + index18 * 16 + 8) + (double) Main.screenPosition.X) / 16.0); + double y3 = (double) Main.screenPosition.Y; + int index21 = (int) ((num23 + y3) / 16.0); + if (WorldGen.InWorld(index20, index21)) + { + Microsoft.Xna.Framework.Color color = Lighting.GetColor(index20, index21); + if (Main.tile[index20, index21] == null) + Main.tile[index20, index21] = new Tile(); + if (color.R > (byte) 0 || color.G > (byte) 0 || color.B > (byte) 0) + { + VertexColors vertices; + Lighting.GetCornerColors(index20, index21, out vertices, Main.ugBackTransition); + byte num24 = (byte) ((double) byte.MaxValue * (double) Main.ugBackTransition); + vertices.BottomLeftColor.A = num24; + vertices.BottomRightColor.A = num24; + vertices.TopLeftColor.A = num24; + vertices.TopRightColor.A = num24; + Main.tileBatch.Draw(TextureAssets.Background[numArray2[1]].Value, new Vector2((float) (this.bgStartX + num22 * index16 + 16 * index18 + num16), (float) (this.bgStartY + Main.backgroundHeight[numArray2[1]] * index17 + 16 * index19)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index18 + num16 + 16, 16 * index19, 16, 16)), vertices, Vector2.Zero, 1f, SpriteEffects.None); + } + } + } + } + } + } + } + num10 = 128; + if (flag2) + { + this.bgParallax = (double) Main.caveParallax; + this.bgStartX = (int) (-Math.IEEERemainder((double) num10 + (double) Main.screenPosition.X * this.bgParallax, (double) num10) - (double) (num10 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num10 + 2; + this.bgTopY = this.bgStartY + this.bgLoopsY * Main.backgroundHeight[2]; + if (this.bgTopY > -32) + { + for (int index22 = 0; index22 < this.bgLoops; ++index22) + { + for (int index23 = 0; index23 < num10 / 16; ++index23) + { + double num25 = (double) (this.bgStartX + num10 * index22 + index23 * 16 + 8); + float bgTopY = (float) this.bgTopY; + double x4 = (double) Main.screenPosition.X; + Microsoft.Xna.Framework.Color color11 = Lighting.GetColor((int) ((num25 + x4) / 16.0), (int) (((double) Main.screenPosition.Y + (double) bgTopY) / 16.0)); + color11.R = (byte) ((double) color11.R * (double) x1); + color11.G = (byte) ((double) color11.G * (double) y1); + color11.B = (byte) ((double) color11.B * (double) z); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[2]].Value, new Vector2((float) (this.bgStartX + num10 * index22 + 16 * index23 + num16), (float) this.bgTopY) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index23 + num16 + 16, 0, 16, 16)), color11); + if ((double) Main.ugBackTransition > 0.0) + { + Microsoft.Xna.Framework.Color color12 = color11; + color12.R = (byte) ((double) color12.R * (double) Main.ugBackTransition); + color12.G = (byte) ((double) color12.G * (double) Main.ugBackTransition); + color12.B = (byte) ((double) color12.B * (double) Main.ugBackTransition); + color12.A = (byte) ((double) color12.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[2]].Value, new Vector2((float) (this.bgStartX + num10 * index22 + 16 * index23 + num16), (float) this.bgTopY) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index23 + num16 + 16, 0, 16, 16)), color12); + } + } + } + } + } + } + if (num2 * 16.0 <= (double) Main.screenPosition.Y + (double) Main.screenHeight) + { + int y4 = 0; + int x5 = 0; + int height = Main.screenHeight + 200; + int width = Main.screenWidth + 100; + if ((double) Main.UnderworldLayer * 16.0 < (double) Main.screenPosition.Y + (double) Main.screenHeight) + { + int num26 = (int) ((double) this.hellBlackBoxBottom - (double) Main.screenPosition.Y + (double) vector2.Y); + if (height > num26) + height = num26; + } + Main.spriteBatch.Draw(TextureAssets.BlackTile.Value, new Microsoft.Xna.Framework.Rectangle(x5, y4, width, height), new Microsoft.Xna.Framework.Color(0, 0, 0)); + } + this.hellBlackBoxBottom = (float) ((double) Main.screenPosition.Y + (double) Main.screenHeight + 100.0); + this.bgTopY = (int) ((double) ((int) Main.rockLayer * 16) - (double) Main.screenPosition.Y + 16.0 + 600.0 - 8.0); + if (Main.rockLayer * 16.0 <= (double) Main.screenPosition.Y + (double) Main.screenHeight) + { + this.bgParallax = (double) Main.caveParallax; + this.bgStartX = (int) (-Math.IEEERemainder((double) num10 + (double) Main.screenPosition.X * this.bgParallax, (double) num10) - (double) (num10 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num10 + 2; + if (Main.rockLayer * 16.0 + (double) Main.screenHeight < (double) Main.screenPosition.Y - 16.0) + { + this.bgStartY = (int) (Math.IEEERemainder((double) this.bgTopY, (double) Main.backgroundHeight[3]) - (double) Main.backgroundHeight[3]); + this.bgLoopsY = (Main.screenHeight - this.bgStartY + (int) vector2.Y * 2) / Main.backgroundHeight[2] + 1; + } + else + { + this.bgStartY = this.bgTopY; + this.bgLoopsY = (Main.screenHeight - this.bgTopY + (int) vector2.Y * 2) / Main.backgroundHeight[2] + 1; + } + if (num2 * 16.0 < (double) Main.screenPosition.Y + (double) Main.screenHeight) + { + this.bgLoopsY = (int) (num2 * 16.0 - (double) Main.screenPosition.Y + 600.0 - (double) this.bgStartY) / Main.backgroundHeight[2]; + flag1 = true; + } + int num27 = (int) (float) Math.Round(-Math.IEEERemainder((double) this.bgStartX + (double) Main.screenPosition.X, 16.0)); + if (num27 == -8) + num27 = 8; + for (int index24 = 0; index24 < this.bgLoops; ++index24) + { + for (int index25 = 0; index25 < this.bgLoopsY; ++index25) + { + for (int index26 = 0; index26 < num10 / 16; ++index26) + { + for (int index27 = 0; index27 < 6; ++index27) + { + double num28 = (double) (this.bgStartY + index25 * 96 + index27 * 16 + 8); + int index28 = (int) (((double) (this.bgStartX + num10 * index24 + index26 * 16 + 8) + (double) Main.screenPosition.X) / 16.0); + double y5 = (double) Main.screenPosition.Y; + int index29 = (int) ((num28 + y5) / 16.0); + if (WorldGen.InWorld(index28, index29, 1)) + { + Microsoft.Xna.Framework.Color color13 = Lighting.GetColor(index28, index29); + if (Main.tile[index28, index29] == null) + Main.tile[index28, index29] = new Tile(); + bool flag3 = false; + if ((double) Main.caveParallax != 0.0) + { + if (Main.tile[index28 - 1, index29] == null) + Main.tile[index28 - 1, index29] = new Tile(); + if (Main.tile[index28 + 1, index29] == null) + Main.tile[index28 + 1, index29] = new Tile(); + if (Main.wallLight[(int) Main.tile[index28, index29].wall] || Main.wallLight[(int) Main.tile[index28 - 1, index29].wall] || Main.wallLight[(int) Main.tile[index28 + 1, index29].wall]) + flag3 = true; + } + else if (Main.wallLight[(int) Main.tile[index28, index29].wall]) + flag3 = true; + if ((flag3 || color13.R == (byte) 0 || color13.G == (byte) 0 || color13.B == (byte) 0) && (color13.R > (byte) 0 || color13.G > (byte) 0 || color13.B > (byte) 0) && (Main.wallLight[(int) Main.tile[index28, index29].wall] || (double) Main.caveParallax != 0.0)) + { + if (Lighting.NotRetro && color13.R < (byte) 230 && color13.G < (byte) 230 && color13.B < (byte) 230 && (double) Main.ugBackTransition == 0.0) + { + if (((int) color13.R > num3 || (double) color13.G > (double) num3 * 1.1 || (double) color13.B > (double) num3 * 1.2) && !Main.tile[index28, index29].active()) + { + Lighting.GetColor9Slice(index28, index29, ref slices); + for (int index30 = 0; index30 < 9; ++index30) + { + int num29 = 0; + int num30 = 0; + int width = 4; + int height = 4; + Microsoft.Xna.Framework.Color color14 = color13; + Microsoft.Xna.Framework.Color color15 = color13; + switch (index30) + { + case 0: + if (!Main.tile[index28 - 1, index29 - 1].active()) + { + color15 = slices[index30]; + break; + } + break; + case 1: + width = 8; + num29 = 4; + if (!Main.tile[index28, index29 - 1].active()) + { + color15 = slices[index30]; + break; + } + break; + case 2: + num29 = 12; + if (!Main.tile[index28 + 1, index29 - 1].active()) + { + color15 = slices[index30]; + break; + } + break; + case 3: + height = 8; + num30 = 4; + if (!Main.tile[index28 - 1, index29].active()) + { + color15 = slices[index30]; + break; + } + break; + case 4: + width = 8; + height = 8; + num29 = 4; + num30 = 4; + break; + case 5: + num29 = 12; + num30 = 4; + height = 8; + if (!Main.tile[index28 + 1, index29].active()) + { + color15 = slices[index30]; + break; + } + break; + case 6: + num30 = 12; + if (!Main.tile[index28 - 1, index29 + 1].active()) + { + color15 = slices[index30]; + break; + } + break; + case 7: + width = 8; + height = 4; + num29 = 4; + num30 = 12; + if (!Main.tile[index28, index29 + 1].active()) + { + color15 = slices[index30]; + break; + } + break; + case 8: + num29 = 12; + num30 = 12; + if (!Main.tile[index28 + 1, index29 + 1].active()) + { + color15 = slices[index30]; + break; + } + break; + } + color14.R = (byte) (((int) color13.R + (int) color15.R) / 2); + color14.G = (byte) (((int) color13.G + (int) color15.G) / 2); + color14.B = (byte) (((int) color13.B + (int) color15.B) / 2); + color14.R = (byte) ((double) color14.R * (double) x1); + color14.G = (byte) ((double) color14.G * (double) y1); + color14.B = (byte) ((double) color14.B * (double) z); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[3]].Value, new Vector2((float) (this.bgStartX + num10 * index24 + 16 * index26 + num29 + num27), (float) (this.bgStartY + Main.backgroundHeight[numArray1[3]] * index25 + 16 * index27 + num30)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index26 + num29 + num27 + 16, 16 * index27 + num30, width, height)), color14); + if ((double) Main.ugBackTransition > 0.0) + { + Microsoft.Xna.Framework.Color color16 = color14; + color16.R = (byte) ((double) color16.R * (double) Main.ugBackTransition); + color16.G = (byte) ((double) color16.G * (double) Main.ugBackTransition); + color16.B = (byte) ((double) color16.B * (double) Main.ugBackTransition); + color16.A = (byte) ((double) color16.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[3]].Value, new Vector2((float) (this.bgStartX + num10 * index24 + 16 * index26 + num29 + num27), (float) (this.bgStartY + Main.backgroundHeight[numArray2[3]] * index25 + 16 * index27 + num30)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index26 + num29 + num27 + 16, 16 * index27 + num30, width, height)), color16); + } + } + } + else if ((int) color13.R > num4 || (double) color13.G > (double) num4 * 1.1 || (double) color13.B > (double) num4 * 1.2) + { + Lighting.GetColor4Slice(index28, index29, ref slices); + for (int index31 = 0; index31 < 4; ++index31) + { + int num31 = 0; + int num32 = 0; + Microsoft.Xna.Framework.Color color17 = color13; + Microsoft.Xna.Framework.Color color18 = slices[index31]; + switch (index31 - 1) + { + case 0: + num31 = 8; + break; + case 1: + num32 = 8; + break; + case 2: + num31 = 8; + num32 = 8; + break; + } + color17.R = (byte) (((int) color13.R + (int) color18.R) / 2); + color17.G = (byte) (((int) color13.G + (int) color18.G) / 2); + color17.B = (byte) (((int) color13.B + (int) color18.B) / 2); + color17.R = (byte) ((double) color17.R * (double) x1); + color17.G = (byte) ((double) color17.G * (double) y1); + color17.B = (byte) ((double) color17.B * (double) z); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[3]].Value, new Vector2((float) (this.bgStartX + num10 * index24 + 16 * index26 + num31 + num27), (float) (this.bgStartY + Main.backgroundHeight[numArray1[3]] * index25 + 16 * index27 + num32)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index26 + num31 + num27 + 16, 16 * index27 + num32, 8, 8)), color17); + if ((double) Main.ugBackTransition > 0.0) + { + Microsoft.Xna.Framework.Color color19 = color17; + color19.R = (byte) ((double) color19.R * (double) Main.ugBackTransition); + color19.G = (byte) ((double) color19.G * (double) Main.ugBackTransition); + color19.B = (byte) ((double) color19.B * (double) Main.ugBackTransition); + color19.A = (byte) ((double) color19.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[3]].Value, new Vector2((float) (this.bgStartX + num10 * index24 + 16 * index26 + num31 + num27), (float) (this.bgStartY + Main.backgroundHeight[numArray2[3]] * index25 + 16 * index27 + num32)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index26 + num31 + num27 + 16, 16 * index27 + num32, 8, 8)), color19); + } + } + } + else + { + color13.R = (byte) ((double) color13.R * (double) x1); + color13.G = (byte) ((double) color13.G * (double) y1); + color13.B = (byte) ((double) color13.B * (double) z); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[3]].Value, new Vector2((float) (this.bgStartX + num10 * index24 + 16 * index26 + num27), (float) (this.bgStartY + Main.backgroundHeight[numArray1[3]] * index25 + 16 * index27)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index26 + num27 + 16, 16 * index27, 16, 16)), color13); + if ((double) Main.ugBackTransition > 0.0) + { + Microsoft.Xna.Framework.Color color20 = color13; + color20.R = (byte) ((double) color20.R * (double) Main.ugBackTransition); + color20.G = (byte) ((double) color20.G * (double) Main.ugBackTransition); + color20.B = (byte) ((double) color20.B * (double) Main.ugBackTransition); + color20.A = (byte) ((double) color20.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[3]].Value, new Vector2((float) (this.bgStartX + num10 * index24 + 16 * index26 + num27), (float) (this.bgStartY + Main.backgroundHeight[numArray2[3]] * index25 + 16 * index27)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index26 + num27 + 16, 16 * index27, 16, 16)), color20); + } + } + } + else + { + color13.R = (byte) ((double) color13.R * (double) x1); + color13.G = (byte) ((double) color13.G * (double) y1); + color13.B = (byte) ((double) color13.B * (double) z); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[3]].Value, new Vector2((float) (this.bgStartX + num10 * index24 + 16 * index26 + num27), (float) (this.bgStartY + Main.backgroundHeight[numArray1[3]] * index25 + 16 * index27)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index26 + num27 + 16, 16 * index27, 16, 16)), color13); + if ((double) Main.ugBackTransition > 0.0) + { + Microsoft.Xna.Framework.Color color21 = color13; + color21.R = (byte) ((double) color21.R * (double) Main.ugBackTransition); + color21.G = (byte) ((double) color21.G * (double) Main.ugBackTransition); + color21.B = (byte) ((double) color21.B * (double) Main.ugBackTransition); + color21.A = (byte) ((double) color21.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[3]].Value, new Vector2((float) (this.bgStartX + num10 * index24 + 16 * index26 + num27), (float) (this.bgStartY + Main.backgroundHeight[numArray2[3]] * index25 + 16 * index27)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index26 + num27 + 16, 16 * index27, 16, 16)), color21); + } + } + } + } + } + } + } + } + num10 = 128; + if (flag1) + { + this.bgParallax = (double) Main.caveParallax; + this.bgStartX = (int) (-Math.IEEERemainder((double) num10 + (double) Main.screenPosition.X * this.bgParallax, (double) num10) - (double) (num10 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num10 + 2; + this.bgTopY = this.bgStartY + this.bgLoopsY * Main.backgroundHeight[2]; + for (int index32 = 0; index32 < this.bgLoops; ++index32) + { + for (int index33 = 0; index33 < num10 / 16; ++index33) + { + double num33 = (double) (this.bgStartX + num10 * index32 + index33 * 16 + 8); + float bgTopY = (float) this.bgTopY; + double x6 = (double) Main.screenPosition.X; + Microsoft.Xna.Framework.Color color22 = Lighting.GetColor((int) ((num33 + x6) / 16.0), (int) (((double) Main.screenPosition.Y + (double) bgTopY) / 16.0)); + color22.R = (byte) ((double) color22.R * (double) x1); + color22.G = (byte) ((double) color22.G * (double) y1); + color22.B = (byte) ((double) color22.B * (double) z); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[4]].Value, new Vector2((float) (this.bgStartX + num10 * index32 + 16 * index33 + num27), (float) this.bgTopY) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index33 + num27 + 16, Main.magmaBGFrame * 16, 16, 16)), color22); + if ((double) Main.ugBackTransition > 0.0) + { + Microsoft.Xna.Framework.Color color23 = color22; + color23.R = (byte) ((double) color23.R * (double) Main.ugBackTransition); + color23.G = (byte) ((double) color23.G * (double) Main.ugBackTransition); + color23.B = (byte) ((double) color23.B * (double) Main.ugBackTransition); + color23.A = (byte) ((double) color23.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[4]].Value, new Vector2((float) (this.bgStartX + num10 * index32 + 16 * index33 + num27), (float) this.bgTopY) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index33 + num27 + 16, Main.magmaBGFrame * 16, 16, 16)), color23); + } + } + } + } + } + this.bgTopY = (int) ((double) ((int) num2 * 16) - (double) Main.screenPosition.Y + 16.0 + 600.0) - 8; + bool flag4 = false; + if (num2 * 16.0 <= (double) Main.screenPosition.Y + (double) Main.screenHeight) + { + this.bgStartX = (int) (-Math.IEEERemainder((double) num10 + (double) Main.screenPosition.X * this.bgParallax, (double) num10) - (double) (num10 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num10 + 2; + if (num2 * 16.0 + (double) Main.screenHeight < (double) Main.screenPosition.Y - 16.0) + { + this.bgStartY = (int) (Math.IEEERemainder((double) this.bgTopY, (double) Main.backgroundHeight[2]) - (double) Main.backgroundHeight[2]); + this.bgLoopsY = (Main.screenHeight - this.bgStartY + (int) vector2.Y * 2) / Main.backgroundHeight[2] + 1; + } + else + { + this.bgStartY = this.bgTopY; + this.bgLoopsY = (Main.screenHeight - this.bgTopY + (int) vector2.Y * 2) / Main.backgroundHeight[2] + 1; + } + if ((double) Main.UnderworldLayer * 16.0 < (double) Main.screenPosition.Y + (double) Main.screenHeight) + { + this.bgLoopsY = (int) Math.Ceiling(((double) Main.UnderworldLayer * 16.0 - (double) Main.screenPosition.Y - (double) this.bgStartY) / (double) Main.backgroundHeight[2]); + flag4 = true; + } + int num34 = (int) ((double) num3 * 1.5); + int num35 = (int) ((double) num4 * 1.5); + int num36 = (int) (float) Math.Round(-Math.IEEERemainder((double) this.bgStartX + (double) Main.screenPosition.X, 16.0)); + if (num36 == -8) + num36 = 8; + for (int index34 = 0; index34 < this.bgLoops; ++index34) + { + for (int index35 = 0; index35 < this.bgLoopsY; ++index35) + { + for (int index36 = 0; index36 < num10 / 16; ++index36) + { + for (int index37 = 0; index37 < 6; ++index37) + { + double num37 = (double) (this.bgStartY + index35 * 96 + index37 * 16 + 8); + int index38 = (int) (((double) (this.bgStartX + num10 * index34 + index36 * 16 + 8) + (double) Main.screenPosition.X) / 16.0); + double y6 = (double) Main.screenPosition.Y; + int index39 = (int) ((num37 + y6) / 16.0); + if (WorldGen.InWorld(index38, index39, 1)) + { + Microsoft.Xna.Framework.Color color24 = Lighting.GetColor(index38, index39); + if (Main.tile[index38, index39] == null) + Main.tile[index38, index39] = new Tile(); + bool flag5 = false; + if ((double) Main.caveParallax != 0.0) + { + if (Main.tile[index38 - 1, index39] == null) + Main.tile[index38 - 1, index39] = new Tile(); + if (Main.tile[index38 + 1, index39] == null) + Main.tile[index38 + 1, index39] = new Tile(); + if (Main.wallLight[(int) Main.tile[index38, index39].wall] || Main.wallLight[(int) Main.tile[index38 - 1, index39].wall] || Main.wallLight[(int) Main.tile[index38 + 1, index39].wall]) + flag5 = true; + } + else if (Main.wallLight[(int) Main.tile[index38, index39].wall]) + flag5 = true; + if ((flag5 || color24.R == (byte) 0 || color24.G == (byte) 0 || color24.B == (byte) 0) && (color24.R > (byte) 0 || color24.G > (byte) 0 || color24.B > (byte) 0 || index39 > Main.maxTilesY - 300) && (Main.wallLight[(int) Main.tile[index38, index39].wall] || (double) Main.caveParallax != 0.0)) + { + if (Lighting.NotRetro && color24.R < (byte) 230 && color24.G < (byte) 230 && color24.B < (byte) 230) + { + if (((int) color24.R > num34 || (double) color24.G > (double) num34 * 1.1 || (double) color24.B > (double) num34 * 1.2) && !Main.tile[index38, index39].active()) + { + Lighting.GetColor9Slice(index38, index39, ref slices); + for (int index40 = 0; index40 < 9; ++index40) + { + int num38 = 0; + int num39 = 0; + int width = 4; + int height = 4; + Microsoft.Xna.Framework.Color color25 = color24; + Microsoft.Xna.Framework.Color color26 = color24; + switch (index40) + { + case 0: + if (!Main.tile[index38 - 1, index39 - 1].active()) + { + color26 = slices[index40]; + break; + } + break; + case 1: + width = 8; + num38 = 4; + if (!Main.tile[index38, index39 - 1].active()) + { + color26 = slices[index40]; + break; + } + break; + case 2: + num38 = 12; + if (!Main.tile[index38 + 1, index39 - 1].active()) + { + color26 = slices[index40]; + break; + } + break; + case 3: + height = 8; + num39 = 4; + if (!Main.tile[index38 - 1, index39].active()) + { + color26 = slices[index40]; + break; + } + break; + case 4: + width = 8; + height = 8; + num38 = 4; + num39 = 4; + break; + case 5: + num38 = 12; + num39 = 4; + height = 8; + if (!Main.tile[index38 + 1, index39].active()) + { + color26 = slices[index40]; + break; + } + break; + case 6: + num39 = 12; + if (!Main.tile[index38 - 1, index39 + 1].active()) + { + color26 = slices[index40]; + break; + } + break; + case 7: + width = 8; + height = 4; + num38 = 4; + num39 = 12; + if (!Main.tile[index38, index39 + 1].active()) + { + color26 = slices[index40]; + break; + } + break; + case 8: + num38 = 12; + num39 = 12; + if (!Main.tile[index38 + 1, index39 + 1].active()) + { + color26 = slices[index40]; + break; + } + break; + } + color25.R = (byte) (((int) color24.R + (int) color26.R) / 2); + color25.G = (byte) (((int) color24.G + (int) color26.G) / 2); + color25.B = (byte) (((int) color24.B + (int) color26.B) / 2); + color25.R = (byte) ((double) color25.R * (double) x1); + color25.G = (byte) ((double) color25.G * (double) y1); + color25.B = (byte) ((double) color25.B * (double) z); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[5]].Value, new Vector2((float) (this.bgStartX + num10 * index34 + 16 * index36 + num38 + num36), (float) (this.bgStartY + Main.backgroundHeight[2] * index35 + 16 * index37 + num39)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index36 + num38 + num36 + 16, 16 * index37 + Main.backgroundHeight[2] * Main.magmaBGFrame + num39, width, height)), color25, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + else if ((int) color24.R > num35 || (double) color24.G > (double) num35 * 1.1 || (double) color24.B > (double) num35 * 1.2) + { + Lighting.GetColor4Slice(index38, index39, ref slices); + for (int index41 = 0; index41 < 4; ++index41) + { + int num40 = 0; + int num41 = 0; + Microsoft.Xna.Framework.Color color27 = color24; + Microsoft.Xna.Framework.Color color28 = slices[index41]; + switch (index41 - 1) + { + case 0: + num40 = 8; + break; + case 1: + num41 = 8; + break; + case 2: + num40 = 8; + num41 = 8; + break; + } + color27.R = (byte) (((int) color24.R + (int) color28.R) / 2); + color27.G = (byte) (((int) color24.G + (int) color28.G) / 2); + color27.B = (byte) (((int) color24.B + (int) color28.B) / 2); + color27.R = (byte) ((double) color27.R * (double) x1); + color27.G = (byte) ((double) color27.G * (double) y1); + color27.B = (byte) ((double) color27.B * (double) z); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[5]].Value, new Vector2((float) (this.bgStartX + num10 * index34 + 16 * index36 + num40 + num36), (float) (this.bgStartY + Main.backgroundHeight[2] * index35 + 16 * index37 + num41)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index36 + num40 + num36 + 16, 16 * index37 + Main.backgroundHeight[2] * Main.magmaBGFrame + num41, 8, 8)), color27, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + else + { + color24.R = (byte) ((double) color24.R * (double) x1); + color24.G = (byte) ((double) color24.G * (double) y1); + color24.B = (byte) ((double) color24.B * (double) z); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[5]].Value, new Vector2((float) (this.bgStartX + num10 * index34 + 16 * index36 + num36), (float) (this.bgStartY + Main.backgroundHeight[2] * index35 + 16 * index37)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index36 + num36 + 16, 16 * index37 + Main.backgroundHeight[2] * Main.magmaBGFrame, 16, 16)), color24, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + else + { + color24.R = (byte) ((double) color24.R * (double) x1); + color24.G = (byte) ((double) color24.G * (double) y1); + color24.B = (byte) ((double) color24.B * (double) z); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[5]].Value, new Vector2((float) (this.bgStartX + num10 * index34 + 16 * index36 + num36), (float) (this.bgStartY + Main.backgroundHeight[2] * index35 + 16 * index37)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index36 + num36 + 16, 16 * index37 + Main.backgroundHeight[2] * Main.magmaBGFrame, 16, 16)), color24, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + } + } + } + } + } + if (flag4) + { + this.bgParallax = (double) Main.caveParallax; + this.bgStartX = (int) (-Math.IEEERemainder((double) num10 + (double) Main.screenPosition.X * this.bgParallax, (double) num10) - (double) (num10 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num10 + 2; + this.bgTopY = this.bgStartY + this.bgLoopsY * Main.backgroundHeight[2]; + this.hellBlackBoxBottom = (float) this.bgTopY + Main.screenPosition.Y; + for (int index42 = 0; index42 < this.bgLoops; ++index42) + { + for (int index43 = 0; index43 < num10 / 16; ++index43) + { + double num42 = (double) (this.bgStartX + num10 * index42 + index43 * 16 + 8); + float bgTopY = (float) this.bgTopY; + double x7 = (double) Main.screenPosition.X; + Microsoft.Xna.Framework.Color color29 = Lighting.GetColor((int) ((num42 + x7) / 16.0), (int) (((double) Main.screenPosition.Y + (double) bgTopY) / 16.0)); + color29.R = (byte) ((double) color29.R * (double) x1); + color29.G = (byte) ((double) color29.G * (double) y1); + color29.B = (byte) ((double) color29.B * (double) z); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[6]].Value, new Vector2((float) (this.bgStartX + num10 * index42 + 16 * index43 + num36), (float) this.bgTopY) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index43 + num36 + 16, Main.magmaBGFrame * 16, 16, 16)), color29); + if ((double) Main.ugBackTransition > 0.0) + { + Microsoft.Xna.Framework.Color color30 = color29; + color30.R = (byte) ((double) color30.R * (double) Main.ugBackTransition); + color30.G = (byte) ((double) color30.G * (double) Main.ugBackTransition); + color30.B = (byte) ((double) color30.B * (double) Main.ugBackTransition); + color30.A = (byte) ((double) color30.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[6]].Value, new Vector2((float) (this.bgStartX + num10 * index42 + 16 * index43 + num36), (float) this.bgTopY) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index43 + num36 + 16, Main.magmaBGFrame * 16, 16, 16)), color30); + } + } + } + } + } + Lighting.GlobalBrightness = num9; + TimeLogger.DrawTime(3, stopwatch.Elapsed.TotalMilliseconds); + } + } + + public static Microsoft.Xna.Framework.Point GetScreenOverdrawOffset() => (Main.Camera.ScaledPosition - Main.Camera.UnscaledPosition).ToTileCoordinates(); + + protected void OldDrawBackground() + { + Microsoft.Xna.Framework.Color[] slices = new Microsoft.Xna.Framework.Color[9]; + Stopwatch stopwatch = new Stopwatch(); + stopwatch.Start(); + int num1 = (int) ((double) byte.MaxValue * (1.0 - (double) Main.gfxQuality) + 140.0 * (double) Main.gfxQuality); + int num2 = (int) (200.0 * (1.0 - (double) Main.gfxQuality) + 40.0 * (double) Main.gfxQuality); + int num3 = 128; + Vector2 vector2 = new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange); + if (Main.drawToScreen) + vector2 = Vector2.Zero; + double num4; + float num5 = (float) (num4 = 0.899999976158142); + float num6 = (float) num4; + float num7 = (float) num4; + float num8 = 0.0f; + if (Main.SceneMetrics.BloodTileCount > Main.SceneMetrics.EvilTileCount && Main.SceneMetrics.BloodTileCount > Main.SceneMetrics.HolyTileCount) + num8 = (float) Main.SceneMetrics.BloodTileCount; + else if (Main.SceneMetrics.HolyTileCount > Main.SceneMetrics.EvilTileCount) + num8 = (float) Main.SceneMetrics.HolyTileCount; + else if (Main.SceneMetrics.EvilTileCount > Main.SceneMetrics.HolyTileCount) + num8 = (float) Main.SceneMetrics.EvilTileCount; + float num9 = MathHelper.Clamp(num8 / 800f, 0.0f, 1f); + float num10 = (Main.screenPosition.Y - (float) (Main.worldSurface * 16.0)) / 300f; + if ((double) num10 < 0.0) + num10 = 0.0f; + else if ((double) num10 > 1.0) + num10 = 1f; + float num11 = (float) (1.0 * (1.0 - (double) num10) + (double) num5 * (double) num10); + Lighting.GlobalBrightness = (float) ((double) Lighting.GlobalBrightness * (1.0 - (double) num10) + 1.0 * (double) num10); + float num12 = MathHelper.Clamp((float) ((double) Main.screenPosition.Y - (double) (Main.screenHeight / 2) + 200.0 - Main.rockLayer * 16.0) / 300f, 0.0f, 1f); + if (Main.SceneMetrics.BloodTileCount > Main.SceneMetrics.EvilTileCount && Main.SceneMetrics.BloodTileCount > Main.SceneMetrics.HolyTileCount) + { + num5 = (float) (1.0 * (double) num9 + (double) num5 * (1.0 - (double) num9)); + num6 = (float) (0.550000011920929 * (double) num9 + (double) num6 * (1.0 - (double) num9)); + num7 = (float) (0.5 * (double) num9 + (double) num7 * (1.0 - (double) num9)); + } + else if (Main.SceneMetrics.EvilTileCount > 0) + { + num5 = (float) (0.800000011920929 * (double) num9 + (double) num5 * (1.0 - (double) num9)); + num6 = (float) (0.75 * (double) num9 + (double) num6 * (1.0 - (double) num9)); + num7 = (float) (1.10000002384186 * (double) num9 + (double) num7 * (1.0 - (double) num9)); + } + else if (Main.SceneMetrics.HolyTileCount > 0) + { + num5 = (float) (1.0 * (double) num9 + (double) num5 * (1.0 - (double) num9)); + num6 = (float) (0.699999988079071 * (double) num9 + (double) num6 * (1.0 - (double) num9)); + num7 = (float) (0.899999976158142 * (double) num9 + (double) num7 * (1.0 - (double) num9)); + } + float num13 = (float) (1.0 * ((double) num11 - (double) num12) + (double) num5 * (double) num12); + float num14 = (float) (1.0 * ((double) num11 - (double) num12) + (double) num6 * (double) num12); + float num15 = (float) (1.0 * ((double) num11 - (double) num12) + (double) num7 * (double) num12); + int num16 = (int) (((double) Main.screenPosition.X + (double) (Main.screenWidth / 2)) / 16.0); + int num17 = (num16 > Main.caveBackX[0] ? (num16 > Main.caveBackX[1] ? (num16 > Main.caveBackX[2] ? Main.caveBackStyle[3] : Main.caveBackStyle[2]) : Main.caveBackStyle[1]) : Main.caveBackStyle[0]) + 3; + if (Main.SceneMetrics.SnowTileCount > SceneMetrics.SnowTileThreshold && ((double) Main.screenPosition.Y + (double) Main.screenHeight) / 16.0 < (double) (Main.maxTilesY - 250)) + num17 = 1; + if (Main.SceneMetrics.JungleTileCount > SceneMetrics.JungleTileThreshold) + { + if (num17 == 1) + { + if (Main.SceneMetrics.JungleTileCount > Main.SceneMetrics.SnowTileCount) + num17 = 11; + } + else + num17 = 11; + } + if (Main.SceneMetrics.MushroomTileCount > SceneMetrics.MushroomTileMax) + num17 = 2; + if (num17 != Main.undergroundBackground) + { + Main.oldUndergroundBackground = Main.undergroundBackground; + Main.undergroundBackground = num17; + Main.ugBackTransition = 1f; + } + if ((double) Main.ugBackTransition > 0.0) + Main.ugBackTransition -= 0.25f; + if ((double) Main.ugBackTransition < 0.0) + Main.ugBackTransition = 0.0f; + int[] numArray1 = new int[6]; + int[] numArray2 = new int[6]; + for (int index1 = 0; index1 < 2; ++index1) + { + int undergroundBackground = Main.undergroundBackground; + if (index1 == 1) + undergroundBackground = Main.oldUndergroundBackground; + int[] numArray3 = new int[6]; + switch (undergroundBackground) + { + case 0: + numArray3[0] = 1; + numArray3[1] = 2; + numArray3[2] = 4; + numArray3[3] = 3; + numArray3[4] = 6; + numArray3[5] = 5; + break; + case 1: + switch (Main.iceBackStyle) + { + case 0: + numArray3[1] = 33; + numArray3[3] = 32; + numArray3[0] = 40; + numArray3[2] = 34; + break; + case 1: + numArray3[1] = 118; + numArray3[3] = 117; + numArray3[0] = 160; + numArray3[2] = 161; + break; + case 2: + numArray3[1] = 165; + numArray3[3] = 167; + numArray3[0] = 164; + numArray3[2] = 166; + break; + default: + numArray3[1] = 120; + numArray3[3] = 119; + numArray3[0] = 162; + numArray3[2] = 163; + break; + } + numArray3[4] = numArray3[3]; + break; + case 2: + numArray3[0] = 62; + numArray3[1] = 63; + numArray3[2] = 64; + numArray3[3] = 65; + numArray3[4] = 143 + Main.hellBackStyle; + break; + case 3: + numArray3[0] = 66; + numArray3[1] = 67; + numArray3[2] = 68; + numArray3[3] = 69; + numArray3[4] = 128 + Main.hellBackStyle; + break; + case 4: + numArray3[0] = 70; + numArray3[1] = 71; + numArray3[2] = 68; + numArray3[3] = 72; + numArray3[4] = 128 + Main.hellBackStyle; + break; + case 5: + numArray3[0] = 73; + numArray3[1] = 74; + numArray3[2] = 75; + numArray3[3] = 76; + numArray3[4] = 131 + Main.hellBackStyle; + break; + case 6: + numArray3[0] = 77; + numArray3[1] = 78; + numArray3[2] = 79; + numArray3[3] = 80; + numArray3[4] = 134 + Main.hellBackStyle; + break; + case 7: + numArray3[0] = 77; + numArray3[1] = 81; + numArray3[2] = 79; + numArray3[3] = 82; + numArray3[4] = 134 + Main.hellBackStyle; + break; + case 8: + numArray3[0] = 83; + numArray3[1] = 84; + numArray3[2] = 85; + numArray3[3] = 86; + numArray3[4] = 137 + Main.hellBackStyle; + break; + case 9: + numArray3[0] = 83; + numArray3[1] = 87; + numArray3[2] = 88; + numArray3[3] = 89; + numArray3[4] = 137 + Main.hellBackStyle; + break; + case 10: + numArray3[0] = 121; + numArray3[1] = 122; + numArray3[2] = 123; + numArray3[3] = 124; + numArray3[4] = 140 + Main.hellBackStyle; + break; + case 11: + if (Main.jungleBackStyle == 0) + { + numArray3[0] = 153; + numArray3[1] = 147; + numArray3[2] = 148; + numArray3[3] = 149; + numArray3[4] = 150 + Main.hellBackStyle; + break; + } + numArray3[0] = 146; + numArray3[1] = 154; + numArray3[2] = 155; + numArray3[3] = 156; + numArray3[4] = 157 + Main.hellBackStyle; + break; + } + if (Main.hellBackStyle == 0) + numArray3[5] = 125; + if (Main.hellBackStyle == 1) + numArray3[5] = 126; + if (Main.hellBackStyle == 2) + numArray3[5] = (int) sbyte.MaxValue; + this.LoadBackground(numArray3[0]); + this.LoadBackground(numArray3[1]); + this.LoadBackground(numArray3[2]); + this.LoadBackground(numArray3[3]); + this.LoadBackground(numArray3[4]); + this.LoadBackground(numArray3[5]); + if (index1 == 0) + { + for (int index2 = 0; index2 < 6; ++index2) + numArray1[index2] = numArray3[index2]; + } + else + { + for (int index3 = 0; index3 < 6; ++index3) + numArray2[index3] = numArray3[index3]; + } + } + float num18 = (float) (1.20000004768372 * (1.0 - (double) num12) + 1.0 * (double) num12); + this.bgParallax = (double) Main.caveParallax; + this.bgStartX = (int) (-Math.IEEERemainder((double) num3 + (double) Main.screenPosition.X * this.bgParallax, (double) num3) - (double) (num3 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num3 + 2; + this.bgTopY = (int) ((double) ((int) Main.worldSurface * 16 - 16) - (double) Main.screenPosition.Y + 16.0); + for (int index4 = 0; index4 < this.bgLoops; ++index4) + { + for (int index5 = 0; index5 < num3 / 16; ++index5) + { + int num19 = (int) (float) Math.Round(-Math.IEEERemainder((double) this.bgStartX + (double) Main.screenPosition.X, 16.0)); + if (num19 == -8) + num19 = 8; + double num20 = (double) (this.bgStartX + num3 * index4 + index5 * 16 + 8); + float bgTopY = (float) this.bgTopY; + double x = (double) Main.screenPosition.X; + Microsoft.Xna.Framework.Color color1 = Lighting.GetColor((int) ((num20 + x) / 16.0), (int) (((double) Main.screenPosition.Y + (double) bgTopY) / 16.0)); + color1.R = (byte) ((double) color1.R * (double) num13); + color1.G = (byte) ((double) color1.G * (double) num14); + color1.B = (byte) ((double) color1.B * (double) num15); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[0]].Value, new Vector2((float) (this.bgStartX + num3 * index4 + 16 * index5 + num19), (float) this.bgTopY) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index5 + num19 + 16, 0, 16, 16)), color1); + if ((double) Main.ugBackTransition > 0.0) + { + Microsoft.Xna.Framework.Color color2 = color1; + color2.R = (byte) ((double) color2.R * (double) Main.ugBackTransition); + color2.G = (byte) ((double) color2.G * (double) Main.ugBackTransition); + color2.B = (byte) ((double) color2.B * (double) Main.ugBackTransition); + color2.A = (byte) ((double) color2.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[0]].Value, new Vector2((float) (this.bgStartX + num3 * index4 + 16 * index5 + num19), (float) this.bgTopY) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index5 + num19 + 16, 0, 16, 16)), color2); + } + } + } + double num21 = (double) ((int) (((double) (Main.maxTilesY - 230) - Main.worldSurface) / 6.0) * 6); + double num22 = Main.worldSurface + num21 - 5.0; + bool flag1 = false; + bool flag2 = false; + this.bgTopY = (int) ((double) ((int) Main.worldSurface * 16) - (double) Main.screenPosition.Y + 16.0); + if (Main.worldSurface * 16.0 <= (double) Main.screenPosition.Y + (double) Main.screenHeight + (double) Main.offScreenRange) + { + this.bgParallax = (double) Main.caveParallax; + this.bgStartX = (int) (-Math.IEEERemainder((double) num3 + (double) Main.screenPosition.X * this.bgParallax, (double) num3) - (double) (num3 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num3 + 2; + if (Main.worldSurface * 16.0 < (double) Main.screenPosition.Y - 16.0) + { + this.bgStartY = (int) (Math.IEEERemainder((double) this.bgTopY, (double) Main.backgroundHeight[2]) - (double) Main.backgroundHeight[2]); + this.bgLoopsY = (Main.screenHeight - this.bgStartY + (int) vector2.Y * 2) / Main.backgroundHeight[2] + 1; + } + else + { + this.bgStartY = this.bgTopY; + this.bgLoopsY = (Main.screenHeight - this.bgTopY + (int) vector2.Y * 2) / Main.backgroundHeight[2] + 1; + } + if (Main.rockLayer * 16.0 < (double) Main.Camera.ScaledPosition.Y + 600.0) + { + this.bgLoopsY = (int) (Main.rockLayer * 16.0 - (double) Main.screenPosition.Y + 600.0 - (double) this.bgStartY) / Main.backgroundHeight[2]; + flag2 = true; + } + int num23 = (int) (float) Math.Round(-Math.IEEERemainder((double) this.bgStartX + (double) Main.screenPosition.X, 16.0)); + if (num23 == -8) + num23 = 8; + for (int index6 = 0; index6 < this.bgLoops; ++index6) + { + for (int index7 = 0; index7 < this.bgLoopsY; ++index7) + { + for (int index8 = 0; index8 < num3 / 16; ++index8) + { + for (int index9 = 0; index9 < 6; ++index9) + { + double num24 = (double) (this.bgStartY + index7 * 96 + index9 * 16 + 8); + int index10 = (int) (((double) (this.bgStartX + num3 * index6 + index8 * 16 + 8) + (double) Main.screenPosition.X) / 16.0); + double y = (double) Main.screenPosition.Y; + int index11 = (int) ((num24 + y) / 16.0); + Microsoft.Xna.Framework.Color color3 = Lighting.GetColor(index10, index11); + if (Main.tile[index10, index11] == null) + Main.tile[index10, index11] = new Tile(); + if (color3.R > (byte) 0 || color3.G > (byte) 0 || color3.B > (byte) 0) + { + if (!Main.drawToScreen) + { + VertexColors vertices; + Lighting.GetCornerColors(index10, index11, out vertices); + Main.tileBatch.Draw(TextureAssets.Background[numArray1[1]].Value, new Vector2((float) (this.bgStartX + num3 * index6 + 16 * index8 + num23), (float) (this.bgStartY + Main.backgroundHeight[numArray2[1]] * index7 + 16 * index9)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index8 + num23 + 16, 16 * index9, 16, 16)), vertices, Vector2.Zero, 1f, SpriteEffects.None); + } + else if (((int) color3.R > num1 || (double) color3.G > (double) num1 * 1.1 || (double) color3.B > (double) num1 * 1.2) && !Main.tile[index10, index11].active() && Main.wallLight[(int) Main.tile[index10, index11].wall] && (double) Main.ugBackTransition == 0.0) + { + Lighting.GetColor9Slice(index10, index11, ref slices); + try + { + for (int index12 = 0; index12 < 9; ++index12) + { + int num25 = 0; + int num26 = 0; + int width = 4; + int height = 4; + Microsoft.Xna.Framework.Color color4 = color3; + Microsoft.Xna.Framework.Color color5 = color3; + switch (index12) + { + case 0: + if (!Main.tile[index10 - 1, index11 - 1].active()) + { + color5 = slices[index12]; + break; + } + break; + case 1: + width = 8; + num25 = 4; + if (!Main.tile[index10, index11 - 1].active()) + { + color5 = slices[index12]; + break; + } + break; + case 2: + num25 = 12; + if (!Main.tile[index10 + 1, index11 - 1].active()) + { + color5 = slices[index12]; + break; + } + break; + case 3: + height = 8; + num26 = 4; + if (!Main.tile[index10 - 1, index11].active()) + { + color5 = slices[index12]; + break; + } + break; + case 4: + width = 8; + height = 8; + num25 = 4; + num26 = 4; + break; + case 5: + num25 = 12; + num26 = 4; + height = 8; + if (!Main.tile[index10 + 1, index11].active()) + { + color5 = slices[index12]; + break; + } + break; + case 6: + num26 = 12; + if (!Main.tile[index10 - 1, index11 + 1].active()) + { + color5 = slices[index12]; + break; + } + break; + case 7: + width = 8; + height = 4; + num25 = 4; + num26 = 12; + if (!Main.tile[index10, index11 + 1].active()) + { + color5 = slices[index12]; + break; + } + break; + case 8: + num25 = 12; + num26 = 12; + if (!Main.tile[index10 + 1, index11 + 1].active()) + { + color5 = slices[index12]; + break; + } + break; + } + color4.R = (byte) (((int) color3.R + (int) color5.R) / 2); + color4.G = (byte) (((int) color3.G + (int) color5.G) / 2); + color4.B = (byte) (((int) color3.B + (int) color5.B) / 2); + color4.R = (byte) ((double) color4.R * (double) num13); + color4.G = (byte) ((double) color4.G * (double) num14); + color4.B = (byte) ((double) color4.B * (double) num15); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[1]].Value, new Vector2((float) (this.bgStartX + num3 * index6 + 16 * index8 + num25 + num23), (float) (this.bgStartY + Main.backgroundHeight[numArray1[1]] * index7 + 16 * index9 + num26)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index8 + num25 + num23 + 16, 16 * index9 + num26, width, height)), color4); + if ((double) Main.ugBackTransition > 0.0) + { + Microsoft.Xna.Framework.Color color6 = color4; + color6.R = (byte) ((double) color6.R * (double) Main.ugBackTransition); + color6.G = (byte) ((double) color6.G * (double) Main.ugBackTransition); + color6.B = (byte) ((double) color6.B * (double) Main.ugBackTransition); + color6.A = (byte) ((double) color6.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[1]].Value, new Vector2((float) (this.bgStartX + num3 * index6 + 16 * index8 + num25 + num23), (float) (this.bgStartY + Main.backgroundHeight[numArray2[1]] * index7 + 16 * index9 + num26)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index8 + num25 + num23 + 16, 16 * index9 + num26, width, height)), color6); + } + } + } + catch + { + color3.R = (byte) ((double) color3.R * (double) num13); + color3.G = (byte) ((double) color3.G * (double) num14); + color3.B = (byte) ((double) color3.B * (double) num15); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[1]].Value, new Vector2((float) (this.bgStartX + num3 * index6 + 16 * index8 + num23), (float) (this.bgStartY + Main.backgroundHeight[numArray1[1]] * index7 + 16 * index9)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index8 + num23 + 16, 16 * index9, 16, 16)), color3); + } + } + else if (((int) color3.R > num2 || (double) color3.G > (double) num2 * 1.1 || (double) color3.B > (double) num2 * 1.2) && (double) Main.ugBackTransition == 0.0) + { + Lighting.GetColor4Slice(index10, index11, ref slices); + for (int index13 = 0; index13 < 4; ++index13) + { + int num27 = 0; + int num28 = 0; + Microsoft.Xna.Framework.Color color7 = color3; + Microsoft.Xna.Framework.Color color8 = slices[index13]; + switch (index13 - 1) + { + case 0: + num27 = 8; + break; + case 1: + num28 = 8; + break; + case 2: + num27 = 8; + num28 = 8; + break; + } + color7.R = (byte) (((int) color3.R + (int) color8.R) / 2); + color7.G = (byte) (((int) color3.G + (int) color8.G) / 2); + color7.B = (byte) (((int) color3.B + (int) color8.B) / 2); + color7.R = (byte) ((double) color7.R * (double) num13); + color7.G = (byte) ((double) color7.G * (double) num14); + color7.B = (byte) ((double) color7.B * (double) num15); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[1]].Value, new Vector2((float) (this.bgStartX + num3 * index6 + 16 * index8 + num27 + num23), (float) (this.bgStartY + Main.backgroundHeight[numArray1[1]] * index7 + 16 * index9 + num28)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index8 + num27 + num23 + 16, 16 * index9 + num28, 8, 8)), color7); + if ((double) Main.ugBackTransition > 0.0) + { + Microsoft.Xna.Framework.Color color9 = color7; + color9.R = (byte) ((double) color9.R * (double) Main.ugBackTransition); + color9.G = (byte) ((double) color9.G * (double) Main.ugBackTransition); + color9.B = (byte) ((double) color9.B * (double) Main.ugBackTransition); + color9.A = (byte) ((double) color9.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[1]].Value, new Vector2((float) (this.bgStartX + num3 * index6 + 16 * index8 + num27 + num23), (float) (this.bgStartY + Main.backgroundHeight[numArray2[1]] * index7 + 16 * index9 + num28)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index8 + num27 + num23 + 16, 16 * index9 + num28, 8, 8)), color9); + } + } + } + else + { + color3.R = (byte) ((double) color3.R * (double) num13); + color3.G = (byte) ((double) color3.G * (double) num14); + color3.B = (byte) ((double) color3.B * (double) num15); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[1]].Value, new Vector2((float) (this.bgStartX + num3 * index6 + 16 * index8 + num23), (float) (this.bgStartY + Main.backgroundHeight[numArray1[1]] * index7 + 16 * index9)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index8 + num23 + 16, 16 * index9, 16, 16)), color3); + if ((double) Main.ugBackTransition > 0.0) + { + Microsoft.Xna.Framework.Color color10 = color3; + color10.R = (byte) ((double) color10.R * (double) Main.ugBackTransition); + color10.G = (byte) ((double) color10.G * (double) Main.ugBackTransition); + color10.B = (byte) ((double) color10.B * (double) Main.ugBackTransition); + color10.A = (byte) ((double) color10.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[1]].Value, new Vector2((float) (this.bgStartX + num3 * index6 + 16 * index8 + num23), (float) (this.bgStartY + Main.backgroundHeight[numArray2[1]] * index7 + 16 * index9)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index8 + num23 + 16, 16 * index9, 16, 16)), color10); + } + } + } + else + { + color3.R = (byte) ((double) color3.R * (double) num13); + color3.G = (byte) ((double) color3.G * (double) num14); + color3.B = (byte) ((double) color3.B * (double) num15); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[1]].Value, new Vector2((float) (this.bgStartX + num3 * index6 + 16 * index8 + num23), (float) (this.bgStartY + Main.backgroundHeight[numArray1[1]] * index7 + 16 * index9)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index8 + num23 + 16, 16 * index9, 16, 16)), color3); + } + } + } + } + } + if ((double) Main.ugBackTransition > 0.0) + { + for (int index14 = 0; index14 < this.bgLoops; ++index14) + { + for (int index15 = 0; index15 < this.bgLoopsY; ++index15) + { + for (int index16 = 0; index16 < num3 / 16; ++index16) + { + for (int index17 = 0; index17 < 6; ++index17) + { + double num29 = (double) (this.bgStartY + index15 * 96 + index17 * 16 + 8); + int index18 = (int) (((double) (this.bgStartX + num3 * index14 + index16 * 16 + 8) + (double) Main.screenPosition.X) / 16.0); + double y = (double) Main.screenPosition.Y; + int index19 = (int) ((num29 + y) / 16.0); + Microsoft.Xna.Framework.Color color = Lighting.GetColor(index18, index19); + if (Main.tile[index18, index19] == null) + Main.tile[index18, index19] = new Tile(); + if (color.R > (byte) 0 || color.G > (byte) 0 || color.B > (byte) 0) + { + VertexColors vertices; + Lighting.GetCornerColors(index18, index19, out vertices, Main.ugBackTransition); + byte num30 = (byte) ((double) byte.MaxValue * (double) Main.ugBackTransition); + vertices.BottomLeftColor.A = num30; + vertices.BottomRightColor.A = num30; + vertices.TopLeftColor.A = num30; + vertices.TopRightColor.A = num30; + Main.tileBatch.Draw(TextureAssets.Background[numArray2[1]].Value, new Vector2((float) (this.bgStartX + num3 * index14 + 16 * index16 + num23), (float) (this.bgStartY + Main.backgroundHeight[numArray2[1]] * index15 + 16 * index17)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index16 + num23 + 16, 16 * index17, 16, 16)), vertices, Vector2.Zero, 1f, SpriteEffects.None); + } + } + } + } + } + } + if (flag2) + { + this.bgParallax = (double) Main.caveParallax; + this.bgStartX = (int) (-Math.IEEERemainder((double) num3 + (double) Main.screenPosition.X * this.bgParallax, (double) num3) - (double) (num3 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num3 + 2; + this.bgTopY = this.bgStartY + this.bgLoopsY * Main.backgroundHeight[2]; + if (this.bgTopY > -32) + { + for (int index20 = 0; index20 < this.bgLoops; ++index20) + { + for (int index21 = 0; index21 < num3 / 16; ++index21) + { + double num31 = (double) (this.bgStartX + num3 * index20 + index21 * 16 + 8); + float bgTopY = (float) this.bgTopY; + double x = (double) Main.screenPosition.X; + Microsoft.Xna.Framework.Color color11 = Lighting.GetColor((int) ((num31 + x) / 16.0), (int) (((double) Main.screenPosition.Y + (double) bgTopY) / 16.0)); + color11.R = (byte) ((double) color11.R * (double) num13); + color11.G = (byte) ((double) color11.G * (double) num14); + color11.B = (byte) ((double) color11.B * (double) num15); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[2]].Value, new Vector2((float) (this.bgStartX + num3 * index20 + 16 * index21 + num23), (float) this.bgTopY) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index21 + num23 + 16, 0, 16, 16)), color11); + if ((double) Main.ugBackTransition > 0.0) + { + Microsoft.Xna.Framework.Color color12 = color11; + color12.R = (byte) ((double) color12.R * (double) Main.ugBackTransition); + color12.G = (byte) ((double) color12.G * (double) Main.ugBackTransition); + color12.B = (byte) ((double) color12.B * (double) Main.ugBackTransition); + color12.A = (byte) ((double) color12.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[2]].Value, new Vector2((float) (this.bgStartX + num3 * index20 + 16 * index21 + num23), (float) this.bgTopY) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index21 + num23 + 16, 0, 16, 16)), color12); + } + } + } + } + } + } + this.bgTopY = (int) ((double) ((int) Main.rockLayer * 16) - (double) Main.screenPosition.Y + 16.0 + 600.0 - 8.0); + if (Main.rockLayer * 16.0 <= (double) Main.screenPosition.Y + 600.0) + { + this.bgParallax = (double) Main.caveParallax; + this.bgStartX = (int) (-Math.IEEERemainder((double) num3 + (double) Main.screenPosition.X * this.bgParallax, (double) num3) - (double) (num3 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num3 + 2; + if (Main.rockLayer * 16.0 + (double) Main.screenHeight < (double) Main.screenPosition.Y - 16.0) + { + this.bgStartY = (int) (Math.IEEERemainder((double) this.bgTopY, (double) Main.backgroundHeight[3]) - (double) Main.backgroundHeight[3]); + this.bgLoopsY = (Main.screenHeight - this.bgStartY + (int) vector2.Y * 2) / Main.backgroundHeight[2] + 1; + } + else + { + this.bgStartY = this.bgTopY; + this.bgLoopsY = (Main.screenHeight - this.bgTopY + (int) vector2.Y * 2) / Main.backgroundHeight[2] + 1; + } + if (num22 * 16.0 < (double) Main.screenPosition.Y + 600.0) + { + this.bgLoopsY = (int) (num22 * 16.0 - (double) Main.screenPosition.Y + 600.0 - (double) this.bgStartY) / Main.backgroundHeight[2]; + flag1 = true; + } + int num32 = (int) (float) Math.Round(-Math.IEEERemainder((double) this.bgStartX + (double) Main.screenPosition.X, 16.0)); + if (num32 == -8) + num32 = 8; + for (int index22 = 0; index22 < this.bgLoops; ++index22) + { + for (int index23 = 0; index23 < this.bgLoopsY; ++index23) + { + for (int index24 = 0; index24 < num3 / 16; ++index24) + { + for (int index25 = 0; index25 < 6; ++index25) + { + double num33 = (double) (this.bgStartY + index23 * 96 + index25 * 16 + 8); + int index26 = (int) (((double) (this.bgStartX + num3 * index22 + index24 * 16 + 8) + (double) Main.screenPosition.X) / 16.0); + double y = (double) Main.screenPosition.Y; + int index27 = (int) ((num33 + y) / 16.0); + Microsoft.Xna.Framework.Color color13 = Lighting.GetColor(index26, index27); + if (Main.tile[index26, index27] == null) + Main.tile[index26, index27] = new Tile(); + bool flag3 = false; + if ((double) Main.caveParallax != 0.0) + { + if (Main.tile[index26 - 1, index27] == null) + Main.tile[index26 - 1, index27] = new Tile(); + if (Main.tile[index26 + 1, index27] == null) + Main.tile[index26 + 1, index27] = new Tile(); + if (Main.wallLight[(int) Main.tile[index26, index27].wall] || Main.wallLight[(int) Main.tile[index26 - 1, index27].wall] || Main.wallLight[(int) Main.tile[index26 + 1, index27].wall]) + flag3 = true; + } + else if (Main.wallLight[(int) Main.tile[index26, index27].wall]) + flag3 = true; + if ((flag3 || color13.R == (byte) 0 || color13.G == (byte) 0 || color13.B == (byte) 0) && (color13.R > (byte) 0 || color13.G > (byte) 0 || color13.B > (byte) 0) && (Main.wallLight[(int) Main.tile[index26, index27].wall] || (double) Main.caveParallax != 0.0)) + { + if (Lighting.NotRetro && color13.R < (byte) 230 && color13.G < (byte) 230 && color13.B < (byte) 230 && (double) Main.ugBackTransition == 0.0) + { + if (((int) color13.R > num1 || (double) color13.G > (double) num1 * 1.1 || (double) color13.B > (double) num1 * 1.2) && !Main.tile[index26, index27].active()) + { + Lighting.GetColor9Slice(index26, index27, ref slices); + for (int index28 = 0; index28 < 9; ++index28) + { + int num34 = 0; + int num35 = 0; + int width = 4; + int height = 4; + Microsoft.Xna.Framework.Color color14 = color13; + Microsoft.Xna.Framework.Color color15 = color13; + switch (index28) + { + case 0: + if (!Main.tile[index26 - 1, index27 - 1].active()) + { + color15 = slices[index28]; + break; + } + break; + case 1: + width = 8; + num34 = 4; + if (!Main.tile[index26, index27 - 1].active()) + { + color15 = slices[index28]; + break; + } + break; + case 2: + num34 = 12; + if (!Main.tile[index26 + 1, index27 - 1].active()) + { + color15 = slices[index28]; + break; + } + break; + case 3: + height = 8; + num35 = 4; + if (!Main.tile[index26 - 1, index27].active()) + { + color15 = slices[index28]; + break; + } + break; + case 4: + width = 8; + height = 8; + num34 = 4; + num35 = 4; + break; + case 5: + num34 = 12; + num35 = 4; + height = 8; + if (!Main.tile[index26 + 1, index27].active()) + { + color15 = slices[index28]; + break; + } + break; + case 6: + num35 = 12; + if (!Main.tile[index26 - 1, index27 + 1].active()) + { + color15 = slices[index28]; + break; + } + break; + case 7: + width = 8; + height = 4; + num34 = 4; + num35 = 12; + if (!Main.tile[index26, index27 + 1].active()) + { + color15 = slices[index28]; + break; + } + break; + case 8: + num34 = 12; + num35 = 12; + if (!Main.tile[index26 + 1, index27 + 1].active()) + { + color15 = slices[index28]; + break; + } + break; + } + color14.R = (byte) (((int) color13.R + (int) color15.R) / 2); + color14.G = (byte) (((int) color13.G + (int) color15.G) / 2); + color14.B = (byte) (((int) color13.B + (int) color15.B) / 2); + color14.R = (byte) ((double) color14.R * (double) num13); + color14.G = (byte) ((double) color14.G * (double) num14); + color14.B = (byte) ((double) color14.B * (double) num15); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[3]].Value, new Vector2((float) (this.bgStartX + num3 * index22 + 16 * index24 + num34 + num32), (float) (this.bgStartY + Main.backgroundHeight[numArray1[3]] * index23 + 16 * index25 + num35)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index24 + num34 + num32 + 16, 16 * index25 + num35, width, height)), color14); + if ((double) Main.ugBackTransition > 0.0) + { + Microsoft.Xna.Framework.Color color16 = color14; + color16.R = (byte) ((double) color16.R * (double) Main.ugBackTransition); + color16.G = (byte) ((double) color16.G * (double) Main.ugBackTransition); + color16.B = (byte) ((double) color16.B * (double) Main.ugBackTransition); + color16.A = (byte) ((double) color16.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[3]].Value, new Vector2((float) (this.bgStartX + num3 * index22 + 16 * index24 + num34 + num32), (float) (this.bgStartY + Main.backgroundHeight[numArray2[3]] * index23 + 16 * index25 + num35)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index24 + num34 + num32 + 16, 16 * index25 + num35, width, height)), color16); + } + } + } + else if ((int) color13.R > num2 || (double) color13.G > (double) num2 * 1.1 || (double) color13.B > (double) num2 * 1.2) + { + Lighting.GetColor4Slice(index26, index27, ref slices); + for (int index29 = 0; index29 < 4; ++index29) + { + int num36 = 0; + int num37 = 0; + Microsoft.Xna.Framework.Color color17 = color13; + Microsoft.Xna.Framework.Color color18 = slices[index29]; + switch (index29 - 1) + { + case 0: + num36 = 8; + break; + case 1: + num37 = 8; + break; + case 2: + num36 = 8; + num37 = 8; + break; + } + color17.R = (byte) (((int) color13.R + (int) color18.R) / 2); + color17.G = (byte) (((int) color13.G + (int) color18.G) / 2); + color17.B = (byte) (((int) color13.B + (int) color18.B) / 2); + color17.R = (byte) ((double) color17.R * (double) num13); + color17.G = (byte) ((double) color17.G * (double) num14); + color17.B = (byte) ((double) color17.B * (double) num15); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[3]].Value, new Vector2((float) (this.bgStartX + num3 * index22 + 16 * index24 + num36 + num32), (float) (this.bgStartY + Main.backgroundHeight[numArray1[3]] * index23 + 16 * index25 + num37)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index24 + num36 + num32 + 16, 16 * index25 + num37, 8, 8)), color17); + if ((double) Main.ugBackTransition > 0.0) + { + Microsoft.Xna.Framework.Color color19 = color17; + color19.R = (byte) ((double) color19.R * (double) Main.ugBackTransition); + color19.G = (byte) ((double) color19.G * (double) Main.ugBackTransition); + color19.B = (byte) ((double) color19.B * (double) Main.ugBackTransition); + color19.A = (byte) ((double) color19.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[3]].Value, new Vector2((float) (this.bgStartX + num3 * index22 + 16 * index24 + num36 + num32), (float) (this.bgStartY + Main.backgroundHeight[numArray2[3]] * index23 + 16 * index25 + num37)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index24 + num36 + num32 + 16, 16 * index25 + num37, 8, 8)), color19); + } + } + } + else + { + color13.R = (byte) ((double) color13.R * (double) num13); + color13.G = (byte) ((double) color13.G * (double) num14); + color13.B = (byte) ((double) color13.B * (double) num15); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[3]].Value, new Vector2((float) (this.bgStartX + num3 * index22 + 16 * index24 + num32), (float) (this.bgStartY + Main.backgroundHeight[numArray1[3]] * index23 + 16 * index25)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index24 + num32 + 16, 16 * index25, 16, 16)), color13); + if ((double) Main.ugBackTransition > 0.0) + { + Microsoft.Xna.Framework.Color color20 = color13; + color20.R = (byte) ((double) color20.R * (double) Main.ugBackTransition); + color20.G = (byte) ((double) color20.G * (double) Main.ugBackTransition); + color20.B = (byte) ((double) color20.B * (double) Main.ugBackTransition); + color20.A = (byte) ((double) color20.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[3]].Value, new Vector2((float) (this.bgStartX + num3 * index22 + 16 * index24 + num32), (float) (this.bgStartY + Main.backgroundHeight[numArray2[3]] * index23 + 16 * index25)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index24 + num32 + 16, 16 * index25, 16, 16)), color20); + } + } + } + else + { + color13.R = (byte) ((double) color13.R * (double) num13); + color13.G = (byte) ((double) color13.G * (double) num14); + color13.B = (byte) ((double) color13.B * (double) num15); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[3]].Value, new Vector2((float) (this.bgStartX + num3 * index22 + 16 * index24 + num32), (float) (this.bgStartY + Main.backgroundHeight[numArray1[3]] * index23 + 16 * index25)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index24 + num32 + 16, 16 * index25, 16, 16)), color13); + if ((double) Main.ugBackTransition > 0.0) + { + Microsoft.Xna.Framework.Color color21 = color13; + color21.R = (byte) ((double) color21.R * (double) Main.ugBackTransition); + color21.G = (byte) ((double) color21.G * (double) Main.ugBackTransition); + color21.B = (byte) ((double) color21.B * (double) Main.ugBackTransition); + color21.A = (byte) ((double) color21.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[3]].Value, new Vector2((float) (this.bgStartX + num3 * index22 + 16 * index24 + num32), (float) (this.bgStartY + Main.backgroundHeight[numArray2[3]] * index23 + 16 * index25)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index24 + num32 + 16, 16 * index25, 16, 16)), color21); + } + } + } + } + } + } + } + num3 = 128; + if (flag1) + { + this.bgParallax = (double) Main.caveParallax; + this.bgStartX = (int) (-Math.IEEERemainder((double) num3 + (double) Main.screenPosition.X * this.bgParallax, (double) num3) - (double) (num3 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num3 + 2; + this.bgTopY = this.bgStartY + this.bgLoopsY * Main.backgroundHeight[2]; + for (int index30 = 0; index30 < this.bgLoops; ++index30) + { + for (int index31 = 0; index31 < num3 / 16; ++index31) + { + double num38 = (double) (this.bgStartX + num3 * index30 + index31 * 16 + 8); + float bgTopY = (float) this.bgTopY; + double x = (double) Main.screenPosition.X; + Microsoft.Xna.Framework.Color color22 = Lighting.GetColor((int) ((num38 + x) / 16.0), (int) (((double) Main.screenPosition.Y + (double) bgTopY) / 16.0)); + color22.R = (byte) ((double) color22.R * (double) num13); + color22.G = (byte) ((double) color22.G * (double) num14); + color22.B = (byte) ((double) color22.B * (double) num15); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[4]].Value, new Vector2((float) (this.bgStartX + num3 * index30 + 16 * index31 + num32), (float) this.bgTopY) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index31 + num32 + 16, Main.magmaBGFrame * 16, 16, 16)), color22); + if ((double) Main.ugBackTransition > 0.0) + { + Microsoft.Xna.Framework.Color color23 = color22; + color23.R = (byte) ((double) color23.R * (double) Main.ugBackTransition); + color23.G = (byte) ((double) color23.G * (double) Main.ugBackTransition); + color23.B = (byte) ((double) color23.B * (double) Main.ugBackTransition); + color23.A = (byte) ((double) color23.A * (double) Main.ugBackTransition); + Main.spriteBatch.Draw(TextureAssets.Background[numArray2[4]].Value, new Vector2((float) (this.bgStartX + num3 * index30 + 16 * index31 + num32), (float) this.bgTopY) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index31 + num32 + 16, Main.magmaBGFrame * 16, 16, 16)), color23); + } + } + } + } + } + this.bgTopY = (int) ((double) ((int) num22 * 16) - (double) Main.screenPosition.Y + 16.0 + 600.0) - 8; + if (num22 * 16.0 <= (double) Main.screenPosition.Y + 600.0) + { + this.bgStartX = (int) (-Math.IEEERemainder((double) num3 + (double) Main.screenPosition.X * this.bgParallax, (double) num3) - (double) (num3 / 2)) - (int) vector2.X; + this.bgLoops = (Main.screenWidth + (int) vector2.X * 2) / num3 + 2; + if (num22 * 16.0 + (double) Main.screenHeight < (double) Main.screenPosition.Y - 16.0) + { + this.bgStartY = (int) (Math.IEEERemainder((double) this.bgTopY, (double) Main.backgroundHeight[2]) - (double) Main.backgroundHeight[2]); + this.bgLoopsY = (Main.screenHeight - this.bgStartY + (int) vector2.Y * 2) / Main.backgroundHeight[2] + 1; + } + else + { + this.bgStartY = this.bgTopY; + this.bgLoopsY = (Main.screenHeight - this.bgTopY + (int) vector2.Y * 2) / Main.backgroundHeight[2] + 1; + } + int num39 = (int) ((double) num1 * 1.5); + int num40 = (int) ((double) num2 * 1.5); + int num41 = (int) (float) Math.Round(-Math.IEEERemainder((double) this.bgStartX + (double) Main.screenPosition.X, 16.0)); + if (num41 == -8) + num41 = 8; + for (int index32 = 0; index32 < this.bgLoops; ++index32) + { + for (int index33 = 0; index33 < this.bgLoopsY; ++index33) + { + for (int index34 = 0; index34 < num3 / 16; ++index34) + { + for (int index35 = 0; index35 < 6; ++index35) + { + double num42 = (double) (this.bgStartY + index33 * 96 + index35 * 16 + 8); + int index36 = (int) (((double) (this.bgStartX + num3 * index32 + index34 * 16 + 8) + (double) Main.screenPosition.X) / 16.0); + double y = (double) Main.screenPosition.Y; + int index37 = (int) ((num42 + y) / 16.0); + Microsoft.Xna.Framework.Color color24 = Lighting.GetColor(index36, index37); + if (Main.tile[index36, index37] == null) + Main.tile[index36, index37] = new Tile(); + bool flag4 = false; + if ((double) Main.caveParallax != 0.0) + { + if (Main.tile[index36 - 1, index37] == null) + Main.tile[index36 - 1, index37] = new Tile(); + if (Main.tile[index36 + 1, index37] == null) + Main.tile[index36 + 1, index37] = new Tile(); + if (Main.wallLight[(int) Main.tile[index36, index37].wall] || Main.wallLight[(int) Main.tile[index36 - 1, index37].wall] || Main.wallLight[(int) Main.tile[index36 + 1, index37].wall]) + flag4 = true; + } + else if (Main.wallLight[(int) Main.tile[index36, index37].wall]) + flag4 = true; + if ((flag4 || color24.R == (byte) 0 || color24.G == (byte) 0 || color24.B == (byte) 0) && (color24.R > (byte) 0 || color24.G > (byte) 0 || color24.B > (byte) 0) && (Main.wallLight[(int) Main.tile[index36, index37].wall] || (double) Main.caveParallax != 0.0)) + { + if (Lighting.NotRetro && color24.R < (byte) 230 && color24.G < (byte) 230 && color24.B < (byte) 230) + { + if (((int) color24.R > num39 || (double) color24.G > (double) num39 * 1.1 || (double) color24.B > (double) num39 * 1.2) && !Main.tile[index36, index37].active()) + { + Lighting.GetColor9Slice(index36, index37, ref slices); + for (int index38 = 0; index38 < 9; ++index38) + { + int num43 = 0; + int num44 = 0; + int width = 4; + int height = 4; + Microsoft.Xna.Framework.Color color25 = color24; + Microsoft.Xna.Framework.Color color26 = color24; + switch (index38) + { + case 0: + if (!Main.tile[index36 - 1, index37 - 1].active()) + { + color26 = slices[index38]; + break; + } + break; + case 1: + width = 8; + num43 = 4; + if (!Main.tile[index36, index37 - 1].active()) + { + color26 = slices[index38]; + break; + } + break; + case 2: + num43 = 12; + if (!Main.tile[index36 + 1, index37 - 1].active()) + { + color26 = slices[index38]; + break; + } + break; + case 3: + height = 8; + num44 = 4; + if (!Main.tile[index36 - 1, index37].active()) + { + color26 = slices[index38]; + break; + } + break; + case 4: + width = 8; + height = 8; + num43 = 4; + num44 = 4; + break; + case 5: + num43 = 12; + num44 = 4; + height = 8; + if (!Main.tile[index36 + 1, index37].active()) + { + color26 = slices[index38]; + break; + } + break; + case 6: + num44 = 12; + if (!Main.tile[index36 - 1, index37 + 1].active()) + { + color26 = slices[index38]; + break; + } + break; + case 7: + width = 8; + height = 4; + num43 = 4; + num44 = 12; + if (!Main.tile[index36, index37 + 1].active()) + { + color26 = slices[index38]; + break; + } + break; + case 8: + num43 = 12; + num44 = 12; + if (!Main.tile[index36 + 1, index37 + 1].active()) + { + color26 = slices[index38]; + break; + } + break; + } + color25.R = (byte) (((int) color24.R + (int) color26.R) / 2); + color25.G = (byte) (((int) color24.G + (int) color26.G) / 2); + color25.B = (byte) (((int) color24.B + (int) color26.B) / 2); + color25.R = (byte) ((double) color25.R * (double) num13); + color25.G = (byte) ((double) color25.G * (double) num14); + color25.B = (byte) ((double) color25.B * (double) num15); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[5]].Value, new Vector2((float) (this.bgStartX + num3 * index32 + 16 * index34 + num43 + num41), (float) (this.bgStartY + Main.backgroundHeight[2] * index33 + 16 * index35 + num44)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index34 + num43 + num41 + 16, 16 * index35 + Main.backgroundHeight[2] * Main.magmaBGFrame + num44, width, height)), color25, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + else if ((int) color24.R > num40 || (double) color24.G > (double) num40 * 1.1 || (double) color24.B > (double) num40 * 1.2) + { + Lighting.GetColor4Slice(index36, index37, ref slices); + for (int index39 = 0; index39 < 4; ++index39) + { + int num45 = 0; + int num46 = 0; + Microsoft.Xna.Framework.Color color27 = color24; + Microsoft.Xna.Framework.Color color28 = slices[index39]; + switch (index39 - 1) + { + case 0: + num45 = 8; + break; + case 1: + num46 = 8; + break; + case 2: + num45 = 8; + num46 = 8; + break; + } + color27.R = (byte) (((int) color24.R + (int) color28.R) / 2); + color27.G = (byte) (((int) color24.G + (int) color28.G) / 2); + color27.B = (byte) (((int) color24.B + (int) color28.B) / 2); + color27.R = (byte) ((double) color27.R * (double) num13); + color27.G = (byte) ((double) color27.G * (double) num14); + color27.B = (byte) ((double) color27.B * (double) num15); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[5]].Value, new Vector2((float) (this.bgStartX + num3 * index32 + 16 * index34 + num45 + num41), (float) (this.bgStartY + Main.backgroundHeight[2] * index33 + 16 * index35 + num46)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index34 + num45 + num41 + 16, 16 * index35 + Main.backgroundHeight[2] * Main.magmaBGFrame + num46, 8, 8)), color27, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + else + { + color24.R = (byte) ((double) color24.R * (double) num13); + color24.G = (byte) ((double) color24.G * (double) num14); + color24.B = (byte) ((double) color24.B * (double) num15); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[5]].Value, new Vector2((float) (this.bgStartX + num3 * index32 + 16 * index34 + num41), (float) (this.bgStartY + Main.backgroundHeight[2] * index33 + 16 * index35)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index34 + num41 + 16, 16 * index35 + Main.backgroundHeight[2] * Main.magmaBGFrame, 16, 16)), color24, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + else + { + color24.R = (byte) ((double) color24.R * (double) num13); + color24.G = (byte) ((double) color24.G * (double) num14); + color24.B = (byte) ((double) color24.B * (double) num15); + Main.spriteBatch.Draw(TextureAssets.Background[numArray1[5]].Value, new Vector2((float) (this.bgStartX + num3 * index32 + 16 * index34 + num41), (float) (this.bgStartY + Main.backgroundHeight[2] * index33 + 16 * index35)) + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(16 * index34 + num41 + 16, 16 * index35 + Main.backgroundHeight[2] * Main.magmaBGFrame, 16, 16)), color24, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + } + } + } + } + } + Lighting.GlobalBrightness = num18; + TimeLogger.DrawTime(3, stopwatch.Elapsed.TotalMilliseconds); + } + + protected void RenderBackground() + { + if (Main.drawToScreen) + return; + this.GraphicsDevice.SetRenderTarget(this.backWaterTarget); + this.GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent); + Main.spriteBatch.Begin(); + Main.tileBatch.Begin(); + try + { + this.DrawWaters(true); + } + catch + { + } + Main.tileBatch.End(); + Main.spriteBatch.End(); + this.GraphicsDevice.SetRenderTarget((RenderTarget2D) null); + this.GraphicsDevice.SetRenderTarget(this.backgroundTarget); + this.GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent); + Main.spriteBatch.Begin(); + Main.tileBatch.Begin(); + if (Main.ignoreErrors) + { + try + { + this.DrawBackground(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + this.DrawBackground(); + TimeLogger.DetailedDrawReset(); + Main.spriteBatch.End(); + Main.tileBatch.End(); + TimeLogger.DetailedDrawTime(33); + this.GraphicsDevice.SetRenderTarget((RenderTarget2D) null); + } + + protected void DrawToMap() + { + if (!Main.mapEnabled) + return; + int num1 = Main.maxTilesX / Main.textureMaxWidth; + int num2 = Main.maxTilesY / Main.textureMaxHeight; + for (int i = 0; i <= num1; ++i) + { + for (int j = 0; j <= num2; ++j) + { + if (!this.checkMap(i, j)) + return; + } + } + if (Main.clearMap) + { + for (int index1 = 0; index1 <= num1; ++index1) + { + for (int index2 = 0; index2 <= num2; ++index2) + { + this.GraphicsDevice.SetRenderTarget(this.mapTarget[index1, index2]); + this.GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent); + this.GraphicsDevice.SetRenderTarget((RenderTarget2D) null); + } + } + Main.clearMap = false; + } + int num3 = -1; + int num4 = -1; + bool flag = false; + int num5 = 0; + int mapMinY1 = Main.mapMinY; + int num6 = Main.mapMinY; + int num7 = Main.mapMaxY; + int mapMaxY = Main.mapMaxY; + int num8 = 1; + if (Main.mapMinY / Main.textureMaxHeight != Main.mapMaxY / Main.textureMaxHeight) + { + num7 = Main.textureMaxHeight; + num6 = Main.textureMaxHeight; + num8 = 2; + } + for (int index3 = 0; index3 < num8; ++index3) + { + switch (index3) + { + case 0: + Main.mapMinY = mapMinY1; + Main.mapMaxY = num7; + break; + case 1: + Main.mapMinY = num6; + Main.mapMaxY = mapMaxY; + break; + } + if (Main.mapMinX < 0) + Main.mapMinX = 0; + if (Main.mapMinX >= Main.maxTilesX) + Main.mapMinX = Main.maxTilesX - 1; + if (Main.mapMinY < 0) + Main.mapMinY = 0; + if (Main.mapMinY >= Main.maxTilesY) + Main.mapMinY = Main.maxTilesY - 1; + for (int mapMinX = Main.mapMinX; mapMinX < Main.mapMaxX; ++mapMinX) + { + for (int mapMinY2 = Main.mapMinY; mapMinY2 < Main.mapMaxY; ++mapMinY2) + { + MapTile tile = Main.Map[mapMinX, mapMinY2]; + if (tile.IsChanged && !this.mapTarget[mapMinX / Main.textureMaxWidth, mapMinY2 / Main.textureMaxHeight].IsContentLost) + { + ++num5; + if (num5 < Main.maxMapUpdates) + { + if (Main.loadMap) + Main.loadMapLastX = mapMinX; + Main.Map.ConsumeUpdate(mapMinX, mapMinY2); + int index4 = mapMinX / Main.textureMaxWidth; + int index5 = mapMinY2 / Main.textureMaxHeight; + if (index4 != num3 || index5 != num4) + { + num3 = index4; + num4 = index5; + if (flag) + { + Main.spriteBatch.End(); + this.GraphicsDevice.SetRenderTarget((RenderTarget2D) null); + } + flag = true; + this.GraphicsDevice.SetRenderTarget(this.mapTarget[index4, index5]); + Main.spriteBatch.Begin(); + } + int num9 = mapMinX - index4 * Main.textureMaxWidth; + int num10 = mapMinY2 - index5 * Main.textureMaxHeight; + Microsoft.Xna.Framework.Color mapTileXnaColor = MapHelper.GetMapTileXnaColor(ref tile); + int height = 1; + int width = 1; + int y = mapMinY2 + 1; + MapTile other; + MapTile mapTile; + while (y < Main.mapMaxY) + { + mapTile = other = Main.Map[mapMinX, y]; + if (mapTile.IsChanged && tile.Equals(ref other) && y / Main.textureMaxHeight == index5) + { + Main.Map.ConsumeUpdate(mapMinX, y); + ++height; + ++y; + ++mapMinY2; + } + else + break; + } + if (height == 1) + { + for (int x = mapMinX + 1; x < Main.mapMaxX; ++x) + { + mapTile = other = Main.Map[x, mapMinY2]; + if (mapTile.IsChanged && tile.Equals(ref other) && x / Main.textureMaxWidth == index4) + { + Main.Map.ConsumeUpdate(x, mapMinY2); + ++width; + } + else + break; + } + } + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, new Vector2((float) num9, (float) num10), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, width, height)), mapTileXnaColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + } + } + } + for (int index6 = 0; index6 < MapHelper.numUpdateTile; ++index6) + { + int x = (int) MapHelper.updateTileX[index6]; + int y = (int) MapHelper.updateTileY[index6]; + MapTile tile = Main.Map[x, y]; + if (tile.IsChanged) + { + Main.Map.ConsumeUpdate(x, y); + int index7 = x / Main.textureMaxWidth; + int index8 = y / Main.textureMaxHeight; + if (index7 != num3 || index8 != num4) + { + num3 = index7; + num4 = index8; + if (flag) + { + Main.spriteBatch.End(); + this.GraphicsDevice.SetRenderTarget((RenderTarget2D) null); + } + flag = true; + this.GraphicsDevice.SetRenderTarget(this.mapTarget[index7, index8]); + Main.spriteBatch.Begin(); + } + int num11 = x - index7 * Main.textureMaxWidth; + int num12 = y - index8 * Main.textureMaxHeight; + Microsoft.Xna.Framework.Color mapTileXnaColor = MapHelper.GetMapTileXnaColor(ref tile); + Main.spriteBatch.Draw(TextureAssets.MagicPixel.Value, new Vector2((float) num11, (float) num12), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 1, 1)), mapTileXnaColor, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + MapHelper.numUpdateTile = 0; + if (flag) + { + Main.spriteBatch.End(); + this.GraphicsDevice.SetRenderTarget((RenderTarget2D) null); + } + Main.mapReady = true; + Main.loadMapLastX = 0; + Main.loadMap = false; + Main.loadMapLock = false; + } + + protected void DrawToMap_Section(int secX, int secY) + { + Stopwatch stopwatch = Stopwatch.StartNew(); + Microsoft.Xna.Framework.Color[] mapColorCacheArray = Main._mapColorCacheArray; + int num1 = secX * 200; + int num2 = num1 + 200; + int num3 = secY * 150; + int num4 = num3 + 150; + int i = num1 / Main.textureMaxWidth; + int j = num3 / Main.textureMaxHeight; + int num5 = num1 % Main.textureMaxWidth; + int num6 = num3 % Main.textureMaxHeight; + if (!this.checkMap(i, j)) + return; + int index = 0; + Microsoft.Xna.Framework.Color transparent = Microsoft.Xna.Framework.Color.Transparent; + for (int y = num3; y < num4; ++y) + { + for (int x = num1; x < num2; ++x) + { + MapTile tile = Main.Map[x, y]; + mapColorCacheArray[index] = MapHelper.GetMapTileXnaColor(ref tile); + ++index; + } + } + try + { + this.GraphicsDevice.SetRenderTarget(this.mapTarget[i, j]); + } + catch (ObjectDisposedException ex) + { + Main.initMap[i, j] = false; + return; + } + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend); + TimeSpan elapsed = stopwatch.Elapsed; + double totalMilliseconds1 = elapsed.TotalMilliseconds; + this.mapSectionTexture.SetData(mapColorCacheArray, 0, mapColorCacheArray.Length); + elapsed = stopwatch.Elapsed; + double totalMilliseconds2 = elapsed.TotalMilliseconds; + elapsed = stopwatch.Elapsed; + totalMilliseconds1 = elapsed.TotalMilliseconds; + Main.spriteBatch.Draw((Texture2D) this.mapSectionTexture, new Vector2((float) num5, (float) num6), Microsoft.Xna.Framework.Color.White); + Main.spriteBatch.End(); + this.GraphicsDevice.SetRenderTarget((RenderTarget2D) null); + elapsed = stopwatch.Elapsed; + double totalMilliseconds3 = elapsed.TotalMilliseconds; + stopwatch.Stop(); + } + + public static string ValueToCoins(int value) + { + int num1 = value; + int num2 = 0; + int num3 = 0; + int num4 = 0; + while (num1 >= 1000000) + { + num1 -= 1000000; + ++num2; + } + while (num1 >= 10000) + { + num1 -= 10000; + ++num3; + } + while (num1 >= 100) + { + num1 -= 100; + ++num4; + } + int num5 = num1; + string str = ""; + if (num2 > 0) + str += string.Format("{0} {1} ", (object) num2, (object) Language.GetTextValue("Currency.Platinum").ToLower()); + if (num3 > 0) + str += string.Format("{0} {1} ", (object) num3, (object) Language.GetTextValue("Currency.Gold").ToLower()); + if (num4 > 0) + str += string.Format("{0} {1} ", (object) num4, (object) Language.GetTextValue("Currency.Silver").ToLower()); + if (num5 > 0) + str += string.Format("{0} {1} ", (object) num5, (object) Language.GetTextValue("Currency.Copper").ToLower()); + if (str.Length > 0) + str = str.Substring(0, str.Length - 1); + return str; + } + + private static void UpdateMinimapAnchors() + { + int num1 = 240; + int num2 = 240; + Main._minimapTopRightAnchorOffsetTowardsLeft = 292; + Main._minimapTopRightAnchorOffsetTowardsBottom = 90; + Main._minimapTopRightAnchorOffsetTowardsLeft = (int) ((double) (52 + num1 / 2) + (double) Main.MapScale * (double) num1 / 2.0); + Main._minimapTopRightAnchorOffsetTowardsBottom = (int) ((double) (90 + num2 / 2) - (double) Main.MapScale * (double) num2 / 2.0); + Main._minimapTopRightAnchorOffsetTowardsLeft = 52 + (int) (240.0 * (double) Main.MapScale); + Main._minimapTopRightAnchorOffsetTowardsBottom = 90; + } + + protected void DrawMap(GameTime gameTime) + { + string cursorText = ""; + if (!Main.mapEnabled || !Main.mapReady) + return; + float num1 = 0.0f; + float num2 = 0.0f; + float num3 = num1; + float num4 = num2; + byte alpha = byte.MaxValue; + int num5 = Main.maxTilesX / Main.textureMaxWidth; + int num6 = Main.maxTilesY / Main.textureMaxHeight; + float offScreenTiles1 = (float) Lighting.OffScreenTiles; + float offScreenTiles2 = (float) Lighting.OffScreenTiles; + float num7 = (float) (Main.maxTilesX - Lighting.OffScreenTiles - 1); + float num8 = (float) (Main.maxTilesY - Lighting.OffScreenTiles - 42); + float num9 = 0.0f; + float num10 = 0.0f; + float num11 = 10f; + float num12 = 10f; + float num13 = (float) (Main.maxTilesX - 10); + float num14 = (float) (Main.maxTilesY - 10); + for (int index1 = 0; index1 < this.mapTarget.GetLength(0); ++index1) + { + for (int index2 = 0; index2 < this.mapTarget.GetLength(1); ++index2) + { + if (this.mapTarget[index1, index2] != null) + { + if (this.mapTarget[index1, index2].IsContentLost && !Main.mapWasContentLost[index1, index2]) + { + Main.mapWasContentLost[index1, index2] = true; + Main.refreshMap = true; + Main.clearMap = true; + } + else if (!this.mapTarget[index1, index2].IsContentLost && Main.mapWasContentLost[index1, index2]) + Main.mapWasContentLost[index1, index2] = false; + } + } + } + float num15 = 200f; + float num16 = 300f; + float num17 = 0.0f; + float num18 = 0.0f; + float num19 = num13 - 1f; + float num20 = num14 - 1f; + float num21 = !Main.mapFullscreen ? (Main.mapStyle != 1 ? Main.mapOverlayScale : Main.mapMinimapScale) : Main.mapFullscreenScale; + bool flag1 = false; + float mapScale = Main.MapScale; + float num22 = 1f / mapScale; + int mouseX = Main.mouseX; + int mouseY = Main.mouseY; + Matrix uiScaleMatrix = Main.UIScaleMatrix; + Matrix transformMatrix1 = uiScaleMatrix; + Matrix transformMatrix2 = uiScaleMatrix; + Matrix scale = Matrix.CreateScale(mapScale); + int index3 = -1; + if (Main.mapStyle != 1) + transformMatrix1 = Matrix.Identity; + if (Main.mapFullscreen) + transformMatrix1 = Matrix.Identity; + if (!Main.mapFullscreen && Main.mapStyle == 1) + { + transformMatrix1 *= scale; + transformMatrix2 *= scale; + } + if (!Main.mapFullscreen) + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, transformMatrix1); + if ((double) num21 > 1.0) + flag1 = true; + } + if (Main.mapFullscreen) + { + if (Main.mouseLeft && this.IsActive && !CaptureManager.Instance.UsingMap) + { + if (Main.mouseLeftRelease) + { + Main.grabMapX = (float) Main.mouseX; + Main.grabMapY = (float) Main.mouseY; + } + else + { + float num23 = (float) Main.mouseX - Main.grabMapX; + float num24 = (float) Main.mouseY - Main.grabMapY; + Main.grabMapX = (float) Main.mouseX; + Main.grabMapY = (float) Main.mouseY; + float num25 = num23 * 0.06255f; + float num26 = num24 * 0.06255f; + Main.mapFullscreenPos.X -= num25 * (16f / Main.mapFullscreenScale); + Main.mapFullscreenPos.Y -= num26 * (16f / Main.mapFullscreenScale); + } + } + Main.player[Main.myPlayer].mouseInterface = true; + float num27 = (float) ((double) Main.screenWidth / (double) Main.maxTilesX * 0.598999977111816); + if ((double) Main.mapFullscreenScale < (double) num27) + Main.mapFullscreenScale = num27; + if ((double) Main.mapFullscreenScale > 31.2000007629395) + Main.mapFullscreenScale = 31.18f; + num21 = Main.mapFullscreenScale; + alpha = byte.MaxValue; + if ((double) Main.mapFullscreenPos.X < (double) num11) + Main.mapFullscreenPos.X = num11; + if ((double) Main.mapFullscreenPos.X > (double) num13) + Main.mapFullscreenPos.X = num13; + if ((double) Main.mapFullscreenPos.Y < (double) num12) + Main.mapFullscreenPos.Y = num12; + if ((double) Main.mapFullscreenPos.Y > (double) num14) + Main.mapFullscreenPos.Y = num14; + float num28 = Main.mapFullscreenPos.X; + float num29 = Main.mapFullscreenPos.Y; + if (Main.resetMapFull) + { + Main.resetMapFull = false; + num28 = (float) (((double) Main.screenPosition.X + (double) (Main.screenWidth / 2)) / 16.0); + num29 = (float) (((double) Main.screenPosition.Y + (double) (Main.screenHeight / 2)) / 16.0); + Main.mapFullscreenPos.X = num28; + Main.mapFullscreenPos.Y = num29; + } + float num30 = num28 * num21; + float num31 = num29 * num21; + float num32 = -num30 + (float) (Main.screenWidth / 2); + float num33 = -num31 + (float) (Main.screenHeight / 2); + num15 = num32 + num11 * num21; + num16 = num33 + num12 * num21; + float num34 = (float) (Main.maxTilesX / 840) * Main.mapFullscreenScale; + float num35 = num15; + float num36 = num16; + float num37 = (float) TextureAssets.Map.Width(); + float num38 = (float) TextureAssets.Map.Height(); + switch (Main.maxTilesX) + { + case 4200: + float num39 = num34 * 0.998f; + num35 -= 37.3f * num39; + num36 -= 1.7f * num39; + num37 = (num37 - 16f) * num39; + num38 = (num38 - 8.31f) * num39; + break; + case 6300: + float num40 = num34 * 1.09f; + num35 -= 39.8f * num40; + num36 = num16 - 4.08f * num40; + num37 = (num37 - 26.69f) * num40; + num38 = (num38 - 6.92f) * num40; + if ((double) num40 < 1.2) + { + num38 += 2f; + break; + } + break; + case 6400: + float num41 = num34 * 1.09f; + num35 -= 38.8f * num41; + num36 = num16 - 3.85f * num41; + num37 = (num37 - 13.6f) * num41; + num38 = (num38 - 6.92f) * num41; + if ((double) num41 < 1.2) + { + num38 += 2f; + break; + } + break; + case 8400: + float num42 = num34 * 0.999f; + num35 -= 40.6f * num42; + num36 = num16 - 5f * num42; + num37 = (num37 - 8.045f) * num42; + num38 = (num38 + 0.12f) * num42; + if ((double) num42 < 1.2) + { + ++num38; + break; + } + break; + } + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise); + flag1 = true; + Main.DrawMapFullscreenBackground(Main.screenPosition, Main.screenWidth, Main.screenHeight); + Microsoft.Xna.Framework.Rectangle destinationRectangle = new Microsoft.Xna.Framework.Rectangle((int) num35, (int) num36, (int) num37, (int) num38); + Main.spriteBatch.Draw(TextureAssets.Map.Value, destinationRectangle, Microsoft.Xna.Framework.Color.White); + if (Main.mouseLeft && Main.mouseLeftRelease) + { + double totalSeconds = gameTime.TotalGameTime.TotalSeconds; + if (totalSeconds - Main._lastPingMouseDownTime < 0.5 && (double) Vector2.Distance(Main.MouseScreen, Main._lastPingMousePosition) < 2.0) + Main.TriggerPing((Main.MouseScreen - new Vector2(num15 - 10f * num21, num16 - 10f * num21)) / num21); + Main._lastPingMouseDownTime = totalSeconds; + Main._lastPingMousePosition = Main.MouseScreen; + } + if ((double) num21 < 1.0) + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(); + flag1 = false; + } + } + else + { + switch (Main.mapStyle) + { + case 1: + Main.UpdateMinimapAnchors(); + Main.miniMapWidth = 240; + Main.miniMapHeight = 240; + Main.miniMapX = Main.screenWidth - Main._minimapTopRightAnchorOffsetTowardsLeft; + Main.miniMapY = Main._minimapTopRightAnchorOffsetTowardsBottom; + Main.miniMapX = (int) ((double) Main.miniMapX * (double) num22); + Main.miniMapY = (int) ((double) Main.miniMapY * (double) num22); + Main.mouseX = (int) ((double) Main.mouseX * (double) num22); + Main.mouseY = (int) ((double) Main.mouseY * (double) num22); + double num43 = (double) Main.miniMapHeight / (double) Main.maxTilesY; + if ((double) Main.mapMinimapScale < 0.2) + Main.mapMinimapScale = 0.2f; + if ((double) Main.mapMinimapScale > 3.0) + Main.mapMinimapScale = 3f; + if ((double) Main.mapMinimapAlpha < 0.01) + Main.mapMinimapAlpha = 0.01f; + if ((double) Main.mapMinimapAlpha > 1.0) + Main.mapMinimapAlpha = 1f; + num21 = Main.mapMinimapScale; + alpha = (byte) ((double) byte.MaxValue * (double) Main.mapMinimapAlpha); + num15 = (float) Main.miniMapX; + num16 = (float) Main.miniMapY; + num3 = num15; + num4 = num16; + double num44 = ((double) Main.screenPosition.X + (double) (PlayerInput.RealScreenWidth / 2)) / 16.0; + float num45 = (float) (((double) Main.screenPosition.Y + (double) (PlayerInput.RealScreenHeight / 2)) / 16.0); + num9 = (float) -(num44 - (double) (int) (((double) Main.screenPosition.X + (double) (PlayerInput.RealScreenWidth / 2)) / 16.0)) * num21; + num10 = (float) -((double) num45 - (double) (int) (((double) Main.screenPosition.Y + (double) (PlayerInput.RealScreenHeight / 2)) / 16.0)) * num21; + num19 = (float) Main.miniMapWidth / num21; + num20 = (float) Main.miniMapHeight / num21; + num17 = (float) (int) num44 - num19 / 2f; + num18 = (float) (int) num45 - num20 / 2f; + double num46 = (double) Main.maxTilesY + (double) num18; + float num47 = num3 - 6f; + float num48 = num4 - 6f; + Main.ActiveMinimapFrame.MinimapPosition = new Vector2(num47 + 10f, num48 + 10f); + Main.ActiveMinimapFrame.Update(); + Main.ActiveMinimapFrame.DrawBackground(Main.spriteBatch); + break; + case 2: + float num49 = (float) Main.screenWidth / (float) Main.maxTilesX; + if ((double) Main.mapOverlayScale < (double) num49) + Main.mapOverlayScale = num49; + if ((double) Main.mapOverlayScale > 16.0 * (double) Main.GameViewMatrix.Zoom.X) + Main.mapOverlayScale = 16f * Main.GameViewMatrix.Zoom.X; + if ((double) Main.mapOverlayAlpha < 0.01) + Main.mapOverlayAlpha = 0.01f; + if ((double) Main.mapOverlayAlpha > 1.0) + Main.mapOverlayAlpha = 1f; + num21 = Main.mapOverlayScale; + alpha = (byte) ((double) byte.MaxValue * (double) Main.mapOverlayAlpha); + int maxTilesX = Main.maxTilesX; + int maxTilesY = Main.maxTilesY; + float num50 = (float) (((double) Main.screenPosition.X + (double) (Main.screenWidth / 2)) / 16.0); + double num51 = ((double) Main.screenPosition.Y + (double) (Main.screenHeight / 2)) / 16.0; + float num52 = num50 * num21; + double num53 = (double) num21; + double num54 = num51 * num53; + float num55 = -num52 + (float) (Main.screenWidth / 2); + float num56 = (float) -num54 + (float) (Main.screenHeight / 2); + num15 = num55 + num11 * num21; + num16 = num56 + num12 * num21; + break; + } + } + if (Main.mapStyle == 1 && !Main.mapFullscreen) + { + if ((double) num17 < (double) num11) + num15 -= (num17 - num11) * num21; + if ((double) num18 < (double) num12) + num16 -= (num18 - num12) * num21; + } + float num57 = num17 + num19; + float num58 = num18 + num20; + if ((double) num17 > (double) num11) + num11 = num17; + if ((double) num18 > (double) num12) + num12 = num18; + if ((double) num57 < (double) num13) + num13 = num57; + if ((double) num58 < (double) num14) + num14 = num58; + float num59 = (float) Main.textureMaxWidth * num21; + float num60 = (float) Main.textureMaxHeight * num21; + float num61 = num15; + float num62 = 0.0f; + for (int index4 = 0; index4 <= 4; ++index4) + { + if ((double) ((index4 + 1) * Main.textureMaxWidth) > (double) num11 && (double) (index4 * Main.textureMaxWidth) < (double) num11 + (double) num13) + { + for (int index5 = 0; index5 <= num6; ++index5) + { + if ((double) ((index5 + 1) * Main.textureMaxHeight) > (double) num12 && (double) (index5 * Main.textureMaxHeight) < (double) num12 + (double) num14) + { + float num63 = num15 + (float) (int) ((double) index4 * (double) num59); + float num64 = num16 + (float) (int) ((double) index5 * (double) num60); + float num65 = (float) (index4 * Main.textureMaxWidth); + float num66 = (float) (index5 * Main.textureMaxHeight); + float num67 = 0.0f; + float num68 = 0.0f; + float num69; + if ((double) num65 < (double) num11) + { + num67 = num11 - num65; + num69 = num15; + } + else + num69 = num63 - num11 * num21; + float num70; + if ((double) num66 < (double) num12) + { + num68 = num12 - num66; + num70 = num16; + } + else + num70 = num64 - num12 * num21; + float num71 = num61; + float textureMaxWidth = (float) Main.textureMaxWidth; + float textureMaxHeight = (float) Main.textureMaxHeight; + float num72 = (float) ((index4 + 1) * Main.textureMaxWidth); + float num73 = (float) ((index5 + 1) * Main.textureMaxHeight); + if ((double) num72 >= (double) num13) + textureMaxWidth -= num72 - num13; + if ((double) num73 >= (double) num14) + textureMaxHeight -= num73 - num14; + float x = num71 + num9; + float y = num70 + num10; + if ((double) textureMaxWidth > (double) num67) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) num67, (int) num68, (int) textureMaxWidth - (int) num67, (int) textureMaxHeight - (int) num68); + Main.spriteBatch.Draw((Texture2D) this.mapTarget[index4, index5], new Vector2(x, y), new Microsoft.Xna.Framework.Rectangle?(rectangle), new Microsoft.Xna.Framework.Color((int) alpha, (int) alpha, (int) alpha, (int) alpha), 0.0f, new Vector2(), num21, SpriteEffects.None, 0.0f); + } + num62 = (float) ((int) textureMaxWidth - (int) num67) * num21; + } + if (index5 == num6) + num61 += num62; + } + } + } + if (flag1) + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, transformMatrix1); + } + if (!Main.mapFullscreen) + { + if (Main.mapStyle == 2) + { + float num74 = (float) (((double) num21 * 0.200000002980232 * 2.0 + 1.0) / 3.0); + if ((double) num74 > 1.0) + num74 = 1f; + float num75 = num74 * Main.UIScale; + Main.MapIcons.Draw(Vector2.Zero, new Vector2(num15 - 10f * num21, num16 - 10f * num21), new Microsoft.Xna.Framework.Rectangle?(), num21, num75, ref cursorText); + CoinLossRevengeSystem.RevengeMarker revengeMarker = NPC.RevengeManager.DrawMapIcons(Main.spriteBatch, Vector2.Zero, new Vector2(num15 - 10f * num21, num16 - 10f * num21), new Microsoft.Xna.Framework.Rectangle?(), num21, num75, ref cursorText); + this.DrawMiscMapIcons(Main.spriteBatch, Vector2.Zero, new Vector2(num15 - 10f * num21, num16 - 10f * num21), new Microsoft.Xna.Framework.Rectangle?(), num21, num75, ref cursorText); + Main.spriteBatch.End(); + if (revengeMarker != null) + { + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, uiScaleMatrix); + try + { + revengeMarker.UseMouseOver(Main.spriteBatch, ref cursorText, num75); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + Main.spriteBatch.End(); + } + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, transformMatrix1); + try + { + for (int index6 = 0; index6 < 200; ++index6) + { + if (Main.npc[index6].active && Main.npc[index6].townNPC) + { + ITownNPCProfile profile; + int npcID = !TownNPCProfiles.Instance.GetProfile(Main.npc[index6].type, out profile) ? NPC.TypeToDefaultHeadIndex(Main.npc[index6].type) : profile.GetHeadTextureIndex(Main.npc[index6]); + if (npcID > 0) + { + SpriteEffects dir = SpriteEffects.None; + if (Main.npc[index6].direction > 0) + dir = SpriteEffects.FlipHorizontally; + float num76 = (float) (((double) Main.npc[index6].position.X + (double) (Main.npc[index6].width / 2)) / 16.0) * num21; + float num77 = (float) (((double) Main.npc[index6].position.Y + (double) (Main.npc[index6].height / 2)) / 16.0) * num21; + float num78 = num76 + num15; + float num79 = num77 + num16; + float x = num78 - 10f * num21; + float y = num79 - 10f * num21; + Main.DrawNPCHeadFriendly((Entity) Main.npc[index6], alpha, num75, dir, npcID, x, y); + } + } + if (Main.npc[index6].active && Main.npc[index6].GetBossHeadTextureIndex() != -1) + { + float bossHeadRotation = Main.npc[index6].GetBossHeadRotation(); + SpriteEffects headSpriteEffects = Main.npc[index6].GetBossHeadSpriteEffects(); + Vector2 vector2 = Main.npc[index6].Center + new Vector2(0.0f, Main.npc[index6].gfxOffY); + if (Main.npc[index6].type == 134) + { + Vector2 center = Main.npc[index6].Center; + int num80 = 1; + for (int index7 = (int) Main.npc[index6].ai[0]; num80 < 15 && Main.npc[index7].active && Main.npc[index7].type >= 134 && Main.npc[index7].type <= 136; index7 = (int) Main.npc[index7].ai[0]) + { + ++num80; + center += Main.npc[index7].Center; + } + vector2 = center / (float) num80; + } + int headTextureIndex = Main.npc[index6].GetBossHeadTextureIndex(); + float num81 = vector2.X / 16f * num21; + float num82 = vector2.Y / 16f * num21; + float num83 = num81 + num15; + float num84 = num82 + num16; + float x = num83 - 10f * num21; + float y = num84 - 10f * num21; + Main.DrawNPCHeadBoss((Entity) Main.npc[index6], alpha, num75, bossHeadRotation, headSpriteEffects, headTextureIndex, x, y); + } + } + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, transformMatrix1); + for (int index8 = 0; index8 < (int) byte.MaxValue; ++index8) + { + if (Main.player[index8].active && !Main.player[index8].dead && index8 != Main.myPlayer && (!Main.player[Main.myPlayer].hostile && !Main.player[index8].hostile || Main.player[Main.myPlayer].team == Main.player[index8].team && Main.player[index8].team != 0 || index8 == Main.myPlayer)) + { + float num85 = (float) (((double) Main.player[index8].position.X + (double) (Main.player[index8].width / 2)) / 16.0) * num21; + float num86 = Main.player[index8].position.Y / 16f * num21; + float num87 = num85 + num15; + float num88 = num86 + num16; + float num89 = num87 - 6f; + float num90 = num88 - 2f - (float) (2.0 - (double) num21 / 5.0 * 2.0); + float x = num89 - 10f * num21; + float y = num90 - 10f * num21; + Microsoft.Xna.Framework.Color headBordersColor = Main.GetPlayerHeadBordersColor(Main.player[index8]); + Main.MapPlayerRenderer.DrawPlayerHead(Main.Camera, Main.player[index8], new Vector2(x, y), (float) alpha / (float) byte.MaxValue, num75, headBordersColor); + } + } + Main.spriteBatch.End(); + Main.spriteBatch.Begin(); + } + if (Main.mapStyle == 1) + { + float num91 = (float) (((double) num21 * 0.25 * 2.0 + 1.0) / 3.0); + if ((double) num91 > 1.0) + num91 = 1f; + Main.MapIcons.Draw(new Vector2(num17, num18), new Vector2(num3 + num9, num4 + num10), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(Main.miniMapX, Main.miniMapY, Main.miniMapWidth, Main.miniMapHeight)), num21, num91, ref cursorText); + CoinLossRevengeSystem.RevengeMarker revengeMarker = NPC.RevengeManager.DrawMapIcons(Main.spriteBatch, new Vector2(num17, num18), new Vector2(num3 + num9, num4 + num10), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(Main.miniMapX, Main.miniMapY, Main.miniMapWidth, Main.miniMapHeight)), num21, num91, ref cursorText); + this.DrawMiscMapIcons(Main.spriteBatch, new Vector2(num17, num18), new Vector2(num3 + num9, num4 + num10), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(Main.miniMapX, Main.miniMapY, Main.miniMapWidth, Main.miniMapHeight)), num21, num91, ref cursorText); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, transformMatrix2); + for (int index9 = 0; index9 < 200; ++index9) + { + if (Main.npc[index9].active && Main.npc[index9].townNPC) + { + ITownNPCProfile profile; + int npcID = !TownNPCProfiles.Instance.GetProfile(Main.npc[index9].type, out profile) ? NPC.TypeToDefaultHeadIndex(Main.npc[index9].type) : profile.GetHeadTextureIndex(Main.npc[index9]); + if (npcID > 0) + { + SpriteEffects dir = SpriteEffects.None; + if (Main.npc[index9].direction > 0) + dir = SpriteEffects.FlipHorizontally; + float num92 = ((float) (((double) Main.npc[index9].position.X + (double) Main.npc[index9].width / 2.0) / 16.0) - num17) * num21; + float num93 = ((float) (((double) Main.npc[index9].position.Y + (double) Main.npc[index9].gfxOffY + (double) Main.npc[index9].height / 2.0) / 16.0) - num18) * num21; + float num94 = num92 + num3; + float num95 = num93 + num4 - (float) (2.0 * (double) num21 / 5.0); + float x = num94 + num9; + float y = num95 + num10; + if ((double) x > (double) (Main.miniMapX + 12) && (double) x < (double) (Main.miniMapX + Main.miniMapWidth - 16) && (double) y > (double) (Main.miniMapY + 10) && (double) y < (double) (Main.miniMapY + Main.miniMapHeight - 14)) + { + float num96 = x - (float) (TextureAssets.NpcHead[npcID].Width() / 2) * num91; + float num97 = y - (float) (TextureAssets.NpcHead[npcID].Height() / 2) * num91; + float num98 = num96 + (float) TextureAssets.NpcHead[npcID].Width() * num91; + float num99 = num97 + (float) TextureAssets.NpcHead[npcID].Height() * num91; + if ((double) Main.mouseX >= (double) num96 && (double) Main.mouseX <= (double) num98 && (double) Main.mouseY >= (double) num97 && (double) Main.mouseY <= (double) num99) + cursorText = Main.npc[index9].FullName; + Main.DrawNPCHeadFriendly((Entity) Main.npc[index9], alpha, num91, dir, npcID, x, y); + } + } + } + if (Main.npc[index9].active && Main.npc[index9].GetBossHeadTextureIndex() != -1) + { + float bossHeadRotation = Main.npc[index9].GetBossHeadRotation(); + SpriteEffects headSpriteEffects = Main.npc[index9].GetBossHeadSpriteEffects(); + Vector2 vector2 = Main.npc[index9].Center + new Vector2(0.0f, Main.npc[index9].gfxOffY); + if (Main.npc[index9].type == 134) + { + Vector2 center = Main.npc[index9].Center; + int num100 = 1; + for (int index10 = (int) Main.npc[index9].ai[0]; num100 < 15 && Main.npc[index10].active && Main.npc[index10].type >= 134 && Main.npc[index10].type <= 136; index10 = (int) Main.npc[index10].ai[0]) + { + ++num100; + center += Main.npc[index10].Center; + } + vector2 = center / (float) num100; + } + int headTextureIndex = Main.npc[index9].GetBossHeadTextureIndex(); + float num101 = (vector2.X / 16f - num17) * num21; + float num102 = (vector2.Y / 16f - num18) * num21; + float num103 = num101 + num3; + float num104 = num102 + num4 - (float) (2.0 * (double) num21 / 5.0); + float x = num103 + num9; + float y = num104 + num10; + if ((double) x > (double) (Main.miniMapX + 12) && (double) x < (double) (Main.miniMapX + Main.miniMapWidth - 16) && (double) y > (double) (Main.miniMapY + 10) && (double) y < (double) (Main.miniMapY + Main.miniMapHeight - 14)) + { + float num105 = x - (float) (TextureAssets.NpcHeadBoss[headTextureIndex].Width() / 2) * num91; + float num106 = y - (float) (TextureAssets.NpcHeadBoss[headTextureIndex].Height() / 2) * num91; + float num107 = num105 + (float) TextureAssets.NpcHeadBoss[headTextureIndex].Width() * num91; + float num108 = num106 + (float) TextureAssets.NpcHeadBoss[headTextureIndex].Height() * num91; + if ((double) Main.mouseX >= (double) num105 && (double) Main.mouseX <= (double) num107 && (double) Main.mouseY >= (double) num106 && (double) Main.mouseY <= (double) num108) + cursorText = Main.npc[index9].GivenOrTypeName; + Main.DrawNPCHeadBoss((Entity) Main.npc[index9], alpha, num91, bossHeadRotation, headSpriteEffects, headTextureIndex, x, y); + } + } + } + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, transformMatrix2); + for (int index11 = 0; index11 < (int) byte.MaxValue; ++index11) + { + if (Main.player[index11].active && (!Main.player[Main.myPlayer].hostile && !Main.player[index11].hostile || Main.player[Main.myPlayer].team == Main.player[index11].team && Main.player[index11].team != 0 || index11 == Main.myPlayer)) + { + float num109 = ((float) (((double) Main.player[index11].position.X + (double) (Main.player[index11].width / 2)) / 16.0) - num17) * num21; + float num110 = ((float) (((double) Main.player[index11].position.Y + (double) Main.player[index11].gfxOffY + (double) (Main.player[index11].height / 2)) / 16.0) - num18) * num21; + float num111 = num109 + num3; + float num112 = num110 + num4; + float num113 = num111 - 6f; + float num114 = num112 - 6f - (float) (2.0 - (double) num21 / 5.0 * 2.0); + float x1 = num113 + num9; + float y1 = num114 + num10; + if (!Main.player[index11].dead && (double) x1 > (double) (Main.miniMapX + 6) && (double) x1 < (double) (Main.miniMapX + Main.miniMapWidth - 16) && (double) y1 > (double) (Main.miniMapY + 6) && (double) y1 < (double) (Main.miniMapY + Main.miniMapHeight - 14)) + { + Microsoft.Xna.Framework.Color headBordersColor = Main.GetPlayerHeadBordersColor(Main.player[index11]); + Main.MapPlayerRenderer.DrawPlayerHead(Main.Camera, Main.player[index11], new Vector2(x1, y1), (float) alpha / (float) byte.MaxValue, num91, headBordersColor); + if (index11 != Main.myPlayer) + { + float num115 = (float) ((double) x1 + 4.0 - 14.0 * (double) num91); + float num116 = (float) ((double) y1 + 2.0 - 14.0 * (double) num91); + float num117 = num115 + 28f * num91; + float num118 = num116 + 28f * num91; + if ((double) Main.mouseX >= (double) num115 && (double) Main.mouseX <= (double) num117 && (double) Main.mouseY >= (double) num116 && (double) Main.mouseY <= (double) num118) + cursorText = Main.player[index11].name; + } + } + if (Main.player[index11].showLastDeath) + { + float num119 = (Main.player[index11].lastDeathPostion.X / 16f - num17) * num21; + float num120 = (Main.player[index11].lastDeathPostion.Y / 16f - num18) * num21; + float num121 = num119 + num3; + float num122 = num120 + num4 - (float) (2.0 - (double) num21 / 5.0 * 2.0); + float x2 = num121 + num9; + float y2 = num122 + num10; + if ((double) x2 > (double) (Main.miniMapX + 8) && (double) x2 < (double) (Main.miniMapX + Main.miniMapWidth - 18) && (double) y2 > (double) (Main.miniMapY + 8) && (double) y2 < (double) (Main.miniMapY + Main.miniMapHeight - 16)) + { + Main.spriteBatch.Draw(TextureAssets.MapDeath.Value, new Vector2(x2, y2), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.MapDeath.Width(), TextureAssets.MapDeath.Height())), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2((float) TextureAssets.MapDeath.Width() * 0.5f, (float) TextureAssets.MapDeath.Height() * 0.5f), num91, SpriteEffects.None, 0.0f); + float num123 = (float) ((double) x2 + 4.0 - 14.0 * (double) num91); + float num124 = (float) ((double) y2 + 2.0 - 14.0 * (double) num91); + float num125 = num123 - 4f; + float num126 = num124 - 4f; + float num127 = num125 + 28f * num91; + float num128 = num126 + 28f * num91; + if ((double) Main.mouseX >= (double) num125 && (double) Main.mouseX <= (double) num127 && (double) Main.mouseY >= (double) num126 && (double) Main.mouseY <= (double) num128) + index3 = index11; + } + } + } + } + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, transformMatrix2); + Main.ActiveMinimapFrame.DrawForeground(Main.spriteBatch); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, uiScaleMatrix); + if (index3 != -1) + { + TimeSpan time = DateTime.Now - Main.player[index3].lastDeathTime; + cursorText = Language.GetTextValue("Game.PlayerDeathTime", (object) Main.player[index3].name, (object) Lang.LocalizedDuration(time, false, false)); + } + else + revengeMarker?.UseMouseOver(Main.spriteBatch, ref cursorText); + } + } + if (Main.mapFullscreen) + { + int x3 = (int) ((-(double) num15 + (double) Main.mouseX) / (double) num21 + (double) num11); + int y3 = (int) ((-(double) num16 + (double) Main.mouseY) / (double) num21 + (double) num12); + bool flag2 = false; + if ((double) x3 < (double) num11) + flag2 = true; + if ((double) x3 >= (double) num13) + flag2 = true; + if ((double) y3 < (double) num12) + flag2 = true; + if ((double) y3 >= (double) num14) + flag2 = true; + if (!flag2 && Main.Map[x3, y3].Light > (byte) 40) + { + int type = (int) Main.Map[x3, y3].Type; + int num129 = (int) MapHelper.tileLookup[21]; + int num130 = (int) MapHelper.tileLookup[441]; + int tileOptionCount1 = MapHelper.tileOptionCounts[21]; + int num131 = (int) MapHelper.tileLookup[467]; + int num132 = (int) MapHelper.tileLookup[468]; + int tileOptionCount2 = MapHelper.tileOptionCounts[467]; + int num133 = (int) MapHelper.tileLookup[88]; + int tileOptionCount3 = MapHelper.tileOptionCounts[88]; + LocalizedText[] chestType = Lang.chestType; + LocalizedText[] chestType2 = Lang.chestType2; + if (type >= num129 && type < num129 + tileOptionCount1) + { + Tile chestTile = Main.tile[x3, y3]; + if (chestTile != null) + { + int x4 = x3; + int y4 = y3; + if ((int) chestTile.frameX % 36 != 0) + --x4; + if ((int) chestTile.frameY % 36 != 0) + --y4; + cursorText = Main.DrawMap_FindChestName(chestType, chestTile, x4, y4); + } + } + else if (type >= num131 && type < num131 + tileOptionCount2) + { + Tile chestTile = Main.tile[x3, y3]; + if (chestTile != null) + { + int x5 = x3; + int y5 = y3; + if ((int) chestTile.frameX % 36 != 0) + --x5; + if ((int) chestTile.frameY % 36 != 0) + --y5; + cursorText = Main.DrawMap_FindChestName(chestType2, chestTile, x5, y5); + } + } + else if (type >= num130 && type < num130 + tileOptionCount1) + { + Tile tile = Main.tile[x3, y3]; + if (tile != null) + { + int num134 = x3; + int num135 = y3; + if ((int) tile.frameX % 36 != 0) + { + int num136 = num134 - 1; + } + if ((int) tile.frameY % 36 != 0) + { + int num137 = num135 - 1; + } + cursorText = chestType[(int) tile.frameX / 36].Value; + } + } + else if (type >= num132 && type < num132 + tileOptionCount2) + { + Tile tile = Main.tile[x3, y3]; + if (tile != null) + { + int num138 = x3; + int num139 = y3; + if ((int) tile.frameX % 36 != 0) + { + int num140 = num138 - 1; + } + if ((int) tile.frameY % 36 != 0) + { + int num141 = num139 - 1; + } + cursorText = chestType2[(int) tile.frameX / 36].Value; + } + } + else if (type >= num133 && type < num133 + tileOptionCount3) + { + Tile tile = Main.tile[x3, y3]; + if (tile != null) + { + int num142 = x3; + int num143 = y3; + int num144 = (int) tile.frameX % 54 / 18; + int X = num142 - num144; + if ((int) tile.frameY % 36 != 0) + --num143; + int Y = num143; + int chest = Chest.FindChest(X, Y); + cursorText = chest >= 0 ? (!(Main.chest[chest].name != "") ? Lang.dresserType[(int) tile.frameX / 54].Value : Lang.dresserType[(int) tile.frameX / 54].Value + ": " + Main.chest[chest].name) : Lang.dresserType[0].Value; + } + } + else + cursorText = Lang.GetMapObjectName(type); + } + float num145; + if (((double) num21 * 0.25 * 2.0 + 1.0) / 3.0 > 1.0) + num145 = 1f; + num145 = 1f; + float uiScale = Main.UIScale; + CoinLossRevengeSystem.RevengeMarker revengeMarker = NPC.RevengeManager.DrawMapIcons(Main.spriteBatch, Vector2.Zero, new Vector2(num15 - 10f * num21, num16 - 10f * num21), new Microsoft.Xna.Framework.Rectangle?(), num21, uiScale, ref cursorText); + this.DrawMiscMapIcons(Main.spriteBatch, Vector2.Zero, new Vector2(num15 - 10f * num21, num16 - 10f * num21), new Microsoft.Xna.Framework.Rectangle?(), num21, uiScale, ref cursorText); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend); + for (int index12 = 0; index12 < 200; ++index12) + { + if (Main.npc[index12].active && Main.npc[index12].townNPC) + { + ITownNPCProfile profile; + int npcID = !TownNPCProfiles.Instance.GetProfile(Main.npc[index12].type, out profile) ? NPC.TypeToDefaultHeadIndex(Main.npc[index12].type) : profile.GetHeadTextureIndex(Main.npc[index12]); + if (npcID > 0) + { + SpriteEffects dir = SpriteEffects.None; + if (Main.npc[index12].direction > 0) + dir = SpriteEffects.FlipHorizontally; + float num146 = (float) (((double) Main.npc[index12].position.X + (double) (Main.npc[index12].width / 2)) / 16.0) * num21; + float num147 = (float) (((double) Main.npc[index12].position.Y + (double) Main.npc[index12].gfxOffY + (double) (Main.npc[index12].height / 2)) / 16.0) * num21; + float num148 = num146 + num15; + float num149 = num147 + num16; + float x6 = num148 - 10f * num21; + float y6 = num149 - 10f * num21; + float num150 = x6 - (float) (TextureAssets.NpcHead[npcID].Width() / 2) * uiScale; + float num151 = y6 - (float) (TextureAssets.NpcHead[npcID].Height() / 2) * uiScale; + float num152 = num150 + (float) TextureAssets.NpcHead[npcID].Width() * uiScale; + float num153 = num151 + (float) TextureAssets.NpcHead[npcID].Height() * uiScale; + if ((double) Main.mouseX >= (double) num150 && (double) Main.mouseX <= (double) num152 && (double) Main.mouseY >= (double) num151 && (double) Main.mouseY <= (double) num153) + cursorText = Main.npc[index12].FullName; + Main.DrawNPCHeadFriendly((Entity) Main.npc[index12], alpha, uiScale, dir, npcID, x6, y6); + } + } + if (Main.npc[index12].active && Main.npc[index12].GetBossHeadTextureIndex() != -1) + { + float bossHeadRotation = Main.npc[index12].GetBossHeadRotation(); + SpriteEffects headSpriteEffects = Main.npc[index12].GetBossHeadSpriteEffects(); + Vector2 vector2 = Main.npc[index12].Center + new Vector2(0.0f, Main.npc[index12].gfxOffY); + if (Main.npc[index12].type == 134) + { + Vector2 center = Main.npc[index12].Center; + int num154 = 1; + for (int index13 = (int) Main.npc[index12].ai[0]; num154 < 15 && Main.npc[index13].active && Main.npc[index13].type >= 134 && Main.npc[index13].type <= 136; index13 = (int) Main.npc[index13].ai[0]) + { + ++num154; + center += Main.npc[index13].Center; + } + vector2 = center / (float) num154; + } + int headTextureIndex = Main.npc[index12].GetBossHeadTextureIndex(); + float num155 = vector2.X / 16f * num21; + float num156 = vector2.Y / 16f * num21; + float num157 = num155 + num15; + float num158 = num156 + num16; + float x7 = num157 - 10f * num21; + float y7 = num158 - 10f * num21; + Main.DrawNPCHeadBoss((Entity) Main.npc[index12], alpha, uiScale, bossHeadRotation, headSpriteEffects, headTextureIndex, x7, y7); + float num159 = x7 - (float) (TextureAssets.NpcHeadBoss[headTextureIndex].Width() / 2) * uiScale; + float num160 = y7 - (float) (TextureAssets.NpcHeadBoss[headTextureIndex].Height() / 2) * uiScale; + float num161 = num159 + (float) TextureAssets.NpcHeadBoss[headTextureIndex].Width() * uiScale; + float num162 = num160 + (float) TextureAssets.NpcHeadBoss[headTextureIndex].Height() * uiScale; + if ((double) Main.mouseX >= (double) num159 && (double) Main.mouseX <= (double) num161 && (double) Main.mouseY >= (double) num160 && (double) Main.mouseY <= (double) num162) + cursorText = Main.npc[index12].GivenOrTypeName; + } + } + bool flag3 = false; + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend); + for (int i = 0; i < (int) byte.MaxValue; ++i) + { + if (Main.player[i].active && (!Main.player[Main.myPlayer].hostile && !Main.player[i].hostile || Main.player[Main.myPlayer].team == Main.player[i].team && Main.player[i].team != 0 || i == Main.myPlayer) && Main.player[i].showLastDeath && Main.DrawPlayerDeathMarker(num15, num16, num21, num17, num18, uiScale, i)) + index3 = i; + } + if (index3 != -1) + { + TimeSpan time = DateTime.Now - Main.player[index3].lastDeathTime; + cursorText = Language.GetTextValue("Game.PlayerDeathTime", (object) Main.player[index3].name, (object) Lang.LocalizedDuration(time, false, false)); + } + else if (revengeMarker != null) + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, uiScaleMatrix); + revengeMarker.UseMouseOver(Main.spriteBatch, ref cursorText, uiScale); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend); + } + for (int index14 = 0; index14 < (int) byte.MaxValue; ++index14) + { + if (Main.player[index14].active && (!Main.player[Main.myPlayer].hostile && !Main.player[index14].hostile || Main.player[Main.myPlayer].team == Main.player[index14].team && Main.player[index14].team != 0 || index14 == Main.myPlayer)) + { + float num163 = ((float) (((double) Main.player[index14].position.X + (double) (Main.player[index14].width / 2)) / 16.0) - num17) * num21; + float num164 = ((float) (((double) Main.player[index14].position.Y + (double) Main.player[index14].gfxOffY + (double) (Main.player[index14].height / 2)) / 16.0) - num18) * num21; + float num165 = num163 + num15; + float num166 = num164 + num16; + float num167 = num165 - 6f; + float num168 = num166 - 2f - (float) (2.0 - (double) num21 / 5.0 * 2.0); + float x8 = num167 - 10f * num21; + float y8 = num168 - 10f * num21; + float num169 = (float) ((double) x8 + 4.0 - 14.0 * (double) uiScale); + float num170 = (float) ((double) y8 + 2.0 - 14.0 * (double) uiScale); + float num171 = num169 + 28f * uiScale; + float num172 = num170 + 28f * uiScale; + if (!Main.player[index14].dead) + { + Microsoft.Xna.Framework.Color headBordersColor = Main.GetPlayerHeadBordersColor(Main.player[index14]); + Main.MapPlayerRenderer.DrawPlayerHead(Main.Camera, Main.player[index14], new Vector2(x8, y8), (float) alpha / (float) byte.MaxValue, uiScale, headBordersColor); + if ((double) Main.mouseX >= (double) num169 && (double) Main.mouseX <= (double) num171 && (double) Main.mouseY >= (double) num170 && (double) Main.mouseY <= (double) num172) + { + cursorText = Main.player[index14].name; + if (index14 != Main.myPlayer && Main.player[Main.myPlayer].team > 0 && Main.player[Main.myPlayer].team == Main.player[index14].team && Main.netMode == 1 && Main.player[Main.myPlayer].HasUnityPotion() && !flag3 && !Main.cancelWormHole) + { + flag3 = true; + if (!this.unityMouseOver) + SoundEngine.PlaySound(12); + this.unityMouseOver = true; + Microsoft.Xna.Framework.Color favoriteColor = Main.OurFavoriteColor; + Main.MapPlayerRenderer.DrawPlayerHead(Main.Camera, Main.player[index14], new Vector2(x8, y8), scale: (uiScale + 0.5f), borderColor: favoriteColor); + cursorText = Language.GetTextValue("Game.TeleportTo", (object) Main.player[index14].name); + if (Main.mouseLeft && Main.mouseLeftRelease) + { + Main.mouseLeftRelease = false; + Main.mapFullscreen = false; + Main.player[Main.myPlayer].UnityTeleport(Main.player[index14].position); + Main.player[Main.myPlayer].TakeUnityPotion(); + } + } + } + } + } + } + Main.cancelWormHole = false; + Main.MapIcons.Draw(Vector2.Zero, new Vector2(num15 - 10f * num21, num16 - 10f * num21), new Microsoft.Xna.Framework.Rectangle?(), num21, uiScale, ref cursorText); + if (!flag3 && this.unityMouseOver) + this.unityMouseOver = false; + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.SamplerStateForCursor, DepthStencilState.None, RasterizerState.CullCounterClockwise, (Effect) null, Main.UIScaleMatrix); + PlayerInput.SetZoom_UI(); + int num173 = 10; + int num174 = Main.screenHeight - 40; + if (Main.showFrameRate) + num174 -= 15; + int index15 = 0; + int num175 = 130; + if (Main.mouseX >= num173 && Main.mouseX <= num173 + 32 && Main.mouseY >= num174 && Main.mouseY <= num174 + 30) + { + num175 = (int) byte.MaxValue; + index15 += 4; + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + SoundEngine.PlaySound(10); + Main.mapFullscreen = false; + } + } + Main.spriteBatch.Draw(TextureAssets.MapIcon[index15].Value, new Vector2((float) num173, (float) num174), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.MapIcon[index15].Width(), TextureAssets.MapIcon[index15].Height())), new Microsoft.Xna.Framework.Color(num175, num175, num175, num175), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + Main.DrawCursor(Main.DrawThickCursor()); + } + Main.mouseX = mouseX; + Main.mouseY = mouseY; + float t1 = 3f; + Utils.Swap(ref t1, ref Main.inventoryScale); + if (cursorText != "") + this.MouseText(cursorText); + Utils.Swap(ref t1, ref Main.inventoryScale); + Main.spriteBatch.End(); + try + { + if ((double) num17 < (double) num11) + num15 += (num17 - num11) * num21; + if ((double) num18 < (double) num12) + num16 += (num18 - num12) * num21; + if (Main.mapFullscreen) + { + if (Main.OnPostFullscreenMapDraw != null) + Main.OnPostFullscreenMapDraw(new Vector2(num15, num16), num21); + } + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + Main.spriteBatch.Begin(); + PlayerInput.SetZoom_Unscaled(); + TimeLogger.DetailedDrawTime(9); + } + + private static void DrawMapFullscreenBackground( + Vector2 screenPosition, + int screenWidth, + int screenHeight) + { + Asset mapBg = TextureAssets.MapBGs[0]; + int index = -1; + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.White; + int wall = (int) Main.tile[(int) ((double) Main.player[Main.myPlayer].Center.X / 16.0), (int) ((double) Main.player[Main.myPlayer].Center.Y / 16.0)].wall; + if ((double) screenPosition.Y > (double) ((Main.maxTilesY - 232) * 16)) + index = 2; + else if (Main.player[Main.myPlayer].ZoneDungeon) + index = 4; + else if (wall == 87) + index = 13; + else if ((double) screenPosition.Y > Main.worldSurface * 16.0) + { + switch (wall) + { + case 62: + case 263: + index = 18; + break; + case 86: + case 108: + index = 15; + break; + case 178: + case 183: + index = 17; + break; + case 180: + case 184: + index = 16; + break; + default: + index = !Main.player[Main.myPlayer].ZoneGlowshroom ? (!Main.player[Main.myPlayer].ZoneCorrupt ? (!Main.player[Main.myPlayer].ZoneCrimson ? (!Main.player[Main.myPlayer].ZoneHallow ? (!Main.player[Main.myPlayer].ZoneSnow ? (!Main.player[Main.myPlayer].ZoneJungle ? (!Main.player[Main.myPlayer].ZoneDesert ? (!Main.player[Main.myPlayer].ZoneRockLayerHeight ? 1 : 31) : 14) : 12) : 3) : (!Main.player[Main.myPlayer].ZoneDesert ? (!Main.player[Main.myPlayer].ZoneSnow ? 21 : 35) : 41)) : (!Main.player[Main.myPlayer].ZoneDesert ? (!Main.player[Main.myPlayer].ZoneSnow ? 23 : 34) : 40)) : (!Main.player[Main.myPlayer].ZoneDesert ? (!Main.player[Main.myPlayer].ZoneSnow ? 22 : 33) : 39)) : 20; + break; + } + } + else if (Main.player[Main.myPlayer].ZoneGlowshroom) + { + index = 19; + } + else + { + color = Main.ColorOfTheSkies; + int num = (int) (((double) screenPosition.X + (double) (screenWidth / 2)) / 16.0); + if (Main.player[Main.myPlayer].ZoneSkyHeight) + index = 32; + else if (Main.player[Main.myPlayer].ZoneCorrupt) + index = !Main.player[Main.myPlayer].ZoneDesert ? 5 : 36; + else if (Main.player[Main.myPlayer].ZoneCrimson) + index = !Main.player[Main.myPlayer].ZoneDesert ? 6 : 37; + else if (Main.player[Main.myPlayer].ZoneHallow) + index = !Main.player[Main.myPlayer].ZoneDesert ? 7 : 38; + else if ((double) screenPosition.Y / 16.0 < Main.worldSurface + 10.0 && (num < 380 || num > Main.maxTilesX - 380)) + index = 10; + else if (Main.player[Main.myPlayer].ZoneSnow) + index = 11; + else if (Main.player[Main.myPlayer].ZoneJungle) + index = 8; + else if (Main.player[Main.myPlayer].ZoneDesert) + index = 9; + else if (Main.bloodMoon) + { + color *= 2f; + index = 25; + } + else if (Main.player[Main.myPlayer].ZoneGraveyard) + index = 26; + } + if (index > -1) + mapBg = TextureAssets.MapBGs[index]; + Main.spriteBatch.Draw(mapBg.Value, new Microsoft.Xna.Framework.Rectangle(0, 0, screenWidth, screenHeight), color); + } + + private static bool DrawPlayerDeathMarker( + float X, + float Y, + float scale, + float left, + float top, + float headScale, + int i) + { + float num1 = (Main.player[i].lastDeathPostion.X / 16f - left) * scale; + float num2 = (Main.player[i].lastDeathPostion.Y / 16f - top) * scale; + float num3 = num1 + X; + float num4 = num2 + Y - (float) (2.0 - (double) scale / 5.0 * 2.0); + float x = num3 - 10f * scale; + float y = num4 - 10f * scale; + Main.spriteBatch.Draw(TextureAssets.MapDeath.Value, new Vector2(x, y), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.MapDeath.Width(), TextureAssets.MapDeath.Height())), Microsoft.Xna.Framework.Color.White, 0.0f, new Vector2((float) TextureAssets.MapDeath.Width() * 0.5f, (float) TextureAssets.MapDeath.Height() * 0.5f), headScale, SpriteEffects.None, 0.0f); + float num5 = (float) ((double) x + 4.0 - 14.0 * (double) headScale); + float num6 = (float) ((double) y + 2.0 - 14.0 * (double) headScale); + float num7 = num5 + 28f * headScale; + float num8 = num6 + 28f * headScale; + return (double) Main.mouseX >= (double) num5 && (double) Main.mouseX <= (double) num7 && (double) Main.mouseY >= (double) num6 && (double) Main.mouseY <= (double) num8; + } + + private void DrawMiscMapIcons( + SpriteBatch spriteBatch, + Vector2 mapTopLeft, + Vector2 mapX2Y2AndOff, + Microsoft.Xna.Framework.Rectangle? mapRect, + float mapScale, + float drawScale, + ref string mouseTextString) + { + this.DrawMapIcons_PotionOfReturnHomePosition(spriteBatch, mapTopLeft, mapX2Y2AndOff, mapRect, mapScale, drawScale, ref mouseTextString); + this.DrawMapIcons_PotionOfReturnAppearAfterUsePosition(spriteBatch, mapTopLeft, mapX2Y2AndOff, mapRect, mapScale, drawScale, ref mouseTextString); + this.DrawMapIcons_LastGolfballHit(spriteBatch, mapTopLeft, mapX2Y2AndOff, mapRect, mapScale, drawScale, ref mouseTextString); + } + + private void DrawMapIcons_PotionOfReturnAppearAfterUsePosition( + SpriteBatch spriteBatch, + Vector2 mapTopLeft, + Vector2 mapX2Y2AndOff, + Microsoft.Xna.Framework.Rectangle? mapRect, + float mapScale, + float drawScale, + ref string mouseTextString) + { + Vector2? originalUsePosition = Main.LocalPlayer.PotionOfReturnOriginalUsePosition; + if (!originalUsePosition.HasValue) + return; + Vector2? nullable = originalUsePosition; + Vector2 vector2_1 = new Vector2(0.0f, (float) (-Main.LocalPlayer.height / 2)); + Vector2 vector2_2 = (((nullable.HasValue ? new Vector2?(nullable.GetValueOrDefault() + vector2_1) : new Vector2?()).Value / 16f - mapTopLeft) * mapScale + mapX2Y2AndOff).Floor(); + if (mapRect.HasValue && !mapRect.Value.Contains(vector2_2.ToPoint())) + return; + Texture2D texture2D = TextureAssets.Extra[173].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(); + spriteBatch.Draw(texture2D, vector2_2, new Microsoft.Xna.Framework.Rectangle?(r), Microsoft.Xna.Framework.Color.White, 0.0f, r.Size() / 2f, drawScale, SpriteEffects.None, 0.0f); + if (!Utils.CenteredRectangle(vector2_2, r.Size() * drawScale).Contains(Main.MouseScreen.ToPoint())) + return; + mouseTextString = Language.GetTextValue("GameUI.PotionOfReturnExitPortal"); + Vector2 vector2_3 = Main.MouseScreen + new Vector2(-28f) + new Vector2(4f, 0.0f); + } + + private void DrawMapIcons_PotionOfReturnHomePosition( + SpriteBatch spriteBatch, + Vector2 mapTopLeft, + Vector2 mapX2Y2AndOff, + Microsoft.Xna.Framework.Rectangle? mapRect, + float mapScale, + float drawScale, + ref string mouseTextString) + { + Vector2? returnHomePosition = Main.LocalPlayer.PotionOfReturnHomePosition; + if (!returnHomePosition.HasValue) + return; + Vector2? nullable = returnHomePosition; + Vector2 vector2_1 = new Vector2(0.0f, (float) (-Main.LocalPlayer.height / 2)); + Vector2 vector2_2 = (((nullable.HasValue ? new Vector2?(nullable.GetValueOrDefault() + vector2_1) : new Vector2?()).Value / 16f - mapTopLeft) * mapScale + mapX2Y2AndOff).Floor(); + if (mapRect.HasValue && !mapRect.Value.Contains(vector2_2.ToPoint())) + return; + Texture2D texture2D = TextureAssets.Extra[175].Value; + Microsoft.Xna.Framework.Rectangle r = texture2D.Frame(); + spriteBatch.Draw(texture2D, vector2_2, new Microsoft.Xna.Framework.Rectangle?(r), Microsoft.Xna.Framework.Color.White, 0.0f, r.Size() / 2f, drawScale, SpriteEffects.None, 0.0f); + if (!Utils.CenteredRectangle(vector2_2, r.Size() * drawScale).Contains(Main.MouseScreen.ToPoint())) + return; + mouseTextString = Language.GetTextValue("GameUI.PotionOfReturnHomePortal"); + Vector2 vector2_3 = Main.MouseScreen + new Vector2(-28f) + new Vector2(4f, 0.0f); + } + + private void DrawMapIcons_LastGolfballHit( + SpriteBatch spriteBatch, + Vector2 mapTopLeft, + Vector2 mapX2Y2AndOff, + Microsoft.Xna.Framework.Rectangle? mapRect, + float mapScale, + float drawScale, + ref string mouseTextString) + { + Projectile lastHitBall = Main.LocalGolfState.GetLastHitBall(); + if (lastHitBall == null) + return; + Vector2 vector2_1 = ((lastHitBall.Center / 16f - mapTopLeft) * mapScale + mapX2Y2AndOff).Floor(); + if (mapRect.HasValue && !mapRect.Value.Contains(vector2_1.ToPoint())) + return; + Texture2D texture2D1 = TextureAssets.Extra[176].Value; + Microsoft.Xna.Framework.Rectangle r1 = texture2D1.Frame(); + spriteBatch.Draw(texture2D1, vector2_1, new Microsoft.Xna.Framework.Rectangle?(r1), Microsoft.Xna.Framework.Color.White, 0.0f, r1.Size() / 2f, drawScale, SpriteEffects.None, 0.0f); + Microsoft.Xna.Framework.Rectangle rectangle = Utils.CenteredRectangle(vector2_1, r1.Size() * drawScale); + this.LoadProjectile(lastHitBall.type); + Texture2D texture2D2 = TextureAssets.Projectile[lastHitBall.type].Value; + Microsoft.Xna.Framework.Rectangle r2 = texture2D2.Frame(); + spriteBatch.Draw(texture2D2, vector2_1, new Microsoft.Xna.Framework.Rectangle?(r2), Microsoft.Xna.Framework.Color.White, 0.0f, r2.Size() / 2f, drawScale, SpriteEffects.None, 0.0f); + if (!rectangle.Contains(Main.MouseScreen.ToPoint())) + return; + mouseTextString = lastHitBall.Name; + Vector2 vector2_2 = Main.MouseScreen + new Vector2(-28f) + new Vector2(4f, 0.0f); + } + + public static void TriggerPing(Vector2 position) + { + Main.Pings.Add(position); + if (Main.netMode != 1) + return; + NetManager.Instance.SendToServer(NetPingModule.Serialize(position)); + } + + private static void DrawNPCHeadFriendly( + Entity theNPC, + byte alpha, + float headScale, + SpriteEffects dir, + int npcID, + float x, + float y) + { + Main.TownNPCHeadRenderer.DrawWithOutlines(theNPC, npcID, new Vector2(x, y), new Microsoft.Xna.Framework.Color((int) alpha, (int) alpha, (int) alpha, (int) alpha), 0.0f, headScale, dir); + } + + private static void DrawNPCHeadBoss( + Entity theNPC, + byte alpha, + float headScale, + float rotation, + SpriteEffects effects, + int npcID, + float x, + float y) + { + Main.BossNPCHeadRenderer.DrawWithOutlines(theNPC, npcID, new Vector2(x, y), new Microsoft.Xna.Framework.Color((int) alpha, (int) alpha, (int) alpha, (int) alpha), 0.0f, headScale, effects); + } + + private static void DrawWithOutlines( + Entity entity, + Texture2D tex, + Vector2 position, + Microsoft.Xna.Framework.Rectangle? rect, + Microsoft.Xna.Framework.Color color, + float rotation, + Vector2 origin, + float scale, + SpriteEffects effects) + { + float num1 = 2f * scale; + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + int colorOnlyShaderIndex = ContentSamples.CommonlyUsedContentSamples.ColorOnlyShaderIndex; + DrawData drawData = new DrawData(tex, position, rect, color, rotation, origin, scale, effects, 0); + GameShaders.Armor.Apply(colorOnlyShaderIndex, entity, new DrawData?(drawData)); + Microsoft.Xna.Framework.Color color1 = Microsoft.Xna.Framework.Color.Black * ((float) color.A / (float) byte.MaxValue) * ((float) color.A / (float) byte.MaxValue); + Microsoft.Xna.Framework.Color color2 = white * ((float) color.A / (float) byte.MaxValue) * ((float) color.A / (float) byte.MaxValue); + int num2 = 2; + for (int index1 = -num2; index1 <= num2; ++index1) + { + for (int index2 = -num2; index2 <= num2; ++index2) + { + if (Math.Abs(index1) + Math.Abs(index2) == num2) + { + Vector2 vector2 = new Vector2((float) index1 * num1, (float) index2 * num1).RotatedBy((double) rotation); + Main.spriteBatch.Draw(tex, position + vector2, rect, color1, rotation, origin, scale, effects, 0.0f); + } + } + } + int num3 = 1; + Vector2 zero = Vector2.Zero; + for (int index3 = -num3; index3 <= num3; ++index3) + { + for (int index4 = -num3; index4 <= num3; ++index4) + { + if (Math.Abs(index3) + Math.Abs(index4) == num3) + { + Vector2 vector2 = new Vector2((float) index3 * num1, (float) index4 * num1).RotatedBy((double) rotation); + Main.spriteBatch.Draw(tex, position + vector2, rect, color2, rotation, origin, scale, effects, 0.0f); + } + } + } + Main.pixelShader.CurrentTechnique.Passes[0].Apply(); + Main.spriteBatch.Draw(tex, position, rect, color, rotation, origin, scale, effects, 0.0f); + } + + public static Microsoft.Xna.Framework.Color GetPlayerHeadBordersColor(Player plr) => plr.ghost || plr.dead || plr.whoAmI != Main.myPlayer && plr.hostile && (plr.team != Main.LocalPlayer.team || plr.team == 0) ? Microsoft.Xna.Framework.Color.Transparent : Main.teamColor[plr.team]; + + private static string DrawMap_FindChestName( + LocalizedText[] chestNames, + Tile chestTile, + int x, + int y, + int fullTileWidth = 36) + { + int chestByGuessing = Chest.FindChestByGuessing(x, y); + return chestByGuessing >= 0 ? (!(Main.chest[chestByGuessing].name != "") ? chestNames[(int) chestTile.frameX / fullTileWidth].Value : chestNames[(int) chestTile.frameX / fullTileWidth].ToString() + ": " + Main.chest[chestByGuessing].name) : chestNames[0].Value; + } + + public void DrawSimpleSurfaceBackground(Vector2 areaPosition, int areaWidth, int areaHeight) + { + float val2 = (float) (Main.worldSurface + 1.0) * 16f; + float num1 = Math.Min(areaPosition.Y + (float) areaHeight, val2) - areaPosition.Y; + float y = areaPosition.Y; + float num2 = areaPosition.Y + num1; + Vector4 vector4_1 = Main.ColorOfTheSkies.ToVector4(); + Vector4 vector4_2 = new Microsoft.Xna.Framework.Color(53, 43, 243).ToVector4() * vector4_1; + Vector4 vector4_3 = new Microsoft.Xna.Framework.Color(132, 170, 248).ToVector4() * vector4_1; + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color(Vector4.Lerp(vector4_2, vector4_3, y / val2)); + Microsoft.Xna.Framework.Color color2 = new Microsoft.Xna.Framework.Color(Vector4.Lerp(vector4_2, vector4_3, num2 / val2)); + VertexColors colors; + colors.TopLeftColor = color1; + colors.TopRightColor = color1; + colors.BottomLeftColor = color2; + colors.BottomRightColor = color2; + Main.tileBatch.Draw(TextureAssets.BlackTile.Value, new Vector4(0.0f, 0.0f, (float) areaWidth, num1), colors); + float w = (float) areaHeight - num1; + if ((double) w <= 0.0) + return; + colors.TopLeftColor = Microsoft.Xna.Framework.Color.Black; + colors.TopRightColor = Microsoft.Xna.Framework.Color.Black; + colors.BottomLeftColor = Microsoft.Xna.Framework.Color.Black; + colors.BottomRightColor = Microsoft.Xna.Framework.Color.Black; + Main.tileBatch.Draw(TextureAssets.BlackTile.Value, new Vector4(0.0f, num1, (float) areaWidth, w), colors); + } + + public void DrawCapture(Microsoft.Xna.Framework.Rectangle area, CaptureSettings settings) + { + float[] bgAlphaFrontLayer = Main.bgAlphaFrontLayer; + Main.bgAlphaFrontLayer = new float[bgAlphaFrontLayer.Length]; + float[] alphaFarBackLayer = Main.bgAlphaFarBackLayer; + Main.bgAlphaFarBackLayer = new float[alphaFarBackLayer.Length]; + this.UpdateBGVisibility_BackLayer(new int?(settings.Biome.BackgroundIndex), new float?(1f)); + this.UpdateBGVisibility_FrontLayer(new int?(settings.Biome.BackgroundIndex), new float?(1f)); + float[] array = ((IEnumerable) Main.liquidAlpha).ToArray(); + int holyTileCount = Main.SceneMetrics.HolyTileCount; + Main.SceneMetrics.HolyTileCount = settings.Biome.BackgroundIndex == 6 ? SceneMetrics.HallowTileMax : 0; + int offScreenRange = Main.offScreenRange; + Main.offScreenRange = 0; + SpriteViewMatrix gameViewMatrix = Main.GameViewMatrix; + Main.GameViewMatrix = new SpriteViewMatrix(this.GraphicsDevice); + Main.Rasterizer = RasterizerState.CullCounterClockwise; + bool captureEntities = settings.CaptureEntities; + bool captureBackground = settings.CaptureBackground; + CaptureBiome biome = settings.Biome; + Vector2 screenPosition1 = Main.screenPosition; + int screenWidth1 = Main.screenWidth; + int screenHeight1 = Main.screenHeight; + float cloudAlpha = Main.cloudAlpha; + bool captureMech = settings.CaptureMech; + Main.screenWidth = area.Width << 4; + Main.screenHeight = area.Height << 4; + Main.screenPosition = new Vector2((float) (area.X * 16), (float) (area.Y * 16)); + Main.cloudAlpha = 0.0f; + for (int index = 0; index <= 10; ++index) + { + if (index != 1) + Main.liquidAlpha[index] = index == biome.WaterStyle ? 1f : 0.0f; + } + int x1 = area.X; + int y1 = area.Y; + int num1 = area.X + Main.screenWidth / 16; + int num2 = area.Y + Main.screenHeight / 16; + float tempMushroomInfluence = (float) (biome.TileColor == CaptureBiome.TileColorStyle.Mushroom).ToInt(); + Microsoft.Xna.Framework.Color sunColor; + Microsoft.Xna.Framework.Color moonColor; + Main.SetBackColor(new Main.InfoToSetBackColor() + { + isInGameMenuOrIsServer = Main.gameMenu || Main.netMode == 2, + CorruptionBiomeInfluence = (float) (biome.TileColor == CaptureBiome.TileColorStyle.Corrupt).ToInt(), + CrimsonBiomeInfluence = (float) (biome.TileColor == CaptureBiome.TileColorStyle.Crimson).ToInt(), + JungleBiomeInfluence = (float) (biome.TileColor == CaptureBiome.TileColorStyle.Jungle).ToInt(), + MushroomBiomeInfluence = tempMushroomInfluence, + GraveyardInfluence = Main.GraveyardVisualIntensity, + BloodMoonActive = biome.WaterStyle == 9, + LanternNightActive = LanternNight.LanternsUp + }, out sunColor, out moonColor); + Main.ApplyColorOfTheSkiesToTiles(); + Main.ColorOfSurfaceBackgroundsBase = Main.ColorOfSurfaceBackgroundsModified = Main.ColorOfTheSkies; + bool mapEnabled = Main.mapEnabled; + Main.mapEnabled = false; + Lighting.Initialize(); + Main.renderCount = 99; + for (int index = 0; index < 4; ++index) + Lighting.LightTiles(x1, num1, y1, num2); + Main.mapEnabled = mapEnabled; + if ((double) (settings.Area.X * 16) <= (double) screenPosition1.X - 16.0 || (double) (settings.Area.Y * 16) <= (double) screenPosition1.Y - 16.0 || (double) ((settings.Area.X + settings.Area.Width) * 16) >= (double) screenPosition1.X + (double) screenWidth1 + 16.0 || (double) ((settings.Area.Y + settings.Area.Height) * 16) >= (double) screenPosition1.Y + (double) screenHeight1 + 16.0) + { + for (int index = 0; index < Main.dust.Length; ++index) + { + if (Main.dust[index].active && Main.dust[index].type == 76) + Main.dust[index].active = false; + } + } + Vector2 vector2_1 = Main.drawToScreen ? Vector2.Zero : new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange); + int val1_1 = (int) (((double) Main.screenPosition.X - (double) vector2_1.X) / 16.0 - 1.0); + int val1_2 = (int) (((double) Main.screenPosition.X + (double) Main.screenWidth + (double) vector2_1.X) / 16.0) + 2; + int val1_3 = (int) (((double) Main.screenPosition.Y - (double) vector2_1.Y) / 16.0 - 1.0); + int val1_4 = (int) (((double) Main.screenPosition.Y + (double) Main.screenHeight + (double) vector2_1.Y) / 16.0) + 5; + Vector2 vector2_2 = vector2_1 - Main.screenPosition; + int x2 = Math.Max(val1_1, 5) - 2; + int y2 = Math.Max(val1_3, 5); + int num3 = Math.Min(val1_2, Main.maxTilesX - 5) + 2; + int num4 = Math.Min(val1_4, Main.maxTilesY - 5) + 4; + Microsoft.Xna.Framework.Rectangle drawArea = new Microsoft.Xna.Framework.Rectangle(x2, y2, num3 - x2, num4 - y2); + LiquidRenderer.Instance.PrepareDraw(drawArea); + WorldGen.SectionTileFrameWithCheck(x1, y1, num1, num2); + if (captureBackground) + { + Matrix transform = Main.Transform; + int screenHeight2 = Main.screenHeight; + int screenWidth2 = Main.screenWidth; + Vector2 screenPosition2 = Main.screenPosition; + bool mapFullscreen = Main.mapFullscreen; + Main.mapFullscreen = false; + float scAdj = this.scAdj; + Vector2 vector2_3 = new Vector2((float) screenWidth1, (float) screenHeight1); + Vector2 vector2_4 = new Vector2((float) (settings.Area.Width * 16), (float) (settings.Area.Height * 16)) / vector2_3; + vector2_4.X = Math.Max(1f, vector2_4.X); + vector2_4.Y = Math.Max(1f, vector2_4.Y); + Vector2[] vector2Array = new Vector2[Main.numClouds]; + for (int index = 0; index < Main.numClouds; ++index) + { + vector2Array[index] = Main.cloud[index].position; + Main.cloud[index].position *= vector2_4; + } + if ((double) (settings.Area.Height * 16) >= 2000.0 || (double) (settings.Area.Width * 16) >= 2000.0) + { + this.scAdj = 0.0f; + float num5 = 2048f; + float scale = MathHelper.Clamp((float) settings.Area.Height * 16f / num5, 1f, 3f); + Main.screenWidth = settings.Area.Width * 16; + Main.screenHeight = Math.Min(2048, settings.Area.Height * 16); + Main.screenPosition.X = (float) (settings.Area.X * 16); + Main.screenPosition.Y = (float) (settings.Area.Y * 16); + Main.screenPosition.Y += Math.Max(0.0f, (float) ((double) Math.Min((float) settings.Area.Height, (float) Main.worldSurface) * 16.0 - (double) num5 * (double) scale)); + transform *= Matrix.CreateScale(scale); + transform.Translation += new Vector3((float) ((settings.Area.X - area.X) * 16), (float) ((settings.Area.Y - area.Y) * 16), 0.0f); + transform.Translation += new Vector3(0.0f, Math.Max(0.0f, (float) ((double) Math.Min((float) settings.Area.Height, (float) Main.worldSurface) * 16.0 - (double) num5 * (double) scale)) / scale, 0.0f); + } + else if ((double) (settings.Area.X * 16) > (double) screenPosition1.X - 16.0 && (double) (settings.Area.Y * 16) > (double) screenPosition1.Y - 16.0 && (double) ((settings.Area.X + settings.Area.Width) * 16) < (double) screenPosition1.X + (double) screenWidth1 + 16.0 && (double) ((settings.Area.Y + settings.Area.Height) * 16) < (double) screenPosition1.Y + (double) screenHeight1 + 16.0) + { + Main.screenPosition = screenPosition1; + Main.screenWidth = screenWidth1; + Main.screenHeight = screenHeight1; + transform.Translation += new Vector3(screenPosition1.X - (float) area.X * 16f, screenPosition1.Y - (float) area.Y * 16f, 0.0f); + } + Vector2 areaPosition = new Vector2((float) (area.X * 16), (float) (area.Y * 16)); + int areaWidth = area.Width * 16; + int areaHeight = area.Height * 16; + Main.tileBatch.Begin(); + this.DrawSimpleSurfaceBackground(areaPosition, areaWidth, areaHeight); + Main.tileBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.AnisotropicClamp, DepthStencilState.Default, RasterizerState.CullNone, (Effect) null, transform); + int num6 = Main.screenWidth; + int num7 = Main.screenHeight; + Vector2 zero = Vector2.Zero; + if (num6 < 800) + { + int num8 = 800 - num6; + zero.X -= (float) num8 * 0.5f; + num6 = 800; + } + if (num7 < 600) + { + int num9 = 600 - num7; + zero.Y -= (float) num9 * 0.5f; + num7 = 600; + } + Main.SceneArea sceneArea = new Main.SceneArea() + { + bgTopY = 0, + totalWidth = (float) num6, + totalHeight = (float) num7, + SceneLocalScreenPositionOffset = zero + }; + this.DrawStarsInBackground(sceneArea); + if ((double) Main.screenPosition.Y / 16.0 < Main.worldSurface + 2.0) + this.DrawSunAndMoon(sceneArea, moonColor, sunColor, tempMushroomInfluence); + this.DrawSurfaceBG(); + Main.spriteBatch.End(); + for (int index = 0; index < Main.numClouds; ++index) + Main.cloud[index].position = vector2Array[index]; + this.scAdj = scAdj; + Main.mapFullscreen = mapFullscreen; + Main.screenWidth = screenWidth2; + Main.screenHeight = screenHeight2; + Main.screenPosition = screenPosition2; + } + if (captureBackground) + { + Main.spriteBatch.Begin(); + this.DrawUnderworldBackground(true); + Main.spriteBatch.End(); + } + if (captureEntities) + { + Main.spriteBatch.Begin(); + this.CacheNPCDraws(); + this.CacheProjDraws(); + this.DrawCachedNPCs(this.DrawCacheNPCsMoonMoon, true); + Main.spriteBatch.End(); + } + Main.tileBatch.Begin(); + Main.spriteBatch.Begin(); + this.DrawBlack(true); + Main.tileBatch.End(); + Main.spriteBatch.End(); + Main.tileBatch.Begin(); + Main.spriteBatch.Begin(); + if (biome == null) + this.DrawWater(true, Main.waterStyle); + else + this.DrawWater(true, Main.bloodMoon ? 9 : biome.WaterStyle); + Main.tileBatch.End(); + Main.spriteBatch.End(); + if (captureBackground) + { + Main.tileBatch.Begin(); + Main.spriteBatch.Begin(); + this.DrawBackground(); + Main.tileBatch.End(); + Main.spriteBatch.End(); + } + Main.tileBatch.Begin(); + Main.spriteBatch.Begin(); + this.DrawWalls(); + Main.tileBatch.End(); + Main.spriteBatch.End(); + if (captureEntities) + { + Main.spriteBatch.Begin(); + this.DrawWoF(); + Main.spriteBatch.End(); + } + if (Main.drawBackGore & captureEntities) + { + Main.spriteBatch.Begin(); + this.DrawGoreBehind(); + Main.spriteBatch.End(); + Main.drawBackGore = true; + } + if (captureEntities) + { + Main.spriteBatch.Begin(); + MoonlordDeathDrama.DrawPieces(Main.spriteBatch); + MoonlordDeathDrama.DrawExplosions(Main.spriteBatch); + Main.spriteBatch.End(); + } + bool flag = false; + bool intoRenderTargets1 = false; + bool intoRenderTargets2 = true; + this.TilesRenderer.PreDrawTiles(false, flag, intoRenderTargets2); + Main.tileBatch.Begin(); + Main.spriteBatch.Begin(); + this.DrawCachedNPCs(this.DrawCacheNPCsBehindNonSolidTiles, true); + int waterStyleOverride = Main.bloodMoon ? 9 : biome.WaterStyle; + if (biome == null) + this.DrawTiles(false, flag, intoRenderTargets1); + else + this.DrawTiles(false, flag, intoRenderTargets1, waterStyleOverride); + Main.tileBatch.End(); + Main.spriteBatch.End(); + this.DrawTileEntities(false, flag, intoRenderTargets1); + if (captureEntities) + { + Main.spriteBatch.Begin(); + this.waterfallManager.FindWaterfalls(true); + this.waterfallManager.Draw(Main.spriteBatch); + Main.spriteBatch.End(); + } + if (captureEntities) + { + this.DrawCachedProjs(this.DrawCacheProjsBehindNPCsAndTiles); + Main.spriteBatch.Begin(); + this.DrawNPCs(true); + Main.spriteBatch.End(); + } + this.TilesRenderer.PreDrawTiles(true, flag, intoRenderTargets2); + Main.tileBatch.Begin(); + Main.spriteBatch.Begin(); + if (biome == null) + this.DrawTiles(true, flag, intoRenderTargets1); + else + this.DrawTiles(true, flag, intoRenderTargets1, waterStyleOverride); + Main.tileBatch.End(); + Main.spriteBatch.End(); + this.DrawTileEntities(true, flag, intoRenderTargets1); + if (captureEntities) + { + this.DrawPlayers_BehindNPCs(); + this.DrawCachedProjs(this.DrawCacheProjsBehindNPCs); + Main.spriteBatch.Begin(); + this.DrawNPCs(); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(); + this.DrawCachedNPCs(this.DrawCacheNPCProjectiles, false); + Main.spriteBatch.End(); + this.DrawSuperSpecialProjectiles(this.DrawCacheFirstFractals); + this.DrawCachedProjs(this.DrawCacheProjsBehindProjectiles); + this.DrawProjectiles(); + this.DrawPlayers_AfterProjectiles(); + this.DrawCachedProjs(this.DrawCacheProjsOverPlayers); + Main.spriteBatch.Begin(); + this.DrawCachedNPCs(this.DrawCacheNPCsOverPlayers, false); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(); + this.DrawItems(); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(); + this.DrawRain(); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(); + this.DrawGore(); + Main.spriteBatch.End(); + this.DrawDust(); + } + Main.tileBatch.Begin(); + Main.spriteBatch.Begin(); + if (biome == null) + this.DrawWater(Style: Main.waterStyle); + else + this.DrawWater(Style: biome.WaterStyle); + if (captureMech) + this.DrawWires(); + Main.tileBatch.End(); + Main.spriteBatch.End(); + this.DrawCachedProjs(this.DrawCacheProjsOverWiresUI); + if (Main.mapEnabled) + { + Main.spriteBatch.Begin(); + for (int x3 = area.X; x3 < area.X + area.Width; ++x3) + { + for (int y3 = area.Y; y3 < area.Y + area.Height; ++y3) + { + if (!Main.Map.IsRevealed(x3, y3)) + Main.spriteBatch.Draw(TextureAssets.BlackTile.Value, new Vector2((float) x3 * 16f, (float) y3 * 16f) - Main.screenPosition, Microsoft.Xna.Framework.Color.Black); + } + } + Main.spriteBatch.End(); + } + Main.renderCount = 99; + Main.screenWidth = screenWidth1; + Main.screenHeight = screenHeight1; + Main.screenPosition = screenPosition1; + Main.liquidAlpha = array; + Main.offScreenRange = offScreenRange; + Main.cloudAlpha = cloudAlpha; + Main.bgAlphaFrontLayer = bgAlphaFrontLayer; + Main.bgAlphaFarBackLayer = alphaFarBackLayer; + Main.SceneMetrics.HolyTileCount = holyTileCount; + Lighting.Initialize(); + Main.GameViewMatrix = gameViewMatrix; + } + + protected void RenderTiles() + { + if (Main.drawToScreen) + return; + this.RenderBlack(); + this.GraphicsDevice.SetRenderTarget(this.tileTarget); + this.GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent); + Main.spriteBatch.Begin(); + try + { + this.TilesRenderer.PreDrawTiles(true, false, true); + this.DrawTiles(true, false, true); + } + catch (Exception ex) + { + if (Main.ignoreErrors) + TimeLogger.DrawException(ex); + else + throw; + } + TimeLogger.DetailedDrawReset(); + Main.spriteBatch.End(); + this.DrawTileEntities(true, false, true); + TimeLogger.DetailedDrawTime(28); + this.GraphicsDevice.SetRenderTarget((RenderTarget2D) null); + } + + protected void RenderTiles2() + { + if (Main.drawToScreen) + return; + this.GraphicsDevice.SetRenderTarget(this.tile2Target); + this.GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent); + Main.spriteBatch.Begin(); + try + { + this.TilesRenderer.PreDrawTiles(false, false, true); + this.DrawTiles(false, false, true); + } + catch (Exception ex) + { + if (Main.ignoreErrors) + TimeLogger.DrawException(ex); + else + throw; + } + TimeLogger.DetailedDrawReset(); + Main.spriteBatch.End(); + this.DrawTileEntities(false, false, true); + TimeLogger.DetailedDrawTime(29); + this.GraphicsDevice.SetRenderTarget((RenderTarget2D) null); + } + + protected void RenderWater() + { + if (Main.drawToScreen) + return; + this.GraphicsDevice.SetRenderTarget(Main.waterTarget); + this.GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent); + Main.spriteBatch.Begin(); + try + { + this.DrawWaters(); + } + catch + { + } + TimeLogger.DetailedDrawReset(); + Main.spriteBatch.End(); + TimeLogger.DetailedDrawTime(31); + this.GraphicsDevice.SetRenderTarget((RenderTarget2D) null); + } + + public static int CalculateWaterStyle(bool ignoreFountains = false) + { + if (Main.SceneMetrics.ActiveFountainColor >= 0 && !ignoreFountains) + return Main.SceneMetrics.ActiveFountainColor; + if (Main.bgStyle != 4 && Main.bloodMoon && !Main.dayTime) + return 9; + switch (Main.bgStyle) + { + case 1: + return 2; + case 2: + return (double) Main.player[Main.myPlayer].position.Y / 16.0 > Main.worldSurface ? 12 : 6; + case 3: + return 3; + case 5: + if (Main.SceneMetrics.EvilTileCount > Main.SceneMetrics.HolyTileCount && Main.SceneMetrics.EvilTileCount > Main.SceneMetrics.BloodTileCount) + return 2; + return Main.SceneMetrics.HolyTileCount > Main.SceneMetrics.BloodTileCount ? 4 : 10; + case 6: + return 4; + case 7: + return 5; + case 8: + return 10; + default: + return (double) Main.screenPosition.Y / 16.0 > Main.rockLayer + 40.0 ? (Main.player[Main.myPlayer].ZoneGlowshroom ? 7 : 8) : ((double) Main.screenPosition.Y / 16.0 > Main.worldSurface ? 7 : 0); + } + } + + public static bool IsLiquidStyleWater(int liquidStyle) => liquidStyle != 1 && liquidStyle != 11; + + private void DrawWaters(bool isBackground = false) + { + Main.drewLava = false; + if (!isBackground) + { + Main.waterStyle = Main.CalculateWaterStyle(); + for (int index = 0; index < 13; ++index) + { + if (Main.IsLiquidStyleWater(Main.waterStyle)) + Main.liquidAlpha[index] = Main.waterStyle == index ? Math.Min(Main.liquidAlpha[index] + 0.2f, 1f) : Math.Max(Main.liquidAlpha[index] - 0.2f, 0.0f); + } + } + if (!Main.drawToScreen && !isBackground) + { + Vector2 vector2 = Main.drawToScreen ? Vector2.Zero : new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange); + int val1_1 = (int) (((double) Main.Camera.ScaledPosition.X - (double) vector2.X) / 16.0 - 1.0); + int val1_2 = (int) (((double) Main.Camera.ScaledPosition.X + (double) Main.Camera.ScaledSize.X + (double) vector2.X) / 16.0) + 2; + int val1_3 = (int) (((double) Main.Camera.ScaledPosition.Y - (double) vector2.Y) / 16.0 - 1.0); + int val1_4 = (int) (((double) Main.Camera.ScaledPosition.Y + (double) Main.Camera.ScaledSize.Y + (double) vector2.Y) / 16.0) + 5; + int x = Math.Max(val1_1, 5) - 2; + int y = Math.Max(val1_3, 5); + int num1 = Math.Min(val1_2, Main.maxTilesX - 5) + 2; + int num2 = Math.Min(val1_4, Main.maxTilesY - 5) + 4; + Microsoft.Xna.Framework.Rectangle drawArea = new Microsoft.Xna.Framework.Rectangle(x, y, num1 - x, num2 - y); + LiquidRenderer.Instance.PrepareDraw(drawArea); + } + bool flag = false; + for (int index = 0; index < 13; ++index) + { + if (Main.IsLiquidStyleWater(index) && (double) Main.liquidAlpha[index] > 0.0 && index != Main.waterStyle) + { + this.DrawWater(isBackground, index, isBackground ? 1f : Main.liquidAlpha[index]); + flag = true; + } + } + this.DrawWater(isBackground, Main.waterStyle, flag ? Main.liquidAlpha[Main.waterStyle] : 1f); + } + + protected void DrawWater(bool bg = false, int Style = 0, float Alpha = 1f) + { + if (!Lighting.NotRetro) + { + this.oldDrawWater(bg, Style, Alpha); + } + else + { + Stopwatch stopwatch = new Stopwatch(); + stopwatch.Start(); + Vector2 drawOffset = (Main.drawToScreen ? Vector2.Zero : new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange)) - Main.screenPosition; + LiquidRenderer.Instance.Draw(Main.spriteBatch, drawOffset, Style, Alpha, bg); + if (bg) + return; + TimeLogger.DrawTime(4, stopwatch.Elapsed.TotalMilliseconds); + } + } + + public static void DrawTileInWater(Vector2 drawOffset, int x, int y) + { + if (Main.tile[x, y] == null || !Main.tile[x, y].active() || Main.tile[x, y].type != (ushort) 518) + return; + Main.instance.LoadTiles((int) Main.tile[x, y].type); + Tile tile = Main.tile[x, y]; + int num = (int) tile.liquid / 16 - 3; + if (WorldGen.SolidTile(x, y - 1) && num > 8) + num = 8; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) tile.frameX, (int) tile.frameY, 16, 16); + Main.spriteBatch.Draw(TextureAssets.Tile[(int) tile.type].Value, new Vector2((float) (x * 16), (float) (y * 16 - num)) + drawOffset, new Microsoft.Xna.Framework.Rectangle?(rectangle), Lighting.GetColor(x, y), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + + public void oldDrawWater(bool bg = false, int Style = 0, float Alpha = 1f) + { + float num1 = 0.0f; + float num2 = 99999f; + float num3 = 99999f; + int num4 = -1; + int num5 = -1; + Vector2 vector2_1 = new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange); + if (Main.drawToScreen) + vector2_1 = Vector2.Zero; + Microsoft.Xna.Framework.Color[] colorArray = new Microsoft.Xna.Framework.Color[4]; + int num6 = (int) ((double) byte.MaxValue * (1.0 - (double) Main.gfxQuality) + 40.0 * (double) Main.gfxQuality); + double gfxQuality1 = (double) Main.gfxQuality; + double gfxQuality2 = (double) Main.gfxQuality; + int num7 = (int) (((double) Main.screenPosition.X - (double) vector2_1.X) / 16.0 - 1.0); + int num8 = (int) (((double) Main.screenPosition.X + (double) Main.screenWidth + (double) vector2_1.X) / 16.0) + 2; + int num9 = (int) (((double) Main.screenPosition.Y - (double) vector2_1.Y) / 16.0 - 1.0); + int num10 = (int) (((double) Main.screenPosition.Y + (double) Main.screenHeight + (double) vector2_1.Y) / 16.0) + 5; + if (num7 < 5) + num7 = 5; + if (num8 > Main.maxTilesX - 5) + num8 = Main.maxTilesX - 5; + if (num9 < 5) + num9 = 5; + if (num10 > Main.maxTilesY - 5) + num10 = Main.maxTilesY - 5; + for (int y = num9; y < num10 + 4; ++y) + { + for (int x = num7 - 2; x < num8 + 2; ++x) + { + if (Main.tile[x, y] == null) + Main.tile[x, y] = new Tile(); + if (Main.tile[x, y].liquid > (byte) 0 && (!Main.tile[x, y].nactive() || !Main.tileSolid[(int) Main.tile[x, y].type] || Main.tileSolidTop[(int) Main.tile[x, y].type]) && (double) Lighting.Brightness(x, y) > 0.0 | bg) + { + Microsoft.Xna.Framework.Color color1 = Lighting.GetColor(x, y); + float num11 = (float) (256 - (int) Main.tile[x, y].liquid) / 32f; + int index1 = 0; + if (Main.tile[x, y].lava()) + { + if (!Main.drewLava) + { + float num12 = Math.Abs((float) (x * 16 + 8) - (Main.screenPosition.X + (float) (Main.screenWidth / 2))); + float num13 = Math.Abs((float) (y * 16 + 8) - (Main.screenPosition.Y + (float) (Main.screenHeight / 2))); + if ((double) num12 < (double) (Main.screenWidth * 2) && (double) num13 < (double) (Main.screenHeight * 2)) + { + float num14 = (float) (1.0 - Math.Sqrt((double) num12 * (double) num12 + (double) num13 * (double) num13) / ((double) Main.screenWidth * 0.75)); + if ((double) num14 > 0.0) + num1 += num14; + } + if ((double) num12 < (double) num2) + { + num2 = num12; + num4 = x * 16 + 8; + } + if ((double) num13 < (double) num3) + { + num3 = num12; + num5 = y * 16 + 8; + } + index1 = 1; + } + else + continue; + } + else if (Main.tile[x, y].honey()) + index1 = 11; + if (index1 == 0) + index1 = Style; + if (index1 != 1 && index1 != 11 || !Main.drewLava) + { + float num15 = 0.5f; + if (bg) + num15 = 1f; + if (index1 != 1 && index1 != 11) + num15 *= Alpha; + Main.DrawTileInWater(-Main.screenPosition + vector2_1, x, y); + Vector2 vector2_2 = new Vector2((float) (x * 16), (float) (y * 16 + (int) num11 * 2)); + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16 - (int) num11 * 2); + if (Main.tile[x, y + 1].liquid < (byte) 245 && (!Main.tile[x, y + 1].nactive() || !Main.tileSolid[(int) Main.tile[x, y + 1].type] || Main.tileSolidTop[(int) Main.tile[x, y + 1].type])) + { + float num16 = (float) (256 - (int) Main.tile[x, y + 1].liquid) / 32f; + num15 = (float) (0.5 * (8.0 - (double) num11) / 4.0); + if ((double) num15 > 0.55) + num15 = 0.55f; + if ((double) num15 < 0.35) + num15 = 0.35f; + float num17 = num11 / 2f; + if (Main.tile[x, y + 1].liquid < (byte) 200) + { + if (!bg) + { + if (Main.tile[x, y - 1].liquid > (byte) 0 && Main.tile[x, y - 1].liquid > (byte) 0) + { + rectangle = new Microsoft.Xna.Framework.Rectangle(0, 4, 16, 16); + num15 = 0.5f; + } + else if (Main.tile[x, y - 1].liquid > (byte) 0) + { + vector2_2 = new Vector2((float) (x * 16), (float) (y * 16 + 4)); + rectangle = new Microsoft.Xna.Framework.Rectangle(0, 4, 16, 12); + num15 = 0.5f; + } + else if (Main.tile[x, y + 1].liquid > (byte) 0) + { + vector2_2 = new Vector2((float) (x * 16), (float) (y * 16 + (int) num11 * 2 + (int) num16 * 2)); + rectangle = new Microsoft.Xna.Framework.Rectangle(0, 4, 16, 16 - (int) num11 * 2); + } + else + { + vector2_2 = new Vector2((float) (x * 16 + (int) num17), (float) (y * 16 + (int) num17 * 2 + (int) num16 * 2)); + rectangle = new Microsoft.Xna.Framework.Rectangle(0, 4, 16 - (int) num17 * 2, 16 - (int) num17 * 2); + } + } + else + continue; + } + else + { + num15 = 0.5f; + rectangle = new Microsoft.Xna.Framework.Rectangle(0, 4, 16, 16 - (int) num11 * 2 + (int) num16 * 2); + } + } + else if (Main.tile[x, y - 1].liquid > (byte) 32) + rectangle = new Microsoft.Xna.Framework.Rectangle(0, 4, rectangle.Width, rectangle.Height); + else if ((double) num11 < 1.0 && Main.tile[x, y - 1].nactive() && Main.tileSolid[(int) Main.tile[x, y - 1].type] && !Main.tileSolidTop[(int) Main.tile[x, y - 1].type]) + { + vector2_2 = new Vector2((float) (x * 16), (float) (y * 16)); + rectangle = new Microsoft.Xna.Framework.Rectangle(0, 4, 16, 16); + } + else + { + bool flag = true; + for (int index2 = y + 1; index2 < y + 6 && (!Main.tile[x, index2].nactive() || !Main.tileSolid[(int) Main.tile[x, index2].type] || Main.tileSolidTop[(int) Main.tile[x, index2].type]); ++index2) + { + if (Main.tile[x, index2].liquid < (byte) 200) + { + flag = false; + break; + } + } + if (!flag) + { + num15 = 0.5f; + rectangle = new Microsoft.Xna.Framework.Rectangle(0, 4, 16, 16); + } + else if (Main.tile[x, y - 1].liquid > (byte) 0) + rectangle = new Microsoft.Xna.Framework.Rectangle(0, 2, rectangle.Width, rectangle.Height); + } + if ((color1.R > (byte) 20 || color1.B > (byte) 20 || color1.G > (byte) 20) && rectangle.Y < 4) + { + int num18 = (int) color1.R; + if ((int) color1.G > num18) + num18 = (int) color1.G; + if ((int) color1.B > num18) + num18 = (int) color1.B; + int num19 = num18 / 30; + if (Main.rand.Next(20000) < num19) + { + Microsoft.Xna.Framework.Color newColor = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + if (Main.tile[x, y].honey()) + newColor = new Microsoft.Xna.Framework.Color((int) byte.MaxValue, (int) byte.MaxValue, 50); + int index3 = Dust.NewDust(new Vector2((float) (x * 16), vector2_2.Y - 2f), 16, 8, 43, Alpha: 254, newColor: newColor, Scale: 0.75f); + Main.dust[index3].velocity *= 0.0f; + } + } + if (Main.tile[x, y].honey()) + { + num15 *= 1.6f; + if ((double) num15 > 1.0) + num15 = 1f; + } + if (Main.tile[x, y].lava()) + { + num15 *= 1.8f; + if ((double) num15 > 1.0) + num15 = 1f; + if (this.IsActive && !Main.gamePaused && Dust.lavaBubbles < 200) + { + if (Main.tile[x, y].liquid > (byte) 200 && Main.rand.Next(700) == 0) + Dust.NewDust(new Vector2((float) (x * 16), (float) (y * 16)), 16, 16, 35); + if (rectangle.Y == 0 && Main.rand.Next(350) == 0) + { + int index4 = Dust.NewDust(new Vector2((float) (x * 16), (float) ((double) (y * 16) + (double) num11 * 2.0 - 8.0)), 16, 8, 35, Alpha: 50, Scale: 1.5f); + Main.dust[index4].velocity *= 0.8f; + Main.dust[index4].velocity.X *= 2f; + Main.dust[index4].velocity.Y -= (float) Main.rand.Next(1, 7) * 0.1f; + if (Main.rand.Next(10) == 0) + Main.dust[index4].velocity.Y *= (float) Main.rand.Next(2, 5); + Main.dust[index4].noGravity = true; + } + } + } + color1 = new Microsoft.Xna.Framework.Color((int) (byte) ((float) color1.R * num15), (int) (byte) ((float) color1.G * num15), (int) (byte) ((float) color1.B * num15), (int) (byte) ((float) color1.A * num15)); + if (Lighting.NotRetro && !bg) + { + Microsoft.Xna.Framework.Color color2 = color1; + if (index1 != 1 && ((double) color2.R > (double) num6 * 0.6 || (double) color2.G > (double) num6 * 0.65 || (double) color2.B > (double) num6 * 0.7)) + { + for (int index5 = 0; index5 < 4; ++index5) + { + int num20 = 0; + int num21 = 0; + int width = 8; + int height = 8; + Microsoft.Xna.Framework.Color color3 = color2; + Microsoft.Xna.Framework.Color color4 = Lighting.GetColor(x, y); + if (index5 == 0) + { + color4 = Lighting.GetColor(x - 1, y - 1); + if (rectangle.Height < 8) + height = rectangle.Height; + } + if (index5 == 1) + { + color4 = Lighting.GetColor(x + 1, y - 1); + num20 = 8; + if (rectangle.Height < 8) + height = rectangle.Height; + } + if (index5 == 2) + { + color4 = Lighting.GetColor(x - 1, y + 1); + num21 = 8; + height = 8 - (16 - rectangle.Height); + } + if (index5 == 3) + { + color4 = Lighting.GetColor(x + 1, y + 1); + num20 = 8; + num21 = 8; + height = 8 - (16 - rectangle.Height); + } + color4 = new Microsoft.Xna.Framework.Color((int) (byte) ((float) color4.R * num15), (int) (byte) ((float) color4.G * num15), (int) (byte) ((float) color4.B * num15), (int) (byte) ((float) color4.A * num15)); + color3.R = (byte) (((int) color2.R * 3 + (int) color4.R * 2) / 5); + color3.G = (byte) (((int) color2.G * 3 + (int) color4.G * 2) / 5); + color3.B = (byte) (((int) color2.B * 3 + (int) color4.B * 2) / 5); + color3.A = (byte) (((int) color2.A * 3 + (int) color4.A * 2) / 5); + Main.spriteBatch.Draw(TextureAssets.Liquid[index1].Value, vector2_2 - Main.screenPosition + new Vector2((float) num20, (float) num21) + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(rectangle.X + num20, rectangle.Y + num21, width, height)), color3, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + else + Main.spriteBatch.Draw(TextureAssets.Liquid[index1].Value, vector2_2 - Main.screenPosition + vector2_1, new Microsoft.Xna.Framework.Rectangle?(rectangle), color1, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + else + { + if (rectangle.Y < 4) + rectangle.X += (int) ((double) Main.wFrame * 18.0); + Main.spriteBatch.Draw(TextureAssets.Liquid[index1].Value, vector2_2 - Main.screenPosition + vector2_1, new Microsoft.Xna.Framework.Rectangle?(rectangle), color1, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (Main.tile[x, y + 1].halfBrick()) + { + color1 = Lighting.GetColor(x, y + 1); + color1 = new Microsoft.Xna.Framework.Color((int) (byte) ((float) color1.R * num15), (int) (byte) ((float) color1.G * num15), (int) (byte) ((float) color1.B * num15), (int) (byte) ((float) color1.A * num15)); + vector2_2 = new Vector2((float) (x * 16), (float) (y * 16 + 16)); + Main.spriteBatch.Draw(TextureAssets.Liquid[index1].Value, vector2_2 - Main.screenPosition + vector2_1, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 4, 16, 8)), color1, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + } + } + } + if (!Main.drewLava) + { + Main.ambientLavaX = (float) num4; + Main.ambientLavaY = (float) num5; + Main.ambientLavaStrength = num1; + } + Main.drewLava = true; + } + + protected bool FullTile(int x, int y) + { + if (Main.tile[x - 1, y] == null || Main.tile[x - 1, y].blockType() != 0 || Main.tile[x + 1, y] == null || Main.tile[x + 1, y].blockType() != 0) + return false; + Tile tile = Main.tile[x, y]; + if (tile == null || !tile.active() || (int) tile.type < TileID.Sets.DrawsWalls.Length && TileID.Sets.DrawsWalls[(int) tile.type] || !Main.tileSolid[(int) tile.type] || Main.tileSolidTop[(int) tile.type]) + return false; + int frameX = (int) tile.frameX; + int frameY = (int) tile.frameY; + if (Main.tileLargeFrames[(int) tile.type] > (byte) 0) + { + if ((frameY == 18 || frameY == 108) && (frameX >= 18 && frameX <= 54 || frameX >= 108 && frameX <= 144)) + return true; + } + else if (frameY == 18) + { + if (frameX >= 18 && frameX <= 54 || frameX >= 108 && frameX <= 144) + return true; + } + else if (frameY >= 90 && frameY <= 196 && (frameX <= 70 || frameX >= 144 && frameX <= 232)) + return true; + return false; + } + + protected void DrawBlack(bool force = false) + { + Stopwatch stopwatch = new Stopwatch(); + stopwatch.Start(); + Vector2 vector2 = Main.drawToScreen ? Vector2.Zero : new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange); + int num1 = ((int) Main.tileColor.R + (int) Main.tileColor.G + (int) Main.tileColor.B) / 3; + float num2 = (float) num1 * 0.4f / (float) byte.MaxValue; + switch (Lighting.Mode) + { + case LightMode.Retro: + num2 = (float) ((int) Main.tileColor.R - 55) / (float) byte.MaxValue; + if ((double) num2 < 0.0) + { + num2 = 0.0f; + break; + } + break; + case LightMode.Trippy: + num2 = (float) (num1 - 55) / (float) byte.MaxValue; + if ((double) num2 < 0.0) + { + num2 = 0.0f; + break; + } + break; + } + Microsoft.Xna.Framework.Point screenOverdrawOffset = Main.GetScreenOverdrawOffset(); + Microsoft.Xna.Framework.Point point = new Microsoft.Xna.Framework.Point(-Main.offScreenRange / 16 + screenOverdrawOffset.X, -Main.offScreenRange / 16 + screenOverdrawOffset.Y); + int num3 = (int) (((double) Main.screenPosition.X - (double) vector2.X) / 16.0 - 1.0) + point.X; + int num4 = (int) (((double) Main.screenPosition.X + (double) Main.screenWidth + (double) vector2.X) / 16.0) + 2 - point.X; + int val1_1 = (int) (((double) Main.screenPosition.Y - (double) vector2.Y) / 16.0 - 1.0) + point.Y; + int val1_2 = (int) (((double) Main.screenPosition.Y + (double) Main.screenHeight + (double) vector2.Y) / 16.0) + 5 - point.Y; + if (num3 < 0) + num3 = point.X; + if (num4 > Main.maxTilesX) + num4 = Main.maxTilesX - point.X; + if (val1_1 < 0) + val1_1 = point.Y; + if (val1_2 > Main.maxTilesY) + val1_2 = Main.maxTilesY - point.Y; + if (!force) + { + if (val1_1 < Main.maxTilesY / 2) + { + val1_2 = Math.Min(val1_2, (int) Main.worldSurface + 1); + val1_1 = Math.Min(val1_1, (int) Main.worldSurface + 1); + } + else + { + val1_2 = Math.Max(val1_2, Main.UnderworldLayer); + val1_1 = Math.Max(val1_1, Main.UnderworldLayer); + } + } + for (int y = val1_1; y < val1_2; ++y) + { + bool flag = y >= Main.UnderworldLayer; + if (flag) + num2 = 0.2f; + for (int x = num3; x < num4; ++x) + { + int num5 = x; + for (; x < num4; ++x) + { + if (!WorldGen.InWorld(x, y)) + return; + if (Main.tile[x, y] == null) + Main.tile[x, y] = new Tile(); + Tile testTile = Main.tile[x, y]; + float num6 = (float) Math.Floor((double) Lighting.Brightness(x, y) * (double) byte.MaxValue) / (float) byte.MaxValue; + byte liquid = testTile.liquid; + if (((((double) num6 > (double) num2 ? 0 : (!flag && liquid < (byte) 250 || WorldGen.SolidTile(testTile) ? 1 : (liquid < (byte) 200 ? 0 : ((double) num6 == 0.0 ? 1 : 0)))) == 0 ? 0 : (!WallID.Sets.Transparent[(int) testTile.wall] ? 1 : (!Main.tile[x, y].active() ? 0 : (Main.tileBlockLight[(int) testTile.type] ? 1 : 0)))) == 0 ? 0 : (Main.drawToScreen || !LiquidRenderer.Instance.HasFullWater(x, y) || testTile.wall != (ushort) 0 || testTile.halfBrick() ? 1 : ((double) y <= Main.worldSurface ? 1 : 0))) == 0) + break; + } + if (x - num5 > 0) + Main.spriteBatch.Draw(TextureAssets.BlackTile.Value, new Vector2((float) (num5 << 4), (float) (y << 4)) - Main.screenPosition + vector2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, x - num5 << 4, 16)), Microsoft.Xna.Framework.Color.Black); + } + } + TimeLogger.DrawTime(5, stopwatch.Elapsed.TotalMilliseconds); + } + + protected void RenderBlack() + { + if (Main.drawToScreen) + return; + this.GraphicsDevice.SetRenderTarget(this.blackTarget); + this.GraphicsDevice.DepthStencilState = new DepthStencilState() + { + DepthBufferEnable = true + }; + this.GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent); + Main.spriteBatch.Begin(); + this.DrawBlack(); + TimeLogger.DetailedDrawReset(); + Main.spriteBatch.End(); + TimeLogger.DetailedDrawTime(30); + this.GraphicsDevice.SetRenderTarget((RenderTarget2D) null); + } + + protected void DrawWalls() => this.WallsRenderer.DrawWalls(); + + protected void RenderWalls() + { + if (Main.drawToScreen) + return; + this.GraphicsDevice.SetRenderTarget(this.wallTarget); + this.GraphicsDevice.DepthStencilState = new DepthStencilState() + { + DepthBufferEnable = true + }; + this.GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend); + Main.tileBatch.Begin(); + if (Main.ignoreErrors) + { + try + { + this.DrawWalls(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + this.DrawWalls(); + TimeLogger.DetailedDrawReset(); + Main.tileBatch.End(); + Main.spriteBatch.End(); + TimeLogger.DetailedDrawTime(32); + this.GraphicsDevice.SetRenderTarget((RenderTarget2D) null); + } + + protected void ReleaseTargets() + { + try + { + if (Main.dedServ) + return; + Main.offScreenRange = 0; + Main.targetSet = false; + if (Main.waterTarget != null) + Main.waterTarget.Dispose(); + if (this.backWaterTarget != null) + this.backWaterTarget.Dispose(); + if (this.blackTarget != null) + this.blackTarget.Dispose(); + if (this.tileTarget != null) + this.tileTarget.Dispose(); + if (this.tile2Target != null) + this.tile2Target.Dispose(); + if (this.wallTarget != null) + this.wallTarget.Dispose(); + if (Main.screenTarget != null) + Main.screenTarget.Dispose(); + if (Main.screenTargetSwap != null) + Main.screenTargetSwap.Dispose(); + if (this.backgroundTarget != null) + this.backgroundTarget.Dispose(); + if (Main.OnRenderTargetsReleased == null) + return; + Main.OnRenderTargetsReleased(); + } + catch + { + } + } + + protected bool checkMap(int i, int j) + { + if (this.mapTarget[i, j] == null || this.mapTarget[i, j].IsDisposed) + Main.initMap[i, j] = false; + if (!Main.initMap[i, j]) + { + try + { + int width = Main.textureMaxWidth; + int height = Main.textureMaxHeight; + if (i == Main.mapTargetX - 1) + width = 400; + if (j == Main.mapTargetY - 1) + height = 600; + this.mapTarget[i, j] = new RenderTarget2D(this.GraphicsDevice, width, height, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.None, 0, RenderTargetUsage.PreserveContents); + } + catch + { + Main.mapEnabled = false; + for (int index1 = 0; index1 < Main.mapTargetX; ++index1) + { + for (int index2 = 0; index2 < Main.mapTargetY; ++index2) + { + try + { + Main.initMap[index1, index2] = false; + this.mapTarget[index1, index2].Dispose(); + } + catch + { + } + } + } + return false; + } + Main.initMap[i, j] = true; + } + return true; + } + + protected void InitMap() + { + int mapTargetX = Main.mapTargetX; + int mapTargetY = Main.mapTargetY; + if (!Main.mapEnabled) + return; + try + { + for (int index1 = 0; index1 < mapTargetX; ++index1) + { + for (int index2 = 0; index2 < mapTargetY; ++index2) + this.mapTarget[index1, index2] = new RenderTarget2D(this.GraphicsDevice, Main.textureMaxWidth, Main.textureMaxHeight, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.None, 0, RenderTargetUsage.PreserveContents); + } + Main.mapInit = true; + } + catch + { + Main.mapEnabled = false; + for (int index3 = 0; index3 < mapTargetX; ++index3) + { + for (int index4 = 0; index4 < mapTargetY; ++index4) + { + try + { + if (this.mapTarget[index3, index4] != null) + this.mapTarget[index3, index4].Dispose(); + } + catch + { + } + } + } + } + } + + protected void InitTargets() + { + this.UpdateDisplaySettings(); + this.InitTargets(this.GraphicsDevice.PresentationParameters.BackBufferWidth, this.GraphicsDevice.PresentationParameters.BackBufferHeight); + } + + protected void EnsureRenderTargetContent() + { + if (Main.waterTarget != null && !Main.waterTarget.IsContentLost && this.backWaterTarget != null && !this.backWaterTarget.IsContentLost && this.blackTarget != null && !this.blackTarget.IsContentLost && this.tileTarget != null && !this.tileTarget.IsContentLost && this.tile2Target != null && !this.tile2Target.IsContentLost && this.wallTarget != null && !this.wallTarget.IsContentLost && this.backgroundTarget != null && !this.backgroundTarget.IsContentLost && Main.screenTarget != null && !Main.screenTarget.IsContentLost && Main.screenTargetSwap != null && !Main.screenTargetSwap.IsContentLost) + return; + this.InitTargets(); + } + + protected void InitTargets(int width, int height) + { + this.ReleaseTargets(); + Main.offScreenRange = 192; + if (width + Main.offScreenRange * 2 > Main._renderTargetMaxSize) + Main.offScreenRange = (Main._renderTargetMaxSize - width) / 2; + width += Main.offScreenRange * 2; + height += Main.offScreenRange * 2; + try + { + if (Main.dedServ) + return; + Main.targetSet = true; + Main.waterTarget = new RenderTarget2D(this.GraphicsDevice, width, height, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.None); + this.backWaterTarget = new RenderTarget2D(this.GraphicsDevice, width, height, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.None); + this.blackTarget = new RenderTarget2D(this.GraphicsDevice, width, height, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.None); + this.tileTarget = new RenderTarget2D(this.GraphicsDevice, width, height, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.None); + this.tile2Target = new RenderTarget2D(this.GraphicsDevice, width, height, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.None); + this.wallTarget = new RenderTarget2D(this.GraphicsDevice, width, height, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.None); + this.backgroundTarget = new RenderTarget2D(this.GraphicsDevice, width, height, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.None); + Main.screenTarget = new RenderTarget2D(this.GraphicsDevice, this.GraphicsDevice.PresentationParameters.BackBufferWidth, this.GraphicsDevice.PresentationParameters.BackBufferHeight, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.None); + Main.screenTargetSwap = new RenderTarget2D(this.GraphicsDevice, this.GraphicsDevice.PresentationParameters.BackBufferWidth, this.GraphicsDevice.PresentationParameters.BackBufferHeight, false, this.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.None); + if (Main.OnRenderTargetsInitialized == null) + return; + Main.OnRenderTargetsInitialized(this.GraphicsDevice.PresentationParameters.BackBufferWidth, this.GraphicsDevice.PresentationParameters.BackBufferHeight); + } + catch + { + Lighting.Mode = LightMode.Retro; + Main.mapEnabled = false; + Main.SaveSettings(); + try + { + this.ReleaseTargets(); + } + catch + { + } + } + } + + protected void DrawWires() + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16); + Vector2 zero1 = Vector2.Zero; + this.DrawWiresSpecialTiles.Clear(); + bool flag1 = !WiresUI.Settings.HideWires; + float num1 = 1f; + if (WiresUI.Settings.HideWires) + num1 = 0.5f; + int num2 = 1; + int num3 = 1; + int num4 = 1; + int num5 = 1; + int num6 = 1; + if (Main.player[Main.myPlayer].InfoAccMechShowWires) + { + int[] builderAccStatus = Main.player[Main.myPlayer].builderAccStatus; + num2 = builderAccStatus[4]; + num3 = builderAccStatus[5]; + num4 = builderAccStatus[6]; + num5 = builderAccStatus[7]; + num6 = builderAccStatus[9]; + } + double gfxQuality1 = (double) Main.gfxQuality; + double gfxQuality2 = (double) Main.gfxQuality; + Vector2 zero2 = Vector2.Zero; + if (Main.drawToScreen) + zero2 = Vector2.Zero; + int num7 = (int) (((double) Main.screenPosition.X - (double) zero2.X) / 16.0 - 1.0); + int num8 = (int) (((double) Main.screenPosition.X + (double) Main.screenWidth + (double) zero2.X) / 16.0) + 2; + int num9 = (int) (((double) Main.screenPosition.Y - (double) zero2.Y) / 16.0 - 1.0); + int num10 = (int) (((double) Main.screenPosition.Y + (double) Main.screenHeight + (double) zero2.Y) / 16.0) + 5; + if (num7 < 0) + num7 = 0; + if (num8 > Main.maxTilesX) + num8 = Main.maxTilesX; + if (num9 < 0) + num9 = 0; + if (num10 > Main.maxTilesY) + num10 = Main.maxTilesY; + Microsoft.Xna.Framework.Point screenOverdrawOffset = Main.GetScreenOverdrawOffset(); + for (int y = num9 + screenOverdrawOffset.Y; y < num10 - screenOverdrawOffset.Y; ++y) + { + for (int x = num7 + screenOverdrawOffset.X; x < num8 - screenOverdrawOffset.X; ++x) + { + bool flag2 = false; + bool flag3 = false; + bool flag4 = false; + bool flag5 = false; + float num11 = 0.0f; + Tile tile = Main.tile[x, y]; + if (flag1) + { + int num12 = 0; + if (tile.active()) + { + if (tile.type == (ushort) 424) + { + switch ((int) tile.frameX / 18) + { + case 0: + num12 += 72; + break; + case 1: + num12 += 144; + break; + case 2: + num12 += 216; + break; + } + } + else if (tile.type == (ushort) 445) + num12 += 72; + } + if (tile.wire()) + { + ++num11; + int num13 = 0; + if (Main.tile[x, y - 1].wire()) + { + num13 += 18; + flag4 = true; + } + if (Main.tile[x + 1, y].wire()) + { + num13 += 36; + flag3 = true; + } + if (Main.tile[x, y + 1].wire()) + { + num13 += 72; + flag5 = true; + } + if (Main.tile[x - 1, y].wire()) + { + num13 += 144; + flag2 = true; + } + rectangle.Y = num12; + rectangle.X = num13; + Microsoft.Xna.Framework.Color color = Lighting.GetColor(x, y); + switch (num2) + { + case 0: + color = Microsoft.Xna.Framework.Color.White; + break; + case 2: + color *= 0.5f; + break; + case 3: + color = Microsoft.Xna.Framework.Color.Transparent; + break; + } + if (color == Microsoft.Xna.Framework.Color.Transparent) + --num11; + else + Main.spriteBatch.Draw(TextureAssets.WireNew.Value, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + zero2, new Microsoft.Xna.Framework.Rectangle?(rectangle), color, 0.0f, zero1, 1f, SpriteEffects.None, 0.0f); + } + if (tile.wire2()) + { + int num14; + bool flag6 = (num14 = 0) != 0; + bool flag7 = num14 != 0; + bool flag8 = num14 != 0; + bool flag9 = num14 != 0; + bool flag10 = num14 != 0; + ++num11; + int num15 = 0; + if (Main.tile[x, y - 1].wire2()) + { + num15 += 18; + flag8 = true; + if (flag4) + flag6 = true; + } + if (Main.tile[x + 1, y].wire2()) + { + num15 += 36; + flag9 = true; + if (flag3) + flag6 = true; + } + if (Main.tile[x, y + 1].wire2()) + { + num15 += 72; + flag7 = true; + if (flag5) + flag6 = true; + } + if (Main.tile[x - 1, y].wire2()) + { + num15 += 144; + flag10 = true; + if (flag2) + flag6 = true; + } + if ((double) num11 > 1.0) + flag6 = true; + rectangle.Y = num12 + 18; + rectangle.X = num15; + Microsoft.Xna.Framework.Color color = Lighting.GetColor(x, y); + switch (num3) + { + case 0: + color = Microsoft.Xna.Framework.Color.White; + break; + case 2: + color *= 0.5f; + break; + case 3: + color = Microsoft.Xna.Framework.Color.Transparent; + break; + } + if (color == Microsoft.Xna.Framework.Color.Transparent) + { + --num11; + } + else + { + Main.spriteBatch.Draw(TextureAssets.WireNew.Value, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + zero2, new Microsoft.Xna.Framework.Rectangle?(rectangle), color * (1f / num11), 0.0f, zero1, 1f, SpriteEffects.None, 0.0f); + if (flag8) + { + if (flag6 && !flag4) + Main.spriteBatch.Draw(TextureAssets.WireNew.Value, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + zero2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(18, rectangle.Y, 16, 6)), color, 0.0f, zero1, 1f, SpriteEffects.None, 0.0f); + flag4 = true; + } + if (flag7) + { + if (flag6 && !flag5) + Main.spriteBatch.Draw(TextureAssets.WireNew.Value, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + zero2 + new Vector2(0.0f, 10f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(72, rectangle.Y + 10, 16, 6)), color, 0.0f, zero1, 1f, SpriteEffects.None, 0.0f); + flag5 = true; + } + if (flag9) + { + if (flag6 && !flag3) + Main.spriteBatch.Draw(TextureAssets.WireNew.Value, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + zero2 + new Vector2(10f, 0.0f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(46, rectangle.Y, 6, 16)), color, 0.0f, zero1, 1f, SpriteEffects.None, 0.0f); + flag3 = true; + } + if (flag10) + { + if (flag6 && !flag2) + Main.spriteBatch.Draw(TextureAssets.WireNew.Value, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + zero2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(144, rectangle.Y, 6, 16)), color, 0.0f, zero1, 1f, SpriteEffects.None, 0.0f); + flag2 = true; + } + } + } + if (tile.wire3()) + { + int num16; + bool flag11 = (num16 = 0) != 0; + bool flag12 = num16 != 0; + bool flag13 = num16 != 0; + bool flag14 = num16 != 0; + bool flag15 = num16 != 0; + ++num11; + int num17 = 0; + if (Main.tile[x, y - 1].wire3()) + { + num17 += 18; + flag13 = true; + if (flag4) + flag11 = true; + } + if (Main.tile[x + 1, y].wire3()) + { + num17 += 36; + flag14 = true; + if (flag3) + flag11 = true; + } + if (Main.tile[x, y + 1].wire3()) + { + num17 += 72; + flag12 = true; + if (flag5) + flag11 = true; + } + if (Main.tile[x - 1, y].wire3()) + { + num17 += 144; + flag15 = true; + if (flag2) + flag11 = true; + } + if ((double) num11 > 1.0) + flag11 = true; + rectangle.Y = num12 + 36; + rectangle.X = num17; + Microsoft.Xna.Framework.Color color = Lighting.GetColor(x, y); + switch (num4) + { + case 0: + color = Microsoft.Xna.Framework.Color.White; + break; + case 2: + color *= 0.5f; + break; + case 3: + color = Microsoft.Xna.Framework.Color.Transparent; + break; + } + if (color == Microsoft.Xna.Framework.Color.Transparent) + { + --num11; + } + else + { + Main.spriteBatch.Draw(TextureAssets.WireNew.Value, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + zero2, new Microsoft.Xna.Framework.Rectangle?(rectangle), color * (1f / num11), 0.0f, zero1, 1f, SpriteEffects.None, 0.0f); + if (flag13) + { + if (flag11 && !flag4) + Main.spriteBatch.Draw(TextureAssets.WireNew.Value, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + zero2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(18, rectangle.Y, 16, 6)), color, 0.0f, zero1, 1f, SpriteEffects.None, 0.0f); + flag4 = true; + } + if (flag12) + { + if (flag11 && !flag5) + Main.spriteBatch.Draw(TextureAssets.WireNew.Value, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + zero2 + new Vector2(0.0f, 10f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(72, rectangle.Y + 10, 16, 6)), color, 0.0f, zero1, 1f, SpriteEffects.None, 0.0f); + flag5 = true; + } + if (flag14) + { + if (flag11 && !flag3) + Main.spriteBatch.Draw(TextureAssets.WireNew.Value, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + zero2 + new Vector2(10f, 0.0f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(46, rectangle.Y, 6, 16)), color, 0.0f, zero1, 1f, SpriteEffects.None, 0.0f); + flag3 = true; + } + if (flag15) + { + if (flag11 && !flag2) + Main.spriteBatch.Draw(TextureAssets.WireNew.Value, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + zero2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(144, rectangle.Y, 6, 16)), color, 0.0f, zero1, 1f, SpriteEffects.None, 0.0f); + flag2 = true; + } + } + } + if (tile.wire4()) + { + int num18; + bool flag16 = (num18 = 0) != 0; + bool flag17 = num18 != 0; + bool flag18 = num18 != 0; + bool flag19 = num18 != 0; + bool flag20 = num18 != 0; + float num19 = num11 + 1f; + int num20 = 0; + if (Main.tile[x, y - 1].wire4()) + { + num20 += 18; + flag18 = true; + if (flag4) + flag16 = true; + } + if (Main.tile[x + 1, y].wire4()) + { + num20 += 36; + flag19 = true; + if (flag3) + flag16 = true; + } + if (Main.tile[x, y + 1].wire4()) + { + num20 += 72; + flag17 = true; + if (flag5) + flag16 = true; + } + if (Main.tile[x - 1, y].wire4()) + { + num20 += 144; + flag20 = true; + if (flag2) + flag16 = true; + } + if ((double) num19 > 1.0) + flag16 = true; + rectangle.Y = num12 + 54; + rectangle.X = num20; + Microsoft.Xna.Framework.Color color = Lighting.GetColor(x, y); + switch (num5) + { + case 0: + color = Microsoft.Xna.Framework.Color.White; + break; + case 2: + color *= 0.5f; + break; + case 3: + color = Microsoft.Xna.Framework.Color.Transparent; + break; + } + if (color == Microsoft.Xna.Framework.Color.Transparent) + { + float num21 = num19 - 1f; + } + else + { + Main.spriteBatch.Draw(TextureAssets.WireNew.Value, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + zero2, new Microsoft.Xna.Framework.Rectangle?(rectangle), color * (1f / num19), 0.0f, zero1, 1f, SpriteEffects.None, 0.0f); + if (flag18) + { + if (flag16 && !flag4) + Main.spriteBatch.Draw(TextureAssets.WireNew.Value, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + zero2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(18, rectangle.Y, 16, 6)), color, 0.0f, zero1, 1f, SpriteEffects.None, 0.0f); + } + if (flag17) + { + if (flag16 && !flag5) + Main.spriteBatch.Draw(TextureAssets.WireNew.Value, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + zero2 + new Vector2(0.0f, 10f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(72, rectangle.Y + 10, 16, 6)), color, 0.0f, zero1, 1f, SpriteEffects.None, 0.0f); + } + if (flag19) + { + if (flag16 && !flag3) + Main.spriteBatch.Draw(TextureAssets.WireNew.Value, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + zero2 + new Vector2(10f, 0.0f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(46, rectangle.Y, 6, 16)), color, 0.0f, zero1, 1f, SpriteEffects.None, 0.0f); + } + if (flag20) + { + if (flag16 && !flag2) + Main.spriteBatch.Draw(TextureAssets.WireNew.Value, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + zero2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(144, rectangle.Y, 6, 16)), color, 0.0f, zero1, 1f, SpriteEffects.None, 0.0f); + } + } + } + } + if (Main.tile[x, y].actuator() && ((double) Lighting.Brightness(x, y) > 0.0 || num6 == 0)) + { + Microsoft.Xna.Framework.Color color = Lighting.GetColor(x, y); + switch (num6) + { + case 0: + color = Microsoft.Xna.Framework.Color.White; + break; + case 2: + color *= 0.5f; + break; + case 3: + color = Microsoft.Xna.Framework.Color.Transparent; + break; + } + Main.spriteBatch.Draw(TextureAssets.Actuator.Value, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + zero2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Actuator.Width(), TextureAssets.Actuator.Height())), color * num1, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (tile.active() && tile.type == (ushort) 423 && tile.frameY == (short) 36) + this.DrawWiresSpecialTiles.Add(Tuple.Create(x, y, tile.type)); + } + } + for (int index = 0; index < this.DrawWiresSpecialTiles.Count; ++index) + { + Tuple wiresSpecialTile = this.DrawWiresSpecialTiles[index]; + if (wiresSpecialTile.Item3 == (ushort) 423) + { + Vector2 start = new Vector2((float) (wiresSpecialTile.Item1 * 16 - 32 - 1), (float) (wiresSpecialTile.Item2 * 16 - 160 - 1)) + zero2; + Vector2 end = new Vector2((float) (wiresSpecialTile.Item1 * 16 + 48 + 1), (float) (wiresSpecialTile.Item2 * 16 + 1)) + zero2; + Utils.DrawRectangle(Main.spriteBatch, start, end, Microsoft.Xna.Framework.Color.LightSeaGreen, Microsoft.Xna.Framework.Color.LightSeaGreen, 2f); + } + } + TimeLogger.DetailedDrawTime(34); + } + + public static int ConvertPaintIdToTileShaderIndex( + int paintIndexOnTile, + bool isUsedForPaintingGrass, + bool useWallShaderHacks) + { + if (paintIndexOnTile == 31) + return 0; + if (paintIndexOnTile == 30 & useWallShaderHacks) + return 43; + if (paintIndexOnTile >= 28) + return paintIndexOnTile + 12; + return isUsedForPaintingGrass && paintIndexOnTile >= 1 && paintIndexOnTile <= 12 ? paintIndexOnTile + 27 : paintIndexOnTile; + } + + public static void ResetWindCounter(bool resetExtreme = false) + { + FastRandom withRandomSeed = FastRandom.CreateWithRandomSeed(); + Main.windCounter = withRandomSeed.Next(900, 2701); + if (!resetExtreme) + return; + Main.extremeWindCounter = withRandomSeed.Next(10, 31); + } + + public static void NewLightning() + { + if (Main.DisableIntenseVisualEffects) + return; + Main.thunderDelay = Main.rand.Next(3) != 0 ? (Main.rand.Next(2) != 0 ? Main.rand.Next(11, 61) : Main.rand.Next(31, 121)) : Main.rand.Next(1, 31); + Main.thunderDistance = Main.thunderDelay; + Main.lightningDecay = (float) ((double) Main.rand.NextFloat() * 0.0500000007450581 + 0.00800000037997961); + Main.lightningSpeed = (float) ((double) Main.rand.NextFloat() * 0.0500000007450581 + 0.0500000007450581); + } + + public void UpdateWeather(GameTime gameTime) + { + if (Main.netMode != 2) + { + bool isActive = this.IsActive; + if (Main.thunderDelay > 0) + { + --Main.thunderDelay; + if (Main.thunderDelay == 0) + { + Vector2 center = Main.player[Main.myPlayer].Center; + float num1 = (float) (Main.thunderDistance * 15); + if (Main.rand.Next(2) == 0) + num1 *= -1f; + center.X += num1; + int num2 = (int) (Main.worldSurface * 16.0) - 500; + if ((double) center.Y > (double) num2) + center.Y = (float) num2; + if (isActive) + SoundEngine.PlaySound(43, center); + } + } + if ((double) Main.lightningSpeed > 0.0) + { + Main.lightning += Main.lightningSpeed; + if ((double) Main.lightning >= 1.0) + { + Main.lightning = 1f; + Main.lightningSpeed = 0.0f; + } + Lighting.LightTiles(this.firstTileX, this.lastTileX, this.firstTileY, this.lastTileY); + Lighting.LightTiles(this.firstTileX, this.lastTileX, this.firstTileY, this.lastTileY); + } + else if ((double) Main.lightning > 0.0) + { + Main.lightning -= Main.lightningDecay; + Lighting.LightTiles(this.firstTileX, this.lastTileX, this.firstTileY, this.lastTileY); + Lighting.LightTiles(this.firstTileX, this.lastTileX, this.firstTileY, this.lastTileY); + } + else if (Main.thunderDelay <= 0 && (double) Main.player[Main.myPlayer].position.Y < Main.rockLayer * 16.0 && (double) Main.atmo == 1.0) + { + if (Main.IsItStorming) + { + float num3 = 600f; + float num4 = 1600f; + if ((double) Main.maxRaining > 0.8) + { + num3 *= 0.6f; + num4 *= 0.8f; + } + if ((double) Main.maxRaining > 0.7) + { + num3 *= 0.7f; + num4 *= 0.9f; + } + if ((double) Main.maxRaining > 0.6) + { + num3 *= 0.8f; + num4 *= 0.95f; + } + if ((double) Math.Abs(Main.windSpeedTarget) > 0.7) + { + num3 *= 0.6f; + num4 *= 0.8f; + } + if ((double) Math.Abs(Main.windSpeedTarget) > 0.6) + { + num3 *= 0.7f; + num4 *= 0.9f; + } + if ((double) Math.Abs(Main.windSpeedTarget) > 0.5) + { + num3 *= 0.8f; + num4 *= 0.95f; + } + float num5 = (float) Main.rand.Next((int) num3, (int) num4) * (float) ((1.0 - (double) Main.maxRaining + 1.0) / 2.0) * (float) ((1.0 - (double) Main.windSpeedTarget + 1.0) / 2.0) * (float) Main.dayRate; + if (Main.rand.Next((int) num5) == 0) + Main.NewLightning(); + } + else if ((double) Main.GraveyardVisualIntensity >= 0.9 && Main.rand.Next(7200) == 0) + Main.NewLightning(); + } + } + float num6 = 0.8f; + float num7 = 0.0003f; + float num8 = Main.windSpeedTarget * (float) (1.0 + 0.555555582046509 * (double) Main.maxRaining); + bool enabled = CreativePowerManager.Instance.GetPower().Enabled; + if (!enabled && LanternNight.LanternsUp) + Main.windSpeedTarget = 0.0f; + float num9 = num7 + Math.Abs(num8 - Main.windSpeedCurrent) * 0.0015f; + if ((double) Main.windSpeedCurrent < (double) num8) + { + Main.windSpeedCurrent += num9; + if ((double) Main.windSpeedCurrent > (double) num8) + Main.windSpeedCurrent = num8; + } + else if ((double) Main.windSpeedCurrent > (double) num8) + { + Main.windSpeedCurrent -= num9; + if ((double) Main.windSpeedCurrent < (double) num8) + Main.windSpeedCurrent = num8; + } + switch (Main.netMode) + { + case 1: + break; + case 2: + if (!enabled && LanternNight.LanternsUp) + break; + if (!enabled) + { + --Main.windCounter; + if (Main.windCounter <= 0) + { + float num10 = 1f; + if ((double) Main.windSpeedTarget < 0.0) + num10 = -1f; + if (Main.rand.Next(4) == 0) + Main.windSpeedTarget += (float) Main.rand.Next(-25, 26) * (1f / 1000f); + else if (Main.rand.Next(2) == 0) + Main.windSpeedTarget += (float) Main.rand.Next(-50, 51) * (1f / 1000f); + else + Main.windSpeedTarget += (float) Main.rand.Next(-100, 101) * (1f / 1000f); + --Main.extremeWindCounter; + if (Main.extremeWindCounter <= 0) + { + Main.ResetWindCounter(true); + if (Main.rand.Next(30) < 13) + { + if (Main.rand.Next(2) == 0) + { + Main.windSpeedTarget = 0.0f; + Main.windCounter = Main.rand.Next(7200, 28801); + } + else + Main.windSpeedTarget = (float) Main.rand.Next(-200, 201) * (1f / 1000f); + } + else + Main.windSpeedTarget = Main.rand.Next(20) >= 13 ? (float) Main.rand.Next(-850, 851) * (1f / 1000f) : (float) Main.rand.Next(-400, 401) * (1f / 1000f); + if ((double) Math.Abs(Main.windSpeedTarget) > 0.3) + Main.extremeWindCounter += Main.rand.Next(5, 11); + if ((double) Math.Abs(Main.windSpeedTarget) > 0.5) + Main.extremeWindCounter += Main.rand.Next(10, 21); + if ((double) Math.Abs(Main.windSpeedTarget) > 0.7) + Main.extremeWindCounter += Main.rand.Next(15, 31); + } + else + Main.ResetWindCounter(); + if (Main.rand.Next(3) != 0 && ((double) num10 < 0.0 && (double) Main.windSpeedTarget > 0.0 || (double) num10 > 0.0 && (double) Main.windSpeedTarget < 0.0)) + Main.windSpeedTarget *= -1f; + } + if ((double) Main.windSpeedTarget > (double) num6) + Main.windSpeedTarget = num6; + if ((double) Main.windSpeedTarget < -(double) num6) + Main.windSpeedTarget = -num6; + } + if (Main.rand.Next(60) == 0) + Main.numCloudsTemp += Main.rand.Next(-1, 2); + if ((double) Main.rand.Next(1000) < 50.0 * (double) Main.cloudBGAlpha) + ++Main.numCloudsTemp; + if ((double) Main.rand.Next(1300) < 25.0 * (1.0 - (double) Main.cloudBGAlpha)) + --Main.numCloudsTemp; + if ((double) Main.rand.Next(1000) < 200.0 * (double) Main.cloudAlpha && Main.numCloudsTemp < 100) + ++Main.numCloudsTemp; + if ((double) Main.rand.Next(1000) < 50.0 * (double) Main.cloudAlpha) + ++Main.numCloudsTemp; + if (Main.numCloudsTemp > 66 && Main.rand.Next(100) == 0) + Main.numCloudsTemp -= Main.rand.Next(1, 3); + if (Main.numCloudsTemp < 50 && Main.rand.Next(100) == 0) + Main.numCloudsTemp += Main.rand.Next(1, 3); + if ((double) Main.cloudBGActive <= 0.0 && Main.numCloudsTemp > 100 && (double) Main.cloudAlpha == 0.0) + Main.numCloudsTemp = 100; + if (Main.numCloudsTemp < -20) + Main.numCloudsTemp = -20; + if ((double) Main.cloudAlpha > 0.0 && (double) Main.numClouds < 200.0 * (double) Main.cloudAlpha) + { + while ((double) Main.numClouds < 200.0 * (double) Main.cloudAlpha) + { + Main.numClouds += Main.rand.Next(30); + if (Main.numClouds > 200) + Main.numClouds = 200; + if (Main.numCloudsTemp < Main.numClouds) + Main.numCloudsTemp = Main.numClouds; + } + if (Main.netMode == 2) + NetMessage.SendData(7); + } + --Main.weatherCounter; + if (Main.weatherCounter > 0) + break; + if (Main.rand.Next(2) == 0) + { + if (Main.rand.Next(2) == 0) + Main.numCloudsTemp += Main.rand.Next(250); + else + Main.numCloudsTemp += Main.rand.Next(100); + } + if (Main.numCloudsTemp < 0) + Main.numCloudsTemp = 0; + if (Main.numCloudsTemp > 200) + Main.numCloudsTemp = 200; + Main.numClouds = Main.numCloudsTemp; + Main.weatherCounter = Main.rand.Next(3600, 10800); + if (Main.netMode != 2) + break; + NetMessage.SendData(7); + break; + default: + if (Main.gameMenu) + break; + goto case 2; + } + } + + public void LoadBackground(int i) + { + if (i < 0 || TextureAssets.Background[i].State != null) + return; + Main.Assets.Request(TextureAssets.Background[i].Name, (AssetRequestMode) 1); + Main.backgroundWidth[i] = TextureAssets.Background[i].Width(); + Main.backgroundHeight[i] = TextureAssets.Background[i].Height(); + switch (i) + { + case 219: + case 220: + case 221: + case 235: + case 271: + case 272: + case 273: + case 281: + Main.backgroundWidth[i] /= 2; + Main.backgroundHeight[i] /= 2; + break; + } + } + + public void LoadItem(int i) + { + if (TextureAssets.Item[i].State != null) + return; + Main.Assets.Request(TextureAssets.Item[i].Name, (AssetRequestMode) 1); + } + + public void LoadNPC(int i) + { + if (TextureAssets.Npc[i].State != null) + return; + Main.Assets.Request(TextureAssets.Npc[i].Name, (AssetRequestMode) 1); + } + + public void LoadProjectile(int i) + { + if (TextureAssets.Projectile[i].State != null) + return; + Main.Assets.Request(TextureAssets.Projectile[i].Name, (AssetRequestMode) 1); + } + + public void LoadGore(int i) + { + if (TextureAssets.Gore[i].State != null) + return; + Main.Assets.Request(TextureAssets.Gore[i].Name, (AssetRequestMode) 1); + } + + public void LoadWall(int i) + { + if (TextureAssets.Wall[i].State != null) + return; + Main.Assets.Request(TextureAssets.Wall[i].Name, (AssetRequestMode) 1); + } + + public void LoadTiles(int i) + { + if (TextureAssets.Tile[i].State != null) + return; + Main.Assets.Request(TextureAssets.Tile[i].Name, (AssetRequestMode) 1); + } + + public void LoadItemFlames(int i) + { + if (TextureAssets.ItemFlame[i].State != null) + return; + try + { + Main.Assets.Request(TextureAssets.ItemFlame[i].Name, (AssetRequestMode) 1); + } + catch + { + } + } + + public void LoadWings(int i) + { + if (TextureAssets.Wings[i].State != null) + return; + Main.Assets.Request(TextureAssets.Wings[i].Name, (AssetRequestMode) 1); + } + + public void LoadHair(int i) + { + if (TextureAssets.PlayerHair[i].State != null) + return; + Main.Assets.Request(TextureAssets.PlayerHair[i].Name, (AssetRequestMode) 1); + Main.Assets.Request(TextureAssets.PlayerHairAlt[i].Name, (AssetRequestMode) 1); + } + + public void LoadArmorHead(int i) + { + if (TextureAssets.ArmorHead[i].State != null) + return; + Main.Assets.Request(TextureAssets.ArmorHead[i].Name, (AssetRequestMode) 1); + } + + public void LoadArmorBody(int i) + { + if (ArmorIDs.Body.Sets.UsesNewFramingCode[i]) + { + if (TextureAssets.ArmorBodyComposite[i].State != null) + return; + Main.Assets.Request(TextureAssets.ArmorBodyComposite[i].Name, (AssetRequestMode) 1); + } + else + { + if (TextureAssets.ArmorBody[i].State != null) + return; + Main.Assets.Request(TextureAssets.FemaleBody[i].Name, (AssetRequestMode) 1); + Main.Assets.Request(TextureAssets.ArmorBody[i].Name, (AssetRequestMode) 1); + Main.Assets.Request(TextureAssets.ArmorArm[i].Name, (AssetRequestMode) 1); + } + } + + public void LoadArmorLegs(int i) + { + if (TextureAssets.ArmorLeg[i].State != null) + return; + Main.Assets.Request(TextureAssets.ArmorLeg[i].Name, (AssetRequestMode) 1); + } + + public void LoadAccHandsOn(int i) + { + if (TextureAssets.AccHandsOn[i].State == null) + Main.Assets.Request(TextureAssets.AccHandsOn[i].Name, (AssetRequestMode) 1); + if (!ArmorIDs.HandOn.Sets.UsesNewFramingCode[i] || TextureAssets.AccHandsOnComposite[i].State != null) + return; + Main.Assets.Request(TextureAssets.AccHandsOnComposite[i].Name, (AssetRequestMode) 1); + } + + public void LoadAccHandsOff(int i) + { + if (TextureAssets.AccHandsOff[i].State == null) + Main.Assets.Request(TextureAssets.AccHandsOff[i].Name, (AssetRequestMode) 1); + if (!ArmorIDs.HandOff.Sets.UsesNewFramingCode[i] || TextureAssets.AccHandsOffComposite[i].State != null) + return; + Main.Assets.Request(TextureAssets.AccHandsOffComposite[i].Name, (AssetRequestMode) 1); + } + + public void LoadAccBack(int i) + { + if (TextureAssets.AccBack[i].State != null) + return; + Main.Assets.Request(TextureAssets.AccBack[i].Name, (AssetRequestMode) 1); + } + + public void LoadAccFront(int i) + { + if (TextureAssets.AccFront[i].State != null) + return; + Main.Assets.Request(TextureAssets.AccFront[i].Name, (AssetRequestMode) 1); + } + + public void LoadAccShoes(int i) + { + if (TextureAssets.AccShoes[i].State != null) + return; + Main.Assets.Request(TextureAssets.AccShoes[i].Name, (AssetRequestMode) 1); + } + + public void LoadAccWaist(int i) + { + if (TextureAssets.AccWaist[i].State != null) + return; + Main.Assets.Request(TextureAssets.AccWaist[i].Name, (AssetRequestMode) 1); + } + + public void LoadAccShield(int i) + { + if (TextureAssets.AccShield[i].State != null) + return; + Main.Assets.Request(TextureAssets.AccShield[i].Name, (AssetRequestMode) 1); + } + + public void LoadAccNeck(int i) + { + if (TextureAssets.AccNeck[i].State != null) + return; + Main.Assets.Request(TextureAssets.AccNeck[i].Name, (AssetRequestMode) 1); + } + + public void LoadAccFace(int i) + { + if (TextureAssets.AccFace[i].State != null) + return; + Main.Assets.Request(TextureAssets.AccFace[i].Name, (AssetRequestMode) 1); + } + + public void LoadAccBalloon(int i) + { + if (TextureAssets.AccBalloon[i].State != null) + return; + Main.Assets.Request(TextureAssets.AccBalloon[i].Name, (AssetRequestMode) 1); + } + + public void LoadFlameRing() + { + if (TextureAssets.FlameRing.State != null) + return; + Main.Assets.Request(TextureAssets.FlameRing.Name, (AssetRequestMode) 1); + } + + protected void DrawSurfaceBG() + { + Microsoft.Xna.Framework.Color surfaceBackgroundsBase = Main.ColorOfSurfaceBackgroundsBase; + int num1 = 30; + if (Main.gameMenu) + num1 = 0; + if (WorldGen.drunkWorldGen) + num1 = -180; + float num2 = (float) Main.worldSurface; + if ((double) num2 == 0.0) + num2 = 1f; + Vector2 screenPosition = Main.screenPosition; + double num3 = (double) Main.screenPosition.Y + (double) (Main.screenHeight / 2) - 600.0; + double num4 = -(double) MathHelper.Lerp((float) ((num3 - (double) this.screenOff / 2.0) / ((double) num2 * 16.0)), 1f, 0.0f); + double backgroundTopMagicNumber = (-num3 + (double) this.screenOff / 2.0) / ((double) num2 * 16.0); + float bgGlobalScaleMultiplier = 2f; + int num5 = 0; + float num6 = SkyManager.Instance.ProcessCloudAlpha() * Main.atmo; + if (!Main.mapFullscreen && (double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index = 0; index < 200; ++index) + { + if (Main.cloud[index].active && (double) Main.cloud[index].scale < 1.0) + { + Microsoft.Xna.Framework.Color color = Main.cloud[index].cloudColor(Main.ColorOfTheSkies); + float num7 = Main.cloud[index].scale * 0.8f; + float num8 = (float) (((double) Main.cloud[index].scale + 1.0) / 2.0 * 0.899999976158142); + color.R = (byte) ((double) color.R * (double) num7); + color.G = (byte) ((double) color.G * (double) num8); + float num9 = Main.cloud[index].position.Y * ((float) Main.screenHeight / 600f); + float num10 = Main.cloud[index].position.Y + (float) (int) (backgroundTopMagicNumber * 750.0 + 830.0) + (float) (int) this.scAdj + (float) num5; + Main.spriteBatch.Draw(TextureAssets.Cloud[Main.cloud[index].type].Value, new Vector2(Main.cloud[index].position.X + (float) TextureAssets.Cloud[Main.cloud[index].type].Width() * 0.5f, num10 + (float) TextureAssets.Cloud[Main.cloud[index].type].Height() * 0.5f), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Cloud[Main.cloud[index].type].Width(), TextureAssets.Cloud[Main.cloud[index].type].Height())), color * num6, Main.cloud[index].rotation, new Vector2((float) TextureAssets.Cloud[Main.cloud[index].type].Width() * 0.5f, (float) TextureAssets.Cloud[Main.cloud[index].type].Height() * 0.5f), Main.cloud[index].scale, Main.cloud[index].spriteDir, 0.0f); + } + } + } + if (Main.invasionType == 4 && !SkyManager.Instance["Martian"].IsActive()) + SkyManager.Instance.Activate("Martian", new Vector2()); + else if (Main.invasionType != 4 && SkyManager.Instance["Martian"].IsActive()) + SkyManager.Instance.Deactivate("Martian"); + SkyManager.Instance.ResetDepthTracker(); + this.bgParallax = 0.15; + int num11 = -180; + bool flag = true; + int num12 = 0; + if (Main.gameMenu) + num12 -= num11; + int pushBGTopHack = num12 + num1; + if (!WorldGen.drunkWorldGen && !Main.mapFullscreen && (double) Main.screenPosition.Y / 16.0 <= Main.worldSurface + 10.0) + { + if (Main.BackgroundEnabled) + { + if ((double) Main.cloudBGActive > 0.0) + { + Main.cloudBGAlpha += 0.0005f * (float) Main.dayRate; + if ((double) Main.cloudBGAlpha > 1.0) + Main.cloudBGAlpha = 1f; + } + else + { + Main.cloudBGAlpha -= 0.0005f * (float) Main.dayRate; + if ((double) Main.cloudBGAlpha < 0.0) + Main.cloudBGAlpha = 0.0f; + } + if ((double) Main.cloudBGAlpha > 0.0) + { + this.LoadBackground(Main.cloudBG[0]); + this.LoadBackground(Main.cloudBG[1]); + float num13 = Main.cloudBGAlpha; + if ((double) num13 > 1.0) + num13 = 1f; + Main.bgScale = 1.65f; + this.bgParallax = 0.0900000035762787; + if (this.IsActive && !Main.gamePaused) + Main.cloudBGX[0] += (float) ((double) Main.windSpeedCurrent * this.bgParallax * 9.0) * (float) Main.dayRate; + if ((double) Main.cloudBGX[0] > (double) Main.backgroundWidth[Main.cloudBG[0]] * (double) Main.bgScale) + Main.cloudBGX[0] -= (float) Main.backgroundWidth[Main.cloudBG[0]] * Main.bgScale; + if ((double) Main.cloudBGX[0] < (double) -Main.backgroundWidth[Main.cloudBG[0]] * (double) Main.bgScale) + Main.cloudBGX[0] += (float) Main.backgroundWidth[Main.cloudBG[0]] * Main.bgScale; + float num14 = (float) Main.backgroundWidth[Main.cloudBG[0]] * Main.bgScale; + this.bgTopY = (int) (backgroundTopMagicNumber * 900.0 + 600.0) + (int) this.scAdj + pushBGTopHack; + if (Main.gameMenu) + this.bgTopY = pushBGTopHack - 150; + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) num14) - (double) num14 / 2.0 - (double) num14); + this.bgStartX += (int) Main.cloudBGX[0]; + this.bgLoops = Main.screenWidth / (int) num14 + 2 + 2; + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * num13; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[Main.cloudBG[0]].Value, new Vector2((float) this.bgStartX + num14 * (float) index, (float) this.bgTopY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.cloudBG[0]], Main.backgroundHeight[Main.cloudBG[0]])), Main.ColorOfSurfaceBackgroundsModified * num6, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + float num15 = Main.cloudBGAlpha * 1.5f; + if ((double) num15 > 1.0) + num15 = 1f; + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * num15; + Main.bgScale = 1.85f; + this.bgParallax = 0.12; + if (this.IsActive && !Main.gamePaused) + Main.cloudBGX[1] += (float) ((double) Main.windSpeedCurrent * this.bgParallax * 9.0) * (float) Main.dayRate; + if ((double) Main.cloudBGX[1] > (double) Main.backgroundWidth[Main.cloudBG[1]] * (double) Main.bgScale) + Main.cloudBGX[1] -= (float) Main.backgroundWidth[Main.cloudBG[1]] * Main.bgScale; + if ((double) Main.cloudBGX[1] < (double) -Main.backgroundWidth[Main.cloudBG[1]] * (double) Main.bgScale) + Main.cloudBGX[1] += (float) Main.backgroundWidth[Main.cloudBG[1]] * Main.bgScale; + float num16 = (float) Main.backgroundWidth[Main.cloudBG[1]] * Main.bgScale; + this.bgTopY = (int) (backgroundTopMagicNumber * 1100.0 + 750.0) + (int) this.scAdj + pushBGTopHack; + if (Main.gameMenu) + this.bgTopY = pushBGTopHack - 50; + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) num16) - (double) num16 / 2.0 - (double) num16); + this.bgStartX += (int) Main.cloudBGX[1]; + this.bgLoops = Main.screenWidth / (int) num16 + 2 + 2; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[Main.cloudBG[1]].Value, new Vector2((float) this.bgStartX + num16 * (float) index, (float) this.bgTopY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[Main.cloudBG[1]], Main.backgroundHeight[Main.cloudBG[1]])), Main.ColorOfSurfaceBackgroundsModified * num6, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + this.DrawSurfaceBG_BackMountainsStep1(backgroundTopMagicNumber, bgGlobalScaleMultiplier, pushBGTopHack); + } + this.cTop = (float) (this.bgTopY - 50); + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index = 0; index < 200; ++index) + { + if (Main.cloud[index].active && (double) Main.cloud[index].scale < 1.15 && (double) Main.cloud[index].scale >= 1.0) + { + Microsoft.Xna.Framework.Color color = Main.cloud[index].cloudColor(Main.ColorOfTheSkies); + if ((double) Main.atmo < 1.0) + color *= Main.atmo; + float num17 = Main.cloud[index].position.Y * ((float) Main.screenHeight / 600f); + float num18 = (float) (((double) Main.screenPosition.Y / 16.0 - 24.0) / Main.worldSurface); + if ((double) num18 < 0.0) + num18 = 0.0f; + float num19; + if ((double) num18 > 1.0) + num19 = 1f; + if (Main.gameMenu) + num19 = 1f; + Main.spriteBatch.Draw(TextureAssets.Cloud[Main.cloud[index].type].Value, new Vector2(Main.cloud[index].position.X + (float) TextureAssets.Cloud[Main.cloud[index].type].Width() * 0.5f, (float) ((double) num17 + (double) TextureAssets.Cloud[Main.cloud[index].type].Height() * 0.5 + (double) this.cTop + 200.0)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Cloud[Main.cloud[index].type].Width(), TextureAssets.Cloud[Main.cloud[index].type].Height())), color * num6, Main.cloud[index].rotation, new Vector2((float) TextureAssets.Cloud[Main.cloud[index].type].Width() * 0.5f, (float) TextureAssets.Cloud[Main.cloud[index].type].Height() * 0.5f), Main.cloud[index].scale, Main.cloud[index].spriteDir, 0.0f); + } + } + } + if (Main.SceneMetrics.HolyTileCount > 0 && Main.BackgroundEnabled) + { + this.bgParallax = 0.17; + Main.bgScale = 1.1f; + this.bgTopY = (int) (backgroundTopMagicNumber * 1400.0 + 900.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(18, backgroundTopMagicNumber, pushBGTopHack); + Main.bgScale *= bgGlobalScaleMultiplier; + Main.bgWidthScaled = (int) (2100.0 * (double) Main.bgScale * 1.05); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if (Main.gameMenu) + { + this.bgTopY = 230 + pushBGTopHack; + this.bgStartX -= 500; + } + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + Microsoft.Xna.Framework.Color color = surfaceBackgroundsBase; + float num20 = (float) (Main.SceneMetrics.HolyTileCount - SceneMetrics.HallowTileThreshold) / (float) (SceneMetrics.HallowTileMax - SceneMetrics.HallowTileThreshold); + if ((double) num20 > 0.5) + num20 = 0.5f; + else if ((double) num20 < 0.0) + num20 = 0.0f; + color.R = (byte) ((double) color.R * (double) num20); + color.G = (byte) ((double) color.G * (double) num20); + color.B = (byte) ((double) color.B * (double) num20); + color.A = (byte) ((double) color.A * (double) num20 * 0.800000011920929); + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + this.LoadBackground(18); + this.LoadBackground(19); + for (int index = 0; index < this.bgLoops; ++index) + { + Main.spriteBatch.Draw(TextureAssets.Background[18].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[18], Main.backgroundHeight[18])), color, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(TextureAssets.Background[19].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index + 1900), (float) (this.bgTopY + 100)), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[19], Main.backgroundHeight[19])), color, 0.0f, new Vector2(), Main.bgScale * 0.9f, SpriteEffects.None, 0.0f); + } + } + } + if (Main.treeMntBGSet1[1] > -1) + { + this.LoadBackground(Main.treeMntBGSet1[1]); + this.bgParallax = 0.2; + Main.bgScale = 1.15f; + Main.bgScale *= bgGlobalScaleMultiplier; + int num21 = Main.backgroundWidth[Main.treeMntBGSet1[1]]; + if (num21 == 0) + num21 = 1; + Main.bgWidthScaled = (int) ((double) num21 * (double) Main.bgScale); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if (Main.treeMntBGSet1[1] == 172) + ++this.bgLoops; + this.bgTopY = (int) (backgroundTopMagicNumber * 1400.0 + 1260.0) + (int) this.scAdj + pushBGTopHack; + } + if (Main.BackgroundEnabled) + this.DrawSurfaceBG_BackMountainsStep2(pushBGTopHack); + this.cTop = (float) ((double) this.bgTopY * 1.00999999046326 - 150.0); + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index = 0; index < 200; ++index) + { + if (Main.cloud[index].active && (double) Main.cloud[index].scale >= 1.14999997615814) + { + Microsoft.Xna.Framework.Color color = Main.cloud[index].cloudColor(Main.ColorOfTheSkies); + if ((double) Main.atmo < 1.0) + color *= Main.atmo; + float num22 = (float) ((double) Main.cloud[index].position.Y * ((double) Main.screenHeight / 600.0) - 100.0); + float num23 = (float) (((double) Main.screenPosition.Y / 16.0 - 24.0) / Main.worldSurface); + if ((double) num23 < 0.0) + num23 = 0.0f; + float num24; + if ((double) num23 > 1.0) + num24 = 1f; + if (Main.gameMenu) + num24 = 1f; + Main.spriteBatch.Draw(TextureAssets.Cloud[Main.cloud[index].type].Value, new Vector2(Main.cloud[index].position.X + (float) TextureAssets.Cloud[Main.cloud[index].type].Width() * 0.5f, num22 + (float) TextureAssets.Cloud[Main.cloud[index].type].Height() * 0.5f + this.cTop), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Cloud[Main.cloud[index].type].Width(), TextureAssets.Cloud[Main.cloud[index].type].Height())), color * num6, Main.cloud[index].rotation, new Vector2((float) TextureAssets.Cloud[Main.cloud[index].type].Width() * 0.5f, (float) TextureAssets.Cloud[Main.cloud[index].type].Height() * 0.5f), Main.cloud[index].scale, Main.cloud[index].spriteDir, 0.0f); + } + } + } + } + if (flag) + pushBGTopHack += num11; + if (!Main.mapFullscreen) + { + for (int index = 0; index < Main.bgAlphaFrontLayer.Length; ++index) + { + if (Main.BackgroundEnabled) + { + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * Main.bgAlphaFrontLayer[index]; + if ((double) Main.bgAlphaFrontLayer[index] > 0.0 && index == 0) + { + this.DrawSurfaceBG_Forest(backgroundTopMagicNumber, bgGlobalScaleMultiplier, pushBGTopHack, Main.treeBGSet1); + this.DrawSurfaceBG_DrawChangeOverlay(0); + } + if ((double) Main.bgAlphaFrontLayer[index] > 0.0 && index == 10) + { + this.DrawSurfaceBG_Forest(backgroundTopMagicNumber, bgGlobalScaleMultiplier, pushBGTopHack, Main.treeBGSet2); + this.DrawSurfaceBG_DrawChangeOverlay(1); + } + if ((double) Main.bgAlphaFrontLayer[index] > 0.0 && index == 11) + { + this.DrawSurfaceBG_Forest(backgroundTopMagicNumber, bgGlobalScaleMultiplier, pushBGTopHack, Main.treeBGSet3); + this.DrawSurfaceBG_DrawChangeOverlay(2); + } + if ((double) Main.bgAlphaFrontLayer[index] > 0.0 && index == 12) + { + this.DrawSurfaceBG_Forest(backgroundTopMagicNumber, bgGlobalScaleMultiplier, pushBGTopHack, Main.treeBGSet4); + this.DrawSurfaceBG_DrawChangeOverlay(3); + } + if ((double) Main.bgAlphaFrontLayer[index] > 0.0 && index == 1) + { + int[] corruptBg = Main.corruptBG; + this.DrawSurfaceBG_Corrupt(backgroundTopMagicNumber, bgGlobalScaleMultiplier, pushBGTopHack, corruptBg); + this.DrawSurfaceBG_DrawChangeOverlay(4); + } + if ((double) Main.bgAlphaFrontLayer[index] > 0.0 && index == 2) + { + int[] desertBg = Main.desertBG; + this.DrawSurfaceBG_Desert(backgroundTopMagicNumber, bgGlobalScaleMultiplier, pushBGTopHack, desertBg); + this.DrawSurfaceBG_DrawChangeOverlay(9); + } + if ((double) Main.bgAlphaFrontLayer[index] > 0.0 && index == 3) + { + int[] jungleBg = Main.jungleBG; + this.DrawSurfaceBG_Jungle(backgroundTopMagicNumber, bgGlobalScaleMultiplier, pushBGTopHack, jungleBg); + this.DrawSurfaceBG_DrawChangeOverlay(5); + } + if ((double) Main.bgAlphaFrontLayer[index] > 0.0 && index == 4) + this.DrawSurfaceBG_DrawChangeOverlay(10); + if ((double) Main.bgAlphaFrontLayer[index] > 0.0 && index == 5) + { + this.DrawSurfaceBG_GoodEvilDesert(backgroundTopMagicNumber, bgGlobalScaleMultiplier, pushBGTopHack); + this.DrawSurfaceBG_DrawChangeOverlay(9); + } + if ((double) Main.bgAlphaFrontLayer[index] > 0.0 && index == 6) + { + int[] hallowBg = Main.hallowBG; + this.DrawSurfaceBG_Hallow(backgroundTopMagicNumber, bgGlobalScaleMultiplier, pushBGTopHack, hallowBg); + this.DrawSurfaceBG_DrawChangeOverlay(7); + } + if ((double) Main.bgAlphaFrontLayer[index] > 0.0 && index == 7) + { + int[] snowBg = Main.snowBG; + this.DrawSurfaceBG_Snow(backgroundTopMagicNumber, bgGlobalScaleMultiplier, pushBGTopHack, snowBg); + this.DrawSurfaceBG_DrawChangeOverlay(6); + } + if ((double) Main.bgAlphaFrontLayer[index] > 0.0 && index == 8) + { + int[] crimsonBg = Main.crimsonBG; + this.DrawSurfaceBG_Crimson(backgroundTopMagicNumber, bgGlobalScaleMultiplier, pushBGTopHack, crimsonBg); + this.DrawSurfaceBG_DrawChangeOverlay(8); + } + if ((double) Main.bgAlphaFrontLayer[index] > 0.0 && index == 9) + { + int[] mushroomBg = Main.mushroomBG; + this.DrawSurfaceBG_Mushroom(backgroundTopMagicNumber, bgGlobalScaleMultiplier, pushBGTopHack, mushroomBg); + this.DrawSurfaceBG_DrawChangeOverlay(11); + } + } + } + } + if (flag) + { + int num25 = pushBGTopHack - num11; + } + float fogPower = Main.DrawSurfaceBG_GetFogPower(); + if (!Main.mapFullscreen && (double) fogPower > 0.0 && !Main.gameMenu && (double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + this.bgParallax = 0.1; + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.backgroundWidth[Main.background]) - (double) (Main.backgroundWidth[Main.background] / 2)); + this.bgLoops = Main.screenWidth / Main.backgroundWidth[Main.background] + 2; + this.bgStartY = 0; + this.bgLoopsY = 0; + this.bgTopY = (int) (-(double) Main.screenPosition.Y / (Main.worldSurface * 16.0 - 600.0) * 200.0); + Texture2D texture = TextureAssets.Background[49].Value; + for (int index = 0; index < this.bgLoops; ++index) + { + this.bgStartX = 0; + Microsoft.Xna.Framework.Color color = Main.ColorOfTheSkies * fogPower * Main.atmo; + int height = Math.Max(Main.screenHeight + 210, texture.Height); + Main.spriteBatch.Draw(texture, new Microsoft.Xna.Framework.Rectangle(this.bgStartX + texture.Width * index, this.bgTopY, texture.Width, height), color); + } + } + if (Main.mapFullscreen) + return; + SkyManager.Instance.DrawRemainingDepth(Main.spriteBatch); + } + + private static float DrawSurfaceBG_GetFogPower() => Math.Max(Main.cloudAlpha, Main.GraveyardVisualIntensity * 0.92f); + + private void DrawSurfaceBG_DrawBackMountainsLayer(int bgTextureIndex) + { + if (bgTextureIndex < 0) + return; + this.LoadBackground(bgTextureIndex); + int layerYoffset = this.DrawSurfaceBG_GetLayerYOffset(bgTextureIndex); + this.bgTopY += layerYoffset; + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTextureIndex].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), this.GetBackgroundRect(bgTextureIndex), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + this.bgTopY -= layerYoffset; + } + + private int DrawSurfaceBG_GetLayerYOffset(int bgTextureIndex) + { + switch (bgTextureIndex) + { + case 59: + return -550; + case 93: + case 168: + case 169: + case 170: + return -50; + case 171: + return -100; + case 172: + return 130; + case 176: + return -760; + case 177: + return -200; + case 179: + return -100; + case 180: + case 181: + case 182: + case 183: + return -350; + case 246: + return -150; + case 247: + return -150; + case 263: + return -700; + case 269: + return -100; + case 270: + return -50; + case 271: + return -300; + case 272: + return -380; + case 277: + return -260; + case 278: + return -120; + case 280: + return -170; + case 281: + return -300; + case 283: + return -800; + default: + return 0; + } + } + + private float GetForestToForestBackgroundLerperValue() => (float) ((double) (Main.GlobalTimeWrappedHourly * 1.570796f).ToRotationVector2().X * 0.5 + 0.5); + + private void DrawSurfaceBG_BackMountainsStep1( + double backgroundTopMagicNumber, + float bgGlobalScaleMultiplier, + int pushBGTopHack) + { + Microsoft.Xna.Framework.Color surfaceBackgroundsBase = Main.ColorOfSurfaceBackgroundsBase; + Main.bgScale = 1f; + this.bgTopY = (int) (backgroundTopMagicNumber * 1300.0 + 1090.0) + (int) this.scAdj + pushBGTopHack; + Main.bgScale *= bgGlobalScaleMultiplier; + this.bgParallax = 0.15; + Main.bgWidthScaled = (int) (1024.0 * (double) Main.bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + if (Main.bgWidthScaled == 0) + Main.bgWidthScaled = 1024; + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if (Main.gameMenu) + this.bgTopY = 100 + pushBGTopHack; + if ((double) Main.screenPosition.Y >= Main.worldSurface * 16.0 + 16.0) + return; + if ((double) Main.bgAlphaFarBackLayer[0] > 0.0) + { + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * Main.bgAlphaFarBackLayer[0]; + this.DrawSurfaceBG_DrawBackMountainsLayer(Main.treeMntBGSet1[0]); + } + if ((double) Main.bgAlphaFarBackLayer[10] > 0.0) + { + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * Main.bgAlphaFarBackLayer[10]; + this.DrawSurfaceBG_DrawBackMountainsLayer(Main.treeMntBGSet2[0]); + } + if ((double) Main.bgAlphaFarBackLayer[11] > 0.0) + { + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * Main.bgAlphaFarBackLayer[11]; + this.DrawSurfaceBG_DrawBackMountainsLayer(Main.treeMntBGSet3[0]); + } + if ((double) Main.bgAlphaFarBackLayer[12] > 0.0) + { + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * Main.bgAlphaFarBackLayer[12]; + this.DrawSurfaceBG_DrawBackMountainsLayer(Main.treeMntBGSet4[0]); + } + if ((double) Main.bgAlphaFarBackLayer[1] > 0.0) + { + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * Main.bgAlphaFarBackLayer[1]; + if (WorldGen.desertBG != 4) + this.DrawSurfaceBG_DrawBackMountainsLayer(23); + } + if ((double) Main.bgAlphaFarBackLayer[2] > 0.0) + { + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * Main.bgAlphaFarBackLayer[2]; + this.DrawSurfaceBG_DrawBackMountainsLayer(24); + } + if ((double) Main.bgAlphaFarBackLayer[4] > 0.0) + { + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * Main.bgAlphaFarBackLayer[4]; + this.DrawSurfaceBG_DrawBackMountainsLayer(Main.snowMntBG[0]); + } + if ((double) Main.bgAlphaFarBackLayer[5] > 0.0) + { + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * Main.bgAlphaFarBackLayer[5]; + if (WorldGen.crimsonBG != 5) + this.DrawSurfaceBG_DrawBackMountainsLayer(24); + } + if ((double) Main.bgAlphaFarBackLayer[6] > 0.0 && WorldGen.hallowBG == 3) + { + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * Main.bgAlphaFarBackLayer[6]; + this.DrawSurfaceBG_DrawBackMountainsLayer(246); + } + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 5f); + } + + private void DrawSurfaceBG_BackMountainsStep2(int pushBGTopHack) + { + if (Main.gameMenu) + { + this.bgTopY = 230 + pushBGTopHack; + this.bgStartX -= 500; + } + Microsoft.Xna.Framework.Color surfaceBackgroundsBase = Main.ColorOfSurfaceBackgroundsBase; + this.UpdateOceanWaterLineForAmbience(); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + if ((double) Main.screenPosition.Y >= Main.worldSurface * 16.0 + 16.0) + return; + if ((double) Main.bgAlphaFarBackLayer[0] > 0.0) + { + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * Main.bgAlphaFarBackLayer[0]; + if (Main.treeMntBGSet1[1] > -1) + this.DrawSurfaceBG_DrawBackMountainsLayer(Main.treeMntBGSet1[1]); + } + if ((double) Main.bgAlphaFarBackLayer[1] > 0.0) + { + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * Main.bgAlphaFarBackLayer[1]; + if (WorldGen.desertBG != 4) + this.DrawSurfaceBG_DrawBackMountainsLayer(22); + } + if ((double) Main.bgAlphaFarBackLayer[2] > 0.0) + { + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * Main.bgAlphaFarBackLayer[2]; + this.DrawSurfaceBG_DrawBackMountainsLayer(25); + } + if ((double) Main.bgAlphaFarBackLayer[3] > 0.0) + { + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * Main.bgAlphaFarBackLayer[3]; + this.DrawSurfaceBG_DrawBackMountainsLayer(Main.oceanBG); + } + if ((double) Main.bgAlphaFarBackLayer[4] > 0.0) + { + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * Main.bgAlphaFarBackLayer[4]; + this.DrawSurfaceBG_DrawBackMountainsLayer(Main.snowMntBG[1]); + } + if ((double) Main.bgAlphaFarBackLayer[5] > 0.0) + { + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * Main.bgAlphaFarBackLayer[5]; + if (WorldGen.crimsonBG != 5) + this.DrawSurfaceBG_DrawBackMountainsLayer(42); + } + if ((double) Main.bgAlphaFarBackLayer[6] > 0.0 && WorldGen.hallowBG == 3) + { + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * Main.bgAlphaFarBackLayer[6]; + this.DrawSurfaceBG_DrawBackMountainsLayer(247); + } + if ((double) Main.bgAlphaFarBackLayer[10] > 0.0) + { + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * Main.bgAlphaFarBackLayer[10]; + if (Main.treeMntBGSet2[1] > -1) + this.DrawSurfaceBG_DrawBackMountainsLayer(Main.treeMntBGSet2[1]); + } + if ((double) Main.bgAlphaFarBackLayer[11] > 0.0) + { + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * Main.bgAlphaFarBackLayer[11]; + if (Main.treeMntBGSet3[1] > -1) + this.DrawSurfaceBG_DrawBackMountainsLayer(Main.treeMntBGSet3[1]); + } + if ((double) Main.bgAlphaFarBackLayer[12] <= 0.0) + return; + Main.ColorOfSurfaceBackgroundsModified = surfaceBackgroundsBase * Main.bgAlphaFarBackLayer[12]; + if (Main.treeMntBGSet4[1] <= -1) + return; + this.DrawSurfaceBG_DrawBackMountainsLayer(Main.treeMntBGSet4[1]); + } + + private void UpdateOceanWaterLineForAmbience() + { + int layerYoffset = this.DrawSurfaceBG_GetLayerYOffset(Main.oceanBG); + int num = 0; + switch (Main.oceanBG) + { + case 28: + case 110: + case 111: + case 209: + case 210: + num = 102; + break; + case 283: + num = 124; + break; + } + float yScreenPosition = (float) (this.bgTopY + layerYoffset) + (float) num * Main.bgScale; + AmbientSkyDrawCache.Instance.SetOceanLineInfo(yScreenPosition, Main.bgAlphaFarBackLayer[3]); + } + + private void DrawSurfaceBG_Mushroom( + double backgroundTopMagicNumber, + float bgGlobalScaleMultiplier, + int pushBGTopHack, + int[] bgTexIndexes) + { + Vector3 vector3_1 = new Vector3(0.1f, 0.15f, 0.3f); + Vector3 vector3_2 = new Vector3(0.1f, 0.175f, 0.3f); + Vector3 vector3_3 = new Vector3(0.125f, 0.2f, 0.3f); + float num1 = 0.5f; + float num2 = 0.625f; + float num3 = 0.75f; + Vector3 vector3_4 = vector3_1 * 3f; + Vector3 vector3_5 = vector3_2 * 3f; + Vector3 vector3_6 = vector3_3 * 3f; + float num4 = (float) Main.ColorOfSurfaceBackgroundsModified.A / (float) byte.MaxValue; + Microsoft.Xna.Framework.Color backgroundsModified = Main.ColorOfSurfaceBackgroundsModified; + float num5 = (float) Main.rand.Next(28, 42) * (1f / 1000f) + (float) (270 - (int) Main.mouseTextColor) / 5000f; + float x1 = vector3_4.X; + float num6 = vector3_4.Y + num5 / 2f; + float num7 = vector3_4.Z + num5; + float num8 = x1 * (float) byte.MaxValue; + float num9 = num6 * (float) byte.MaxValue; + float num10 = num7 * (float) byte.MaxValue; + float num11 = num8 * (num1 * num4); + float num12 = num9 * (num1 * num4); + float num13 = num10 * (num1 * num4); + if ((double) num11 > (double) byte.MaxValue) + num11 = (float) byte.MaxValue; + if ((double) num12 > (double) byte.MaxValue) + num12 = (float) byte.MaxValue; + if ((double) num13 > (double) byte.MaxValue) + num13 = (float) byte.MaxValue; + if ((double) num11 > (double) backgroundsModified.R) + backgroundsModified.R = (byte) num11; + if ((double) num12 > (double) backgroundsModified.G) + backgroundsModified.G = (byte) num12; + if ((double) num13 > (double) backgroundsModified.B) + backgroundsModified.B = (byte) num13; + Main.bgScale = 1.25f; + Main.bgScale *= bgGlobalScaleMultiplier; + this.LoadBackground(bgTexIndexes[0]); + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[0]] * (double) Main.bgScale); + this.bgParallax = 0.4; + this.SetBackgroundOffsets(bgTexIndexes[0], backgroundTopMagicNumber, pushBGTopHack); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + this.bgTopY = (int) (backgroundTopMagicNumber * 1800.0 + 1400.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[0], backgroundTopMagicNumber, pushBGTopHack); + if (Main.gameMenu) + this.bgTopY = 320 + pushBGTopHack; + if (Main.bgWidthScaled != 0) + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if (TextureAssets.Background[bgTexIndexes[0]].Value == null) + return; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[0]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), this.GetBackgroundRect(bgTexIndexes[0]), backgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + backgroundsModified = Main.ColorOfSurfaceBackgroundsModified; + float num14 = (float) Main.rand.Next(28, 42) * (1f / 1000f) + (float) (270 - (int) Main.mouseTextColor) / 5000f; + float x2 = vector3_5.X; + float num15 = vector3_5.Y + num14 / 2f; + float num16 = vector3_5.Z + num14; + float num17 = x2 * (float) byte.MaxValue; + float num18 = num15 * (float) byte.MaxValue; + float num19 = num16 * (float) byte.MaxValue; + float num20 = num17 * (num2 * num4); + float num21 = num18 * (num2 * num4); + float num22 = num19 * (num2 * num4); + if ((double) num20 > (double) byte.MaxValue) + num20 = (float) byte.MaxValue; + if ((double) num21 > (double) byte.MaxValue) + num21 = (float) byte.MaxValue; + if ((double) num22 > (double) byte.MaxValue) + num22 = (float) byte.MaxValue; + if ((double) num20 > (double) backgroundsModified.R) + backgroundsModified.R = (byte) num20; + if ((double) num21 > (double) backgroundsModified.G) + backgroundsModified.G = (byte) num21; + if ((double) num22 > (double) backgroundsModified.B) + backgroundsModified.B = (byte) num22; + Main.bgScale = 1.32f; + Main.bgScale *= bgGlobalScaleMultiplier; + this.LoadBackground(bgTexIndexes[1]); + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[1]] * (double) Main.bgScale); + this.bgParallax = 0.43; + this.SetBackgroundOffsets(bgTexIndexes[1], backgroundTopMagicNumber, pushBGTopHack); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + this.bgTopY = (int) (backgroundTopMagicNumber * 1950.0 + 1675.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[1], backgroundTopMagicNumber, pushBGTopHack); + if (Main.gameMenu) + { + this.bgTopY = 400 + pushBGTopHack; + this.bgStartX -= 80; + } + if (Main.bgWidthScaled == 0) + return; + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[1]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), this.GetBackgroundRect(bgTexIndexes[1]), backgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + backgroundsModified = Main.ColorOfSurfaceBackgroundsModified; + float num23 = (float) Main.rand.Next(28, 42) * (1f / 1000f) + (float) (270 - (int) Main.mouseTextColor) / 3000f; + float x3 = vector3_6.X; + float num24 = vector3_6.Y + num23 / 2f; + float num25 = vector3_6.Z + num23; + float num26 = x3 * ((float) byte.MaxValue * num4 * num3); + float num27 = num24 * ((float) byte.MaxValue * num4 * num3); + float num28 = num25 * ((float) byte.MaxValue * num4 * num3); + if ((double) num26 > (double) byte.MaxValue) + num26 = (float) byte.MaxValue; + if ((double) num27 > (double) byte.MaxValue) + num27 = (float) byte.MaxValue; + if ((double) num28 > (double) byte.MaxValue) + num28 = (float) byte.MaxValue; + if ((double) num26 > (double) backgroundsModified.R) + backgroundsModified.R = (byte) num26; + if ((double) num27 > (double) backgroundsModified.G) + backgroundsModified.G = (byte) num27; + if ((double) num28 > (double) backgroundsModified.B) + backgroundsModified.B = (byte) num28; + Main.bgScale = 1.36f; + Main.bgScale *= bgGlobalScaleMultiplier; + this.LoadBackground(bgTexIndexes[2]); + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[2]] * (double) Main.bgScale); + this.bgParallax = 0.49; + this.SetBackgroundOffsets(bgTexIndexes[2], backgroundTopMagicNumber, pushBGTopHack); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + this.bgTopY = (int) (backgroundTopMagicNumber * 2100.0 + 1950.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[2], backgroundTopMagicNumber, pushBGTopHack); + if (Main.gameMenu) + { + this.bgTopY = 480 + pushBGTopHack; + this.bgStartX -= 120; + } + if (Main.bgWidthScaled == 0) + return; + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[2]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), this.GetBackgroundRect(bgTexIndexes[2]), backgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f); + } + + private void DrawSurfaceBG_Crimson( + double backgroundTopMagicNumber, + float bgGlobalScaleMultiplier, + int pushBGTopHack, + int[] bgTexIndexes) + { + if (bgTexIndexes[0] > -1) + { + Main.bgScale = 1.25f; + this.bgParallax = 0.4; + this.bgTopY = (int) (backgroundTopMagicNumber * 1800.0 + 1500.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[0], backgroundTopMagicNumber, pushBGTopHack); + Main.bgScale *= bgGlobalScaleMultiplier; + this.LoadBackground(bgTexIndexes[0]); + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[0]] * (double) Main.bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + if (bgTexIndexes[0] == 105) + this.bgTopY += 50; + if (bgTexIndexes[0] == 174) + this.bgTopY -= 350; + if (Main.gameMenu) + this.bgTopY = 320 + pushBGTopHack; + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[0]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[bgTexIndexes[0]], Main.backgroundHeight[bgTexIndexes[0]])), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + if (bgTexIndexes[1] > -1) + { + Main.bgScale = 1.31f; + this.bgParallax = 0.43; + this.bgTopY = (int) (backgroundTopMagicNumber * 1950.0 + 1750.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[1], backgroundTopMagicNumber, pushBGTopHack); + Main.bgScale *= bgGlobalScaleMultiplier; + this.LoadBackground(bgTexIndexes[1]); + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[1]] * (double) Main.bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + if (Main.gameMenu) + { + this.bgTopY = 400 + pushBGTopHack; + this.bgStartX -= 80; + } + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[1]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[bgTexIndexes[1]], Main.backgroundHeight[bgTexIndexes[1]])), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + Main.bgScale = 1.34f; + this.bgParallax = 0.49; + this.bgTopY = (int) (backgroundTopMagicNumber * 2100.0 + 2000.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[2], backgroundTopMagicNumber, pushBGTopHack); + Main.bgScale *= bgGlobalScaleMultiplier; + this.LoadBackground(bgTexIndexes[2]); + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[2]] * (double) Main.bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + if (Main.gameMenu) + { + this.bgTopY = 480 + pushBGTopHack; + this.bgStartX -= 120; + } + if (bgTexIndexes[2] == 175) + { + this.bgStartX -= 1000; + this.bgTopY -= 400; + } + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y >= Main.worldSurface * 16.0 + 16.0) + return; + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[2]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[bgTexIndexes[2]], Main.backgroundHeight[bgTexIndexes[2]])), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + + private void DrawSurfaceBG_Snow( + double backgroundTopMagicNumber, + float bgGlobalScaleMultiplier, + int pushBGTopHack, + int[] bgTexIndexes) + { + if (bgTexIndexes[0] >= 0) + { + Main.bgScale = 1.25f; + this.bgParallax = 0.4; + this.bgTopY = (int) (backgroundTopMagicNumber * 1800.0 + 1500.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[0], backgroundTopMagicNumber, pushBGTopHack); + Main.bgScale *= bgGlobalScaleMultiplier; + this.LoadBackground(bgTexIndexes[0]); + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[0]] * (double) Main.bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + if (Main.gameMenu) + this.bgTopY = 320 + pushBGTopHack; + this.bgTopY += this.DrawSurfaceBG_GetLayerYOffset(bgTexIndexes[0]); + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[0]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[bgTexIndexes[0]], Main.backgroundHeight[bgTexIndexes[0]])), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + if (bgTexIndexes[1] >= 0) + { + Main.bgScale = 1.31f; + this.bgParallax = 0.43; + this.bgTopY = (int) (backgroundTopMagicNumber * 1950.0 + 1750.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[1], backgroundTopMagicNumber, pushBGTopHack); + Main.bgScale *= bgGlobalScaleMultiplier; + this.LoadBackground(bgTexIndexes[1]); + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[1]] * (double) Main.bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + if (Main.gameMenu) + { + this.bgTopY = 400 + pushBGTopHack; + this.bgStartX -= 80; + } + this.bgTopY += this.DrawSurfaceBG_GetLayerYOffset(bgTexIndexes[1]); + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[1]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[bgTexIndexes[1]], Main.backgroundHeight[bgTexIndexes[1]])), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + if (bgTexIndexes[2] < 0) + return; + Main.bgScale = 1.34f; + this.bgParallax = 0.49; + this.bgTopY = (int) (backgroundTopMagicNumber * 2100.0 + 2000.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[2], backgroundTopMagicNumber, pushBGTopHack); + Main.bgScale *= bgGlobalScaleMultiplier; + this.LoadBackground(bgTexIndexes[2]); + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[2]] * (double) Main.bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + if (Main.gameMenu) + { + this.bgTopY = 480 + pushBGTopHack; + this.bgStartX -= 120; + } + this.bgTopY += this.DrawSurfaceBG_GetLayerYOffset(bgTexIndexes[2]); + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y >= Main.worldSurface * 16.0 + 16.0) + return; + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[2]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[bgTexIndexes[2]], Main.backgroundHeight[bgTexIndexes[2]])), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + + private void SetBackgroundOffsets( + int backgroundID, + double backgroundTopMagicNumber, + int pushBGTopHack) + { + int num1 = 0; + int num2 = 0; + switch (backgroundID) + { + case 18: + if (WorldGen.hallowBG == 3) + { + this.bgParallax = 0.17; + Main.bgScale = 1.1f; + num1 = 1400; + num2 = 1100; + break; + } + break; + case 207: + this.bgParallax = 0.32; + break; + case 219: + this.bgParallax = 0.25; + break; + case 220: + this.bgParallax = 0.34; + break; + case 221: + this.bgParallax = 0.43; + break; + case 222: + num1 = 1800; + num2 = 1400; + break; + case 223: + num1 = 2150; + num2 = 1850; + break; + case 224: + num1 = 2500; + num2 = 2400; + break; + case 234: + this.bgParallax = 0.23; + num1 = 1700; + num2 = 1150; + break; + case 235: + this.bgParallax = 0.33; + num1 = 1950; + num2 = 1550; + break; + case 236: + this.bgParallax = 0.41; + num1 = 2100; + num2 = 2000; + break; + case 237: + num1 = 1800; + num2 = 1500; + break; + case 238: + num1 = 1950; + num2 = 1500; + break; + case 239: + num1 = 2100; + num2 = 1900; + break; + case 240: + Main.bgScale = 1.15f; + this.bgParallax = 0.3; + num1 = 1800; + num2 = 1500; + break; + case 241: + Main.bgScale = 1.21f; + this.bgParallax = 0.43; + num1 = 1950; + num2 = 1300; + break; + case 242: + Main.bgScale = 1.34f; + this.bgParallax = 0.49; + num1 = 2100; + num2 = 1400; + break; + case 243: + Main.bgScale = 1.15f; + this.bgParallax = 0.25; + num1 = 1800; + num2 = 1400; + break; + case 244: + Main.bgScale = 1.21f; + this.bgParallax = 0.35; + num1 = 1950; + num2 = 1550; + break; + case 245: + Main.bgScale = 1.24f; + this.bgParallax = 0.45; + num1 = 2100; + num2 = 1650; + break; + case 248: + Main.bgScale = 1.3f; + this.bgParallax = 0.37; + num1 = 1800; + num2 = 1100; + break; + case 249: + Main.bgScale = 1.4f; + this.bgParallax = 0.43; + num1 = 1950; + num2 = 1200; + break; + case 250: + Main.bgScale = 1.7f; + this.bgParallax = 0.49; + num1 = 2000; + num2 = 1000; + break; + case (int) byte.MaxValue: + Main.bgScale = 1.15f; + this.bgParallax = 0.25; + num1 = 1800; + num2 = 1450; + break; + case 256: + Main.bgScale = 1.21f; + this.bgParallax = 0.32; + num1 = 1950; + num2 = 1550; + break; + case 257: + Main.bgScale = 1.34f; + this.bgParallax = 0.4; + num1 = 2100; + num2 = 1550; + break; + case 258: + Main.bgScale = 1.25f; + this.bgParallax = 0.23; + num1 = 1800; + num2 = 850; + break; + case 259: + Main.bgScale = 1.31f; + this.bgParallax = 0.33; + num1 = 1950; + num2 = 1500; + break; + case 260: + Main.bgScale = 1.34f; + this.bgParallax = 0.4; + num1 = 2100; + num2 = 1650; + break; + case 261: + this.bgParallax = 0.27; + break; + case 262: + this.bgParallax = 0.4; + break; + case 263: + Main.bgScale = 1.25f; + this.bgParallax = 0.23; + num1 = 1800; + num2 = 1450; + break; + case 264: + Main.bgScale = 1.31f; + this.bgParallax = 0.33; + num1 = 1950; + num2 = 1700; + break; + case 265: + Main.bgScale = 1.34f; + this.bgParallax = 0.4; + num1 = 2100; + num2 = 2000; + break; + case 266: + Main.bgScale = 1.31f; + this.bgParallax = 0.33; + num1 = 1950; + num2 = 1600; + break; + case 267: + Main.bgScale = 1.25f; + this.bgParallax = 0.23; + num1 = 1700; + num2 = 1300; + break; + case 268: + Main.bgScale = 1.34f; + this.bgParallax = 0.41; + num1 = 2100; + num2 = 1850; + break; + case 273: + this.bgParallax = 0.490000009536743; + num1 = 2100; + num2 = 1560; + break; + case 279: + Main.bgScale = 2.5f; + this.bgParallax = 0.349999994039536; + num1 = 1850; + num2 = 1750; + break; + case 282: + Main.bgScale = 2.6f; + this.bgParallax = 0.25; + num1 = 1800; + num2 = 1340; + break; + case 284: + this.bgParallax = 0.23; + num1 = 1600; + num2 = 900; + break; + case 285: + this.bgParallax = 0.36; + num1 = 1900; + num2 = 960; + break; + case 286: + this.bgParallax = 0.42; + num1 = 2100; + num2 = 1200; + break; + case 287: + this.bgParallax = 0.21; + num1 = 1700; + num2 = 1560; + break; + case 288: + this.bgParallax = 0.33; + num1 = 1950; + num2 = 1730; + break; + case 289: + this.bgParallax = 0.41; + num1 = 2100; + num2 = 1400; + break; + } + if (num1 == 0 && num2 == 0) + return; + this.bgTopY = (int) (backgroundTopMagicNumber * (double) num1 + (double) num2) + (int) this.scAdj + pushBGTopHack; + } + + private void DrawSurfaceBG_Hallow( + double backgroundTopMagicNumber, + float bgGlobalScaleMultiplier, + int pushBGTopHack, + int[] bgTexIndexes) + { + if (bgTexIndexes[0] > 0) + { + Main.bgScale = 1.25f; + this.bgParallax = 0.4; + this.bgTopY = (int) (backgroundTopMagicNumber * 1800.0 + 1500.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[0], backgroundTopMagicNumber, pushBGTopHack); + Main.bgScale *= bgGlobalScaleMultiplier; + this.LoadBackground(bgTexIndexes[0]); + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[0]] * (double) Main.bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1.2f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + if (Main.gameMenu) + this.bgTopY = 320 + pushBGTopHack; + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[0]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), this.GetBackgroundRect(bgTexIndexes[0]), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + if (bgTexIndexes[1] > 0) + { + Main.bgScale = 1.31f; + this.bgParallax = 0.43; + this.bgTopY = (int) (backgroundTopMagicNumber * 1950.0 + 1750.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[1], backgroundTopMagicNumber, pushBGTopHack); + Main.bgScale *= bgGlobalScaleMultiplier; + this.LoadBackground(bgTexIndexes[1]); + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[1]] * (double) Main.bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + if (Main.gameMenu) + { + this.bgTopY = 400 + pushBGTopHack; + this.bgStartX -= 80; + } + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[1]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), this.GetBackgroundRect(bgTexIndexes[1]), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + if (bgTexIndexes[2] <= 0) + return; + Main.bgScale = 1.34f; + this.bgParallax = 0.49; + this.bgTopY = (int) (backgroundTopMagicNumber * 2100.0 + 2000.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[2], backgroundTopMagicNumber, pushBGTopHack); + Main.bgScale *= bgGlobalScaleMultiplier; + this.LoadBackground(bgTexIndexes[2]); + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[2]] * (double) Main.bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + if (Main.gameMenu) + { + this.bgTopY = 480 + pushBGTopHack; + this.bgStartX -= 120; + } + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y >= Main.worldSurface * 16.0 + 16.0) + return; + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[2]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), this.GetBackgroundRect(bgTexIndexes[2]), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + + private void DrawSurfaceBG_GoodEvilDesert( + double backgroundTopMagicNumber, + float bgGlobalScaleMultiplier, + int pushBGTopHack) + { + this.LoadBackground(26); + Main.bgScale = 1.25f; + Main.bgScale *= bgGlobalScaleMultiplier; + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[26] * (double) Main.bgScale); + this.bgParallax = 0.37; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + this.bgTopY = (int) (backgroundTopMagicNumber * 1800.0 + 1750.0) + (int) this.scAdj + pushBGTopHack; + if (Main.gameMenu) + this.bgTopY = 320 + pushBGTopHack; + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[26].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[26], Main.backgroundHeight[26])), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + Main.bgScale = 1.34f; + Main.bgScale *= bgGlobalScaleMultiplier; + this.LoadBackground(27); + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[27] * (double) Main.bgScale); + this.bgParallax = 0.49; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + this.bgTopY = (int) (backgroundTopMagicNumber * 2100.0 + 2150.0) + (int) this.scAdj + pushBGTopHack; + if (Main.gameMenu) + { + this.bgTopY = 480 + pushBGTopHack; + this.bgStartX -= 120; + } + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y >= Main.worldSurface * 16.0 + 16.0) + return; + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[27].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[27], Main.backgroundHeight[27])), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + + private void DrawSurfaceBG_Jungle( + double backgroundTopMagicNumber, + float bgGlobalScaleMultiplier, + int pushBGTopHack, + int[] bgTexIndexes) + { + this.LoadBackground(bgTexIndexes[0]); + Main.bgScale = 1.25f; + Main.bgScale *= bgGlobalScaleMultiplier; + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[0]] * (double) Main.bgScale); + this.bgParallax = 0.4; + this.SetBackgroundOffsets(bgTexIndexes[0], backgroundTopMagicNumber, pushBGTopHack); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + this.bgTopY = (int) (backgroundTopMagicNumber * 1800.0 + 1660.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[0], backgroundTopMagicNumber, pushBGTopHack); + if (Main.gameMenu) + this.bgTopY = 320 + pushBGTopHack; + if (bgTexIndexes[0] == 59) + this.bgTopY -= 200; + this.bgTopY += this.DrawSurfaceBG_GetLayerYOffset(bgTexIndexes[0]); + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[0]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), this.GetBackgroundRect(bgTexIndexes[0]), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + this.LoadBackground(bgTexIndexes[1]); + Main.bgScale = 1.31f; + Main.bgScale *= bgGlobalScaleMultiplier; + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[1]] * (double) Main.bgScale); + this.bgParallax = 0.43; + this.SetBackgroundOffsets(bgTexIndexes[1], backgroundTopMagicNumber, pushBGTopHack); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + this.bgTopY = (int) (backgroundTopMagicNumber * 1950.0 + 1840.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[1], backgroundTopMagicNumber, pushBGTopHack); + if (Main.gameMenu) + { + this.bgTopY = 400 + pushBGTopHack; + this.bgStartX -= 80; + } + if (bgTexIndexes[1] == 60) + this.bgTopY -= 175; + this.bgTopY += this.DrawSurfaceBG_GetLayerYOffset(bgTexIndexes[1]); + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[1]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), this.GetBackgroundRect(bgTexIndexes[1]), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.FlipHorizontally, 0.0f); + } + Main.bgScale = 1.34f; + Main.bgScale *= bgGlobalScaleMultiplier; + this.LoadBackground(bgTexIndexes[2]); + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[2]] * (double) Main.bgScale); + this.bgParallax = 0.49; + this.SetBackgroundOffsets(bgTexIndexes[2], backgroundTopMagicNumber, pushBGTopHack); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + this.bgTopY = (int) (backgroundTopMagicNumber * 2100.0 + 2060.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[2], backgroundTopMagicNumber, pushBGTopHack); + if (Main.gameMenu) + { + this.bgTopY = 480 + pushBGTopHack; + this.bgStartX -= 120; + } + if (bgTexIndexes[2] == 61) + this.bgTopY -= 150; + this.bgTopY += this.DrawSurfaceBG_GetLayerYOffset(bgTexIndexes[2]); + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y >= Main.worldSurface * 16.0 + 16.0) + return; + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[2]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), this.GetBackgroundRect(bgTexIndexes[2]), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + + private void DrawSurfaceBG_Desert( + double backgroundTopMagicNumber, + float bgGlobalScaleMultiplier, + int pushBGTopHack, + int[] bgTexIndexes) + { + if (bgTexIndexes[0] > 0) + { + Main.bgScale = 1.25f; + this.bgParallax = 0.37; + this.bgTopY = (int) (backgroundTopMagicNumber * 1800.0 + 1750.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[0], backgroundTopMagicNumber, pushBGTopHack); + this.LoadBackground(bgTexIndexes[0]); + Main.bgScale *= bgGlobalScaleMultiplier; + float num = (float) Main.backgroundWidth[bgTexIndexes[0]] * Main.bgScale; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) num) - (double) num / 2.0); + if (Main.gameMenu) + this.bgTopY = 320 + pushBGTopHack; + this.bgLoops = Main.screenWidth / (int) num + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[0]].Value, new Vector2((float) this.bgStartX + num * (float) index, (float) this.bgTopY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[bgTexIndexes[0]], Main.backgroundHeight[bgTexIndexes[0]])), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + if (bgTexIndexes[1] > 0) + { + Main.bgScale = 1.34f; + this.bgParallax = 0.49; + this.bgTopY = (int) (backgroundTopMagicNumber * 2100.0 + 2150.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[1], backgroundTopMagicNumber, pushBGTopHack); + Main.bgScale *= bgGlobalScaleMultiplier; + this.LoadBackground(bgTexIndexes[1]); + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[1]] * (double) Main.bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + if (Main.gameMenu) + { + this.bgTopY = 480 + pushBGTopHack; + this.bgStartX -= 120; + } + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[1]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[bgTexIndexes[1]], Main.backgroundHeight[bgTexIndexes[1]])), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + if (bgTexIndexes[2] <= 0) + return; + Main.bgScale = 1.34f; + this.bgParallax = 0.49; + this.bgTopY = (int) (backgroundTopMagicNumber * 2100.0 + 2150.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[2], backgroundTopMagicNumber, pushBGTopHack); + Main.bgScale *= bgGlobalScaleMultiplier; + this.LoadBackground(bgTexIndexes[2]); + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[2]] * (double) Main.bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + if (Main.gameMenu) + { + this.bgTopY = 480 + pushBGTopHack; + this.bgStartX -= 120; + } + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y >= Main.worldSurface * 16.0 + 16.0) + return; + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[2]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[bgTexIndexes[2]], Main.backgroundHeight[bgTexIndexes[2]])), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + + private void DrawSurfaceBG_DrawChangeOverlay(int backgroundAreaId) + { + Texture2D texture = TextureAssets.MagicPixel.Value; + Microsoft.Xna.Framework.Color color = Microsoft.Xna.Framework.Color.Black * WorldGen.BackgroundsCache.GetFlashPower(backgroundAreaId); + Main.spriteBatch.Draw(texture, new Microsoft.Xna.Framework.Rectangle(0, 0, Main.screenWidth, Main.screenHeight), color); + } + + private void DrawSurfaceBG_Corrupt( + double backgroundTopMagicNumber, + float bgGlobalScaleMultiplier, + int pushBGTopHack, + int[] bgTexIndexes) + { + Main.bgScale = 1.25f; + this.bgParallax = 0.4; + this.bgTopY = (int) (backgroundTopMagicNumber * 1800.0 + 1500.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[0], backgroundTopMagicNumber, pushBGTopHack); + Main.bgScale *= bgGlobalScaleMultiplier; + this.LoadBackground(bgTexIndexes[0]); + if (Main.backgroundWidth[bgTexIndexes[0]] == 0 || Main.backgroundHeight[bgTexIndexes[0]] == 0) + return; + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[0]] * (double) Main.bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + if (Main.gameMenu) + this.bgTopY = 320 + pushBGTopHack; + if (bgTexIndexes[0] == 56) + this.bgTopY -= 100; + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[0]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[bgTexIndexes[0]], Main.backgroundHeight[bgTexIndexes[0]])), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + Main.bgScale = 1.31f; + this.bgParallax = 0.43; + this.bgTopY = (int) (backgroundTopMagicNumber * 1950.0 + 1750.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[1], backgroundTopMagicNumber, pushBGTopHack); + Main.bgScale *= bgGlobalScaleMultiplier; + this.LoadBackground(bgTexIndexes[1]); + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[1]] * (double) Main.bgScale); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + if (Main.gameMenu) + { + this.bgTopY = 400 + pushBGTopHack; + this.bgStartX -= 80; + } + if (bgTexIndexes[0] == 56) + this.bgTopY -= 100; + if (Main.bgWidthScaled == 0) + Main.bgWidthScaled = 1; + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + try + { + Texture2D texture = TextureAssets.Background[bgTexIndexes[1]].Value; + if (texture != null) + { + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(texture, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[bgTexIndexes[1]], Main.backgroundHeight[bgTexIndexes[1]])), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.FlipHorizontally, 0.0f); + } + } + catch + { + this.LoadBackground(bgTexIndexes[1]); + } + } + Main.bgScale = 1.34f; + this.bgParallax = 0.49; + this.bgTopY = (int) (backgroundTopMagicNumber * 2100.0 + 2000.0) + (int) this.scAdj + pushBGTopHack; + this.SetBackgroundOffsets(bgTexIndexes[2], backgroundTopMagicNumber, pushBGTopHack); + Main.bgScale *= bgGlobalScaleMultiplier; + this.LoadBackground(bgTexIndexes[2]); + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[2]] * (double) Main.bgScale); + if (Main.bgWidthScaled == 0) + Main.bgWidthScaled = 150; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + if (Main.gameMenu) + { + this.bgTopY = 480 + pushBGTopHack; + this.bgStartX -= 120; + } + if (bgTexIndexes[0] == 56) + this.bgTopY -= 100; + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y >= Main.worldSurface * 16.0 + 16.0) + return; + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[2]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.backgroundWidth[bgTexIndexes[2]], Main.backgroundHeight[bgTexIndexes[2]])), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + + private Microsoft.Xna.Framework.Rectangle? GetBackgroundRect(int backgroundTextureIndex) + { + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle(0, 0, 1, 1); + switch (backgroundTextureIndex) + { + case 219: + case 220: + case 221: + case 271: + case 272: + case 273: + int num1 = (int) (this.GetBackgroundCounter() / 15U) % 4; + Microsoft.Xna.Framework.Rectangle rectangle2 = TextureAssets.Background[backgroundTextureIndex].Frame(2, 2, num1 % 2, num1 / 2); + rectangle2.Inflate(0, -2); + return new Microsoft.Xna.Framework.Rectangle?(rectangle2); + case 235: + int num2 = (int) (this.GetBackgroundCounter() / 20U) % 4; + Microsoft.Xna.Framework.Rectangle rectangle3 = TextureAssets.Background[backgroundTextureIndex].Frame(2, 2, num2 % 2, num2 / 2); + rectangle3.Inflate(0, -2); + return new Microsoft.Xna.Framework.Rectangle?(rectangle3); + case 281: + int num3 = (int) (this.GetBackgroundCounter() / 5U) % 4; + Microsoft.Xna.Framework.Rectangle rectangle4 = TextureAssets.Background[backgroundTextureIndex].Frame(2, 2, num3 % 2, num3 / 2); + rectangle4.Inflate(0, -2); + return new Microsoft.Xna.Framework.Rectangle?(rectangle4); + default: + return new Microsoft.Xna.Framework.Rectangle?(); + } + } + + private uint GetBackgroundCounter() => !Main.gameMenu ? Main.GameUpdateCount : (uint) ((double) Main.GlobalTimeWrappedHourly * 40.0); + + private void DrawSurfaceBG_Forest( + double backgroundTopMagicNumber, + float bgGlobalScaleMultiplier, + int pushBGTopHack, + int[] bgTexIndexes) + { + Main.bgScale = 1.25f; + this.bgParallax = 0.4; + this.bgTopY = (int) (backgroundTopMagicNumber * 1800.0 + 1500.0) + (int) this.scAdj + pushBGTopHack; + if (bgTexIndexes[0] == 91) + { + this.bgParallax = 0.270000010728836; + Main.bgScale = 1.2f; + } + if (bgTexIndexes[0] == 173) + { + this.bgParallax = 0.25; + Main.bgScale = 1.3f; + } + if (bgTexIndexes[0] == 178) + { + this.bgParallax = 0.300000011920929; + Main.bgScale = 1.2f; + } + if (bgTexIndexes[0] == 184) + { + this.bgParallax = 0.25; + Main.bgScale = 1.2f; + } + if (bgTexIndexes[0] == 282) + Main.bgScale = 1.4f; + this.SetBackgroundOffsets(bgTexIndexes[0], backgroundTopMagicNumber, pushBGTopHack); + Main.bgScale *= bgGlobalScaleMultiplier; + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + if (bgTexIndexes[0] >= 0) + { + this.SetBackgroundOffsets(bgTexIndexes[0], backgroundTopMagicNumber, pushBGTopHack); + this.LoadBackground(bgTexIndexes[0]); + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[0]] * (double) Main.bgScale); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + if (bgTexIndexes[0] == 91) + this.bgTopY = (int) (backgroundTopMagicNumber * 1600.0 + 1400.0) + (int) this.scAdj + pushBGTopHack; + if (bgTexIndexes[0] == 173) + this.bgTopY = (int) (backgroundTopMagicNumber * 1600.0 + 1400.0) + (int) this.scAdj + pushBGTopHack; + if (bgTexIndexes[0] == 184) + this.bgTopY = (int) (backgroundTopMagicNumber * 1600.0 + 1400.0) + (int) this.scAdj + pushBGTopHack; + if (Main.gameMenu) + this.bgTopY = 320 + pushBGTopHack; + if (bgTexIndexes[0] == 50) + this.bgTopY -= 50; + if (bgTexIndexes[0] == 53) + this.bgTopY -= 100; + if (bgTexIndexes[0] == 91) + this.bgTopY += 200; + if (bgTexIndexes[0] == 173) + this.bgTopY += 200; + if (bgTexIndexes[0] == 178) + this.bgTopY += 75; + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index = 0; index < this.bgLoops; ++index) + { + if (bgTexIndexes[0] != -1) + { + Asset asset = TextureAssets.Background[bgTexIndexes[0]]; + if (bgTexIndexes[0] == 173) + { + int i = 251 + (int) (this.GetBackgroundCounter() / 10U) % 4; + this.LoadBackground(i); + asset = TextureAssets.Background[i]; + } + if (asset.Value != null) + Main.spriteBatch.Draw(asset.Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), this.GetBackgroundRect(bgTexIndexes[0]), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + } + } + } + if (bgTexIndexes[1] >= 0) + { + this.LoadBackground(bgTexIndexes[1]); + Main.bgScale = 1.31f; + Main.bgScale *= bgGlobalScaleMultiplier; + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[1]] * (double) Main.bgScale); + if (Main.bgWidthScaled == 0) + Main.bgWidthScaled = 1; + this.bgParallax = 0.43; + this.SetBackgroundOffsets(bgTexIndexes[1], backgroundTopMagicNumber, pushBGTopHack); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + this.bgTopY = (int) (backgroundTopMagicNumber * 1950.0 + 1750.0) + (int) this.scAdj + pushBGTopHack; + if (Main.gameMenu) + { + this.bgTopY = 400 + pushBGTopHack; + this.bgStartX -= 80; + } + if (bgTexIndexes[1] == 51) + this.bgTopY -= 50; + if (bgTexIndexes[1] == 54) + this.bgTopY -= 100; + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[1]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), this.GetBackgroundRect(bgTexIndexes[1]), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.FlipHorizontally, 0.0f); + } + } + if (bgTexIndexes[2] < 0) + return; + this.LoadBackground(bgTexIndexes[2]); + Main.bgScale = 1.34f; + Main.bgScale *= bgGlobalScaleMultiplier; + this.bgParallax = 0.49; + this.SetBackgroundOffsets(bgTexIndexes[2], backgroundTopMagicNumber, pushBGTopHack); + SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float) this.bgParallax); + if (bgTexIndexes[0] == 91) + { + Main.bgScale = 1.3f; + Main.bgScale *= bgGlobalScaleMultiplier; + this.bgParallax = 0.42; + } + if (bgTexIndexes[2] < 0 && WorldGen.drunkWorldGen) + return; + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[bgTexIndexes[2]] * (double) Main.bgScale); + if (Main.bgWidthScaled == 0) + Main.bgWidthScaled = 1; + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.bgWidthScaled) - (double) (Main.bgWidthScaled / 2)); + this.bgTopY = (int) (backgroundTopMagicNumber * 2100.0 + 2000.0) + (int) this.scAdj + pushBGTopHack; + if (Main.gameMenu) + { + this.bgTopY = 480 + pushBGTopHack; + this.bgStartX -= 120; + } + if (bgTexIndexes[2] == 52) + this.bgTopY -= 50; + if (bgTexIndexes[2] == 55) + this.bgTopY -= 100; + if (bgTexIndexes[2] == 92) + this.bgTopY += 150; + this.bgLoops = Main.screenWidth / Main.bgWidthScaled + 2; + if ((double) Main.screenPosition.Y >= Main.worldSurface * 16.0 + 16.0) + return; + for (int index = 0; index < this.bgLoops; ++index) + Main.spriteBatch.Draw(TextureAssets.Background[bgTexIndexes[2]].Value, new Vector2((float) (this.bgStartX + Main.bgWidthScaled * index), (float) this.bgTopY), this.GetBackgroundRect(bgTexIndexes[2]), Main.ColorOfSurfaceBackgroundsModified, 0.0f, new Vector2(), Main.bgScale, SpriteEffects.None, 0.0f); + } + + private void DrawBackgroundBlackFill() + { + float num1 = (float) (Main.worldSurface + 2.0) * 16f - Main.screenPosition.Y; + float num2 = (float) ((double) Main.maxTilesY * 16.0 - 2880.0 - ((double) Main.screenPosition.Y + (double) Main.screenHeight)); + float num3 = MathHelper.Clamp(num1, 0.0f, (float) Main.screenHeight); + float num4 = MathHelper.Clamp(num2, 0.0f, (float) Main.screenHeight); + if ((double) num4 - (double) num3 <= 0.0) + return; + Main.spriteBatch.Draw(TextureAssets.BlackTile.Value, new Microsoft.Xna.Framework.Rectangle(0, (int) num3, Main.screenWidth, (int) ((double) num4 - (double) num3)), Microsoft.Xna.Framework.Color.Black); + } + + public void DrawTileCracks(int crackType, HitTile hitter) + { + Vector2 vector2 = new Vector2((float) Main.offScreenRange, (float) Main.offScreenRange); + if (Main.drawToScreen) + vector2 = Vector2.Zero; + for (int index = 0; index < hitter.data.Length; ++index) + { + if (hitter.data[index].type == crackType) + { + int damage = hitter.data[index].damage; + if (damage >= 20) + { + int x = hitter.data[index].X; + int y = hitter.data[index].Y; + if (WorldGen.InWorld(x, y)) + { + bool flag1 = Main.tile[x, y] != null; + if (flag1 && crackType == 1) + flag1 = flag1 && Main.tile[x, y].active(); + if (flag1 && crackType == 2) + flag1 = flag1 && Main.tile[x, y].wall > (ushort) 0; + if (flag1) + { + bool flag2 = false; + bool flag3 = false; + if (Main.tile[x, y].type == (ushort) 10) + flag2 = false; + else if (Main.tileSolid[(int) Main.tile[x, y].type] && !Main.tileSolidTop[(int) Main.tile[x, y].type]) + flag2 = true; + else if (WorldGen.IsTreeType((int) Main.tile[x, y].type)) + { + flag3 = true; + int num1 = (int) Main.tile[x, y].frameX / 22; + int num2 = (int) Main.tile[x, y].frameY / 22; + if (num2 < 9) + flag2 = (num1 != 1 && num1 != 2 || num2 < 6 || num2 > 8) && (num1 != 3 || num2 > 2) && (num1 != 4 || num2 < 3 || num2 > 5) && (num1 != 5 || num2 < 6 || num2 > 8); + } + else if (Main.tile[x, y].type == (ushort) 72) + { + flag3 = true; + if (Main.tile[x, y].frameX <= (short) 34) + flag2 = true; + } + if (flag2 && Main.tile[x, y].slope() == (byte) 0 && !Main.tile[x, y].halfBrick()) + { + int num = 0; + if (damage >= 80) + num = 3; + else if (damage >= 60) + num = 2; + else if (damage >= 40) + num = 1; + else if (damage >= 20) + num = 0; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(hitter.data[index].crackStyle * 18, num * 18, 16, 16); + if (flag3) + rectangle.X = (4 + hitter.data[index].crackStyle / 2) * 18; + Main.spriteBatch.Draw(TextureAssets.TileCrack.Value, new Vector2((float) (x * 16 - (int) Main.screenPosition.X), (float) (y * 16 - (int) Main.screenPosition.Y)) + vector2, new Microsoft.Xna.Framework.Rectangle?(rectangle), Lighting.GetColor(x, y), 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + } + } + } + } + } + + private static void CheckMonoliths() + { + bool flag = Main.player[Main.myPlayer].ZoneTowerVortex || Main.player[Main.myPlayer].ZoneTowerNebula || Main.player[Main.myPlayer].ZoneTowerStardust || Main.player[Main.myPlayer].ZoneTowerSolar; + for (int index = 0; index < Main.MonolithFilterNames.Length; ++index) + { + if (!flag && index == Main.SceneMetrics.ActiveMonolithType) + { + if (!Terraria.Graphics.Effects.Filters.Scene[Main.MonolithFilterNames[Main.SceneMetrics.ActiveMonolithType]].IsActive()) + Terraria.Graphics.Effects.Filters.Scene.Activate(Main.MonolithFilterNames[Main.SceneMetrics.ActiveMonolithType], new Vector2()); + if (!SkyManager.Instance[Main.MonolithSkyNames[index]].IsActive()) + SkyManager.Instance.Activate(Main.MonolithSkyNames[index], new Vector2()); + } + else + { + if (Terraria.Graphics.Effects.Filters.Scene[Main.MonolithFilterNames[index]].IsActive()) + Terraria.Graphics.Effects.Filters.Scene.Deactivate(Main.MonolithFilterNames[index]); + if (SkyManager.Instance[Main.MonolithSkyNames[index]].IsActive()) + SkyManager.Instance.Deactivate(Main.MonolithSkyNames[index]); + } + } + } + + public static bool IsGraphicsDeviceAvailable => !Main.instance.GraphicsDevice.IsDisposed && Main.instance.GraphicsDevice.GraphicsDeviceStatus == GraphicsDeviceStatus.Normal; + + private void GraphicsDeviceLost(object sender, EventArgs evt) + { + } + + protected override void Draw(GameTime gameTime) + { + if (this._isDrawingOrUpdating || !Main.IsGraphicsDeviceAvailable) + return; + this._isDrawingOrUpdating = true; + this.EnsureRenderTargetContent(); + this.DoDraw(gameTime); + if (Main.OnPostDraw != null) + Main.OnPostDraw(gameTime); + Main.Assets.TransferCompletedAssets(); + this._isDrawingOrUpdating = false; + } + + private void DoDraw(GameTime gameTime) + { + Stopwatch stopwatch1 = new Stopwatch(); + stopwatch1.Start(); + if (Main.showSplash) + { + this.DrawSplash(gameTime); + TimeLogger.SplashDrawTime(stopwatch1.Elapsed.TotalMilliseconds); + TimeLogger.EndDrawFrame(); + } + else + { + if (Main._drawCycleCounter == 0UL) + Main.TileFrameSeed = Utils.RandomNextSeed(Main.TileFrameSeed); + Main._drawCycleCounter = (Main._drawCycleCounter + 1UL) % 5UL; + Main.MenuUI.IsVisible = Main.gameMenu && Main.menuMode == 888; + Main.InGameUI.IsVisible = !Main.gameMenu && Main.InGameUI.CurrentState != null; + PlayerInput.UpdateMainMouse(); + this.RefreshPlayerDrawOrder(); + CaptureManager.Instance.DrawTick(); + TimeLogger.NewDrawFrame(); + if (!Main.gameMenu) + this.TilesRenderer.PreparePaintForTilesOnScreen(); + for (int index = 0; index < Main.ContentThatNeedsRenderTargets.Count; ++index) + Main.ContentThatNeedsRenderTargets[index].PrepareRenderTarget(this.GraphicsDevice, Main.spriteBatch); + this.TilePaintSystem.PrepareAllRequests(); + TimeLogger.DetailedDrawTime(0); + if (Main.loadMap) + { + Main.refreshMap = false; + this.DrawToMap(); + TimeLogger.DetailedDrawTime(1); + } + Main.drawToScreen = Lighting.UpdateEveryFrame; + if (Main.drawToScreen && Main.targetSet) + this.ReleaseTargets(); + if (!Main.drawToScreen && !Main.targetSet) + this.InitTargets(); + ++Main.fpsCount; + if (!this.IsActive) + Main.maxQ = true; + this.UpdateDisplaySettings(); + if (Main.OnPreDraw != null) + Main.OnPreDraw(gameTime); + ++Main.drawsCountedForFPS; + Main.screenLastPosition = Main.screenPosition; + if (Main.stackSplit == 0) + { + Main.stackCounter = 0; + Main.stackDelay = 7; + Main.superFastStack = 0; + } + else + { + ++Main.stackCounter; + int num; + switch (Main.stackDelay) + { + case 3: + num = 10; + break; + case 4: + num = 15; + break; + case 5: + num = 20; + break; + case 6: + num = 25; + break; + case 7: + num = 30; + break; + default: + num = 5; + break; + } + if (Main.stackCounter >= num) + { + --Main.stackDelay; + if (Main.stackDelay < 2) + { + Main.stackDelay = 2; + ++Main.superFastStack; + } + Main.stackCounter = 0; + } + } + if (Main.myPlayer >= 0) + { + Main.player[Main.myPlayer].lastMouseInterface = Main.player[Main.myPlayer].mouseInterface; + Main.player[Main.myPlayer].mouseInterface = false; + } + if (Main.mapTime > 0) + --Main.mapTime; + if (Main.gameMenu) + Main.mapTime = Main.mapTimeMax; + Main.HoverItem = new Item(); + Main.DoDraw_UpdateCameraPosition(); + Main.CheckMonoliths(); + Main.sunCircle += 0.01f; + if ((double) Main.sunCircle > 6.285) + Main.sunCircle -= 6.285f; + TimeLogger.DetailedDrawReset(); + if (!Main.gameMenu) + { + this.waterfallManager.FindWaterfalls(); + TimeLogger.DetailedDrawTime(2); + if (Main.renderNow) + { + Main.screenLastPosition = Main.screenPosition; + Main.renderNow = false; + Main.renderCount = 99; + this.Draw(gameTime); + Lighting.LightTiles(this.firstTileX, this.lastTileX, this.firstTileY, this.lastTileY); + Lighting.LightTiles(this.firstTileX, this.lastTileX, this.firstTileY, this.lastTileY); + this.RenderTiles(); + Main.sceneTilePos.X = Main.screenPosition.X - (float) Main.offScreenRange; + Main.sceneTilePos.Y = Main.screenPosition.Y - (float) Main.offScreenRange; + this.RenderBackground(); + Main.sceneBackgroundPos.X = Main.screenPosition.X - (float) Main.offScreenRange; + Main.sceneBackgroundPos.Y = Main.screenPosition.Y - (float) Main.offScreenRange; + this.RenderWalls(); + Main.sceneWallPos.X = Main.screenPosition.X - (float) Main.offScreenRange; + Main.sceneWallPos.Y = Main.screenPosition.Y - (float) Main.offScreenRange; + this.RenderTiles2(); + Main.sceneTile2Pos.X = Main.screenPosition.X - (float) Main.offScreenRange; + Main.sceneTile2Pos.Y = Main.screenPosition.Y - (float) Main.offScreenRange; + this.RenderWater(); + Main.sceneWaterPos.X = Main.screenPosition.X - (float) Main.offScreenRange; + Main.sceneWaterPos.Y = Main.screenPosition.Y - (float) Main.offScreenRange; + Main.renderCount = 99; + } + else + { + if (Main.renderCount == 3) + { + this.RenderTiles(); + Main.sceneTilePos.X = Main.screenPosition.X - (float) Main.offScreenRange; + Main.sceneTilePos.Y = Main.screenPosition.Y - (float) Main.offScreenRange; + } + if (Main.renderCount == 3) + { + this.RenderTiles2(); + Main.sceneTile2Pos.X = Main.screenPosition.X - (float) Main.offScreenRange; + Main.sceneTile2Pos.Y = Main.screenPosition.Y - (float) Main.offScreenRange; + } + if (Main.renderCount == 3) + { + this.RenderWalls(); + Main.sceneWallPos.X = Main.screenPosition.X - (float) Main.offScreenRange; + Main.sceneWallPos.Y = Main.screenPosition.Y - (float) Main.offScreenRange; + } + if (Main.renderCount == 2) + { + this.RenderBackground(); + Main.sceneBackgroundPos.X = Main.screenPosition.X - (float) Main.offScreenRange; + Main.sceneBackgroundPos.Y = Main.screenPosition.Y - (float) Main.offScreenRange; + } + if (Main.renderCount == 1) + { + this.RenderWater(); + Main.sceneWaterPos.X = Main.screenPosition.X - (float) Main.offScreenRange; + Main.sceneWaterPos.Y = Main.screenPosition.Y - (float) Main.offScreenRange; + } + } + if (Main.render && !Main.gameMenu) + { + if ((double) Math.Abs(Main.sceneTilePos.X - (Main.screenPosition.X - (float) Main.offScreenRange)) > (double) Main.offScreenRange || (double) Math.Abs(Main.sceneTilePos.Y - (Main.screenPosition.Y - (float) Main.offScreenRange)) > (double) Main.offScreenRange) + { + this.RenderTiles(); + Main.sceneTilePos.X = Main.screenPosition.X - (float) Main.offScreenRange; + Main.sceneTilePos.Y = Main.screenPosition.Y - (float) Main.offScreenRange; + } + if ((double) Math.Abs(Main.sceneTile2Pos.X - (Main.screenPosition.X - (float) Main.offScreenRange)) > (double) Main.offScreenRange || (double) Math.Abs(Main.sceneTile2Pos.Y - (Main.screenPosition.Y - (float) Main.offScreenRange)) > (double) Main.offScreenRange) + { + this.RenderTiles2(); + Main.sceneTile2Pos.X = Main.screenPosition.X - (float) Main.offScreenRange; + Main.sceneTile2Pos.Y = Main.screenPosition.Y - (float) Main.offScreenRange; + } + if ((double) Math.Abs(Main.sceneBackgroundPos.X - (Main.screenPosition.X - (float) Main.offScreenRange)) > (double) Main.offScreenRange || (double) Math.Abs(Main.sceneBackgroundPos.Y - (Main.screenPosition.Y - (float) Main.offScreenRange)) > (double) Main.offScreenRange) + { + this.RenderBackground(); + Main.sceneBackgroundPos.X = Main.screenPosition.X - (float) Main.offScreenRange; + Main.sceneBackgroundPos.Y = Main.screenPosition.Y - (float) Main.offScreenRange; + } + if ((double) Math.Abs(Main.sceneWallPos.X - (Main.screenPosition.X - (float) Main.offScreenRange)) > (double) Main.offScreenRange || (double) Math.Abs(Main.sceneWallPos.Y - (Main.screenPosition.Y - (float) Main.offScreenRange)) > (double) Main.offScreenRange) + { + this.RenderWalls(); + Main.sceneWallPos.X = Main.screenPosition.X - (float) Main.offScreenRange; + Main.sceneWallPos.Y = Main.screenPosition.Y - (float) Main.offScreenRange; + } + if ((double) Math.Abs(Main.sceneWaterPos.X - (Main.screenPosition.X - (float) Main.offScreenRange)) > (double) Main.offScreenRange || (double) Math.Abs(Main.sceneWaterPos.Y - (Main.screenPosition.Y - (float) Main.offScreenRange)) > (double) Main.offScreenRange) + { + this.RenderWater(); + Main.sceneWaterPos.X = Main.screenPosition.X - (float) Main.offScreenRange; + Main.sceneWaterPos.Y = Main.screenPosition.Y - (float) Main.offScreenRange; + } + } + } + if (!Main.loadMap) + { + if (!Main.gameMenu) + { + TimeLogger.DetailedDrawReset(); + Stopwatch stopwatch2 = new Stopwatch(); + stopwatch2.Start(); + int num = 0; + int x; + int y; + while (stopwatch2.ElapsedMilliseconds < 5L && Main.sectionManager.GetNextMapDraw(Main.player[Main.myPlayer].position, out x, out y)) + { + this.DrawToMap_Section(x, y); + ++num; + } + TimeLogger.DetailedDrawTime(3); + } + if (Main.updateMap) + { + if (this.IsActive || Main.netMode == 1) + { + if (Main.refreshMap) + { + Main.refreshMap = false; + Main.sectionManager.ClearMapDraw(); + } + this.DrawToMap(); + Main.updateMap = false; + } + else if (MapHelper.numUpdateTile > 0) + this.DrawToMap(); + TimeLogger.DetailedDrawTime(4); + } + } + this.bgParallax = 0.1; + this.bgStartX = (int) (-Math.IEEERemainder((double) Main.screenPosition.X * this.bgParallax, (double) Main.backgroundWidth[Main.background]) - (double) (Main.backgroundWidth[Main.background] / 2)); + this.bgLoops = Main.screenWidth / Main.backgroundWidth[Main.background] + 2; + this.bgStartY = 0; + this.bgLoopsY = 0; + this.bgTopY = (int) (-(double) Main.screenPosition.Y / (Main.worldSurface * 16.0 - 600.0) * 200.0); + if (Main.gameMenu || Main.netMode == 2) + this.bgTopY = -200; + float num1 = 0.0005f * (float) Main.dayRate; + if (Main.gameMenu) + num1 *= 20f; + if (Main.raining) + { + if ((double) Main.cloudAlpha > (double) Main.maxRaining) + { + Main.cloudAlpha -= num1; + if ((double) Main.cloudAlpha < (double) Main.maxRaining) + Main.cloudAlpha = Main.maxRaining; + } + else if ((double) Main.cloudAlpha < (double) Main.maxRaining) + { + Main.cloudAlpha += num1; + if ((double) Main.cloudAlpha > (double) Main.maxRaining) + Main.cloudAlpha = Main.maxRaining; + } + } + else + { + Main.cloudAlpha -= num1; + if ((double) Main.cloudAlpha < 0.0) + Main.cloudAlpha = 0.0f; + } + if (Main.gameMenu || Main.netMode == 2) + { + Main.bgDelay = 1000; + Main.SceneMetrics.EvilTileCount = (int) ((double) Main.bgAlphaFrontLayer[1] * (double) SceneMetrics.CorruptionTileMax); + } + Microsoft.Xna.Framework.Color moonColor = Microsoft.Xna.Framework.Color.White; + Microsoft.Xna.Framework.Color sunColor = Microsoft.Xna.Framework.Color.White; + float num2 = (float) (Main.SceneMetrics.MushroomTileCount / SceneMetrics.MushroomTileMax); + float tempMushroomInfluence = Main.SmoothedMushroomLightInfluence; + if ((double) num2 > 0.0) + { + double num3 = (double) num2; + if (num3 > (double) tempMushroomInfluence) + tempMushroomInfluence += 0.01f; + if (num3 < (double) tempMushroomInfluence) + tempMushroomInfluence -= 0.01f; + } + else + tempMushroomInfluence -= 0.02f; + if ((double) tempMushroomInfluence < 0.0) + tempMushroomInfluence = 0.0f; + if ((double) tempMushroomInfluence > 1.0) + tempMushroomInfluence = 1f; + Main.SmoothedMushroomLightInfluence = tempMushroomInfluence; + Main.SetBackColor(new Main.InfoToSetBackColor() + { + isInGameMenuOrIsServer = Main.gameMenu || Main.netMode == 2, + CorruptionBiomeInfluence = (float) Main.SceneMetrics.EvilTileCount / (float) SceneMetrics.CorruptionTileMax, + CrimsonBiomeInfluence = (float) Main.SceneMetrics.BloodTileCount / (float) SceneMetrics.CrimsonTileMax, + JungleBiomeInfluence = (float) Main.SceneMetrics.JungleTileCount / (float) SceneMetrics.JungleTileMax, + MushroomBiomeInfluence = Main.SmoothedMushroomLightInfluence, + GraveyardInfluence = Main.GraveyardVisualIntensity, + BloodMoonActive = Main.bloodMoon || Main.SceneMetrics.BloodMoonMonolith, + LanternNightActive = LanternNight.LanternsUp + }, out sunColor, out moonColor); + if (Main.gameMenu || Main.netMode == 2) + this.bgTopY = 0; + Main.ApplyColorOfTheSkiesToTiles(); + Main.UpdateAtmosphereTransparencyToSkyColor(); + this.GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Black); + base.Draw(gameTime); + float val2_1 = (float) Main.screenWidth / Main.MinimumZoomComparerX; + float val2_2 = (float) Main.screenHeight / Main.MinimumZoomComparerY; + Main.ForcedMinimumZoom = Math.Max(Math.Max(1f, val2_1), val2_2); + Main.GameViewMatrix.Effects = Main.gameMenu || (double) Main.player[Main.myPlayer].gravDir == 1.0 ? SpriteEffects.None : SpriteEffects.FlipVertically; + Main.BackgroundViewMatrix.Effects = Main.GameViewMatrix.Effects; + Main.BackgroundViewMatrix.Zoom = new Vector2(Main.ForcedMinimumZoom); + Main.GameViewMatrix.Zoom = new Vector2(Main.ForcedMinimumZoom * MathHelper.Clamp(Main.GameZoomTarget, 1f, 2f)); + Main.Rasterizer = Main.gameMenu || (double) Main.player[Main.myPlayer].gravDir == 1.0 ? RasterizerState.CullCounterClockwise : RasterizerState.CullClockwise; + bool flag = !Main.drawToScreen && Main.netMode != 2 && !Main.gameMenu && !Main.mapFullscreen && Lighting.NotRetro && Terraria.Graphics.Effects.Filters.Scene.CanCapture(); + if (flag) + Terraria.Graphics.Effects.Filters.Scene.BeginCapture(Main.screenTarget, Microsoft.Xna.Framework.Color.Black); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.BackgroundViewMatrix.TransformationMatrix); + TimeLogger.DetailedDrawReset(); + if (!Main.mapFullscreen) + { + this.unityMouseOver = false; + if ((double) Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0) + { + Asset asset = TextureAssets.Background[Main.background]; + Microsoft.Xna.Framework.Rectangle destinationRectangle = new Microsoft.Xna.Framework.Rectangle(this.bgStartX, this.bgTopY, asset.Width(), Math.Max(Main.screenHeight, asset.Height())); + if (destinationRectangle.Bottom < asset.Height()) + { + int num4 = asset.Height() - destinationRectangle.Bottom; + destinationRectangle.Height += num4; + } + for (int index = 0; index < this.bgLoops; ++index) + { + destinationRectangle.X = this.bgStartX + asset.Width() * index; + Main.spriteBatch.Draw(asset.Value, destinationRectangle, Main.ColorOfTheSkies); + } + TimeLogger.DetailedDrawTime(6); + } + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.BackgroundViewMatrix.EffectMatrix); + Main.SceneArea sceneArea = new Main.SceneArea() + { + bgTopY = this.bgTopY, + totalHeight = (float) Main.screenHeight, + totalWidth = (float) Main.screenWidth, + SceneLocalScreenPositionOffset = Vector2.Zero + }; + this.DrawStarsInBackground(sceneArea); + if ((double) Main.screenPosition.Y / 16.0 < Main.worldSurface + 2.0) + this.DrawSunAndMoon(sceneArea, moonColor, sunColor, tempMushroomInfluence); + TimeLogger.DetailedDrawTime(7); + } + Overlays.Scene.Draw(Main.spriteBatch, RenderLayers.Sky); + Main.spriteBatch.End(); + Vector2 screenPosition = Main.screenPosition; + int screenWidth = Main.screenWidth; + int screenHeight = Main.screenHeight; + Main.screenWidth = (int) ((double) Main.screenWidth / (double) Main.BackgroundViewMatrix.Zoom.X); + Main.screenHeight = (int) ((double) Main.screenHeight / (double) Main.BackgroundViewMatrix.Zoom.Y); + Main.screenPosition += Main.BackgroundViewMatrix.Translation; + Matrix transformationMatrix = Main.BackgroundViewMatrix.TransformationMatrix; + transformationMatrix.Translation -= Main.BackgroundViewMatrix.ZoomMatrix.Translation * new Vector3(1f, Main.BackgroundViewMatrix.Effects.HasFlag((Enum) SpriteEffects.FlipVertically) ? -1f : 1f, 1f); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, Main.Rasterizer, (Effect) null, transformationMatrix); + this.DrawBG(); + Main.screenWidth = screenWidth; + Main.screenHeight = screenHeight; + Main.screenPosition = screenPosition; + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.GameViewMatrix.TransformationMatrix); + this.DrawBackgroundBlackFill(); + Main.spriteBatch.End(); + Overlays.Scene.Draw(Main.spriteBatch, RenderLayers.Landscape); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.UIScaleMatrix); + if (Main.gameMenu || Main.netMode == 2) + { + Main.spriteBatch.End(); + Microsoft.Xna.Framework.Point screenSizeCache; + Microsoft.Xna.Framework.Point screenSizeCacheAfterScaling; + this.PreDrawMenu(out screenSizeCache, out screenSizeCacheAfterScaling); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.UIScaleMatrix); + this.DrawMenu(gameTime); + Main.PostDrawMenu(screenSizeCache, screenSizeCacheAfterScaling); + TimeLogger.MenuDrawTime(stopwatch1.Elapsed.TotalMilliseconds); + TimeLogger.EndDrawFrame(); + } + else + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + this.DoLightTiles(); + TimeLogger.DetailedDrawReset(); + if (Main.mapFullscreen) + { + if (Main.player[Main.myPlayer].talkNPC >= 0 || Main.player[Main.myPlayer].sign >= 0 || Main.playerInventory && !CaptureManager.Instance.Active) + Main.player[Main.myPlayer].ToggleInv(); + this.DrawMap(gameTime); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.SamplerStateForCursor, (DepthStencilState) null, (RasterizerState) null, (Effect) null, Main.UIScaleMatrix); + PlayerInput.SetZoom_UI(); + this.DrawFPS(); + this.DrawPlayerChat(); + Main.DrawPendingMouseText(); + Main.DrawCursor(Main.DrawThickCursor()); + PlayerInput.SetZoom_Unscaled(); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, (DepthStencilState) null, (RasterizerState) null, (Effect) null); + TimeLogger.MapDrawTime(stopwatch1.Elapsed.TotalMilliseconds); + TimeLogger.EndDrawFrame(); + PlayerInput.SetDesiredZoomContext(ZoomContext.Unscaled); + CaptureManager.Instance.Update(); + if (CaptureManager.Instance.Active) + CaptureManager.Instance.Draw(Main.spriteBatch); + Main.spriteBatch.End(); + if (Main.mouseLeft) + Main.mouseLeftRelease = false; + else + Main.mouseLeftRelease = true; + } + else + { + Overlays.Scene.Draw(Main.spriteBatch, RenderLayers.InWorldUI); + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + if (Main.drawToScreen) + { + this.DrawWaters(true); + } + else + { + Main.spriteBatch.Draw((Texture2D) this.backWaterTarget, Main.sceneBackgroundPos - Main.screenPosition, Microsoft.Xna.Framework.Color.White); + TimeLogger.DetailedDrawTime(11); + } + Overlays.Scene.Draw(Main.spriteBatch, RenderLayers.BackgroundWater); + float x = (Main.sceneBackgroundPos.X - Main.screenPosition.X + (float) Main.offScreenRange) * Main.caveParallax - (float) Main.offScreenRange; + if (Main.drawToScreen) + { + Main.tileBatch.Begin(); + this.DrawBackground(); + Main.tileBatch.End(); + } + else + { + Main.spriteBatch.Draw((Texture2D) this.backgroundTarget, new Vector2(x, Main.sceneBackgroundPos.Y - Main.screenPosition.Y), Microsoft.Xna.Framework.Color.White); + TimeLogger.DetailedDrawTime(12); + } + Overlays.Scene.Draw(Main.spriteBatch, RenderLayers.Background); + ScreenDarkness.DrawBack(Main.spriteBatch); + ++Main.magmaBGFrameCounter; + if (Main.magmaBGFrameCounter >= 8) + { + Main.magmaBGFrameCounter = 0; + ++Main.magmaBGFrame; + if (Main.magmaBGFrame >= 3) + Main.magmaBGFrame = 0; + } + this.DoDraw_WallsTilesNPCs(); + Overlays.Scene.Draw(Main.spriteBatch, RenderLayers.TilesAndNPCs); + if (!Main.mapFullscreen) + { + if (Main.mapStyle == 2) + { + try + { + this.DrawMap(gameTime); + } + catch (Exception ex) + { + if (Main.ignoreErrors) + TimeLogger.DrawException(ex); + else + throw; + } + } + } + TimeLogger.DetailedDrawReset(); + Main.spriteBatch.End(); + TimeLogger.DetailedDrawTime(35); + Main.HasInteractibleObjectThatIsNotATile = false; + this.SortDrawCacheWorms(); + this.DrawSuperSpecialProjectiles(this.DrawCacheFirstFractals); + this.DrawCachedProjs(this.DrawCacheProjsBehindProjectiles); + this.DrawProjectiles(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + Main.ParticleSystem_World_BehindPlayers.Settings.AnchorPosition = -Main.screenPosition; + Main.ParticleSystem_World_BehindPlayers.Draw(Main.spriteBatch); + Main.spriteBatch.End(); + this.DrawPlayers_AfterProjectiles(); + this.DrawCachedProjs(this.DrawCacheProjsOverPlayers); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + Main.ParticleSystem_World_OverPlayers.Settings.AnchorPosition = -Main.screenPosition; + Main.ParticleSystem_World_OverPlayers.Draw(Main.spriteBatch); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + this.DrawCachedNPCs(this.DrawCacheNPCsOverPlayers, false); + if (!Main.gamePaused) + { + Main.essScale += (float) Main.essDir * 0.01f; + if ((double) Main.essScale > 1.0) + { + Main.essDir = -1; + Main.essScale = 1f; + } + if ((double) Main.essScale < 0.7) + { + Main.essDir = 1; + Main.essScale = 0.7f; + } + } + this.DrawItems(); + TimeLogger.DetailedDrawTime(22); + this.DrawRain(); + if (Main.ignoreErrors) + { + try + { + this.DrawGore(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + this.DrawGore(); + Main.spriteBatch.End(); + this.DrawDust(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + Overlays.Scene.Draw(Main.spriteBatch, RenderLayers.Entities); + if (Main.drawToScreen) + { + this.DrawWaters(); + if (WiresUI.Settings.DrawWires) + this.DrawWires(); + } + else + { + Main.spriteBatch.Draw((Texture2D) Main.waterTarget, Main.sceneWaterPos - Main.screenPosition, Microsoft.Xna.Framework.Color.White); + if (WiresUI.Settings.DrawWires) + this.DrawWires(); + TimeLogger.DetailedDrawTime(26); + } + Overlays.Scene.Draw(Main.spriteBatch, RenderLayers.ForegroundWater); + this.DrawCachedProjs(this.DrawCacheProjsOverWiresUI, false); + this.DrawInfernoRings(); + ScreenDarkness.DrawFront(Main.spriteBatch); + MoonlordDeathDrama.DrawWhite(Main.spriteBatch); + ScreenObstruction.Draw(Main.spriteBatch); + TimeLogger.DetailedDrawReset(); + Main.spriteBatch.End(); + Overlays.Scene.Draw(Main.spriteBatch, RenderLayers.All); + if (flag) + Terraria.Graphics.Effects.Filters.Scene.EndCapture((RenderTarget2D) null, Main.screenTarget, Main.screenTargetSwap, Microsoft.Xna.Framework.Color.Black); + TimeLogger.DetailedDrawTime(36); + if (!Main.hideUI) + { + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, (DepthStencilState) null, (RasterizerState) null, (Effect) null, Main.UIScaleMatrix); + TimeLogger.DetailedDrawReset(); + this.DrawPlayerChatBubbles(); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, (DepthStencilState) null, (RasterizerState) null, (Effect) null, Main.GameViewMatrix.ZoomMatrix); + float targetScale = CombatText.TargetScale; + for (int index1 = 0; index1 < 100; ++index1) + { + if (Main.combatText[index1].active) + { + int index2 = 0; + if (Main.combatText[index1].crit) + index2 = 1; + Vector2 vector2_1 = FontAssets.CombatText[index2].Value.MeasureString(Main.combatText[index1].text); + Vector2 vector2_2 = new Vector2(vector2_1.X * 0.5f, vector2_1.Y * 0.5f); + float num5 = Main.combatText[index1].scale / targetScale; + float r = (float) Main.combatText[index1].color.R; + float g = (float) Main.combatText[index1].color.G; + float b = (float) Main.combatText[index1].color.B; + float a = (float) Main.combatText[index1].color.A; + float num6 = r * (float) ((double) num5 * (double) Main.combatText[index1].alpha * 0.300000011920929); + float num7 = b * (float) ((double) num5 * (double) Main.combatText[index1].alpha * 0.300000011920929); + float num8 = g * (float) ((double) num5 * (double) Main.combatText[index1].alpha * 0.300000011920929); + float num9 = a * (num5 * Main.combatText[index1].alpha); + Microsoft.Xna.Framework.Color color = new Microsoft.Xna.Framework.Color((int) num6, (int) num8, (int) num7, (int) num9); + for (int index3 = 0; index3 < 5; ++index3) + { + float num10 = 0.0f; + float num11 = 0.0f; + if (index3 == 0) + num10 -= targetScale; + else if (index3 == 1) + num10 += targetScale; + else if (index3 == 2) + num11 -= targetScale; + else if (index3 == 3) + { + num11 += targetScale; + } + else + { + float num12 = (float) Main.combatText[index1].color.R * num5 * Main.combatText[index1].alpha; + float num13 = (float) Main.combatText[index1].color.B * num5 * Main.combatText[index1].alpha; + float num14 = (float) Main.combatText[index1].color.G * num5 * Main.combatText[index1].alpha; + float num15 = (float) Main.combatText[index1].color.A * num5 * Main.combatText[index1].alpha; + color = new Microsoft.Xna.Framework.Color((int) num12, (int) num14, (int) num13, (int) num15); + } + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + { + float num16 = Main.combatText[index1].position.Y - Main.screenPosition.Y; + float num17 = (float) Main.screenHeight - num16; + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.CombatText[index2].Value, Main.combatText[index1].text, new Vector2(Main.combatText[index1].position.X - Main.screenPosition.X + num10 + vector2_2.X, num17 + num11 + vector2_2.Y), color, Main.combatText[index1].rotation, vector2_2, Main.combatText[index1].scale, SpriteEffects.None, 0.0f); + } + else + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.CombatText[index2].Value, Main.combatText[index1].text, new Vector2(Main.combatText[index1].position.X - Main.screenPosition.X + num10 + vector2_2.X, Main.combatText[index1].position.Y - Main.screenPosition.Y + num11 + vector2_2.Y), color, Main.combatText[index1].rotation, vector2_2, Main.combatText[index1].scale, SpriteEffects.None, 0.0f); + } + } + } + float num18 = PopupText.TargetScale; + if ((double) num18 == 0.0) + num18 = 1f; + for (int index4 = 0; index4 < 20; ++index4) + { + if (Main.popupText[index4].active) + { + string str = Main.popupText[index4].name; + if (Main.popupText[index4].stack > 1) + str = str + " (" + (object) Main.popupText[index4].stack + ")"; + Vector2 vector2_3 = FontAssets.MouseText.Value.MeasureString(str); + Vector2 vector2_4 = new Vector2(vector2_3.X * 0.5f, vector2_3.Y * 0.5f); + float num19 = Main.popupText[index4].scale / num18; + int num20 = (int) ((double) byte.MaxValue - (double) byte.MaxValue * (double) num19); + float r = (float) Main.popupText[index4].color.R; + float g = (float) Main.popupText[index4].color.G; + float b = (float) Main.popupText[index4].color.B; + float a = (float) Main.popupText[index4].color.A; + float num21 = r * (float) ((double) num19 * (double) Main.popupText[index4].alpha * 0.300000011920929); + float num22 = b * (float) ((double) num19 * (double) Main.popupText[index4].alpha * 0.300000011920929); + float num23 = g * (float) ((double) num19 * (double) Main.popupText[index4].alpha * 0.300000011920929); + float t = a * (num19 * Main.popupText[index4].alpha); + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color((int) num21, (int) num23, (int) num22, (int) t); + Microsoft.Xna.Framework.Color color2 = Microsoft.Xna.Framework.Color.Black; + float num24 = 1f; + Texture2D texture2D = (Texture2D) null; + switch (Main.popupText[index4].context) + { + case PopupTextContext.ItemPickupToVoidContainer: + color2 = new Microsoft.Xna.Framework.Color((int) sbyte.MaxValue, 20, (int) byte.MaxValue) * 0.4f; + num24 = 0.8f; + break; + case PopupTextContext.SonarAlert: + color2 = Microsoft.Xna.Framework.Color.Blue * 0.4f; + if (Main.popupText[index4].npcNetID != 0) + color2 = Microsoft.Xna.Framework.Color.Red * 0.4f; + num24 = 1f; + break; + } + float num25 = (float) num20 / (float) byte.MaxValue; + for (int index5 = 0; index5 < 5; ++index5) + { + color1 = color2; + float num26 = 0.0f; + float num27 = 0.0f; + if (index5 == 0) + num26 -= num18 * 2f; + else if (index5 == 1) + num26 += num18 * 2f; + else if (index5 == 2) + num27 -= num18 * 2f; + else if (index5 == 3) + num27 += num18 * 2f; + else + color1 = Main.popupText[index4].color * num19 * Main.popupText[index4].alpha * num24; + if (index5 < 4) + { + t = (float) Main.popupText[index4].color.A * num19 * Main.popupText[index4].alpha; + color1 = new Microsoft.Xna.Framework.Color(0, 0, 0, (int) t); + } + if (color2 != Microsoft.Xna.Framework.Color.Black && index5 < 4) + { + num26 *= (float) (1.29999995231628 + 1.29999995231628 * (double) num25); + num27 *= (float) (1.29999995231628 + 1.29999995231628 * (double) num25); + } + float num28 = Main.popupText[index4].position.Y - Main.screenPosition.Y + num27; + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + num28 = (float) Main.screenHeight - num28; + if (color2 != Microsoft.Xna.Framework.Color.Black && index5 < 4) + { + Microsoft.Xna.Framework.Color color3 = color2; + color3.A = (byte) MathHelper.Lerp(60f, (float) sbyte.MaxValue, Utils.GetLerpValue(0.0f, (float) byte.MaxValue, t, true)); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, str, new Vector2(Main.popupText[index4].position.X - Main.screenPosition.X + num26 + vector2_4.X, num28 + vector2_4.Y), Microsoft.Xna.Framework.Color.Lerp(color1, color3, 0.5f), Main.popupText[index4].rotation, vector2_4, Main.popupText[index4].scale, SpriteEffects.None, 0.0f); + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, str, new Vector2(Main.popupText[index4].position.X - Main.screenPosition.X + num26 + vector2_4.X, num28 + vector2_4.Y), color3, Main.popupText[index4].rotation, vector2_4, Main.popupText[index4].scale, SpriteEffects.None, 0.0f); + } + else + DynamicSpriteFontExtensionMethods.DrawString(Main.spriteBatch, FontAssets.MouseText.Value, str, new Vector2(Main.popupText[index4].position.X - Main.screenPosition.X + num26 + vector2_4.X, num28 + vector2_4.Y), color1, Main.popupText[index4].rotation, vector2_4, Main.popupText[index4].scale, SpriteEffects.None, 0.0f); + if (texture2D != null) + { + float scale = (float) ((1.29999995231628 - (double) num25) * (double) Main.popupText[index4].scale * 0.699999988079071); + Vector2 vector2_5 = new Vector2(Main.popupText[index4].position.X - Main.screenPosition.X + num26 + vector2_4.X, num28 + vector2_4.Y); + Microsoft.Xna.Framework.Color color4 = color2 * 0.6f; + if (index5 == 4) + color4 = Microsoft.Xna.Framework.Color.White * 0.6f; + color4.A = (byte) ((double) color4.A * 0.5); + int num29 = 25; + Main.spriteBatch.Draw(texture2D, vector2_5 + new Vector2((float) ((double) vector2_4.X * -0.5 - (double) num29 - (double) texture2D.Size().X / 2.0), 0.0f), new Microsoft.Xna.Framework.Rectangle?(), color4 * Main.popupText[index4].scale, 0.0f, texture2D.Size() / 2f, scale, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(texture2D, vector2_5 + new Vector2((float) ((double) vector2_4.X * 0.5 + (double) num29 + (double) texture2D.Size().X / 2.0), 0.0f), new Microsoft.Xna.Framework.Rectangle?(), color4 * Main.popupText[index4].scale, 0.0f, texture2D.Size() / 2f, scale, SpriteEffects.None, 0.0f); + } + } + } + } + PlayerInput.SetZoom_UI(); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, (DepthStencilState) null, (RasterizerState) null, (Effect) null, Main.UIScaleMatrix); + Main.DrawNetplayStatusText(); + this.DrawFPS(); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, (DepthStencilState) null, (RasterizerState) null, (Effect) null, Main.GameViewMatrix.ZoomMatrix); + PlayerInput.SetZoom_World(); + if (Main.BlackFadeIn > 0) + { + if (Main.BlackFadeIn < 0) + Main.BlackFadeIn = 0; + int a = Main.BlackFadeIn; + if (a > (int) byte.MaxValue) + a = (int) byte.MaxValue; + Main.BlackFadeIn -= 25; + Main.spriteBatch.Draw(TextureAssets.SplashTexture16x9.Value, new Microsoft.Xna.Framework.Rectangle(0, 0, Main.screenWidth, Main.screenHeight), new Microsoft.Xna.Framework.Color(0, 0, 0, a)); + } + Main.spriteBatch.End(); + if (!Main.mapFullscreen) + { + if (Main.ignoreErrors) + { + try + { + this.DrawInterface(gameTime); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + this.DrawInterface(gameTime); + } + TimeLogger.DetailedDrawTime(27); + } + else + Main.maxQ = true; + TimeLogger.DetailedDrawTime(37); + Main.mouseLeftRelease = !Main.mouseLeft; + Main.mouseRightRelease = !Main.mouseRight; + if (!PlayerInput.Triggers.Current.MouseRight && !PlayerInput.Triggers.Current.MouseLeft && !Main.preventStackSplitReset) + Main.stackSplit = 0; + if (Main.stackSplit > 0) + { + --Main.stackSplit; + if (Main.stackSplit == 0) + Main.preventStackSplitReset = false; + } + TimeLogger.RenderTime(Main.renderCount, stopwatch1.Elapsed.TotalMilliseconds); + TimeLogger.EndDrawFrame(); + } + } + } + } + + private static void DoDraw_UpdateCameraPosition() + { + Vector3 vector3 = Vector3.One / new Vector3(1f, 1f, 1f); + if ((Main.gameMenu ? 0 : (Main.netMode != 2 ? 1 : 0)) == 0) + return; + int num1 = 21; + if ((double) Main.cameraX != 0.0 && !Main.player[Main.myPlayer].pulley) + Main.cameraX = 0.0f; + if ((double) Main.cameraX > 0.0) + { + --Main.cameraX; + if ((double) Main.cameraX < 0.0) + Main.cameraX = 0.0f; + } + if ((double) Main.cameraX < 0.0) + { + ++Main.cameraX; + if ((double) Main.cameraX > 0.0) + Main.cameraX = 0.0f; + } + Vector2 screenPosition = Main.screenPosition; + Main.screenPosition.X = (float) ((double) Main.player[Main.myPlayer].position.X + (double) Main.player[Main.myPlayer].width * 0.5 - (double) Main.screenWidth * 0.5 * (double) vector3.X) + Main.cameraX; + Main.screenPosition.Y = (float) ((double) Main.player[Main.myPlayer].position.Y + (double) Main.player[Main.myPlayer].height - (double) num1 - (double) Main.screenHeight * 0.5 * (double) vector3.Y) + Main.player[Main.myPlayer].gfxOffY; + Vector2 vector2_1 = Vector2.Zero; + float num2 = 0.0f; + float num3 = 0.0f; + float max = 36f; + bool flag = false; + if ((Main.player[Main.myPlayer].noThrow <= 0 && !Main.player[Main.myPlayer].lastMouseInterface || !(Main.CurrentPan == Vector2.Zero)) && !Main.player[Main.myPlayer].dead) + { + if (Main.LocalGolfState != null && (Main.LocalGolfState.ShouldCameraTrackBallLastKnownLocation || Main.LocalGolfState.IsTrackingBall)) + { + if (Main.LocalGolfState.IsTrackingBall) + { + Projectile lastHitBall = Main.LocalGolfState.GetLastHitBall(); + Vector2 vector2_2 = lastHitBall.Center - Main.LocalPlayer.Center; + if ((double) lastHitBall.velocity.Length() > 20.0) + max *= 2f; + vector2_1 = Main.CurrentPan * 0.87f + vector2_2 * 0.13f; + flag = true; + } + else if (Main.LocalGolfState.ShouldCameraTrackBallLastKnownLocation) + { + Vector2? lastBallLocation = Main.LocalGolfState.GetLastBallLocation(); + if (lastBallLocation.HasValue) + { + Vector2 vector2_3 = lastBallLocation.Value - Main.LocalPlayer.Center; + vector2_1 = Main.CurrentPan * 0.87f + vector2_3 * 0.13f; + flag = true; + } + } + } + else if (PlayerInput.UsingGamepad) + { + Player player = Main.player[Main.myPlayer]; + if ((double) PlayerInput.GamepadThumbstickRight.Length() != 0.0 || !Main.SmartCursorEnabled) + { + float num4 = -1f; + if (player.inventory[player.selectedItem].type == 1254 && player.scope) + num4 = 0.8f; + else if (player.inventory[player.selectedItem].type == 1254) + num4 = 0.6666667f; + else if (player.inventory[player.selectedItem].type == 1299) + num4 = 0.6666667f; + else if (player.scope) + num4 = 0.5f; + Vector2 vector2_4 = (Main.MouseScreen - new Vector2((float) Main.screenWidth, (float) Main.screenHeight) / 2f) / (new Vector2((float) Main.screenWidth, (float) Main.screenHeight) / 2f); + max = 48f; + if (vector2_4 != Vector2.Zero && (double) num4 != -1.0) + { + Vector2 vector2_5 = new Vector2((float) Main.screenWidth, (float) Main.screenHeight) * 0.5f * vector2_4 * num4; + vector2_1.X = vector2_5.X; + vector2_1.Y = vector2_5.Y; + flag = true; + } + } + } + else if (Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type == 1254 && Main.player[Main.myPlayer].scope && Main.mouseRight) + { + int num5 = Main.mouseX; + int num6 = Main.mouseY; + if (num5 > Main.screenWidth) + num5 = Main.screenWidth; + if (num5 < 0) + num5 = 0; + if (num6 > Main.screenHeight) + num6 = Main.screenHeight; + if (num6 < 0) + num6 = 0; + vector2_1.X = (float) (num5 - Main.screenWidth / 2) / 1.25f; + vector2_1.Y = (float) (num6 - Main.screenHeight / 2) / 1.25f; + flag = true; + } + else if (Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type == 1254 && Main.mouseRight) + { + int num7 = Main.mouseX; + int num8 = Main.mouseY; + if (num7 > Main.screenWidth) + num7 = Main.screenWidth; + if (num7 < 0) + num7 = 0; + if (num8 > Main.screenHeight) + num8 = Main.screenHeight; + if (num8 < 0) + num8 = 0; + vector2_1.X = (float) (num7 - Main.screenWidth / 2) / 1.5f; + vector2_1.Y = (float) (num8 - Main.screenHeight / 2) / 1.5f; + flag = true; + } + else if (Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type == 1299 && Main.player[Main.myPlayer].selectedItem != 58) + { + int num9 = Main.mouseX; + int num10 = Main.mouseY; + if (num9 > Main.screenWidth) + num9 = Main.screenWidth; + if (num9 < 0) + num9 = 0; + if (num10 > Main.screenHeight) + num10 = Main.screenHeight; + if (num10 < 0) + num10 = 0; + vector2_1.X = (float) (num9 - Main.screenWidth / 2) / 1.5f; + vector2_1.Y = (float) (num10 - Main.screenHeight / 2) / 1.5f; + flag = true; + } + else if (Main.player[Main.myPlayer].scope && Main.mouseRight) + { + int num11 = Main.mouseX; + int num12 = Main.mouseY; + if (num11 > Main.screenWidth) + num11 = Main.screenWidth; + if (num11 < 0) + num11 = 0; + if (num12 > Main.screenHeight) + num12 = Main.screenHeight; + if (num12 < 0) + num12 = 0; + vector2_1.X = (float) (num11 - Main.screenWidth / 2) / 2f; + vector2_1.Y = (float) (num12 - Main.screenHeight / 2) / 2f; + flag = true; + } + } + if (float.IsNaN(Main.CurrentPan.X)) + Main.CurrentPan.X = 0.0f; + if (float.IsNaN(Main.CurrentPan.Y)) + Main.CurrentPan.Y = 0.0f; + Vector2 vector2_6 = vector2_1 - Main.CurrentPan; + float num13 = vector2_6.Length(); + float amount = 1f; + if ((double) num3 > (double) num2 + 9.99999974737875E-05) + amount = MathHelper.Clamp((float) (((double) num13 - (double) num2) / ((double) num3 - (double) num2)), 0.0f, 1f); + float num14 = MathHelper.Clamp(MathHelper.SmoothStep(0.0f, num13, amount), 0.0f, max); + if (vector2_1 == Vector2.Zero && !flag) + { + if ((double) Math.Abs(vector2_6.X) >= (double) (Main.screenWidth / 2) || (double) Math.Abs(vector2_6.Y) >= (double) (Main.screenHeight / 2)) + { + Main.renderNow = true; + Main.CurrentPan *= 0.9f; + } + else if ((double) num14 > 9.99999974737875E-05) + Main.CurrentPan += Vector2.Normalize(vector2_6) * num14; + } + else if ((double) num14 > 9.99999974737875E-05) + Main.CurrentPan += Vector2.Normalize(vector2_6) * num14; + Main.screenPosition.X += Main.CurrentPan.X; + Main.screenPosition.Y += Main.CurrentPan.Y * Main.player[Main.myPlayer].gravDir; + if ((double) Main.cameraLerp > 0.0) + { + if ((double) Vector2.Distance(screenPosition, Main.screenPosition) - (double) Main.player[Main.myPlayer].velocity.Length() < 0.25 || Main.cameraGamePadLerp && !PlayerInput.UsingGamepad) + { + Main.cameraLerp = 0.0f; + Main.cameraGamePadLerp = false; + } + else + Main.screenPosition = Vector2.Lerp(screenPosition, Main.screenPosition, Main.cameraLerp); + } + Main.screenPosition.X = (float) (int) Main.screenPosition.X; + Main.screenPosition.Y = (float) (int) Main.screenPosition.Y; + Main.ClampScreenPositionToWorld(); + } + + private void DrawSunAndMoon( + Main.SceneArea sceneArea, + Microsoft.Xna.Framework.Color moonColor, + Microsoft.Xna.Framework.Color sunColor, + float tempMushroomInfluence) + { + Texture2D texture2D1 = TextureAssets.Sun.Value; + int index = Main.moonType; + if (!TextureAssets.Moon.IndexInRange>(index)) + index = Utils.Clamp(index, 0, 8); + Texture2D texture2D2 = TextureAssets.Moon[index].Value; + int bgTopY = sceneArea.bgTopY; + int num1 = (int) (Main.time / 54000.0 * ((double) sceneArea.totalWidth + (double) (texture2D1.Width * 2))) - texture2D1.Width; + int num2 = 0; + float num3 = 1f; + float rotation1 = (float) (Main.time / 54000.0 * 2.0 - 7.30000019073486); + int num4 = (int) (Main.time / 32400.0 * ((double) sceneArea.totalWidth + (double) (texture2D2.Width * 2))) - texture2D2.Width; + int num5 = 0; + float num6 = 1f; + float rotation2 = (float) (Main.time / 32400.0 * 2.0 - 7.30000019073486); + if (Main.dayTime) + { + double num7; + if (Main.time < 27000.0) + { + num7 = Math.Pow(1.0 - Main.time / 54000.0 * 2.0, 2.0); + num2 = (int) ((double) bgTopY + num7 * 250.0 + 180.0); + } + else + { + num7 = Math.Pow((Main.time / 54000.0 - 0.5) * 2.0, 2.0); + num2 = (int) ((double) bgTopY + num7 * 250.0 + 180.0); + } + num3 = (float) (1.2 - num7 * 0.4); + } + else + { + double num8; + if (Main.time < 16200.0) + { + num8 = Math.Pow(1.0 - Main.time / 32400.0 * 2.0, 2.0); + num5 = (int) ((double) bgTopY + num8 * 250.0 + 180.0); + } + else + { + num8 = Math.Pow((Main.time / 32400.0 - 0.5) * 2.0, 2.0); + num5 = (int) ((double) bgTopY + num8 * 250.0 + 180.0); + } + num6 = (float) (1.2 - num8 * 0.4); + } + float scale1 = num3 * Main.ForcedMinimumZoom; + float scale2 = num6 * Main.ForcedMinimumZoom; + if (Main.dayTime) + { + scale1 *= 1.1f; + float num9 = 1f - tempMushroomInfluence - Main.cloudAlpha * 1.5f * Main.atmo; + if ((double) num9 < 0.0) + num9 = 0.0f; + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color((int) (byte) ((double) byte.MaxValue * (double) num9), (int) (byte) ((double) sunColor.G * (double) num9), (int) (byte) ((double) sunColor.B * (double) num9), (int) (byte) ((double) byte.MaxValue * (double) num9)); + Microsoft.Xna.Framework.Color color2 = new Microsoft.Xna.Framework.Color((int) (byte) ((double) sunColor.R * (double) num9), (int) (byte) ((double) sunColor.G * (double) num9), (int) (byte) ((double) sunColor.B * (double) num9), (int) (byte) ((double) sunColor.B * (double) num9)); + bool flag = false; + if (Main.eclipse) + { + texture2D1 = TextureAssets.Sun3.Value; + flag = true; + } + else if (!Main.gameMenu && Main.player[Main.myPlayer].head == 12) + { + texture2D1 = TextureAssets.Sun2.Value; + flag = true; + } + if (flag) + color2 = new Microsoft.Xna.Framework.Color((int) (byte) ((double) sunColor.R * (double) num9), (int) (byte) ((double) sunColor.G * (double) num9), (int) (byte) ((double) sunColor.B * (double) num9), (int) (byte) ((double) ((int) sunColor.B - 60) * (double) num9)); + Vector2 origin = texture2D1.Size() / 2f; + Vector2 position = new Vector2((float) num1, (float) (num2 + (int) Main.sunModY)) + sceneArea.SceneLocalScreenPositionOffset; + Main.spriteBatch.Draw(texture2D1, position, new Microsoft.Xna.Framework.Rectangle?(), color1, rotation1, origin, scale1, SpriteEffects.None, 0.0f); + Main.spriteBatch.Draw(texture2D1, position, new Microsoft.Xna.Framework.Rectangle?(), color2, rotation1, origin, scale1, SpriteEffects.None, 0.0f); + } + if (!Main.dayTime) + { + float num10 = (float) (1.0 - (double) Main.cloudAlpha * 1.5 * (double) Main.atmo); + if ((double) num10 < 0.0) + num10 = 0.0f; + moonColor *= num10; + Vector2 position = new Vector2((float) num4, (float) (num5 + (int) Main.moonModY)) + sceneArea.SceneLocalScreenPositionOffset; + if (WorldGen.drunkWorldGen) + Main.spriteBatch.Draw(TextureAssets.SmileyMoon.Value, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.SmileyMoon.Width(), TextureAssets.SmileyMoon.Height())), moonColor, (float) ((double) rotation2 / 2.0 + 3.14159274101257), new Vector2((float) (TextureAssets.SmileyMoon.Width() / 2), (float) (TextureAssets.SmileyMoon.Width() / 2)), scale2, SpriteEffects.None, 0.0f); + else if (Main.pumpkinMoon) + Main.spriteBatch.Draw(TextureAssets.PumpkinMoon.Value, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, TextureAssets.PumpkinMoon.Width() * Main.moonPhase, TextureAssets.PumpkinMoon.Width(), TextureAssets.PumpkinMoon.Width())), moonColor, rotation2, new Vector2((float) (TextureAssets.PumpkinMoon.Width() / 2), (float) (TextureAssets.PumpkinMoon.Width() / 2)), scale2, SpriteEffects.None, 0.0f); + else if (Main.snowMoon) + Main.spriteBatch.Draw(TextureAssets.SnowMoon.Value, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, TextureAssets.SnowMoon.Width() * Main.moonPhase, TextureAssets.SnowMoon.Width(), TextureAssets.SnowMoon.Width())), moonColor, rotation2, new Vector2((float) (TextureAssets.SnowMoon.Width() / 2), (float) (TextureAssets.SnowMoon.Width() / 2)), scale2, SpriteEffects.None, 0.0f); + else + Main.spriteBatch.Draw(TextureAssets.Moon[index].Value, position, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, TextureAssets.Moon[index].Width() * Main.moonPhase, TextureAssets.Moon[index].Width(), TextureAssets.Moon[index].Width())), moonColor, rotation2, new Vector2((float) (TextureAssets.Moon[index].Width() / 2), (float) (TextureAssets.Moon[index].Width() / 2)), scale2, SpriteEffects.None, 0.0f); + } + Microsoft.Xna.Framework.Rectangle rectangle1 = !Main.dayTime ? new Microsoft.Xna.Framework.Rectangle((int) ((double) num4 - (double) TextureAssets.Moon[index].Width() * 0.5 * (double) scale2), (int) ((double) num5 - (double) TextureAssets.Moon[index].Width() * 0.5 * (double) scale2 + (double) Main.moonModY), (int) ((double) TextureAssets.Moon[index].Width() * (double) scale2), (int) ((double) TextureAssets.Moon[index].Width() * (double) scale2)) : new Microsoft.Xna.Framework.Rectangle((int) ((double) num1 - (double) TextureAssets.Sun.Width() * 0.5 * (double) scale1), (int) ((double) num2 - (double) TextureAssets.Sun.Height() * 0.5 * (double) scale1 + (double) Main.sunModY), (int) ((double) TextureAssets.Sun.Width() * (double) scale1), (int) ((double) TextureAssets.Sun.Width() * (double) scale1)); + rectangle1.Offset((int) sceneArea.SceneLocalScreenPositionOffset.X, (int) sceneArea.SceneLocalScreenPositionOffset.Y); + Microsoft.Xna.Framework.Rectangle rectangle2 = new Microsoft.Xna.Framework.Rectangle(Main.mouseX, Main.mouseY, 1, 1); + Main.sunModY = (short) ((double) Main.sunModY * 0.999); + Main.moonModY = (short) ((double) Main.moonModY * 0.999); + if ((!Main.gameMenu ? 0 : (Main.netMode != 1 ? 1 : 0)) == 0) + return; + if (rectangle2.Intersects(rectangle1) || Main.alreadyGrabbingSunOrMoon) + Main.player[Main.myPlayer].mouseInterface = true; + if (Main.mouseLeft && Main.hasFocus) + { + if (!rectangle2.Intersects(rectangle1) && !Main.alreadyGrabbingSunOrMoon) + return; + if (Main.dayTime) + { + Main.time = 54000.0 * ((double) (Main.mouseX + TextureAssets.Sun.Width()) / ((double) Main.screenWidth + (double) (TextureAssets.Sun.Width() * 2))); + Main.sunModY = (short) (Main.mouseY - num2); + if (Main.time > 53990.0) + Main.time = 53990.0; + } + else + { + Main.time = 32400.0 * ((double) (Main.mouseX + TextureAssets.Moon[index].Width()) / ((double) Main.screenWidth + (double) (TextureAssets.Moon[index].Width() * 2))); + Main.moonModY = (short) (Main.mouseY - num5); + if (Main.time > 32390.0) + Main.time = 32390.0; + } + if (Main.time < 10.0) + Main.time = 10.0; + Main.alreadyGrabbingSunOrMoon = true; + } + else + Main.alreadyGrabbingSunOrMoon = false; + } + + private void DrawStarsInBackground(Main.SceneArea sceneArea) + { + if (Main.netMode == 2 || (double) Main.screenPosition.Y >= Main.worldSurface * 16.0 + 16.0) + return; + float num1 = 1f; + if ((double) Main.GraveyardVisualIntensity > 0.0) + { + float num2 = (float) (1.0 - (double) Main.GraveyardVisualIntensity * 1.39999997615814); + if ((double) num2 <= 0.0) + return; + num1 *= num2; + } + Microsoft.Xna.Framework.Color colorOfTheSkies = Main.ColorOfTheSkies; + if ((double) byte.MaxValue * (1.0 - (double) Main.cloudAlpha * (double) Main.atmo) - (double) colorOfTheSkies.R - 25.0 <= 0.0) + return; + for (int index1 = 0; index1 < Main.numStars; ++index1) + { + Star star = Main.star[index1]; + if (star != null && !star.hidden) + { + Microsoft.Xna.Framework.Color color1 = new Microsoft.Xna.Framework.Color(); + float num3 = 1f - star.fadeIn; + int num4 = (int) ((double) ((int) byte.MaxValue - (int) colorOfTheSkies.R - 100) * (double) star.twinkle * (double) num3); + int num5 = (int) ((double) ((int) byte.MaxValue - (int) colorOfTheSkies.G - 100) * (double) star.twinkle * (double) num3); + int num6 = (int) ((double) ((int) byte.MaxValue - (int) colorOfTheSkies.B - 100) * (double) star.twinkle * (double) num3); + int num7 = (num4 + num6 + num5) / 3; + if (num7 > 0) + { + int num8 = (int) ((double) num7 * 1.4); + if (num8 > (int) byte.MaxValue) + num8 = (int) byte.MaxValue; + int num9 = num8; + int num10 = num8; + color1.R = (byte) num8; + color1.G = (byte) num9; + color1.B = (byte) num10; + color1 *= num1; + Vector2 position = new Vector2(star.position.X / 1920f, star.position.Y / 1200f) * new Vector2(sceneArea.totalWidth, sceneArea.totalHeight) + new Vector2(0.0f, (float) sceneArea.bgTopY) + sceneArea.SceneLocalScreenPositionOffset; + Texture2D texture2D = TextureAssets.Star[star.type].Value; + Vector2 origin = texture2D.Size() / 2f; + if (star.falling) + { + star.fadeIn = 0.0f; + int num11 = star.fallTime; + float num12 = 30f; + if ((double) num11 > (double) num12) + num11 = (int) num12; + for (int index2 = 1; index2 < num11; ++index2) + { + Vector2 vector2 = star.fallSpeed * (float) index2 * 0.4f; + float num13 = star.scale * (float) (1.0 - (double) index2 * 1.0 / (double) num12); + Microsoft.Xna.Framework.Color color2 = color1; + double rotation = (double) star.rotation; + Microsoft.Xna.Framework.Color color3 = color2 * (float) (1.0 - (double) index2 * 1.0 / (double) num12); + Main.spriteBatch.Draw(texture2D, position - vector2, new Microsoft.Xna.Framework.Rectangle?(), color3, star.rotation, origin, num13 * star.twinkle * Main.ForcedMinimumZoom, SpriteEffects.None, 0.0f); + } + } + Main.spriteBatch.Draw(texture2D, position, new Microsoft.Xna.Framework.Rectangle?(), color1, star.rotation, origin, star.scale * star.twinkle * Main.ForcedMinimumZoom, SpriteEffects.None, 0.0f); + } + } + } + } + + private static void ApplyColorOfTheSkiesToTiles() + { + Microsoft.Xna.Framework.Color colorOfTheSkies = Main.ColorOfTheSkies; + Main.tileColor.A = byte.MaxValue; + Main.tileColor.R = (byte) (((int) colorOfTheSkies.R + (int) colorOfTheSkies.G + (int) colorOfTheSkies.B + (int) colorOfTheSkies.R * 7) / 10); + Main.tileColor.G = (byte) (((int) colorOfTheSkies.R + (int) colorOfTheSkies.G + (int) colorOfTheSkies.B + (int) colorOfTheSkies.G * 7) / 10); + Main.tileColor.B = (byte) (((int) colorOfTheSkies.R + (int) colorOfTheSkies.G + (int) colorOfTheSkies.B + (int) colorOfTheSkies.B * 7) / 10); + Main.tileColor = SkyManager.Instance.ProcessTileColor(Main.tileColor); + } + + private static void UpdateAtmosphereTransparencyToSkyColor() + { + float num1 = (float) (Main.maxTilesX / 4200); + float num2 = num1 * num1; + Main.atmo = (float) ((((double) Main.screenPosition.Y + (double) (Main.screenHeight / 2)) / 16.0 - (65.0 + 10.0 * (double) num2)) / (Main.worldSurface / 5.0)); + if ((double) Main.atmo < 0.0) + Main.atmo = 0.0f; + if ((double) Main.atmo > 1.0) + Main.atmo = 1f; + if (Main.gameMenu || Main.netMode == 2) + Main.atmo = 1f; + Microsoft.Xna.Framework.Color color = Main.ColorOfTheSkies; + color.R = (byte) ((double) color.R * (double) Main.atmo); + color.G = (byte) ((double) color.G * (double) Main.atmo); + color.B = (byte) ((double) color.B * (double) Main.atmo); + if ((double) Main.atmo <= 0.01) + color = Microsoft.Xna.Framework.Color.Transparent; + Main.ColorOfTheSkies = color; + } + + private void Debug_PrettifyMap() + { + } + + private static void DrawNetplayStatusText() + { + if (Main.netMode != 1 || string.IsNullOrWhiteSpace(Netplay.Connection.StatusText)) + return; + string text = Netplay.Connection.StatusText; + if (!Netplay.Connection.HideStatusTextPercent) + text = text + ": " + (object) (int) ((double) Netplay.Connection.StatusCount / (double) Netplay.Connection.StatusMax * 100.0) + "%"; + if (Main._netplayStatusTextSnippets == null || Main._oldNetplayStatusText != text) + { + Main._netplayStatusTextSnippets = ChatManager.ParseMessage(text, Microsoft.Xna.Framework.Color.White).ToArray(); + Main._oldNetplayStatusText = text; + } + Vector2 position = new Vector2((float) (628.0 - (double) ChatManager.GetStringSize(FontAssets.MouseText.Value, Main._netplayStatusTextSnippets, Vector2.One).X * 0.5) + (float) (Main.screenWidth - 800), 84f); + int hoveredSnippet; + if (Netplay.Connection.StatusTextHasShadows) + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, FontAssets.MouseText.Value, Main._netplayStatusTextSnippets, position, 0.0f, Vector2.Zero, Vector2.One, out hoveredSnippet); + else + ChatManager.DrawColorCodedString(Main.spriteBatch, FontAssets.MouseText.Value, Main._netplayStatusTextSnippets, position, new Microsoft.Xna.Framework.Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor), 0.0f, Vector2.Zero, Vector2.One, out hoveredSnippet, -1f); + } + + private void DrawPlayerChatBubbles() + { + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && Main.player[index].chatOverhead.timeLeft > 0 && !Main.player[index].dead) + { + Vector2 messageSize = Main.player[index].chatOverhead.messageSize; + Vector2 screenPosition = Main.player[index].Top.ToScreenPosition(); + screenPosition.Y -= messageSize.Y + 2f; + if ((double) Main.player[Main.myPlayer].gravDir == -1.0) + screenPosition.Y += 2f; + screenPosition.X -= messageSize.X / 2f; + screenPosition.Y += Main.player[index].gfxOffY; + Vector2 position = screenPosition.Floor(); + int hoveredSnippet = 0; + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, FontAssets.MouseText.Value, Main.player[index].chatOverhead.snippets, position, 0.0f, Main.player[index].chatOverhead.color, Vector2.Zero, Vector2.One, out hoveredSnippet); + } + } + } + + private void DrawRainInMenu() + { + bool isActive = this.IsActive; + Microsoft.Xna.Framework.Rectangle[] rectangleArray = new Microsoft.Xna.Framework.Rectangle[6]; + for (int index = 0; index < rectangleArray.Length; ++index) + rectangleArray[index] = new Microsoft.Xna.Framework.Rectangle(index * 4, 0, 2, 40); + Microsoft.Xna.Framework.Color color = Main.ColorOfTheSkies * 0.85f; + for (int index = 0; index < Main.maxRain; ++index) + { + if (Main.rain[index].active) + { + Rain rain = Main.rain[index]; + Main.spriteBatch.Draw(TextureAssets.Rain.Value, rain.position - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(rectangleArray[(int) rain.type]), color, rain.rotation, Vector2.Zero, rain.scale, SpriteEffects.None, 0.0f); + if (isActive) + rain.Update(); + } + } + } + + private void DoDraw_WallsTilesNPCs() + { + try + { + this.CacheNPCDraws(); + this.CacheProjDraws(); + this.DrawCachedNPCs(this.DrawCacheNPCsMoonMoon, true); + this.DoDraw_WallsAndBlacks(); + this.DrawWoF(); + this.DrawBackGore(); + MoonlordDeathDrama.DrawPieces(Main.spriteBatch); + MoonlordDeathDrama.DrawExplosions(Main.spriteBatch); + this.DrawCachedNPCs(this.DrawCacheNPCsBehindNonSolidTiles, true); + this.DoDraw_Tiles_NonSolid(); + this.DoDraw_Waterfalls(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + Main.spriteBatch.End(); + try + { + int num = Main.player[Main.myPlayer].detectCreature ? 1 : 0; + if (num == 0) + this.DoDraw_DrawNPCsBehindTiles(); + this.DoDraw_Tiles_Solid(); + if (num != 0) + this.DoDraw_DrawNPCsBehindTiles(); + this.DrawPlayers_BehindNPCs(); + this.DoDraw_DrawNPCsOverTiles(); + TimeLogger.DetailedDrawReset(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + } + + private void DoDraw_Waterfalls() + { + this.waterfallManager.Draw(Main.spriteBatch); + TimeLogger.DetailedDrawTime(16); + } + + private void DoDraw_Tiles_Solid() + { + this.TilesRenderer.PreDrawTiles(true, !Main.drawToScreen, false); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + try + { + if (Main.drawToScreen) + { + this.DrawTiles(true, !Main.drawToScreen, false); + } + else + { + Main.spriteBatch.Draw((Texture2D) this.tileTarget, Main.sceneTilePos - Main.screenPosition, Microsoft.Xna.Framework.Color.White); + TimeLogger.DetailedDrawTime(17); + } + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + Main.spriteBatch.End(); + this.DrawTileEntities(true, !Main.drawToScreen, false); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + try + { + Main.player[Main.myPlayer].hitReplace.DrawFreshAnimations(Main.spriteBatch); + Main.player[Main.myPlayer].hitTile.DrawFreshAnimations(Main.spriteBatch); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + Main.spriteBatch.End(); + } + + private void DoDraw_Tiles_NonSolid() + { + this.TilesRenderer.PreDrawTiles(false, !Main.drawToScreen, false); + if (Main.drawToScreen) + { + this.DrawTiles(false, !Main.drawToScreen, false); + TimeLogger.DetailedDrawReset(); + } + else + { + Main.spriteBatch.Draw((Texture2D) this.tile2Target, Main.sceneTile2Pos - Main.screenPosition, Microsoft.Xna.Framework.Color.White); + TimeLogger.DetailedDrawTime(15); + } + Main.spriteBatch.End(); + try + { + this.DrawTileEntities(false, !Main.drawToScreen, false); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + } + + private void DoDraw_DrawNPCsOverTiles() + { + this.DrawCachedProjs(this.DrawCacheProjsBehindNPCs); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + try + { + this.DrawNPCs(); + this.DrawCachedNPCs(this.DrawCacheNPCProjectiles, false); + TimeLogger.DetailedDrawTime(19); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + Main.spriteBatch.End(); + } + + private void DoDraw_DrawNPCsBehindTiles() + { + this.DrawCachedProjs(this.DrawCacheProjsBehindNPCsAndTiles); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, (Effect) null, Main.Transform); + try + { + this.DrawNPCs(true); + TimeLogger.DetailedDrawTime(18); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + Main.spriteBatch.End(); + } + + private void DrawBackGore() + { + if (!Main.drawBackGore) + return; + Main.drawBackGore = false; + if (Main.ignoreErrors) + { + try + { + this.DrawGoreBehind(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + } + else + this.DrawGoreBehind(); + } + + private void DoDraw_WallsAndBlacks() + { + if (Main.drawToScreen) + { + this.DrawBlack(); + Main.tileBatch.Begin(); + this.DrawWalls(); + Main.tileBatch.End(); + } + else + { + Main.spriteBatch.Draw((Texture2D) this.blackTarget, Main.sceneTilePos - Main.screenPosition, Microsoft.Xna.Framework.Color.White); + TimeLogger.DetailedDrawTime(13); + Main.spriteBatch.Draw((Texture2D) this.wallTarget, Main.sceneWallPos - Main.screenPosition, Microsoft.Xna.Framework.Color.White); + TimeLogger.DetailedDrawTime(14); + } + Overlays.Scene.Draw(Main.spriteBatch, RenderLayers.Walls); + } + + private static void SetBackColor( + Main.InfoToSetBackColor info, + out Microsoft.Xna.Framework.Color sunColor, + out Microsoft.Xna.Framework.Color moonColor) + { + double time = Main.time; + Microsoft.Xna.Framework.Color white = Microsoft.Xna.Framework.Color.White; + sunColor = Microsoft.Xna.Framework.Color.White; + moonColor = Microsoft.Xna.Framework.Color.White; + int num1 = info.isInGameMenuOrIsServer ? 1 : 0; + if (Main.dayTime) + { + if (time < 13500.0) + { + float num2 = (float) (time / 13500.0); + sunColor.R = (byte) ((double) num2 * 200.0 + 55.0); + sunColor.G = (byte) ((double) num2 * 180.0 + 75.0); + sunColor.B = (byte) ((double) num2 * 250.0 + 5.0); + white.R = (byte) ((double) num2 * 230.0 + 25.0); + white.G = (byte) ((double) num2 * 220.0 + 35.0); + white.B = (byte) ((double) num2 * 220.0 + 35.0); + } + if (time > 45900.0) + { + float num3 = (float) (1.0 - (time / 54000.0 - 0.85) * (20.0 / 3.0)); + sunColor.R = (byte) ((double) num3 * 120.0 + 55.0); + sunColor.G = (byte) ((double) num3 * 100.0 + 25.0); + sunColor.B = (byte) ((double) num3 * 120.0 + 55.0); + white.R = (byte) ((double) num3 * 200.0 + 35.0); + white.G = (byte) ((double) num3 * 85.0 + 35.0); + white.B = (byte) ((double) num3 * 135.0 + 35.0); + } + else if (time > 37800.0) + { + float num4 = (float) (1.0 - (time / 54000.0 - 0.7) * (20.0 / 3.0)); + sunColor.R = (byte) ((double) num4 * 80.0 + 175.0); + sunColor.G = (byte) ((double) num4 * 130.0 + 125.0); + sunColor.B = (byte) ((double) num4 * 100.0 + 155.0); + white.R = (byte) ((double) num4 * 20.0 + 235.0); + white.G = (byte) ((double) num4 * 135.0 + 120.0); + white.B = (byte) ((double) num4 * 85.0 + 170.0); + } + } + if (!Main.dayTime) + { + if (info.BloodMoonActive) + { + if (time < 16200.0) + { + float num5 = (float) (1.0 - time / 16200.0); + moonColor.R = (byte) ((double) num5 * 10.0 + 205.0); + moonColor.G = (byte) ((double) num5 * 170.0 + 55.0); + moonColor.B = (byte) ((double) num5 * 200.0 + 55.0); + white.R = (byte) (40.0 - (double) num5 * 40.0 + 35.0); + white.G = (byte) ((double) num5 * 20.0 + 15.0); + white.B = (byte) ((double) num5 * 20.0 + 15.0); + } + else if (time >= 16200.0) + { + float num6 = (float) ((time / 32400.0 - 0.5) * 2.0); + moonColor.R = (byte) ((double) num6 * 50.0 + 205.0); + moonColor.G = (byte) ((double) num6 * 100.0 + 155.0); + moonColor.B = (byte) ((double) num6 * 100.0 + 155.0); + moonColor.R = (byte) ((double) num6 * 10.0 + 205.0); + moonColor.G = (byte) ((double) num6 * 170.0 + 55.0); + moonColor.B = (byte) ((double) num6 * 200.0 + 55.0); + white.R = (byte) (40.0 - (double) num6 * 40.0 + 35.0); + white.G = (byte) ((double) num6 * 20.0 + 15.0); + white.B = (byte) ((double) num6 * 20.0 + 15.0); + } + } + else if (time < 16200.0) + { + float num7 = (float) (1.0 - time / 16200.0); + moonColor.R = (byte) ((double) num7 * 10.0 + 205.0); + moonColor.G = (byte) ((double) num7 * 70.0 + 155.0); + moonColor.B = (byte) ((double) num7 * 100.0 + 155.0); + white.R = (byte) ((double) num7 * 30.0 + 5.0); + white.G = (byte) ((double) num7 * 30.0 + 5.0); + white.B = (byte) ((double) num7 * 30.0 + 5.0); + } + else if (time >= 16200.0) + { + float num8 = (float) ((time / 32400.0 - 0.5) * 2.0); + moonColor.R = (byte) ((double) num8 * 50.0 + 205.0); + moonColor.G = (byte) ((double) num8 * 100.0 + 155.0); + moonColor.B = (byte) ((double) num8 * 100.0 + 155.0); + white.R = (byte) ((double) num8 * 20.0 + 5.0); + white.G = (byte) ((double) num8 * 30.0 + 5.0); + white.B = (byte) ((double) num8 * 30.0 + 5.0); + } + } + if ((double) Main.cloudAlpha > 0.0) + { + float num9 = (float) (1.0 - (double) Main.cloudAlpha * 0.899999976158142 * (double) Main.atmo); + white.R = (byte) ((double) white.R * (double) num9); + white.G = (byte) ((double) white.G * (double) num9); + white.B = (byte) ((double) white.B * (double) num9); + } + if ((double) info.GraveyardInfluence > 0.0) + { + float num10 = (float) (1.0 - (double) info.GraveyardInfluence * 0.600000023841858); + white.R = (byte) ((double) white.R * (double) num10); + white.G = (byte) ((double) white.G * (double) num10); + white.B = (byte) ((double) white.B * (double) num10); + } + if (num1 != 0 && !Main.dayTime) + { + white.R = (byte) 35; + white.G = (byte) 35; + white.B = (byte) 35; + } + if ((double) info.CorruptionBiomeInfluence > 0.0) + { + float num11 = info.CorruptionBiomeInfluence; + if ((double) num11 > 1.0) + num11 = 1f; + int r1 = (int) white.R; + int g1 = (int) white.G; + int b1 = (int) white.B; + int num12 = r1 - (int) (90.0 * (double) num11 * ((double) white.R / (double) byte.MaxValue)); + int num13 = g1 - (int) (140.0 * (double) num11 * ((double) white.G / (double) byte.MaxValue)); + int num14 = b1 - (int) (70.0 * (double) num11 * ((double) white.B / (double) byte.MaxValue)); + if (num12 < 15) + num12 = 15; + if (num13 < 15) + num13 = 15; + if (num14 < 15) + num14 = 15; + white.R = (byte) num12; + white.G = (byte) num13; + white.B = (byte) num14; + int r2 = (int) sunColor.R; + int g2 = (int) sunColor.G; + int b2 = (int) sunColor.B; + int num15 = r2 - (int) (100.0 * (double) num11 * ((double) sunColor.R / (double) byte.MaxValue)); + int num16 = g2 - (int) (100.0 * (double) num11 * ((double) sunColor.G / (double) byte.MaxValue)); + int num17 = b2 - (int) (0.0 * (double) num11 * ((double) sunColor.B / (double) byte.MaxValue)); + if (num15 < 15) + num15 = 15; + if (num16 < 15) + num16 = 15; + if (num17 < 15) + num17 = 15; + sunColor.R = (byte) num15; + sunColor.G = (byte) num16; + sunColor.B = (byte) num17; + } + if ((double) info.CrimsonBiomeInfluence > 0.0) + { + float num18 = info.CrimsonBiomeInfluence; + if ((double) num18 > 1.0) + num18 = 1f; + int r = (int) white.R; + int g3 = (int) white.G; + int b3 = (int) white.B; + int num19 = r - (int) (40.0 * (double) num18 * ((double) white.G / (double) byte.MaxValue)); + int num20 = g3 - (int) (110.0 * (double) num18 * ((double) white.G / (double) byte.MaxValue)); + int num21 = b3 - (int) (140.0 * (double) num18 * ((double) white.B / (double) byte.MaxValue)); + if (num19 < 15) + num19 = 15; + if (num20 < 15) + num20 = 15; + if (num21 < 15) + num21 = 15; + white.R = (byte) num19; + white.G = (byte) num20; + white.B = (byte) num21; + int num22 = (int) sunColor.R; + int g4 = (int) sunColor.G; + int b4 = (int) sunColor.B; + int num23 = g4 - (int) (90.0 * (double) num18 * ((double) sunColor.G / (double) byte.MaxValue)); + int num24 = b4 - (int) (110.0 * (double) num18 * ((double) sunColor.B / (double) byte.MaxValue)); + if (num22 < 15) + num22 = 15; + if (num23 < 15) + num23 = 15; + if (num24 < 15) + num24 = 15; + sunColor.R = (byte) num22; + sunColor.G = (byte) num23; + sunColor.B = (byte) num24; + } + if ((double) info.JungleBiomeInfluence > 0.0) + { + float num25 = info.JungleBiomeInfluence; + if ((double) num25 > 1.0) + num25 = 1f; + int r3 = (int) white.R; + int num26 = (int) white.G; + int b5 = (int) white.B; + int num27 = r3 - (int) (40.0 * (double) num25 * ((double) white.R / (double) byte.MaxValue)); + int num28 = b5 - (int) (70.0 * (double) num25 * ((double) white.B / (double) byte.MaxValue)); + if (num26 > (int) byte.MaxValue) + num26 = (int) byte.MaxValue; + if (num26 < 15) + num26 = 15; + if (num27 > (int) byte.MaxValue) + num27 = (int) byte.MaxValue; + if (num27 < 15) + num27 = 15; + if (num28 < 15) + num28 = 15; + white.R = (byte) num27; + white.G = (byte) num26; + white.B = (byte) num28; + int r4 = (int) sunColor.R; + int num29 = (int) sunColor.G; + int b6 = (int) sunColor.B; + int num30 = r4 - (int) (30.0 * (double) num25 * ((double) sunColor.R / (double) byte.MaxValue)); + int num31 = b6 - (int) (10.0 * (double) num25 * ((double) sunColor.B / (double) byte.MaxValue)); + if (num30 < 15) + num30 = 15; + if (num29 < 15) + num29 = 15; + if (num31 < 15) + num31 = 15; + sunColor.R = (byte) num30; + sunColor.G = (byte) num29; + sunColor.B = (byte) num31; + } + if ((double) info.MushroomBiomeInfluence > 0.0) + { + float mushroomBiomeInfluence = info.MushroomBiomeInfluence; + int r5 = (int) white.R; + int g5 = (int) white.G; + int b7 = (int) white.B; + int num32 = g5 - (int) (250.0 * (double) mushroomBiomeInfluence * ((double) white.G / (double) byte.MaxValue)); + int num33 = r5 - (int) (250.0 * (double) mushroomBiomeInfluence * ((double) white.R / (double) byte.MaxValue)); + int num34 = b7 - (int) (250.0 * (double) mushroomBiomeInfluence * ((double) white.B / (double) byte.MaxValue)); + if (num32 < 15) + num32 = 15; + if (num33 < 15) + num33 = 15; + if (num34 < 15) + num34 = 15; + white.R = (byte) num33; + white.G = (byte) num32; + white.B = (byte) num34; + int r6 = (int) sunColor.R; + int g6 = (int) sunColor.G; + int b8 = (int) sunColor.B; + int num35 = g6 - (int) (10.0 * (double) mushroomBiomeInfluence * ((double) sunColor.G / (double) byte.MaxValue)); + int num36 = r6 - (int) (30.0 * (double) mushroomBiomeInfluence * ((double) sunColor.R / (double) byte.MaxValue)); + int num37 = b8 - (int) (10.0 * (double) mushroomBiomeInfluence * ((double) sunColor.B / (double) byte.MaxValue)); + if (num36 < 15) + num36 = 15; + if (num35 < 15) + num35 = 15; + if (num37 < 15) + num37 = 15; + sunColor.R = (byte) num36; + sunColor.G = (byte) num35; + sunColor.B = (byte) num37; + int r7 = (int) moonColor.R; + int g7 = (int) moonColor.G; + int b9 = (int) moonColor.B; + int num38 = g7 - (int) (140.0 * (double) mushroomBiomeInfluence * ((double) moonColor.R / (double) byte.MaxValue)); + int num39 = r7 - (int) (170.0 * (double) mushroomBiomeInfluence * ((double) moonColor.G / (double) byte.MaxValue)); + int num40 = b9 - (int) (190.0 * (double) mushroomBiomeInfluence * ((double) moonColor.B / (double) byte.MaxValue)); + if (num39 < 15) + num39 = 15; + if (num38 < 15) + num38 = 15; + if (num40 < 15) + num40 = 15; + moonColor.R = (byte) num39; + moonColor.G = (byte) num38; + moonColor.B = (byte) num40; + } + byte num41 = 15; + switch (Main.GetMoonPhase()) + { + case MoonPhase.Full: + num41 = (byte) 19; + break; + case MoonPhase.ThreeQuartersAtLeft: + case MoonPhase.ThreeQuartersAtRight: + num41 = (byte) 17; + break; + case MoonPhase.HalfAtLeft: + case MoonPhase.HalfAtRight: + num41 = (byte) 15; + break; + case MoonPhase.QuarterAtLeft: + case MoonPhase.QuarterAtRight: + num41 = (byte) 13; + break; + case MoonPhase.Empty: + num41 = (byte) 11; + break; + } + if ((int) white.R < (int) num41) + white.R = num41; + if ((int) white.G < (int) num41) + white.G = num41; + if ((int) white.B < (int) num41) + white.B = num41; + if (info.BloodMoonActive) + { + if (white.R < (byte) 25) + white.R = (byte) 25; + if (white.G < (byte) 25) + white.G = (byte) 25; + if (white.B < (byte) 25) + white.B = (byte) 25; + } + if (Main.eclipse && Main.dayTime) + { + float num42 = 1242f; + Main.eclipseLight = (float) time / num42; + if ((double) Main.eclipseLight > 1.0) + Main.eclipseLight = 1f; + } + else if ((double) Main.eclipseLight > 0.0) + { + Main.eclipseLight -= 0.01f; + if ((double) Main.eclipseLight < 0.0) + Main.eclipseLight = 0.0f; + } + if ((double) Main.eclipseLight > 0.0) + { + float num43 = (float) (1.0 - 0.925000011920929 * (double) Main.eclipseLight); + float num44 = (float) (1.0 - 0.959999978542328 * (double) Main.eclipseLight); + float num45 = (float) (1.0 - 1.0 * (double) Main.eclipseLight); + int num46 = (int) ((double) white.R * (double) num43); + int num47 = (int) ((double) white.G * (double) num44); + int num48 = (int) ((double) white.B * (double) num45); + white.R = (byte) num46; + white.G = (byte) num47; + white.B = (byte) num48; + sunColor.R = byte.MaxValue; + sunColor.G = (byte) 127; + sunColor.B = (byte) 67; + if (white.R < (byte) 20) + white.R = (byte) 20; + if (white.G < (byte) 10) + white.G = (byte) 10; + if (!Lighting.NotRetro) + { + if (white.R < (byte) 20) + white.R = (byte) 20; + if (white.G < (byte) 14) + white.G = (byte) 14; + if (white.B < (byte) 6) + white.B = (byte) 6; + } + } + if ((double) Main.lightning > 0.0) + { + float num49 = (float) white.R / (float) byte.MaxValue; + float num50 = (float) white.G / (float) byte.MaxValue; + float num51 = (float) white.B / (float) byte.MaxValue; + float num52 = MathHelper.Lerp(num49, 1f, Main.lightning); + float num53 = MathHelper.Lerp(num50, 1f, Main.lightning); + float num54 = MathHelper.Lerp(num51, 1f, Main.lightning); + white.R = (byte) ((double) num52 * (double) byte.MaxValue); + white.G = (byte) ((double) num53 * (double) byte.MaxValue); + white.B = (byte) ((double) num54 * (double) byte.MaxValue); + } + if (!info.BloodMoonActive) + moonColor = Microsoft.Xna.Framework.Color.White; + Main.ColorOfTheSkies = white; + } + + private void DoLightTiles() + { + Vector2 vector2_1 = Main.Camera.ScaledPosition; + Vector2 vector2_2 = Main.Camera.ScaledSize; + if (!Lighting.UsingNewLighting) + { + vector2_1 = Main.Camera.UnscaledPosition; + vector2_2 = Main.Camera.UnscaledSize; + } + this.firstTileX = (int) Math.Floor((double) vector2_1.X / 16.0) - 1; + this.lastTileX = (int) Math.Floor(((double) vector2_1.X + (double) vector2_2.X) / 16.0) + 2; + this.firstTileY = (int) Math.Floor((double) vector2_1.Y / 16.0) - 1; + this.lastTileY = (int) Math.Floor(((double) vector2_1.Y + (double) vector2_2.Y) / 16.0) + 2; + if (Main.drawSkip) + return; + Lighting.LightTiles(this.firstTileX, this.lastTileX, this.firstTileY, this.lastTileY); + } + + private static void ClampScreenPositionToWorld() + { + Vector2 input1 = new Vector2(Main.leftWorld + 656f, Main.topWorld + 656f) - Main.GameViewMatrix.Translation; + Vector2 input2 = new Vector2((float) ((double) Main.rightWorld - (double) Main.screenWidth / (double) Main.GameViewMatrix.Zoom.X - 672.0), (float) ((double) Main.bottomWorld - (double) Main.screenHeight / (double) Main.GameViewMatrix.Zoom.Y - 672.0)) - Main.GameViewMatrix.Translation; + Vector2 min = Utils.Round(input1); + Vector2 max = Utils.Round(input2); + Main.screenPosition = Vector2.Clamp(Main.screenPosition, min, max); + } + + private void DrawBG() + { + float num1 = (float) Math.Min(PlayerInput.RealScreenHeight, Main.LogicCheckScreenHeight); + float num2 = (float) ((double) Main.screenPosition.Y + (double) (Main.screenHeight / 2) - (double) num1 / 2.0); + this.scAdj = (float) (Main.worldSurface * 16.0) / (num2 + num1); + float num3 = (float) ((double) Main.maxTilesY * 0.150000005960464 * 16.0) - num2; + if ((double) num3 < 0.0) + num3 = 0.0f; + float num4 = num3 * 0.00025f; + this.scAdj *= 0.45f - num4 * num4; + if (Main.maxTilesY <= 1200) + this.scAdj *= -500f; + else if (Main.maxTilesY <= 1800) + this.scAdj *= -300f; + else + this.scAdj *= -150f; + this.screenOff = (float) Main.screenHeight - 600f; + this.bgTopY = (int) ((-(double) Main.screenPosition.Y + (double) this.screenOff / 2.0) / (Main.worldSurface * 16.0) * 1200.0 + 1190.0) + (int) this.scAdj; + this.cTop = (float) (this.bgTopY - 50); + if (Main.resetClouds) + { + Cloud.resetClouds(); + Main.resetClouds = false; + } + Main.bgScale = 1f; + Main.bgWidthScaled = (int) ((double) Main.backgroundWidth[Main.treeMntBGSet1[0]] * (double) Main.bgScale); + Main.ColorOfSurfaceBackgroundsModified = Main.ColorOfTheSkies; + Main.ColorOfSurfaceBackgroundsBase = Main.ColorOfTheSkies; + int num5 = Main.GetPreferredBGStyleForPlayer(); + int num6 = 30; + Main.backgroundLayerTransitionSpeed = 0.05f; + if (num5 == 0) + num6 = 60; + if (Main.bgDelay < 0) + ++Main.bgDelay; + else if (num5 != Main.bgStyle) + { + ++Main.bgDelay; + if (Main.bgDelay > num6) + { + Main.bgDelay = -60; + Main.bgStyle = num5; + if (num5 == 0) + Main.bgDelay = 0; + } + } + else if (Main.bgDelay > 0) + --Main.bgDelay; + if (Main.gameMenu) + { + Main.backgroundLayerTransitionSpeed = 0.02f; + Main.bgStyle = Main.dayTime ? 0 : 1; + num5 = Main.bgStyle; + if (WorldGen.drunkWorldGen) + Main.bgStyle = 9; + } + if (Main.instantBGTransitionCounter > 0) + { + --Main.instantBGTransitionCounter; + Main.bgStyle = num5; + Main.backgroundLayerTransitionSpeed = 1f; + } + this.UpdateBGVisibility_BackLayer(new int?(), new float?()); + this.UpdateBGVisibility_FrontLayer(new int?(), new float?()); + try + { + this.DrawSurfaceBG(); + if (Main.BackgroundEnabled) + this.DrawUnderworldBackground(false); + } + catch (Exception ex) + { + if (!Main.ignoreErrors) + throw ex; + TimeLogger.DrawException(ex); + } + TimeLogger.DetailedDrawTime(8); + } + + private void UpdateBGVisibility_FrontLayer( + int? targetBiomeOverride, + float? transitionAmountOverride) + { + int bgStyle = Main.bgStyle; + if (targetBiomeOverride.HasValue) + bgStyle = targetBiomeOverride.Value; + float layerTransitionSpeed = Main.backgroundLayerTransitionSpeed; + if (transitionAmountOverride.HasValue) + layerTransitionSpeed = transitionAmountOverride.Value; + for (int index = 0; index < Main.bgAlphaFrontLayer.Length; ++index) + { + if (bgStyle == index) + { + Main.bgAlphaFrontLayer[index] += layerTransitionSpeed; + if ((double) Main.bgAlphaFrontLayer[index] > 1.0) + Main.bgAlphaFrontLayer[index] = 1f; + } + else + { + Main.bgAlphaFrontLayer[index] -= layerTransitionSpeed; + if ((double) Main.bgAlphaFrontLayer[index] < 0.0) + Main.bgAlphaFrontLayer[index] = 0.0f; + } + } + } + + private void UpdateBGVisibility_BackLayer( + int? targetBiomeOverride, + float? transitionAmountOverride) + { + int bgStyle = Main.bgStyle; + if (targetBiomeOverride.HasValue) + bgStyle = targetBiomeOverride.Value; + double layerTransitionSpeed = (double) Main.backgroundLayerTransitionSpeed; + if (transitionAmountOverride.HasValue) + { + double num = (double) transitionAmountOverride.Value; + } + switch (bgStyle) + { + case 1: + case 5: + this.DrawBG_ModifyBGFarBackLayerAlpha(2, transitionAmountOverride: transitionAmountOverride); + break; + case 2: + this.DrawBG_ModifyBGFarBackLayerAlpha(1, transitionAmountOverride: transitionAmountOverride); + break; + case 3: + if (WorldGen.jungleBG == 5) + { + this.DrawBG_ModifyBGFarBackLayerAlpha(13, transitionAmountOverride: transitionAmountOverride); + break; + } + this.DrawBG_ModifyBGFarBackLayerAlpha(0, transitionAmountOverride: transitionAmountOverride); + break; + case 4: + this.DrawBG_ModifyBGFarBackLayerAlpha(3, transitionAmountOverride: transitionAmountOverride); + break; + case 6: + if (WorldGen.hallowBG == 3) + { + this.DrawBG_ModifyBGFarBackLayerAlpha(6, transitionAmountOverride: transitionAmountOverride); + break; + } + this.DrawBG_ModifyBGFarBackLayerAlpha(2, transitionAmountOverride: transitionAmountOverride); + break; + case 7: + this.DrawBG_ModifyBGFarBackLayerAlpha(4, transitionAmountOverride: transitionAmountOverride); + break; + case 8: + this.DrawBG_ModifyBGFarBackLayerAlpha(5, transitionAmountOverride: transitionAmountOverride); + break; + case 9: + this.DrawBG_ModifyBGFarBackLayerAlpha(0, new int?(6), transitionAmountOverride); + break; + case 10: + case 11: + case 12: + this.DrawBG_ModifyBGFarBackLayerAlpha(bgStyle, transitionAmountOverride: transitionAmountOverride); + break; + default: + this.DrawBG_ModifyBGFarBackLayerAlpha(0, transitionAmountOverride: transitionAmountOverride); + break; + } + } + + public static int GetPreferredBGStyleForPlayer() + { + int bgStyle = Main.bgStyle; + int num1 = (int) (((double) Main.screenPosition.X + (double) (Main.screenWidth / 2)) / 16.0); + int num2; + if (WorldGen.oceanDepths((int) ((double) Main.screenPosition.X + (double) (Main.screenWidth / 2)) / 16, (int) ((double) Main.screenPosition.Y + (double) (Main.screenHeight / 2)) / 16)) + num2 = !Main.player[Main.myPlayer].ZoneHallow ? (!Main.player[Main.myPlayer].ZoneCorrupt ? (!Main.player[Main.myPlayer].ZoneCrimson ? (Main.SceneMetrics.HoneyBlockCount <= 400 ? 4 : 3) : 8) : (Main.SceneMetrics.BloodTileCount <= Main.SceneMetrics.EvilTileCount ? 1 : 8)) : 6; + else if (Main.player[Main.myPlayer].ZoneGlowshroom) + num2 = 9; + else if (Main.player[Main.myPlayer].ZoneDesert) + num2 = !Main.player[Main.myPlayer].ZoneCorrupt ? (!Main.player[Main.myPlayer].ZoneCrimson ? (!Main.player[Main.myPlayer].ZoneHallow ? 2 : 5) : 5) : 5; + else if (Main.player[Main.myPlayer].ZoneHallow) + num2 = 6; + else if (Main.player[Main.myPlayer].ZoneCorrupt) + num2 = Main.SceneMetrics.BloodTileCount <= Main.SceneMetrics.EvilTileCount ? 1 : 8; + else if (Main.player[Main.myPlayer].ZoneCrimson) + num2 = 8; + else if (Main.player[Main.myPlayer].ZoneJungle) + num2 = 3; + else if (Main.player[Main.myPlayer].ZoneSnow) + { + num2 = 7; + } + else + { + num2 = 0; + if (num1 >= Main.treeX[0]) + { + if (WorldGen.treeBG1 != WorldGen.treeBG2 && num1 < Main.treeX[1]) + num2 = 10; + else if (WorldGen.treeBG1 != WorldGen.treeBG3 && num1 < Main.treeX[2]) + num2 = 11; + else if (WorldGen.treeBG1 != WorldGen.treeBG4) + num2 = 12; + } + } + return num2; + } + + private void DrawBG_ModifyBGFarBackLayerAlpha( + int desiredBG, + int? desiredBG2 = null, + float? transitionAmountOverride = null) + { + float layerTransitionSpeed = Main.backgroundLayerTransitionSpeed; + if (transitionAmountOverride.HasValue) + layerTransitionSpeed = transitionAmountOverride.Value; + for (int index = 0; index < Main.bgAlphaFarBackLayer.Length; ++index) + { + int num1 = desiredBG == index ? 1 : 0; + int num2; + if (desiredBG2.HasValue) + { + int? nullable = desiredBG2; + int num3 = index; + num2 = nullable.GetValueOrDefault() == num3 & nullable.HasValue ? 1 : 0; + } + else + num2 = 0; + bool flag = (num1 | num2) != 0; + Main.bgAlphaFarBackLayer[index] = MathHelper.Clamp(Main.bgAlphaFarBackLayer[index] + (flag ? layerTransitionSpeed : -layerTransitionSpeed), 0.0f, 1f); + } + } + + public void DrawInfernoRings() + { + for (int index1 = 0; index1 < (int) byte.MaxValue; ++index1) + { + if (Main.player[index1].active && !Main.player[index1].outOfRange && Main.player[index1].inferno && !Main.player[index1].dead) + { + this.LoadFlameRing(); + float num1 = 0.1f; + float num2 = 0.9f; + if (!Main.gamePaused && this.IsActive) + Main.player[index1].flameRingScale += 0.004f; + float flameRingScale; + if ((double) Main.player[index1].flameRingScale < 1.0) + { + flameRingScale = Main.player[index1].flameRingScale; + } + else + { + Main.player[index1].flameRingScale = 0.8f; + flameRingScale = Main.player[index1].flameRingScale; + } + if (!Main.gamePaused && this.IsActive) + Main.player[index1].flameRingRot += 0.05f; + if ((double) Main.player[index1].flameRingRot > 6.28318548202515) + Main.player[index1].flameRingRot -= 6.283185f; + if ((double) Main.player[index1].flameRingRot < -6.28318548202515) + Main.player[index1].flameRingRot += 6.283185f; + for (int index2 = 0; index2 < 3; ++index2) + { + float scale = flameRingScale + num1 * (float) index2; + if ((double) scale > 1.0) + scale -= num1 * 2f; + float num3 = MathHelper.Lerp(0.8f, 0.0f, Math.Abs(scale - num2) * 10f); + Main.spriteBatch.Draw(TextureAssets.FlameRing.Value, Main.player[index1].Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 400 * index2, 400, 400)), new Microsoft.Xna.Framework.Color(num3, num3, num3, num3 / 2f), Main.player[index1].flameRingRot + 1.047198f * (float) index2, new Vector2(200f, 200f), scale, SpriteEffects.None, 0.0f); + } + } + } + } + + private static void UpdateInvasion() + { + if (Main.invasionType <= 0) + return; + if (Main.invasionSize <= 0) + { + switch (Main.invasionType) + { + case 1: + NPC.SetEventFlagCleared(ref NPC.downedGoblins, 0); + if (Main.netMode == 2) + NetMessage.SendData(7); + AchievementsHelper.NotifyProgressionEvent(10); + break; + case 2: + NPC.SetEventFlagCleared(ref NPC.downedFrost, 1); + AchievementsHelper.NotifyProgressionEvent(12); + break; + case 3: + NPC.SetEventFlagCleared(ref NPC.downedPirates, 2); + AchievementsHelper.NotifyProgressionEvent(11); + break; + case 4: + NPC.SetEventFlagCleared(ref NPC.downedMartians, 3); + AchievementsHelper.NotifyProgressionEvent(13); + break; + } + Main.InvasionWarning(); + Main.invasionType = 0; + Main.invasionDelay = 0; + } + if (Main.invasionX == (double) Main.spawnTileX) + return; + float dayRate = (float) Main.dayRate; + if (Main.invasionX > (double) Main.spawnTileX) + { + Main.invasionX -= (double) dayRate; + if (Main.invasionX <= (double) Main.spawnTileX) + { + Main.invasionX = (double) Main.spawnTileX; + Main.InvasionWarning(); + } + else if ((double) dayRate > 0.0) + --Main.invasionWarn; + } + else if (Main.invasionX < (double) Main.spawnTileX) + { + Main.invasionX += (double) dayRate; + if (Main.invasionX >= (double) Main.spawnTileX) + { + Main.invasionX = (double) Main.spawnTileX; + Main.InvasionWarning(); + } + else if ((double) dayRate > 0.0) + --Main.invasionWarn; + } + if (Main.invasionWarn > 0) + return; + Main.invasionWarn = 3600; + Main.InvasionWarning(); + } + + private static void InvasionWarning() + { + LocalizedText empty = LocalizedText.Empty; + LocalizedText localizedText; + if (Main.invasionSize <= 0) + { + switch (Main.invasionType) + { + case 2: + localizedText = Lang.misc[4]; + break; + case 3: + localizedText = Lang.misc[24]; + break; + case 4: + localizedText = Lang.misc[42]; + break; + default: + localizedText = empty = Lang.misc[0]; + break; + } + } + else if (Main.invasionX < (double) Main.spawnTileX) + { + switch (Main.invasionType) + { + case 2: + localizedText = Lang.misc[5]; + break; + case 3: + localizedText = Lang.misc[25]; + break; + case 4: + localizedText = LocalizedText.Empty; + break; + default: + localizedText = empty = Lang.misc[1]; + break; + } + } + else if (Main.invasionX > (double) Main.spawnTileX) + { + switch (Main.invasionType) + { + case 2: + localizedText = Lang.misc[6]; + break; + case 3: + localizedText = Lang.misc[26]; + break; + case 4: + localizedText = LocalizedText.Empty; + break; + default: + localizedText = empty = Lang.misc[2]; + break; + } + } + else + { + switch (Main.invasionType) + { + case 2: + localizedText = Lang.misc[7]; + break; + case 3: + localizedText = Lang.misc[27]; + break; + case 4: + localizedText = Lang.misc[41]; + break; + default: + localizedText = empty = Lang.misc[3]; + break; + } + } + switch (Main.netMode) + { + case 0: + Main.NewText(localizedText.ToString(), (byte) 175, (byte) 75); + break; + case 2: + if (!(localizedText.Value != "")) + break; + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(localizedText.Key), new Microsoft.Xna.Framework.Color(175, 75, (int) byte.MaxValue)); + break; + } + } + + public static bool CanStartInvasion(int type = 1, bool ignoreDelay = false) + { + if (Main.invasionType != 0 || Main.invasionDelay != 0 && !ignoreDelay) + return false; + int num = 0; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && Main.player[index].statLifeMax >= 200) + ++num; + } + return num > 0; + } + + public static void StartInvasion(int type = 1) + { + if (Main.invasionType != 0 && Main.invasionSize == 0) + Main.invasionType = 0; + if (Main.invasionType != 0) + return; + int num = 0; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && Main.player[index].statLifeMax >= 200) + ++num; + } + if (num <= 0) + return; + Main.invasionType = type; + Main.invasionSize = 80 + 40 * num; + if (type == 3) + Main.invasionSize += 40 + 20 * num; + if (type == 4) + Main.invasionSize = 160 + 40 * num; + Main.invasionSizeStart = Main.invasionSize; + Main.invasionProgress = 0; + Main.invasionProgressIcon = type + 3; + Main.invasionProgressWave = 0; + Main.invasionProgressMax = Main.invasionSizeStart; + Main.invasionWarn = 0; + if (type == 4) + { + Main.invasionX = (double) (Main.spawnTileX - 1); + Main.invasionWarn = 2; + } + else if (Main.rand.Next(2) == 0) + Main.invasionX = 0.0; + else + Main.invasionX = (double) Main.maxTilesX; + } + + public static void FakeLoadInvasionStart() + { + int num1 = 0; + int num2 = 0; + switch (Main.invasionType) + { + case 1: + case 2: + num1 = 80; + num2 = 40; + break; + case 3: + num1 = 120; + num2 = 60; + break; + case 4: + num1 = 160; + num2 = 40; + break; + } + int num3 = (int) Math.Ceiling((double) (Main.invasionSize - num1) / (double) num2); + Main.invasionSizeStart = num1; + if (num3 <= 0) + return; + Main.invasionSizeStart += num3 * num2; + } + + private static void UpdateClient() + { + if (Main.myPlayer == (int) byte.MaxValue) + Netplay.Disconnect = true; + ++Main.netPlayCounter; + if (Main.netPlayCounter > 3600) + Main.netPlayCounter = 0; + if (Main.netPlayCounter % 420 == 0) + NetMessage.SendData(13, number: Main.myPlayer); + if (Main.netPlayCounter % 900 == 0) + { + NetMessage.SendData(36, number: Main.myPlayer); + NetMessage.SendData(16, number: Main.myPlayer); + NetMessage.SendData(40, number: Main.myPlayer); + } + if (Netplay.Connection.IsActive) + { + ++Netplay.Connection.TimeOutTimer; + if (!Main.stopTimeOuts && Netplay.Connection.TimeOutTimer > 7200) + { + Main.statusText = Lang.inter[43].Value; + Netplay.Disconnect = true; + } + } + for (int whoAmI = 0; whoAmI < 400; ++whoAmI) + { + if (Main.item[whoAmI].active && Main.item[whoAmI].playerIndexTheItemIsReservedFor == Main.myPlayer) + Main.item[whoAmI].FindOwner(whoAmI); + } + } + + private static void UpdateServer() + { + ++Main.netPlayCounter; + if (Main.netPlayCounter % 3600 == 0) + { + NetMessage.SendData(7); + Main.netPlayCounter = 0; + } + for (int index = 0; index < Main.maxNetPlayers; ++index) + { + if (Main.player[index].active && Netplay.Clients[index].IsActive) + Netplay.Clients[index].SpamUpdate(); + } + if (Math.IEEERemainder((double) Main.netPlayCounter, 900.0) == 0.0) + { + bool flag = true; + int number = Main.lastItemUpdate; + int num = 0; + while (flag) + { + ++number; + if (number >= 400) + number = 0; + ++num; + if (!Main.item[number].active || Main.item[number].playerIndexTheItemIsReservedFor == (int) byte.MaxValue) + NetMessage.SendData(21, number: number); + if (num >= Main.maxItemUpdates || number == Main.lastItemUpdate) + flag = false; + } + Main.lastItemUpdate = number; + } + for (int whoAmI = 0; whoAmI < 400; ++whoAmI) + { + Item obj = Main.item[whoAmI]; + if (obj.active && (obj.playerIndexTheItemIsReservedFor == (int) byte.MaxValue || !Main.player[obj.playerIndexTheItemIsReservedFor].active)) + obj.FindOwner(whoAmI); + } + for (int playerIndex = 0; playerIndex < (int) byte.MaxValue; ++playerIndex) + { + if (Netplay.Clients[playerIndex].IsActive) + { + ++Netplay.Clients[playerIndex].TimeOutTimer; + if (Netplay.Clients[playerIndex].State == 0) + Netplay.Clients[playerIndex].TimeOutTimer += 3; + if (!Main.stopTimeOuts && Netplay.Clients[playerIndex].TimeOutTimer > 7200) + { + Netplay.Clients[playerIndex].PendingTermination = true; + Netplay.Clients[playerIndex].PendingTerminationApproved = true; + } + } + if (Main.player[playerIndex].active) + RemoteClient.CheckSection(playerIndex, Main.player[playerIndex].position); + } + } + + public static void NewText(string newText, byte R = 255, byte G = 255, byte B = 255) + { + Main.chatMonitor.NewText(newText, R, G, B); + SoundEngine.PlaySound(12); + } + + public static void NewTextMultiline(string text, bool force = false, Microsoft.Xna.Framework.Color c = default (Microsoft.Xna.Framework.Color), int WidthLimit = -1) + { + Main.chatMonitor.NewTextMultiline(text, force, c, WidthLimit); + SoundEngine.PlaySound(12); + } + + public static void StopRain() + { + Main.rainTime = 0; + Main.raining = false; + Main.maxRaining = 0.0f; + } + + public static void StartRain() + { + int maxValue1 = 86400; + int maxValue2 = maxValue1 / 24; + int num1 = Main.rand.Next(maxValue2 * 8, maxValue1); + if (Main.rand.Next(3) == 0) + num1 += Main.rand.Next(0, maxValue2); + if (Main.rand.Next(4) == 0) + num1 += Main.rand.Next(0, maxValue2 * 2); + if (Main.rand.Next(5) == 0) + num1 += Main.rand.Next(0, maxValue2 * 2); + if (Main.rand.Next(6) == 0) + num1 += Main.rand.Next(0, maxValue2 * 3); + if (Main.rand.Next(7) == 0) + num1 += Main.rand.Next(0, maxValue2 * 4); + if (Main.rand.Next(8) == 0) + num1 += Main.rand.Next(0, maxValue2 * 5); + float num2 = 1f; + if (Main.rand.Next(2) == 0) + num2 += 0.05f; + if (Main.rand.Next(3) == 0) + num2 += 0.1f; + if (Main.rand.Next(4) == 0) + num2 += 0.15f; + if (Main.rand.Next(5) == 0) + num2 += 0.2f; + Main.rainTime = (int) ((double) num1 * (double) num2); + Main.ChangeRain(); + Main.raining = true; + } + + private static void ChangeRain() + { + float maxRaining = Main.maxRaining; + Main.maxRaining = (double) Main.cloudBGActive >= 1.0 || (double) Main.numClouds > 150.0 ? (Main.rand.Next(3) != 0 ? (float) Main.rand.Next(40, 91) * 0.01f : (float) Main.rand.Next(20, 91) * 0.01f) : ((double) Main.numClouds <= 100.0 ? (Main.rand.Next(3) != 0 ? (float) Main.rand.Next(5, 31) * 0.01f : (float) Main.rand.Next(5, 41) * 0.01f) : (Main.rand.Next(3) != 0 ? (float) Main.rand.Next(20, 61) * 0.01f : (float) Main.rand.Next(10, 71) * 0.01f)); + } + + public static void StartSlimeRain(bool announce = true) + { + if (Main.slimeRain) + return; + if (Main.netMode == 1) + { + Main.slimeRainTime = 54000.0; + Main.slimeRain = true; + SkyManager.Instance.Activate("Slime", new Vector2()); + } + else + { + if (Main.raining) + return; + if (Main.slimeRainTime <= 0.0) + Main.slimeRainTime = (double) Main.rand.Next(32400, 54000); + Main.slimeRain = true; + Main.slimeRainKillCount = 0; + if (Main.netMode == 0) + { + SkyManager.Instance.Activate("Slime", new Vector2()); + if (!announce) + return; + Main.slimeWarningTime = Main.slimeWarningDelay; + } + else + { + if (!announce) + return; + Main.slimeWarningTime = Main.slimeWarningDelay; + NetMessage.SendData(7); + } + } + } + + public static void StopSlimeRain(bool announce = true) + { + if (!Main.slimeRain) + return; + if (Main.netMode == 1) + { + Main.slimeRainTime = 0.0; + Main.slimeRain = false; + SkyManager.Instance.Deactivate("Slime"); + } + else + { + int num1 = 86400 * 7; + if (Main.hardMode) + { + int num2 = num1 * 2; + } + Main.slimeRainTime = (double) (-Main.rand.Next(3024, 6048) * 100); + Main.slimeRain = false; + if (Main.netMode == 0) + { + if (announce) + Main.slimeWarningTime = Main.slimeWarningDelay; + SkyManager.Instance.Deactivate("Slime"); + } + else + { + if (!announce) + return; + Main.slimeWarningTime = Main.slimeWarningDelay; + NetMessage.SendData(7); + } + } + } + + private static void UpdateTime() + { + if (LanternNight.LanternsUp) + { + Main.cloudBGActive = 0.0f; + if (Main.numClouds > 30) + Main.numClouds = 30; + } + if (Main.ladyBugRainBoost > 0) + Main.ladyBugRainBoost -= Main.dayRate; + if (Main.pumpkinMoon) + { + Main.bloodMoon = false; + Main.snowMoon = false; + } + if (Main.snowMoon) + Main.bloodMoon = false; + if (Main.netMode != 1 && !Main.gameMenu || Main.netMode == 2) + { + if (Main.slimeRainTime > 0.0) + { + Main.slimeRainTime -= (double) Main.dayRate; + if (Main.slimeRainTime <= 0.0) + Main.StopSlimeRain(); + } + else if (Main.slimeRainTime < 0.0) + { + Main.slimeRainTime += (double) Main.dayRate; + if (Main.slimeRainTime > 0.0) + Main.slimeRainTime = 0.0; + } + if (Main.raining) + { + if (!CreativePowerManager.Instance.GetPower().Enabled) + { + if (LanternNight.LanternsUp) + { + Main.StopRain(); + } + else + { + Main.rainTime -= Main.dayRate; + if (Main.dayRate > 0) + { + int num = 86400 / Main.dayRate / 24; + if (Main.rainTime <= 0) + Main.StopRain(); + else if (Main.rand.Next(num * 2) == 0) + Main.ChangeRain(); + } + } + } + } + else if (!Main.slimeRain && !LanternNight.LanternsUp && !LanternNight.NextNightIsLanternNight) + { + int maxValue1 = 86400 / (Main.dayRate != 0 ? Main.dayRate : 1); + if (!CreativePowerManager.Instance.GetPower().Enabled) + { + if (Main.rand.Next((int) ((double) maxValue1 * 5.75)) == 0) + Main.StartRain(); + else if ((double) Main.cloudBGActive >= 1.0 && Main.rand.Next((int) ((double) maxValue1 * 4.25)) == 0) + Main.StartRain(); + else if (Main.ladyBugRainBoost > 0 && Main.rand.Next(maxValue1) == 0) + Main.StartRain(); + } + if (!Main.raining && !NPC.BusyWithAnyInvasionOfSorts()) + { + int maxValue2 = (int) (1728000.0 / (double) Main.dayRate); + if (!NPC.downedSlimeKing) + maxValue2 /= 2; + if (Main.hardMode) + maxValue2 = (int) ((double) maxValue2 * 1.5); + bool flag = false; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && Main.player[index].statLifeMax > 140 && Main.player[index].statDefense > 8) + flag = true; + } + if (!flag) + maxValue2 *= 5; + if (Main.dayRate > 0 && maxValue2 > 0 && (flag || Main.expertMode) && Main.rand.Next(maxValue2) == 0) + Main.StartSlimeRain(); + } + } + } + if ((double) Main.maxRaining != (double) Main.oldMaxRaining) + { + if (Main.netMode == 2) + NetMessage.SendData(7); + Main.oldMaxRaining = Main.maxRaining; + } + Main.UpdateTimeRate(); + Main.time += (double) Main.dayRate; + CultistRitual.UpdateTime(); + BirthdayParty.UpdateTime(); + LanternNight.UpdateTime(); + Sandstorm.UpdateTime(); + DD2Event.UpdateTime(); + WorldGen.mysticLogsEvent.UpdateTime(); + Main.PylonSystem.Update(); + if (NPC.MoonLordCountdown > 0) + { + float intensity = MathHelper.Clamp((float) Math.Sin((double) NPC.MoonLordCountdown / 60.0 * 0.5) * 2f, 0.0f, 1f) * (float) (0.75 - 0.5 * ((double) NPC.MoonLordCountdown / 3600.0)); + if (!Terraria.Graphics.Effects.Filters.Scene["MoonLordShake"].IsActive()) + Terraria.Graphics.Effects.Filters.Scene.Activate("MoonLordShake", Main.player[Main.myPlayer].position); + Terraria.Graphics.Effects.Filters.Scene["MoonLordShake"].GetShader().UseIntensity(intensity); + } + else if (Terraria.Graphics.Effects.Filters.Scene["MoonLordShake"].IsActive()) + Terraria.Graphics.Effects.Filters.Scene.Deactivate("MoonLordShake"); + if (NPC.MoonLordCountdown > 0) + { + --NPC.MoonLordCountdown; + if (NPC.MoonLordCountdown <= 0 && Main.netMode != 1) + NPC.SpawnOnPlayer((int) Player.FindClosest(new Vector2((float) (Main.maxTilesX / 2), (float) Main.worldSurface / 2f) * 16f, 0, 0), 398); + } + if (NPC.taxCollector && Main.netMode != 2 && !Main.gameMenu) + { + Main.player[Main.myPlayer].taxTimer += Main.dayRate; + if (Main.player[Main.myPlayer].taxTimer >= Player.taxRate) + { + Main.player[Main.myPlayer].taxTimer -= Player.taxRate; + Main.player[Main.myPlayer].CollectTaxes(); + } + } + if (Main.netMode != 1) + Main.UpdateSlimeRainWarning(); + if (Main.netMode != 1) + { + if (NPC.travelNPC) + { + if (!Main.dayTime || Main.time > 48600.0) + WorldGen.UnspawnTravelNPC(); + } + else if (!Main.fastForwardTime && Main.dayTime && Main.time < 27000.0) + { + int maxValue = (int) (27000.0 / (double) Main.dayRate) * 4; + if (Main.rand.Next(maxValue) == 0) + { + int num = 0; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].townNPC && Main.npc[index].type != 37 && Main.npc[index].type != 453) + ++num; + } + if (num >= 2) + WorldGen.SpawnTravelNPC(); + } + } + NPC.travelNPC = false; + } + bool start = Main.ShouldNormalEventsBeAbleToStart(); + if (!Main.dayTime) + { + Main.eclipse = false; + if (!Main.fastForwardTime && !start) + { + if (WorldGen.spawnEye && Main.netMode != 1 && Main.time > 4860.0) + { + for (int plr = 0; plr < (int) byte.MaxValue; ++plr) + { + if (Main.player[plr].active && !Main.player[plr].dead && (double) Main.player[plr].position.Y < Main.worldSurface * 16.0) + { + NPC.SpawnOnPlayer(plr, 4); + WorldGen.spawnEye = false; + break; + } + } + } + if (WorldGen.spawnHardBoss > 0 && Main.netMode != 1 && Main.time > 4860.0) + { + bool flag = false; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].boss) + flag = true; + } + if (!flag) + { + for (int plr = 0; plr < (int) byte.MaxValue; ++plr) + { + if (Main.player[plr].active && !Main.player[plr].dead && (double) Main.player[plr].position.Y < Main.worldSurface * 16.0) + { + switch (WorldGen.spawnHardBoss) + { + case 1: + NPC.SpawnOnPlayer(plr, 134); + goto label_102; + case 2: + NPC.SpawnOnPlayer(plr, 125); + NPC.SpawnOnPlayer(plr, 126); + goto label_102; + case 3: + NPC.SpawnOnPlayer(plr, (int) sbyte.MaxValue); + goto label_102; + default: + goto label_102; + } + } + } + } +label_102: + WorldGen.spawnHardBoss = 0; + } + } + if (Main.time > 32400.0) + Main.UpdateTime_StartDay(ref start); + Main.HandleMeteorFall(); + } + else + { + WorldGen.spawnHardBoss = 0; + WorldGen.spawnEye = false; + Main.bloodMoon = false; + Main.stopMoonEvent(); + if (Main.time > 54000.0) + Main.UpdateTime_StartNight(ref start); + Main.UpdateTime_SpawnTownNPCs(); + } + } + + public static void SkipToTime(int timeToSet, bool setIsDayTime) + { + double time = Main.time; + int num = Main.dayTime ? 1 : 0; + while (setIsDayTime != Main.dayTime) + { + bool start = Main.ShouldNormalEventsBeAbleToStart(); + if (Main.dayTime) + Main.UpdateTime_StartNight(ref start); + else + Main.UpdateTime_StartDay(ref start); + } + Main.time = (double) timeToSet; + if (Main.netMode != 2) + return; + NetMessage.TrySendData(7); + } + + public static bool ShouldNormalEventsBeAbleToStart() => NPC.LunarApocalypseIsUp || NPC.AnyNPCs(398) || NPC.MoonLordCountdown > 0 || LanternNight.LanternsUp; + + public static void UpdateTime_StartNight(ref bool stopEvents) + { + NPC.ResetBadgerHatTime(); + NPC.freeCake = false; + Star.NightSetup(); + NPC.setFireFlyChance(); + BirthdayParty.CheckNight(); + LanternNight.CheckNight(); + WorldGen.mysticLogsEvent.StartNight(); + WorldGen.prioritizedTownNPCType = 0; + Main.checkForSpawns = 0; + if (Main.rand.Next(50) == 0 && Main.netMode != 1 && NPC.downedBoss2) + WorldGen.spawnMeteor = true; + if (LanternNight.LanternsUp) + stopEvents = true; + if (Main.eclipse && Main.netMode != 1) + AchievementsHelper.NotifyProgressionEvent(3); + Main.eclipse = false; + if (Main.netMode != 1) + AchievementsHelper.NotifyProgressionEvent(0); + if (!Main.fastForwardTime && !stopEvents) + { + if (!NPC.downedBoss1 && Main.netMode != 1) + { + bool flag = false; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && Main.player[index].statLifeMax >= 200 && Main.player[index].statDefense > 10) + { + flag = true; + break; + } + } + if (flag && Main.rand.Next(3) == 0) + { + int num = 0; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].townNPC) + ++num; + } + if (num >= 4) + { + WorldGen.spawnEye = true; + switch (Main.netMode) + { + case 0: + Main.NewText(Lang.misc[9].Value, (byte) 50, B: (byte) 130); + break; + case 2: + ChatHelper.BroadcastChatMessage(Lang.misc[9].ToNetworkText(), new Microsoft.Xna.Framework.Color(50, (int) byte.MaxValue, 130)); + break; + } + } + } + } + if (Main.netMode != 1 && !Main.pumpkinMoon && !DD2Event.Ongoing && !Main.snowMoon && WorldGen.altarCount > 0 && Main.hardMode && !WorldGen.spawnEye && Main.rand.Next(10) == 0) + { + bool flag = false; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].boss) + flag = true; + } + if (!flag && (!NPC.downedMechBoss1 || !NPC.downedMechBoss2 || !NPC.downedMechBoss3)) + { + for (int index = 0; index < 1000; ++index) + { + int num = Main.rand.Next(3) + 1; + if (num == 1 && !NPC.downedMechBoss1) + { + WorldGen.spawnHardBoss = num; + switch (Main.netMode) + { + case 0: + Main.NewText(Lang.misc[28].Value, (byte) 50, B: (byte) 130); + goto label_47; + case 2: + ChatHelper.BroadcastChatMessage(Lang.misc[28].ToNetworkText(), new Microsoft.Xna.Framework.Color(50, (int) byte.MaxValue, 130)); + goto label_47; + default: + goto label_47; + } + } + else if (num == 2 && !NPC.downedMechBoss2) + { + WorldGen.spawnHardBoss = num; + switch (Main.netMode) + { + case 0: + Main.NewText(Lang.misc[29].Value, (byte) 50, B: (byte) 130); + goto label_47; + case 2: + ChatHelper.BroadcastChatMessage(Lang.misc[29].ToNetworkText(), new Microsoft.Xna.Framework.Color(50, (int) byte.MaxValue, 130)); + goto label_47; + default: + goto label_47; + } + } + else if (num == 3 && !NPC.downedMechBoss3) + { + WorldGen.spawnHardBoss = num; + switch (Main.netMode) + { + case 0: + Main.NewText(Lang.misc[30].Value, (byte) 50, B: (byte) 130); + goto label_47; + case 2: + ChatHelper.BroadcastChatMessage(Lang.misc[30].ToNetworkText(), new Microsoft.Xna.Framework.Color(50, (int) byte.MaxValue, 130)); + goto label_47; + default: + goto label_47; + } + } + } + } + } +label_47: + if (!WorldGen.spawnEye && Main.moonPhase != 4 && Main.rand.Next(9) == 0 && Main.netMode != 1) + { + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && Main.player[index].statLifeMax > 120) + { + Main.bloodMoon = true; + break; + } + } + if (Main.bloodMoon) + { + AchievementsHelper.NotifyProgressionEvent(4); + switch (Main.netMode) + { + case 0: + Main.NewText(Lang.misc[8].Value, (byte) 50, B: (byte) 130); + break; + case 2: + ChatHelper.BroadcastChatMessage(Lang.misc[8].ToNetworkText(), new Microsoft.Xna.Framework.Color(50, (int) byte.MaxValue, 130)); + break; + } + } + } + } + Main.time = 0.0; + Main.dayTime = false; + if (Main.netMode != 2) + return; + NetMessage.SendData(7); + } + + public static void UpdateTime_StartDay(ref bool stopEvents) + { + WorldGen.numTreeShakes = 0; + if (Main.fastForwardTime) + { + Main.fastForwardTime = false; + Main.UpdateTimeRate(); + } + Main.AnglerQuestSwap(); + BirthdayParty.CheckMorning(); + LanternNight.CheckMorning(); + if (Main.invasionDelay > 0) + --Main.invasionDelay; + WorldGen.prioritizedTownNPCType = 0; + Main.checkForSpawns = 0; + Main.time = 0.0; + if (Main.bloodMoon && Main.netMode != 1) + AchievementsHelper.NotifyProgressionEvent(5); + Main.bloodMoon = false; + Main.CheckForMoonEventsStartingTemporarySeasons(); + Main.checkXMas(); + Main.checkHalloween(); + Main.stopMoonEvent(); + Main.dayTime = true; + if (Main.sundialCooldown > 0) + --Main.sundialCooldown; + ++Main.moonPhase; + if (Main.moonPhase >= 8) + Main.moonPhase = 0; + if (Main.drunkWorld && Main.netMode != 1) + WorldGen.crimson = !WorldGen.crimson; + if (Main.netMode == 2) + NetMessage.SendData(7); + if (Main.netMode == 1) + return; + AchievementsHelper.NotifyProgressionEvent(1); + if (stopEvents) + return; + if (Main.hardMode && NPC.downedMechBossAny && Main.rand.Next(20) == 0) + { + Main.eclipse = true; + AchievementsHelper.NotifyProgressionEvent(2); + if (Main.eclipse) + { + if (Main.netMode == 0) + Main.NewText(Lang.misc[20].Value, (byte) 50, B: (byte) 130); + else if (Main.netMode == 2) + ChatHelper.BroadcastChatMessage(Lang.misc[20].ToNetworkText(), new Microsoft.Xna.Framework.Color(50, (int) byte.MaxValue, 130)); + } + if (Main.netMode != 2) + return; + NetMessage.SendData(7); + } + else + { + if (Main.snowMoon || Main.pumpkinMoon || DD2Event.Ongoing) + return; + if (WorldGen.shadowOrbSmashed) + { + if (!NPC.downedGoblins) + { + if (Main.rand.Next(3) == 0) + Main.StartInvasion(); + } + else if (Main.hardMode && Main.rand.Next(60) == 0 || !Main.hardMode && Main.rand.Next(30) == 0) + Main.StartInvasion(); + } + if (Main.invasionType != 0 || !Main.hardMode || WorldGen.altarCount <= 0 || (!NPC.downedPirates || Main.rand.Next(60) != 0) && (NPC.downedPirates || Main.rand.Next(30) != 0)) + return; + Main.StartInvasion(3); + } + } + + private static void HandleMeteorFall() + { + if (Main.netMode != 1 && WorldGen.spawnMeteor) + { + if (Main.time < 15000.0) + { + Main._canShowMeteorFall = true; + } + else + { + if (Main._canShowMeteorFall && Main.time <= 16200.0) + Main.AmbienceServer.ForceEntitySpawn(new AmbienceServer.AmbienceSpawnInfo() + { + skyEntityType = SkyEntityType.Meteor, + targetPlayer = -1 + }); + Main._canShowMeteorFall = false; + } + } + if (Main.time <= 16200.0 || !WorldGen.spawnMeteor) + return; + WorldGen.spawnMeteor = false; + WorldGen.dropMeteor(); + } + + private static void UpdateSlimeRainWarning() + { + if (Main.slimeWarningTime <= 0) + return; + --Main.slimeWarningTime; + if (Main.slimeWarningTime > 0) + return; + if (Main.netMode == 0) + { + if (Main.slimeRainTime > 0.0) + Main.NewText(Lang.gen[74].Value, (byte) 50, B: (byte) 130); + else + Main.NewText(Lang.gen[75].Value, (byte) 50, B: (byte) 130); + } + else if (Main.slimeRainTime > 0.0) + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(Lang.gen[74].Key), new Microsoft.Xna.Framework.Color(50, (int) byte.MaxValue, 130)); + else + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(Lang.gen[75].Key), new Microsoft.Xna.Framework.Color(50, (int) byte.MaxValue, 130)); + } + + public static BestiaryUnlockProgressReport GetBestiaryProgressReport() + { + float num1 = 0.0f; + int num2 = 0; + List entries = Main.BestiaryDB.Entries; + for (int index = 0; index < entries.Count; ++index) + { + int num3 = entries[index].UIInfoProvider.GetEntryUICollectionInfo().UnlockState > BestiaryEntryUnlockState.NotKnownAtAll_0 ? 1 : 0; + ++num2; + num1 += (float) num3; + } + return new BestiaryUnlockProgressReport() + { + EntriesTotal = num2, + CompletionAmountTotal = num1 + }; + } + + private static void UpdateTime_SpawnTownNPCs() + { + int worldUpdateRate = WorldGen.GetWorldUpdateRate(); + if (Main.netMode == 1 || worldUpdateRate <= 0) + return; + ++Main.checkForSpawns; + if (Main.checkForSpawns < 7200 / worldUpdateRate) + return; + Main.checkForSpawns = 0; + int num1 = 0; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active) + ++num1; + } + for (int index = 0; index < 663; ++index) + Main.townNPCCanSpawn[index] = false; + WorldGen.prioritizedTownNPCType = 0; + int num2 = 0; + int num3 = 0; + int num4 = 0; + int num5 = 0; + int num6 = 0; + int num7 = 0; + int num8 = 0; + int num9 = 0; + int num10 = 0; + int num11 = 0; + int num12 = 0; + int num13 = 0; + int num14 = 0; + int num15 = 0; + int num16 = 0; + int num17 = 0; + int num18 = 0; + int num19 = 0; + int num20 = 0; + int num21 = 0; + int num22 = 0; + int num23 = 0; + int num24 = 0; + int num25 = 0; + int num26 = 0; + int num27 = 0; + int num28 = 0; + int num29 = 0; + int num30 = 0; + int num31 = 0; + for (int npc = 0; npc < 200; ++npc) + { + if (Main.npc[npc].active && Main.npc[npc].townNPC) + { + if (Main.npc[npc].type != 368 && Main.npc[npc].type != 37 && Main.npc[npc].type != 453 && !Main.npc[npc].homeless) + WorldGen.QuickFindHome(npc); + if (Main.npc[npc].type == 37) + ++num7; + if (Main.npc[npc].type == 17) + ++num2; + if (Main.npc[npc].type == 18) + ++num3; + if (Main.npc[npc].type == 19) + ++num5; + if (Main.npc[npc].type == 20) + ++num4; + if (Main.npc[npc].type == 22) + ++num6; + if (Main.npc[npc].type == 38) + ++num8; + if (Main.npc[npc].type == 54) + ++num9; + if (Main.npc[npc].type == 107) + ++num11; + if (Main.npc[npc].type == 108) + ++num10; + if (Main.npc[npc].type == 124) + ++num12; + if (Main.npc[npc].type == 142) + ++num13; + if (Main.npc[npc].type == 160) + ++num14; + if (Main.npc[npc].type == 178) + ++num15; + if (Main.npc[npc].type == 207) + ++num16; + if (Main.npc[npc].type == 208) + ++num17; + if (Main.npc[npc].type == 209) + ++num18; + if (Main.npc[npc].type == 227) + ++num19; + if (Main.npc[npc].type == 228) + ++num20; + if (Main.npc[npc].type == 229) + ++num21; + if (Main.npc[npc].type == 353) + ++num22; + if (Main.npc[npc].type == 369) + ++num23; + if (Main.npc[npc].type == 441) + ++num24; + if (Main.npc[npc].type == 550) + ++num25; + if (Main.npc[npc].type == 588) + ++num26; + if (Main.npc[npc].type == 633) + ++num27; + if (Main.npc[npc].type == 637) + ++num28; + if (Main.npc[npc].type == 638) + ++num29; + if (Main.npc[npc].type == 656) + ++num30; + ++num31; + } + } + if (WorldGen.prioritizedTownNPCType != 0) + return; + int num32 = 0; + bool flag1 = false; + int num33 = 0; + bool flag2 = false; + bool flag3 = false; + bool flag4 = false; + BestiaryUnlockProgressReport bestiaryProgressReport = Main.GetBestiaryProgressReport(); + for (int index1 = 0; index1 < (int) byte.MaxValue; ++index1) + { + if (Main.player[index1].active) + { + for (int index2 = 0; index2 < 58; ++index2) + { + if (Main.player[index1].inventory[index2] != null && Main.player[index1].inventory[index2].stack > 0) + { + if (num32 < 2000000000) + { + if (Main.player[index1].inventory[index2].type == 71) + num32 += Main.player[index1].inventory[index2].stack; + if (Main.player[index1].inventory[index2].type == 72) + num32 += Main.player[index1].inventory[index2].stack * 100; + if (Main.player[index1].inventory[index2].type == 73) + num32 += Main.player[index1].inventory[index2].stack * 10000; + if (Main.player[index1].inventory[index2].type == 74) + num32 += Main.player[index1].inventory[index2].stack * 1000000; + } + if (Main.player[index1].inventory[index2].ammo == AmmoID.Bullet || Main.player[index1].inventory[index2].useAmmo == AmmoID.Bullet) + flag2 = true; + if (ItemID.Sets.ItemsThatCountAsBombsForDemolitionistToSpawn[Main.player[index1].inventory[index2].type]) + flag3 = true; + if (Main.player[index1].inventory[index2].dye > (byte) 0 || Main.player[index1].inventory[index2].type >= 1107 && Main.player[index1].inventory[index2].type <= 1120 || Main.player[index1].inventory[index2].type >= 3385 && Main.player[index1].inventory[index2].type <= 3388) + flag4 = true; + } + } + int num34 = Main.player[index1].statLifeMax / 20; + if (num34 > 5) + flag1 = true; + num33 += num34; + if (!flag4) + { + for (int index3 = 0; index3 < 3; ++index3) + { + if (Main.player[index1].dye[index3] != null && Main.player[index1].dye[index3].stack > 0 && Main.player[index1].dye[index3].dye > (byte) 0) + flag4 = true; + } + } + } + } + if (!NPC.downedBoss3 && num7 == 0) + { + int index = NPC.NewNPC(Main.dungeonX * 16 + 8, Main.dungeonY * 16, 37); + Main.npc[index].homeless = false; + Main.npc[index].homeTileX = Main.dungeonX; + Main.npc[index].homeTileY = Main.dungeonY; + } + bool flag5 = false; + if (Main.rand.Next(40) == 0) + flag5 = true; + if (num6 < 1) + Main.townNPCCanSpawn[22] = true; + if ((double) num32 > 5000.0 && num2 < 1) + Main.townNPCCanSpawn[17] = true; + if (flag1 && num3 < 1 && num2 > 0) + Main.townNPCCanSpawn[18] = true; + if (flag2 && num5 < 1) + Main.townNPCCanSpawn[19] = true; + if ((NPC.downedBoss1 || NPC.downedBoss2 || NPC.downedBoss3) && num4 < 1) + Main.townNPCCanSpawn[20] = true; + if (flag3 && num2 > 0 && num8 < 1) + Main.townNPCCanSpawn[38] = true; + if (NPC.savedStylist && num22 < 1) + Main.townNPCCanSpawn[353] = true; + if (NPC.savedAngler && num23 < 1) + Main.townNPCCanSpawn[369] = true; + if (NPC.downedBoss3 && num9 < 1) + Main.townNPCCanSpawn[54] = true; + if (NPC.savedGoblin && num11 < 1) + Main.townNPCCanSpawn[107] = true; + if (NPC.savedTaxCollector && num24 < 1) + Main.townNPCCanSpawn[441] = true; + if (NPC.savedWizard && num10 < 1) + Main.townNPCCanSpawn[108] = true; + if (NPC.savedMech && num12 < 1) + Main.townNPCCanSpawn[124] = true; + if (NPC.downedFrost && num13 < 1 && Main.xMas) + Main.townNPCCanSpawn[142] = true; + if (NPC.downedMechBossAny && num15 < 1) + Main.townNPCCanSpawn[178] = true; + if (flag4 && num16 < 1 && num31 >= 4) + Main.townNPCCanSpawn[207] = true; + if (NPC.downedQueenBee && num20 < 1) + Main.townNPCCanSpawn[228] = true; + if (NPC.downedPirates && num21 < 1) + Main.townNPCCanSpawn[229] = true; + if (num14 < 1 && Main.hardMode) + Main.townNPCCanSpawn[160] = true; + if (Main.hardMode && NPC.downedPlantBoss && num18 < 1) + Main.townNPCCanSpawn[209] = true; + if (num31 >= 8 && num19 < 1) + Main.townNPCCanSpawn[227] = true; + if (flag5 && num17 < 1 && num31 >= 14) + Main.townNPCCanSpawn[208] = true; + if (NPC.savedBartender && num25 < 1) + Main.townNPCCanSpawn[550] = true; + if (NPC.savedGolfer && num26 < 1) + Main.townNPCCanSpawn[588] = true; + if ((double) bestiaryProgressReport.CompletionPercent >= 0.100000001490116 && num27 < 1) + Main.townNPCCanSpawn[633] = true; + if (NPC.boughtCat && num28 < 1) + Main.townNPCCanSpawn[637] = true; + if (NPC.boughtDog && num29 < 1) + Main.townNPCCanSpawn[638] = true; + if (NPC.boughtBunny && num30 < 1) + Main.townNPCCanSpawn[656] = true; + int num35 = WorldGen.prioritizedTownNPCType; + if (num35 == 0 && NPC.boughtCat && num28 < 1) + num35 = 637; + if (num35 == 0 && NPC.boughtDog && num29 < 1) + num35 = 638; + if (num35 == 0 && NPC.boughtBunny && num30 < 1) + num35 = 656; + if (num35 == 0 && num6 < 1) + num35 = 22; + if (num35 == 0 && (double) num32 > 5000.0 && num2 < 1) + num35 = 17; + if (num35 == 0 & flag1 && num3 < 1 && num2 > 0) + num35 = 18; + if (num35 == 0 & flag2 && num5 < 1) + num35 = 19; + if (num35 == 0 && NPC.savedGoblin && num11 < 1) + num35 = 107; + if (num35 == 0 && NPC.savedTaxCollector && num24 < 1) + num35 = 441; + if (num35 == 0 && NPC.savedWizard && num10 < 1) + num35 = 108; + if (num35 == 0 && Main.hardMode && num14 < 1) + num35 = 160; + if (num35 == 0 && (NPC.downedBoss1 || NPC.downedBoss2 || NPC.downedBoss3) && num4 < 1) + num35 = 20; + if (num35 == 0 & flag3 && num2 > 0 && num8 < 1) + num35 = 38; + if (num35 == 0 && NPC.downedQueenBee && num20 < 1) + num35 = 228; + if (num35 == 0 && NPC.downedMechBossAny && num15 < 1) + num35 = 178; + if (num35 == 0 && NPC.savedMech && num12 < 1) + num35 = 124; + if (num35 == 0 && NPC.savedAngler && num23 < 1) + num35 = 369; + if (num35 == 0 && Main.hardMode && NPC.downedPlantBoss && num18 < 1) + num35 = 209; + if (num35 == 0 && NPC.downedPirates && num21 < 1) + num35 = 229; + if (num35 == 0 && NPC.downedBoss3 && num9 < 1) + num35 = 54; + if (num35 == 0 && NPC.savedStylist && num22 < 1) + num35 = 353; + if (((num35 != 0 ? 0 : (num31 >= 4 ? 1 : 0)) & (flag4 ? 1 : 0)) != 0 && num16 < 1) + num35 = 207; + if (num35 == 0 && num31 >= 8 && num19 < 1) + num35 = 227; + if (num35 == 0 & flag5 && num31 >= 14 && num17 < 1) + num35 = 208; + if (num35 == 0 && NPC.downedFrost && num13 < 1 && Main.xMas) + num35 = 142; + if (num35 == 0 && NPC.savedBartender && num25 < 1) + num35 = 550; + if (num35 == 0 && NPC.savedGolfer && num26 < 1) + num35 = 588; + if (num35 == 0 && (double) bestiaryProgressReport.CompletionPercent >= 0.100000001490116 && num27 < 1) + num35 = 633; + WorldGen.prioritizedTownNPCType = num35; + } + + public static int DamageVar(float dmg, float luck = 0.0f) + { + float num1 = dmg * (float) (1.0 + (double) Main.rand.Next(-15, 16) * 0.00999999977648258); + if ((double) luck > 0.0) + { + if ((double) Main.rand.NextFloat() < (double) luck) + { + float num2 = dmg * (float) (1.0 + (double) Main.rand.Next(-15, 16) * 0.00999999977648258); + if ((double) num2 > (double) num1) + num1 = num2; + } + } + else if ((double) luck < 0.0 && (double) Main.rand.NextFloat() < -(double) luck) + { + float num3 = dmg * (float) (1.0 + (double) Main.rand.Next(-15, 16) * 0.00999999977648258); + if ((double) num3 < (double) num1) + num1 = num3; + } + return (int) Math.Round((double) num1); + } + + public static double CalculateDamageNPCsTake(int Damage, int Defense) + { + double num = (double) Damage - (double) Defense * 0.5; + if (num < 1.0) + num = 1.0; + return num; + } + + public static double CalculateDamagePlayersTakeInPVP(int Damage, int Defense) + { + double num = (double) Damage - (double) Defense * 0.5; + if (num < 1.0) + num = 1.0; + return num; + } + + public static double CalculateDamagePlayersTake(int Damage, int Defense) + { + double num = (double) Damage - (double) Defense * 0.5; + if (Main.masterMode) + num = (double) (Damage - Defense); + else if (Main.expertMode) + num = (double) Damage - (double) Defense * 0.75; + if (num < 1.0) + num = 1.0; + return num; + } + + public void OnTileChangeEvent(int x, int y, int count, TileChangeType eventType) + { + switch (eventType) + { + case TileChangeType.LavaWater: + SoundEngine.PlaySound(SoundID.LiquidsWaterLava, x * 16 + count * 8, y * 16 + count * 8); + break; + case TileChangeType.HoneyWater: + SoundEngine.PlaySound(SoundID.LiquidsHoneyWater, x * 16 + count * 8, y * 16 + count * 8); + break; + case TileChangeType.HoneyLava: + SoundEngine.PlaySound(SoundID.LiquidsHoneyLava, x * 16 + count * 8, y * 16 + count * 8); + break; + } + } + + public static void ClearPendingPlayerSelectCallbacks() => Main._pendingCharacterSelect = (Main.OnPlayerSelected) null; + + public static void SelectPlayer(PlayerFileData data) + { + if (Main._pendingCharacterSelect != null) + { + Main._pendingCharacterSelect(data); + Main._pendingCharacterSelect = (Main.OnPlayerSelected) null; + } + else if (Main.menuMultiplayer) + { + Main.ServerSideCharacter = false; + data.SetAsActive(); + SoundEngine.PlaySound(10); + if (Main.autoJoin) + { + if (Netplay.SetRemoteIP(Main.getIP)) + { + Main.menuMode = 10; + Netplay.StartTcpClient(); + } + Main.autoJoin = false; + } + else if (Main.menuServer) + { + Main.LoadWorlds(); + Main.menuMode = 6; + } + else + { + Main.menuMode = 13; + Main.clrInput(); + } + } + else + { + Main.ServerSideCharacter = false; + Main.myPlayer = 0; + data.SetAsActive(); + Main.player[Main.myPlayer].position = Vector2.Zero; + Main.LoadWorlds(); + SoundEngine.PlaySound(10); + Main.menuMode = 6; + } + } + + public static void ToggleFullScreen() => Main.SetFullScreen(!Main.graphics.IsFullScreen); + + public static void SetFullScreen(bool fullscreen) => Main.SetDisplayMode(Main.PendingResolutionWidth, Main.PendingResolutionHeight, fullscreen); + + public static void SetResolution(int width, int height) => Main.SetDisplayMode(width, height, Main.graphics.IsFullScreen); + + public static void SetDisplayMode(int width, int height, bool fullscreen) + { + Main.screenMaximized = ((Form) Control.FromHandle(Main.instance.Window.Handle)).WindowState == FormWindowState.Maximized; + if (Main.screenBorderless && Main.screenMaximized && !Main.graphics.IsFullScreen) + { + Main.screenMaximized = false; + ((Form) Control.FromHandle(Main.instance.Window.Handle)).WindowState = FormWindowState.Normal; + } + Form form = (Form) Control.FromHandle(Main.instance.Window.Handle); + bool flag1 = form.FormBorderStyle == FormBorderStyle.None; + bool flag2 = false; + int num1; + int num2; + if (((Main.screenBorderless || Main.screenMaximized ? 1 : (Main.graphics.IsFullScreen ? 1 : 0)) | (fullscreen ? 1 : 0)) != 0) + { + form.MinimumSize = new Size(0, 0); + if (!fullscreen) + Main.SetDisplayModeAsBorderless(ref width, ref height, form); + if (width > Main.maxScreenW) + { + double num3 = (double) height / (double) width; + width = Main.maxScreenW; + double num4 = (double) width; + height = (int) (num3 * num4); + } + if (height > Main.maxScreenH) + { + double num5 = (double) width / (double) height; + height = Main.maxScreenH; + double num6 = (double) height; + width = (int) (num5 * num6); + } + PlayerInput.RawMouseScale = new Vector2((float) width / (float) Main.instance.Window.ClientBounds.Width, (float) height / (float) Main.instance.Window.ClientBounds.Height); + if (!Main.graphics.IsFullScreen) + { + num1 = Math.Max(Main.graphics.PreferredBackBufferWidth, Main.graphics.GraphicsDevice.Viewport.Width); + num2 = Math.Max(Main.graphics.PreferredBackBufferHeight, Main.graphics.GraphicsDevice.Viewport.Height); + if (num1 != Main.graphics.PreferredBackBufferWidth || num2 != Main.graphics.PreferredBackBufferHeight) + flag2 = true; + } + else + { + num1 = Main.graphics.PreferredBackBufferWidth; + num2 = Main.graphics.PreferredBackBufferHeight; + } + } + else + { + PlayerInput.RawMouseScale = Vector2.One; + form.MinimumSize = new Size(Main.minScreenW, Main.minScreenH); + if (flag1) + { + width = Main.displayWidth[0]; + height = Main.displayHeight[0]; + } + width = Math.Min(width, Main.maxScreenW); + height = Math.Min(height, Main.maxScreenH); + Viewport viewport = Main.graphics.GraphicsDevice.Viewport; + num1 = viewport.Width; + viewport = Main.graphics.GraphicsDevice.Viewport; + num2 = viewport.Height; + int preferredBackBufferWidth = Main.graphics.PreferredBackBufferWidth; + viewport = Main.graphics.GraphicsDevice.Viewport; + int width1 = viewport.Width; + int num7; + if (preferredBackBufferWidth == width1) + { + int backBufferHeight = Main.graphics.PreferredBackBufferHeight; + viewport = Main.graphics.GraphicsDevice.Viewport; + int height1 = viewport.Height; + num7 = backBufferHeight != height1 ? 1 : 0; + } + else + num7 = 1; + flag2 = num7 != 0; + } + if (!fullscreen && !flag2) + { + Size clientSize = form.ClientSize; + if (clientSize.Width < Main.graphics.PreferredBackBufferWidth) + { + clientSize = form.ClientSize; + width = clientSize.Width; + flag2 = true; + } + clientSize = form.ClientSize; + if (clientSize.Height < Main.graphics.PreferredBackBufferHeight) + { + clientSize = form.ClientSize; + height = clientSize.Height; + flag2 = true; + } + } + width &= 2147483646; + height &= 2147483646; + width = Math.Max(width, Main.minScreenW); + height = Math.Max(height, Main.minScreenH); + if (Main.graphics.IsFullScreen != fullscreen) + { + Main.graphics.PreferredBackBufferWidth = width; + Main.graphics.PreferredBackBufferHeight = height; + Main.graphics.ApplyChanges(); + Main.graphics.ToggleFullScreen(); + } + if (((width != num1 ? 1 : (height != num2 ? 1 : 0)) | (flag2 ? 1 : 0)) != 0) + { + Main.mapTime = 0; + if (Main.gamePaused) + Main.renderNow = true; + Main.screenWidth = width; + Main.screenHeight = height; + Main.graphics.PreferredBackBufferWidth = Main.screenWidth; + Main.graphics.PreferredBackBufferHeight = Main.screenHeight; + Main.graphics.ApplyChanges(); + PlayerInput.CacheOriginalScreenDimensions(); + Main.FixUIScale(); + if (Main.OnResolutionChanged != null) + Main.OnResolutionChanged(new Vector2((float) Main.screenWidth, (float) Main.screenHeight)); + Main.PendingResolutionWidth = Main.screenWidth; + Main.PendingResolutionHeight = Main.screenHeight; + PlayerInput.CacheOriginalScreenDimensions(); + if (!fullscreen) + { + if (Main.screenBorderless) + { + Main.ApplyBorderlessResolution(form); + form.FormBorderStyle = FormBorderStyle.None; + } + else + form.FormBorderStyle = FormBorderStyle.Sizable; + form.SendToBack(); + form.BringToFront(); + } + Lighting.Initialize(); + if (!Main.drawToScreen) + Main.instance.InitTargets(); + UserInterface.ActiveInstance.Recalculate(); + Main.instance._needsMenuUIRecalculation = true; + Console.WriteLine(Language.GetTextValue("Misc.ResolutionChanged", (object) width, (object) height)); + Main.chatMonitor.OnResolutionChange(); + } + if (Main.graphics.SynchronizeWithVerticalRetrace) + return; + Main.graphics.SynchronizeWithVerticalRetrace = true; + Main.graphics.ApplyChanges(); + } + + public static void FixUIScale() => Main.UIScale = Main.UIScaleWanted; + + public void FullscreenStartup() + { + Main.startFullscreen = false; + int preferredBackBufferWidth = Main.graphics.PreferredBackBufferWidth; + int backBufferHeight = Main.graphics.PreferredBackBufferHeight; + Main.Configuration.Get("DisplayWidth", ref preferredBackBufferWidth); + Main.Configuration.Get("DisplayHeight", ref backBufferHeight); + Main.SetDisplayMode(preferredBackBufferWidth, backBufferHeight, true); + } + + public void UpdateDisplaySettings() + { + if (Main.startFullscreen) + this.FullscreenStartup(); + Main.SetResolution(this.GraphicsDevice.Viewport.Width, this.GraphicsDevice.Viewport.Height); + } + + public static void OpenPlayerSelect(Main.OnPlayerSelected method) + { + if (Main.gameMenu && (Main.menuMode == 10 || Main.menuMode == 14) || WorldGen.gen) + return; + if (!Main.gameMenu) + { + WorldGen.SaveAndQuit((Action) (() => + { + Main.menuMode = 888; + Main._blockFancyUIWhileLoading = true; + Main.LoadPlayers(); + Main.MenuUI.SetState((UIState) Main._characterSelectMenu); + Main._blockFancyUIWhileLoading = false; + Main._pendingCharacterSelect = method; + })); + } + else + { + Main.menuMode = 888; + Main._blockFancyUIWhileLoading = true; + Main.LoadPlayers(); + Main.MenuUI.SetState((UIState) Main._characterSelectMenu); + Main._blockFancyUIWhileLoading = false; + Main._pendingCharacterSelect = method; + } + } + + public static void SwitchNetMode(int mode) + { + if (mode < 0 || mode > 2) + return; + Main._targetNetMode = mode; + Main._hasPendingNetmodeChange = true; + } + + public static void WeGameRequireExitGame() => Main._WeGameReqExit = true; + + public delegate void OnPlayerSelected(PlayerFileData player); + + public static class CurrentFrameFlags + { + public static int ActivePlayersCount; + public static int SleepingPlayersCount; + public static bool AnyActiveBossNPC; + public static bool HadAnActiveInteractibleProjectile; + } + + public enum WorldPreparationState + { + AwaitingData, + ProcessingData, + Ready, + } + + internal static class NativeMethods + { + public const uint ES_CONTINUOUS = 2147483648; + public const uint ES_SYSTEM_REQUIRED = 1; + + [DllImport("kernel32.dll")] + public static extern uint SetThreadExecutionState(uint esFlags); + } + + private struct MouseTextCache + { + public bool noOverride; + public bool isValid; + public string cursorText; + public int rare; + public byte diff; + public int X; + public int Y; + public int hackedScreenWidth; + public int hackedScreenHeight; + public string buffTooltip; + } + + protected class TextDisplayCache + { + private string _originalText; + private int _lastScreenWidth; + private int _lastScreenHeight; + + public string[] TextLines { get; private set; } + + public int AmountOfLines { get; private set; } + + public void PrepareCache(string text) + { + if ((0 | (Main.screenWidth != this._lastScreenWidth ? 1 : 0) | (Main.screenHeight != this._lastScreenHeight ? 1 : 0) | (this._originalText != text ? 1 : 0)) == 0) + return; + this._lastScreenWidth = Main.screenWidth; + this._lastScreenHeight = Main.screenHeight; + this._originalText = text; + int lineAmount; + this.TextLines = Utils.WordwrapString(Main.npcChatText, FontAssets.MouseText.Value, 460, 10, out lineAmount); + this.AmountOfLines = lineAmount; + } + } + + public struct SceneArea + { + public Vector2 SceneLocalScreenPositionOffset; + public float totalWidth; + public float totalHeight; + public int bgTopY; + } + + public struct InfoToSetBackColor + { + public bool isInGameMenuOrIsServer; + public float CorruptionBiomeInfluence; + public float CrimsonBiomeInfluence; + public float JungleBiomeInfluence; + public float MushroomBiomeInfluence; + public float GraveyardInfluence; + public bool BloodMoonActive; + public bool LanternNightActive; + } + } +} diff --git a/Map/IMapLayer.cs b/Map/IMapLayer.cs new file mode 100644 index 0000000..a2cb0c8 --- /dev/null +++ b/Map/IMapLayer.cs @@ -0,0 +1,13 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Map.IMapLayer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Map +{ + public interface IMapLayer + { + void Draw(ref MapOverlayDrawContext context, ref string text); + } +} diff --git a/Map/MapHelper.cs b/Map/MapHelper.cs new file mode 100644 index 0000000..66c0ac8 --- /dev/null +++ b/Map/MapHelper.cs @@ -0,0 +1,2980 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Map.MapHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Ionic.Zlib; +using Microsoft.Xna.Framework; +using System; +using System.Diagnostics; +using System.IO; +using System.Threading; +using Terraria.IO; +using Terraria.Social; +using Terraria.Utilities; + +namespace Terraria.Map +{ + public static class MapHelper + { + public const int drawLoopMilliseconds = 5; + private const int HeaderEmpty = 0; + private const int HeaderTile = 1; + private const int HeaderWall = 2; + private const int HeaderWater = 3; + private const int HeaderLava = 4; + private const int HeaderHoney = 5; + private const int HeaderHeavenAndHell = 6; + private const int HeaderBackground = 7; + private const int maxTileOptions = 12; + private const int maxWallOptions = 2; + private const int maxLiquidTypes = 3; + private const int maxSkyGradients = 256; + private const int maxDirtGradients = 256; + private const int maxRockGradients = 256; + public static int maxUpdateTile = 1000; + public static int numUpdateTile = 0; + public static short[] updateTileX = new short[MapHelper.maxUpdateTile]; + public static short[] updateTileY = new short[MapHelper.maxUpdateTile]; + private static object IOLock = new object(); + public static int[] tileOptionCounts; + public static int[] wallOptionCounts; + public static ushort[] tileLookup; + public static ushort[] wallLookup; + private static ushort tilePosition; + private static ushort wallPosition; + private static ushort liquidPosition; + private static ushort skyPosition; + private static ushort dirtPosition; + private static ushort rockPosition; + private static ushort hellPosition; + private static Color[] colorLookup; + private static ushort[] snowTypes; + private static ushort wallRangeStart; + private static ushort wallRangeEnd; + public static bool noStatusText = false; + + public static void Initialize() + { + Color[][] colorArray1 = new Color[623][]; + for (int index = 0; index < 623; ++index) + colorArray1[index] = new Color[12]; + colorArray1[621][0] = new Color(250, 250, 250); + colorArray1[622][0] = new Color(235, 235, 249); + colorArray1[518][0] = new Color(26, 196, 84); + colorArray1[518][1] = new Color(48, 208, 234); + colorArray1[518][2] = new Color(135, 196, 26); + colorArray1[519][0] = new Color(28, 216, 109); + colorArray1[519][1] = new Color(107, 182, 0); + colorArray1[519][2] = new Color(75, 184, 230); + colorArray1[519][3] = new Color(208, 80, 80); + colorArray1[519][4] = new Color(141, 137, 223); + colorArray1[519][5] = new Color(182, 175, 130); + colorArray1[549][0] = new Color(54, 83, 20); + colorArray1[528][0] = new Color(182, 175, 130); + colorArray1[529][0] = new Color(99, 150, 8); + colorArray1[529][1] = new Color(139, 154, 64); + colorArray1[529][2] = new Color(34, 129, 168); + colorArray1[529][3] = new Color(180, 82, 82); + colorArray1[529][4] = new Color(113, 108, 205); + Color color1 = new Color(151, 107, 75); + colorArray1[0][0] = color1; + colorArray1[5][0] = color1; + colorArray1[5][1] = new Color(182, 175, 130); + Color color2 = new Color((int) sbyte.MaxValue, (int) sbyte.MaxValue, (int) sbyte.MaxValue); + colorArray1[583][0] = color2; + colorArray1[584][0] = color2; + colorArray1[585][0] = color2; + colorArray1[586][0] = color2; + colorArray1[587][0] = color2; + colorArray1[588][0] = color2; + colorArray1[589][0] = color2; + colorArray1[590][0] = color2; + colorArray1[595][0] = color1; + colorArray1[596][0] = color1; + colorArray1[615][0] = color1; + colorArray1[616][0] = color1; + colorArray1[30][0] = color1; + colorArray1[191][0] = color1; + colorArray1[272][0] = new Color(121, 119, 101); + color1 = new Color(128, 128, 128); + colorArray1[1][0] = color1; + colorArray1[38][0] = color1; + colorArray1[48][0] = color1; + colorArray1[130][0] = color1; + colorArray1[138][0] = color1; + colorArray1[273][0] = color1; + colorArray1[283][0] = color1; + colorArray1[618][0] = color1; + colorArray1[2][0] = new Color(28, 216, 94); + colorArray1[477][0] = new Color(28, 216, 94); + colorArray1[492][0] = new Color(78, 193, 227); + color1 = new Color(26, 196, 84); + colorArray1[3][0] = color1; + colorArray1[192][0] = color1; + colorArray1[73][0] = new Color(27, 197, 109); + colorArray1[52][0] = new Color(23, 177, 76); + colorArray1[353][0] = new Color(28, 216, 94); + colorArray1[20][0] = new Color(163, 116, 81); + colorArray1[6][0] = new Color(140, 101, 80); + color1 = new Color(150, 67, 22); + colorArray1[7][0] = color1; + colorArray1[47][0] = color1; + colorArray1[284][0] = color1; + colorArray1[560][0] = color1; + color1 = new Color(185, 164, 23); + colorArray1[8][0] = color1; + colorArray1[45][0] = color1; + colorArray1[560][2] = color1; + color1 = new Color(185, 194, 195); + colorArray1[9][0] = color1; + colorArray1[46][0] = color1; + colorArray1[560][1] = color1; + color1 = new Color(98, 95, 167); + colorArray1[22][0] = color1; + colorArray1[140][0] = color1; + colorArray1[23][0] = new Color(141, 137, 223); + colorArray1[24][0] = new Color(122, 116, 218); + colorArray1[25][0] = new Color(109, 90, 128); + colorArray1[37][0] = new Color(104, 86, 84); + colorArray1[39][0] = new Color(181, 62, 59); + colorArray1[40][0] = new Color(146, 81, 68); + colorArray1[41][0] = new Color(66, 84, 109); + colorArray1[481][0] = new Color(66, 84, 109); + colorArray1[43][0] = new Color(84, 100, 63); + colorArray1[482][0] = new Color(84, 100, 63); + colorArray1[44][0] = new Color(107, 68, 99); + colorArray1[483][0] = new Color(107, 68, 99); + colorArray1[53][0] = new Color(186, 168, 84); + color1 = new Color(190, 171, 94); + colorArray1[151][0] = color1; + colorArray1[154][0] = color1; + colorArray1[274][0] = color1; + colorArray1[328][0] = new Color(200, 246, 254); + colorArray1[329][0] = new Color(15, 15, 15); + colorArray1[54][0] = new Color(200, 246, 254); + colorArray1[56][0] = new Color(43, 40, 84); + colorArray1[75][0] = new Color(26, 26, 26); + colorArray1[57][0] = new Color(68, 68, 76); + color1 = new Color(142, 66, 66); + colorArray1[58][0] = color1; + colorArray1[76][0] = color1; + color1 = new Color(92, 68, 73); + colorArray1[59][0] = color1; + colorArray1[120][0] = color1; + colorArray1[60][0] = new Color(143, 215, 29); + colorArray1[61][0] = new Color(135, 196, 26); + colorArray1[74][0] = new Color(96, 197, 27); + colorArray1[62][0] = new Color(121, 176, 24); + colorArray1[233][0] = new Color(107, 182, 29); + colorArray1[63][0] = new Color(110, 140, 182); + colorArray1[64][0] = new Color(196, 96, 114); + colorArray1[65][0] = new Color(56, 150, 97); + colorArray1[66][0] = new Color(160, 118, 58); + colorArray1[67][0] = new Color(140, 58, 166); + colorArray1[68][0] = new Color(125, 191, 197); + colorArray1[566][0] = new Color(233, 180, 90); + colorArray1[70][0] = new Color(93, (int) sbyte.MaxValue, (int) byte.MaxValue); + color1 = new Color(182, 175, 130); + colorArray1[71][0] = color1; + colorArray1[72][0] = color1; + colorArray1[190][0] = color1; + colorArray1[578][0] = new Color(172, 155, 110); + color1 = new Color(73, 120, 17); + colorArray1[80][0] = color1; + colorArray1[484][0] = color1; + colorArray1[188][0] = color1; + colorArray1[80][1] = new Color(87, 84, 151); + colorArray1[80][2] = new Color(34, 129, 168); + colorArray1[80][3] = new Color(130, 56, 55); + color1 = new Color(11, 80, 143); + colorArray1[107][0] = color1; + colorArray1[121][0] = color1; + color1 = new Color(91, 169, 169); + colorArray1[108][0] = color1; + colorArray1[122][0] = color1; + color1 = new Color(128, 26, 52); + colorArray1[111][0] = color1; + colorArray1[150][0] = color1; + colorArray1[109][0] = new Color(78, 193, 227); + colorArray1[110][0] = new Color(48, 186, 135); + colorArray1[113][0] = new Color(48, 208, 234); + colorArray1[115][0] = new Color(33, 171, 207); + colorArray1[112][0] = new Color(103, 98, 122); + color1 = new Color(238, 225, 218); + colorArray1[116][0] = color1; + colorArray1[118][0] = color1; + colorArray1[117][0] = new Color(181, 172, 190); + colorArray1[119][0] = new Color(107, 92, 108); + colorArray1[123][0] = new Color(106, 107, 118); + colorArray1[124][0] = new Color(73, 51, 36); + colorArray1[131][0] = new Color(52, 52, 52); + colorArray1[145][0] = new Color(192, 30, 30); + colorArray1[146][0] = new Color(43, 192, 30); + color1 = new Color(211, 236, 241); + colorArray1[147][0] = color1; + colorArray1[148][0] = color1; + colorArray1[152][0] = new Color(128, 133, 184); + colorArray1[153][0] = new Color(239, 141, 126); + colorArray1[155][0] = new Color(131, 162, 161); + colorArray1[156][0] = new Color(170, 171, 157); + colorArray1[157][0] = new Color(104, 100, 126); + color1 = new Color(145, 81, 85); + colorArray1[158][0] = color1; + colorArray1[232][0] = color1; + colorArray1[575][0] = new Color(125, 61, 65); + colorArray1[159][0] = new Color(148, 133, 98); + colorArray1[160][0] = new Color(200, 0, 0); + colorArray1[160][1] = new Color(0, 200, 0); + colorArray1[160][2] = new Color(0, 0, 200); + colorArray1[161][0] = new Color(144, 195, 232); + colorArray1[162][0] = new Color(184, 219, 240); + colorArray1[163][0] = new Color(174, 145, 214); + colorArray1[164][0] = new Color(218, 182, 204); + colorArray1[170][0] = new Color(27, 109, 69); + colorArray1[171][0] = new Color(33, 135, 85); + color1 = new Color(129, 125, 93); + colorArray1[166][0] = color1; + colorArray1[175][0] = color1; + colorArray1[167][0] = new Color(62, 82, 114); + color1 = new Color(132, 157, (int) sbyte.MaxValue); + colorArray1[168][0] = color1; + colorArray1[176][0] = color1; + color1 = new Color(152, 171, 198); + colorArray1[169][0] = color1; + colorArray1[177][0] = color1; + colorArray1[179][0] = new Color(49, 134, 114); + colorArray1[180][0] = new Color(126, 134, 49); + colorArray1[181][0] = new Color(134, 59, 49); + colorArray1[182][0] = new Color(43, 86, 140); + colorArray1[183][0] = new Color(121, 49, 134); + colorArray1[381][0] = new Color(254, 121, 2); + colorArray1[534][0] = new Color(114, 254, 2); + colorArray1[536][0] = new Color(0, 197, 208); + colorArray1[539][0] = new Color(208, 0, 126); + colorArray1[512][0] = new Color(49, 134, 114); + colorArray1[513][0] = new Color(126, 134, 49); + colorArray1[514][0] = new Color(134, 59, 49); + colorArray1[515][0] = new Color(43, 86, 140); + colorArray1[516][0] = new Color(121, 49, 134); + colorArray1[517][0] = new Color(254, 121, 2); + colorArray1[535][0] = new Color(114, 254, 2); + colorArray1[537][0] = new Color(0, 197, 208); + colorArray1[540][0] = new Color(208, 0, 126); + colorArray1[184][0] = new Color(29, 106, 88); + colorArray1[184][1] = new Color(94, 100, 36); + colorArray1[184][2] = new Color(96, 44, 40); + colorArray1[184][3] = new Color(34, 63, 102); + colorArray1[184][4] = new Color(79, 35, 95); + colorArray1[184][5] = new Color(253, 62, 3); + colorArray1[184][6] = new Color(22, 123, 62); + colorArray1[184][7] = new Color(0, 106, 148); + colorArray1[184][8] = new Color(148, 0, 132); + colorArray1[189][0] = new Color(223, (int) byte.MaxValue, (int) byte.MaxValue); + colorArray1[193][0] = new Color(56, 121, (int) byte.MaxValue); + colorArray1[194][0] = new Color(157, 157, 107); + colorArray1[195][0] = new Color(134, 22, 34); + colorArray1[196][0] = new Color(147, 144, 178); + colorArray1[197][0] = new Color(97, 200, 225); + colorArray1[198][0] = new Color(62, 61, 52); + colorArray1[199][0] = new Color(208, 80, 80); + colorArray1[201][0] = new Color(203, 61, 64); + colorArray1[205][0] = new Color(186, 50, 52); + colorArray1[200][0] = new Color(216, 152, 144); + colorArray1[202][0] = new Color(213, 178, 28); + colorArray1[203][0] = new Color(128, 44, 45); + colorArray1[204][0] = new Color(125, 55, 65); + colorArray1[206][0] = new Color(124, 175, 201); + colorArray1[208][0] = new Color(88, 105, 118); + colorArray1[211][0] = new Color(191, 233, 115); + colorArray1[213][0] = new Color(137, 120, 67); + colorArray1[214][0] = new Color(103, 103, 103); + colorArray1[221][0] = new Color(239, 90, 50); + colorArray1[222][0] = new Color(231, 96, 228); + colorArray1[223][0] = new Color(57, 85, 101); + colorArray1[224][0] = new Color(107, 132, 139); + colorArray1[225][0] = new Color(227, 125, 22); + colorArray1[226][0] = new Color(141, 56, 0); + colorArray1[229][0] = new Color((int) byte.MaxValue, 156, 12); + colorArray1[230][0] = new Color(131, 79, 13); + colorArray1[234][0] = new Color(53, 44, 41); + colorArray1[235][0] = new Color(214, 184, 46); + colorArray1[236][0] = new Color(149, 232, 87); + colorArray1[237][0] = new Color((int) byte.MaxValue, 241, 51); + colorArray1[238][0] = new Color(225, 128, 206); + colorArray1[243][0] = new Color(198, 196, 170); + colorArray1[248][0] = new Color(219, 71, 38); + colorArray1[249][0] = new Color(235, 38, 231); + colorArray1[250][0] = new Color(86, 85, 92); + colorArray1[251][0] = new Color(235, 150, 23); + colorArray1[252][0] = new Color(153, 131, 44); + colorArray1[253][0] = new Color(57, 48, 97); + colorArray1[254][0] = new Color(248, 158, 92); + colorArray1[(int) byte.MaxValue][0] = new Color(107, 49, 154); + colorArray1[256][0] = new Color(154, 148, 49); + colorArray1[257][0] = new Color(49, 49, 154); + colorArray1[258][0] = new Color(49, 154, 68); + colorArray1[259][0] = new Color(154, 49, 77); + colorArray1[260][0] = new Color(85, 89, 118); + colorArray1[261][0] = new Color(154, 83, 49); + colorArray1[262][0] = new Color(221, 79, (int) byte.MaxValue); + colorArray1[263][0] = new Color(250, (int) byte.MaxValue, 79); + colorArray1[264][0] = new Color(79, 102, (int) byte.MaxValue); + colorArray1[265][0] = new Color(79, (int) byte.MaxValue, 89); + colorArray1[266][0] = new Color((int) byte.MaxValue, 79, 79); + colorArray1[267][0] = new Color(240, 240, 247); + colorArray1[268][0] = new Color((int) byte.MaxValue, 145, 79); + colorArray1[287][0] = new Color(79, 128, 17); + color1 = new Color(122, 217, 232); + colorArray1[275][0] = color1; + colorArray1[276][0] = color1; + colorArray1[277][0] = color1; + colorArray1[278][0] = color1; + colorArray1[279][0] = color1; + colorArray1[280][0] = color1; + colorArray1[281][0] = color1; + colorArray1[282][0] = color1; + colorArray1[285][0] = color1; + colorArray1[286][0] = color1; + colorArray1[288][0] = color1; + colorArray1[289][0] = color1; + colorArray1[290][0] = color1; + colorArray1[291][0] = color1; + colorArray1[292][0] = color1; + colorArray1[293][0] = color1; + colorArray1[294][0] = color1; + colorArray1[295][0] = color1; + colorArray1[296][0] = color1; + colorArray1[297][0] = color1; + colorArray1[298][0] = color1; + colorArray1[299][0] = color1; + colorArray1[309][0] = color1; + colorArray1[310][0] = color1; + colorArray1[413][0] = color1; + colorArray1[339][0] = color1; + colorArray1[542][0] = color1; + colorArray1[358][0] = color1; + colorArray1[359][0] = color1; + colorArray1[360][0] = color1; + colorArray1[361][0] = color1; + colorArray1[362][0] = color1; + colorArray1[363][0] = color1; + colorArray1[364][0] = color1; + colorArray1[391][0] = color1; + colorArray1[392][0] = color1; + colorArray1[393][0] = color1; + colorArray1[394][0] = color1; + colorArray1[414][0] = color1; + colorArray1[505][0] = color1; + colorArray1[543][0] = color1; + colorArray1[598][0] = color1; + colorArray1[521][0] = color1; + colorArray1[522][0] = color1; + colorArray1[523][0] = color1; + colorArray1[524][0] = color1; + colorArray1[525][0] = color1; + colorArray1[526][0] = color1; + colorArray1[527][0] = color1; + colorArray1[532][0] = color1; + colorArray1[533][0] = color1; + colorArray1[538][0] = color1; + colorArray1[544][0] = color1; + colorArray1[550][0] = color1; + colorArray1[551][0] = color1; + colorArray1[553][0] = color1; + colorArray1[554][0] = color1; + colorArray1[555][0] = color1; + colorArray1[556][0] = color1; + colorArray1[558][0] = color1; + colorArray1[559][0] = color1; + colorArray1[580][0] = color1; + colorArray1[582][0] = color1; + colorArray1[599][0] = color1; + colorArray1[600][0] = color1; + colorArray1[601][0] = color1; + colorArray1[602][0] = color1; + colorArray1[603][0] = color1; + colorArray1[604][0] = color1; + colorArray1[605][0] = color1; + colorArray1[606][0] = color1; + colorArray1[607][0] = color1; + colorArray1[608][0] = color1; + colorArray1[609][0] = color1; + colorArray1[610][0] = color1; + colorArray1[611][0] = color1; + colorArray1[612][0] = color1; + colorArray1[619][0] = color1; + colorArray1[620][0] = color1; + colorArray1[552][0] = colorArray1[53][0]; + colorArray1[564][0] = new Color(87, (int) sbyte.MaxValue, 220); + colorArray1[408][0] = new Color(85, 83, 82); + colorArray1[409][0] = new Color(85, 83, 82); + colorArray1[415][0] = new Color(249, 75, 7); + colorArray1[416][0] = new Color(0, 160, 170); + colorArray1[417][0] = new Color(160, 87, 234); + colorArray1[418][0] = new Color(22, 173, 254); + colorArray1[489][0] = new Color((int) byte.MaxValue, 29, 136); + colorArray1[490][0] = new Color(211, 211, 211); + colorArray1[311][0] = new Color(117, 61, 25); + colorArray1[312][0] = new Color(204, 93, 73); + colorArray1[313][0] = new Color(87, 150, 154); + colorArray1[4][0] = new Color(253, 221, 3); + colorArray1[4][1] = new Color(253, 221, 3); + color1 = new Color(253, 221, 3); + colorArray1[93][0] = color1; + colorArray1[33][0] = color1; + colorArray1[174][0] = color1; + colorArray1[100][0] = color1; + colorArray1[98][0] = color1; + colorArray1[173][0] = color1; + color1 = new Color(119, 105, 79); + colorArray1[11][0] = color1; + colorArray1[10][0] = color1; + colorArray1[593][0] = color1; + colorArray1[594][0] = color1; + color1 = new Color(191, 142, 111); + colorArray1[14][0] = color1; + colorArray1[469][0] = color1; + colorArray1[486][0] = color1; + colorArray1[488][0] = new Color((int) sbyte.MaxValue, 92, 69); + colorArray1[487][0] = color1; + colorArray1[487][1] = color1; + colorArray1[15][0] = color1; + colorArray1[15][1] = color1; + colorArray1[497][0] = color1; + colorArray1[18][0] = color1; + colorArray1[19][0] = color1; + colorArray1[55][0] = color1; + colorArray1[79][0] = color1; + colorArray1[86][0] = color1; + colorArray1[87][0] = color1; + colorArray1[88][0] = color1; + colorArray1[89][0] = color1; + colorArray1[94][0] = color1; + colorArray1[101][0] = color1; + colorArray1[104][0] = color1; + colorArray1[106][0] = color1; + colorArray1[114][0] = color1; + colorArray1[128][0] = color1; + colorArray1[139][0] = color1; + colorArray1[172][0] = color1; + colorArray1[216][0] = color1; + colorArray1[269][0] = color1; + colorArray1[334][0] = color1; + colorArray1[471][0] = color1; + colorArray1[470][0] = color1; + colorArray1[475][0] = color1; + colorArray1[377][0] = color1; + colorArray1[380][0] = color1; + colorArray1[395][0] = color1; + colorArray1[573][0] = color1; + colorArray1[12][0] = new Color(174, 24, 69); + colorArray1[13][0] = new Color(133, 213, 247); + color1 = new Color(144, 148, 144); + colorArray1[17][0] = color1; + colorArray1[90][0] = color1; + colorArray1[96][0] = color1; + colorArray1[97][0] = color1; + colorArray1[99][0] = color1; + colorArray1[132][0] = color1; + colorArray1[142][0] = color1; + colorArray1[143][0] = color1; + colorArray1[144][0] = color1; + colorArray1[207][0] = color1; + colorArray1[209][0] = color1; + colorArray1[212][0] = color1; + colorArray1[217][0] = color1; + colorArray1[218][0] = color1; + colorArray1[219][0] = color1; + colorArray1[220][0] = color1; + colorArray1[228][0] = color1; + colorArray1[300][0] = color1; + colorArray1[301][0] = color1; + colorArray1[302][0] = color1; + colorArray1[303][0] = color1; + colorArray1[304][0] = color1; + colorArray1[305][0] = color1; + colorArray1[306][0] = color1; + colorArray1[307][0] = color1; + colorArray1[308][0] = color1; + colorArray1[567][0] = color1; + colorArray1[349][0] = new Color(144, 148, 144); + colorArray1[531][0] = new Color(144, 148, 144); + colorArray1[105][0] = new Color(144, 148, 144); + colorArray1[105][1] = new Color(177, 92, 31); + colorArray1[105][2] = new Color(201, 188, 170); + colorArray1[137][0] = new Color(144, 148, 144); + colorArray1[137][1] = new Color(141, 56, 0); + colorArray1[16][0] = new Color(140, 130, 116); + colorArray1[26][0] = new Color(119, 101, 125); + colorArray1[26][1] = new Color(214, (int) sbyte.MaxValue, 133); + colorArray1[36][0] = new Color(230, 89, 92); + colorArray1[28][0] = new Color(151, 79, 80); + colorArray1[28][1] = new Color(90, 139, 140); + colorArray1[28][2] = new Color(192, 136, 70); + colorArray1[28][3] = new Color(203, 185, 151); + colorArray1[28][4] = new Color(73, 56, 41); + colorArray1[28][5] = new Color(148, 159, 67); + colorArray1[28][6] = new Color(138, 172, 67); + colorArray1[28][7] = new Color(226, 122, 47); + colorArray1[28][8] = new Color(198, 87, 93); + colorArray1[29][0] = new Color(175, 105, 128); + colorArray1[51][0] = new Color(192, 202, 203); + colorArray1[31][0] = new Color(141, 120, 168); + colorArray1[31][1] = new Color(212, 105, 105); + colorArray1[32][0] = new Color(151, 135, 183); + colorArray1[42][0] = new Color(251, 235, (int) sbyte.MaxValue); + colorArray1[50][0] = new Color(170, 48, 114); + colorArray1[85][0] = new Color(192, 192, 192); + colorArray1[69][0] = new Color(190, 150, 92); + colorArray1[77][0] = new Color(238, 85, 70); + colorArray1[81][0] = new Color(245, 133, 191); + colorArray1[78][0] = new Color(121, 110, 97); + colorArray1[141][0] = new Color(192, 59, 59); + colorArray1[129][0] = new Color((int) byte.MaxValue, 117, 224); + colorArray1[126][0] = new Color(159, 209, 229); + colorArray1[125][0] = new Color(141, 175, (int) byte.MaxValue); + colorArray1[103][0] = new Color(141, 98, 77); + colorArray1[95][0] = new Color((int) byte.MaxValue, 162, 31); + colorArray1[92][0] = new Color(213, 229, 237); + colorArray1[91][0] = new Color(13, 88, 130); + colorArray1[215][0] = new Color(254, 121, 2); + colorArray1[592][0] = new Color(254, 121, 2); + colorArray1[316][0] = new Color(157, 176, 226); + colorArray1[317][0] = new Color(118, 227, 129); + colorArray1[318][0] = new Color(227, 118, 215); + colorArray1[319][0] = new Color(96, 68, 48); + colorArray1[320][0] = new Color(203, 185, 151); + colorArray1[321][0] = new Color(96, 77, 64); + colorArray1[574][0] = new Color(76, 57, 44); + colorArray1[322][0] = new Color(198, 170, 104); + colorArray1[149][0] = new Color(220, 50, 50); + colorArray1[149][1] = new Color(0, 220, 50); + colorArray1[149][2] = new Color(50, 50, 220); + colorArray1[133][0] = new Color(231, 53, 56); + colorArray1[133][1] = new Color(192, 189, 221); + colorArray1[134][0] = new Color(166, 187, 153); + colorArray1[134][1] = new Color(241, 129, 249); + colorArray1[102][0] = new Color(229, 212, 73); + colorArray1[49][0] = new Color(89, 201, (int) byte.MaxValue); + colorArray1[35][0] = new Color(226, 145, 30); + colorArray1[34][0] = new Color(235, 166, 135); + colorArray1[136][0] = new Color(213, 203, 204); + colorArray1[231][0] = new Color(224, 194, 101); + colorArray1[239][0] = new Color(224, 194, 101); + colorArray1[240][0] = new Color(120, 85, 60); + colorArray1[240][1] = new Color(99, 50, 30); + colorArray1[240][2] = new Color(153, 153, 117); + colorArray1[240][3] = new Color(112, 84, 56); + colorArray1[240][4] = new Color(234, 231, 226); + colorArray1[241][0] = new Color(77, 74, 72); + colorArray1[244][0] = new Color(200, 245, 253); + color1 = new Color(99, 50, 30); + colorArray1[242][0] = color1; + colorArray1[245][0] = color1; + colorArray1[246][0] = color1; + colorArray1[242][1] = new Color(185, 142, 97); + colorArray1[247][0] = new Color(140, 150, 150); + colorArray1[271][0] = new Color(107, 250, (int) byte.MaxValue); + colorArray1[270][0] = new Color(187, (int) byte.MaxValue, 107); + colorArray1[581][0] = new Color((int) byte.MaxValue, 150, 150); + colorArray1[572][0] = new Color((int) byte.MaxValue, 186, 212); + colorArray1[572][1] = new Color(209, 201, (int) byte.MaxValue); + colorArray1[572][2] = new Color(200, 254, (int) byte.MaxValue); + colorArray1[572][3] = new Color(199, (int) byte.MaxValue, 211); + colorArray1[572][4] = new Color(180, 209, (int) byte.MaxValue); + colorArray1[572][5] = new Color((int) byte.MaxValue, 220, 214); + colorArray1[314][0] = new Color(181, 164, 125); + colorArray1[324][0] = new Color(228, 213, 173); + colorArray1[351][0] = new Color(31, 31, 31); + colorArray1[424][0] = new Color(146, 155, 187); + colorArray1[429][0] = new Color(220, 220, 220); + colorArray1[445][0] = new Color(240, 240, 240); + colorArray1[21][0] = new Color(174, 129, 92); + colorArray1[21][1] = new Color(233, 207, 94); + colorArray1[21][2] = new Color(137, 128, 200); + colorArray1[21][3] = new Color(160, 160, 160); + colorArray1[21][4] = new Color(106, 210, (int) byte.MaxValue); + colorArray1[441][0] = colorArray1[21][0]; + colorArray1[441][1] = colorArray1[21][1]; + colorArray1[441][2] = colorArray1[21][2]; + colorArray1[441][3] = colorArray1[21][3]; + colorArray1[441][4] = colorArray1[21][4]; + colorArray1[27][0] = new Color(54, 154, 54); + colorArray1[27][1] = new Color(226, 196, 49); + color1 = new Color(246, 197, 26); + colorArray1[82][0] = color1; + colorArray1[83][0] = color1; + colorArray1[84][0] = color1; + color1 = new Color(76, 150, 216); + colorArray1[82][1] = color1; + colorArray1[83][1] = color1; + colorArray1[84][1] = color1; + color1 = new Color(185, 214, 42); + colorArray1[82][2] = color1; + colorArray1[83][2] = color1; + colorArray1[84][2] = color1; + color1 = new Color(167, 203, 37); + colorArray1[82][3] = color1; + colorArray1[83][3] = color1; + colorArray1[84][3] = color1; + colorArray1[591][6] = color1; + color1 = new Color(32, 168, 117); + colorArray1[82][4] = color1; + colorArray1[83][4] = color1; + colorArray1[84][4] = color1; + color1 = new Color(177, 69, 49); + colorArray1[82][5] = color1; + colorArray1[83][5] = color1; + colorArray1[84][5] = color1; + color1 = new Color(40, 152, 240); + colorArray1[82][6] = color1; + colorArray1[83][6] = color1; + colorArray1[84][6] = color1; + colorArray1[591][1] = new Color(246, 197, 26); + colorArray1[591][2] = new Color(76, 150, 216); + colorArray1[591][3] = new Color(32, 168, 117); + colorArray1[591][4] = new Color(40, 152, 240); + colorArray1[591][5] = new Color(114, 81, 56); + colorArray1[591][6] = new Color(141, 137, 223); + colorArray1[591][7] = new Color(208, 80, 80); + colorArray1[591][8] = new Color(177, 69, 49); + colorArray1[165][0] = new Color(115, 173, 229); + colorArray1[165][1] = new Color(100, 100, 100); + colorArray1[165][2] = new Color(152, 152, 152); + colorArray1[165][3] = new Color(227, 125, 22); + colorArray1[178][0] = new Color(208, 94, 201); + colorArray1[178][1] = new Color(233, 146, 69); + colorArray1[178][2] = new Color(71, 146, 251); + colorArray1[178][3] = new Color(60, 226, 133); + colorArray1[178][4] = new Color(250, 30, 71); + colorArray1[178][5] = new Color(166, 176, 204); + colorArray1[178][6] = new Color((int) byte.MaxValue, 217, 120); + color1 = new Color(99, 99, 99); + colorArray1[185][0] = color1; + colorArray1[186][0] = color1; + colorArray1[187][0] = color1; + colorArray1[565][0] = color1; + colorArray1[579][0] = color1; + color1 = new Color(114, 81, 56); + colorArray1[185][1] = color1; + colorArray1[186][1] = color1; + colorArray1[187][1] = color1; + colorArray1[591][0] = color1; + color1 = new Color(133, 133, 101); + colorArray1[185][2] = color1; + colorArray1[186][2] = color1; + colorArray1[187][2] = color1; + color1 = new Color(151, 200, 211); + colorArray1[185][3] = color1; + colorArray1[186][3] = color1; + colorArray1[187][3] = color1; + color1 = new Color(177, 183, 161); + colorArray1[185][4] = color1; + colorArray1[186][4] = color1; + colorArray1[187][4] = color1; + color1 = new Color(134, 114, 38); + colorArray1[185][5] = color1; + colorArray1[186][5] = color1; + colorArray1[187][5] = color1; + color1 = new Color(82, 62, 66); + colorArray1[185][6] = color1; + colorArray1[186][6] = color1; + colorArray1[187][6] = color1; + color1 = new Color(143, 117, 121); + colorArray1[185][7] = color1; + colorArray1[186][7] = color1; + colorArray1[187][7] = color1; + color1 = new Color(177, 92, 31); + colorArray1[185][8] = color1; + colorArray1[186][8] = color1; + colorArray1[187][8] = color1; + color1 = new Color(85, 73, 87); + colorArray1[185][9] = color1; + colorArray1[186][9] = color1; + colorArray1[187][9] = color1; + color1 = new Color(26, 196, 84); + colorArray1[185][10] = color1; + colorArray1[186][10] = color1; + colorArray1[187][10] = color1; + colorArray1[227][0] = new Color(74, 197, 155); + colorArray1[227][1] = new Color(54, 153, 88); + colorArray1[227][2] = new Color(63, 126, 207); + colorArray1[227][3] = new Color(240, 180, 4); + colorArray1[227][4] = new Color(45, 68, 168); + colorArray1[227][5] = new Color(61, 92, 0); + colorArray1[227][6] = new Color(216, 112, 152); + colorArray1[227][7] = new Color(200, 40, 24); + colorArray1[227][8] = new Color(113, 45, 133); + colorArray1[227][9] = new Color(235, 137, 2); + colorArray1[227][10] = new Color(41, 152, 135); + colorArray1[227][11] = new Color(198, 19, 78); + colorArray1[373][0] = new Color(9, 61, 191); + colorArray1[374][0] = new Color(253, 32, 3); + colorArray1[375][0] = new Color((int) byte.MaxValue, 156, 12); + colorArray1[461][0] = new Color(212, 192, 100); + colorArray1[461][1] = new Color(137, 132, 156); + colorArray1[461][2] = new Color(148, 122, 112); + colorArray1[461][3] = new Color(221, 201, 206); + colorArray1[323][0] = new Color(182, 141, 86); + colorArray1[325][0] = new Color(129, 125, 93); + colorArray1[326][0] = new Color(9, 61, 191); + colorArray1[327][0] = new Color(253, 32, 3); + colorArray1[507][0] = new Color(5, 5, 5); + colorArray1[508][0] = new Color(5, 5, 5); + colorArray1[330][0] = new Color(226, 118, 76); + colorArray1[331][0] = new Color(161, 172, 173); + colorArray1[332][0] = new Color(204, 181, 72); + colorArray1[333][0] = new Color(190, 190, 178); + colorArray1[335][0] = new Color(217, 174, 137); + colorArray1[336][0] = new Color(253, 62, 3); + colorArray1[337][0] = new Color(144, 148, 144); + colorArray1[338][0] = new Color(85, (int) byte.MaxValue, 160); + colorArray1[315][0] = new Color(235, 114, 80); + colorArray1[340][0] = new Color(96, 248, 2); + colorArray1[341][0] = new Color(105, 74, 202); + colorArray1[342][0] = new Color(29, 240, (int) byte.MaxValue); + colorArray1[343][0] = new Color(254, 202, 80); + colorArray1[344][0] = new Color(131, 252, 245); + colorArray1[345][0] = new Color((int) byte.MaxValue, 156, 12); + colorArray1[346][0] = new Color(149, 212, 89); + colorArray1[347][0] = new Color(236, 74, 79); + colorArray1[348][0] = new Color(44, 26, 233); + colorArray1[350][0] = new Color(55, 97, 155); + colorArray1[352][0] = new Color(238, 97, 94); + colorArray1[354][0] = new Color(141, 107, 89); + colorArray1[355][0] = new Color(141, 107, 89); + colorArray1[463][0] = new Color(155, 214, 240); + colorArray1[491][0] = new Color(60, 20, 160); + colorArray1[464][0] = new Color(233, 183, 128); + colorArray1[465][0] = new Color(51, 84, 195); + colorArray1[466][0] = new Color(205, 153, 73); + colorArray1[356][0] = new Color(233, 203, 24); + colorArray1[357][0] = new Color(168, 178, 204); + colorArray1[367][0] = new Color(168, 178, 204); + colorArray1[561][0] = new Color(148, 158, 184); + colorArray1[365][0] = new Color(146, 136, 205); + colorArray1[366][0] = new Color(223, 232, 233); + colorArray1[368][0] = new Color(50, 46, 104); + colorArray1[369][0] = new Color(50, 46, 104); + colorArray1[576][0] = new Color(30, 26, 84); + colorArray1[370][0] = new Color((int) sbyte.MaxValue, 116, 194); + colorArray1[372][0] = new Color(252, 128, 201); + colorArray1[371][0] = new Color(249, 101, 189); + colorArray1[376][0] = new Color(160, 120, 92); + colorArray1[378][0] = new Color(160, 120, 100); + colorArray1[379][0] = new Color(251, 209, 240); + colorArray1[382][0] = new Color(28, 216, 94); + colorArray1[383][0] = new Color(221, 136, 144); + colorArray1[384][0] = new Color(131, 206, 12); + colorArray1[385][0] = new Color(87, 21, 144); + colorArray1[386][0] = new Color((int) sbyte.MaxValue, 92, 69); + colorArray1[387][0] = new Color((int) sbyte.MaxValue, 92, 69); + colorArray1[388][0] = new Color((int) sbyte.MaxValue, 92, 69); + colorArray1[389][0] = new Color((int) sbyte.MaxValue, 92, 69); + colorArray1[390][0] = new Color(253, 32, 3); + colorArray1[397][0] = new Color(212, 192, 100); + colorArray1[396][0] = new Color(198, 124, 78); + colorArray1[577][0] = new Color(178, 104, 58); + colorArray1[398][0] = new Color(100, 82, 126); + colorArray1[399][0] = new Color(77, 76, 66); + colorArray1[400][0] = new Color(96, 68, 117); + colorArray1[401][0] = new Color(68, 60, 51); + colorArray1[402][0] = new Color(174, 168, 186); + colorArray1[403][0] = new Color(205, 152, 186); + colorArray1[404][0] = new Color(212, 148, 88); + colorArray1[405][0] = new Color(140, 140, 140); + colorArray1[406][0] = new Color(120, 120, 120); + colorArray1[407][0] = new Color((int) byte.MaxValue, 227, 132); + colorArray1[411][0] = new Color(227, 46, 46); + colorArray1[494][0] = new Color(227, 227, 227); + colorArray1[421][0] = new Color(65, 75, 90); + colorArray1[422][0] = new Color(65, 75, 90); + colorArray1[425][0] = new Color(146, 155, 187); + colorArray1[426][0] = new Color(168, 38, 47); + colorArray1[430][0] = new Color(39, 168, 96); + colorArray1[431][0] = new Color(39, 94, 168); + colorArray1[432][0] = new Color(242, 221, 100); + colorArray1[433][0] = new Color(224, 100, 242); + colorArray1[434][0] = new Color(197, 193, 216); + colorArray1[427][0] = new Color(183, 53, 62); + colorArray1[435][0] = new Color(54, 183, 111); + colorArray1[436][0] = new Color(54, 109, 183); + colorArray1[437][0] = new Color((int) byte.MaxValue, 236, 115); + colorArray1[438][0] = new Color(239, 115, (int) byte.MaxValue); + colorArray1[439][0] = new Color(212, 208, 231); + colorArray1[440][0] = new Color(238, 51, 53); + colorArray1[440][1] = new Color(13, 107, 216); + colorArray1[440][2] = new Color(33, 184, 115); + colorArray1[440][3] = new Color((int) byte.MaxValue, 221, 62); + colorArray1[440][4] = new Color(165, 0, 236); + colorArray1[440][5] = new Color(223, 230, 238); + colorArray1[440][6] = new Color(207, 101, 0); + colorArray1[419][0] = new Color(88, 95, 114); + colorArray1[419][1] = new Color(214, 225, 236); + colorArray1[419][2] = new Color(25, 131, 205); + colorArray1[423][0] = new Color(245, 197, 1); + colorArray1[423][1] = new Color(185, 0, 224); + colorArray1[423][2] = new Color(58, 240, 111); + colorArray1[423][3] = new Color(50, 107, 197); + colorArray1[423][4] = new Color(253, 91, 3); + colorArray1[423][5] = new Color(254, 194, 20); + colorArray1[423][6] = new Color(174, 195, 215); + colorArray1[420][0] = new Color(99, (int) byte.MaxValue, 107); + colorArray1[420][1] = new Color(99, (int) byte.MaxValue, 107); + colorArray1[420][4] = new Color(99, (int) byte.MaxValue, 107); + colorArray1[420][2] = new Color(218, 2, 5); + colorArray1[420][3] = new Color(218, 2, 5); + colorArray1[420][5] = new Color(218, 2, 5); + colorArray1[476][0] = new Color(160, 160, 160); + colorArray1[410][0] = new Color(75, 139, 166); + colorArray1[480][0] = new Color(120, 50, 50); + colorArray1[509][0] = new Color(50, 50, 60); + colorArray1[412][0] = new Color(75, 139, 166); + colorArray1[443][0] = new Color(144, 148, 144); + colorArray1[442][0] = new Color(3, 144, 201); + colorArray1[444][0] = new Color(191, 176, 124); + colorArray1[446][0] = new Color((int) byte.MaxValue, 66, 152); + colorArray1[447][0] = new Color(179, 132, (int) byte.MaxValue); + colorArray1[448][0] = new Color(0, 206, 180); + colorArray1[449][0] = new Color(91, 186, 240); + colorArray1[450][0] = new Color(92, 240, 91); + colorArray1[451][0] = new Color(240, 91, 147); + colorArray1[452][0] = new Color((int) byte.MaxValue, 150, 181); + colorArray1[453][0] = new Color(179, 132, (int) byte.MaxValue); + colorArray1[453][1] = new Color(0, 206, 180); + colorArray1[453][2] = new Color((int) byte.MaxValue, 66, 152); + colorArray1[454][0] = new Color(174, 16, 176); + colorArray1[455][0] = new Color(48, 225, 110); + colorArray1[456][0] = new Color(179, 132, (int) byte.MaxValue); + colorArray1[457][0] = new Color(150, 164, 206); + colorArray1[457][1] = new Color((int) byte.MaxValue, 132, 184); + colorArray1[457][2] = new Color(74, (int) byte.MaxValue, 232); + colorArray1[457][3] = new Color(215, 159, (int) byte.MaxValue); + colorArray1[457][4] = new Color(229, 219, 234); + colorArray1[458][0] = new Color(211, 198, 111); + colorArray1[459][0] = new Color(190, 223, 232); + colorArray1[460][0] = new Color(141, 163, 181); + colorArray1[462][0] = new Color(231, 178, 28); + colorArray1[467][0] = new Color(129, 56, 121); + colorArray1[467][1] = new Color((int) byte.MaxValue, 249, 59); + colorArray1[467][2] = new Color(161, 67, 24); + colorArray1[467][3] = new Color(89, 70, 72); + colorArray1[467][4] = new Color(233, 207, 94); + colorArray1[467][5] = new Color(254, 158, 35); + colorArray1[467][6] = new Color(34, 221, 151); + colorArray1[467][7] = new Color(249, 170, 236); + colorArray1[467][8] = new Color(35, 200, 254); + colorArray1[467][9] = new Color(190, 200, 200); + colorArray1[467][10] = new Color(230, 170, 100); + colorArray1[467][11] = new Color(165, 168, 26); + for (int index = 0; index < 12; ++index) + colorArray1[468][index] = colorArray1[467][index]; + colorArray1[472][0] = new Color(190, 160, 140); + colorArray1[473][0] = new Color(85, 114, 123); + colorArray1[474][0] = new Color(116, 94, 97); + colorArray1[478][0] = new Color(108, 34, 35); + colorArray1[479][0] = new Color(178, 114, 68); + colorArray1[485][0] = new Color(198, 134, 88); + colorArray1[492][0] = new Color(78, 193, 227); + colorArray1[492][0] = new Color(78, 193, 227); + colorArray1[493][0] = new Color(250, 249, 252); + colorArray1[493][1] = new Color(240, 90, 90); + colorArray1[493][2] = new Color(98, 230, 92); + colorArray1[493][3] = new Color(95, 197, 238); + colorArray1[493][4] = new Color(241, 221, 100); + colorArray1[493][5] = new Color(213, 92, 237); + colorArray1[494][0] = new Color(224, 219, 236); + colorArray1[495][0] = new Color(253, 227, 215); + colorArray1[496][0] = new Color(165, 159, 153); + colorArray1[498][0] = new Color(202, 174, 165); + colorArray1[499][0] = new Color(160, 187, 142); + colorArray1[500][0] = new Color(254, 158, 35); + colorArray1[501][0] = new Color(34, 221, 151); + colorArray1[502][0] = new Color(249, 170, 236); + colorArray1[503][0] = new Color(35, 200, 254); + colorArray1[506][0] = new Color(61, 61, 61); + colorArray1[510][0] = new Color(191, 142, 111); + colorArray1[511][0] = new Color(187, 68, 74); + colorArray1[520][0] = new Color(224, 219, 236); + colorArray1[545][0] = new Color((int) byte.MaxValue, 126, 145); + colorArray1[530][0] = new Color(107, 182, 0); + colorArray1[530][1] = new Color(23, 154, 209); + colorArray1[530][2] = new Color(238, 97, 94); + colorArray1[530][3] = new Color(113, 108, 205); + colorArray1[546][0] = new Color(60, 60, 60); + colorArray1[557][0] = new Color(60, 60, 60); + colorArray1[547][0] = new Color(120, 110, 100); + colorArray1[548][0] = new Color(120, 110, 100); + colorArray1[562][0] = new Color(165, 168, 26); + colorArray1[563][0] = new Color(165, 168, 26); + colorArray1[571][0] = new Color(165, 168, 26); + colorArray1[568][0] = new Color(248, 203, 233); + colorArray1[569][0] = new Color(203, 248, 218); + colorArray1[570][0] = new Color(160, 242, (int) byte.MaxValue); + colorArray1[597][0] = new Color(28, 216, 94); + colorArray1[597][1] = new Color(183, 237, 20); + colorArray1[597][2] = new Color(185, 83, 200); + colorArray1[597][3] = new Color(131, 128, 168); + colorArray1[597][4] = new Color(38, 142, 214); + colorArray1[597][5] = new Color(229, 154, 9); + colorArray1[597][6] = new Color(142, 227, 234); + colorArray1[597][7] = new Color(98, 111, 223); + colorArray1[597][8] = new Color(241, 233, 158); + colorArray1[617][0] = new Color(233, 207, 94); + Color color3 = new Color(250, 100, 50); + colorArray1[548][1] = color3; + colorArray1[613][0] = color3; + colorArray1[614][0] = color3; + Color[] colorArray2 = new Color[3] + { + new Color(9, 61, 191), + new Color(253, 32, 3), + new Color(254, 194, 20) + }; + Color[][] colorArray3 = new Color[316][]; + for (int index = 0; index < 316; ++index) + colorArray3[index] = new Color[2]; + colorArray3[158][0] = new Color(107, 49, 154); + colorArray3[163][0] = new Color(154, 148, 49); + colorArray3[162][0] = new Color(49, 49, 154); + colorArray3[160][0] = new Color(49, 154, 68); + colorArray3[161][0] = new Color(154, 49, 77); + colorArray3[159][0] = new Color(85, 89, 118); + colorArray3[157][0] = new Color(154, 83, 49); + colorArray3[154][0] = new Color(221, 79, (int) byte.MaxValue); + colorArray3[166][0] = new Color(250, (int) byte.MaxValue, 79); + colorArray3[165][0] = new Color(79, 102, (int) byte.MaxValue); + colorArray3[156][0] = new Color(79, (int) byte.MaxValue, 89); + colorArray3[164][0] = new Color((int) byte.MaxValue, 79, 79); + colorArray3[155][0] = new Color(240, 240, 247); + colorArray3[153][0] = new Color((int) byte.MaxValue, 145, 79); + colorArray3[169][0] = new Color(5, 5, 5); + colorArray3[224][0] = new Color(57, 55, 52); + colorArray3[225][0] = new Color(68, 68, 68); + colorArray3[226][0] = new Color(148, 138, 74); + colorArray3[227][0] = new Color(95, 137, 191); + colorArray3[170][0] = new Color(59, 39, 22); + colorArray3[171][0] = new Color(59, 39, 22); + color1 = new Color(52, 52, 52); + colorArray3[1][0] = color1; + colorArray3[53][0] = color1; + colorArray3[52][0] = color1; + colorArray3[51][0] = color1; + colorArray3[50][0] = color1; + colorArray3[49][0] = color1; + colorArray3[48][0] = color1; + colorArray3[44][0] = color1; + colorArray3[5][0] = color1; + color1 = new Color(88, 61, 46); + colorArray3[2][0] = color1; + colorArray3[16][0] = color1; + colorArray3[59][0] = color1; + colorArray3[3][0] = new Color(61, 58, 78); + colorArray3[4][0] = new Color(73, 51, 36); + colorArray3[6][0] = new Color(91, 30, 30); + color1 = new Color(27, 31, 42); + colorArray3[7][0] = color1; + colorArray3[17][0] = color1; + color1 = new Color(32, 40, 45); + colorArray3[94][0] = color1; + colorArray3[100][0] = color1; + color1 = new Color(44, 41, 50); + colorArray3[95][0] = color1; + colorArray3[101][0] = color1; + color1 = new Color(31, 39, 26); + colorArray3[8][0] = color1; + colorArray3[18][0] = color1; + color1 = new Color(36, 45, 44); + colorArray3[98][0] = color1; + colorArray3[104][0] = color1; + color1 = new Color(38, 49, 50); + colorArray3[99][0] = color1; + colorArray3[105][0] = color1; + color1 = new Color(41, 28, 36); + colorArray3[9][0] = color1; + colorArray3[19][0] = color1; + color1 = new Color(72, 50, 77); + colorArray3[96][0] = color1; + colorArray3[102][0] = color1; + color1 = new Color(78, 50, 69); + colorArray3[97][0] = color1; + colorArray3[103][0] = color1; + colorArray3[10][0] = new Color(74, 62, 12); + colorArray3[11][0] = new Color(46, 56, 59); + colorArray3[12][0] = new Color(75, 32, 11); + colorArray3[13][0] = new Color(67, 37, 37); + color1 = new Color(15, 15, 15); + colorArray3[14][0] = color1; + colorArray3[20][0] = color1; + colorArray3[15][0] = new Color(52, 43, 45); + colorArray3[22][0] = new Color(113, 99, 99); + colorArray3[23][0] = new Color(38, 38, 43); + colorArray3[24][0] = new Color(53, 39, 41); + colorArray3[25][0] = new Color(11, 35, 62); + colorArray3[26][0] = new Color(21, 63, 70); + colorArray3[27][0] = new Color(88, 61, 46); + colorArray3[27][1] = new Color(52, 52, 52); + colorArray3[28][0] = new Color(81, 84, 101); + colorArray3[29][0] = new Color(88, 23, 23); + colorArray3[30][0] = new Color(28, 88, 23); + colorArray3[31][0] = new Color(78, 87, 99); + color1 = new Color(69, 67, 41); + colorArray3[34][0] = color1; + colorArray3[37][0] = color1; + colorArray3[32][0] = new Color(86, 17, 40); + colorArray3[33][0] = new Color(49, 47, 83); + colorArray3[35][0] = new Color(51, 51, 70); + colorArray3[36][0] = new Color(87, 59, 55); + colorArray3[38][0] = new Color(49, 57, 49); + colorArray3[39][0] = new Color(78, 79, 73); + colorArray3[45][0] = new Color(60, 59, 51); + colorArray3[46][0] = new Color(48, 57, 47); + colorArray3[47][0] = new Color(71, 77, 85); + colorArray3[40][0] = new Color(85, 102, 103); + colorArray3[41][0] = new Color(52, 50, 62); + colorArray3[42][0] = new Color(71, 42, 44); + colorArray3[43][0] = new Color(73, 66, 50); + colorArray3[54][0] = new Color(40, 56, 50); + colorArray3[55][0] = new Color(49, 48, 36); + colorArray3[56][0] = new Color(43, 33, 32); + colorArray3[57][0] = new Color(31, 40, 49); + colorArray3[58][0] = new Color(48, 35, 52); + colorArray3[60][0] = new Color(1, 52, 20); + colorArray3[61][0] = new Color(55, 39, 26); + colorArray3[62][0] = new Color(39, 33, 26); + colorArray3[69][0] = new Color(43, 42, 68); + colorArray3[70][0] = new Color(30, 70, 80); + color1 = new Color(30, 80, 48); + colorArray3[63][0] = color1; + colorArray3[65][0] = color1; + colorArray3[66][0] = color1; + colorArray3[68][0] = color1; + color1 = new Color(53, 80, 30); + colorArray3[64][0] = color1; + colorArray3[67][0] = color1; + colorArray3[78][0] = new Color(63, 39, 26); + colorArray3[244][0] = new Color(63, 39, 26); + colorArray3[71][0] = new Color(78, 105, 135); + colorArray3[72][0] = new Color(52, 84, 12); + colorArray3[73][0] = new Color(190, 204, 223); + color1 = new Color(64, 62, 80); + colorArray3[74][0] = color1; + colorArray3[80][0] = color1; + colorArray3[75][0] = new Color(65, 65, 35); + colorArray3[76][0] = new Color(20, 46, 104); + colorArray3[77][0] = new Color(61, 13, 16); + colorArray3[79][0] = new Color(51, 47, 96); + colorArray3[81][0] = new Color(101, 51, 51); + colorArray3[82][0] = new Color(77, 64, 34); + colorArray3[83][0] = new Color(62, 38, 41); + colorArray3[234][0] = new Color(60, 36, 39); + colorArray3[84][0] = new Color(48, 78, 93); + colorArray3[85][0] = new Color(54, 63, 69); + color1 = new Color(138, 73, 38); + colorArray3[86][0] = color1; + colorArray3[108][0] = color1; + color1 = new Color(50, 15, 8); + colorArray3[87][0] = color1; + colorArray3[112][0] = color1; + colorArray3[109][0] = new Color(94, 25, 17); + colorArray3[110][0] = new Color(125, 36, 122); + colorArray3[111][0] = new Color(51, 35, 27); + colorArray3[113][0] = new Color(135, 58, 0); + colorArray3[114][0] = new Color(65, 52, 15); + colorArray3[115][0] = new Color(39, 42, 51); + colorArray3[116][0] = new Color(89, 26, 27); + colorArray3[117][0] = new Color(126, 123, 115); + colorArray3[118][0] = new Color(8, 50, 19); + colorArray3[119][0] = new Color(95, 21, 24); + colorArray3[120][0] = new Color(17, 31, 65); + colorArray3[121][0] = new Color(192, 173, 143); + colorArray3[122][0] = new Color(114, 114, 131); + colorArray3[123][0] = new Color(136, 119, 7); + colorArray3[124][0] = new Color(8, 72, 3); + colorArray3[125][0] = new Color(117, 132, 82); + colorArray3[126][0] = new Color(100, 102, 114); + colorArray3[(int) sbyte.MaxValue][0] = new Color(30, 118, 226); + colorArray3[128][0] = new Color(93, 6, 102); + colorArray3[129][0] = new Color(64, 40, 169); + colorArray3[130][0] = new Color(39, 34, 180); + colorArray3[131][0] = new Color(87, 94, 125); + colorArray3[132][0] = new Color(6, 6, 6); + colorArray3[133][0] = new Color(69, 72, 186); + colorArray3[134][0] = new Color(130, 62, 16); + colorArray3[135][0] = new Color(22, 123, 163); + colorArray3[136][0] = new Color(40, 86, 151); + colorArray3[137][0] = new Color(183, 75, 15); + colorArray3[138][0] = new Color(83, 80, 100); + colorArray3[139][0] = new Color(115, 65, 68); + colorArray3[140][0] = new Color(119, 108, 81); + colorArray3[141][0] = new Color(59, 67, 71); + colorArray3[142][0] = new Color(17, 172, 143); + colorArray3[143][0] = new Color(90, 112, 105); + colorArray3[144][0] = new Color(62, 28, 87); + colorArray3[146][0] = new Color(120, 59, 19); + colorArray3[147][0] = new Color(59, 59, 59); + colorArray3[148][0] = new Color(229, 218, 161); + colorArray3[149][0] = new Color(73, 59, 50); + colorArray3[151][0] = new Color(102, 75, 34); + colorArray3[167][0] = new Color(70, 68, 51); + colorArray3[172][0] = new Color(163, 96, 0); + colorArray3[242][0] = new Color(5, 5, 5); + colorArray3[243][0] = new Color(5, 5, 5); + colorArray3[173][0] = new Color(94, 163, 46); + colorArray3[174][0] = new Color(117, 32, 59); + colorArray3[175][0] = new Color(20, 11, 203); + colorArray3[176][0] = new Color(74, 69, 88); + colorArray3[177][0] = new Color(60, 30, 30); + colorArray3[183][0] = new Color(111, 117, 135); + colorArray3[179][0] = new Color(111, 117, 135); + colorArray3[178][0] = new Color(111, 117, 135); + colorArray3[184][0] = new Color(25, 23, 54); + colorArray3[181][0] = new Color(25, 23, 54); + colorArray3[180][0] = new Color(25, 23, 54); + colorArray3[182][0] = new Color(74, 71, 129); + colorArray3[185][0] = new Color(52, 52, 52); + colorArray3[186][0] = new Color(38, 9, 66); + colorArray3[216][0] = new Color(158, 100, 64); + colorArray3[217][0] = new Color(62, 45, 75); + colorArray3[218][0] = new Color(57, 14, 12); + colorArray3[219][0] = new Color(96, 72, 133); + colorArray3[187][0] = new Color(149, 80, 51); + colorArray3[235][0] = new Color(140, 75, 48); + colorArray3[220][0] = new Color(67, 55, 80); + colorArray3[221][0] = new Color(64, 37, 29); + colorArray3[222][0] = new Color(70, 51, 91); + colorArray3[188][0] = new Color(82, 63, 80); + colorArray3[189][0] = new Color(65, 61, 77); + colorArray3[190][0] = new Color(64, 65, 92); + colorArray3[191][0] = new Color(76, 53, 84); + colorArray3[192][0] = new Color(144, 67, 52); + colorArray3[193][0] = new Color(149, 48, 48); + colorArray3[194][0] = new Color(111, 32, 36); + colorArray3[195][0] = new Color(147, 48, 55); + colorArray3[196][0] = new Color(97, 67, 51); + colorArray3[197][0] = new Color(112, 80, 62); + colorArray3[198][0] = new Color(88, 61, 46); + colorArray3[199][0] = new Color((int) sbyte.MaxValue, 94, 76); + colorArray3[200][0] = new Color(143, 50, 123); + colorArray3[201][0] = new Color(136, 120, 131); + colorArray3[202][0] = new Color(219, 92, 143); + colorArray3[203][0] = new Color(113, 64, 150); + colorArray3[204][0] = new Color(74, 67, 60); + colorArray3[205][0] = new Color(60, 78, 59); + colorArray3[206][0] = new Color(0, 54, 21); + colorArray3[207][0] = new Color(74, 97, 72); + colorArray3[208][0] = new Color(40, 37, 35); + colorArray3[209][0] = new Color(77, 63, 66); + colorArray3[210][0] = new Color(111, 6, 6); + colorArray3[211][0] = new Color(88, 67, 59); + colorArray3[212][0] = new Color(88, 87, 80); + colorArray3[213][0] = new Color(71, 71, 67); + colorArray3[214][0] = new Color(76, 52, 60); + colorArray3[215][0] = new Color(89, 48, 59); + colorArray3[223][0] = new Color(51, 18, 4); + colorArray3[228][0] = new Color(160, 2, 75); + colorArray3[229][0] = new Color(100, 55, 164); + colorArray3[230][0] = new Color(0, 117, 101); + colorArray3[236][0] = new Color((int) sbyte.MaxValue, 49, 44); + colorArray3[231][0] = new Color(110, 90, 78); + colorArray3[232][0] = new Color(47, 69, 75); + colorArray3[233][0] = new Color(91, 67, 70); + colorArray3[237][0] = new Color(200, 44, 18); + colorArray3[238][0] = new Color(24, 93, 66); + colorArray3[239][0] = new Color(160, 87, 234); + colorArray3[240][0] = new Color(6, 106, (int) byte.MaxValue); + colorArray3[245][0] = new Color(102, 102, 102); + colorArray3[315][0] = new Color(181, 230, 29); + colorArray3[246][0] = new Color(61, 58, 78); + colorArray3[247][0] = new Color(52, 43, 45); + colorArray3[248][0] = new Color(81, 84, 101); + colorArray3[249][0] = new Color(85, 102, 103); + colorArray3[250][0] = new Color(52, 52, 52); + colorArray3[251][0] = new Color(52, 52, 52); + colorArray3[252][0] = new Color(52, 52, 52); + colorArray3[253][0] = new Color(52, 52, 52); + colorArray3[254][0] = new Color(52, 52, 52); + colorArray3[(int) byte.MaxValue][0] = new Color(52, 52, 52); + colorArray3[314][0] = new Color(52, 52, 52); + colorArray3[256][0] = new Color(40, 56, 50); + colorArray3[257][0] = new Color(49, 48, 36); + colorArray3[258][0] = new Color(43, 33, 32); + colorArray3[259][0] = new Color(31, 40, 49); + colorArray3[260][0] = new Color(48, 35, 52); + colorArray3[261][0] = new Color(88, 61, 46); + colorArray3[262][0] = new Color(55, 39, 26); + colorArray3[263][0] = new Color(39, 33, 26); + colorArray3[264][0] = new Color(43, 42, 68); + colorArray3[265][0] = new Color(30, 70, 80); + colorArray3[266][0] = new Color(78, 105, 135); + colorArray3[267][0] = new Color(51, 47, 96); + colorArray3[268][0] = new Color(101, 51, 51); + colorArray3[269][0] = new Color(62, 38, 41); + colorArray3[270][0] = new Color(59, 39, 22); + colorArray3[271][0] = new Color(59, 39, 22); + colorArray3[272][0] = new Color(111, 117, 135); + colorArray3[273][0] = new Color(25, 23, 54); + colorArray3[274][0] = new Color(52, 52, 52); + colorArray3[275][0] = new Color(149, 80, 51); + colorArray3[276][0] = new Color(82, 63, 80); + colorArray3[277][0] = new Color(65, 61, 77); + colorArray3[278][0] = new Color(64, 65, 92); + colorArray3[279][0] = new Color(76, 53, 84); + colorArray3[280][0] = new Color(144, 67, 52); + colorArray3[281][0] = new Color(149, 48, 48); + colorArray3[282][0] = new Color(111, 32, 36); + colorArray3[283][0] = new Color(147, 48, 55); + colorArray3[284][0] = new Color(97, 67, 51); + colorArray3[285][0] = new Color(112, 80, 62); + colorArray3[286][0] = new Color(88, 61, 46); + colorArray3[287][0] = new Color((int) sbyte.MaxValue, 94, 76); + colorArray3[288][0] = new Color(143, 50, 123); + colorArray3[289][0] = new Color(136, 120, 131); + colorArray3[290][0] = new Color(219, 92, 143); + colorArray3[291][0] = new Color(113, 64, 150); + colorArray3[292][0] = new Color(74, 67, 60); + colorArray3[293][0] = new Color(60, 78, 59); + colorArray3[294][0] = new Color(0, 54, 21); + colorArray3[295][0] = new Color(74, 97, 72); + colorArray3[296][0] = new Color(40, 37, 35); + colorArray3[297][0] = new Color(77, 63, 66); + colorArray3[298][0] = new Color(111, 6, 6); + colorArray3[299][0] = new Color(88, 67, 59); + colorArray3[300][0] = new Color(88, 87, 80); + colorArray3[301][0] = new Color(71, 71, 67); + colorArray3[302][0] = new Color(76, 52, 60); + colorArray3[303][0] = new Color(89, 48, 59); + colorArray3[304][0] = new Color(158, 100, 64); + colorArray3[305][0] = new Color(62, 45, 75); + colorArray3[306][0] = new Color(57, 14, 12); + colorArray3[307][0] = new Color(96, 72, 133); + colorArray3[308][0] = new Color(67, 55, 80); + colorArray3[309][0] = new Color(64, 37, 29); + colorArray3[310][0] = new Color(70, 51, 91); + colorArray3[311][0] = new Color(51, 18, 4); + colorArray3[312][0] = new Color(78, 110, 51); + colorArray3[313][0] = new Color(78, 110, 51); + Color[] colorArray4 = new Color[256]; + Color color4 = new Color(50, 40, (int) byte.MaxValue); + Color color5 = new Color(145, 185, (int) byte.MaxValue); + for (int index = 0; index < colorArray4.Length; ++index) + { + float num1 = (float) index / (float) colorArray4.Length; + float num2 = 1f - num1; + colorArray4[index] = new Color((int) (byte) ((double) color4.R * (double) num2 + (double) color5.R * (double) num1), (int) (byte) ((double) color4.G * (double) num2 + (double) color5.G * (double) num1), (int) (byte) ((double) color4.B * (double) num2 + (double) color5.B * (double) num1)); + } + Color[] colorArray5 = new Color[256]; + Color color6 = new Color(88, 61, 46); + Color color7 = new Color(37, 78, 123); + for (int index = 0; index < colorArray5.Length; ++index) + { + float num3 = (float) index / (float) byte.MaxValue; + float num4 = 1f - num3; + colorArray5[index] = new Color((int) (byte) ((double) color6.R * (double) num4 + (double) color7.R * (double) num3), (int) (byte) ((double) color6.G * (double) num4 + (double) color7.G * (double) num3), (int) (byte) ((double) color6.B * (double) num4 + (double) color7.B * (double) num3)); + } + Color[] colorArray6 = new Color[256]; + Color color8 = new Color(74, 67, 60); + color7 = new Color(53, 70, 97); + for (int index = 0; index < colorArray6.Length; ++index) + { + float num5 = (float) index / (float) byte.MaxValue; + float num6 = 1f - num5; + colorArray6[index] = new Color((int) (byte) ((double) color8.R * (double) num6 + (double) color7.R * (double) num5), (int) (byte) ((double) color8.G * (double) num6 + (double) color7.G * (double) num5), (int) (byte) ((double) color8.B * (double) num6 + (double) color7.B * (double) num5)); + } + Color color9 = new Color(50, 44, 38); + int num7 = 0; + MapHelper.tileOptionCounts = new int[623]; + for (int index1 = 0; index1 < 623; ++index1) + { + Color[] colorArray7 = colorArray1[index1]; + int index2 = 0; + while (index2 < 12 && !(colorArray7[index2] == Color.Transparent)) + ++index2; + MapHelper.tileOptionCounts[index1] = index2; + num7 += index2; + } + MapHelper.wallOptionCounts = new int[316]; + for (int index3 = 0; index3 < 316; ++index3) + { + Color[] colorArray8 = colorArray3[index3]; + int index4 = 0; + while (index4 < 2 && !(colorArray8[index4] == Color.Transparent)) + ++index4; + MapHelper.wallOptionCounts[index3] = index4; + num7 += index4; + } + MapHelper.colorLookup = new Color[num7 + 773]; + MapHelper.colorLookup[0] = Color.Transparent; + ushort num8 = 1; + MapHelper.tilePosition = num8; + MapHelper.tileLookup = new ushort[623]; + for (int index5 = 0; index5 < 623; ++index5) + { + if (MapHelper.tileOptionCounts[index5] > 0) + { + Color[] colorArray9 = colorArray1[index5]; + MapHelper.tileLookup[index5] = num8; + for (int index6 = 0; index6 < MapHelper.tileOptionCounts[index5]; ++index6) + { + MapHelper.colorLookup[(int) num8] = colorArray1[index5][index6]; + ++num8; + } + } + else + MapHelper.tileLookup[index5] = (ushort) 0; + } + MapHelper.wallPosition = num8; + MapHelper.wallLookup = new ushort[316]; + MapHelper.wallRangeStart = num8; + for (int index7 = 0; index7 < 316; ++index7) + { + if (MapHelper.wallOptionCounts[index7] > 0) + { + Color[] colorArray10 = colorArray3[index7]; + MapHelper.wallLookup[index7] = num8; + for (int index8 = 0; index8 < MapHelper.wallOptionCounts[index7]; ++index8) + { + MapHelper.colorLookup[(int) num8] = colorArray3[index7][index8]; + ++num8; + } + } + else + MapHelper.wallLookup[index7] = (ushort) 0; + } + MapHelper.wallRangeEnd = num8; + MapHelper.liquidPosition = num8; + for (int index = 0; index < 3; ++index) + { + MapHelper.colorLookup[(int) num8] = colorArray2[index]; + ++num8; + } + MapHelper.skyPosition = num8; + for (int index = 0; index < 256; ++index) + { + MapHelper.colorLookup[(int) num8] = colorArray4[index]; + ++num8; + } + MapHelper.dirtPosition = num8; + for (int index = 0; index < 256; ++index) + { + MapHelper.colorLookup[(int) num8] = colorArray5[index]; + ++num8; + } + MapHelper.rockPosition = num8; + for (int index = 0; index < 256; ++index) + { + MapHelper.colorLookup[(int) num8] = colorArray6[index]; + ++num8; + } + MapHelper.hellPosition = num8; + MapHelper.colorLookup[(int) num8] = color9; + MapHelper.snowTypes = new ushort[6]; + MapHelper.snowTypes[0] = MapHelper.tileLookup[147]; + MapHelper.snowTypes[1] = MapHelper.tileLookup[161]; + MapHelper.snowTypes[2] = MapHelper.tileLookup[162]; + MapHelper.snowTypes[3] = MapHelper.tileLookup[163]; + MapHelper.snowTypes[4] = MapHelper.tileLookup[164]; + MapHelper.snowTypes[5] = MapHelper.tileLookup[200]; + Lang.BuildMapAtlas(); + } + + public static void ResetMapData() => MapHelper.numUpdateTile = 0; + + public static bool HasOption(int tileType, int option) => option < MapHelper.tileOptionCounts[tileType]; + + public static int TileToLookup(int tileType, int option) => (int) MapHelper.tileLookup[tileType] + option; + + public static int LookupCount() => MapHelper.colorLookup.Length; + + private static void MapColor(ushort type, ref Color oldColor, byte colorType) + { + Color color = WorldGen.paintColor((int) colorType); + float num1 = (float) oldColor.R / (float) byte.MaxValue; + float num2 = (float) oldColor.G / (float) byte.MaxValue; + float num3 = (float) oldColor.B / (float) byte.MaxValue; + if ((double) num2 > (double) num1) + num1 = num2; + if ((double) num3 > (double) num1) + { + double num4 = (double) num1; + num1 = num3; + num3 = (float) num4; + } + switch (colorType) + { + case 29: + float num5 = num3 * 0.3f; + oldColor.R = (byte) ((double) color.R * (double) num5); + oldColor.G = (byte) ((double) color.G * (double) num5); + oldColor.B = (byte) ((double) color.B * (double) num5); + break; + case 30: + if ((int) type >= (int) MapHelper.wallRangeStart && (int) type <= (int) MapHelper.wallRangeEnd) + { + oldColor.R = (byte) ((double) ((int) byte.MaxValue - (int) oldColor.R) * 0.5); + oldColor.G = (byte) ((double) ((int) byte.MaxValue - (int) oldColor.G) * 0.5); + oldColor.B = (byte) ((double) ((int) byte.MaxValue - (int) oldColor.B) * 0.5); + break; + } + oldColor.R = (byte) ((uint) byte.MaxValue - (uint) oldColor.R); + oldColor.G = (byte) ((uint) byte.MaxValue - (uint) oldColor.G); + oldColor.B = (byte) ((uint) byte.MaxValue - (uint) oldColor.B); + break; + case 31: + break; + default: + float num6 = num1; + oldColor.R = (byte) ((double) color.R * (double) num6); + oldColor.G = (byte) ((double) color.G * (double) num6); + oldColor.B = (byte) ((double) color.B * (double) num6); + break; + } + } + + public static Color GetMapTileXnaColor(ref MapTile tile) + { + Color oldColor = MapHelper.colorLookup[(int) tile.Type]; + byte color = tile.Color; + if (color > (byte) 0) + MapHelper.MapColor(tile.Type, ref oldColor, color); + if (tile.Light == byte.MaxValue || color == (byte) 31) + return oldColor; + float num = (float) tile.Light / (float) byte.MaxValue; + oldColor.R = (byte) ((double) oldColor.R * (double) num); + oldColor.G = (byte) ((double) oldColor.G * (double) num); + oldColor.B = (byte) ((double) oldColor.B * (double) num); + return oldColor; + } + + public static MapTile CreateMapTile(int i, int j, byte Light) + { + Tile tileCache = Main.tile[i, j]; + if (tileCache == null) + return new MapTile(); + int num1 = 0; + int num2 = (int) Light; + MapTile mapTile = Main.Map[i, j]; + int num3 = 0; + int baseOption = 0; + if (tileCache.active()) + { + int type = (int) tileCache.type; + num3 = (int) MapHelper.tileLookup[type]; + switch (type) + { + case 5: + if (WorldGen.IsThisAMushroomTree(i, j)) + baseOption = 1; + num1 = (int) tileCache.color(); + goto label_11; + case 51: + if ((i + j) % 2 == 0) + { + num3 = 0; + break; + } + break; + } + if (num3 != 0) + { + num1 = type != 160 ? (int) tileCache.color() : 0; + MapHelper.GetTileBaseOption(j, tileCache, ref baseOption); + } + } +label_11: + if (num3 == 0) + { + if (tileCache.liquid > (byte) 32) + { + int num4 = (int) tileCache.liquidType(); + num3 = (int) MapHelper.liquidPosition + num4; + } + else if (tileCache.wall > (ushort) 0 && tileCache.wall < (ushort) 316) + { + int wall = (int) tileCache.wall; + num3 = (int) MapHelper.wallLookup[wall]; + num1 = (int) tileCache.wallColor(); + switch (wall) + { + case 21: + case 88: + case 89: + case 90: + case 91: + case 92: + case 93: + case 168: + case 241: + num1 = 0; + break; + case 27: + baseOption = i % 2; + break; + default: + baseOption = 0; + break; + } + } + } + if (num3 == 0) + { + if ((double) j < Main.worldSurface) + { + int num5 = (int) (byte) ((double) byte.MaxValue * ((double) j / Main.worldSurface)); + num3 = (int) MapHelper.skyPosition + num5; + num2 = (int) byte.MaxValue; + num1 = 0; + } + else if (j < Main.UnderworldLayer) + { + num1 = 0; + byte num6 = 0; + float num7 = (float) ((double) Main.screenPosition.X / 16.0 - 5.0); + float num8 = (float) (((double) Main.screenPosition.X + (double) Main.screenWidth) / 16.0 + 5.0); + float num9 = (float) ((double) Main.screenPosition.Y / 16.0 - 5.0); + float num10 = (float) (((double) Main.screenPosition.Y + (double) Main.screenHeight) / 16.0 + 5.0); + if (((double) i < (double) num7 || (double) i > (double) num8 || (double) j < (double) num9 || (double) j > (double) num10) && i > 40 && i < Main.maxTilesX - 40 && j > 40 && j < Main.maxTilesY - 40) + { + for (int x = i - 36; x <= i + 30; x += 10) + { + for (int y = j - 36; y <= j + 30; y += 10) + { + int type = (int) Main.Map[x, y].Type; + for (int index = 0; index < MapHelper.snowTypes.Length; ++index) + { + if ((int) MapHelper.snowTypes[index] == type) + { + num6 = byte.MaxValue; + x = i + 31; + y = j + 31; + break; + } + } + } + } + } + else + { + float num11 = (float) Main.SceneMetrics.SnowTileCount / (float) SceneMetrics.SnowTileMax * (float) byte.MaxValue; + if ((double) num11 > (double) byte.MaxValue) + num11 = (float) byte.MaxValue; + num6 = (byte) num11; + } + num3 = (double) j >= Main.rockLayer ? (int) MapHelper.rockPosition + (int) num6 : (int) MapHelper.dirtPosition + (int) num6; + } + else + num3 = (int) MapHelper.hellPosition; + } + return MapTile.Create((ushort) (num3 + baseOption), (byte) num2, (byte) num1); + } + + public static void GetTileBaseOption(int y, Tile tileCache, ref int baseOption) + { + switch (tileCache.type) + { + case 4: + if (tileCache.frameX < (short) 66) + baseOption = 1; + baseOption = 0; + break; + case 15: + int num1 = (int) tileCache.frameY / 40; + baseOption = 0; + if (num1 != 1 && num1 != 20) + break; + baseOption = 1; + break; + case 21: + case 441: + switch ((int) tileCache.frameX / 36) + { + case 1: + case 2: + case 10: + case 13: + case 15: + baseOption = 1; + return; + case 3: + case 4: + baseOption = 2; + return; + case 6: + baseOption = 3; + return; + case 11: + case 17: + baseOption = 4; + return; + default: + baseOption = 0; + return; + } + case 26: + if (tileCache.frameX >= (short) 54) + { + baseOption = 1; + break; + } + baseOption = 0; + break; + case 27: + if (tileCache.frameY < (short) 34) + { + baseOption = 1; + break; + } + baseOption = 0; + break; + case 28: + if (tileCache.frameY < (short) 144) + { + baseOption = 0; + break; + } + if (tileCache.frameY < (short) 252) + { + baseOption = 1; + break; + } + if (tileCache.frameY < (short) 360 || tileCache.frameY > (short) 900 && tileCache.frameY < (short) 1008) + { + baseOption = 2; + break; + } + if (tileCache.frameY < (short) 468) + { + baseOption = 3; + break; + } + if (tileCache.frameY < (short) 576) + { + baseOption = 4; + break; + } + if (tileCache.frameY < (short) 684) + { + baseOption = 5; + break; + } + if (tileCache.frameY < (short) 792) + { + baseOption = 6; + break; + } + if (tileCache.frameY < (short) 898) + { + baseOption = 8; + break; + } + if (tileCache.frameY < (short) 1006) + { + baseOption = 7; + break; + } + if (tileCache.frameY < (short) 1114) + { + baseOption = 0; + break; + } + if (tileCache.frameY < (short) 1222) + { + baseOption = 3; + break; + } + baseOption = 7; + break; + case 31: + if (tileCache.frameX >= (short) 36) + { + baseOption = 1; + break; + } + baseOption = 0; + break; + case 82: + case 83: + case 84: + if (tileCache.frameX < (short) 18) + { + baseOption = 0; + break; + } + if (tileCache.frameX < (short) 36) + { + baseOption = 1; + break; + } + if (tileCache.frameX < (short) 54) + { + baseOption = 2; + break; + } + if (tileCache.frameX < (short) 72) + { + baseOption = 3; + break; + } + if (tileCache.frameX < (short) 90) + { + baseOption = 4; + break; + } + if (tileCache.frameX < (short) 108) + { + baseOption = 5; + break; + } + baseOption = 6; + break; + case 105: + if (tileCache.frameX >= (short) 1548 && tileCache.frameX <= (short) 1654) + { + baseOption = 1; + break; + } + if (tileCache.frameX >= (short) 1656 && tileCache.frameX <= (short) 1798) + { + baseOption = 2; + break; + } + baseOption = 0; + break; + case 133: + if (tileCache.frameX < (short) 52) + { + baseOption = 0; + break; + } + baseOption = 1; + break; + case 134: + if (tileCache.frameX < (short) 28) + { + baseOption = 0; + break; + } + baseOption = 1; + break; + case 137: + if (tileCache.frameY == (short) 0) + { + baseOption = 0; + break; + } + baseOption = 1; + break; + case 149: + baseOption = y % 3; + break; + case 160: + baseOption = y % 3; + break; + case 165: + if (tileCache.frameX < (short) 54) + { + baseOption = 0; + break; + } + if (tileCache.frameX < (short) 106) + { + baseOption = 1; + break; + } + if (tileCache.frameX >= (short) 216) + { + baseOption = 1; + break; + } + if (tileCache.frameX < (short) 162) + { + baseOption = 2; + break; + } + baseOption = 3; + break; + case 178: + if (tileCache.frameX < (short) 18) + { + baseOption = 0; + break; + } + if (tileCache.frameX < (short) 36) + { + baseOption = 1; + break; + } + if (tileCache.frameX < (short) 54) + { + baseOption = 2; + break; + } + if (tileCache.frameX < (short) 72) + { + baseOption = 3; + break; + } + if (tileCache.frameX < (short) 90) + { + baseOption = 4; + break; + } + if (tileCache.frameX < (short) 108) + { + baseOption = 5; + break; + } + baseOption = 6; + break; + case 184: + if (tileCache.frameX < (short) 22) + { + baseOption = 0; + break; + } + if (tileCache.frameX < (short) 44) + { + baseOption = 1; + break; + } + if (tileCache.frameX < (short) 66) + { + baseOption = 2; + break; + } + if (tileCache.frameX < (short) 88) + { + baseOption = 3; + break; + } + if (tileCache.frameX < (short) 110) + { + baseOption = 4; + break; + } + if (tileCache.frameX < (short) 132) + { + baseOption = 5; + break; + } + if (tileCache.frameX < (short) 154) + { + baseOption = 6; + break; + } + if (tileCache.frameX < (short) 176) + { + baseOption = 7; + break; + } + if (tileCache.frameX >= (short) 198) + break; + baseOption = 8; + break; + case 185: + if (tileCache.frameY < (short) 18) + { + int num2 = (int) tileCache.frameX / 18; + if (num2 < 6 || num2 == 28 || num2 == 29 || num2 == 30 || num2 == 31 || num2 == 32) + { + baseOption = 0; + break; + } + if (num2 < 12 || num2 == 33 || num2 == 34 || num2 == 35) + { + baseOption = 1; + break; + } + if (num2 < 28) + { + baseOption = 2; + break; + } + if (num2 < 48) + { + baseOption = 3; + break; + } + if (num2 < 54) + { + baseOption = 4; + break; + } + if (num2 < 72) + { + baseOption = 0; + break; + } + if (num2 != 72) + break; + baseOption = 1; + break; + } + int num3 = (int) tileCache.frameX / 36 + ((int) tileCache.frameY / 18 - 1) * 18; + if (num3 < 6 || num3 == 19 || num3 == 20 || num3 == 21 || num3 == 22 || num3 == 23 || num3 == 24 || num3 == 33 || num3 == 38 || num3 == 39 || num3 == 40) + { + baseOption = 0; + break; + } + if (num3 < 16) + { + baseOption = 2; + break; + } + if (num3 < 19 || num3 == 31 || num3 == 32) + { + baseOption = 1; + break; + } + if (num3 < 31) + { + baseOption = 3; + break; + } + if (num3 < 38) + { + baseOption = 4; + break; + } + if (num3 < 59) + { + baseOption = 0; + break; + } + if (num3 >= 62) + break; + baseOption = 1; + break; + case 186: + int num4 = (int) tileCache.frameX / 54; + if (num4 < 7) + { + baseOption = 2; + break; + } + if (num4 < 22 || num4 == 33 || num4 == 34 || num4 == 35) + { + baseOption = 0; + break; + } + if (num4 < 25) + { + baseOption = 1; + break; + } + if (num4 == 25) + { + baseOption = 5; + break; + } + if (num4 >= 32) + break; + baseOption = 3; + break; + case 187: + int num5 = (int) tileCache.frameX / 54 + (int) tileCache.frameY / 36 * 36; + if (num5 < 3 || num5 == 14 || num5 == 15 || num5 == 16) + { + baseOption = 0; + break; + } + if (num5 < 6) + { + baseOption = 6; + break; + } + if (num5 < 9) + { + baseOption = 7; + break; + } + if (num5 < 14) + { + baseOption = 4; + break; + } + if (num5 < 18) + { + baseOption = 4; + break; + } + if (num5 < 23) + { + baseOption = 8; + break; + } + if (num5 < 25) + { + baseOption = 0; + break; + } + if (num5 < 29) + { + baseOption = 1; + break; + } + if (num5 < 47) + { + baseOption = 0; + break; + } + if (num5 < 50) + { + baseOption = 1; + break; + } + if (num5 < 52) + { + baseOption = 10; + break; + } + if (num5 >= 55) + break; + baseOption = 2; + break; + case 227: + baseOption = (int) tileCache.frameX / 34; + break; + case 240: + int num6 = (int) tileCache.frameX / 54 + (int) tileCache.frameY / 54 * 36; + if (num6 >= 0 && num6 <= 11 || num6 >= 47 && num6 <= 53 || num6 == 72) + { + baseOption = 0; + break; + } + if (num6 >= 12 && num6 <= 15) + { + baseOption = 1; + break; + } + if (num6 == 16 || num6 == 17) + { + baseOption = 2; + break; + } + if (num6 >= 18 && num6 <= 35 || num6 >= 63 && num6 <= 71) + { + baseOption = 1; + break; + } + if (num6 >= 41 && num6 <= 45) + { + baseOption = 3; + break; + } + if (num6 != 46) + break; + baseOption = 4; + break; + case 242: + switch ((int) tileCache.frameY / 72) + { + case 22: + case 23: + case 24: + baseOption = 1; + return; + default: + baseOption = 0; + return; + } + case 419: + int num7 = (int) tileCache.frameX / 18; + if (num7 > 2) + num7 = 2; + baseOption = num7; + break; + case 420: + int num8 = (int) tileCache.frameY / 18; + if (num8 > 5) + num8 = 5; + baseOption = num8; + break; + case 423: + int num9 = (int) tileCache.frameY / 18; + if (num9 > 6) + num9 = 6; + baseOption = num9; + break; + case 428: + int num10 = (int) tileCache.frameY / 18; + if (num10 > 3) + num10 = 3; + baseOption = num10; + break; + case 440: + int num11 = (int) tileCache.frameX / 54; + if (num11 > 6) + num11 = 6; + baseOption = num11; + break; + case 453: + int num12 = (int) tileCache.frameX / 36; + if (num12 > 2) + num12 = 2; + baseOption = num12; + break; + case 457: + int num13 = (int) tileCache.frameX / 36; + if (num13 > 4) + num13 = 4; + baseOption = num13; + break; + case 461: + if (Main.player[Main.myPlayer].ZoneCorrupt) + { + baseOption = 1; + break; + } + if (Main.player[Main.myPlayer].ZoneCrimson) + { + baseOption = 2; + break; + } + if (!Main.player[Main.myPlayer].ZoneHallow) + break; + baseOption = 3; + break; + case 467: + case 468: + int num14 = (int) tileCache.frameX / 36; + if ((uint) num14 > 11U) + { + switch (num14) + { + case 12: + case 13: + baseOption = 10; + return; + default: + baseOption = 0; + return; + } + } + else + { + baseOption = num14; + break; + } + case 493: + if (tileCache.frameX < (short) 18) + { + baseOption = 0; + break; + } + if (tileCache.frameX < (short) 36) + { + baseOption = 1; + break; + } + if (tileCache.frameX < (short) 54) + { + baseOption = 2; + break; + } + if (tileCache.frameX < (short) 72) + { + baseOption = 3; + break; + } + if (tileCache.frameX < (short) 90) + { + baseOption = 4; + break; + } + baseOption = 5; + break; + case 518: + case 519: + baseOption = (int) tileCache.frameY / 18; + break; + case 529: + baseOption = (int) tileCache.frameY / 34; + break; + case 530: + baseOption = (int) tileCache.frameY / 36; + break; + case 548: + if ((int) tileCache.frameX / 54 < 7) + { + baseOption = 0; + break; + } + baseOption = 1; + break; + case 560: + int num15 = (int) tileCache.frameX / 36; + switch (num15) + { + case 0: + case 1: + case 2: + baseOption = num15; + return; + default: + baseOption = 0; + return; + } + case 572: + baseOption = (int) tileCache.frameY / 36; + break; + case 591: + baseOption = (int) tileCache.frameX / 36; + break; + case 597: + int num16 = (int) tileCache.frameX / 54; + switch (num16) + { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + baseOption = num16; + return; + default: + baseOption = 0; + return; + } + default: + baseOption = 0; + break; + } + } + + public static void SaveMap() + { + if (Main.ActivePlayerFileData.IsCloudSave && SocialAPI.Cloud == null || !Main.mapEnabled) + return; + if (!Monitor.TryEnter(MapHelper.IOLock)) + return; + try + { + FileUtilities.ProtectedInvoke(new Action(MapHelper.InternalSaveMap)); + } + catch (Exception ex) + { + using (StreamWriter streamWriter = new StreamWriter("client-crashlog.txt", true)) + { + streamWriter.WriteLine((object) DateTime.Now); + streamWriter.WriteLine((object) ex); + streamWriter.WriteLine(""); + } + } + finally + { + Monitor.Exit(MapHelper.IOLock); + } + } + + private static void InternalSaveMap() + { + bool isCloudSave = Main.ActivePlayerFileData.IsCloudSave; + string folderPath = Main.playerPathName.Substring(0, Main.playerPathName.Length - 4); + if (!isCloudSave) + Utils.TryCreatingDirectory(folderPath); + string str = folderPath + Path.DirectorySeparatorChar.ToString(); + string path = !Main.ActiveWorldFileData.UseGuidAsMapName ? str + (object) Main.worldID + ".map" : str + (object) Main.ActiveWorldFileData.UniqueId + ".map"; + new Stopwatch().Start(); + if (!Main.gameMenu) + MapHelper.noStatusText = true; + using (MemoryStream memoryStream = new MemoryStream(4000)) + { + using (BinaryWriter writer = new BinaryWriter((Stream) memoryStream)) + { + using (DeflateStream deflateStream = new DeflateStream((Stream) memoryStream, (CompressionMode) 0)) + { + int count = 0; + byte[] buffer = new byte[16384]; + writer.Write(230); + Main.MapFileMetadata.IncrementAndWrite(writer); + writer.Write(Main.worldName); + writer.Write(Main.worldID); + writer.Write(Main.maxTilesY); + writer.Write(Main.maxTilesX); + writer.Write((short) 623); + writer.Write((short) 316); + writer.Write((short) 3); + writer.Write((short) 256); + writer.Write((short) 256); + writer.Write((short) 256); + byte num1 = 1; + byte num2 = 0; + for (int index = 0; index < 623; ++index) + { + if (MapHelper.tileOptionCounts[index] != 1) + num2 |= num1; + if (num1 == (byte) 128) + { + writer.Write(num2); + num2 = (byte) 0; + num1 = (byte) 1; + } + else + num1 <<= 1; + } + if (num1 != (byte) 1) + writer.Write(num2); + int index1 = 0; + byte num3 = 1; + byte num4 = 0; + for (; index1 < 316; ++index1) + { + if (MapHelper.wallOptionCounts[index1] != 1) + num4 |= num3; + if (num3 == (byte) 128) + { + writer.Write(num4); + num4 = (byte) 0; + num3 = (byte) 1; + } + else + num3 <<= 1; + } + if (num3 != (byte) 1) + writer.Write(num4); + for (int index2 = 0; index2 < 623; ++index2) + { + if (MapHelper.tileOptionCounts[index2] != 1) + writer.Write((byte) MapHelper.tileOptionCounts[index2]); + } + for (int index3 = 0; index3 < 316; ++index3) + { + if (MapHelper.wallOptionCounts[index3] != 1) + writer.Write((byte) MapHelper.wallOptionCounts[index3]); + } + writer.Flush(); + for (int y = 0; y < Main.maxTilesY; ++y) + { + if (!MapHelper.noStatusText) + { + float num5 = (float) y / (float) Main.maxTilesY; + Main.statusText = Lang.gen[66].Value + " " + (object) (int) ((double) num5 * 100.0 + 1.0) + "%"; + } + int num6; + for (int x1 = 0; x1 < Main.maxTilesX; x1 = num6 + 1) + { + MapTile mapTile = Main.Map[x1, y]; + byte num7; + byte num8 = num7 = (byte) 0; + bool flag1 = true; + bool flag2 = true; + int num9 = 0; + int num10 = 0; + byte num11 = 0; + int num12; + ushort num13; + int num14; + if (mapTile.Light <= (byte) 18) + { + flag2 = false; + flag1 = false; + num12 = 0; + num13 = (ushort) 0; + num14 = 0; + int x2 = x1 + 1; + for (int index4 = Main.maxTilesX - x1 - 1; index4 > 0 && Main.Map[x2, y].Light <= (byte) 18; ++x2) + { + ++num14; + --index4; + } + } + else + { + num11 = mapTile.Color; + num13 = mapTile.Type; + if ((int) num13 < (int) MapHelper.wallPosition) + { + num12 = 1; + num13 -= MapHelper.tilePosition; + } + else if ((int) num13 < (int) MapHelper.liquidPosition) + { + num12 = 2; + num13 -= MapHelper.wallPosition; + } + else if ((int) num13 < (int) MapHelper.skyPosition) + { + num12 = 3 + ((int) num13 - (int) MapHelper.liquidPosition); + flag1 = false; + } + else if ((int) num13 < (int) MapHelper.dirtPosition) + { + num12 = 6; + flag2 = false; + flag1 = false; + } + else if ((int) num13 < (int) MapHelper.hellPosition) + { + num12 = 7; + if ((int) num13 < (int) MapHelper.rockPosition) + num13 -= MapHelper.dirtPosition; + else + num13 -= MapHelper.rockPosition; + } + else + { + num12 = 6; + flag1 = false; + } + if (mapTile.Light == byte.MaxValue) + flag2 = false; + if (flag2) + { + num14 = 0; + int x3 = x1 + 1; + int num15 = Main.maxTilesX - x1 - 1; + num9 = x3; + while (num15 > 0) + { + MapTile other = Main.Map[x3, y]; + if (mapTile.EqualsWithoutLight(ref other)) + { + --num15; + ++num14; + ++x3; + } + else + { + num10 = x3; + break; + } + } + } + else + { + num14 = 0; + int x4 = x1 + 1; + int num16 = Main.maxTilesX - x1 - 1; + while (num16 > 0) + { + MapTile other = Main.Map[x4, y]; + if (mapTile.Equals(ref other)) + { + --num16; + ++num14; + ++x4; + } + else + break; + } + } + } + if (num11 > (byte) 0) + num7 |= (byte) ((uint) num11 << 1); + if (num7 != (byte) 0) + num8 |= (byte) 1; + byte num17 = (byte) ((uint) num8 | (uint) (byte) (num12 << 1)); + if (flag1 && num13 > (ushort) byte.MaxValue) + num17 |= (byte) 16; + if (flag2) + num17 |= (byte) 32; + if (num14 > 0) + { + if (num14 > (int) byte.MaxValue) + num17 |= (byte) 128; + else + num17 |= (byte) 64; + } + buffer[count] = num17; + ++count; + if (num7 != (byte) 0) + { + buffer[count] = num7; + ++count; + } + if (flag1) + { + buffer[count] = (byte) num13; + ++count; + if (num13 > (ushort) byte.MaxValue) + { + buffer[count] = (byte) ((uint) num13 >> 8); + ++count; + } + } + if (flag2) + { + buffer[count] = mapTile.Light; + ++count; + } + if (num14 > 0) + { + buffer[count] = (byte) num14; + ++count; + if (num14 > (int) byte.MaxValue) + { + buffer[count] = (byte) (num14 >> 8); + ++count; + } + } + for (int x5 = num9; x5 < num10; ++x5) + { + buffer[count] = Main.Map[x5, y].Light; + ++count; + } + num6 = x1 + num14; + if (count >= 4096) + { + ((Stream) deflateStream).Write(buffer, 0, count); + count = 0; + } + } + } + if (count > 0) + ((Stream) deflateStream).Write(buffer, 0, count); + ((Stream) deflateStream).Dispose(); + FileUtilities.WriteAllBytes(path, memoryStream.ToArray(), isCloudSave); + } + } + } + MapHelper.noStatusText = false; + } + + public static void LoadMapVersion1(BinaryReader fileIO, int release) + { + string str = fileIO.ReadString(); + int num1 = fileIO.ReadInt32(); + int num2 = fileIO.ReadInt32(); + int num3 = fileIO.ReadInt32(); + string worldName = Main.worldName; + if (str != worldName || num1 != Main.worldID || num3 != Main.maxTilesX || num2 != Main.maxTilesY) + throw new Exception("Map meta-data is invalid."); + for (int x = 0; x < Main.maxTilesX; ++x) + { + float num4 = (float) x / (float) Main.maxTilesX; + Main.statusText = Lang.gen[67].Value + " " + (object) (int) ((double) num4 * 100.0 + 1.0) + "%"; + for (int y = 0; y < Main.maxTilesY; ++y) + { + if (fileIO.ReadBoolean()) + { + int index = release <= 77 ? (int) fileIO.ReadByte() : (int) fileIO.ReadUInt16(); + byte light = fileIO.ReadByte(); + MapHelper.OldMapHelper oldMapHelper; + oldMapHelper.misc = fileIO.ReadByte(); + oldMapHelper.misc2 = release < 50 ? (byte) 0 : fileIO.ReadByte(); + bool flag = false; + int num5 = (int) oldMapHelper.option(); + int num6; + if (oldMapHelper.active()) + num6 = num5 + (int) MapHelper.tileLookup[index]; + else if (oldMapHelper.water()) + num6 = (int) MapHelper.liquidPosition; + else if (oldMapHelper.lava()) + num6 = (int) MapHelper.liquidPosition + 1; + else if (oldMapHelper.honey()) + num6 = (int) MapHelper.liquidPosition + 2; + else if (oldMapHelper.wall()) + num6 = num5 + (int) MapHelper.wallLookup[index]; + else if ((double) y < Main.worldSurface) + { + flag = true; + int num7 = (int) (byte) (256.0 * ((double) y / Main.worldSurface)); + num6 = (int) MapHelper.skyPosition + num7; + } + else if ((double) y < Main.rockLayer) + { + flag = true; + if (index > (int) byte.MaxValue) + index = (int) byte.MaxValue; + num6 = index + (int) MapHelper.dirtPosition; + } + else if (y < Main.UnderworldLayer) + { + flag = true; + if (index > (int) byte.MaxValue) + index = (int) byte.MaxValue; + num6 = index + (int) MapHelper.rockPosition; + } + else + num6 = (int) MapHelper.hellPosition; + MapTile tile = MapTile.Create((ushort) num6, light, (byte) 0); + Main.Map.SetTile(x, y, ref tile); + int num8 = (int) fileIO.ReadInt16(); + if (light == byte.MaxValue) + { + while (num8 > 0) + { + --num8; + ++y; + if (flag) + { + int num9; + if ((double) y < Main.worldSurface) + { + flag = true; + int num10 = (int) (byte) (256.0 * ((double) y / Main.worldSurface)); + num9 = (int) MapHelper.skyPosition + num10; + } + else if ((double) y < Main.rockLayer) + { + flag = true; + num9 = index + (int) MapHelper.dirtPosition; + } + else if (y < Main.UnderworldLayer) + { + flag = true; + num9 = index + (int) MapHelper.rockPosition; + } + else + { + flag = true; + num9 = (int) MapHelper.hellPosition; + } + tile.Type = (ushort) num9; + } + Main.Map.SetTile(x, y, ref tile); + } + } + else + { + while (num8 > 0) + { + ++y; + --num8; + byte num11 = fileIO.ReadByte(); + if (num11 > (byte) 18) + { + tile.Light = num11; + if (flag) + { + int num12; + if ((double) y < Main.worldSurface) + { + flag = true; + int num13 = (int) (byte) (256.0 * ((double) y / Main.worldSurface)); + num12 = (int) MapHelper.skyPosition + num13; + } + else if ((double) y < Main.rockLayer) + { + flag = true; + num12 = index + (int) MapHelper.dirtPosition; + } + else if (y < Main.UnderworldLayer) + { + flag = true; + num12 = index + (int) MapHelper.rockPosition; + } + else + { + flag = true; + num12 = (int) MapHelper.hellPosition; + } + tile.Type = (ushort) num12; + } + Main.Map.SetTile(x, y, ref tile); + } + } + } + } + else + { + int num14 = (int) fileIO.ReadInt16(); + y += num14; + } + } + } + } + + public static void LoadMapVersion2(BinaryReader fileIO, int release) + { + Main.MapFileMetadata = release < 135 ? FileMetadata.FromCurrentSettings(FileType.Map) : FileMetadata.Read(fileIO, FileType.Map); + string str = fileIO.ReadString(); + int num1 = fileIO.ReadInt32(); + int num2 = fileIO.ReadInt32(); + int num3 = fileIO.ReadInt32(); + string worldName = Main.worldName; + if (str != worldName || num1 != Main.worldID || num3 != Main.maxTilesX || num2 != Main.maxTilesY) + throw new Exception("Map meta-data is invalid."); + short num4 = fileIO.ReadInt16(); + short num5 = fileIO.ReadInt16(); + short num6 = fileIO.ReadInt16(); + short num7 = fileIO.ReadInt16(); + short num8 = fileIO.ReadInt16(); + short num9 = fileIO.ReadInt16(); + bool[] flagArray1 = new bool[(int) num4]; + byte num10 = 0; + byte num11 = 128; + for (int index = 0; index < (int) num4; ++index) + { + if (num11 == (byte) 128) + { + num10 = fileIO.ReadByte(); + num11 = (byte) 1; + } + else + num11 <<= 1; + if (((int) num10 & (int) num11) == (int) num11) + flagArray1[index] = true; + } + bool[] flagArray2 = new bool[(int) num5]; + byte num12 = 0; + byte num13 = 128; + for (int index = 0; index < (int) num5; ++index) + { + if (num13 == (byte) 128) + { + num12 = fileIO.ReadByte(); + num13 = (byte) 1; + } + else + num13 <<= 1; + if (((int) num12 & (int) num13) == (int) num13) + flagArray2[index] = true; + } + byte[] numArray1 = new byte[(int) num4]; + ushort num14 = 0; + for (int index = 0; index < (int) num4; ++index) + { + numArray1[index] = !flagArray1[index] ? (byte) 1 : fileIO.ReadByte(); + num14 += (ushort) numArray1[index]; + } + byte[] numArray2 = new byte[(int) num5]; + ushort num15 = 0; + for (int index = 0; index < (int) num5; ++index) + { + numArray2[index] = !flagArray2[index] ? (byte) 1 : fileIO.ReadByte(); + num15 += (ushort) numArray2[index]; + } + ushort[] numArray3 = new ushort[(int) num14 + (int) num15 + (int) num6 + (int) num7 + (int) num8 + (int) num9 + 2]; + numArray3[0] = (ushort) 0; + ushort num16 = 1; + ushort num17 = 1; + ushort num18 = num17; + for (int index1 = 0; index1 < 623; ++index1) + { + if (index1 < (int) num4) + { + int num19 = (int) numArray1[index1]; + int tileOptionCount = MapHelper.tileOptionCounts[index1]; + for (int index2 = 0; index2 < tileOptionCount; ++index2) + { + if (index2 < num19) + { + numArray3[(int) num17] = num16; + ++num17; + } + ++num16; + } + } + else + num16 += (ushort) MapHelper.tileOptionCounts[index1]; + } + ushort num20 = num17; + for (int index3 = 0; index3 < 316; ++index3) + { + if (index3 < (int) num5) + { + int num21 = (int) numArray2[index3]; + int wallOptionCount = MapHelper.wallOptionCounts[index3]; + for (int index4 = 0; index4 < wallOptionCount; ++index4) + { + if (index4 < num21) + { + numArray3[(int) num17] = num16; + ++num17; + } + ++num16; + } + } + else + num16 += (ushort) MapHelper.wallOptionCounts[index3]; + } + ushort num22 = num17; + for (int index = 0; index < 3; ++index) + { + if (index < (int) num6) + { + numArray3[(int) num17] = num16; + ++num17; + } + ++num16; + } + ushort num23 = num17; + for (int index = 0; index < 256; ++index) + { + if (index < (int) num7) + { + numArray3[(int) num17] = num16; + ++num17; + } + ++num16; + } + ushort num24 = num17; + for (int index = 0; index < 256; ++index) + { + if (index < (int) num8) + { + numArray3[(int) num17] = num16; + ++num17; + } + ++num16; + } + ushort num25 = num17; + for (int index = 0; index < 256; ++index) + { + if (index < (int) num9) + { + numArray3[(int) num17] = num16; + ++num17; + } + ++num16; + } + ushort num26 = num17; + numArray3[(int) num17] = num16; + BinaryReader binaryReader = release < 93 ? new BinaryReader(fileIO.BaseStream) : new BinaryReader((Stream) new DeflateStream(fileIO.BaseStream, (CompressionMode) 1)); + for (int y = 0; y < Main.maxTilesY; ++y) + { + float num27 = (float) y / (float) Main.maxTilesY; + Main.statusText = Lang.gen[67].Value + " " + (object) (int) ((double) num27 * 100.0 + 1.0) + "%"; + for (int x = 0; x < Main.maxTilesX; ++x) + { + byte num28 = binaryReader.ReadByte(); + byte num29 = ((int) num28 & 1) != 1 ? (byte) 0 : binaryReader.ReadByte(); + byte num30 = (byte) (((int) num28 & 14) >> 1); + bool flag; + switch (num30) + { + case 0: + flag = false; + break; + case 1: + case 2: + case 7: + flag = true; + break; + case 3: + case 4: + case 5: + flag = false; + break; + case 6: + flag = false; + break; + default: + flag = false; + break; + } + ushort num31 = !flag ? (ushort) 0 : (((int) num28 & 16) != 16 ? (ushort) binaryReader.ReadByte() : binaryReader.ReadUInt16()); + byte light = ((int) num28 & 32) != 32 ? byte.MaxValue : binaryReader.ReadByte(); + int num32; + switch ((byte) (((int) num28 & 192) >> 6)) + { + case 0: + num32 = 0; + break; + case 1: + num32 = (int) binaryReader.ReadByte(); + break; + case 2: + num32 = (int) binaryReader.ReadInt16(); + break; + default: + num32 = 0; + break; + } + switch (num30) + { + case 0: + x += num32; + break; + case 1: + num31 += num18; + goto default; + case 2: + num31 += num20; + goto default; + case 3: + case 4: + case 5: + num31 += (ushort) ((uint) num22 + ((uint) num30 - 3U)); + goto default; + case 6: + if ((double) y < Main.worldSurface) + { + ushort num33 = (ushort) ((double) num7 * ((double) y / Main.worldSurface)); + num31 += (ushort) ((uint) num23 + (uint) num33); + goto default; + } + else + { + num31 = num26; + goto default; + } + case 7: + if ((double) y < Main.rockLayer) + { + num31 += num24; + goto default; + } + else + { + num31 += num25; + goto default; + } + default: + MapTile tile = MapTile.Create(numArray3[(int) num31], light, (byte) ((int) num29 >> 1 & 31)); + Main.Map.SetTile(x, y, ref tile); + if (light == byte.MaxValue) + { + for (; num32 > 0; --num32) + { + ++x; + Main.Map.SetTile(x, y, ref tile); + } + break; + } + for (; num32 > 0; --num32) + { + ++x; + tile = tile.WithLight(binaryReader.ReadByte()); + Main.Map.SetTile(x, y, ref tile); + } + break; + } + } + } + binaryReader.Close(); + } + + private struct OldMapHelper + { + public byte misc; + public byte misc2; + + public bool active() => ((int) this.misc & 1) == 1; + + public bool water() => ((int) this.misc & 2) == 2; + + public bool lava() => ((int) this.misc & 4) == 4; + + public bool honey() => ((int) this.misc2 & 64) == 64; + + public bool changed() => ((int) this.misc & 8) == 8; + + public bool wall() => ((int) this.misc & 16) == 16; + + public byte option() + { + byte num = 0; + if (((int) this.misc & 32) == 32) + ++num; + if (((int) this.misc & 64) == 64) + num += (byte) 2; + if (((int) this.misc & 128) == 128) + num += (byte) 4; + if (((int) this.misc2 & 1) == 1) + num += (byte) 8; + return num; + } + + public byte color() => (byte) (((int) this.misc2 & 30) >> 1); + } + } +} diff --git a/Map/MapIconOverlay.cs b/Map/MapIconOverlay.cs new file mode 100644 index 0000000..1ac95c6 --- /dev/null +++ b/Map/MapIconOverlay.cs @@ -0,0 +1,35 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Map.MapIconOverlay +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; + +namespace Terraria.Map +{ + public class MapIconOverlay + { + private readonly List _layers = new List(); + + public MapIconOverlay AddLayer(IMapLayer layer) + { + this._layers.Add(layer); + return this; + } + + public void Draw( + Vector2 mapPosition, + Vector2 mapOffset, + Rectangle? clippingRect, + float mapScale, + float drawScale, + ref string text) + { + MapOverlayDrawContext context = new MapOverlayDrawContext(mapPosition, mapOffset, clippingRect, mapScale, drawScale); + foreach (IMapLayer layer in this._layers) + layer.Draw(ref context, ref text); + } + } +} diff --git a/Map/MapOverlayDrawContext.cs b/Map/MapOverlayDrawContext.cs new file mode 100644 index 0000000..9ea83fc --- /dev/null +++ b/Map/MapOverlayDrawContext.cs @@ -0,0 +1,93 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Map.MapOverlayDrawContext +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.DataStructures; +using Terraria.UI; + +namespace Terraria.Map +{ + public struct MapOverlayDrawContext + { + private readonly Vector2 _mapPosition; + private readonly Vector2 _mapOffset; + private readonly Rectangle? _clippingRect; + private readonly float _mapScale; + private readonly float _drawScale; + + public MapOverlayDrawContext( + Vector2 mapPosition, + Vector2 mapOffset, + Rectangle? clippingRect, + float mapScale, + float drawScale) + { + this._mapPosition = mapPosition; + this._mapOffset = mapOffset; + this._clippingRect = clippingRect; + this._mapScale = mapScale; + this._drawScale = drawScale; + } + + public MapOverlayDrawContext.DrawResult Draw( + Texture2D texture, + Vector2 position, + Alignment alignment) + { + return this.Draw(texture, position, new SpriteFrame((byte) 1, (byte) 1), alignment); + } + + public MapOverlayDrawContext.DrawResult Draw( + Texture2D texture, + Vector2 position, + SpriteFrame frame, + Alignment alignment) + { + position = (position - this._mapPosition) * this._mapScale + this._mapOffset; + if (this._clippingRect.HasValue && !this._clippingRect.Value.Contains(position.ToPoint())) + return MapOverlayDrawContext.DrawResult.Culled; + Rectangle sourceRectangle = frame.GetSourceRectangle(texture); + Vector2 origin = sourceRectangle.Size() * alignment.OffsetMultiplier; + Main.spriteBatch.Draw(texture, position, new Rectangle?(sourceRectangle), Color.White, 0.0f, origin, this._drawScale, SpriteEffects.None, 0.0f); + position -= origin * this._drawScale; + return new MapOverlayDrawContext.DrawResult(new Rectangle((int) position.X, (int) position.Y, (int) ((double) texture.Width * (double) this._drawScale), (int) ((double) texture.Height * (double) this._drawScale)).Contains(Main.MouseScreen.ToPoint())); + } + + public MapOverlayDrawContext.DrawResult Draw( + Texture2D texture, + Vector2 position, + Color color, + SpriteFrame frame, + float scaleIfNotSelected, + float scaleIfSelected, + Alignment alignment) + { + position = (position - this._mapPosition) * this._mapScale + this._mapOffset; + if (this._clippingRect.HasValue && !this._clippingRect.Value.Contains(position.ToPoint())) + return MapOverlayDrawContext.DrawResult.Culled; + Rectangle sourceRectangle = frame.GetSourceRectangle(texture); + Vector2 origin = sourceRectangle.Size() * alignment.OffsetMultiplier; + Vector2 position1 = position; + float num1 = this._drawScale * scaleIfNotSelected; + Vector2 vector2 = position - origin * num1; + int num2 = new Rectangle((int) vector2.X, (int) vector2.Y, (int) ((double) sourceRectangle.Width * (double) num1), (int) ((double) sourceRectangle.Height * (double) num1)).Contains(Main.MouseScreen.ToPoint()) ? 1 : 0; + float scale = num1; + if (num2 != 0) + scale = this._drawScale * scaleIfSelected; + Main.spriteBatch.Draw(texture, position1, new Rectangle?(sourceRectangle), color, 0.0f, origin, scale, SpriteEffects.None, 0.0f); + return new MapOverlayDrawContext.DrawResult(num2 != 0); + } + + public struct DrawResult + { + public static readonly MapOverlayDrawContext.DrawResult Culled = new MapOverlayDrawContext.DrawResult(false); + public readonly bool IsMouseOver; + + public DrawResult(bool isMouseOver) => this.IsMouseOver = isMouseOver; + } + } +} diff --git a/Map/MapTile.cs b/Map/MapTile.cs new file mode 100644 index 0000000..78c000f --- /dev/null +++ b/Map/MapTile.cs @@ -0,0 +1,55 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Map.MapTile +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Map +{ + public struct MapTile + { + public ushort Type; + public byte Light; + private byte _extraData; + + public bool IsChanged + { + get => ((int) this._extraData & 128) == 128; + set + { + if (value) + this._extraData |= (byte) 128; + else + this._extraData &= (byte) 127; + } + } + + public byte Color + { + get => (byte) ((uint) this._extraData & (uint) sbyte.MaxValue); + set => this._extraData = (byte) ((int) this._extraData & 128 | (int) value & (int) sbyte.MaxValue); + } + + private MapTile(ushort type, byte light, byte extraData) + { + this.Type = type; + this.Light = light; + this._extraData = extraData; + } + + public bool Equals(ref MapTile other) => (int) this.Light == (int) other.Light && (int) this.Type == (int) other.Type && (int) this.Color == (int) other.Color; + + public bool EqualsWithoutLight(ref MapTile other) => (int) this.Type == (int) other.Type && (int) this.Color == (int) other.Color; + + public void Clear() + { + this.Type = (ushort) 0; + this.Light = (byte) 0; + this._extraData = (byte) 0; + } + + public MapTile WithLight(byte light) => new MapTile(this.Type, light, (byte) ((uint) this._extraData | 128U)); + + public static MapTile Create(ushort type, byte light, byte color) => new MapTile(type, light, (byte) ((uint) color | 128U)); + } +} diff --git a/Map/PingMapLayer.cs b/Map/PingMapLayer.cs new file mode 100644 index 0000000..493af82 --- /dev/null +++ b/Map/PingMapLayer.cs @@ -0,0 +1,58 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Map.PingMapLayer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Utilities; +using System; +using System.Collections.Generic; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.UI; + +namespace Terraria.Map +{ + public class PingMapLayer : IMapLayer + { + private const double PING_DURATION_IN_SECONDS = 15.0; + private const double PING_FRAME_RATE = 10.0; + private readonly SlotVector _pings = new SlotVector(100); + + public void Draw(ref MapOverlayDrawContext context, ref string text) + { + SpriteFrame frame = new SpriteFrame((byte) 1, (byte) 5); + DateTime now = DateTime.Now; + foreach (SlotVector.ItemPair ping1 in (IEnumerable.ItemPair>) this._pings) + { + PingMapLayer.Ping ping2 = (PingMapLayer.Ping) ping1.Value; + double totalSeconds = (now - ping2.Time).TotalSeconds; + int num = (int) (totalSeconds * 10.0); + frame.CurrentRow = (byte) ((uint) num % (uint) frame.RowCount); + context.Draw(TextureAssets.MapPing.Value, ping2.Position, frame, Alignment.Center); + if (totalSeconds > 15.0) + this._pings.Remove((SlotId) ping1.Id); + } + } + + public void Add(Vector2 position) + { + if (this._pings.Count == this._pings.Capacity) + return; + this._pings.Add(new PingMapLayer.Ping(position)); + } + + private struct Ping + { + public readonly Vector2 Position; + public readonly DateTime Time; + + public Ping(Vector2 position) + { + this.Position = position; + this.Time = DateTime.Now; + } + } + } +} diff --git a/Map/SpawnMapLayer.cs b/Map/SpawnMapLayer.cs new file mode 100644 index 0000000..4729348 --- /dev/null +++ b/Map/SpawnMapLayer.cs @@ -0,0 +1,28 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Map.SpawnMapLayer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.GameContent; +using Terraria.Localization; +using Terraria.UI; + +namespace Terraria.Map +{ + public class SpawnMapLayer : IMapLayer + { + public void Draw(ref MapOverlayDrawContext context, ref string text) + { + Player localPlayer = Main.LocalPlayer; + Vector2 position1 = new Vector2((float) localPlayer.SpawnX, (float) localPlayer.SpawnY); + Vector2 position2 = new Vector2((float) Main.spawnTileX, (float) Main.spawnTileY); + if (context.Draw(TextureAssets.SpawnPoint.Value, position2, Alignment.Bottom).IsMouseOver) + text = Language.GetTextValue("UI.SpawnPoint"); + if (localPlayer.SpawnX == -1 || !context.Draw(TextureAssets.SpawnBed.Value, position1, Alignment.Bottom).IsMouseOver) + return; + text = Language.GetTextValue("UI.SpawnBed"); + } + } +} diff --git a/Map/TeleportPylonsMapLayer.cs b/Map/TeleportPylonsMapLayer.cs new file mode 100644 index 0000000..3db2f1a --- /dev/null +++ b/Map/TeleportPylonsMapLayer.cs @@ -0,0 +1,52 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Map.TeleportPylonsMapLayer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.GameContent.Tile_Entities; +using Terraria.UI; + +namespace Terraria.Map +{ + public class TeleportPylonsMapLayer : IMapLayer + { + public void Draw(ref MapOverlayDrawContext context, ref string text) + { + List pylons = Main.PylonSystem.Pylons; + float scaleIfNotSelected = 1f; + float scaleIfSelected = scaleIfNotSelected * 2f; + Texture2D texture = TextureAssets.Extra[182].Value; + int num = TeleportPylonsSystem.IsPlayerNearAPylon(Main.LocalPlayer) ? 1 : 0; + Color color = Color.White; + if (num == 0) + color = Color.Gray * 0.5f; + for (int index = 0; index < pylons.Count; ++index) + { + TeleportPylonInfo info = pylons[index]; + if (context.Draw(texture, info.PositionInTiles.ToVector2() + new Vector2(1.5f, 2f), color, new SpriteFrame((byte) 9, (byte) 1, (byte) info.TypeOfPylon, (byte) 0) + { + PaddingY = 0 + }, scaleIfNotSelected, scaleIfSelected, Alignment.Center).IsMouseOver) + { + Main.cancelWormHole = true; + string itemNameValue = Lang.GetItemNameValue(TETeleportationPylon.GetPylonItemTypeFromTileStyle((int) info.TypeOfPylon)); + text = itemNameValue; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + Main.mouseLeftRelease = false; + Main.mapFullscreen = false; + Main.PylonSystem.RequestTeleportation(info, Main.LocalPlayer); + SoundEngine.PlaySound(11); + } + } + } + } + } +} diff --git a/Map/WorldMap.cs b/Map/WorldMap.cs new file mode 100644 index 0000000..b924760 --- /dev/null +++ b/Map/WorldMap.cs @@ -0,0 +1,158 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Map.WorldMap +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.IO; +using Terraria.IO; +using Terraria.Social; +using Terraria.Utilities; + +namespace Terraria.Map +{ + public class WorldMap + { + public readonly int MaxWidth; + public readonly int MaxHeight; + public readonly int BlackEdgeWidth = 40; + private MapTile[,] _tiles; + + public MapTile this[int x, int y] => this._tiles[x, y]; + + public WorldMap(int maxWidth, int maxHeight) + { + this.MaxWidth = maxWidth; + this.MaxHeight = maxHeight; + this._tiles = new MapTile[this.MaxWidth, this.MaxHeight]; + } + + public void ConsumeUpdate(int x, int y) => this._tiles[x, y].IsChanged = false; + + public void Update(int x, int y, byte light) => this._tiles[x, y] = MapHelper.CreateMapTile(x, y, light); + + public void SetTile(int x, int y, ref MapTile tile) => this._tiles[x, y] = tile; + + public bool IsRevealed(int x, int y) => this._tiles[x, y].Light > (byte) 0; + + public bool UpdateLighting(int x, int y, byte light) + { + MapTile tile = this._tiles[x, y]; + if (light == (byte) 0 && tile.Light == (byte) 0) + return false; + MapTile mapTile = MapHelper.CreateMapTile(x, y, Math.Max(tile.Light, light)); + if (mapTile.Equals(ref tile)) + return false; + this._tiles[x, y] = mapTile; + return true; + } + + public bool UpdateType(int x, int y) + { + MapTile mapTile = MapHelper.CreateMapTile(x, y, this._tiles[x, y].Light); + if (mapTile.Equals(ref this._tiles.Address(x, y))) + return false; + this._tiles[x, y] = mapTile; + return true; + } + + public void UnlockMapSection(int sectionX, int sectionY) + { + } + + public void Load() + { + Lighting.Clear(); + bool isCloudSave = Main.ActivePlayerFileData.IsCloudSave; + if (isCloudSave && SocialAPI.Cloud == null || !Main.mapEnabled) + return; + string str1 = Main.playerPathName.Substring(0, Main.playerPathName.Length - 4) + Path.DirectorySeparatorChar.ToString(); + string str2; + if (Main.ActiveWorldFileData.UseGuidAsMapName) + { + string str3 = str1; + str2 = str1 + (object) Main.ActiveWorldFileData.UniqueId + ".map"; + if (!FileUtilities.Exists(str2, isCloudSave)) + str2 = str3 + (object) Main.worldID + ".map"; + } + else + str2 = str1 + (object) Main.worldID + ".map"; + if (!FileUtilities.Exists(str2, isCloudSave)) + { + Main.MapFileMetadata = FileMetadata.FromCurrentSettings(FileType.Map); + } + else + { + using (MemoryStream memoryStream = new MemoryStream(FileUtilities.ReadAllBytes(str2, isCloudSave))) + { + using (BinaryReader fileIO = new BinaryReader((Stream) memoryStream)) + { + try + { + int release = fileIO.ReadInt32(); + if (release > 230) + return; + if (release <= 91) + MapHelper.LoadMapVersion1(fileIO, release); + else + MapHelper.LoadMapVersion2(fileIO, release); + this.ClearEdges(); + Main.clearMap = true; + Main.loadMap = true; + Main.loadMapLock = true; + Main.refreshMap = false; + } + catch (Exception ex) + { + using (StreamWriter streamWriter = new StreamWriter("client-crashlog.txt", true)) + { + streamWriter.WriteLine((object) DateTime.Now); + streamWriter.WriteLine((object) ex); + streamWriter.WriteLine(""); + } + if (!isCloudSave) + File.Copy(str2, str2 + ".bad", true); + this.Clear(); + } + } + } + } + } + + public void Save() => MapHelper.SaveMap(); + + public void Clear() + { + for (int index1 = 0; index1 < this.MaxWidth; ++index1) + { + for (int index2 = 0; index2 < this.MaxHeight; ++index2) + this._tiles[index1, index2].Clear(); + } + } + + public void ClearEdges() + { + for (int index1 = 0; index1 < this.MaxWidth; ++index1) + { + for (int index2 = 0; index2 < this.BlackEdgeWidth; ++index2) + this._tiles[index1, index2].Clear(); + } + for (int index3 = 0; index3 < this.MaxWidth; ++index3) + { + for (int index4 = this.MaxHeight - this.BlackEdgeWidth; index4 < this.MaxHeight; ++index4) + this._tiles[index3, index4].Clear(); + } + for (int index = 0; index < this.BlackEdgeWidth; ++index) + { + for (int blackEdgeWidth = this.BlackEdgeWidth; blackEdgeWidth < this.MaxHeight - this.BlackEdgeWidth; ++blackEdgeWidth) + this._tiles[index, blackEdgeWidth].Clear(); + } + for (int index = this.MaxWidth - this.BlackEdgeWidth; index < this.MaxWidth; ++index) + { + for (int blackEdgeWidth = this.BlackEdgeWidth; blackEdgeWidth < this.MaxHeight - this.BlackEdgeWidth; ++blackEdgeWidth) + this._tiles[index, blackEdgeWidth].Clear(); + } + } + } +} diff --git a/MessageBuffer.cs b/MessageBuffer.cs new file mode 100644 index 0000000..64a8b92 --- /dev/null +++ b/MessageBuffer.cs @@ -0,0 +1,3116 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.MessageBuffer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics.PackedVector; +using System; +using System.Collections.Generic; +using System.IO; +using Terraria.Audio; +using Terraria.Chat; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.GameContent; +using Terraria.GameContent.Achievements; +using Terraria.GameContent.Creative; +using Terraria.GameContent.Events; +using Terraria.GameContent.Golf; +using Terraria.GameContent.Tile_Entities; +using Terraria.GameContent.UI; +using Terraria.ID; +using Terraria.Localization; +using Terraria.Net; +using Terraria.Testing; +using Terraria.UI; + +namespace Terraria +{ + public class MessageBuffer + { + public const int readBufferMax = 131070; + public const int writeBufferMax = 131070; + public bool broadcast; + public byte[] readBuffer = new byte[131070]; + public byte[] writeBuffer = new byte[131070]; + public bool writeLocked; + public int messageLength; + public int totalData; + public int whoAmI; + public int spamCount; + public int maxSpam; + public bool checkBytes; + public MemoryStream readerStream; + public MemoryStream writerStream; + public BinaryReader reader; + public BinaryWriter writer; + public PacketHistory History = new PacketHistory(); + + public static event TileChangeReceivedEvent OnTileChangeReceived; + + public void Reset() + { + Array.Clear((Array) this.readBuffer, 0, this.readBuffer.Length); + Array.Clear((Array) this.writeBuffer, 0, this.writeBuffer.Length); + this.writeLocked = false; + this.messageLength = 0; + this.totalData = 0; + this.spamCount = 0; + this.broadcast = false; + this.checkBytes = false; + this.ResetReader(); + this.ResetWriter(); + } + + public void ResetReader() + { + if (this.readerStream != null) + this.readerStream.Close(); + this.readerStream = new MemoryStream(this.readBuffer); + this.reader = new BinaryReader((Stream) this.readerStream); + } + + public void ResetWriter() + { + if (this.writerStream != null) + this.writerStream.Close(); + this.writerStream = new MemoryStream(this.writeBuffer); + this.writer = new BinaryWriter((Stream) this.writerStream); + } + + public void GetData(int start, int length, out int messageType) + { + if (this.whoAmI < 256) + Netplay.Clients[this.whoAmI].TimeOutTimer = 0; + else + Netplay.Connection.TimeOutTimer = 0; + int bufferStart = start + 1; + byte num1 = this.readBuffer[start]; + messageType = (int) num1; + if (num1 >= (byte) 140) + return; + Main.ActiveNetDiagnosticsUI.CountReadMessage((int) num1, length); + if (Main.netMode == 1 && Netplay.Connection.StatusMax > 0) + ++Netplay.Connection.StatusCount; + if (Main.verboseNetplay) + { + int num2 = start; + while (num2 < start + length) + ++num2; + for (int index = start; index < start + length; ++index) + { + int num3 = (int) this.readBuffer[index]; + } + } + if (Main.netMode == 2 && num1 != (byte) 38 && Netplay.Clients[this.whoAmI].State == -1) + { + NetMessage.TrySendData(2, this.whoAmI, text: Lang.mp[1].ToNetworkText()); + } + else + { + if (Main.netMode == 2) + { + if (Netplay.Clients[this.whoAmI].State < 10 && num1 > (byte) 12 && num1 != (byte) 93 && num1 != (byte) 16 && num1 != (byte) 42 && num1 != (byte) 50 && num1 != (byte) 38 && num1 != (byte) 68) + NetMessage.BootPlayer(this.whoAmI, Lang.mp[2].ToNetworkText()); + if (Netplay.Clients[this.whoAmI].State == 0 && num1 != (byte) 1) + NetMessage.BootPlayer(this.whoAmI, Lang.mp[2].ToNetworkText()); + } + if (this.reader == null) + this.ResetReader(); + this.reader.BaseStream.Position = (long) bufferStart; + switch (num1) + { + case 1: + if (Main.netMode != 2) + break; + if (Main.dedServ && Netplay.IsBanned(Netplay.Clients[this.whoAmI].Socket.GetRemoteAddress())) + { + NetMessage.TrySendData(2, this.whoAmI, text: Lang.mp[3].ToNetworkText()); + break; + } + if (Netplay.Clients[this.whoAmI].State != 0) + break; + if (this.reader.ReadString() == "Terraria" + (object) 230) + { + if (string.IsNullOrEmpty(Netplay.ServerPassword)) + { + Netplay.Clients[this.whoAmI].State = 1; + NetMessage.TrySendData(3, this.whoAmI); + break; + } + Netplay.Clients[this.whoAmI].State = -1; + NetMessage.TrySendData(37, this.whoAmI); + break; + } + NetMessage.TrySendData(2, this.whoAmI, text: Lang.mp[4].ToNetworkText()); + break; + case 2: + if (Main.netMode != 1) + break; + Netplay.Disconnect = true; + Main.statusText = NetworkText.Deserialize(this.reader).ToString(); + break; + case 3: + if (Main.netMode != 1) + break; + if (Netplay.Connection.State == 1) + Netplay.Connection.State = 2; + int number1 = (int) this.reader.ReadByte(); + if (number1 != Main.myPlayer) + { + Main.player[number1] = Main.ActivePlayerFileData.Player; + Main.player[Main.myPlayer] = new Player(); + } + Main.player[number1].whoAmI = number1; + Main.myPlayer = number1; + Player player1 = Main.player[number1]; + NetMessage.TrySendData(4, number: number1); + NetMessage.TrySendData(68, number: number1); + NetMessage.TrySendData(16, number: number1); + NetMessage.TrySendData(42, number: number1); + NetMessage.TrySendData(50, number: number1); + for (int index = 0; index < 59; ++index) + NetMessage.TrySendData(5, number: number1, number2: ((float) index), number3: ((float) player1.inventory[index].prefix)); + for (int index = 0; index < player1.armor.Length; ++index) + NetMessage.TrySendData(5, number: number1, number2: ((float) (59 + index)), number3: ((float) player1.armor[index].prefix)); + for (int index = 0; index < player1.dye.Length; ++index) + NetMessage.TrySendData(5, number: number1, number2: ((float) (58 + player1.armor.Length + 1 + index)), number3: ((float) player1.dye[index].prefix)); + for (int index = 0; index < player1.miscEquips.Length; ++index) + NetMessage.TrySendData(5, number: number1, number2: ((float) (58 + player1.armor.Length + player1.dye.Length + 1 + index)), number3: ((float) player1.miscEquips[index].prefix)); + for (int index = 0; index < player1.miscDyes.Length; ++index) + NetMessage.TrySendData(5, number: number1, number2: ((float) (58 + player1.armor.Length + player1.dye.Length + player1.miscEquips.Length + 1 + index)), number3: ((float) player1.miscDyes[index].prefix)); + for (int index = 0; index < player1.bank.item.Length; ++index) + NetMessage.TrySendData(5, number: number1, number2: ((float) (58 + player1.armor.Length + player1.dye.Length + player1.miscEquips.Length + player1.miscDyes.Length + 1 + index)), number3: ((float) player1.bank.item[index].prefix)); + for (int index = 0; index < player1.bank2.item.Length; ++index) + NetMessage.TrySendData(5, number: number1, number2: ((float) (58 + player1.armor.Length + player1.dye.Length + player1.miscEquips.Length + player1.miscDyes.Length + player1.bank.item.Length + 1 + index)), number3: ((float) player1.bank2.item[index].prefix)); + NetMessage.TrySendData(5, number: number1, number2: ((float) (58 + player1.armor.Length + player1.dye.Length + player1.miscEquips.Length + player1.miscDyes.Length + player1.bank.item.Length + player1.bank2.item.Length + 1)), number3: ((float) player1.trashItem.prefix)); + for (int index = 0; index < player1.bank3.item.Length; ++index) + NetMessage.TrySendData(5, number: number1, number2: ((float) (58 + player1.armor.Length + player1.dye.Length + player1.miscEquips.Length + player1.miscDyes.Length + player1.bank.item.Length + player1.bank2.item.Length + 2 + index)), number3: ((float) player1.bank3.item[index].prefix)); + for (int index = 0; index < player1.bank4.item.Length; ++index) + NetMessage.TrySendData(5, number: number1, number2: ((float) (58 + player1.armor.Length + player1.dye.Length + player1.miscEquips.Length + player1.miscDyes.Length + player1.bank.item.Length + player1.bank2.item.Length + player1.bank3.item.Length + 2 + index)), number3: ((float) player1.bank4.item[index].prefix)); + NetMessage.TrySendData(6); + if (Netplay.Connection.State != 2) + break; + Netplay.Connection.State = 3; + break; + case 4: + int number2 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + number2 = this.whoAmI; + if (number2 == Main.myPlayer && !Main.ServerSideCharacter) + break; + Player player2 = Main.player[number2]; + player2.whoAmI = number2; + player2.skinVariant = (int) this.reader.ReadByte(); + player2.skinVariant = (int) MathHelper.Clamp((float) player2.skinVariant, 0.0f, 11f); + player2.hair = (int) this.reader.ReadByte(); + if (player2.hair >= 162) + player2.hair = 0; + player2.name = this.reader.ReadString().Trim().Trim(); + player2.hairDye = this.reader.ReadByte(); + BitsByte bitsByte1 = (BitsByte) this.reader.ReadByte(); + for (int key = 0; key < 8; ++key) + player2.hideVisibleAccessory[key] = bitsByte1[key]; + bitsByte1 = (BitsByte) this.reader.ReadByte(); + for (int key = 0; key < 2; ++key) + player2.hideVisibleAccessory[key + 8] = bitsByte1[key]; + player2.hideMisc = (BitsByte) this.reader.ReadByte(); + player2.hairColor = this.reader.ReadRGB(); + player2.skinColor = this.reader.ReadRGB(); + player2.eyeColor = this.reader.ReadRGB(); + player2.shirtColor = this.reader.ReadRGB(); + player2.underShirtColor = this.reader.ReadRGB(); + player2.pantsColor = this.reader.ReadRGB(); + player2.shoeColor = this.reader.ReadRGB(); + BitsByte bitsByte2 = (BitsByte) this.reader.ReadByte(); + player2.difficulty = (byte) 0; + if (bitsByte2[0]) + player2.difficulty = (byte) 1; + if (bitsByte2[1]) + player2.difficulty = (byte) 2; + if (bitsByte2[3]) + player2.difficulty = (byte) 3; + if (player2.difficulty > (byte) 3) + player2.difficulty = (byte) 3; + player2.extraAccessory = bitsByte2[2]; + BitsByte bitsByte3 = (BitsByte) this.reader.ReadByte(); + player2.UsingBiomeTorches = bitsByte3[0]; + player2.happyFunTorchTime = bitsByte3[1]; + if (Main.netMode != 2) + break; + bool flag1 = false; + if (Netplay.Clients[this.whoAmI].State < 10) + { + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (index != number2 && player2.name == Main.player[index].name && Netplay.Clients[index].IsActive) + flag1 = true; + } + } + if (flag1) + { + NetMessage.TrySendData(2, this.whoAmI, text: NetworkText.FromKey(Lang.mp[5].Key, (object) player2.name)); + break; + } + if (player2.name.Length > Player.nameLen) + { + NetMessage.TrySendData(2, this.whoAmI, text: NetworkText.FromKey("Net.NameTooLong")); + break; + } + if (player2.name == "") + { + NetMessage.TrySendData(2, this.whoAmI, text: NetworkText.FromKey("Net.EmptyName")); + break; + } + if (player2.difficulty == (byte) 3 && !Main.GameModeInfo.IsJourneyMode) + { + NetMessage.TrySendData(2, this.whoAmI, text: NetworkText.FromKey("Net.PlayerIsCreativeAndWorldIsNotCreative")); + break; + } + if (player2.difficulty != (byte) 3 && Main.GameModeInfo.IsJourneyMode) + { + NetMessage.TrySendData(2, this.whoAmI, text: NetworkText.FromKey("Net.PlayerIsNotCreativeAndWorldIsCreative")); + break; + } + Netplay.Clients[this.whoAmI].Name = player2.name; + Netplay.Clients[this.whoAmI].Name = player2.name; + NetMessage.TrySendData(4, ignoreClient: this.whoAmI, number: number2); + break; + case 5: + int number3 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + number3 = this.whoAmI; + if (number3 == Main.myPlayer && !Main.ServerSideCharacter && !Main.player[number3].HasLockedInventory()) + break; + Player player3 = Main.player[number3]; + lock (player3) + { + int index1 = (int) this.reader.ReadInt16(); + int num4 = (int) this.reader.ReadInt16(); + int pre = (int) this.reader.ReadByte(); + int type1 = (int) this.reader.ReadInt16(); + Item[] objArray1 = (Item[]) null; + Item[] objArray2 = (Item[]) null; + int index2 = 0; + bool flag2 = false; + if (index1 > 58 + player3.armor.Length + player3.dye.Length + player3.miscEquips.Length + player3.miscDyes.Length + player3.bank.item.Length + player3.bank2.item.Length + player3.bank3.item.Length + 1) + { + index2 = index1 - 58 - (player3.armor.Length + player3.dye.Length + player3.miscEquips.Length + player3.miscDyes.Length + player3.bank.item.Length + player3.bank2.item.Length + player3.bank3.item.Length + 1) - 1; + objArray1 = player3.bank4.item; + objArray2 = Main.clientPlayer.bank4.item; + } + else if (index1 > 58 + player3.armor.Length + player3.dye.Length + player3.miscEquips.Length + player3.miscDyes.Length + player3.bank.item.Length + player3.bank2.item.Length + 1) + { + index2 = index1 - 58 - (player3.armor.Length + player3.dye.Length + player3.miscEquips.Length + player3.miscDyes.Length + player3.bank.item.Length + player3.bank2.item.Length + 1) - 1; + objArray1 = player3.bank3.item; + objArray2 = Main.clientPlayer.bank3.item; + } + else if (index1 > 58 + player3.armor.Length + player3.dye.Length + player3.miscEquips.Length + player3.miscDyes.Length + player3.bank.item.Length + player3.bank2.item.Length) + flag2 = true; + else if (index1 > 58 + player3.armor.Length + player3.dye.Length + player3.miscEquips.Length + player3.miscDyes.Length + player3.bank.item.Length) + { + index2 = index1 - 58 - (player3.armor.Length + player3.dye.Length + player3.miscEquips.Length + player3.miscDyes.Length + player3.bank.item.Length) - 1; + objArray1 = player3.bank2.item; + objArray2 = Main.clientPlayer.bank2.item; + } + else if (index1 > 58 + player3.armor.Length + player3.dye.Length + player3.miscEquips.Length + player3.miscDyes.Length) + { + index2 = index1 - 58 - (player3.armor.Length + player3.dye.Length + player3.miscEquips.Length + player3.miscDyes.Length) - 1; + objArray1 = player3.bank.item; + objArray2 = Main.clientPlayer.bank.item; + } + else if (index1 > 58 + player3.armor.Length + player3.dye.Length + player3.miscEquips.Length) + { + index2 = index1 - 58 - (player3.armor.Length + player3.dye.Length + player3.miscEquips.Length) - 1; + objArray1 = player3.miscDyes; + objArray2 = Main.clientPlayer.miscDyes; + } + else if (index1 > 58 + player3.armor.Length + player3.dye.Length) + { + index2 = index1 - 58 - (player3.armor.Length + player3.dye.Length) - 1; + objArray1 = player3.miscEquips; + objArray2 = Main.clientPlayer.miscEquips; + } + else if (index1 > 58 + player3.armor.Length) + { + index2 = index1 - 58 - player3.armor.Length - 1; + objArray1 = player3.dye; + objArray2 = Main.clientPlayer.dye; + } + else if (index1 > 58) + { + index2 = index1 - 58 - 1; + objArray1 = player3.armor; + objArray2 = Main.clientPlayer.armor; + } + else + { + index2 = index1; + objArray1 = player3.inventory; + objArray2 = Main.clientPlayer.inventory; + } + if (flag2) + { + player3.trashItem = new Item(); + player3.trashItem.netDefaults(type1); + player3.trashItem.stack = num4; + player3.trashItem.Prefix(pre); + if (number3 == Main.myPlayer && !Main.ServerSideCharacter) + Main.clientPlayer.trashItem = player3.trashItem.Clone(); + } + else if (index1 <= 58) + { + int type2 = objArray1[index2].type; + int stack = objArray1[index2].stack; + objArray1[index2] = new Item(); + objArray1[index2].netDefaults(type1); + objArray1[index2].stack = num4; + objArray1[index2].Prefix(pre); + if (number3 == Main.myPlayer && !Main.ServerSideCharacter) + objArray2[index2] = objArray1[index2].Clone(); + if (number3 == Main.myPlayer && index2 == 58) + Main.mouseItem = objArray1[index2].Clone(); + if (number3 == Main.myPlayer && Main.netMode == 1) + { + Main.player[number3].inventoryChestStack[index1] = false; + if (objArray1[index2].stack != stack || objArray1[index2].type != type2) + { + Recipe.FindRecipes(true); + SoundEngine.PlaySound(7); + } + } + } + else + { + objArray1[index2] = new Item(); + objArray1[index2].netDefaults(type1); + objArray1[index2].stack = num4; + objArray1[index2].Prefix(pre); + if (number3 == Main.myPlayer && !Main.ServerSideCharacter) + objArray2[index2] = objArray1[index2].Clone(); + } + if (Main.netMode != 2 || number3 != this.whoAmI || index1 > 58 + player3.armor.Length + player3.dye.Length + player3.miscEquips.Length + player3.miscDyes.Length) + break; + NetMessage.TrySendData(5, ignoreClient: this.whoAmI, number: number3, number2: ((float) index1), number3: ((float) pre)); + break; + } + case 6: + if (Main.netMode != 2) + break; + if (Netplay.Clients[this.whoAmI].State == 1) + Netplay.Clients[this.whoAmI].State = 2; + NetMessage.TrySendData(7, this.whoAmI); + Main.SyncAnInvasion(this.whoAmI); + break; + case 7: + if (Main.netMode != 1) + break; + Main.time = (double) this.reader.ReadInt32(); + BitsByte bitsByte4 = (BitsByte) this.reader.ReadByte(); + Main.dayTime = bitsByte4[0]; + Main.bloodMoon = bitsByte4[1]; + Main.eclipse = bitsByte4[2]; + Main.moonPhase = (int) this.reader.ReadByte(); + Main.maxTilesX = (int) this.reader.ReadInt16(); + Main.maxTilesY = (int) this.reader.ReadInt16(); + Main.spawnTileX = (int) this.reader.ReadInt16(); + Main.spawnTileY = (int) this.reader.ReadInt16(); + Main.worldSurface = (double) this.reader.ReadInt16(); + Main.rockLayer = (double) this.reader.ReadInt16(); + Main.worldID = this.reader.ReadInt32(); + Main.worldName = this.reader.ReadString(); + Main.GameMode = (int) this.reader.ReadByte(); + Main.ActiveWorldFileData.UniqueId = new Guid(this.reader.ReadBytes(16)); + Main.ActiveWorldFileData.WorldGeneratorVersion = this.reader.ReadUInt64(); + Main.moonType = (int) this.reader.ReadByte(); + WorldGen.setBG(0, (int) this.reader.ReadByte()); + WorldGen.setBG(10, (int) this.reader.ReadByte()); + WorldGen.setBG(11, (int) this.reader.ReadByte()); + WorldGen.setBG(12, (int) this.reader.ReadByte()); + WorldGen.setBG(1, (int) this.reader.ReadByte()); + WorldGen.setBG(2, (int) this.reader.ReadByte()); + WorldGen.setBG(3, (int) this.reader.ReadByte()); + WorldGen.setBG(4, (int) this.reader.ReadByte()); + WorldGen.setBG(5, (int) this.reader.ReadByte()); + WorldGen.setBG(6, (int) this.reader.ReadByte()); + WorldGen.setBG(7, (int) this.reader.ReadByte()); + WorldGen.setBG(8, (int) this.reader.ReadByte()); + WorldGen.setBG(9, (int) this.reader.ReadByte()); + Main.iceBackStyle = (int) this.reader.ReadByte(); + Main.jungleBackStyle = (int) this.reader.ReadByte(); + Main.hellBackStyle = (int) this.reader.ReadByte(); + Main.windSpeedTarget = this.reader.ReadSingle(); + Main.numClouds = (int) this.reader.ReadByte(); + for (int index = 0; index < 3; ++index) + Main.treeX[index] = this.reader.ReadInt32(); + for (int index = 0; index < 4; ++index) + Main.treeStyle[index] = (int) this.reader.ReadByte(); + for (int index = 0; index < 3; ++index) + Main.caveBackX[index] = this.reader.ReadInt32(); + for (int index = 0; index < 4; ++index) + Main.caveBackStyle[index] = (int) this.reader.ReadByte(); + WorldGen.TreeTops.SyncReceive(this.reader); + WorldGen.BackgroundsCache.UpdateCache(); + Main.maxRaining = this.reader.ReadSingle(); + Main.raining = (double) Main.maxRaining > 0.0; + BitsByte bitsByte5 = (BitsByte) this.reader.ReadByte(); + WorldGen.shadowOrbSmashed = bitsByte5[0]; + NPC.downedBoss1 = bitsByte5[1]; + NPC.downedBoss2 = bitsByte5[2]; + NPC.downedBoss3 = bitsByte5[3]; + Main.hardMode = bitsByte5[4]; + NPC.downedClown = bitsByte5[5]; + Main.ServerSideCharacter = bitsByte5[6]; + NPC.downedPlantBoss = bitsByte5[7]; + BitsByte bitsByte6 = (BitsByte) this.reader.ReadByte(); + NPC.downedMechBoss1 = bitsByte6[0]; + NPC.downedMechBoss2 = bitsByte6[1]; + NPC.downedMechBoss3 = bitsByte6[2]; + NPC.downedMechBossAny = bitsByte6[3]; + Main.cloudBGActive = bitsByte6[4] ? 1f : 0.0f; + WorldGen.crimson = bitsByte6[5]; + Main.pumpkinMoon = bitsByte6[6]; + Main.snowMoon = bitsByte6[7]; + BitsByte bitsByte7 = (BitsByte) this.reader.ReadByte(); + Main.fastForwardTime = bitsByte7[1]; + Main.UpdateTimeRate(); + int num5 = bitsByte7[2] ? 1 : 0; + NPC.downedSlimeKing = bitsByte7[3]; + NPC.downedQueenBee = bitsByte7[4]; + NPC.downedFishron = bitsByte7[5]; + NPC.downedMartians = bitsByte7[6]; + NPC.downedAncientCultist = bitsByte7[7]; + BitsByte bitsByte8 = (BitsByte) this.reader.ReadByte(); + NPC.downedMoonlord = bitsByte8[0]; + NPC.downedHalloweenKing = bitsByte8[1]; + NPC.downedHalloweenTree = bitsByte8[2]; + NPC.downedChristmasIceQueen = bitsByte8[3]; + NPC.downedChristmasSantank = bitsByte8[4]; + NPC.downedChristmasTree = bitsByte8[5]; + NPC.downedGolemBoss = bitsByte8[6]; + BirthdayParty.ManualParty = bitsByte8[7]; + BitsByte bitsByte9 = (BitsByte) this.reader.ReadByte(); + NPC.downedPirates = bitsByte9[0]; + NPC.downedFrost = bitsByte9[1]; + NPC.downedGoblins = bitsByte9[2]; + Sandstorm.Happening = bitsByte9[3]; + DD2Event.Ongoing = bitsByte9[4]; + DD2Event.DownedInvasionT1 = bitsByte9[5]; + DD2Event.DownedInvasionT2 = bitsByte9[6]; + DD2Event.DownedInvasionT3 = bitsByte9[7]; + BitsByte bitsByte10 = (BitsByte) this.reader.ReadByte(); + NPC.combatBookWasUsed = bitsByte10[0]; + LanternNight.ManualLanterns = bitsByte10[1]; + NPC.downedTowerSolar = bitsByte10[2]; + NPC.downedTowerVortex = bitsByte10[3]; + NPC.downedTowerNebula = bitsByte10[4]; + NPC.downedTowerStardust = bitsByte10[5]; + Main.forceHalloweenForToday = bitsByte10[6]; + Main.forceXMasForToday = bitsByte10[7]; + BitsByte bitsByte11 = (BitsByte) this.reader.ReadByte(); + NPC.boughtCat = bitsByte11[0]; + NPC.boughtDog = bitsByte11[1]; + NPC.boughtBunny = bitsByte11[2]; + NPC.freeCake = bitsByte11[3]; + Main.drunkWorld = bitsByte11[4]; + NPC.downedEmpressOfLight = bitsByte11[5]; + NPC.downedQueenSlime = bitsByte11[6]; + Main.getGoodWorld = bitsByte11[7]; + WorldGen.SavedOreTiers.Copper = (int) this.reader.ReadInt16(); + WorldGen.SavedOreTiers.Iron = (int) this.reader.ReadInt16(); + WorldGen.SavedOreTiers.Silver = (int) this.reader.ReadInt16(); + WorldGen.SavedOreTiers.Gold = (int) this.reader.ReadInt16(); + WorldGen.SavedOreTiers.Cobalt = (int) this.reader.ReadInt16(); + WorldGen.SavedOreTiers.Mythril = (int) this.reader.ReadInt16(); + WorldGen.SavedOreTiers.Adamantite = (int) this.reader.ReadInt16(); + if (num5 != 0) + Main.StartSlimeRain(); + else + Main.StopSlimeRain(); + Main.invasionType = (int) this.reader.ReadSByte(); + Main.LobbyId = this.reader.ReadUInt64(); + Sandstorm.IntendedSeverity = this.reader.ReadSingle(); + if (Netplay.Connection.State == 3) + { + Main.windSpeedCurrent = Main.windSpeedTarget; + Netplay.Connection.State = 4; + } + Main.checkHalloween(); + Main.checkXMas(); + break; + case 8: + if (Main.netMode != 2) + break; + int num6 = this.reader.ReadInt32(); + int y1 = this.reader.ReadInt32(); + bool flag3 = true; + if (num6 == -1 || y1 == -1) + flag3 = false; + else if (num6 < 10 || num6 > Main.maxTilesX - 10) + flag3 = false; + else if (y1 < 10 || y1 > Main.maxTilesY - 10) + flag3 = false; + int number4 = Netplay.GetSectionX(Main.spawnTileX) - 2; + int num7 = Netplay.GetSectionY(Main.spawnTileY) - 1; + int num8 = number4 + 5; + int num9 = num7 + 3; + if (number4 < 0) + number4 = 0; + if (num8 >= Main.maxSectionsX) + num8 = Main.maxSectionsX - 1; + if (num7 < 0) + num7 = 0; + if (num9 >= Main.maxSectionsY) + num9 = Main.maxSectionsY - 1; + int num10 = (num8 - number4) * (num9 - num7); + List dontInclude = new List(); + for (int x = number4; x < num8; ++x) + { + for (int y2 = num7; y2 < num9; ++y2) + dontInclude.Add(new Point(x, y2)); + } + int num11 = -1; + int num12 = -1; + if (flag3) + { + num6 = Netplay.GetSectionX(num6) - 2; + y1 = Netplay.GetSectionY(y1) - 1; + num11 = num6 + 5; + num12 = y1 + 3; + if (num6 < 0) + num6 = 0; + if (num11 >= Main.maxSectionsX) + num11 = Main.maxSectionsX - 1; + if (y1 < 0) + y1 = 0; + if (num12 >= Main.maxSectionsY) + num12 = Main.maxSectionsY - 1; + for (int x = num6; x < num11; ++x) + { + for (int y3 = y1; y3 < num12; ++y3) + { + if (x < number4 || x >= num8 || y3 < num7 || y3 >= num9) + { + dontInclude.Add(new Point(x, y3)); + ++num10; + } + } + } + } + int num13 = 1; + List portals; + List portalCenters; + PortalHelper.SyncPortalsOnPlayerJoin(this.whoAmI, 1, dontInclude, out portals, out portalCenters); + int number5 = num10 + portals.Count; + if (Netplay.Clients[this.whoAmI].State == 2) + Netplay.Clients[this.whoAmI].State = 3; + NetMessage.TrySendData(9, this.whoAmI, text: Lang.inter[44].ToNetworkText(), number: number5); + Netplay.Clients[this.whoAmI].StatusText2 = Language.GetTextValue("Net.IsReceivingTileData"); + Netplay.Clients[this.whoAmI].StatusMax += number5; + for (int sectionX = number4; sectionX < num8; ++sectionX) + { + for (int sectionY = num7; sectionY < num9; ++sectionY) + NetMessage.SendSection(this.whoAmI, sectionX, sectionY); + } + NetMessage.TrySendData(11, this.whoAmI, number: number4, number2: ((float) num7), number3: ((float) (num8 - 1)), number4: ((float) (num9 - 1))); + if (flag3) + { + for (int sectionX = num6; sectionX < num11; ++sectionX) + { + for (int sectionY = y1; sectionY < num12; ++sectionY) + NetMessage.SendSection(this.whoAmI, sectionX, sectionY, true); + } + NetMessage.TrySendData(11, this.whoAmI, number: num6, number2: ((float) y1), number3: ((float) (num11 - 1)), number4: ((float) (num12 - 1))); + } + for (int index = 0; index < portals.Count; ++index) + NetMessage.SendSection(this.whoAmI, portals[index].X, portals[index].Y, true); + for (int index = 0; index < portalCenters.Count; ++index) + NetMessage.TrySendData(11, this.whoAmI, number: (portalCenters[index].X - num13), number2: ((float) (portalCenters[index].Y - num13)), number3: ((float) (portalCenters[index].X + num13 + 1)), number4: ((float) (portalCenters[index].Y + num13 + 1))); + for (int number6 = 0; number6 < 400; ++number6) + { + if (Main.item[number6].active) + { + NetMessage.TrySendData(21, this.whoAmI, number: number6); + NetMessage.TrySendData(22, this.whoAmI, number: number6); + } + } + for (int number7 = 0; number7 < 200; ++number7) + { + if (Main.npc[number7].active) + NetMessage.TrySendData(23, this.whoAmI, number: number7); + } + for (int number8 = 0; number8 < 1000; ++number8) + { + if (Main.projectile[number8].active && (Main.projPet[Main.projectile[number8].type] || Main.projectile[number8].netImportant)) + NetMessage.TrySendData(27, this.whoAmI, number: number8); + } + for (int number9 = 0; number9 < 289; ++number9) + NetMessage.TrySendData(83, this.whoAmI, number: number9); + NetMessage.TrySendData(49, this.whoAmI); + NetMessage.TrySendData(57, this.whoAmI); + NetMessage.TrySendData(7, this.whoAmI); + NetMessage.TrySendData(103, number: NPC.MoonLordCountdown); + NetMessage.TrySendData(101, this.whoAmI); + NetMessage.TrySendData(136, this.whoAmI); + Main.BestiaryTracker.OnPlayerJoining(this.whoAmI); + CreativePowerManager.Instance.SyncThingsToJoiningPlayer(this.whoAmI); + Main.PylonSystem.OnPlayerJoining(this.whoAmI); + break; + case 9: + if (Main.netMode != 1) + break; + Netplay.Connection.StatusMax += this.reader.ReadInt32(); + Netplay.Connection.StatusText = NetworkText.Deserialize(this.reader).ToString(); + Netplay.Connection.StatusTextFlags = (BitsByte) this.reader.ReadByte(); + break; + case 10: + if (Main.netMode != 1) + break; + NetMessage.DecompressTileBlock(this.readBuffer, bufferStart, length); + break; + case 11: + if (Main.netMode != 1) + break; + WorldGen.SectionTileFrame((int) this.reader.ReadInt16(), (int) this.reader.ReadInt16(), (int) this.reader.ReadInt16(), (int) this.reader.ReadInt16()); + break; + case 12: + int index3 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + index3 = this.whoAmI; + Player player4 = Main.player[index3]; + player4.SpawnX = (int) this.reader.ReadInt16(); + player4.SpawnY = (int) this.reader.ReadInt16(); + player4.respawnTimer = this.reader.ReadInt32(); + if (player4.respawnTimer > 0) + player4.dead = true; + PlayerSpawnContext context = (PlayerSpawnContext) this.reader.ReadByte(); + player4.Spawn(context); + if (index3 == Main.myPlayer && Main.netMode != 2) + { + Main.ActivePlayerFileData.StartPlayTimer(); + Player.Hooks.EnterWorld(Main.myPlayer); + } + if (Main.netMode != 2 || Netplay.Clients[this.whoAmI].State < 3) + break; + if (Netplay.Clients[this.whoAmI].State == 3) + { + Netplay.Clients[this.whoAmI].State = 10; + NetMessage.buffer[this.whoAmI].broadcast = true; + NetMessage.SyncConnectedPlayer(this.whoAmI); + bool flag4 = NetMessage.DoesPlayerSlotCountAsAHost(this.whoAmI); + Main.countsAsHostForGameplay[this.whoAmI] = flag4; + if (NetMessage.DoesPlayerSlotCountAsAHost(this.whoAmI)) + NetMessage.TrySendData(139, this.whoAmI, number: this.whoAmI, number2: ((float) flag4.ToInt())); + NetMessage.TrySendData(12, ignoreClient: this.whoAmI, number: this.whoAmI, number2: ((float) (byte) context)); + NetMessage.TrySendData(74, this.whoAmI, text: NetworkText.FromLiteral(Main.player[this.whoAmI].name), number: Main.anglerQuest); + NetMessage.TrySendData(129, this.whoAmI); + NetMessage.greetPlayer(this.whoAmI); + break; + } + NetMessage.TrySendData(12, ignoreClient: this.whoAmI, number: this.whoAmI, number2: ((float) (byte) context)); + break; + case 13: + int number10 = (int) this.reader.ReadByte(); + if (number10 == Main.myPlayer && !Main.ServerSideCharacter) + break; + if (Main.netMode == 2) + number10 = this.whoAmI; + Player player5 = Main.player[number10]; + BitsByte bitsByte12 = (BitsByte) this.reader.ReadByte(); + BitsByte bitsByte13 = (BitsByte) this.reader.ReadByte(); + BitsByte bitsByte14 = (BitsByte) this.reader.ReadByte(); + BitsByte bitsByte15 = (BitsByte) this.reader.ReadByte(); + player5.controlUp = bitsByte12[0]; + player5.controlDown = bitsByte12[1]; + player5.controlLeft = bitsByte12[2]; + player5.controlRight = bitsByte12[3]; + player5.controlJump = bitsByte12[4]; + player5.controlUseItem = bitsByte12[5]; + player5.direction = bitsByte12[6] ? 1 : -1; + if (bitsByte13[0]) + { + player5.pulley = true; + player5.pulleyDir = bitsByte13[1] ? (byte) 2 : (byte) 1; + } + else + player5.pulley = false; + player5.vortexStealthActive = bitsByte13[3]; + player5.gravDir = bitsByte13[4] ? 1f : -1f; + player5.TryTogglingShield(bitsByte13[5]); + player5.ghost = bitsByte13[6]; + player5.selectedItem = (int) this.reader.ReadByte(); + player5.position = this.reader.ReadVector2(); + if (bitsByte13[2]) + player5.velocity = this.reader.ReadVector2(); + else + player5.velocity = Vector2.Zero; + if (bitsByte14[6]) + { + player5.PotionOfReturnOriginalUsePosition = new Vector2?(this.reader.ReadVector2()); + player5.PotionOfReturnHomePosition = new Vector2?(this.reader.ReadVector2()); + } + else + { + player5.PotionOfReturnOriginalUsePosition = new Vector2?(); + player5.PotionOfReturnHomePosition = new Vector2?(); + } + player5.tryKeepingHoveringUp = bitsByte14[0]; + player5.IsVoidVaultEnabled = bitsByte14[1]; + player5.sitting.isSitting = bitsByte14[2]; + player5.downedDD2EventAnyDifficulty = bitsByte14[3]; + player5.isPettingAnimal = bitsByte14[4]; + player5.isTheAnimalBeingPetSmall = bitsByte14[5]; + player5.tryKeepingHoveringDown = bitsByte14[7]; + player5.sleeping.SetIsSleepingAndAdjustPlayerRotation(player5, bitsByte15[0]); + if (Main.netMode != 2 || Netplay.Clients[this.whoAmI].State != 10) + break; + NetMessage.TrySendData(13, ignoreClient: this.whoAmI, number: number10); + break; + case 14: + int playerIndex = (int) this.reader.ReadByte(); + int num14 = (int) this.reader.ReadByte(); + if (Main.netMode != 1) + break; + int num15 = Main.player[playerIndex].active ? 1 : 0; + if (num14 == 1) + { + if (!Main.player[playerIndex].active) + Main.player[playerIndex] = new Player(); + Main.player[playerIndex].active = true; + } + else + Main.player[playerIndex].active = false; + int num16 = Main.player[playerIndex].active ? 1 : 0; + if (num15 == num16) + break; + if (Main.player[playerIndex].active) + { + Player.Hooks.PlayerConnect(playerIndex); + break; + } + Player.Hooks.PlayerDisconnect(playerIndex); + break; + case 15: + break; + case 16: + int number11 = (int) this.reader.ReadByte(); + if (number11 == Main.myPlayer && !Main.ServerSideCharacter) + break; + if (Main.netMode == 2) + number11 = this.whoAmI; + Player player6 = Main.player[number11]; + player6.statLife = (int) this.reader.ReadInt16(); + player6.statLifeMax = (int) this.reader.ReadInt16(); + if (player6.statLifeMax < 100) + player6.statLifeMax = 100; + player6.dead = player6.statLife <= 0; + if (Main.netMode != 2) + break; + NetMessage.TrySendData(16, ignoreClient: this.whoAmI, number: number11); + break; + case 17: + byte num17 = this.reader.ReadByte(); + int index4 = (int) this.reader.ReadInt16(); + int index5 = (int) this.reader.ReadInt16(); + short num18 = this.reader.ReadInt16(); + int num19 = (int) this.reader.ReadByte(); + bool fail = num18 == (short) 1; + if (!WorldGen.InWorld(index4, index5, 3)) + break; + if (Main.tile[index4, index5] == null) + Main.tile[index4, index5] = new Tile(); + if (Main.netMode == 2) + { + if (!fail) + { + if (num17 == (byte) 0 || num17 == (byte) 2 || num17 == (byte) 4) + ++Netplay.Clients[this.whoAmI].SpamDeleteBlock; + if (num17 == (byte) 1 || num17 == (byte) 3) + ++Netplay.Clients[this.whoAmI].SpamAddBlock; + } + if (!Netplay.Clients[this.whoAmI].TileSections[Netplay.GetSectionX(index4), Netplay.GetSectionY(index5)]) + fail = true; + } + if (num17 == (byte) 0) + { + WorldGen.KillTile(index4, index5, fail); + if (Main.netMode == 1 && !fail) + HitTile.ClearAllTilesAtThisLocation(index4, index5); + } + if (num17 == (byte) 1) + WorldGen.PlaceTile(index4, index5, (int) num18, forced: true, style: num19); + if (num17 == (byte) 2) + WorldGen.KillWall(index4, index5, fail); + if (num17 == (byte) 3) + WorldGen.PlaceWall(index4, index5, (int) num18); + if (num17 == (byte) 4) + WorldGen.KillTile(index4, index5, fail, noItem: true); + if (num17 == (byte) 5) + WorldGen.PlaceWire(index4, index5); + if (num17 == (byte) 6) + WorldGen.KillWire(index4, index5); + if (num17 == (byte) 7) + WorldGen.PoundTile(index4, index5); + if (num17 == (byte) 8) + WorldGen.PlaceActuator(index4, index5); + if (num17 == (byte) 9) + WorldGen.KillActuator(index4, index5); + if (num17 == (byte) 10) + WorldGen.PlaceWire2(index4, index5); + if (num17 == (byte) 11) + WorldGen.KillWire2(index4, index5); + if (num17 == (byte) 12) + WorldGen.PlaceWire3(index4, index5); + if (num17 == (byte) 13) + WorldGen.KillWire3(index4, index5); + if (num17 == (byte) 14) + WorldGen.SlopeTile(index4, index5, (int) num18); + if (num17 == (byte) 15) + Minecart.FrameTrack(index4, index5, true); + if (num17 == (byte) 16) + WorldGen.PlaceWire4(index4, index5); + if (num17 == (byte) 17) + WorldGen.KillWire4(index4, index5); + if (num17 == (byte) 18) + { + Wiring.SetCurrentUser(this.whoAmI); + Wiring.PokeLogicGate(index4, index5); + Wiring.SetCurrentUser(); + break; + } + if (num17 == (byte) 19) + { + Wiring.SetCurrentUser(this.whoAmI); + Wiring.Actuate(index4, index5); + Wiring.SetCurrentUser(); + break; + } + if (num17 == (byte) 20) + { + if (!WorldGen.InWorld(index4, index5, 2)) + break; + int type = (int) Main.tile[index4, index5].type; + WorldGen.KillTile(index4, index5, fail); + short num20 = (int) Main.tile[index4, index5].type == type ? (short) 1 : (short) 0; + if (Main.netMode != 2) + break; + NetMessage.TrySendData(17, number: ((int) num17), number2: ((float) index4), number3: ((float) index5), number4: ((float) num20), number5: num19); + break; + } + if (num17 == (byte) 21) + WorldGen.ReplaceTile(index4, index5, (ushort) num18, num19); + if (num17 == (byte) 22) + WorldGen.ReplaceWall(index4, index5, (ushort) num18); + if (num17 == (byte) 23) + { + WorldGen.SlopeTile(index4, index5, (int) num18); + WorldGen.PoundTile(index4, index5); + } + if (Main.netMode != 2) + break; + NetMessage.TrySendData(17, ignoreClient: this.whoAmI, number: ((int) num17), number2: ((float) index4), number3: ((float) index5), number4: ((float) num18), number5: num19); + if (num17 != (byte) 1 && num17 != (byte) 21 || !TileID.Sets.Falling[(int) num18]) + break; + NetMessage.SendTileSquare(-1, index4, index5, 1); + break; + case 18: + if (Main.netMode != 1) + break; + Main.dayTime = this.reader.ReadByte() == (byte) 1; + Main.time = (double) this.reader.ReadInt32(); + Main.sunModY = this.reader.ReadInt16(); + Main.moonModY = this.reader.ReadInt16(); + break; + case 19: + byte num21 = this.reader.ReadByte(); + int num22 = (int) this.reader.ReadInt16(); + int num23 = (int) this.reader.ReadInt16(); + if (!WorldGen.InWorld(num22, num23, 3)) + break; + int direction1 = this.reader.ReadByte() == (byte) 0 ? -1 : 1; + switch (num21) + { + case 0: + WorldGen.OpenDoor(num22, num23, direction1); + break; + case 1: + WorldGen.CloseDoor(num22, num23, true); + break; + case 2: + WorldGen.ShiftTrapdoor(num22, num23, direction1 == 1, 1); + break; + case 3: + WorldGen.ShiftTrapdoor(num22, num23, direction1 == 1, 0); + break; + case 4: + WorldGen.ShiftTallGate(num22, num23, false, true); + break; + case 5: + WorldGen.ShiftTallGate(num22, num23, true, true); + break; + } + if (Main.netMode != 2) + break; + NetMessage.TrySendData(19, ignoreClient: this.whoAmI, number: ((int) num21), number2: ((float) num22), number3: ((float) num23), number4: (direction1 == 1 ? 1f : 0.0f)); + break; + case 20: + int num24 = (int) this.reader.ReadUInt16(); + short num25 = (short) (num24 & (int) short.MaxValue); + int num26 = (uint) (num24 & 32768) > 0U ? 1 : 0; + byte num27 = 0; + if (num26 != 0) + num27 = this.reader.ReadByte(); + int num28 = (int) this.reader.ReadInt16(); + int num29 = (int) this.reader.ReadInt16(); + if (!WorldGen.InWorld(num28, num29, 3)) + break; + TileChangeType type3 = TileChangeType.None; + if (Enum.IsDefined(typeof (TileChangeType), (object) num27)) + type3 = (TileChangeType) num27; + if (MessageBuffer.OnTileChangeReceived != null) + MessageBuffer.OnTileChangeReceived(num28, num29, (int) num25, type3); + BitsByte bitsByte16 = (BitsByte) (byte) 0; + BitsByte bitsByte17 = (BitsByte) (byte) 0; + for (int index6 = num28; index6 < num28 + (int) num25; ++index6) + { + for (int index7 = num29; index7 < num29 + (int) num25; ++index7) + { + if (Main.tile[index6, index7] == null) + Main.tile[index6, index7] = new Tile(); + Tile tile = Main.tile[index6, index7]; + bool flag5 = tile.active(); + BitsByte bitsByte18 = (BitsByte) this.reader.ReadByte(); + BitsByte bitsByte19 = (BitsByte) this.reader.ReadByte(); + tile.active(bitsByte18[0]); + tile.wall = bitsByte18[2] ? (ushort) 1 : (ushort) 0; + bool flag6 = bitsByte18[3]; + if (Main.netMode != 2) + tile.liquid = flag6 ? (byte) 1 : (byte) 0; + tile.wire(bitsByte18[4]); + tile.halfBrick(bitsByte18[5]); + tile.actuator(bitsByte18[6]); + tile.inActive(bitsByte18[7]); + tile.wire2(bitsByte19[0]); + tile.wire3(bitsByte19[1]); + if (bitsByte19[2]) + tile.color(this.reader.ReadByte()); + if (bitsByte19[3]) + tile.wallColor(this.reader.ReadByte()); + if (tile.active()) + { + int type4 = (int) tile.type; + tile.type = this.reader.ReadUInt16(); + if (Main.tileFrameImportant[(int) tile.type]) + { + tile.frameX = this.reader.ReadInt16(); + tile.frameY = this.reader.ReadInt16(); + } + else if (!flag5 || (int) tile.type != type4) + { + tile.frameX = (short) -1; + tile.frameY = (short) -1; + } + byte slope = 0; + if (bitsByte19[4]) + ++slope; + if (bitsByte19[5]) + slope += (byte) 2; + if (bitsByte19[6]) + slope += (byte) 4; + tile.slope(slope); + } + tile.wire4(bitsByte19[7]); + if (tile.wall > (ushort) 0) + tile.wall = this.reader.ReadUInt16(); + if (flag6) + { + tile.liquid = this.reader.ReadByte(); + tile.liquidType((int) this.reader.ReadByte()); + } + } + } + WorldGen.RangeFrame(num28, num29, num28 + (int) num25, num29 + (int) num25); + if (Main.netMode != 2) + break; + NetMessage.TrySendData((int) num1, ignoreClient: this.whoAmI, number: ((int) num25), number2: ((float) num28), number3: ((float) num29)); + break; + case 21: + case 90: + int index8 = (int) this.reader.ReadInt16(); + Vector2 vector2_1 = this.reader.ReadVector2(); + Vector2 vector2_2 = this.reader.ReadVector2(); + int Stack = (int) this.reader.ReadInt16(); + int pre1 = (int) this.reader.ReadByte(); + int num30 = (int) this.reader.ReadByte(); + int type5 = (int) this.reader.ReadInt16(); + if (Main.netMode == 1) + { + if (type5 == 0) + { + Main.item[index8].active = false; + break; + } + int index9 = index8; + Item obj = Main.item[index9]; + ItemSyncPersistentStats syncPersistentStats = new ItemSyncPersistentStats(); + syncPersistentStats.CopyFrom(obj); + bool flag7 = (obj.newAndShiny || obj.netID != type5) && ItemSlot.Options.HighlightNewItems && (type5 < 0 || type5 >= 5045 || !ItemID.Sets.NeverAppearsAsNewInInventory[type5]); + obj.netDefaults(type5); + obj.newAndShiny = flag7; + obj.Prefix(pre1); + obj.stack = Stack; + obj.position = vector2_1; + obj.velocity = vector2_2; + obj.active = true; + if (num1 == (byte) 90) + { + obj.instanced = true; + obj.playerIndexTheItemIsReservedFor = Main.myPlayer; + obj.keepTime = 600; + } + obj.wet = Collision.WetCollision(obj.position, obj.width, obj.height); + syncPersistentStats.PasteInto(obj); + break; + } + if (Main.timeItemSlotCannotBeReusedFor[index8] > 0) + break; + if (type5 == 0) + { + if (index8 >= 400) + break; + Main.item[index8].active = false; + NetMessage.TrySendData(21, number: index8); + break; + } + bool flag8 = false; + if (index8 == 400) + flag8 = true; + if (flag8) + { + Item obj = new Item(); + obj.netDefaults(type5); + index8 = Item.NewItem((int) vector2_1.X, (int) vector2_1.Y, obj.width, obj.height, obj.type, Stack, true); + } + Item obj1 = Main.item[index8]; + obj1.netDefaults(type5); + obj1.Prefix(pre1); + obj1.stack = Stack; + obj1.position = vector2_1; + obj1.velocity = vector2_2; + obj1.active = true; + obj1.playerIndexTheItemIsReservedFor = Main.myPlayer; + if (flag8) + { + NetMessage.TrySendData(21, number: index8); + if (num30 == 0) + { + Main.item[index8].ownIgnore = this.whoAmI; + Main.item[index8].ownTime = 100; + } + Main.item[index8].FindOwner(index8); + break; + } + NetMessage.TrySendData(21, ignoreClient: this.whoAmI, number: index8); + break; + case 22: + int number12 = (int) this.reader.ReadInt16(); + int num31 = (int) this.reader.ReadByte(); + if (Main.netMode == 2 && Main.item[number12].playerIndexTheItemIsReservedFor != this.whoAmI) + break; + Main.item[number12].playerIndexTheItemIsReservedFor = num31; + Main.item[number12].keepTime = num31 != Main.myPlayer ? 0 : 15; + if (Main.netMode != 2) + break; + Main.item[number12].playerIndexTheItemIsReservedFor = (int) byte.MaxValue; + Main.item[number12].keepTime = 15; + NetMessage.TrySendData(22, number: number12); + break; + case 23: + if (Main.netMode != 1) + break; + int index10 = (int) this.reader.ReadInt16(); + Vector2 vector2_3 = this.reader.ReadVector2(); + Vector2 vector2_4 = this.reader.ReadVector2(); + int num32 = (int) this.reader.ReadUInt16(); + if (num32 == (int) ushort.MaxValue) + num32 = 0; + BitsByte bitsByte20 = (BitsByte) this.reader.ReadByte(); + BitsByte bitsByte21 = (BitsByte) this.reader.ReadByte(); + float[] numArray1 = new float[NPC.maxAI]; + for (int index11 = 0; index11 < NPC.maxAI; ++index11) + numArray1[index11] = !bitsByte20[index11 + 2] ? 0.0f : this.reader.ReadSingle(); + int Type1 = (int) this.reader.ReadInt16(); + int? nullable = new int?(1); + if (bitsByte21[0]) + nullable = new int?((int) this.reader.ReadByte()); + float num33 = 1f; + if (bitsByte21[2]) + num33 = this.reader.ReadSingle(); + int num34 = 0; + if (!bitsByte20[7]) + { + switch (this.reader.ReadByte()) + { + case 2: + num34 = (int) this.reader.ReadInt16(); + break; + case 4: + num34 = this.reader.ReadInt32(); + break; + default: + num34 = (int) this.reader.ReadSByte(); + break; + } + } + int oldType = -1; + NPC npc1 = Main.npc[index10]; + if (npc1.active && Main.multiplayerNPCSmoothingRange > 0 && (double) Vector2.DistanceSquared(npc1.position, vector2_3) < 640000.0) + npc1.netOffset += npc1.position - vector2_3; + if (!npc1.active || npc1.netID != Type1) + { + npc1.netOffset *= 0.0f; + if (npc1.active) + oldType = npc1.type; + npc1.active = true; + npc1.SetDefaults(Type1); + } + npc1.position = vector2_3; + npc1.velocity = vector2_4; + npc1.target = num32; + npc1.direction = bitsByte20[0] ? 1 : -1; + npc1.directionY = bitsByte20[1] ? 1 : -1; + npc1.spriteDirection = bitsByte20[6] ? 1 : -1; + if (bitsByte20[7]) + num34 = npc1.life = npc1.lifeMax; + else + npc1.life = num34; + if (num34 <= 0) + npc1.active = false; + npc1.SpawnedFromStatue = bitsByte21[0]; + if (npc1.SpawnedFromStatue) + npc1.value = 0.0f; + for (int index12 = 0; index12 < NPC.maxAI; ++index12) + npc1.ai[index12] = numArray1[index12]; + if (oldType > -1 && oldType != npc1.type) + npc1.TransformVisuals(oldType, npc1.type); + if (Type1 == 262) + NPC.plantBoss = index10; + if (Type1 == 245) + NPC.golemBoss = index10; + if (npc1.type < 0 || npc1.type >= 663 || !Main.npcCatchable[npc1.type]) + break; + npc1.releaseOwner = (short) this.reader.ReadByte(); + break; + case 24: + int number13 = (int) this.reader.ReadInt16(); + int index13 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + index13 = this.whoAmI; + Player player7 = Main.player[index13]; + Main.npc[number13].StrikeNPC(player7.inventory[player7.selectedItem].damage, player7.inventory[player7.selectedItem].knockBack, player7.direction); + if (Main.netMode != 2) + break; + NetMessage.TrySendData(24, ignoreClient: this.whoAmI, number: number13, number2: ((float) index13)); + NetMessage.TrySendData(23, number: number13); + break; + case 25: + break; + case 26: + break; + case 27: + int num35 = (int) this.reader.ReadInt16(); + Vector2 vector2_5 = this.reader.ReadVector2(); + Vector2 vector2_6 = this.reader.ReadVector2(); + int index14 = (int) this.reader.ReadByte(); + int Type2 = (int) this.reader.ReadInt16(); + BitsByte bitsByte22 = (BitsByte) this.reader.ReadByte(); + float[] numArray2 = new float[Projectile.maxAI]; + for (int key = 0; key < Projectile.maxAI; ++key) + numArray2[key] = !bitsByte22[key] ? 0.0f : this.reader.ReadSingle(); + int num36 = bitsByte22[4] ? (int) this.reader.ReadInt16() : 0; + float num37 = bitsByte22[5] ? this.reader.ReadSingle() : 0.0f; + int num38 = bitsByte22[6] ? (int) this.reader.ReadInt16() : 0; + int index15 = bitsByte22[7] ? (int) this.reader.ReadInt16() : -1; + if (index15 >= 1000) + index15 = -1; + if (Main.netMode == 2) + { + if (Type2 == 949) + { + index14 = (int) byte.MaxValue; + } + else + { + index14 = this.whoAmI; + if (Main.projHostile[Type2]) + break; + } + } + int number14 = 1000; + for (int index16 = 0; index16 < 1000; ++index16) + { + if (Main.projectile[index16].owner == index14 && Main.projectile[index16].identity == num35 && Main.projectile[index16].active) + { + number14 = index16; + break; + } + } + if (number14 == 1000) + { + for (int index17 = 0; index17 < 1000; ++index17) + { + if (!Main.projectile[index17].active) + { + number14 = index17; + break; + } + } + } + if (number14 == 1000) + number14 = Projectile.FindOldestProjectile(); + Projectile projectile = Main.projectile[number14]; + if (!projectile.active || projectile.type != Type2) + { + projectile.SetDefaults(Type2); + if (Main.netMode == 2) + ++Netplay.Clients[this.whoAmI].SpamProjectile; + } + projectile.identity = num35; + projectile.position = vector2_5; + projectile.velocity = vector2_6; + projectile.type = Type2; + projectile.damage = num36; + projectile.originalDamage = num38; + projectile.knockBack = num37; + projectile.owner = index14; + for (int index18 = 0; index18 < Projectile.maxAI; ++index18) + projectile.ai[index18] = numArray2[index18]; + if (index15 >= 0) + { + projectile.projUUID = index15; + Main.projectileIdentity[index14, index15] = number14; + } + projectile.ProjectileFixDesperation(); + if (Main.netMode != 2) + break; + NetMessage.TrySendData(27, ignoreClient: this.whoAmI, number: number14); + break; + case 28: + int number15 = (int) this.reader.ReadInt16(); + int Damage1 = (int) this.reader.ReadInt16(); + float num39 = this.reader.ReadSingle(); + int hitDirection = (int) this.reader.ReadByte() - 1; + byte num40 = this.reader.ReadByte(); + if (Main.netMode == 2) + { + if (Damage1 < 0) + Damage1 = 0; + Main.npc[number15].PlayerInteraction(this.whoAmI); + } + if (Damage1 >= 0) + { + Main.npc[number15].StrikeNPC(Damage1, num39, hitDirection, num40 == (byte) 1, fromNet: true); + } + else + { + Main.npc[number15].life = 0; + Main.npc[number15].HitEffect(); + Main.npc[number15].active = false; + } + if (Main.netMode != 2) + break; + NetMessage.TrySendData(28, ignoreClient: this.whoAmI, number: number15, number2: ((float) Damage1), number3: num39, number4: ((float) hitDirection), number5: ((int) num40)); + if (Main.npc[number15].life <= 0) + NetMessage.TrySendData(23, number: number15); + else + Main.npc[number15].netUpdate = true; + if (Main.npc[number15].realLife < 0) + break; + if (Main.npc[Main.npc[number15].realLife].life <= 0) + { + NetMessage.TrySendData(23, number: Main.npc[number15].realLife); + break; + } + Main.npc[Main.npc[number15].realLife].netUpdate = true; + break; + case 29: + int number16 = (int) this.reader.ReadInt16(); + int num41 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + num41 = this.whoAmI; + for (int index19 = 0; index19 < 1000; ++index19) + { + if (Main.projectile[index19].owner == num41 && Main.projectile[index19].identity == number16 && Main.projectile[index19].active) + { + Main.projectile[index19].Kill(); + break; + } + } + if (Main.netMode != 2) + break; + NetMessage.TrySendData(29, ignoreClient: this.whoAmI, number: number16, number2: ((float) num41)); + break; + case 30: + int number17 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + number17 = this.whoAmI; + bool flag9 = this.reader.ReadBoolean(); + Main.player[number17].hostile = flag9; + if (Main.netMode != 2) + break; + NetMessage.TrySendData(30, ignoreClient: this.whoAmI, number: number17); + LocalizedText localizedText1 = flag9 ? Lang.mp[11] : Lang.mp[12]; + Color color1 = Main.teamColor[Main.player[number17].team]; + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(localizedText1.Key, (object) Main.player[number17].name), color1); + break; + case 31: + if (Main.netMode != 2) + break; + int num42 = (int) this.reader.ReadInt16(); + int num43 = (int) this.reader.ReadInt16(); + int chest1 = Chest.FindChest(num42, num43); + if (chest1 <= -1 || Chest.UsingChest(chest1) != -1) + break; + for (int index20 = 0; index20 < 40; ++index20) + NetMessage.TrySendData(32, this.whoAmI, number: chest1, number2: ((float) index20)); + NetMessage.TrySendData(33, this.whoAmI, number: chest1); + Main.player[this.whoAmI].chest = chest1; + if (Main.myPlayer == this.whoAmI) + Main.recBigList = false; + NetMessage.TrySendData(80, ignoreClient: this.whoAmI, number: this.whoAmI, number2: ((float) chest1)); + if (Main.netMode != 2 || !WorldGen.IsChestRigged(num42, num43)) + break; + Wiring.SetCurrentUser(this.whoAmI); + Wiring.HitSwitch(num42, num43); + Wiring.SetCurrentUser(); + NetMessage.TrySendData(59, ignoreClient: this.whoAmI, number: num42, number2: ((float) num43)); + break; + case 32: + int index21 = (int) this.reader.ReadInt16(); + int index22 = (int) this.reader.ReadByte(); + int num44 = (int) this.reader.ReadInt16(); + int pre2 = (int) this.reader.ReadByte(); + int type6 = (int) this.reader.ReadInt16(); + if (index21 < 0 || index21 >= 8000) + break; + if (Main.chest[index21] == null) + Main.chest[index21] = new Chest(); + if (Main.chest[index21].item[index22] == null) + Main.chest[index21].item[index22] = new Item(); + Main.chest[index21].item[index22].netDefaults(type6); + Main.chest[index21].item[index22].Prefix(pre2); + Main.chest[index21].item[index22].stack = num44; + Recipe.FindRecipes(true); + break; + case 33: + int num45 = (int) this.reader.ReadInt16(); + int index23 = (int) this.reader.ReadInt16(); + int index24 = (int) this.reader.ReadInt16(); + int num46 = (int) this.reader.ReadByte(); + string str1 = string.Empty; + if (num46 != 0) + { + if (num46 <= 20) + str1 = this.reader.ReadString(); + else if (num46 != (int) byte.MaxValue) + num46 = 0; + } + if (Main.netMode == 1) + { + Player player8 = Main.player[Main.myPlayer]; + if (player8.chest == -1) + { + Main.playerInventory = true; + SoundEngine.PlaySound(10); + } + else if (player8.chest != num45 && num45 != -1) + { + Main.playerInventory = true; + SoundEngine.PlaySound(12); + Main.recBigList = false; + } + else if (player8.chest != -1 && num45 == -1) + { + SoundEngine.PlaySound(11); + Main.recBigList = false; + } + player8.chest = num45; + player8.chestX = index23; + player8.chestY = index24; + Recipe.FindRecipes(true); + if (Main.tile[index23, index24].frameX < (short) 36 || Main.tile[index23, index24].frameX >= (short) 72) + break; + AchievementsHelper.HandleSpecialEvent(Main.player[Main.myPlayer], 16); + break; + } + if (num46 != 0) + { + int chest2 = Main.player[this.whoAmI].chest; + Chest chest3 = Main.chest[chest2]; + chest3.name = str1; + NetMessage.TrySendData(69, ignoreClient: this.whoAmI, number: chest2, number2: ((float) chest3.x), number3: ((float) chest3.y)); + } + Main.player[this.whoAmI].chest = num45; + Recipe.FindRecipes(true); + NetMessage.TrySendData(80, ignoreClient: this.whoAmI, number: this.whoAmI, number2: ((float) num45)); + break; + case 34: + byte num47 = this.reader.ReadByte(); + int index25 = (int) this.reader.ReadInt16(); + int index26 = (int) this.reader.ReadInt16(); + int style1 = (int) this.reader.ReadInt16(); + int id = (int) this.reader.ReadInt16(); + if (Main.netMode == 2) + id = 0; + if (Main.netMode == 2) + { + if (num47 == (byte) 0) + { + int number5_1 = WorldGen.PlaceChest(index25, index26, style: style1); + if (number5_1 == -1) + { + NetMessage.TrySendData(34, this.whoAmI, number: ((int) num47), number2: ((float) index25), number3: ((float) index26), number4: ((float) style1), number5: number5_1); + Item.NewItem(index25 * 16, index26 * 16, 32, 32, Chest.chestItemSpawn[style1], noBroadcast: true); + break; + } + NetMessage.TrySendData(34, number: ((int) num47), number2: ((float) index25), number3: ((float) index26), number4: ((float) style1), number5: number5_1); + break; + } + if (num47 == (byte) 1 && Main.tile[index25, index26].type == (ushort) 21) + { + Tile tile = Main.tile[index25, index26]; + if ((int) tile.frameX % 36 != 0) + --index25; + if ((int) tile.frameY % 36 != 0) + --index26; + int chest4 = Chest.FindChest(index25, index26); + WorldGen.KillTile(index25, index26); + if (tile.active()) + break; + NetMessage.TrySendData(34, number: ((int) num47), number2: ((float) index25), number3: ((float) index26), number5: chest4); + break; + } + if (num47 == (byte) 2) + { + int number5_2 = WorldGen.PlaceChest(index25, index26, (ushort) 88, style: style1); + if (number5_2 == -1) + { + NetMessage.TrySendData(34, this.whoAmI, number: ((int) num47), number2: ((float) index25), number3: ((float) index26), number4: ((float) style1), number5: number5_2); + Item.NewItem(index25 * 16, index26 * 16, 32, 32, Chest.dresserItemSpawn[style1], noBroadcast: true); + break; + } + NetMessage.TrySendData(34, number: ((int) num47), number2: ((float) index25), number3: ((float) index26), number4: ((float) style1), number5: number5_2); + break; + } + if (num47 == (byte) 3 && Main.tile[index25, index26].type == (ushort) 88) + { + Tile tile = Main.tile[index25, index26]; + int num48 = index25 - (int) tile.frameX % 54 / 18; + if ((int) tile.frameY % 36 != 0) + --index26; + int chest5 = Chest.FindChest(num48, index26); + WorldGen.KillTile(num48, index26); + if (tile.active()) + break; + NetMessage.TrySendData(34, number: ((int) num47), number2: ((float) num48), number3: ((float) index26), number5: chest5); + break; + } + if (num47 == (byte) 4) + { + int number5_3 = WorldGen.PlaceChest(index25, index26, (ushort) 467, style: style1); + if (number5_3 == -1) + { + NetMessage.TrySendData(34, this.whoAmI, number: ((int) num47), number2: ((float) index25), number3: ((float) index26), number4: ((float) style1), number5: number5_3); + Item.NewItem(index25 * 16, index26 * 16, 32, 32, Chest.chestItemSpawn2[style1], noBroadcast: true); + break; + } + NetMessage.TrySendData(34, number: ((int) num47), number2: ((float) index25), number3: ((float) index26), number4: ((float) style1), number5: number5_3); + break; + } + if (num47 != (byte) 5 || Main.tile[index25, index26].type != (ushort) 467) + break; + Tile tile1 = Main.tile[index25, index26]; + if ((int) tile1.frameX % 36 != 0) + --index25; + if ((int) tile1.frameY % 36 != 0) + --index26; + int chest6 = Chest.FindChest(index25, index26); + WorldGen.KillTile(index25, index26); + if (tile1.active()) + break; + NetMessage.TrySendData(34, number: ((int) num47), number2: ((float) index25), number3: ((float) index26), number5: chest6); + break; + } + switch (num47) + { + case 0: + if (id == -1) + { + WorldGen.KillTile(index25, index26); + return; + } + SoundEngine.PlaySound(0, index25 * 16, index26 * 16); + WorldGen.PlaceChestDirect(index25, index26, (ushort) 21, style1, id); + return; + case 2: + if (id == -1) + { + WorldGen.KillTile(index25, index26); + return; + } + SoundEngine.PlaySound(0, index25 * 16, index26 * 16); + WorldGen.PlaceDresserDirect(index25, index26, (ushort) 88, style1, id); + return; + case 4: + if (id == -1) + { + WorldGen.KillTile(index25, index26); + return; + } + SoundEngine.PlaySound(0, index25 * 16, index26 * 16); + WorldGen.PlaceChestDirect(index25, index26, (ushort) 467, style1, id); + return; + default: + Chest.DestroyChestDirect(index25, index26, id); + WorldGen.KillTile(index25, index26); + return; + } + case 35: + int number18 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + number18 = this.whoAmI; + int healAmount1 = (int) this.reader.ReadInt16(); + if (number18 != Main.myPlayer || Main.ServerSideCharacter) + Main.player[number18].HealEffect(healAmount1); + if (Main.netMode != 2) + break; + NetMessage.TrySendData(35, ignoreClient: this.whoAmI, number: number18, number2: ((float) healAmount1)); + break; + case 36: + int number19 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + number19 = this.whoAmI; + Player player9 = Main.player[number19]; + player9.zone1 = (BitsByte) this.reader.ReadByte(); + player9.zone2 = (BitsByte) this.reader.ReadByte(); + player9.zone3 = (BitsByte) this.reader.ReadByte(); + player9.zone4 = (BitsByte) this.reader.ReadByte(); + if (Main.netMode != 2) + break; + NetMessage.TrySendData(36, ignoreClient: this.whoAmI, number: number19); + break; + case 37: + if (Main.netMode != 1) + break; + if (Main.autoPass) + { + NetMessage.TrySendData(38); + Main.autoPass = false; + break; + } + Netplay.ServerPassword = ""; + Main.menuMode = 31; + break; + case 38: + if (Main.netMode != 2) + break; + if (this.reader.ReadString() == Netplay.ServerPassword) + { + Netplay.Clients[this.whoAmI].State = 1; + NetMessage.TrySendData(3, this.whoAmI); + break; + } + NetMessage.TrySendData(2, this.whoAmI, text: Lang.mp[1].ToNetworkText()); + break; + case 39: + if (Main.netMode != 1) + break; + int number20 = (int) this.reader.ReadInt16(); + Main.item[number20].playerIndexTheItemIsReservedFor = (int) byte.MaxValue; + NetMessage.TrySendData(22, number: number20); + break; + case 40: + int number21 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + number21 = this.whoAmI; + int npcIndex = (int) this.reader.ReadInt16(); + Main.player[number21].SetTalkNPC(npcIndex, true); + if (Main.netMode != 2) + break; + NetMessage.TrySendData(40, ignoreClient: this.whoAmI, number: number21); + break; + case 41: + int number22 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + number22 = this.whoAmI; + Player player10 = Main.player[number22]; + float num49 = this.reader.ReadSingle(); + int num50 = (int) this.reader.ReadInt16(); + player10.itemRotation = num49; + player10.itemAnimation = num50; + player10.channel = player10.inventory[player10.selectedItem].channel; + if (Main.netMode != 2) + break; + NetMessage.TrySendData(41, ignoreClient: this.whoAmI, number: number22); + break; + case 42: + int index27 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + index27 = this.whoAmI; + else if (Main.myPlayer == index27 && !Main.ServerSideCharacter) + break; + int num51 = (int) this.reader.ReadInt16(); + int num52 = (int) this.reader.ReadInt16(); + Main.player[index27].statMana = num51; + Main.player[index27].statManaMax = num52; + break; + case 43: + int number23 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + number23 = this.whoAmI; + int manaAmount = (int) this.reader.ReadInt16(); + if (number23 != Main.myPlayer) + Main.player[number23].ManaEffect(manaAmount); + if (Main.netMode != 2) + break; + NetMessage.TrySendData(43, ignoreClient: this.whoAmI, number: number23, number2: ((float) manaAmount)); + break; + case 44: + break; + case 45: + int number24 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + number24 = this.whoAmI; + int index28 = (int) this.reader.ReadByte(); + Player player11 = Main.player[number24]; + int team = player11.team; + player11.team = index28; + Color color2 = Main.teamColor[index28]; + if (Main.netMode != 2) + break; + NetMessage.TrySendData(45, ignoreClient: this.whoAmI, number: number24); + LocalizedText localizedText2 = Lang.mp[13 + index28]; + if (index28 == 5) + localizedText2 = Lang.mp[22]; + for (int playerId = 0; playerId < (int) byte.MaxValue; ++playerId) + { + if (playerId == this.whoAmI || team > 0 && Main.player[playerId].team == team || index28 > 0 && Main.player[playerId].team == index28) + ChatHelper.SendChatMessageToClient(NetworkText.FromKey(localizedText2.Key, (object) player11.name), color2, playerId); + } + break; + case 46: + if (Main.netMode != 2) + break; + int number25 = Sign.ReadSign((int) this.reader.ReadInt16(), (int) this.reader.ReadInt16()); + if (number25 < 0) + break; + NetMessage.TrySendData(47, this.whoAmI, number: number25, number2: ((float) this.whoAmI)); + break; + case 47: + int index29 = (int) this.reader.ReadInt16(); + int num53 = (int) this.reader.ReadInt16(); + int num54 = (int) this.reader.ReadInt16(); + string text1 = this.reader.ReadString(); + int num55 = (int) this.reader.ReadByte(); + BitsByte bitsByte23 = (BitsByte) this.reader.ReadByte(); + if (index29 < 0 || index29 >= 1000) + break; + string str2 = (string) null; + if (Main.sign[index29] != null) + str2 = Main.sign[index29].text; + Main.sign[index29] = new Sign(); + Main.sign[index29].x = num53; + Main.sign[index29].y = num54; + Sign.TextSign(index29, text1); + if (Main.netMode == 2 && str2 != text1) + { + num55 = this.whoAmI; + NetMessage.TrySendData(47, ignoreClient: this.whoAmI, number: index29, number2: ((float) num55)); + } + if (Main.netMode != 1 || num55 != Main.myPlayer || Main.sign[index29] == null || bitsByte23[0]) + break; + Main.playerInventory = false; + Main.player[Main.myPlayer].SetTalkNPC(-1, true); + Main.npcChatCornerItem = 0; + Main.editSign = false; + SoundEngine.PlaySound(10); + Main.player[Main.myPlayer].sign = index29; + Main.npcChatText = Main.sign[index29].text; + break; + case 48: + int i1 = (int) this.reader.ReadInt16(); + int j1 = (int) this.reader.ReadInt16(); + byte num56 = this.reader.ReadByte(); + byte num57 = this.reader.ReadByte(); + if (Main.netMode == 2 && Netplay.SpamCheck) + { + int whoAmI = this.whoAmI; + int num58 = (int) ((double) Main.player[whoAmI].position.X + (double) (Main.player[whoAmI].width / 2)); + int num59 = (int) ((double) Main.player[whoAmI].position.Y + (double) (Main.player[whoAmI].height / 2)); + int num60 = 10; + int num61 = num58 - num60; + int num62 = num58 + num60; + int num63 = num59 - num60; + int num64 = num59 + num60; + if (i1 < num61 || i1 > num62 || j1 < num63 || j1 > num64) + { + NetMessage.BootPlayer(this.whoAmI, NetworkText.FromKey("Net.CheatingLiquidSpam")); + break; + } + } + if (Main.tile[i1, j1] == null) + Main.tile[i1, j1] = new Tile(); + lock (Main.tile[i1, j1]) + { + Main.tile[i1, j1].liquid = num56; + Main.tile[i1, j1].liquidType((int) num57); + if (Main.netMode != 2) + break; + WorldGen.SquareTileFrame(i1, j1); + break; + } + case 49: + if (Netplay.Connection.State != 6) + break; + Netplay.Connection.State = 10; + Main.ActivePlayerFileData.StartPlayTimer(); + Player.Hooks.EnterWorld(Main.myPlayer); + Main.player[Main.myPlayer].Spawn(PlayerSpawnContext.SpawningIntoWorld); + break; + case 50: + int number26 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + number26 = this.whoAmI; + else if (number26 == Main.myPlayer && !Main.ServerSideCharacter) + break; + Player player12 = Main.player[number26]; + for (int index30 = 0; index30 < 22; ++index30) + { + player12.buffType[index30] = (int) this.reader.ReadUInt16(); + player12.buffTime[index30] = player12.buffType[index30] <= 0 ? 0 : 60; + } + if (Main.netMode != 2) + break; + NetMessage.TrySendData(50, ignoreClient: this.whoAmI, number: number26); + break; + case 51: + byte num65 = this.reader.ReadByte(); + byte num66 = this.reader.ReadByte(); + switch (num66) + { + case 1: + NPC.SpawnSkeletron(); + return; + case 2: + if (Main.netMode == 2) + { + NetMessage.TrySendData(51, ignoreClient: this.whoAmI, number: ((int) num65), number2: ((float) num66)); + return; + } + SoundEngine.PlaySound(SoundID.Item1, (int) Main.player[(int) num65].position.X, (int) Main.player[(int) num65].position.Y); + return; + case 3: + if (Main.netMode != 2) + return; + Main.Sundialing(); + return; + case 4: + Main.npc[(int) num65].BigMimicSpawnSmoke(); + return; + default: + return; + } + case 52: + int num67 = (int) this.reader.ReadByte(); + int num68 = (int) this.reader.ReadInt16(); + int num69 = (int) this.reader.ReadInt16(); + if (num67 == 1) + { + Chest.Unlock(num68, num69); + if (Main.netMode == 2) + { + NetMessage.TrySendData(52, ignoreClient: this.whoAmI, number2: ((float) num67), number3: ((float) num68), number4: ((float) num69)); + NetMessage.SendTileSquare(-1, num68, num69, 2); + } + } + if (num67 != 2) + break; + WorldGen.UnlockDoor(num68, num69); + if (Main.netMode != 2) + break; + NetMessage.TrySendData(52, ignoreClient: this.whoAmI, number2: ((float) num67), number3: ((float) num68), number4: ((float) num69)); + NetMessage.SendTileSquare(-1, num68, num69, 2); + break; + case 53: + int number27 = (int) this.reader.ReadInt16(); + int type7 = (int) this.reader.ReadUInt16(); + int time1 = (int) this.reader.ReadInt16(); + Main.npc[number27].AddBuff(type7, time1, true); + if (Main.netMode != 2) + break; + NetMessage.TrySendData(54, number: number27); + break; + case 54: + if (Main.netMode != 1) + break; + int index31 = (int) this.reader.ReadInt16(); + NPC npc2 = Main.npc[index31]; + for (int index32 = 0; index32 < 5; ++index32) + { + npc2.buffType[index32] = (int) this.reader.ReadUInt16(); + npc2.buffTime[index32] = (int) this.reader.ReadInt16(); + } + break; + case 55: + int index33 = (int) this.reader.ReadByte(); + int type8 = (int) this.reader.ReadUInt16(); + int timeToAdd = this.reader.ReadInt32(); + if (Main.netMode == 2 && index33 != this.whoAmI && !Main.pvpBuff[type8]) + break; + if (Main.netMode == 1 && index33 == Main.myPlayer) + { + Main.player[index33].AddBuff(type8, timeToAdd); + break; + } + if (Main.netMode != 2) + break; + NetMessage.TrySendData(55, index33, number: index33, number2: ((float) type8), number3: ((float) timeToAdd)); + break; + case 56: + int number28 = (int) this.reader.ReadInt16(); + if (number28 < 0 || number28 >= 200) + break; + if (Main.netMode == 1) + { + string str3 = this.reader.ReadString(); + Main.npc[number28].GivenName = str3; + int num70 = this.reader.ReadInt32(); + Main.npc[number28].townNpcVariationIndex = num70; + break; + } + if (Main.netMode != 2) + break; + NetMessage.TrySendData(56, this.whoAmI, number: number28); + break; + case 57: + if (Main.netMode != 1) + break; + WorldGen.tGood = this.reader.ReadByte(); + WorldGen.tEvil = this.reader.ReadByte(); + WorldGen.tBlood = this.reader.ReadByte(); + break; + case 58: + int index34 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + index34 = this.whoAmI; + float num71 = this.reader.ReadSingle(); + if (Main.netMode == 2) + { + NetMessage.TrySendData(58, ignoreClient: this.whoAmI, number: this.whoAmI, number2: num71); + break; + } + Player player13 = Main.player[index34]; + int type9 = player13.inventory[player13.selectedItem].type; + switch (type9) + { + case 4057: + case 4372: + case 4715: + player13.PlayGuitarChord(num71); + return; + case 4673: + player13.PlayDrums(num71); + return; + default: + Main.musicPitch = num71; + LegacySoundStyle type10 = SoundID.Item26; + if (type9 == 507) + type10 = SoundID.Item35; + if (type9 == 1305) + type10 = SoundID.Item47; + SoundEngine.PlaySound(type10, player13.position); + return; + } + case 59: + int num72 = (int) this.reader.ReadInt16(); + int j2 = (int) this.reader.ReadInt16(); + Wiring.SetCurrentUser(this.whoAmI); + Wiring.HitSwitch(num72, j2); + Wiring.SetCurrentUser(); + if (Main.netMode != 2) + break; + NetMessage.TrySendData(59, ignoreClient: this.whoAmI, number: num72, number2: ((float) j2)); + break; + case 60: + int n = (int) this.reader.ReadInt16(); + int x1 = (int) this.reader.ReadInt16(); + int y4 = (int) this.reader.ReadInt16(); + byte num73 = this.reader.ReadByte(); + if (n >= 200) + { + NetMessage.BootPlayer(this.whoAmI, NetworkText.FromKey("Net.CheatingInvalid")); + break; + } + if (Main.netMode == 1) + { + Main.npc[n].homeless = num73 == (byte) 1; + Main.npc[n].homeTileX = x1; + Main.npc[n].homeTileY = y4; + if (num73 == (byte) 1) + { + WorldGen.TownManager.KickOut(Main.npc[n].type); + break; + } + if (num73 != (byte) 2) + break; + WorldGen.TownManager.SetRoom(Main.npc[n].type, x1, y4); + break; + } + if (num73 == (byte) 1) + { + WorldGen.kickOut(n); + break; + } + WorldGen.moveRoom(x1, y4, n); + break; + case 61: + int plr = (int) this.reader.ReadInt16(); + int Type3 = (int) this.reader.ReadInt16(); + if (Main.netMode != 2) + break; + if (Type3 >= 0 && Type3 < 663 && NPCID.Sets.MPAllowedEnemies[Type3]) + { + if (NPC.AnyNPCs(Type3)) + break; + NPC.SpawnOnPlayer(plr, Type3); + break; + } + switch (Type3) + { + case -14: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Misc.LicenseBunnyUsed"), new Color(50, (int) byte.MaxValue, 130)); + NPC.boughtBunny = true; + NetMessage.TrySendData(7); + return; + case -13: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Misc.LicenseDogUsed"), new Color(50, (int) byte.MaxValue, 130)); + NPC.boughtDog = true; + NetMessage.TrySendData(7); + return; + case -12: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Misc.LicenseCatUsed"), new Color(50, (int) byte.MaxValue, 130)); + NPC.boughtCat = true; + NetMessage.TrySendData(7); + return; + case -11: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Misc.CombatBookUsed"), new Color(50, (int) byte.MaxValue, 130)); + NPC.combatBookWasUsed = true; + NetMessage.TrySendData(7); + return; + case -10: + if (Main.dayTime || Main.bloodMoon) + return; + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[8].Key), new Color(50, (int) byte.MaxValue, 130)); + Main.bloodMoon = true; + if (Main.GetMoonPhase() == MoonPhase.Empty) + Main.moonPhase = 5; + AchievementsHelper.NotifyProgressionEvent(4); + NetMessage.TrySendData(7); + return; + case -8: + if (!NPC.downedGolemBoss || !Main.hardMode || NPC.AnyDanger() || NPC.AnyoneNearCultists()) + return; + WorldGen.StartImpendingDoom(); + NetMessage.TrySendData(7); + return; + case -7: + Main.invasionDelay = 0; + Main.StartInvasion(4); + NetMessage.TrySendData(7); + NetMessage.TrySendData(78, number2: 1f, number3: ((float) (Main.invasionType + 3))); + return; + case -6: + if (!Main.dayTime || Main.eclipse) + return; + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[20].Key), new Color(50, (int) byte.MaxValue, 130)); + Main.eclipse = true; + NetMessage.TrySendData(7); + return; + case -5: + if (Main.dayTime || DD2Event.Ongoing) + return; + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[34].Key), new Color(50, (int) byte.MaxValue, 130)); + Main.startSnowMoon(); + NetMessage.TrySendData(7); + NetMessage.TrySendData(78, number2: 1f, number3: 1f, number4: 1f); + return; + case -4: + if (Main.dayTime || DD2Event.Ongoing) + return; + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[31].Key), new Color(50, (int) byte.MaxValue, 130)); + Main.startPumpkinMoon(); + NetMessage.TrySendData(7); + NetMessage.TrySendData(78, number2: 1f, number3: 2f, number4: 1f); + return; + default: + if (Type3 >= 0) + return; + int type11 = 1; + if (Type3 > -5) + type11 = -Type3; + if (type11 > 0 && Main.invasionType == 0) + { + Main.invasionDelay = 0; + Main.StartInvasion(type11); + } + NetMessage.TrySendData(78, number2: 1f, number3: ((float) (Main.invasionType + 3))); + return; + } + case 62: + int number29 = (int) this.reader.ReadByte(); + int num74 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + number29 = this.whoAmI; + if (num74 == 1) + Main.player[number29].NinjaDodge(); + if (num74 == 2) + Main.player[number29].ShadowDodge(); + if (num74 == 4) + Main.player[number29].BrainOfConfusionDodge(); + if (Main.netMode != 2) + break; + NetMessage.TrySendData(62, ignoreClient: this.whoAmI, number: number29, number2: ((float) num74)); + break; + case 63: + int num75 = (int) this.reader.ReadInt16(); + int y5 = (int) this.reader.ReadInt16(); + byte color3 = this.reader.ReadByte(); + WorldGen.paintTile(num75, y5, color3); + if (Main.netMode != 2) + break; + NetMessage.TrySendData(63, ignoreClient: this.whoAmI, number: num75, number2: ((float) y5), number3: ((float) color3)); + break; + case 64: + int num76 = (int) this.reader.ReadInt16(); + int y6 = (int) this.reader.ReadInt16(); + byte color4 = this.reader.ReadByte(); + WorldGen.paintWall(num76, y6, color4); + if (Main.netMode != 2) + break; + NetMessage.TrySendData(64, ignoreClient: this.whoAmI, number: num76, number2: ((float) y6), number3: ((float) color4)); + break; + case 65: + BitsByte bitsByte24 = (BitsByte) this.reader.ReadByte(); + int index35 = (int) this.reader.ReadInt16(); + if (Main.netMode == 2) + index35 = this.whoAmI; + Vector2 vector2_7 = this.reader.ReadVector2(); + int num77 = (int) this.reader.ReadByte(); + int number30 = 0; + if (bitsByte24[0]) + ++number30; + if (bitsByte24[1]) + number30 += 2; + bool flag10 = false; + if (bitsByte24[2]) + flag10 = true; + int num78 = 0; + if (bitsByte24[3]) + num78 = this.reader.ReadInt32(); + if (flag10) + vector2_7 = Main.player[index35].position; + switch (number30) + { + case 0: + Main.player[index35].Teleport(vector2_7, num77, num78); + break; + case 1: + Main.npc[index35].Teleport(vector2_7, num77, num78); + break; + case 2: + Main.player[index35].Teleport(vector2_7, num77, num78); + if (Main.netMode == 2) + { + RemoteClient.CheckSection(this.whoAmI, vector2_7); + NetMessage.TrySendData(65, number2: ((float) index35), number3: vector2_7.X, number4: vector2_7.Y, number5: num77, number6: flag10.ToInt(), number7: num78); + int index36 = -1; + float num79 = 9999f; + for (int index37 = 0; index37 < (int) byte.MaxValue; ++index37) + { + if (Main.player[index37].active && index37 != this.whoAmI) + { + Vector2 vector2_8 = Main.player[index37].position - Main.player[this.whoAmI].position; + if ((double) vector2_8.Length() < (double) num79) + { + num79 = vector2_8.Length(); + index36 = index37; + } + } + } + if (index36 >= 0) + { + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Game.HasTeleportedTo", (object) Main.player[this.whoAmI].name, (object) Main.player[index36].name), new Color(250, 250, 0)); + break; + } + break; + } + break; + } + if (Main.netMode != 2 || number30 != 0) + break; + NetMessage.TrySendData(65, ignoreClient: this.whoAmI, number: number30, number2: ((float) index35), number3: vector2_7.X, number4: vector2_7.Y, number5: num77, number6: flag10.ToInt(), number7: num78); + break; + case 66: + int number31 = (int) this.reader.ReadByte(); + int healAmount2 = (int) this.reader.ReadInt16(); + if (healAmount2 <= 0) + break; + Player player14 = Main.player[number31]; + player14.statLife += healAmount2; + if (player14.statLife > player14.statLifeMax2) + player14.statLife = player14.statLifeMax2; + player14.HealEffect(healAmount2, false); + if (Main.netMode != 2) + break; + NetMessage.TrySendData(66, ignoreClient: this.whoAmI, number: number31, number2: ((float) healAmount2)); + break; + case 67: + break; + case 68: + this.reader.ReadString(); + break; + case 69: + int number32 = (int) this.reader.ReadInt16(); + int X1 = (int) this.reader.ReadInt16(); + int Y1 = (int) this.reader.ReadInt16(); + if (Main.netMode == 1) + { + if (number32 < 0 || number32 >= 8000) + break; + Chest chest7 = Main.chest[number32]; + if (chest7 == null) + { + chest7 = new Chest(); + chest7.x = X1; + chest7.y = Y1; + Main.chest[number32] = chest7; + } + else if (chest7.x != X1 || chest7.y != Y1) + break; + chest7.name = this.reader.ReadString(); + break; + } + if (number32 < -1 || number32 >= 8000) + break; + if (number32 == -1) + { + number32 = Chest.FindChest(X1, Y1); + if (number32 == -1) + break; + } + Chest chest8 = Main.chest[number32]; + if (chest8.x != X1 || chest8.y != Y1) + break; + NetMessage.TrySendData(69, this.whoAmI, number: number32, number2: ((float) X1), number3: ((float) Y1)); + break; + case 70: + if (Main.netMode != 2) + break; + int i2 = (int) this.reader.ReadInt16(); + int who = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + who = this.whoAmI; + if (i2 >= 200 || i2 < 0) + break; + NPC.CatchNPC(i2, who); + break; + case 71: + if (Main.netMode != 2) + break; + int x2 = this.reader.ReadInt32(); + int num80 = this.reader.ReadInt32(); + int num81 = (int) this.reader.ReadInt16(); + byte num82 = this.reader.ReadByte(); + int y7 = num80; + int Type4 = num81; + int Style1 = (int) num82; + int whoAmI1 = this.whoAmI; + NPC.ReleaseNPC(x2, y7, Type4, Style1, whoAmI1); + break; + case 72: + if (Main.netMode != 1) + break; + for (int index38 = 0; index38 < 40; ++index38) + Main.travelShop[index38] = (int) this.reader.ReadInt16(); + break; + case 73: + switch (this.reader.ReadByte()) + { + case 0: + Main.player[this.whoAmI].TeleportationPotion(); + return; + case 1: + Main.player[this.whoAmI].MagicConch(); + return; + case 2: + Main.player[this.whoAmI].DemonConch(); + return; + default: + return; + } + case 74: + if (Main.netMode != 1) + break; + Main.anglerQuest = (int) this.reader.ReadByte(); + Main.anglerQuestFinished = this.reader.ReadBoolean(); + break; + case 75: + if (Main.netMode != 2) + break; + string name = Main.player[this.whoAmI].name; + if (Main.anglerWhoFinishedToday.Contains(name)) + break; + Main.anglerWhoFinishedToday.Add(name); + break; + case 76: + int number33 = (int) this.reader.ReadByte(); + if (number33 == Main.myPlayer && !Main.ServerSideCharacter) + break; + if (Main.netMode == 2) + number33 = this.whoAmI; + Player player15 = Main.player[number33]; + player15.anglerQuestsFinished = this.reader.ReadInt32(); + player15.golferScoreAccumulated = this.reader.ReadInt32(); + if (Main.netMode != 2) + break; + NetMessage.TrySendData(76, ignoreClient: this.whoAmI, number: number33); + break; + case 77: + int type12 = (int) this.reader.ReadInt16(); + ushort num83 = this.reader.ReadUInt16(); + short num84 = this.reader.ReadInt16(); + short num85 = this.reader.ReadInt16(); + int num86 = (int) num83; + int x3 = (int) num84; + int y8 = (int) num85; + Animation.NewTemporaryAnimation(type12, (ushort) num86, x3, y8); + break; + case 78: + if (Main.netMode != 1) + break; + Main.ReportInvasionProgress(this.reader.ReadInt32(), this.reader.ReadInt32(), (int) this.reader.ReadSByte(), (int) this.reader.ReadSByte()); + break; + case 79: + int x4 = (int) this.reader.ReadInt16(); + int y9 = (int) this.reader.ReadInt16(); + short num87 = this.reader.ReadInt16(); + int style2 = (int) this.reader.ReadInt16(); + int num88 = (int) this.reader.ReadByte(); + int random = (int) this.reader.ReadSByte(); + int direction2 = !this.reader.ReadBoolean() ? -1 : 1; + if (Main.netMode == 2) + { + ++Netplay.Clients[this.whoAmI].SpamAddBlock; + if (!WorldGen.InWorld(x4, y9, 10) || !Netplay.Clients[this.whoAmI].TileSections[Netplay.GetSectionX(x4), Netplay.GetSectionY(y9)]) + break; + } + WorldGen.PlaceObject(x4, y9, (int) num87, style: style2, alternate: num88, random: random, direction: direction2); + if (Main.netMode != 2) + break; + NetMessage.SendObjectPlacment(this.whoAmI, x4, y9, (int) num87, style2, num88, random, direction2); + break; + case 80: + if (Main.netMode != 1) + break; + int index39 = (int) this.reader.ReadByte(); + int num89 = (int) this.reader.ReadInt16(); + if (num89 < -3 || num89 >= 8000) + break; + Main.player[index39].chest = num89; + Recipe.FindRecipes(true); + break; + case 81: + if (Main.netMode != 1) + break; + int x5 = (int) this.reader.ReadSingle(); + int num90 = (int) this.reader.ReadSingle(); + Color color5 = this.reader.ReadRGB(); + int amount = this.reader.ReadInt32(); + int y10 = num90; + CombatText.NewText(new Rectangle(x5, y10, 0, 0), color5, amount); + break; + case 82: + NetManager.Instance.Read(this.reader, this.whoAmI, length); + break; + case 83: + if (Main.netMode != 1) + break; + int index40 = (int) this.reader.ReadInt16(); + int num91 = this.reader.ReadInt32(); + if (index40 < 0 || index40 >= 289) + break; + NPC.killCount[index40] = num91; + break; + case 84: + int number34 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + number34 = this.whoAmI; + float num92 = this.reader.ReadSingle(); + Main.player[number34].stealth = num92; + if (Main.netMode != 2) + break; + NetMessage.TrySendData(84, ignoreClient: this.whoAmI, number: number34); + break; + case 85: + int whoAmI2 = this.whoAmI; + byte num93 = this.reader.ReadByte(); + if (Main.netMode != 2 || whoAmI2 >= (int) byte.MaxValue || num93 >= (byte) 58) + break; + Chest.ServerPlaceItem(this.whoAmI, (int) num93); + break; + case 86: + if (Main.netMode != 1) + break; + int key1 = this.reader.ReadInt32(); + if (!this.reader.ReadBoolean()) + { + TileEntity tileEntity; + if (!TileEntity.ByID.TryGetValue(key1, out tileEntity)) + break; + TileEntity.ByID.Remove(key1); + TileEntity.ByPosition.Remove(tileEntity.Position); + break; + } + TileEntity tileEntity1 = TileEntity.Read(this.reader, true); + tileEntity1.ID = key1; + TileEntity.ByID[tileEntity1.ID] = tileEntity1; + TileEntity.ByPosition[tileEntity1.Position] = tileEntity1; + break; + case 87: + if (Main.netMode != 2) + break; + int num94 = (int) this.reader.ReadInt16(); + int num95 = (int) this.reader.ReadInt16(); + int type13 = (int) this.reader.ReadByte(); + if (!WorldGen.InWorld(num94, num95) || TileEntity.ByPosition.ContainsKey(new Point16(num94, num95))) + break; + TileEntity.PlaceEntityNet(num94, num95, type13); + break; + case 88: + if (Main.netMode != 1) + break; + int index41 = (int) this.reader.ReadInt16(); + if (index41 < 0 || index41 > 400) + break; + Item obj2 = Main.item[index41]; + BitsByte bitsByte25 = (BitsByte) this.reader.ReadByte(); + if (bitsByte25[0]) + obj2.color.PackedValue = this.reader.ReadUInt32(); + if (bitsByte25[1]) + obj2.damage = (int) this.reader.ReadUInt16(); + if (bitsByte25[2]) + obj2.knockBack = this.reader.ReadSingle(); + if (bitsByte25[3]) + obj2.useAnimation = (int) this.reader.ReadUInt16(); + if (bitsByte25[4]) + obj2.useTime = (int) this.reader.ReadUInt16(); + if (bitsByte25[5]) + obj2.shoot = (int) this.reader.ReadInt16(); + if (bitsByte25[6]) + obj2.shootSpeed = this.reader.ReadSingle(); + if (!bitsByte25[7]) + break; + bitsByte25 = (BitsByte) this.reader.ReadByte(); + if (bitsByte25[0]) + obj2.width = (int) this.reader.ReadInt16(); + if (bitsByte25[1]) + obj2.height = (int) this.reader.ReadInt16(); + if (bitsByte25[2]) + obj2.scale = this.reader.ReadSingle(); + if (bitsByte25[3]) + obj2.ammo = (int) this.reader.ReadInt16(); + if (bitsByte25[4]) + obj2.useAmmo = (int) this.reader.ReadInt16(); + if (!bitsByte25[5]) + break; + obj2.notAmmo = this.reader.ReadBoolean(); + break; + case 89: + if (Main.netMode != 2) + break; + int x6 = (int) this.reader.ReadInt16(); + int num96 = (int) this.reader.ReadInt16(); + int num97 = (int) this.reader.ReadInt16(); + int num98 = (int) this.reader.ReadByte(); + int num99 = (int) this.reader.ReadInt16(); + int y11 = num96; + int netid1 = num97; + int prefix1 = num98; + int stack1 = num99; + TEItemFrame.TryPlacing(x6, y11, netid1, prefix1, stack1); + break; + case 91: + if (Main.netMode != 1) + break; + int num100 = this.reader.ReadInt32(); + int type14 = (int) this.reader.ReadByte(); + if (type14 == (int) byte.MaxValue) + { + if (!EmoteBubble.byID.ContainsKey(num100)) + break; + EmoteBubble.byID.Remove(num100); + break; + } + int meta = (int) this.reader.ReadUInt16(); + int time2 = (int) this.reader.ReadUInt16(); + int emotion = (int) this.reader.ReadByte(); + int num101 = 0; + if (emotion < 0) + num101 = (int) this.reader.ReadInt16(); + WorldUIAnchor bubbleAnchor = EmoteBubble.DeserializeNetAnchor(type14, meta); + if (type14 == 1) + Main.player[meta].emoteTime = 360; + lock (EmoteBubble.byID) + { + if (!EmoteBubble.byID.ContainsKey(num100)) + { + EmoteBubble.byID[num100] = new EmoteBubble(emotion, bubbleAnchor, time2); + } + else + { + EmoteBubble.byID[num100].lifeTime = time2; + EmoteBubble.byID[num100].lifeTimeStart = time2; + EmoteBubble.byID[num100].emote = emotion; + EmoteBubble.byID[num100].anchor = bubbleAnchor; + } + EmoteBubble.byID[num100].ID = num100; + EmoteBubble.byID[num100].metadata = num101; + EmoteBubble.OnBubbleChange(num100); + break; + } + case 92: + int number35 = (int) this.reader.ReadInt16(); + int num102 = this.reader.ReadInt32(); + float num103 = this.reader.ReadSingle(); + float num104 = this.reader.ReadSingle(); + if (number35 < 0 || number35 > 200) + break; + if (Main.netMode == 1) + { + Main.npc[number35].moneyPing(new Vector2(num103, num104)); + Main.npc[number35].extraValue = num102; + break; + } + Main.npc[number35].extraValue += num102; + NetMessage.TrySendData(92, number: number35, number2: ((float) Main.npc[number35].extraValue), number3: num103, number4: num104); + break; + case 93: + break; + case 95: + ushort num105 = this.reader.ReadUInt16(); + int num106 = (int) this.reader.ReadByte(); + if (Main.netMode != 2) + break; + for (int index42 = 0; index42 < 1000; ++index42) + { + if (Main.projectile[index42].owner == (int) num105 && Main.projectile[index42].active && Main.projectile[index42].type == 602 && (double) Main.projectile[index42].ai[1] == (double) num106) + { + Main.projectile[index42].Kill(); + NetMessage.TrySendData(29, number: Main.projectile[index42].identity, number2: ((float) num105)); + break; + } + } + break; + case 96: + int number36 = (int) this.reader.ReadByte(); + Player player16 = Main.player[number36]; + int extraInfo1 = (int) this.reader.ReadInt16(); + Vector2 newPos1 = this.reader.ReadVector2(); + Vector2 vector2_9 = this.reader.ReadVector2(); + player16.lastPortalColorIndex = extraInfo1 + (extraInfo1 % 2 == 0 ? 1 : -1); + player16.Teleport(newPos1, 4, extraInfo1); + player16.velocity = vector2_9; + if (Main.netMode != 2) + break; + NetMessage.SendData(96, number: number36, number2: newPos1.X, number3: newPos1.Y, number4: ((float) extraInfo1)); + break; + case 97: + if (Main.netMode != 1) + break; + AchievementsHelper.NotifyNPCKilledDirect(Main.player[Main.myPlayer], (int) this.reader.ReadInt16()); + break; + case 98: + if (Main.netMode != 1) + break; + AchievementsHelper.NotifyProgressionEvent((int) this.reader.ReadInt16()); + break; + case 99: + int number37 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + number37 = this.whoAmI; + Main.player[number37].MinionRestTargetPoint = this.reader.ReadVector2(); + if (Main.netMode != 2) + break; + NetMessage.TrySendData(99, ignoreClient: this.whoAmI, number: number37); + break; + case 100: + int index43 = (int) this.reader.ReadUInt16(); + NPC npc3 = Main.npc[index43]; + int extraInfo2 = (int) this.reader.ReadInt16(); + Vector2 newPos2 = this.reader.ReadVector2(); + Vector2 vector2_10 = this.reader.ReadVector2(); + npc3.lastPortalColorIndex = extraInfo2 + (extraInfo2 % 2 == 0 ? 1 : -1); + npc3.Teleport(newPos2, 4, extraInfo2); + npc3.velocity = vector2_10; + npc3.netOffset *= 0.0f; + break; + case 101: + if (Main.netMode == 2) + break; + NPC.ShieldStrengthTowerSolar = (int) this.reader.ReadUInt16(); + NPC.ShieldStrengthTowerVortex = (int) this.reader.ReadUInt16(); + NPC.ShieldStrengthTowerNebula = (int) this.reader.ReadUInt16(); + NPC.ShieldStrengthTowerStardust = (int) this.reader.ReadUInt16(); + if (NPC.ShieldStrengthTowerSolar < 0) + NPC.ShieldStrengthTowerSolar = 0; + if (NPC.ShieldStrengthTowerVortex < 0) + NPC.ShieldStrengthTowerVortex = 0; + if (NPC.ShieldStrengthTowerNebula < 0) + NPC.ShieldStrengthTowerNebula = 0; + if (NPC.ShieldStrengthTowerStardust < 0) + NPC.ShieldStrengthTowerStardust = 0; + if (NPC.ShieldStrengthTowerSolar > NPC.LunarShieldPowerExpert) + NPC.ShieldStrengthTowerSolar = NPC.LunarShieldPowerExpert; + if (NPC.ShieldStrengthTowerVortex > NPC.LunarShieldPowerExpert) + NPC.ShieldStrengthTowerVortex = NPC.LunarShieldPowerExpert; + if (NPC.ShieldStrengthTowerNebula > NPC.LunarShieldPowerExpert) + NPC.ShieldStrengthTowerNebula = NPC.LunarShieldPowerExpert; + if (NPC.ShieldStrengthTowerStardust <= NPC.LunarShieldPowerExpert) + break; + NPC.ShieldStrengthTowerStardust = NPC.LunarShieldPowerExpert; + break; + case 102: + int index44 = (int) this.reader.ReadByte(); + ushort num107 = this.reader.ReadUInt16(); + Vector2 Other = this.reader.ReadVector2(); + if (Main.netMode == 2) + { + NetMessage.TrySendData(102, number: this.whoAmI, number2: ((float) num107), number3: Other.X, number4: Other.Y); + break; + } + Player player17 = Main.player[index44]; + for (int index45 = 0; index45 < (int) byte.MaxValue; ++index45) + { + Player player18 = Main.player[index45]; + if (player18.active && !player18.dead && (player17.team == 0 || player17.team == player18.team) && (double) player18.Distance(Other) < 700.0) + { + Vector2 vector2_11 = player17.Center - player18.Center; + Vector2 vec = Vector2.Normalize(vector2_11); + if (!vec.HasNaNs()) + { + int num108 = 90; + float num109 = 0.0f; + float num110 = 0.2094395f; + Vector2 spinningpoint = new Vector2(0.0f, -8f); + Vector2 vector2_12 = new Vector2(-3f); + float num111 = 0.0f; + float num112 = 0.005f; + switch (num107) + { + case 173: + num108 = 90; + break; + case 176: + num108 = 88; + break; + case 179: + num108 = 86; + break; + } + for (int index46 = 0; (double) index46 < (double) vector2_11.Length() / 6.0; ++index46) + { + Vector2 Position = player18.Center + 6f * (float) index46 * vec + spinningpoint.RotatedBy((double) num109) + vector2_12; + num109 += num110; + int Type5 = num108; + Color newColor = new Color(); + int index47 = Dust.NewDust(Position, 6, 6, Type5, Alpha: 100, newColor: newColor, Scale: 1.5f); + Main.dust[index47].noGravity = true; + Main.dust[index47].velocity = Vector2.Zero; + Main.dust[index47].fadeIn = (num111 += num112); + Main.dust[index47].velocity += vec * 1.5f; + } + } + player18.NebulaLevelup((int) num107); + } + } + break; + case 103: + if (Main.netMode != 1) + break; + NPC.MoonLordCountdown = this.reader.ReadInt32(); + break; + case 104: + if (Main.netMode != 1 || Main.npcShop <= 0) + break; + Item[] objArray = Main.instance.shop[Main.npcShop].item; + int index48 = (int) this.reader.ReadByte(); + int type15 = (int) this.reader.ReadInt16(); + int num113 = (int) this.reader.ReadInt16(); + int pre3 = (int) this.reader.ReadByte(); + int num114 = this.reader.ReadInt32(); + BitsByte bitsByte26 = (BitsByte) this.reader.ReadByte(); + if (index48 >= objArray.Length) + break; + objArray[index48] = new Item(); + objArray[index48].netDefaults(type15); + objArray[index48].stack = num113; + objArray[index48].Prefix(pre3); + objArray[index48].value = num114; + objArray[index48].buyOnce = bitsByte26[0]; + break; + case 105: + if (Main.netMode == 1) + break; + int i3 = (int) this.reader.ReadInt16(); + int num115 = (int) this.reader.ReadInt16(); + bool flag11 = this.reader.ReadBoolean(); + int j3 = num115; + int num116 = flag11 ? 1 : 0; + WorldGen.ToggleGemLock(i3, j3, num116 != 0); + break; + case 106: + if (Main.netMode != 1) + break; + Utils.PoofOfSmoke(new HalfVector2() + { + PackedValue = this.reader.ReadUInt32() + }.ToVector2()); + break; + case 107: + if (Main.netMode != 1) + break; + Color color6 = this.reader.ReadRGB(); + string text2 = NetworkText.Deserialize(this.reader).ToString(); + int num117 = (int) this.reader.ReadInt16(); + Color c = color6; + int WidthLimit = num117; + Main.NewTextMultiline(text2, c: c, WidthLimit: WidthLimit); + break; + case 108: + if (Main.netMode != 1) + break; + int Damage2 = (int) this.reader.ReadInt16(); + float KnockBack = this.reader.ReadSingle(); + int x7 = (int) this.reader.ReadInt16(); + int y12 = (int) this.reader.ReadInt16(); + int angle = (int) this.reader.ReadInt16(); + int ammo = (int) this.reader.ReadInt16(); + int owner = (int) this.reader.ReadByte(); + if (owner != Main.myPlayer) + break; + WorldGen.ShootFromCannon(x7, y12, angle, ammo, Damage2, KnockBack, owner); + break; + case 109: + if (Main.netMode != 2) + break; + int x8 = (int) this.reader.ReadInt16(); + int num118 = (int) this.reader.ReadInt16(); + int x9 = (int) this.reader.ReadInt16(); + int y13 = (int) this.reader.ReadInt16(); + int num119 = (int) this.reader.ReadByte(); + int whoAmI3 = this.whoAmI; + WiresUI.Settings.MultiToolMode toolMode = WiresUI.Settings.ToolMode; + WiresUI.Settings.ToolMode = (WiresUI.Settings.MultiToolMode) num119; + int y14 = num118; + Wiring.MassWireOperation(new Point(x8, y14), new Point(x9, y13), Main.player[whoAmI3]); + WiresUI.Settings.ToolMode = toolMode; + break; + case 110: + if (Main.netMode != 1) + break; + int type16 = (int) this.reader.ReadInt16(); + int num120 = (int) this.reader.ReadInt16(); + int index49 = (int) this.reader.ReadByte(); + if (index49 != Main.myPlayer) + break; + Player player19 = Main.player[index49]; + for (int index50 = 0; index50 < num120; ++index50) + player19.ConsumeItem(type16); + player19.wireOperationsCooldown = 0; + break; + case 111: + if (Main.netMode != 2) + break; + BirthdayParty.ToggleManualParty(); + break; + case 112: + int number38 = (int) this.reader.ReadByte(); + int x10 = this.reader.ReadInt32(); + int y15 = this.reader.ReadInt32(); + int num121 = (int) this.reader.ReadByte(); + int num122 = (int) this.reader.ReadInt16(); + switch (number38) + { + case 1: + if (Main.netMode == 1) + WorldGen.TreeGrowFX(x10, y15, num121, num122); + if (Main.netMode != 2) + return; + NetMessage.TrySendData((int) num1, number: number38, number2: ((float) x10), number3: ((float) y15), number4: ((float) num121), number5: num122); + return; + case 2: + NPC.FairyEffects(new Vector2((float) x10, (float) y15), num121); + return; + default: + return; + } + case 113: + int x11 = (int) this.reader.ReadInt16(); + int y16 = (int) this.reader.ReadInt16(); + if (Main.netMode != 2 || Main.snowMoon || Main.pumpkinMoon) + break; + if (DD2Event.WouldFailSpawningHere(x11, y16)) + DD2Event.FailureMessage(this.whoAmI); + DD2Event.SummonCrystal(x11, y16); + break; + case 114: + if (Main.netMode != 1) + break; + DD2Event.WipeEntities(); + break; + case 115: + int number39 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + number39 = this.whoAmI; + Main.player[number39].MinionAttackTargetNPC = (int) this.reader.ReadInt16(); + if (Main.netMode != 2) + break; + NetMessage.TrySendData(115, ignoreClient: this.whoAmI, number: number39); + break; + case 116: + if (Main.netMode != 1) + break; + DD2Event.TimeLeftBetweenWaves = this.reader.ReadInt32(); + break; + case 117: + int playerTargetIndex1 = (int) this.reader.ReadByte(); + if (Main.netMode == 2 && this.whoAmI != playerTargetIndex1 && (!Main.player[playerTargetIndex1].hostile || !Main.player[this.whoAmI].hostile)) + break; + PlayerDeathReason playerDeathReason1 = PlayerDeathReason.FromReader(this.reader); + int num123 = (int) this.reader.ReadInt16(); + int num124 = (int) this.reader.ReadByte() - 1; + BitsByte bitsByte27 = (BitsByte) this.reader.ReadByte(); + bool flag12 = bitsByte27[0]; + bool pvp1 = bitsByte27[1]; + int num125 = (int) this.reader.ReadSByte(); + Main.player[playerTargetIndex1].Hurt(playerDeathReason1, num123, num124, pvp1, true, flag12, num125); + if (Main.netMode != 2) + break; + NetMessage.SendPlayerHurt(playerTargetIndex1, playerDeathReason1, num123, num124, flag12, pvp1, num125, ignoreClient: this.whoAmI); + break; + case 118: + int playerTargetIndex2 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + playerTargetIndex2 = this.whoAmI; + PlayerDeathReason playerDeathReason2 = PlayerDeathReason.FromReader(this.reader); + int damage = (int) this.reader.ReadInt16(); + int num126 = (int) this.reader.ReadByte() - 1; + bool pvp2 = ((BitsByte) this.reader.ReadByte())[0]; + Main.player[playerTargetIndex2].KillMe(playerDeathReason2, (double) damage, num126, pvp2); + if (Main.netMode != 2) + break; + NetMessage.SendPlayerDeath(playerTargetIndex2, playerDeathReason2, damage, num126, pvp2, ignoreClient: this.whoAmI); + break; + case 119: + if (Main.netMode != 1) + break; + int x12 = (int) this.reader.ReadSingle(); + int num127 = (int) this.reader.ReadSingle(); + Color color7 = this.reader.ReadRGB(); + NetworkText networkText = NetworkText.Deserialize(this.reader); + int y17 = num127; + CombatText.NewText(new Rectangle(x12, y17, 0, 0), color7, networkText.ToString()); + break; + case 120: + int index51 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + index51 = this.whoAmI; + int num128 = (int) this.reader.ReadByte(); + if (num128 < 0 || num128 >= 145 || Main.netMode != 2) + break; + EmoteBubble.NewBubble(num128, new WorldUIAnchor((Entity) Main.player[index51]), 360); + EmoteBubble.CheckForNPCsToReactToEmoteBubble(num128, Main.player[index51]); + break; + case 121: + int num129 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + num129 = this.whoAmI; + int key2 = this.reader.ReadInt32(); + int itemIndex1 = (int) this.reader.ReadByte(); + bool dye1 = false; + if (itemIndex1 >= 8) + { + dye1 = true; + itemIndex1 -= 8; + } + TileEntity tileEntity2; + if (!TileEntity.ByID.TryGetValue(key2, out tileEntity2)) + { + this.reader.ReadInt32(); + int num130 = (int) this.reader.ReadByte(); + break; + } + if (itemIndex1 >= 8) + tileEntity2 = (TileEntity) null; + if (tileEntity2 is TEDisplayDoll teDisplayDoll4) + { + teDisplayDoll4.ReadItem(itemIndex1, this.reader, dye1); + } + else + { + this.reader.ReadInt32(); + int num131 = (int) this.reader.ReadByte(); + } + if (Main.netMode != 2) + break; + NetMessage.TrySendData((int) num1, ignoreClient: num129, number: num129, number2: ((float) key2), number3: ((float) itemIndex1), number4: ((float) dye1.ToInt())); + break; + case 122: + int num132 = this.reader.ReadInt32(); + int index52 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + index52 = this.whoAmI; + if (Main.netMode == 2) + { + if (num132 == -1) + { + Main.player[index52].tileEntityAnchor.Clear(); + NetMessage.TrySendData((int) num1, number: num132, number2: ((float) index52)); + break; + } + TileEntity tileEntity3; + if (!TileEntity.IsOccupied(num132, out int _) && TileEntity.ByID.TryGetValue(num132, out tileEntity3)) + { + Main.player[index52].tileEntityAnchor.Set(num132, (int) tileEntity3.Position.X, (int) tileEntity3.Position.Y); + NetMessage.TrySendData((int) num1, number: num132, number2: ((float) index52)); + } + } + if (Main.netMode != 1) + break; + if (num132 == -1) + { + Main.player[index52].tileEntityAnchor.Clear(); + break; + } + TileEntity tileEntity4; + if (!TileEntity.ByID.TryGetValue(num132, out tileEntity4)) + break; + TileEntity.SetInteractionAnchor(Main.player[index52], (int) tileEntity4.Position.X, (int) tileEntity4.Position.Y, num132); + break; + case 123: + if (Main.netMode != 2) + break; + int x13 = (int) this.reader.ReadInt16(); + int num133 = (int) this.reader.ReadInt16(); + int num134 = (int) this.reader.ReadInt16(); + int num135 = (int) this.reader.ReadByte(); + int num136 = (int) this.reader.ReadInt16(); + int y18 = num133; + int netid2 = num134; + int prefix2 = num135; + int stack2 = num136; + TEWeaponsRack.TryPlacing(x13, y18, netid2, prefix2, stack2); + break; + case 124: + int num137 = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + num137 = this.whoAmI; + int key3 = this.reader.ReadInt32(); + int itemIndex2 = (int) this.reader.ReadByte(); + bool dye2 = false; + if (itemIndex2 >= 2) + { + dye2 = true; + itemIndex2 -= 2; + } + TileEntity tileEntity5; + if (!TileEntity.ByID.TryGetValue(key3, out tileEntity5)) + { + this.reader.ReadInt32(); + int num138 = (int) this.reader.ReadByte(); + break; + } + if (itemIndex2 >= 2) + tileEntity5 = (TileEntity) null; + if (tileEntity5 is TEHatRack teHatRack4) + { + teHatRack4.ReadItem(itemIndex2, this.reader, dye2); + } + else + { + this.reader.ReadInt32(); + int num139 = (int) this.reader.ReadByte(); + } + if (Main.netMode != 2) + break; + NetMessage.TrySendData((int) num1, ignoreClient: num137, number: num137, number2: ((float) key3), number3: ((float) itemIndex2), number4: ((float) dye2.ToInt())); + break; + case 125: + int num140 = (int) this.reader.ReadByte(); + int x14 = (int) this.reader.ReadInt16(); + int y19 = (int) this.reader.ReadInt16(); + int pickDamage = (int) this.reader.ReadByte(); + if (Main.netMode == 2) + num140 = this.whoAmI; + if (Main.netMode == 1) + Main.player[Main.myPlayer].GetOtherPlayersPickTile(x14, y19, pickDamage); + if (Main.netMode != 2) + break; + NetMessage.TrySendData(125, ignoreClient: num140, number: num140, number2: ((float) x14), number3: ((float) y19), number4: ((float) pickDamage)); + break; + case 126: + if (Main.netMode != 1) + break; + NPC.RevengeManager.AddMarkerFromReader(this.reader); + break; + case 127: + int markerUniqueID = this.reader.ReadInt32(); + if (Main.netMode != 1) + break; + NPC.RevengeManager.DestroyMarker(markerUniqueID); + break; + case 128: + int num141 = (int) this.reader.ReadByte(); + int num142 = (int) this.reader.ReadUInt16(); + int num143 = (int) this.reader.ReadUInt16(); + int numberOfHits = (int) this.reader.ReadUInt16(); + int projid = (int) this.reader.ReadUInt16(); + if (Main.netMode == 2) + { + NetMessage.SendData(128, ignoreClient: num141, number: num141, number2: ((float) numberOfHits), number3: ((float) projid), number5: num142, number6: num143); + break; + } + GolfHelper.ContactListener.PutBallInCup_TextAndEffects(new Point(num142, num143), num141, numberOfHits, projid); + break; + case 129: + if (Main.netMode != 1) + break; + Main.FixUIScale(); + Main.TrySetPreparationState(Main.WorldPreparationState.ProcessingData); + break; + case 130: + if (Main.netMode != 2) + break; + int num144 = (int) this.reader.ReadUInt16(); + int num145 = (int) this.reader.ReadUInt16(); + int Type6 = (int) this.reader.ReadInt16(); + int X2 = num144 * 16; + int num146 = num145 * 16; + NPC npc4 = new NPC(); + npc4.SetDefaults(Type6); + int type17 = npc4.type; + int netId = npc4.netID; + int Y2 = num146; + int Type7 = Type6; + int number40 = NPC.NewNPC(X2, Y2, Type7); + if (netId == type17) + break; + Main.npc[number40].SetDefaults(netId); + NetMessage.TrySendData(23, number: number40); + break; + case 131: + if (Main.netMode != 1) + break; + int index53 = (int) this.reader.ReadUInt16(); + NPC npc5 = index53 >= 200 ? new NPC() : Main.npc[index53]; + if (this.reader.ReadByte() != (byte) 1) + break; + int time3 = this.reader.ReadInt32(); + int fromWho = (int) this.reader.ReadInt16(); + npc5.GetImmuneTime(fromWho, time3); + break; + case 132: + if (Main.netMode != 1) + break; + Point point = this.reader.ReadVector2().ToPoint(); + ushort key4 = this.reader.ReadUInt16(); + LegacySoundStyle legacySoundStyle = SoundID.SoundByIndex[key4]; + BitsByte bitsByte28 = (BitsByte) this.reader.ReadByte(); + int Style2 = !bitsByte28[0] ? legacySoundStyle.Style : this.reader.ReadInt32(); + float volumeScale = !bitsByte28[1] ? legacySoundStyle.Volume : MathHelper.Clamp(this.reader.ReadSingle(), 0.0f, 1f); + float pitchOffset = !bitsByte28[2] ? legacySoundStyle.GetRandomPitch() : MathHelper.Clamp(this.reader.ReadSingle(), -1f, 1f); + SoundEngine.PlaySound(legacySoundStyle.SoundId, point.X, point.Y, Style2, volumeScale, pitchOffset); + break; + case 133: + if (Main.netMode != 2) + break; + int x15 = (int) this.reader.ReadInt16(); + int num147 = (int) this.reader.ReadInt16(); + int num148 = (int) this.reader.ReadInt16(); + int num149 = (int) this.reader.ReadByte(); + int num150 = (int) this.reader.ReadInt16(); + int y20 = num147; + int netid3 = num148; + int prefix3 = num149; + int stack3 = num150; + TEFoodPlatter.TryPlacing(x15, y20, netid3, prefix3, stack3); + break; + case 134: + int index54 = (int) this.reader.ReadByte(); + int num151 = this.reader.ReadInt32(); + float num152 = this.reader.ReadSingle(); + byte num153 = this.reader.ReadByte(); + bool flag13 = this.reader.ReadBoolean(); + if (Main.netMode == 2) + index54 = this.whoAmI; + Player player20 = Main.player[index54]; + player20.ladyBugLuckTimeLeft = num151; + player20.torchLuck = num152; + player20.luckPotion = num153; + player20.HasGardenGnomeNearby = flag13; + player20.RecalculateLuck(); + if (Main.netMode != 2) + break; + NetMessage.SendData(134, ignoreClient: index54, number: index54); + break; + case 135: + int index55 = (int) this.reader.ReadByte(); + if (Main.netMode != 1) + break; + Main.player[index55].immuneAlpha = (int) byte.MaxValue; + break; + case 136: + for (int index56 = 0; index56 < 2; ++index56) + { + for (int index57 = 0; index57 < 3; ++index57) + NPC.cavernMonsterType[index56, index57] = (int) this.reader.ReadUInt16(); + } + break; + case 137: + if (Main.netMode != 2) + break; + int index58 = (int) this.reader.ReadInt16(); + int buffTypeToRemove = (int) this.reader.ReadUInt16(); + if (index58 < 0 || index58 >= 200) + break; + Main.npc[index58].RequestBuffRemoval(buffTypeToRemove); + break; + case 139: + if (Main.netMode == 2) + break; + int index59 = (int) this.reader.ReadByte(); + bool flag14 = this.reader.ReadBoolean(); + Main.countsAsHostForGameplay[index59] = flag14; + break; + default: + if (Netplay.Clients[this.whoAmI].State != 0) + break; + NetMessage.BootPlayer(this.whoAmI, Lang.mp[2].ToNetworkText()); + break; + } + } + } + } +} diff --git a/Microsoft/Xna/Framework.RuntimeProfile b/Microsoft/Xna/Framework.RuntimeProfile new file mode 100644 index 0000000..adf8302 --- /dev/null +++ b/Microsoft/Xna/Framework.RuntimeProfile @@ -0,0 +1 @@ +Windows.v4.0.Reach diff --git a/Minecart.cs b/Minecart.cs new file mode 100644 index 0000000..8d5a367 --- /dev/null +++ b/Minecart.cs @@ -0,0 +1,1480 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Minecart +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using Terraria.GameContent; + +namespace Terraria +{ + public static class Minecart + { + private const int TotalFrames = 36; + public const int LeftDownDecoration = 36; + public const int RightDownDecoration = 37; + public const int BouncyBumperDecoration = 38; + public const int RegularBumperDecoration = 39; + public const int Flag_OnTrack = 0; + public const int Flag_BouncyBumper = 1; + public const int Flag_UsedRamp = 2; + public const int Flag_HitSwitch = 3; + public const int Flag_BoostLeft = 4; + public const int Flag_BoostRight = 5; + private const int NoConnection = -1; + private const int TopConnection = 0; + private const int MiddleConnection = 1; + private const int BottomConnection = 2; + private const int BumperEnd = -1; + private const int BouncyEnd = -2; + private const int RampEnd = -3; + private const int OpenEnd = -4; + public const float BoosterSpeed = 4f; + private const int Type_Normal = 0; + private const int Type_Pressure = 1; + private const int Type_Booster = 2; + private static Vector2 _trackMagnetOffset = new Vector2(25f, 26f); + private const float MinecartTextureWidth = 50f; + private static int[] _leftSideConnection; + private static int[] _rightSideConnection; + private static int[] _trackType; + private static bool[] _boostLeft; + private static Vector2[] _texturePosition; + private static short _firstPressureFrame; + private static short _firstLeftBoostFrame; + private static short _firstRightBoostFrame; + private static int[][] _trackSwitchOptions; + private static int[][] _tileHeight; + + public static void Initialize() + { + if ((double) TextureAssets.MinecartMount.Width() != 50.0) + throw new Exception("Be sure to update Minecart.textureWidth to match the actual texture size of " + (object) 50f + "."); + Minecart._rightSideConnection = new int[36]; + Minecart._leftSideConnection = new int[36]; + Minecart._trackType = new int[36]; + Minecart._boostLeft = new bool[36]; + Minecart._texturePosition = new Vector2[40]; + Minecart._tileHeight = new int[36][]; + for (int index1 = 0; index1 < 36; ++index1) + { + int[] numArray = new int[8]; + for (int index2 = 0; index2 < numArray.Length; ++index2) + numArray[index2] = 5; + Minecart._tileHeight[index1] = numArray; + } + int index3 = 0; + Minecart._leftSideConnection[index3] = -1; + Minecart._rightSideConnection[index3] = -1; + Minecart._tileHeight[index3][0] = -4; + Minecart._tileHeight[index3][7] = -4; + Minecart._texturePosition[index3] = new Vector2(0.0f, 0.0f); + int index4 = index3 + 1; + Minecart._leftSideConnection[index4] = 1; + Minecart._rightSideConnection[index4] = 1; + Minecart._texturePosition[index4] = new Vector2(1f, 0.0f); + int index5 = index4 + 1; + Minecart._leftSideConnection[index5] = -1; + Minecart._rightSideConnection[index5] = 1; + for (int index6 = 0; index6 < 4; ++index6) + Minecart._tileHeight[index5][index6] = -1; + Minecart._texturePosition[index5] = new Vector2(2f, 1f); + int index7 = index5 + 1; + Minecart._leftSideConnection[index7] = 1; + Minecart._rightSideConnection[index7] = -1; + for (int index8 = 4; index8 < 8; ++index8) + Minecart._tileHeight[index7][index8] = -1; + Minecart._texturePosition[index7] = new Vector2(3f, 1f); + int index9 = index7 + 1; + Minecart._leftSideConnection[index9] = 2; + Minecart._rightSideConnection[index9] = 1; + Minecart._tileHeight[index9][0] = 1; + Minecart._tileHeight[index9][1] = 2; + Minecart._tileHeight[index9][2] = 3; + Minecart._tileHeight[index9][3] = 3; + Minecart._tileHeight[index9][4] = 4; + Minecart._tileHeight[index9][5] = 4; + Minecart._texturePosition[index9] = new Vector2(0.0f, 2f); + int index10 = index9 + 1; + Minecart._leftSideConnection[index10] = 1; + Minecart._rightSideConnection[index10] = 2; + Minecart._tileHeight[index10][2] = 4; + Minecart._tileHeight[index10][3] = 4; + Minecart._tileHeight[index10][4] = 3; + Minecart._tileHeight[index10][5] = 3; + Minecart._tileHeight[index10][6] = 2; + Minecart._tileHeight[index10][7] = 1; + Minecart._texturePosition[index10] = new Vector2(1f, 2f); + int index11 = index10 + 1; + Minecart._leftSideConnection[index11] = 1; + Minecart._rightSideConnection[index11] = 0; + Minecart._tileHeight[index11][4] = 6; + Minecart._tileHeight[index11][5] = 6; + Minecart._tileHeight[index11][6] = 7; + Minecart._tileHeight[index11][7] = 8; + Minecart._texturePosition[index11] = new Vector2(0.0f, 1f); + int index12 = index11 + 1; + Minecart._leftSideConnection[index12] = 0; + Minecart._rightSideConnection[index12] = 1; + Minecart._tileHeight[index12][0] = 8; + Minecart._tileHeight[index12][1] = 7; + Minecart._tileHeight[index12][2] = 6; + Minecart._tileHeight[index12][3] = 6; + Minecart._texturePosition[index12] = new Vector2(1f, 1f); + int index13 = index12 + 1; + Minecart._leftSideConnection[index13] = 0; + Minecart._rightSideConnection[index13] = 2; + for (int index14 = 0; index14 < 8; ++index14) + Minecart._tileHeight[index13][index14] = 8 - index14; + Minecart._texturePosition[index13] = new Vector2(0.0f, 3f); + int index15 = index13 + 1; + Minecart._leftSideConnection[index15] = 2; + Minecart._rightSideConnection[index15] = 0; + for (int index16 = 0; index16 < 8; ++index16) + Minecart._tileHeight[index15][index16] = index16 + 1; + Minecart._texturePosition[index15] = new Vector2(1f, 3f); + int index17 = index15 + 1; + Minecart._leftSideConnection[index17] = 2; + Minecart._rightSideConnection[index17] = -1; + Minecart._tileHeight[index17][0] = 1; + Minecart._tileHeight[index17][1] = 2; + for (int index18 = 2; index18 < 8; ++index18) + Minecart._tileHeight[index17][index18] = -1; + Minecart._texturePosition[index17] = new Vector2(4f, 1f); + int index19 = index17 + 1; + Minecart._leftSideConnection[index19] = -1; + Minecart._rightSideConnection[index19] = 2; + Minecart._tileHeight[index19][6] = 2; + Minecart._tileHeight[index19][7] = 1; + for (int index20 = 0; index20 < 6; ++index20) + Minecart._tileHeight[index19][index20] = -1; + Minecart._texturePosition[index19] = new Vector2(5f, 1f); + int index21 = index19 + 1; + Minecart._leftSideConnection[index21] = 0; + Minecart._rightSideConnection[index21] = -1; + Minecart._tileHeight[index21][0] = 8; + Minecart._tileHeight[index21][1] = 7; + Minecart._tileHeight[index21][2] = 6; + for (int index22 = 3; index22 < 8; ++index22) + Minecart._tileHeight[index21][index22] = -1; + Minecart._texturePosition[index21] = new Vector2(6f, 1f); + int index23 = index21 + 1; + Minecart._leftSideConnection[index23] = -1; + Minecart._rightSideConnection[index23] = 0; + Minecart._tileHeight[index23][5] = 6; + Minecart._tileHeight[index23][6] = 7; + Minecart._tileHeight[index23][7] = 8; + for (int index24 = 0; index24 < 5; ++index24) + Minecart._tileHeight[index23][index24] = -1; + Minecart._texturePosition[index23] = new Vector2(7f, 1f); + int index25 = index23 + 1; + Minecart._leftSideConnection[index25] = -1; + Minecart._rightSideConnection[index25] = 1; + Minecart._tileHeight[index25][0] = -4; + Minecart._texturePosition[index25] = new Vector2(2f, 0.0f); + int index26 = index25 + 1; + Minecart._leftSideConnection[index26] = 1; + Minecart._rightSideConnection[index26] = -1; + Minecart._tileHeight[index26][7] = -4; + Minecart._texturePosition[index26] = new Vector2(3f, 0.0f); + int index27 = index26 + 1; + Minecart._leftSideConnection[index27] = 2; + Minecart._rightSideConnection[index27] = -1; + for (int index28 = 0; index28 < 6; ++index28) + Minecart._tileHeight[index27][index28] = index28 + 1; + Minecart._tileHeight[index27][6] = -3; + Minecart._tileHeight[index27][7] = -3; + Minecart._texturePosition[index27] = new Vector2(4f, 0.0f); + int index29 = index27 + 1; + Minecart._leftSideConnection[index29] = -1; + Minecart._rightSideConnection[index29] = 2; + Minecart._tileHeight[index29][0] = -3; + Minecart._tileHeight[index29][1] = -3; + for (int index30 = 2; index30 < 8; ++index30) + Minecart._tileHeight[index29][index30] = 8 - index30; + Minecart._texturePosition[index29] = new Vector2(5f, 0.0f); + int index31 = index29 + 1; + Minecart._leftSideConnection[index31] = 0; + Minecart._rightSideConnection[index31] = -1; + for (int index32 = 0; index32 < 6; ++index32) + Minecart._tileHeight[index31][index32] = 8 - index32; + Minecart._tileHeight[index31][6] = -3; + Minecart._tileHeight[index31][7] = -3; + Minecart._texturePosition[index31] = new Vector2(6f, 0.0f); + int index33 = index31 + 1; + Minecart._leftSideConnection[index33] = -1; + Minecart._rightSideConnection[index33] = 0; + Minecart._tileHeight[index33][0] = -3; + Minecart._tileHeight[index33][1] = -3; + for (int index34 = 2; index34 < 8; ++index34) + Minecart._tileHeight[index33][index34] = index34 + 1; + Minecart._texturePosition[index33] = new Vector2(7f, 0.0f); + int index35 = index33 + 1; + Minecart._leftSideConnection[index35] = -1; + Minecart._rightSideConnection[index35] = -1; + Minecart._tileHeight[index35][0] = -4; + Minecart._tileHeight[index35][7] = -4; + Minecart._trackType[index35] = 1; + Minecart._texturePosition[index35] = new Vector2(0.0f, 4f); + int index36 = index35 + 1; + Minecart._leftSideConnection[index36] = 1; + Minecart._rightSideConnection[index36] = 1; + Minecart._trackType[index36] = 1; + Minecart._texturePosition[index36] = new Vector2(1f, 4f); + int index37 = index36 + 1; + Minecart._leftSideConnection[index37] = -1; + Minecart._rightSideConnection[index37] = 1; + Minecart._tileHeight[index37][0] = -4; + Minecart._trackType[index37] = 1; + Minecart._texturePosition[index37] = new Vector2(0.0f, 5f); + int index38 = index37 + 1; + Minecart._leftSideConnection[index38] = 1; + Minecart._rightSideConnection[index38] = -1; + Minecart._tileHeight[index38][7] = -4; + Minecart._trackType[index38] = 1; + Minecart._texturePosition[index38] = new Vector2(1f, 5f); + int index39 = index38 + 1; + Minecart._leftSideConnection[index39] = -1; + Minecart._rightSideConnection[index39] = 1; + for (int index40 = 0; index40 < 6; ++index40) + Minecart._tileHeight[index39][index40] = -2; + Minecart._texturePosition[index39] = new Vector2(2f, 2f); + int index41 = index39 + 1; + Minecart._leftSideConnection[index41] = 1; + Minecart._rightSideConnection[index41] = -1; + for (int index42 = 2; index42 < 8; ++index42) + Minecart._tileHeight[index41][index42] = -2; + Minecart._texturePosition[index41] = new Vector2(3f, 2f); + int index43 = index41 + 1; + Minecart._leftSideConnection[index43] = 2; + Minecart._rightSideConnection[index43] = -1; + Minecart._tileHeight[index43][0] = 1; + Minecart._tileHeight[index43][1] = 2; + for (int index44 = 2; index44 < 8; ++index44) + Minecart._tileHeight[index43][index44] = -2; + Minecart._texturePosition[index43] = new Vector2(4f, 2f); + int index45 = index43 + 1; + Minecart._leftSideConnection[index45] = -1; + Minecart._rightSideConnection[index45] = 2; + Minecart._tileHeight[index45][6] = 2; + Minecart._tileHeight[index45][7] = 1; + for (int index46 = 0; index46 < 6; ++index46) + Minecart._tileHeight[index45][index46] = -2; + Minecart._texturePosition[index45] = new Vector2(5f, 2f); + int index47 = index45 + 1; + Minecart._leftSideConnection[index47] = 0; + Minecart._rightSideConnection[index47] = -1; + Minecart._tileHeight[index47][0] = 8; + Minecart._tileHeight[index47][1] = 7; + Minecart._tileHeight[index47][2] = 6; + for (int index48 = 3; index48 < 8; ++index48) + Minecart._tileHeight[index47][index48] = -2; + Minecart._texturePosition[index47] = new Vector2(6f, 2f); + int index49 = index47 + 1; + Minecart._leftSideConnection[index49] = -1; + Minecart._rightSideConnection[index49] = 0; + Minecart._tileHeight[index49][5] = 6; + Minecart._tileHeight[index49][6] = 7; + Minecart._tileHeight[index49][7] = 8; + for (int index50 = 0; index50 < 5; ++index50) + Minecart._tileHeight[index49][index50] = -2; + Minecart._texturePosition[index49] = new Vector2(7f, 2f); + int index51 = index49 + 1; + Minecart._leftSideConnection[index51] = 1; + Minecart._rightSideConnection[index51] = 1; + Minecart._trackType[index51] = 2; + Minecart._boostLeft[index51] = false; + Minecart._texturePosition[index51] = new Vector2(2f, 3f); + int index52 = index51 + 1; + Minecart._leftSideConnection[index52] = 1; + Minecart._rightSideConnection[index52] = 1; + Minecart._trackType[index52] = 2; + Minecart._boostLeft[index52] = true; + Minecart._texturePosition[index52] = new Vector2(3f, 3f); + int index53 = index52 + 1; + Minecart._leftSideConnection[index53] = 0; + Minecart._rightSideConnection[index53] = 2; + for (int index54 = 0; index54 < 8; ++index54) + Minecart._tileHeight[index53][index54] = 8 - index54; + Minecart._trackType[index53] = 2; + Minecart._boostLeft[index53] = false; + Minecart._texturePosition[index53] = new Vector2(4f, 3f); + int index55 = index53 + 1; + Minecart._leftSideConnection[index55] = 2; + Minecart._rightSideConnection[index55] = 0; + for (int index56 = 0; index56 < 8; ++index56) + Minecart._tileHeight[index55][index56] = index56 + 1; + Minecart._trackType[index55] = 2; + Minecart._boostLeft[index55] = true; + Minecart._texturePosition[index55] = new Vector2(5f, 3f); + int index57 = index55 + 1; + Minecart._leftSideConnection[index57] = 0; + Minecart._rightSideConnection[index57] = 2; + for (int index58 = 0; index58 < 8; ++index58) + Minecart._tileHeight[index57][index58] = 8 - index58; + Minecart._trackType[index57] = 2; + Minecart._boostLeft[index57] = true; + Minecart._texturePosition[index57] = new Vector2(6f, 3f); + int index59 = index57 + 1; + Minecart._leftSideConnection[index59] = 2; + Minecart._rightSideConnection[index59] = 0; + for (int index60 = 0; index60 < 8; ++index60) + Minecart._tileHeight[index59][index60] = index60 + 1; + Minecart._trackType[index59] = 2; + Minecart._boostLeft[index59] = false; + Minecart._texturePosition[index59] = new Vector2(7f, 3f); + int num1 = index59 + 1; + Minecart._texturePosition[36] = new Vector2(0.0f, 6f); + Minecart._texturePosition[37] = new Vector2(1f, 6f); + Minecart._texturePosition[39] = new Vector2(0.0f, 7f); + Minecart._texturePosition[38] = new Vector2(1f, 7f); + for (int index61 = 0; index61 < Minecart._texturePosition.Length; ++index61) + Minecart._texturePosition[index61] = Minecart._texturePosition[index61] * 18f; + for (int index62 = 0; index62 < Minecart._tileHeight.Length; ++index62) + { + int[] numArray = Minecart._tileHeight[index62]; + for (int index63 = 0; index63 < numArray.Length; ++index63) + { + if (numArray[index63] >= 0) + numArray[index63] = (8 - numArray[index63]) * 2; + } + } + int[] numArray1 = new int[36]; + Minecart._trackSwitchOptions = new int[64][]; + for (int index64 = 0; index64 < 64; ++index64) + { + int num2 = 0; + for (int index65 = 1; index65 < 256; index65 <<= 1) + { + if ((index64 & index65) == index65) + ++num2; + } + int length = 0; + for (int index66 = 0; index66 < 36; ++index66) + { + numArray1[index66] = -1; + int num3 = 0; + switch (Minecart._leftSideConnection[index66]) + { + case 0: + num3 |= 1; + break; + case 1: + num3 |= 2; + break; + case 2: + num3 |= 4; + break; + } + switch (Minecart._rightSideConnection[index66]) + { + case 0: + num3 |= 8; + break; + case 1: + num3 |= 16; + break; + case 2: + num3 |= 32; + break; + } + if (num2 < 2) + { + if (index64 != num3) + continue; + } + else if (num3 == 0 || (index64 & num3) != num3) + continue; + numArray1[index66] = index66; + ++length; + } + if (length != 0) + { + int[] numArray2 = new int[length]; + int index67 = 0; + for (int index68 = 0; index68 < 36; ++index68) + { + if (numArray1[index68] != -1) + { + numArray2[index67] = numArray1[index68]; + ++index67; + } + } + Minecart._trackSwitchOptions[index64] = numArray2; + } + } + Minecart._firstPressureFrame = (short) -1; + Minecart._firstLeftBoostFrame = (short) -1; + Minecart._firstRightBoostFrame = (short) -1; + for (int index69 = 0; index69 < Minecart._trackType.Length; ++index69) + { + switch (Minecart._trackType[index69]) + { + case 1: + if (Minecart._firstPressureFrame == (short) -1) + { + Minecart._firstPressureFrame = (short) index69; + break; + } + break; + case 2: + if (Minecart._boostLeft[index69]) + { + if (Minecart._firstLeftBoostFrame == (short) -1) + { + Minecart._firstLeftBoostFrame = (short) index69; + break; + } + break; + } + if (Minecart._firstRightBoostFrame == (short) -1) + { + Minecart._firstRightBoostFrame = (short) index69; + break; + } + break; + } + } + } + + public static bool IsPressurePlate(Tile tile) => tile.active() && tile.type == (ushort) 314 && (tile.frameX == (short) 20 || tile.frameX == (short) 21); + + public static BitsByte TrackCollision( + ref Vector2 Position, + ref Vector2 Velocity, + ref Vector2 lastBoost, + int Width, + int Height, + bool followDown, + bool followUp, + int fallStart, + bool trackOnly, + Mount.MountDelegatesData delegatesData) + { + if (followDown & followUp) + { + followDown = false; + followUp = false; + } + Vector2 vector2_1 = new Vector2((float) (Width / 2) - 25f, (float) (Height / 2)); + Vector2 vector2_2 = Position + new Vector2((float) (Width / 2) - 25f, (float) (Height / 2)) + Minecart._trackMagnetOffset; + Vector2 vector2_3 = Velocity; + float num1 = vector2_3.Length(); + vector2_3.Normalize(); + Vector2 vector2_4 = vector2_2; + Tile tileTrack = (Tile) null; + bool flag1 = false; + bool flag2 = true; + int num2 = -1; + int num3 = -1; + int num4 = -1; + Minecart.TrackState trackState1 = Minecart.TrackState.NoTrack; + bool flag3 = false; + bool flag4 = false; + bool flag5 = false; + bool flag6 = false; + Vector2 vector2_5 = Vector2.Zero; + Vector2 vector2_6 = Vector2.Zero; + BitsByte bitsByte = new BitsByte(); + while (true) + { + int index1 = (int) ((double) vector2_4.X / 16.0); + int index2 = (int) ((double) vector2_4.Y / 16.0); + int index3 = (int) vector2_4.X % 16 / 2; + if (flag2) + num4 = index3; + bool flag7 = index3 != num4; + if ((trackState1 == Minecart.TrackState.OnBack || trackState1 == Minecart.TrackState.OnTrack || trackState1 == Minecart.TrackState.OnFront) && index1 != num2) + { + int index4 = trackState1 != Minecart.TrackState.OnBack ? (int) tileTrack.FrontTrack() : (int) tileTrack.BackTrack(); + switch ((double) vector2_3.X >= 0.0 ? Minecart._rightSideConnection[index4] : Minecart._leftSideConnection[index4]) + { + case 0: + --index2; + vector2_4.Y -= 2f; + break; + case 2: + ++index2; + vector2_4.Y += 2f; + break; + } + } + Minecart.TrackState trackState2 = Minecart.TrackState.NoTrack; + bool flag8 = false; + if (index1 != num2 || index2 != num3) + { + if (flag2) + flag2 = false; + else + flag8 = true; + tileTrack = Main.tile[index1, index2]; + if (tileTrack == null) + { + tileTrack = new Tile(); + Main.tile[index1, index2] = tileTrack; + } + flag1 = tileTrack.nactive() && tileTrack.type == (ushort) 314; + } + if (flag1) + { + Minecart.TrackState trackState3 = Minecart.TrackState.NoTrack; + int index5 = (int) tileTrack.FrontTrack(); + int index6 = (int) tileTrack.BackTrack(); + int num5 = Minecart._tileHeight[index5][index3]; + switch (num5) + { + case -4: + if (trackState1 == Minecart.TrackState.OnFront) + { + if (trackOnly) + { + vector2_4 -= vector2_6; + num1 = 0.0f; + trackState2 = Minecart.TrackState.OnFront; + flag6 = true; + break; + } + trackState2 = Minecart.TrackState.NoTrack; + flag5 = true; + break; + } + break; + case -3: + if (trackState1 == Minecart.TrackState.OnFront) + { + trackState1 = Minecart.TrackState.NoTrack; + Matrix matrix = (double) Velocity.X <= 0.0 ? (Minecart._rightSideConnection[index5] != 2 ? Matrix.CreateRotationZ(-0.7853982f) : Matrix.CreateRotationZ(0.7853982f)) : (Minecart._leftSideConnection[index5] != 2 ? Matrix.CreateRotationZ(0.7853982f) : Matrix.CreateRotationZ(-0.7853982f)); + vector2_5 = Vector2.Transform(new Vector2(Velocity.X, 0.0f), matrix); + vector2_5.X = Velocity.X; + flag4 = true; + num1 = 0.0f; + break; + } + break; + case -2: + if (trackState1 == Minecart.TrackState.OnFront) + { + if (trackOnly) + { + vector2_4 -= vector2_6; + num1 = 0.0f; + trackState2 = Minecart.TrackState.OnFront; + flag6 = true; + break; + } + if ((double) vector2_3.X < 0.0) + { + float num6 = (float) (index1 * 16 + (index3 + 1) * 2) - vector2_4.X; + vector2_4.X += num6; + num1 += num6 / vector2_3.X; + } + vector2_3.X = -vector2_3.X; + bitsByte[1] = true; + trackState2 = Minecart.TrackState.OnFront; + break; + } + break; + case -1: + if (trackState1 == Minecart.TrackState.OnFront) + { + vector2_4 -= vector2_6; + num1 = 0.0f; + trackState2 = Minecart.TrackState.OnFront; + flag6 = true; + break; + } + break; + default: + float num7 = (float) (index2 * 16 + num5); + if (index1 != num2 && trackState1 == Minecart.TrackState.NoTrack && (double) vector2_4.Y > (double) num7 && (double) vector2_4.Y - (double) num7 < 2.0) + { + flag8 = false; + trackState1 = Minecart.TrackState.AboveFront; + } + Minecart.TrackState trackState4 = (double) vector2_4.Y >= (double) num7 ? ((double) vector2_4.Y <= (double) num7 ? Minecart.TrackState.OnTrack : Minecart.TrackState.BelowTrack) : Minecart.TrackState.AboveTrack; + if (index6 != -1) + { + float num8 = (float) (index2 * 16 + Minecart._tileHeight[index6][index3]); + trackState3 = (double) vector2_4.Y >= (double) num8 ? ((double) vector2_4.Y <= (double) num8 ? Minecart.TrackState.OnTrack : Minecart.TrackState.BelowTrack) : Minecart.TrackState.AboveTrack; + } + switch (trackState4) + { + case Minecart.TrackState.AboveTrack: + switch (trackState3) + { + case Minecart.TrackState.AboveTrack: + trackState2 = Minecart.TrackState.AboveTrack; + break; + case Minecart.TrackState.OnTrack: + trackState2 = Minecart.TrackState.OnBack; + break; + case Minecart.TrackState.BelowTrack: + trackState2 = Minecart.TrackState.AboveFront; + break; + default: + trackState2 = Minecart.TrackState.AboveFront; + break; + } + break; + case Minecart.TrackState.OnTrack: + trackState2 = trackState3 != Minecart.TrackState.OnTrack ? Minecart.TrackState.OnFront : Minecart.TrackState.OnTrack; + break; + case Minecart.TrackState.BelowTrack: + switch (trackState3) + { + case Minecart.TrackState.AboveTrack: + trackState2 = Minecart.TrackState.AboveBack; + break; + case Minecart.TrackState.OnTrack: + trackState2 = Minecart.TrackState.OnBack; + break; + case Minecart.TrackState.BelowTrack: + trackState2 = Minecart.TrackState.BelowTrack; + break; + default: + trackState2 = Minecart.TrackState.BelowTrack; + break; + } + break; + } + break; + } + } + if (!flag8) + { + if (trackState1 != trackState2) + { + bool flag9 = false; + if (flag7 || (double) vector2_3.Y > 0.0) + { + switch (trackState1) + { + case Minecart.TrackState.AboveTrack: + switch (trackState2) + { + case Minecart.TrackState.AboveTrack: + trackState2 = Minecart.TrackState.OnTrack; + break; + case Minecart.TrackState.AboveFront: + trackState2 = Minecart.TrackState.OnBack; + break; + case Minecart.TrackState.AboveBack: + trackState2 = Minecart.TrackState.OnFront; + break; + } + break; + case Minecart.TrackState.OnTrack: + int num9 = Minecart._tileHeight[(int) tileTrack.FrontTrack()][index3]; + int num10 = Minecart._tileHeight[(int) tileTrack.BackTrack()][index3]; + trackState2 = !followDown ? (!followUp ? Minecart.TrackState.OnFront : (num9 >= num10 ? Minecart.TrackState.OnBack : Minecart.TrackState.OnFront)) : (num9 >= num10 ? Minecart.TrackState.OnFront : Minecart.TrackState.OnBack); + flag9 = true; + break; + case Minecart.TrackState.AboveFront: + if (trackState2 == Minecart.TrackState.BelowTrack) + { + trackState2 = Minecart.TrackState.OnFront; + break; + } + break; + case Minecart.TrackState.AboveBack: + if (trackState2 == Minecart.TrackState.BelowTrack) + { + trackState2 = Minecart.TrackState.OnBack; + break; + } + break; + case Minecart.TrackState.OnFront: + trackState2 = Minecart.TrackState.OnFront; + flag9 = true; + break; + case Minecart.TrackState.OnBack: + trackState2 = Minecart.TrackState.OnBack; + flag9 = true; + break; + } + int index7 = -1; + if (trackState2 != Minecart.TrackState.OnTrack && trackState2 != Minecart.TrackState.OnFront) + { + if (trackState2 == Minecart.TrackState.OnBack) + index7 = (int) tileTrack.BackTrack(); + } + else + index7 = (int) tileTrack.FrontTrack(); + if (index7 != -1) + { + if (!flag9 && (double) Velocity.Y > (double) Player.defaultGravity) + { + int num11 = (int) ((double) Position.Y / 16.0); + if (fallStart < num11 - 1) + { + delegatesData.MinecartLandingSound(Position, Width, Height); + Minecart.WheelSparks(delegatesData.MinecartDust, Position, Width, Height, 10); + } + } + if (trackState1 == Minecart.TrackState.AboveFront && Minecart._trackType[index7] == 1) + flag3 = true; + vector2_3.Y = 0.0f; + vector2_4.Y = (float) (index2 * 16 + Minecart._tileHeight[index7][index3]); + } + } + } + } + else if (trackState2 == Minecart.TrackState.OnFront || trackState2 == Minecart.TrackState.OnBack || trackState2 == Minecart.TrackState.OnTrack) + { + if (flag1 && Minecart._trackType[(int) tileTrack.FrontTrack()] == 1) + flag3 = true; + vector2_3.Y = 0.0f; + } + if (trackState2 == Minecart.TrackState.OnFront) + { + int index8 = (int) tileTrack.FrontTrack(); + if (Minecart._trackType[index8] == 2 && (double) lastBoost.X == 0.0 && (double) lastBoost.Y == 0.0) + { + lastBoost = new Vector2((float) index1, (float) index2); + if (Minecart._boostLeft[index8]) + bitsByte[4] = true; + else + bitsByte[5] = true; + } + } + num4 = index3; + trackState1 = trackState2; + num2 = index1; + num3 = index2; + if ((double) num1 > 0.0) + { + float num12 = vector2_4.X % 2f; + float num13 = vector2_4.Y % 2f; + float num14 = 3f; + float num15 = 3f; + if ((double) vector2_3.X < 0.0) + num14 = num12 + 0.125f; + else if ((double) vector2_3.X > 0.0) + num14 = 2f - num12; + if ((double) vector2_3.Y < 0.0) + num15 = num13 + 0.125f; + else if ((double) vector2_3.Y > 0.0) + num15 = 2f - num13; + if ((double) num14 != 3.0 || (double) num15 != 3.0) + { + float num16 = Math.Abs(num14 / vector2_3.X); + float num17 = Math.Abs(num15 / vector2_3.Y); + float num18 = (double) num16 < (double) num17 ? num16 : num17; + if ((double) num18 > (double) num1) + { + vector2_6 = vector2_3 * num1; + num1 = 0.0f; + } + else + { + vector2_6 = vector2_3 * num18; + num1 -= num18; + } + vector2_4 += vector2_6; + } + else + goto label_99; + } + else + break; + } + if ((double) lastBoost.X != (double) num2 || (double) lastBoost.Y != (double) num3) + lastBoost = Vector2.Zero; +label_99: + if (flag3) + bitsByte[3] = true; + if (flag5) + { + Velocity.X = vector2_4.X - vector2_2.X; + Velocity.Y = Player.defaultGravity; + } + else if (flag4) + { + bitsByte[2] = true; + Velocity = vector2_5; + } + else if (bitsByte[1]) + { + Velocity.X = -Velocity.X; + Position.X = vector2_4.X - Minecart._trackMagnetOffset.X - vector2_1.X - Velocity.X; + if ((double) vector2_3.Y == 0.0) + Velocity.Y = 0.0f; + } + else + { + if (flag6) + Velocity.X = vector2_4.X - vector2_2.X; + if ((double) vector2_3.Y == 0.0) + Velocity.Y = 0.0f; + } + Position.Y += vector2_4.Y - vector2_2.Y - Velocity.Y; + Position.Y = (float) Math.Round((double) Position.Y, 2); + switch (trackState1) + { + case Minecart.TrackState.OnTrack: + case Minecart.TrackState.OnFront: + case Minecart.TrackState.OnBack: + bitsByte[0] = true; + break; + } + return bitsByte; + } + + public static bool FrameTrack(int i, int j, bool pound, bool mute = false) + { + if (Minecart._trackType == null) + return false; + Tile tileTrack = Main.tile[i, j]; + if (tileTrack == null) + { + tileTrack = new Tile(); + Main.tile[i, j] = tileTrack; + } + if (mute && tileTrack.type != (ushort) 314) + return false; + int tilesSetLookupIndex = Minecart.GetNearbyTilesSetLookupIndex(i, j); + int index1 = (int) tileTrack.FrontTrack(); + int num1 = (int) tileTrack.BackTrack(); + int num2 = index1 < 0 || index1 >= Minecart._trackType.Length ? 0 : Minecart._trackType[index1]; + int index2 = -1; + int index3 = -1; + int[] trackSwitchOption = Minecart._trackSwitchOptions[tilesSetLookupIndex]; + if (trackSwitchOption == null) + { + if (pound) + return false; + tileTrack.FrontTrack((short) 0); + tileTrack.BackTrack((short) -1); + return false; + } + if (!pound) + { + int num3 = -1; + int num4 = -1; + bool flag = false; + for (int index4 = 0; index4 < trackSwitchOption.Length; ++index4) + { + int index5 = trackSwitchOption[index4]; + if (num1 == trackSwitchOption[index4]) + index3 = index4; + if (Minecart._trackType[index5] == num2) + { + if (Minecart._leftSideConnection[index5] == -1 || Minecart._rightSideConnection[index5] == -1) + { + if (index1 == trackSwitchOption[index4]) + { + index2 = index4; + flag = true; + } + if (num3 == -1) + num3 = index4; + } + else + { + if (index1 == trackSwitchOption[index4]) + { + index2 = index4; + flag = false; + } + if (num4 == -1) + num4 = index4; + } + } + } + if (num4 != -1) + { + if (index2 == -1 | flag) + index2 = num4; + } + else + { + if (index2 == -1) + { + if (num2 == 2 || num2 == 1) + return false; + index2 = num3; + } + index3 = -1; + } + } + else + { + for (int index6 = 0; index6 < trackSwitchOption.Length; ++index6) + { + if (index1 == trackSwitchOption[index6]) + index2 = index6; + if (num1 == trackSwitchOption[index6]) + index3 = index6; + } + int num5 = 0; + int num6 = 0; + for (int index7 = 0; index7 < trackSwitchOption.Length; ++index7) + { + if (Minecart._trackType[trackSwitchOption[index7]] == num2) + { + if (Minecart._leftSideConnection[trackSwitchOption[index7]] == -1 || Minecart._rightSideConnection[trackSwitchOption[index7]] == -1) + ++num6; + else + ++num5; + } + } + if (num5 < 2 && num6 < 2) + return false; + bool flag1 = num5 == 0; + bool flag2 = false; + if (!flag1) + { + while (!flag2) + { + ++index3; + if (index3 >= trackSwitchOption.Length) + { + index3 = -1; + break; + } + if ((Minecart._leftSideConnection[trackSwitchOption[index3]] != Minecart._leftSideConnection[trackSwitchOption[index2]] || Minecart._rightSideConnection[trackSwitchOption[index3]] != Minecart._rightSideConnection[trackSwitchOption[index2]]) && Minecart._trackType[trackSwitchOption[index3]] == num2 && Minecart._leftSideConnection[trackSwitchOption[index3]] != -1 && Minecart._rightSideConnection[trackSwitchOption[index3]] != -1) + flag2 = true; + } + } + if (!flag2) + { + do + { + ++index2; + if (index2 >= trackSwitchOption.Length) + { + index2 = -1; + do + { + ++index2; + } + while (Minecart._trackType[trackSwitchOption[index2]] != num2 || (Minecart._leftSideConnection[trackSwitchOption[index2]] == -1 ? 1 : (Minecart._rightSideConnection[trackSwitchOption[index2]] == -1 ? 1 : 0)) != (flag1 ? 1 : 0)); + break; + } + } + while (Minecart._trackType[trackSwitchOption[index2]] != num2 || (Minecart._leftSideConnection[trackSwitchOption[index2]] == -1 ? 1 : (Minecart._rightSideConnection[trackSwitchOption[index2]] == -1 ? 1 : 0)) != (flag1 ? 1 : 0)); + } + } + bool flag3 = false; + switch (index2) + { + case -2: + if ((int) tileTrack.FrontTrack() != (int) Minecart._firstPressureFrame) + { + flag3 = true; + break; + } + break; + case -1: + if (tileTrack.FrontTrack() != (short) 0) + { + flag3 = true; + break; + } + break; + default: + if ((int) tileTrack.FrontTrack() != trackSwitchOption[index2]) + { + flag3 = true; + break; + } + break; + } + if (index3 == -1) + { + if (tileTrack.BackTrack() != (short) -1) + flag3 = true; + } + else if ((int) tileTrack.BackTrack() != trackSwitchOption[index3]) + flag3 = true; + switch (index2) + { + case -2: + tileTrack.FrontTrack(Minecart._firstPressureFrame); + break; + case -1: + tileTrack.FrontTrack((short) 0); + break; + default: + tileTrack.FrontTrack((short) trackSwitchOption[index2]); + break; + } + if (index3 == -1) + tileTrack.BackTrack((short) -1); + else + tileTrack.BackTrack((short) trackSwitchOption[index3]); + if (pound & flag3 && !mute) + WorldGen.KillTile(i, j, true); + return true; + } + + private static int GetNearbyTilesSetLookupIndex(int i, int j) + { + int num = 0; + if (Main.tile[i - 1, j - 1] != null && Main.tile[i - 1, j - 1].type == (ushort) 314) + ++num; + if (Main.tile[i - 1, j] != null && Main.tile[i - 1, j].type == (ushort) 314) + num += 2; + if (Main.tile[i - 1, j + 1] != null && Main.tile[i - 1, j + 1].type == (ushort) 314) + num += 4; + if (Main.tile[i + 1, j - 1] != null && Main.tile[i + 1, j - 1].type == (ushort) 314) + num += 8; + if (Main.tile[i + 1, j] != null && Main.tile[i + 1, j].type == (ushort) 314) + num += 16; + if (Main.tile[i + 1, j + 1] != null && Main.tile[i + 1, j + 1].type == (ushort) 314) + num += 32; + return num; + } + + public static bool GetOnTrack( + int tileX, + int tileY, + ref Vector2 Position, + int Width, + int Height) + { + Tile tile = Main.tile[tileX, tileY]; + if (tile.type != (ushort) 314) + return false; + Vector2 vector2_1 = new Vector2((float) (Width / 2) - 25f, (float) (Height / 2)); + Vector2 vector2_2 = Position + vector2_1 + Minecart._trackMagnetOffset; + int num1 = (int) vector2_2.X % 16 / 2; + int num2 = -1; + int num3 = 0; + for (int index = num1; index < 8; ++index) + { + num3 = Minecart._tileHeight[(int) tile.frameX][index]; + if (num3 >= 0) + { + num2 = index; + break; + } + } + if (num2 == -1) + { + for (int index = num1 - 1; index >= 0; --index) + { + num3 = Minecart._tileHeight[(int) tile.frameX][index]; + if (num3 >= 0) + { + num2 = index; + break; + } + } + } + if (num2 == -1) + return false; + vector2_2.X = (float) (tileX * 16 + num2 * 2); + vector2_2.Y = (float) (tileY * 16 + num3); + vector2_2 -= Minecart._trackMagnetOffset; + vector2_2 -= vector2_1; + Position = vector2_2; + return true; + } + + public static bool OnTrack(Vector2 Position, int Width, int Height) + { + Vector2 vector2 = Position + new Vector2((float) (Width / 2) - 25f, (float) (Height / 2)) + Minecart._trackMagnetOffset; + int index1 = (int) ((double) vector2.X / 16.0); + int index2 = (int) ((double) vector2.Y / 16.0); + return Main.tile[index1, index2] != null && Main.tile[index1, index2].type == (ushort) 314; + } + + public static float TrackRotation( + ref float rotation, + Vector2 Position, + int Width, + int Height, + bool followDown, + bool followUp, + Mount.MountDelegatesData delegatesData) + { + Vector2 leftWheel; + Vector2 rightWheel; + Minecart.GetWheelsPositions(Position, Width, Height, followDown, followUp, delegatesData, out leftWheel, out rightWheel); + float num1 = rightWheel.Y - leftWheel.Y; + float num2 = rightWheel.X - leftWheel.X; + float num3 = num1 / num2; + double num4 = (double) leftWheel.Y + ((double) Position.X - (double) leftWheel.X) * (double) num3; + float num5 = (Position.X - (float) (int) Position.X) * num3; + rotation = (float) Math.Atan2((double) num1, (double) num2); + double y = (double) Position.Y; + return (float) (num4 - y) + num5; + } + + public static void GetWheelsPositions( + Vector2 Position, + int Width, + int Height, + bool followDown, + bool followUp, + Mount.MountDelegatesData delegatesData, + out Vector2 leftWheel, + out Vector2 rightWheel) + { + leftWheel = Position; + rightWheel = Position; + Vector2 zero = Vector2.Zero; + Vector2 Velocity = new Vector2(-12f, 0.0f); + Minecart.TrackCollision(ref leftWheel, ref Velocity, ref zero, Width, Height, followDown, followUp, 0, true, delegatesData); + leftWheel += Velocity; + Velocity = new Vector2(12f, 0.0f); + Minecart.TrackCollision(ref rightWheel, ref Velocity, ref zero, Width, Height, followDown, followUp, 0, true, delegatesData); + rightWheel += Velocity; + } + + public static void HitTrackSwitch(Vector2 Position, int Width, int Height) + { + Vector2 magnetPosition = Minecart.GetMagnetPosition(Position, Width, Height); + int num = (int) ((double) magnetPosition.X / 16.0); + int j = (int) ((double) magnetPosition.Y / 16.0); + Wiring.HitSwitch(num, j); + NetMessage.SendData(59, number: num, number2: ((float) j)); + } + + public static Vector2 GetMagnetPosition(Vector2 Position, int Width, int Height) + { + Vector2 vector2 = new Vector2((float) (Width / 2) - 25f, (float) (Height / 2)); + return Position + new Vector2((float) (Width / 2) - 25f, (float) (Height / 2)) + Minecart._trackMagnetOffset; + } + + public static void FlipSwitchTrack(int i, int j) + { + Tile tileTrack = Main.tile[i, j]; + short trackID = tileTrack.FrontTrack(); + if (trackID == (short) -1) + return; + switch (Minecart._trackType[(int) trackID]) + { + case 0: + if (tileTrack.BackTrack() == (short) -1) + break; + tileTrack.FrontTrack(tileTrack.BackTrack()); + tileTrack.BackTrack(trackID); + NetMessage.SendTileSquare(-1, i, j, 1); + break; + case 2: + Minecart.FrameTrack(i, j, true, true); + NetMessage.SendTileSquare(-1, i, j, 1); + break; + } + } + + public static void TrackColors( + int i, + int j, + Tile trackTile, + out int frontColor, + out int backColor) + { + if (trackTile.type == (ushort) 314) + { + frontColor = (int) trackTile.color(); + backColor = frontColor; + if (trackTile.frameY == (short) -1) + return; + int num1 = Minecart._leftSideConnection[(int) trackTile.frameX]; + int num2 = Minecart._rightSideConnection[(int) trackTile.frameX]; + int num3 = Minecart._leftSideConnection[(int) trackTile.frameY]; + int num4 = Minecart._rightSideConnection[(int) trackTile.frameY]; + int num5 = 0; + int num6 = 0; + int num7 = 0; + int num8 = 0; + for (int index = 0; index < 4; ++index) + { + int num9; + switch (index - 1) + { + case 0: + num9 = num2; + break; + case 1: + num9 = num3; + break; + case 2: + num9 = num4; + break; + default: + num9 = num1; + break; + } + int num10; + switch (num9) + { + case 0: + num10 = -1; + break; + case 1: + num10 = 0; + break; + case 2: + num10 = 1; + break; + default: + num10 = 0; + break; + } + Tile tile = index % 2 != 0 ? Main.tile[i + 1, j + num10] : Main.tile[i - 1, j + num10]; + int num11 = tile == null || !tile.active() || tile.type != (ushort) 314 ? 0 : (int) tile.color(); + switch (index) + { + case 1: + num6 = num11; + break; + case 2: + num7 = num11; + break; + case 3: + num8 = num11; + break; + default: + num5 = num11; + break; + } + } + if (num1 == num3) + { + if (num6 != 0) + frontColor = num6; + else if (num5 != 0) + frontColor = num5; + if (num8 != 0) + { + backColor = num8; + } + else + { + if (num7 == 0) + return; + backColor = num7; + } + } + else if (num2 == num4) + { + if (num5 != 0) + frontColor = num5; + else if (num6 != 0) + frontColor = num6; + if (num7 != 0) + { + backColor = num7; + } + else + { + if (num8 == 0) + return; + backColor = num8; + } + } + else + { + if (num6 == 0) + { + if (num5 != 0) + frontColor = num5; + } + else if (num5 != 0) + frontColor = num2 <= num1 ? num6 : num5; + if (num8 == 0) + { + if (num7 == 0) + return; + backColor = num7; + } + else + { + if (num7 == 0) + return; + backColor = num4 <= num3 ? num8 : num7; + } + } + } + else + { + frontColor = 0; + backColor = 0; + } + } + + public static bool DrawLeftDecoration(int frameID) => frameID >= 0 && frameID < 36 && Minecart._leftSideConnection[frameID] == 2; + + public static bool DrawRightDecoration(int frameID) => frameID >= 0 && frameID < 36 && Minecart._rightSideConnection[frameID] == 2; + + public static bool DrawBumper(int frameID) + { + if (frameID < 0 || frameID >= 36) + return false; + return Minecart._tileHeight[frameID][0] == -1 || Minecart._tileHeight[frameID][7] == -1; + } + + public static bool DrawBouncyBumper(int frameID) + { + if (frameID < 0 || frameID >= 36) + return false; + return Minecart._tileHeight[frameID][0] == -2 || Minecart._tileHeight[frameID][7] == -2; + } + + public static void PlaceTrack(Tile trackCache, int style) + { + trackCache.active(true); + trackCache.type = (ushort) 314; + trackCache.frameY = (short) -1; + switch (style) + { + case 0: + trackCache.frameX = (short) -1; + break; + case 1: + trackCache.frameX = Minecart._firstPressureFrame; + break; + case 2: + trackCache.frameX = Minecart._firstLeftBoostFrame; + break; + case 3: + trackCache.frameX = Minecart._firstRightBoostFrame; + break; + } + } + + public static int GetTrackItem(Tile trackCache) + { + switch (Minecart._trackType[(int) trackCache.frameX]) + { + case 0: + return 2340; + case 1: + return 2492; + case 2: + return 2739; + default: + return 0; + } + } + + public static Rectangle GetSourceRect(int frameID, int animationFrame = 0) + { + if (frameID < 0 || frameID >= 40) + return new Rectangle(0, 0, 0, 0); + Vector2 vector2 = Minecart._texturePosition[frameID]; + Rectangle rectangle = new Rectangle((int) vector2.X, (int) vector2.Y, 16, 16); + if (frameID < 36 && Minecart._trackType[frameID] == 2) + rectangle.Y += 18 * animationFrame; + return rectangle; + } + + public static bool GetAreExpectationsForSidesMet( + Point tileCoords, + int? expectedYOffsetForLeft, + int? expectedYOffsetForRight) + { + Tile tileTrack = Main.tile[tileCoords.X, tileCoords.Y]; + if (expectedYOffsetForLeft.HasValue) + { + short num1 = tileTrack.FrontTrack(); + int num2 = Minecart.ConvertOffsetYToTrackConnectionValue(expectedYOffsetForLeft.Value); + if (Minecart._leftSideConnection[(int) num1] != num2) + return false; + } + if (expectedYOffsetForRight.HasValue) + { + short num3 = tileTrack.FrontTrack(); + int num4 = Minecart.ConvertOffsetYToTrackConnectionValue(expectedYOffsetForRight.Value); + if (Minecart._rightSideConnection[(int) num3] != num4) + return false; + } + return true; + } + + public static void TryFittingTileOrientation( + Point tileCoords, + int? expectedYOffsetForLeft, + int? expectedYOffsetForRight) + { + int tilesSetLookupIndex = Minecart.GetNearbyTilesSetLookupIndex(tileCoords.X, tileCoords.Y); + int[] trackSwitchOption = Minecart._trackSwitchOptions[tilesSetLookupIndex]; + if (trackSwitchOption == null) + return; + Tile tileSafely = Framing.GetTileSafely(tileCoords); + int num1 = Minecart._trackType[(int) tileSafely.FrontTrack()]; + int? nullable = new int?(); + for (int index1 = 0; index1 < trackSwitchOption.Length; ++index1) + { + int index2 = trackSwitchOption[index1]; + int num2 = Minecart._leftSideConnection[index2]; + int num3 = Minecart._rightSideConnection[index2]; + int num4 = Minecart._trackType[index2]; + if (expectedYOffsetForLeft.HasValue) + { + int num5 = Minecart.ConvertOffsetYToTrackConnectionValue(expectedYOffsetForLeft.Value); + if (Minecart._leftSideConnection[index2] != num5) + continue; + } + if (expectedYOffsetForRight.HasValue) + { + int num6 = Minecart.ConvertOffsetYToTrackConnectionValue(expectedYOffsetForRight.Value); + if (Minecart._rightSideConnection[index2] != num6) + continue; + } + if (Minecart._trackType[index2] == num1) + { + nullable = new int?(index2); + break; + } + } + if (!nullable.HasValue) + return; + tileSafely.FrontTrack((short) nullable.Value); + NetMessage.SendTileSquare(-1, tileCoords.X, tileCoords.Y, 1); + } + + private static int ConvertOffsetYToTrackConnectionValue(int offsetY) + { + if (offsetY == -1) + return 0; + return offsetY != 1 ? 1 : 2; + } + + private static int ConvertTrackConnectionValueToOffsetY(int trackConnectionValue) + { + if (trackConnectionValue == 0) + return -1; + return trackConnectionValue != 2 ? 0 : 1; + } + + public static void WheelSparks( + Action DustAction, + Vector2 Position, + int Width, + int Height, + int sparkCount) + { + Vector2 vector2_1 = new Vector2((float) (Width / 2) - 25f, (float) (Height / 2)); + Vector2 vector2_2 = Position + vector2_1 + Minecart._trackMagnetOffset; + for (int index = 0; index < sparkCount; ++index) + DustAction(vector2_2); + } + + private static short FrontTrack(this Tile tileTrack) => tileTrack.frameX; + + private static void FrontTrack(this Tile tileTrack, short trackID) => tileTrack.frameX = trackID; + + private static short BackTrack(this Tile tileTrack) => tileTrack.frameY; + + private static void BackTrack(this Tile tileTrack, short trackID) => tileTrack.frameY = trackID; + + private enum TrackState + { + NoTrack = -1, // 0xFFFFFFFF + AboveTrack = 0, + OnTrack = 1, + BelowTrack = 2, + AboveFront = 3, + AboveBack = 4, + OnFront = 5, + OnBack = 6, + } + } +} diff --git a/Modules/AnchorDataModule.cs b/Modules/AnchorDataModule.cs new file mode 100644 index 0000000..353ff84 --- /dev/null +++ b/Modules/AnchorDataModule.cs @@ -0,0 +1,39 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.AnchorDataModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.DataStructures; + +namespace Terraria.Modules +{ + public class AnchorDataModule + { + public AnchorData top; + public AnchorData bottom; + public AnchorData left; + public AnchorData right; + public bool wall; + + public AnchorDataModule(AnchorDataModule copyFrom = null) + { + if (copyFrom == null) + { + this.top = new AnchorData(); + this.bottom = new AnchorData(); + this.left = new AnchorData(); + this.right = new AnchorData(); + this.wall = false; + } + else + { + this.top = copyFrom.top; + this.bottom = copyFrom.bottom; + this.left = copyFrom.left; + this.right = copyFrom.right; + this.wall = copyFrom.wall; + } + } + } +} diff --git a/Modules/AnchorTypesModule.cs b/Modules/AnchorTypesModule.cs new file mode 100644 index 0000000..62b0254 --- /dev/null +++ b/Modules/AnchorTypesModule.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.AnchorTypesModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Terraria.Modules +{ + public class AnchorTypesModule + { + public int[] tileValid; + public int[] tileInvalid; + public int[] tileAlternates; + public int[] wallValid; + + public AnchorTypesModule(AnchorTypesModule copyFrom = null) + { + if (copyFrom == null) + { + this.tileValid = (int[]) null; + this.tileInvalid = (int[]) null; + this.tileAlternates = (int[]) null; + this.wallValid = (int[]) null; + } + else + { + if (copyFrom.tileValid == null) + { + this.tileValid = (int[]) null; + } + else + { + this.tileValid = new int[copyFrom.tileValid.Length]; + Array.Copy((Array) copyFrom.tileValid, (Array) this.tileValid, this.tileValid.Length); + } + if (copyFrom.tileInvalid == null) + { + this.tileInvalid = (int[]) null; + } + else + { + this.tileInvalid = new int[copyFrom.tileInvalid.Length]; + Array.Copy((Array) copyFrom.tileInvalid, (Array) this.tileInvalid, this.tileInvalid.Length); + } + if (copyFrom.tileAlternates == null) + { + this.tileAlternates = (int[]) null; + } + else + { + this.tileAlternates = new int[copyFrom.tileAlternates.Length]; + Array.Copy((Array) copyFrom.tileAlternates, (Array) this.tileAlternates, this.tileAlternates.Length); + } + if (copyFrom.wallValid == null) + { + this.wallValid = (int[]) null; + } + else + { + this.wallValid = new int[copyFrom.wallValid.Length]; + Array.Copy((Array) copyFrom.wallValid, (Array) this.wallValid, this.wallValid.Length); + } + } + } + } +} diff --git a/Modules/LiquidDeathModule.cs b/Modules/LiquidDeathModule.cs new file mode 100644 index 0000000..b12fcf1 --- /dev/null +++ b/Modules/LiquidDeathModule.cs @@ -0,0 +1,28 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.LiquidDeathModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Modules +{ + public class LiquidDeathModule + { + public bool water; + public bool lava; + + public LiquidDeathModule(LiquidDeathModule copyFrom = null) + { + if (copyFrom == null) + { + this.water = false; + this.lava = false; + } + else + { + this.water = copyFrom.water; + this.lava = copyFrom.lava; + } + } + } +} diff --git a/Modules/LiquidPlacementModule.cs b/Modules/LiquidPlacementModule.cs new file mode 100644 index 0000000..496ca37 --- /dev/null +++ b/Modules/LiquidPlacementModule.cs @@ -0,0 +1,30 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.LiquidPlacementModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.Enums; + +namespace Terraria.Modules +{ + public class LiquidPlacementModule + { + public LiquidPlacement water; + public LiquidPlacement lava; + + public LiquidPlacementModule(LiquidPlacementModule copyFrom = null) + { + if (copyFrom == null) + { + this.water = LiquidPlacement.Allowed; + this.lava = LiquidPlacement.Allowed; + } + else + { + this.water = copyFrom.water; + this.lava = copyFrom.lava; + } + } + } +} diff --git a/Modules/TileObjectAlternatesModule.cs b/Modules/TileObjectAlternatesModule.cs new file mode 100644 index 0000000..c2fd248 --- /dev/null +++ b/Modules/TileObjectAlternatesModule.cs @@ -0,0 +1,32 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.TileObjectAlternatesModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using Terraria.ObjectData; + +namespace Terraria.Modules +{ + public class TileObjectAlternatesModule + { + public List data; + + public TileObjectAlternatesModule(TileObjectAlternatesModule copyFrom = null) + { + if (copyFrom == null) + this.data = (List) null; + else if (copyFrom.data == null) + { + this.data = (List) null; + } + else + { + this.data = new List(copyFrom.data.Count); + for (int index = 0; index < copyFrom.data.Count; ++index) + this.data.Add(new TileObjectData(copyFrom.data[index])); + } + } + } +} diff --git a/Modules/TileObjectBaseModule.cs b/Modules/TileObjectBaseModule.cs new file mode 100644 index 0000000..b41e160 --- /dev/null +++ b/Modules/TileObjectBaseModule.cs @@ -0,0 +1,43 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.TileObjectBaseModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.DataStructures; +using Terraria.Enums; + +namespace Terraria.Modules +{ + public class TileObjectBaseModule + { + public int width; + public int height; + public Point16 origin; + public TileObjectDirection direction; + public int randomRange; + public bool flattenAnchors; + + public TileObjectBaseModule(TileObjectBaseModule copyFrom = null) + { + if (copyFrom == null) + { + this.width = 1; + this.height = 1; + this.origin = Point16.Zero; + this.direction = TileObjectDirection.None; + this.randomRange = 0; + this.flattenAnchors = false; + } + else + { + this.width = copyFrom.width; + this.height = copyFrom.height; + this.origin = copyFrom.origin; + this.direction = copyFrom.direction; + this.randomRange = copyFrom.randomRange; + this.flattenAnchors = copyFrom.flattenAnchors; + } + } + } +} diff --git a/Modules/TileObjectCoordinatesModule.cs b/Modules/TileObjectCoordinatesModule.cs new file mode 100644 index 0000000..1da646f --- /dev/null +++ b/Modules/TileObjectCoordinatesModule.cs @@ -0,0 +1,62 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.TileObjectCoordinatesModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using Terraria.DataStructures; + +namespace Terraria.Modules +{ + public class TileObjectCoordinatesModule + { + public int width; + public int[] heights; + public int padding; + public Point16 paddingFix; + public int styleWidth; + public int styleHeight; + public bool calculated; + public int drawStyleOffset; + + public TileObjectCoordinatesModule(TileObjectCoordinatesModule copyFrom = null, int[] drawHeight = null) + { + if (copyFrom == null) + { + this.width = 0; + this.padding = 0; + this.paddingFix = Point16.Zero; + this.styleWidth = 0; + this.drawStyleOffset = 0; + this.styleHeight = 0; + this.calculated = false; + this.heights = drawHeight; + } + else + { + this.width = copyFrom.width; + this.padding = copyFrom.padding; + this.paddingFix = copyFrom.paddingFix; + this.drawStyleOffset = copyFrom.drawStyleOffset; + this.styleWidth = copyFrom.styleWidth; + this.styleHeight = copyFrom.styleHeight; + this.calculated = copyFrom.calculated; + if (drawHeight == null) + { + if (copyFrom.heights == null) + { + this.heights = (int[]) null; + } + else + { + this.heights = new int[copyFrom.heights.Length]; + Array.Copy((Array) copyFrom.heights, (Array) this.heights, this.heights.Length); + } + } + else + this.heights = drawHeight; + } + } + } +} diff --git a/Modules/TileObjectDrawModule.cs b/Modules/TileObjectDrawModule.cs new file mode 100644 index 0000000..6d46d1c --- /dev/null +++ b/Modules/TileObjectDrawModule.cs @@ -0,0 +1,37 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.TileObjectDrawModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Modules +{ + public class TileObjectDrawModule + { + public int xOffset; + public int yOffset; + public bool flipHorizontal; + public bool flipVertical; + public int stepDown; + + public TileObjectDrawModule(TileObjectDrawModule copyFrom = null) + { + if (copyFrom == null) + { + this.xOffset = 0; + this.yOffset = 0; + this.flipHorizontal = false; + this.flipVertical = false; + this.stepDown = 0; + } + else + { + this.xOffset = copyFrom.xOffset; + this.yOffset = copyFrom.yOffset; + this.flipHorizontal = copyFrom.flipHorizontal; + this.flipVertical = copyFrom.flipVertical; + this.stepDown = copyFrom.stepDown; + } + } + } +} diff --git a/Modules/TileObjectStyleModule.cs b/Modules/TileObjectStyleModule.cs new file mode 100644 index 0000000..d5e2e18 --- /dev/null +++ b/Modules/TileObjectStyleModule.cs @@ -0,0 +1,43 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.TileObjectStyleModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Modules +{ + public class TileObjectStyleModule + { + public int style; + public bool horizontal; + public int styleWrapLimit; + public int styleMultiplier; + public int styleLineSkip; + public int? styleWrapLimitVisualOverride; + public int? styleLineSkipVisualoverride; + + public TileObjectStyleModule(TileObjectStyleModule copyFrom = null) + { + if (copyFrom == null) + { + this.style = 0; + this.horizontal = false; + this.styleWrapLimit = 0; + this.styleWrapLimitVisualOverride = new int?(); + this.styleLineSkipVisualoverride = new int?(); + this.styleMultiplier = 1; + this.styleLineSkip = 1; + } + else + { + this.style = copyFrom.style; + this.horizontal = copyFrom.horizontal; + this.styleWrapLimit = copyFrom.styleWrapLimit; + this.styleMultiplier = copyFrom.styleMultiplier; + this.styleLineSkip = copyFrom.styleLineSkip; + this.styleWrapLimitVisualOverride = copyFrom.styleWrapLimitVisualOverride; + this.styleLineSkipVisualoverride = copyFrom.styleLineSkipVisualoverride; + } + } + } +} diff --git a/Modules/TileObjectSubTilesModule.cs b/Modules/TileObjectSubTilesModule.cs new file mode 100644 index 0000000..a26b894 --- /dev/null +++ b/Modules/TileObjectSubTilesModule.cs @@ -0,0 +1,32 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.TileObjectSubTilesModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using Terraria.ObjectData; + +namespace Terraria.Modules +{ + public class TileObjectSubTilesModule + { + public List data; + + public TileObjectSubTilesModule(TileObjectSubTilesModule copyFrom = null, List newData = null) + { + if (copyFrom == null) + this.data = (List) null; + else if (copyFrom.data == null) + { + this.data = (List) null; + } + else + { + this.data = new List(copyFrom.data.Count); + for (int index = 0; index < this.data.Count; ++index) + this.data.Add(new TileObjectData(copyFrom.data[index])); + } + } + } +} diff --git a/Modules/TilePlacementHooksModule.cs b/Modules/TilePlacementHooksModule.cs new file mode 100644 index 0000000..80c4d34 --- /dev/null +++ b/Modules/TilePlacementHooksModule.cs @@ -0,0 +1,36 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Modules.TilePlacementHooksModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.DataStructures; + +namespace Terraria.Modules +{ + public class TilePlacementHooksModule + { + public PlacementHook check; + public PlacementHook postPlaceEveryone; + public PlacementHook postPlaceMyPlayer; + public PlacementHook placeOverride; + + public TilePlacementHooksModule(TilePlacementHooksModule copyFrom = null) + { + if (copyFrom == null) + { + this.check = new PlacementHook(); + this.postPlaceEveryone = new PlacementHook(); + this.postPlaceMyPlayer = new PlacementHook(); + this.placeOverride = new PlacementHook(); + } + else + { + this.check = copyFrom.check; + this.postPlaceEveryone = copyFrom.postPlaceEveryone; + this.postPlaceMyPlayer = copyFrom.postPlaceMyPlayer; + this.placeOverride = copyFrom.placeOverride; + } + } + } +} diff --git a/Mount.cs b/Mount.cs new file mode 100644 index 0000000..5bab1e1 --- /dev/null +++ b/Mount.cs @@ -0,0 +1,4337 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Mount +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using System.Collections.Generic; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.GameContent.Achievements; +using Terraria.GameContent.Drawing; +using Terraria.Graphics.Shaders; +using Terraria.ID; + +namespace Terraria +{ + public class Mount + { + public static int currentShader = 0; + public const int FrameStanding = 0; + public const int FrameRunning = 1; + public const int FrameInAir = 2; + public const int FrameFlying = 3; + public const int FrameSwimming = 4; + public const int FrameDashing = 5; + public const int DrawBack = 0; + public const int DrawBackExtra = 1; + public const int DrawFront = 2; + public const int DrawFrontExtra = 3; + private static Mount.MountData[] mounts; + private static Vector2[] scutlixEyePositions; + private static Vector2 scutlixTextureSize; + public const int scutlixBaseDamage = 50; + public static Vector2 drillDiodePoint1 = new Vector2(36f, -6f); + public static Vector2 drillDiodePoint2 = new Vector2(36f, 8f); + public static Vector2 drillTextureSize; + public const int drillTextureWidth = 80; + public const float drillRotationChange = 0.05235988f; + public static int drillPickPower = 210; + public static int drillPickTime = 6; + public static int drillBeamCooldownMax = 1; + public const float maxDrillLength = 48f; + private static Vector2 santankTextureSize; + private Mount.MountData _data; + private int _type; + private bool _flipDraw; + private int _frame; + private float _frameCounter; + private int _frameExtra; + private float _frameExtraCounter; + private int _frameState; + private int _flyTime; + private int _idleTime; + private int _idleTimeNext; + private float _fatigue; + private float _fatigueMax; + private bool _abilityCharging; + private int _abilityCharge; + private int _abilityCooldown; + private int _abilityDuration; + private bool _abilityActive; + private bool _aiming; + public List _debugDraw; + private object _mountSpecificData; + private bool _active; + private Mount.MountDelegatesData _defaultDelegatesData = new Mount.MountDelegatesData(); + + private static void MeowcartLandingSound(Vector2 Position, int Width, int Height) => SoundEngine.PlaySound(37, (int) Position.X + Width / 2, (int) Position.Y + Height / 2, 5); + + private static void MeowcartBumperSound(Vector2 Position, int Width, int Height) => SoundEngine.PlaySound(37, (int) Position.X + Width / 2, (int) Position.Y + Height / 2, 3); + + public Mount() + { + this._debugDraw = new List(); + this.Reset(); + } + + public void Reset() + { + this._active = false; + this._type = -1; + this._flipDraw = false; + this._frame = 0; + this._frameCounter = 0.0f; + this._frameExtra = 0; + this._frameExtraCounter = 0.0f; + this._frameState = 0; + this._flyTime = 0; + this._idleTime = 0; + this._idleTimeNext = -1; + this._fatigueMax = 0.0f; + this._abilityCharging = false; + this._abilityCharge = 0; + this._aiming = false; + } + + public static void Initialize() + { + Mount.mounts = new Mount.MountData[MountID.Count]; + Mount.MountData mountData1 = new Mount.MountData(); + Mount.mounts[0] = mountData1; + mountData1.spawnDust = 57; + mountData1.spawnDustNoGravity = false; + mountData1.buff = 90; + mountData1.heightBoost = 20; + mountData1.flightTimeMax = 160; + mountData1.runSpeed = 5.5f; + mountData1.dashSpeed = 12f; + mountData1.acceleration = 0.09f; + mountData1.jumpHeight = 17; + mountData1.jumpSpeed = 5.31f; + mountData1.totalFrames = 12; + int[] numArray1 = new int[mountData1.totalFrames]; + for (int index = 0; index < numArray1.Length; ++index) + numArray1[index] = 30; + numArray1[1] += 2; + numArray1[11] += 2; + mountData1.playerYOffsets = numArray1; + mountData1.xOffset = 13; + mountData1.bodyFrame = 3; + mountData1.yOffset = -7; + mountData1.playerHeadOffset = 22; + mountData1.standingFrameCount = 1; + mountData1.standingFrameDelay = 12; + mountData1.standingFrameStart = 0; + mountData1.runningFrameCount = 6; + mountData1.runningFrameDelay = 12; + mountData1.runningFrameStart = 6; + mountData1.flyingFrameCount = 6; + mountData1.flyingFrameDelay = 6; + mountData1.flyingFrameStart = 6; + mountData1.inAirFrameCount = 1; + mountData1.inAirFrameDelay = 12; + mountData1.inAirFrameStart = 1; + mountData1.idleFrameCount = 4; + mountData1.idleFrameDelay = 30; + mountData1.idleFrameStart = 2; + mountData1.idleFrameLoop = true; + mountData1.swimFrameCount = mountData1.inAirFrameCount; + mountData1.swimFrameDelay = mountData1.inAirFrameDelay; + mountData1.swimFrameStart = mountData1.inAirFrameStart; + if (Main.netMode != 2) + { + mountData1.backTexture = TextureAssets.RudolphMount[0]; + mountData1.backTextureExtra = (Asset) Asset.Empty; + mountData1.frontTexture = TextureAssets.RudolphMount[1]; + mountData1.frontTextureExtra = TextureAssets.RudolphMount[2]; + mountData1.textureWidth = mountData1.backTexture.Width(); + mountData1.textureHeight = mountData1.backTexture.Height(); + } + Mount.MountData mountData2 = new Mount.MountData(); + Mount.mounts[2] = mountData2; + mountData2.spawnDust = 58; + mountData2.buff = 129; + mountData2.heightBoost = 20; + mountData2.flightTimeMax = 160; + mountData2.runSpeed = 5f; + mountData2.dashSpeed = 9f; + mountData2.acceleration = 0.08f; + mountData2.jumpHeight = 10; + mountData2.jumpSpeed = 6.01f; + mountData2.totalFrames = 16; + int[] numArray2 = new int[mountData2.totalFrames]; + for (int index = 0; index < numArray2.Length; ++index) + numArray2[index] = 22; + numArray2[12] += 2; + numArray2[13] += 4; + numArray2[14] += 2; + mountData2.playerYOffsets = numArray2; + mountData2.xOffset = 1; + mountData2.bodyFrame = 3; + mountData2.yOffset = 8; + mountData2.playerHeadOffset = 22; + mountData2.standingFrameCount = 1; + mountData2.standingFrameDelay = 12; + mountData2.standingFrameStart = 7; + mountData2.runningFrameCount = 5; + mountData2.runningFrameDelay = 12; + mountData2.runningFrameStart = 11; + mountData2.flyingFrameCount = 6; + mountData2.flyingFrameDelay = 6; + mountData2.flyingFrameStart = 1; + mountData2.inAirFrameCount = 1; + mountData2.inAirFrameDelay = 12; + mountData2.inAirFrameStart = 0; + mountData2.idleFrameCount = 3; + mountData2.idleFrameDelay = 30; + mountData2.idleFrameStart = 8; + mountData2.idleFrameLoop = false; + mountData2.swimFrameCount = mountData2.inAirFrameCount; + mountData2.swimFrameDelay = mountData2.inAirFrameDelay; + mountData2.swimFrameStart = mountData2.inAirFrameStart; + if (Main.netMode != 2) + { + mountData2.backTexture = TextureAssets.PigronMount; + mountData2.backTextureExtra = (Asset) Asset.Empty; + mountData2.frontTexture = (Asset) Asset.Empty; + mountData2.frontTextureExtra = (Asset) Asset.Empty; + mountData2.textureWidth = mountData2.backTexture.Width(); + mountData2.textureHeight = mountData2.backTexture.Height(); + } + Mount.MountData mountData3 = new Mount.MountData(); + Mount.mounts[1] = mountData3; + mountData3.spawnDust = 15; + mountData3.buff = 128; + mountData3.heightBoost = 20; + mountData3.flightTimeMax = 0; + mountData3.fallDamage = 0.8f; + mountData3.runSpeed = 4f; + mountData3.dashSpeed = 7.8f; + mountData3.acceleration = 0.13f; + mountData3.jumpHeight = 15; + mountData3.jumpSpeed = 5.01f; + mountData3.totalFrames = 7; + int[] numArray3 = new int[mountData3.totalFrames]; + for (int index = 0; index < numArray3.Length; ++index) + numArray3[index] = 14; + numArray3[2] += 2; + numArray3[3] += 4; + numArray3[4] += 8; + numArray3[5] += 8; + mountData3.playerYOffsets = numArray3; + mountData3.xOffset = 1; + mountData3.bodyFrame = 3; + mountData3.yOffset = 4; + mountData3.playerHeadOffset = 22; + mountData3.standingFrameCount = 1; + mountData3.standingFrameDelay = 12; + mountData3.standingFrameStart = 0; + mountData3.runningFrameCount = 7; + mountData3.runningFrameDelay = 12; + mountData3.runningFrameStart = 0; + mountData3.flyingFrameCount = 6; + mountData3.flyingFrameDelay = 6; + mountData3.flyingFrameStart = 1; + mountData3.inAirFrameCount = 1; + mountData3.inAirFrameDelay = 12; + mountData3.inAirFrameStart = 5; + mountData3.idleFrameCount = 0; + mountData3.idleFrameDelay = 0; + mountData3.idleFrameStart = 0; + mountData3.idleFrameLoop = false; + mountData3.swimFrameCount = mountData3.inAirFrameCount; + mountData3.swimFrameDelay = mountData3.inAirFrameDelay; + mountData3.swimFrameStart = mountData3.inAirFrameStart; + if (Main.netMode != 2) + { + mountData3.backTexture = TextureAssets.BunnyMount; + mountData3.backTextureExtra = (Asset) Asset.Empty; + mountData3.frontTexture = (Asset) Asset.Empty; + mountData3.frontTextureExtra = (Asset) Asset.Empty; + mountData3.textureWidth = mountData3.backTexture.Width(); + mountData3.textureHeight = mountData3.backTexture.Height(); + } + Mount.MountData mountData4 = new Mount.MountData(); + Mount.mounts[3] = mountData4; + mountData4.spawnDust = 56; + mountData4.buff = 130; + mountData4.heightBoost = 20; + mountData4.flightTimeMax = 0; + mountData4.fallDamage = 0.5f; + mountData4.runSpeed = 4f; + mountData4.dashSpeed = 4f; + mountData4.acceleration = 0.18f; + mountData4.jumpHeight = 12; + mountData4.jumpSpeed = 8.25f; + mountData4.constantJump = true; + mountData4.totalFrames = 4; + int[] numArray4 = new int[mountData4.totalFrames]; + for (int index = 0; index < numArray4.Length; ++index) + numArray4[index] = 20; + numArray4[1] += 2; + numArray4[3] -= 2; + mountData4.playerYOffsets = numArray4; + mountData4.xOffset = 1; + mountData4.bodyFrame = 3; + mountData4.yOffset = 11; + mountData4.playerHeadOffset = 22; + mountData4.standingFrameCount = 1; + mountData4.standingFrameDelay = 12; + mountData4.standingFrameStart = 0; + mountData4.runningFrameCount = 4; + mountData4.runningFrameDelay = 12; + mountData4.runningFrameStart = 0; + mountData4.flyingFrameCount = 0; + mountData4.flyingFrameDelay = 0; + mountData4.flyingFrameStart = 0; + mountData4.inAirFrameCount = 1; + mountData4.inAirFrameDelay = 12; + mountData4.inAirFrameStart = 1; + mountData4.idleFrameCount = 0; + mountData4.idleFrameDelay = 0; + mountData4.idleFrameStart = 0; + mountData4.idleFrameLoop = false; + if (Main.netMode != 2) + { + mountData4.backTexture = TextureAssets.SlimeMount; + mountData4.backTextureExtra = (Asset) Asset.Empty; + mountData4.frontTexture = (Asset) Asset.Empty; + mountData4.frontTextureExtra = (Asset) Asset.Empty; + mountData4.textureWidth = mountData4.backTexture.Width(); + mountData4.textureHeight = mountData4.backTexture.Height(); + } + Mount.MountData mountData5 = new Mount.MountData(); + Mount.mounts[6] = mountData5; + mountData5.Minecart = true; + mountData5.MinecartDirectional = true; + mountData5.delegations = new Mount.MountDelegatesData(); + mountData5.delegations.MinecartDust = new Action(DelegateMethods.Minecart.Sparks); + mountData5.spawnDust = 213; + mountData5.buff = 118; + mountData5.extraBuff = 138; + mountData5.heightBoost = 10; + mountData5.flightTimeMax = 0; + mountData5.fallDamage = 1f; + mountData5.runSpeed = 13f; + mountData5.dashSpeed = 13f; + mountData5.acceleration = 0.04f; + mountData5.jumpHeight = 15; + mountData5.jumpSpeed = 5.15f; + mountData5.blockExtraJumps = true; + mountData5.totalFrames = 3; + int[] numArray5 = new int[mountData5.totalFrames]; + for (int index = 0; index < numArray5.Length; ++index) + numArray5[index] = 8; + mountData5.playerYOffsets = numArray5; + mountData5.xOffset = 1; + mountData5.bodyFrame = 3; + mountData5.yOffset = 13; + mountData5.playerHeadOffset = 14; + mountData5.standingFrameCount = 1; + mountData5.standingFrameDelay = 12; + mountData5.standingFrameStart = 0; + mountData5.runningFrameCount = 3; + mountData5.runningFrameDelay = 12; + mountData5.runningFrameStart = 0; + mountData5.flyingFrameCount = 0; + mountData5.flyingFrameDelay = 0; + mountData5.flyingFrameStart = 0; + mountData5.inAirFrameCount = 0; + mountData5.inAirFrameDelay = 0; + mountData5.inAirFrameStart = 0; + mountData5.idleFrameCount = 0; + mountData5.idleFrameDelay = 0; + mountData5.idleFrameStart = 0; + mountData5.idleFrameLoop = false; + if (Main.netMode != 2) + { + mountData5.backTexture = (Asset) Asset.Empty; + mountData5.backTextureExtra = (Asset) Asset.Empty; + mountData5.frontTexture = TextureAssets.MinecartMount; + mountData5.frontTextureExtra = (Asset) Asset.Empty; + mountData5.textureWidth = mountData5.frontTexture.Width(); + mountData5.textureHeight = mountData5.frontTexture.Height(); + } + Mount.MountData newMount1 = new Mount.MountData(); + Mount.mounts[15] = newMount1; + Mount.SetAsMinecart(newMount1, 209, 208, TextureAssets.DesertMinecartMount); + Mount.MountData newMount2 = new Mount.MountData(); + Mount.mounts[18] = newMount2; + Mount.SetAsMinecart(newMount2, 221, 220, TextureAssets.Extra[108]); + Mount.MountData newMount3 = new Mount.MountData(); + Mount.mounts[19] = newMount3; + Mount.SetAsMinecart(newMount3, 223, 222, TextureAssets.Extra[109]); + Mount.MountData newMount4 = new Mount.MountData(); + Mount.mounts[20] = newMount4; + Mount.SetAsMinecart(newMount4, 225, 224, TextureAssets.Extra[110]); + Mount.MountData newMount5 = new Mount.MountData(); + Mount.mounts[21] = newMount5; + Mount.SetAsMinecart(newMount5, 227, 226, TextureAssets.Extra[111]); + Mount.MountData newMount6 = new Mount.MountData(); + Mount.mounts[22] = newMount6; + Mount.SetAsMinecart(newMount6, 229, 228, TextureAssets.Extra[112]); + Mount.MountData newMount7 = new Mount.MountData(); + Mount.mounts[24] = newMount7; + Mount.SetAsMinecart(newMount7, 232, 231, TextureAssets.Extra[115]); + newMount7.frontTextureGlow = TextureAssets.Extra[116]; + Mount.MountData newMount8 = new Mount.MountData(); + Mount.mounts[25] = newMount8; + Mount.SetAsMinecart(newMount8, 234, 233, TextureAssets.Extra[117]); + Mount.MountData newMount9 = new Mount.MountData(); + Mount.mounts[26] = newMount9; + Mount.SetAsMinecart(newMount9, 236, 235, TextureAssets.Extra[118]); + Mount.MountData newMount10 = new Mount.MountData(); + Mount.mounts[27] = newMount10; + Mount.SetAsMinecart(newMount10, 238, 237, TextureAssets.Extra[119]); + Mount.MountData newMount11 = new Mount.MountData(); + Mount.mounts[28] = newMount11; + Mount.SetAsMinecart(newMount11, 240, 239, TextureAssets.Extra[120]); + Mount.MountData newMount12 = new Mount.MountData(); + Mount.mounts[29] = newMount12; + Mount.SetAsMinecart(newMount12, 242, 241, TextureAssets.Extra[121]); + Mount.MountData newMount13 = new Mount.MountData(); + Mount.mounts[30] = newMount13; + Mount.SetAsMinecart(newMount13, 244, 243, TextureAssets.Extra[122]); + Mount.MountData newMount14 = new Mount.MountData(); + Mount.mounts[31] = newMount14; + Mount.SetAsMinecart(newMount14, 246, 245, TextureAssets.Extra[123]); + Mount.MountData newMount15 = new Mount.MountData(); + Mount.mounts[32] = newMount15; + Mount.SetAsMinecart(newMount15, 248, 247, TextureAssets.Extra[124]); + Mount.MountData newMount16 = new Mount.MountData(); + Mount.mounts[33] = newMount16; + Mount.SetAsMinecart(newMount16, 250, 249, TextureAssets.Extra[125]); + newMount16.delegations.MinecartDust = new Action(DelegateMethods.Minecart.SparksMeow); + newMount16.delegations.MinecartLandingSound = new Action(Mount.MeowcartLandingSound); + newMount16.delegations.MinecartBumperSound = new Action(Mount.MeowcartBumperSound); + Mount.MountData newMount17 = new Mount.MountData(); + Mount.mounts[34] = newMount17; + Mount.SetAsMinecart(newMount17, 252, 251, TextureAssets.Extra[126]); + Mount.MountData newMount18 = new Mount.MountData(); + Mount.mounts[35] = newMount18; + Mount.SetAsMinecart(newMount18, 254, 253, TextureAssets.Extra[(int) sbyte.MaxValue]); + Mount.MountData newMount19 = new Mount.MountData(); + Mount.mounts[36] = newMount19; + Mount.SetAsMinecart(newMount19, 256, (int) byte.MaxValue, TextureAssets.Extra[128]); + Mount.MountData newMount20 = new Mount.MountData(); + Mount.mounts[38] = newMount20; + Mount.SetAsMinecart(newMount20, 270, 269, TextureAssets.Extra[150]); + if (Main.netMode != 2) + newMount20.backTexture = newMount20.frontTexture; + Mount.MountData newMount21 = new Mount.MountData(); + Mount.mounts[39] = newMount21; + Mount.SetAsMinecart(newMount21, 273, 272, TextureAssets.Extra[155]); + newMount21.yOffset -= 2; + if (Main.netMode != 2) + newMount21.frontTextureExtra = TextureAssets.Extra[165]; + newMount21.runSpeed = 6f; + newMount21.dashSpeed = 6f; + newMount21.acceleration = 0.02f; + Mount.MountData mountData6 = new Mount.MountData(); + Mount.mounts[16] = mountData6; + mountData6.Minecart = true; + mountData6.delegations = new Mount.MountDelegatesData(); + mountData6.delegations.MinecartDust = new Action(DelegateMethods.Minecart.Sparks); + mountData6.spawnDust = 213; + mountData6.buff = 211; + mountData6.extraBuff = 210; + mountData6.heightBoost = 10; + mountData6.flightTimeMax = 0; + mountData6.fallDamage = 1f; + mountData6.runSpeed = 13f; + mountData6.dashSpeed = 13f; + mountData6.acceleration = 0.04f; + mountData6.jumpHeight = 15; + mountData6.jumpSpeed = 5.15f; + mountData6.blockExtraJumps = true; + mountData6.totalFrames = 3; + int[] numArray6 = new int[mountData6.totalFrames]; + for (int index = 0; index < numArray6.Length; ++index) + numArray6[index] = 8; + mountData6.playerYOffsets = numArray6; + mountData6.xOffset = 1; + mountData6.bodyFrame = 3; + mountData6.yOffset = 13; + mountData6.playerHeadOffset = 14; + mountData6.standingFrameCount = 1; + mountData6.standingFrameDelay = 12; + mountData6.standingFrameStart = 0; + mountData6.runningFrameCount = 3; + mountData6.runningFrameDelay = 12; + mountData6.runningFrameStart = 0; + mountData6.flyingFrameCount = 0; + mountData6.flyingFrameDelay = 0; + mountData6.flyingFrameStart = 0; + mountData6.inAirFrameCount = 0; + mountData6.inAirFrameDelay = 0; + mountData6.inAirFrameStart = 0; + mountData6.idleFrameCount = 0; + mountData6.idleFrameDelay = 0; + mountData6.idleFrameStart = 0; + mountData6.idleFrameLoop = false; + if (Main.netMode != 2) + { + mountData6.backTexture = (Asset) Asset.Empty; + mountData6.backTextureExtra = (Asset) Asset.Empty; + mountData6.frontTexture = TextureAssets.FishMinecartMount; + mountData6.frontTextureExtra = (Asset) Asset.Empty; + mountData6.textureWidth = mountData6.frontTexture.Width(); + mountData6.textureHeight = mountData6.frontTexture.Height(); + } + Mount.MountData mountData7 = new Mount.MountData(); + Mount.mounts[4] = mountData7; + mountData7.spawnDust = 56; + mountData7.buff = 131; + mountData7.heightBoost = 26; + mountData7.flightTimeMax = 0; + mountData7.fallDamage = 1f; + mountData7.runSpeed = 2f; + mountData7.dashSpeed = 2f; + mountData7.swimSpeed = 6f; + mountData7.acceleration = 0.08f; + mountData7.jumpHeight = 10; + mountData7.jumpSpeed = 3.15f; + mountData7.totalFrames = 12; + int[] numArray7 = new int[mountData7.totalFrames]; + for (int index = 0; index < numArray7.Length; ++index) + numArray7[index] = 26; + mountData7.playerYOffsets = numArray7; + mountData7.xOffset = 1; + mountData7.bodyFrame = 3; + mountData7.yOffset = 13; + mountData7.playerHeadOffset = 28; + mountData7.standingFrameCount = 1; + mountData7.standingFrameDelay = 12; + mountData7.standingFrameStart = 0; + mountData7.runningFrameCount = 6; + mountData7.runningFrameDelay = 12; + mountData7.runningFrameStart = 0; + mountData7.flyingFrameCount = 0; + mountData7.flyingFrameDelay = 0; + mountData7.flyingFrameStart = 0; + mountData7.inAirFrameCount = 1; + mountData7.inAirFrameDelay = 12; + mountData7.inAirFrameStart = 3; + mountData7.idleFrameCount = 0; + mountData7.idleFrameDelay = 0; + mountData7.idleFrameStart = 0; + mountData7.idleFrameLoop = false; + mountData7.swimFrameCount = 6; + mountData7.swimFrameDelay = 12; + mountData7.swimFrameStart = 6; + if (Main.netMode != 2) + { + mountData7.backTexture = TextureAssets.TurtleMount; + mountData7.backTextureExtra = (Asset) Asset.Empty; + mountData7.frontTexture = (Asset) Asset.Empty; + mountData7.frontTextureExtra = (Asset) Asset.Empty; + mountData7.textureWidth = mountData7.backTexture.Width(); + mountData7.textureHeight = mountData7.backTexture.Height(); + } + Mount.MountData mountData8 = new Mount.MountData(); + Mount.mounts[5] = mountData8; + mountData8.spawnDust = 152; + mountData8.buff = 132; + mountData8.heightBoost = 16; + mountData8.flightTimeMax = 320; + mountData8.fatigueMax = 320; + mountData8.fallDamage = 0.0f; + mountData8.usesHover = true; + mountData8.runSpeed = 2f; + mountData8.dashSpeed = 2f; + mountData8.acceleration = 0.16f; + mountData8.jumpHeight = 10; + mountData8.jumpSpeed = 4f; + mountData8.blockExtraJumps = true; + mountData8.totalFrames = 12; + int[] numArray8 = new int[mountData8.totalFrames]; + for (int index = 0; index < numArray8.Length; ++index) + numArray8[index] = 16; + numArray8[8] = 18; + mountData8.playerYOffsets = numArray8; + mountData8.xOffset = 1; + mountData8.bodyFrame = 3; + mountData8.yOffset = 4; + mountData8.playerHeadOffset = 18; + mountData8.standingFrameCount = 1; + mountData8.standingFrameDelay = 12; + mountData8.standingFrameStart = 0; + mountData8.runningFrameCount = 5; + mountData8.runningFrameDelay = 12; + mountData8.runningFrameStart = 0; + mountData8.flyingFrameCount = 3; + mountData8.flyingFrameDelay = 12; + mountData8.flyingFrameStart = 5; + mountData8.inAirFrameCount = 3; + mountData8.inAirFrameDelay = 12; + mountData8.inAirFrameStart = 5; + mountData8.idleFrameCount = 4; + mountData8.idleFrameDelay = 12; + mountData8.idleFrameStart = 8; + mountData8.idleFrameLoop = true; + mountData8.swimFrameCount = 0; + mountData8.swimFrameDelay = 12; + mountData8.swimFrameStart = 0; + if (Main.netMode != 2) + { + mountData8.backTexture = TextureAssets.BeeMount[0]; + mountData8.backTextureExtra = TextureAssets.BeeMount[1]; + mountData8.frontTexture = (Asset) Asset.Empty; + mountData8.frontTextureExtra = (Asset) Asset.Empty; + mountData8.textureWidth = mountData8.backTexture.Width(); + mountData8.textureHeight = mountData8.backTexture.Height(); + } + Mount.MountData mountData9 = new Mount.MountData(); + Mount.mounts[7] = mountData9; + mountData9.spawnDust = 226; + mountData9.spawnDustNoGravity = true; + mountData9.buff = 141; + mountData9.heightBoost = 16; + mountData9.flightTimeMax = 320; + mountData9.fatigueMax = 320; + mountData9.fallDamage = 0.0f; + mountData9.usesHover = true; + mountData9.runSpeed = 8f; + mountData9.dashSpeed = 8f; + mountData9.acceleration = 0.16f; + mountData9.jumpHeight = 10; + mountData9.jumpSpeed = 4f; + mountData9.blockExtraJumps = true; + mountData9.totalFrames = 8; + int[] numArray9 = new int[mountData9.totalFrames]; + for (int index = 0; index < numArray9.Length; ++index) + numArray9[index] = 16; + mountData9.playerYOffsets = numArray9; + mountData9.xOffset = 1; + mountData9.bodyFrame = 3; + mountData9.yOffset = 4; + mountData9.playerHeadOffset = 18; + mountData9.standingFrameCount = 8; + mountData9.standingFrameDelay = 4; + mountData9.standingFrameStart = 0; + mountData9.runningFrameCount = 8; + mountData9.runningFrameDelay = 4; + mountData9.runningFrameStart = 0; + mountData9.flyingFrameCount = 8; + mountData9.flyingFrameDelay = 4; + mountData9.flyingFrameStart = 0; + mountData9.inAirFrameCount = 8; + mountData9.inAirFrameDelay = 4; + mountData9.inAirFrameStart = 0; + mountData9.idleFrameCount = 0; + mountData9.idleFrameDelay = 12; + mountData9.idleFrameStart = 0; + mountData9.idleFrameLoop = true; + mountData9.swimFrameCount = 0; + mountData9.swimFrameDelay = 12; + mountData9.swimFrameStart = 0; + if (Main.netMode != 2) + { + mountData9.backTexture = (Asset) Asset.Empty; + mountData9.backTextureExtra = (Asset) Asset.Empty; + mountData9.frontTexture = TextureAssets.UfoMount[0]; + mountData9.frontTextureExtra = TextureAssets.UfoMount[1]; + mountData9.textureWidth = mountData9.frontTexture.Width(); + mountData9.textureHeight = mountData9.frontTexture.Height(); + } + Mount.MountData mountData10 = new Mount.MountData(); + Mount.mounts[8] = mountData10; + mountData10.spawnDust = 226; + mountData10.buff = 142; + mountData10.heightBoost = 16; + mountData10.flightTimeMax = 320; + mountData10.fatigueMax = 320; + mountData10.fallDamage = 1f; + mountData10.usesHover = true; + mountData10.swimSpeed = 4f; + mountData10.runSpeed = 6f; + mountData10.dashSpeed = 4f; + mountData10.acceleration = 0.16f; + mountData10.jumpHeight = 10; + mountData10.jumpSpeed = 4f; + mountData10.blockExtraJumps = true; + mountData10.emitsLight = true; + mountData10.lightColor = new Vector3(0.3f, 0.3f, 0.4f); + mountData10.totalFrames = 1; + int[] numArray10 = new int[mountData10.totalFrames]; + for (int index = 0; index < numArray10.Length; ++index) + numArray10[index] = 4; + mountData10.playerYOffsets = numArray10; + mountData10.xOffset = 1; + mountData10.bodyFrame = 3; + mountData10.yOffset = 4; + mountData10.playerHeadOffset = 18; + mountData10.standingFrameCount = 1; + mountData10.standingFrameDelay = 12; + mountData10.standingFrameStart = 0; + mountData10.runningFrameCount = 1; + mountData10.runningFrameDelay = 12; + mountData10.runningFrameStart = 0; + mountData10.flyingFrameCount = 1; + mountData10.flyingFrameDelay = 12; + mountData10.flyingFrameStart = 0; + mountData10.inAirFrameCount = 1; + mountData10.inAirFrameDelay = 12; + mountData10.inAirFrameStart = 0; + mountData10.idleFrameCount = 0; + mountData10.idleFrameDelay = 12; + mountData10.idleFrameStart = 8; + mountData10.swimFrameCount = 0; + mountData10.swimFrameDelay = 12; + mountData10.swimFrameStart = 0; + if (Main.netMode != 2) + { + mountData10.backTexture = TextureAssets.DrillMount[0]; + mountData10.backTextureGlow = TextureAssets.DrillMount[3]; + mountData10.backTextureExtra = (Asset) Asset.Empty; + mountData10.backTextureExtraGlow = (Asset) Asset.Empty; + mountData10.frontTexture = TextureAssets.DrillMount[1]; + mountData10.frontTextureGlow = TextureAssets.DrillMount[4]; + mountData10.frontTextureExtra = TextureAssets.DrillMount[2]; + mountData10.frontTextureExtraGlow = TextureAssets.DrillMount[5]; + mountData10.textureWidth = mountData10.frontTexture.Width(); + mountData10.textureHeight = mountData10.frontTexture.Height(); + } + Mount.drillTextureSize = new Vector2(80f, 80f); + Vector2 vector2_1 = new Vector2((float) mountData10.textureWidth, (float) (mountData10.textureHeight / mountData10.totalFrames)); + if (Mount.drillTextureSize != vector2_1) + throw new Exception("Be sure to update the Drill texture origin to match the actual texture size of " + (object) mountData10.textureWidth + ", " + (object) mountData10.textureHeight + "."); + Mount.MountData mountData11 = new Mount.MountData(); + Mount.mounts[9] = mountData11; + mountData11.spawnDust = 15; + mountData11.buff = 143; + mountData11.heightBoost = 16; + mountData11.flightTimeMax = 0; + mountData11.fatigueMax = 0; + mountData11.fallDamage = 0.0f; + mountData11.abilityChargeMax = 40; + mountData11.abilityCooldown = 20; + mountData11.abilityDuration = 0; + mountData11.runSpeed = 8f; + mountData11.dashSpeed = 8f; + mountData11.acceleration = 0.4f; + mountData11.jumpHeight = 22; + mountData11.jumpSpeed = 10.01f; + mountData11.blockExtraJumps = false; + mountData11.totalFrames = 12; + int[] numArray11 = new int[mountData11.totalFrames]; + for (int index = 0; index < numArray11.Length; ++index) + numArray11[index] = 16; + mountData11.playerYOffsets = numArray11; + mountData11.xOffset = 1; + mountData11.bodyFrame = 3; + mountData11.yOffset = 6; + mountData11.playerHeadOffset = 18; + mountData11.standingFrameCount = 6; + mountData11.standingFrameDelay = 12; + mountData11.standingFrameStart = 6; + mountData11.runningFrameCount = 6; + mountData11.runningFrameDelay = 12; + mountData11.runningFrameStart = 0; + mountData11.flyingFrameCount = 0; + mountData11.flyingFrameDelay = 12; + mountData11.flyingFrameStart = 0; + mountData11.inAirFrameCount = 1; + mountData11.inAirFrameDelay = 12; + mountData11.inAirFrameStart = 1; + mountData11.idleFrameCount = 0; + mountData11.idleFrameDelay = 12; + mountData11.idleFrameStart = 6; + mountData11.idleFrameLoop = true; + mountData11.swimFrameCount = 0; + mountData11.swimFrameDelay = 12; + mountData11.swimFrameStart = 0; + if (Main.netMode != 2) + { + mountData11.backTexture = TextureAssets.ScutlixMount[0]; + mountData11.backTextureExtra = (Asset) Asset.Empty; + mountData11.frontTexture = TextureAssets.ScutlixMount[1]; + mountData11.frontTextureExtra = TextureAssets.ScutlixMount[2]; + mountData11.textureWidth = mountData11.backTexture.Width(); + mountData11.textureHeight = mountData11.backTexture.Height(); + } + Mount.scutlixEyePositions = new Vector2[10]; + Mount.scutlixEyePositions[0] = new Vector2(60f, 2f); + Mount.scutlixEyePositions[1] = new Vector2(70f, 6f); + Mount.scutlixEyePositions[2] = new Vector2(68f, 6f); + Mount.scutlixEyePositions[3] = new Vector2(76f, 12f); + Mount.scutlixEyePositions[4] = new Vector2(80f, 10f); + Mount.scutlixEyePositions[5] = new Vector2(84f, 18f); + Mount.scutlixEyePositions[6] = new Vector2(74f, 20f); + Mount.scutlixEyePositions[7] = new Vector2(76f, 24f); + Mount.scutlixEyePositions[8] = new Vector2(70f, 34f); + Mount.scutlixEyePositions[9] = new Vector2(76f, 34f); + Mount.scutlixTextureSize = new Vector2(45f, 54f); + Vector2 vector2_2 = new Vector2((float) (mountData11.textureWidth / 2), (float) (mountData11.textureHeight / mountData11.totalFrames)); + if (Mount.scutlixTextureSize != vector2_2) + throw new Exception("Be sure to update the Scutlix texture origin to match the actual texture size of " + (object) mountData11.textureWidth + ", " + (object) mountData11.textureHeight + "."); + for (int index = 0; index < Mount.scutlixEyePositions.Length; ++index) + Mount.scutlixEyePositions[index] -= Mount.scutlixTextureSize; + Mount.MountData mountData12 = new Mount.MountData(); + Mount.mounts[10] = mountData12; + mountData12.spawnDust = 15; + mountData12.buff = 162; + mountData12.heightBoost = 34; + mountData12.flightTimeMax = 0; + mountData12.fallDamage = 0.2f; + mountData12.runSpeed = 4f; + mountData12.dashSpeed = 12f; + mountData12.acceleration = 0.3f; + mountData12.jumpHeight = 10; + mountData12.jumpSpeed = 8.01f; + mountData12.totalFrames = 16; + int[] numArray12 = new int[mountData12.totalFrames]; + for (int index = 0; index < numArray12.Length; ++index) + numArray12[index] = 28; + numArray12[3] += 2; + numArray12[4] += 2; + numArray12[7] += 2; + numArray12[8] += 2; + numArray12[12] += 2; + numArray12[13] += 2; + numArray12[15] += 4; + mountData12.playerYOffsets = numArray12; + mountData12.xOffset = 5; + mountData12.bodyFrame = 3; + mountData12.yOffset = 1; + mountData12.playerHeadOffset = 34; + mountData12.standingFrameCount = 1; + mountData12.standingFrameDelay = 12; + mountData12.standingFrameStart = 0; + mountData12.runningFrameCount = 7; + mountData12.runningFrameDelay = 15; + mountData12.runningFrameStart = 1; + mountData12.dashingFrameCount = 6; + mountData12.dashingFrameDelay = 40; + mountData12.dashingFrameStart = 9; + mountData12.flyingFrameCount = 6; + mountData12.flyingFrameDelay = 6; + mountData12.flyingFrameStart = 1; + mountData12.inAirFrameCount = 1; + mountData12.inAirFrameDelay = 12; + mountData12.inAirFrameStart = 15; + mountData12.idleFrameCount = 0; + mountData12.idleFrameDelay = 0; + mountData12.idleFrameStart = 0; + mountData12.idleFrameLoop = false; + mountData12.swimFrameCount = mountData12.inAirFrameCount; + mountData12.swimFrameDelay = mountData12.inAirFrameDelay; + mountData12.swimFrameStart = mountData12.inAirFrameStart; + if (Main.netMode != 2) + { + mountData12.backTexture = TextureAssets.UnicornMount; + mountData12.backTextureExtra = (Asset) Asset.Empty; + mountData12.frontTexture = (Asset) Asset.Empty; + mountData12.frontTextureExtra = (Asset) Asset.Empty; + mountData12.textureWidth = mountData12.backTexture.Width(); + mountData12.textureHeight = mountData12.backTexture.Height(); + } + Mount.MountData mountData13 = new Mount.MountData(); + Mount.mounts[11] = mountData13; + mountData13.Minecart = true; + mountData13.delegations = new Mount.MountDelegatesData(); + mountData13.delegations.MinecartDust = new Action(DelegateMethods.Minecart.SparksMech); + mountData13.spawnDust = 213; + mountData13.buff = 167; + mountData13.extraBuff = 166; + mountData13.heightBoost = 12; + mountData13.flightTimeMax = 0; + mountData13.fallDamage = 1f; + mountData13.runSpeed = 20f; + mountData13.dashSpeed = 20f; + mountData13.acceleration = 0.1f; + mountData13.jumpHeight = 15; + mountData13.jumpSpeed = 5.15f; + mountData13.blockExtraJumps = true; + mountData13.totalFrames = 3; + int[] numArray13 = new int[mountData13.totalFrames]; + for (int index = 0; index < numArray13.Length; ++index) + numArray13[index] = 9; + mountData13.playerYOffsets = numArray13; + mountData13.xOffset = -1; + mountData13.bodyFrame = 3; + mountData13.yOffset = 11; + mountData13.playerHeadOffset = 14; + mountData13.standingFrameCount = 1; + mountData13.standingFrameDelay = 12; + mountData13.standingFrameStart = 0; + mountData13.runningFrameCount = 3; + mountData13.runningFrameDelay = 12; + mountData13.runningFrameStart = 0; + mountData13.flyingFrameCount = 0; + mountData13.flyingFrameDelay = 0; + mountData13.flyingFrameStart = 0; + mountData13.inAirFrameCount = 0; + mountData13.inAirFrameDelay = 0; + mountData13.inAirFrameStart = 0; + mountData13.idleFrameCount = 0; + mountData13.idleFrameDelay = 0; + mountData13.idleFrameStart = 0; + mountData13.idleFrameLoop = false; + if (Main.netMode != 2) + { + mountData13.backTexture = (Asset) Asset.Empty; + mountData13.backTextureExtra = (Asset) Asset.Empty; + mountData13.frontTexture = TextureAssets.MinecartMechMount[0]; + mountData13.frontTextureGlow = TextureAssets.MinecartMechMount[1]; + mountData13.frontTextureExtra = (Asset) Asset.Empty; + mountData13.textureWidth = mountData13.frontTexture.Width(); + mountData13.textureHeight = mountData13.frontTexture.Height(); + } + Mount.MountData mountData14 = new Mount.MountData(); + Mount.mounts[12] = mountData14; + mountData14.spawnDust = 15; + mountData14.buff = 168; + mountData14.heightBoost = 14; + mountData14.flightTimeMax = 320; + mountData14.fatigueMax = 320; + mountData14.fallDamage = 0.0f; + mountData14.usesHover = true; + mountData14.runSpeed = 2f; + mountData14.dashSpeed = 1f; + mountData14.acceleration = 0.2f; + mountData14.jumpHeight = 4; + mountData14.jumpSpeed = 3f; + mountData14.swimSpeed = 16f; + mountData14.blockExtraJumps = true; + mountData14.totalFrames = 23; + int[] numArray14 = new int[mountData14.totalFrames]; + for (int index = 0; index < numArray14.Length; ++index) + numArray14[index] = 12; + mountData14.playerYOffsets = numArray14; + mountData14.xOffset = 2; + mountData14.bodyFrame = 3; + mountData14.yOffset = 16; + mountData14.playerHeadOffset = 16; + mountData14.standingFrameCount = 1; + mountData14.standingFrameDelay = 12; + mountData14.standingFrameStart = 8; + mountData14.runningFrameCount = 7; + mountData14.runningFrameDelay = 14; + mountData14.runningFrameStart = 8; + mountData14.flyingFrameCount = 8; + mountData14.flyingFrameDelay = 16; + mountData14.flyingFrameStart = 0; + mountData14.inAirFrameCount = 8; + mountData14.inAirFrameDelay = 6; + mountData14.inAirFrameStart = 0; + mountData14.idleFrameCount = 0; + mountData14.idleFrameDelay = 0; + mountData14.idleFrameStart = 0; + mountData14.idleFrameLoop = false; + mountData14.swimFrameCount = 8; + mountData14.swimFrameDelay = 4; + mountData14.swimFrameStart = 15; + if (Main.netMode != 2) + { + mountData14.backTexture = TextureAssets.CuteFishronMount[0]; + mountData14.backTextureGlow = TextureAssets.CuteFishronMount[1]; + mountData14.frontTexture = (Asset) Asset.Empty; + mountData14.frontTextureExtra = (Asset) Asset.Empty; + mountData14.textureWidth = mountData14.backTexture.Width(); + mountData14.textureHeight = mountData14.backTexture.Height(); + } + Mount.MountData mountData15 = new Mount.MountData(); + Mount.mounts[13] = mountData15; + mountData15.Minecart = true; + mountData15.MinecartDirectional = true; + mountData15.delegations = new Mount.MountDelegatesData(); + mountData15.delegations.MinecartDust = new Action(DelegateMethods.Minecart.Sparks); + mountData15.spawnDust = 213; + mountData15.buff = 184; + mountData15.extraBuff = 185; + mountData15.heightBoost = 10; + mountData15.flightTimeMax = 0; + mountData15.fallDamage = 1f; + mountData15.runSpeed = 10f; + mountData15.dashSpeed = 10f; + mountData15.acceleration = 0.03f; + mountData15.jumpHeight = 12; + mountData15.jumpSpeed = 5.15f; + mountData15.blockExtraJumps = true; + mountData15.totalFrames = 3; + int[] numArray15 = new int[mountData15.totalFrames]; + for (int index = 0; index < numArray15.Length; ++index) + numArray15[index] = 8; + mountData15.playerYOffsets = numArray15; + mountData15.xOffset = 1; + mountData15.bodyFrame = 3; + mountData15.yOffset = 13; + mountData15.playerHeadOffset = 14; + mountData15.standingFrameCount = 1; + mountData15.standingFrameDelay = 12; + mountData15.standingFrameStart = 0; + mountData15.runningFrameCount = 3; + mountData15.runningFrameDelay = 12; + mountData15.runningFrameStart = 0; + mountData15.flyingFrameCount = 0; + mountData15.flyingFrameDelay = 0; + mountData15.flyingFrameStart = 0; + mountData15.inAirFrameCount = 0; + mountData15.inAirFrameDelay = 0; + mountData15.inAirFrameStart = 0; + mountData15.idleFrameCount = 0; + mountData15.idleFrameDelay = 0; + mountData15.idleFrameStart = 0; + mountData15.idleFrameLoop = false; + if (Main.netMode != 2) + { + mountData15.backTexture = (Asset) Asset.Empty; + mountData15.backTextureExtra = (Asset) Asset.Empty; + mountData15.frontTexture = TextureAssets.MinecartWoodMount; + mountData15.frontTextureExtra = (Asset) Asset.Empty; + mountData15.textureWidth = mountData15.frontTexture.Width(); + mountData15.textureHeight = mountData15.frontTexture.Height(); + } + Mount.MountData mountData16 = new Mount.MountData(); + Mount.mounts[14] = mountData16; + mountData16.spawnDust = 15; + mountData16.buff = 193; + mountData16.heightBoost = 8; + mountData16.flightTimeMax = 0; + mountData16.fallDamage = 0.2f; + mountData16.runSpeed = 8f; + mountData16.acceleration = 0.25f; + mountData16.jumpHeight = 20; + mountData16.jumpSpeed = 8.01f; + mountData16.totalFrames = 8; + int[] numArray16 = new int[mountData16.totalFrames]; + for (int index = 0; index < numArray16.Length; ++index) + numArray16[index] = 8; + numArray16[1] += 2; + numArray16[3] += 2; + numArray16[6] += 2; + mountData16.playerYOffsets = numArray16; + mountData16.xOffset = 4; + mountData16.bodyFrame = 3; + mountData16.yOffset = 9; + mountData16.playerHeadOffset = 10; + mountData16.standingFrameCount = 1; + mountData16.standingFrameDelay = 12; + mountData16.standingFrameStart = 0; + mountData16.runningFrameCount = 6; + mountData16.runningFrameDelay = 30; + mountData16.runningFrameStart = 2; + mountData16.inAirFrameCount = 1; + mountData16.inAirFrameDelay = 12; + mountData16.inAirFrameStart = 1; + mountData16.idleFrameCount = 0; + mountData16.idleFrameDelay = 0; + mountData16.idleFrameStart = 0; + mountData16.idleFrameLoop = false; + mountData16.swimFrameCount = mountData16.inAirFrameCount; + mountData16.swimFrameDelay = mountData16.inAirFrameDelay; + mountData16.swimFrameStart = mountData16.inAirFrameStart; + if (Main.netMode != 2) + { + mountData16.backTexture = TextureAssets.BasiliskMount; + mountData16.backTextureExtra = (Asset) Asset.Empty; + mountData16.frontTexture = (Asset) Asset.Empty; + mountData16.frontTextureExtra = (Asset) Asset.Empty; + mountData16.textureWidth = mountData16.backTexture.Width(); + mountData16.textureHeight = mountData16.backTexture.Height(); + } + Mount.MountData mountData17 = new Mount.MountData(); + Mount.mounts[17] = mountData17; + mountData17.spawnDust = 15; + mountData17.buff = 212; + mountData17.heightBoost = 16; + mountData17.flightTimeMax = 0; + mountData17.fallDamage = 0.2f; + mountData17.runSpeed = 8f; + mountData17.acceleration = 0.25f; + mountData17.jumpHeight = 20; + mountData17.jumpSpeed = 8.01f; + mountData17.totalFrames = 4; + int[] numArray17 = new int[mountData17.totalFrames]; + for (int index = 0; index < numArray17.Length; ++index) + numArray17[index] = 8; + mountData17.playerYOffsets = numArray17; + mountData17.xOffset = 2; + mountData17.bodyFrame = 3; + mountData17.yOffset = 17 - mountData17.heightBoost; + mountData17.playerHeadOffset = 18; + mountData17.standingFrameCount = 1; + mountData17.standingFrameDelay = 12; + mountData17.standingFrameStart = 0; + mountData17.runningFrameCount = 4; + mountData17.runningFrameDelay = 12; + mountData17.runningFrameStart = 0; + mountData17.inAirFrameCount = 1; + mountData17.inAirFrameDelay = 12; + mountData17.inAirFrameStart = 1; + mountData17.idleFrameCount = 0; + mountData17.idleFrameDelay = 0; + mountData17.idleFrameStart = 0; + mountData17.idleFrameLoop = false; + mountData17.swimFrameCount = mountData17.inAirFrameCount; + mountData17.swimFrameDelay = mountData17.inAirFrameDelay; + mountData17.swimFrameStart = mountData17.inAirFrameStart; + if (Main.netMode != 2) + { + mountData17.backTexture = TextureAssets.Extra[97]; + mountData17.backTextureExtra = TextureAssets.Extra[96]; + mountData17.frontTexture = (Asset) Asset.Empty; + mountData17.frontTextureExtra = (Asset) Asset.Empty; + mountData17.textureWidth = mountData17.backTextureExtra.Width(); + mountData17.textureHeight = mountData17.backTextureExtra.Height(); + } + Mount.MountData mountData18 = new Mount.MountData(); + Mount.mounts[23] = mountData18; + mountData18.spawnDust = 43; + mountData18.spawnDustNoGravity = true; + mountData18.buff = 230; + mountData18.heightBoost = 0; + mountData18.flightTimeMax = 320; + mountData18.fatigueMax = 320; + mountData18.fallDamage = 0.0f; + mountData18.usesHover = true; + mountData18.runSpeed = 8f; + mountData18.dashSpeed = 8f; + mountData18.acceleration = 0.16f; + mountData18.jumpHeight = 10; + mountData18.jumpSpeed = 4f; + mountData18.blockExtraJumps = true; + mountData18.totalFrames = 6; + int[] numArray18 = new int[mountData18.totalFrames]; + for (int index = 0; index < numArray18.Length; ++index) + numArray18[index] = 6; + mountData18.playerYOffsets = numArray18; + mountData18.xOffset = -2; + mountData18.bodyFrame = 0; + mountData18.yOffset = 8; + mountData18.playerHeadOffset = 0; + mountData18.standingFrameCount = 1; + mountData18.standingFrameDelay = 0; + mountData18.standingFrameStart = 0; + mountData18.runningFrameCount = 1; + mountData18.runningFrameDelay = 0; + mountData18.runningFrameStart = 0; + mountData18.flyingFrameCount = 1; + mountData18.flyingFrameDelay = 0; + mountData18.flyingFrameStart = 0; + mountData18.inAirFrameCount = 6; + mountData18.inAirFrameDelay = 8; + mountData18.inAirFrameStart = 0; + mountData18.idleFrameCount = 0; + mountData18.idleFrameDelay = 0; + mountData18.idleFrameStart = 0; + mountData18.idleFrameLoop = true; + mountData18.swimFrameCount = 0; + mountData18.swimFrameDelay = 0; + mountData18.swimFrameStart = 0; + if (Main.netMode != 2) + { + mountData18.backTexture = TextureAssets.Extra[113]; + mountData18.backTextureExtra = (Asset) Asset.Empty; + mountData18.frontTexture = (Asset) Asset.Empty; + mountData18.frontTextureExtra = (Asset) Asset.Empty; + mountData18.textureWidth = mountData18.backTexture.Width(); + mountData18.textureHeight = mountData18.backTexture.Height(); + } + Mount.MountData mountData19 = new Mount.MountData(); + Mount.mounts[37] = mountData19; + mountData19.spawnDust = 282; + mountData19.buff = 265; + mountData19.heightBoost = 12; + mountData19.flightTimeMax = 0; + mountData19.fallDamage = 0.2f; + mountData19.runSpeed = 7.5f; + mountData19.acceleration = 0.15f; + mountData19.jumpHeight = 14; + mountData19.jumpSpeed = 6.01f; + mountData19.totalFrames = 10; + int[] numArray19 = new int[mountData19.totalFrames]; + for (int index = 0; index < numArray19.Length; ++index) + numArray19[index] = 20; + mountData19.playerYOffsets = numArray19; + mountData19.xOffset = 5; + mountData19.bodyFrame = 4; + mountData19.yOffset = 1; + mountData19.playerHeadOffset = 20; + mountData19.standingFrameCount = 1; + mountData19.standingFrameDelay = 12; + mountData19.standingFrameStart = 0; + mountData19.runningFrameCount = 7; + mountData19.runningFrameDelay = 20; + mountData19.runningFrameStart = 2; + mountData19.inAirFrameCount = 1; + mountData19.inAirFrameDelay = 12; + mountData19.inAirFrameStart = 1; + mountData19.idleFrameCount = 0; + mountData19.idleFrameDelay = 0; + mountData19.idleFrameStart = 0; + mountData19.idleFrameLoop = false; + mountData19.swimFrameCount = mountData19.runningFrameCount; + mountData19.swimFrameDelay = 10; + mountData19.swimFrameStart = mountData19.runningFrameStart; + if (Main.netMode != 2) + { + mountData19.backTexture = TextureAssets.Extra[149]; + mountData19.backTextureExtra = (Asset) Asset.Empty; + mountData19.frontTexture = (Asset) Asset.Empty; + mountData19.frontTextureExtra = (Asset) Asset.Empty; + mountData19.textureWidth = mountData19.backTexture.Width(); + mountData19.textureHeight = mountData19.backTexture.Height(); + } + Mount.MountData newMount22 = new Mount.MountData(); + Mount.mounts[40] = newMount22; + Mount.SetAsHorse(newMount22, 275, TextureAssets.Extra[161]); + Mount.MountData newMount23 = new Mount.MountData(); + Mount.mounts[41] = newMount23; + Mount.SetAsHorse(newMount23, 276, TextureAssets.Extra[162]); + Mount.MountData newMount24 = new Mount.MountData(); + Mount.mounts[42] = newMount24; + Mount.SetAsHorse(newMount24, 277, TextureAssets.Extra[163]); + Mount.MountData mountData20 = new Mount.MountData(); + Mount.mounts[43] = mountData20; + mountData20.spawnDust = 15; + mountData20.buff = 278; + mountData20.heightBoost = 12; + mountData20.flightTimeMax = 0; + mountData20.fallDamage = 0.4f; + mountData20.runSpeed = 5f; + mountData20.acceleration = 0.1f; + mountData20.jumpHeight = 8; + mountData20.jumpSpeed = 8f; + mountData20.constantJump = true; + mountData20.totalFrames = 4; + int[] numArray20 = new int[mountData20.totalFrames]; + for (int index = 0; index < numArray20.Length; ++index) + numArray20[index] = 14; + mountData20.playerYOffsets = numArray20; + mountData20.xOffset = 5; + mountData20.bodyFrame = 4; + mountData20.yOffset = 10; + mountData20.playerHeadOffset = 10; + mountData20.standingFrameCount = 1; + mountData20.standingFrameDelay = 5; + mountData20.standingFrameStart = 0; + mountData20.runningFrameCount = 4; + mountData20.runningFrameDelay = 5; + mountData20.runningFrameStart = 0; + mountData20.inAirFrameCount = 1; + mountData20.inAirFrameDelay = 5; + mountData20.inAirFrameStart = 0; + mountData20.idleFrameCount = 0; + mountData20.idleFrameDelay = 0; + mountData20.idleFrameStart = 0; + mountData20.idleFrameLoop = false; + mountData20.swimFrameCount = 1; + mountData20.swimFrameDelay = 5; + mountData20.swimFrameStart = 0; + if (Main.netMode != 2) + { + mountData20.backTexture = (Asset) Asset.Empty; + mountData20.backTextureExtra = (Asset) Asset.Empty; + mountData20.frontTexture = TextureAssets.Extra[164]; + mountData20.frontTextureExtra = (Asset) Asset.Empty; + mountData20.textureWidth = mountData20.frontTexture.Width(); + mountData20.textureHeight = mountData20.frontTexture.Height(); + } + Mount.MountData mountData21 = new Mount.MountData(); + Mount.mounts[44] = mountData21; + mountData21.spawnDust = 228; + mountData21.buff = 279; + mountData21.heightBoost = 24; + mountData21.flightTimeMax = 320; + mountData21.fatigueMax = 320; + mountData21.fallDamage = 0.0f; + mountData21.usesHover = true; + mountData21.runSpeed = 8f; + mountData21.dashSpeed = 16f; + mountData21.acceleration = 0.1f; + mountData21.jumpHeight = 3; + mountData21.jumpSpeed = 1f; + mountData21.swimSpeed = mountData21.runSpeed; + mountData21.blockExtraJumps = true; + mountData21.totalFrames = 10; + int[] numArray21 = new int[mountData21.totalFrames]; + for (int index = 0; index < numArray21.Length; ++index) + numArray21[index] = 9; + mountData21.playerYOffsets = numArray21; + mountData21.xOffset = 0; + mountData21.bodyFrame = 3; + mountData21.yOffset = 8; + mountData21.playerHeadOffset = 16; + mountData21.runningFrameCount = 10; + mountData21.runningFrameDelay = 8; + mountData21.runningFrameStart = 0; + if (Main.netMode != 2) + { + mountData21.backTexture = (Asset) Asset.Empty; + mountData21.backTextureExtra = (Asset) Asset.Empty; + mountData21.frontTexture = TextureAssets.Extra[166]; + mountData21.frontTextureExtra = (Asset) Asset.Empty; + mountData21.textureWidth = mountData21.frontTexture.Width(); + mountData21.textureHeight = mountData21.frontTexture.Height(); + } + Mount.MountData mountData22 = new Mount.MountData(); + Mount.mounts[45] = mountData22; + mountData22.spawnDust = 6; + mountData22.buff = 280; + mountData22.heightBoost = 25; + mountData22.flightTimeMax = 0; + mountData22.fallDamage = 0.1f; + mountData22.runSpeed = 12f; + mountData22.dashSpeed = 16f; + mountData22.acceleration = 0.5f; + mountData22.jumpHeight = 14; + mountData22.jumpSpeed = 7f; + mountData22.emitsLight = true; + mountData22.lightColor = new Vector3(0.6f, 0.4f, 0.35f); + mountData22.totalFrames = 8; + int[] numArray22 = new int[mountData22.totalFrames]; + for (int index = 0; index < numArray22.Length; ++index) + numArray22[index] = 30; + mountData22.playerYOffsets = numArray22; + mountData22.xOffset = 0; + mountData22.bodyFrame = 0; + mountData22.xOffset = 2; + mountData22.yOffset = 1; + mountData22.playerHeadOffset = 20; + mountData22.standingFrameCount = 1; + mountData22.standingFrameDelay = 20; + mountData22.standingFrameStart = 0; + mountData22.runningFrameCount = 6; + mountData22.runningFrameDelay = 20; + mountData22.runningFrameStart = 2; + mountData22.inAirFrameCount = 1; + mountData22.inAirFrameDelay = 20; + mountData22.inAirFrameStart = 1; + mountData22.swimFrameCount = mountData22.runningFrameCount; + mountData22.swimFrameDelay = 20; + mountData22.swimFrameStart = mountData22.runningFrameStart; + if (Main.netMode != 2) + { + mountData22.backTexture = TextureAssets.Extra[167]; + mountData22.backTextureGlow = TextureAssets.GlowMask[283]; + mountData22.frontTexture = (Asset) Asset.Empty; + mountData22.frontTextureExtra = (Asset) Asset.Empty; + mountData22.textureWidth = mountData22.backTexture.Width(); + mountData22.textureHeight = mountData22.backTexture.Height(); + } + Mount.MountData mountData23 = new Mount.MountData(); + Mount.mounts[46] = mountData23; + mountData23.spawnDust = 15; + mountData23.buff = 281; + mountData23.heightBoost = 0; + mountData23.flightTimeMax = 0; + mountData23.fatigueMax = 0; + mountData23.fallDamage = 0.0f; + mountData23.abilityChargeMax = 40; + mountData23.abilityCooldown = 40; + mountData23.abilityDuration = 0; + mountData23.runSpeed = 8f; + mountData23.dashSpeed = 8f; + mountData23.acceleration = 0.4f; + mountData23.jumpHeight = 8; + mountData23.jumpSpeed = 9.01f; + mountData23.blockExtraJumps = false; + mountData23.totalFrames = 27; + int[] numArray23 = new int[mountData23.totalFrames]; + for (int index = 0; index < numArray23.Length; ++index) + { + numArray23[index] = 4; + if (index == 1 || index == 2 || index == 7 || index == 8) + numArray23[index] += 2; + } + mountData23.playerYOffsets = numArray23; + mountData23.xOffset = 1; + mountData23.bodyFrame = 3; + mountData23.yOffset = 1; + mountData23.playerHeadOffset = 2; + mountData23.standingFrameCount = 1; + mountData23.standingFrameDelay = 12; + mountData23.standingFrameStart = 0; + mountData23.runningFrameCount = 11; + mountData23.runningFrameDelay = 12; + mountData23.runningFrameStart = 0; + mountData23.inAirFrameCount = 11; + mountData23.inAirFrameDelay = 12; + mountData23.inAirFrameStart = 1; + mountData23.swimFrameCount = mountData23.runningFrameCount; + mountData23.swimFrameDelay = mountData23.runningFrameDelay; + mountData23.swimFrameStart = mountData23.runningFrameStart; + Mount.santankTextureSize = new Vector2(23f, 2f); + if (Main.netMode != 2) + { + mountData23.backTexture = (Asset) Asset.Empty; + mountData23.backTextureExtra = (Asset) Asset.Empty; + mountData23.frontTexture = TextureAssets.Extra[168]; + mountData23.frontTextureExtra = TextureAssets.Extra[168]; + mountData23.textureWidth = mountData23.frontTexture.Width(); + mountData23.textureHeight = mountData23.frontTexture.Height(); + } + Mount.MountData mountData24 = new Mount.MountData(); + Mount.mounts[47] = mountData24; + mountData24.spawnDust = 5; + mountData24.buff = 282; + mountData24.heightBoost = 34; + mountData24.flightTimeMax = 0; + mountData24.fallDamage = 0.2f; + mountData24.runSpeed = 4f; + mountData24.dashSpeed = 12f; + mountData24.acceleration = 0.3f; + mountData24.jumpHeight = 10; + mountData24.jumpSpeed = 8.01f; + mountData24.totalFrames = 16; + int[] numArray24 = new int[mountData24.totalFrames]; + for (int index = 0; index < numArray24.Length; ++index) + numArray24[index] = 30; + numArray24[3] += 2; + numArray24[4] += 2; + numArray24[7] += 2; + numArray24[8] += 2; + numArray24[12] += 2; + numArray24[13] += 2; + numArray24[15] += 4; + mountData24.playerYOffsets = numArray24; + mountData24.xOffset = 5; + mountData24.bodyFrame = 3; + mountData24.yOffset = -1; + mountData24.playerHeadOffset = 34; + mountData24.standingFrameCount = 1; + mountData24.standingFrameDelay = 12; + mountData24.standingFrameStart = 0; + mountData24.runningFrameCount = 7; + mountData24.runningFrameDelay = 15; + mountData24.runningFrameStart = 1; + mountData24.dashingFrameCount = 6; + mountData24.dashingFrameDelay = 40; + mountData24.dashingFrameStart = 9; + mountData24.flyingFrameCount = 6; + mountData24.flyingFrameDelay = 6; + mountData24.flyingFrameStart = 1; + mountData24.inAirFrameCount = 1; + mountData24.inAirFrameDelay = 12; + mountData24.inAirFrameStart = 15; + mountData24.idleFrameCount = 0; + mountData24.idleFrameDelay = 0; + mountData24.idleFrameStart = 0; + mountData24.idleFrameLoop = false; + mountData24.swimFrameCount = mountData24.inAirFrameCount; + mountData24.swimFrameDelay = mountData24.inAirFrameDelay; + mountData24.swimFrameStart = mountData24.inAirFrameStart; + if (Main.netMode != 2) + { + mountData24.backTexture = TextureAssets.Extra[169]; + mountData24.backTextureGlow = TextureAssets.GlowMask[284]; + mountData24.frontTexture = (Asset) Asset.Empty; + mountData24.frontTextureExtra = (Asset) Asset.Empty; + mountData24.textureWidth = mountData24.backTexture.Width(); + mountData24.textureHeight = mountData24.backTexture.Height(); + } + Mount.MountData mountData25 = new Mount.MountData(); + Mount.mounts[48] = mountData25; + mountData25.spawnDust = 62; + mountData25.buff = 283; + mountData25.heightBoost = 14; + mountData25.flightTimeMax = 320; + mountData25.fallDamage = 0.0f; + mountData25.usesHover = true; + mountData25.runSpeed = 8f; + mountData25.dashSpeed = 8f; + mountData25.acceleration = 0.2f; + mountData25.jumpHeight = 5; + mountData25.jumpSpeed = 6f; + mountData25.swimSpeed = mountData25.runSpeed; + mountData25.totalFrames = 6; + int[] numArray25 = new int[mountData25.totalFrames]; + for (int index = 0; index < numArray25.Length; ++index) + numArray25[index] = 9; + numArray25[0] += 6; + numArray25[1] += 6; + numArray25[2] += 4; + numArray25[3] += 4; + numArray25[4] += 4; + numArray25[5] += 6; + mountData25.playerYOffsets = numArray25; + mountData25.xOffset = 1; + mountData25.bodyFrame = 0; + mountData25.yOffset = 16; + mountData25.playerHeadOffset = 16; + mountData25.runningFrameCount = 6; + mountData25.runningFrameDelay = 8; + mountData25.runningFrameStart = 0; + if (Main.netMode != 2) + { + mountData25.backTexture = TextureAssets.Extra[170]; + mountData25.backTextureExtra = (Asset) Asset.Empty; + mountData25.frontTexture = (Asset) Asset.Empty; + mountData25.frontTextureExtra = (Asset) Asset.Empty; + mountData25.textureWidth = mountData25.backTexture.Width(); + mountData25.textureHeight = mountData25.backTexture.Height(); + } + Mount.MountData mountData26 = new Mount.MountData(); + Mount.mounts[49] = mountData26; + mountData26.spawnDust = 35; + mountData26.buff = 305; + mountData26.heightBoost = 8; + mountData26.runSpeed = 2f; + mountData26.dashSpeed = 1f; + mountData26.acceleration = 0.4f; + mountData26.jumpHeight = 4; + mountData26.jumpSpeed = 3f; + mountData26.swimSpeed = 14f; + mountData26.blockExtraJumps = true; + mountData26.flightTimeMax = 0; + mountData26.fatigueMax = 320; + mountData26.usesHover = true; + mountData26.emitsLight = true; + mountData26.lightColor = new Vector3(0.3f, 0.15f, 0.1f); + mountData26.totalFrames = 8; + int[] numArray26 = new int[mountData26.totalFrames]; + for (int index = 0; index < numArray26.Length; ++index) + numArray26[index] = 10; + mountData26.playerYOffsets = numArray26; + mountData26.xOffset = 2; + mountData26.bodyFrame = 3; + mountData26.yOffset = 1; + mountData26.playerHeadOffset = 16; + mountData26.standingFrameCount = 1; + mountData26.standingFrameDelay = 12; + mountData26.standingFrameStart = 4; + mountData26.runningFrameCount = 4; + mountData26.runningFrameDelay = 14; + mountData26.runningFrameStart = 4; + mountData26.inAirFrameCount = 1; + mountData26.inAirFrameDelay = 6; + mountData26.inAirFrameStart = 4; + mountData26.swimFrameCount = 4; + mountData26.swimFrameDelay = 16; + mountData26.swimFrameStart = 0; + if (Main.netMode != 2) + { + mountData26.backTexture = TextureAssets.Extra[172]; + mountData26.backTextureGlow = TextureAssets.GlowMask[285]; + mountData26.frontTexture = (Asset) Asset.Empty; + mountData26.frontTextureExtra = (Asset) Asset.Empty; + mountData26.textureWidth = mountData26.backTexture.Width(); + mountData26.textureHeight = mountData26.backTexture.Height(); + } + Mount.MountData mountData27 = new Mount.MountData(); + Mount.mounts[50] = mountData27; + mountData27.spawnDust = 243; + mountData27.buff = 318; + mountData27.heightBoost = 20; + mountData27.flightTimeMax = 160; + mountData27.fallDamage = 0.5f; + mountData27.runSpeed = 6.5f; + mountData27.dashSpeed = 6.5f; + mountData27.acceleration = 0.2f; + mountData27.jumpHeight = 10; + mountData27.jumpSpeed = 7.25f; + mountData27.constantJump = true; + mountData27.totalFrames = 8; + int[] numArray27 = new int[mountData27.totalFrames]; + for (int index = 0; index < numArray27.Length; ++index) + numArray27[index] = 20; + numArray27[1] += 2; + numArray27[4] += 2; + numArray27[5] += 2; + mountData27.playerYOffsets = numArray27; + mountData27.xOffset = 1; + mountData27.bodyFrame = 3; + mountData27.yOffset = -1; + mountData27.playerHeadOffset = 22; + mountData27.standingFrameCount = 1; + mountData27.standingFrameDelay = 12; + mountData27.standingFrameStart = 0; + mountData27.runningFrameCount = 5; + mountData27.runningFrameDelay = 16; + mountData27.runningFrameStart = 0; + mountData27.flyingFrameCount = 0; + mountData27.flyingFrameDelay = 0; + mountData27.flyingFrameStart = 0; + mountData27.inAirFrameCount = 1; + mountData27.inAirFrameDelay = 12; + mountData27.inAirFrameStart = 5; + mountData27.idleFrameCount = 0; + mountData27.idleFrameDelay = 0; + mountData27.idleFrameStart = 0; + mountData27.idleFrameLoop = false; + if (Main.netMode == 2) + return; + mountData27.backTexture = TextureAssets.Extra[204]; + mountData27.backTextureExtra = (Asset) Asset.Empty; + mountData27.frontTexture = (Asset) Asset.Empty; + mountData27.frontTextureExtra = (Asset) Asset.Empty; + mountData27.textureWidth = mountData27.backTexture.Width(); + mountData27.textureHeight = mountData27.backTexture.Height(); + } + + private static void SetAsHorse(Mount.MountData newMount, int buff, Asset texture) + { + newMount.spawnDust = 3; + newMount.buff = buff; + newMount.heightBoost = 34; + newMount.flightTimeMax = 0; + newMount.fallDamage = 0.5f; + newMount.runSpeed = 3f; + newMount.dashSpeed = 8f; + newMount.acceleration = 0.25f; + newMount.jumpHeight = 6; + newMount.jumpSpeed = 7.01f; + newMount.totalFrames = 16; + int[] numArray = new int[newMount.totalFrames]; + for (int index = 0; index < numArray.Length; ++index) + numArray[index] = 28; + numArray[3] += 2; + numArray[4] += 2; + numArray[7] += 2; + numArray[8] += 2; + numArray[12] += 2; + numArray[13] += 2; + numArray[15] += 4; + newMount.playerYOffsets = numArray; + newMount.xOffset = 5; + newMount.bodyFrame = 3; + newMount.yOffset = 1; + newMount.playerHeadOffset = 34; + newMount.standingFrameCount = 1; + newMount.standingFrameDelay = 12; + newMount.standingFrameStart = 0; + newMount.runningFrameCount = 7; + newMount.runningFrameDelay = 15; + newMount.runningFrameStart = 1; + newMount.dashingFrameCount = 6; + newMount.dashingFrameDelay = 40; + newMount.dashingFrameStart = 9; + newMount.flyingFrameCount = 6; + newMount.flyingFrameDelay = 6; + newMount.flyingFrameStart = 1; + newMount.inAirFrameCount = 1; + newMount.inAirFrameDelay = 12; + newMount.inAirFrameStart = 15; + newMount.idleFrameCount = 0; + newMount.idleFrameDelay = 0; + newMount.idleFrameStart = 0; + newMount.idleFrameLoop = false; + newMount.swimFrameCount = newMount.inAirFrameCount; + newMount.swimFrameDelay = newMount.inAirFrameDelay; + newMount.swimFrameStart = newMount.inAirFrameStart; + if (Main.netMode == 2) + return; + newMount.backTexture = texture; + newMount.backTextureExtra = (Asset) Asset.Empty; + newMount.frontTexture = (Asset) Asset.Empty; + newMount.frontTextureExtra = (Asset) Asset.Empty; + newMount.textureWidth = newMount.backTexture.Width(); + newMount.textureHeight = newMount.backTexture.Height(); + } + + private static void SetAsMinecart( + Mount.MountData newMount, + int buffToLeft, + int buffToRight, + Asset texture) + { + newMount.Minecart = true; + newMount.delegations = new Mount.MountDelegatesData(); + newMount.delegations.MinecartDust = new Action(DelegateMethods.Minecart.Sparks); + newMount.spawnDust = 213; + newMount.buff = buffToLeft; + newMount.extraBuff = buffToRight; + newMount.heightBoost = 10; + newMount.flightTimeMax = 0; + newMount.fallDamage = 1f; + newMount.runSpeed = 13f; + newMount.dashSpeed = 13f; + newMount.acceleration = 0.04f; + newMount.jumpHeight = 15; + newMount.jumpSpeed = 5.15f; + newMount.blockExtraJumps = true; + newMount.totalFrames = 3; + int[] numArray = new int[newMount.totalFrames]; + for (int index = 0; index < numArray.Length; ++index) + numArray[index] = 8; + newMount.playerYOffsets = numArray; + newMount.xOffset = 1; + newMount.bodyFrame = 3; + newMount.yOffset = 13; + newMount.playerHeadOffset = 14; + newMount.standingFrameCount = 1; + newMount.standingFrameDelay = 12; + newMount.standingFrameStart = 0; + newMount.runningFrameCount = 3; + newMount.runningFrameDelay = 12; + newMount.runningFrameStart = 0; + newMount.flyingFrameCount = 0; + newMount.flyingFrameDelay = 0; + newMount.flyingFrameStart = 0; + newMount.inAirFrameCount = 0; + newMount.inAirFrameDelay = 0; + newMount.inAirFrameStart = 0; + newMount.idleFrameCount = 0; + newMount.idleFrameDelay = 0; + newMount.idleFrameStart = 0; + newMount.idleFrameLoop = false; + if (Main.netMode == 2) + return; + newMount.backTexture = (Asset) Asset.Empty; + newMount.backTextureExtra = (Asset) Asset.Empty; + newMount.frontTexture = texture; + newMount.frontTextureExtra = (Asset) Asset.Empty; + newMount.textureWidth = newMount.frontTexture.Width(); + newMount.textureHeight = newMount.frontTexture.Height(); + } + + public bool Active => this._active; + + public int Type => this._type; + + public int FlyTime => this._flyTime; + + public int BuffType => this._data.buff; + + public int BodyFrame => this._data.bodyFrame; + + public int XOffset => this._data.xOffset; + + public int YOffset => this._data.yOffset; + + public int PlayerOffset => !this._active ? 0 : this._data.playerYOffsets[this._frame]; + + public int PlayerOffsetHitbox => !this._active ? 0 : -this.PlayerOffset + this._data.heightBoost; + + public int PlayerHeadOffset => !this._active ? 0 : this._data.playerHeadOffset; + + public int HeightBoost => this._data.heightBoost; + + public static int GetHeightBoost(int MountType) => MountType <= -1 || MountType >= MountID.Count ? 0 : Mount.mounts[MountType].heightBoost; + + public float RunSpeed + { + get + { + if (this._type == 4 && this._frameState == 4 || (this._type == 12 || this._type == 44 || this._type == 49) && this._frameState == 4) + return this._data.swimSpeed; + if (this._type == 12 && this._frameState == 2) + return this._data.runSpeed + 13.5f; + if (this._type == 44 && this._frameState == 2) + return this._data.runSpeed + 4f; + if (this._type == 5 && this._frameState == 2) + return this._data.runSpeed + (float) (4.0 * (1.0 - (double) (this._fatigue / this._fatigueMax))); + return this._type == 50 && this._frameState == 2 ? this._data.runSpeed + 4f : this._data.runSpeed; + } + } + + public float DashSpeed => this._data.dashSpeed; + + public float Acceleration => this._data.acceleration; + + public float FallDamage => this._data.fallDamage; + + public int JumpHeight(float xVelocity) + { + int jumpHeight = this._data.jumpHeight; + switch (this._type) + { + case 0: + jumpHeight += (int) ((double) Math.Abs(xVelocity) / 4.0); + break; + case 1: + jumpHeight += (int) ((double) Math.Abs(xVelocity) / 2.5); + break; + case 4: + case 49: + if (this._frameState == 4) + { + jumpHeight += 5; + break; + } + break; + } + return jumpHeight; + } + + public float JumpSpeed(float xVelocity) + { + float jumpSpeed = this._data.jumpSpeed; + switch (this._type) + { + case 0: + case 1: + jumpSpeed += Math.Abs(xVelocity) / 7f; + break; + case 4: + case 49: + if (this._frameState == 4) + { + jumpSpeed += 2.5f; + break; + } + break; + } + return jumpSpeed; + } + + public bool AutoJump => this._data.constantJump; + + public bool BlockExtraJumps => this._data.blockExtraJumps; + + public bool IsConsideredASlimeMount => this._type == 3 || this._type == 50; + + public bool Cart => this._data != null && this._active && this._data.Minecart; + + public bool Directional => this._data == null || this._data.MinecartDirectional; + + public Mount.MountDelegatesData Delegations => this._data == null ? this._defaultDelegatesData : this._data.delegations; + + public Vector2 Origin => new Vector2((float) this._data.textureWidth / 2f, (float) this._data.textureHeight / (2f * (float) this._data.totalFrames)); + + public bool CanFly() => this._active && this._data.flightTimeMax != 0 && this._type != 48; + + public bool CanHover() + { + if (!this._active || !this._data.usesHover) + return false; + if (this._type == 49) + return this._frameState == 4; + return this._data.usesHover; + } + + public bool AbilityCharging => this._abilityCharging; + + public bool AbilityActive => this._abilityActive; + + public float AbilityCharge => (float) this._abilityCharge / (float) this._data.abilityChargeMax; + + public void StartAbilityCharge(Player mountedPlayer) + { + if (Main.myPlayer == mountedPlayer.whoAmI) + { + if (this._type != 9) + return; + int Type = 441; + double num = (double) Main.screenPosition.X + (double) Main.mouseX; + float Y = Main.screenPosition.Y + (float) Main.mouseY; + float ai0 = (float) num - mountedPlayer.position.X; + float ai1 = Y - mountedPlayer.position.Y; + Projectile.NewProjectile((float) num, Y, 0.0f, 0.0f, Type, 0, 0.0f, mountedPlayer.whoAmI, ai0, ai1); + this._abilityCharging = true; + } + else + { + if (this._type != 9) + return; + this._abilityCharging = true; + } + } + + public void StopAbilityCharge() + { + switch (this._type) + { + case 9: + case 46: + this._abilityCharging = false; + this._abilityCooldown = this._data.abilityCooldown; + this._abilityDuration = this._data.abilityDuration; + break; + } + } + + public bool CheckBuff(int buffID) => this._data.buff == buffID || this._data.extraBuff == buffID; + + public void AbilityRecovery() + { + if (this._abilityCharging) + { + if (this._abilityCharge < this._data.abilityChargeMax) + ++this._abilityCharge; + } + else if (this._abilityCharge > 0) + --this._abilityCharge; + if (this._abilityCooldown > 0) + --this._abilityCooldown; + if (this._abilityDuration <= 0) + return; + --this._abilityDuration; + } + + public void FatigueRecovery() + { + if ((double) this._fatigue > 2.0) + this._fatigue -= 2f; + else + this._fatigue = 0.0f; + } + + public bool Flight() + { + if (this._flyTime <= 0) + return false; + --this._flyTime; + return true; + } + + public bool AllowDirectionChange => this._type != 9 || this._abilityCooldown < this._data.abilityCooldown / 2; + + public void UpdateDrill(Player mountedPlayer, bool controlUp, bool controlDown) + { + Mount.DrillMountData mountSpecificData = (Mount.DrillMountData) this._mountSpecificData; + for (int index = 0; index < mountSpecificData.beams.Length; ++index) + { + Mount.DrillBeam beam = mountSpecificData.beams[index]; + if (beam.cooldown > 1) + --beam.cooldown; + else if (beam.cooldown == 1) + { + beam.cooldown = 0; + beam.curTileTarget = Point16.NegativeOne; + } + } + mountSpecificData.diodeRotation = (float) ((double) mountSpecificData.diodeRotation * 0.850000023841858 + 0.150000005960464 * (double) mountSpecificData.diodeRotationTarget); + if (mountSpecificData.beamCooldown <= 0) + return; + --mountSpecificData.beamCooldown; + } + + public void UseDrill(Player mountedPlayer) + { + if (this._type != 8 || !this._abilityActive) + return; + Mount.DrillMountData mountSpecificData = (Mount.DrillMountData) this._mountSpecificData; + if (mountSpecificData.beamCooldown != 0) + return; + for (int index1 = 0; index1 < mountSpecificData.beams.Length; ++index1) + { + Mount.DrillBeam beam = mountSpecificData.beams[index1]; + if (beam.cooldown == 0) + { + Point16 point16 = this.DrillSmartCursor(mountedPlayer, mountSpecificData); + if (point16 != Point16.NegativeOne) + { + beam.curTileTarget = point16; + int drillPickPower = Mount.drillPickPower; + bool flag1 = mountedPlayer.whoAmI == Main.myPlayer; + if (flag1) + { + bool flag2 = true; + if (WorldGen.InWorld((int) point16.X, (int) point16.Y) && Main.tile[(int) point16.X, (int) point16.Y] != null && Main.tile[(int) point16.X, (int) point16.Y].type == (ushort) 26 && !Main.hardMode) + { + flag2 = false; + mountedPlayer.Hurt(PlayerDeathReason.ByOther(4), mountedPlayer.statLife / 2, -mountedPlayer.direction); + } + if (mountedPlayer.noBuilding) + flag2 = false; + if (flag2) + mountedPlayer.PickTile((int) point16.X, (int) point16.Y, drillPickPower); + } + Vector2 Position = new Vector2((float) ((int) point16.X << 4) + 8f, (float) ((int) point16.Y << 4) + 8f); + float rotation = (Position - mountedPlayer.Center).ToRotation(); + for (int index2 = 0; index2 < 2; ++index2) + { + float num1 = rotation + (float) ((Main.rand.Next(2) == 1 ? -1.0 : 1.0) * 1.57079637050629); + float num2 = (float) (Main.rand.NextDouble() * 2.0 + 2.0); + Vector2 vector2 = new Vector2((float) Math.Cos((double) num1) * num2, (float) Math.Sin((double) num1) * num2); + int index3 = Dust.NewDust(Position, 0, 0, 230, vector2.X, vector2.Y); + Main.dust[index3].noGravity = true; + Main.dust[index3].customData = (object) mountedPlayer; + } + if (flag1) + Tile.SmoothSlope((int) point16.X, (int) point16.Y, sync: true); + beam.cooldown = Mount.drillPickTime; + break; + } + break; + } + } + mountSpecificData.beamCooldown = Mount.drillBeamCooldownMax; + } + + private Point16 DrillSmartCursor(Player mountedPlayer, Mount.DrillMountData data) + { + Vector2 vector2_1 = mountedPlayer.whoAmI != Main.myPlayer ? data.crosshairPosition : Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY); + Vector2 center = mountedPlayer.Center; + Vector2 vector2_2 = vector2_1 - center; + float num1 = vector2_2.Length(); + if ((double) num1 > 224.0) + num1 = 224f; + float num2 = num1 + 32f; + vector2_2.Normalize(); + Vector2 start = center; + Vector2 vector2_3 = center + vector2_2 * num2; + Point16 tilePoint = new Point16(-1, -1); + Vector2 end = vector2_3; + Utils.TileActionAttempt plot = (Utils.TileActionAttempt) ((x, y) => + { + tilePoint = new Point16(x, y); + for (int index = 0; index < data.beams.Length; ++index) + { + if (data.beams[index].curTileTarget == tilePoint) + return true; + } + return !WorldGen.CanKillTile(x, y) || Main.tile[x, y] == null || Main.tile[x, y].inActive() || !Main.tile[x, y].active(); + }); + return !Utils.PlotTileLine(start, end, 65.6f, plot) ? tilePoint : new Point16(-1, -1); + } + + public void UseAbility(Player mountedPlayer, Vector2 mousePosition, bool toggleOn) + { + switch (this._type) + { + case 8: + if (Main.myPlayer == mountedPlayer.whoAmI) + { + if (!toggleOn) + { + this._abilityActive = false; + break; + } + if (this._abilityActive) + break; + if (mountedPlayer.whoAmI == Main.myPlayer) + { + double num = (double) Main.screenPosition.X + (double) Main.mouseX; + float Y = Main.screenPosition.Y + (float) Main.mouseY; + float ai0 = (float) num - mountedPlayer.position.X; + float ai1 = Y - mountedPlayer.position.Y; + Projectile.NewProjectile((float) num, Y, 0.0f, 0.0f, 453, 0, 0.0f, mountedPlayer.whoAmI, ai0, ai1); + } + this._abilityActive = true; + break; + } + this._abilityActive = toggleOn; + break; + case 9: + if (Main.myPlayer != mountedPlayer.whoAmI) + break; + int Type1 = 606; + mousePosition = this.ClampToDeadZone(mountedPlayer, mousePosition); + Vector2 vector2_1; + vector2_1.X = mountedPlayer.position.X + (float) (mountedPlayer.width / 2); + vector2_1.Y = mountedPlayer.position.Y + (float) mountedPlayer.height; + int num1 = (this._frameExtra - 6) * 2; + for (int index = 0; index < 2; ++index) + { + Vector2 vector2_2; + vector2_2.Y = vector2_1.Y + Mount.scutlixEyePositions[num1 + index].Y + (float) this._data.yOffset; + vector2_2.X = mountedPlayer.direction != -1 ? vector2_1.X + Mount.scutlixEyePositions[num1 + index].X + (float) this._data.xOffset : vector2_1.X - Mount.scutlixEyePositions[num1 + index].X - (float) this._data.xOffset; + Vector2 vector2_3 = mousePosition - vector2_2; + vector2_3.Normalize(); + Vector2 vector2_4 = vector2_3 * 14f; + int Damage = 100; + vector2_2 += vector2_4; + Projectile.NewProjectile(vector2_2.X, vector2_2.Y, vector2_4.X, vector2_4.Y, Type1, Damage, 0.0f, Main.myPlayer); + } + break; + case 46: + if (Main.myPlayer != mountedPlayer.whoAmI) + break; + if (this._abilityCooldown <= 10) + { + int Damage = 120; + Vector2 vector2_5 = mountedPlayer.Center + new Vector2((float) (mountedPlayer.width * -mountedPlayer.direction), 26f); + Vector2 vector2_6 = new Vector2(0.0f, -4f).RotatedByRandom(0.100000001490116); + Projectile.NewProjectile(vector2_5.X, vector2_5.Y, vector2_6.X, vector2_6.Y, 930, Damage, 0.0f, Main.myPlayer); + SoundEngine.PlaySound(SoundID.Item89.SoundId, (int) vector2_5.X, (int) vector2_5.Y, SoundID.Item89.Style, 0.2f); + } + int Type2 = 14; + int Damage1 = 100; + mousePosition = this.ClampToDeadZone(mountedPlayer, mousePosition); + Vector2 vector2_7; + vector2_7.X = mountedPlayer.position.X + (float) (mountedPlayer.width / 2); + vector2_7.Y = mountedPlayer.position.Y + (float) mountedPlayer.height; + Vector2 vector2_8 = new Vector2(vector2_7.X + (float) (mountedPlayer.width * mountedPlayer.direction), vector2_7.Y - 12f); + Vector2 vector2_9 = ((mousePosition - vector2_8).SafeNormalize(Vector2.Zero) * 12f).RotatedByRandom(0.200000002980232); + Projectile.NewProjectile(vector2_8.X, vector2_8.Y, vector2_9.X, vector2_9.Y, Type2, Damage1, 0.0f, Main.myPlayer); + SoundEngine.PlaySound(SoundID.Item11.SoundId, (int) vector2_8.X, (int) vector2_8.Y, SoundID.Item11.Style, 0.2f); + break; + } + } + + public bool Hover(Player mountedPlayer) + { + bool flag1 = this.DoesHoverIgnoresFatigue(); + bool flag2 = this._frameState == 2 || this._frameState == 4; + if (this._type == 49) + flag2 = this._frameState == 4; + if (flag2) + { + bool flag3 = true; + float num1 = 1f; + float num2 = mountedPlayer.gravity / Player.defaultGravity; + if (mountedPlayer.slowFall) + num2 /= 3f; + if ((double) num2 < 0.25) + num2 = 0.25f; + if (!flag1) + { + if (this._flyTime > 0) + --this._flyTime; + else if ((double) this._fatigue < (double) this._fatigueMax) + this._fatigue += num2; + else + flag3 = false; + } + if (this._type == 12 && !mountedPlayer.MountFishronSpecial) + num1 = 0.5f; + float num3 = this._fatigue / this._fatigueMax; + if (flag1) + num3 = 0.0f; + bool flag4 = true; + if (this._type == 48) + flag4 = false; + float num4 = 4f * num3; + float num5 = 4f * num3; + bool flag5 = false; + if (this._type == 48) + { + num4 = 0.0f; + num5 = 0.0f; + if (!flag3) + flag5 = true; + if (mountedPlayer.controlDown) + num5 = 8f; + } + if ((double) num4 == 0.0) + num4 = -1f / 1000f; + if ((double) num5 == 0.0) + num5 = -1f / 1000f; + float num6 = mountedPlayer.velocity.Y; + if (((!flag4 ? 0 : (mountedPlayer.controlUp ? 1 : (mountedPlayer.controlJump ? 1 : 0))) & (flag3 ? 1 : 0)) != 0) + { + num4 = (float) (-2.0 - 6.0 * (1.0 - (double) num3)); + if (this._type == 48) + num4 /= 3f; + num6 -= this._data.acceleration * num1; + } + else if (mountedPlayer.controlDown) + { + num6 += this._data.acceleration * num1; + num5 = 8f; + } + else if (flag5) + { + float num7 = mountedPlayer.gravity * mountedPlayer.gravDir; + num6 += num7; + num5 = 4f; + } + else + { + int jump = mountedPlayer.jump; + } + if ((double) num6 < (double) num4) + { + if ((double) num4 - (double) num6 < (double) this._data.acceleration) + num6 = num4; + else + num6 += this._data.acceleration * num1; + } + else if ((double) num6 > (double) num5) + { + if ((double) num6 - (double) num5 < (double) this._data.acceleration) + num6 = num5; + else + num6 -= this._data.acceleration * num1; + } + mountedPlayer.velocity.Y = num6; + if ((double) num4 == -1.0 / 1000.0 && (double) num5 == -1.0 / 1000.0 && (double) num6 == -1.0 / 1000.0) + mountedPlayer.position.Y -= -1f / 1000f; + mountedPlayer.fallStart = (int) ((double) mountedPlayer.position.Y / 16.0); + } + else if (!flag1) + mountedPlayer.velocity.Y += mountedPlayer.gravity * mountedPlayer.gravDir; + else if ((double) mountedPlayer.velocity.Y == 0.0) + { + Vector2 Velocity = Vector2.UnitY * mountedPlayer.gravDir * 1f; + if ((double) Collision.TileCollision(mountedPlayer.position, Velocity, mountedPlayer.width, mountedPlayer.height, gravDir: ((int) mountedPlayer.gravDir)).Y != 0.0 || mountedPlayer.controlDown) + mountedPlayer.velocity.Y = 1f / 1000f; + } + else if ((double) mountedPlayer.velocity.Y == -1.0 / 1000.0) + mountedPlayer.velocity.Y -= -1f / 1000f; + if (this._type == 7) + { + float num8 = mountedPlayer.velocity.X / this._data.dashSpeed; + if ((double) num8 > 0.95) + num8 = 0.95f; + if ((double) num8 < -0.95) + num8 = -0.95f; + float num9 = (float) (0.785398185253143 * (double) num8 / 2.0); + float num10 = Math.Abs((float) (2.0 - (double) this._frame / 2.0)) / 2f; + Lighting.AddLight((int) ((double) mountedPlayer.position.X + (double) (mountedPlayer.width / 2)) / 16, (int) ((double) mountedPlayer.position.Y + (double) (mountedPlayer.height / 2)) / 16, 0.4f, 0.2f * num10, 0.0f); + mountedPlayer.fullRotation = num9; + } + else if (this._type == 8) + { + float num11 = mountedPlayer.velocity.X / this._data.dashSpeed; + if ((double) num11 > 0.95) + num11 = 0.95f; + if ((double) num11 < -0.95) + num11 = -0.95f; + float num12 = (float) (0.785398185253143 * (double) num11 / 2.0); + mountedPlayer.fullRotation = num12; + Mount.DrillMountData mountSpecificData = (Mount.DrillMountData) this._mountSpecificData; + float num13 = mountSpecificData.outerRingRotation + mountedPlayer.velocity.X / 80f; + if ((double) num13 > 3.14159274101257) + num13 -= 6.283185f; + else if ((double) num13 < -3.14159274101257) + num13 += 6.283185f; + mountSpecificData.outerRingRotation = num13; + } + else if (this._type == 23) + { + float num14 = MathHelper.Clamp(-mountedPlayer.velocity.Y / this._data.dashSpeed, -1f, 1f); + float num15 = MathHelper.Clamp(mountedPlayer.velocity.X / this._data.dashSpeed, -1f, 1f); + float num16 = -0.1963495f * num14 * (float) mountedPlayer.direction + 0.1963495f * num15; + mountedPlayer.fullRotation = num16; + mountedPlayer.fullRotationOrigin = new Vector2((float) (mountedPlayer.width / 2), (float) mountedPlayer.height); + } + return true; + } + + private bool DoesHoverIgnoresFatigue() => this._type == 7 || this._type == 8 || this._type == 12 || this._type == 23 || this._type == 44 || this._type == 49; + + private float GetWitchBroomTrinketRotation(Player player) + { + float num1 = Utils.Clamp(player.velocity.X / 10f, -1f, 1f); + Point tileCoordinates = player.Center.ToTileCoordinates(); + float num2 = 0.5f; + if (WorldGen.InAPlaceWithWind(tileCoordinates.X, tileCoordinates.Y, 1, 1)) + num2 = 1f; + float num3 = (float) (Math.Sin((double) player.miscCounter / 300.0 * 6.28318548202515 * 3.0) * 0.785398185253143 * (double) Math.Abs(Main.WindForVisuals) * 0.5 + 0.785398185253143 * -(double) Main.WindForVisuals * 0.5) * num2; + return (float) ((double) num1 * Math.Sin((double) player.miscCounter / 150.0 * 6.28318548202515 * 3.0) * 0.785398185253143 * 0.5 + (double) num1 * 0.785398185253143 * 0.5) + num3; + } + + private Vector2 GetWitchBroomTrinketOriginOffset(Player player) => new Vector2((float) (27 * player.direction), 5f); + + public void UpdateFrame(Player mountedPlayer, int state, Vector2 velocity) + { + if (this._frameState != state) + { + this._frameState = state; + this._frameCounter = 0.0f; + } + if (state != 0) + this._idleTime = 0; + if (this._data.emitsLight) + { + Point tileCoordinates = mountedPlayer.Center.ToTileCoordinates(); + Lighting.AddLight(tileCoordinates.X, tileCoordinates.Y, this._data.lightColor.X, this._data.lightColor.Y, this._data.lightColor.Z); + } + switch (this._type) + { + case 5: + if (state != 2) + { + this._frameExtra = 0; + this._frameExtraCounter = 0.0f; + break; + } + break; + case 7: + state = 2; + break; + case 8: + if (state == 0 || state == 1) + { + Vector2 position; + position.X = mountedPlayer.position.X; + position.Y = mountedPlayer.position.Y + (float) mountedPlayer.height; + int num1 = (int) ((double) position.X / 16.0); + double num2 = (double) position.Y / 16.0; + float num3 = 0.0f; + float width = (float) mountedPlayer.width; + while ((double) width > 0.0) + { + float num4 = (float) ((num1 + 1) * 16) - position.X; + if ((double) num4 > (double) width) + num4 = width; + num3 += Collision.GetTileRotation(position) * num4; + width -= num4; + position.X += num4; + ++num1; + } + float num5 = num3 / (float) mountedPlayer.width - mountedPlayer.fullRotation; + float num6 = 0.0f; + float num7 = 0.1570796f; + if ((double) num5 < 0.0) + num6 = (double) num5 <= -(double) num7 ? -num7 : num5; + else if ((double) num5 > 0.0) + num6 = (double) num5 >= (double) num7 ? num7 : num5; + if ((double) num6 != 0.0) + { + mountedPlayer.fullRotation += num6; + if ((double) mountedPlayer.fullRotation > 0.785398185253143) + mountedPlayer.fullRotation = 0.7853982f; + if ((double) mountedPlayer.fullRotation < -0.785398185253143) + { + mountedPlayer.fullRotation = -0.7853982f; + break; + } + break; + } + break; + } + break; + case 9: + if (!this._aiming) + { + ++this._frameExtraCounter; + if ((double) this._frameExtraCounter >= 12.0) + { + this._frameExtraCounter = 0.0f; + ++this._frameExtra; + if (this._frameExtra >= 6) + { + this._frameExtra = 0; + break; + } + break; + } + break; + } + break; + case 10: + case 40: + case 41: + case 42: + case 47: + bool flag1 = (double) Math.Abs(velocity.X) > (double) this.DashSpeed - (double) this.RunSpeed / 2.0; + if (state == 1) + { + bool flag2 = false; + if (flag1) + { + state = 5; + if (this._frameExtra < 6) + flag2 = true; + ++this._frameExtra; + } + else + this._frameExtra = 0; + if (((this._type == 10 ? 1 : (this._type == 47 ? 1 : 0)) & (flag2 ? 1 : 0)) != 0) + { + int Type = 6; + if (this._type == 10) + Type = Utils.SelectRandom(Main.rand, 176, 177, 179); + Vector2 Position = mountedPlayer.Center + new Vector2((float) (mountedPlayer.width * mountedPlayer.direction), 0.0f); + Vector2 vector2_1 = new Vector2(40f, 30f); + float num8 = 6.283185f * Main.rand.NextFloat(); + for (float num9 = 0.0f; (double) num9 < 14.0; ++num9) + { + Dust dust = Main.dust[Dust.NewDust(Position, 0, 0, Type)]; + Vector2 vector2_2 = Vector2.UnitY.RotatedBy((double) num9 * 6.28318548202515 / 14.0 + (double) num8) * (0.2f * (float) this._frameExtra); + dust.position = Position + vector2_2 * vector2_1; + dust.velocity = vector2_2 + new Vector2(this.RunSpeed - (float) (Math.Sign(velocity.X) * this._frameExtra * 2), 0.0f); + dust.noGravity = true; + if (this._type == 47) + dust.noLightEmittence = true; + dust.scale = (float) (1.0 + (double) Main.rand.NextFloat() * 0.800000011920929); + dust.fadeIn = Main.rand.NextFloat() * 2f; + dust.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer); + } + } + } + if (this._type == 10 & flag1) + { + Dust dust = Main.dust[Dust.NewDust(mountedPlayer.position, mountedPlayer.width, mountedPlayer.height, Utils.SelectRandom(Main.rand, 176, 177, 179))]; + dust.velocity = Vector2.Zero; + dust.noGravity = true; + dust.scale = (float) (0.5 + (double) Main.rand.NextFloat() * 0.800000011920929); + dust.fadeIn = (float) (1.0 + (double) Main.rand.NextFloat() * 2.0); + dust.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer); + } + if (this._type == 47 & flag1 && (double) velocity.Y == 0.0) + { + int i = (int) mountedPlayer.Center.X / 16; + int num = (int) ((double) mountedPlayer.position.Y + (double) mountedPlayer.height - 1.0) / 16; + Tile tile = Main.tile[i, num + 1]; + if (tile != null && tile.active() && tile.liquid == (byte) 0 && WorldGen.SolidTileAllowBottomSlope(i, num + 1)) + { + ParticleOrchestrator.RequestParticleSpawn(true, ParticleOrchestraType.WallOfFleshGoatMountFlames, new ParticleOrchestraSettings() + { + PositionInWorld = new Vector2((float) (i * 16 + 8), (float) (num * 16 + 16)) + }, new int?(mountedPlayer.whoAmI)); + break; + } + break; + } + break; + case 14: + int num10 = (double) Math.Abs(velocity.X) > (double) this.RunSpeed / 2.0 ? 1 : 0; + float num11 = (float) Math.Sign(mountedPlayer.velocity.X); + float y = 12f; + float num12 = 40f; + mountedPlayer.basiliskCharge = num10 != 0 ? Utils.Clamp(mountedPlayer.basiliskCharge + 0.005555556f, 0.0f, 1f) : 0.0f; + if ((double) mountedPlayer.position.Y > Main.worldSurface * 16.0 + 160.0) + Lighting.AddLight(mountedPlayer.Center, 0.5f, 0.1f, 0.1f); + if (num10 != 0 && (double) velocity.Y == 0.0) + { + for (int index = 0; index < 2; ++index) + { + Dust dust = Main.dust[Dust.NewDust(mountedPlayer.BottomLeft, mountedPlayer.width, 6, 31)]; + dust.velocity = new Vector2(velocity.X * 0.15f, Main.rand.NextFloat() * -2f); + dust.noLight = true; + dust.scale = (float) (0.5 + (double) Main.rand.NextFloat() * 0.800000011920929); + dust.fadeIn = (float) (0.5 + (double) Main.rand.NextFloat() * 1.0); + dust.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer); + } + if (mountedPlayer.cMount == 0) + { + Player player1 = mountedPlayer; + player1.position = player1.position + new Vector2(num11 * 24f, 0.0f); + mountedPlayer.FloorVisuals(true); + Player player2 = mountedPlayer; + player2.position = player2.position - new Vector2(num11 * 24f, 0.0f); + } + } + if ((double) num11 == (double) mountedPlayer.direction) + { + for (int index = 0; index < (int) (3.0 * (double) mountedPlayer.basiliskCharge); ++index) + { + Dust dust = Main.dust[Dust.NewDust(mountedPlayer.BottomLeft, mountedPlayer.width, 6, 6)]; + Vector2 vector2 = mountedPlayer.Center + new Vector2(num11 * num12, y); + dust.position = mountedPlayer.Center + new Vector2(num11 * (num12 - 2f), (float) ((double) y - 6.0 + (double) Main.rand.NextFloat() * 12.0)); + dust.velocity = (dust.position - vector2).SafeNormalize(Vector2.Zero) * (float) (3.5 + (double) Main.rand.NextFloat() * 0.5); + if ((double) dust.velocity.Y < 0.0) + dust.velocity.Y *= (float) (1.0 + 2.0 * (double) Main.rand.NextFloat()); + dust.velocity += mountedPlayer.velocity * 0.55f; + dust.velocity *= mountedPlayer.velocity.Length() / this.RunSpeed; + dust.velocity *= mountedPlayer.basiliskCharge; + dust.noGravity = true; + dust.noLight = true; + dust.scale = (float) (0.5 + (double) Main.rand.NextFloat() * 0.800000011920929); + dust.fadeIn = (float) (0.5 + (double) Main.rand.NextFloat() * 1.0); + dust.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer); + } + break; + } + break; + case 17: + this.UpdateFrame_GolfCart(mountedPlayer, state, velocity); + break; + case 39: + ++this._frameExtraCounter; + if ((double) this._frameExtraCounter > 6.0) + { + this._frameExtraCounter = 0.0f; + ++this._frameExtra; + if (this._frameExtra > 5) + { + this._frameExtra = 0; + break; + } + break; + } + break; + case 43: + if ((double) mountedPlayer.velocity.Y == 0.0) + mountedPlayer.isPerformingPogostickTricks = false; + if (mountedPlayer.isPerformingPogostickTricks) + mountedPlayer.fullRotation += (float) ((double) mountedPlayer.direction * 6.28318548202515 / 30.0); + else + mountedPlayer.fullRotation = (float) ((double) Math.Sign(mountedPlayer.velocity.X) * (double) Utils.GetLerpValue(0.0f, this.RunSpeed - 0.2f, Math.Abs(mountedPlayer.velocity.X), true) * 0.400000005960464); + mountedPlayer.fullRotationOrigin = new Vector2((float) (mountedPlayer.width / 2), (float) mountedPlayer.height * 0.8f); + break; + case 44: + state = 1; + bool flag3 = (double) Math.Abs(velocity.X) > (double) this.DashSpeed - (double) this.RunSpeed / 4.0; + if (this._mountSpecificData == null) + this._mountSpecificData = (object) false; + bool mountSpecificData1 = (bool) this._mountSpecificData; + if (mountSpecificData1 && !flag3) + this._mountSpecificData = (object) false; + else if (!mountSpecificData1 & flag3) + { + this._mountSpecificData = (object) true; + Vector2 Position = mountedPlayer.Center + new Vector2((float) (mountedPlayer.width * mountedPlayer.direction), 0.0f); + Vector2 vector2_3 = new Vector2(40f, 30f); + float num13 = 6.283185f * Main.rand.NextFloat(); + for (float num14 = 0.0f; (double) num14 < 20.0; ++num14) + { + Dust dust = Main.dust[Dust.NewDust(Position, 0, 0, 228)]; + Vector2 vector2_4 = Vector2.UnitY.RotatedBy((double) num14 * 6.28318548202515 / 20.0 + (double) num13) * 0.8f; + dust.position = Position + vector2_4 * vector2_3; + dust.velocity = vector2_4 + new Vector2(this.RunSpeed - (float) Math.Sign(velocity.Length()), 0.0f); + if ((double) velocity.X > 0.0) + dust.velocity.X *= -1f; + if (Main.rand.Next(2) == 0) + dust.velocity *= 0.5f; + dust.noGravity = true; + dust.scale = (float) (1.5 + (double) Main.rand.NextFloat() * 0.800000011920929); + dust.fadeIn = 0.0f; + dust.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer); + } + } + int maxValue = (int) this.RunSpeed - (int) Math.Abs(velocity.X); + if (maxValue <= 0) + maxValue = 1; + if (Main.rand.Next(maxValue) == 0) + { + int Height = 22; + int num15 = mountedPlayer.width / 2 + 10; + Vector2 bottom = mountedPlayer.Bottom; + bottom.X -= (float) num15; + bottom.Y -= (float) (Height - 6); + Dust dust = Main.dust[Dust.NewDust(bottom, num15 * 2, Height, 228)]; + dust.velocity = Vector2.Zero; + dust.noGravity = true; + dust.noLight = true; + dust.scale = (float) (0.25 + (double) Main.rand.NextFloat() * 0.800000011920929); + dust.fadeIn = (float) (0.5 + (double) Main.rand.NextFloat() * 2.0); + dust.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer); + break; + } + break; + case 45: + bool flag4 = (double) Math.Abs(velocity.X) > (double) this.DashSpeed * 0.899999976158142; + if (this._mountSpecificData == null) + this._mountSpecificData = (object) false; + bool mountSpecificData2 = (bool) this._mountSpecificData; + if (mountSpecificData2 && !flag4) + this._mountSpecificData = (object) false; + else if (!mountSpecificData2 & flag4) + { + this._mountSpecificData = (object) true; + Vector2 Position = mountedPlayer.Center + new Vector2((float) (mountedPlayer.width * mountedPlayer.direction), 0.0f); + Vector2 vector2_5 = new Vector2(40f, 30f); + float num16 = 6.283185f * Main.rand.NextFloat(); + for (float num17 = 0.0f; (double) num17 < 20.0; ++num17) + { + Dust dust = Main.dust[Dust.NewDust(Position, 0, 0, 6)]; + Vector2 vector2_6 = Vector2.UnitY.RotatedBy((double) num17 * 6.28318548202515 / 20.0 + (double) num16) * 0.8f; + dust.position = Position + vector2_6 * vector2_5; + dust.velocity = vector2_6 + new Vector2(this.RunSpeed - (float) Math.Sign(velocity.Length()), 0.0f); + if ((double) velocity.X > 0.0) + dust.velocity.X *= -1f; + if (Main.rand.Next(2) == 0) + dust.velocity *= 0.5f; + dust.noGravity = true; + dust.scale = (float) (1.5 + (double) Main.rand.NextFloat() * 0.800000011920929); + dust.fadeIn = 0.0f; + dust.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer); + } + } + if (flag4) + { + int Type = (int) Utils.SelectRandom(Main.rand, (short) 6, (short) 6, (short) 31); + int num18 = 6; + Dust dust = Main.dust[Dust.NewDust(mountedPlayer.Center - new Vector2((float) num18, (float) (num18 - 12)), num18 * 2, num18 * 2, Type)]; + dust.velocity = mountedPlayer.velocity * 0.1f; + if (Main.rand.Next(2) == 0) + dust.noGravity = true; + dust.scale = (float) (0.699999988079071 + (double) Main.rand.NextFloat() * 0.800000011920929); + if (Main.rand.Next(3) == 0) + dust.fadeIn = 0.1f; + if (Type == 31) + { + dust.noGravity = true; + dust.scale *= 1.5f; + dust.fadeIn = 0.2f; + } + dust.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer); + break; + } + break; + case 46: + if (state != 0) + state = 1; + if (!this._aiming) + { + if (state == 0) + { + this._frameExtra = 12; + this._frameExtraCounter = 0.0f; + break; + } + if (this._frameExtra < 12) + this._frameExtra = 12; + this._frameExtraCounter += Math.Abs(velocity.X); + if ((double) this._frameExtraCounter >= 8.0) + { + this._frameExtraCounter = 0.0f; + ++this._frameExtra; + if (this._frameExtra >= 24) + { + this._frameExtra = 12; + break; + } + break; + } + break; + } + if (this._frameExtra < 24) + this._frameExtra = 24; + ++this._frameExtraCounter; + if ((double) this._frameExtraCounter >= 3.0) + { + this._frameExtraCounter = 0.0f; + ++this._frameExtra; + if (this._frameExtra >= 27) + { + this._frameExtra = 24; + break; + } + break; + } + break; + case 48: + state = 1; + break; + case 49: + if (state != 4 && mountedPlayer.wet) + this._frameState = state = 4; + double num19 = (double) velocity.Length(); + float num20 = mountedPlayer.velocity.Y * 0.05f; + if (mountedPlayer.direction < 0) + num20 *= -1f; + mountedPlayer.fullRotation = num20; + mountedPlayer.fullRotationOrigin = new Vector2((float) (mountedPlayer.width / 2), (float) (mountedPlayer.height / 2)); + break; + case 50: + if ((double) mountedPlayer.velocity.Y == 0.0) + { + this._frameExtraCounter = 0.0f; + this._frameExtra = 3; + break; + } + ++this._frameExtraCounter; + if (this.Flight()) + ++this._frameExtraCounter; + if ((double) this._frameExtraCounter > 7.0) + { + this._frameExtraCounter = 0.0f; + ++this._frameExtra; + if (this._frameExtra > 3) + { + this._frameExtra = 0; + break; + } + break; + } + break; + } + switch (state) + { + case 0: + if (this._data.idleFrameCount != 0) + { + if (this._type == 5) + { + if ((double) this._fatigue != 0.0) + { + if (this._idleTime == 0) + this._idleTimeNext = this._idleTime + 1; + } + else + { + this._idleTime = 0; + this._idleTimeNext = 2; + } + } + else if (this._idleTime == 0) + { + this._idleTimeNext = Main.rand.Next(900, 1500); + if (this._type == 17) + this._idleTimeNext = Main.rand.Next(120, 300); + } + ++this._idleTime; + } + ++this._frameCounter; + if (this._data.idleFrameCount != 0 && this._idleTime >= this._idleTimeNext) + { + float idleFrameDelay = (float) this._data.idleFrameDelay; + if (this._type == 5) + idleFrameDelay *= (float) (2.0 - 1.0 * (double) this._fatigue / (double) this._fatigueMax); + int num21 = (int) ((double) (this._idleTime - this._idleTimeNext) / (double) idleFrameDelay); + int idleFrameCount = this._data.idleFrameCount; + if (num21 >= idleFrameCount) + { + if (this._data.idleFrameLoop) + { + this._idleTime = this._idleTimeNext; + this._frame = this._data.idleFrameStart; + } + else + { + this._frameCounter = 0.0f; + this._frame = this._data.standingFrameStart; + this._idleTime = 0; + } + } + else + this._frame = this._data.idleFrameStart + num21; + if (this._type == 5) + this._frameExtra = this._frame; + if (this._type != 17) + break; + this._frameExtra = this._frame; + this._frame = 0; + break; + } + if ((double) this._frameCounter > (double) this._data.standingFrameDelay) + { + this._frameCounter -= (float) this._data.standingFrameDelay; + ++this._frame; + } + if (this._frame >= this._data.standingFrameStart && this._frame < this._data.standingFrameStart + this._data.standingFrameCount) + break; + this._frame = this._data.standingFrameStart; + break; + case 1: + float num22; + switch (this._type) + { + case 6: + num22 = this._flipDraw ? velocity.X : -velocity.X; + break; + case 9: + case 46: + num22 = !this._flipDraw ? Math.Abs(velocity.X) : -Math.Abs(velocity.X); + break; + case 13: + num22 = this._flipDraw ? velocity.X : -velocity.X; + break; + case 44: + num22 = Math.Max(1f, Math.Abs(velocity.X) * 0.25f); + break; + case 48: + num22 = Math.Max(0.5f, velocity.Length() * 0.125f); + break; + case 50: + num22 = Math.Abs(velocity.X) * 0.5f; + break; + default: + num22 = Math.Abs(velocity.X); + break; + } + this._frameCounter += num22; + if ((double) num22 >= 0.0) + { + if ((double) this._frameCounter > (double) this._data.runningFrameDelay) + { + this._frameCounter -= (float) this._data.runningFrameDelay; + ++this._frame; + } + if (this._frame >= this._data.runningFrameStart && this._frame < this._data.runningFrameStart + this._data.runningFrameCount) + break; + this._frame = this._data.runningFrameStart; + break; + } + if ((double) this._frameCounter < 0.0) + { + this._frameCounter += (float) this._data.runningFrameDelay; + --this._frame; + } + if (this._frame >= this._data.runningFrameStart && this._frame < this._data.runningFrameStart + this._data.runningFrameCount) + break; + this._frame = this._data.runningFrameStart + this._data.runningFrameCount - 1; + break; + case 2: + ++this._frameCounter; + if ((double) this._frameCounter > (double) this._data.inAirFrameDelay) + { + this._frameCounter -= (float) this._data.inAirFrameDelay; + ++this._frame; + } + if (this._frame < this._data.inAirFrameStart || this._frame >= this._data.inAirFrameStart + this._data.inAirFrameCount) + this._frame = this._data.inAirFrameStart; + if (this._type == 4) + { + if ((double) velocity.Y < 0.0) + { + this._frame = 3; + break; + } + this._frame = 6; + break; + } + if (this._type == 5) + { + this._frameExtraCounter += (float) (6.0 - 4.0 * (double) (this._fatigue / this._fatigueMax)); + if ((double) this._frameExtraCounter > (double) this._data.flyingFrameDelay) + { + ++this._frameExtra; + this._frameExtraCounter -= (float) this._data.flyingFrameDelay; + } + if (this._frameExtra >= this._data.flyingFrameStart && this._frameExtra < this._data.flyingFrameStart + this._data.flyingFrameCount) + break; + this._frameExtra = this._data.flyingFrameStart; + break; + } + if (this._type != 23) + break; + float num23 = mountedPlayer.velocity.Length(); + if ((double) num23 < 1.0) + { + this._frame = 0; + this._frameCounter = 0.0f; + break; + } + if ((double) num23 <= 5.0) + break; + ++this._frameCounter; + break; + case 3: + ++this._frameCounter; + if ((double) this._frameCounter > (double) this._data.flyingFrameDelay) + { + this._frameCounter -= (float) this._data.flyingFrameDelay; + ++this._frame; + } + if (this._frame >= this._data.flyingFrameStart && this._frame < this._data.flyingFrameStart + this._data.flyingFrameCount) + break; + this._frame = this._data.flyingFrameStart; + break; + case 4: + this._frameCounter += (float) (int) (((double) Math.Abs(velocity.X) + (double) Math.Abs(velocity.Y)) / 2.0); + if ((double) this._frameCounter > (double) this._data.swimFrameDelay) + { + this._frameCounter -= (float) this._data.swimFrameDelay; + ++this._frame; + } + if (this._frame < this._data.swimFrameStart || this._frame >= this._data.swimFrameStart + this._data.swimFrameCount) + this._frame = this._data.swimFrameStart; + if (this.Type != 37 || (double) velocity.X != 0.0) + break; + this._frame = 4; + break; + case 5: + float num24; + switch (this._type) + { + case 6: + num24 = this._flipDraw ? velocity.X : -velocity.X; + break; + case 9: + num24 = !this._flipDraw ? Math.Abs(velocity.X) : -Math.Abs(velocity.X); + break; + case 13: + num24 = this._flipDraw ? velocity.X : -velocity.X; + break; + default: + num24 = Math.Abs(velocity.X); + break; + } + this._frameCounter += num24; + if ((double) num24 >= 0.0) + { + if ((double) this._frameCounter > (double) this._data.dashingFrameDelay) + { + this._frameCounter -= (float) this._data.dashingFrameDelay; + ++this._frame; + } + if (this._frame >= this._data.dashingFrameStart && this._frame < this._data.dashingFrameStart + this._data.dashingFrameCount) + break; + this._frame = this._data.dashingFrameStart; + break; + } + if ((double) this._frameCounter < 0.0) + { + this._frameCounter += (float) this._data.dashingFrameDelay; + --this._frame; + } + if (this._frame >= this._data.dashingFrameStart && this._frame < this._data.dashingFrameStart + this._data.dashingFrameCount) + break; + this._frame = this._data.dashingFrameStart + this._data.dashingFrameCount - 1; + break; + } + } + + public void TryBeginningFlight(Player mountedPlayer, int state) + { + if (this._frameState == state || (state == 2 ? 1 : (state == 3 ? 1 : 0)) == 0 || !this.CanHover() || mountedPlayer.controlUp || mountedPlayer.controlDown || mountedPlayer.controlJump) + return; + Vector2 Velocity = Vector2.UnitY * mountedPlayer.gravDir; + if ((double) Collision.TileCollision(mountedPlayer.position + new Vector2(0.0f, -1f / 1000f), Velocity, mountedPlayer.width, mountedPlayer.height, gravDir: ((int) mountedPlayer.gravDir)).Y == 0.0) + return; + if (this.DoesHoverIgnoresFatigue()) + { + mountedPlayer.position.Y += -1f / 1000f; + } + else + { + float num = mountedPlayer.gravity * mountedPlayer.gravDir; + mountedPlayer.position.Y -= mountedPlayer.velocity.Y; + mountedPlayer.velocity.Y -= num; + } + } + + public int GetIntendedGroundedFrame(Player mountedPlayer) => ((double) mountedPlayer.velocity.X == 0.0 ? 1 : (!mountedPlayer.slippy && !mountedPlayer.slippy2 && !mountedPlayer.windPushed || mountedPlayer.controlLeft ? 0 : (!mountedPlayer.controlRight ? 1 : 0))) != 0 ? 0 : 1; + + public void TryLanding(Player mountedPlayer) + { + if ((this._frameState == 3 ? 1 : (this._frameState == 2 ? 1 : 0)) == 0 || mountedPlayer.controlUp || mountedPlayer.controlDown || mountedPlayer.controlJump) + return; + Vector2 Velocity = Vector2.UnitY * mountedPlayer.gravDir * 4f; + if ((double) Collision.TileCollision(mountedPlayer.position, Velocity, mountedPlayer.width, mountedPlayer.height, gravDir: ((int) mountedPlayer.gravDir)).Y != 0.0) + return; + this.UpdateFrame(mountedPlayer, this.GetIntendedGroundedFrame(mountedPlayer), mountedPlayer.velocity); + } + + private void UpdateFrame_GolfCart(Player mountedPlayer, int state, Vector2 velocity) + { + if (state != 2) + { + if ((double) this._frameExtraCounter != 0.0 || this._frameExtra != 0) + { + if ((double) this._frameExtraCounter == -1.0) + { + this._frameExtraCounter = 0.0f; + this._frameExtra = 1; + } + if ((double) ++this._frameExtraCounter >= 6.0) + { + this._frameExtraCounter = 0.0f; + if (this._frameExtra > 0) + --this._frameExtra; + } + } + else + { + this._frameExtra = 0; + this._frameExtraCounter = 0.0f; + } + } + else if ((double) velocity.Y >= 0.0) + { + if (this._frameExtra < 1) + this._frameExtra = 1; + if (this._frameExtra == 2) + this._frameExtraCounter = -1f; + else if ((double) ++this._frameExtraCounter >= 6.0) + { + this._frameExtraCounter = 0.0f; + if (this._frameExtra < 2) + ++this._frameExtra; + } + } + if ((state == 2 || state == 0 || state == 3 ? 0 : (state != 4 ? 1 : 0)) != 0) + { + Mount.EmitGolfCartWheelDust(mountedPlayer, mountedPlayer.Bottom + new Vector2((float) (mountedPlayer.direction * -20), 0.0f)); + Mount.EmitGolfCartWheelDust(mountedPlayer, mountedPlayer.Bottom + new Vector2((float) (mountedPlayer.direction * 20), 0.0f)); + } + Mount.EmitGolfCartlight(mountedPlayer.Bottom + new Vector2((float) (mountedPlayer.direction * 40), -20f), mountedPlayer.direction); + } + + private static void EmitGolfCartSmoke(Player mountedPlayer, bool rushing) + { + Vector2 Position = mountedPlayer.Bottom + new Vector2((float) (-mountedPlayer.direction * 34), (float) (-(double) mountedPlayer.gravDir * 12.0)); + Dust dust = Dust.NewDustDirect(Position, 0, 0, 31, (float) -mountedPlayer.direction, (float) (-(double) mountedPlayer.gravDir * 0.239999994635582), 100); + dust.position = Position; + dust.velocity *= 0.1f; + dust.velocity += new Vector2((float) -mountedPlayer.direction, (float) (-(double) mountedPlayer.gravDir * 0.25)); + dust.scale = 0.5f; + if ((double) mountedPlayer.velocity.X != 0.0) + dust.velocity += new Vector2((float) Math.Sign(mountedPlayer.velocity.X) * 1.3f, 0.0f); + if (!rushing) + return; + dust.fadeIn = 0.8f; + } + + private static void EmitGolfCartlight(Vector2 worldLocation, int playerDirection) + { + float num1 = 0.0f; + if (playerDirection == -1) + num1 = 3.141593f; + float num2 = (float) Math.PI / 32f; + int num3 = 5; + float num4 = 200f; + DelegateMethods.v2_1 = worldLocation.ToTileCoordinates().ToVector2(); + DelegateMethods.f_1 = num4 / 16f; + DelegateMethods.v3_1 = new Vector3(0.7f, 0.7f, 0.7f); + for (float num5 = 0.0f; (double) num5 < (double) num3; ++num5) + { + Vector2 rotationVector2 = (num1 + num2 * (num5 - (float) (num3 / 2))).ToRotationVector2(); + Utils.PlotTileLine(worldLocation, worldLocation + rotationVector2 * num4, 8f, new Utils.TileActionAttempt(DelegateMethods.CastLightOpen_StopForSolids_ScaleWithDistance)); + } + } + + private static bool ShouldGolfCartEmitLight() => true; + + private static void EmitGolfCartWheelDust(Player mountedPlayer, Vector2 legSpot) + { + if (Main.rand.Next(5) != 0) + return; + Point tileCoordinates = (legSpot + new Vector2(0.0f, mountedPlayer.gravDir * 2f)).ToTileCoordinates(); + if (!WorldGen.InWorld(tileCoordinates.X, tileCoordinates.Y, 10)) + return; + Tile tileSafely = Framing.GetTileSafely(tileCoordinates.X, tileCoordinates.Y); + if (!WorldGen.SolidTile(tileCoordinates)) + return; + int num = WorldGen.KillTile_GetTileDustAmount(true, tileSafely); + if (num > 1) + num = 1; + Vector2 vector2 = new Vector2((float) -mountedPlayer.direction, (float) (-(double) mountedPlayer.gravDir * 1.0)); + for (int index = 0; index < num; ++index) + { + Dust dust = Main.dust[WorldGen.KillTile_MakeTileDust(tileCoordinates.X, tileCoordinates.Y, tileSafely)]; + dust.velocity *= 0.2f; + dust.velocity += vector2; + dust.position = legSpot; + dust.scale *= 0.8f; + dust.fadeIn *= 0.8f; + } + } + + private void DoGemMinecartEffect(Player mountedPlayer, int dustType) + { + if (Main.rand.Next(10) != 0) + return; + Vector2 vector2_1 = Main.rand.NextVector2Square(-1f, 1f) * new Vector2(22f, 10f); + Vector2 vector2_2 = new Vector2(0.0f, 10f) * mountedPlayer.Directions; + Vector2 pos = mountedPlayer.Center + vector2_2 + vector2_1; + Dust dust = Dust.NewDustPerfect(mountedPlayer.RotatedRelativePoint(pos), dustType); + dust.noGravity = true; + dust.fadeIn = 0.6f; + dust.scale = 0.4f; + dust.velocity *= 0.25f; + dust.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer); + } + + private void DoSteamMinecartEffect(Player mountedPlayer, int dustType) + { + float num = Math.Abs(mountedPlayer.velocity.X); + if ((double) num < 1.0 || (double) num < 6.0 && this._frame != 0) + return; + Vector2 vector2_1 = Main.rand.NextVector2Square(-1f, 1f) * new Vector2(3f, 3f); + Vector2 vector2_2 = new Vector2(-10f, -4f) * mountedPlayer.Directions; + Vector2 pos = mountedPlayer.Center + vector2_2 + vector2_1; + Dust dust = Dust.NewDustPerfect(mountedPlayer.RotatedRelativePoint(pos), dustType); + dust.noGravity = true; + dust.fadeIn = 0.6f; + dust.scale = 1.8f; + dust.velocity *= 0.25f; + dust.velocity.Y -= 2f; + dust.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer); + } + + private void DoExhaustMinecartEffect(Player mountedPlayer, int dustType) + { + float num1 = mountedPlayer.velocity.Length(); + if ((double) num1 < 1.0 && Main.rand.Next(4) != 0) + return; + int num2 = 1 + (int) num1 / 6; + while (num2 > 0) + { + --num2; + Vector2 vector2_1 = Main.rand.NextVector2Square(-1f, 1f) * new Vector2(3f, 3f); + Vector2 vector2_2 = new Vector2(-18f, 20f) * mountedPlayer.Directions; + if ((double) num1 > 6.0) + vector2_2.X += (float) (4 * mountedPlayer.direction); + if (num2 > 0) + vector2_2 += mountedPlayer.velocity * (float) (num2 / 3); + Vector2 pos = mountedPlayer.Center + vector2_2 + vector2_1; + Dust dust = Dust.NewDustPerfect(mountedPlayer.RotatedRelativePoint(pos), dustType); + dust.noGravity = true; + dust.fadeIn = 0.6f; + dust.scale = 1.2f; + dust.velocity *= 0.2f; + if ((double) num1 < 1.0) + dust.velocity.X -= 0.5f * (float) mountedPlayer.direction; + dust.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer); + } + } + + private void DoConfettiMinecartEffect(Player mountedPlayer) + { + float num1 = mountedPlayer.velocity.Length(); + if ((double) num1 < 1.0 && Main.rand.Next(6) != 0 || (double) num1 < 3.0 && Main.rand.Next(3) != 0) + return; + int num2 = 1 + (int) num1 / 6; + while (num2 > 0) + { + --num2; + float num3 = Main.rand.NextFloat() * 2f; + Vector2 vector2_1 = Main.rand.NextVector2Square(-1f, 1f) * new Vector2(3f, 8f); + Vector2 vector2_2 = new Vector2(-18f, 4f) * mountedPlayer.Directions; + vector2_2.X += (float) ((double) num1 * (double) mountedPlayer.direction * 0.5 + (double) (mountedPlayer.direction * num2) * (double) num3); + if (num2 > 0) + vector2_2 += mountedPlayer.velocity * (float) (num2 / 3); + Vector2 pos = mountedPlayer.Center + vector2_2 + vector2_1; + Dust dust = Dust.NewDustPerfect(mountedPlayer.RotatedRelativePoint(pos), 139 + Main.rand.Next(4)); + dust.noGravity = true; + dust.fadeIn = 0.6f; + dust.scale = (float) (0.5 + (double) num3 / 2.0); + dust.velocity *= 0.2f; + if ((double) num1 < 1.0) + dust.velocity.X -= 0.5f * (float) mountedPlayer.direction; + dust.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer); + } + } + + public void UpdateEffects(Player mountedPlayer) + { + mountedPlayer.autoJump = this.AutoJump; + switch (this._type) + { + case 8: + if (mountedPlayer.ownedProjectileCounts[453] >= 1) + break; + this._abilityActive = false; + break; + case 9: + case 46: + if (this._type == 46) + mountedPlayer.hasJumpOption_Santank = true; + Vector2 center = mountedPlayer.Center; + Vector2 mousePosition = center; + bool flag1 = false; + float num1 = 1500f; + float num2 = 500f; + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.CanBeChasedBy((object) this)) + { + Vector2 v = npc.Center - center; + float num3 = v.Length(); + if ((double) num3 < (double) num2 && ((double) Vector2.Distance(mousePosition, center) > (double) num3 && (double) num3 < (double) num1 || !flag1)) + { + bool flag2 = true; + float num4 = Math.Abs(v.ToRotation()); + if (mountedPlayer.direction == 1 && (double) num4 > 1.04719759490799) + flag2 = false; + else if (mountedPlayer.direction == -1 && (double) num4 < 2.09439514610459) + flag2 = false; + if (Collision.CanHitLine(center, 0, 0, npc.position, npc.width, npc.height) & flag2) + { + num1 = num3; + mousePosition = npc.Center; + flag1 = true; + } + } + } + } + if (flag1) + { + bool flag3 = this._abilityCooldown == 0; + if (this._type == 46) + flag3 = this._abilityCooldown % 10 == 0; + if (flag3 && mountedPlayer.whoAmI == Main.myPlayer) + { + this.AimAbility(mountedPlayer, mousePosition); + if (this._abilityCooldown == 0) + this.StopAbilityCharge(); + this.UseAbility(mountedPlayer, mousePosition, false); + break; + } + this.AimAbility(mountedPlayer, mousePosition); + this._abilityCharging = true; + break; + } + this._abilityCharging = false; + this.ResetHeadPosition(); + break; + case 10: + mountedPlayer.hasJumpOption_Unicorn = true; + if ((double) Math.Abs(mountedPlayer.velocity.X) > (double) mountedPlayer.mount.DashSpeed - (double) mountedPlayer.mount.RunSpeed / 2.0) + mountedPlayer.noKnockback = true; + if (mountedPlayer.itemAnimation <= 0 || mountedPlayer.inventory[mountedPlayer.selectedItem].type != 1260) + break; + AchievementsHelper.HandleSpecialEvent(mountedPlayer, 5); + break; + case 11: + Vector3 vector3_1 = new Vector3(0.4f, 0.12f, 0.15f); + float num5 = (float) (1.0 + (double) Math.Abs(mountedPlayer.velocity.X) / (double) this.RunSpeed * 2.5); + mountedPlayer.statDefense += (int) (2.0 * (double) num5); + int num6 = Math.Sign(mountedPlayer.velocity.X); + if (num6 == 0) + num6 = mountedPlayer.direction; + if (Main.netMode != 2) + { + Vector3 vector3_2 = vector3_1 * num5; + Lighting.AddLight(mountedPlayer.Center, vector3_2.X, vector3_2.Y, vector3_2.Z); + Lighting.AddLight(mountedPlayer.Top, vector3_2.X, vector3_2.Y, vector3_2.Z); + Lighting.AddLight(mountedPlayer.Bottom, vector3_2.X, vector3_2.Y, vector3_2.Z); + Lighting.AddLight(mountedPlayer.Left, vector3_2.X, vector3_2.Y, vector3_2.Z); + Lighting.AddLight(mountedPlayer.Right, vector3_2.X, vector3_2.Y, vector3_2.Z); + float num7 = -24f; + if (mountedPlayer.direction != num6) + num7 = -22f; + if (num6 == -1) + ++num7; + Vector2 vector2_1 = new Vector2(num7 * (float) num6, -19f).RotatedBy((double) mountedPlayer.fullRotation); + Vector2 vector2_2 = new Vector2(MathHelper.Lerp(0.0f, -8f, mountedPlayer.fullRotation / 0.7853982f), MathHelper.Lerp(0.0f, 2f, Math.Abs(mountedPlayer.fullRotation / 0.7853982f))).RotatedBy((double) mountedPlayer.fullRotation); + if (num6 == Math.Sign(mountedPlayer.fullRotation)) + vector2_2 *= MathHelper.Lerp(1f, 0.6f, Math.Abs(mountedPlayer.fullRotation / 0.7853982f)); + Vector2 vector2_3 = mountedPlayer.Bottom + vector2_1 + vector2_2; + Vector2 vector2_4 = mountedPlayer.oldPosition + mountedPlayer.Size * new Vector2(0.5f, 1f) + vector2_1 + vector2_2; + if ((double) Vector2.Distance(vector2_3, vector2_4) > 3.0) + { + int num8 = (int) Vector2.Distance(vector2_3, vector2_4) / 3; + if ((double) Vector2.Distance(vector2_3, vector2_4) % 3.0 != 0.0) + ++num8; + for (float num9 = 1f; (double) num9 <= (double) num8; ++num9) + { + Dust dust = Main.dust[Dust.NewDust(mountedPlayer.Center, 0, 0, 182)]; + dust.position = Vector2.Lerp(vector2_4, vector2_3, num9 / (float) num8); + dust.noGravity = true; + dust.velocity = Vector2.Zero; + dust.customData = (object) mountedPlayer; + dust.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMinecart, mountedPlayer); + } + } + else + { + Dust dust = Main.dust[Dust.NewDust(mountedPlayer.Center, 0, 0, 182)]; + dust.position = vector2_3; + dust.noGravity = true; + dust.velocity = Vector2.Zero; + dust.customData = (object) mountedPlayer; + dust.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMinecart, mountedPlayer); + } + } + if (mountedPlayer.whoAmI != Main.myPlayer || (double) mountedPlayer.velocity.X == 0.0) + break; + Vector2 minecartMechPoint = Mount.GetMinecartMechPoint(mountedPlayer, 20, -19); + int num10 = 60; + int num11 = 0; + float num12 = 0.0f; + for (int index1 = 0; index1 < 200; ++index1) + { + NPC npc = Main.npc[index1]; + if (npc.active && npc.immune[mountedPlayer.whoAmI] <= 0 && !npc.dontTakeDamage && (double) npc.Distance(minecartMechPoint) < 300.0 && npc.CanBeChasedBy((object) mountedPlayer) && Collision.CanHitLine(npc.position, npc.width, npc.height, minecartMechPoint, 0, 0) && (double) Math.Abs(MathHelper.WrapAngle(MathHelper.WrapAngle(npc.AngleFrom(minecartMechPoint)) - MathHelper.WrapAngle((double) mountedPlayer.fullRotation + (double) num6 == -1.0 ? 3.141593f : 0.0f))) < 0.785398185253143) + { + Vector2 v = npc.position + npc.Size * Utils.RandomVector2(Main.rand, 0.0f, 1f) - minecartMechPoint; + num12 += v.ToRotation(); + ++num11; + int index2 = Projectile.NewProjectile(minecartMechPoint.X, minecartMechPoint.Y, v.X, v.Y, 591, 0, 0.0f, mountedPlayer.whoAmI, (float) mountedPlayer.whoAmI); + Main.projectile[index2].Center = npc.Center; + Main.projectile[index2].damage = num10; + Main.projectile[index2].Damage(); + Main.projectile[index2].damage = 0; + Main.projectile[index2].Center = minecartMechPoint; + } + } + break; + case 12: + if (mountedPlayer.MountFishronSpecial) + { + Vector3 vector3_3 = Colors.CurrentLiquidColor.ToVector3() * 0.4f; + Point tileCoordinates = (mountedPlayer.Center + Vector2.UnitX * (float) mountedPlayer.direction * 20f + mountedPlayer.velocity * 10f).ToTileCoordinates(); + if (!WorldGen.SolidTile(tileCoordinates.X, tileCoordinates.Y)) + Lighting.AddLight(tileCoordinates.X, tileCoordinates.Y, vector3_3.X, vector3_3.Y, vector3_3.Z); + else + Lighting.AddLight(mountedPlayer.Center + Vector2.UnitX * (float) mountedPlayer.direction * 20f, vector3_3.X, vector3_3.Y, vector3_3.Z); + mountedPlayer.meleeDamage += 0.15f; + mountedPlayer.rangedDamage += 0.15f; + mountedPlayer.magicDamage += 0.15f; + mountedPlayer.minionDamage += 0.15f; + } + if (mountedPlayer.statLife <= mountedPlayer.statLifeMax2 / 2) + mountedPlayer.MountFishronSpecialCounter = 60f; + if (!mountedPlayer.wet && (!Main.raining || !WorldGen.InAPlaceWithWind(mountedPlayer.position, mountedPlayer.width, mountedPlayer.height))) + break; + mountedPlayer.MountFishronSpecialCounter = 420f; + break; + case 14: + mountedPlayer.hasJumpOption_Basilisk = true; + if ((double) Math.Abs(mountedPlayer.velocity.X) <= (double) mountedPlayer.mount.DashSpeed - (double) mountedPlayer.mount.RunSpeed / 2.0) + break; + mountedPlayer.noKnockback = true; + break; + case 16: + mountedPlayer.ignoreWater = true; + break; + case 22: + mountedPlayer.lavaMax += 420; + Vector2 pos1 = mountedPlayer.Center + new Vector2(20f, 10f) * mountedPlayer.Directions; + Vector2 pos2 = pos1 + mountedPlayer.velocity; + Vector2 pos3 = pos1 + new Vector2(-1f, -0.5f) * mountedPlayer.Directions; + Vector2 vector2_5 = mountedPlayer.RotatedRelativePoint(pos1); + Vector2 vector2_6 = mountedPlayer.RotatedRelativePoint(pos2); + Vector2 vector2_7 = mountedPlayer.RotatedRelativePoint(pos3); + Vector2 vector2_8 = mountedPlayer.shadowPos[2] - mountedPlayer.position + vector2_5; + Vector2 vector2_9 = vector2_6 - vector2_5; + Vector2 vector2_10 = vector2_5 + vector2_9; + Vector2 vector2_11 = vector2_8 + vector2_9; + Vector2 vector2_12 = vector2_6 - vector2_7; + float num13 = MathHelper.Clamp(mountedPlayer.velocity.Length() / 5f, 0.0f, 1f); + for (float amount = 0.0f; (double) amount <= 1.0; amount += 0.1f) + { + if ((double) Main.rand.NextFloat() >= (double) num13) + { + Dust dust = Dust.NewDustPerfect(Vector2.Lerp(vector2_11, vector2_10, amount), 65, new Vector2?(Main.rand.NextVector2Circular(0.5f, 0.5f) * num13)); + dust.scale = 0.6f; + dust.fadeIn = 0.0f; + dust.customData = (object) mountedPlayer; + dust.velocity *= -1f; + dust.noGravity = true; + dust.velocity -= vector2_12; + if (Main.rand.Next(10) == 0) + { + dust.fadeIn = 1.3f; + dust.velocity = Main.rand.NextVector2Circular(3f, 3f) * num13; + } + } + } + break; + case 23: + Vector2 pos4 = mountedPlayer.Center + this.GetWitchBroomTrinketOriginOffset(mountedPlayer) + (this.GetWitchBroomTrinketRotation(mountedPlayer) + 1.570796f).ToRotationVector2() * 11f; + Vector3 rgb = new Vector3(1f, 0.75f, 0.5f) * 0.85f; + Vector2 vector2_13 = mountedPlayer.RotatedRelativePoint(pos4); + Lighting.AddLight(vector2_13, rgb); + if (Main.rand.Next(45) == 0) + { + Vector2 vector2_14 = Main.rand.NextVector2Circular(4f, 4f); + Dust dust = Dust.NewDustPerfect(vector2_13 + vector2_14, 43, new Vector2?(Vector2.Zero), 254, new Color((int) byte.MaxValue, (int) byte.MaxValue, 0, (int) byte.MaxValue), 0.3f); + if (vector2_14 != Vector2.Zero) + dust.velocity = vector2_13.DirectionTo(dust.position) * 0.2f; + dust.fadeIn = 0.3f; + dust.noLightEmittence = true; + dust.customData = (object) mountedPlayer; + dust.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer); + } + float num14 = 0.1f + mountedPlayer.velocity.Length() / 30f; + Vector2 pos5 = mountedPlayer.Center + new Vector2((float) (18.0 - 20.0 * (double) Main.rand.NextFloat() * (double) mountedPlayer.direction), 12f); + Vector2 pos6 = mountedPlayer.Center + new Vector2((float) (52 * mountedPlayer.direction), -6f); + Vector2 vector2_15 = mountedPlayer.RotatedRelativePoint(pos5); + Vector2 Origin = mountedPlayer.RotatedRelativePoint(pos6); + if ((double) Main.rand.NextFloat() > (double) num14) + break; + float num15 = Main.rand.NextFloat(); + for (float num16 = 0.0f; (double) num16 < 1.0; num16 += 0.125f) + { + if (Main.rand.Next(15) == 0) + { + Vector2 vector2_16 = ((6.283185f * num16 + num15).ToRotationVector2() * new Vector2(0.5f, 1f) * 4f).RotatedBy((double) mountedPlayer.fullRotation); + Dust dust = Dust.NewDustPerfect(vector2_15 + vector2_16, 43, new Vector2?(Vector2.Zero), 254, new Color((int) byte.MaxValue, (int) byte.MaxValue, 0, (int) byte.MaxValue), 0.3f); + dust.velocity = vector2_16 * 0.025f + Origin.DirectionTo(dust.position) * 0.5f; + dust.fadeIn = 0.3f; + dust.noLightEmittence = true; + dust.shader = GameShaders.Armor.GetSecondaryShader(mountedPlayer.cMount, mountedPlayer); + } + } + break; + case 24: + DelegateMethods.v3_1 = new Vector3(0.1f, 0.3f, 1f) * 0.4f; + Utils.PlotTileLine(mountedPlayer.MountedCenter, mountedPlayer.MountedCenter + mountedPlayer.velocity * 6f, 40f, new Utils.TileActionAttempt(DelegateMethods.CastLightOpen)); + Utils.PlotTileLine(mountedPlayer.Left, mountedPlayer.Right, 40f, new Utils.TileActionAttempt(DelegateMethods.CastLightOpen)); + break; + case 25: + this.DoGemMinecartEffect(mountedPlayer, 86); + break; + case 26: + this.DoGemMinecartEffect(mountedPlayer, 87); + break; + case 27: + this.DoGemMinecartEffect(mountedPlayer, 88); + break; + case 28: + this.DoGemMinecartEffect(mountedPlayer, 89); + break; + case 29: + this.DoGemMinecartEffect(mountedPlayer, 90); + break; + case 30: + this.DoGemMinecartEffect(mountedPlayer, 91); + break; + case 31: + this.DoGemMinecartEffect(mountedPlayer, 262); + break; + case 32: + this.DoExhaustMinecartEffect(mountedPlayer, 31); + break; + case 34: + this.DoConfettiMinecartEffect(mountedPlayer); + break; + case 36: + this.DoSteamMinecartEffect(mountedPlayer, 303); + break; + case 37: + mountedPlayer.canFloatInWater = true; + mountedPlayer.accFlipper = true; + break; + case 40: + case 41: + case 42: + if ((double) Math.Abs(mountedPlayer.velocity.X) <= (double) mountedPlayer.mount.DashSpeed - (double) mountedPlayer.mount.RunSpeed / 2.0) + break; + mountedPlayer.noKnockback = true; + break; + case 47: + mountedPlayer.hasJumpOption_WallOfFleshGoat = true; + if ((double) Math.Abs(mountedPlayer.velocity.X) <= (double) mountedPlayer.mount.DashSpeed - (double) mountedPlayer.mount.RunSpeed / 2.0) + break; + mountedPlayer.noKnockback = true; + break; + } + } + + public static Vector2 GetMinecartMechPoint(Player mountedPlayer, int offX, int offY) + { + int num1 = Math.Sign(mountedPlayer.velocity.X); + if (num1 == 0) + num1 = mountedPlayer.direction; + float num2 = (float) offX; + int num3 = Math.Sign(offX); + if (mountedPlayer.direction != num1) + num2 -= (float) num3; + if (num1 == -1) + num2 -= (float) num3; + Vector2 vector2_1 = new Vector2(num2 * (float) num1, (float) offY).RotatedBy((double) mountedPlayer.fullRotation); + Vector2 vector2_2 = new Vector2(MathHelper.Lerp(0.0f, -8f, mountedPlayer.fullRotation / 0.7853982f), MathHelper.Lerp(0.0f, 2f, Math.Abs(mountedPlayer.fullRotation / 0.7853982f))).RotatedBy((double) mountedPlayer.fullRotation); + if (num1 == Math.Sign(mountedPlayer.fullRotation)) + vector2_2 *= MathHelper.Lerp(1f, 0.6f, Math.Abs(mountedPlayer.fullRotation / 0.7853982f)); + return mountedPlayer.Bottom + vector2_1 + vector2_2; + } + + public void ResetFlightTime(float xVelocity) + { + this._flyTime = this._active ? this._data.flightTimeMax : 0; + if (this._type != 0) + return; + this._flyTime += (int) ((double) Math.Abs(xVelocity) * 20.0); + } + + public void CheckMountBuff(Player mountedPlayer) + { + if (this._type == -1) + return; + for (int index = 0; index < 22; ++index) + { + if (mountedPlayer.buffType[index] == this._data.buff || this.Cart && mountedPlayer.buffType[index] == this._data.extraBuff) + return; + } + this.Dismount(mountedPlayer); + } + + public void ResetHeadPosition() + { + if (!this._aiming) + return; + this._aiming = false; + if (this._type != 46) + this._frameExtra = 0; + this._flipDraw = false; + } + + private Vector2 ClampToDeadZone(Player mountedPlayer, Vector2 position) + { + int y; + int x; + switch (this._type) + { + case 8: + y = (int) Mount.drillTextureSize.Y; + x = (int) Mount.drillTextureSize.X; + break; + case 9: + y = (int) Mount.scutlixTextureSize.Y; + x = (int) Mount.scutlixTextureSize.X; + break; + case 46: + y = (int) Mount.santankTextureSize.Y; + x = (int) Mount.santankTextureSize.X; + break; + default: + return position; + } + Vector2 center = mountedPlayer.Center; + position -= center; + if ((double) position.X > (double) -x && (double) position.X < (double) x && (double) position.Y > (double) -y && (double) position.Y < (double) y) + { + float num1 = (float) x / Math.Abs(position.X); + float num2 = (float) y / Math.Abs(position.Y); + if ((double) num1 > (double) num2) + position *= num2; + else + position *= num1; + } + return position + center; + } + + public bool AimAbility(Player mountedPlayer, Vector2 mousePosition) + { + this._aiming = true; + switch (this._type) + { + case 8: + Vector2 v = this.ClampToDeadZone(mountedPlayer, mousePosition) - mountedPlayer.Center; + Mount.DrillMountData mountSpecificData = (Mount.DrillMountData) this._mountSpecificData; + float rotation = v.ToRotation(); + if ((double) rotation < 0.0) + rotation += 6.283185f; + mountSpecificData.diodeRotationTarget = rotation; + float num1 = mountSpecificData.diodeRotation % 6.283185f; + if ((double) num1 < 0.0) + num1 += 6.283185f; + if ((double) num1 < (double) rotation) + { + if ((double) rotation - (double) num1 > 3.14159274101257) + num1 += 6.283185f; + } + else if ((double) num1 - (double) rotation > 3.14159274101257) + num1 -= 6.283185f; + mountSpecificData.diodeRotation = num1; + mountSpecificData.crosshairPosition = mousePosition; + return true; + case 9: + int frameExtra1 = this._frameExtra; + int direction1 = mountedPlayer.direction; + float num2 = MathHelper.ToDegrees((this.ClampToDeadZone(mountedPlayer, mousePosition) - mountedPlayer.Center).ToRotation()); + if ((double) num2 > 90.0) + { + mountedPlayer.direction = -1; + num2 = 180f - num2; + } + else if ((double) num2 < -90.0) + { + mountedPlayer.direction = -1; + num2 = -180f - num2; + } + else + mountedPlayer.direction = 1; + this._flipDraw = mountedPlayer.direction > 0 && (double) mountedPlayer.velocity.X < 0.0 || mountedPlayer.direction < 0 && (double) mountedPlayer.velocity.X > 0.0; + if ((double) num2 >= 0.0) + { + if ((double) num2 < 22.5) + this._frameExtra = 8; + else if ((double) num2 < 67.5) + this._frameExtra = 9; + else if ((double) num2 < 112.5) + this._frameExtra = 10; + } + else if ((double) num2 > -22.5) + this._frameExtra = 8; + else if ((double) num2 > -67.5) + this._frameExtra = 7; + else if ((double) num2 > -112.5) + this._frameExtra = 6; + float abilityCharge = this.AbilityCharge; + if ((double) abilityCharge > 0.0) + { + Vector2 vector2_1; + vector2_1.X = mountedPlayer.position.X + (float) (mountedPlayer.width / 2); + vector2_1.Y = mountedPlayer.position.Y + (float) mountedPlayer.height; + int num3 = (this._frameExtra - 6) * 2; + for (int index = 0; index < 2; ++index) + { + Vector2 vector2_2; + vector2_2.Y = vector2_1.Y + Mount.scutlixEyePositions[num3 + index].Y; + vector2_2.X = mountedPlayer.direction != -1 ? vector2_1.X + Mount.scutlixEyePositions[num3 + index].X + (float) this._data.xOffset : vector2_1.X - Mount.scutlixEyePositions[num3 + index].X - (float) this._data.xOffset; + Lighting.AddLight((int) ((double) vector2_2.X / 16.0), (int) ((double) vector2_2.Y / 16.0), 1f * abilityCharge, 0.0f, 0.0f); + } + } + return this._frameExtra != frameExtra1 || mountedPlayer.direction != direction1; + case 46: + int frameExtra2 = this._frameExtra; + int direction2 = mountedPlayer.direction; + float degrees = MathHelper.ToDegrees((this.ClampToDeadZone(mountedPlayer, mousePosition) - mountedPlayer.Center).ToRotation()); + float num4; + if ((double) degrees > 90.0) + { + mountedPlayer.direction = -1; + num4 = 180f - degrees; + } + else if ((double) degrees < -90.0) + { + mountedPlayer.direction = -1; + num4 = -180f - degrees; + } + else + mountedPlayer.direction = 1; + this._flipDraw = mountedPlayer.direction > 0 && (double) mountedPlayer.velocity.X < 0.0 || mountedPlayer.direction < 0 && (double) mountedPlayer.velocity.X > 0.0; + if ((double) this.AbilityCharge > 0.0) + { + Vector2 vector2_3; + vector2_3.X = mountedPlayer.position.X + (float) (mountedPlayer.width / 2); + vector2_3.Y = mountedPlayer.position.Y + (float) mountedPlayer.height; + for (int index = 0; index < 2; ++index) + { + Vector2 vector2_4 = new Vector2(vector2_3.X + (float) (mountedPlayer.width * mountedPlayer.direction), vector2_3.Y - 12f); + Lighting.AddLight((int) ((double) vector2_4.X / 16.0), (int) ((double) vector2_4.Y / 16.0), 0.7f, 0.4f, 0.4f); + } + } + return this._frameExtra != frameExtra2 || mountedPlayer.direction != direction2; + default: + return false; + } + } + + public void Draw( + List playerDrawData, + int drawType, + Player drawPlayer, + Vector2 Position, + Color drawColor, + SpriteEffects playerEffect, + float shadow) + { + if (playerDrawData == null) + return; + Texture2D texture1; + Texture2D texture2; + switch (drawType) + { + case 0: + texture1 = this._data.backTexture.Value; + texture2 = this._data.backTextureGlow.Value; + break; + case 1: + texture1 = this._data.backTextureExtra.Value; + texture2 = this._data.backTextureExtraGlow.Value; + break; + case 2: + if (this._type == 0 && this._idleTime >= this._idleTimeNext) + return; + texture1 = this._data.frontTexture.Value; + texture2 = this._data.frontTextureGlow.Value; + break; + case 3: + texture1 = this._data.frontTextureExtra.Value; + texture2 = this._data.frontTextureExtraGlow.Value; + break; + default: + texture1 = (Texture2D) null; + texture2 = (Texture2D) null; + break; + } + if (this._type == 50 && texture1 != null) + { + PlayerQueenSlimeMountTextureContent queenSlimeMount = TextureAssets.RenderTargets.QueenSlimeMount; + queenSlimeMount.Request(); + if (queenSlimeMount.IsReady) + texture1 = (Texture2D) queenSlimeMount.GetTarget(); + } + if (texture1 == null) + return; + switch (this._type) + { + case 0: + case 9: + if (drawType == 3 && (double) shadow != 0.0) + return; + break; + } + int xoffset = this.XOffset; + int num1 = this.YOffset + this.PlayerOffset; + if (drawPlayer.direction <= 0 && (!this.Cart || !this.Directional)) + xoffset *= -1; + Position.X = (float) (int) ((double) Position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2) + (double) xoffset); + Position.Y = (float) (int) ((double) Position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + (double) num1); + bool flag1 = true; + int num2 = this._data.totalFrames; + int num3 = this._data.textureHeight; + int num4; + switch (this._type) + { + case 5: + switch (drawType) + { + case 0: + num4 = this._frame; + break; + case 1: + num4 = this._frameExtra; + break; + default: + num4 = 0; + break; + } + break; + case 9: + switch (drawType) + { + case 0: + num4 = this._frame; + break; + case 2: + num4 = this._frameExtra; + break; + case 3: + num4 = this._frameExtra; + break; + default: + num4 = 0; + break; + } + break; + case 17: + num3 = texture1.Height; + switch (drawType) + { + case 0: + num4 = this._frame; + num2 = 4; + break; + case 1: + num4 = this._frameExtra; + num2 = 4; + break; + default: + num4 = 0; + break; + } + break; + case 23: + num4 = this._frame; + break; + case 39: + num3 = texture1.Height; + switch (drawType) + { + case 2: + num4 = this._frame; + num2 = 3; + break; + case 3: + num4 = this._frameExtra; + num2 = 6; + break; + default: + num4 = 0; + break; + } + break; + case 46: + switch (drawType) + { + case 2: + num4 = this._frame; + break; + case 3: + num4 = this._frameExtra; + break; + default: + num4 = 0; + break; + } + break; + default: + num4 = this._frame; + break; + } + int height = num3 / num2; + Rectangle rectangle1 = new Rectangle(0, height * num4, this._data.textureWidth, height); + if (flag1) + rectangle1.Height -= 2; + switch (this._type) + { + case 0: + if (drawType == 3) + { + drawColor = Color.White; + break; + } + break; + case 7: + if (drawType == 3) + { + drawColor = new Color(250, 250, 250, (int) byte.MaxValue) * drawPlayer.stealth * (1f - shadow); + break; + } + break; + case 9: + if (drawType == 3) + { + if (this._abilityCharge == 0) + return; + drawColor = Color.Multiply(Color.White, (float) this._abilityCharge / (float) this._data.abilityChargeMax); + drawColor.A = (byte) 0; + break; + } + break; + } + Color color1 = new Color(drawColor.ToVector4() * 0.25f + new Vector4(0.75f)); + switch (this._type) + { + case 11: + if (drawType == 2) + { + color1 = Color.White; + color1.A = (byte) 127; + break; + } + break; + case 12: + if (drawType == 0) + { + float num5 = MathHelper.Clamp(drawPlayer.MountFishronSpecialCounter / 60f, 0.0f, 1f); + Color color2 = Colors.CurrentLiquidColor; + if (color2 == Color.Transparent) + color2 = Color.White; + color2.A = (byte) 127; + color1 = color2 * num5; + break; + } + break; + case 24: + if (drawType == 2) + { + color1 = Color.SkyBlue * 0.5f; + color1.A = (byte) 20; + break; + } + break; + case 45: + if (drawType == 2) + { + color1 = new Color(150, 110, 110, 100); + break; + } + break; + } + float rotation1 = 0.0f; + switch (this._type) + { + case 7: + rotation1 = drawPlayer.fullRotation; + break; + case 8: + Mount.DrillMountData mountSpecificData1 = (Mount.DrillMountData) this._mountSpecificData; + switch (drawType) + { + case 0: + rotation1 = mountSpecificData1.outerRingRotation - rotation1; + break; + case 3: + rotation1 = mountSpecificData1.diodeRotation - rotation1 - drawPlayer.fullRotation; + break; + } + break; + } + Vector2 origin = this.Origin; + int type = this._type; + float scale1 = 1f; + SpriteEffects effect; + switch (this._type) + { + case 6: + case 13: + effect = this._flipDraw ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + break; + case 7: + effect = SpriteEffects.None; + break; + case 8: + effect = drawPlayer.direction != 1 || drawType != 2 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + break; + default: + effect = playerEffect; + break; + } + if (MountID.Sets.FacePlayersVelocity[this._type]) + effect = Math.Sign(drawPlayer.velocity.X) == -drawPlayer.direction ? playerEffect ^ SpriteEffects.FlipHorizontally : playerEffect; + bool flag2 = false; + DrawData drawData; + switch (this._type) + { + case 35: + if (drawType == 2) + { + Mount.ExtraFrameMountData mountSpecificData2 = (Mount.ExtraFrameMountData) this._mountSpecificData; + int num6 = -36; + if (effect.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + num6 *= -1; + Vector2 vector2 = new Vector2((float) num6, -26f); + if ((double) shadow == 0.0) + { + if ((double) Math.Abs(drawPlayer.velocity.X) > 1.0) + { + mountSpecificData2.frameCounter += Math.Min(2f, Math.Abs(drawPlayer.velocity.X * 0.4f)); + while ((double) mountSpecificData2.frameCounter > 6.0) + { + mountSpecificData2.frameCounter -= 6f; + ++mountSpecificData2.frame; + if (mountSpecificData2.frame > 2 && mountSpecificData2.frame < 5 || mountSpecificData2.frame > 7) + mountSpecificData2.frame = 0; + } + } + else + { + ++mountSpecificData2.frameCounter; + while ((double) mountSpecificData2.frameCounter > 6.0) + { + mountSpecificData2.frameCounter -= 6f; + ++mountSpecificData2.frame; + if (mountSpecificData2.frame > 5) + mountSpecificData2.frame = 5; + } + } + } + Texture2D texture2D = TextureAssets.Extra[142].Value; + Rectangle rectangle2 = texture2D.Frame(verticalFrames: 8, frameY: mountSpecificData2.frame); + if (flag1) + rectangle2.Height -= 2; + drawData = new DrawData(texture2D, Position + vector2, new Rectangle?(rectangle2), drawColor, rotation1, origin, scale1, effect, 0); + drawData.shader = Mount.currentShader; + playerDrawData.Add(drawData); + break; + } + break; + case 38: + if (drawType == 0) + { + int num7 = 0; + if (effect.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + num7 = 22; + Vector2 vector2 = new Vector2((float) num7, -10f); + Texture2D texture2D = TextureAssets.Extra[151].Value; + Rectangle rectangle3 = texture2D.Frame(); + drawData = new DrawData(texture2D, Position + vector2, new Rectangle?(rectangle3), drawColor, rotation1, origin, scale1, effect, 0); + drawData.shader = Mount.currentShader; + playerDrawData.Add(drawData); + flag2 = true; + break; + } + break; + case 50: + if (drawType == 0) + { + Vector2 position = Position + new Vector2(0.0f, (float) (8 - this.PlayerOffset + 20)); + Rectangle rectangle4 = new Rectangle(0, height * this._frameExtra, this._data.textureWidth, height); + if (flag1) + rectangle4.Height -= 2; + drawData = new DrawData(TextureAssets.Extra[207].Value, position, new Rectangle?(rectangle4), drawColor, rotation1, origin, scale1, effect, 0); + drawData.shader = Mount.currentShader; + playerDrawData.Add(drawData); + break; + } + break; + } + if (!flag2) + { + drawData = new DrawData(texture1, Position, new Rectangle?(rectangle1), drawColor, rotation1, origin, scale1, effect, 0); + drawData.shader = Mount.currentShader; + playerDrawData.Add(drawData); + if (texture2 != null) + { + drawData = new DrawData(texture2, Position, new Rectangle?(rectangle1), color1 * ((float) drawColor.A / (float) byte.MaxValue), rotation1, origin, scale1, effect, 0); + drawData.shader = Mount.currentShader; + } + playerDrawData.Add(drawData); + } + switch (this._type) + { + case 8: + if (drawType != 3) + break; + Mount.DrillMountData mountSpecificData3 = (Mount.DrillMountData) this._mountSpecificData; + Rectangle rectangle5 = new Rectangle(0, 0, 1, 1); + Vector2 vector2_1 = Mount.drillDiodePoint1.RotatedBy((double) mountSpecificData3.diodeRotation); + Vector2 vector2_2 = Mount.drillDiodePoint2.RotatedBy((double) mountSpecificData3.diodeRotation); + for (int index1 = 0; index1 < mountSpecificData3.beams.Length; ++index1) + { + Mount.DrillBeam beam = mountSpecificData3.beams[index1]; + if (!(beam.curTileTarget == Point16.NegativeOne)) + { + for (int index2 = 0; index2 < 2; ++index2) + { + Vector2 vector2_3 = new Vector2((float) ((int) beam.curTileTarget.X * 16 + 8), (float) ((int) beam.curTileTarget.Y * 16 + 8)) - Main.screenPosition - Position; + Vector2 vector2_4; + Color color3; + if (index2 == 0) + { + vector2_4 = vector2_1; + color3 = Color.CornflowerBlue; + } + else + { + vector2_4 = vector2_2; + color3 = Color.LightGreen; + } + color3.A = (byte) 128; + Color color4 = color3 * 0.5f; + Vector2 vector2_5 = vector2_4; + Vector2 v = vector2_3 - vector2_5; + float rotation2 = v.ToRotation(); + Vector2 scale2 = new Vector2(2f, v.Length()); + drawData = new DrawData(TextureAssets.MagicPixel.Value, vector2_4 + Position, new Rectangle?(rectangle5), color4, rotation2 - 1.570796f, Vector2.Zero, scale2, SpriteEffects.None, 0); + drawData.ignorePlayerRotation = true; + drawData.shader = Mount.currentShader; + playerDrawData.Add(drawData); + } + } + } + break; + case 17: + if (drawType != 1 || !Mount.ShouldGolfCartEmitLight()) + break; + rectangle1 = new Rectangle(0, height * 3, this._data.textureWidth, height); + if (flag1) + rectangle1.Height -= 2; + drawColor = Color.White * 1f; + drawColor.A = (byte) 0; + drawData = new DrawData(texture1, Position, new Rectangle?(rectangle1), drawColor, rotation1, origin, scale1, effect, 0); + drawData.shader = Mount.currentShader; + playerDrawData.Add(drawData); + break; + case 23: + if (drawType != 0) + break; + Texture2D texture2D1 = TextureAssets.Extra[114].Value; + rectangle1 = texture2D1.Frame(2); + int width = rectangle1.Width; + rectangle1.Width -= 2; + double broomTrinketRotation = (double) this.GetWitchBroomTrinketRotation(drawPlayer); + Position = drawPlayer.Center + this.GetWitchBroomTrinketOriginOffset(drawPlayer) - Main.screenPosition; + float rotation3 = (float) broomTrinketRotation; + origin = new Vector2((float) (rectangle1.Width / 2), 0.0f); + drawData = new DrawData(texture2D1, Position.Floor(), new Rectangle?(rectangle1), drawColor, rotation3, origin, scale1, effect, 0); + drawData.shader = Mount.currentShader; + playerDrawData.Add(drawData); + new Color(new Vector3(0.9f, 0.85f, 0.0f)).A /= (byte) 2; + float num8 = ((float) ((double) drawPlayer.miscCounter / 75.0 * 6.28318548202515)).ToRotationVector2().X * 1f; + Color color5 = new Color(80, 70, 40, 0) * (float) ((double) num8 / 8.0 + 0.5) * 0.8f; + rectangle1.X += width; + for (int index = 0; index < 4; ++index) + { + drawData = new DrawData(texture2D1, (Position + ((float) index * 1.570796f).ToRotationVector2() * num8).Floor(), new Rectangle?(rectangle1), color5, rotation3, origin, scale1, effect, 0); + drawData.shader = Mount.currentShader; + playerDrawData.Add(drawData); + } + break; + case 45: + if (drawType != 0 || (double) shadow != 0.0) + break; + if ((double) Math.Abs(drawPlayer.velocity.X) > (double) this.DashSpeed * 0.899999976158142) + { + color1 = new Color((int) byte.MaxValue, 220, 220, 200); + scale1 = 1.1f; + } + for (int index = 0; index < 2; ++index) + { + Vector2 position = Position + new Vector2((float) Main.rand.Next(-10, 11) * 0.1f, (float) Main.rand.Next(-10, 11) * 0.1f); + rectangle1 = new Rectangle(0, height * 3, this._data.textureWidth, height); + if (flag1) + rectangle1.Height -= 2; + drawData = new DrawData(texture2, position, new Rectangle?(rectangle1), color1, rotation1, origin, scale1, effect, 0); + drawData.shader = Mount.currentShader; + playerDrawData.Add(drawData); + } + break; + case 50: + if (drawType != 0) + break; + drawData = new DrawData(TextureAssets.Extra[205].Value, Position, new Rectangle?(rectangle1), drawColor, rotation1, origin, scale1, effect, 0); + drawData.shader = Mount.currentShader; + playerDrawData.Add(drawData); + Vector2 position1 = Position + new Vector2(0.0f, (float) (8 - this.PlayerOffset + 20)); + Rectangle rectangle6 = new Rectangle(0, height * this._frameExtra, this._data.textureWidth, height); + if (flag1) + rectangle6.Height -= 2; + drawData = new DrawData(TextureAssets.Extra[206].Value, position1, new Rectangle?(rectangle6), drawColor, rotation1, origin, scale1, effect, 0); + drawData.shader = Mount.currentShader; + playerDrawData.Add(drawData); + break; + } + } + + public void Dismount(Player mountedPlayer) + { + if (!this._active) + return; + bool cart = this.Cart; + this._active = false; + mountedPlayer.ClearBuff(this._data.buff); + this._mountSpecificData = (object) null; + int type = this._type; + if (cart) + { + mountedPlayer.ClearBuff(this._data.extraBuff); + mountedPlayer.cartFlip = false; + mountedPlayer.lastBoost = Vector2.Zero; + } + mountedPlayer.fullRotation = 0.0f; + mountedPlayer.fullRotationOrigin = Vector2.Zero; + this.DoSpawnDust(mountedPlayer, true); + this.Reset(); + mountedPlayer.position.Y += (float) mountedPlayer.height; + mountedPlayer.height = 42; + mountedPlayer.position.Y -= (float) mountedPlayer.height; + if (mountedPlayer.whoAmI != Main.myPlayer) + return; + NetMessage.SendData(13, number: mountedPlayer.whoAmI); + } + + public void SetMount(int m, Player mountedPlayer, bool faceLeft = false) + { + if (this._type == m || m <= -1 || m >= MountID.Count || m == 5 && mountedPlayer.wet) + return; + if (this._active) + { + mountedPlayer.ClearBuff(this._data.buff); + if (this.Cart) + { + mountedPlayer.ClearBuff(this._data.extraBuff); + mountedPlayer.cartFlip = false; + mountedPlayer.lastBoost = Vector2.Zero; + } + mountedPlayer.fullRotation = 0.0f; + mountedPlayer.fullRotationOrigin = Vector2.Zero; + this._mountSpecificData = (object) null; + } + else + this._active = true; + this._flyTime = 0; + this._type = m; + this._data = Mount.mounts[m]; + this._fatigueMax = (float) this._data.fatigueMax; + if (this.Cart && !faceLeft && !this.Directional) + { + mountedPlayer.AddBuff(this._data.extraBuff, 3600); + this._flipDraw = true; + } + else + { + mountedPlayer.AddBuff(this._data.buff, 3600); + this._flipDraw = false; + } + if (this._type == 9 && this._abilityCooldown < 20) + this._abilityCooldown = 20; + if (this._type == 46 && this._abilityCooldown < 40) + this._abilityCooldown = 40; + mountedPlayer.position.Y += (float) mountedPlayer.height; + for (int index = 0; index < mountedPlayer.shadowPos.Length; ++index) + mountedPlayer.shadowPos[index].Y += (float) mountedPlayer.height; + mountedPlayer.height = 42 + this._data.heightBoost; + mountedPlayer.position.Y -= (float) mountedPlayer.height; + for (int index = 0; index < mountedPlayer.shadowPos.Length; ++index) + mountedPlayer.shadowPos[index].Y -= (float) mountedPlayer.height; + mountedPlayer.ResetAdvancedShadows(); + if (this._type == 7 || this._type == 8) + mountedPlayer.fullRotationOrigin = new Vector2((float) (mountedPlayer.width / 2), (float) (mountedPlayer.height / 2)); + if (this._type == 8) + this._mountSpecificData = (object) new Mount.DrillMountData(); + if (this._type == 35) + this._mountSpecificData = (object) new Mount.ExtraFrameMountData(); + this.DoSpawnDust(mountedPlayer, false); + if (mountedPlayer.whoAmI != Main.myPlayer) + return; + NetMessage.SendData(13, number: mountedPlayer.whoAmI); + } + + private void DoSpawnDust(Player mountedPlayer, bool isDismounting) + { + if (Main.netMode == 2) + return; + Color newColor = Color.Transparent; + if (this._type == 23) + newColor = new Color((int) byte.MaxValue, (int) byte.MaxValue, 0, (int) byte.MaxValue); + for (int index1 = 0; index1 < 100; ++index1) + { + if (MountID.Sets.Cart[this._type]) + { + if (index1 % 10 == 0) + { + int Type = Main.rand.Next(61, 64); + int index2 = Gore.NewGore(new Vector2(mountedPlayer.position.X - 20f, mountedPlayer.position.Y), Vector2.Zero, Type); + Main.gore[index2].alpha = 100; + Main.gore[index2].velocity = Vector2.Transform(new Vector2(1f, 0.0f), Matrix.CreateRotationZ((float) (Main.rand.NextDouble() * 6.28318548202515))); + } + } + else + { + int Type = this._data.spawnDust; + float Scale = 1f; + int Alpha = 0; + if (this._type == 40 || this._type == 41 || this._type == 42) + { + Type = Main.rand.Next(2) != 0 ? 16 : 31; + Scale = 0.9f; + Alpha = 50; + if (this._type == 42) + Type = 31; + if (this._type == 41) + Type = 16; + } + int index3 = Dust.NewDust(new Vector2(mountedPlayer.position.X - 20f, mountedPlayer.position.Y), mountedPlayer.width + 40, mountedPlayer.height, Type, Alpha: Alpha, newColor: newColor, Scale: Scale); + Main.dust[index3].scale += (float) Main.rand.Next(-10, 21) * 0.01f; + if (this._data.spawnDustNoGravity) + Main.dust[index3].noGravity = true; + else if (Main.rand.Next(2) == 0) + { + Main.dust[index3].scale *= 1.3f; + Main.dust[index3].noGravity = true; + } + else + Main.dust[index3].velocity *= 0.5f; + Main.dust[index3].velocity += mountedPlayer.velocity * 0.8f; + if (this._type == 40 || this._type == 41 || this._type == 42) + Main.dust[index3].velocity *= Main.rand.NextFloat(); + } + } + if (this._type == 40 || this._type == 41 || this._type == 42) + { + for (int index4 = 0; index4 < 5; ++index4) + { + int Type = Main.rand.Next(61, 64); + if (this._type == 41 || this._type == 40 && Main.rand.Next(2) == 0) + Type = Main.rand.Next(11, 14); + int index5 = Gore.NewGore(new Vector2(mountedPlayer.position.X + (float) (mountedPlayer.direction * 8), mountedPlayer.position.Y + 20f), Vector2.Zero, Type); + Main.gore[index5].alpha = 100; + Main.gore[index5].velocity = Vector2.Transform(new Vector2(1f, 0.0f), Matrix.CreateRotationZ((float) (Main.rand.NextDouble() * 6.28318548202515))) * 1.4f; + } + } + if (this._type != 23) + return; + for (int index6 = 0; index6 < 4; ++index6) + { + int Type = Main.rand.Next(61, 64); + int index7 = Gore.NewGore(new Vector2(mountedPlayer.position.X - 20f, mountedPlayer.position.Y), Vector2.Zero, Type); + Main.gore[index7].alpha = 100; + Main.gore[index7].velocity = Vector2.Transform(new Vector2(1f, 0.0f), Matrix.CreateRotationZ((float) (Main.rand.NextDouble() * 6.28318548202515))); + } + } + + public bool CanMount(int m, Player mountingPlayer) => mountingPlayer.CanFitSpace(Mount.mounts[m].heightBoost); + + public bool FindTileHeight(Vector2 position, int maxTilesDown, out float tileHeight) + { + int index1 = (int) ((double) position.X / 16.0); + int index2 = (int) ((double) position.Y / 16.0); + for (int index3 = 0; index3 <= maxTilesDown; ++index3) + { + Tile tile = Main.tile[index1, index2]; + bool flag1 = Main.tileSolid[(int) tile.type]; + bool flag2 = Main.tileSolidTop[(int) tile.type]; + if (tile.active()) + { + if (flag1) + { + if (!flag2) + ; + } + else + { + int num = flag2 ? 1 : 0; + } + } + ++index2; + } + tileHeight = 0.0f; + return true; + } + + private class DrillBeam + { + public Point16 curTileTarget; + public int cooldown; + + public DrillBeam() + { + this.curTileTarget = Point16.NegativeOne; + this.cooldown = 0; + } + } + + private class DrillMountData + { + public float diodeRotationTarget; + public float diodeRotation; + public float outerRingRotation; + public Mount.DrillBeam[] beams; + public int beamCooldown; + public Vector2 crosshairPosition; + + public DrillMountData() + { + this.beams = new Mount.DrillBeam[4]; + for (int index = 0; index < this.beams.Length; ++index) + this.beams[index] = new Mount.DrillBeam(); + } + } + + private class BooleanMountData + { + public bool boolean; + + public BooleanMountData() => this.boolean = false; + } + + private class ExtraFrameMountData + { + public int frame; + public float frameCounter; + + public ExtraFrameMountData() + { + this.frame = 0; + this.frameCounter = 0.0f; + } + } + + public class MountDelegatesData + { + public Action MinecartDust; + public Action MinecartLandingSound; + public Action MinecartBumperSound; + + public MountDelegatesData() + { + this.MinecartDust = new Action(DelegateMethods.Minecart.Sparks); + this.MinecartLandingSound = new Action(DelegateMethods.Minecart.LandingSound); + this.MinecartBumperSound = new Action(DelegateMethods.Minecart.BumperSound); + } + } + + private class MountData + { + public Asset backTexture = (Asset) Asset.Empty; + public Asset backTextureGlow = (Asset) Asset.Empty; + public Asset backTextureExtra = (Asset) Asset.Empty; + public Asset backTextureExtraGlow = (Asset) Asset.Empty; + public Asset frontTexture = (Asset) Asset.Empty; + public Asset frontTextureGlow = (Asset) Asset.Empty; + public Asset frontTextureExtra = (Asset) Asset.Empty; + public Asset frontTextureExtraGlow = (Asset) Asset.Empty; + public int textureWidth; + public int textureHeight; + public int xOffset; + public int yOffset; + public int[] playerYOffsets; + public int bodyFrame; + public int playerHeadOffset; + public int heightBoost; + public int buff; + public int extraBuff; + public int flightTimeMax; + public bool usesHover; + public float runSpeed; + public float dashSpeed; + public float swimSpeed; + public float acceleration; + public float jumpSpeed; + public int jumpHeight; + public float fallDamage; + public int fatigueMax; + public bool constantJump; + public bool blockExtraJumps; + public int abilityChargeMax; + public int abilityDuration; + public int abilityCooldown; + public int spawnDust; + public bool spawnDustNoGravity; + public int totalFrames; + public int standingFrameStart; + public int standingFrameCount; + public int standingFrameDelay; + public int runningFrameStart; + public int runningFrameCount; + public int runningFrameDelay; + public int flyingFrameStart; + public int flyingFrameCount; + public int flyingFrameDelay; + public int inAirFrameStart; + public int inAirFrameCount; + public int inAirFrameDelay; + public int idleFrameStart; + public int idleFrameCount; + public int idleFrameDelay; + public bool idleFrameLoop; + public int swimFrameStart; + public int swimFrameCount; + public int swimFrameDelay; + public int dashingFrameStart; + public int dashingFrameCount; + public int dashingFrameDelay; + public bool Minecart; + public bool MinecartDirectional; + public Vector3 lightColor = Vector3.One; + public bool emitsLight; + public Mount.MountDelegatesData delegations; + } + } +} diff --git a/NPC.cs b/NPC.cs new file mode 100644 index 0000000..d716db5 --- /dev/null +++ b/NPC.cs @@ -0,0 +1,50859 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.NPC +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Utilities; +using System; +using System.Collections.Generic; +using Terraria.Audio; +using Terraria.Chat; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.GameContent; +using Terraria.GameContent.Achievements; +using Terraria.GameContent.Creative; +using Terraria.GameContent.Drawing; +using Terraria.GameContent.Events; +using Terraria.GameContent.ItemDropRules; +using Terraria.GameContent.RGB; +using Terraria.GameContent.UI; +using Terraria.ID; +using Terraria.Localization; +using Terraria.Utilities; +using Terraria.WorldBuilding; + +namespace Terraria +{ + public class NPC : Entity + { + private const int NPC_TARGETS_START = 300; + public bool IsABestiaryIconDummy; + public bool ForcePartyHatOn; + private float waterMovementSpeed = 0.5f; + private float lavaMovementSpeed = 0.5f; + private float honeyMovementSpeed = 0.25f; + public static readonly int[,,,] MoonLordAttacksArray = NPC.InitializeMoonLordAttacks(); + public static readonly int[,] MoonLordAttacksArray2 = NPC.InitializeMoonLordAttacks2(); + public static int MoonLordFightingDistance = 4500; + public static int MoonLordCountdown = 0; + public const int MaxMoonLordCountdown = 3600; + public int teleportStyle; + public float teleportTime; + public static int immuneTime = 20; + public static int maxAI = 4; + public int netSpam; + public static int goldCritterChance = 400; + public static int[] killCount = new int[663]; + public static float waveKills = 0.0f; + public static int waveNumber = 0; + public const float nameOverIncrement = 0.025f; + public const float nameOverDistance = 350f; + public float nameOver; + public bool SpawnedFromStatue; + public bool dripping; + public bool drippingSlime; + public bool drippingSparkleSlime; + public static readonly int AFKTimeNeededForNoWorms = 300; + public int altTexture; + public int townNpcVariationIndex; + public Vector2 netOffset = Vector2.Zero; + public short catchItem; + public short releaseOwner = (short) byte.MaxValue; + public int rarity; + public static bool taxCollector = false; + public bool[] playerInteraction = new bool[256]; + public int lastInteraction = (int) byte.MaxValue; + public float takenDamageMultiplier = 1f; + public static bool freeCake = false; + private static int spawnSpaceX = 3; + private static int spawnSpaceY = 3; + public float gfxOffY; + public float stepSpeed; + private static float gravity = 0.3f; + public bool teleporting; + private static int maxAttack = 20; + private static int[] attackNPC = new int[NPC.maxAttack]; + public bool stairFall; + public static int fireFlyFriendly = 0; + public static int fireFlyChance = 0; + public static int fireFlyMultiple = 0; + public static int butterflyChance = 0; + private byte netStream; + private byte[] streamPlayer = new byte[(int) byte.MaxValue]; + private bool needsUniqueInfoUpdate = true; + public Vector2[] oldPos = new Vector2[10]; + public float[] oldRot = new float[10]; + public bool setFrameSize; + public static int golemBoss = -1; + public static int plantBoss = -1; + public static int crimsonBoss = -1; + public int netSkip; + public bool netAlways; + public int realLife = -1; + private string _givenName = ""; + public static int sWidth = 1920; + public static int sHeight = 1080; + private static int spawnRangeX = (int) ((double) (NPC.sWidth / 16) * 0.7); + private static int spawnRangeY = (int) ((double) (NPC.sHeight / 16) * 0.7); + public static int safeRangeX = (int) ((double) (NPC.sWidth / 16) * 0.52); + public static int safeRangeY = (int) ((double) (NPC.sHeight / 16) * 0.52); + private static int activeRangeX = (int) ((double) NPC.sWidth * 2.1); + private static int activeRangeY = (int) ((double) NPC.sHeight * 2.1); + private static int townRangeX = NPC.sWidth; + private static int townRangeY = NPC.sHeight; + public float npcSlots = 1f; + private static bool noSpawnCycle = false; + private static int activeTime = 750; + private static int defaultSpawnRate = 600; + private static int defaultMaxSpawns = 5; + public bool dontCountMe; + public const int maxBuffs = 5; + public int[] buffType = new int[5]; + public int[] buffTime = new int[5]; + public bool[] buffImmune = new bool[323]; + public bool midas; + public bool ichor; + public bool onFire; + public bool onFire2; + public bool onFrostBurn; + public bool poisoned; + public bool markedByScytheWhip; + public bool markedByThornWhip; + public bool markedByFireWhip; + public bool markedByRainbowWhip; + public bool markedByBlandWhip; + public bool markedBySwordWhip; + public bool markedByMaceWhip; + public bool venom; + public bool shadowFlame; + public bool soulDrain; + public int lifeRegen; + public int lifeRegenCount; + public int lifeRegenExpectedLossPerSecond = -1; + public bool confused; + public bool loveStruck; + public bool stinky; + public bool dryadWard; + public bool immortal; + public bool chaseable = true; + public bool canGhostHeal = true; + public bool javelined; + public bool celled; + public bool dryadBane; + public bool daybreak; + public bool dontTakeDamageFromHostiles; + public bool betsysCurse; + public bool oiled; + public static bool savedTaxCollector = false; + public static bool savedGoblin = false; + public static bool savedWizard = false; + public static bool savedMech = false; + public static bool savedAngler = false; + public static bool savedStylist = false; + public static bool savedBartender = false; + public static bool savedGolfer = false; + public static bool boughtCat = false; + public static bool boughtDog = false; + public static bool boughtBunny = false; + public static bool combatBookWasUsed = false; + public static bool downedBoss1 = false; + public static bool downedBoss2 = false; + public static bool downedBoss3 = false; + public static bool downedQueenBee = false; + public static bool downedSlimeKing = false; + public static bool downedGoblins = false; + public static bool downedFrost = false; + public static bool downedPirates = false; + public static bool downedClown = false; + public static bool downedPlantBoss = false; + public static bool downedGolemBoss = false; + public static bool downedMartians = false; + public static bool downedFishron = false; + public static bool downedHalloweenTree = false; + public static bool downedHalloweenKing = false; + public static bool downedChristmasIceQueen = false; + public static bool downedChristmasTree = false; + public static bool downedChristmasSantank = false; + public static bool downedAncientCultist = false; + public static bool downedMoonlord = false; + public static bool downedTowerSolar = false; + public static bool downedTowerVortex = false; + public static bool downedTowerNebula = false; + public static bool downedTowerStardust = false; + public static bool downedEmpressOfLight = false; + public static bool downedQueenSlime = false; + public static int ShieldStrengthTowerSolar = 0; + public static int ShieldStrengthTowerVortex = 0; + public static int ShieldStrengthTowerNebula = 0; + public static int ShieldStrengthTowerStardust = 0; + public static int LunarShieldPowerNormal = 100; + public static int LunarShieldPowerExpert = 150; + public static bool TowerActiveSolar = false; + public static bool TowerActiveVortex = false; + public static bool TowerActiveNebula = false; + public static bool TowerActiveStardust = false; + public static bool LunarApocalypseIsUp = false; + public static bool downedMechBossAny = false; + public static bool downedMechBoss1 = false; + public static bool downedMechBoss2 = false; + public static bool downedMechBoss3 = false; + public static bool[] npcsFoundForCheckActive = new bool[663]; + public static int[] lazyNPCOwnedProjectileSearchArray = new int[200]; + private static int spawnRate = NPC.defaultSpawnRate; + private static int maxSpawns = NPC.defaultMaxSpawns; + public int soundDelay; + public static CoinLossRevengeSystem RevengeManager = new CoinLossRevengeSystem(); + public int[] immune = new int[256]; + public int directionY = 1; + public int type; + public float[] ai = new float[NPC.maxAI]; + public float[] localAI = new float[NPC.maxAI]; + public int aiAction; + public int aiStyle; + public bool justHit; + public int timeLeft; + public int target = -1; + public int damage; + public int defense; + public int defDamage; + public int defDefense; + public bool coldDamage; + public bool trapImmune; + public LegacySoundStyle HitSound; + public LegacySoundStyle DeathSound; + public int life; + public int lifeMax; + public Microsoft.Xna.Framework.Rectangle targetRect; + public double frameCounter; + public Microsoft.Xna.Framework.Rectangle frame; + public Color color; + public int alpha; + public bool hide; + public float scale = 1f; + public float knockBackResist = 1f; + public int oldDirectionY; + public int oldTarget; + public float rotation; + public bool noGravity; + public bool noTileCollide; + public bool netUpdate; + public bool netUpdate2; + public bool collideX; + public bool collideY; + public bool boss; + public int spriteDirection = -1; + public bool behindTiles; + public bool lavaImmune; + public float value; + public int extraValue; + public bool dontTakeDamage; + public int netID; + public int statsAreScaledForThisManyPlayers; + public float strengthMultiplier = 1f; + public bool townNPC; + public static bool travelNPC = false; + public bool homeless; + public int homeTileX = -1; + public int homeTileY = -1; + public int housingCategory; + public bool oldHomeless; + public int oldHomeTileX = -1; + public int oldHomeTileY = -1; + public bool friendly; + public bool closeDoor; + public int doorX; + public int doorY; + public int friendlyRegen; + public int breath; + public const int breathMax = 200; + public int breathCounter; + public bool reflectsProjectiles; + public int lastPortalColorIndex; + public bool despawnEncouraged; + public static int[,] cavernMonsterType = new int[2, 3]; + private static bool EoCKilledToday; + private static bool WoFKilledToday; + public static bool fairyLog = false; + private static int ignorePlayerInteractions = 0; + public static int ladyBugGoodLuckTime = 43200; + public static int ladyBugBadLuckTime = -10800; + private static int ladyBugRainTime = 1800; + public static int offSetDelayTime = 60; + + public bool CanTalk => this.isLikeATownNPC && this.aiStyle == 7 && (double) this.velocity.Y == 0.0 && !NPCID.Sets.IsTownPet[this.type]; + + public bool CanBeTalkedTo => this.isLikeATownNPC && this.aiStyle == 7 && (double) this.velocity.Y == 0.0; + + public bool HasValidTarget + { + get + { + if (this.HasPlayerTarget && Main.player[this.target].active && !Main.player[this.target].dead && !Main.player[this.target].ghost) + return true; + return this.SupportsNPCTargets && this.HasNPCTarget && Main.npc[this.TranslatedTargetIndex].active; + } + } + + public bool HasPlayerTarget => this.target >= 0 && this.target < (int) byte.MaxValue; + + public bool HasNPCTarget => this.target >= 300 && this.target < 500; + + public bool SupportsNPCTargets => NPCID.Sets.UsesNewTargetting[this.type]; + + public int TranslatedTargetIndex => this.HasNPCTarget ? this.target - 300 : this.target; + + public int WhoAmIToTargettingIndex => this.whoAmI + 300; + + public NPCAimedTarget GetTargetData(bool ignorePlayerTankPets = true) + { + if (!this.HasValidTarget) + return new NPCAimedTarget(); + return this.SupportsNPCTargets && this.HasNPCTarget ? new NPCAimedTarget(Main.npc[this.TranslatedTargetIndex]) : new NPCAimedTarget(Main.player[this.target], ignorePlayerTankPets); + } + + public static int[,,,] InitializeMoonLordAttacks() + { + int[,,,] numArray; + if (NPC.MoonLordAttacksArray != null) + { + numArray = NPC.MoonLordAttacksArray; + for (int index1 = 0; index1 < numArray.GetLength(0); ++index1) + { + for (int index2 = 0; index2 < numArray.GetLength(1); ++index2) + { + for (int index3 = 0; index3 < numArray.GetLength(2); ++index3) + { + for (int index4 = 0; index4 < numArray.GetLength(3); ++index4) + numArray[index1, index2, index3, index4] = 0; + } + } + } + } + else + numArray = new int[3, 3, 2, 5]; + numArray[0, 0, 0, 0] = 0; + numArray[0, 0, 1, 0] = 50; + numArray[0, 0, 0, 1] = 1; + numArray[0, 0, 1, 1] = 70; + numArray[0, 0, 0, 2] = 2; + numArray[0, 0, 1, 2] = 330; + numArray[0, 0, 0, 3] = 0; + numArray[0, 0, 1, 3] = 60; + numArray[0, 0, 0, 4] = 3; + numArray[0, 0, 1, 4] = 90; + numArray[0, 1, 0, 0] = 1; + numArray[0, 1, 1, 0] = 70; + numArray[0, 1, 0, 1] = 0; + numArray[0, 1, 1, 1] = 50; + numArray[0, 1, 0, 2] = 3; + numArray[0, 1, 1, 2] = 90; + numArray[0, 1, 0, 3] = 0; + numArray[0, 1, 1, 3] = 60; + numArray[0, 1, 0, 4] = 2; + numArray[0, 1, 1, 4] = 330; + numArray[0, 2, 0, 0] = 3; + numArray[0, 2, 1, 0] = 180; + numArray[0, 2, 0, 1] = 0; + numArray[0, 2, 1, 1] = 30; + numArray[0, 2, 0, 2] = 2; + numArray[0, 2, 1, 2] = 435; + numArray[0, 2, 0, 3] = 3; + numArray[0, 2, 1, 3] = 180; + numArray[0, 2, 0, 4] = 1; + numArray[0, 2, 1, 4] = 375; + numArray[1, 0, 0, 0] = 0; + numArray[1, 0, 1, 0] = 0; + numArray[1, 0, 0, 1] = 0; + numArray[1, 0, 1, 1] = 0; + numArray[1, 0, 0, 2] = 0; + numArray[1, 0, 1, 2] = 0; + numArray[1, 0, 0, 3] = 0; + numArray[1, 0, 1, 3] = 0; + numArray[1, 0, 0, 4] = 0; + numArray[1, 0, 1, 4] = 0; + numArray[1, 1, 0, 0] = 0; + numArray[1, 1, 1, 0] = 0; + numArray[1, 1, 0, 1] = 0; + numArray[1, 1, 1, 1] = 0; + numArray[1, 1, 0, 2] = 0; + numArray[1, 1, 1, 2] = 0; + numArray[1, 1, 0, 3] = 0; + numArray[1, 1, 1, 3] = 0; + numArray[1, 1, 0, 4] = 0; + numArray[1, 1, 1, 4] = 0; + numArray[1, 2, 0, 0] = 0; + numArray[1, 2, 1, 0] = 0; + numArray[1, 2, 0, 1] = 0; + numArray[1, 2, 1, 1] = 0; + numArray[1, 2, 0, 2] = 0; + numArray[1, 2, 1, 2] = 0; + numArray[1, 2, 0, 3] = 0; + numArray[1, 2, 1, 3] = 0; + numArray[1, 2, 0, 4] = 0; + numArray[1, 2, 1, 4] = 0; + numArray[2, 0, 0, 0] = 0; + numArray[2, 0, 1, 0] = 0; + numArray[2, 0, 0, 1] = 0; + numArray[2, 0, 1, 1] = 0; + numArray[2, 0, 0, 2] = 0; + numArray[2, 0, 1, 2] = 0; + numArray[2, 0, 0, 3] = 0; + numArray[2, 0, 1, 3] = 0; + numArray[2, 0, 0, 4] = 0; + numArray[2, 0, 1, 4] = 0; + numArray[2, 1, 0, 0] = 0; + numArray[2, 1, 1, 0] = 0; + numArray[2, 1, 0, 1] = 0; + numArray[2, 1, 1, 1] = 0; + numArray[2, 1, 0, 2] = 0; + numArray[2, 1, 1, 2] = 0; + numArray[2, 1, 0, 3] = 0; + numArray[2, 1, 1, 3] = 0; + numArray[2, 1, 0, 4] = 0; + numArray[2, 1, 1, 4] = 0; + numArray[2, 2, 0, 0] = 0; + numArray[2, 2, 1, 0] = 0; + numArray[2, 2, 0, 1] = 0; + numArray[2, 2, 1, 1] = 0; + numArray[2, 2, 0, 2] = 0; + numArray[2, 2, 1, 2] = 0; + numArray[2, 2, 0, 3] = 0; + numArray[2, 2, 1, 3] = 0; + numArray[2, 2, 0, 4] = 0; + numArray[2, 2, 1, 4] = 0; + NPC.InitializeMoonLordAttacks2(); + return numArray; + } + + public static int[,] InitializeMoonLordAttacks2() + { + int[,] numArray; + if (NPC.MoonLordAttacksArray2 != null) + { + numArray = NPC.MoonLordAttacksArray2; + for (int index1 = 0; index1 < numArray.GetLength(0); ++index1) + { + for (int index2 = 0; index2 < numArray.GetLength(1); ++index2) + numArray[index1, index2] = 0; + } + } + else + numArray = new int[2, 10]; + numArray[0, 0] = 0; + numArray[1, 0] = 90; + numArray[0, 1] = 1; + numArray[1, 1] = 90; + numArray[0, 2] = 0; + numArray[1, 2] = 90; + numArray[0, 3] = 2; + numArray[1, 3] = 135; + numArray[0, 4] = 0; + numArray[1, 4] = 90; + numArray[0, 5] = 3; + numArray[1, 5] = 200; + numArray[0, 6] = 0; + numArray[1, 6] = 90; + numArray[0, 7] = 4; + numArray[1, 7] = 375; + numArray[0, 8] = 0; + numArray[1, 8] = 90; + numArray[0, 9] = 2; + numArray[1, 9] = 135; + return numArray; + } + + public string TypeName => Lang.GetNPCNameValue(this.netID); + + public string FullName => !this.HasGivenName ? this.TypeName : Language.GetTextValue("Game.NPCTitle", (object) this._givenName, (object) this.TypeName); + + public bool HasGivenName => (uint) this._givenName.Length > 0U; + + public string GivenOrTypeName => !this.HasGivenName ? this.TypeName : this._givenName; + + public string GivenName + { + get => this._givenName; + set => this._givenName = value ?? ""; + } + + public static string GetFullnameByID(int npcID) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == npcID) + return Main.npc[index].FullName; + } + return Lang.GetNPCNameValue(npcID); + } + + public static bool downedTowers => NPC.downedTowerSolar && NPC.downedTowerVortex && NPC.downedTowerNebula && NPC.downedTowerStardust; + + public static int ShieldStrengthTowerMax => !Main.expertMode ? NPC.LunarShieldPowerNormal : NPC.LunarShieldPowerExpert; + + public static bool TowersDefeated => NPC.TowerActiveSolar && NPC.TowerActiveVortex && NPC.TowerActiveNebula && NPC.TowerActiveStardust; + + public static bool BusyWithAnyInvasionOfSorts() => Main.slimeRainTime != 0.0 || Main.bloodMoon || Main.eclipse || Main.snowMoon || Main.pumpkinMoon || Main.invasionType != 0 || DD2Event.Ongoing; + + public float Opacity + { + get => (float) (1.0 - (double) this.alpha / (double) byte.MaxValue); + set => this.alpha = (int) MathHelper.Clamp((float) ((1.0 - (double) value) * (double) byte.MaxValue), 0.0f, (float) byte.MaxValue); + } + + public int GetAttackDamage_ScaledByStrength(float normalDamage) => (int) ((double) normalDamage * (double) Main.GameModeInfo.EnemyDamageMultiplier * (double) this.strengthMultiplier); + + public float GetAttackDamage_LerpBetweenFinalValuesFloat(float normalDamage, float expertDamage) + { + float amount = Main.expertMode ? 1f : 0.0f; + if (Main.GameModeInfo.IsJourneyMode) + amount = MathHelper.Clamp(this.strengthMultiplier - 1f, 0.0f, 1f); + return MathHelper.Lerp(normalDamage, expertDamage, amount); + } + + public int GetAttackDamage_LerpBetweenFinalValues(float normalDamage, float expertDamage) + { + float amount = Main.expertMode ? 1f : 0.0f; + if (Main.GameModeInfo.IsJourneyMode) + amount = MathHelper.Clamp(this.strengthMultiplier - 1f, 0.0f, 1f); + return (int) MathHelper.Lerp(normalDamage, expertDamage, amount); + } + + public int GetAttackDamage_ForProjectiles(float normalDamage, float expertDamage) + { + float amount = Main.expertMode ? 1f : 0.0f; + if (Main.GameModeInfo.IsJourneyMode) + amount = MathHelper.Clamp(this.strengthMultiplier - 1f, 0.0f, 1f); + return (int) MathHelper.Lerp(normalDamage, expertDamage, amount); + } + + public int GetAttackDamage_ForProjectiles_MultiLerp( + float normalDamage, + float expertDamage, + float masterDamage) + { + float percent = Main.masterMode ? 1f : (Main.expertMode ? 0.5f : 0.0f); + if (Main.GameModeInfo.IsJourneyMode) + percent = MathHelper.Clamp(this.strengthMultiplier - 1f, 0.0f, 2f) / 2f; + return (int) Utils.MultiLerp(percent, normalDamage, expertDamage, masterDamage); + } + + public bool isLikeATownNPC => this.type == 453 || this.townNPC; + + public static void ClearFoundActiveNPCs() + { + for (int index = 0; index < NPC.npcsFoundForCheckActive.Length; ++index) + NPC.npcsFoundForCheckActive[index] = false; + } + + public static void UpdateFoundActiveNPCs() + { + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && npc.type >= 0 && npc.type < 663) + NPC.npcsFoundForCheckActive[npc.type] = true; + } + NPC.UpdateRGBPeriheralProbe(); + } + + public static void ClearFoundNPCTypesForBestiary() + { + for (int index = 0; index < NPC.npcsFoundForCheckActive.Length; ++index) + NPC.npcsFoundForCheckActive[index] = false; + } + + public static void UpdateRGBPeriheralProbe() + { + int num1 = 0; + int num2 = Main.LocalPlayer.ZoneOverworldHeight ? 1 : 0; + if (NPC.npcsFoundForCheckActive[4]) + num1 = 4; + if (NPC.npcsFoundForCheckActive[50]) + num1 = 50; + if (num2 != 0 && Main.invasionType == 1) + num1 = -1; + if (NPC.npcsFoundForCheckActive[13]) + num1 = 13; + if (NPC.npcsFoundForCheckActive[266]) + num1 = 266; + if (NPC.npcsFoundForCheckActive[222]) + num1 = 222; + if (NPC.npcsFoundForCheckActive[35]) + num1 = 35; + if (NPC.npcsFoundForCheckActive[113]) + num1 = 113; + if (num2 != 0 && Main.invasionType == 2) + num1 = -2; + if (NPC.npcsFoundForCheckActive[657]) + num1 = 657; + if (NPC.npcsFoundForCheckActive[126] || NPC.npcsFoundForCheckActive[125]) + num1 = 126; + if (NPC.npcsFoundForCheckActive[134]) + num1 = 134; + if (NPC.npcsFoundForCheckActive[(int) sbyte.MaxValue]) + num1 = (int) sbyte.MaxValue; + if (num2 != 0 && Main.invasionType == 3) + num1 = -3; + if (NPC.npcsFoundForCheckActive[262]) + num1 = 262; + if (NPC.npcsFoundForCheckActive[245]) + num1 = 245; + if (NPC.npcsFoundForCheckActive[636]) + num1 = 636; + if (DD2Event.Ongoing) + num1 = -6; + if (num2 != 0 && Main.invasionType == 4) + num1 = -4; + if (NPC.npcsFoundForCheckActive[439]) + num1 = 439; + if (NPC.npcsFoundForCheckActive[370]) + num1 = 370; + if (NPC.npcsFoundForCheckActive[398]) + num1 = 398; + CommonConditions.Boss.HighestTierBossOrEvent = num1; + } + + public void SpawnWithHigherTime(int timeMult) => this.timeLeft = NPC.activeTime * timeMult; + + public void EncourageDespawn(int despawnTime) + { + if (this.timeLeft > despawnTime) + this.timeLeft = despawnTime; + this.despawnEncouraged = true; + } + + public void DiscourageDespawn(int despawnTime) + { + if (this.timeLeft < despawnTime) + this.timeLeft = despawnTime; + this.despawnEncouraged = false; + } + + public static bool WouldBeEncouragedToDespawn(int aistyle, int type) => aistyle == 4 && Main.dayTime; + + public static string getNewNPCName(int npcType) => NPC.getNewNPCNameInner(npcType); + + private static string getNewNPCNameInner(int npcType) + { + switch (npcType) + { + case 17: + switch (WorldGen.genRand.Next(23)) + { + case 0: + return "Alfred"; + case 1: + return "Barney"; + case 2: + return "Calvin"; + case 3: + return "Edmund"; + case 4: + return "Edwin"; + case 5: + return "Eugene"; + case 6: + return "Frank"; + case 7: + return "Frederick"; + case 8: + return "Gilbert"; + case 9: + return "Gus"; + case 10: + return "Wilbur"; + case 11: + return "Seymour"; + case 12: + return "Louis"; + case 13: + return "Humphrey"; + case 14: + return "Harold"; + case 15: + return "Milton"; + case 16: + return "Mortimer"; + case 17: + return "Howard"; + case 18: + return "Walter"; + case 19: + return "Isaac"; + case 20: + return "Joseph"; + case 21: + return "Kristian"; + default: + return "Ralph"; + } + case 18: + switch (WorldGen.genRand.Next(24)) + { + case 0: + return "Molly"; + case 1: + return "Amy"; + case 2: + return "Claire"; + case 3: + return "Emily"; + case 4: + return "Katie"; + case 5: + return "Madeline"; + case 6: + return "Katelyn"; + case 7: + return "Emma"; + case 8: + return "Abigail"; + case 9: + return "Carly"; + case 10: + return "Jenna"; + case 11: + return "Heather"; + case 12: + return "Katherine"; + case 13: + return "Caitlin"; + case 14: + return "Kaitlin"; + case 15: + return "Holly"; + case 16: + return "Kaitlyn"; + case 17: + return "Hannah"; + case 18: + return "Kathryn"; + case 19: + return "Lorraine"; + case 20: + return "Helen"; + case 21: + return "Kayla"; + case 22: + return "Lisa"; + default: + return "Allison"; + } + case 19: + switch (WorldGen.genRand.Next(24)) + { + case 0: + return "DeShawn"; + case 1: + return "DeAndre"; + case 2: + return "Marquis"; + case 3: + return "Darnell"; + case 4: + return "Terrell"; + case 5: + return "Malik"; + case 6: + return "Trevon"; + case 7: + return "Tyrone"; + case 8: + return "Willie"; + case 9: + return "Dominique"; + case 10: + return "Demetrius"; + case 11: + return "Reginald"; + case 12: + return "Jamal"; + case 13: + return "Maurice"; + case 14: + return "Jalen"; + case 15: + return "Darius"; + case 16: + return "Xavier"; + case 17: + return "Terrance"; + case 18: + return "Andre"; + case 19: + return "Dante"; + case 20: + return "Brimst"; + case 21: + return "Bronson"; + case 22: + return "Tony"; + default: + return "Darryl"; + } + case 20: + switch (WorldGen.genRand.Next(22)) + { + case 0: + return "Alalia"; + case 1: + return "Alalia"; + case 2: + return "Alura"; + case 3: + return "Ariella"; + case 4: + return "Caelia"; + case 5: + return "Calista"; + case 6: + return "Chryseis"; + case 7: + return "Emerenta"; + case 8: + return "Elysia"; + case 9: + return "Evvie"; + case 10: + return "Faye"; + case 11: + return "Felicitae"; + case 12: + return "Lunette"; + case 13: + return "Nata"; + case 14: + return "Nissa"; + case 15: + return "Tatiana"; + case 16: + return "Rosalva"; + case 17: + return "Shea"; + case 18: + return "Tania"; + case 19: + return "Isis"; + case 20: + return "Celestia"; + default: + return "Xylia"; + } + case 22: + switch (WorldGen.genRand.Next(35)) + { + case 0: + return "Joe"; + case 1: + return "Connor"; + case 2: + return "Tanner"; + case 3: + return "Wyatt"; + case 4: + return "Cody"; + case 5: + return "Levi"; + case 6: + return "Luke"; + case 7: + return "Jack"; + case 8: + return "Scott"; + case 9: + return "Logan"; + case 10: + return "Cole"; + case 11: + return "Asher"; + case 12: + return "Bradley"; + case 13: + return "Jacob"; + case 14: + return "Garrett"; + case 15: + return "Dylan"; + case 16: + return "Maxwell"; + case 17: + return "Steve"; + case 18: + return "Brett"; + case 19: + return "Andrew"; + case 20: + return "Harley"; + case 21: + return "Kyle"; + case 22: + return "Jake"; + case 23: + return "Ryan"; + case 24: + return "Jeffrey"; + case 25: + return "Seth"; + case 26: + return "Marty"; + case 27: + return "Brandon"; + case 28: + return "Zach"; + case 29: + return "Jeff"; + case 30: + return "Daniel"; + case 31: + return "Trent"; + case 32: + return "Kevin"; + case 33: + return "Brian"; + default: + return "Colin"; + } + case 38: + switch (WorldGen.genRand.Next(22)) + { + case 0: + return "Dolbere"; + case 1: + return "Bazdin"; + case 2: + return "Durim"; + case 3: + return "Tordak"; + case 4: + return "Garval"; + case 5: + return "Morthal"; + case 6: + return "Oten"; + case 7: + return "Dolgen"; + case 8: + return "Gimli"; + case 9: + return "Gimut"; + case 10: + return "Duerthen"; + case 11: + return "Beldin"; + case 12: + return "Jarut"; + case 13: + return "Ovbere"; + case 14: + return "Norkas"; + case 15: + return "Dolgrim"; + case 16: + return "Boften"; + case 17: + return "Norsun"; + case 18: + return "Dias"; + case 19: + return "Fikod"; + case 20: + return "Urist"; + default: + return "Darur"; + } + case 54: + switch (WorldGen.genRand.Next(27)) + { + case 0: + return "Sebastian"; + case 1: + return "Rupert"; + case 2: + return "Clive"; + case 3: + return "Nigel"; + case 4: + return "Mervyn"; + case 5: + return "Cedric"; + case 6: + return "Pip"; + case 7: + return "Cyril"; + case 8: + return "Fitz"; + case 9: + return "Lloyd"; + case 10: + return "Arthur"; + case 11: + return "Rodney"; + case 12: + return "Graham"; + case 13: + return "Edward"; + case 14: + return "Alfred"; + case 15: + return "Edmund"; + case 16: + return "Henry"; + case 17: + return "Herald"; + case 18: + return "Roland"; + case 19: + return "Lincoln"; + case 20: + return "Lloyd"; + case 21: + return "Edgar"; + case 22: + return "Eustace"; + case 23: + return "Benjamin"; + case 24: + return "James"; + default: + return "Rodrick"; + } + case 107: + switch (WorldGen.genRand.Next(25)) + { + case 0: + return "Grodax"; + case 1: + return "Sarx"; + case 2: + return "Xon"; + case 3: + return "Mrunok"; + case 4: + return "Nuxatk"; + case 5: + return "Tgerd"; + case 6: + return "Darz"; + case 7: + return "Smador"; + case 8: + return "Stazen"; + case 9: + return "Mobart"; + case 10: + return "Knogs"; + case 11: + return "Tkanus"; + case 12: + return "Negurk"; + case 13: + return "Nort"; + case 14: + return "Durnok"; + case 15: + return "Trogem"; + case 16: + return "Stezom"; + case 17: + return "Gnudar"; + case 18: + return "Ragz"; + case 19: + return "Fahd"; + case 20: + return "Xanos"; + case 21: + return "Arback"; + case 22: + return "Fjell"; + case 23: + return "Dalek"; + default: + return "Knub"; + } + case 108: + switch (WorldGen.genRand.Next(22)) + { + case 0: + return "Dalamar"; + case 1: + return "Dulais"; + case 2: + return "Elric"; + case 3: + return "Arddun"; + case 4: + return "Maelor"; + case 5: + return "Leomund"; + case 6: + return "Hirael"; + case 7: + return "Gwentor"; + case 8: + return "Greum"; + case 9: + return "Gearroid"; + case 10: + return "Fizban"; + case 11: + return "Ningauble"; + case 12: + return "Seonag"; + case 13: + return "Sargon"; + case 14: + return "Merlyn"; + case 15: + return "Magius"; + case 16: + return "Berwyn"; + case 17: + return "Arwyn"; + case 18: + return "Alasdair"; + case 19: + return "Tagar"; + case 20: + return "Abram"; + default: + return "Xanadu"; + } + case 124: + switch (WorldGen.genRand.Next(24)) + { + case 0: + return "Shayna"; + case 1: + return "Korrie"; + case 2: + return "Ginger"; + case 3: + return "Brooke"; + case 4: + return "Jenny"; + case 5: + return "Autumn"; + case 6: + return "Nancy"; + case 7: + return "Ella"; + case 8: + return "Kayla"; + case 9: + return "Selah"; + case 10: + return "Sophia"; + case 11: + return "Marshanna"; + case 12: + return "Lauren"; + case 13: + return "Trisha"; + case 14: + return "Shirlena"; + case 15: + return "Sheena"; + case 16: + return "Ellen"; + case 17: + return "Amy"; + case 18: + return "Dawn"; + case 19: + return "Susana"; + case 20: + return "Meredith"; + case 21: + return "Selene"; + case 22: + return "Terra"; + default: + return "Sally"; + } + case 160: + switch (WorldGen.genRand.Next(12)) + { + case 0: + return "Reishi"; + case 1: + return "Maitake"; + case 2: + return "Chanterelle"; + case 3: + return "Porcini"; + case 4: + return "Shimeji"; + case 5: + return "Amanita"; + case 6: + return "Muscaria"; + case 7: + return "Agaric"; + case 8: + return "Cremini"; + case 9: + return "Morel"; + case 10: + return "Enoki"; + default: + return "Shiitake"; + } + case 178: + switch (WorldGen.genRand.Next(20)) + { + case 0: + return "Whitney"; + case 1: + return "Verity"; + case 2: + return "Ada"; + case 3: + return "Cornelia"; + case 4: + return "Lydia"; + case 5: + return "Leila"; + case 6: + return "Minerva"; + case 7: + return "Emeline"; + case 8: + return "Cynthia"; + case 9: + return "Fidelia"; + case 10: + return "Lilly"; + case 11: + return "Phoebe"; + case 12: + return "Zylphia"; + case 13: + return "Zelda"; + case 14: + return "Selina"; + case 15: + return "Hope"; + case 16: + return "Isabella"; + case 17: + return "Judith"; + case 18: + return "Savannah"; + default: + return "Vivian"; + } + case 207: + switch (WorldGen.genRand.Next(16)) + { + case 0: + return "Abdosir"; + case 1: + return "Akbar"; + case 2: + return "Bodashtart"; + case 3: + return "Danel"; + case 4: + return "Hanno"; + case 5: + return "Hiram"; + case 6: + return "Kanmi"; + case 7: + return "Philosir"; + case 8: + return "Tabnit"; + case 9: + return "Yutpan"; + case 10: + return "Ahirom"; + case 11: + return "Batnoam"; + case 12: + return "Sikarbaal"; + case 13: + return "Hannibal"; + case 14: + return "Yehomilk"; + default: + return "Ahinadab"; + } + case 208: + switch (WorldGen.genRand.Next(17)) + { + case 0: + return "Candy"; + case 1: + return "Isis"; + case 2: + return "Trixy"; + case 3: + return "Destiny"; + case 4: + return "Lexus"; + case 5: + return "Bambi"; + case 6: + return "Bailey"; + case 7: + return "Glitter"; + case 8: + return "Sparkle"; + case 9: + return "Paris"; + case 10: + return "Dazzle"; + case 11: + return "Fantasy"; + case 12: + return "Bunny"; + case 13: + return "Sugar"; + case 14: + return "Fantasia"; + case 15: + return "Star"; + default: + return "Cherry"; + } + case 209: + switch (WorldGen.genRand.Next(23)) + { + case 0: + return "Alpha"; + case 1: + return "Beta"; + case 2: + return "Delta"; + case 3: + return "Omega"; + case 4: + return "Gamma"; + case 5: + return "Theta"; + case 6: + return "Kappa"; + case 7: + return "Omicron"; + case 8: + return "Sigma"; + case 9: + return "Upsilon"; + case 10: + return "Phi"; + case 11: + return "Zeta"; + case 12: + return "Lambda"; + case 13: + return "Nu"; + case 14: + return "Ci"; + case 15: + return "Rho"; + case 16: + return "Phi"; + case 17: + return "Fender"; + case 18: + return "T-3E0"; + case 19: + return "Niner-7"; + case 20: + return "A.N.D.Y"; + case 21: + return "Syn-X"; + default: + return "Mu"; + } + case 227: + switch (WorldGen.genRand.Next(18)) + { + case 0: + return "Marco"; + case 1: + return "Guido"; + case 2: + return "Enzo"; + case 3: + return "Martino"; + case 4: + return "Mauro"; + case 5: + return "Lorenzo"; + case 6: + return "Ludo"; + case 7: + return "Luciano"; + case 8: + return "Carlo"; + case 9: + return "Bruno"; + case 10: + return "Mario"; + case 11: + return "Leonardo"; + case 12: + return "Raphael"; + case 13: + return "Luigi"; + case 14: + return "Luca"; + case 15: + return "Darren"; + case 16: + return "Esreadel"; + default: + return "Stefano"; + } + case 228: + switch (WorldGen.genRand.Next(10)) + { + case 0: + return "Abibe"; + case 1: + return "Jamundi"; + case 2: + return "U'wa"; + case 3: + return "Tairona"; + case 4: + return "Xirigua"; + case 5: + return "Zop'a"; + case 6: + return "Opuni"; + case 7: + return "Kogi-ghi"; + case 8: + return "Konah"; + default: + return "Gboto"; + } + case 229: + switch (WorldGen.genRand.Next(11)) + { + case 0: + return "David"; + case 1: + return "Red Beard"; + case 2: + return "Jack"; + case 3: + return "Black Beard"; + case 4: + return "Captain Morgan"; + case 5: + return "Wet Beard"; + case 6: + return "James T. Beard"; + case 7: + return "Gunpowder Garry"; + case 8: + return "Captain Stoney Dirt"; + case 9: + return "Jake"; + default: + return "Captain Bullywort"; + } + case 353: + switch (WorldGen.genRand.Next(20)) + { + case 0: + return "Bri"; + case 1: + return "Brianne"; + case 2: + return "Flora"; + case 3: + return "Iris"; + case 4: + return "Scarlett"; + case 5: + return "Lola"; + case 6: + return "Hazel"; + case 7: + return "Stella"; + case 8: + return "Pearl"; + case 9: + return "Tallulah"; + case 10: + return "Ruby"; + case 11: + return "Esmeralda"; + case 12: + return "Kylie"; + case 13: + return "Kati"; + case 14: + return "Biah"; + case 15: + return "Meliyah"; + case 16: + return "Petra"; + case 17: + return "Rox"; + case 18: + return "Roxanne"; + default: + return "Annabel"; + } + case 368: + switch (WorldGen.genRand.Next(13)) + { + case 0: + return "Abraham"; + case 1: + return "Bohemas"; + case 2: + return "Eladon"; + case 3: + return "Aphraim"; + case 4: + return "Gallius"; + case 5: + return "Llewellyn"; + case 6: + return "Riley"; + case 7: + return "Rawleigh"; + case 8: + return "Shipton"; + case 9: + return "Romeo"; + case 10: + return "Aedan"; + case 11: + return "Mercer"; + default: + return "Willy"; + } + case 369: + switch (WorldGen.genRand.Next(21)) + { + case 0: + return "Bobby"; + case 1: + return "Sammy"; + case 2: + return "Jimmy"; + case 3: + return "Danny"; + case 4: + return "Timmy"; + case 5: + return "Simon"; + case 6: + return "Johnny"; + case 7: + return "Billy"; + case 8: + return "Matty"; + case 9: + return "Bart"; + case 10: + return "Phillip"; + case 11: + return "Spencer"; + case 12: + return "Nathan"; + case 13: + return "Grayson"; + case 14: + return "Miles"; + case 15: + return "Charles"; + case 16: + return "Adam"; + case 17: + return "Tyler"; + case 18: + return "Jey"; + case 19: + return "Ivan"; + default: + return "Izzy"; + } + case 441: + switch (WorldGen.genRand.Next(20)) + { + case 0: + return "McKinly"; + case 1: + return "Millard"; + case 2: + return "Fillmore"; + case 3: + return "Rutherford"; + case 4: + return "Chester"; + case 5: + return "Grover"; + case 6: + return "Cleveland"; + case 7: + return "Theodore"; + case 8: + return "Herbert"; + case 9: + return "Warren"; + case 10: + return "Lyndon"; + case 11: + return "Ronald"; + case 12: + return "Harrison"; + case 13: + return "Woodrow"; + case 14: + return "Tweed"; + case 15: + return "Blanton"; + case 16: + return "Dwyer"; + case 17: + return "Carroll"; + default: + return "Agnew"; + } + case 453: + switch (WorldGen.genRand.Next(10)) + { + case 0: + return "Skellington"; + case 1: + return "Bones McGee"; + case 2: + return "Gloomy Mays"; + case 3: + return "Jack Sellington"; + case 4: + return "Billy Marrows"; + case 5: + return "Tom"; + case 6: + return "Rattles Magoo"; + case 7: + return "Mandible Calavera"; + case 8: + return "Mika"; + default: + return "No-Eyed Wiley"; + } + case 550: + return Language.RandomFromCategory("BartenderNames", WorldGen.genRand).Value; + case 588: + return Language.RandomFromCategory("GolferNames", WorldGen.genRand).Value; + case 633: + return Language.RandomFromCategory("BestiaryGirlNames", WorldGen.genRand).Value; + case 637: + return Language.RandomFromCategory("CatNames_Siamese", WorldGen.genRand).Value; + case 638: + return Language.RandomFromCategory("DogNames_Labrador", WorldGen.genRand).Value; + case 656: + return Language.RandomFromCategory("BunnyNames_White", WorldGen.genRand).Value; + default: + return ""; + } + } + + public NetworkText GetTypeNetName() => NetworkText.FromKey(Lang.GetNPCName(this.netID).Key); + + public void GetLifeStats(out int statLife, out int statLifeMax) + { + statLife = this.life; + statLifeMax = this.lifeMax; + if (this.realLife == -1) + return; + statLife = Main.npc[this.realLife].life; + statLifeMax = Main.npc[this.realLife].lifeMax; + } + + public float GetLifePercent() + { + int statLife; + int statLifeMax; + this.GetLifeStats(out statLife, out statLifeMax); + return (float) statLife / (float) statLifeMax; + } + + public NetworkText GetFullNetName() + { + if (!this.HasGivenName) + return this.GetTypeNetName(); + return NetworkText.FromKey("Game.NPCTitle", (object) this.GetGivenNetName(), (object) this.GetTypeNetName()); + } + + public NetworkText GetGivenOrTypeNetName() => !this.HasGivenName ? this.GetTypeNetName() : this.GetGivenNetName(); + + public NetworkText GetGivenNetName() => NetworkText.FromLiteral(this._givenName); + + public static void setNPCName(string newName, int npcType, bool resetExtras = false) + { + bool flag = false; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == npcType) + { + if (flag) + { + Main.npc[index].GivenName = NPC.getNewNPCName(npcType); + Main.npc[index].needsUniqueInfoUpdate = true; + } + else + { + Main.npc[index].GivenName = newName; + if (!resetExtras) + break; + flag = true; + } + } + } + } + + public static string firstNPCName(int npcType) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == npcType) + return Main.npc[index].GivenOrTypeName; + } + return NPC.getNewNPCName(npcType); + } + + public static string GetFirstNPCNameOrNull(int npcType) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == npcType) + return Main.npc[index].GivenOrTypeName; + } + return (string) null; + } + + public static bool MechSpawn(float x, float y, int type) + { + int num1 = 0; + int num2 = 0; + int num3 = 0; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active) + { + bool flag = false; + if (Main.npc[index].type == type) + { + flag = true; + } + else + { + switch (type) + { + case 46: + case 303: + case 337: + case 540: + if (Main.npc[index].type == 46 || Main.npc[index].type == 540 || Main.npc[index].type == 303 || Main.npc[index].type == 337) + { + flag = true; + goto label_19; + } + else + goto label_19; + case 55: + if (Main.npc[index].type == 230) + { + flag = true; + goto label_19; + } + else + break; + case 362: + case 364: + if (Main.npc[index].type == 362 || Main.npc[index].type == 363 || Main.npc[index].type == 364 || Main.npc[index].type == 365) + { + flag = true; + goto label_19; + } + else + goto label_19; + case 602: + if (Main.npc[index].type == 602 || Main.npc[index].type == 603) + { + flag = true; + goto label_19; + } + else + goto label_19; + case 608: + if (Main.npc[index].type == 608 || Main.npc[index].type == 609) + { + flag = true; + goto label_19; + } + else + goto label_19; + case 616: + case 617: + if (Main.npc[index].type == 616 || Main.npc[index].type == 617) + { + flag = true; + goto label_19; + } + else + goto label_19; + } + if (NPCID.Sets.IsDragonfly[type] && NPCID.Sets.IsDragonfly[Main.npc[index].type]) + flag = true; + } +label_19: + if (flag) + { + ++num1; + Vector2 vector2 = new Vector2(x, y); + double num4 = (double) Main.npc[index].position.X - (double) vector2.X; + float num5 = Main.npc[index].position.Y - vector2.Y; + double num6 = Math.Sqrt(num4 * num4 + (double) num5 * (double) num5); + if (num6 < 200.0) + ++num2; + if (num6 < 600.0) + ++num3; + } + } + } + return num2 < 3 && num3 < 6 && num1 < 10; + } + + public static int TypeToDefaultHeadIndex(int type) + { + switch (type) + { + case 0: + return 0; + case 17: + return 2; + case 18: + return 3; + case 19: + return 6; + case 20: + return 5; + case 22: + return 1; + case 38: + return 4; + case 54: + return 7; + case 107: + return 9; + case 108: + return 10; + case 124: + return 8; + case 142: + return 11; + case 160: + return 12; + case 178: + return 13; + case 207: + return 14; + case 208: + return 15; + case 209: + return 16; + case 227: + return 17; + case 228: + return 18; + case 229: + return 19; + case 353: + return 20; + case 368: + return 21; + case 369: + return 22; + case 441: + return 23; + case 550: + return 24; + case 588: + return 25; + case 633: + return 26; + case 637: + return 27; + case 638: + return 33; + case 656: + return 39; + default: + return -1; + } + } + + public static int DefaultHeadIndexToType(int headIndex) + { + switch (headIndex) + { + case 1: + return 22; + case 2: + return 17; + case 3: + return 18; + case 4: + return 38; + case 5: + return 20; + case 6: + return 19; + case 7: + return 54; + case 8: + return 124; + case 9: + return 107; + case 10: + return 108; + case 11: + return 142; + case 12: + return 160; + case 13: + return 178; + case 14: + return 207; + case 15: + return 208; + case 16: + return 209; + case 17: + return 227; + case 18: + return 228; + case 19: + return 229; + case 20: + return 353; + case 21: + return 368; + case 22: + return 369; + case 23: + return 441; + case 24: + return 550; + case 25: + return 588; + case 26: + return 633; + case 27: + return 637; + case 33: + return 638; + case 39: + return 656; + default: + return -1; + } + } + + public int GetBossHeadTextureIndex() + { + int num = NPCID.Sets.BossHeadTextures[this.type]; + switch (this.type) + { + case 4: + if ((double) this.ai[0] >= 2.0) + { + num = 1; + break; + } + break; + case 125: + if ((double) this.ai[0] >= 3.0) + { + num = 16; + break; + } + break; + case 126: + if ((double) this.ai[0] >= 3.0) + { + num = 21; + break; + } + break; + case 262: + if (this.life <= this.lifeMax / 2) + { + num = 12; + break; + } + break; + case 439: + if ((double) this.ai[0] == 5.0 && this.alpha == (int) byte.MaxValue) + { + num = -1; + break; + } + break; + case 440: + if ((double) this.ai[0] != 5.0 || this.alpha == (int) byte.MaxValue) + { + num = -1; + break; + } + break; + } + return num; + } + + public float GetBossHeadRotation() + { + float num = 0.0f; + switch (this.type) + { + case 35: + case (int) sbyte.MaxValue: + if ((double) this.ai[1] == 1.0 || (double) this.ai[1] == 2.0) + { + num = this.rotation; + break; + } + break; + case 68: + case 262: + num = this.rotation; + break; + case 345: + if ((double) this.ai[0] == 2.0) + { + num = this.rotation; + break; + } + break; + } + return num; + } + + public SpriteEffects GetBossHeadSpriteEffects() + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (this.type == 491 && this.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + return spriteEffects; + } + + public int BannerID() => this.netID >= -10 ? this.netID : this.type; + + private void SetDefaultsFromNetId(int id, NPCSpawnParams spawnparams = default (NPCSpawnParams)) + { + bool flag = false; + int Type = NPCID.FromNetId(id); + this.SetDefaults(0); + switch (id) + { + case -65: + this.SetDefaults_ForNetId(Type, spawnparams, 1.21f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -64: + this.SetDefaults_ForNetId(Type, spawnparams, 0.87f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -63: + this.SetDefaults_ForNetId(Type, spawnparams, 1.16f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -62: + this.SetDefaults_ForNetId(Type, spawnparams, 0.78f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -61: + this.SetDefaults_ForNetId(Type, spawnparams, 1.1f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -60: + this.SetDefaults_ForNetId(Type, spawnparams, 0.92f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -59: + this.SetDefaults_ForNetId(Type, spawnparams, 1.15f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -58: + this.SetDefaults_ForNetId(Type, spawnparams, 0.8f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -57: + this.SetDefaults_ForNetId(Type, spawnparams, 1.25f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -56: + this.SetDefaults_ForNetId(Type, spawnparams, 0.85f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -55: + this.SetDefaults_ForNetId(Type, spawnparams, 1.1f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -54: + this.SetDefaults_ForNetId(Type, spawnparams, 0.9f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -53: + this.SetDefaults_ForNetId(Type, spawnparams, 1.15f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -52: + this.SetDefaults_ForNetId(Type, spawnparams, 0.85f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -51: + this.SetDefaults_ForNetId(Type, spawnparams, 1.13f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -50: + this.SetDefaults_ForNetId(Type, spawnparams, 0.87f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -49: + this.SetDefaults_ForNetId(Type, spawnparams, 1.07f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -48: + this.SetDefaults_ForNetId(Type, spawnparams, 0.93f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -47: + this.SetDefaults_ForNetId(Type, spawnparams, 1.1f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -46: + this.SetDefaults_ForNetId(Type, spawnparams, 0.9f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -45: + this.SetDefaults_ForNetId(Type, spawnparams, 1.05f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -44: + this.SetDefaults_ForNetId(Type, spawnparams, 0.87f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -43: + this.SetDefaults_ForNetId(Type, spawnparams, 1.15f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -42: + this.SetDefaults_ForNetId(Type, spawnparams, 1.1f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -41: + this.SetDefaults_ForNetId(Type, spawnparams, 0.85f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -40: + this.SetDefaults_ForNetId(Type, spawnparams, 0.9f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -39: + this.SetDefaults_ForNetId(Type, spawnparams, 1.1f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -38: + this.SetDefaults_ForNetId(Type, spawnparams, 1.15f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -37: + this.SetDefaults_ForNetId(Type, spawnparams, 1.08f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -36: + this.SetDefaults_ForNetId(Type, spawnparams, 0.92f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -35: + this.SetDefaults_ForNetId(Type, spawnparams, 1.13f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -34: + this.SetDefaults_ForNetId(Type, spawnparams, 0.87f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -33: + this.SetDefaults_ForNetId(Type, spawnparams, 1.11f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -32: + this.SetDefaults_ForNetId(Type, spawnparams, 0.89f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -31: + this.SetDefaults_ForNetId(Type, spawnparams, 1.13f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -30: + this.SetDefaults_ForNetId(Type, spawnparams, 0.93f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -29: + this.SetDefaults_ForNetId(Type, spawnparams, 1.15f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -28: + this.SetDefaults_ForNetId(Type, spawnparams, 0.85f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -27: + this.SetDefaults_ForNetId(Type, spawnparams, 1.1f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -26: + this.SetDefaults_ForNetId(Type, spawnparams, 0.9f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -25: + this.SetDefaults_ForNetId(Type, spawnparams, 1.15f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -24: + this.SetDefaults_ForNetId(Type, spawnparams, 0.85f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -23: + this.SetDefaults_ForNetId(Type, spawnparams, 1.15f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -22: + this.SetDefaults_ForNetId(Type, spawnparams, 0.85f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -21: + this.SetDefaults_ForNetId(Type, spawnparams, 1.2f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -20: + this.SetDefaults_ForNetId(Type, 1.1f); + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -19: + this.SetDefaults_ForNetId(Type, spawnparams, 0.9f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -18: + this.SetDefaults_ForNetId(Type, spawnparams, 0.8f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -17: + this.SetDefaults_ForNetId(Type, spawnparams, 1.2f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -16: + this.SetDefaults_ForNetId(Type, spawnparams, 0.85f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -15: + this.SetDefaults_ForNetId(Type, spawnparams, 1.15f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale * 1.1); + this.life = 400; + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots = 2f; + this.knockBackResist *= 2f - this.scale; + this.height = 44; + break; + case -14: + this.SetDefaults_ForNetId(Type, spawnparams, 1.15f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale * 1.1); + this.life = (int) ((double) this.life * (double) this.scale * 1.1); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots = 2f; + this.knockBackResist *= 2f - this.scale; + break; + case -13: + this.SetDefaults_ForNetId(Type, spawnparams, 0.9f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + break; + case -12: + this.SetDefaults_ForNetId(Type, spawnparams, 1.15f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -11: + this.SetDefaults_ForNetId(Type, spawnparams, 0.85f); + flag = false; + this.defense = (int) ((double) this.defense * (double) this.scale); + this.damage = (int) ((double) this.damage * (double) this.scale); + this.life = (int) ((double) this.life * (double) this.scale); + this.value = (float) (int) ((double) this.value * (double) this.scale); + this.npcSlots *= this.scale; + this.knockBackResist *= 2f - this.scale; + break; + case -10: + this.SetDefaults_ForNetId(Type, 1.1f); + flag = true; + this.damage = 18; + this.defense = 6; + this.life = 60; + this.color = new Color(143, 215, 93, 100); + this.value = 500f; + break; + case -9: + this.SetDefaults_ForNetId(Type, 1.2f); + flag = true; + this.damage = 15; + this.defense = 7; + this.life = 45; + this.color = new Color((int) byte.MaxValue, (int) byte.MaxValue, 0, 100); + this.value = 10f; + break; + case -8: + this.SetDefaults_ForNetId(Type, 1.025f); + flag = true; + this.damage = 12; + this.defense = 4; + this.life = 35; + this.color = new Color((int) byte.MaxValue, 30, 0, 100); + this.value = 8f; + break; + case -7: + this.SetDefaults_ForNetId(Type, 1.2f); + flag = true; + this.damage = 12; + this.defense = 6; + this.life = 40; + this.knockBackResist *= 0.9f; + this.color = new Color(200, 0, (int) byte.MaxValue, 150); + this.value = 10f; + break; + case -6: + this.SetDefaults_ForNetId(Type, 1.05f); + flag = true; + this.damage = 15; + this.defense = 4; + this.life = 45; + this.color = new Color(0, 0, 0, 50); + this.value = 20f; + break; + case -5: + this.SetDefaults_ForNetId(Type, 0.9f); + flag = true; + this.damage = 13; + this.defense = 4; + this.life = 30; + this.knockBackResist *= 0.95f; + this.alpha = 120; + this.color = new Color(0, 0, 0, 50); + this.value = 10f; + break; + case -4: + this.SetDefaults_ForNetId(Type, 0.6f); + flag = true; + this.damage = 5; + this.defense = 5; + this.life = 150; + this.knockBackResist *= 1.4f; + this.color = new Color(250, 30, 90, 90); + this.value = 10000f; + this.rarity = 2; + break; + case -3: + this.SetDefaults_ForNetId(Type, 0.9f); + flag = true; + this.damage = 6; + this.defense = 0; + this.life = 14; + this.knockBackResist *= 1.2f; + this.color = new Color(0, 220, 40, 100); + this.value = 3f; + break; + case -2: + this.SetDefaults_ForNetId(Type, 0.9f); + flag = true; + this.damage = 45; + this.defense = 20; + this.life = 90; + this.knockBackResist *= 1.2f; + this.value = 100f; + break; + case -1: + this.SetDefaults_ForNetId(Type, 0.6f); + flag = true; + this.damage = 45; + this.defense = 10; + this.life = 90; + this.knockBackResist *= 1.2f; + this.value = 100f; + break; + default: + return; + } + this.netID = id; + this.lifeMax = this.life; + this.defDamage = this.damage; + this.defDefense = this.defense; + if (!flag) + return; + this.ScaleStats(spawnparams.playerCountForMultiplayerDifficultyOverride, spawnparams.gameModeData, spawnparams.strengthMultiplierOverride); + this.life = this.lifeMax; + } + + public void SetDefaultsKeepPlayerInteraction(int Type) + { + bool[] flagArray = new bool[this.playerInteraction.Length]; + for (int index = 0; index < this.playerInteraction.Length; ++index) + flagArray[index] = this.playerInteraction[index]; + this.SetDefaults(Type); + for (int index = 0; index < this.playerInteraction.Length; ++index) + this.playerInteraction[index] = flagArray[index]; + } + + public void SetDefaults_ForNetId(int Type, float scaleOverride) => this.SetDefaults(Type); + + public void SetDefaults_ForNetId(int Type, NPCSpawnParams spawnparams, float scaleOverride) => this.SetDefaults(Type, spawnparams.WithScale(scaleOverride)); + + public void SetDefaults(int Type, NPCSpawnParams spawnparams = default (NPCSpawnParams)) + { + if (spawnparams.gameModeData == null) + spawnparams.gameModeData = Main.GameModeInfo; + if (Main.getGoodWorld && spawnparams.sizeScaleOverride.HasValue) + { + ref NPCSpawnParams local = ref spawnparams; + float? sizeScaleOverride1 = spawnparams.sizeScaleOverride; + float? sizeScaleOverride2 = spawnparams.sizeScaleOverride; + float? nullable1 = spawnparams.sizeScaleOverride; + float? nullable2 = sizeScaleOverride2.HasValue & nullable1.HasValue ? new float?(sizeScaleOverride2.GetValueOrDefault() * nullable1.GetValueOrDefault()) : new float?(); + float? nullable3; + if (!(sizeScaleOverride1.HasValue & nullable2.HasValue)) + { + nullable1 = new float?(); + nullable3 = nullable1; + } + else + nullable3 = new float?(sizeScaleOverride1.GetValueOrDefault() + nullable2.GetValueOrDefault()); + float? nullable4 = nullable3; + float num = 2f; + float? nullable5; + if (!nullable4.HasValue) + { + nullable2 = new float?(); + nullable5 = nullable2; + } + else + nullable5 = new float?(nullable4.GetValueOrDefault() / num); + local.sizeScaleOverride = nullable5; + } + if (Type < 0) + { + this.SetDefaultsFromNetId(Type, spawnparams); + } + else + { + this.waterMovementSpeed = this.lavaMovementSpeed = 0.5f; + this.honeyMovementSpeed = 0.25f; + this.netOffset *= 0.0f; + this.altTexture = 0; + this.townNpcVariationIndex = 0; + this.nameOver = 0.0f; + this.takenDamageMultiplier = 1f; + this.extraValue = 0; + for (int index = 0; index < this.playerInteraction.Length; ++index) + this.playerInteraction[index] = false; + this.rarity = 0; + this.dontCountMe = false; + this.releaseOwner = (short) byte.MaxValue; + this.catchItem = (short) 0; + this.needsUniqueInfoUpdate = true; + this.netStream = (byte) 32; + bool flag = false; + this.netID = 0; + this.netAlways = false; + this.netSpam = 0; + this.SpawnedFromStatue = false; + this.statsAreScaledForThisManyPlayers = 0; + this.strengthMultiplier = 1f; + int newSize = 10; + if (Type >= 0) + newSize = NPCID.Sets.TrailCacheLength[Type]; + if (newSize != this.oldPos.Length) + { + Array.Resize(ref this.oldPos, newSize); + Array.Resize(ref this.oldRot, newSize); + } + for (int index = 0; index < this.oldPos.Length; ++index) + { + this.oldRot[index] = 0.0f; + this.oldPos[index].X = 0.0f; + this.oldPos[index].Y = 0.0f; + } + for (int index = 0; index < 5; ++index) + { + this.buffTime[index] = 0; + this.buffType[index] = 0; + } + for (int index = 0; index < 323; ++index) + this.buffImmune[index] = false; + this.setFrameSize = false; + this.buffImmune[31] = true; + this.netSkip = -2; + this.realLife = -1; + this.lifeRegen = 0; + this.lifeRegenExpectedLossPerSecond = -1; + this.lifeRegenCount = 0; + this.markedByScytheWhip = false; + this.markedByThornWhip = false; + this.markedByFireWhip = false; + this.markedByRainbowWhip = false; + this.markedByBlandWhip = false; + this.markedBySwordWhip = false; + this.markedByMaceWhip = false; + this.poisoned = false; + this.soulDrain = false; + this.venom = false; + this.shadowFlame = false; + this.onFire = false; + this.midas = false; + this.ichor = false; + this.onFrostBurn = false; + this.confused = false; + this.loveStruck = false; + this.dontTakeDamageFromHostiles = false; + this.stinky = false; + this.dryadWard = false; + this.onFire2 = false; + this.justHit = false; + this.dontTakeDamage = false; + this.npcSlots = 1f; + this.lavaImmune = false; + this.lavaWet = false; + this.wetCount = (byte) 0; + this.wet = false; + this.townNPC = false; + this.homeless = false; + this.homeTileX = -1; + this.homeTileY = -1; + this.housingCategory = 0; + this.friendly = false; + this.behindTiles = false; + this.boss = false; + this.noTileCollide = false; + this.rotation = 0.0f; + this.active = true; + this.alpha = 0; + this.color = new Color(); + this.collideX = false; + this.collideY = false; + this.direction = 0; + this.oldDirection = this.direction; + this.frameCounter = 0.0; + this.netUpdate = true; + this.netUpdate2 = false; + this.knockBackResist = 1f; + this.GivenName = ""; + this.noGravity = false; + this.scale = 1f; + this.HitSound = (LegacySoundStyle) null; + this.DeathSound = (LegacySoundStyle) null; + this.spriteDirection = -1; + this.target = (int) byte.MaxValue; + this.oldTarget = this.target; + this.targetRect = new Microsoft.Xna.Framework.Rectangle(); + this.timeLeft = NPC.activeTime; + this.type = Type; + this.value = 0.0f; + this.coldDamage = false; + this.trapImmune = false; + this.hide = false; + this.immortal = false; + this.chaseable = true; + this.breath = 200; + this.breathCounter = 0; + this.reflectsProjectiles = false; + this.canGhostHeal = true; + this.javelined = false; + this.daybreak = false; + this.celled = false; + this.dryadBane = false; + this.betsysCurse = false; + this.oiled = false; + this.despawnEncouraged = false; + for (int index = 0; index < NPC.maxAI; ++index) + this.ai[index] = 0.0f; + for (int index = 0; index < NPC.maxAI; ++index) + this.localAI[index] = 0.0f; + if (this.type == 1) + { + this.width = 24; + this.height = 18; + this.aiStyle = 1; + this.damage = 7; + this.defense = 2; + this.lifeMax = 25; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.alpha = 175; + this.color = new Color(0, 80, (int) byte.MaxValue, 100); + this.value = 25f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 2) + { + this.width = 30; + this.height = 32; + this.aiStyle = 2; + this.damage = 18; + this.defense = 2; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.8f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 75f; + this.buffImmune[31] = false; + } + else if (this.type == 3) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 14; + this.defense = 6; + this.lifeMax = 45; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 60f; + this.buffImmune[31] = false; + } + else if (this.type == 430) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 14; + this.defense = 6; + this.lifeMax = 45; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 60f; + this.buffImmune[31] = false; + } + else if (this.type == 431) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 16; + this.defense = 8; + this.lifeMax = 50; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.45f; + this.value = 80f; + this.buffImmune[31] = false; + } + else if (this.type == 432) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 16; + this.defense = 8; + this.lifeMax = 50; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.45f; + this.value = 65f; + this.buffImmune[31] = false; + } + else if (this.type == 433) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 13; + this.defense = 6; + this.lifeMax = 40; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.55f; + this.value = 55f; + this.buffImmune[31] = false; + } + else if (this.type == 434) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 13; + this.defense = 8; + this.lifeMax = 45; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.45f; + this.value = 80f; + this.buffImmune[31] = false; + } + else if (this.type == 435) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 16; + this.defense = 4; + this.lifeMax = 45; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.55f; + this.value = 70f; + this.buffImmune[31] = false; + } + else if (this.type == 436) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 12; + this.defense = 4; + this.lifeMax = 38; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.6f; + this.value = 65f; + this.buffImmune[31] = false; + } + else if (this.type == 4) + { + this.width = 100; + this.height = 110; + this.aiStyle = 4; + this.damage = 15; + this.defense = 12; + this.lifeMax = 2800; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + this.SpawnWithHigherTime(30); + this.boss = true; + this.value = 30000f; + this.npcSlots = 5f; + } + else if (this.type == 5) + { + this.width = 20; + this.height = 20; + this.aiStyle = 5; + this.damage = 12; + this.defense = 0; + this.lifeMax = 8; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + } + else if (this.type == 6) + { + this.npcSlots = 1f; + this.width = 30; + this.height = 30; + this.aiStyle = 5; + this.damage = 22; + this.defense = 8; + this.lifeMax = 40; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.knockBackResist = 0.5f; + this.value = 90f; + } + else if (this.type == 7) + { + this.npcSlots = 3.5f; + this.width = 22; + this.height = 22; + this.aiStyle = 6; + this.damage = 31; + this.defense = 2; + this.lifeMax = 100; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 140f; + this.netAlways = true; + } + else if (this.type == 8) + { + this.width = 22; + this.height = 22; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 16; + this.defense = 6; + this.lifeMax = 100; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 140f; + this.dontCountMe = true; + } + else if (this.type == 9) + { + this.width = 22; + this.height = 22; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 13; + this.defense = 10; + this.lifeMax = 100; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 140f; + this.dontCountMe = true; + } + else if (this.type == 10) + { + this.width = 14; + this.height = 14; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 8; + this.defense = 0; + this.lifeMax = 30; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 40f; + } + else if (this.type == 11) + { + this.width = 14; + this.height = 14; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 4; + this.defense = 4; + this.lifeMax = 30; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 40f; + this.dontCountMe = true; + } + else if (this.type == 12) + { + this.width = 14; + this.height = 14; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 4; + this.defense = 6; + this.lifeMax = 30; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 40f; + this.dontCountMe = true; + } + else if (this.type == 13) + { + this.npcSlots = 5f; + this.width = 38; + this.height = 38; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 22; + this.defense = 2; + this.lifeMax = 150; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 800f; + this.scale = 1f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 14) + { + this.width = 38; + this.height = 38; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 13; + this.defense = 4; + this.lifeMax = 150; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 800f; + this.scale = 1f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.dontCountMe = true; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 15) + { + this.width = 38; + this.height = 38; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 11; + this.defense = 8; + this.lifeMax = 150; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 800f; + this.scale = 1f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.dontCountMe = true; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 16) + { + this.npcSlots = 2f; + this.width = 36; + this.height = 24; + this.aiStyle = 1; + this.damage = 20; + this.defense = 7; + this.lifeMax = 90; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.alpha = 120; + this.color = new Color(0, 0, 0, 50); + this.value = 75f; + this.scale = 1.25f; + this.knockBackResist = 0.6f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 17) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 18) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 19) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 20) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 21) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 20; + this.defense = 8; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 100f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 22) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 23) + { + this.width = 22; + this.height = 22; + this.aiStyle = 5; + this.damage = 40; + this.defense = 6; + this.lifeMax = 26; + this.HitSound = SoundID.NPCHit3; + this.DeathSound = SoundID.NPCDeath3; + this.noGravity = true; + this.noTileCollide = true; + this.value = 80f; + this.knockBackResist = 0.4f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + } + else if (this.type == 24) + { + this.npcSlots = 3f; + this.width = 18; + this.height = 40; + this.aiStyle = 8; + this.damage = 30; + this.defense = 16; + this.lifeMax = 70; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + this.lavaImmune = true; + this.value = 350f; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + } + else if (this.type == 25) + { + this.width = 16; + this.height = 16; + this.aiStyle = 9; + this.damage = 30; + this.defense = 0; + this.lifeMax = 1; + this.HitSound = SoundID.NPCHit3; + this.DeathSound = SoundID.NPCDeath3; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.alpha = 100; + } + else if (this.type == 31) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 26; + this.defense = 8; + this.lifeMax = 80; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.8f; + this.value = 130f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 32) + { + this.width = 18; + this.height = 40; + this.aiStyle = 8; + this.damage = 20; + this.defense = 2; + this.lifeMax = 50; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.6f; + this.value = 140f; + this.npcSlots = 2f; + this.buffImmune[20] = true; + } + else if (this.type == 33) + { + this.width = 16; + this.height = 16; + this.aiStyle = 9; + this.damage = 20; + this.defense = 0; + this.lifeMax = 1; + this.HitSound = SoundID.NPCHit3; + this.DeathSound = SoundID.NPCDeath3; + this.noGravity = true; + this.noTileCollide = true; + this.alpha = (int) byte.MaxValue; + this.knockBackResist = 0.0f; + } + else if (this.type == 34) + { + this.width = 26; + this.height = 28; + this.aiStyle = 10; + this.damage = 35; + this.defense = 6; + this.lifeMax = 40; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.noGravity = true; + this.noTileCollide = true; + this.value = 150f; + this.knockBackResist = 0.2f; + this.npcSlots = 0.75f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + } + else if (this.type == 35) + { + this.width = 80; + this.height = 102; + this.aiStyle = 11; + this.damage = 32; + this.defense = 10; + this.lifeMax = 4400; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.noGravity = true; + this.noTileCollide = true; + this.value = 50000f; + this.knockBackResist = 0.0f; + this.boss = true; + this.npcSlots = 6f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.buffImmune[189] = this.buffImmune[169] = this.buffImmune[183] = true; + } + else if (this.type == 36) + { + this.width = 52; + this.height = 52; + this.aiStyle = 12; + this.damage = 20; + this.defense = 14; + this.lifeMax = 600; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + } + else if (this.type == 37) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 38) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 39) + { + this.npcSlots = 6f; + this.width = 22; + this.height = 22; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 30; + this.defense = 10; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath5; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 1200f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + } + else if (this.type == 40) + { + this.width = 22; + this.height = 22; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 15; + this.defense = 12; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath5; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 1200f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.dontCountMe = true; + } + else if (this.type == 41) + { + this.width = 22; + this.height = 22; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 10; + this.defense = 18; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath5; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 1200f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.dontCountMe = true; + } + else if (this.type == 42) + { + this.width = 34; + this.height = 32; + this.aiStyle = 5; + this.damage = 26; + this.defense = 12; + this.lifeMax = 48; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.5f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 200f; + this.noGravity = true; + this.buffImmune[20] = true; + } + else if (this.type == 43) + { + this.noGravity = true; + this.noTileCollide = true; + this.width = 30; + this.height = 30; + this.aiStyle = 13; + this.damage = 34; + this.defense = 10; + this.lifeMax = 110; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.0f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 350f; + this.buffImmune[20] = true; + } + else if (this.type == 44) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 22; + this.defense = 9; + this.lifeMax = 70; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 250f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + this.rarity = 1; + } + else if (this.type == 45) + { + this.width = 18; + this.height = 40; + this.aiStyle = 8; + this.damage = 20; + this.defense = 4; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.6f; + this.value = 5000f; + this.buffImmune[20] = true; + this.rarity = 4; + } + else if (this.type == 46 || this.type == 303 || this.type == 337 || this.type == 540) + { + this.width = 18; + this.height = 20; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 2019; + } + else if (this.type == 47) + { + this.width = 18; + this.height = 20; + this.aiStyle = 3; + this.damage = 20; + this.defense = 4; + this.lifeMax = 70; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 500f; + this.buffImmune[31] = false; + } + else if (this.type == 48) + { + this.width = 24; + this.height = 34; + this.aiStyle = 14; + this.damage = 25; + this.defense = 8; + this.lifeMax = 100; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.6f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 300f; + } + else if (this.type == 49) + { + this.npcSlots = 0.5f; + this.width = 22; + this.height = 18; + this.aiStyle = 14; + this.damage = 13; + this.defense = 2; + this.lifeMax = 16; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.8f; + this.DeathSound = SoundID.NPCDeath4; + this.value = 90f; + this.buffImmune[31] = false; + } + else if (this.type == 50) + { + this.boss = true; + this.width = 98; + this.height = 92; + this.aiStyle = 15; + this.damage = 40; + this.defense = 10; + this.lifeMax = 2000; + this.knockBackResist = 0.0f; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.alpha = 30; + this.value = 10000f; + this.scale = 1.25f; + this.buffImmune[20] = true; + this.SpawnWithHigherTime(30); + } + else if (this.type == 51) + { + this.npcSlots = 0.5f; + this.width = 22; + this.height = 18; + this.aiStyle = 14; + this.damage = 20; + this.defense = 4; + this.lifeMax = 34; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.8f; + this.DeathSound = SoundID.NPCDeath4; + this.value = 80f; + this.buffImmune[31] = false; + } + else if (this.type == 52) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 20; + this.defense = 10; + this.lifeMax = 500; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 1000f; + this.buffImmune[31] = false; + this.rarity = 2; + } + else if (this.type == 53) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 14; + this.defense = 8; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 1000f; + this.buffImmune[31] = false; + this.rarity = 2; + } + else if (this.type == 54) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 55) + { + this.noGravity = true; + this.width = 20; + this.height = 18; + this.aiStyle = 16; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + this.catchItem = (short) 261; + } + else if (this.type == 56) + { + this.noTileCollide = true; + this.noGravity = true; + this.width = 30; + this.height = 30; + this.aiStyle = 13; + this.damage = 25; + this.defense = 10; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.0f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 90f; + this.buffImmune[20] = true; + } + else if (this.type == 57) + { + this.noGravity = true; + this.width = 18; + this.height = 20; + this.aiStyle = 16; + this.damage = 30; + this.defense = 6; + this.lifeMax = 100; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 500f; + } + else if (this.type == 58) + { + this.npcSlots = 0.5f; + this.noGravity = true; + this.width = 18; + this.height = 20; + this.aiStyle = 16; + this.damage = 25; + this.defense = 2; + this.lifeMax = 30; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 50f; + } + else if (this.type == 59) + { + this.width = 24; + this.height = 18; + this.aiStyle = 1; + this.damage = 15; + this.defense = 10; + this.lifeMax = 50; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.scale = 1.1f; + this.alpha = 50; + this.lavaImmune = true; + this.value = 120f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.buffImmune[31] = false; + } + else if (this.type == 60) + { + this.npcSlots = 0.5f; + this.width = 22; + this.height = 18; + this.aiStyle = 14; + this.damage = 35; + this.defense = 8; + this.lifeMax = 46; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.8f; + this.DeathSound = SoundID.NPCDeath4; + this.value = 120f; + this.scale = 1.1f; + this.lavaImmune = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.buffImmune[31] = false; + } + else if (this.type == 61) + { + this.width = 36; + this.height = 36; + this.aiStyle = 17; + this.damage = 15; + this.defense = 4; + this.lifeMax = 40; + this.knockBackResist = 0.8f; + this.HitSound = SoundID.NPCHit28; + this.DeathSound = SoundID.NPCDeath31; + this.value = 60f; + } + else if (this.type == 62) + { + this.npcSlots = 2f; + this.width = 28; + this.height = 48; + this.aiStyle = 14; + this.damage = 32; + this.defense = 8; + this.lifeMax = 120; + this.HitSound = SoundID.NPCHit21; + this.knockBackResist = 0.8f; + this.DeathSound = SoundID.NPCDeath24; + this.value = 300f; + this.lavaImmune = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + } + else if (this.type == 63) + { + this.noGravity = true; + this.width = 26; + this.height = 26; + this.aiStyle = 18; + this.damage = 25; + this.defense = 4; + this.lifeMax = 34; + this.HitSound = SoundID.NPCHit25; + this.DeathSound = SoundID.NPCDeath28; + this.value = 100f; + this.alpha = 20; + } + else if (this.type == 64) + { + this.noGravity = true; + this.width = 26; + this.height = 26; + this.aiStyle = 18; + this.damage = 30; + this.defense = 6; + this.lifeMax = 70; + this.HitSound = SoundID.NPCHit25; + this.DeathSound = SoundID.NPCDeath28; + this.value = 100f; + this.alpha = 20; + } + else if (this.type == 65) + { + this.noGravity = true; + this.width = 100; + this.height = 24; + this.aiStyle = 16; + this.damage = 40; + this.defense = 2; + this.lifeMax = 300; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 400f; + this.knockBackResist = 0.7f; + } + else if (this.type == 66) + { + this.npcSlots = 2f; + this.width = 28; + this.height = 48; + this.aiStyle = 14; + this.damage = 32; + this.defense = 8; + this.lifeMax = 140; + this.HitSound = SoundID.NPCHit21; + this.knockBackResist = 0.8f; + this.DeathSound = SoundID.NPCDeath24; + this.value = 1000f; + this.lavaImmune = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + } + else if (this.type == 67) + { + this.width = 28; + this.height = 20; + this.aiStyle = 3; + this.damage = 20; + this.defense = 10; + this.lifeMax = 40; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 60f; + } + else if (this.type == 68) + { + this.width = 80; + this.height = 102; + this.aiStyle = 11; + this.damage = 1000; + this.defense = 9999; + this.lifeMax = 9999; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.buffImmune[189] = this.buffImmune[169] = this.buffImmune[183] = true; + } + else if (this.type == 69) + { + this.width = 24; + this.height = 24; + this.aiStyle = 19; + this.damage = 10; + this.defense = 6; + this.lifeMax = 45; + this.HitSound = SoundID.NPCHit31; + this.DeathSound = SoundID.NPCDeath34; + this.knockBackResist = 0.0f; + this.value = 60f; + this.behindTiles = true; + } + else if (this.type == 70) + { + this.npcSlots = 0.3f; + this.width = 34; + this.height = 34; + this.aiStyle = 20; + this.damage = 32; + this.defense = 100; + this.lifeMax = 100; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + this.dontTakeDamage = true; + this.scale = 1.5f; + } + else if (this.type == 71) + { + this.npcSlots = 2f; + this.width = 36; + this.height = 24; + this.aiStyle = 1; + this.damage = 30; + this.defense = 7; + this.lifeMax = 150; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.alpha = 60; + this.value = 150f; + this.scale = 1.25f; + this.knockBackResist = 0.6f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + this.rarity = 1; + } + else if (this.type == 72) + { + this.npcSlots = 0.3f; + this.width = 34; + this.height = 34; + this.aiStyle = 21; + this.damage = 24; + this.defense = 100; + this.lifeMax = 100; + this.alpha = 100; + this.behindTiles = true; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.dontTakeDamage = true; + this.scale = 1.2f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + } + else if (this.type == 73) + { + this.scale = 0.95f; + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 20; + this.defense = 6; + this.lifeMax = 80; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.7f; + this.value = 200f; + this.buffImmune[31] = false; + this.rarity = 1; + } + else if (this.type == 74 || this.type == 297 || this.type == 298) + { + this.width = 14; + this.height = 14; + this.aiStyle = 24; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.8f; + this.DeathSound = SoundID.NPCDeath1; + if (this.type == 74) + this.catchItem = (short) 2015; + if (this.type == 297) + this.catchItem = (short) 2016; + if (this.type == 298) + this.catchItem = (short) 2017; + this.npcSlots = 0.4f; + } + else if (this.type == 75) + { + this.noGravity = true; + this.width = 20; + this.height = 20; + this.aiStyle = 22; + this.damage = 55; + this.defense = 20; + this.lifeMax = 150; + this.HitSound = SoundID.NPCHit5; + this.knockBackResist = 0.6f; + this.DeathSound = SoundID.NPCDeath7; + this.value = 350f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.buffImmune[31] = false; + } + else if (this.type == 77) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 40; + this.defense = 28; + this.lifeMax = 260; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.4f; + this.value = 400f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 78) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 50; + this.defense = 16; + this.lifeMax = 130; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.6f; + this.value = 600f; + this.buffImmune[31] = false; + } + else if (this.type == 79) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 60; + this.defense = 18; + this.lifeMax = 180; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.5f; + this.value = 700f; + this.buffImmune[31] = false; + } + else if (this.type == 80) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 55; + this.defense = 18; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.55f; + this.value = 700f; + this.buffImmune[31] = false; + } + else if (this.type == 81) + { + this.width = 40; + this.height = 30; + this.aiStyle = 1; + this.damage = 55; + this.defense = 20; + this.lifeMax = 170; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.alpha = 55; + this.value = 400f; + this.scale = 1.1f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 82) + { + this.noGravity = true; + this.noTileCollide = true; + this.width = 24; + this.height = 44; + this.aiStyle = 22; + this.damage = 65; + this.defense = 16; + this.lifeMax = 160; + this.HitSound = SoundID.NPCHit54; + this.DeathSound = SoundID.NPCDeath52; + this.alpha = 100; + this.value = 500f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.knockBackResist = 0.7f; + } + else if (this.type == 83) + { + this.width = 40; + this.height = 40; + this.aiStyle = 23; + this.damage = 80; + this.defense = 18; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath6; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.knockBackResist = 0.4f; + } + else if (this.type == 84) + { + this.width = 40; + this.height = 40; + this.aiStyle = 23; + this.damage = 80; + this.defense = 18; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath6; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.knockBackResist = 0.4f; + } + else if (this.type == 85) + { + this.width = 24; + this.height = 24; + this.aiStyle = 25; + this.damage = 80; + this.defense = 30; + this.lifeMax = 500; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath6; + this.value = 100000f; + this.knockBackResist = 0.3f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.rarity = 4; + } + else if (this.type == 86) + { + this.width = 46; + this.height = 42; + this.aiStyle = 26; + this.damage = 65; + this.defense = 30; + this.lifeMax = 400; + this.HitSound = SoundID.NPCHit12; + this.DeathSound = SoundID.NPCDeath18; + this.knockBackResist = 0.3f; + this.value = 1000f; + this.buffImmune[31] = false; + } + else if (this.type == 87) + { + this.noTileCollide = true; + this.npcSlots = 5f; + this.width = 32; + this.height = 32; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 80; + this.defense = 10; + this.lifeMax = 4000; + this.HitSound = SoundID.NPCHit7; + this.DeathSound = SoundID.NPCDeath8; + this.noGravity = true; + this.knockBackResist = 0.0f; + this.value = 10000f; + this.scale = 1f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + } + else if (this.type == 88) + { + this.noTileCollide = true; + this.width = 32; + this.height = 32; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 40; + this.defense = 20; + this.lifeMax = 4000; + this.HitSound = SoundID.NPCHit7; + this.DeathSound = SoundID.NPCDeath8; + this.noGravity = true; + this.knockBackResist = 0.0f; + this.value = 10000f; + this.scale = 1f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.dontCountMe = true; + } + else if (this.type == 89) + { + this.noTileCollide = true; + this.width = 32; + this.height = 32; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 40; + this.defense = 20; + this.lifeMax = 4000; + this.HitSound = SoundID.NPCHit7; + this.DeathSound = SoundID.NPCDeath8; + this.noGravity = true; + this.knockBackResist = 0.0f; + this.value = 2000f; + this.scale = 1f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.dontCountMe = true; + } + else if (this.type == 90) + { + this.noTileCollide = true; + this.width = 32; + this.height = 32; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 40; + this.defense = 20; + this.lifeMax = 4000; + this.HitSound = SoundID.NPCHit7; + this.DeathSound = SoundID.NPCDeath8; + this.noGravity = true; + this.knockBackResist = 0.0f; + this.value = 10000f; + this.scale = 1f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.dontCountMe = true; + } + else if (this.type == 91) + { + this.noTileCollide = true; + this.width = 32; + this.height = 32; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 40; + this.defense = 20; + this.lifeMax = 4000; + this.HitSound = SoundID.NPCHit7; + this.DeathSound = SoundID.NPCDeath8; + this.noGravity = true; + this.knockBackResist = 0.0f; + this.value = 10000f; + this.scale = 1f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.dontCountMe = true; + } + else if (this.type == 92) + { + this.noTileCollide = true; + this.width = 32; + this.height = 32; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 40; + this.defense = 20; + this.lifeMax = 4000; + this.HitSound = SoundID.NPCHit7; + this.DeathSound = SoundID.NPCDeath8; + this.noGravity = true; + this.knockBackResist = 0.0f; + this.value = 10000f; + this.scale = 1f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.dontCountMe = true; + } + else if (this.type == 93) + { + this.npcSlots = 0.5f; + this.width = 26; + this.height = 20; + this.aiStyle = 14; + this.damage = 45; + this.defense = 16; + this.lifeMax = 100; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.75f; + this.DeathSound = SoundID.NPCDeath4; + this.value = 400f; + this.buffImmune[31] = false; + } + else if (this.type == 94) + { + this.npcSlots = 1f; + this.width = 44; + this.height = 44; + this.aiStyle = 5; + this.damage = 60; + this.defense = 32; + this.lifeMax = 230; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.knockBackResist = 0.55f; + this.value = 500f; + } + else if (this.type == 95) + { + this.width = 22; + this.height = 22; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 45; + this.defense = 10; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.scale = 0.9f; + this.value = 300f; + } + else if (this.type == 96) + { + this.width = 22; + this.height = 22; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 28; + this.defense = 20; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.scale = 0.9f; + this.value = 300f; + this.dontCountMe = true; + } + else if (this.type == 97) + { + this.width = 22; + this.height = 22; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 26; + this.defense = 30; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.scale = 0.9f; + this.value = 300f; + this.dontCountMe = true; + } + else if (this.type == 98) + { + this.npcSlots = 3.5f; + this.width = 22; + this.height = 22; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 70; + this.defense = 36; + this.lifeMax = 500; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 700f; + } + else if (this.type == 99) + { + this.width = 22; + this.height = 22; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 55; + this.defense = 40; + this.lifeMax = 500; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 700f; + this.dontCountMe = true; + } + else if (this.type == 100) + { + this.width = 22; + this.height = 22; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 40; + this.defense = 44; + this.lifeMax = 500; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 700f; + this.dontCountMe = true; + } + else if (this.type == 101) + { + this.noGravity = true; + this.noTileCollide = true; + this.behindTiles = true; + this.width = 30; + this.height = 30; + this.aiStyle = 13; + this.damage = 70; + this.defense = 30; + this.lifeMax = 320; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.2f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 600f; + } + else if (this.type == 102) + { + this.npcSlots = 0.5f; + this.noGravity = true; + this.width = 18; + this.height = 20; + this.aiStyle = 16; + this.damage = 80; + this.defense = 22; + this.lifeMax = 90; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 500f; + } + else if (this.type == 103) + { + this.noGravity = true; + this.width = 26; + this.height = 26; + this.aiStyle = 18; + this.damage = 80; + this.defense = 30; + this.lifeMax = 120; + this.HitSound = SoundID.NPCHit25; + this.DeathSound = SoundID.NPCDeath28; + this.value = 800f; + this.alpha = 20; + } + else if (this.type == 104) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 70; + this.defense = 38; + this.lifeMax = 350; + this.HitSound = SoundID.NPCHit6; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.4f; + this.value = 1000f; + this.buffImmune[31] = false; + } + else if (this.type == 105) + { + this.friendly = true; + this.width = 18; + this.height = 34; + this.aiStyle = 0; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + this.rarity = 1; + } + else if (this.type == 106) + { + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 0; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + this.rarity = 1; + } + else if (this.type == 107) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 108) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 109) + { + this.width = 34; + this.height = 78; + this.aiStyle = 3; + this.damage = 60; + this.defense = 25; + this.lifeMax = 800; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.2f; + this.value = 10000f; + this.rarity = 1; + } + else if (this.type == 110) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 45; + this.defense = 14; + this.lifeMax = 210; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.55f; + this.value = 400f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 112) + { + this.width = 16; + this.height = 16; + this.aiStyle = 9; + this.damage = 65; + this.defense = 0; + this.lifeMax = 1; + this.HitSound = (LegacySoundStyle) null; + this.DeathSound = SoundID.NPCDeath9; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.scale = 0.9f; + this.alpha = 80; + } + else if (this.type == 113) + { + this.npcSlots = 10f; + this.width = 100; + this.height = 100; + this.aiStyle = 27; + this.damage = 50; + this.defense = 12; + this.lifeMax = 8000; + this.HitSound = SoundID.NPCHit8; + this.DeathSound = SoundID.NPCDeath10; + this.noGravity = true; + this.noTileCollide = true; + this.behindTiles = true; + this.knockBackResist = 0.0f; + this.scale = 1.2f; + this.boss = true; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.value = 80000f; + } + else if (this.type == 114) + { + this.width = 100; + this.height = 100; + this.aiStyle = 28; + this.damage = 50; + this.defense = 0; + this.lifeMax = 8000; + this.HitSound = SoundID.NPCHit8; + this.DeathSound = SoundID.NPCDeath10; + this.noGravity = true; + this.noTileCollide = true; + this.behindTiles = true; + this.knockBackResist = 0.0f; + this.scale = 1.2f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.value = 80000f; + } + else if (this.type == 115) + { + this.width = 30; + this.height = 30; + this.aiStyle = 29; + this.damage = 30; + this.defense = 10; + this.lifeMax = 240; + this.HitSound = SoundID.NPCHit9; + this.DeathSound = SoundID.NPCDeath11; + this.noGravity = true; + this.behindTiles = true; + this.noTileCollide = true; + this.knockBackResist = 1.1f; + } + else if (this.type == 116) + { + this.width = 30; + this.height = 32; + this.aiStyle = 2; + this.damage = 30; + this.defense = 6; + this.lifeMax = 80; + this.HitSound = SoundID.NPCHit9; + this.knockBackResist = 0.8f; + this.DeathSound = SoundID.NPCDeath12; + } + else if (this.type == 117) + { + this.width = 14; + this.height = 14; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 26; + this.defense = 2; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit9; + this.DeathSound = SoundID.NPCDeath12; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + } + else if (this.type == 118) + { + this.width = 14; + this.height = 14; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 22; + this.defense = 6; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit9; + this.DeathSound = SoundID.NPCDeath12; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + } + else if (this.type == 119) + { + this.width = 14; + this.height = 14; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 18; + this.defense = 10; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit9; + this.DeathSound = SoundID.NPCDeath12; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + } + else if (this.type == 120) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 40; + this.defense = 30; + this.lifeMax = 370; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.4f; + this.value = 600f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.buffImmune[31] = false; + } + else if (this.type == 121) + { + this.width = 40; + this.height = 30; + this.aiStyle = 14; + this.damage = 45; + this.defense = 20; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit1; + this.alpha = 55; + this.knockBackResist = 0.8f; + this.scale = 1.1f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 122) + { + this.noGravity = true; + this.width = 20; + this.height = 20; + this.aiStyle = 22; + this.damage = 60; + this.defense = 22; + this.lifeMax = 220; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.8f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 600f; + this.buffImmune[20] = true; + } + else if (this.type == 123) + { + this.friendly = true; + this.width = 18; + this.height = 34; + this.aiStyle = 0; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + this.scale = 0.9f; + this.rarity = 1; + } + else if (this.type == 124) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 125) + { + this.width = 100; + this.height = 110; + this.aiStyle = 30; + this.defense = 10; + this.damage = 45; + this.lifeMax = 20000; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath14; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + this.SpawnWithHigherTime(30); + this.boss = true; + this.value = 120000f; + this.npcSlots = 5f; + } + else if (this.type == 126) + { + this.width = 100; + this.height = 110; + this.aiStyle = 31; + this.defense = 10; + this.damage = 50; + this.lifeMax = 23000; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath14; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + this.SpawnWithHigherTime(30); + this.boss = true; + this.value = 120000f; + this.npcSlots = 5f; + } + else if (this.type == (int) sbyte.MaxValue) + { + this.width = 80; + this.height = 102; + this.aiStyle = 32; + this.damage = 47; + this.defense = 24; + this.lifeMax = 28000; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.noGravity = true; + this.noTileCollide = true; + this.value = 120000f; + this.knockBackResist = 0.0f; + this.boss = true; + this.npcSlots = 6f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.buffImmune[189] = this.buffImmune[169] = this.buffImmune[183] = true; + this.boss = true; + } + else if (this.type == 128) + { + this.width = 52; + this.height = 52; + this.aiStyle = 35; + this.damage = 30; + this.defense = 23; + this.lifeMax = 7000; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.netAlways = true; + } + else if (this.type == 129) + { + this.width = 52; + this.height = 52; + this.aiStyle = 33; + this.damage = 56; + this.defense = 38; + this.lifeMax = 9000; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.netAlways = true; + } + else if (this.type == 130) + { + this.width = 52; + this.height = 52; + this.aiStyle = 34; + this.damage = 52; + this.defense = 34; + this.lifeMax = 9000; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.netAlways = true; + } + else if (this.type == 131) + { + this.width = 52; + this.height = 52; + this.aiStyle = 36; + this.damage = 29; + this.defense = 20; + this.lifeMax = 6000; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.netAlways = true; + } + else if (this.type == 132) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 15; + this.defense = 5; + this.lifeMax = 40; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 65f; + this.buffImmune[31] = false; + } + else if (this.type == 133) + { + this.width = 30; + this.height = 32; + this.aiStyle = 2; + this.damage = 40; + this.defense = 20; + this.lifeMax = 300; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.8f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 500f; + this.buffImmune[31] = false; + } + else if (this.type == 134) + { + this.npcSlots = 5f; + this.width = 38; + this.height = 38; + this.aiStyle = 37; + this.defense = 0; + this.damage = 70; + this.lifeMax = 80000; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 120000f; + this.scale = 1.25f; + this.boss = true; + this.netAlways = true; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + flag = true; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 135) + { + this.npcSlots = 5f; + this.width = 38; + this.height = 38; + this.aiStyle = 37; + this.damage = 55; + this.defense = 30; + this.lifeMax = 80000; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.netAlways = true; + this.scale = 1.25f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + flag = true; + this.dontCountMe = true; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 136) + { + this.npcSlots = 5f; + this.width = 38; + this.height = 38; + this.aiStyle = 37; + this.damage = 40; + this.defense = 35; + this.lifeMax = 80000; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.scale = 1.25f; + this.netAlways = true; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + flag = true; + this.dontCountMe = true; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 139) + { + this.npcSlots = 1f; + this.width = 30; + this.height = 30; + this.aiStyle = 5; + this.damage = 50; + this.defense = 20; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.noGravity = true; + this.knockBackResist = 0.8f; + this.noTileCollide = true; + flag = true; + } + else if (this.type == 137) + { + this.width = 26; + this.height = 20; + this.aiStyle = 14; + this.damage = 75; + this.defense = 30; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.75f; + this.DeathSound = SoundID.NPCDeath6; + this.value = 500f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.buffImmune[31] = false; + } + else if (this.type == 138) + { + this.width = 24; + this.height = 18; + this.aiStyle = 1; + this.damage = 70; + this.defense = 30; + this.lifeMax = 180; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.alpha = 100; + this.value = 400f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.knockBackResist = 0.85f; + this.scale = 1.05f; + this.buffImmune[31] = false; + } + else if (this.type == 140) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 55; + this.defense = 28; + this.lifeMax = 260; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.4f; + this.value = 400f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + this.buffImmune[24] = true; + } + else if (this.type == 141) + { + this.width = 34; + this.height = 28; + this.aiStyle = 1; + this.damage = 50; + this.defense = 18; + this.lifeMax = 150; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.alpha = 55; + this.value = 400f; + this.scale = 1.1f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + this.knockBackResist = 0.8f; + } + else if (this.type == 142) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 143) + { + this.width = 26; + this.height = 40; + this.aiStyle = 38; + this.damage = 50; + this.defense = 20; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit11; + this.DeathSound = SoundID.NPCDeath15; + this.knockBackResist = 0.6f; + this.value = 400f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.coldDamage = true; + } + else if (this.type == 144) + { + this.width = 26; + this.height = 40; + this.aiStyle = 38; + this.damage = 65; + this.defense = 26; + this.lifeMax = 240; + this.HitSound = SoundID.NPCHit11; + this.DeathSound = SoundID.NPCDeath15; + this.knockBackResist = 0.6f; + this.value = 400f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.coldDamage = true; + } + else if (this.type == 145) + { + this.width = 26; + this.height = 40; + this.aiStyle = 38; + this.damage = 55; + this.defense = 22; + this.lifeMax = 220; + this.HitSound = SoundID.NPCHit11; + this.DeathSound = SoundID.NPCDeath15; + this.knockBackResist = 0.6f; + this.value = 400f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.coldDamage = true; + } + else if (this.type == 147) + { + this.width = 24; + this.height = 18; + this.aiStyle = 1; + this.damage = 8; + this.defense = 4; + this.lifeMax = 30; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.alpha = 50; + this.value = 50f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + this.coldDamage = true; + } + else if (this.type == 148) + { + this.width = 16; + this.height = 34; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 2205; + } + else if (this.type == 149) + { + this.width = 16; + this.height = 34; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 2205; + } + else if (this.type == 150) + { + this.npcSlots = 0.5f; + this.width = 22; + this.height = 22; + this.aiStyle = 14; + this.damage = 18; + this.defense = 6; + this.lifeMax = 30; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.8f; + this.DeathSound = SoundID.NPCDeath4; + this.value = 250f; + this.buffImmune[31] = false; + } + else if (this.type == 151) + { + this.npcSlots = 0.5f; + this.width = 22; + this.height = 22; + this.aiStyle = 14; + this.damage = 50; + this.defense = 16; + this.lifeMax = 160; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.6f; + this.DeathSound = SoundID.NPCDeath4; + this.value = 400f; + this.scale = 1.15f; + this.lavaImmune = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.buffImmune[31] = false; + } + else if (this.type == 152) + { + this.npcSlots = 0.5f; + this.width = 38; + this.height = 34; + this.aiStyle = 14; + this.damage = 80; + this.defense = 24; + this.lifeMax = 220; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.65f; + this.DeathSound = SoundID.NPCDeath4; + this.value = 400f; + this.buffImmune[31] = false; + } + else if (this.type == 153) + { + this.npcSlots = 2f; + this.width = 46; + this.height = 32; + this.aiStyle = 39; + this.damage = 80; + this.defense = 30; + this.lifeMax = 470; + this.HitSound = SoundID.NPCHit24; + this.knockBackResist = 0.3f; + this.DeathSound = SoundID.NPCDeath27; + this.value = 500f; + this.noGravity = false; + this.buffImmune[31] = false; + } + else if (this.type == 154) + { + this.npcSlots = 1.5f; + this.width = 46; + this.height = 32; + this.aiStyle = 39; + this.damage = 55; + this.defense = 28; + this.lifeMax = 400; + this.HitSound = SoundID.NPCHit24; + this.knockBackResist = 0.3f; + this.DeathSound = SoundID.NPCDeath27; + this.value = 450f; + this.noGravity = false; + this.buffImmune[31] = false; + } + else if (this.type == 155) + { + this.width = 46; + this.height = 30; + this.aiStyle = 26; + this.damage = 65; + this.defense = 30; + this.lifeMax = 300; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.3f; + this.value = 1000f; + this.buffImmune[31] = false; + } + else if (this.type == 156) + { + this.npcSlots = 2f; + this.width = 28; + this.height = 48; + this.aiStyle = 14; + this.damage = 50; + this.defense = 40; + this.lifeMax = 600; + this.HitSound = SoundID.NPCHit21; + this.knockBackResist = 0.5f; + this.DeathSound = SoundID.NPCDeath24; + this.value = 1200f; + this.lavaImmune = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + } + else if (this.type == 157) + { + this.npcSlots = 0.5f; + this.noGravity = true; + this.width = 74; + this.height = 20; + this.aiStyle = 16; + this.damage = 75; + this.defense = 30; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 500f; + } + else if (this.type == 160) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 161) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 16; + this.defense = 8; + this.lifeMax = 50; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.45f; + this.value = 80f; + this.buffImmune[31] = false; + } + else if (this.type == 163) + { + this.width = 50; + this.height = 20; + this.aiStyle = 3; + this.damage = 90; + this.defense = 40; + this.lifeMax = 350; + this.HitSound = SoundID.NPCHit29; + this.DeathSound = SoundID.NPCDeath32; + this.knockBackResist = 0.25f; + this.value = 500f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + this.npcSlots = 0.5f; + this.SpawnWithHigherTime(2); + } + else if (this.type == 238) + { + this.noGravity = true; + this.width = 36; + this.height = 36; + this.aiStyle = 40; + this.damage = 100; + this.defense = 40; + this.lifeMax = 350; + this.HitSound = SoundID.NPCHit29; + this.DeathSound = SoundID.NPCDeath32; + this.knockBackResist = 0.25f; + this.value = 500f; + this.SpawnWithHigherTime(2); + this.npcSlots = 0.5f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 164) + { + this.width = 50; + this.height = 20; + this.aiStyle = 3; + this.damage = 30; + this.defense = 10; + this.lifeMax = 80; + this.HitSound = SoundID.NPCHit29; + this.DeathSound = SoundID.NPCDeath32; + this.knockBackResist = 0.25f; + this.value = 100f; + this.SpawnWithHigherTime(2); + this.npcSlots = 0.5f; + this.buffImmune[20] = true; + } + else if (this.type == 165) + { + this.noGravity = true; + this.width = 36; + this.height = 36; + this.aiStyle = 40; + this.damage = 30; + this.defense = 10; + this.lifeMax = 80; + this.HitSound = SoundID.NPCHit29; + this.DeathSound = SoundID.NPCDeath32; + this.knockBackResist = 0.25f; + this.value = 100f; + this.SpawnWithHigherTime(2); + this.npcSlots = 0.5f; + this.buffImmune[20] = true; + } + else if (this.type == 167) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 24; + this.defense = 10; + this.lifeMax = 70; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 200f; + this.buffImmune[31] = false; + this.buffImmune[20] = true; + } + else if (this.type == 168) + { + this.width = 16; + this.height = 34; + this.aiStyle = 3; + this.damage = 20; + this.defense = 4; + this.lifeMax = 70; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 500f; + this.buffImmune[31] = false; + } + else if (this.type == 169) + { + this.noGravity = true; + this.width = 18; + this.height = 40; + this.aiStyle = 22; + this.damage = 55; + this.defense = 20; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit5; + this.knockBackResist = 0.6f; + this.DeathSound = SoundID.NPCDeath7; + this.value = 1500f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.buffImmune[31] = false; + this.buffImmune[44] = true; + this.coldDamage = true; + } + else if (this.type == 170) + { + this.width = 44; + this.height = 36; + this.aiStyle = 2; + this.damage = 70; + this.defense = 16; + this.lifeMax = 210; + this.HitSound = SoundID.NPCHit27; + this.DeathSound = SoundID.NPCDeath30; + this.knockBackResist = 0.5f; + this.value = 2000f; + this.buffImmune[31] = false; + } + else if (this.type == 171) + { + this.width = 44; + this.height = 36; + this.aiStyle = 2; + this.damage = 70; + this.defense = 16; + this.lifeMax = 210; + this.HitSound = SoundID.NPCHit27; + this.DeathSound = SoundID.NPCDeath30; + this.knockBackResist = 0.5f; + this.value = 2000f; + this.buffImmune[31] = false; + } + else if (this.type == 172) + { + this.width = 18; + this.height = 40; + this.aiStyle = 8; + this.damage = 200; + this.defense = 30; + this.lifeMax = 600; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.3f; + this.value = 5000f; + this.buffImmune[20] = true; + this.rarity = 2; + } + else if (this.type == 173) + { + this.npcSlots = 1f; + this.width = 30; + this.height = 30; + this.aiStyle = 5; + this.damage = 22; + this.defense = 8; + this.lifeMax = 40; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.knockBackResist = 0.5f; + this.value = 90f; + } + else if (this.type == 174) + { + this.npcSlots = 1f; + this.width = 52; + this.height = 26; + this.aiStyle = 41; + this.damage = 65; + this.defense = 26; + this.lifeMax = 220; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.3f; + this.value = 450f; + } + else if (this.type == 175) + { + this.noGravity = true; + this.noTileCollide = true; + this.width = 30; + this.height = 30; + this.aiStyle = 13; + this.damage = 100; + this.defense = 30; + this.lifeMax = 300; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.25f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 650f; + this.buffImmune[20] = true; + } + else if (this.type == 176) + { + this.width = 34; + this.height = 32; + this.aiStyle = 5; + this.damage = 70; + this.defense = 22; + this.lifeMax = 220; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.5f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 600f; + this.noGravity = true; + this.buffImmune[20] = true; + this.npcSlots = 1.5f; + } + else if (this.type == 177) + { + this.npcSlots = 1f; + this.width = 58; + this.height = 44; + this.aiStyle = 41; + this.damage = 80; + this.defense = 26; + this.lifeMax = 300; + this.HitSound = SoundID.NPCHit22; + this.DeathSound = SoundID.NPCDeath25; + this.knockBackResist = 0.5f; + this.value = 500f; + } + else if (this.type == 178) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 179) + { + this.width = 40; + this.height = 40; + this.aiStyle = 23; + this.damage = 80; + this.defense = 18; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath6; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.knockBackResist = 0.4f; + } + else if (this.type == 180) + { + this.width = 44; + this.height = 36; + this.aiStyle = 2; + this.damage = 70; + this.defense = 16; + this.lifeMax = 210; + this.HitSound = SoundID.NPCHit27; + this.DeathSound = SoundID.NPCDeath30; + this.knockBackResist = 0.5f; + this.value = 4000f; + this.buffImmune[31] = false; + } + else if (this.type == 181) + { + this.width = 18; + this.height = 44; + this.aiStyle = 3; + this.damage = 25; + this.defense = 10; + this.lifeMax = 70; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.4f; + this.value = 200f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 182) + { + this.noGravity = true; + this.noTileCollide = true; + this.width = 24; + this.height = 62; + this.aiStyle = 22; + this.damage = 65; + this.defense = 18; + this.lifeMax = 240; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.alpha = 100; + this.value = 500f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.knockBackResist = 0.7f; + } + else if (this.type == 183) + { + this.width = 40; + this.height = 30; + this.aiStyle = 1; + this.damage = 60; + this.defense = 26; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.alpha = 55; + this.value = 400f; + this.scale = 1.1f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 184) + { + this.width = 24; + this.height = 18; + this.aiStyle = 1; + this.damage = 12; + this.defense = 8; + this.lifeMax = 60; + this.scale = 1.1f; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.alpha = 50; + this.value = 200f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + this.coldDamage = true; + } + else if (this.type == 185) + { + this.width = 28; + this.height = 28; + this.aiStyle = 3; + this.damage = 26; + this.defense = 12; + this.lifeMax = 70; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 1.1f; + this.value = 200f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + this.coldDamage = true; + } + else if (this.type == 186) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 16; + this.defense = 8; + this.lifeMax = 50; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.45f; + this.value = 65f; + this.buffImmune[31] = false; + } + else if (this.type == 187) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 13; + this.defense = 6; + this.lifeMax = 40; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.55f; + this.value = 55f; + this.buffImmune[31] = false; + } + else if (this.type == 188) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 13; + this.defense = 8; + this.lifeMax = 45; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.45f; + this.value = 80f; + this.buffImmune[31] = false; + } + else if (this.type == 189) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 16; + this.defense = 4; + this.lifeMax = 45; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.55f; + this.value = 70f; + this.buffImmune[31] = false; + } + else if (this.type == 190) + { + this.width = 30; + this.height = 32; + this.aiStyle = 2; + this.damage = 18; + this.defense = 4; + this.lifeMax = 65; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.7f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 75f; + this.buffImmune[31] = false; + } + else if (this.type == 191) + { + this.width = 30; + this.height = 32; + this.aiStyle = 2; + this.damage = 16; + this.defense = 2; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.85f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 75f; + this.buffImmune[31] = false; + } + else if (this.type == 192) + { + this.width = 30; + this.height = 32; + this.aiStyle = 2; + this.damage = 18; + this.defense = 2; + this.lifeMax = 50; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.8f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 75f; + this.buffImmune[31] = false; + } + else if (this.type == 193) + { + this.width = 30; + this.height = 32; + this.aiStyle = 2; + this.damage = 20; + this.defense = 0; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.8f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 75f; + this.buffImmune[31] = false; + } + else if (this.type == 194) + { + this.width = 30; + this.height = 32; + this.aiStyle = 2; + this.damage = 14; + this.defense = 4; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.8f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 75f; + this.buffImmune[31] = false; + } + else if (this.type == 195) + { + this.width = 18; + this.height = 40; + this.aiStyle = 42; + this.damage = 10; + this.defense = 30; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + this.rarity = 1; + this.value = (float) Item.buyPrice(gold: 5); + } + else if (this.type == 196) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 35; + this.defense = 16; + this.lifeMax = 300; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.4f; + this.value = (float) Item.buyPrice(gold: 5); + this.buffImmune[31] = false; + this.rarity = 1; + } + else if (this.type == 197) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 50; + this.defense = 28; + this.lifeMax = 280; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.45f; + this.value = 500f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 198) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 38; + this.defense = 20; + this.lifeMax = 400; + this.HitSound = SoundID.NPCHit26; + this.DeathSound = SoundID.NPCDeath29; + this.knockBackResist = 0.4f; + this.value = 650f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 199) + { + this.width = 42; + this.height = 30; + this.aiStyle = 3; + this.damage = 60; + this.defense = 30; + this.lifeMax = 400; + this.HitSound = SoundID.NPCHit26; + this.DeathSound = SoundID.NPCDeath29; + this.knockBackResist = 0.0f; + this.value = 650f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 200) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 12; + this.defense = 4; + this.lifeMax = 38; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.6f; + this.value = 65f; + this.buffImmune[31] = false; + } + else if (this.type == 201) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 20; + this.defense = 12; + this.lifeMax = 55; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 130f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 202) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 18; + this.defense = 8; + this.lifeMax = 65; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 120f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 203) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 22; + this.defense = 8; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 110f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 204) + { + this.width = 24; + this.height = 18; + this.aiStyle = 1; + this.damage = 28; + this.defense = 8; + this.lifeMax = 65; + this.scale = 1.15f; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.alpha = 50; + this.value = 300f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 205) + { + this.width = 40; + this.height = 40; + this.aiStyle = 5; + this.damage = 70; + this.defense = 28; + this.lifeMax = 1000; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.4f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 600f; + this.noGravity = true; + this.buffImmune[20] = true; + this.rarity = 2; + } + else if (this.type == 206) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 60; + this.defense = 30; + this.lifeMax = 280; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + this.value = 500f; + this.buffImmune[31] = false; + this.coldDamage = true; + } + else if (this.type == 207) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 208) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 209) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 210) + { + this.width = 12; + this.height = 12; + this.aiStyle = 5; + this.damage = 20; + this.defense = 5; + this.lifeMax = 20; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.5f; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.buffImmune[20] = true; + } + else if (this.type == 211) + { + this.width = 8; + this.height = 8; + this.aiStyle = 5; + this.damage = 15; + this.defense = 2; + this.lifeMax = 10; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.5f; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.buffImmune[20] = true; + } + else if (this.type == 212) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 35; + this.defense = 17; + this.lifeMax = 300; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.4f; + this.value = 700f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 213) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 50; + this.defense = 22; + this.lifeMax = 450; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.2f; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 214) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 30; + this.defense = 14; + this.lifeMax = 225; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.3f; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 215) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 35; + this.defense = 20; + this.lifeMax = 350; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.35f; + this.value = 1500f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 216) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 70; + this.defense = 30; + this.lifeMax = 3000; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.0f; + this.value = 50000f; + this.buffImmune[20] = true; + this.buffImmune[31] = true; + this.rarity = 1; + } + else if (this.type == 217) + { + this.width = 28; + this.height = 20; + this.aiStyle = 3; + this.damage = 20; + this.defense = 10; + this.lifeMax = 40; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath16; + this.value = 60f; + this.rarity = 1; + } + else if (this.type == 218) + { + this.width = 28; + this.height = 20; + this.aiStyle = 3; + this.damage = 20; + this.defense = 10; + this.lifeMax = 40; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath16; + this.value = 60f; + this.rarity = 1; + } + else if (this.type == 219) + { + this.width = 28; + this.height = 20; + this.aiStyle = 3; + this.damage = 20; + this.defense = 10; + this.lifeMax = 40; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath16; + this.value = 60f; + this.rarity = 1; + } + else if (this.type == 220) + { + this.width = 28; + this.height = 20; + this.aiStyle = 3; + this.damage = 20; + this.defense = 10; + this.lifeMax = 40; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 60f; + this.rarity = 1; + } + else if (this.type == 221) + { + this.noGravity = true; + this.width = 26; + this.height = 26; + this.aiStyle = 18; + this.damage = 20; + this.defense = 2; + this.lifeMax = 30; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 100f; + this.alpha = 20; + this.rarity = 1; + } + else if (this.type == 222) + { + this.width = 66; + this.height = 66; + this.aiStyle = 43; + this.damage = 30; + this.defense = 8; + this.lifeMax = 3400; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + this.SpawnWithHigherTime(30); + this.boss = true; + this.value = 50000f; + this.npcSlots = 7f; + } + else if (this.type == 223) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 16; + this.defense = 8; + this.lifeMax = 50; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.45f; + this.value = 70f; + this.buffImmune[31] = false; + } + else if (this.type == 224) + { + this.width = 32; + this.height = 18; + this.aiStyle = 44; + this.damage = 9; + this.defense = 4; + this.lifeMax = 20; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.8f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 300f; + this.buffImmune[31] = false; + } + if (this.type == 225) + { + this.width = 38; + this.height = 26; + this.aiStyle = 1; + this.damage = 10; + this.defense = 5; + this.lifeMax = 35; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.75f; + this.value = 200f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 226) + { + this.npcSlots = 0.5f; + this.width = 34; + this.height = 50; + this.aiStyle = 14; + this.damage = 85; + this.defense = 28; + this.lifeMax = 260; + this.HitSound = SoundID.NPCHit23; + this.knockBackResist = 0.65f; + this.DeathSound = SoundID.NPCDeath26; + this.value = 400f; + this.buffImmune[31] = false; + } + else if (this.type == 227) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 228) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 229) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 230) + { + this.width = 18; + this.height = 20; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 261; + } + else if (this.type == 231) + { + this.width = 34; + this.height = 32; + this.aiStyle = 5; + this.damage = 22; + this.defense = 16; + this.lifeMax = 50; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.3f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 200f; + this.noGravity = true; + this.buffImmune[20] = true; + } + else if (this.type == 232) + { + this.width = 34; + this.height = 32; + this.aiStyle = 5; + this.damage = 28; + this.defense = 12; + this.lifeMax = 42; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.6f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 200f; + this.noGravity = true; + this.buffImmune[20] = true; + } + else if (this.type == 233) + { + this.width = 34; + this.height = 32; + this.aiStyle = 5; + this.damage = 30; + this.defense = 14; + this.lifeMax = 38; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.45f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 200f; + this.noGravity = true; + this.buffImmune[20] = true; + } + else if (this.type == 234) + { + this.width = 34; + this.height = 32; + this.aiStyle = 5; + this.damage = 32; + this.defense = 6; + this.lifeMax = 42; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.55f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 200f; + this.noGravity = true; + this.buffImmune[20] = true; + } + else if (this.type == 235) + { + this.width = 34; + this.height = 32; + this.aiStyle = 5; + this.damage = 34; + this.defense = 4; + this.lifeMax = 38; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.6f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 200f; + this.noGravity = true; + this.buffImmune[20] = true; + } + else if (this.type == 236) + { + this.width = 50; + this.height = 20; + this.aiStyle = 3; + this.damage = 50; + this.defense = 14; + this.lifeMax = 120; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.25f; + this.value = 1000f; + this.SpawnWithHigherTime(2); + this.npcSlots = 0.75f; + this.buffImmune[20] = true; + } + else if (this.type == 237) + { + this.noGravity = true; + this.width = 36; + this.height = 36; + this.aiStyle = 40; + this.damage = 50; + this.defense = 14; + this.lifeMax = 120; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.25f; + this.value = 1000f; + this.SpawnWithHigherTime(2); + this.npcSlots = 0.75f; + this.buffImmune[20] = true; + } + else if (this.type == 239) + { + this.width = 50; + this.height = 20; + this.aiStyle = 3; + this.damage = 30; + this.defense = 8; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit20; + this.DeathSound = SoundID.NPCDeath23; + this.knockBackResist = 0.5f; + this.value = 130f; + this.SpawnWithHigherTime(2); + this.buffImmune[20] = true; + } + else if (this.type == 240) + { + this.noGravity = true; + this.width = 36; + this.height = 36; + this.aiStyle = 40; + this.damage = 30; + this.defense = 8; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit20; + this.DeathSound = SoundID.NPCDeath23; + this.knockBackResist = 0.5f; + this.value = 130f; + this.SpawnWithHigherTime(2); + this.buffImmune[20] = true; + } + else if (this.type == 241) + { + this.npcSlots = 0.5f; + this.noGravity = true; + this.width = 18; + this.height = 20; + this.aiStyle = 16; + this.damage = 30; + this.defense = 4; + this.lifeMax = 20; + this.HitSound = SoundID.NPCHit13; + this.DeathSound = SoundID.NPCDeath19; + this.value = 350f; + } + else if (this.type == 242) + { + this.noGravity = true; + this.width = 26; + this.height = 26; + this.aiStyle = 18; + this.damage = 75; + this.defense = 20; + this.lifeMax = 150; + this.HitSound = SoundID.NPCHit13; + this.DeathSound = SoundID.NPCDeath19; + this.value = 800f; + this.alpha = 20; + } + else if (this.type == 243) + { + this.width = 30; + this.height = 114; + this.aiStyle = 3; + this.damage = 60; + this.defense = 32; + this.lifeMax = 4000; + this.HitSound = SoundID.NPCHit5; + this.DeathSound = SoundID.NPCDeath7; + this.knockBackResist = 0.05f; + this.value = (float) Item.buyPrice(gold: 1, silver: 50); + this.buffImmune[20] = true; + this.buffImmune[44] = true; + this.coldDamage = true; + this.rarity = 2; + } + else if (this.type == 244) + { + this.width = 60; + this.height = 42; + this.aiStyle = 1; + this.damage = 85; + this.defense = 26; + this.lifeMax = 400; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.alpha = 175; + this.value = (float) Item.buyPrice(silver: 20); + this.knockBackResist = 0.3f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + this.rarity = 1; + } + else if (this.type == 245) + { + this.width = 140; + this.height = 140; + this.aiStyle = 45; + this.damage = 72; + this.defense = 26; + this.lifeMax = 9000; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.knockBackResist = 0.0f; + this.value = (float) Item.buyPrice(gold: 15); + this.alpha = (int) byte.MaxValue; + this.boss = true; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + } + else if (this.type == 246) + { + this.noGravity = true; + this.width = 70; + this.height = 70; + this.aiStyle = 46; + this.damage = 64; + this.defense = 20; + this.lifeMax = 16000; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = (LegacySoundStyle) null; + this.knockBackResist = 0.0f; + this.alpha = (int) byte.MaxValue; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + } + else if (this.type == 247 || this.type == 248) + { + this.noGravity = true; + this.width = 40; + this.height = 30; + this.aiStyle = 47; + this.damage = 59; + this.defense = 28; + this.lifeMax = 7000; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.alpha = (int) byte.MaxValue; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + } + else if (this.type == 249) + { + this.noGravity = true; + this.width = 70; + this.height = 70; + this.aiStyle = 48; + this.damage = 80; + this.defense = 32; + this.lifeMax = 11000; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.knockBackResist = 0.0f; + this.dontTakeDamage = true; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + } + else if (this.type == 250) + { + this.width = 34; + this.height = 26; + this.aiStyle = 49; + this.damage = 50; + this.defense = 24; + this.lifeMax = 300; + this.HitSound = SoundID.NPCHit30; + this.DeathSound = SoundID.NPCDeath33; + this.knockBackResist = 0.3f; + this.value = 300f; + this.buffImmune[20] = true; + } + else if (this.type == 251) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 50; + this.defense = 30; + this.lifeMax = 1000; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.3f; + this.value = (float) Item.buyPrice(silver: 50); + this.buffImmune[31] = false; + this.rarity = 2; + } + else if (this.type == 252) + { + this.noGravity = true; + this.npcSlots = 0.5f; + this.width = 32; + this.height = 32; + this.aiStyle = 5; + this.damage = 80; + this.defense = 12; + this.lifeMax = 100; + this.HitSound = SoundID.NPCHit46; + this.knockBackResist = 0.7f; + this.DeathSound = SoundID.NPCDeath48; + this.value = 500f; + this.buffImmune[31] = false; + } + else if (this.type == 254) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 40; + this.defense = 10; + this.lifeMax = 180; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.4f; + this.value = 1000f; + this.buffImmune[31] = false; + } + else if (this.type == (int) byte.MaxValue) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 38; + this.defense = 16; + this.lifeMax = 220; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.3f; + this.value = 1200f; + this.buffImmune[31] = false; + } + else if (this.type == 256) + { + this.noGravity = true; + this.width = 26; + this.height = 26; + this.aiStyle = 18; + this.damage = 90; + this.defense = 20; + this.lifeMax = 140; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.value = 1200f; + this.alpha = 20; + this.npcSlots = 0.3f; + } + else if (this.type == 257) + { + this.width = 44; + this.height = 34; + this.aiStyle = 3; + this.damage = 38; + this.defense = 24; + this.lifeMax = 230; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.3f; + this.value = 1300f; + this.buffImmune[31] = false; + this.npcSlots = 0.3f; + } + else if (this.type == 258) + { + this.width = 30; + this.height = 24; + this.aiStyle = 3; + this.damage = 60; + this.defense = 16; + this.lifeMax = 220; + this.HitSound = SoundID.NPCHit45; + this.DeathSound = SoundID.NPCDeath47; + this.knockBackResist = 0.3f; + this.value = 1500f; + this.buffImmune[31] = false; + this.npcSlots = 0.3f; + } + else if (this.type == 259) + { + this.noGravity = true; + this.noTileCollide = true; + this.width = 20; + this.height = 20; + this.aiStyle = 13; + this.damage = 24; + this.defense = 4; + this.lifeMax = 90; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.0f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 350f; + this.buffImmune[20] = true; + this.npcSlots = 0.3f; + } + else if (this.type == 260) + { + this.noGravity = true; + this.noTileCollide = true; + this.width = 36; + this.height = 36; + this.aiStyle = 13; + this.damage = 70; + this.defense = 20; + this.lifeMax = 300; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.0f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 1250f; + this.buffImmune[20] = true; + this.npcSlots = 0.3f; + } + else if (this.type == 261) + { + this.width = 12; + this.height = 12; + this.aiStyle = 50; + this.damage = 80; + this.defense = 0; + this.lifeMax = 1; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.npcSlots = 0.0f; + } + else if (this.type == 262) + { + this.noTileCollide = true; + this.width = 86; + this.height = 86; + this.aiStyle = 51; + this.damage = 50; + this.defense = 14; + this.lifeMax = 30000; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.0f; + this.value = (float) Item.buyPrice(gold: 15); + this.noGravity = true; + this.boss = true; + this.npcSlots = 16f; + this.buffImmune[20] = true; + } + else if (this.type == 263) + { + this.noTileCollide = true; + this.noGravity = true; + this.width = 40; + this.height = 40; + this.aiStyle = 52; + this.damage = 60; + this.defense = 24; + this.lifeMax = 4000; + this.dontTakeDamage = true; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.buffImmune[20] = true; + } + else if (this.type == 264) + { + this.width = 24; + this.height = 24; + this.aiStyle = 53; + this.damage = 60; + this.defense = 20; + this.lifeMax = 1000; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.buffImmune[20] = true; + } + else if (this.type == 265) + { + this.width = 18; + this.height = 18; + this.aiStyle = 50; + this.damage = 70; + this.defense = 0; + this.lifeMax = 1; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.npcSlots = 0.0f; + } + else if (this.type == 266) + { + this.dontTakeDamage = true; + this.width = 160; + this.height = 110; + this.aiStyle = 54; + this.damage = 30; + this.defense = 14; + this.lifeMax = 1000; + this.HitSound = SoundID.NPCHit9; + this.DeathSound = SoundID.NPCDeath11; + this.knockBackResist = 0.5f; + this.noGravity = true; + this.noTileCollide = true; + this.SpawnWithHigherTime(30); + this.boss = true; + this.value = 50000f; + this.npcSlots = 6f; + } + else if (this.type == 267) + { + this.width = 30; + this.height = 30; + this.aiStyle = 55; + this.damage = 20; + this.defense = 10; + this.lifeMax = 100; + this.HitSound = SoundID.NPCHit9; + this.DeathSound = SoundID.NPCDeath11; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.8f; + } + else if (this.type == 268) + { + this.noGravity = true; + this.width = 28; + this.height = 56; + this.aiStyle = 22; + this.damage = 55; + this.defense = 20; + this.lifeMax = 340; + this.HitSound = SoundID.NPCHit13; + this.DeathSound = SoundID.NPCDeath19; + this.knockBackResist = 0.6f; + this.value = 450f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 269) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 70; + this.defense = 34; + this.lifeMax = 550; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.3f; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 270) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 55; + this.defense = 50; + this.lifeMax = 400; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.2f; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 271) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 70; + this.defense = 40; + this.lifeMax = 450; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.25f; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 272) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 75; + this.defense = 28; + this.lifeMax = 400; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.35f; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 273) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 45; + this.defense = 50; + this.lifeMax = 500; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.15f; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 274) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 65; + this.defense = 34; + this.lifeMax = 350; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.4f; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 275) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 45; + this.defense = 50; + this.lifeMax = 550; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.15f; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 276) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 85; + this.defense = 54; + this.lifeMax = 500; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.2f; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 277) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 70; + this.defense = 32; + this.lifeMax = 400; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.4f; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[31] = false; + } + else if (this.type == 278) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 65; + this.defense = 48; + this.lifeMax = 450; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.3f; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[31] = false; + } + else if (this.type == 279) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 40; + this.defense = 54; + this.lifeMax = 500; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.2f; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[31] = false; + } + else if (this.type == 280) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 75; + this.defense = 34; + this.lifeMax = 500; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.4f; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[31] = false; + } + else if (this.type == 281) + { + this.width = 18; + this.height = 40; + this.aiStyle = 8; + this.damage = 40; + this.defense = 20; + this.lifeMax = 400; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.6f; + this.value = 1500f; + this.npcSlots = 2f; + this.buffImmune[20] = true; + } + else if (this.type == 282) + { + this.width = 18; + this.height = 40; + this.aiStyle = 8; + this.damage = 35; + this.defense = 28; + this.lifeMax = 450; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 1500f; + this.npcSlots = 2f; + this.buffImmune[20] = true; + } + else if (this.type == 283) + { + this.width = 18; + this.height = 40; + this.aiStyle = 8; + this.damage = 50; + this.defense = 18; + this.lifeMax = 300; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.55f; + this.value = 1500f; + this.npcSlots = 2f; + this.buffImmune[20] = true; + } + else if (this.type == 284) + { + this.width = 18; + this.height = 40; + this.aiStyle = 8; + this.damage = 35; + this.defense = 24; + this.lifeMax = 450; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 1500f; + this.npcSlots = 2f; + this.buffImmune[20] = true; + } + else if (this.type == 285) + { + this.width = 18; + this.height = 40; + this.aiStyle = 8; + this.damage = 50; + this.defense = 12; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.7f; + this.value = 1500f; + this.npcSlots = 2f; + this.buffImmune[20] = true; + } + else if (this.type == 286) + { + this.width = 18; + this.height = 40; + this.aiStyle = 8; + this.damage = 60; + this.defense = 10; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.65f; + this.value = 1500f; + this.npcSlots = 2f; + this.buffImmune[20] = true; + } + else if (this.type == 287) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 90; + this.defense = 42; + this.lifeMax = 1000; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.3f; + this.value = 2000f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + this.rarity = 1; + } + else if (this.type == 288) + { + this.width = 20; + this.height = 20; + this.aiStyle = 56; + this.damage = 70; + this.defense = 30; + this.lifeMax = 200; + this.knockBackResist = 0.2f; + this.HitSound = SoundID.NPCHit36; + this.DeathSound = SoundID.NPCDeath39; + this.value = 500f; + this.noTileCollide = true; + this.noGravity = true; + flag = true; + } + else if (this.type == 289) + { + this.width = 44; + this.height = 44; + this.aiStyle = 10; + this.damage = 60; + this.defense = 20; + this.lifeMax = 400; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.noGravity = true; + this.noTileCollide = true; + this.value = 150f; + this.knockBackResist = 0.2f; + this.npcSlots = 0.75f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + } + else if (this.type == 290) + { + this.width = 34; + this.height = 62; + this.aiStyle = 3; + this.damage = 100; + this.defense = 50; + this.lifeMax = 5000; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.0f; + this.value = 50000f; + this.buffImmune[20] = true; + this.buffImmune[31] = true; + this.rarity = 1; + } + else if (this.type == 291) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 60; + this.defense = 28; + this.lifeMax = 400; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.4f; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + this.rarity = 2; + } + else if (this.type == 292) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 60; + this.defense = 28; + this.lifeMax = 400; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.4f; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + this.rarity = 2; + } + else if (this.type == 293) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 60; + this.defense = 28; + this.lifeMax = 400; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.4f; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + this.rarity = 2; + } + else if (this.type == 294) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 34; + this.defense = 6; + this.lifeMax = 70; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.9f; + this.value = 130f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 295) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 28; + this.defense = 12; + this.lifeMax = 70; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.7f; + this.value = 130f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 296) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 24; + this.defense = 14; + this.lifeMax = 120; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.6f; + this.value = 130f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 299) + { + this.width = 18; + this.height = 20; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 2018; + } + else if (this.type == 300) + { + this.width = 14; + this.height = 12; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath4; + this.npcSlots = 0.25f; + this.catchItem = (short) 2003; + } + else if (this.type == 301) + { + this.width = 36; + this.height = 26; + this.aiStyle = 17; + this.damage = 12; + this.defense = 2; + this.lifeMax = 35; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.85f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 50f; + } + if (this.type == 302) + { + this.width = 24; + this.height = 18; + this.aiStyle = 1; + this.damage = 7; + this.defense = 2; + this.lifeMax = 25; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 25f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 304) + { + this.width = 34; + this.height = 28; + this.aiStyle = 1; + this.damage = 80; + this.defense = 20; + this.lifeMax = 175; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 500f; + this.scale = 1.1f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + this.knockBackResist = 0.5f; + this.npcSlots = 0.3f; + } + else if (this.type >= 305 && this.type <= 314) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.value = 1200f; + this.buffImmune[31] = false; + this.npcSlots = 0.5f; + if (this.type == 305 || this.type == 310) + { + this.damage = 60; + this.defense = 18; + this.lifeMax = 500; + this.knockBackResist = 0.4f; + } + else if (this.type == 306 || this.type == 311) + { + this.damage = 52; + this.defense = 14; + this.lifeMax = 400; + this.knockBackResist = 0.2f; + this.scale = 1.05f; + } + else if (this.type == 307 || this.type == 312) + { + this.damage = 78; + this.defense = 16; + this.lifeMax = 600; + this.knockBackResist = 0.25f; + this.scale = 0.9f; + } + else if (this.type == 308 || this.type == 313) + { + this.damage = 66; + this.defense = 14; + this.lifeMax = 650; + this.knockBackResist = 0.35f; + this.scale = 0.95f; + } + else if (this.type == 309 || this.type == 314) + { + this.damage = 52; + this.defense = 26; + this.lifeMax = 450; + this.knockBackResist = 0.5f; + this.scale = 1.1f; + } + } + else if (this.type == 315) + { + this.width = 74; + this.height = 70; + this.aiStyle = 26; + this.damage = 130; + this.defense = 40; + this.lifeMax = 10000; + this.HitSound = SoundID.NPCHit12; + this.DeathSound = SoundID.NPCDeath18; + this.knockBackResist = 0.0f; + this.value = 10000f; + flag = true; + } + else if (this.type == 316) + { + this.noGravity = true; + this.noTileCollide = true; + this.width = 24; + this.height = 44; + this.aiStyle = 22; + this.damage = 18; + this.defense = 8; + this.lifeMax = 70; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.alpha = 100; + this.value = 90f; + flag = true; + this.knockBackResist = 0.6f; + } + else if (this.type == 317) + { + this.width = 30; + this.height = 32; + this.aiStyle = 2; + this.damage = 16; + this.defense = 6; + this.lifeMax = 75; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.7f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 100f; + this.buffImmune[31] = false; + } + else if (this.type == 318) + { + this.width = 30; + this.height = 32; + this.aiStyle = 2; + this.damage = 20; + this.defense = 4; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.65f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 100f; + this.buffImmune[31] = false; + } + else if (this.type == 319) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 20; + this.defense = 6; + this.lifeMax = 40; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.6f; + this.value = 85f; + this.buffImmune[31] = false; + this.scale = 0.9f; + } + else if (this.type == 320) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 15; + this.defense = 8; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 105f; + this.buffImmune[31] = false; + this.scale = 1.05f; + } + else if (this.type == 321) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 20; + this.defense = 14; + this.lifeMax = 34; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.3f; + this.value = 120f; + this.buffImmune[31] = false; + this.scale = 1.1f; + } + else if (this.type == 322) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 23; + this.defense = 0; + this.lifeMax = 115; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.65f; + this.value = 130f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 323) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 18; + this.defense = 10; + this.lifeMax = 65; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 120f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 324) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 22; + this.defense = 10; + this.lifeMax = 70; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.4f; + this.value = 130f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + this.scale = 1.05f; + } + else if (this.type == 325) + { + this.width = 164; + this.height = 154; + this.aiStyle = 57; + this.damage = 120; + this.defense = 28; + this.lifeMax = 12000; + this.HitSound = SoundID.NPCHit7; + this.DeathSound = SoundID.NPCDeath5; + this.knockBackResist = 0.0f; + this.value = 10000f; + flag = true; + } + else if (this.type == 326) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 100; + this.defense = 32; + this.lifeMax = 900; + this.HitSound = SoundID.NPCHit7; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.2f; + this.value = 2000f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 327) + { + this.width = 100; + this.height = 100; + this.aiStyle = 58; + this.damage = 50; + this.defense = 36; + this.lifeMax = 22000; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.value = 50000f; + this.knockBackResist = 0.0f; + flag = true; + } + else if (this.type == 328) + { + this.width = 80; + this.height = 80; + this.aiStyle = 59; + this.damage = 65; + this.defense = 14; + this.lifeMax = 5000; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + flag = true; + this.dontTakeDamage = true; + this.npcSlots = 0.0f; + this.dontCountMe = true; + } + else if (this.type == 329) + { + this.width = 46; + this.height = 30; + this.aiStyle = 26; + this.damage = 80; + this.defense = 38; + this.lifeMax = 1200; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath5; + this.knockBackResist = 0.3f; + this.value = 3000f; + flag = true; + } + else if (this.type == 330) + { + this.noGravity = true; + this.noTileCollide = true; + this.width = 24; + this.height = 44; + this.aiStyle = 22; + this.damage = 90; + this.defense = 44; + this.lifeMax = 2000; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.alpha = 100; + this.value = 4500f; + flag = true; + this.knockBackResist = 0.4f; + } + else if (this.type == 331) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 14; + this.defense = 6; + this.lifeMax = 45; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 60f; + this.buffImmune[31] = false; + } + else if (this.type == 332) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 14; + this.defense = 6; + this.lifeMax = 45; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 60f; + this.buffImmune[31] = false; + } + if (this.type == 333) + { + this.width = 24; + this.height = 18; + this.aiStyle = 1; + this.damage = 7; + this.defense = 2; + this.lifeMax = 25; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 25f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + if (this.type == 334) + { + this.width = 24; + this.height = 18; + this.aiStyle = 1; + this.damage = 6; + this.defense = 2; + this.lifeMax = 23; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.scale = 0.9f; + this.value = 25f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + if (this.type == 335) + { + this.width = 24; + this.height = 18; + this.aiStyle = 1; + this.damage = 8; + this.defense = 3; + this.lifeMax = 29; + this.scale = 1.05f; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 25f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + if (this.type == 336) + { + this.width = 24; + this.height = 18; + this.aiStyle = 1; + this.damage = 5; + this.defense = 1; + this.lifeMax = 22; + this.scale = 0.85f; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 25f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type >= 338 && this.type <= 340) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 1200f; + this.buffImmune[31] = false; + this.npcSlots = 0.5f; + if (this.type == 338) + { + this.damage = 65; + this.defense = 18; + this.lifeMax = 600; + this.knockBackResist = 0.4f; + } + else if (this.type == 339) + { + this.damage = 52; + this.defense = 24; + this.lifeMax = 700; + this.knockBackResist = 0.2f; + this.scale = 1.05f; + } + else if (this.type == 340) + { + this.damage = 78; + this.defense = 14; + this.lifeMax = 500; + this.knockBackResist = 0.25f; + this.scale = 0.9f; + } + } + else if (this.type == 341) + { + this.width = 24; + this.height = 24; + this.aiStyle = 25; + this.damage = 100; + this.defense = 32; + this.lifeMax = 900; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath6; + this.value = (float) Item.buyPrice(silver: 20); + this.knockBackResist = 0.25f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + } + else if (this.type == 342) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 90; + this.defense = 26; + this.lifeMax = 750; + this.HitSound = SoundID.NPCHit7; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.2f; + this.value = 1800f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 343) + { + this.width = 38; + this.height = 78; + this.aiStyle = 3; + this.damage = 140; + this.defense = 50; + this.lifeMax = 3500; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.0f; + this.value = 3000f; + this.buffImmune[31] = false; + this.npcSlots = 2f; + } + else if (this.type == 344) + { + this.width = 172; + this.height = 130; + this.aiStyle = 57; + this.damage = 110; + this.defense = 38; + this.lifeMax = 13000; + this.HitSound = SoundID.NPCHit7; + this.DeathSound = SoundID.NPCDeath5; + this.knockBackResist = 0.0f; + this.value = 10000f; + this.buffImmune[20] = true; + this.npcSlots = 3f; + } + else if (this.type == 345) + { + this.width = 130; + this.height = 140; + this.aiStyle = 60; + this.damage = 120; + this.defense = 38; + this.lifeMax = 34000; + this.HitSound = SoundID.NPCHit7; + this.DeathSound = SoundID.NPCDeath5; + this.knockBackResist = 0.0f; + this.value = 50000f; + this.buffImmune[20] = true; + this.noTileCollide = true; + this.noGravity = true; + this.npcSlots = 5f; + this.coldDamage = true; + } + else if (this.type == 346) + { + this.width = 112; + this.height = 140; + this.aiStyle = 61; + this.damage = 120; + this.defense = 56; + this.lifeMax = 18000; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.knockBackResist = 0.0f; + this.value = 10000f; + this.buffImmune[20] = true; + this.npcSlots = 4f; + } + else if (this.type == 347) + { + this.width = 50; + this.height = 50; + this.aiStyle = 62; + this.damage = 60; + this.defense = 28; + this.lifeMax = 1200; + this.HitSound = SoundID.NPCHit4; + this.knockBackResist = 0.4f; + this.DeathSound = SoundID.NPCDeath14; + this.value = 1000f; + this.noTileCollide = true; + this.noGravity = true; + this.npcSlots = 1.5f; + } + else if (this.type == 348) + { + this.width = 28; + this.height = 76; + this.aiStyle = 3; + this.damage = 80; + this.defense = 26; + this.lifeMax = 1800; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.4f; + this.value = 1500f; + this.buffImmune[31] = false; + this.npcSlots = 1.5f; + } + else if (this.type == 349) + { + this.width = 28; + this.height = 76; + this.aiStyle = 3; + this.damage = 100; + this.defense = 42; + this.lifeMax = 1800; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.1f; + this.value = 1500f; + this.buffImmune[31] = false; + this.npcSlots = 1.5f; + } + else if (this.type == 350) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 70; + this.defense = 30; + this.lifeMax = 900; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.45f; + this.value = 900f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 351) + { + this.width = 18; + this.height = 90; + this.aiStyle = 3; + this.damage = 100; + this.defense = 40; + this.lifeMax = 2500; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.1f; + this.value = 3000f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + this.npcSlots = 1.75f; + } + else if (this.type == 352) + { + this.width = 54; + this.height = 54; + this.aiStyle = 63; + this.damage = 75; + this.defense = 8; + this.lifeMax = 450; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.value = 500f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.knockBackResist = 0.4f; + this.noGravity = true; + this.noTileCollide = true; + this.npcSlots = 2f; + this.coldDamage = true; + } + else if (this.type == 353) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 354) + { + this.friendly = true; + this.width = 18; + this.height = 34; + this.aiStyle = 0; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + this.scale = 0.9f; + this.rarity = 1; + } + else if (this.type == 355) + { + this.width = 10; + this.height = 10; + this.aiStyle = 64; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.npcSlots = 0.2f; + this.noGravity = true; + this.catchItem = (short) 1992; + } + else if (this.type == 356) + { + this.width = 10; + this.height = 10; + this.aiStyle = 65; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.npcSlots = 0.25f; + this.noGravity = true; + this.catchItem = (short) 1994; + } + else if (this.type == 357) + { + this.width = 10; + this.height = 4; + this.aiStyle = 66; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.npcSlots = 0.1f; + this.catchItem = (short) 2002; + this.friendly = true; + } + else if (this.type == 358) + { + this.width = 12; + this.height = 12; + this.aiStyle = 64; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.npcSlots = 0.2f; + this.noGravity = true; + this.catchItem = (short) 2004; + } + else if (this.type == 359) + { + this.width = 12; + this.height = 12; + this.aiStyle = 67; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.npcSlots = 0.5f; + this.noGravity = true; + this.catchItem = (short) 2006; + } + else if (this.type == 360) + { + this.width = 14; + this.height = 14; + this.aiStyle = 67; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.npcSlots = 0.5f; + this.noGravity = true; + this.catchItem = (short) 2007; + } + else if (this.type == 361) + { + this.width = 12; + this.height = 10; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 2121; + } + else if (this.type == 362) + { + this.width = 22; + this.height = 26; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 2122; + } + else if (this.type == 363) + { + this.width = 28; + this.height = 22; + this.aiStyle = 68; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 2122; + } + else if (this.type == 364) + { + this.width = 22; + this.height = 26; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 2123; + } + else if (this.type == 365) + { + this.width = 28; + this.height = 22; + this.aiStyle = 68; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 2123; + } + else if (this.type == 366 || this.type == 367) + { + this.width = 26; + this.height = 18; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) (2156 + this.type - 366); + } + else if (this.type == 368) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 369) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.5f; + } + else if (this.type == 370) + { + this.width = 150; + this.height = 100; + this.aiStyle = 69; + this.damage = 100; + this.defense = 50; + this.lifeMax = 50000; + this.knockBackResist = 0.0f; + this.noTileCollide = true; + this.noGravity = true; + this.npcSlots = 10f; + this.HitSound = SoundID.NPCHit14; + this.DeathSound = SoundID.NPCDeath20; + this.value = 250000f; + this.boss = true; + this.netAlways = true; + this.SpawnWithHigherTime(30); + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[31] = true; + this.buffImmune[44] = true; + } + else if (this.type == 371) + { + this.width = 36; + this.height = 36; + this.aiStyle = 70; + this.damage = 100; + this.defense = 0; + this.lifeMax = 1; + this.HitSound = SoundID.NPCHit3; + this.DeathSound = SoundID.NPCDeath3; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 372) + { + this.noGravity = true; + this.width = 120; + this.height = 24; + this.aiStyle = 71; + this.damage = 100; + this.defense = 100; + this.lifeMax = 100; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.0f; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 373) + { + this.noGravity = true; + this.width = 100; + this.height = 24; + this.aiStyle = 71; + this.damage = 120; + this.defense = 100; + this.lifeMax = 100; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.0f; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 374) + { + this.width = 20; + this.height = 10; + this.aiStyle = 66; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.npcSlots = 0.15f; + this.catchItem = (short) 2673; + this.rarity = 4; + } + else if (this.type == 375) + { + this.width = 10; + this.height = 10; + this.aiStyle = 6; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.npcSlots = 0.15f; + this.catchItem = (short) 2673; + } + else if (this.type == 376) + { + this.friendly = true; + this.width = 34; + this.height = 8; + this.aiStyle = 0; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.5f; + this.scale = 0.9f; + this.rarity = 1; + } + else if (this.type == 377) + { + this.width = 14; + this.height = 10; + this.aiStyle = 1; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.friendly = true; + this.catchItem = (short) 2740; + this.npcSlots = 0.1f; + } + else if (this.type == 378) + { + this.npcSlots = 1f; + this.width = 20; + this.height = 26; + this.aiStyle = 41; + this.damage = 200; + this.defense = 30; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + this.value = 450f; + } + else if (this.type >= 379 && this.type <= 380) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 45; + this.defense = 14; + this.lifeMax = 210; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.55f; + this.value = 1000f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.netAlways = true; + this.chaseable = false; + } + else if (this.type >= 381 && this.type <= 382) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 50; + this.defense = 25; + this.lifeMax = 350; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.35f; + this.value = 1000f; + } + else if (this.type == 383) + { + this.lifeMax = 300; + this.defense = 50; + this.damage = 75; + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.HitSound = SoundID.NPCHit43; + this.DeathSound = SoundID.NPCDeath45; + this.value = 1200f; + this.knockBackResist = 0.25f; + this.buffImmune[31] = false; + } + else if (this.type == 384) + { + this.lifeMax = 1000; + this.width = 18; + this.defense = 20; + this.height = 40; + this.aiStyle = 72; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + flag = true; + this.npcSlots = 0.0f; + this.noTileCollide = true; + this.canGhostHeal = false; + } + else if (this.type == 385) + { + this.lifeMax = 750; + this.defense = 30; + this.damage = 80; + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.HitSound = SoundID.NPCHit43; + this.DeathSound = SoundID.NPCDeath45; + this.value = 600f; + this.knockBackResist = 0.0f; + this.npcSlots = 0.75f; + } + else if (this.type == 386) + { + this.lifeMax = 400; + this.defense = 34; + this.damage = 40; + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.HitSound = SoundID.NPCHit43; + this.DeathSound = SoundID.NPCDeath45; + this.value = 1200f; + this.knockBackResist = 0.4f; + } + else if (this.type == 387) + { + this.width = 20; + this.height = 50; + this.aiStyle = 73; + this.damage = 10; + this.defense = 40; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit53; + this.DeathSound = SoundID.NPCDeath56; + this.knockBackResist = 0.0f; + this.buffImmune[31] = true; + this.canGhostHeal = false; + } + else if (this.type == 388) + { + this.width = 40; + this.height = 30; + this.aiStyle = 74; + this.damage = 60; + this.defense = 16; + this.lifeMax = 300; + this.HitSound = SoundID.NPCHit42; + this.knockBackResist = 0.4f; + this.DeathSound = SoundID.NPCDeath44; + this.value = 1000f; + this.noTileCollide = true; + this.noGravity = true; + this.npcSlots = 1.5f; + this.canGhostHeal = false; + } + else if (this.type == 389) + { + this.lifeMax = 600; + this.defense = 38; + this.damage = 75; + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.HitSound = SoundID.NPCHit39; + this.DeathSound = SoundID.NPCDeath57; + this.value = 1200f; + this.npcSlots = 0.5f; + this.knockBackResist = 0.3f; + } + else if (this.type == 390) + { + this.damage = 65; + this.defense = 30; + this.lifeMax = 350; + this.width = 18; + this.height = 40; + this.aiStyle = 75; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 1200f; + this.npcSlots = 0.5f; + } + else if (this.type == 391) + { + this.lifeMax = 600; + this.defense = 30; + this.damage = 85; + this.width = 60; + this.height = 40; + this.aiStyle = 3; + this.HitSound = SoundID.NPCHit51; + this.DeathSound = SoundID.NPCDeath54; + this.value = 1200f; + this.npcSlots = 0.5f; + this.knockBackResist = 0.1f; + } + else if (this.type == 392) + { + this.lifeMax = 100; + this.defense = 100; + this.damage = 50; + this.width = 150; + this.height = 80; + this.aiStyle = 75; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + this.dontTakeDamage = true; + flag = true; + this.netAlways = true; + } + else if (this.type == 393) + { + this.lifeMax = 5000; + this.defense = 20; + this.damage = 60; + this.width = 40; + this.height = 16; + this.aiStyle = 75; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.value = 0.0f; + this.npcSlots = 1f; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + flag = true; + this.netAlways = true; + } + else if (this.type == 394) + { + this.lifeMax = 3500; + this.defense = 20; + this.damage = 60; + this.width = 46; + this.height = 36; + this.aiStyle = 75; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.value = 0.0f; + this.npcSlots = 1f; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + flag = true; + this.netAlways = true; + } + else if (this.type == 395) + { + this.lifeMax = 10000; + this.defense = 0; + this.damage = 80; + this.width = 46; + this.height = 36; + this.aiStyle = 76; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.value = 0.0f; + this.npcSlots = 6f; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + this.dontTakeDamage = true; + this.boss = true; + flag = true; + this.netAlways = true; + } + else if (this.type == 399) + { + this.defense = 5; + this.damage = 5; + this.lifeMax = 500; + this.aiStyle = 80; + this.width = 42; + this.height = 72; + this.value = 0.0f; + this.knockBackResist = 0.0f; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.npcSlots = 0.0f; + this.noGravity = true; + this.SpawnWithHigherTime(30); + this.chaseable = false; + this.netAlways = true; + this.rarity = 1; + } + else if (this.type == 396) + { + this.lifeMax = 45000; + this.defense = 50; + this.damage = 0; + this.width = 38; + this.height = 56; + this.aiStyle = 79; + this.HitSound = SoundID.NPCHit57; + this.DeathSound = SoundID.NPCDeath62; + this.value = 0.0f; + this.npcSlots = 6f; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + this.boss = true; + this.hide = true; + this.netAlways = true; + } + else if (this.type == 397) + { + this.lifeMax = 25000; + this.defense = 40; + this.damage = 0; + this.width = 46; + this.height = 66; + this.aiStyle = 78; + this.HitSound = SoundID.NPCHit57; + this.DeathSound = SoundID.NPCDeath62; + this.value = 0.0f; + this.npcSlots = 6f; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + this.boss = true; + this.hide = true; + this.netAlways = true; + } + else if (this.type == 398) + { + this.lifeMax = 50000; + this.defense = 70; + this.damage = 0; + this.width = 46; + this.height = 66; + this.aiStyle = 77; + this.HitSound = SoundID.NPCHit57; + this.DeathSound = (LegacySoundStyle) null; + this.value = 1000000f; + this.npcSlots = 6f; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + this.dontTakeDamage = true; + this.boss = true; + this.behindTiles = true; + this.hide = true; + this.netAlways = true; + } + else if (this.type == 400) + { + this.defense = 0; + this.damage = 60; + this.lifeMax = 100; + this.aiStyle = 81; + this.width = 60; + this.height = 60; + this.value = 0.0f; + this.knockBackResist = 0.0f; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.npcSlots = 0.0f; + this.noGravity = true; + this.dontTakeDamage = true; + this.noTileCollide = true; + this.netAlways = true; + } + else if (this.type == 401) + { + this.lifeMax = 400; + this.defense = 0; + this.damage = 0; + this.width = 30; + this.height = 30; + this.aiStyle = 82; + this.HitSound = SoundID.NPCHit57; + this.DeathSound = SoundID.NPCDeath62; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + this.hide = true; + } + else if (this.type == 437) + { + this.lifeMax = 400; + this.defense = 0; + this.damage = 0; + this.width = 54; + this.height = 54; + this.aiStyle = 83; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + this.dontTakeDamage = true; + this.netAlways = true; + this.chaseable = false; + } + else if (this.type == 438) + { + this.lifeMax = 400; + this.defense = 0; + this.damage = 0; + this.width = 22; + this.height = 40; + this.aiStyle = 83; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.knockBackResist = 0.0f; + this.lavaImmune = true; + this.netAlways = true; + this.chaseable = false; + } + else if (this.type == 439) + { + this.width = 24; + this.height = 50; + this.aiStyle = 84; + this.damage = 50; + this.defense = 42; + this.lifeMax = 32000; + this.knockBackResist = 0.0f; + this.noTileCollide = true; + this.noGravity = true; + this.npcSlots = 10f; + this.HitSound = SoundID.NPCHit55; + this.DeathSound = SoundID.NPCDeath59; + this.value = 100000f; + this.boss = true; + this.netAlways = true; + this.SpawnWithHigherTime(30); + flag = true; + } + else if (this.type == 440) + { + this.width = 24; + this.height = 50; + this.aiStyle = 84; + this.damage = 0; + this.defense = 35; + this.lifeMax = 10000; + this.knockBackResist = 0.0f; + this.noTileCollide = true; + this.noGravity = true; + this.npcSlots = 0.0f; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.netAlways = true; + this.SpawnWithHigherTime(30); + flag = true; + this.chaseable = false; + } + else if (this.type == 442) + { + this.width = 14; + this.height = 14; + this.aiStyle = 24; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.8f; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 2889; + this.npcSlots = 0.4f; + this.rarity = 3; + } + else if (this.type == 443) + { + this.width = 18; + this.height = 20; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 2890; + this.rarity = 3; + } + else if (this.type == 444) + { + this.width = 10; + this.height = 10; + this.aiStyle = 65; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.npcSlots = 0.25f; + this.noGravity = true; + this.catchItem = (short) 2891; + this.rarity = 3; + } + else if (this.type == 445) + { + this.width = 12; + this.height = 10; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 2892; + this.rarity = 3; + } + else if (this.type == 446) + { + this.width = 14; + this.height = 10; + this.aiStyle = 1; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.friendly = true; + this.catchItem = (short) 2893; + this.npcSlots = 0.1f; + this.rarity = 3; + } + else if (this.type == 447) + { + this.width = 14; + this.height = 12; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath4; + this.npcSlots = 0.25f; + this.catchItem = (short) 2894; + this.rarity = 3; + } + else if (this.type == 448) + { + this.width = 10; + this.height = 4; + this.aiStyle = 66; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.npcSlots = 0.1f; + this.catchItem = (short) 2895; + this.friendly = true; + this.rarity = 3; + } + else if (this.type == 449) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 20; + this.defense = 8; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 100f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 450) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 20; + this.defense = 12; + this.lifeMax = 55; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 130f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 451) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 18; + this.defense = 8; + this.lifeMax = 65; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 120f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 452) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 22; + this.defense = 8; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 110f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 453) + { + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 30; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.npcSlots = 7f; + this.rarity = 1; + } + else if (this.type == 454) + { + this.noTileCollide = true; + this.npcSlots = 5f; + this.width = 32; + this.height = 32; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 80; + this.defense = 10; + this.lifeMax = 4000; + this.HitSound = SoundID.NPCHit56; + this.DeathSound = SoundID.NPCDeath60; + this.noGravity = true; + this.knockBackResist = 0.0f; + this.value = 0.0f; + this.scale = 1f; + flag = true; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 459) + { + this.noTileCollide = true; + this.width = 32; + this.height = 32; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 40; + this.defense = 20; + this.lifeMax = 4000; + this.HitSound = SoundID.NPCHit56; + this.DeathSound = SoundID.NPCDeath60; + this.noGravity = true; + this.knockBackResist = 0.0f; + this.value = 0.0f; + this.scale = 1f; + flag = true; + this.alpha = (int) byte.MaxValue; + this.dontCountMe = true; + } + else if (this.type == 455 || this.type == 456 || this.type == 457 || this.type == 458) + { + this.noTileCollide = true; + this.width = 32; + this.height = 32; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 40; + this.defense = 20; + this.lifeMax = 4000; + this.HitSound = SoundID.NPCHit56; + this.DeathSound = SoundID.NPCDeath60; + this.noGravity = true; + this.knockBackResist = 0.0f; + this.value = 0.0f; + this.scale = 1f; + flag = true; + this.alpha = (int) byte.MaxValue; + this.dontCountMe = true; + } + else if (this.type == 464) + { + this.width = 18; + this.height = 20; + this.aiStyle = 3; + this.damage = 21; + this.defense = 5; + this.lifeMax = 75; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 500f; + this.buffImmune[31] = false; + } + else if (this.type == 465) + { + this.noGravity = true; + this.width = 18; + this.height = 20; + this.aiStyle = 16; + this.damage = 31; + this.defense = 7; + this.lifeMax = 110; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 500f; + } + else if (this.type == 470) + { + this.width = 16; + this.height = 34; + this.aiStyle = 3; + this.damage = 21; + this.defense = 5; + this.lifeMax = 75; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 500f; + this.buffImmune[31] = false; + } + else if (this.type == 473 || this.type == 474 || this.type == 475 || this.type == 476) + { + this.width = 28; + this.height = 44; + this.aiStyle = 87; + this.damage = 90; + this.defense = 34; + this.lifeMax = 3500; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath6; + this.value = 30000f; + this.knockBackResist = 0.1f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.rarity = 5; + } + else if (this.type == 480) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 30; + this.defense = 20; + this.lifeMax = 400; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.15f; + this.value = 1000f; + this.rarity = 1; + } + else if (this.type == 481) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 22; + this.defense = 10; + this.lifeMax = 70; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.4f; + this.value = 300f; + this.buffImmune[31] = false; + this.buffImmune[20] = true; + } + else if (this.type == 482) + { + this.width = 28; + this.height = 48; + this.aiStyle = 3; + this.damage = 30; + this.defense = 18; + this.lifeMax = 110; + this.HitSound = SoundID.NPCHit41; + this.DeathSound = SoundID.NPCDeath43; + this.knockBackResist = 0.35f; + this.value = 500f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + } + else if (this.type == 483) + { + this.npcSlots = 0.5f; + this.width = 20; + this.height = 30; + this.aiStyle = 91; + this.damage = 24; + this.defense = 8; + this.lifeMax = 40; + this.HitSound = SoundID.NPCHit7; + this.knockBackResist = 0.6f; + this.DeathSound = SoundID.NPCDeath6; + this.value = 1000f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + } + else if (this.type >= 484 && this.type <= 487) + { + this.width = 10; + this.height = 4; + this.aiStyle = 66; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.npcSlots = 0.1f; + this.catchItem = (short) (3191 + this.type - 484); + this.friendly = true; + } + else if (this.type == 488) + { + this.width = 18; + this.height = 40; + this.aiStyle = 92; + this.damage = 0; + this.defense = 0; + this.lifeMax = 1000; + this.HitSound = SoundID.NPCHit15; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.0f; + this.value = 0.0f; + this.immortal = true; + this.netAlways = true; + } + else if (this.type == 489) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 20; + this.defense = 8; + this.lifeMax = 75; + this.HitSound = SoundID.NPCHit18; + this.DeathSound = SoundID.NPCDeath21; + this.knockBackResist = 0.4f; + this.value = 150f; + this.buffImmune[31] = false; + } + else if (this.type == 490) + { + this.noGravity = true; + this.width = 28; + this.height = 30; + this.aiStyle = 22; + this.damage = 28; + this.defense = 14; + this.lifeMax = 50; + this.HitSound = SoundID.NPCHit19; + this.knockBackResist = 0.6f; + this.DeathSound = SoundID.NPCDeath22; + this.value = 150f; + this.buffImmune[31] = false; + } + else if (this.type == 491) + { + this.noGravity = true; + this.width = 350; + this.height = 120; + this.aiStyle = 93; + this.damage = 0; + this.defense = 100; + this.lifeMax = 50; + this.HitSound = SoundID.NPCHit19; + this.knockBackResist = 0.0f; + this.DeathSound = SoundID.NPCDeath22; + this.value = 0.0f; + flag = true; + this.dontTakeDamage = true; + this.netAlways = true; + } + else if (this.type == 492) + { + this.lifeMax = 2000; + this.defense = 20; + this.damage = 30; + this.width = 30; + this.height = 30; + this.aiStyle = 75; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.value = 0.0f; + this.npcSlots = 1f; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + flag = true; + this.hide = true; + this.netAlways = true; + } + else if (this.type >= 494 && this.type <= 495) + { + this.width = 28; + this.height = 22; + this.aiStyle = 3; + this.damage = 28; + this.defense = 6; + this.lifeMax = 50; + this.HitSound = SoundID.NPCHit33; + this.DeathSound = SoundID.NPCDeath36; + this.value = 120f; + } + else if (this.type >= 496 && this.type <= 497) + { + this.width = 28; + this.height = 22; + this.aiStyle = 39; + this.damage = 16; + this.defense = 12; + this.lifeMax = 50; + this.HitSound = SoundID.NPCHit38; + this.DeathSound = SoundID.NPCDeath41; + this.knockBackResist = 0.75f; + this.value = 120f; + } + else if (this.type >= 498 && this.type <= 506) + { + this.width = 24; + this.height = 44; + this.aiStyle = 3; + this.damage = 18; + this.defense = 10; + this.lifeMax = 65; + this.HitSound = SoundID.NPCHit50; + this.DeathSound = SoundID.NPCDeath53; + this.knockBackResist = 0.45f; + this.value = 120f; + this.buffImmune[31] = false; + } + else if (this.type == 441) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 513) + { + this.npcSlots = 4f; + this.width = 22; + this.height = 22; + this.aiStyle = 6; + this.damage = 18; + this.defense = 0; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 130f; + } + else if (this.type == 514) + { + this.width = 22; + this.height = 22; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 7; + this.defense = 16; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 130f; + this.dontCountMe = true; + this.npcSlots = 0.0f; + } + else if (this.type == 515) + { + this.width = 22; + this.height = 22; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 7; + this.defense = 20; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 130f; + this.dontCountMe = true; + this.npcSlots = 0.0f; + } + else if (this.type == 510) + { + this.npcSlots = 5f; + this.width = 34; + this.height = 34; + this.aiStyle = 6; + this.damage = 58; + this.defense = 18; + this.lifeMax = 500; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 700f; + } + else if (this.type == 511) + { + this.width = 34; + this.height = 34; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 54; + this.defense = 28; + this.lifeMax = 500; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 700f; + this.dontCountMe = true; + this.npcSlots = 0.0f; + } + else if (this.type == 512) + { + this.width = 34; + this.height = 34; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 50; + this.defense = 34; + this.lifeMax = 500; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = 700f; + this.dontCountMe = true; + this.npcSlots = 0.0f; + } + else if (this.type == 508) + { + this.width = 50; + this.height = 31; + this.aiStyle = 3; + this.damage = 38; + this.defense = 22; + this.lifeMax = 110; + this.HitSound = SoundID.NPCHit31; + this.DeathSound = SoundID.NPCDeath34; + this.knockBackResist = 0.4f; + this.value = 175f; + this.buffImmune[31] = false; + } + else if (this.type == 509) + { + this.width = 40; + this.height = 31; + this.aiStyle = 44; + this.damage = 34; + this.defense = 18; + this.lifeMax = 90; + this.knockBackResist = 0.3f; + this.HitSound = SoundID.NPCHit32; + this.DeathSound = SoundID.NPCDeath35; + this.value = 1775f; + this.buffImmune[31] = false; + } + else if (this.type == 580) + { + this.width = 26; + this.height = 26; + this.aiStyle = 3; + this.damage = 25; + this.defense = 10; + this.lifeMax = 80; + this.HitSound = SoundID.NPCHit31; + this.DeathSound = SoundID.NPCDeath34; + this.knockBackResist = 0.5f; + this.value = 80f; + this.buffImmune[31] = false; + this.npcSlots = 0.8f; + } + else if (this.type == 581) + { + this.width = 30; + this.height = 22; + this.aiStyle = 44; + this.damage = 29; + this.defense = 8; + this.lifeMax = 60; + this.knockBackResist = 0.5f; + this.HitSound = SoundID.NPCHit32; + this.DeathSound = SoundID.NPCDeath35; + this.value = 90f; + this.buffImmune[31] = false; + this.npcSlots = 0.8f; + } + else if (this.type >= 524 && this.type <= 527) + { + this.width = 24; + this.height = 44; + this.aiStyle = 3; + this.damage = 50; + this.defense = 26; + this.lifeMax = 180; + this.HitSound = SoundID.NPCHit37; + this.DeathSound = SoundID.NPCDeath40; + this.knockBackResist = 0.6f; + this.value = 500f; + this.buffImmune[31] = false; + this.npcSlots = 0.5f; + switch (this.type) + { + case 525: + this.lifeMax += 70; + this.defense += 4; + this.damage += 10; + this.knockBackResist -= 0.1f; + this.value += 150f; + break; + case 526: + this.lifeMax += 40; + this.defense += 6; + this.damage += 14; + this.knockBackResist -= 0.1f; + this.value += 150f; + break; + case 527: + this.lifeMax += 120; + this.defense += 6; + this.damage += 4; + this.knockBackResist -= 0.2f; + this.value += 250f; + break; + } + } + else if (this.type >= 528 && this.type <= 529) + { + this.width = 24; + this.height = 44; + this.aiStyle = 3; + this.damage = 52; + this.defense = 28; + this.lifeMax = 350; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.35f; + this.value = 600f; + this.buffImmune[31] = false; + } + else if (this.type == 530) + { + this.width = 50; + this.height = 20; + this.aiStyle = 3; + this.damage = 66; + this.defense = 24; + this.lifeMax = 320; + this.HitSound = SoundID.NPCHit13; + this.DeathSound = SoundID.NPCDeath19; + this.knockBackResist = 0.5f; + this.value = 600f; + this.SpawnWithHigherTime(2); + this.buffImmune[20] = true; + this.buffImmune[70] = true; + } + else if (this.type == 531) + { + this.noGravity = true; + this.width = 36; + this.height = 36; + this.aiStyle = 40; + this.damage = 66; + this.defense = 24; + this.lifeMax = 320; + this.HitSound = SoundID.NPCHit13; + this.DeathSound = SoundID.NPCDeath19; + this.knockBackResist = 0.5f; + this.value = 600f; + this.SpawnWithHigherTime(2); + this.buffImmune[20] = true; + this.buffImmune[70] = true; + } + else if (this.type == 532) + { + this.width = 32; + this.height = 31; + this.aiStyle = 3; + this.damage = 65; + this.defense = 34; + this.lifeMax = 270; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.3f; + this.value = 800f; + this.buffImmune[31] = false; + this.npcSlots = 0.75f; + } + else if (this.type == 533) + { + this.width = 28; + this.height = 62; + this.aiStyle = 8; + this.damage = 40; + this.defense = 20; + this.lifeMax = 220; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.0f; + this.value = 1200f; + this.npcSlots = 2f; + flag = true; + } + else if (this.type == 493) + { + this.lifeMax = 20000; + this.defense = 20; + this.damage = 0; + this.width = 130; + this.height = 270; + this.aiStyle = 94; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 0.0f; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + flag = true; + this.npcSlots = 0.0f; + } + else if (this.type == 402) + { + this.noTileCollide = true; + this.npcSlots = 1f; + this.width = 32; + this.height = 32; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 80; + this.defense = 10; + this.lifeMax = 1200; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.knockBackResist = 0.0f; + this.value = 0.0f; + this.scale = 1f; + flag = true; + } + else if (this.type == 405) + { + this.width = 44; + this.height = 44; + this.aiStyle = 85; + this.damage = 120; + this.defense = 50; + this.lifeMax = 300; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + this.noGravity = true; + this.buffImmune[31] = true; + this.npcSlots = 2f; + } + else if (this.type == 406) + { + this.width = 22; + this.height = 22; + this.aiStyle = 95; + this.damage = 70; + this.defense = 0; + this.lifeMax = 300; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.4f; + this.noGravity = true; + this.buffImmune[31] = true; + } + else if (this.type == 411) + { + this.width = 22; + this.height = 56; + this.aiStyle = 3; + this.damage = 80; + this.defense = 34; + this.lifeMax = 700; + this.HitSound = SoundID.NPCHit6; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.4f; + this.buffImmune[31] = false; + } + else if (this.type == 409) + { + this.width = 34; + this.height = 42; + this.aiStyle = 3; + this.damage = 70; + this.defense = 40; + this.lifeMax = 800; + this.HitSound = SoundID.NPCHit6; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.4f; + this.buffImmune[31] = false; + this.npcSlots = 3f; + } + else if (this.type == 410) + { + this.width = 22; + this.height = 22; + this.aiStyle = 26; + this.damage = 80; + this.defense = 10; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath5; + this.knockBackResist = 0.3f; + this.buffImmune[31] = false; + this.npcSlots = 0.5f; + } + else if (this.type == 407) + { + this.width = 40; + this.height = 60; + this.aiStyle = 96; + this.damage = 70; + this.defense = 38; + this.lifeMax = 1500; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.knockBackResist = 0.03f; + this.buffImmune[31] = true; + this.npcSlots = 3f; + } + else if (this.type == 507) + { + this.lifeMax = 20000; + this.defense = 20; + this.damage = 0; + this.width = 130; + this.height = 270; + this.aiStyle = 94; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 0.0f; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + flag = true; + this.npcSlots = 0.0f; + } + else if (this.type == 423) + { + this.width = 50; + this.height = 44; + this.aiStyle = 26; + this.damage = 90; + this.defense = 46; + this.lifeMax = 850; + this.HitSound = SoundID.NPCHit6; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.2f; + flag = true; + this.npcSlots = 1f; + } + else if (this.type == 421) + { + this.width = 44; + this.height = 44; + this.aiStyle = 85; + this.damage = 70; + this.defense = 34; + this.lifeMax = 330; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + this.noGravity = true; + this.buffImmune[31] = true; + this.npcSlots = 1f; + } + else if (this.type == 424) + { + this.width = 22; + this.height = 56; + this.aiStyle = 3; + this.damage = 80; + this.defense = 30; + this.lifeMax = 700; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath5; + this.knockBackResist = 0.6f; + this.buffImmune[31] = false; + this.npcSlots = 2f; + } + else if (this.type == 420) + { + this.width = 40; + this.height = 40; + this.aiStyle = 97; + this.damage = 75; + this.defense = 20; + this.lifeMax = 1300; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + this.noTileCollide = true; + this.noGravity = true; + this.npcSlots = 3f; + } + else if (this.type == 422) + { + this.lifeMax = 20000; + this.defense = 20; + this.damage = 0; + this.width = 130; + this.height = 270; + this.aiStyle = 94; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 0.0f; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + flag = true; + this.npcSlots = 0.0f; + } + else if (this.type == 425) + { + this.width = 30; + this.height = 56; + this.aiStyle = 3; + this.damage = 100; + this.defense = 40; + this.lifeMax = 800; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.4f; + this.buffImmune[31] = false; + } + else if (this.type == 429) + { + this.width = 22; + this.height = 56; + this.aiStyle = 3; + this.damage = 90; + this.defense = 34; + this.lifeMax = 700; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath5; + this.knockBackResist = 0.6f; + this.buffImmune[31] = false; + this.npcSlots = 2f; + } + else if (this.type == 428) + { + this.width = 24; + this.height = 26; + this.aiStyle = 3; + this.damage = 50; + this.defense = 6; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + } + else if (this.type == 427) + { + this.width = 40; + this.height = 28; + this.aiStyle = 3; + this.damage = 75; + this.defense = 20; + this.lifeMax = 500; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.5f; + this.buffImmune[31] = false; + this.npcSlots = 0.5f; + } + else if (this.type == 426) + { + this.width = 50; + this.height = 62; + this.aiStyle = 3; + this.damage = 100; + this.defense = 44; + this.lifeMax = 1000; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.3f; + this.buffImmune[31] = false; + } + else if (this.type == 517) + { + this.lifeMax = 20000; + this.defense = 20; + this.damage = 0; + this.width = 130; + this.height = 270; + this.aiStyle = 94; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 0.0f; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + flag = true; + this.npcSlots = 0.0f; + } + else if (this.type == 412) + { + this.width = 20; + this.height = 20; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 150; + this.defense = 1000; + this.lifeMax = 10000; + this.HitSound = SoundID.NPCHit11; + this.DeathSound = SoundID.NPCDeath22; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.dontTakeDamage = true; + this.npcSlots = 2f; + } + else if (this.type == 413) + { + this.width = 20; + this.height = 20; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 100; + this.defense = 1000; + this.lifeMax = 10000; + this.HitSound = SoundID.NPCHit11; + this.DeathSound = SoundID.NPCDeath22; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.dontCountMe = true; + this.dontTakeDamage = true; + this.npcSlots = 0.0f; + } + else if (this.type == 414) + { + this.width = 20; + this.height = 20; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 50; + this.defense = 0; + this.lifeMax = 10000; + this.HitSound = SoundID.NPCHit8; + this.DeathSound = SoundID.NPCDeath22; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.dontCountMe = true; + this.takenDamageMultiplier = 10f; + this.npcSlots = 0.0f; + } + else if (this.type == 415) + { + this.lifeMax = 800; + this.defense = 32; + this.damage = 55; + this.width = 60; + this.height = 40; + this.aiStyle = 3; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.2f; + } + else if (this.type == 416) + { + this.damage = 80; + this.defense = 28; + this.lifeMax = 800; + this.width = 18; + this.height = 40; + this.aiStyle = 75; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.2f; + } + else if (this.type == 518) + { + this.lifeMax = 1000; + this.defense = 28; + this.damage = 80; + this.width = 22; + this.height = 56; + this.aiStyle = 3; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.4f; + } + else if (this.type == 417) + { + this.npcSlots = 2f; + this.width = 46; + this.height = 52; + this.aiStyle = 39; + this.damage = 80; + this.defense = 34; + this.lifeMax = 700; + this.HitSound = SoundID.NPCHit7; + this.knockBackResist = 0.0f; + this.DeathSound = SoundID.NPCDeath5; + } + else if (this.type == 418) + { + this.width = 38; + this.height = 38; + this.aiStyle = 74; + this.damage = 70; + this.defense = 26; + this.lifeMax = 600; + this.HitSound = SoundID.NPCHit3; + this.DeathSound = SoundID.NPCDeath3; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.2f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + } + else if (this.type == 419) + { + this.lifeMax = 800; + this.defense = 30; + this.damage = 90; + this.width = 22; + this.height = 56; + this.aiStyle = 3; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.4f; + } + else if (this.type == 516) + { + this.width = 26; + this.height = 26; + this.aiStyle = 9; + this.damage = 100; + this.defense = 0; + this.lifeMax = 1; + this.HitSound = (LegacySoundStyle) null; + this.DeathSound = (LegacySoundStyle) null; + this.noGravity = true; + this.noTileCollide = false; + this.alpha = 0; + this.knockBackResist = 0.0f; + } + else if (this.type == 519) + { + this.width = 26; + this.height = 26; + this.aiStyle = 99; + this.damage = 120; + this.defense = 0; + this.lifeMax = 1; + this.HitSound = (LegacySoundStyle) null; + this.DeathSound = (LegacySoundStyle) null; + this.noGravity = true; + this.noTileCollide = false; + this.alpha = 0; + this.knockBackResist = 0.0f; + } + else if (this.type == 162) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 65; + this.defense = 18; + this.lifeMax = 350; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.3f; + this.value = 600f; + this.buffImmune[31] = false; + } + else if (this.type == 166) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 70; + this.defense = 26; + this.lifeMax = 450; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.2f; + this.value = 1000f; + this.buffImmune[31] = false; + this.buffImmune[20] = true; + } + else if (this.type == 253) + { + this.noGravity = true; + this.noTileCollide = true; + this.width = 24; + this.height = 44; + this.aiStyle = 22; + this.damage = 80; + this.defense = 22; + this.lifeMax = 700; + this.HitSound = SoundID.NPCHit49; + this.DeathSound = SoundID.NPCDeath51; + this.alpha = 100; + this.value = 1500f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.knockBackResist = 0.6f; + } + else if (this.type == 158) + { + this.npcSlots = 2f; + this.width = 22; + this.height = 22; + this.aiStyle = 14; + this.damage = 60; + this.defense = 32; + this.lifeMax = 750; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.75f; + this.DeathSound = SoundID.NPCDeath6; + this.value = 5000f; + this.buffImmune[31] = false; + } + else if (this.type == 159) + { + this.npcSlots = 2f; + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 80; + this.defense = 24; + this.lifeMax = 750; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.4f; + this.value = 5000f; + this.buffImmune[31] = false; + } + else if (this.type == 460) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 70; + this.defense = 30; + this.lifeMax = 700; + this.HitSound = SoundID.NPCHit7; + this.DeathSound = SoundID.NPCDeath17; + this.knockBackResist = 0.25f; + this.value = 1000f; + this.buffImmune[31] = false; + } + else if (this.type == 461) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 60; + this.defense = 22; + this.lifeMax = 400; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.3f; + this.value = 1000f; + } + else if (this.type == 462) + { + this.width = 20; + this.height = 24; + this.aiStyle = 3; + this.damage = 70; + this.defense = 14; + this.lifeMax = 270; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.7f; + this.value = 600f; + this.buffImmune[31] = false; + this.npcSlots = 0.5f; + } + else if (this.type == 463) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 100; + this.defense = 34; + this.lifeMax = 4000; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.1f; + this.value = 3000f; + } + else if (this.type == 466) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 70; + this.defense = 40; + this.lifeMax = 550; + this.HitSound = SoundID.NPCHit48; + this.DeathSound = SoundID.NPCDeath50; + this.knockBackResist = 0.5f; + this.value = 1500f; + } + else if (this.type == 467) + { + this.width = 22; + this.height = 22; + this.aiStyle = 85; + this.damage = 100; + this.defense = 80; + this.lifeMax = 350; + this.HitSound = SoundID.NPCHit34; + this.DeathSound = SoundID.NPCDeath37; + this.value = 900f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.knockBackResist = 0.7f; + this.noGravity = true; + } + else if (this.type == 469) + { + this.width = 38; + this.height = 26; + this.aiStyle = 3; + this.damage = 68; + this.defense = 28; + this.lifeMax = 600; + this.HitSound = SoundID.NPCHit47; + this.DeathSound = SoundID.NPCDeath49; + this.knockBackResist = 0.35f; + this.value = 1300f; + } + else if (this.type == 468) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 65; + this.defense = 24; + this.lifeMax = 500; + this.HitSound = SoundID.NPCHit35; + this.DeathSound = SoundID.NPCDeath38; + this.knockBackResist = 0.6f; + this.value = 1300f; + } + else if (this.type == 477) + { + this.noGravity = true; + this.netAlways = true; + this.width = 80; + this.height = 50; + this.aiStyle = 88; + this.damage = 80; + this.defense = 30; + this.lifeMax = 6000; + this.HitSound = SoundID.NPCHit44; + this.DeathSound = SoundID.NPCDeath46; + this.value = 50000f; + this.knockBackResist = 0.2f; + this.buffImmune[20] = true; + this.rarity = 1; + } + else if (this.type == 478) + { + this.width = 34; + this.height = 34; + this.aiStyle = 89; + this.damage = 0; + this.defense = 30; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 0.0f; + this.knockBackResist = 0.7f; + flag = true; + this.npcSlots = 0.0f; + } + else if (this.type == 479) + { + this.width = 46; + this.height = 30; + this.aiStyle = 90; + this.damage = 50; + this.defense = 14; + this.lifeMax = 700; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.3f; + this.value = 0.0f; + this.npcSlots = 0.1f; + } + else if (this.type == 26) + { + this.scale = 0.9f; + this.width = 18; + this.height = 38; + this.aiStyle = 3; + this.damage = 12; + this.defense = 4; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.8f; + this.value = 100f; + this.buffImmune[31] = false; + } + else if (this.type == 27) + { + this.scale = 0.95f; + this.width = 18; + this.height = 38; + this.aiStyle = 3; + this.damage = 20; + this.defense = 6; + this.lifeMax = 80; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.7f; + this.value = 200f; + this.buffImmune[31] = false; + } + else if (this.type == 28) + { + this.scale = 1.1f; + this.width = 18; + this.height = 38; + this.aiStyle = 3; + this.damage = 25; + this.defense = 8; + this.lifeMax = 110; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + this.value = 150f; + this.buffImmune[31] = false; + } + else if (this.type == 29) + { + this.width = 18; + this.height = 38; + this.aiStyle = 8; + this.damage = 20; + this.defense = 2; + this.lifeMax = 40; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.6f; + this.value = 200f; + } + else if (this.type == 30) + { + this.width = 16; + this.height = 16; + this.aiStyle = 9; + this.damage = 20; + this.defense = 0; + this.lifeMax = 1; + this.HitSound = SoundID.NPCHit3; + this.DeathSound = SoundID.NPCDeath3; + this.noGravity = true; + this.noTileCollide = true; + this.alpha = 100; + this.knockBackResist = 0.0f; + } + else if (this.type == 111) + { + this.scale = 0.95f; + this.width = 18; + this.height = 38; + this.aiStyle = 3; + this.damage = 20; + this.defense = 6; + this.lifeMax = 80; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.7f; + this.value = 200f; + this.buffImmune[31] = false; + } + else if (this.type == 471) + { + this.width = 18; + this.height = 38; + this.aiStyle = 3; + this.damage = 80; + this.defense = 26; + this.lifeMax = 2000; + this.HitSound = SoundID.NPCHit40; + this.DeathSound = SoundID.NPCDeath42; + this.knockBackResist = 0.15f; + this.value = 5000f; + flag = true; + this.rarity = 1; + } + else if (this.type == 472) + { + this.width = 40; + this.height = 24; + this.aiStyle = 86; + this.damage = 50; + this.defense = 18; + this.lifeMax = 180; + this.HitSound = SoundID.NPCHit52; + this.DeathSound = SoundID.NPCDeath55; + this.knockBackResist = 0.0f; + this.value = 0.0f; + flag = true; + this.npcSlots = 0.1f; + } + else if (this.type == 520) + { + this.width = 34; + this.height = 110; + this.aiStyle = 3; + this.damage = 60; + this.defense = 40; + this.lifeMax = 2000; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath14; + this.knockBackResist = 0.0f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + } + else if (this.type == 521) + { + this.width = 60; + this.height = 60; + this.aiStyle = 86; + this.damage = 90; + this.defense = 30; + this.lifeMax = 2000; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.0f; + flag = true; + } + else if (this.type == 522) + { + this.width = 26; + this.height = 26; + this.aiStyle = 100; + this.damage = 120; + this.defense = 0; + this.lifeMax = 1; + this.HitSound = (LegacySoundStyle) null; + this.DeathSound = (LegacySoundStyle) null; + this.noGravity = true; + this.noTileCollide = true; + this.alpha = 0; + this.knockBackResist = 0.0f; + this.chaseable = false; + } + else if (this.type == 523) + { + this.width = 42; + this.height = 42; + this.aiStyle = 101; + this.damage = 30; + this.defense = 0; + this.lifeMax = 500; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.noGravity = true; + this.noTileCollide = true; + this.alpha = 0; + this.knockBackResist = 0.0f; + this.chaseable = false; + this.alpha = (int) byte.MaxValue; + this.canGhostHeal = false; + } + else if (this.type == 534) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 14; + this.defense = 20; + this.lifeMax = 400; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.3f; + this.value = 0.0f; + this.buffImmune[31] = false; + this.lavaImmune = true; + this.netAlways = true; + this.rarity = 1; + } + else if (this.type == 535) + { + this.width = 24; + this.height = 18; + this.aiStyle = 1; + this.damage = 14; + this.defense = 5; + this.lifeMax = 50; + this.scale = 1.1f; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.alpha = 0; + this.value = 40f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 536) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 14; + this.defense = 8; + this.lifeMax = 200; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 1000f; + this.buffImmune[31] = false; + this.rarity = 2; + } + else if (this.type == 537) + { + this.npcSlots = 2f; + this.width = 30; + this.height = 24; + this.aiStyle = 1; + this.damage = 15; + this.defense = 5; + this.lifeMax = 50; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.alpha = 50; + this.color = new Color((int) byte.MaxValue, 250, 0, 0) * 0.2f; + this.value = 75f; + this.knockBackResist = 0.7f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 538) + { + this.width = 18; + this.height = 20; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 3563; + } + else if (this.type == 539) + { + this.width = 18; + this.height = 20; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 3564; + this.rarity = 3; + } + else if (this.type == 541) + { + this.width = 30; + this.height = 76; + this.aiStyle = 102; + this.damage = 40; + this.defense = 30; + this.lifeMax = 5000; + this.HitSound = SoundID.NPCHit23; + this.DeathSound = SoundID.NPCDeath39; + this.knockBackResist = 0.05f; + this.value = (float) Item.buyPrice(gold: 1, silver: 50); + this.buffImmune[20] = true; + this.buffImmune[44] = true; + this.rarity = 2; + } + else if (this.type == 542) + { + this.noGravity = true; + this.width = 100; + this.height = 24; + this.aiStyle = 103; + this.damage = 50; + this.defense = 20; + this.lifeMax = 360; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 400f; + this.knockBackResist = 0.9f; + this.behindTiles = true; + } + else if (this.type == 543) + { + this.noGravity = true; + this.width = 100; + this.height = 24; + this.aiStyle = 103; + this.damage = 60; + this.defense = 24; + this.lifeMax = 380; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 400f; + this.knockBackResist = 0.8f; + this.behindTiles = true; + } + else if (this.type == 544) + { + this.noGravity = true; + this.width = 100; + this.height = 24; + this.aiStyle = 103; + this.damage = 64; + this.defense = 22; + this.lifeMax = 400; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 400f; + this.knockBackResist = 0.8f; + this.behindTiles = true; + } + else if (this.type == 545) + { + this.noGravity = true; + this.width = 100; + this.height = 24; + this.aiStyle = 103; + this.damage = 54; + this.defense = 26; + this.lifeMax = 450; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 400f; + this.knockBackResist = 0.7f; + this.behindTiles = true; + } + else if (this.type == 546) + { + this.width = 30; + this.height = 30; + this.aiStyle = 26; + this.damage = 30; + this.defense = 6; + this.lifeMax = 50; + this.HitSound = SoundID.NPCHit11; + this.DeathSound = SoundID.NPCDeath15; + this.knockBackResist = 0.8f; + this.value = 100f; + } + else if (this.type == 547) + { + this.width = 16; + this.height = 16; + this.aiStyle = 104; + this.defense = 10; + this.lifeMax = 10; + this.HitSound = SoundID.NPCHit11; + this.DeathSound = SoundID.NPCDeath15; + this.knockBackResist = 1f; + this.noGravity = true; + this.noTileCollide = true; + } + else if (this.type == 548) + { + this.width = 40; + this.height = 40; + this.aiStyle = 105; + this.defense = 14; + this.lifeMax = 1000; + this.HitSound = SoundID.DD2_CrystalCartImpact; + this.DeathSound = SoundID.NPCDeath15; + this.knockBackResist = 0.0f; + this.friendly = true; + this.npcSlots = 0.0f; + this.hide = true; + if (Main.hardMode && NPC.downedMechBossAny) + { + this.defense = 18; + this.lifeMax = 3000; + } + if (NPC.downedGolemBoss && Main.hardMode) + { + this.defense = 20; + this.lifeMax = 5000; + } + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 549) + { + this.lifeMax = 5; + this.defense = 20; + this.damage = 0; + this.width = 78; + this.height = 130; + this.aiStyle = 106; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.value = 0.0f; + this.knockBackResist = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + flag = true; + this.npcSlots = 0.0f; + this.behindTiles = true; + this.dontTakeDamage = true; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 552) + { + this.lifeMax = 30; + this.defense = 14; + this.damage = 18; + this.width = 18; + this.height = 40; + this.aiStyle = 107; + this.HitSound = SoundID.DD2_GoblinHurt; + this.DeathSound = SoundID.DD2_GoblinDeath; + this.knockBackResist = 0.2f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 553) + { + this.lifeMax = 170; + this.defense = 20; + this.damage = 46; + this.width = 18; + this.height = 40; + this.aiStyle = 107; + this.HitSound = SoundID.DD2_GoblinHurt; + this.DeathSound = SoundID.DD2_GoblinDeath; + this.knockBackResist = 0.2f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 554) + { + this.lifeMax = 560; + this.defense = 28; + this.damage = 70; + this.width = 18; + this.height = 40; + this.aiStyle = 107; + this.HitSound = SoundID.DD2_GoblinHurt; + this.DeathSound = SoundID.DD2_GoblinDeath; + this.knockBackResist = 0.15f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 561) + { + this.lifeMax = 60; + this.defense = 18; + this.damage = 30; + this.width = 26; + this.height = 52; + this.aiStyle = 107; + this.HitSound = SoundID.DD2_JavelinThrowersHurt; + this.DeathSound = SoundID.DD2_JavelinThrowersDeath; + this.knockBackResist = 0.1f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 562) + { + this.lifeMax = 300; + this.defense = 28; + this.damage = 60; + this.width = 26; + this.height = 52; + this.aiStyle = 107; + this.HitSound = SoundID.DD2_JavelinThrowersHurt; + this.DeathSound = SoundID.DD2_JavelinThrowersDeath; + this.knockBackResist = 0.1f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 563) + { + this.lifeMax = 1000; + this.defense = 38; + this.damage = 80; + this.width = 26; + this.height = 52; + this.aiStyle = 107; + this.HitSound = SoundID.DD2_JavelinThrowersHurt; + this.DeathSound = SoundID.DD2_JavelinThrowersDeath; + this.knockBackResist = 0.05f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 555) + { + this.lifeMax = 50; + this.defense = 16; + this.damage = 26; + this.width = 18; + this.height = 40; + this.aiStyle = 107; + this.HitSound = SoundID.DD2_GoblinBomberHurt; + this.DeathSound = SoundID.DD2_GoblinBomberDeath; + this.knockBackResist = 0.2f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 556) + { + this.lifeMax = 200; + this.defense = 26; + this.damage = 55; + this.width = 18; + this.height = 40; + this.aiStyle = 107; + this.HitSound = SoundID.DD2_GoblinBomberHurt; + this.DeathSound = SoundID.DD2_GoblinBomberDeath; + this.knockBackResist = 0.2f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 557) + { + this.lifeMax = 700; + this.defense = 34; + this.damage = 75; + this.width = 18; + this.height = 40; + this.aiStyle = 107; + this.HitSound = SoundID.DD2_GoblinBomberHurt; + this.DeathSound = SoundID.DD2_GoblinBomberDeath; + this.knockBackResist = 0.15f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 558) + { + this.width = 38; + this.height = 38; + this.aiStyle = 108; + this.damage = 30; + this.defense = 4; + this.lifeMax = 60; + this.HitSound = SoundID.DD2_WyvernHurt; + this.DeathSound = SoundID.DD2_WyvernDeath; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.2f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 559) + { + this.width = 38; + this.height = 38; + this.aiStyle = 108; + this.damage = 75; + this.defense = 16; + this.lifeMax = 180; + this.HitSound = SoundID.DD2_WyvernHurt; + this.DeathSound = SoundID.DD2_WyvernDeath; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.2f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 560) + { + this.width = 38; + this.height = 38; + this.aiStyle = 108; + this.damage = 100; + this.defense = 30; + this.lifeMax = 600; + this.HitSound = SoundID.DD2_WyvernHurt; + this.DeathSound = SoundID.DD2_WyvernDeath; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.05f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 550) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 576) + { + this.lifeMax = 5000; + this.defense = 34; + this.damage = 70; + this.width = 96; + this.height = 124; + this.aiStyle = 107; + this.HitSound = SoundID.DD2_OgreHurt; + this.DeathSound = SoundID.DD2_OgreDeath; + this.knockBackResist = 0.0f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 577) + { + this.lifeMax = 13000; + this.defense = 40; + this.damage = 90; + this.width = 96; + this.height = 124; + this.aiStyle = 107; + this.HitSound = SoundID.DD2_OgreHurt; + this.DeathSound = SoundID.DD2_OgreDeath; + this.knockBackResist = 0.0f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 568) + { + this.lifeMax = 500; + this.defense = 30; + this.damage = 50; + this.width = 18; + this.height = 40; + this.aiStyle = 107; + this.HitSound = SoundID.DD2_WitherBeastHurt; + this.DeathSound = SoundID.DD2_WitherBeastDeath; + this.knockBackResist = 0.15f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 569) + { + this.lifeMax = 1400; + this.defense = 40; + this.damage = 80; + this.width = 18; + this.height = 40; + this.aiStyle = 107; + this.HitSound = SoundID.DD2_WitherBeastHurt; + this.DeathSound = SoundID.DD2_WitherBeastDeath; + this.knockBackResist = 0.05f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 566) + { + this.lifeMax = 25; + this.defense = 12; + this.damage = 18; + this.width = 18; + this.height = 40; + this.aiStyle = 107; + this.HitSound = SoundID.DD2_SkeletonHurt; + this.DeathSound = SoundID.DD2_SkeletonDeath; + this.knockBackResist = 0.3f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 567) + { + this.lifeMax = 480; + this.defense = 22; + this.damage = 70; + this.width = 18; + this.height = 40; + this.aiStyle = 107; + this.HitSound = SoundID.DD2_SkeletonHurt; + this.DeathSound = SoundID.DD2_SkeletonDeath; + this.knockBackResist = 0.2f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 572) + { + this.lifeMax = 260; + this.defense = 26; + this.damage = 60; + this.width = 18; + this.height = 40; + this.aiStyle = 107; + this.HitSound = SoundID.DD2_KoboldHurt; + this.DeathSound = SoundID.DD2_KoboldDeath; + this.knockBackResist = 0.2f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 573) + { + this.lifeMax = 800; + this.defense = 32; + this.damage = 80; + this.width = 18; + this.height = 40; + this.aiStyle = 107; + this.HitSound = SoundID.DD2_KoboldHurt; + this.DeathSound = SoundID.DD2_KoboldDeath; + this.knockBackResist = 0.1f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 570) + { + this.lifeMax = 900; + this.defense = 30; + this.damage = 60; + this.width = 42; + this.height = 58; + this.aiStyle = 107; + this.HitSound = SoundID.DD2_DrakinHurt; + this.DeathSound = SoundID.DD2_DrakinDeath; + this.knockBackResist = 0.0f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 571) + { + this.lifeMax = 3000; + this.defense = 40; + this.damage = 90; + this.width = 42; + this.height = 58; + this.aiStyle = 107; + this.HitSound = SoundID.DD2_DrakinHurt; + this.DeathSound = SoundID.DD2_DrakinDeath; + this.knockBackResist = 0.0f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 564) + { + this.lifeMax = 800; + this.defense = 18; + this.damage = 40; + this.width = 34; + this.height = 62; + this.aiStyle = 109; + this.HitSound = SoundID.DD2_DarkMageHurt; + this.DeathSound = SoundID.DD2_DarkMageDeath; + this.knockBackResist = 0.0f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.noGravity = true; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 565) + { + this.lifeMax = 4000; + this.defense = 38; + this.damage = 90; + this.width = 34; + this.height = 62; + this.aiStyle = 109; + this.HitSound = SoundID.DD2_DarkMageHurt; + this.DeathSound = SoundID.DD2_DarkMageDeath; + this.knockBackResist = 0.0f; + this.value = 0.0f; + this.npcSlots = 0.0f; + this.noGravity = true; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 574) + { + this.width = 38; + this.height = 38; + this.aiStyle = 108; + this.damage = 50; + this.defense = 16; + this.lifeMax = 170; + this.HitSound = SoundID.DD2_KoboldFlyerHurt; + this.DeathSound = SoundID.DD2_KoboldFlyerDeath; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.4f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 575) + { + this.width = 38; + this.height = 38; + this.aiStyle = 108; + this.damage = 80; + this.defense = 32; + this.lifeMax = 580; + this.HitSound = SoundID.DD2_KoboldFlyerHurt; + this.DeathSound = SoundID.DD2_KoboldFlyerDeath; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.25f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 551) + { + this.damage = 80; + this.defense = 38; + this.lifeMax = 50000; + this.width = 190; + this.height = 90; + this.aiStyle = 110; + this.HitSound = SoundID.DD2_BetsyHurt; + this.DeathSound = SoundID.DD2_BetsyDeath; + this.knockBackResist = 0.0f; + this.value = 0.0f; + this.noGravity = true; + this.noTileCollide = true; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 578) + { + this.width = 30; + this.height = 24; + this.aiStyle = 111; + this.damage = 80; + this.defense = 36; + this.lifeMax = 500; + this.HitSound = SoundID.DD2_LightningBugHurt; + this.DeathSound = SoundID.DD2_LightningBugDeath; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.8f; + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + } + else if (this.type == 579) + { + this.friendly = true; + this.width = 34; + this.height = 8; + this.aiStyle = 0; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.5f; + this.scale = 1f; + this.rarity = 1; + } + else if (this.type == 582) + { + this.width = 18; + this.height = 18; + this.aiStyle = 3; + this.damage = 12; + this.defense = 4; + this.lifeMax = 45; + this.HitSound = SoundID.NPCHit31; + this.DeathSound = SoundID.NPCDeath34; + this.knockBackResist = 0.75f; + this.value = 40f; + this.buffImmune[31] = false; + this.npcSlots = 0.4f; + } + else if (this.type == 583 || this.type == 584 || this.type == 585) + { + this.width = 18; + this.height = 20; + this.aiStyle = 112; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + switch (this.type) + { + case 583: + this.catchItem = (short) 4068; + break; + case 584: + this.catchItem = (short) 4069; + break; + case 585: + this.catchItem = (short) 4070; + break; + } + this.noGravity = true; + this.rarity = 2; + for (int index = 0; index < 323; ++index) + this.buffImmune[index] = true; + } + else if (this.type == 586) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 40; + this.defense = 20; + this.lifeMax = 400; + this.HitSound = SoundID.NPCHit18; + this.DeathSound = SoundID.NPCDeath21; + this.knockBackResist = 0.0f; + this.value = 1000f; + this.buffImmune[31] = false; + this.alpha = (int) byte.MaxValue; + this.rarity = 1; + } + else if (this.type == 587) + { + this.width = 32; + this.height = 18; + this.aiStyle = 44; + this.damage = 35; + this.defense = 18; + this.lifeMax = 300; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.0f; + this.DeathSound = SoundID.NPCDeath1; + this.value = 1000f; + this.buffImmune[31] = false; + this.alpha = (int) byte.MaxValue; + this.rarity = 1; + } + else if (this.type == 588) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 589) + { + this.friendly = true; + this.width = 18; + this.height = 34; + this.aiStyle = 0; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + this.rarity = 1; + } + else if (this.type == 590 || this.type == 591) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 14; + this.defense = 6; + this.lifeMax = 45; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 60f; + this.buffImmune[31] = false; + } + else if (this.type == 592) + { + this.noGravity = true; + this.width = 20; + this.height = 18; + this.aiStyle = 16; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + this.catchItem = (short) 4274; + this.rarity = 3; + } + else if (this.type == 593) + { + this.width = 18; + this.height = 20; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 4274; + this.rarity = 3; + } + else if (this.type == 594) + { + this.width = 20; + this.height = 20; + this.aiStyle = 113; + this.damage = 0; + this.defense = 0; + this.knockBackResist = 0.3f; + this.lifeMax = 1; + this.DeathSound = SoundID.NPCDeath63; + this.value = 0.0f; + this.noGravity = true; + } + else if (this.type >= 595 && this.type <= 601) + { + this.timeLeft *= 3; + this.width = 10; + this.height = 10; + this.aiStyle = 114; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.npcSlots = 0.25f; + this.noGravity = true; + if (this.type == 601) + this.rarity = 3; + this.catchItem = (short) (this.type - 595 + 4334); + } + else if (this.type == 602) + { + this.width = 22; + this.height = 26; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 4359; + } + else if (this.type == 603) + { + this.width = 28; + this.height = 22; + this.aiStyle = 68; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 4359; + } + else if (this.type == 604 || this.type == 605) + { + this.width = 10; + this.height = 10; + this.aiStyle = 115; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.npcSlots = 0.25f; + this.noGravity = true; + if (this.type == 605) + this.rarity = 3; + this.catchItem = (short) (this.type - 604 + 4361); + } + else if (this.type == 606) + { + this.width = 10; + this.height = 4; + this.aiStyle = 66; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.npcSlots = 0.1f; + this.catchItem = (short) 4363; + this.friendly = true; + } + else if (this.type == 607) + { + this.noGravity = true; + this.width = 20; + this.height = 18; + this.aiStyle = 16; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + this.catchItem = (short) 4373; + } + else if (this.type == 608) + { + this.width = 22; + this.height = 26; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 4374; + } + else if (this.type == 609) + { + this.width = 28; + this.height = 22; + this.aiStyle = 68; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 4374; + } + else if (this.type == 610) + { + this.width = 14; + this.height = 12; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath4; + this.npcSlots = 0.25f; + this.catchItem = (short) 4375; + } + else if (this.type == 611) + { + this.width = 18; + this.height = 34; + this.aiStyle = 24; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.8f; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) 4395; + this.npcSlots = 0.4f; + } + else if (this.type == 612 || this.type == 613) + { + this.width = 10; + this.height = 10; + this.aiStyle = 116; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.npcSlots = 0.25f; + if (this.type == 613) + this.rarity = 3; + this.catchItem = (short) (this.type - 612 + 4418); + this.waterMovementSpeed = 1f; + this.lavaMovementSpeed = 1f; + this.honeyMovementSpeed = 1f; + } + else if (this.type == 614) + { + this.width = 18; + this.height = 20; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = (LegacySoundStyle) null; + this.catchItem = (short) 1338; + } + else if (this.type == 615) + { + this.noGravity = true; + this.width = 20; + this.height = 18; + this.aiStyle = 16; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 616 || this.type == 617) + { + this.width = 22; + this.height = 20; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + this.catchItem = (short) (this.type - 616 + 4464); + } + else if (this.type == 618) + { + this.noGravity = true; + this.width = 100; + this.height = 100; + this.aiStyle = 117; + this.damage = 55; + this.defense = 24; + this.lifeMax = 7000; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.0f; + this.value = (float) Item.buyPrice(gold: 2); + this.noTileCollide = true; + this.rarity = 1; + } + else if (this.type == 619) + { + this.npcSlots = 1f; + this.width = 44; + this.height = 44; + this.aiStyle = 5; + this.damage = 60; + this.defense = 16; + this.lifeMax = 1000; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.knockBackResist = 0.0f; + this.value = 500f; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 620) + { + this.lifeMax = 5000; + this.defense = 30; + this.damage = 70; + this.width = 34; + this.height = 58; + this.aiStyle = 107; + this.HitSound = SoundID.DD2_DrakinHurt; + this.DeathSound = SoundID.DD2_DrakinDeath; + this.knockBackResist = 0.0f; + this.value = (float) Item.buyPrice(silver: 75); + this.npcSlots = 0.0f; + this.lavaImmune = true; + this.LazySetLiquidMovementDD2(); + this.netAlways = true; + this.alpha = (int) byte.MaxValue; + this.rarity = 1; + } + else if (this.type == 621) + { + this.npcSlots = 5f; + this.width = 28; + this.height = 28; + this.aiStyle = 6; + this.damage = 90; + this.defense = 0; + this.lifeMax = 6000; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.value = (float) Item.buyPrice(silver: 75); + this.alpha = (int) byte.MaxValue; + this.rarity = 1; + } + else if (this.type == 622) + { + this.width = 28; + this.height = 28; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 60; + this.defense = 30; + this.lifeMax = 6000; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.dontCountMe = true; + this.npcSlots = 0.0f; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 623) + { + this.width = 28; + this.height = 28; + this.aiStyle = 6; + this.netAlways = true; + this.damage = 50; + this.defense = 40; + this.lifeMax = 6000; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.noGravity = true; + this.noTileCollide = true; + this.knockBackResist = 0.0f; + this.behindTiles = true; + this.dontCountMe = true; + this.npcSlots = 0.0f; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 624) + { + this.width = 14; + this.height = 30; + this.aiStyle = 3; + this.damage = 10; + this.defense = 0; + this.lifeMax = 25; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 1f; + this.rarity = 1; + } + else if (this.type == 625) + { + this.width = 22; + this.height = 20; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 626 || this.type == 627) + { + this.width = 16; + this.height = 20; + this.aiStyle = 118; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 1f; + if (this.type == 627) + this.rarity = 3; + this.catchItem = (short) 4480; + if (this.type == 627) + this.catchItem = (short) 4482; + } + else if (this.type == 628) + { + this.width = 22; + this.height = 40; + this.aiStyle = 119; + this.damage = 15; + this.defense = 0; + this.lifeMax = 50; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.0f; + this.value = 50f; + } + else if (this.type == 629) + { + this.width = 24; + this.height = 24; + this.aiStyle = 25; + this.damage = 80; + this.defense = 30; + this.lifeMax = 500; + this.HitSound = SoundID.NPCHit4; + this.DeathSound = SoundID.NPCDeath6; + this.value = 100000f; + this.knockBackResist = 0.3f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + this.buffImmune[39] = true; + this.rarity = 4; + } + else if (this.type == 630) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 60; + this.defense = 18; + this.lifeMax = 180; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.5f; + this.value = 700f; + this.buffImmune[31] = false; + } + else if (this.type == 631) + { + this.width = 36; + this.height = 48; + this.scale = 1.1f; + this.aiStyle = 3; + this.damage = 85; + this.defense = 35; + this.lifeMax = 1000; + this.HitSound = SoundID.NPCHit41; + this.DeathSound = SoundID.NPCDeath43; + this.knockBackResist = 0.1f; + this.value = 50000f; + this.buffImmune[20] = true; + this.buffImmune[24] = true; + } + else if (this.type == 632) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 14; + this.defense = 6; + this.lifeMax = 45; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 60f; + this.buffImmune[31] = false; + } + else if (this.type == 633) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 40; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.5f; + } + else if (this.type == 634) + { + this.npcSlots = 0.5f; + this.width = 22; + this.height = 18; + this.aiStyle = 14; + this.damage = 13; + this.defense = 2; + this.lifeMax = 16; + this.HitSound = SoundID.NPCHit1; + this.knockBackResist = 0.8f; + this.DeathSound = SoundID.NPCDeath4; + this.value = 90f; + this.buffImmune[31] = false; + } + else if (this.type == 635) + { + this.width = 18; + this.height = 40; + this.aiStyle = 3; + this.damage = 20; + this.defense = 8; + this.lifeMax = 60; + this.HitSound = SoundID.NPCHit2; + this.DeathSound = SoundID.NPCDeath2; + this.knockBackResist = 0.5f; + this.value = 100f; + this.buffImmune[20] = true; + this.buffImmune[31] = false; + } + else if (this.type == 636) + { + this.noGravity = true; + this.width = 100; + this.height = 100; + this.aiStyle = 120; + this.damage = 80; + this.defense = 50; + this.lifeMax = 70000; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath65; + this.knockBackResist = 0.0f; + this.value = 250000f; + this.noTileCollide = true; + this.boss = true; + this.Opacity = 0.0f; + } + else if (this.type == 637 || this.type == 638) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 28; + if (this.type == 637) + this.height = 20; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.5f; + this.housingCategory = 1; + } + else if (this.type >= 639 && this.type <= 645) + { + this.width = 18; + this.height = 20; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) (4831 + (this.type - 639)); + } + else if (this.type >= 646 && this.type <= 652) + { + this.width = 18; + this.height = 20; + this.aiStyle = 7; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.catchItem = (short) (4838 + (this.type - 646)); + } + else if (this.type == 653) + { + this.width = 10; + this.height = 10; + this.aiStyle = 65; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.npcSlots = 0.25f; + this.noGravity = true; + this.lavaImmune = true; + this.catchItem = (short) 4845; + } + else if (this.type == 654) + { + this.width = 10; + this.height = 10; + this.aiStyle = 64; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.npcSlots = 0.2f; + this.noGravity = true; + this.lavaImmune = true; + this.catchItem = (short) 4847; + } + else if (this.type == 655) + { + this.width = 14; + this.height = 14; + this.aiStyle = 67; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.npcSlots = 0.5f; + this.noGravity = true; + this.lavaImmune = true; + this.catchItem = (short) 4849; + } + else if (this.type == 656) + { + this.townNPC = true; + this.friendly = true; + this.width = 18; + this.height = 20; + this.aiStyle = 7; + this.damage = 10; + this.defense = 15; + this.lifeMax = 250; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.5f; + this.housingCategory = 1; + } + else if (this.type == 657) + { + this.width = 114; + this.height = 100; + this.aiStyle = 121; + this.damage = 60; + this.defense = 26; + this.lifeMax = 18000; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath64; + this.lavaImmune = true; + this.knockBackResist = 0.0f; + this.value = 60000f; + this.buffImmune[20] = true; + this.buffImmune[31] = true; + this.boss = true; + } + else if (this.type == 658 || this.type == 659) + { + this.width = 24; + this.height = 18; + this.aiStyle = 1; + this.damage = 40; + this.defense = 35; + this.lifeMax = 150; + this.scale = 1f; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.buffImmune[20] = true; + } + else if (this.type == 660) + { + this.width = 40; + this.height = 30; + this.aiStyle = 14; + this.damage = 50; + this.defense = 30; + this.lifeMax = 120; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.knockBackResist = 0.8f; + this.scale = 1f; + this.buffImmune[20] = true; + } + else if (this.type == 661) + { + this.width = 10; + this.height = 10; + this.aiStyle = 65; + this.damage = 0; + this.defense = 0; + this.lifeMax = 5; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath1; + this.npcSlots = 0.25f; + this.noGravity = true; + this.lavaImmune = true; + this.catchItem = (short) 4961; + this.rarity = 4; + } + else if (this.type == 662) + { + this.width = 18; + this.height = 40; + this.aiStyle = 122; + this.damage = 75; + this.defense = 22; + this.lifeMax = 500; + this.HitSound = SoundID.NPCHit1; + this.DeathSound = SoundID.NPCDeath6; + this.knockBackResist = 0.2f; + this.value = 0.0f; + flag = true; + this.noTileCollide = true; + this.lavaImmune = true; + this.trapImmune = true; + this.noGravity = true; + } + if (flag) + { + for (int index = 0; index < 323; ++index) + this.buffImmune[index] = true; + } + if (Main.dedServ) + this.frame = new Microsoft.Xna.Framework.Rectangle(); + else if (TextureAssets.Npc[this.type] != null && TextureAssets.Npc[this.type].IsLoaded) + this.frame = new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Npc[this.type].Width(), TextureAssets.Npc[this.type].Height() / Main.npcFrameCount[this.type]); + else + this.setFrameSize = true; + if (spawnparams.sizeScaleOverride.HasValue) + { + int num1 = (int) ((double) this.width * (double) this.scale); + int num2 = (int) ((double) this.height * (double) this.scale); + this.position.X += (float) (num1 / 2); + this.position.Y += (float) num2; + this.scale = spawnparams.sizeScaleOverride.Value; + this.width = (int) ((double) this.width * (double) this.scale); + this.height = (int) ((double) this.height * (double) this.scale); + if (this.height == 16 || this.height == 32) + ++this.height; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) this.height; + } + else + { + this.width = (int) ((double) this.width * (double) this.scale); + this.height = (int) ((double) this.height * (double) this.scale); + } + if (this.buffImmune[20]) + this.buffImmune[70] = true; + if (this.buffImmune[39]) + this.buffImmune[153] = true; + this.life = this.lifeMax; + this.defDamage = this.damage; + this.defDefense = this.defense; + this.netID = this.type; + if (Main.getGoodWorld) + this.getGoodAdjustments(); + this.ScaleStats(spawnparams.playerCountForMultiplayerDifficultyOverride, spawnparams.gameModeData, spawnparams.strengthMultiplierOverride); + this.life = this.lifeMax; + } + } + + private void getGoodAdjustments() + { + if (this.type == 13) + { + this.scale *= 1.4f; + this.defense += 2; + } + else if (this.type == 14) + { + this.scale *= 1.4f; + this.defense += 2; + } + else if (this.type == 15) + { + this.scale *= 1.4f; + this.defense += 2; + } + else if (this.type == 35) + this.scale *= 1.25f; + else if (this.type == 36) + this.scale *= 1.15f; + else if (this.type == 113) + { + this.scale *= 0.65f; + this.lifeMax = (int) ((double) this.lifeMax * 1.5); + this.defense += 3; + } + else if (this.type == 114) + { + this.scale *= 0.65f; + this.lifeMax = (int) ((double) this.lifeMax * 1.5); + this.defense += 3; + } + else if (this.type == 115) + this.scale *= 1.4f; + else if (this.type == 116) + this.scale *= 1.4f; + else if (this.type == 125) + this.scale *= 0.8f; + else if (this.type == 126) + this.scale *= 0.8f; + else if (this.type == (int) sbyte.MaxValue) + this.scale *= 1.1f; + else if (this.type == 128) + this.scale *= 1.1f; + else if (this.type == 129) + this.scale *= 1.1f; + else if (this.type == 130) + this.scale *= 1.1f; + else if (this.type == 131) + this.scale *= 1.1f; + else if (this.type == 134) + this.scale *= 1.3f; + else if (this.type == 135) + this.scale *= 1.3f; + else if (this.type == 136) + this.scale *= 1.3f; + else if (this.type == 139) + this.scale *= 1.3f; + else if (this.type == 222) + this.scale *= 1.2f; + else if (this.type == 245) + this.scale *= 0.5f; + else if (this.type == 246) + this.scale *= 0.5f; + else if (this.type == 247 || this.type == 248) + this.scale *= 0.5f; + else if (this.type == 249) + this.scale *= 0.5f; + else if (this.type == 262) + { + this.scale *= 1.3f; + } + else + { + if (this.type != 266) + return; + this.defense = (int) ((double) this.defense * 1.5); + this.damage = (int) ((double) this.damage * 1.2); + this.scale *= 1.1f; + } + } + + private void LazySetLiquidMovementDD2() + { + this.waterMovementSpeed = 1f; + this.lavaMovementSpeed = 1f; + this.honeyMovementSpeed = 1f; + } + + public static void SetWorldSpecificMonstersByWorldID() + { + UnifiedRandom unifiedRandom = new UnifiedRandom(Main.worldID); + int num1 = unifiedRandom.Next(3); + int num2 = unifiedRandom.Next(3); + while (num1 == num2) + num1 = unifiedRandom.Next(3); + for (int index1 = 0; index1 < 2; ++index1) + { + int num3 = num1; + if (index1 == 1) + num3 = num2; + for (int index2 = 0; index2 < 3; ++index2) + { + switch (num3) + { + case 0: + NPC.cavernMonsterType[index1, index2] = unifiedRandom.Next(494, 496); + break; + case 1: + NPC.cavernMonsterType[index1, index2] = unifiedRandom.Next(496, 498); + break; + default: + NPC.cavernMonsterType[index1, index2] = unifiedRandom.Next(498, 507); + break; + } + } + } + } + + public NPCSpawnParams GetMatchingSpawnParams() => new NPCSpawnParams() + { + sizeScaleOverride = new float?(-1f), + playerCountForMultiplayerDifficultyOverride = new int?(this.statsAreScaledForThisManyPlayers), + strengthMultiplierOverride = new float?(this.strengthMultiplier) + }; + + public void ScaleStats( + int? activePlayersCount, + GameModeData gameModeData, + float? strengthOverride) + { + if ((!NPCID.Sets.NeedsExpertScaling.IndexInRange(this.type) || !NPCID.Sets.NeedsExpertScaling[this.type]) && (this.lifeMax <= 5 || this.damage == 0 || this.friendly || this.townNPC)) + return; + float strength = 1f; + if (strengthOverride.HasValue) + strength = strengthOverride.Value; + else if (gameModeData.IsJourneyMode) + { + CreativePowers.DifficultySliderPower power = CreativePowerManager.Instance.GetPower(); + if (power != null && power.GetIsUnlocked()) + strength = power.StrengthMultiplierToGiveNPCs; + } + NPCStrengthHelper npcStrengthHelper = new NPCStrengthHelper(gameModeData, strength); + if (npcStrengthHelper.IsExpertMode) + this.ScaleStats_ApplyExpertTweaks(); + this.ScaleStats_ApplyGameMode(gameModeData); + if (npcStrengthHelper.IsExpertMode) + { + int numPlayers = !activePlayersCount.HasValue ? NPC.GetActivePlayerCount() : activePlayersCount.Value; + this.statsAreScaledForThisManyPlayers = numPlayers; + float balance; + float boost; + NPC.GetStatScalingFactors(numPlayers, out balance, out boost); + float bossAdjustment = 1f; + if (npcStrengthHelper.IsMasterMode) + bossAdjustment = 0.85f; + this.ScaleStats_ApplyMultiplayerStats(numPlayers, balance, boost, bossAdjustment); + } + this.strengthMultiplier = strength; + this.ScaleStats_UseStrengthMultiplier(this.strengthMultiplier); + if ((this.type < 0 ? 0 : (NPCID.Sets.ProjectileNPC[this.type] ? 1 : 0)) == 0 && this.lifeMax < 6) + this.lifeMax = 6; + this.life = this.lifeMax; + this.defDamage = this.damage; + this.defDefense = this.defense; + } + + public void ScaleStats_UseStrengthMultiplier(float strength) + { + if ((this.type < 0 ? 0 : (NPCID.Sets.ProjectileNPC[this.type] ? 1 : 0)) == 0) + this.lifeMax = (int) ((double) this.lifeMax * (double) strength); + this.damage = (int) ((double) this.damage * (double) strength); + } + + public void ScaleStats_Old(int? activePlayersCount, GameModeData gameModeData) + { + if (!gameModeData.IsExpertMode || (this.type < 0 || !NPCID.Sets.NeedsExpertScaling[this.type]) && (this.life <= 5 || this.damage == 0 || this.friendly || this.townNPC)) + return; + this.ScaleStats_ApplyExpertTweaks(); + this.ScaleStats_ApplyGameMode(gameModeData); + int numPlayers = !activePlayersCount.HasValue ? NPC.GetActivePlayerCount() : activePlayersCount.Value; + this.statsAreScaledForThisManyPlayers = numPlayers; + float balance; + float boost; + NPC.GetStatScalingFactors(numPlayers, out balance, out boost); + float bossAdjustment = 1f; + if (gameModeData.IsMasterMode) + bossAdjustment = 0.85f; + this.ScaleStats_ApplyMultiplayerStats(numPlayers, balance, boost, bossAdjustment); + } + + public static float GetBalance() + { + float balance; + NPC.GetStatScalingFactors(NPC.GetActivePlayerCount(), out balance, out float _); + return balance; + } + + private float GetMyBalance() + { + if (this.statsAreScaledForThisManyPlayers <= 1) + return 1f; + float balance; + NPC.GetStatScalingFactors(this.statsAreScaledForThisManyPlayers, out balance, out float _); + return balance; + } + + private static int GetActivePlayerCount() + { + if (Main.netMode == 0) + return 1; + int num = 0; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index] != null && Main.player[index].active) + ++num; + } + return num; + } + + private void ScaleStats_ApplyExpertTweaks() + { + bool flag = this.type >= 0 && NPCID.Sets.ProjectileNPC[this.type]; + if (!NPCID.Sets.DontDoHardmodeScaling[this.type] && Main.hardMode && !this.boss && this.lifeMax < 1000) + { + int num1 = this.damage + this.defense + this.lifeMax / 4; + if (num1 == 0) + num1 = 1; + int num2 = 80; + if (NPC.downedPlantBoss) + num2 += 20; + if (num1 < num2) + { + float num3 = (float) (num2 / num1); + this.damage = (int) ((double) this.damage * (double) num3 * 0.9); + if (!flag) + { + this.defense = (int) ((double) this.defense * (double) num3); + this.lifeMax = (int) ((double) this.lifeMax * (double) num3 * 1.1); + this.value = (float) (int) ((double) this.value * (double) num3 * 0.8); + } + } + } + if (this.type != 210 && this.type != 211) + return; + this.damage = (int) ((double) this.damage * 0.600000023841858); + this.lifeMax = (int) ((double) this.lifeMax * 0.800000011920929); + this.defense = (int) ((double) this.defense * 0.800000011920929); + } + + private void ScaleStats_ApplyGameMode(GameModeData gameModeData) + { + int num1 = this.type < 0 ? 0 : (NPCID.Sets.ProjectileNPC[this.type] ? 1 : 0); + int num2 = 0; + if (Main.getGoodWorld) + ++num2; + if (num1 == 0) + { + this.value = (float) (int) ((double) this.value * ((double) gameModeData.EnemyMoneyDropMultiplier + (double) num2)); + this.lifeMax = (int) ((double) this.lifeMax * ((double) gameModeData.EnemyMaxLifeMultiplier + (double) num2)); + } + this.damage = (int) ((double) this.damage * ((double) gameModeData.EnemyDamageMultiplier + (double) num2)); + this.knockBackResist *= gameModeData.KnockbackToEnemiesMultiplier; + if (!Main.getGoodWorld) + return; + this.damage += this.damage / 3; + } + + private void ScaleStats_ApplyMultiplayerStats( + int numPlayers, + float balance, + float boost, + float bossAdjustment) + { + if (this.type == 5) + this.lifeMax = (int) ((double) this.lifeMax * 0.75 * (double) bossAdjustment); + if (this.type == 4) + this.lifeMax = (int) ((double) this.lifeMax * 0.65 * (double) balance * (double) bossAdjustment); + if (this.type >= 13 && this.type <= 15) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.7 * (double) balance * (double) bossAdjustment); + if (this.type == 13) + this.damage = (int) ((double) this.damage * 1.1); + if (this.type == 14) + this.damage = (int) ((double) this.damage * 0.8); + if (this.type == 15) + this.damage = (int) ((double) this.damage * 0.8); + this.scale *= 1.2f; + this.defense += 2; + } + if (this.type == 266 || this.type == 267) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.85 * (double) balance * (double) bossAdjustment); + this.damage = (int) ((double) this.damage * 0.9); + this.scale *= 1.05f; + for (float num = 1f; (double) num < (double) balance; num += 0.34f) + { + if ((double) this.knockBackResist < 0.1) + { + this.knockBackResist = 0.0f; + break; + } + this.knockBackResist *= 0.8f; + } + } + if (this.type == 50) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.7 * (double) balance * (double) bossAdjustment); + this.damage = (int) ((double) this.damage * 0.8); + } + if (this.type == 471) + this.lifeMax = (int) ((double) this.lifeMax * 0.85 * ((double) balance * 2.0 + 1.0) / 3.0); + if (this.type == 472) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.85 * ((double) balance + 1.0) / 2.0); + this.damage = (int) ((double) this.damage * 0.8); + } + if (this.type == 222) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.7 * (double) balance * (double) bossAdjustment); + this.damage = (int) ((double) this.damage * 0.9); + } + if (this.type == 210 || this.type == 211) + this.lifeMax = (int) ((double) this.lifeMax * 0.75); + if (this.type == 35) + { + this.lifeMax = (int) ((double) this.lifeMax * (double) balance * (double) bossAdjustment); + this.damage = (int) ((double) this.damage * 1.1); + } + else if (this.type == 36) + { + this.lifeMax = (int) ((double) this.lifeMax * 1.3 * (double) balance * (double) bossAdjustment); + this.damage = (int) ((double) this.damage * 1.1); + } + if (this.type == 113 || this.type == 114) + { + this.defense += 6; + this.lifeMax = (int) ((double) this.lifeMax * 0.7 * (double) balance * (double) bossAdjustment); + this.damage = (int) ((double) this.damage * 1.5); + } + else if (this.type == 115) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.7 * (double) balance); + if (numPlayers > 4) + this.knockBackResist = 0.0f; + else if (numPlayers > 1) + this.knockBackResist *= 1f - boost; + this.defense += 6; + } + else if (this.type == 116) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.7 * (double) balance); + if (numPlayers > 4) + this.knockBackResist = 0.0f; + else if (numPlayers > 1) + this.knockBackResist *= 1f - boost; + } + else if (this.type == 117 || this.type == 118 || this.type == 119) + this.lifeMax = (int) ((double) this.lifeMax * 0.8); + if (this.type == 657) + this.lifeMax = (int) ((double) this.lifeMax * 0.800000011920929 * (double) balance * (double) bossAdjustment); + if (this.type >= 658 && this.type <= 660) + this.lifeMax = (int) ((double) this.lifeMax * 0.75 * (double) balance * (double) bossAdjustment); + if (this.type >= 134 && this.type <= 136) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.75 * (double) balance * (double) bossAdjustment); + if (this.type == 134) + this.damage *= 2; + if (this.type == 135) + this.damage = (int) ((double) this.damage * 0.85); + if (this.type == 136) + this.damage = (int) ((double) this.damage * 0.85); + this.scale *= 1.05f; + } + else if (this.type == 139) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.75 * ((double) balance * 2.0 + 1.0) / 3.0); + this.damage = (int) ((double) this.damage * 0.8); + this.scale *= 1.05f; + } + if (this.type >= (int) sbyte.MaxValue && this.type <= 131) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.75 * (double) balance * (double) bossAdjustment); + this.damage = (int) ((double) this.damage * 0.85); + } + if (this.type >= 125 && this.type <= 126) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.75 * (double) balance * (double) bossAdjustment); + this.damage = (int) ((double) this.damage * 0.85); + } + if (this.type == 262) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.7 * (double) balance * (double) bossAdjustment); + this.damage = (int) ((double) this.damage * 1.15); + } + else if (this.type == 264) + { + this.lifeMax = (int) ((double) this.lifeMax * (double) balance * (double) bossAdjustment); + this.damage = (int) ((double) this.damage * 1.15); + } + if (this.type == 636) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.7 * (double) balance * (double) bossAdjustment); + this.damage = (int) ((double) this.damage * 1.15); + } + if (this.type >= 245 && this.type <= 249) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.75 * (double) balance * (double) bossAdjustment); + this.damage = (int) ((double) this.damage * 0.8); + } + if (this.type == 370) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.6 * (double) balance * (double) bossAdjustment); + this.damage = (int) ((double) this.damage * 0.7); + } + else if (this.type == 371 || this.type == 372 || this.type == 373) + { + if (this.type != 371) + this.lifeMax = (int) ((double) this.lifeMax * 0.75); + this.damage = (int) ((double) this.damage * 0.75); + } + if (this.type == 439 || this.type == 440 || this.type >= 454 && this.type <= 459 || this.type == 522 || this.type == 523) + { + if (this.type != 522) + this.lifeMax = (int) ((double) this.lifeMax * 0.625 * (double) balance * (double) bossAdjustment); + this.damage = (int) ((double) this.damage * 0.75); + } + if (this.type == 397 || this.type == 396 || this.type == 398) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.75 * (double) balance * (double) bossAdjustment); + this.damage = (int) ((double) this.damage * 0.75); + } + if (this.type == 551) + { + this.lifeMax = (int) ((double) this.lifeMax * 0.75 * (double) balance * (double) bossAdjustment); + this.damage = (int) ((double) this.damage * 0.65); + } + else if (NPCID.Sets.BelongsToInvasionOldOnesArmy[this.type]) + { + int num = 7; + this.lifeMax = (int) ((double) this.lifeMax * (double) ((float) ((double) balance * (double) (num - 1) + 1.0) / (float) num) * (double) bossAdjustment); + } + switch (this.type) + { + case 305: + case 306: + case 307: + case 308: + case 309: + case 310: + case 311: + case 312: + case 313: + case 314: + case 315: + case 326: + case 329: + case 330: + this.lifeMax = (int) ((double) this.lifeMax * 0.75); + this.damage = (int) ((double) this.damage * 0.75); + break; + case 325: + case 327: + this.lifeMax = (int) ((double) this.lifeMax * 0.65 * (double) bossAdjustment); + this.damage = (int) ((double) this.damage * 0.75); + break; + } + switch (this.type) + { + case 338: + case 339: + case 340: + case 341: + case 342: + case 343: + case 347: + case 348: + case 349: + case 350: + this.lifeMax = (int) ((double) this.lifeMax * 0.75); + this.damage = (int) ((double) this.damage * 0.75); + break; + case 344: + case 345: + case 346: + this.lifeMax = (int) ((double) this.lifeMax * 0.65 * (double) bossAdjustment); + this.damage = (int) ((double) this.damage * 0.75); + break; + } + this.defDefense = this.defense; + this.defDamage = this.damage; + this.life = this.lifeMax; + } + + private static void GetStatScalingFactors(int numPlayers, out float balance, out float boost) + { + balance = 1f; + boost = 0.35f; + for (int index = 1; index < numPlayers; ++index) + { + balance += boost; + boost += (float) ((1.0 - (double) boost) / 3.0); + } + if ((double) balance > 8.0) + balance = (float) (((double) balance * 2.0 + 8.0) / 3.0); + if ((double) balance <= 1000.0) + return; + balance = 1000f; + } + + public static bool GetNPCLocation( + int i, + bool seekHead, + bool averageDirection, + out int index, + out Vector2 pos) + { + int type = Main.npc[i].type; + int index1 = -1; + int num1 = -1; + switch (type) + { + case 7: + num1 = 9; + index1 = 0; + break; + case 8: + case 9: + num1 = 7; + index1 = 1; + break; + case 10: + num1 = 12; + index1 = 0; + break; + case 11: + case 12: + num1 = 10; + index1 = 1; + break; + case 13: + num1 = 15; + index1 = 0; + break; + case 14: + case 15: + num1 = 13; + index1 = 1; + break; + case 39: + num1 = 41; + index1 = 0; + break; + case 40: + case 41: + num1 = 39; + index1 = 1; + break; + case 87: + num1 = 92; + index1 = 0; + break; + case 88: + case 89: + case 90: + case 91: + case 92: + num1 = 87; + index1 = 1; + break; + case 95: + num1 = 97; + index1 = 0; + break; + case 96: + case 97: + num1 = 95; + index1 = 1; + break; + case 98: + num1 = 100; + index1 = 0; + break; + case 99: + case 100: + num1 = 98; + index1 = 1; + break; + case 117: + num1 = 119; + index1 = 0; + break; + case 118: + case 119: + num1 = 117; + index1 = 1; + break; + case 134: + num1 = 136; + index1 = 0; + break; + case 135: + case 136: + num1 = 134; + index1 = 1; + break; + case 454: + num1 = 459; + index1 = 0; + break; + case 455: + case 456: + case 457: + case 458: + case 459: + num1 = 454; + index1 = 1; + break; + case 510: + num1 = 512; + index1 = 0; + break; + case 511: + case 512: + num1 = 510; + index1 = 1; + break; + case 513: + num1 = 515; + index1 = 0; + break; + case 514: + case 515: + num1 = 513; + index1 = 1; + break; + case 621: + num1 = 623; + index1 = 0; + break; + case 622: + case 623: + num1 = 621; + index1 = 1; + break; + } + if (index1 != -1) + { + if (seekHead && index1 == 1) + { + index = -1; + pos = Vector2.Zero; + return false; + } + Vector2 center1 = Main.npc[i].Center; + int index2 = -1; + float num2 = -1f; + int index3 = -1; + Vector2 center2 = Main.player[Main.myPlayer].Center; + int index4 = (int) Main.npc[i].ai[index1]; + for (int index5 = 0; index4 >= 0 && index4 < 200 && ++index5 < 100 && Main.npc[index4].active; index4 = (int) Main.npc[index4].ai[index1]) + { + if (!averageDirection && (index3 == -1 || (double) Main.npc[index4].Distance(center2) < (double) num2)) + { + num2 = Main.npc[index4].Distance(center2); + index3 = index4; + } + if (Main.npc[index4].type == num1) + { + index2 = index4; + break; + } + } + if (index2 >= 0) + { + if (!averageDirection) + { + pos = Main.npc[index3].Center; + index = index3; + } + else + { + Vector2 vector2 = center1 + Main.npc[index2].Center; + pos = vector2 / 2f; + index = index2; + } + return true; + } + pos = Vector2.Zero; + index = -1; + return false; + } + pos = Main.npc[i].Center; + index = i; + return true; + } + + public void AI() + { + // ISSUE: The method is too long to display (123208 instructions) + } + + public void AI_122_PirateGhost() + { + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + SoundEngine.PlaySound(SoundID.NPCHit6, this.position); + } + NPCAimedTarget targetData = this.GetTargetData(); + if (targetData.Invalid) + { + this.TargetClosest(); + targetData = this.GetTargetData(); + } + if (targetData.Invalid) + { + this.velocity = this.velocity * 0.9f; + this.alpha = Utils.Clamp(this.alpha + 5, 0, (int) byte.MaxValue); + if (this.alpha < (int) byte.MaxValue) + return; + this.StrikeNPCNoInteraction(9999, 0.0f, 0); + } + else + { + this.alpha = Utils.Clamp(this.alpha - 5, 0, (int) byte.MaxValue); + this.velocity = this.velocity.MoveTowards(Vector2.Zero.MoveTowards(targetData.Center - this.Center, 4f), 0.1333333f); + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == this.type && index != this.whoAmI) + { + Vector2 vector2 = Main.npc[index].Center - this.Center; + if ((double) vector2.Length() < 50.0) + { + vector2.Normalize(); + vector2 *= 0.1f; + this.velocity = this.velocity - vector2; + this.velocity.X -= vector2.X * 1f; + } + } + } + } + } + + public void AI_000_TransformBoundNPC(int playerID, int npcType) + { + this.Transform(npcType); + Main.BestiaryTracker.Chats.RegisterChatStartWith(this); + Main.player[playerID].SetTalkNPC(this.whoAmI); + if (Main.netMode != 2) + return; + NetMessage.SendData(40, number: playerID); + } + + private void AI_065_Butterflies() + { + float num1 = this.ai[0]; + float num2 = this.ai[1]; + Color color; + if (this.type == 661) + { + color = Main.hslToRgb((float) ((double) Main.GlobalTimeWrappedHourly * 0.330000013113022 % 1.0), 1f, 0.5f); + Lighting.AddLight(this.Center, color.ToVector3() * 0.3f + Vector3.One * 0.1f); + int num3 = 60; + bool flag = false; + int num4 = 50; + NPCAimedTarget targetData = this.GetTargetData(); + if (targetData.Invalid || (double) targetData.Center.Distance(this.Center) >= 300.0) + flag = true; + if (!targetData.Invalid && targetData.Type == NPCTargetType.Player && !Main.player[this.target].ZoneHallow) + { + num4 = num3; + flag = true; + } + this.ai[2] = MathHelper.Clamp(this.ai[2] + (float) flag.ToDirectionInt(), 0.0f, (float) num4); + if ((double) this.ai[2] >= (double) num3) + { + this.active = false; + if (Main.netMode == 1) + return; + NetMessage.SendData(23, number: this.whoAmI); + return; + } + this.Opacity = Utils.GetLerpValue((float) num3, (float) num4 / 2f, this.ai[2], true); + if ((double) this.ai[2] > 0.0) + { + int num5 = 1; + for (int index = 0; index < num5; ++index) + { + if (Main.rand.Next(5) == 0) + { + float num6 = MathHelper.Lerp(0.9f, 0.6f, this.Opacity); + int dustIndex = Dust.NewDust(this.position, this.width, this.height, 267, newColor: (Main.hslToRgb((float) ((double) Main.GlobalTimeWrappedHourly * 0.300000011920929 % 1.0), 1f, 0.5f) * 0.5f)); + Main.dust[dustIndex].position = this.Center + Main.rand.NextVector2Circular((float) this.width, (float) this.height); + Main.dust[dustIndex].velocity *= Main.rand.NextFloat() * 0.8f; + Main.dust[dustIndex].velocity += this.velocity * 0.6f; + Main.dust[dustIndex].noGravity = true; + Main.dust[dustIndex].fadeIn = (float) (0.600000023841858 + (double) Main.rand.NextFloat() * 0.699999988079071 * (double) num6); + Main.dust[dustIndex].scale = 0.35f; + if (dustIndex != 6000) + { + Dust dust = Dust.CloneDust(dustIndex); + dust.scale /= 2f; + dust.fadeIn *= 0.85f; + dust.color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue) * 0.5f; + } + } + } + } + this.dontTakeDamage = (double) this.ai[2] >= (double) (num4 / 2); + } + if (Main.netMode != 1) + { + if ((double) this.ai[2] == 0.0 && this.type != 661) + { + int num7 = 0; + int num8 = 4; + int num9 = 6; + int num10 = 3; + int num11 = 7; + int num12 = 2; + int num13 = 1; + int num14 = 5; + int num15 = Main.rand.Next(100); + this.ai[2] = (float) (1 + (num15 != 0 ? (num15 >= 3 ? (num15 >= 9 ? (num15 >= 19 ? (num15 >= 34 ? (num15 >= 53 ? (num15 >= 75 ? num7 : num8) : num9) : num10) : num11) : num12) : num13) : num14)); + } + if ((double) this.ai[3] == 0.0) + this.ai[3] = (float) Main.rand.Next(75, 111) * 0.01f; + --this.localAI[0]; + if ((double) this.localAI[0] <= 0.0) + { + this.localAI[0] = (float) Main.rand.Next(90, 240); + this.TargetClosest(); + float num16 = Math.Abs(this.Center.X - Main.player[this.target].Center.X); + if ((double) num16 > 700.0 && (double) this.localAI[3] == 0.0) + { + float num17 = (float) Main.rand.Next(50, 151) * 0.01f; + if ((double) num16 > 1000.0) + num17 = (float) Main.rand.Next(150, 201) * 0.01f; + else if ((double) num16 > 850.0) + num17 = (float) Main.rand.Next(100, 151) * 0.01f; + int num18 = this.direction * Main.rand.Next(100, 251); + int num19 = Main.rand.Next(-50, 51); + if ((double) this.position.Y > (double) Main.player[this.target].position.Y - 100.0) + num19 -= Main.rand.Next(100, 251); + float num20 = num17 / (float) Math.Sqrt((double) (num18 * num18 + num19 * num19)); + num1 = (float) num18 * num20; + num2 = (float) num19 * num20; + } + else + { + this.localAI[3] = 1f; + double num21 = (double) Main.rand.Next(26, 301) * 0.00999999977648258; + int num22 = Main.rand.Next(-100, 101); + int num23 = Main.rand.Next(-100, 101); + double num24 = Math.Sqrt((double) (num22 * num22 + num23 * num23)); + float num25 = (float) (num21 / num24); + num1 = (float) num22 * num25; + num2 = (float) num23 * num25; + } + this.netUpdate = true; + } + } + this.scale = this.ai[3]; + int num26 = 60; + this.velocity.X = (this.velocity.X * (float) (num26 - 1) + num1) / (float) num26; + this.velocity.Y = (this.velocity.Y * (float) (num26 - 1) + num2) / (float) num26; + if ((double) this.velocity.Y > 0.0) + { + int num27 = 3; + int index1 = (int) this.Center.X / 16; + int num28 = (int) this.Center.Y / 16; + for (int index2 = num28; index2 < num28 + num27; ++index2) + { + if (Main.tile[index1, index2] != null && (Main.tile[index1, index2].nactive() && Main.tileSolid[(int) Main.tile[index1, index2].type] || Main.tile[index1, index2].liquid > (byte) 0)) + { + num2 *= -1f; + if ((double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.9f; + } + } + } + if ((double) this.velocity.Y < 0.0) + { + int num29 = 30; + bool flag = false; + int index3 = (int) this.Center.X / 16; + int num30 = (int) this.Center.Y / 16; + for (int index4 = num30; index4 < num30 + num29; ++index4) + { + if (Main.tile[index3, index4] != null && Main.tile[index3, index4].nactive() && Main.tileSolid[(int) Main.tile[index3, index4].type]) + flag = true; + } + if (!flag) + { + num2 *= -1f; + if ((double) this.velocity.Y < 0.0) + this.velocity.Y *= 0.9f; + } + } + if ((double) this.localAI[1] > 0.0) + { + --this.localAI[1]; + } + else + { + this.localAI[1] = 15f; + if (this.type == 661) + this.localAI[1] = 10f; + float num31 = 0.0f; + Vector2 zero = Vector2.Zero; + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && npc.damage > 0 && !npc.friendly && (double) npc.Hitbox.Distance(this.Center) <= 100.0) + { + ++num31; + zero += this.DirectionFrom(npc.Center); + } + } + if ((double) num31 > 0.0) + { + this.velocity = this.velocity + zero / num31 * 2f; + if ((double) this.velocity.Length() > 16.0) + this.velocity = this.velocity.SafeNormalize(Vector2.Zero) * 16f; + } + } + if (this.collideX) + { + num1 = (double) this.velocity.X >= 0.0 ? -Math.Abs(num1) : Math.Abs(num1); + this.velocity.X *= -0.2f; + } + if ((double) this.velocity.X < 0.0) + this.direction = -1; + if ((double) this.velocity.X > 0.0) + this.direction = 1; + this.ai[0] = num1; + this.ai[1] = num2; + if (this.type == 356) + this.catchItem = (short) (1994.0 + (double) this.ai[2] - 1.0); + if (this.type != 653) + return; + this.position = this.position + this.netOffset; + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.6f, 0.3f, 0.1f); + if (Main.rand.Next(60) == 0) + { + Vector2 position = this.position; + int width = this.width; + int height = this.height; + color = new Color(); + Color newColor = color; + int index = Dust.NewDust(position, width, height, 6, Alpha: 254, newColor: newColor); + Main.dust[index].velocity *= 0.0f; + } + this.position = this.position - this.netOffset; + } + + public static Color AI_121_QueenSlime_GetDustColor() => Color.Lerp(new Color(0, 160, (int) byte.MaxValue), Color.Lerp(new Color(200, 200, 200), new Color((int) byte.MaxValue, 80, (int) byte.MaxValue), Main.rand.NextFloat()), Main.rand.NextFloat()); + + private void AI_121_QueenSlime_FlyMovement() + { + this.noTileCollide = true; + this.noGravity = true; + float num1 = 14f; + float moveSpeed = 0.1f; + float num2 = 250f; + this.TargetClosest(); + Vector2 vector2 = this.Center; + if (this.timeLeft > 10) + { + if (!Collision.CanHit((Entity) this, (Entity) Main.player[this.target])) + { + bool flag = false; + Vector2 center = Main.player[this.target].Center; + for (int index = 0; index < 16; ++index) + { + float num3 = (float) (16 * index); + Point tileCoordinates = (center + new Vector2(0.0f, -num3)).ToTileCoordinates(); + if (WorldGen.SolidOrSlopedTile(tileCoordinates.X, tileCoordinates.Y)) + { + vector2 = center + new Vector2(0.0f, (float) (-(double) num3 + 16.0)) - this.Center; + flag = true; + break; + } + } + if (!flag) + vector2 = center - this.Center; + } + else + vector2 = Main.player[this.target].Center + new Vector2(0.0f, -num2) - this.Center; + } + else + vector2 = this.Center + new Vector2(500f * (float) this.direction, -num2) - this.Center; + float num4 = vector2.Length(); + if ((double) Math.Abs(vector2.X) < 40.0) + vector2.X = this.velocity.X; + if ((double) num4 > 100.0 && ((double) this.velocity.X < -12.0 && (double) vector2.X > 0.0 || (double) this.velocity.X > 12.0 && (double) vector2.X < 0.0)) + moveSpeed = 0.2f; + Vector2 desiredVelocity; + if ((double) num4 < 40.0) + desiredVelocity = this.velocity; + else if ((double) num4 < 80.0) + { + vector2.Normalize(); + desiredVelocity = vector2 * (num1 * 0.65f); + } + else + { + vector2.Normalize(); + desiredVelocity = vector2 * num1; + } + this.SimpleFlyMovement(desiredVelocity, moveSpeed); + this.rotation = this.velocity.X * 0.1f; + if ((double) this.rotation > 0.5) + this.rotation = 0.5f; + if ((double) this.rotation >= -0.5) + return; + this.rotation = -0.5f; + } + + private void AI_121_QueenSlime() + { + int Damage1 = 30; + int Damage2 = 40; + int num1 = Main.expertMode ? 1 : 0; + float num2 = 1f; + bool flag1 = false; + bool flag2 = this.life <= this.lifeMax / 2; + if ((double) this.localAI[0] == 0.0) + { + this.ai[1] = -100f; + this.localAI[0] = (float) this.lifeMax; + this.TargetClosest(); + this.netUpdate = true; + } + Lighting.AddLight(this.Center, 1f, 0.7f, 0.9f); + int num3 = 500; + if (Main.player[this.target].dead || (double) Math.Abs(this.Center.X - Main.player[this.target].Center.X) / 16.0 > (double) num3) + { + this.TargetClosest(); + if (Main.player[this.target].dead || (double) Math.Abs(this.Center.X - Main.player[this.target].Center.X) / 16.0 > (double) num3) + { + this.EncourageDespawn(10); + if ((double) Main.player[this.target].Center.X < (double) this.Center.X) + this.direction = 1; + else + this.direction = -1; + } + } + if (!Main.player[this.target].dead && this.timeLeft > 10 && !flag2 && (double) this.ai[3] >= 300.0 && (double) this.ai[0] == 0.0 && (double) this.velocity.Y == 0.0) + { + this.ai[0] = 2f; + this.ai[1] = 0.0f; + if (Main.netMode != 1) + { + this.netUpdate = true; + this.TargetClosest(false); + Point tileCoordinates1 = this.Center.ToTileCoordinates(); + Point tileCoordinates2 = Main.player[this.target].Center.ToTileCoordinates(); + Vector2 vector2 = Main.player[this.target].Center - this.Center; + int num4 = 10; + int num5 = 0; + int num6 = 7; + int num7 = 0; + bool flag3 = false; + if ((double) this.ai[3] >= 360.0 || (double) vector2.Length() > 2000.0) + { + if ((double) this.ai[3] > 360.0) + this.ai[3] = 360f; + flag3 = true; + num7 = 100; + } + while (!flag3 && num7 < 100) + { + ++num7; + int index1 = Main.rand.Next(tileCoordinates2.X - num4, tileCoordinates2.X + num4 + 1); + int index2 = Main.rand.Next(tileCoordinates2.Y - num4, tileCoordinates2.Y + 1); + if ((index2 < tileCoordinates2.Y - num6 || index2 > tileCoordinates2.Y + num6 || index1 < tileCoordinates2.X - num6 || index1 > tileCoordinates2.X + num6) && (index2 < tileCoordinates1.Y - num5 || index2 > tileCoordinates1.Y + num5 || index1 < tileCoordinates1.X - num5 || index1 > tileCoordinates1.X + num5) && !Main.tile[index1, index2].nactive()) + { + int index3 = index2; + int num8 = 0; + if ((!Main.tile[index1, index3].nactive() || !Main.tileSolid[(int) Main.tile[index1, index3].type] ? 0 : (!Main.tileSolidTop[(int) Main.tile[index1, index3].type] ? 1 : 0)) != 0) + { + num8 = 1; + } + else + { + for (; num8 < 150 && index3 + num8 < Main.maxTilesY; ++num8) + { + int index4 = index3 + num8; + if ((!Main.tile[index1, index4].nactive() || !Main.tileSolid[(int) Main.tile[index1, index4].type] ? 0 : (!Main.tileSolidTop[(int) Main.tile[index1, index4].type] ? 1 : 0)) != 0) + { + --num8; + break; + } + } + } + int index5 = index2 + num8; + bool flag4 = true; + if (flag4 && Main.tile[index1, index5].lava()) + flag4 = false; + if (flag4 && !Collision.CanHitLine(this.Center, 0, 0, Main.player[this.target].Center, 0, 0)) + flag4 = false; + if (flag4) + { + this.localAI[1] = (float) (index1 * 16 + 8); + this.localAI[2] = (float) (index5 * 16 + 16); + break; + } + } + } + if (num7 >= 100) + { + Vector2 bottom = Main.player[(int) Player.FindClosest(this.position, this.width, this.height)].Bottom; + this.localAI[1] = bottom.X; + this.localAI[2] = bottom.Y; + this.ai[3] = 0.0f; + } + } + } + if (!flag2 && (!Collision.CanHitLine(this.Center, 0, 0, Main.player[this.target].Center, 0, 0) || (double) Math.Abs(this.Top.Y - Main.player[this.target].Bottom.Y) > 320.0)) + { + this.ai[3] += 1.5f; + } + else + { + float num9 = this.ai[3]; + --this.ai[3]; + if ((double) this.ai[3] < 0.0) + { + if (Main.netMode != 1 && (double) num9 > 0.0) + this.netUpdate = true; + this.ai[3] = 0.0f; + } + } + if (this.timeLeft <= 10 && (flag2 && (double) this.ai[0] != 0.0 || !flag2 && (double) this.ai[0] != 3.0)) + { + this.ai[0] = !flag2 ? 3f : 0.0f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.ai[3] = 0.0f; + this.netUpdate = true; + } + this.noTileCollide = false; + this.noGravity = false; + if (flag2) + { + ++this.localAI[3]; + if ((double) this.localAI[3] >= 24.0) + this.localAI[3] = 0.0f; + if ((double) this.ai[0] == 4.0 && (double) this.ai[2] == 1.0) + this.localAI[3] = 6f; + if ((double) this.ai[0] == 5.0 && (double) this.ai[2] != 1.0) + this.localAI[3] = 7f; + } + switch ((int) this.ai[0]) + { + case 0: + if (flag2) + { + this.AI_121_QueenSlime_FlyMovement(); + } + else + { + this.noTileCollide = false; + this.noGravity = false; + if ((double) this.velocity.Y == 0.0) + { + this.velocity.X *= 0.8f; + if ((double) this.velocity.X > -0.1 && (double) this.velocity.X < 0.1) + this.velocity.X = 0.0f; + } + } + if (this.timeLeft > 10 && (flag2 || (double) this.velocity.Y == 0.0)) + { + ++this.ai[1]; + int num10 = 60; + if (flag2) + num10 = 120; + if ((double) this.ai[1] > (double) num10) + { + this.ai[1] = 0.0f; + if (flag2) + { + Player player = Main.player[this.target]; + this.ai[0] = Main.rand.Next(2) == 1 ? 5f : 4f; + if ((double) this.ai[0] == 4.0) + { + this.ai[2] = 1f; + if (player != null && player.active && !player.dead && ((double) player.Bottom.Y < (double) this.Bottom.Y || (double) Math.Abs(player.Center.X - this.Center.X) > 250.0)) + { + this.ai[0] = 5f; + this.ai[2] = 0.0f; + } + } + } + else + { + switch (Main.rand.Next(3)) + { + case 1: + this.ai[0] = 4f; + break; + case 2: + this.ai[0] = 5f; + break; + default: + this.ai[0] = 3f; + break; + } + } + this.netUpdate = true; + break; + } + break; + } + break; + case 1: + this.rotation = 0.0f; + ++this.ai[1]; + num2 = (float) (0.5 + (double) MathHelper.Clamp(this.ai[1] / 30f, 0.0f, 1f) * 0.5); + if ((double) this.ai[1] >= 30.0 && Main.netMode != 1) + { + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + this.netUpdate = true; + this.TargetClosest(); + } + if (Main.netMode == 1 && (double) this.ai[1] >= 60.0) + { + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + this.TargetClosest(); + } + Color dustColor1 = NPC.AI_121_QueenSlime_GetDustColor(); + dustColor1.A = (byte) 150; + for (int index6 = 0; index6 < 10; ++index6) + { + int index7 = Dust.NewDust(this.position + Vector2.UnitX * -20f, this.width + 40, this.height, 4, this.velocity.X, this.velocity.Y, 50, dustColor1, 1.5f); + Main.dust[index7].noGravity = true; + Main.dust[index7].velocity *= 2f; + } + break; + case 2: + this.rotation = 0.0f; + ++this.ai[1]; + num2 = (float) (0.5 + (double) MathHelper.Clamp((float) ((60.0 - (double) this.ai[1]) / 60.0), 0.0f, 1f) * 0.5); + if ((double) this.ai[1] >= 60.0) + flag1 = true; + if ((double) this.ai[1] == 60.0) + Gore.NewGore(this.Center + new Vector2(-40f, (float) (-this.height / 2)), this.velocity, 1258); + if ((double) this.ai[1] >= 60.0 && Main.netMode != 1) + { + this.Bottom = new Vector2(this.localAI[1], this.localAI[2]); + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + } + if (Main.netMode == 1 && (double) this.ai[1] >= 120.0) + { + this.ai[0] = 1f; + this.ai[1] = 0.0f; + } + if (!flag1) + { + Color dustColor2 = NPC.AI_121_QueenSlime_GetDustColor(); + dustColor2.A = (byte) 150; + for (int index8 = 0; index8 < 10; ++index8) + { + int index9 = Dust.NewDust(this.position + Vector2.UnitX * -20f, this.width + 40, this.height, 4, this.velocity.X, this.velocity.Y, 50, dustColor2, 1.5f); + Main.dust[index9].noGravity = true; + Main.dust[index9].velocity *= 0.5f; + } + break; + } + break; + case 3: + this.rotation = 0.0f; + if ((double) this.velocity.Y == 0.0) + { + this.velocity.X *= 0.8f; + if ((double) this.velocity.X > -0.1 && (double) this.velocity.X < 0.1) + this.velocity.X = 0.0f; + this.ai[1] += 4f; + if ((double) this.life < (double) this.lifeMax * 0.66) + this.ai[1] += 4f; + if ((double) this.life < (double) this.lifeMax * 0.33) + this.ai[1] += 4f; + if ((double) this.ai[1] >= 0.0) + { + this.netUpdate = true; + this.TargetClosest(); + if ((double) this.ai[2] == 3.0) + { + this.velocity.Y = -13f; + this.velocity.X += 3.5f * (float) this.direction; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + if (this.timeLeft > 10) + { + this.ai[0] = 0.0f; + break; + } + this.ai[1] = -60f; + break; + } + if ((double) this.ai[2] == 2.0) + { + this.velocity.Y = -6f; + this.velocity.X += 4.5f * (float) this.direction; + this.ai[1] = -40f; + ++this.ai[2]; + break; + } + this.velocity.Y = -8f; + this.velocity.X += 4f * (float) this.direction; + this.ai[1] = -40f; + ++this.ai[2]; + break; + } + break; + } + if (this.target < (int) byte.MaxValue) + { + float num11 = 3f; + if (Main.getGoodWorld) + num11 = 7f; + if (this.direction == 1 && (double) this.velocity.X < (double) num11 || this.direction == -1 && (double) this.velocity.X > -(double) num11) + { + if (this.direction == -1 && (double) this.velocity.X < 0.1 || this.direction == 1 && (double) this.velocity.X > -0.1) + { + this.velocity.X += 0.2f * (float) this.direction; + break; + } + this.velocity.X *= 0.93f; + break; + } + break; + } + break; + case 4: + this.rotation *= 0.9f; + this.noTileCollide = true; + this.noGravity = true; + if ((double) this.ai[2] == 1.0) + { + this.noTileCollide = false; + this.noGravity = false; + int num12 = 30; + if (flag2) + num12 = 10; + if (Main.getGoodWorld) + num12 = 0; + Player player = Main.player[this.target]; + Vector2 center1 = this.Center; + if (!player.dead && player.active && (double) Math.Abs(this.Center.X - player.Center.X) / 16.0 <= (double) num3) + { + Vector2 center2 = player.Center; + } + if ((double) this.velocity.Y == 0.0) + { + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.netUpdate = true; + SoundEngine.PlaySound(SoundID.Item167, this.Center); + if (Main.netMode != 1) + Projectile.NewProjectile(this.Bottom, Vector2.Zero, 922, Damage2, 0.0f, Main.myPlayer); + for (int index10 = 0; index10 < 20; ++index10) + { + int index11 = Dust.NewDust(this.Bottom - new Vector2((float) (this.width / 2), 30f), this.width, 30, 31, this.velocity.X, this.velocity.Y, 40, NPC.AI_121_QueenSlime_GetDustColor()); + Main.dust[index11].noGravity = true; + Main.dust[index11].velocity.Y = (float) ((double) Main.rand.NextFloat() * -3.0 - 5.0); + Main.dust[index11].velocity.X *= 7f; + } + } + else if ((double) this.ai[1] >= (double) num12) + { + for (int index12 = 0; index12 < 4; ++index12) + { + Vector2 Position = this.Bottom - new Vector2(Main.rand.NextFloatDirection() * 16f, (float) Main.rand.Next(8)); + int index13 = Dust.NewDust(Position, 2, 2, 31, this.velocity.X, this.velocity.Y, 40, NPC.AI_121_QueenSlime_GetDustColor(), 1.4f); + Main.dust[index13].position = Position; + Main.dust[index13].noGravity = true; + Main.dust[index13].velocity.Y = this.velocity.Y * 0.9f; + Main.dust[index13].velocity.X = (float) ((Main.rand.Next(2) == 0 ? -10.0 : 10.0) + (double) Main.rand.NextFloatDirection() * 3.0); + } + } + this.velocity.X *= 0.8f; + float num13 = this.ai[1]; + ++this.ai[1]; + if ((double) this.ai[1] >= (double) num12) + { + if ((double) num13 < (double) num12) + this.netUpdate = true; + if (flag2 && (double) this.ai[1] > (double) (num12 + 120)) + { + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.velocity.Y *= 0.8f; + this.netUpdate = true; + break; + } + ++this.velocity.Y; + float num14 = 14f; + if (Main.getGoodWorld) + { + ++this.velocity.Y; + num14 = 15.99f; + } + if ((double) this.velocity.Y == 0.0) + this.velocity.Y = 0.01f; + if ((double) this.velocity.Y >= (double) num14) + { + this.velocity.Y = num14; + break; + } + break; + } + this.velocity.Y *= 0.8f; + break; + } + if (Main.netMode != 1 && (double) this.ai[1] == 0.0) + { + this.TargetClosest(); + this.netUpdate = true; + } + ++this.ai[1]; + if ((double) this.ai[1] >= 30.0) + { + if ((double) this.ai[1] >= 60.0) + { + this.ai[1] = 60f; + if (Main.netMode != 1) + { + this.ai[1] = 0.0f; + this.ai[2] = 1f; + this.velocity.Y = -3f; + this.netUpdate = true; + } + } + Player player = Main.player[this.target]; + Vector2 center = this.Center; + if (!player.dead && player.active && (double) Math.Abs(this.Center.X - player.Center.X) / 16.0 <= (double) num3) + center = player.Center; + center.Y -= 384f; + if ((double) this.velocity.Y == 0.0) + { + this.velocity = center - this.Center; + this.velocity = this.velocity.SafeNormalize(Vector2.Zero); + this.velocity = this.velocity * 20f; + break; + } + this.velocity.Y *= 0.95f; + break; + } + break; + case 5: + this.rotation *= 0.9f; + this.noTileCollide = true; + this.noGravity = true; + if (flag2) + this.ai[3] = 0.0f; + if ((double) this.ai[2] == 1.0) + { + ++this.ai[1]; + if ((double) this.ai[1] >= 10.0) + { + if (Main.netMode != 1) + { + int num15 = 10; + if (Main.getGoodWorld) + num15 = 15; + int num16 = num15; + if (!flag2) + num16 = 6; + for (int index = 0; index < num16; ++index) + { + Vector2 spinningpoint = new Vector2(9f, 0.0f); + spinningpoint = spinningpoint.RotatedBy((double) -index * 6.28318548202515 / (double) num15, Vector2.Zero); + Projectile.NewProjectile(this.Center.X, this.Center.Y, spinningpoint.X, spinningpoint.Y, 926, Damage1, 0.0f, Main.myPlayer); + } + } + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.netUpdate = true; + break; + } + break; + } + if (Main.netMode != 1 && (double) this.ai[1] == 0.0) + { + this.TargetClosest(); + this.netUpdate = true; + } + ++this.ai[1]; + if ((double) this.ai[1] >= 50.0) + { + this.ai[1] = 50f; + if (Main.netMode != 1) + { + this.ai[1] = 0.0f; + this.ai[2] = 1f; + this.netUpdate = true; + } + } + float num17 = 100f; + for (int index14 = 0; index14 < 4; ++index14) + { + Vector2 Position = this.Center + Main.rand.NextVector2CircularEdge(num17, num17); + if (!flag2) + Position += new Vector2(0.0f, 20f); + Vector2 vector2 = (Position - this.Center).SafeNormalize(Vector2.Zero) * -8f; + int index15 = Dust.NewDust(Position, 2, 2, 31, vector2.X, vector2.Y, 40, NPC.AI_121_QueenSlime_GetDustColor(), 1.8f); + Main.dust[index15].position = Position; + Main.dust[index15].noGravity = true; + Main.dust[index15].alpha = 250; + Main.dust[index15].velocity = vector2; + Main.dust[index15].customData = (object) this; + } + if (flag2) + { + this.AI_121_QueenSlime_FlyMovement(); + break; + } + break; + } + this.dontTakeDamage = this.hide = flag1; + if ((double) num2 != (double) this.scale) + { + this.position.X += (float) (this.width / 2); + this.position.Y += (float) this.height; + this.scale = num2; + this.width = (int) (114.0 * (double) this.scale); + this.height = (int) (100.0 * (double) this.scale); + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) this.height; + } + if (this.life <= 0) + return; + if (Main.rand.Next(360) == 0) + SoundEngine.PlaySound(65, this.position); + if (Main.netMode == 1) + return; + if ((double) this.localAI[0] >= (double) (this.lifeMax / 2) && this.life < this.lifeMax / 2) + { + this.localAI[0] = (float) this.life; + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.netUpdate = true; + } + int num18 = (int) ((double) this.lifeMax * 0.0199999995529652); + if (flag2) + num18 = (int) ((double) this.lifeMax * 0.0149999996647239); + if ((double) (this.life + num18) >= (double) this.localAI[0]) + return; + this.localAI[0] = (float) this.life; + int num19 = Main.rand.Next(1, 3); + for (int index = 0; index < num19; ++index) + { + int X = (int) ((double) this.position.X + (double) Main.rand.Next(this.width - 32)); + int Y = (int) ((double) this.position.Y + (double) Main.rand.Next(this.height - 32)); + int Type = 658; + switch (Main.rand.Next(3)) + { + case 0: + Type = 658; + break; + case 1: + Type = 659; + break; + case 2: + Type = 660; + break; + } + int number = NPC.NewNPC(X, Y, Type); + Main.npc[number].SetDefaults(Type); + Main.npc[number].velocity.X = (float) Main.rand.Next(-15, 16) * 0.1f; + Main.npc[number].velocity.Y = (float) Main.rand.Next(-30, 1) * 0.1f; + Main.npc[number].ai[0] = (float) (-500 * Main.rand.Next(3)); + Main.npc[number].ai[1] = 0.0f; + if (Main.netMode == 2 && number < 200) + NetMessage.SendData(23, number: number); + } + } + + public bool AI_120_HallowBoss_IsInPhase2() => (double) this.ai[3] == 1.0 || (double) this.ai[3] == 3.0; + + public bool AI_120_HallowBoss_IsGenuinelyEnraged() => (double) this.ai[3] == 2.0 || (double) this.ai[3] == 3.0; + + private void AI_120_HallowBoss_DoMagicEffect(Vector2 spot, int effectType, float progress) + { + float num1 = 4f; + float num2 = 1f; + float num3 = 0.0f; + float num4 = 0.5f; + int num5 = 2; + int Type = 267; + switch (effectType) + { + case 1: + num2 = 0.5f; + num3 = 2f; + num4 = 0.0f; + break; + case 2: + case 4: + num1 = 50f; + num2 = 0.5f; + num3 = 0.0f; + num4 = 0.0f; + num5 = 4; + break; + case 3: + num1 = 30f; + num2 = 0.1f; + num3 = 2.5f; + num4 = 0.0f; + break; + case 5: + if ((double) progress == 0.0) + { + num5 = 0; + } + else + { + num5 = 5; + Type = Main.rand.Next(86, 92); + } + if ((double) progress >= 1.0) + { + num5 = 0; + break; + } + break; + } + for (int index = 0; index < num5; ++index) + { + Dust dust = Dust.NewDustPerfect(spot, Type, new Vector2?(Main.rand.NextVector2CircularEdge(num1, num1) * (Main.rand.NextFloat() * (1f - num4) + num4)), newColor: Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.5f), Scale: ((float) ((double) Main.rand.NextFloat() * 2.0 + 2.0) * num2)); + dust.fadeIn = num3; + dust.noGravity = true; + switch (effectType) + { + case 2: + case 4: + dust.velocity *= 0.005f; + dust.scale = 3f * Utils.GetLerpValue(0.7f, 0.0f, progress, true) * Utils.GetLerpValue(0.0f, 0.3f, progress, true); + dust.velocity = ((float) (6.28318548202515 * ((double) index / 4.0) + 0.785398185253143)).ToRotationVector2() * 8f * Utils.GetLerpValue(1f, 0.0f, progress, true); + dust.velocity += this.velocity * 0.3f; + float num6 = 0.0f; + if (effectType == 4) + num6 = 0.5f; + dust.color = Main.hslToRgb((float) (((double) index / 5.0 + (double) num6 + (double) progress * 0.5) % 1.0), 1f, 0.5f); + dust.color.A /= (byte) 2; + dust.alpha = (int) sbyte.MaxValue; + break; + case 5: + if ((double) progress == 0.0) + { + dust.customData = (object) this; + dust.scale = 1.5f; + dust.fadeIn = 0.0f; + dust.velocity = new Vector2(0.0f, -1f) + Main.rand.NextVector2Circular(1f, 1f); + dust.color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 80) * 0.3f; + break; + } + dust.color = Main.hslToRgb((float) ((double) progress * 2.0 % 1.0), 1f, 0.5f); + dust.alpha = 0; + dust.scale = 1f; + dust.fadeIn = 1.3f; + dust.velocity *= 3f; + dust.velocity.X *= 0.1f; + dust.velocity += this.velocity * 1f; + break; + } + } + } + + public static bool ShouldEmpressBeEnraged() => Main.dayTime; + + private void AI_120_HallowBoss() + { + Vector2 vector2_1 = new Vector2(-150f, -250f); + Vector2 vector2_2 = new Vector2(150f, -250f); + Vector2 vector2_3 = new Vector2(0.0f, -350f); + Vector2 vector2_4 = new Vector2(0.0f, -350f); + Vector2 vector2_5 = new Vector2(-80f, -500f); + float moveSpeed = 0.5f; + float num1 = 12f; + float num2 = 40f; + float num3 = 6400f; + int Damage1 = 40; + int num4 = 50; + int num5 = 70; + int num6 = 45; + int num7 = 45; + int num8 = 50; + bool flag1 = this.AI_120_HallowBoss_IsInPhase2(); + bool flag2 = Main.expertMode; + bool flag3 = flag1 & flag2; + bool flag4 = NPC.ShouldEmpressBeEnraged(); + if (this.life == this.lifeMax & flag4 && !this.AI_120_HallowBoss_IsGenuinelyEnraged()) + this.ai[3] += 2f; + bool flag5 = true; + int num9 = 30; + int num10 = 30; + int num11 = 30; + int num12 = 35; + int num13 = 65; + if (flag1) + { + num4 = 60; + num6 = 50; + num7 = 50; + num8 = 60; + num5 = 65; + num9 = 35; + num10 = 35; + num11 = 35; + num12 = 40; + num13 = 30; + } + int Damage2 = this.GetAttackDamage_ForProjectiles((float) num4, (float) num9); + int Damage3 = this.GetAttackDamage_ForProjectiles((float) num6, (float) num10); + int Damage4 = this.GetAttackDamage_ForProjectiles((float) num7, (float) num11); + int Damage5 = this.GetAttackDamage_ForProjectiles((float) num8, (float) num12); + int Damage6 = this.GetAttackDamage_ForProjectiles((float) num5, (float) num13); + if (flag4) + { + Damage2 = 9999; + Damage3 = 9999; + Damage4 = 9999; + Damage5 = 9999; + Damage6 = 9999; + flag2 = true; + } + float num14 = flag2 ? 0.3f : 1f; + bool flag6 = true; + int num15 = 0; + if (flag1) + num15 += 15; + if (flag2) + num15 += 5; + switch ((int) this.ai[0]) + { + case 0: + if ((double) this.ai[1] == 0.0) + { + this.velocity = new Vector2(0.0f, 5f); + if (Main.netMode != 1) + Projectile.NewProjectile(this.Center + new Vector2(0.0f, -80f), Vector2.Zero, 874, 0, 0.0f, Main.myPlayer); + } + if ((double) this.ai[1] == 10.0) + SoundEngine.PlaySound(SoundID.Item161, this.Center); + this.velocity = this.velocity * 0.95f; + if ((double) this.ai[1] > 10.0 && (double) this.ai[1] < 150.0) + { + int num16 = 2; + for (int index = 0; index < num16; ++index) + { + float num17 = MathHelper.Lerp(1.3f, 0.7f, this.Opacity) * Utils.GetLerpValue(0.0f, 120f, this.ai[1], true); + int dustIndex = Dust.NewDust(this.position, this.width, this.height, 267, newColor: Main.hslToRgb(this.ai[1] / 180f, 1f, 0.5f)); + Main.dust[dustIndex].position = this.Center + Main.rand.NextVector2Circular((float) this.width * 3f, (float) this.height * 3f) + new Vector2(0.0f, -150f); + Main.dust[dustIndex].velocity *= Main.rand.NextFloat() * 0.8f; + Main.dust[dustIndex].noGravity = true; + Main.dust[dustIndex].fadeIn = (float) (0.600000023841858 + (double) Main.rand.NextFloat() * 0.699999988079071 * (double) num17); + Main.dust[dustIndex].velocity += Vector2.UnitY * 3f; + Main.dust[dustIndex].scale = 0.35f; + if (dustIndex != 6000) + { + Dust dust = Dust.CloneDust(dustIndex); + dust.scale /= 2f; + dust.fadeIn *= 0.85f; + dust.color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + } + } + } + ++this.ai[1]; + flag5 = false; + flag6 = false; + this.Opacity = MathHelper.Clamp(this.ai[1] / 180f, 0.0f, 1f); + if ((double) this.ai[1] >= 180.0) + { + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + this.TargetClosest(); + break; + } + break; + case 1: + float num18 = flag1 ? 20f : 45f; + if (Main.getGoodWorld) + num18 /= 2f; + if ((double) this.ai[1] <= 10.0) + { + if ((double) this.ai[1] == 0.0) + this.TargetClosest(); + NPCAimedTarget targetData = this.GetTargetData(); + if (targetData.Invalid) + { + this.ai[0] = 13f; + this.ai[1] = 0.0f; + ++this.ai[2]; + this.velocity = this.velocity / 4f; + this.netUpdate = true; + break; + } + Vector2 vector2_6 = targetData.Center + new Vector2(0.0f, -300f); + if ((double) this.Distance(vector2_6) > 200.0) + vector2_6 -= this.DirectionTo(vector2_6) * 100f; + Vector2 v = vector2_6 - this.Center; + float lerpValue = Utils.GetLerpValue(100f, 600f, v.Length(), false); + float num19 = v.Length(); + if ((double) num19 > 18.0) + num19 = 18f; + this.velocity = Vector2.Lerp(v.SafeNormalize(Vector2.Zero) * num19, v / 6f, lerpValue); + this.netUpdate = true; + } + this.velocity = this.velocity * 0.92f; + ++this.ai[1]; + if ((double) this.ai[1] >= (double) num18) + { + int num20 = (int) this.ai[2]; + int num21 = 2; + int num22 = 0; + if (!flag1) + { + int num23 = num22; + int num24 = num23 + 1; + int num25 = num23; + int num26 = num24; + int num27 = num26 + 1; + int num28 = num26; + int num29 = num27; + int num30 = num29 + 1; + int num31 = num29; + int num32 = num30; + int num33 = num32 + 1; + int num34 = num32; + int num35 = num33; + int num36 = num35 + 1; + int num37 = num35; + int num38 = num36; + int num39 = num38 + 1; + int num40 = num38; + int num41 = num39; + int num42 = num41 + 1; + int num43 = num41; + int num44 = num42; + int num45 = num44 + 1; + int num46 = num44; + int num47 = num45; + int num48 = num47 + 1; + int num49 = num47; + int num50 = num48; + num22 = num50 + 1; + int num51 = num50; + if (num20 % num22 == num25) + num21 = 2; + if (num20 % num22 == num28) + num21 = 8; + if (num20 % num22 == num31) + num21 = 6; + if (num20 % num22 == num34) + num21 = 8; + if (num20 % num22 == num37) + num21 = 5; + if (num20 % num22 == num40) + num21 = 2; + if (num20 % num22 == num43) + num21 = 8; + if (num20 % num22 == num46) + num21 = 4; + if (num20 % num22 == num49) + num21 = 8; + if (num20 % num22 == num51) + num21 = 5; + if ((double) this.life / (double) this.lifeMax <= 0.5) + num21 = 10; + } + if (flag1) + { + int num52 = num22; + int num53 = num52 + 1; + int num54 = num52; + int num55 = num53; + int num56 = num55 + 1; + int num57 = num55; + int num58 = num56; + int num59 = num58 + 1; + int num60 = num58; + int num61 = -1; + if (flag2) + num61 = num59++; + int num62 = num59; + int num63 = num62 + 1; + int num64 = num62; + int num65 = num63; + int num66 = num65 + 1; + int num67 = num65; + int num68 = num66; + int num69 = num68 + 1; + int num70 = num68; + int num71 = num69; + int num72 = num71 + 1; + int num73 = num71; + int num74 = num72; + int num75 = num74 + 1; + int num76 = num74; + int num77 = num75; + int num78 = num77 + 1; + int num79 = num77; + if (num20 % num78 == num54) + num21 = 7; + if (num20 % num78 == num57) + num21 = 2; + if (num20 % num78 == num60) + num21 = 8; + if (num20 % num78 == num64) + num21 = 5; + if (num20 % num78 == num67) + num21 = 2; + if (num20 % num78 == num70) + num21 = 6; + if (num20 % num78 == num70) + num21 = 6; + if (num20 % num78 == num73) + num21 = 4; + if (num20 % num78 == num76) + num21 = 8; + if (num20 % num78 == num61) + num21 = 11; + if (num20 % num78 == num79) + num21 = 12; + } + this.TargetClosest(); + NPCAimedTarget targetData = this.GetTargetData(); + bool flag7 = false; + if (this.AI_120_HallowBoss_IsGenuinelyEnraged()) + { + if (!Main.dayTime) + flag7 = true; + if (Main.dayTime && Main.time >= 53400.0) + flag7 = true; + } + if (((targetData.Invalid ? 1 : ((double) this.Distance(targetData.Center) > (double) num3 ? 1 : 0)) | (flag7 ? 1 : 0)) != 0) + num21 = 13; + if (num21 == 8 && (double) targetData.Center.X > (double) this.Center.X) + num21 = 9; + if (flag2 && (num21 == 5 ? 1 : (num21 == 12 ? 1 : 0)) == 0) + this.velocity = this.DirectionFrom(targetData.Center).SafeNormalize(Vector2.Zero).RotatedBy(1.57079637050629 * (double) ((double) targetData.Center.X > (double) this.Center.X).ToDirectionInt()) * 20f; + this.ai[0] = (float) num21; + this.ai[1] = 0.0f; + ++this.ai[2]; + this.netUpdate = true; + break; + } + break; + case 2: + if ((double) this.ai[1] == 0.0) + SoundEngine.PlaySound(SoundID.Item164, this.Center); + float num80 = 90f - (float) num15; + Vector2 vector2_7 = new Vector2(-55f, -30f); + NPCAimedTarget targetData1 = this.GetTargetData(); + Vector2 vector2_8 = targetData1.Invalid ? this.Center : targetData1.Center; + if ((double) this.Distance(vector2_8 + vector2_1) > (double) num2) + this.SimpleFlyMovement(this.DirectionTo(vector2_8 + vector2_1).SafeNormalize(Vector2.Zero) * num1, moveSpeed); + if ((double) this.ai[1] < 60.0) + this.AI_120_HallowBoss_DoMagicEffect(this.Center + vector2_7, 1, Utils.GetLerpValue(0.0f, 60f, this.ai[1], true)); + int num81 = 3; + if (flag2) + num81 = 2; + if ((int) this.ai[1] % num81 == 0 && (double) this.ai[1] < 60.0) + { + float ai1 = this.ai[1] / 60f; + Vector2 velocity = new Vector2(0.0f, -6f).RotatedBy(1.57079637050629 * (double) Main.rand.NextFloatDirection()); + if (flag3) + velocity = new Vector2(0.0f, -10f).RotatedBy(6.28318548202515 * (double) Main.rand.NextFloat()); + if (Main.netMode != 1) + Projectile.NewProjectile(this.Center + vector2_7, velocity, 873, Damage3, 0.0f, Main.myPlayer, (float) this.target, ai1); + if (Main.netMode != 1) + { + int num82 = (int) ((double) this.ai[1] / (double) num81); + for (int playerIndex = 0; playerIndex < (int) byte.MaxValue; ++playerIndex) + { + if (this.AI_120_HallowBoss_CanShootExtraAt(playerIndex, num82 % 3, 3, 2400f)) + Projectile.NewProjectile(this.Center + vector2_7, velocity, 873, Damage3, 0.0f, Main.myPlayer, (float) playerIndex, ai1); + } + } + } + ++this.ai[1]; + if ((double) this.ai[1] >= 60.0 + (double) num80) + { + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + break; + } + break; + case 3: + ++this.ai[1]; + NPCAimedTarget targetData2 = this.GetTargetData(); + Vector2 vector2_9 = targetData2.Invalid ? this.Center : targetData2.Center; + if ((double) this.Distance(vector2_9 + vector2_2) > (double) num2) + this.SimpleFlyMovement(this.DirectionTo(vector2_9 + vector2_2).SafeNormalize(Vector2.Zero) * num1, moveSpeed); + if ((int) this.ai[1] % 180 == 0) + { + Vector2 vector2_10 = new Vector2(0.0f, -100f); + Projectile.NewProjectile(targetData2.Center + vector2_10, Vector2.Zero, 874, Damage1, 0.0f, Main.myPlayer); + } + if ((double) this.ai[1] >= 120.0) + { + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + break; + } + break; + case 4: + float num83 = (float) (20 - num15); + Vector2 vector2_11 = new Vector2(0.0f, -100f); + if ((double) this.ai[1] == 0.0) + SoundEngine.PlaySound(SoundID.Item162, this.Center); + if ((double) this.ai[1] >= 6.0 && (double) this.ai[1] < 54.0) + { + this.AI_120_HallowBoss_DoMagicEffect(this.Center + new Vector2(-55f, -20f), 2, Utils.GetLerpValue(0.0f, 100f, this.ai[1], true)); + this.AI_120_HallowBoss_DoMagicEffect(this.Center + new Vector2(55f, -20f), 4, Utils.GetLerpValue(0.0f, 100f, this.ai[1], true)); + } + NPCAimedTarget targetData3 = this.GetTargetData(); + Vector2 vector2_12 = targetData3.Invalid ? this.Center : targetData3.Center; + if ((double) this.Distance(vector2_12 + vector2_3) > (double) num2) + this.SimpleFlyMovement(this.DirectionTo(vector2_12 + vector2_3).SafeNormalize(Vector2.Zero) * num1, moveSpeed); + int num84 = 4; + if (flag2) + num84 = 5; + if ((int) this.ai[1] % 4 == 0 && (double) this.ai[1] < 100.0) + { + int num85 = 1; + for (int index = 0; index < num85; ++index) + { + int num86 = (int) this.ai[1] / 4; + Vector2 vector2_13 = Vector2.UnitX.RotatedBy(3.14159274101257 / (double) (num84 * 2) + (double) num86 * (3.14159274101257 / (double) num84) + 0.0); + if (!flag2) + vector2_13.X += (double) vector2_13.X > 0.0 ? 0.5f : -0.5f; + vector2_13.Normalize(); + float num87 = 300f; + if (flag2) + num87 = 450f; + Vector2 center1 = targetData3.Center; + if ((double) this.Distance(center1) <= 2400.0) + { + if ((double) Vector2.Dot(targetData3.Velocity.SafeNormalize(Vector2.UnitY), vector2_13) > 0.0) + vector2_13 *= -1f; + int num88 = 90; + Vector2 vector2_14 = center1 + targetData3.Velocity * (float) num88; + Vector2 vector2_15 = center1 + vector2_13 * num87 - targetData3.Velocity * 30f; + if ((double) vector2_15.Distance(center1) < (double) num87) + { + Vector2 vector2_16 = center1 - vector2_15; + if (vector2_16 == Vector2.Zero) + vector2_16 = vector2_13; + vector2_15 = center1 - Vector2.Normalize(vector2_16) * num87; + } + Vector2 vector2_17 = vector2_15; + Vector2 v1 = vector2_14 - vector2_17; + if (Main.netMode != 1) + Projectile.NewProjectile(vector2_15, Vector2.Zero, 919, Damage2, 0.0f, Main.myPlayer, v1.ToRotation(), this.ai[1] / 100f); + if (Main.netMode != 1) + { + int num89 = (int) ((double) this.ai[1] / 4.0); + for (int playerIndex = 0; playerIndex < (int) byte.MaxValue; ++playerIndex) + { + if (this.AI_120_HallowBoss_CanShootExtraAt(playerIndex, num89 % 3, 3, 2400f)) + { + Player player = Main.player[playerIndex]; + Vector2 center2 = player.Center; + if ((double) Vector2.Dot(player.velocity.SafeNormalize(Vector2.UnitY), vector2_13) > 0.0) + vector2_13 *= -1f; + Vector2 vector2_18 = center2 + player.velocity * (float) num88; + Vector2 vector2_19 = center2 + vector2_13 * num87 - player.velocity * 30f; + if ((double) vector2_19.Distance(center2) < (double) num87) + { + Vector2 vector2_20 = center2 - vector2_19; + if (vector2_20 == Vector2.Zero) + vector2_20 = vector2_13; + vector2_19 = center2 - Vector2.Normalize(vector2_20) * num87; + } + Vector2 vector2_21 = vector2_19; + Vector2 v2 = vector2_18 - vector2_21; + Projectile.NewProjectile(vector2_19, Vector2.Zero, 919, Damage2, 0.0f, Main.myPlayer, v2.ToRotation(), this.ai[1] / 100f); + } + } + } + } + } + } + ++this.ai[1]; + if ((double) this.ai[1] >= 100.0 + (double) num83) + { + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + break; + } + break; + case 5: + if ((double) this.ai[1] == 0.0) + SoundEngine.PlaySound(SoundID.Item163, this.Center); + float num90 = 30f - (float) num15; + Vector2 vector2_22 = new Vector2(55f, -30f); + Vector2 vector2_23 = this.Center + vector2_22; + if ((double) this.ai[1] < 42.0) + this.AI_120_HallowBoss_DoMagicEffect(this.Center + vector2_22, 3, Utils.GetLerpValue(0.0f, 42f, this.ai[1], true)); + NPCAimedTarget targetData4 = this.GetTargetData(); + Vector2 vector2_24 = targetData4.Invalid ? this.Center : targetData4.Center; + if ((double) this.Distance(vector2_24 + vector2_4) > (double) num2) + this.SimpleFlyMovement(this.DirectionTo(vector2_24 + vector2_4).SafeNormalize(Vector2.Zero) * num1, moveSpeed); + if ((int) this.ai[1] % 42 == 0 && (double) this.ai[1] < 42.0) + { + float num91 = 6.283185f * Main.rand.NextFloat(); + for (float num92 = 0.0f; (double) num92 < 1.0; num92 += 0.07692308f) + { + float ai1 = num92; + Vector2 spinningpoint = Vector2.UnitY.RotatedBy(1.57079637050629 + 6.28318548202515 * (double) ai1 + (double) num91); + if (Main.netMode != 1) + Projectile.NewProjectile(vector2_23 + spinningpoint.RotatedBy(-1.57079637050629) * 30f, spinningpoint * 8f, 872, Damage4, 0.0f, Main.myPlayer, ai1: ai1); + } + } + ++this.ai[1]; + if ((double) this.ai[1] >= 42.0 + (double) num90) + { + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + break; + } + break; + case 6: + float num93 = (float) (120 - num15); + Vector2 position = this.Center + new Vector2(0.0f, -100f); + NPCAimedTarget targetData5 = this.GetTargetData(); + Vector2 vector2_25 = targetData5.Invalid ? this.Center : targetData5.Center; + if ((double) this.Distance(vector2_25 + vector2_5) > (double) num2) + this.SimpleFlyMovement(this.DirectionTo(vector2_25 + vector2_5).SafeNormalize(Vector2.Zero) * num1 * 0.3f, moveSpeed * 0.7f); + if ((int) this.ai[1] % 60 == 0 && (double) this.ai[1] < 180.0) + { + int num94 = (int) this.ai[1] / 60; + int num95 = (double) targetData5.Center.X > (double) this.Center.X ? 1 : 0; + float num96 = 6f; + if (flag2) + num96 = 8f; + float num97 = 1f / num96; + for (float num98 = 0.0f; (double) num98 < 1.0; num98 += num97) + { + float ai0 = (float) (6.28318548202515 * (((double) num98 + (double) num97 * 0.5 + (double) num94 * (double) num97 * 0.5) % 1.0 + (double) num95)); + if (Main.netMode != 1) + Projectile.NewProjectile(position, Vector2.Zero, 923, Damage5, 0.0f, Main.myPlayer, ai0, (float) this.whoAmI); + } + } + ++this.ai[1]; + if ((double) this.ai[1] >= 180.0 + (double) num93) + { + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + break; + } + break; + case 7: + float num99 = 20f; + float num100 = 60f; + float num101 = num100 * 4f; + if (flag2) + { + num99 = 40f; + num100 = 40f; + num101 = num100 * 6f; + } + float num102 = num99 - (float) num15; + NPCAimedTarget targetData6 = this.GetTargetData(); + Vector2 vector2_26 = targetData6.Invalid ? this.Center : targetData6.Center; + if ((double) this.Distance(vector2_26 + vector2_4) > (double) num2) + this.SimpleFlyMovement(this.DirectionTo(vector2_26 + vector2_4).SafeNormalize(Vector2.Zero) * num1 * 0.4f, moveSpeed); + if ((double) (int) this.ai[1] % (double) num100 == 0.0 && (double) this.ai[1] < (double) num101) + { + SoundEngine.PlaySound(SoundID.Item162, this.Center); + double num103 = (double) Main.rand.NextFloat(); + int num104 = (int) this.ai[1] / (int) num100; + float num105 = 13f; + float num106 = 150f; + float y = num105 * num106; + Vector2 center = targetData6.Center; + if ((double) this.Distance(center) <= 3200.0) + { + Vector2 vector2_27 = Vector2.Zero; + Vector2 vector2_28 = Vector2.UnitY; + float num107 = 0.4f; + float num108 = 1.4f; + float num109 = 1f; + if (flag2) + { + num105 += 5f; + num106 += 50f; + num109 *= 1f; + y *= 0.5f; + } + switch (num104) + { + case 0: + center += new Vector2((float) (-(double) y / 2.0), 0.0f) * num109; + vector2_27 = new Vector2(0.0f, y); + vector2_28 = Vector2.UnitX; + break; + case 1: + center += new Vector2(y / 2f, num106 / 2f) * num109; + vector2_27 = new Vector2(0.0f, y); + vector2_28 = -Vector2.UnitX; + break; + case 2: + center += new Vector2(-y, -y) * num107 * num109; + vector2_27 = new Vector2(y * num108, 0.0f); + vector2_28 = new Vector2(1f, 1f); + break; + case 3: + center += new Vector2((float) ((double) y * (double) num107 + (double) num106 / 2.0), -y * num107) * num109; + vector2_27 = new Vector2(-y * num108, 0.0f); + vector2_28 = new Vector2(-1f, 1f); + break; + case 4: + center += new Vector2(-y, y) * num107 * num109; + vector2_27 = new Vector2(y * num108, 0.0f); + vector2_28 = center.DirectionTo(targetData6.Center); + break; + case 5: + center += new Vector2((float) ((double) y * (double) num107 + (double) num106 / 2.0), y * num107) * num109; + vector2_27 = new Vector2(-y * num108, 0.0f); + vector2_28 = center.DirectionTo(targetData6.Center); + break; + } + for (float num110 = 0.0f; (double) num110 <= 1.0; num110 += 1f / num105) + { + Vector2 vector2_29 = center + vector2_27 * (num110 - 0.5f); + Vector2 v = vector2_28; + if (flag2) + { + Vector2 vector2_30 = targetData6.Velocity * 20f * num110; + Vector2 vector2_31 = vector2_29.DirectionTo(targetData6.Center + vector2_30); + v = Vector2.Lerp(vector2_28, vector2_31, 0.75f).SafeNormalize(Vector2.UnitY); + } + float ai1 = num110; + if (Main.netMode != 1) + Projectile.NewProjectile(vector2_29, Vector2.Zero, 919, Damage6, 0.0f, Main.myPlayer, v.ToRotation(), ai1); + } + } + } + ++this.ai[1]; + if ((double) this.ai[1] >= (double) num101 + (double) num102) + { + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + break; + } + break; + case 8: + case 9: + float num111 = (float) (20 - num15); + Vector2 vector2_32 = this.Center + new Vector2(0.0f, -100f); + flag6 = (double) this.ai[1] < 6.0 || (double) this.ai[1] > 40.0; + int num112 = (double) this.ai[0] == 8.0 ? -1 : 1; + this.AI_120_HallowBoss_DoMagicEffect(this.Center, 5, Utils.GetLerpValue(40f, 90f, this.ai[1], true)); + if ((double) this.ai[1] <= 40.0) + { + if ((double) this.ai[1] == 20.0) + SoundEngine.PlaySound(SoundID.Item160, this.Center); + NPCAimedTarget targetData7 = this.GetTargetData(); + this.SimpleFlyMovement(this.DirectionTo((targetData7.Invalid ? this.Center : targetData7.Center) + new Vector2((float) (num112 * -550), 0.0f)).SafeNormalize(Vector2.Zero) * num1, moveSpeed * 2f); + if ((double) this.ai[1] == 40.0) + this.velocity = this.velocity * 0.3f; + } + else if ((double) this.ai[1] <= 90.0) + { + this.velocity = Vector2.Lerp(this.velocity, new Vector2((float) (num112 * 50), 0.0f), 0.05f); + if ((double) this.ai[1] == 90.0) + this.velocity = this.velocity * 0.7f; + num14 *= 1.5f; + } + else + this.velocity = this.velocity * 0.92f; + ++this.ai[1]; + if ((double) this.ai[1] >= 90.0 + (double) num111) + { + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + break; + } + break; + case 10: + float num113 = (float) (20 - num15); + if ((double) this.ai[1] == 0.0) + SoundEngine.PlaySound(SoundID.Item161, this.Center); + flag6 = (double) this.ai[1] < 30.0 || (double) this.ai[1] > 170.0; + this.velocity = this.velocity * 0.95f; + if ((double) this.ai[1] == 90.0) + { + if ((double) this.ai[3] == 0.0) + this.ai[3] = 1f; + if ((double) this.ai[3] == 2.0) + this.ai[3] = 3f; + this.Center = this.GetTargetData().Center + new Vector2(0.0f, -250f); + this.netUpdate = true; + } + ++this.ai[1]; + if ((double) this.ai[1] >= 180.0 + (double) num113) + { + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.netUpdate = true; + break; + } + break; + case 11: + if ((double) this.ai[1] == 0.0) + SoundEngine.PlaySound(SoundID.Item162, this.Center); + float num114 = (float) (20 - num15); + Vector2 vector2_33 = new Vector2(0.0f, -100f); + if ((double) this.ai[1] >= 6.0 && (double) this.ai[1] < 54.0) + { + this.AI_120_HallowBoss_DoMagicEffect(this.Center + new Vector2(-55f, -20f), 2, Utils.GetLerpValue(0.0f, 100f, this.ai[1], true)); + this.AI_120_HallowBoss_DoMagicEffect(this.Center + new Vector2(55f, -20f), 4, Utils.GetLerpValue(0.0f, 100f, this.ai[1], true)); + } + NPCAimedTarget targetData8 = this.GetTargetData(); + Vector2 vector2_34 = targetData8.Invalid ? this.Center : targetData8.Center; + if ((double) this.Distance(vector2_34 + vector2_3) > (double) num2) + this.SimpleFlyMovement(this.DirectionTo(vector2_34 + vector2_3).SafeNormalize(Vector2.Zero) * num1, moveSpeed); + if ((int) this.ai[1] % 3 == 0 && (double) this.ai[1] < 100.0) + { + int num115 = 1; + for (int index = 0; index < num115; ++index) + { + Vector2 v3 = -targetData8.Velocity; + v3.SafeNormalize(-Vector2.UnitY); + float num116 = 100f; + Vector2 center3 = targetData8.Center; + if ((double) this.Distance(center3) <= 2400.0) + { + int num117 = 90; + Vector2 vector2_35 = center3 + targetData8.Velocity * (float) num117; + Vector2 vector2_36 = center3 + v3 * num116; + if ((double) vector2_36.Distance(center3) < (double) num116) + { + Vector2 vector2_37 = center3 - vector2_36; + if (vector2_37 == Vector2.Zero) + vector2_37 = v3; + vector2_36 = center3 - Vector2.Normalize(vector2_37) * num116; + } + Vector2 vector2_38 = vector2_36; + Vector2 v4 = vector2_35 - vector2_38; + if (Main.netMode != 1) + Projectile.NewProjectile(vector2_36, Vector2.Zero, 919, Damage2, 0.0f, Main.myPlayer, v4.ToRotation(), this.ai[1] / 100f); + if (Main.netMode != 1) + { + int num118 = (int) ((double) this.ai[1] / 3.0); + for (int playerIndex = 0; playerIndex < (int) byte.MaxValue; ++playerIndex) + { + if (this.AI_120_HallowBoss_CanShootExtraAt(playerIndex, num118 % 3, 3, 2400f)) + { + Player player = Main.player[playerIndex]; + Vector2 v5 = -player.velocity; + v5.SafeNormalize(-Vector2.UnitY); + float num119 = 100f; + Vector2 center4 = player.Center; + int num120 = 90; + Vector2 vector2_39 = center4 + player.velocity * (float) num120; + Vector2 vector2_40 = center4 + v5 * num119; + if ((double) vector2_40.Distance(center4) < (double) num119) + { + Vector2 vector2_41 = center4 - vector2_40; + if (vector2_41 == Vector2.Zero) + vector2_41 = v5; + vector2_40 = center4 - Vector2.Normalize(vector2_41) * num119; + } + Vector2 vector2_42 = vector2_40; + Vector2 v6 = vector2_39 - vector2_42; + Projectile.NewProjectile(vector2_40, Vector2.Zero, 919, Damage2, 0.0f, Main.myPlayer, v6.ToRotation(), this.ai[1] / 100f); + } + } + } + } + } + } + ++this.ai[1]; + if ((double) this.ai[1] >= 100.0 + (double) num114) + { + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + break; + } + break; + case 12: + float num121 = 90f - (float) num15; + Vector2 vector2_43 = new Vector2(-55f, -30f); + if ((double) this.ai[1] == 0.0) + { + SoundEngine.PlaySound(SoundID.Item165, this.Center); + this.velocity = new Vector2(0.0f, -12f); + } + this.velocity = this.velocity * 0.95f; + bool flag8 = (double) this.ai[1] < 60.0 && (double) this.ai[1] >= 10.0; + if (flag8) + this.AI_120_HallowBoss_DoMagicEffect(this.Center + vector2_43, 1, Utils.GetLerpValue(0.0f, 60f, this.ai[1], true)); + int num122 = 6; + if (flag2) + num122 = 4; + float ai1_1 = (float) (((double) this.ai[1] - 10.0) / 50.0); + if ((int) this.ai[1] % num122 == 0 & flag8) + { + double num123 = (double) this.ai[1] / 60.0; + Vector2 velocity = new Vector2(0.0f, -20f).RotatedBy(6.28318548202515 * (double) ai1_1); + if (Main.netMode != 1) + Projectile.NewProjectile(this.Center + vector2_43, velocity, 873, Damage3, 0.0f, Main.myPlayer, (float) this.target, ai1_1); + if (Main.netMode != 1) + { + int num124 = (int) ((double) this.ai[1] % (double) num122); + for (int playerIndex = 0; playerIndex < (int) byte.MaxValue; ++playerIndex) + { + if (this.AI_120_HallowBoss_CanShootExtraAt(playerIndex, num124 % 3, 3, 2400f)) + Projectile.NewProjectile(this.Center + vector2_43, velocity, 873, Damage3, 0.0f, Main.myPlayer, (float) playerIndex, ai1_1); + } + } + } + ++this.ai[1]; + if ((double) this.ai[1] >= 60.0 + (double) num121) + { + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + break; + } + break; + case 13: + Vector2 vector2_44 = new Vector2(-55f, -30f); + if ((double) this.ai[1] == 0.0) + { + SoundEngine.PlaySound(SoundID.Item165, this.Center); + this.velocity = new Vector2(0.0f, -7f); + } + this.velocity = this.velocity * 0.95f; + this.TargetClosest(); + NPCAimedTarget targetData9 = this.GetTargetData(); + flag5 = false; + bool flag9 = false; + bool flag10 = false; + if (!flag9) + { + if (this.AI_120_HallowBoss_IsGenuinelyEnraged()) + { + if (!Main.dayTime) + flag10 = true; + if (Main.dayTime && Main.time >= 53400.0) + flag10 = true; + } + flag9 |= flag10; + } + if (!flag9) + { + bool flag11 = targetData9.Invalid || (double) this.Distance(targetData9.Center) > (double) num3; + flag9 |= flag11; + } + this.alpha = Utils.Clamp(this.alpha + flag9.ToDirectionInt() * 5, 0, (int) byte.MaxValue); + bool flag12 = this.alpha == 0 || this.alpha == (int) byte.MaxValue; + int num125 = 5; + for (int index = 0; index < num125; ++index) + { + float num126 = MathHelper.Lerp(1.3f, 0.7f, this.Opacity); + int dustIndex = Dust.NewDust(this.position - this.Size * 0.5f, this.width * 2, this.height * 2, 267, newColor: Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.5f)); + Main.dust[dustIndex].position = this.Center + Main.rand.NextVector2Circular((float) this.width, (float) this.height); + Main.dust[dustIndex].velocity *= Main.rand.NextFloat() * 0.8f; + Main.dust[dustIndex].noGravity = true; + Main.dust[dustIndex].scale = (float) (0.899999976158142 + (double) Main.rand.NextFloat() * 1.20000004768372); + Main.dust[dustIndex].fadeIn = (float) (0.400000005960464 + (double) Main.rand.NextFloat() * 1.20000004768372 * (double) num126); + Main.dust[dustIndex].velocity += Vector2.UnitY * -2f; + Main.dust[dustIndex].scale = 0.35f; + if (dustIndex != 6000) + { + Dust dust = Dust.CloneDust(dustIndex); + dust.scale /= 2f; + dust.fadeIn *= 0.85f; + dust.color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + } + } + ++this.ai[1]; + if ((double) this.ai[1] >= 20.0 & flag12) + { + if (this.alpha == (int) byte.MaxValue) + { + this.active = false; + if (Main.netMode == 1) + return; + NetMessage.SendData(23, number: this.whoAmI); + return; + } + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + break; + } + break; + } + this.dontTakeDamage = !flag6; + this.damage = this.GetAttackDamage_ScaledByStrength((float) this.defDamage * num14); + if (flag4) + this.damage = 9999; + this.defense = !flag1 ? this.defDefense : (int) ((double) this.defDefense * 1.20000004768372); + if ((double) ++this.localAI[0] >= 44.0) + this.localAI[0] = 0.0f; + if (flag5) + this.alpha = Utils.Clamp(this.alpha - 5, 0, (int) byte.MaxValue); + Lighting.AddLight(this.Center, Vector3.One * this.Opacity); + } + + private static void AI_120_HallowBoss_DeprecatedShot( + ref NPCAimedTarget targetData, + float stormsCount, + int stormIndexInSeries, + ref Vector2 offsetDirection, + float distance) + { + int num = 1; + Vector2 position1 = offsetDirection * distance * (float) num * new Vector2(3f, 1f) - targetData.Velocity * 90f + targetData.Center; + Vector2 vector2_1 = position1 - targetData.Center; + if ((double) Vector2.Dot(targetData.Velocity.SafeNormalize(Vector2.Zero), vector2_1.SafeNormalize(Vector2.Zero)) > 0.970000028610229) + { + Vector2 vector2_2 = vector2_1.RotatedBy(0.785398185253143 * (double) (Main.rand.Next(2) * 2 - 1)); + position1 = targetData.Center + vector2_2; + } + Vector2 position2 = position1; + Vector2 velocity = (targetData.Center - position2) / 90f; + Projectile.NewProjectile(position2, velocity, 871, 1, 0.0f, Main.myPlayer); + if (stormIndexInSeries == 0) + position1 = position2; + Projectile.NewProjectile(position1, Vector2.Zero, 871, 1, 0.0f, Main.myPlayer, ai1: ((float) stormIndexInSeries * (1f / stormsCount))); + } + + private bool AI_120_HallowBoss_CanShootExtraAt( + int playerIndex, + int rotationIndexToAttack, + int rotationSize, + float attackScanDistance) + { + if (playerIndex == this.target || playerIndex % rotationSize != rotationIndexToAttack) + return false; + Player player = Main.player[playerIndex]; + return player.active && !player.dead && this.playerInteraction[playerIndex] && (double) this.Distance(player.Center) <= (double) attackScanDistance; + } + + private void AI_119_Dandelion() + { + this.TargetClosest(); + Player player = Main.player[this.target]; + float windSpeedCurrent = Main.windSpeedCurrent; + float num1 = player.Center.X - this.Center.X; + float num2 = Math.Abs(num1); + float num3 = Math.Abs(player.Center.Y - this.Center.Y); + if (!Main.IsItAHappyWindyDay && this.timeLeft > 10) + this.timeLeft = 10; + bool flag = player.active && !player.dead && (double) num3 < 100.0 && (double) num2 < 600.0 && ((double) num1 > 0.0 && (double) windSpeedCurrent > 0.0 || (double) num1 < 0.0 && (double) windSpeedCurrent < 0.0); + if ((double) this.ai[0] == 1.0) + { + this.localAI[0] = 0.0f; + if ((double) num2 < 500.0) + this.localAI[0] = 1f; + if (Main.netMode == 1) + return; + if (!flag) + { + this.ai[0] = 0.0f; + this.netUpdate = true; + } + else + { + if ((double) this.localAI[0] != 1.0) + return; + ++this.localAI[1]; + if ((double) this.localAI[1] > 80.0) + { + this.ai[0] = 0.0f; + this.netUpdate = true; + } + else + { + if ((double) this.localAI[1] != 40.0) + return; + for (int index = 0; index < 1 + Main.rand.Next(3); ++index) + { + int num4 = -1; + if ((double) num1 > 0.0) + num4 = 1; + Vector2 velocity = new Vector2(2f * (float) num4, -2f); + Vector2 vector2 = new Vector2((float) (num4 * Main.rand.Next(-2, 10)), (float) (10 + Main.rand.Next(-6, 6))); + velocity += vector2 * 0.25f; + Vector2 position = this.Center + vector2; + position.X += (float) (num4 * 6); + if ((double) velocity.Y > 0.0) + velocity.Y *= -1f; + Projectile.NewProjectile(position, velocity, 836, this.damage / 2, 1f, ai0: ((float) this.target)); + } + this.netUpdate = true; + } + } + } + else + { + if ((double) this.ai[0] != 0.0) + return; + this.localAI[0] = 0.0f; + this.localAI[1] = 0.0f; + if (!(Main.netMode != 1 & flag)) + return; + this.ai[0] = 1f; + this.netUpdate = true; + } + } + + private void AI_118_Seahorses() + { + this.noGravity = this.wet; + float waterLineHeight; + Collision.GetWaterLineIterate(this.Center.ToTileCoordinates(), out waterLineHeight); + bool flag1 = (double) waterLineHeight > 0.0 && (double) this.Top.Y - (double) waterLineHeight < 20.0; + if (!this.wet) + { + if ((double) this.velocity.Y == 0.0) + this.velocity.X *= 0.95f; + this.rotation += (float) (((double) this.velocity.X + (double) this.velocity.Y) / 2.0 * 0.0500000007450581); + } + else + { + --this.ai[1]; + if ((double) this.ai[1] <= 0.0) + { + this.velocity = this.velocity + this.ai[0].ToRotationVector2() * 0.06f; + float num = this.velocity.Length(); + if ((double) num > 3.0 || (double) num < -3.0) + { + this.velocity.X = Math.Min(3f, Math.Max(-3f, this.velocity.X)); + this.ai[1] = (float) Main.rand.Next(450, 600); + this.ai[0] = Main.rand.NextFloat() * 6.283185f; + if (flag1 && (double) this.ai[0] > 3.14159274101257) + this.ai[0] -= 3.141593f; + this.netUpdate = true; + } + } + else + this.velocity = this.velocity * 0.95f; + this.rotation = this.velocity.X * 0.1f; + } + bool flag2 = this.collideY && this.wet && (!flag1 || (double) this.velocity.Y < 0.0); + if (!(this.collideX | flag2)) + return; + Vector2 rotationVector2 = this.ai[0].ToRotationVector2(); + if (this.collideX) + rotationVector2.X *= -1f; + if (flag2) + rotationVector2.Y *= -1f; + this.ai[0] = rotationVector2.ToRotation(); + this.velocity = this.ai[0].ToRotationVector2() * this.velocity.Length(); + this.netUpdate = true; + } + + private void AI_117_BloodNautilus() + { + float moveSpeed = 0.15f; + float num1 = 7.5f; + float num2 = 60f; + float num3 = 90f; + float num4 = 180f; + float num5 = 90f; + float num6 = 90f; + int num7 = 3; + float num8 = 180f; + bool flag = false; + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + this.alpha = (int) byte.MaxValue; + if (Main.netMode != 1) + { + this.ai[0] = -1f; + this.netUpdate = true; + } + } + if ((double) this.ai[0] != -1.0 && Main.rand.Next(4) == 0) + { + this.position = this.position + this.netOffset; + Dust dust = Dust.NewDustDirect(this.position + new Vector2(5f), this.width - 10, this.height - 10, 5); + dust.velocity *= 0.5f; + if ((double) dust.velocity.Y < 0.0) + dust.velocity.Y *= -1f; + dust.alpha = 120; + dust.scale = (float) (1.0 + (double) Main.rand.NextFloat() * 0.400000005960464); + dust.velocity += this.velocity * 0.3f; + this.position = this.position - this.netOffset; + } + if (this.target == (int) byte.MaxValue) + { + this.TargetClosest(); + this.ai[2] = (float) this.direction; + } + if (Main.player[this.target].dead || (double) Vector2.Distance(Main.player[this.target].Center, this.Center) > 2000.0) + this.TargetClosest(); + NPCAimedTarget npcAimedTarget = this.GetTargetData(); + if (Main.dayTime || !Main.bloodMoon) + npcAimedTarget = new NPCAimedTarget(); + int num9 = -1; + switch (this.ai[0]) + { + case -1f: + this.velocity = this.velocity * 0.98f; + int num10 = Math.Sign(npcAimedTarget.Center.X - this.Center.X); + if (num10 != 0) + { + this.direction = num10; + this.spriteDirection = -this.direction; + } + if ((double) this.localAI[1] == 0.0 && this.alpha < 100) + { + this.localAI[1] = 1f; + int num11 = 36; + for (int index1 = 0; index1 < num11; ++index1) + { + this.position = this.position + this.netOffset; + Vector2 vector2_1 = (Vector2.Normalize(this.velocity) * new Vector2((float) this.width / 2f, (float) this.height) * 0.75f * 0.5f).RotatedBy((double) (index1 - (num11 / 2 - 1)) * 6.28318548202515 / (double) num11) + this.Center; + Vector2 vector2_2 = vector2_1 - this.Center; + int index2 = Dust.NewDust(vector2_1 + vector2_2, 0, 0, 5, vector2_2.X * 2f, vector2_2.Y * 2f, 100, Scale: 1.4f); + Main.dust[index2].noGravity = true; + Main.dust[index2].velocity = Vector2.Normalize(vector2_2) * 3f; + this.position = this.position - this.netOffset; + } + } + if ((double) this.ai[2] > 5.0) + { + this.velocity.Y = -2.5f; + this.alpha -= 10; + if (Collision.SolidCollision(this.position, this.width, this.height)) + { + this.alpha += 15; + if (this.alpha > 150) + this.alpha = 150; + } + if (this.alpha < 0) + this.alpha = 0; + } + ++this.ai[2]; + if ((double) this.ai[2] >= 50.0) + { + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.ai[3] = 0.0f; + this.netUpdate = true; + break; + } + break; + case 0.0f: + Vector2 vector2_3 = npcAimedTarget.Center + new Vector2((float) (-(double) this.ai[2] * 300.0), -200f); + if ((double) this.Center.Distance(vector2_3) > 50.0) + this.SimpleFlyMovement(this.DirectionTo(vector2_3) * num1, moveSpeed); + this.direction = (double) this.Center.X < (double) npcAimedTarget.Center.X ? 1 : -1; + float targetAngle1 = this.Center.DirectionTo(npcAimedTarget.Center).ToRotation() - 0.4712389f * (float) this.spriteDirection; + if (this.spriteDirection == -1) + targetAngle1 += 3.141593f; + if (this.spriteDirection != this.direction) + { + this.spriteDirection = this.direction; + this.rotation = -this.rotation; + targetAngle1 = -targetAngle1; + } + this.rotation = this.rotation.AngleTowards(targetAngle1, 0.02f); + ++this.ai[1]; + if ((double) this.ai[1] > (double) num2) + { + int num12 = (int) this.ai[3]; + if (num12 % 7 == 3) + { + num9 = 3; + break; + } + if (num12 % 2 == 0) + { + SoundEngine.PlaySound(SoundID.Item170, this.Center); + num9 = 2; + break; + } + SoundEngine.PlaySound(SoundID.Item170, this.Center); + num9 = 1; + break; + } + break; + case 1f: + this.direction = (double) this.Center.X < (double) npcAimedTarget.Center.X ? -1 : 1; + float targetAngle2 = this.Center.DirectionFrom(npcAimedTarget.Center).ToRotation() - 0.4712389f * (float) this.spriteDirection; + if (this.spriteDirection == -1) + targetAngle2 += 3.141593f; + if (this.spriteDirection != this.direction & (double) this.ai[1] < (double) num3) + { + this.spriteDirection = this.direction; + this.rotation = -this.rotation; + targetAngle2 = -targetAngle2; + } + if ((double) this.ai[1] < (double) num3) + { + if ((double) this.ai[1] == (double) num3 - 1.0) + SoundEngine.PlaySound(SoundID.Item172, this.Center); + flag = true; + this.velocity = this.velocity * 0.95f; + this.rotation = this.rotation.AngleLerp(targetAngle2, 0.02f); + this.position = this.position + this.netOffset; + Vector2 mouthPosition; + Vector2 mouthDirection; + this.BloodNautilus_GetMouthPositionAndRotation(out mouthPosition, out mouthDirection); + Dust dust1 = Dust.NewDustDirect(mouthPosition + mouthDirection * 60f - new Vector2(40f), 80, 80, 16, Alpha: 150, newColor: Color.Transparent, Scale: 0.6f); + dust1.fadeIn = 1f; + dust1.velocity = dust1.position.DirectionTo(mouthPosition + Main.rand.NextVector2Circular(15f, 15f)) * dust1.velocity.Length(); + dust1.noGravity = true; + Dust dust2 = Dust.NewDustDirect(mouthPosition + mouthDirection * 100f - new Vector2(30f), 60, 60, 16, Alpha: 100, newColor: Color.Transparent, Scale: 0.9f); + dust2.fadeIn = 1.5f; + dust2.velocity = dust2.position.DirectionTo(mouthPosition + Main.rand.NextVector2Circular(15f, 15f)) * (dust2.velocity.Length() + 5f); + dust2.noGravity = true; + this.position = this.position - this.netOffset; + } + else if ((double) this.ai[1] < (double) num3 + (double) num4) + { + this.position = this.position + this.netOffset; + this.rotation = this.rotation.AngleLerp(targetAngle2, 0.07f); + Vector2 mouthPosition; + Vector2 mouthDirection; + this.BloodNautilus_GetMouthPositionAndRotation(out mouthPosition, out mouthDirection); + if ((double) this.Center.Distance(npcAimedTarget.Center) > 30.0) + this.velocity = mouthDirection * -16f + this.Center.DirectionTo(npcAimedTarget.Center) * 2f; + for (int index = 0; index < 4; ++index) + { + Dust dust3 = Dust.NewDustDirect(mouthPosition + mouthDirection * 60f - new Vector2(15f), 30, 30, 5, newColor: Color.Transparent, Scale: 1.5f); + dust3.velocity = dust3.position.DirectionFrom(mouthPosition + Main.rand.NextVector2Circular(5f, 5f)) * dust3.velocity.Length(); + dust3.position -= mouthDirection * 60f; + Dust dust4 = Dust.NewDustDirect(mouthPosition + mouthDirection * 100f - new Vector2(20f), 40, 40, 5, Alpha: 100, newColor: Color.Transparent, Scale: 1.5f); + dust4.velocity = dust4.position.DirectionFrom(mouthPosition + Main.rand.NextVector2Circular(10f, 10f)) * (dust4.velocity.Length() + 5f); + dust4.position -= mouthDirection * 100f; + } + this.position = this.position - this.netOffset; + } + ++this.ai[1]; + if ((double) this.ai[1] >= (double) num3 + (double) num4) + { + num9 = 0; + break; + } + break; + case 2f: + this.direction = (double) this.Center.X < (double) npcAimedTarget.Center.X ? 1 : -1; + float targetAngle3 = this.Center.DirectionTo(npcAimedTarget.Center).ToRotation() - 0.4712389f * (float) this.spriteDirection; + if (this.spriteDirection == -1) + targetAngle3 += 3.141593f; + if (this.spriteDirection != this.direction) + { + this.spriteDirection = this.direction; + this.rotation = -this.rotation; + targetAngle3 = -targetAngle3; + } + this.rotation = this.rotation.AngleLerp(targetAngle3, 0.2f); + if ((double) this.ai[1] < (double) num5) + { + this.position = this.position + this.netOffset; + this.velocity = this.velocity * 0.95f; + Vector2 mouthPosition; + Vector2 mouthDirection; + this.BloodNautilus_GetMouthPositionAndRotation(out mouthPosition, out mouthDirection); + if (Main.rand.Next(4) != 0) + { + Dust dust5 = Dust.NewDustDirect(mouthPosition + mouthDirection * 60f - new Vector2(60f), 120, 120, 16, Alpha: 150, newColor: Color.Transparent, Scale: 0.6f); + dust5.fadeIn = 1f; + dust5.velocity = dust5.position.DirectionTo(mouthPosition + Main.rand.NextVector2Circular(15f, 15f)) * (dust5.velocity.Length() + 3f); + dust5.noGravity = true; + Dust dust6 = Dust.NewDustDirect(mouthPosition + mouthDirection * 100f - new Vector2(80f), 160, 160, 16, Alpha: 100, newColor: Color.Transparent, Scale: 0.9f); + dust6.fadeIn = 1.5f; + dust6.velocity = dust6.position.DirectionTo(mouthPosition + Main.rand.NextVector2Circular(15f, 15f)) * (dust6.velocity.Length() + 5f); + dust6.noGravity = true; + } + this.position = this.position - this.netOffset; + } + else if ((double) this.ai[1] < (double) num5 + (double) num6) + { + this.position = this.position + this.netOffset; + this.velocity = this.velocity * 0.9f; + float num13 = (float) (((double) this.ai[1] - (double) num5) % ((double) num6 / (double) num7)); + Vector2 mouthPosition; + Vector2 mouthDirection; + this.BloodNautilus_GetMouthPositionAndRotation(out mouthPosition, out mouthDirection); + if ((double) num13 < (double) num6 / (double) num7 * 0.800000011920929) + { + for (int index = 0; index < 5; ++index) + { + Dust dust7 = Dust.NewDustDirect(mouthPosition + mouthDirection * 50f - new Vector2(15f), 30, 30, 5, newColor: Color.Transparent, Scale: 1.5f); + dust7.velocity = dust7.position.DirectionFrom(mouthPosition + Main.rand.NextVector2Circular(5f, 5f)) * dust7.velocity.Length(); + dust7.position -= mouthDirection * 60f; + Dust dust8 = Dust.NewDustDirect(mouthPosition + mouthDirection * 90f - new Vector2(20f), 40, 40, 5, Alpha: 100, newColor: Color.Transparent, Scale: 1.5f); + dust8.velocity = dust8.position.DirectionFrom(mouthPosition + Main.rand.NextVector2Circular(10f, 10f)) * (dust8.velocity.Length() + 5f); + dust8.position -= mouthDirection * 100f; + } + } + if ((int) num13 == 0) + { + this.velocity = this.velocity + mouthDirection * -8f; + for (int index = 0; index < 20; ++index) + { + Dust dust9 = Dust.NewDustDirect(mouthPosition + mouthDirection * 60f - new Vector2(15f), 30, 30, 5, newColor: Color.Transparent, Scale: 1.5f); + dust9.velocity = dust9.position.DirectionFrom(mouthPosition + Main.rand.NextVector2Circular(5f, 5f)) * dust9.velocity.Length(); + dust9.position -= mouthDirection * 60f; + Dust dust10 = Dust.NewDustDirect(mouthPosition + mouthDirection * 100f - new Vector2(20f), 40, 40, 5, Alpha: 100, newColor: Color.Transparent, Scale: 1.5f); + dust10.velocity = dust10.position.DirectionFrom(mouthPosition + Main.rand.NextVector2Circular(10f, 10f)) * (dust10.velocity.Length() + 5f); + dust10.position -= mouthDirection * 100f; + } + if (Main.netMode != 1) + { + int num14 = Main.rand.Next(5, 11); + Vector2 vector2_4 = mouthDirection * 10f; + int damageForProjectiles = this.GetAttackDamage_ForProjectiles(30f, 25f); + for (int index = 0; index < num14; ++index) + { + Vector2 velocity = vector2_4 + Main.rand.NextVector2Square(-6f, 6f); + Projectile.NewProjectile(mouthPosition - mouthDirection * 5f, velocity, 814, damageForProjectiles, 0.0f, Main.myPlayer); + } + } + } + this.position = this.position - this.netOffset; + } + ++this.ai[1]; + if ((double) this.ai[1] >= (double) num5 + (double) num6) + { + num9 = 0; + break; + } + break; + case 3f: + this.direction = (double) this.Center.X < (double) npcAimedTarget.Center.X ? 1 : -1; + float targetAngle4 = 0.0f; + this.spriteDirection = this.direction; + if ((double) this.ai[1] < (double) num8) + { + this.position = this.position + this.netOffset; + this.velocity = Vector2.Lerp(this.velocity, new Vector2(0.0f, MathHelper.Clamp((float) (1.0 - (double) this.ai[1] / (double) num8 * 1.5), 0.0f, 1f) * -1.5f), 0.03f); + this.velocity = Vector2.Zero; + this.rotation = this.rotation.AngleLerp(targetAngle4, 0.02f); + this.BloodNautilus_GetMouthPositionAndRotation(out Vector2 _, out Vector2 _); + float t = this.ai[1] / num8; + Lighting.AddLight(this.Center, new Vector3(1f, 0.5f, 0.5f) * (Utils.GetLerpValue(0.0f, 0.5f, t, false) * Utils.GetLerpValue(1f, 0.5f, t, false))); + if (Main.rand.Next(3) != 0) + { + Dust dust = Dust.NewDustDirect(this.Center - new Vector2(6f), 12, 12, 5, Alpha: 60, newColor: Color.Transparent, Scale: 1.4f); + dust.position += new Vector2((float) (this.spriteDirection * 12), 12f); + dust.velocity *= 0.1f; + } + this.position = this.position - this.netOffset; + } + if ((double) this.ai[1] == 10.0 || (double) this.ai[1] == 20.0 || (double) this.ai[1] == 30.0) + this.BloodNautilus_CallForHelp(); + ++this.ai[1]; + if ((double) this.ai[1] >= (double) num8) + { + num9 = 0; + break; + } + break; + } + if (num9 != -1) + { + this.ai[0] = (float) num9; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.netUpdate = true; + this.TargetClosest(); + if (num9 == 0) + this.ai[2] = (float) this.direction; + else + ++this.ai[3]; + } + this.reflectsProjectiles = flag; + } + + private void BloodNautilus_CallForHelp() + { + if (Main.netMode == 1 || !Main.player[this.target].active || Main.player[this.target].dead || (double) this.Distance(Main.player[this.target].Center) > 2000.0 || NPC.CountNPCS(619) >= 3) + return; + Point tileCoordinates = this.Center.ToTileCoordinates(); + Point point = tileCoordinates; + int num1 = 20; + int num2 = 3; + int num3 = 8; + int num4 = 2; + int num5 = 0; + bool flag1 = false; + while (!flag1 && num5 < 100) + { + ++num5; + int index1 = Main.rand.Next(point.X - num1, point.X + num1 + 1); + int index2 = Main.rand.Next(point.Y - num1, point.Y + num1 + 1); + if ((index2 < point.Y - num3 || index2 > point.Y + num3 || index1 < point.X - num3 || index1 > point.X + num3) && (index2 < tileCoordinates.Y - num2 || index2 > tileCoordinates.Y + num2 || index1 < tileCoordinates.X - num2 || index1 > tileCoordinates.X + num2) && !Main.tile[index1, index2].nactive()) + { + bool flag2 = true; + if (flag2 && Main.tile[index1, index2].lava()) + flag2 = false; + if (flag2 && Collision.SolidTiles(index1 - num4, index1 + num4, index2 - num4, index2 + num4)) + flag2 = false; + if (flag2 && !Collision.CanHitLine(this.Center, 0, 0, Main.player[this.target].Center, 0, 0)) + flag2 = false; + if (flag2) + { + Projectile.NewProjectile((float) (index1 * 16 + 8), (float) (index2 * 16 + 8), 0.0f, 0.0f, 813, 0, 0.0f, Main.myPlayer); + break; + } + } + } + } + + public static bool TooWindyForButterflies => (double) Math.Abs(Main.windSpeedTarget) >= 0.400000005960464; + + private void AI_116_WaterStriders() + { + bool flag1 = false; + float waterLineHeight; + if (Collision.GetWaterLine(this.Center.ToTileCoordinates(), out waterLineHeight)) + { + float num = this.Bottom.Y - 1f; + if ((double) this.Center.Y > (double) waterLineHeight) + { + this.velocity.Y -= 0.8f; + if ((double) this.velocity.Y < -4.0) + this.velocity.Y = -4f; + if ((double) num + (double) this.velocity.Y < (double) waterLineHeight) + this.velocity.Y = waterLineHeight - num; + } + else + { + this.velocity.Y = MathHelper.Min(this.velocity.Y, waterLineHeight - num); + flag1 = true; + } + } + else if (this.wet) + this.velocity.Y -= 0.2f; + if ((int) this.ai[0] != 0) + return; + ++this.ai[1]; + this.velocity.X *= 0.9f; + if ((double) this.velocity.Y == 0.0) + this.velocity.X *= 0.6f; + bool flag2 = this.wet | flag1; + bool flag3 = flag2 || (double) this.velocity.Y == 0.0; + int num1 = Main.rand.Next(120, 241); + if (!flag2) + num1 = Main.rand.Next(60, 241); + if (!flag3 || (double) this.ai[1] < (double) num1) + return; + this.ai[1] = 0.0f; + this.velocity.X = Main.rand.NextFloatDirection() * 5f; + this.netUpdate = true; + if (flag2) + return; + if ((double) this.velocity.Y == 0.0) + this.velocity.Y = -2f; + this.ai[1] = 60f; + } + + private void AI_115_LadyBugs() + { + if (Main.netMode != 1) + { + if ((double) this.ai[1] == 0.0) + { + this.ai[1] = (float) ((double) Main.rand.NextFloat() * 0.200000002980232 + 0.699999988079071); + this.netUpdate = true; + } + if ((double) --this.localAI[0] <= 0.0) + { + this.localAI[0] = (float) Main.rand.Next(60, 181); + if (Main.rand.Next(5) == 0) + { + if ((double) this.ai[2] == 0.0) + { + this.ai[2] = 1f; + this.ai[0] = 0.0f; + this.netUpdate = true; + } + else if ((double) this.ai[2] == 1.0) + { + this.TargetClosest(); + this.ai[2] = 0.0f; + this.ai[0] = Main.rand.NextFloat() * 6.283185f; + if ((double) this.Distance(Main.player[this.target].Center) > 700.0) + this.ai[0] = this.AngleTo(Main.player[this.target].Center) + Main.rand.NextFloatDirection() * 0.3f; + this.netUpdate = true; + } + } + this.TargetClosest(); + this.ai[0] = Main.rand.NextFloat() * 6.283185f; + if ((double) this.Distance(Main.player[this.target].Center) > 700.0) + this.ai[0] = this.AngleTo(Main.player[this.target].Center) + Main.rand.NextFloatDirection() * 0.3f; + this.netUpdate = true; + } + } + this.scale = this.ai[1]; + if ((double) this.ai[2] == 0.0) + { + Vector2 vector2 = this.ai[0].ToRotationVector2() * 1f; + vector2.X += Main.windSpeedTarget * 0.8f; + this.velocity = Vector2.Lerp(this.velocity, vector2, 0.0125f); + if ((double) this.velocity.Y > 0.0) + { + int num1 = 4; + int index1 = (int) this.Center.X / 16; + int num2 = (int) this.Center.Y / 16; + for (int index2 = num2; index2 < num2 + num1; ++index2) + { + if (Main.tile[index1, index2] != null && (Main.tile[index1, index2].nactive() && Main.tileSolid[(int) Main.tile[index1, index2].type] || Main.tile[index1, index2].liquid > (byte) 0)) + { + this.ai[0] = -this.ai[0]; + if ((double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.9f; + } + } + } + if ((double) this.velocity.Y < 0.0) + { + int num3 = 30; + bool flag = false; + int index3 = (int) this.Center.X / 16; + int num4 = (int) this.Center.Y / 16; + for (int index4 = num4; index4 < num4 + num3; ++index4) + { + if (Main.tile[index3, index4] != null && (Main.tile[index3, index4].nactive() && Main.tileSolid[(int) Main.tile[index3, index4].type] || Main.tile[index3, index4].liquid > (byte) 0)) + flag = true; + } + if (!flag) + { + this.ai[0] = -this.ai[0]; + if ((double) this.velocity.Y < 0.0) + this.velocity.Y *= 0.9f; + } + } + if (this.collideX) + { + this.ai[0] = (float) (-(double) this.ai[0] + 3.14159274101257); + this.velocity.X *= -0.2f; + } + } + else + { + if ((double) this.velocity.Y > 0.0) + { + int num5 = 4; + int index5 = (int) this.Center.X / 16 + this.direction; + int num6 = (int) this.Center.Y / 16; + for (int index6 = num6; index6 < num6 + num5; ++index6) + { + if (Main.tile[index5, index6] != null && Main.tile[index5, index6].liquid > (byte) 0) + { + this.TargetClosest(); + this.velocity.Y = -1f; + this.ai[2] = 0.0f; + this.ai[0] = (float) ((double) Main.rand.NextFloat() * 0.785398185253143 - 1.57079637050629); + if ((double) this.Distance(Main.player[this.target].Center) > 700.0) + this.ai[0] = this.AngleTo(Main.player[this.target].Center) + Main.rand.NextFloatDirection() * 0.3f; + this.netUpdate = true; + return; + } + } + } + if ((double) this.velocity.Y != 0.0) + { + this.velocity.X *= 0.98f; + this.velocity.Y = MathHelper.Lerp(this.velocity.Y, 2f, 0.005f); + } + else + { + this.velocity = Vector2.Lerp(this.velocity, Vector2.UnitX * (float) this.direction, 0.05f); + this.velocity.Y += 0.2f; + if (this.collideX) + { + this.direction *= -1; + this.velocity.X *= -0.2f; + this.netUpdate = true; + } + } + } + this.direction = (double) this.velocity.X > 0.0 ? 1 : -1; + } + + private void AI_114_Dragonflies() + { + if ((double) this.localAI[0] == 0.0 && Main.netMode != 1) + { + this.localAI[0] = 1f; + Vector2 center = this.Center; + this.ai[2] = center.X; + this.ai[3] = center.Y; + this.velocity = (Main.rand.NextVector2Circular(5f, 3f) + Main.rand.NextVector2CircularEdge(5f, 3f)) * 0.4f; + this.ai[1] = 0.0f; + this.ai[0] = 1f; + this.netUpdate = true; + } + switch ((int) this.ai[0]) + { + case 0: + this.velocity = this.velocity * 0.94f; + if (Main.netMode != 1 && (double) ++this.ai[1] >= (double) (60 + Main.rand.Next(60))) + { + Vector2 vector2 = new Vector2(this.ai[2], this.ai[3]); + if ((double) this.Distance(vector2) > 96.0) + this.velocity = this.DirectionTo(vector2) * 3f; + else if ((double) this.Distance(vector2) > 16.0) + this.velocity = this.DirectionTo(vector2) * 1f + Main.rand.NextVector2Circular(1f, 0.5f); + else + this.velocity = (Main.rand.NextVector2Circular(5f, 3f) + Main.rand.NextVector2CircularEdge(5f, 3f)) * 0.4f; + this.ai[1] = 0.0f; + this.ai[0] = 1f; + this.netUpdate = true; + break; + } + break; + case 1: + int num1 = 4; + if ((double) this.Distance(new Vector2(this.ai[2], this.ai[3])) > 112.0) + num1 = 200; + if ((double) ++this.ai[1] >= (double) num1) + { + this.ai[1] = 0.0f; + this.ai[0] = 0.0f; + this.netUpdate = true; + } + int index1 = (int) this.Center.X / 16; + int num2 = (int) this.Center.Y / 16; + int num3 = 3; + for (int index2 = num2; index2 < num2 + num3; ++index2) + { + if (Main.tile[index1, index2] != null && (Main.tile[index1, index2].nactive() && Main.tileSolid[(int) Main.tile[index1, index2].type] || Main.tile[index1, index2].liquid > (byte) 0)) + { + if ((double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.9f; + this.velocity.Y -= 0.2f; + } + } + if ((double) this.velocity.Y < 0.0) + { + int num4 = 30; + bool flag = false; + for (int index3 = num2; index3 < num2 + num4; ++index3) + { + if (Main.tile[index1, index3] != null && Main.tile[index1, index3].nactive() && Main.tileSolid[(int) Main.tile[index1, index3].type]) + { + flag = true; + break; + } + } + if (!flag && (double) this.velocity.Y < 0.0) + { + this.velocity.Y *= 0.9f; + break; + } + break; + } + break; + } + if ((double) this.velocity.X != 0.0) + this.direction = (double) this.velocity.X > 0.0 ? 1 : -1; + if (this.wet) + this.velocity.Y = -3f; + if ((double) this.localAI[1] > 0.0) + { + --this.localAI[1]; + } + else + { + this.localAI[1] = 15f; + float num5 = 0.0f; + Vector2 zero = Vector2.Zero; + for (int index4 = 0; index4 < 200; ++index4) + { + NPC npc = Main.npc[index4]; + if (npc.active && npc.damage > 0 && !npc.friendly && (double) npc.Hitbox.Distance(this.Center) <= 100.0) + { + ++num5; + zero += this.DirectionFrom(npc.Center); + } + } + for (int index5 = 0; index5 < (int) byte.MaxValue; ++index5) + { + Player player = Main.player[index5]; + if (player.active && (double) player.Hitbox.Distance(this.Center) <= 150.0) + { + ++num5; + zero += this.DirectionFrom(player.Center); + } + } + if ((double) num5 > 0.0) + { + float num6 = 2f; + Vector2 vector2_1 = zero / num5 * num6; + this.velocity = this.velocity + vector2_1; + if ((double) this.velocity.Length() > 16.0) + this.velocity = this.velocity.SafeNormalize(Vector2.Zero) * 16f; + Vector2 vector2_2 = this.Center + vector2_1 * 10f; + this.ai[1] = -10f; + this.ai[0] = 1f; + this.ai[2] = vector2_2.X; + this.ai[3] = vector2_2.Y; + this.netUpdate = true; + } + else + { + if (Main.netMode == 1 || (double) (new Vector2(this.ai[2], this.ai[3]) - this.Center).Length() >= 16.0) + return; + int maxValue = 30; + if (Main.tile[(int) this.ai[2] / 16, (int) this.ai[3] / 16].type != (ushort) 519) + maxValue = 4; + if (Main.rand.Next(maxValue) != 0) + return; + int cattailX = (int) this.ai[2]; + int cattailY = (int) this.ai[2]; + if (NPC.FindCattailTop((int) this.ai[2] / 16, (int) this.ai[3] / 16, out cattailX, out cattailY)) + { + this.ai[2] = (float) (cattailX * 16); + this.ai[3] = (float) (cattailY * 16); + this.netUpdate = true; + } + else + { + int i = (int) ((double) this.Center.X / 16.0); + int j = (int) ((double) this.Center.Y / 16.0); + while (!WorldGen.SolidTile(i, j) && (double) j < Main.worldSurface) + ++j; + int num7 = j - Main.rand.Next(3, 6); + this.ai[2] = (float) (i * 16); + this.ai[3] = (float) (num7 * 16); + this.netUpdate = true; + } + } + } + } + + private void AI_113_WindyBalloon() + { + if ((double) this.localAI[0] == 0.0 && Main.netMode != 1) + { + this.TargetClosest(); + this.localAI[0] = 1f; + this.ai[2] = (float) (Main.rand.Next(7) + 1); + int index = NPC.NewNPC((int) this.position.X, (int) this.position.Y, 1); + if (Main.rand.Next(180) == 0) + Main.npc[index].SetDefaults(-4); + else if (Main.rand.Next(10) == 0) + Main.npc[index].SetDefaults(-7); + else if (Main.rand.Next(3) == 0) + Main.npc[index].SetDefaults(-3); + Main.npc[index].ai[0] = -999f; + Main.npc[index].netUpdate = true; + this.ai[3] = (float) index; + this.netUpdate = true; + this.ai[1] = Main.npc[index].scale; + } + this.position = this.Center; + this.Size = new Vector2(20f, 20f) * this.ai[1]; + this.scale = this.ai[1]; + this.Center = this.position; + NPC slaveNpc = this.AI_113_WindyBalloon_GetSlaveNPC(); + this.rotation = this.velocity.X * 0.05f; + if (slaveNpc != null) + { + NPCAimedTarget targetData = this.GetTargetData(); + float num1 = float.PositiveInfinity; + int num2 = 0; + Vector2 zero = Vector2.Zero; + if (!targetData.Invalid) + { + Vector2 vector2 = targetData.Center - this.Bottom; + if ((double) vector2.Y < 0.0) + num2 = (int) vector2.Y / -16; + num1 = vector2.Length(); + if (this.direction != Math.Sign(vector2.X)) + num2 = 0; + } + if (this.wet || slaveNpc.wet || this.collideX || this.collideY && (double) this.oldVelocity.Y < 0.0) + { + float num3 = this.oldVelocity.X + (float) (this.direction * 8); + this.position.X -= num3; + slaveNpc.position.X -= num3; + this.TargetClosest(false); + this.direction *= -1; + this.velocity.X = (float) (this.direction * 2); + this.life = -1; + this.HitEffect(); + this.active = false; + this.netUpdate = true; + SoundEngine.PlaySound(this.DeathSound, this.position); + } + else + { + if (this.collideY) + { + this.velocity.Y = (double) this.oldVelocity.Y > 0.0 ? 1f : -1f; + this.TargetClosest(false); + } + float num4 = (float) (2.0 + (double) Math.Abs(Main.windSpeedTarget) * 2.0); + if (Math.Sign(this.velocity.X) != this.direction || (double) Math.Abs(this.velocity.X) < (double) num4) + { + this.velocity.X += (float) this.direction * 0.01f; + if ((double) this.velocity.X * (double) this.direction < 0.0) + { + if ((double) Math.Abs(this.velocity.X) > (double) num4) + this.velocity.X += (float) this.direction * 0.1f; + else + this.velocity.X += (float) this.direction * 0.05f; + } + else if ((double) Math.Abs(this.velocity.X) > (double) num4) + this.velocity.X = (float) this.direction * num4; + } + int index1 = (int) (((double) this.position.X + (double) (this.width / 2)) / 16.0) + this.direction; + int num5 = (int) (((double) this.position.Y + (double) this.height) / 16.0); + bool flag1 = true; + int num6 = 8 + num2; + bool flag2 = false; + for (int index2 = num5; index2 < num5 + num6; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (Main.tile[index1, index2].nactive() && Main.tileSolid[(int) Main.tile[index1, index2].type] || Main.tile[index1, index2].liquid > (byte) 0) + { + if (index2 < num5 + 5 + num2) + flag2 = true; + flag1 = false; + break; + } + } + if ((double) num1 < 400.0 && Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height)) + { + float num7 = 2f; + float num8 = 0.035f; + if ((double) this.Center.Y + (double) (this.height / 4) > (double) Main.player[this.target].position.Y + (double) (Main.player[this.target].height / 4) && (double) this.velocity.Y > -(double) num7) + { + this.velocity.Y -= num8; + if ((double) this.velocity.Y > 0.0) + this.velocity.Y -= num8; + } + else if ((double) this.Center.Y + (double) (this.height / 4) < (double) Main.player[this.target].position.Y + (double) (Main.player[this.target].height / 4) && (double) this.velocity.Y < (double) num7) + { + this.velocity.Y += num8; + if ((double) this.velocity.Y < 0.0) + this.velocity.Y += num8; + } + } + else + { + if (flag1) + this.velocity.Y += 0.05f; + else + this.velocity.Y -= 0.1f; + if (flag2) + this.velocity.Y -= 0.2f; + if ((double) this.velocity.Y > 2.0) + this.velocity.Y = 2f; + if ((double) this.velocity.Y < -4.0) + this.velocity.Y = -4f; + } + slaveNpc.Center = this.Bottom + new Vector2(0.0f, -8f) + new Vector2(0.0f, 56f * this.ai[1]); + slaveNpc.velocity = this.velocity; + } + } + else + { + this.velocity.Y = MathHelper.Clamp(this.velocity.Y - 0.2f, -8f, 8f); + this.velocity.X = MathHelper.Clamp(this.velocity.X + Main.windSpeedTarget * 0.3f, -4f, 4f); + if (!this.collideX && !this.collideY) + return; + this.position.X -= this.oldVelocity.X + (float) (this.direction * 8); + this.TargetClosest(false); + this.direction *= -1; + this.velocity.X = (float) (this.direction * 2); + this.life = -1; + this.HitEffect(); + this.active = false; + this.netUpdate = true; + SoundEngine.PlaySound(this.DeathSound, this.position); + } + } + + public NPC AI_113_WindyBalloon_GetSlaveNPC() + { + int index = (int) this.ai[3]; + NPC npc; + if (index >= 0 && index < 200) + { + npc = Main.npc[index]; + if (!npc.active || npc.type != 1 || (double) npc.ai[0] != -999.0) + { + npc = (NPC) null; + this.ai[3] = -1f; + this.netUpdate = true; + } + } + else + npc = (NPC) null; + return npc; + } + + private void AI_112_FairyCritter() + { + bool flag1 = false; + this.lavaImmune = true; + if (Main.netMode != 1 && (double) this.ai[2] > 1.0) + { + int num = 18000; + ++this.localAI[1]; + if ((double) this.localAI[1] >= (double) num) + { + this.ai[2] = 7f; + if ((double) Main.player[this.target].Center.X < (double) this.Center.X) + this.direction = 1; + else + this.direction = -1; + this.netUpdate = true; + } + } + switch ((int) this.ai[2]) + { + case 0: + this.lavaImmune = false; + this.noTileCollide = false; + if ((double) this.ai[0] == 0.0 && (double) this.ai[1] == 0.0) + { + this.ai[0] = this.Center.X; + this.ai[1] = this.Center.Y; + } + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + this.velocity = new Vector2(MathHelper.Lerp(2f, 4f, Main.rand.NextFloat()) * (float) (Main.rand.Next(2) * 2 - 1), MathHelper.Lerp(1f, 2f, Main.rand.NextFloat()) * (float) (Main.rand.Next(2) * 2 - 1)); + this.velocity = this.velocity * 0.7f; + this.netUpdate = true; + } + Vector2 vector2_1 = new Vector2(this.ai[0], this.ai[1]) - this.Center; + if ((double) vector2_1.Length() > 20.0) + { + this.velocity = this.velocity + new Vector2((double) vector2_1.X > 0.0 ? 1f : -1f, (double) vector2_1.Y > 0.0 ? 1f : -1f) * 0.04f; + if ((double) Math.Abs(this.velocity.Y) > 2.0) + this.velocity.Y *= 0.95f; + } + this.TargetClosest(); + Player player = Main.player[this.target]; + if (!player.dead && (double) player.Distance(this.Center) < 250.0) + { + this.ai[2] = 1f; + this.direction = (double) player.Center.X > (double) this.Center.X ? -1 : 1; + if ((double) this.velocity.X * (double) this.direction < 0.0) + this.velocity.X = (float) (this.direction * 2); + this.ai[3] = 0.0f; + this.netUpdate = true; + break; + } + break; + case 1: + this.lavaImmune = false; + this.noTileCollide = false; + if (this.collideX) + { + this.direction *= -1; + this.velocity.X = (float) (this.direction * 2); + } + if (this.collideY) + this.velocity.Y = (double) this.oldVelocity.Y > 0.0 ? 1f : -1f; + float num1 = 4.5f; + if (Math.Sign(this.velocity.X) != this.direction || (double) Math.Abs(this.velocity.X) < (double) num1) + { + this.velocity.X += (float) this.direction * 0.04f; + if ((double) this.velocity.X * (double) this.direction < 0.0) + { + if ((double) Math.Abs(this.velocity.X) > (double) num1) + this.velocity.X += (float) this.direction * 0.4f; + else + this.velocity.X += (float) this.direction * 0.2f; + } + else if ((double) Math.Abs(this.velocity.X) > (double) num1) + this.velocity.X = (float) this.direction * num1; + } + int num2 = (int) (((double) this.position.X + (double) (this.width / 2)) / 16.0); + int num3 = 20; + if (this.direction < 0) + num2 -= num3; + int num4 = (int) (((double) this.position.Y + (double) this.height) / 16.0); + bool flag2 = true; + int num5 = 8; + bool flag3 = false; + for (int index1 = num2; index1 <= num2 + num3; ++index1) + { + for (int index2 = num4; index2 < num4 + num5; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (Main.tile[index1, index2].nactive() && Main.tileSolid[(int) Main.tile[index1, index2].type] || Main.tile[index1, index2].liquid > (byte) 0) + { + if (index2 < num4 + 5) + flag3 = true; + flag2 = false; + break; + } + } + } + if (flag2) + this.velocity.Y += 0.05f; + else + this.velocity.Y -= 0.2f; + if (flag3) + this.velocity.Y -= 0.3f; + if ((double) this.velocity.Y > 3.0) + this.velocity.Y = 3f; + if ((double) this.velocity.Y < -5.0) + { + this.velocity.Y = -5f; + break; + } + break; + case 2: + this.noTileCollide = true; + NPCAimedTarget targetData1 = this.GetTargetData(); + bool flag4 = false; + if (targetData1.Type == NPCTargetType.Player) + flag4 = Main.player[this.target].dead; + if (flag4) + { + this.ai[2] = 1f; + this.direction = (double) targetData1.Center.X > (double) this.Center.X ? -1 : 1; + if ((double) this.velocity.X * (double) this.direction < 0.0) + this.velocity.X = (float) (this.direction * 2); + this.ai[3] = 0.0f; + this.netUpdate = true; + break; + } + Microsoft.Xna.Framework.Rectangle r1 = Utils.CenteredRectangle(targetData1.Center, new Vector2((float) (targetData1.Width + 60), (float) (targetData1.Height / 2))); + if (Main.netMode != 1 && this.Hitbox.Intersects(r1)) + { + Point treasureCoords; + if (this.GetFairyTreasureCoords(out treasureCoords)) + { + this.ai[0] = (float) treasureCoords.X; + this.ai[1] = (float) treasureCoords.Y; + this.ai[2] = 3f; + this.ai[3] = 0.0f; + this.netUpdate = true; + break; + } + this.ai[2] = 6f; + this.ai[3] = 0.0f; + this.netUpdate = true; + break; + } + Vector2 vector2_2 = r1.ClosestPointInRect(this.Center); + Vector2 vector2_3 = this.DirectionTo(vector2_2) * 2f; + float num6 = this.Distance(vector2_2); + if ((double) num6 > 150.0) + vector2_3 *= 2f; + else if ((double) num6 > 80.0) + vector2_3 *= 1.5f; + this.velocity = Vector2.Lerp(this.velocity, vector2_3, 0.07f); + Point tileCoordinates1 = this.Center.ToTileCoordinates(); + if ((double) this.ai[3] < 300.0) + { + bool goDownwards; + bool goUpwards; + this.GetBirdFlightRecommendation(6, 3, tileCoordinates1, out goDownwards, out goUpwards); + if (goDownwards) + this.velocity.Y += 0.05f; + if (goUpwards) + this.velocity.Y -= 0.02f; + if ((double) this.velocity.Y > 2.0) + this.velocity.Y = 2f; + if ((double) this.velocity.Y < -4.0) + this.velocity.Y = -4f; + } + if (WorldGen.InWorld(tileCoordinates1.X, tileCoordinates1.Y)) + { + this.ai[3] = !WorldGen.SolidTile(tileCoordinates1) ? Math.Max(this.ai[3] - 1f, 0.0f) : Math.Min(this.ai[3] + 2f, 400f); + break; + } + break; + case 3: + this.noTileCollide = true; + if ((double) this.ai[3] == 15.0) + SoundEngine.PlaySound(27, (int) this.position.X, (int) this.position.Y); + if ((double) this.ai[3] <= 15.0) + { + this.velocity = this.velocity * 0.9f; + } + else + { + this.spriteDirection = (double) Main.player[this.target].Center.X <= (double) this.Center.X ? 1 : -1; + flag1 = true; + float num7 = 0.0f; + float num8 = this.ai[3] - 15f; + float circleHeight = 22f; + if ((double) num8 <= 65.0) + { + num7 = 0.3926991f; + circleHeight = 14f; + } + else if ((double) num8 <= 130.0) + { + num7 = -0.3926991f; + circleHeight = 18f; + } + float circleRotation = num7 * (float) this.direction; + Vector2 fairyCircleOffset = this.GetFairyCircleOffset(num8 / 65f, circleRotation, circleHeight); + this.velocity = this.GetFairyCircleOffset((float) ((double) num8 / 65.0 + 1.0 / 65.0), circleRotation, circleHeight) - fairyCircleOffset; + } + ++this.ai[3]; + if ((double) this.ai[3] >= 210.0) + { + this.ai[2] = 4f; + this.TargetClosest(); + this.ai[3] = 0.0f; + this.netUpdate = true; + break; + } + break; + case 4: + this.noTileCollide = true; + NPCAimedTarget targetData2 = this.GetTargetData(); + bool flag5 = false; + if (targetData2.Type == NPCTargetType.Player) + flag5 = Main.player[this.target].dead; + if (flag5) + { + this.ai[2] = 1f; + this.direction = (double) targetData2.Center.X > (double) this.Center.X ? -1 : 1; + if ((double) this.velocity.X * (double) this.direction < 0.0) + this.velocity.X = (float) (this.direction * 2); + this.ai[3] = 0.0f; + this.netUpdate = true; + break; + } + Microsoft.Xna.Framework.Rectangle r2 = Utils.CenteredRectangle(new Vector2((float) ((double) this.ai[0] * 16.0 + 8.0), (float) ((double) this.ai[1] * 16.0 + 8.0)), Vector2.One * 5f); + if (this.Hitbox.Intersects(r2)) + { + this.ai[2] = 5f; + this.ai[3] = 0.0f; + this.netUpdate = true; + break; + } + float num9 = this.Distance(targetData2.Center); + float num10 = 300f; + if ((double) num9 > (double) num10) + { + if ((double) num9 < (double) num10 + 100.0 && !Collision.SolidCollision(this.position, this.width, this.height)) + { + this.noTileCollide = false; + if (this.collideX) + this.velocity.X *= -1f; + if (this.collideY) + this.velocity.Y *= -1f; + } + flag1 = true; + this.spriteDirection = (double) Main.player[this.target].Center.X <= (double) this.Center.X ? 1 : -1; + Vector2 vector2_4 = this.DirectionFrom(targetData2.Center); + if ((double) num9 > (double) num10 + 60.0) + { + this.velocity = this.velocity + vector2_4 * -0.1f; + if (Main.rand.Next(30) == 0) + SoundEngine.PlaySound(27, (int) this.position.X, (int) this.position.Y); + } + else if ((double) num9 < (double) num10 + 30.0) + this.velocity = this.velocity + this.DirectionTo(r2.ClosestPointInRect(this.Center)) * 0.1f; + if ((double) this.velocity.Length() > 1.0) + { + this.velocity = this.velocity * (1f / this.velocity.Length()); + break; + } + break; + } + Vector2 vector2_5 = r2.ClosestPointInRect(this.Center); + Vector2 vector2_6 = this.DirectionTo(vector2_5); + float num11 = this.Distance(vector2_5); + if ((double) num11 > 150.0) + vector2_6 *= 3f; + else if ((double) num11 > 80.0) + vector2_6 *= 2f; + Point tileCoordinates2 = this.Center.ToTileCoordinates(); + if ((double) this.ai[3] < 300.0) + { + this.velocity = Vector2.Lerp(this.velocity, vector2_6, 0.07f); + bool goDownwards; + bool goUpwards; + this.GetBirdFlightRecommendation(4, 2, tileCoordinates2, out goDownwards, out goUpwards); + if (goDownwards) + this.velocity.Y += 0.05f; + if (goUpwards) + this.velocity.Y -= 0.05f; + if ((double) this.velocity.Y > 1.0) + this.velocity.Y = 1f; + if ((double) this.velocity.Y < -1.0) + this.velocity.Y = -1f; + } + else + this.velocity = Vector2.Lerp(this.velocity, vector2_6, 0.07f); + this.ai[3] = !WorldGen.SolidTile(tileCoordinates2) ? Math.Max(this.ai[3] - 1f, 0.0f) : Math.Min(this.ai[3] + 2f, 400f); + break; + case 5: + this.localAI[1] = 0.0f; + this.noTileCollide = true; + bool flag6 = false; + Tile tileSafely = Framing.GetTileSafely(new Point((int) this.ai[0], (int) this.ai[1])); + if (!tileSafely.active() || !SceneMetrics.IsValidForOreFinder(tileSafely)) + flag6 = true; + if ((double) this.ai[3] == 15.0) + SoundEngine.PlaySound(27, (int) this.position.X, (int) this.position.Y); + if ((double) this.ai[3] <= 15.0) + { + this.velocity = this.velocity * 0.9f; + } + else + { + flag1 = true; + float num12 = this.ai[3] - 15f; + int num13; + float num14 = (float) (Math.Cos((double) (num13 = (int) ((double) num12 / 50.0)) * 1.0) * 6.28318548202515 / 16.0); + float circleHeight = (float) (Math.Cos((double) num13 * 2.0) * 10.0 + 8.0); + float circleRotation = num14 * (float) this.direction; + Vector2 fairyCircleOffset = this.GetFairyCircleOffset(num12 / 50f, circleRotation, circleHeight); + this.velocity = this.GetFairyCircleOffset((float) ((double) num12 / 50.0 + 0.0199999995529652), circleRotation, circleHeight) - fairyCircleOffset; + this.spriteDirection = (double) Main.player[this.target].Center.X <= (double) this.Center.X ? 1 : -1; + } + ++this.ai[3]; + if (Main.netMode != 1 && (double) this.ai[3] > 200.0) + { + this.active = false; + switch (Main.netMode) + { + case 0: + NPC.FairyEffects(this.Center, this.type - 583); + break; + case 2: + this.netSkip = -1; + this.life = 0; + NetMessage.SendData(23, number: this.whoAmI); + NetMessage.SendData(112, number: 2, number2: ((float) (int) this.Center.X), number3: ((float) (int) this.Center.Y), number4: ((float) (this.type - 583))); + break; + } + } + else + break; + break; + case 6: + this.noTileCollide = true; + Vector2 vector2_7 = Main.player[this.target].Center - this.Center; + if ((double) vector2_7.Length() > 100.0) + { + this.ai[2] = 2f; + this.TargetClosest(); + this.ai[3] = 0.0f; + this.netUpdate = true; + break; + } + if (!Collision.SolidCollision(this.position, this.width, this.height)) + { + this.noTileCollide = false; + if (this.collideX) + this.velocity.X *= -1f; + if (this.collideY) + this.velocity.Y *= -1f; + } + if ((double) vector2_7.Length() > 20.0) + { + this.velocity = this.velocity + new Vector2((double) vector2_7.X > 0.0 ? 1f : -1f, (double) vector2_7.Y > 0.0 ? 1f : -1f) * 0.04f; + if ((double) Math.Abs(this.velocity.Y) > 2.0) + this.velocity.Y *= 0.95f; + } + Point treasureCoords1; + if (Main.netMode != 1 && this.GetFairyTreasureCoords(out treasureCoords1)) + { + this.ai[0] = (float) treasureCoords1.X; + this.ai[1] = (float) treasureCoords1.Y; + this.ai[2] = 3f; + this.ai[3] = 0.0f; + this.netUpdate = true; + break; + } + break; + case 7: + this.noTileCollide = true; + this.velocity.X += 0.05f * (float) this.direction; + this.velocity.X = MathHelper.Clamp(this.velocity.X, -10f, 10f); + this.velocity.Y -= 0.025f; + this.velocity.Y = MathHelper.Clamp(this.velocity.Y, -5f, 5f); + this.EncourageDespawn(10); + break; + } + this.dontTakeDamage = this.dontTakeDamageFromHostiles = (double) this.ai[2] > 1.0; + for (int index = 0; index < 200; ++index) + { + if (index != this.whoAmI && Main.npc[index].active && Main.npc[index].aiStyle == 112 && (double) Math.Abs(this.position.X - Main.npc[index].position.X) + (double) Math.Abs(this.position.Y - Main.npc[index].position.Y) < (double) this.width * 1.5) + { + if ((double) this.position.Y < (double) Main.npc[index].position.Y) + this.velocity.Y -= 0.05f; + else + this.velocity.Y += 0.05f; + } + } + if (!flag1) + { + this.direction = (double) this.velocity.X >= 0.0 ? 1 : -1; + this.spriteDirection = -this.direction; + } + Color color1 = Color.HotPink; + Color color2 = Color.LightPink; + int num15 = 4; + if (this.type == 584) + { + color1 = Color.LimeGreen; + color2 = Color.LightSeaGreen; + } + if (this.type == 585) + { + color1 = Color.RoyalBlue; + color2 = Color.LightBlue; + } + if ((int) Main.timeForVisualEffects % 2 == 0) + { + this.position = this.position + this.netOffset; + Dust dust = Dust.NewDustDirect(this.Center - new Vector2((float) num15) * 0.5f, num15 + 4, num15 + 4, 278, Alpha: 200, newColor: Color.Lerp(color1, color2, Main.rand.NextFloat()), Scale: 0.65f); + dust.velocity *= 0.0f; + dust.velocity += this.velocity * 0.3f; + dust.noGravity = true; + dust.noLight = true; + this.position = this.position - this.netOffset; + } + Lighting.AddLight(this.Center, color1.ToVector3() * 0.7f); + } + + public static void FairyEffects(Vector2 Position, int type) + { + Color color1 = Color.HotPink; + Color color2 = Color.LightPink; + int num = 4; + if (type == 1) + { + color1 = Color.LimeGreen; + color2 = Color.LightSeaGreen; + } + if (type == 2) + { + color1 = Color.RoyalBlue; + color2 = Color.LightBlue; + } + for (int index = 0; index < 40; ++index) + { + Dust dust = Dust.NewDustDirect(Position - new Vector2((float) num) * 0.5f, num + 4, num + 4, 278, Alpha: 200, newColor: Color.Lerp(color1, color2, Main.rand.NextFloat()), Scale: 0.65f); + dust.velocity *= 1.5f; + if (index >= 30) + dust.velocity *= 3.5f; + else if (index >= 20) + dust.velocity *= 2f; + dust.fadeIn = (float) Main.rand.Next(0, 17) * 0.1f; + dust.noGravity = true; + } + SoundEngine.PlaySound(SoundID.Item4, (int) Position.X, (int) Position.Y); + } + + private void GetBirdFlightRecommendation( + int downScanRange, + int upRange, + Point tCoords, + out bool goDownwards, + out bool goUpwards) + { + tCoords.X += this.direction; + goDownwards = true; + goUpwards = false; + int x = tCoords.X; + for (int y = tCoords.Y; y < tCoords.Y + downScanRange && WorldGen.InWorld(x, y); ++y) + { + Tile tile = Main.tile[x, y]; + if (tile == null) + break; + if (tile.nactive() && Main.tileSolid[(int) tile.type] || tile.liquid > (byte) 0) + { + if (y < tCoords.Y + upRange) + goUpwards = true; + goDownwards = false; + break; + } + } + } + + private Vector2 GetFairyCircleOffset( + float elapsedTime, + float circleRotation, + float circleHeight) + { + return ((((float) (6.28318548202515 * (double) elapsedTime + 1.57079637050629)).ToRotationVector2() + new Vector2(0.0f, -1f)) * new Vector2((float) (6 * -this.direction), circleHeight)).RotatedBy((double) circleRotation); + } + + private bool GetFairyTreasureCoords(out Point treasureCoords) + { + treasureCoords = new Point(); + Point tileCoordinates = this.Center.ToTileCoordinates(); + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle(tileCoordinates.X, tileCoordinates.Y, 1, 1); + rectangle1.Inflate(75, 50); + int blackEdgeWidth = Main.Map.BlackEdgeWidth; + Microsoft.Xna.Framework.Rectangle rectangle2 = new Microsoft.Xna.Framework.Rectangle(0, 0, Main.maxTilesX, Main.maxTilesY); + rectangle2.Inflate(-blackEdgeWidth, -blackEdgeWidth); + Microsoft.Xna.Framework.Rectangle rectangle3 = Microsoft.Xna.Framework.Rectangle.Intersect(rectangle1, rectangle2); + int num1 = -1; + float num2 = -1f; + for (int left = rectangle3.Left; left <= rectangle3.Right; ++left) + { + for (int top = rectangle3.Top; top <= rectangle3.Bottom; ++top) + { + Tile t = Main.tile[left, top]; + if (t != null && t.active() && TileID.Sets.FriendlyFairyCanLureTo[(int) t.type] && SceneMetrics.IsValidForOreFinder(t)) + { + short num3 = Main.tileOreFinderPriority[(int) t.type]; + if (TileID.Sets.Ore[(int) t.type]) + { + int num4 = 3; + int num5 = 3; + int num6 = 40; + int num7 = 0; + for (int index1 = left - num4; index1 <= left + num4; ++index1) + { + for (int index2 = top - num5; index2 <= top + num5; ++index2) + { + if (Main.tile[index1, index2].active() && (int) Main.tile[index1, index2].type == (int) t.type) + ++num7; + } + } + if (num7 < num6) + num3 = (short) -1; + } + if (num1 <= (int) num3) + { + float num8 = this.Distance(new Vector2((float) (left * 16 + 8), (float) (top * 16 + 8))); + if (num1 != (int) num3 || (double) num8 < (double) num2) + { + num1 = (int) num3; + num2 = num8; + treasureCoords.X = left; + treasureCoords.Y = top; + } + } + } + } + } + return num1 != -1; + } + + private void AI_069_DukeFishron() + { + bool expertMode = Main.expertMode; + float num1 = expertMode ? 1.2f : 1f; + bool flag1 = (double) this.life <= (double) this.lifeMax * 0.5; + bool flag2 = expertMode && (double) this.life <= (double) this.lifeMax * 0.15; + bool flag3 = (double) this.ai[0] > 4.0; + bool flag4 = (double) this.ai[0] > 9.0; + bool flag5 = (double) this.ai[3] < 10.0; + if (flag4) + { + this.damage = (int) ((double) this.defDamage * 1.10000002384186 * (double) num1); + this.defense = 0; + } + else if (flag3) + { + this.damage = (int) ((double) this.defDamage * 1.20000004768372 * (double) num1); + this.defense = (int) ((double) this.defDefense * 0.800000011920929); + } + else + { + this.damage = this.defDamage; + this.defense = this.defDefense; + } + int num2 = expertMode ? 40 : 60; + float moveSpeed = expertMode ? 0.55f : 0.45f; + float num3 = expertMode ? 8.5f : 7.5f; + if (flag4) + { + moveSpeed = 0.7f; + num3 = 12f; + num2 = 30; + } + else if (flag3 & flag5) + { + moveSpeed = expertMode ? 0.6f : 0.5f; + num3 = expertMode ? 10f : 8f; + num2 = expertMode ? 40 : 20; + } + else if (flag5 && !flag3 && !flag4) + num2 = 30; + int num4 = expertMode ? 28 : 30; + float num5 = expertMode ? 17f : 16f; + if (flag4) + { + num4 = 25; + num5 = 27f; + } + else if (flag5 & flag3) + { + num4 = expertMode ? 27 : 30; + if (expertMode) + num5 = 21f; + } + int num6 = 80; + int num7 = 4; + float num8 = 0.3f; + float num9 = 5f; + int num10 = 90; + int num11 = 180; + int num12 = 180; + int num13 = 30; + int num14 = 120; + int num15 = 4; + float num16 = 6f; + float num17 = 20f; + float num18 = 6.283185f / (float) (num14 / 2); + int num19 = 75; + Vector2 center = this.Center; + Player player = Main.player[this.target]; + if (this.target < 0 || this.target == (int) byte.MaxValue || player.dead || !player.active || (double) Vector2.Distance(player.Center, center) > 5600.0) + { + this.TargetClosest(); + player = Main.player[this.target]; + this.netUpdate = true; + } + if (player.dead || (double) Vector2.Distance(player.Center, center) > 5600.0) + { + this.velocity.Y -= 0.4f; + this.EncourageDespawn(10); + this.ai[0] = (double) this.ai[0] <= 4.0 ? 0.0f : 5f; + this.ai[2] = 0.0f; + } + if (((double) player.position.Y < 800.0 || (double) player.position.Y > Main.worldSurface * 16.0 ? 1 : ((double) player.position.X <= 6400.0 ? 0 : ((double) player.position.X < (double) (Main.maxTilesX * 16 - 6400) ? 1 : 0))) != 0) + { + num2 = 20; + this.damage = this.defDamage * 2; + this.defense = this.defDefense * 2; + this.ai[3] = 0.0f; + num5 += 6f; + } + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + this.alpha = (int) byte.MaxValue; + this.rotation = 0.0f; + if (Main.netMode != 1) + { + this.ai[0] = -1f; + this.netUpdate = true; + } + } + float num20 = (float) Math.Atan2((double) player.Center.Y - (double) center.Y, (double) player.Center.X - (double) center.X); + if (this.spriteDirection == 1) + num20 += 3.141593f; + if ((double) num20 < 0.0) + num20 += 6.283185f; + if ((double) num20 > 6.28318548202515) + num20 -= 6.283185f; + if ((double) this.ai[0] == -1.0) + num20 = 0.0f; + if ((double) this.ai[0] == 3.0) + num20 = 0.0f; + if ((double) this.ai[0] == 4.0) + num20 = 0.0f; + if ((double) this.ai[0] == 8.0) + num20 = 0.0f; + float num21 = 0.04f; + if ((double) this.ai[0] == 1.0 || (double) this.ai[0] == 6.0) + num21 = 0.0f; + if ((double) this.ai[0] == 7.0) + num21 = 0.0f; + if ((double) this.ai[0] == 3.0) + num21 = 0.01f; + if ((double) this.ai[0] == 4.0) + num21 = 0.01f; + if ((double) this.ai[0] == 8.0) + num21 = 0.01f; + if ((double) this.rotation < (double) num20) + { + if ((double) num20 - (double) this.rotation > Math.PI) + this.rotation -= num21; + else + this.rotation += num21; + } + if ((double) this.rotation > (double) num20) + { + if ((double) this.rotation - (double) num20 > Math.PI) + this.rotation += num21; + else + this.rotation -= num21; + } + if ((double) this.rotation > (double) num20 - (double) num21 && (double) this.rotation < (double) num20 + (double) num21) + this.rotation = num20; + if ((double) this.rotation < 0.0) + this.rotation += 6.283185f; + if ((double) this.rotation > 6.28318548202515) + this.rotation -= 6.283185f; + if ((double) this.rotation > (double) num20 - (double) num21 && (double) this.rotation < (double) num20 + (double) num21) + this.rotation = num20; + if ((double) this.ai[0] != -1.0 && (double) this.ai[0] < 9.0) + { + if (Collision.SolidCollision(this.position, this.width, this.height)) + this.alpha += 15; + else + this.alpha -= 15; + if (this.alpha < 0) + this.alpha = 0; + if (this.alpha > 150) + this.alpha = 150; + } + if ((double) this.ai[0] == -1.0) + { + this.velocity = this.velocity * 0.98f; + int num22 = Math.Sign(player.Center.X - center.X); + if (num22 != 0) + { + this.direction = num22; + this.spriteDirection = -this.direction; + } + if ((double) this.ai[2] > 20.0) + { + this.velocity.Y = -2f; + this.alpha -= 5; + if (Collision.SolidCollision(this.position, this.width, this.height)) + this.alpha += 15; + if (this.alpha < 0) + this.alpha = 0; + if (this.alpha > 150) + this.alpha = 150; + } + if ((double) this.ai[2] == (double) (num10 - 30)) + { + int num23 = 36; + for (int index1 = 0; index1 < num23; ++index1) + { + Vector2 vector2_1 = (Vector2.Normalize(this.velocity) * new Vector2((float) this.width / 2f, (float) this.height) * 0.75f * 0.5f).RotatedBy((double) (index1 - (num23 / 2 - 1)) * 6.28318548202515 / (double) num23) + this.Center; + Vector2 vector2_2 = vector2_1 - this.Center; + int index2 = Dust.NewDust(vector2_1 + vector2_2, 0, 0, 172, vector2_2.X * 2f, vector2_2.Y * 2f, 100, Scale: 1.4f); + Main.dust[index2].noGravity = true; + Main.dust[index2].noLight = true; + Main.dust[index2].velocity = Vector2.Normalize(vector2_2) * 3f; + } + SoundEngine.PlaySound(29, (int) center.X, (int) center.Y, 20); + } + ++this.ai[2]; + if ((double) this.ai[2] < (double) num19) + return; + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.netUpdate = true; + } + else if ((double) this.ai[0] == 0.0 && !player.dead) + { + if ((double) this.ai[1] == 0.0) + this.ai[1] = (float) (300 * Math.Sign((center - player.Center).X)); + Vector2 vector2 = Vector2.Normalize(player.Center + new Vector2(this.ai[1], -200f) - center - this.velocity) * num3; + if ((double) this.velocity.X < (double) vector2.X) + { + this.velocity.X += moveSpeed; + if ((double) this.velocity.X < 0.0 && (double) vector2.X > 0.0) + this.velocity.X += moveSpeed; + } + else if ((double) this.velocity.X > (double) vector2.X) + { + this.velocity.X -= moveSpeed; + if ((double) this.velocity.X > 0.0 && (double) vector2.X < 0.0) + this.velocity.X -= moveSpeed; + } + if ((double) this.velocity.Y < (double) vector2.Y) + { + this.velocity.Y += moveSpeed; + if ((double) this.velocity.Y < 0.0 && (double) vector2.Y > 0.0) + this.velocity.Y += moveSpeed; + } + else if ((double) this.velocity.Y > (double) vector2.Y) + { + this.velocity.Y -= moveSpeed; + if ((double) this.velocity.Y > 0.0 && (double) vector2.Y < 0.0) + this.velocity.Y -= moveSpeed; + } + int num24 = Math.Sign(player.Center.X - center.X); + if (num24 != 0) + { + if ((double) this.ai[2] == 0.0 && num24 != this.direction) + this.rotation += 3.141593f; + this.direction = num24; + if (this.spriteDirection != -this.direction) + this.rotation += 3.141593f; + this.spriteDirection = -this.direction; + } + ++this.ai[2]; + if ((double) this.ai[2] < (double) num2) + return; + int num25 = 0; + switch ((int) this.ai[3]) + { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + num25 = 1; + break; + case 10: + this.ai[3] = 1f; + num25 = 2; + break; + case 11: + this.ai[3] = 0.0f; + num25 = 3; + break; + } + if (flag1) + num25 = 4; + switch (num25) + { + case 1: + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.velocity = Vector2.Normalize(player.Center - center) * num5; + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X); + if (num24 != 0) + { + this.direction = num24; + if (this.spriteDirection == 1) + this.rotation += 3.141593f; + this.spriteDirection = -this.direction; + break; + } + break; + case 2: + this.ai[0] = 2f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + break; + case 3: + this.ai[0] = 3f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + break; + case 4: + this.ai[0] = 4f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + break; + } + this.netUpdate = true; + } + else if ((double) this.ai[0] == 1.0) + { + int num26 = 7; + for (int index3 = 0; index3 < num26; ++index3) + { + Vector2 vector2_3 = (Vector2.Normalize(this.velocity) * new Vector2((float) (this.width + 50) / 2f, (float) this.height) * 0.75f).RotatedBy((double) (index3 - (num26 / 2 - 1)) * Math.PI / (double) num26) + center; + Vector2 vector2_4 = ((float) (Main.rand.NextDouble() * 3.14159274101257) - 1.570796f).ToRotationVector2() * (float) Main.rand.Next(3, 8); + Vector2 vector2_5 = vector2_4; + int index4 = Dust.NewDust(vector2_3 + vector2_5, 0, 0, 172, vector2_4.X * 2f, vector2_4.Y * 2f, 100, Scale: 1.4f); + Main.dust[index4].noGravity = true; + Main.dust[index4].noLight = true; + Main.dust[index4].velocity /= 4f; + Main.dust[index4].velocity -= this.velocity; + } + ++this.ai[2]; + if ((double) this.ai[2] < (double) num4) + return; + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.ai[3] += 2f; + this.netUpdate = true; + } + else if ((double) this.ai[0] == 2.0) + { + if ((double) this.ai[1] == 0.0) + this.ai[1] = (float) (300 * Math.Sign((center - player.Center).X)); + Vector2 vector2_6 = Vector2.Normalize(player.Center + new Vector2(this.ai[1], -200f) - center - this.velocity) * num9; + if ((double) this.velocity.X < (double) vector2_6.X) + { + this.velocity.X += num8; + if ((double) this.velocity.X < 0.0 && (double) vector2_6.X > 0.0) + this.velocity.X += num8; + } + else if ((double) this.velocity.X > (double) vector2_6.X) + { + this.velocity.X -= num8; + if ((double) this.velocity.X > 0.0 && (double) vector2_6.X < 0.0) + this.velocity.X -= num8; + } + if ((double) this.velocity.Y < (double) vector2_6.Y) + { + this.velocity.Y += num8; + if ((double) this.velocity.Y < 0.0 && (double) vector2_6.Y > 0.0) + this.velocity.Y += num8; + } + else if ((double) this.velocity.Y > (double) vector2_6.Y) + { + this.velocity.Y -= num8; + if ((double) this.velocity.Y > 0.0 && (double) vector2_6.Y < 0.0) + this.velocity.Y -= num8; + } + if ((double) this.ai[2] == 0.0) + SoundEngine.PlaySound(29, (int) center.X, (int) center.Y, 20); + if ((double) this.ai[2] % (double) num7 == 0.0) + { + SoundEngine.PlaySound(4, (int) this.Center.X, (int) this.Center.Y, 19); + if (Main.netMode != 1) + { + Vector2 vector2_7 = Vector2.Normalize(player.Center - center) * (float) (this.width + 20) / 2f + center; + NPC.NewNPC((int) vector2_7.X, (int) vector2_7.Y + 45, 371); + } + } + int num27 = Math.Sign(player.Center.X - center.X); + if (num27 != 0) + { + this.direction = num27; + if (this.spriteDirection != -this.direction) + this.rotation += 3.141593f; + this.spriteDirection = -this.direction; + } + ++this.ai[2]; + if ((double) this.ai[2] < (double) num6) + return; + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.netUpdate = true; + } + else if ((double) this.ai[0] == 3.0) + { + this.velocity = this.velocity * 0.98f; + this.velocity.Y = MathHelper.Lerp(this.velocity.Y, 0.0f, 0.02f); + if ((double) this.ai[2] == (double) (num10 - 30)) + SoundEngine.PlaySound(29, (int) center.X, (int) center.Y, 9); + if (Main.netMode != 1 && (double) this.ai[2] == (double) (num10 - 30)) + { + Vector2 vector2 = this.rotation.ToRotationVector2() * (Vector2.UnitX * (float) this.direction) * (float) (this.width + 20) / 2f + center; + Projectile.NewProjectile(vector2.X, vector2.Y, (float) (this.direction * 2), 8f, 385, 0, 0.0f, Main.myPlayer); + Projectile.NewProjectile(vector2.X, vector2.Y, (float) (-this.direction * 2), 8f, 385, 0, 0.0f, Main.myPlayer); + } + ++this.ai[2]; + if ((double) this.ai[2] < (double) num10) + return; + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.netUpdate = true; + } + else if ((double) this.ai[0] == 4.0) + { + this.velocity = this.velocity * 0.98f; + this.velocity.Y = MathHelper.Lerp(this.velocity.Y, 0.0f, 0.02f); + if ((double) this.ai[2] == (double) (num11 - 60)) + SoundEngine.PlaySound(29, (int) center.X, (int) center.Y, 20); + ++this.ai[2]; + if ((double) this.ai[2] < (double) num11) + return; + this.ai[0] = 5f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.ai[3] = 0.0f; + this.netUpdate = true; + } + else if ((double) this.ai[0] == 5.0 && !player.dead) + { + if ((double) this.ai[1] == 0.0) + this.ai[1] = (float) (300 * Math.Sign((center - player.Center).X)); + Vector2 vector2 = Vector2.Normalize(player.Center + new Vector2(this.ai[1], -200f) - center - this.velocity) * num3; + if ((double) this.velocity.X < (double) vector2.X) + { + this.velocity.X += moveSpeed; + if ((double) this.velocity.X < 0.0 && (double) vector2.X > 0.0) + this.velocity.X += moveSpeed; + } + else if ((double) this.velocity.X > (double) vector2.X) + { + this.velocity.X -= moveSpeed; + if ((double) this.velocity.X > 0.0 && (double) vector2.X < 0.0) + this.velocity.X -= moveSpeed; + } + if ((double) this.velocity.Y < (double) vector2.Y) + { + this.velocity.Y += moveSpeed; + if ((double) this.velocity.Y < 0.0 && (double) vector2.Y > 0.0) + this.velocity.Y += moveSpeed; + } + else if ((double) this.velocity.Y > (double) vector2.Y) + { + this.velocity.Y -= moveSpeed; + if ((double) this.velocity.Y > 0.0 && (double) vector2.Y < 0.0) + this.velocity.Y -= moveSpeed; + } + int num28 = Math.Sign(player.Center.X - center.X); + if (num28 != 0) + { + if ((double) this.ai[2] == 0.0 && num28 != this.direction) + this.rotation += 3.141593f; + this.direction = num28; + if (this.spriteDirection != -this.direction) + this.rotation += 3.141593f; + this.spriteDirection = -this.direction; + } + ++this.ai[2]; + if ((double) this.ai[2] < (double) num2) + return; + int num29 = 0; + switch ((int) this.ai[3]) + { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + num29 = 1; + break; + case 6: + this.ai[3] = 1f; + num29 = 2; + break; + case 7: + this.ai[3] = 0.0f; + num29 = 3; + break; + } + if (flag2) + num29 = 4; + switch (num29) + { + case 1: + this.ai[0] = 6f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.velocity = Vector2.Normalize(player.Center - center) * num5; + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X); + if (num28 != 0) + { + this.direction = num28; + if (this.spriteDirection == 1) + this.rotation += 3.141593f; + this.spriteDirection = -this.direction; + break; + } + break; + case 2: + this.velocity = Vector2.Normalize(player.Center - center) * num17; + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X); + if (num28 != 0) + { + this.direction = num28; + if (this.spriteDirection == 1) + this.rotation += 3.141593f; + this.spriteDirection = -this.direction; + } + this.ai[0] = 7f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + break; + case 3: + this.ai[0] = 8f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + break; + case 4: + this.ai[0] = 9f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + break; + } + this.netUpdate = true; + } + else if ((double) this.ai[0] == 6.0) + { + int num30 = 7; + for (int index5 = 0; index5 < num30; ++index5) + { + Vector2 vector2_8 = (Vector2.Normalize(this.velocity) * new Vector2((float) (this.width + 50) / 2f, (float) this.height) * 0.75f).RotatedBy((double) (index5 - (num30 / 2 - 1)) * Math.PI / (double) num30) + center; + Vector2 vector2_9 = ((float) (Main.rand.NextDouble() * 3.14159274101257) - 1.570796f).ToRotationVector2() * (float) Main.rand.Next(3, 8); + Vector2 vector2_10 = vector2_9; + int index6 = Dust.NewDust(vector2_8 + vector2_10, 0, 0, 172, vector2_9.X * 2f, vector2_9.Y * 2f, 100, Scale: 1.4f); + Main.dust[index6].noGravity = true; + Main.dust[index6].noLight = true; + Main.dust[index6].velocity /= 4f; + Main.dust[index6].velocity -= this.velocity; + } + ++this.ai[2]; + if ((double) this.ai[2] < (double) num4) + return; + this.ai[0] = 5f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.ai[3] += 2f; + this.netUpdate = true; + } + else if ((double) this.ai[0] == 7.0) + { + if ((double) this.ai[2] == 0.0) + SoundEngine.PlaySound(29, (int) center.X, (int) center.Y, 20); + if ((double) this.ai[2] % (double) num15 == 0.0) + { + SoundEngine.PlaySound(4, (int) this.Center.X, (int) this.Center.Y, 19); + if (Main.netMode != 1) + { + Vector2 vector2 = Vector2.Normalize(this.velocity) * (float) (this.width + 20) / 2f + center; + int index = NPC.NewNPC((int) vector2.X, (int) vector2.Y + 45, 371); + Main.npc[index].target = this.target; + Main.npc[index].velocity = Vector2.Normalize(this.velocity).RotatedBy(1.57079637050629 * (double) this.direction) * num16; + Main.npc[index].netUpdate = true; + Main.npc[index].ai[3] = (float) Main.rand.Next(80, 121) / 100f; + } + } + this.velocity = this.velocity.RotatedBy(-(double) num18 * (double) this.direction); + this.rotation -= num18 * (float) this.direction; + ++this.ai[2]; + if ((double) this.ai[2] < (double) num14) + return; + this.ai[0] = 5f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.netUpdate = true; + } + else if ((double) this.ai[0] == 8.0) + { + this.velocity = this.velocity * 0.98f; + this.velocity.Y = MathHelper.Lerp(this.velocity.Y, 0.0f, 0.02f); + if ((double) this.ai[2] == (double) (num10 - 30)) + SoundEngine.PlaySound(29, (int) center.X, (int) center.Y, 20); + if (Main.netMode != 1 && (double) this.ai[2] == (double) (num10 - 30)) + Projectile.NewProjectile(center.X, center.Y, 0.0f, 0.0f, 385, 0, 0.0f, Main.myPlayer, 1f, (float) (this.target + 1)); + ++this.ai[2]; + if ((double) this.ai[2] < (double) num10) + return; + this.ai[0] = 5f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.netUpdate = true; + } + else if ((double) this.ai[0] == 9.0) + { + if ((double) this.ai[2] < (double) (num12 - 90)) + { + if (Collision.SolidCollision(this.position, this.width, this.height)) + this.alpha += 15; + else + this.alpha -= 15; + if (this.alpha < 0) + this.alpha = 0; + if (this.alpha > 150) + this.alpha = 150; + } + else if (this.alpha < (int) byte.MaxValue) + { + this.alpha += 4; + if (this.alpha > (int) byte.MaxValue) + this.alpha = (int) byte.MaxValue; + } + this.velocity = this.velocity * 0.98f; + this.velocity.Y = MathHelper.Lerp(this.velocity.Y, 0.0f, 0.02f); + if ((double) this.ai[2] == (double) (num12 - 60)) + SoundEngine.PlaySound(29, (int) center.X, (int) center.Y, 20); + ++this.ai[2]; + if ((double) this.ai[2] < (double) num12) + return; + this.ai[0] = 10f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.ai[3] = 0.0f; + this.netUpdate = true; + } + else if ((double) this.ai[0] == 10.0 && !player.dead) + { + this.dontTakeDamage = false; + this.chaseable = false; + if (this.alpha < (int) byte.MaxValue) + { + this.alpha += 25; + if (this.alpha > (int) byte.MaxValue) + this.alpha = (int) byte.MaxValue; + } + if ((double) this.ai[1] == 0.0) + this.ai[1] = (float) (360 * Math.Sign((center - player.Center).X)); + this.SimpleFlyMovement(Vector2.Normalize(player.Center + new Vector2(this.ai[1], -200f) - center - this.velocity) * num3, moveSpeed); + int num31 = Math.Sign(player.Center.X - center.X); + if (num31 != 0) + { + if ((double) this.ai[2] == 0.0 && num31 != this.direction) + { + this.rotation += 3.141593f; + for (int index = 0; index < this.oldPos.Length; ++index) + this.oldPos[index] = Vector2.Zero; + } + this.direction = num31; + if (this.spriteDirection != -this.direction) + this.rotation += 3.141593f; + this.spriteDirection = -this.direction; + } + ++this.ai[2]; + if ((double) this.ai[2] < (double) num2) + return; + int num32 = 0; + switch ((int) this.ai[3]) + { + case 0: + case 2: + case 3: + case 5: + case 6: + case 7: + num32 = 1; + break; + case 1: + case 4: + case 8: + num32 = 2; + break; + } + switch (num32) + { + case 1: + this.ai[0] = 11f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.velocity = Vector2.Normalize(player.Center - center) * num5; + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X); + if (num31 != 0) + { + this.direction = num31; + if (this.spriteDirection == 1) + this.rotation += 3.141593f; + this.spriteDirection = -this.direction; + break; + } + break; + case 2: + this.ai[0] = 12f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + break; + case 3: + this.ai[0] = 13f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + break; + } + this.netUpdate = true; + } + else if ((double) this.ai[0] == 11.0) + { + this.dontTakeDamage = false; + this.chaseable = true; + this.alpha -= 25; + if (this.alpha < 0) + this.alpha = 0; + int num33 = 7; + for (int index7 = 0; index7 < num33; ++index7) + { + Vector2 vector2_11 = (Vector2.Normalize(this.velocity) * new Vector2((float) (this.width + 50) / 2f, (float) this.height) * 0.75f).RotatedBy((double) (index7 - (num33 / 2 - 1)) * Math.PI / (double) num33) + center; + Vector2 vector2_12 = ((float) (Main.rand.NextDouble() * 3.14159274101257) - 1.570796f).ToRotationVector2() * (float) Main.rand.Next(3, 8); + Vector2 vector2_13 = vector2_12; + int index8 = Dust.NewDust(vector2_11 + vector2_13, 0, 0, 172, vector2_12.X * 2f, vector2_12.Y * 2f, 100, Scale: 1.4f); + Main.dust[index8].noGravity = true; + Main.dust[index8].noLight = true; + Main.dust[index8].velocity /= 4f; + Main.dust[index8].velocity -= this.velocity; + } + ++this.ai[2]; + if ((double) this.ai[2] < (double) num4) + return; + this.ai[0] = 10f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + ++this.ai[3]; + this.netUpdate = true; + } + else if ((double) this.ai[0] == 12.0) + { + this.dontTakeDamage = true; + this.chaseable = false; + if (this.alpha < (int) byte.MaxValue) + { + this.alpha += 17; + if (this.alpha > (int) byte.MaxValue) + this.alpha = (int) byte.MaxValue; + } + this.velocity = this.velocity * 0.98f; + this.velocity.Y = MathHelper.Lerp(this.velocity.Y, 0.0f, 0.02f); + if ((double) this.ai[2] == (double) (num13 / 2)) + SoundEngine.PlaySound(29, (int) center.X, (int) center.Y, 20); + if (Main.netMode != 1 && (double) this.ai[2] == (double) (num13 / 2)) + { + if ((double) this.ai[1] == 0.0) + this.ai[1] = (float) (300 * Math.Sign((center - player.Center).X)); + Vector2 vector2 = this.Center = player.Center + new Vector2(-this.ai[1], -200f); + int num34 = Math.Sign(player.Center.X - vector2.X); + if (num34 != 0) + { + if ((double) this.ai[2] == 0.0 && num34 != this.direction) + { + this.rotation += 3.141593f; + for (int index = 0; index < this.oldPos.Length; ++index) + this.oldPos[index] = Vector2.Zero; + } + this.direction = num34; + if (this.spriteDirection != -this.direction) + this.rotation += 3.141593f; + this.spriteDirection = -this.direction; + } + } + ++this.ai[2]; + if ((double) this.ai[2] < (double) num13) + return; + this.ai[0] = 10f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + ++this.ai[3]; + if ((double) this.ai[3] >= 9.0) + this.ai[3] = 0.0f; + this.netUpdate = true; + } + else + { + if ((double) this.ai[0] != 13.0) + return; + if ((double) this.ai[2] == 0.0) + SoundEngine.PlaySound(29, (int) center.X, (int) center.Y, 20); + this.velocity = this.velocity.RotatedBy(-(double) num18 * (double) this.direction); + this.rotation -= num18 * (float) this.direction; + ++this.ai[2]; + if ((double) this.ai[2] < (double) num14) + return; + this.ai[0] = 10f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + ++this.ai[3]; + this.netUpdate = true; + } + } + + private void AI_037_Destroyer() + { + if ((double) this.ai[3] > 0.0) + this.realLife = (int) this.ai[3]; + if (this.target < 0 || this.target == (int) byte.MaxValue || Main.player[this.target].dead) + this.TargetClosest(); + if (this.type >= 134 && this.type <= 136) + { + double num = (double) this.velocity.Length(); + if (this.type == 134 || this.type != 134 && Main.npc[(int) this.ai[1]].alpha < 128) + { + if (this.alpha != 0) + { + for (int index1 = 0; index1 < 2; ++index1) + { + int index2 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 182, Alpha: 100, Scale: 2f); + Main.dust[index2].noGravity = true; + Main.dust[index2].noLight = true; + } + } + this.alpha -= 42; + if (this.alpha < 0) + this.alpha = 0; + } + } + if (this.type > 134) + { + bool flag = false; + if ((double) this.ai[1] <= 0.0) + flag = true; + else if (Main.npc[(int) this.ai[1]].life <= 0) + flag = true; + if (flag) + { + this.life = 0; + this.HitEffect(); + this.checkDead(); + } + } + if (Main.netMode != 1) + { + if ((double) this.ai[0] == 0.0 && this.type == 134) + { + this.ai[3] = (float) this.whoAmI; + this.realLife = this.whoAmI; + int index3 = this.whoAmI; + int num = 80; + if (Main.getGoodWorld) + num *= 2; + for (int index4 = 0; index4 <= num; ++index4) + { + int Type = 135; + if (index4 == num) + Type = 136; + int number = NPC.NewNPC((int) ((double) this.position.X + (double) (this.width / 2)), (int) ((double) this.position.Y + (double) this.height), Type, this.whoAmI); + Main.npc[number].ai[3] = (float) this.whoAmI; + Main.npc[number].realLife = this.whoAmI; + Main.npc[number].ai[1] = (float) index3; + Main.npc[index3].ai[0] = (float) number; + NetMessage.SendData(23, number: number); + index3 = number; + } + } + if (this.type == 135) + { + this.localAI[0] += (float) Main.rand.Next(4); + if ((double) this.localAI[0] >= (double) Main.rand.Next(1400, 26000)) + { + this.localAI[0] = 0.0f; + this.TargetClosest(); + if (Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height)) + { + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) (this.height / 2)); + float num1 = Main.player[this.target].position.X + (float) Main.player[this.target].width * 0.5f - vector2.X + (float) Main.rand.Next(-20, 21); + float num2 = Main.player[this.target].position.Y + (float) Main.player[this.target].height * 0.5f - vector2.Y + (float) Main.rand.Next(-20, 21); + float num3 = (float) (8.0 / Math.Sqrt((double) num1 * (double) num1 + (double) num2 * (double) num2)); + float num4 = num1 * num3; + float num5 = num2 * num3; + float SpeedX = num4 + (float) Main.rand.Next(-20, 21) * 0.05f; + float SpeedY = num5 + (float) Main.rand.Next(-20, 21) * 0.05f; + int damageForProjectiles = this.GetAttackDamage_ForProjectiles(22f, 18f); + int Type = 100; + vector2.X += SpeedX * 5f; + vector2.Y += SpeedY * 5f; + int index = Projectile.NewProjectile(vector2.X, vector2.Y, SpeedX, SpeedY, Type, damageForProjectiles, 0.0f, Main.myPlayer); + Main.projectile[index].timeLeft = 300; + this.netUpdate = true; + } + } + } + } + int num6 = (int) ((double) this.position.X / 16.0) - 1; + int num7 = (int) (((double) this.position.X + (double) this.width) / 16.0) + 2; + int num8 = (int) ((double) this.position.Y / 16.0) - 1; + int num9 = (int) (((double) this.position.Y + (double) this.height) / 16.0) + 2; + if (num6 < 0) + num6 = 0; + if (num7 > Main.maxTilesX) + num7 = Main.maxTilesX; + if (num8 < 0) + num8 = 0; + if (num9 > Main.maxTilesY) + num9 = Main.maxTilesY; + bool flag1 = false; + if (!flag1) + { + for (int index5 = num6; index5 < num7; ++index5) + { + for (int index6 = num8; index6 < num9; ++index6) + { + if (Main.tile[index5, index6] != null && (Main.tile[index5, index6].nactive() && (Main.tileSolid[(int) Main.tile[index5, index6].type] || Main.tileSolidTop[(int) Main.tile[index5, index6].type] && Main.tile[index5, index6].frameY == (short) 0) || Main.tile[index5, index6].liquid > (byte) 64)) + { + Vector2 vector2; + vector2.X = (float) (index5 * 16); + vector2.Y = (float) (index6 * 16); + if ((double) this.position.X + (double) this.width > (double) vector2.X && (double) this.position.X < (double) vector2.X + 16.0 && (double) this.position.Y + (double) this.height > (double) vector2.Y && (double) this.position.Y < (double) vector2.Y + 16.0) + { + flag1 = true; + break; + } + } + } + } + } + if (!flag1) + { + if (this.type != 135 || (double) this.ai[2] != 1.0) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.3f, 0.1f, 0.05f); + this.localAI[1] = 1f; + if (this.type == 134) + { + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height); + int num10 = 1000; + bool flag2 = true; + if ((double) this.position.Y > (double) Main.player[this.target].position.Y) + { + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active) + { + Microsoft.Xna.Framework.Rectangle rectangle2 = new Microsoft.Xna.Framework.Rectangle((int) Main.player[index].position.X - num10, (int) Main.player[index].position.Y - num10, num10 * 2, num10 * 2); + if (rectangle1.Intersects(rectangle2)) + { + flag2 = false; + break; + } + } + } + if (flag2) + flag1 = true; + } + } + } + else + this.localAI[1] = 0.0f; + float num11 = 16f; + if (Main.dayTime || Main.player[this.target].dead) + { + flag1 = false; + ++this.velocity.Y; + if ((double) this.position.Y > Main.worldSurface * 16.0) + { + ++this.velocity.Y; + num11 = 32f; + } + if ((double) this.position.Y > Main.rockLayer * 16.0) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].aiStyle == this.aiStyle) + Main.npc[index].active = false; + } + } + } + float num12 = 0.1f; + float num13 = 0.15f; + if (Main.getGoodWorld) + { + num12 *= 1.2f; + num13 *= 1.2f; + } + Vector2 vector2_1 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num14 = Main.player[this.target].position.X + (float) (Main.player[this.target].width / 2); + float num15 = Main.player[this.target].position.Y + (float) (Main.player[this.target].height / 2); + float num16 = (float) ((int) ((double) num14 / 16.0) * 16); + float num17 = (float) ((int) ((double) num15 / 16.0) * 16); + vector2_1.X = (float) ((int) ((double) vector2_1.X / 16.0) * 16); + vector2_1.Y = (float) ((int) ((double) vector2_1.Y / 16.0) * 16); + float num18 = num16 - vector2_1.X; + float num19 = num17 - vector2_1.Y; + float num20 = (float) Math.Sqrt((double) num18 * (double) num18 + (double) num19 * (double) num19); + if ((double) this.ai[1] > 0.0) + { + if ((double) this.ai[1] < (double) Main.npc.Length) + { + try + { + Vector2 vector2_2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + num18 = Main.npc[(int) this.ai[1]].position.X + (float) (Main.npc[(int) this.ai[1]].width / 2) - vector2_2.X; + num19 = Main.npc[(int) this.ai[1]].position.Y + (float) (Main.npc[(int) this.ai[1]].height / 2) - vector2_2.Y; + } + catch + { + } + this.rotation = (float) Math.Atan2((double) num19, (double) num18) + 1.57f; + float num21 = (float) Math.Sqrt((double) num18 * (double) num18 + (double) num19 * (double) num19); + int num22 = (int) (44.0 * (double) this.scale); + float num23 = (num21 - (float) num22) / num21; + float num24 = num18 * num23; + float num25 = num19 * num23; + this.velocity = Vector2.Zero; + this.position.X += num24; + this.position.Y += num25; + return; + } + } + if (!flag1) + { + this.TargetClosest(); + this.velocity.Y += 0.15f; + if ((double) this.velocity.Y > (double) num11) + this.velocity.Y = num11; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < (double) num11 * 0.4) + { + if ((double) this.velocity.X < 0.0) + this.velocity.X -= num12 * 1.1f; + else + this.velocity.X += num12 * 1.1f; + } + else if ((double) this.velocity.Y == (double) num11) + { + if ((double) this.velocity.X < (double) num18) + this.velocity.X += num12; + else if ((double) this.velocity.X > (double) num18) + this.velocity.X -= num12; + } + else if ((double) this.velocity.Y > 4.0) + { + if ((double) this.velocity.X < 0.0) + this.velocity.X += num12 * 0.9f; + else + this.velocity.X -= num12 * 0.9f; + } + } + else + { + if (this.soundDelay == 0) + { + float num26 = num20 / 40f; + if ((double) num26 < 10.0) + num26 = 10f; + if ((double) num26 > 20.0) + num26 = 20f; + this.soundDelay = (int) num26; + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y); + } + float num27 = (float) Math.Sqrt((double) num18 * (double) num18 + (double) num19 * (double) num19); + float num28 = Math.Abs(num18); + float num29 = Math.Abs(num19); + float num30 = num11 / num27; + float num31 = num18 * num30; + float num32 = num19 * num30; + if (((double) this.velocity.X > 0.0 && (double) num31 > 0.0 || (double) this.velocity.X < 0.0 && (double) num31 < 0.0) && ((double) this.velocity.Y > 0.0 && (double) num32 > 0.0 || (double) this.velocity.Y < 0.0 && (double) num32 < 0.0)) + { + if ((double) this.velocity.X < (double) num31) + this.velocity.X += num13; + else if ((double) this.velocity.X > (double) num31) + this.velocity.X -= num13; + if ((double) this.velocity.Y < (double) num32) + this.velocity.Y += num13; + else if ((double) this.velocity.Y > (double) num32) + this.velocity.Y -= num13; + } + if ((double) this.velocity.X > 0.0 && (double) num31 > 0.0 || (double) this.velocity.X < 0.0 && (double) num31 < 0.0 || (double) this.velocity.Y > 0.0 && (double) num32 > 0.0 || (double) this.velocity.Y < 0.0 && (double) num32 < 0.0) + { + if ((double) this.velocity.X < (double) num31) + this.velocity.X += num12; + else if ((double) this.velocity.X > (double) num31) + this.velocity.X -= num12; + if ((double) this.velocity.Y < (double) num32) + this.velocity.Y += num12; + else if ((double) this.velocity.Y > (double) num32) + this.velocity.Y -= num12; + if ((double) Math.Abs(num32) < (double) num11 * 0.2 && ((double) this.velocity.X > 0.0 && (double) num31 < 0.0 || (double) this.velocity.X < 0.0 && (double) num31 > 0.0)) + { + if ((double) this.velocity.Y > 0.0) + this.velocity.Y += num12 * 2f; + else + this.velocity.Y -= num12 * 2f; + } + if ((double) Math.Abs(num31) < (double) num11 * 0.2 && ((double) this.velocity.Y > 0.0 && (double) num32 < 0.0 || (double) this.velocity.Y < 0.0 && (double) num32 > 0.0)) + { + if ((double) this.velocity.X > 0.0) + this.velocity.X += num12 * 2f; + else + this.velocity.X -= num12 * 2f; + } + } + else if ((double) num28 > (double) num29) + { + if ((double) this.velocity.X < (double) num31) + this.velocity.X += num12 * 1.1f; + else if ((double) this.velocity.X > (double) num31) + this.velocity.X -= num12 * 1.1f; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < (double) num11 * 0.5) + { + if ((double) this.velocity.Y > 0.0) + this.velocity.Y += num12; + else + this.velocity.Y -= num12; + } + } + else + { + if ((double) this.velocity.Y < (double) num32) + this.velocity.Y += num12 * 1.1f; + else if ((double) this.velocity.Y > (double) num32) + this.velocity.Y -= num12 * 1.1f; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < (double) num11 * 0.5) + { + if ((double) this.velocity.X > 0.0) + this.velocity.X += num12; + else + this.velocity.X -= num12; + } + } + } + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.57f; + if (this.type != 134) + return; + if (flag1) + { + if ((double) this.localAI[0] != 1.0) + this.netUpdate = true; + this.localAI[0] = 1f; + } + else + { + if ((double) this.localAI[0] != 0.0) + this.netUpdate = true; + this.localAI[0] = 0.0f; + } + if (((double) this.velocity.X <= 0.0 || (double) this.oldVelocity.X >= 0.0) && ((double) this.velocity.X >= 0.0 || (double) this.oldVelocity.X <= 0.0) && ((double) this.velocity.Y <= 0.0 || (double) this.oldVelocity.Y >= 0.0) && ((double) this.velocity.Y >= 0.0 || (double) this.oldVelocity.Y <= 0.0) || this.justHit) + return; + this.netUpdate = true; + } + + private void AI_005_EaterOfSouls() + { + if (this.type == 210 || this.type == 211) + NPCUtils.TargetClosestNonBees(this); + else if (this.target < 0 || this.target <= (int) byte.MaxValue || Main.player[this.target].dead) + this.TargetClosest(); + if (this.type == 619) + { + if (Main.dayTime) + { + this.velocity.Y -= 0.3f; + this.EncourageDespawn(60); + } + this.position = this.position + this.netOffset; + if (this.alpha == (int) byte.MaxValue) + { + this.spriteDirection = this.direction; + this.velocity.Y = -6f; + for (int index = 0; index < 35; ++index) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 5); + dust.velocity *= 1f; + dust.scale = (float) (1.0 + (double) Main.rand.NextFloat() * 0.5); + dust.fadeIn = (float) (1.5 + (double) Main.rand.NextFloat() * 0.5); + dust.velocity += this.velocity * 0.5f; + } + } + this.alpha -= 15; + if (this.alpha < 0) + this.alpha = 0; + if (this.alpha != 0) + { + for (int index = 0; index < 2; ++index) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 5); + dust.velocity *= 1f; + dust.scale = (float) (1.0 + (double) Main.rand.NextFloat() * 0.5); + dust.fadeIn = (float) (1.5 + (double) Main.rand.NextFloat() * 0.5); + dust.velocity += this.velocity * 0.3f; + } + } + this.position = this.position - this.netOffset; + } + NPCAimedTarget targetData = this.GetTargetData(); + bool flag1 = false; + if (targetData.Type == NPCTargetType.Player) + flag1 = Main.player[this.target].dead; + float num1 = 6f; + float num2 = 0.05f; + if (this.type == 6 || this.type == 173) + { + num1 = 4f; + num2 = 0.02f; + if (this.type == 6 && Main.expertMode) + num2 = 0.035f; + } + else if (this.type == 94) + { + num1 = 4.2f; + num2 = 0.022f; + } + else if (this.type == 619) + { + num1 = 6f; + num2 = 0.1f; + } + else if (this.type == 252) + { + if (targetData.Type != NPCTargetType.None && Collision.CanHit((Entity) this, targetData)) + { + num1 = 6f; + num2 = 0.1f; + } + else + { + num2 = 0.01f; + num1 = 2f; + } + } + else if (this.type == 42 || this.type >= 231 && this.type <= 235) + { + float num3 = 3.5f; + float num4 = 0.021f; + if (this.type == 231) + { + num3 = 3f; + num4 = 0.017f; + } + num1 = num3 * (1f - this.scale); + num2 = num4 * (1f - this.scale); + if ((double) this.position.Y / 16.0 < Main.worldSurface) + { + if ((double) Main.player[this.target].position.Y - (double) this.position.Y > 300.0 && (double) this.velocity.Y < 0.0) + this.velocity.Y *= 0.97f; + if ((double) Main.player[this.target].position.Y - (double) this.position.Y < 80.0 && (double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.97f; + } + } + else if (this.type == 205) + { + num1 = 3.25f; + num2 = 0.018f; + } + else if (this.type == 176) + { + num1 = 4f; + num2 = 0.017f; + } + else if (this.type == 23) + { + num1 = 1f; + num2 = 0.03f; + } + else if (this.type == 5) + { + num1 = 5f; + num2 = 0.03f; + } + else if (this.type == 210 || this.type == 211) + { + ++this.ai[1]; + float num5 = (float) (((double) this.ai[1] - 60.0) / 60.0); + if ((double) num5 > 1.0) + { + num5 = 1f; + } + else + { + if ((double) this.velocity.X > 6.0) + this.velocity.X = 6f; + if ((double) this.velocity.X < -6.0) + this.velocity.X = -6f; + if ((double) this.velocity.Y > 6.0) + this.velocity.Y = 6f; + if ((double) this.velocity.Y < -6.0) + this.velocity.Y = -6f; + } + num1 = 5f; + num2 = 0.1f * num5; + } + Vector2 vector2_1 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num6 = targetData.Position.X + (float) (targetData.Width / 2); + float num7 = targetData.Position.Y + (float) (targetData.Height / 2); + float num8 = (float) ((int) ((double) num6 / 8.0) * 8); + float num9 = (float) ((int) ((double) num7 / 8.0) * 8); + vector2_1.X = (float) ((int) ((double) vector2_1.X / 8.0) * 8); + vector2_1.Y = (float) ((int) ((double) vector2_1.Y / 8.0) * 8); + float num10 = num8 - vector2_1.X; + float num11 = num9 - vector2_1.Y; + float num12 = (float) Math.Sqrt((double) num10 * (double) num10 + (double) num11 * (double) num11); + float num13 = num12; + bool flag2 = false; + if ((double) num12 > 600.0) + flag2 = true; + float SpeedX1; + float SpeedY1; + if ((double) num12 == 0.0) + { + SpeedX1 = this.velocity.X; + SpeedY1 = this.velocity.Y; + } + else + { + float num14 = num1 / num12; + SpeedX1 = num10 * num14; + SpeedY1 = num11 * num14; + } + int num15 = this.type == 6 || this.type == 139 || this.type == 173 ? 1 : (this.type == 205 ? 1 : 0); + bool flag3 = this.type == 42 || this.type == 94 || this.type == 619 || this.type == 176 || this.type == 210 || this.type == 211 || this.type >= 231 && this.type <= 235; + bool flag4 = this.type != 173 && this.type != 6 && this.type != 42 && (this.type < 231 || this.type > 235) && this.type != 94 && this.type != 139 && this.type != 619; + int num16 = flag3 ? 1 : 0; + if ((num15 | num16) != 0) + { + if ((double) num13 > 100.0 | flag3) + { + ++this.ai[0]; + if ((double) this.ai[0] > 0.0) + this.velocity.Y += 23f / 1000f; + else + this.velocity.Y -= 23f / 1000f; + if ((double) this.ai[0] < -100.0 || (double) this.ai[0] > 100.0) + this.velocity.X += 23f / 1000f; + else + this.velocity.X -= 23f / 1000f; + if ((double) this.ai[0] > 200.0) + this.ai[0] = -200f; + } + if ((double) num13 < 150.0 && (this.type == 6 || this.type == 94 || this.type == 173 || this.type == 619)) + { + this.velocity.X += SpeedX1 * 0.007f; + this.velocity.Y += SpeedY1 * 0.007f; + } + } + if (flag1) + { + SpeedX1 = (float) ((double) this.direction * (double) num1 / 2.0); + SpeedY1 = (float) (-(double) num1 / 2.0); + } + else if (this.type == 619 && (double) this.Center.Y > (double) targetData.Center.Y - 200.0) + this.velocity.Y -= 0.3f; + if ((double) this.velocity.X < (double) SpeedX1) + { + this.velocity.X += num2; + if (flag4 && (double) this.velocity.X < 0.0 && (double) SpeedX1 > 0.0) + this.velocity.X += num2; + } + else if ((double) this.velocity.X > (double) SpeedX1) + { + this.velocity.X -= num2; + if (flag4 && (double) this.velocity.X > 0.0 && (double) SpeedX1 < 0.0) + this.velocity.X -= num2; + } + if ((double) this.velocity.Y < (double) SpeedY1) + { + this.velocity.Y += num2; + if (flag4 && (double) this.velocity.Y < 0.0 && (double) SpeedY1 > 0.0) + this.velocity.Y += num2; + } + else if ((double) this.velocity.Y > (double) SpeedY1) + { + this.velocity.Y -= num2; + if (flag4 && (double) this.velocity.Y > 0.0 && (double) SpeedY1 < 0.0) + this.velocity.Y -= num2; + } + if (this.type == 23) + { + if ((double) SpeedX1 > 0.0) + { + this.spriteDirection = 1; + this.rotation = (float) Math.Atan2((double) SpeedY1, (double) SpeedX1); + } + else if ((double) SpeedX1 < 0.0) + { + this.spriteDirection = -1; + this.rotation = (float) Math.Atan2((double) SpeedY1, (double) SpeedX1) + 3.14f; + } + } + else if (this.type == 139) + { + ++this.localAI[0]; + if (this.justHit) + this.localAI[0] = 0.0f; + if (Main.netMode != 1 && (double) this.localAI[0] >= 120.0) + { + this.localAI[0] = 0.0f; + if (targetData.Type != NPCTargetType.None && Collision.CanHit((Entity) this, targetData)) + { + int damageForProjectiles = this.GetAttackDamage_ForProjectiles(25f, 22f); + int Type = 84; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX1, SpeedY1, Type, damageForProjectiles, 0.0f, Main.myPlayer); + } + } + if (!WorldGen.SolidTile(((int) this.position.X + this.width / 2) / 16, ((int) this.position.Y + this.height / 2) / 16)) + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 0.3f, 0.1f, 0.05f); + if ((double) SpeedX1 > 0.0) + { + this.spriteDirection = 1; + this.rotation = (float) Math.Atan2((double) SpeedY1, (double) SpeedX1); + } + if ((double) SpeedX1 < 0.0) + { + this.spriteDirection = -1; + this.rotation = (float) Math.Atan2((double) SpeedY1, (double) SpeedX1) + 3.14f; + } + } + else if (this.type == 6 || this.type == 94 || this.type == 173 || this.type == 619) + this.rotation = (float) Math.Atan2((double) SpeedY1, (double) SpeedX1) - 1.57f; + else if (this.type == 42 || this.type == 176 || this.type == 205 || this.type >= 231 && this.type <= 235) + { + if ((double) this.velocity.X > 0.0) + this.spriteDirection = 1; + if ((double) this.velocity.X < 0.0) + this.spriteDirection = -1; + this.rotation = this.velocity.X * 0.1f; + } + else + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) - 1.57f; + if (this.type == 6 || this.type == 619 || this.type == 23 || this.type == 42 || this.type == 94 || this.type == 139 || this.type == 173 || this.type == 176 || this.type == 205 || this.type == 210 || this.type == 211 || this.type >= 231 && this.type <= 235) + { + float num17 = 0.7f; + if (this.type == 6 || this.type == 173) + num17 = 0.4f; + if (this.collideX) + { + this.netUpdate = true; + this.velocity.X = this.oldVelocity.X * -num17; + if (this.direction == -1 && (double) this.velocity.X > 0.0 && (double) this.velocity.X < 2.0) + this.velocity.X = 2f; + if (this.direction == 1 && (double) this.velocity.X < 0.0 && (double) this.velocity.X > -2.0) + this.velocity.X = -2f; + } + if (this.collideY) + { + this.netUpdate = true; + this.velocity.Y = this.oldVelocity.Y * -num17; + if ((double) this.velocity.Y > 0.0 && (double) this.velocity.Y < 1.5) + this.velocity.Y = 2f; + if ((double) this.velocity.Y < 0.0 && (double) this.velocity.Y > -1.5) + this.velocity.Y = -2f; + } + this.position = this.position + this.netOffset; + if (this.type == 619) + { + int index = Dust.NewDust(this.position, this.width, this.height, 5, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 100); + Main.dust[index].velocity *= 0.5f; + } + else if (this.type != 42 && this.type != 139 && this.type != 176 && this.type != 205 && this.type != 210 && this.type != 211 && this.type != 252 && (this.type < 231 || this.type > 235) && Main.rand.Next(20) == 0) + { + int Type = 18; + if (this.type == 173) + Type = 5; + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y + (float) this.height * 0.25f), this.width, (int) ((double) this.height * 0.5), Type, this.velocity.X, 2f, 75, this.color, this.scale); + Main.dust[index].velocity.X *= 0.5f; + Main.dust[index].velocity.Y *= 0.1f; + } + this.position = this.position - this.netOffset; + } + else if (this.type != 252 && Main.rand.Next(40) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y + (float) this.height * 0.25f), this.width, (int) ((double) this.height * 0.5), 5, this.velocity.X, 2f); + Main.dust[index].velocity.X *= 0.5f; + Main.dust[index].velocity.Y *= 0.1f; + } + if ((this.type == 6 || this.type == 94 || this.type == 173 || this.type == 619) && this.wet) + { + if ((double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.95f; + this.velocity.Y -= 0.3f; + if ((double) this.velocity.Y < -2.0) + this.velocity.Y = -2f; + } + if (this.type == 205 && this.wet) + { + if ((double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.95f; + this.velocity.Y -= 0.5f; + if ((double) this.velocity.Y < -4.0) + this.velocity.Y = -4f; + this.TargetClosest(); + } + if (this.type == 42 || this.type == 176 || this.type >= 231 && this.type <= 235) + { + if (this.wet) + { + if ((double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.95f; + this.velocity.Y -= 0.5f; + if ((double) this.velocity.Y < -4.0) + this.velocity.Y = -4f; + this.TargetClosest(); + } + if ((double) this.ai[1] == 101.0) + { + SoundEngine.PlaySound(SoundID.Item17, this.position); + this.ai[1] = 0.0f; + } + if (Main.netMode != 1) + { + this.ai[1] += (float) Main.rand.Next(5, 20) * 0.1f * this.scale; + if (this.type == 176) + this.ai[1] += (float) Main.rand.Next(5, 20) * 0.1f * this.scale; + if (targetData.Type == NPCTargetType.Player) + { + Player player = Main.player[this.target]; + if (player != null && (double) player.stealth == 0.0 && player.itemAnimation == 0) + this.ai[1] = 0.0f; + } + if ((double) this.ai[1] >= 130.0) + { + if (targetData.Type != NPCTargetType.None && Collision.CanHit((Entity) this, targetData)) + { + float num18 = 8f; + Vector2 vector2_2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) (this.height / 2)); + float num19 = targetData.Center.X - vector2_2.X + (float) Main.rand.Next(-20, 21); + float num20 = targetData.Center.Y - vector2_2.Y + (float) Main.rand.Next(-20, 21); + if ((double) num19 < 0.0 && (double) this.velocity.X < 0.0 || (double) num19 > 0.0 && (double) this.velocity.X > 0.0) + { + float num21 = (float) Math.Sqrt((double) num19 * (double) num19 + (double) num20 * (double) num20); + float num22 = num18 / num21; + float SpeedX2 = num19 * num22; + float SpeedY2 = num20 * num22; + int Damage = (int) (10.0 * (double) this.scale); + if (this.type == 176) + Damage = (int) (30.0 * (double) this.scale); + int Type = 55; + int index = Projectile.NewProjectile(vector2_2.X, vector2_2.Y, SpeedX2, SpeedY2, Type, Damage, 0.0f, Main.myPlayer); + Main.projectile[index].timeLeft = 300; + this.ai[1] = 101f; + this.netUpdate = true; + } + else + this.ai[1] = 0.0f; + } + else + this.ai[1] = 0.0f; + } + } + } + if (this.type == 139 & flag2) + { + if ((double) this.velocity.X > 0.0 && (double) SpeedX1 > 0.0 || (double) this.velocity.X < 0.0 && (double) SpeedX1 < 0.0) + { + if ((double) Math.Abs(this.velocity.X) < 12.0) + this.velocity.X *= 1.05f; + } + else + this.velocity.X *= 0.9f; + } + if (Main.netMode != 1) + { + if (this.type == 94 && !flag1) + { + if (this.justHit) + this.localAI[0] = 0.0f; + ++this.localAI[0]; + if ((double) this.localAI[0] == 180.0) + { + if (targetData.Type != NPCTargetType.None && Collision.CanHit((Entity) this, targetData)) + NPC.NewNPC((int) ((double) this.position.X + (double) (this.width / 2) + (double) this.velocity.X), (int) ((double) this.position.Y + (double) (this.height / 2) + (double) this.velocity.Y), 112); + this.localAI[0] = 0.0f; + } + } + if (this.type == 619 && !flag1) + { + if (this.justHit) + this.localAI[0] += 10f; + ++this.localAI[0]; + if ((double) this.localAI[0] >= 120.0) + { + if (targetData.Type != NPCTargetType.None && Collision.CanHit((Entity) this, targetData)) + { + if ((double) (this.Center - targetData.Center).Length() < 400.0) + { + this.velocity = -this.DirectionTo(new Vector2(targetData.Center.X, targetData.Position.Y)) * 5f; + this.netUpdate = true; + this.localAI[0] = 0.0f; + Projectile.NewProjectile(this.Center, this.DirectionTo(new Vector2(targetData.Center.X + (float) Main.rand.Next(-100, 101), targetData.Position.Y + (float) Main.rand.Next(-100, 101))) * 15f, 811, 50, 1f, Main.myPlayer); + } + else + this.localAI[0] = 50f; + } + else + this.localAI[0] = 50f; + } + } + } + if (((!Main.dayTime || this.type == 173 || this.type == 619 || this.type == 6 || this.type == 23 || this.type == 42 || this.type == 94 || this.type == 176 || this.type == 205 || this.type == 210 || this.type == 211 || this.type == 252 ? 0 : (this.type < 231 ? 1 : (this.type > 235 ? 1 : 0))) | (flag1 ? 1 : 0)) != 0) + { + this.velocity.Y -= num2 * 2f; + this.EncourageDespawn(10); + } + if (((double) this.velocity.X <= 0.0 || (double) this.oldVelocity.X >= 0.0) && ((double) this.velocity.X >= 0.0 || (double) this.oldVelocity.X <= 0.0) && ((double) this.velocity.Y <= 0.0 || (double) this.oldVelocity.Y >= 0.0) && ((double) this.velocity.Y >= 0.0 || (double) this.oldVelocity.Y <= 0.0) || this.justHit) + return; + this.netUpdate = true; + } + + public void CopyInteractions(NPC npc) + { + for (int index = 0; index < this.playerInteraction.Length; ++index) + this.playerInteraction[index] = npc.playerInteraction[index]; + this.lastInteraction = npc.lastInteraction; + } + + public static int GetEaterOfWorldsSegmentsCount() => !Main.expertMode ? 65 : 70; + + public static int GetEaterOfWorldsSegmentsCountByGamemode(int gamemode) + { + GameModeData gameModeData; + return !Main.RegisterdGameModes.TryGetValue(gamemode, out gameModeData) || !gameModeData.IsExpertMode ? 65 : 70; + } + + public static int GetBrainOfCthuluCreepersCount() => Main.getGoodWorld ? 40 : 20; + + private void AI_006_Worms() + { + if (this.type == 117 && (double) this.localAI[1] == 0.0) + { + this.localAI[1] = 1f; + SoundEngine.PlaySound(SoundID.NPCDeath13, this.position); + int num = 1; + if ((double) this.velocity.X < 0.0) + num = -1; + for (int index = 0; index < 20; ++index) + Dust.NewDust(new Vector2(this.position.X - 20f, this.position.Y - 20f), this.width + 40, this.height + 40, 5, (float) (num * 8), -1f); + } + if (this.type == 454 && (double) this.localAI[3] == 0.0) + { + SoundEngine.PlaySound(SoundID.Item119, this.position); + this.localAI[3] = 1f; + } + if (this.type >= 454 && this.type <= 459) + { + this.dontTakeDamage = this.alpha > 0; + if (this.type == 454 || this.type != 454 && Main.npc[(int) this.ai[1]].alpha < 85) + { + if (this.dontTakeDamage) + { + for (int index1 = 0; index1 < 2; ++index1) + { + int index2 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 228, Alpha: 100, Scale: 2f); + Main.dust[index2].noGravity = true; + Main.dust[index2].noLight = true; + } + } + this.alpha -= 42; + if (this.alpha < 0) + this.alpha = 0; + } + } + if (this.type >= 621 && this.type <= 623) + { + this.position = this.position + this.netOffset; + this.dontTakeDamage = this.alpha > 0; + if (this.type == 621 || this.type != 621 && Main.npc[(int) this.ai[1]].alpha < 85) + { + if (this.dontTakeDamage) + { + for (int index = 0; index < 2; ++index) + Dust.NewDust(this.position, this.width, this.height, 5, Alpha: 100); + } + this.alpha -= 42; + if (this.alpha < 0) + this.alpha = 0; + } + if (this.alpha == 0 && Main.rand.Next(5) == 0) + Dust.NewDust(this.position, this.width, this.height, 5, Alpha: 100); + this.position = this.position - this.netOffset; + } + else if (this.type == 402 && (double) this.ai[1] == 0.0) + { + this.ai[1] = (float) Main.rand.Next(-2, 0); + this.netUpdate = true; + } + if (Main.netMode != 1 && Main.expertMode) + { + if (this.type == 14 && ((double) this.position.Y / 16.0 < Main.worldSurface || Main.getGoodWorld)) + { + int x = (int) ((double) this.Center.X / 16.0); + int y = (int) ((double) this.Center.Y / 16.0); + if (WorldGen.InWorld(x, y) && Main.tile[x, y].wall == (ushort) 0 && Main.rand.Next(900) == 0) + { + this.TargetClosest(); + if (Collision.CanHitLine(this.Center, 1, 1, Main.player[this.target].Center, 1, 1)) + NPC.NewNPC((int) ((double) this.position.X + (double) (this.width / 2) + (double) this.velocity.X), (int) ((double) this.position.Y + (double) (this.height / 2) + (double) this.velocity.Y), 112, ai1: 1f); + } + } + else if (this.type == 13) + { + int maxValue = 90 + (int) ((double) this.life / (double) this.lifeMax * 60.0 * 5.0); + if (Main.rand.Next(maxValue) == 0) + { + this.TargetClosest(); + if (Collision.CanHitLine(this.Center, 1, 1, Main.player[this.target].Center, 1, 1)) + NPC.NewNPC((int) ((double) this.position.X + (double) (this.width / 2) + (double) this.velocity.X), (int) ((double) this.position.Y + (double) (this.height / 2) + (double) this.velocity.Y), 112, ai1: 1f); + } + } + } + bool flag1 = false; + float num1 = 0.2f; + switch (this.type) + { + case 10: + case 39: + case 95: + case 117: + case 510: + flag1 = true; + break; + case 513: + flag1 = !Main.player[this.target].ZoneUndergroundDesert; + num1 = 0.1f; + break; + case 621: + flag1 = false; + break; + } + if (this.type >= 13 && this.type <= 15) + this.realLife = -1; + else if ((double) this.ai[3] > 0.0) + this.realLife = (int) this.ai[3]; + if (this.target < 0 || this.target == (int) byte.MaxValue || Main.player[this.target].dead || flag1 && (double) Main.player[this.target].position.Y < Main.worldSurface * 16.0) + this.TargetClosest(); + if (Main.player[this.target].dead || flag1 && (double) Main.player[this.target].position.Y < Main.worldSurface * 16.0) + { + this.EncourageDespawn(300); + if (flag1) + this.velocity.Y += num1; + } + if (this.type == 621 && Main.dayTime) + { + this.EncourageDespawn(60); + ++this.velocity.Y; + } + if (Main.netMode != 1) + { + if (this.type == 87 && (double) this.ai[0] == 0.0) + { + this.ai[3] = (float) this.whoAmI; + this.realLife = this.whoAmI; + int index3 = this.whoAmI; + for (int index4 = 0; index4 < 14; ++index4) + { + int Type = 89; + if (index4 == 1 || index4 == 8) + { + Type = 88; + } + else + { + switch (index4) + { + case 11: + Type = 90; + break; + case 12: + Type = 91; + break; + case 13: + Type = 92; + break; + } + } + int number = NPC.NewNPC((int) ((double) this.position.X + (double) (this.width / 2)), (int) ((double) this.position.Y + (double) this.height), Type, this.whoAmI); + Main.npc[number].ai[3] = (float) this.whoAmI; + Main.npc[number].realLife = this.whoAmI; + Main.npc[number].ai[1] = (float) index3; + Main.npc[number].CopyInteractions(this); + Main.npc[index3].ai[0] = (float) number; + NetMessage.SendData(23, number: number); + index3 = number; + } + } + if (this.type == 454 && (double) this.ai[0] == 0.0) + { + this.ai[3] = (float) this.whoAmI; + this.realLife = this.whoAmI; + int index5 = this.whoAmI; + for (int index6 = 0; index6 < 30; ++index6) + { + int Type = 456; + if ((index6 - 2) % 4 == 0 && index6 < 26) + { + Type = 455; + } + else + { + switch (index6) + { + case 27: + Type = 457; + break; + case 28: + Type = 458; + break; + case 29: + Type = 459; + break; + } + } + int number = NPC.NewNPC((int) ((double) this.position.X + (double) (this.width / 2)), (int) ((double) this.position.Y + (double) this.height), Type, this.whoAmI); + Main.npc[number].ai[3] = (float) this.whoAmI; + Main.npc[number].realLife = this.whoAmI; + Main.npc[number].ai[1] = (float) index5; + Main.npc[number].CopyInteractions(this); + Main.npc[index5].ai[0] = (float) number; + NetMessage.SendData(23, number: number); + index5 = number; + } + } + if (this.type == 513 && (double) this.ai[0] == 0.0) + { + this.ai[3] = (float) this.whoAmI; + this.realLife = this.whoAmI; + int index7 = this.whoAmI; + int num2 = Main.rand.Next(6, 10); + for (int index8 = 0; index8 < num2; ++index8) + { + int Type = 514; + if (index8 == num2 - 1) + Type = 515; + int number = NPC.NewNPC((int) ((double) this.position.X + (double) (this.width / 2)), (int) ((double) this.position.Y + (double) this.height), Type, this.whoAmI); + Main.npc[number].ai[3] = (float) this.whoAmI; + Main.npc[number].realLife = this.whoAmI; + Main.npc[number].ai[1] = (float) index7; + Main.npc[number].CopyInteractions(this); + Main.npc[index7].ai[0] = (float) number; + NetMessage.SendData(23, number: number); + index7 = number; + } + } + if (this.type == 510 && (double) this.ai[0] == 0.0) + { + this.ai[3] = (float) this.whoAmI; + this.realLife = this.whoAmI; + int index9 = this.whoAmI; + int num3 = Main.rand.Next(12, 21); + for (int index10 = 0; index10 < num3; ++index10) + { + int Type = 511; + if (index10 == num3 - 1) + Type = 512; + int number = NPC.NewNPC((int) ((double) this.position.X + (double) (this.width / 2)), (int) ((double) this.position.Y + (double) this.height), Type, this.whoAmI); + Main.npc[number].ai[3] = (float) this.whoAmI; + Main.npc[number].realLife = this.whoAmI; + Main.npc[number].ai[1] = (float) index9; + Main.npc[number].CopyInteractions(this); + Main.npc[index9].ai[0] = (float) number; + NetMessage.SendData(23, number: number); + index9 = number; + } + } + if (this.type == 621 && (double) this.ai[0] == 0.0) + { + this.ai[3] = (float) this.whoAmI; + this.realLife = this.whoAmI; + int index11 = this.whoAmI; + int num4 = 16; + for (int index12 = 0; index12 < num4; ++index12) + { + int Type = 622; + if (index12 == num4 - 1) + Type = 623; + int number = NPC.NewNPC((int) ((double) this.position.X + (double) (this.width / 2)), (int) ((double) this.position.Y + (double) this.height), Type, this.whoAmI); + Main.npc[number].ai[3] = (float) this.whoAmI; + Main.npc[number].realLife = this.whoAmI; + Main.npc[number].ai[1] = (float) index11; + Main.npc[number].CopyInteractions(this); + Main.npc[index11].ai[0] = (float) number; + NetMessage.SendData(23, number: number); + index11 = number; + } + } + else if ((this.type == 7 || this.type == 8 || this.type == 10 || this.type == 11 || this.type == 13 || this.type == 14 || this.type == 39 || this.type == 40 || this.type == 95 || this.type == 96 || this.type == 98 || this.type == 99 || this.type == 117 || this.type == 118) && (double) this.ai[0] == 0.0) + { + if (this.type == 7 || this.type == 10 || this.type == 13 || this.type == 39 || this.type == 95 || this.type == 98 || this.type == 117) + { + if (this.type < 13 || this.type > 15) + { + this.ai[3] = (float) this.whoAmI; + this.realLife = this.whoAmI; + } + this.ai[2] = (float) Main.rand.Next(8, 13); + if (this.type == 10) + this.ai[2] = (float) Main.rand.Next(4, 7); + if (this.type == 13) + this.ai[2] = (float) NPC.GetEaterOfWorldsSegmentsCount(); + if (this.type == 39) + this.ai[2] = (float) Main.rand.Next(12, 19); + if (this.type == 95) + this.ai[2] = (float) Main.rand.Next(6, 12); + if (this.type == 98) + this.ai[2] = (float) Main.rand.Next(20, 26); + if (this.type == 117) + this.ai[2] = (float) Main.rand.Next(3, 6); + this.ai[0] = (float) NPC.NewNPC((int) ((double) this.position.X + (double) (this.width / 2)), (int) ((double) this.position.Y + (double) this.height), this.type + 1, this.whoAmI); + Main.npc[(int) this.ai[0]].CopyInteractions(this); + } + else if ((this.type == 8 || this.type == 11 || this.type == 14 || this.type == 40 || this.type == 96 || this.type == 99 || this.type == 118) && (double) this.ai[2] > 0.0) + { + this.ai[0] = (float) NPC.NewNPC((int) ((double) this.position.X + (double) (this.width / 2)), (int) ((double) this.position.Y + (double) this.height), this.type, this.whoAmI); + Main.npc[(int) this.ai[0]].CopyInteractions(this); + } + else + { + this.ai[0] = (float) NPC.NewNPC((int) ((double) this.position.X + (double) (this.width / 2)), (int) ((double) this.position.Y + (double) this.height), this.type + 1, this.whoAmI); + Main.npc[(int) this.ai[0]].CopyInteractions(this); + } + if (this.type < 13 || this.type > 15) + { + Main.npc[(int) this.ai[0]].ai[3] = this.ai[3]; + Main.npc[(int) this.ai[0]].realLife = this.realLife; + } + Main.npc[(int) this.ai[0]].ai[1] = (float) this.whoAmI; + Main.npc[(int) this.ai[0]].ai[2] = this.ai[2] - 1f; + this.netUpdate = true; + } + if (this.type == 412 && (double) this.ai[0] == 0.0) + { + this.ai[3] = (float) this.whoAmI; + this.realLife = this.whoAmI; + int index13 = this.whoAmI; + int num5 = 30; + for (int index14 = 0; index14 < num5; ++index14) + { + int Type = 413; + if (index14 == num5 - 1) + Type = 414; + int number = NPC.NewNPC((int) ((double) this.position.X + (double) (this.width / 2)), (int) ((double) this.position.Y + (double) this.height), Type, this.whoAmI); + Main.npc[number].ai[3] = (float) this.whoAmI; + Main.npc[number].realLife = this.whoAmI; + Main.npc[number].ai[1] = (float) index13; + Main.npc[number].CopyInteractions(this); + Main.npc[index13].ai[0] = (float) number; + NetMessage.SendData(23, number: number); + index13 = number; + } + } + switch (this.type) + { + case 8: + case 9: + case 11: + case 12: + case 40: + case 41: + case 88: + case 89: + case 90: + case 91: + case 92: + case 96: + case 97: + case 99: + case 100: + case 118: + case 119: + case 413: + case 414: + case 455: + case 456: + case 457: + case 458: + case 459: + case 511: + case 512: + case 514: + case 515: + case 622: + case 623: + if (!Main.npc[(int) this.ai[1]].active || Main.npc[(int) this.ai[1]].aiStyle != this.aiStyle) + { + this.life = 0; + this.HitEffect(); + this.active = false; + NetMessage.SendData(28, number: this.whoAmI, number2: -1f); + break; + } + break; + } + switch (this.type) + { + case 7: + case 8: + case 10: + case 11: + case 39: + case 40: + case 87: + case 88: + case 89: + case 90: + case 91: + case 95: + case 96: + case 98: + case 99: + case 117: + case 118: + case 412: + case 413: + case 454: + case 455: + case 456: + case 457: + case 458: + case 510: + case 511: + case 513: + case 514: + case 621: + case 622: + if (!Main.npc[(int) this.ai[0]].active || Main.npc[(int) this.ai[0]].aiStyle != this.aiStyle) + { + this.life = 0; + this.HitEffect(); + this.active = false; + NetMessage.SendData(28, number: this.whoAmI, number2: -1f); + break; + } + break; + } + if (this.type == 13 || this.type == 14 || this.type == 15) + { + if (!Main.npc[(int) this.ai[1]].active && !Main.npc[(int) this.ai[0]].active) + { + this.life = 0; + this.HitEffect(); + this.checkDead(); + this.active = false; + NetMessage.SendData(28, number: this.whoAmI, number2: -1f); + } + if (this.type == 13 && !Main.npc[(int) this.ai[0]].active) + { + this.life = 0; + this.HitEffect(); + this.checkDead(); + this.active = false; + NetMessage.SendData(28, number: this.whoAmI, number2: -1f); + } + if (this.type == 15 && !Main.npc[(int) this.ai[1]].active) + { + this.life = 0; + this.HitEffect(); + this.checkDead(); + this.active = false; + NetMessage.SendData(28, number: this.whoAmI, number2: -1f); + } + if (this.type == 14 && (!Main.npc[(int) this.ai[1]].active || Main.npc[(int) this.ai[1]].aiStyle != this.aiStyle)) + { + this.type = 13; + int whoAmI = this.whoAmI; + float num6 = (float) this.life / (float) this.lifeMax; + float num7 = this.ai[0]; + this.SetDefaultsKeepPlayerInteraction(this.type); + this.life = (int) ((double) this.lifeMax * (double) num6); + this.ai[0] = num7; + this.TargetClosest(); + this.netUpdate = true; + this.whoAmI = whoAmI; + this.alpha = 0; + } + if (this.type == 14 && (!Main.npc[(int) this.ai[0]].active || Main.npc[(int) this.ai[0]].aiStyle != this.aiStyle)) + { + this.type = 15; + int whoAmI = this.whoAmI; + float num8 = (float) this.life / (float) this.lifeMax; + float num9 = this.ai[1]; + this.SetDefaultsKeepPlayerInteraction(this.type); + this.life = (int) ((double) this.lifeMax * (double) num8); + this.ai[1] = num9; + this.TargetClosest(); + this.netUpdate = true; + this.whoAmI = whoAmI; + this.alpha = 0; + } + } + if (!this.active && Main.netMode == 2) + NetMessage.SendData(28, number: this.whoAmI, number2: -1f); + } + int num10 = (int) ((double) this.position.X / 16.0) - 1; + int num11 = (int) (((double) this.position.X + (double) this.width) / 16.0) + 2; + int num12 = (int) ((double) this.position.Y / 16.0) - 1; + int num13 = (int) (((double) this.position.Y + (double) this.height) / 16.0) + 2; + if (num10 < 0) + num10 = 0; + if (num11 > Main.maxTilesX) + num11 = Main.maxTilesX; + if (num12 < 0) + num12 = 0; + if (num13 > Main.maxTilesY) + num13 = Main.maxTilesY; + bool flag2 = false; + if (this.type >= 87 && this.type <= 92) + flag2 = true; + if (this.type >= 454 && this.type <= 459) + flag2 = true; + if (this.type >= 621 && this.type <= 623) + flag2 = true; + if (this.type == 402 && (double) this.ai[1] == -1.0) + flag2 = true; + if (this.type >= 412 && this.type <= 414) + flag2 = true; + if (!flag2) + { + for (int i = num10; i < num11; ++i) + { + for (int j = num12; j < num13; ++j) + { + if (Main.tile[i, j] != null && (Main.tile[i, j].nactive() && (Main.tileSolid[(int) Main.tile[i, j].type] || Main.tileSolidTop[(int) Main.tile[i, j].type] && Main.tile[i, j].frameY == (short) 0) || Main.tile[i, j].liquid > (byte) 64)) + { + Vector2 vector2; + vector2.X = (float) (i * 16); + vector2.Y = (float) (j * 16); + if ((double) this.position.X + (double) this.width > (double) vector2.X && (double) this.position.X < (double) vector2.X + 16.0 && (double) this.position.Y + (double) this.height > (double) vector2.Y && (double) this.position.Y < (double) vector2.Y + 16.0) + { + flag2 = true; + if (Main.rand.Next(100) == 0 && this.type != 117 && Main.tile[i, j].nactive() && Main.tileSolid[(int) Main.tile[i, j].type]) + WorldGen.KillTile(i, j, true, true); + } + } + } + } + } + if (!flag2 && (this.type == 7 || this.type == 10 || this.type == 13 || this.type == 39 || this.type == 95 || this.type == 98 || this.type == 117 || this.type == 375 || this.type == 454 || this.type == 510 || this.type == 513 || this.type == 621)) + { + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height); + int num14 = 1000; + bool flag3 = true; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active) + { + Microsoft.Xna.Framework.Rectangle rectangle2 = new Microsoft.Xna.Framework.Rectangle((int) Main.player[index].position.X - num14, (int) Main.player[index].position.Y - num14, num14 * 2, num14 * 2); + if (rectangle1.Intersects(rectangle2)) + { + flag3 = false; + break; + } + } + } + if (flag3) + flag2 = true; + } + if (this.type >= 87 && this.type <= 92 || this.type >= 454 && this.type <= 459 || this.type >= 621 && this.type <= 623) + { + if ((double) this.velocity.X < 0.0) + this.spriteDirection = 1; + else if ((double) this.velocity.X > 0.0) + this.spriteDirection = -1; + } + if (this.type == 414) + { + if (this.justHit) + this.localAI[3] = 3f; + if ((double) this.localAI[2] > 0.0) + { + this.localAI[2] -= 16f; + if ((double) this.localAI[2] == 0.0) + this.localAI[2] = (float) sbyte.MinValue; + } + else if ((double) this.localAI[2] < 0.0) + this.localAI[2] += 16f; + else if ((double) this.localAI[3] > 0.0) + { + this.localAI[2] = 128f; + --this.localAI[3]; + } + } + if (this.type == 412) + { + this.position = this.position + this.netOffset; + Vector2 vector2_1 = this.Center + (this.rotation - 1.570796f).ToRotationVector2() * 8f; + Vector2 vector2_2 = this.rotation.ToRotationVector2() * 16f; + Dust dust1 = Main.dust[Dust.NewDust(vector2_1 + vector2_2, 0, 0, 6, this.velocity.X, this.velocity.Y, 100, Color.Transparent, (float) (1.0 + (double) Main.rand.NextFloat() * 3.0))]; + dust1.noGravity = true; + dust1.noLight = true; + dust1.position -= new Vector2(4f); + dust1.fadeIn = 1f; + dust1.velocity = Vector2.Zero; + Dust dust2 = Main.dust[Dust.NewDust(vector2_1 - vector2_2, 0, 0, 6, this.velocity.X, this.velocity.Y, 100, Color.Transparent, (float) (1.0 + (double) Main.rand.NextFloat() * 3.0))]; + dust2.noGravity = true; + dust2.noLight = true; + dust2.position -= new Vector2(4f); + dust2.fadeIn = 1f; + dust2.velocity = Vector2.Zero; + this.position = this.position - this.netOffset; + } + float num15 = 8f; + float num16 = 0.07f; + if (this.type == 95) + { + num15 = 5.5f; + num16 = 0.045f; + } + if (this.type == 10) + { + num15 = 6f; + num16 = 0.05f; + } + if (this.type == 513) + { + num15 = 7f; + num16 = 0.1f; + } + if (this.type == 13) + { + num15 = 10f; + num16 = 0.07f; + if (Main.expertMode) + { + num15 = 12f; + num16 = 0.15f; + } + if (Main.getGoodWorld) + { + num15 += 4f; + num16 += 0.05f; + } + } + if (this.type == 510) + { + if (!Main.player[this.target].dead && Main.player[this.target].ZoneSandstorm) + { + num15 = 16f; + num16 = 0.35f; + } + else + { + num15 = 10f; + num16 = 0.25f; + } + } + if (this.type == 87) + { + num15 = 11f; + num16 = 0.25f; + } + if (this.type == 621) + { + num15 = 15f; + num16 = 0.45f; + } + if (this.type == 375) + { + num15 = 6f; + num16 = 0.15f; + } + if (this.type == 454) + { + num15 = 20f; + num16 = 0.55f; + } + if (this.type == 402) + { + num15 = 6f; + num16 = 0.2f; + } + if (this.type == 117 && Main.wofNPCIndex >= 0) + { + double num17; + if ((num17 = (double) ((float) Main.npc[Main.wofNPCIndex].life / (float) Main.npc[Main.wofNPCIndex].lifeMax)) < 0.5) + { + ++num15; + num16 += 0.1f; + } + if (num17 < 0.25) + { + ++num15; + num16 += 0.1f; + } + if (num17 < 0.1) + { + num15 += 2f; + num16 += 0.1f; + } + } + Vector2 vector2_3 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num18 = Main.player[this.target].position.X + (float) (Main.player[this.target].width / 2); + float num19 = Main.player[this.target].position.Y + (float) (Main.player[this.target].height / 2); + if (this.type == 412) + { + num15 = 10f; + num16 = 0.3f; + int num20 = -1; + int num21 = (int) ((double) Main.player[this.target].Center.X / 16.0); + int num22 = (int) ((double) Main.player[this.target].Center.Y / 16.0); + for (int i = num21 - 2; i <= num21 + 2; ++i) + { + for (int j = num22; j <= num22 + 15; ++j) + { + if (WorldGen.SolidTile2(i, j)) + { + num20 = j; + break; + } + } + if (num20 > 0) + break; + } + if (num20 > 0) + { + num20 *= 16; + float num23 = (float) (num20 - 800); + if ((double) Main.player[this.target].position.Y > (double) num23) + { + num19 = num23; + if ((double) Math.Abs(this.Center.X - Main.player[this.target].Center.X) < 500.0) + num18 = (double) this.velocity.X <= 0.0 ? Main.player[this.target].Center.X - 600f : Main.player[this.target].Center.X + 600f; + } + } + else + { + num15 = 14f; + num16 = 0.5f; + } + float num24 = num15 * 1.3f; + float num25 = num15 * 0.7f; + float num26 = this.velocity.Length(); + if ((double) num26 > 0.0) + { + if ((double) num26 > (double) num24) + { + this.velocity.Normalize(); + this.velocity = this.velocity * num24; + } + else if ((double) num26 < (double) num25) + { + this.velocity.Normalize(); + this.velocity = this.velocity * num25; + } + } + if (num20 > 0) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == this.type && index != this.whoAmI) + { + Vector2 vector2_4 = Main.npc[index].Center - this.Center; + if ((double) vector2_4.Length() < 400.0) + { + vector2_4.Normalize(); + Vector2 vector2_5 = vector2_4 * 1000f; + num18 -= vector2_5.X; + num19 -= vector2_5.Y; + } + } + } + } + else + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == this.type && index != this.whoAmI) + { + Vector2 vector2_6 = Main.npc[index].Center - this.Center; + if ((double) vector2_6.Length() < 60.0) + { + vector2_6.Normalize(); + Vector2 vector2_7 = vector2_6 * 200f; + num18 -= vector2_7.X; + num19 -= vector2_7.Y; + } + } + } + } + } + float num27 = (float) ((int) ((double) num18 / 16.0) * 16); + float num28 = (float) ((int) ((double) num19 / 16.0) * 16); + vector2_3.X = (float) ((int) ((double) vector2_3.X / 16.0) * 16); + vector2_3.Y = (float) ((int) ((double) vector2_3.Y / 16.0) * 16); + float num29 = num27 - vector2_3.X; + float num30 = num28 - vector2_3.Y; + if (this.type == 375) + { + num29 *= -1f; + num30 *= -1f; + } + float num31 = (float) Math.Sqrt((double) num29 * (double) num29 + (double) num30 * (double) num30); + if ((double) this.ai[1] > 0.0) + { + if ((double) this.ai[1] < (double) Main.npc.Length) + { + try + { + vector2_3 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + num29 = Main.npc[(int) this.ai[1]].position.X + (float) (Main.npc[(int) this.ai[1]].width / 2) - vector2_3.X; + num30 = Main.npc[(int) this.ai[1]].position.Y + (float) (Main.npc[(int) this.ai[1]].height / 2) - vector2_3.Y; + } + catch + { + } + this.rotation = (float) Math.Atan2((double) num30, (double) num29) + 1.57f; + float num32 = (float) Math.Sqrt((double) num29 * (double) num29 + (double) num30 * (double) num30); + int num33 = this.width; + if (this.type >= 87 && this.type <= 92) + num33 = 42; + if (this.type >= 454 && this.type <= 459) + num33 = 36; + if (this.type >= 13 && this.type <= 15) + num33 = (int) ((double) num33 * (double) this.scale); + if (this.type >= 513 && this.type <= 515) + num33 -= 6; + if (this.type >= 412 && this.type <= 414) + num33 += 6; + if (this.type >= 621 && this.type <= 623) + num33 = 24; + if (Main.getGoodWorld && this.type >= 13 && this.type <= 15) + num33 = 62; + float num34 = (num32 - (float) num33) / num32; + float num35 = num29 * num34; + float num36 = num30 * num34; + this.velocity = Vector2.Zero; + this.position.X += num35; + this.position.Y += num36; + if (this.type >= 87 && this.type <= 92) + { + if ((double) num35 < 0.0) + this.spriteDirection = 1; + else if ((double) num35 > 0.0) + this.spriteDirection = -1; + } + if (this.type >= 454 && this.type <= 459) + { + if ((double) num35 < 0.0) + this.spriteDirection = 1; + else if ((double) num35 > 0.0) + this.spriteDirection = -1; + } + if (this.type >= 621 && this.type <= 623) + { + if ((double) num35 < 0.0) + { + this.spriteDirection = 1; + goto label_422; + } + else if ((double) num35 > 0.0) + { + this.spriteDirection = -1; + goto label_422; + } + else + goto label_422; + } + else + goto label_422; + } + } + if (!flag2) + { + this.TargetClosest(); + this.velocity.Y += 0.11f; + if ((double) this.velocity.Y > (double) num15) + this.velocity.Y = num15; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < (double) num15 * 0.4) + { + if ((double) this.velocity.X < 0.0) + this.velocity.X -= num16 * 1.1f; + else + this.velocity.X += num16 * 1.1f; + } + else if ((double) this.velocity.Y == (double) num15) + { + if ((double) this.velocity.X < (double) num29) + this.velocity.X += num16; + else if ((double) this.velocity.X > (double) num29) + this.velocity.X -= num16; + } + else if ((double) this.velocity.Y > 4.0) + { + if ((double) this.velocity.X < 0.0) + this.velocity.X += num16 * 0.9f; + else + this.velocity.X -= num16 * 0.9f; + } + } + else + { + if (this.type != 621 && this.type != 87 && this.type != 117 && this.type != 454 && this.type != 412 && this.soundDelay == 0) + { + float num37 = num31 / 40f; + if ((double) num37 < 10.0) + num37 = 10f; + if ((double) num37 > 20.0) + num37 = 20f; + this.soundDelay = (int) num37; + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y); + } + float num38 = (float) Math.Sqrt((double) num29 * (double) num29 + (double) num30 * (double) num30); + float num39 = Math.Abs(num29); + float num40 = Math.Abs(num30); + float num41 = num15 / num38; + float num42 = num29 * num41; + float num43 = num30 * num41; + bool flag4 = false; + if ((this.type == 7 || this.type == 13) && (!Main.player[this.target].ZoneCorrupt && !Main.player[this.target].ZoneCrimson || Main.player[this.target].dead)) + flag4 = true; + if (this.type == 513 && (double) Main.player[this.target].position.Y < Main.worldSurface * 16.0 && !Main.player[this.target].ZoneSandstorm && !Main.player[this.target].ZoneUndergroundDesert || Main.player[this.target].dead) + flag4 = true; + if (this.type == 510 && (double) Main.player[this.target].position.Y < Main.worldSurface * 16.0 && !Main.player[this.target].ZoneSandstorm && !Main.player[this.target].ZoneUndergroundDesert || Main.player[this.target].dead) + flag4 = true; + if (flag4) + { + bool flag5 = true; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && !Main.player[index].dead && Main.player[index].ZoneCorrupt) + flag5 = false; + } + if (flag5) + { + if (Main.netMode != 1 && (double) this.position.Y / 16.0 > (Main.rockLayer + (double) Main.maxTilesY) / 2.0) + { + this.active = false; + int num44; + for (int number = (int) this.ai[0]; number > 0 && number < 200 && Main.npc[number].active && Main.npc[number].aiStyle == this.aiStyle; number = num44) + { + num44 = (int) Main.npc[number].ai[0]; + Main.npc[number].active = false; + this.life = 0; + if (Main.netMode == 2) + NetMessage.SendData(23, number: number); + } + if (Main.netMode == 2) + NetMessage.SendData(23, number: this.whoAmI); + } + num42 = 0.0f; + num43 = num15; + } + } + bool flag6 = false; + if (this.type == 87) + { + if (((double) this.velocity.X > 0.0 && (double) num42 < 0.0 || (double) this.velocity.X < 0.0 && (double) num42 > 0.0 || (double) this.velocity.Y > 0.0 && (double) num43 < 0.0 || (double) this.velocity.Y < 0.0 && (double) num43 > 0.0) && (double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) > (double) num16 / 2.0 && (double) num38 < 300.0) + { + flag6 = true; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < (double) num15) + this.velocity = this.velocity * 1.1f; + } + if ((double) this.position.Y > (double) Main.player[this.target].position.Y || (double) Main.player[this.target].position.Y / 16.0 > Main.worldSurface || Main.player[this.target].dead) + { + flag6 = true; + if ((double) Math.Abs(this.velocity.X) < (double) num15 / 2.0) + { + if ((double) this.velocity.X == 0.0) + this.velocity.X -= (float) this.direction; + this.velocity.X *= 1.1f; + } + else if ((double) this.velocity.Y > -(double) num15) + this.velocity.Y -= num16; + } + } + if (this.type == 454 || this.type == 621) + { + float num45 = 300f; + if (this.type == 621) + num45 = 120f; + if (((double) this.velocity.X > 0.0 && (double) num42 < 0.0 || (double) this.velocity.X < 0.0 && (double) num42 > 0.0 || (double) this.velocity.Y > 0.0 && (double) num43 < 0.0 || (double) this.velocity.Y < 0.0 && (double) num43 > 0.0) && (double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) > (double) num16 / 2.0 && (double) num38 < (double) num45) + { + flag6 = true; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < (double) num15) + this.velocity = this.velocity * 1.1f; + } + if ((double) this.position.Y > (double) Main.player[this.target].position.Y || Main.player[this.target].dead) + { + flag6 = true; + if ((double) Math.Abs(this.velocity.X) < (double) num15 / 2.0) + { + if ((double) this.velocity.X == 0.0) + this.velocity.X -= (float) this.direction; + this.velocity.X *= 1.1f; + } + else if ((double) this.velocity.Y > -(double) num15) + this.velocity.Y -= num16; + } + } + if (!flag6) + { + if ((double) this.velocity.X > 0.0 && (double) num42 > 0.0 || (double) this.velocity.X < 0.0 && (double) num42 < 0.0 || (double) this.velocity.Y > 0.0 && (double) num43 > 0.0 || (double) this.velocity.Y < 0.0 && (double) num43 < 0.0) + { + if ((double) this.velocity.X < (double) num42) + this.velocity.X += num16; + else if ((double) this.velocity.X > (double) num42) + this.velocity.X -= num16; + if ((double) this.velocity.Y < (double) num43) + this.velocity.Y += num16; + else if ((double) this.velocity.Y > (double) num43) + this.velocity.Y -= num16; + if ((double) Math.Abs(num43) < (double) num15 * 0.2 && ((double) this.velocity.X > 0.0 && (double) num42 < 0.0 || (double) this.velocity.X < 0.0 && (double) num42 > 0.0)) + { + if ((double) this.velocity.Y > 0.0) + this.velocity.Y += num16 * 2f; + else + this.velocity.Y -= num16 * 2f; + } + if ((double) Math.Abs(num42) < (double) num15 * 0.2 && ((double) this.velocity.Y > 0.0 && (double) num43 < 0.0 || (double) this.velocity.Y < 0.0 && (double) num43 > 0.0)) + { + if ((double) this.velocity.X > 0.0) + this.velocity.X += num16 * 2f; + else + this.velocity.X -= num16 * 2f; + } + } + else if ((double) num39 > (double) num40) + { + if ((double) this.velocity.X < (double) num42) + this.velocity.X += num16 * 1.1f; + else if ((double) this.velocity.X > (double) num42) + this.velocity.X -= num16 * 1.1f; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < (double) num15 * 0.5) + { + if ((double) this.velocity.Y > 0.0) + this.velocity.Y += num16; + else + this.velocity.Y -= num16; + } + } + else + { + if ((double) this.velocity.Y < (double) num43) + this.velocity.Y += num16 * 1.1f; + else if ((double) this.velocity.Y > (double) num43) + this.velocity.Y -= num16 * 1.1f; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < (double) num15 * 0.5) + { + if ((double) this.velocity.X > 0.0) + this.velocity.X += num16; + else + this.velocity.X -= num16; + } + } + } + } + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.57f; + if (this.type == 7 || this.type == 10 || this.type == 13 || this.type == 39 || this.type == 95 || this.type == 98 || this.type == 117 || this.type == 510 || this.type == 513 || this.type == 621) + { + if (flag2) + { + if ((double) this.localAI[0] != 1.0) + this.netUpdate = true; + this.localAI[0] = 1f; + } + else + { + if ((double) this.localAI[0] != 0.0) + this.netUpdate = true; + this.localAI[0] = 0.0f; + } + if (((double) this.velocity.X > 0.0 && (double) this.oldVelocity.X < 0.0 || (double) this.velocity.X < 0.0 && (double) this.oldVelocity.X > 0.0 || (double) this.velocity.Y > 0.0 && (double) this.oldVelocity.Y < 0.0 || (double) this.velocity.Y < 0.0 && (double) this.oldVelocity.Y > 0.0) && !this.justHit) + this.netUpdate = true; + } + if (this.type == 454) + { + float num46 = Vector2.Distance(Main.player[this.target].Center, this.Center); + int num47 = 0; + if ((double) Vector2.Normalize(Main.player[this.target].Center - this.Center).ToRotation().AngleTowards(this.velocity.ToRotation(), 1.570796f) == (double) this.velocity.ToRotation() && (double) num46 < 350.0) + num47 = 4; + if ((double) num47 > this.frameCounter) + ++this.frameCounter; + if ((double) num47 < this.frameCounter) + --this.frameCounter; + if (this.frameCounter < 0.0) + this.frameCounter = 0.0; + if (this.frameCounter > 4.0) + this.frameCounter = 4.0; + } +label_422: + if (this.type < 13 || this.type > 15 || this.type != 13 && (this.type == 13 || Main.npc[(int) this.ai[1]].alpha >= 85)) + return; + if (this.alpha > 0 && this.life > 0) + { + for (int index15 = 0; index15 < 2; ++index15) + { + int index16 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 14, Alpha: 100, Scale: 2f); + Main.dust[index16].noGravity = true; + Main.dust[index16].noLight = true; + } + } + if ((double) (this.position - this.oldPosition).Length() <= 2.0) + return; + this.alpha -= 42; + if (this.alpha >= 0) + return; + this.alpha = 0; + } + + private void AI_002_FloatingEye() + { + if ((this.type == 170 || this.type == 171 || this.type == 180) && Main.rand.Next(1000) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, 9); + this.noGravity = true; + if (!this.noTileCollide) + { + if (this.collideX) + { + this.velocity.X = this.oldVelocity.X * -0.5f; + if (this.direction == -1 && (double) this.velocity.X > 0.0 && (double) this.velocity.X < 2.0) + this.velocity.X = 2f; + if (this.direction == 1 && (double) this.velocity.X < 0.0 && (double) this.velocity.X > -2.0) + this.velocity.X = -2f; + } + if (this.collideY) + { + this.velocity.Y = this.oldVelocity.Y * -0.5f; + if ((double) this.velocity.Y > 0.0 && (double) this.velocity.Y < 1.0) + this.velocity.Y = 1f; + if ((double) this.velocity.Y < 0.0 && (double) this.velocity.Y > -1.0) + this.velocity.Y = -1f; + } + } + if (NPC.DespawnEncouragement_AIStyle2_FloatingEye_IsDiscouraged(this.type, this.position, this.target)) + { + this.EncourageDespawn(10); + this.directionY = -1; + if ((double) this.velocity.Y > 0.0) + this.direction = 1; + this.direction = -1; + if ((double) this.velocity.X > 0.0) + this.direction = 1; + } + else + this.TargetClosest(); + if (this.type == 170 || this.type == 171 || this.type == 180) + { + if (Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height)) + { + if ((double) this.ai[1] > 0.0 && !Collision.SolidCollision(this.position, this.width, this.height)) + { + this.ai[1] = 0.0f; + this.ai[0] = 0.0f; + this.netUpdate = true; + } + } + else if ((double) this.ai[1] == 0.0) + ++this.ai[0]; + if ((double) this.ai[0] >= 300.0) + { + this.ai[1] = 1f; + this.ai[0] = 0.0f; + this.netUpdate = true; + } + if ((double) this.ai[1] == 0.0) + { + this.alpha = 0; + this.noTileCollide = false; + } + else + { + this.wet = false; + this.alpha = 200; + this.noTileCollide = true; + } + this.rotation = this.velocity.Y * 0.1f * (float) this.direction; + this.TargetClosest(); + if (this.direction == -1 && (double) this.velocity.X > -4.0 && (double) this.position.X > (double) Main.player[this.target].position.X + (double) Main.player[this.target].width) + { + this.velocity.X -= 0.08f; + if ((double) this.velocity.X > 4.0) + this.velocity.X -= 0.04f; + else if ((double) this.velocity.X > 0.0) + this.velocity.X -= 0.2f; + if ((double) this.velocity.X < -4.0) + this.velocity.X = -4f; + } + else if (this.direction == 1 && (double) this.velocity.X < 4.0 && (double) this.position.X + (double) this.width < (double) Main.player[this.target].position.X) + { + this.velocity.X += 0.08f; + if ((double) this.velocity.X < -4.0) + this.velocity.X += 0.04f; + else if ((double) this.velocity.X < 0.0) + this.velocity.X += 0.2f; + if ((double) this.velocity.X > 4.0) + this.velocity.X = 4f; + } + if (this.directionY == -1 && (double) this.velocity.Y > -2.5 && (double) this.position.Y > (double) Main.player[this.target].position.Y + (double) Main.player[this.target].height) + { + this.velocity.Y -= 0.1f; + if ((double) this.velocity.Y > 2.5) + this.velocity.Y -= 0.05f; + else if ((double) this.velocity.Y > 0.0) + this.velocity.Y -= 0.15f; + if ((double) this.velocity.Y < -2.5) + this.velocity.Y = -2.5f; + } + else if (this.directionY == 1 && (double) this.velocity.Y < 2.5 && (double) this.position.Y + (double) this.height < (double) Main.player[this.target].position.Y) + { + this.velocity.Y += 0.1f; + if ((double) this.velocity.Y < -2.5) + this.velocity.Y += 0.05f; + else if ((double) this.velocity.Y < 0.0) + this.velocity.Y += 0.15f; + if ((double) this.velocity.Y > 2.5) + this.velocity.Y = 2.5f; + } + } + else if (this.type == 116) + { + this.TargetClosest(); + Lighting.AddLight((int) ((double) this.position.X + (double) (this.width / 2)) / 16, (int) ((double) this.position.Y + (double) (this.height / 2)) / 16, 0.3f, 0.2f, 0.1f); + if (this.direction == -1 && (double) this.velocity.X > -6.0) + { + this.velocity.X -= 0.1f; + if ((double) this.velocity.X > 6.0) + this.velocity.X -= 0.1f; + else if ((double) this.velocity.X > 0.0) + this.velocity.X -= 0.2f; + if ((double) this.velocity.X < -6.0) + this.velocity.X = -6f; + } + else if (this.direction == 1 && (double) this.velocity.X < 6.0) + { + this.velocity.X += 0.1f; + if ((double) this.velocity.X < -6.0) + this.velocity.X += 0.1f; + else if ((double) this.velocity.X < 0.0) + this.velocity.X += 0.2f; + if ((double) this.velocity.X > 6.0) + this.velocity.X = 6f; + } + if (this.directionY == -1 && (double) this.velocity.Y > -2.5) + { + this.velocity.Y -= 0.04f; + if ((double) this.velocity.Y > 2.5) + this.velocity.Y -= 0.05f; + else if ((double) this.velocity.Y > 0.0) + this.velocity.Y -= 0.15f; + if ((double) this.velocity.Y < -2.5) + this.velocity.Y = -2.5f; + } + else if (this.directionY == 1 && (double) this.velocity.Y < 1.5) + { + this.velocity.Y += 0.04f; + if ((double) this.velocity.Y < -2.5) + this.velocity.Y += 0.05f; + else if ((double) this.velocity.Y < 0.0) + this.velocity.Y += 0.15f; + if ((double) this.velocity.Y > 2.5) + this.velocity.Y = 2.5f; + } + if (Main.rand.Next(40) == 0) + { + this.position = this.position + this.netOffset; + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y + (float) this.height * 0.25f), this.width, (int) ((double) this.height * 0.5), 5, this.velocity.X, 2f); + Main.dust[index].velocity.X *= 0.5f; + Main.dust[index].velocity.Y *= 0.1f; + this.position = this.position - this.netOffset; + } + } + else if (this.type == 133) + { + if ((double) this.life < (double) this.lifeMax * 0.5) + { + if (this.direction == -1 && (double) this.velocity.X > -6.0) + { + this.velocity.X -= 0.1f; + if ((double) this.velocity.X > 6.0) + this.velocity.X -= 0.1f; + else if ((double) this.velocity.X > 0.0) + this.velocity.X += 0.05f; + if ((double) this.velocity.X < -6.0) + this.velocity.X = -6f; + } + else if (this.direction == 1 && (double) this.velocity.X < 6.0) + { + this.velocity.X += 0.1f; + if ((double) this.velocity.X < -6.0) + this.velocity.X += 0.1f; + else if ((double) this.velocity.X < 0.0) + this.velocity.X -= 0.05f; + if ((double) this.velocity.X > 6.0) + this.velocity.X = 6f; + } + if (this.directionY == -1 && (double) this.velocity.Y > -4.0) + { + this.velocity.Y -= 0.1f; + if ((double) this.velocity.Y > 4.0) + this.velocity.Y -= 0.1f; + else if ((double) this.velocity.Y > 0.0) + this.velocity.Y += 0.05f; + if ((double) this.velocity.Y < -4.0) + this.velocity.Y = -4f; + } + else if (this.directionY == 1 && (double) this.velocity.Y < 4.0) + { + this.velocity.Y += 0.1f; + if ((double) this.velocity.Y < -4.0) + this.velocity.Y += 0.1f; + else if ((double) this.velocity.Y < 0.0) + this.velocity.Y -= 0.05f; + if ((double) this.velocity.Y > 4.0) + this.velocity.Y = 4f; + } + } + else + { + if (this.direction == -1 && (double) this.velocity.X > -4.0) + { + this.velocity.X -= 0.1f; + if ((double) this.velocity.X > 4.0) + this.velocity.X -= 0.1f; + else if ((double) this.velocity.X > 0.0) + this.velocity.X += 0.05f; + if ((double) this.velocity.X < -4.0) + this.velocity.X = -4f; + } + else if (this.direction == 1 && (double) this.velocity.X < 4.0) + { + this.velocity.X += 0.1f; + if ((double) this.velocity.X < -4.0) + this.velocity.X += 0.1f; + else if ((double) this.velocity.X < 0.0) + this.velocity.X -= 0.05f; + if ((double) this.velocity.X > 4.0) + this.velocity.X = 4f; + } + if (this.directionY == -1 && (double) this.velocity.Y > -1.5) + { + this.velocity.Y -= 0.04f; + if ((double) this.velocity.Y > 1.5) + this.velocity.Y -= 0.05f; + else if ((double) this.velocity.Y > 0.0) + this.velocity.Y += 0.03f; + if ((double) this.velocity.Y < -1.5) + this.velocity.Y = -1.5f; + } + else if (this.directionY == 1 && (double) this.velocity.Y < 1.5) + { + this.velocity.Y += 0.04f; + if ((double) this.velocity.Y < -1.5) + this.velocity.Y += 0.05f; + else if ((double) this.velocity.Y < 0.0) + this.velocity.Y -= 0.03f; + if ((double) this.velocity.Y > 1.5) + this.velocity.Y = 1.5f; + } + } + } + else + { + float num1 = 4f; + float num2 = 1.5f; + float num3 = num1 * (float) (1.0 + (1.0 - (double) this.scale)); + float num4 = num2 * (float) (1.0 + (1.0 - (double) this.scale)); + if (this.direction == -1 && (double) this.velocity.X > -(double) num3) + { + this.velocity.X -= 0.1f; + if ((double) this.velocity.X > (double) num3) + this.velocity.X -= 0.1f; + else if ((double) this.velocity.X > 0.0) + this.velocity.X += 0.05f; + if ((double) this.velocity.X < -(double) num3) + this.velocity.X = -num3; + } + else if (this.direction == 1 && (double) this.velocity.X < (double) num3) + { + this.velocity.X += 0.1f; + if ((double) this.velocity.X < -(double) num3) + this.velocity.X += 0.1f; + else if ((double) this.velocity.X < 0.0) + this.velocity.X -= 0.05f; + if ((double) this.velocity.X > (double) num3) + this.velocity.X = num3; + } + if (this.directionY == -1 && (double) this.velocity.Y > -(double) num4) + { + this.velocity.Y -= 0.04f; + if ((double) this.velocity.Y > (double) num4) + this.velocity.Y -= 0.05f; + else if ((double) this.velocity.Y > 0.0) + this.velocity.Y += 0.03f; + if ((double) this.velocity.Y < -(double) num4) + this.velocity.Y = -num4; + } + else if (this.directionY == 1 && (double) this.velocity.Y < (double) num4) + { + this.velocity.Y += 0.04f; + if ((double) this.velocity.Y < -(double) num4) + this.velocity.Y += 0.05f; + else if ((double) this.velocity.Y < 0.0) + this.velocity.Y -= 0.03f; + if ((double) this.velocity.Y > (double) num4) + this.velocity.Y = num4; + } + } + if ((this.type == 2 || this.type == 133 || this.type == 190 || this.type == 191 || this.type == 192 || this.type == 193 || this.type == 194) && Main.rand.Next(40) == 0) + { + this.position = this.position + this.netOffset; + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y + (float) this.height * 0.25f), this.width, (int) ((double) this.height * 0.5), 5, this.velocity.X, 2f); + Main.dust[index].velocity.X *= 0.5f; + Main.dust[index].velocity.Y *= 0.1f; + this.position = this.position - this.netOffset; + } + if (!this.wet || this.type == 170 || this.type == 171 || this.type == 172) + return; + if ((double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.95f; + this.velocity.Y -= 0.5f; + if ((double) this.velocity.Y < -4.0) + this.velocity.Y = -4f; + this.TargetClosest(); + } + + public static bool DespawnEncouragement_AIStyle2_FloatingEye_IsDiscouraged( + int npcID, + Vector2 npcPosition, + int target = 255) + { + if (Main.player[target].ZoneGraveyard || !Main.dayTime || (double) npcPosition.Y > Main.worldSurface * 16.0) + return false; + return npcID == 2 || npcID == 133 || npcID == 190 || npcID == 191 || npcID == 192 || npcID == 193 || npcID == 194 || npcID == 317 || npcID == 318; + } + + private bool AI_007_TownEntities_IsInAGoodRestingSpot( + int tileX, + int tileY, + int idealRestX, + int idealRestY) + { + return !Main.dayTime && (double) this.ai[0] == 5.0 ? Math.Abs(tileX - idealRestX) < 7 && Math.Abs(tileY - idealRestY) < 7 : (this.type != 361 && this.type != 445 || !this.wet) && tileX == idealRestX && tileY == idealRestY; + } + + private void AI_007_FindGoodRestingSpot( + int myTileX, + int myTileY, + out int floorX, + out int floorY) + { + floorX = this.homeTileX; + floorY = this.homeTileY; + if (floorX == -1 || floorY == -1) + return; + while (!WorldGen.SolidOrSlopedTile(floorX, floorY) && floorY < Main.maxTilesY - 20) + ++floorY; + if (Main.dayTime || (double) this.ai[0] == 5.0 && Math.Abs(myTileX - floorX) < 7 && Math.Abs(myTileY - floorY) < 7) + return; + Point point1 = new Point(floorX, floorY); + Point point2 = new Point(-1, -1); + int num1 = -1; + int num2 = 7; + int num3 = 6; + int num4 = 2; + int num5 = 1; + int num6 = 2; + for (int index1 = point1.X - num2; index1 <= point1.X + num2; index1 += num5) + { + for (int index2 = point1.Y + num4; index2 >= point1.Y - num3; index2 -= num6) + { + Tile tile = Main.tile[index1, index2]; + if (tile != null && tile.active() && (!TileID.Sets.CanBeSatOnForNPCs[(int) tile.type] || (int) tile.frameY % 40 != 0 || index2 + 1 <= point1.Y + num4)) + { + int num7 = Math.Abs(index1 - point1.X) + Math.Abs(index2 - point1.Y); + if (num1 == -1 || num7 < num1) + { + num1 = num7; + point2.X = index1; + point2.Y = index2; + } + } + } + } + if (num1 == -1) + return; + Tile tile1 = Main.tile[point2.X, point2.Y]; + if (tile1.type == (ushort) 497 || tile1.type == (ushort) 15) + { + if ((int) tile1.frameY % 40 != 0) + --point2.Y; + point2.Y += 2; + } + floorX = point2.X; + floorY = point2.Y; + } + + private void AI_007_TryForcingSitting(int homeFloorX, int homeFloorY) + { + Tile tile = Main.tile[homeFloorX, homeFloorY - 1]; + bool flag = this.type != 638 && this.type != 656 && (double) this.ai[0] != 5.0; + if (flag) + flag = ((flag ? 1 : 0) & (tile == null || !tile.active() ? 0 : (tile.type == (ushort) 15 ? 1 : (tile.type == (ushort) 497 ? 1 : 0)))) != 0; + if (flag) + flag = ((flag ? 1 : 0) & (tile.type != (ushort) 15 ? 1 : (tile.frameY != (short) 1080 ? 1 : 0))) != 0; + if (!flag) + return; + this.ai[0] = 5f; + this.ai[1] = (float) (900 + Main.rand.Next(10800)); + this.direction = tile.frameX == (short) 0 ? -1 : 1; + this.Bottom = new Vector2((float) (homeFloorX * 16 + 8 + 2 * this.direction), (float) (homeFloorY * 16)); + this.velocity = Vector2.Zero; + this.localAI[3] = 0.0f; + this.netUpdate = true; + } + + private void AI_007_TownEntities() + { + int maxValue1 = 300; + if (this.type == 638 || this.type == 656) + maxValue1 = 0; + bool flag1 = Main.raining; + if (!Main.dayTime) + flag1 = true; + if (Main.eclipse) + flag1 = true; + if (Main.slimeRain) + flag1 = true; + float num1 = 1f; + this.defense = !Main.masterMode ? (!Main.expertMode ? (this.dryadWard ? this.defDefense + 6 : this.defDefense) : (this.dryadWard ? this.defDefense + 10 : this.defDefense)) : (this.dryadWard ? this.defDefense + 14 : this.defDefense); + if (this.isLikeATownNPC) + { + if (NPC.combatBookWasUsed) + { + num1 += 0.2f; + this.defense += 6; + } + if (NPC.downedBoss1) + { + num1 += 0.1f; + this.defense += 3; + } + if (NPC.downedBoss2) + { + num1 += 0.1f; + this.defense += 3; + } + if (NPC.downedBoss3) + { + num1 += 0.1f; + this.defense += 3; + } + if (NPC.downedQueenBee) + { + num1 += 0.1f; + this.defense += 3; + } + if (Main.hardMode) + { + num1 += 0.4f; + this.defense += 12; + } + if (NPC.downedQueenSlime) + { + num1 += 0.15f; + this.defense += 6; + } + if (NPC.downedMechBoss1) + { + num1 += 0.15f; + this.defense += 6; + } + if (NPC.downedMechBoss2) + { + num1 += 0.15f; + this.defense += 6; + } + if (NPC.downedMechBoss3) + { + num1 += 0.15f; + this.defense += 6; + } + if (NPC.downedPlantBoss) + { + num1 += 0.15f; + this.defense += 8; + } + if (NPC.downedQueenSlime) + { + num1 += 0.15f; + this.defense += 8; + } + if (NPC.downedGolemBoss) + { + num1 += 0.15f; + this.defense += 8; + } + if (NPC.downedAncientCultist) + { + num1 += 0.15f; + this.defense += 8; + } + } + if (this.type == 142 && Main.netMode != 1 && !Main.xMas) + { + this.StrikeNPCNoInteraction(9999, 0.0f, 0); + if (Main.netMode == 2) + NetMessage.SendData(28, number: this.whoAmI, number2: 9999f); + } + if ((this.type == 148 || this.type == 149) && (double) this.localAI[0] == 0.0) + this.localAI[0] = (float) Main.rand.Next(1, 5); + if (this.type == 124) + { + int projectileSearch = NPC.lazyNPCOwnedProjectileSearchArray[this.whoAmI]; + bool flag2 = false; + if (Main.projectile.IndexInRange(projectileSearch)) + { + Projectile projectile = Main.projectile[projectileSearch]; + if (projectile.active && projectile.type == 582 && (double) projectile.ai[1] == (double) this.whoAmI) + flag2 = true; + } + this.localAI[0] = (float) flag2.ToInt(); + } + if ((this.type == 362 || this.type == 364 || this.type == 602 || this.type == 608) && Main.netMode != 1 && ((double) this.velocity.Y > 4.0 || (double) this.velocity.Y < -4.0 || this.wet)) + { + int direction = this.direction; + this.Transform(this.type + 1); + this.TargetClosest(); + this.direction = direction; + this.netUpdate = true; + } + else + { + switch (this.type) + { + case 107: + NPC.savedGoblin = true; + break; + case 108: + NPC.savedWizard = true; + break; + case 124: + NPC.savedMech = true; + break; + case 353: + NPC.savedStylist = true; + break; + case 369: + NPC.savedAngler = true; + break; + case 441: + NPC.savedTaxCollector = true; + break; + case 550: + NPC.savedBartender = true; + break; + case 588: + NPC.savedGolfer = true; + break; + } + if (this.type >= 0 && this.type < 663 && NPCID.Sets.TownCritter[this.type] && this.target == (int) byte.MaxValue) + { + this.TargetClosest(); + if ((double) this.position.X < (double) Main.player[this.target].position.X) + { + this.direction = 1; + this.spriteDirection = this.direction; + } + if ((double) this.position.X > (double) Main.player[this.target].position.X) + { + this.direction = -1; + this.spriteDirection = this.direction; + } + if (this.homeTileX == -1) + this.homeTileX = (int) (((double) this.position.X + (double) (this.width / 2)) / 16.0); + } + else if (this.homeTileX == -1 && this.homeTileY == -1 && (double) this.velocity.Y == 0.0) + { + this.homeTileX = (int) this.Center.X / 16; + this.homeTileY = (int) ((double) this.position.Y + (double) this.height + 4.0) / 16; + } + bool flag3 = false; + int index1 = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int index2 = (int) ((double) this.position.Y + (double) this.height + 1.0) / 16; + int floorX; + int floorY; + this.AI_007_FindGoodRestingSpot(index1, index2, out floorX, out floorY); + if (this.type == 441) + NPC.taxCollector = true; + this.directionY = -1; + if (this.direction == 0) + this.direction = 1; + for (int index3 = 0; index3 < (int) byte.MaxValue; ++index3) + { + if (Main.player[index3].active && Main.player[index3].talkNPC == this.whoAmI) + { + flag3 = true; + if ((double) this.ai[0] != 0.0) + this.netUpdate = true; + this.ai[0] = 0.0f; + this.ai[1] = 300f; + this.localAI[3] = 100f; + if ((double) Main.player[index3].position.X + (double) (Main.player[index3].width / 2) < (double) this.position.X + (double) (this.width / 2)) + this.direction = -1; + else + this.direction = 1; + } + } + if ((double) this.ai[3] == 1.0) + { + this.life = -1; + this.HitEffect(); + this.active = false; + this.netUpdate = true; + if (this.type != 37) + return; + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + } + else + { + if (this.type == 37 && Main.netMode != 1) + { + this.homeless = false; + this.homeTileX = Main.dungeonX; + this.homeTileY = Main.dungeonY; + if (NPC.downedBoss3) + { + this.ai[3] = 1f; + this.netUpdate = true; + } + } + if (this.type == 368) + { + this.homeless = true; + if (!Main.dayTime) + { + this.homeTileX = (int) ((double) this.Center.X / 16.0); + this.homeTileY = (int) ((double) this.position.Y + (double) this.height + 2.0) / 16; + if (!flag3 && (double) this.ai[0] == 0.0) + { + this.ai[0] = 1f; + this.ai[1] = 200f; + } + flag1 = false; + } + } + if (this.type == 369 && this.homeless && this.wet) + { + if ((double) this.Center.X / 16.0 < 380.0 || (double) this.Center.X / 16.0 > (double) (Main.maxTilesX - 380)) + { + this.homeTileX = Main.spawnTileX; + this.homeTileY = Main.spawnTileY; + this.ai[0] = 1f; + this.ai[1] = 200f; + } + if ((double) this.position.X / 16.0 < 300.0) + this.direction = 1; + else if ((double) this.position.X / 16.0 > (double) (Main.maxTilesX - 300)) + this.direction = -1; + } + if (!WorldGen.InWorld(index1, index2) || Main.tile[index1, index2] == null) + return; + if (!this.homeless && Main.netMode != 1 && this.townNPC && (flag1 || Main.tileDungeon[(int) Main.tile[index1, index2].type]) && !this.AI_007_TownEntities_IsInAGoodRestingSpot(index1, index2, floorX, floorY)) + { + bool flag4 = true; + for (int index4 = 0; index4 < 2 && flag4; ++index4) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) ((double) this.position.X + (double) (this.width / 2) - (double) (NPC.sWidth / 2) - (double) NPC.safeRangeX), (int) ((double) this.position.Y + (double) (this.height / 2) - (double) (NPC.sHeight / 2) - (double) NPC.safeRangeY), NPC.sWidth + NPC.safeRangeX * 2, NPC.sHeight + NPC.safeRangeY * 2); + if (index4 == 1) + rectangle = new Microsoft.Xna.Framework.Rectangle(floorX * 16 + 8 - NPC.sWidth / 2 - NPC.safeRangeX, floorY * 16 + 8 - NPC.sHeight / 2 - NPC.safeRangeY, NPC.sWidth + NPC.safeRangeX * 2, NPC.sHeight + NPC.safeRangeY * 2); + for (int index5 = 0; index5 < (int) byte.MaxValue; ++index5) + { + if (Main.player[index5].active && new Microsoft.Xna.Framework.Rectangle((int) Main.player[index5].position.X, (int) Main.player[index5].position.Y, Main.player[index5].width, Main.player[index5].height).Intersects(rectangle)) + { + flag4 = false; + break; + } + } + } + if (flag4) + { + if (this.type == 37 || !Collision.SolidTiles(floorX - 1, floorX + 1, floorY - 3, floorY - 1)) + { + this.velocity.X = 0.0f; + this.velocity.Y = 0.0f; + this.position.X = (float) (floorX * 16 + 8 - this.width / 2); + this.position.Y = (float) (floorY * 16 - this.height) - 0.1f; + this.netUpdate = true; + this.AI_007_TryForcingSitting(floorX, floorY); + } + else + { + this.homeless = true; + WorldGen.QuickFindHome(this.whoAmI); + } + } + } + bool flag5 = this.type == 300 || this.type == 447 || this.type == 610; + bool flag6 = this.type == 616 || this.type == 617 || this.type == 625; + bool flag7 = this.type == 361 || this.type == 445; + bool canBreathUnderWater = flag6 | flag7; + int num2 = NPCID.Sets.IsTownPet[this.type] ? 1 : 0; + bool flag8 = flag6 | flag7; + float num3 = 200f; + if (NPCID.Sets.DangerDetectRange[this.type] != -1) + num3 = (float) NPCID.Sets.DangerDetectRange[this.type]; + bool flag9 = false; + bool flag10 = false; + float num4 = -1f; + float num5 = -1f; + int num6 = 0; + int index6 = -1; + int index7 = -1; + if (!flag6 && Main.netMode != 1 && !flag3) + { + for (int index8 = 0; index8 < 200; ++index8) + { + if (Main.npc[index8].active && !Main.npc[index8].friendly && Main.npc[index8].damage > 0 && (double) Main.npc[index8].Distance(this.Center) < (double) num3 && (this.type != 453 || !NPCID.Sets.Skeletons[Main.npc[index8].type]) && (Main.npc[index8].noTileCollide || Collision.CanHit(this.Center, 0, 0, Main.npc[index8].Center, 0, 0))) + { + flag9 = true; + float num7 = Main.npc[index8].Center.X - this.Center.X; + if (this.type == 614) + { + if ((double) num7 < 0.0 && ((double) num4 == -1.0 || (double) num7 > (double) num4)) + { + num5 = num7; + index7 = index8; + } + if ((double) num7 > 0.0 && ((double) num5 == -1.0 || (double) num7 < (double) num5)) + { + num4 = num7; + index6 = index8; + } + } + else + { + if ((double) num7 < 0.0 && ((double) num4 == -1.0 || (double) num7 > (double) num4)) + { + num4 = num7; + index6 = index8; + } + if ((double) num7 > 0.0 && ((double) num5 == -1.0 || (double) num7 < (double) num5)) + { + num5 = num7; + index7 = index8; + } + } + } + } + if (flag9) + { + num6 = (double) num4 != -1.0 ? ((double) num5 != -1.0 ? ((double) num5 < -(double) num4).ToDirectionInt() : -1) : 1; + float num8 = 0.0f; + if ((double) num4 != -1.0) + num8 = -num4; + if ((double) num8 == 0.0 || (double) num5 < (double) num8 && (double) num5 > 0.0) + num8 = num5; + if ((double) this.ai[0] == 8.0) + { + if (this.direction == -num6) + { + this.ai[0] = 1f; + this.ai[1] = (float) (300 + Main.rand.Next(300)); + this.ai[2] = 0.0f; + this.localAI[3] = 0.0f; + this.netUpdate = true; + } + } + else if ((double) this.ai[0] != 10.0 && (double) this.ai[0] != 12.0 && (double) this.ai[0] != 13.0 && (double) this.ai[0] != 14.0 && (double) this.ai[0] != 15.0) + { + if (NPCID.Sets.PrettySafe[this.type] != -1 && (double) NPCID.Sets.PrettySafe[this.type] < (double) num8) + { + flag9 = false; + flag10 = NPCID.Sets.AttackType[this.type] > -1; + } + else if ((double) this.ai[0] != 1.0) + { + int tileX = (int) (((double) this.position.X + (double) (this.width / 2) + (double) (15 * this.direction)) / 16.0); + int tileY = (int) (((double) this.position.Y + (double) this.height - 16.0) / 16.0); + bool currentlyDrowning = this.wet && !canBreathUnderWater; + bool avoidFalling; + this.AI_007_TownEntities_GetWalkPrediction(index1, floorX, canBreathUnderWater, currentlyDrowning, tileX, tileY, out bool _, out avoidFalling); + if (!avoidFalling) + { + if (((double) this.ai[0] == 3.0 || (double) this.ai[0] == 4.0 || (double) this.ai[0] == 16.0 ? 1 : ((double) this.ai[0] == 17.0 ? 1 : 0)) != 0) + { + NPC npc = Main.npc[(int) this.ai[2]]; + if (npc.active) + { + npc.ai[0] = 1f; + npc.ai[1] = (float) (120 + Main.rand.Next(120)); + npc.ai[2] = 0.0f; + npc.localAI[3] = 0.0f; + npc.direction = -num6; + npc.netUpdate = true; + } + } + this.ai[0] = 1f; + this.ai[1] = (float) (120 + Main.rand.Next(120)); + this.ai[2] = 0.0f; + this.localAI[3] = 0.0f; + this.direction = -num6; + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 1.0 && this.direction != -num6) + { + this.direction = -num6; + this.netUpdate = true; + } + } + } + } + if ((double) this.ai[0] == 0.0) + { + if ((double) this.localAI[3] > 0.0) + --this.localAI[3]; + int petIdleChance = 120; + if (this.type == 638) + petIdleChance = 60; + if (flag7 && this.wet) + { + this.ai[0] = 1f; + this.ai[1] = (float) (200 + Main.rand.Next(500, 700)); + this.ai[2] = 0.0f; + this.localAI[3] = 0.0f; + this.netUpdate = true; + } + else if (flag1 && !flag3 && !NPCID.Sets.TownCritter[this.type]) + { + if (Main.netMode != 1) + { + if (index1 == floorX && index2 == floorY) + { + if ((double) this.velocity.X != 0.0) + this.netUpdate = true; + if ((double) this.velocity.X > 0.100000001490116) + this.velocity.X -= 0.1f; + else if ((double) this.velocity.X < -0.100000001490116) + { + this.velocity.X += 0.1f; + } + else + { + this.velocity.X = 0.0f; + this.AI_007_TryForcingSitting(floorX, floorY); + } + if (NPCID.Sets.IsTownPet[this.type]) + this.AI_007_AttemptToPlayIdleAnimationsForPets(petIdleChance * 4); + } + else + { + if (index1 > floorX) + this.direction = -1; + else + this.direction = 1; + this.ai[0] = 1f; + this.ai[1] = (float) (200 + Main.rand.Next(200)); + this.ai[2] = 0.0f; + this.localAI[3] = 0.0f; + this.netUpdate = true; + } + } + } + else + { + if (flag5) + this.velocity.X *= 0.5f; + if ((double) this.velocity.X > 0.100000001490116) + this.velocity.X -= 0.1f; + else if ((double) this.velocity.X < -0.100000001490116) + this.velocity.X += 0.1f; + else + this.velocity.X = 0.0f; + if (Main.netMode != 1) + { + if (!flag3 && NPCID.Sets.IsTownPet[this.type] && (double) this.ai[1] >= 100.0 && (double) this.ai[1] <= 150.0) + this.AI_007_AttemptToPlayIdleAnimationsForPets(petIdleChance); + if ((double) this.ai[1] > 0.0) + --this.ai[1]; + bool flag11 = true; + int tileX = (int) (((double) this.position.X + (double) (this.width / 2) + (double) (15 * this.direction)) / 16.0); + int tileY = (int) (((double) this.position.Y + (double) this.height - 16.0) / 16.0); + bool currentlyDrowning = this.wet && !canBreathUnderWater; + bool avoidFalling; + this.AI_007_TownEntities_GetWalkPrediction(index1, floorX, canBreathUnderWater, currentlyDrowning, tileX, tileY, out bool _, out avoidFalling); + if (avoidFalling) + flag11 = false; + if ((double) this.ai[1] <= 0.0) + { + if (flag11) + { + this.ai[0] = 1f; + this.ai[1] = (float) (200 + Main.rand.Next(300)); + this.ai[2] = 0.0f; + if (NPCID.Sets.TownCritter[this.type]) + this.ai[1] += (float) Main.rand.Next(200, 400); + this.localAI[3] = 0.0f; + this.netUpdate = true; + } + else + { + this.direction *= -1; + this.ai[1] = (float) (60 + Main.rand.Next(120)); + this.netUpdate = true; + } + } + } + } + if (Main.netMode != 1 && (!flag1 || this.AI_007_TownEntities_IsInAGoodRestingSpot(index1, index2, floorX, floorY))) + { + if (index1 < floorX - 25 || index1 > floorX + 25) + { + if ((double) this.localAI[3] == 0.0) + { + if (index1 < floorX - 50 && this.direction == -1) + { + this.direction = 1; + this.netUpdate = true; + } + else if (index1 > floorX + 50 && this.direction == 1) + { + this.direction = -1; + this.netUpdate = true; + } + } + } + else if (Main.rand.Next(80) == 0 && (double) this.localAI[3] == 0.0) + { + this.localAI[3] = 200f; + this.direction *= -1; + this.netUpdate = true; + } + } + } + else if ((double) this.ai[0] == 1.0) + { + if (Main.netMode != 1 & flag1 && this.AI_007_TownEntities_IsInAGoodRestingSpot(index1, index2, floorX, floorY) && !NPCID.Sets.TownCritter[this.type]) + { + this.ai[0] = 0.0f; + this.ai[1] = (float) (200 + Main.rand.Next(200)); + this.localAI[3] = 60f; + this.netUpdate = true; + } + else + { + bool currentlyDrowning = !canBreathUnderWater && Collision.DrownCollision(this.position, this.width, this.height, 1f, true); + if (!currentlyDrowning) + { + if (Main.netMode != 1 && !this.homeless && !Main.tileDungeon[(int) Main.tile[index1, index2].type] && (index1 < floorX - 35 || index1 > floorX + 35)) + { + if ((double) this.position.X < (double) (floorX * 16) && this.direction == -1) + this.ai[1] -= 5f; + else if ((double) this.position.X > (double) (floorX * 16) && this.direction == 1) + this.ai[1] -= 5f; + } + --this.ai[1]; + } + if ((double) this.ai[1] <= 0.0) + { + this.ai[0] = 0.0f; + this.ai[1] = (float) (300 + Main.rand.Next(300)); + this.ai[2] = 0.0f; + if (NPCID.Sets.TownCritter[this.type]) + this.ai[1] -= (float) Main.rand.Next(100); + else + this.ai[1] += (float) Main.rand.Next(900); + this.localAI[3] = 60f; + this.netUpdate = true; + } + if (this.closeDoor && (((double) this.position.X + (double) (this.width / 2)) / 16.0 > (double) (this.doorX + 2) || ((double) this.position.X + (double) (this.width / 2)) / 16.0 < (double) (this.doorX - 2))) + { + Tile tileSafely = Framing.GetTileSafely(this.doorX, this.doorY); + if (tileSafely.type == (ushort) 11) + { + if (WorldGen.CloseDoor(this.doorX, this.doorY)) + { + this.closeDoor = false; + NetMessage.SendData(19, number: 1, number2: ((float) this.doorX), number3: ((float) this.doorY), number4: ((float) this.direction)); + } + if (((double) this.position.X + (double) (this.width / 2)) / 16.0 > (double) (this.doorX + 4) || ((double) this.position.X + (double) (this.width / 2)) / 16.0 < (double) (this.doorX - 4) || ((double) this.position.Y + (double) (this.height / 2)) / 16.0 > (double) (this.doorY + 4) || ((double) this.position.Y + (double) (this.height / 2)) / 16.0 < (double) (this.doorY - 4)) + this.closeDoor = false; + } + else if (tileSafely.type == (ushort) 389) + { + if (WorldGen.ShiftTallGate(this.doorX, this.doorY, true)) + { + this.closeDoor = false; + NetMessage.SendData(19, number: 5, number2: ((float) this.doorX), number3: ((float) this.doorY)); + } + if (((double) this.position.X + (double) (this.width / 2)) / 16.0 > (double) (this.doorX + 4) || ((double) this.position.X + (double) (this.width / 2)) / 16.0 < (double) (this.doorX - 4) || ((double) this.position.Y + (double) (this.height / 2)) / 16.0 > (double) (this.doorY + 4) || ((double) this.position.Y + (double) (this.height / 2)) / 16.0 < (double) (this.doorY - 4)) + this.closeDoor = false; + } + else + this.closeDoor = false; + } + float num9 = 1f; + float num10 = 0.07f; + if (this.type == 614 & flag9) + { + num9 = 1.5f; + num10 = 0.1f; + } + else if (this.type == 299 || this.type == 539 || this.type == 538 || this.type >= 639 && this.type <= 645) + num9 = 1.5f; + else if (flag6) + { + if (this.wet) + { + num10 = 1f; + num9 = 2f; + } + else + { + num10 = 0.07f; + num9 = 0.5f; + } + } + if (this.type == 625) + { + if (this.wet) + { + num10 = 1f; + num9 = 2.5f; + } + else + { + num10 = 0.07f; + num9 = 0.2f; + } + } + if (flag5) + { + num9 = 2f; + num10 = 1f; + } + if (this.friendly && flag9 | currentlyDrowning) + { + num9 = 1.5f + (float) (1.0 - (double) this.life / (double) this.lifeMax) * 0.9f; + num10 = 0.1f; + } + if (flag7 && this.wet) + { + if ((double) Math.Abs(this.velocity.X) < 0.0500000007450581 && (double) Math.Abs(this.velocity.Y) < 0.0500000007450581) + this.velocity.X += num9 * 10f * (float) this.direction; + else + this.velocity.X *= 0.9f; + } + else if ((double) this.velocity.X < -(double) num9 || (double) this.velocity.X > (double) num9) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < (double) num9 && this.direction == 1) + { + this.velocity.X += num10; + if ((double) this.velocity.X > (double) num9) + this.velocity.X = num9; + } + else if ((double) this.velocity.X > -(double) num9 && this.direction == -1) + { + this.velocity.X -= num10; + if ((double) this.velocity.X > (double) num9) + this.velocity.X = num9; + } + bool holdsMatching = true; + if ((double) (this.homeTileY * 16 - 32) > (double) this.position.Y) + holdsMatching = false; + if (!holdsMatching && (double) this.velocity.Y == 0.0) + Collision.StepDown(ref this.position, ref this.velocity, this.width, this.height, ref this.stepSpeed, ref this.gfxOffY); + if ((double) this.velocity.Y >= 0.0) + Collision.StepUp(ref this.position, ref this.velocity, this.width, this.height, ref this.stepSpeed, ref this.gfxOffY, holdsMatching: holdsMatching, specialChecksMode: 1); + if ((double) this.velocity.Y == 0.0) + { + int num11 = (int) (((double) this.position.X + (double) (this.width / 2) + (double) (15 * this.direction)) / 16.0); + int num12 = (int) (((double) this.position.Y + (double) this.height - 16.0) / 16.0); + bool keepwalking; + bool avoidFalling; + this.AI_007_TownEntities_GetWalkPrediction(index1, floorX, canBreathUnderWater, currentlyDrowning, num11, num12, out keepwalking, out avoidFalling); + if (!avoidFalling && this.wet && !canBreathUnderWater && this.AI_007_TownEntities_CheckIfWillDrown(currentlyDrowning) && (double) this.localAI[3] <= 0.0) + { + avoidFalling = true; + this.localAI[3] = 600f; + } + if (avoidFalling) + { + int num13 = (int) (((double) this.position.X + (double) (this.width / 2)) / 16.0); + int num14 = 0; + for (int index9 = -1; index9 <= 1; ++index9) + { + Tile tileSafely = Framing.GetTileSafely(num13 + index9, num12 + 1); + if (tileSafely.nactive() && Main.tileSolid[(int) tileSafely.type]) + ++num14; + } + if (num14 <= 2) + { + if ((double) this.velocity.X != 0.0) + this.netUpdate = true; + keepwalking = avoidFalling = false; + this.ai[0] = 0.0f; + this.ai[1] = (float) (50 + Main.rand.Next(50)); + this.ai[2] = 0.0f; + this.localAI[3] = 40f; + } + } + if ((double) this.position.X == (double) this.localAI[3]) + { + this.direction *= -1; + this.netUpdate = true; + this.localAI[3] = 600f; + } + if (currentlyDrowning) + { + if ((double) this.localAI[3] > 0.0) + --this.localAI[3]; + } + else + this.localAI[3] = -1f; + Tile tileSafely1 = Framing.GetTileSafely(num11, num12); + Tile tileSafely2 = Framing.GetTileSafely(num11, num12 - 1); + Tile tileSafely3 = Framing.GetTileSafely(num11, num12 - 2); + bool flag12 = this.height / 16 < 3; + if (this.townNPC && tileSafely3.nactive() && (tileSafely3.type == (ushort) 10 || tileSafely3.type == (ushort) 388) && Main.rand.Next(10) == 0 | flag1) + { + if (Main.netMode != 1) + { + if (WorldGen.OpenDoor(num11, num12 - 2, this.direction)) + { + this.closeDoor = true; + this.doorX = num11; + this.doorY = num12 - 2; + NetMessage.SendData(19, number2: ((float) num11), number3: ((float) (num12 - 2)), number4: ((float) this.direction)); + this.netUpdate = true; + this.ai[1] += 80f; + } + else if (WorldGen.OpenDoor(num11, num12 - 2, -this.direction)) + { + this.closeDoor = true; + this.doorX = num11; + this.doorY = num12 - 2; + NetMessage.SendData(19, number2: ((float) num11), number3: ((float) (num12 - 2)), number4: ((float) -this.direction)); + this.netUpdate = true; + this.ai[1] += 80f; + } + else if (WorldGen.ShiftTallGate(num11, num12 - 2, false)) + { + this.closeDoor = true; + this.doorX = num11; + this.doorY = num12 - 2; + NetMessage.SendData(19, number: 4, number2: ((float) num11), number3: ((float) (num12 - 2))); + this.netUpdate = true; + this.ai[1] += 80f; + } + else + { + this.direction *= -1; + this.netUpdate = true; + } + } + } + else + { + if ((double) this.velocity.X < 0.0 && this.spriteDirection == -1 || (double) this.velocity.X > 0.0 && this.spriteDirection == 1) + { + bool flag13 = false; + bool flag14 = false; + if (tileSafely3.nactive() && Main.tileSolid[(int) tileSafely3.type] && !Main.tileSolidTop[(int) tileSafely3.type] && (!flag12 || tileSafely2.nactive() && Main.tileSolid[(int) tileSafely2.type] && !Main.tileSolidTop[(int) tileSafely2.type])) + { + if (!Collision.SolidTilesVersatile(num11 - this.direction * 2, num11 - this.direction, num12 - 5, num12 - 1) && !Collision.SolidTiles(num11, num11, num12 - 5, num12 - 3)) + { + this.velocity.Y = -6f; + this.netUpdate = true; + } + else if (flag5) + { + if (WorldGen.SolidTile((int) ((double) this.Center.X / 16.0) + this.direction, (int) ((double) this.Center.Y / 16.0))) + { + this.direction *= -1; + this.velocity.X *= 0.0f; + this.netUpdate = true; + } + } + else if (flag9) + { + flag14 = true; + flag13 = true; + } + else + flag13 = true; + } + else if (tileSafely2.nactive() && Main.tileSolid[(int) tileSafely2.type] && !Main.tileSolidTop[(int) tileSafely2.type]) + { + if (!Collision.SolidTilesVersatile(num11 - this.direction * 2, num11 - this.direction, num12 - 4, num12 - 1) && !Collision.SolidTiles(num11, num11, num12 - 4, num12 - 2)) + { + this.velocity.Y = -5f; + this.netUpdate = true; + } + else if (flag9) + { + flag14 = true; + flag13 = true; + } + else + flag13 = true; + } + else if ((double) this.position.Y + (double) this.height - (double) (num12 * 16) > 20.0 && tileSafely1.nactive() && Main.tileSolid[(int) tileSafely1.type] && !tileSafely1.topSlope()) + { + if (!Collision.SolidTilesVersatile(num11 - this.direction * 2, num11, num12 - 3, num12 - 1)) + { + this.velocity.Y = -4.4f; + this.netUpdate = true; + } + else if (flag9) + { + flag14 = true; + flag13 = true; + } + else + flag13 = true; + } + else if (avoidFalling) + { + flag13 = true; + if (flag9) + flag14 = true; + } + if (flag14) + { + keepwalking = false; + this.velocity.X = 0.0f; + this.ai[0] = 8f; + this.ai[1] = 240f; + this.netUpdate = true; + } + if (flag13) + { + this.direction *= -1; + this.velocity.X *= -1f; + this.netUpdate = true; + } + if (keepwalking) + { + this.ai[1] = 90f; + this.netUpdate = true; + } + if ((double) this.velocity.Y < 0.0) + this.localAI[3] = this.position.X; + } + if ((double) this.velocity.Y < 0.0 && this.wet) + this.velocity.Y *= 1.2f; + if ((double) this.velocity.Y < 0.0 && NPCID.Sets.TownCritter[this.type] && !flag5) + this.velocity.Y *= 1.2f; + } + } + } + } + else if ((double) this.ai[0] == 2.0 || (double) this.ai[0] == 11.0) + { + if (Main.netMode != 1) + { + --this.localAI[3]; + if (Main.rand.Next(60) == 0 && (double) this.localAI[3] == 0.0) + { + this.localAI[3] = 60f; + this.direction *= -1; + this.netUpdate = true; + } + } + --this.ai[1]; + this.velocity.X *= 0.8f; + if ((double) this.ai[1] <= 0.0) + { + this.localAI[3] = 40f; + this.ai[0] = 0.0f; + this.ai[1] = (float) (60 + Main.rand.Next(60)); + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 3.0 || (double) this.ai[0] == 4.0 || (double) this.ai[0] == 5.0 || (double) this.ai[0] == 8.0 || (double) this.ai[0] == 9.0 || (double) this.ai[0] == 16.0 || (double) this.ai[0] == 17.0 || (double) this.ai[0] == 20.0 || (double) this.ai[0] == 21.0 || (double) this.ai[0] == 22.0 || (double) this.ai[0] == 23.0) + { + this.velocity.X *= 0.8f; + --this.ai[1]; + if ((double) this.ai[0] == 8.0 && (double) this.ai[1] < 60.0 & flag9) + { + this.ai[1] = 180f; + this.netUpdate = true; + } + if ((double) this.ai[0] == 5.0) + { + Point tileCoordinates = (this.Bottom + Vector2.UnitY * -2f).ToTileCoordinates(); + Tile tile = Main.tile[tileCoordinates.X, tileCoordinates.Y]; + if (tile.type != (ushort) 15 && tile.type != (ushort) 497) + this.ai[1] = 0.0f; + else + Main.sittingManager.AddNPC(this.whoAmI, tileCoordinates); + } + if ((double) this.ai[1] <= 0.0) + { + this.ai[0] = 0.0f; + this.ai[1] = (float) (60 + Main.rand.Next(60)); + this.ai[2] = 0.0f; + this.localAI[3] = (float) (30 + Main.rand.Next(60)); + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 6.0 || (double) this.ai[0] == 7.0 || (double) this.ai[0] == 18.0 || (double) this.ai[0] == 19.0) + { + if ((double) this.ai[0] == 18.0 && ((double) this.localAI[3] < 1.0 || (double) this.localAI[3] > 2.0)) + this.localAI[3] = 2f; + this.velocity.X *= 0.8f; + --this.ai[1]; + int index10 = (int) this.ai[2]; + if (index10 < 0 || index10 > (int) byte.MaxValue || !Main.player[index10].CanBeTalkedTo || (double) Main.player[index10].Distance(this.Center) > 200.0 || !Collision.CanHitLine(this.Top, 0, 0, Main.player[index10].Top, 0, 0)) + this.ai[1] = 0.0f; + if ((double) this.ai[1] > 0.0) + { + int num15 = (double) this.Center.X < (double) Main.player[index10].Center.X ? 1 : -1; + if (num15 != this.direction) + this.netUpdate = true; + this.direction = num15; + } + else + { + this.ai[0] = 0.0f; + this.ai[1] = (float) (60 + Main.rand.Next(60)); + this.ai[2] = 0.0f; + this.localAI[3] = (float) (30 + Main.rand.Next(60)); + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 10.0) + { + int Type = 0; + int num16 = 0; + float KnockBack = 0.0f; + float num17 = 0.0f; + int num18 = 0; + int num19 = 0; + int maxValue2 = 0; + float num20 = 0.0f; + float num21 = (float) NPCID.Sets.DangerDetectRange[this.type]; + float max = 0.0f; + if ((double) NPCID.Sets.AttackTime[this.type] == (double) this.ai[1]) + { + this.frameCounter = 0.0; + this.localAI[3] = 0.0f; + } + if (this.type == 38) + { + Type = 30; + num17 = 6f; + num16 = 20; + num18 = 10; + num19 = 180; + maxValue2 = 120; + num20 = 16f; + KnockBack = 7f; + } + else if (this.type == 633) + { + Type = 880; + num17 = 24f; + num16 = 15; + num18 = 1; + num20 = 0.0f; + KnockBack = 7f; + num19 = 15; + maxValue2 = 10; + if (this.ShouldBestiaryGirlBeLycantrope()) + { + Type = 929; + num16 = (int) ((double) num16 * 1.5); + } + } + else if (this.type == 550) + { + Type = 669; + num17 = 6f; + num16 = 24; + num18 = 10; + num19 = 120; + maxValue2 = 60; + num20 = 16f; + KnockBack = 9f; + } + else if (this.type == 588) + { + Type = 721; + num17 = 8f; + num16 = 15; + num18 = 5; + num19 = 20; + maxValue2 = 10; + num20 = 16f; + KnockBack = 9f; + } + else if (this.type == 208) + { + Type = 588; + num17 = 6f; + num16 = 30; + num18 = 10; + num19 = 60; + maxValue2 = 120; + num20 = 16f; + KnockBack = 6f; + } + else if (this.type == 17) + { + Type = 48; + num17 = 9f; + num16 = 12; + num18 = 10; + num19 = 60; + maxValue2 = 60; + num20 = 16f; + KnockBack = 1.5f; + } + else if (this.type == 369) + { + Type = 520; + num17 = 12f; + num16 = 10; + num18 = 10; + num19 = 0; + maxValue2 = 1; + num20 = 16f; + KnockBack = 3f; + } + else if (this.type == 453) + { + Type = 21; + num17 = 14f; + num16 = 14; + num18 = 10; + num19 = 0; + maxValue2 = 1; + num20 = 16f; + KnockBack = 3f; + } + else if (this.type == 107) + { + Type = 24; + num17 = 5f; + num16 = 15; + num18 = 10; + num19 = 60; + maxValue2 = 60; + num20 = 16f; + KnockBack = 1f; + } + else if (this.type == 124) + { + Type = 582; + num17 = 10f; + num16 = 11; + num18 = 1; + num19 = 30; + maxValue2 = 30; + KnockBack = 3.5f; + } + else if (this.type == 18) + { + Type = 583; + num17 = 8f; + num16 = 8; + num18 = 1; + num19 = 15; + maxValue2 = 10; + KnockBack = 2f; + num20 = 10f; + } + else if (this.type == 142) + { + Type = 589; + num17 = 7f; + num16 = 22; + num18 = 1; + num19 = 10; + maxValue2 = 1; + KnockBack = 2f; + num20 = 10f; + } + if (Main.expertMode) + num16 = (int) ((double) num16 * (double) Main.GameModeInfo.TownNPCDamageMultiplier); + int Damage = (int) ((double) num16 * (double) num1); + this.velocity.X *= 0.8f; + --this.ai[1]; + ++this.localAI[3]; + if ((double) this.localAI[3] == (double) num18 && Main.netMode != 1) + { + Vector2 vec = -Vector2.UnitY; + if (num6 == 1 && this.spriteDirection == 1 && index7 != -1) + vec = this.DirectionTo(Main.npc[index7].Center + new Vector2(0.0f, -num20 * MathHelper.Clamp(this.Distance(Main.npc[index7].Center) / num21, 0.0f, 1f))); + if (num6 == -1 && this.spriteDirection == -1 && index6 != -1) + vec = this.DirectionTo(Main.npc[index6].Center + new Vector2(0.0f, -num20 * MathHelper.Clamp(this.Distance(Main.npc[index6].Center) / num21, 0.0f, 1f))); + if (vec.HasNaNs() || Math.Sign(vec.X) != this.spriteDirection) + vec = new Vector2((float) this.spriteDirection, -1f); + Vector2 vector2 = vec * num17 + Utils.RandomVector2(Main.rand, -max, max); + int index11 = this.type != 124 ? (this.type != 142 ? Projectile.NewProjectile(this.Center.X + (float) (this.spriteDirection * 16), this.Center.Y - 2f, vector2.X, vector2.Y, Type, Damage, KnockBack, Main.myPlayer) : Projectile.NewProjectile(this.Center.X + (float) (this.spriteDirection * 16), this.Center.Y - 2f, vector2.X, vector2.Y, Type, Damage, KnockBack, Main.myPlayer, ai1: ((float) Main.rand.Next(5)))) : Projectile.NewProjectile(this.Center.X + (float) (this.spriteDirection * 16), this.Center.Y - 2f, vector2.X, vector2.Y, Type, Damage, KnockBack, Main.myPlayer, ai1: ((float) this.whoAmI)); + Main.projectile[index11].npcProj = true; + Main.projectile[index11].noDropItem = true; + if (this.type == 588) + Main.projectile[index11].timeLeft = 480; + } + if ((double) this.ai[1] <= 0.0) + { + this.ai[0] = (double) this.localAI[2] == 8.0 & flag9 ? 8f : 0.0f; + this.ai[1] = (float) (num19 + Main.rand.Next(maxValue2)); + this.ai[2] = 0.0f; + this.localAI[1] = this.localAI[3] = (float) (num19 / 2 + Main.rand.Next(maxValue2)); + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 12.0) + { + int Type = 0; + int num22 = 0; + float num23 = 0.0f; + int num24 = 0; + int num25 = 0; + int maxValue3 = 0; + float KnockBack = 0.0f; + int num26 = 0; + bool flag15 = false; + float max = 0.0f; + if ((double) NPCID.Sets.AttackTime[this.type] == (double) this.ai[1]) + { + this.frameCounter = 0.0; + this.localAI[3] = 0.0f; + } + int index12 = -1; + if (num6 == 1 && this.spriteDirection == 1) + index12 = index7; + if (num6 == -1 && this.spriteDirection == -1) + index12 = index6; + if (this.type == 19) + { + Type = 14; + num23 = 13f; + num22 = 24; + num25 = 14; + maxValue3 = 4; + KnockBack = 3f; + num24 = 1; + max = 0.5f; + if ((double) NPCID.Sets.AttackTime[this.type] == (double) this.ai[1]) + { + this.frameCounter = 0.0; + this.localAI[3] = 0.0f; + } + if (Main.hardMode) + { + num22 = 15; + if ((double) this.localAI[3] > (double) num24) + { + num24 = 10; + flag15 = true; + } + if ((double) this.localAI[3] > (double) num24) + { + num24 = 20; + flag15 = true; + } + if ((double) this.localAI[3] > (double) num24) + { + num24 = 30; + flag15 = true; + } + } + } + else if (this.type == 227) + { + Type = 587; + num23 = 10f; + num22 = 8; + num25 = 10; + maxValue3 = 1; + KnockBack = 1.75f; + num24 = 1; + max = 0.5f; + if ((double) this.localAI[3] > (double) num24) + { + num24 = 12; + flag15 = true; + } + if ((double) this.localAI[3] > (double) num24) + { + num24 = 24; + flag15 = true; + } + if (Main.hardMode) + num22 += 2; + } + else if (this.type == 368) + { + Type = 14; + num23 = 13f; + num22 = 24; + num25 = 12; + maxValue3 = 5; + KnockBack = 2f; + num24 = 1; + max = 0.2f; + if (Main.hardMode) + { + num22 = 30; + Type = 357; + } + } + else if (this.type == 22) + { + num23 = 10f; + num22 = 8; + num24 = 1; + if (Main.hardMode) + { + Type = 2; + num25 = 15; + maxValue3 = 10; + num22 += 6; + } + else + { + Type = 1; + num25 = 30; + maxValue3 = 20; + } + KnockBack = 2.75f; + num26 = 4; + max = 0.7f; + } + else if (this.type == 228) + { + Type = 267; + num23 = 14f; + num22 = 20; + num24 = 1; + num25 = 10; + maxValue3 = 1; + KnockBack = 3f; + num26 = 6; + max = 0.4f; + } + else if (this.type == 178) + { + Type = 242; + num23 = 13f; + num22 = 15; + num25 = 10; + maxValue3 = 1; + KnockBack = 2f; + num24 = 1; + if ((double) this.localAI[3] > (double) num24) + { + num24 = 8; + flag15 = true; + } + if ((double) this.localAI[3] > (double) num24) + { + num24 = 16; + flag15 = true; + } + max = 0.3f; + } + else if (this.type == 229) + { + Type = 14; + num23 = 14f; + num22 = 24; + num25 = 10; + maxValue3 = 1; + KnockBack = 2f; + num24 = 1; + max = 0.7f; + if ((double) this.localAI[3] > (double) num24) + { + num24 = 16; + flag15 = true; + } + if ((double) this.localAI[3] > (double) num24) + { + num24 = 24; + flag15 = true; + } + if ((double) this.localAI[3] > (double) num24) + { + num24 = 32; + flag15 = true; + } + if ((double) this.localAI[3] > (double) num24) + { + num24 = 40; + flag15 = true; + } + if ((double) this.localAI[3] > (double) num24) + { + num24 = 48; + flag15 = true; + } + if ((double) this.localAI[3] == 0.0 && index12 != -1 && (double) this.Distance(Main.npc[index12].Center) < (double) NPCID.Sets.PrettySafe[this.type]) + { + max = 0.1f; + Type = 162; + num22 = 50; + KnockBack = 10f; + num23 = 24f; + } + } + else if (this.type == 209) + { + Type = Utils.SelectRandom(Main.rand, 134, 133, 135); + num24 = 1; + switch (Type) + { + case 133: + num23 = 10f; + num22 = 25; + num25 = 10; + maxValue3 = 1; + KnockBack = 6f; + max = 0.2f; + break; + case 134: + num23 = 13f; + num22 = 20; + num25 = 20; + maxValue3 = 10; + KnockBack = 4f; + max = 0.1f; + break; + case 135: + num23 = 12f; + num22 = 30; + num25 = 30; + maxValue3 = 10; + KnockBack = 7f; + max = 0.2f; + break; + } + } + if (Main.expertMode) + num22 = (int) ((double) num22 * (double) Main.GameModeInfo.TownNPCDamageMultiplier); + int Damage = (int) ((double) num22 * (double) num1); + this.velocity.X *= 0.8f; + --this.ai[1]; + ++this.localAI[3]; + if ((double) this.localAI[3] == (double) num24 && Main.netMode != 1) + { + Vector2 vec = Vector2.Zero; + if (index12 != -1) + vec = this.DirectionTo(Main.npc[index12].Center + new Vector2(0.0f, (float) -num26)); + if (vec.HasNaNs() || Math.Sign(vec.X) != this.spriteDirection) + vec = new Vector2((float) this.spriteDirection, 0.0f); + Vector2 vector2 = vec * num23 + Utils.RandomVector2(Main.rand, -max, max); + int index13 = this.type != 227 ? Projectile.NewProjectile(this.Center.X + (float) (this.spriteDirection * 16), this.Center.Y - 2f, vector2.X, vector2.Y, Type, Damage, KnockBack, Main.myPlayer) : Projectile.NewProjectile(this.Center.X + (float) (this.spriteDirection * 16), this.Center.Y - 2f, vector2.X, vector2.Y, Type, Damage, KnockBack, Main.myPlayer, ai1: ((float) Main.rand.Next(12) / 6f)); + Main.projectile[index13].npcProj = true; + Main.projectile[index13].noDropItem = true; + } + if ((double) this.localAI[3] == (double) num24 & flag15 && index12 != -1) + { + Vector2 vector2 = this.DirectionTo(Main.npc[index12].Center); + if ((double) vector2.Y <= 0.5 && (double) vector2.Y >= -0.5) + this.ai[2] = vector2.Y; + } + if ((double) this.ai[1] <= 0.0) + { + this.ai[0] = (double) this.localAI[2] == 8.0 & flag9 ? 8f : 0.0f; + this.ai[1] = (float) (num25 + Main.rand.Next(maxValue3)); + this.ai[2] = 0.0f; + this.localAI[1] = this.localAI[3] = (float) (num25 / 2 + Main.rand.Next(maxValue3)); + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 13.0) + { + this.velocity.X *= 0.8f; + if ((double) NPCID.Sets.AttackTime[this.type] == (double) this.ai[1]) + this.frameCounter = 0.0; + --this.ai[1]; + ++this.localAI[3]; + if ((double) this.localAI[3] == 1.0 && Main.netMode != 1) + { + Vector2 vec = this.DirectionTo(Main.npc[(int) this.ai[2]].Center + new Vector2(0.0f, -20f)); + if (vec.HasNaNs() || Math.Sign(vec.X) == -this.spriteDirection) + vec = new Vector2((float) this.spriteDirection, -1f); + Vector2 vector2 = vec * 8f; + int index14 = Projectile.NewProjectile(this.Center.X + (float) (this.spriteDirection * 16), this.Center.Y - 2f, vector2.X, vector2.Y, 584, 0, 0.0f, Main.myPlayer, this.ai[2]); + Main.projectile[index14].npcProj = true; + Main.projectile[index14].noDropItem = true; + } + if ((double) this.ai[1] <= 0.0) + { + this.ai[0] = 0.0f; + this.ai[1] = (float) (10 + Main.rand.Next(10)); + this.ai[2] = 0.0f; + this.localAI[3] = (float) (5 + Main.rand.Next(10)); + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 14.0) + { + int Type = 0; + int num27 = 0; + float num28 = 0.0f; + int num29 = 0; + int num30 = 0; + int maxValue4 = 0; + float KnockBack = 0.0f; + float num31 = 0.0f; + float num32 = (float) NPCID.Sets.DangerDetectRange[this.type]; + float num33 = 1f; + float max = 0.0f; + if ((double) NPCID.Sets.AttackTime[this.type] == (double) this.ai[1]) + { + this.frameCounter = 0.0; + this.localAI[3] = 0.0f; + } + int index15 = -1; + if (num6 == 1 && this.spriteDirection == 1) + index15 = index7; + if (num6 == -1 && this.spriteDirection == -1) + index15 = index6; + if (this.type == 54) + { + Type = 585; + num28 = 10f; + num27 = 16; + num29 = 30; + num30 = 20; + maxValue4 = 15; + KnockBack = 2f; + max = 1f; + } + else if (this.type == 108) + { + Type = 15; + num28 = 6f; + num27 = 18; + num29 = 15; + num30 = 15; + maxValue4 = 5; + KnockBack = 3f; + num31 = 20f; + } + else if (this.type == 160) + { + Type = 590; + num27 = 40; + num29 = 15; + num30 = 10; + maxValue4 = 1; + KnockBack = 3f; + while ((double) this.localAI[3] > (double) num29) + num29 += 15; + } + else if (this.type == 20) + { + Type = 586; + num29 = 24; + num30 = 10; + maxValue4 = 1; + KnockBack = 3f; + } + if (Main.expertMode) + num27 = (int) ((double) num27 * (double) Main.GameModeInfo.TownNPCDamageMultiplier); + int Damage = (int) ((double) num27 * (double) num1); + this.velocity.X *= 0.8f; + --this.ai[1]; + ++this.localAI[3]; + if ((double) this.localAI[3] == (double) num29 && Main.netMode != 1) + { + Vector2 vec = Vector2.Zero; + if (index15 != -1) + vec = this.DirectionTo(Main.npc[index15].Center + new Vector2(0.0f, -num31 * MathHelper.Clamp(this.Distance(Main.npc[index15].Center) / num32, 0.0f, 1f))); + if (vec.HasNaNs() || Math.Sign(vec.X) != this.spriteDirection) + vec = new Vector2((float) this.spriteDirection, 0.0f); + Vector2 vector2_1 = vec * num28 + Utils.RandomVector2(Main.rand, -max, max); + if (this.type == 108) + { + int num34 = Utils.SelectRandom(Main.rand, 1, 1, 1, 1, 2, 2, 3); + for (int index16 = 0; index16 < num34; ++index16) + { + Vector2 vector2_2 = Utils.RandomVector2(Main.rand, -3.4f, 3.4f); + int index17 = Projectile.NewProjectile(this.Center.X + (float) (this.spriteDirection * 16), this.Center.Y - 2f, vector2_1.X + vector2_2.X, vector2_1.Y + vector2_2.Y, Type, Damage, KnockBack, Main.myPlayer); + Main.projectile[index17].npcProj = true; + Main.projectile[index17].noDropItem = true; + } + } + else if (this.type == 160) + { + if (index15 != -1) + { + Vector2 vector2_3 = Main.npc[index15].position - Main.npc[index15].Size * 2f + Main.npc[index15].Size * Utils.RandomVector2(Main.rand, 0.0f, 1f) * 5f; + for (int index18 = 10; index18 > 0 && WorldGen.SolidTile(Framing.GetTileSafely((int) vector2_3.X / 16, (int) vector2_3.Y / 16)); vector2_3 = Main.npc[index15].position - Main.npc[index15].Size * 2f + Main.npc[index15].Size * Utils.RandomVector2(Main.rand, 0.0f, 1f) * 5f) + --index18; + int index19 = Projectile.NewProjectile(vector2_3.X, vector2_3.Y, 0.0f, 0.0f, Type, Damage, KnockBack, Main.myPlayer); + Main.projectile[index19].npcProj = true; + Main.projectile[index19].noDropItem = true; + } + } + else if (this.type == 20) + { + int index20 = Projectile.NewProjectile(this.Center.X + (float) (this.spriteDirection * 16), this.Center.Y - 2f, vector2_1.X, vector2_1.Y, Type, Damage, KnockBack, Main.myPlayer, ai1: ((float) this.whoAmI)); + Main.projectile[index20].npcProj = true; + Main.projectile[index20].noDropItem = true; + } + else + { + int index21 = Projectile.NewProjectile(this.Center.X + (float) (this.spriteDirection * 16), this.Center.Y - 2f, vector2_1.X, vector2_1.Y, Type, Damage, KnockBack, Main.myPlayer); + Main.projectile[index21].npcProj = true; + Main.projectile[index21].noDropItem = true; + } + } + if ((double) num33 > 0.0) + { + Vector3 vector3 = NPCID.Sets.MagicAuraColor[this.type].ToVector3() * num33; + Lighting.AddLight(this.Center, vector3.X, vector3.Y, vector3.Z); + } + if ((double) this.ai[1] <= 0.0) + { + this.ai[0] = (double) this.localAI[2] == 8.0 & flag9 ? 8f : 0.0f; + this.ai[1] = (float) (num30 + Main.rand.Next(maxValue4)); + this.ai[2] = 0.0f; + this.localAI[1] = this.localAI[3] = (float) (num30 / 2 + Main.rand.Next(maxValue4)); + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 15.0) + { + int num35 = 0; + int maxValue5 = 0; + if ((double) NPCID.Sets.AttackTime[this.type] == (double) this.ai[1]) + { + this.frameCounter = 0.0; + this.localAI[3] = 0.0f; + } + int num36 = 0; + float num37 = 0.0f; + int num38 = 0; + int num39 = 0; + if (num6 == 1) + { + int spriteDirection1 = this.spriteDirection; + } + if (num6 == -1) + { + int spriteDirection2 = this.spriteDirection; + } + if (this.type == 207) + { + num36 = 11; + num38 = num39 = 32; + num35 = 12; + maxValue5 = 6; + num37 = 4.25f; + } + else if (this.type == 441) + { + num36 = 9; + num38 = num39 = 28; + num35 = 9; + maxValue5 = 3; + num37 = 3.5f; + } + else if (this.type == 353) + { + num36 = 10; + num38 = num39 = 32; + num35 = 15; + maxValue5 = 8; + num37 = 5f; + } + else if (this.type == 637 || this.type == 638 || this.type == 656) + { + num36 = 10; + num38 = num39 = 32; + num35 = 15; + maxValue5 = 8; + num37 = 3f; + } + if (Main.expertMode) + num36 = (int) ((double) num36 * (double) Main.GameModeInfo.TownNPCDamageMultiplier); + int Damage = (int) ((double) num36 * (double) num1); + this.velocity.X *= 0.8f; + --this.ai[1]; + if (Main.netMode != 1) + { + Tuple swingStats = this.GetSwingStats(NPCID.Sets.AttackTime[this.type] * 2, (int) this.ai[1], this.spriteDirection, num38, num39); + Microsoft.Xna.Framework.Rectangle itemRectangle = new Microsoft.Xna.Framework.Rectangle((int) swingStats.Item1.X, (int) swingStats.Item1.Y, num38, num39); + if (this.spriteDirection == -1) + itemRectangle.X -= num38; + itemRectangle.Y -= num39; + this.TweakSwingStats(NPCID.Sets.AttackTime[this.type] * 2, (int) this.ai[1], this.spriteDirection, ref itemRectangle); + int player = Main.myPlayer; + for (int number = 0; number < 200; ++number) + { + NPC npc = Main.npc[number]; + if (npc.active && npc.immune[player] == 0 && !npc.dontTakeDamage && !npc.friendly && npc.damage > 0 && itemRectangle.Intersects(npc.Hitbox) && (npc.noTileCollide || Collision.CanHit(this.position, this.width, this.height, npc.position, npc.width, npc.height))) + { + npc.StrikeNPCNoInteraction(Damage, num37, this.spriteDirection); + if (Main.netMode != 0) + NetMessage.SendData(28, number: number, number2: ((float) Damage), number3: num37, number4: ((float) this.spriteDirection)); + npc.netUpdate = true; + npc.immune[player] = (int) this.ai[1] + 2; + } + } + } + if ((double) this.ai[1] <= 0.0) + { + bool flag16 = false; + if (flag9) + { + if (!Collision.CanHit(this.Center, 0, 0, this.Center + Vector2.UnitX * (float) -num6 * 32f, 0, 0) || (double) this.localAI[2] == 8.0) + flag16 = true; + if (flag16) + { + int num40 = NPCID.Sets.AttackTime[this.type]; + int index22 = num6 == 1 ? index7 : index6; + int index23 = num6 == 1 ? index6 : index7; + if (index22 != -1 && !Collision.CanHit(this.Center, 0, 0, Main.npc[index22].Center, 0, 0)) + index22 = index23 == -1 || !Collision.CanHit(this.Center, 0, 0, Main.npc[index23].Center, 0, 0) ? -1 : index23; + if (index22 != -1) + { + this.ai[0] = 15f; + this.ai[1] = (float) num40; + this.ai[2] = 0.0f; + this.localAI[3] = 0.0f; + this.direction = (double) this.position.X < (double) Main.npc[index22].position.X ? 1 : -1; + this.netUpdate = true; + } + else + flag16 = false; + } + } + if (!flag16) + { + this.ai[0] = (double) this.localAI[2] == 8.0 & flag9 ? 8f : 0.0f; + this.ai[1] = (float) (num35 + Main.rand.Next(maxValue5)); + this.ai[2] = 0.0f; + this.localAI[1] = this.localAI[3] = (float) (num35 / 2 + Main.rand.Next(maxValue5)); + this.netUpdate = true; + } + } + } + if (flag8 && this.wet) + { + if (flag7) + this.ai[1] = 50f; + if (this.collideX) + { + this.direction *= -1; + this.velocity.X *= -0.25f; + } + float waterLineHeight; + if (Collision.GetWaterLine(this.Center.ToTileCoordinates(), out waterLineHeight)) + { + float num41 = this.Center.Y + 1f; + if ((double) this.Center.Y > (double) waterLineHeight) + { + this.velocity.Y -= 0.8f; + if ((double) this.velocity.Y < -4.0) + this.velocity.Y = -4f; + if ((double) num41 + (double) this.velocity.Y < (double) waterLineHeight) + this.velocity.Y = waterLineHeight - num41; + } + else + this.velocity.Y = MathHelper.Min(this.velocity.Y, waterLineHeight - num41); + } + else + this.velocity.Y -= 0.2f; + } + if (Main.netMode == 1 || !this.isLikeATownNPC || flag3) + return; + bool flag17 = (double) this.ai[0] < 2.0 && !flag9; + bool flag18 = ((double) this.ai[0] < 2.0 || (double) this.ai[0] == 8.0) && flag9 | flag10; + if ((double) this.localAI[1] > 0.0) + --this.localAI[1]; + if ((double) this.localAI[1] > 0.0) + flag18 = false; + if (flag18 && this.type == 124 && (double) this.localAI[0] == 1.0) + flag18 = false; + if (flag18 && this.type == 20) + { + flag18 = false; + for (int index24 = 0; index24 < 200; ++index24) + { + NPC npc = Main.npc[index24]; + if (npc.active && npc.townNPC && (double) this.Distance(npc.Center) <= 1200.0 && npc.FindBuffIndex(165) == -1) + { + flag18 = true; + break; + } + } + } + if (this.CanTalk & flag17 && (double) this.ai[0] == 0.0 && (double) this.velocity.Y == 0.0 && Main.rand.Next(300) == 0) + { + int num42 = 420; + int num43 = Main.rand.Next(2) != 0 ? num42 * Main.rand.Next(1, 3) : num42 * Main.rand.Next(1, 4); + int num44 = 100; + int num45 = 20; + for (int index25 = 0; index25 < 200; ++index25) + { + NPC npc = Main.npc[index25]; + bool flag19 = (double) npc.ai[0] == 1.0 && npc.closeDoor || (double) npc.ai[0] == 1.0 && (double) npc.ai[1] > 200.0 || (double) npc.ai[0] > 1.0; + if (npc != this && npc.active && npc.CanBeTalkedTo && !flag19 && (double) npc.Distance(this.Center) < (double) num44 && (double) npc.Distance(this.Center) > (double) num45 && Collision.CanHit(this.Center, 0, 0, npc.Center, 0, 0)) + { + int directionInt = ((double) this.position.X < (double) npc.position.X).ToDirectionInt(); + this.ai[0] = 3f; + this.ai[1] = (float) num43; + this.ai[2] = (float) index25; + this.direction = directionInt; + this.netUpdate = true; + npc.ai[0] = 4f; + npc.ai[1] = (float) num43; + npc.ai[2] = (float) this.whoAmI; + npc.direction = -directionInt; + npc.netUpdate = true; + break; + } + } + } + else if (this.CanTalk & flag17 && (double) this.ai[0] == 0.0 && (double) this.velocity.Y == 0.0 && Main.rand.Next(1800) == 0) + { + int num46 = 420; + int num47 = Main.rand.Next(2) != 0 ? num46 * Main.rand.Next(1, 3) : num46 * Main.rand.Next(1, 4); + int num48 = 100; + int num49 = 20; + for (int index26 = 0; index26 < 200; ++index26) + { + NPC npc = Main.npc[index26]; + bool flag20 = (double) npc.ai[0] == 1.0 && npc.closeDoor || (double) npc.ai[0] == 1.0 && (double) npc.ai[1] > 200.0 || (double) npc.ai[0] > 1.0; + if (npc != this && npc.active && npc.CanBeTalkedTo && !NPCID.Sets.IsTownPet[npc.type] && !flag20 && (double) npc.Distance(this.Center) < (double) num48 && (double) npc.Distance(this.Center) > (double) num49 && Collision.CanHit(this.Center, 0, 0, npc.Center, 0, 0)) + { + int directionInt = ((double) this.position.X < (double) npc.position.X).ToDirectionInt(); + this.ai[0] = 16f; + this.ai[1] = (float) num47; + this.ai[2] = (float) index26; + this.localAI[2] = (float) Main.rand.Next(4); + this.localAI[3] = (float) Main.rand.Next(3 - (int) this.localAI[2]); + this.direction = directionInt; + this.netUpdate = true; + npc.ai[0] = 17f; + npc.ai[1] = (float) num47; + npc.ai[2] = (float) this.whoAmI; + npc.localAI[2] = 0.0f; + npc.localAI[3] = 0.0f; + npc.direction = -directionInt; + npc.netUpdate = true; + break; + } + } + } + else if (!NPCID.Sets.IsTownPet[this.type] & flag17 && (double) this.ai[0] == 0.0 && (double) this.velocity.Y == 0.0 && Main.rand.Next(1200) == 0 && (this.type == 208 || BirthdayParty.PartyIsUp && NPCID.Sets.AttackType[this.type] == NPCID.Sets.AttackType[208])) + { + int num50 = 300; + int num51 = 150; + for (int index27 = 0; index27 < (int) byte.MaxValue; ++index27) + { + Player player = Main.player[index27]; + if (player.active && !player.dead && (double) player.Distance(this.Center) < (double) num51 && Collision.CanHitLine(this.Top, 0, 0, player.Top, 0, 0)) + { + int directionInt = ((double) this.position.X < (double) player.position.X).ToDirectionInt(); + this.ai[0] = 6f; + this.ai[1] = (float) num50; + this.ai[2] = (float) index27; + this.direction = directionInt; + this.netUpdate = true; + break; + } + } + } + else if (flag17 && (double) this.ai[0] == 0.0 && (double) this.velocity.Y == 0.0 && Main.rand.Next(600) == 0 && this.type == 550) + { + int num52 = 300; + int num53 = 150; + for (int index28 = 0; index28 < (int) byte.MaxValue; ++index28) + { + Player player = Main.player[index28]; + if (player.active && !player.dead && (double) player.Distance(this.Center) < (double) num53 && Collision.CanHitLine(this.Top, 0, 0, player.Top, 0, 0)) + { + int directionInt = ((double) this.position.X < (double) player.position.X).ToDirectionInt(); + this.ai[0] = 18f; + this.ai[1] = (float) num52; + this.ai[2] = (float) index28; + this.direction = directionInt; + this.netUpdate = true; + break; + } + } + } + else if (!NPCID.Sets.IsTownPet[this.type] & flag17 && (double) this.ai[0] == 0.0 && (double) this.velocity.Y == 0.0 && Main.rand.Next(1800) == 0) + { + this.ai[0] = 2f; + this.ai[1] = (float) (45 * Main.rand.Next(1, 2)); + this.netUpdate = true; + } + else if (flag17 && (double) this.ai[0] == 0.0 && (double) this.velocity.Y == 0.0 && Main.rand.Next(600) == 0 && this.type == 229 && !flag10) + { + this.ai[0] = 11f; + this.ai[1] = (float) (30 * Main.rand.Next(1, 4)); + this.netUpdate = true; + } + else if (flag17 && (double) this.ai[0] == 0.0 && (double) this.velocity.Y == 0.0 && Main.rand.Next(1200) == 0) + { + int num54 = 220; + int num55 = 150; + for (int index29 = 0; index29 < (int) byte.MaxValue; ++index29) + { + Player player = Main.player[index29]; + if (player.CanBeTalkedTo && (double) player.Distance(this.Center) < (double) num55 && Collision.CanHitLine(this.Top, 0, 0, player.Top, 0, 0)) + { + int directionInt = ((double) this.position.X < (double) player.position.X).ToDirectionInt(); + this.ai[0] = 7f; + this.ai[1] = (float) num54; + this.ai[2] = (float) index29; + this.direction = directionInt; + this.netUpdate = true; + break; + } + } + } + else if (flag17 && (double) this.ai[0] == 1.0 && (double) this.velocity.Y == 0.0 && maxValue1 > 0 && Main.rand.Next(maxValue1) == 0) + { + Point tileCoordinates = (this.Bottom + Vector2.UnitY * -2f).ToTileCoordinates(); + bool flag21 = WorldGen.InWorld(tileCoordinates.X, tileCoordinates.Y, 1); + if (flag21) + { + for (int index30 = 0; index30 < 200; ++index30) + { + if (Main.npc[index30].active && Main.npc[index30].aiStyle == 7 && Main.npc[index30].townNPC && (double) Main.npc[index30].ai[0] == 5.0 && (Main.npc[index30].Bottom + Vector2.UnitY * -2f).ToTileCoordinates() == tileCoordinates) + { + flag21 = false; + break; + } + } + for (int index31 = 0; index31 < (int) byte.MaxValue; ++index31) + { + if (Main.player[index31].active && Main.player[index31].sitting.isSitting && Main.player[index31].Center.ToTileCoordinates() == tileCoordinates) + { + flag21 = false; + break; + } + } + } + if (flag21) + { + Tile tile = Main.tile[tileCoordinates.X, tileCoordinates.Y]; + bool flag22 = tile.type == (ushort) 15 || tile.type == (ushort) 497; + if (flag22 && tile.type == (ushort) 15 && tile.frameY == (short) 1098) + flag22 = false; + if (flag22) + { + this.ai[0] = 5f; + this.ai[1] = (float) (900 + Main.rand.Next(10800)); + this.direction = tile.frameX == (short) 0 ? -1 : 1; + this.Bottom = new Vector2((float) (tileCoordinates.X * 16 + 8 + 2 * this.direction), (float) (tileCoordinates.Y * 16 + 16)); + this.velocity = Vector2.Zero; + this.localAI[3] = 0.0f; + this.netUpdate = true; + } + } + } + else if (flag17 && (double) this.ai[0] == 1.0 && (double) this.velocity.Y == 0.0 && Main.rand.Next(600) == 0 && Utils.PlotTileLine(this.Top, this.Bottom, (float) this.width, new Utils.TileActionAttempt(DelegateMethods.SearchAvoidedByNPCs))) + { + Point tileCoordinates = (this.Center + new Vector2((float) (this.direction * 10), 0.0f)).ToTileCoordinates(); + bool flag23 = WorldGen.InWorld(tileCoordinates.X, tileCoordinates.Y, 1); + if (flag23) + { + Tile tileSafely = Framing.GetTileSafely(tileCoordinates.X, tileCoordinates.Y); + if (!tileSafely.nactive() || !TileID.Sets.InteractibleByNPCs[(int) tileSafely.type]) + flag23 = false; + } + if (flag23) + { + this.ai[0] = 9f; + this.ai[1] = (float) (40 + Main.rand.Next(90)); + this.velocity = Vector2.Zero; + this.localAI[3] = 0.0f; + this.netUpdate = true; + } + } + if (Main.netMode != 1 && (double) this.ai[0] < 2.0 && (double) this.velocity.Y == 0.0 && this.type == 18 && this.breath > 0) + { + int index32 = -1; + for (int index33 = 0; index33 < 200; ++index33) + { + NPC npc = Main.npc[index33]; + if (npc.active && npc.townNPC && npc.life != npc.lifeMax && (index32 == -1 || npc.lifeMax - npc.life > Main.npc[index32].lifeMax - Main.npc[index32].life) && Collision.CanHitLine(this.position, this.width, this.height, npc.position, npc.width, npc.height) && (double) this.Distance(npc.Center) < 500.0) + index32 = index33; + } + if (index32 != -1) + { + this.ai[0] = 13f; + this.ai[1] = 34f; + this.ai[2] = (float) index32; + this.localAI[3] = 0.0f; + this.direction = (double) this.position.X < (double) Main.npc[index32].position.X ? 1 : -1; + this.netUpdate = true; + } + } + if (flag18 && (double) this.velocity.Y == 0.0 && NPCID.Sets.AttackType[this.type] == 0 && NPCID.Sets.AttackAverageChance[this.type] > 0 && Main.rand.Next(NPCID.Sets.AttackAverageChance[this.type] * 2) == 0) + { + int num56 = NPCID.Sets.AttackTime[this.type]; + int index34 = num6 == 1 ? index7 : index6; + int index35 = num6 == 1 ? index6 : index7; + if (index34 != -1 && !Collision.CanHit(this.Center, 0, 0, Main.npc[index34].Center, 0, 0)) + index34 = index35 == -1 || !Collision.CanHit(this.Center, 0, 0, Main.npc[index35].Center, 0, 0) ? -1 : index35; + bool flag24 = index34 != -1; + if (flag24 && this.type == 633) + flag24 = (double) Vector2.Distance(this.Center, Main.npc[index34].Center) <= 50.0; + if (flag24) + { + this.localAI[2] = this.ai[0]; + this.ai[0] = 10f; + this.ai[1] = (float) num56; + this.ai[2] = 0.0f; + this.localAI[3] = 0.0f; + this.direction = (double) this.position.X < (double) Main.npc[index34].position.X ? 1 : -1; + this.netUpdate = true; + } + } + else if (flag18 && (double) this.velocity.Y == 0.0 && NPCID.Sets.AttackType[this.type] == 1 && NPCID.Sets.AttackAverageChance[this.type] > 0 && Main.rand.Next(NPCID.Sets.AttackAverageChance[this.type] * 2) == 0) + { + int num57 = NPCID.Sets.AttackTime[this.type]; + int index36 = num6 == 1 ? index7 : index6; + int index37 = num6 == 1 ? index6 : index7; + if (index36 != -1 && !Collision.CanHitLine(this.Center, 0, 0, Main.npc[index36].Center, 0, 0)) + index36 = index37 == -1 || !Collision.CanHitLine(this.Center, 0, 0, Main.npc[index37].Center, 0, 0) ? -1 : index37; + if (index36 != -1) + { + Vector2 vector2 = this.DirectionTo(Main.npc[index36].Center); + if ((double) vector2.Y <= 0.5 && (double) vector2.Y >= -0.5) + { + this.localAI[2] = this.ai[0]; + this.ai[0] = 12f; + this.ai[1] = (float) num57; + this.ai[2] = vector2.Y; + this.localAI[3] = 0.0f; + this.direction = (double) this.position.X < (double) Main.npc[index36].position.X ? 1 : -1; + this.netUpdate = true; + } + } + } + if (flag18 && (double) this.velocity.Y == 0.0 && NPCID.Sets.AttackType[this.type] == 2 && NPCID.Sets.AttackAverageChance[this.type] > 0 && Main.rand.Next(NPCID.Sets.AttackAverageChance[this.type] * 2) == 0) + { + int num58 = NPCID.Sets.AttackTime[this.type]; + int index38 = num6 == 1 ? index7 : index6; + int index39 = num6 == 1 ? index6 : index7; + if (index38 != -1 && !Collision.CanHitLine(this.Center, 0, 0, Main.npc[index38].Center, 0, 0)) + index38 = index39 == -1 || !Collision.CanHitLine(this.Center, 0, 0, Main.npc[index39].Center, 0, 0) ? -1 : index39; + if (index38 != -1) + { + this.localAI[2] = this.ai[0]; + this.ai[0] = 14f; + this.ai[1] = (float) num58; + this.ai[2] = 0.0f; + this.localAI[3] = 0.0f; + this.direction = (double) this.position.X < (double) Main.npc[index38].position.X ? 1 : -1; + this.netUpdate = true; + } + else if (this.type == 20) + { + this.localAI[2] = this.ai[0]; + this.ai[0] = 14f; + this.ai[1] = (float) num58; + this.ai[2] = 0.0f; + this.localAI[3] = 0.0f; + this.netUpdate = true; + } + } + if (!flag18 || (double) this.velocity.Y != 0.0 || NPCID.Sets.AttackType[this.type] != 3 || NPCID.Sets.AttackAverageChance[this.type] <= 0 || Main.rand.Next(NPCID.Sets.AttackAverageChance[this.type] * 2) != 0) + return; + int num59 = NPCID.Sets.AttackTime[this.type]; + int index40 = num6 == 1 ? index7 : index6; + int index41 = num6 == 1 ? index6 : index7; + if (index40 != -1 && !Collision.CanHit(this.Center, 0, 0, Main.npc[index40].Center, 0, 0)) + index40 = index41 == -1 || !Collision.CanHit(this.Center, 0, 0, Main.npc[index41].Center, 0, 0) ? -1 : index41; + if (index40 == -1) + return; + this.localAI[2] = this.ai[0]; + this.ai[0] = 15f; + this.ai[1] = (float) num59; + this.ai[2] = 0.0f; + this.localAI[3] = 0.0f; + this.direction = (double) this.position.X < (double) Main.npc[index40].position.X ? 1 : -1; + this.netUpdate = true; + } + } + } + + private void AI_007_TownEntities_GetWalkPrediction( + int myTileX, + int homeFloorX, + bool canBreathUnderWater, + bool currentlyDrowning, + int tileX, + int tileY, + out bool keepwalking, + out bool avoidFalling) + { + keepwalking = false; + avoidFalling = true; + bool flag = myTileX >= homeFloorX - 35 && myTileX <= homeFloorX + 35; + if (this.townNPC && (double) this.ai[1] < 30.0) + { + keepwalking = !Utils.PlotTileLine(this.Top, this.Bottom, (float) this.width, new Utils.TileActionAttempt(DelegateMethods.SearchAvoidedByNPCs)); + if (!keepwalking) + { + Microsoft.Xna.Framework.Rectangle hitbox = this.Hitbox; + hitbox.X -= 20; + hitbox.Width += 40; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].friendly && index != this.whoAmI && (double) Main.npc[index].velocity.X == 0.0 && hitbox.Intersects(Main.npc[index].Hitbox)) + { + keepwalking = true; + break; + } + } + } + } + if (!keepwalking & currentlyDrowning) + keepwalking = true; + if (avoidFalling && (NPCID.Sets.TownCritter[this.type] || !flag && this.direction == Math.Sign(homeFloorX - myTileX))) + avoidFalling = false; + if (!avoidFalling) + return; + int num = 0; + for (int index = -1; index <= 4; ++index) + { + Tile tileSafely = Framing.GetTileSafely(tileX - this.direction * num, tileY + index); + if (tileSafely.lava() && tileSafely.liquid > (byte) 0) + { + avoidFalling = true; + break; + } + if (tileSafely.nactive() && Main.tileSolid[(int) tileSafely.type]) + { + avoidFalling = false; + break; + } + } + } + + private bool AI_007_TownEntities_CheckIfWillDrown(bool currentlyDrowning) + { + bool flag1 = currentlyDrowning; + bool flag2 = false; + if (!flag1) + flag2 = Collision.DrownCollision(this.position + new Vector2((float) (this.width * this.direction), 0.0f), this.width, this.height, 1f); + return flag2 || Collision.DrownCollision(this.position + new Vector2((float) (this.width * this.direction), (float) (this.height * 2 - 16 - (flag1 ? 16 : 0))), this.width, 16 + (flag1 ? 16 : 0), 1f); + } + + private void AI_007_AttemptToPlayIdleAnimationsForPets(int petIdleChance) + { + if ((double) this.velocity.X != 0.0 || Main.netMode == 1 || Main.rand.Next(petIdleChance) != 0) + return; + int num = 3; + if (this.type == 638) + num = 2; + this.ai[0] = (float) Main.rand.Next(20, 20 + num); + this.ai[1] = (float) (200 + Main.rand.Next(300)); + if ((double) this.ai[0] == 20.0 && this.type == 637) + this.ai[1] = (float) (500 + Main.rand.Next(200)); + if ((double) this.ai[0] == 21.0 && this.type == 638) + this.ai[1] = (float) (100 + Main.rand.Next(100)); + if ((double) this.ai[0] == 22.0 && this.type == 656) + this.ai[1] = (float) (200 + Main.rand.Next(200)); + this.ai[2] = 0.0f; + this.localAI[3] = 0.0f; + this.netUpdate = true; + } + + public bool NPCCanStickToWalls() + { + int num1 = (int) this.Center.X / 16; + int num2 = (int) this.Center.Y / 16; + int num3 = 0; + for (int i = num1 - 1; i <= num1 + 1; ++i) + { + for (int j = num2 - 1; j <= num2 + 1; ++j) + { + Tile tileSafely = Framing.GetTileSafely(i, j); + if ((!tileSafely.active() || !Main.tileSolid[(int) tileSafely.type] || TileID.Sets.Platforms[(int) tileSafely.type]) && tileSafely.wall > (ushort) 0) + { + ++num3; + if (num3 > 4) + return true; + } + } + } + return false; + } + + private void AI_003_Fighters() + { + if ((double) Main.player[this.target].position.Y + (double) Main.player[this.target].height == (double) this.position.Y + (double) this.height) + this.directionY = -1; + bool flag1 = false; + if (this.type == 624) + { + int num = (int) ((double) this.Center.X / 16.0); + int j = (int) ((double) this.Bottom.Y / 16.0); + if (Main.dayTime && WorldGen.InAPlaceWithWind(this.position, this.width, this.height)) + { + this.position = this.position + this.netOffset; + int index1 = Dust.NewDust(this.position, this.width, this.height, 43, Alpha: 254, newColor: Color.White, Scale: 0.5f); + Main.dust[index1].velocity *= 0.2f; + this.position = this.position - this.netOffset; + if (WorldGen.SolidTileAllowBottomSlope(num, j)) + { + for (int index2 = 0; index2 < 5; ++index2) + { + this.position = this.position + this.netOffset; + int index3 = Dust.NewDust(this.position, this.width, this.height, 43, Alpha: 254, newColor: Color.White, Scale: 0.5f); + Main.dust[index3].velocity *= 0.2f; + this.position = this.position - this.netOffset; + } + if (Main.netMode != 1 && TileObject.CanPlace(num, j - 1, 567, 0, this.direction, out TileObject _, true) && WorldGen.PlaceTile(num, j - 1, 567, style: Main.rand.Next(5))) + { + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, num, j - 1, 3); + if (Main.netMode != 1) + { + if (this.IsNPCValidForBestiaryKillCredit()) + Main.BestiaryTracker.Kills.RegisterKill(this); + this.CountKillForBannersAndDropThem(); + } + this.life = 0; + this.active = false; + return; + } + } + } + } + if (this.type == 466) + { + int num = 200; + if ((double) this.ai[2] == 0.0) + { + this.alpha = num; + this.TargetClosest(); + if (!Main.player[this.target].dead && (double) (Main.player[this.target].Center - this.Center).Length() < 170.0) + this.ai[2] = -16f; + if ((double) this.velocity.X == 0.0 && (double) this.velocity.Y >= 0.0 && (double) this.velocity.Y <= 2.0 && !this.justHit) + return; + this.ai[2] = -16f; + return; + } + if ((double) this.ai[2] < 0.0) + { + if (this.alpha > 0) + { + this.alpha -= num / 16; + if (this.alpha < 0) + this.alpha = 0; + } + ++this.ai[2]; + if ((double) this.ai[2] != 0.0) + return; + this.ai[2] = 1f; + this.velocity.X = (float) (this.direction * 2); + return; + } + this.alpha = 0; + } + if (this.type == 166) + { + if (Main.netMode != 1 && Main.rand.Next(240) == 0) + { + this.ai[2] = (float) Main.rand.Next(-480, -60); + this.netUpdate = true; + } + if ((double) this.ai[2] < 0.0) + { + this.TargetClosest(); + if (this.justHit) + this.ai[2] = 0.0f; + if (Collision.CanHit(this.Center, 1, 1, Main.player[this.target].Center, 1, 1)) + this.ai[2] = 0.0f; + } + if ((double) this.ai[2] < 0.0) + { + this.velocity.X *= 0.9f; + if ((double) this.velocity.X > -0.1 && (double) this.velocity.X < 0.1) + this.velocity.X = 0.0f; + ++this.ai[2]; + if ((double) this.ai[2] != 0.0) + return; + this.velocity.X = (float) this.direction * 0.1f; + return; + } + } + if (this.type == 461) + { + if (this.wet) + { + this.knockBackResist = 0.0f; + this.ai[3] = -0.10101f; + this.noGravity = true; + Vector2 center = this.Center; + this.width = 34; + this.height = 24; + this.position.X = center.X - (float) (this.width / 2); + this.position.Y = center.Y - (float) (this.height / 2); + this.TargetClosest(); + if (this.collideX) + this.velocity.X = -this.oldVelocity.X; + if ((double) this.velocity.X < 0.0) + this.direction = -1; + if ((double) this.velocity.X > 0.0) + this.direction = 1; + if (Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].Center, 1, 1)) + { + Vector2 vector2 = Main.player[this.target].Center - this.Center; + vector2.Normalize(); + this.velocity = (this.velocity * 19f + vector2 * 5f) / 20f; + return; + } + float num = 5f; + if ((double) this.velocity.Y > 0.0) + num = 3f; + if ((double) this.velocity.Y < 0.0) + num = 8f; + Vector2 vector2_1 = new Vector2((float) this.direction, -1f); + vector2_1.Normalize(); + vector2_1 *= num; + if ((double) num < 5.0) + { + this.velocity = (this.velocity * 24f + vector2_1) / 25f; + return; + } + this.velocity = (this.velocity * 9f + vector2_1) / 10f; + return; + } + this.knockBackResist = 0.4f * Main.GameModeInfo.KnockbackToEnemiesMultiplier; + this.noGravity = false; + Vector2 center1 = this.Center; + this.width = 18; + this.height = 40; + this.position.X = center1.X - (float) (this.width / 2); + this.position.Y = center1.Y - (float) (this.height / 2); + if ((double) this.ai[3] == -0.101010002195835) + { + this.ai[3] = 0.0f; + float num = this.velocity.Length() * 2f; + if ((double) num > 10.0) + num = 10f; + this.velocity.Normalize(); + this.velocity = this.velocity * num; + if ((double) this.velocity.X < 0.0) + this.direction = -1; + if ((double) this.velocity.X > 0.0) + this.direction = 1; + this.spriteDirection = this.direction; + } + } + if (this.type == 586) + { + if (this.alpha == (int) byte.MaxValue) + { + this.TargetClosest(); + this.spriteDirection = this.direction; + this.velocity.Y = -6f; + this.netUpdate = true; + for (int index = 0; index < 35; ++index) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 5); + dust.velocity *= 1f; + dust.scale = (float) (1.0 + (double) Main.rand.NextFloat() * 0.5); + dust.fadeIn = (float) (1.5 + (double) Main.rand.NextFloat() * 0.5); + dust.velocity += this.velocity * 0.5f; + } + } + this.alpha -= 15; + if (this.alpha < 0) + this.alpha = 0; + this.position = this.position + this.netOffset; + if (this.alpha != 0) + { + for (int index = 0; index < 2; ++index) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 5); + dust.velocity *= 1f; + dust.scale = (float) (1.0 + (double) Main.rand.NextFloat() * 0.5); + dust.fadeIn = (float) (1.5 + (double) Main.rand.NextFloat() * 0.5); + dust.velocity += this.velocity * 0.3f; + } + } + if (Main.rand.Next(3) == 0) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 5); + dust.velocity *= 0.0f; + dust.alpha = 120; + dust.scale = (float) (0.699999988079071 + (double) Main.rand.NextFloat() * 0.5); + dust.velocity += this.velocity * 0.3f; + } + this.position = this.position - this.netOffset; + if (this.wet) + { + this.knockBackResist = 0.0f; + this.ai[3] = -0.10101f; + this.noGravity = true; + Vector2 center = this.Center; + this.position.X = center.X - (float) (this.width / 2); + this.position.Y = center.Y - (float) (this.height / 2); + this.TargetClosest(); + if (this.collideX) + this.velocity.X = -this.oldVelocity.X; + if ((double) this.velocity.X < 0.0) + this.direction = -1; + if ((double) this.velocity.X > 0.0) + this.direction = 1; + if (Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].Center, 1, 1)) + { + Vector2 vector2_2 = Main.player[this.target].Center - this.Center; + vector2_2.Normalize(); + float num = MathHelper.Clamp(1f + Math.Abs(this.Center.Y - Main.player[this.target].Center.Y) / 40f, 5f, 20f); + Vector2 vector2_3 = vector2_2 * num; + if ((double) this.velocity.Y > 0.0) + { + this.velocity = (this.velocity * 29f + vector2_3) / 30f; + return; + } + this.velocity = (this.velocity * 4f + vector2_3) / 5f; + return; + } + float num1 = 5f; + if ((double) this.velocity.Y > 0.0) + num1 = 3f; + if ((double) this.velocity.Y < 0.0) + num1 = 8f; + Vector2 vector2 = new Vector2((float) this.direction, -1f); + vector2.Normalize(); + vector2 *= num1; + if ((double) num1 < 5.0) + { + this.velocity = (this.velocity * 24f + vector2) / 25f; + return; + } + this.velocity = (this.velocity * 9f + vector2) / 10f; + return; + } + this.noGravity = false; + Vector2 center2 = this.Center; + this.position.X = center2.X - (float) (this.width / 2); + this.position.Y = center2.Y - (float) (this.height / 2); + if ((double) this.ai[3] == -0.101010002195835) + { + this.ai[3] = 0.0f; + float num = this.velocity.Length() * 2f; + if ((double) num > 15.0) + num = 15f; + this.velocity.Normalize(); + this.velocity = this.velocity * num; + if ((double) this.velocity.X < 0.0) + this.direction = -1; + if ((double) this.velocity.X > 0.0) + this.direction = 1; + this.spriteDirection = this.direction; + } + } + if (this.type == 379 || this.type == 380) + { + if ((double) this.ai[3] < 0.0) + { + this.directionY = -1; + this.damage = 0; + this.velocity.X *= 0.93f; + if ((double) this.velocity.X > -0.1 && (double) this.velocity.X < 0.1) + this.velocity.X = 0.0f; + int index = (int) (-(double) this.ai[3] - 1.0); + int num = Math.Sign(Main.npc[index].Center.X - this.Center.X); + if (num != this.direction) + { + this.velocity.X = 0.0f; + this.direction = num; + this.netUpdate = true; + } + if (this.justHit && Main.netMode != 1 && (double) Main.npc[index].localAI[0] == 0.0) + Main.npc[index].localAI[0] = 1f; + if ((double) this.ai[0] < 1000.0) + this.ai[0] = 1000f; + if ((double) ++this.ai[0] < 1300.0) + return; + this.ai[0] = 1000f; + this.netUpdate = true; + return; + } + if ((double) this.ai[0] >= 1000.0) + this.ai[0] = 0.0f; + this.damage = this.defDamage; + } + if (this.type == 383 && (double) this.ai[2] == 0.0 && (double) this.localAI[0] == 0.0 && Main.netMode != 1) + { + int index = NPC.NewNPC((int) this.Center.X, (int) this.Center.Y, 384, this.whoAmI); + this.ai[2] = (float) (index + 1); + this.localAI[0] = -1f; + this.netUpdate = true; + Main.npc[index].ai[0] = (float) this.whoAmI; + Main.npc[index].netUpdate = true; + } + if (this.type == 383) + { + int index = (int) this.ai[2] - 1; + if (index != -1 && Main.npc[index].active && Main.npc[index].type == 384) + { + this.dontTakeDamage = true; + } + else + { + this.dontTakeDamage = false; + this.ai[2] = 0.0f; + if ((double) this.localAI[0] == -1.0) + this.localAI[0] = 180f; + if ((double) this.localAI[0] > 0.0) + --this.localAI[0]; + } + } + if (this.type == 482) + { + int num2 = 300; + int num3 = 120; + this.dontTakeDamage = false; + if ((double) this.ai[2] < 0.0) + { + this.dontTakeDamage = true; + ++this.ai[2]; + this.velocity.X *= 0.9f; + if ((double) Math.Abs(this.velocity.X) < 0.001) + this.velocity.X = 1f / 1000f * (float) this.direction; + if ((double) Math.Abs(this.velocity.Y) > 1.0) + this.ai[2] += 10f; + if ((double) this.ai[2] < 0.0) + return; + this.netUpdate = true; + this.velocity.X += (float) this.direction * 0.3f; + return; + } + if ((double) this.ai[2] < (double) num2) + { + if (this.justHit) + this.ai[2] += 15f; + ++this.ai[2]; + } + else if ((double) this.velocity.Y == 0.0) + { + this.ai[2] = (float) -num3; + this.netUpdate = true; + } + } + Microsoft.Xna.Framework.Rectangle hitbox; + if (this.type == 631) + { + if (this.target < 0 || this.target == (int) byte.MaxValue || Main.player[this.target].dead || !Main.player[this.target].active) + this.TargetClosest((double) this.ai[2] > 0.0); + Player player = Main.player[this.target]; + bool flag2 = !player.dead && player.active && (double) this.Center.Distance(player.Center) < 320.0; + int num4 = 24; + if ((double) this.ai[2] == 0.0) + { + this.ai[3] = 65f; + if (flag2 && Collision.CanHit((Entity) player, (Entity) this)) + { + this.ai[2] = 100f; + this.ai[3] = 0.0f; + this.velocity.X = (float) this.direction * 0.01f; + this.netUpdate = true; + } + } + else + { + if ((double) this.ai[2] < 100.0) + { + ++this.ai[2]; + this.velocity.X *= 0.9f; + if ((double) Math.Abs(this.velocity.X) < 0.001) + this.velocity.X = 0.0f; + if ((double) Math.Abs(this.velocity.Y) > 1.0) + this.ai[2] = 0.0f; + if ((double) this.ai[2] == (double) (100 - num4 / 2) && Main.netMode != 1 && !player.Hitbox.Intersects(this.Hitbox) && Collision.CanHit((Entity) player, (Entity) this)) + { + float num5 = 10f; + Vector2 center = this.Center; + Vector2 vec = this.DirectionTo(Main.player[this.target].Center) * num5; + if (vec.HasNaNs()) + vec = new Vector2((float) this.direction * num5, 0.0f); + int Damage = this.damage / 4; + Vector2 vector2 = (vec + Utils.RandomVector2(Main.rand, -0.8f, 0.8f)).SafeNormalize(Vector2.Zero) * num5; + Projectile.NewProjectile(center.X, center.Y, vector2.X, vector2.Y, 909, Damage, 1f, Main.myPlayer); + } + if ((double) this.ai[2] < 100.0) + return; + this.ai[2] = 100f; + this.ai[3] = 0.0f; + this.velocity.X = (float) this.direction * 0.01f; + this.netUpdate = true; + return; + } + if ((double) this.velocity.Y == 0.0 && flag2) + { + hitbox = player.Hitbox; + if (hitbox.Intersects(this.Hitbox) || Collision.CanHit((Entity) player, (Entity) this)) + { + this.ai[2] = (float) (100 - num4); + this.netUpdate = true; + } + } + } + } + if (this.type == 480) + { + int num6 = 180; + int num7 = 300; + int num8 = 180; + int num9 = 60; + int num10 = 20; + if (this.life < this.lifeMax / 3) + { + num6 = 120; + num7 = 240; + num8 = 240; + num9 = 90; + } + if ((double) this.ai[2] > 0.0) + --this.ai[2]; + else if ((double) this.ai[2] == 0.0) + { + if (((double) Main.player[this.target].Center.X < (double) this.Center.X && this.direction < 0 || (double) Main.player[this.target].Center.X > (double) this.Center.X && this.direction > 0) && (double) this.velocity.Y == 0.0 && (double) this.Distance(Main.player[this.target].Center) < 900.0 && Collision.CanHit(this.Center, 1, 1, Main.player[this.target].Center, 1, 1)) + { + this.ai[2] = (float) (-num8 - num10); + this.netUpdate = true; + } + } + else + { + if ((double) this.ai[2] < 0.0 && (double) this.ai[2] < (double) -num8) + { + this.position = this.position + this.netOffset; + this.velocity.X *= 0.9f; + if ((double) this.velocity.Y < -2.0 || (double) this.velocity.Y > 4.0 || this.justHit) + { + this.ai[2] = (float) num6; + } + else + { + ++this.ai[2]; + if ((double) this.ai[2] == 0.0) + this.ai[2] = (float) num7; + } + float num11 = this.ai[2] + (float) num8 + (float) num10; + if ((double) num11 == 1.0) + SoundEngine.PlaySound(4, (int) this.position.X, (int) this.position.Y, 17); + if ((double) num11 < (double) num10) + { + Vector2 Position = this.Top + new Vector2((float) (this.spriteDirection * 6), 6f); + float num12 = MathHelper.Lerp(20f, 30f, (float) (((double) num11 * 3.0 + 50.0) / 182.0)); + double num13 = (double) Main.rand.NextFloat(); + for (float num14 = 0.0f; (double) num14 < 2.0; ++num14) + { + Vector2 vector2 = Vector2.UnitY.RotatedByRandom(6.28318548202515) * (float) ((double) Main.rand.NextFloat() * 0.5 + 0.5); + Dust dust = Main.dust[Dust.NewDust(Position, 0, 0, 228)]; + dust.position = Position + vector2 * num12; + dust.noGravity = true; + dust.velocity = vector2 * 2f; + dust.scale = (float) (0.5 + (double) Main.rand.NextFloat() * 0.5); + } + } + Lighting.AddLight(this.Center, 0.9f, 0.75f, 0.1f); + this.position = this.position - this.netOffset; + return; + } + if ((double) this.ai[2] < 0.0 && (double) this.ai[2] >= (double) -num8) + { + this.position = this.position + this.netOffset; + Lighting.AddLight(this.Center, 0.9f, 0.75f, 0.1f); + this.velocity.X *= 0.9f; + if ((double) this.velocity.Y < -2.0 || (double) this.velocity.Y > 4.0 || this.justHit) + { + this.ai[2] = (float) num6; + } + else + { + ++this.ai[2]; + if ((double) this.ai[2] == 0.0) + this.ai[2] = (float) num7; + } + float num15 = this.ai[2] + (float) num8; + if ((double) num15 < 180.0 && (Main.rand.Next(3) == 0 || (double) this.ai[2] % 3.0 == 0.0)) + { + Vector2 Position = this.Top + new Vector2((float) (this.spriteDirection * 10), 10f); + float num16 = MathHelper.Lerp(20f, 30f, (float) (((double) num15 * 3.0 + 50.0) / 182.0)); + double num17 = (double) Main.rand.NextFloat(); + for (float num18 = 0.0f; (double) num18 < 1.0; ++num18) + { + Vector2 vector2 = Vector2.UnitY.RotatedByRandom(6.28318548202515) * (float) ((double) Main.rand.NextFloat() * 0.5 + 0.5); + Dust dust = Main.dust[Dust.NewDust(Position, 0, 0, 228)]; + dust.position = Position + vector2 * num16; + dust.noGravity = true; + dust.velocity = vector2 * 4f; + dust.scale = 0.5f + Main.rand.NextFloat(); + } + } + this.position = this.position - this.netOffset; + if (Main.netMode == 2) + return; + Player player1 = Main.player[Main.myPlayer]; + int player2 = Main.myPlayer; + if (player1.dead || !player1.active || player1.FindBuffIndex(156) != -1) + return; + Vector2 vector2_4 = player1.Center - this.Center; + if ((double) vector2_4.Length() >= 700.0) + return; + bool flag3 = (double) vector2_4.Length() < 30.0; + if (!flag3) + { + float x = 0.7853982f.ToRotationVector2().X; + Vector2 vector2_5 = Vector2.Normalize(vector2_4); + if ((double) vector2_5.X > (double) x || (double) vector2_5.X < -(double) x) + flag3 = true; + } + if (((double) player1.Center.X >= (double) this.Center.X || this.direction >= 0 || player1.direction <= 0) && ((double) player1.Center.X <= (double) this.Center.X || this.direction <= 0 || player1.direction >= 0) || !flag3 || (Collision.CanHitLine(this.Center, 1, 1, player1.Center, 1, 1) || Collision.CanHitLine(this.Center - Vector2.UnitY * 16f, 1, 1, player1.Center, 1, 1) ? 1 : (Collision.CanHitLine(this.Center + Vector2.UnitY * 8f, 1, 1, player1.Center, 1, 1) ? 1 : 0)) == 0 || player1.creativeGodMode) + return; + player1.AddBuff(156, num9 + (int) this.ai[2] * -1); + return; + } + } + } + if (this.type == 471) + { + if ((double) this.ai[3] < 0.0) + { + this.knockBackResist = 0.0f; + this.defense = (int) ((double) this.defDefense * 1.1); + this.noGravity = true; + this.noTileCollide = true; + if ((double) this.velocity.X < 0.0) + this.direction = -1; + else if ((double) this.velocity.X > 0.0) + this.direction = 1; + this.rotation = this.velocity.X * 0.1f; + if (Main.netMode != 1) + { + ++this.localAI[3]; + if ((double) this.localAI[3] > (double) Main.rand.Next(20, 180)) + { + this.localAI[3] = 0.0f; + Vector2 vector2 = this.Center + this.velocity; + NPC.NewNPC((int) vector2.X, (int) vector2.Y, 30); + } + } + } + else + { + this.localAI[3] = 0.0f; + this.knockBackResist = 0.35f * Main.GameModeInfo.KnockbackToEnemiesMultiplier; + this.rotation *= 0.9f; + this.defense = this.defDefense; + this.noGravity = false; + this.noTileCollide = false; + } + if ((double) this.ai[3] == 1.0) + { + this.knockBackResist = 0.0f; + this.defense += 10; + } + if ((double) this.ai[3] == -1.0) + { + this.TargetClosest(); + float num19 = 8f; + float num20 = 40f; + Vector2 vector2 = Main.player[this.target].Center - this.Center; + float num21 = vector2.Length(); + float num22 = num19 + num21 / 200f; + vector2.Normalize(); + vector2 *= num22; + this.velocity = (this.velocity * (num20 - 1f) + vector2) / num20; + if ((double) num21 >= 500.0 || Collision.SolidCollision(this.position, this.width, this.height)) + return; + this.ai[3] = 0.0f; + this.ai[2] = 0.0f; + return; + } + if ((double) this.ai[3] == -2.0) + { + this.velocity.Y -= 0.2f; + if ((double) this.velocity.Y < -10.0) + this.velocity.Y = -10f; + if ((double) Main.player[this.target].Center.Y - (double) this.Center.Y > 200.0) + { + this.TargetClosest(); + this.ai[3] = -3f; + this.ai[2] = (double) Main.player[this.target].Center.X <= (double) this.Center.X ? -1f : 1f; + } + this.velocity.X *= 0.99f; + return; + } + if ((double) this.ai[3] == -3.0) + { + if (this.direction == 0) + this.TargetClosest(); + if ((double) this.ai[2] == 0.0) + this.ai[2] = (float) this.direction; + this.velocity.Y *= 0.9f; + this.velocity.X += this.ai[2] * 0.3f; + if ((double) this.velocity.X > 10.0) + this.velocity.X = 10f; + if ((double) this.velocity.X < -10.0) + this.velocity.X = -10f; + float num = Main.player[this.target].Center.X - this.Center.X; + if ((double) this.ai[2] < 0.0 && (double) num > 300.0 || (double) this.ai[2] > 0.0 && (double) num < -300.0) + { + this.ai[3] = -4f; + this.ai[2] = 0.0f; + return; + } + if ((double) Math.Abs(num) <= 800.0) + return; + this.ai[3] = -1f; + this.ai[2] = 0.0f; + return; + } + if ((double) this.ai[3] == -4.0) + { + ++this.ai[2]; + this.velocity.Y += 0.1f; + if ((double) this.velocity.Length() > 4.0) + this.velocity = this.velocity * 0.9f; + int index4 = (int) this.Center.X / 16; + int index5 = (int) ((double) this.position.Y + (double) this.height + 12.0) / 16; + bool flag4 = false; + for (int index6 = index4 - 1; index6 <= index4 + 1; ++index6) + { + if (Main.tile[index6, index5] == null) + Main.tile[index4, index5] = new Tile(); + if (Main.tile[index6, index5].active() && Main.tileSolid[(int) Main.tile[index6, index5].type]) + flag4 = true; + } + if (flag4 && !Collision.SolidCollision(this.position, this.width, this.height)) + { + this.ai[3] = 0.0f; + this.ai[2] = 0.0f; + } + else if ((double) this.ai[2] > 300.0 || (double) this.Center.Y > (double) Main.player[this.target].Center.Y + 200.0) + { + this.ai[3] = -1f; + this.ai[2] = 0.0f; + } + } + else + { + if ((double) this.ai[3] == 1.0) + { + Vector2 center = this.Center; + center.Y -= 70f; + this.velocity.X *= 0.8f; + ++this.ai[2]; + if ((double) this.ai[2] == 60.0) + { + if (Main.netMode != 1) + NPC.NewNPC((int) center.X, (int) center.Y + 18, 472); + } + else if ((double) this.ai[2] >= 90.0) + { + this.ai[3] = -2f; + this.ai[2] = 0.0f; + } + for (int index7 = 0; index7 < 2; ++index7) + { + Vector2 vector2_6 = center; + Vector2 vector2_7 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + vector2_7.Normalize(); + Vector2 vector2_8 = vector2_7 * ((float) Main.rand.Next(0, 100) * 0.1f); + Vector2 vector2_9 = vector2_8; + Vector2 Position = vector2_6 + vector2_9; + vector2_8.Normalize(); + vector2_7 = vector2_8 * ((float) Main.rand.Next(50, 90) * 0.1f); + Color newColor = new Color(); + int index8 = Dust.NewDust(Position, 1, 1, 27, newColor: newColor); + Main.dust[index8].velocity = -vector2_7 * 0.3f; + Main.dust[index8].alpha = 100; + if (Main.rand.Next(2) == 0) + { + Main.dust[index8].noGravity = true; + Main.dust[index8].scale += 0.3f; + } + } + return; + } + ++this.ai[2]; + int num = 10; + if ((double) this.velocity.Y == 0.0 && NPC.CountNPCS(472) < num) + { + if ((double) this.ai[2] >= 180.0) + { + this.ai[2] = 0.0f; + this.ai[3] = 1f; + } + } + else + { + if (NPC.CountNPCS(472) >= num) + ++this.ai[2]; + if ((double) this.ai[2] >= 360.0) + { + this.ai[2] = 0.0f; + this.ai[3] = -2f; + this.velocity.Y -= 3f; + } + } + if (this.target >= 0 && !Main.player[this.target].dead && (double) (Main.player[this.target].Center - this.Center).Length() > 800.0) + { + this.ai[3] = -1f; + this.ai[2] = 0.0f; + } + } + if (Main.player[this.target].dead) + { + this.TargetClosest(); + if (Main.player[this.target].dead) + this.EncourageDespawn(1); + } + } + if (this.type == 419) + { + this.reflectsProjectiles = false; + this.takenDamageMultiplier = 1f; + int num23 = 6; + int num24 = 10; + float num25 = 16f; + if ((double) this.ai[2] > 0.0) + --this.ai[2]; + if ((double) this.ai[2] == 0.0) + { + if (((double) Main.player[this.target].Center.X < (double) this.Center.X && this.direction < 0 || (double) Main.player[this.target].Center.X > (double) this.Center.X && this.direction > 0) && Collision.CanHit(this.Center, 1, 1, Main.player[this.target].Center, 1, 1)) + { + this.ai[2] = -1f; + this.netUpdate = true; + this.TargetClosest(); + } + } + else + { + if ((double) this.ai[2] < 0.0 && (double) this.ai[2] > (double) -num23) + { + --this.ai[2]; + this.velocity.X *= 0.9f; + return; + } + if ((double) this.ai[2] == (double) -num23) + { + --this.ai[2]; + this.TargetClosest(); + Vector2 vec = this.DirectionTo(Main.player[this.target].Top + new Vector2(0.0f, -30f)); + if (vec.HasNaNs()) + vec = Vector2.Normalize(new Vector2((float) this.spriteDirection, -1f)); + this.velocity = vec * num25; + this.netUpdate = true; + return; + } + if ((double) this.ai[2] < (double) -num23) + { + --this.ai[2]; + if ((double) this.velocity.Y == 0.0) + this.ai[2] = 60f; + else if ((double) this.ai[2] < (double) (-num23 - num24)) + { + this.velocity.Y += 0.15f; + if ((double) this.velocity.Y > 24.0) + this.velocity.Y = 24f; + } + this.reflectsProjectiles = true; + this.takenDamageMultiplier = 3f; + if (!this.justHit) + return; + this.ai[2] = 60f; + this.netUpdate = true; + return; + } + } + } + if (this.type == 415) + { + int num26 = 42; + int num27 = 18; + if (this.justHit) + { + this.ai[2] = 120f; + this.netUpdate = true; + } + if ((double) this.ai[2] > 0.0) + --this.ai[2]; + if ((double) this.ai[2] == 0.0) + { + int num28 = 0; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 516) + ++num28; + } + if (num28 > 6) + this.ai[2] = 90f; + else if (((double) Main.player[this.target].Center.X < (double) this.Center.X && this.direction < 0 || (double) Main.player[this.target].Center.X > (double) this.Center.X && this.direction > 0) && Collision.CanHit(this.Center, 1, 1, Main.player[this.target].Center, 1, 1)) + { + this.ai[2] = -1f; + this.netUpdate = true; + this.TargetClosest(); + } + } + else if ((double) this.ai[2] < 0.0 && (double) this.ai[2] > (double) -num26) + { + --this.ai[2]; + if ((double) this.ai[2] == (double) -num26) + this.ai[2] = (float) (180 + 30 * Main.rand.Next(10)); + this.velocity.X *= 0.8f; + if ((double) this.ai[2] != (double) -num27 && (double) this.ai[2] != (double) (-num27 - 8) && (double) this.ai[2] != (double) (-num27 - 16)) + return; + this.position = this.position + this.netOffset; + for (int index = 0; index < 20; ++index) + { + Vector2 Position = this.Center + Vector2.UnitX * (float) this.spriteDirection * 40f; + Dust dust = Main.dust[Dust.NewDust(Position, 0, 0, 259)]; + Vector2 vector2 = Vector2.UnitY.RotatedByRandom(6.28318548202515); + dust.position = Position + vector2 * 4f; + dust.velocity = vector2 * 2f + Vector2.UnitX * Main.rand.NextFloat() * (float) this.spriteDirection * 3f; + dust.scale = (float) (0.300000011920929 + (double) vector2.X * (double) -this.spriteDirection); + dust.fadeIn = 0.7f; + dust.noGravity = true; + } + this.position = this.position - this.netOffset; + if ((double) this.velocity.X > -0.5 && (double) this.velocity.X < 0.5) + this.velocity.X = 0.0f; + if (Main.netMode == 1) + return; + NPC.NewNPC((int) this.Center.X + this.spriteDirection * 45, (int) this.Center.Y + 8, 516, Target: this.target); + return; + } + } + if (this.type == 428) + { + ++this.localAI[0]; + if ((double) this.localAI[0] >= 300.0) + { + int startX = (int) this.Center.X / 16 - 1; + int startY = (int) this.Center.Y / 16 - 1; + if (!Collision.SolidTiles(startX, startX + 2, startY, startY + 1) && Main.netMode != 1) + { + this.Transform(427); + this.life = this.lifeMax; + this.localAI[0] = 0.0f; + return; + } + } + int maxValue = (double) this.localAI[0] >= 60.0 ? ((double) this.localAI[0] >= 120.0 ? ((double) this.localAI[0] >= 180.0 ? ((double) this.localAI[0] >= 240.0 ? ((double) this.localAI[0] >= 300.0 ? 1 : 1) : 2) : 4) : 8) : 16; + if (Main.rand.Next(maxValue) == 0) + { + this.position = this.position + this.netOffset; + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 229)]; + dust.noGravity = true; + dust.scale = 1f; + dust.noLight = true; + dust.velocity = this.DirectionFrom(dust.position) * dust.velocity.Length(); + dust.position -= dust.velocity * 5f; + dust.position.X += (float) (this.direction * 6); + dust.position.Y += 4f; + this.position = this.position - this.netOffset; + } + } + if (this.type == 427) + { + ++this.localAI[0]; + this.localAI[0] += Math.Abs(this.velocity.X) / 2f; + if ((double) this.localAI[0] >= 1200.0 && Main.netMode != 1) + { + int startX = (int) this.Center.X / 16 - 2; + int startY = (int) this.Center.Y / 16 - 3; + if (!Collision.SolidTiles(startX, startX + 4, startY, startY + 4)) + { + this.Transform(426); + this.life = this.lifeMax; + this.localAI[0] = 0.0f; + return; + } + } + int maxValue = (double) this.localAI[0] >= 360.0 ? ((double) this.localAI[0] >= 720.0 ? ((double) this.localAI[0] >= 1080.0 ? ((double) this.localAI[0] >= 1440.0 ? ((double) this.localAI[0] >= 1800.0 ? 1 : 1) : 2) : 6) : 16) : 32; + if (Main.rand.Next(maxValue) == 0) + { + this.position = this.position + this.netOffset; + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 229)]; + dust.noGravity = true; + dust.scale = 1f; + dust.noLight = true; + this.position = this.position - this.netOffset; + } + } + if (this.type == 590) + { + this.position = this.position + this.netOffset; + int num29 = (int) ((double) this.position.Y + 6.0) / 16; + if (this.spriteDirection < 0) + { + int num30 = (int) ((double) this.Center.X - 22.0) / 16; + Tile tileSafely1 = Framing.GetTileSafely(num30, num29); + Tile tileSafely2 = Framing.GetTileSafely(num30 + 1, num29); + if (WorldGen.InWorld(num30, num29) && tileSafely2.liquid == (byte) 0 && tileSafely1.liquid == (byte) 0) + { + Lighting.AddLight(num30, num29, 1f, 0.95f, 0.8f); + if (Main.rand.Next(30) == 0) + Dust.NewDust(new Vector2(this.Center.X - 22f, this.position.Y + 6f), 1, 1, 6); + } + } + else + { + int num31 = (int) ((double) this.Center.X + 14.0) / 16; + Tile tileSafely3 = Framing.GetTileSafely(num31, num29); + Tile tileSafely4 = Framing.GetTileSafely(num31 - 1, num29); + if (WorldGen.InWorld(num31, num29) && tileSafely4.liquid == (byte) 0 && tileSafely3.liquid == (byte) 0) + { + Lighting.AddLight(num31, num29, 1f, 0.95f, 0.8f); + if (Main.rand.Next(30) == 0) + Dust.NewDust(new Vector2(this.Center.X + 14f, this.position.Y + 6f), 1, 1, 6); + } + } + this.position = this.position - this.netOffset; + } + else if (this.type == 591) + { + this.position = this.position + this.netOffset; + if (!this.wet) + { + if (this.spriteDirection < 0) + { + Lighting.AddLight(new Vector2(this.Center.X - 36f, this.position.Y + 24f), 1f, 0.95f, 0.8f); + if ((double) this.ai[2] == 0.0 && Main.rand.Next(30) == 0) + Dust.NewDust(new Vector2(this.Center.X - 36f, this.position.Y + 24f), 1, 1, 6); + } + else + { + Lighting.AddLight(new Vector2(this.Center.X + 28f, this.position.Y + 24f), 1f, 0.95f, 0.8f); + if ((double) this.ai[2] == 0.0 && Main.rand.Next(30) == 0) + Dust.NewDust(new Vector2(this.Center.X + 28f, this.position.Y + 24f), 1, 1, 6); + } + } + this.position = this.position - this.netOffset; + } + bool flag5 = false; + bool flag6 = false; + if ((double) this.velocity.X == 0.0) + flag6 = true; + if (this.justHit) + flag6 = false; + if (Main.netMode != 1 && this.type == 198 && (double) this.life <= (double) this.lifeMax * 0.55) + this.Transform(199); + if (Main.netMode != 1 && this.type == 348 && (double) this.life <= (double) this.lifeMax * 0.55) + this.Transform(349); + int num32 = 60; + if (this.type == 120) + { + num32 = 180; + if ((double) this.ai[3] == -120.0) + { + this.velocity = this.velocity * 0.0f; + this.ai[3] = 0.0f; + this.position = this.position + this.netOffset; + SoundEngine.PlaySound(SoundID.Item8, this.position); + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num33 = this.oldPos[2].X + (float) this.width * 0.5f - vector2.X; + float num34 = this.oldPos[2].Y + (float) this.height * 0.5f - vector2.Y; + float num35 = 2f / (float) Math.Sqrt((double) num33 * (double) num33 + (double) num34 * (double) num34); + float SpeedX = num33 * num35; + float SpeedY = num34 * num35; + for (int index9 = 0; index9 < 20; ++index9) + { + int index10 = Dust.NewDust(this.position, this.width, this.height, 71, SpeedX, SpeedY, 200, Scale: 2f); + Main.dust[index10].noGravity = true; + Main.dust[index10].velocity.X *= 2f; + } + for (int index11 = 0; index11 < 20; ++index11) + { + int index12 = Dust.NewDust(this.oldPos[2], this.width, this.height, 71, -SpeedX, -SpeedY, 200, Scale: 2f); + Main.dust[index12].noGravity = true; + Main.dust[index12].velocity.X *= 2f; + } + this.position = this.position - this.netOffset; + } + } + bool flag7 = false; + bool flag8 = true; + if (this.type == 343 || this.type == 47 || this.type == 67 || this.type == 109 || this.type == 110 || this.type == 111 || this.type == 120 || this.type == 163 || this.type == 164 || this.type == 239 || this.type == 168 || this.type == 199 || this.type == 206 || this.type == 214 || this.type == 215 || this.type == 216 || this.type == 217 || this.type == 218 || this.type == 219 || this.type == 220 || this.type == 226 || this.type == 243 || this.type == 251 || this.type == 257 || this.type == 258 || this.type == 290 || this.type == 291 || this.type == 292 || this.type == 293 || this.type == 305 || this.type == 306 || this.type == 307 || this.type == 308 || this.type == 309 || this.type == 348 || this.type == 349 || this.type == 350 || this.type == 351 || this.type == 379 || this.type >= 430 && this.type <= 436 || this.type == 591 || this.type == 380 || this.type == 381 || this.type == 382 || this.type == 383 || this.type == 386 || this.type == 391 || this.type >= 449 && this.type <= 452 || this.type == 466 || this.type == 464 || this.type == 166 || this.type == 469 || this.type == 468 || this.type == 471 || this.type == 470 || this.type == 480 || this.type == 481 || this.type == 482 || this.type == 411 || this.type == 424 || this.type == 409 || this.type >= 494 && this.type <= 506 || this.type == 425 || this.type == 427 || this.type == 426 || this.type == 428 || this.type == 580 || this.type == 508 || this.type == 415 || this.type == 419 || this.type == 520 || this.type >= 524 && this.type <= 527 || this.type == 528 || this.type == 529 || this.type == 530 || this.type == 532 || this.type == 582 || this.type == 624 || this.type == 631) + flag8 = false; + bool flag9 = false; + switch (this.type) + { + case 425: + case 471: + flag9 = true; + break; + } + bool flag10 = true; + switch (this.type) + { + case 110: + case 111: + case 206: + case 214: + case 215: + case 216: + case 291: + case 292: + case 293: + case 350: + case 379: + case 380: + case 381: + case 382: + case 409: + case 411: + case 424: + case 426: + case 466: + case 498: + case 499: + case 500: + case 501: + case 502: + case 503: + case 504: + case 505: + case 506: + case 520: + if ((double) this.ai[2] > 0.0) + { + flag10 = false; + break; + } + break; + } + if (!flag9 & flag10) + { + if ((double) this.velocity.Y == 0.0 && ((double) this.velocity.X > 0.0 && this.direction < 0 || (double) this.velocity.X < 0.0 && this.direction > 0)) + flag7 = true; + if ((((double) this.position.X == (double) this.oldPosition.X ? 1 : ((double) this.ai[3] >= (double) num32 ? 1 : 0)) | (flag7 ? 1 : 0)) != 0) + ++this.ai[3]; + else if ((double) Math.Abs(this.velocity.X) > 0.9 && (double) this.ai[3] > 0.0) + --this.ai[3]; + if ((double) this.ai[3] > (double) (num32 * 10)) + this.ai[3] = 0.0f; + if (this.justHit) + this.ai[3] = 0.0f; + if ((double) this.ai[3] == (double) num32) + this.netUpdate = true; + hitbox = Main.player[this.target].Hitbox; + if (hitbox.Intersects(this.Hitbox)) + this.ai[3] = 0.0f; + } + if (this.type == 463 && Main.netMode != 1) + { + if ((double) this.localAI[3] > 0.0) + --this.localAI[3]; + if (this.justHit && (double) this.localAI[3] <= 0.0 && Main.rand.Next(3) == 0) + { + this.localAI[3] = 30f; + int length = Main.rand.Next(3, 6); + int[] numArray = new int[length]; + int maxValue = 0; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && !Main.player[index].dead && Collision.CanHitLine(this.position, this.width, this.height, Main.player[index].position, Main.player[index].width, Main.player[index].height)) + { + numArray[maxValue] = index; + ++maxValue; + if (maxValue == length) + break; + } + } + if (maxValue > 1) + { + for (int index13 = 0; index13 < 100; ++index13) + { + int index14 = Main.rand.Next(maxValue); + int index15 = index14; + while (index15 == index14) + index15 = Main.rand.Next(maxValue); + int num36 = numArray[index14]; + numArray[index14] = numArray[index15]; + numArray[index15] = num36; + } + } + Vector2 vector2_10 = new Vector2(-1f, -1f); + for (int index = 0; index < maxValue; ++index) + { + Vector2 vector2_11 = Main.npc[numArray[index]].Center - this.Center; + vector2_11.Normalize(); + vector2_10 += vector2_11; + } + vector2_10.Normalize(); + for (int index = 0; index < length; ++index) + { + float num37 = (float) Main.rand.Next(8, 13); + Vector2 vector2_12 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + vector2_12.Normalize(); + if (maxValue > 0) + { + vector2_12 += vector2_10; + vector2_12.Normalize(); + } + vector2_12 *= num37; + if (maxValue > 0) + { + --maxValue; + vector2_12 = Main.player[numArray[maxValue]].Center - this.Center; + vector2_12.Normalize(); + vector2_12 *= num37; + } + Projectile.NewProjectile(this.Center.X, this.position.Y + (float) (this.width / 4), vector2_12.X, vector2_12.Y, 498, (int) ((double) this.damage * 0.15), 1f); + } + } + } + if (this.type == 460) + this.knockBackResist = (double) this.velocity.Y < -(double) NPC.gravity || (double) this.velocity.Y > (double) NPC.gravity ? 0.0f : 0.25f * Main.GameModeInfo.KnockbackToEnemiesMultiplier; + if (this.type == 469) + { + this.knockBackResist = 0.45f * Main.GameModeInfo.KnockbackToEnemiesMultiplier; + if ((double) this.ai[2] == 1.0) + this.knockBackResist = 0.0f; + bool flag11 = false; + int num38 = (int) this.Center.X / 16; + int num39 = (int) this.Center.Y / 16; + for (int index16 = num38 - 1; index16 <= num38 + 1; ++index16) + { + for (int index17 = num39 - 1; index17 <= num39 + 1; ++index17) + { + if (Main.tile[index16, index17] != null && Main.tile[index16, index17].wall > (ushort) 0) + { + flag11 = true; + break; + } + } + if (flag11) + break; + } + if ((double) this.ai[2] == 0.0 & flag11) + { + if ((double) this.velocity.Y == 0.0) + { + flag1 = true; + this.velocity.Y = -4.6f; + this.velocity.X *= 1.3f; + } + else if ((double) this.velocity.Y > 0.0 && !Main.player[this.target].dead) + this.ai[2] = 1f; + } + if (flag11 && (double) this.ai[2] == 1.0 && !Main.player[this.target].dead && Collision.CanHit(this.Center, 1, 1, Main.player[this.target].Center, 1, 1)) + { + Vector2 vector2 = Main.player[this.target].Center - this.Center; + float num40 = vector2.Length(); + vector2.Normalize(); + this.velocity = (this.velocity * 29f + vector2 * (float) (4.5 + (double) num40 / 300.0)) / 30f; + this.noGravity = true; + this.ai[2] = 1f; + return; + } + this.noGravity = false; + this.ai[2] = 0.0f; + } + if (this.type == 462 && (double) this.velocity.Y == 0.0 && (double) (Main.player[this.target].Center - this.Center).Length() < 150.0 && (double) Math.Abs(this.velocity.X) > 3.0 && ((double) this.velocity.X < 0.0 && (double) this.Center.X > (double) Main.player[this.target].Center.X || (double) this.velocity.X > 0.0 && (double) this.Center.X < (double) Main.player[this.target].Center.X)) + { + flag1 = true; + this.velocity.X *= 1.75f; + this.velocity.Y -= 4.5f; + if ((double) this.Center.Y - (double) Main.player[this.target].Center.Y > 20.0) + this.velocity.Y -= 0.5f; + if ((double) this.Center.Y - (double) Main.player[this.target].Center.Y > 40.0) + --this.velocity.Y; + if ((double) this.Center.Y - (double) Main.player[this.target].Center.Y > 80.0) + this.velocity.Y -= 1.5f; + if ((double) this.Center.Y - (double) Main.player[this.target].Center.Y > 100.0) + this.velocity.Y -= 1.5f; + if ((double) Math.Abs(this.velocity.X) > 7.0) + { + if ((double) this.velocity.X < 0.0) + this.velocity.X = -7f; + else + this.velocity.X = 7f; + } + } + if (this.type == 624 && this.target < (int) byte.MaxValue) + { + if (!Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height)) + { + this.ai[3] = (float) num32; + this.directionY = -1; + if (this.type == 624 && (!Main.dayTime || !WorldGen.InAPlaceWithWind(this.position, this.width, this.height)) && (double) (this.Center - Main.player[this.target].Center).Length() > 500.0) + { + this.velocity.X *= 0.95f; + if ((double) this.velocity.X <= -0.1 || (double) this.velocity.X >= 0.1) + return; + this.velocity.X = 0.0f; + return; + } + } + else if ((double) Main.player[this.target].Center.Y > (double) this.Center.Y - 128.0) + this.ai[3] = 0.0f; + } + if ((double) this.ai[3] < (double) num32 && NPC.DespawnEncouragement_AIStyle3_Fighters_NotDiscouraged(this.type, this.position, this)) + { + if ((this.type == 3 || this.type == 591 || this.type == 590 || this.type == 331 || this.type == 332 || this.type == 21 || this.type >= 449 && this.type <= 452 || this.type == 31 || this.type == 294 || this.type == 295 || this.type == 296 || this.type == 77 || this.type == 110 || this.type == 132 || this.type == 167 || this.type == 161 || this.type == 162 || this.type == 186 || this.type == 187 || this.type == 188 || this.type == 189 || this.type == 197 || this.type == 200 || this.type == 201 || this.type == 202 || this.type == 203 || this.type == 223 || this.type == 291 || this.type == 292 || this.type == 293 || this.type == 320 || this.type == 321 || this.type == 319 || this.type == 481 || this.type == 632 || this.type == 635) && Main.rand.Next(1000) == 0) + SoundEngine.PlaySound(14, (int) this.position.X, (int) this.position.Y); + if ((this.type == 489 || this.type == 586) && Main.rand.Next(800) == 0) + SoundEngine.PlaySound(14, (int) this.position.X, (int) this.position.Y, this.type); + if ((this.type == 78 || this.type == 79 || this.type == 80 || this.type == 630) && Main.rand.Next(500) == 0) + SoundEngine.PlaySound(26, (int) this.position.X, (int) this.position.Y); + if (this.type == 159 && Main.rand.Next(500) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, 7); + if (this.type == 162 && Main.rand.Next(500) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, 6); + if (this.type == 181 && Main.rand.Next(500) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, 8); + if (this.type >= 269 && this.type <= 280 && Main.rand.Next(1000) == 0) + SoundEngine.PlaySound(14, (int) this.position.X, (int) this.position.Y); + this.TargetClosest(); + if (this.directionY > 0 && (double) Main.player[this.target].Center.Y <= (double) this.Bottom.Y) + this.directionY = -1; + } + else if ((double) this.ai[2] <= 0.0 || !NPC.DespawnEncouragement_AIStyle3_Fighters_CanBeBusyWithAction(this.type)) + { + if (Main.dayTime && (double) this.position.Y / 16.0 < Main.worldSurface && this.type != 624 && this.type != 631) + this.EncourageDespawn(10); + if ((double) this.velocity.X == 0.0) + { + if ((double) this.velocity.Y == 0.0) + { + ++this.ai[0]; + if ((double) this.ai[0] >= 2.0) + { + this.direction *= -1; + this.spriteDirection = this.direction; + this.ai[0] = 0.0f; + } + } + } + else + this.ai[0] = 0.0f; + if (this.direction == 0) + this.direction = 1; + } + if (this.type == 159 || this.type == 349) + { + if (this.type == 159 && ((double) this.velocity.X > 0.0 && this.direction < 0 || (double) this.velocity.X < 0.0 && this.direction > 0)) + this.velocity.X *= 0.95f; + if ((double) this.velocity.X < -6.0 || (double) this.velocity.X > 6.0) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < 6.0 && this.direction == 1) + { + if ((double) this.velocity.Y == 0.0 && (double) this.velocity.X < 0.0) + this.velocity.X *= 0.99f; + this.velocity.X += 0.07f; + if ((double) this.velocity.X > 6.0) + this.velocity.X = 6f; + } + else if ((double) this.velocity.X > -6.0 && this.direction == -1) + { + if ((double) this.velocity.Y == 0.0 && (double) this.velocity.X > 0.0) + this.velocity.X *= 0.99f; + this.velocity.X -= 0.07f; + if ((double) this.velocity.X < -6.0) + this.velocity.X = -6f; + } + } + else if (this.type == 199) + { + if ((double) this.velocity.X < -4.0 || (double) this.velocity.X > 4.0) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < 4.0 && this.direction == 1) + { + if ((double) this.velocity.Y == 0.0 && (double) this.velocity.X < 0.0) + this.velocity.X *= 0.8f; + this.velocity.X += 0.1f; + if ((double) this.velocity.X > 4.0) + this.velocity.X = 4f; + } + else if ((double) this.velocity.X > -4.0 && this.direction == -1) + { + if ((double) this.velocity.Y == 0.0 && (double) this.velocity.X > 0.0) + this.velocity.X *= 0.8f; + this.velocity.X -= 0.1f; + if ((double) this.velocity.X < -4.0) + this.velocity.X = -4f; + } + } + else if (this.type == 120 || this.type == 166 || this.type == 213 || this.type == 258 || this.type == 528 || this.type == 529) + { + if ((double) this.velocity.X < -3.0 || (double) this.velocity.X > 3.0) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < 3.0 && this.direction == 1) + { + if ((double) this.velocity.Y == 0.0 && (double) this.velocity.X < 0.0) + this.velocity.X *= 0.99f; + this.velocity.X += 0.07f; + if ((double) this.velocity.X > 3.0) + this.velocity.X = 3f; + } + else if ((double) this.velocity.X > -3.0 && this.direction == -1) + { + if ((double) this.velocity.Y == 0.0 && (double) this.velocity.X > 0.0) + this.velocity.X *= 0.99f; + this.velocity.X -= 0.07f; + if ((double) this.velocity.X < -3.0) + this.velocity.X = -3f; + } + } + else if (this.type == 461 || this.type == 27 || this.type == 77 || this.type == 104 || this.type == 163 || this.type == 162 || this.type == 196 || this.type == 197 || this.type == 212 || this.type == 257 || this.type == 326 || this.type == 343 || this.type == 348 || this.type == 351 || this.type >= 524 && this.type <= 527 || this.type == 530) + { + if ((double) this.velocity.X < -2.0 || (double) this.velocity.X > 2.0) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < 2.0 && this.direction == 1) + { + this.velocity.X += 0.07f; + if ((double) this.velocity.X > 2.0) + this.velocity.X = 2f; + } + else if ((double) this.velocity.X > -2.0 && this.direction == -1) + { + this.velocity.X -= 0.07f; + if ((double) this.velocity.X < -2.0) + this.velocity.X = -2f; + } + } + else if (this.type == 109) + { + if ((double) this.velocity.X < -2.0 || (double) this.velocity.X > 2.0) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < 2.0 && this.direction == 1) + { + this.velocity.X += 0.04f; + if ((double) this.velocity.X > 2.0) + this.velocity.X = 2f; + } + else if ((double) this.velocity.X > -2.0 && this.direction == -1) + { + this.velocity.X -= 0.04f; + if ((double) this.velocity.X < -2.0) + this.velocity.X = -2f; + } + } + else if (this.type == 21 || this.type == 26 || this.type == 31 || this.type == 294 || this.type == 295 || this.type == 296 || this.type == 47 || this.type == 73 || this.type == 140 || this.type == 164 || this.type == 239 || this.type == 167 || this.type == 168 || this.type == 185 || this.type == 198 || this.type == 201 || this.type == 202 || this.type == 203 || this.type == 217 || this.type == 218 || this.type == 219 || this.type == 226 || this.type == 181 || this.type == 254 || this.type == 338 || this.type == 339 || this.type == 340 || this.type == 342 || this.type == 385 || this.type == 389 || this.type == 462 || this.type == 463 || this.type == 466 || this.type == 464 || this.type == 469 || this.type == 470 || this.type == 480 || this.type == 482 || this.type == 425 || this.type == 429 || this.type == 586 || this.type == 631 || this.type == 635) + { + float num41 = 1.5f; + if (this.type == 294) + num41 = 2f; + else if (this.type == 295) + num41 = 1.75f; + else if (this.type == 296) + num41 = 1.25f; + else if (this.type == 201) + num41 = 1.1f; + else if (this.type == 202) + num41 = 0.9f; + else if (this.type == 203) + num41 = 1.2f; + else if (this.type == 338) + num41 = 1.75f; + else if (this.type == 339) + num41 = 1.25f; + else if (this.type == 340) + num41 = 2f; + else if (this.type == 385) + num41 = 1.8f; + else if (this.type == 389) + num41 = 2.25f; + else if (this.type == 462) + num41 = 4f; + else if (this.type == 463) + num41 = 0.75f; + else if (this.type == 466) + num41 = 3.75f; + else if (this.type == 469) + num41 = 3.25f; + else if (this.type == 480) + num41 = (float) (1.5 + (1.0 - (double) this.life / (double) this.lifeMax) * 2.0); + else if (this.type == 425) + num41 = 6f; + else if (this.type == 429) + num41 = 4f; + else if (this.type == 631) + num41 = 0.9f; + else if (this.type == 586) + num41 = (float) (1.5 + (1.0 - (double) this.life / (double) this.lifeMax) * 3.5); + if (this.type == 21 || this.type == 201 || this.type == 202 || this.type == 203 || this.type == 342 || this.type == 635) + num41 *= (float) (1.0 + (1.0 - (double) this.scale)); + if ((double) this.velocity.X < -(double) num41 || (double) this.velocity.X > (double) num41) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < (double) num41 && this.direction == 1) + { + if (this.type == 466 && (double) this.velocity.X < -2.0) + this.velocity.X *= 0.9f; + if (this.type == 586 && (double) this.velocity.Y == 0.0 && (double) this.velocity.X < -1.0) + this.velocity.X *= 0.9f; + this.velocity.X += 0.07f; + if ((double) this.velocity.X > (double) num41) + this.velocity.X = num41; + } + else if ((double) this.velocity.X > -(double) num41 && this.direction == -1) + { + if (this.type == 466 && (double) this.velocity.X > 2.0) + this.velocity.X *= 0.9f; + if (this.type == 586 && (double) this.velocity.Y == 0.0 && (double) this.velocity.X > 1.0) + this.velocity.X *= 0.9f; + this.velocity.X -= 0.07f; + if ((double) this.velocity.X < -(double) num41) + this.velocity.X = -num41; + } + if ((double) this.velocity.Y == 0.0 && this.type == 462 && (this.direction > 0 && (double) this.velocity.X < 0.0 || this.direction < 0 && (double) this.velocity.X > 0.0)) + this.velocity.X *= 0.9f; + } + else if (this.type >= 269 && this.type <= 280) + { + float num42 = 1.5f; + if (this.type == 269) + num42 = 2f; + if (this.type == 270) + num42 = 1f; + if (this.type == 271) + num42 = 1.5f; + if (this.type == 272) + num42 = 3f; + if (this.type == 273) + num42 = 1.25f; + if (this.type == 274) + num42 = 3f; + if (this.type == 275) + num42 = 3.25f; + if (this.type == 276) + num42 = 2f; + if (this.type == 277) + num42 = 2.75f; + if (this.type == 278) + num42 = 1.8f; + if (this.type == 279) + num42 = 1.3f; + if (this.type == 280) + num42 = 2.5f; + float num43 = num42 * (float) (1.0 + (1.0 - (double) this.scale)); + if ((double) this.velocity.X < -(double) num43 || (double) this.velocity.X > (double) num43) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < (double) num43 && this.direction == 1) + { + this.velocity.X += 0.07f; + if ((double) this.velocity.X > (double) num43) + this.velocity.X = num43; + } + else if ((double) this.velocity.X > -(double) num43 && this.direction == -1) + { + this.velocity.X -= 0.07f; + if ((double) this.velocity.X < -(double) num43) + this.velocity.X = -num43; + } + } + else if (this.type >= 305 && this.type <= 314) + { + float num44 = 1.5f; + if (this.type == 305 || this.type == 310) + num44 = 2f; + if (this.type == 306 || this.type == 311) + num44 = 1.25f; + if (this.type == 307 || this.type == 312) + num44 = 2.25f; + if (this.type == 308 || this.type == 313) + num44 = 1.5f; + if (this.type == 309 || this.type == 314) + num44 = 1f; + if (this.type < 310) + { + if ((double) this.velocity.Y == 0.0) + { + this.velocity.X *= 0.85f; + if ((double) this.velocity.X > -0.3 && (double) this.velocity.X < 0.3) + { + flag1 = true; + this.velocity.Y = -7f; + this.velocity.X = num44 * (float) this.direction; + } + } + else if (this.spriteDirection == this.direction) + this.velocity.X = (float) (((double) this.velocity.X * 10.0 + (double) num44 * (double) this.direction) / 11.0); + } + else if ((double) this.velocity.X < -(double) num44 || (double) this.velocity.X > (double) num44) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < (double) num44 && this.direction == 1) + { + this.velocity.X += 0.07f; + if ((double) this.velocity.X > (double) num44) + this.velocity.X = num44; + } + else if ((double) this.velocity.X > -(double) num44 && this.direction == -1) + { + this.velocity.X -= 0.07f; + if ((double) this.velocity.X < -(double) num44) + this.velocity.X = -num44; + } + } + else if (this.type == 67 || this.type == 220 || this.type == 428) + { + if ((double) this.velocity.X < -0.5 || (double) this.velocity.X > 0.5) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.7f; + } + else if ((double) this.velocity.X < 0.5 && this.direction == 1) + { + this.velocity.X += 0.03f; + if ((double) this.velocity.X > 0.5) + this.velocity.X = 0.5f; + } + else if ((double) this.velocity.X > -0.5 && this.direction == -1) + { + this.velocity.X -= 0.03f; + if ((double) this.velocity.X < -0.5) + this.velocity.X = -0.5f; + } + } + else if (this.type == 78 || this.type == 79 || this.type == 80 || this.type == 630) + { + float num45 = 1f; + float num46 = 0.05f; + if (this.life < this.lifeMax / 2) + { + num45 = 2f; + num46 = 0.1f; + } + if (this.type == 79 || this.type == 630) + num45 *= 1.5f; + if ((double) this.velocity.X < -(double) num45 || (double) this.velocity.X > (double) num45) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.7f; + } + else if ((double) this.velocity.X < (double) num45 && this.direction == 1) + { + this.velocity.X += num46; + if ((double) this.velocity.X > (double) num45) + this.velocity.X = num45; + } + else if ((double) this.velocity.X > -(double) num45 && this.direction == -1) + { + this.velocity.X -= num46; + if ((double) this.velocity.X < -(double) num45) + this.velocity.X = -num45; + } + } + else if (this.type == 287) + { + float num47 = 5f; + float num48 = 0.2f; + if ((double) this.velocity.X < -(double) num47 || (double) this.velocity.X > (double) num47) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.7f; + } + else if ((double) this.velocity.X < (double) num47 && this.direction == 1) + { + this.velocity.X += num48; + if ((double) this.velocity.X > (double) num47) + this.velocity.X = num47; + } + else if ((double) this.velocity.X > -(double) num47 && this.direction == -1) + { + this.velocity.X -= num48; + if ((double) this.velocity.X < -(double) num47) + this.velocity.X = -num47; + } + } + else if (this.type == 243) + { + float num49 = 1f; + float num50 = 0.07f; + float num51 = num49 + (float) ((1.0 - (double) this.life / (double) this.lifeMax) * 1.5); + float num52 = num50 + (float) ((1.0 - (double) this.life / (double) this.lifeMax) * 0.150000005960464); + if ((double) this.velocity.X < -(double) num51 || (double) this.velocity.X > (double) num51) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.7f; + } + else if ((double) this.velocity.X < (double) num51 && this.direction == 1) + { + this.velocity.X += num52; + if ((double) this.velocity.X > (double) num51) + this.velocity.X = num51; + } + else if ((double) this.velocity.X > -(double) num51 && this.direction == -1) + { + this.velocity.X -= num52; + if ((double) this.velocity.X < -(double) num51) + this.velocity.X = -num51; + } + } + else if (this.type == 251) + { + float num53 = 1f; + float num54 = 0.08f; + float num55 = num53 + (float) ((1.0 - (double) this.life / (double) this.lifeMax) * 2.0); + float num56 = num54 + (float) ((1.0 - (double) this.life / (double) this.lifeMax) * 0.200000002980232); + if ((double) this.velocity.X < -(double) num55 || (double) this.velocity.X > (double) num55) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.7f; + } + else if ((double) this.velocity.X < (double) num55 && this.direction == 1) + { + this.velocity.X += num56; + if ((double) this.velocity.X > (double) num55) + this.velocity.X = num55; + } + else if ((double) this.velocity.X > -(double) num55 && this.direction == -1) + { + this.velocity.X -= num56; + if ((double) this.velocity.X < -(double) num55) + this.velocity.X = -num55; + } + } + else if (this.type == 386) + { + if ((double) this.ai[2] > 0.0) + { + if ((double) this.velocity.Y == 0.0) + this.velocity.X *= 0.8f; + } + else + { + float num57 = 0.15f; + float num58 = 1.5f; + if ((double) this.velocity.X < -(double) num58 || (double) this.velocity.X > (double) num58) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.7f; + } + else if ((double) this.velocity.X < (double) num58 && this.direction == 1) + { + this.velocity.X += num57; + if ((double) this.velocity.X > (double) num58) + this.velocity.X = num58; + } + else if ((double) this.velocity.X > -(double) num58 && this.direction == -1) + { + this.velocity.X -= num57; + if ((double) this.velocity.X < -(double) num58) + this.velocity.X = -num58; + } + } + } + else if (this.type == 460) + { + float num59 = 3f; + float num60 = 0.1f; + if ((double) Math.Abs(this.velocity.X) > 2.0) + num60 *= 0.8f; + if ((double) Math.Abs(this.velocity.X) > 2.5) + num60 *= 0.8f; + if ((double) Math.Abs(this.velocity.X) > 3.0) + num60 *= 0.8f; + if ((double) Math.Abs(this.velocity.X) > 3.5) + num60 *= 0.8f; + if ((double) Math.Abs(this.velocity.X) > 4.0) + num60 *= 0.8f; + if ((double) Math.Abs(this.velocity.X) > 4.5) + num60 *= 0.8f; + if ((double) Math.Abs(this.velocity.X) > 5.0) + num60 *= 0.8f; + if ((double) Math.Abs(this.velocity.X) > 5.5) + num60 *= 0.8f; + float num61 = num59 + (float) ((1.0 - (double) this.life / (double) this.lifeMax) * 3.0); + if ((double) this.velocity.X < -(double) num61 || (double) this.velocity.X > (double) num61) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.7f; + } + else if ((double) this.velocity.X < (double) num61 && this.direction == 1) + { + if ((double) this.velocity.X < 0.0) + this.velocity.X *= 0.93f; + this.velocity.X += num60; + if ((double) this.velocity.X > (double) num61) + this.velocity.X = num61; + } + else if ((double) this.velocity.X > -(double) num61 && this.direction == -1) + { + if ((double) this.velocity.X > 0.0) + this.velocity.X *= 0.93f; + this.velocity.X -= num60; + if ((double) this.velocity.X < -(double) num61) + this.velocity.X = -num61; + } + } + else if (this.type == 508 || this.type == 580 || this.type == 582) + { + float num62 = 2.5f; + float num63 = 10f; + float num64 = Math.Abs(this.velocity.X); + if (this.type == 582) + { + num62 = 2.5f; + num63 = 7f; + if ((double) num64 > 2.75) + { + num62 = 3.5f; + num63 += 75f; + } + else if ((double) num64 > 2.25) + { + num62 = 2f; + num63 += 55f; + } + } + else if ((double) num64 > 2.75) + { + num62 = 3.5f; + num63 += 80f; + } + else if ((double) num64 > 2.25) + { + num62 = 3f; + num63 += 60f; + } + if ((double) Math.Abs(this.velocity.Y) < 0.5) + { + if ((double) this.velocity.X > 0.0 && this.direction < 0) + this.velocity = this.velocity * 0.95f; + if ((double) this.velocity.X < 0.0 && this.direction > 0) + this.velocity = this.velocity * 0.95f; + } + if ((double) Math.Abs(this.velocity.Y) > (double) NPC.gravity) + num63 *= 3f; + if ((double) this.velocity.X <= 0.0 && this.direction < 0) + this.velocity.X = (float) (((double) this.velocity.X * (double) num63 - (double) num62) / ((double) num63 + 1.0)); + else if ((double) this.velocity.X >= 0.0 && this.direction > 0) + this.velocity.X = (float) (((double) this.velocity.X * (double) num63 + (double) num62) / ((double) num63 + 1.0)); + else if ((double) Math.Abs(this.Center.X - Main.player[this.target].Center.X) > 20.0 && (double) Math.Abs(this.velocity.Y) <= (double) NPC.gravity) + { + this.velocity.X *= 0.99f; + this.velocity.X += (float) this.direction * 0.025f; + } + } + else if (this.type == 391 || this.type == 427 || this.type == 415 || this.type == 419 || this.type == 518 || this.type == 532) + { + float num65 = 5f; + float num66 = 0.25f; + float num67 = 0.7f; + if (this.type == 427) + { + num65 = 6f; + num66 = 0.2f; + num67 = 0.8f; + } + else if (this.type == 415) + { + num65 = 4f; + num66 = 0.1f; + num67 = 0.95f; + } + else if (this.type == 419) + { + num65 = 6f; + num66 = 0.15f; + num67 = 0.85f; + } + else if (this.type == 518) + { + num65 = 5f; + num66 = 0.1f; + num67 = 0.95f; + } + else if (this.type == 532) + { + num65 = 5f; + num66 = 0.15f; + num67 = 0.98f; + } + if ((double) this.velocity.X < -(double) num65 || (double) this.velocity.X > (double) num65) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * num67; + } + else if ((double) this.velocity.X < (double) num65 && this.direction == 1) + { + this.velocity.X += num66; + if ((double) this.velocity.X > (double) num65) + this.velocity.X = num65; + } + else if ((double) this.velocity.X > -(double) num65 && this.direction == -1) + { + this.velocity.X -= num66; + if ((double) this.velocity.X < -(double) num65) + this.velocity.X = -num65; + } + } + else if (this.type >= 430 && this.type <= 436 || this.type == 494 || this.type == 495 || this.type == 591) + { + if ((double) this.ai[2] == 0.0) + { + this.damage = this.defDamage; + float num68 = 1f * (float) (1.0 + (1.0 - (double) this.scale)); + if ((double) this.velocity.X < -(double) num68 || (double) this.velocity.X > (double) num68) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < (double) num68 && this.direction == 1) + { + this.velocity.X += 0.07f; + if ((double) this.velocity.X > (double) num68) + this.velocity.X = num68; + } + else if ((double) this.velocity.X > -(double) num68 && this.direction == -1) + { + this.velocity.X -= 0.07f; + if ((double) this.velocity.X < -(double) num68) + this.velocity.X = -num68; + } + if ((double) this.velocity.Y == 0.0 && (!Main.dayTime || (double) this.position.Y > Main.worldSurface * 16.0) && !Main.player[this.target].dead) + { + Vector2 vector2 = this.Center - Main.player[this.target].Center; + int num69 = 50; + if (this.type >= 494 && this.type <= 495) + num69 = 42; + if ((double) vector2.Length() < (double) num69 && Collision.CanHit(this.Center, 1, 1, Main.player[this.target].Center, 1, 1)) + { + this.velocity.X *= 0.7f; + this.ai[2] = 1f; + } + } + } + else + { + this.damage = (int) ((double) this.defDamage * 1.5); + this.ai[3] = 1f; + this.velocity.X *= 0.9f; + if ((double) Math.Abs(this.velocity.X) < 0.1) + this.velocity.X = 0.0f; + ++this.ai[2]; + if ((double) this.ai[2] >= 20.0 || (double) this.velocity.Y != 0.0 || Main.dayTime && (double) this.position.Y < Main.worldSurface * 16.0) + this.ai[2] = 0.0f; + } + } + else if (this.type != 110 && this.type != 111 && this.type != 206 && this.type != 214 && this.type != 215 && this.type != 216 && this.type != 290 && this.type != 291 && this.type != 292 && this.type != 293 && this.type != 350 && this.type != 379 && this.type != 380 && this.type != 381 && this.type != 382 && (this.type < 449 || this.type > 452) && this.type != 468 && this.type != 481 && this.type != 411 && this.type != 409 && (this.type < 498 || this.type > 506) && this.type != 424 && this.type != 426 && this.type != 520) + { + float num70 = 1f; + if (this.type == 624) + num70 = 2.5f; + if (this.type == 186) + num70 = 1.1f; + if (this.type == 187) + num70 = 0.9f; + if (this.type == 188) + num70 = 1.2f; + if (this.type == 189) + num70 = 0.8f; + if (this.type == 132) + num70 = 0.95f; + if (this.type == 200) + num70 = 0.87f; + if (this.type == 223) + num70 = 1.05f; + if (this.type == 632) + num70 = 0.8f; + if (this.type == 489) + { + float num71 = (Main.player[this.target].Center - this.Center).Length() * (1f / 400f); + if ((double) num71 > 1.5) + num71 = 1.5f; + num70 = (!Main.expertMode ? 2.5f - num71 : 3f - num71) * 0.8f; + } + if (this.type == 489 || this.type == 3 || this.type == 132 || this.type == 186 || this.type == 187 || this.type == 188 || this.type == 189 || this.type == 200 || this.type == 223 || this.type == 331 || this.type == 332) + num70 *= (float) (1.0 + (1.0 - (double) this.scale)); + if ((double) this.velocity.X < -(double) num70 || (double) this.velocity.X > (double) num70) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < (double) num70 && this.direction == 1) + { + this.velocity.X += 0.07f; + if ((double) this.velocity.X > (double) num70) + this.velocity.X = num70; + } + else if ((double) this.velocity.X > -(double) num70 && this.direction == -1) + { + this.velocity.X -= 0.07f; + if ((double) this.velocity.X < -(double) num70) + this.velocity.X = -num70; + } + } + if (this.type >= 277 && this.type <= 280) + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.2f, 0.1f, 0.0f); + else if (this.type == 520) + Lighting.AddLight(this.Top + new Vector2(0.0f, 20f), 0.3f, 0.3f, 0.7f); + else if (this.type == 525) + Lighting.AddLight(this.Top + new Vector2(0.0f, 15f), new Vector3(0.7f, 1f, 0.2f) * 0.5f); + else if (this.type == 526) + Lighting.AddLight(this.Top + new Vector2(0.0f, 15f), new Vector3(1f, 1f, 0.5f) * 0.4f); + else if (this.type == 527) + Lighting.AddLight(this.Top + new Vector2(0.0f, 15f), new Vector3(0.6f, 0.3f, 1f) * 0.4f); + else if (this.type == 415) + { + this.hide = false; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 416 && (double) Main.npc[index].ai[0] == (double) this.whoAmI) + { + this.hide = true; + break; + } + } + } + else if (this.type == 258) + { + if ((double) this.velocity.Y != 0.0) + { + this.TargetClosest(); + this.spriteDirection = this.direction; + if ((double) Main.player[this.target].Center.X < (double) this.position.X && (double) this.velocity.X > 0.0) + this.velocity.X *= 0.95f; + else if ((double) Main.player[this.target].Center.X > (double) this.position.X + (double) this.width && (double) this.velocity.X < 0.0) + this.velocity.X *= 0.95f; + if ((double) Main.player[this.target].Center.X < (double) this.position.X && (double) this.velocity.X > -5.0) + this.velocity.X -= 0.1f; + else if ((double) Main.player[this.target].Center.X > (double) this.position.X + (double) this.width && (double) this.velocity.X < 5.0) + this.velocity.X += 0.1f; + } + else if ((double) Main.player[this.target].Center.Y + 50.0 < (double) this.position.Y && Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height)) + { + flag1 = true; + this.velocity.Y = -7f; + } + } + else if (this.type == 425) + { + if ((double) this.velocity.Y == 0.0) + this.ai[2] = 0.0f; + if ((double) this.velocity.Y != 0.0 && (double) this.ai[2] == 1.0) + { + this.TargetClosest(); + this.spriteDirection = -this.direction; + if (Collision.CanHit(this.Center, 0, 0, Main.player[this.target].Center, 0, 0)) + { + float num72 = Main.player[this.target].Center.X - (float) (this.direction * 400) - this.Center.X; + float num73 = Main.player[this.target].Bottom.Y - this.Bottom.Y; + if ((double) num72 < 0.0 && (double) this.velocity.X > 0.0) + this.velocity.X *= 0.9f; + else if ((double) num72 > 0.0 && (double) this.velocity.X < 0.0) + this.velocity.X *= 0.9f; + if ((double) num72 < 0.0 && (double) this.velocity.X > -5.0) + this.velocity.X -= 0.1f; + else if ((double) num72 > 0.0 && (double) this.velocity.X < 5.0) + this.velocity.X += 0.1f; + if ((double) this.velocity.X > 6.0) + this.velocity.X = 6f; + if ((double) this.velocity.X < -6.0) + this.velocity.X = -6f; + if ((double) num73 < -20.0 && (double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.8f; + else if ((double) num73 > 20.0 && (double) this.velocity.Y < 0.0) + this.velocity.Y *= 0.8f; + if ((double) num73 < -20.0 && (double) this.velocity.Y > -5.0) + this.velocity.Y -= 0.3f; + else if ((double) num73 > 20.0 && (double) this.velocity.Y < 5.0) + this.velocity.Y += 0.3f; + } + if (Main.rand.Next(3) == 0) + { + this.position = this.position + this.netOffset; + Vector2 Position = this.Center + new Vector2((float) (this.direction * -14), -8f) - Vector2.One * 4f; + Vector2 vector2 = new Vector2((float) (this.direction * -6), 12f) * 0.2f + Utils.RandomVector2(Main.rand, -1f, 1f) * 0.1f; + Dust dust = Main.dust[Dust.NewDust(Position, 8, 8, 229, vector2.X, vector2.Y, 100, Color.Transparent, (float) (1.0 + (double) Main.rand.NextFloat() * 0.5))]; + dust.noGravity = true; + dust.velocity = vector2; + dust.customData = (object) this; + this.position = this.position - this.netOffset; + } + for (int index = 0; index < 200; ++index) + { + if (index != this.whoAmI && Main.npc[index].active && Main.npc[index].type == this.type && (double) Math.Abs(this.position.X - Main.npc[index].position.X) + (double) Math.Abs(this.position.Y - Main.npc[index].position.Y) < (double) this.width) + { + if ((double) this.position.X < (double) Main.npc[index].position.X) + this.velocity.X -= 0.05f; + else + this.velocity.X += 0.05f; + if ((double) this.position.Y < (double) Main.npc[index].position.Y) + this.velocity.Y -= 0.05f; + else + this.velocity.Y += 0.05f; + } + } + } + else if ((double) Main.player[this.target].Center.Y + 100.0 < (double) this.position.Y && Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height)) + { + flag1 = true; + this.velocity.Y = -5f; + this.ai[2] = 1f; + } + if (Main.netMode != 1) + { + ++this.localAI[2]; + if ((double) this.localAI[2] >= (double) (360 + Main.rand.Next(360)) && (double) this.Distance(Main.player[this.target].Center) < 400.0 && (double) Math.Abs(this.DirectionTo(Main.player[this.target].Center).Y) < 0.5 && Collision.CanHitLine(this.Center, 0, 0, Main.player[this.target].Center, 0, 0)) + { + this.localAI[2] = 0.0f; + Vector2 vector2_13 = this.Center + new Vector2((float) (this.direction * 30), 2f); + Vector2 vec = this.DirectionTo(Main.player[this.target].Center) * 7f; + if (vec.HasNaNs()) + vec = new Vector2((float) (this.direction * 8), 0.0f); + int damageForProjectiles = this.GetAttackDamage_ForProjectiles(75f, 50f); + for (int index = 0; index < 4; ++index) + { + Vector2 vector2_14 = vec + Utils.RandomVector2(Main.rand, -0.8f, 0.8f); + Projectile.NewProjectile(vector2_13.X, vector2_13.Y, vector2_14.X, vector2_14.Y, 577, damageForProjectiles, 1f, Main.myPlayer); + } + } + } + } + else if (this.type == 427) + { + if ((double) this.velocity.Y == 0.0) + { + this.ai[2] = 0.0f; + this.rotation = 0.0f; + } + else + this.rotation = this.velocity.X * 0.1f; + if ((double) this.velocity.Y != 0.0 && (double) this.ai[2] == 1.0) + { + this.TargetClosest(); + this.spriteDirection = -this.direction; + if (Collision.CanHit(this.Center, 0, 0, Main.player[this.target].Center, 0, 0)) + { + float num74 = Main.player[this.target].Center.X - this.Center.X; + float num75 = Main.player[this.target].Center.Y - this.Center.Y; + if ((double) num74 < 0.0 && (double) this.velocity.X > 0.0) + this.velocity.X *= 0.98f; + else if ((double) num74 > 0.0 && (double) this.velocity.X < 0.0) + this.velocity.X *= 0.98f; + if ((double) num74 < -20.0 && (double) this.velocity.X > -6.0) + this.velocity.X -= 0.015f; + else if ((double) num74 > 20.0 && (double) this.velocity.X < 6.0) + this.velocity.X += 0.015f; + if ((double) this.velocity.X > 6.0) + this.velocity.X = 6f; + if ((double) this.velocity.X < -6.0) + this.velocity.X = -6f; + if ((double) num75 < -20.0 && (double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.98f; + else if ((double) num75 > 20.0 && (double) this.velocity.Y < 0.0) + this.velocity.Y *= 0.98f; + if ((double) num75 < -20.0 && (double) this.velocity.Y > -6.0) + this.velocity.Y -= 0.15f; + else if ((double) num75 > 20.0 && (double) this.velocity.Y < 6.0) + this.velocity.Y += 0.15f; + } + for (int index = 0; index < 200; ++index) + { + if (index != this.whoAmI && Main.npc[index].active && Main.npc[index].type == this.type && (double) Math.Abs(this.position.X - Main.npc[index].position.X) + (double) Math.Abs(this.position.Y - Main.npc[index].position.Y) < (double) this.width) + { + if ((double) this.position.X < (double) Main.npc[index].position.X) + this.velocity.X -= 0.05f; + else + this.velocity.X += 0.05f; + if ((double) this.position.Y < (double) Main.npc[index].position.Y) + this.velocity.Y -= 0.05f; + else + this.velocity.Y += 0.05f; + } + } + } + else if ((double) Main.player[this.target].Center.Y + 100.0 < (double) this.position.Y && Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height)) + { + flag1 = true; + this.velocity.Y = -5f; + this.ai[2] = 1f; + } + } + else if (this.type == 426) + { + if ((double) this.ai[1] > 0.0 && (double) this.velocity.Y > 0.0) + { + this.velocity.Y *= 0.85f; + if ((double) this.velocity.Y == 0.0) + this.velocity.Y = -0.4f; + } + if ((double) this.velocity.Y != 0.0) + { + this.TargetClosest(); + this.spriteDirection = this.direction; + if (Collision.CanHit(this.Center, 0, 0, Main.player[this.target].Center, 0, 0)) + { + float num76 = Main.player[this.target].Center.X - (float) (this.direction * 300) - this.Center.X; + if ((double) num76 < 40.0 && (double) this.velocity.X > 0.0) + this.velocity.X *= 0.98f; + else if ((double) num76 > 40.0 && (double) this.velocity.X < 0.0) + this.velocity.X *= 0.98f; + if ((double) num76 < 40.0 && (double) this.velocity.X > -5.0) + this.velocity.X -= 0.2f; + else if ((double) num76 > 40.0 && (double) this.velocity.X < 5.0) + this.velocity.X += 0.2f; + if ((double) this.velocity.X > 6.0) + this.velocity.X = 6f; + if ((double) this.velocity.X < -6.0) + this.velocity.X = -6f; + } + } + else if ((double) Main.player[this.target].Center.Y + 100.0 < (double) this.position.Y && Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height)) + { + flag1 = true; + this.velocity.Y = -6f; + } + for (int index = 0; index < 200; ++index) + { + if (index != this.whoAmI && Main.npc[index].active && Main.npc[index].type == this.type && (double) Math.Abs(this.position.X - Main.npc[index].position.X) + (double) Math.Abs(this.position.Y - Main.npc[index].position.Y) < (double) this.width) + { + if ((double) this.position.X < (double) Main.npc[index].position.X) + this.velocity.X -= 0.1f; + else + this.velocity.X += 0.1f; + if ((double) this.position.Y < (double) Main.npc[index].position.Y) + this.velocity.Y -= 0.1f; + else + this.velocity.Y += 0.1f; + } + } + if (Main.rand.Next(6) == 0 && (double) this.ai[1] <= 20.0) + { + this.position = this.position + this.netOffset; + Dust dust = Main.dust[Dust.NewDust(this.Center + new Vector2(this.spriteDirection == 1 ? 8f : -20f, -20f), 8, 8, 229, this.velocity.X, this.velocity.Y, 100)]; + dust.velocity = dust.velocity / 4f + this.velocity / 2f; + dust.scale = 0.6f; + dust.noLight = true; + this.position = this.position - this.netOffset; + } + if ((double) this.ai[1] >= 57.0) + { + this.position = this.position + this.netOffset; + int Type = Utils.SelectRandom(Main.rand, 161, 229); + Dust dust = Main.dust[Dust.NewDust(this.Center + new Vector2(this.spriteDirection == 1 ? 8f : -20f, -20f), 8, 8, Type, this.velocity.X, this.velocity.Y, 100)]; + dust.velocity = dust.velocity / 4f + this.DirectionTo(Main.player[this.target].Top); + dust.scale = 1.2f; + dust.noLight = true; + this.position = this.position - this.netOffset; + } + if (Main.rand.Next(6) == 0) + { + this.position = this.position + this.netOffset; + Dust dust = Main.dust[Dust.NewDust(this.Center, 2, 2, 229)]; + dust.position = this.Center + new Vector2(this.spriteDirection == 1 ? 26f : -26f, 24f); + dust.velocity.X = 0.0f; + if ((double) dust.velocity.Y < 0.0) + dust.velocity.Y = 0.0f; + dust.noGravity = true; + dust.scale = 1f; + dust.noLight = true; + this.position = this.position - this.netOffset; + } + } + else if (this.type == 185) + { + if ((double) this.velocity.Y == 0.0) + { + this.rotation = 0.0f; + this.localAI[0] = 0.0f; + } + else if ((double) this.localAI[0] == 1.0) + this.rotation += this.velocity.X * 0.05f; + } + else if (this.type == 428) + { + if ((double) this.velocity.Y == 0.0) + this.rotation = 0.0f; + else + this.rotation += this.velocity.X * 0.08f; + } + if (this.type == 159 && Main.netMode != 1) + { + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + double num77 = (double) Main.player[this.target].position.X + (double) Main.player[this.target].width * 0.5 - (double) vector2.X; + float num78 = Main.player[this.target].position.Y + (float) Main.player[this.target].height * 0.5f - vector2.Y; + if (Math.Sqrt(num77 * num77 + (double) num78 * (double) num78) > 300.0) + this.Transform(158); + } + if (Main.netMode != 1) + { + if (Main.expertMode && this.target >= 0 && (this.type == 163 || this.type == 238) && Collision.CanHit(this.Center, 1, 1, Main.player[this.target].Center, 1, 1)) + { + ++this.localAI[0]; + if (this.justHit) + { + this.localAI[0] -= (float) Main.rand.Next(20, 60); + if ((double) this.localAI[0] < 0.0) + this.localAI[0] = 0.0f; + } + if ((double) this.localAI[0] > (double) Main.rand.Next(180, 900)) + { + this.localAI[0] = 0.0f; + Vector2 vector2 = Main.player[this.target].Center - this.Center; + vector2.Normalize(); + vector2 *= 8f; + int damageForProjectiles = this.GetAttackDamage_ForProjectiles(18f, 18f); + Projectile.NewProjectile(this.Center.X, this.Center.Y, vector2.X, vector2.Y, 472, damageForProjectiles, 0.0f, Main.myPlayer); + } + } + if ((double) this.velocity.Y == 0.0) + { + int newType = -1; + switch (this.type) + { + case 163: + newType = 238; + break; + case 164: + newType = 165; + break; + case 236: + newType = 237; + break; + case 239: + newType = 240; + break; + case 530: + newType = 531; + break; + } + if (newType != -1 && this.NPCCanStickToWalls()) + this.Transform(newType); + } + } + if (this.type == 243) + { + if (this.justHit && Main.rand.Next(3) == 0) + this.ai[2] -= (float) Main.rand.Next(30); + if ((double) this.ai[2] < 0.0) + this.ai[2] = 0.0f; + if (this.confused) + this.ai[2] = 0.0f; + ++this.ai[2]; + float num79 = (float) Main.rand.Next(30, 900) * ((float) this.life / (float) this.lifeMax) + 30f; + if (Main.netMode != 1 && (double) this.ai[2] >= (double) num79 && (double) this.velocity.Y == 0.0 && !Main.player[this.target].dead && !Main.player[this.target].frozen && (this.direction > 0 && (double) this.Center.X < (double) Main.player[this.target].Center.X || this.direction < 0 && (double) this.Center.X > (double) Main.player[this.target].Center.X) && Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height)) + { + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + 20f); + vector2.X += (float) (10 * this.direction); + float num80 = Main.player[this.target].position.X + (float) Main.player[this.target].width * 0.5f - vector2.X; + float num81 = Main.player[this.target].position.Y + (float) Main.player[this.target].height * 0.5f - vector2.Y; + float num82 = num80 + (float) Main.rand.Next(-40, 41); + float num83 = num81 + (float) Main.rand.Next(-40, 41); + float num84 = (float) Math.Sqrt((double) num82 * (double) num82 + (double) num83 * (double) num83); + this.netUpdate = true; + float num85 = (float) (15.0 / (double) num84); + float SpeedX = num82 * num85; + float SpeedY = num83 * num85; + int Damage = 32; + int Type = 257; + vector2.X += SpeedX * 3f; + vector2.Y += SpeedY * 3f; + Projectile.NewProjectile(vector2.X, vector2.Y, SpeedX, SpeedY, Type, Damage, 0.0f, Main.myPlayer); + this.ai[2] = 0.0f; + } + } + if (this.type == 251) + { + if (this.justHit) + this.ai[2] -= (float) Main.rand.Next(30); + if ((double) this.ai[2] < 0.0) + this.ai[2] = 0.0f; + if (this.confused) + this.ai[2] = 0.0f; + ++this.ai[2]; + float num86 = (float) Main.rand.Next(60, 1800) * ((float) this.life / (float) this.lifeMax) + 15f; + if (Main.netMode != 1 && (double) this.ai[2] >= (double) num86 && (double) this.velocity.Y == 0.0 && !Main.player[this.target].dead && !Main.player[this.target].frozen && (this.direction > 0 && (double) this.Center.X < (double) Main.player[this.target].Center.X || this.direction < 0 && (double) this.Center.X > (double) Main.player[this.target].Center.X) && Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height)) + { + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + 12f); + vector2.X += (float) (6 * this.direction); + float num87 = Main.player[this.target].position.X + (float) Main.player[this.target].width * 0.5f - vector2.X; + float num88 = Main.player[this.target].position.Y + (float) Main.player[this.target].height * 0.5f - vector2.Y; + float num89 = num87 + (float) Main.rand.Next(-40, 41); + float num90 = num88 + (float) Main.rand.Next(-30, 0); + float num91 = (float) Math.Sqrt((double) num89 * (double) num89 + (double) num90 * (double) num90); + this.netUpdate = true; + float num92 = (float) (15.0 / (double) num91); + float SpeedX = num89 * num92; + float SpeedY = num90 * num92; + int Damage = 30; + int Type = 83; + vector2.X += SpeedX * 3f; + vector2.Y += SpeedY * 3f; + Projectile.NewProjectile(vector2.X, vector2.Y, SpeedX, SpeedY, Type, Damage, 0.0f, Main.myPlayer); + this.ai[2] = 0.0f; + } + } + if (this.type == 386) + { + if (this.confused) + { + this.ai[2] = -60f; + } + else + { + if ((double) this.ai[2] < 60.0) + ++this.ai[2]; + if ((double) this.ai[2] > 0.0 && NPC.CountNPCS(387) >= 4 * NPC.CountNPCS(386)) + this.ai[2] = 0.0f; + if (this.justHit) + this.ai[2] = -30f; + if ((double) this.ai[2] == 30.0) + { + int num93 = (int) this.position.X / 16; + int num94 = (int) this.position.Y / 16; + int num95 = (int) this.position.X / 16; + int num96 = (int) this.position.Y / 16; + int num97 = 5; + int num98 = 0; + bool flag12 = false; + int num99 = 2; + int num100 = 0; + while (!flag12 && num98 < 100) + { + ++num98; + int index18 = Main.rand.Next(num93 - num97, num93 + num97); + for (int index19 = Main.rand.Next(num94 - num97, num94 + num97); index19 < num94 + num97; ++index19) + { + if ((index19 < num94 - num99 || index19 > num94 + num99 || index18 < num93 - num99 || index18 > num93 + num99) && (index19 < num96 - num100 || index19 > num96 + num100 || index18 < num95 - num100 || index18 > num95 + num100) && Main.tile[index18, index19].nactive()) + { + bool flag13 = true; + if (Main.tile[index18, index19 - 1].lava()) + flag13 = false; + if (flag13 && Main.tileSolid[(int) Main.tile[index18, index19].type] && !Collision.SolidTiles(index18 - 1, index18 + 1, index19 - 4, index19 - 1)) + { + int index20 = NPC.NewNPC(index18 * 16 - this.width / 2, index19 * 16, 387); + Main.npc[index20].position.Y = (float) (index19 * 16 - Main.npc[index20].height); + flag12 = true; + this.netUpdate = true; + break; + } + } + } + } + } + if ((double) this.ai[2] == 60.0) + this.ai[2] = -120f; + } + } + if (this.type == 389) + { + if (this.confused) + { + this.ai[2] = -60f; + } + else + { + if ((double) this.ai[2] < 20.0) + ++this.ai[2]; + if (this.justHit) + this.ai[2] = -30f; + if ((double) this.ai[2] == 20.0 && Main.netMode != 1) + { + this.ai[2] = (float) (Main.rand.Next(3) * -10 - 10); + Projectile.NewProjectile(this.Center.X, this.Center.Y + 8f, (float) (this.direction * 6), 0.0f, 437, 25, 1f, Main.myPlayer); + } + } + } + if (this.type == 110 || this.type == 111 || this.type == 206 || this.type == 214 || this.type == 215 || this.type == 216 || this.type == 290 || this.type == 291 || this.type == 292 || this.type == 293 || this.type == 350 || this.type == 379 || this.type == 380 || this.type == 381 || this.type == 382 || this.type >= 449 && this.type <= 452 || this.type == 468 || this.type == 481 || this.type == 411 || this.type == 409 || this.type >= 498 && this.type <= 506 || this.type == 424 || this.type == 426 || this.type == 520) + { + bool flag14 = this.type == 381 || this.type == 382 || this.type == 520; + bool flag15 = this.type == 426; + bool flag16 = true; + int num101 = -1; + int num102 = -1; + if (this.type == 411) + { + flag14 = true; + num101 = 90; + num102 = 90; + if ((double) this.ai[1] <= 150.0) + flag16 = false; + } + if ((double) this.ai[1] > 0.0) + --this.ai[1]; + if (this.justHit) + { + this.ai[1] = 30f; + this.ai[2] = 0.0f; + } + int num103 = 70; + if (this.type == 379 || this.type == 380) + num103 = 80; + if (this.type == 381 || this.type == 382) + num103 = 80; + if (this.type == 520) + num103 = 15; + if (this.type == 350) + num103 = 110; + if (this.type == 291) + num103 = 200; + if (this.type == 292) + num103 = 120; + if (this.type == 293) + num103 = 90; + if (this.type == 111) + num103 = 180; + if (this.type == 206) + num103 = 50; + if (this.type == 481) + num103 = 100; + if (this.type == 214) + num103 = 40; + if (this.type == 215) + num103 = 80; + if (this.type == 290) + num103 = 30; + if (this.type == 411) + num103 = 300; + if (this.type == 409) + num103 = 60; + if (this.type == 424) + num103 = 180; + if (this.type == 426) + num103 = 60; + bool flag17 = false; + if (this.type == 216) + { + if ((double) this.localAI[2] >= 20.0) + flag17 = true; + num103 = !flag17 ? 8 : 60; + } + int num104 = num103 / 2; + if (this.type == 424) + num104 = num103 - 1; + if (this.type == 426) + num104 = num103 - 1; + if (this.confused) + this.ai[2] = 0.0f; + if ((double) this.ai[2] > 0.0) + { + if (flag16) + this.TargetClosest(); + if ((double) this.ai[1] == (double) num104) + { + if (this.type == 216) + ++this.localAI[2]; + float num105 = 11f; + if (this.type == 111) + num105 = 9f; + if (this.type == 206) + num105 = 7f; + if (this.type == 290) + num105 = 9f; + if (this.type == 293) + num105 = 4f; + if (this.type == 214) + num105 = 14f; + if (this.type == 215) + num105 = 16f; + if (this.type == 382) + num105 = 7f; + if (this.type == 520) + num105 = 8f; + if (this.type == 409) + num105 = 4f; + if (this.type >= 449 && this.type <= 452) + num105 = 7f; + if (this.type == 481) + num105 = 8f; + if (this.type == 468) + num105 = 7.5f; + if (this.type == 411) + num105 = 1f; + if (this.type >= 498 && this.type <= 506) + num105 = 7f; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + if (this.type == 481) + vector2.Y -= 14f; + if (this.type == 206) + vector2.Y -= 10f; + if (this.type == 290) + vector2.Y -= 10f; + if (this.type == 381 || this.type == 382) + vector2.Y += 6f; + if (this.type == 520) + vector2.Y = this.position.Y + 20f; + if (this.type >= 498 && this.type <= 506) + vector2.Y -= 8f; + if (this.type == 426) + vector2 += new Vector2((float) (this.spriteDirection * 2), -12f); + float num106 = Main.player[this.target].position.X + (float) Main.player[this.target].width * 0.5f - vector2.X; + float num107 = Math.Abs(num106) * 0.1f; + if (this.type == 291 || this.type == 292) + num107 = 0.0f; + if (this.type == 215) + num107 = Math.Abs(num106) * 0.08f; + if (this.type == 214 || this.type == 216 && !flag17) + num107 = 0.0f; + if (this.type == 381 || this.type == 382 || this.type == 520) + num107 = 0.0f; + if (this.type >= 449 && this.type <= 452) + num107 = (float) ((double) Math.Abs(num106) * (double) Main.rand.Next(10, 50) * 0.00999999977648258); + if (this.type == 468) + num107 = (float) ((double) Math.Abs(num106) * (double) Main.rand.Next(10, 50) * 0.00999999977648258); + if (this.type == 481) + num107 = (float) ((double) Math.Abs(num106) * (double) Main.rand.Next(-10, 11) * 0.00350000010803342); + if (this.type >= 498 && this.type <= 506) + num107 = (float) ((double) Math.Abs(num106) * (double) Main.rand.Next(1, 11) * (1.0 / 400.0)); + float num108 = Main.player[this.target].position.Y + (float) Main.player[this.target].height * 0.5f - vector2.Y - num107; + if (this.type == 291) + { + num106 += (float) Main.rand.Next(-40, 41) * 0.2f; + num108 += (float) Main.rand.Next(-40, 41) * 0.2f; + } + else if (this.type == 381 || this.type == 382 || this.type == 520) + { + float num109 = num106 + (float) Main.rand.Next(-100, 101) * 0.4f; + float num110 = num108 + (float) Main.rand.Next(-100, 101) * 0.4f; + num106 = num109 * ((float) Main.rand.Next(85, 116) * 0.01f); + num108 = num110 * ((float) Main.rand.Next(85, 116) * 0.01f); + if (this.type == 520) + { + float num111 = num106 + (float) Main.rand.Next(-100, 101) * 0.6f; + float num112 = num108 + (float) Main.rand.Next(-100, 101) * 0.6f; + num106 = num111 * ((float) Main.rand.Next(85, 116) * 0.015f); + num108 = num112 * ((float) Main.rand.Next(85, 116) * 0.015f); + } + } + else if (this.type == 481) + { + num106 += (float) Main.rand.Next(-40, 41) * 0.4f; + num108 += (float) Main.rand.Next(-40, 41) * 0.4f; + } + else if (this.type >= 498 && this.type <= 506) + { + num106 += (float) Main.rand.Next(-40, 41) * 0.3f; + num108 += (float) Main.rand.Next(-40, 41) * 0.3f; + } + else if (this.type != 292) + { + num106 += (float) Main.rand.Next(-40, 41); + num108 += (float) Main.rand.Next(-40, 41); + } + float num113 = (float) Math.Sqrt((double) num106 * (double) num106 + (double) num108 * (double) num108); + this.netUpdate = true; + float num114 = num105 / num113; + float num115 = num106 * num114; + float SpeedY = num108 * num114; + int Damage = 35; + int Type = 82; + if (this.type == 111) + Damage = 11; + if (this.type == 206) + Damage = 37; + if (this.type == 379 || this.type == 380) + Damage = 40; + if (this.type == 350) + Damage = 45; + if (this.type == 468) + Damage = 50; + if (this.type == 111) + Type = 81; + if (this.type == 379 || this.type == 380) + Type = 81; + if (this.type == 381) + { + Type = 436; + Damage = 24; + } + if (this.type == 382) + { + Type = 438; + Damage = 30; + } + if (this.type == 520) + { + Type = 592; + Damage = 35; + } + if (this.type >= 449 && this.type <= 452) + { + Type = 471; + Damage = 15; + } + if (this.type >= 498 && this.type <= 506) + { + Type = 572; + Damage = 14; + } + if (this.type == 481) + { + Type = 508; + Damage = 18; + } + if (this.type == 206) + Type = 177; + if (this.type == 468) + Type = 501; + if (this.type == 411) + { + Type = 537; + Damage = this.GetAttackDamage_ForProjectiles(60f, 45f); + } + if (this.type == 424) + { + Type = 573; + Damage = this.GetAttackDamage_ForProjectiles(60f, 45f); + } + if (this.type == 426) + { + Type = 581; + Damage = this.GetAttackDamage_ForProjectiles(60f, 45f); + } + if (this.type == 291) + { + Type = 302; + Damage = 100; + } + if (this.type == 290) + { + Type = 300; + Damage = 60; + } + if (this.type == 293) + { + Type = 303; + Damage = 60; + } + if (this.type == 214) + { + Type = 180; + Damage = 25; + } + if (this.type == 215) + { + Type = 82; + Damage = 40; + } + if (this.type == 292) + { + Damage = 50; + Type = 180; + } + if (this.type == 216) + { + Type = 180; + Damage = 30; + if (flag17) + { + Damage = 100; + Type = 240; + this.localAI[2] = 0.0f; + } + } + vector2.X += num115; + vector2.Y += SpeedY; + if (this.type == 290) + Damage = this.GetAttackDamage_ForProjectiles((float) Damage, (float) Damage * 0.75f); + if (this.type >= 381 && this.type <= 392) + Damage = this.GetAttackDamage_ForProjectiles((float) Damage, (float) Damage * 0.8f); + if (Main.netMode != 1) + { + if (this.type == 292) + { + for (int index = 0; index < 4; ++index) + { + float num116 = Main.player[this.target].position.X + (float) Main.player[this.target].width * 0.5f - vector2.X; + float num117 = Main.player[this.target].position.Y + (float) Main.player[this.target].height * 0.5f - vector2.Y; + float num118 = 12f / (float) Math.Sqrt((double) num116 * (double) num116 + (double) num117 * (double) num117); + float num119; + float num120 = num119 = num116 + (float) Main.rand.Next(-40, 41); + float num121; + float num122 = num121 = num117 + (float) Main.rand.Next(-40, 41); + num115 = num120 * num118; + SpeedY = num122 * num118; + Projectile.NewProjectile(vector2.X, vector2.Y, num115, SpeedY, Type, Damage, 0.0f, Main.myPlayer); + } + } + else if (this.type == 411) + Projectile.NewProjectile(vector2.X, vector2.Y, num115, SpeedY, Type, Damage, 0.0f, Main.myPlayer, ai1: ((float) this.whoAmI)); + else if (this.type == 424) + { + for (int index = 0; index < 4; ++index) + Projectile.NewProjectile(this.Center.X - (float) (this.spriteDirection * 4), this.Center.Y + 6f, (float) (2 * index - 3) * 0.15f, (float) ((double) -Main.rand.Next(0, 3) * 0.200000002980232 - 0.100000001490116), Type, Damage, 0.0f, Main.myPlayer, ai1: ((float) this.whoAmI)); + } + else if (this.type == 409) + { + int index = NPC.NewNPC((int) this.Center.X, (int) this.Center.Y, 410, this.whoAmI); + Main.npc[index].velocity = new Vector2(num115, SpeedY - 6f); + } + else + Projectile.NewProjectile(vector2.X, vector2.Y, num115, SpeedY, Type, Damage, 0.0f, Main.myPlayer); + } + this.ai[2] = (double) Math.Abs(SpeedY) <= (double) Math.Abs(num115) * 2.0 ? ((double) Math.Abs(num115) <= (double) Math.Abs(SpeedY) * 2.0 ? ((double) SpeedY <= 0.0 ? 4f : 2f) : 3f) : ((double) SpeedY <= 0.0 ? 5f : 1f); + } + if ((double) this.velocity.Y != 0.0 && !flag15 || (double) this.ai[1] <= 0.0) + { + this.ai[2] = 0.0f; + this.ai[1] = 0.0f; + } + else if (!flag14 || num101 != -1 && (double) this.ai[1] >= (double) num101 && (double) this.ai[1] < (double) (num101 + num102) && (!flag15 || (double) this.velocity.Y == 0.0)) + { + this.velocity.X *= 0.9f; + this.spriteDirection = this.direction; + } + } + if (this.type == 468 && !Main.eclipse) + flag14 = true; + else if ((double) this.ai[2] <= 0.0 | flag14 && (double) this.velocity.Y == 0.0 | flag15 && (double) this.ai[1] <= 0.0 && !Main.player[this.target].dead) + { + bool flag18 = Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height); + if (this.type == 520) + flag18 = Collision.CanHitLine(this.Top + new Vector2(0.0f, 20f), 0, 0, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height); + if ((double) Main.player[this.target].stealth == 0.0 && Main.player[this.target].itemAnimation == 0) + flag18 = false; + if (flag18) + { + float num123 = 10f; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num124 = Main.player[this.target].position.X + (float) Main.player[this.target].width * 0.5f - vector2.X; + float num125 = Math.Abs(num124) * 0.1f; + float num126 = Main.player[this.target].position.Y + (float) Main.player[this.target].height * 0.5f - vector2.Y - num125; + float num127 = num124 + (float) Main.rand.Next(-40, 41); + float num128 = num126 + (float) Main.rand.Next(-40, 41); + float num129 = (float) Math.Sqrt((double) num127 * (double) num127 + (double) num128 * (double) num128); + float num130 = 700f; + if (this.type == 214) + num130 = 550f; + if (this.type == 215) + num130 = 800f; + if (this.type >= 498 && this.type <= 506) + num130 = 190f; + if (this.type >= 449 && this.type <= 452) + num130 = 200f; + if (this.type == 481) + num130 = 400f; + if (this.type == 468) + num130 = 400f; + if ((double) num129 < (double) num130) + { + this.netUpdate = true; + this.velocity.X *= 0.5f; + float num131 = num123 / num129; + float num132 = num127 * num131; + float num133 = num128 * num131; + this.ai[2] = 3f; + this.ai[1] = (float) num103; + this.ai[2] = (double) Math.Abs(num133) <= (double) Math.Abs(num132) * 2.0 ? ((double) Math.Abs(num132) <= (double) Math.Abs(num133) * 2.0 ? ((double) num133 <= 0.0 ? 4f : 2f) : 3f) : ((double) num133 <= 0.0 ? 5f : 1f); + } + } + } + if ((double) this.ai[2] <= 0.0 || flag14 && (num101 == -1 || (double) this.ai[1] < (double) num101 || (double) this.ai[1] >= (double) (num101 + num102))) + { + float num134 = 1f; + float num135 = 0.07f; + float num136 = 0.8f; + if (this.type == 214) + { + num134 = 2f; + num135 = 0.09f; + } + else if (this.type == 215) + { + num134 = 1.5f; + num135 = 0.08f; + } + else if (this.type == 381 || this.type == 382) + { + num134 = 2f; + num135 = 0.5f; + } + else if (this.type == 520) + { + num134 = 4f; + num135 = 1f; + num136 = 0.7f; + } + else if (this.type == 411) + { + num134 = 2f; + num135 = 0.5f; + } + else if (this.type == 409) + { + num134 = 2f; + num135 = 0.5f; + } + bool flag19 = false; + if ((this.type == 381 || this.type == 382) && (double) Vector2.Distance(this.Center, Main.player[this.target].Center) < 300.0 && Collision.CanHitLine(this.Center, 0, 0, Main.player[this.target].Center, 0, 0)) + { + flag19 = true; + this.ai[3] = 0.0f; + } + if (this.type == 520 && (double) Vector2.Distance(this.Center, Main.player[this.target].Center) < 400.0 && Collision.CanHitLine(this.Center, 0, 0, Main.player[this.target].Center, 0, 0)) + { + flag19 = true; + this.ai[3] = 0.0f; + } + if ((((double) this.velocity.X < -(double) num134 ? 1 : ((double) this.velocity.X > (double) num134 ? 1 : 0)) | (flag19 ? 1 : 0)) != 0) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * num136; + } + else if ((double) this.velocity.X < (double) num134 && this.direction == 1) + { + this.velocity.X += num135; + if ((double) this.velocity.X > (double) num134) + this.velocity.X = num134; + } + else if ((double) this.velocity.X > -(double) num134 && this.direction == -1) + { + this.velocity.X -= num135; + if ((double) this.velocity.X < -(double) num134) + this.velocity.X = -num134; + } + } + if (this.type == 520) + { + ++this.localAI[2]; + if ((double) this.localAI[2] >= 6.0) + { + this.localAI[2] = 0.0f; + this.localAI[3] = Main.player[this.target].DirectionFrom(this.Top + new Vector2(0.0f, 20f)).ToRotation(); + } + } + } + if (this.type == 109 && Main.netMode != 1 && !Main.player[this.target].dead) + { + if (this.justHit) + this.ai[2] = 0.0f; + ++this.ai[2]; + if ((double) this.ai[2] > 60.0) + { + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f - (float) (this.direction * 24), this.position.Y + 4f); + if (Main.rand.Next(5) != 0 || NPC.AnyNPCs(378)) + { + int num137 = Main.rand.Next(3, 8) * this.direction; + int num138 = Main.rand.Next(-8, -5); + int index = Projectile.NewProjectile(vector2.X, vector2.Y, (float) num137, (float) num138, 75, 80, 0.0f, Main.myPlayer); + Main.projectile[index].timeLeft = 300; + this.ai[2] = 0.0f; + } + else + { + this.ai[2] = -120f; + NetMessage.SendData(23, number: NPC.NewNPC((int) vector2.X, (int) vector2.Y, 378)); + } + } + } + if ((double) this.velocity.Y == 0.0 | flag1) + { + int index21 = (int) ((double) this.position.Y + (double) this.height + 7.0) / 16; + int index22 = (int) ((double) this.position.Y - 9.0) / 16; + int num139 = (int) this.position.X / 16; + int num140 = (int) ((double) this.position.X + (double) this.width) / 16; + int num141 = (int) ((double) this.position.X + 8.0) / 16; + int num142 = (int) ((double) this.position.X + (double) this.width - 8.0) / 16; + bool flag20 = false; + for (int index23 = num141; index23 <= num142; ++index23) + { + if (index23 >= num139 && index23 <= num140 && Main.tile[index23, index21] == null) + { + flag20 = true; + } + else + { + if (Main.tile[index23, index22] != null && Main.tile[index23, index22].nactive() && Main.tileSolid[(int) Main.tile[index23, index22].type]) + { + flag5 = false; + break; + } + if (!flag20 && index23 >= num139 && index23 <= num140 && Main.tile[index23, index21].nactive() && Main.tileSolid[(int) Main.tile[index23, index21].type]) + flag5 = true; + } + } + if (!flag5 && (double) this.velocity.Y < 0.0) + this.velocity.Y = 0.0f; + if (flag20) + return; + } + if (this.type == 428) + flag5 = false; + if ((double) this.velocity.Y >= 0.0 && (this.type != 580 || this.directionY != 1)) + { + int num143 = 0; + if ((double) this.velocity.X < 0.0) + num143 = -1; + if ((double) this.velocity.X > 0.0) + num143 = 1; + Vector2 position = this.position; + position.X += this.velocity.X; + int x = (int) (((double) position.X + (double) (this.width / 2) + (double) ((this.width / 2 + 1) * num143)) / 16.0); + int y = (int) (((double) position.Y + (double) this.height - 1.0) / 16.0); + if (WorldGen.InWorld(x, y, 4)) + { + if (Main.tile[x, y] == null) + Main.tile[x, y] = new Tile(); + if (Main.tile[x, y - 1] == null) + Main.tile[x, y - 1] = new Tile(); + if (Main.tile[x, y - 2] == null) + Main.tile[x, y - 2] = new Tile(); + if (Main.tile[x, y - 3] == null) + Main.tile[x, y - 3] = new Tile(); + if (Main.tile[x, y + 1] == null) + Main.tile[x, y + 1] = new Tile(); + if (Main.tile[x - num143, y - 3] == null) + Main.tile[x - num143, y - 3] = new Tile(); + if ((double) (x * 16) < (double) position.X + (double) this.width && (double) (x * 16 + 16) > (double) position.X && (Main.tile[x, y].nactive() && !Main.tile[x, y].topSlope() && !Main.tile[x, y - 1].topSlope() && Main.tileSolid[(int) Main.tile[x, y].type] && !Main.tileSolidTop[(int) Main.tile[x, y].type] || Main.tile[x, y - 1].halfBrick() && Main.tile[x, y - 1].nactive()) && (!Main.tile[x, y - 1].nactive() || !Main.tileSolid[(int) Main.tile[x, y - 1].type] || Main.tileSolidTop[(int) Main.tile[x, y - 1].type] || Main.tile[x, y - 1].halfBrick() && (!Main.tile[x, y - 4].nactive() || !Main.tileSolid[(int) Main.tile[x, y - 4].type] || Main.tileSolidTop[(int) Main.tile[x, y - 4].type])) && (!Main.tile[x, y - 2].nactive() || !Main.tileSolid[(int) Main.tile[x, y - 2].type] || Main.tileSolidTop[(int) Main.tile[x, y - 2].type]) && (!Main.tile[x, y - 3].nactive() || !Main.tileSolid[(int) Main.tile[x, y - 3].type] || Main.tileSolidTop[(int) Main.tile[x, y - 3].type]) && (!Main.tile[x - num143, y - 3].nactive() || !Main.tileSolid[(int) Main.tile[x - num143, y - 3].type])) + { + float num144 = (float) (y * 16); + if (Main.tile[x, y].halfBrick()) + num144 += 8f; + if (Main.tile[x, y - 1].halfBrick()) + num144 -= 8f; + if ((double) num144 < (double) position.Y + (double) this.height) + { + float num145 = position.Y + (float) this.height - num144; + float num146 = 16.1f; + if (this.type == 163 || this.type == 164 || this.type == 236 || this.type == 239 || this.type == 530) + num146 += 8f; + if ((double) num145 <= (double) num146) + { + this.gfxOffY += this.position.Y + (float) this.height - num144; + this.position.Y = num144 - (float) this.height; + this.stepSpeed = (double) num145 >= 9.0 ? 2f : 1f; + } + } + } + } + } + if (flag5) + { + int index24 = (int) (((double) this.position.X + (double) (this.width / 2) + (double) (15 * this.direction)) / 16.0); + int index25 = (int) (((double) this.position.Y + (double) this.height - 15.0) / 16.0); + if (this.type == 109 || this.type == 163 || this.type == 164 || this.type == 199 || this.type == 236 || this.type == 239 || this.type == 257 || this.type == 258 || this.type == 290 || this.type == 391 || this.type == 425 || this.type == 427 || this.type == 426 || this.type == 580 || this.type == 508 || this.type == 415 || this.type == 530 || this.type == 532 || this.type == 582) + index24 = (int) (((double) this.position.X + (double) (this.width / 2) + (double) ((this.width / 2 + 16) * this.direction)) / 16.0); + if (Main.tile[index24, index25] == null) + Main.tile[index24, index25] = new Tile(); + if (Main.tile[index24, index25 - 1] == null) + Main.tile[index24, index25 - 1] = new Tile(); + if (Main.tile[index24, index25 - 2] == null) + Main.tile[index24, index25 - 2] = new Tile(); + if (Main.tile[index24, index25 - 3] == null) + Main.tile[index24, index25 - 3] = new Tile(); + if (Main.tile[index24, index25 + 1] == null) + Main.tile[index24, index25 + 1] = new Tile(); + if (Main.tile[index24 + this.direction, index25 - 1] == null) + Main.tile[index24 + this.direction, index25 - 1] = new Tile(); + if (Main.tile[index24 + this.direction, index25 + 1] == null) + Main.tile[index24 + this.direction, index25 + 1] = new Tile(); + if (Main.tile[index24 - this.direction, index25 + 1] == null) + Main.tile[index24 - this.direction, index25 + 1] = new Tile(); + Main.tile[index24, index25 + 1].halfBrick(); + if (((!Main.tile[index24, index25 - 1].nactive() ? 0 : (Main.tile[index24, index25 - 1].type == (ushort) 10 ? 1 : (Main.tile[index24, index25 - 1].type == (ushort) 388 ? 1 : 0))) & (flag8 ? 1 : 0)) != 0) + { + ++this.ai[2]; + this.ai[3] = 0.0f; + if ((double) this.ai[2] >= 60.0) + { + bool flag21 = this.type == 3 || this.type == 430 || this.type == 590 || this.type == 331 || this.type == 332 || this.type == 132 || this.type == 161 || this.type == 186 || this.type == 187 || this.type == 188 || this.type == 189 || this.type == 200 || this.type == 223 || this.type == 320 || this.type == 321 || this.type == 319 || this.type == 21 || this.type == 324 || this.type == 323 || this.type == 322 || this.type == 44 || this.type == 196 || this.type == 167 || this.type == 77 || this.type == 197 || this.type == 202 || this.type == 203 || this.type == 449 || this.type == 450 || this.type == 451 || this.type == 452 || this.type == 481 || this.type == 201 || this.type == 635; + bool flag22 = Main.player[this.target].ZoneGraveyard && Main.rand.Next(60) == 0; + if (((!Main.bloodMoon || Main.getGoodWorld ? (!flag22 ? 1 : 0) : 0) & (flag21 ? 1 : 0)) != 0) + this.ai[1] = 0.0f; + this.velocity.X = 0.5f * (float) -this.direction; + int num147 = 5; + if (Main.tile[index24, index25 - 1].type == (ushort) 388) + num147 = 2; + this.ai[1] += (float) num147; + if (this.type == 27) + ++this.ai[1]; + if (this.type == 31 || this.type == 294 || this.type == 295 || this.type == 296) + this.ai[1] += 6f; + this.ai[2] = 0.0f; + bool flag23 = false; + if ((double) this.ai[1] >= 10.0) + { + flag23 = true; + this.ai[1] = 10f; + } + if (this.type == 460) + flag23 = true; + WorldGen.KillTile(index24, index25 - 1, true); + if ((Main.netMode != 1 || !flag23) && flag23 && Main.netMode != 1) + { + if (this.type == 26) + { + WorldGen.KillTile(index24, index25 - 1); + if (Main.netMode == 2) + NetMessage.SendData(17, number2: ((float) index24), number3: ((float) (index25 - 1))); + } + else + { + if (Main.tile[index24, index25 - 1].type == (ushort) 10) + { + bool flag24 = WorldGen.OpenDoor(index24, index25 - 1, this.direction); + if (!flag24) + { + this.ai[3] = (float) num32; + this.netUpdate = true; + } + if (Main.netMode == 2 & flag24) + NetMessage.SendData(19, number2: ((float) index24), number3: ((float) (index25 - 1)), number4: ((float) this.direction)); + } + if (Main.tile[index24, index25 - 1].type == (ushort) 388) + { + bool flag25 = WorldGen.ShiftTallGate(index24, index25 - 1, false); + if (!flag25) + { + this.ai[3] = (float) num32; + this.netUpdate = true; + } + if (Main.netMode == 2 & flag25) + NetMessage.SendData(19, number: 4, number2: ((float) index24), number3: ((float) (index25 - 1))); + } + } + } + } + } + else + { + int spriteDirection = this.spriteDirection; + if (this.type == 425) + spriteDirection *= -1; + if ((double) this.velocity.X < 0.0 && spriteDirection == -1 || (double) this.velocity.X > 0.0 && spriteDirection == 1) + { + if (this.height >= 32 && Main.tile[index24, index25 - 2].nactive() && Main.tileSolid[(int) Main.tile[index24, index25 - 2].type]) + { + if (Main.tile[index24, index25 - 3].nactive() && Main.tileSolid[(int) Main.tile[index24, index25 - 3].type]) + { + this.velocity.Y = -8f; + this.netUpdate = true; + } + else + { + this.velocity.Y = -7f; + this.netUpdate = true; + } + } + else if (Main.tile[index24, index25 - 1].nactive() && Main.tileSolid[(int) Main.tile[index24, index25 - 1].type]) + { + if (this.type == 624) + { + this.velocity.Y = -8f; + if (WorldGen.SolidTile((int) this.Center.X / 16, (int) ((double) this.position.Y + (double) this.height) / 16 - 8)) + { + this.direction *= -1; + this.spriteDirection = this.direction; + this.velocity.X = (float) (3 * this.direction); + } + } + else + this.velocity.Y = -6f; + this.netUpdate = true; + } + else if ((double) this.position.Y + (double) this.height - (double) (index25 * 16) > 20.0 && Main.tile[index24, index25].nactive() && !Main.tile[index24, index25].topSlope() && Main.tileSolid[(int) Main.tile[index24, index25].type]) + { + this.velocity.Y = -5f; + this.netUpdate = true; + } + else if (this.directionY < 0 && this.type != 67 && (!Main.tile[index24, index25 + 1].nactive() || !Main.tileSolid[(int) Main.tile[index24, index25 + 1].type]) && (!Main.tile[index24 + this.direction, index25 + 1].nactive() || !Main.tileSolid[(int) Main.tile[index24 + this.direction, index25 + 1].type])) + { + this.velocity.Y = -8f; + this.velocity.X *= 1.5f; + this.netUpdate = true; + } + else if (flag8) + { + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + } + if ((double) this.velocity.Y == 0.0 & flag6 && (double) this.ai[3] == 1.0) + this.velocity.Y = -5f; + if ((double) this.velocity.Y == 0.0 && (Main.expertMode ? 1 : (this.type == 586 ? 1 : 0)) != 0 && (double) Main.player[this.target].Bottom.Y < (double) this.Top.Y && (double) Math.Abs(this.Center.X - Main.player[this.target].Center.X) < (double) (Main.player[this.target].width * 3) && Collision.CanHit((Entity) this, (Entity) Main.player[this.target])) + { + if (this.type == 586) + { + int num148 = (int) (((double) this.Bottom.Y - 16.0 - (double) Main.player[this.target].Bottom.Y) / 16.0); + if (num148 < 14 && Collision.CanHit((Entity) this, (Entity) Main.player[this.target])) + { + if (num148 < 7) + this.velocity.Y = -8.8f; + else if (num148 < 8) + this.velocity.Y = -9.2f; + else if (num148 < 9) + this.velocity.Y = -9.7f; + else if (num148 < 10) + this.velocity.Y = -10.3f; + else if (num148 < 11) + this.velocity.Y = -10.6f; + else + this.velocity.Y = -11f; + } + } + if ((double) this.velocity.Y == 0.0) + { + int num149 = 6; + if ((double) Main.player[this.target].Bottom.Y > (double) this.Top.Y - (double) (num149 * 16)) + { + this.velocity.Y = -7.9f; + } + else + { + int index26 = (int) ((double) this.Center.X / 16.0); + int num150 = (int) ((double) this.Bottom.Y / 16.0) - 1; + for (int index27 = num150; index27 > num150 - num149; --index27) + { + if (Main.tile[index26, index27].nactive() && TileID.Sets.Platforms[(int) Main.tile[index26, index27].type]) + { + this.velocity.Y = -7.9f; + break; + } + } + } + } + } + } + if ((this.type == 31 || this.type == 294 || this.type == 295 || this.type == 296 || this.type == 47 || this.type == 77 || this.type == 104 || this.type == 168 || this.type == 196 || this.type == 385 || this.type == 389 || this.type == 464 || this.type == 470 || this.type >= 524 && this.type <= 527) && (double) this.velocity.Y == 0.0) + { + int num151 = 100; + int num152 = 50; + if (this.type == 586) + { + num151 = 150; + num152 = 150; + } + if ((double) Math.Abs((float) ((double) this.position.X + (double) (this.width / 2) - ((double) Main.player[this.target].position.X + (double) (Main.player[this.target].width / 2)))) < (double) num151 && (double) Math.Abs((float) ((double) this.position.Y + (double) (this.height / 2) - ((double) Main.player[this.target].position.Y + (double) (Main.player[this.target].height / 2)))) < (double) num152 && (this.direction > 0 && (double) this.velocity.X >= 1.0 || this.direction < 0 && (double) this.velocity.X <= -1.0)) + { + if (this.type == 586) + { + this.velocity.X += (float) this.direction; + this.velocity.X *= 2f; + if ((double) this.velocity.X > 8.0) + this.velocity.X = 8f; + if ((double) this.velocity.X < -8.0) + this.velocity.X = -8f; + this.velocity.Y = -4.5f; + if ((double) this.position.Y > (double) Main.player[this.target].position.Y + 40.0) + this.velocity.Y -= 2f; + if ((double) this.position.Y > (double) Main.player[this.target].position.Y + 80.0) + this.velocity.Y -= 2f; + if ((double) this.position.Y > (double) Main.player[this.target].position.Y + 120.0) + this.velocity.Y -= 2f; + } + else + { + this.velocity.X *= 2f; + if ((double) this.velocity.X > 3.0) + this.velocity.X = 3f; + if ((double) this.velocity.X < -3.0) + this.velocity.X = -3f; + this.velocity.Y = -4f; + } + this.netUpdate = true; + } + } + if (this.type == 120 && (double) this.velocity.Y < 0.0) + this.velocity.Y *= 1.1f; + if (this.type == 287 && (double) this.velocity.Y == 0.0 && (double) Math.Abs((float) ((double) this.position.X + (double) (this.width / 2) - ((double) Main.player[this.target].position.X + (double) (Main.player[this.target].width / 2)))) < 150.0 && (double) Math.Abs((float) ((double) this.position.Y + (double) (this.height / 2) - ((double) Main.player[this.target].position.Y + (double) (Main.player[this.target].height / 2)))) < 50.0 && (this.direction > 0 && (double) this.velocity.X >= 1.0 || this.direction < 0 && (double) this.velocity.X <= -1.0)) + { + this.velocity.X = (float) (8 * this.direction); + this.velocity.Y = -4f; + this.netUpdate = true; + } + if (this.type == 287 && (double) this.velocity.Y < 0.0) + { + this.velocity.X *= 1.2f; + this.velocity.Y *= 1.1f; + } + if (this.type == 460 && (double) this.velocity.Y < 0.0) + { + this.velocity.X *= 1.3f; + this.velocity.Y *= 1.1f; + } + } + } + else if (flag8) + { + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + } + if (Main.netMode == 1 || this.type != 120 || (double) this.ai[3] < (double) num32) + return; + int num153 = (int) Main.player[this.target].position.X / 16; + int num154 = (int) Main.player[this.target].position.Y / 16; + int num155 = (int) this.position.X / 16; + int num156 = (int) this.position.Y / 16; + int num157 = 20; + int num158 = 0; + bool flag26 = false; + if ((double) Math.Abs(this.position.X - Main.player[this.target].position.X) + (double) Math.Abs(this.position.Y - Main.player[this.target].position.Y) > 2000.0) + { + num158 = 100; + flag26 = true; + } + while (!flag26 && num158 < 100) + { + ++num158; + int index28 = Main.rand.Next(num153 - num157, num153 + num157); + for (int index29 = Main.rand.Next(num154 - num157, num154 + num157); index29 < num154 + num157; ++index29) + { + if ((index29 < num154 - 4 || index29 > num154 + 4 || index28 < num153 - 4 || index28 > num153 + 4) && (index29 < num156 - 1 || index29 > num156 + 1 || index28 < num155 - 1 || index28 > num155 + 1) && Main.tile[index28, index29].nactive()) + { + bool flag27 = true; + if (this.type == 32 && Main.tile[index28, index29 - 1].wall == (ushort) 0) + flag27 = false; + else if (Main.tile[index28, index29 - 1].lava()) + flag27 = false; + if (flag27 && Main.tileSolid[(int) Main.tile[index28, index29].type] && !Collision.SolidTiles(index28 - 1, index28 + 1, index29 - 4, index29 - 1)) + { + this.position.X = (float) (index28 * 16 - this.width / 2); + this.position.Y = (float) (index29 * 16 - this.height); + this.netUpdate = true; + this.ai[3] = -120f; + } + } + } + } + } + + public static bool DespawnEncouragement_AIStyle3_Fighters_NotDiscouraged( + int npcID, + Vector2 position, + NPC npcInstance) + { + return Main.eclipse || !Main.dayTime || npcInstance != null && npcInstance.SpawnedFromStatue || (double) position.Y > Main.worldSurface * 16.0 || npcInstance != null && Main.player[npcInstance.target].ZoneGraveyard || Main.snowMoon && (npcID == 343 || npcID == 350) || Main.invasionType == 1 && (npcID == 26 || npcID == 27 || npcID == 28 || npcID == 111 || npcID == 471) || npcID == 73 || npcID == 624 || npcID == 631 && (double) npcInstance.ai[2] > 0.0 || Main.invasionType == 3 && npcID >= 212 && npcID <= 216 || Main.invasionType == 4 && (npcID == 381 || npcID == 382 || npcID == 383 || npcID == 385 || npcID == 386 || npcID == 389 || npcID == 391 || npcID == 520) || npcID == 31 || npcID == 294 || npcID == 295 || npcID == 296 || npcID == 47 || npcID == 67 || npcID == 77 || npcID == 78 || npcID == 79 || npcID == 80 || npcID == 630 || npcID == 110 || npcID == 120 || npcID == 168 || npcID == 181 || npcID == 185 || npcID == 198 || npcID == 199 || npcID == 206 || npcID == 217 || npcID == 218 || npcID == 219 || npcID == 220 || npcID == 239 || npcID == 243 || npcID == 254 || npcID == (int) byte.MaxValue || npcID == 257 || npcID == 258 || npcID == 291 || npcID == 292 || npcID == 293 || npcID == 379 || npcID == 380 || npcID == 464 || npcID == 470 || npcID == 424 || npcID == 411 && (npcInstance == null || (double) npcInstance.ai[1] >= 180.0 || (double) npcInstance.ai[1] < 90.0) || npcID == 409 || npcID == 425 || npcID == 429 || npcID == 427 || npcID == 428 || npcID == 580 || npcID == 582 || npcID == 508 || npcID == 415 || npcID == 419 || npcID >= 524 && npcID <= 527 || npcID == 528 || npcID == 529 || npcID == 530 || npcID == 532; + } + + public static bool DespawnEncouragement_AIStyle3_Fighters_CanBeBusyWithAction(int npcID) => npcID == 110 || npcID == 111 || npcID == 206 || npcID == 216 || npcID == 214 || npcID == 215 || npcID == 291 || npcID == 292 || npcID == 293 || npcID == 350 || npcID == 381 || npcID == 382 || npcID == 383 || npcID == 385 || npcID == 386 || npcID == 389 || npcID == 391 || npcID == 469 || npcID == 166 || npcID == 466 || npcID == 471 || npcID == 411 || npcID == 409 || npcID == 424 || npcID == 425 || npcID == 426 || npcID == 415 || npcID == 419 || npcID == 520; + + private void AI_001_Slimes() + { + if (this.type == 1 && ((double) this.ai[1] == 1.0 || (double) this.ai[1] == 2.0 || (double) this.ai[1] == 3.0)) + this.ai[1] = -1f; + if (this.type == 1 && (double) this.ai[1] == 0.0 && Main.netMode != 1 && (double) this.value > 0.0) + { + this.ai[1] = -1f; + if (Main.rand.Next(20) == 0) + { + this.ai[1] = (float) NPC.AI_001_Slimes_GenerateItemInsideBody((double) this.ai[0] == -999.0); + this.netUpdate = true; + } + } + if (this.type == 1 && (double) this.ai[0] == -999.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + this.rotation = 0.0f; + } + else + { + if (this.type == 244) + { + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), (float) Main.DiscoR / (float) byte.MaxValue * 1f, (float) Main.DiscoG / (float) byte.MaxValue * 1f, (float) Main.DiscoB / (float) byte.MaxValue * 1f); + this.AI_001_SetRainbowSlimeColor(); + } + bool flag = false; + if (!Main.dayTime || this.life != this.lifeMax || (double) this.position.Y > Main.worldSurface * 16.0 || Main.slimeRain) + flag = true; + if (this.type == 81) + { + flag = true; + if (Main.rand.Next(30) == 0) + { + this.position = this.position + this.netOffset; + int index = Dust.NewDust(this.position, this.width, this.height, 14, Alpha: this.alpha, newColor: this.color); + Main.dust[index].velocity *= 0.3f; + this.position = this.position - this.netOffset; + } + } + if ((this.type == 377 || this.type == 446) && this.target != (int) byte.MaxValue && !Main.player[this.target].dead && (double) Vector2.Distance(this.Center, Main.player[this.target].Center) <= 200.0 && !this.wet) + flag = true; + if (this.type == 183) + flag = true; + if (this.type == 304) + flag = true; + if (this.type == 244) + { + flag = true; + this.ai[0] += 2f; + } + if (this.type == 147 && Main.rand.Next(10) == 0) + { + this.position = this.position + this.netOffset; + int index = Dust.NewDust(this.position, this.width, this.height, 76); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.1f; + this.position = this.position - this.netOffset; + } + if (this.type == 184) + { + if (Main.rand.Next(8) == 0) + { + this.position = this.position + this.netOffset; + int index = Dust.NewDust(this.position - this.velocity, this.width, this.height, 76); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.15f; + this.position = this.position - this.netOffset; + } + flag = true; + if ((double) this.localAI[0] > 0.0) + --this.localAI[0]; + if (!this.wet && !Main.player[this.target].npcTypeNoAggro[this.type]) + { + Vector2 vector2_1 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num1 = Main.player[this.target].position.X + (float) Main.player[this.target].width * 0.5f - vector2_1.X; + float num2 = Main.player[this.target].position.Y - vector2_1.Y; + float num3 = (float) Math.Sqrt((double) num1 * (double) num1 + (double) num2 * (double) num2); + if (Main.expertMode && (double) num3 < 120.0 && Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height) && (double) this.velocity.Y == 0.0) + { + this.ai[0] = -40f; + if ((double) this.velocity.Y == 0.0) + this.velocity.X *= 0.9f; + if (Main.netMode != 1 && (double) this.localAI[0] == 0.0) + { + for (int index = 0; index < 5; ++index) + { + Vector2 vector2_2 = new Vector2((float) (index - 2), -4f); + vector2_2.X *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00499999988824129); + vector2_2.Y *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00499999988824129); + vector2_2.Normalize(); + vector2_2 *= (float) (4.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + int damageForProjectiles = this.GetAttackDamage_ForProjectiles(9f, 9f); + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, vector2_2.X, vector2_2.Y, 174, damageForProjectiles, 0.0f, Main.myPlayer); + this.localAI[0] = 30f; + } + } + } + else if ((double) num3 < 200.0 && Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height) && (double) this.velocity.Y == 0.0) + { + this.ai[0] = -40f; + if ((double) this.velocity.Y == 0.0) + this.velocity.X *= 0.9f; + if (Main.netMode != 1 && (double) this.localAI[0] == 0.0) + { + float num4 = Main.player[this.target].position.Y - vector2_1.Y - (float) Main.rand.Next(0, 200); + float num5 = 4.5f / (float) Math.Sqrt((double) num1 * (double) num1 + (double) num4 * (double) num4); + float SpeedX = num1 * num5; + float SpeedY = num4 * num5; + this.localAI[0] = 50f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, 174, 9, 0.0f, Main.myPlayer); + } + } + } + } + if (this.type == 535) + { + flag = true; + if ((double) this.localAI[0] > 0.0) + --this.localAI[0]; + if (!this.wet && !Main.player[this.target].npcTypeNoAggro[this.type]) + { + Vector2 vector2_3 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num6 = Main.player[this.target].position.X + (float) Main.player[this.target].width * 0.5f - vector2_3.X; + float num7 = Main.player[this.target].position.Y - vector2_3.Y; + float num8 = (float) Math.Sqrt((double) num6 * (double) num6 + (double) num7 * (double) num7); + if (Main.expertMode && (double) num8 < 120.0 && Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height) && (double) this.velocity.Y == 0.0) + { + this.ai[0] = -40f; + if ((double) this.velocity.Y == 0.0) + this.velocity.X *= 0.9f; + if (Main.netMode != 1 && (double) this.localAI[0] == 0.0) + { + for (int index = 0; index < 5; ++index) + { + Vector2 vector2_4 = new Vector2((float) (index - 2), -4f); + vector2_4.X *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00499999988824129); + vector2_4.Y *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00499999988824129); + vector2_4.Normalize(); + vector2_4 *= (float) (4.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + int damageForProjectiles = this.GetAttackDamage_ForProjectiles(9f, 9f); + Projectile.NewProjectile(vector2_3.X, vector2_3.Y, vector2_4.X, vector2_4.Y, 605, damageForProjectiles, 0.0f, Main.myPlayer); + this.localAI[0] = 30f; + } + } + } + else if ((double) num8 < 200.0 && Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height) && (double) this.velocity.Y == 0.0) + { + this.ai[0] = -40f; + if ((double) this.velocity.Y == 0.0) + this.velocity.X *= 0.9f; + if (Main.netMode != 1 && (double) this.localAI[0] == 0.0) + { + float num9 = Main.player[this.target].position.Y - vector2_3.Y - (float) Main.rand.Next(0, 200); + float num10 = 4.5f / (float) Math.Sqrt((double) num6 * (double) num6 + (double) num9 * (double) num9); + float SpeedX = num6 * num10; + float SpeedY = num9 * num10; + this.localAI[0] = 50f; + Projectile.NewProjectile(vector2_3.X, vector2_3.Y, SpeedX, SpeedY, 605, 9, 0.0f, Main.myPlayer); + } + } + } + } + if (this.type == 658) + { + flag = true; + if ((double) this.localAI[0] > 0.0) + --this.localAI[0]; + if (!this.wet && Main.player[this.target].active && !Main.player[this.target].dead && !Main.player[this.target].npcTypeNoAggro[this.type]) + { + Player player = Main.player[this.target]; + Vector2 center = this.Center; + float num11 = player.Center.X - center.X; + float num12 = player.Center.Y - center.Y; + float num13 = (float) Math.Sqrt((double) num11 * (double) num11 + (double) num12 * (double) num12); + int num14 = NPC.CountNPCS(658); + if (Main.expertMode && num14 < 5 && (double) Math.Abs(num11) < 500.0 && (double) Math.Abs(num12) < 550.0 && Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height) && (double) this.velocity.Y == 0.0) + { + this.ai[0] = -40f; + if ((double) this.velocity.Y == 0.0) + this.velocity.X *= 0.9f; + if (Main.netMode != 1 && (double) this.localAI[0] == 0.0) + { + for (int index = 0; index < 3; ++index) + { + Vector2 vector2 = new Vector2((float) (index - 1), -4f); + vector2.X *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00499999988824129); + vector2.Y *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00499999988824129); + vector2.Normalize(); + vector2 *= (float) (6.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + if ((double) num13 > 350.0) + vector2 *= 2f; + else if ((double) num13 > 250.0) + vector2 *= 1.5f; + int projectilesMultiLerp = this.GetAttackDamage_ForProjectiles_MultiLerp(15f, 20f, 25f); + Projectile.NewProjectile(center.X, center.Y, vector2.X, vector2.Y, 920, projectilesMultiLerp, 0.0f, Main.myPlayer); + this.localAI[0] = 25f; + if (num14 > 4) + break; + } + } + } + else if ((double) Math.Abs(num11) < 500.0 && (double) Math.Abs(num12) < 550.0 && Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height) && (double) this.velocity.Y == 0.0) + { + float num15 = num13; + this.ai[0] = -40f; + if ((double) this.velocity.Y == 0.0) + this.velocity.X *= 0.9f; + if (Main.netMode != 1 && (double) this.localAI[0] == 0.0) + { + float num16 = Main.player[this.target].position.Y - center.Y - (float) Main.rand.Next(0, 200); + float num17 = 4.5f / (float) Math.Sqrt((double) num11 * (double) num11 + (double) num16 * (double) num16) * 2f; + if ((double) num15 > 350.0) + num17 *= 2f; + else if ((double) num15 > 250.0) + num17 *= 1.5f; + float SpeedX = num11 * num17; + float SpeedY = num16 * num17; + this.localAI[0] = 50f; + int projectilesMultiLerp = this.GetAttackDamage_ForProjectiles_MultiLerp(15f, 20f, 25f); + Projectile.NewProjectile(center.X, center.Y, SpeedX, SpeedY, 920, projectilesMultiLerp, 0.0f, Main.myPlayer); + } + } + } + } + if (this.type == 659) + { + flag = true; + if ((double) this.localAI[0] > 0.0) + --this.localAI[0]; + if (!this.wet && Main.player[this.target].active && !Main.player[this.target].dead && !Main.player[this.target].npcTypeNoAggro[this.type]) + { + Player player = Main.player[this.target]; + Vector2 center = this.Center; + float num18 = player.Center.X - center.X; + float num19 = player.Center.Y - center.Y; + float num20 = (float) Math.Sqrt((double) num18 * (double) num18 + (double) num19 * (double) num19); + if ((double) Math.Abs(num18) < 500.0 && (double) Math.Abs(num19) < 550.0 && Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height) && (double) this.velocity.Y == 0.0) + { + this.ai[0] = -40f; + if ((double) this.velocity.Y == 0.0) + this.velocity.X *= 0.9f; + if (Main.netMode != 1 && (double) this.localAI[0] == 0.0) + { + float num21 = Main.player[this.target].position.Y - center.Y - (float) Main.rand.Next(0, 200); + float num22 = 4.5f / (float) Math.Sqrt((double) num18 * (double) num18 + (double) num21 * (double) num21) * 2f; + if ((double) num20 > 350.0) + num22 *= 1.75f; + else if ((double) num20 > 250.0) + num22 *= 1.25f; + float SpeedX = num18 * num22; + float SpeedY = num21 * num22; + this.localAI[0] = 40f; + if (Main.expertMode) + this.localAI[0] = 30f; + int projectilesMultiLerp = this.GetAttackDamage_ForProjectiles_MultiLerp(15f, 20f, 25f); + Projectile.NewProjectile(center.X, center.Y, SpeedX, SpeedY, 921, projectilesMultiLerp, 0.0f, Main.myPlayer); + } + } + } + } + if (this.type == 204) + { + flag = true; + if ((double) this.localAI[0] > 0.0) + --this.localAI[0]; + if (!this.wet && !Main.player[this.target].npcTypeNoAggro[this.type]) + { + Vector2 vector2_5 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num23 = Main.player[this.target].position.X + (float) Main.player[this.target].width * 0.5f - vector2_5.X; + float num24 = Main.player[this.target].position.Y - vector2_5.Y; + float num25 = (float) Math.Sqrt((double) num23 * (double) num23 + (double) num24 * (double) num24); + if (Main.expertMode && (double) num25 < 200.0 && Collision.CanHit(new Vector2(this.position.X, this.position.Y - 20f), this.width, this.height + 20, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height) && (double) this.velocity.Y == 0.0) + { + this.ai[0] = -40f; + if ((double) this.velocity.Y == 0.0) + this.velocity.X *= 0.9f; + if (Main.netMode != 1 && (double) this.localAI[0] == 0.0) + { + for (int index = 0; index < 5; ++index) + { + Vector2 vector2_6 = new Vector2((float) (index - 2), -2f); + vector2_6.X *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.0199999995529652); + vector2_6.Y *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.0199999995529652); + vector2_6.Normalize(); + vector2_6 *= (float) (3.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + int damageForProjectiles = this.GetAttackDamage_ForProjectiles(13f, 13f); + Projectile.NewProjectile(vector2_5.X, vector2_5.Y, vector2_6.X, vector2_6.Y, 176, damageForProjectiles, 0.0f, Main.myPlayer); + this.localAI[0] = 80f; + } + } + } + if ((double) num25 < 400.0 && Collision.CanHit(new Vector2(this.position.X, this.position.Y - 20f), this.width, this.height + 20, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height) && (double) this.velocity.Y == 0.0) + { + this.ai[0] = -80f; + if ((double) this.velocity.Y == 0.0) + this.velocity.X *= 0.9f; + if (Main.netMode != 1 && (double) this.localAI[0] == 0.0) + { + float num26 = Main.player[this.target].position.Y - vector2_5.Y - (float) Main.rand.Next(-30, 20) - num25 * 0.05f; + float num27 = Main.player[this.target].position.X - vector2_5.X - (float) Main.rand.Next(-20, 20); + float num28 = 7f / (float) Math.Sqrt((double) num27 * (double) num27 + (double) num26 * (double) num26); + float SpeedX = num27 * num28; + float SpeedY = num26 * num28; + this.localAI[0] = 65f; + Projectile.NewProjectile(vector2_5.X, vector2_5.Y, SpeedX, SpeedY, 176, 13, 0.0f, Main.myPlayer); + } + } + } + } + if (this.type == 377 || this.type == 446) + { + if ((double) this.localAI[2] < 90.0) + ++this.localAI[2]; + else + this.friendly = false; + } + if (this.type == 59) + { + this.position = this.position + this.netOffset; + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), 1f, 0.3f, 0.1f); + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 100, Scale: 1.7f); + Main.dust[index].noGravity = true; + this.position = this.position - this.netOffset; + } + if ((double) this.ai[2] > 1.0) + --this.ai[2]; + if (this.wet) + { + if (this.collideY) + this.velocity.Y = -2f; + if ((double) this.velocity.Y < 0.0 && (double) this.ai[3] == (double) this.position.X) + { + this.direction *= -1; + this.ai[2] = 200f; + } + if ((double) this.velocity.Y > 0.0) + this.ai[3] = this.position.X; + if (this.type == 59) + { + if ((double) this.velocity.Y > 2.0) + this.velocity.Y *= 0.9f; + else if (this.directionY < 0) + this.velocity.Y -= 0.8f; + this.velocity.Y -= 0.5f; + if ((double) this.velocity.Y < -10.0) + this.velocity.Y = -10f; + } + else + { + if ((double) this.velocity.Y > 2.0) + this.velocity.Y *= 0.9f; + this.velocity.Y -= 0.5f; + if ((double) this.velocity.Y < -4.0) + this.velocity.Y = -4f; + } + if ((double) this.ai[2] == 1.0 & flag) + this.TargetClosest(); + } + this.aiAction = 0; + if ((double) this.ai[2] == 0.0) + { + this.ai[0] = -100f; + this.ai[2] = 1f; + this.TargetClosest(); + } + if ((double) this.velocity.Y == 0.0) + { + if (this.collideY && (double) this.oldVelocity.Y != 0.0 && Collision.SolidCollision(this.position, this.width, this.height)) + this.position.X -= this.velocity.X + (float) this.direction; + if ((double) this.ai[3] == (double) this.position.X) + { + this.direction *= -1; + this.ai[2] = 200f; + } + this.ai[3] = 0.0f; + this.velocity.X *= 0.8f; + if ((double) this.velocity.X > -0.1 && (double) this.velocity.X < 0.1) + this.velocity.X = 0.0f; + if (flag) + ++this.ai[0]; + ++this.ai[0]; + if (this.type == 59) + this.ai[0] += 2f; + if (this.type == 71) + this.ai[0] += 3f; + if (this.type == 138) + this.ai[0] += 2f; + if (this.type == 183) + ++this.ai[0]; + if (this.type == 658) + this.ai[0] += 5f; + if (this.type == 659) + this.ai[0] += 3f; + if (this.type == 304) + this.ai[0] += (float) ((1 - this.life / this.lifeMax) * 10); + if (this.type == 377 || this.type == 446) + this.ai[0] += 3f; + if (this.type == 81) + { + if ((double) this.scale >= 0.0) + this.ai[0] += 4f; + else + ++this.ai[0]; + } + float num29 = -1000f; + if (this.type == 659) + num29 = -500f; + int num30 = 0; + if ((double) this.ai[0] >= 0.0) + num30 = 1; + if ((double) this.ai[0] >= (double) num29 && (double) this.ai[0] <= (double) num29 * 0.5) + num30 = 2; + if ((double) this.ai[0] >= (double) num29 * 2.0 && (double) this.ai[0] <= (double) num29 * 1.5) + num30 = 3; + if (num30 > 0) + { + this.netUpdate = true; + if (flag && (double) this.ai[2] == 1.0) + this.TargetClosest(); + if (num30 == 3) + { + this.velocity.Y = -8f; + if (this.type == 59) + this.velocity.Y -= 2f; + this.velocity.X += (float) (3 * this.direction); + if (this.type == 59) + this.velocity.X += 0.5f * (float) this.direction; + this.ai[0] = -200f; + this.ai[3] = this.position.X; + } + else + { + this.velocity.Y = -6f; + this.velocity.X += (float) (2 * this.direction); + if (this.type == 59) + this.velocity.X += (float) (2 * this.direction); + this.ai[0] = -120f; + if (num30 == 1) + this.ai[0] += num29; + else + this.ai[0] += num29 * 2f; + } + if (this.type == 659) + { + this.velocity.Y *= 1.6f; + this.velocity.X *= 1.2f; + } + if (this.type == 141) + { + this.velocity.Y *= 1.3f; + this.velocity.X *= 1.2f; + } + if (this.type != 377 && this.type != 446) + return; + this.velocity.Y *= 0.9f; + this.velocity.X *= 0.6f; + if (flag) + { + this.direction = -this.direction; + this.velocity.X *= -1f; + } + if (!WorldGen.SolidTile((int) ((double) this.Center.X / 16.0), (int) ((double) this.Center.Y / 16.0) - 1) || -(double) this.velocity.Y + (double) this.height <= 16.0) + return; + this.velocity.Y = (float) -(16 - this.height); + } + else + { + if ((double) this.ai[0] < -30.0) + return; + this.aiAction = 1; + } + } + else + { + if (this.target >= (int) byte.MaxValue || (this.direction != 1 || (double) this.velocity.X >= 3.0) && (this.direction != -1 || (double) this.velocity.X <= -3.0)) + return; + if (this.collideX && (double) Math.Abs(this.velocity.X) == 0.200000002980232) + this.position.X -= 1.4f * (float) this.direction; + if (this.collideY && (double) this.oldVelocity.Y != 0.0 && Collision.SolidCollision(this.position, this.width, this.height)) + this.position.X -= this.velocity.X + (float) this.direction; + if (this.direction == -1 && (double) this.velocity.X < 0.01 || this.direction == 1 && (double) this.velocity.X > -0.01) + this.velocity.X += 0.2f * (float) this.direction; + else + this.velocity.X *= 0.93f; + } + } + } + + public void AI_001_SetRainbowSlimeColor() + { + this.color.R = (byte) Main.DiscoR; + this.color.G = (byte) Main.DiscoG; + this.color.B = (byte) Main.DiscoB; + this.color.A = (byte) 100; + this.alpha = 175; + } + + private static int AI_001_Slimes_GenerateItemInsideBody(bool isBallooned) + { + int num1 = Main.rand.Next(4); + int num2; + if (isBallooned) + { + switch (Main.rand.Next(13)) + { + case 1: + num2 = 4368; + break; + case 2: + num2 = 4369; + break; + case 3: + num2 = 4370; + break; + case 4: + num2 = 4371; + break; + case 5: + num2 = 4612; + break; + case 6: + num2 = 4674; + break; + case 7: + case 8: + case 9: + num2 = 4343; + break; + case 10: + case 11: + case 12: + num2 = 4344; + break; + default: + num2 = 4367; + break; + } + } + else + { + switch (num1) + { + case 0: + switch (Main.rand.Next(7)) + { + case 0: + num2 = 290; + break; + case 1: + num2 = 292; + break; + case 2: + num2 = 296; + break; + case 3: + num2 = 2322; + break; + default: + num2 = Main.netMode == 0 || Main.rand.Next(2) != 0 ? 2350 : 2997; + break; + } + break; + case 1: + switch (Main.rand.Next(4)) + { + case 0: + num2 = 8; + break; + case 1: + num2 = 166; + break; + case 2: + num2 = 965; + break; + default: + num2 = 58; + break; + } + break; + case 2: + num2 = Main.rand.Next(2) != 0 ? Main.rand.Next(699, 703) : Main.rand.Next(11, 15); + break; + default: + switch (Main.rand.Next(3)) + { + case 0: + num2 = 71; + break; + case 1: + num2 = 72; + break; + default: + num2 = 73; + break; + } + break; + } + } + return num2; + } + + private void AI_110_Betsy() + { + NPCUtils.TargetClosestBetsy(this, false); + NPCAimedTarget targetData = this.GetTargetData(); + int num1 = -1; + float num2 = 1f; + int Damage1 = 35; + int Damage2 = 35; + float num3 = 10f; + float moveSpeed = 0.45f; + float num4 = 7.5f; + float num5 = 30f; + float num6 = 30f; + float num7 = 23f; + float num8 = 600f; + float num9 = 12f; + float num10 = 40f; + float num11 = 80f; + float num12 = num10 + num11; + float num13 = 1500f; + float num14 = 60f; + float num15 = 13f; + float amount = 0.03333334f; + float num16 = 12f; + int num17 = 10; + int num18 = 6 * num17; + float num19 = 60f; + float num20 = num14 + (float) num18 + num19; + float num21 = 60f; + float num22 = (float) (6.28318548202515 * (1.0 / (double) num21)); + float num23 = 0.1f; + float num24 = 32f; + float num25 = 90f; + float num26 = 20f; + double num27 = (double) this.ai[0]; + if ((double) this.ai[0] == 0.0) + { + if ((double) ++this.ai[1] >= (double) num3) + { + this.ai[1] = 0.0f; + this.ai[0] = 1f; + this.ai[2] = 0.0f; + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 1.0) + { + if ((double) this.ai[2] == 0.0) + this.ai[2] = (double) this.Center.X < (double) targetData.Center.X ? 1f : -1f; + this.SimpleFlyMovement(this.DirectionTo(targetData.Center + new Vector2((float) (-(double) this.ai[2] * 300.0), -200f)) * num4, moveSpeed); + this.direction = this.spriteDirection = (double) this.Center.X < (double) targetData.Center.X ? 1 : -1; + if ((double) ++this.ai[1] >= (double) num5) + { + int num28 = 1; + if ((double) this.ai[3] == 5.0 && Main.rand.Next(3) == 0) + ++this.ai[3]; + switch ((int) this.ai[3]) + { + case 0: + case 1: + case 3: + num28 = 2; + break; + case 2: + num28 = 3; + break; + case 4: + num28 = 4; + break; + case 5: + num28 = 5; + break; + case 6: + num28 = 3; + break; + case 7: + num28 = 6; + break; + } + this.ai[0] = (float) num28; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + ++this.ai[3]; + this.netUpdate = true; + if ((double) this.ai[3] >= 8.0) + this.ai[3] = 0.0f; + switch (num28) + { + case 2: + Vector2 v1 = this.DirectionTo(targetData.Center); + this.spriteDirection = (double) v1.X > 0.0 ? 1 : -1; + this.rotation = v1.ToRotation(); + if (this.spriteDirection == -1) + this.rotation += 3.141593f; + this.velocity = v1 * num7; + break; + case 3: + Vector2 vector2 = new Vector2((double) targetData.Center.X > (double) this.Center.X ? 1f : -1f, 0.0f); + this.spriteDirection = (double) vector2.X > 0.0 ? 1 : -1; + this.velocity = vector2 * -2f; + break; + case 5: + Vector2 v2 = this.DirectionTo(targetData.Center); + this.spriteDirection = (double) v2.X > 0.0 ? 1 : -1; + this.rotation = v2.ToRotation(); + if (this.spriteDirection == -1) + this.rotation += 3.141593f; + this.velocity = v2 * num24; + break; + } + } + } + else if ((double) this.ai[0] == 2.0) + { + if ((double) this.ai[1] == 0.0) + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_BetsyWindAttack, this.Center); + if ((double) ++this.ai[1] >= (double) num6) + { + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + } + } + else if ((double) this.ai[0] == 3.0) + { + ActiveSound activeSound = SoundEngine.GetActiveSound(SlotId.FromFloat(this.localAI[2])); + if (activeSound != null) + activeSound.Position = this.Center; + ++this.ai[1]; + int num29 = (double) this.Center.X < (double) targetData.Center.X ? 1 : -1; + this.ai[2] = (float) num29; + if ((double) this.ai[1] < (double) num10) + { + Vector2 vector2_1 = targetData.Center + new Vector2((float) num29 * -num8, -250f); + Vector2 vector2_2 = this.DirectionTo(vector2_1) * num9; + if ((double) this.Distance(vector2_1) < (double) num9) + this.Center = vector2_1; + else + this.position = this.position + vector2_2; + if ((double) Vector2.Distance(vector2_1, this.Center) < 16.0) + this.ai[1] = num10 - 1f; + num2 = 1.5f; + } + if ((double) this.ai[1] == (double) num10) + { + int num30 = (double) targetData.Center.X > (double) this.Center.X ? 1 : -1; + this.velocity = new Vector2((float) num30, 0.0f) * 10f; + this.direction = this.spriteDirection = num30; + if (Main.netMode != 1) + Projectile.NewProjectile(this.Center, this.velocity, 687, Damage1, 0.0f, Main.myPlayer, ai1: ((float) this.whoAmI)); + float[] localAi = this.localAI; + SlotId slotId = SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_BetsyFlameBreath, this.Center); + double num31 = (double) ((SlotId) ref slotId).ToFloat(); + localAi[2] = (float) num31; + } + if ((double) this.ai[1] >= (double) num10) + { + num2 = 1.5f; + if ((double) Math.Abs(targetData.Center.X - this.Center.X) > 550.0 && (double) Math.Abs(this.velocity.X) < 20.0) + this.velocity.X += (float) Math.Sign(this.velocity.X) * 0.5f; + } + if ((double) this.ai[1] >= (double) num12) + { + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + } + } + else if ((double) this.ai[0] == 4.0) + { + int num32 = (double) this.Center.X < (double) targetData.Center.X ? 1 : -1; + this.ai[2] = (float) num32; + if ((double) this.ai[1] < (double) num14) + { + Vector2 Destination = targetData.Center + new Vector2((float) num32 * -num13, -350f); + this.velocity = Vector2.Lerp(this.velocity, this.DirectionTo(Destination) * num15, amount); + this.direction = this.spriteDirection = (double) this.Center.X < (double) targetData.Center.X ? 1 : -1; + if ((double) Vector2.Distance(Destination, this.Center) < 16.0) + this.ai[1] = num14 - 1f; + num2 = 1.5f; + } + else if ((double) this.ai[1] == (double) num14) + { + Vector2 v = this.DirectionTo(targetData.Center); + v.Y *= 0.25f; + v = v.SafeNormalize(Vector2.UnitX * (float) this.direction); + this.spriteDirection = (double) v.X > 0.0 ? 1 : -1; + this.rotation = v.ToRotation(); + if (this.spriteDirection == -1) + this.rotation += 3.141593f; + this.velocity = v * num16; + } + else + { + this.position.X += this.DirectionTo(targetData.Center).X * 7f; + this.position.Y += this.DirectionTo(targetData.Center + new Vector2(0.0f, -400f)).Y * 6f; + if ((double) this.ai[1] <= (double) num20 - (double) num19) + num2 = 1.5f; + Vector2 position = this.Center + new Vector2((110f + 30f) * (float) this.direction, 20f).RotatedBy((double) this.rotation); + int num33 = (int) ((double) this.ai[1] - (double) num14 + 1.0); + if (num33 <= num18 && num33 % num17 == 0 && Main.netMode != 1) + Projectile.NewProjectile(position, this.velocity, 686, Damage2, 0.0f, Main.myPlayer); + } + if ((double) this.ai[1] > (double) num20 - (double) num19) + this.velocity.Y -= 0.1f; + ++this.ai[1]; + if ((double) this.ai[1] >= (double) num20) + { + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + } + } + else if ((double) this.ai[0] == 5.0) + { + this.velocity = this.velocity.RotatedBy(-(double) num22 * (double) this.direction); + this.position.Y -= num23; + this.position = this.position + this.DirectionTo(targetData.Center) * 10f; + this.rotation -= num22 * (float) this.direction; + num2 *= 0.7f; + if ((double) this.ai[1] == 1.0) + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_BetsyFlyingCircleAttack, this.Center); + if ((double) ++this.ai[1] >= (double) num21) + { + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.velocity = this.velocity / 2f; + } + } + else if ((double) this.ai[0] == 6.0) + { + if ((double) this.ai[1] == 0.0) + { + this.SimpleFlyMovement(this.DirectionTo(targetData.Center + new Vector2(0.0f, -200f)) * num4 * 2f, moveSpeed * 2f); + this.direction = this.spriteDirection = (double) this.Center.X < (double) targetData.Center.X ? 1 : -1; + ++this.ai[2]; + if ((double) this.Distance(targetData.Center) < 350.0 || (double) this.ai[2] >= 180.0) + { + this.ai[1] = 1f; + this.netUpdate = true; + } + } + else + { + if ((double) this.ai[1] == 1.0) + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_BetsyScream); + if ((double) this.ai[1] < (double) num26) + this.velocity = this.velocity * 0.95f; + else + this.velocity = this.velocity * 0.98f; + if ((double) this.ai[1] == (double) num26) + { + if ((double) this.velocity.Y > 0.0) + this.velocity.Y /= 3f; + this.velocity.Y -= 3f; + } + num2 *= 0.85f; + if (((double) this.ai[1] == 20.0 || (double) this.ai[1] == 25.0 ? 1 : ((double) this.ai[1] == 30.0 ? 1 : 0)) != 0) + { + Point tileCoordinates = this.Center.ToTileCoordinates(); + int num34 = 30; + int num35 = 35; + int num36 = 4; + for (int i = tileCoordinates.X - num34; i <= tileCoordinates.X + num34; ++i) + { + bool flag1 = false; + for (int j = tileCoordinates.Y - num35 / 3; j < tileCoordinates.Y + num35; ++j) + { + Tile tileSafely = Framing.GetTileSafely(i, j); + bool flag2 = tileSafely.active() && Main.tileSolid[(int) tileSafely.type] && !Main.tileFrameImportant[(int) tileSafely.type]; + if (flag1 & flag2) + { + int tileDustAmount = WorldGen.KillTile_GetTileDustAmount(true, tileSafely); + for (int index = 0; index < tileDustAmount; ++index) + { + Dust dust = Main.dust[WorldGen.KillTile_MakeTileDust(i, j, tileSafely)]; + dust.velocity.Y -= (float) (3.0 + (double) num36 * 1.5); + dust.velocity.Y *= Main.rand.NextFloat(); + dust.scale += (float) num36 * 0.03f; + } + for (int index = 0; index < tileDustAmount - 1; ++index) + { + Dust dust = Main.dust[WorldGen.KillTile_MakeTileDust(i, j, tileSafely)]; + dust.velocity.Y -= 1f + (float) num36; + dust.velocity.Y *= Main.rand.NextFloat(); + } + if (tileDustAmount > 0 && Main.rand.Next(3) != 0) + { + float num37 = (float) (Math.Abs(tileCoordinates.X - i) / (num34 / 2)); + Gore gore = Gore.NewGoreDirect(this.position, Vector2.Zero, 61 + Main.rand.Next(3), (float) (1.0 - (double) num36 * 0.150000005960464 + (double) num37 * 0.5)); + gore.velocity.Y -= (float) (0.100000001490116 + (double) num36 * 0.5 + (double) num37 * (double) num36 * 1.0); + gore.velocity.Y *= Main.rand.NextFloat(); + gore.position = new Vector2((float) (i * 16 + 20), (float) (j * 16 + 20)); + } + } + flag1 = !flag2; + } + } + } + bool flag = (double) this.ai[1] == 20.0 || (double) this.ai[1] == 45.0 || (double) this.ai[1] == 70.0; + if (NPC.CountNPCS(560) > 4) + flag = false; + if (flag && Main.netMode != 1) + { + for (int index = 0; index < 1; ++index) + { + Vector2 vector2 = this.Center + (6.283185f * Main.rand.NextFloat()).ToRotationVector2() * new Vector2(2f, 1f) * 300f * (float) (0.600000023841858 + (double) Main.rand.NextFloat() * 0.400000005960464); + if ((double) Vector2.Distance(vector2, targetData.Center) > 100.0) + { + Point point = vector2.ToPoint(); + NPC.NewNPC(point.X, point.Y, 560, this.whoAmI); + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_BetsySummon, vector2); + } + } + List npcList = new List(); + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && npc.type == 549) + npcList.Add(npc); + } + if (npcList.Count > 0) + { + for (int index = 0; index < 3; ++index) + { + NPC npc = npcList[Main.rand.Next(npcList.Count)]; + Point point = npc.Center.ToPoint(); + NPC.NewNPC(point.X, point.Y, 560); + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_BetsySummon, npc.Center); + } + } + } + ++this.ai[1]; + } + if ((double) this.ai[1] >= (double) num25) + { + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + } + } + this.localAI[0] += num2; + if ((double) this.localAI[0] >= 36.0) + this.localAI[0] = 0.0f; + if (num1 != -1) + this.localAI[0] = (float) (num1 * 4); + if ((double) ++this.localAI[1] >= 60.0) + this.localAI[1] = 0.0f; + float targetAngle = this.DirectionTo(targetData.Center).ToRotation(); + float maxChange = 0.04f; + switch (this.ai[0]) + { + case 2f: + case 5f: + maxChange = 0.0f; + break; + case 3f: + maxChange = 0.01f; + targetAngle = 0.0f; + if (this.spriteDirection == -1) + targetAngle -= 3.141593f; + if ((double) this.ai[1] >= (double) num10) + { + targetAngle += (float) ((double) this.spriteDirection * 3.14159274101257 / 12.0); + maxChange = 0.05f; + break; + } + break; + case 4f: + maxChange = 0.01f; + targetAngle = 3.141593f; + if (this.spriteDirection == 1) + { + targetAngle += 3.141593f; + break; + } + break; + case 6f: + maxChange = 0.02f; + targetAngle = 0.0f; + if (this.spriteDirection == -1) + { + targetAngle -= 3.141593f; + break; + } + break; + } + if (this.spriteDirection == -1) + targetAngle += 3.141593f; + if ((double) maxChange != 0.0) + this.rotation = this.rotation.AngleTowards(targetAngle, maxChange); + if (SoundEngine.GetActiveSound(SlotId.FromFloat(this.localAI[2])) != null) + return; + float[] localAi1 = this.localAI; + SlotId invalid = (SlotId) SlotId.Invalid; + double num38 = (double) ((SlotId) ref invalid).ToFloat(); + localAi1[2] = (float) num38; + } + + private void AI_026_Unicorns() + { + int num1 = 30; + int num2 = 10; + bool flag1 = false; + bool flag2 = false; + bool flag3 = false; + if ((double) this.velocity.Y == 0.0 && ((double) this.velocity.X > 0.0 && this.direction < 0 || (double) this.velocity.X < 0.0 && this.direction > 0)) + { + flag2 = true; + ++this.ai[3]; + } + if (this.type == 546) + { + num2 = 4; + bool flag4 = (double) this.velocity.Y == 0.0; + for (int index = 0; index < 200; ++index) + { + if (index != this.whoAmI && Main.npc[index].active && Main.npc[index].type == this.type && (double) Math.Abs(this.position.X - Main.npc[index].position.X) + (double) Math.Abs(this.position.Y - Main.npc[index].position.Y) < (double) this.width) + { + if ((double) this.position.X < (double) Main.npc[index].position.X) + this.velocity.X -= 0.05f; + else + this.velocity.X += 0.05f; + if ((double) this.position.Y < (double) Main.npc[index].position.Y) + this.velocity.Y -= 0.05f; + else + this.velocity.Y += 0.05f; + } + } + if (flag4) + this.velocity.Y = 0.0f; + } + if (this.type == 315) + { + Lighting.AddLight(this.Center, 0.4f, 0.36f, 0.2f); + int num3 = this.frame.Height; + if (num3 < 1) + num3 = 1; + switch (this.frame.Y / num3) + { + case 4: + case 5: + case 6: + case 7: + Vector2 vector2_1 = this.Bottom + new Vector2(-30f, -8f); + Vector2 vector2_2 = new Vector2(60f, 8f); + if (Main.rand.Next(3) != 0) + { + Dust dust = Dust.NewDustPerfect(vector2_1 + new Vector2(Main.rand.NextFloat() * vector2_2.X, Main.rand.NextFloat() * vector2_2.Y), 6, new Vector2?(this.velocity)); + dust.scale = 0.6f; + dust.fadeIn = 1.1f; + dust.noGravity = true; + dust.noLight = true; + break; + } + break; + } + } + if ((((double) this.position.X == (double) this.oldPosition.X ? 1 : ((double) this.ai[3] >= (double) num1 ? 1 : 0)) | (flag2 ? 1 : 0)) != 0) + { + ++this.ai[3]; + flag3 = true; + } + else if ((double) this.ai[3] > 0.0) + --this.ai[3]; + if ((double) this.ai[3] > (double) (num1 * num2)) + this.ai[3] = 0.0f; + if (this.justHit) + this.ai[3] = 0.0f; + if ((double) this.ai[3] == (double) num1) + this.netUpdate = true; + Vector2 vector2_3 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + double num4 = (double) Main.player[this.target].position.X + (double) Main.player[this.target].width * 0.5 - (double) vector2_3.X; + float num5 = Main.player[this.target].position.Y - vector2_3.Y; + float num6 = (float) Math.Sqrt(num4 * num4 + (double) num5 * (double) num5); + if ((double) num6 < 200.0 && !flag3) + this.ai[3] = 0.0f; + if (this.type == 410) + { + ++this.ai[1]; + bool flag5 = (double) this.ai[1] >= 240.0; + if (!flag5 && (double) this.velocity.Y == 0.0) + { + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && !Main.player[index].dead && (double) Main.player[index].Distance(this.Center) < 800.0 && (double) Main.player[index].Center.Y < (double) this.Center.Y && (double) Math.Abs(Main.player[index].Center.X - this.Center.X) < 20.0) + { + flag5 = true; + break; + } + } + } + if (flag5 && Main.netMode != 1) + { + for (int index = 0; index < 3; ++index) + Projectile.NewProjectile(this.Center.X, this.Center.Y, (float) (((double) Main.rand.NextFloat() - 0.5) * 2.0), (float) (-4.0 - 10.0 * (double) Main.rand.NextFloat()), 538, 50, 0.0f, Main.myPlayer); + this.HitEffect(9999); + this.active = false; + return; + } + } + else if (this.type == 423) + { + if ((double) this.ai[2] == 1.0) + { + ++this.ai[1]; + this.velocity.X *= 0.7f; + if ((double) this.ai[1] < 30.0) + { + Vector2 Position = this.Center + Vector2.UnitX * (float) this.spriteDirection * -20f; + Dust dust = Main.dust[Dust.NewDust(Position, 0, 0, 242)]; + Vector2 vector2_4 = Vector2.UnitY.RotatedByRandom(6.28318548202515); + dust.position = Position + vector2_4 * 20f; + dust.velocity = -vector2_4 * 2f; + dust.scale = (float) (0.5 + (double) vector2_4.X * (double) -this.spriteDirection); + dust.fadeIn = 1f; + dust.noGravity = true; + } + else if ((double) this.ai[1] == 30.0) + { + for (int index = 0; index < 20; ++index) + { + Vector2 Position = this.Center + Vector2.UnitX * (float) this.spriteDirection * -20f; + Dust dust = Main.dust[Dust.NewDust(Position, 0, 0, 242)]; + Vector2 vector2_5 = Vector2.UnitY.RotatedByRandom(6.28318548202515); + dust.position = Position + vector2_5 * 4f; + dust.velocity = vector2_5 * 4f + Vector2.UnitX * Main.rand.NextFloat() * (float) this.spriteDirection * -5f; + dust.scale = (float) (0.5 + (double) vector2_5.X * (double) -this.spriteDirection); + dust.fadeIn = 1f; + dust.noGravity = true; + } + } + if ((double) this.velocity.X > -0.5 && (double) this.velocity.X < 0.5) + this.velocity.X = 0.0f; + if ((double) this.ai[1] == 30.0 && Main.netMode != 1) + Projectile.NewProjectile(this.Center.X + (float) (this.spriteDirection * -20), this.Center.Y, (float) (this.spriteDirection * -7), 0.0f, 575, this.GetAttackDamage_ForProjectiles(50f, 35f), 0.0f, Main.myPlayer, (float) this.target); + if ((double) this.ai[1] >= 60.0) + { + this.ai[1] = (float) -Main.rand.Next(320, 601); + this.ai[2] = 0.0f; + } + } + else + { + ++this.ai[1]; + if ((double) this.ai[1] >= 180.0 && (double) num6 < 500.0 && (double) this.velocity.Y == 0.0) + { + flag1 = true; + this.ai[1] = 0.0f; + this.ai[2] = 1f; + this.netUpdate = true; + } + else if ((double) this.velocity.Y == 0.0 && (double) num6 < 100.0 && (double) Math.Abs(this.velocity.X) > 3.0 && ((double) this.Center.X < (double) Main.player[this.target].Center.X && (double) this.velocity.X > 0.0 || (double) this.Center.X > (double) Main.player[this.target].Center.X && (double) this.velocity.X < 0.0)) + this.velocity.Y -= 4f; + } + } + else if (this.type == 155 || this.type == 329) + { + if ((double) this.velocity.Y == 0.0 && (double) num6 < 100.0 && (double) Math.Abs(this.velocity.X) > 3.0 && ((double) this.position.X + (double) (this.width / 2) < (double) Main.player[this.target].position.X + (double) (Main.player[this.target].width / 2) && (double) this.velocity.X > 0.0 || (double) this.position.X + (double) (this.width / 2) > (double) Main.player[this.target].position.X + (double) (Main.player[this.target].width / 2) && (double) this.velocity.X < 0.0)) + this.velocity.Y -= 4f; + } + else if (this.type == 546 && (double) this.velocity.Y == 0.0 && (double) Math.Abs(this.velocity.X) > 3.0 && ((double) this.Center.X < (double) Main.player[this.target].Center.X && (double) this.velocity.X > 0.0 || (double) this.Center.X > (double) Main.player[this.target].Center.X && (double) this.velocity.X < 0.0)) + { + this.velocity.Y -= 4f; + SoundEngine.PlaySound(3, this.Center, 11); + } + if (this.type == 546 && !Main.player[this.target].ZoneDesert) + { + int direction = this.direction; + this.TargetClosest(); + if (!Main.player[this.target].ZoneDesert) + { + this.EncourageDespawn(10); + this.ai[3] = (float) num1; + this.direction = direction; + } + } + if ((double) this.ai[3] < (double) num1) + { + if ((this.type == 329 || this.type == 315) && !Main.pumpkinMoon) + this.EncourageDespawn(10); + else + this.TargetClosest(); + } + else + { + if ((double) this.velocity.X == 0.0) + { + if ((double) this.velocity.Y == 0.0) + { + ++this.ai[0]; + if ((double) this.ai[0] >= 2.0) + { + this.direction *= -1; + this.spriteDirection = this.direction; + this.ai[0] = 0.0f; + } + } + } + else + this.ai[0] = 0.0f; + this.directionY = -1; + if (this.direction == 0) + this.direction = 1; + } + float num7 = 6f; + float num8 = 0.07f; + if (!flag1 && ((double) this.velocity.Y == 0.0 || this.wet || (double) this.velocity.X <= 0.0 && this.direction < 0 || (double) this.velocity.X >= 0.0 && this.direction > 0)) + { + if (this.type == 155) + { + if ((double) this.velocity.X > 0.0 && this.direction < 0) + this.velocity.X *= 0.95f; + if ((double) this.velocity.X < 0.0 && this.direction > 0) + this.velocity.X *= 0.95f; + } + else if (this.type == 329) + { + if ((double) this.velocity.X > 0.0 && this.direction < 0) + this.velocity.X *= 0.9f; + if ((double) this.velocity.X < 0.0 && this.direction > 0) + this.velocity.X *= 0.9f; + if (this.direction > 0 && (double) this.velocity.X < 3.0) + this.velocity.X += 0.1f; + if (this.direction < 0 && (double) this.velocity.X > -3.0) + this.velocity.X -= 0.1f; + } + else if (this.type == 315) + { + if ((double) this.velocity.X > 0.0 && this.direction < 0) + this.velocity.X *= 0.95f; + if ((double) this.velocity.X < 0.0 && this.direction > 0) + this.velocity.X *= 0.95f; + if ((double) this.velocity.X < -(double) num7 || (double) this.velocity.X > (double) num7) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < (double) num7 && this.direction == 1) + { + this.velocity.X += 0.07f; + if ((double) this.velocity.X > (double) num7) + this.velocity.X = num7; + } + else if ((double) this.velocity.X > -(double) num7 && this.direction == -1) + { + this.velocity.X -= 0.07f; + if ((double) this.velocity.X < -(double) num7) + this.velocity.X = -num7; + } + } + else if (this.type == 410) + { + if (Math.Sign(this.velocity.X) != this.direction) + this.velocity.X *= 0.9f; + num7 = 6f; + num8 = 0.2f; + } + else if (this.type == 423) + { + if (Math.Sign(this.velocity.X) != this.direction) + this.velocity.X *= 0.85f; + num7 = 10f; + num8 = 0.2f; + } + else if (this.type == 546) + { + if (Math.Sign(this.velocity.X) != this.direction) + this.velocity.X *= 0.92f; + float num9 = MathHelper.Lerp(0.6f, 1f, Math.Abs(Main.windSpeedTarget)) * (float) Math.Sign(Main.windSpeedTarget); + if (!Main.player[this.target].ZoneSandstorm) + num9 = 0.0f; + num7 = (float) (4.0 + (double) num9 * (double) this.direction * 3.0); + num8 = 0.05f; + } + if ((double) this.velocity.X < -(double) num7 || (double) this.velocity.X > (double) num7) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * 0.8f; + } + else if ((double) this.velocity.X < (double) num7 && this.direction == 1) + { + this.velocity.X += num8; + if ((double) this.velocity.X > (double) num7) + this.velocity.X = num7; + } + else if ((double) this.velocity.X > -(double) num7 && this.direction == -1) + { + this.velocity.X -= num8; + if ((double) this.velocity.X < -(double) num7) + this.velocity.X = -num7; + } + } + if ((double) this.velocity.Y >= 0.0) + { + int num10 = 0; + if ((double) this.velocity.X < 0.0) + num10 = -1; + if ((double) this.velocity.X > 0.0) + num10 = 1; + Vector2 position = this.position; + position.X += this.velocity.X; + int index1 = (int) (((double) position.X + (double) (this.width / 2) + (double) ((this.width / 2 + 1) * num10)) / 16.0); + int index2 = (int) (((double) position.Y + (double) this.height - 1.0) / 16.0); + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (Main.tile[index1, index2 - 1] == null) + Main.tile[index1, index2 - 1] = new Tile(); + if (Main.tile[index1, index2 - 2] == null) + Main.tile[index1, index2 - 2] = new Tile(); + if (Main.tile[index1, index2 - 3] == null) + Main.tile[index1, index2 - 3] = new Tile(); + if (Main.tile[index1, index2 + 1] == null) + Main.tile[index1, index2 + 1] = new Tile(); + if ((double) (index1 * 16) < (double) position.X + (double) this.width && (double) (index1 * 16 + 16) > (double) position.X && (Main.tile[index1, index2].nactive() && !Main.tile[index1, index2].topSlope() && !Main.tile[index1, index2 - 1].topSlope() && Main.tileSolid[(int) Main.tile[index1, index2].type] && !Main.tileSolidTop[(int) Main.tile[index1, index2].type] || Main.tile[index1, index2 - 1].halfBrick() && Main.tile[index1, index2 - 1].nactive()) && (!Main.tile[index1, index2 - 1].nactive() || !Main.tileSolid[(int) Main.tile[index1, index2 - 1].type] || Main.tileSolidTop[(int) Main.tile[index1, index2 - 1].type] || Main.tile[index1, index2 - 1].halfBrick() && (!Main.tile[index1, index2 - 4].nactive() || !Main.tileSolid[(int) Main.tile[index1, index2 - 4].type] || Main.tileSolidTop[(int) Main.tile[index1, index2 - 4].type])) && (!Main.tile[index1, index2 - 2].nactive() || !Main.tileSolid[(int) Main.tile[index1, index2 - 2].type] || Main.tileSolidTop[(int) Main.tile[index1, index2 - 2].type]) && (!Main.tile[index1, index2 - 3].nactive() || !Main.tileSolid[(int) Main.tile[index1, index2 - 3].type] || Main.tileSolidTop[(int) Main.tile[index1, index2 - 3].type]) && (!Main.tile[index1 - num10, index2 - 3].nactive() || !Main.tileSolid[(int) Main.tile[index1 - num10, index2 - 3].type])) + { + float num11 = (float) (index2 * 16); + if (Main.tile[index1, index2].halfBrick()) + num11 += 8f; + if (Main.tile[index1, index2 - 1].halfBrick()) + num11 -= 8f; + if ((double) num11 < (double) position.Y + (double) this.height) + { + float num12 = position.Y + (float) this.height - num11; + if ((double) num12 <= 16.1) + { + this.gfxOffY += this.position.Y + (float) this.height - num11; + this.position.Y = num11 - (float) this.height; + this.stepSpeed = (double) num12 >= 9.0 ? 2f : 1f; + } + } + } + } + if ((double) this.velocity.Y == 0.0) + { + bool flag6 = true; + int index3 = (int) ((double) this.position.Y - 7.0) / 16; + int num13 = (int) ((double) this.position.X - 7.0) / 16; + int num14 = (int) ((double) this.position.X + (double) this.width + 7.0) / 16; + for (int index4 = num13; index4 <= num14; ++index4) + { + if (Main.tile[index4, index3] != null && Main.tile[index4, index3].nactive() && Main.tileSolid[(int) Main.tile[index4, index3].type]) + { + flag6 = false; + break; + } + } + if (flag6) + { + int index5 = (int) (((double) this.position.X + (double) (this.width / 2) + (double) ((this.width / 2 + 2) * this.direction) + (double) this.velocity.X * 5.0) / 16.0); + int index6 = (int) (((double) this.position.Y + (double) this.height - 15.0) / 16.0); + if (Main.tile[index5, index6] == null) + Main.tile[index5, index6] = new Tile(); + if (Main.tile[index5, index6 - 1] == null) + Main.tile[index5, index6 - 1] = new Tile(); + if (Main.tile[index5, index6 - 2] == null) + Main.tile[index5, index6 - 2] = new Tile(); + if (Main.tile[index5, index6 - 3] == null) + Main.tile[index5, index6 - 3] = new Tile(); + if (Main.tile[index5, index6 + 1] == null) + Main.tile[index5, index6 + 1] = new Tile(); + if (Main.tile[index5 + this.direction, index6 - 1] == null) + Main.tile[index5 + this.direction, index6 - 1] = new Tile(); + if (Main.tile[index5 + this.direction, index6 + 1] == null) + Main.tile[index5 + this.direction, index6 + 1] = new Tile(); + if (Main.tile[index5 - this.direction, index6 + 1] == null) + Main.tile[index5 - this.direction, index6 + 1] = new Tile(); + if (Main.tile[index5 + this.direction, index6 + 3] == null) + Main.tile[index5 + this.direction, index6 + 3] = new Tile(); + int spriteDirection = this.spriteDirection; + if (this.type == 423 || this.type == 410 || this.type == 546) + spriteDirection *= -1; + if ((double) this.velocity.X < 0.0 && spriteDirection == -1 || (double) this.velocity.X > 0.0 && spriteDirection == 1) + { + bool flag7 = this.type == 410 || this.type == 423; + float num15 = 3f; + if (Main.tile[index5, index6 - 2].nactive() && Main.tileSolid[(int) Main.tile[index5, index6 - 2].type]) + { + if (Main.tile[index5, index6 - 3].nactive() && Main.tileSolid[(int) Main.tile[index5, index6 - 3].type]) + { + this.velocity.Y = -8.5f; + this.netUpdate = true; + } + else + { + this.velocity.Y = -7.5f; + this.netUpdate = true; + } + } + else if (Main.tile[index5, index6 - 1].nactive() && !Main.tile[index5, index6 - 1].topSlope() && Main.tileSolid[(int) Main.tile[index5, index6 - 1].type]) + { + this.velocity.Y = -7f; + this.netUpdate = true; + } + else if ((double) this.position.Y + (double) this.height - (double) (index6 * 16) > 20.0 && Main.tile[index5, index6].nactive() && !Main.tile[index5, index6].topSlope() && Main.tileSolid[(int) Main.tile[index5, index6].type]) + { + this.velocity.Y = -6f; + this.netUpdate = true; + } + else if ((this.directionY < 0 || (double) Math.Abs(this.velocity.X) > (double) num15) && (!flag7 || !Main.tile[index5, index6 + 1].nactive() || !Main.tileSolid[(int) Main.tile[index5, index6 + 1].type]) && (!Main.tile[index5, index6 + 2].nactive() || !Main.tileSolid[(int) Main.tile[index5, index6 + 2].type]) && (!Main.tile[index5 + this.direction, index6 + 3].nactive() || !Main.tileSolid[(int) Main.tile[index5 + this.direction, index6 + 3].type])) + { + this.velocity.Y = -8f; + this.netUpdate = true; + } + } + } + } + if (this.type == 423 && (double) Math.Abs(this.velocity.X) >= (double) num7 * 0.949999988079071) + { + Microsoft.Xna.Framework.Rectangle hitbox = this.Hitbox; + for (int index = 0; index < 2; ++index) + { + if (Main.rand.Next(3) == 0) + { + Dust dust = Main.dust[Dust.NewDust(hitbox.TopLeft(), hitbox.Width, hitbox.Height, 242)]; + dust.velocity = Vector2.Zero; + dust.noGravity = true; + dust.fadeIn = 1f; + dust.scale = 0.5f + Main.rand.NextFloat(); + } + } + } + if (this.type != 546) + return; + this.rotation += this.velocity.X * 0.05f; + this.spriteDirection = -this.direction; + } + + private void AI_107_ImprovedWalkers() + { + bool flag1 = (double) this.velocity.X == 0.0 && (double) this.velocity.Y == 0.0 && !this.justHit; + bool flag2 = false; + bool flag3 = false; + bool flag4 = false; + int num1 = 32; + int num2 = 15; + float num3 = 9f; + bool flag5 = false; + float num4 = 40f; + int num5 = 30; + int num6 = 0; + bool flag6 = false; + bool flag7 = true; + float num7 = 0.9f; + bool flag8 = false; + bool flag9 = false; + bool flag10 = false; + bool flag11 = false; + bool flag12 = false; + bool flag13 = false; + bool flag14 = false; + bool flag15 = true; + int num8 = 70; + int num9 = num8 / 2; + float num10 = 11f; + Vector2 vector2_1 = Vector2.Zero; + int Damage = 1; + int Type = 81; + float num11 = 700f; + float num12 = 0.0f; + float num13 = 0.1f; + Vector2? nullable = new Vector2?(); + float max1 = 0.5f; + int num14 = 1; + float num15 = 1f; + bool flag16 = false; + float num16 = 30f; + float num17 = 0.0f; + bool flag17 = false; + bool flag18 = true; + bool flag19 = false; + int num18 = 30; + bool flag20 = false; + bool flag21 = false; + bool flag22 = false; + bool flag23 = false; + LegacySoundStyle legacySoundStyle = (LegacySoundStyle) null; + int maxValue1 = 0; + bool flag24 = false; + float max2 = 1f; + float num19 = 0.07f; + float num20 = 0.8f; + float num21 = (float) (this.width / 2 + 6); + bool flag25 = this.directionY < 0; + bool flag26 = false; + int num22 = 1; + bool flag27 = false; + float num23 = 5f; + float num24 = 3f; + float num25 = 8f; + float amount1 = 0.05f; + float amount2 = 0.04f; + float amount3 = 0.1f; + bool flag28 = false; + float num26 = 0.025f; + NPCAimedTarget targetData = this.GetTargetData(); + NPCUtils.NPCTargetingMethod npcTargetingMethod = new NPCUtils.NPCTargetingMethod(NPCUtils.TargetClosestCommon); + if (NPCID.Sets.BelongsToInvasionOldOnesArmy[this.type]) + npcTargetingMethod = new NPCUtils.NPCTargetingMethod(NPCUtils.TargetClosestOldOnesInvasion); + if (targetData.Type == NPCTargetType.NPC && Main.npc[this.TranslatedTargetIndex].type == 548 && Main.npc[this.TranslatedTargetIndex].dontTakeDamageFromHostiles) + { + npcTargetingMethod(this, true, new Vector2?()); + targetData = this.GetTargetData(); + } + if (NPCID.Sets.FighterUsesDD2PortalAppearEffect[this.type]) + { + if (!targetData.Invalid) + flag2 = !Collision.CanHit(this.Center, 0, 0, targetData.Center, 0, 0) && (this.direction == Math.Sign(targetData.Center.X - this.Center.X) || this.noGravity && (double) this.Distance(targetData.Center) > 50.0 && (double) this.Center.Y > (double) targetData.Center.Y); + flag2 &= (double) this.ai[0] <= 0.0; + } + if (flag2) + { + if ((double) this.velocity.Y == 0.0 || (double) Math.Abs(targetData.Center.Y - this.Center.Y) > 800.0) + { + this.noGravity = true; + this.noTileCollide = true; + } + } + else + { + this.noGravity = false; + this.noTileCollide = false; + } + bool flag29 = NPCID.Sets.FighterUsesDD2PortalAppearEffect[this.type]; + bool flag30 = true; + Vector2 size; + switch (this.type) + { + case 552: + case 553: + case 554: + legacySoundStyle = SoundID.DD2_GoblinScream; + maxValue1 = 1000; + flag5 = true; + flag21 = DD2Event.EnemiesShouldChasePlayers; + if (this.type == 553) + { + num19 += 0.01f; + max2 += 0.2f; + } + if (this.type == 554) + { + num19 += 0.02f; + max2 += 0.4f; + } + if ((double) this.localAI[3] < 60.0) + { + num19 = (float) (0.00999999977648258 + (double) this.localAI[3] / 60.0 * 0.0500000007450581); + break; + } + break; + case 555: + case 556: + case 557: + maxValue1 = 800; + legacySoundStyle = SoundID.DD2_GoblinBomberScream; + int num27 = (double) this.localAI[3] >= 60.0 ? 1 : 0; + flag21 = DD2Event.EnemiesShouldChasePlayers; + flag24 = true; + flag12 = true; + flag15 = (double) this.ai[1] > 18.0; + num8 = 42; + num9 = 18; + Type = 681; + Damage = 10; + vector2_1.Y -= 14f; + num13 = 0.4f; + max1 = 0.5f; + num11 = 280f; + num10 = 6f; + if (num27 == 0) + { + num11 = 1f; + num19 = (float) (0.00999999977648258 + (double) this.localAI[3] / 60.0 * 0.0500000007450581); + } + if (this.type == 555) + { + max2 = 0.88f; + max1 = 0.6f; + Damage = this.GetAttackDamage_ForProjectiles(20f, 15f); + } + if (this.type == 555) + { + max2 = 0.88f; + max1 = 0.6f; + Damage = this.GetAttackDamage_ForProjectiles(30f, 25f); + } + if (this.type == 557) + { + max2 = 1.12f; + max1 = 0.4f; + Damage = this.GetAttackDamage_ForProjectiles(40f, 35f); + } + if ((double) this.ai[1] == (double) num9) + { + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_GoblinBomberThrow, this.Center); + break; + } + break; + case 561: + case 562: + case 563: + int num28 = (double) this.localAI[3] >= 60.0 ? 1 : 0; + if ((double) this.ai[1] == 82.0) + { + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_JavelinThrowersAttack, this.Center); + maxValue1 = 7; + legacySoundStyle = SoundID.DD2_JavelinThrowersTaunt; + } + flag21 = DD2Event.EnemiesShouldChasePlayers; + flag24 = true; + flag12 = true; + flag15 = (double) this.ai[1] > 82.0; + num8 = 90; + num9 = 82; + Type = 662; + if (this.type == 563) + Type = 685; + vector2_1.Y -= 14f; + num13 = 0.0f; + max1 = 0.5f; + num11 = 600f; + num10 = 13f; + if (num28 == 0) + { + num11 = 1f; + num19 = (float) (0.00999999977648258 + (double) this.localAI[3] / 60.0 * 0.0500000007450581); + } + if (this.type == 561) + { + max2 = 0.88f; + max1 = 0.6f; + Damage = this.GetAttackDamage_ForProjectiles(15f, 10f); + num10 = 11.5f; + num11 -= 100f; + } + if (this.type == 562) + { + max2 = 0.94f; + max1 = 0.5f; + Damage = this.GetAttackDamage_ForProjectiles(30f, 20f); + num10 = 12.2f; + num11 -= 50f; + } + if (this.type == 563) + { + max2 = 1f; + max1 = 0.4f; + Damage = this.GetAttackDamage_ForProjectiles(45f, 30f); + break; + } + break; + case 566: + case 567: + DelegateMethods.v3_1 = new Vector3(0.3f, 0.05f, 0.45f) * 1.5f; + Utils.PlotTileLine(this.Top, this.Bottom, (float) this.width, new Utils.TileActionAttempt(DelegateMethods.CastLightOpen)); + flag21 = DD2Event.EnemiesShouldChasePlayers; + int num29 = (double) this.localAI[3] >= 120.0 ? 1 : 0; + if (num29 == 0) + num19 = 0.0f; + if (num29 != 0) + { + this.dontTakeDamage = false; + break; + } + this.dontTakeDamage = true; + this.velocity.X = 0.0f; + flag24 = true; + flag20 = true; + this.ai[3] = 0.0f; + if ((double) this.localAI[3] == 0.0) + this.alpha = (int) byte.MaxValue; + ++this.localAI[3]; + float num30 = this.localAI[3]; + if ((double) num30 >= 110.0) + { + this.alpha -= 26; + if (this.alpha < 0) + this.alpha = 0; + } + if ((double) num30 >= 100.0) + { + int num31 = (int) this.localAI[3] / 20; + size = this.Size; + float num32 = size.Length() / 2f / 20f; + int maxValue2 = 5; + for (int index = 0; index < num31 * 2; ++index) + { + if (Main.rand.Next(maxValue2) == 0) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 236, this.velocity.X * 1f); + dust.scale = 1f; + dust.fadeIn = 0.3f; + dust.velocity = new Vector2(Main.rand.NextFloatDirection() * 1f, -dust.velocity.Length()) * 1.25f * num32; + } + } + } + else + { + int num33 = (int) this.localAI[3] / 10; + size = this.Size; + float num34 = size.Length() / 2f / 20f; + int maxValue3 = 5; + for (int index = 0; (double) index < (double) num33 * 1.29999995231628; ++index) + { + if (Main.rand.Next(maxValue3) == 0) + { + Dust dust = Dust.NewDustDirect(this.position + new Vector2((float) (-this.width / 2), 8f), this.width + this.width, this.height, 27, this.velocity.X * 1f, Alpha: 100); + dust.scale = 1.1f; + dust.fadeIn = 0.1f; + dust.velocity = new Vector2(Main.rand.NextFloatDirection() * 0.1f, -dust.velocity.Length()) * 1.05f * num34 * Main.rand.NextFloat(); + dust.velocity.Y *= Utils.GetLerpValue((float) this.width * 0.75f, 0.0f, Math.Abs(dust.position.X - this.Center.X), true); + } + } + } + if ((double) num30 > 100.0 && (int) num30 % 4 == 0) + { + Gore.NewGoreDirect(this.Left, new Vector2(0.0f, -3f), Utils.SelectRandom(Main.rand, 971, 972), 0.85f).velocity.X *= 0.8f; + break; + } + break; + case 568: + case 569: + num5 = 110; + num19 = 0.16f; + num20 = 0.7f; + max2 = 1.4f; + flag5 = true; + num4 = 600f; + flag21 = DD2Event.EnemiesShouldChasePlayers; + if ((double) this.localAI[3] < 60.0) + num19 = (float) (0.00999999977648258 + (double) this.localAI[3] / 60.0 * 0.0500000007450581); + SlotId slotId1; + if ((double) this.ai[0] == 0.0) + { + float[] localAi = this.localAI; + slotId1 = (SlotId) SlotId.Invalid; + double num35 = (double) ((SlotId) ref slotId1).ToFloat(); + localAi[1] = (float) num35; + } + if ((double) this.ai[0] == 1.0) + { + this.HitSound = SoundID.DD2_WitherBeastCrystalImpact; + ++this.ai[0]; + if (Main.rand.Next(10) == 0) + { + Dust dust = Dust.NewDustDirect(this.TopLeft, this.width, this.height, 271, SpeedY: -3f, newColor: Color.Transparent, Scale: 0.6f); + dust.velocity.X /= 2f; + dust.noGravity = true; + dust.fadeIn = 1.5f; + dust.position.Y += 4f; + } + ActiveSound activeSound = SoundEngine.GetActiveSound(SlotId.FromFloat(this.localAI[1])); + if (activeSound == null) + { + float[] localAi = this.localAI; + slotId1 = SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_WitherBeastAuraPulse, this.Center); + double num36 = (double) ((SlotId) ref slotId1).ToFloat(); + localAi[1] = (float) num36; + } + else + activeSound.Position = this.Center; + ++this.localAI[0]; + if ((double) this.localAI[0] > 60.0 && Main.rand.Next(10) == 0) + { + Vector2 vector2_2 = this.Center + (Main.rand.NextFloat() * 6.283185f).ToRotationVector2() * 400f * (float) (0.300000011920929 + 0.699999988079071 * (double) Main.rand.NextFloat()); + Point tileCoordinates = vector2_2.ToTileCoordinates(); + if (!WorldGen.SolidTile(tileCoordinates.X, tileCoordinates.Y)) + { + Dust dust = Dust.NewDustPerfect(vector2_2, 27, new Vector2?(new Vector2(0.0f, -3f)), newColor: new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue), Scale: 1.5f); + dust.velocity = this.DirectionTo(dust.position) * dust.velocity.Length(); + dust.fadeIn = 1.5f; + } + } + if (Main.netMode != 2) + { + Player player = Main.player[Main.myPlayer]; + if (!player.dead && player.active && (double) (player.Center - this.Center).Length() < 400.0 && !player.creativeGodMode) + player.AddBuff(195, 3, false); + } + if ((double) this.ai[1] > 0.0) + --this.ai[1]; + if ((double) this.ai[1] <= 0.0) + { + this.ai[1] = 60f; + if (Main.netMode != 1) + { + int healAmount = this.lifeMax / 20; + if (healAmount > this.lifeMax - this.life) + healAmount = this.lifeMax - this.life; + if (healAmount > 0) + { + this.life += healAmount; + this.HealEffect(healAmount); + this.netUpdate = true; + break; + } + break; + } + break; + } + break; + } + break; + case 570: + case 571: + flag21 = DD2Event.EnemiesShouldChasePlayers; + flag24 = true; + flag12 = true; + flag15 = (double) this.ai[1] > 40.0; + num8 = 60; + num9 = 40; + if (this.type == 571 && (double) this.ai[1] > 10.0 && (double) this.ai[1] <= 40.0 && (int) this.ai[1] % 6 == 0) + num9 = (int) this.ai[1] - 1; + if (this.type == 570 && (double) this.ai[1] > 10.0 && (double) this.ai[1] <= 40.0 && (int) this.ai[1] % 9 == 0) + num9 = (int) this.ai[1] - 1; + Type = 671; + vector2_1.X += (float) (22 * this.direction); + num13 = 0.15f; + max1 = 1.5f; + num11 = 600f; + num10 = 13f; + num14 = 1; + num15 = 0.0f; + if (this.type == 570) + max1 = 2.5f; + Damage = this.GetAttackDamage_ForProjectiles(35f, 25f); + if (this.type == 571) + Damage = this.GetAttackDamage_ForProjectiles(60f, 45f); + max2 = 0.77f; + if ((double) this.ai[0] > 0.0) + { + if ((double) this.ai[1] == 40.0) + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_DrakinShot, this.Center); + else if ((double) this.ai[1] == 60.0) + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_DrakinBreathIn, this.Center); + } + if ((double) this.localAI[3] < 60.0) + { + num11 = 1f; + num19 = (float) (0.00999999977648258 + (double) this.localAI[3] / 60.0 * 0.0500000007450581); + break; + } + break; + case 572: + case 573: + SlotId slotId2; + if ((double) this.localAI[3] == 0.0) + { + float[] localAi1 = this.localAI; + SlotId invalid = (SlotId) SlotId.Invalid; + double num37 = (double) ((SlotId) ref invalid).ToFloat(); + localAi1[0] = (float) num37; + float[] localAi2 = this.localAI; + slotId2 = (SlotId) SlotId.Invalid; + double num38 = (double) ((SlotId) ref slotId2).ToFloat(); + localAi2[1] = (float) num38; + } + flag21 = DD2Event.EnemiesShouldChasePlayers; + if ((double) this.ai[1] == 2.0) + { + SoundEngine.GetActiveSound(SlotId.FromFloat(this.localAI[0]))?.Stop(); + SoundEngine.GetActiveSound(SlotId.FromFloat(this.localAI[1]))?.Stop(); + this.position = this.Center; + this.width = this.height = 192; + this.Center = this.position; + this.velocity = Vector2.Zero; + this.damage = this.GetAttackDamage_ScaledByStrength(80f); + this.alpha = (int) byte.MaxValue; + for (int index1 = 0; index1 < 4; ++index1) + { + int index2 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index2].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + } + for (int index3 = 0; index3 < 20; ++index3) + { + int index4 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 200, Scale: 3.7f); + Main.dust[index4].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.dust[index4].noGravity = true; + Main.dust[index4].velocity *= 3f; + int index5 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.5f); + Main.dust[index5].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 4f; + Main.dust[index5].velocity *= 2f; + Main.dust[index5].noGravity = true; + Main.dust[index5].fadeIn = 2.5f; + } + for (int index6 = 0; index6 < 6; ++index6) + { + int index7 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Scale: 2.7f); + Main.dust[index7].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index7].noGravity = true; + Main.dust[index7].velocity *= 3f; + } + for (int index8 = 0; index8 < 12; ++index8) + { + int index9 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Scale: 1.5f); + Main.dust[index9].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index9].noGravity = true; + Main.dust[index9].velocity *= 3f; + } + for (int index10 = 0; index10 < 5; ++index10) + { + int index11 = Gore.NewGore(this.position + new Vector2((float) (this.width * Main.rand.Next(100)) / 100f, (float) (this.height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index11].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.gore[index11].velocity *= 0.3f; + Main.gore[index11].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index11].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + ++this.ai[0]; + if ((double) this.ai[0] < 3.0) + return; + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_KoboldExplosion, this.Center); + this.life = 0; + this.HitEffect(); + this.active = false; + return; + } + if ((double) this.ai[0] > 0.0 && (double) this.ai[1] == 0.0 && this.life > 0) + { + SlotId slotId3 = SlotId.FromFloat(this.localAI[0]); + if (!((SlotId) ref slotId3).IsValid) + { + float[] localAi = this.localAI; + slotId2 = SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_KoboldIgnite, this.Center); + double num39 = (double) ((SlotId) ref slotId2).ToFloat(); + localAi[0] = (float) num39; + } + ++this.localAI[2]; + if ((double) this.localAI[2] == 30.0) + { + float[] localAi3 = this.localAI; + slotId2 = SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_KoboldIgniteLoop, this.Center); + double num40 = (double) ((SlotId) ref slotId2).ToFloat(); + localAi3[0] = (float) num40; + float[] localAi4 = this.localAI; + slotId2 = SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_KoboldScreamChargeLoop, this.Center); + double num41 = (double) ((SlotId) ref slotId2).ToFloat(); + localAi4[1] = (float) num41; + } + } + if ((double) this.ai[0] > 0.0 && (double) this.ai[1] == 1.0) + { + this.ai[0] = 0.0f; + this.ai[1] = 2f; + this.netUpdate = true; + return; + } + max2 = 0.88f; + if ((double) this.ai[0] == 1.0) + this.ai[1] = 1f; + if ((double) this.ai[0] == 0.0 && (double) this.ai[1] == 1.0) + { + ActiveSound activeSound1 = SoundEngine.GetActiveSound(SlotId.FromFloat(this.localAI[0])); + if (activeSound1 == null) + { + float[] localAi = this.localAI; + slotId2 = SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_KoboldIgniteLoop, this.Center); + double num42 = (double) ((SlotId) ref slotId2).ToFloat(); + localAi[0] = (float) num42; + } + else + activeSound1.Position = this.Center; + ActiveSound activeSound2 = SoundEngine.GetActiveSound(SlotId.FromFloat(this.localAI[1])); + if (activeSound2 == null) + { + float[] localAi = this.localAI; + slotId2 = SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_KoboldScreamChargeLoop, this.Center); + double num43 = (double) ((SlotId) ref slotId2).ToFloat(); + localAi[1] = (float) num43; + } + else + activeSound2.Position = this.Center; + } + if ((double) this.ai[1] > 0.0 && (double) this.ai[0] == 0.0) + { + flag5 = true; + num5 = 40; + num4 = 64f; + num19 = 0.3f; + max2 = 4f; + Vector2 Position = this.Center + new Vector2((float) (this.spriteDirection * 12), 0.0f); + if (Main.rand.Next(6) == 0) + { + Dust dust = Dust.NewDustDirect(Position, 1, 1, 213, (float) Main.rand.Next(-2, 3), (float) Main.rand.Next(-2, 3), 100, new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0)); + dust.noGravity = true; + dust.fadeIn = (float) ((double) dust.scale + 1.0 + 0.00999999977648258 * (double) Main.rand.Next(0, 51)); + dust.velocity *= 0.3f; + dust.velocity.X += (float) -this.spriteDirection * 1.2f; + dust.velocity.Y += -3.5f; + dust.velocity.X += this.velocity.X; + } + if (Main.rand.Next(12) == 0) + { + Dust dust = Dust.NewDustPerfect(Position, 6, new Vector2?(this.velocity), 100); + dust.noGravity = true; + dust.velocity.Y -= 1f + Main.rand.NextFloat(); + dust.scale = 1.1f; + dust.fadeIn = 0.5f; + dust.customData = (object) this; + } + } + else + { + flag5 = true; + num5 = 40; + num4 = 700f; + } + if ((double) this.localAI[3] < 60.0) + { + num19 = (float) (0.00999999977648258 + (double) this.localAI[3] / 60.0 * 0.0500000007450581); + break; + } + break; + case 576: + case 577: + maxValue1 = 700; + legacySoundStyle = SoundID.DD2_OgreRoar; + num21 -= 32f; + flag5 = true; + num6 = 60; + num4 = 130f; + num5 = 44; + flag21 = DD2Event.EnemiesShouldChasePlayers; + num7 = 0.7f; + if ((double) this.localAI[0] > 0.0) + --this.localAI[0]; + if ((double) this.ai[0] <= 0.0) + { + float num44 = this.ai[1]; + float num45 = this.Distance(targetData.Center); + if ((double) this.localAI[3] >= 60.0) + { + if ((double) num45 <= (double) num4 + 300.0 && (double) this.localAI[0] <= 0.0) + this.ai[1] = 2f; + else if ((double) num45 > (double) num4 + 30.0) + this.ai[1] = 1f; + else if ((double) num45 <= (double) num4) + { + this.ai[1] = 0.0f; + if ((double) num44 == 1.0) + this.ai[0] = 0.0f; + } + } + if ((double) num44 != (double) this.ai[1]) + this.netUpdate = true; + } + else if ((double) this.ai[1] == 2.0) + this.localAI[0] = 300f; + switch ((int) this.ai[1]) + { + case 0: + num5 = 44; + if ((double) this.ai[0] == 40.0) + { + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_OgreAttack, this.Center); + break; + } + break; + case 1: + flag3 = true; + num5 = 90; + num4 = 1000f; + num6 = 240; + Damage = this.GetAttackDamage_ForProjectiles(40f, 30f); + flag15 = false; + vector2_1 = new Vector2((float) (this.direction * 30), -70f); + Type = 676; + if ((double) this.ai[0] == 80.0) + { + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_OgreSpit, this.Center); + break; + } + break; + case 2: + num5 = 90; + num4 = 250f; + flag4 = true; + Damage = this.GetAttackDamage_ForProjectiles(60f, 40f); + num9 = 36; + num1 = 56; + num2 = 41; + num3 = 13f; + flag3 = true; + Type = 683; + flag15 = false; + vector2_1 = new Vector2((float) (-this.direction * 20), (float) (this.height / 2 - 1)); + if ((double) this.ai[0] == 40.0) + { + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_OgreGroundPound, this.Center); + break; + } + break; + } + if ((double) this.ai[0] < (double) -num6) + { + this.ai[0] = (float) -num6; + break; + } + break; + case 620: + flag27 = this.wet; + flag30 = false; + flag16 = true; + num17 = 150f; + num16 = 20f; + bool dayTime = Main.dayTime; + flag21 = !dayTime; + flag24 = true; + flag12 = true; + flag15 = (double) this.ai[1] > 40.0; + num8 = 60; + num9 = 40; + if ((double) this.ai[1] > 10.0 && (double) this.ai[1] <= 40.0 && (int) this.ai[1] % 5 == 0) + num9 = (int) this.ai[1] - 1; + Type = 811; + vector2_1.X -= (float) (4 * this.direction); + vector2_1.Y -= 20f; + num13 = 0.15f; + max1 = 2.5f; + num11 = 600f; + num10 = 13f; + num14 = 1; + num15 = 0.0f; + Damage = this.GetAttackDamage_ForProjectiles(40f, 30f); + max2 = 8f; + num19 *= 3f; + num20 = 0.9f; + if ((double) this.ai[0] > 0.0) + { + if ((double) this.ai[1] == 40.0) + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_DrakinShot, this.Center); + else if ((double) this.ai[1] == 60.0) + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_DrakinBreathIn, this.Center); + } + this.position = this.position + this.netOffset; + if (this.alpha == (int) byte.MaxValue) + { + this.spriteDirection = this.direction; + this.velocity.Y = -6f; + this.netUpdate = true; + for (int index = 0; index < 35; ++index) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 5); + dust.velocity *= 1f; + dust.scale = (float) (1.0 + (double) Main.rand.NextFloat() * 0.5); + dust.fadeIn = (float) (1.5 + (double) Main.rand.NextFloat() * 0.5); + dust.velocity += this.velocity * 0.5f; + } + } + this.alpha -= 15; + if (this.alpha < 0) + this.alpha = 0; + if (this.alpha != 0) + { + for (int index = 0; index < 2; ++index) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 5); + dust.velocity *= 1f; + dust.scale = (float) (1.0 + (double) Main.rand.NextFloat() * 0.5); + dust.fadeIn = (float) (1.5 + (double) Main.rand.NextFloat() * 0.5); + dust.velocity += this.velocity * 0.3f; + } + } + if (Main.rand.Next(3) == 0) + Dust.NewDustDirect(this.position, this.width, this.height, 5, Alpha: 50, Scale: 1.3f).velocity = Vector2.Zero; + this.position = this.position - this.netOffset; + if (dayTime) + { + flag12 = false; + flag24 = false; + flag23 = true; + break; + } + if ((double) this.velocity.Y == 0.0 && (double) targetData.Hitbox.Bottom < (double) this.Top.Y && (double) Math.Abs(this.Center.X - (float) targetData.Hitbox.Center.X) < (double) (this.width * 3) && Collision.CanHit(this.Hitbox.TopLeft(), this.Hitbox.Width, this.Hitbox.Height, targetData.Hitbox.TopLeft(), targetData.Hitbox.Width, targetData.Hitbox.Height)) + { + int num46 = (int) (((double) this.Bottom.Y - 16.0 - (double) targetData.Hitbox.Bottom) / 16.0); + if (num46 < 27) + { + if (num46 < 11) + { + this.velocity.Y = -11f; + break; + } + if (num46 < 15) + { + this.velocity.Y = -13f; + break; + } + if (num46 < 19) + { + this.velocity.Y = -14f; + break; + } + this.velocity.Y = -15.9f; + break; + } + break; + } + break; + } + if (flag28) + { + bool flag31 = (double) this.velocity.Y == 0.0; + for (int index = 0; index < 200; ++index) + { + if (index != this.whoAmI && Main.npc[index].active && Main.npc[index].type == this.type && (double) Math.Abs(this.position.X - Main.npc[index].position.X) + (double) Math.Abs(this.position.Y - Main.npc[index].position.Y) < (double) this.width) + { + if ((double) this.position.X < (double) Main.npc[index].position.X) + this.velocity.X -= num26; + else + this.velocity.X += num26; + if ((double) this.position.Y < (double) Main.npc[index].position.Y) + this.velocity.Y -= num26; + else + this.velocity.Y += num26; + } + } + if (flag31) + this.velocity.Y = 0.0f; + } + if (flag29) + { + if ((double) this.localAI[3] == 0.0) + this.alpha = (int) byte.MaxValue; + if ((double) this.localAI[3] == 30.0) + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_EtherianPortalSpawnEnemy, this.Center); + if ((double) this.localAI[3] < 60.0) + { + ++this.localAI[3]; + this.alpha -= 5; + if (this.alpha < 0) + this.alpha = 0; + int num47 = (int) this.localAI[3] / 10; + size = this.Size; + float num48 = size.Length() / 2f / 20f; + int maxValue4 = 5; + if (this.type == 576 || this.type == 577) + maxValue4 = 1; + for (int index = 0; index < num47; ++index) + { + if (Main.rand.Next(maxValue4) == 0) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 27, this.velocity.X * 1f, Alpha: 100); + dust.scale = 0.55f; + dust.fadeIn = 0.7f; + dust.velocity *= 0.1f * num48; + dust.velocity += this.velocity; + } + } + } + } + if (flag27) + { + this.noGravity = true; + this.TargetClosest(false); + if (this.collideX) + this.velocity.X = -this.oldVelocity.X; + if ((double) this.velocity.X != 0.0) + this.direction = Math.Sign(this.direction); + if (Collision.CanHit(this.position, this.width, this.height, targetData.Position, targetData.Width, targetData.Height)) + { + Vector2 vector2_3 = targetData.Center - this.Center; + vector2_3.Normalize(); + this.velocity = Vector2.Lerp(this.velocity, vector2_3 * num23, amount1); + } + else + { + float num49 = num23; + if ((double) this.velocity.Y > 0.0) + num49 = num24; + if ((double) this.velocity.Y < 0.0) + num49 = num25; + Vector2 vector2_4 = new Vector2((float) this.direction, -1f); + vector2_4.Normalize(); + Vector2 vector2_5 = vector2_4 * num49; + if ((double) num49 < (double) num23) + this.velocity = Vector2.Lerp(this.velocity, vector2_5, amount2); + else + this.velocity = Vector2.Lerp(this.velocity, vector2_5, amount3); + } + } + else + { + bool flag32 = false; + if (flag12 | flag5 && (double) this.ai[0] > 0.0) + flag18 = false; + if (flag12 && (double) this.ai[1] > 0.0) + flag22 = true; + if (flag5 && (double) this.ai[0] > 0.0) + flag22 = true; + if (flag5) + { + if ((double) this.ai[0] < 0.0) + { + ++this.ai[0]; + flag1 = false; + } + if ((double) this.ai[0] == 0.0 && (double) this.velocity.Y == 0.0 | flag6 && targetData.Type != NPCTargetType.None && (Collision.CanHit(this.position, this.width, this.height, targetData.Position, targetData.Width, targetData.Height) ? 1 : (Collision.CanHitLine(this.position, this.width, this.height, targetData.Position, targetData.Width, targetData.Height) ? 1 : 0)) != 0 && (double) (targetData.Center - this.Center).Length() < (double) num4) + { + this.ai[0] = (float) num5; + this.netUpdate = true; + } + if ((double) this.ai[0] > 0.0) + { + this.spriteDirection = this.direction * num22; + if (flag7) + { + this.velocity.X *= num7; + flag24 = true; + flag20 = true; + this.ai[3] = 0.0f; + this.netUpdate = true; + } + --this.ai[0]; + if ((double) this.ai[0] == 0.0) + { + this.ai[0] = (float) -num6; + this.netUpdate = true; + } + } + } + if (flag3 && (double) this.ai[0] > 0.0) + { + if (flag15) + { + npcTargetingMethod(this, true, new Vector2?()); + targetData = this.GetTargetData(); + } + if ((double) this.ai[0] == (double) num9) + { + Vector2 vector2_6 = this.Center + vector2_1; + Vector2 v = targetData.Center - vector2_6; + v.Y -= Math.Abs(v.X) * num13; + Vector2 vector2_7 = v.SafeNormalize(-Vector2.UnitY) * num10; + for (int index = 0; index < num14; ++index) + { + Vector2 vector2_8 = vector2_7; + Vector2 vector2_9 = vector2_6; + Vector2 velocity = !nullable.HasValue ? vector2_8 + Utils.RandomVector2(Main.rand, -max1, max1) : vector2_8 + nullable.Value; + Vector2 position = vector2_9 + vector2_7 * num15; + if (Main.netMode != 1) + Projectile.NewProjectile(position, velocity, Type, Damage, 0.0f, Main.myPlayer); + } + } + } + if (flag4 && (double) this.ai[0] > 0.0) + { + if ((double) this.velocity.Y != 0.0 && (double) this.ai[0] < (double) num2) + this.ai[0] = (float) num2; + if ((double) this.ai[0] == (double) num1) + this.velocity.Y = -num3; + } + if (!flag17 & flag18) + { + if ((double) this.velocity.Y == 0.0 && (double) this.velocity.X * (double) this.direction < 0.0) + flag19 = true; + if ((((double) this.position.X == (double) this.oldPosition.X ? 1 : ((double) this.ai[3] >= (double) num18 ? 1 : 0)) | (flag19 ? 1 : 0)) != 0) + ++this.ai[3]; + else if ((double) Math.Abs(this.velocity.X) > 0.899999976158142 && (double) this.ai[3] > 0.0) + --this.ai[3]; + if ((double) this.ai[3] > (double) (num18 * 10)) + this.ai[3] = 0.0f; + if (this.justHit && !flag30) + this.ai[3] = 0.0f; + if (targetData.Hitbox.Intersects(this.Hitbox)) + this.ai[3] = 0.0f; + if ((double) this.ai[3] == (double) num18) + { + this.netUpdate = true; + if (flag30) + { + this.noGravity = true; + this.noTileCollide = true; + this.position.X += (float) (this.direction * this.width * 2); + int num50 = 20; + size = this.Size; + float num51 = size.Length() / 2f / 20f; + int maxValue5 = 5; + if (this.type == 576 || this.type == 577) + maxValue5 = 1; + for (int index = 0; index < num50; ++index) + { + if (Main.rand.Next(maxValue5) == 0) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 27, this.velocity.X * 1f, Alpha: 100); + dust.scale = 0.55f; + dust.fadeIn = 0.7f; + dust.velocity *= 3f * num51; + dust.noGravity = true; + dust.fadeIn = 1.5f; + dust.velocity *= 3f; + } + } + return; + } + } + } + if (!flag20) + { + if ((double) this.ai[3] < (double) num18 & flag21) + { + if (maxValue1 > 0 && Main.rand.Next(maxValue1) == 0) + SoundEngine.PlayTrackedSound((SoundStyle) legacySoundStyle, this.Center); + int num52 = this.HasValidTarget ? 1 : 0; + npcTargetingMethod(this, true, new Vector2?()); + targetData = this.GetTargetData(); + int num53 = this.HasValidTarget ? 1 : 0; + if (num52 != num53) + this.netUpdate = true; + } + else if (!flag22) + { + if (flag23) + this.EncourageDespawn(10); + if ((double) this.velocity.X == 0.0) + { + if ((double) this.velocity.Y == 0.0) + { + ++this.ai[2]; + if ((double) this.ai[2] >= 2.0) + { + this.direction *= -1; + this.spriteDirection = this.direction * num22; + this.ai[2] = 0.0f; + this.netUpdate = true; + } + } + } + else if ((double) this.ai[2] != 0.0) + { + this.ai[2] = 0.0f; + this.netUpdate = true; + } + if (this.direction == 0) + this.direction = 1; + } + } + if (!flag24) + { + if ((double) this.velocity.X < -(double) max2 || (double) this.velocity.X > (double) max2) + { + if ((double) this.velocity.Y == 0.0) + this.velocity = this.velocity * num20; + } + else if ((double) this.velocity.X < (double) max2 && this.direction == 1 || (double) this.velocity.X > -(double) max2 && this.direction == -1) + this.velocity.X = MathHelper.Clamp(this.velocity.X + num19 * (float) this.direction, -max2, max2); + } + if (flag12) + { + if (this.confused) + { + this.ai[0] = 0.0f; + } + else + { + if ((double) this.ai[1] > 0.0) + --this.ai[1]; + if (this.justHit) + { + this.ai[1] = num16; + this.ai[0] = 0.0f; + } + if ((double) this.ai[0] > 0.0) + { + if (flag15) + { + npcTargetingMethod(this, true, new Vector2?()); + targetData = this.GetTargetData(); + } + if ((double) this.ai[1] == (double) num9) + { + Vector2 vector2_10 = this.Center + vector2_1; + Vector2 v = targetData.Center - vector2_10; + v.Y -= Math.Abs(v.X) * num13; + Vector2 vector2_11 = v.SafeNormalize(-Vector2.UnitY) * num10; + for (int index = 0; index < num14; ++index) + { + Vector2 vector2_12 = vector2_10; + Vector2 vector2_13 = vector2_11; + Vector2 velocity = !nullable.HasValue ? vector2_13 + Utils.RandomVector2(Main.rand, -max1, max1) : vector2_13 + nullable.Value; + Vector2 position = vector2_12 + velocity * num15; + if (Main.netMode != 1) + Projectile.NewProjectile(position, velocity, Type, Damage, 0.0f, Main.myPlayer); + } + this.ai[0] = (double) Math.Abs(vector2_11.Y) <= (double) Math.Abs(vector2_11.X) * 2.0 ? ((double) Math.Abs(vector2_11.X) <= (double) Math.Abs(vector2_11.Y) * 2.0 ? ((double) vector2_11.Y > 0.0 ? 2f : 4f) : 3f) : ((double) vector2_11.Y > 0.0 ? 1f : 5f); + if (flag16) + this.direction = (double) vector2_11.X > 0.0 ? 1 : -1; + } + bool flag33 = true; + if ((double) this.velocity.Y != 0.0 && !flag14 || (double) this.ai[1] <= 0.0) + { + bool flag34 = false; + if ((double) num17 != 0.0 && (double) this.ai[1] <= 0.0) + flag34 = true; + this.ai[0] = 0.0f; + this.ai[1] = flag34 ? num17 : 0.0f; + } + else if (!flag13 || !flag33 && (!flag14 || (double) this.velocity.Y == 0.0)) + { + this.velocity.X *= 0.9f; + this.spriteDirection = this.direction * num22; + } + } + if ((double) this.ai[0] <= 0.0 | flag13 && (double) this.velocity.Y == 0.0 | flag14 && (double) this.ai[1] <= 0.0 && targetData.Type != NPCTargetType.None && Collision.CanHit(this.position, this.width, this.height, targetData.Position, targetData.Width, targetData.Height)) + { + Vector2 vector2_14 = targetData.Center - this.Center; + if ((double) vector2_14.Length() < (double) num11) + { + this.netUpdate = true; + this.velocity.X *= 0.5f; + this.ai[0] = 3f; + this.ai[1] = (float) num8; + this.ai[0] = (double) Math.Abs(vector2_14.Y) <= (double) Math.Abs(vector2_14.X) * 2.0 ? ((double) Math.Abs(vector2_14.X) <= (double) Math.Abs(vector2_14.Y) * 2.0 ? ((double) vector2_14.Y > 0.0 ? 2f : 4f) : 3f) : ((double) vector2_14.Y > 0.0 ? 1f : 5f); + if (flag16) + this.direction = (double) vector2_14.X > 0.0 ? 1 : -1; + } + } + if ((double) this.ai[0] <= 0.0 || flag13) + { + bool flag35 = (double) this.Distance(targetData.Center) < (double) num12; + if (flag35 && Collision.CanHitLine(this.position, this.width, this.height, targetData.Position, targetData.Width, targetData.Height)) + this.ai[3] = 0.0f; + if ((((double) this.velocity.X < -(double) max2 ? 1 : ((double) this.velocity.X > (double) max2 ? 1 : 0)) | (flag35 ? 1 : 0)) != 0) + { + if ((double) this.velocity.Y == 0.0) + this.velocity.X *= num20; + } + else if ((double) this.velocity.X < (double) max2 && this.direction == 1 || (double) this.velocity.X > -(double) max2 && this.direction == -1) + this.velocity.X = MathHelper.Clamp(this.velocity.X + num19 * (float) this.direction, -max2, max2); + } + } + } + if ((double) this.velocity.Y == 0.0) + { + int index12 = (int) ((double) this.Bottom.Y + 7.0) / 16; + int num54 = (int) this.Left.X / 16; + int num55 = (int) this.Right.X / 16; + int index13; + for (int index14 = num54; index14 <= num55; index14 = index13 + 1) + { + index13 = Utils.Clamp(index14, 0, Main.maxTilesX); + index12 = Utils.Clamp(index12, 0, Main.maxTilesY); + Tile tile = Main.tile[index13, index12]; + if (tile == null) + return; + if (tile.nactive() && Main.tileSolid[(int) tile.type]) + { + flag32 = true; + break; + } + } + } + Point tileCoordinates = this.Center.ToTileCoordinates(); + if (WorldGen.InWorld(tileCoordinates.X, tileCoordinates.Y, 5) && !this.noGravity) + { + Vector2 cPosition; + int cWidth; + int cHeight; + this.GetTileCollisionParameters(out cPosition, out cWidth, out cHeight); + Vector2 vector2_15 = this.position - cPosition; + Collision.StepUp(ref cPosition, ref this.velocity, cWidth, cHeight, ref this.stepSpeed, ref this.gfxOffY); + this.position = cPosition + vector2_15; + } + if (flag32) + { + int index = (int) ((double) this.Center.X + (double) num21 * (double) this.direction) / 16; + int j = ((int) this.Bottom.Y - 15) / 16; + bool flag36 = (double) this.position.Y + (double) this.height - (double) (j * 16) > 20.0; + Tile tileSafely1 = Framing.GetTileSafely(index + this.direction, j + 1); + Tile tileSafely2 = Framing.GetTileSafely(index, j + 1); + Tile tileSafely3 = Framing.GetTileSafely(index, j); + Tile tileSafely4 = Framing.GetTileSafely(index, j - 1); + Tile tileSafely5 = Framing.GetTileSafely(index, j - 2); + Tile tileSafely6 = Framing.GetTileSafely(index, j - 3); + if (flag8 && tileSafely4.nactive() && (tileSafely4.type == (ushort) 10 || tileSafely4.type == (ushort) 388)) + { + ++this.ai[0]; + this.ai[3] = 0.0f; + if ((double) this.ai[0] >= 60.0) + { + if (flag9) + this.ai[1] = 0.0f; + int num56 = 5; + if (Main.tile[index, j - 1].type == (ushort) 388) + num56 = 2; + this.velocity.X = 0.5f * (float) -this.direction; + this.ai[1] += (float) num56; + bool flag37 = false; + if ((double) this.ai[1] >= 10.0) + { + flag37 = true; + this.ai[1] = 10f; + } + if (flag10) + flag37 = true; + WorldGen.KillTile(index, j - 1, true); + if (Main.netMode != 1 & flag37) + { + if (flag11) + { + WorldGen.KillTile(index, j - 1); + if (Main.netMode == 2) + NetMessage.SendData(17, number2: ((float) index), number3: ((float) (j - 1))); + } + else + { + if (tileSafely4.type == (ushort) 10) + { + bool flag38 = WorldGen.OpenDoor(index, j - 1, this.direction); + if (!flag38) + { + this.ai[3] = (float) num18; + this.netUpdate = true; + } + if (Main.netMode == 2 & flag38) + NetMessage.SendData(19, number2: ((float) index), number3: ((float) (j - 1)), number4: ((float) this.direction)); + } + if (tileSafely4.type == (ushort) 388) + { + bool flag39 = WorldGen.ShiftTallGate(index, j - 1, false); + if (!flag39) + { + this.ai[3] = (float) num18; + this.netUpdate = true; + } + if (Main.netMode == 2 & flag39) + NetMessage.SendData(19, number: 4, number2: ((float) index), number3: ((float) (j - 1)), number4: ((float) this.direction)); + } + } + } + } + } + else + { + if ((double) this.velocity.X * (double) (this.spriteDirection * num22) > 0.0) + { + if (this.height >= 32 && tileSafely5.nactive() && Main.tileSolid[(int) tileSafely5.type]) + { + this.netUpdate = true; + this.velocity.Y = -7f; + if (tileSafely6.nactive() && Main.tileSolid[(int) tileSafely6.type]) + this.velocity.Y = -8f; + } + else if (tileSafely4.nactive() && Main.tileSolid[(int) tileSafely4.type]) + { + this.velocity.Y = -6f; + this.netUpdate = true; + } + else if (flag36 && tileSafely3.nactive() && !tileSafely3.topSlope() && Main.tileSolid[(int) tileSafely3.type]) + { + this.velocity.Y = -5f; + this.netUpdate = true; + } + else if (flag25 && (!tileSafely2.nactive() || !Main.tileSolid[(int) tileSafely2.type]) && (!tileSafely1.nactive() || !Main.tileSolid[(int) tileSafely1.type])) + { + this.velocity.X *= 1.5f; + this.velocity.Y = -8f; + this.netUpdate = true; + } + else if (flag8) + { + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + } + if ((double) this.velocity.Y == 0.0 & flag1 && (double) this.ai[3] == 1.0) + { + this.velocity.Y = -5f; + this.netUpdate = true; + } + } + if (flag26 && (double) this.velocity.Y == 0.0 && (double) Math.Abs(targetData.Center.X - this.Center.X) < 100.0 && (double) Math.Abs(targetData.Center.Y - this.Center.Y) < 50.0 && (double) Math.Abs(this.velocity.X) >= 1.0 && (double) this.velocity.X * (double) this.direction > 0.0) + { + this.velocity.X = MathHelper.Clamp(this.velocity.X * 2f, -3f, 3f); + this.velocity.Y = -4f; + this.netAlways = true; + } + } + } + else if (flag8) + { + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + } + if (!flag2 || !this.noTileCollide) + return; + this.wet = false; + if (flag29) + { + if (this.alpha < 60) + this.alpha += 20; + this.localAI[3] = 40f; + } + int num57 = (double) this.velocity.Y == 0.0 ? 1 : 0; + if ((double) Math.Abs(this.Center.X - targetData.Center.X) > 200.0) + { + this.spriteDirection = this.direction = (double) targetData.Center.X > (double) this.Center.X ? 1 : -1; + this.velocity.X = MathHelper.Lerp(this.velocity.X, (float) this.direction, 0.05f); + } + int Width = 80; + int height = this.height; + Vector2 Position = new Vector2(this.Center.X - (float) (Width / 2), this.position.Y + (float) this.height - (float) height); + bool flag40 = false; + if ((double) this.position.Y + (double) this.height < (double) targetData.Position.Y + (double) targetData.Height - 16.0) + flag40 = true; + if (flag40) + this.velocity.Y += 0.5f; + else if (Collision.SolidCollision(Position, Width, height) || (double) targetData.Center.Y - (double) this.Center.Y < -100.0 || (double) targetData.Center.Y - (double) this.Center.Y < 10.0 && (double) Math.Abs(targetData.Center.X - this.Center.X) < 60.0) + { + if ((double) this.velocity.Y > 0.0) + this.velocity.Y = 0.0f; + if ((double) this.velocity.Y > -0.2) + this.velocity.Y -= 0.025f; + else + this.velocity.Y -= 0.2f; + if ((double) this.velocity.Y < -4.0) + this.velocity.Y = -4f; + } + else + { + if ((double) this.velocity.Y < 0.0) + this.velocity.Y = 0.0f; + if ((double) this.velocity.Y < 0.1) + this.velocity.Y += 0.025f; + else + this.velocity.Y += 0.5f; + } + if ((double) this.velocity.Y > 10.0) + this.velocity.Y = 10f; + if (num57 == 0) + return; + this.velocity.Y = 0.0f; + } + } + + private void AI_084_LunaticCultist() + { + if ((double) this.ai[0] != -1.0 && Main.rand.Next(1000) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(88, 92)); + bool expertMode = Main.expertMode; + bool flag1 = this.life <= this.lifeMax / 2; + int num1 = 120; + int damageForProjectiles1 = this.GetAttackDamage_ForProjectiles(35f, 25f); + if (expertMode) + num1 = 90; + if (Main.getGoodWorld) + num1 -= 30; + int num2 = 18; + int num3 = 3; + int damageForProjectiles2 = this.GetAttackDamage_ForProjectiles(30f, 20f); + if (expertMode) + { + num2 = 12; + num3 = 4; + } + if (Main.getGoodWorld) + { + num2 = 10; + num3 = 5; + } + int num4 = 80; + int damageForProjectiles3 = this.GetAttackDamage_ForProjectiles(45f, 30f); + if (expertMode) + num4 = 40; + if (Main.getGoodWorld) + num4 -= 20; + int num5 = 20; + int num6 = 2; + if (expertMode) + { + num5 = 30; + num6 = 2; + } + int num7 = 20; + int num8 = 3; + bool flag2 = this.type == 439; + bool flag3 = false; + bool flag4 = false; + if (flag1) + this.defense = (int) ((double) this.defDefense * 0.649999976158142); + if (!flag2) + { + if (((double) this.ai[3] < 0.0 || !Main.npc[(int) this.ai[3]].active ? 1 : (Main.npc[(int) this.ai[3]].type != 439 ? 1 : 0)) != 0) + { + this.life = 0; + this.HitEffect(); + this.active = false; + return; + } + this.ai[0] = Main.npc[(int) this.ai[3]].ai[0]; + this.ai[1] = Main.npc[(int) this.ai[3]].ai[1]; + if ((double) this.ai[0] == 5.0) + { + if (this.justHit) + { + this.life = 0; + this.HitEffect(); + this.active = false; + if (Main.netMode != 1) + NetMessage.SendData(23, number: this.whoAmI); + NPC npc = Main.npc[(int) this.ai[3]]; + npc.ai[0] = 6f; + npc.ai[1] = 0.0f; + npc.netUpdate = true; + } + } + else + { + flag3 = true; + flag4 = true; + } + } + else if ((double) this.ai[0] == 5.0 && (double) this.ai[1] >= 120.0 && (double) this.ai[1] < 420.0 && this.justHit) + { + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + ++this.ai[3]; + this.velocity = Vector2.Zero; + this.netUpdate = true; + List intList = new List(); + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 440 && (double) Main.npc[index].ai[3] == (double) this.whoAmI) + intList.Add(index); + } + int num9 = 10; + if (Main.expertMode) + num9 = 3; + foreach (int number in intList) + { + NPC npc = Main.npc[number]; + if ((double) npc.localAI[1] == (double) this.localAI[1] && num9 > 0) + { + --num9; + npc.life = 0; + npc.HitEffect(); + npc.active = false; + if (Main.netMode != 1) + NetMessage.SendData(23, number: number); + } + else if (num9 > 0) + { + --num9; + npc.life = 0; + npc.HitEffect(); + npc.active = false; + } + } + Main.projectile[(int) this.ai[2]].ai[1] = -1f; + Main.projectile[(int) this.ai[2]].netUpdate = true; + } + Vector2 center1 = this.Center; + Player player = Main.player[this.target]; + if (this.target < 0 || this.target == (int) byte.MaxValue || player.dead || !player.active) + { + this.TargetClosest(false); + player = Main.player[this.target]; + this.netUpdate = true; + } + if (player.dead || (double) Vector2.Distance(player.Center, center1) > 5600.0) + { + this.life = 0; + this.HitEffect(); + this.active = false; + if (Main.netMode != 1) + NetMessage.SendData(28, number: this.whoAmI, number2: -1f); + new List() { this.whoAmI }; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 440 && (double) Main.npc[index].ai[3] == (double) this.whoAmI) + { + Main.npc[index].life = 0; + Main.npc[index].HitEffect(); + Main.npc[index].active = false; + if (Main.netMode != 1) + NetMessage.SendData(28, number: this.whoAmI, number2: -1f); + } + } + } + float num10 = this.ai[3]; + if ((double) this.localAI[0] == 0.0) + { + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, 89); + this.localAI[0] = 1f; + this.alpha = (int) byte.MaxValue; + this.rotation = 0.0f; + if (Main.netMode != 1) + { + this.ai[0] = -1f; + this.netUpdate = true; + } + } + if ((double) this.ai[0] == -1.0) + { + this.alpha -= 5; + if (this.alpha < 0) + this.alpha = 0; + ++this.ai[1]; + if ((double) this.ai[1] >= 420.0) + { + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + this.netUpdate = true; + } + else if ((double) this.ai[1] > 360.0) + { + this.velocity = this.velocity * 0.95f; + if ((double) this.localAI[2] != 13.0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, 105); + this.localAI[2] = 13f; + } + else if ((double) this.ai[1] > 300.0) + { + this.velocity = -Vector2.UnitY; + this.localAI[2] = 10f; + } + else + this.localAI[2] = (double) this.ai[1] <= 120.0 ? 0.0f : 1f; + flag3 = true; + flag4 = true; + } + if ((double) this.ai[0] == 0.0) + { + if ((double) this.ai[1] == 0.0) + this.TargetClosest(false); + this.localAI[2] = 10f; + int num11 = Math.Sign(player.Center.X - center1.X); + if (num11 != 0) + this.direction = this.spriteDirection = num11; + ++this.ai[1]; + if ((double) this.ai[1] >= 40.0 & flag2) + { + int num12 = 0; + if (flag1) + { + switch ((int) this.ai[3]) + { + case 0: + num12 = 0; + break; + case 1: + num12 = 1; + break; + case 2: + num12 = 0; + break; + case 3: + num12 = 5; + break; + case 4: + num12 = 0; + break; + case 5: + num12 = 3; + break; + case 6: + num12 = 0; + break; + case 7: + num12 = 5; + break; + case 8: + num12 = 0; + break; + case 9: + num12 = 2; + break; + case 10: + num12 = 0; + break; + case 11: + num12 = 3; + break; + case 12: + num12 = 0; + break; + case 13: + num12 = 4; + this.ai[3] = -1f; + break; + default: + this.ai[3] = -1f; + break; + } + } + else + { + switch ((int) this.ai[3]) + { + case 0: + num12 = 0; + break; + case 1: + num12 = 1; + break; + case 2: + num12 = 0; + break; + case 3: + num12 = 2; + break; + case 4: + num12 = 0; + break; + case 5: + num12 = 3; + break; + case 6: + num12 = 0; + break; + case 7: + num12 = 1; + break; + case 8: + num12 = 0; + break; + case 9: + num12 = 2; + break; + case 10: + num12 = 0; + break; + case 11: + num12 = 4; + this.ai[3] = -1f; + break; + default: + this.ai[3] = -1f; + break; + } + } + int maxValue = 6; + if (this.life < this.lifeMax / 3) + maxValue = 4; + if (this.life < this.lifeMax / 4) + maxValue = 3; + if (expertMode & flag1 && Main.rand.Next(maxValue) == 0 && num12 != 0 && num12 != 4 && num12 != 5 && NPC.CountNPCS(523) < 10) + num12 = 6; + if (num12 == 0) + { + float num13 = (float) Math.Ceiling((double) (player.Center + new Vector2(0.0f, -100f) - center1).Length() / 50.0); + if ((double) num13 == 0.0) + num13 = 1f; + List intList = new List(); + int num14 = 0; + intList.Add(this.whoAmI); + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 440 && (double) Main.npc[index].ai[3] == (double) this.whoAmI) + intList.Add(index); + } + bool flag5 = intList.Count % 2 == 0; + foreach (int index in intList) + { + NPC npc1 = Main.npc[index]; + Vector2 center2 = npc1.Center; + float num15 = (float) ((double) ((num14 + flag5.ToInt() + 1) / 2) * 6.28318548202515 * 0.400000005960464) / (float) intList.Count; + if (num14 % 2 == 1) + num15 *= -1f; + if (intList.Count == 1) + num15 = 0.0f; + Vector2 vector2_1 = new Vector2(0.0f, -1f).RotatedBy((double) num15) * new Vector2(300f, 200f); + Vector2 vector2_2 = player.Center + vector2_1 - center2; + npc1.ai[0] = 1f; + npc1.ai[1] = num13 * 2f; + npc1.velocity = vector2_2 / num13; + if (this.whoAmI >= npc1.whoAmI) + { + NPC npc2 = npc1; + npc2.position = npc2.position - npc1.velocity; + } + npc1.netUpdate = true; + ++num14; + } + } + if (num12 == 1) + { + this.ai[0] = 3f; + this.ai[1] = 0.0f; + } + else if (num12 == 2) + { + this.ai[0] = 2f; + this.ai[1] = 0.0f; + } + else if (num12 == 3) + { + this.ai[0] = 4f; + this.ai[1] = 0.0f; + } + else if (num12 == 4) + { + this.ai[0] = 5f; + this.ai[1] = 0.0f; + } + if (num12 == 5) + { + this.ai[0] = 7f; + this.ai[1] = 0.0f; + } + if (num12 == 6) + { + this.ai[0] = 8f; + this.ai[1] = 0.0f; + } + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 1.0) + { + flag3 = true; + this.localAI[2] = 10f; + if ((double) (int) this.ai[1] % 2.0 != 0.0 && (double) this.ai[1] != 1.0) + this.position = this.position - this.velocity; + --this.ai[1]; + if ((double) this.ai[1] <= 0.0) + { + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + ++this.ai[3]; + this.velocity = Vector2.Zero; + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 2.0) + { + this.localAI[2] = 11f; + Vector2 vec1 = Vector2.Normalize(player.Center - center1); + if (vec1.HasNaNs()) + vec1 = new Vector2((float) this.direction, 0.0f); + if ((double) this.ai[1] >= 4.0 & flag2 && (int) ((double) this.ai[1] - 4.0) % num1 == 0) + { + if (Main.netMode != 1) + { + List intList = new List(); + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 440 && (double) Main.npc[index].ai[3] == (double) this.whoAmI) + intList.Add(index); + } + foreach (int index1 in intList) + { + NPC npc = Main.npc[index1]; + Vector2 center3 = npc.Center; + int num16 = Math.Sign(player.Center.X - center3.X); + if (num16 != 0) + npc.direction = npc.spriteDirection = num16; + if (Main.netMode != 1) + { + Vector2 vec2 = Vector2.Normalize(player.Center - center3 + player.velocity * 20f); + if (vec2.HasNaNs()) + vec2 = new Vector2((float) this.direction, 0.0f); + Vector2 vector2_3 = center3 + new Vector2((float) (this.direction * 30), 12f); + for (int index2 = 0; index2 < 1; ++index2) + { + Vector2 vector2_4 = (vec2 * (float) (6.0 + Main.rand.NextDouble() * 4.0)).RotatedByRandom(0.523598790168762); + Projectile.NewProjectile(vector2_3.X, vector2_3.Y, vector2_4.X, vector2_4.Y, 468, 18, 0.0f, Main.myPlayer); + } + } + } + } + if (Main.netMode != 1) + { + Vector2 vec3 = Vector2.Normalize(player.Center - center1 + player.velocity * 20f); + if (vec3.HasNaNs()) + vec3 = new Vector2((float) this.direction, 0.0f); + Vector2 vector2_5 = this.Center + new Vector2((float) (this.direction * 30), 12f); + for (int index = 0; index < 1; ++index) + { + Vector2 vector2_6 = vec3 * 4f; + Projectile.NewProjectile(vector2_5.X, vector2_5.Y, vector2_6.X, vector2_6.Y, 464, damageForProjectiles1, 0.0f, Main.myPlayer, ai1: 1f); + } + } + } + ++this.ai[1]; + if ((double) this.ai[1] >= (double) (4 + num1)) + { + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + ++this.ai[3]; + this.velocity = Vector2.Zero; + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 3.0) + { + this.localAI[2] = 11f; + Vector2 vec4 = Vector2.Normalize(player.Center - center1); + if (vec4.HasNaNs()) + vec4 = new Vector2((float) this.direction, 0.0f); + if ((double) this.ai[1] >= 4.0 & flag2 && (int) ((double) this.ai[1] - 4.0) % num2 == 0) + { + if ((int) ((double) this.ai[1] - 4.0) / num2 == 2) + { + List intList = new List(); + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 440 && (double) Main.npc[index].ai[3] == (double) this.whoAmI) + intList.Add(index); + } + if (Main.netMode != 1) + { + foreach (int index3 in intList) + { + NPC npc = Main.npc[index3]; + Vector2 center4 = npc.Center; + int num17 = Math.Sign(player.Center.X - center4.X); + if (num17 != 0) + npc.direction = npc.spriteDirection = num17; + if (Main.netMode != 1) + { + Vector2 vec5 = Vector2.Normalize(player.Center - center4 + player.velocity * 20f); + if (vec5.HasNaNs()) + vec5 = new Vector2((float) this.direction, 0.0f); + Vector2 vector2_7 = center4 + new Vector2((float) (this.direction * 30), 12f); + for (int index4 = 0; index4 < 1; ++index4) + { + Vector2 vector2_8 = (vec5 * (float) (6.0 + Main.rand.NextDouble() * 4.0)).RotatedByRandom(0.523598790168762); + Projectile.NewProjectile(vector2_7.X, vector2_7.Y, vector2_8.X, vector2_8.Y, 468, 18, 0.0f, Main.myPlayer); + } + } + } + } + } + int num18 = Math.Sign(player.Center.X - center1.X); + if (num18 != 0) + this.direction = this.spriteDirection = num18; + if (Main.netMode != 1) + { + Vector2 vec6 = Vector2.Normalize(player.Center - center1 + player.velocity * 20f); + if (vec6.HasNaNs()) + vec6 = new Vector2((float) this.direction, 0.0f); + Vector2 vector2_9 = this.Center + new Vector2((float) (this.direction * 30), 12f); + for (int index = 0; index < 1; ++index) + { + Vector2 vector2_10 = (vec6 * (float) (6.0 + Main.rand.NextDouble() * 4.0)).RotatedByRandom(0.523598790168762); + Projectile.NewProjectile(vector2_9.X, vector2_9.Y, vector2_10.X, vector2_10.Y, 467, damageForProjectiles2, 0.0f, Main.myPlayer); + } + } + } + ++this.ai[1]; + if ((double) this.ai[1] >= (double) (4 + num2 * num3)) + { + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + ++this.ai[3]; + this.velocity = Vector2.Zero; + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 4.0) + { + this.localAI[2] = !flag2 ? 11f : 12f; + if ((double) this.ai[1] == 20.0 & flag2 && Main.netMode != 1) + { + List intList = new List(); + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 440 && (double) Main.npc[index].ai[3] == (double) this.whoAmI) + intList.Add(index); + } + foreach (int index5 in intList) + { + NPC npc = Main.npc[index5]; + Vector2 center5 = npc.Center; + int num19 = Math.Sign(player.Center.X - center5.X); + if (num19 != 0) + npc.direction = npc.spriteDirection = num19; + if (Main.netMode != 1) + { + Vector2 vec = Vector2.Normalize(player.Center - center5 + player.velocity * 20f); + if (vec.HasNaNs()) + vec = new Vector2((float) this.direction, 0.0f); + Vector2 vector2_11 = center5 + new Vector2((float) (this.direction * 30), 12f); + for (int index6 = 0; index6 < 1; ++index6) + { + Vector2 vector2_12 = (vec * (float) (6.0 + Main.rand.NextDouble() * 4.0)).RotatedByRandom(0.523598790168762); + Projectile.NewProjectile(vector2_11.X, vector2_11.Y, vector2_12.X, vector2_12.Y, 468, 18, 0.0f, Main.myPlayer); + } + } + } + if ((int) ((double) this.ai[1] - 20.0) % num4 == 0) + Projectile.NewProjectile(this.Center.X, this.Center.Y - 100f, 0.0f, 0.0f, 465, damageForProjectiles3, 0.0f, Main.myPlayer); + } + ++this.ai[1]; + if ((double) this.ai[1] >= (double) (20 + num4)) + { + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + ++this.ai[3]; + this.velocity = Vector2.Zero; + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 5.0) + { + this.localAI[2] = 10f; + if (Vector2.Normalize(player.Center - center1).HasNaNs()) + { + Vector2 vector2_13 = new Vector2((float) this.direction, 0.0f); + } + if ((double) this.ai[1] >= 0.0 && (double) this.ai[1] < 30.0) + { + flag3 = true; + flag4 = true; + this.alpha = (int) (((double) this.ai[1] - 0.0) / 30.0 * (double) byte.MaxValue); + } + else if ((double) this.ai[1] >= 30.0 && (double) this.ai[1] < 90.0) + { + if ((((double) this.ai[1] != 30.0 ? 0 : (Main.netMode != 1 ? 1 : 0)) & (flag2 ? 1 : 0)) != 0) + { + ++this.localAI[1]; + Vector2 spinningpoint = new Vector2(180f, 0.0f); + List intList = new List(); + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 440 && (double) Main.npc[index].ai[3] == (double) this.whoAmI) + intList.Add(index); + } + int num20 = 6 - intList.Count; + if (num20 > 2) + num20 = 2; + int length = intList.Count + num20 + 1; + float[] numArray = new float[length]; + for (int index = 0; index < numArray.Length; ++index) + numArray[index] = Vector2.Distance(this.Center + spinningpoint.RotatedBy((double) index * 6.28318548202515 / (double) length - 1.57079637050629), player.Center); + int index7 = 0; + for (int index8 = 1; index8 < numArray.Length; ++index8) + { + if ((double) numArray[index7] > (double) numArray[index8]) + index7 = index8; + } + int num21 = index7 >= length / 2 ? index7 - length / 2 : index7 + length / 2; + int num22 = num20; + for (int index9 = 0; index9 < numArray.Length; ++index9) + { + if (num21 != index9) + { + Vector2 vector2_14 = this.Center + spinningpoint.RotatedBy((double) index9 * 6.28318548202515 / (double) length - 1.57079637050629); + if (num22-- > 0) + { + int index10 = NPC.NewNPC((int) vector2_14.X, (int) vector2_14.Y + this.height / 2, 440, this.whoAmI); + Main.npc[index10].ai[3] = (float) this.whoAmI; + Main.npc[index10].netUpdate = true; + Main.npc[index10].localAI[1] = this.localAI[1]; + } + else + { + int number = intList[-num22 - 1]; + Main.npc[number].Center = vector2_14; + NetMessage.SendData(23, number: number); + } + } + } + this.ai[2] = (float) Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, 0.0f, 490, 0, 0.0f, Main.myPlayer, ai1: ((float) this.whoAmI)); + this.Center = this.Center + spinningpoint.RotatedBy((double) num21 * 6.28318548202515 / (double) length - 1.57079637050629); + this.netUpdate = true; + intList.Clear(); + } + flag3 = true; + flag4 = true; + this.alpha = (int) byte.MaxValue; + if (flag2) + { + Vector2 vector2_15 = Main.projectile[(int) this.ai[2]].Center - this.Center; + if (vector2_15 == Vector2.Zero) + vector2_15 = -Vector2.UnitY; + vector2_15.Normalize(); + this.localAI[2] = (double) Math.Abs(vector2_15.Y) >= 0.769999980926514 ? ((double) vector2_15.Y >= 0.0 ? 10f : 12f) : 11f; + int num23 = Math.Sign(vector2_15.X); + if (num23 != 0) + this.direction = this.spriteDirection = num23; + } + else + { + Vector2 vector2_16 = Main.projectile[(int) Main.npc[(int) this.ai[3]].ai[2]].Center - this.Center; + if (vector2_16 == Vector2.Zero) + vector2_16 = -Vector2.UnitY; + vector2_16.Normalize(); + this.localAI[2] = (double) Math.Abs(vector2_16.Y) >= 0.769999980926514 ? ((double) vector2_16.Y >= 0.0 ? 10f : 12f) : 11f; + int num24 = Math.Sign(vector2_16.X); + if (num24 != 0) + this.direction = this.spriteDirection = num24; + } + } + else if ((double) this.ai[1] >= 90.0 && (double) this.ai[1] < 120.0) + { + flag3 = true; + flag4 = true; + this.alpha = (int) byte.MaxValue - (int) (((double) this.ai[1] - 90.0) / 30.0 * (double) byte.MaxValue); + } + else if ((double) this.ai[1] >= 120.0 && (double) this.ai[1] < 420.0) + { + flag4 = true; + this.alpha = 0; + if (flag2) + { + Vector2 vector2_17 = Main.projectile[(int) this.ai[2]].Center - this.Center; + if (vector2_17 == Vector2.Zero) + vector2_17 = -Vector2.UnitY; + vector2_17.Normalize(); + this.localAI[2] = (double) Math.Abs(vector2_17.Y) >= 0.769999980926514 ? ((double) vector2_17.Y >= 0.0 ? 10f : 12f) : 11f; + int num25 = Math.Sign(vector2_17.X); + if (num25 != 0) + this.direction = this.spriteDirection = num25; + } + else + { + Vector2 vector2_18 = Main.projectile[(int) Main.npc[(int) this.ai[3]].ai[2]].Center - this.Center; + if (vector2_18 == Vector2.Zero) + vector2_18 = -Vector2.UnitY; + vector2_18.Normalize(); + this.localAI[2] = (double) Math.Abs(vector2_18.Y) >= 0.769999980926514 ? ((double) vector2_18.Y >= 0.0 ? 10f : 12f) : 11f; + int num26 = Math.Sign(vector2_18.X); + if (num26 != 0) + this.direction = this.spriteDirection = num26; + } + } + ++this.ai[1]; + if ((double) this.ai[1] >= 420.0) + { + flag4 = true; + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + ++this.ai[3]; + this.velocity = Vector2.Zero; + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 6.0) + { + this.localAI[2] = 13f; + ++this.ai[1]; + if ((double) this.ai[1] >= 120.0) + { + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + ++this.ai[3]; + this.velocity = Vector2.Zero; + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 7.0) + { + this.localAI[2] = 11f; + Vector2 vec7 = Vector2.Normalize(player.Center - center1); + if (vec7.HasNaNs()) + vec7 = new Vector2((float) this.direction, 0.0f); + if ((double) this.ai[1] >= 4.0 & flag2 && (int) ((double) this.ai[1] - 4.0) % num5 == 0) + { + if ((int) ((double) this.ai[1] - 4.0) / num5 == 2) + { + List intList = new List(); + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 440 && (double) Main.npc[index].ai[3] == (double) this.whoAmI) + intList.Add(index); + } + foreach (int index11 in intList) + { + NPC npc = Main.npc[index11]; + Vector2 center6 = npc.Center; + int num27 = Math.Sign(player.Center.X - center6.X); + if (num27 != 0) + npc.direction = npc.spriteDirection = num27; + if (Main.netMode != 1) + { + Vector2 vec8 = Vector2.Normalize(player.Center - center6 + player.velocity * 20f); + if (vec8.HasNaNs()) + vec8 = new Vector2((float) this.direction, 0.0f); + Vector2 vector2_19 = center6 + new Vector2((float) (this.direction * 30), 12f); + for (int index12 = 0; (double) index12 < 5.0; ++index12) + { + Vector2 vector2_20 = (vec8 * (float) (6.0 + Main.rand.NextDouble() * 4.0)).RotatedByRandom(1.25663709640503); + Projectile.NewProjectile(vector2_19.X, vector2_19.Y, vector2_20.X, vector2_20.Y, 468, 18, 0.0f, Main.myPlayer); + } + } + } + } + int num28 = Math.Sign(player.Center.X - center1.X); + if (num28 != 0) + this.direction = this.spriteDirection = num28; + if (Main.netMode != 1) + { + Vector2 vec9 = Vector2.Normalize(player.Center - center1 + player.velocity * 20f); + if (vec9.HasNaNs()) + vec9 = new Vector2((float) this.direction, 0.0f); + Vector2 vector2_21 = this.Center + new Vector2((float) (this.direction * 30), 12f); + float num29 = 8f; + float num30 = 0.2513274f; + for (int index13 = 0; (double) index13 < 5.0; ++index13) + { + Vector2 vector2_22 = (vec9 * num29).RotatedBy((double) num30 * (double) index13 - (1.25663709640503 - (double) num30) / 2.0); + float ai1 = (float) (((double) Main.rand.NextFloat() - 0.5) * 0.300000011920929 * 6.28318548202515 / 60.0); + int index14 = NPC.NewNPC((int) vector2_21.X, (int) vector2_21.Y + 7, 522, ai1: ai1, ai2: vector2_22.X, ai3: vector2_22.Y); + Main.npc[index14].velocity = vector2_22; + } + } + } + ++this.ai[1]; + if ((double) this.ai[1] >= (double) (4 + num5 * num6)) + { + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + ++this.ai[3]; + this.velocity = Vector2.Zero; + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 8.0) + { + this.localAI[2] = 13f; + if ((double) this.ai[1] >= 4.0 & flag2 && (int) ((double) this.ai[1] - 4.0) % num7 == 0) + { + List intList = new List(); + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 440 && (double) Main.npc[index].ai[3] == (double) this.whoAmI) + intList.Add(index); + } + int num31 = intList.Count + 1; + if (num31 > 3) + num31 = 3; + int num32 = Math.Sign(player.Center.X - center1.X); + if (num32 != 0) + this.direction = this.spriteDirection = num32; + if (Main.netMode != 1) + { + for (int index15 = 0; index15 < num31; ++index15) + { + Point tileCoordinates1 = this.Center.ToTileCoordinates(); + Point tileCoordinates2 = Main.player[this.target].Center.ToTileCoordinates(); + Vector2 vector2 = Main.player[this.target].Center - this.Center; + int num33 = 20; + int num34 = 3; + int num35 = 7; + int num36 = 2; + int num37 = 0; + bool flag6 = false; + if ((double) vector2.Length() > 2000.0) + flag6 = true; + while (!flag6 && num37 < 100) + { + ++num37; + int index16 = Main.rand.Next(tileCoordinates2.X - num33, tileCoordinates2.X + num33 + 1); + int index17 = Main.rand.Next(tileCoordinates2.Y - num33, tileCoordinates2.Y + num33 + 1); + if ((index17 < tileCoordinates2.Y - num35 || index17 > tileCoordinates2.Y + num35 || index16 < tileCoordinates2.X - num35 || index16 > tileCoordinates2.X + num35) && (index17 < tileCoordinates1.Y - num34 || index17 > tileCoordinates1.Y + num34 || index16 < tileCoordinates1.X - num34 || index16 > tileCoordinates1.X + num34) && !Main.tile[index16, index17].nactive()) + { + bool flag7 = true; + if (flag7 && Collision.SolidTiles(index16 - num36, index16 + num36, index17 - num36, index17 + num36)) + flag7 = false; + if (flag7) + { + NPC.NewNPC(index16 * 16 + 8, index17 * 16 + 8, 523, ai0: ((float) this.whoAmI)); + break; + } + } + } + } + } + } + ++this.ai[1]; + if ((double) this.ai[1] >= (double) (4 + num7 * num8)) + { + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + ++this.ai[3]; + this.velocity = Vector2.Zero; + this.netUpdate = true; + } + } + if (!flag2) + this.ai[3] = num10; + this.dontTakeDamage = flag3; + this.chaseable = !flag4; + } + + private void AI_108_DivingFlyer() + { + this.rotation = this.velocity.ToRotation(); + float num1 = 0.4f; + float num2 = 10f; + float num3 = 200f; + float num4 = 750f; + float num5 = 30f; + float num6 = 30f; + float num7 = 0.95f; + int num8 = 50; + float num9 = 14f; + float num10 = 30f; + float num11 = 100f; + float num12 = 20f; + float num13 = 0.0f; + float num14 = 7f; + bool flag1 = true; + bool flag2 = true; + int num15 = 120; + bool flag3 = false; + bool flag4 = false; + float num16 = 0.05f; + float num17 = 0.0f; + bool flag5 = false; + switch (this.type) + { + case 558: + case 559: + case 560: + flag4 = true; + num1 = 0.7f; + if (this.type == 559) + num1 = 0.5f; + if (this.type == 560) + num1 = 0.2f; + num2 = 3f; + num3 = 400f; + num4 = 500f; + num5 = 90f; + num6 = 20f; + num7 = 0.95f; + num8 = 0; + num9 = 8f; + num10 = 30f; + num11 = 150f; + num12 = 60f; + num13 = 0.05f; + num14 = 6f; + flag2 = false; + flag5 = true; + break; + case 574: + case 575: + flag4 = true; + num1 = 0.6f; + if (this.type == 575) + num1 = 0.4f; + num2 = 4f; + num3 = 400f; + num4 = 500f; + num5 = 90f; + num6 = 30f; + num7 = 0.95f; + num8 = 3; + num9 = 8f; + num10 = 30f; + num11 = 150f; + num12 = 10f; + num13 = 0.05f; + num14 = 0.0f; + num17 = -0.1f; + flag3 = true; + flag5 = true; + break; + } + NPCUtils.TargetClosestOldOnesInvasion(this); + NPCAimedTarget targetData = this.GetTargetData(); + if (flag5) + { + if ((double) this.localAI[0] == 0.0) + this.alpha = (int) byte.MaxValue; + if ((double) this.localAI[0] == 30.0) + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_EtherianPortalSpawnEnemy, this.Center); + if ((double) this.localAI[0] < 60.0) + { + ++this.localAI[0]; + this.alpha -= 5; + if (this.alpha < 0) + this.alpha = 0; + int num18 = (int) this.localAI[0] / 10; + float num19 = this.Size.Length() / 2f / 20f; + int maxValue = 5; + if (this.type == 576 || this.type == 577) + maxValue = 1; + for (int index = 0; index < num18; ++index) + { + if (Main.rand.Next(maxValue) == 0) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 27, this.velocity.X * 1f, Alpha: 100); + dust.scale = 0.55f; + dust.fadeIn = 0.7f; + dust.velocity *= 0.1f * num19; + dust.velocity += this.velocity; + } + } + } + } + if (flag4) + { + for (int index = 0; index < 200; ++index) + { + if (index != this.whoAmI && Main.npc[index].active && Main.npc[index].type == this.type && (double) Math.Abs(this.position.X - Main.npc[index].position.X) + (double) Math.Abs(this.position.Y - Main.npc[index].position.Y) < (double) this.width) + { + if ((double) this.position.X < (double) Main.npc[index].position.X) + this.velocity.X -= num16; + else + this.velocity.X += num16; + if ((double) this.position.Y < (double) Main.npc[index].position.Y) + this.velocity.Y -= num16; + else + this.velocity.Y += num16; + } + } + } + if (Math.Sign(this.velocity.X) != 0) + this.spriteDirection = -Math.Sign(this.velocity.X); + if ((double) this.rotation < -1.57079637050629) + this.rotation += 3.141593f; + if ((double) this.rotation > 1.57079637050629) + this.rotation -= 3.141593f; + float num20 = num13 * num12; + if (Main.expertMode) + num1 *= Main.GameModeInfo.KnockbackToEnemiesMultiplier; + SlotId slotId; + if ((double) this.ai[0] == 0.0) + { + this.knockBackResist = num1; + float num21 = num2; + Vector2 center = this.Center; + Vector2 vector2_1 = targetData.Center - center; + Vector2 vector2_2 = vector2_1 - Vector2.UnitY * num3; + double num22 = (double) vector2_1.Length(); + Vector2 v = Vector2.Normalize(vector2_1) * num21; + Vector2 vector2_3 = Vector2.Normalize(vector2_2) * num21; + bool flag6 = Collision.CanHit(this.Center, 1, 1, targetData.Center, 1, 1); + if ((double) this.ai[3] >= (double) num15) + flag6 = true; + float num23 = 8f; + bool flag7 = flag6 && (double) v.ToRotation() > 3.14159274101257 / (double) num23 && (double) v.ToRotation() < 3.14159274101257 - 3.14159274101257 / (double) num23; + double num24 = (double) num4; + if (num22 > num24 || !flag7) + { + this.velocity.X = (this.velocity.X * (num5 - 1f) + vector2_3.X) / num5; + this.velocity.Y = (this.velocity.Y * (num5 - 1f) + vector2_3.Y) / num5; + if (!flag7) + { + ++this.ai[3]; + if ((double) this.ai[3] == (double) num15) + this.netUpdate = true; + } + else + this.ai[3] = 0.0f; + } + else + { + this.ai[0] = 1f; + this.ai[2] = v.X; + this.ai[3] = v.Y; + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 1.0) + { + this.knockBackResist = 0.0f; + this.velocity = this.velocity * num7; + this.velocity.Y += num17; + ++this.ai[1]; + if ((double) this.ai[1] == (double) num6) + { + if (this.type == 558 || this.type == 559 || this.type == 560) + { + float[] localAi1 = this.localAI; + slotId = SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_WyvernDiveDown, this.Center); + double num25 = (double) ((SlotId) ref slotId).ToFloat(); + localAi1[1] = (float) num25; + if (Main.rand.Next(5) == 0) + { + float[] localAi2 = this.localAI; + slotId = SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_WyvernScream, this.Center); + double num26 = (double) ((SlotId) ref slotId).ToFloat(); + localAi2[2] = (float) num26; + } + } + else if (this.type == 574 || this.type == 575) + { + float[] localAi = this.localAI; + slotId = SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_KoboldFlyerChargeScream, this.Center); + double num27 = (double) ((SlotId) ref slotId).ToFloat(); + localAi[1] = (float) num27; + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_KoboldIgnite, this.Center); + } + } + if ((double) this.ai[1] >= (double) num6) + { + this.ai[0] = 2f; + this.ai[1] = 0.0f; + this.netUpdate = true; + Vector2 vector2 = new Vector2(this.ai[2], this.ai[3]) + new Vector2((float) Main.rand.Next(-num8, num8 + 1), (float) Main.rand.Next(-num8, num8 + 1)) * 0.04f; + vector2.Normalize(); + this.velocity = vector2 * num9; + } + } + else if ((double) this.ai[0] == 2.0) + { + if ((double) this.ai[1] >= 20.0 && (this.type == 574 || this.type == 575)) + { + ActiveSound activeSound = SoundEngine.GetActiveSound(SlotId.FromFloat(this.localAI[2])); + if (activeSound == null) + { + float[] localAi = this.localAI; + slotId = SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_KoboldIgniteLoop, this.Center); + double num28 = (double) ((SlotId) ref slotId).ToFloat(); + localAi[2] = (float) num28; + } + else + activeSound.Position = this.Center; + } + this.knockBackResist = 0.0f; + float num29 = num10; + ++this.ai[1]; + bool flag8 = (double) Vector2.Distance(this.Center, targetData.Center) > (double) num11 && (double) this.Center.Y > (double) targetData.Center.Y; + if (flag3) + flag8 = false; + if ((double) this.ai[1] >= (double) num29 & flag8 || (double) this.velocity.Length() < (double) num14) + { + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.ai[3] = 0.0f; + this.velocity = this.velocity / 2f; + this.netUpdate = true; + if (flag1) + { + this.ai[1] = 45f; + this.ai[0] = 4f; + } + } + else + { + Vector2 center = this.Center; + Vector2 vec = targetData.Center - center; + vec.Normalize(); + if (vec.HasNaNs()) + vec = new Vector2((float) this.direction, 0.0f); + this.velocity = (this.velocity * (num12 - 1f) + vec * (this.velocity.Length() + num20)) / num12; + } + if (flag2 && Collision.SolidCollision(this.position, this.width, this.height)) + { + this.ai[0] = 3f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.ai[3] = 0.0f; + this.netUpdate = true; + } + } + else if ((double) this.ai[0] == 4.0) + { + this.ai[1] -= 3f; + if ((double) this.ai[1] <= 0.0) + { + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + this.netUpdate = true; + } + this.velocity = this.velocity * 0.95f; + } + ActiveSound activeSound1 = SoundEngine.GetActiveSound(SlotId.FromFloat(this.localAI[1])); + if (activeSound1 != null) + { + activeSound1.Position = this.Center; + } + else + { + float[] localAi = this.localAI; + slotId = (SlotId) SlotId.Invalid; + double num30 = (double) ((SlotId) ref slotId).ToFloat(); + localAi[1] = (float) num30; + } + if (this.type == 558 || this.type == 559 || this.type == 560) + { + ActiveSound activeSound2 = SoundEngine.GetActiveSound(SlotId.FromFloat(this.localAI[2])); + if (activeSound2 != null) + { + activeSound2.Position = this.Center; + } + else + { + float[] localAi = this.localAI; + slotId = (SlotId) SlotId.Invalid; + double num31 = (double) ((SlotId) ref slotId).ToFloat(); + localAi[2] = (float) num31; + } + } + if (flag2 && (double) this.ai[0] != 3.0 && (double) Vector2.Distance(this.Center, targetData.Center) < 64.0) + { + this.ai[0] = 3f; + this.ai[1] = 0.0f; + this.ai[2] = 0.0f; + this.ai[3] = 0.0f; + this.netUpdate = true; + } + if ((double) this.ai[0] != 3.0) + return; + this.position = this.Center; + this.width = this.height = 192; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + this.velocity = Vector2.Zero; + this.damage = this.GetAttackDamage_ScaledByStrength(80f); + this.alpha = (int) byte.MaxValue; + if ((double) this.ai[1] == 0.0 && (this.type == 574 || this.type == 575)) + { + for (int index1 = 0; index1 < 4; ++index1) + { + int index2 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index2].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + } + for (int index3 = 0; index3 < 20; ++index3) + { + int index4 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 200, Scale: 3.7f); + Main.dust[index4].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.dust[index4].noGravity = true; + Main.dust[index4].velocity *= 3f; + int index5 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.5f); + Main.dust[index5].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 4f; + Main.dust[index5].velocity *= 2f; + Main.dust[index5].noGravity = true; + Main.dust[index5].fadeIn = 2.5f; + } + for (int index6 = 0; index6 < 6; ++index6) + { + int index7 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Scale: 2.7f); + Main.dust[index7].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index7].noGravity = true; + Main.dust[index7].velocity *= 3f; + } + for (int index8 = 0; index8 < 12; ++index8) + { + int index9 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Scale: 1.5f); + Main.dust[index9].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index9].noGravity = true; + Main.dust[index9].velocity *= 3f; + } + for (int index10 = 0; index10 < 5; ++index10) + { + int index11 = Gore.NewGore(this.position + new Vector2((float) (this.width * Main.rand.Next(100)) / 100f, (float) (this.height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index11].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.gore[index11].velocity *= 0.3f; + Main.gore[index11].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index11].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + } + ++this.ai[1]; + if ((double) this.ai[1] < 3.0) + return; + SoundEngine.PlaySound(SoundID.Item14, this.position); + this.life = 0; + this.HitEffect(); + this.active = false; + } + + private void AI_109_DarkMage() + { + bool flag1 = false; + bool flag2 = false; + bool flag3 = true; + bool flag4 = false; + int num1 = 4; + int num2 = 3; + int num3 = 0; + float num4 = 0.2f; + float num5 = 2f; + float num6 = -0.2f; + float num7 = -4f; + bool flag5 = true; + float num8 = 2f; + float num9 = 0.1f; + float num10 = 1f; + float num11 = 0.04f; + bool flag6 = false; + float num12 = 0.96f; + bool flag7 = true; + NPCAimedTarget targetData = this.GetTargetData(); + if (this.type == 564 || this.type == 565) + { + flag5 = false; + this.rotation = this.velocity.X * 0.04f; + this.spriteDirection = this.direction > 0 ? 1 : -1; + num3 = 2; + num6 = -0.05f; + num7 = -0.4f; + num4 = 0.05f; + num5 = 0.2f; + num10 = 0.5f; + num11 = 0.02f; + num8 = 0.5f; + num9 = 0.1f; + this.localAI[2] = 0.0f; + DelegateMethods.v3_1 = new Vector3(0.3f, 0.05f, 0.45f) * 1.5f; + Utils.PlotTileLine(this.Top, this.Bottom, (float) this.width, new Utils.TileActionAttempt(DelegateMethods.CastLightOpen)); + if ((double) this.ai[0] < 0.0) + this.ai[0] = MathHelper.Min(this.ai[0] + 1f, 0.0f); + if ((double) this.ai[0] > 0.0) + { + flag7 = false; + flag6 = true; + num12 = 0.9f; + --this.ai[0]; + if ((double) this.ai[0] == 80.0 && (double) this.ai[1] == 2.0) + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_DarkMageSummonSkeleton, this.Center); + if ((double) this.ai[1] == 2.0 && (double) this.ai[0] == 64.0 && Main.netMode != 1) + { + Projectile.NewProjectile(this.Center + new Vector2((float) (this.direction * 24), -40f), Vector2.Zero, 673, 0, 0.0f, Main.myPlayer); + DD2Event.RaiseGoblins(this.Center); + } + if ((double) this.ai[1] == 0.0 && (double) this.ai[0] == 32.0) + { + Vector2 velocity = (targetData.Center - (this.Center + new Vector2((float) (this.direction * 10), -16f))).SafeNormalize(Vector2.UnitY) * 14f; + this.direction = (double) velocity.X > 0.0 ? 1 : -1; + if (Main.netMode != 1) + Projectile.NewProjectile(this.Center + new Vector2((float) (this.direction * 10), -16f), velocity, 675, 40, 0.0f, Main.myPlayer); + } + if ((double) this.ai[0] == 126.0 && (double) this.ai[1] == 1.0) + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_DarkMageCastHeal, this.Center); + if ((double) this.ai[1] == 1.0 && Main.netMode != 1 && ((double) this.ai[0] == 40.0 || (double) this.ai[0] == 48.0 || (double) this.ai[0] == 56.0)) + { + Point result; + if (WorldUtils.Find(new Vector2(this.Center.X + (float) (this.direction * 240), this.Center.Y).ToTileCoordinates(), Searches.Chain((GenSearch) new Searches.Down(50), (GenCondition) new Terraria.WorldBuilding.Conditions.IsSolid()), out result)) + Projectile.NewProjectile(result.ToWorldCoordinates(autoAddY: 0.0f), Vector2.Zero, 674, 0, 0.0f, Main.myPlayer); + } + if ((double) this.ai[0] <= 0.0) + { + double num13 = (double) this.ai[1]; + ++this.ai[1]; + if ((double) this.ai[1] >= 3.0) + this.ai[1] = 0.0f; + this.ai[0] = -120f; + if (num13 == 0.0) + this.ai[0] = -20f; + this.netUpdate = true; + } + } + if ((double) this.ai[0] == 0.0 && (double) this.localAI[3] >= 60.0) + { + bool flag8 = false; + Vector2 minimum = this.Center + new Vector2(-600f, -200f); + Vector2 maximum = this.Center + new Vector2(600f, 200f); + int num14 = 0; + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && npc.lifeMax != npc.life && npc.Center.Between(minimum, maximum) && ++num14 >= 2) + { + flag8 = true; + break; + } + } + if (!flag8) + this.ai[1] = 2f; + if ((double) this.ai[1] == 2.0 && !DD2Event.CanRaiseGoblinsHere(this.Center)) + this.ai[1] = 0.0f; + bool flag9 = true; + if ((double) this.ai[1] == 0.0 && ((double) this.Distance(targetData.Center) >= 1000.0 || !Collision.CanHitLine(this.Center, 0, 0, targetData.Center, 0, 0))) + flag9 = false; + if (flag9) + { + switch ((int) this.ai[1]) + { + case 0: + this.ai[0] = 97f; + break; + case 1: + this.ai[0] = (float) sbyte.MaxValue; + break; + case 2: + this.ai[0] = 183f; + break; + } + this.netUpdate = true; + flag6 = true; + } + } + if ((double) this.localAI[3] == 0.0) + this.alpha = (int) byte.MaxValue; + if ((double) this.localAI[3] == 30.0) + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_EtherianPortalSpawnEnemy, this.Center); + if ((double) this.localAI[3] < 60.0) + { + ++this.localAI[3]; + this.alpha -= 5; + if (this.alpha < 0) + this.alpha = 0; + int num15 = (int) this.localAI[3] / 10; + float num16 = this.Size.Length() / 2f / 20f; + int maxValue = 5; + if (this.type == 576 || this.type == 577) + maxValue = 1; + for (int index = 0; index < num15; ++index) + { + if (Main.rand.Next(maxValue) == 0) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 27, this.velocity.X * 1f, Alpha: 100); + dust.scale = 0.55f; + dust.fadeIn = 0.7f; + dust.velocity *= 0.1f * num16; + dust.velocity += this.velocity; + } + } + } + } + if (this.justHit) + this.localAI[2] = 0.0f; + if (!flag2) + { + if ((double) this.localAI[2] >= 0.0) + { + float num17 = 16f; + bool flag10 = false; + bool flag11 = false; + if ((double) this.position.X > (double) this.localAI[0] - (double) num17 && (double) this.position.X < (double) this.localAI[0] + (double) num17) + flag10 = true; + else if ((double) this.velocity.X < 0.0 && this.direction > 0 || (double) this.velocity.X > 0.0 && this.direction < 0) + { + flag10 = true; + num17 += 24f; + } + if ((double) this.position.Y > (double) this.localAI[1] - (double) num17 && (double) this.position.Y < (double) this.localAI[1] + (double) num17) + flag11 = true; + if (flag10 & flag11) + { + ++this.localAI[2]; + if ((double) this.localAI[2] >= 30.0 && (double) num17 == 16.0) + flag1 = true; + if ((double) this.localAI[2] >= 60.0) + { + this.localAI[2] = -180f; + this.direction *= -1; + this.velocity.X *= -1f; + this.collideX = false; + } + } + else + { + this.localAI[0] = this.position.X; + this.localAI[1] = this.position.Y; + this.localAI[2] = 0.0f; + } + if (flag7) + NPCUtils.TargetClosestOldOnesInvasion(this); + } + else + { + ++this.localAI[2]; + this.direction = (double) targetData.Center.X > (double) this.Center.X ? 1 : -1; + } + } + int index1 = (int) (((double) this.position.X + (double) (this.width / 2)) / 16.0) + this.direction * 2; + int num18 = (int) (((double) this.position.Y + (double) this.height) / 16.0); + int num19 = (int) this.Bottom.Y / 16; + int index2 = (int) this.Bottom.X / 16; + if (flag6) + { + this.velocity = this.velocity * num12; + } + else + { + for (int index3 = num18; index3 < num18 + num1; ++index3) + { + if (Main.tile[index1, index3] == null) + Main.tile[index1, index3] = new Tile(); + if (Main.tile[index1, index3].nactive() && Main.tileSolid[(int) Main.tile[index1, index3].type] || Main.tile[index1, index3].liquid > (byte) 0) + { + if (index3 <= num18 + 1) + flag4 = true; + flag3 = false; + break; + } + } + for (int index4 = num19; index4 < num19 + num3; ++index4) + { + if (Main.tile[index2, index4] == null) + Main.tile[index2, index4] = new Tile(); + if (Main.tile[index2, index4].nactive() && Main.tileSolid[(int) Main.tile[index2, index4].type] || Main.tile[index2, index4].liquid > (byte) 0) + { + flag4 = true; + flag3 = false; + break; + } + } + if (flag5) + { + for (int index5 = num18 - num2; index5 < num18; ++index5) + { + if (Main.tile[index1, index5] == null) + Main.tile[index1, index5] = new Tile(); + if (Main.tile[index1, index5].nactive() && Main.tileSolid[(int) Main.tile[index1, index5].type] || Main.tile[index1, index5].liquid > (byte) 0) + { + flag4 = false; + flag1 = true; + break; + } + } + } + if (flag1) + { + flag4 = false; + flag3 = true; + } + if (flag3) + { + this.velocity.Y += num4; + if ((double) this.velocity.Y > (double) num5) + this.velocity.Y = num5; + } + else + { + if (((this.directionY >= 0 ? 0 : ((double) this.velocity.Y > 0.0 ? 1 : 0)) | (flag4 ? 1 : 0)) != 0) + this.velocity.Y += num6; + if ((double) this.velocity.Y < (double) num7) + this.velocity.Y = num7; + } + if (this.collideX) + { + this.velocity.X = this.oldVelocity.X * -0.4f; + if (this.direction == -1 && (double) this.velocity.X > 0.0 && (double) this.velocity.X < 1.0) + this.velocity.X = 1f; + if (this.direction == 1 && (double) this.velocity.X < 0.0 && (double) this.velocity.X > -1.0) + this.velocity.X = -1f; + } + if (this.collideY) + { + this.velocity.Y = this.oldVelocity.Y * -0.25f; + if ((double) this.velocity.Y > 0.0 && (double) this.velocity.Y < 1.0) + this.velocity.Y = 1f; + if ((double) this.velocity.Y < 0.0 && (double) this.velocity.Y > -1.0) + this.velocity.Y = -1f; + } + if (this.direction == -1 && (double) this.velocity.X > -(double) num8) + { + this.velocity.X -= num9; + if ((double) this.velocity.X > (double) num8) + this.velocity.X -= num9; + else if ((double) this.velocity.X > 0.0) + this.velocity.X += num9 / 2f; + if ((double) this.velocity.X < -(double) num8) + this.velocity.X = -num8; + } + else if (this.direction == 1 && (double) this.velocity.X < (double) num8) + { + this.velocity.X += num9; + if ((double) this.velocity.X < -(double) num8) + this.velocity.X += num9; + else if ((double) this.velocity.X < 0.0) + this.velocity.X -= num9 / 2f; + if ((double) this.velocity.X > (double) num8) + this.velocity.X = num8; + } + if (this.directionY == -1 && (double) this.velocity.Y > -(double) num10) + { + this.velocity.Y -= num11; + if ((double) this.velocity.Y > (double) num10) + this.velocity.Y -= num11 * 1.25f; + else if ((double) this.velocity.Y > 0.0) + this.velocity.Y += num11 * 0.75f; + if ((double) this.velocity.Y >= -(double) num10) + return; + this.velocity.Y = -num8; + } + else + { + if (this.directionY != 1 || (double) this.velocity.Y >= (double) num10) + return; + this.velocity.Y += num11; + if ((double) this.velocity.Y < -(double) num10) + this.velocity.Y += num11 * 1.25f; + else if ((double) this.velocity.Y < 0.0) + this.velocity.Y -= num11 * 0.75f; + if ((double) this.velocity.Y <= (double) num10) + return; + this.velocity.Y = num10; + } + } + } + + private void AI_111_DD2LightningBug() + { + bool flag1 = true; + float num1 = 7f; + float num2 = 60f; + float num3 = 60f; + float num4 = 1f; + float num5 = 0.96f; + int num6 = 30; + int num7 = 20; + float num8 = 200f; + int Damage = 40; + int Type = 438; + float num9 = 10f; + float num10 = 100f; + bool flag2 = false; + float num11 = 0.05f; + Vector2 center = this.Center; + NPCUtils.TargetClosestOldOnesInvasion(this); + NPCAimedTarget targetData = this.GetTargetData(); + bool flag3 = false; + if (this.type == 578) + { + num1 = 4f; + num2 = 20f; + num3 = 20f; + flag3 = true; + flag2 = true; + num11 = 0.1f; + Type = 682; + Damage = 50; + num9 = 10f; + num10 = 50f; + num6 = 5; + num7 = 30; + center += new Vector2((float) (-this.spriteDirection * 20), 10f); + this.position = this.position + this.netOffset; + if (Main.rand.Next(15) == 0) + { + Vector2 position = this.position; + if (this.direction == -1) + position.X += (float) (this.width / 2); + Dust dust = Dust.NewDustDirect(position, this.width / 2, this.height, 272); + dust.scale = 0.65f; + dust.velocity.Y -= 0.8f; + if ((double) dust.velocity.X * (double) this.direction > 0.0) + dust.velocity.X *= -1f; + if ((double) dust.velocity.Y > 0.0) + dust.velocity *= -0.5f; + } + if (Main.rand.Next(80) == 0) + { + Vector2 rotationVector2 = (Main.rand.NextFloat() * 6.283185f).ToRotationVector2(); + Dust dust1 = Dust.NewDustPerfect(this.Center, 272, new Vector2?(rotationVector2)); + dust1.velocity *= 1.1f; + dust1.noGravity = true; + dust1.customData = (object) this; + Dust dust2 = Dust.NewDustPerfect(this.Center, 272, new Vector2?(rotationVector2)); + dust2.velocity *= 1.5f; + dust2.noGravity = true; + dust2.customData = (object) this; + } + this.position = this.position - this.netOffset; + } + if (flag3) + { + if ((double) this.localAI[1] == 0.0) + this.alpha = (int) byte.MaxValue; + if ((double) this.localAI[1] == 30.0) + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_EtherianPortalSpawnEnemy, this.Center); + if ((double) this.localAI[1] < 60.0) + { + ++this.localAI[1]; + this.alpha -= 5; + if (this.alpha < 0) + this.alpha = 0; + int num12 = (int) this.localAI[1] / 10; + float num13 = this.Size.Length() / 2f / 20f; + int maxValue = 5; + if (this.type == 576 || this.type == 577) + maxValue = 1; + for (int index = 0; index < num12; ++index) + { + if (Main.rand.Next(maxValue) == 0) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 27, this.velocity.X * 1f, Alpha: 100); + dust.scale = 0.55f; + dust.fadeIn = 0.7f; + dust.velocity *= 0.1f * num13; + dust.velocity += this.velocity; + } + } + } + } + if (flag2) + { + for (int index = 0; index < 200; ++index) + { + if (index != this.whoAmI && Main.npc[index].active && Main.npc[index].type == this.type && (double) Math.Abs(this.position.X - Main.npc[index].position.X) + (double) Math.Abs(this.position.Y - Main.npc[index].position.Y) < (double) this.width) + { + if ((double) this.position.X < (double) Main.npc[index].position.X) + this.velocity.X -= num11; + else + this.velocity.X += num11; + if ((double) this.position.Y < (double) Main.npc[index].position.Y) + this.velocity.Y -= num11; + else + this.velocity.Y += num11; + } + } + } + this.rotation = (float) ((double) Math.Abs(this.velocity.X) * (double) this.direction * 0.100000001490116); + this.spriteDirection = this.direction; + Vector2 position1 = center; + Vector2 v = targetData.Center - position1; + Vector2 vector2_1 = v.SafeNormalize(Vector2.UnitY) * num1; + bool flag4 = Collision.CanHit(this.Center, 1, 1, targetData.Center, 1, 1); + if ((double) this.localAI[0] < 0.0) + ++this.localAI[0]; + if (!flag1) + { + this.velocity = (this.velocity * (num2 - 1f) + vector2_1) / num2; + this.EncourageDespawn(10); + } + else if ((double) v.Length() > (double) num8 || !flag4) + this.velocity = (this.velocity * (num3 - 1f) + vector2_1) / num3; + else if ((double) v.Y < (double) num10) + { + this.velocity.Y -= 0.03f; + } + else + { + if ((double) this.localAI[0] < 0.0) + return; + this.velocity = this.velocity * num5; + if ((double) this.velocity.Length() >= (double) num4 || Main.netMode == 1) + return; + ++this.localAI[0]; + if ((double) this.localAI[0] < (double) num6) + return; + this.localAI[0] = (float) -num7; + this.direction = this.spriteDirection = (double) vector2_1.X > 0.0 ? 1 : -1; + Vector2 vector2_2 = v + Utils.RandomVector2(Main.rand, -25f, 25f); + vector2_2.X *= (float) (1.0 + (double) Main.rand.Next(-20, 21) * 0.00499999988824129); + vector2_2.Y *= (float) (1.0 + (double) Main.rand.Next(-20, 21) * 0.00499999988824129); + vector2_2 = vector2_2.SafeNormalize(Vector2.UnitY) * num9; + vector2_2.X *= (float) (1.0 + (double) Main.rand.Next(-20, 21) * (1.0 / 160.0)); + vector2_2.Y *= (float) (1.0 + (double) Main.rand.Next(-20, 21) * (1.0 / 160.0)); + Projectile.NewProjectile(position1, vector2_2, Type, Damage, 0.0f, Main.myPlayer); + } + } + + public void ReflectProjectiles(Microsoft.Xna.Framework.Rectangle myRect) + { + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].CanBeReflected() && this.CanReflectProjectile(Main.projectile[index])) + this.ReflectProjectile(Main.projectile[index]); + } + } + + public bool CanReflectProjectile(Projectile proj) + { + bool flag = proj.Hitbox.Intersects(this.Hitbox); + if (this.type == 618) + this.BloodNautilus_GetMouthPositionAndRotation(out Vector2 _, out Vector2 _); + return flag; + } + + public void BloodNautilus_GetMouthPositionAndRotation( + out Vector2 mouthPosition, + out Vector2 mouthDirection) + { + float f = this.rotation + 0.4712389f * (float) this.spriteDirection; + if (this.spriteDirection == -1) + f += 3.141593f; + mouthDirection = f.ToRotationVector2(); + mouthPosition = this.Center + mouthDirection * 50f; + } + + public void ReflectProjectile(Projectile proj) + { + SoundEngine.PlaySound(SoundID.Item150, proj.position); + for (int index1 = 0; index1 < 3; ++index1) + { + int index2 = Dust.NewDust(proj.position, proj.width, proj.height, 31); + Main.dust[index2].velocity *= 0.3f; + } + proj.hostile = true; + proj.friendly = false; + Vector2 vector2 = Main.player[proj.owner].Center - proj.Center; + vector2.Normalize(); + vector2 *= proj.oldVelocity.Length(); + proj.velocity = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + proj.velocity.Normalize(); + Projectile projectile1 = proj; + projectile1.velocity = projectile1.velocity * vector2.Length(); + Projectile projectile2 = proj; + projectile2.velocity = projectile2.velocity + vector2 * 20f; + proj.velocity.Normalize(); + Projectile projectile3 = proj; + projectile3.velocity = projectile3.velocity * vector2.Length(); + proj.damage /= 2; + proj.penetrate = 1; + } + + public int GetShootingFrame(float circleY) + { + int num = -4; + if ((double) circleY < -0.300000011920929) + num = 1; + if ((double) circleY < -0.100000001490116) + num = 0; + if ((double) circleY > 0.100000001490116) + num = 2; + if ((double) circleY > 0.300000011920929) + num = 3; + if (this.type == 228 || this.type == 229 || this.type == 209 || this.type == 22 || this.type == 368) + { + if (num == -4) + num = 1; + if ((double) circleY >= -0.100000001490116) + ++num; + } + return num; + } + + public Tuple GetSwingStats( + int swingMax, + int swingCurrent, + int aimDir, + int itemWidth, + int itemHeight) + { + Vector2 zero = Vector2.Zero; + if ((double) swingCurrent < (double) swingMax * 0.333) + { + float num = 10f; + if (itemWidth > 32) + num = 14f; + if (itemWidth >= 52) + num = 24f; + if (itemWidth >= 64) + num = 28f; + if (itemWidth >= 92) + num = 38f; + zero.X = this.Center.X + ((float) itemWidth * 0.5f - num) * (float) aimDir; + zero.Y = this.position.Y + 24f; + } + else if ((double) swingCurrent < (double) swingMax * 0.666) + { + float num1 = 10f; + if (itemWidth > 32) + num1 = 18f; + if (itemWidth >= 52) + num1 = 24f; + if (itemWidth >= 64) + num1 = 28f; + if (itemWidth >= 92) + num1 = 38f; + zero.X = this.Center.X + ((float) itemWidth * 0.5f - num1) * (float) aimDir; + float num2 = 10f; + if (itemHeight > 32) + num2 = 8f; + if (itemHeight > 52) + num2 = 12f; + if (itemHeight > 64) + num2 = 14f; + zero.Y = this.position.Y + num2; + } + else + { + float num3 = 6f; + if (itemWidth > 32) + num3 = 14f; + if (itemWidth >= 48) + num3 = 18f; + if (itemWidth >= 52) + num3 = 24f; + if (itemWidth >= 64) + num3 = 28f; + if (itemWidth >= 92) + num3 = 38f; + zero.X = this.Center.X - ((float) itemWidth * 0.5f - num3) * (float) aimDir; + float num4 = 10f; + if (itemHeight > 32) + num4 = 10f; + if (itemHeight > 52) + num4 = 12f; + if (itemHeight > 64) + num4 = 14f; + zero.Y = this.position.Y + num4; + } + float num5 = (float) (((double) swingCurrent / (double) swingMax - 0.5) * (double) -aimDir * 3.5 - (double) aimDir * 0.300000011920929); + return Tuple.Create(zero, num5); + } + + public void TweakSwingStats( + int swingMax, + int swingCurrent, + int aimDir, + ref Microsoft.Xna.Framework.Rectangle itemRectangle) + { + if ((double) swingCurrent < (double) swingMax * 0.333) + { + if (aimDir == -1) + itemRectangle.X -= (int) ((double) itemRectangle.Width * 1.4 - (double) itemRectangle.Width); + itemRectangle.Width = (int) ((double) itemRectangle.Width * 1.4); + itemRectangle.Y += (int) ((double) itemRectangle.Height * 0.5); + itemRectangle.Height = (int) ((double) itemRectangle.Height * 1.1); + } + else + { + if ((double) swingCurrent < (double) swingMax * 0.666) + return; + if (aimDir == 1) + itemRectangle.X -= (int) ((double) itemRectangle.Width * 1.2); + itemRectangle.Width *= 2; + itemRectangle.Y -= (int) ((double) itemRectangle.Height * 1.4 - (double) itemRectangle.Height); + itemRectangle.Height = (int) ((double) itemRectangle.Height * 1.4); + } + } + + public bool UsesPartyHat() + { + if (this.type == 441 || this.type == 37 || this.type == 633) + return false; + if (this.ForcePartyHatOn) + return true; + return !this.IsABestiaryIconDummy && this.frame.Height > 0 && this.townNPC && BirthdayParty.PartyIsUp; + } + + public PartyHatColor GetPartyHatColor() + { + if (!this.UsesPartyHat() || string.IsNullOrEmpty(this.GivenOrTypeName)) + return PartyHatColor.None; + int num1 = this.GivenOrTypeName.Length + (int) this.GivenOrTypeName[0]; + int moonPhase = Main.moonPhase; + if (Main.dayTime) + --moonPhase; + int num2 = num1 + this.whoAmI + moonPhase * (this.whoAmI % 2 == 0).ToDirectionInt(); + if (num2 < 0) + num2 += 5; + int num3 = num2 % 5; + if (num3 == 0) + ++num3; + return (PartyHatColor) num3; + } + + public void SetFrameSize() + { + Main.instance.LoadNPC(this.type); + if (!this.setFrameSize) + return; + this.frame = new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Npc[this.type].Width(), TextureAssets.Npc[this.type].Height() / Main.npcFrameCount[this.type]); + this.setFrameSize = false; + } + + public void FindFrame() + { + this.position = this.position + this.netOffset; + int num1 = 1; + if (!Main.dedServ) + { + if (!TextureAssets.Npc[this.type].IsLoaded) + return; + num1 = TextureAssets.Npc[this.type].Height() / Main.npcFrameCount[this.type]; + } + int num2 = 0; + if (this.aiAction == 0) + num2 = (double) this.velocity.Y >= 0.0 ? ((double) this.velocity.Y <= 0.0 ? ((double) this.velocity.X == 0.0 ? 0 : 1) : 3) : 2; + else if (this.aiAction == 1) + num2 = 4; + switch (this.type) + { + case 1: + case 16: + case 59: + case 71: + case 81: + case 138: + case 147: + case 183: + case 184: + case 204: + case 225: + case 302: + case 304: + case 333: + case 334: + case 335: + case 336: + case 535: + case 537: + case 658: + case 659: + if (this.type == 302 || this.type == 304) + this.spriteDirection = this.direction; + ++this.frameCounter; + if (num2 > 0) + ++this.frameCounter; + if (num2 == 4) + ++this.frameCounter; + if (this.frameCounter >= 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + case 2: + case 23: + case 121: + case 169: + case 190: + case 191: + case 192: + case 193: + case 194: + case 317: + case 318: + case 660: + if (this.type == 23) + { + int index = Dust.NewDust(new Vector2(this.position.X - this.velocity.X, this.position.Y - this.velocity.Y), this.width, this.height, 6, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 100, Scale: 2f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity.X *= 0.3f; + Main.dust[index].velocity.Y *= 0.3f; + } + if ((this.type == 121 || this.type == 660) && (double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + this.frame.Y = num1 * 2; + } + if (this.type == 2 || this.type == 190 || this.type == 191 || this.type == 192 || this.type == 193 || this.type == 194 || this.type == 317 || this.type == 318) + { + if ((double) this.velocity.X > 0.0) + { + this.spriteDirection = 1; + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X); + } + if ((double) this.velocity.X < 0.0) + { + this.spriteDirection = -1; + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 3.14f; + } + } + else if (this.type == 2 || this.type == 121 || this.type == 660) + { + if ((double) this.velocity.X > 0.0) + this.spriteDirection = 1; + if ((double) this.velocity.X < 0.0) + this.spriteDirection = -1; + this.rotation = this.velocity.X * 0.1f; + } + ++this.frameCounter; + float num3 = 8f; + if (this.type == 660) + num3 = 6f; + if (this.frameCounter >= (double) num3) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + case 3: + case 52: + case 53: + case 132: + case 161: + case 186: + case 187: + case 188: + case 189: + case 200: + case 223: + case 251: + case 254: + case (int) byte.MaxValue: + case 319: + case 320: + case 321: + case 331: + case 332: + case 342: + case 536: + case 590: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + } + if ((double) this.velocity.Y != 0.0 || this.direction == -1 && (double) this.velocity.X > 0.0 || this.direction == 1 && (double) this.velocity.X < 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 2; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter < 8.0) + { + this.frame.Y = 0; + break; + } + if (this.frameCounter < 16.0) + { + this.frame.Y = num1; + break; + } + if (this.frameCounter < 24.0) + { + this.frame.Y = num1 * 2; + break; + } + if (this.frameCounter < 32.0) + { + this.frame.Y = num1; + break; + } + this.frameCounter = 0.0; + break; + case 4: + case 125: + case 126: + ++this.frameCounter; + if (this.frameCounter < 7.0) + this.frame.Y = 0; + else if (this.frameCounter < 14.0) + this.frame.Y = num1; + else if (this.frameCounter < 21.0) + { + this.frame.Y = num1 * 2; + } + else + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + if ((double) this.ai[0] > 1.0) + { + this.frame.Y += num1 * 3; + break; + } + break; + case 5: + ++this.frameCounter; + if (this.frameCounter >= 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + case 6: + case 173: + ++this.frameCounter; + if (this.frameCounter >= 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 26: + case 27: + case 28: + case 31: + case 37: + case 38: + case 44: + case 54: + case 73: + case 77: + case 78: + case 79: + case 80: + case 104: + case 107: + case 108: + case 120: + case 124: + case 140: + case 142: + case 159: + case 160: + case 162: + case 167: + case 178: + case 181: + case 185: + case 196: + case 197: + case 198: + case 201: + case 202: + case 203: + case 207: + case 208: + case 209: + case 212: + case 213: + case 227: + case 228: + case 229: + case 287: + case 294: + case 295: + case 296: + case 310: + case 311: + case 312: + case 313: + case 314: + case 322: + case 323: + case 324: + case 326: + case 338: + case 339: + case 340: + case 353: + case 368: + case 369: + case 441: + case 453: + case 460: + case 462: + case 463: + case 489: + case 534: + case 550: + case 588: + case 630: + case 632: + case 633: + case 635: + case 637: + case 638: + case 656: + int num4 = this.isLikeATownNPC ? NPCID.Sets.ExtraFramesCount[this.type] : 0; + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + int num5 = Main.npcFrameCount[this.type] - NPCID.Sets.AttackFrameCount[this.type]; + if ((double) this.ai[0] >= 20.0 && (double) this.ai[0] <= 22.0) + { + int num6 = this.frame.Y / num1; + switch (this.ai[0]) + { + case 20f: + if (this.type == 656) + { + if ((double) this.ai[1] > 30.0 && (num6 < 7 || num6 > 9)) + num6 = 7; + if (num6 > 0) + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + ++num6; + if (num6 > 8 && (double) this.ai[1] > 30.0) + num6 = 8; + if (num6 > 9) + num6 = 0; + } + } + if (this.type == 637) + { + if ((double) this.ai[1] > 30.0 && (num6 < 10 || num6 > 16)) + num6 = 10; + if (num6 > 0) + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + ++num6; + if (num6 > 13 && (double) this.ai[1] > 30.0) + num6 = 13; + if (num6 > 16) + num6 = 0; + } + } + if (this.type == 638) + { + if ((double) this.ai[1] > 30.0 && (num6 < 23 || num6 > 27)) + num6 = 23; + if (num6 > 0) + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + ++num6; + if (num6 > 26 && (double) this.ai[1] > 30.0) + num6 = 24; + if (num6 > 27) + { + num6 = 0; + break; + } + break; + } + break; + } + break; + case 21f: + if (this.type == 656) + { + if ((double) this.ai[1] > 30.0 && (num6 < 10 || num6 > 16)) + num6 = 10; + if (num6 > 0) + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + ++num6; + if (num6 > 13 && (double) this.ai[1] > 30.0) + num6 = 13; + if (num6 > 16) + num6 = 0; + } + } + if (this.type == 637) + { + if ((double) this.ai[1] > 30.0 && (num6 < 17 || num6 > 21)) + num6 = 17; + if (num6 > 0) + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + ++num6; + if (num6 > 19 && (double) this.ai[1] > 30.0) + num6 = 19; + if (num6 > 21) + num6 = 0; + } + } + if (this.type == 638) + { + if ((double) this.ai[1] > 30.0 && (num6 < 17 || num6 > 22)) + num6 = 17; + if (num6 > 0) + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + ++num6; + if (num6 > 21 && (double) this.ai[1] > 30.0) + num6 = 18; + if (num6 > 22) + { + num6 = 0; + break; + } + break; + } + break; + } + break; + case 22f: + if (this.type == 656) + { + int num7 = Main.npcFrameCount[this.type]; + if ((double) this.ai[1] > 40.0 && (num6 < 17 || num6 >= num7)) + num6 = 17; + if (num6 > 0) + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + ++num6; + if (num6 > 20 && (double) this.ai[1] > 40.0) + num6 = 19; + if (num6 >= num7) + num6 = 0; + } + } + if (this.type == 637) + { + if ((double) this.ai[1] > 30.0 && (num6 < 17 || num6 > 27)) + num6 = 17; + if (num6 > 0) + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + ++num6; + if (num6 > 27) + { + num6 = (double) this.ai[1] > 30.0 ? 22 : 20; + break; + } + if ((double) this.ai[1] <= 30.0 && num6 == 22) + { + num6 = 0; + break; + } + if ((double) this.ai[1] > 30.0 && num6 > 19 && num6 < 22) + { + num6 = 22; + break; + } + break; + } + break; + } + break; + } + this.frame.Y = num6 * num1; + break; + } + if ((double) this.ai[0] == 2.0) + { + ++this.frameCounter; + if (this.frame.Y / num1 == num5 - 1 && this.frameCounter >= 5.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + if (this.frame.Y / num1 == 0 && this.frameCounter >= 40.0) + { + this.frame.Y = num1 * (num5 - 1); + this.frameCounter = 0.0; + break; + } + if (this.frame.Y != 0 && this.frame.Y != num1 * (num5 - 1)) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + break; + } + if ((double) this.ai[0] == 11.0) + { + ++this.frameCounter; + if (this.frame.Y / num1 == num5 - 1 && this.frameCounter >= 50.0) + { + if (this.frameCounter == 50.0) + { + int num8 = Main.rand.Next(4); + for (int index1 = 0; index1 < 3 + num8; ++index1) + { + int index2 = Dust.NewDust(this.Center + Vector2.UnitX * (float) -this.direction * 8f - Vector2.One * 5f + Vector2.UnitY * 8f, 3, 6, 216, (float) -this.direction, 1f); + Main.dust[index2].velocity /= 2f; + Main.dust[index2].scale = 0.8f; + } + if (Main.rand.Next(30) == 0) + { + int index = Gore.NewGore(this.Center + Vector2.UnitX * (float) -this.direction * 8f, Vector2.Zero, Main.rand.Next(580, 583)); + Main.gore[index].velocity /= 2f; + Main.gore[index].velocity.Y = Math.Abs(Main.gore[index].velocity.Y); + Main.gore[index].velocity.X = -Math.Abs(Main.gore[index].velocity.X) * (float) this.direction; + } + } + if (this.frameCounter >= 100.0 && Main.rand.Next(20) == 0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + break; + } + if (this.frame.Y / num1 == 0 && this.frameCounter >= 20.0) + { + this.frame.Y = num1 * (num5 - 1); + this.frameCounter = 0.0; + if (Main.netMode != 1) + { + EmoteBubble.NewBubble(89, new WorldUIAnchor((Entity) this), 90); + break; + } + break; + } + if (this.frame.Y != 0 && this.frame.Y != num1 * (num5 - 1)) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + break; + } + if ((double) this.ai[0] == 5.0) + { + this.frame.Y = num1 * (num5 - 3); + if (this.type == 637) + this.frame.Y = num1 * 19; + this.frameCounter = 0.0; + break; + } + if ((double) this.ai[0] == 6.0) + { + ++this.frameCounter; + int num9 = this.frame.Y / num1; + switch (num5 - num9) + { + case 1: + case 2: + case 4: + case 5: + int num10 = this.frameCounter >= 10.0 ? (this.frameCounter >= 16.0 ? (this.frameCounter >= 46.0 ? (this.frameCounter >= 60.0 ? (this.frameCounter >= 66.0 ? (this.frameCounter >= 72.0 ? (this.frameCounter >= 102.0 ? (this.frameCounter >= 108.0 ? (this.frameCounter >= 114.0 ? (this.frameCounter >= 120.0 ? (this.frameCounter >= 150.0 ? (this.frameCounter >= 156.0 ? (this.frameCounter >= 162.0 ? (this.frameCounter >= 168.0 ? (this.frameCounter >= 198.0 ? (this.frameCounter >= 204.0 ? (this.frameCounter >= 210.0 ? (this.frameCounter >= 216.0 ? (this.frameCounter >= 246.0 ? (this.frameCounter >= 252.0 ? (this.frameCounter >= 258.0 ? (this.frameCounter >= 264.0 ? (this.frameCounter >= 294.0 ? (this.frameCounter >= 300.0 ? 0 : num5 - 5) : num5 - 4) : num5 - 5) : 0) : num5 - 5) : num5 - 4) : num5 - 5) : 0) : num5 - 5) : num5 - 4) : num5 - 5) : 0) : num5 - 5) : num5 - 4) : num5 - 5) : 0) : num5 - 5) : num5 - 4) : num5 - 5) : 0) : num5 - 5) : num5 - 4) : num5 - 5) : 0; + if (num10 == num5 - 4 && num9 == num5 - 5) + { + Vector2 Position = this.Center + new Vector2((float) (10 * this.direction), -4f); + for (int index3 = 0; index3 < 8; ++index3) + { + int Type = Main.rand.Next(139, 143); + int index4 = Dust.NewDust(Position, 0, 0, Type, this.velocity.X + (float) this.direction, this.velocity.Y - 2.5f, Scale: 1.2f); + Main.dust[index4].velocity.X += (float) this.direction * 1.5f; + Main.dust[index4].position -= new Vector2(4f); + Main.dust[index4].velocity *= 2f; + Main.dust[index4].scale = (float) (0.699999988079071 + (double) Main.rand.NextFloat() * 0.300000011920929); + } + } + this.frame.Y = num1 * num10; + if (this.frameCounter >= 300.0) + { + this.frameCounter = 0.0; + break; + } + break; + default: + if (num9 != 0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + goto case 1; + } + else + goto case 1; + } + } + else if (((double) this.ai[0] == 7.0 || (double) this.ai[0] == 19.0) && !NPCID.Sets.IsTownPet[this.type]) + { + ++this.frameCounter; + int num11 = this.frame.Y / num1; + switch (num5 - num11) + { + case 1: + case 2: + case 4: + case 5: + int num12 = 0; + if (this.frameCounter < 16.0) + num12 = 0; + else if (this.frameCounter == 16.0 && Main.netMode != 1) + EmoteBubble.NewBubbleNPC(new WorldUIAnchor((Entity) this), 112); + else if (this.frameCounter < 128.0) + num12 = this.frameCounter % 16.0 < 8.0 ? num5 - 2 : 0; + else if (this.frameCounter < 160.0) + num12 = 0; + else if (this.frameCounter == 160.0 && Main.netMode != 1) + EmoteBubble.NewBubbleNPC(new WorldUIAnchor((Entity) this), 60); + else + num12 = this.frameCounter >= 220.0 ? 0 : (this.frameCounter % 12.0 < 6.0 ? num5 - 2 : 0); + this.frame.Y = num1 * num12; + if (this.frameCounter >= 220.0) + { + this.frameCounter = 0.0; + break; + } + break; + default: + if (num11 != 0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + goto case 1; + } + else + goto case 1; + } + } + else if ((double) this.ai[0] == 9.0) + { + ++this.frameCounter; + int num13 = this.frame.Y / num1; + switch (num5 - num13) + { + case 1: + case 2: + case 4: + case 5: + int num14 = this.frameCounter >= 10.0 ? (this.frameCounter >= 16.0 ? num5 - 4 : num5 - 5) : 0; + if ((double) this.ai[1] < 16.0) + num14 = num5 - 5; + if ((double) this.ai[1] < 10.0) + num14 = 0; + this.frame.Y = num1 * num14; + break; + default: + if (num13 != 0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + goto case 1; + } + else + goto case 1; + } + } + else if ((double) this.ai[0] == 18.0) + { + ++this.frameCounter; + int num15 = this.frame.Y / num1; + switch (num5 - num15) + { + case 1: + case 2: + case 4: + case 5: + int num16 = 0; + num16 = this.frameCounter >= 10.0 ? (this.frameCounter >= 16.0 ? num5 - 2 : num5 - 1) : 0; + if ((double) this.ai[1] < 16.0) + num16 = num5 - 1; + if ((double) this.ai[1] < 10.0) + num16 = 0; + int num17 = Main.npcFrameCount[this.type] - 2; + this.frame.Y = num1 * num17; + break; + default: + if (num15 != 0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + goto case 1; + } + else + goto case 1; + } + } + else + { + if ((double) this.ai[0] == 10.0 || (double) this.ai[0] == 13.0) + { + ++this.frameCounter; + int num18 = this.frame.Y / num1; + if ((uint) (num18 - num5) > 3U && num18 != 0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + } + int num19 = 10; + int num20 = 6; + if (this.type == 633) + { + num19 = 0; + num20 = 2; + } + int num21 = this.frameCounter >= (double) num19 ? (this.frameCounter >= (double) (num19 + num20) ? (this.frameCounter >= (double) (num19 + num20 * 2) ? (this.frameCounter >= (double) (num19 + num20 * 3) ? (this.frameCounter >= (double) (num19 + num20 * 4) ? 0 : num5 + 3) : num5 + 2) : num5 + 1) : num5) : 0; + this.frame.Y = num1 * num21; + break; + } + if ((double) this.ai[0] == 15.0) + { + ++this.frameCounter; + int num22 = this.frame.Y / num1; + if ((uint) (num22 - num5) > 3U && num22 != 0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + } + float num23 = this.ai[1] / (float) NPCID.Sets.AttackTime[this.type]; + int num24 = (double) num23 <= 0.649999976158142 ? ((double) num23 <= 0.5 ? ((double) num23 <= 0.349999994039536 ? ((double) num23 <= 0.0 ? 0 : num5 + 3) : num5 + 2) : num5 + 1) : num5; + this.frame.Y = num1 * num24; + break; + } + if ((double) this.ai[0] == 12.0) + { + ++this.frameCounter; + int num25 = this.frame.Y / num1; + if ((uint) (num25 - num5) > 4U && num25 != 0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + } + int num26 = num5 + this.GetShootingFrame(this.ai[2]); + this.frame.Y = num1 * num26; + break; + } + if ((double) this.ai[0] == 14.0) + { + ++this.frameCounter; + int num27 = this.frame.Y / num1; + if ((uint) (num27 - num5) > 1U && num27 != 0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + } + int num28 = 12; + int num29 = this.frameCounter % (double) num28 * 2.0 < (double) num28 ? num5 : num5 + 1; + this.frame.Y = num1 * num29; + break; + } + if (this.CanTalk && ((double) this.ai[0] == 3.0 || (double) this.ai[0] == 4.0)) + { + ++this.frameCounter; + int num30 = this.frame.Y / num1; + switch (num5 - num30) + { + case 1: + case 2: + case 4: + case 5: + bool flag = (double) this.ai[0] == 3.0; + int num31 = 0; + int num32 = 0; + int time1 = -1; + int time2 = -1; + if (this.frameCounter < 10.0) + num31 = 0; + else if (this.frameCounter < 16.0) + num31 = num5 - 5; + else if (this.frameCounter < 46.0) + num31 = num5 - 4; + else if (this.frameCounter < 60.0) + num31 = num5 - 5; + else if (this.frameCounter < 216.0) + num31 = 0; + else if (this.frameCounter == 216.0 && Main.netMode != 1) + time1 = 70; + else if (this.frameCounter < 286.0) + num31 = this.frameCounter % 12.0 < 6.0 ? num5 - 2 : 0; + else if (this.frameCounter < 320.0) + num31 = 0; + else if (this.frameCounter == 320.0 && Main.netMode != 1) + time1 = 100; + else + num31 = this.frameCounter >= 420.0 ? 0 : (this.frameCounter % 16.0 < 8.0 ? num5 - 2 : 0); + if (this.frameCounter < 70.0) + num32 = 0; + else if (this.frameCounter == 70.0 && Main.netMode != 1) + time2 = 90; + else + num32 = this.frameCounter >= 160.0 ? (this.frameCounter >= 166.0 ? (this.frameCounter >= 186.0 ? (this.frameCounter >= 200.0 ? (this.frameCounter >= 320.0 ? (this.frameCounter >= 326.0 ? 0 : num5 - 1) : 0) : num5 - 5) : num5 - 4) : num5 - 5) : (this.frameCounter % 16.0 < 8.0 ? num5 - 2 : 0); + if (flag) + { + NPC npc = Main.npc[(int) this.ai[2]]; + if (time1 != -1) + EmoteBubble.NewBubbleNPC(new WorldUIAnchor((Entity) this), time1, new WorldUIAnchor((Entity) npc)); + if (time2 != -1 && npc.CanTalk) + EmoteBubble.NewBubbleNPC(new WorldUIAnchor((Entity) npc), time2, new WorldUIAnchor((Entity) this)); + } + this.frame.Y = num1 * (flag ? num31 : num32); + if (this.frameCounter >= 420.0) + { + this.frameCounter = 0.0; + break; + } + break; + default: + if (num30 != 0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + goto case 1; + } + else + goto case 1; + } + } + else if (this.CanTalk && ((double) this.ai[0] == 16.0 || (double) this.ai[0] == 17.0)) + { + ++this.frameCounter; + int num33 = this.frame.Y / num1; + switch (num5 - num33) + { + case 1: + case 2: + case 4: + case 5: + bool flag = (double) this.ai[0] == 16.0; + int num34 = 0; + int time = -1; + if (this.frameCounter < 10.0) + num34 = 0; + else if (this.frameCounter < 16.0) + num34 = num5 - 5; + else if (this.frameCounter < 22.0) + num34 = num5 - 4; + else if (this.frameCounter < 28.0) + num34 = num5 - 5; + else if (this.frameCounter < 34.0) + num34 = num5 - 4; + else if (this.frameCounter < 40.0) + num34 = num5 - 5; + else if (this.frameCounter == 40.0 && Main.netMode != 1) + time = 45; + else if (this.frameCounter < 70.0) + num34 = num5 - 4; + else if (this.frameCounter < 76.0) + num34 = num5 - 5; + else if (this.frameCounter < 82.0) + num34 = num5 - 4; + else if (this.frameCounter < 88.0) + num34 = num5 - 5; + else if (this.frameCounter < 94.0) + num34 = num5 - 4; + else if (this.frameCounter < 100.0) + num34 = num5 - 5; + else if (this.frameCounter == 100.0 && Main.netMode != 1) + time = 45; + else if (this.frameCounter < 130.0) + num34 = num5 - 4; + else if (this.frameCounter < 136.0) + num34 = num5 - 5; + else if (this.frameCounter < 142.0) + num34 = num5 - 4; + else if (this.frameCounter < 148.0) + num34 = num5 - 5; + else if (this.frameCounter < 154.0) + num34 = num5 - 4; + else if (this.frameCounter < 160.0) + num34 = num5 - 5; + else if (this.frameCounter == 160.0 && Main.netMode != 1) + time = 75; + else + num34 = this.frameCounter >= 220.0 ? (this.frameCounter >= 226.0 ? 0 : num5 - 5) : num5 - 4; + if (flag && time != -1) + { + int num35 = (int) this.localAI[2]; + int num36 = (int) this.localAI[3]; + int num37 = (int) Main.npc[(int) this.ai[2]].localAI[3]; + int num38 = (int) Main.npc[(int) this.ai[2]].localAI[2]; + int num39 = 3 - num35 - num36; + int num40 = 0; + if (this.frameCounter == 40.0) + num40 = 1; + if (this.frameCounter == 100.0) + num40 = 2; + if (this.frameCounter == 160.0) + num40 = 3; + int num41 = 3 - num40; + int num42 = -1; + int num43 = 0; + while (num42 < 0 && ++num43 < 100) + { + num42 = Main.rand.Next(2); + if (num42 == 0 && num38 >= num36) + num42 = -1; + if (num42 == 1 && num37 >= num35) + num42 = -1; + if (num42 == -1 && num41 <= num39) + num42 = 2; + } + if (num42 == 0) + { + ++Main.npc[(int) this.ai[2]].localAI[3]; + ++num37; + } + if (num42 == 1) + { + ++Main.npc[(int) this.ai[2]].localAI[2]; + ++num38; + } + int emoticon1 = Utils.SelectRandom(Main.rand, 38, 37, 36); + int emoticon2 = emoticon1; + if (num42 == 0) + { + switch (emoticon1) + { + case 36: + emoticon2 = 38; + break; + case 37: + emoticon2 = 36; + break; + case 38: + emoticon2 = 37; + break; + } + } + else if (num42 == 1) + { + switch (emoticon1) + { + case 36: + emoticon2 = 37; + break; + case 37: + emoticon2 = 38; + break; + case 38: + emoticon2 = 36; + break; + } + } + if (num41 == 0) + { + if (num37 >= 2) + emoticon1 -= 3; + if (num38 >= 2) + emoticon2 -= 3; + } + EmoteBubble.NewBubble(emoticon1, new WorldUIAnchor((Entity) this), time); + EmoteBubble.NewBubble(emoticon2, new WorldUIAnchor((Entity) Main.npc[(int) this.ai[2]]), time); + } + this.frame.Y = num1 * (flag ? num34 : num34); + if (this.frameCounter >= 420.0) + { + this.frameCounter = 0.0; + break; + } + break; + default: + if (num33 != 0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + goto case 1; + } + else + goto case 1; + } + } + else + { + if ((double) this.velocity.X == 0.0) + { + if (this.type == 638) + { + int num44 = this.frame.Y / num1; + if (num44 > 7) + num44 = 0; + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + ++num44; + if (num44 > 7) + num44 = 0; + } + this.frame.Y = num44 * num1; + break; + } + if (this.type == 140 || this.type == 489) + { + this.frame.Y = num1; + this.frameCounter = 0.0; + break; + } + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + int num45 = 6; + if (this.type == 632) + num45 = 12; + if (this.type == 534) + num45 = 12; + if (this.type == 638) + num45 = 12; + if (this.type == 656) + num45 = 12; + if (this.type == 489) + { + num45 = 8; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.0; + this.frameCounter += 0.5; + } + else + { + this.frameCounter += (double) Math.Abs(this.velocity.X) * 2.0; + ++this.frameCounter; + } + if (this.type == 462) + num45 = 9; + int num46 = num1 * 2; + if (this.type == 638) + num46 = num1 * 9; + if (this.type == 656) + num46 = num1; + if (this.frame.Y < num46) + this.frame.Y = num46; + if (this.frameCounter > (double) num45) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type] - num4) + { + this.frame.Y = num46; + break; + } + break; + } + } + } + else + { + if (this.type == 462) + { + this.frameCounter = 0.0; + this.frame.Y = (double) this.velocity.Y >= 0.0 ? num1 * 2 : num1; + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1; + if (this.type == 489 || this.type == 21 || this.type == 31 || this.type == 294 || this.type == 326 || this.type == 295 || this.type == 296 || this.type == 44 || this.type == 77 || this.type == 120 || this.type == 140 || this.type == 159 || this.type == 167 || this.type == 197 || this.type == 201 || this.type == 202) + this.frame.Y = 0; + if (this.type == 638) + { + this.frame.Y = num1 * 8; + break; + } + break; + } + break; + case 24: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + } + if ((double) this.ai[1] > 0.0) + { + if (this.frame.Y < 4) + this.frameCounter = 0.0; + ++this.frameCounter; + if (this.frameCounter <= 4.0) + { + this.frame.Y = num1 * 4; + break; + } + if (this.frameCounter <= 8.0) + { + this.frame.Y = num1 * 5; + break; + } + if (this.frameCounter <= 12.0) + { + this.frame.Y = num1 * 6; + break; + } + if (this.frameCounter <= 16.0) + { + this.frame.Y = num1 * 7; + break; + } + if (this.frameCounter <= 20.0) + { + this.frame.Y = num1 * 8; + break; + } + this.frame.Y = num1 * 9; + this.frameCounter = 100.0; + break; + } + ++this.frameCounter; + if (this.frameCounter <= 4.0) + { + this.frame.Y = 0; + break; + } + if (this.frameCounter <= 8.0) + { + this.frame.Y = num1; + break; + } + if (this.frameCounter <= 12.0) + { + this.frame.Y = num1 * 2; + break; + } + this.frame.Y = num1 * 3; + if (this.frameCounter >= 16.0) + { + this.frameCounter = 0.0; + break; + } + break; + case 29: + case 32: + case 45: + case 172: + case 281: + case 282: + case 283: + case 284: + case 285: + case 286: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + } + this.frame.Y = 0; + if ((double) this.velocity.Y != 0.0) + { + this.frame.Y += num1 * 2; + break; + } + if ((double) this.ai[1] > 0.0) + { + this.frame.Y += num1; + break; + } + break; + case 34: + ++this.frameCounter; + if (this.frameCounter >= 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + case 42: + case 231: + case 232: + case 233: + case 234: + case 235: + ++this.frameCounter; + if (this.frameCounter < 2.0) + { + this.frame.Y = 0; + break; + } + if (this.frameCounter < 4.0) + { + this.frame.Y = num1; + break; + } + if (this.frameCounter < 6.0) + { + this.frame.Y = num1 * 2; + break; + } + if (this.frameCounter < 8.0) + { + this.frame.Y = num1; + break; + } + this.frameCounter = 0.0; + break; + case 43: + case 56: + case 175: + ++this.frameCounter; + if (this.frameCounter < 6.0) + this.frame.Y = 0; + else if (this.frameCounter < 12.0) + this.frame.Y = num1; + else if (this.frameCounter < 18.0) + this.frame.Y = num1 * 2; + else if (this.frameCounter < 24.0) + this.frame.Y = num1; + if (this.frameCounter == 23.0) + { + this.frameCounter = 0.0; + break; + } + break; + case 46: + case 47: + case 303: + case 337: + case 443: + case 464: + case 540: + case 614: + case 646: + case 647: + case 648: + case 649: + case 650: + case 651: + case 652: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.0; + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + if ((double) this.velocity.Y < 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 4; + break; + } + if ((double) this.velocity.Y > 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 6; + break; + } + break; + case 48: + case 49: + case 51: + case 60: + case 82: + case 93: + case 137: + case 182: + case 210: + case 211: + case 253: + case 316: + case 634: + case 662: + if (this.type == 60) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 100, Scale: 2f); + Main.dust[index].noGravity = true; + } + if (this.type == 634 && Main.rand.Next(10) == 0) + { + int index = Dust.NewDust(this.position, this.width, this.height, 165, this.velocity.X, this.velocity.Y, 50); + Main.dust[index].velocity *= 0.1f; + Main.dust[index].noGravity = true; + } + if ((double) this.velocity.X > 0.0) + this.spriteDirection = 1; + if ((double) this.velocity.X < 0.0) + this.spriteDirection = -1; + this.rotation = this.velocity.X * 0.1f; + if (this.type == 210 || this.type == 211) + { + ++this.frameCounter; + this.rotation = this.velocity.X * 0.2f; + } + ++this.frameCounter; + int num47 = 6; + int num48 = Main.npcFrameCount[this.type]; + if (this.type == 49 || this.type == 51 || this.type == 60 || this.type == 634) + --num48; + if (this.type == 48) + num47 = 5; + if (this.frameCounter >= (double) num47) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * num48) + { + this.frame.Y = 0; + break; + } + break; + case 50: + if ((double) this.velocity.Y != 0.0) + { + if (this.frame.Y < num1 * 4) + { + this.frame.Y = num1 * 4; + this.frameCounter = 0.0; + } + if (++this.frameCounter >= 4.0) + { + this.frame.Y = num1 * 5; + break; + } + break; + } + if (this.frame.Y >= num1 * 5) + { + this.frame.Y = num1 * 4; + this.frameCounter = 0.0; + } + ++this.frameCounter; + if (num2 > 0) + ++this.frameCounter; + if (num2 == 4) + ++this.frameCounter; + if (this.frameCounter >= 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + if (this.frame.Y >= num1 * 4) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 55: + case 57: + case 58: + case 102: + case 241: + case 465: + case 592: + case 607: + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.wet) + { + if (this.frameCounter < 6.0) + { + this.frame.Y = 0; + break; + } + if (this.frameCounter < 12.0) + { + this.frame.Y = num1; + break; + } + if (this.frameCounter < 18.0) + { + this.frame.Y = num1 * 2; + break; + } + if (this.frameCounter < 24.0) + { + this.frame.Y = num1 * 3; + break; + } + this.frameCounter = 0.0; + break; + } + if (this.frameCounter < 6.0) + { + this.frame.Y = num1 * 4; + break; + } + if (this.frameCounter < 12.0) + { + this.frame.Y = num1 * 5; + break; + } + this.frameCounter = 0.0; + break; + case 61: + this.spriteDirection = this.direction; + this.rotation = this.velocity.X * 0.1f; + if ((double) this.velocity.X == 0.0 && (double) this.velocity.Y == 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + int num49 = 5; + int num50 = 5; + ++this.frameCounter; + if (this.frameCounter >= (double) (num49 * num50)) + this.frameCounter = 0.0; + this.frame.Y = ((int) (this.frameCounter / (double) num49) + 1) * num1; + break; + case 62: + case 66: + this.spriteDirection = this.direction; + this.rotation = this.velocity.X * 0.1f; + int num51 = 5; + int num52 = 5; + ++this.frameCounter; + if (this.frameCounter >= (double) (num51 * num52)) + this.frameCounter = 0.0; + this.frame.Y = (int) (this.frameCounter / (double) num51) * num1; + break; + case 63: + case 64: + case 103: + case 242: + case 256: + if ((this.type == 63 || this.type == 64 || this.type == 103 || this.type == 242) && (double) this.ai[1] == 1.0) + { + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y > num1 * 6) + this.frame.Y = num1 * 4; + if (this.frame.Y >= num1 * 4) + return; + this.frame.Y = num1 * 4; + return; + } + ++this.frameCounter; + if (this.frameCounter < 6.0) + { + this.frame.Y = 0; + break; + } + if (this.frameCounter < 12.0) + { + this.frame.Y = num1; + break; + } + if (this.frameCounter < 18.0) + { + this.frame.Y = num1 * 2; + break; + } + this.frame.Y = num1 * 3; + if (this.frameCounter >= 23.0) + { + this.frameCounter = 0.0; + break; + } + break; + case 65: + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.wet && this.type == 65) + { + if (this.frameCounter < 6.0) + { + this.frame.Y = 0; + break; + } + if (this.frameCounter < 12.0) + { + this.frame.Y = num1; + break; + } + if (this.frameCounter < 18.0) + { + this.frame.Y = num1 * 2; + break; + } + if (this.frameCounter < 24.0) + { + this.frame.Y = num1 * 3; + break; + } + this.frameCounter = 0.0; + break; + } + break; + case 67: + case 217: + case 218: + case 219: + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.frameCounter >= 6.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 69: + if ((double) this.ai[0] < 190.0) + { + ++this.frameCounter; + if (this.frameCounter >= 6.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type] - 1) + { + this.frame.Y = 0; + break; + } + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1 * (Main.npcFrameCount[this.type] - 1); + break; + case 72: + ++this.frameCounter; + if (this.frameCounter >= 3.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 74: + case 297: + case 298: + case 442: + this.spriteDirection = this.direction; + this.rotation = this.velocity.X * 0.1f; + if ((double) this.velocity.X == 0.0 && (double) this.velocity.Y == 0.0) + { + this.frame.Y = num1 * 4; + this.frameCounter = 0.0; + break; + } + int num53 = Main.npcFrameCount[this.type] - 1; + ++this.frameCounter; + if (this.frameCounter >= 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * num53) + { + this.frame.Y = 0; + break; + } + break; + case 75: + this.spriteDirection = (double) this.velocity.X <= 0.0 ? -1 : 1; + this.rotation = this.velocity.X * 0.1f; + ++this.frameCounter; + if (this.frameCounter >= 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + case 83: + case 84: + case 179: + if ((double) this.ai[0] == 2.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + ++this.frameCounter; + if (this.frameCounter >= 4.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 85: + case 341: + case 629: + if ((double) this.ai[0] == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + else + { + int num54 = 3; + if ((double) this.velocity.Y == 0.0) + --this.frameCounter; + else + ++this.frameCounter; + if (this.frameCounter < 0.0) + this.frameCounter = 0.0; + if (this.frameCounter > (double) (num54 * 4)) + this.frameCounter = (double) (num54 * 4); + if (this.frameCounter < (double) num54) + this.frame.Y = num1; + else if (this.frameCounter < (double) (num54 * 2)) + this.frame.Y = num1 * 2; + else if (this.frameCounter < (double) (num54 * 3)) + this.frame.Y = num1 * 3; + else if (this.frameCounter < (double) (num54 * 4)) + this.frame.Y = num1 * 4; + else if (this.frameCounter < (double) (num54 * 5)) + this.frame.Y = num1 * 5; + else if (this.frameCounter < (double) (num54 * 6)) + this.frame.Y = num1 * 4; + else if (this.frameCounter < (double) (num54 * 7)) + { + this.frame.Y = num1 * 3; + } + else + { + this.frame.Y = num1 * 2; + if (this.frameCounter >= (double) (num54 * 8)) + this.frameCounter = (double) num54; + } + } + if ((double) this.ai[3] == 2.0 || this.IsABestiaryIconDummy && this.type == 85) + { + this.frame.Y += num1 * 6; + break; + } + if ((double) this.ai[3] == 3.0) + { + this.frame.Y += num1 * 12; + break; + } + break; + case 86: + if ((double) this.velocity.Y == 0.0 || this.wet) + this.spriteDirection = (double) this.velocity.X >= -2.0 ? ((double) this.velocity.X <= 2.0 ? this.direction : 1) : -1; + if ((double) this.velocity.Y != 0.0) + { + this.frame.Y = num1 * 15; + this.frameCounter = 0.0; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + if ((double) Math.Abs(this.velocity.X) < 3.0) + { + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter >= 6.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= 9) + this.frame.Y = num1; + if (this.frame.Y / num1 <= 0) + { + this.frame.Y = num1; + break; + } + break; + } + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter >= 10.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= 15) + this.frame.Y = num1 * 9; + if (this.frame.Y / num1 <= 8) + { + this.frame.Y = num1 * 9; + break; + } + break; + } + break; + case 94: + ++this.frameCounter; + if (this.frameCounter < 6.0) + { + this.frame.Y = 0; + break; + } + if (this.frameCounter < 12.0) + { + this.frame.Y = num1; + break; + } + if (this.frameCounter < 18.0) + { + this.frame.Y = num1 * 2; + break; + } + this.frame.Y = num1; + if (this.frameCounter >= 23.0) + { + this.frameCounter = 0.0; + break; + } + break; + case 101: + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1 * 2; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1 * 2) + { + this.frame.Y = 0; + break; + } + break; + case 109: + if ((double) this.velocity.Y == 0.0 && ((double) this.velocity.X <= 0.0 && this.direction < 0 || (double) this.velocity.X >= 0.0 && this.direction > 0)) + this.spriteDirection = this.direction; + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter >= 7.0) + { + this.frameCounter -= 7.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 110: + case 214: + case 215: + case 216: + case 293: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.ai[2] > 0.0) + { + this.spriteDirection = this.direction; + this.frame.Y = num1 * (int) this.ai[2]; + this.frameCounter = 0.0; + break; + } + if (this.frame.Y < num1 * 6) + this.frame.Y = num1 * 6; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 2.0; + this.frameCounter += (double) this.velocity.X; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = num1 * 6; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + case 111: + case 291: + case 292: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.ai[2] > 0.0) + { + this.spriteDirection = this.direction; + this.frame.Y = num1 * ((int) this.ai[2] - 1); + this.frameCounter = 0.0; + break; + } + if (this.frame.Y < num1 * 7) + this.frame.Y = num1 * 7; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 2.0; + this.frameCounter += (double) this.velocity.X * 1.29999995231628; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = num1 * 7; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1 * 6; + break; + case 113: + case 114: + if ((double) this.ai[2] == 0.0) + { + ++this.frameCounter; + if (this.frameCounter >= 12.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + this.frame.Y = 0; + this.frameCounter = -60.0; + break; + case 115: + ++this.frameCounter; + if (this.frameCounter < 3.0) + this.frame.Y = 0; + else if (this.frameCounter < 6.0) + this.frame.Y = num1; + else if (this.frameCounter < 12.0) + this.frame.Y = num1 * 2; + else if (this.frameCounter < 15.0) + this.frame.Y = num1; + if (this.frameCounter == 15.0) + { + this.frameCounter = 0.0; + break; + } + break; + case 116: + if ((double) this.velocity.X > 0.0) + { + this.spriteDirection = 1; + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X); + } + if ((double) this.velocity.X < 0.0) + { + this.spriteDirection = -1; + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 3.14f; + } + ++this.frameCounter; + if (this.frameCounter >= 5.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + case 122: + this.spriteDirection = this.direction; + this.rotation = this.velocity.X * 0.05f; + if ((double) this.ai[3] > 0.0) + { + int num55 = (int) ((double) this.ai[3] / 8.0); + this.frameCounter = 0.0; + this.frame.Y = (num55 + 3) * num1; + break; + } + ++this.frameCounter; + if (this.frameCounter >= 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * 3) + { + this.frame.Y = 0; + break; + } + break; + case (int) sbyte.MaxValue: + if ((double) this.ai[1] == 0.0) + { + ++this.frameCounter; + if (this.frameCounter >= 12.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= 2) + { + this.frame.Y = 0; + break; + } + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1 * 2; + break; + case 129: + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.frameCounter >= 2.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 130: + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.frameCounter >= 8.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 133: + if ((double) this.velocity.X > 0.0) + { + this.spriteDirection = 1; + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X); + } + if ((double) this.velocity.X < 0.0) + { + this.spriteDirection = -1; + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 3.14f; + } + ++this.frameCounter; + this.frame.Y = this.frameCounter < 8.0 ? 0 : num1; + if (this.frameCounter >= 16.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + } + if ((double) this.life < (double) this.lifeMax * 0.5) + { + this.frame.Y += num1 * 2; + break; + } + break; + case 135: + this.frame.Y = (double) this.ai[2] != 0.0 ? num1 : 0; + break; + case 141: + this.spriteDirection = this.direction; + if ((double) this.velocity.Y != 0.0) + { + this.frame.Y = num1 * 2; + break; + } + ++this.frameCounter; + if (this.frameCounter >= 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1) + { + this.frame.Y = 0; + break; + } + break; + case 143: + if ((double) this.velocity.Y > 0.0) + ++this.frameCounter; + else if ((double) this.velocity.Y < 0.0) + --this.frameCounter; + if (this.frameCounter < 6.0) + this.frame.Y = num1; + else if (this.frameCounter < 12.0) + this.frame.Y = num1 * 2; + else if (this.frameCounter < 18.0) + this.frame.Y = num1 * 3; + if (this.frameCounter < 0.0) + this.frameCounter = 0.0; + if (this.frameCounter > 17.0) + { + this.frameCounter = 17.0; + break; + } + break; + case 144: + if ((double) this.velocity.X == 0.0 && (double) this.velocity.Y == 0.0) + { + ++this.localAI[3]; + if ((double) this.localAI[3] < 6.0) + this.frame.Y = 0; + else if ((double) this.localAI[3] < 12.0) + this.frame.Y = num1; + if ((double) this.localAI[3] >= 11.0) + { + this.localAI[3] = 0.0f; + break; + } + break; + } + if ((double) this.velocity.Y > 0.0) + ++this.frameCounter; + else if ((double) this.velocity.Y < 0.0) + --this.frameCounter; + if (this.frameCounter < 6.0) + this.frame.Y = num1 * 2; + else if (this.frameCounter < 12.0) + this.frame.Y = num1 * 3; + else if (this.frameCounter < 18.0) + this.frame.Y = num1 * 4; + if (this.frameCounter < 0.0) + this.frameCounter = 0.0; + if (this.frameCounter > 17.0) + { + this.frameCounter = 17.0; + break; + } + break; + case 145: + if ((double) this.velocity.X == 0.0 && (double) this.velocity.Y == 0.0) + { + if ((double) this.ai[2] < 4.0) + { + this.frame.Y = 0; + break; + } + if ((double) this.ai[2] < 8.0) + { + this.frame.Y = num1; + break; + } + if ((double) this.ai[2] < 12.0) + { + this.frame.Y = num1 * 2; + break; + } + if ((double) this.ai[2] < 16.0) + { + this.frame.Y = num1 * 3; + break; + } + break; + } + if ((double) this.velocity.Y > 0.0) + ++this.frameCounter; + else if ((double) this.velocity.Y < 0.0) + --this.frameCounter; + if (this.frameCounter < 6.0) + this.frame.Y = num1 * 4; + else if (this.frameCounter < 12.0) + this.frame.Y = num1 * 5; + else if (this.frameCounter < 18.0) + this.frame.Y = num1 * 6; + if (this.frameCounter < 0.0) + this.frameCounter = 0.0; + if (this.frameCounter > 17.0) + { + this.frameCounter = 17.0; + break; + } + break; + case 148: + case 149: + case 168: + case 470: + int num56 = 0; + if ((double) this.localAI[0] == 2.0) + num56 = 3; + if ((double) this.localAI[0] == 3.0) + num56 = 6; + if ((double) this.localAI[0] == 4.0) + num56 = 9; + int num57 = num56 * num1; + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = num57; + this.frameCounter = 0.0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.0; + if (this.frameCounter < 6.0) + { + this.frame.Y = num57; + break; + } + if (this.frameCounter < 12.0) + { + this.frame.Y = num1 + num57; + break; + } + if (this.frameCounter < 15.0) + { + this.frame.Y = num1 * 2 + num57; + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1 * 2 + num57; + break; + } + if ((double) this.velocity.Y < 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 2 + num57; + break; + } + if ((double) this.velocity.Y > 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 2 + num57; + break; + } + break; + case 150: + case 151: + case 152: + case 158: + case 226: + if (this.type == 151) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 100, Scale: 2f); + Main.dust[index].noGravity = true; + } + if (this.type == 150 && Main.rand.Next(10) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 67, this.velocity.X * 0.5f, this.velocity.Y * 0.5f, 90, Scale: 1.5f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.2f; + Main.dust[index].noLight = true; + } + if ((double) this.velocity.X > 0.0) + this.spriteDirection = 1; + if ((double) this.velocity.X < 0.0) + this.spriteDirection = -1; + this.rotation = this.velocity.X * 0.1f; + ++this.frameCounter; + if (this.frameCounter >= 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * 4) + { + this.frame.Y = 0; + break; + } + break; + case 155: + int num58 = this.frame.Y / num1; + if (this.IsABestiaryIconDummy && num58 < 3) + num58 = 3; + if ((double) this.velocity.Y < 0.0) + num58 = 10; + else if ((double) this.velocity.Y > 0.0) + num58 = 11; + else if ((double) this.velocity.X == 0.0) + { + num58 = 0; + this.frameCounter = 0.0; + } + else if ((this.direction > 0 && (double) this.velocity.X < 0.0 || this.direction < 0 && (double) this.velocity.X > 0.0) && (double) Math.Abs(this.velocity.X) < 4.0) + { + this.spriteDirection = this.direction; + if (num58 > 2) + { + num58 = 0; + this.frameCounter = 0.0; + } + if (num58 < 2) + { + ++this.frameCounter; + if (this.frameCounter > 5.0) + { + this.frameCounter = 0.0; + ++num58; + } + } + else + this.frameCounter = 0.0; + } + else + { + this.spriteDirection = (double) this.velocity.X < 0.0 ? -1 : 1; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 0.400000005960464; + if (num58 == 10 || num58 == 11) + { + num58 = 12; + this.frameCounter = 0.0; + } + else if (this.frameCounter > 8.0) + { + this.frameCounter -= 8.0; + ++num58; + if (num58 > 9) + num58 = 3; + } + } + this.frame.Y = num58 * num1; + break; + case 156: + this.spriteDirection = this.direction; + this.rotation = this.velocity.X * 0.1f; + ++this.frameCounter; + if (this.frameCounter >= 20.0) + this.frameCounter = 0.0; + this.frame.Y = (int) this.frameCounter / 4 * num1; + break; + case 157: + this.spriteDirection = this.direction; + ++this.frameCounter; + if (!this.wet) + ++this.frameCounter; + int num59 = 5; + if (this.frameCounter < (double) num59) + { + this.frame.Y = 0; + break; + } + if (this.frameCounter < (double) (num59 * 2)) + { + this.frame.Y = num1; + break; + } + if (this.frameCounter < (double) (num59 * 3)) + { + this.frame.Y = num1 * 2; + break; + } + if (this.frameCounter < (double) (num59 * 4)) + { + this.frame.Y = num1; + break; + } + if (this.frameCounter < (double) (num59 * 5)) + { + this.frame.Y = num1 * 3; + break; + } + if (this.frameCounter < (double) (num59 * 6)) + { + this.frame.Y = num1 * 4; + break; + } + if (this.frameCounter < (double) (num59 * 7)) + { + this.frame.Y = num1 * 5; + break; + } + if (this.frameCounter < (double) (num59 * 8)) + { + this.frame.Y = num1 * 4; + break; + } + this.frameCounter = 0.0; + break; + case 163: + if ((double) this.velocity.Y != 0.0) + { + this.frameCounter = -12.0; + this.frame.Y = (double) this.velocity.Y >= 0.0 ? num1 * 6 : num1 * 5; + break; + } + this.spriteDirection = this.direction; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.10000002384186; + if (this.frameCounter < -6.0) + { + this.frame.Y = num1 * 6; + break; + } + if (this.frameCounter < 0.0) + { + this.frame.Y = num1 * 7; + break; + } + if (this.frameCounter < 6.0) + { + this.frame.Y = num1; + break; + } + if (this.frameCounter < 12.0) + { + this.frame.Y = num1 * 2; + break; + } + if (this.frameCounter < 18.0) + { + this.frame.Y = num1 * 3; + break; + } + this.frameCounter = 0.0; + break; + case 164: + case 239: + case 530: + if ((double) this.velocity.Y != 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = (double) this.velocity.Y >= 0.0 ? 0 : num1 * 4; + break; + } + this.spriteDirection = this.direction; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.10000002384186; + if (this.frameCounter < 6.0) + { + this.frame.Y = num1; + break; + } + if (this.frameCounter < 12.0) + { + this.frame.Y = num1 * 2; + break; + } + if (this.frameCounter < 18.0) + { + this.frame.Y = num1 * 3; + break; + } + this.frameCounter = 0.0; + break; + case 165: + case 237: + case 238: + case 240: + case 531: + float num60 = 0.5f; + if (this.type == 531) + num60 = 0.4f; + this.frameCounter += ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y)) * (double) num60; + if (this.frameCounter < 6.0) + { + this.frame.Y = 0; + break; + } + if (this.frameCounter < 12.0) + { + this.frame.Y = num1; + break; + } + if (this.frameCounter < 18.0) + { + this.frame.Y = num1 * 2; + break; + } + if (this.frameCounter < 24.0) + { + this.frame.Y = num1 * 3; + break; + } + this.frameCounter = 0.0; + break; + case 166: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.velocity.X == 0.0) + { + this.frameCounter += 2.0; + if (this.frameCounter > 7.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 > 5) + { + this.frame.Y = 0; + break; + } + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 9.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 > 12) + this.frame.Y = num1 * 7; + if (this.frame.Y / num1 < 7) + { + this.frame.Y = num1 * 7; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1 * 6; + break; + case 170: + case 171: + case 180: + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.frameCounter >= 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * 14) + { + this.frame.Y = 0; + break; + } + break; + case 174: + if (this.IsABestiaryIconDummy) + { + ++this.frameCounter; + if (this.frameCounter > 5.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y > num1 * 4) + { + this.frame.Y = 0; + break; + } + break; + } + this.frame.Y = (double) this.velocity.Y != 0.0 ? ((double) this.velocity.Y >= -1.5 ? ((double) this.velocity.Y <= 1.5 ? num1 * 2 : num1 * 3) : num1) : 0; + break; + case 176: + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1) + { + this.frame.Y = 0; + break; + } + break; + case 177: + if ((double) this.velocity.Y == 0.0) + { + ++this.frameCounter; + if (this.frameCounter >= 10.0) + { + this.frameCounter = 30.0; + this.frame.Y = 0; + break; + } + this.frame.Y = num1; + break; + } + if ((double) this.velocity.Y < 0.0) + { + this.frame.Y = num1 * 2; + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1 * 2; + break; + case 195: + this.frame.Y = (double) this.ai[0] >= 3.0 ? ((double) this.ai[0] >= 6.0 ? ((double) this.ai[0] >= 9.0 ? ((double) this.ai[0] >= 12.0 ? ((double) this.ai[0] >= 15.0 ? num1 * 5 : num1 * 4) : num1 * 3) : num1 * 2) : num1) : 0; + break; + case 199: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + } + if (this.frame.Y < num1 * 3) + { + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + break; + } + break; + } + if ((double) this.velocity.Y == 0.0) + { + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter > 12.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y > num1 * 7) + { + this.frame.Y = num1 * 3; + break; + } + break; + } + break; + } + break; + case 205: + this.frameCounter += 0.5; + if (this.frameCounter < 2.0) + { + this.frame.Y = 0; + break; + } + if (this.frameCounter < 4.0) + { + this.frame.Y = num1; + break; + } + if (this.frameCounter < 6.0) + { + this.frame.Y = num1 * 2; + break; + } + if (this.frameCounter < 8.0) + { + this.frame.Y = num1; + break; + } + this.frameCounter = 0.0; + break; + case 206: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.ai[2] > 0.0) + { + this.spriteDirection = this.direction; + this.frame.Y = num1 * (int) this.ai[2]; + this.frameCounter = 0.0; + break; + } + if (this.frame.Y < num1 * 6) + this.frame.Y = num1 * 6; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 2.0; + this.frameCounter += (double) this.velocity.X; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = num1 * 6; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + case 220: + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.frameCounter >= 10.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 221: + if ((double) this.localAI[2] == 1.0) + { + if ((double) this.localAI[0] == 1.0) + { + this.frame.Y = 0; + this.localAI[0] = 0.0f; + } + ++this.frameCounter; + if (this.frameCounter >= 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type]) + { + this.frame.Y = num1 * Main.npcFrameCount[this.type] - num1; + break; + } + break; + } + ++this.frameCounter; + if (this.frameCounter >= 13.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + case 222: + ++this.frameCounter; + if ((double) this.localAI[0] == 1.0) + { + if (this.frameCounter > 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * 4) + { + this.frame.Y = 0; + break; + } + break; + } + if (this.frameCounter > 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y < num1 * 4) + this.frame.Y = num1 * 4; + if (this.frame.Y >= num1 * 12) + { + this.frame.Y = num1 * 4; + break; + } + break; + case 224: + case 587: + if ((double) this.velocity.X > 0.0) + { + this.spriteDirection = 1; + this.rotation = this.velocity.Y * 0.2f; + } + if ((double) this.velocity.X < 0.0) + { + this.spriteDirection = -1; + this.rotation = (float) (-(double) this.velocity.Y * 0.200000002980232); + } + ++this.frameCounter; + if (this.frameCounter >= 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * 4) + { + this.frame.Y = 0; + break; + } + break; + case 230: + if ((double) this.velocity.Y == 0.0) + { + this.rotation = 0.0f; + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X) * 2.0; + ++this.frameCounter; + if (this.frameCounter > 10.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = 0; + if ((double) this.velocity.Y > 4.0) + { + this.rotation -= this.velocity.Y * 0.01f; + break; + } + break; + case 236: + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + else + this.frame.Y = 0; + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1 || (double) this.velocity.Y != 0.0) + { + this.frame.Y = 0; + break; + } + break; + case 243: + if (this.frameCounter < 0.0) + { + if ((double) this.velocity.Y == 0.0) + { + ++this.frameCounter; + if (this.frameCounter < -12.0) + { + if (this.frame.Y > num1 * 9) + { + this.frame.Y = num1 * 11; + break; + } + break; + } + if (this.frameCounter < -6.0) + { + if (this.frame.Y > num1 * 9) + { + this.frame.Y = num1 * 12; + break; + } + break; + } + if (this.frameCounter < 0.0) + { + this.frameCounter = 0.0; + if (this.frame.Y > num1 * 9) + { + this.frame.Y = num1 * 11; + break; + } + break; + } + break; + } + this.frameCounter = -18.0; + this.frame.Y = (double) this.velocity.Y >= 0.0 ? num1 * 13 : num1 * 14; + break; + } + this.spriteDirection = this.direction; + this.frameCounter += (double) Math.Abs(this.velocity.X * 1.1f); + if (this.frameCounter >= 6.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y > num1 * 9) + this.frame.Y = 0; + } + if ((double) this.velocity.Y < -2.0 || (double) this.velocity.Y > 5.0) + { + this.frameCounter = -18.0; + break; + } + break; + case 244: + ++this.frameCounter; + if (num2 > 0) + ++this.frameCounter; + if (num2 == 4) + ++this.frameCounter; + if (this.frameCounter >= 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + case 245: + if ((double) this.ai[0] == 0.0) + { + this.frame.Y = (double) this.ai[1] >= -16.0 ? ((double) this.ai[1] >= -12.0 ? ((double) this.ai[1] >= -8.0 ? ((double) this.ai[1] >= -4.0 ? ((double) this.ai[1] >= 0.0 ? 0 : num1 * 4) : num1 * 3) : num1 * 2) : num1) : 0; + break; + } + if ((double) this.ai[0] == 1.0) + { + this.frame.Y = 1; + break; + } + break; + case 246: + if ((double) this.ai[0] == 0.0) + { + this.frame.Y = (double) this.localAI[0] != 1.0 ? 0 : num1; + break; + } + if ((double) this.ai[0] == 1.0) + { + this.frame.Y = (double) this.localAI[0] != 1.0 ? 0 : num1; + if ((double) this.localAI[1] == -1.0) + this.frame.Y += num1 * 4; + if ((double) this.localAI[1] == 1.0) + { + this.frame.Y += num1 * 2; + break; + } + break; + } + break; + case 249: + this.frame.Y = (double) this.localAI[0] != 1.0 ? 0 : num1; + if (++this.frameCounter >= 16.0) + { + this.frameCounter = 0.0; + break; + } + break; + case 250: + case 264: + case 268: + ++this.frameCounter; + if (this.frameCounter >= 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + case 252: + case 301: + if (this.type == 301) + { + if ((double) this.velocity.Y == 0.0) + { + this.spriteDirection = -this.direction; + } + else + { + if ((double) this.velocity.X > 0.5) + this.spriteDirection = -1; + if ((double) this.velocity.X < -0.5) + this.spriteDirection = 1; + } + } + else + { + if ((double) this.velocity.X > 0.5) + this.spriteDirection = 1; + if ((double) this.velocity.X < -0.5) + this.spriteDirection = -1; + } + this.rotation = this.velocity.X * 0.1f; + if ((double) this.velocity.X == 0.0 && (double) this.velocity.Y == 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y > num1 * 4 || this.frame.Y == 0) + { + this.frame.Y = num1; + break; + } + break; + case 257: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + } + if ((double) this.velocity.Y != 0.0 || this.direction == -1 && (double) this.velocity.X > 0.0 || this.direction == 1 && (double) this.velocity.X < 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 4; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter < 8.0) + { + this.frame.Y = 0; + break; + } + if (this.frameCounter < 16.0) + { + this.frame.Y = num1; + break; + } + if (this.frameCounter < 24.0) + { + this.frame.Y = num1 * 2; + break; + } + if (this.frameCounter < 32.0) + { + this.frame.Y = num1 * 3; + break; + } + this.frameCounter = 0.0; + break; + case 258: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + } + if ((double) this.velocity.Y != 0.0 || this.direction == -1 && (double) this.velocity.X > 0.0 || this.direction == 1 && (double) this.velocity.X < 0.0) + { + ++this.frameCounter; + if (this.frameCounter > 1.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1 * 5 || this.frame.Y < num1 * 3) + { + this.frame.Y = num1 * 3; + break; + } + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter < 8.0) + { + this.frame.Y = 0; + break; + } + if (this.frameCounter < 16.0) + { + this.frame.Y = num1; + break; + } + if (this.frameCounter < 24.0) + { + this.frame.Y = num1 * 2; + break; + } + this.frameCounter = 0.0; + break; + case 262: + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.life > this.lifeMax / 2) + { + if (this.frame.Y > num1 * 3) + { + this.frame.Y = 0; + break; + } + break; + } + if (this.frame.Y < num1 * 4) + this.frame.Y = num1 * 4; + if (this.frame.Y > num1 * 7) + { + this.frame.Y = num1 * 4; + break; + } + break; + case 263: + if ((double) this.velocity.X == 0.0 && (double) this.velocity.Y == 0.0) + { + if (this.frame.Y > 0) + { + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + this.frame.Y -= num1; + break; + } + break; + } + break; + } + if (this.frame.Y < 2) + { + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + break; + } + break; + } + break; + case 266: + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if ((double) this.ai[0] >= 0.0) + { + if (this.frame.Y > num1 * 3) + { + this.frame.Y = 0; + break; + } + break; + } + if (this.frame.Y < num1 * 4) + this.frame.Y = num1 * 4; + if (this.frame.Y > num1 * 7) + { + this.frame.Y = num1 * 4; + break; + } + break; + case 269: + case 270: + case 271: + case 272: + case 273: + case 274: + case 275: + case 276: + case 277: + case 278: + case 279: + case 280: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.velocity.X == 0.0) + { + if (this.type == 140) + { + this.frame.Y = num1; + this.frameCounter = 0.0; + break; + } + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + if (this.frame.Y < num1 * 2) + this.frame.Y = num1 * 2; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 2.0; + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + case 288: + ++this.frameCounter; + if (this.frameCounter >= 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + case 289: + ++this.frameCounter; + if (this.frameCounter < 4.0) + this.frame.Y = 0; + else if (this.frameCounter < 8.0) + { + this.frame.Y = num1; + } + else + { + this.frame.Y = num1 * 2; + this.frameCounter = 0.0; + if (this.frameCounter > 12.0) + this.frameCounter = 0.0; + } + if ((double) this.ai[3] == 1.0) + { + this.frame.Y += num1 * 3; + break; + } + break; + case 290: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.ai[2] > 0.0) + { + this.frame.Y = (double) this.ai[1] >= 10.0 ? ((double) this.ai[1] >= 20.0 ? num1 * 9 : num1 * 10) : num1 * 11; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + if (this.frame.Y < num1 * 2) + this.frame.Y = num1 * 2; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.0; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1 * 8) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1; + break; + case 299: + case 538: + case 539: + case 639: + case 640: + case 641: + case 642: + case 643: + case 644: + case 645: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X) * 0.5; + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type] - 1) + { + this.frame.Y = num1; + break; + } + break; + } + if ((double) this.velocity.Y < 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 2; + break; + } + if ((double) this.velocity.Y > 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 4; + break; + } + break; + case 300: + case 447: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.velocity.X == 0.0) + { + ++this.frameCounter; + if (this.frameCounter > 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 > 1) + { + this.frame.Y = 0; + break; + } + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X) * 0.5; + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X) * 0.5; + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = num1 * 2; + break; + } + break; + case 305: + case 306: + case 307: + case 308: + case 309: + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + this.frame.Y = (double) this.velocity.Y >= -3.0 ? ((double) this.velocity.Y > 0.0 ? ((double) this.velocity.Y >= 2.0 ? num1 : num1 * 3) : 0) : num1 * 5; + this.rotation = this.velocity.X * 0.1f; + break; + case 315: + if ((double) this.velocity.Y == 0.0 || this.wet) + this.spriteDirection = (double) this.velocity.X >= -1.0 ? ((double) this.velocity.X <= 1.0 ? this.direction : 1) : -1; + if ((double) this.velocity.Y != 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter >= 8.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y / num1 > 10) + { + this.frame.Y = num1; + break; + } + break; + } + break; + case 325: + if ((double) this.velocity.X == 0.0) + { + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y > num1 * 4) + { + this.frame.Y = 0; + break; + } + break; + } + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y < num1 * 5) + this.frame.Y = num1 * 5; + if (this.frame.Y > num1 * 9) + { + this.frame.Y = num1 * 5; + break; + } + break; + case 327: + if ((double) this.ai[3] == 0.0) + { + if (this.frame.Y > num1 * 5) + ++this.frameCounter; + else if (this.frame.Y > 0) + --this.frameCounter; + } + else if ((double) this.ai[3] == 1.0) + { + if (this.frame.Y > num1 * 10) + ++this.frameCounter; + else if (this.frame.Y > num1 * 4) + --this.frameCounter; + else if (this.frame.Y < num1 * 4) + ++this.frameCounter; + } + else if ((double) this.ai[3] == 2.0) + { + if (this.frame.Y < num1 * 2) + --this.frameCounter; + else if (this.frame.Y > num1 * 8) + --this.frameCounter; + else if (this.frame.Y < num1 * 8) + ++this.frameCounter; + } + if (this.frameCounter > 6.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y > num1 * 11) + this.frame.Y = 0; + } + if (this.frameCounter < 0.0) + { + this.frameCounter = 6.0; + this.frame.Y -= num1; + if (this.frame.Y < 0) + { + this.frame.Y = num1 * 11; + break; + } + break; + } + break; + case 329: + if ((double) this.velocity.Y > 0.0) + { + this.frame.Y = num1 * 3; + this.frameCounter = 0.0; + break; + } + if ((double) this.velocity.Y < 0.0) + { + this.frame.Y = num1 * 2; + this.frameCounter = 0.0; + break; + } + this.spriteDirection = this.direction; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 0.400000005960464; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y < num1 * 2) + this.frame.Y = num1 * 2; + if (this.frame.Y > num1 * 9) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + break; + case 330: + if ((double) this.velocity.X > 0.0) + this.spriteDirection = 1; + if ((double) this.velocity.X < 0.0) + this.spriteDirection = -1; + this.rotation = this.velocity.X * 0.15f; + ++this.frameCounter; + if (this.frameCounter >= 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + case 343: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = num1 * 2; + this.frameCounter = 0.0; + break; + } + if (this.frame.Y < num1 * 2) + this.frame.Y = num1 * 2; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.0; + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + this.frame.Y = (double) this.velocity.Y >= 0.0 ? num1 : 0; + this.frameCounter = 0.0; + break; + case 344: + if ((double) this.velocity.X == 0.0) + { + ++this.frameCounter; + if (this.frameCounter > 5.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y > num1 * 9) + { + this.frame.Y = 0; + break; + } + break; + } + this.frameCounter += (double) Math.Max(1f, Math.Abs(this.velocity.X) * 0.75f); + if (this.frameCounter > 5.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y > num1 * 9) + { + this.frame.Y = 0; + break; + } + break; + case 345: + if ((double) this.ai[0] == 0.0) + { + this.frame.Y = (double) this.ai[3] < 0.0 ? ((double) this.velocity.X >= 0.0 ? num1 * 2 : num1) : 0; + break; + } + if ((double) this.ai[0] == 1.0) + { + ++this.frameCounter; + if (this.frameCounter > 5.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y > num1 * 4) + this.frame.Y = num1 * 3; + if (this.frame.Y < num1 * 3) + { + this.frame.Y = num1 * 3; + break; + } + break; + } + if ((double) this.ai[0] == 2.0) + { + this.frame.Y = num1 * 5; + break; + } + break; + case 346: + if ((double) this.ai[0] == 1.0) + { + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.frameCounter > 2.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1 * 8) + this.frame.Y = num1 * 6; + if (this.frame.Y < num1 * 6) + { + this.frame.Y = num1 * 6; + break; + } + break; + } + if ((double) this.velocity.X == 0.0) + { + ref int local = ref this.frame.Y; + local = local; + this.frameCounter = 0.0; + break; + } + this.spriteDirection = this.direction; + ++this.frameCounter; + this.frameCounter += (double) Math.Abs(this.velocity.X) / 2.0; + if (this.frameCounter > 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1 * 5) + this.frame.Y = num1; + if (this.frame.Y < num1) + { + this.frame.Y = num1; + break; + } + break; + case 347: + ++this.frameCounter; + if (this.frameCounter > 1.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1 * 3) + { + this.frame.Y = 0; + break; + } + break; + case 348: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + } + if ((double) this.velocity.Y != 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 8; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1 * 7) + { + this.frame.Y = num1; + break; + } + break; + case 349: + ++this.frameCounter; + if (this.frameCounter > 3.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1 * 7) + { + this.frame.Y = 0; + break; + } + break; + case 350: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.ai[2] > 0.0) + { + this.spriteDirection = this.direction; + this.frame.Y = num1 * ((int) this.ai[2] - 1); + this.frameCounter = 0.0; + break; + } + if (this.frame.Y < num1 * 7) + this.frame.Y = num1 * 7; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 2.0; + this.frameCounter += (double) this.velocity.X * 1.29999995231628; + if (this.frameCounter > 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = num1 * 7; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1 * 5; + break; + case 351: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + if (this.frame.Y < num1 * 2) + this.frame.Y = num1 * 2; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.0; + ++this.frameCounter; + if (this.frameCounter > 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + this.frame.Y = (double) this.velocity.Y >= 0.0 ? num1 : num1; + this.frameCounter = 0.0; + break; + case 352: + ++this.frameCounter; + if (this.frameCounter > 3.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1 * 5) + { + this.frame.Y = 0; + break; + } + break; + case 355: + case 358: + case 654: + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.frameCounter < 4.0) + { + this.frame.Y = 0; + } + else + { + this.frame.Y = num1; + if (this.frameCounter >= 7.0) + this.frameCounter = 0.0; + } + if ((double) this.localAI[2] <= 0.0) + { + this.frame.Y += num1 * 2; + break; + } + break; + case 356: + case 444: + case 653: + case 661: + int num61 = 7; + this.rotation = this.velocity.X * 0.3f; + this.spriteDirection = this.direction; + this.frameCounter = this.frameCounter + 1.0 + ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y)) / 2.0; + if (this.frameCounter < (double) num61) + this.frame.Y = 0; + else if (this.frameCounter < (double) (num61 * 2)) + this.frame.Y = num1; + else if (this.frameCounter < (double) (num61 * 3)) + { + this.frame.Y = num1 * 2; + } + else + { + this.frame.Y = num1; + if (this.frameCounter >= (double) (num61 * 4 - 1)) + this.frameCounter = 0.0; + } + if (this.type != 444 && this.type != 653 && this.type != 661) + { + this.frame.Y += (int) ((double) (num1 * 3) * ((double) this.ai[2] - 1.0)); + break; + } + break; + case 357: + case 448: + case 484: + case 606: + this.localAI[0] = -2f; + if ((double) this.velocity.Y == 0.0) + { + this.rotation = 0.0f; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = num1; + this.frameCounter = 0.0; + } + else + { + ++this.frameCounter; + if (this.frameCounter > 12.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y > num1) + this.frame.Y = 0; + } + } + } + else + { + this.rotation += (float) this.direction * 0.1f; + this.frame.Y = num1; + } + int i1 = (int) this.Center.X / 16; + int j1 = (int) this.position.Y / 16; + Tile tileSafely1 = Framing.GetTileSafely(i1, j1); + if (tileSafely1 != null) + { + if (tileSafely1.slope() == (byte) 0) + { + int j2 = j1 + 1; + tileSafely1 = Framing.GetTileSafely(i1, j2); + } + if (tileSafely1.slope() == (byte) 1) + { + this.rotation = 0.785f; + this.localAI[0] = 0.0f; + break; + } + if (tileSafely1.slope() == (byte) 2) + { + this.rotation = -0.785f; + this.localAI[0] = 0.0f; + break; + } + break; + } + break; + case 359: + case 360: + case 655: + if ((double) this.velocity.Y > 1.0) + { + ++this.frameCounter; + int num62 = 6; + if (this.frameCounter < (double) num62) + { + this.frame.Y = num1 * 4; + break; + } + this.frame.Y = num1 * 5; + if (this.frameCounter >= (double) (num62 * 2 - 1)) + { + this.frameCounter = 0.0; + break; + } + break; + } + ++this.frameCounter; + int num63 = 10; + if (this.frameCounter < (double) num63) + { + this.frame.Y = 0; + break; + } + if (this.frameCounter < (double) (num63 * 2)) + { + this.frame.Y = num1; + break; + } + if (this.frameCounter < (double) (num63 * 3)) + { + this.frame.Y = num1 * 2; + break; + } + if (this.frameCounter < (double) (num63 * 4)) + { + this.frame.Y = num1 * 3; + break; + } + if (this.frameCounter < (double) (num63 * 5)) + { + this.frame.Y = num1 * 2; + break; + } + this.frame.Y = num1; + if (this.frameCounter >= (double) (num63 * 6 - 1)) + { + this.frameCounter = 0.0; + break; + } + break; + case 361: + case 445: + this.spriteDirection = this.direction; + if (this.wet) + { + this.frameCounter = 0.0; + this.frame.Y = (double) this.velocity.X > 0.25 || (double) this.velocity.X < -0.25 ? num1 * 10 : ((double) this.velocity.X > 0.150000005960464 || (double) this.velocity.X < -0.150000005960464 ? num1 * 11 : num1 * 12); + break; + } + if ((double) this.velocity.Y == 0.0) + { + if ((double) this.velocity.X == 0.0) + { + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y > num1 * 5) + { + this.frame.Y = 0; + break; + } + break; + } + ++this.frameCounter; + int num64 = 6; + if (this.frameCounter < (double) num64) + { + this.frame.Y = 0; + break; + } + if (this.frameCounter < (double) (num64 * 2)) + { + this.frame.Y = num1 * 6; + break; + } + if (this.frameCounter < (double) (num64 * 3)) + { + this.frame.Y = num1 * 8; + break; + } + this.frame.Y = num1 * 9; + if (this.frameCounter >= (double) (num64 * 4 - 1)) + { + this.frameCounter = 0.0; + break; + } + break; + } + this.frame.Y = (double) this.velocity.Y <= 0.0 ? num1 * 8 : num1 * 9; + break; + case 362: + case 364: + case 608: + this.spriteDirection = this.direction; + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + ++this.frameCounter; + if (this.frameCounter >= 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * 10) + this.frame.Y = num1 * 3; + if (this.frame.Y < num1 * 3) + { + this.frame.Y = num1 * 3; + break; + } + break; + case 363: + case 365: + case 609: + this.spriteDirection = this.direction; + if (this.wet) + { + ++this.frameCounter; + if (this.frameCounter >= 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1 * 2) + this.frame.Y = num1; + if (this.frame.Y < num1) + this.frame.Y = num1; + this.rotation = 0.0f; + break; + } + if ((double) this.velocity.X == 0.0 && (double) this.velocity.Y == 0.0) + { + this.frame.Y = num1; + this.frameCounter = 0.0; + this.rotation = 0.0f; + break; + } + this.rotation = this.velocity.X * 0.1f; + ++this.frameCounter; + if (this.frameCounter >= 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type]) + this.frame.Y = num1 * 11; + if (this.frame.Y < num1 * 11) + { + this.frame.Y = num1 * 11; + break; + } + break; + case 366: + case 367: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + } + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.0; + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + case 370: + if ((double) this.ai[0] == 0.0 || (double) this.ai[0] == 5.0) + { + int num65 = 5; + if ((double) this.ai[0] == 5.0) + num65 = 4; + ++this.frameCounter; + if (this.frameCounter > (double) num65) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y >= num1 * 6) + this.frame.Y = 0; + } + if ((double) this.ai[0] == 1.0 || (double) this.ai[0] == 6.0) + this.frame.Y = (double) this.ai[2] >= 10.0 ? num1 * 7 : num1 * 6; + if ((double) this.ai[0] == 2.0 || (double) this.ai[0] == 7.0) + this.frame.Y = (double) this.ai[2] >= 10.0 ? num1 * 7 : num1 * 6; + if ((double) this.ai[0] == 3.0 || (double) this.ai[0] == 8.0 || (double) this.ai[0] == -1.0) + { + int num66 = 90; + if ((double) this.ai[2] < (double) (num66 - 30) || (double) this.ai[2] > (double) (num66 - 10)) + { + ++this.frameCounter; + if (this.frameCounter > 5.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y >= num1 * 6) + this.frame.Y = 0; + } + else + { + this.frame.Y = num1 * 6; + if ((double) this.ai[2] > (double) (num66 - 20) && (double) this.ai[2] < (double) (num66 - 15)) + this.frame.Y = num1 * 7; + } + } + if ((double) this.ai[0] == 4.0 || (double) this.ai[0] == 9.0) + { + int num67 = 180; + if ((double) this.ai[2] < (double) (num67 - 60) || (double) this.ai[2] > (double) (num67 - 20)) + { + ++this.frameCounter; + if (this.frameCounter > 5.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y >= num1 * 6) + { + this.frame.Y = 0; + break; + } + break; + } + this.frame.Y = num1 * 6; + if ((double) this.ai[2] > (double) (num67 - 50) && (double) this.ai[2] < (double) (num67 - 25)) + { + this.frame.Y = num1 * 7; + break; + } + break; + } + break; + case 371: + case 372: + case 373: + this.frame.Y = num1; + break; + case 374: + this.localAI[0] = -2f; + if ((double) this.velocity.Y == 0.0) + { + this.rotation = 0.0f; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y >= num1 * 4) + { + this.frame.Y = num1; + break; + } + break; + } + break; + } + this.rotation += (float) this.direction * 0.1f; + ++this.frameCounter; + if (this.frameCounter > 3.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y >= num1 * 4) + { + this.frame.Y = num1; + break; + } + break; + } + break; + case 375: + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y >= num1 * 4) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 376: + ++this.frameCounter; + if (this.frameCounter > 30.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y >= num1 * 2) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 377: + case 446: + if (this.IsABestiaryIconDummy) + { + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y > num1) + this.frame.Y = 0; + } + else + this.frame.Y = (double) this.velocity.Y == 0.0 ? 0 : num1; + this.spriteDirection = this.direction; + break; + case 378: + if ((double) this.velocity.Y != 0.0 && this.frame.Y < num1 * 2) + this.frame.Y += num1 * 2; + if ((double) this.velocity.Y == 0.0 && this.frame.Y > num1 * 2) + this.frame.Y -= num1 * 2; + ++this.frameCounter; + if (this.frameCounter >= 6.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if ((double) this.velocity.Y != 0.0 && this.frame.Y >= num1 * 4) + this.frame.Y = num1 * 2; + if ((double) this.velocity.Y == 0.0 && this.frame.Y >= num1 * 2) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 379: + case 380: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.ai[2] > 0.0) + { + this.spriteDirection = this.direction; + this.frame.Y = num1 * ((int) this.ai[2] - 1 + 2); + this.frameCounter = 0.0; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + break; + } + if (this.frame.Y < num1 * 7) + this.frame.Y = num1 * 7; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 2.0; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = num1 * 7; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1; + break; + case 381: + case 382: + case 383: + case 385: + case 389: + if ((double) this.velocity.Y == 0.0) + { + this.spriteDirection = this.direction; + if (this.frame.Y < num1 * 2) + this.frame.Y = num1 * 2; + if (this.type == 389 || this.type == 385) + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.2; + else + this.frameCounter += (double) Math.Abs(this.velocity.X) * 2.0; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + this.frame.Y = num1 * 2; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1; + break; + case 386: + if ((double) this.ai[2] > 0.0) + { + int num68 = (int) this.ai[2] / 12; + this.frame.Y = num1 * (9 + num68 % 2); + break; + } + if ((double) this.velocity.Y == 0.0) + { + this.spriteDirection = this.direction; + if (this.frame.Y < num1 * 2) + this.frame.Y = num1 * 2; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 2.0; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= 9) + this.frame.Y = num1 * 2; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1; + break; + case 387: + if ((double) this.ai[0] > 0.0) + { + ++this.frameCounter; + if ((double) this.ai[0] >= 20.0) + ++this.frameCounter; + if ((double) this.ai[0] >= 40.0) + ++this.frameCounter; + if (this.frameCounter >= 10.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y >= num1 * 2) + { + this.frame.Y = 0; + break; + } + break; + } + break; + } + ++this.frameCounter; + if (this.frameCounter >= 15.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y >= num1 * 2) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 388: + ++this.frameCounter; + if (this.frameCounter >= 6.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y >= num1 * 2) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 390: + if (this.IsABestiaryIconDummy) + { + this.frameCounter += (double) Math.Abs(this.velocity.X) * 0.5; + if (this.frameCounter > 6.0) + { + this.frameCounter = 0.0; + ++this.localAI[3]; + if ((double) this.localAI[3] >= (double) Main.npcFrameCount[391]) + this.localAI[3] = 0.0f; + } + } + if (this.direction != 0) + this.spriteDirection = -this.direction; + this.frame.Y = (double) this.ai[2] <= 0.0 ? num1 * 2 : num1 * ((int) this.ai[2] - 1); + break; + case 391: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = -1; + if (this.direction == -1) + this.spriteDirection = 1; + if (this.frame.Y < num1) + this.frame.Y = num1; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 0.5; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + this.frame.Y = num1; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + case 392: + float num69 = 20f; + float num70 = 240f; + bool flag1 = (double) this.ai[3] >= (double) num69 && (double) this.ai[3] < (double) num69 + (double) num70; + ++this.frameCounter; + if (flag1) + ++this.frameCounter; + if (this.frameCounter >= 12.0) + this.frameCounter = 0.0; + int num71 = (int) this.frameCounter % 12 / 3; + this.frame.Y = num1 * num71; + break; + case 393: + Vector2 rotationVector2 = this.ai[2].ToRotationVector2(); + int num72 = (double) rotationVector2.Y <= (double) Math.Abs(rotationVector2.X) * 2.0 ? ((double) rotationVector2.Y <= (double) Math.Abs(rotationVector2.X) * 1.5 ? ((double) Math.Abs(rotationVector2.X) <= (double) rotationVector2.Y * 2.0 ? ((double) Math.Abs(rotationVector2.X) <= (double) rotationVector2.Y * 1.5 ? ((double) rotationVector2.X > 0.0 ? 6 : 2) : ((double) rotationVector2.X > 0.0 ? 7 : 1)) : ((double) rotationVector2.X > 0.0 ? 8 : 0)) : ((double) rotationVector2.X > 0.0 ? 5 : 3)) : 4; + this.frame.Y = num1 * num72; + float num73 = 280f; + float num74 = 140f; + if ((double) this.ai[3] >= (double) num73 && (double) this.ai[3] < (double) num73 + (double) num74 && (int) this.ai[3] % 6 <= 2) + { + this.frame.Y += num1 * 9; + break; + } + break; + case 394: + int num75 = (int) this.ai[3] - 300; + if (num75 >= 120) + { + int num76 = num75 - 120; + this.frame.Y = num76 < 160 ? (num76 < 20 ? num1 * (4 + num76 / 5) : num1 * (num76 / 4 % 4)) : num1 * (7 - (num76 - 160) / 5); + break; + } + this.frame.Y = num1 * 4; + break; + case 395: + float num77 = 20f; + float num78 = 240f; + bool flag2 = (double) this.ai[3] >= (double) num77 && (double) this.ai[3] < (double) num77 + (double) num78; + ++this.frameCounter; + if (this.frameCounter >= 66.0) + this.frameCounter = 0.0; + if (flag2) + { + ++this.frameCounter; + if (this.frameCounter >= 54.0 || this.frameCounter < 36.0) + this.frameCounter = 36.0; + } + int num79 = (int) this.frameCounter % 66 / 6; + this.frame.Y = num1 * num79; + break; + case 397: + int num80 = (int) this.frameCounter / 7; + this.frame.Y = num1 * num80; + break; + case 398: + if ((double) this.ai[0] <= 0.0) + { + this.frame.Y = 0; + break; + } + if (this.frame.Y == 0) + { + Gore.NewGore(this.position + new Vector2(-10f, -15f), this.velocity, 619); + Gore.NewGore(this.position + new Vector2(10f, -15f), this.velocity, 620); + Gore.NewGore(this.position + new Vector2(-10f, 15f), this.velocity, 621); + Gore.NewGore(this.position + new Vector2(10f, 15f), this.velocity, 622); + for (int index = 0; index < 50; ++index) + { + this.frame.Y = num1; + Dust.NewDust(this.position, this.width, this.height, 209); + } + } + ++this.frameCounter; + if (this.frameCounter >= 30.0) + this.frameCounter = 6.0; + int num81 = (int) this.frameCounter % 30 / 6; + this.frame.Y = num1 * num81; + break; + case 399: + this.frameCounter = (this.frameCounter + 0.25) % 4.0 + ((double) this.ai[0] == 0.0 ? 0.0 : 4.0); + this.frame.Y = num1 * (int) this.frameCounter; + break; + case 400: + ++this.frameCounter; + if ((double) this.ai[0] == 0.0 || (double) this.ai[0] == 3.0) + ++this.frameCounter; + if (this.frameCounter >= 16.0) + this.frameCounter = 0.0; + int num82 = (int) this.frameCounter % 16 / 4; + this.frame.Y = num1 * num82; + break; + case 405: + case 406: + if (++this.frameCounter >= 4.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 407: + if (++this.frameCounter >= 6.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 409: + if ((double) this.velocity.Y == 0.0 && (double) this.ai[1] <= 30.0 && (double) this.ai[1] > 0.0) + { + this.frame.Y = num1 * (Main.npcFrameCount[this.type] - 1); + this.frameCounter = 0.0; + break; + } + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + if (++this.frameCounter >= 6.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type] - 2) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 410: + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter >= 10.0) + { + this.frameCounter -= 10.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 411: + if ((double) this.ai[1] >= 90.0 && (double) this.ai[1] < 180.0) + { + this.spriteDirection = -this.direction; + this.frame.Y = num1 * (Main.npcFrameCount[this.type] - 1); + this.frameCounter = 0.0; + break; + } + if ((double) this.velocity.Y == 0.0) + { + if (this.direction != 0) + this.spriteDirection = -this.direction; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + if (this.frame.Y < num1 * 2) + this.frame.Y = num1 * 2; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.0; + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type] - 1) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + this.frame.Y = num1; + this.frameCounter = 0.0; + break; + case 415: + if ((double) this.ai[2] < 0.0) + { + if (this.frame.Y / num1 != 8 && this.frame.Y / num1 != 9 && this.frame.Y / num1 != 0) + this.frameCounter = 0.0; + ++this.frameCounter; + int num83 = 0; + int num84 = 18; + int num85 = 4; + if (this.frameCounter > (double) (num84 - num85 * 2)) + num83 = 8 + (int) this.frameCounter / 4 % 2; + if (this.frameCounter > (double) (num84 + num85 * 6)) + { + num83 = 0; + this.frameCounter = 0.0; + } + this.frame.Y = num1 * num83; + break; + } + if ((double) this.velocity.Y == 0.0) + { + if (this.direction != 0) + this.spriteDirection = this.direction; + if (this.frame.Y < num1 * 2) + this.frame.Y = num1 * 2; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 0.5; + if (this.frameCounter >= 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type] - 2) + this.frame.Y = num1 * 2; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1; + break; + case 416: + if (this.IsABestiaryIconDummy) + { + ++this.frameCounter; + if (this.frameCounter > 5.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y < num1 * 2 || this.frame.Y > num1 * 7) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + if (Main.netMode != 2 && !Main.dedServ) + { + int index = (int) this.ai[0]; + if (Main.npc[index].active && Main.npc[index].type == 415 && TextureAssets.Npc[415].IsLoaded) + { + this.frame.Y = Main.npc[index].frame.Y / (TextureAssets.Npc[415].Height() / Main.npcFrameCount[415]) * num1; + break; + } + break; + } + break; + case 417: + if ((double) this.ai[0] == 0.0) + { + this.rotation = 0.0f; + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + else if ((double) this.velocity.Y < 0.0) + this.frameCounter = 0.0; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.10000002384186; + this.frame.Y = (int) (this.frameCounter / 6.0) * num1; + if (this.frameCounter >= 48.0) + { + this.frameCounter = 0.0; + break; + } + break; + } + if ((double) this.ai[0] == 1.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * (9 + (int) ((double) this.ai[1] / 6.0)); + break; + } + if ((double) this.ai[0] == 5.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * (13 - (int) ((double) this.ai[1] / 6.0)); + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1 * 14; + break; + case 418: + if ((double) this.ai[0] == 0.0 || (double) this.ai[0] == 1.0 || (double) this.ai[0] == -1.0) + { + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y > num1 * 4) + { + this.frame.Y = 0; + break; + } + break; + } + if ((double) this.ai[0] == 2.0) + { + this.frame.Y = (double) this.ai[1] >= 10.0 ? ((double) this.ai[1] >= 20.0 ? num1 * 7 : num1 * 6) : num1 * 5; + break; + } + if ((double) this.ai[0] == -2.0) + { + ++this.frameCounter; + if (this.frameCounter > 12.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y > num1 * 7) + { + this.frame.Y = num1 * 5; + break; + } + break; + } + break; + case 419: + if ((double) this.ai[2] < 0.0) + { + int num86 = 1; + if (this.direction != 0) + this.spriteDirection = this.direction; + if (this.frame.Y / num1 >= 9) + { + this.frame.Y = num1 * 2; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 < 2) + { + this.frame.Y = num1 * 2; + this.frameCounter = 0.0; + } + ++this.frameCounter; + if (this.frameCounter >= (double) (num86 * 4 + 6)) + this.frameCounter = 8.0; + this.frame.Y = this.frameCounter >= 6.0 ? num1 * (int) (4.0 + (this.frameCounter - 6.0) / (double) num86) : num1 * (int) (2.0 + this.frameCounter / 3.0); + break; + } + if ((double) this.velocity.Y == 0.0) + { + if (this.direction != 0) + this.spriteDirection = this.direction; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.0; + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + this.frame.Y = num1 * 9; + if (this.frame.Y / num1 < 9) + { + this.frame.Y = num1 * 9; + break; + } + break; + } + this.frame.Y = num1; + this.frameCounter = 0.0; + break; + case 420: + if (++this.frameCounter >= 5.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 421: + if ((double) this.ai[0] == 5.0) + ++this.frameCounter; + if (++this.frameCounter >= 5.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 423: + if ((double) this.ai[2] == 1.0) + { + int num87 = 2; + if ((double) this.ai[1] >= 30.0 && (double) this.ai[1] < 45.0) + num87 = 3; + this.frame.Y = num87 * num1; + break; + } + if ((double) this.velocity.Y != 0.0) + { + this.frame.Y = num1; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + break; + } + if ((double) this.velocity.X != 0.0) + this.spriteDirection = Math.Sign(-this.velocity.X); + if (this.frame.Y / num1 < 4) + this.frame.Y = num1 * 4; + this.frameCounter += 1.0 + (double) Math.Abs(this.velocity.X) / 2.0; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = num1 * 4; + break; + } + break; + case 424: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction != 0) + this.spriteDirection = -this.direction; + if ((double) this.ai[2] > 0.0) + { + this.frame.Y = num1 * ((double) this.ai[1] > 90.0 ? Main.npcFrameCount[this.type] - 2 : Main.npcFrameCount[this.type] - 1); + this.frameCounter = 0.0; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + break; + } + if (this.frame.Y < num1 * 2) + this.frame.Y = num1 * 2; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 2.0; + this.frameCounter += (double) this.velocity.X * 1.29999995231628; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type] - 2) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1; + break; + case 425: + if (this.direction != 0) + this.spriteDirection = -this.direction; + if ((double) this.ai[2] == 1.0) + { + ++this.frameCounter; + if (this.frameCounter >= 3.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1 * 12 || this.frame.Y < num1 * 10) + { + this.frame.Y = num1 * 10; + break; + } + break; + } + if ((double) this.velocity.Y != 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter >= 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1 * 9 || this.frame.Y < num1 * 2) + { + this.frame.Y = num1 * 2; + break; + } + break; + case 426: + if (this.direction != 0) + this.spriteDirection = this.direction; + if ((double) this.ai[1] >= 45.0) + { + if ((double) this.velocity.Y == 0.0) + { + this.frame.Y = num1 * 8; + break; + } + ++this.frameCounter; + if (this.frameCounter >= 2.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * 15 || this.frame.Y < num1 * 12) + { + this.frame.Y = num1 * 12; + break; + } + break; + } + if ((double) this.velocity.Y != 0.0) + { + ++this.frameCounter; + if (this.frameCounter >= 2.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * 12 || this.frame.Y < num1 * 9) + { + this.frame.Y = num1 * 9; + break; + } + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter >= 10.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1 * 7 || this.frame.Y < num1) + { + this.frame.Y = num1; + break; + } + break; + case 427: + if (this.direction != 0) + this.spriteDirection = this.direction; + if ((double) this.velocity.Y != 0.0) + { + ++this.frameCounter; + if (this.frameCounter >= 2.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * 9 || this.frame.Y < num1 * 6) + { + this.frame.Y = num1 * 6; + break; + } + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter >= 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1 * 5 || this.frame.Y < num1) + { + this.frame.Y = num1; + break; + } + break; + case 428: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction != 0) + this.spriteDirection = this.direction; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.0; + if (++this.frameCounter > 10.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type] - 1) + { + this.frame.Y = 0; + break; + } + break; + } + if (this.frame.Y / num1 != 4) + { + if (this.frameCounter > 0.0) + this.frameCounter = 0.0; + if (--this.frameCounter < -10.0 || (double) this.velocity.Y > 0.600000023841858) + { + this.frame.Y = num1 * 4; + this.frameCounter = 0.0; + break; + } + break; + } + break; + case 429: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction != 0) + this.spriteDirection = this.direction; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + if (this.frame.Y < num1 * 2) + this.frame.Y = num1 * 2; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.0; + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + this.frame.Y = num1; + this.frameCounter = 0.0; + break; + case 430: + case 431: + case 432: + case 433: + case 434: + case 435: + case 436: + case 591: + if ((double) this.ai[2] > 0.0) + { + this.frame.Y = (double) this.ai[2] >= 5.0 ? ((double) this.ai[2] >= 10.0 ? ((double) this.ai[2] >= 15.0 ? num1 * 6 : num1 * 5) : num1 * 4) : num1 * 3; + break; + } + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + } + if ((double) this.velocity.Y != 0.0 || this.direction == -1 && (double) this.velocity.X > 0.0 || this.direction == 1 && (double) this.velocity.X < 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 2; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter < 8.0) + { + this.frame.Y = 0; + break; + } + if (this.frameCounter < 16.0) + { + this.frame.Y = num1; + break; + } + if (this.frameCounter < 24.0) + { + this.frame.Y = num1 * 2; + break; + } + if (this.frameCounter < 32.0) + { + this.frame.Y = num1; + break; + } + this.frameCounter = 0.0; + break; + case 437: + ++this.frameCounter; + if (this.frameCounter >= 20.0) + this.frameCounter = 0.0; + int num88 = (int) this.frameCounter % 20 / 5; + this.frame.Y = num1 * num88; + break; + case 438: + ++this.frameCounter; + if ((double) this.ai[1] == 1.0) + ++this.frameCounter; + if (this.frameCounter >= 49.0) + this.frameCounter = 0.0; + int num89 = (int) this.frameCounter % 49 / 7; + if (num89 >= 4) + num89 = 6 - num89; + this.frame.Y = num1 * num89; + break; + case 439: + case 440: + int num90 = (int) this.localAI[2]; + if (this.IsABestiaryIconDummy) + { + if (this.frameCounter > 5.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y < num1 * 4 || this.frame.Y > num1 * 6) + this.frame.Y = num1 * 4; + } + else + { + switch (num90) + { + case 0: + if (this.frameCounter >= 15.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + if (this.frame.Y != 0) + { + this.frame.Y = ((int) this.frameCounter / 5 + 4) * num1; + break; + } + break; + case 1: + if (this.frameCounter >= 15.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1; + break; + } + if (this.frame.Y != num1) + { + this.frame.Y = ((int) this.frameCounter / 5 + 10) * num1; + break; + } + break; + case 2: + if (this.frameCounter >= 15.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 2; + break; + } + if (this.frame.Y != num1 * 2) + { + this.frame.Y = ((int) this.frameCounter / 5 + 7) * num1; + break; + } + break; + case 10: + if (this.frameCounter >= 15.0) + this.frameCounter = 0.0; + this.frame.Y = ((int) this.frameCounter / 5 + 4) * num1; + break; + case 11: + if (this.frameCounter >= 15.0) + this.frameCounter = 0.0; + this.frame.Y = ((int) this.frameCounter / 5 + 10) * num1; + break; + case 12: + if (this.frameCounter >= 15.0) + this.frameCounter = 0.0; + this.frame.Y = ((int) this.frameCounter / 5 + 7) * num1; + break; + case 13: + if (this.frameCounter >= 15.0) + this.frameCounter = 0.0; + this.frame.Y = ((int) this.frameCounter / 5 + 13) * num1; + break; + } + } + ++this.frameCounter; + break; + case 449: + case 450: + case 451: + case 452: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.ai[2] > 0.0) + { + this.spriteDirection = this.direction; + int num91 = Main.npcFrameCount[this.type] - 5; + int num92 = 7; + int num93 = (double) this.ai[1] < 50.0 ? ((double) this.ai[1] < (double) (50 - num92) ? ((double) this.ai[1] < (double) (50 - num92 * 2) ? ((double) this.ai[1] < (double) (50 - num92 * 3) ? 0 : 4) : 3) : 2) : 1; + this.frame.Y = num1 * (num91 + num93); + this.frameCounter = 0.0; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + break; + } + if (this.frame.Y < num1 * 2) + this.frame.Y = num1 * 2; + if (this.frame.Y < num1 * 2) + this.frame.Y = num1 * 2; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 2.0; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= 15) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1; + break; + case 454: + int num94 = (int) (this.frameCounter / 2.0); + this.frame.Y = num1 * num94; + break; + case 461: + if (this.wet) + { + if ((double) this.velocity.X < 0.0) + this.direction = -1; + if ((double) this.velocity.X > 0.0) + this.direction = 1; + if (this.spriteDirection != this.direction) + { + this.rotation *= -1f; + this.spriteDirection = this.direction; + } + float num95 = (float) Math.Atan2((double) this.velocity.Y * (double) this.direction, (double) this.velocity.X * (double) this.direction); + if ((double) Math.Abs(this.rotation - num95) >= 3.14) + { + if ((double) num95 < (double) this.rotation) + this.rotation -= 6.28f; + else + this.rotation += 6.28f; + } + this.rotation = (float) (((double) this.rotation * 4.0 + (double) num95) / 5.0); + this.frameCounter += (double) Math.Abs(this.velocity.Length()); + ++this.frameCounter; + if (this.frameCounter > 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 > 20) + { + this.frame.Y = num1 * 16; + break; + } + if (this.frame.Y / num1 < 16) + { + this.frame.Y = num1 * 19; + break; + } + break; + } + if ((double) this.rotation > 3.14) + this.rotation -= 6.28f; + if ((double) this.rotation > -0.01 && (double) this.rotation < 0.01) + this.rotation = 0.0f; + else + this.rotation *= 0.9f; + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + if (this.frame.Y < num1 * 2) + this.frame.Y = num1 * 2; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 2.0; + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 > 15) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1; + break; + case 466: + if (!this.IsABestiaryIconDummy && (double) this.ai[2] <= 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + this.frame.Y = (double) this.ai[2] != 0.0 ? ((double) this.ai[2] >= -8.0 ? num1 * 2 : num1) : 0; + break; + } + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = num1 * 2; + this.frameCounter = 0.0; + break; + } + if (this.frame.Y / num1 < 4) + this.frame.Y = num1 * 4; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 2.0; + ++this.frameCounter; + if (this.frameCounter > 7.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 > 17) + this.frame.Y = num1 * 4; + if (this.frame.Y / num1 < 4) + { + this.frame.Y = num1 * 4; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1 * 3; + break; + case 467: + if ((double) this.ai[0] == 1.0 || this.IsABestiaryIconDummy) + { + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + if (this.frame.Y < num1 * 6) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + break; + } + if (this.IsABestiaryIconDummy) + { + this.frame.Y = 0; + break; + } + break; + } + break; + } + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + if (this.frame.Y > num1 * 3) + this.frame.Y = num1 * 3; + if (this.frame.Y > 0) + { + this.frame.Y -= num1; + this.frameCounter = 0.0; + break; + } + break; + } + break; + case 468: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.ai[2] > 0.0) + { + this.spriteDirection = this.direction; + int num96 = 0; + if ((double) this.ai[1] < 22.0) + num96 = -15; + else if ((double) this.ai[1] < 28.0) + num96 = 3; + else if ((double) this.ai[1] < 34.0) + num96 = 2; + else if ((double) this.ai[1] < 40.0) + num96 = 1; + this.frame.Y = num1 * (15 + num96); + this.frameCounter = 0.0; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + break; + } + if (this.frame.Y < num1 * 2) + this.frame.Y = num1 * 2; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 2.0; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= 15) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1; + break; + case 469: + if ((double) this.ai[2] == 1.0) + { + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.57f; + if ((double) this.velocity.X < 0.0) + this.direction = -1; + if ((double) this.velocity.X > 0.0) + this.direction = 1; + this.spriteDirection = this.direction; + this.frameCounter += (double) Math.Abs(this.velocity.Length()); + if (this.frameCounter > 11.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 > 5) + this.frame.Y = num1 * 2; + if (this.frame.Y / num1 < 2) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + this.rotation = 0.0f; + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 9.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 > 11) + this.frame.Y = num1 * 6; + if (this.frame.Y / num1 < 6) + { + this.frame.Y = num1 * 6; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1; + break; + case 471: + bool flag3 = false; + if ((double) this.ai[3] < 0.0) + flag3 = true; + if (flag3) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + this.frameCounter += (double) Math.Abs(this.velocity.Length()) * 0.5; + ++this.frameCounter; + if (this.frameCounter < 6.0) + { + this.frame.Y = num1 * 17; + break; + } + if (this.frameCounter < 12.0) + { + this.frame.Y = num1 * 18; + break; + } + if (this.frameCounter < 18.0) + { + this.frame.Y = num1 * 19; + break; + } + if (this.frameCounter < 23.0) + { + this.frame.Y = num1 * 18; + break; + } + this.frame.Y = num1 * 18; + this.frameCounter = 0.0; + break; + } + if ((double) this.ai[3] == 1.0) + { + this.frame.Y = num1 * 16; + this.frameCounter = 0.0; + break; + } + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X) * 2.0; + ++this.frameCounter; + if (this.frameCounter > 7.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 > 15) + this.frame.Y = num1 * 2; + if (this.frame.Y / num1 < 2) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1; + break; + case 472: + if ((double) this.velocity.X < 0.0) + this.direction = -1; + else + this.direction = 1; + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + this.rotation = (float) Math.Atan2((double) this.velocity.Y * (double) this.direction, (double) this.velocity.X * (double) this.direction); + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= 6) + { + this.frame.Y = 0; + break; + } + break; + case 473: + case 474: + case 475: + case 476: + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + if ((double) this.ai[0] == 0.0 || (double) this.ai[0] == 7.0) + { + this.rotation = 0.0f; + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + if ((double) this.ai[0] == 1.0) + { + this.rotation = 0.0f; + this.frameCounter = 0.0; + int num97 = 6; + this.frame.Y = (double) this.ai[1] >= (double) num97 ? ((double) this.ai[1] >= (double) (num97 * 2) ? ((double) this.ai[1] >= (double) (num97 * 3) ? ((double) this.ai[1] >= (double) (num97 * 4) ? ((double) this.ai[1] >= (double) (num97 * 5) ? num1 * 6 : num1 * 5) : num1 * 4) : num1 * 3) : num1 * 2) : num1; + break; + } + if ((double) this.ai[0] == 2.0 || (double) this.ai[0] == 6.0) + { + this.rotation = 0.0f; + if ((double) this.velocity.Y == 0.0) + { + int num98 = 6; + ++this.frameCounter; + if (this.frame.Y < num1 * 7) + this.frame.Y = num1 * 12; + if (this.frame.Y < num1 * 10) + { + if (this.frameCounter > 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + if (this.frame.Y == num1 * 10) + { + this.frameCounter = (double) (num98 * 2); + break; + } + break; + } + break; + } + if (this.frameCounter < (double) num98) + { + this.frame.Y = num1 * 12; + break; + } + if (this.frameCounter < (double) (num98 * 2)) + { + this.frame.Y = num1 * 11; + break; + } + if (this.frameCounter < (double) (num98 * 3)) + { + this.frame.Y = num1 * 10; + break; + } + this.frame.Y = num1 * 11; + if (this.frameCounter >= (double) (num98 * 4 - 1)) + { + this.frameCounter = 0.0; + break; + } + break; + } + this.frame.Y = num1 * 13; + this.frameCounter = 0.0; + break; + } + if ((double) this.ai[0] == 3.0) + { + this.rotation = 0.0f; + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frameCounter = 0.0; + if (this.frame.Y > num1 * 7) + { + this.frame.Y -= num1; + break; + } + break; + } + break; + } + if ((double) this.ai[0] == 4.0 || (double) this.ai[0] == 5.0) + { + if ((double) this.ai[0] == 4.0 && (double) this.ai[2] == 1.0) + this.rotation = 0.0f; + this.frame.Y = num1 * 13; + this.frameCounter = 0.0; + break; + } + if ((double) this.ai[0] == 4.09999990463257) + { + this.rotation = 0.0f; + if (this.frame.Y > num1 * 6) + this.frameCounter = 0.0; + ++this.frameCounter; + int num99 = 4; + if (this.frameCounter < (double) num99) + { + this.frame.Y = num1 * 6; + break; + } + if (this.frameCounter < (double) (num99 * 2)) + { + this.frame.Y = num1 * 5; + break; + } + if (this.frameCounter < (double) (num99 * 3)) + { + this.frame.Y = num1 * 4; + break; + } + if (this.frameCounter < (double) (num99 * 4)) + { + this.frame.Y = num1 * 3; + break; + } + if (this.frameCounter < (double) (num99 * 5)) + { + this.frame.Y = num1 * 4; + break; + } + this.frame.Y = num1 * 5; + if (this.frameCounter >= (double) (num99 * 6 - 1)) + { + this.frameCounter = 0.0; + break; + } + break; + } + break; + case 477: + this.frameCounter += (double) this.velocity.Length() / 4.0; + ++this.frameCounter; + if (this.frameCounter >= 6.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y / num1 > 5) + { + this.frame.Y = 0; + break; + } + break; + case 479: + ++this.frameCounter; + int num100 = 4; + if (this.frameCounter < (double) num100) + { + this.frame.Y = 0; + break; + } + if (this.frameCounter < (double) (num100 * 2)) + { + this.frame.Y = num1; + break; + } + if (this.frameCounter < (double) (num100 * 3)) + { + this.frame.Y = num1 * 2; + break; + } + if (this.frameCounter < (double) (num100 * 4 - 1)) + { + this.frame.Y = num1; + break; + } + this.frameCounter = 0.0; + break; + case 480: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.ai[2] < 0.0) + { + ++this.frameCounter; + if (this.frameCounter > 3.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= Main.npcFrameCount[this.type] * num1) + { + this.frame.Y = num1 * 21; + break; + } + if (this.frame.Y < num1 * 21) + { + this.frame.Y = num1 * 21; + break; + } + break; + } + if ((double) this.velocity.X == 0.0) + { + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 > 7) + { + this.frame.Y = 0; + break; + } + break; + } + this.frameCounter += 1.0 + (double) Math.Abs(this.velocity.X); + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type] - 4) + { + this.frame.Y = num1 * 10; + break; + } + if (this.frame.Y / num1 < 10) + { + this.frame.Y = num1 * 10; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1 * 8; + break; + case 481: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.ai[2] > 0.0) + { + this.spriteDirection = this.direction; + int num101 = 0; + if ((double) this.ai[1] < 22.0) + num101 = -14; + else if ((double) this.ai[1] < 28.0) + num101 = 3; + else if ((double) this.ai[1] < 34.0) + num101 = 2; + else if ((double) this.ai[1] < 40.0) + num101 = 1; + this.frame.Y = num1 * (15 + num101); + this.frameCounter = 0.0; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = num1; + break; + } + if (this.frame.Y < num1 * 2) + this.frame.Y = num1 * 2; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 2.0; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= 15) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + case 482: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.ai[2] < 0.0) + { + ++this.frameCounter; + if (this.frameCounter > 3.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= Main.npcFrameCount[this.type] * num1) + { + this.frame.Y = num1 * 11; + break; + } + if (this.frame.Y < num1 * 11) + { + this.frame.Y = num1 * 11; + break; + } + break; + } + if ((double) this.velocity.X == 0.0) + { + ++this.frameCounter; + this.frame.Y = 0; + break; + } + this.frameCounter += 0.200000002980232 + (double) Math.Abs(this.velocity.X); + if (this.frameCounter > 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type] - 10) + { + this.frame.Y = num1 * 2; + break; + } + if (this.frame.Y / num1 < 2) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1; + break; + case 483: + if ((double) this.ai[0] == -1.0) + { + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1 * 21) + this.frame.Y = num1 * 21; + else if (this.frame.Y < num1 * 13) + this.frame.Y = num1 * 13; + this.rotation += this.velocity.X * 0.2f; + break; + } + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1 * 11) + this.frame.Y = 0; + this.rotation = this.velocity.X * 0.1f; + break; + case 485: + case 486: + case 487: + this.spriteDirection = this.direction; + this.localAI[0] = -2f; + if ((double) this.velocity.Y == 0.0) + { + this.rotation = 0.0f; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = num1; + this.frameCounter = 0.0; + } + else + { + this.frameCounter += (double) Math.Abs(this.velocity.X * 5f); + if (this.frameCounter > 10.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y > num1 * 3) + this.frame.Y = 0; + } + } + } + else + { + this.rotation += (float) this.direction * 0.1f; + this.frame.Y = num1; + } + int i2 = (int) this.Center.X / 16; + int j3 = (int) this.position.Y / 16; + Tile tileSafely2 = Framing.GetTileSafely(i2, j3); + if (tileSafely2 != null) + { + if (tileSafely2.slope() == (byte) 0) + { + int j4 = j3 + 1; + tileSafely2 = Framing.GetTileSafely(i2, j4); + } + if (tileSafely2.slope() == (byte) 1) + { + this.rotation = 0.785f; + this.localAI[0] = 0.0f; + break; + } + if (tileSafely2.slope() == (byte) 2) + { + this.rotation = -0.785f; + this.localAI[0] = 0.0f; + break; + } + break; + } + break; + case 488: + int num102 = (int) this.localAI[1]; + if (Framing.GetTileSafely((int) this.ai[0], (int) this.ai[1]).frameX >= (short) 36) + num102 *= -1; + if ((double) this.localAI[0] > 24.0) + this.localAI[0] = 24f; + if ((double) this.localAI[0] > 0.0) + --this.localAI[0]; + if ((double) this.localAI[0] < 0.0) + this.localAI[0] = 0.0f; + int num103 = num102 == -1 ? 4 : 6; + int num104 = (int) this.localAI[0] / num103; + if ((double) this.localAI[0] % (double) num103 != 0.0) + ++num104; + if (num104 != 0 && num102 == 1) + num104 += 5; + this.frame.Y = num104 * num1; + break; + case 490: + this.rotation = this.velocity.X * 0.15f; + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + case 492: + this.frame.Y = num1 * (int) this.ai[2]; + break; + case 494: + case 495: + if ((double) this.ai[2] > 0.0) + { + if ((double) this.ai[2] < 7.0) + { + this.frame.Y = num1 * 5; + break; + } + if ((double) this.ai[2] < 14.0) + { + this.frame.Y = num1 * 6; + break; + } + if ((double) this.ai[2] < 20.0) + { + this.frame.Y = num1 * 7; + break; + } + break; + } + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + } + if ((double) this.velocity.Y != 0.0 || this.direction == -1 && (double) this.velocity.X > 0.0 || this.direction == 1 && (double) this.velocity.X < 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = (double) this.velocity.Y >= 0.0 ? num1 * 3 : num1 * 2; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter < 8.0) + { + this.frame.Y = 0; + break; + } + if (this.frameCounter < 16.0) + { + this.frame.Y = num1; + break; + } + if (this.frameCounter < 24.0) + { + this.frame.Y = num1 * 2; + break; + } + if (this.frameCounter < 32.0) + { + this.frame.Y = num1 * 3; + break; + } + if (this.frameCounter < 39.0) + { + this.frame.Y = num1 * 4; + break; + } + this.frame.Y = num1 * 4; + this.frameCounter = 0.0; + break; + case 496: + case 497: + if ((double) this.ai[0] == 0.0) + { + this.rotation = 0.0f; + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + else if ((double) this.velocity.Y < 0.0) + this.frameCounter = 0.0; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.10000002384186; + if (this.frameCounter < 6.0) + { + this.frame.Y = 0; + break; + } + if (this.frameCounter < 12.0) + { + this.frame.Y = num1; + break; + } + if (this.frameCounter < 18.0) + { + this.frame.Y = num1 * 2; + break; + } + if (this.frameCounter < 24.0) + { + this.frame.Y = num1 * 3; + break; + } + this.frameCounter = 0.0; + break; + } + if ((double) this.ai[0] == 1.0) + { + this.frameCounter = 0.0; + this.frame.Y = (double) this.ai[1] >= 10.0 ? ((double) this.ai[1] >= 20.0 ? num1 * 6 : num1 * 5) : num1 * 4; + break; + } + if ((double) this.ai[0] == 5.0) + { + this.frameCounter = 0.0; + this.frame.Y = (double) this.ai[1] >= 10.0 ? ((double) this.ai[1] >= 20.0 ? num1 * 3 : num1 * 11) : num1 * 10; + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1 * 7; + break; + case 498: + case 499: + case 500: + case 501: + case 502: + case 503: + case 504: + case 505: + case 506: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.ai[2] > 0.0) + { + this.spriteDirection = this.direction; + this.frame.Y = (double) this.ai[1] >= 12.0 ? ((double) this.ai[1] >= 34.0 ? num1 * 8 : num1 * 9) : num1 * 8; + this.frameCounter = 0.0; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.0; + if (this.frameCounter > 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1 * 7) + { + this.frame.Y = 0; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1 * 10; + break; + case 508: + case 532: + case 580: + case 582: + if ((double) this.velocity.Y != 0.0) + { + this.frame.Y = num1; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + break; + } + if (this.direction < 0 && (double) this.velocity.X < 0.0) + this.spriteDirection = -1; + if (this.direction > 0 && (double) this.velocity.X > 0.0) + this.spriteDirection = 1; + if (this.frame.Y / num1 < 2) + this.frame.Y = num1 * 2; + this.frameCounter += 1.0 + (double) Math.Abs(this.velocity.X) / 2.0; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = num1 * 2; + break; + } + break; + case 509: + case 581: + if ((double) this.velocity.X > 0.0 && this.direction > 0 || (double) this.velocity.X < 0.0 && this.direction < 0) + this.spriteDirection = this.direction; + if (++this.frameCounter >= 3.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 516: + if ((double) this.localAI[1] == 0.0) + { + this.localAI[1] = 1f; + this.frame.Y = num1 * Main.rand.Next(3); + this.frameCounter += (double) Main.rand.Next(3); + } + ++this.frameCounter; + if (this.frameCounter > 3.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y > num1 * 3) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 518: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction != 0) + this.spriteDirection = this.direction; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + if (this.frame.Y < num1 * 2) + this.frame.Y = num1 * 2; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.0; + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + this.frame.Y = num1; + this.frameCounter = 0.0; + break; + case 520: + if ((double) this.velocity.Y == 0.0) + { + this.spriteDirection = this.direction; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.0; + if (this.frameCounter > 6.0) + { + if ((double) Math.Abs(this.velocity.X) < 0.200000002980232) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + } + else + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + this.frame.Y = num1; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1; + break; + case 521: + if ((double) this.velocity.X < 0.0) + this.direction = -1; + else + this.direction = 1; + if (this.direction != 0) + this.spriteDirection = this.direction; + this.rotation = (float) Math.Atan2((double) this.velocity.Y * (double) this.spriteDirection, (double) this.velocity.X * (double) this.spriteDirection) + this.velocity.X * 0.1f; + if (++this.frameCounter >= 5.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 523: + if (++this.frameCounter >= 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 524: + case 525: + case 526: + case 527: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction != 0) + this.spriteDirection = this.direction; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + if (this.frame.Y <= num1) + this.frame.Y = num1 * 2; + this.frameCounter += (double) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 9.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + this.frame.Y = num1; + this.frameCounter = 0.0; + break; + case 528: + case 529: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction != 0) + this.spriteDirection = this.direction; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 9.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type] - 1) + { + this.frame.Y = num1; + break; + } + break; + } + this.frame.Y = num1 * (Main.npcFrameCount[this.type] - 1); + this.frameCounter = 0.0; + break; + case 533: + if ((double) this.velocity.Y == 0.0 && this.direction != 0) + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.frameCounter >= 48.0) + this.frameCounter = 0.0; + this.frame.Y = (int) (this.frameCounter / 6.0) * num1; + if ((double) this.ai[1] > 0.0) + { + this.frame.Y += num1 * 8; + break; + } + break; + case 541: + if ((double) this.ai[0] > 0.0) + { + float num105 = this.ai[0]; + this.frame.Y = (double) num105 >= 6.0 ? ((double) num105 >= 105.0 ? ((double) num105 >= 114.0 ? ((double) num105 >= 135.0 ? num1 : num1 * (int) (((double) num105 - 99.0 - 15.0) / 7.0 + 10.0)) : num1 * 9) : num1 * (int) ((double) num105 / 8.0 % 4.0 + 5.0)) : num1 * 4; + break; + } + this.frameCounter = this.frameCounter + (double) this.velocity.Length() * 0.100000001490116 + 1.0; + if (this.frameCounter >= 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * 4) + { + this.frame.Y = 0; + break; + } + break; + case 542: + case 543: + case 544: + case 545: + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.frameCounter >= 16.0) + this.frameCounter = 0.0; + this.frame.Y = num1 * (int) (this.frameCounter / 4.0); + break; + case 549: + this.spriteDirection = 1; + this.rotation = 0.0f; + if (++this.frameCounter >= 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 551: + int num106 = this.frame.Y / num1; + int num107; + if ((double) this.ai[0] == 4.0) + { + float num108 = 60f; + int num109 = 6 * 10; + if (num106 < 5) + this.frameCounter = 0.0; + num107 = 5; + this.frameCounter = (double) (int) this.ai[1]; + int num110 = 0; + int num111; + if (this.frameCounter >= (double) (5 * (num111 = num110 + 1))) + num107 = 6; + num111 = 0; + if (this.frameCounter >= (double) num108 - 6.0) + num107 = 7; + if (this.frameCounter >= (double) num108 - 3.0) + num107 = 8; + if (this.frameCounter >= (double) num108) + num107 = 9 + (int) this.frameCounter / 3 % 2; + int num112 = 0; + if (this.frameCounter >= (double) num108 + (double) num109 + 3.0) + num107 = 8; + int num113; + if (this.frameCounter >= (double) num108 + (double) num109 + 3.0 + (double) (5 * (num113 = num112 + 1))) + num107 = 7; + if (this.frameCounter >= (double) num108 + (double) num109 + 3.0 + (double) (5 * (num111 = num113 + 1))) + num107 = 0; + } + else if ((double) this.ai[0] == 3.0) + { + float num114 = 40f; + float num115 = 80f; + float num116 = num114 + num115; + float num117 = 25f; + if (num106 < 5) + this.frameCounter = 0.0; + num107 = 5; + this.frameCounter = (double) (int) this.ai[1]; + int num118 = 0; + int num119; + if (this.frameCounter >= (double) (5 * (num119 = num118 + 1))) + num107 = 6; + num119 = 0; + if (this.frameCounter >= (double) num114 - 6.0) + num107 = 7; + if (this.frameCounter >= (double) num114 - 3.0) + num107 = 8; + if (this.frameCounter >= (double) num114) + num107 = 9 + (int) this.frameCounter / 3 % 2; + int num120 = 0; + if (this.frameCounter >= (double) num116 - (double) num117 + 3.0) + num107 = 8; + int num121; + if (this.frameCounter >= (double) num116 - (double) num117 + 3.0 + (double) (5 * (num121 = num120 + 1))) + num107 = 7; + if (this.frameCounter >= (double) num116 - (double) num117 + 3.0 + (double) (5 * (num119 = num121 + 1))) + num107 = 0; + } + else if ((double) this.ai[0] == 5.0) + num107 = 3; + else if ((double) this.ai[0] == 6.0) + { + if (num106 > 4) + this.frameCounter = 0.0; + num107 = 1; + this.frameCounter = (double) (int) this.ai[1]; + int num122 = 0; + int num123; + if (this.frameCounter >= (double) (8 * (num123 = num122 + 1))) + num107 = 2; + int num124; + if (this.frameCounter >= (double) (8 * (num124 = num123 + 1))) + num107 = 3; + int num125; + if (this.frameCounter >= (double) (8 * (num125 = num124 + 1))) + num107 = 4; + int num126; + if (this.frameCounter >= (double) (8 * (num126 = num125 + 1))) + num107 = 3; + int num127; + if (this.frameCounter >= (double) (8 * (num127 = num126 + 1))) + num107 = 4; + int num128; + if (this.frameCounter >= (double) (8 * (num128 = num127 + 1))) + num107 = 3; + int num129; + if (this.frameCounter >= (double) (8 * (num129 = num128 + 1))) + num107 = 2; + int num130; + if (this.frameCounter >= (double) (8 * (num130 = num129 + 1))) + num107 = 1; + int num131; + if (this.frameCounter >= (double) (8 * (num131 = num130 + 1))) + num107 = 0; + } + else + num107 = 0; + this.frame.Y = num1 * num107; + break; + case 552: + case 553: + case 554: + if ((double) this.ai[0] > 0.0) + { + this.spriteDirection = this.direction; + if (this.frame.Y < num1 * 10 || this.frame.Y > num1 * 13 || (double) this.ai[1] == 29.0) + { + this.frame.Y = num1 * 10; + this.frameCounter = 0.0; + } + if (++this.frameCounter >= 6.0 && this.frame.Y < num1 * 13) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + break; + } + break; + } + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + if ((double) this.velocity.Y != 0.0 || this.direction == -1 && (double) this.velocity.X > 0.0 || this.direction == 1 && (double) this.velocity.X < 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 8; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 9; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter >= 64.0 || this.frameCounter < 0.0) + this.frameCounter = 0.0; + this.frame.Y = num1 * (int) (this.frameCounter / 8.0); + break; + case 555: + case 556: + case 557: + if ((double) this.ai[1] > 0.0 && (double) this.ai[0] > 0.0) + { + this.spriteDirection = this.direction; + if (this.frame.Y < num1 * 10 || this.frame.Y > num1 * 16 || (double) this.ai[1] == 41.0) + { + this.frame.Y = num1 * 10; + this.frameCounter = 0.0; + } + if (++this.frameCounter >= 6.0 && this.frame.Y < num1 * 16) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + break; + } + break; + } + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + if ((double) this.velocity.Y != 0.0 || this.direction == -1 && (double) this.velocity.X > 0.0 || this.direction == 1 && (double) this.velocity.X < 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter >= 64.0 || this.frameCounter < 0.0) + this.frameCounter = 0.0; + this.frame.Y = num1 * ((int) (this.frameCounter / 8.0) + 2); + break; + case 558: + case 559: + case 560: + if ((double) this.velocity.X > 0.0) + this.spriteDirection = 1; + if ((double) this.velocity.X < 0.0) + this.spriteDirection = -1; + float num132 = this.velocity.ToRotation(); + if ((double) this.velocity.X < 0.0) + num132 += 3.141593f; + if ((double) this.ai[0] != 2.0) + num132 = this.velocity.X * 0.1f; + this.rotation = num132; + if ((double) this.ai[0] == 2.0) + { + this.frame.Y = num1 * 4; + break; + } + if (++this.frameCounter >= 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + if (this.frame.Y >= num1 * 4) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 561: + case 562: + case 563: + if ((double) this.ai[1] > 0.0 && (double) this.ai[0] > 0.0) + { + this.spriteDirection = this.direction; + if (this.frame.Y < num1 * 10 || this.frame.Y > num1 * 13 || (double) this.ai[1] == 89.0) + { + this.frame.Y = num1 * 10; + this.frameCounter = 0.0; + } + if (++this.frameCounter >= 6.0 && this.frame.Y < num1 * 13) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + break; + } + break; + } + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + if ((double) this.velocity.Y != 0.0 || this.direction == -1 && (double) this.velocity.X > 0.0 || this.direction == 1 && (double) this.velocity.X < 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 8; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 9; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter >= 64.0 || this.frameCounter < 0.0) + this.frameCounter = 0.0; + this.frame.Y = num1 * (int) (this.frameCounter / 8.0); + break; + case 564: + case 565: + int y = this.frame.Y; + this.frame.Width = 80; + this.frame.Height = 80; + int num133; + if ((double) this.ai[0] > 0.0 && (double) this.ai[1] == 0.0) + { + this.spriteDirection = this.direction; + if (y < 5 || y > 13) + this.frameCounter = 0.0; + num133 = 5; + ++this.frameCounter; + int num134 = 0; + int num135; + if (this.frameCounter >= (double) (7 * (num135 = num134 + 1))) + num133 = 6; + int num136; + if (this.frameCounter >= (double) (7 * (num136 = num135 + 1))) + num133 = 7; + int num137; + if (this.frameCounter >= (double) (7 * (num137 = num136 + 1))) + num133 = 5; + int num138; + if (this.frameCounter >= (double) (7 * (num138 = num137 + 1))) + num133 = 6; + int num139; + if (this.frameCounter >= (double) (7 * (num139 = num138 + 1))) + num133 = 7; + int num140; + if (this.frameCounter >= (double) (7 * (num140 = num139 + 1))) + num133 = 5; + int num141; + if (this.frameCounter >= (double) (7 * (num141 = num140 + 1))) + num133 = 6; + int num142; + if (this.frameCounter >= (double) (7 * (num142 = num141 + 1))) + num133 = 7; + int num143; + if (this.frameCounter >= (double) (7 * (num143 = num142 + 1))) + num133 = 8; + int num144; + if (this.frameCounter >= (double) (7 * (num144 = num143 + 1))) + num133 = 9; + double frameCounter1 = this.frameCounter; + int num145 = num144 + 1; + int num146 = num145; + double num147 = (double) (7 * num145); + if (frameCounter1 >= num147) + num133 = 10; + double frameCounter2 = this.frameCounter; + int num148 = num146 + 1; + int num149 = num148; + double num150 = (double) (7 * num148); + if (frameCounter2 >= num150) + num133 = 11; + double frameCounter3 = this.frameCounter; + int num151 = num149 + 1; + int num152 = num151; + double num153 = (double) (7 * num151); + if (frameCounter3 >= num153) + num133 = 12; + if (this.frameCounter >= (double) (7 * (num152 + 1))) + { + num133 = 5; + this.frameCounter = 0.0; + } + } + else if ((double) this.ai[0] > 0.0 && (double) this.ai[1] == 1.0) + { + this.spriteDirection = this.direction; + if (y < 13 || y > 25) + this.frameCounter = 0.0; + num133 = 13; + ++this.frameCounter; + int num154 = 0; + double frameCounter4 = this.frameCounter; + int num155 = num154 + 1; + int num156 = num155; + double num157 = (double) (8 * num155); + if (frameCounter4 >= num157) + num133 = 14; + double frameCounter5 = this.frameCounter; + int num158 = num156 + 1; + int num159 = num158; + double num160 = (double) (8 * num158); + if (frameCounter5 >= num160) + num133 = 15; + double frameCounter6 = this.frameCounter; + int num161 = num159 + 1; + int num162 = num161; + double num163 = (double) (8 * num161); + if (frameCounter6 >= num163) + num133 = 16; + double frameCounter7 = this.frameCounter; + int num164 = num162 + 1; + int num165 = num164; + double num166 = (double) (8 * num164); + if (frameCounter7 >= num166) + num133 = 17; + double frameCounter8 = this.frameCounter; + int num167 = num165 + 1; + int num168 = num167; + double num169 = (double) (8 * num167); + if (frameCounter8 >= num169) + num133 = 18; + double frameCounter9 = this.frameCounter; + int num170 = num168 + 1; + int num171 = num170; + double num172 = (double) (8 * num170); + if (frameCounter9 >= num172) + num133 = 19; + double frameCounter10 = this.frameCounter; + int num173 = num171 + 1; + int num174 = num173; + double num175 = (double) (8 * num173); + if (frameCounter10 >= num175) + num133 = 20; + double frameCounter11 = this.frameCounter; + int num176 = num174 + 1; + int num177 = num176; + double num178 = (double) (8 * num176); + if (frameCounter11 >= num178) + num133 = 18; + double frameCounter12 = this.frameCounter; + int num179 = num177 + 1; + int num180 = num179; + double num181 = (double) (8 * num179); + if (frameCounter12 >= num181) + num133 = 19; + double frameCounter13 = this.frameCounter; + int num182 = num180 + 1; + int num183 = num182; + double num184 = (double) (8 * num182); + if (frameCounter13 >= num184) + num133 = 20; + double frameCounter14 = this.frameCounter; + int num185 = num183 + 1; + int num186 = num185; + double num187 = (double) (8 * num185); + if (frameCounter14 >= num187) + num133 = 21; + double frameCounter15 = this.frameCounter; + int num188 = num186 + 1; + int num189 = num188; + double num190 = (double) (8 * num188); + if (frameCounter15 >= num190) + num133 = 22; + double frameCounter16 = this.frameCounter; + int num191 = num189 + 1; + int num192 = num191; + double num193 = (double) (8 * num191); + if (frameCounter16 >= num193) + num133 = 23; + double frameCounter17 = this.frameCounter; + int num194 = num192 + 1; + int num195 = num194; + double num196 = (double) (8 * num194); + if (frameCounter17 >= num196) + num133 = 24; + double frameCounter18 = this.frameCounter; + int num197 = num195 + 1; + int num198 = num197; + double num199 = (double) (8 * num197); + if (frameCounter18 >= num199) + num133 = 25; + if (this.frameCounter >= (double) (8 * (num198 + 1))) + { + num133 = 14; + this.frameCounter = 0.0; + } + } + else if ((double) this.ai[0] > 0.0 && (double) this.ai[1] == 2.0) + { + this.spriteDirection = this.direction; + if (y < 26 || y > 40) + this.frameCounter = 0.0; + num133 = 26; + ++this.frameCounter; + int num200 = 0; + double frameCounter19 = this.frameCounter; + int num201 = num200 + 1; + int num202 = num201; + double num203 = (double) (8 * num201); + if (frameCounter19 >= num203) + num133 = 27; + double frameCounter20 = this.frameCounter; + int num204 = num202 + 1; + int num205 = num204; + double num206 = (double) (8 * num204); + if (frameCounter20 >= num206) + num133 = 28; + double frameCounter21 = this.frameCounter; + int num207 = num205 + 1; + int num208 = num207; + double num209 = (double) (8 * num207); + if (frameCounter21 >= num209) + num133 = 29; + double frameCounter22 = this.frameCounter; + int num210 = num208 + 1; + int num211 = num210; + double num212 = (double) (8 * num210); + if (frameCounter22 >= num212) + num133 = 26; + double frameCounter23 = this.frameCounter; + int num213 = num211 + 1; + int num214 = num213; + double num215 = (double) (8 * num213); + if (frameCounter23 >= num215) + num133 = 27; + double frameCounter24 = this.frameCounter; + int num216 = num214 + 1; + int num217 = num216; + double num218 = (double) (8 * num216); + if (frameCounter24 >= num218) + num133 = 28; + double frameCounter25 = this.frameCounter; + int num219 = num217 + 1; + int num220 = num219; + double num221 = (double) (8 * num219); + if (frameCounter25 >= num221) + num133 = 29; + double frameCounter26 = this.frameCounter; + int num222 = num220 + 1; + int num223 = num222; + double num224 = (double) (8 * num222); + if (frameCounter26 >= num224) + num133 = 26; + double frameCounter27 = this.frameCounter; + int num225 = num223 + 1; + int num226 = num225; + double num227 = (double) (8 * num225); + if (frameCounter27 >= num227) + num133 = 27; + double frameCounter28 = this.frameCounter; + int num228 = num226 + 1; + int num229 = num228; + double num230 = (double) (8 * num228); + if (frameCounter28 >= num230) + num133 = 28; + double frameCounter29 = this.frameCounter; + int num231 = num229 + 1; + int num232 = num231; + double num233 = (double) (8 * num231); + if (frameCounter29 >= num233) + num133 = 29; + double frameCounter30 = this.frameCounter; + int num234 = num232 + 1; + int num235 = num234; + double num236 = (double) (8 * num234); + if (frameCounter30 >= num236) + num133 = 30; + double frameCounter31 = this.frameCounter; + int num237 = num235 + 1; + int num238 = num237; + double num239 = (double) (8 * num237); + if (frameCounter31 >= num239) + num133 = 31; + double frameCounter32 = this.frameCounter; + int num240 = num238 + 1; + int num241 = num240; + double num242 = (double) (8 * num240); + if (frameCounter32 >= num242) + num133 = 32; + double frameCounter33 = this.frameCounter; + int num243 = num241 + 1; + int num244 = num243; + double num245 = (double) (8 * num243); + if (frameCounter33 >= num245) + num133 = 33; + double frameCounter34 = this.frameCounter; + int num246 = num244 + 1; + int num247 = num246; + double num248 = (double) (8 * num246); + if (frameCounter34 >= num248) + num133 = 34; + double frameCounter35 = this.frameCounter; + int num249 = num247 + 1; + int num250 = num249; + double num251 = (double) (8 * num249); + if (frameCounter35 >= num251) + num133 = 35; + double frameCounter36 = this.frameCounter; + int num252 = num250 + 1; + int num253 = num252; + double num254 = (double) (8 * num252); + if (frameCounter36 >= num254) + num133 = 36; + double frameCounter37 = this.frameCounter; + int num255 = num253 + 1; + int num256 = num255; + double num257 = (double) (8 * num255); + if (frameCounter37 >= num257) + num133 = 37; + double frameCounter38 = this.frameCounter; + int num258 = num256 + 1; + int num259 = num258; + double num260 = (double) (8 * num258); + if (frameCounter38 >= num260) + num133 = 38; + double frameCounter39 = this.frameCounter; + int num261 = num259 + 1; + int num262 = num261; + double num263 = (double) (8 * num261); + if (frameCounter39 >= num263) + num133 = 39; + double frameCounter40 = this.frameCounter; + int num264 = num262 + 1; + int num265 = num264; + double num266 = (double) (8 * num264); + if (frameCounter40 >= num266) + num133 = 40; + if (this.frameCounter >= (double) (8 * (num265 + 1))) + { + num133 = 26; + this.frameCounter = 0.0; + } + } + else + { + this.frameCounter = this.frameCounter + (double) this.velocity.Length() * 0.100000001490116 + 1.0; + if (this.frameCounter >= 40.0 || this.frameCounter < 0.0) + this.frameCounter = 0.0; + num133 = (int) (this.frameCounter / 8.0); + } + this.frame.Y = num133; + break; + case 566: + case 567: + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + if ((double) this.velocity.Y != 0.0 || this.direction == -1 && (double) this.velocity.X > 0.0 || this.direction == 1 && (double) this.velocity.X < 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 8; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter >= 64.0 || this.frameCounter < 0.0) + this.frameCounter = 0.0; + this.frame.Y = num1 * (int) (this.frameCounter / 8.0); + break; + case 568: + case 569: + if ((double) this.ai[0] > 0.0) + { + int num267 = this.frame.Y / num1; + this.spriteDirection = this.direction; + if (num267 < 5 || num267 > 16) + this.frameCounter = 0.0; + int num268 = 7; + ++this.frameCounter; + int num269 = 0; + int num270; + if (this.frameCounter >= (double) (5 * (num270 = num269 + 1))) + num268 = 8; + int num271; + if (this.frameCounter >= (double) (5 * (num271 = num270 + 1))) + num268 = 9; + int num272; + if (this.frameCounter >= (double) (5 * (num272 = num271 + 1))) + num268 = 10; + int num273; + if (this.frameCounter >= (double) (5 * (num273 = num272 + 1))) + num268 = 7; + int num274; + if (this.frameCounter >= (double) (5 * (num274 = num273 + 1))) + num268 = 8; + int num275; + if (this.frameCounter >= (double) (5 * (num275 = num274 + 1))) + num268 = 9; + int num276; + if (this.frameCounter >= (double) (5 * (num276 = num275 + 1))) + num268 = 10; + int num277; + if (this.frameCounter >= (double) (5 * (num277 = num276 + 1))) + num268 = 7; + int num278; + if (this.frameCounter >= (double) (5 * (num278 = num277 + 1))) + num268 = 8; + int num279; + if (this.frameCounter >= (double) (5 * (num279 = num278 + 1))) + num268 = 9; + int num280; + if (this.frameCounter >= (double) (5 * (num280 = num279 + 1))) + num268 = 10; + int num281; + if (this.frameCounter >= (double) (5 * (num281 = num280 + 1))) + num268 = 7; + int num282; + if (this.frameCounter >= (double) (5 * (num282 = num281 + 1))) + num268 = 8; + int num283; + if (this.frameCounter >= (double) (5 * (num283 = num282 + 1))) + num268 = 9; + int num284; + if (this.frameCounter >= (double) (5 * (num284 = num283 + 1))) + num268 = 10; + int num285; + if (this.frameCounter >= (double) (5 * (num285 = num284 + 1))) + num268 = 7; + int num286; + if (this.frameCounter >= (double) (5 * (num286 = num285 + 1))) + num268 = 8; + int num287; + if (this.frameCounter >= (double) (5 * (num287 = num286 + 1))) + num268 = 9; + int num288; + if (this.frameCounter >= (double) (5 * (num288 = num287 + 1))) + num268 = 10; + int num289; + if (this.frameCounter >= (double) (5 * (num289 = num288 + 1))) + num268 = 7; + int num290; + if (this.frameCounter >= (double) (5 * (num290 = num289 + 1))) + num268 = 8; + int num291; + if (this.frameCounter >= (double) (5 * (num291 = num290 + 1))) + num268 = 9; + int num292; + if (this.frameCounter >= (double) (5 * (num292 = num291 + 1))) + num268 = 10; + int num293; + if (this.frameCounter >= (double) (5 * (num293 = num292 + 1))) + num268 = 11; + int num294; + if (this.frameCounter >= (double) (5 * (num294 = num293 + 1))) + num268 = 12; + int num295; + if (this.frameCounter >= (double) (5 * (num295 = num294 + 1))) + num268 = 13; + int num296; + if (this.frameCounter >= (double) (5 * (num296 = num295 + 1))) + num268 = 14; + if (this.frameCounter >= 270.0) + { + num268 = 14; + this.frameCounter -= 10.0; + } + this.frame.Y = num1 * num268; + break; + } + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + if ((double) this.velocity.Y != 0.0 || this.direction == -1 && (double) this.velocity.X > 0.0 || this.direction == 1 && (double) this.velocity.X < 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 4; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 6; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter >= 56.0 || this.frameCounter < 0.0) + this.frameCounter = 0.0; + this.frame.Y = num1 * (int) (this.frameCounter / 8.0); + break; + case 570: + case 571: + if ((double) this.ai[1] > 0.0 && (double) this.ai[0] > 0.0) + { + this.spriteDirection = this.direction; + if (this.frame.Y < num1 * 10 || this.frame.Y > num1 * 15 || (double) this.ai[1] == 59.0) + { + this.frame.Y = num1 * 10; + this.frameCounter = 0.0; + } + int num297 = 5; + if (this.frame.Y == num1 * 14) + num297 = 35; + if (++this.frameCounter >= (double) num297 && this.frame.Y < num1 * 15) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + break; + } + break; + } + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + if ((double) this.velocity.Y != 0.0 || this.direction == -1 && (double) this.velocity.X > 0.0 || this.direction == 1 && (double) this.velocity.X < 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 9; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter >= 64.0 || this.frameCounter < 0.0) + this.frameCounter = 0.0; + this.frame.Y = num1 * (int) (this.frameCounter / 8.0 + 2.0); + break; + case 572: + case 573: + if ((double) this.ai[0] > 0.0 && (double) this.ai[1] == 0.0) + { + this.spriteDirection = this.direction; + if (this.frame.Y != num1 * 8 || this.frameCounter > 2.0) + { + this.frame.Y = num1 * 8; + this.frameCounter = 0.0; + } + if (this.frameCounter == 0.0) + { + this.frameCounter = 1.0; + EmoteBubble.NewBubble(3, new WorldUIAnchor((Entity) this), 60); + break; + } + break; + } + if ((double) this.ai[1] == 1.0) + { + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + if ((double) this.velocity.Y != 0.0 || this.direction == -1 && (double) this.velocity.X > 0.0 || this.direction == 1 && (double) this.velocity.X < 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 17; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 8; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter >= 64.0 || this.frameCounter < 0.0) + this.frameCounter = 0.0; + this.frame.Y = num1 * ((int) (this.frameCounter / 8.0) + 8); + break; + } + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + if ((double) this.velocity.Y != 0.0 || this.direction == -1 && (double) this.velocity.X > 0.0 || this.direction == 1 && (double) this.velocity.X < 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 16; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter >= 64.0 || this.frameCounter < 0.0) + this.frameCounter = 0.0; + this.frame.Y = num1 * (int) (this.frameCounter / 8.0); + break; + case 574: + case 575: + if ((double) this.velocity.X > 0.0) + this.spriteDirection = 1; + if ((double) this.velocity.X < 0.0) + this.spriteDirection = -1; + float rotation = this.velocity.ToRotation(); + if ((double) this.velocity.X < 0.0) + rotation += 3.141593f; + this.rotation = this.rotation.AngleTowards(rotation, 0.02f); + if ((double) this.ai[0] != 0.0) + { + if (this.frame.Y < num1 * 2) + { + this.frame.Y = num1 * 2; + this.frameCounter = 0.0; + } + int num298 = 4; + if (this.frame.Y >= num1 * 5) + num298 = 8; + Vector2 Position = this.Center + new Vector2((float) (56 * this.spriteDirection), -30f).RotatedBy((double) this.rotation); + if (++this.frameCounter >= (double) num298 && this.frame.Y < num1 * 9) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y == num1 * 9) + { + for (int index = 0; index < 8; ++index) + { + Dust dust = Dust.NewDustDirect(Position, 0, 0, 6, Alpha: 100); + dust.velocity *= 3f; + dust.scale = 0.6f; + dust.fadeIn = 1.2f; + dust.noGravity = true; + dust.noLight = true; + } + } + } + if (this.frame.Y >= num1 * 9 && (double) this.ai[0] < 3.0) + { + Vector2 vector2_1 = Position; + Vector2 vector2_2 = Position + (this.oldPos[3] - this.position); + int maxValue = 5; + if (this.frameCounter > 60.0) + maxValue = 4; + if (this.frameCounter > 180.0) + maxValue = 3; + if (this.frameCounter > 300.0) + maxValue = 2; + if (this.frameCounter > 600.0) + maxValue = 1; + for (int index = 0; index < 2; ++index) + { + if (Main.rand.Next(maxValue) == 0) + { + Dust dust = Dust.NewDustDirect(Vector2.Lerp(vector2_2, vector2_1, (float) ((double) index / 10.0 + 0.100000001490116)), 0, 0, 6, Alpha: 50); + dust.scale = 0.3f; + dust.fadeIn = 1.5f; + dust.noGravity = true; + dust.noLight = true; + } + } + break; + } + break; + } + if (++this.frameCounter >= 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + if (this.frame.Y >= num1 * 2) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 576: + case 577: + int num299 = this.frame.Y; + this.frame.Width = 80; + if ((double) this.ai[0] > 0.0 && (double) this.ai[1] == 0.0) + { + this.spriteDirection = this.direction; + if (num299 < 11 || num299 > 20) + { + num299 = 11; + this.frameCounter = 0.0; + } + int num300 = 4; + if (num299 == 13 || num299 == 19) + num300 = 8; + if (num299 == 14 || num299 == 18) + num300 = 2; + if (++this.frameCounter >= (double) num300 && num299 < 20) + { + this.frameCounter = 0.0; + ++num299; + } + } + else if ((double) this.ai[0] > 0.0 && (double) this.ai[1] == 2.0) + { + this.spriteDirection = this.direction; + if (num299 < 37 || num299 > 47) + { + num299 = 39; + this.frameCounter = 0.0; + } + int num301 = 5; + if (num299 == 42) + num301 = 6; + if (num299 == 45) + num301 = 8; + if (num299 == 46) + num301 = 4; + if (num299 == 47) + num301 = 26; + if (num299 == 37 || num299 == 38) + num301 = 7; + bool flag4 = true; + if (num299 == 46 && (double) this.velocity.Y != 0.0) + flag4 = false; + if (num299 == 38) + flag4 = false; + if (flag4) + ++this.frameCounter; + if (this.frameCounter >= (double) num301) + { + if (num299 < 47) + { + this.frameCounter = 0.0; + ++num299; + } + else + { + num299 = 37; + this.frameCounter = 0.0; + } + } + } + else if ((double) this.ai[0] > 0.0 && (double) this.ai[1] == 1.0) + { + this.spriteDirection = this.direction; + if (num299 < 21 || num299 > 38) + { + num299 = 21; + this.frameCounter = 0.0; + } + if (++this.frameCounter >= 5.0 && num299 < 38) + { + this.frameCounter = 0.0; + ++num299; + } + } + else + { + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + if ((double) this.velocity.Y != 0.0) + { + this.frameCounter = 0.0; + num299 = 43; + } + else if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + num299 = 0; + } + else + { + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter >= 60.0 || this.frameCounter < 0.0) + this.frameCounter = 0.0; + num299 = 1 + (int) (this.frameCounter / 6.0); + } + } + this.frame.Y = num299; + break; + case 578: + this.rotation = this.velocity.X * 0.1f; + if (++this.frameCounter >= 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + if (this.frame.Y >= num1 * 4) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 583: + case 584: + case 585: + this.rotation = this.velocity.X * 0.1f; + if (++this.frameCounter >= 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + if (this.frame.Y >= num1 * 4) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 586: + if (this.wet) + { + if ((double) this.velocity.X < 0.0) + this.direction = -1; + if ((double) this.velocity.X > 0.0) + this.direction = 1; + this.spriteDirection = this.direction; + this.frameCounter += (double) Math.Abs(this.velocity.Length()); + ++this.frameCounter; + if (this.frameCounter > 60.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 > 1) + { + this.frame.Y = 0; + break; + } + if (this.frame.Y / num1 < 0) + { + this.frame.Y = 0; + break; + } + break; + } + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = num1; + this.frameCounter = 0.0; + break; + } + int num302 = 8; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.0; + this.frameCounter += 0.5; + if (this.frameCounter > (double) num302) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + case 589: + int num303 = this.frame.Y / num1; + ++this.frameCounter; + if ((double) this.velocity.Y != 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + } + if (num303 >= 12) + { + if (this.frameCounter > 6.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + break; + } + if (num303 >= 11) + { + if (this.frameCounter > (double) Main.rand.Next(40, 140)) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + break; + } + break; + } + if (num303 >= 8) + { + if (this.frameCounter > 3.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y == num1 * 9) + { + Vector2 position = this.position; + position.Y += (float) (this.height - 6); + if (this.direction == 1) + position.X += 30f; + else + position.X -= 22f; + for (int index = 0; index < 4; ++index) + Dust.NewDust(position, 1, 1, 32); + break; + } + break; + } + break; + } + if (num303 >= 7) + { + if (this.frameCounter > (double) Main.rand.Next(30, 90)) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + break; + } + break; + } + if (num303 >= 4) + { + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + break; + } + break; + } + if (num303 >= 1) + { + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y >= num1 * 4 && Main.rand.Next(3) != 0) + { + this.frame.Y = 0; + break; + } + break; + } + break; + } + if (this.frameCounter > (double) Main.rand.Next(90, 450)) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + break; + } + break; + case 593: + if ((double) this.velocity.Y == 0.0) + { + this.rotation = 0.0f; + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X) * 2.0; + ++this.frameCounter; + if (this.frameCounter > 10.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = 0; + if ((double) this.velocity.Y > 4.0) + { + this.rotation -= this.velocity.Y * 0.01f; + break; + } + break; + case 594: + this.spriteDirection = 1; + this.frame.Y = (int) this.ai[2]; + this.frame.Width = 32; + break; + case 595: + case 596: + case 597: + case 598: + case 599: + case 600: + case 601: + this.spriteDirection = this.direction; + int num304 = 3; + if (++this.frameCounter >= (double) (Main.npcFrameCount[this.type] * num304)) + this.frameCounter = 0.0; + this.frame.Y = num1 * ((int) this.frameCounter / num304); + break; + case 602: + this.spriteDirection = this.direction; + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + ++this.frameCounter; + if (this.frameCounter >= 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * 10) + this.frame.Y = num1 * 3; + if (this.frame.Y < num1 * 3) + { + this.frame.Y = num1 * 3; + break; + } + break; + case 603: + this.spriteDirection = this.direction; + if (this.wet) + { + ++this.frameCounter; + if (this.frameCounter >= 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y > num1 * 2) + this.frame.Y = num1; + if (this.frame.Y < num1) + this.frame.Y = num1; + this.rotation = 0.0f; + break; + } + if ((double) this.velocity.X == 0.0 && (double) this.velocity.Y == 0.0) + { + this.frame.Y = num1; + this.frameCounter = 0.0; + this.rotation = 0.0f; + break; + } + this.rotation = this.velocity.X * 0.1f; + ++this.frameCounter; + if (this.frameCounter >= 4.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type]) + this.frame.Y = num1 * 11; + if (this.frame.Y < num1 * 11) + { + this.frame.Y = num1 * 11; + break; + } + break; + case 604: + case 605: + this.spriteDirection = this.direction; + int num305 = 2; + if (++this.frameCounter >= (double) (4 * num305)) + this.frameCounter = 0.0; + this.frame.Y = (double) this.velocity.Y != 0.0 ? num1 * (4 + (int) this.frameCounter / num305) : num1 * ((int) this.frameCounter / num305); + break; + case 610: + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.velocity.X == 0.0) + { + ++this.frameCounter; + if (this.frameCounter > 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 > 1) + { + this.frame.Y = 0; + break; + } + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X) * 0.5; + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X) * 0.5; + ++this.frameCounter; + if (this.frameCounter > 6.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = num1 * 2; + break; + } + break; + case 611: + this.spriteDirection = -this.direction; + this.rotation = this.velocity.X * 0.1f; + if ((double) this.velocity.X == 0.0 && (double) this.velocity.Y == 0.0) + { + switch (this.frame.Y / num1) + { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + if ((int) this.frameCounter % 40 != 0 || Main.rand.Next(80) == 0) + ++this.frameCounter; + if ((this.frameCounter + 1.0) % 40.0 == 39.0) + this.frameCounter = (double) (40 * Main.rand.Next(3)); + int num306 = (int) this.frameCounter % 40 / 10; + int num307 = (int) this.frameCounter / 40; + int num308 = 0; + switch (num307) + { + case 0: + if (num306 == 3) + num306 = 1; + num308 = num306; + break; + case 1: + if (num306 == 3) + num306 = 1; + num308 = 0; + if (num306 != 0) + { + num308 = 2 + num306; + break; + } + break; + case 2: + num308 = 0; + if (num306 != 0) + { + num308 = 4 + num306; + break; + } + break; + } + this.frame.Y = num1 * num308; + break; + default: + this.frame.Y = 0; + goto case 0; + } + } + else + { + ++this.frameCounter; + if (this.frameCounter >= 5.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num1 * Main.npcFrameCount[this.type] || this.frame.Y < num1 * 8) + { + this.frame.Y = num1 * 8; + break; + } + break; + } + break; + case 612: + case 613: + if (this.IsABestiaryIconDummy) + { + ++this.frameCounter; + if (this.frameCounter > 50.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + this.frame.Y = (int) Utils.WrappedLerp(0.0f, 4f, (float) this.frameCounter / 50f) * num1; + break; + } + bool flag5 = true; + if (this.frame.Y == 0 && Main.rand.Next(180) != 0) + flag5 = false; + if (flag5) + ++this.frameCounter; + if ((double) this.velocity.X != 0.0) + this.spriteDirection = Math.Sign(this.velocity.X); + int num309 = 10; + bool flag6 = (double) Math.Abs(this.velocity.X) > 1.0; + if ((double) this.ai[1] == 1.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 4; + } + if ((double) Math.Abs(this.velocity.Y) > 0.100000001490116 | flag6) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 4; + } + else if (this.frame.Y == 0) + num309 = 2; + if (this.frame.Y == num1 * 4) + { + num309 = 60; + if (!flag6) + num309 = 2; + } + if (this.frameCounter >= (double) num309) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= 5) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 615: + this.spriteDirection = this.direction; + if (!this.wet && (double) this.ai[2] == 1.0) + { + this.frame.Y = 4 * num1; + break; + } + if (!this.wet) + ++this.frameCounter; + if (++this.frameCounter >= (double) (7 * (Main.npcFrameCount[this.type] - 1))) + this.frameCounter = 0.0; + this.frame.Y = (int) (this.frameCounter / 7.0) * num1; + break; + case 616: + case 617: + int num310 = 8; + int num311 = 5; + if ((double) this.velocity.X == 0.0) + num311 = 10; + this.spriteDirection = this.direction; + if (this.wet) + { + ++this.frameCounter; + if (this.frameCounter > (double) num311) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y > num1 * 13) + { + this.frame.Y = num1 * 8; + break; + } + break; + } + break; + } + ++this.frameCounter; + if (this.frameCounter > (double) num310) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y > num1 * 7) + this.frame.Y = 0; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + } + if ((double) this.velocity.Y != 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 8; + break; + } + break; + case 618: + if (++this.frameCounter >= 5.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 619: + if (++this.frameCounter >= 6.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y / num1 >= Main.npcFrameCount[this.type]) + { + this.frame.Y = 0; + break; + } + break; + } + break; + case 620: + if ((double) this.ai[1] > 0.0 && (double) this.ai[0] > 0.0) + { + this.spriteDirection = this.direction; + if (this.frame.Y < num1 * 14 || this.frame.Y > num1 * 20 || (double) this.ai[1] == 59.0) + { + this.frame.Y = num1 * 14; + this.frameCounter = 0.0; + } + int num312 = 5; + if (this.frame.Y == num1 * 17 || this.frame.Y == num1 * 16) + num312 = 3; + if (++this.frameCounter >= (double) num312 && this.frame.Y < num1 * 20) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if ((double) this.ai[1] > 0.0 && this.frame.Y == num1 * 18) + { + this.frame.Y = num1 * 16; + break; + } + break; + } + break; + } + if (this.wet) + { + if ((double) this.velocity.X < 0.0) + this.direction = -1; + if ((double) this.velocity.X > 0.0) + this.direction = 1; + if (this.spriteDirection != this.direction) + { + this.rotation *= -1f; + this.spriteDirection = this.direction; + } + float num313 = (float) Math.Atan2((double) this.velocity.Y * (double) this.direction, (double) this.velocity.X * (double) this.direction); + if ((double) Math.Abs(this.rotation - num313) >= 3.14159274101257) + { + if ((double) num313 < (double) this.rotation) + this.rotation -= 6.283185f; + else + this.rotation += 6.283185f; + } + this.rotation = (float) (((double) this.rotation * 4.0 + (double) num313) / 5.0); + this.frameCounter += (double) Math.Abs(this.velocity.Length()); + ++this.frameCounter; + if (this.frameCounter > 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 > 13) + { + this.frame.Y = num1 * 8; + break; + } + if (this.frame.Y / num1 < 8) + { + this.frame.Y = num1 * 13; + break; + } + break; + } + if ((double) this.rotation > 3.14) + this.rotation -= 6.28f; + if ((double) this.rotation > -0.01 && (double) this.rotation < 0.01) + this.rotation = 0.0f; + else + this.rotation *= 0.9f; + if ((double) this.velocity.Y == 0.0) + { + if (this.direction == 1) + this.spriteDirection = 1; + if (this.direction == -1) + this.spriteDirection = -1; + if ((double) this.velocity.X == 0.0) + { + this.frame.Y = 0; + this.frameCounter = 0.0; + break; + } + if (this.frame.Y < num1 * 2) + this.frame.Y = num1 * 2; + this.frameCounter += (double) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 9.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y / num1 > 7) + { + this.frame.Y = num1 * 2; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = num1; + break; + case 624: + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + if ((double) this.velocity.X == 0.0 && (double) this.velocity.Y == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + if ((double) this.velocity.Y < 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 9 * num1; + break; + } + if ((double) this.velocity.Y > 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 10 * num1; + break; + } + this.frameCounter += (double) Math.Abs(this.velocity.X); + if (this.frameCounter > 8.0) + { + int num314 = this.frame.Y / num1; + this.frameCounter -= 8.0; + int num315 = num314 + 1; + if (num315 > 8) + num315 = 1; + this.frame.Y = num315 * num1; + break; + } + break; + case 625: + int num316 = 7; + int num317 = 4; + if ((double) this.velocity.X == 0.0) + num317 = 8; + this.spriteDirection = this.direction; + if (this.wet) + { + if (this.frame.Y < num1 * 6) + this.frame.Y = num1 * 6; + ++this.frameCounter; + if (this.frameCounter > (double) num317) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y > num1 * 11) + { + this.frame.Y = num1 * 6; + break; + } + break; + } + break; + } + if (this.frame.Y > num1 * 5) + this.frame.Y = 0; + ++this.frameCounter; + if (this.frameCounter > (double) num316) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + if (this.frame.Y > num1 * 5) + this.frame.Y = 0; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + break; + case 626: + case 627: + if ((double) this.velocity.X != 0.0) + this.spriteDirection = (double) this.velocity.X < 0.0 ? -1 : 1; + if (this.IsABestiaryIconDummy) + { + ++this.frameCounter; + if (this.frameCounter > 5.0) + { + this.frameCounter = 0.0; + this.frame.Y += num1; + } + if (this.frame.Y > num1 * 5) + { + this.frame.Y = 0; + break; + } + break; + } + this.frame.Y = this.wet ? ((double) this.velocity.Length() <= 0.150000005960464 ? ((double) this.velocity.Length() <= 0.0500000007450581 ? ((double) this.velocity.Length() <= 0.025000000372529 ? 0 : num1) : num1 * 2) : num1 * 3) : 0; + break; + case 628: + this.spriteDirection = (double) Main.WindForVisuals > 0.0 ? -1 : 1; + if (this.IsABestiaryIconDummy) + { + int num318 = this.frame.Y / num1; + int num319 = 5; + this.spriteDirection = 1; + ++this.frameCounter; + if (this.frameCounter > (double) num319) + { + this.frameCounter -= (double) num319; + int num320 = num318 + 1; + if (num320 > 5) + num320 = 0; + this.frame.Y = num320 * num1; + break; + } + break; + } + if ((double) this.ai[0] == 0.0) + { + int num321 = this.frame.Y / num1; + int num322 = 8; + if (num321 == 6) + { + this.frameCounter += 1.0 + 0.5 * (double) Math.Abs(Main.WindForVisuals); + if (this.frameCounter > (double) num322) + { + this.frameCounter -= (double) num322; + this.frame.Y = 0 * num1; + break; + } + break; + } + if (num321 > 5) + { + int num323 = 6; + this.frameCounter = 0.0; + this.frame.Y = num323 * num1; + break; + } + this.frameCounter += 1.0 + 0.5 * (double) Math.Abs(Main.WindForVisuals); + if (this.frameCounter > (double) num322) + { + this.frameCounter -= (double) num322; + int num324 = num321 + 1; + if (num324 > 5) + num324 = 0; + this.frame.Y = num324 * num1; + break; + } + break; + } + if ((double) this.localAI[0] == 0.0) + { + ++this.frameCounter; + if (this.frameCounter > 4.0) + { + this.frameCounter = 0.0; + int num325 = this.frame.Y / num1; + int num326; + if (num325 == 6) + num326 = 7; + else if (num325 < 7) + { + num326 = 6; + } + else + { + num326 = num325 + 1; + if (num326 > 10) + num326 = 7; + } + this.frame.Y = num326 * num1; + break; + } + break; + } + if ((double) this.localAI[0] == 1.0) + { + int num327 = this.frame.Y / num1; + int num328 = (int) MathHelper.Lerp(7f, 20f, (float) this.frameCounter / 80f); + if (num328 > 19) + num328 = 19; + if (num328 > 16) + num328 -= 9; + ++this.frameCounter; + if (this.frameCounter > 80.0) + this.frameCounter = 0.0; + this.frame.Y = num328 * num1; + break; + } + break; + case 631: + int num329 = 8; + if ((double) this.velocity.Y == 0.0) + { + this.spriteDirection = this.direction; + if ((double) this.ai[2] != 0.0 && (double) this.ai[2] < 100.0) + { + float amount = (this.ai[2] - 76f) / 24f; + Player player = Main.player[this.target]; + bool flag7 = player != null && ((double) player.Center.X < (double) this.Center.X ? this.direction == -1 : this.direction == 1); + bool flag8 = player != null && player.Hitbox.Intersects(this.Hitbox); + this.frame.Y = !(player != null & flag7) || flag8 || !Collision.CanHit((Entity) player, (Entity) this) ? (!(flag7 & flag8) ? 0 : (int) MathHelper.Lerp(10f, 15f, amount) * num1) : (int) MathHelper.Lerp(15f, (float) Main.npcFrameCount[this.type], amount) * num1; + break; + } + if ((double) this.velocity.X == 0.0) + { + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + } + this.frameCounter += 0.200000002980232 + (double) Math.Abs(this.velocity.X); + if (this.frameCounter > 8.0) + { + this.frame.Y += num1; + this.frameCounter = 0.0; + } + if (this.frame.Y >= num329 * num1) + { + this.frame.Y = num1; + break; + } + if (this.frame.Y / num1 < 1) + { + this.frame.Y = num1; + break; + } + break; + } + this.frameCounter = 0.0; + this.frame.Y = 0; + break; + case 636: + this.frame.Y = this.AI_120_HallowBoss_IsInPhase2() ? num1 : 0; + break; + case 657: + bool flag9 = this.life <= this.lifeMax / 2; + this.frame.Width = 180; + int num330 = this.frame.Y / num1; + if (flag9 && this.noGravity || (double) this.velocity.Y < 0.0) + { + if (num330 < 20 || num330 > 23) + { + if (num330 < 4 || num330 > 7) + { + num330 = 4; + this.frameCounter = -1.0; + } + if (++this.frameCounter >= 4.0) + { + this.frameCounter = 0.0; + ++num330; + if (num330 >= 7) + num330 = !flag9 ? 7 : 22; + } + } + else if (++this.frameCounter >= 5.0) + { + this.frameCounter = 0.0; + ++num330; + if (num330 >= 24) + num330 = 20; + } + this.frame.Y = num330 * num1; + break; + } + if ((double) this.velocity.Y > 0.0) + { + if (num330 < 8 || num330 > 10) + { + num330 = 8; + this.frameCounter = -1.0; + } + if (++this.frameCounter >= 8.0) + { + this.frameCounter = 0.0; + ++num330; + if (num330 >= 10) + num330 = 10; + } + this.frame.Y = num330 * num1; + break; + } + if ((double) this.velocity.Y == 0.0) + { + if ((double) this.ai[0] == 5.0) + { + this.frameCounter = 0.0; + switch ((int) this.ai[1] / 3 % 3) + { + case 1: + num330 = 14; + break; + case 2: + num330 = 15; + break; + default: + num330 = 13; + break; + } + } + else if ((double) this.ai[0] == 4.0) + { + this.frameCounter = 0.0; + switch ((int) this.ai[1] / 15) + { + case 1: + num330 = 11; + break; + case 2: + case 3: + num330 = 10; + break; + default: + num330 = 12; + break; + } + } + else + { + bool flag10 = num330 >= 10 && num330 <= 12; + int num331 = 10; + if (flag10) + num331 = 6; + if (!flag10 && num330 >= 4) + { + num330 = 0; + this.frameCounter = -1.0; + } + if (++this.frameCounter >= (double) num331) + { + this.frameCounter = 0.0; + ++num330; + if ((!flag10 || num330 == 13) && num330 >= 4) + num330 = 0; + } + } + this.frame.Y = num330 * num1; + break; + } + break; + } + if (this.aiStyle == 39 && this.type != 417) + { + if ((double) this.ai[0] == 0.0) + { + this.rotation = 0.0f; + if ((double) this.velocity.Y == 0.0) + this.spriteDirection = this.direction; + else if ((double) this.velocity.Y < 0.0) + this.frameCounter = 0.0; + this.frameCounter += (double) Math.Abs(this.velocity.X) * 1.10000002384186; + if (this.frameCounter < 6.0) + this.frame.Y = 0; + else if (this.frameCounter < 12.0) + this.frame.Y = num1; + else if (this.frameCounter < 18.0) + this.frame.Y = num1 * 2; + else if (this.frameCounter < 24.0) + this.frame.Y = num1 * 3; + else if (this.frameCounter < 32.0) + this.frame.Y = num1 * 4; + else + this.frameCounter = 0.0; + } + else if ((double) this.ai[0] == 1.0) + { + this.frameCounter = 0.0; + this.frame.Y = (double) this.ai[1] >= 10.0 ? ((double) this.ai[1] >= 20.0 ? num1 * 7 : num1 * 6) : num1 * 5; + } + else if ((double) this.ai[0] == 5.0) + { + this.frameCounter = 0.0; + this.frame.Y = (double) this.ai[1] >= 10.0 ? ((double) this.ai[1] >= 20.0 ? num1 * 5 : num1 * 6) : num1 * 7; + } + else + { + this.frameCounter = 0.0; + this.frame.Y = num1 * 7; + } + } + this.position = this.position - this.netOffset; + } + + public void SimpleFlyMovement(Vector2 desiredVelocity, float moveSpeed) + { + if ((double) this.velocity.X < (double) desiredVelocity.X) + { + this.velocity.X += moveSpeed; + if ((double) this.velocity.X < 0.0 && (double) desiredVelocity.X > 0.0) + this.velocity.X += moveSpeed; + } + else if ((double) this.velocity.X > (double) desiredVelocity.X) + { + this.velocity.X -= moveSpeed; + if ((double) this.velocity.X > 0.0 && (double) desiredVelocity.X < 0.0) + this.velocity.X -= moveSpeed; + } + if ((double) this.velocity.Y < (double) desiredVelocity.Y) + { + this.velocity.Y += moveSpeed; + if ((double) this.velocity.Y >= 0.0 || (double) desiredVelocity.Y <= 0.0) + return; + this.velocity.Y += moveSpeed; + } + else + { + if ((double) this.velocity.Y <= (double) desiredVelocity.Y) + return; + this.velocity.Y -= moveSpeed; + if ((double) this.velocity.Y <= 0.0 || (double) desiredVelocity.Y >= 0.0) + return; + this.velocity.Y -= moveSpeed; + } + } + + public void HealEffect(int healAmount, bool broadcast = true) + { + int index = CombatText.NewText(new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height), CombatText.HealLife, healAmount); + if (!broadcast || Main.netMode != 2 || index == 100) + return; + CombatText combatText = Main.combatText[index]; + NetMessage.SendData(81, number: ((int) combatText.color.PackedValue), number2: combatText.position.X, number3: combatText.position.Y, number4: ((float) healAmount)); + } + + public static void HealEffect(Microsoft.Xna.Framework.Rectangle r, int healAmount, bool broadcast = true) + { + int index = CombatText.NewText(r, CombatText.HealLife, healAmount); + if (!broadcast || Main.netMode != 2 || index == 100) + return; + CombatText combatText = Main.combatText[index]; + NetMessage.SendData(81, number: ((int) combatText.color.PackedValue), number2: combatText.position.X, number3: combatText.position.Y, number4: ((float) healAmount)); + } + + public int FindClosestPlayer() => this.FindClosestPlayer(out float _); + + public int FindClosestPlayer(out float distanceToPlayer) + { + Vector2 center = this.Center; + float num1 = float.MaxValue; + int num2 = -1; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + Player player = Main.player[index]; + if (player.active && !player.dead && !player.ghost) + { + float num3 = Vector2.DistanceSquared(center, player.Center); + if ((double) num3 < (double) num1) + { + num1 = num3; + num2 = index; + } + } + } + if (num2 < 0) + { + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + Player player = Main.player[index]; + if (player.active) + { + float num4 = Vector2.DistanceSquared(center, player.Center); + if ((double) num4 < (double) num1) + { + num1 = num4; + num2 = index; + } + } + } + } + distanceToPlayer = (float) Math.Sqrt((double) num1); + return num2; + } + + public void BigMimicSpawnSmoke() + { + if (Main.netMode == 2) + { + NetMessage.SendData(51, number: this.whoAmI, number2: 4f); + } + else + { + for (int index1 = 0; index1 < 20; ++index1) + { + int index2 = Dust.NewDust(this.position, this.width, this.height, 54, Alpha: 50, Scale: 1.5f); + Main.dust[index2].velocity *= 2f; + Main.dust[index2].noGravity = true; + } + for (int index3 = 0; index3 < 3; ++index3) + { + for (int index4 = 0; index4 < 2; ++index4) + { + int index5 = Gore.NewGore(new Vector2((float) ((double) this.position.X + (double) (this.width * index3) * 0.449999988079071 - 20.0), (float) ((double) this.position.Y + (double) (this.height * index4) * 0.5 + 10.0)), new Vector2(0.0f, 0.0f), 99, 1.1f); + Main.gore[index5].velocity *= 0.3f; + } + } + } + } + + public static bool BigMimicSummonCheck(int x, int y) + { + if (Main.netMode == 1 || !Main.hardMode) + return false; + int chest1 = Chest.FindChest(x, y); + if (chest1 < 0) + return false; + int num1 = 0; + int num2 = 0; + int num3 = 0; + for (int index = 0; index < 40; ++index) + { + ushort type = Main.tile[Main.chest[chest1].x, Main.chest[chest1].y].type; + int num4 = (int) Main.tile[Main.chest[chest1].x, Main.chest[chest1].y].frameX / 36; + if (TileID.Sets.BasicChest[(int) type] && (type != (ushort) 21 || num4 < 5 || num4 > 6) && Main.chest[chest1].item[index] != null && Main.chest[chest1].item[index].type > 0) + { + if (Main.chest[chest1].item[index].type == 3092) + num1 += Main.chest[chest1].item[index].stack; + else if (Main.chest[chest1].item[index].type == 3091) + num2 += Main.chest[chest1].item[index].stack; + else + ++num3; + } + } + if (num3 == 0 && num1 + num2 == 1) + { + if (num1 != 1) + ; + if (TileID.Sets.BasicChest[(int) Main.tile[x, y].type]) + { + if ((int) Main.tile[x, y].frameX % 36 != 0) + --x; + if ((int) Main.tile[x, y].frameY % 36 != 0) + --y; + int chest2 = Chest.FindChest(x, y); + for (int index = 0; index < 40; ++index) + Main.chest[chest1].item[index] = new Item(); + Chest.DestroyChest(x, y); + for (int index1 = x; index1 <= x + 1; ++index1) + { + for (int index2 = y; index2 <= y + 1; ++index2) + { + if (TileID.Sets.BasicChest[(int) Main.tile[index1, index2].type]) + Main.tile[index1, index2].ClearTile(); + } + } + int number = 1; + if (Main.tile[x, y].type == (ushort) 467) + number = 5; + NetMessage.SendData(34, number: number, number2: ((float) x), number3: ((float) y), number5: chest2); + NetMessage.SendTileSquare(-1, x, y, 3); + } + int Type = 475; + if (num2 == 1) + Type = !WorldGen.crimson ? 473 : 474; + int number1 = NPC.NewNPC(x * 16 + 16, y * 16 + 32, Type); + Main.npc[number1].whoAmI = number1; + NetMessage.SendData(23, number: number1); + Main.npc[number1].BigMimicSpawnSmoke(); + } + return false; + } + + public bool ShouldFaceTarget( + ref NPCUtils.TargetSearchResults searchResults, + NPCUtils.TargetType? overrideTargetType = null) + { + NPCUtils.TargetType nearestTargetType = searchResults.NearestTargetType; + if (overrideTargetType.HasValue) + nearestTargetType = overrideTargetType.Value; + switch (nearestTargetType) + { + case NPCUtils.TargetType.NPC: + case NPCUtils.TargetType.TankPet: + return true; + case NPCUtils.TargetType.Player: + bool flag = true; + Player nearestTankOwner = searchResults.NearestTankOwner; + if (nearestTankOwner.dead || nearestTankOwner.npcTypeNoAggro[this.type] && this.direction != 0) + flag = false; + if (flag) + { + float num = (float) ((double) (nearestTankOwner.width + nearestTankOwner.height + this.width + this.height) / 4.0 + 800.0); + return nearestTankOwner.itemAnimation != 0 || nearestTankOwner.aggro >= 0 || (double) searchResults.NearestTankDistance <= (double) num || this.oldTarget < 0 || this.oldTarget >= (int) byte.MaxValue; + } + break; + } + return false; + } + + public void FaceTarget() + { + this.direction = (double) this.targetRect.Center.X < (double) this.Center.X ? -1 : 1; + this.directionY = (double) this.targetRect.Center.Y < (double) this.Center.Y ? -1 : 1; + } + + public void TargetClosestUpgraded(bool faceTarget = true, Vector2? checkPosition = null) + { + int index1 = -1; + int index2 = -1; + int index3 = -1; + Vector2 center = this.Center; + if (checkPosition.HasValue) + center = checkPosition.Value; + bool flag1 = this.direction == 0; + float num1 = 9999999f; + for (int index4 = 0; index4 < (int) byte.MaxValue; ++index4) + { + Player player = Main.player[index4]; + if (player.active && !player.dead && !player.ghost) + { + float num2 = Vector2.Distance(center, player.Center) - (float) player.aggro; + bool flag2 = player.npcTypeNoAggro[this.type]; + if (flag2 && !flag1) + num2 += 1000f; + if ((double) num2 < (double) num1) + { + index1 = index4; + index2 = -1; + num1 = num2; + } + if (player.tankPet >= 0 && !flag2) + { + float num3 = Vector2.Distance(center, Main.projectile[player.tankPet].Center) - 200f; + if ((double) num3 < (double) num1 && (double) num3 < 200.0 && Collision.CanHit(this.Center, 0, 0, Main.projectile[player.tankPet].Center, 0, 0)) + { + index2 = player.tankPet; + num1 = num3; + } + } + } + } + for (int index5 = 0; index5 < 200; ++index5) + { + NPC npc = Main.npc[index5]; + if (npc.active && npc.type == 548) + { + float num4 = Vector2.Distance(center, npc.Center); + if ((double) num1 > (double) num4) + { + index3 = index5; + index1 = -1; + index2 = -1; + num1 = num4; + } + } + } + if ((double) num1 == 9999999.0) + return; + if (index3 >= 0) + { + this.target = Main.npc[index3].WhoAmIToTargettingIndex; + this.targetRect = Main.npc[index3].Hitbox; + this.direction = (double) this.targetRect.Center.X < (double) this.Center.X ? -1 : 1; + this.directionY = (double) this.targetRect.Center.Y < (double) this.Center.Y ? -1 : 1; + } + else if (index2 >= 0) + { + this.target = Main.projectile[index2].owner; + this.targetRect = Main.projectile[index2].Hitbox; + this.direction = (double) this.targetRect.Center.X < (double) this.Center.X ? -1 : 1; + this.directionY = (double) this.targetRect.Center.Y < (double) this.Center.Y ? -1 : 1; + } + else + { + if (index1 < 0 || index1 >= (int) byte.MaxValue) + index1 = 0; + Player player = Main.player[index1]; + this.targetRect = player.Hitbox; + this.target = index1; + if (player.dead || player.npcTypeNoAggro[this.type] && !flag1) + faceTarget = false; + if (!faceTarget) + return; + float num5 = (float) ((double) (player.width + player.height + this.width + this.height) / 4.0 + 800.0); + float num6 = num1 - (float) player.aggro; + if (player.itemAnimation == 0 && player.aggro < 0 && (double) num6 > (double) num5 && this.oldTarget >= 0 && this.oldTarget < (int) byte.MaxValue) + return; + this.direction = (double) this.targetRect.Center.X < (double) this.Center.X ? -1 : 1; + this.directionY = (double) this.targetRect.Center.Y < (double) this.Center.Y ? -1 : 1; + } + } + + public void TargetClosest(bool faceTarget = true) + { + float num1 = 0.0f; + float num2 = 0.0f; + bool flag = false; + int num3 = -1; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && !Main.player[index].dead && !Main.player[index].ghost) + { + float num4 = Math.Abs(Main.player[index].position.X + (float) (Main.player[index].width / 2) - this.position.X + (float) (this.width / 2)) + Math.Abs(Main.player[index].position.Y + (float) (Main.player[index].height / 2) - this.position.Y + (float) (this.height / 2)) - (float) Main.player[index].aggro; + if (Main.player[index].npcTypeNoAggro[this.type] && this.direction != 0) + num4 += 1000f; + if (!flag || (double) num4 < (double) num1) + { + flag = true; + num3 = -1; + num2 = Math.Abs(Main.player[index].position.X + (float) (Main.player[index].width / 2) - this.position.X + (float) (this.width / 2)) + Math.Abs(Main.player[index].position.Y + (float) (Main.player[index].height / 2) - this.position.Y + (float) (this.height / 2)); + num1 = num4; + this.target = index; + } + if (Main.player[index].tankPet >= 0 && !Main.player[index].npcTypeNoAggro[this.type]) + { + int tankPet = Main.player[index].tankPet; + float num5 = Math.Abs(Main.projectile[tankPet].position.X + (float) (Main.projectile[tankPet].width / 2) - this.position.X + (float) (this.width / 2)) + Math.Abs(Main.projectile[tankPet].position.Y + (float) (Main.projectile[tankPet].height / 2) - this.position.Y + (float) (this.height / 2)) - 200f; + if ((double) num5 < (double) num1 && (double) num5 < 200.0 && Collision.CanHit(this.Center, 1, 1, Main.projectile[tankPet].Center, 1, 1)) + num3 = tankPet; + } + } + } + if (num3 >= 0) + { + int index = num3; + this.targetRect = new Microsoft.Xna.Framework.Rectangle((int) Main.projectile[index].position.X, (int) Main.projectile[index].position.Y, Main.projectile[index].width, Main.projectile[index].height); + this.direction = 1; + if ((double) (this.targetRect.X + this.targetRect.Width / 2) < (double) this.position.X + (double) (this.width / 2)) + this.direction = -1; + this.directionY = 1; + if ((double) (this.targetRect.Y + this.targetRect.Height / 2) < (double) this.position.Y + (double) (this.height / 2)) + this.directionY = -1; + } + else + { + if (this.target < 0 || this.target >= (int) byte.MaxValue) + this.target = 0; + this.targetRect = new Microsoft.Xna.Framework.Rectangle((int) Main.player[this.target].position.X, (int) Main.player[this.target].position.Y, Main.player[this.target].width, Main.player[this.target].height); + if (Main.player[this.target].dead) + faceTarget = false; + if (Main.player[this.target].npcTypeNoAggro[this.type] && this.direction != 0) + faceTarget = false; + if (faceTarget) + { + int aggro = Main.player[this.target].aggro; + int num6 = (Main.player[this.target].height + Main.player[this.target].width + this.height + this.width) / 4; + if (Main.player[this.target].itemAnimation != 0 || Main.player[this.target].aggro >= 0 || this.oldTarget < 0 || this.oldTarget > 254) + { + this.direction = 1; + if ((double) (this.targetRect.X + this.targetRect.Width / 2) < (double) this.position.X + (double) (this.width / 2)) + this.direction = -1; + this.directionY = 1; + if ((double) (this.targetRect.Y + this.targetRect.Height / 2) < (double) this.position.Y + (double) (this.height / 2)) + this.directionY = -1; + } + } + } + if (this.confused) + this.direction *= -1; + if (this.direction == this.oldDirection && this.directionY == this.oldDirectionY && this.target == this.oldTarget || this.collideX || this.collideY) + return; + this.netUpdate = true; + } + + public bool DoesntDespawnToInactivity() + { + switch (this.type) + { + case 8: + case 9: + case 11: + case 12: + case 14: + case 15: + case 36: + case 40: + case 41: + case 88: + case 89: + case 90: + case 91: + case 92: + case 96: + case 97: + case 99: + case 100: + case 113: + case 114: + case 115: + case 118: + case 119: + case 128: + case 129: + case 130: + case 131: + case 134: + case 135: + case 136: + case 246: + case 247: + case 248: + case 249: + case 263: + case 267: + case 328: + case 379: + case 380: + case 392: + case 393: + case 394: + case 396: + case 397: + case 398: + case 400: + case 422: + case 437: + case 438: + case 439: + case 440: + case 488: + case 492: + case 493: + case 507: + case 517: + case 548: + case 549: + case 551: + case 564: + case 565: + return true; + case 139: + if (NPC.npcsFoundForCheckActive[134]) + return true; + break; + case 552: + case 553: + case 554: + case 555: + case 556: + case 557: + case 558: + case 559: + case 560: + case 561: + case 562: + case 563: + case 566: + case 567: + case 568: + case 569: + case 570: + case 571: + case 572: + case 573: + case 574: + case 575: + case 576: + case 577: + case 578: + if (NPC.npcsFoundForCheckActive[548]) + return true; + break; + } + return false; + } + + public void CheckActive() + { + if (!this.active || this.DoesntDespawnToInactivity()) + return; + if (this.townNPC) + { + this.AddIntoPlayersTownNPCSlots(); + } + else + { + bool flag = false; + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle((int) ((double) this.position.X + (double) (this.width / 2) - (double) NPC.activeRangeX), (int) ((double) this.position.Y + (double) (this.height / 2) - (double) NPC.activeRangeY), NPC.activeRangeX * 2, NPC.activeRangeY * 2); + Microsoft.Xna.Framework.Rectangle rectangle2 = new Microsoft.Xna.Framework.Rectangle((int) ((double) this.position.X + (double) (this.width / 2) - (double) NPC.sWidth * 0.5 - (double) this.width), (int) ((double) this.position.Y + (double) (this.height / 2) - (double) NPC.sHeight * 0.5 - (double) this.height), NPC.sWidth + this.width * 2, NPC.sHeight + this.height * 2); + for (int plr = 0; plr < (int) byte.MaxValue; ++plr) + { + if (Main.player[plr].active) + { + Microsoft.Xna.Framework.Rectangle hitbox = Main.player[plr].Hitbox; + if (rectangle1.Intersects(hitbox)) + { + flag = true; + if (this.type != 25 && this.type != 30 && this.type != 33 && this.releaseOwner == (short) byte.MaxValue && this.lifeMax > 0) + { + if (Main.slimeRain && Main.slimeRainNPC[this.type]) + Main.player[plr].nearbyActiveNPCs += this.npcSlots * Main.slimeRainNPCSlots; + else + Main.player[plr].nearbyActiveNPCs += this.npcSlots; + } + } + if (rectangle2.Intersects(hitbox)) + { + this.timeLeft = NPC.activeTime; + this.despawnEncouraged = false; + if (plr == Main.myPlayer && (this.type == 604 || this.type == 605)) + this.LadyBugLuck(plr, this.type == 605); + } + if (this.boss) + flag = true; + switch (this.type) + { + case 7: + case 10: + case 13: + case 35: + case 36: + case 39: + case 87: + case (int) sbyte.MaxValue: + case 128: + case 129: + case 130: + case 131: + case 392: + case 393: + case 394: + case 491: + case 492: + flag = true; + continue; + case 399: + if ((double) this.ai[0] == 2.0 || (double) this.ai[0] == 1.0) + this.timeLeft = NPC.activeTime; + flag = true; + continue; + case 583: + case 584: + case 585: + if (!Main.dayTime && (double) this.ai[2] == 0.0) + { + flag = true; + this.timeLeft = NPC.activeTime; + continue; + } + continue; + default: + continue; + } + } + } + --this.timeLeft; + if (this.timeLeft <= 0) + flag = false; + if (flag || Main.netMode == 1) + return; + NPC.noSpawnCycle = true; + this.active = false; + if (Main.netMode == 2) + { + this.netSkip = -1; + this.life = 0; + NetMessage.SendData(23, number: this.whoAmI); + } + if (this.extraValue > 0) + NPC.RevengeManager.CacheEnemy(this); + if (this.aiStyle != 6) + return; + for (int number = (int) this.ai[0]; number > 0; number = (int) Main.npc[number].ai[0]) + { + if (Main.npc[number].active) + { + Main.npc[number].active = false; + if (Main.netMode == 2) + { + Main.npc[number].life = 0; + Main.npc[number].netSkip = -1; + NetMessage.SendData(23, number: number); + } + } + } + } + } + + private void AddIntoPlayersTownNPCSlots() + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) ((double) this.position.X + (double) (this.width / 2) - (double) NPC.townRangeX), (int) ((double) this.position.Y + (double) (this.height / 2) - (double) NPC.townRangeY), NPC.townRangeX * 2, NPC.townRangeY * 2); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && rectangle.Intersects(Main.player[index].Hitbox)) + Main.player[index].townNPCs += this.npcSlots; + } + } + + public void checkDead() + { + if (!this.active || this.realLife >= 0 && this.realLife != this.whoAmI || this.life > 0) + return; + if (this.type == 604 || this.type == 605) + NPC.LadyBugKilled(this.Center, this.type == 605); + if (this.type == 397 || this.type == 396) + { + if ((double) this.ai[0] == -2.0) + return; + this.ai[0] = -2f; + this.life = this.lifeMax; + this.netUpdate = true; + this.dontTakeDamage = true; + if (Main.netMode == 1) + return; + int index = NPC.NewNPC((int) this.Center.X, (int) this.Center.Y, 400); + Main.npc[index].ai[3] = this.ai[3]; + Main.npc[index].netUpdate = true; + } + else if (this.type == 398 && (double) this.ai[0] != 2.0) + { + this.ai[0] = 2f; + this.life = this.lifeMax; + this.netUpdate = true; + this.dontTakeDamage = true; + } + else if ((this.type == 517 || this.type == 422 || this.type == 507 || this.type == 493) && (double) this.ai[2] != 1.0) + { + this.ai[2] = 1f; + this.ai[1] = 0.0f; + this.life = this.lifeMax; + this.dontTakeDamage = true; + this.netUpdate = true; + } + else if (this.type == 548 && (double) this.ai[1] != 1.0) + { + this.ai[1] = 1f; + this.ai[0] = 0.0f; + this.life = this.lifeMax; + this.dontTakeDamageFromHostiles = true; + this.netUpdate = true; + } + else + { + NPC.noSpawnCycle = true; + if (this.townNPC && this.type != 37 && this.type != 453) + { + if (Main.netMode != 2) + this.NPCLuck(); + bool flag = true; + NetworkText fullNetName = this.GetFullNetName(); + int index1 = 19; + if (this.type == 369 || NPCID.Sets.IsTownPet[this.type]) + { + index1 = 36; + flag = false; + } + NetworkText networkText = NetworkText.FromKey(Lang.misc[index1].Key, (object) fullNetName); + if (flag) + { + for (int index2 = 0; index2 < (int) byte.MaxValue; ++index2) + { + Player player = Main.player[index2]; + if (player != null && player.active && player.difficulty != (byte) 2) + { + flag = false; + break; + } + } + } + if (flag) + this.DropTombstoneTownNPC(networkText); + switch (Main.netMode) + { + case 0: + Main.NewText(networkText.ToString(), G: (byte) 25, B: (byte) 25); + break; + case 2: + ChatHelper.BroadcastChatMessage(networkText, new Color((int) byte.MaxValue, 25, 25)); + break; + } + } + if (Main.netMode != 1 && !Main.dayTime && this.type == 54 && !NPC.AnyNPCs(35)) + { + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && !Main.player[index].dead && Main.player[index].killClothier) + { + NPC.SpawnSkeletron(); + break; + } + } + } + if (this.townNPC && Main.netMode != 1 && this.homeless && WorldGen.prioritizedTownNPCType == this.type) + WorldGen.prioritizedTownNPCType = 0; + if (this.DeathSound != null) + SoundEngine.PlaySound(this.DeathSound, this.position); + if (this.type == 13 || this.type == 14 || this.type == 15) + this.DropEoWLoot(); + else if (this.type == 134) + { + Vector2 position1 = this.position; + Vector2 center = Main.player[this.target].Center; + float num1 = 1E+08f; + Vector2 position2 = this.position; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && (Main.npc[index].type == 134 || Main.npc[index].type == 135 || Main.npc[index].type == 136)) + { + float num2 = Math.Abs(Main.npc[index].Center.X - center.X) + Math.Abs(Main.npc[index].Center.Y - center.Y); + if ((double) num2 < (double) num1) + { + num1 = num2; + position2 = Main.npc[index].position; + } + } + } + this.position = position2; + this.NPCLoot(); + this.position = position1; + } + else + this.NPCLoot(); + this.active = false; + DD2Event.CheckProgress(this.type); + this.CheckProgressFrostMoon(); + this.CheckProgressPumpkinMoon(); + int npcInvasionGroup = NPC.GetNPCInvasionGroup(this.type); + if (npcInvasionGroup <= 0 || npcInvasionGroup != Main.invasionType) + return; + int num = 1; + switch (this.type) + { + case 216: + num = 5; + break; + case 387: + num = 0; + break; + case 395: + num = 10; + break; + case 471: + num = 10; + break; + case 472: + num = 0; + break; + case 491: + num = 10; + break; + } + if (num <= 0) + return; + Main.invasionSize -= num; + if (Main.invasionSize < 0) + Main.invasionSize = 0; + if (Main.netMode != 1) + Main.ReportInvasionProgress(Main.invasionSizeStart - Main.invasionSize, Main.invasionSizeStart, npcInvasionGroup + 3, 0); + if (Main.netMode != 2) + return; + NetMessage.SendData(78, number: Main.invasionProgress, number2: ((float) Main.invasionProgressMax), number3: ((float) Main.invasionProgressIcon)); + } + } + + public void DropTombstoneTownNPC(NetworkText deathText) + { + if (Main.netMode == 1) + return; + float num1 = 0.1f; + if (Main.rand.Next(2) == 0) + num1 = -0.1f; + float num2 = (float) Main.rand.Next(-35, 36) * 0.1f; + while ((double) num2 < 2.0 && (double) num2 > -2.0) + num2 += (float) Main.rand.Next(-30, 31) * 0.1f; + int num3 = Main.rand.Next(6); + int Type = this.type == 17 || this.type == 441 ? Main.rand.Next(5) + 527 : (num3 != 0 ? num3 + 200 : 43); + int index = Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), (float) Main.rand.Next(10, 30) * num1 + num2, (float) Main.rand.Next(-40, -20) * 0.1f, Type, 0, 0.0f, Main.myPlayer); + Main.projectile[index].miscText = deathText.ToString(); + } + + public static int GetNPCInvasionGroup(int npcID) + { + int num = 0; + if (npcID <= 216) + { + if (npcID <= 111) + { + if ((uint) (npcID - 26) > 3U && npcID != 111) + goto label_18; + } + else if ((uint) (npcID - 143) > 2U) + { + if ((uint) (npcID - 212) <= 4U) + goto label_13; + else + goto label_18; + } + else + { + num = 2; + goto label_18; + } + } + else if (npcID <= 395) + { + switch (npcID - 305) + { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 20: + case 21: + case 22: + case 24: + case 25: + num = -2; + goto label_18; + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 23: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + goto label_18; + case 33: + case 34: + case 35: + case 36: + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + num = -1; + goto label_18; + default: + switch (npcID - 381) + { + case 0: + case 1: + case 2: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 14: + num = 4; + goto label_18; + default: + goto label_18; + } + } + } + else if ((uint) (npcID - 471) > 1U) + { + if (npcID != 491) + { + if ((uint) (npcID - 547) <= 31U) + { + num = -3; + goto label_18; + } + else + goto label_18; + } + else + goto label_13; + } + num = 1; + goto label_18; +label_13: + num = 3; +label_18: + return num; + } + + private void DropEoWLoot(bool fromCheckDead = true) + { + bool flag = true; + for (int index = 0; index < 200; ++index) + { + if (index != this.whoAmI && Main.npc[index].active && (Main.npc[index].type == 13 || Main.npc[index].type == 14 || Main.npc[index].type == 15)) + { + flag = false; + break; + } + } + if (flag) + { + this.boss = true; + this.NPCLoot(); + } + else + this.NPCLoot(); + } + + private void CheckProgressFrostMoon() + { + if (!Main.snowMoon) + return; + NetworkText text = NetworkText.Empty; + int[] numArray = new int[21] + { + 0, + 25, + 15, + 10, + 30, + 100, + 160, + 180, + 200, + 250, + 300, + 375, + 450, + 525, + 675, + 850, + 1025, + 1325, + 1550, + 2000, + 0 + }; + int progressMax = numArray[NPC.waveNumber]; + switch (NPC.waveNumber) + { + case 1: + text = Lang.GetInvasionWaveText(2, (short) 338, (short) 350); + break; + case 2: + text = Lang.GetInvasionWaveText(3, (short) 338, (short) 350, (short) 342, (short) 348); + break; + case 3: + text = Lang.GetInvasionWaveText(4, (short) 344, (short) 338, (short) 350, (short) 342); + break; + case 4: + text = Lang.GetInvasionWaveText(5, (short) 344, (short) 338, (short) 350, (short) 348); + break; + case 5: + text = Lang.GetInvasionWaveText(6, (short) 344, (short) 350, (short) 348, (short) 347); + break; + case 6: + text = Lang.GetInvasionWaveText(7, (short) 346, (short) 342, (short) 350, (short) 338); + break; + case 7: + text = Lang.GetInvasionWaveText(8, (short) 346, (short) 347, (short) 350, (short) 348, (short) 351); + break; + case 8: + text = Lang.GetInvasionWaveText(9, (short) 346, (short) 344, (short) 348, (short) 347, (short) 342); + break; + case 9: + text = Lang.GetInvasionWaveText(10, (short) 346, (short) 344, (short) 351, (short) 338, (short) 347); + break; + case 10: + text = Lang.GetInvasionWaveText(11, (short) 345, (short) 352, (short) 338, (short) 342); + break; + case 11: + text = Lang.GetInvasionWaveText(12, (short) 345, (short) 344, (short) 342, (short) 343, (short) 338); + break; + case 12: + text = Lang.GetInvasionWaveText(13, (short) 345, (short) 346, (short) 342, (short) 352, (short) 343, (short) 347); + break; + case 13: + text = Lang.GetInvasionWaveText(14, (short) 345, (short) 346, (short) 344, (short) 343, (short) 351); + break; + case 14: + text = Lang.GetInvasionWaveText(15, (short) 345, (short) 346, (short) 344, (short) 343, (short) 347); + break; + case 15: + text = Lang.GetInvasionWaveText(16, (short) 345, (short) 346, (short) 344, (short) 343, (short) 352); + break; + case 16: + text = Lang.GetInvasionWaveText(17, (short) 345, (short) 346, (short) 344, (short) 343, (short) 351, (short) 347); + break; + case 17: + text = Lang.GetInvasionWaveText(18, (short) 345, (short) 346, (short) 344, (short) 343, (short) 348, (short) 351); + break; + case 18: + text = Lang.GetInvasionWaveText(19, (short) 345, (short) 346, (short) 344, (short) 343); + break; + case 19: + text = Lang.GetInvasionWaveText(-1, (short) 345, (short) 346, (short) 344); + break; + } + float num = 0.0f; + switch (this.type) + { + case 338: + case 339: + case 340: + num = 1f; + break; + case 341: + num = 20f; + break; + case 342: + num = 2f; + break; + case 343: + num = 18f; + break; + case 344: + num = 50f; + break; + case 345: + num = 150f; + break; + case 346: + num = 100f; + break; + case 347: + num = 8f; + break; + case 348: + case 349: + num = 4f; + break; + case 350: + num = 3f; + break; + } + if (Main.expertMode) + num *= 2f; + float waveKills = NPC.waveKills; + NPC.waveKills += num; + if ((double) NPC.waveKills >= (double) progressMax && progressMax != 0) + { + NPC.waveKills = 0.0f; + ++NPC.waveNumber; + progressMax = numArray[NPC.waveNumber]; + if (text != NetworkText.Empty) + { + switch (Main.netMode) + { + case 0: + Main.NewText(text.ToString(), (byte) 175, (byte) 75); + break; + case 2: + ChatHelper.BroadcastChatMessage(text, new Color(175, 75, (int) byte.MaxValue)); + break; + } + if (NPC.waveNumber == 15) + AchievementsHelper.NotifyProgressionEvent(14); + } + } + if ((double) NPC.waveKills == (double) waveKills || (double) num == 0.0) + return; + if (Main.netMode != 1) + Main.ReportInvasionProgress((int) NPC.waveKills, progressMax, 1, NPC.waveNumber); + if (Main.netMode != 2) + return; + NetMessage.SendData(78, number: Main.invasionProgress, number2: ((float) Main.invasionProgressMax), number3: 1f, number4: ((float) NPC.waveNumber)); + } + + private void CheckProgressPumpkinMoon() + { + if (!Main.pumpkinMoon) + return; + NetworkText text = NetworkText.Empty; + int[] numArray = new int[16] + { + 0, + 25, + 40, + 50, + 80, + 100, + 160, + 180, + 200, + 250, + 300, + 375, + 450, + 525, + 675, + 0 + }; + int progressMax = numArray[NPC.waveNumber]; + switch (NPC.waveNumber) + { + case 1: + text = Lang.GetInvasionWaveText(2, (short) 305, (short) 326); + break; + case 2: + text = Lang.GetInvasionWaveText(3, (short) 305, (short) 326, (short) 329); + break; + case 3: + text = Lang.GetInvasionWaveText(4, (short) 305, (short) 326, (short) 329, (short) 325); + break; + case 4: + text = Lang.GetInvasionWaveText(5, (short) 305, (short) 326, (short) 329, (short) 330, (short) 325); + break; + case 5: + text = Lang.GetInvasionWaveText(6, (short) 326, (short) 329, (short) 330, (short) 325); + break; + case 6: + text = Lang.GetInvasionWaveText(7, (short) 305, (short) 329, (short) 330, (short) 327); + break; + case 7: + text = Lang.GetInvasionWaveText(8, (short) 326, (short) 329, (short) 330, (short) 327); + break; + case 8: + text = Lang.GetInvasionWaveText(9, (short) 305, (short) 315, (short) 325, (short) 327); + break; + case 9: + text = Lang.GetInvasionWaveText(10, (short) 326, (short) 329, (short) 330, (short) 315, (short) 325, (short) 327); + break; + case 10: + text = Lang.GetInvasionWaveText(11, (short) 305, (short) 326, (short) 329, (short) 330, (short) 315, (short) 325, (short) 327); + break; + case 11: + text = Lang.GetInvasionWaveText(12, (short) 326, (short) 329, (short) 330, (short) 315, (short) 325, (short) 327); + break; + case 12: + text = Lang.GetInvasionWaveText(13, (short) 329, (short) 330, (short) 315, (short) 325, (short) 327); + break; + case 13: + text = Lang.GetInvasionWaveText(14, (short) 315, (short) 325, (short) 327); + break; + case 14: + text = Lang.GetInvasionWaveText(-1, (short) 325, (short) 327); + break; + } + float num = 0.0f; + switch (this.type) + { + case 305: + case 306: + case 307: + case 308: + case 309: + case 310: + case 311: + case 312: + case 313: + case 314: + num = 1f; + break; + case 315: + num = 25f; + break; + case 325: + num = 75f; + break; + case 326: + num = 2f; + break; + case 327: + num = 150f; + break; + case 329: + num = 4f; + break; + case 330: + num = 8f; + break; + } + if (Main.expertMode) + num *= 2f; + float waveKills = NPC.waveKills; + NPC.waveKills += num; + if ((double) NPC.waveKills >= (double) progressMax && progressMax != 0) + { + NPC.waveKills = 0.0f; + ++NPC.waveNumber; + progressMax = numArray[NPC.waveNumber]; + if (text != NetworkText.Empty) + { + switch (Main.netMode) + { + case 0: + Main.NewText(text.ToString(), (byte) 175, (byte) 75); + break; + case 2: + ChatHelper.BroadcastChatMessage(text, new Color(175, 75, (int) byte.MaxValue)); + break; + } + if (NPC.waveNumber == 15) + AchievementsHelper.NotifyProgressionEvent(15); + } + } + if ((double) NPC.waveKills == (double) waveKills || (double) num == 0.0) + return; + if (Main.netMode != 1) + Main.ReportInvasionProgress((int) NPC.waveKills, progressMax, 2, NPC.waveNumber); + if (Main.netMode != 2) + return; + NetMessage.SendData(78, number: Main.invasionProgress, number2: ((float) Main.invasionProgressMax), number3: 2f, number4: ((float) NPC.waveNumber)); + } + + public static void ResetKillCount() + { + for (int index = 0; index < 663; ++index) + NPC.killCount[index] = 0; + } + + public bool AnyInteractions() + { + if (Main.netMode == 0) + { + if (this.playerInteraction[Main.myPlayer]) + return true; + } + else + { + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (this.playerInteraction[index]) + return true; + } + } + return false; + } + + public static void SetEventFlagCleared(ref bool eventFlag, int gameEventId) + { + bool flag = eventFlag; + eventFlag = true; + if (eventFlag == flag) + return; + NPC.OnGameEventClearedForTheFirstTime(gameEventId); + } + + public static void OnGameEventClearedForTheFirstTime(int gameEventId) + { + switch (gameEventId) + { + case 4: + break; + case 21: + case 22: + break; + default: + LanternNight.NextNightIsLanternNight = true; + break; + } + } + + public void NPCLootOld() + { + if (Main.netMode == 1 || this.type >= 663) + return; + bool flag1 = false; + bool flag2 = NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3; + Player closestPlayer = Main.player[(int) Player.FindClosest(this.position, this.width, this.height)]; + if (!flag1) + { + this.CountKillForAchievements(); + if (this.GetWereThereAnyInteractions()) + this.CountKillForBannersAndDropThem(); + } + if (this.type == 23 && Main.hardMode || this.SpawnedFromStatue && NPCID.Sets.NoEarlymodeLootWhenSpawnedFromStatue[this.type] && !Main.hardMode || this.SpawnedFromStatue && (double) NPCID.Sets.StatueSpawnedDropRarity[this.type] != -1.0 && ((double) Main.rand.NextFloat() >= (double) NPCID.Sets.StatueSpawnedDropRarity[this.type] || !this.AnyInteractions())) + return; + this.NPCLoot_DropFood(closestPlayer); + if (this.type == 86) + { + int range = Main.expertMode ? 30 : 40; + if (closestPlayer.RollLuck(range) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3260); + } + if (Main.slimeRain && Main.slimeRainNPC[this.type] && !flag1 && !NPC.AnyNPCs(50)) + { + int num = 150; + if (NPC.downedSlimeKing) + num /= 2; + ++Main.slimeRainKillCount; + if (Main.slimeRainKillCount >= num) + { + NPC.SpawnOnPlayer(closestPlayer.whoAmI, 50); + Main.slimeRainKillCount = -num / 2; + } + } + if (!closestPlayer.ZoneDungeon && !flag1) + { + bool flag3 = false; + if (Main.expertMode && closestPlayer.RollLuck(5) == 0) + flag3 = true; + else if (closestPlayer.RollLuck(5) == 0) + flag3 = true; + if (this.boss) + flag3 = false; + switch (this.type) + { + case 1: + case 13: + case 14: + case 15: + case 535: + flag3 = false; + break; + } + if (((!Main.hardMode || this.lifeMax <= 1 || this.damage <= 0 || this.friendly ? 0 : ((double) this.position.Y > Main.rockLayer * 16.0 ? 1 : 0)) & (flag3 ? 1 : 0)) != 0 && this.type != 121 && (double) this.value > 0.0) + { + if (closestPlayer.ZoneCorrupt || closestPlayer.ZoneCrimson) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 521); + if (closestPlayer.ZoneHallow) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 520); + } + } + if (this.type == 1 && (double) this.ai[1] > 0.0) + { + int Type = (int) this.ai[1]; + if (Type > 0 && Type < 5045) + { + int forSlimeItemDrop = NPC.GetStackForSlimeItemDrop(Type); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, forSlimeItemDrop); + } + } + if (this.type == 22 && this.GivenOrTypeName == "Andrew") + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 867); + if (this.type == 178 && this.GivenOrTypeName == "Whitney") + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4372); + if (this.type == 353 && closestPlayer.RollLuck(8) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3352); + if (this.type == 441 && closestPlayer.RollLuck(8) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3351); + if (this.type == 227 && closestPlayer.RollLuck(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3350); + if (this.type == 550 && closestPlayer.RollLuck(6) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3821); + if (this.type == 208 && closestPlayer.RollLuck(4) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3548, Main.rand.Next(30, 61)); + if (this.type == 207 && closestPlayer.RollLuck(8) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3349); + if (Main.hardMode && !flag1 && (double) this.value > 0.0) + { + if (!NPC.downedMechBoss1 && closestPlayer.RollLuck(2500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 556); + else if (!NPC.downedMechBoss2 && closestPlayer.RollLuck(2500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 544); + else if (!NPC.downedMechBoss3 && closestPlayer.RollLuck(2500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 557); + } + if (Main.halloween && (double) this.value > 0.0 && (double) this.value < 500.0 && this.damage < 40 && this.defense < 20 && !flag1) + { + if (closestPlayer.RollLuck(2000) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1825); + else if (closestPlayer.RollLuck(2000) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1827); + } + if (Main.hardMode && (double) this.value > 0.0 && !flag1) + { + if (closestPlayer.RollLuck(2500) == 0 && closestPlayer.ZoneJungle) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1533); + if (closestPlayer.RollLuck(2500) == 0 && closestPlayer.ZoneCorrupt) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1534); + if (closestPlayer.RollLuck(2500) == 0 && closestPlayer.ZoneCrimson) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1535); + if (closestPlayer.RollLuck(2500) == 0 && closestPlayer.ZoneHallow) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1536); + if (closestPlayer.RollLuck(2500) == 0 && closestPlayer.ZoneSnow) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1537); + } + if (DD2Event.Ongoing) + { + switch (this.type) + { + case 552: + case 553: + case 554: + DD2Event.AnnounceGoblinDeath(this); + if (DD2Event.ShouldDropCrystals()) + { + Item.NewItem(this.position, this.Size, 3822); + break; + } + break; + case 555: + case 556: + case 557: + case 561: + case 562: + case 563: + case 570: + case 571: + case 572: + case 573: + if (DD2Event.ShouldDropCrystals()) + { + Item.NewItem(this.position, this.Size, 3822); + break; + } + break; + case 558: + case 559: + case 560: + case 568: + case 569: + if (DD2Event.ShouldDropCrystals()) + { + Item.NewItem(this.position, this.Size, 3822); + break; + } + break; + case 564: + if (Main.rand.Next(7) == 0) + Item.NewItem(this.position, this.Size, 3864); + if (Main.rand.Next(5) == 0) + { + if (Main.rand.Next(2) == 0) + Item.NewItem(this.position, this.Size, 3815, 4); + else + Item.NewItem(this.position, this.Size, 3814); + } + if (Main.rand.Next(Main.expertMode ? 2 : 3) == 0) + Item.NewItem(this.position, this.Size, (int) Utils.SelectRandom(Main.rand, (short) 3857, (short) 3855)); + if (DD2Event.ShouldDropCrystals()) + { + Item.NewItem(this.position, this.Size, 3822); + break; + } + break; + case 565: + if (Main.rand.Next(14) == 0) + Item.NewItem(this.position, this.Size, 3864); + if (Main.rand.Next(10) == 0) + { + if (Main.rand.Next(2) == 0) + Item.NewItem(this.position, this.Size, 3815, 4); + else + Item.NewItem(this.position, this.Size, 3814); + } + if (Main.rand.Next(6) == 0) + Item.NewItem(this.position, this.Size, (int) Utils.SelectRandom(Main.rand, (short) 3857, (short) 3855)); + if (DD2Event.ShouldDropCrystals()) + { + Item.NewItem(this.position, this.Size, 3822); + break; + } + break; + case 574: + case 575: + case 578: + if (DD2Event.ShouldDropCrystals()) + { + Item.NewItem(this.position, this.Size, 3822); + break; + } + break; + case 576: + if (Main.rand.Next(7) == 0) + Item.NewItem(this.position, this.Size, 3865); + if (Main.rand.Next(Main.expertMode ? 2 : 3) == 0) + Item.NewItem(this.position, this.Size, (int) Utils.SelectRandom(Main.rand, (short) 3809, (short) 3811, (short) 3810, (short) 3812)); + if (Main.rand.Next(Main.expertMode ? 2 : 3) == 0) + Item.NewItem(this.position, this.Size, (int) Utils.SelectRandom(Main.rand, (short) 3852, (short) 3854, (short) 3823, (short) 3835, (short) 3836)); + if (Main.rand.Next(Main.expertMode ? 4 : 5) == 0) + Item.NewItem(this.position, this.Size, 3856); + if (DD2Event.ShouldDropCrystals()) + { + Item.NewItem(this.position, this.Size, 3822); + break; + } + break; + case 577: + if (Main.rand.Next(14) == 0) + Item.NewItem(this.position, this.Size, 3865); + if (Main.rand.Next(6) == 0) + Item.NewItem(this.position, this.Size, (int) Utils.SelectRandom(Main.rand, (short) 3809, (short) 3811, (short) 3810, (short) 3812)); + if (Main.rand.Next(6) == 0) + Item.NewItem(this.position, this.Size, (int) Utils.SelectRandom(Main.rand, (short) 3852, (short) 3854, (short) 3823, (short) 3835, (short) 3836)); + if (Main.rand.Next(10) == 0) + Item.NewItem(this.position, this.Size, 3856); + if (DD2Event.ShouldDropCrystals()) + { + Item.NewItem(this.position, this.Size, 3822); + break; + } + break; + } + } + if (this.type == 68) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1169); + if (Main.snowMoon) + { + int waveNumber = NPC.waveNumber; + if (Main.expertMode) + waveNumber += 7; + int range = (int) ((double) (30 - waveNumber) / 2.5); + if (Main.expertMode) + range -= 2; + if (range < 1) + range = 1; + if (this.type == 344) + NPC.SetEventFlagCleared(ref NPC.downedChristmasTree, 21); + if (this.type == 345) + NPC.SetEventFlagCleared(ref NPC.downedChristmasIceQueen, 20); + if (this.type == 346) + NPC.SetEventFlagCleared(ref NPC.downedChristmasSantank, 22); + if ((this.type == 344 || this.type == 345 || this.type == 346) && closestPlayer.RollLuck(range) == 0 && waveNumber >= 15) + { + int maxValue = 4; + if (waveNumber == 16) + maxValue = 4; + if (waveNumber == 17) + maxValue = 3; + if (waveNumber == 18) + maxValue = 3; + if (waveNumber == 19) + maxValue = 2; + if (waveNumber >= 20) + maxValue = 2; + if (Main.expertMode && Main.rand.Next(3) == 0) + --maxValue; + if (Main.rand.Next(maxValue) == 0) + { + if (this.type == 344) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1962); + if (this.type == 345) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1960); + if (this.type == 346) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1961); + } + } + if (closestPlayer.RollLuck(range) == 0) + { + if (this.type == 344) + { + int num = Main.rand.Next(3); + if (closestPlayer.RollLuck(15) == 0) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1871, pfix: -1); + } + else + { + if (num == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1916); + if (num == 1) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1928, pfix: -1); + if (num == 2) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1930, pfix: -1); + } + } + if (this.type == 346) + { + int num = Main.rand.Next(2); + if (num == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1910, pfix: -1); + if (num == 1) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1929, pfix: -1); + } + if (this.type == 345) + { + if (NPC.waveNumber >= 15 && closestPlayer.RollLuck(30) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1914); + else if (closestPlayer.RollLuck(15) == 0) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1959); + } + else + { + int num = Main.rand.Next(3); + if (num == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1931, pfix: -1); + if (num == 1) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1946, pfix: -1); + if (num == 2) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1947, pfix: -1); + } + } + } + } + if (this.type == 341) + { + int num = Main.rand.Next(5, 11); + for (int index = 0; index < num; ++index) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + if (Main.xMas) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1869); + } + if (this.type >= 338 && this.type <= 340 && closestPlayer.RollLuck(5) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + if (this.type >= 338 && this.type <= 340 && closestPlayer.RollLuck(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1943 + Main.rand.Next(3)); + if (this.type == 342 && Main.rand.Next(3) != 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + if (Main.pumpkinMoon) + { + if (this.type == 325) + NPC.SetEventFlagCleared(ref NPC.downedHalloweenTree, 4); + if (this.type == 327) + NPC.SetEventFlagCleared(ref NPC.downedHalloweenKing, 5); + int waveNumber = NPC.waveNumber; + if (Main.expertMode) + waveNumber += 6; + int maxValue = (int) ((double) (17 - waveNumber) / 1.25); + if (Main.expertMode) + --maxValue; + if (maxValue < 1) + maxValue = 1; + if (waveNumber >= 15) + { + if (this.type == 325) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1855); + if (this.type == 327) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1856); + } + if (Main.rand.Next(maxValue) == 0) + { + if (this.type == 315 && Main.rand.Next(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1857); + if (this.type >= 305 && this.type <= 314 && Main.rand.Next(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Main.rand.Next(1788, 1791)); + if (this.type == 325) + { + int num = Main.rand.Next(5); + if (num == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1829); + if (num == 1) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1831); + if (num == 2) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1835, pfix: -1); + if (num == 2) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1836, Main.rand.Next(30, 61)); + if (num == 3) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1837); + if (num == 4) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1845, pfix: -1); + if (Main.expertMode && Main.rand.Next(5) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4444); + } + if (this.type == 327) + { + int num = Main.rand.Next(7); + if (num == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1782, pfix: -1); + if (num == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1783, Main.rand.Next(50, 101)); + if (num == 1) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1784, pfix: -1); + if (num == 1) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1785, Main.rand.Next(25, 51)); + if (num == 2) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1811); + if (num == 3) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1826, pfix: -1); + if (num == 4) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1801, pfix: -1); + if (num == 5) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1802, pfix: -1); + if (num == 6) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1798); + } + } + } + if (this.type == 325) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1729, Main.rand.Next(30, 51)); + if (this.type == 326) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1729, Main.rand.Next(1, 5)); + if (this.type >= 305 && this.type <= 314 && Main.rand.Next(4) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + if (this.type == 326 && Main.rand.Next(6) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + if (this.type == 329 && Main.rand.Next(4) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + if (this.type == 330 && Main.rand.Next(4) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + if (this.type == 315) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + if (Main.halloween && this.lifeMax > 1 && this.damage > 0 && !this.friendly && this.type != 121 && this.type != 23 && (double) this.value > 0.0 && closestPlayer.RollLuck(80) == 0 && !flag1) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1774); + if (Main.xMas && this.lifeMax > 1 && this.damage > 0 && !this.friendly && this.type != 121 && (double) this.value > 0.0 && closestPlayer.RollLuck(13) == 0 && !flag1) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1869); + if (this.lifeMax > 5 && (double) this.value > 0.0 && !this.friendly && Main.hardMode && (double) this.position.Y / 16.0 > (double) Main.UnderworldLayer && !flag1 && closestPlayer.RollLuck(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2701, Main.rand.Next(20, 51)); + if (this.type == 325 || this.type == 327 || this.type == 344 || this.type == 345 || this.type == 346) + { + int num = Main.rand.Next(6) + 6; + for (int index = 0; index < num; ++index) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + } + if (this.type == 156 && closestPlayer.RollLuck(75) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1518); + if (this.type == 243 && closestPlayer.RollLuck(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1519); + if (this.type >= 269 && this.type <= 280 && closestPlayer.RollLuck(450) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1517); + if ((this.type == 158 || this.type == 159) && closestPlayer.RollLuck(40) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1520); + if (this.type == 48 && closestPlayer.RollLuck(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1516); + if (this.type == 176 && closestPlayer.RollLuck(150) == 0 && NPC.downedMechBossAny) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1521); + if (this.type == 205 && closestPlayer.RollLuck(2) == 0 && NPC.downedMechBossAny) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1611); + if (this.type == 483 || this.type == 482) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3086, Main.rand.Next(5, 11), pfix: -1); + if (!Main.hardMode && closestPlayer.RollLuck(100) == 0 && this.HasPlayerTarget && this.lifeMax > 5 && !this.friendly && !flag1 && closestPlayer.RollLuck(4) == 0 && (double) this.position.Y / 16.0 > (double) (Main.maxTilesY - 350) && NPC.downedBoss3) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3282, pfix: -1); + if (Main.hardMode && this.HasPlayerTarget && Main.player[this.target].ZoneSnow && closestPlayer.RollLuck(300) == 0 && this.HasPlayerTarget && this.lifeMax > 5 && !this.friendly && (double) this.value > 0.0 && !flag1) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3289, pfix: -1); + else if (Main.hardMode && closestPlayer.RollLuck(200) == 0 && this.HasPlayerTarget && this.lifeMax > 5 && !this.friendly && (double) this.value > 0.0 && !flag1) + { + if (Main.player[this.target].ZoneJungle && NPC.downedMechBossAny) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3286, pfix: -1); + else if (Main.player[this.target].ZoneDungeon && NPC.downedPlantBoss && Main.rand.Next(2) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3291, pfix: -1); + else if ((double) this.position.Y / 16.0 > (Main.rockLayer + (double) (Main.maxTilesY * 2)) / 3.0 && !Main.player[this.target].ZoneDungeon && Main.rand.Next(2) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3290, pfix: -1); + } + int num1 = 1; + if (Main.expertMode && Main.rand.Next(2) == 0) + num1 = 2; + for (int index = 0; index < num1; ++index) + { + if (this.type == 461 && closestPlayer.RollLuck(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 497, pfix: -1); + if ((this.type == 159 || this.type == 158) && closestPlayer.RollLuck(35) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 900, pfix: -1); + if (this.type == 251 && closestPlayer.RollLuck(15) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1311, pfix: -1); + if (NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3) + { + if (this.type == 477) + { + if (closestPlayer.RollLuck(20) == 0 && NPC.downedPlantBoss) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2770, pfix: -1); + ++index; + } + if (closestPlayer.RollLuck(4) == 0) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1570, pfix: -1); + ++index; + } + else if (closestPlayer.RollLuck(3) == 0 && NPC.downedPlantBoss) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3292, pfix: -1); + ++index; + } + } + if (this.type == 253 && closestPlayer.RollLuck(40) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1327, pfix: -1); + } + if (NPC.downedPlantBoss) + { + if (this.type == 460 && closestPlayer.RollLuck(40) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3098, pfix: -1); + if (this.type == 468 && closestPlayer.RollLuck(40) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3105, pfix: -1); + if (this.type == 466 && closestPlayer.RollLuck(40) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3106, pfix: -1); + if (this.type == 467 && closestPlayer.RollLuck(40) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3249, pfix: -1); + if (this.type == 463 && closestPlayer.RollLuck(25) == 0) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3107, pfix: -1); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3108, Main.rand.Next(100, 201), pfix: -1); + } + } + } + if (Main.bloodMoon && Main.hardMode && closestPlayer.RollLuck(1000) == 0 && (double) this.value > 0.0 && !flag1) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1314, pfix: -1); + if (this.type == 77 && closestPlayer.RollLuck(150) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 723, pfix: -1); + if (this.type == 47 && closestPlayer.RollLuck(25) == 0 && Main.IsItAHappyWindyDay) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4670, pfix: -1); + if (this.type == 464 && closestPlayer.RollLuck(25) == 0 && Main.IsItAHappyWindyDay) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4671, pfix: -1); + if (closestPlayer.RollLuck(100) == 0 || Main.expertMode && closestPlayer.RollLuck(100) == 0) + { + int Type1 = -1; + int Type2 = -1; + switch (this.type) + { + case 34: + case 83: + case 84: + case 179: + case 289: + Type1 = 891; + break; + case 42: + case 141: + case 176: + case 231: + case 232: + case 233: + case 234: + case 235: + Type1 = 887; + break; + case 75: + Type1 = Main.rand.Next(2) != 0 ? 890 : 889; + if (closestPlayer.RollLuck(100) == 0) + { + Type2 = Type1 != 889 ? 889 : 890; + break; + } + break; + case 77: + case 273: + case 274: + case 275: + case 276: + Type1 = 886; + break; + case 78: + case 82: + Type1 = 889; + break; + case 79: + Type1 = Main.rand.Next(2) != 0 ? 890 : 888; + if (closestPlayer.RollLuck(100) == 0) + { + Type2 = Type1 != 888 ? 888 : 890; + break; + } + break; + case 80: + case 93: + case 109: + Type1 = 893; + break; + case 81: + case 183: + Type1 = 888; + break; + case 94: + case 182: + Type1 = 892; + break; + case 102: + case 104: + case 269: + case 270: + case 271: + case 272: + Type1 = 885; + break; + case 103: + Type1 = 890; + break; + case 480: + Type1 = 3781; + break; + } + if (Type1 != -1) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type1, pfix: -1); + if (Type2 != -1) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type2, pfix: -1); + } + int num2 = 1; + if (Main.expertMode && Main.rand.Next(2) == 0) + num2 = 2; + for (int index = 0; index < num2; ++index) + { + if (this.type == 290) + { + if (closestPlayer.RollLuck(15) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1513, pfix: -1); + else if (closestPlayer.RollLuck(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 938, pfix: -1); + } + if (this.type == 287 && closestPlayer.RollLuck(6) == 0) + { + if (Main.rand.Next(2) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 963, pfix: -1); + else + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 977, pfix: -1); + } + if (this.type == 291) + { + if (closestPlayer.RollLuck(12) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1300, pfix: -1); + else if (closestPlayer.RollLuck(12) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1254, pfix: -1); + } + if (this.type == 292) + { + if (closestPlayer.RollLuck(12) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1514, pfix: -1); + else if (closestPlayer.RollLuck(12) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 679, pfix: -1); + } + if (this.type == 293 && closestPlayer.RollLuck(18) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 759, pfix: -1); + if ((this.type == 281 || this.type == 282) && closestPlayer.RollLuck(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1446, pfix: -1); + if ((this.type == 283 || this.type == 284) && closestPlayer.RollLuck(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1444, pfix: -1); + if ((this.type == 285 || this.type == 286) && closestPlayer.RollLuck(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1445, pfix: -1); + if (this.type >= 269 && this.type <= 280) + { + if (closestPlayer.RollLuck(400) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1183, pfix: -1); + else if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1266, pfix: -1); + else if (closestPlayer.RollLuck(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 671, pfix: -1); + } + } + if (this.lifeMax > 100 && this.type != 288 && (double) this.value > 0.0 && this.HasPlayerTarget && Main.hardMode && NPC.downedPlantBoss && Main.player[this.target].ZoneDungeon && !flag1) + { + int range = 13; + if (Main.expertMode) + range = 9; + if (closestPlayer.RollLuck(range) == 0 && Main.wallDungeon[(int) Main.tile[(int) this.Center.X / 16, (int) this.Center.Y / 16].wall]) + NPC.NewNPC((int) this.Center.X, (int) this.Center.Y, 288); + } + if (this.type == 288) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1508, Main.rand.Next(1, 3), pfix: -1); + if (this.type == 156 && closestPlayer.RollLuck(30) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 683, pfix: -1); + if ((this.type == 195 || this.type == 196) && (Main.expertMode || closestPlayer.RollLuck(2) == 0)) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3102, pfix: -1); + if (this.type == 245) + { + if (Main.expertMode) + { + this.DropBossBags(); + } + else + { + if (closestPlayer.RollLuck(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2110, pfix: -1); + if (closestPlayer.RollLuck(4) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1294, pfix: -1); + switch (Main.rand.Next(7)) + { + case 0: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1258, pfix: -1); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1261, Main.rand.Next(60, 100)); + break; + case 1: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1122, pfix: -1); + break; + case 2: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 899, pfix: -1); + break; + case 3: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1248, pfix: -1); + break; + case 4: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1295, pfix: -1); + break; + case 5: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1296, pfix: -1); + break; + case 6: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1297, pfix: -1); + break; + } + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2218, Main.rand.Next(4, 9), pfix: -1); + } + NPC.SetEventFlagCleared(ref NPC.downedGolemBoss, 6); + } + if (this.type == 471 && (Main.expertMode || closestPlayer.RollLuck(2) == 0)) + { + if (Main.rand.Next(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3052, pfix: -1); + else if (Main.rand.Next(2) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3053, pfix: -1); + else + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3054, pfix: -1); + } + if (this.type == 268) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1332, Main.rand.Next(2, 6)); + if (this.type == 370) + { + NPC.SetEventFlagCleared(ref NPC.downedFishron, 7); + if (Main.expertMode) + { + this.DropBossBags(); + } + else + { + if (closestPlayer.RollLuck(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2588, pfix: -1); + if (closestPlayer.RollLuck(15) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2609, pfix: -1); + switch (Main.rand.Next(5)) + { + case 0: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2611, pfix: -1); + break; + case 1: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2624, pfix: -1); + break; + case 2: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2622, pfix: -1); + break; + case 3: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2621, pfix: -1); + break; + case 4: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2623, pfix: -1); + break; + } + } + } + if (this.type == 614) + Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, 0.0f, 281, 175, 0.0f, Main.myPlayer, -2f, (float) ((int) this.releaseOwner + 1)); + if (this.type == 109 && !NPC.downedClown) + { + NPC.downedClown = true; + if (Main.netMode == 2) + NetMessage.SendData(7); + } + if (this.type == 153 && closestPlayer.RollLuck(17) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1328, pfix: -1); + if (this.type == 120) + { + if (Main.expertMode) + { + if (closestPlayer.RollLuck(400) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1326, pfix: -1); + } + else if (closestPlayer.RollLuck(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1326, pfix: -1); + } + if (this.type == 49 && closestPlayer.RollLuck(250) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1325, pfix: -1); + if (this.type == 185 && closestPlayer.RollLuck(150) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 951, pfix: -1); + if (this.type == 44 && closestPlayer.RollLuck(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1320, pfix: -1); + if (this.type == 44 && closestPlayer.RollLuck(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 88, pfix: -1); + if (this.type == 110 && closestPlayer.RollLuck(80) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1321, pfix: -1); + if (this.type == 60 && closestPlayer.RollLuck(150) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1322, pfix: -1); + if (this.type == 151 && closestPlayer.RollLuck(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1322, pfix: -1); + if (this.type == 24 && closestPlayer.RollLuck(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1323, pfix: -1); + if (this.type == 109 && closestPlayer.RollLuck(30) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1324, Main.rand.Next(1, 5), pfix: -1); + if (this.type == 163 || this.type == 238) + { + if (closestPlayer.RollLuck(40) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1308, pfix: -1); + if (Main.expertMode) + { + if (Main.rand.Next(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2607, Main.rand.Next(2, 4)); + else if (Main.rand.Next(2) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2607, Main.rand.Next(1, 4)); + else + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2607); + } + else if (Main.rand.Next(4) != 0) + { + if (Main.rand.Next(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2607, Main.rand.Next(1, 4)); + else if (Main.rand.Next(2) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2607, Main.rand.Next(1, 3)); + else + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2607); + } + } + if (Main.hardMode && (this.type == 197 || this.type == 206 || this.type == 169 || this.type == 154) && closestPlayer.RollLuck(180) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1306, pfix: -1); + if (this.type == 244) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 23, Main.rand.Next(1, 6)); + if (Main.rand.Next(2) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 23, Main.rand.Next(1, 6)); + if (Main.rand.Next(2) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 23, Main.rand.Next(1, 6)); + if (Main.rand.Next(2) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 23, Main.rand.Next(1, 6)); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 662, Main.rand.Next(30, 60)); + } + if (this.type == 250 && closestPlayer.RollLuck(15) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1244, pfix: -1); + if (this.type == 172) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 754, pfix: -1); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 755, pfix: -1); + } + if (this.type == 110 && closestPlayer.RollLuck(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 682, pfix: -1); + if (this.type == 170 || this.type == 180 || this.type == 171) + { + if (closestPlayer.RollLuck(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4428, pfix: -1); + else if (closestPlayer.RollLuck(25) == 0 && Main.IsItAHappyWindyDay) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4613); + } + if (this.type == 154 && closestPlayer.RollLuck(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1253, pfix: -1); + if ((this.type == 169 || this.type == 206) && closestPlayer.RollLuck(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 726, pfix: -1); + if (this.type == 243) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2161, pfix: -1); + if (this.type == 480 && closestPlayer.RollLuck(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3269, pfix: -1); + if (this.type == 198 || this.type == 199 || this.type == 226) + { + if (closestPlayer.RollLuck(1000) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1172, pfix: -1); + if (closestPlayer.RollLuck(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1293, pfix: -1); + if (closestPlayer.RollLuck(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2766, Main.rand.Next(1, 3), pfix: -1); + } + if (this.type == 78 || this.type == 79 || this.type == 80) + { + if (closestPlayer.RollLuck(75) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 870, pfix: -1); + if (closestPlayer.RollLuck(75) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 871, pfix: -1); + if (closestPlayer.RollLuck(75) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 872, pfix: -1); + } + if (this.type == 473) + { + switch (Main.rand.Next(5)) + { + case 0: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3008, pfix: -1); + break; + case 1: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3014, pfix: -1); + break; + case 2: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3012, pfix: -1); + break; + case 3: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3015, pfix: -1); + break; + case 4: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3023, pfix: -1); + break; + } + } + else if (this.type == 474) + { + switch (Main.rand.Next(5)) + { + case 0: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3006, pfix: -1); + break; + case 1: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3007, pfix: -1); + break; + case 2: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3013, pfix: -1); + break; + case 3: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3016, pfix: -1); + break; + case 4: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3020, pfix: -1); + break; + } + } + else if (this.type == 475) + { + switch (Main.rand.Next(4)) + { + case 0: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3029, pfix: -1); + break; + case 1: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3030, pfix: -1); + break; + case 2: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3051, pfix: -1); + break; + case 3: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3022, pfix: -1); + break; + } + } + else + { + int type = this.type; + } + if (this.type == 473 || this.type == 474 || this.type == 475 || this.type == 476) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 499, Main.rand.Next(5, 11), pfix: -1); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 500, Main.rand.Next(5, 16), pfix: -1); + } + if (this.type == 85 && (double) this.value > 0.0) + { + if ((double) this.ai[3] == 4.0) + { + if (closestPlayer.RollLuck(20) == 0) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1312, pfix: -1); + } + else + { + switch (Main.rand.Next(3)) + { + case 0: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 676, pfix: -1); + break; + case 1: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 725, pfix: -1); + break; + case 2: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1264, pfix: -1); + break; + } + } + } + else + { + switch (Main.rand.Next(6)) + { + case 0: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 437, pfix: -1); + break; + case 1: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 517, pfix: -1); + break; + case 2: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 535, pfix: -1); + break; + case 3: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 536, pfix: -1); + break; + case 4: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 532, pfix: -1); + break; + default: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 554, pfix: -1); + break; + } + } + } + if (this.type == 87) + { + if (closestPlayer.RollLuck(25) == 0 && Main.IsItAHappyWindyDay) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4379); + else if (Main.expertMode) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 575, Main.rand.Next(5, 11) * 2); + else + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 575, Main.rand.Next(5, 11)); + } + if (this.type >= 212 && this.type <= 215) + { + if (!flag1) + { + if (closestPlayer.RollLuck(8000) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 905, pfix: -1); + if (closestPlayer.RollLuck(4000) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 855, pfix: -1); + if (closestPlayer.RollLuck(2000) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 854, pfix: -1); + if (closestPlayer.RollLuck(2000) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2584, pfix: -1); + if (closestPlayer.RollLuck(1000) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3033, pfix: -1); + if (closestPlayer.RollLuck(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 672, pfix: -1); + if (closestPlayer.RollLuck(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1277); + if (closestPlayer.RollLuck(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1278); + if (closestPlayer.RollLuck(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1279); + if (closestPlayer.RollLuck(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1280); + if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1704); + if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1705); + if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1710); + if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1716); + if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1720); + if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2379); + if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2389); + if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2405); + if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2843); + if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3885); + if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2663); + if (closestPlayer.RollLuck(150) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3904, Main.rand.Next(6, 11) * 5); + if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3910); + if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2238); + if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2133); + if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2137); + if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2143); + if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2147); + if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2151); + if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2155); + if (closestPlayer.RollLuck(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3263); + if (closestPlayer.RollLuck(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3264); + if (closestPlayer.RollLuck(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3265); + } + } + else if (this.type == 216) + { + if (closestPlayer.RollLuck(2000) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 905, pfix: -1); + if (closestPlayer.RollLuck(1000) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 855, pfix: -1); + if (closestPlayer.RollLuck(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 854, pfix: -1); + if (closestPlayer.RollLuck(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2584, pfix: -1); + if (closestPlayer.RollLuck(250) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3033, pfix: -1); + if (closestPlayer.RollLuck(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 672, pfix: -1); + } + else if (this.type == 491) + { + if (closestPlayer.RollLuck(400) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 905, pfix: -1); + else if (closestPlayer.RollLuck(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 855, pfix: -1); + else if (closestPlayer.RollLuck(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 854, pfix: -1); + else if (closestPlayer.RollLuck(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2584, pfix: -1); + else if (closestPlayer.RollLuck(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3033, pfix: -1); + else if (closestPlayer.RollLuck(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4471, pfix: -1); + else if (closestPlayer.RollLuck(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 672, pfix: -1); + } + if ((this.type == 161 || this.type == 431) && closestPlayer.RollLuck(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 803 + Main.rand.Next(3)); + if (this.type == 217) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1115, pfix: -1); + if (this.type == 218) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1116, pfix: -1); + if (this.type == 219) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1117, pfix: -1); + if (this.type == 220) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1118, pfix: -1); + if (this.type == 221) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1119, pfix: -1); + if (this.type == 167 && closestPlayer.RollLuck(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 879, pfix: -1); + if (this.type == 143 || this.type == 144 || this.type == 145) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 593, Main.rand.Next(5, 11)); + if (this.type == 79) + { + if (closestPlayer.RollLuck(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 527); + } + else if (this.type == 80 && closestPlayer.RollLuck(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 528); + if (this.type == 524 && closestPlayer.RollLuck(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3794, Main.rand.Next(1, 4)); + if (this.type == 525) + { + if (closestPlayer.RollLuck(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3794); + if (closestPlayer.RollLuck(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 522, Main.rand.Next(1, 4)); + if (closestPlayer.RollLuck(15) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 527); + } + if (this.type == 526) + { + if (closestPlayer.RollLuck(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3794); + if (closestPlayer.RollLuck(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1332, Main.rand.Next(1, 4)); + if (closestPlayer.RollLuck(15) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 527); + } + if (this.type == 527) + { + if (closestPlayer.RollLuck(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3794); + if (closestPlayer.RollLuck(15) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 528); + } + if (this.type == 532) + { + if (closestPlayer.RollLuck(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3380); + if (closestPlayer.RollLuck(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3771); + } + if (this.type == 528) + { + if (closestPlayer.RollLuck(25) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2802); + if (closestPlayer.RollLuck(60) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3784 + Main.rand.Next(3)); + } + else if (this.type == 529) + { + if (closestPlayer.RollLuck(25) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2801); + if (closestPlayer.RollLuck(40) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3784 + Main.rand.Next(3)); + } + if ((this.type == 49 || this.type == 51 || this.type == 150 || this.type == 93) && closestPlayer.RollLuck(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 18, pfix: -1); + if ((this.type == 16 || this.type == 185 || this.type == 167 || this.type == 197) && closestPlayer.RollLuck(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 393, pfix: -1); + if (this.type == 58 && closestPlayer.RollLuck(75) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 393, pfix: -1); + if (this.type >= 494 && this.type <= 506) + { + if (closestPlayer.RollLuck(80) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 18, pfix: -1); + else if (closestPlayer.RollLuck(80) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 393, pfix: -1); + else if (closestPlayer.RollLuck(25) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3285, pfix: -1); + } + if (this.type == 21 || this.type == 201 || this.type == 202 || this.type == 203 || this.type == 322 || this.type == 323 || this.type == 324 || this.type >= 449 && this.type <= 452) + { + if (closestPlayer.RollLuck(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 954, pfix: -1); + else if (closestPlayer.RollLuck(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 955, pfix: -1); + else if (closestPlayer.RollLuck(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1166, pfix: -1); + else if (closestPlayer.RollLuck(500) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1274, pfix: -1); + } + else if (this.type == 6) + { + if (closestPlayer.RollLuck(175) == 0) + { + switch (Main.rand.Next(3)) + { + case 0: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 956, pfix: -1); + break; + case 1: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 957, pfix: -1); + break; + default: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 958, pfix: -1); + break; + } + } + } + else if (this.type == 42 || this.type == 43 || this.type >= 231 && this.type <= 235) + { + if (closestPlayer.RollLuck(100) == 0) + { + switch (Main.rand.Next(3)) + { + case 0: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 960, pfix: -1); + break; + case 1: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 961, pfix: -1); + break; + default: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 962, pfix: -1); + break; + } + } + } + else if (this.type == 31 || this.type == 32 || this.type == 294 || this.type == 295 || this.type == 296) + { + if (closestPlayer.RollLuck(450) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 959, pfix: -1); + if (closestPlayer.RollLuck(300) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1307, pfix: -1); + } + if ((this.type == 174 || this.type == 179 || this.type == 182 || this.type == 183) && closestPlayer.RollLuck(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 996); + if ((this.type == 98 || this.type == 83 || this.type == 94 || this.type == 81) && closestPlayer.RollLuck(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 996); + if (this.type == 101 || this.type == 98) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 522, Main.rand.Next(2, 6)); + if (this.type == 98 && closestPlayer.RollLuck(25) == 0 && Main.IsItAHappyWindyDay) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4611); + if (this.type == 86) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 526); + if (closestPlayer.RollLuck(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 856); + } + if (this.type == 224 && closestPlayer.RollLuck(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4057); + if (this.type == 186 || this.type == 432) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 40, Main.rand.Next(1, 10)); + if (this.type == 225) + { + if (closestPlayer.RollLuck(45) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1243); + else + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 23, Main.rand.Next(2, 7)); + } + if (this.type == 537) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 23, Main.rand.Next(2, 4)); + int range = 8000; + if (Main.expertMode) + range = (int) ((double) range * 0.7); + if (closestPlayer.RollLuck(range) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1309, pfix: -1); + } + if (this.type >= 333 && this.type <= 336 && closestPlayer.RollLuck(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1906); + if (this.netID == -4) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3111, Main.rand.Next(25, 51)); + int range = 100; + if (Main.expertMode) + range = (int) ((double) range * 0.7); + if (closestPlayer.RollLuck(range) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1309, pfix: -1); + } + else if (this.type == 1 || this.type == 16 || this.type == 138 || this.type == 141 || this.type == 147 || this.type == 184 || this.type == 187 || this.type == 204 || this.type == 302 || this.type >= 333 && this.type <= 336 || this.type == 535) + { + int Stack = Main.rand.Next(1, 3); + if (this.netID == -6 || this.netID == -7 || this.netID == -8 || this.netID == -9) + Stack += Main.rand.Next(1, 4); + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 23, Stack); + if (this.netID <= 1 && this.netID != -1 && this.netID != -2 && this.netID != -5 && this.netID != -6) + { + Main.item[number].color = this.color; + NetMessage.SendData(88, number: number, number2: 1f); + } + int range = 10000; + if (Main.expertMode) + range = (int) ((double) range * 0.7); + if (closestPlayer.RollLuck(range) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1309, pfix: -1); + } + if (this.type == 75) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 501, Main.rand.Next(1, 4)); + if (this.type == 81 || this.type == 183) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 23, Main.rand.Next(2, 5)); + if (this.type == 122) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 23, Main.rand.Next(5, 11)); + if (this.type == 71) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 327); + if (this.type == 2 || this.type == 317 || this.type == 318 || this.type == 190 || this.type == 191 || this.type == 192 || this.type == 193 || this.type == 194 || this.type == 133) + { + if (closestPlayer.RollLuck(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 236); + else if (closestPlayer.RollLuck(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 38); + } + if (this.type == 104 && closestPlayer.RollLuck(60) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 485, pfix: -1); + if (this.type == 58) + { + if (closestPlayer.RollLuck(250) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 263); + else if (closestPlayer.RollLuck(30) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 118); + } + if (this.type == 102 && closestPlayer.RollLuck(250) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 263); + if (this.type == 3 || this.type == 591 || this.type == 590 || this.type == 331 || this.type == 332 || this.type == 132 || this.type == 161 || this.type == 186 || this.type == 187 || this.type == 188 || this.type == 189 || this.type == 200 || this.type == 223 || this.type == 319 || this.type == 320 || this.type == 321 || this.type >= 430 && this.type <= 436) + { + if (closestPlayer.RollLuck(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 216, pfix: -1); + if (closestPlayer.RollLuck(250) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1304, pfix: -1); + if (this.type == 590 || this.type == 591) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 8, Main.rand.Next(5, 21)); + } + if ((this.type == 587 || this.type == 586) && closestPlayer.RollLuck(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4608, Main.rand.Next(5, 7)); + if ((this.type == 620 || this.type == 621) && closestPlayer.RollLuck(2) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4608, Main.rand.Next(7, 11)); + if ((this.type == 587 || this.type == 586) && closestPlayer.RollLuck(15) == 0) + { + switch (Main.rand.Next(3)) + { + case 0: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4273); + break; + case 1: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4381); + break; + case 2: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4325); + break; + } + } + if (this.type == 620) + { + if (closestPlayer.RollLuck(15) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4270); + if (closestPlayer.RollLuck(15) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4317); + } + if (this.type == 621) + { + if (closestPlayer.RollLuck(15) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4272); + if (closestPlayer.RollLuck(15) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4317); + } + if (this.type == 618) + { + if (closestPlayer.RollLuck(5) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4269); + if (closestPlayer.RollLuck(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4054); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4608, Main.rand.Next(7, 11)); + } + if (!Main.dayTime && Main.bloodMoon && !this.SpawnedFromStatue && !flag1) + { + if ((this.type == 587 || this.type == 586 || this.type == 489 || this.type == 490 || this.type == 109 || this.type == 621 || this.type == 620 || this.type == 619) && closestPlayer.RollLuck(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4271); + if ((this.type == 53 || this.type == 536 || this.type == 618) && closestPlayer.RollLuck(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4271); + } + if ((this.type == 489 || this.type == 490) && (Main.expertMode || closestPlayer.RollLuck(2) == 0)) + { + if (closestPlayer.RollLuck(75) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3212, pfix: -1); + if (closestPlayer.RollLuck(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3213, pfix: -1); + } + if (this.type == 223 && closestPlayer.RollLuck(20) == 0) + { + if (Main.rand.Next(2) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1135, pfix: -1); + else + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1136, pfix: -1); + } + if (this.type == 66) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 267); + if ((this.type == 62 || this.type == 66) && closestPlayer.RollLuck(35) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 272, pfix: -1); + if ((double) this.value > 0.0 && Main.hardMode && (double) this.position.Y / 16.0 < Main.worldSurface + 10.0 && ((double) this.Center.X / 16.0 < 380.0 || (double) this.Center.X / 16.0 > (double) (Main.maxTilesX - 380)) && !flag1 && closestPlayer.RollLuck(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1315); + if (this.type == 52) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 251); + if (this.type == 53) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 239); + if (this.type == 536) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3478); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3479); + } + if (this.type == 54) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 260); + if (this.type == 368) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2222); + if ((this.type == 69 || this.type == 581 || this.type == 580 || this.type == 508 || this.type == 509) && closestPlayer.RollLuck(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 323, Main.rand.Next(1, 3)); + if (this.type == 582 && closestPlayer.RollLuck(6) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 323); + if ((this.type == 580 || this.type == 508 || this.type == 581 || this.type == 509) && closestPlayer.RollLuck(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3772); + if (this.type == 73) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 362, Main.rand.Next(1, 3)); + if (this.type == 483 || this.type == 482) + { + if (closestPlayer.RollLuck(30) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3109); + if (closestPlayer.RollLuck(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4400); + } + if ((this.type == 6 || this.type == 94) && closestPlayer.RollLuck(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 68); + if ((this.type == 181 || this.type == 173 || this.type == 239 || this.type == 182 || this.type == 240) && closestPlayer.RollLuck(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1330); + if (this.type == 7 || this.type == 8 || this.type == 9) + { + if (closestPlayer.RollLuck(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 68, Main.rand.Next(1, 3)); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 69, Main.rand.Next(3, 9)); + } + if ((this.type == 10 || this.type == 11 || this.type == 12 || this.type == 95 || this.type == 96 || this.type == 97) && (closestPlayer.RollLuck(50) == 0 || Main.expertMode && closestPlayer.RollLuck(50) == 0)) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 215); + if ((this.type == 47 || this.type == 464) && closestPlayer.RollLuck(75) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 243); + if ((this.type == 168 || this.type == 470) && closestPlayer.RollLuck(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, (int) Utils.SelectRandom(Main.rand, (short) 3757, (short) 3758, (short) 3759)); + if (this.type == 533) + { + if (closestPlayer.RollLuck(40) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3795); + else if (closestPlayer.RollLuck(30) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3770); + } + if (this.type == 551) + { + if (Main.expertMode) + { + this.DropBossBags(); + } + else + { + switch (Main.rand.Next(4)) + { + case 0: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3859, pfix: -1); + break; + case 1: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3827, pfix: -1); + break; + case 2: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3870, pfix: -1); + break; + default: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3858, pfix: -1); + break; + } + if (Main.rand.Next(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3863, pfix: -1); + if (Main.rand.Next(4) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3883, pfix: -1); + } + } + if (this.type == 4) + { + if (Main.expertMode) + { + this.DropBossBags(); + } + else + { + if (closestPlayer.RollLuck(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2112, pfix: -1); + if (closestPlayer.RollLuck(40) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1299); + int num3 = 1; + for (int index = 0; index < num3; ++index) + { + if (WorldGen.crimson) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 880, Main.rand.Next(20) + 10); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 880, Main.rand.Next(20) + 10); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 880, Main.rand.Next(20) + 10); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2171, Main.rand.Next(3) + 1); + } + else + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 47, Main.rand.Next(30) + 20); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 56, Main.rand.Next(20) + 10); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 56, Main.rand.Next(20) + 10); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 56, Main.rand.Next(20) + 10); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 59, Main.rand.Next(3) + 1); + } + } + } + } + if (this.type == 266) + { + if (Main.expertMode) + { + this.DropBossBags(); + } + else + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 880, Main.rand.Next(20, 46)); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 880, Main.rand.Next(20, 46)); + if (closestPlayer.RollLuck(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2104, pfix: -1); + if (closestPlayer.RollLuck(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3060); + } + } + if (this.type == 267 && NPC.AnyNPCs(266)) + { + int Stack1 = Main.rand.Next(2, 6); + if (Main.rand.Next(3) != 0) + { + if (Main.expertMode) + Stack1 += Main.rand.Next(2, 6); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1329, Stack1); + } + if (Main.rand.Next(3) != 0) + { + int Stack2 = Main.rand.Next(5, 13); + if (Main.expertMode) + Stack2 += Main.rand.Next(6, 14); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 880, Stack2); + } + if (Main.rand.Next(2) == 0 && closestPlayer.statLife < closestPlayer.statLifeMax2) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + } + if (this.type == 13 || this.type == 14 || this.type == 15) + { + int Stack = Main.rand.Next(1, 3); + if (Main.rand.Next(2) == 0) + { + if (Main.expertMode) + ++Stack; + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 86, Stack); + } + if (Main.rand.Next(2) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 56, Main.rand.Next(2, 6)); + if (this.boss) + { + if (Main.expertMode) + { + this.DropBossBags(); + } + else + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 56, Main.rand.Next(10, 30)); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 56, Main.rand.Next(10, 31)); + if (closestPlayer.RollLuck(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 994); + if (closestPlayer.RollLuck(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2111, pfix: -1); + } + } + if (Main.rand.Next(4) == 0 && closestPlayer.statLife < closestPlayer.statLifeMax2) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + } + if (this.type == 222) + { + if (Main.expertMode) + { + this.DropBossBags(); + } + else + { + if (closestPlayer.RollLuck(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2108, pfix: -1); + int Type = Main.rand.Next(3); + switch (Type) + { + case 0: + Type = 1121; + break; + case 1: + Type = 1123; + break; + case 2: + Type = 2888; + break; + } + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, pfix: -1); + if (closestPlayer.RollLuck(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1132, pfix: -1); + if (closestPlayer.RollLuck(15) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1170); + if (closestPlayer.RollLuck(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2502); + if (Main.rand.Next(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1129); + else if (Main.rand.Next(2) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Main.rand.Next(842, 845)); + if (Main.rand.Next(4) != 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1130, Main.rand.Next(10, 30)); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2431, Main.rand.Next(16, 27)); + } + NPC.SetEventFlagCleared(ref NPC.downedQueenBee, 8); + if (Main.netMode == 2) + NetMessage.SendData(7); + } + if (this.type == 35) + { + if (Main.expertMode) + this.DropBossBags(); + else if (closestPlayer.RollLuck(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1281, pfix: -1); + else if (closestPlayer.RollLuck(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1273, pfix: -1); + else if (closestPlayer.RollLuck(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1313, pfix: -1); + } + if (this.type == 113) + { + if (Main.expertMode) + { + this.DropBossBags(); + } + else + { + if (closestPlayer.RollLuck(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2105, pfix: -1); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 367, pfix: -1); + if (Main.rand.Next(2) == 0) + { + int num4 = Main.rand.Next(4); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, num4 != 3 ? 489 + num4 : 2998, pfix: -1); + } + else + { + switch (Main.rand.Next(3)) + { + case 0: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 514, pfix: -1); + break; + case 1: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 426, pfix: -1); + break; + case 2: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 434, pfix: -1); + break; + } + } + } + if (Main.netMode != 1 && !flag1) + { + int num5 = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int num6 = (int) ((double) this.position.Y + (double) (this.height / 2)) / 16; + int num7 = this.width / 2 / 16 + 1; + for (int index1 = num5 - num7; index1 <= num5 + num7; ++index1) + { + for (int index2 = num6 - num7; index2 <= num6 + num7; ++index2) + { + if ((index1 == num5 - num7 || index1 == num5 + num7 || index2 == num6 - num7 || index2 == num6 + num7) && !Main.tile[index1, index2].active()) + { + Main.tile[index1, index2].type = WorldGen.crimson ? (ushort) 347 : (ushort) 140; + Main.tile[index1, index2].active(true); + } + Main.tile[index1, index2].lava(false); + Main.tile[index1, index2].liquid = (byte) 0; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index1, index2, 1); + else + WorldGen.SquareTileFrame(index1, index2); + } + } + } + } + if (this.type == 439) + { + NPC.SetEventFlagCleared(ref NPC.downedAncientCultist, 9); + if (closestPlayer.RollLuck(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3372, pfix: -1); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3549, pfix: -1); + WorldGen.TriggerLunarApocalypse(); + } + if (this.type == 398) + { + NPC.SetEventFlagCleared(ref NPC.downedMoonlord, 10); + NPC.LunarApocalypseIsUp = false; + if (Main.expertMode) + { + this.DropBossBags(); + } + else + { + if (closestPlayer.RollLuck(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3373, pfix: -1); + if (closestPlayer.RollLuck(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4469, pfix: -1); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3384, pfix: -1); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3460, Main.rand.Next(70, 91), pfix: -1); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Utils.SelectRandom(Main.rand, 3063, 3389, 3065, 1553, 3930, 3541, 3570, 3571, 3569), pfix: -1); + } + } + switch (this.type) + { + case 402: + case 405: + case 407: + case 409: + case 411: + if ((this.type != 406 || Main.rand.Next(3) == 0) && NPC.ShieldStrengthTowerStardust > 0) + { + Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, 0.0f, 629, 0, 0.0f, Main.myPlayer, (float) NPC.FindFirstNPC(493)); + break; + } + break; + case 412: + case 413: + case 414: + case 415: + case 416: + case 417: + case 418: + case 419: + case 518: + if (NPC.ShieldStrengthTowerSolar > 0) + { + Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, 0.0f, 629, 0, 0.0f, Main.myPlayer, (float) NPC.FindFirstNPC(517)); + break; + } + break; + case 420: + case 421: + case 423: + case 424: + if (NPC.ShieldStrengthTowerNebula > 0) + { + Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, 0.0f, 629, 0, 0.0f, Main.myPlayer, (float) NPC.FindFirstNPC(507)); + break; + } + break; + case 422: + int num8 = Main.rand.Next(25, 41) / 2; + if (Main.expertMode) + num8 = (int) ((double) num8 * 1.5); + for (int index = 0; index < num8; ++index) + Item.NewItem((int) this.position.X + Main.rand.Next(this.width), (int) this.position.Y + Main.rand.Next(this.height), 2, 2, 3456, Main.rand.Next(1, 4)); + NPC.downedTowerVortex = true; + NPC.TowerActiveVortex = false; + WorldGen.UpdateLunarApocalypse(); + WorldGen.MessageLunarApocalypse(); + break; + case 425: + case 426: + case 427: + case 429: + if (NPC.ShieldStrengthTowerVortex > 0) + { + Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, 0.0f, 629, 0, 0.0f, Main.myPlayer, (float) NPC.FindFirstNPC(422)); + break; + } + break; + case 493: + int num9 = Main.rand.Next(25, 41) / 2; + if (Main.expertMode) + num9 = (int) ((double) num9 * 1.5); + for (int index = 0; index < num9; ++index) + Item.NewItem((int) this.position.X + Main.rand.Next(this.width), (int) this.position.Y + Main.rand.Next(this.height), 2, 2, 3459, Main.rand.Next(1, 4)); + NPC.downedTowerStardust = true; + NPC.TowerActiveStardust = false; + WorldGen.UpdateLunarApocalypse(); + WorldGen.MessageLunarApocalypse(); + break; + case 507: + int num10 = Main.rand.Next(25, 41) / 2; + if (Main.expertMode) + num10 = (int) ((double) num10 * 1.5); + for (int index = 0; index < num10; ++index) + Item.NewItem((int) this.position.X + Main.rand.Next(this.width), (int) this.position.Y + Main.rand.Next(this.height), 2, 2, 3457, Main.rand.Next(1, 4)); + NPC.downedTowerNebula = true; + NPC.TowerActiveNebula = false; + WorldGen.UpdateLunarApocalypse(); + WorldGen.MessageLunarApocalypse(); + break; + case 517: + int num11 = Main.rand.Next(25, 41) / 2; + if (Main.expertMode) + num11 = (int) ((double) num11 * 1.5); + for (int index = 0; index < num11; ++index) + Item.NewItem((int) this.position.X + Main.rand.Next(this.width), (int) this.position.Y + Main.rand.Next(this.height), 2, 2, 3458, Main.rand.Next(1, 4)); + NPC.downedTowerSolar = true; + NPC.TowerActiveSolar = false; + WorldGen.UpdateLunarApocalypse(); + WorldGen.MessageLunarApocalypse(); + break; + } + switch (this.type) + { + case 381: + case 382: + case 383: + case 385: + case 386: + case 389: + case 390: + case 520: + if (closestPlayer.RollLuck(8) == 0) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2860, Main.rand.Next(8, 21)); + break; + } + break; + } + switch (this.type) + { + case 381: + case 382: + case 383: + case 385: + case 386: + case 389: + case 390: + case 520: + if (closestPlayer.RollLuck(600) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2798); + if (closestPlayer.RollLuck(600) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2800); + if (closestPlayer.RollLuck(600) == 0) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2882); + break; + } + break; + } + switch (this.type) + { + case 383: + case 386: + case 389: + if (closestPlayer.RollLuck(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2806); + if (closestPlayer.RollLuck(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2807); + if (closestPlayer.RollLuck(200) == 0) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2808); + break; + } + break; + } + switch (this.type) + { + case 381: + case 382: + case 385: + case 390: + if (closestPlayer.RollLuck(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2803); + if (closestPlayer.RollLuck(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2804); + if (closestPlayer.RollLuck(200) == 0) + { + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2805); + break; + } + break; + } + if (this.type == 395) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Utils.SelectRandom(Main.rand, 2797, 2749, 2795, 2796, 2880, 2769)); + if (this.type == 390 && closestPlayer.RollLuck(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2771); + if ((this.type == 116 || this.type == 117 || this.type == 118 || this.type == 119) && (!Main.expertMode || Main.rand.Next(5) == 0)) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + if (this.type == 139 && Main.rand.Next(2) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + if (this.type == 63 || this.type == 64 || this.type == 103) + { + if (closestPlayer.RollLuck(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1303, pfix: -1); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 282, Main.rand.Next(1, 5)); + } + if (this.type == 63 && closestPlayer.RollLuck(50) == 0 && Main.IsItAHappyWindyDay) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4649); + if (this.type == 64 && closestPlayer.RollLuck(50) == 0 && Main.IsItAHappyWindyDay) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4650); + if (this.type == 481 && Main.rand.Next(2) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3094, Main.rand.Next(40, 81)); + if (this.type == 481 && closestPlayer.RollLuck(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3187 + Main.rand.Next(3)); + if (this.type == 481 && closestPlayer.RollLuck(40) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4463); + if (this.type == 21 || this.type == 44 || this.type == 167 || this.type == 201 || this.type == 202 || this.type == 481 || this.type == 203 || this.type == 322 || this.type == 323 || this.type == 324 || this.type >= 449 && this.type <= 452) + { + if (closestPlayer.RollLuck(25) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 118); + else if (this.type == 44) + { + if (closestPlayer.RollLuck(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Main.rand.Next(410, 412)); + else + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 166, Main.rand.Next(1, 4)); + } + } + if (this.type == 45) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 238); + if (this.type == 50) + { + if (Main.slimeRain) + { + Main.StopSlimeRain(); + AchievementsHelper.NotifyProgressionEvent(16); + } + if (Main.expertMode) + { + this.DropBossBags(); + } + else + { + if (closestPlayer.RollLuck(4) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2430); + if (closestPlayer.RollLuck(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2493, pfix: -1); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Main.rand.Next(256, 259)); + Main.rand.Next(2); + if (Main.rand.Next(3) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2585); + else + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2610); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 998); + } + NPC.SetEventFlagCleared(ref NPC.downedSlimeKing, 11); + if (Main.netMode == 2) + NetMessage.SendData(7); + } + if (this.type == 23 && closestPlayer.RollLuck(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 116); + if (this.type == 24 && closestPlayer.RollLuck(250) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 244); + if (this.type == 31 || this.type == 32 || this.type == 34 || this.type >= 294 && this.type <= 296) + { + if (closestPlayer.RollLuck(250) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 932); + else if (closestPlayer.RollLuck(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3095); + else if (closestPlayer.RollLuck(65) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 327); + else if (!Main.expertMode) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 154, Main.rand.Next(1, 4)); + if (Main.expertMode) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 154, Main.rand.Next(2, 7)); + } + if (this.type == 26 || this.type == 27 || this.type == 28 || this.type == 29 || this.type == 111) + { + if (closestPlayer.RollLuck(200) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 160); + else if (Main.rand.Next(2) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 161, Main.rand.Next(1, 6)); + } + if (this.type == 175 && closestPlayer.RollLuck(100) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1265, pfix: -1); + if ((this.type == 42 || this.type >= 231 && this.type <= 235) && (Main.expertMode || Main.rand.Next(3) != 0)) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 209); + if (this.type == 204 && (Main.expertMode || Main.rand.Next(2) == 0)) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 209); + if (this.type == 43) + { + if (closestPlayer.RollLuck(25) == 0 && Main.IsItAHappyWindyDay) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4648); + else if (Main.expertMode || Main.rand.Next(2) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 210); + } + if (this.type == 39 && closestPlayer.RollLuck(25) == 0 && Main.IsItAHappyWindyDay) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4610); + if (this.type == 65) + { + if (closestPlayer.RollLuck(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 268); + else if (closestPlayer.RollLuck(25) == 0 && Main.IsItAHappyWindyDay) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4651); + else + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 319); + } + if (this.type == 48 && Main.rand.Next(2) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 320); + if (this.type == 541) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3783); + if ((this.type == 542 || this.type == 543 || this.type == 544 || this.type == 545) && closestPlayer.RollLuck(10) == 0 && Main.IsItAHappyWindyDay) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4669); + if (this.type == 542 && closestPlayer.RollLuck(8) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 319); + Main.item[number].color = new Color(189, 148, 96, (int) byte.MaxValue); + NetMessage.SendData(88, number: number, number2: 1f); + } + if (this.type == 543 || this.type == 544) + { + if (closestPlayer.RollLuck(25) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 527); + if (closestPlayer.RollLuck(8) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 319); + Main.item[number].color = this.type != 544 ? new Color(112, 85, 89, (int) byte.MaxValue) : new Color(145, 27, 40, (int) byte.MaxValue); + NetMessage.SendData(88, number: number, number2: 1f); + } + } + if (this.type == 545) + { + if (closestPlayer.RollLuck(25) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 528); + if (closestPlayer.RollLuck(8) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 319); + Main.item[number].color = new Color(158, 113, 164, (int) byte.MaxValue); + NetMessage.SendData(88, number: number, number2: 1f); + } + } + if (this.type == 125 || this.type == 126) + { + int Type = 125; + if (this.type == 125) + Type = 126; + if (!NPC.AnyNPCs(Type)) + { + if (Main.expertMode) + { + this.DropBossBags(); + } + else + { + if (closestPlayer.RollLuck(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2106, pfix: -1); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 549, Main.rand.Next(25, 41)); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1225, Main.rand.Next(15, 31)); + } + } + else + { + this.value = 0.0f; + this.boss = false; + } + } + else if (Main.expertMode) + { + if (this.type == (int) sbyte.MaxValue || this.type == 134) + this.DropBossBags(); + } + else if (this.type == (int) sbyte.MaxValue) + { + if (closestPlayer.RollLuck(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2107, pfix: -1); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 547, Main.rand.Next(25, 41)); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1225, Main.rand.Next(15, 31)); + } + else if (this.type == 134) + { + if (Main.rand.Next(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2113, pfix: -1); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 548, Main.rand.Next(25, 41)); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1225, Main.rand.Next(15, 31)); + } + if (this.type == 262) + { + if (Main.expertMode) + { + this.DropBossBags(); + } + else + { + if (closestPlayer.RollLuck(7) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2109, pfix: -1); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1141, pfix: -1); + if (closestPlayer.RollLuck(20) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1182, pfix: -1); + if (closestPlayer.RollLuck(50) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1305, pfix: -1); + if (closestPlayer.RollLuck(4) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1157, pfix: -1); + if (closestPlayer.RollLuck(10) == 0) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3021, pfix: -1); + int num12 = 1; + for (int index = 0; index < num12; ++index) + { + int num13 = Main.rand.Next(7); + if (!NPC.downedPlantBoss) + num13 = 0; + switch (num13) + { + case 0: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 758, pfix: -1); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 771, Main.rand.Next(50, 150)); + break; + case 1: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1255, pfix: -1); + break; + case 2: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 788, pfix: -1); + break; + case 3: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1178, pfix: -1); + break; + case 4: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1259, pfix: -1); + break; + case 5: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1155, pfix: -1); + break; + case 6: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3018, pfix: -1); + break; + } + } + } + int num14 = NPC.downedPlantBoss ? 1 : 0; + NPC.SetEventFlagCleared(ref NPC.downedPlantBoss, 12); + if (num14 == 0) + { + switch (Main.netMode) + { + case 0: + Main.NewText(Lang.misc[33].Value, (byte) 50, B: (byte) 130); + break; + case 2: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[33].Key), new Color(50, (int) byte.MaxValue, 130)); + break; + } + } + } + if ((this.boss || this.type == 125 || this.type == 126 || this.type == 491 || this.type == 551 || this.type == 576 || this.type == 577 || this.type == 564 || this.type == 565) && closestPlayer.RollLuck(10) == 0) + { + if (this.type == 4) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1360); + if (this.type == 13 || this.type == 14 || this.type == 15) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1361); + if (this.type == 266) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1362); + if (this.type == 35) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1363); + if (this.type == 222) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1364); + if (this.type == 113) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1365); + if (this.type == 134) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1366); + if (this.type == (int) sbyte.MaxValue) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1367); + if (this.type == 125) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1368); + if (this.type == 126) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1369); + if (this.type == 262) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1370); + if (this.type == 245) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1371); + if (this.type == 50) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2489); + if (this.type == 370) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2589); + if (this.type == 439) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3357); + if (this.type == 491) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3359); + if (this.type == 395) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3358); + if (this.type == 398) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3595); + if (this.type == 551) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3866); + if (this.type == 564 || this.type == 565) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3867); + if (this.type == 576 || this.type == 577) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3868); + } + if (this.boss) + { + if (this.type == 4) + NPC.SetEventFlagCleared(ref NPC.downedBoss1, 13); + else if (this.type == 13 || this.type == 14 || this.type == 15) + NPC.SetEventFlagCleared(ref NPC.downedBoss2, 14); + else if (this.type == 266) + NPC.SetEventFlagCleared(ref NPC.downedBoss2, 14); + else if (this.type == 35) + NPC.SetEventFlagCleared(ref NPC.downedBoss3, 15); + if (this.type == (int) sbyte.MaxValue) + { + NPC.SetEventFlagCleared(ref NPC.downedMechBoss3, 18); + NPC.downedMechBossAny = true; + } + if (this.type == 134) + { + NPC.SetEventFlagCleared(ref NPC.downedMechBoss1, 16); + NPC.downedMechBossAny = true; + } + string typeName = this.TypeName; + int Stack = Main.rand.Next(5, 16); + int Type = 28; + if (this.type == 113) + Type = 188; + else if (this.type == 222) + Type = 1134; + else if (this.type > 113 && this.type < 222) + Type = 499; + else if (this.type == 245 || this.type == 262) + Type = 499; + else if (this.type == 370) + Type = 499; + else if (this.type == 395) + Type = 499; + else if (this.type == 439) + Type = 499; + else if (this.type == 398) + Type = 3544; + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + int num15 = Main.rand.Next(5) + 5; + for (int index = 0; index < num15; ++index) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + if (this.type == 125 || this.type == 126) + { + NPC.SetEventFlagCleared(ref NPC.downedMechBoss2, 17); + NPC.downedMechBossAny = true; + switch (Main.netMode) + { + case 0: + Main.NewText(Language.GetTextValue("Announcement.HasBeenDefeated_Plural", (object) Language.GetTextValue("Enemies.TheTwins")), (byte) 175, (byte) 75); + break; + case 2: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasBeenDefeated_Plural", (object) NetworkText.FromKey("Enemies.TheTwins")), new Color(175, 75, (int) byte.MaxValue)); + break; + } + } + else if (this.type == 398) + { + switch (Main.netMode) + { + case 0: + Main.NewText(Language.GetTextValue("Announcement.HasBeenDefeated_Single", (object) Language.GetTextValue("Enemies.MoonLord")), (byte) 175, (byte) 75); + break; + case 2: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasBeenDefeated_Single", (object) NetworkText.FromKey("Enemies.MoonLord")), new Color(175, 75, (int) byte.MaxValue)); + break; + } + } + else + { + switch (Main.netMode) + { + case 0: + Main.NewText(Language.GetTextValue("Announcement.HasBeenDefeated_Single", (object) typeName), (byte) 175, (byte) 75); + break; + case 2: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasBeenDefeated_Single", (object) this.GetTypeNetName()), new Color(175, 75, (int) byte.MaxValue)); + break; + } + } + if (this.type == 113 && Main.netMode != 1) + { + bool hardMode = Main.hardMode; + if (!flag1) + WorldGen.StartHardmode(); + if (NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3 && !hardMode) + { + switch (Main.netMode) + { + case 0: + Main.NewText(Lang.misc[32].Value, (byte) 50, B: (byte) 130); + break; + case 2: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[32].Key), new Color(50, (int) byte.MaxValue, 130)); + break; + } + } + NPC.SetEventFlagCleared(ref hardMode, 19); + } + if (Main.netMode == 2) + NetMessage.SendData(7); + } + if (!flag2 && NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3 && Main.hardMode) + { + switch (Main.netMode) + { + case 0: + Main.NewText(Lang.misc[32].Value, (byte) 50, B: (byte) 130); + break; + case 2: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[32].Key), new Color(50, (int) byte.MaxValue, 130)); + break; + } + } + this.NPCLoot_DropCommonLifeAndMana(closestPlayer); + this.NPCLoot_DropMoney(closestPlayer); + } + + public void NPCLoot() + { + if (Main.netMode == 1 || this.type >= 663) + return; + Player closestPlayer = Main.player[(int) Player.FindClosest(this.position, this.width, this.height)]; + if (true) + { + this.CountKillForAchievements(); + if (this.GetWereThereAnyInteractions()) + { + if (this.IsNPCValidForBestiaryKillCredit()) + Main.BestiaryTracker.Kills.RegisterKill(this); + this.CountKillForBannersAndDropThem(); + } + } + if (this.type == 23 && Main.hardMode || this.SpawnedFromStatue && NPCID.Sets.NoEarlymodeLootWhenSpawnedFromStatue[this.type] && !Main.hardMode || this.SpawnedFromStatue && (double) NPCID.Sets.StatueSpawnedDropRarity[this.type] != -1.0 && ((double) Main.rand.NextFloat() >= (double) NPCID.Sets.StatueSpawnedDropRarity[this.type] || !this.AnyInteractions())) + return; + int num = !NPC.downedMechBoss1 || !NPC.downedMechBoss2 ? 0 : (NPC.downedMechBoss3 ? 1 : 0); + this.DoDeathEvents_BeforeLoot(closestPlayer); + this.NPCLoot_DropItems(closestPlayer); + this.DoDeathEvents(closestPlayer); + if (num == 0 && NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3 && Main.hardMode) + { + switch (Main.netMode) + { + case 0: + Main.NewText(Lang.misc[32].Value, (byte) 50, B: (byte) 130); + break; + case 2: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[32].Key), new Color(50, (int) byte.MaxValue, 130)); + break; + } + } + this.NPCLoot_DropMoney(closestPlayer); + this.NPCLoot_DropHeals(closestPlayer); + } + + private bool IsNPCValidForBestiaryKillCredit() + { + switch (this.type) + { + case 13: + case 14: + case 15: + return this.boss; + default: + return true; + } + } + + private void DoDeathEvents_BeforeLoot(Player closestPlayer) + { + switch (this.type) + { + case 125: + case 126: + if (!NPC.AnyNPCs(this.type == 125 ? 126 : 125)) + break; + this.value = 0.0f; + this.boss = false; + break; + } + } + + private void NPCLoot_DropItems(Player closestPlayer) + { + DropAttemptInfo info = new DropAttemptInfo() + { + player = closestPlayer, + npc = this, + IsExpertMode = Main.expertMode, + IsMasterMode = Main.masterMode, + IsInSimulation = false, + rng = Main.rand + }; + Main.ItemDropSolver.TryDropping(info); + } + + public static void ResetBadgerHatTime() + { + NPC.EoCKilledToday = false; + NPC.WoFKilledToday = false; + } + + private void DoDeathEvents_DropBossPotionsAndHearts() + { + int Stack = Main.rand.Next(5, 16); + int Type = 28; + if (this.type == 113) + Type = 188; + else if (this.type == 222) + Type = 1134; + else if (this.type == 657) + Type = 499; + else if (this.type > 113 && this.type < 222) + Type = 499; + else if (this.type == 636) + Type = 499; + else if (this.type == 245 || this.type == 262) + Type = 499; + else if (this.type == 370) + Type = 499; + else if (this.type == 395) + Type = 499; + else if (this.type == 439) + Type = 499; + else if (this.type == 398) + Type = 3544; + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + int num = Main.rand.Next(5) + 5; + for (int index = 0; index < num; ++index) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + if (this.type == 4) + NPC.EoCKilledToday = true; + else if (this.type == 113) + NPC.WoFKilledToday = true; + if (!NPC.EoCKilledToday || !NPC.WoFKilledToday) + return; + NPC.ResetBadgerHatTime(); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 5004); + } + + private void DoDeathEvents_CelebrateBossDeath() + { + if (this.type == 125 || this.type == 126) + { + if (Main.netMode == 0) + { + Main.NewText(Language.GetTextValue("Announcement.HasBeenDefeated_Plural", (object) Language.GetTextValue("Enemies.TheTwins")), (byte) 175, (byte) 75); + } + else + { + if (Main.netMode != 2) + return; + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasBeenDefeated_Plural", (object) NetworkText.FromKey("Enemies.TheTwins")), new Color(175, 75, (int) byte.MaxValue)); + } + } + else if (this.type == 398) + { + if (Main.netMode == 0) + { + Main.NewText(Language.GetTextValue("Announcement.HasBeenDefeated_Single", (object) Language.GetTextValue("Enemies.MoonLord")), (byte) 175, (byte) 75); + } + else + { + if (Main.netMode != 2) + return; + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasBeenDefeated_Single", (object) NetworkText.FromKey("Enemies.MoonLord")), new Color(175, 75, (int) byte.MaxValue)); + } + } + else if (Main.netMode == 0) + { + Main.NewText(Language.GetTextValue("Announcement.HasBeenDefeated_Single", (object) this.TypeName), (byte) 175, (byte) 75); + } + else + { + if (Main.netMode != 2) + return; + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasBeenDefeated_Single", (object) this.GetTypeNetName()), new Color(175, 75, (int) byte.MaxValue)); + } + } + + private void CreateBrickBoxForWallOfFlesh() + { + int num1 = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int num2 = (int) ((double) this.position.Y + (double) (this.height / 2)) / 16; + int num3 = this.width / 2 / 16 + 1; + for (int index1 = num1 - num3; index1 <= num1 + num3; ++index1) + { + for (int index2 = num2 - num3; index2 <= num2 + num3; ++index2) + { + if ((index1 == num1 - num3 || index1 == num1 + num3 || index2 == num2 - num3 || index2 == num2 + num3) && !Main.tile[index1, index2].active()) + { + Main.tile[index1, index2].type = WorldGen.crimson ? (ushort) 347 : (ushort) 140; + Main.tile[index1, index2].active(true); + } + Main.tile[index1, index2].lava(false); + Main.tile[index1, index2].liquid = (byte) 0; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index1, index2, 1); + else + WorldGen.SquareTileFrame(index1, index2); + } + } + } + + private void DoDeathEvents_SummonDungeonSpirit(Player closestPlayer) + { + if (this.lifeMax <= 100 || this.type == 288 || (double) this.value <= 0.0 || !this.HasPlayerTarget || !Main.hardMode || !NPC.downedPlantBoss || !Main.player[this.target].ZoneDungeon) + return; + int range = 13; + if (Main.expertMode) + range = 9; + if (closestPlayer.RollLuck(range) != 0 || !Main.wallDungeon[(int) Main.tile[(int) this.Center.X / 16, (int) this.Center.Y / 16].wall]) + return; + NPC.NewNPC((int) this.Center.X, (int) this.Center.Y, 288); + } + + private void DoDeathEvents_AdvanceSlimeRain(Player closestPlayer) + { + if (!Main.slimeRain || !Main.slimeRainNPC[this.type] || NPC.AnyNPCs(50)) + return; + int num = 150; + if (NPC.downedSlimeKing) + num /= 2; + ++Main.slimeRainKillCount; + if (Main.slimeRainKillCount < num) + return; + NPC.SpawnOnPlayer(closestPlayer.whoAmI, 50); + Main.slimeRainKillCount = -num / 2; + } + + private void NPCLoot_DropHeals(Player closestPlayer) + { + this.NPCLoot_DropCommonLifeAndMana(closestPlayer); + switch (this.type) + { + case 13: + case 14: + case 15: + if (Main.rand.Next(4) != 0 || closestPlayer.statLife >= closestPlayer.statLifeMax2) + break; + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + break; + case 116: + case 117: + case 118: + case 119: + if (Main.expertMode && Main.rand.Next(5) != 0) + break; + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + break; + case 139: + if (Main.rand.Next(2) != 0) + break; + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + break; + case 267: + if (Main.rand.Next(2) != 0 || closestPlayer.statLife >= closestPlayer.statLifeMax2) + break; + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + break; + case 305: + case 306: + case 307: + case 308: + case 309: + case 310: + case 311: + case 312: + case 313: + case 314: + case 329: + case 330: + if (closestPlayer.RollLuck(4) != 0) + break; + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + break; + case 315: + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + break; + case 325: + case 327: + case 344: + case 345: + case 346: + int num1 = Main.rand.Next(6) + 6; + for (int index = 0; index < num1; ++index) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + break; + case 326: + if (closestPlayer.RollLuck(6) != 0) + break; + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + break; + case 338: + case 339: + case 340: + if (closestPlayer.RollLuck(5) != 0) + break; + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + break; + case 341: + int num2 = Main.rand.Next(5, 11); + for (int index = 0; index < num2; ++index) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + break; + case 342: + if (Main.rand.Next(3) == 0) + break; + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + break; + } + } + + private void DoDeathEvents(Player closestPlayer) + { + this.DoDeathEvents_AdvanceSlimeRain(closestPlayer); + this.DoDeathEvents_SummonDungeonSpirit(closestPlayer); + switch (this.type) + { + case 4: + NPC.SetEventFlagCleared(ref NPC.downedBoss1, 13); + break; + case 13: + case 14: + case 15: + case 266: + if (this.boss) + { + if (!NPC.downedBoss2 || Main.rand.Next(2) == 0) + WorldGen.spawnMeteor = true; + NPC.SetEventFlagCleared(ref NPC.downedBoss2, 14); + break; + } + break; + case 22: + if (Collision.LavaCollision(this.position, this.width, this.height)) + { + NPC.SpawnWOF(this.position); + break; + } + break; + case 35: + if (this.boss) + { + NPC.SetEventFlagCleared(ref NPC.downedBoss3, 15); + break; + } + break; + case 50: + if (Main.slimeRain) + { + Main.StopSlimeRain(); + AchievementsHelper.NotifyProgressionEvent(16); + } + NPC.SetEventFlagCleared(ref NPC.downedSlimeKing, 11); + if (Main.netMode == 2) + { + NetMessage.SendData(7); + break; + } + break; + case 109: + if (!NPC.downedClown) + { + NPC.downedClown = true; + if (Main.netMode == 2) + { + NetMessage.SendData(7); + break; + } + break; + } + break; + case 113: + if (Main.netMode != 1) + { + this.CreateBrickBoxForWallOfFlesh(); + bool hardMode = Main.hardMode; + WorldGen.StartHardmode(); + if (NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3 && !hardMode) + { + switch (Main.netMode) + { + case 0: + Main.NewText(Lang.misc[32].Value, (byte) 50, B: (byte) 130); + break; + case 2: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[32].Key), new Color(50, (int) byte.MaxValue, 130)); + break; + } + } + NPC.SetEventFlagCleared(ref hardMode, 19); + break; + } + break; + case 125: + case 126: + if (this.boss) + { + NPC.SetEventFlagCleared(ref NPC.downedMechBoss2, 17); + NPC.downedMechBossAny = true; + break; + } + break; + case (int) sbyte.MaxValue: + if (this.boss) + { + NPC.SetEventFlagCleared(ref NPC.downedMechBoss3, 18); + NPC.downedMechBossAny = true; + break; + } + break; + case 134: + if (this.boss) + { + NPC.SetEventFlagCleared(ref NPC.downedMechBoss1, 16); + NPC.downedMechBossAny = true; + break; + } + break; + case 216: + NPC.SpawnBoss((int) this.position.X, (int) this.position.Y, 662, this.target); + break; + case 222: + NPC.SetEventFlagCleared(ref NPC.downedQueenBee, 8); + if (Main.netMode == 2) + { + NetMessage.SendData(7); + break; + } + break; + case 245: + NPC.SetEventFlagCleared(ref NPC.downedGolemBoss, 6); + break; + case 262: + int num = NPC.downedPlantBoss ? 1 : 0; + NPC.SetEventFlagCleared(ref NPC.downedPlantBoss, 12); + if (num == 0) + { + switch (Main.netMode) + { + case 0: + Main.NewText(Lang.misc[33].Value, (byte) 50, B: (byte) 130); + break; + case 2: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[33].Key), new Color(50, (int) byte.MaxValue, 130)); + break; + } + } + else + break; + break; + case 325: + if (Main.pumpkinMoon) + { + NPC.SetEventFlagCleared(ref NPC.downedHalloweenTree, 4); + break; + } + break; + case 327: + if (Main.pumpkinMoon) + { + NPC.SetEventFlagCleared(ref NPC.downedHalloweenKing, 5); + break; + } + break; + case 344: + if (Main.snowMoon) + { + NPC.SetEventFlagCleared(ref NPC.downedChristmasTree, 21); + break; + } + break; + case 345: + if (Main.snowMoon) + { + NPC.SetEventFlagCleared(ref NPC.downedChristmasIceQueen, 20); + break; + } + break; + case 346: + if (Main.snowMoon) + { + NPC.SetEventFlagCleared(ref NPC.downedChristmasSantank, 22); + break; + } + break; + case 370: + NPC.SetEventFlagCleared(ref NPC.downedFishron, 7); + break; + case 398: + NPC.SetEventFlagCleared(ref NPC.downedMoonlord, 10); + NPC.LunarApocalypseIsUp = false; + break; + case 402: + case 405: + case 407: + case 409: + case 411: + if (NPC.ShieldStrengthTowerStardust > 0) + { + Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, 0.0f, 629, 0, 0.0f, Main.myPlayer, (float) NPC.FindFirstNPC(493)); + break; + } + break; + case 412: + case 413: + case 414: + case 415: + case 416: + case 417: + case 418: + case 419: + case 518: + if (NPC.ShieldStrengthTowerSolar > 0) + { + Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, 0.0f, 629, 0, 0.0f, Main.myPlayer, (float) NPC.FindFirstNPC(517)); + break; + } + break; + case 420: + case 421: + case 423: + case 424: + if (NPC.ShieldStrengthTowerNebula > 0) + { + Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, 0.0f, 629, 0, 0.0f, Main.myPlayer, (float) NPC.FindFirstNPC(507)); + break; + } + break; + case 422: + NPC.downedTowerVortex = true; + NPC.TowerActiveVortex = false; + WorldGen.UpdateLunarApocalypse(); + WorldGen.MessageLunarApocalypse(); + break; + case 425: + case 426: + case 427: + case 429: + if (NPC.ShieldStrengthTowerVortex > 0) + { + Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, 0.0f, 629, 0, 0.0f, Main.myPlayer, (float) NPC.FindFirstNPC(422)); + break; + } + break; + case 439: + NPC.SetEventFlagCleared(ref NPC.downedAncientCultist, 9); + WorldGen.TriggerLunarApocalypse(); + break; + case 493: + NPC.downedTowerStardust = true; + NPC.TowerActiveStardust = false; + WorldGen.UpdateLunarApocalypse(); + WorldGen.MessageLunarApocalypse(); + break; + case 507: + NPC.downedTowerNebula = true; + NPC.TowerActiveNebula = false; + WorldGen.UpdateLunarApocalypse(); + WorldGen.MessageLunarApocalypse(); + break; + case 517: + NPC.downedTowerSolar = true; + NPC.TowerActiveSolar = false; + WorldGen.UpdateLunarApocalypse(); + WorldGen.MessageLunarApocalypse(); + break; + case 552: + case 553: + case 554: + if (DD2Event.Ongoing) + { + DD2Event.AnnounceGoblinDeath(this); + if (DD2Event.ShouldDropCrystals()) + { + Item.NewItem(this.position, this.Size, 3822); + break; + } + break; + } + break; + case 555: + case 556: + case 557: + case 558: + case 559: + case 560: + case 561: + case 562: + case 563: + case 564: + case 565: + case 568: + case 569: + case 570: + case 571: + case 572: + case 573: + case 574: + case 575: + case 576: + case 577: + case 578: + if (DD2Event.ShouldDropCrystals()) + { + Item.NewItem(this.position, this.Size, 3822); + break; + } + break; + case 614: + int Damage = 175; + if (this.SpawnedFromStatue) + Damage = 0; + Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, 0.0f, 281, Damage, 0.0f, Main.myPlayer, -2f, (float) ((int) this.releaseOwner + 1)); + break; + case 636: + NPC.SetEventFlagCleared(ref NPC.downedEmpressOfLight, 23); + break; + case 657: + NPC.SetEventFlagCleared(ref NPC.downedQueenSlime, 24); + break; + case 661: + if (Main.netMode != 1 && this.GetWereThereAnyInteractions()) + { + int Type = 636; + if (!NPC.AnyNPCs(Type)) + { + Vector2 vector2 = this.Center + new Vector2(0.0f, -200f) + Main.rand.NextVector2Circular(50f, 50f); + NPC.SpawnBoss((int) vector2.X, (int) vector2.Y, Type, closestPlayer.whoAmI); + break; + } + break; + } + break; + } + if (!this.boss) + return; + this.DoDeathEvents_DropBossPotionsAndHearts(); + this.DoDeathEvents_CelebrateBossDeath(); + if (Main.netMode != 2) + return; + NetMessage.SendData(7); + } + + private void NPCLoot_DropCommonLifeAndMana(Player closestPlayer) + { + if (this.type != 16 && this.type != 81 && this.type != 121 && closestPlayer.RollLuck(6) == 0 && this.lifeMax > 1 && this.damage > 0) + { + if (Main.rand.Next(2) == 0 && closestPlayer.statMana < closestPlayer.statManaMax2) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 184); + else if (Main.rand.Next(2) == 0 && closestPlayer.statLife < closestPlayer.statLifeMax2) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 58); + } + if (this.type == 16 || this.type == 81 || this.type == 121 || closestPlayer.RollLuck(2) != 0 || this.lifeMax <= 1 || this.damage <= 0 || closestPlayer.statMana >= closestPlayer.statManaMax2) + return; + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 184); + } + + private void NPCLoot_DropMoney(Player closestPlayer) + { + float num1 = 0.0f; + float luck = closestPlayer.luck; + int num2 = 1; + if ((double) Main.rand.NextFloat() < (double) Math.Abs(luck)) + num2 = 2; + for (int index = 0; index < num2; ++index) + { + float num3 = this.value; + if (this.midas) + num3 *= (float) (1.0 + (double) Main.rand.Next(10, 51) * 0.00999999977648258); + float num4 = num3 * (float) (1.0 + (double) Main.rand.Next(-20, 76) * 0.00999999977648258); + if (Main.rand.Next(2) == 0) + num4 *= (float) (1.0 + (double) Main.rand.Next(5, 11) * 0.00999999977648258); + if (Main.rand.Next(4) == 0) + num4 *= (float) (1.0 + (double) Main.rand.Next(10, 21) * 0.00999999977648258); + if (Main.rand.Next(8) == 0) + num4 *= (float) (1.0 + (double) Main.rand.Next(15, 31) * 0.00999999977648258); + if (Main.rand.Next(16) == 0) + num4 *= (float) (1.0 + (double) Main.rand.Next(20, 41) * 0.00999999977648258); + if (Main.rand.Next(32) == 0) + num4 *= (float) (1.0 + (double) Main.rand.Next(25, 51) * 0.00999999977648258); + if (Main.rand.Next(64) == 0) + num4 *= (float) (1.0 + (double) Main.rand.Next(50, 101) * 0.00999999977648258); + if (Main.bloodMoon) + num4 *= (float) (1.0 + (double) Main.rand.Next(101) * 0.00999999977648258); + if (index == 0) + num1 = num4; + else if ((double) luck < 0.0) + { + if ((double) num4 < (double) num1) + num1 = num4; + } + else if ((double) num4 > (double) num1) + num1 = num4; + } + float num5 = num1 + (float) this.extraValue; + while ((int) num5 > 0) + { + if ((double) num5 > 1000000.0) + { + int num6 = (int) ((double) num5 / 1000000.0); + if (num6 > 50 && Main.rand.Next(5) == 0) + num6 /= Main.rand.Next(3) + 1; + if (Main.rand.Next(5) == 0) + num6 /= Main.rand.Next(3) + 1; + int Stack = num6; + while (Stack > 999) + { + Stack -= 999; + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 74, 999); + } + num5 -= (float) (1000000 * num6); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 74, Stack); + } + else if ((double) num5 > 10000.0) + { + int Stack = (int) ((double) num5 / 10000.0); + if (Stack > 50 && Main.rand.Next(5) == 0) + Stack /= Main.rand.Next(3) + 1; + if (Main.rand.Next(5) == 0) + Stack /= Main.rand.Next(3) + 1; + num5 -= (float) (10000 * Stack); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 73, Stack); + } + else if ((double) num5 > 100.0) + { + int Stack = (int) ((double) num5 / 100.0); + if (Stack > 50 && Main.rand.Next(5) == 0) + Stack /= Main.rand.Next(3) + 1; + if (Main.rand.Next(5) == 0) + Stack /= Main.rand.Next(3) + 1; + num5 -= (float) (100 * Stack); + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 72, Stack); + } + else + { + int Stack = (int) num5; + if (Stack > 50 && Main.rand.Next(5) == 0) + Stack /= Main.rand.Next(3) + 1; + if (Main.rand.Next(5) == 0) + Stack /= Main.rand.Next(4) + 1; + if (Stack < 1) + Stack = 1; + num5 -= (float) Stack; + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 71, Stack); + } + } + } + + public static int GetStackForSlimeItemDrop(int item) + { + int num = 1; + switch (item) + { + case 8: + num = Main.rand.Next(5, 11); + break; + case 166: + num = Main.rand.Next(2, 7); + break; + case 965: + num = Main.rand.Next(20, 46); + break; + default: + if (item >= 11 && item <= 14 || item >= 699 && item <= 702) + { + num = Main.rand.Next(3, 9); + if (Main.rand.Next(2) == 0) + { + num += 5; + break; + } + break; + } + switch (item) + { + case 71: + num = Main.rand.Next(50, 100); + break; + case 72: + num = Main.rand.Next(20, 100); + break; + case 73: + num = Main.rand.Next(1, 3); + break; + } + break; + } + return num; + } + + public bool ExcludedFromDeathTally() + { + if (this.netID >= 0) + return NPCID.Sets.PositiveNPCTypesExcludedFromDeathTally[this.netID]; + return this.netID == -5 || this.netID == -1; + } + + private void CountKillForBannersAndDropThem() + { + int index1 = Item.NPCtoBanner(this.BannerID()); + if (index1 <= 0 || this.ExcludedFromDeathTally()) + return; + ++NPC.killCount[index1]; + if (Main.netMode == 2) + NetMessage.SendData(83, number: index1); + int num = ItemID.Sets.KillsToBanner[Item.BannerToItem(index1)]; + if (NPC.killCount[index1] % num != 0 || index1 <= 0) + return; + int npc = Item.BannerToNPC(index1); + int index2 = this.lastInteraction; + if (!Main.player[index2].active || Main.player[index2].dead) + index2 = this.FindClosestPlayer(); + NetworkText text = NetworkText.FromKey("Game.EnemiesDefeatedAnnouncement", (object) NPC.killCount[index1], (object) NetworkText.FromKey(Lang.GetNPCName(npc).Key)); + if (index2 >= 0 && index2 < (int) byte.MaxValue) + text = NetworkText.FromKey("Game.EnemiesDefeatedByAnnouncement", (object) Main.player[index2].name, (object) NPC.killCount[index1], (object) NetworkText.FromKey(Lang.GetNPCName(npc).Key)); + switch (Main.netMode) + { + case 0: + Main.NewText(text.ToString(), (byte) 250, (byte) 250, (byte) 0); + break; + case 2: + ChatHelper.BroadcastChatMessage(text, new Color(250, 250, 0)); + break; + } + int Type = Item.BannerToItem(index1); + Vector2 position = this.position; + if (index2 >= 0 && index2 < (int) byte.MaxValue) + position = Main.player[index2].position; + Item.NewItem((int) position.X, (int) position.Y, this.width, this.height, Type); + } + + private bool GetWereThereAnyInteractions() => this.realLife < 0 ? this.AnyInteractions() : Main.npc[this.realLife].AnyInteractions(); + + private void CountKillForAchievements() + { + switch (this.type) + { + case 13: + case 14: + case 15: + if (!this.boss) + break; + AchievementsHelper.NotifyNPCKilled(this); + break; + case 125: + case 126: + if (NPC.AnyNPCs(this.type == 126 ? 125 : 126)) + break; + AchievementsHelper.NotifyNPCKilled(this); + AchievementsHelper.CheckMechaMayhem(this.type); + break; + case (int) sbyte.MaxValue: + case 134: + AchievementsHelper.CheckMechaMayhem(this.type); + AchievementsHelper.NotifyNPCKilled(this); + break; + default: + AchievementsHelper.NotifyNPCKilled(this); + break; + } + } + + private void NPCLoot_DropFood(Player closestPlayer) + { + int Type = 0; + int range = 0; + switch (this.type) + { + case 6: + case 173: + Type = 4015; + range = 100; + break; + case 34: + Type = 4018; + range = 100; + break; + case 39: + case 156: + Type = 4025; + range = 30; + break; + case 44: + Type = 4037; + range = 10; + break; + case 48: + Type = 4016; + range = 50; + break; + case 65: + case 67: + Type = 4035; + range = 50; + break; + case 69: + case 508: + case 509: + case 580: + case 581: + Type = 4012; + range = 15; + break; + case 120: + case 137: + case 138: + Type = 4011; + range = 150; + break; + case 122: + Type = 4017; + range = 75; + break; + case 150: + case 184: + Type = 4026; + range = 150; + break; + case 152: + case 177: + Type = 4023; + range = 15; + break; + case 154: + case 206: + Type = 4027; + range = 75; + break; + case 163: + case 164: + case 165: + case 238: + case 530: + case 531: + Type = 4020; + range = 30; + break; + case 170: + case 171: + case 180: + Type = 3532; + range = 15; + break; + case 224: + Type = 4021; + range = 50; + break; + case 289: + Type = 4018; + range = 50; + break; + case 290: + Type = 4013; + range = 21; + break; + case 291: + case 292: + case 293: + Type = 4013; + range = 7; + break; + case 469: + Type = 4037; + range = 100; + break; + case 480: + case 481: + Type = 4029; + range = 50; + break; + case 482: + case 483: + Type = 4036; + range = 50; + break; + case 494: + case 495: + case 496: + case 497: + case 498: + case 499: + case 500: + case 501: + case 502: + case 503: + case 504: + case 505: + case 506: + Type = 4030; + range = 75; + break; + case 542: + case 543: + case 544: + case 545: + case 546: + Type = 4028; + range = 30; + break; + } + if (this.SpawnedFromStatue || Type == 0 || range == 0 || closestPlayer.RollLuck(range) != 0) + return; + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type); + } + + public static void CatchNPC(int i, int who = -1) + { + if (!Main.npc[i].active) + return; + if (Main.netMode == 1) + { + Main.npc[i].active = false; + NetMessage.SendData(70, number: i, number2: ((float) who)); + } + else + { + if (Main.npc[i].catchItem <= (short) 0) + return; + if (Main.npc[i].SpawnedFromStatue) + { + Vector2 position = Main.npc[i].Center - new Vector2(20f); + Utils.PoofOfSmoke(position); + Main.npc[i].active = false; + NetMessage.SendData(23, number: i); + NetMessage.SendData(106, number: ((int) position.X), number2: position.Y); + } + else + { + new Item().SetDefaults((int) Main.npc[i].catchItem); + Item.NewItem((int) Main.player[who].Center.X, (int) Main.player[who].Center.Y, 0, 0, (int) Main.npc[i].catchItem, noGrabDelay: true); + Main.npc[i].active = false; + NetMessage.SendData(23, number: i); + } + } + } + + public void DropBossBags() + { + int itemType = -1; + if (this.type == 50) + itemType = 3318; + if (this.type == 4) + itemType = 3319; + if (this.type >= 13 && this.type <= 15) + itemType = 3320; + if (this.type == 266) + itemType = 3321; + if (this.type == 222) + itemType = 3322; + if (this.type == 35) + itemType = 3323; + if (this.type == 113) + itemType = 3324; + if (this.type == 134) + itemType = 3325; + if (this.type == 125 || this.type == 126) + itemType = 3326; + if (this.type == (int) sbyte.MaxValue) + itemType = 3327; + if (this.type == 262) + itemType = 3328; + if (this.type == 245) + itemType = 3329; + if (this.type == 370) + itemType = 3330; + if (this.type == 439) + itemType = 3331; + if (this.type == 398) + itemType = 3332; + if (this.type == 551) + itemType = 3860; + this.DropItemInstanced(this.position, this.Size, itemType); + } + + public void DropItemInstanced( + Vector2 Position, + Vector2 HitboxSize, + int itemType, + int itemStack = 1, + bool interactionRequired = true) + { + if (itemType <= 0) + return; + switch (Main.netMode) + { + case 0: + Item.NewItem((int) Position.X, (int) Position.Y, (int) HitboxSize.X, (int) HitboxSize.Y, itemType, itemStack); + break; + case 2: + int number = Item.NewItem((int) Position.X, (int) Position.Y, (int) HitboxSize.X, (int) HitboxSize.Y, itemType, itemStack, true); + Main.timeItemSlotCannotBeReusedFor[number] = 54000; + for (int remoteClient = 0; remoteClient < (int) byte.MaxValue; ++remoteClient) + { + if (Main.player[remoteClient].active && (this.playerInteraction[remoteClient] || !interactionRequired)) + NetMessage.SendData(90, remoteClient, number: number); + } + Main.item[number].active = false; + break; + } + this.value = 0.0f; + } + + public void PlayerInteraction(int player) + { + if (this.realLife < 0 ? this.playerInteraction[player] : Main.npc[this.realLife].playerInteraction[player]) + return; + if (this.type == 13 || this.type == 14 || this.type == 15) + { + for (int index = 0; index < 200; ++index) + { + if (index != this.whoAmI && Main.npc[index].active && (Main.npc[index].type == 13 || Main.npc[index].type == 14 || Main.npc[index].type == 15)) + Main.npc[index].ApplyInteraction(player); + } + } + if (this.type == 134 || this.type == 135 || this.type == 136) + { + for (int index = 0; index < 200; ++index) + { + if (index != this.whoAmI && Main.npc[index].active && (Main.npc[index].type == 134 || Main.npc[index].type == 135 || Main.npc[index].type == 136)) + Main.npc[index].ApplyInteraction(player); + } + } + if (this.type == 35 || this.type == 36) + { + for (int index = 0; index < 200; ++index) + { + if (index != this.whoAmI && Main.npc[index].active && (Main.npc[index].type == 35 || Main.npc[index].type == 36)) + Main.npc[index].ApplyInteraction(player); + } + } + if (this.type == 113 || this.type == 114) + { + for (int index = 0; index < 200; ++index) + { + if (index != this.whoAmI && Main.npc[index].active && (Main.npc[index].type == 113 || Main.npc[index].type == 114)) + Main.npc[index].ApplyInteraction(player); + } + } + if (this.type >= (int) sbyte.MaxValue && this.type <= 131) + { + for (int index = 0; index < 200; ++index) + { + if (index != this.whoAmI && Main.npc[index].active && Main.npc[index].type >= (int) sbyte.MaxValue && Main.npc[index].type <= 131) + Main.npc[index].ApplyInteraction(player); + } + } + if (this.type >= 245 && this.type <= 249) + { + for (int index = 0; index < 200; ++index) + { + if (index != this.whoAmI && Main.npc[index].active && Main.npc[index].type >= 245 && Main.npc[index].type <= 249) + Main.npc[index].ApplyInteraction(player); + } + } + if ((this.type == 396 || this.type == 397) && Main.npc[(int) this.ai[3]].active && Main.npc[(int) this.ai[3]].type == 398) + Main.npc[(int) this.ai[3]].ApplyInteraction(player); + if ((this.type == 393 || this.type == 394) && Main.npc[(int) this.ai[0]].active && Main.npc[(int) this.ai[0]].type == 395) + Main.npc[(int) this.ai[0]].ApplyInteraction(player); + if (this.type == 492 && Main.npc[(int) this.ai[0]].active && Main.npc[(int) this.ai[0]].type == 491) + Main.npc[(int) this.ai[0]].ApplyInteraction(player); + this.ApplyInteraction(player); + } + + public void ApplyInteraction(int player) + { + if (this.realLife >= 0) + Main.npc[this.realLife].playerInteraction[player] = true; + else + this.playerInteraction[player] = true; + if (player >= (int) byte.MaxValue) + return; + if (this.realLife >= 0) + Main.npc[this.realLife].lastInteraction = player; + else + this.lastInteraction = player; + } + + public static bool CanReleaseNPCs(int who) + { + float num1 = 0.7f; + if (Main.netMode != 1) + num1 += 0.05f; + int num2 = 0; + int num3 = 0; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active) + { + ++num3; + if ((int) Main.npc[index].releaseOwner == who) + ++num2; + } + } + int num4 = 0; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active) + ++num4; + } + int num5 = (int) (200.0 * (double) num1 / (double) num4); + return (double) num3 < 200.0 * (double) num1 && num2 < num5; + } + + public static void ReleaseNPC(int x, int y, int Type, int Style, int who) + { + if (Main.netMode == 1) + { + NetMessage.SendData(71, number: x, number2: ((float) y), number3: ((float) Type), number4: ((float) Style)); + } + else + { + if (Type < 0 || Type >= 663 || !Main.npcCatchable[Type] || !NPC.CanReleaseNPCs(who)) + return; + switch (Type) + { + case 148: + int Type1 = Type + Main.rand.Next(2); + int index1 = NPC.NewNPC(x, y, Type1); + Main.npc[index1].releaseOwner = (short) who; + break; + case 356: + int index2 = NPC.NewNPC(x, y, Type); + Main.npc[index2].ai[2] = (float) Style; + Main.npc[index2].releaseOwner = (short) who; + break; + case 583: + case 584: + case 585: + int index3 = NPC.NewNPC(x, y, Type); + Main.npc[index3].releaseOwner = (short) who; + Main.npc[index3].ai[2] = 2f; + Main.npc[index3].TargetClosest(); + Main.npc[index3].ai[3] = 0.0f; + Main.npc[index3].netUpdate = true; + break; + case 614: + int index4 = NPC.NewNPC(x, y, Type); + Main.npc[index4].releaseOwner = (short) who; + int num = Main.player[who].direction; + if (Style > 2) + { + Style -= 2; + Main.npc[index4].SpawnedFromStatue = true; + } + if (Style == 1) + num = 1; + if (Style == 2) + num = -1; + Main.npc[index4].direction = num; + Main.npc[index4].spriteDirection = num; + Main.npc[index4].netUpdate = true; + break; + default: + int index5 = NPC.NewNPC(x, y, Type); + Main.npc[index5].releaseOwner = (short) who; + break; + } + } + } + + public static void SlimeRainSpawns(int plr) + { + int checkScreenHeight = Main.LogicCheckScreenHeight; + int checkScreenWidth = Main.LogicCheckScreenWidth; + float num1 = 15f; + Player player = Main.player[plr]; + if ((double) player.position.Y > Main.worldSurface * 16.0 + (double) (checkScreenHeight / 2) || (double) player.nearbyActiveNPCs > (double) num1) + return; + int maxValue1 = 45 + (int) (450.0 * (double) (player.nearbyActiveNPCs / num1)); + if (Main.expertMode) + maxValue1 = (int) ((double) maxValue1 * 0.85); + if (Main.rand.Next(maxValue1) != 0) + return; + int minValue1 = (int) ((double) player.Center.X - (double) checkScreenWidth); + int maxValue2 = minValue1 + checkScreenWidth * 2; + int minValue2 = (int) ((double) player.Center.Y - (double) checkScreenHeight * 1.5); + int maxValue3 = (int) ((double) player.Center.Y - (double) checkScreenHeight * 0.75); + int num2 = Main.rand.Next(minValue1, maxValue2); + int num3 = Main.rand.Next(minValue2, maxValue3); + int index1 = num2 / 16; + int index2 = num3 / 16; + if (index1 < 10 || index1 > Main.maxTilesX + 10 || (double) index2 < Main.worldSurface * 0.3 || (double) index2 > Main.worldSurface || Collision.SolidTiles(index1 - 3, index1 + 3, index2 - 5, index2 + 2) || Main.wallHouse[(int) Main.tile[index1, index2].wall]) + return; + int index3 = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 1); + if (Main.rand.Next(200) == 0) + Main.npc[index3].SetDefaults(-4); + else if (Main.expertMode) + { + if (Main.rand.Next(7) == 0) + { + Main.npc[index3].SetDefaults(-7); + } + else + { + if (Main.rand.Next(3) != 0) + return; + Main.npc[index3].SetDefaults(-3); + } + } + else if (Main.rand.Next(10) == 0) + { + Main.npc[index3].SetDefaults(-7); + } + else + { + if (Main.rand.Next(5) >= 2) + return; + Main.npc[index3].SetDefaults(-3); + } + } + + public static bool Spawning_SandstoneCheck(int x, int y) + { + if (!WorldGen.InWorld(x, y, 10)) + return false; + int num = 0; + for (int index1 = 0; index1 < 8; ++index1) + { + Tile tile1 = Main.tile[x, y + index1]; + if (tile1.active() && TileID.Sets.Conversion.Sand[(int) tile1.type]) + { + ++num; + for (int index2 = 1; index2 <= 4; ++index2) + { + Tile tile2 = Main.tile[x + index2, y + index1]; + if (tile2.active() && TileID.Sets.Conversion.Sand[(int) tile2.type]) + ++num; + else + break; + } + for (int index3 = 1; index3 <= 4; ++index3) + { + Tile tile3 = Main.tile[x - index3, y + index1]; + if (tile3.active() && TileID.Sets.Conversion.Sand[(int) tile3.type]) + ++num; + else + break; + } + } + else + break; + } + return num >= 40; + } + + public static bool Spawning_FlyingAntlionCheck(int x, int y) + { + if (!WorldGen.InWorld(x, y, 10)) + return false; + for (int index = 0; index < 50 && y - index >= 10; ++index) + { + Tile tile = Main.tile[x, y - index]; + if (!WallID.Sets.Conversion.HardenedSand[(int) tile.wall] && !WallID.Sets.Conversion.Sandstone[(int) tile.wall]) + return false; + } + return true; + } + + private static int RollDragonflyType(int tileType = 2) => tileType == 53 ? (int) Main.rand.NextFromList((short) 595, (short) 598, (short) 600) : (int) Main.rand.NextFromList((short) 596, (short) 597, (short) 599); + + public static void SpawnNPC() + { + if (NPC.noSpawnCycle) + { + NPC.noSpawnCycle = false; + } + else + { + bool windyForButterflies = NPC.TooWindyForButterflies; + bool flag1 = (double) Main.windSpeedTarget < -0.2 || (double) Main.windSpeedTarget > 0.2; + NPC.RevengeManager.CheckRespawns(); + bool flag2 = false; + int index1 = 0; + int index2 = 0; + int num1 = 0; + int num2 = 0; + for (int index3 = 0; index3 < (int) byte.MaxValue; ++index3) + { + if (Main.player[index3].active) + ++num2; + } + float num3 = 0.0f; + for (int index4 = 0; index4 < 200; ++index4) + { + if (Main.npc[index4].active) + { + switch (Main.npc[index4].type) + { + case 315: + case 325: + case 327: + case 328: + case 344: + case 345: + case 346: + num3 += Main.npc[index4].npcSlots; + continue; + default: + continue; + } + } + } + float num4 = (float) (int) ((double) NPC.defaultMaxSpawns * (2.0 + 0.300000011920929 * (double) num2)); + for (int index5 = 0; index5 < (int) byte.MaxValue; ++index5) + { + if (Main.player[index5].active && !Main.player[index5].dead) + { + bool flag3 = false; + if (!Main.player[index5].isNearNPC(398, (float) NPC.MoonLordFightingDistance)) + { + if (Main.slimeRain) + NPC.SlimeRainSpawns(index5); + bool flag4 = false; + bool flag5 = false; + bool flag6 = false; + bool flag7 = false; + bool flag8 = false; + bool flag9 = false; + bool flag10 = false; + bool flag11 = false; + bool flag12 = false; + bool flag13 = false; + bool flag14 = NPC.downedPlantBoss && Main.hardMode; + bool itAhappyWindyDay = Main.IsItAHappyWindyDay; + if (Main.player[index5].active && Main.invasionType > 0 && Main.invasionDelay == 0 && Main.invasionSize > 0 && (double) Main.player[index5].position.Y < Main.worldSurface * 16.0 + (double) NPC.sHeight) + { + int num5 = 3000; + if ((double) Main.player[index5].position.X > Main.invasionX * 16.0 - (double) num5 && (double) Main.player[index5].position.X < Main.invasionX * 16.0 + (double) num5) + flag6 = true; + else if (Main.invasionX >= (double) (Main.maxTilesX / 2 - 5) && Main.invasionX <= (double) (Main.maxTilesX / 2 + 5)) + { + for (int index6 = 0; index6 < 200; ++index6) + { + if (Main.npc[index6].townNPC && (double) Math.Abs(Main.player[index5].position.X - Main.npc[index6].Center.X) < (double) num5) + { + if (Main.rand.Next(3) != 0) + { + flag6 = true; + break; + } + break; + } + } + } + } + if (Main.player[index5].ZoneTowerSolar || Main.player[index5].ZoneTowerNebula || Main.player[index5].ZoneTowerVortex || Main.player[index5].ZoneTowerStardust) + flag6 = true; + int index7 = (int) ((double) Main.player[index5].position.X + (double) (Main.player[index5].width / 2)) / 16; + int index8 = (int) ((double) Main.player[index5].position.Y + (double) (Main.player[index5].height / 2)) / 16; + if (Main.wallHouse[(int) Main.tile[index7, index8].wall]) + flag5 = true; + if (Main.tile[index7, index8].wall == (ushort) 87) + flag4 = true; + bool flag15 = false; + NPC.spawnRate = NPC.defaultSpawnRate; + NPC.maxSpawns = NPC.defaultMaxSpawns; + if (Main.hardMode) + { + NPC.spawnRate = (int) ((double) NPC.defaultSpawnRate * 0.9); + NPC.maxSpawns = NPC.defaultMaxSpawns + 1; + } + if ((double) Main.player[index5].position.Y > (double) (Main.UnderworldLayer * 16)) + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 2.0); + else if ((double) Main.player[index5].position.Y > Main.rockLayer * 16.0 + (double) NPC.sHeight) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.4); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 1.89999997615814); + } + else if ((double) Main.player[index5].position.Y > Main.worldSurface * 16.0 + (double) NPC.sHeight) + { + if (Main.hardMode) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.45); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 1.79999995231628); + } + else + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.5); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 1.70000004768372); + } + } + else if (!Main.dayTime) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.6); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 1.29999995231628); + if (Main.bloodMoon) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.3); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 1.79999995231628); + } + if ((Main.pumpkinMoon || Main.snowMoon) && (double) Main.player[index5].position.Y < Main.worldSurface * 16.0) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.2); + NPC.maxSpawns *= 2; + } + } + else if (Main.dayTime && Main.eclipse) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.2); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 1.89999997615814); + } + if (Main.player[index5].ZoneSnow && (double) Main.player[index5].position.Y / 16.0 < Main.worldSurface) + { + NPC.maxSpawns = (int) ((double) NPC.maxSpawns + (double) NPC.maxSpawns * (double) Main.cloudAlpha); + NPC.spawnRate = (int) ((double) NPC.spawnRate * (1.0 - (double) Main.cloudAlpha + 1.0) / 2.0); + } + if (Main.drunkWorld && Main.tile[index7, index8].wall == (ushort) 86) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.3); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 1.79999995231628); + } + if (Main.player[index5].ZoneDungeon) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.3); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 1.79999995231628); + } + else if (Main.player[index5].ZoneSandstorm) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * (Main.hardMode ? 0.400000005960464 : 0.899999976158142)); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * (Main.hardMode ? 1.5 : 1.20000004768372)); + } + else if (Main.player[index5].ZoneUndergroundDesert) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.200000002980232); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 3.0); + } + else if (Main.player[index5].ZoneJungle) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.4); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 1.5); + } + else if (Main.player[index5].ZoneCorrupt || Main.player[index5].ZoneCrimson) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.65); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 1.29999995231628); + } + else if (Main.player[index5].ZoneMeteor) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.4); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 1.10000002384186); + } + if (Main.player[index5].ZoneHallow && (double) Main.player[index5].position.Y > Main.rockLayer * 16.0 + (double) NPC.sHeight) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.65); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 1.29999995231628); + } + if (Main.wofNPCIndex >= 0 && (double) Main.player[index5].position.Y > (double) (Main.UnderworldLayer * 16)) + { + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.300000011920929); + NPC.spawnRate *= 3; + } + if ((double) Main.player[index5].nearbyActiveNPCs < (double) NPC.maxSpawns * 0.2) + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.600000023841858); + else if ((double) Main.player[index5].nearbyActiveNPCs < (double) NPC.maxSpawns * 0.4) + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.699999988079071); + else if ((double) Main.player[index5].nearbyActiveNPCs < (double) NPC.maxSpawns * 0.6) + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.800000011920929); + else if ((double) Main.player[index5].nearbyActiveNPCs < (double) NPC.maxSpawns * 0.8) + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.899999976158142); + if ((double) Main.player[index5].position.Y / 16.0 > (Main.worldSurface + Main.rockLayer) / 2.0 || Main.player[index5].ZoneCorrupt || Main.player[index5].ZoneCrimson) + { + if ((double) Main.player[index5].nearbyActiveNPCs < (double) NPC.maxSpawns * 0.2) + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.699999988079071); + else if ((double) Main.player[index5].nearbyActiveNPCs < (double) NPC.maxSpawns * 0.4) + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.899999976158142); + } + if (Main.player[index5].invis) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 1.20000004768372); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.800000011920929); + } + if (Main.player[index5].calmed) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 1.29999995231628); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.699999988079071); + } + if (Main.player[index5].sunflower) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 1.20000004768372); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.800000011920929); + } + if (Main.player[index5].enemySpawns) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.5); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 2.0); + } + if (Main.player[index5].ZoneWaterCandle || Main.player[index5].inventory[Main.player[index5].selectedItem].type == 148) + { + if (!Main.player[index5].ZonePeaceCandle && Main.player[index5].inventory[Main.player[index5].selectedItem].type != 3117) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.75); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 1.5); + } + } + else if (Main.player[index5].ZonePeaceCandle || Main.player[index5].inventory[Main.player[index5].selectedItem].type == 3117) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 1.3); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.699999988079071); + } + if (Main.player[index5].ZoneWaterCandle && (double) Main.player[index5].position.Y / 16.0 < Main.worldSurface * 0.349999994039536) + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.5); + if (Main.player[index5].isNearFairy()) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 1.20000004768372); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.800000011920929); + } + if ((double) NPC.spawnRate < (double) NPC.defaultSpawnRate * 0.1) + NPC.spawnRate = (int) ((double) NPC.defaultSpawnRate * 0.1); + if (NPC.maxSpawns > NPC.defaultMaxSpawns * 3) + NPC.maxSpawns = NPC.defaultMaxSpawns * 3; + if (Main.getGoodWorld) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 0.800000011920929); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 1.20000004768372); + } + if (Main.GameModeInfo.IsJourneyMode) + { + CreativePowers.SpawnRateSliderPerPlayerPower power = CreativePowerManager.Instance.GetPower(); + if (power != null && power.GetIsUnlocked()) + { + if (!power.GetShouldDisableSpawnsFor(index5)) + { + float num6; + if (power.GetRemappedSliderValueFor(index5, out num6)) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate / (double) num6); + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * (double) num6); + } + } + else + continue; + } + } + if ((Main.pumpkinMoon || Main.snowMoon) && (double) Main.player[index5].position.Y < Main.worldSurface * 16.0) + { + NPC.maxSpawns = (int) ((double) NPC.defaultMaxSpawns * (2.0 + 0.3 * (double) num2)); + NPC.spawnRate = 20; + } + if (DD2Event.Ongoing && Main.player[index5].ZoneOldOneArmy) + { + NPC.maxSpawns = NPC.defaultMaxSpawns; + NPC.spawnRate = NPC.defaultSpawnRate; + } + if (flag6) + { + NPC.maxSpawns = (int) ((double) NPC.defaultMaxSpawns * (2.0 + 0.3 * (double) num2)); + NPC.spawnRate = 20; + } + if (Main.player[index5].ZoneDungeon && !NPC.downedBoss3) + NPC.spawnRate = 10; + if (!flag6 && (!Main.bloodMoon && !Main.pumpkinMoon && !Main.snowMoon || Main.dayTime) && (!Main.eclipse || !Main.dayTime) && !Main.player[index5].ZoneDungeon && !Main.player[index5].ZoneCorrupt && !Main.player[index5].ZoneCrimson && !Main.player[index5].ZoneMeteor && !Main.player[index5].ZoneOldOneArmy) + { + if ((double) Main.player[index5].Center.Y / 16.0 > (double) Main.UnderworldLayer) + { + if ((double) Main.player[index5].townNPCs == 1.0) + { + if (Main.rand.Next(2) == 0) + flag5 = true; + if (Main.rand.Next(10) == 0) + { + flag12 = true; + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.5); + } + else + NPC.spawnRate = (int) ((double) NPC.spawnRate * 1.25); + } + else if ((double) Main.player[index5].townNPCs == 2.0) + { + if (Main.rand.Next(4) != 0) + flag5 = true; + if (Main.rand.Next(5) == 0) + { + flag12 = true; + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.5); + } + else + NPC.spawnRate = (int) ((double) NPC.spawnRate * 1.5); + } + else if ((double) Main.player[index5].townNPCs >= 3.0) + { + if (Main.rand.Next(10) != 0) + flag5 = true; + if (Main.rand.Next(3) == 0) + { + flag12 = true; + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.5); + } + else + NPC.spawnRate = (int) ((double) NPC.spawnRate * 2.0); + } + } + else if ((double) Main.player[index5].townNPCs == 1.0) + { + flag5 = true; + if (Main.player[index5].ZoneGraveyard) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 1.66); + if (Main.rand.Next(9) == 1) + { + flag12 = true; + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.6); + } + } + else if (Main.rand.Next(3) == 1) + { + flag12 = true; + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.6); + } + else + NPC.spawnRate = (int) ((double) NPC.spawnRate * 2.0); + } + else if ((double) Main.player[index5].townNPCs == 2.0) + { + flag5 = true; + if (Main.player[index5].ZoneGraveyard) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 2.33); + if (Main.rand.Next(6) == 1) + { + flag12 = true; + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.6); + } + } + else if (Main.rand.Next(3) != 0) + { + flag12 = true; + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.6); + } + else + NPC.spawnRate = (int) ((double) NPC.spawnRate * 3.0); + } + else if ((double) Main.player[index5].townNPCs >= 3.0) + { + flag5 = true; + if (Main.player[index5].ZoneGraveyard) + { + NPC.spawnRate = (int) ((double) NPC.spawnRate * 3.0); + if (Main.rand.Next(3) == 1) + { + flag12 = true; + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.6); + } + } + else + { + if (!Main.expertMode || Main.rand.Next(30) != 0) + flag12 = true; + NPC.maxSpawns = (int) ((double) NPC.maxSpawns * 0.6); + } + } + } + bool flag16 = false; + if (Main.player[index5].active && !Main.player[index5].dead && (double) Main.player[index5].nearbyActiveNPCs < (double) NPC.maxSpawns && Main.rand.Next(NPC.spawnRate) == 0) + { + bool flag17 = Main.player[index5].ZoneTowerNebula || Main.player[index5].ZoneTowerSolar || Main.player[index5].ZoneTowerStardust || Main.player[index5].ZoneTowerVortex; + NPC.spawnRangeX = (int) ((double) (NPC.sWidth / 16) * 0.7); + NPC.spawnRangeY = (int) ((double) (NPC.sHeight / 16) * 0.7); + NPC.safeRangeX = (int) ((double) (NPC.sWidth / 16) * 0.52); + NPC.safeRangeY = (int) ((double) (NPC.sHeight / 16) * 0.52); + if (Main.player[index5].inventory[Main.player[index5].selectedItem].type == 1254 || Main.player[index5].inventory[Main.player[index5].selectedItem].type == 1299 || Main.player[index5].scope) + { + float num7 = 1.5f; + if (Main.player[index5].inventory[Main.player[index5].selectedItem].type == 1254 && Main.player[index5].scope) + num7 = 1.25f; + else if (Main.player[index5].inventory[Main.player[index5].selectedItem].type == 1254) + num7 = 1.5f; + else if (Main.player[index5].inventory[Main.player[index5].selectedItem].type == 1299) + num7 = 1.5f; + else if (Main.player[index5].scope) + num7 = 2f; + NPC.spawnRangeX += (int) ((double) (NPC.sWidth / 16) * 0.5 / (double) num7); + NPC.spawnRangeY += (int) ((double) (NPC.sHeight / 16) * 0.5 / (double) num7); + NPC.safeRangeX += (int) ((double) (NPC.sWidth / 16) * 0.5 / (double) num7); + NPC.safeRangeY += (int) ((double) (NPC.sHeight / 16) * 0.5 / (double) num7); + } + int minValue1 = (int) ((double) Main.player[index5].position.X / 16.0) - NPC.spawnRangeX; + int maxValue1 = (int) ((double) Main.player[index5].position.X / 16.0) + NPC.spawnRangeX; + int minValue2 = (int) ((double) Main.player[index5].position.Y / 16.0) - NPC.spawnRangeY; + int maxValue2 = (int) ((double) Main.player[index5].position.Y / 16.0) + NPC.spawnRangeY; + int num8 = (int) ((double) Main.player[index5].position.X / 16.0) - NPC.safeRangeX; + int num9 = (int) ((double) Main.player[index5].position.X / 16.0) + NPC.safeRangeX; + int num10 = (int) ((double) Main.player[index5].position.Y / 16.0) - NPC.safeRangeY; + int num11 = (int) ((double) Main.player[index5].position.Y / 16.0) + NPC.safeRangeY; + if (minValue1 < 0) + minValue1 = 0; + if (maxValue1 > Main.maxTilesX) + maxValue1 = Main.maxTilesX; + if (minValue2 < 0) + minValue2 = 0; + if (maxValue2 > Main.maxTilesY) + maxValue2 = Main.maxTilesY; + for (int index9 = 0; index9 < 50; ++index9) + { + int index10 = Main.rand.Next(minValue1, maxValue1); + int index11 = Main.rand.Next(minValue2, maxValue2); + if (!Main.tile[index10, index11].nactive() || !Main.tileSolid[(int) Main.tile[index10, index11].type]) + { + if (flag17 || !Main.wallHouse[(int) Main.tile[index10, index11].wall]) + { + if (!flag6 && (double) index11 < Main.worldSurface * 0.349999994039536 && !flag12 && ((double) index10 < (double) Main.maxTilesX * 0.45 || (double) index10 > (double) Main.maxTilesX * 0.55 || Main.hardMode)) + { + num1 = (int) Main.tile[index10, index11].type; + index1 = index10; + index2 = index11; + flag15 = true; + flag3 = true; + } + else if (!flag6 && (double) index11 < Main.worldSurface * 0.449999988079071 && !flag12 && Main.hardMode && Main.rand.Next(10) == 0) + { + num1 = (int) Main.tile[index10, index11].type; + index1 = index10; + index2 = index11; + flag15 = true; + flag3 = true; + } + else + { + for (int index12 = index11; index12 < Main.maxTilesY && index12 < maxValue2; ++index12) + { + if (Main.tile[index10, index12].nactive() && Main.tileSolid[(int) Main.tile[index10, index12].type]) + { + if (index10 < num8 || index10 > num9 || index12 < num10 || index12 > num11) + { + num1 = (int) Main.tile[index10, index12].type; + index1 = index10; + index2 = index12; + flag15 = true; + break; + } + break; + } + } + } + if (!flag3 && Main.player[index5].afkCounter >= NPC.AFKTimeNeededForNoWorms) + flag5 = true; + if (flag15) + { + int num12 = index1 - NPC.spawnSpaceX / 2; + int num13 = index1 + NPC.spawnSpaceX / 2; + int num14 = index2 - NPC.spawnSpaceY; + int num15 = index2; + if (num12 < 0) + flag15 = false; + if (num13 > Main.maxTilesX) + flag15 = false; + if (num14 < 0) + flag15 = false; + if (num15 > Main.maxTilesY) + flag15 = false; + if (flag15) + { + for (int index13 = num12; index13 < num13; ++index13) + { + for (int index14 = num14; index14 < num15; ++index14) + { + if (Main.tile[index13, index14].nactive() && Main.tileSolid[(int) Main.tile[index13, index14].type]) + { + flag15 = false; + break; + } + if (Main.tile[index13, index14].lava()) + { + flag15 = false; + break; + } + } + } + } + if (index1 >= num8 && index1 <= num9) + flag16 = true; + } + } + else + continue; + } + if (flag15 || flag15) + break; + } + } + if (flag15) + { + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle(index1 * 16, index2 * 16, 16, 16); + for (int index15 = 0; index15 < (int) byte.MaxValue; ++index15) + { + if (Main.player[index15].active) + { + Microsoft.Xna.Framework.Rectangle rectangle2 = new Microsoft.Xna.Framework.Rectangle((int) ((double) Main.player[index15].position.X + (double) (Main.player[index15].width / 2) - (double) (NPC.sWidth / 2) - (double) NPC.safeRangeX), (int) ((double) Main.player[index15].position.Y + (double) (Main.player[index15].height / 2) - (double) (NPC.sHeight / 2) - (double) NPC.safeRangeY), NPC.sWidth + NPC.safeRangeX * 2, NPC.sHeight + NPC.safeRangeY * 2); + if (rectangle1.Intersects(rectangle2)) + flag15 = false; + } + } + } + if (flag15) + { + if (Main.player[index5].ZoneDungeon && (!Main.tileDungeon[(int) Main.tile[index1, index2].type] || Main.tile[index1, index2 - 1].wall == (ushort) 0)) + flag15 = false; + if (Main.tile[index1, index2 - 1].liquid > (byte) 0 && Main.tile[index1, index2 - 2].liquid > (byte) 0 && !Main.tile[index1, index2 - 1].lava()) + { + if (Main.tile[index1, index2 - 1].honey()) + flag8 = true; + else + flag7 = true; + } + int index16 = (int) Main.player[index5].Center.X / 16; + int index17 = (int) ((double) Main.player[index5].Bottom.Y + 8.0) / 16; + if (Main.tile[index1, index2].type == (ushort) 367) + flag10 = true; + else if (Main.tile[index1, index2].type == (ushort) 368) + flag9 = true; + else if (Main.tile[index16, index17].type == (ushort) 367) + flag10 = true; + else if (Main.tile[index16, index17].type == (ushort) 368) + { + flag9 = true; + } + else + { + int num16 = Main.rand.Next(20, 31); + int num17 = Main.rand.Next(1, 4); + if (index1 - num16 < 0) + num16 = index1; + if (index2 - num16 < 0) + num16 = index2; + if (index1 + num16 >= Main.maxTilesX) + num16 = Main.maxTilesX - index1 - 1; + if (index2 + num16 >= Main.maxTilesY) + num16 = Main.maxTilesY - index2 - 1; + for (int index18 = index1 - num16; index18 <= index1 + num16; index18 += num17) + { + int num18 = Main.rand.Next(1, 4); + for (int index19 = index2 - num16; index19 <= index2 + num16; index19 += num18) + { + if (Main.tile[index18, index19].type == (ushort) 367) + flag10 = true; + if (Main.tile[index18, index19].type == (ushort) 368) + flag9 = true; + } + } + int num19 = Main.rand.Next(30, 61); + int num20 = Main.rand.Next(3, 7); + if (index16 - num19 < 0) + num19 = index16; + if (index17 - num19 < 0) + num19 = index17; + if (index16 + num19 >= Main.maxTilesX) + num19 = Main.maxTilesX - index16 - 2; + if (index17 + num19 >= Main.maxTilesY) + num19 = Main.maxTilesY - index17 - 2; + for (int index20 = index16 - num19; index20 <= index16 + num19; index20 += num20) + { + int num21 = Main.rand.Next(3, 7); + for (int index21 = index17 - num19; index21 <= index17 + num19; index21 += num21) + { + if (Main.tile[index20, index21].type == (ushort) 367) + flag10 = true; + if (Main.tile[index20, index21].type == (ushort) 368) + flag9 = true; + } + } + } + if (flag8) + flag15 = false; + if ((num1 == 477 || num1 == 492) && !Main.bloodMoon && !Main.eclipse && Main.invasionType <= 0 && !Main.pumpkinMoon && !Main.snowMoon && !Main.slimeRain && Main.rand.Next(100) < 10) + flag15 = false; + } + if (flag15) + { + if ((double) index2 > Main.rockLayer && index2 < Main.UnderworldLayer && !Main.player[index5].ZoneDungeon && !flag6) + { + if (Main.rand.Next(3) == 0) + { + int num22 = Main.rand.Next(5, 15); + if (index1 - num22 >= 0 && index1 + num22 < Main.maxTilesX) + { + for (int index22 = index1 - num22; index22 < index1 + num22; ++index22) + { + for (int index23 = index2 - num22; index23 < index2 + num22; ++index23) + { + if (Main.tile[index22, index23].wall == (ushort) 62) + flag11 = true; + } + } + } + } + else + { + int index24 = (int) Main.player[index5].position.X / 16; + int index25 = (int) Main.player[index5].position.Y / 16; + if (Main.tile[index24, index25].wall == (ushort) 62) + flag11 = true; + } + } + if ((double) index2 < Main.rockLayer && index2 > 200 && !Main.player[index5].ZoneDungeon && !flag6) + { + if (Main.rand.Next(3) == 0) + { + int num23 = Main.rand.Next(5, 15); + if (index1 - num23 >= 0 && index1 + num23 < Main.maxTilesX) + { + for (int index26 = index1 - num23; index26 < index1 + num23; ++index26) + { + for (int index27 = index2 - num23; index27 < index2 + num23; ++index27) + { + if (WallID.Sets.Conversion.Sandstone[(int) Main.tile[index26, index27].wall] || WallID.Sets.Conversion.HardenedSand[(int) Main.tile[index26, index27].wall]) + flag13 = true; + } + } + } + } + else + { + int index28 = (int) Main.player[index5].position.X / 16; + int index29 = (int) Main.player[index5].position.Y / 16; + if (WallID.Sets.Conversion.Sandstone[(int) Main.tile[index28, index29].wall] || WallID.Sets.Conversion.HardenedSand[(int) Main.tile[index28, index29].wall]) + flag13 = true; + } + } + flag2 = false; + int type = (int) Main.tile[index1, index2].type; + int num24 = (int) Main.tile[index1, index2 - 1].wall; + if (Main.tile[index1, index2 - 2].wall == (ushort) 244 || Main.tile[index1, index2].wall == (ushort) 244) + num24 = 244; + bool flag18 = (double) new Point(index7 - index1, index8 - index2).X * (double) Main.windSpeedTarget > 0.0; + int tileType = NPC.SpawnNPC_TryFindingProperGroundTileType(type, index1, index2); + int newNPC = 200; + if (Main.player[index5].ZoneTowerNebula) + { + bool flag19 = true; + int Type = 0; + while (flag19) + { + Type = Utils.SelectRandom(Main.rand, 424, 424, 424, 423, 423, 423, 421, 421, 421, 421, 421, 420); + flag19 = false; + if (Type == 424 && NPC.CountNPCS(Type) >= 2) + flag19 = true; + if (Type == 423 && NPC.CountNPCS(Type) >= 3) + flag19 = true; + if (Type == 420 && NPC.CountNPCS(Type) >= 2) + flag19 = true; + } + if (Type != 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, Type, 1); + } + else if (Main.player[index5].ZoneTowerVortex) + { + bool flag20 = true; + int Type = 0; + while (flag20) + { + Type = Utils.SelectRandom(Main.rand, 429, 429, 429, 429, 427, 427, 425, 425, 426); + flag20 = false; + if (Type == 425 && NPC.CountNPCS(Type) >= 3) + flag20 = true; + if (Type == 426 && NPC.CountNPCS(Type) >= 3) + flag20 = true; + if (Type == 429 && NPC.CountNPCS(Type) >= 4) + flag20 = true; + } + if (Type != 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, Type, 1); + } + else if (Main.player[index5].ZoneTowerStardust) + { + int Type = Utils.SelectRandom(Main.rand, 411, 411, 411, 409, 409, 407, 402, 405); + if (Type != 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, Type, 1); + } + else if (Main.player[index5].ZoneTowerSolar) + { + bool flag21 = true; + int Type = 0; + while (flag21) + { + Type = Utils.SelectRandom(Main.rand, 518, 419, 418, 412, 417, 416, 415); + flag21 = false; + if (Type == 415 && NPC.CountNPCS(Type) >= 2) + flag21 = true; + if (Type == 416 && NPC.CountNPCS(Type) >= 1) + flag21 = true; + if (Type == 518 && NPC.CountNPCS(Type) >= 2) + flag21 = true; + if (Type == 412 && NPC.CountNPCS(Type) >= 1) + flag21 = true; + } + if (Type != 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, Type, 1); + } + else if (flag3) + { + int maxValue3 = 8; + int maxValue4 = 30; + bool flag22 = (double) Math.Abs(index1 - Main.maxTilesX / 2) / (double) (Main.maxTilesX / 2) > 0.330000013113022 && (Main.wallLight[(int) Main.tile[index7, index8].wall] || Main.tile[index7, index8].wall == (ushort) 73); + if (flag22 && NPC.AnyDanger()) + flag22 = false; + if (Main.player[index5].ZoneWaterCandle) + { + maxValue3 = 3; + maxValue4 = 10; + } + if (flag6 && Main.invasionType == 4) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 388); + else if (flag22 && Main.hardMode && NPC.downedGolemBoss && (!NPC.downedMartians && Main.rand.Next(maxValue3) == 0 || Main.rand.Next(maxValue4) == 0) && !NPC.AnyNPCs(399)) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 399); + else if (flag22 && Main.hardMode && NPC.downedGolemBoss && (!NPC.downedMartians && Main.rand.Next(maxValue3) == 0 || Main.rand.Next(maxValue4) == 0) && !NPC.AnyNPCs(399) && (Main.player[index5].inventory[Main.player[index5].selectedItem].type == 148 || Main.player[index5].ZoneWaterCandle)) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 399); + else if (Main.hardMode && !NPC.AnyNPCs(87) && !flag5 && Main.rand.Next(10) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 87, 1); + else if (Main.hardMode && !NPC.AnyNPCs(87) && !flag5 && Main.rand.Next(10) == 0 && (Main.player[index5].inventory[Main.player[index5].selectedItem].type == 148 || Main.player[index5].ZoneWaterCandle)) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 87, 1); + else + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 48); + } + else if (flag6) + { + switch (Main.invasionType) + { + case 1: + if (Main.hardMode && !NPC.AnyNPCs(471) && Main.rand.Next(30) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 471); + break; + } + if (Main.rand.Next(9) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 29); + break; + } + if (Main.rand.Next(5) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 26); + break; + } + if (Main.rand.Next(3) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 111); + break; + } + if (Main.rand.Next(3) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 27); + break; + } + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 28); + break; + case 2: + if (Main.rand.Next(7) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 145); + break; + } + if (Main.rand.Next(3) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 143); + break; + } + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 144); + break; + case 3: + if (Main.invasionSize < Main.invasionSizeStart / 2 && Main.rand.Next(20) == 0 && !NPC.AnyNPCs(491) && !Collision.SolidTiles(index1 - 20, index1 + 20, index2 - 40, index2 - 10)) + { + NPC.NewNPC(index1 * 16 + 8, (index2 - 10) * 16, 491); + break; + } + if (Main.rand.Next(30) == 0 && !NPC.AnyNPCs(216)) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 216); + break; + } + if (Main.rand.Next(11) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 215); + break; + } + if (Main.rand.Next(9) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 252); + break; + } + if (Main.rand.Next(7) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 214); + break; + } + if (Main.rand.Next(3) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 213); + break; + } + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 212); + break; + case 4: + int Type1 = 0; + int num25 = Main.rand.Next(7); + bool flag23 = (double) (Main.invasionSizeStart - Main.invasionSize) / (double) Main.invasionSizeStart >= 0.300000011920929 && !NPC.AnyNPCs(395); + if (Main.rand.Next(45) == 0 & flag23) + Type1 = 395; + else if (num25 >= 6) + { + if (Main.rand.Next(20) == 0 & flag23) + { + Type1 = 395; + } + else + { + int num26 = Main.rand.Next(2); + if (num26 == 0) + Type1 = 390; + if (num26 == 1) + Type1 = 386; + } + } + else if (num25 >= 4) + { + int num27 = Main.rand.Next(5); + Type1 = num27 >= 2 ? (num27 >= 4 ? 388 : 381) : 382; + } + else + { + int num28 = Main.rand.Next(4); + if (num28 == 3) + { + if (!NPC.AnyNPCs(520)) + Type1 = 520; + else + num28 = Main.rand.Next(3); + } + if (num28 == 0) + Type1 = 385; + if (num28 == 1) + Type1 = 389; + if (num28 == 2) + Type1 = 383; + } + if (Type1 != 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, Type1, 1); + break; + } + break; + } + } + else if (num24 == 244) + { + if (flag7) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 55); + else if ((double) index2 > Main.worldSurface) + { + if (Main.rand.Next(3) == 0) + { + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 447); + else + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 300); + } + else if (Main.rand.Next(2) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 359); + else if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 448); + else if (Main.rand.Next(3) != 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 357); + } + else if (Main.player[index5].RollLuck(2) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 624); + Main.npc[newNPC].timeLeft *= 10; + } + else if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 443); + else if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 539); + else if (Main.halloween && Main.rand.Next(3) != 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 303); + else if (Main.xMas && Main.rand.Next(3) != 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 337); + else if (BirthdayParty.PartyIsUp && Main.rand.Next(3) != 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 540); + else if (Main.rand.Next(3) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, (int) Utils.SelectRandom(Main.rand, (short) 299, (short) 538)); + else + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 46); + } + else if (!NPC.savedBartender && DD2Event.ReadyToFindBartender && !NPC.AnyNPCs(579) && Main.rand.Next(80) == 0 && !flag7) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 579); + else if (Main.tile[index1, index2].wall == (ushort) 62 | flag11) + { + if (Main.tile[index1, index2].wall == (ushort) 62 && Main.rand.Next(8) == 0 && !flag7 && (double) index2 >= Main.rockLayer && index2 < Main.maxTilesY - 210 && !NPC.savedStylist && !NPC.AnyNPCs(354)) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 354); + else if (Main.hardMode && Main.rand.Next(10) != 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 163); + else + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 164); + } + else if (((WallID.Sets.Conversion.HardenedSand[(int) Main.tile[index1, index2].wall] ? 1 : (WallID.Sets.Conversion.Sandstone[(int) Main.tile[index1, index2].wall] ? 1 : 0)) | (flag13 ? 1 : 0)) != 0 && WorldGen.checkUnderground(index1, index2) && NPC.Spawning_FlyingAntlionCheck(index1, index2)) + { + float num29 = 1f; + if ((double) index2 > (Main.rockLayer * 2.0 + (double) Main.maxTilesY) / 3.0) + num29 *= 0.5f; + else if ((double) index2 > Main.rockLayer) + num29 *= 0.75f; + if (Main.rand.Next(20) == 0 && !flag7 && !NPC.savedGolfer && !NPC.AnyNPCs(589)) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 589); + else if (Main.hardMode && Main.rand.Next((int) (33.0 * (double) num29)) == 0 && !flag5 && (double) index2 > Main.worldSurface + 100.0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 510); + else if (Main.rand.Next((int) (33.0 * (double) num29)) == 0 && !flag5 && (double) index2 > Main.worldSurface + 100.0 && NPC.CountNPCS(513) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 513); + else if (Main.hardMode && Main.rand.Next(5) != 0) + { + List intList = new List(); + if (Main.player[index5].ZoneCorrupt) + { + intList.Add(525); + intList.Add(525); + } + if (Main.player[index5].ZoneCrimson) + { + intList.Add(526); + intList.Add(526); + } + if (Main.player[index5].ZoneHallow) + { + intList.Add(527); + intList.Add(527); + } + if (intList.Count == 0) + { + intList.Add(524); + intList.Add(524); + } + if (Main.player[index5].ZoneCorrupt || Main.player[index5].ZoneCrimson) + { + intList.Add(533); + intList.Add(529); + } + else + { + intList.Add(530); + intList.Add(528); + } + intList.Add(532); + int Type2 = Utils.SelectRandom(Main.rand, intList.ToArray()); + NPC.NewNPC(index1 * 16 + 8, index2 * 16, Type2); + intList.Clear(); + } + else + { + int Type3 = Utils.SelectRandom(Main.rand, 69, 580, 580, 580, 581); + if (Main.rand.Next(15) == 0) + Type3 = 537; + else if (Main.rand.Next(10) == 0) + { + switch (Type3) + { + case 580: + Type3 = 508; + break; + case 581: + Type3 = 509; + break; + } + } + NPC.NewNPC(index1 * 16 + 8, index2 * 16, Type3); + } + } + else if (Main.hardMode & flag7 && Main.player[index5].ZoneJungle && Main.rand.Next(3) != 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 157); + else if (Main.hardMode & flag7 && Main.player[index5].ZoneCrimson && Main.rand.Next(3) != 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 242); + else if (Main.hardMode & flag7 && Main.player[index5].ZoneCrimson && Main.rand.Next(3) != 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 241); + else if (((!flag12 ? 1 : (NPC.savedAngler ? 0 : (!NPC.AnyNPCs(376) ? 1 : 0))) & (flag7 ? 1 : 0)) != 0 && ((index1 < WorldGen.oceanDistance || index1 > Main.maxTilesX - WorldGen.oceanDistance) && Main.tileSand[tileType] && (double) index2 < Main.rockLayer || num1 == 53 && WorldGen.oceanDepths(index1, index2))) + { + bool flag24 = false; + if (!NPC.savedAngler && !NPC.AnyNPCs(376) && (double) index2 < Main.worldSurface - 10.0) + { + int num30 = -1; + for (int j = index2 - 1; j > index2 - 50; --j) + { + if (Main.tile[index1, j].liquid == (byte) 0 && !WorldGen.SolidTile(index1, j) && !WorldGen.SolidTile(index1, j + 1) && !WorldGen.SolidTile(index1, j + 2)) + { + num30 = j + 2; + break; + } + } + if (num30 > index2) + num30 = index2; + if (num30 > 0 && !flag16) + { + NPC.NewNPC(index1 * 16 + 8, num30 * 16, 376); + flag24 = true; + } + } + if (!flag24) + { + int num31 = -1; + int num32 = -1; + if ((double) index2 < Main.worldSurface && index2 > 50) + { + for (int j = index2 - 1; j > index2 - 50; --j) + { + if (Main.tile[index1, j].liquid == (byte) 0 && !WorldGen.SolidTile(index1, j) && !WorldGen.SolidTile(index1, j + 1) && !WorldGen.SolidTile(index1, j + 2)) + { + num31 = j + 2; + if (!WorldGen.SolidTile(index1, num31 + 1) && !WorldGen.SolidTile(index1, num31 + 2)) + { + num32 = num31 + 2; + break; + } + break; + } + } + if (num31 > index2) + num31 = index2; + if (num32 > index2) + num32 = index2; + } + if (num31 > 0 && !flag16 && Main.rand.Next(10) == 0) + NPC.NewNPC(index1 * 16 + 8, num31 * 16, 602); + else if (Main.rand.Next(10) == 0) + { + int num33 = Main.rand.Next(3); + if (num33 == 0 && num31 > 0) + NPC.NewNPC(index1 * 16 + 8, num31 * 16, 625); + else if (num33 == 1 && num32 > 0) + NPC.NewNPC(index1 * 16 + 8, num32 * 16, 615); + else if (num33 == 2 && num32 > 0) + { + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, num32 * 16, 627); + else + NPC.NewNPC(index1 * 16 + 8, num32 * 16, 626); + } + } + else if (Main.rand.Next(40) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 220); + else if (Main.rand.Next(18) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 221); + else if (Main.rand.Next(8) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 65); + else if (Main.rand.Next(3) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 67); + else + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 64); + } + } + else if (!flag7 && !NPC.savedAngler && !NPC.AnyNPCs(376) && (index1 < WorldGen.beachDistance || index1 > Main.maxTilesX - WorldGen.beachDistance) && Main.tileSand[tileType] && (double) index2 < Main.worldSurface) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 376); + else if (!flag12 & flag7 && ((double) index2 > Main.rockLayer && Main.rand.Next(2) == 0 || tileType == 60)) + { + bool flag25 = false; + if (tileType == 60 && (double) index2 < Main.worldSurface && index2 > 50 && Main.rand.Next(3) == 0 && Main.dayTime) + { + int num34 = -1; + for (int j = index2 - 1; j > index2 - 50; --j) + { + if (Main.tile[index1, j].liquid == (byte) 0 && !WorldGen.SolidTile(index1, j) && !WorldGen.SolidTile(index1, j + 1) && !WorldGen.SolidTile(index1, j + 2)) + { + num34 = j + 2; + break; + } + } + if (num34 > index2) + num34 = index2; + if (num34 > 0 && !flag16) + { + flag25 = true; + if (Main.rand.Next(4) == 0) + { + flag25 = true; + NPC.NewNPC(index1 * 16 + 8, num34 * 16, 617); + } + else if (!flag1 && (double) Main.cloudAlpha == 0.0) + { + flag25 = true; + int num35 = Main.rand.Next(1, 4); + for (int index30 = 0; index30 < num35; ++index30) + { + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8 + Main.rand.Next(-16, 17), num34 * 16 - 16, 613); + else + NPC.NewNPC(index1 * 16 + 8 + Main.rand.Next(-16, 17), num34 * 16 - 16, 612); + } + } + } + } + if (!flag25) + { + if (Main.hardMode && Main.rand.Next(3) > 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 102); + else + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 58); + } + } + else if (!flag12 & flag7 && (double) index2 > Main.worldSurface && Main.rand.Next(3) == 0) + { + if (Main.hardMode && Main.rand.Next(3) > 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 103); + else + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 63); + } + else if (flag7 && Main.rand.Next(4) == 0 && (index1 > WorldGen.oceanDistance && index1 < Main.maxTilesX - WorldGen.oceanDistance || (double) index2 > Main.worldSurface + 50.0)) + { + if (Main.player[index5].ZoneCorrupt) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 57); + else if ((double) index2 < Main.worldSurface && index2 > 50 && Main.rand.Next(3) != 0 && Main.dayTime) + { + int num36 = -1; + for (int j = index2 - 1; j > index2 - 50; --j) + { + if (Main.tile[index1, j].liquid == (byte) 0 && !WorldGen.SolidTile(index1, j) && !WorldGen.SolidTile(index1, j + 1) && !WorldGen.SolidTile(index1, j + 2)) + { + num36 = j + 2; + break; + } + } + if (num36 > index2) + num36 = index2; + if (num36 > 0 && !flag16) + { + if (Main.rand.Next(5) == 0 && (num1 == 2 || num1 == 477)) + NPC.NewNPC(index1 * 16 + 8, num36 * 16, 616); + else if (num1 == 53) + { + if (Main.rand.Next(2) == 0 && !flag1 && (double) Main.cloudAlpha == 0.0) + { + int num37 = Main.rand.Next(1, 4); + for (int index31 = 0; index31 < num37; ++index31) + { + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8 + Main.rand.Next(-16, 17), num36 * 16 - 16, 613); + else + NPC.NewNPC(index1 * 16 + 8 + Main.rand.Next(-16, 17), num36 * 16 - 16, 612); + } + } + else + NPC.NewNPC(index1 * 16 + 8, num36 * 16, 608); + } + else if (Main.rand.Next(2) == 0) + NPC.NewNPC(index1 * 16 + 8, num36 * 16, 362); + else + NPC.NewNPC(index1 * 16 + 8, num36 * 16, 364); + } + else if (num1 == 53) + NPC.NewNPC(index1 * 16 + 8, num36 * 16, 607); + else if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 592); + else + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 55); + } + else if (num1 == 53) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 607); + else if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 592); + else + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 55); + } + else if (NPC.downedGoblins && Main.player[index5].RollLuck(20) == 0 && !flag7 && (double) index2 >= Main.rockLayer && index2 < Main.maxTilesY - 210 && !NPC.savedGoblin && !NPC.AnyNPCs(105)) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 105); + else if (Main.hardMode && Main.player[index5].RollLuck(20) == 0 && !flag7 && (double) index2 >= Main.rockLayer && index2 < Main.maxTilesY - 210 && !NPC.savedWizard && !NPC.AnyNPCs(106)) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 106); + else if (flag12) + { + if (Main.player[index5].ZoneGraveyard) + { + if (!flag7) + { + if (Main.rand.Next(2) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 606); + else + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 610); + } + } + else if ((double) index2 <= Main.worldSurface && (index1 < WorldGen.beachDistance || index1 > Main.maxTilesX - WorldGen.beachDistance)) + { + if (flag7) + { + int num38 = -1; + int num39 = -1; + if ((double) index2 < Main.worldSurface && index2 > 50) + { + for (int j = index2 - 1; j > index2 - 50; --j) + { + if (Main.tile[index1, j].liquid == (byte) 0 && !WorldGen.SolidTile(index1, j) && !WorldGen.SolidTile(index1, j + 1) && !WorldGen.SolidTile(index1, j + 2)) + { + num38 = j + 2; + if (!WorldGen.SolidTile(index1, num38 + 1) && !WorldGen.SolidTile(index1, num38 + 2)) + { + num39 = num38 + 2; + break; + } + break; + } + } + if (num38 > index2) + num38 = index2; + if (num39 > index2) + num39 = index2; + } + if (Main.rand.Next(2) == 0) + { + int num40 = Main.rand.Next(3); + if (num40 == 0 && num38 > 0) + NPC.NewNPC(index1 * 16 + 8, num38 * 16, 625); + else if (num40 == 1 && num39 > 0) + NPC.NewNPC(index1 * 16 + 8, num39 * 16, 615); + else if (num40 == 2 && num39 > 0) + { + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, num39 * 16, 627); + else + NPC.NewNPC(index1 * 16 + 8, num39 * 16, 626); + } + } + else if (num38 > 0 && !flag16) + NPC.NewNPC(index1 * 16 + 8, num38 * 16, 602); + } + else + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 602); + } + else + { + int cattailX; + int cattailY; + if ((tileType == 2 || tileType == 477 || tileType == 53) && !windyForButterflies && !Main.raining && Main.dayTime && Main.rand.Next(2) == 0 && (double) index2 <= Main.worldSurface && NPC.FindCattailTop(index1, index2, out cattailX, out cattailY)) + { + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(cattailX * 16 + 8, cattailY * 16, 601); + else + NPC.NewNPC(cattailX * 16 + 8, cattailY * 16, NPC.RollDragonflyType(tileType)); + if (Main.rand.Next(3) == 0) + NPC.NewNPC(cattailX * 16 + 8 - 16, cattailY * 16, NPC.RollDragonflyType(tileType)); + if (Main.rand.Next(3) == 0) + NPC.NewNPC(cattailX * 16 + 8 + 16, cattailY * 16, NPC.RollDragonflyType(tileType)); + } + else if (flag7) + { + if ((double) index2 < Main.worldSurface && index2 > 50 && Main.rand.Next(3) != 0 && Main.dayTime) + { + int num41 = -1; + for (int j = index2 - 1; j > index2 - 50; --j) + { + if (Main.tile[index1, j].liquid == (byte) 0 && !WorldGen.SolidTile(index1, j) && !WorldGen.SolidTile(index1, j + 1) && !WorldGen.SolidTile(index1, j + 2)) + { + num41 = j + 2; + break; + } + } + if (num41 > index2) + num41 = index2; + if (num41 > 0 && !flag16) + { + switch (num1) + { + case 53: + if (Main.rand.Next(2) == 0 && !flag1 && (double) Main.cloudAlpha == 0.0) + { + int num42 = Main.rand.Next(1, 4); + for (int index32 = 0; index32 < num42; ++index32) + { + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8 + Main.rand.Next(-16, 17), num41 * 16 - 16, 613); + else + NPC.NewNPC(index1 * 16 + 8 + Main.rand.Next(-16, 17), num41 * 16 - 16, 612); + } + break; + } + NPC.NewNPC(index1 * 16 + 8, num41 * 16, 608); + break; + case 60: + if (Main.rand.Next(2) == 0 && !flag1 && (double) Main.cloudAlpha == 0.0) + { + int num43 = Main.rand.Next(1, 4); + for (int index33 = 0; index33 < num43; ++index33) + { + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8 + Main.rand.Next(-16, 17), num41 * 16 - 16, 613); + else + NPC.NewNPC(index1 * 16 + 8 + Main.rand.Next(-16, 17), num41 * 16 - 16, 612); + } + break; + } + NPC.NewNPC(index1 * 16 + 8, num41 * 16, 617); + break; + default: + if (Main.rand.Next(5) == 0 && (num1 == 2 || num1 == 477)) + { + NPC.NewNPC(index1 * 16 + 8, num41 * 16, 616); + break; + } + if (Main.rand.Next(2) == 0) + { + NPC.NewNPC(index1 * 16 + 8, num41 * 16, 362); + break; + } + NPC.NewNPC(index1 * 16 + 8, num41 * 16, 364); + break; + } + } + else if (num1 == 53) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 607); + else if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 592); + else + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 55); + } + else if (num1 == 53) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 607); + else if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 592); + else + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 55); + } + else + { + switch (tileType) + { + case 2: + case 109: + case 477: + case 492: + bool flag26 = (double) index2 <= Main.worldSurface; + if (Main.raining && index2 <= Main.UnderworldLayer) + { + if ((double) index2 >= Main.rockLayer && Main.rand.Next(5) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(639, 646)); + break; + } + if ((double) index2 >= Main.rockLayer && Main.rand.Next(5) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(646, 653)); + break; + } + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 448); + break; + } + if (Main.rand.Next(3) != 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 357); + break; + } + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 593); + break; + } + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 230); + break; + } + if (((Main.dayTime || Main.numClouds > 55 || (double) Main.cloudBGActive != 0.0 ? 0 : ((double) Star.starfallBoost > 3.0 ? 1 : 0)) & (flag26 ? 1 : 0)) != 0 && Main.player[index5].RollLuck(2) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 484); + break; + } + if (((windyForButterflies || Main.dayTime ? 0 : (Main.rand.Next(NPC.fireFlyFriendly) == 0 ? 1 : 0)) & (flag26 ? 1 : 0)) != 0) + { + int Type4 = 355; + if (tileType == 109) + Type4 = 358; + NPC.NewNPC(index1 * 16 + 8, index2 * 16, Type4); + if (Main.rand.Next(NPC.fireFlyMultiple) == 0) + NPC.NewNPC(index1 * 16 + 8 - 16, index2 * 16, Type4); + if (Main.rand.Next(NPC.fireFlyMultiple) == 0) + NPC.NewNPC(index1 * 16 + 8 + 16, index2 * 16, Type4); + if (Main.rand.Next(NPC.fireFlyMultiple) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16 - 16, Type4); + if (Main.rand.Next(NPC.fireFlyMultiple) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16 + 16, Type4); + break; + } + break; + } + if ((((double) Main.cloudAlpha != 0.0 || Main.dayTime ? 0 : (Main.rand.Next(5) == 0 ? 1 : 0)) & (flag26 ? 1 : 0)) != 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 611); + break; + } + if (((!Main.dayTime || Main.time >= 18000.0 ? 0 : ((uint) Main.rand.Next(3) > 0U ? 1 : 0)) & (flag26 ? 1 : 0)) != 0) + { + int num44 = Main.rand.Next(4); + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 442); + break; + } + switch (num44) + { + case 0: + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 297); + break; + case 1: + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 298); + break; + default: + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 74); + break; + } + } + else + { + if (((windyForButterflies || Main.raining || !Main.dayTime ? 0 : (Main.rand.Next(NPC.butterflyChance) == 0 ? 1 : 0)) & (flag26 ? 1 : 0)) != 0) + { + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 444); + else + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 356); + if (Main.rand.Next(4) == 0) + NPC.NewNPC(index1 * 16 + 8 - 16, index2 * 16, 356); + if (Main.rand.Next(4) == 0) + { + NPC.NewNPC(index1 * 16 + 8 + 16, index2 * 16, 356); + break; + } + break; + } + if (((!windyForButterflies || Main.raining || !Main.dayTime ? 0 : (Main.rand.Next(NPC.butterflyChance / 2) == 0 ? 1 : 0)) & (flag26 ? 1 : 0)) != 0) + { + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 605); + else + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 604); + if (Main.rand.Next(3) != 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 604); + if (Main.rand.Next(2) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 604); + if (Main.rand.Next(3) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 604); + if (Main.rand.Next(4) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 604); + break; + } + break; + } + if (Main.rand.Next(2) == 0 & flag26) + { + int num45 = Main.rand.Next(4); + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 442); + break; + } + switch (num45) + { + case 0: + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 297); + break; + case 1: + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 298); + break; + default: + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 74); + break; + } + } + else + { + if (index2 > Main.UnderworldLayer) + { + newNPC = NPC.SpawnNPC_SpawnLavaBaitCritters(index1, index2); + break; + } + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 443); + break; + } + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0 & flag26) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 539); + break; + } + if (Main.halloween && Main.rand.Next(3) != 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 303); + break; + } + if (Main.xMas && Main.rand.Next(3) != 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 337); + break; + } + if (BirthdayParty.PartyIsUp && Main.rand.Next(3) != 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 540); + break; + } + if (Main.rand.Next(3) == 0) + { + if ((double) index2 >= Main.rockLayer && index2 <= Main.UnderworldLayer) + { + if (Main.rand.Next(5) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(639, 646)); + break; + } + break; + } + if (flag26) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, (int) Utils.SelectRandom(Main.rand, (short) 299, (short) 538)); + break; + } + break; + } + if ((double) index2 >= Main.rockLayer && index2 <= Main.UnderworldLayer) + { + if (Main.rand.Next(5) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(646, 653)); + break; + } + break; + } + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 46); + break; + } + } + break; + case 53: + NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(366, 368)); + break; + case 60: + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 445); + break; + } + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 361); + break; + case 147: + case 161: + if (Main.rand.Next(2) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 148); + break; + } + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 149); + break; + default: + if ((double) index2 <= Main.worldSurface) + return; + goto case 2; + } + } + } + } + else if (Main.player[index5].ZoneDungeon) + { + int num46 = 0; + if (Main.tile[index1, index2].wall == (ushort) 94 || Main.tile[index1, index2].wall == (ushort) 96 || Main.tile[index1, index2].wall == (ushort) 98) + num46 = 1; + if (Main.tile[index1, index2].wall == (ushort) 95 || Main.tile[index1, index2].wall == (ushort) 97 || Main.tile[index1, index2].wall == (ushort) 99) + num46 = 2; + if (Main.player[index5].RollLuck(7) == 0) + num46 = Main.rand.Next(3); + bool flag27 = !NPC.downedBoss3; + if (Main.drunkWorld && (double) Main.player[index5].position.Y / 16.0 < (double) (Main.dungeonY + 40)) + flag27 = false; + if (flag27) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 68); + else if (!NPC.savedMech && Main.rand.Next(5) == 0 && !flag7 && !NPC.AnyNPCs(123) && (double) index2 > Main.rockLayer) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 123); + else if (flag14 && Main.rand.Next(30) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 287); + else if (flag14 && num46 == 0 && Main.rand.Next(15) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 293); + else if (flag14 && num46 == 1 && Main.rand.Next(15) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 291); + else if (flag14 && num46 == 2 && Main.rand.Next(15) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 292); + else if (flag14 && !NPC.AnyNPCs(290) && num46 == 0 && Main.rand.Next(35) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 290); + else if (flag14 && (num46 == 1 || num46 == 2) && Main.rand.Next(30) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 289); + else if (flag14 && Main.rand.Next(20) == 0) + { + int num47 = 281; + if (num46 == 0) + num47 += 2; + if (num46 == 2) + num47 += 4; + int Type5 = num47 + Main.rand.Next(2); + if (!NPC.AnyNPCs(Type5)) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, Type5); + } + else if (flag14 && Main.rand.Next(3) != 0) + { + int num48 = 269; + if (num46 == 0) + num48 += 4; + if (num46 == 2) + num48 += 8; + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, num48 + Main.rand.Next(4)); + } + else if (Main.player[index5].RollLuck(35) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 71); + else if (num46 == 1 && Main.rand.Next(3) == 0 && !NPC.NearSpikeBall(index1, index2)) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 70); + else if (num46 == 2 && Main.rand.Next(5) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 72); + else if (num46 == 0 && Main.rand.Next(7) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 34); + else if (Main.rand.Next(7) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 32); + } + else + { + switch (Main.rand.Next(5)) + { + case 0: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 294); + break; + case 1: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 295); + break; + case 2: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 296); + break; + default: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 31); + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-14); + break; + } + if (Main.rand.Next(5) == 0) + { + Main.npc[newNPC].SetDefaults(-13); + break; + } + break; + } + } + } + else if (Main.player[index5].ZoneMeteor) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 23); + else if (DD2Event.Ongoing && Main.player[index5].ZoneOldOneArmy) + DD2Event.SpawnNPC(ref newNPC); + else if ((double) index2 <= Main.worldSurface && !Main.dayTime && Main.snowMoon) + { + int waveNumber = NPC.waveNumber; + if (Main.rand.Next(30) == 0 && NPC.CountNPCS(341) < 4) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 341); + else if (waveNumber >= 20) + { + int num49 = Main.rand.Next(3); + if ((double) num3 < (double) num2 * (double) num4) + { + switch (num49) + { + case 0: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 345); + break; + case 1: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 346); + break; + default: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 344); + break; + } + } + } + else if (waveNumber >= 19) + newNPC = Main.rand.Next(10) != 0 || NPC.CountNPCS(345) >= 4 ? (Main.rand.Next(10) != 0 || NPC.CountNPCS(346) >= 5 ? (Main.rand.Next(10) != 0 || NPC.CountNPCS(344) >= 7 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 343) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 344)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 346)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 345); + else if (waveNumber >= 18) + newNPC = Main.rand.Next(10) != 0 || NPC.CountNPCS(345) >= 3 ? (Main.rand.Next(10) != 0 || NPC.CountNPCS(346) >= 4 ? (Main.rand.Next(10) != 0 || NPC.CountNPCS(344) >= 6 ? (Main.rand.Next(3) != 0 ? (Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 343) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 351)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 348)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 344)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 346)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 345); + else if (waveNumber >= 17) + newNPC = Main.rand.Next(10) != 0 || NPC.CountNPCS(345) >= 2 ? (Main.rand.Next(10) != 0 || NPC.CountNPCS(346) >= 3 ? (Main.rand.Next(10) != 0 || NPC.CountNPCS(344) >= 5 ? (Main.rand.Next(4) != 0 ? (Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 343) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 351)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 347)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 344)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 346)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 345); + else if (waveNumber >= 16) + newNPC = Main.rand.Next(10) != 0 || NPC.CountNPCS(345) >= 2 ? (Main.rand.Next(10) != 0 || NPC.CountNPCS(346) >= 2 ? (Main.rand.Next(10) != 0 || NPC.CountNPCS(344) >= 4 ? (Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 343) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 352)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 344)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 346)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 345); + else if (waveNumber >= 15) + newNPC = Main.rand.Next(10) != 0 || NPC.AnyNPCs(345) ? (Main.rand.Next(10) != 0 || NPC.CountNPCS(346) >= 2 ? (Main.rand.Next(10) != 0 || NPC.CountNPCS(344) >= 3 ? (Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 343) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 347)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 344)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 346)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 345); + else if (waveNumber == 14) + { + if (Main.rand.Next(10) == 0 && !NPC.AnyNPCs(345)) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 345); + else if (Main.rand.Next(10) == 0 && !NPC.AnyNPCs(346)) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 346); + else if (Main.rand.Next(10) == 0 && !NPC.AnyNPCs(344)) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 344); + else if (Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 343); + } + else + newNPC = waveNumber != 13 ? (waveNumber != 12 ? (waveNumber != 11 ? (waveNumber != 10 ? (waveNumber != 9 ? (waveNumber != 8 ? (waveNumber != 7 ? (waveNumber != 6 ? (waveNumber != 5 ? (waveNumber != 4 ? (waveNumber != 3 ? (waveNumber != 2 ? (Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(338, 341)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 342)) : (Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(338, 341)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 350))) : (Main.rand.Next(8) != 0 ? (Main.rand.Next(4) != 0 ? (Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(338, 341)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 342)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 350)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 348))) : (Main.rand.Next(10) != 0 || NPC.AnyNPCs(344) ? (Main.rand.Next(4) != 0 ? (Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(338, 341)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 342)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 350)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 344))) : (Main.rand.Next(10) != 0 || NPC.AnyNPCs(344) ? (Main.rand.Next(4) != 0 ? (Main.rand.Next(8) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(338, 341)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 348)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 350)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 344))) : (Main.rand.Next(10) != 0 || NPC.CountNPCS(344) >= 2 ? (Main.rand.Next(4) != 0 ? (Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 350) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 348)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 347)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 344))) : (Main.rand.Next(10) != 0 || NPC.AnyNPCs(346) ? (Main.rand.Next(3) != 0 ? (Main.rand.Next(4) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(338, 341)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 350)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 342)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 346))) : (Main.rand.Next(10) != 0 || NPC.AnyNPCs(346) ? (Main.rand.Next(8) != 0 ? (Main.rand.Next(3) != 0 ? (Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 350) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 347)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 348)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 351)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 346))) : (Main.rand.Next(10) != 0 || NPC.AnyNPCs(346) ? (Main.rand.Next(10) != 0 || NPC.AnyNPCs(344) ? (Main.rand.Next(2) != 0 ? (Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 342) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 347)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 348)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 344)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 346))) : (Main.rand.Next(10) != 0 || NPC.AnyNPCs(346) ? (Main.rand.Next(10) != 0 || NPC.CountNPCS(344) >= 2 ? (Main.rand.Next(6) != 0 ? (Main.rand.Next(3) != 0 ? (Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(338, 341)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 347)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 348)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 351)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 344)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 346))) : (Main.rand.Next(10) != 0 || NPC.AnyNPCs(345) ? (Main.rand.Next(6) != 0 ? (Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(338, 341)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 342)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 352)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 345))) : (Main.rand.Next(10) != 0 || NPC.AnyNPCs(345) ? (Main.rand.Next(10) != 0 || NPC.AnyNPCs(344) ? (Main.rand.Next(8) != 0 ? (Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(338, 341)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 342)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 343)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 344)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 345))) : (Main.rand.Next(10) != 0 || NPC.AnyNPCs(345) ? (Main.rand.Next(10) != 0 || NPC.AnyNPCs(346) ? (Main.rand.Next(3) != 0 ? (Main.rand.Next(6) != 0 ? (Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 347) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 342)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 343)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 352)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 346)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 345)); + } + else if ((double) index2 <= Main.worldSurface && !Main.dayTime && Main.pumpkinMoon) + { + int waveNumber = NPC.waveNumber; + int num50; + if (NPC.waveNumber >= 15) + { + if ((double) num3 < (double) num2 * (double) num4) + newNPC = Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 325) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 327); + } + else + { + switch (waveNumber) + { + case 2: + newNPC = Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(305, 315)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 326); + break; + case 3: + newNPC = Main.rand.Next(6) != 0 ? (Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(305, 315)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 326)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 329); + break; + case 4: + newNPC = Main.rand.Next(10) != 0 || NPC.AnyNPCs(325) ? (Main.rand.Next(10) != 0 ? (Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(305, 315)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 326)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 329)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 325); + break; + case 5: + newNPC = Main.rand.Next(10) != 0 || NPC.AnyNPCs(325) ? (Main.rand.Next(8) != 0 ? (Main.rand.Next(5) != 0 ? (Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(305, 315)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 326)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 329)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 330)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 325); + break; + case 6: + newNPC = Main.rand.Next(7) != 0 || NPC.CountNPCS(325) >= 2 ? (Main.rand.Next(6) != 0 ? (Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 326) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 329)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 330)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 325); + break; + case 7: + newNPC = Main.rand.Next(10) != 0 || NPC.AnyNPCs(327) ? (Main.rand.Next(8) != 0 ? (Main.rand.Next(5) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(305, 315)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 329)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 330)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 327); + break; + case 8: + newNPC = Main.rand.Next(10) != 0 || NPC.AnyNPCs(327) ? (Main.rand.Next(5) != 0 ? (Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 326) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 329)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 330)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 327); + break; + case 9: + newNPC = Main.rand.Next(8) != 0 || NPC.AnyNPCs(327) ? (Main.rand.Next(8) != 0 || NPC.AnyNPCs(325) ? (Main.rand.Next(10) != 0 || NPC.AnyNPCs(315) ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(305, 315)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 315)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 325)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 327); + break; + case 10: + newNPC = Main.rand.Next(10) != 0 || NPC.AnyNPCs(327) ? (Main.rand.Next(10) != 0 || NPC.AnyNPCs(325) ? (Main.rand.Next(10) != 0 || NPC.AnyNPCs(315) ? (Main.rand.Next(8) != 0 ? (Main.rand.Next(5) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 326) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 329)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 330)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 315)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 325)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 327); + break; + case 11: + if (Main.rand.Next(10) == 0 && !NPC.AnyNPCs(327)) + num50 = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 327); + newNPC = Main.rand.Next(7) != 0 || NPC.CountNPCS(325) >= 2 ? (Main.rand.Next(10) != 0 || NPC.AnyNPCs(315) ? (Main.rand.Next(10) != 0 ? (Main.rand.Next(7) != 0 ? (Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(305, 315)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 326)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 329)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 330)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 315)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 325); + break; + case 12: + if (Main.rand.Next(7) == 0 && NPC.CountNPCS(327) < 2) + num50 = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 327); + newNPC = Main.rand.Next(7) != 0 || NPC.CountNPCS(325) >= 2 ? (Main.rand.Next(7) != 0 || NPC.CountNPCS(315) >= 2 ? (Main.rand.Next(7) != 0 ? (Main.rand.Next(5) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 326) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 329)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 330)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 315)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 325); + break; + case 13: + if (Main.rand.Next(7) == 0 && NPC.CountNPCS(327) < 2) + num50 = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 327); + newNPC = Main.rand.Next(5) != 0 || NPC.CountNPCS(325) >= 3 ? (Main.rand.Next(5) != 0 || NPC.CountNPCS(315) >= 3 ? (Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 329) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 330)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 315)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 325); + break; + case 14: + if (Main.rand.Next(5) == 0 && NPC.CountNPCS(327) < 3) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 327); + break; + } + if (Main.rand.Next(5) == 0 && NPC.CountNPCS(325) < 3) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 325); + break; + } + if ((double) num3 < (double) num2 * (double) num4) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 315); + break; + } + break; + default: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(305, 315)); + break; + } + } + } + else if ((double) index2 <= Main.worldSurface && Main.dayTime && Main.eclipse) + { + bool flag28 = false; + if (NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3) + flag28 = true; + newNPC = !flag28 || Main.rand.Next(80) != 0 || NPC.AnyNPCs(477) ? (Main.rand.Next(50) != 0 || NPC.AnyNPCs(251) ? (!NPC.downedPlantBoss || Main.rand.Next(5) != 0 || NPC.AnyNPCs(466) ? (!NPC.downedPlantBoss || Main.rand.Next(20) != 0 || NPC.AnyNPCs(463) ? (!NPC.downedPlantBoss || Main.rand.Next(20) != 0 || NPC.CountNPCS(467) >= 2 ? (Main.rand.Next(15) != 0 ? (!flag28 || Main.rand.Next(13) != 0 ? (Main.rand.Next(8) != 0 ? (!NPC.downedPlantBoss || Main.rand.Next(7) != 0 ? (!NPC.downedPlantBoss || Main.rand.Next(5) != 0 ? (Main.rand.Next(4) != 0 ? (Main.rand.Next(3) != 0 ? (Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 166) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 462)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 461)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 162)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 460)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 468)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 469)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 253)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 159)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 467)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 463)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 466)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 251)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 477); + } + else if (NPC.fairyLog && Main.player[index5].RollLuck(500) == 0 && !NPC.AnyHelpfulFairies() && (double) index2 >= (Main.worldSurface + Main.rockLayer) / 2.0 && index2 < Main.maxTilesY - 300) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(583, 586)); + Main.npc[newNPC].ai[2] = 2f; + Main.npc[newNPC].TargetClosest(); + Main.npc[newNPC].ai[3] = 0.0f; + } + else if (!flag7 && (!Main.dayTime || Main.tile[index1, index2].wall > (ushort) 0) && Main.tile[index7, index8].wall == (ushort) 244 && !Main.eclipse && !Main.bloodMoon && Main.player[index5].RollLuck(30) == 0 && NPC.CountNPCS(624) <= Main.rand.Next(3)) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 624); + else if (!flag7 && !Main.eclipse && !Main.bloodMoon && Main.player[index5].RollLuck(10) == 0 && (double) index2 >= Main.worldSurface * 0.800000011920929 && (double) index2 < Main.worldSurface * 1.10000002384186 && NPC.CountNPCS(624) <= Main.rand.Next(3) && (!Main.dayTime || Main.tile[index1, index2].wall > (ushort) 0) && (Main.tile[index1, index2].wall == (ushort) 2 || Main.tile[index1, index2].wall == (ushort) 196 || Main.tile[index1, index2].wall == (ushort) 197 || Main.tile[index1, index2].wall == (ushort) 198 || Main.tile[index1, index2].wall == (ushort) 199)) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 624); + else if (((!Main.hardMode ? 0 : (num1 == 70 ? 1 : 0)) & (flag7 ? 1 : 0)) != 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 256); + else if (num1 == 70 && (double) index2 <= Main.worldSurface && Main.rand.Next(3) != 0) + { + if (!Main.hardMode && Main.rand.Next(6) == 0 || Main.rand.Next(12) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 360); + else if (Main.rand.Next(3) == 0) + { + if (Main.rand.Next(4) == 0) + { + if (Main.hardMode && Main.rand.Next(3) != 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 260); + Main.npc[newNPC].ai[0] = (float) index1; + Main.npc[newNPC].ai[1] = (float) index2; + Main.npc[newNPC].netUpdate = true; + } + else + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 259); + Main.npc[newNPC].ai[0] = (float) index1; + Main.npc[newNPC].ai[1] = (float) index2; + Main.npc[newNPC].netUpdate = true; + } + } + else + newNPC = Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 258) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 257); + } + else + newNPC = Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, (int) byte.MaxValue) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 254); + } + else if (num1 == 70 && Main.hardMode && (double) index2 >= Main.worldSurface && Main.rand.Next(3) != 0) + { + if (Main.hardMode && Main.rand.Next(5) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 374); + else if (!Main.hardMode && Main.rand.Next(4) == 0 || Main.rand.Next(8) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 360); + else if (Main.rand.Next(4) == 0) + { + if (Main.hardMode && Main.rand.Next(3) != 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 260); + Main.npc[newNPC].ai[0] = (float) index1; + Main.npc[newNPC].ai[1] = (float) index2; + Main.npc[newNPC].netUpdate = true; + } + else + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 259); + Main.npc[newNPC].ai[0] = (float) index1; + Main.npc[newNPC].ai[1] = (float) index2; + Main.npc[newNPC].netUpdate = true; + } + } + else + newNPC = Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 258) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 257); + } + else if (Main.player[index5].ZoneCorrupt && Main.rand.Next(65) == 0 && !flag5) + newNPC = !Main.hardMode || Main.rand.Next(4) == 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 7, 1) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 98, 1); + else if (Main.hardMode && (double) index2 > Main.worldSurface && Main.player[index5].RollLuck(75) == 0) + newNPC = Main.rand.Next(2) != 0 || !Main.player[index5].ZoneCorrupt || NPC.AnyNPCs(473) ? (Main.rand.Next(2) != 0 || !Main.player[index5].ZoneCrimson || NPC.AnyNPCs(474) ? (Main.rand.Next(2) != 0 || !Main.player[index5].ZoneHallow || NPC.AnyNPCs(475) ? (!Main.player[index5].ZoneSnow ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 85) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 629)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 475)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 474)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 473); + else if (Main.hardMode && (double) index2 <= Main.worldSurface && !Main.dayTime && (Main.rand.Next(20) == 0 || Main.rand.Next(5) == 0 && Main.moonPhase == 4)) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 82); + else if (Main.hardMode && Main.halloween && (double) index2 <= Main.worldSurface && !Main.dayTime && Main.rand.Next(10) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 304); + else if (tileType == 60 && Main.player[index5].RollLuck(500) == 0 && !Main.dayTime) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 52); + else if (tileType == 60 && (double) index2 > Main.worldSurface && Main.rand.Next(60) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 219); + else if ((double) index2 > Main.worldSurface && index2 < Main.maxTilesY - 210 && !Main.player[index5].ZoneSnow && !Main.player[index5].ZoneCrimson && !Main.player[index5].ZoneCorrupt && !Main.player[index5].ZoneJungle && !Main.player[index5].ZoneHallow && Main.rand.Next(8) == 0) + { + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 448); + else + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 357); + } + else if ((double) index2 > Main.worldSurface && index2 < Main.maxTilesY - 210 && !Main.player[index5].ZoneSnow && !Main.player[index5].ZoneCrimson && !Main.player[index5].ZoneCorrupt && !Main.player[index5].ZoneJungle && !Main.player[index5].ZoneHallow && Main.rand.Next(13) == 0) + { + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 447); + else + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 300); + } + else if ((double) index2 > Main.worldSurface && (double) index2 < (Main.rockLayer + (double) Main.maxTilesY) / 2.0 && !Main.player[index5].ZoneSnow && !Main.player[index5].ZoneCrimson && !Main.player[index5].ZoneCorrupt && !Main.player[index5].ZoneHallow && Main.rand.Next(13) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 359); + else if ((double) index2 < Main.worldSurface && Main.player[index5].ZoneJungle && Main.rand.Next(7) == 0) + { + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 445); + else + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 361); + } + else if (tileType == 225 && Main.rand.Next(2) == 0) + { + if (Main.hardMode && Main.rand.Next(4) != 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 176); + if (Main.rand.Next(10) == 0) + Main.npc[newNPC].SetDefaults(-18); + if (Main.rand.Next(10) == 0) + Main.npc[newNPC].SetDefaults(-19); + if (Main.rand.Next(10) == 0) + Main.npc[newNPC].SetDefaults(-20); + if (Main.rand.Next(10) == 0) + Main.npc[newNPC].SetDefaults(-21); + } + else + { + switch (Main.rand.Next(8)) + { + case 0: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 231); + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-56); + break; + } + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-57); + break; + } + break; + case 1: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 232); + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-58); + break; + } + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-59); + break; + } + break; + case 2: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 233); + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-60); + break; + } + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-61); + break; + } + break; + case 3: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 234); + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-62); + break; + } + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-63); + break; + } + break; + case 4: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 235); + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-64); + break; + } + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-65); + break; + } + break; + default: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 42); + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-16); + break; + } + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-17); + break; + } + break; + } + } + } + else if (tileType == 60 && Main.hardMode && Main.rand.Next(3) != 0) + { + if ((double) index2 < Main.worldSurface && !Main.dayTime && Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 152); + else if ((double) index2 < Main.worldSurface && Main.dayTime && Main.rand.Next(4) != 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 177); + else if ((double) index2 > Main.worldSurface && Main.rand.Next(100) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 205); + else if ((double) index2 > Main.worldSurface && Main.rand.Next(5) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 236); + else if ((double) index2 > Main.worldSurface && Main.rand.Next(4) != 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 176); + if (Main.rand.Next(10) == 0) + Main.npc[newNPC].SetDefaults(-18); + if (Main.rand.Next(10) == 0) + Main.npc[newNPC].SetDefaults(-19); + if (Main.rand.Next(10) == 0) + Main.npc[newNPC].SetDefaults(-20); + if (Main.rand.Next(10) == 0) + Main.npc[newNPC].SetDefaults(-21); + } + else if (Main.rand.Next(3) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 175); + Main.npc[newNPC].ai[0] = (float) index1; + Main.npc[newNPC].ai[1] = (float) index2; + Main.npc[newNPC].netUpdate = true; + } + else + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 153); + } + else if (tileType == 226 & flag4) + newNPC = Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 198) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 226); + else if (num24 == 86 && Main.rand.Next(8) != 0) + { + switch (Main.rand.Next(8)) + { + case 0: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 231); + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-56); + break; + } + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-57); + break; + } + break; + case 1: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 232); + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-58); + break; + } + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-59); + break; + } + break; + case 2: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 233); + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-60); + break; + } + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-61); + break; + } + break; + case 3: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 234); + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-62); + break; + } + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-63); + break; + } + break; + case 4: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 235); + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-64); + break; + } + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-65); + break; + } + break; + default: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 42); + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-16); + break; + } + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-17); + break; + } + break; + } + } + else if (tileType == 60 && (double) index2 > (Main.worldSurface + Main.rockLayer) / 2.0) + { + if (Main.rand.Next(4) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 204); + else if (Main.rand.Next(4) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 43); + Main.npc[newNPC].ai[0] = (float) index1; + Main.npc[newNPC].ai[1] = (float) index2; + Main.npc[newNPC].netUpdate = true; + } + else + { + switch (Main.rand.Next(8)) + { + case 0: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 231); + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-56); + break; + } + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-57); + break; + } + break; + case 1: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 232); + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-58); + break; + } + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-59); + break; + } + break; + case 2: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 233); + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-60); + break; + } + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-61); + break; + } + break; + case 3: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 234); + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-62); + break; + } + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-63); + break; + } + break; + case 4: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 235); + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-64); + break; + } + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-65); + break; + } + break; + default: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 42); + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-16); + break; + } + if (Main.rand.Next(4) == 0) + { + Main.npc[newNPC].SetDefaults(-17); + break; + } + break; + } + } + } + else if (tileType == 60 && Main.rand.Next(4) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 51); + else if (tileType == 60 && Main.rand.Next(8) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 56); + Main.npc[newNPC].ai[0] = (float) index1; + Main.npc[newNPC].ai[1] = (float) index2; + Main.npc[newNPC].netUpdate = true; + } + else if (Sandstorm.Happening && Main.player[index5].ZoneSandstorm && TileID.Sets.Conversion.Sand[tileType] && NPC.Spawning_SandstoneCheck(index1, index2)) + { + if (!NPC.downedBoss1 && !Main.hardMode) + newNPC = Main.rand.Next(2) != 0 ? (Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 69) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 61)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 546); + else if (Main.hardMode && Main.rand.Next(20) == 0 && !NPC.AnyNPCs(541)) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 541); + else if (Main.hardMode && !flag5 && Main.rand.Next(3) == 0 && NPC.CountNPCS(510) < 4) + newNPC = NPC.NewNPC(index1 * 16 + 8, (index2 + 10) * 16, 510); + else if (Main.hardMode && !flag5 && Main.rand.Next(2) == 0) + { + int Type6 = 542; + if (TileID.Sets.Corrupt[tileType]) + Type6 = 543; + if (TileID.Sets.Crimson[tileType]) + Type6 = 544; + if (TileID.Sets.Hallow[tileType]) + Type6 = 545; + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, Type6); + } + else + newNPC = !Main.hardMode || tileType != 53 || Main.rand.Next(3) != 0 ? (!Main.hardMode || tileType != 112 || Main.rand.Next(3) != 0 ? (!Main.hardMode || tileType != 234 || Main.rand.Next(3) != 0 ? (!Main.hardMode || tileType != 116 || Main.rand.Next(3) != 0 ? (Main.rand.Next(2) != 0 ? (Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 581) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 580)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 546)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 80)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 630)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 79)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 78); + } + else if (Main.hardMode && tileType == 53 && Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 78); + else if (Main.hardMode && tileType == 112 && Main.rand.Next(2) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 79); + else if (Main.hardMode && tileType == 234 && Main.rand.Next(2) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 630); + else if (Main.hardMode && tileType == 116 && Main.rand.Next(2) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 80); + else if (Main.hardMode && !flag7 && (double) index2 < Main.rockLayer && (tileType == 116 || tileType == 117 || tileType == 109 || tileType == 164)) + { + if (NPC.downedPlantBoss && !Main.dayTime && Main.time < 16200.0 && (double) index2 < Main.worldSurface && Main.rand.Next(10) == 0 && !NPC.AnyNPCs(661)) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 661); + else if ((double) Main.cloudAlpha > 0.0 && !NPC.AnyNPCs(244) && Main.rand.Next(12) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 244); + else + newNPC = Main.dayTime || Main.rand.Next(2) != 0 ? (Main.rand.Next(10) == 0 || Main.player[index5].ZoneWaterCandle && Main.rand.Next(10) == 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 86) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 75)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 122); + } + else if (!flag5 && Main.hardMode && Main.rand.Next(50) == 0 && !flag7 && (double) index2 >= Main.rockLayer && (tileType == 116 || tileType == 117 || tileType == 109 || tileType == 164)) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 84); + else if (tileType == 204 && Main.player[index5].ZoneCrimson || tileType == 199 || tileType == 200 || tileType == 203 || tileType == 234) + { + if (Main.hardMode && (double) index2 >= Main.rockLayer && Main.rand.Next(5) == 0 && !flag5) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 182); + else if (Main.hardMode && (double) index2 >= Main.rockLayer && Main.rand.Next(2) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 268); + else if (Main.hardMode && Main.rand.Next(3) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 183); + if (Main.rand.Next(3) == 0) + Main.npc[newNPC].SetDefaults(-24); + else if (Main.rand.Next(3) == 0) + Main.npc[newNPC].SetDefaults(-25); + } + else if (Main.hardMode && (double) index2 >= Main.rockLayer && Main.rand.Next(40) == 0 && !flag5) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 179); + else if (Main.hardMode && (Main.rand.Next(2) == 0 || (double) index2 > Main.worldSurface)) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 174); + else if (Main.tile[index1, index2].wall > (ushort) 0 && Main.rand.Next(4) != 0 || Main.rand.Next(8) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 239); + else if (Main.rand.Next(2) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 181); + } + else + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 173); + if (Main.rand.Next(3) == 0) + Main.npc[newNPC].SetDefaults(-22); + else if (Main.rand.Next(3) == 0) + Main.npc[newNPC].SetDefaults(-23); + } + } + else if (tileType == 22 && Main.player[index5].ZoneCorrupt || tileType == 23 || tileType == 25 || tileType == 112 || tileType == 163) + { + if (Main.hardMode && (double) index2 >= Main.rockLayer && Main.rand.Next(3) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 101); + Main.npc[newNPC].ai[0] = (float) index1; + Main.npc[newNPC].ai[1] = (float) index2; + Main.npc[newNPC].netUpdate = true; + } + else if (Main.hardMode && Main.rand.Next(3) == 0) + newNPC = Main.rand.Next(3) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 81) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 121); + else if (Main.hardMode && (double) index2 >= Main.rockLayer && Main.rand.Next(40) == 0 && !flag5) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 83); + else if (Main.hardMode && (Main.rand.Next(2) == 0 || (double) index2 > Main.rockLayer)) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 94); + } + else + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 6); + if (Main.rand.Next(3) == 0) + Main.npc[newNPC].SetDefaults(-11); + else if (Main.rand.Next(3) == 0) + Main.npc[newNPC].SetDefaults(-12); + } + } + else if ((double) index2 <= Main.worldSurface) + { + bool flag29 = (double) Math.Abs(index1 - Main.maxTilesX / 2) / (double) (Main.maxTilesX / 2) > 0.330000013113022; + if (flag29 && NPC.AnyDanger()) + flag29 = false; + if (Main.player[index5].ZoneGraveyard && !flag7 && (num1 == 2 || num1 == 477) && Main.rand.Next(10) == 0) + { + if (Main.rand.Next(2) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 606); + else + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 610); + } + else if (Main.player[index5].ZoneSnow && Main.hardMode && (double) Main.cloudAlpha > 0.0 && !NPC.AnyNPCs(243) && Main.player[index5].RollLuck(20) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 243); + else if (!Main.player[index5].ZoneSnow && Main.hardMode && (double) Main.cloudAlpha > 0.0 && NPC.CountNPCS(250) < 2 && Main.rand.Next(10) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 250); + else if (flag29 && Main.hardMode && NPC.downedGolemBoss && (!NPC.downedMartians && Main.rand.Next(100) == 0 || Main.rand.Next(400) == 0) && !NPC.AnyNPCs(399)) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 399); + else if (!Main.player[index5].ZoneGraveyard && Main.dayTime) + { + int num51 = Math.Abs(index1 - Main.spawnTileX); + if (!flag7 && num51 < Main.maxTilesX / 2 && Main.rand.Next(15) == 0 && (tileType == 2 || tileType == 477 || tileType == 109 || tileType == 492 || tileType == 147 || tileType == 161)) + { + if (tileType == 147 || tileType == 161) + { + if (Main.rand.Next(2) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 148); + else + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 149); + } + else if (!windyForButterflies && !Main.raining && Main.dayTime && Main.rand.Next(NPC.butterflyChance / 2) == 0 && (double) index2 <= Main.worldSurface) + { + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 444); + else + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 356); + if (Main.rand.Next(4) == 0) + NPC.NewNPC(index1 * 16 + 8 - 16, index2 * 16, 356); + if (Main.rand.Next(4) == 0) + NPC.NewNPC(index1 * 16 + 8 + 16, index2 * 16, 356); + } + else if (windyForButterflies && !Main.raining && Main.dayTime && Main.rand.Next(NPC.butterflyChance) == 0 && (double) index2 <= Main.worldSurface) + { + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 605); + else + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 604); + if (Main.rand.Next(3) != 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 604); + if (Main.rand.Next(2) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 604); + if (Main.rand.Next(3) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 604); + if (Main.rand.Next(4) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 604); + } + else if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 443); + else if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0 && (double) index2 <= Main.worldSurface) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 539); + else if (Main.halloween && Main.rand.Next(3) != 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 303); + else if (Main.xMas && Main.rand.Next(3) != 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 337); + else if (BirthdayParty.PartyIsUp && Main.rand.Next(3) != 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 540); + else if (Main.rand.Next(3) == 0 && (double) index2 <= Main.worldSurface) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, (int) Utils.SelectRandom(Main.rand, (short) 299, (short) 538)); + else + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 46); + } + else if (!flag7 && index1 > WorldGen.beachDistance && index1 < Main.maxTilesX - WorldGen.beachDistance && Main.rand.Next(12) == 0 && tileType == 53) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(366, 368)); + } + else + { + int cattailX; + int cattailY; + if ((tileType == 2 || tileType == 477 || tileType == 53) && !windyForButterflies && !Main.raining && Main.dayTime && Main.rand.Next(3) != 0 && (double) index2 <= Main.worldSurface && NPC.FindCattailTop(index1, index2, out cattailX, out cattailY)) + { + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(cattailX * 16 + 8, cattailY * 16, 601); + else + NPC.NewNPC(cattailX * 16 + 8, cattailY * 16, NPC.RollDragonflyType(tileType)); + if (Main.rand.Next(3) == 0) + NPC.NewNPC(cattailX * 16 + 8 - 16, cattailY * 16, NPC.RollDragonflyType(tileType)); + if (Main.rand.Next(3) == 0) + NPC.NewNPC(cattailX * 16 + 8 + 16, cattailY * 16, NPC.RollDragonflyType(tileType)); + } + else if (!flag7 && num51 < Main.maxTilesX / 3 && Main.dayTime && Main.time < 18000.0 && (tileType == 2 || tileType == 477 || tileType == 109 || tileType == 492) && Main.rand.Next(4) == 0 && (double) index2 <= Main.worldSurface && NPC.CountNPCS(74) + NPC.CountNPCS(297) + NPC.CountNPCS(298) < 6) + { + int num52 = Main.rand.Next(4); + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 442); + } + else + { + switch (num52) + { + case 0: + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 297); + break; + case 1: + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 298); + break; + default: + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 74); + break; + } + } + } + else if (!flag7 && num51 < Main.maxTilesX / 3 && Main.rand.Next(15) == 0 && (tileType == 2 || tileType == 477 || tileType == 109 || tileType == 492 || tileType == 147)) + { + int num53 = Main.rand.Next(4); + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + { + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 442); + } + else + { + switch (num53) + { + case 0: + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 297); + break; + case 1: + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 298); + break; + default: + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 74); + break; + } + } + } + else if (!flag7 && num51 > Main.maxTilesX / 3 && tileType == 2 && Main.rand.Next(300) == 0 && !NPC.AnyNPCs(50)) + NPC.SpawnOnPlayer(index5, 50); + else if (tileType == 53 && (index1 < WorldGen.beachDistance || index1 > Main.maxTilesX - WorldGen.beachDistance)) + { + if (!flag7 && Main.rand.Next(10) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 602); + else if (flag7) + { + int num54 = -1; + int num55 = -1; + if ((double) index2 < Main.worldSurface && index2 > 50) + { + for (int j = index2 - 1; j > index2 - 50; --j) + { + if (Main.tile[index1, j].liquid == (byte) 0 && !WorldGen.SolidTile(index1, j) && !WorldGen.SolidTile(index1, j + 1) && !WorldGen.SolidTile(index1, j + 2)) + { + num54 = j + 2; + if (!WorldGen.SolidTile(index1, num54 + 1) && !WorldGen.SolidTile(index1, num54 + 2)) + { + num55 = num54 + 2; + break; + } + break; + } + } + if (num54 > index2) + num54 = index2; + if (num55 > index2) + num55 = index2; + } + if (Main.rand.Next(10) == 0) + { + int num56 = Main.rand.Next(3); + if (num56 == 0 && num54 > 0) + NPC.NewNPC(index1 * 16 + 8, num54 * 16, 625); + else if (num56 == 1 && num55 > 0) + NPC.NewNPC(index1 * 16 + 8, num55 * 16, 615); + else if (num56 == 2 && num55 > 0) + { + if (Main.player[index5].RollLuck(NPC.goldCritterChance) == 0) + NPC.NewNPC(index1 * 16 + 8, num55 * 16, 627); + else + NPC.NewNPC(index1 * 16 + 8, num55 * 16, 626); + } + } + } + } + else if (!flag7 && tileType == 53 && Main.rand.Next(5) == 0 && NPC.Spawning_SandstoneCheck(index1, index2) && !flag7) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 69); + else if (tileType == 53 && !flag7) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 61); + else if (!flag7 && num51 > Main.maxTilesX / 3 && (Main.rand.Next(15) == 0 || !NPC.downedGoblins && WorldGen.shadowOrbSmashed && Main.rand.Next(7) == 0)) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 73); + else if (Main.raining && Main.rand.Next(4) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 224); + else if (!flag7 && Main.raining && Main.rand.Next(2) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 225); + else if (((flag7 ? 0 : (num24 == 0 ? 1 : 0)) & (itAhappyWindyDay ? 1 : 0) & (flag18 ? 1 : 0)) != 0 && Main.rand.Next(3) != 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 594); + else if (((flag7 || num24 != 0 ? 0 : (num1 == 2 ? 1 : (num1 == 477 ? 1 : 0))) & (itAhappyWindyDay ? 1 : 0) & (flag18 ? 1 : 0)) != 0 && Main.rand.Next(10) != 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 628); + else if (!flag7) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 1); + switch (tileType) + { + case 60: + Main.npc[newNPC].SetDefaults(-10); + break; + case 147: + case 161: + Main.npc[newNPC].SetDefaults(147); + break; + default: + if (Main.halloween && Main.rand.Next(3) != 0) + { + Main.npc[newNPC].SetDefaults(302); + break; + } + if (Main.xMas && Main.rand.Next(3) != 0) + { + Main.npc[newNPC].SetDefaults(Main.rand.Next(333, 337)); + break; + } + if (Main.rand.Next(3) == 0 || num51 < 200 && !Main.expertMode) + { + Main.npc[newNPC].SetDefaults(-3); + break; + } + if (Main.rand.Next(10) == 0 && (num51 > 400 || Main.expertMode)) + { + Main.npc[newNPC].SetDefaults(-7); + break; + } + break; + } + } + } + } + else + { + if (!Main.player[index5].ZoneGraveyard && !windyForButterflies && (tileType == 2 || tileType == 477 || tileType == 109 || tileType == 492) && !Main.raining && Main.rand.Next(NPC.fireFlyChance) == 0 && (double) index2 <= Main.worldSurface) + { + int Type7 = 355; + if (tileType == 109) + Type7 = 358; + NPC.NewNPC(index1 * 16 + 8, index2 * 16, Type7); + if (Main.rand.Next(NPC.fireFlyMultiple) == 0) + NPC.NewNPC(index1 * 16 + 8 - 16, index2 * 16, Type7); + if (Main.rand.Next(NPC.fireFlyMultiple) == 0) + NPC.NewNPC(index1 * 16 + 8 + 16, index2 * 16, Type7); + if (Main.rand.Next(NPC.fireFlyMultiple) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16 - 16, Type7); + if (Main.rand.Next(NPC.fireFlyMultiple) == 0) + NPC.NewNPC(index1 * 16 + 8, index2 * 16 + 16, Type7); + } + else if ((Main.halloween || Main.player[index5].ZoneGraveyard) && Main.rand.Next(12) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 301); + else if (Main.player[index5].ZoneGraveyard && Main.rand.Next(30) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 316); + else if (Main.rand.Next(6) == 0 || Main.moonPhase == 4 && Main.rand.Next(2) == 0) + { + if (Main.hardMode && Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 133); + else if (Main.halloween && Main.rand.Next(2) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(317, 319)); + else if (Main.rand.Next(2) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 2); + if (Main.rand.Next(4) == 0) + Main.npc[newNPC].SetDefaults(-43); + } + else + { + switch (Main.rand.Next(5)) + { + case 0: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 190); + if (Main.rand.Next(3) == 0) + { + Main.npc[newNPC].SetDefaults(-38); + break; + } + break; + case 1: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 191); + if (Main.rand.Next(3) == 0) + { + Main.npc[newNPC].SetDefaults(-39); + break; + } + break; + case 2: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 192); + if (Main.rand.Next(3) == 0) + { + Main.npc[newNPC].SetDefaults(-40); + break; + } + break; + case 3: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 193); + if (Main.rand.Next(3) == 0) + { + Main.npc[newNPC].SetDefaults(-41); + break; + } + break; + case 4: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 194); + if (Main.rand.Next(3) == 0) + { + Main.npc[newNPC].SetDefaults(-42); + break; + } + break; + } + } + } + else if (Main.hardMode && Main.rand.Next(50) == 0 && Main.bloodMoon && !NPC.AnyNPCs(109)) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 109); + else if (Main.rand.Next(250) == 0 && (Main.bloodMoon || Main.player[index5].ZoneGraveyard)) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 53); + else if (Main.rand.Next(250) == 0 && (Main.bloodMoon || Main.player[index5].ZoneGraveyard)) + NPC.NewNPC(index1 * 16 + 8, index2 * 16, 536); + else if (!Main.dayTime && Main.moonPhase == 0 && Main.hardMode && Main.rand.Next(3) != 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 104); + else if (!Main.dayTime && Main.hardMode && Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 140); + else if (Main.bloodMoon && Main.rand.Next(5) < 2) + newNPC = Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 490) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 489); + else if (num1 == 147 || num1 == 161 || num1 == 163 || num1 == 164 || num1 == 162) + newNPC = Main.player[index5].ZoneGraveyard || !Main.hardMode || Main.rand.Next(4) != 0 ? (Main.player[index5].ZoneGraveyard || !Main.hardMode || Main.rand.Next(3) != 0 ? (!Main.expertMode || Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 161) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 431)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 155)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 169); + else if (Main.raining && Main.rand.Next(2) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 223); + if (Main.rand.Next(3) == 0) + { + if (Main.rand.Next(2) == 0) + Main.npc[newNPC].SetDefaults(-54); + else + Main.npc[newNPC].SetDefaults(-55); + } + } + else + { + int num57 = Main.rand.Next(7); + int maxValue5 = 12; + int maxValue6 = 20; + if (Main.player[index5].statLifeMax <= 100) + { + maxValue5 = 5 - Main.CurrentFrameFlags.ActivePlayersCount / 2; + if (maxValue5 < 2) + maxValue5 = 2; + } + if (Main.player[index5].ZoneGraveyard && Main.rand.Next(maxValue6) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 632); + else if (Main.rand.Next(maxValue5) == 0) + newNPC = !Main.expertMode || Main.rand.Next(2) != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 590) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 591); + else if (Main.halloween && Main.rand.Next(2) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(319, 322)); + else if (Main.xMas && Main.rand.Next(2) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(331, 333)); + else if (num57 == 0 && Main.expertMode && Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 430); + else if (num57 == 2 && Main.expertMode && Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 432); + else if (num57 == 3 && Main.expertMode && Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 433); + else if (num57 == 4 && Main.expertMode && Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 434); + else if (num57 == 5 && Main.expertMode && Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 435); + else if (num57 == 6 && Main.expertMode && Main.rand.Next(3) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 436); + } + else + { + switch (num57) + { + case 0: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 3); + if (Main.rand.Next(3) == 0) + { + if (Main.rand.Next(2) == 0) + { + Main.npc[newNPC].SetDefaults(-26); + break; + } + Main.npc[newNPC].SetDefaults(-27); + break; + } + break; + case 1: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 132); + if (Main.rand.Next(3) == 0) + { + if (Main.rand.Next(2) == 0) + { + Main.npc[newNPC].SetDefaults(-28); + break; + } + Main.npc[newNPC].SetDefaults(-29); + break; + } + break; + case 2: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 186); + if (Main.rand.Next(3) == 0) + { + if (Main.rand.Next(2) == 0) + { + Main.npc[newNPC].SetDefaults(-30); + break; + } + Main.npc[newNPC].SetDefaults(-31); + break; + } + break; + case 3: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 187); + if (Main.rand.Next(3) == 0) + { + if (Main.rand.Next(2) == 0) + { + Main.npc[newNPC].SetDefaults(-32); + break; + } + Main.npc[newNPC].SetDefaults(-33); + break; + } + break; + case 4: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 188); + if (Main.rand.Next(3) == 0) + { + if (Main.rand.Next(2) == 0) + { + Main.npc[newNPC].SetDefaults(-34); + break; + } + Main.npc[newNPC].SetDefaults(-35); + break; + } + break; + case 5: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 189); + if (Main.rand.Next(3) == 0) + { + if (Main.rand.Next(2) == 0) + { + Main.npc[newNPC].SetDefaults(-36); + break; + } + Main.npc[newNPC].SetDefaults(-37); + break; + } + break; + case 6: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 200); + if (Main.rand.Next(3) == 0) + { + if (Main.rand.Next(2) == 0) + { + Main.npc[newNPC].SetDefaults(-44); + break; + } + Main.npc[newNPC].SetDefaults(-45); + break; + } + break; + } + } + } + if (Main.player[index5].ZoneGraveyard) + Main.npc[newNPC].target = index5; + } + } + else if ((double) index2 <= Main.rockLayer) + { + if (!flag5 && Main.rand.Next(50) == 0 && !Main.player[index5].ZoneSnow) + newNPC = !Main.hardMode ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 10, 1) : (Main.rand.Next(3) == 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 10, 1) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 95, 1)); + else if (Main.hardMode && Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 140); + else if (Main.hardMode && Main.rand.Next(4) != 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 141); + else if (tileType == 147 || tileType == 161 || Main.player[index5].ZoneSnow) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 147); + } + else + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 1); + if (Main.rand.Next(5) == 0) + Main.npc[newNPC].SetDefaults(-9); + else if (Main.rand.Next(2) == 0) + Main.npc[newNPC].SetDefaults(1); + else + Main.npc[newNPC].SetDefaults(-8); + } + } + else if (index2 > Main.maxTilesY - 190) + newNPC = !Main.hardMode || NPC.savedTaxCollector || Main.rand.Next(20) != 0 || NPC.AnyNPCs(534) ? (Main.rand.Next(8) != 0 ? (Main.rand.Next(40) != 0 || NPC.AnyNPCs(39) ? (Main.rand.Next(14) != 0 ? (Main.rand.Next(7) != 0 ? (Main.rand.Next(3) != 0 ? (!Main.hardMode || !NPC.downedMechBossAny || Main.rand.Next(5) == 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 60) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 151)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 59)) : (Main.rand.Next(10) != 0 ? (!Main.hardMode || !NPC.downedMechBossAny || Main.rand.Next(5) == 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 62) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 156)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 66))) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 24)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 39, 1)) : NPC.SpawnNPC_SpawnLavaBaitCritters(index1, index2)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 534); + else if (NPC.SpawnNPC_CheckToSpawnRockGolem(index1, index2, tileType, index5)) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 631); + else if (Main.rand.Next(60) == 0) + newNPC = !Main.player[index5].ZoneSnow ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 217) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 218); + else if ((tileType == 116 || tileType == 117 || tileType == 164) && Main.hardMode && !flag5 && Main.rand.Next(8) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 120); + else if ((num1 == 147 || num1 == 161 || num1 == 162 || num1 == 163 || num1 == 164 || num1 == 200) && !flag5 && Main.hardMode && Main.player[index5].ZoneCorrupt && Main.rand.Next(30) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 170); + else if ((num1 == 147 || num1 == 161 || num1 == 162 || num1 == 163 || num1 == 164 || num1 == 200) && !flag5 && Main.hardMode && Main.player[index5].ZoneHallow && Main.rand.Next(30) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 171); + else if ((num1 == 147 || num1 == 161 || num1 == 162 || num1 == 163 || num1 == 164 || num1 == 200) && !flag5 && Main.hardMode && Main.player[index5].ZoneCrimson && Main.rand.Next(30) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 180); + else if (Main.hardMode && Main.player[index5].ZoneSnow && Main.rand.Next(10) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 154); + else if (!flag5 && Main.rand.Next(100) == 0 && !Main.player[index5].ZoneHallow) + newNPC = !Main.hardMode ? (!Main.player[index5].ZoneSnow ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 10, 1) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 185)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 95, 1); + else if (Main.player[index5].ZoneSnow && Main.rand.Next(20) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 185); + else if (!Main.hardMode && Main.rand.Next(10) == 0 || Main.hardMode && Main.rand.Next(20) == 0) + { + if (Main.player[index5].ZoneSnow) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 184); + else if (Main.rand.Next(3) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 1); + Main.npc[newNPC].SetDefaults(-6); + } + else + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 16); + } + else if (!Main.hardMode && Main.rand.Next(4) == 0) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 1); + if (Main.player[index5].ZoneJungle) + Main.npc[newNPC].SetDefaults(-10); + else if (Main.player[index5].ZoneSnow) + Main.npc[newNPC].SetDefaults(184); + else + Main.npc[newNPC].SetDefaults(-6); + } + else if (Main.rand.Next(2) == 0) + { + if (Main.rand.Next(35) == 0 && NPC.CountNPCS(453) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 453); + else if (!Main.hardMode && Main.rand.Next(80) == 0 || Main.rand.Next(200) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 195); + else if (Main.hardMode && (double) index2 > (Main.rockLayer + (double) Main.maxTilesY) / 2.0 && Main.rand.Next(300) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 172); + else if ((double) index2 > (Main.rockLayer + (double) Main.maxTilesY) / 2.0 && (Main.rand.Next(200) == 0 || Main.rand.Next(50) == 0 && (Main.player[index5].armor[1].type == 4256 || Main.player[index5].armor[1].type >= 1282 && Main.player[index5].armor[1].type <= 1287) && Main.player[index5].armor[0].type != 238)) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 45); + else if (flag10 && Main.rand.Next(4) != 0) + newNPC = Main.rand.Next(6) == 0 || NPC.AnyNPCs(480) || !Main.hardMode ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 481) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 480); + else if (flag9 && Main.rand.Next(5) != 0) + newNPC = Main.rand.Next(6) == 0 || NPC.AnyNPCs(483) ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 482) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 483); + else if (Main.hardMode && Main.rand.Next(10) != 0) + { + if (Main.rand.Next(2) == 0) + { + if (Main.player[index5].ZoneSnow) + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 197); + } + else + { + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 77); + if ((double) index2 > (Main.rockLayer + (double) Main.maxTilesY) / 2.0 && Main.rand.Next(5) == 0) + Main.npc[newNPC].SetDefaults(-15); + } + } + else + newNPC = !Main.player[index5].ZoneSnow ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 110) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 206); + } + else if (!flag5 && (Main.halloween || Main.player[index5].ZoneGraveyard) && Main.rand.Next(30) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 316); + else if (Main.rand.Next(20) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 44); + else if (num1 == 147 || num1 == 161 || num1 == 162) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 167); + else if (Main.player[index5].ZoneSnow) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 185); + else if (Main.rand.Next(3) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, NPC.cavernMonsterType[Main.rand.Next(2), Main.rand.Next(3)]); + else if (Main.player[index5].ZoneGlowshroom && (num1 == 70 || num1 == 190)) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 635); + else if (Main.halloween && Main.rand.Next(2) == 0) + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, Main.rand.Next(322, 325)); + else if (Main.expertMode && Main.rand.Next(3) == 0) + { + int num58 = Main.rand.Next(4); + newNPC = num58 != 0 ? (num58 != 0 ? (num58 != 0 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 452) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 451)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 450)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 449); + } + else + { + switch (Main.rand.Next(4)) + { + case 0: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 21); + if (Main.rand.Next(3) == 0) + { + if (Main.rand.Next(2) == 0) + { + Main.npc[newNPC].SetDefaults(-47); + break; + } + Main.npc[newNPC].SetDefaults(-46); + break; + } + break; + case 1: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 201); + if (Main.rand.Next(3) == 0) + { + if (Main.rand.Next(2) == 0) + { + Main.npc[newNPC].SetDefaults(-49); + break; + } + Main.npc[newNPC].SetDefaults(-48); + break; + } + break; + case 2: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 202); + if (Main.rand.Next(3) == 0) + { + if (Main.rand.Next(2) == 0) + { + Main.npc[newNPC].SetDefaults(-51); + break; + } + Main.npc[newNPC].SetDefaults(-50); + break; + } + break; + case 3: + newNPC = NPC.NewNPC(index1 * 16 + 8, index2 * 16, 203); + if (Main.rand.Next(3) == 0) + { + if (Main.rand.Next(2) == 0) + { + Main.npc[newNPC].SetDefaults(-53); + break; + } + Main.npc[newNPC].SetDefaults(-52); + break; + } + break; + } + } + } + else + newNPC = !Main.hardMode || !(Main.player[index5].ZoneHallow & Main.rand.Next(2) == 0) ? (!Main.player[index5].ZoneJungle ? (!Main.player[index5].ZoneGlowshroom || num1 != 70 && num1 != 190 ? (!Main.hardMode || !Main.player[index5].ZoneHallow ? (!Main.hardMode || Main.rand.Next(6) <= 0 ? (num1 == 147 || num1 == 161 || num1 == 162 ? (!Main.hardMode ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 150) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 169)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 49)) : (Main.rand.Next(3) != 0 || num1 != 147 && num1 != 161 && num1 != 162 ? NPC.NewNPC(index1 * 16 + 8, index2 * 16, 93) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 150))) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 137)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 634)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 51)) : NPC.NewNPC(index1 * 16 + 8, index2 * 16, 138); + if (Main.npc[newNPC].type == 1 && Main.player[index5].RollLuck(180) == 0) + Main.npc[newNPC].SetDefaults(-4); + if (Main.netMode != 2 || newNPC >= 200) + break; + NetMessage.SendData(23, number: newNPC); + break; + } + } + } + } + } + } + + private static bool SpawnNPC_CheckToSpawnRockGolem( + int spawnTileX, + int spawnTileY, + int tileType, + int plr) + { + return Main.hardMode && (tileType == 1 || TileID.Sets.Conversion.Moss[tileType]) && !Main.player[plr].ZoneSnow && Main.rand.Next(30) == 0 && !WorldGen.SolidTile(spawnTileX - 1, spawnTileY - 4) && !WorldGen.SolidTile(spawnTileX, spawnTileY - 4) && !WorldGen.SolidTile(spawnTileX + 1, spawnTileY - 4); + } + + private static int SpawnNPC_SpawnLavaBaitCritters(int spawnTileX, int spawnTileY) + { + if (Main.rand.Next(3) == 0) + return NPC.NewNPC(spawnTileX * 16 + 8, spawnTileY * 16, 655); + if (Main.dayTime) + return NPC.NewNPC(spawnTileX * 16 + 8, spawnTileY * 16, 653); + if (Main.rand.Next(NPC.fireFlyMultiple) == 0) + NPC.NewNPC(spawnTileX * 16 + 8 - 16, spawnTileY * 16, 654); + if (Main.rand.Next(NPC.fireFlyMultiple) == 0) + NPC.NewNPC(spawnTileX * 16 + 8 + 16, spawnTileY * 16, 654); + if (Main.rand.Next(NPC.fireFlyMultiple) == 0) + NPC.NewNPC(spawnTileX * 16 + 8, spawnTileY * 16 - 16, 654); + if (Main.rand.Next(NPC.fireFlyMultiple) == 0) + NPC.NewNPC(spawnTileX * 16 + 8, spawnTileY * 16 + 16, 654); + return NPC.NewNPC(spawnTileX * 16 + 8, spawnTileY * 16, 654); + } + + private static int SpawnNPC_TryFindingProperGroundTileType(int spawnTileType, int x, int y) + { + if (!NPC.IsValidSpawningGroundTile(x, y)) + { + for (int y1 = y + 1; y1 < y + 30; ++y1) + { + if (NPC.IsValidSpawningGroundTile(x, y1)) + return (int) Main.tile[x, y1].type; + } + } + return spawnTileType; + } + + private static bool IsValidSpawningGroundTile(int x, int y) + { + Tile tile = Main.tile[x, y]; + return tile.nactive() && Main.tileSolid[(int) tile.type] && !Main.tileSolidTop[(int) tile.type] && !TileID.Sets.IsSkippedForNPCSpawningGroundTypeCheck[(int) tile.type]; + } + + public static bool FindCattailTop(int landX, int landY, out int cattailX, out int cattailY) + { + cattailX = landX; + cattailY = landY; + if (!WorldGen.InWorld(landX, landY, 31)) + return false; + int maxValue = 1; + for (int index1 = landX - 30; index1 <= landX + 30; ++index1) + { + for (int index2 = landY - 20; index2 <= landY + 20; ++index2) + { + Tile tile = Main.tile[index1, index2]; + if (tile != null && tile.active() && tile.type == (ushort) 519 && tile.frameX >= (short) 180 && Main.rand.Next(maxValue) == 0) + { + cattailX = index1; + cattailY = index2; + ++maxValue; + } + } + } + return cattailX != landX || cattailY != landY; + } + + public static bool FindTreeBranch( + int landX, + int landY, + out int treeBranchX, + out int treeBranchY) + { + treeBranchX = landX; + treeBranchY = landY; + if (!WorldGen.InWorld(landX, landY, 11)) + return false; + int maxValue = 1; + for (int index1 = landX - 10; index1 <= landX + 10; ++index1) + { + for (int index2 = landY - 30; index2 <= landY + 30; ++index2) + { + Tile tile = Main.tile[index1, index2]; + if (tile != null && tile.active() && TileID.Sets.IsATreeTrunk[(int) tile.type]) + { + int num1 = (int) tile.frameX / 22; + int num2 = (int) tile.frameY / 66; + if ((num1 == 3 && num2 == 0 || num1 == 3 && num2 == 3 || num1 == 4 && num2 == 1 || num1 == 4 && num2 == 3 || num1 == 2 && num2 == 3) && Main.rand.Next(maxValue) == 0) + { + treeBranchX = index1; + treeBranchY = index2; + ++maxValue; + } + } + } + } + return treeBranchX != landX || treeBranchY != landY; + } + + public static bool AnyDanger(bool quickBossNPCCheck = false) + { + bool flag = false; + if (NPC.MoonLordCountdown > 0) + flag = true; + if (Main.invasionType > 0) + flag = true; + if (Main.snowMoon || Main.pumpkinMoon || DD2Event.Ongoing) + flag = true; + if (!flag) + { + if (quickBossNPCCheck) + { + flag |= Main.CurrentFrameFlags.AnyActiveBossNPC; + } + else + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && (Main.npc[index].boss || NPCID.Sets.DangerThatPreventsOtherDangers[Main.npc[index].type])) + flag = true; + } + } + } + return flag; + } + + public static bool AnyoneNearCultists() + { + int firstNpc = NPC.FindFirstNPC(437); + if (firstNpc == -1) + return false; + Microsoft.Xna.Framework.Rectangle rectangle = Utils.CenteredRectangle(Main.npc[firstNpc].Center, new Vector2(2500f, 1500f)); + Microsoft.Xna.Framework.Rectangle r = new Microsoft.Xna.Framework.Rectangle(0, 0, 2500, 1500); + Vector2 vector2 = r.Size() / 2f; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active) + { + r.X = (int) Main.player[index].Center.X - (int) vector2.X; + r.Y = (int) Main.player[index].Center.Y - (int) vector2.Y; + if (rectangle.Intersects(r)) + return true; + } + } + return false; + } + + public static void SpawnWOF(Vector2 pos) + { + if ((double) pos.Y / 16.0 < (double) (Main.maxTilesY - 205) || Main.wofNPCIndex >= 0 || Main.netMode == 1 || NPC.AnyNPCs(113)) + return; + int closest = (int) Player.FindClosest(pos, 16, 16); + int num1 = 1; + if ((double) pos.X / 16.0 > (double) (Main.maxTilesX / 2)) + num1 = -1; + bool flag = false; + int x = (int) pos.X; + while (!flag) + { + flag = true; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && (double) Main.player[index].position.X > (double) (x - 1200) && (double) Main.player[index].position.X < (double) (x + 1200)) + { + x -= num1 * 16; + flag = false; + } + } + if (x / 16 < 20 || x / 16 > Main.maxTilesX - 20) + flag = true; + } + int y = (int) pos.Y; + int i = x / 16; + int num2 = y / 16; + int num3 = 0; + while (true) + { + try + { + if (!WorldGen.SolidTile(i, num2 - num3) && Main.tile[i, num2 - num3].liquid < (byte) 100) + { + num2 -= num3; + break; + } + if (!WorldGen.SolidTile(i, num2 + num3) && Main.tile[i, num2 + num3].liquid < (byte) 100) + { + num2 += num3; + break; + } + ++num3; + } + catch + { + break; + } + } + if (num2 < Main.maxTilesY - 180) + num2 = Main.maxTilesY - 180; + int Y = num2 * 16; + int index1 = NPC.NewNPC(x, Y, 113); + if (Main.netMode == 0) + { + Main.NewText(Language.GetTextValue("Announcement.HasAwoken", (object) Main.npc[index1].TypeName), (byte) 175, (byte) 75); + } + else + { + if (Main.netMode != 2) + return; + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasAwoken", (object) Main.npc[index1].GetTypeNetName()), new Color(175, 75, (int) byte.MaxValue)); + } + } + + public static void SpawnSkeletron() + { + bool flag1 = true; + bool flag2 = false; + Vector2 vector2 = Vector2.Zero; + int num1 = 0; + int num2 = 0; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 35) + { + flag1 = false; + break; + } + } + for (int number = 0; number < 200; ++number) + { + if (Main.npc[number].active) + { + if (Main.npc[number].type == 37) + { + flag2 = true; + Main.npc[number].ai[3] = 1f; + vector2 = Main.npc[number].position; + num1 = Main.npc[number].width; + num2 = Main.npc[number].height; + if (Main.netMode == 2) + NetMessage.SendData(23, number: number); + } + else if (Main.npc[number].type == 54) + { + flag2 = true; + vector2 = Main.npc[number].position; + num1 = Main.npc[number].width; + num2 = Main.npc[number].height; + } + } + } + if (!(flag1 & flag2)) + return; + int index1 = NPC.NewNPC((int) vector2.X + num1 / 2, (int) vector2.Y + num2 / 2, 35); + Main.npc[index1].netUpdate = true; + string npcNameValue = Lang.GetNPCNameValue(35); + if (Main.netMode == 0) + { + Main.NewText(Language.GetTextValue("Announcement.HasAwoken", (object) npcNameValue), (byte) 175, (byte) 75); + } + else + { + if (Main.netMode != 2) + return; + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasAwoken", (object) Lang.GetNPCName(35).ToNetworkText()), new Color(175, 75, (int) byte.MaxValue)); + } + } + + public static void SpawnOnPlayer(int plr, int Type) + { + if (Main.netMode == 1 || Type == 262 && NPC.AnyNPCs(262)) + return; + switch (Type) + { + case 245: + if (NPC.AnyNPCs(245)) + break; + try + { + int num1 = (int) Main.player[plr].Center.X / 16; + int num2 = (int) Main.player[plr].Center.Y / 16; + int i = 0; + int num3 = 0; + for (int index1 = num1 - 20; index1 < num1 + 20; ++index1) + { + for (int index2 = num2 - 20; index2 < num2 + 20; ++index2) + { + if (Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 237 && Main.tile[index1, index2].frameX == (short) 18 && Main.tile[index1, index2].frameY == (short) 0) + { + i = index1; + num3 = index2; + } + } + } + if (i <= 0 || num3 <= 0) + break; + int num4 = num3 - 15; + int num5 = num3 - 15; + for (int j = num3; j > num3 - 50; --j) + { + if (WorldGen.SolidTile(i, j)) + { + num4 = j; + break; + } + } + for (int j = num3; j < num3 + 50; ++j) + { + if (WorldGen.SolidTile(i, j)) + { + num5 = j; + break; + } + } + int num6 = (num4 + num4 + num5) / 3; + int index = NPC.NewNPC(i * 16 + 8, num6 * 16, 245, 100); + Main.npc[index].target = plr; + string typeName = Main.npc[index].TypeName; + if (Main.netMode == 0) + { + Main.NewText(Language.GetTextValue("Announcement.HasAwoken", (object) typeName), (byte) 175, (byte) 75); + break; + } + if (Main.netMode != 2) + break; + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasAwoken", (object) Main.npc[index].GetTypeNetName()), new Color(175, 75, (int) byte.MaxValue)); + break; + } + catch + { + break; + } + case 370: + Player player1 = Main.player[plr]; + if (!player1.active || player1.dead) + break; + for (int index3 = 0; index3 < 1000; ++index3) + { + Projectile projectile = Main.projectile[index3]; + if (projectile.active && projectile.bobber && projectile.owner == plr) + { + int index4 = NPC.NewNPC((int) projectile.Center.X, (int) projectile.Center.Y + 100, 370); + string typeName = Main.npc[index4].TypeName; + if (Main.netMode == 0) + { + Main.NewText(Language.GetTextValue("Announcement.HasAwoken", (object) typeName), (byte) 175, (byte) 75); + break; + } + if (Main.netMode != 2) + break; + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasAwoken", (object) Main.npc[index4].GetTypeNetName()), new Color(175, 75, (int) byte.MaxValue)); + break; + } + } + break; + case 398: + if (NPC.AnyNPCs(Type)) + break; + Player player2 = Main.player[plr]; + NPC.NewNPC((int) player2.Center.X, (int) player2.Center.Y - 150, Type); + if (Main.netMode == 0) + { + Main.NewText(Language.GetTextValue("Announcement.HasAwoken", (object) Language.GetTextValue("Enemies.MoonLord")), (byte) 175, (byte) 75); + break; + } + if (Main.netMode != 2) + break; + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasAwoken", (object) NetworkText.FromKey("Enemies.MoonLord")), new Color(175, 75, (int) byte.MaxValue)); + break; + default: + bool flag = false; + int num7 = 0; + int num8 = 0; + int minValue1 = (int) ((double) Main.player[plr].position.X / 16.0) - NPC.spawnRangeX * 2; + int maxValue1 = (int) ((double) Main.player[plr].position.X / 16.0) + NPC.spawnRangeX * 2; + int minValue2 = (int) ((double) Main.player[plr].position.Y / 16.0) - NPC.spawnRangeY * 2; + int maxValue2 = (int) ((double) Main.player[plr].position.Y / 16.0) + NPC.spawnRangeY * 2; + int num9 = (int) ((double) Main.player[plr].position.X / 16.0) - NPC.safeRangeX; + int num10 = (int) ((double) Main.player[plr].position.X / 16.0) + NPC.safeRangeX; + int num11 = (int) ((double) Main.player[plr].position.Y / 16.0) - NPC.safeRangeY; + int num12 = (int) ((double) Main.player[plr].position.Y / 16.0) + NPC.safeRangeY; + if (minValue1 < 0) + minValue1 = 0; + if (maxValue1 > Main.maxTilesX) + maxValue1 = Main.maxTilesX; + if (minValue2 < 0) + minValue2 = 0; + if (maxValue2 > Main.maxTilesY) + maxValue2 = Main.maxTilesY; + for (int index5 = 0; index5 < 1000; ++index5) + { + for (int index6 = 0; index6 < 100; ++index6) + { + int index7 = Main.rand.Next(minValue1, maxValue1); + int index8 = Main.rand.Next(minValue2, maxValue2); + if (!Main.tile[index7, index8].nactive() || !Main.tileSolid[(int) Main.tile[index7, index8].type]) + { + if ((!Main.wallHouse[(int) Main.tile[index7, index8].wall] || index5 >= 999) && (Type != 50 || index5 >= 500 || Main.tile[index8, index8].wall <= (ushort) 0)) + { + for (int index9 = index8; index9 < Main.maxTilesY; ++index9) + { + if (Main.tile[index7, index9].nactive() && Main.tileSolid[(int) Main.tile[index7, index9].type]) + { + if (index7 < num9 || index7 > num10 || index9 < num11 || index9 > num12 || index5 == 999) + { + int type = (int) Main.tile[index7, index9].type; + num7 = index7; + num8 = index9; + flag = true; + break; + } + break; + } + } + if (flag && Type == 50 && index5 < 900) + { + int num13 = 20; + if (!Collision.CanHit(new Vector2((float) num7, (float) (num8 - 1)) * 16f, 16, 16, new Vector2((float) num7, (float) (num8 - 1 - num13)) * 16f, 16, 16) || !Collision.CanHit(new Vector2((float) num7, (float) (num8 - 1 - num13)) * 16f, 16, 16, Main.player[plr].Center, 0, 0)) + { + num7 = 0; + num8 = 0; + flag = false; + } + } + if (flag && index5 < 999) + { + int num14 = num7 - NPC.spawnSpaceX / 2; + int num15 = num7 + NPC.spawnSpaceX / 2; + int num16 = num8 - NPC.spawnSpaceY; + int num17 = num8; + if (num14 < 0) + flag = false; + if (num15 > Main.maxTilesX) + flag = false; + if (num16 < 0) + flag = false; + if (num17 > Main.maxTilesY) + flag = false; + if (flag) + { + for (int index10 = num14; index10 < num15; ++index10) + { + for (int index11 = num16; index11 < num17; ++index11) + { + if (Main.tile[index10, index11].nactive() && Main.tileSolid[(int) Main.tile[index10, index11].type]) + { + flag = false; + break; + } + } + } + } + } + } + else + continue; + } + if (flag || flag) + break; + } + if (flag && index5 < 999) + { + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle(num7 * 16, num8 * 16, 16, 16); + for (int index12 = 0; index12 < (int) byte.MaxValue; ++index12) + { + if (Main.player[index12].active) + { + Microsoft.Xna.Framework.Rectangle rectangle2 = new Microsoft.Xna.Framework.Rectangle((int) ((double) Main.player[index12].position.X + (double) (Main.player[index12].width / 2) - (double) (NPC.sWidth / 2) - (double) NPC.safeRangeX), (int) ((double) Main.player[index12].position.Y + (double) (Main.player[index12].height / 2) - (double) (NPC.sHeight / 2) - (double) NPC.safeRangeY), NPC.sWidth + NPC.safeRangeX * 2, NPC.sHeight + NPC.safeRangeY * 2); + if (rectangle1.Intersects(rectangle2)) + flag = false; + } + } + } + if (flag) + break; + } + if (!flag) + break; + NPC.SpawnBoss(num7 * 16 + 8, num8 * 16, Type, plr); + break; + } + } + + public static void SpawnBoss( + int spawnPositionX, + int spawnPositionY, + int Type, + int targetPlayerIndex) + { + int number = NPC.NewNPC(spawnPositionX, spawnPositionY, Type, 1); + if (number == 200) + return; + Main.npc[number].target = targetPlayerIndex; + Main.npc[number].timeLeft *= 20; + string typeName = Main.npc[number].TypeName; + if (Main.netMode == 2 && number < 200) + NetMessage.SendData(23, number: number); + if (Type == 134 || Type == (int) sbyte.MaxValue || Type == 126 || Type == 125) + AchievementsHelper.CheckMechaMayhem(); + if (Type == 125) + { + if (Main.netMode == 0) + { + Main.NewText(Lang.misc[48].Value, (byte) 175, (byte) 75); + } + else + { + if (Main.netMode != 2) + return; + ChatHelper.BroadcastChatMessage(Lang.misc[48].ToNetworkText(), new Color(175, 75, (int) byte.MaxValue)); + } + } + else + { + if (Type == 316 || Type == 662 || Type == 82 || Type == 126 || Type == 50 || Type == 398 || Type == 551) + return; + if (Main.netMode == 0) + { + Main.NewText(Language.GetTextValue("Announcement.HasAwoken", (object) typeName), (byte) 175, (byte) 75); + } + else + { + if (Main.netMode != 2) + return; + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasAwoken", (object) Main.npc[number].GetTypeNetName()), new Color(175, 75, (int) byte.MaxValue)); + } + } + } + + public static int NewNPC( + int X, + int Y, + int Type, + int Start = 0, + float ai0 = 0.0f, + float ai1 = 0.0f, + float ai2 = 0.0f, + float ai3 = 0.0f, + int Target = 255) + { + if (Main.getGoodWorld) + { + if (Type == 46) + Type = 614; + if (Type == 62) + Type = 66; + } + int nextNPC = -1; + if (Type == 222) + { + for (int index = 199; index >= 0; --index) + { + if (!Main.npc[index].active) + { + nextNPC = index; + break; + } + } + } + else + { + for (int index = Start; index < 200; ++index) + { + if (!Main.npc[index].active) + { + nextNPC = index; + break; + } + } + } + if (nextNPC < 0) + return 200; + Main.npc[nextNPC] = new NPC(); + Main.npc[nextNPC].SetDefaults(Type); + Main.npc[nextNPC].whoAmI = nextNPC; + NPC.GiveTownUniqueDataToNPCsThatNeedIt(Type, nextNPC); + Main.npc[nextNPC].position.X = (float) (X - Main.npc[nextNPC].width / 2); + Main.npc[nextNPC].position.Y = (float) (Y - Main.npc[nextNPC].height); + Main.npc[nextNPC].active = true; + Main.npc[nextNPC].timeLeft = (int) ((double) NPC.activeTime * 1.25); + Main.npc[nextNPC].wet = Collision.WetCollision(Main.npc[nextNPC].position, Main.npc[nextNPC].width, Main.npc[nextNPC].height); + Main.npc[nextNPC].ai[0] = ai0; + Main.npc[nextNPC].ai[1] = ai1; + Main.npc[nextNPC].ai[2] = ai2; + Main.npc[nextNPC].ai[3] = ai3; + Main.npc[nextNPC].target = Target; + if (Type == 50) + { + switch (Main.netMode) + { + case 0: + Main.NewText(Language.GetTextValue("Announcement.HasAwoken", (object) Main.npc[nextNPC].TypeName), (byte) 175, (byte) 75); + break; + case 2: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasAwoken", (object) Main.npc[nextNPC].GetTypeNetName()), new Color(175, 75, (int) byte.MaxValue)); + break; + } + } + return nextNPC; + } + + private static void GiveTownUniqueDataToNPCsThatNeedIt(int Type, int nextNPC) + { + if (NPC.TypeToDefaultHeadIndex(Type) == -1 && Type != 453) + return; + Main.npc[nextNPC].GivenName = NPC.getNewNPCName(Type); + ITownNPCProfile profile; + if (TownNPCProfiles.Instance.GetProfile(Type, out profile)) + { + Main.npc[nextNPC].townNpcVariationIndex = profile.RollVariation(); + Main.npc[nextNPC].GivenName = profile.GetNameForVariant(Main.npc[nextNPC]); + } + Main.npc[nextNPC].needsUniqueInfoUpdate = true; + } + + public void TransformVisuals(int oldType, int newType) + { + this.position = this.position + this.netOffset; + if (oldType == 158 && newType == 159 || oldType == 159 && newType == 158) + { + SoundEngine.PlaySound(SoundID.Item8, this.position); + int index1 = Gore.NewGore(new Vector2(this.position.X, this.position.Y - 10f), this.velocity, 99, this.scale); + Main.gore[index1].velocity *= 0.3f; + int index2 = Gore.NewGore(new Vector2(this.position.X, (float) ((double) this.position.Y + (double) (this.height / 2) - 10.0)), this.velocity, 99, this.scale); + Main.gore[index2].velocity *= 0.3f; + int index3 = Gore.NewGore(new Vector2(this.position.X, (float) ((double) this.position.Y + (double) this.height - 10.0)), this.velocity, 99, this.scale); + Main.gore[index3].velocity *= 0.3f; + } + else if (oldType == 478 && newType == 479) + { + for (int index4 = 0; index4 < 30; ++index4) + { + int index5 = Dust.NewDust(this.position, this.width, this.height, 238, SpeedY: -2f); + if (Main.rand.Next(2) == 0) + Main.dust[index5].noGravity = true; + } + Gore.NewGore(this.position, this.velocity, 684, this.scale); + Gore.NewGore(this.position, this.velocity, 685, this.scale); + Gore.NewGore(this.position, this.velocity, 686, this.scale); + Gore.NewGore(this.position, this.velocity, 684 + Main.rand.Next(3), this.scale); + } + else if (oldType == 406 && newType == 405) + { + float num1 = (float) Main.rand.Next(10, 21); + float num2 = 6.283185f * Main.rand.NextFloat(); + Vector2 vector2_1 = new Vector2(22f, 22f); + for (float num3 = 0.0f; (double) num3 < (double) num1; ++num3) + { + Dust dust = Main.dust[Dust.NewDust(this.Center, 0, 0, 229)]; + Vector2 vector2_2 = Vector2.UnitY.RotatedBy((double) num3 * 6.28318548202515 / (double) num1 + (double) num2); + dust.position = this.Center + vector2_2 * vector2_1 / 2f; + dust.velocity = vector2_2; + dust.noGravity = true; + dust.scale = (float) (0.600000023841858 + (double) Main.rand.NextFloat() * 1.79999995231628); + dust.velocity *= dust.scale; + dust.fadeIn = Main.rand.NextFloat() * 2f; + } + } + if (oldType == 428 && newType == 427) + { + for (int index = 0; index < 20; ++index) + { + int Type = Utils.SelectRandom(Main.rand, 229, 240); + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, Type)]; + dust.noGravity = true; + dust.scale = (float) (0.600000023841858 + (double) Main.rand.NextFloat() * 1.79999995231628); + dust.fadeIn = 0.25f; + dust.velocity *= dust.scale / 2f; + } + } + if (oldType == 427 && newType == 426) + { + for (int index = 0; index < 30; ++index) + { + int Type = Utils.SelectRandom(Main.rand, 229, 240, 240); + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, Type)]; + dust.noGravity = true; + dust.scale = (float) (0.600000023841858 + (double) Main.rand.NextFloat() * 1.79999995231628); + dust.fadeIn = 0.25f; + dust.velocity *= dust.scale * 0.75f; + } + } + this.position = this.position - this.netOffset; + } + + public void Teleport(Vector2 newPos, int Style = 0, int extraInfo = 0) + { + int extraInfo1 = 0; + if (Style == 4) + extraInfo1 = this.lastPortalColorIndex; + float dustCountMult = (double) this.teleportTime > 0.0 ? 0.3f : 1f; + Vector2 position = this.position; + Main.TeleportEffect(this.getRect(), Style, extraInfo1, dustCountMult, otherPosition: newPos); + this.position = newPos; + if (Style == 4) + { + this.lastPortalColorIndex = extraInfo; + extraInfo1 = this.lastPortalColorIndex; + } + Main.TeleportEffect(this.getRect(), Style, extraInfo1, dustCountMult, TeleportationSide.Exit, position); + this.teleportTime = 1f; + this.teleportStyle = Style; + if (Main.netMode != 2 || Style == 4) + return; + NetMessage.SendData(65, number: 1, number2: ((float) this.whoAmI), number3: newPos.X, number4: newPos.Y, number5: Style); + } + + public void Transform(int newType) + { + if (Main.netMode == 1) + return; + int extraValue = this.extraValue; + bool flag = false; + if ((double) this.value == 0.0) + flag = true; + int[] numArray1 = new int[5]; + int[] numArray2 = new int[5]; + for (int index = 0; index < 5; ++index) + { + numArray1[index] = this.buffType[index]; + numArray2[index] = this.buffTime[index]; + } + int height = this.height; + int type = this.type; + int life = this.life; + int lifeMax = this.lifeMax; + Vector2 velocity = this.velocity; + this.position.Y += (float) this.height; + int spriteDirection = this.spriteDirection; + bool spawnedFromStatue = this.SpawnedFromStatue; + this.SetDefaults(newType); + this.SpawnedFromStatue = spawnedFromStatue; + this.spriteDirection = spriteDirection; + this.TargetClosest(); + this.velocity = velocity; + this.position.Y -= (float) this.height; + for (int index = 0; index < 5; ++index) + { + this.buffType[index] = numArray1[index]; + this.buffTime[index] = numArray2[index]; + } + if (flag) + this.value = 0.0f; + if (this.lifeMax == lifeMax) + this.life = life; + if (newType == 107 || newType == 108) + { + this.homeTileX = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + this.homeTileY = (int) ((double) this.position.Y + (double) this.height) / 16; + this.homeless = true; + } + this.extraValue = extraValue; + if (Main.netMode == 2) + { + this.netUpdate = true; + NetMessage.SendData(23, number: this.whoAmI); + NetMessage.SendData(54, number: this.whoAmI); + } + this.TransformVisuals(type, newType); + NPC.GiveTownUniqueDataToNPCsThatNeedIt(this.type, this.whoAmI); + if (this.townNPC) + { + this.homeless = true; + WorldGen.CheckAchievement_RealEstate(); + } + this.altTexture = 0; + } + + public int checkArmorPenetration(int armorPenetration) + { + if (armorPenetration <= 0) + return 0; + return armorPenetration > this.defense && this.defense >= 0 ? this.defense / 2 : armorPenetration / 2; + } + + public double StrikeNPCNoInteraction( + int Damage, + float knockBack, + int hitDirection, + bool crit = false, + bool noEffect = false, + bool fromNet = false) + { + if (Main.netMode == 0) + ++NPC.ignorePlayerInteractions; + return this.StrikeNPC(Damage, knockBack, hitDirection, crit, noEffect, fromNet); + } + + public double StrikeNPC( + int Damage, + float knockBack, + int hitDirection, + bool crit = false, + bool noEffect = false, + bool fromNet = false) + { + bool flag = Main.netMode == 0; + if (flag && NPC.ignorePlayerInteractions > 0) + { + --NPC.ignorePlayerInteractions; + flag = false; + } + if (!this.active || this.life <= 0) + return 0.0; + double num1 = (double) Damage; + int Defense = this.defense; + if (this.ichor) + Defense -= 20; + if (this.betsysCurse) + Defense -= 40; + if (Defense < 0) + Defense = 0; + double dmg = Main.CalculateDamageNPCsTake((int) num1, Defense); + if (crit) + dmg *= 2.0; + if ((double) this.takenDamageMultiplier > 1.0) + dmg *= (double) this.takenDamageMultiplier; + if (((double) this.takenDamageMultiplier > 1.0 || Damage != 9999) && this.lifeMax > 1) + { + if (this.friendly) + { + CombatText.NewText(new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height), crit ? CombatText.DamagedFriendlyCrit : CombatText.DamagedFriendly, (int) dmg, crit); + } + else + { + Color color = crit ? CombatText.DamagedHostileCrit : CombatText.DamagedHostile; + if (fromNet) + color = crit ? CombatText.OthersDamagedHostileCrit : CombatText.OthersDamagedHostile; + CombatText.NewText(new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height), color, (int) dmg, crit); + } + } + if (dmg < 1.0) + return 0.0; + if (flag) + this.PlayerInteraction(Main.myPlayer); + this.justHit = true; + if ((this.type == 438 || this.type == 379) && Main.netMode != 1) + { + int index = (int) (-(double) this.ai[3] - 1.0); + if (index > -1 && (double) Main.npc[index].localAI[0] == 0.0) + Main.npc[index].localAI[0] = 1f; + } + if (this.townNPC) + { + if ((this.aiStyle != 7 ? 0 : ((double) this.ai[0] == 3.0 || (double) this.ai[0] == 4.0 || (double) this.ai[0] == 16.0 ? 1 : ((double) this.ai[0] == 17.0 ? 1 : 0))) != 0) + { + NPC npc = Main.npc[(int) this.ai[2]]; + if (npc.active) + { + npc.ai[0] = 1f; + npc.ai[1] = (float) (300 + Main.rand.Next(300)); + npc.ai[2] = 0.0f; + npc.localAI[3] = 0.0f; + npc.direction = hitDirection; + npc.netUpdate = true; + } + } + this.ai[0] = 1f; + this.ai[1] = (float) (300 + Main.rand.Next(300)); + this.ai[2] = 0.0f; + this.localAI[3] = 0.0f; + this.direction = hitDirection; + this.netUpdate = true; + } + if (this.aiStyle == 8 && Main.netMode != 1) + { + if (this.type == 172) + this.ai[0] = 450f; + else if (this.type == 283 || this.type == 284) + { + if (Main.rand.Next(2) == 0) + { + this.ai[0] = 390f; + this.netUpdate = true; + } + } + else if (this.type == 533) + { + if (Main.rand.Next(3) != 0) + { + this.ai[0] = 181f; + this.netUpdate = true; + } + } + else + this.ai[0] = 400f; + this.TargetClosest(); + } + if (this.aiStyle == 97 && Main.netMode != 1) + { + this.localAI[1] = 1f; + this.TargetClosest(); + } + if (this.type == 371) + { + dmg = 0.0; + this.ai[0] = 1f; + this.ai[1] = 4f; + this.dontTakeDamage = true; + } + if (this.type == 346 && (double) this.life >= (double) this.lifeMax * 0.5 && (double) this.life - dmg < (double) this.lifeMax * 0.5) + Gore.NewGore(this.position, this.velocity, 517); + if (this.type == 184) + this.localAI[0] = 60f; + if (this.type == 535) + this.localAI[0] = 60f; + if (this.type == 185) + this.localAI[0] = 1f; + if (!this.immortal) + { + if (this.realLife >= 0) + { + Main.npc[this.realLife].life -= (int) dmg; + this.life = Main.npc[this.realLife].life; + this.lifeMax = Main.npc[this.realLife].lifeMax; + } + else + this.life -= (int) dmg; + } + if ((double) knockBack > 0.0 && (double) this.knockBackResist > 0.0) + { + float num2 = knockBack * this.knockBackResist; + if (this.onFire2) + num2 *= 1.1f; + if ((double) num2 > 8.0) + num2 = 8f + (num2 - 8f) * 0.9f; + if ((double) num2 > 10.0) + num2 = 10f + (num2 - 10f) * 0.8f; + if ((double) num2 > 12.0) + num2 = 12f + (num2 - 12f) * 0.7f; + if ((double) num2 > 14.0) + num2 = 14f + (num2 - 14f) * 0.6f; + if ((double) num2 > 16.0) + num2 = 16f; + if (crit) + num2 *= 1.4f; + int num3 = (int) dmg * 10; + if (Main.expertMode) + num3 = (int) dmg * 15; + if (num3 > this.lifeMax) + { + if (hitDirection < 0 && (double) this.velocity.X > -(double) num2) + { + if ((double) this.velocity.X > 0.0) + this.velocity.X -= num2; + this.velocity.X -= num2; + if ((double) this.velocity.X < -(double) num2) + this.velocity.X = -num2; + } + else if (hitDirection > 0 && (double) this.velocity.X < (double) num2) + { + if ((double) this.velocity.X < 0.0) + this.velocity.X += num2; + this.velocity.X += num2; + if ((double) this.velocity.X > (double) num2) + this.velocity.X = num2; + } + if (this.type == 185) + num2 *= 1.5f; + float num4 = this.noGravity ? num2 * -0.5f : num2 * -0.75f; + if ((double) this.velocity.Y > (double) num4) + { + this.velocity.Y += num4; + if ((double) this.velocity.Y < (double) num4) + this.velocity.Y = num4; + } + } + else + { + if (!this.noGravity) + this.velocity.Y = (float) (-(double) num2 * 0.75) * this.knockBackResist; + else + this.velocity.Y = (float) (-(double) num2 * 0.5) * this.knockBackResist; + this.velocity.X = num2 * (float) hitDirection * this.knockBackResist; + } + } + if ((this.type == 113 || this.type == 114) && this.life <= 0) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && (Main.npc[index].type == 113 || Main.npc[index].type == 114)) + Main.npc[index].HitEffect(hitDirection, dmg); + } + } + else + this.HitEffect(hitDirection, dmg); + if (this.HitSound != null) + SoundEngine.PlaySound(this.HitSound, this.position); + if (this.realLife >= 0) + Main.npc[this.realLife].checkDead(); + else + this.checkDead(); + return dmg; + } + + public static void LadyBugKilled(Vector2 Position, bool GoldLadyBug = false) + { + Main.ladyBugRainBoost += NPC.ladyBugRainTime; + int player = Main.myPlayer; + if (!Main.player[player].active || Main.player[player].dead) + return; + Vector2 vector2 = Position - Main.player[player].Center; + int num1 = 400; + if ((double) vector2.Length() >= (double) num1) + return; + if ((double) vector2.Length() < 100.0) + vector2 = new Vector2(); + double num2 = 1.0 - (double) vector2.Length() / (double) num1; + int num3 = (int) ((double) NPC.ladyBugBadLuckTime * num2); + if (GoldLadyBug) + num3 *= 2; + if (num3 >= Main.player[player].ladyBugLuckTimeLeft) + return; + Main.player[player].ladyBugLuckTimeLeft = num3; + Main.player[player].luckNeedsSync = true; + } + + private void LadyBugLuck(int plr, bool GoldLadyBug = false) + { + if (this.releaseOwner != (short) byte.MaxValue || Main.player[plr].ladyBugLuckTimeLeft < 0) + return; + Vector2 vector2 = this.Center - Main.player[plr].Center; + int num1 = 800; + if ((double) vector2.Length() >= (double) num1) + return; + if ((double) vector2.Length() < 30.0) + vector2 = new Vector2(); + double num2 = Math.Pow(1.0 - (double) vector2.Length() / (double) num1, 6.0); + int num3 = (int) ((double) NPC.ladyBugGoodLuckTime * num2); + if (GoldLadyBug) + num3 *= 2; + if (num3 <= Main.player[plr].ladyBugLuckTimeLeft) + return; + Main.player[plr].ladyBugLuckTimeLeft = num3; + Main.player[plr].luckNeedsSync = true; + } + + private void NPCLuck() + { + int player = Main.myPlayer; + if (this.type == 22) + { + if (Main.player[player].ladyBugLuckTimeLeft < 0 || !Main.player[player].active || Main.player[player].dead) + return; + int num = NPC.ladyBugGoodLuckTime / 3; + if (num <= Main.player[player].ladyBugLuckTimeLeft) + return; + Main.player[player].ladyBugLuckTimeLeft = num; + Main.player[player].luckNeedsSync = true; + } + else + { + if (this.type == 54 || !Main.player[player].active || Main.player[player].dead) + return; + int num = NPC.ladyBugBadLuckTime / 3; + if (num >= Main.player[player].ladyBugLuckTimeLeft) + return; + Main.player[player].ladyBugLuckTimeLeft = num; + Main.player[player].luckNeedsSync = true; + } + } + + public void HitEffect(int hitDirection = 0, double dmg = 10.0) + { + // ISSUE: The method is too long to display (53918 instructions) + } + + public static int CountNPCS(int Type) + { + int num = 0; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == Type) + ++num; + } + return num; + } + + public static bool AnyHelpfulFairies() + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && (Main.npc[index].type == 583 || Main.npc[index].type == 584 || Main.npc[index].type == 585) && (double) Main.npc[index].ai[2] > 1.0) + return true; + } + return false; + } + + public static bool AnyNPCs(int Type) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == Type) + return true; + } + return false; + } + + public static int FindFirstNPC(int Type) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == Type) + return index; + } + return -1; + } + + public static bool NearSpikeBall(int x, int y) + { + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle(x * 16 - 300, y * 16 - 300, 600, 600); + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].aiStyle == 20) + { + Microsoft.Xna.Framework.Rectangle rectangle2 = new Microsoft.Xna.Framework.Rectangle((int) Main.npc[index].ai[1], (int) Main.npc[index].ai[2], 20, 20); + if (rectangle1.Intersects(rectangle2)) + return true; + } + } + return false; + } + + public int FindBuffIndex(int type) + { + if (this.buffImmune[type]) + return -1; + for (int index = 0; index < 5; ++index) + { + if (this.buffTime[index] >= 1 && this.buffType[index] == type) + return index; + } + return -1; + } + + public void AddBuff(int type, int time, bool quiet = false) + { + if (this.buffImmune[type]) + return; + if (!quiet) + { + switch (Main.netMode) + { + case 1: + NetMessage.SendData(53, number: this.whoAmI, number2: ((float) type), number3: ((float) time)); + break; + case 2: + NetMessage.SendData(54, number: this.whoAmI); + break; + } + } + int index1 = -1; + for (int index2 = 0; index2 < 5; ++index2) + { + if (this.buffType[index2] == type) + { + if (this.buffTime[index2] >= time) + return; + this.buffTime[index2] = time; + return; + } + } + while (index1 == -1) + { + int buffIndex = -1; + for (int index3 = 0; index3 < 5; ++index3) + { + if (!Main.debuff[this.buffType[index3]]) + { + buffIndex = index3; + break; + } + } + if (buffIndex == -1) + return; + for (int index4 = buffIndex; index4 < 5; ++index4) + { + if (this.buffType[index4] == 0) + { + index1 = index4; + break; + } + } + if (index1 == -1) + this.DelBuff(buffIndex); + } + this.buffType[index1] = type; + this.buffTime[index1] = time; + } + + public void RequestBuffRemoval(int buffTypeToRemove) + { + if (buffTypeToRemove < 0 || buffTypeToRemove >= 323 || !BuffID.Sets.CanBeRemovedByNetMessage[buffTypeToRemove]) + return; + int buffIndex = this.FindBuffIndex(buffTypeToRemove); + if (buffIndex == -1) + return; + this.DelBuff(buffIndex); + if (Main.netMode != 1) + return; + NetMessage.SendData(137, number: this.whoAmI, number2: ((float) buffTypeToRemove)); + } + + public void DelBuff(int buffIndex) + { + this.buffTime[buffIndex] = 0; + this.buffType[buffIndex] = 0; + for (int index1 = 0; index1 < 4; ++index1) + { + if (this.buffTime[index1] == 0 || this.buffType[index1] == 0) + { + for (int index2 = index1 + 1; index2 < 5; ++index2) + { + this.buffTime[index2 - 1] = this.buffTime[index2]; + this.buffType[index2 - 1] = this.buffType[index2]; + this.buffTime[index2] = 0; + this.buffType[index2] = 0; + } + } + } + if (Main.netMode != 2) + return; + NetMessage.SendData(54, number: this.whoAmI); + } + + public Microsoft.Xna.Framework.Rectangle getRect() => new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height); + + public bool CanBeChasedBy(object attacker = null, bool ignoreDontTakeDamage = false) => this.active && this.chaseable && this.lifeMax > 5 && !this.dontTakeDamage | ignoreDontTakeDamage && !this.friendly && !this.immortal; + + public bool CountsAsACritter => this.lifeMax <= 5 && this.damage == 0 && this.type != 594; + + public void moneyPing(Vector2 pos) + { + SoundEngine.PlaySound(38, pos); + int Type = 244; + if (this.extraValue >= 1000000) + Type = 247; + else if (this.extraValue >= 10000) + Type = 246; + else if (this.extraValue >= 100) + Type = 245; + for (int index1 = 0; index1 < 20; ++index1) + { + int index2 = Dust.NewDust(pos - new Vector2(1f, 2f), 10, 14, Type, Alpha: 254, Scale: 0.25f); + Main.dust[index2].velocity *= 0.2f; + } + } + + public void IdleSounds() + { + if ((this.type == 239 || this.type == 240) && Main.rand.Next(900) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(24, 26)); + else if ((this.type == 62 || this.type == 156) && Main.rand.Next(700) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(26, 30)); + else if (this.type == 177 && Main.rand.Next(600) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(30, 32)); + else if (this.type == 226 && Main.rand.Next(800) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, 32); + else if (this.type == 153 && Main.rand.Next(1000) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, 33); + else if (this.wet && (this.type == 63 || this.type == 64 || this.type == 103) && Main.rand.Next(1000) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(34, 36)); + else if ((this.type == 198 || this.type == 199) && Main.rand.Next(1000) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(36, 38)); + else if ((this.type == 170 || this.type == 180 || this.type == 171) && Main.rand.Next(600) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(38, 41)); + else if (this.type == 250 && Main.rand.Next(700) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(41, 44)); + else if (this.type == 580 && Main.rand.Next(800) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, 44); + else if (this.type == 582 && Main.rand.Next(800) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, 44); + else if (this.type == 581 && Main.rand.Next(800) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(44, 47)); + else if (this.type == 508 && Main.rand.Next(800) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, 44); + else if (this.type == 509 && Main.rand.Next(800) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(44, 47)); + else if (this.type == 494 && Main.rand.Next(600) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, 47); + else if (this.type == 467 && Main.rand.Next(700) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(48, 50)); + else if (this.type == 468 && Main.rand.Next(700) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(50, 53)); + else if (this.type == 288 && Main.rand.Next(400) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(53, 55)); + else if ((this.type == 524 || this.type == 525 || this.type == 526 || this.type == 527) && Main.rand.Next(700) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(55, 57)); + else if ((this.type == 496 || this.type == 497) && Main.rand.Next(600) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(57, 59)); + else if (this.type == 389 && Main.rand.Next(800) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(59, 61)); + else if (this.type == 471 && Main.rand.Next(600) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(61, 63)); + else if (this.type == 482 && Main.rand.Next(600) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(63, 66)); + else if (this.type == 388 && Main.rand.Next(700) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(66, 69)); + else if (this.type == 520 && Main.rand.Next(800) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(69, 73)); + else if (this.type == 477 && Main.rand.Next(600) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, 73); + else if (this.type == 258 && Main.rand.Next(700) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(74, 78)); + else if (this.type == 252 && Main.rand.Next(700) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, 78); + else if (this.type == 469 && Main.rand.Next(700) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(79, 81)); + else if ((this.type == 253 || this.type == 82) && Main.rand.Next(700) == 0) + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(81, 84)); + else if (this.type >= 498 && this.type <= 506 && Main.rand.Next(600) == 0) + { + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(84, 86)); + } + else + { + if (this.type != 391 || Main.rand.Next(700) != 0) + return; + SoundEngine.PlaySound(29, (int) this.position.X, (int) this.position.Y, Main.rand.Next(86, 87)); + } + } + + public void UpdateAltTexture() + { + if (!this.townNPC) + return; + int altTexture = this.altTexture; + bool flag = BirthdayParty.PartyIsUp || this.ForcePartyHatOn; + if (this.type == 441 || this.type == 453 || this.type == 633) + flag = false; + this.altTexture = 0; + if (flag) + this.altTexture = 1; + if (this.type == 633 && this.ShouldBestiaryGirlBeLycantrope()) + this.altTexture = 2; + if (this.ForcePartyHatOn) + return; + this.MakeTransitionEffectsForTextureChanges(altTexture, this.altTexture); + } + + private void MakeTransitionEffectsForTextureChanges(int oldAltTexture, int currentAltTexture) + { + if (oldAltTexture == 0 && currentAltTexture == 1) + { + for (int index = 0; index < 20; ++index) + Dust.NewDust(this.position, this.width, this.height / 4, 139 + Main.rand.Next(4), SpeedY: -2f); + } + if (oldAltTexture == 1 && currentAltTexture == 0) + Utils.PoofOfSmoke(this.position); + if (this.type != 633) + return; + int num = 2; + if ((oldAltTexture != 0 || currentAltTexture != num ? (oldAltTexture != num ? 0 : (currentAltTexture == 0 ? 1 : 0)) : 1) == 0) + return; + for (int index = 0; index < 20; ++index) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 262, SpeedY: -2f); + dust.noGravity = true; + dust.scale = 2f; + } + } + + public static void ResetNetOffsets() + { + NPC.offSetDelayTime = 180; + for (int index = 0; index < 200; ++index) + Main.npc[index].netOffset *= 0.0f; + } + + public void UpdateNPC(int i) + { + this.whoAmI = i; + if (!this.active) + return; + if (NPC.offSetDelayTime > 0) + this.netOffset *= 0.0f; + else if (Main.netMode == 2) + this.netOffset *= 0.0f; + else if (Main.multiplayerNPCSmoothingRange <= 0) + this.netOffset *= 0.0f; + else if (this.netOffset != new Vector2(0.0f, 0.0f)) + { + if (NPCID.Sets.NoMultiplayerSmoothingByType[this.type]) + this.netOffset *= 0.0f; + else if (NPCID.Sets.NoMultiplayerSmoothingByAI[this.aiStyle]) + { + this.netOffset *= 0.0f; + } + else + { + float num1 = 2f; + float npcSmoothingRange = (float) Main.multiplayerNPCSmoothingRange; + float num2 = this.netOffset.Length(); + if ((double) num2 > (double) npcSmoothingRange) + { + this.netOffset.Normalize(); + this.netOffset *= npcSmoothingRange; + num2 = this.netOffset.Length(); + } + float num3 = num1 + num2 / npcSmoothingRange * num1; + Vector2 netOffset = this.netOffset; + netOffset.Normalize(); + this.netOffset -= netOffset * num3; + if ((double) this.netOffset.Length() < (double) num3) + this.netOffset *= 0.0f; + if (this.townNPC && (double) Vector2.Distance(this.position, new Vector2((float) (this.homeTileX * 16 + 8 - this.width / 2), (float) (this.homeTileY * 16 - this.height) - 0.1f)) < 1.0) + this.netOffset *= 0.0f; + } + } + this.UpdateAltTexture(); + if (this.type == 368) + NPC.travelNPC = true; + if (Main.netMode != 2) + this.UpdateNPC_CastLights(); + this.UpdateNPC_TeleportVisuals(); + this.UpdateNPC_CritterSounds(); + this.TrySyncingUniqueTownNPCData(i); + if (this.aiStyle == 7 && (double) this.position.Y > (double) Main.bottomWorld - 640.0 + (double) this.height && Main.netMode != 1 && !Main.xMas) + { + this.StrikeNPCNoInteraction(9999, 0.0f, 0); + if (Main.netMode == 2) + NetMessage.SendData(28, number: this.whoAmI, number2: 9999f); + } + if (Main.netMode == 1) + { + bool flag = false; + int index1 = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int index2 = (int) ((double) this.position.Y + (double) (this.height / 2)) / 16; + try + { + if (index1 >= 4) + { + if (index1 <= Main.maxTilesX - 4) + { + if (index2 >= 4) + { + if (index2 <= Main.maxTilesY - 4) + { + if (Main.tile[index1, index2] == null) + flag = true; + else if (Main.tile[index1 - 3, index2] == null) + flag = true; + else if (Main.tile[index1 + 3, index2] == null) + flag = true; + else if (Main.tile[index1, index2 - 3] == null) + flag = true; + else if (Main.tile[index1, index2 + 3] == null) + flag = true; + } + } + } + } + } + catch + { + flag = true; + } + if (flag) + return; + } + this.UpdateNPC_BuffFlagsReset(); + this.UpdateNPC_BuffSetFlags(); + this.UpdateNPC_SoulDrainDebuff(); + this.UpdateNPC_BuffClearExpiredBuffs(); + this.UpdateNPC_BuffApplyDOTs(); + this.UpdateNPC_BuffApplyVFX(); + this.UpdateNPC_BloodMoonTransformations(); + float maxFallSpeed; + this.UpdateNPC_UpdateGravity(out maxFallSpeed); + if (this.soundDelay > 0) + --this.soundDelay; + if (this.life <= 0) + { + this.active = false; + this.UpdateNetworkCode(i); + this.netUpdate = false; + this.justHit = false; + } + else + { + this.oldTarget = this.target; + this.oldDirection = this.direction; + this.oldDirectionY = this.directionY; + float num4 = (float) (1.0 + (double) Math.Abs(this.velocity.X) / 3.0); + if ((double) this.gfxOffY > 0.0) + { + this.gfxOffY -= num4 * this.stepSpeed; + if ((double) this.gfxOffY < 0.0) + this.gfxOffY = 0.0f; + } + else if ((double) this.gfxOffY < 0.0) + { + this.gfxOffY += num4 * this.stepSpeed; + if ((double) this.gfxOffY > 0.0) + this.gfxOffY = 0.0f; + } + if ((double) this.gfxOffY > 16.0) + this.gfxOffY = 16f; + if ((double) this.gfxOffY < -16.0) + this.gfxOffY = -16f; + this.TryPortalJumping(); + this.IdleSounds(); + this.AI(); + if (Main.netMode != 2 && this.extraValue > 0) + { + int Type = 244; + float num5 = 30f; + if (this.extraValue >= 1000000) + { + Type = 247; + num5 *= 0.25f; + } + else if (this.extraValue >= 10000) + { + Type = 246; + num5 *= 0.5f; + } + else if (this.extraValue >= 100) + { + Type = 245; + num5 *= 0.75f; + } + if (Main.rand.Next((int) num5) == 0) + { + this.position = this.position + this.netOffset; + int index = Dust.NewDust(this.position, this.width, this.height, Type, Alpha: 254, Scale: 0.25f); + Main.dust[index].velocity *= 0.1f; + this.position = this.position - this.netOffset; + } + } + for (int index = 0; index < 256; ++index) + { + if (this.immune[index] > 0) + --this.immune[index]; + } + if (!this.noGravity && !this.noTileCollide) + { + int x = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int y = (int) ((double) this.position.Y + (double) (this.height / 2)) / 16; + if (WorldGen.InWorld(x, y) && Main.tile[x, y] == null) + { + NPC.gravity = 0.0f; + this.velocity.X = 0.0f; + this.velocity.Y = 0.0f; + } + } + if (!this.noGravity) + { + this.velocity.Y += NPC.gravity; + if ((double) this.velocity.Y > (double) maxFallSpeed) + this.velocity.Y = maxFallSpeed; + } + if ((double) this.velocity.X < 0.005 && (double) this.velocity.X > -0.005) + this.velocity.X = 0.0f; + if (Main.netMode != 1 && this.type != 37 && (this.friendly || NPCID.Sets.TakesDamageFromHostilesWithoutBeingFriendly[this.type])) + { + if (this.townNPC) + this.CheckDrowning(); + this.CheckLifeRegen(); + this.GetHurtByOtherNPCs(NPCID.Sets.AllNPCs); + } + if (Main.netMode != 1 && (NPC.npcsFoundForCheckActive[210] || NPC.npcsFoundForCheckActive[211]) && !NPCID.Sets.HurtingBees[this.type]) + this.GetHurtByOtherNPCs(NPCID.Sets.HurtingBees); + if (!this.noTileCollide) + { + this.UpdateCollision(); + } + else + { + this.oldPosition = this.position; + this.oldDirection = this.direction; + this.position = this.position + this.velocity; + if (this.onFire && this.boss && Main.netMode != 1 && Collision.WetCollision(this.position, this.width, this.height)) + { + for (int buffIndex = 0; buffIndex < 5; ++buffIndex) + { + if (this.buffType[buffIndex] == 24) + this.DelBuff(buffIndex); + } + } + } + if (Main.netMode != 1 && !this.noTileCollide && this.lifeMax > 1 && Collision.SwitchTiles(this.position, this.width, this.height, this.oldPosition, 2) && (this.type == 46 || this.type == 148 || this.type == 149 || this.type == 303 || this.type == 361 || this.type == 362 || this.type == 364 || this.type == 366 || this.type == 367 || this.type >= 442 && this.type <= 448 || this.type == 602 || this.type == 608 || this.type == 614)) + { + this.ai[0] = 1f; + this.ai[1] = 400f; + this.ai[2] = 0.0f; + } + this.FindFrame(); + this.UpdateNPC_UpdateTrails(); + this.UpdateNetworkCode(i); + this.CheckActive(); + this.netUpdate = false; + this.justHit = false; + } + } + + private void TrySyncingUniqueTownNPCData(int npcIndex) + { + if (Main.netMode != 1 || !this.needsUniqueInfoUpdate || !this.townNPC && this.type != 453 || this.type == 37) + return; + this.needsUniqueInfoUpdate = false; + NetMessage.SendData(56, number: npcIndex); + } + + private void UpdateNetworkCode(int i) + { + if (!this.active) + this.netUpdate = true; + if (Main.netMode != 2) + return; + if (Main.npcStreamSpeed > 0 && !this.townNPC && (double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) > 1.0) + { + ++this.netStream; + if ((int) this.netStream > Main.npcStreamSpeed) + { + for (int remoteClient = 0; remoteClient < (int) byte.MaxValue; ++remoteClient) + { + if (Main.player[remoteClient].active) + { + this.netStream = (byte) 0; + float num = Math.Abs(this.Center.X - Main.player[remoteClient].Center.X) + Math.Abs(this.Center.Y - Main.player[remoteClient].Center.Y); + if ((double) num < 250.0) + this.streamPlayer[remoteClient] -= (byte) 8; + else if ((double) num < 500.0) + this.streamPlayer[remoteClient] -= (byte) 4; + else if ((double) num < 1000.0) + this.streamPlayer[remoteClient] -= (byte) 2; + else if ((double) num < 1500.0) + --this.streamPlayer[remoteClient]; + if (this.streamPlayer[remoteClient] <= (byte) 0) + { + this.streamPlayer[remoteClient] = (byte) 8; + NetMessage.SendData(23, remoteClient, number: i); + } + } + } + } + } + if (this.townNPC) + this.netSpam = 0; + if (this.netUpdate2) + this.netUpdate = true; + if (!this.active) + this.netSpam = 0; + if (this.netUpdate) + { + if (this.boss) + { + Vector2 vector2 = this.oldPosition - this.position; + if (this.netSpam <= 15) + { + this.netSpam += 5; + NetMessage.SendData(23, number: i); + this.netUpdate2 = false; + } + else + this.netUpdate2 = true; + } + else if (this.netSpam <= 90) + { + this.netSpam += 30; + NetMessage.SendData(23, number: i); + this.netUpdate2 = false; + } + else + this.netUpdate2 = true; + } + if (this.netSpam > 0) + --this.netSpam; + if (!this.active || !this.townNPC || NPC.TypeToDefaultHeadIndex(this.type) <= 0) + return; + if (this.homeless != this.oldHomeless || this.homeTileX != this.oldHomeTileX || this.homeTileY != this.oldHomeTileY) + { + byte householdStatus = WorldGen.TownManager.GetHouseholdStatus(this); + NetMessage.SendData(60, number: i, number2: ((float) Main.npc[i].homeTileX), number3: ((float) Main.npc[i].homeTileY), number4: ((float) householdStatus)); + } + this.oldHomeless = this.homeless; + this.oldHomeTileX = this.homeTileX; + this.oldHomeTileY = this.homeTileY; + } + + private void UpdateNPC_UpdateTrails() + { + int num = NPCID.Sets.TrailingMode[this.type]; + if (num == 0) + { + if ((double) this.localAI[3] <= 0.0) + { + this.localAI[3] = 2f; + for (int index = this.oldPos.Length - 1; index > 0; --index) + this.oldPos[index] = this.oldPos[index - 1]; + this.oldPos[0] = this.position + this.netOffset; + } + --this.localAI[3]; + } + if (num == 1) + { + for (int index = this.oldPos.Length - 1; index > 0; --index) + this.oldPos[index] = this.oldPos[index - 1]; + this.oldPos[0] = this.position + this.netOffset; + } + if (num == 2) + { + if ((int) this.ai[0] == 4 || (double) this.ai[0] == 5.0 || (double) this.ai[0] == 6.0) + { + for (int index = this.oldPos.Length - 1; index > 0; --index) + { + this.oldPos[index] = this.oldPos[index - 1]; + this.oldRot[index] = this.oldRot[index - 1]; + } + this.oldPos[0] = this.position + this.netOffset; + this.oldRot[0] = this.rotation; + } + else + { + for (int index = this.oldPos.Length - 1; index >= 0; --index) + { + this.oldPos[index] = this.position + this.netOffset; + this.oldRot[index] = this.rotation; + } + } + } + if (num == 3) + { + for (int index = this.oldPos.Length - 1; index > 0; --index) + { + this.oldPos[index] = this.oldPos[index - 1]; + this.oldRot[index] = this.oldRot[index - 1]; + } + this.oldPos[0] = this.position + this.netOffset; + this.oldRot[0] = this.rotation; + } + if (num == 4) + { + for (int index = this.oldPos.Length - 1; index > 0; --index) + { + this.oldPos[index] = this.oldPos[index - 1]; + Lighting.AddLight((int) this.position.X / 16, (int) this.position.Y / 16, 0.3f, 0.0f, 0.2f); + } + this.oldPos[0] = this.position + this.netOffset; + } + else if (num == 5) + { + for (int index = this.oldPos.Length - 1; index > 0; --index) + this.oldPos[index] = this.oldPos[index - 1]; + this.oldPos[0] = this.position + this.netOffset; + } + else if (num == 6) + { + for (int index = this.oldPos.Length - 1; index > 0; --index) + this.oldPos[index] = this.oldPos[index - 1]; + this.oldPos[0] = this.position + this.netOffset; + } + else + { + if (num != 7) + return; + for (int index = this.oldPos.Length - 1; index > 0; --index) + { + this.oldPos[index] = this.oldPos[index - 1]; + this.oldRot[index] = this.oldRot[index - 1]; + } + this.oldPos[0] = this.position + this.netOffset; + this.oldRot[0] = this.rotation; + } + } + + private void UpdateNPC_UpdateGravity(out float maxFallSpeed) + { + maxFallSpeed = 10f; + NPC.gravity = 0.3f; + if (this.type == 258) + { + NPC.gravity = 0.1f; + if ((double) this.velocity.Y > 3.0) + this.velocity.Y = 3f; + } + else if (this.type == 425 && (double) this.ai[2] == 1.0) + { + NPC.gravity = 0.1f; + if ((double) this.velocity.Y > 2.0) + this.velocity.Y = 2f; + } + else if ((this.type == 576 || this.type == 577) && (double) this.ai[0] > 0.0 && (double) this.ai[1] == 2.0) + { + NPC.gravity = 0.45f; + if ((double) this.velocity.Y > 32.0) + this.velocity.Y = 32f; + } + else if (this.type == 427 && (double) this.ai[2] == 1.0) + { + NPC.gravity = 0.1f; + if ((double) this.velocity.Y > 4.0) + this.velocity.Y = 4f; + } + else if (this.type == 426) + { + NPC.gravity = 0.1f; + if ((double) this.velocity.Y > 3.0) + this.velocity.Y = 3f; + } + else if (this.type == 541) + NPC.gravity = 0.0f; + float num1 = (float) (Main.maxTilesX / 4200); + float num2 = (float) (((double) this.position.Y / 16.0 - (60.0 + 10.0 * (double) (num1 * num1))) / (Main.worldSurface / 6.0)); + if ((double) num2 < 0.25) + num2 = 0.25f; + if ((double) num2 > 1.0) + num2 = 1f; + NPC.gravity *= num2; + if (!this.wet) + return; + if (this.honeyWet) + { + NPC.gravity = 0.1f; + maxFallSpeed = 4f; + } + else + { + NPC.gravity = 0.2f; + maxFallSpeed = 7f; + } + } + + private void UpdateNPC_SoulDrainDebuff() + { + if (!this.soulDrain) + return; + int num = 1100; + for (int index1 = 0; index1 < (int) byte.MaxValue; ++index1) + { + if (Main.player[index1].active && !Main.player[index1].dead && (double) (this.Center - Main.player[index1].position).Length() < (double) num && Main.player[index1].inventory[Main.player[index1].selectedItem].type == 3006 && Main.player[index1].itemAnimation > 0) + { + if (index1 == Main.myPlayer) + ++Main.player[index1].soulDrain; + if (Main.rand.Next(3) != 0) + { + Vector2 center = this.Center; + center.X += (float) Main.rand.Next(-100, 100) * 0.05f; + center.Y += (float) Main.rand.Next(-100, 100) * 0.05f; + int index2 = Dust.NewDust(center + this.velocity, 1, 1, 235); + Main.dust[index2].velocity *= 0.0f; + Main.dust[index2].scale = (float) Main.rand.Next(70, 85) * 0.01f; + Main.dust[index2].fadeIn = (float) (index1 + 1); + } + } + } + } + + public static Color buffColor(Color newColor, float R, float G, float B, float A) + { + newColor.R = (byte) ((double) newColor.R * (double) R); + newColor.G = (byte) ((double) newColor.G * (double) G); + newColor.B = (byte) ((double) newColor.B * (double) B); + newColor.A = (byte) ((double) newColor.A * (double) A); + return newColor; + } + + public Color GetNPCColorTintedByBuffs(Color npcColor) + { + float R = 1f; + float G1 = 1f; + float B1 = 1f; + float A = 1f; + if (this.poisoned) + { + R *= 0.65f; + B1 *= 0.75f; + npcColor = NPC.buffColor(npcColor, R, G1, B1, A); + } + if (this.venom) + { + G1 *= 0.45f; + R *= 0.75f; + npcColor = NPC.buffColor(npcColor, R, G1, B1, A); + } + if (this.midas) + { + B1 *= 0.3f; + R *= 0.85f; + npcColor = NPC.buffColor(npcColor, R, G1, B1, A); + } + if (this.betsysCurse) + { + R *= 0.8f; + G1 *= 0.6f; + npcColor = NPC.buffColor(npcColor, R, G1, B1, A); + } + if (this.oiled) + { + R *= 0.7f; + G1 *= 0.7f; + B1 *= 0.7f; + npcColor = NPC.buffColor(npcColor, R, G1, B1, A); + } + if (this.stinky) + { + R *= 0.7f; + B1 *= 0.55f; + npcColor = NPC.buffColor(npcColor, R, G1, B1, A); + } + if (this.drippingSlime) + { + R *= 0.8f; + G1 *= 0.8f; + npcColor = NPC.buffColor(npcColor, R, G1, B1, A); + } + if (this.drippingSparkleSlime) + { + float B2 = B1 * 0.85f; + float G2 = G1 * 0.75f; + npcColor = NPC.buffColor(npcColor, R, G2, B2, A); + } + if (this.ichor) + npcColor = new Color((int) byte.MaxValue, (int) byte.MaxValue, 0, (int) byte.MaxValue); + if (Main.player[Main.myPlayer].detectCreature && this.lifeMax > 1) + { + byte num1; + byte num2; + byte num3; + if (this.friendly || this.catchItem > (short) 0 || this.damage == 0 && this.lifeMax == 5) + { + num1 = (byte) 50; + num2 = byte.MaxValue; + num3 = (byte) 50; + } + else + { + num1 = byte.MaxValue; + num2 = (byte) 50; + num3 = (byte) 50; + } + if ((int) npcColor.R < (int) num1) + npcColor.R = num1; + if ((int) npcColor.G < (int) num2) + npcColor.G = num2; + if ((int) npcColor.B < (int) num3) + npcColor.B = num3; + } + return npcColor; + } + + private void UpdateNPC_BuffApplyVFX() + { + this.position = this.position + this.netOffset; + if (this.markedByScytheWhip && Main.rand.Next(3) == 0) + ParticleOrchestrator.RequestParticleSpawn(true, ParticleOrchestraType.BlackLightningSmall, new ParticleOrchestraSettings() + { + MovementVector = Main.rand.NextVector2Circular(1f, 1f), + PositionInWorld = Main.rand.NextVector2FromRectangle(this.Hitbox) + }); + if (this.poisoned && Main.rand.Next(30) == 0) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 46, Alpha: 120, Scale: 0.2f); + dust.noGravity = true; + dust.fadeIn = 1.9f; + } + if (this.venom && Main.rand.Next(10) == 0) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 171, Alpha: 100, Scale: 0.5f); + dust.noGravity = true; + dust.fadeIn = 1.5f; + } + if (this.shadowFlame && Main.rand.Next(5) < 4) + { + Dust dust = Dust.NewDustDirect(new Vector2(this.position.X - 2f, this.position.Y - 2f), this.width + 4, this.height + 4, 27, this.velocity.X * 0.4f, this.velocity.Y * 0.4f, 180, Scale: 1.95f); + dust.noGravity = true; + dust.velocity *= 0.75f; + dust.velocity.X *= 0.75f; + --dust.velocity.Y; + if (Main.rand.Next(4) == 0) + { + dust.noGravity = false; + dust.scale *= 0.5f; + } + } + if (this.onFire) + { + if (Main.rand.Next(4) < 3) + { + Dust dust = Dust.NewDustDirect(new Vector2(this.position.X - 2f, this.position.Y - 2f), this.width + 4, this.height + 4, 6, this.velocity.X * 0.4f, this.velocity.Y * 0.4f, 100, Scale: 3.5f); + dust.noGravity = true; + dust.velocity *= 1.8f; + dust.velocity.Y -= 0.5f; + if (Main.rand.Next(4) == 0) + { + dust.noGravity = false; + dust.scale *= 0.5f; + } + } + Lighting.AddLight((int) ((double) this.position.X / 16.0), (int) ((double) this.position.Y / 16.0 + 1.0), 1f, 0.3f, 0.1f); + } + if (this.daybreak) + { + if (Main.rand.Next(4) < 3) + { + Dust dust = Dust.NewDustDirect(new Vector2(this.position.X - 2f, this.position.Y - 2f), this.width + 4, this.height + 4, 158, this.velocity.X * 0.4f, this.velocity.Y * 0.4f, 100, Scale: 3.5f); + dust.noGravity = true; + dust.velocity *= 2.8f; + dust.velocity.Y -= 0.5f; + if (Main.rand.Next(4) == 0) + { + dust.noGravity = false; + dust.scale *= 0.5f; + } + } + Lighting.AddLight((int) ((double) this.position.X / 16.0), (int) ((double) this.position.Y / 16.0 + 1.0), 1f, 0.3f, 0.1f); + } + if (this.betsysCurse) + { + if (Main.rand.Next(4) < 3) + { + Dust dust = Dust.NewDustDirect(new Vector2(this.position.X - 2f, this.position.Y - 2f), this.width + 4, this.height + 4, 55, this.velocity.X * 0.4f, this.velocity.Y * 0.4f, 100, Scale: 3.5f); + dust.noGravity = true; + dust.velocity *= 2.8f; + dust.velocity.Y -= 1.5f; + dust.noGravity = false; + dust.scale = 0.9f; + dust.color = new Color(0, 0, 180, (int) byte.MaxValue); + dust.velocity *= 0.2f; + } + Lighting.AddLight((int) ((double) this.position.X / 16.0), (int) ((double) this.position.Y / 16.0 + 1.0), 0.6f, 0.1f, 0.9f); + } + if (this.oiled && Main.rand.Next(3) != 0) + { + int Alpha = 175; + Color newColor = new Color(0, 0, 0, 140); + Vector2 position = this.position; + position.X -= 2f; + position.Y -= 2f; + if (Main.rand.Next(2) == 0) + { + Dust dust = Dust.NewDustDirect(position, this.width + 4, this.height + 2, 4, Alpha: Alpha, newColor: newColor, Scale: 1.4f); + if (Main.rand.Next(2) == 0) + dust.alpha += 25; + if (Main.rand.Next(2) == 0) + dust.alpha += 25; + dust.noLight = true; + dust.velocity *= 0.2f; + dust.velocity.Y += 0.2f; + dust.velocity += this.velocity; + } + } + if (this.dryadWard && (double) this.velocity.X != 0.0 && Main.rand.Next(4) == 0) + { + Dust dust = Dust.NewDustDirect(new Vector2(this.position.X - 2f, (float) ((double) this.position.Y + (double) this.height - 2.0)), this.width + 4, 4, 163, this.velocity.X * 0.4f, this.velocity.Y * 0.4f, 100, Scale: 1.5f); + dust.noGravity = true; + dust.noLight = true; + dust.velocity *= 0.0f; + } + if (this.dryadBane && Main.rand.Next(4) == 0) + { + Dust dust = Dust.NewDustDirect(new Vector2(this.position.X - 2f, this.position.Y), this.width + 4, this.height, 163, this.velocity.X * 0.4f, this.velocity.Y * 0.4f, 100, Scale: 1.5f); + dust.noGravity = true; + dust.velocity *= new Vector2((float) ((double) Main.rand.NextFloat() * 4.0 - 2.0), 0.0f); + dust.noLight = true; + } + if (this.loveStruck && Main.rand.Next(5) == 0) + { + Vector2 vector2 = new Vector2((float) Main.rand.Next(-10, 11), (float) Main.rand.Next(-10, 11)); + vector2.Normalize(); + vector2.X *= 0.66f; + int index = Gore.NewGore(this.position + new Vector2((float) Main.rand.Next(this.width + 1), (float) Main.rand.Next(this.height + 1)), vector2 * (float) Main.rand.Next(3, 6) * 0.33f, 331, (float) Main.rand.Next(40, 121) * 0.01f); + Main.gore[index].sticky = false; + Main.gore[index].velocity *= 0.4f; + Main.gore[index].velocity.Y -= 0.6f; + } + if (this.stinky && Main.rand.Next(5) == 0) + { + Vector2 vector2_1 = new Vector2((float) Main.rand.Next(-10, 11), (float) Main.rand.Next(-10, 11)); + vector2_1.Normalize(); + vector2_1.X *= 0.66f; + vector2_1.Y = Math.Abs(vector2_1.Y); + Vector2 vector2_2 = vector2_1 * (float) Main.rand.Next(3, 5) * 0.25f; + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 188, vector2_2.X, vector2_2.Y * 0.5f, 100, Scale: 1.5f); + dust.velocity *= 0.1f; + dust.velocity.Y -= 0.5f; + } + if (this.dripping && Main.rand.Next(4) != 0) + { + Vector2 position = this.position; + position.X -= 2f; + position.Y -= 2f; + if (Main.rand.Next(2) == 0) + { + Dust dust = Dust.NewDustDirect(position, this.width + 4, this.height + 2, 211, Alpha: 50, Scale: 0.8f); + if (Main.rand.Next(2) == 0) + dust.alpha += 25; + if (Main.rand.Next(2) == 0) + dust.alpha += 25; + dust.noLight = true; + dust.velocity *= 0.2f; + dust.velocity.Y += 0.2f; + dust.velocity += this.velocity; + } + else + { + Dust dust = Dust.NewDustDirect(position, this.width + 8, this.height + 8, 211, Alpha: 50, Scale: 1.1f); + if (Main.rand.Next(2) == 0) + dust.alpha += 25; + if (Main.rand.Next(2) == 0) + dust.alpha += 25; + dust.noLight = true; + dust.noGravity = true; + dust.velocity *= 0.2f; + ++dust.velocity.Y; + dust.velocity += this.velocity; + } + } + if (this.drippingSlime && Main.rand.Next(4) != 0) + { + int Alpha = 175; + Color newColor = new Color(0, 80, (int) byte.MaxValue, 100); + Vector2 position = this.position; + position.X -= 2f; + position.Y -= 2f; + if (Main.rand.Next(2) == 0) + { + Dust dust = Dust.NewDustDirect(position, this.width + 4, this.height + 2, 4, Alpha: Alpha, newColor: newColor, Scale: 1.4f); + if (Main.rand.Next(2) == 0) + dust.alpha += 25; + if (Main.rand.Next(2) == 0) + dust.alpha += 25; + dust.noLight = true; + dust.velocity *= 0.2f; + dust.velocity.Y += 0.2f; + dust.velocity += this.velocity; + } + } + if (this.drippingSparkleSlime && Main.rand.Next(4) != 0) + { + int Alpha = 150; + Vector2 position = this.position; + position.X -= 2f; + position.Y -= 2f; + if (Main.rand.Next(2) == 0) + { + Dust dust = Dust.NewDustDirect(position, this.width + 4, this.height + 2, 243, Alpha: Alpha); + if (Main.rand.Next(2) == 0) + dust.alpha += 25; + if (Main.rand.Next(2) == 0) + dust.alpha += 25; + dust.noLight = true; + dust.velocity *= 0.2f; + dust.velocity.Y += 0.2f; + dust.velocity += this.velocity; + } + } + if (this.onFrostBurn) + { + if (Main.rand.Next(4) < 3) + { + Dust dust = Dust.NewDustDirect(new Vector2(this.position.X - 2f, this.position.Y - 2f), this.width + 4, this.height + 4, 135, this.velocity.X * 0.4f, this.velocity.Y * 0.4f, 100, Scale: 3.5f); + dust.noGravity = true; + dust.velocity *= 1.8f; + dust.velocity.Y -= 0.5f; + if (Main.rand.Next(4) == 0) + { + dust.noGravity = false; + dust.scale *= 0.5f; + } + } + Lighting.AddLight((int) ((double) this.position.X / 16.0), (int) ((double) this.position.Y / 16.0 + 1.0), 0.1f, 0.6f, 1f); + } + if (this.onFire2) + { + if (Main.rand.Next(4) < 3) + { + Dust dust = Dust.NewDustDirect(new Vector2(this.position.X - 2f, this.position.Y - 2f), this.width + 4, this.height + 4, 75, this.velocity.X * 0.4f, this.velocity.Y * 0.4f, 100, Scale: 3.5f); + dust.noGravity = true; + dust.velocity *= 1.8f; + dust.velocity.Y -= 0.5f; + if (Main.rand.Next(4) == 0) + { + dust.noGravity = false; + dust.scale *= 0.5f; + } + } + Lighting.AddLight((int) ((double) this.position.X / 16.0), (int) ((double) this.position.Y / 16.0 + 1.0), 1f, 0.3f, 0.1f); + } + this.position = this.position - this.netOffset; + } + + private void UpdateNPC_BuffApplyDOTs() + { + if (this.dontTakeDamage) + return; + int amount = this.lifeRegenExpectedLossPerSecond; + if (this.poisoned) + { + if (this.lifeRegen > 0) + this.lifeRegen = 0; + this.lifeRegen -= 4; + } + if (this.onFire) + { + if (this.lifeRegen > 0) + this.lifeRegen = 0; + this.lifeRegen -= 8; + } + if (this.onFrostBurn) + { + if (this.lifeRegen > 0) + this.lifeRegen = 0; + this.lifeRegen -= 16; + if (amount < 2) + amount = 2; + } + if (this.onFire2) + { + if (this.lifeRegen > 0) + this.lifeRegen = 0; + this.lifeRegen -= 24; + if (amount < 4) + amount = 4; + } + if (this.venom) + { + if (this.lifeRegen > 0) + this.lifeRegen = 0; + this.lifeRegen -= 30; + if (amount < 5) + amount = 5; + } + if (this.shadowFlame) + { + if (this.lifeRegen > 0) + this.lifeRegen = 0; + this.lifeRegen -= 30; + if (amount < 5) + amount = 5; + } + if (this.oiled) + { + int num1 = (this.onFire ? 2 : 0) + (this.onFrostBurn ? 4 : 0) + (this.onFire2 ? 3 : 0) + (this.shadowFlame ? 8 : 0); + if (num1 > 0) + { + int num2 = num1 * 4 + 12; + this.lifeRegen -= num2; + int num3 = num2 / 6; + if (amount < num3) + amount = num3; + } + } + if (this.javelined) + { + if (this.lifeRegen > 0) + this.lifeRegen = 0; + int num4 = 0; + int num5 = 1; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].type == 598 && (double) Main.projectile[index].ai[0] == 1.0 && (double) Main.projectile[index].ai[1] == (double) this.whoAmI) + ++num4; + } + this.lifeRegen -= num4 * 2 * 3; + if (amount < num4 * 3 / num5) + amount = num4 * 3 / num5; + } + if (this.daybreak) + { + if (this.lifeRegen > 0) + this.lifeRegen = 0; + int num6 = 0; + int num7 = 4; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].type == 636 && (double) Main.projectile[index].ai[0] == 1.0 && (double) Main.projectile[index].ai[1] == (double) this.whoAmI) + ++num6; + } + if (num6 == 0) + num6 = 1; + this.lifeRegen -= num6 * 2 * 100; + if (amount < num6 * 100 / num7) + amount = num6 * 100 / num7; + } + if (this.celled) + { + if (this.lifeRegen > 0) + this.lifeRegen = 0; + int num = 0; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].type == 614 && (double) Main.projectile[index].ai[0] == 1.0 && (double) Main.projectile[index].ai[1] == (double) this.whoAmI) + ++num; + } + this.lifeRegen -= num * 2 * 20; + if (amount < num * 20) + amount = num * 20 / 2; + } + if (this.dryadBane) + { + int num8 = 4; + float num9 = 1f; + if (this.lifeRegen > 0) + this.lifeRegen = 0; + if (NPC.downedBoss1) + num9 += 0.1f; + if (NPC.downedBoss2) + num9 += 0.1f; + if (NPC.downedBoss3) + num9 += 0.1f; + if (NPC.downedQueenBee) + num9 += 0.1f; + if (Main.hardMode) + num9 += 0.4f; + if (NPC.downedMechBoss1) + num9 += 0.15f; + if (NPC.downedMechBoss2) + num9 += 0.15f; + if (NPC.downedMechBoss3) + num9 += 0.15f; + if (NPC.downedPlantBoss) + num9 += 0.15f; + if (NPC.downedGolemBoss) + num9 += 0.15f; + if (NPC.downedAncientCultist) + num9 += 0.15f; + if (Main.expertMode) + num9 *= Main.GameModeInfo.TownNPCDamageMultiplier; + int num10 = (int) ((double) num8 * (double) num9); + this.lifeRegen -= 2 * num10; + if (amount < num10) + amount = num10 / 3; + } + if (this.soulDrain && this.realLife == -1) + { + if (this.lifeRegen > 0) + this.lifeRegen = 0; + this.lifeRegen -= 50; + if (amount < 5) + amount = 5; + } + if (this.lifeRegen <= -240 && amount < 2) + amount = 2; + this.lifeRegenCount += this.lifeRegen; + while (this.lifeRegenCount >= 120) + { + this.lifeRegenCount -= 120; + if (!this.immortal) + { + if (this.life < this.lifeMax) + ++this.life; + if (this.life > this.lifeMax) + this.life = this.lifeMax; + } + } + if (amount > 0) + { + while (this.lifeRegenCount <= -120 * amount) + { + this.lifeRegenCount += 120 * amount; + int number = this.whoAmI; + if (this.realLife >= 0) + number = this.realLife; + if (!Main.npc[number].immortal) + Main.npc[number].life -= amount; + CombatText.NewText(new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height), CombatText.LifeRegenNegative, amount, dot: true); + if (Main.npc[number].life <= 0 && !Main.npc[number].immortal) + { + Main.npc[number].life = 1; + if (Main.netMode != 1) + { + Main.npc[number].StrikeNPCNoInteraction(9999, 0.0f, 0); + if (Main.netMode == 2) + NetMessage.SendData(28, number: number, number2: 9999f); + } + } + } + } + else + { + while (this.lifeRegenCount <= -120) + { + this.lifeRegenCount += 120; + int number = this.whoAmI; + if (this.realLife >= 0) + number = this.realLife; + if (!Main.npc[number].immortal) + --Main.npc[number].life; + CombatText.NewText(new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height), CombatText.LifeRegenNegative, 1, dot: true); + if (Main.npc[number].life <= 0 && !Main.npc[number].immortal) + { + Main.npc[number].life = 1; + if (Main.netMode != 1) + { + Main.npc[number].StrikeNPCNoInteraction(9999, 0.0f, 0); + if (Main.netMode == 2) + NetMessage.SendData(28, number: number, number2: 9999f); + } + } + } + } + } + + private void UpdateNPC_BuffClearExpiredBuffs() + { + if (Main.netMode == 1) + return; + for (int buffIndex = 0; buffIndex < 5; ++buffIndex) + { + if (this.buffType[buffIndex] > 0 && this.buffTime[buffIndex] <= 0) + { + this.DelBuff(buffIndex); + if (Main.netMode == 2) + NetMessage.SendData(54, number: this.whoAmI); + } + } + } + + private void UpdateNPC_BloodMoonTransformations() + { + if (Main.netMode == 1 || !Main.bloodMoon) + return; + bool flag = false; + if ((double) this.value == 0.0) + flag = true; + if (this.type == 46 || this.type == 303 || this.type == 337 || this.type == 443 || this.type == 540) + { + if (WorldGen.crimson) + this.Transform(464); + else + this.Transform(47); + } + else if (this.type == 55 || this.type == 230 || this.type == 592 || this.type == 593) + { + if (WorldGen.crimson) + this.Transform(465); + else + this.Transform(57); + } + else if (this.type == 148 || this.type == 149) + { + if (WorldGen.crimson) + this.Transform(470); + else + this.Transform(168); + } + if (!flag) + return; + this.value = 0.0f; + } + + public void UpdateNPC_BuffSetFlags(bool lowerBuffTime = true) + { + for (int index = 0; index < 5; ++index) + { + if (this.buffType[index] > 0 && this.buffTime[index] > 0) + { + if (lowerBuffTime) + --this.buffTime[index]; + if (this.buffType[index] == 20) + this.poisoned = true; + if (this.buffType[index] == 70) + this.venom = true; + if (this.buffType[index] == 24) + this.onFire = true; + if (this.buffType[index] == 72) + this.midas = true; + if (this.buffType[index] == 69) + this.ichor = true; + if (this.buffType[index] == 31) + this.confused = true; + if (this.buffType[index] == 39) + this.onFire2 = true; + if (this.buffType[index] == 44) + this.onFrostBurn = true; + if (this.buffType[index] == 103) + this.dripping = true; + if (this.buffType[index] == 137) + this.drippingSlime = true; + if (this.buffType[index] == 320) + this.drippingSparkleSlime = true; + if (this.buffType[index] == 119) + this.loveStruck = true; + if (this.buffType[index] == 120) + this.stinky = true; + if (this.buffType[index] == 151) + this.soulDrain = true; + if (this.buffType[index] == 153) + this.shadowFlame = true; + if (this.buffType[index] == 165) + this.dryadWard = true; + if (this.buffType[index] == 169) + this.javelined = true; + if (this.buffType[index] == 183) + this.celled = true; + if (this.buffType[index] == 186) + this.dryadBane = true; + if (this.buffType[index] == 189) + this.daybreak = true; + if (this.buffType[index] == 203) + this.betsysCurse = true; + if (this.buffType[index] == 204) + this.oiled = true; + if (this.buffType[index] == 310) + this.markedByScytheWhip = true; + if (this.buffType[index] == 313) + this.markedByFireWhip = true; + if (this.buffType[index] == 309) + this.markedBySwordWhip = true; + if (this.buffType[index] == 315) + this.markedByThornWhip = true; + if (this.buffType[index] == 307) + this.markedByBlandWhip = true; + if (this.buffType[index] == 319) + this.markedByMaceWhip = true; + if (this.buffType[index] == 316) + this.markedByRainbowWhip = true; + } + } + } + + private void UpdateNPC_BuffFlagsReset() + { + this.lifeRegen = 0; + this.soulDrain = false; + this.poisoned = false; + this.venom = false; + this.shadowFlame = false; + this.onFire = false; + this.midas = false; + this.ichor = false; + this.onFrostBurn = false; + this.onFire2 = false; + this.confused = false; + this.loveStruck = false; + this.dryadWard = false; + this.stinky = false; + this.dripping = false; + this.drippingSlime = false; + this.drippingSparkleSlime = false; + this.daybreak = false; + this.javelined = false; + this.celled = false; + this.dryadBane = false; + this.betsysCurse = false; + this.oiled = false; + this.markedByScytheWhip = false; + this.markedByThornWhip = false; + this.markedByFireWhip = false; + this.markedByRainbowWhip = false; + this.markedByBlandWhip = false; + this.markedBySwordWhip = false; + this.markedByMaceWhip = false; + this.lifeRegenExpectedLossPerSecond = -1; + } + + private void UpdateNPC_TeleportVisuals() + { + if ((double) this.teleportTime <= 0.0) + return; + if (this.teleportStyle == 0) + { + if ((double) Main.rand.Next(100) <= 100.0 * (double) this.teleportTime * 2.0) + { + int index = Dust.NewDust(new Vector2((float) this.getRect().X, (float) this.getRect().Y), this.getRect().Width, this.getRect().Height, 159); + Main.dust[index].scale = this.teleportTime * 1.5f; + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 1.1f; + } + } + else if (this.teleportStyle == 4) + { + this.teleportTime -= 0.02f; + if ((double) Main.rand.Next(100) <= 100.0 * (double) this.teleportTime) + { + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 263)]; + dust.color = PortalHelper.GetPortalColor(this.lastPortalColorIndex); + dust.noLight = true; + dust.noGravity = true; + dust.scale = 1.2f; + dust.fadeIn = 0.4f; + } + } + this.teleportTime -= 0.005f; + } + + private void UpdateNPC_CritterSounds() + { + if (Main.netMode == 2) + return; + if (this.type == 611 && !Main.dayTime && Main.rand.Next(700) == 0) + SoundEngine.PlaySound(46, (int) this.position.X, (int) this.position.Y); + if (this.type >= 602 && this.type <= 603 && Main.dayTime && Main.rand.Next(1200) == 0) + SoundEngine.PlaySound(44, (int) this.position.X, (int) this.position.Y); + if (this.type >= 362 && this.type <= 365) + { + if (!Main.dayTime || Main.rand.Next(200) != 0) + return; + SoundEngine.PlaySound(30, (int) this.position.X, (int) this.position.Y); + } + else if (this.type == 361 || this.type == 445) + { + if ((double) Math.Abs(this.velocity.X) >= 0.5 || Main.dayTime && (double) this.position.Y <= Main.worldSurface * 16.0 || Main.rand.Next(200) != 0) + return; + SoundEngine.PlaySound(31, (int) this.position.X, (int) this.position.Y); + } + else if (this.type == 74 || this.type == 297 || this.type == 298 || this.type == 442) + { + if (!Main.dayTime || Main.time >= 18000.0 || Main.rand.Next(400) != 0) + return; + if (this.type == 74) + { + if (Main.rand.Next(3) != 0) + SoundEngine.PlaySound(32, (int) this.position.X, (int) this.position.Y, 14); + else + SoundEngine.PlaySound(32, (int) this.position.X, (int) this.position.Y, 18); + } + if (this.type == 297) + SoundEngine.PlaySound(32, (int) this.position.X, (int) this.position.Y, 16); + if (this.type == 298) + { + if (Main.rand.Next(3) != 0) + SoundEngine.PlaySound(32, (int) this.position.X, (int) this.position.Y, 17); + else + SoundEngine.PlaySound(32, (int) this.position.X, (int) this.position.Y, 19); + } + if (this.type != 442) + return; + switch (Main.rand.Next(5)) + { + case 0: + SoundEngine.PlaySound(32, (int) this.position.X, (int) this.position.Y, 16); + break; + case 1: + SoundEngine.PlaySound(32, (int) this.position.X, (int) this.position.Y, 17); + break; + case 2: + SoundEngine.PlaySound(32, (int) this.position.X, (int) this.position.Y, 19); + break; + case 3: + SoundEngine.PlaySound(32, (int) this.position.X, (int) this.position.Y, 14); + break; + default: + SoundEngine.PlaySound(32, (int) this.position.X, (int) this.position.Y, 18); + break; + } + } + else + { + if (this.type != 300 && this.type != 447 && this.type != 610 || Main.rand.Next(1800) != 0) + return; + SoundEngine.PlaySound(33, (int) this.position.X, (int) this.position.Y); + } + } + + private void UpdateNPC_CastLights() + { + if (this.type >= 442 && this.type <= 448 || this.type == 539 || this.type == 592 || this.type == 593 || this.type == 601 || this.type == 605 || this.type == 627) + { + this.position = this.position + this.netOffset; + Color color = Lighting.GetColor((int) this.Center.X / 16, (int) this.Center.Y / 16); + if (color.R > (byte) 20 || color.B > (byte) 20 || color.G > (byte) 20) + { + int num1 = (int) color.R; + if ((int) color.G > num1) + num1 = (int) color.G; + if ((int) color.B > num1) + num1 = (int) color.B; + int num2 = num1 / 30; + if (Main.rand.Next(300) < num2) + { + int index = Dust.NewDust(this.position, this.width, this.height, 43, Alpha: 254, newColor: new Color((int) byte.MaxValue, (int) byte.MaxValue, 0), Scale: 0.5f); + Main.dust[index].velocity *= 0.0f; + } + } + this.position = this.position - this.netOffset; + } + if (this.type >= 254 && this.type <= 261 || this.type == 160 || this.type == 634 || this.type == 635) + { + float num3 = (float) Main.rand.Next(28, 42) * 0.005f + (float) (270 - (int) Main.mouseTextColor) / 500f; + float num4 = 0.1f; + float num5 = (float) (0.300000011920929 + (double) num3 / 2.0); + float num6 = 0.6f + num3; + float num7 = 0.35f; + if (this.type == 634) + num7 = 0.65f; + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, num4 * num7, num5 * num7, num6 * num7); + } + if (this.type == 209) + { + float num8 = (float) Main.rand.Next(28, 42) * 0.005f + (float) (270 - (int) Main.mouseTextColor) / 500f; + float num9 = 0.1f; + float num10 = (float) (0.300000011920929 + (double) num8 / 2.0); + float num11 = (float) (0.400000005960464 + (double) num8 / 2.0); + float num12 = 0.35f; + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, num9 * num12, num10 * num12, num11 * num12); + if ((double) this.ai[0] == 12.0) + Lighting.AddLight(this.Top, 0.3f, 0.1f, 0.1f); + } + if (this.type != 44) + return; + Lighting.AddLight((int) ((double) this.position.X + (double) (this.width / 2)) / 16, (int) ((double) this.position.Y + 4.0) / 16, 0.9f, 0.75f, 0.5f); + } + + private void GetHurtByOtherNPCs(bool[] acceptableNPCIDs) + { + if (this.dontTakeDamageFromHostiles) + return; + int specialHitSetter = 1; + float damageMultiplier = 1f; + if (this.immune[(int) byte.MaxValue] != 0) + return; + Microsoft.Xna.Framework.Rectangle hitbox1 = this.Hitbox; + for (int index = 0; index < 200; ++index) + { + NPC thatNPC = Main.npc[index]; + if (acceptableNPCIDs[thatNPC.type] && thatNPC.active && !thatNPC.friendly && thatNPC.damage > 0) + { + Microsoft.Xna.Framework.Rectangle hitbox2 = thatNPC.Hitbox; + NPC.GetMeleeCollisionData(hitbox1, index, ref specialHitSetter, ref damageMultiplier, ref hitbox2); + if (hitbox1.Intersects(hitbox2) && (this.type != 453 || !NPCID.Sets.Skeletons[thatNPC.type]) && thatNPC.type != 624) + this.BeHurtByOtherNPC(index, thatNPC); + } + } + } + + private void BeHurtByOtherNPC(int npcIndex, NPC thatNPC) + { + int num1 = 30; + if (this.type == 548) + num1 = 20; + int Damage1 = Main.DamageVar((float) thatNPC.damage); + int num2 = 6; + int hitDirection1 = (double) thatNPC.Center.X > (double) this.Center.X ? -1 : 1; + double num3 = this.StrikeNPCNoInteraction(Damage1, (float) num2, hitDirection1); + if (Main.netMode != 0) + NetMessage.SendData(28, number: this.whoAmI, number2: ((float) Damage1), number3: ((float) num2), number4: ((float) hitDirection1)); + this.netUpdate = true; + this.immune[(int) byte.MaxValue] = num1; + if (this.dryadWard) + { + int Damage2 = (int) num3 / 3; + int num4 = 6; + hitDirection1 *= -1; + thatNPC.StrikeNPCNoInteraction(Damage2, (float) num4, hitDirection1); + if (Main.netMode != 0) + NetMessage.SendData(28, number: npcIndex, number2: ((float) Damage2), number3: ((float) num4), number4: ((float) hitDirection1)); + thatNPC.netUpdate = true; + thatNPC.immune[(int) byte.MaxValue] = num1; + } + if (!NPCID.Sets.HurtingBees[thatNPC.type]) + return; + int damage = this.damage; + int num5 = 6; + int hitDirection2 = hitDirection1 * -1; + thatNPC.StrikeNPCNoInteraction(damage, (float) num5, hitDirection2); + if (Main.netMode != 0) + NetMessage.SendData(28, number: npcIndex, number2: ((float) damage), number3: ((float) num5), number4: ((float) hitDirection2)); + thatNPC.netUpdate = true; + thatNPC.immune[(int) byte.MaxValue] = num1; + } + + private void CheckLifeRegen() + { + if (this.life >= this.lifeMax) + return; + ++this.friendlyRegen; + if (this.dryadWard) + this.friendlyRegen += 10; + if (this.friendlyRegen <= 180) + return; + this.friendlyRegen = 0; + ++this.life; + this.netUpdate = true; + } + + public void GetImmuneTime(int fromWho, int time) + { + if (fromWho == -1) + { + for (int index = 0; index < this.immune.Length; ++index) + this.immune[index] = time; + } + else + { + if (fromWho < 0 || fromWho >= this.immune.Length) + return; + this.immune[fromWho] = time; + } + } + + private void UpdateCollision() + { + this.Collision_WalkDownSlopes(); + this.Collision_WaterCollision(this.Collision_LavaCollision()); + if (!this.wet) + { + this.lavaWet = false; + this.honeyWet = false; + } + if (this.wetCount > (byte) 0) + --this.wetCount; + bool fall = this.Collision_DecideFallThroughPlatforms(); + this.oldVelocity = this.velocity; + this.collideX = false; + this.collideY = false; + this.FishTransformationDuringRain(); + Vector2 cPosition; + int cWidth; + int cHeight; + this.GetTileCollisionParameters(out cPosition, out cWidth, out cHeight); + Vector2 velocity = this.velocity; + this.ApplyTileCollision(fall, cPosition, cWidth, cHeight); + if (this.wet) + { + if (this.honeyWet) + this.Collision_MoveWhileWet(velocity, this.honeyMovementSpeed); + else if (this.lavaWet) + this.Collision_MoveWhileWet(velocity, this.lavaMovementSpeed); + else + this.Collision_MoveWhileWet(velocity, this.waterMovementSpeed); + } + else + this.Collision_MoveWhileDry(); + if (this.aiStyle == 67) + { + this.Collision_MoveSnailOnSlopes(); + } + else + { + if (this.type == 72 || this.type == 247 || this.type == 248 || this.type >= 542 && this.type <= 545 || NPCID.Sets.BelongsToInvasionOldOnesArmy[this.type] && this.noGravity) + return; + this.Collision_MoveSlopesAndStairFall(fall); + if (!this.townNPC) + return; + Collision.StepConveyorBelt((Entity) this, 1f); + } + } + + private void Collision_MoveWhileDry() + { + if (Collision.up) + this.velocity.Y = 0.01f; + if ((double) this.oldVelocity.X != (double) this.velocity.X) + this.collideX = true; + if ((double) this.oldVelocity.Y != (double) this.velocity.Y) + this.collideY = true; + this.oldPosition = this.position; + this.oldDirection = this.direction; + this.position = this.position + this.velocity; + } + + private void ApplyTileCollision(bool fall, Vector2 cPosition, int cWidth, int cHeight) + { + if (this.type == 72) + this.Collision_MoveBlazingWheel(); + else if (this.type >= 542 && this.type <= 545) + this.Collision_MoveSandshark(fall, cPosition, cWidth, cHeight); + else if (this.type == 405 || this.type == 406) + this.Collision_MoveStardustCell(fall, cPosition, cWidth, cHeight); + else if (this.type == 417) + this.Collision_MoveSolarSroller(fall, cPosition, cWidth, cHeight); + else + this.Collision_MoveNormal(fall, cPosition, cWidth, cHeight); + } + + private void Collision_MoveSlopesAndStairFall(bool fall) + { + if (fall) + this.stairFall = true; + if (this.aiStyle == 7) + { + int x = (int) this.Center.X / 16; + int y = (int) this.position.Y / 16; + if (WorldGen.InWorld(x, y)) + { + int num = 16; + bool flag = false; + if (Main.tile[x, y] != null && Main.tile[x, y].active() && Main.tileSolid[(int) Main.tile[x, y].type]) + flag = true; + if (!this.townNPC) + flag = false; + if (!Main.dayTime || Main.eclipse) + flag = true; + else if (this.homeTileY - (int) ((double) this.position.Y + (double) this.height) / 16 > num) + flag = true; + if (flag) + this.stairFall = ((double) this.position.Y + (double) this.height - 8.0) / 16.0 < (double) this.homeTileY; + } + } + Vector2 cPosition; + int cWidth; + int cHeight; + this.GetTileCollisionParameters(out cPosition, out cWidth, out cHeight); + Vector2 vector2 = this.position - cPosition; + Vector4 vector4 = Collision.SlopeCollision(cPosition, this.velocity, cWidth, cHeight, NPC.gravity, this.stairFall); + if (Collision.stairFall) + this.stairFall = true; + else if (!fall) + this.stairFall = false; + if (Collision.stair && (double) Math.Abs(vector4.Y - this.position.Y) > 8.0) + { + this.gfxOffY -= vector4.Y - this.position.Y; + this.stepSpeed = 2f; + } + this.position.X = vector4.X; + this.position.Y = vector4.Y; + this.velocity.X = vector4.Z; + this.velocity.Y = vector4.W; + this.position = this.position + vector2; + } + + private void Collision_MoveSnailOnSlopes() + { + Vector4 vector4 = Collision.SlopeCollision(this.position, this.velocity, this.width, this.height, NPC.gravity); + if ((double) this.position.X != (double) vector4.X || (double) this.position.Y != (double) vector4.Y) + { + if ((double) this.ai[2] == 0.0 && (double) this.velocity.Y > 0.0 && (this.direction < 0 && (double) this.rotation == 1.57000005245209 && this.spriteDirection == 1 || this.direction > 0 && (double) this.rotation == 4.71000003814697 && this.spriteDirection == -1)) + this.direction *= -this.direction; + this.ai[2] = 2f; + this.directionY = 1; + this.rotation = 0.0f; + } + this.position.X = vector4.X; + this.position.Y = vector4.Y; + this.velocity.X = vector4.Z; + this.velocity.Y = vector4.W; + } + + private void Collision_MoveNormal(bool fall, Vector2 cPosition, int cWidth, int cHeight) => this.velocity = Collision.TileCollision(cPosition, this.velocity, cWidth, cHeight, fall, fall); + + private void Collision_MoveSandshark(bool fall, Vector2 cPosition, int cWidth, int cHeight) => this.velocity = Collision.AdvancedTileCollision(TileID.Sets.ForAdvancedCollision.ForSandshark, cPosition, this.velocity, cWidth, cHeight, fall, fall); + + private void Collision_MoveSolarSroller(bool fall, Vector2 cPosition, int cWidth, int cHeight) + { + this.velocity = Collision.TileCollision(cPosition, this.velocity, cWidth, cHeight, fall, fall); + if ((double) this.ai[0] != 6.0 || !(this.velocity != this.oldVelocity)) + return; + --this.ai[2]; + this.ai[3] = 1f; + if ((double) this.ai[2] <= 0.0) + return; + if ((double) this.velocity.X != 0.0 && (double) this.velocity.X != (double) this.oldVelocity.X) + { + this.velocity.X = (float) (-(double) this.oldVelocity.X * 0.899999976158142); + this.direction *= -1; + } + if ((double) this.velocity.Y == 0.0 || (double) this.velocity.Y == (double) this.oldVelocity.Y) + return; + this.velocity.Y = (float) (-(double) this.oldVelocity.Y * 0.899999976158142); + } + + private void Collision_MoveStardustCell(bool fall, Vector2 cPosition, int cWidth, int cHeight) + { + this.velocity = Collision.TileCollision(cPosition, this.velocity, cWidth, cHeight, fall, fall); + if (!(this.velocity != this.oldVelocity)) + return; + if ((double) this.velocity.X != 0.0 && (double) this.velocity.X != (double) this.oldVelocity.X) + this.velocity.X = (float) (-(double) this.oldVelocity.X * 0.800000011920929); + if ((double) this.velocity.Y == 0.0 || (double) this.velocity.Y == (double) this.oldVelocity.Y) + return; + this.velocity.Y = (float) (-(double) this.oldVelocity.Y * 0.800000011920929); + } + + private void Collision_MoveBlazingWheel() + { + Vector2 Position = new Vector2(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2)); + int Width = 12; + int Height = 12; + Position.X -= (float) (Width / 2); + Position.Y -= (float) (Height / 2); + this.velocity = Collision.noSlopeCollision(Position, this.velocity, Width, Height, true, true); + } + + private void Collision_MoveWhileWet(Vector2 oldDryVelocity, float Slowdown = 0.5f) + { + if (Collision.up) + this.velocity.Y = 0.01f; + Vector2 vector2 = this.velocity * Slowdown; + if ((double) this.velocity.X != (double) oldDryVelocity.X) + { + vector2.X = this.velocity.X; + this.collideX = true; + } + if ((double) this.velocity.Y != (double) oldDryVelocity.Y) + { + vector2.Y = this.velocity.Y; + this.collideY = true; + } + this.oldPosition = this.position; + this.oldDirection = this.direction; + this.position = this.position + vector2; + } + + public void GetTileCollisionParameters(out Vector2 cPosition, out int cWidth, out int cHeight) + { + cPosition = this.position; + cWidth = this.width; + cHeight = this.height; + if (this.type == 594) + { + int num = (int) (44.0 + 20.0 * (double) this.ai[1]); + cPosition.Y += (float) num; + cHeight += num; + cPosition.X += (float) (cWidth / 2); + cWidth = (int) (6.0 + 26.0 * (double) this.ai[1]); + cPosition.X -= (float) (cWidth / 2); + } + if (this.type == 243) + cHeight = 90; + if (this.type == 290) + cHeight = 40; + if (this.type == 351) + cHeight = 40; + if (this.type == 482) + cHeight = 40; + if (this.type == 351 || this.type == 343 || this.type == 348 || this.type == 349) + cHeight = 40; + if (this.type == 391) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 390 && (double) Main.npc[index].ai[0] == (double) this.whoAmI) + { + cHeight = 62; + break; + } + } + } + if (this.type == 415) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 416 && (double) Main.npc[index].ai[0] == (double) this.whoAmI) + { + cHeight = 62; + break; + } + } + } + if (this.type == 576 || this.type == 577) + { + cPosition.X += 32f; + cWidth -= 64; + } + if (cHeight == this.height) + return; + cPosition.Y += (float) (this.height - cHeight); + } + + private void FishTransformationDuringRain() + { + if (Main.netMode == 1) + return; + if (this.type == 230 && this.wet) + { + int direction = this.direction; + Vector2 velocity = this.velocity; + this.Transform(55); + this.direction = direction; + this.velocity = velocity; + this.wet = true; + if ((double) this.velocity.Y >= 0.0) + return; + this.velocity.Y = 0.0f; + } + else if (this.type == 55 && !this.wet && Main.raining) + { + int direction = this.direction; + Vector2 velocity = this.velocity; + this.Transform(230); + this.direction = direction; + this.velocity = velocity; + this.homeTileX = (int) ((double) this.position.X / 16.0) + 10 * this.direction; + } + else if (this.type == 593 && this.wet) + { + int direction = this.direction; + Vector2 velocity = this.velocity; + this.Transform(592); + this.direction = direction; + this.velocity = velocity; + this.wet = true; + if ((double) this.velocity.Y >= 0.0) + return; + this.velocity.Y = 0.0f; + } + else + { + if (this.type != 592 || this.wet || !Main.raining) + return; + int direction = this.direction; + Vector2 velocity = this.velocity; + this.Transform(593); + this.direction = direction; + this.velocity = velocity; + this.homeTileX = (int) ((double) this.position.X / 16.0) + 10 * this.direction; + } + } + + private bool Collision_DecideFallThroughPlatforms() + { + bool flag1 = false; + if (this.type == 2 || this.type == -43 || this.type == 190 || this.type == 191 || this.type == 192 || this.type == 193 || this.type == 194 || this.type == 317 || this.type == 318 || this.type == 133) + flag1 = true; + if (this.aiStyle == 10) + flag1 = true; + if (this.aiStyle == 5) + flag1 = true; + if (this.aiStyle == 40) + flag1 = true; + if (this.aiStyle == 44) + flag1 = true; + if (this.type == 467) + flag1 = true; + if (this.type == 477) + flag1 = true; + if (this.aiStyle == 14) + flag1 = true; + if (this.type == 173) + flag1 = true; + if (this.type == 469 && (double) this.ai[2] == 1.0) + flag1 = true; + if (this.aiStyle == 3 && this.directionY == 1) + flag1 = true; + if (this.type == 210 || this.type == 211) + flag1 = true; + if (this.type == 50 && this.target >= 0 && (double) Main.player[this.target].position.Y > (double) this.position.Y + (double) this.height) + flag1 = true; + if (this.type == 657 && this.target >= 0 && (double) Main.player[this.target].position.Y > (double) this.Bottom.Y) + flag1 = true; + if (this.type == 247 || this.type == 248) + flag1 = true; + if (this.type == 245 && this.target >= 0 && (double) Main.player[this.target].position.Y > (double) this.position.Y + (double) this.height) + flag1 = true; + if (this.type >= 542 && this.type <= 545) + flag1 = true; + if (this.aiStyle == 107 && this.directionY == 1) + flag1 = true; + if (this.type == 418) + flag1 = true; + if (this.aiStyle == 87 && (double) Main.player[this.target].position.Y > (double) this.position.Y + (double) this.height) + flag1 = true; + if (this.type == 405 || this.type == 406) + flag1 = true; + if (this.type == 490) + flag1 = true; + if (this.type == 301) + flag1 = true; + if (this.aiStyle == 7) + { + int num = 16; + bool flag2 = false; + if (this.townNPC && (!Main.dayTime || Main.invasionType > 0 || Main.eclipse)) + flag2 = true; + else if (this.homeTileY - (int) ((double) this.position.Y + (double) this.height) / 16 > num) + flag1 = true; + if (flag2 && ((double) this.position.Y + (double) this.height - 8.0) / 16.0 < (double) (this.homeTileY - 1)) + flag1 = true; + } + return flag1; + } + + private bool Collision_WaterCollision(bool lava) + { + bool flag; + if (this.type == 72 || this.aiStyle == 21 || this.aiStyle == 67 || this.type == 376 || this.type == 579 || this.type == 541) + { + flag = false; + this.wetCount = (byte) 0; + lava = false; + } + else + { + flag = Collision.WetCollision(this.position, this.width, this.height); + if (Collision.honey) + this.honeyWet = true; + } + if (this.aiStyle == 116) + this.wetCount = (byte) 10; + if (flag) + { + if (this.onFire && !this.lavaWet && Main.netMode != 1) + { + for (int buffIndex = 0; buffIndex < 5; ++buffIndex) + { + if (this.buffType[buffIndex] == 24) + this.DelBuff(buffIndex); + } + } + if (!this.wet && this.wetCount == (byte) 0) + { + this.wetCount = (byte) 10; + if (!lava) + { + if (this.honeyWet) + { + for (int index1 = 0; index1 < 10; ++index1) + { + int index2 = Dust.NewDust(new Vector2(this.position.X - 6f, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width + 12, 24, 152); + --Main.dust[index2].velocity.Y; + Main.dust[index2].velocity.X *= 2.5f; + Main.dust[index2].scale = 1.3f; + Main.dust[index2].alpha = 100; + Main.dust[index2].noGravity = true; + } + if (this.aiStyle != 1 && this.type != 1 && this.type != 16 && this.type != 147 && this.type != 59 && this.type != 300 && this.aiStyle != 39 && !this.noGravity) + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + else if (this.type != 617 && this.type != 616 && this.type != 625) + { + for (int index3 = 0; index3 < 30; ++index3) + { + int index4 = Dust.NewDust(new Vector2(this.position.X - 6f, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width + 12, 24, Dust.dustWater()); + Main.dust[index4].velocity.Y -= 4f; + Main.dust[index4].velocity.X *= 2.5f; + Main.dust[index4].scale *= 0.8f; + Main.dust[index4].alpha = 100; + Main.dust[index4].noGravity = true; + } + if (this.type != 376 && this.type != 579 && this.aiStyle != 1 && this.type != 1 && this.type != 16 && this.type != 147 && this.type != 59 && this.type != 300 && this.aiStyle != 39 && this.aiStyle != 68 && this.type != 362 && this.type != 364 && this.type != 361 && this.type != 445 && !this.noGravity || this.type == 615) + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y, 0); + } + } + else + { + for (int index5 = 0; index5 < 10; ++index5) + { + int index6 = Dust.NewDust(new Vector2(this.position.X - 6f, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width + 12, 24, 35); + Main.dust[index6].velocity.Y -= 1.5f; + Main.dust[index6].velocity.X *= 2.5f; + Main.dust[index6].scale = 1.3f; + Main.dust[index6].alpha = 100; + Main.dust[index6].noGravity = true; + } + if (this.aiStyle != 1 && this.type != 1 && this.type != 16 && this.type != 147 && this.type != 59 && this.type != 300 && this.aiStyle != 39 && !this.noGravity) + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + } + this.wet = true; + } + else if (this.wet) + { + this.velocity.X *= 0.5f; + this.wet = false; + if (this.type == 620 && (double) this.GetTargetData().Center.Y < (double) this.Center.Y) + this.velocity.Y -= 8f; + if (this.wetCount == (byte) 0) + { + this.wetCount = (byte) 10; + if (!this.lavaWet) + { + if (this.honeyWet) + { + for (int index7 = 0; index7 < 10; ++index7) + { + int index8 = Dust.NewDust(new Vector2(this.position.X - 6f, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width + 12, 24, 152); + --Main.dust[index8].velocity.Y; + Main.dust[index8].velocity.X *= 2.5f; + Main.dust[index8].scale = 1.3f; + Main.dust[index8].alpha = 100; + Main.dust[index8].noGravity = true; + } + if (this.aiStyle != 1 && this.type != 1 && this.type != 16 && this.type != 147 && this.type != 300 && this.type != 59 && this.aiStyle != 39 && !this.noGravity) + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + else if (this.type != 617 && this.type != 616 && this.type != 625) + { + for (int index9 = 0; index9 < 30; ++index9) + { + int index10 = Dust.NewDust(new Vector2(this.position.X - 6f, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width + 12, 24, Dust.dustWater()); + Main.dust[index10].velocity.Y -= 4f; + Main.dust[index10].velocity.X *= 2.5f; + Main.dust[index10].scale *= 0.8f; + Main.dust[index10].alpha = 100; + Main.dust[index10].noGravity = true; + } + if (this.type != 376 && this.type != 579 && this.aiStyle != 1 && this.type != 1 && this.type != 16 && this.type != 59 && this.type != 300 && this.aiStyle != 39 && this.aiStyle != 68 && this.type != 362 && this.type != 364 && this.type != 361 && this.type != 445 && !this.noGravity || this.type == 615) + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y, 0); + } + } + else + { + for (int index11 = 0; index11 < 10; ++index11) + { + int index12 = Dust.NewDust(new Vector2(this.position.X - 6f, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width + 12, 24, 35); + Main.dust[index12].velocity.Y -= 1.5f; + Main.dust[index12].velocity.X *= 2.5f; + Main.dust[index12].scale = 1.3f; + Main.dust[index12].alpha = 100; + Main.dust[index12].noGravity = true; + } + if (this.aiStyle != 1 && this.type != 1 && this.type != 16 && this.type != 59 && this.type != 300 && this.aiStyle != 39 && !this.noGravity) + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + } + } + return lava; + } + + private bool Collision_LavaCollision() + { + int num = Collision.LavaCollision(this.position, this.width, this.height) ? 1 : 0; + if (num == 0) + return num != 0; + this.lavaWet = true; + if (this.lavaImmune) + return num != 0; + if (this.dontTakeDamage) + return num != 0; + if (Main.netMode == 1) + return num != 0; + if (this.immune[(int) byte.MaxValue] != 0) + return num != 0; + this.AddBuff(24, 420); + this.immune[(int) byte.MaxValue] = 30; + this.StrikeNPCNoInteraction(50, 0.0f, 0); + if (Main.netMode != 2) + return num != 0; + if (Main.netMode == 0) + return num != 0; + NetMessage.SendData(28, number: this.whoAmI, number2: 50f); + return num != 0; + } + + private void Collision_WalkDownSlopes() + { + Vector2 velocity = this.velocity; + Vector4 vector4 = Collision.WalkDownSlope(this.position, this.velocity, this.width, this.height, NPC.gravity); + this.position.X = vector4.X; + this.position.Y = vector4.Y; + this.velocity.X = vector4.Z; + this.velocity.Y = vector4.W; + } + + public static void setFireFlyChance() + { + if (Main.rand == null) + Main.rand = new UnifiedRandom((int) DateTime.Now.Ticks); + if (WorldGen.genRand.Next(9) == 0) + { + NPC.fireFlyChance = Main.rand.Next(5, 10); + NPC.fireFlyFriendly = Main.rand.Next(1, 4); + NPC.fireFlyMultiple = Main.rand.Next(3, 8); + } + else if (WorldGen.genRand.Next(3) == 0) + { + NPC.fireFlyChance = 999999; + NPC.fireFlyFriendly = 999999; + NPC.fireFlyMultiple = 999999; + } + else + { + NPC.fireFlyChance = Main.rand.Next(10, 60); + NPC.fireFlyFriendly = Main.rand.Next(2, 15); + NPC.fireFlyMultiple = Main.rand.Next(6, 30); + } + NPC.butterflyChance = Main.rand.Next(1, 25); + if (WorldGen.genRand.Next(4) != 0) + return; + NPC.butterflyChance = 999999; + } + + public Color GetBestiaryEntryColor() => Color.White; + + public Color GetAlpha(Color newColor) + { + if (this.IsABestiaryIconDummy) + newColor = Color.White; + float num1 = (float) ((int) byte.MaxValue - this.alpha) / (float) byte.MaxValue; + int r1 = (int) ((double) newColor.R * (double) num1); + int g1 = (int) ((double) newColor.G * (double) num1); + int b1 = (int) ((double) newColor.B * (double) num1); + int a = (int) newColor.A - this.alpha; + if (this.type == 402) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + if (this.type == 484) + return new Color(250, 250, 250, 200); + if (this.type >= 542 && this.type <= 545 && r1 + g1 + b1 > 10 && r1 + g1 + b1 >= 60) + { + r1 *= 2; + g1 *= 2; + b1 *= 2; + if (r1 > (int) byte.MaxValue) + r1 = (int) byte.MaxValue; + if (g1 > (int) byte.MaxValue) + g1 = (int) byte.MaxValue; + if (b1 > (int) byte.MaxValue) + b1 = (int) byte.MaxValue; + } + if (this.type == 662) + { + Color color = Color.Lerp(Color.White, Color.Cyan, 0.5f); + color.A /= (byte) 4; + return color * this.Opacity; + } + if (this.type >= 454 && this.type <= 459 || this.type == 521) + { + newColor = Color.Lerp(newColor, Color.White, 0.4f); + newColor.A = (byte) 150; + newColor *= (float) a / (float) byte.MaxValue; + return newColor; + } + if (this.type == 636) + { + newColor = Color.Lerp(newColor, Color.White, 0.25f); + return newColor * this.Opacity; + } + if (this.type == 440) + { + byte num2 = 180; + if (Main.expertMode) + num2 = (byte) 210; + byte num3 = (byte) ((double) num2 * (double) num1); + return new Color((int) num3, (int) num3, (int) num3, (int) num3); + } + if (this.type == 583 || this.type == 584 || this.type == 585) + { + newColor = Color.Lerp(newColor, Color.White, 0.5f); + return newColor; + } + if (this.type == 516) + return new Color(this.alpha, this.alpha, this.alpha, this.alpha); + if (this.type == 522) + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha); + if (this.type == 523) + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha); + if (this.type == 395 || this.type == 519) + { + newColor = Color.Lerp(newColor, Color.White, 0.4f); + return newColor; + } + if (this.type == 370 && (double) this.ai[0] != -1.0 && (double) this.ai[0] < 9.0) + { + float num4 = MathHelper.Lerp(num1, 1f, 0.25f); + if ((double) num4 > 1.0) + num4 = 1f; + b1 = (int) ((double) newColor.B * (double) num4); + } + if (this.type == 30) + return new Color(250, 250, 250, 100); + if (!this.IsABestiaryIconDummy && (this.type == 25 || this.type == 30 || this.type == 59 || this.type == 60)) + return new Color(200, 200, 200, 0); + if (this.type == 360) + { + int r2 = (int) newColor.R; + int g2 = (int) newColor.G; + int b2 = (int) newColor.B; + if (r2 < 75) + r2 = 75; + if (g2 < 175) + g2 = 175; + if (b2 < (int) byte.MaxValue) + b2 = (int) byte.MaxValue; + return new Color(r2, g2, b2, (int) byte.MaxValue); + } + if (this.type == 655) + { + int r3 = (int) newColor.R; + int g3 = (int) newColor.G; + int b3 = (int) newColor.B; + if (r3 < (int) byte.MaxValue) + r3 = (int) byte.MaxValue; + if (g3 < 100) + g3 = 100; + if (b3 < 50) + b3 = 50; + return new Color(r3, g3, b3, (int) byte.MaxValue); + } + if (this.type == 352) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 200); + if (this.type == 72) + { + r1 = (int) newColor.R; + g1 = (int) newColor.G; + b1 = (int) newColor.B; + } + else + { + if (this.type == 288) + return new Color(200, 200, 200, 0); + if (this.type == 289) + return new Color(250, 250, 250, 50); + if (this.type >= 254 && this.type <= 261) + { + b1 = (int) byte.MaxValue; + if (r1 < 100) + r1 = 100; + if (g1 < 150) + g1 = 150; + } + else if (this.type == 374 || this.type == 634 || this.type == 635) + { + b1 = (int) byte.MaxValue; + if (r1 < 100) + r1 = 100; + if (g1 < 150) + g1 = 150; + } + else + { + if (this.type == 549) + { + newColor = Color.Lerp(newColor, Color.White, 0.4f); + newColor *= (float) a / (float) byte.MaxValue; + return newColor; + } + if (this.type == 64 || this.type == 63 || this.type == 75 || this.type == 103 || this.type == 400) + { + r1 = (int) ((double) newColor.R * 1.5); + g1 = (int) ((double) newColor.G * 1.5); + b1 = (int) ((double) newColor.B * 1.5); + if (r1 > (int) byte.MaxValue) + r1 = (int) byte.MaxValue; + if (g1 > (int) byte.MaxValue) + g1 = (int) byte.MaxValue; + if (b1 > (int) byte.MaxValue) + b1 = (int) byte.MaxValue; + } + } + } + if (a < 0) + a = 0; + if (a > (int) byte.MaxValue) + a = (int) byte.MaxValue; + return new Color(r1, g1, b1, a); + } + + public Color GetColor(Color newColor) + { + if (this.IsABestiaryIconDummy) + newColor = this.GetBestiaryEntryColor(); + int r = (int) this.color.R - ((int) byte.MaxValue - (int) newColor.R); + int g = (int) this.color.G - ((int) byte.MaxValue - (int) newColor.G); + int b = (int) this.color.B - ((int) byte.MaxValue - (int) newColor.B); + int a = (int) this.color.A - ((int) byte.MaxValue - (int) newColor.A); + if (r < 0) + r = 0; + if (r > (int) byte.MaxValue) + r = (int) byte.MaxValue; + if (g < 0) + g = 0; + if (g > (int) byte.MaxValue) + g = (int) byte.MaxValue; + if (b < 0) + b = 0; + if (b > (int) byte.MaxValue) + b = (int) byte.MaxValue; + if (a < 0) + a = 0; + if (a > (int) byte.MaxValue) + a = (int) byte.MaxValue; + return new Color(r, g, b, a); + } + + public bool ShouldBestiaryGirlBeLycantrope() + { + if (Main.bloodMoon && !Main.dayTime) + return true; + return Main.moonPhase == 0 && !Main.dayTime; + } + + public string GetChat() + { + Recipe.FindRecipes(); + bool flag1 = false; + bool flag2 = false; + bool flag3 = false; + bool flag4 = false; + bool flag5 = false; + bool flag6 = false; + bool flag7 = false; + bool flag8 = false; + bool flag9 = false; + bool flag10 = false; + bool flag11 = false; + bool flag12 = false; + bool flag13 = false; + bool flag14 = false; + bool flag15 = false; + bool flag16 = false; + bool flag17 = false; + object substitutionObject = Lang.CreateDialogSubstitutionObject(this); + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active) + { + if (Main.npc[index].type == 17) + flag1 = true; + else if (Main.npc[index].type == 18) + flag2 = true; + else if (Main.npc[index].type == 19) + flag3 = true; + else if (Main.npc[index].type == 20) + flag4 = true; + else if (Main.npc[index].type == 37) + flag5 = true; + else if (Main.npc[index].type == 38) + flag6 = true; + else if (Main.npc[index].type == 124) + flag7 = true; + else if (Main.npc[index].type == 107) + flag8 = true; + else if (Main.npc[index].type == 54) + flag9 = true; + else if (Main.npc[index].type == 160) + flag10 = true; + else if (Main.npc[index].type == 178) + flag11 = true; + else if (Main.npc[index].type == 229) + flag12 = true; + else if (Main.npc[index].type == 209) + flag13 = true; + else if (Main.npc[index].type == 208) + flag14 = true; + else if (Main.npc[index].type == 353) + flag15 = true; + else if (Main.npc[index].type == 22) + flag16 = true; + else if (Main.npc[index].type == 441) + flag17 = true; + } + } + string str = ""; + string specialEventText = ""; + if (this.type == 17) + { + if (this.HasSpecialEventText("Merchant", out specialEventText)) + str = specialEventText; + else if (!NPC.downedBoss1 && Main.rand.Next(3) == 0) + str = Main.player[Main.myPlayer].statLifeMax >= 200 ? (Main.player[Main.myPlayer].statDefense > 10 ? Lang.dialog(3) : Lang.dialog(2)) : Lang.dialog(1); + else if (Main.dayTime) + { + if (Main.time < 16200.0) + { + switch (Main.rand.Next(3)) + { + case 0: + str = Lang.dialog(4); + break; + case 1: + str = Lang.dialog(5); + break; + default: + str = Lang.dialog(6); + break; + } + } + else if (Main.time > 37800.0) + { + switch (Main.rand.Next(3)) + { + case 0: + str = Lang.dialog(7); + break; + case 1: + str = Lang.dialog(8); + break; + default: + str = Lang.dialog(9); + break; + } + } + else + { + switch (Main.rand.Next(3)) + { + case 0: + str = Lang.dialog(10); + break; + case 1: + str = Lang.dialog(11); + break; + default: + str = Lang.dialog(12); + break; + } + } + } + else if (Main.bloodMoon) + { + if (flag2 & flag7 && Main.rand.Next(3) == 0) + { + str = Lang.dialog(13); + } + else + { + switch (Main.rand.Next(4)) + { + case 0: + str = Lang.dialog(14); + break; + case 1: + str = Lang.dialog(15); + break; + case 2: + str = Lang.dialog(16); + break; + default: + str = Lang.dialog(17); + break; + } + } + } + else if (Main.time < 9720.0) + str = Main.rand.Next(2) != 0 ? Lang.dialog(19) : Lang.dialog(18); + else if (Main.time > 22680.0) + { + str = Main.rand.Next(2) != 0 ? Lang.dialog(21) : Lang.dialog(20); + } + else + { + switch (Main.rand.Next(3)) + { + case 0: + str = Lang.dialog(22); + break; + case 1: + str = Lang.dialog(23); + break; + default: + str = Lang.dialog(24); + break; + } + } + } + else if (this.type == 18) + { + if (this.HasSpecialEventText("Nurse", out specialEventText)) + str = specialEventText; + else if (Main.bloodMoon) + { + if ((double) Main.player[Main.myPlayer].statLife < (double) Main.player[Main.myPlayer].statLifeMax2 * 0.66) + { + switch (Main.rand.Next(3)) + { + case 0: + str = Lang.dialog(25); + break; + case 1: + str = Lang.dialog(26); + break; + default: + str = Lang.dialog(27); + break; + } + } + else + { + switch (Main.rand.Next(4)) + { + case 0: + str = Lang.dialog(28); + break; + case 1: + str = Lang.dialog(29); + break; + case 2: + str = Lang.dialog(30); + break; + default: + str = Lang.dialog(31); + break; + } + } + } + else if (Main.rand.Next(3) == 0 && !NPC.downedBoss3) + str = Lang.dialog(32); + else if (flag6 && Main.rand.Next(4) == 0) + str = Lang.dialog(33); + else if (flag3 && Main.rand.Next(4) == 0) + str = Lang.dialog(34); + else if (flag16 && Main.rand.Next(4) == 0) + str = Lang.dialog(35); + else if ((double) Main.player[Main.myPlayer].statLife < (double) Main.player[Main.myPlayer].statLifeMax2 * 0.33) + { + switch (Main.rand.Next(5)) + { + case 0: + str = Lang.dialog(36); + break; + case 1: + str = Lang.dialog(37); + break; + case 2: + str = Lang.dialog(38); + break; + case 3: + str = Lang.dialog(39); + break; + default: + str = Lang.dialog(40); + break; + } + } + else if ((double) Main.player[Main.myPlayer].statLife < (double) Main.player[Main.myPlayer].statLifeMax2 * 0.66) + { + switch (Main.rand.Next(7)) + { + case 0: + str = Lang.dialog(41); + break; + case 1: + str = Lang.dialog(42); + break; + case 2: + str = Lang.dialog(43); + break; + case 3: + str = Lang.dialog(44); + break; + case 4: + str = Lang.dialog(45); + break; + case 5: + str = Lang.dialog(46); + break; + default: + str = Lang.dialog(47); + break; + } + } + else + { + LocalizedText[] all = Language.FindAll(Lang.CreateDialogFilter("NurseChatter.", substitutionObject)); + int num = Main.rand.Next(4 + all.Length); + str = num < 4 ? (num != 0 ? (num != 1 ? (num != 2 ? Lang.dialog(51) : Lang.dialog(50)) : Lang.dialog(49)) : Lang.dialog(48)) : all[num - 4].FormatWith(substitutionObject); + } + } + else if (this.type == 19) + { + if (this.HasSpecialEventText("ArmsDealer", out specialEventText)) + str = specialEventText; + else if (flag16 && NPC.downedBoss3 && !Main.hardMode) + str = Lang.dialog(58); + else if (flag2 && Main.rand.Next(5) == 0) + str = Lang.dialog(59); + else if (flag2 && Main.rand.Next(5) == 0) + str = Lang.dialog(60); + else if (flag4 && Main.rand.Next(5) == 0) + str = Lang.dialog(61); + else if (flag6 && Main.rand.Next(5) == 0) + str = Lang.dialog(62); + else if (flag6 && Main.rand.Next(5) == 0) + str = Lang.dialog(63); + else if (Main.bloodMoon) + { + str = Main.rand.Next(2) != 0 ? Lang.dialog(65) : Lang.dialog(64); + } + else + { + switch (Main.rand.Next(3)) + { + case 0: + str = Lang.dialog(66); + break; + case 1: + str = Lang.dialog(67); + break; + default: + str = Lang.dialog(68); + break; + } + } + } + else if (this.type == 20) + { + if (this.HasSpecialEventText("Dryad", out specialEventText)) + str = specialEventText; + else if (DD2Event.DownedInvasionT1 && Main.rand.Next(6) == 0) + str = !DD2Event.DownedInvasionT2 ? Language.GetTextValueWith("DryadSpecialText.AfterDD2Tier1", substitutionObject) : Language.GetTextValueWith("DryadSpecialText.AfterDD2Tier2", substitutionObject); + else if (!NPC.downedBoss2 && Main.rand.Next(3) == 0) + str = !WorldGen.crimson ? Lang.dialog(69) : Lang.dialog(332); + else if (flag3 && Main.rand.Next(6) == 0) + str = Lang.dialog(70); + else if (flag1 && Main.rand.Next(6) == 0) + str = Lang.dialog(71); + else if (flag5 && Main.rand.Next(6) == 0) + str = Lang.dialog(72); + else if (flag10 && Main.rand.Next(6) == 0) + str = Lang.dialog(238); + else if (Main.bloodMoon) + { + switch (Main.rand.Next(4)) + { + case 0: + str = Lang.dialog(73); + break; + case 1: + str = Lang.dialog(74); + break; + case 2: + str = Lang.dialog(75); + break; + default: + str = Lang.dialog(76); + break; + } + } + else + { + switch (Main.rand.Next(5)) + { + case 0: + str = !WorldGen.crimson ? Lang.dialog(77) : Lang.dialog(333); + break; + case 1: + str = Lang.dialog(78); + break; + case 2: + str = Lang.dialog(79); + break; + case 3: + str = Lang.dialog(80); + break; + default: + str = Lang.dialog(81); + break; + } + } + } + else if (this.type == 37) + { + if (Main.dayTime) + { + switch (Main.rand.Next(3)) + { + case 0: + str = Lang.dialog(82); + break; + case 1: + str = Lang.dialog(83); + break; + default: + str = Lang.dialog(84); + break; + } + } + else if (Main.player[Main.myPlayer].statLifeMax < 300 || Main.player[Main.myPlayer].statDefense < 10) + { + switch (Main.rand.Next(4)) + { + case 0: + str = Lang.dialog(85); + break; + case 1: + str = Lang.dialog(86); + break; + case 2: + str = Lang.dialog(87); + break; + default: + str = Lang.dialog(88); + break; + } + } + else + { + switch (Main.rand.Next(4)) + { + case 0: + str = Lang.dialog(89); + break; + case 1: + str = Lang.dialog(90); + break; + case 2: + str = Lang.dialog(91); + break; + default: + str = Lang.dialog(92); + break; + } + } + } + else if (this.type == 38) + { + if (this.HasSpecialEventText("Demolitionist", out specialEventText)) + str = specialEventText; + else if (!NPC.downedBoss2 && Main.rand.Next(3) == 0) + str = Lang.dialog(93); + else if (Main.bloodMoon) + { + switch (Main.rand.Next(3)) + { + case 0: + str = Lang.dialog(94); + break; + case 1: + str = Lang.dialog(95); + break; + default: + str = Lang.dialog(96); + break; + } + } + else if ((DD2Event.DownedInvasionT1 || DD2Event.Ongoing) && Main.rand.Next(5) == 0) + str = Language.GetTextValueWith("DemolitionistSpecialText.AfterDD2Start", substitutionObject); + else if (flag3 && Main.rand.Next(5) == 0) + str = Lang.dialog(97); + else if (flag3 && Main.rand.Next(5) == 0) + str = Lang.dialog(98); + else if (flag2 && Main.rand.Next(4) == 0) + str = Lang.dialog(99); + else if (flag4 && Main.rand.Next(4) == 0) + str = Lang.dialog(100); + else if (!Main.dayTime) + { + switch (Main.rand.Next(4)) + { + case 0: + str = Lang.dialog(101); + break; + case 1: + str = Lang.dialog(102); + break; + case 2: + str = Lang.dialog(103); + break; + default: + str = Lang.dialog(104); + break; + } + } + else + { + switch (Main.rand.Next(5)) + { + case 0: + str = Lang.dialog(105); + break; + case 1: + str = Lang.dialog(106); + break; + case 2: + str = Lang.dialog(107); + break; + case 3: + str = Lang.dialog(108); + break; + default: + str = Lang.dialog(109); + break; + } + } + } + else if (this.type == 54) + { + if (this.HasSpecialEventText("Clothier", out specialEventText)) + str = specialEventText; + else if (!flag7 && Main.rand.Next(2) == 0) + str = Lang.dialog(110); + else if (flag10 && Main.rand.Next(6) == 0) + str = Lang.dialog(237); + else if (Main.bloodMoon) + str = Lang.dialog(111); + else if (flag2 && Main.rand.Next(4) == 0) + str = Lang.dialog(112); + else if (Main.player[Main.myPlayer].head == 24) + { + str = Lang.dialog(113); + } + else + { + switch (Main.rand.Next(6)) + { + case 0: + str = Lang.dialog(114); + break; + case 1: + str = Lang.dialog(115); + break; + case 2: + str = Lang.dialog(116); + break; + case 3: + str = Lang.dialog(117); + break; + case 4: + str = Lang.dialog(118); + break; + default: + str = Lang.dialog(119); + break; + } + } + } + else if (this.type == 105) + str = Lang.dialog(120); + else if (this.type == 107) + { + if (this.homeless) + { + switch (Main.rand.Next(5)) + { + case 0: + str = Lang.dialog(121); + break; + case 1: + str = Lang.dialog(122); + break; + case 2: + str = Lang.dialog(123); + break; + case 3: + str = Lang.dialog(124); + break; + default: + str = Lang.dialog(125); + break; + } + } + else if (this.HasSpecialEventText("GoblinTinkerer", out specialEventText)) + str = specialEventText; + else if (flag7 && Main.rand.Next(5) == 0) + str = Lang.dialog(126); + else if (flag15 && Main.rand.Next(5) == 0) + { + str = Lang.dialog(309); + } + else + { + LocalizedText[] all = Language.FindAll(Lang.CreateDialogFilter("GoblinTinkererChatter.", substitutionObject)); + int num = Main.rand.Next(all.Length + 5); + if (num >= 5) + str = all[num - 5].FormatWith(substitutionObject); + else if (!Main.dayTime) + { + switch (num) + { + case 0: + str = Lang.dialog((int) sbyte.MaxValue); + break; + case 1: + str = Lang.dialog(128); + break; + case 2: + str = Lang.dialog(129); + break; + case 3: + str = Lang.dialog(130); + break; + default: + str = Lang.dialog(131); + break; + } + } + else + { + switch (num) + { + case 0: + str = Lang.dialog(132); + break; + case 1: + str = Lang.dialog(133); + break; + case 2: + str = Lang.dialog(134); + break; + case 3: + str = Lang.dialog(135); + break; + default: + str = Lang.dialog(136); + break; + } + } + } + } + else if (this.type == 106) + str = Lang.dialog(137); + else if (this.type == 108) + { + if (this.homeless) + { + int num = Main.rand.Next(3); + if (num == 0) + str = Lang.dialog(138); + else if (num == 1 && !Main.player[Main.myPlayer].Male) + { + str = Lang.dialog(139); + } + else + { + switch (num) + { + case 1: + str = Lang.dialog(140); + break; + case 2: + str = Lang.dialog(141); + break; + } + } + } + else if (this.HasLuckTextForWizard(out specialEventText)) + str = specialEventText; + else if (this.HasSpecialEventText("Wizard", out specialEventText)) + str = specialEventText; + else if (DD2Event.DownedInvasionT1 && Main.rand.Next(6) == 0) + str = Language.GetTextValueWith("WizardSpecialText.AfterDD2Tier1", substitutionObject); + else if (Main.player[Main.myPlayer].Male & flag16 && Main.rand.Next(6) == 0) + str = Lang.dialog(142); + else if (Main.player[Main.myPlayer].Male & flag6 && Main.rand.Next(6) == 0) + str = Lang.dialog(143); + else if (Main.player[Main.myPlayer].Male & flag8 && Main.rand.Next(6) == 0) + str = Lang.dialog(144); + else if (!Main.player[Main.myPlayer].Male & flag2 && Main.rand.Next(6) == 0) + str = Lang.dialog(145); + else if (!Main.player[Main.myPlayer].Male & flag7 && Main.rand.Next(6) == 0) + str = Lang.dialog(146); + else if (!Main.player[Main.myPlayer].Male & flag4 && Main.rand.Next(6) == 0) + str = Lang.dialog(147); + else if (!Main.dayTime) + { + switch (Main.rand.Next(3)) + { + case 0: + str = Lang.dialog(148); + break; + case 1: + str = Lang.dialog(149); + break; + case 2: + str = Lang.dialog(150); + break; + } + } + else + { + switch (Main.rand.Next(5)) + { + case 0: + str = Lang.dialog(151); + break; + case 1: + str = Lang.dialog(152); + break; + case 2: + str = Lang.dialog(153); + break; + case 3: + str = Lang.dialog(154); + break; + default: + str = Lang.dialog(155); + break; + } + } + } + else if (this.type == 123) + str = Lang.dialog(156); + else if (this.type == 124) + { + if (this.homeless) + { + switch (Main.rand.Next(4)) + { + case 0: + str = Lang.dialog(157); + break; + case 1: + str = Lang.dialog(158); + break; + case 2: + str = Lang.dialog(159); + break; + default: + str = Lang.dialog(160); + break; + } + } + else if (this.HasSpecialEventText("Mechanic", out specialEventText)) + str = specialEventText; + else if (Main.bloodMoon) + { + switch (Main.rand.Next(4)) + { + case 0: + str = Lang.dialog(161); + break; + case 1: + str = Lang.dialog(162); + break; + case 2: + str = Lang.dialog(163); + break; + default: + str = Lang.dialog(164); + break; + } + } + else if (flag8 && Main.rand.Next(6) == 0) + str = Lang.dialog(165); + else if (flag3 && Main.rand.Next(6) == 0) + { + str = Lang.dialog(166); + } + else + { + LocalizedText[] all = Language.FindAll(Lang.CreateDialogFilter("MechanicChatter.", substitutionObject)); + int num = Main.rand.Next(3 + all.Length); + str = num < 3 ? (num != 0 ? (num != 1 ? Lang.dialog(169) : Lang.dialog(168)) : Lang.dialog(167)) : all[num - 3].FormatWith(substitutionObject); + } + } + else if (this.type == 22) + { + if (this.HasSpecialEventText("Guide", out specialEventText)) + str = specialEventText; + else if (Main.bloodMoon) + { + switch (Main.rand.Next(3)) + { + case 0: + str = Lang.dialog(170); + break; + case 1: + str = Lang.dialog(171); + break; + default: + str = Lang.dialog(172); + break; + } + } + else if (LanternNight.LanternsUp && !NPC.downedMoonlord) + str = Language.GetTextValue("GuideSpecialText.Lantern1"); + else if (LanternNight.LanternsUp && NPC.downedMoonlord) + str = Language.GetTextValue("GuideSpecialText.Lantern2"); + else if (Main.eclipse) + str = Language.GetTextValue("GuideSpecialText.Eclipse"); + else if (Main.slimeRain) + str = Language.GetTextValue("GuideSpecialText.SlimeRain"); + else if (!Main.dayTime) + str = Lang.dialog(173); + else if (Main.hardMode & flag17 && Main.rand.Next(8) == 0) + str = Language.GetTextValueWith("GuideChatter.Chatter_1", substitutionObject); + else if (Main.hardMode && Main.rand.Next(8) == 0) + { + str = Language.GetTextValue("GuideChatter.Chatter_2"); + } + else + { + switch (Main.rand.Next(3)) + { + case 0: + str = Lang.dialog(174); + break; + case 1: + str = Lang.dialog(175); + break; + default: + str = Lang.dialog(176); + break; + } + } + } + else if (this.type == 142) + { + int num = Main.rand.Next(3); + if (this.HasSpecialEventText("Santa", out specialEventText)) + { + str = specialEventText; + } + else + { + switch (num) + { + case 0: + str = Lang.dialog(224); + break; + case 1: + str = Lang.dialog(225); + break; + case 2: + str = Lang.dialog(226); + break; + } + } + } + else if (this.type == 160) + { + int num = Main.rand.Next(6); + if (this.HasSpecialEventText("Truffle", out specialEventText)) + str = specialEventText; + else if (flag4 && Main.rand.Next(6) == 0) + str = Lang.dialog(232); + else if (flag9 && Main.rand.Next(6) == 0) + { + str = Lang.dialog(236); + } + else + { + switch (num) + { + case 0: + str = Lang.dialog(231); + break; + case 1: + str = Lang.dialog(233); + break; + case 2: + str = Lang.dialog(234); + break; + case 3: + str = Lang.dialog(235); + break; + case 4: + str = Lang.dialog(240); + break; + case 5: + str = Lang.dialog(241); + break; + } + } + } + else if (this.type == 178) + { + int num = Main.rand.Next(5); + if (this.HasSpecialEventText("Steampunker", out specialEventText)) + str = specialEventText; + else if (Main.bloodMoon && Main.rand.Next(3) == 0) + str = Lang.dialog(245); + else if (flag13 && Main.rand.Next(6) == 0) + str = Lang.dialog(246); + else if (flag12 && Main.rand.Next(6) == 0) + { + str = Lang.dialog(247); + } + else + { + switch (num) + { + case 0: + str = Lang.dialog(242); + break; + case 1: + str = Lang.dialog(243); + break; + case 2: + str = Lang.dialog(244); + break; + case 3: + str = Lang.dialog(248); + break; + case 4: + str = Lang.dialog(249); + break; + } + } + } + else if (this.type == 207) + { + int num = Main.rand.Next(3); + if (this.HasSpecialEventText("DyeTrader", out specialEventText)) + str = specialEventText; + else if (flag12 && Main.rand.Next(6) == 0) + { + str = Lang.dialog(260); + } + else + { + switch (num) + { + case 0: + str = Lang.dialog(257); + break; + case 1: + str = Lang.dialog(258); + break; + case 2: + str = Lang.dialog(259); + break; + } + } + } + else if (this.type == 208) + { + if (NPC.freeCake) + { + str = Language.GetTextValueWith("PartyGirlSpecialText.Cake" + (object) Main.rand.Next(1, 4), substitutionObject); + } + else + { + int num = Main.rand.Next(7); + if (this.HasSpecialEventText("PartyGirl", out specialEventText)) + str = specialEventText; + else if (DD2Event.DownedInvasionT1 && Main.rand.Next(5) == 0) + str = Language.GetTextValueWith("PartyGirlSpecialText.AfterDD2Tier1", substitutionObject); + else if (Main.player[Main.myPlayer].Male && Main.rand.Next(5) == 0) + str = Lang.dialog(268); + else if (flag15 && Main.rand.Next(5) == 0) + { + str = Lang.dialog(310); + } + else + { + switch (num) + { + case 0: + str = Lang.dialog(265); + break; + case 1: + str = Lang.dialog(266); + break; + case 2: + str = Lang.dialog(267); + break; + case 3: + str = Lang.dialog(269); + break; + case 4: + str = Lang.dialog(270); + break; + case 5: + str = Lang.dialog(271); + break; + case 6: + str = Lang.dialog(272); + break; + } + } + } + } + else if (this.type == 209) + { + if (this.HasSpecialEventText("Cyborg", out specialEventText)) + str = specialEventText; + else if (flag12 && Main.rand.Next(6) == 0) + str = Lang.dialog(284); + else if (flag11 && Main.rand.Next(6) == 0) + { + str = Lang.dialog(283); + } + else + { + LocalizedText[] all = Language.FindAll(Lang.CreateDialogFilter("CyborgChatter.", substitutionObject)); + int num = Main.rand.Next(5 + all.Length); + if (num >= 5) + str = all[num - 5].FormatWith(substitutionObject); + else if (num == 0) + str = Lang.dialog(280); + else if (num == 1) + str = Lang.dialog(281); + else if (num == 2) + str = Lang.dialog(282); + else if (num == 3) + str = Lang.dialog(285); + else if (num == 4) + str = Lang.dialog(286); + } + } + else if (this.type == 227) + { + int num = Main.rand.Next(5); + if (this.HasSpecialEventText("Painter", out specialEventText)) + str = specialEventText; + else if (Main.hardMode && Main.rand.Next(7) == 0) + str = Lang.dialog(250); + else if (flag14 && Main.rand.Next(6) == 0) + { + str = Lang.dialog(251); + } + else + { + switch (num) + { + case 0: + str = Lang.dialog(252); + break; + case 1: + str = Lang.dialog(253); + break; + case 2: + str = Lang.dialog(254); + break; + case 3: + str = Lang.dialog((int) byte.MaxValue); + break; + case 4: + str = Lang.dialog(256); + break; + } + } + } + else if (this.type == 228) + { + int num = Main.rand.Next(4); + if (this.HasSpecialEventText("WitchDoctor", out specialEventText)) + str = specialEventText; + else if (flag2 && Main.rand.Next(4) == 0) + { + str = Lang.dialog(263); + } + else + { + switch (num) + { + case 0: + str = Lang.dialog(261); + break; + case 1: + str = Lang.dialog(262); + break; + case 2: + str = Lang.dialog(264); + break; + case 3: + str = Language.GetTextValueWith("WitchDoctorSpecialText.AfterDD2Tier1", substitutionObject); + break; + } + } + } + else if (this.type == 229) + { + LocalizedText[] all = Language.FindAll(Lang.CreateDialogFilter("PirateChatter.", substitutionObject)); + int num = Main.rand.Next(6 + all.Length); + if (num >= 6) + str = all[num - 6].FormatWith(substitutionObject); + else if (this.HasSpecialEventText("Pirate", out specialEventText)) + str = specialEventText; + else if (!Main.player[Main.myPlayer].Male && Main.rand.Next(5) == 0) + { + str = Lang.dialog(276); + } + else + { + switch (num) + { + case 0: + str = Lang.dialog(273); + break; + case 1: + str = Lang.dialog(274); + break; + case 2: + str = Lang.dialog(275); + break; + case 3: + str = Lang.dialog(277); + break; + case 4: + str = Lang.dialog(278); + break; + case 5: + str = Lang.dialog(279); + break; + } + } + } + else if (this.type == 354) + str = Lang.dialog(Main.rand.Next(315, 319)); + else if (this.type == 353) + { + if (this.HasSpecialEventText("Stylist", out specialEventText)) + str = specialEventText; + else if (Main.bloodMoon) + { + switch (Main.rand.Next(3)) + { + case 0: + str = Lang.dialog(304); + break; + case 1: + str = Lang.dialog(305); + break; + case 2: + str = Lang.dialog(306); + break; + } + } + else if (Main.dayTime && Main.time < 16200.0 && Main.rand.Next(3) == 0) + str = Lang.dialog(311); + else if (Main.player[Main.myPlayer].Male && Main.rand.Next(3) == 0) + { + switch (Main.rand.Next(2)) + { + case 0: + str = Lang.dialog(293); + break; + case 1: + str = Lang.dialog(300); + break; + } + } + else if (!Main.player[Main.myPlayer].Male && Main.rand.Next(3) == 0) + { + switch (Main.rand.Next(3)) + { + case 0: + str = Lang.dialog(291); + break; + case 1: + str = Lang.dialog(292); + break; + case 2: + str = Lang.dialog(312); + break; + } + } + else if (flag14 & flag7 & flag2 & flag3 && Main.rand.Next(5) == 0) + str = Lang.dialog(307); + else if (flag14 && Main.rand.Next(5) == 0) + str = Lang.dialog(302); + else if (flag6 && Main.rand.Next(5) == 0) + str = Lang.dialog(303); + else if (flag13 && Main.rand.Next(5) == 0) + { + str = Lang.dialog(308); + } + else + { + LocalizedText[] all = Language.FindAll(Lang.CreateDialogFilter("StylistChatter.", substitutionObject)); + int num1 = Main.moonPhase < 3 ? 5 : 4; + int num2 = Main.rand.Next(num1 + all.Length); + if (num2 >= num1) + str = all[num2 - num1].FormatWith(substitutionObject); + else if (Main.moonPhase < 3) + { + switch (num2) + { + case 0: + str = Lang.dialog(287); + break; + case 1: + str = Lang.dialog(288); + break; + case 2: + str = Lang.dialog(289); + break; + case 3: + str = Lang.dialog(290); + break; + case 4: + str = Lang.dialog(294); + break; + } + } + else if (Main.moonPhase < 6) + { + switch (num2) + { + case 0: + str = Lang.dialog(295); + break; + case 1: + str = Lang.dialog(296); + break; + case 2: + str = Lang.dialog(297); + break; + case 3: + str = Lang.dialog(298); + break; + } + } + else + { + switch (num2) + { + case 0: + str = Lang.dialog(299); + break; + case 1: + str = Lang.dialog(301); + break; + case 2: + str = Lang.dialog(313); + break; + case 3: + str = Lang.dialog(314); + break; + } + } + } + } + else if (this.type == 368) + str = !this.HasSpecialEventText("TravellingMerchant", out specialEventText) ? (!flag16 || Main.rand.Next(5) != 0 ? (!flag1 || Main.rand.Next(5) != 0 ? (!flag9 || Main.rand.Next(5) != 0 ? Lang.dialog(Main.rand.Next(322, 331)) : Lang.dialog(321)) : Lang.dialog(320)) : Lang.dialog(319)) : specialEventText; + else if (this.type == 376) + str = Lang.dialog(Main.rand.Next(353, 356)); + else if (this.type == 369) + str = Main.rand.Next(5) != 0 || Main.LocalPlayer.anglerQuestsFinished <= 1 ? (!this.HasSpecialEventText("Angler", out specialEventText) ? (!Main.bloodMoon ? (Main.anglerQuestFinished ? (!flag4 || Main.rand.Next(5) != 0 ? Language.SelectRandom(Lang.CreateDialogFilter("AnglerChatter.", substitutionObject)).FormatWith(substitutionObject) : Lang.dialog(347)) : Lang.dialog(Main.rand.Next(334, 338))) : (Main.rand.Next(3) != 0 ? (Main.anglerQuestFinished ? Lang.dialog(Main.rand.Next(350, 353)) : Lang.dialog(Main.rand.Next(348, 350))) : Language.SelectRandom(Lang.CreateDialogFilter("AnglerSpecialText.BloodMoonFishing")).FormatWith(substitutionObject))) : specialEventText) : Lang.AnglerQuestCountChat(this); + else if (this.type == 453) + str = !this.HasSpecialEventText("SkeletonMerchant", out specialEventText) ? Lang.dialog(Main.rand.Next(356, 364)) : specialEventText; + else if (this.type == 441) + str = !this.HasSpecialEventText("TaxCollector", out specialEventText) ? (!(Main.rand.Next(6) == 0 & flag4) ? (!(Main.rand.Next(6) == 0 & flag3) ? (!(Main.rand.Next(6) == 0 & flag6) ? (!(Main.rand.Next(6) == 0 & flag1) ? Lang.dialog(Main.rand.Next(364, 370)) : Lang.dialog(374)) : Lang.dialog(373)) : Lang.dialog(372)) : Lang.dialog(371)) : specialEventText; + else if (this.type == 579) + str = Language.GetTextValue("BartenderSpecialText.FirstMeeting"); + else if (this.type == 550) + str = !this.HasSpecialEventText("Bartender", out specialEventText) ? Lang.BartenderChat(this) : specialEventText; + else if (this.type == 589) + str = Main.rand.Next(2) != 0 ? Language.GetTextValue("GolferSpecialText.FirstMeeting2") : Language.GetTextValue("GolferSpecialText.FirstMeeting1"); + else if (this.type == 588) + str = Main.rand.Next(3) == 0 || !this.HasSpecialEventText("Golfer", out specialEventText) ? (Main.rand.Next(3) != 0 ? Lang.GolferChat(this) : Language.SelectRandom(Lang.CreateDialogFilter((Main.LocalPlayer.golferScoreAccumulated < 2000 ? (Main.LocalPlayer.golferScoreAccumulated < 1000 ? (Main.LocalPlayer.golferScoreAccumulated < 500 ? "GolferQuestsChatterBeginner" : "GolferQuestsChatterApprentice") : "GolferQuestsChatterJourneyman") : "GolferQuestsChatterMaster") + ".")).FormatWith(substitutionObject)) : specialEventText; + else if (this.type == 633) + str = this.ShouldBestiaryGirlBeLycantrope() || !this.HasSpecialEventText("BestiaryGirl", out specialEventText) ? Lang.BestiaryGirlChat(this) : specialEventText; + else if (this.type == 637) + str = !this.HasSpecialEventText("Cat", out specialEventText) ? Lang.CatChat(this) : specialEventText; + else if (this.type == 638) + str = !this.HasSpecialEventText("Dog", out specialEventText) ? Lang.DogChat(this) : specialEventText; + else if (this.type == 656) + str = !this.HasSpecialEventText("Bunny", out specialEventText) ? Lang.BunnyChat(this) : specialEventText; + return str; + } + + public object Clone() => this.MemberwiseClone(); + + public bool HasLuckTextForWizard(out string specialEventText) + { + specialEventText = (string) null; + object substitutionObject = Lang.CreateDialogSubstitutionObject(this); + if (Main.rand.Next(3) != 0) + return false; + float normalizedLuck = Main.player[Main.myPlayer].NormalizedLuck; + if ((double) normalizedLuck == 0.0) + return false; + string startsWith = (double) normalizedLuck >= -0.600000023841858 ? ((double) normalizedLuck >= -0.400000005960464 ? ((double) normalizedLuck >= -0.200000002980232 ? ((double) normalizedLuck >= 0.0 ? ((double) normalizedLuck >= 0.25 ? ((double) normalizedLuck >= 0.5 ? ((double) normalizedLuck >= 0.75 ? "WizardSpecialText.LuckIsGodly" : "WizardSpecialText.LuckIsAmazing") : "WizardSpecialText.LuckIsGreat") : "WizardSpecialText.LuckIsGood") : "WizardSpecialText.LuckIsBad") : "WizardSpecialText.LuckIsPoor") : "WizardSpecialText.LuckIsTerrible") : "WizardSpecialText.LuckIsCursed"; + specialEventText = Language.SelectRandom(Lang.CreateDialogFilter(startsWith)).FormatWith(substitutionObject); + return true; + } + + public bool HasSpecialEventText(string specialTextCategoryKey, out string specialEventText) + { + specialEventText = (string) null; + object substitutionObject = Lang.CreateDialogSubstitutionObject(this); + return Main.LocalPlayer.ZoneGraveyard && Main.rand.Next(3) == 0 && this.GetSpecialEventTextIfNotEmpty(specialTextCategoryKey + "SpecialText.Graveyard", substitutionObject, ref specialEventText) || BirthdayParty.PartyIsUp && Main.rand.Next(3) == 0 && !NPCID.Sets.HasNoPartyText[this.type] && this.GetSpecialEventTextIfNotEmpty(specialTextCategoryKey + "SpecialText.Party", substitutionObject, ref specialEventText) || Main.raining && !Main.IsItStorming && Main.rand.Next(3) == 0 && this.GetSpecialEventTextIfNotEmpty(specialTextCategoryKey + "SpecialText.Rain", substitutionObject, ref specialEventText) || Main.IsItAHappyWindyDay && Main.rand.Next(3) == 0 && this.GetSpecialEventTextIfNotEmpty(specialTextCategoryKey + "SpecialText.Windy", substitutionObject, ref specialEventText) || Main.IsItStorming && Main.rand.Next(3) == 0 && this.GetSpecialEventTextIfNotEmpty(specialTextCategoryKey + "SpecialText.Storm", substitutionObject, ref specialEventText); + } + + public bool GetSpecialEventTextIfNotEmpty( + string specialTextKey, + object substitutes, + ref string specialEventText) + { + LocalizedText localizedText = Language.SelectRandom(Lang.CreateDialogFilter(specialTextKey)); + if (localizedText == LocalizedText.Empty) + return false; + specialEventText = localizedText.FormatWith(substitutes); + return true; + } + + public void CheckDrowning() + { + bool flag = Collision.DrownCollision(this.position, this.width, this.height, 1f); + if (Main.netMode != 1) + { + if (flag) + { + if (++this.breathCounter >= 7) + { + this.breathCounter = 0; + --this.breath; + if (this.breath <= 0) + { + this.friendlyRegen = 0; + this.breath = 0; + this.life -= 2; + if (this.life % 24 < 2) + this.netUpdate = true; + if (this.life <= 0) + { + this.life = 1; + this.StrikeNPCNoInteraction(2, 0.0f, 0); + if (Main.netMode != 0) + NetMessage.SendData(28, number: this.whoAmI, number2: 2f); + } + } + } + } + else + { + this.breath += 3; + if (this.breath > 200) + this.breath = 200; + this.breathCounter = 0; + } + } + if (!flag || Main.rand.Next(20) != 0 || this.lavaWet || this.honeyWet) + return; + int num1 = 0; + int num2 = 0; + if (this.type == 369) + num2 = 8; + Dust.NewDust(new Vector2(this.position.X + (float) ((10 + num1) * this.direction), (float) ((double) this.position.Y + (double) num2 + 4.0)), this.width - 8, 8, 34, Scale: 1.2f); + } + + public void TryPortalJumping() + { + if (!this.townNPC || Main.netMode == 1) + return; + PortalHelper.TryGoingThroughPortals((Entity) this); + } + + public static void GetMeleeCollisionData( + Microsoft.Xna.Framework.Rectangle victimHitbox, + int enemyIndex, + ref int specialHitSetter, + ref float damageMultiplier, + ref Microsoft.Xna.Framework.Rectangle npcRect) + { + NPC npc1 = Main.npc[enemyIndex]; + if ((npc1.type >= 430 && npc1.type <= 436 || npc1.type == 591) && (double) npc1.ai[2] > 5.0) + { + int num = 34; + if (npc1.spriteDirection < 0) + { + npcRect.X -= num; + npcRect.Width += num; + } + else + npcRect.Width += num; + damageMultiplier *= 1.25f; + } + else if (npc1.type >= 494 && npc1.type <= 495 && (double) npc1.ai[2] > 5.0) + { + int num = 18; + if (npc1.spriteDirection < 0) + { + npcRect.X -= num; + npcRect.Width += num; + } + else + npcRect.Width += num; + damageMultiplier *= 1.25f; + } + else if (npc1.type == 460) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 30, 14); + rectangle.X = (int) npc1.Center.X; + if (npc1.direction < 0) + rectangle.X -= rectangle.Width; + rectangle.Y = (int) npc1.position.Y + npc1.height - 20; + if (!victimHitbox.Intersects(rectangle)) + return; + npcRect = rectangle; + damageMultiplier *= 1.35f; + } + else if (npc1.type == 417 && (double) npc1.ai[0] == 6.0 && (double) npc1.ai[3] > 0.0 && (double) npc1.ai[3] < 4.0) + { + Microsoft.Xna.Framework.Rectangle rectangle = Utils.CenteredRectangle(npc1.Center, new Vector2(100f)); + if (!victimHitbox.Intersects(rectangle)) + return; + npcRect = rectangle; + damageMultiplier *= 1.35f; + } + else if (npc1.type == 466) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 30, 8); + rectangle.X = (int) npc1.Center.X; + if (npc1.direction < 0) + rectangle.X -= rectangle.Width; + rectangle.Y = (int) npc1.position.Y + npc1.height - 32; + if (!victimHitbox.Intersects(rectangle)) + return; + npcRect = rectangle; + damageMultiplier *= 1.75f; + } + else if (npc1.type == 576 || npc1.type == 577) + { + NPC npc2 = npc1; + bool flag = true; + int y = npc2.frame.Y; + int num1 = 0; + int num2 = 0; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 30, 8); + switch (y) + { + case 15: + specialHitSetter = 2; + rectangle.Width = 120; + rectangle.Height = 30; + num2 = 24; + break; + case 16: + specialHitSetter = 2; + rectangle.Width = 120; + rectangle.Height = 60; + num1 = 10; + break; + case 17: + specialHitSetter = 2; + rectangle.Width = 100; + rectangle.Height = 90; + num1 = 50; + break; + case 18: + specialHitSetter = 2; + rectangle.Width = 100; + rectangle.Height = 50; + num1 = 90; + num2 = 10; + break; + default: + flag = false; + break; + } + if (!flag) + return; + rectangle.X = (int) npc2.Center.X - num1 * npc2.direction; + if (npc2.direction < 0) + rectangle.X -= rectangle.Width; + rectangle.Y = (int) npc2.Center.Y - rectangle.Height + num2; + if (!victimHitbox.Intersects(rectangle)) + return; + npcRect = rectangle; + damageMultiplier *= 1.75f; + } + else + { + if (npc1.type != 552 && npc1.type != 553 && npc1.type != 554 || (double) npc1.ai[0] <= 0.0 || (double) npc1.ai[0] >= 24.0) + return; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(0, 0, 34, 14); + rectangle.X = (int) npc1.Center.X; + if (npc1.direction < 0) + rectangle.X -= rectangle.Width; + rectangle.Y = (int) npc1.position.Y + npc1.height - 20; + if (!victimHitbox.Intersects(rectangle)) + return; + npcRect = rectangle; + damageMultiplier *= 1.35f; + } + } + + public string GetBestiaryCreditId() => ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[this.netID]; + + public override string ToString() => "name:" + this.TypeName + ", active:" + this.active.ToString() + ", whoAmI:" + (object) this.whoAmI; + } +} diff --git a/NPCSpawnParams.cs b/NPCSpawnParams.cs new file mode 100644 index 0000000..21a1389 --- /dev/null +++ b/NPCSpawnParams.cs @@ -0,0 +1,26 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.NPCSpawnParams +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.DataStructures; + +namespace Terraria +{ + public struct NPCSpawnParams + { + public float? sizeScaleOverride; + public int? playerCountForMultiplayerDifficultyOverride; + public GameModeData gameModeData; + public float? strengthMultiplierOverride; + + public NPCSpawnParams WithScale(float scaleOverride) => new NPCSpawnParams() + { + sizeScaleOverride = new float?(scaleOverride), + playerCountForMultiplayerDifficultyOverride = this.playerCountForMultiplayerDifficultyOverride, + gameModeData = this.gameModeData, + strengthMultiplierOverride = this.strengthMultiplierOverride + }; + } +} diff --git a/Net/AddressType.cs b/Net/AddressType.cs new file mode 100644 index 0000000..b2480b5 --- /dev/null +++ b/Net/AddressType.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.AddressType +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Net +{ + public enum AddressType + { + Tcp, + Steam, + WeGame, + } +} diff --git a/Net/LegacyNetBufferPool.cs b/Net/LegacyNetBufferPool.cs new file mode 100644 index 0000000..85d1f35 --- /dev/null +++ b/Net/LegacyNetBufferPool.cs @@ -0,0 +1,106 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.LegacyNetBufferPool +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; + +namespace Terraria.Net +{ + public class LegacyNetBufferPool + { + private const int SMALL_BUFFER_SIZE = 256; + private const int MEDIUM_BUFFER_SIZE = 1024; + private const int LARGE_BUFFER_SIZE = 16384; + private static object bufferLock = new object(); + private static Queue _smallBufferQueue = new Queue(); + private static Queue _mediumBufferQueue = new Queue(); + private static Queue _largeBufferQueue = new Queue(); + private static int _smallBufferCount; + private static int _mediumBufferCount; + private static int _largeBufferCount; + private static int _customBufferCount; + + public static byte[] RequestBuffer(int size) + { + lock (LegacyNetBufferPool.bufferLock) + { + if (size <= 256) + { + if (LegacyNetBufferPool._smallBufferQueue.Count != 0) + return LegacyNetBufferPool._smallBufferQueue.Dequeue(); + ++LegacyNetBufferPool._smallBufferCount; + return new byte[256]; + } + if (size <= 1024) + { + if (LegacyNetBufferPool._mediumBufferQueue.Count != 0) + return LegacyNetBufferPool._mediumBufferQueue.Dequeue(); + ++LegacyNetBufferPool._mediumBufferCount; + return new byte[1024]; + } + if (size <= 16384) + { + if (LegacyNetBufferPool._largeBufferQueue.Count != 0) + return LegacyNetBufferPool._largeBufferQueue.Dequeue(); + ++LegacyNetBufferPool._largeBufferCount; + return new byte[16384]; + } + ++LegacyNetBufferPool._customBufferCount; + return new byte[size]; + } + } + + public static byte[] RequestBuffer(byte[] data, int offset, int size) + { + byte[] numArray = LegacyNetBufferPool.RequestBuffer(size); + Buffer.BlockCopy((Array) data, offset, (Array) numArray, 0, size); + return numArray; + } + + public static void ReturnBuffer(byte[] buffer) + { + int length = buffer.Length; + lock (LegacyNetBufferPool.bufferLock) + { + if (length <= 256) + LegacyNetBufferPool._smallBufferQueue.Enqueue(buffer); + else if (length <= 1024) + { + LegacyNetBufferPool._mediumBufferQueue.Enqueue(buffer); + } + else + { + if (length > 16384) + return; + LegacyNetBufferPool._largeBufferQueue.Enqueue(buffer); + } + } + } + + public static void DisplayBufferSizes() + { + lock (LegacyNetBufferPool.bufferLock) + { + Main.NewText("Small Buffers: " + (object) LegacyNetBufferPool._smallBufferQueue.Count + " queued of " + (object) LegacyNetBufferPool._smallBufferCount); + Main.NewText("Medium Buffers: " + (object) LegacyNetBufferPool._mediumBufferQueue.Count + " queued of " + (object) LegacyNetBufferPool._mediumBufferCount); + Main.NewText("Large Buffers: " + (object) LegacyNetBufferPool._largeBufferQueue.Count + " queued of " + (object) LegacyNetBufferPool._largeBufferCount); + Main.NewText("Custom Buffers: 0 queued of " + (object) LegacyNetBufferPool._customBufferCount); + } + } + + public static void PrintBufferSizes() + { + lock (LegacyNetBufferPool.bufferLock) + { + Console.WriteLine("Small Buffers: " + (object) LegacyNetBufferPool._smallBufferQueue.Count + " queued of " + (object) LegacyNetBufferPool._smallBufferCount); + Console.WriteLine("Medium Buffers: " + (object) LegacyNetBufferPool._mediumBufferQueue.Count + " queued of " + (object) LegacyNetBufferPool._mediumBufferCount); + Console.WriteLine("Large Buffers: " + (object) LegacyNetBufferPool._largeBufferQueue.Count + " queued of " + (object) LegacyNetBufferPool._largeBufferCount); + Console.WriteLine("Custom Buffers: 0 queued of " + (object) LegacyNetBufferPool._customBufferCount); + Console.WriteLine(""); + } + } + } +} diff --git a/Net/NetGroupInfo.cs b/Net/NetGroupInfo.cs new file mode 100644 index 0000000..a6e8400 --- /dev/null +++ b/Net/NetGroupInfo.cs @@ -0,0 +1,96 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.NetGroupInfo +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; + +namespace Terraria.Net +{ + public class NetGroupInfo + { + private readonly string[] _separatorBetweenInfos = new string[1] + { + ", " + }; + private readonly string[] _separatorBetweenIdAndInfo = new string[1] + { + ":" + }; + private List _infoProviders; + + public NetGroupInfo() + { + this._infoProviders = new List(); + this._infoProviders.Add((NetGroupInfo.INetGroupInfoProvider) new NetGroupInfo.IPAddressInfoProvider()); + this._infoProviders.Add((NetGroupInfo.INetGroupInfoProvider) new NetGroupInfo.SteamLobbyInfoProvider()); + } + + public string ComposeInfo() + { + List stringList = new List(); + foreach (NetGroupInfo.INetGroupInfoProvider infoProvider in this._infoProviders) + { + if (infoProvider.HasValidInfo) + { + string safeInfo = this.ConvertToSafeInfo(((int) infoProvider.Id).ToString() + this._separatorBetweenIdAndInfo[0] + infoProvider.ProvideInfoNeededToJoin()); + stringList.Add(safeInfo); + } + } + return string.Join(this._separatorBetweenInfos[0], stringList.ToArray()); + } + + public Dictionary DecomposeInfo( + string info) + { + Dictionary dictionary = new Dictionary(); + foreach (string text in info.Split(this._separatorBetweenInfos, StringSplitOptions.RemoveEmptyEntries)) + { + string[] strArray = this.ConvertFromSafeInfo(text).Split(this._separatorBetweenIdAndInfo, StringSplitOptions.RemoveEmptyEntries); + int result; + if (strArray.Length == 2 && int.TryParse(strArray[0], out result)) + dictionary[(NetGroupInfo.InfoProviderId) result] = strArray[1]; + } + return dictionary; + } + + private string ConvertToSafeInfo(string text) => Uri.EscapeDataString(text); + + private string ConvertFromSafeInfo(string text) => Uri.UnescapeDataString(text); + + public enum InfoProviderId + { + IPAddress, + Steam, + } + + private interface INetGroupInfoProvider + { + NetGroupInfo.InfoProviderId Id { get; } + + bool HasValidInfo { get; } + + string ProvideInfoNeededToJoin(); + } + + private class IPAddressInfoProvider : NetGroupInfo.INetGroupInfoProvider + { + public NetGroupInfo.InfoProviderId Id => NetGroupInfo.InfoProviderId.IPAddress; + + public bool HasValidInfo => false; + + public string ProvideInfoNeededToJoin() => ""; + } + + private class SteamLobbyInfoProvider : NetGroupInfo.INetGroupInfoProvider + { + public NetGroupInfo.InfoProviderId Id => NetGroupInfo.InfoProviderId.Steam; + + public bool HasValidInfo => Main.LobbyId > 0UL; + + public string ProvideInfoNeededToJoin() => Main.LobbyId.ToString(); + } + } +} diff --git a/Net/NetManager.cs b/Net/NetManager.cs new file mode 100644 index 0000000..77c6eb1 --- /dev/null +++ b/Net/NetManager.cs @@ -0,0 +1,130 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.NetManager +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using System.IO; +using Terraria.Net.Sockets; + +namespace Terraria.Net +{ + public class NetManager + { + public static readonly NetManager Instance = new NetManager(); + private Dictionary _modules = new Dictionary(); + private ushort _moduleCount; + + private NetManager() + { + } + + public void Register() where T : NetModule, new() + { + T obj = new T(); + NetManager.PacketTypeStorage.Id = this._moduleCount; + NetManager.PacketTypeStorage.Module = obj; + this._modules[this._moduleCount] = (NetModule) obj; + ++this._moduleCount; + } + + public NetModule GetModule() where T : NetModule => (NetModule) NetManager.PacketTypeStorage.Module; + + public ushort GetId() where T : NetModule => NetManager.PacketTypeStorage.Id; + + public void Read(BinaryReader reader, int userId, int readLength) + { + ushort key = reader.ReadUInt16(); + if (this._modules.ContainsKey(key)) + this._modules[key].Deserialize(reader, userId); + Main.ActiveNetDiagnosticsUI.CountReadModuleMessage((int) key, readLength); + } + + public void Broadcast(NetPacket packet, int ignoreClient = -1) + { + for (int index = 0; index < 256; ++index) + { + if (index != ignoreClient && Netplay.Clients[index].IsConnected()) + this.SendData(Netplay.Clients[index].Socket, packet); + } + } + + public void Broadcast( + NetPacket packet, + NetManager.BroadcastCondition conditionToBroadcast, + int ignoreClient = -1) + { + for (int clientIndex = 0; clientIndex < 256; ++clientIndex) + { + if (clientIndex != ignoreClient && Netplay.Clients[clientIndex].IsConnected() && conditionToBroadcast(clientIndex)) + this.SendData(Netplay.Clients[clientIndex].Socket, packet); + } + } + + public void SendToSelf(NetPacket packet) + { + packet.Reader.BaseStream.Position = 3L; + this.Read(packet.Reader, Main.myPlayer, packet.Length); + NetManager.SendCallback((object) packet); + Main.ActiveNetDiagnosticsUI.CountSentModuleMessage((int) packet.Id, packet.Length); + } + + public void BroadcastOrLoopback(NetPacket packet) + { + if (Main.netMode == 2) + { + this.Broadcast(packet); + } + else + { + if (Main.netMode != 0) + return; + this.SendToSelf(packet); + } + } + + public void SendToServerOrLoopback(NetPacket packet) + { + if (Main.netMode == 1) + { + this.SendToServer(packet); + } + else + { + if (Main.netMode != 0) + return; + this.SendToSelf(packet); + } + } + + public void SendToServer(NetPacket packet) => this.SendData(Netplay.Connection.Socket, packet); + + public void SendToClient(NetPacket packet, int playerId) => this.SendData(Netplay.Clients[playerId].Socket, packet); + + private void SendData(ISocket socket, NetPacket packet) + { + if (Main.netMode == 0) + return; + packet.ShrinkToFit(); + try + { + socket.AsyncSend(packet.Buffer.Data, 0, packet.Length, new SocketSendCallback(NetManager.SendCallback), (object) packet); + } + catch + { + } + Main.ActiveNetDiagnosticsUI.CountSentModuleMessage((int) packet.Id, packet.Length); + } + + public static void SendCallback(object state) => ((NetPacket) state).Recycle(); + + private class PacketTypeStorage where T : NetModule + { + public static ushort Id; + public static T Module; + } + + public delegate bool BroadcastCondition(int clientIndex); + } +} diff --git a/Net/NetModule.cs b/Net/NetModule.cs new file mode 100644 index 0000000..403eb99 --- /dev/null +++ b/Net/NetModule.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.NetModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; + +namespace Terraria.Net +{ + public abstract class NetModule + { + public abstract bool Deserialize(BinaryReader reader, int userId); + + protected static NetPacket CreatePacket(int maxSize) where T : NetModule => new NetPacket(NetManager.Instance.GetId(), maxSize); + } +} diff --git a/Net/NetPacket.cs b/Net/NetPacket.cs new file mode 100644 index 0000000..1d12fd7 --- /dev/null +++ b/Net/NetPacket.cs @@ -0,0 +1,47 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.NetPacket +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; +using Terraria.DataStructures; + +namespace Terraria.Net +{ + public struct NetPacket + { + private const int HEADER_SIZE = 5; + public readonly ushort Id; + public readonly CachedBuffer Buffer; + + public int Length { get; private set; } + + public BinaryWriter Writer => this.Buffer.Writer; + + public BinaryReader Reader => this.Buffer.Reader; + + public NetPacket(ushort id, int size) + : this() + { + this.Id = id; + this.Buffer = BufferPool.Request(size + 5); + this.Length = size + 5; + this.Writer.Write((ushort) (size + 5)); + this.Writer.Write((byte) 82); + this.Writer.Write(id); + } + + public void Recycle() => this.Buffer.Recycle(); + + public void ShrinkToFit() + { + if (this.Length == (int) this.Writer.BaseStream.Position) + return; + this.Length = (int) this.Writer.BaseStream.Position; + this.Writer.Seek(0, SeekOrigin.Begin); + this.Writer.Write((ushort) this.Length); + this.Writer.Seek(this.Length, SeekOrigin.Begin); + } + } +} diff --git a/Net/RemoteAddress.cs b/Net/RemoteAddress.cs new file mode 100644 index 0000000..e3adbad --- /dev/null +++ b/Net/RemoteAddress.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.RemoteAddress +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Net +{ + public abstract class RemoteAddress + { + public AddressType Type; + + public abstract string GetIdentifier(); + + public abstract string GetFriendlyName(); + + public abstract bool IsLocalHost(); + } +} diff --git a/Net/ServerMode.cs b/Net/ServerMode.cs new file mode 100644 index 0000000..cc29c0d --- /dev/null +++ b/Net/ServerMode.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.ServerMode +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Terraria.Net +{ + [Flags] + public enum ServerMode : byte + { + None = 0, + Lobby = 1, + FriendsCanJoin = 2, + FriendsOfFriends = 4, + } +} diff --git a/Net/Sockets/ISocket.cs b/Net/Sockets/ISocket.cs new file mode 100644 index 0000000..dac7ed0 --- /dev/null +++ b/Net/Sockets/ISocket.cs @@ -0,0 +1,36 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.Sockets.ISocket +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Net.Sockets +{ + public interface ISocket + { + void Close(); + + bool IsConnected(); + + void Connect(RemoteAddress address); + + void AsyncSend(byte[] data, int offset, int size, SocketSendCallback callback, object state = null); + + void AsyncReceive( + byte[] data, + int offset, + int size, + SocketReceiveCallback callback, + object state = null); + + bool IsDataAvailable(); + + void SendQueuedPackets(); + + bool StartListening(SocketConnectionAccepted callback); + + void StopListening(); + + RemoteAddress GetRemoteAddress(); + } +} diff --git a/Net/Sockets/SocialSocket.cs b/Net/Sockets/SocialSocket.cs new file mode 100644 index 0000000..cd28178 --- /dev/null +++ b/Net/Sockets/SocialSocket.cs @@ -0,0 +1,92 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.Sockets.SocialSocket +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Threading; +using Terraria.Social; + +namespace Terraria.Net.Sockets +{ + public class SocialSocket : ISocket + { + private RemoteAddress _remoteAddress; + + public SocialSocket() + { + } + + public SocialSocket(RemoteAddress remoteAddress) => this._remoteAddress = remoteAddress; + + void ISocket.Close() + { + if (this._remoteAddress == null) + return; + SocialAPI.Network.Close(this._remoteAddress); + this._remoteAddress = (RemoteAddress) null; + } + + bool ISocket.IsConnected() => SocialAPI.Network.IsConnected(this._remoteAddress); + + void ISocket.Connect(RemoteAddress address) + { + this._remoteAddress = address; + SocialAPI.Network.Connect(address); + } + + void ISocket.AsyncSend( + byte[] data, + int offset, + int size, + SocketSendCallback callback, + object state) + { + SocialAPI.Network.Send(this._remoteAddress, data, size); + callback.BeginInvoke(state, (AsyncCallback) null, (object) null); + } + + private void ReadCallback( + byte[] data, + int offset, + int size, + SocketReceiveCallback callback, + object state) + { + int size1; + while ((size1 = SocialAPI.Network.Receive(this._remoteAddress, data, offset, size)) == 0) + Thread.Sleep(1); + callback(state, size1); + } + + void ISocket.AsyncReceive( + byte[] data, + int offset, + int size, + SocketReceiveCallback callback, + object state) + { + new SocialSocket.InternalReadCallback(this.ReadCallback).BeginInvoke(data, offset, size, callback, state, (AsyncCallback) null, (object) null); + } + + void ISocket.SendQueuedPackets() + { + } + + bool ISocket.IsDataAvailable() => SocialAPI.Network.IsDataAvailable(this._remoteAddress); + + RemoteAddress ISocket.GetRemoteAddress() => this._remoteAddress; + + bool ISocket.StartListening(SocketConnectionAccepted callback) => SocialAPI.Network.StartListening(callback); + + void ISocket.StopListening() => SocialAPI.Network.StopListening(); + + private delegate void InternalReadCallback( + byte[] data, + int offset, + int size, + SocketReceiveCallback callback, + object state); + } +} diff --git a/Net/Sockets/SocketConnectionAccepted.cs b/Net/Sockets/SocketConnectionAccepted.cs new file mode 100644 index 0000000..c3d813d --- /dev/null +++ b/Net/Sockets/SocketConnectionAccepted.cs @@ -0,0 +1,10 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.Sockets.SocketConnectionAccepted +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Net.Sockets +{ + public delegate void SocketConnectionAccepted(ISocket client); +} diff --git a/Net/Sockets/SocketReceiveCallback.cs b/Net/Sockets/SocketReceiveCallback.cs new file mode 100644 index 0000000..cee6417 --- /dev/null +++ b/Net/Sockets/SocketReceiveCallback.cs @@ -0,0 +1,10 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.Sockets.SocketReceiveCallback +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Net.Sockets +{ + public delegate void SocketReceiveCallback(object state, int size); +} diff --git a/Net/Sockets/SocketSendCallback.cs b/Net/Sockets/SocketSendCallback.cs new file mode 100644 index 0000000..e799155 --- /dev/null +++ b/Net/Sockets/SocketSendCallback.cs @@ -0,0 +1,10 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.Sockets.SocketSendCallback +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Net.Sockets +{ + public delegate void SocketSendCallback(object state); +} diff --git a/Net/Sockets/TcpSocket.cs b/Net/Sockets/TcpSocket.cs new file mode 100644 index 0000000..3390282 --- /dev/null +++ b/Net/Sockets/TcpSocket.cs @@ -0,0 +1,155 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.Sockets.TcpSocket +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using System.Net; +using System.Net.Sockets; +using System.Threading; +using Terraria.Localization; + +namespace Terraria.Net.Sockets +{ + public class TcpSocket : ISocket + { + private byte[] _packetBuffer = new byte[1024]; + private List _callbackBuffer = new List(); + private int _messagesInQueue; + private TcpClient _connection; + private TcpListener _listener; + private SocketConnectionAccepted _listenerCallback; + private RemoteAddress _remoteAddress; + private bool _isListening; + + public int MessagesInQueue => this._messagesInQueue; + + public TcpSocket() => this._connection = new TcpClient() + { + NoDelay = true + }; + + public TcpSocket(TcpClient tcpClient) + { + this._connection = tcpClient; + this._connection.NoDelay = true; + IPEndPoint remoteEndPoint = (IPEndPoint) tcpClient.Client.RemoteEndPoint; + this._remoteAddress = (RemoteAddress) new TcpAddress(remoteEndPoint.Address, remoteEndPoint.Port); + } + + void ISocket.Close() + { + this._remoteAddress = (RemoteAddress) null; + this._connection.Close(); + } + + bool ISocket.IsConnected() => this._connection != null && this._connection.Client != null && this._connection.Connected; + + void ISocket.Connect(RemoteAddress address) + { + TcpAddress tcpAddress = (TcpAddress) address; + this._connection.Connect(tcpAddress.Address, tcpAddress.Port); + this._remoteAddress = address; + } + + private void ReadCallback(IAsyncResult result) + { + Tuple asyncState = (Tuple) result.AsyncState; + asyncState.Item1(asyncState.Item2, this._connection.GetStream().EndRead(result)); + } + + private void SendCallback(IAsyncResult result) + { + Tuple asyncState = (Tuple) result.AsyncState; + try + { + this._connection.GetStream().EndWrite(result); + asyncState.Item1(asyncState.Item2); + } + catch (Exception ex) + { + ((ISocket) this).Close(); + } + } + + void ISocket.SendQueuedPackets() + { + } + + void ISocket.AsyncSend( + byte[] data, + int offset, + int size, + SocketSendCallback callback, + object state) + { + this._connection.GetStream().BeginWrite(data, 0, size, new AsyncCallback(this.SendCallback), (object) new Tuple(callback, state)); + } + + void ISocket.AsyncReceive( + byte[] data, + int offset, + int size, + SocketReceiveCallback callback, + object state) + { + this._connection.GetStream().BeginRead(data, offset, size, new AsyncCallback(this.ReadCallback), (object) new Tuple(callback, state)); + } + + bool ISocket.IsDataAvailable() => this._connection.Connected && this._connection.GetStream().DataAvailable; + + RemoteAddress ISocket.GetRemoteAddress() => this._remoteAddress; + + bool ISocket.StartListening(SocketConnectionAccepted callback) + { + IPAddress address = IPAddress.Any; + string ipString; + if (Program.LaunchParameters.TryGetValue("-ip", out ipString) && !IPAddress.TryParse(ipString, out address)) + address = IPAddress.Any; + this._isListening = true; + this._listenerCallback = callback; + if (this._listener == null) + this._listener = new TcpListener(address, Netplay.ListenPort); + try + { + this._listener.Start(); + } + catch (Exception ex) + { + return false; + } + new Thread(new ThreadStart(this.ListenLoop)) + { + IsBackground = true, + Name = "TCP Listen Thread" + }.Start(); + return true; + } + + void ISocket.StopListening() => this._isListening = false; + + private void ListenLoop() + { + while (this._isListening) + { + if (!Netplay.Disconnect) + { + try + { + ISocket client = (ISocket) new TcpSocket(this._listener.AcceptTcpClient()); + Console.WriteLine(Language.GetTextValue("Net.ClientConnecting", (object) client.GetRemoteAddress())); + this._listenerCallback(client); + } + catch (Exception ex) + { + } + } + else + break; + } + this._listener.Stop(); + } + } +} diff --git a/Net/SteamAddress.cs b/Net/SteamAddress.cs new file mode 100644 index 0000000..ca9e624 --- /dev/null +++ b/Net/SteamAddress.cs @@ -0,0 +1,35 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.SteamAddress +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Steamworks; + +namespace Terraria.Net +{ + public class SteamAddress : RemoteAddress + { + public readonly CSteamID SteamId; + private string _friendlyName; + + public SteamAddress(CSteamID steamId) + { + this.Type = AddressType.Steam; + this.SteamId = steamId; + } + + public override string ToString() => "STEAM_0:" + ((ulong) this.SteamId.m_SteamID % 2UL).ToString() + ":" + ((ulong) (this.SteamId.m_SteamID - (76561197960265728L + this.SteamId.m_SteamID % 2L)) / 2UL).ToString(); + + public override string GetIdentifier() => this.ToString(); + + public override bool IsLocalHost() => Program.LaunchParameters.ContainsKey("-localsteamid") && Program.LaunchParameters["-localsteamid"].Equals(__nonvirtual (this.SteamId.m_SteamID.ToString())); + + public override string GetFriendlyName() + { + if (this._friendlyName == null) + this._friendlyName = SteamFriends.GetFriendPersonaName(this.SteamId); + return this._friendlyName; + } + } +} diff --git a/Net/TcpAddress.cs b/Net/TcpAddress.cs new file mode 100644 index 0000000..dacb88c --- /dev/null +++ b/Net/TcpAddress.cs @@ -0,0 +1,31 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.TcpAddress +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Net; + +namespace Terraria.Net +{ + public class TcpAddress : RemoteAddress + { + public IPAddress Address; + public int Port; + + public TcpAddress(IPAddress address, int port) + { + this.Type = AddressType.Tcp; + this.Address = address; + this.Port = port; + } + + public override string GetIdentifier() => this.Address.ToString(); + + public override bool IsLocalHost() => this.Address.Equals((object) IPAddress.Loopback); + + public override string ToString() => new IPEndPoint(this.Address, this.Port).ToString(); + + public override string GetFriendlyName() => this.ToString(); + } +} diff --git a/Net/WeGameAddress.cs b/Net/WeGameAddress.cs new file mode 100644 index 0000000..114c9fd --- /dev/null +++ b/Net/WeGameAddress.cs @@ -0,0 +1,31 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Net.WeGameAddress +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using rail; + +namespace Terraria.Net +{ + public class WeGameAddress : RemoteAddress + { + public readonly RailID rail_id; + private string nickname; + + public WeGameAddress(RailID id, string name) + { + this.Type = AddressType.WeGame; + this.rail_id = id; + this.nickname = name; + } + + public override string ToString() => "WEGAME_0:" + __nonvirtual (((RailComparableID) this.rail_id).id_.ToString()); + + public override string GetIdentifier() => this.ToString(); + + public override bool IsLocalHost() => Program.LaunchParameters.ContainsKey("-localwegameid") && Program.LaunchParameters["-localwegameid"].Equals(__nonvirtual (((RailComparableID) this.rail_id).id_.ToString())); + + public override string GetFriendlyName() => this.nickname; + } +} diff --git a/NetMessage.cs b/NetMessage.cs new file mode 100644 index 0000000..9d347a4 --- /dev/null +++ b/NetMessage.cs @@ -0,0 +1,2450 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.NetMessage +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Ionic.Zlib; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics.PackedVector; +using System; +using System.IO; +using Terraria.Chat; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.GameContent.Events; +using Terraria.GameContent.Tile_Entities; +using Terraria.ID; +using Terraria.IO; +using Terraria.Localization; +using Terraria.Net.Sockets; +using Terraria.Social; + +namespace Terraria +{ + public class NetMessage + { + public static MessageBuffer[] buffer = new MessageBuffer[257]; + private static PlayerDeathReason _currentPlayerDeathReason; + private static NetMessage.NetSoundInfo _currentNetSoundInfo; + private static CoinLossRevengeSystem.RevengeMarker _currentRevengeMarker; + + public static bool TrySendData( + int msgType, + int remoteClient = -1, + int ignoreClient = -1, + NetworkText text = null, + int number = 0, + float number2 = 0.0f, + float number3 = 0.0f, + float number4 = 0.0f, + int number5 = 0, + int number6 = 0, + int number7 = 0) + { + try + { + NetMessage.SendData(msgType, remoteClient, ignoreClient, text, number, number2, number3, number4, number5, number6, number7); + } + catch (Exception ex) + { + return false; + } + return true; + } + + public static void SendData( + int msgType, + int remoteClient = -1, + int ignoreClient = -1, + NetworkText text = null, + int number = 0, + float number2 = 0.0f, + float number3 = 0.0f, + float number4 = 0.0f, + int number5 = 0, + int number6 = 0, + int number7 = 0) + { + if (Main.netMode == 0) + return; + int whoAmi = 256; + if (text == null) + text = NetworkText.Empty; + if (Main.netMode == 2 && remoteClient >= 0) + whoAmi = remoteClient; + lock (NetMessage.buffer[whoAmi]) + { + BinaryWriter writer = NetMessage.buffer[whoAmi].writer; + if (writer == null) + { + NetMessage.buffer[whoAmi].ResetWriter(); + writer = NetMessage.buffer[whoAmi].writer; + } + writer.BaseStream.Position = 0L; + long position1 = writer.BaseStream.Position; + writer.BaseStream.Position += 2L; + writer.Write((byte) msgType); + switch (msgType) + { + case 1: + writer.Write("Terraria" + (object) 230); + break; + case 2: + text.Serialize(writer); + if (Main.dedServ) + { + Console.WriteLine(Language.GetTextValue("CLI.ClientWasBooted", (object) Netplay.Clients[whoAmi].Socket.GetRemoteAddress().ToString(), (object) text)); + break; + } + break; + case 3: + writer.Write((byte) remoteClient); + break; + case 4: + Player player1 = Main.player[number]; + writer.Write((byte) number); + writer.Write((byte) player1.skinVariant); + writer.Write((byte) player1.hair); + writer.Write(player1.name); + writer.Write(player1.hairDye); + BitsByte bitsByte1 = (BitsByte) (byte) 0; + for (int key = 0; key < 8; ++key) + bitsByte1[key] = player1.hideVisibleAccessory[key]; + writer.Write((byte) bitsByte1); + BitsByte bitsByte2 = (BitsByte) (byte) 0; + for (int key = 0; key < 2; ++key) + bitsByte2[key] = player1.hideVisibleAccessory[key + 8]; + writer.Write((byte) bitsByte2); + writer.Write((byte) player1.hideMisc); + writer.WriteRGB(player1.hairColor); + writer.WriteRGB(player1.skinColor); + writer.WriteRGB(player1.eyeColor); + writer.WriteRGB(player1.shirtColor); + writer.WriteRGB(player1.underShirtColor); + writer.WriteRGB(player1.pantsColor); + writer.WriteRGB(player1.shoeColor); + BitsByte bitsByte3 = (BitsByte) (byte) 0; + if (player1.difficulty == (byte) 1) + bitsByte3[0] = true; + else if (player1.difficulty == (byte) 2) + bitsByte3[1] = true; + else if (player1.difficulty == (byte) 3) + bitsByte3[3] = true; + bitsByte3[2] = player1.extraAccessory; + writer.Write((byte) bitsByte3); + BitsByte bitsByte4 = (BitsByte) (byte) 0; + bitsByte4[0] = player1.UsingBiomeTorches; + bitsByte4[1] = player1.happyFunTorchTime; + writer.Write((byte) bitsByte4); + break; + case 5: + writer.Write((byte) number); + writer.Write((short) number2); + Player player2 = Main.player[number]; + Item obj1 = (double) number2 <= (double) (58 + player2.armor.Length + player2.dye.Length + player2.miscEquips.Length + player2.miscDyes.Length + player2.bank.item.Length + player2.bank2.item.Length + player2.bank3.item.Length + 1) ? ((double) number2 <= (double) (58 + player2.armor.Length + player2.dye.Length + player2.miscEquips.Length + player2.miscDyes.Length + player2.bank.item.Length + player2.bank2.item.Length + 1) ? ((double) number2 <= (double) (58 + player2.armor.Length + player2.dye.Length + player2.miscEquips.Length + player2.miscDyes.Length + player2.bank.item.Length + player2.bank2.item.Length) ? ((double) number2 <= (double) (58 + player2.armor.Length + player2.dye.Length + player2.miscEquips.Length + player2.miscDyes.Length + player2.bank.item.Length) ? ((double) number2 <= (double) (58 + player2.armor.Length + player2.dye.Length + player2.miscEquips.Length + player2.miscDyes.Length) ? ((double) number2 <= (double) (58 + player2.armor.Length + player2.dye.Length + player2.miscEquips.Length) ? ((double) number2 <= (double) (58 + player2.armor.Length + player2.dye.Length) ? ((double) number2 <= (double) (58 + player2.armor.Length) ? ((double) number2 <= 58.0 ? player2.inventory[(int) number2] : player2.armor[(int) number2 - 58 - 1]) : player2.dye[(int) number2 - 58 - player2.armor.Length - 1]) : player2.miscEquips[(int) number2 - 58 - (player2.armor.Length + player2.dye.Length) - 1]) : player2.miscDyes[(int) number2 - 58 - (player2.armor.Length + player2.dye.Length + player2.miscEquips.Length) - 1]) : player2.bank.item[(int) number2 - 58 - (player2.armor.Length + player2.dye.Length + player2.miscEquips.Length + player2.miscDyes.Length) - 1]) : player2.bank2.item[(int) number2 - 58 - (player2.armor.Length + player2.dye.Length + player2.miscEquips.Length + player2.miscDyes.Length + player2.bank.item.Length) - 1]) : player2.trashItem) : player2.bank3.item[(int) number2 - 58 - (player2.armor.Length + player2.dye.Length + player2.miscEquips.Length + player2.miscDyes.Length + player2.bank.item.Length + player2.bank2.item.Length + 1) - 1]) : player2.bank4.item[(int) number2 - 58 - (player2.armor.Length + player2.dye.Length + player2.miscEquips.Length + player2.miscDyes.Length + player2.bank.item.Length + player2.bank2.item.Length + player2.bank3.item.Length + 1) - 1]; + if (obj1.Name == "" || obj1.stack == 0 || obj1.type == 0) + obj1.SetDefaults(0, true); + int num1 = obj1.stack; + int netId1 = obj1.netID; + if (num1 < 0) + num1 = 0; + writer.Write((short) num1); + writer.Write((byte) number3); + writer.Write((short) netId1); + break; + case 7: + writer.Write((int) Main.time); + BitsByte bitsByte5 = (BitsByte) (byte) 0; + bitsByte5[0] = Main.dayTime; + bitsByte5[1] = Main.bloodMoon; + bitsByte5[2] = Main.eclipse; + writer.Write((byte) bitsByte5); + writer.Write((byte) Main.moonPhase); + writer.Write((short) Main.maxTilesX); + writer.Write((short) Main.maxTilesY); + writer.Write((short) Main.spawnTileX); + writer.Write((short) Main.spawnTileY); + writer.Write((short) Main.worldSurface); + writer.Write((short) Main.rockLayer); + writer.Write(Main.worldID); + writer.Write(Main.worldName); + writer.Write((byte) Main.GameMode); + writer.Write(Main.ActiveWorldFileData.UniqueId.ToByteArray()); + writer.Write(Main.ActiveWorldFileData.WorldGeneratorVersion); + writer.Write((byte) Main.moonType); + writer.Write((byte) WorldGen.treeBG1); + writer.Write((byte) WorldGen.treeBG2); + writer.Write((byte) WorldGen.treeBG3); + writer.Write((byte) WorldGen.treeBG4); + writer.Write((byte) WorldGen.corruptBG); + writer.Write((byte) WorldGen.jungleBG); + writer.Write((byte) WorldGen.snowBG); + writer.Write((byte) WorldGen.hallowBG); + writer.Write((byte) WorldGen.crimsonBG); + writer.Write((byte) WorldGen.desertBG); + writer.Write((byte) WorldGen.oceanBG); + writer.Write((byte) WorldGen.mushroomBG); + writer.Write((byte) WorldGen.underworldBG); + writer.Write((byte) Main.iceBackStyle); + writer.Write((byte) Main.jungleBackStyle); + writer.Write((byte) Main.hellBackStyle); + writer.Write(Main.windSpeedTarget); + writer.Write((byte) Main.numClouds); + for (int index = 0; index < 3; ++index) + writer.Write(Main.treeX[index]); + for (int index = 0; index < 4; ++index) + writer.Write((byte) Main.treeStyle[index]); + for (int index = 0; index < 3; ++index) + writer.Write(Main.caveBackX[index]); + for (int index = 0; index < 4; ++index) + writer.Write((byte) Main.caveBackStyle[index]); + WorldGen.TreeTops.SyncSend(writer); + if (!Main.raining) + Main.maxRaining = 0.0f; + writer.Write(Main.maxRaining); + BitsByte bitsByte6 = (BitsByte) (byte) 0; + bitsByte6[0] = WorldGen.shadowOrbSmashed; + bitsByte6[1] = NPC.downedBoss1; + bitsByte6[2] = NPC.downedBoss2; + bitsByte6[3] = NPC.downedBoss3; + bitsByte6[4] = Main.hardMode; + bitsByte6[5] = NPC.downedClown; + bitsByte6[7] = NPC.downedPlantBoss; + writer.Write((byte) bitsByte6); + BitsByte bitsByte7 = (BitsByte) (byte) 0; + bitsByte7[0] = NPC.downedMechBoss1; + bitsByte7[1] = NPC.downedMechBoss2; + bitsByte7[2] = NPC.downedMechBoss3; + bitsByte7[3] = NPC.downedMechBossAny; + bitsByte7[4] = (double) Main.cloudBGActive >= 1.0; + bitsByte7[5] = WorldGen.crimson; + bitsByte7[6] = Main.pumpkinMoon; + bitsByte7[7] = Main.snowMoon; + writer.Write((byte) bitsByte7); + BitsByte bitsByte8 = (BitsByte) (byte) 0; + bitsByte8[1] = Main.fastForwardTime; + bitsByte8[2] = Main.slimeRain; + bitsByte8[3] = NPC.downedSlimeKing; + bitsByte8[4] = NPC.downedQueenBee; + bitsByte8[5] = NPC.downedFishron; + bitsByte8[6] = NPC.downedMartians; + bitsByte8[7] = NPC.downedAncientCultist; + writer.Write((byte) bitsByte8); + BitsByte bitsByte9 = (BitsByte) (byte) 0; + bitsByte9[0] = NPC.downedMoonlord; + bitsByte9[1] = NPC.downedHalloweenKing; + bitsByte9[2] = NPC.downedHalloweenTree; + bitsByte9[3] = NPC.downedChristmasIceQueen; + bitsByte9[4] = NPC.downedChristmasSantank; + bitsByte9[5] = NPC.downedChristmasTree; + bitsByte9[6] = NPC.downedGolemBoss; + bitsByte9[7] = BirthdayParty.PartyIsUp; + writer.Write((byte) bitsByte9); + BitsByte bitsByte10 = (BitsByte) (byte) 0; + bitsByte10[0] = NPC.downedPirates; + bitsByte10[1] = NPC.downedFrost; + bitsByte10[2] = NPC.downedGoblins; + bitsByte10[3] = Sandstorm.Happening; + bitsByte10[4] = DD2Event.Ongoing; + bitsByte10[5] = DD2Event.DownedInvasionT1; + bitsByte10[6] = DD2Event.DownedInvasionT2; + bitsByte10[7] = DD2Event.DownedInvasionT3; + writer.Write((byte) bitsByte10); + BitsByte bitsByte11 = (BitsByte) (byte) 0; + bitsByte11[0] = NPC.combatBookWasUsed; + bitsByte11[1] = LanternNight.LanternsUp; + bitsByte11[2] = NPC.downedTowerSolar; + bitsByte11[3] = NPC.downedTowerVortex; + bitsByte11[4] = NPC.downedTowerNebula; + bitsByte11[5] = NPC.downedTowerStardust; + bitsByte11[6] = Main.forceHalloweenForToday; + bitsByte11[7] = Main.forceXMasForToday; + writer.Write((byte) bitsByte11); + BitsByte bitsByte12 = (BitsByte) (byte) 0; + bitsByte12[0] = NPC.boughtCat; + bitsByte12[1] = NPC.boughtDog; + bitsByte12[2] = NPC.boughtBunny; + bitsByte12[3] = NPC.freeCake; + bitsByte12[4] = Main.drunkWorld; + bitsByte12[5] = NPC.downedEmpressOfLight; + bitsByte12[6] = NPC.downedQueenSlime; + bitsByte12[7] = Main.getGoodWorld; + writer.Write((byte) bitsByte12); + writer.Write((short) WorldGen.SavedOreTiers.Copper); + writer.Write((short) WorldGen.SavedOreTiers.Iron); + writer.Write((short) WorldGen.SavedOreTiers.Silver); + writer.Write((short) WorldGen.SavedOreTiers.Gold); + writer.Write((short) WorldGen.SavedOreTiers.Cobalt); + writer.Write((short) WorldGen.SavedOreTiers.Mythril); + writer.Write((short) WorldGen.SavedOreTiers.Adamantite); + writer.Write((sbyte) Main.invasionType); + if (SocialAPI.Network != null) + writer.Write(SocialAPI.Network.GetLobbyId()); + else + writer.Write(0UL); + writer.Write(Sandstorm.IntendedSeverity); + break; + case 8: + writer.Write(number); + writer.Write((int) number2); + break; + case 9: + writer.Write(number); + text.Serialize(writer); + BitsByte bitsByte13 = (BitsByte) (byte) number2; + writer.Write((byte) bitsByte13); + break; + case 10: + int num2 = NetMessage.CompressTileBlock(number, (int) number2, (short) number3, (short) number4, NetMessage.buffer[whoAmi].writeBuffer, (int) writer.BaseStream.Position); + writer.BaseStream.Position += (long) num2; + break; + case 11: + writer.Write((short) number); + writer.Write((short) number2); + writer.Write((short) number3); + writer.Write((short) number4); + break; + case 12: + Player player3 = Main.player[number]; + writer.Write((byte) number); + writer.Write((short) player3.SpawnX); + writer.Write((short) player3.SpawnY); + writer.Write(player3.respawnTimer); + writer.Write((byte) number2); + break; + case 13: + Player player4 = Main.player[number]; + writer.Write((byte) number); + BitsByte bitsByte14 = (BitsByte) (byte) 0; + bitsByte14[0] = player4.controlUp; + bitsByte14[1] = player4.controlDown; + bitsByte14[2] = player4.controlLeft; + bitsByte14[3] = player4.controlRight; + bitsByte14[4] = player4.controlJump; + bitsByte14[5] = player4.controlUseItem; + bitsByte14[6] = player4.direction == 1; + writer.Write((byte) bitsByte14); + BitsByte bitsByte15 = (BitsByte) (byte) 0; + bitsByte15[0] = player4.pulley; + bitsByte15[1] = player4.pulley && player4.pulleyDir == (byte) 2; + bitsByte15[2] = player4.velocity != Vector2.Zero; + bitsByte15[3] = player4.vortexStealthActive; + bitsByte15[4] = (double) player4.gravDir == 1.0; + bitsByte15[5] = player4.shieldRaised; + bitsByte15[6] = player4.ghost; + writer.Write((byte) bitsByte15); + BitsByte bitsByte16 = (BitsByte) (byte) 0; + bitsByte16[0] = player4.tryKeepingHoveringUp; + bitsByte16[1] = player4.IsVoidVaultEnabled; + bitsByte16[2] = player4.sitting.isSitting; + bitsByte16[3] = player4.downedDD2EventAnyDifficulty; + bitsByte16[4] = player4.isPettingAnimal; + bitsByte16[5] = player4.isTheAnimalBeingPetSmall; + bitsByte16[6] = player4.PotionOfReturnOriginalUsePosition.HasValue; + bitsByte16[7] = player4.tryKeepingHoveringDown; + writer.Write((byte) bitsByte16); + BitsByte bitsByte17 = (BitsByte) (byte) 0; + bitsByte17[0] = player4.sleeping.isSleeping; + writer.Write((byte) bitsByte17); + writer.Write((byte) player4.selectedItem); + writer.WriteVector2(player4.position); + if (bitsByte15[2]) + writer.WriteVector2(player4.velocity); + if (bitsByte16[6]) + { + writer.WriteVector2(player4.PotionOfReturnOriginalUsePosition.Value); + writer.WriteVector2(player4.PotionOfReturnHomePosition.Value); + break; + } + break; + case 14: + writer.Write((byte) number); + writer.Write((byte) number2); + break; + case 16: + writer.Write((byte) number); + writer.Write((short) Main.player[number].statLife); + writer.Write((short) Main.player[number].statLifeMax); + break; + case 17: + writer.Write((byte) number); + writer.Write((short) number2); + writer.Write((short) number3); + writer.Write((short) number4); + writer.Write((byte) number5); + break; + case 18: + writer.Write(Main.dayTime ? (byte) 1 : (byte) 0); + writer.Write((int) Main.time); + writer.Write(Main.sunModY); + writer.Write(Main.moonModY); + break; + case 19: + writer.Write((byte) number); + writer.Write((short) number2); + writer.Write((short) number3); + writer.Write((double) number4 == 1.0 ? (byte) 1 : (byte) 0); + break; + case 20: + int num3 = number; + int num4 = (int) number2; + int num5 = (int) number3; + if (num3 < 0) + num3 = 0; + if (num4 < num3) + num4 = num3; + if (num4 >= Main.maxTilesX + num3) + num4 = Main.maxTilesX - num3 - 1; + if (num5 < num3) + num5 = num3; + if (num5 >= Main.maxTilesY + num3) + num5 = Main.maxTilesY - num3 - 1; + if (number5 == 0) + { + writer.Write((ushort) (num3 & (int) short.MaxValue)); + } + else + { + writer.Write((ushort) (num3 & (int) short.MaxValue | 32768)); + writer.Write((byte) number5); + } + writer.Write((short) num4); + writer.Write((short) num5); + for (int index1 = num4; index1 < num4 + num3; ++index1) + { + for (int index2 = num5; index2 < num5 + num3; ++index2) + { + BitsByte bitsByte18 = (BitsByte) (byte) 0; + BitsByte bitsByte19 = (BitsByte) (byte) 0; + byte num6 = 0; + byte num7 = 0; + Tile tile = Main.tile[index1, index2]; + bitsByte18[0] = tile.active(); + bitsByte18[2] = tile.wall > (ushort) 0; + bitsByte18[3] = tile.liquid > (byte) 0 && Main.netMode == 2; + bitsByte18[4] = tile.wire(); + bitsByte18[5] = tile.halfBrick(); + bitsByte18[6] = tile.actuator(); + bitsByte18[7] = tile.inActive(); + bitsByte19[0] = tile.wire2(); + bitsByte19[1] = tile.wire3(); + if (tile.active() && tile.color() > (byte) 0) + { + bitsByte19[2] = true; + num6 = tile.color(); + } + if (tile.wall > (ushort) 0 && tile.wallColor() > (byte) 0) + { + bitsByte19[3] = true; + num7 = tile.wallColor(); + } + bitsByte19 = (BitsByte) (byte) ((uint) (byte) bitsByte19 + (uint) (byte) ((uint) tile.slope() << 4)); + bitsByte19[7] = tile.wire4(); + writer.Write((byte) bitsByte18); + writer.Write((byte) bitsByte19); + if (num6 > (byte) 0) + writer.Write(num6); + if (num7 > (byte) 0) + writer.Write(num7); + if (tile.active()) + { + writer.Write(tile.type); + if (Main.tileFrameImportant[(int) tile.type]) + { + writer.Write(tile.frameX); + writer.Write(tile.frameY); + } + } + if (tile.wall > (ushort) 0) + writer.Write(tile.wall); + if (tile.liquid > (byte) 0 && Main.netMode == 2) + { + writer.Write(tile.liquid); + writer.Write(tile.liquidType()); + } + } + } + break; + case 21: + case 90: + Item obj2 = Main.item[number]; + writer.Write((short) number); + writer.WriteVector2(obj2.position); + writer.WriteVector2(obj2.velocity); + writer.Write((short) obj2.stack); + writer.Write(obj2.prefix); + writer.Write((byte) number2); + short num8 = 0; + if (obj2.active && obj2.stack > 0) + num8 = (short) obj2.netID; + writer.Write(num8); + break; + case 22: + writer.Write((short) number); + writer.Write((byte) Main.item[number].playerIndexTheItemIsReservedFor); + break; + case 23: + NPC npc1 = Main.npc[number]; + writer.Write((short) number); + writer.WriteVector2(npc1.position); + writer.WriteVector2(npc1.velocity); + writer.Write((ushort) npc1.target); + int num9 = npc1.life; + if (!npc1.active) + num9 = 0; + if (!npc1.active || npc1.life <= 0) + npc1.netSkip = 0; + short netId2 = (short) npc1.netID; + bool[] flagArray = new bool[4]; + BitsByte bitsByte20 = (BitsByte) (byte) 0; + bitsByte20[0] = npc1.direction > 0; + bitsByte20[1] = npc1.directionY > 0; + bitsByte20[2] = flagArray[0] = (double) npc1.ai[0] != 0.0; + bitsByte20[3] = flagArray[1] = (double) npc1.ai[1] != 0.0; + bitsByte20[4] = flagArray[2] = (double) npc1.ai[2] != 0.0; + bitsByte20[5] = flagArray[3] = (double) npc1.ai[3] != 0.0; + bitsByte20[6] = npc1.spriteDirection > 0; + bitsByte20[7] = num9 == npc1.lifeMax; + writer.Write((byte) bitsByte20); + BitsByte bitsByte21 = (BitsByte) (byte) 0; + bitsByte21[0] = npc1.statsAreScaledForThisManyPlayers > 1; + bitsByte21[1] = npc1.SpawnedFromStatue; + bitsByte21[2] = (double) npc1.strengthMultiplier != 1.0; + writer.Write((byte) bitsByte21); + for (int index = 0; index < NPC.maxAI; ++index) + { + if (flagArray[index]) + writer.Write(npc1.ai[index]); + } + writer.Write(netId2); + if (bitsByte21[0]) + writer.Write((byte) npc1.statsAreScaledForThisManyPlayers); + if (bitsByte21[2]) + writer.Write(npc1.strengthMultiplier); + if (!bitsByte20[7]) + { + byte num10 = 1; + if (npc1.lifeMax > (int) short.MaxValue) + num10 = (byte) 4; + else if (npc1.lifeMax > (int) sbyte.MaxValue) + num10 = (byte) 2; + writer.Write(num10); + switch (num10) + { + case 2: + writer.Write((short) num9); + break; + case 4: + writer.Write(num9); + break; + default: + writer.Write((sbyte) num9); + break; + } + } + if (npc1.type >= 0 && npc1.type < 663 && Main.npcCatchable[npc1.type]) + { + writer.Write((byte) npc1.releaseOwner); + break; + } + break; + case 24: + writer.Write((short) number); + writer.Write((byte) number2); + break; + case 27: + Projectile projectile1 = Main.projectile[number]; + writer.Write((short) projectile1.identity); + writer.WriteVector2(projectile1.position); + writer.WriteVector2(projectile1.velocity); + writer.Write((byte) projectile1.owner); + writer.Write((short) projectile1.type); + BitsByte bitsByte22 = (BitsByte) (byte) 0; + for (int key = 0; key < Projectile.maxAI; ++key) + { + if ((double) projectile1.ai[key] != 0.0) + bitsByte22[key] = true; + } + if (projectile1.damage != 0) + bitsByte22[4] = true; + if ((double) projectile1.knockBack != 0.0) + bitsByte22[5] = true; + if (projectile1.type > 0 && projectile1.type < 950 && ProjectileID.Sets.NeedsUUID[projectile1.type]) + bitsByte22[7] = true; + if (projectile1.originalDamage != 0) + bitsByte22[6] = true; + writer.Write((byte) bitsByte22); + for (int key = 0; key < Projectile.maxAI; ++key) + { + if (bitsByte22[key]) + writer.Write(projectile1.ai[key]); + } + if (bitsByte22[4]) + writer.Write((short) projectile1.damage); + if (bitsByte22[5]) + writer.Write(projectile1.knockBack); + if (bitsByte22[6]) + writer.Write((short) projectile1.originalDamage); + if (bitsByte22[7]) + { + writer.Write((short) projectile1.projUUID); + break; + } + break; + case 28: + writer.Write((short) number); + writer.Write((short) number2); + writer.Write(number3); + writer.Write((byte) ((double) number4 + 1.0)); + writer.Write((byte) number5); + break; + case 29: + writer.Write((short) number); + writer.Write((byte) number2); + break; + case 30: + writer.Write((byte) number); + writer.Write(Main.player[number].hostile); + break; + case 31: + writer.Write((short) number); + writer.Write((short) number2); + break; + case 32: + Item obj3 = Main.chest[number].item[(int) (byte) number2]; + writer.Write((short) number); + writer.Write((byte) number2); + short num11 = (short) obj3.netID; + if (obj3.Name == null) + num11 = (short) 0; + writer.Write((short) obj3.stack); + writer.Write(obj3.prefix); + writer.Write(num11); + break; + case 33: + int num12 = 0; + int num13 = 0; + int num14 = 0; + string str1 = (string) null; + if (number > -1) + { + num12 = Main.chest[number].x; + num13 = Main.chest[number].y; + } + if ((double) number2 == 1.0) + { + string str2 = text.ToString(); + num14 = (int) (byte) str2.Length; + if (num14 == 0 || num14 > 20) + num14 = (int) byte.MaxValue; + else + str1 = str2; + } + writer.Write((short) number); + writer.Write((short) num12); + writer.Write((short) num13); + writer.Write((byte) num14); + if (str1 != null) + { + writer.Write(str1); + break; + } + break; + case 34: + writer.Write((byte) number); + writer.Write((short) number2); + writer.Write((short) number3); + writer.Write((short) number4); + if (Main.netMode == 2) + { + Netplay.GetSectionX((int) number2); + Netplay.GetSectionY((int) number3); + writer.Write((short) number5); + break; + } + writer.Write((short) 0); + break; + case 35: + writer.Write((byte) number); + writer.Write((short) number2); + break; + case 36: + Player player5 = Main.player[number]; + writer.Write((byte) number); + writer.Write((byte) player5.zone1); + writer.Write((byte) player5.zone2); + writer.Write((byte) player5.zone3); + writer.Write((byte) player5.zone4); + break; + case 38: + writer.Write(Netplay.ServerPassword); + break; + case 39: + writer.Write((short) number); + break; + case 40: + writer.Write((byte) number); + writer.Write((short) Main.player[number].talkNPC); + break; + case 41: + writer.Write((byte) number); + writer.Write(Main.player[number].itemRotation); + writer.Write((short) Main.player[number].itemAnimation); + break; + case 42: + writer.Write((byte) number); + writer.Write((short) Main.player[number].statMana); + writer.Write((short) Main.player[number].statManaMax); + break; + case 43: + writer.Write((byte) number); + writer.Write((short) number2); + break; + case 45: + writer.Write((byte) number); + writer.Write((byte) Main.player[number].team); + break; + case 46: + writer.Write((short) number); + writer.Write((short) number2); + break; + case 47: + writer.Write((short) number); + writer.Write((short) Main.sign[number].x); + writer.Write((short) Main.sign[number].y); + writer.Write(Main.sign[number].text); + writer.Write((byte) number2); + writer.Write((byte) number3); + break; + case 48: + Tile tile1 = Main.tile[number, (int) number2]; + writer.Write((short) number); + writer.Write((short) number2); + writer.Write(tile1.liquid); + writer.Write(tile1.liquidType()); + break; + case 50: + writer.Write((byte) number); + for (int index = 0; index < 22; ++index) + writer.Write((ushort) Main.player[number].buffType[index]); + break; + case 51: + writer.Write((byte) number); + writer.Write((byte) number2); + break; + case 52: + writer.Write((byte) number2); + writer.Write((short) number3); + writer.Write((short) number4); + break; + case 53: + writer.Write((short) number); + writer.Write((ushort) number2); + writer.Write((short) number3); + break; + case 54: + writer.Write((short) number); + for (int index = 0; index < 5; ++index) + { + writer.Write((ushort) Main.npc[number].buffType[index]); + writer.Write((short) Main.npc[number].buffTime[index]); + } + break; + case 55: + writer.Write((byte) number); + writer.Write((ushort) number2); + writer.Write((int) number3); + break; + case 56: + writer.Write((short) number); + if (Main.netMode == 2) + { + string givenName = Main.npc[number].GivenName; + writer.Write(givenName); + writer.Write(Main.npc[number].townNpcVariationIndex); + break; + } + break; + case 57: + writer.Write(WorldGen.tGood); + writer.Write(WorldGen.tEvil); + writer.Write(WorldGen.tBlood); + break; + case 58: + writer.Write((byte) number); + writer.Write(number2); + break; + case 59: + writer.Write((short) number); + writer.Write((short) number2); + break; + case 60: + writer.Write((short) number); + writer.Write((short) number2); + writer.Write((short) number3); + writer.Write((byte) number4); + break; + case 61: + writer.Write((short) number); + writer.Write((short) number2); + break; + case 62: + writer.Write((byte) number); + writer.Write((byte) number2); + break; + case 63: + case 64: + writer.Write((short) number); + writer.Write((short) number2); + writer.Write((byte) number3); + break; + case 65: + BitsByte bitsByte23 = (BitsByte) (byte) 0; + bitsByte23[0] = (number & 1) == 1; + bitsByte23[1] = (number & 2) == 2; + bitsByte23[2] = number6 == 1; + bitsByte23[3] = (uint) number7 > 0U; + writer.Write((byte) bitsByte23); + writer.Write((short) number2); + writer.Write(number3); + writer.Write(number4); + writer.Write((byte) number5); + if (bitsByte23[3]) + { + writer.Write(number7); + break; + } + break; + case 66: + writer.Write((byte) number); + writer.Write((short) number2); + break; + case 68: + writer.Write(Main.clientUUID); + break; + case 69: + Netplay.GetSectionX((int) number2); + Netplay.GetSectionY((int) number3); + writer.Write((short) number); + writer.Write((short) number2); + writer.Write((short) number3); + writer.Write(Main.chest[(int) (short) number].name); + break; + case 70: + writer.Write((short) number); + writer.Write((byte) number2); + break; + case 71: + writer.Write(number); + writer.Write((int) number2); + writer.Write((short) number3); + writer.Write((byte) number4); + break; + case 72: + for (int index = 0; index < 40; ++index) + writer.Write((short) Main.travelShop[index]); + break; + case 73: + writer.Write((byte) number); + break; + case 74: + writer.Write((byte) Main.anglerQuest); + bool flag1 = Main.anglerWhoFinishedToday.Contains(text.ToString()); + writer.Write(flag1); + break; + case 76: + writer.Write((byte) number); + writer.Write(Main.player[number].anglerQuestsFinished); + writer.Write(Main.player[number].golferScoreAccumulated); + break; + case 77: + if (Main.netMode != 2) + return; + writer.Write((short) number); + writer.Write((ushort) number2); + writer.Write((short) number3); + writer.Write((short) number4); + break; + case 78: + writer.Write(number); + writer.Write((int) number2); + writer.Write((sbyte) number3); + writer.Write((sbyte) number4); + break; + case 79: + writer.Write((short) number); + writer.Write((short) number2); + writer.Write((short) number3); + writer.Write((short) number4); + writer.Write((byte) number5); + writer.Write((sbyte) number6); + writer.Write(number7 == 1); + break; + case 80: + writer.Write((byte) number); + writer.Write((short) number2); + break; + case 81: + writer.Write(number2); + writer.Write(number3); + writer.WriteRGB(new Color() + { + PackedValue = (uint) number + }); + writer.Write((int) number4); + break; + case 83: + int index3 = number; + if (index3 < 0 && index3 >= 289) + index3 = 1; + int num15 = NPC.killCount[index3]; + writer.Write((short) index3); + writer.Write(num15); + break; + case 84: + byte num16 = (byte) number; + float stealth = Main.player[(int) num16].stealth; + writer.Write(num16); + writer.Write(stealth); + break; + case 85: + byte num17 = (byte) number; + writer.Write(num17); + break; + case 86: + writer.Write(number); + bool flag2 = TileEntity.ByID.ContainsKey(number); + writer.Write(flag2); + if (flag2) + { + TileEntity.Write(writer, TileEntity.ByID[number], true); + break; + } + break; + case 87: + writer.Write((short) number); + writer.Write((short) number2); + writer.Write((byte) number3); + break; + case 88: + BitsByte bitsByte24 = (BitsByte) (byte) number2; + BitsByte bitsByte25 = (BitsByte) (byte) number3; + writer.Write((short) number); + writer.Write((byte) bitsByte24); + Item obj4 = Main.item[number]; + if (bitsByte24[0]) + writer.Write(obj4.color.PackedValue); + if (bitsByte24[1]) + writer.Write((ushort) obj4.damage); + if (bitsByte24[2]) + writer.Write(obj4.knockBack); + if (bitsByte24[3]) + writer.Write((ushort) obj4.useAnimation); + if (bitsByte24[4]) + writer.Write((ushort) obj4.useTime); + if (bitsByte24[5]) + writer.Write((short) obj4.shoot); + if (bitsByte24[6]) + writer.Write(obj4.shootSpeed); + if (bitsByte24[7]) + { + writer.Write((byte) bitsByte25); + if (bitsByte25[0]) + writer.Write((ushort) obj4.width); + if (bitsByte25[1]) + writer.Write((ushort) obj4.height); + if (bitsByte25[2]) + writer.Write(obj4.scale); + if (bitsByte25[3]) + writer.Write((short) obj4.ammo); + if (bitsByte25[4]) + writer.Write((short) obj4.useAmmo); + if (bitsByte25[5]) + { + writer.Write(obj4.notAmmo); + break; + } + break; + } + break; + case 89: + writer.Write((short) number); + writer.Write((short) number2); + Item obj5 = Main.player[(int) number4].inventory[(int) number3]; + writer.Write((short) obj5.netID); + writer.Write(obj5.prefix); + writer.Write((short) number5); + break; + case 91: + writer.Write(number); + writer.Write((byte) number2); + if ((double) number2 != (double) byte.MaxValue) + { + writer.Write((ushort) number3); + writer.Write((ushort) number4); + writer.Write((byte) number5); + if (number5 < 0) + { + writer.Write((short) number6); + break; + } + break; + } + break; + case 92: + writer.Write((short) number); + writer.Write((int) number2); + writer.Write(number3); + writer.Write(number4); + break; + case 95: + writer.Write((ushort) number); + writer.Write((byte) number2); + break; + case 96: + writer.Write((byte) number); + Player player6 = Main.player[number]; + writer.Write((short) number4); + writer.Write(number2); + writer.Write(number3); + writer.WriteVector2(player6.velocity); + break; + case 97: + writer.Write((short) number); + break; + case 98: + writer.Write((short) number); + break; + case 99: + writer.Write((byte) number); + writer.WriteVector2(Main.player[number].MinionRestTargetPoint); + break; + case 100: + writer.Write((ushort) number); + NPC npc2 = Main.npc[number]; + writer.Write((short) number4); + writer.Write(number2); + writer.Write(number3); + writer.WriteVector2(npc2.velocity); + break; + case 101: + writer.Write((ushort) NPC.ShieldStrengthTowerSolar); + writer.Write((ushort) NPC.ShieldStrengthTowerVortex); + writer.Write((ushort) NPC.ShieldStrengthTowerNebula); + writer.Write((ushort) NPC.ShieldStrengthTowerStardust); + break; + case 102: + writer.Write((byte) number); + writer.Write((ushort) number2); + writer.Write(number3); + writer.Write(number4); + break; + case 103: + writer.Write(NPC.MoonLordCountdown); + break; + case 104: + writer.Write((byte) number); + writer.Write((short) number2); + writer.Write((short) number3 < (short) 0 ? 0.0f : number3); + writer.Write((byte) number4); + writer.Write(number5); + writer.Write((byte) number6); + break; + case 105: + writer.Write((short) number); + writer.Write((short) number2); + writer.Write((double) number3 == 1.0); + break; + case 106: + HalfVector2 halfVector2 = new HalfVector2((float) number, number2); + writer.Write(halfVector2.PackedValue); + break; + case 107: + writer.Write((byte) number2); + writer.Write((byte) number3); + writer.Write((byte) number4); + text.Serialize(writer); + writer.Write((short) number5); + break; + case 108: + writer.Write((short) number); + writer.Write(number2); + writer.Write((short) number3); + writer.Write((short) number4); + writer.Write((short) number5); + writer.Write((short) number6); + writer.Write((byte) number7); + break; + case 109: + writer.Write((short) number); + writer.Write((short) number2); + writer.Write((short) number3); + writer.Write((short) number4); + writer.Write((byte) number5); + break; + case 110: + writer.Write((short) number); + writer.Write((short) number2); + writer.Write((byte) number3); + break; + case 112: + writer.Write((byte) number); + writer.Write((int) number2); + writer.Write((int) number3); + writer.Write((byte) number4); + writer.Write((short) number5); + break; + case 113: + writer.Write((short) number); + writer.Write((short) number2); + break; + case 115: + writer.Write((byte) number); + writer.Write((short) Main.player[number].MinionAttackTargetNPC); + break; + case 116: + writer.Write(number); + break; + case 117: + writer.Write((byte) number); + NetMessage._currentPlayerDeathReason.WriteSelfTo(writer); + writer.Write((short) number2); + writer.Write((byte) ((double) number3 + 1.0)); + writer.Write((byte) number4); + writer.Write((sbyte) number5); + break; + case 118: + writer.Write((byte) number); + NetMessage._currentPlayerDeathReason.WriteSelfTo(writer); + writer.Write((short) number2); + writer.Write((byte) ((double) number3 + 1.0)); + writer.Write((byte) number4); + break; + case 119: + writer.Write(number2); + writer.Write(number3); + writer.WriteRGB(new Color() + { + PackedValue = (uint) number + }); + text.Serialize(writer); + break; + case 120: + writer.Write((byte) number); + writer.Write((byte) number2); + break; + case 121: + int num18 = (int) number3; + bool dye1 = (double) number4 == 1.0; + if (dye1) + num18 += 8; + writer.Write((byte) number); + writer.Write((int) number2); + writer.Write((byte) num18); + if (TileEntity.ByID[(int) number2] is TEDisplayDoll teDisplayDoll3) + { + teDisplayDoll3.WriteItem((int) number3, writer, dye1); + break; + } + writer.Write(0); + writer.Write((byte) 0); + break; + case 122: + writer.Write(number); + writer.Write((byte) number2); + break; + case 123: + writer.Write((short) number); + writer.Write((short) number2); + Item obj6 = Main.player[(int) number4].inventory[(int) number3]; + writer.Write((short) obj6.netID); + writer.Write(obj6.prefix); + writer.Write((short) number5); + break; + case 124: + int num19 = (int) number3; + bool dye2 = (double) number4 == 1.0; + if (dye2) + num19 += 2; + writer.Write((byte) number); + writer.Write((int) number2); + writer.Write((byte) num19); + if (TileEntity.ByID[(int) number2] is TEHatRack teHatRack3) + { + teHatRack3.WriteItem((int) number3, writer, dye2); + break; + } + writer.Write(0); + writer.Write((byte) 0); + break; + case 125: + writer.Write((byte) number); + writer.Write((short) number2); + writer.Write((short) number3); + writer.Write((byte) number4); + break; + case 126: + NetMessage._currentRevengeMarker.WriteSelfTo(writer); + break; + case (int) sbyte.MaxValue: + writer.Write(number); + break; + case 128: + writer.Write((byte) number); + writer.Write((ushort) number5); + writer.Write((ushort) number6); + writer.Write((ushort) number2); + writer.Write((ushort) number3); + break; + case 130: + writer.Write((ushort) number); + writer.Write((ushort) number2); + writer.Write((short) number3); + break; + case 131: + writer.Write((ushort) number); + writer.Write((byte) number2); + if ((byte) number2 == (byte) 1) + { + writer.Write((int) number3); + writer.Write((short) number4); + break; + } + break; + case 132: + NetMessage._currentNetSoundInfo.WriteSelfTo(writer); + break; + case 133: + writer.Write((short) number); + writer.Write((short) number2); + Item obj7 = Main.player[(int) number4].inventory[(int) number3]; + writer.Write((short) obj7.netID); + writer.Write(obj7.prefix); + writer.Write((short) number5); + break; + case 134: + writer.Write((byte) number); + Player player7 = Main.player[number]; + writer.Write(player7.ladyBugLuckTimeLeft); + writer.Write(player7.torchLuck); + writer.Write(player7.luckPotion); + writer.Write(player7.HasGardenGnomeNearby); + break; + case 135: + writer.Write((byte) number); + break; + case 136: + for (int index4 = 0; index4 < 2; ++index4) + { + for (int index5 = 0; index5 < 3; ++index5) + writer.Write((ushort) NPC.cavernMonsterType[index4, index5]); + } + break; + case 137: + writer.Write((short) number); + writer.Write((ushort) number2); + break; + case 139: + writer.Write((byte) number); + bool flag3 = (double) number2 == 1.0; + writer.Write(flag3); + break; + } + int position2 = (int) writer.BaseStream.Position; + writer.BaseStream.Position = position1; + writer.Write((short) position2); + writer.BaseStream.Position = (long) position2; + if (Main.netMode == 1) + { + if (Netplay.Connection.Socket.IsConnected()) + { + try + { + ++NetMessage.buffer[whoAmi].spamCount; + Main.ActiveNetDiagnosticsUI.CountSentMessage(msgType, position2); + Netplay.Connection.Socket.AsyncSend(NetMessage.buffer[whoAmi].writeBuffer, 0, position2, new SocketSendCallback(Netplay.Connection.ClientWriteCallBack)); + } + catch + { + } + } + } + else if (remoteClient == -1) + { + switch (msgType) + { + case 13: + for (int index6 = 0; index6 < 256; ++index6) + { + if (index6 != ignoreClient && NetMessage.buffer[index6].broadcast) + { + if (Netplay.Clients[index6].IsConnected()) + { + try + { + ++NetMessage.buffer[index6].spamCount; + Main.ActiveNetDiagnosticsUI.CountSentMessage(msgType, position2); + Netplay.Clients[index6].Socket.AsyncSend(NetMessage.buffer[whoAmi].writeBuffer, 0, position2, new SocketSendCallback(Netplay.Clients[index6].ServerWriteCallBack)); + } + catch + { + } + } + } + } + ++Main.player[number].netSkip; + if (Main.player[number].netSkip > 2) + { + Main.player[number].netSkip = 0; + break; + } + break; + case 20: + for (int index7 = 0; index7 < 256; ++index7) + { + if (index7 != ignoreClient && NetMessage.buffer[index7].broadcast && Netplay.Clients[index7].IsConnected()) + { + if (Netplay.Clients[index7].SectionRange(number, (int) number2, (int) number3)) + { + try + { + ++NetMessage.buffer[index7].spamCount; + Main.ActiveNetDiagnosticsUI.CountSentMessage(msgType, position2); + Netplay.Clients[index7].Socket.AsyncSend(NetMessage.buffer[whoAmi].writeBuffer, 0, position2, new SocketSendCallback(Netplay.Clients[index7].ServerWriteCallBack)); + } + catch + { + } + } + } + } + break; + case 23: + NPC npc3 = Main.npc[number]; + for (int index8 = 0; index8 < 256; ++index8) + { + if (index8 != ignoreClient && NetMessage.buffer[index8].broadcast && Netplay.Clients[index8].IsConnected()) + { + bool flag4 = false; + if (npc3.boss || npc3.netAlways || npc3.townNPC || !npc3.active) + flag4 = true; + else if (npc3.netSkip <= 0) + { + Rectangle rect1 = Main.player[index8].getRect(); + Rectangle rect2 = npc3.getRect(); + rect2.X -= 2500; + rect2.Y -= 2500; + rect2.Width += 5000; + rect2.Height += 5000; + if (rect1.Intersects(rect2)) + flag4 = true; + } + else + flag4 = true; + if (flag4) + { + try + { + ++NetMessage.buffer[index8].spamCount; + Main.ActiveNetDiagnosticsUI.CountSentMessage(msgType, position2); + Netplay.Clients[index8].Socket.AsyncSend(NetMessage.buffer[whoAmi].writeBuffer, 0, position2, new SocketSendCallback(Netplay.Clients[index8].ServerWriteCallBack)); + } + catch + { + } + } + } + } + ++npc3.netSkip; + if (npc3.netSkip > 4) + { + npc3.netSkip = 0; + break; + } + break; + case 27: + Projectile projectile2 = Main.projectile[number]; + for (int index9 = 0; index9 < 256; ++index9) + { + if (index9 != ignoreClient && NetMessage.buffer[index9].broadcast && Netplay.Clients[index9].IsConnected()) + { + bool flag5 = false; + if (projectile2.type == 12 || Main.projPet[projectile2.type] || projectile2.aiStyle == 11 || projectile2.netImportant) + { + flag5 = true; + } + else + { + Rectangle rect3 = Main.player[index9].getRect(); + Rectangle rect4 = projectile2.getRect(); + rect4.X -= 5000; + rect4.Y -= 5000; + rect4.Width += 10000; + rect4.Height += 10000; + if (rect3.Intersects(rect4)) + flag5 = true; + } + if (flag5) + { + try + { + ++NetMessage.buffer[index9].spamCount; + Main.ActiveNetDiagnosticsUI.CountSentMessage(msgType, position2); + Netplay.Clients[index9].Socket.AsyncSend(NetMessage.buffer[whoAmi].writeBuffer, 0, position2, new SocketSendCallback(Netplay.Clients[index9].ServerWriteCallBack)); + } + catch + { + } + } + } + } + break; + case 28: + NPC npc4 = Main.npc[number]; + for (int index10 = 0; index10 < 256; ++index10) + { + if (index10 != ignoreClient && NetMessage.buffer[index10].broadcast && Netplay.Clients[index10].IsConnected()) + { + bool flag6 = false; + if (npc4.life <= 0) + { + flag6 = true; + } + else + { + Rectangle rect5 = Main.player[index10].getRect(); + Rectangle rect6 = npc4.getRect(); + rect6.X -= 3000; + rect6.Y -= 3000; + rect6.Width += 6000; + rect6.Height += 6000; + if (rect5.Intersects(rect6)) + flag6 = true; + } + if (flag6) + { + try + { + ++NetMessage.buffer[index10].spamCount; + Main.ActiveNetDiagnosticsUI.CountSentMessage(msgType, position2); + Netplay.Clients[index10].Socket.AsyncSend(NetMessage.buffer[whoAmi].writeBuffer, 0, position2, new SocketSendCallback(Netplay.Clients[index10].ServerWriteCallBack)); + } + catch + { + } + } + } + } + break; + case 34: + case 69: + for (int index11 = 0; index11 < 256; ++index11) + { + if (index11 != ignoreClient && NetMessage.buffer[index11].broadcast) + { + if (Netplay.Clients[index11].IsConnected()) + { + try + { + ++NetMessage.buffer[index11].spamCount; + Main.ActiveNetDiagnosticsUI.CountSentMessage(msgType, position2); + Netplay.Clients[index11].Socket.AsyncSend(NetMessage.buffer[whoAmi].writeBuffer, 0, position2, new SocketSendCallback(Netplay.Clients[index11].ServerWriteCallBack)); + } + catch + { + } + } + } + } + break; + default: + for (int index12 = 0; index12 < 256; ++index12) + { + if (index12 != ignoreClient && (NetMessage.buffer[index12].broadcast || Netplay.Clients[index12].State >= 3 && msgType == 10)) + { + if (Netplay.Clients[index12].IsConnected()) + { + try + { + ++NetMessage.buffer[index12].spamCount; + Main.ActiveNetDiagnosticsUI.CountSentMessage(msgType, position2); + Netplay.Clients[index12].Socket.AsyncSend(NetMessage.buffer[whoAmi].writeBuffer, 0, position2, new SocketSendCallback(Netplay.Clients[index12].ServerWriteCallBack)); + } + catch + { + } + } + } + } + break; + } + } + else if (Netplay.Clients[remoteClient].IsConnected()) + { + try + { + ++NetMessage.buffer[remoteClient].spamCount; + Main.ActiveNetDiagnosticsUI.CountSentMessage(msgType, position2); + Netplay.Clients[remoteClient].Socket.AsyncSend(NetMessage.buffer[whoAmi].writeBuffer, 0, position2, new SocketSendCallback(Netplay.Clients[remoteClient].ServerWriteCallBack)); + } + catch + { + } + } + if (Main.verboseNetplay) + { + int num20 = 0; + while (num20 < position2) + ++num20; + for (int index13 = 0; index13 < position2; ++index13) + { + int num21 = (int) NetMessage.buffer[whoAmi].writeBuffer[index13]; + } + } + NetMessage.buffer[whoAmi].writeLocked = false; + if (msgType == 19 && Main.netMode == 1) + NetMessage.SendTileSquare(whoAmi, (int) number2, (int) number3, 5); + if (msgType != 2 || Main.netMode != 2) + return; + Netplay.Clients[whoAmi].PendingTermination = true; + Netplay.Clients[whoAmi].PendingTerminationApproved = true; + } + } + + public static int CompressTileBlock( + int xStart, + int yStart, + short width, + short height, + byte[] buffer, + int bufferStart) + { + using (MemoryStream memoryStream1 = new MemoryStream()) + { + using (BinaryWriter writer = new BinaryWriter((Stream) memoryStream1)) + { + writer.Write(xStart); + writer.Write(yStart); + writer.Write(width); + writer.Write(height); + NetMessage.CompressTileBlock_Inner(writer, xStart, yStart, (int) width, (int) height); + int length = buffer.Length; + if ((long) bufferStart + memoryStream1.Length > (long) length) + return (int) ((long) (length - bufferStart) + memoryStream1.Length); + memoryStream1.Position = 0L; + MemoryStream memoryStream2 = new MemoryStream(); + using (DeflateStream deflateStream = new DeflateStream((Stream) memoryStream2, (CompressionMode) 0, true)) + { + memoryStream1.CopyTo((Stream) deflateStream); + ((Stream) deflateStream).Flush(); + ((Stream) deflateStream).Close(); + ((Stream) deflateStream).Dispose(); + } + if (memoryStream1.Length <= memoryStream2.Length) + { + memoryStream1.Position = 0L; + buffer[bufferStart] = (byte) 0; + ++bufferStart; + memoryStream1.Read(buffer, bufferStart, (int) memoryStream1.Length); + return (int) memoryStream1.Length + 1; + } + memoryStream2.Position = 0L; + buffer[bufferStart] = (byte) 1; + ++bufferStart; + memoryStream2.Read(buffer, bufferStart, (int) memoryStream2.Length); + return (int) memoryStream2.Length + 1; + } + } + } + + public static void CompressTileBlock_Inner( + BinaryWriter writer, + int xStart, + int yStart, + int width, + int height) + { + short[] numArray1 = new short[8000]; + short[] numArray2 = new short[1000]; + short[] numArray3 = new short[1000]; + short num1 = 0; + short num2 = 0; + short num3 = 0; + short num4 = 0; + int index1 = 0; + int index2 = 0; + byte num5 = 0; + byte[] buffer = new byte[15]; + Tile compTile = (Tile) null; + for (int index3 = yStart; index3 < yStart + height; ++index3) + { + for (int index4 = xStart; index4 < xStart + width; ++index4) + { + Tile tile = Main.tile[index4, index3]; + if (tile.isTheSameAs(compTile)) + { + ++num4; + } + else + { + if (compTile != null) + { + if (num4 > (short) 0) + { + buffer[index1] = (byte) ((uint) num4 & (uint) byte.MaxValue); + ++index1; + if (num4 > (short) byte.MaxValue) + { + num5 |= (byte) 128; + buffer[index1] = (byte) (((int) num4 & 65280) >> 8); + ++index1; + } + else + num5 |= (byte) 64; + } + buffer[index2] = num5; + writer.Write(buffer, index2, index1 - index2); + num4 = (short) 0; + } + index1 = 3; + int num6; + byte num7 = (byte) (num6 = 0); + byte num8 = (byte) num6; + num5 = (byte) num6; + if (tile.active()) + { + num5 |= (byte) 2; + buffer[index1] = (byte) tile.type; + ++index1; + if (tile.type > (ushort) byte.MaxValue) + { + buffer[index1] = (byte) ((uint) tile.type >> 8); + ++index1; + num5 |= (byte) 32; + } + if (TileID.Sets.BasicChest[(int) tile.type] && (int) tile.frameX % 36 == 0 && (int) tile.frameY % 36 == 0) + { + short chest = (short) Chest.FindChest(index4, index3); + if (chest != (short) -1) + { + numArray1[(int) num1] = chest; + ++num1; + } + } + if (tile.type == (ushort) 88 && (int) tile.frameX % 54 == 0 && (int) tile.frameY % 36 == 0) + { + short chest = (short) Chest.FindChest(index4, index3); + if (chest != (short) -1) + { + numArray1[(int) num1] = chest; + ++num1; + } + } + if (tile.type == (ushort) 85 && (int) tile.frameX % 36 == 0 && (int) tile.frameY % 36 == 0) + { + short num9 = (short) Sign.ReadSign(index4, index3); + if (num9 != (short) -1) + numArray2[(int) num2++] = num9; + } + if (tile.type == (ushort) 55 && (int) tile.frameX % 36 == 0 && (int) tile.frameY % 36 == 0) + { + short num10 = (short) Sign.ReadSign(index4, index3); + if (num10 != (short) -1) + numArray2[(int) num2++] = num10; + } + if (tile.type == (ushort) 425 && (int) tile.frameX % 36 == 0 && (int) tile.frameY % 36 == 0) + { + short num11 = (short) Sign.ReadSign(index4, index3); + if (num11 != (short) -1) + numArray2[(int) num2++] = num11; + } + if (tile.type == (ushort) 573 && (int) tile.frameX % 36 == 0 && (int) tile.frameY % 36 == 0) + { + short num12 = (short) Sign.ReadSign(index4, index3); + if (num12 != (short) -1) + numArray2[(int) num2++] = num12; + } + if (tile.type == (ushort) 378 && (int) tile.frameX % 36 == 0 && tile.frameY == (short) 0) + { + int num13 = TETrainingDummy.Find(index4, index3); + if (num13 != -1) + numArray3[(int) num3++] = (short) num13; + } + if (tile.type == (ushort) 395 && (int) tile.frameX % 36 == 0 && tile.frameY == (short) 0) + { + int num14 = TEItemFrame.Find(index4, index3); + if (num14 != -1) + numArray3[(int) num3++] = (short) num14; + } + if (tile.type == (ushort) 520 && (int) tile.frameX % 18 == 0 && tile.frameY == (short) 0) + { + int num15 = TEFoodPlatter.Find(index4, index3); + if (num15 != -1) + numArray3[(int) num3++] = (short) num15; + } + if (tile.type == (ushort) 471 && (int) tile.frameX % 54 == 0 && tile.frameY == (short) 0) + { + int num16 = TEWeaponsRack.Find(index4, index3); + if (num16 != -1) + numArray3[(int) num3++] = (short) num16; + } + if (tile.type == (ushort) 470 && (int) tile.frameX % 36 == 0 && tile.frameY == (short) 0) + { + int num17 = TEDisplayDoll.Find(index4, index3); + if (num17 != -1) + numArray3[(int) num3++] = (short) num17; + } + if (tile.type == (ushort) 475 && (int) tile.frameX % 54 == 0 && tile.frameY == (short) 0) + { + int num18 = TEHatRack.Find(index4, index3); + if (num18 != -1) + numArray3[(int) num3++] = (short) num18; + } + if (tile.type == (ushort) 597 && (int) tile.frameX % 54 == 0 && (int) tile.frameY % 72 == 0) + { + int num19 = TETeleportationPylon.Find(index4, index3); + if (num19 != -1) + numArray3[(int) num3++] = (short) num19; + } + if (Main.tileFrameImportant[(int) tile.type]) + { + buffer[index1] = (byte) ((uint) tile.frameX & (uint) byte.MaxValue); + int index5 = index1 + 1; + buffer[index5] = (byte) (((int) tile.frameX & 65280) >> 8); + int index6 = index5 + 1; + buffer[index6] = (byte) ((uint) tile.frameY & (uint) byte.MaxValue); + int index7 = index6 + 1; + buffer[index7] = (byte) (((int) tile.frameY & 65280) >> 8); + index1 = index7 + 1; + } + if (tile.color() != (byte) 0) + { + num7 |= (byte) 8; + buffer[index1] = tile.color(); + ++index1; + } + } + if (tile.wall != (ushort) 0) + { + num5 |= (byte) 4; + buffer[index1] = (byte) tile.wall; + ++index1; + if (tile.wallColor() != (byte) 0) + { + num7 |= (byte) 16; + buffer[index1] = tile.wallColor(); + ++index1; + } + } + if (tile.liquid != (byte) 0) + { + if (tile.lava()) + num5 |= (byte) 16; + else if (tile.honey()) + num5 |= (byte) 24; + else + num5 |= (byte) 8; + buffer[index1] = tile.liquid; + ++index1; + } + if (tile.wire()) + num8 |= (byte) 2; + if (tile.wire2()) + num8 |= (byte) 4; + if (tile.wire3()) + num8 |= (byte) 8; + int num20 = !tile.halfBrick() ? (tile.slope() == (byte) 0 ? 0 : (int) tile.slope() + 1 << 4) : 16; + byte num21 = (byte) ((uint) num8 | (uint) (byte) num20); + if (tile.actuator()) + num7 |= (byte) 2; + if (tile.inActive()) + num7 |= (byte) 4; + if (tile.wire4()) + num7 |= (byte) 32; + if (tile.wall > (ushort) byte.MaxValue) + { + buffer[index1] = (byte) ((uint) tile.wall >> 8); + ++index1; + num7 |= (byte) 64; + } + index2 = 2; + if (num7 != (byte) 0) + { + num21 |= (byte) 1; + buffer[index2] = num7; + --index2; + } + if (num21 != (byte) 0) + { + num5 |= (byte) 1; + buffer[index2] = num21; + --index2; + } + compTile = tile; + } + } + } + if (num4 > (short) 0) + { + buffer[index1] = (byte) ((uint) num4 & (uint) byte.MaxValue); + ++index1; + if (num4 > (short) byte.MaxValue) + { + num5 |= (byte) 128; + buffer[index1] = (byte) (((int) num4 & 65280) >> 8); + ++index1; + } + else + num5 |= (byte) 64; + } + buffer[index2] = num5; + writer.Write(buffer, index2, index1 - index2); + writer.Write(num1); + for (int index8 = 0; index8 < (int) num1; ++index8) + { + Chest chest = Main.chest[(int) numArray1[index8]]; + writer.Write(numArray1[index8]); + writer.Write((short) chest.x); + writer.Write((short) chest.y); + writer.Write(chest.name); + } + writer.Write(num2); + for (int index9 = 0; index9 < (int) num2; ++index9) + { + Sign sign = Main.sign[(int) numArray2[index9]]; + writer.Write(numArray2[index9]); + writer.Write((short) sign.x); + writer.Write((short) sign.y); + writer.Write(sign.text); + } + writer.Write(num3); + for (int index10 = 0; index10 < (int) num3; ++index10) + TileEntity.Write(writer, TileEntity.ByID[(int) numArray3[index10]]); + } + + public static void DecompressTileBlock(byte[] buffer, int bufferStart, int bufferLength) + { + using (MemoryStream memoryStream1 = new MemoryStream()) + { + memoryStream1.Write(buffer, bufferStart, bufferLength); + memoryStream1.Position = 0L; + MemoryStream memoryStream2; + if ((uint) memoryStream1.ReadByte() > 0U) + { + MemoryStream memoryStream3 = new MemoryStream(); + using (DeflateStream deflateStream = new DeflateStream((Stream) memoryStream1, (CompressionMode) 1, true)) + { + ((Stream) deflateStream).CopyTo((Stream) memoryStream3); + ((Stream) deflateStream).Close(); + } + memoryStream2 = memoryStream3; + memoryStream2.Position = 0L; + } + else + { + memoryStream2 = memoryStream1; + memoryStream2.Position = 1L; + } + using (BinaryReader reader = new BinaryReader((Stream) memoryStream2)) + { + int xStart = reader.ReadInt32(); + int yStart = reader.ReadInt32(); + short num1 = reader.ReadInt16(); + short num2 = reader.ReadInt16(); + NetMessage.DecompressTileBlock_Inner(reader, xStart, yStart, (int) num1, (int) num2); + } + } + } + + public static void DecompressTileBlock_Inner( + BinaryReader reader, + int xStart, + int yStart, + int width, + int height) + { + Tile tile = (Tile) null; + int num1 = 0; + for (int index1 = yStart; index1 < yStart + height; ++index1) + { + for (int index2 = xStart; index2 < xStart + width; ++index2) + { + if (num1 != 0) + { + --num1; + if (Main.tile[index2, index1] == null) + Main.tile[index2, index1] = new Tile(tile); + else + Main.tile[index2, index1].CopyFrom(tile); + } + else + { + byte num2; + byte num3 = num2 = (byte) 0; + tile = Main.tile[index2, index1]; + if (tile == null) + { + tile = new Tile(); + Main.tile[index2, index1] = tile; + } + else + tile.ClearEverything(); + byte num4 = reader.ReadByte(); + if (((int) num4 & 1) == 1) + { + num3 = reader.ReadByte(); + if (((int) num3 & 1) == 1) + num2 = reader.ReadByte(); + } + bool flag = tile.active(); + if (((int) num4 & 2) == 2) + { + tile.active(true); + ushort type = tile.type; + int index3; + if (((int) num4 & 32) == 32) + { + byte num5 = reader.ReadByte(); + index3 = (int) reader.ReadByte() << 8 | (int) num5; + } + else + index3 = (int) reader.ReadByte(); + tile.type = (ushort) index3; + if (Main.tileFrameImportant[index3]) + { + tile.frameX = reader.ReadInt16(); + tile.frameY = reader.ReadInt16(); + } + else if (!flag || (int) tile.type != (int) type) + { + tile.frameX = (short) -1; + tile.frameY = (short) -1; + } + if (((int) num2 & 8) == 8) + tile.color(reader.ReadByte()); + } + if (((int) num4 & 4) == 4) + { + tile.wall = (ushort) reader.ReadByte(); + if (((int) num2 & 16) == 16) + tile.wallColor(reader.ReadByte()); + } + byte num6 = (byte) (((int) num4 & 24) >> 3); + if (num6 != (byte) 0) + { + tile.liquid = reader.ReadByte(); + if (num6 > (byte) 1) + { + if (num6 == (byte) 2) + tile.lava(true); + else + tile.honey(true); + } + } + if (num3 > (byte) 1) + { + if (((int) num3 & 2) == 2) + tile.wire(true); + if (((int) num3 & 4) == 4) + tile.wire2(true); + if (((int) num3 & 8) == 8) + tile.wire3(true); + byte num7 = (byte) (((int) num3 & 112) >> 4); + if (num7 != (byte) 0 && Main.tileSolid[(int) tile.type]) + { + if (num7 == (byte) 1) + tile.halfBrick(true); + else + tile.slope((byte) ((uint) num7 - 1U)); + } + } + if (num2 > (byte) 0) + { + if (((int) num2 & 2) == 2) + tile.actuator(true); + if (((int) num2 & 4) == 4) + tile.inActive(true); + if (((int) num2 & 32) == 32) + tile.wire4(true); + if (((int) num2 & 64) == 64) + { + byte num8 = reader.ReadByte(); + tile.wall = (ushort) ((uint) num8 << 8 | (uint) tile.wall); + } + } + switch ((byte) (((int) num4 & 192) >> 6)) + { + case 0: + num1 = 0; + continue; + case 1: + num1 = (int) reader.ReadByte(); + continue; + default: + num1 = (int) reader.ReadInt16(); + continue; + } + } + } + } + short num9 = reader.ReadInt16(); + for (int index = 0; index < (int) num9; ++index) + { + short num10 = reader.ReadInt16(); + short num11 = reader.ReadInt16(); + short num12 = reader.ReadInt16(); + string str = reader.ReadString(); + if (num10 >= (short) 0 && num10 < (short) 8000) + { + if (Main.chest[(int) num10] == null) + Main.chest[(int) num10] = new Chest(); + Main.chest[(int) num10].name = str; + Main.chest[(int) num10].x = (int) num11; + Main.chest[(int) num10].y = (int) num12; + } + } + short num13 = reader.ReadInt16(); + for (int index = 0; index < (int) num13; ++index) + { + short num14 = reader.ReadInt16(); + short num15 = reader.ReadInt16(); + short num16 = reader.ReadInt16(); + string str = reader.ReadString(); + if (num14 >= (short) 0 && num14 < (short) 1000) + { + if (Main.sign[(int) num14] == null) + Main.sign[(int) num14] = new Sign(); + Main.sign[(int) num14].text = str; + Main.sign[(int) num14].x = (int) num15; + Main.sign[(int) num14].y = (int) num16; + } + } + short num17 = reader.ReadInt16(); + for (int index = 0; index < (int) num17; ++index) + { + TileEntity tileEntity = TileEntity.Read(reader); + TileEntity.ByID[tileEntity.ID] = tileEntity; + TileEntity.ByPosition[tileEntity.Position] = tileEntity; + } + } + + public static void ReceiveBytes(byte[] bytes, int streamLength, int i = 256) + { + lock (NetMessage.buffer[i]) + { + try + { + Buffer.BlockCopy((Array) bytes, 0, (Array) NetMessage.buffer[i].readBuffer, NetMessage.buffer[i].totalData, streamLength); + NetMessage.buffer[i].totalData += streamLength; + NetMessage.buffer[i].checkBytes = true; + } + catch + { + if (Main.netMode == 1) + { + Main.menuMode = 15; + Main.statusText = Language.GetTextValue("Error.BadHeaderBufferOverflow"); + Netplay.Disconnect = true; + } + else + Netplay.Clients[i].PendingTermination = true; + } + } + } + + public static void CheckBytes(int bufferIndex = 256) + { + lock (NetMessage.buffer[bufferIndex]) + { + int startIndex = 0; + int num = NetMessage.buffer[bufferIndex].totalData; + try + { + while (num >= 2) + { + int uint16 = (int) BitConverter.ToUInt16(NetMessage.buffer[bufferIndex].readBuffer, startIndex); + if (num >= uint16) + { + long position = NetMessage.buffer[bufferIndex].reader.BaseStream.Position; + NetMessage.buffer[bufferIndex].GetData(startIndex + 2, uint16 - 2, out int _); + NetMessage.buffer[bufferIndex].reader.BaseStream.Position = position + (long) uint16; + num -= uint16; + startIndex += uint16; + } + else + break; + } + } + catch (Exception ex) + { + num = 0; + startIndex = 0; + } + if (num != NetMessage.buffer[bufferIndex].totalData) + { + for (int index = 0; index < num; ++index) + NetMessage.buffer[bufferIndex].readBuffer[index] = NetMessage.buffer[bufferIndex].readBuffer[index + startIndex]; + NetMessage.buffer[bufferIndex].totalData = num; + } + NetMessage.buffer[bufferIndex].checkBytes = false; + } + } + + public static void BootPlayer(int plr, NetworkText msg) => NetMessage.SendData(2, plr, text: msg); + + public static void SendObjectPlacment( + int whoAmi, + int x, + int y, + int type, + int style, + int alternative, + int random, + int direction) + { + int remoteClient; + int ignoreClient; + if (Main.netMode == 2) + { + remoteClient = -1; + ignoreClient = whoAmi; + } + else + { + remoteClient = whoAmi; + ignoreClient = -1; + } + NetMessage.SendData(79, remoteClient, ignoreClient, number: x, number2: ((float) y), number3: ((float) type), number4: ((float) style), number5: alternative, number6: random, number7: direction); + } + + public static void SendTemporaryAnimation( + int whoAmi, + int animationType, + int tileType, + int xCoord, + int yCoord) + { + NetMessage.SendData(77, whoAmi, number: animationType, number2: ((float) tileType), number3: ((float) xCoord), number4: ((float) yCoord)); + } + + public static void SendPlayerHurt( + int playerTargetIndex, + PlayerDeathReason reason, + int damage, + int direction, + bool critical, + bool pvp, + int hitContext, + int remoteClient = -1, + int ignoreClient = -1) + { + NetMessage._currentPlayerDeathReason = reason; + BitsByte bitsByte = (BitsByte) (byte) 0; + bitsByte[0] = critical; + bitsByte[1] = pvp; + NetMessage.SendData(117, remoteClient, ignoreClient, number: playerTargetIndex, number2: ((float) damage), number3: ((float) direction), number4: ((float) (byte) bitsByte), number5: hitContext); + } + + public static void SendPlayerDeath( + int playerTargetIndex, + PlayerDeathReason reason, + int damage, + int direction, + bool pvp, + int remoteClient = -1, + int ignoreClient = -1) + { + NetMessage._currentPlayerDeathReason = reason; + BitsByte bitsByte = (BitsByte) (byte) 0; + bitsByte[0] = pvp; + NetMessage.SendData(118, remoteClient, ignoreClient, number: playerTargetIndex, number2: ((float) damage), number3: ((float) direction), number4: ((float) (byte) bitsByte)); + } + + public static void PlayNetSound( + NetMessage.NetSoundInfo info, + int remoteClient = -1, + int ignoreClient = -1) + { + NetMessage._currentNetSoundInfo = info; + NetMessage.SendData(132, remoteClient, ignoreClient); + } + + public static void SendCoinLossRevengeMarker( + CoinLossRevengeSystem.RevengeMarker marker, + int remoteClient = -1, + int ignoreClient = -1) + { + NetMessage._currentRevengeMarker = marker; + NetMessage.SendData(126, remoteClient, ignoreClient); + } + + public static void SendTileRange( + int whoAmi, + int tileX, + int tileY, + int xSize, + int ySize, + TileChangeType changeType = TileChangeType.None) + { + int number = xSize >= ySize ? xSize : ySize; + NetMessage.SendData(20, whoAmi, number: number, number2: ((float) tileX), number3: ((float) tileY), number5: ((int) changeType)); + } + + public static void SendTileSquare( + int whoAmi, + int tileX, + int tileY, + int size, + TileChangeType changeType = TileChangeType.None) + { + int num = (size - 1) / 2; + NetMessage.SendData(20, whoAmi, number: size, number2: ((float) (tileX - num)), number3: ((float) (tileY - num)), number5: ((int) changeType)); + WorldGen.RangeFrame(tileX - num, tileY - num, tileX - num + size, tileY - num + size); + } + + public static void SendTravelShop(int remoteClient) + { + if (Main.netMode != 2) + return; + NetMessage.SendData(72, remoteClient); + } + + public static void SendAnglerQuest(int remoteClient) + { + if (Main.netMode != 2) + return; + if (remoteClient == -1) + { + for (int remoteClient1 = 0; remoteClient1 < (int) byte.MaxValue; ++remoteClient1) + { + if (Netplay.Clients[remoteClient1].State == 10) + NetMessage.SendData(74, remoteClient1, text: NetworkText.FromLiteral(Main.player[remoteClient1].name), number: Main.anglerQuest); + } + } + else + { + if (Netplay.Clients[remoteClient].State != 10) + return; + NetMessage.SendData(74, remoteClient, text: NetworkText.FromLiteral(Main.player[remoteClient].name), number: Main.anglerQuest); + } + } + + public static void SendSection(int whoAmi, int sectionX, int sectionY, bool skipSent = false) + { + if (Main.netMode != 2) + return; + try + { + if (sectionX < 0 || sectionY < 0 || sectionX >= Main.maxSectionsX || sectionY >= Main.maxSectionsY || skipSent && Netplay.Clients[whoAmi].TileSections[sectionX, sectionY]) + return; + Netplay.Clients[whoAmi].TileSections[sectionX, sectionY] = true; + int number1 = sectionX * 200; + int num1 = sectionY * 150; + int num2 = 150; + for (int index = num1; index < num1 + 150; index += num2) + NetMessage.SendData(10, whoAmi, number: number1, number2: ((float) index), number3: 200f, number4: ((float) num2)); + for (int number2 = 0; number2 < 200; ++number2) + { + if (Main.npc[number2].active && Main.npc[number2].townNPC) + { + int sectionX1 = Netplay.GetSectionX((int) ((double) Main.npc[number2].position.X / 16.0)); + int sectionY1 = Netplay.GetSectionY((int) ((double) Main.npc[number2].position.Y / 16.0)); + int num3 = sectionX; + if (sectionX1 == num3 && sectionY1 == sectionY) + NetMessage.SendData(23, whoAmi, number: number2); + } + } + } + catch + { + } + } + + public static void greetPlayer(int plr) + { + if (Main.motd == "") + ChatHelper.SendChatMessageToClient(NetworkText.FromFormattable("{0} {1}!", (object) Lang.mp[18].ToNetworkText(), (object) Main.worldName), new Color((int) byte.MaxValue, 240, 20), plr); + else + ChatHelper.SendChatMessageToClient(NetworkText.FromLiteral(Main.motd), new Color((int) byte.MaxValue, 240, 20), plr); + string str = ""; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active) + str = !(str == "") ? str + ", " + Main.player[index].name : str + Main.player[index].name; + } + ChatHelper.SendChatMessageToClient(NetworkText.FromKey("Game.JoinGreeting", (object) str), new Color((int) byte.MaxValue, 240, 20), plr); + } + + public static void sendWater(int x, int y) + { + if (Main.netMode == 1) + { + NetMessage.SendData(48, number: x, number2: ((float) y)); + } + else + { + for (int remoteClient = 0; remoteClient < 256; ++remoteClient) + { + if ((NetMessage.buffer[remoteClient].broadcast || Netplay.Clients[remoteClient].State >= 3) && Netplay.Clients[remoteClient].IsConnected()) + { + int index1 = x / 200; + int index2 = y / 150; + if (Netplay.Clients[remoteClient].TileSections[index1, index2]) + NetMessage.SendData(48, remoteClient, number: x, number2: ((float) y)); + } + } + } + } + + public static void SyncDisconnectedPlayer(int plr) + { + NetMessage.SyncOnePlayer(plr, -1, plr); + NetMessage.EnsureLocalPlayerIsPresent(); + } + + public static void SyncConnectedPlayer(int plr) + { + NetMessage.SyncOnePlayer(plr, -1, plr); + for (int plr1 = 0; plr1 < (int) byte.MaxValue; ++plr1) + { + if (plr != plr1 && Main.player[plr1].active) + NetMessage.SyncOnePlayer(plr1, plr, -1); + } + NetMessage.SendNPCHousesAndTravelShop(plr); + NetMessage.SendAnglerQuest(plr); + NPC.RevengeManager.SendAllMarkersToPlayer(plr); + NetMessage.EnsureLocalPlayerIsPresent(); + } + + private static void SendNPCHousesAndTravelShop(int plr) + { + bool flag = false; + for (int number = 0; number < 200; ++number) + { + if (Main.npc[number].active && Main.npc[number].townNPC && NPC.TypeToDefaultHeadIndex(Main.npc[number].type) > 0) + { + if (!flag && Main.npc[number].type == 368) + flag = true; + byte householdStatus = WorldGen.TownManager.GetHouseholdStatus(Main.npc[number]); + NetMessage.SendData(60, plr, number: number, number2: ((float) Main.npc[number].homeTileX), number3: ((float) Main.npc[number].homeTileY), number4: ((float) householdStatus)); + } + } + if (!flag) + return; + NetMessage.SendTravelShop(plr); + } + + private static void EnsureLocalPlayerIsPresent() + { + if (!Main.autoShutdown) + return; + bool flag = false; + for (int plr = 0; plr < (int) byte.MaxValue; ++plr) + { + if (NetMessage.DoesPlayerSlotCountAsAHost(plr)) + { + flag = true; + break; + } + } + if (flag) + return; + Console.WriteLine(Language.GetTextValue("Net.ServerAutoShutdown")); + WorldFile.SaveWorld(); + Netplay.Disconnect = true; + } + + public static bool DoesPlayerSlotCountAsAHost(int plr) => Netplay.Clients[plr].State == 10 && Netplay.Clients[plr].Socket.GetRemoteAddress().IsLocalHost(); + + private static void SyncOnePlayer(int plr, int toWho, int fromWho) + { + int num1 = 0; + if (Main.player[plr].active) + num1 = 1; + if (Netplay.Clients[plr].State == 10) + { + NetMessage.SendData(14, toWho, fromWho, number: plr, number2: ((float) num1)); + NetMessage.SendData(4, toWho, fromWho, number: plr); + NetMessage.SendData(13, toWho, fromWho, number: plr); + if (Main.player[plr].statLife <= 0) + NetMessage.SendData(135, toWho, fromWho, number: plr); + NetMessage.SendData(16, toWho, fromWho, number: plr); + NetMessage.SendData(30, toWho, fromWho, number: plr); + NetMessage.SendData(45, toWho, fromWho, number: plr); + NetMessage.SendData(42, toWho, fromWho, number: plr); + NetMessage.SendData(50, toWho, fromWho, number: plr); + NetMessage.SendData(80, toWho, fromWho, number: plr, number2: ((float) Main.player[plr].chest)); + for (int index = 0; index < 59; ++index) + NetMessage.SendData(5, toWho, fromWho, number: plr, number2: ((float) index), number3: ((float) Main.player[plr].inventory[index].prefix)); + for (int index = 0; index < Main.player[plr].armor.Length; ++index) + NetMessage.SendData(5, toWho, fromWho, number: plr, number2: ((float) (59 + index)), number3: ((float) Main.player[plr].armor[index].prefix)); + for (int index = 0; index < Main.player[plr].dye.Length; ++index) + NetMessage.SendData(5, toWho, fromWho, number: plr, number2: ((float) (58 + Main.player[plr].armor.Length + 1 + index)), number3: ((float) Main.player[plr].dye[index].prefix)); + for (int index = 0; index < Main.player[plr].miscEquips.Length; ++index) + NetMessage.SendData(5, toWho, fromWho, number: plr, number2: ((float) (58 + Main.player[plr].armor.Length + Main.player[plr].dye.Length + 1 + index)), number3: ((float) Main.player[plr].miscEquips[index].prefix)); + for (int index = 0; index < Main.player[plr].miscDyes.Length; ++index) + NetMessage.SendData(5, toWho, fromWho, number: plr, number2: ((float) (58 + Main.player[plr].armor.Length + Main.player[plr].dye.Length + Main.player[plr].miscEquips.Length + 1 + index)), number3: ((float) Main.player[plr].miscDyes[index].prefix)); + if (Netplay.Clients[plr].IsAnnouncementCompleted) + return; + Netplay.Clients[plr].IsAnnouncementCompleted = true; + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(Lang.mp[19].Key, (object) Main.player[plr].name), new Color((int) byte.MaxValue, 240, 20), plr); + if (!Main.dedServ) + return; + Console.WriteLine(Lang.mp[19].Format((object) Main.player[plr].name)); + } + else + { + int num2 = 0; + NetMessage.SendData(14, ignoreClient: plr, number: plr, number2: ((float) num2)); + if (Netplay.Clients[plr].IsAnnouncementCompleted) + { + Netplay.Clients[plr].IsAnnouncementCompleted = false; + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(Lang.mp[20].Key, (object) Netplay.Clients[plr].Name), new Color((int) byte.MaxValue, 240, 20), plr); + if (Main.dedServ) + Console.WriteLine(Lang.mp[20].Format((object) Netplay.Clients[plr].Name)); + Netplay.Clients[plr].Name = "Anonymous"; + } + Player.Hooks.PlayerDisconnect(plr); + } + } + + public struct NetSoundInfo + { + public Vector2 position; + public ushort soundIndex; + public int style; + public float volume; + public float pitchOffset; + + public NetSoundInfo( + Vector2 position, + ushort soundIndex, + int style = -1, + float volume = -1f, + float pitchOffset = -1f) + { + this.position = position; + this.soundIndex = soundIndex; + this.style = style; + this.volume = volume; + this.pitchOffset = pitchOffset; + } + + public void WriteSelfTo(BinaryWriter writer) + { + writer.WriteVector2(this.position); + writer.Write(this.soundIndex); + BitsByte bitsByte = new BitsByte(this.style != -1, (double) this.volume != -1.0, (double) this.pitchOffset != -1.0); + writer.Write((byte) bitsByte); + if (bitsByte[0]) + writer.Write(this.style); + if (bitsByte[1]) + writer.Write(this.volume); + if (!bitsByte[2]) + return; + writer.Write(this.pitchOffset); + } + } + } +} diff --git a/Netplay.cs b/Netplay.cs new file mode 100644 index 0000000..002b2f9 --- /dev/null +++ b/Netplay.cs @@ -0,0 +1,746 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Netplay +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Sockets; +using System.Threading; +using Terraria.Audio; +using Terraria.IO; +using Terraria.Localization; +using Terraria.Map; +using Terraria.Net; +using Terraria.Net.Sockets; +using Terraria.Social; +using Terraria.Utilities; + +namespace Terraria +{ + public class Netplay + { + public const int MaxConnections = 256; + public const int NetBufferSize = 1024; + public static string BanFilePath = "banlist.txt"; + public static string ServerPassword = ""; + public static RemoteClient[] Clients = new RemoteClient[256]; + public static RemoteServer Connection = new RemoteServer(); + public static IPAddress ServerIP; + public static string ServerIPText = ""; + public static ISocket TcpListener; + public static int ListenPort = 7777; + public static bool IsListening = true; + public static bool UseUPNP = true; + public static bool Disconnect; + public static bool SpamCheck = false; + public static bool HasClients; + private static Thread _serverThread; + public static MessageBuffer fullBuffer = new MessageBuffer(); + private static int _currentRequestId; + private static UdpClient BroadcastClient = (UdpClient) null; + private static Thread broadcastThread = (Thread) null; + + public static event Action OnDisconnect; + + private static void UpdateServer() + { + for (int bufferIndex = 0; bufferIndex < 256; ++bufferIndex) + { + if (NetMessage.buffer[bufferIndex].checkBytes) + NetMessage.CheckBytes(bufferIndex); + } + } + + private static string GetLocalIPAddress() + { + string str = ""; + foreach (IPAddress address in Dns.GetHostEntry(Dns.GetHostName()).AddressList) + { + if (address.AddressFamily == AddressFamily.InterNetwork) + { + str = address.ToString(); + break; + } + } + return str; + } + + private static void ResetNetDiag() => Main.ActiveNetDiagnosticsUI.Reset(); + + public static void ResetSections() + { + for (int index1 = 0; index1 < 256; ++index1) + { + for (int index2 = 0; index2 < Main.maxSectionsX; ++index2) + { + for (int index3 = 0; index3 < Main.maxSectionsY; ++index3) + Netplay.Clients[index1].TileSections[index2, index3] = false; + } + } + } + + public static void AddBan(int plr) + { + RemoteAddress remoteAddress = Netplay.Clients[plr].Socket.GetRemoteAddress(); + using (StreamWriter streamWriter = new StreamWriter(Netplay.BanFilePath, true)) + { + streamWriter.WriteLine("//" + Main.player[plr].name); + streamWriter.WriteLine(remoteAddress.GetIdentifier()); + } + } + + public static bool IsBanned(RemoteAddress address) + { + try + { + string identifier = address.GetIdentifier(); + if (System.IO.File.Exists(Netplay.BanFilePath)) + { + using (StreamReader streamReader = new StreamReader(Netplay.BanFilePath)) + { + string str; + while ((str = streamReader.ReadLine()) != null) + { + if (str == identifier) + return true; + } + } + } + } + catch (Exception ex) + { + } + return false; + } + + private static void OpenPort(int port) + { + } + + private static void ClosePort(int port) + { + } + + private static void ServerFullWriteCallBack(object state) + { + } + + private static void OnConnectionAccepted(ISocket client) + { + int nextOpenClientSlot = Netplay.FindNextOpenClientSlot(); + if (nextOpenClientSlot != -1) + { + Netplay.Clients[nextOpenClientSlot].Reset(); + Netplay.Clients[nextOpenClientSlot].Socket = client; + } + else + { + lock (Netplay.fullBuffer) + Netplay.KickClient(client, NetworkText.FromKey("CLI.ServerIsFull")); + } + if (Netplay.FindNextOpenClientSlot() != -1) + return; + Netplay.StopListening(); + Netplay.IsListening = false; + } + + private static void KickClient(ISocket client, NetworkText kickMessage) + { + BinaryWriter writer = Netplay.fullBuffer.writer; + if (writer == null) + { + Netplay.fullBuffer.ResetWriter(); + writer = Netplay.fullBuffer.writer; + } + writer.BaseStream.Position = 0L; + long position1 = writer.BaseStream.Position; + writer.BaseStream.Position += 2L; + writer.Write((byte) 2); + kickMessage.Serialize(writer); + if (Main.dedServ) + Console.WriteLine(Language.GetTextValue("CLI.ClientWasBooted", (object) client.GetRemoteAddress().ToString(), (object) kickMessage)); + int position2 = (int) writer.BaseStream.Position; + writer.BaseStream.Position = position1; + writer.Write((short) position2); + writer.BaseStream.Position = (long) position2; + client.AsyncSend(Netplay.fullBuffer.writeBuffer, 0, position2, new SocketSendCallback(Netplay.ServerFullWriteCallBack), (object) client); + } + + public static void OnConnectedToSocialServer(ISocket client) => Netplay.StartSocialClient(client); + + private static bool StartListening() + { + if (SocialAPI.Network != null) + SocialAPI.Network.StartListening(new SocketConnectionAccepted(Netplay.OnConnectionAccepted)); + return Netplay.TcpListener.StartListening(new SocketConnectionAccepted(Netplay.OnConnectionAccepted)); + } + + private static void StopListening() + { + if (SocialAPI.Network != null) + SocialAPI.Network.StopListening(); + Netplay.TcpListener.StopListening(); + } + + public static void StartServer() + { + Netplay.InitializeServer(); + Netplay._serverThread = new Thread(new ThreadStart(Netplay.ServerLoop)) + { + IsBackground = true, + Name = "Server Loop Thread" + }; + Netplay._serverThread.Start(); + } + + private static void InitializeServer() + { + Netplay.ResetNetDiag(); + if (Main.rand == null) + Main.rand = new UnifiedRandom((int) DateTime.Now.Ticks); + Main.myPlayer = (int) byte.MaxValue; + Netplay.ServerIP = IPAddress.Any; + Main.menuMode = 14; + Main.statusText = Lang.menu[8].Value; + Main.netMode = 2; + Netplay.Disconnect = false; + for (int index = 0; index < 256; ++index) + { + Netplay.Clients[index] = new RemoteClient(); + Netplay.Clients[index].Reset(); + Netplay.Clients[index].Id = index; + Netplay.Clients[index].ReadBuffer = new byte[1024]; + } + Netplay.TcpListener = (ISocket) new TcpSocket(); + if (!Netplay.Disconnect) + { + if (!Netplay.StartListening()) + { + Main.menuMode = 15; + Main.statusText = Language.GetTextValue("Error.TriedToRunServerTwice"); + Netplay.Disconnect = true; + } + Main.statusText = Language.GetTextValue("CLI.ServerStarted"); + } + if (!Netplay.UseUPNP) + return; + try + { + Netplay.OpenPort(Netplay.ListenPort); + } + catch (Exception ex) + { + } + } + + private static void CleanupServer() + { + Netplay.StopListening(); + try + { + Netplay.ClosePort(Netplay.ListenPort); + } + catch + { + } + for (int index = 0; index < 256; ++index) + Netplay.Clients[index].Reset(); + if (Main.menuMode != 15) + { + Main.netMode = 0; + Main.menuMode = 10; + WorldFile.SaveWorld(); + Main.menuMode = 0; + } + else + Main.netMode = 0; + Main.myPlayer = 0; + } + + private static void ServerLoop() + { + int num = 0; + Netplay.StartBroadCasting(); + while (!Netplay.Disconnect) + { + Netplay.StartListeningIfNeeded(); + Netplay.UpdateConnectedClients(); + num = (num + 1) % 10; + Thread.Sleep(num == 0 ? 1 : 0); + } + Netplay.StopBroadCasting(); + Netplay.CleanupServer(); + } + + private static void UpdateConnectedClients() + { + int num1 = 0; + for (int index = 0; index < 256; ++index) + { + if (Netplay.Clients[index].PendingTermination) + { + if (Netplay.Clients[index].PendingTerminationApproved) + { + Netplay.Clients[index].Reset(); + NetMessage.SyncDisconnectedPlayer(index); + } + } + else if (Netplay.Clients[index].IsConnected()) + { + Netplay.Clients[index].Update(); + ++num1; + } + else if (Netplay.Clients[index].IsActive) + { + Netplay.Clients[index].PendingTermination = true; + Netplay.Clients[index].PendingTerminationApproved = true; + } + else + { + Netplay.Clients[index].StatusText2 = ""; + if (index < (int) byte.MaxValue) + { + int num2 = Main.player[index].active ? 1 : 0; + Main.player[index].active = false; + if (num2 != 0) + Player.Hooks.PlayerDisconnect(index); + } + } + } + Netplay.HasClients = (uint) num1 > 0U; + } + + private static void StartListeningIfNeeded() + { + if (Netplay.IsListening) + return; + if (!((IEnumerable) Netplay.Clients).Any((Func) (client => !client.IsConnected()))) + return; + try + { + Netplay.StartListening(); + Netplay.IsListening = true; + } + catch + { + if (Main.ignoreErrors) + return; + throw; + } + } + + private static void UpdateClient() + { + if (Main.netMode != 1 || !Netplay.Connection.Socket.IsConnected() || !NetMessage.buffer[256].checkBytes) + return; + NetMessage.CheckBytes(); + } + + public static void AddCurrentServerToRecentList() + { + if (Netplay.Connection.Socket.GetRemoteAddress().Type != AddressType.Tcp) + return; + for (int index1 = 0; index1 < Main.maxMP; ++index1) + { + if (Main.recentIP[index1].ToLower() == Netplay.ServerIPText.ToLower() && Main.recentPort[index1] == Netplay.ListenPort) + { + for (int index2 = index1; index2 < Main.maxMP - 1; ++index2) + { + Main.recentIP[index2] = Main.recentIP[index2 + 1]; + Main.recentPort[index2] = Main.recentPort[index2 + 1]; + Main.recentWorld[index2] = Main.recentWorld[index2 + 1]; + } + } + } + for (int index = Main.maxMP - 1; index > 0; --index) + { + Main.recentIP[index] = Main.recentIP[index - 1]; + Main.recentPort[index] = Main.recentPort[index - 1]; + Main.recentWorld[index] = Main.recentWorld[index - 1]; + } + Main.recentIP[0] = Netplay.ServerIPText; + Main.recentPort[0] = Netplay.ListenPort; + Main.recentWorld[0] = Main.worldName; + Main.SaveRecent(); + } + + public static void SocialClientLoop(object threadContext) + { + ISocket socket = (ISocket) threadContext; + Netplay.ClientLoopSetup(socket.GetRemoteAddress()); + Netplay.Connection.Socket = socket; + Netplay.InnerClientLoop(); + } + + public static void TcpClientLoop() + { + Netplay.ClientLoopSetup((RemoteAddress) new TcpAddress(Netplay.ServerIP, Netplay.ListenPort)); + Main.menuMode = 14; + bool flag = true; + while (flag) + { + flag = false; + try + { + Netplay.Connection.Socket.Connect((RemoteAddress) new TcpAddress(Netplay.ServerIP, Netplay.ListenPort)); + flag = false; + } + catch + { + if (!Netplay.Disconnect) + { + if (Main.gameMenu) + flag = true; + } + } + } + Netplay.InnerClientLoop(); + } + + private static void ClientLoopSetup(RemoteAddress address) + { + Netplay.ResetNetDiag(); + Main.ServerSideCharacter = false; + if (Main.rand == null) + Main.rand = new UnifiedRandom((int) DateTime.Now.Ticks); + Main.player[Main.myPlayer].hostile = false; + Main.clientPlayer = (Player) Main.player[Main.myPlayer].clientClone(); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (index != Main.myPlayer) + Main.player[index] = new Player(); + } + Main.netMode = 1; + Main.menuMode = 14; + if (!Main.autoPass) + Main.statusText = Language.GetTextValue("Net.ConnectingTo", (object) address.GetFriendlyName()); + Netplay.Disconnect = false; + Netplay.Connection = new RemoteServer(); + Netplay.Connection.ReadBuffer = new byte[1024]; + } + + private static void InnerClientLoop() + { + try + { + NetMessage.buffer[256].Reset(); + int num1 = -1; + while (!Netplay.Disconnect) + { + if (Netplay.Connection.Socket.IsConnected()) + { + Netplay.Connection.IsActive = true; + if (Netplay.Connection.State == 0) + { + Main.statusText = Language.GetTextValue("Net.FoundServer"); + Netplay.Connection.State = 1; + NetMessage.SendData(1); + } + if (Netplay.Connection.State == 2 && num1 != Netplay.Connection.State) + Main.statusText = Language.GetTextValue("Net.SendingPlayerData"); + if (Netplay.Connection.State == 3 && num1 != Netplay.Connection.State) + Main.statusText = Language.GetTextValue("Net.RequestingWorldInformation"); + if (Netplay.Connection.State == 4) + { + WorldGen.worldCleared = false; + Netplay.Connection.State = 5; + Main.cloudBGAlpha = (double) Main.cloudBGActive < 1.0 ? 0.0f : 1f; + Main.windSpeedCurrent = Main.windSpeedTarget; + Cloud.resetClouds(); + Main.cloudAlpha = Main.maxRaining; + WorldGen.clearWorld(); + if (Main.mapEnabled) + Main.Map.Load(); + } + if (Netplay.Connection.State == 5 && Main.loadMapLock) + { + float num2 = (float) Main.loadMapLastX / (float) Main.maxTilesX; + Main.statusText = Lang.gen[68].Value + " " + (object) (int) ((double) num2 * 100.0 + 1.0) + "%"; + } + else if (Netplay.Connection.State == 5 && WorldGen.worldCleared) + { + Netplay.Connection.State = 6; + Main.player[Main.myPlayer].FindSpawn(); + NetMessage.SendData(8, number: Main.player[Main.myPlayer].SpawnX, number2: ((float) Main.player[Main.myPlayer].SpawnY)); + } + if (Netplay.Connection.State == 6 && num1 != Netplay.Connection.State) + Main.statusText = Language.GetTextValue("Net.RequestingTileData"); + if (!Netplay.Connection.IsReading && !Netplay.Disconnect && Netplay.Connection.Socket.IsDataAvailable()) + { + Netplay.Connection.IsReading = true; + Netplay.Connection.Socket.AsyncReceive(Netplay.Connection.ReadBuffer, 0, Netplay.Connection.ReadBuffer.Length, new SocketReceiveCallback(Netplay.Connection.ClientReadCallBack)); + } + if (Netplay.Connection.StatusMax > 0 && Netplay.Connection.StatusText != "") + { + if (Netplay.Connection.StatusCount >= Netplay.Connection.StatusMax) + { + Main.statusText = Language.GetTextValue("Net.StatusComplete", (object) Netplay.Connection.StatusText); + Netplay.Connection.StatusText = ""; + Netplay.Connection.StatusMax = 0; + Netplay.Connection.StatusCount = 0; + } + else + Main.statusText = Netplay.Connection.StatusText + ": " + (object) (int) ((double) Netplay.Connection.StatusCount / (double) Netplay.Connection.StatusMax * 100.0) + "%"; + } + Thread.Sleep(1); + } + else if (Netplay.Connection.IsActive) + { + Main.statusText = Language.GetTextValue("Net.LostConnection"); + Netplay.Disconnect = true; + } + num1 = Netplay.Connection.State; + } + try + { + Netplay.Connection.Socket.Close(); + } + catch + { + } + if (!Main.gameMenu) + { + Main.gameMenu = true; + Main.SwitchNetMode(0); + MapHelper.noStatusText = true; + Player.SavePlayer(Main.ActivePlayerFileData); + Player.ClearPlayerTempInfo(); + Main.ActivePlayerFileData.StopPlayTimer(); + SoundEngine.StopTrackedSounds(); + MapHelper.noStatusText = false; + Main.menuMode = 14; + } + NetMessage.buffer[256].Reset(); + if (Main.menuMode == 15 && Main.statusText == Language.GetTextValue("Net.LostConnection")) + Main.menuMode = 14; + if (Netplay.Connection.StatusText != "" && Netplay.Connection.StatusText != null) + Main.statusText = Language.GetTextValue("Net.LostConnection"); + Netplay.Connection.StatusCount = 0; + Netplay.Connection.StatusMax = 0; + Netplay.Connection.StatusText = ""; + Main.SwitchNetMode(0); + } + catch (Exception ex) + { + try + { + using (StreamWriter streamWriter = new StreamWriter("client-crashlog.txt", true)) + { + streamWriter.WriteLine((object) DateTime.Now); + streamWriter.WriteLine((object) ex); + streamWriter.WriteLine(""); + } + } + catch + { + } + Netplay.Disconnect = true; + } + if (Netplay.OnDisconnect == null) + return; + Netplay.OnDisconnect(); + } + + private static int FindNextOpenClientSlot() + { + for (int index = 0; index < Main.maxNetPlayers; ++index) + { + if (!Netplay.Clients[index].IsConnected()) + return index; + } + return -1; + } + + public static void StartSocialClient(ISocket socket) => new Thread(new ParameterizedThreadStart(Netplay.SocialClientLoop)) + { + Name = "Social Client Thread", + IsBackground = true + }.Start((object) socket); + + public static void StartTcpClient() => new Thread(new ThreadStart(Netplay.TcpClientLoop)) + { + Name = "TCP Client Thread", + IsBackground = true + }.Start(); + + public static bool SetRemoteIP(string remoteAddress) => Netplay.SetRemoteIPOld(remoteAddress); + + public static bool SetRemoteIPOld(string remoteAddress) + { + try + { + IPAddress address; + if (IPAddress.TryParse(remoteAddress, out address)) + { + Netplay.ServerIP = address; + Netplay.ServerIPText = address.ToString(); + return true; + } + IPAddress[] addressList = Dns.GetHostEntry(remoteAddress).AddressList; + for (int index = 0; index < addressList.Length; ++index) + { + if (addressList[index].AddressFamily == AddressFamily.InterNetwork) + { + Netplay.ServerIP = addressList[index]; + Netplay.ServerIPText = remoteAddress; + return true; + } + } + } + catch (Exception ex) + { + } + return false; + } + + public static void SetRemoteIPAsync(string remoteAddress, Action successCallBack) + { + try + { + IPAddress address; + if (IPAddress.TryParse(remoteAddress, out address)) + { + Netplay.ServerIP = address; + Netplay.ServerIPText = address.ToString(); + successCallBack(); + } + else + { + Netplay.InvalidateAllOngoingIPSetAttempts(); + Dns.BeginGetHostAddresses(remoteAddress, new AsyncCallback(Netplay.SetRemoteIPAsyncCallback), (object) new Netplay.SetRemoteIPRequestInfo() + { + RequestId = Netplay._currentRequestId, + SuccessCallback = successCallBack, + RemoteAddress = remoteAddress + }); + } + } + catch (Exception ex) + { + } + } + + public static void InvalidateAllOngoingIPSetAttempts() => ++Netplay._currentRequestId; + + private static void SetRemoteIPAsyncCallback(IAsyncResult ar) + { + Netplay.SetRemoteIPRequestInfo asyncState = (Netplay.SetRemoteIPRequestInfo) ar.AsyncState; + if (asyncState.RequestId != Netplay._currentRequestId) + return; + try + { + bool flag = false; + IPAddress[] hostAddresses = Dns.EndGetHostAddresses(ar); + for (int index = 0; index < hostAddresses.Length; ++index) + { + if (hostAddresses[index].AddressFamily == AddressFamily.InterNetwork) + { + Netplay.ServerIP = hostAddresses[index]; + Netplay.ServerIPText = asyncState.RemoteAddress; + flag = true; + break; + } + } + if (!flag) + return; + asyncState.SuccessCallback(); + } + catch (Exception ex) + { + } + } + + public static void Initialize() + { + NetMessage.buffer[256] = new MessageBuffer(); + NetMessage.buffer[256].whoAmI = 256; + } + + public static void Update() => Netplay.UpdateClient(); + + public static int GetSectionX(int x) => x / 200; + + public static int GetSectionY(int y) => y / 150; + + private static void BroadcastThread() + { + Netplay.BroadcastClient = new UdpClient(); + IPEndPoint ipEndPoint = new IPEndPoint(IPAddress.Any, 0); + Netplay.BroadcastClient.EnableBroadcast = true; + DateTime dateTime = new DateTime(0L); + byte[] array; + using (MemoryStream memoryStream = new MemoryStream()) + { + using (BinaryWriter binaryWriter = new BinaryWriter((Stream) memoryStream)) + { + int num = 1010; + binaryWriter.Write(num); + binaryWriter.Write(Netplay.ListenPort); + binaryWriter.Write(Main.worldName); + binaryWriter.Write(Dns.GetHostName()); + binaryWriter.Write((ushort) Main.maxTilesX); + binaryWriter.Write(Main.ActiveWorldFileData.HasCrimson); + binaryWriter.Write(Main.ActiveWorldFileData.GameMode); + binaryWriter.Write((byte) Main.maxNetPlayers); + binaryWriter.Write((byte) 0); + binaryWriter.Flush(); + array = memoryStream.ToArray(); + } + } + while (true) + { + int num = 0; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active) + ++num; + } + if (num > 0) + { + array[array.Length - 1] = (byte) num; + try + { + Netplay.BroadcastClient.Send(array, array.Length, new IPEndPoint(IPAddress.Broadcast, 8888)); + } + catch + { + } + } + Thread.Sleep(1000); + } + } + + public static void StartBroadCasting() + { + if (Netplay.broadcastThread != null) + Netplay.StopBroadCasting(); + Netplay.broadcastThread = new Thread(new ThreadStart(Netplay.BroadcastThread)); + Netplay.broadcastThread.Start(); + } + + public static void StopBroadCasting() + { + if (Netplay.broadcastThread != null) + { + Netplay.broadcastThread.Abort(); + Netplay.broadcastThread = (Thread) null; + } + if (Netplay.BroadcastClient == null) + return; + Netplay.BroadcastClient.Close(); + Netplay.BroadcastClient = (UdpClient) null; + } + + private class SetRemoteIPRequestInfo + { + public int RequestId; + public Action SuccessCallback; + public string RemoteAddress; + } + } +} diff --git a/ObjectData/TileObjectData.cs b/ObjectData/TileObjectData.cs new file mode 100644 index 0000000..ceca490 --- /dev/null +++ b/ObjectData/TileObjectData.cs @@ -0,0 +1,4157 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ObjectData.TileObjectData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.GameContent.Tile_Entities; +using Terraria.ID; +using Terraria.Modules; + +namespace Terraria.ObjectData +{ + public class TileObjectData + { + private TileObjectData _parent; + private bool _linkedAlternates; + private bool _usesCustomCanPlace; + private TileObjectAlternatesModule _alternates; + private AnchorDataModule _anchor; + private AnchorTypesModule _anchorTiles; + private LiquidDeathModule _liquidDeath; + private LiquidPlacementModule _liquidPlacement; + private TilePlacementHooksModule _placementHooks; + private TileObjectSubTilesModule _subTiles; + private TileObjectDrawModule _tileObjectDraw; + private TileObjectStyleModule _tileObjectStyle; + private TileObjectBaseModule _tileObjectBase; + private TileObjectCoordinatesModule _tileObjectCoords; + private bool _hasOwnAlternates; + private bool _hasOwnAnchor; + private bool _hasOwnAnchorTiles; + private bool _hasOwnLiquidDeath; + private bool _hasOwnLiquidPlacement; + private bool _hasOwnPlacementHooks; + private bool _hasOwnSubTiles; + private bool _hasOwnTileObjectBase; + private bool _hasOwnTileObjectDraw; + private bool _hasOwnTileObjectStyle; + private bool _hasOwnTileObjectCoords; + private static List _data; + private static TileObjectData _baseObject; + private static bool readOnlyData; + private static TileObjectData newTile; + private static TileObjectData newSubTile; + private static TileObjectData newAlternate; + private static TileObjectData StyleSwitch; + private static TileObjectData StyleTorch; + private static TileObjectData Style4x2; + private static TileObjectData Style2x2; + private static TileObjectData Style1x2; + private static TileObjectData Style1x1; + private static TileObjectData StyleAlch; + private static TileObjectData StyleDye; + private static TileObjectData Style2x1; + private static TileObjectData Style6x3; + private static TileObjectData StyleSmallCage; + private static TileObjectData StyleOnTable1x1; + private static TileObjectData Style1x2Top; + private static TileObjectData Style1xX; + private static TileObjectData Style2xX; + private static TileObjectData Style3x2; + private static TileObjectData Style3x3; + private static TileObjectData Style3x4; + private static TileObjectData Style5x4; + private static TileObjectData Style3x3Wall; + + public TileObjectData(TileObjectData copyFrom = null) + { + this._parent = (TileObjectData) null; + this._linkedAlternates = false; + if (copyFrom == null) + { + this._usesCustomCanPlace = false; + this._alternates = (TileObjectAlternatesModule) null; + this._anchor = (AnchorDataModule) null; + this._anchorTiles = (AnchorTypesModule) null; + this._tileObjectBase = (TileObjectBaseModule) null; + this._liquidDeath = (LiquidDeathModule) null; + this._liquidPlacement = (LiquidPlacementModule) null; + this._placementHooks = (TilePlacementHooksModule) null; + this._tileObjectDraw = (TileObjectDrawModule) null; + this._tileObjectStyle = (TileObjectStyleModule) null; + this._tileObjectCoords = (TileObjectCoordinatesModule) null; + } + else + this.CopyFrom(copyFrom); + } + + public void CopyFrom(TileObjectData copy) + { + if (copy == null) + return; + this._usesCustomCanPlace = copy._usesCustomCanPlace; + this._alternates = copy._alternates; + this._anchor = copy._anchor; + this._anchorTiles = copy._anchorTiles; + this._tileObjectBase = copy._tileObjectBase; + this._liquidDeath = copy._liquidDeath; + this._liquidPlacement = copy._liquidPlacement; + this._placementHooks = copy._placementHooks; + this._tileObjectDraw = copy._tileObjectDraw; + this._tileObjectStyle = copy._tileObjectStyle; + this._tileObjectCoords = copy._tileObjectCoords; + } + + public void FullCopyFrom(ushort tileType) => this.FullCopyFrom(TileObjectData.GetTileData((int) tileType, 0)); + + public void FullCopyFrom(TileObjectData copy) + { + if (copy == null) + return; + this._usesCustomCanPlace = copy._usesCustomCanPlace; + this._alternates = copy._alternates; + this._anchor = copy._anchor; + this._anchorTiles = copy._anchorTiles; + this._tileObjectBase = copy._tileObjectBase; + this._liquidDeath = copy._liquidDeath; + this._liquidPlacement = copy._liquidPlacement; + this._placementHooks = copy._placementHooks; + this._tileObjectDraw = copy._tileObjectDraw; + this._tileObjectStyle = copy._tileObjectStyle; + this._tileObjectCoords = copy._tileObjectCoords; + this._subTiles = new TileObjectSubTilesModule(copy._subTiles); + this._hasOwnSubTiles = true; + } + + private void SetupBaseObject() + { + this._alternates = new TileObjectAlternatesModule(); + this._hasOwnAlternates = true; + this.Alternates = new List(); + this._anchor = new AnchorDataModule(); + this._hasOwnAnchor = true; + this.AnchorTop = new AnchorData(); + this.AnchorBottom = new AnchorData(); + this.AnchorLeft = new AnchorData(); + this.AnchorRight = new AnchorData(); + this.AnchorWall = false; + this._anchorTiles = new AnchorTypesModule(); + this._hasOwnAnchorTiles = true; + this.AnchorValidTiles = (int[]) null; + this.AnchorInvalidTiles = (int[]) null; + this.AnchorAlternateTiles = (int[]) null; + this.AnchorValidWalls = (int[]) null; + this._liquidDeath = new LiquidDeathModule(); + this._hasOwnLiquidDeath = true; + this.WaterDeath = false; + this.LavaDeath = false; + this._liquidPlacement = new LiquidPlacementModule(); + this._hasOwnLiquidPlacement = true; + this.WaterPlacement = LiquidPlacement.Allowed; + this.LavaPlacement = LiquidPlacement.NotAllowed; + this._placementHooks = new TilePlacementHooksModule(); + this._hasOwnPlacementHooks = true; + this.HookCheckIfCanPlace = new PlacementHook(); + this.HookPostPlaceEveryone = new PlacementHook(); + this.HookPostPlaceMyPlayer = new PlacementHook(); + this.HookPlaceOverride = new PlacementHook(); + this.SubTiles = new List(623); + this._tileObjectBase = new TileObjectBaseModule(); + this._hasOwnTileObjectBase = true; + this.Width = 1; + this.Height = 1; + this.Origin = Point16.Zero; + this.Direction = TileObjectDirection.None; + this.RandomStyleRange = 0; + this.FlattenAnchors = false; + this._tileObjectCoords = new TileObjectCoordinatesModule(); + this._hasOwnTileObjectCoords = true; + this.CoordinateHeights = new int[1]{ 16 }; + this.CoordinateWidth = 0; + this.CoordinatePadding = 0; + this.CoordinatePaddingFix = Point16.Zero; + this._tileObjectDraw = new TileObjectDrawModule(); + this._hasOwnTileObjectDraw = true; + this.DrawYOffset = 0; + this.DrawFlipHorizontal = false; + this.DrawFlipVertical = false; + this.DrawStepDown = 0; + this._tileObjectStyle = new TileObjectStyleModule(); + this._hasOwnTileObjectStyle = true; + this.Style = 0; + this.StyleHorizontal = false; + this.StyleWrapLimit = 0; + this.StyleMultiplier = 1; + } + + private void Calculate() + { + if (this._tileObjectCoords.calculated) + return; + this._tileObjectCoords.calculated = true; + this._tileObjectCoords.styleWidth = (this._tileObjectCoords.width + this._tileObjectCoords.padding) * this.Width + (int) this._tileObjectCoords.paddingFix.X; + int num = 0; + this._tileObjectCoords.styleHeight = 0; + for (int index = 0; index < this._tileObjectCoords.heights.Length; ++index) + num += this._tileObjectCoords.heights[index] + this._tileObjectCoords.padding; + this._tileObjectCoords.styleHeight = num + (int) this._tileObjectCoords.paddingFix.Y; + if (!this._hasOwnLiquidDeath) + return; + if (this._liquidDeath.lava) + this.LavaPlacement = LiquidPlacement.NotAllowed; + if (!this._liquidDeath.water) + return; + this.WaterPlacement = LiquidPlacement.NotAllowed; + } + + private void WriteCheck() + { + if (TileObjectData.readOnlyData) + throw new FieldAccessException("Tile data is locked and only accessible during startup."); + } + + private void LockWrites() => TileObjectData.readOnlyData = true; + + private bool LinkedAlternates + { + get => this._linkedAlternates; + set + { + this.WriteCheck(); + if (value && !this._hasOwnAlternates) + { + this._hasOwnAlternates = true; + this._alternates = new TileObjectAlternatesModule(this._alternates); + } + this._linkedAlternates = value; + } + } + + public bool UsesCustomCanPlace + { + get => this._usesCustomCanPlace; + set + { + this.WriteCheck(); + this._usesCustomCanPlace = value; + } + } + + private List Alternates + { + get => this._alternates == null ? TileObjectData._baseObject.Alternates : this._alternates.data; + set + { + if (!this._hasOwnAlternates) + { + this._hasOwnAlternates = true; + this._alternates = new TileObjectAlternatesModule(this._alternates); + } + this._alternates.data = value; + } + } + + public AnchorData AnchorTop + { + get => this._anchor == null ? TileObjectData._baseObject.AnchorTop : this._anchor.top; + set + { + this.WriteCheck(); + if (!this._hasOwnAnchor) + { + if (this._anchor.top == value) + return; + this._hasOwnAnchor = true; + this._anchor = new AnchorDataModule(this._anchor); + } + this._anchor.top = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].AnchorTop = value; + } + } + + public AnchorData AnchorBottom + { + get => this._anchor == null ? TileObjectData._baseObject.AnchorBottom : this._anchor.bottom; + set + { + this.WriteCheck(); + if (!this._hasOwnAnchor) + { + if (this._anchor.bottom == value) + return; + this._hasOwnAnchor = true; + this._anchor = new AnchorDataModule(this._anchor); + } + this._anchor.bottom = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].AnchorBottom = value; + } + } + + public AnchorData AnchorLeft + { + get => this._anchor == null ? TileObjectData._baseObject.AnchorLeft : this._anchor.left; + set + { + this.WriteCheck(); + if (!this._hasOwnAnchor) + { + if (this._anchor.left == value) + return; + this._hasOwnAnchor = true; + this._anchor = new AnchorDataModule(this._anchor); + } + this._anchor.left = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].AnchorLeft = value; + } + } + + public AnchorData AnchorRight + { + get => this._anchor == null ? TileObjectData._baseObject.AnchorRight : this._anchor.right; + set + { + this.WriteCheck(); + if (!this._hasOwnAnchor) + { + if (this._anchor.right == value) + return; + this._hasOwnAnchor = true; + this._anchor = new AnchorDataModule(this._anchor); + } + this._anchor.right = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].AnchorRight = value; + } + } + + public bool AnchorWall + { + get => this._anchor == null ? TileObjectData._baseObject.AnchorWall : this._anchor.wall; + set + { + this.WriteCheck(); + if (!this._hasOwnAnchor) + { + if (this._anchor.wall == value) + return; + this._hasOwnAnchor = true; + this._anchor = new AnchorDataModule(this._anchor); + } + this._anchor.wall = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].AnchorWall = value; + } + } + + public int[] AnchorValidTiles + { + get => this._anchorTiles == null ? TileObjectData._baseObject.AnchorValidTiles : this._anchorTiles.tileValid; + set + { + this.WriteCheck(); + if (!this._hasOwnAnchorTiles) + { + if (value.deepCompare(this._anchorTiles.tileValid)) + return; + this._hasOwnAnchorTiles = true; + this._anchorTiles = new AnchorTypesModule(this._anchorTiles); + } + this._anchorTiles.tileValid = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + { + int[] numArray = value; + if (value != null) + numArray = (int[]) value.Clone(); + this._alternates.data[index].AnchorValidTiles = numArray; + } + } + } + + public int[] AnchorInvalidTiles + { + get => this._anchorTiles == null ? TileObjectData._baseObject.AnchorInvalidTiles : this._anchorTiles.tileInvalid; + set + { + this.WriteCheck(); + if (!this._hasOwnAnchorTiles) + { + if (value.deepCompare(this._anchorTiles.tileInvalid)) + return; + this._hasOwnAnchorTiles = true; + this._anchorTiles = new AnchorTypesModule(this._anchorTiles); + } + this._anchorTiles.tileInvalid = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + { + int[] numArray = value; + if (value != null) + numArray = (int[]) value.Clone(); + this._alternates.data[index].AnchorInvalidTiles = numArray; + } + } + } + + public int[] AnchorAlternateTiles + { + get => this._anchorTiles == null ? TileObjectData._baseObject.AnchorAlternateTiles : this._anchorTiles.tileAlternates; + set + { + this.WriteCheck(); + if (!this._hasOwnAnchorTiles) + { + if (value.deepCompare(this._anchorTiles.tileInvalid)) + return; + this._hasOwnAnchorTiles = true; + this._anchorTiles = new AnchorTypesModule(this._anchorTiles); + } + this._anchorTiles.tileAlternates = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + { + int[] numArray = value; + if (value != null) + numArray = (int[]) value.Clone(); + this._alternates.data[index].AnchorAlternateTiles = numArray; + } + } + } + + public int[] AnchorValidWalls + { + get => this._anchorTiles == null ? TileObjectData._baseObject.AnchorValidWalls : this._anchorTiles.wallValid; + set + { + this.WriteCheck(); + if (!this._hasOwnAnchorTiles) + { + this._hasOwnAnchorTiles = true; + this._anchorTiles = new AnchorTypesModule(this._anchorTiles); + } + this._anchorTiles.wallValid = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + { + int[] numArray = value; + if (value != null) + numArray = (int[]) value.Clone(); + this._alternates.data[index].AnchorValidWalls = numArray; + } + } + } + + public bool WaterDeath + { + get => this._liquidDeath == null ? TileObjectData._baseObject.WaterDeath : this._liquidDeath.water; + set + { + this.WriteCheck(); + if (!this._hasOwnLiquidDeath) + { + if (this._liquidDeath.water == value) + return; + this._hasOwnLiquidDeath = true; + this._liquidDeath = new LiquidDeathModule(this._liquidDeath); + } + this._liquidDeath.water = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].WaterDeath = value; + } + } + + public bool LavaDeath + { + get => this._liquidDeath == null ? TileObjectData._baseObject.LavaDeath : this._liquidDeath.lava; + set + { + this.WriteCheck(); + if (!this._hasOwnLiquidDeath) + { + if (this._liquidDeath.lava == value) + return; + this._hasOwnLiquidDeath = true; + this._liquidDeath = new LiquidDeathModule(this._liquidDeath); + } + this._liquidDeath.lava = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].LavaDeath = value; + } + } + + public LiquidPlacement WaterPlacement + { + get => this._liquidPlacement == null ? TileObjectData._baseObject.WaterPlacement : this._liquidPlacement.water; + set + { + this.WriteCheck(); + if (!this._hasOwnLiquidPlacement) + { + if (this._liquidPlacement.water == value) + return; + this._hasOwnLiquidPlacement = true; + this._liquidPlacement = new LiquidPlacementModule(this._liquidPlacement); + } + this._liquidPlacement.water = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].WaterPlacement = value; + } + } + + public LiquidPlacement LavaPlacement + { + get => this._liquidPlacement == null ? TileObjectData._baseObject.LavaPlacement : this._liquidPlacement.lava; + set + { + this.WriteCheck(); + if (!this._hasOwnLiquidPlacement) + { + if (this._liquidPlacement.lava == value) + return; + this._hasOwnLiquidPlacement = true; + this._liquidPlacement = new LiquidPlacementModule(this._liquidPlacement); + } + this._liquidPlacement.lava = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].LavaPlacement = value; + } + } + + public PlacementHook HookCheckIfCanPlace + { + get => this._placementHooks == null ? TileObjectData._baseObject.HookCheckIfCanPlace : this._placementHooks.check; + set + { + this.WriteCheck(); + if (!this._hasOwnPlacementHooks) + { + this._hasOwnPlacementHooks = true; + this._placementHooks = new TilePlacementHooksModule(this._placementHooks); + } + this._placementHooks.check = value; + } + } + + public PlacementHook HookPostPlaceEveryone + { + get => this._placementHooks == null ? TileObjectData._baseObject.HookPostPlaceEveryone : this._placementHooks.postPlaceEveryone; + set + { + this.WriteCheck(); + if (!this._hasOwnPlacementHooks) + { + this._hasOwnPlacementHooks = true; + this._placementHooks = new TilePlacementHooksModule(this._placementHooks); + } + this._placementHooks.postPlaceEveryone = value; + } + } + + public PlacementHook HookPostPlaceMyPlayer + { + get => this._placementHooks == null ? TileObjectData._baseObject.HookPostPlaceMyPlayer : this._placementHooks.postPlaceMyPlayer; + set + { + this.WriteCheck(); + if (!this._hasOwnPlacementHooks) + { + this._hasOwnPlacementHooks = true; + this._placementHooks = new TilePlacementHooksModule(this._placementHooks); + } + this._placementHooks.postPlaceMyPlayer = value; + } + } + + public PlacementHook HookPlaceOverride + { + get => this._placementHooks == null ? TileObjectData._baseObject.HookPlaceOverride : this._placementHooks.placeOverride; + set + { + this.WriteCheck(); + if (!this._hasOwnPlacementHooks) + { + this._hasOwnPlacementHooks = true; + this._placementHooks = new TilePlacementHooksModule(this._placementHooks); + } + this._placementHooks.placeOverride = value; + } + } + + private List SubTiles + { + get => this._subTiles == null ? TileObjectData._baseObject.SubTiles : this._subTiles.data; + set + { + if (!this._hasOwnSubTiles) + { + this._hasOwnSubTiles = true; + this._subTiles = new TileObjectSubTilesModule(); + } + if (value == null) + this._subTiles.data = (List) null; + else + this._subTiles.data = value; + } + } + + public int DrawYOffset + { + get => this._tileObjectDraw == null ? this.DrawYOffset : this._tileObjectDraw.yOffset; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectDraw) + { + if (this._tileObjectDraw.yOffset == value) + return; + this._hasOwnTileObjectDraw = true; + this._tileObjectDraw = new TileObjectDrawModule(this._tileObjectDraw); + } + this._tileObjectDraw.yOffset = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].DrawYOffset = value; + } + } + + public int DrawXOffset + { + get => this._tileObjectDraw == null ? this.DrawXOffset : this._tileObjectDraw.xOffset; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectDraw) + { + if (this._tileObjectDraw.xOffset == value) + return; + this._hasOwnTileObjectDraw = true; + this._tileObjectDraw = new TileObjectDrawModule(this._tileObjectDraw); + } + this._tileObjectDraw.xOffset = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].DrawXOffset = value; + } + } + + public bool DrawFlipHorizontal + { + get => this._tileObjectDraw == null ? this.DrawFlipHorizontal : this._tileObjectDraw.flipHorizontal; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectDraw) + { + if (this._tileObjectDraw.flipHorizontal == value) + return; + this._hasOwnTileObjectDraw = true; + this._tileObjectDraw = new TileObjectDrawModule(this._tileObjectDraw); + } + this._tileObjectDraw.flipHorizontal = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].DrawFlipHorizontal = value; + } + } + + public bool DrawFlipVertical + { + get => this._tileObjectDraw == null ? this.DrawFlipVertical : this._tileObjectDraw.flipVertical; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectDraw) + { + if (this._tileObjectDraw.flipVertical == value) + return; + this._hasOwnTileObjectDraw = true; + this._tileObjectDraw = new TileObjectDrawModule(this._tileObjectDraw); + } + this._tileObjectDraw.flipVertical = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].DrawFlipVertical = value; + } + } + + public int DrawStepDown + { + get => this._tileObjectDraw == null ? this.DrawStepDown : this._tileObjectDraw.stepDown; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectDraw) + { + if (this._tileObjectDraw.stepDown == value) + return; + this._hasOwnTileObjectDraw = true; + this._tileObjectDraw = new TileObjectDrawModule(this._tileObjectDraw); + } + this._tileObjectDraw.stepDown = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].DrawStepDown = value; + } + } + + public bool StyleHorizontal + { + get => this._tileObjectStyle == null ? this.StyleHorizontal : this._tileObjectStyle.horizontal; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectStyle) + { + if (this._tileObjectStyle.horizontal == value) + return; + this._hasOwnTileObjectStyle = true; + this._tileObjectStyle = new TileObjectStyleModule(this._tileObjectStyle); + } + this._tileObjectStyle.horizontal = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].StyleHorizontal = value; + } + } + + public int Style + { + get => this._tileObjectStyle == null ? TileObjectData._baseObject.Style : this._tileObjectStyle.style; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectStyle) + { + if (this._tileObjectStyle.style == value) + return; + this._hasOwnTileObjectStyle = true; + this._tileObjectStyle = new TileObjectStyleModule(this._tileObjectStyle); + } + this._tileObjectStyle.style = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].Style = value; + } + } + + public int StyleWrapLimit + { + get => this._tileObjectStyle == null ? TileObjectData._baseObject.StyleWrapLimit : this._tileObjectStyle.styleWrapLimit; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectStyle) + { + if (this._tileObjectStyle.styleWrapLimit == value) + return; + this._hasOwnTileObjectStyle = true; + this._tileObjectStyle = new TileObjectStyleModule(this._tileObjectStyle); + } + this._tileObjectStyle.styleWrapLimit = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].StyleWrapLimit = value; + } + } + + public int? StyleWrapLimitVisualOverride + { + get => this._tileObjectStyle == null ? TileObjectData._baseObject.StyleWrapLimitVisualOverride : this._tileObjectStyle.styleWrapLimitVisualOverride; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectStyle) + { + int? limitVisualOverride = this._tileObjectStyle.styleWrapLimitVisualOverride; + int? nullable = value; + if (limitVisualOverride.GetValueOrDefault() == nullable.GetValueOrDefault() & limitVisualOverride.HasValue == nullable.HasValue) + return; + this._hasOwnTileObjectStyle = true; + this._tileObjectStyle = new TileObjectStyleModule(this._tileObjectStyle); + } + this._tileObjectStyle.styleWrapLimitVisualOverride = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].StyleWrapLimitVisualOverride = value; + } + } + + public int? styleLineSkipVisualOverride + { + get => this._tileObjectStyle == null ? TileObjectData._baseObject.styleLineSkipVisualOverride : this._tileObjectStyle.styleLineSkipVisualoverride; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectStyle) + { + int? skipVisualoverride = this._tileObjectStyle.styleLineSkipVisualoverride; + int? nullable = value; + if (skipVisualoverride.GetValueOrDefault() == nullable.GetValueOrDefault() & skipVisualoverride.HasValue == nullable.HasValue) + return; + this._hasOwnTileObjectStyle = true; + this._tileObjectStyle = new TileObjectStyleModule(this._tileObjectStyle); + } + this._tileObjectStyle.styleLineSkipVisualoverride = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].styleLineSkipVisualOverride = value; + } + } + + public int StyleLineSkip + { + get => this._tileObjectStyle == null ? TileObjectData._baseObject.StyleLineSkip : this._tileObjectStyle.styleLineSkip; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectStyle) + { + if (this._tileObjectStyle.styleLineSkip == value) + return; + this._hasOwnTileObjectStyle = true; + this._tileObjectStyle = new TileObjectStyleModule(this._tileObjectStyle); + } + this._tileObjectStyle.styleLineSkip = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].StyleLineSkip = value; + } + } + + public int StyleMultiplier + { + get => this._tileObjectStyle == null ? TileObjectData._baseObject.StyleMultiplier : this._tileObjectStyle.styleMultiplier; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectStyle) + { + if (this._tileObjectStyle.styleMultiplier == value) + return; + this._hasOwnTileObjectStyle = true; + this._tileObjectStyle = new TileObjectStyleModule(this._tileObjectStyle); + } + this._tileObjectStyle.styleMultiplier = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].StyleMultiplier = value; + } + } + + public int Width + { + get => this._tileObjectBase == null ? TileObjectData._baseObject.Width : this._tileObjectBase.width; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectBase) + { + if (this._tileObjectBase.width == value) + return; + this._hasOwnTileObjectBase = true; + this._tileObjectBase = new TileObjectBaseModule(this._tileObjectBase); + if (!this._hasOwnTileObjectCoords) + { + this._hasOwnTileObjectCoords = true; + this._tileObjectCoords = new TileObjectCoordinatesModule(this._tileObjectCoords); + this._tileObjectCoords.calculated = false; + } + } + this._tileObjectBase.width = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].Width = value; + } + } + + public int Height + { + get => this._tileObjectBase == null ? TileObjectData._baseObject.Height : this._tileObjectBase.height; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectBase) + { + if (this._tileObjectBase.height == value) + return; + this._hasOwnTileObjectBase = true; + this._tileObjectBase = new TileObjectBaseModule(this._tileObjectBase); + if (!this._hasOwnTileObjectCoords) + { + this._hasOwnTileObjectCoords = true; + this._tileObjectCoords = new TileObjectCoordinatesModule(this._tileObjectCoords); + this._tileObjectCoords.calculated = false; + } + } + this._tileObjectBase.height = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].Height = value; + } + } + + public Point16 Origin + { + get => this._tileObjectBase == null ? TileObjectData._baseObject.Origin : this._tileObjectBase.origin; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectBase) + { + if (this._tileObjectBase.origin == value) + return; + this._hasOwnTileObjectBase = true; + this._tileObjectBase = new TileObjectBaseModule(this._tileObjectBase); + } + this._tileObjectBase.origin = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].Origin = value; + } + } + + public TileObjectDirection Direction + { + get => this._tileObjectBase == null ? TileObjectData._baseObject.Direction : this._tileObjectBase.direction; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectBase) + { + if (this._tileObjectBase.direction == value) + return; + this._hasOwnTileObjectBase = true; + this._tileObjectBase = new TileObjectBaseModule(this._tileObjectBase); + } + this._tileObjectBase.direction = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].Direction = value; + } + } + + public int RandomStyleRange + { + get => this._tileObjectBase == null ? TileObjectData._baseObject.RandomStyleRange : this._tileObjectBase.randomRange; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectBase) + { + if (this._tileObjectBase.randomRange == value) + return; + this._hasOwnTileObjectBase = true; + this._tileObjectBase = new TileObjectBaseModule(this._tileObjectBase); + } + this._tileObjectBase.randomRange = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].RandomStyleRange = value; + } + } + + public bool FlattenAnchors + { + get => this._tileObjectBase == null ? TileObjectData._baseObject.FlattenAnchors : this._tileObjectBase.flattenAnchors; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectBase) + { + if (this._tileObjectBase.flattenAnchors == value) + return; + this._hasOwnTileObjectBase = true; + this._tileObjectBase = new TileObjectBaseModule(this._tileObjectBase); + } + this._tileObjectBase.flattenAnchors = value; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].FlattenAnchors = value; + } + } + + public int[] CoordinateHeights + { + get => this._tileObjectCoords == null ? TileObjectData._baseObject.CoordinateHeights : this._tileObjectCoords.heights; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectCoords) + { + if (value.deepCompare(this._tileObjectCoords.heights)) + return; + this._hasOwnTileObjectCoords = true; + this._tileObjectCoords = new TileObjectCoordinatesModule(this._tileObjectCoords, value); + } + else + this._tileObjectCoords.heights = value; + this._tileObjectCoords.calculated = false; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + { + int[] numArray = value; + if (value != null) + numArray = (int[]) value.Clone(); + this._alternates.data[index].CoordinateHeights = numArray; + } + } + } + + public int CoordinateWidth + { + get => this._tileObjectCoords == null ? TileObjectData._baseObject.CoordinateWidth : this._tileObjectCoords.width; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectCoords) + { + if (this._tileObjectCoords.width == value) + return; + this._hasOwnTileObjectCoords = true; + this._tileObjectCoords = new TileObjectCoordinatesModule(this._tileObjectCoords); + } + this._tileObjectCoords.width = value; + this._tileObjectCoords.calculated = false; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].CoordinateWidth = value; + } + } + + public int CoordinatePadding + { + get => this._tileObjectCoords == null ? TileObjectData._baseObject.CoordinatePadding : this._tileObjectCoords.padding; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectCoords) + { + if (this._tileObjectCoords.padding == value) + return; + this._hasOwnTileObjectCoords = true; + this._tileObjectCoords = new TileObjectCoordinatesModule(this._tileObjectCoords); + } + this._tileObjectCoords.padding = value; + this._tileObjectCoords.calculated = false; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].CoordinatePadding = value; + } + } + + public Point16 CoordinatePaddingFix + { + get => this._tileObjectCoords == null ? TileObjectData._baseObject.CoordinatePaddingFix : this._tileObjectCoords.paddingFix; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectCoords) + { + if (this._tileObjectCoords.paddingFix == value) + return; + this._hasOwnTileObjectCoords = true; + this._tileObjectCoords = new TileObjectCoordinatesModule(this._tileObjectCoords); + } + this._tileObjectCoords.paddingFix = value; + this._tileObjectCoords.calculated = false; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].CoordinatePaddingFix = value; + } + } + + public int CoordinateFullWidth + { + get + { + if (this._tileObjectCoords == null) + return TileObjectData._baseObject.CoordinateFullWidth; + if (!this._tileObjectCoords.calculated) + this.Calculate(); + return this._tileObjectCoords.styleWidth; + } + } + + public int CoordinateFullHeight + { + get + { + if (this._tileObjectCoords == null) + return TileObjectData._baseObject.CoordinateFullHeight; + if (!this._tileObjectCoords.calculated) + this.Calculate(); + return this._tileObjectCoords.styleHeight; + } + } + + public int DrawStyleOffset + { + get => this._tileObjectCoords == null ? TileObjectData._baseObject.DrawStyleOffset : this._tileObjectCoords.drawStyleOffset; + set + { + this.WriteCheck(); + if (!this._hasOwnTileObjectCoords) + { + if (this._tileObjectCoords.drawStyleOffset == value) + return; + this._hasOwnTileObjectCoords = true; + this._tileObjectCoords = new TileObjectCoordinatesModule(this._tileObjectCoords); + } + this._tileObjectCoords.drawStyleOffset = value; + this._tileObjectCoords.calculated = false; + if (!this._linkedAlternates) + return; + for (int index = 0; index < this._alternates.data.Count; ++index) + this._alternates.data[index].DrawStyleOffset = value; + } + } + + public bool LiquidPlace(Tile checkTile) + { + if (checkTile == null) + return false; + if (checkTile.liquid > (byte) 0) + { + switch (checkTile.liquidType()) + { + case 0: + case 2: + if (this.WaterPlacement == LiquidPlacement.NotAllowed || this.WaterPlacement == LiquidPlacement.OnlyInFullLiquid && checkTile.liquid != byte.MaxValue) + return false; + break; + case 1: + if (this.LavaPlacement == LiquidPlacement.NotAllowed || this.LavaPlacement == LiquidPlacement.OnlyInFullLiquid && checkTile.liquid != byte.MaxValue) + return false; + break; + } + } + else + { + switch (checkTile.liquidType()) + { + case 0: + case 2: + if (this.WaterPlacement == LiquidPlacement.OnlyInFullLiquid || this.WaterPlacement == LiquidPlacement.OnlyInLiquid) + return false; + break; + case 1: + if (this.LavaPlacement == LiquidPlacement.OnlyInFullLiquid || this.LavaPlacement == LiquidPlacement.OnlyInLiquid) + return false; + break; + } + } + return true; + } + + public int AlternatesCount => this.Alternates.Count; + + public bool isValidTileAnchor(int type) + { + int[] numArray1; + int[] numArray2; + if (this._anchorTiles == null) + { + numArray1 = (int[]) null; + numArray2 = (int[]) null; + } + else + { + numArray1 = this._anchorTiles.tileValid; + numArray2 = this._anchorTiles.tileInvalid; + } + if (numArray2 != null) + { + for (int index = 0; index < numArray2.Length; ++index) + { + if (type == numArray2[index]) + return false; + } + } + if (numArray1 == null) + return true; + for (int index = 0; index < numArray1.Length; ++index) + { + if (type == numArray1[index]) + return true; + } + return false; + } + + public bool isValidWallAnchor(int type) + { + int[] numArray = this._anchorTiles != null ? this._anchorTiles.wallValid : (int[]) null; + if (numArray == null) + return type != 0; + for (int index = 0; index < numArray.Length; ++index) + { + if (type == numArray[index]) + return true; + } + return false; + } + + public bool isValidAlternateAnchor(int type) + { + if (this._anchorTiles == null) + return false; + int[] tileAlternates = this._anchorTiles.tileAlternates; + if (tileAlternates == null) + return false; + for (int index = 0; index < tileAlternates.Length; ++index) + { + if (type == tileAlternates[index]) + return true; + } + return false; + } + + public int CalculatePlacementStyle(int style, int alternate, int random) + { + int num = style * this.StyleMultiplier + this.Style; + if (random >= 0) + num += random; + return num; + } + + private static void addBaseTile(out TileObjectData baseTile) + { + TileObjectData.newTile.Calculate(); + baseTile = TileObjectData.newTile; + baseTile._parent = TileObjectData._baseObject; + TileObjectData.newTile = new TileObjectData(TileObjectData._baseObject); + } + + private static void addTile(int tileType) + { + TileObjectData.newTile.Calculate(); + TileObjectData._data[tileType] = TileObjectData.newTile; + TileObjectData.newTile = new TileObjectData(TileObjectData._baseObject); + } + + private static void addSubTile(int style) + { + TileObjectData.newSubTile.Calculate(); + List tileObjectDataList; + if (!TileObjectData.newTile._hasOwnSubTiles) + { + tileObjectDataList = new List(style + 1); + TileObjectData.newTile.SubTiles = tileObjectDataList; + } + else + tileObjectDataList = TileObjectData.newTile.SubTiles; + if (tileObjectDataList.Count <= style) + { + for (int count = tileObjectDataList.Count; count <= style; ++count) + tileObjectDataList.Add((TileObjectData) null); + } + TileObjectData.newSubTile._parent = TileObjectData.newTile; + tileObjectDataList[style] = TileObjectData.newSubTile; + TileObjectData.newSubTile = new TileObjectData(TileObjectData._baseObject); + } + + private static void addAlternate(int baseStyle) + { + TileObjectData.newAlternate.Calculate(); + if (!TileObjectData.newTile._hasOwnAlternates) + TileObjectData.newTile.Alternates = new List(); + TileObjectData.newAlternate.Style = baseStyle; + TileObjectData.newAlternate._parent = TileObjectData.newTile; + TileObjectData.newTile.Alternates.Add(TileObjectData.newAlternate); + TileObjectData.newAlternate = new TileObjectData(TileObjectData._baseObject); + } + + public static void Initialize() + { + TileObjectData._baseObject = new TileObjectData(); + TileObjectData._baseObject.SetupBaseObject(); + TileObjectData._data = new List(623); + for (int index = 0; index < 623; ++index) + TileObjectData._data.Add((TileObjectData) null); + TileObjectData.newTile = new TileObjectData(TileObjectData._baseObject); + TileObjectData.newSubTile = new TileObjectData(TileObjectData._baseObject); + TileObjectData.newAlternate = new TileObjectData(TileObjectData._baseObject); + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.StyleMultiplier = 27; + TileObjectData.newTile.StyleWrapLimit = 27; + TileObjectData.newTile.UsesCustomCanPlace = false; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(13); + TileObjectData.addTile(19); + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.StyleMultiplier = 27; + TileObjectData.newTile.StyleWrapLimit = 27; + TileObjectData.newTile.UsesCustomCanPlace = false; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.addTile(427); + for (int tileType = 435; tileType <= 439; ++tileType) + { + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.StyleMultiplier = 27; + TileObjectData.newTile.StyleWrapLimit = 27; + TileObjectData.newTile.UsesCustomCanPlace = false; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.addTile(tileType); + } + TileObjectData.newTile.Width = 4; + TileObjectData.newTile.Height = 8; + TileObjectData.newTile.Origin = new Point16(1, 7); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.HookPlaceOverride = new PlacementHook(new Func(WorldGen.PlaceXmasTree_Direct), -1, 0, true); + TileObjectData.newTile.CoordinateHeights = new int[8] + { + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 0; + TileObjectData.addTile(171); + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 1; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.EmptyTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.WaterPlacement = LiquidPlacement.NotAllowed; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 38 + }; + TileObjectData.newTile.CoordinateWidth = 32; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.DrawYOffset = -20; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.DrawFlipHorizontal = true; + TileObjectData.addBaseTile(out TileObjectData.StyleDye); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleDye); + TileObjectData.newSubTile.CopyFrom(TileObjectData.StyleDye); + TileObjectData.newSubTile.AnchorValidWalls = new int[1]; + TileObjectData.addSubTile(3); + TileObjectData.newSubTile.CopyFrom(TileObjectData.StyleDye); + TileObjectData.newSubTile.AnchorValidWalls = new int[1]; + TileObjectData.addSubTile(4); + TileObjectData.newSubTile.CopyFrom(TileObjectData.StyleDye); + TileObjectData.newSubTile.WaterPlacement = LiquidPlacement.OnlyInFullLiquid; + TileObjectData.addSubTile(5); + TileObjectData.newSubTile.CopyFrom(TileObjectData.StyleDye); + TileObjectData.newSubTile.AnchorValidTiles = new int[1] + { + 80 + }; + TileObjectData.newSubTile.AnchorLeft = new AnchorData(AnchorType.EmptyTile, 1, 1); + TileObjectData.newSubTile.AnchorRight = new AnchorData(AnchorType.EmptyTile, 1, 1); + TileObjectData.addSubTile(6); + TileObjectData.newSubTile.CopyFrom(TileObjectData.StyleDye); + TileObjectData.newSubTile.DrawYOffset = -6; + TileObjectData.newSubTile.WaterPlacement = LiquidPlacement.Allowed; + TileObjectData.newSubTile.AnchorTop = new AnchorData(AnchorType.SolidTile, TileObjectData.newSubTile.Width, 0); + TileObjectData.newSubTile.AnchorBottom = new AnchorData(AnchorType.EmptyTile, TileObjectData.newSubTile.Width, 0); + TileObjectData.addSubTile(7); + TileObjectData.addTile(227); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleDye); + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 20 + }; + TileObjectData.newTile.CoordinateWidth = 20; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.DrawYOffset = -2; + TileObjectData.newTile.AnchorTop = AnchorData.Empty; + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.Table, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.DrawFlipHorizontal = false; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + TileObjectData.addTile(579); + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.CoordinateHeights = new int[3] + { + 16, + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.StyleHorizontal = false; + TileObjectData.newTile.StyleWrapLimit = 36; + TileObjectData.newTile.StyleLineSkip = 3; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(0, 1); + TileObjectData.addAlternate(0); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(0, 2); + TileObjectData.addAlternate(0); + TileObjectData.addTile(10); + TileObjectData.newTile.Width = 2; + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile, 1, 0); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile, 1, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.CoordinateHeights = new int[3] + { + 16, + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.StyleMultiplier = 2; + TileObjectData.newTile.StyleWrapLimit = 2; + TileObjectData.newTile.Direction = TileObjectDirection.PlaceRight; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(0, 1); + TileObjectData.addAlternate(0); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(0, 2); + TileObjectData.addAlternate(0); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(1, 0); + TileObjectData.newAlternate.AnchorTop = new AnchorData(AnchorType.SolidTile, 1, 1); + TileObjectData.newAlternate.AnchorBottom = new AnchorData(AnchorType.SolidTile, 1, 1); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.addAlternate(1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(1, 1); + TileObjectData.newAlternate.AnchorTop = new AnchorData(AnchorType.SolidTile, 1, 1); + TileObjectData.newAlternate.AnchorBottom = new AnchorData(AnchorType.SolidTile, 1, 1); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.addAlternate(1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(1, 2); + TileObjectData.newAlternate.AnchorTop = new AnchorData(AnchorType.SolidTile, 1, 1); + TileObjectData.newAlternate.AnchorBottom = new AnchorData(AnchorType.SolidTile, 1, 1); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.addAlternate(1); + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LinkedAlternates = true; + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(19); + TileObjectData.addTile(11); + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 5; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.DrawYOffset = -2; + TileObjectData.newTile.CoordinateHeights = new int[5] + { + 18, + 16, + 16, + 16, + 18 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newTile.StyleMultiplier = 2; + TileObjectData.newTile.StyleWrapLimit = 2; + for (int Y = 1; Y < 5; ++Y) + { + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(0, Y); + TileObjectData.addAlternate(0); + } + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + for (int Y = 1; Y < 5; ++Y) + { + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(0, Y); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + } + TileObjectData.addTile(388); + TileObjectData.newTile.FullCopyFrom((ushort) 388); + TileObjectData.addTile(389); + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 1; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.Table, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.addBaseTile(out TileObjectData.StyleOnTable1x1); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleOnTable1x1); + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.addTile(13); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleOnTable1x1); + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 20 + }; + TileObjectData.newTile.DrawYOffset = -4; + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(25); + TileObjectData.addTile(33); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleOnTable1x1); + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 20 + }; + TileObjectData.newTile.DrawYOffset = -4; + TileObjectData.addTile(49); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleOnTable1x1); + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 16 + }; + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(new Func(TEFoodPlatter.Hook_AfterPlacement), -1, 0, true); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + TileObjectData.addTile(520); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleOnTable1x1); + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 20 + }; + TileObjectData.newTile.DrawYOffset = -4; + TileObjectData.addTile(372); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleOnTable1x1); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.RandomStyleRange = 5; + TileObjectData.addTile(50); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleOnTable1x1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(494); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleOnTable1x1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(78); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleOnTable1x1); + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 20 + }; + TileObjectData.newTile.DrawYOffset = -4; + TileObjectData.addTile(174); + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(0, 2); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.CoordinateHeights = new int[3] + { + 16, + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.addBaseTile(out TileObjectData.Style1xX); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1xX); + TileObjectData.newTile.StyleWrapLimitVisualOverride = new int?(37); + TileObjectData.newTile.StyleLineSkip = 2; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.WaterDeath = true; + TileObjectData.newTile.WaterPlacement = LiquidPlacement.NotAllowed; + TileObjectData.newTile.LavaPlacement = LiquidPlacement.NotAllowed; + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(23); + TileObjectData.addTile(93); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1xX); + TileObjectData.newTile.Height = 6; + TileObjectData.newTile.Origin = new Point16(0, 5); + TileObjectData.newTile.CoordinateHeights = new int[6] + { + 16, + 16, + 16, + 16, + 16, + 16 + }; + TileObjectData.addTile(92); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1xX); + TileObjectData.newTile.LavaPlacement = LiquidPlacement.NotAllowed; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + TileObjectData.addTile(453); + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.addBaseTile(out TileObjectData.Style1x2Top); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2Top); + TileObjectData.newTile.DrawYOffset = -2; + TileObjectData.addTile(270); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2Top); + TileObjectData.newTile.DrawYOffset = -2; + TileObjectData.addTile(271); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2Top); + TileObjectData.newTile.DrawYOffset = -2; + TileObjectData.addTile(581); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2Top); + TileObjectData.newTile.DrawYOffset = -2; + TileObjectData.newTile.StyleWrapLimit = 6; + TileObjectData.addTile(572); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2Top); + TileObjectData.newTile.DrawYOffset = -2; + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(32); + TileObjectData.addTile(42); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2Top); + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.CoordinateHeights = new int[3] + { + 16, + 16, + 16 + }; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide | AnchorType.SolidBottom, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.StyleWrapLimit = 111; + TileObjectData.newTile.DrawYOffset = -2; + TileObjectData.addTile(91); + TileObjectData.newTile.Width = 4; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(1, 1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(487); + TileObjectData.newTile.Width = 4; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(1, 1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newTile.StyleMultiplier = 2; + TileObjectData.newTile.StyleWrapLimit = 2; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + TileObjectData.addBaseTile(out TileObjectData.Style4x2); + TileObjectData.newTile.CopyFrom(TileObjectData.Style4x2); + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LinkedAlternates = true; + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(25); + TileObjectData.addTile(90); + TileObjectData.newTile.CopyFrom(TileObjectData.Style4x2); + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.newTile.CoordinatePaddingFix = new Point16(0, -2); + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LinkedAlternates = true; + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(8); + TileObjectData.addTile(79); + TileObjectData.newTile.Width = 4; + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(1, 2); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop, 2, 1); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.CoordinateHeights = new int[3] + { + 16, + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.addTile(209); + TileObjectData.newTile.Width = 3; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(1, 1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addBaseTile(out TileObjectData.StyleSmallCage); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(285); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(286); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(582); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(619); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(298); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(299); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(310); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(532); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(533); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(339); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(538); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(555); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(556); + TileObjectData.newTile.Width = 6; + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(3, 2); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[3] + { + 16, + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.addBaseTile(out TileObjectData.Style6x3); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(275); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(276); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(413); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(414); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(277); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(278); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(279); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(280); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(281); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(296); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(297); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(309); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(550); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(551); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(553); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(554); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(558); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(559); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(599); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(600); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(601); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(602); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(603); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(604); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(605); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(606); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(607); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(608); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(609); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(610); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(611); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(612); + TileObjectData.newTile.Width = 5; + TileObjectData.newTile.Height = 4; + TileObjectData.newTile.Origin = new Point16(2, 3); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[4] + { + 16, + 16, + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.addBaseTile(out TileObjectData.Style5x4); + TileObjectData.newTile.CopyFrom(TileObjectData.Style5x4); + TileObjectData.addTile(464); + TileObjectData.newTile.CopyFrom(TileObjectData.Style5x4); + TileObjectData.addTile(466); + TileObjectData.newTile.Width = 2; + TileObjectData.newTile.Height = 1; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.addBaseTile(out TileObjectData.Style2x1); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.Table, TileObjectData.newTile.Width, 0); + TileObjectData.addTile(29); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.Table, TileObjectData.newTile.Width, 0); + TileObjectData.addTile(103); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.Table, TileObjectData.newTile.Width, 0); + TileObjectData.addTile(462); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 18 + }; + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(14); + TileObjectData.addTile(18); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 18 + }; + TileObjectData.addTile(16); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(134); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.AnchorBottom = AnchorData.Empty; + TileObjectData.newTile.AnchorLeft = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Height, 0); + TileObjectData.newTile.AnchorRight = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Height, 0); + TileObjectData.addTile(387); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.newAlternate.AnchorTop = new AnchorData(AnchorType.SolidBottom, TileObjectData.newTile.Width, 0); + TileObjectData.addAlternate(2); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.newAlternate.AnchorTop = new AnchorData(AnchorType.SolidBottom, TileObjectData.newTile.Width, 0); + TileObjectData.addAlternate(3); + TileObjectData.addTile(443); + TileObjectData.newTile.Width = 2; + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(1, 2); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[3] + { + 16, + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.addBaseTile(out TileObjectData.Style2xX); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.newTile.Height = 5; + TileObjectData.newTile.Origin = new Point16(1, 4); + TileObjectData.newTile.CoordinateHeights = new int[5] + { + 16, + 16, + 16, + 16, + 16 + }; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.addTile(547); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.newTile.Height = 4; + TileObjectData.newTile.Origin = new Point16(1, 3); + TileObjectData.newTile.CoordinateHeights = new int[4] + { + 16, + 16, + 16, + 16 + }; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(207); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(1, 2); + TileObjectData.newTile.CoordinateHeights = new int[3] + { + 16, + 16, + 18 + }; + TileObjectData.addTile(410); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(1, 2); + TileObjectData.newTile.CoordinateHeights = new int[3] + { + 16, + 16, + 16 + }; + TileObjectData.addTile(480); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(1, 2); + TileObjectData.newTile.CoordinateHeights = new int[3] + { + 16, + 16, + 16 + }; + TileObjectData.addTile(509); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(1, 2); + TileObjectData.newTile.CoordinateHeights = new int[3] + { + 16, + 16, + 16 + }; + TileObjectData.addTile(489); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.StyleWrapLimit = 7; + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(7); + TileObjectData.addTile(349); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.addTile(337); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(560); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.AnchorBottom = new AnchorData(); + TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide | AnchorType.SolidBottom, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.DrawYOffset = -2; + TileObjectData.addTile(465); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.AnchorBottom = new AnchorData(); + TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide | AnchorType.SolidBottom, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.LavaDeath = true; + TileObjectData.addTile(531); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.addTile(320); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.addTile(456); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(new Func(TETrainingDummy.Hook_AfterPlacement), -1, 0, false); + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newTile.StyleMultiplier = 2; + TileObjectData.newTile.StyleWrapLimit = 2; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + TileObjectData.addTile(378); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.StyleWrapLimit = 55; + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(165); + TileObjectData.addTile(105); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.newTile.Origin = new Point16(0, 2); + TileObjectData.newTile.RandomStyleRange = 2; + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newTile.StyleWrapLimit = 2; + TileObjectData.newTile.StyleMultiplier = 2; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(2); + TileObjectData.addTile(545); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.Height = 5; + TileObjectData.newTile.Origin = new Point16(0, 4); + TileObjectData.newTile.CoordinateHeights = new int[5] + { + 16, + 16, + 16, + 16, + 16 + }; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(17); + TileObjectData.addTile(104); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.newTile.Origin = new Point16(0, 2); + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + TileObjectData.newTile.LavaDeath = true; + TileObjectData.addTile(128); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.newTile.Origin = new Point16(0, 2); + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + TileObjectData.addTile(506); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.newTile.Origin = new Point16(0, 2); + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + TileObjectData.newTile.LavaDeath = true; + TileObjectData.addTile(269); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.Origin = new Point16(0, 2); + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newTile.DrawStyleOffset = 4; + TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(new Func(TEDisplayDoll.Hook_AfterPlacement), -1, 0, false); + TileObjectData.newTile.AnchorInvalidTiles = new int[3] + { + (int) sbyte.MaxValue, + 138, + 484 + }; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + TileObjectData.addTile(470); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.AnchorBottom = new AnchorData(); + TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide | AnchorType.SolidBottom, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.DrawYOffset = -2; + TileObjectData.addTile(591); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.AnchorBottom = new AnchorData(); + TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide | AnchorType.SolidBottom, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.DrawYOffset = -2; + TileObjectData.addTile(592); + TileObjectData.newTile.Width = 3; + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(1, 2); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[3] + { + 16, + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.addBaseTile(out TileObjectData.Style3x3); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.Height = 6; + TileObjectData.newTile.Origin = new Point16(1, 5); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.CoordinateHeights = new int[6] + { + 16, + 16, + 16, + 16, + 16, + 16 + }; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(7); + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(8); + TileObjectData.addTile(548); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.Height = 5; + TileObjectData.newTile.Origin = new Point16(1, 4); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.CoordinateHeights = new int[5] + { + 16, + 16, + 16, + 16, + 16 + }; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.addTile(613); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.Height = 6; + TileObjectData.newTile.Origin = new Point16(1, 5); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.CoordinateHeights = new int[6] + { + 16, + 16, + 16, + 16, + 16, + 16 + }; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.addTile(614); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.Origin = new Point16(1, 0); + TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 1, 1); + TileObjectData.newTile.AnchorBottom = AnchorData.Empty; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.StyleWrapLimit = 37; + TileObjectData.newTile.StyleHorizontal = false; + TileObjectData.newTile.StyleLineSkip = 2; + TileObjectData.newTile.DrawYOffset = -2; + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(32); + TileObjectData.addTile(34); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.Width = 4; + TileObjectData.newTile.Origin = new Point16(2, 0); + TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 1, 1); + TileObjectData.newTile.AnchorBottom = AnchorData.Empty; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.DrawYOffset = -2; + TileObjectData.addTile(454); + TileObjectData.newTile.Width = 3; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(1, 1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.addBaseTile(out TileObjectData.Style3x2); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.newSubTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(13); + TileObjectData.newSubTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newSubTile.Height = 1; + TileObjectData.newSubTile.Origin = new Point16(1, 0); + TileObjectData.newSubTile.CoordinateHeights = new int[1] + { + 16 + }; + TileObjectData.addSubTile(25); + TileObjectData.addTile(14); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.addTile(469); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.StyleWrapLimitVisualOverride = new int?(37); + TileObjectData.newTile.HookCheckIfCanPlace = new PlacementHook(new Func(Chest.FindEmptyChest), -1, 0, true); + TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(new Func(Chest.AfterPlacement_Hook), -1, 0, false); + TileObjectData.newTile.AnchorInvalidTiles = new int[3] + { + (int) sbyte.MaxValue, + 138, + 484 + }; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(9); + TileObjectData.addTile(88); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addTile(237); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(244); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.addTile(26); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.addTile(86); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(377); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.StyleWrapLimitVisualOverride = new int?(37); + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(15); + TileObjectData.addTile(87); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.addTile(486); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(488); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.StyleWrapLimitVisualOverride = new int?(37); + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(10); + TileObjectData.addTile(89); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(114); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(186); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.StyleWrapLimit = 35; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(187); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.AnchorValidTiles = new int[4] + { + 53, + 112, + 234, + 116 + }; + TileObjectData.newTile.WaterDeath = true; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.WaterPlacement = LiquidPlacement.NotAllowed; + TileObjectData.newTile.LavaPlacement = LiquidPlacement.NotAllowed; + TileObjectData.newTile.RandomStyleRange = 4; + TileObjectData.addTile(552); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.StyleWrapLimit = 14; + TileObjectData.newTile.WaterPlacement = LiquidPlacement.NotAllowed; + TileObjectData.newTile.LavaPlacement = LiquidPlacement.NotAllowed; + TileObjectData.newTile.WaterDeath = true; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.WaterDeath = false; + TileObjectData.newSubTile.WaterPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(1); + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.WaterDeath = false; + TileObjectData.newSubTile.WaterPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(4); + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.WaterDeath = false; + TileObjectData.newSubTile.WaterPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(9); + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.WaterDeath = false; + TileObjectData.newSubTile.WaterPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(1 + TileObjectData.newTile.StyleWrapLimit); + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.WaterDeath = false; + TileObjectData.newSubTile.WaterPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(4 + TileObjectData.newTile.StyleWrapLimit); + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.WaterDeath = false; + TileObjectData.newSubTile.WaterPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(9 + TileObjectData.newTile.StyleWrapLimit); + TileObjectData.addTile(215); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(217); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(218); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.addTile(17); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(77); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(133); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.addTile(405); + TileObjectData.newTile.Width = 3; + TileObjectData.newTile.Height = 1; + TileObjectData.newTile.Origin = new Point16(1, 0); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.addTile(235); + TileObjectData.newTile.Width = 3; + TileObjectData.newTile.Height = 4; + TileObjectData.newTile.Origin = new Point16(1, 3); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[4] + { + 16, + 16, + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.addBaseTile(out TileObjectData.Style3x4); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x4); + TileObjectData.newTile.StyleWrapLimitVisualOverride = new int?(37); + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(4); + TileObjectData.addTile(101); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x4); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(102); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x4); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(463); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x4); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(new Func(TEHatRack.Hook_AfterPlacement), -1, 0, false); + TileObjectData.newTile.AnchorInvalidTiles = new int[3] + { + (int) sbyte.MaxValue, + 138, + 484 + }; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + TileObjectData.addTile(475); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x4); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.HookCheckIfCanPlace = new PlacementHook(new Func(TETeleportationPylon.PlacementPreviewHook_CheckIfCanPlace), 1, 0, true); + TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(new Func(TETeleportationPylon.PlacementPreviewHook_AfterPlacement), -1, 0, false); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.addTile(597); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x4); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newTile.StyleHorizontal = false; + TileObjectData.newTile.StyleWrapLimitVisualOverride = new int?(2); + TileObjectData.newTile.StyleMultiplier = 2; + TileObjectData.newTile.StyleWrapLimit = 2; + TileObjectData.newTile.styleLineSkipVisualOverride = new int?(0); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + TileObjectData.addTile(617); + TileObjectData.newTile.Width = 2; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.addBaseTile(out TileObjectData.Style2x2); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.newTile.HookCheckIfCanPlace = new PlacementHook(new Func(Chest.FindEmptyChest), -1, 0, true); + TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(new Func(Chest.AfterPlacement_Hook), -1, 0, false); + TileObjectData.newTile.AnchorInvalidTiles = new int[3] + { + (int) sbyte.MaxValue, + 138, + 484 + }; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.addTile(21); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.newTile.HookCheckIfCanPlace = new PlacementHook(new Func(Chest.FindEmptyChest), -1, 0, true); + TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(new Func(Chest.AfterPlacement_Hook), -1, 0, false); + TileObjectData.newTile.AnchorInvalidTiles = new int[3] + { + (int) sbyte.MaxValue, + 138, + 484 + }; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.addTile(467); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.newTile.AnchorInvalidTiles = new int[3] + { + (int) sbyte.MaxValue, + 138, + 484 + }; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.addTile(441); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.newTile.AnchorInvalidTiles = new int[3] + { + (int) sbyte.MaxValue, + 138, + 484 + }; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.addTile(468); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.StyleWrapLimit = 6; + TileObjectData.newTile.StyleMultiplier = 6; + TileObjectData.newTile.RandomStyleRange = 6; + TileObjectData.newTile.AnchorValidTiles = new int[4] + { + 2, + 477, + 109, + 492 + }; + TileObjectData.addTile(254); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.addTile(96); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.StyleWrapLimit = 4; + TileObjectData.newTile.StyleMultiplier = 1; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.AnchorValidTiles = Utils.GetTrueIndexes(TileID.Sets.Conversion.Sand, TileID.Sets.Conversion.Sandstone, TileID.Sets.Conversion.HardenedSand).ToArray(); + TileObjectData.addTile(485); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.RandomStyleRange = 5; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.addTile(457); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.addTile(490); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.StyleWrapLimitVisualOverride = new int?(56); + TileObjectData.newTile.styleLineSkipVisualOverride = new int?(2); + TileObjectData.addTile(139); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.RandomStyleRange = 9; + TileObjectData.addTile(35); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Origin = new Point16(1, 0); + TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newTile.AnchorBottom = AnchorData.Empty; + TileObjectData.newTile.DrawYOffset = -2; + TileObjectData.addTile(95); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Origin = new Point16(1, 0); + TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newTile.AnchorBottom = AnchorData.Empty; + TileObjectData.newTile.DrawYOffset = -2; + TileObjectData.addTile(126); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Origin = new Point16(1, 0); + TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newTile.AnchorBottom = AnchorData.Empty; + TileObjectData.newTile.DrawYOffset = -2; + TileObjectData.addTile(444); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.WaterDeath = true; + TileObjectData.addTile(98); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(13); + TileObjectData.addTile(172); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(94); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(411); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(97); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(99); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(25); + TileObjectData.addTile(100); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(125); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(621); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(622); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(173); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(287); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(319); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(287); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.addTile(376); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(138); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 16 + }; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.addTile(484); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(142); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(143); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(282); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(543); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(598); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(568); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(569); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(570); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(288); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(289); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(290); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(291); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(292); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(293); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(294); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(295); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(316); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(317); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(318); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(360); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(580); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(620); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(565); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(521); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(522); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(523); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(524); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(525); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(526); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(527); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(505); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(358); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(359); + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(542); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(361); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(362); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(363); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(364); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(544); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(391); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(392); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(393); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSmallCage); + TileObjectData.addTile(394); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(287); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(335); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(564); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(594); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(354); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(355); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(491); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX); + TileObjectData.addTile(356); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.AnchorBottom = AnchorData.Empty; + TileObjectData.newTile.AnchorLeft = new AnchorData(AnchorType.SolidTile, 1, 1); + TileObjectData.newTile.AnchorRight = new AnchorData(AnchorType.SolidTile, 1, 1); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.addTile(386); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.newAlternate.AnchorWall = true; + TileObjectData.addAlternate(2); + TileObjectData.addTile(132); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = Point16.Zero; + TileObjectData.newAlternate.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(0, 0); + TileObjectData.newAlternate.AnchorLeft = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(2); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(1, 0); + TileObjectData.newAlternate.AnchorRight = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(3); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = Point16.Zero; + TileObjectData.newAlternate.AnchorWall = true; + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(4); + TileObjectData.addTile(55); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = Point16.Zero; + TileObjectData.newAlternate.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(0, 0); + TileObjectData.newAlternate.AnchorLeft = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(2); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(1, 0); + TileObjectData.newAlternate.AnchorRight = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(3); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = Point16.Zero; + TileObjectData.newAlternate.AnchorWall = true; + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(4); + TileObjectData.addTile(573); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = Point16.Zero; + TileObjectData.newAlternate.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(0, 0); + TileObjectData.newAlternate.AnchorLeft = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(2); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(1, 0); + TileObjectData.newAlternate.AnchorRight = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(3); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = Point16.Zero; + TileObjectData.newAlternate.AnchorWall = true; + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(4); + TileObjectData.addTile(425); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = Point16.Zero; + TileObjectData.newAlternate.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(0, 0); + TileObjectData.newAlternate.AnchorLeft = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(2); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(1, 0); + TileObjectData.newAlternate.AnchorRight = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(3); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = Point16.Zero; + TileObjectData.newAlternate.AnchorWall = true; + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(4); + TileObjectData.addTile(510); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = Point16.Zero; + TileObjectData.newAlternate.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(0, 0); + TileObjectData.newAlternate.AnchorLeft = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(2); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(1, 0); + TileObjectData.newAlternate.AnchorRight = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(3); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = Point16.Zero; + TileObjectData.newAlternate.AnchorWall = true; + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(4); + TileObjectData.addTile(511); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(85); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(new Func(TEItemFrame.Hook_AfterPlacement), -1, 0, true); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = Point16.Zero; + TileObjectData.newAlternate.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(0, 0); + TileObjectData.newAlternate.AnchorLeft = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(2); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(1, 0); + TileObjectData.newAlternate.AnchorRight = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, 2, 0); + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(3); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = Point16.Zero; + TileObjectData.newAlternate.AnchorWall = true; + TileObjectData.newAlternate.AnchorBottom = AnchorData.Empty; + TileObjectData.addAlternate(4); + TileObjectData.addTile(395); + TileObjectData.newTile.Width = 3; + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(1, 2); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[3] + { + 16, + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.addBaseTile(out TileObjectData.Style3x3); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.addTile(106); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + TileObjectData.addTile(212); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(219); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(220); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(228); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(231); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(243); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(247); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(283); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(300); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(301); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(302); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(303); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(304); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(305); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(306); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(307); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(308); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.addTile(406); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.addTile(452); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(412); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(455); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(499); + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.addBaseTile(out TileObjectData.Style1x2); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2); + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newTile.StyleWrapLimit = 2; + TileObjectData.newTile.StyleMultiplier = 2; + TileObjectData.newTile.CoordinatePaddingFix = new Point16(0, 2); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LinkedAlternates = true; + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(16); + TileObjectData.addTile(15); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2); + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newTile.StyleWrapLimit = 2; + TileObjectData.newTile.StyleMultiplier = 2; + TileObjectData.newTile.CoordinatePaddingFix = new Point16(0, 2); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LinkedAlternates = true; + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(14); + TileObjectData.addTile(497); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2); + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 20 + }; + TileObjectData.addTile(216); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.addTile(390); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2); + TileObjectData.addTile(338); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.StyleWrapLimit = 6; + TileObjectData.newTile.DrawStyleOffset = 13 * TileObjectData.newTile.StyleWrapLimit; + TileObjectData.addTile(493); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2); + TileObjectData.newTile.RandomStyleRange = 5; + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 18, + 18 + }; + TileObjectData.newTile.CoordinateWidth = 26; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.DrawFlipHorizontal = true; + TileObjectData.addTile(567); + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 1; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.addBaseTile(out TileObjectData.Style1x1); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.None, 0, 0); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(420); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 18 + }; + TileObjectData.newTile.CoordinateWidth = 20; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(476); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.AlternateTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.AnchorAlternateTiles = new int[2] + { + 420, + 419 + }; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Origin = new Point16(0, 1); + TileObjectData.newAlternate.AnchorAlternateTiles = new int[1] + { + 419 + }; + TileObjectData.addTile(419); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.None, 0, 0); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(new Func(TELogicSensor.Hook_AfterPlacement), -1, 0, true); + TileObjectData.addTile(423); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.None, 0, 0); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(424); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.None, 0, 0); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(445); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.None, 0, 0); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(429); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); + TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.EmptyTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.DrawFlipHorizontal = true; + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 26 + }; + TileObjectData.newTile.CoordinateWidth = 24; + TileObjectData.newTile.DrawYOffset = -8; + TileObjectData.newTile.RandomStyleRange = 6; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.addTile(81); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 18 + }; + TileObjectData.newTile.CoordinatePadding = 0; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(135); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 18 + }; + TileObjectData.newTile.CoordinatePadding = 0; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(428); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); + TileObjectData.newTile.RandomStyleRange = 2; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(141); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(144); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(210); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.addTile(239); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.RandomStyleRange = 7; + TileObjectData.addTile(36); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.DrawFlipHorizontal = true; + TileObjectData.newTile.RandomStyleRange = 3; + TileObjectData.newTile.StyleMultiplier = 3; + TileObjectData.newTile.StyleWrapLimit = 3; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 20 + }; + TileObjectData.newTile.CoordinateWidth = 20; + TileObjectData.newTile.DrawYOffset = -2; + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.addTile(324); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.addTile(593); + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 1; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.FlattenAnchors = true; + TileObjectData.addBaseTile(out TileObjectData.StyleSwitch); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleSwitch); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newAlternate.CopyFrom(TileObjectData.StyleSwitch); + TileObjectData.newAlternate.AnchorLeft = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide | AnchorType.Tree | AnchorType.AlternateTile, TileObjectData.newTile.Height, 0); + TileObjectData.newAlternate.AnchorAlternateTiles = new int[7] + { + 124, + 561, + 574, + 575, + 576, + 577, + 578 + }; + TileObjectData.newAlternate.DrawXOffset = -2; + TileObjectData.addAlternate(1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.StyleSwitch); + TileObjectData.newAlternate.AnchorRight = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide | AnchorType.Tree | AnchorType.AlternateTile, TileObjectData.newTile.Height, 0); + TileObjectData.newAlternate.AnchorAlternateTiles = new int[7] + { + 124, + 561, + 574, + 575, + 576, + 577, + 578 + }; + TileObjectData.newAlternate.DrawXOffset = 2; + TileObjectData.addAlternate(2); + TileObjectData.newAlternate.CopyFrom(TileObjectData.StyleSwitch); + TileObjectData.newAlternate.AnchorWall = true; + TileObjectData.addAlternate(3); + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(136); + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 1; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.FlattenAnchors = true; + TileObjectData.newTile.UsesCustomCanPlace = false; + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 20 + }; + TileObjectData.newTile.DrawStepDown = 2; + TileObjectData.newTile.CoordinateWidth = 20; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.StyleMultiplier = 6; + TileObjectData.newTile.StyleWrapLimit = 6; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.WaterPlacement = LiquidPlacement.NotAllowed; + TileObjectData.newTile.LavaPlacement = LiquidPlacement.NotAllowed; + TileObjectData.newTile.WaterDeath = true; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.addBaseTile(out TileObjectData.StyleTorch); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleTorch); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newAlternate.CopyFrom(TileObjectData.StyleTorch); + TileObjectData.newAlternate.AnchorLeft = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide | AnchorType.Tree | AnchorType.AlternateTile, TileObjectData.newTile.Height, 0); + TileObjectData.newAlternate.AnchorAlternateTiles = new int[7] + { + 124, + 561, + 574, + 575, + 576, + 577, + 578 + }; + TileObjectData.addAlternate(1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.StyleTorch); + TileObjectData.newAlternate.AnchorRight = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide | AnchorType.Tree | AnchorType.AlternateTile, TileObjectData.newTile.Height, 0); + TileObjectData.newAlternate.AnchorAlternateTiles = new int[7] + { + 124, + 561, + 574, + 575, + 576, + 577, + 578 + }; + TileObjectData.addAlternate(2); + TileObjectData.newAlternate.CopyFrom(TileObjectData.StyleTorch); + TileObjectData.newAlternate.AnchorWall = true; + TileObjectData.addAlternate(0); + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LinkedAlternates = true; + TileObjectData.newSubTile.WaterDeath = false; + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.WaterPlacement = LiquidPlacement.Allowed; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(8); + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LinkedAlternates = true; + TileObjectData.newSubTile.WaterDeath = false; + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.WaterPlacement = LiquidPlacement.Allowed; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(11); + TileObjectData.newSubTile.CopyFrom(TileObjectData.newTile); + TileObjectData.newSubTile.LinkedAlternates = true; + TileObjectData.newSubTile.WaterDeath = false; + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.newSubTile.WaterPlacement = LiquidPlacement.Allowed; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(17); + TileObjectData.addTile(4); + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 1; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.FlattenAnchors = true; + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 20 + }; + TileObjectData.newTile.DrawStepDown = 2; + TileObjectData.newTile.CoordinateWidth = 20; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.WaterDeath = false; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.StyleWrapLimit = 4; + TileObjectData.newTile.StyleMultiplier = 4; + TileObjectData.newTile.HookCheckIfCanPlace = new PlacementHook(new Func(WorldGen.CanPlaceProjectilePressurePad), -1, 0, true); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide | AnchorType.Tree | AnchorType.AlternateTile | AnchorType.EmptyTile | AnchorType.SolidBottom, TileObjectData.newTile.Width, 0); + TileObjectData.newAlternate.DrawStepDown = 0; + TileObjectData.newAlternate.DrawYOffset = -4; + TileObjectData.addAlternate(1); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.AnchorLeft = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide | AnchorType.Tree | AnchorType.AlternateTile | AnchorType.EmptyTile | AnchorType.SolidBottom, TileObjectData.newTile.Height, 0); + TileObjectData.newAlternate.AnchorAlternateTiles = new int[7] + { + 124, + 561, + 574, + 575, + 576, + 577, + 578 + }; + TileObjectData.newAlternate.DrawXOffset = -2; + TileObjectData.newAlternate.DrawYOffset = -2; + TileObjectData.addAlternate(2); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.AnchorRight = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide | AnchorType.Tree | AnchorType.AlternateTile | AnchorType.EmptyTile | AnchorType.SolidBottom, TileObjectData.newTile.Height, 0); + TileObjectData.newAlternate.AnchorAlternateTiles = new int[7] + { + 124, + 561, + 574, + 575, + 576, + 577, + 578 + }; + TileObjectData.newAlternate.DrawXOffset = 2; + TileObjectData.newAlternate.DrawYOffset = -2; + TileObjectData.addAlternate(3); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide | AnchorType.Tree | AnchorType.AlternateTile | AnchorType.EmptyTile | AnchorType.SolidBottom, TileObjectData.newTile.Width, 0); + TileObjectData.addTile(442); + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 1; + TileObjectData.newTile.Origin = Point16.Zero; + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[1] + { + 20 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.DrawYOffset = -1; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.AlternateTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.WaterPlacement = LiquidPlacement.NotAllowed; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.LavaPlacement = LiquidPlacement.NotAllowed; + TileObjectData.addBaseTile(out TileObjectData.StyleAlch); + TileObjectData.newTile.CopyFrom(TileObjectData.StyleAlch); + TileObjectData.newTile.AnchorValidTiles = new int[4] + { + 2, + 477, + 109, + 492 + }; + TileObjectData.newTile.AnchorAlternateTiles = new int[1] + { + 78 + }; + TileObjectData.newSubTile.CopyFrom(TileObjectData.StyleAlch); + TileObjectData.newSubTile.AnchorValidTiles = new int[1] + { + 60 + }; + TileObjectData.newSubTile.AnchorAlternateTiles = new int[1] + { + 78 + }; + TileObjectData.addSubTile(1); + TileObjectData.newSubTile.CopyFrom(TileObjectData.StyleAlch); + TileObjectData.newSubTile.AnchorValidTiles = new int[2] + { + 0, + 59 + }; + TileObjectData.newSubTile.AnchorAlternateTiles = new int[1] + { + 78 + }; + TileObjectData.addSubTile(2); + TileObjectData.newSubTile.CopyFrom(TileObjectData.StyleAlch); + TileObjectData.newSubTile.AnchorValidTiles = new int[4] + { + 199, + 203, + 25, + 23 + }; + TileObjectData.newSubTile.AnchorAlternateTiles = new int[1] + { + 78 + }; + TileObjectData.addSubTile(3); + TileObjectData.newSubTile.CopyFrom(TileObjectData.StyleAlch); + TileObjectData.newSubTile.AnchorValidTiles = new int[2] + { + 53, + 116 + }; + TileObjectData.newSubTile.AnchorAlternateTiles = new int[1] + { + 78 + }; + TileObjectData.newSubTile.WaterPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(4); + TileObjectData.newSubTile.CopyFrom(TileObjectData.StyleAlch); + TileObjectData.newSubTile.AnchorValidTiles = new int[1] + { + 57 + }; + TileObjectData.newSubTile.AnchorAlternateTiles = new int[1] + { + 78 + }; + TileObjectData.newSubTile.LavaPlacement = LiquidPlacement.Allowed; + TileObjectData.newSubTile.LavaDeath = false; + TileObjectData.addSubTile(5); + TileObjectData.newSubTile.CopyFrom(TileObjectData.StyleAlch); + TileObjectData.newSubTile.AnchorValidTiles = new int[5] + { + 147, + 161, + 163, + 164, + 200 + }; + TileObjectData.newSubTile.AnchorAlternateTiles = new int[1] + { + 78 + }; + TileObjectData.newSubTile.WaterPlacement = LiquidPlacement.Allowed; + TileObjectData.addSubTile(6); + TileObjectData.addTile(82); + TileObjectData.newTile.FullCopyFrom((ushort) 82); + TileObjectData.addTile(83); + TileObjectData.newTile.FullCopyFrom((ushort) 83); + TileObjectData.addTile(84); + TileObjectData.newTile.Width = 3; + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(1, 1); + TileObjectData.newTile.AnchorWall = true; + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[3] + { + 16, + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.addBaseTile(out TileObjectData.Style3x3Wall); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3Wall); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.StyleWrapLimit = 36; + TileObjectData.addTile(240); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3Wall); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.StyleWrapLimit = 36; + TileObjectData.addTile(440); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3Wall); + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + TileObjectData.addTile(334); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3Wall); + TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(new Func(TEWeaponsRack.Hook_AfterPlacement), -1, 0, true); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + TileObjectData.addAlternate(1); + TileObjectData.addTile(471); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3Wall); + TileObjectData.newTile.Width = 2; + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.addTile(245); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3Wall); + TileObjectData.newTile.Width = 3; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(1, 0); + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 16 + }; + TileObjectData.addTile(246); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3Wall); + TileObjectData.newTile.Width = 4; + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(1, 1); + TileObjectData.newTile.RandomStyleRange = 9; + TileObjectData.addTile(241); + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3Wall); + TileObjectData.newTile.Width = 6; + TileObjectData.newTile.Height = 4; + TileObjectData.newTile.Origin = new Point16(2, 2); + TileObjectData.newTile.CoordinateHeights = new int[4] + { + 16, + 16, + 16, + 16 + }; + TileObjectData.newTile.StyleWrapLimit = 27; + TileObjectData.addTile(242); + TileObjectData.newTile.Width = 2; + TileObjectData.newTile.Height = 4; + TileObjectData.newTile.Origin = new Point16(0, 3); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[4] + { + 16, + 16, + 16, + 18 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.AnchorValidTiles = new int[5] + { + 2, + 477, + 109, + 60, + 492 + }; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.RandomStyleRange = 3; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.WaterPlacement = LiquidPlacement.NotAllowed; + TileObjectData.addTile(27); + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.AnchorValidTiles = new int[2] + { + 2, + 477 + }; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.DrawFlipHorizontal = true; + TileObjectData.newTile.WaterPlacement = LiquidPlacement.NotAllowed; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.RandomStyleRange = 3; + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.AnchorValidTiles = new int[1] + { + 147 + }; + TileObjectData.addAlternate(3); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.AnchorValidTiles = new int[1] + { + 60 + }; + TileObjectData.addAlternate(6); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.AnchorValidTiles = new int[1] + { + 23 + }; + TileObjectData.addAlternate(9); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.AnchorValidTiles = new int[1] + { + 199 + }; + TileObjectData.addAlternate(12); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.AnchorValidTiles = new int[2] + { + 109, + 492 + }; + TileObjectData.addAlternate(15); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.AnchorValidTiles = new int[1] + { + 53 + }; + TileObjectData.addAlternate(18); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.AnchorValidTiles = new int[1] + { + 116 + }; + TileObjectData.addAlternate(21); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.AnchorValidTiles = new int[1] + { + 234 + }; + TileObjectData.addAlternate(24); + TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + TileObjectData.newAlternate.AnchorValidTiles = new int[1] + { + 112 + }; + TileObjectData.addAlternate(27); + TileObjectData.addTile(20); + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.AnchorValidTiles = new int[14] + { + 1, + 25, + 117, + 203, + 539, + 182, + 180, + 179, + 381, + 183, + 181, + 534, + 536, + 539 + }; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.DrawFlipHorizontal = true; + TileObjectData.newTile.WaterPlacement = LiquidPlacement.NotAllowed; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.RandomStyleRange = 3; + TileObjectData.newTile.StyleMultiplier = 3; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.addTile(590); + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.AnchorValidTiles = new int[7] + { + 2, + 477, + 492, + 60, + 109, + 199, + 23 + }; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.DrawFlipHorizontal = true; + TileObjectData.newTile.WaterPlacement = LiquidPlacement.NotAllowed; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.RandomStyleRange = 3; + TileObjectData.newTile.StyleMultiplier = 3; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.addTile(595); + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[2] + { + 16, + 18 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.AnchorValidTiles = new int[7] + { + 2, + 477, + 492, + 60, + 109, + 199, + 23 + }; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.DrawFlipHorizontal = true; + TileObjectData.newTile.WaterPlacement = LiquidPlacement.NotAllowed; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.RandomStyleRange = 3; + TileObjectData.newTile.StyleMultiplier = 3; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.addTile(615); + TileObjectData.readOnlyData = true; + } + + public static bool CustomPlace(int type, int style) + { + if (type < 0 || type >= TileObjectData._data.Count || style < 0) + return false; + TileObjectData tileObjectData1 = TileObjectData._data[type]; + if (tileObjectData1 == null) + return false; + List subTiles = tileObjectData1.SubTiles; + if (subTiles != null && style < subTiles.Count) + { + TileObjectData tileObjectData2 = subTiles[style]; + if (tileObjectData2 != null) + return tileObjectData2._usesCustomCanPlace; + } + return tileObjectData1._usesCustomCanPlace; + } + + public static bool CheckLiquidPlacement(int type, int style, Tile checkTile) + { + TileObjectData tileData = TileObjectData.GetTileData(type, style); + return tileData != null ? tileData.LiquidPlace(checkTile) : TileObjectData.LiquidPlace(type, checkTile); + } + + public static bool LiquidPlace(int type, Tile checkTile) + { + if (checkTile == null) + return false; + if (checkTile.liquid > (byte) 0) + { + switch (checkTile.liquidType()) + { + case 0: + case 2: + if (Main.tileWaterDeath[type]) + return false; + break; + case 1: + if (Main.tileLavaDeath[type]) + return false; + break; + } + } + return true; + } + + public static bool CheckWaterDeath(int type, int style) + { + TileObjectData tileData = TileObjectData.GetTileData(type, style); + return tileData == null ? Main.tileWaterDeath[type] : tileData.WaterDeath; + } + + public static bool CheckWaterDeath(Tile checkTile) + { + if (!checkTile.active()) + return false; + TileObjectData tileData = TileObjectData.GetTileData(checkTile); + return tileData == null ? Main.tileWaterDeath[(int) checkTile.type] : tileData.WaterDeath; + } + + public static bool CheckLavaDeath(int type, int style) + { + TileObjectData tileData = TileObjectData.GetTileData(type, style); + return tileData == null ? Main.tileLavaDeath[type] : tileData.LavaDeath; + } + + public static bool CheckLavaDeath(Tile checkTile) + { + if (!checkTile.active()) + return false; + TileObjectData tileData = TileObjectData.GetTileData(checkTile); + return tileData == null ? Main.tileLavaDeath[(int) checkTile.type] : tileData.LavaDeath; + } + + public static int PlatformFrameWidth() => TileObjectData._data[19].CoordinateFullWidth; + + public static TileObjectData GetTileData(int type, int style, int alternate = 0) + { + if (type < 0 || type >= TileObjectData._data.Count) + throw new ArgumentOutOfRangeException("Function called with a bad type argument"); + if (style < 0) + throw new ArgumentOutOfRangeException("Function called with a bad style argument"); + TileObjectData tileObjectData1 = TileObjectData._data[type]; + if (tileObjectData1 == null) + return (TileObjectData) null; + List subTiles = tileObjectData1.SubTiles; + if (subTiles != null && style < subTiles.Count) + { + TileObjectData tileObjectData2 = subTiles[style]; + if (tileObjectData2 != null) + tileObjectData1 = tileObjectData2; + } + --alternate; + List alternates = tileObjectData1.Alternates; + if (alternates != null && alternate >= 0 && alternate < alternates.Count) + { + TileObjectData tileObjectData3 = alternates[alternate]; + if (tileObjectData3 != null) + tileObjectData1 = tileObjectData3; + } + return tileObjectData1; + } + + public static TileObjectData GetTileData(Tile getTile) + { + if (getTile == null || !getTile.active()) + return (TileObjectData) null; + int type = (int) getTile.type; + if (type < 0 || type >= TileObjectData._data.Count) + throw new ArgumentOutOfRangeException("Function called with a bad tile type"); + TileObjectData tileObjectData = TileObjectData._data[type]; + if (tileObjectData == null) + return (TileObjectData) null; + int num1 = (int) getTile.frameX / tileObjectData.CoordinateFullWidth; + int num2 = (int) getTile.frameY / tileObjectData.CoordinateFullHeight; + int num3 = tileObjectData.StyleWrapLimit; + if (num3 == 0) + num3 = 1; + int num4 = !tileObjectData.StyleHorizontal ? num1 * num3 + num2 : num2 * num3 + num1; + int index1 = num4 / tileObjectData.StyleMultiplier; + int num5 = num4 % tileObjectData.StyleMultiplier; + if (tileObjectData.SubTiles != null && index1 >= 0 && index1 < tileObjectData.SubTiles.Count) + { + TileObjectData subTile = tileObjectData.SubTiles[index1]; + if (subTile != null) + tileObjectData = subTile; + } + if (tileObjectData._alternates != null) + { + for (int index2 = 0; index2 < tileObjectData.Alternates.Count; ++index2) + { + TileObjectData alternate = tileObjectData.Alternates[index2]; + if (alternate != null && num5 >= alternate.Style && num5 <= alternate.Style + alternate.RandomStyleRange) + return alternate; + } + } + return tileObjectData; + } + + public static void SyncObjectPlacement(int tileX, int tileY, int type, int style, int dir) + { + NetMessage.SendData(17, number: 1, number2: ((float) tileX), number3: ((float) tileY), number4: ((float) type), number5: style); + TileObjectData.GetTileData(type, style); + } + + public static bool CallPostPlacementPlayerHook( + int tileX, + int tileY, + int type, + int style, + int dir, + int alternate, + TileObject data) + { + TileObjectData tileData = TileObjectData.GetTileData(type, style, data.alternate); + if (tileData == null || tileData._placementHooks == null || tileData._placementHooks.postPlaceMyPlayer.hook == null) + return false; + PlacementHook postPlaceMyPlayer = tileData._placementHooks.postPlaceMyPlayer; + if (postPlaceMyPlayer.processedCoordinates) + { + tileX -= (int) tileData.Origin.X; + tileY -= (int) tileData.Origin.Y; + } + return postPlaceMyPlayer.hook(tileX, tileY, type, style, dir, data.alternate) == postPlaceMyPlayer.badReturn; + } + + public static void OriginToTopLeft(int type, int style, ref Point16 baseCoords) + { + TileObjectData tileData = TileObjectData.GetTileData(type, style); + if (tileData == null) + return; + baseCoords = new Point16((int) baseCoords.X - (int) tileData.Origin.X, (int) baseCoords.Y - (int) tileData.Origin.Y); + } + } +} diff --git a/PartyHatColor.cs b/PartyHatColor.cs new file mode 100644 index 0000000..eba4de5 --- /dev/null +++ b/PartyHatColor.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.PartyHatColor +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria +{ + public enum PartyHatColor + { + None = 0, + Blue = 1, + Pink = 2, + Cyan = 3, + Purple = 4, + Count = 5, + White = 5, + } +} diff --git a/Physics/BallCollision.cs b/Physics/BallCollision.cs new file mode 100644 index 0000000..6bbaafe --- /dev/null +++ b/Physics/BallCollision.cs @@ -0,0 +1,371 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Physics.BallCollision +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Diagnostics; +using Terraria.DataStructures; + +namespace Terraria.Physics +{ + public static class BallCollision + { + public static BallStepResult Step( + PhysicsProperties physicsProperties, + Entity entity, + ref float entityAngularVelocity, + IBallContactListener listener) + { + Vector2 position = entity.position; + Vector2 velocity1 = entity.velocity; + Vector2 size = entity.Size; + float num1 = entityAngularVelocity; + float num2 = size.X * 0.5f; + float num3 = num1 * physicsProperties.Drag; + Vector2 vector2_1 = velocity1 * physicsProperties.Drag; + float num4 = vector2_1.Length(); + if ((double) num4 > 1000.0) + { + vector2_1 = 1000f * Vector2.Normalize(vector2_1); + num4 = 1000f; + } + int num5 = Math.Max(1, (int) Math.Ceiling((double) num4 / 2.0)); + float timeScale = 1f / (float) num5; + Vector2 velocity2 = vector2_1 * timeScale; + float angularVelocity = num3 * timeScale; + float num6 = physicsProperties.Gravity / (float) (num5 * num5); + bool flag = false; + for (int index = 0; index < num5; ++index) + { + velocity2.Y += num6; + BallPassThroughType type; + Tile tile; + if (BallCollision.CheckForPassThrough(position + size * 0.5f, out type, out tile)) + { + if (type == BallPassThroughType.Tile && Main.tileSolid[(int) tile.type] && !Main.tileSolidTop[(int) tile.type]) + { + velocity2 *= 0.0f; + angularVelocity *= 0.0f; + flag = true; + } + else + { + BallPassThroughEvent passThrough = new BallPassThroughEvent(timeScale, tile, entity, type); + listener.OnPassThrough(physicsProperties, ref position, ref velocity2, ref angularVelocity, ref passThrough); + } + } + position += velocity2; + if (!BallCollision.IsBallInWorld(position, size)) + return BallStepResult.OutOfBounds(); + Vector2 collisionPoint; + if (BallCollision.GetClosestEdgeToCircle(position, size, velocity2, out collisionPoint, out tile)) + { + Vector2 normal = Vector2.Normalize(position + size * 0.5f - collisionPoint); + position = collisionPoint + normal * (num2 + 0.0001f) - size * 0.5f; + BallCollisionEvent collision = new BallCollisionEvent(timeScale, normal, collisionPoint, tile, entity); + flag = true; + velocity2 = Vector2.Reflect(velocity2, collision.Normal); + listener.OnCollision(physicsProperties, ref position, ref velocity2, ref collision); + angularVelocity = (float) ((double) collision.Normal.X * (double) velocity2.Y - (double) collision.Normal.Y * (double) velocity2.X) / num2; + } + } + Vector2 vector2_2 = velocity2 / timeScale; + float num7 = angularVelocity / timeScale; + BallStepResult ballStepResult = BallStepResult.Moving(); + if (flag && (double) vector2_2.X > -0.00999999977648258 && (double) vector2_2.X < 0.00999999977648258 && (double) vector2_2.Y <= 0.0 && (double) vector2_2.Y > -(double) physicsProperties.Gravity) + ballStepResult = BallStepResult.Resting(); + entity.position = position; + entity.velocity = vector2_2; + entityAngularVelocity = num7; + return ballStepResult; + } + + private static bool CheckForPassThrough( + Vector2 center, + out BallPassThroughType type, + out Tile contactTile) + { + Point tileCoordinates = center.ToTileCoordinates(); + Tile tile = Main.tile[tileCoordinates.X, tileCoordinates.Y]; + contactTile = tile; + type = BallPassThroughType.None; + if (tile == null) + return false; + if (tile.nactive()) + { + type = BallPassThroughType.Tile; + return BallCollision.IsPositionInsideTile(center, tileCoordinates, tile); + } + if (tile.liquid <= (byte) 0) + return false; + float num = (float) ((double) (tileCoordinates.Y + 1) * 16.0 - (double) tile.liquid / (double) byte.MaxValue * 16.0); + switch (tile.liquidType()) + { + case 1: + type = BallPassThroughType.Lava; + break; + case 2: + type = BallPassThroughType.Honey; + break; + default: + type = BallPassThroughType.Water; + break; + } + return (double) num < (double) center.Y; + } + + private static bool IsPositionInsideTile(Vector2 position, Point tileCoordinates, Tile tile) + { + if (tile.slope() == (byte) 0 && !tile.halfBrick()) + return true; + Vector2 vector2 = position / 16f - new Vector2((float) tileCoordinates.X, (float) tileCoordinates.Y); + switch (tile.slope()) + { + case 0: + return (double) vector2.Y > 0.5; + case 1: + return (double) vector2.Y > (double) vector2.X; + case 2: + return (double) vector2.Y > 1.0 - (double) vector2.X; + case 3: + return (double) vector2.Y < 1.0 - (double) vector2.X; + case 4: + return (double) vector2.Y < (double) vector2.X; + default: + return false; + } + } + + private static bool IsBallInWorld(Vector2 position, Vector2 size) => (double) position.X > 32.0 && (double) position.Y > 32.0 && (double) position.X + (double) size.X < (double) Main.maxTilesX * 16.0 - 32.0 && (double) position.Y + (double) size.Y < (double) Main.maxTilesY * 16.0 - 32.0; + + private static bool GetClosestEdgeToCircle( + Vector2 position, + Vector2 size, + Vector2 velocity, + out Vector2 collisionPoint, + out Tile collisionTile) + { + Rectangle tileBounds = BallCollision.GetTileBounds(position, size); + Vector2 center = position + size * 0.5f; + BallCollision.TileEdges tileEdges1 = BallCollision.TileEdges.None; + BallCollision.TileEdges tileEdges2 = (double) velocity.Y >= 0.0 ? tileEdges1 | BallCollision.TileEdges.Top : tileEdges1 | BallCollision.TileEdges.Bottom; + BallCollision.TileEdges tileEdges3 = (double) velocity.X >= 0.0 ? tileEdges2 | BallCollision.TileEdges.Left : tileEdges2 | BallCollision.TileEdges.Right; + BallCollision.TileEdges tileEdges4 = (double) velocity.Y <= (double) velocity.X ? tileEdges3 | BallCollision.TileEdges.TopRightSlope : tileEdges3 | BallCollision.TileEdges.BottomLeftSlope; + BallCollision.TileEdges edgesToTest = (double) velocity.Y <= -(double) velocity.X ? tileEdges4 | BallCollision.TileEdges.TopLeftSlope : tileEdges4 | BallCollision.TileEdges.BottomRightSlope; + collisionPoint = Vector2.Zero; + collisionTile = (Tile) null; + float num1 = float.MaxValue; + Vector2 closestPointOut = new Vector2(); + float distanceSquaredOut = 0.0f; + for (int left = tileBounds.Left; left < tileBounds.Right; ++left) + { + for (int top = tileBounds.Top; top < tileBounds.Bottom; ++top) + { + if (BallCollision.GetCollisionPointForTile(edgesToTest, left, top, center, ref closestPointOut, ref distanceSquaredOut) && (double) distanceSquaredOut < (double) num1 && (double) Vector2.Dot(velocity, center - closestPointOut) <= 0.0) + { + num1 = distanceSquaredOut; + collisionPoint = closestPointOut; + collisionTile = Main.tile[left, top]; + } + } + } + float num2 = size.X / 2f; + return (double) num1 < (double) num2 * (double) num2; + } + + private static bool GetCollisionPointForTile( + BallCollision.TileEdges edgesToTest, + int x, + int y, + Vector2 center, + ref Vector2 closestPointOut, + ref float distanceSquaredOut) + { + Tile tile = Main.tile[x, y]; + if (tile == null || !tile.nactive() || !Main.tileSolid[(int) tile.type] && !Main.tileSolidTop[(int) tile.type] || !Main.tileSolid[(int) tile.type] && Main.tileSolidTop[(int) tile.type] && tile.frameY != (short) 0) + return false; + if (Main.tileSolidTop[(int) tile.type]) + edgesToTest &= BallCollision.TileEdges.Top | BallCollision.TileEdges.BottomLeftSlope | BallCollision.TileEdges.BottomRightSlope; + Vector2 tilePosition = new Vector2((float) x * 16f, (float) y * 16f); + bool flag = false; + LineSegment edge = new LineSegment(); + if (BallCollision.GetSlopeEdge(ref edgesToTest, tile, tilePosition, ref edge)) + { + closestPointOut = BallCollision.ClosestPointOnLineSegment(center, edge); + distanceSquaredOut = Vector2.DistanceSquared(closestPointOut, center); + flag = true; + } + if (BallCollision.GetTopOrBottomEdge(edgesToTest, x, y, tilePosition, ref edge)) + { + Vector2 vector2 = BallCollision.ClosestPointOnLineSegment(center, edge); + float num = Vector2.DistanceSquared(vector2, center); + if (!flag || (double) num < (double) distanceSquaredOut) + { + distanceSquaredOut = num; + closestPointOut = vector2; + } + flag = true; + } + if (BallCollision.GetLeftOrRightEdge(edgesToTest, x, y, tilePosition, ref edge)) + { + Vector2 vector2 = BallCollision.ClosestPointOnLineSegment(center, edge); + float num = Vector2.DistanceSquared(vector2, center); + if (!flag || (double) num < (double) distanceSquaredOut) + { + distanceSquaredOut = num; + closestPointOut = vector2; + } + flag = true; + } + return flag; + } + + private static bool GetSlopeEdge( + ref BallCollision.TileEdges edgesToTest, + Tile tile, + Vector2 tilePosition, + ref LineSegment edge) + { + switch (tile.slope()) + { + case 0: + return false; + case 1: + edgesToTest &= BallCollision.TileEdges.Bottom | BallCollision.TileEdges.Left | BallCollision.TileEdges.BottomLeftSlope; + if ((edgesToTest & BallCollision.TileEdges.BottomLeftSlope) == BallCollision.TileEdges.None) + return false; + edge.Start = tilePosition; + edge.End = new Vector2(tilePosition.X + 16f, tilePosition.Y + 16f); + return true; + case 2: + edgesToTest &= BallCollision.TileEdges.Bottom | BallCollision.TileEdges.Right | BallCollision.TileEdges.BottomRightSlope; + if ((edgesToTest & BallCollision.TileEdges.BottomRightSlope) == BallCollision.TileEdges.None) + return false; + edge.Start = new Vector2(tilePosition.X, tilePosition.Y + 16f); + edge.End = new Vector2(tilePosition.X + 16f, tilePosition.Y); + return true; + case 3: + edgesToTest &= BallCollision.TileEdges.Top | BallCollision.TileEdges.Left | BallCollision.TileEdges.TopLeftSlope; + if ((edgesToTest & BallCollision.TileEdges.TopLeftSlope) == BallCollision.TileEdges.None) + return false; + edge.Start = new Vector2(tilePosition.X, tilePosition.Y + 16f); + edge.End = new Vector2(tilePosition.X + 16f, tilePosition.Y); + return true; + case 4: + edgesToTest &= BallCollision.TileEdges.Top | BallCollision.TileEdges.Right | BallCollision.TileEdges.TopRightSlope; + if ((edgesToTest & BallCollision.TileEdges.TopRightSlope) == BallCollision.TileEdges.None) + return false; + edge.Start = tilePosition; + edge.End = new Vector2(tilePosition.X + 16f, tilePosition.Y + 16f); + return true; + default: + return false; + } + } + + private static bool GetTopOrBottomEdge( + BallCollision.TileEdges edgesToTest, + int x, + int y, + Vector2 tilePosition, + ref LineSegment edge) + { + if ((edgesToTest & BallCollision.TileEdges.Bottom) != BallCollision.TileEdges.None) + { + Tile tile = Main.tile[x, y + 1]; + if ((!BallCollision.IsNeighborSolid(tile) || tile.slope() == (byte) 1 || tile.slope() == (byte) 2 ? 1 : (tile.halfBrick() ? 1 : 0)) == 0) + return false; + edge.Start = new Vector2(tilePosition.X, tilePosition.Y + 16f); + edge.End = new Vector2(tilePosition.X + 16f, tilePosition.Y + 16f); + return true; + } + if ((edgesToTest & BallCollision.TileEdges.Top) == BallCollision.TileEdges.None) + return false; + Tile tile1 = Main.tile[x, y - 1]; + if ((Main.tile[x, y].halfBrick() || !BallCollision.IsNeighborSolid(tile1) || tile1.slope() == (byte) 3 ? 1 : (tile1.slope() == (byte) 4 ? 1 : 0)) == 0) + return false; + if (Main.tile[x, y].halfBrick()) + tilePosition.Y += 8f; + edge.Start = new Vector2(tilePosition.X, tilePosition.Y); + edge.End = new Vector2(tilePosition.X + 16f, tilePosition.Y); + return true; + } + + private static bool GetLeftOrRightEdge( + BallCollision.TileEdges edgesToTest, + int x, + int y, + Vector2 tilePosition, + ref LineSegment edge) + { + if ((edgesToTest & BallCollision.TileEdges.Left) != BallCollision.TileEdges.None) + { + Tile tile1 = Main.tile[x, y]; + Tile tile2 = Main.tile[x - 1, y]; + if ((!BallCollision.IsNeighborSolid(tile2) || tile2.slope() == (byte) 1 || tile2.slope() == (byte) 3 ? 1 : (!tile2.halfBrick() ? 0 : (!tile1.halfBrick() ? 1 : 0))) == 0) + return false; + edge.Start = new Vector2(tilePosition.X, tilePosition.Y); + edge.End = new Vector2(tilePosition.X, tilePosition.Y + 16f); + if (tile1.halfBrick()) + edge.Start.Y += 8f; + return true; + } + if ((edgesToTest & BallCollision.TileEdges.Right) == BallCollision.TileEdges.None) + return false; + Tile tile3 = Main.tile[x, y]; + Tile tile4 = Main.tile[x + 1, y]; + if ((!BallCollision.IsNeighborSolid(tile4) || tile4.slope() == (byte) 2 || tile4.slope() == (byte) 4 ? 1 : (!tile4.halfBrick() ? 0 : (!tile3.halfBrick() ? 1 : 0))) == 0) + return false; + edge.Start = new Vector2(tilePosition.X + 16f, tilePosition.Y); + edge.End = new Vector2(tilePosition.X + 16f, tilePosition.Y + 16f); + if (tile3.halfBrick()) + edge.Start.Y += 8f; + return true; + } + + private static Rectangle GetTileBounds(Vector2 position, Vector2 size) + { + int x = (int) Math.Floor((double) position.X / 16.0); + int y = (int) Math.Floor((double) position.Y / 16.0); + int num1 = (int) Math.Floor(((double) position.X + (double) size.X) / 16.0); + int num2 = (int) Math.Floor(((double) position.Y + (double) size.Y) / 16.0); + return new Rectangle(x, y, num1 - x + 1, num2 - y + 1); + } + + private static bool IsNeighborSolid(Tile tile) => tile != null && tile.nactive() && Main.tileSolid[(int) tile.type] && !Main.tileSolidTop[(int) tile.type]; + + private static Vector2 ClosestPointOnLineSegment(Vector2 point, LineSegment lineSegment) + { + Vector2 vector2_1 = point - lineSegment.Start; + Vector2 vector2_2 = lineSegment.End - lineSegment.Start; + float num1 = vector2_2.LengthSquared(); + Vector2 vector2_3 = vector2_2; + float num2 = Vector2.Dot(vector2_1, vector2_3) / num1; + if ((double) num2 < 0.0) + return lineSegment.Start; + return (double) num2 > 1.0 ? lineSegment.End : lineSegment.Start + vector2_2 * num2; + } + + [Conditional("DEBUG")] + private static void DrawEdge(LineSegment edge) + { + } + + [Flags] + private enum TileEdges : uint + { + None = 0, + Top = 1, + Bottom = 2, + Left = 4, + Right = 8, + TopLeftSlope = 16, // 0x00000010 + TopRightSlope = 32, // 0x00000020 + BottomLeftSlope = 64, // 0x00000040 + BottomRightSlope = 128, // 0x00000080 + } + } +} diff --git a/Physics/BallCollisionEvent.cs b/Physics/BallCollisionEvent.cs new file mode 100644 index 0000000..c2bf2db --- /dev/null +++ b/Physics/BallCollisionEvent.cs @@ -0,0 +1,33 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Physics.BallCollisionEvent +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.Physics +{ + public struct BallCollisionEvent + { + public readonly Vector2 Normal; + public readonly Vector2 ImpactPoint; + public readonly Tile Tile; + public readonly Entity Entity; + public readonly float TimeScale; + + public BallCollisionEvent( + float timeScale, + Vector2 normal, + Vector2 impactPoint, + Tile tile, + Entity entity) + { + this.Normal = normal; + this.ImpactPoint = impactPoint; + this.Tile = tile; + this.Entity = entity; + this.TimeScale = timeScale; + } + } +} diff --git a/Physics/BallPassThroughEvent.cs b/Physics/BallPassThroughEvent.cs new file mode 100644 index 0000000..323f214 --- /dev/null +++ b/Physics/BallPassThroughEvent.cs @@ -0,0 +1,28 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Physics.BallPassThroughEvent +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Physics +{ + public struct BallPassThroughEvent + { + public readonly Tile Tile; + public readonly Entity Entity; + public readonly BallPassThroughType Type; + public readonly float TimeScale; + + public BallPassThroughEvent( + float timeScale, + Tile tile, + Entity entity, + BallPassThroughType type) + { + this.Tile = tile; + this.Entity = entity; + this.Type = type; + this.TimeScale = timeScale; + } + } +} diff --git a/Physics/BallPassThroughType.cs b/Physics/BallPassThroughType.cs new file mode 100644 index 0000000..944e3ec --- /dev/null +++ b/Physics/BallPassThroughType.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Physics.BallPassThroughType +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Physics +{ + public enum BallPassThroughType + { + None, + Water, + Honey, + Lava, + Tile, + } +} diff --git a/Physics/BallState.cs b/Physics/BallState.cs new file mode 100644 index 0000000..ada02f7 --- /dev/null +++ b/Physics/BallState.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Physics.BallState +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Physics +{ + public enum BallState + { + Resting, + Moving, + OutOfBounds, + } +} diff --git a/Physics/BallStepResult.cs b/Physics/BallStepResult.cs new file mode 100644 index 0000000..1bc1932 --- /dev/null +++ b/Physics/BallStepResult.cs @@ -0,0 +1,21 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Physics.BallStepResult +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Physics +{ + public struct BallStepResult + { + public readonly BallState State; + + private BallStepResult(BallState state) => this.State = state; + + public static BallStepResult OutOfBounds() => new BallStepResult(BallState.OutOfBounds); + + public static BallStepResult Moving() => new BallStepResult(BallState.Moving); + + public static BallStepResult Resting() => new BallStepResult(BallState.Resting); + } +} diff --git a/Physics/IBallContactListener.cs b/Physics/IBallContactListener.cs new file mode 100644 index 0000000..b6c80e8 --- /dev/null +++ b/Physics/IBallContactListener.cs @@ -0,0 +1,26 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Physics.IBallContactListener +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.Physics +{ + public interface IBallContactListener + { + void OnCollision( + PhysicsProperties properties, + ref Vector2 position, + ref Vector2 velocity, + ref BallCollisionEvent collision); + + void OnPassThrough( + PhysicsProperties properties, + ref Vector2 position, + ref Vector2 velocity, + ref float angularVelocity, + ref BallPassThroughEvent passThrough); + } +} diff --git a/Physics/PhysicsProperties.cs b/Physics/PhysicsProperties.cs new file mode 100644 index 0000000..7c32999 --- /dev/null +++ b/Physics/PhysicsProperties.cs @@ -0,0 +1,20 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Physics.PhysicsProperties +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Physics +{ + public class PhysicsProperties + { + public readonly float Gravity; + public readonly float Drag; + + public PhysicsProperties(float gravity, float drag) + { + this.Gravity = gravity; + this.Drag = drag; + } + } +} diff --git a/Player.cs b/Player.cs new file mode 100644 index 0000000..15ef49e --- /dev/null +++ b/Player.cs @@ -0,0 +1,36846 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Player +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Input; +using ReLogic.Utilities; +using System; +using System.Collections.Generic; +using System.IO; +using System.Security.Cryptography; +using System.Text; +using Terraria.Audio; +using Terraria.Chat; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.GameContent; +using Terraria.GameContent.Achievements; +using Terraria.GameContent.Creative; +using Terraria.GameContent.Drawing; +using Terraria.GameContent.Events; +using Terraria.GameContent.Golf; +using Terraria.GameContent.ObjectInteractions; +using Terraria.GameContent.Tile_Entities; +using Terraria.GameContent.UI; +using Terraria.GameInput; +using Terraria.Graphics; +using Terraria.Graphics.Capture; +using Terraria.Graphics.Effects; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.IO; +using Terraria.Localization; +using Terraria.ObjectData; +using Terraria.Social; +using Terraria.UI; +using Terraria.UI.Chat; +using Terraria.UI.Gamepad; +using Terraria.Utilities; +using Terraria.WorldBuilding; + +namespace Terraria +{ + public class Player : Entity + { + public int emoteTime; + public CreativeUnlocksTracker creativeTracker; + private static byte[] ENCRYPTION_KEY = new UnicodeEncoding().GetBytes("h3y_gUyZ"); + public Player.OverheadMessage chatOverhead; + public Player.SelectionRadial DpadRadial = new Player.SelectionRadial(); + public Player.SelectionRadial CircularRadial = new Player.SelectionRadial(Player.SelectionRadial.SelectionMode.RadialCircular); + public Player.SelectionRadial QuicksRadial = new Player.SelectionRadial(Player.SelectionRadial.SelectionMode.RadialQuicks); + public bool alchemyTable; + public int HotbarOffset; + public bool GoingDownWithGrapple; + public byte spelunkerTimer; + public bool[] hideInfo = new bool[13]; + public int[] builderAccStatus = new int[12] + { + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + }; + public int lostCoins; + public string lostCoinString = ""; + public int soulDrain; + public float drainBoost; + public bool dd2Accessory; + private static bool disabledBlizzardGraphic = false; + private static bool disabledBlizzardSound = false; + private static float _blizzardSoundVolume; + private static SlotId _strongBlizzardSound = (SlotId) SlotId.Invalid; + private static SlotId _insideBlizzardSound = (SlotId) SlotId.Invalid; + public string name = ""; + public int taxMoney; + public int taxTimer; + public static int taxRate = 3600; + public static int crystalLeafDamage = 100; + public static int crystalLeafKB = 10; + public float basiliskCharge; + public Vector2 lastDeathPostion; + public DateTime lastDeathTime; + public bool showLastDeath; + public int extraAccessorySlots = 2; + public bool extraAccessory; + private bool dontConsumeWand; + public int tankPet = -1; + public bool tankPetReset; + public int stringColor; + public int counterWeight; + public bool yoyoString; + public bool yoyoGlove; + public int beetleOrbs; + public float beetleCounter; + public int beetleCountdown; + public bool beetleDefense; + public bool beetleOffense; + public bool beetleBuff; + public int solarShields; + public int solarCounter; + public const int maxSolarShields = 3; + public Vector2[] solarShieldPos = new Vector2[3]; + public Vector2[] solarShieldVel = new Vector2[3]; + public bool solarDashing; + public bool solarDashConsumedFlare; + public const int nebulaMaxLevel = 3; + public int nebulaLevelLife; + public int nebulaLevelMana; + public int nebulaManaCounter; + public int nebulaLevelDamage; + public bool manaMagnet; + public bool lifeMagnet; + public bool treasureMagnet; + public bool lifeForce; + public bool calmed; + public bool inferno; + public float flameRingRot; + public float flameRingScale = 1f; + public byte flameRingFrame; + public byte flameRingAlpha; + public int netManaTime; + public int netLifeTime; + public bool netMana; + public bool netLife; + public Vector2[] beetlePos = new Vector2[3]; + public Vector2[] beetleVel = new Vector2[3]; + public int beetleFrame; + public int beetleFrameCounter; + public static int manaSickTime = 300; + public static int manaSickTimeMax = 600; + public static float manaSickLessDmg = 0.25f; + public float manaSickReduction; + public bool manaSick; + public int afkCounter; + public bool stairFall; + public int loadStatus; + public Vector2[] itemFlamePos = new Vector2[7]; + public int itemFlameCount; + public bool outOfRange; + public float lifeSteal = 99999f; + public float ghostDmg; + public bool teleporting; + public float teleportTime; + public int teleportStyle; + public bool sloping; + public bool chilled; + public bool dazed; + public bool frozen; + public bool stoned; + public bool lastStoned; + public bool ichor; + public bool webbed; + public bool tipsy; + public bool noBuilding; + public int ropeCount; + public int manaRegenBonus; + public int manaRegenDelayBonus; + public int dashType; + public int dash; + public int dashTime; + public int dashDelay; + public int eocDash; + public int eocHit; + public float accRunSpeed; + public bool cordage; + public int gem = -1; + public int gemCount; + public BitsByte ownedLargeGems; + public byte meleeEnchant; + public byte pulleyDir; + public bool pulley; + public int pulleyFrame; + public float pulleyFrameCounter; + public bool blackBelt; + public bool sliding; + public int slideDir; + public int launcherWait; + public bool iceSkate; + public bool carpet; + public int spikedBoots; + public int carpetFrame = -1; + public float carpetFrameCounter; + public bool canCarpet; + public int carpetTime; + public int miscCounter; + public int infernoCounter; + public int starCloakCooldown; + public bool sandStorm; + public bool crimsonRegen; + public bool ghostHeal; + public bool ghostHurt; + public bool sticky; + public bool slippy; + public bool slippy2; + public bool powerrun; + public bool runningOnSand; + public bool flapSound; + public bool iceBarrier; + public bool dangerSense; + public byte luckPotion; + public byte oldLuckPotion; + public float endurance; + public bool loveStruck; + public bool stinky; + public bool resistCold; + public bool electrified; + public bool dryadWard; + public bool panic; + public bool brainOfConfusion; + public int brainOfConfusionDodgeAnimationCounter; + public byte iceBarrierFrame; + public byte iceBarrierFrameCounter; + public bool shadowDodge; + public float shadowDodgeCount; + public bool palladiumRegen; + public bool onHitDodge; + public bool onHitRegen; + public bool onHitPetal; + public bool onHitTitaniumStorm; + public bool hasTitaniumStormBuff; + public int petalTimer; + public int shadowDodgeTimer; + public int phantomPhoneixCounter; + public int fishingSkill; + public bool cratePotion; + public bool sonarPotion; + public bool accFishingLine; + public bool accTackleBox; + public bool accLavaFishing; + public int maxMinions = 1; + public int numMinions; + public float slotsMinions; + public bool pygmy; + public bool raven; + public bool slime; + public bool hornetMinion; + public bool impMinion; + public bool twinsMinion; + public bool spiderMinion; + public bool pirateMinion; + public bool sharknadoMinion; + public bool UFOMinion; + public bool DeadlySphereMinion; + public bool stardustMinion; + public bool stardustGuardian; + public bool stardustDragon; + public bool batsOfLight; + public bool babyBird; + public bool vampireFrog; + public bool stormTiger; + public int highestStormTigerGemOriginalDamage; + public bool smolstar; + public bool empressBlade; + public float wingTime; + public int wings; + public int wingsLogic; + public int wingTimeMax; + public int wingFrame; + public int wingFrameCounter; + public int skinVariant; + public bool ghost; + public int ghostFrame; + public int ghostFrameCounter; + public int miscTimer; + public bool pvpDeath; + public BitsByte zone1 = (BitsByte) (byte) 0; + public BitsByte zone2 = (BitsByte) (byte) 0; + public BitsByte zone3 = (BitsByte) (byte) 0; + public BitsByte zone4 = (BitsByte) (byte) 0; + public bool boneArmor; + public bool frostArmor; + public bool honey; + public bool crystalLeaf; + public PortableStoolUsage portableStoolInfo; + public bool preventAllItemPickups; + public bool dontHurtCritters; + public int[] doubleTapCardinalTimer = new int[4]; + public int[] holdDownCardinalTimer = new int[4]; + public bool defendedByPaladin; + public bool hasPaladinShield; + public float[] speedSlice = new float[60]; + public float townNPCs; + public double headFrameCounter; + public double bodyFrameCounter; + public double legFrameCounter; + public int netSkip; + public int oldSelectItem; + public bool immune; + public bool immuneNoBlink; + public int immuneTime; + public int immuneAlphaDirection; + public int immuneAlpha; + public int team; + private int _timeSinceLastImmuneGet; + private int _immuneStrikes; + public bool hbLocked; + public static int nameLen = 20; + public float maxRegenDelay; + public int sign = -1; + public bool editedChestName; + public int reuseDelay; + public int aggro; + public float nearbyActiveNPCs; + public bool creativeInterface; + public bool mouseInterface; + public bool lastMouseInterface; + public int noThrow; + public int changeItem = -1; + public int selectedItem; + public const int SupportedSlotsArmor = 3; + public const int SupportedSlotsAccs = 7; + public const int SupportedSlotSets = 10; + public const int InitialAccSlotCount = 5; + public const int miscSlotPet = 0; + public const int miscSlotLight = 1; + public const int miscSlotCart = 2; + public const int miscSlotMount = 3; + public const int miscSlotHook = 4; + public Item[] armor = new Item[20]; + public Item[] dye = new Item[10]; + public Item[] miscEquips = new Item[5]; + public Item[] miscDyes = new Item[5]; + public Item trashItem = new Item(); + public float itemRotation; + public int itemWidth; + public int itemHeight; + public Vector2 itemLocation; + public bool poundRelease; + public float ghostFade; + public float ghostDir = 1f; + public const int maxBuffs = 22; + public int[] buffType = new int[22]; + public int[] buffTime = new int[22]; + public bool[] buffImmune = new bool[323]; + public int heldProj = -1; + public int breathCD; + public int breathMax = 200; + public int breath = 200; + public int lavaCD; + public int lavaMax; + public int lavaTime; + public bool ignoreWater; + public bool armorEffectDrawShadow; + public bool armorEffectDrawShadowSubtle; + public bool armorEffectDrawOutlines; + public bool armorEffectDrawShadowLokis; + public bool armorEffectDrawShadowBasilisk; + public bool armorEffectDrawOutlinesForbidden; + public bool armorEffectDrawShadowEOCShield; + public bool socialShadowRocketBoots; + public bool socialGhost; + public bool shroomiteStealth; + public bool socialIgnoreLight; + public int stealthTimer; + public float stealth = 1f; + public bool isDisplayDollOrInanimate; + public bool isHatRackDoll; + public bool isFirstFractalAfterImage; + public float firstFractalAfterImageOpacity; + public string setBonus = ""; + public Item[] inventory = new Item[59]; + public bool[] inventoryChestStack = new bool[59]; + public Item lastVisualizedSelectedItem; + public Chest bank = new Chest(true); + public Chest bank2 = new Chest(true); + public Chest bank3 = new Chest(true); + public Chest bank4 = new Chest(true); + public BitsByte voidVaultInfo; + public float headRotation; + public float bodyRotation; + public float legRotation; + public Vector2 headPosition; + public Vector2 bodyPosition; + public Vector2 legPosition; + public Vector2 headVelocity; + public Vector2 bodyVelocity; + public Vector2 legVelocity; + public float fullRotation; + public Vector2 fullRotationOrigin = Vector2.Zero; + public int nonTorch = -1; + public float gfxOffY; + public float stepSpeed = 1f; + public static bool deadForGood = false; + public bool dead; + public int respawnTimer; + public const int respawnTimerMax = 1800; + public long lastTimePlayerWasSaved; + public int attackCD; + public int potionDelay; + public byte difficulty; + public byte wetSlime; + public HitTile hitTile; + public HitTile hitReplace; + public int jump; + public int head = -1; + public int body = -1; + public int legs = -1; + public sbyte handon = -1; + public sbyte handoff = -1; + public sbyte back = -1; + public sbyte front = -1; + public sbyte shoe = -1; + public sbyte waist = -1; + public sbyte shield = -1; + public sbyte neck = -1; + public sbyte face = -1; + public sbyte balloon = -1; + public bool[] hideVisibleAccessory = new bool[10]; + public BitsByte hideMisc = (BitsByte) (byte) 0; + public Microsoft.Xna.Framework.Rectangle headFrame; + public Microsoft.Xna.Framework.Rectangle bodyFrame; + public Microsoft.Xna.Framework.Rectangle legFrame; + public Microsoft.Xna.Framework.Rectangle hairFrame; + public bool controlLeft; + public bool controlRight; + public bool controlUp; + public bool controlDown; + public bool controlJump; + public bool controlUseItem; + public bool controlUseTile; + public bool controlThrow; + public bool controlInv; + public bool controlHook; + public bool controlTorch; + public bool controlMap; + public bool controlSmart; + public bool controlMount; + public bool releaseJump; + public bool releaseUp; + public bool releaseUseItem; + public bool releaseUseTile; + public bool releaseInventory; + public bool releaseHook; + public bool releaseThrow; + public bool releaseQuickMana; + public bool releaseQuickHeal; + public bool releaseLeft; + public bool releaseRight; + public bool releaseSmart; + public bool releaseMount; + public bool releaseDown; + public bool controlQuickMana; + public bool controlQuickHeal; + public bool controlCreativeMenu; + public bool releaseCreativeMenu; + public bool tileInteractionHappened; + public bool tileInteractAttempted; + public bool tryKeepingHoveringDown; + public bool tryKeepingHoveringUp; + public int altFunctionUse; + public bool mapZoomIn; + public bool mapZoomOut; + public bool mapAlphaUp; + public bool mapAlphaDown; + public bool mapFullScreen; + public bool mapStyle; + public bool releaseMapFullscreen; + public bool releaseMapStyle; + public int leftTimer; + public int rightTimer; + public bool delayUseItem; + public const int defaultWidth = 20; + public const int defaultHeight = 42; + public bool cursorItemIconEnabled; + public bool cursorItemIconReversed; + public int cursorItemIconID; + public string cursorItemIconText = ""; + public int runSoundDelay; + public float shadow; + public const int shadowMax = 3; + public Vector2[] shadowPos = new Vector2[3]; + public float[] shadowRotation = new float[3]; + public Vector2[] shadowOrigin = new Vector2[3]; + public int[] shadowDirection = new int[3]; + public int shadowCount; + public float manaCost = 1f; + public bool fireWalk; + public bool channel; + public int step = -1; + public bool skipAnimatingValuesInPlayerFrame; + public Player.RabbitOrderFrameHelper rabbitOrderFrame; + public bool creativeGodMode; + private const int MaxAdvancedShadows = 60; + public int availableAdvancedShadowsCount; + private EntityShadowInfo[] _advancedShadows = new EntityShadowInfo[60]; + private int _lastAddedAvancedShadow; + public Player.CompositeArmData compositeFrontArm; + public Player.CompositeArmData compositeBackArm; + public int anglerQuestsFinished; + public int golferScoreAccumulated; + public int bartenderQuestLog; + public bool downedDD2EventAnyDifficulty; + public int armorPenetration; + public int statDefense; + public int statLifeMax = 100; + public int statLifeMax2 = 100; + public int statLife = 100; + public int statMana; + public int statManaMax; + public int statManaMax2; + public int lifeRegen; + public int lifeRegenCount; + public int lifeRegenTime; + public int manaRegen; + public int manaRegenCount; + public int manaRegenDelay; + public bool manaRegenBuff; + public bool noKnockback; + public bool spaceGun; + public float gravDir = 1f; + public bool chloroAmmoCost80; + public bool ammoCost80; + public bool ammoCost75; + public int stickyBreak; + public bool magicQuiver; + public bool magmaStone; + public bool lavaRose; + public bool hasMoltenQuiver; + public int phantasmTime; + public bool ammoBox; + public bool ammoPotion; + public bool chaosState; + public bool strongBees; + public bool sporeSac; + public bool shinyStone; + public bool empressBrooch; + public bool volatileGelatin; + public int volatileGelatinCounter; + public int yoraiz0rEye; + public bool yoraiz0rDarkness; + public bool hasUnicornHorn; + public bool leinforsHair; + public bool unlockedBiomeTorches; + public bool suspiciouslookingTentacle; + public bool crimsonHeart; + public bool lightOrb; + public bool blueFairy; + public bool redFairy; + public bool greenFairy; + public bool bunny; + public bool turtle; + public bool eater; + public bool penguin; + public bool HasGardenGnomeNearby; + public bool magicLantern; + public bool rabid; + public bool sunflower; + public bool wellFed; + public bool puppy; + public bool grinch; + public bool miniMinotaur; + public bool flowerBoots; + public bool fairyBoots; + public bool moonLordLegs; + public bool arcticDivingGear; + public bool coolWhipBuff; + public bool wearsRobe; + public bool minecartLeft; + public bool onWrongGround; + public bool onTrack; + public int cartRampTime; + public bool cartFlip; + public float trackBoost; + public Vector2 lastBoost = Vector2.Zero; + public Mount mount; + public bool blackCat; + public bool spider; + public bool squashling; + public bool petFlagDD2Gato; + public bool petFlagDD2Ghost; + public bool petFlagDD2Dragon; + public bool petFlagUpbeatStar; + public bool petFlagSugarGlider; + public bool petFlagBabyShark; + public bool petFlagLilHarpy; + public bool petFlagFennecFox; + public bool petFlagGlitteryButterfly; + public bool petFlagBabyImp; + public bool petFlagBabyRedPanda; + public bool petFlagPlantero; + public bool petFlagDynamiteKitten; + public bool petFlagBabyWerewolf; + public bool petFlagShadowMimic; + public bool petFlagVoltBunny; + public bool petFlagKingSlimePet; + public bool petFlagEyeOfCthulhuPet; + public bool petFlagEaterOfWorldsPet; + public bool petFlagBrainOfCthulhuPet; + public bool petFlagSkeletronPet; + public bool petFlagQueenBeePet; + public bool petFlagDestroyerPet; + public bool petFlagTwinsPet; + public bool petFlagSkeletronPrimePet; + public bool petFlagPlanteraPet; + public bool petFlagGolemPet; + public bool petFlagDukeFishronPet; + public bool petFlagLunaticCultistPet; + public bool petFlagMoonLordPet; + public bool petFlagFairyQueenPet; + public bool petFlagPumpkingPet; + public bool petFlagEverscreamPet; + public bool petFlagIceQueenPet; + public bool petFlagMartianPet; + public bool petFlagDD2OgrePet; + public bool petFlagDD2BetsyPet; + public bool petFlagQueenSlimePet; + public bool companionCube; + public bool babyFaceMonster; + public bool magicCuffs; + public bool coldDash; + public bool sailDash; + public bool desertDash; + public bool eyeSpring; + public bool snowman; + public bool scope; + public bool dino; + public bool skeletron; + public bool hornet; + public bool zephyrfish; + public bool tiki; + public bool parrot; + public bool truffle; + public bool sapling; + public bool cSapling; + public bool wisp; + public bool lizard; + public bool archery; + public bool poisoned; + public bool venom; + public bool blind; + public bool blackout; + public bool headcovered; + public bool frostBurn; + public bool onFrostBurn; + public bool burned; + public bool suffocating; + public byte suffocateDelay; + public bool dripping; + public bool drippingSlime; + public bool drippingSparkleSlime; + public bool onFire; + public bool onFire2; + public bool noItems; + public bool cursed; + public bool windPushed; + public bool wereWolf; + public bool wolfAcc; + public bool hideMerman; + public bool hideWolf; + public bool forceMerman; + public bool forceWerewolf; + public bool rulerGrid; + public bool rulerLine; + public bool bleed; + public bool confused; + public bool accMerman; + public bool merman; + public bool trident; + public bool brokenArmor; + public bool silence; + public bool slow; + public bool gross; + public bool tongued; + public bool kbGlove; + public bool kbBuff; + public bool starCloak; + public bool starCloakIsManaCloak; + public bool starCloakIsStarVeil; + public bool starCloakIsBeeCloak; + public bool longInvince; + public bool pStone; + public bool manaFlower; + public bool moonLeech; + public bool vortexDebuff; + public bool trapDebuffSource; + public bool witheredArmor; + public bool witheredWeapon; + public bool slowOgreSpit; + public bool parryDamageBuff; + public bool ballistaPanic; + public bool JustDroppedAnItem; + public int meleeCrit = 4; + public int magicCrit = 4; + public int rangedCrit = 4; + public float meleeDamage = 1f; + public float magicDamage = 1f; + public float rangedDamage = 1f; + public float bulletDamage = 1f; + public float arrowDamage = 1f; + public float rocketDamage = 1f; + public float minionDamage = 1f; + public float minionKB; + public float meleeSpeed = 1f; + public float moveSpeed = 1f; + public float pickSpeed = 1f; + public float wallSpeed = 1f; + public float tileSpeed = 1f; + public bool autoPaint; + public bool autoActuator; + public int SpawnX = -1; + public int SpawnY = -1; + public Vector2? PotionOfReturnOriginalUsePosition; + public Vector2? PotionOfReturnHomePosition; + public int[] spX = new int[200]; + public int[] spY = new int[200]; + public string[] spN = new string[200]; + public int[] spI = new int[200]; + public static int tileRangeX = 5; + public static int tileRangeY = 4; + public int lastTileRangeX; + public int lastTileRangeY; + public static int tileTargetX; + public static int tileTargetY; + public static float defaultGravity = 0.4f; + public static int jumpHeight = 15; + public static float jumpSpeed = 5.01f; + public float gravity = Player.defaultGravity; + public float maxFallSpeed = 10f; + public float maxRunSpeed = 3f; + public float runAcceleration = 0.08f; + public float runSlowdown = 0.2f; + public bool adjWater; + public bool adjHoney; + public bool adjLava; + public bool oldAdjWater; + public bool oldAdjHoney; + public bool oldAdjLava; + public bool[] adjTile = new bool[623]; + public bool[] oldAdjTile = new bool[623]; + public static int defaultItemGrabRange = 42; + private static float itemGrabSpeed = 0.45f; + private static float itemGrabSpeedMax = 4f; + public byte hairDye; + public Color hairDyeColor = Color.Transparent; + public float hairDyeVar; + public int skinDyePacked; + public Color hairColor = new Color(215, 90, 55); + public Color skinColor = new Color((int) byte.MaxValue, 125, 90); + public Color eyeColor = new Color(105, 90, 75); + public Color shirtColor = new Color(175, 165, 140); + public Color underShirtColor = new Color(160, 180, 215); + public Color pantsColor = new Color((int) byte.MaxValue, 230, 175); + public Color shoeColor = new Color(160, 105, 60); + public int hair; + public bool hostile; + public SoundPlaySet hermesStepSound = new SoundPlaySet(); + public Vector2 instantMovementAccumulatedThisFrame; + public int accCompass; + public int accWatch; + public int accDepthMeter; + public bool accFishFinder; + public bool accWeatherRadio; + public bool accJarOfSouls; + public bool accCalendar; + public int lastCreatureHit = -1; + public bool accThirdEye; + public byte accThirdEyeCounter; + public byte accThirdEyeNumber; + public bool accStopwatch; + public bool accOreFinder; + public bool accCritterGuide; + public byte accCritterGuideCounter; + public byte accCritterGuideNumber; + public bool accDreamCatcher; + public bool hasFootball; + public bool drawingFootball; + public bool ActuationRodLock; + public bool ActuationRodLockSetting; + public bool InfoAccMechShowWires; + public DateTime dpsStart; + public DateTime dpsEnd; + public DateTime dpsLastHit; + public int dpsDamage; + public bool dpsStarted; + public string displayedFishingInfo = ""; + public bool discount; + public bool coins; + public bool goldRing; + public bool accDivingHelm; + public bool accFlipper; + public bool hasJumpOption_Cloud; + public bool canJumpAgain_Cloud; + public bool isPerformingJump_Cloud; + public bool hasJumpOption_Sandstorm; + public bool canJumpAgain_Sandstorm; + public bool isPerformingJump_Sandstorm; + public bool hasJumpOption_Blizzard; + public bool canJumpAgain_Blizzard; + public bool isPerformingJump_Blizzard; + public bool hasJumpOption_Fart; + public bool canJumpAgain_Fart; + public bool isPerformingJump_Fart; + public bool hasJumpOption_Sail; + public bool canJumpAgain_Sail; + public bool isPerformingJump_Sail; + public bool hasJumpOption_Unicorn; + public bool canJumpAgain_Unicorn; + public bool isPerformingJump_Unicorn; + public bool hasJumpOption_Santank; + public bool canJumpAgain_Santank; + public bool isPerformingJump_Santank; + public bool hasJumpOption_WallOfFleshGoat; + public bool canJumpAgain_WallOfFleshGoat; + public bool isPerformingJump_WallOfFleshGoat; + public bool hasJumpOption_Basilisk; + public bool canJumpAgain_Basilisk; + public bool isPerformingJump_Basilisk; + public bool isPerformingPogostickTricks; + public bool autoJump; + public bool justJumped; + public float jumpSpeedBoost; + public int extraFall; + public bool canFloatInWater; + public bool hasFloatingTube; + public bool frogLegJumpBoost; + public bool skyStoneEffects; + public bool spawnMax; + public int blockRange; + public int[] grappling = new int[20]; + public int grapCount; + public int rocketTime; + public int rocketTimeMax = 7; + public int rocketDelay; + public int rocketDelay2; + public bool rocketRelease; + public bool rocketFrame; + public int rocketBoots; + public bool canRocket; + public bool jumpBoost; + public bool noFallDmg; + public int swimTime; + public bool killGuide; + public bool killClothier; + public bool lavaImmune; + public bool gills; + public bool slowFall; + public bool findTreasure; + public bool invis; + public bool detectCreature; + public bool nightVision; + public bool enemySpawns; + public float thorns; + public bool turtleArmor; + public bool turtleThorns; + public bool spiderArmor; + public bool CanSeeInvisibleBlocks; + public bool setSolar; + public bool setVortex; + public bool setNebula; + public int nebulaCD; + public bool setStardust; + public bool setForbidden; + public bool setForbiddenCooldownLocked; + public bool setSquireT3; + public bool setHuntressT3; + public bool setApprenticeT3; + public bool setMonkT3; + public bool setSquireT2; + public bool setHuntressT2; + public bool setApprenticeT2; + public bool setMonkT2; + public int maxTurrets = 1; + public int maxTurretsOld = 1; + public bool vortexStealthActive; + public bool waterWalk; + public bool waterWalk2; + public bool gravControl; + public bool gravControl2; + public bool releaseBeesWhenHurt; + public int wireOperationsCooldown; + public int lastChest; + public int flyingPigChest = -1; + public int voidLensChest = -1; + public int chest = -1; + public int chestX; + public int chestY; + public int fallStart; + public int fallStart2; + public int potionDelayTime = Item.potionDelay; + public int restorationDelayTime = Item.restorationDelay; + public bool isPettingAnimal; + public bool isTheAnimalBeingPetSmall; + public PlayerSittingHelper sitting; + public PlayerSleepingHelper sleeping; + public PlayerEyeHelper eyeHelper; + public PlayerInteractionAnchor tileEntityAnchor; + public DoorOpeningHelper doorHelper; + public ShoppingSettings currentShoppingSettings = ShoppingSettings.NotInShop; + public int cHead; + public int cBody; + public int cLegs; + public int cHandOn; + public int cHandOff; + public int cBack; + public int cFront; + public int cShoe; + public int cWaist; + public int cShield; + public int cNeck; + public int cFace; + public int cBalloon; + public int cWings; + public int cCarpet; + public int cFloatingTube; + public int cGrapple; + public int cMount; + public int cMinecart; + public int cPet; + public int cLight; + public int cYorai; + public int cPortalbeStool; + public int cUnicornHorn; + public int cMinion; + public int cLeinShampoo; + public int[] ownedProjectileCounts = new int[950]; + public bool[] npcTypeNoAggro = new bool[663]; + public int lastPortalColorIndex; + public int _portalPhysicsTime; + public bool portalPhysicsFlag; + public int lastTeleportPylonStyleUsed; + public float MountFishronSpecialCounter; + public Vector2 MinionRestTargetPoint = Vector2.Zero; + public int MinionAttackTargetNPC = -1; + public List TouchedTiles = new List(); + public int itemAnimation; + public int itemAnimationMax; + public int itemTime; + public int itemTimeMax; + public int toolTime; + public static int BlockInteractionWithProjectiles = 3; + private HashSet _blackListedTileCoordsForGrappling = new HashSet(); + private bool makeStrongBee; + public bool equippedAnyTileRangeAcc; + public bool equippedAnyTileSpeedAcc; + public bool equippedAnyWallSpeedAcc; + public bool behindBackWall; + public int _funkytownAchievementCheckCooldown; + private float _stormShaderObstruction = 1f; + private float _shaderObstructionInternalValue = 1f; + private int graveImmediateTime; + public const int ChairSittingMaxDistance = 40; + private static SmartInteractSystem _smartInteractSys = new SmartInteractSystem(); + private int _lastSmartCursorToolStrategy = -1; + private bool[] nearbyTorch = new bool[22]; + private bool dryCoralTorch; + private int luckyTorchCounter; + private int nearbyTorches; + public float torchLuck; + public bool happyFunTorchTime; + private int torchFunTimer; + private int torchGodCooldown; + private int numberOfTorchAttacks; + private static int maxTorchAttacks = 200; + private int[] unlitTorchX = new int[Player.maxTorchAttacks]; + private int[] unlitTorchY = new int[Player.maxTorchAttacks]; + private static int[] _torchAttackPosX = new int[400]; + private static int[] _torchAttackPosY = new int[400]; + public int ladyBugLuckTimeLeft; + public float luck; + public float luckMinimumCap = -0.7f; + public float luckMaximumCap = 1f; + public bool luckNeedsSync; + private int _quickGrappleCooldown; + public PlayerMovementAccsCache movementAbilitiesCache; + public float wingAccRunSpeed = -1f; + public float wingRunAccelerationMult = 1f; + public const int SHIELD_PARRY_DURATION = 20; + public const int SHIELD_PARRY_DURATION_DRAWING_TWEAKER = 20; + public const int SHIELD_PARRY_DAMAGE_BUFF_MULTIPLIER = 5; + public bool hasRaisableShield; + public bool shieldRaised; + public int shieldParryTimeLeft; + public int shield_parry_cooldown; + private bool _forceForwardCursor; + private Point _inputMouseCoordsForward; + private Point _mainMouseCoordsForward; + private bool _forceSmartSelectCursor; + private Point _inputMouseCoordsSmartSelect; + private Point _mainMouseCoordsSmartSelect; + private Point _tileTargetSmartSelect; + private bool botherWithUnaimedMinecartTracks = true; + private List _projectilesToInteractWith = new List(); + private int _lockTileInteractionsTimer; + public int[] hurtCooldowns = new int[4]; + public static bool lastPound = true; + public static int musicNotes = 6; + private static List _oldestProjCheckList = new List(); + public Player.SavedPlayerDataWithAnnoyingRules savedPerPlayerFieldsThatArentInThePlayerClass; + private const int SaveSlotIndex_MouseItem = 0; + private const int SaveSlotIndex_CreativeSacrifice = 1; + private const int SaveSlotIndexCount = 2; + private Item[] _temporaryItemSlots = new Item[2]; + + public Vector2 BlehOldPositionFixer => -Vector2.UnitY; + + public float HeightOffsetVisual + { + get + { + if (this.mount.Active) + return (float) this.mount.PlayerOffset; + return this.portableStoolInfo.IsInUse ? (float) this.portableStoolInfo.VisualYOffset : 0.0f; + } + } + + public float HeightOffsetHitboxCenter + { + get + { + if (this.mount.Active) + return (float) this.mount.PlayerOffsetHitbox; + return this.portableStoolInfo.IsInUse ? (float) (this.portableStoolInfo.HeightBoost - this.portableStoolInfo.VisualYOffset) : 0.0f; + } + } + + public int HeightOffsetBoost + { + get + { + if (this.mount.Active) + return this.mount.HeightBoost; + return this.portableStoolInfo.IsInUse ? this.portableStoolInfo.HeightBoost : 0; + } + } + + public int HeightMapOffset + { + get + { + if (this.mount.Active) + return this.mount.PlayerHeadOffset; + return this.portableStoolInfo.IsInUse ? this.portableStoolInfo.HeightBoost : 0; + } + } + + public Vector2 MountedCenter + { + get => new Vector2(this.position.X + (float) (this.width / 2), this.position.Y + 21f + this.HeightOffsetHitboxCenter); + set => this.position = new Vector2(value.X - (float) (this.width / 2), value.Y - 21f - this.HeightOffsetHitboxCenter); + } + + public void RotateRelativePoint(ref float x, ref float y) + { + Vector2 vector2 = this.RotatedRelativePoint(new Vector2(x, y)); + x = vector2.X; + y = vector2.Y; + } + + public Vector2 RotatedRelativePointOld(Vector2 pos, bool rotateForward = true) + { + Vector2 vector2 = this.position + this.fullRotationOrigin; + Matrix rotationZ = Matrix.CreateRotationZ(this.fullRotation * (float) rotateForward.ToInt()); + pos -= this.position + this.fullRotationOrigin; + pos = Vector2.Transform(pos, rotationZ); + return pos + vector2; + } + + public Vector2 RotatedRelativePoint(Vector2 pos, bool reverseRotation = false, bool addGfxOffY = true) + { + float num1 = reverseRotation ? -this.fullRotation : this.fullRotation; + if (this.sleeping.isSleeping) + num1 = 0.0f; + Vector2 vector2_1 = this.Bottom + new Vector2(0.0f, this.gfxOffY); + int num2 = this.mount.PlayerOffset / 2 + 4; + Vector2 vector2_2 = new Vector2(0.0f, (float) -num2) + new Vector2(0.0f, (float) num2).RotatedBy((double) num1); + if (addGfxOffY) + pos.Y += this.gfxOffY; + pos = vector2_1 + (pos - vector2_1).RotatedBy((double) num1) + vector2_2; + if (this.sleeping.isSleeping) + { + Vector2 posOffset; + this.sleeping.GetSleepingOffsetInfo(this, out posOffset); + pos += posOffset; + } + if (this.sitting.isSitting) + { + Vector2 posOffset; + float seatAdjustment; + this.sitting.GetSittingOffsetInfo(this, out posOffset, out seatAdjustment); + pos += posOffset + new Vector2(0.0f, seatAdjustment); + } + return pos; + } + + public bool TileReplacementEnabled => this.builderAccStatus[10] == 0; + + public override Vector2 VisualPosition => this.position + new Vector2(0.0f, this.gfxOffY); + + public bool CCed => this.frozen || this.webbed || this.stoned; + + public bool CanDemonHeartAccessoryBeShown() => this.IsAValidEquipmentSlotForIteration(8) || this.armor[8].type > 0 || this.armor[18].type > 0 || this.dye[8].type > 0; + + public bool CanMasterModeAccessoryBeShown() => this.IsAValidEquipmentSlotForIteration(9) || this.armor[9].type > 0 || this.armor[19].type > 0 || this.dye[9].type > 0; + + public int GetAmountOfExtraAccessorySlotsToShow() + { + int num = 0; + if (this.CanDemonHeartAccessoryBeShown()) + ++num; + if (this.CanMasterModeAccessoryBeShown()) + ++num; + return num; + } + + public float miscCounterNormalized => (float) this.miscCounter / 300f; + + public bool Male + { + get => PlayerVariantID.Sets.Male[this.skinVariant]; + set + { + if (value) + { + if (this.Male) + return; + this.skinVariant = PlayerVariantID.Sets.AltGenderReference[this.skinVariant]; + } + else + { + if (!this.Male) + return; + this.skinVariant = PlayerVariantID.Sets.AltGenderReference[this.skinVariant]; + } + } + } + + public bool ZoneDungeon + { + get => this.zone1[0]; + set => this.zone1[0] = value; + } + + public bool ZoneCorrupt + { + get => this.zone1[1]; + set => this.zone1[1] = value; + } + + public bool ZoneHallow + { + get => this.zone1[2]; + set => this.zone1[2] = value; + } + + public bool ZoneMeteor + { + get => this.zone1[3]; + set => this.zone1[3] = value; + } + + public bool ZoneJungle + { + get => this.zone1[4]; + set => this.zone1[4] = value; + } + + public bool ZoneSnow + { + get => this.zone1[5]; + set => this.zone1[5] = value; + } + + public bool ZoneCrimson + { + get => this.zone1[6]; + set => this.zone1[6] = value; + } + + public bool ZoneWaterCandle + { + get => this.zone1[7]; + set => this.zone1[7] = value; + } + + public bool ZonePeaceCandle + { + get => this.zone2[0]; + set => this.zone2[0] = value; + } + + public bool ZoneTowerSolar + { + get => this.zone2[1]; + set => this.zone2[1] = value; + } + + public bool ZoneTowerVortex + { + get => this.zone2[2]; + set => this.zone2[2] = value; + } + + public bool ZoneTowerNebula + { + get => this.zone2[3]; + set => this.zone2[3] = value; + } + + public bool ZoneTowerStardust + { + get => this.zone2[4]; + set => this.zone2[4] = value; + } + + public bool ZoneDesert + { + get => this.zone2[5]; + set => this.zone2[5] = value; + } + + public bool ZoneGlowshroom + { + get => this.zone2[6]; + set => this.zone2[6] = value; + } + + public bool ZoneUndergroundDesert + { + get => this.zone2[7]; + set => this.zone2[7] = value; + } + + public bool ZoneSkyHeight + { + get => this.zone3[0]; + set => this.zone3[0] = value; + } + + public bool ZoneOverworldHeight + { + get => this.zone3[1]; + set => this.zone3[1] = value; + } + + public bool ZoneDirtLayerHeight + { + get => this.zone3[2]; + set => this.zone3[2] = value; + } + + public bool ZoneRockLayerHeight + { + get => this.zone3[3]; + set => this.zone3[3] = value; + } + + public bool ZoneUnderworldHeight + { + get => this.zone3[4]; + set => this.zone3[4] = value; + } + + public bool ZoneBeach + { + get => this.zone3[5]; + set => this.zone3[5] = value; + } + + public bool ZoneRain + { + get => this.zone3[6]; + set => this.zone3[6] = value; + } + + public bool ZoneSandstorm + { + get => this.zone3[7]; + set => this.zone3[7] = value; + } + + public bool ZoneOldOneArmy + { + get => this.zone4[0]; + set => this.zone4[0] = value; + } + + public bool ZoneGranite + { + get => this.zone4[1]; + set => this.zone4[1] = value; + } + + public bool ZoneMarble + { + get => this.zone4[2]; + set => this.zone4[2] = value; + } + + public bool ZoneHive + { + get => this.zone4[3]; + set => this.zone4[3] = value; + } + + public bool ZoneGemCave + { + get => this.zone4[4]; + set => this.zone4[4] = value; + } + + public bool ZoneLihzhardTemple + { + get => this.zone4[5]; + set => this.zone4[5] = value; + } + + public bool ZoneGraveyard + { + get => this.zone4[6]; + set => this.zone4[6] = value; + } + + public Vector2 Directions => new Vector2((float) this.direction, this.gravDir); + + public Item HeldItem => this.inventory[this.selectedItem]; + + public int breathCDMax + { + get + { + int num = 7; + if (this.inventory[this.selectedItem].type == 186 && this.itemAnimation == 0) + num *= 2; + if (this.accDivingHelm) + num *= 4; + return num; + } + } + + public bool ShouldFloatInWater + { + get + { + if (!this.canFloatInWater || this.controlDown) + return false; + return !this.mount.Active || this.mount.Type == 37; + } + } + + public bool CanBeTalkedTo => this.active && !this.dead && !this.ShouldNotDraw && (double) this.stealth == 1.0; + + public bool IsVoidVaultEnabled + { + get => this.voidVaultInfo[0]; + set => this.voidVaultInfo[0] = value; + } + + public bool DeadOrGhost => this.dead || this.ghost; + + public bool TryingToHoverUp => this.controlUp || this.tryKeepingHoveringUp; + + public bool TryingToHoverDown => this.controlDown || this.tryKeepingHoveringDown; + + public Vector2 DefaultSize => new Vector2(20f, 42f); + + public EntityShadowInfo GetAdvancedShadow(int shadowIndex) + { + if (shadowIndex > this.availableAdvancedShadowsCount) + shadowIndex = this.availableAdvancedShadowsCount; + return this._advancedShadows[(this._lastAddedAvancedShadow - shadowIndex).ModulusPositive(60)]; + } + + public void UpdateAdvancedShadows() + { + ++this.availableAdvancedShadowsCount; + if (this.availableAdvancedShadowsCount > 60) + this.availableAdvancedShadowsCount = 60; + if (++this._lastAddedAvancedShadow >= 60) + this._lastAddedAvancedShadow = 0; + this._advancedShadows[this._lastAddedAvancedShadow].CopyPlayer(this); + } + + public void ResetAdvancedShadows() => this.availableAdvancedShadowsCount = 0; + + public void SetCompositeArmFront( + bool enabled, + Player.CompositeArmStretchAmount stretch, + float rotation) + { + if ((double) this.gravDir == -1.0) + rotation = -rotation; + this.compositeFrontArm = new Player.CompositeArmData(enabled, stretch, rotation); + } + + public void SetCompositeArmBack( + bool enabled, + Player.CompositeArmStretchAmount stretch, + float rotation) + { + if ((double) this.gravDir == -1.0) + rotation = -rotation; + this.compositeBackArm = new Player.CompositeArmData(enabled, stretch, rotation); + } + + public bool UsingBiomeTorches + { + get => this.unlockedBiomeTorches && this.builderAccStatus[11] == 0; + set => this.builderAccStatus[11] = value ? 0 : 1; + } + + public bool ShouldNotDraw => this.invis && this.itemAnimation == 0 && !this.isDisplayDollOrInanimate && !this.isHatRackDoll; + + public int talkNPC { get; private set; } + + public bool isLockedToATile => this.sitting.isSitting || this.sleeping.isSleeping; + + public void SetTalkNPC(int npcIndex, bool fromNet = false) + { + this.talkNPC = npcIndex; + if (Main.netMode != 1 && npcIndex >= 0 && npcIndex < 200) + Main.BestiaryTracker.Chats.RegisterChatStartWith(Main.npc[npcIndex]); + if (this.talkNPC == -1) + this.currentShoppingSettings = ShoppingSettings.NotInShop; + else + this.currentShoppingSettings = Main.ShopHelper.GetShoppingSettings(this, Main.npc[this.talkNPC]); + } + + public bool PortalPhysicsEnabled => this._portalPhysicsTime > 0 && !this.mount.Active; + + public bool MountFishronSpecial + { + get + { + if (this.statLife < this.statLifeMax2 / 2 || this.wet && !this.lavaWet && !this.honeyWet || this.dripping || (double) this.MountFishronSpecialCounter > 0.0) + return true; + return Main.raining && WorldGen.InAPlaceWithWind(this.position, this.width, this.height); + } + } + + public bool HasMinionRestTarget => this.MinionRestTargetPoint != Vector2.Zero; + + public bool HasMinionAttackTargetNPC => this.MinionAttackTargetNPC != -1; + + public bool ItemTimeIsZero => this.itemTime == 0; + + public void SetItemTime(int frames) + { + this.itemTime = frames; + this.itemTimeMax = frames; + } + + public void ApplyItemTime(Item sItem) => this.SetItemTime(sItem.useTime); + + public void ApplyItemTime(Item sItem, float multiplier) => this.SetItemTime((int) ((double) sItem.useTime * (double) multiplier)); + + public void SetDummyItemTime(int frames) + { + this.itemAnimation = frames; + this.itemTime = frames; + this.itemTimeMax = frames + 1; + } + + private void SetItemAnimation(int frames) + { + this.itemAnimation = frames; + this.itemAnimationMax = frames; + } + + private void ApplyItemAnimation(Item sItem, float multiplier, int itemReuseDelay = 0) + { + this.SetItemAnimation((int) ((double) sItem.useAnimation * (double) multiplier)); + this.reuseDelay = itemReuseDelay; + } + + private void ApplyItemAnimation(Item sItem) + { + if (sItem.melee) + this.SetItemAnimation((int) ((double) sItem.useAnimation * (double) this.meleeSpeed)); + else if (sItem.summon && ItemID.Sets.SummonerWeaponThatScalesWithAttackSpeed[sItem.type]) + this.SetItemAnimation((int) ((double) sItem.useAnimation * (double) this.meleeSpeed)); + else if (sItem.createTile >= 0) + this.SetItemAnimation((int) ((double) sItem.useAnimation * (double) this.tileSpeed)); + else if (sItem.createWall >= 0) + { + this.SetItemAnimation((int) ((double) sItem.useAnimation * (double) this.wallSpeed)); + } + else + { + this.SetItemAnimation(sItem.useAnimation); + this.reuseDelay = sItem.reuseDelay; + } + } + + public bool InOpposingTeam(Player otherPlayer) + { + if (!this.hostile || !otherPlayer.hostile) + return false; + return otherPlayer.team == 0 || otherPlayer.team != this.team; + } + + public bool TeamChangeAllowed() => true; + + public void HealEffect(int healAmount, bool broadcast = true) + { + CombatText.NewText(new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height), CombatText.HealLife, healAmount); + if (!broadcast || Main.netMode != 1 || this.whoAmI != Main.myPlayer) + return; + NetMessage.SendData(35, number: this.whoAmI, number2: ((float) healAmount)); + } + + public void ManaEffect(int manaAmount) + { + CombatText.NewText(new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height), CombatText.HealMana, manaAmount); + if (Main.netMode != 1 || this.whoAmI != Main.myPlayer) + return; + NetMessage.SendData(43, number: this.whoAmI, number2: ((float) manaAmount)); + } + + public void InterruptItemUsageIfOverTile(int tileTypeToBeOver) + { + Tile tile = Main.tile[Player.tileTargetX, Player.tileTargetY]; + if (tile == null || !tile.active() || (int) tile.type != tileTypeToBeOver) + return; + Main.blockMouse = true; + } + + public Vector2 GetHelmetDrawOffset() + { + Vector2 vector2 = Vector2.Zero; + if ((this.hair == 15 || this.hair == 76 || this.hair == 108) && this.head == 222) + vector2 = new Vector2(0.0f, 4f) * this.Directions; + return vector2; + } + + public void AccumulateGolfingScore(int score) + { + int num = score; + if (this.golferScoreAccumulated + num > 1000000000) + num = 1000000000 - this.golferScoreAccumulated; + this.golferScoreAccumulated += num; + } + + public static byte FindClosest(Vector2 Position, int Width, int Height) + { + byte num1 = 0; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active) + { + num1 = (byte) index; + break; + } + } + float num2 = -1f; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && !Main.player[index].dead) + { + float num3 = Math.Abs((float) ((double) Main.player[index].position.X + (double) (Main.player[index].width / 2) - ((double) Position.X + (double) (Width / 2)))) + Math.Abs((float) ((double) Main.player[index].position.Y + (double) (Main.player[index].height / 2) - ((double) Position.Y + (double) (Height / 2)))); + if ((double) num2 == -1.0 || (double) num3 < (double) num2) + { + num2 = num3; + num1 = (byte) index; + } + } + } + return num1; + } + + public void ToggleInv() + { + bool interactAreShared = PlayerInput.GrappleAndInteractAreShared; + if (Main.mapFullscreen) + { + Main.mapFullscreen = false; + this.releaseInventory = false; + SoundEngine.PlaySound(11); + } + else if (PlayerInput.InBuildingMode) + PlayerInput.ExitBuildingMode(); + else if (Main.ingameOptionsWindow) + { + if (PlayerInput.UsingGamepadUI && UILinkPointNavigator.CurrentPage == 1002) + UILinkPointNavigator.ChangePage(1001); + else + IngameOptions.Close(); + } + else if (Main.inFancyUI) + IngameFancyUI.Close(); + else if (CaptureManager.Instance.Active) + CaptureManager.Instance.Active = false; + else if (this.talkNPC >= 0) + { + this.SetTalkNPC(-1); + Main.npcChatCornerItem = 0; + Main.npcChatText = ""; + SoundEngine.PlaySound(11); + if (PlayerInput.UsingGamepad) + Main.npcChatRelease = false; + } + else if (this.sign >= 0) + { + this.sign = -1; + Main.editSign = false; + Main.npcChatText = ""; + SoundEngine.PlaySound(11); + } + else if (Main.clothesWindow) + Main.CancelClothesWindow(); + else if (!Main.playerInventory) + { + Player.OpenInventory(); + } + else + { + Main.playerInventory = false; + if (this.channel && Main.mouseItem != null && !Main.mouseItem.IsAir) + this.channel = false; + this.tileEntityAnchor.Clear(); + if (!PlayerInput.UsingGamepad) + { + Main.EquipPageSelected = 0; + } + else + { + PlayerInput.NavigatorUnCachePosition(); + Main.GamepadCursorAlpha = 0.0f; + Player.BlockInteractionWithProjectiles = 3; + if (PlayerInput.GrappleAndInteractAreShared) + this.LockGamepadTileInteractions(); + } + SoundEngine.PlaySound(11); + if (ItemSlot.Options.HighlightNewItems) + { + foreach (Item obj in this.inventory) + obj.newAndShiny = false; + } + if (PlayerInput.UsingGamepad) + { + Main.npcChatRelease = false; + this.tileInteractionHappened = true; + this.releaseInventory = false; + Main.mouseRight = true; + } + } + if (!interactAreShared) + return; + this.GamepadEnableGrappleCooldown(); + } + + private static void OpenInventory() + { + Recipe.FindRecipes(); + Main.playerInventory = true; + Main.EquipPageSelected = 0; + SoundEngine.PlaySound(10); + } + + public void ToggleCreativeMenu() + { + if (this.dead || this.difficulty != (byte) 3) + return; + bool flag = false; + if (Main.mapFullscreen) + { + Main.mapFullscreen = false; + flag = true; + } + if (PlayerInput.InBuildingMode) + PlayerInput.ExitBuildingMode(); + if (Main.ingameOptionsWindow) + IngameOptions.Close(); + if (Main.inFancyUI) + IngameFancyUI.Close(); + if (CaptureManager.Instance.Active) + CaptureManager.Instance.Active = false; + if (this.talkNPC >= 0) + { + this.SetTalkNPC(-1); + Main.npcChatCornerItem = 0; + Main.npcChatText = ""; + flag = true; + if (PlayerInput.UsingGamepad) + Main.npcChatRelease = false; + } + if (this.sign >= 0) + { + this.sign = -1; + Main.editSign = false; + Main.npcChatText = ""; + flag = true; + } + else if (Main.clothesWindow) + Main.CancelClothesWindow(); + if (this.tileEntityAnchor.InUse) + { + Recipe.FindRecipes(); + this.tileEntityAnchor.Clear(); + flag = true; + } + if (flag) + SoundEngine.PlaySound(11); + if (!Main.playerInventory) + Player.OpenInventory(); + Main.CreativeMenu.ToggleMenu(); + } + + public void dropItemCheck() + { + if (!Main.playerInventory) + this.noThrow = 0; + if (this.noThrow > 0) + --this.noThrow; + GetItemSettings itemInDropItemCheck = GetItemSettings.GetItemInDropItemCheck; + if (!Main.InGuideCraftMenu && Main.guideItem.type > 0) + { + Main.guideItem.position = this.Center; + Item obj = this.GetItem(this.whoAmI, Main.guideItem, itemInDropItemCheck); + if (obj.stack > 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, obj.type, obj.stack, pfix: ((int) Main.guideItem.prefix), noGrabDelay: true); + Main.item[number].newAndShiny = false; + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + } + Main.guideItem = new Item(); + } + if (!Main.InReforgeMenu && Main.reforgeItem.type > 0) + { + Main.reforgeItem.position = this.Center; + Item obj = this.GetItem(this.whoAmI, Main.reforgeItem, itemInDropItemCheck); + if (obj.stack > 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, obj.type, obj.stack, pfix: ((int) Main.reforgeItem.prefix), noGrabDelay: true); + Main.item[number].newAndShiny = false; + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + } + Main.reforgeItem = new Item(); + } + if (Main.myPlayer == this.whoAmI) + this.inventory[58] = Main.mouseItem.Clone(); + bool flag = true; + if (Main.mouseItem.type > 0 && Main.mouseItem.stack > 0) + { + if (!Main.gamePaused) + { + Player.tileTargetX = (int) (((double) Main.mouseX + (double) Main.screenPosition.X) / 16.0); + Player.tileTargetY = (int) (((double) Main.mouseY + (double) Main.screenPosition.Y) / 16.0); + if ((double) this.gravDir == -1.0) + Player.tileTargetY = (int) (((double) Main.screenPosition.Y + (double) Main.screenHeight - (double) Main.mouseY) / 16.0); + } + if (this.selectedItem != 58) + this.oldSelectItem = this.selectedItem; + this.selectedItem = 58; + flag = false; + } + if (flag && this.selectedItem == 58 && this.ItemTimeIsZero && this.itemAnimation == 0) + this.selectedItem = this.oldSelectItem; + if (Main.mouseItem.type > 0 && !Main.playerInventory) + { + Main.mouseItem.position = this.Center; + Item obj = this.GetItem(this.whoAmI, Main.mouseItem, itemInDropItemCheck); + if (obj.stack > 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, obj.type, obj.stack, pfix: ((int) Main.mouseItem.prefix), noGrabDelay: true); + Main.item[number].newAndShiny = false; + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + } + Main.mouseItem = new Item(); + this.inventory[58] = new Item(); + Recipe.FindRecipes(); + } + if ((this.controlThrow && this.releaseThrow && !this.inventory[this.selectedItem].favorited && this.inventory[this.selectedItem].type > 0 && !Main.drawingPlayerChat || (Main.mouseRight && !this.mouseInterface && Main.mouseRightRelease || !Main.playerInventory) && Main.mouseItem.type > 0 && Main.mouseItem.stack > 0) && this.noThrow <= 0) + this.DropSelectedItem(); + if (!Main.gamePaused || this.selectedItem != 58) + return; + this.selectedItem = this.oldSelectItem; + } + + public void DropSelectedItem() + { + bool flag = false; + if (this.inventory[this.selectedItem].favorited) + { + this.inventory[this.selectedItem] = this.GetItem(this.whoAmI, this.inventory[this.selectedItem], GetItemSettings.GetItemInDropItemCheck); + if (this.selectedItem == 58) + Main.mouseItem = this.inventory[this.selectedItem]; + Recipe.FindRecipes(); + if (this.inventory[this.selectedItem].type == 0) + flag = true; + } + if (flag) + return; + Item obj = new Item(); + if ((Main.mouseRight && !this.mouseInterface && Main.mouseRightRelease || !Main.playerInventory) && Main.mouseItem.type > 0 && Main.mouseItem.stack > 0) + { + obj = this.inventory[this.selectedItem]; + this.inventory[this.selectedItem] = Main.mouseItem; + this.delayUseItem = true; + this.controlUseItem = false; + } + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, this.inventory[this.selectedItem].type); + this.inventory[this.selectedItem].position = Main.item[number].position; + Main.item[number] = this.inventory[this.selectedItem]; + this.inventory[this.selectedItem] = new Item(); + if (this.selectedItem == 58) + Main.mouseItem = new Item(); + if (Main.netMode == 0) + Main.item[number].noGrabDelay = 100; + Main.item[number].velocity.Y = -2f; + Main.item[number].velocity.X = (float) (4 * this.direction) + this.velocity.X; + Main.item[number].favorited = false; + Main.item[number].newAndShiny = false; + if ((Main.mouseRight && !this.mouseInterface || !Main.playerInventory) && Main.mouseItem.type > 0) + { + this.inventory[this.selectedItem] = obj; + Main.mouseItem = new Item(); + } + else + { + this.SetItemAnimation(10); + this.JustDroppedAnItem = true; + this.DropSelectedItem_InterruptActionsThatUseAnimations(); + } + Recipe.FindRecipes(); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number); + } + + private void DropSelectedItem_InterruptActionsThatUseAnimations() + { + if (this.heldProj >= 0) + { + Projectile projectile = Main.projectile[this.heldProj]; + if (projectile.active && projectile.owner == this.whoAmI) + projectile.Kill(); + } + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && projectile.owner == this.whoAmI && (projectile.aiStyle == 61 || projectile.aiStyle == 160)) + projectile.Kill(); + } + } + + public int FindBuffIndex(int type) + { + if (this.buffImmune[type]) + return -1; + for (int index = 0; index < 22; ++index) + { + if (this.buffTime[index] >= 1 && this.buffType[index] == type) + return index; + } + return -1; + } + + public void AddBuff(int type, int timeToAdd, bool quiet = true, bool foodHack = false) + { + if (this.buffImmune[type]) + return; + if (BuffID.Sets.IsWellFed[type]) + { + for (int b = 0; b < 22; ++b) + { + if (BuffID.Sets.IsWellFed[this.buffType[b]]) + this.DelBuff(b); + } + } + int buffTimeToAdd = this.AddBuff_DetermineBuffTimeToAdd(type, timeToAdd); + if (this.AddBuff_TryUpdatingExistingBuffTime(type, buffTimeToAdd)) + return; + if (!quiet && Main.netMode == 1) + NetMessage.SendData(55, number: this.whoAmI, number2: ((float) type), number3: ((float) buffTimeToAdd)); + this.AddBuff_RemoveOldPetBuffsOfMatchingType(type); + this.AddBuff_RemoveOldMeleeBuffsOfMatchingType(type); + this.AddBuff_ActuallyTryToAddTheBuff(type, buffTimeToAdd); + } + + private bool AddBuff_ActuallyTryToAddTheBuff(int type, int time) + { + int index1 = -1; + while (index1 == -1) + { + int b = -1; + for (int index2 = 0; index2 < 22; ++index2) + { + if (!Main.debuff[this.buffType[index2]]) + { + b = index2; + break; + } + } + if (b == -1) + return false; + for (int index3 = b; index3 < 22; ++index3) + { + if (this.buffType[index3] == 0) + { + index1 = index3; + break; + } + } + if (index1 == -1) + this.DelBuff(b); + } + this.buffType[index1] = type; + this.buffTime[index1] = time; + return true; + } + + private void AddBuff_RemoveOldMeleeBuffsOfMatchingType(int type) + { + if (!Main.meleeBuff[type]) + return; + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] != type && Main.meleeBuff[this.buffType[b]]) + { + this.DelBuff(b); + --b; + } + } + } + + private void AddBuff_RemoveOldPetBuffsOfMatchingType(int type) + { + if (Main.lightPet[type]) + { + for (int b = 0; b < 22; ++b) + { + if (Main.lightPet[this.buffType[b]]) + this.DelBuff(b); + } + } + if (!Main.vanityPet[type]) + return; + for (int b = 0; b < 22; ++b) + { + if (Main.vanityPet[this.buffType[b]]) + this.DelBuff(b); + } + } + + private bool AddBuff_TryUpdatingExistingBuffTime(int type, int time) + { + bool flag = false; + for (int index = 0; index < 22; ++index) + { + if (this.buffType[index] == type) + { + if (type == 94) + { + this.buffTime[index] += time; + if (this.buffTime[index] > Player.manaSickTimeMax) + this.buffTime[index] = Player.manaSickTimeMax; + } + else if (this.buffTime[index] < time) + this.buffTime[index] = time; + flag = true; + break; + } + } + return flag; + } + + private int AddBuff_DetermineBuffTimeToAdd(int type, int time1) + { + int num = time1; + if (Main.expertMode && this.whoAmI == Main.myPlayer && (type == 20 || type == 22 || type == 23 || type == 24 || type == 30 || type == 31 || type == 32 || type == 33 || type == 35 || type == 36 || type == 39 || type == 44 || type == 46 || type == 47 || type == 69 || type == 70 || type == 80)) + num = (int) ((double) Main.GameModeInfo.DebuffTimeMultiplier * (double) num); + return num; + } + + public void DelBuff(int b) + { + this.buffTime[b] = 0; + this.buffType[b] = 0; + for (int index1 = 0; index1 < 21; ++index1) + { + if (this.buffTime[index1] == 0 || this.buffType[index1] == 0) + { + for (int index2 = index1 + 1; index2 < 22; ++index2) + { + if (this.buffTime[index2] > 0 && this.buffType[index2] > 0) + { + this.buffTime[index1] = this.buffTime[index2]; + this.buffType[index1] = this.buffType[index2]; + this.buffTime[index2] = 0; + this.buffType[index2] = 0; + break; + } + } + } + } + } + + public void ClearBuff(int type) + { + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] == type) + this.DelBuff(b); + } + } + + public int CountBuffs() + { + int index1 = 0; + for (int index2 = 0; index2 < 22; ++index2) + { + if (this.buffType[index1] > 0) + ++index1; + } + return index1; + } + + public void QuickHeal() + { + if (this.cursed || this.CCed || this.dead || this.statLife == this.statLifeMax2 || this.potionDelay > 0) + return; + Item itemToUse = this.QuickHeal_GetItemToUse(); + if (itemToUse == null) + return; + SoundEngine.PlaySound(itemToUse.UseSound, this.position); + if (itemToUse.potion) + { + if (itemToUse.type == 227) + { + this.potionDelay = this.restorationDelayTime; + this.AddBuff(21, this.potionDelay); + } + else + { + this.potionDelay = this.potionDelayTime; + this.AddBuff(21, this.potionDelay); + } + } + this.statLife += itemToUse.healLife; + this.statMana += itemToUse.healMana; + if (this.statLife > this.statLifeMax2) + this.statLife = this.statLifeMax2; + if (this.statMana > this.statManaMax2) + this.statMana = this.statManaMax2; + if (itemToUse.healLife > 0 && Main.myPlayer == this.whoAmI) + this.HealEffect(itemToUse.healLife); + if (itemToUse.healMana > 0) + { + this.AddBuff(94, Player.manaSickTime); + if (Main.myPlayer == this.whoAmI) + this.ManaEffect(itemToUse.healMana); + } + --itemToUse.stack; + if (itemToUse.stack <= 0) + itemToUse.TurnToAir(); + Recipe.FindRecipes(); + } + + public Item QuickHeal_GetItemToUse() + { + int num1 = this.statLifeMax2 - this.statLife; + Item obj1 = (Item) null; + int num2 = -this.statLifeMax2; + for (int index = 0; index < 58; ++index) + { + Item obj2 = this.inventory[index]; + if (obj2.stack > 0 && obj2.type > 0 && obj2.potion && obj2.healLife > 0) + { + int num3 = obj2.healLife - num1; + if (obj2.type == 227 && num3 < 0) + { + num3 += 30; + if (num3 > 0) + num3 = 0; + } + if (num2 < 0) + { + if (num3 > num2) + { + obj1 = obj2; + num2 = num3; + } + } + else if (num3 < num2 && num3 >= 0) + { + obj1 = obj2; + num2 = num3; + } + } + } + return obj1; + } + + public void QuickMana() + { + if (this.cursed || this.CCed || this.dead || this.statMana == this.statManaMax2) + return; + for (int index = 0; index < 58; ++index) + { + if (this.inventory[index].stack > 0 && this.inventory[index].type > 0 && this.inventory[index].healMana > 0 && (this.potionDelay == 0 || !this.inventory[index].potion)) + { + SoundEngine.PlaySound(this.inventory[index].UseSound, this.position); + if (this.inventory[index].potion) + { + if (this.inventory[index].type == 227) + { + this.potionDelay = this.restorationDelayTime; + this.AddBuff(21, this.potionDelay); + } + else + { + this.potionDelay = this.potionDelayTime; + this.AddBuff(21, this.potionDelay); + } + } + this.statLife += this.inventory[index].healLife; + this.statMana += this.inventory[index].healMana; + if (this.statLife > this.statLifeMax2) + this.statLife = this.statLifeMax2; + if (this.statMana > this.statManaMax2) + this.statMana = this.statManaMax2; + if (this.inventory[index].healLife > 0 && Main.myPlayer == this.whoAmI) + this.HealEffect(this.inventory[index].healLife); + if (this.inventory[index].healMana > 0) + { + this.AddBuff(94, Player.manaSickTime); + if (Main.myPlayer == this.whoAmI) + this.ManaEffect(this.inventory[index].healMana); + } + --this.inventory[index].stack; + if (this.inventory[index].stack <= 0) + this.inventory[index].TurnToAir(); + Recipe.FindRecipes(); + break; + } + } + } + + public Item QuickMana_GetItemToUse() + { + for (int index = 0; index < 58; ++index) + { + if (this.inventory[index].stack > 0 && this.inventory[index].type > 0 && this.inventory[index].healMana > 0 && (this.potionDelay == 0 || !this.inventory[index].potion)) + return this.inventory[index]; + } + return (Item) null; + } + + public void QuickBuff() + { + if (this.cursed || this.CCed || this.dead) + return; + LegacySoundStyle type = (LegacySoundStyle) null; + if (this.CountBuffs() == 22) + return; + Item obj1 = this.QuickBuff_PickBestFoodItem(); + if (obj1 != null) + { + type = obj1.UseSound; + int timeToAdd = obj1.buffTime; + if (timeToAdd == 0) + timeToAdd = 3600; + this.AddBuff(obj1.buffType, timeToAdd); + if (obj1.consumable) + { + --obj1.stack; + if (obj1.stack <= 0) + obj1.TurnToAir(); + } + } + if (this.CountBuffs() != 22) + { + for (int index = 0; index < 58; ++index) + { + Item obj2 = this.inventory[index]; + if (obj2.stack > 0 && obj2.type > 0 && obj2.buffType > 0 && !obj2.summon) + { + int num = obj2.buffType; + bool flag = this.QuickBuff_ShouldBotherUsingThisBuff(num); + if (obj2.mana > 0 & flag) + { + if (this.statMana >= (int) ((double) obj2.mana * (double) this.manaCost)) + { + this.manaRegenDelay = (int) this.maxRegenDelay; + this.statMana -= (int) ((double) obj2.mana * (double) this.manaCost); + } + else + flag = false; + } + if (this.whoAmI == Main.myPlayer && obj2.type == 603 && !Main.runningCollectorsEdition) + flag = false; + if (num == 27) + { + num = Main.rand.Next(3); + if (num == 0) + num = 27; + if (num == 1) + num = 101; + if (num == 2) + num = 102; + } + if (flag) + { + type = obj2.UseSound; + int timeToAdd = obj2.buffTime; + if (timeToAdd == 0) + timeToAdd = 3600; + this.AddBuff(num, timeToAdd); + if (obj2.consumable) + { + --obj2.stack; + if (obj2.stack <= 0) + obj2.TurnToAir(); + } + if (this.CountBuffs() == 22) + break; + } + } + } + } + if (type == null) + return; + SoundEngine.PlaySound(type, this.position); + Recipe.FindRecipes(); + } + + private Item QuickBuff_PickBestFoodItem() + { + int num = 0; + Item obj1 = (Item) null; + for (int index = 0; index < 22; ++index) + { + if (this.buffTime[index] >= 1) + { + int foodPriority = this.QuickBuff_FindFoodPriority(this.buffType[index]); + if (num <= foodPriority) + num = foodPriority + 1; + } + } + for (int index = 0; index < 58; ++index) + { + Item obj2 = this.inventory[index]; + if (!obj2.IsAir) + { + int foodPriority = this.QuickBuff_FindFoodPriority(obj2.buffType); + if (foodPriority >= num && (obj1 == null || obj1.buffTime < obj2.buffTime || foodPriority > num)) + { + obj1 = obj2; + num = foodPriority; + } + } + } + return obj1; + } + + private int QuickBuff_FindFoodPriority(int buffType) + { + switch (buffType) + { + case 26: + return 1; + case 206: + return 2; + case 207: + return 3; + default: + return 0; + } + } + + private bool QuickBuff_ShouldBotherUsingThisBuff(int attemptedType) + { + bool flag = true; + for (int index = 0; index < 22; ++index) + { + if (attemptedType == 27 && (this.buffType[index] == 27 || this.buffType[index] == 101 || this.buffType[index] == 102)) + { + flag = false; + break; + } + if (BuffID.Sets.IsWellFed[attemptedType] && BuffID.Sets.IsWellFed[this.buffType[index]]) + { + flag = false; + break; + } + if (this.buffType[index] == attemptedType) + { + flag = false; + break; + } + if (Main.meleeBuff[attemptedType] && Main.meleeBuff[this.buffType[index]]) + { + flag = false; + break; + } + } + if (Main.lightPet[attemptedType] || Main.vanityPet[attemptedType]) + { + for (int index = 0; index < 22; ++index) + { + if (Main.lightPet[this.buffType[index]] && Main.lightPet[attemptedType]) + flag = false; + if (Main.vanityPet[this.buffType[index]] && Main.vanityPet[attemptedType]) + flag = false; + } + } + return flag; + } + + public void QuickMount() + { + if (this.mount.Active) + { + this.mount.Dismount(this); + } + else + { + if (this.frozen || this.tongued || this.webbed || this.stoned || (double) this.gravDir == -1.0 || this.dead || this.noItems) + return; + Item itemToUse = this.QuickMount_GetItemToUse(); + if (itemToUse != null && itemToUse.mountType != -1 && this.mount.CanMount(itemToUse.mountType, this)) + { + if (this.QuickMinecartSnap()) + return; + this.mount.SetMount(itemToUse.mountType, this); + if (itemToUse.UseSound == null) + return; + SoundEngine.PlaySound(itemToUse.UseSound, this.Center); + } + else + this.QuickMinecart(); + } + } + + public bool CanFitSpace(int heightBoost) + { + int Height = 42 + heightBoost; + return Collision.IsClearSpotTest(this.position + new Vector2(0.0f, (float) (this.height - Height)) + this.velocity, 16f, this.width, Height, true, true); + } + + private void QuickMinecart() + { + int num1 = 0; + int num2 = (int) ((double) this.position.X / 16.0) - Player.tileRangeX - num1 + 1; + int num3 = (int) (((double) this.position.X + (double) this.width) / 16.0) + Player.tileRangeX + num1 - 1; + int num4 = (int) ((double) this.position.Y / 16.0) - Player.tileRangeY - num1 + 1; + int num5 = (int) (((double) this.position.Y + (double) this.height) / 16.0) + Player.tileRangeY + num1 - 2; + int max = Main.maxTilesX - 10; + int num6 = Utils.Clamp(num2, 10, max); + int num7 = Utils.Clamp(num3, 10, Main.maxTilesX - 10); + int num8 = Utils.Clamp(num4, 10, Main.maxTilesY - 10); + int num9 = Utils.Clamp(num5, 10, Main.maxTilesY - 10); + List tilesIn = Collision.GetTilesIn(new Vector2((float) num6, (float) num8) * 16f, new Vector2((float) (num7 + 1), (float) (num9 + 1)) * 16f); + if (tilesIn.Count <= 0) + return; + Point? nullable = new Point?(); + Microsoft.Xna.Framework.Rectangle hitbox = this.Hitbox; + for (int index = 0; index < tilesIn.Count; ++index) + { + Point point = tilesIn[index]; + Tile tileSafely = Framing.GetTileSafely(point.X, point.Y); + if (tileSafely.active() && tileSafely.type == (ushort) 314) + { + Vector2 vector2 = tilesIn[index].ToVector2() * 16f + new Vector2(8f); + if (!nullable.HasValue || (double) this.Distance(vector2) < (double) this.Distance(nullable.Value.ToVector2() * 16f + new Vector2(8f)) && Collision.CanHitLine(this.Center, 0, 0, vector2, 0, 0)) + nullable = new Point?(tilesIn[index]); + } + } + if (!nullable.HasValue) + return; + this.LaunchMinecartHook(nullable.Value.X, nullable.Value.Y); + } + + private bool QuickMinecartSnap() + { + bool flag = false; + List tilesIn = Collision.GetTilesIn(this.TopLeft - new Vector2(24f), this.BottomRight + new Vector2(24f)); + if (tilesIn.Count > 0) + { + Point? nullable = new Point?(); + Microsoft.Xna.Framework.Rectangle hitbox = this.Hitbox; + for (int index = 0; index < tilesIn.Count; ++index) + { + Point point = tilesIn[index]; + Tile tileSafely = Framing.GetTileSafely(point.X, point.Y); + if (tileSafely.active() && tileSafely.type == (ushort) 314) + { + Vector2 vector2 = tilesIn[index].ToVector2() * 16f + new Vector2(8f); + if (!nullable.HasValue || (double) this.Distance(vector2) < (double) this.Distance(nullable.Value.ToVector2() * 16f + new Vector2(8f)) && Collision.CanHitLine(this.Center, 0, 0, vector2, 0, 0)) + nullable = new Point?(tilesIn[index]); + } + } + if (nullable.HasValue) + { + this.LaunchMinecartHook(nullable.Value.X, nullable.Value.Y); + flag = true; + } + } + return flag; + } + + public Item QuickMount_GetItemToUse() + { + Item obj = (Item) null; + if (obj == null && this.miscEquips[3].mountType != -1 && !MountID.Sets.Cart[this.miscEquips[3].mountType]) + obj = this.miscEquips[3]; + if (obj == null) + { + for (int index = 0; index < 58; ++index) + { + if (this.inventory[index].mountType != -1 && !MountID.Sets.Cart[this.inventory[index].mountType]) + { + obj = this.inventory[index]; + break; + } + } + } + return obj; + } + + public void ClearGrapplingBlacklist() => this._blackListedTileCoordsForGrappling.Clear(); + + public bool IsBlacklistedForGrappling(Point p) => this._blackListedTileCoordsForGrappling.Contains(p); + + public void UpdateBlacklistedTilesForGrappling() + { + this.ClearGrapplingBlacklist(); + for (int index1 = 0; index1 < 1000; ++index1) + { + if (Main.projectile[index1].active && Main.projectile[index1].owner == this.whoAmI && Main.projectile[index1].aiStyle == 7 && (double) Main.projectile[index1].ai[0] == 2.0) + { + Point tileCoordinates = Main.projectile[index1].Center.ToTileCoordinates(); + for (int index2 = -1; index2 <= 1; ++index2) + { + for (int index3 = -1; index3 <= 1; ++index3) + { + if (!WorldGen.SolidTile(tileCoordinates.X + index2, tileCoordinates.Y + index3)) + this._blackListedTileCoordsForGrappling.Add(new Point(tileCoordinates.X + index2, tileCoordinates.Y + index3)); + } + } + } + } + } + + public void QuickGrapple() + { + if (this.frozen || this.tongued || this.webbed || this.stoned || this.dead) + return; + if (PlayerInput.GrappleAndInteractAreShared) + { + if (Main.HoveringOverAnNPC || Main.SmartInteractShowingGenuine || Main.SmartInteractShowingFake || this._quickGrappleCooldown > 0 && !Main.mapFullscreen || WiresUI.Settings.DrawToolModeUI) + return; + int num = this.controlUseTile ? 1 : 0; + bool releaseUseTile = this.releaseUseTile; + if (num == 0 && !releaseUseTile) + return; + Tile tileSafely = Framing.GetTileSafely(Player.tileTargetX, Player.tileTargetY); + if (tileSafely.active() && (tileSafely.type == (ushort) 4 || tileSafely.type == (ushort) 33 || tileSafely.type == (ushort) 372 || tileSafely.type == (ushort) 174 || tileSafely.type == (ushort) 49) || this.inventory[this.selectedItem].type == 3384) + return; + } + if (this.noItems) + return; + if (this.mount.Active) + this.mount.Dismount(this); + Item obj = this.QuickGrapple_GetItemToUse(); + if (obj == null) + return; + if (obj.shoot == 73) + { + int num = 0; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == Main.myPlayer && (Main.projectile[index].type == 73 || Main.projectile[index].type == 74)) + ++num; + } + if (num > 1) + obj = (Item) null; + } + else if (obj.shoot == 165) + { + int num = 0; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == Main.myPlayer && Main.projectile[index].type == 165) + ++num; + } + if (num > 8) + obj = (Item) null; + } + else if (obj.shoot == 372) + { + int num = 0; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == Main.myPlayer && Main.projectile[index].type == 372) + ++num; + } + if (num > 2) + obj = (Item) null; + } + else if (obj.shoot == 652) + { + int num = 0; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == Main.myPlayer && Main.projectile[index].type == 652) + ++num; + } + if (num > 1) + obj = (Item) null; + } + else if (obj.type == 3572) + { + int num = 0; + bool flag = false; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == Main.myPlayer && Main.projectile[index].type >= 646 && Main.projectile[index].type <= 649) + { + ++num; + if ((double) Main.projectile[index].ai[0] == 2.0) + flag = true; + } + } + if (num > 4 || !flag && num > 3) + obj = (Item) null; + } + else + { + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == Main.myPlayer && Main.projectile[index].type == obj.shoot && (double) Main.projectile[index].ai[0] != 2.0) + { + obj = (Item) null; + break; + } + } + } + if (obj == null) + return; + this.UpdateBlacklistedTilesForGrappling(); + SoundEngine.PlaySound(obj.UseSound, this.position); + if (Main.netMode == 1 && this.whoAmI == Main.myPlayer) + NetMessage.SendData(51, number: this.whoAmI, number2: 2f); + int Type = obj.shoot; + float shootSpeed = obj.shootSpeed; + int damage = obj.damage; + float knockBack = obj.knockBack; + if (Type == 13 || Type == 32 || Type == 315 || Type >= 230 && Type <= 235 || Type == 331 || Type == 753 || Type == 865 || Type == 935) + { + this.grappling[0] = -1; + this.grapCount = 0; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == this.whoAmI) + { + switch (Main.projectile[index].type) + { + case 13: + case 230: + case 231: + case 232: + case 233: + case 234: + case 235: + case 315: + case 331: + case 753: + case 865: + case 935: + Main.projectile[index].Kill(); + continue; + default: + continue; + } + } + } + } + if (Type == 256) + { + int num1 = 0; + int index1 = -1; + int num2 = 100000; + for (int index2 = 0; index2 < 1000; ++index2) + { + if (Main.projectile[index2].active && Main.projectile[index2].owner == this.whoAmI && Main.projectile[index2].type == 256) + { + ++num1; + if (Main.projectile[index2].timeLeft < num2) + { + index1 = index2; + num2 = Main.projectile[index2].timeLeft; + } + } + } + if (num1 > 1) + Main.projectile[index1].Kill(); + } + if (Type == 652) + { + int num3 = 0; + int index3 = -1; + int num4 = 100000; + for (int index4 = 0; index4 < 1000; ++index4) + { + if (Main.projectile[index4].active && Main.projectile[index4].owner == this.whoAmI && Main.projectile[index4].type == 652) + { + ++num3; + if (Main.projectile[index4].timeLeft < num4) + { + index3 = index4; + num4 = Main.projectile[index4].timeLeft; + } + } + } + if (num3 > 1) + Main.projectile[index3].Kill(); + } + if (Type == 73) + { + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == this.whoAmI && Main.projectile[index].type == 73) + Type = 74; + } + } + if (obj.type == 3572) + { + int num5 = -1; + int num6 = -1; + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && projectile.owner == this.whoAmI && projectile.type >= 646 && projectile.type <= 649 && (num6 == -1 || num6 < projectile.timeLeft)) + { + num5 = projectile.type; + num6 = projectile.timeLeft; + } + } + switch (num5) + { + case -1: + case 649: + Type = 646; + break; + case 646: + Type = 647; + break; + case 647: + Type = 648; + break; + case 648: + Type = 649; + break; + } + } + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float f1 = (float) Main.mouseX + Main.screenPosition.X - vector2.X; + float f2 = (float) Main.mouseY + Main.screenPosition.Y - vector2.Y; + if ((double) this.gravDir == -1.0) + f2 = Main.screenPosition.Y + (float) Main.screenHeight - (float) Main.mouseY - vector2.Y; + float num7 = (float) Math.Sqrt((double) f1 * (double) f1 + (double) f2 * (double) f2); + float num8; + if (float.IsNaN(f1) && float.IsNaN(f2) || (double) f1 == 0.0 && (double) f2 == 0.0) + { + f1 = (float) this.direction; + f2 = 0.0f; + num8 = shootSpeed; + } + else + num8 = shootSpeed / num7; + float SpeedX = f1 * num8; + float SpeedY = f2 * num8; + Projectile.NewProjectile(vector2.X, vector2.Y, SpeedX, SpeedY, Type, damage, knockBack, this.whoAmI); + } + + public Item QuickGrapple_GetItemToUse() + { + Item obj = (Item) null; + if (Main.projHook[this.miscEquips[4].shoot]) + obj = this.miscEquips[4]; + if (obj == null) + { + for (int index = 0; index < 58; ++index) + { + if (Main.projHook[this.inventory[index].shoot]) + { + obj = this.inventory[index]; + break; + } + } + } + return obj; + } + + public void StatusToNPC(int type, int i) + { + if (this.meleeEnchant > (byte) 0) + { + if (this.meleeEnchant == (byte) 1) + Main.npc[i].AddBuff(70, 60 * Main.rand.Next(5, 10)); + if (this.meleeEnchant == (byte) 2) + Main.npc[i].AddBuff(39, 60 * Main.rand.Next(3, 7)); + if (this.meleeEnchant == (byte) 3) + Main.npc[i].AddBuff(24, 60 * Main.rand.Next(3, 7)); + if (this.meleeEnchant == (byte) 5) + Main.npc[i].AddBuff(69, 60 * Main.rand.Next(10, 20)); + if (this.meleeEnchant == (byte) 6) + Main.npc[i].AddBuff(31, 60 * Main.rand.Next(1, 4)); + if (this.meleeEnchant == (byte) 8) + Main.npc[i].AddBuff(20, 60 * Main.rand.Next(5, 10)); + if (this.meleeEnchant == (byte) 4) + Main.npc[i].AddBuff(72, 120); + } + if (this.frostBurn) + Main.npc[i].AddBuff(44, 60 * Main.rand.Next(5, 15)); + if (this.magmaStone) + { + if (Main.rand.Next(4) == 0) + Main.npc[i].AddBuff(24, 360); + else if (Main.rand.Next(2) == 0) + Main.npc[i].AddBuff(24, 240); + else + Main.npc[i].AddBuff(24, 120); + } + if (type == 3211) + Main.npc[i].AddBuff(69, 60 * Main.rand.Next(5, 10)); + if (type == 121) + { + if (Main.rand.Next(2) != 0) + return; + Main.npc[i].AddBuff(24, 180); + } + else if (type == 3823) + { + if (Main.rand.Next(4) != 0) + return; + Main.npc[i].AddBuff(24, 300); + } + else if (type == 122) + { + if (Main.rand.Next(10) != 0) + return; + Main.npc[i].AddBuff(24, 180); + } + else if (type == 190) + { + if (Main.rand.Next(4) != 0) + return; + Main.npc[i].AddBuff(20, 420); + } + else if (type == 217) + { + if (Main.rand.Next(5) != 0) + return; + Main.npc[i].AddBuff(24, 180); + } + else + { + if (type != 1123 || Main.rand.Next(10) == 0) + return; + Main.npc[i].AddBuff(31, 120); + } + } + + public void StatusToPlayerPvP(int type, int i) + { + if (this.meleeEnchant > (byte) 0) + { + if (this.meleeEnchant == (byte) 1) + Main.player[i].AddBuff(70, 60 * Main.rand.Next(5, 10)); + if (this.meleeEnchant == (byte) 2) + Main.player[i].AddBuff(39, 60 * Main.rand.Next(3, 7)); + if (this.meleeEnchant == (byte) 3) + Main.player[i].AddBuff(24, 60 * Main.rand.Next(3, 7)); + if (this.meleeEnchant == (byte) 5) + Main.player[i].AddBuff(69, 60 * Main.rand.Next(10, 20)); + if (this.meleeEnchant == (byte) 6) + Main.player[i].AddBuff(31, 60 * Main.rand.Next(1, 4)); + if (this.meleeEnchant == (byte) 8) + Main.player[i].AddBuff(20, 60 * Main.rand.Next(5, 10)); + } + if (this.frostBurn) + Main.player[i].AddBuff(44, 60 * Main.rand.Next(1, 8)); + if (this.magmaStone) + { + if (Main.rand.Next(7) == 0) + Main.player[i].AddBuff(24, 360); + else if (Main.rand.Next(3) == 0) + Main.player[i].AddBuff(24, 120); + else + Main.player[i].AddBuff(24, 60); + } + switch (type) + { + case 121: + if (Main.rand.Next(2) != 0) + break; + Main.player[i].AddBuff(24, 180, false); + break; + case 122: + if (Main.rand.Next(10) != 0) + break; + Main.player[i].AddBuff(24, 180, false); + break; + case 190: + if (Main.rand.Next(4) != 0) + break; + Main.player[i].AddBuff(20, 420, false); + break; + case 217: + if (Main.rand.Next(5) != 0) + break; + Main.player[i].AddBuff(24, 180, false); + break; + case 1123: + if (Main.rand.Next(9) == 0) + break; + Main.player[i].AddBuff(31, 120, false); + break; + case 3823: + if (Main.rand.Next(4) != 0) + break; + Main.player[i].AddBuff(24, 300); + break; + } + } + + public void Ghost() + { + this.immune = false; + this.immuneAlpha = 0; + if (Main.hasFocus && this.whoAmI == Main.myPlayer) + { + this.controlUp = false; + this.controlLeft = false; + this.controlDown = false; + this.controlRight = false; + this.controlJump = false; + if (!Main.drawingPlayerChat && !Main.editSign && !Main.editChest && !Main.blockInput) + { + PlayerInput.Triggers.Current.CopyInto(this); + if (Main.netMode == 1) + { + bool flag = false; + if (this.controlUp != Main.clientPlayer.controlUp) + flag = true; + if (this.controlDown != Main.clientPlayer.controlDown) + flag = true; + if (this.controlLeft != Main.clientPlayer.controlLeft) + flag = true; + if (this.controlRight != Main.clientPlayer.controlRight) + flag = true; + if (this.controlJump != Main.clientPlayer.controlJump) + flag = true; + if (this.controlUseItem != Main.clientPlayer.controlUseItem) + flag = true; + if (this.selectedItem != Main.clientPlayer.selectedItem) + flag = true; + if (flag) + NetMessage.SendData(13, number: Main.myPlayer); + } + } + } + if (this.controlUp || this.controlJump) + { + if ((double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.9f; + this.velocity.Y -= 0.1f; + if ((double) this.velocity.Y < -3.0) + this.velocity.Y = -3f; + } + else if (this.controlDown) + { + if ((double) this.velocity.Y < 0.0) + this.velocity.Y *= 0.9f; + this.velocity.Y += 0.1f; + if ((double) this.velocity.Y > 3.0) + this.velocity.Y = 3f; + } + else if ((double) this.velocity.Y < -0.1 || (double) this.velocity.Y > 0.1) + this.velocity.Y *= 0.9f; + else + this.velocity.Y = 0.0f; + if (this.controlLeft && !this.controlRight) + { + if ((double) this.velocity.X > 0.0) + this.velocity.X *= 0.9f; + this.velocity.X -= 0.1f; + if ((double) this.velocity.X < -3.0) + this.velocity.X = -3f; + } + else if (this.controlRight && !this.controlLeft) + { + if ((double) this.velocity.X < 0.0) + this.velocity.X *= 0.9f; + this.velocity.X += 0.1f; + if ((double) this.velocity.X > 3.0) + this.velocity.X = 3f; + } + else if ((double) this.velocity.X < -0.1 || (double) this.velocity.X > 0.1) + this.velocity.X *= 0.9f; + else + this.velocity.X = 0.0f; + this.position = this.position + this.velocity; + ++this.ghostFrameCounter; + if ((double) this.velocity.X < 0.0) + this.direction = -1; + else if ((double) this.velocity.X > 0.0) + this.direction = 1; + if (this.ghostFrameCounter >= 8) + { + this.ghostFrameCounter = 0; + ++this.ghostFrame; + if (this.ghostFrame >= 4) + this.ghostFrame = 0; + } + if ((double) this.position.X < (double) Main.leftWorld + (double) (Lighting.OffScreenTiles * 16) + 16.0) + { + this.position.X = (float) ((double) Main.leftWorld + (double) (Lighting.OffScreenTiles * 16) + 16.0); + this.velocity.X = 0.0f; + } + if ((double) this.position.X + (double) this.width > (double) Main.rightWorld - (double) (Lighting.OffScreenTiles * 16) - 32.0) + { + this.position.X = (float) ((double) Main.rightWorld - (double) (Lighting.OffScreenTiles * 16) - 32.0) - (float) this.width; + this.velocity.X = 0.0f; + } + if ((double) this.position.Y < (double) Main.topWorld + (double) (Lighting.OffScreenTiles * 16) + 16.0) + { + this.position.Y = (float) ((double) Main.topWorld + (double) (Lighting.OffScreenTiles * 16) + 16.0); + if ((double) this.velocity.Y < -0.1) + this.velocity.Y = -0.1f; + } + if ((double) this.position.Y <= (double) Main.bottomWorld - (double) (Lighting.OffScreenTiles * 16) - 32.0 - (double) this.height) + return; + this.position.Y = (float) ((double) Main.bottomWorld - (double) (Lighting.OffScreenTiles * 16) - 32.0) - (float) this.height; + this.velocity.Y = 0.0f; + } + + public void OnHit(float x, float y, Entity victim) + { + if (Main.myPlayer != this.whoAmI) + return; + bool flag = victim is NPC && ((NPC) victim).type == 488; + if (victim is NPC) + Main.BigBossProgressBar.TryTracking(victim.whoAmI); + if (this.onHitTitaniumStorm && !flag) + { + this.AddBuff(306, 600); + if (this.ownedProjectileCounts[908] < 7) + { + ++this.ownedProjectileCounts[908]; + Projectile.NewProjectile(this.Center, Vector2.Zero, 908, 50, 15f, this.whoAmI); + } + } + if (this.onHitDodge && this.shadowDodgeTimer == 0 && Main.rand.Next(4) == 0) + { + if (!this.shadowDodge) + this.shadowDodgeTimer = 1800; + this.AddBuff(59, 1800); + } + if (this.onHitRegen) + this.AddBuff(58, 300); + if (this.stardustMinion && victim is NPC) + { + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && projectile.owner == this.whoAmI && projectile.type == 613 && (double) projectile.localAI[1] <= 0.0 && Main.rand.Next(2) == 0) + { + Vector2 vector2 = new Vector2(x, y) - projectile.Center; + if ((double) vector2.Length() > 0.0) + vector2.Normalize(); + vector2 *= 20f; + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, vector2.X, vector2.Y, 614, projectile.damage / 3, 0.0f, projectile.owner, ai1: ((float) victim.whoAmI)); + projectile.localAI[1] = (float) (30 + Main.rand.Next(4) * 10); + } + } + } + if (this.onHitPetal && this.petalTimer == 0) + { + this.petalTimer = 20; + double num1 = (double) this.position.X + (double) (this.width / 2); + int direction = this.direction; + float x1 = Main.screenPosition.X; + if (direction < 0) + x1 += (float) Main.screenWidth; + float num2 = Main.screenPosition.Y + (float) Main.rand.Next(Main.screenHeight); + Vector2 vector2 = new Vector2(x1, num2); + float num3 = x - vector2.X; + float num4 = y - vector2.Y; + float num5 = num3 + (float) Main.rand.Next(-50, 51) * 0.1f; + float num6 = num4 + (float) Main.rand.Next(-50, 51) * 0.1f; + float num7 = 24f / (float) Math.Sqrt((double) num5 * (double) num5 + (double) num6 * (double) num6); + float SpeedX = num5 * num7; + float SpeedY = num6 * num7; + Projectile.NewProjectile(x1, num2, SpeedX, SpeedY, 221, 36, 0.0f, this.whoAmI); + } + if (!this.crystalLeaf || this.petalTimer != 0) + return; + int type = this.inventory[this.selectedItem].type; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].owner == this.whoAmI && Main.projectile[index].type == 226) + { + this.petalTimer = 50; + Vector2 vector2 = new Vector2(Main.projectile[index].position.X + (float) this.width * 0.5f, Main.projectile[index].position.Y + (float) this.height * 0.5f); + float num8 = x - vector2.X; + float num9 = y - vector2.Y; + float num10 = (float) (12.0 / Math.Sqrt((double) num8 * (double) num8 + (double) num9 * (double) num9)); + float SpeedX = num8 * num10; + float SpeedY = num9 * num10; + Projectile.NewProjectile(Main.projectile[index].Center.X - 4f, Main.projectile[index].Center.Y, SpeedX, SpeedY, 227, Player.crystalLeafDamage, (float) Player.crystalLeafKB, this.whoAmI); + break; + } + } + } + + public void openPresent() + { + if (Main.rand.Next(15) == 0 && Main.hardMode) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 602); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else if (Main.rand.Next(30) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1922); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else if (Main.rand.Next(400) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1927); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else if (Main.rand.Next(150) == 0) + { + int number1 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1870); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number1, number2: 1f); + int number2 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 97, Main.rand.Next(30, 61)); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number2, number2: 1f); + } + else if (Main.rand.Next(150) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1909); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else if (Main.rand.Next(150) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1917); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else if (Main.rand.Next(150) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1915); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else if (Main.rand.Next(150) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1918); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else if (Main.rand.Next(150) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1921); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else if (Main.rand.Next(300) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1923); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else if (Main.rand.Next(40) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1907); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else if (Main.rand.Next(10) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1908); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else if (Main.rand.Next(15) == 0) + { + switch (Main.rand.Next(5)) + { + case 0: + int number3 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1932); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number3, number2: 1f); + int number4 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1933); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number4, number2: 1f); + int number5 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1934); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number5, number2: 1f); + break; + case 1: + int number6 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1935); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number6, number2: 1f); + int number7 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1936); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number7, number2: 1f); + int number8 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1937); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number8, number2: 1f); + break; + case 2: + int number9 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1940); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number9, number2: 1f); + int number10 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1941); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number10, number2: 1f); + int number11 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1942); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number11, number2: 1f); + break; + case 3: + int number12 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1938); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number12, number2: 1f); + break; + case 4: + int number13 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1939); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number13, number2: 1f); + break; + } + } + else if (Main.rand.Next(7) == 0) + { + int Type = Main.rand.Next(3); + if (Type == 0) + Type = 1911; + if (Type == 1) + Type = 1919; + if (Type == 2) + Type = 1920; + int number14 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number14, number2: 1f); + } + else if (Main.rand.Next(8) == 0) + { + int number15 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1912, Main.rand.Next(1, 4)); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number15, number2: 1f); + } + else if (Main.rand.Next(9) == 0) + { + int number16 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1913, Main.rand.Next(20, 41)); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number16, number2: 1f); + } + else + { + switch (Main.rand.Next(3)) + { + case 0: + int number17 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1872, Main.rand.Next(20, 50)); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number17, number2: 1f); + break; + case 1: + int number18 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 586, Main.rand.Next(20, 50)); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number18, number2: 1f); + break; + default: + int number19 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 591, Main.rand.Next(20, 50)); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number19, number2: 1f); + break; + } + } + } + + public void QuickSpawnItem(int item, int stack = 1) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, item, stack, pfix: -1); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + + public void OpenBossBag(int type) + { + switch (type) + { + case 3318: + if (Main.rand.Next(2) == 0) + this.QuickSpawnItem(2430); + if (Main.rand.Next(7) == 0) + this.QuickSpawnItem(2493); + int num1 = Main.rand.Next(256, 259); + int num2 = Main.rand.Next(256, 259); + while (num2 == num1) + num2 = Main.rand.Next(256, 259); + this.QuickSpawnItem(num1); + this.QuickSpawnItem(num2); + if (Main.rand.Next(2) == 0) + this.QuickSpawnItem(2610); + else + this.QuickSpawnItem(2585); + this.QuickSpawnItem(998); + this.QuickSpawnItem(3090); + break; + case 3319: + if (Main.rand.Next(7) == 0) + this.QuickSpawnItem(2112); + if (Main.rand.Next(30) == 0) + this.QuickSpawnItem(1299); + if (WorldGen.crimson) + { + this.QuickSpawnItem(880, Main.rand.Next(20) + 10 + (Main.rand.Next(20) + 10) + (Main.rand.Next(20) + 10)); + this.QuickSpawnItem(2171, Main.rand.Next(3) + 1); + } + else + { + this.QuickSpawnItem(56, Main.rand.Next(20) + 10 + (Main.rand.Next(20) + 10) + (Main.rand.Next(20) + 10)); + this.QuickSpawnItem(59, Main.rand.Next(3) + 1); + this.QuickSpawnItem(47, Main.rand.Next(30) + 20); + } + this.QuickSpawnItem(3097); + break; + case 3320: + this.QuickSpawnItem(56, Main.rand.Next(15, 30) + Main.rand.Next(15, 31)); + this.QuickSpawnItem(86, Main.rand.Next(10, 20)); + if (Main.rand.Next(20) == 0) + this.QuickSpawnItem(994); + if (Main.rand.Next(7) == 0) + this.QuickSpawnItem(2111); + this.QuickSpawnItem(3224); + break; + case 3321: + this.QuickSpawnItem(880, Main.rand.Next(20, 46) + Main.rand.Next(20, 46)); + this.QuickSpawnItem(1329, Main.rand.Next(10, 20)); + if (Main.rand.Next(7) == 0) + this.QuickSpawnItem(2104); + if (Main.rand.Next(20) == 0) + this.QuickSpawnItem(3060); + this.QuickSpawnItem(3223); + break; + case 3322: + if (Main.rand.Next(7) == 0) + this.QuickSpawnItem(2108); + int num3 = Main.rand.Next(3); + switch (num3) + { + case 0: + num3 = 1121; + break; + case 1: + num3 = 1123; + break; + case 2: + num3 = 2888; + break; + } + this.QuickSpawnItem(num3); + this.QuickSpawnItem(3333); + if (Main.rand.Next(3) == 0) + this.QuickSpawnItem(1132); + if (Main.rand.Next(9) == 0) + this.QuickSpawnItem(1170); + if (Main.rand.Next(9) == 0) + this.QuickSpawnItem(2502); + this.QuickSpawnItem(1129); + this.QuickSpawnItem(Main.rand.Next(842, 845)); + this.QuickSpawnItem(1130, Main.rand.Next(10, 30)); + this.QuickSpawnItem(2431, Main.rand.Next(17, 30)); + break; + case 3323: + this.QuickSpawnItem(3245); + switch (Main.rand.Next(3)) + { + case 0: + this.QuickSpawnItem(1281); + break; + case 1: + this.QuickSpawnItem(1273); + break; + default: + this.QuickSpawnItem(1313); + break; + } + break; + case 3324: + if (Main.rand.Next(7) == 0) + this.QuickSpawnItem(2105); + this.QuickSpawnItem(367); + if (!this.extraAccessory) + this.QuickSpawnItem(3335); + int num4 = Main.rand.Next(4); + this.QuickSpawnItem(num4 != 3 ? 489 + num4 : 2998); + switch (Main.rand.Next(4)) + { + case 0: + this.QuickSpawnItem(514); + break; + case 1: + this.QuickSpawnItem(426); + break; + case 2: + this.QuickSpawnItem(434); + break; + case 3: + this.QuickSpawnItem(4912); + break; + } + break; + case 3325: + this.TryGettingDevArmor(); + if (Main.rand.Next(7) == 0) + this.QuickSpawnItem(2113); + this.QuickSpawnItem(548, Main.rand.Next(25, 41)); + this.QuickSpawnItem(1225, Main.rand.Next(20, 36)); + this.QuickSpawnItem(3355); + break; + case 3326: + this.TryGettingDevArmor(); + if (Main.rand.Next(7) == 0) + this.QuickSpawnItem(2106); + this.QuickSpawnItem(549, Main.rand.Next(25, 41)); + this.QuickSpawnItem(1225, Main.rand.Next(20, 36)); + this.QuickSpawnItem(3354); + break; + case 3327: + this.TryGettingDevArmor(); + if (Main.rand.Next(7) == 0) + this.QuickSpawnItem(2107); + this.QuickSpawnItem(547, Main.rand.Next(25, 41)); + this.QuickSpawnItem(1225, Main.rand.Next(20, 36)); + this.QuickSpawnItem(3356); + break; + case 3328: + this.TryGettingDevArmor(); + if (Main.rand.Next(7) == 0) + this.QuickSpawnItem(2109); + this.QuickSpawnItem(1141); + this.QuickSpawnItem(3336); + if (Main.rand.Next(15) == 0) + this.QuickSpawnItem(1182); + if (Main.rand.Next(20) == 0) + this.QuickSpawnItem(1305); + if (Main.rand.Next(2) == 0) + this.QuickSpawnItem(1157); + if (Main.rand.Next(10) == 0) + this.QuickSpawnItem(3021); + switch (Main.rand.Next(7)) + { + case 0: + this.QuickSpawnItem(758); + this.QuickSpawnItem(771, Main.rand.Next(50, 150)); + break; + case 1: + this.QuickSpawnItem(1255); + break; + case 2: + this.QuickSpawnItem(788); + break; + case 3: + this.QuickSpawnItem(1178); + break; + case 4: + this.QuickSpawnItem(1259); + break; + case 5: + this.QuickSpawnItem(1155); + break; + case 6: + this.QuickSpawnItem(3018); + break; + } + break; + case 3329: + this.TryGettingDevArmor(); + this.QuickSpawnItem(3337); + if (Main.rand.Next(7) == 0) + this.QuickSpawnItem(2110); + if (Main.rand.Next(3) == 0) + this.QuickSpawnItem(1294); + switch (Main.rand.Next(7)) + { + case 0: + this.QuickSpawnItem(1258); + this.QuickSpawnItem(1261, Main.rand.Next(60, 100)); + break; + case 1: + this.QuickSpawnItem(1122); + break; + case 2: + this.QuickSpawnItem(899); + break; + case 3: + this.QuickSpawnItem(1248); + break; + case 4: + this.QuickSpawnItem(1295); + break; + case 5: + this.QuickSpawnItem(1296); + break; + default: + this.QuickSpawnItem(1297); + break; + } + this.QuickSpawnItem(2218, Main.rand.Next(18, 24)); + break; + case 3330: + this.TryGettingDevArmor(); + this.QuickSpawnItem(3367); + if (Main.rand.Next(7) == 0) + this.QuickSpawnItem(2588); + if (Main.rand.Next(10) == 0) + this.QuickSpawnItem(2609); + switch (Main.rand.Next(5)) + { + case 0: + this.QuickSpawnItem(2611); + break; + case 1: + this.QuickSpawnItem(2624); + break; + case 2: + this.QuickSpawnItem(2622); + break; + case 3: + this.QuickSpawnItem(2621); + break; + case 4: + this.QuickSpawnItem(2623); + break; + } + break; + case 3331: + this.TryGettingDevArmor(); + if (Main.rand.Next(7) == 0) + { + this.QuickSpawnItem(3372); + break; + } + break; + case 3332: + this.TryGettingDevArmor(); + if (Main.rand.Next(7) == 0) + this.QuickSpawnItem(3373); + if (Main.rand.Next(10) == 0) + this.QuickSpawnItem(4469); + if (!this.HasItem(3384)) + this.QuickSpawnItem(3384); + this.QuickSpawnItem(3460, Main.rand.Next(90, 111)); + this.QuickSpawnItem(1131); + this.QuickSpawnItem(3577); + this.QuickSpawnItem(4954); + this.QuickSpawnItem(Utils.SelectRandom(Main.rand, 3063, 3389, 3065, 1553, 3930, 3541, 3570, 3571, 3569)); + break; + case 3860: + this.TryGettingDevArmor(); + if (Main.rand.Next(7) == 0) + this.QuickSpawnItem(3863); + switch (Main.rand.Next(4)) + { + case 0: + this.QuickSpawnItem(3859); + break; + case 1: + this.QuickSpawnItem(3827); + break; + case 2: + this.QuickSpawnItem(3870); + break; + default: + this.QuickSpawnItem(3858); + break; + } + if (Main.rand.Next(4) == 0) + this.QuickSpawnItem(3883); + this.QuickSpawnItem(3817, Main.rand.Next(30, 50)); + break; + case 4782: + this.TryGettingDevArmor(); + this.QuickSpawnItem(4989); + if (Main.rand.Next(7) == 0) + this.QuickSpawnItem(4784); + if (Main.rand.Next(10) == 0) + this.QuickSpawnItem(4823); + if (Main.rand.Next(20) == 0) + this.QuickSpawnItem(4715); + if (Main.rand.Next(4) == 0) + this.QuickSpawnItem(4778); + switch (Main.rand.Next(4)) + { + case 0: + this.QuickSpawnItem(4923); + break; + case 1: + this.QuickSpawnItem(4952); + break; + case 2: + this.QuickSpawnItem(4953); + break; + case 3: + this.QuickSpawnItem(4914); + break; + } + break; + case 4957: + this.QuickSpawnItem(4987); + this.QuickSpawnItem(4986, Main.rand.Next(25, 75)); + if (Main.rand.Next(7) == 0) + this.QuickSpawnItem(4959); + if (Main.rand.Next(2) == 0) + this.QuickSpawnItem(4981); + if (Main.rand.Next(2) == 0) + this.QuickSpawnItem(4980); + int num5 = Main.rand.Next(4982, 4985); + int num6 = Main.rand.Next(4982, 4985); + while (num6 == num5) + num5 = Main.rand.Next(4982, 4985); + this.QuickSpawnItem(num5); + this.QuickSpawnItem(num6); + break; + } + int Type = -1; + if (type == 3318) + Type = 50; + if (type == 3319) + Type = 4; + if (type == 3320) + Type = 13; + if (type == 3321) + Type = 266; + if (type == 3322) + Type = 222; + if (type == 3323) + Type = 35; + if (type == 3324) + Type = 113; + if (type == 3325) + Type = 134; + if (type == 3326) + Type = 125; + if (type == 3327) + Type = (int) sbyte.MaxValue; + if (type == 3328) + Type = 262; + if (type == 3329) + Type = 245; + if (type == 3330) + Type = 370; + if (type == 3331) + Type = 439; + if (type == 3332) + Type = 398; + if (type == 3860) + Type = 551; + if (type == 3861) + Type = 576; + if (type == 3862) + Type = 564; + if (type == 4782) + Type = 636; + if (type == 4957) + Type = 657; + if (Type <= 0) + return; + NPC npc = new NPC(); + npc.SetDefaults(Type); + float num7 = npc.value * (float) (1.0 + (double) Main.rand.Next(-20, 21) * 0.00999999977648258); + if (Main.rand.Next(5) == 0) + num7 *= (float) (1.0 + (double) Main.rand.Next(5, 11) * 0.00999999977648258); + if (Main.rand.Next(10) == 0) + num7 *= (float) (1.0 + (double) Main.rand.Next(10, 21) * 0.00999999977648258); + if (Main.rand.Next(15) == 0) + num7 *= (float) (1.0 + (double) Main.rand.Next(15, 31) * 0.00999999977648258); + if (Main.rand.Next(20) == 0) + num7 *= (float) (1.0 + (double) Main.rand.Next(20, 41) * 0.00999999977648258); + while ((int) num7 > 0) + { + if ((double) num7 > 1000000.0) + { + int stack = (int) ((double) num7 / 1000000.0); + num7 -= (float) (1000000 * stack); + this.QuickSpawnItem(74, stack); + } + else if ((double) num7 > 10000.0) + { + int stack = (int) ((double) num7 / 10000.0); + num7 -= (float) (10000 * stack); + this.QuickSpawnItem(73, stack); + } + else if ((double) num7 > 100.0) + { + int stack = (int) ((double) num7 / 100.0); + num7 -= (float) (100 * stack); + this.QuickSpawnItem(72, stack); + } + else + { + int stack = (int) num7; + if (stack < 1) + stack = 1; + num7 -= (float) stack; + this.QuickSpawnItem(71, stack); + } + } + } + + private void TryGettingDevArmor() + { + if (Main.rand.Next(20) != 0) + return; + switch (Main.rand.Next(18)) + { + case 0: + this.QuickSpawnItem(666); + this.QuickSpawnItem(667); + this.QuickSpawnItem(668); + this.QuickSpawnItem(665); + this.QuickSpawnItem(3287); + break; + case 1: + this.QuickSpawnItem(1554); + this.QuickSpawnItem(1555); + this.QuickSpawnItem(1556); + this.QuickSpawnItem(1586); + break; + case 2: + this.QuickSpawnItem(1554); + this.QuickSpawnItem(1587); + this.QuickSpawnItem(1588); + this.QuickSpawnItem(1586); + break; + case 3: + this.QuickSpawnItem(1557); + this.QuickSpawnItem(1558); + this.QuickSpawnItem(1559); + this.QuickSpawnItem(1585); + break; + case 4: + this.QuickSpawnItem(1560); + this.QuickSpawnItem(1561); + this.QuickSpawnItem(1562); + this.QuickSpawnItem(1584); + break; + case 5: + this.QuickSpawnItem(1563); + this.QuickSpawnItem(1564); + this.QuickSpawnItem(1565); + this.QuickSpawnItem(3582); + break; + case 6: + this.QuickSpawnItem(1566); + this.QuickSpawnItem(1567); + this.QuickSpawnItem(1568); + break; + case 7: + this.QuickSpawnItem(1580); + this.QuickSpawnItem(1581); + this.QuickSpawnItem(1582); + this.QuickSpawnItem(1583); + break; + case 8: + this.QuickSpawnItem(3226); + this.QuickSpawnItem(3227); + this.QuickSpawnItem(3228); + this.QuickSpawnItem(3288); + break; + case 9: + this.QuickSpawnItem(3583); + this.QuickSpawnItem(3581); + this.QuickSpawnItem(3578); + this.QuickSpawnItem(3579); + this.QuickSpawnItem(3580); + break; + case 10: + this.QuickSpawnItem(3585); + this.QuickSpawnItem(3586); + this.QuickSpawnItem(3587); + this.QuickSpawnItem(3588); + this.QuickSpawnItem(3024, 4); + break; + case 11: + this.QuickSpawnItem(3589); + this.QuickSpawnItem(3590); + this.QuickSpawnItem(3591); + this.QuickSpawnItem(3592); + this.QuickSpawnItem(3599, 4); + break; + case 12: + this.QuickSpawnItem(3368); + this.QuickSpawnItem(3921); + this.QuickSpawnItem(3922); + this.QuickSpawnItem(3923); + this.QuickSpawnItem(3924); + break; + case 13: + this.QuickSpawnItem(3925); + this.QuickSpawnItem(3926); + this.QuickSpawnItem(3927); + this.QuickSpawnItem(3928); + this.QuickSpawnItem(3929); + break; + case 14: + this.QuickSpawnItem(4732); + this.QuickSpawnItem(4733); + this.QuickSpawnItem(4734); + this.QuickSpawnItem(4730); + break; + case 15: + this.QuickSpawnItem(4747); + this.QuickSpawnItem(4748); + this.QuickSpawnItem(4749); + this.QuickSpawnItem(4746); + break; + case 16: + this.QuickSpawnItem(4751); + this.QuickSpawnItem(4752); + this.QuickSpawnItem(4753); + this.QuickSpawnItem(4750); + break; + case 17: + this.QuickSpawnItem(4755); + this.QuickSpawnItem(4756); + this.QuickSpawnItem(4757); + this.QuickSpawnItem(4754); + break; + } + } + + public void OpenFishingCrate(int crateItemID) + { + bool flag1 = ItemID.Sets.IsFishingCrateHardmode[crateItemID]; + switch (crateItemID) + { + case 2334: + case 3979: + bool flag2 = true; + while (flag2) + { + if (flag1 & flag2 && Main.rand.Next(200) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3064); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + flag2 = false; + } + if (flag2 && Main.rand.Next(40) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3200, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + flag2 = false; + } + if (flag2 && Main.rand.Next(40) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3201, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + flag2 = false; + } + if (flag1 & flag2 && Main.rand.Next(25) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2424, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + flag2 = false; + } + if (Main.rand.Next(45) == 0) + { + int Type = Main.rand.Next(5); + switch (Type) + { + case 0: + Type = 285; + break; + case 1: + Type = 953; + break; + case 2: + Type = 946; + break; + case 3: + Type = 3068; + break; + case 4: + Type = 3084; + break; + } + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + flag2 = false; + } + if (!flag1 & flag2 && Main.rand.Next(50) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 997); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + flag2 = false; + } + if (Main.rand.Next(7) == 0) + { + int Type; + int Stack; + if (Main.rand.Next(3) == 0) + { + Type = 73; + Stack = Main.rand.Next(1, 6); + } + else + { + Type = 72; + Stack = Main.rand.Next(20, 91); + } + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + flag2 = false; + } + if (Main.rand.Next(7) == 0) + { + int Type = Main.rand.Next(4); + switch (Type) + { + case 0: + Type = 12; + break; + case 1: + Type = 699; + break; + case 2: + Type = 11; + break; + case 3: + Type = 700; + break; + } + if (Main.rand.Next(2) == 0 & flag1) + { + Type = Main.rand.Next(2); + switch (Type) + { + case 0: + Type = 364; + break; + case 1: + Type = 1104; + break; + } + } + int Stack = Main.rand.Next(6, 24); + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + flag2 = false; + } + else if (Main.rand.Next(8) == 0) + { + int Type = Main.rand.Next(4); + switch (Type) + { + case 0: + Type = 20; + break; + case 1: + Type = 703; + break; + case 2: + Type = 22; + break; + case 3: + Type = 704; + break; + case 4: + Type = 21; + break; + case 5: + Type = 705; + break; + case 6: + Type = 19; + break; + case 7: + Type = 706; + break; + } + int Stack = Main.rand.Next(2, 8); + if (Main.rand.Next(2) == 0 & flag1) + { + Type = Main.rand.Next(2); + switch (Type) + { + case 0: + Type = 381; + break; + case 1: + Type = 1184; + break; + case 2: + Type = 382; + break; + case 3: + Type = 1191; + break; + case 4: + Type = 391; + break; + case 5: + Type = 1198; + break; + } + Stack = Main.rand.Next(2, 6); + } + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + flag2 = false; + } + if (Main.rand.Next(7) == 0) + { + int Type = Main.rand.Next(10); + switch (Type) + { + case 0: + Type = 288; + break; + case 1: + Type = 290; + break; + case 2: + Type = 292; + break; + case 3: + Type = 299; + break; + case 4: + Type = 298; + break; + case 5: + Type = 304; + break; + case 6: + Type = 291; + break; + case 7: + Type = 2322; + break; + case 8: + Type = 2323; + break; + case 9: + Type = 2329; + break; + } + int Stack = Main.rand.Next(1, 4); + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + flag2 = false; + } + } + if (Main.rand.Next(3) == 0) + { + int Type = Main.rand.Next(2); + switch (Type) + { + case 0: + Type = 28; + break; + case 1: + Type = 110; + break; + } + int Stack = Main.rand.Next(5, 16); + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + } + if (Main.rand.Next(3) != 0) + break; + int number1 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Main.rand.Next(3) != 0 ? 2674 : 2675, Main.rand.Next(1, 5)); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number1, number2: 1f); + break; + case 2335: + case 3980: + bool flag3 = true; + while (flag3) + { + if (flag1 & flag3 && Main.rand.Next(60) == 0) + { + int number2 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3064); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number2, number2: 1f); + flag3 = false; + } + if (flag3 && Main.rand.Next(25) == 0) + { + int number3 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2501); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number3, number2: 1f); + flag3 = false; + } + if (flag3 && Main.rand.Next(20) == 0) + { + int number4 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2587); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number4, number2: 1f); + flag3 = false; + } + if (flag3 && Main.rand.Next(15) == 0) + { + int number5 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2608, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number5, number2: 1f); + flag3 = false; + } + if (flag3 && Main.rand.Next(20) == 0) + { + int number6 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3200, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number6, number2: 1f); + flag3 = false; + } + if (flag3 && Main.rand.Next(20) == 0) + { + int number7 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3201, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number7, number2: 1f); + flag3 = false; + } + if (Main.rand.Next(4) == 0) + { + int number8 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 73, Main.rand.Next(5, 11)); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number8, number2: 1f); + flag3 = false; + } + if (Main.rand.Next(6) == 0) + { + int Type = Main.rand.Next(6); + switch (Type) + { + case 0: + Type = 12; + break; + case 1: + Type = 699; + break; + case 2: + Type = 11; + break; + case 3: + Type = 700; + break; + case 4: + Type = 14; + break; + case 5: + Type = 701; + break; + } + if (Main.rand.Next(2) == 0 & flag1) + { + Type = Main.rand.Next(4); + switch (Type) + { + case 0: + Type = 364; + break; + case 1: + Type = 1104; + break; + case 2: + Type = 365; + break; + case 3: + Type = 1105; + break; + } + } + int Stack = Main.rand.Next(18, 30); + int number9 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number9, number2: 1f); + flag3 = false; + } + else if (Main.rand.Next(4) == 0) + { + int Type = Main.rand.Next(6); + switch (Type) + { + case 0: + Type = 20; + break; + case 1: + Type = 703; + break; + case 2: + Type = 22; + break; + case 3: + Type = 704; + break; + case 4: + Type = 21; + break; + case 5: + Type = 705; + break; + } + int Stack = Main.rand.Next(6, 10); + if ((uint) Main.rand.Next(3) > 0U & flag1) + { + Type = Main.rand.Next(4); + switch (Type) + { + case 0: + Type = 381; + break; + case 1: + Type = 1184; + break; + case 2: + Type = 382; + break; + case 3: + Type = 1191; + break; + } + Stack -= Main.rand.Next(2); + } + int number10 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number10, number2: 1f); + flag3 = false; + } + if (Main.rand.Next(4) == 0) + { + int Type = Main.rand.Next(8); + switch (Type) + { + case 0: + Type = 288; + break; + case 1: + Type = 296; + break; + case 2: + Type = 304; + break; + case 3: + Type = 305; + break; + case 4: + Type = 2322; + break; + case 5: + Type = 2323; + break; + case 6: + Type = 2324; + break; + case 7: + Type = 2327; + break; + } + int Stack = Main.rand.Next(2, 5); + int number11 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number11, number2: 1f); + flag3 = false; + } + } + if (Main.rand.Next(2) == 0) + { + int number12 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Main.rand.Next(188, 190), Main.rand.Next(5, 16)); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number12, number2: 1f); + } + if (Main.rand.Next(2) != 0) + break; + int number13 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Main.rand.Next(3) != 0 ? 2675 : 2676, Main.rand.Next(2, 5)); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number13, number2: 1f); + break; + case 2336: + case 3981: + bool flag4 = true; + while (flag4) + { + if (flag1 & flag4 && Main.rand.Next(20) == 0) + { + int number14 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3064); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number14, number2: 1f); + flag4 = false; + } + if (flag4 && Main.rand.Next(15) == 0) + { + int number15 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 29); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number15, number2: 1f); + flag4 = false; + } + if (flag4 && Main.rand.Next(10) == 0) + { + int number16 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2491); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number16, number2: 1f); + flag4 = false; + } + if (Main.rand.Next(3) == 0) + { + int number17 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 73, Main.rand.Next(8, 21)); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number17, number2: 1f); + flag4 = false; + } + if (Main.rand.Next(5) == 0) + { + int Type = Main.rand.Next(4); + switch (Type) + { + case 0: + Type = 14; + break; + case 1: + Type = 701; + break; + case 2: + Type = 13; + break; + case 3: + Type = 702; + break; + } + if (Main.rand.Next(2) == 0 & flag1) + { + Type = Main.rand.Next(4); + switch (Type) + { + case 0: + Type = 365; + break; + case 1: + Type = 1105; + break; + case 2: + Type = 366; + break; + case 3: + Type = 1106; + break; + } + } + int Stack = Main.rand.Next(30, 45); + int number18 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number18, number2: 1f); + flag4 = false; + } + else if (Main.rand.Next(3) == 0) + { + int Type = Main.rand.Next(4); + switch (Type) + { + case 0: + Type = 21; + break; + case 1: + Type = 19; + break; + case 2: + Type = 705; + break; + case 3: + Type = 706; + break; + } + if ((uint) Main.rand.Next(3) > 0U & flag1) + { + Type = Main.rand.Next(4); + switch (Type) + { + case 0: + Type = 382; + break; + case 1: + Type = 391; + break; + case 2: + Type = 1191; + break; + case 3: + Type = 1198; + break; + } + } + int Stack = Main.rand.Next(10, 15); + int number19 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number19, number2: 1f); + flag4 = false; + } + } + if (Main.rand.Next(3) == 0) + { + int Type = Main.rand.Next(5); + switch (Type) + { + case 0: + Type = 288; + break; + case 1: + Type = 296; + break; + case 2: + Type = 305; + break; + case 3: + Type = 2322; + break; + case 4: + Type = 2323; + break; + } + int Stack = Main.rand.Next(2, 6); + int number20 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number20, number2: 1f); + } + if (Main.rand.Next(2) == 0) + { + int number21 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Main.rand.Next(188, 190), Main.rand.Next(5, 21)); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number21, number2: 1f); + } + if (Main.rand.Next(3) != 0) + { + int number22 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 2676, Main.rand.Next(3, 8)); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number22, number2: 1f); + } + if (Main.rand.Next(50) != 0) + break; + int number23 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 989); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number23, number2: 1f); + break; + default: + int maxValue = 1; + bool flag5 = true; + bool flag6; + while (flag5) + { + if ((crateItemID == 5002 || crateItemID == 5003) && flag5 && Main.rand.Next(maxValue) == 0) + { + int num = Main.rand.Next(4); + int Type; + if (Main.rand.Next(10) == 0) + Type = 4425; + else if (Main.rand.Next(10) == 0) + { + Type = 863; + } + else + { + switch (num) + { + case 0: + Type = 186; + break; + case 1: + Type = 4404; + break; + case 2: + Type = 277; + break; + default: + Type = 187; + break; + } + } + int number24 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number24, number2: 1f); + flag5 = false; + } + if ((crateItemID == 3203 || crateItemID == 3982) && flag5 && Main.rand.Next(maxValue) == 0) + { + int Type; + switch (Main.rand.Next(5)) + { + case 0: + Type = 162; + break; + case 1: + Type = 111; + break; + case 2: + Type = 96; + break; + case 3: + Type = 115; + break; + default: + Type = 64; + break; + } + int number25 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number25, number2: 1f); + flag5 = false; + } + if ((crateItemID == 3204 || crateItemID == 3983) && flag5 && Main.rand.Next(maxValue) == 0) + { + int Type; + switch (Main.rand.Next(5)) + { + case 0: + Type = 800; + break; + case 1: + Type = 802; + break; + case 2: + Type = 1256; + break; + case 3: + Type = 1290; + break; + default: + Type = 3062; + break; + } + int number26 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number26, number2: 1f); + flag5 = false; + } + if ((crateItemID == 3205 || crateItemID == 3984) && flag5 && Main.rand.Next(maxValue) == 0) + { + int number27 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3085, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number27, number2: 1f); + flag5 = false; + if (Main.rand.Next(2) == 0) + { + int number28 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 149, Main.rand.Next(5, 16), pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number28, number2: 1f); + } + } + if ((crateItemID == 3206 || crateItemID == 3985) && flag5 && Main.rand.Next(maxValue) == 0) + { + int Type; + switch (Main.rand.Next(3)) + { + case 0: + Type = 158; + break; + case 1: + Type = 65; + break; + default: + Type = 159; + break; + } + int number29 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number29, number2: 1f); + flag5 = false; + } + if ((crateItemID == 3208 || crateItemID == 3987) && flag5 && Main.rand.Next(maxValue) == 0) + { + if (Main.rand.Next(20) == 0) + { + Main.rand.Next(5); + int number30 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3017, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number30, number2: 1f); + flag5 = false; + } + else + { + int Type; + switch (Main.rand.Next(5)) + { + case 0: + Type = 212; + break; + case 1: + Type = 964; + break; + case 2: + Type = 211; + break; + case 3: + Type = 213; + break; + default: + Type = 2292; + break; + } + int number31 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number31, number2: 1f); + flag5 = false; + } + } + if ((crateItemID == 4405 || crateItemID == 4406) && flag5 && Main.rand.Next(maxValue) == 0) + { + int Type; + switch (Main.rand.Next(6)) + { + case 0: + Type = 670; + break; + case 1: + Type = 724; + break; + case 2: + Type = 950; + break; + case 3: + Type = 1319; + break; + case 4: + Type = 987; + break; + default: + Type = 1579; + break; + } + int number32 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number32, number2: 1f); + flag5 = false; + } + if (crateItemID == 4407 || crateItemID == 4408) + { + if (flag5 && Main.rand.Next(maxValue) == 0) + { + int Type; + switch (Main.rand.Next(8)) + { + case 0: + Type = 4056; + break; + case 1: + Type = 4442; + break; + case 2: + Type = 4055; + break; + case 3: + Type = 4061; + break; + case 4: + Type = 4062; + break; + case 5: + Type = 4276; + break; + case 6: + Type = 4262; + break; + default: + Type = 4263; + break; + } + int number33 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number33, number2: 1f); + flag5 = false; + } + if (Main.rand.Next(4) == 0) + { + int number34 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4423, Main.rand.Next(4, 7)); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number34, number2: 1f); + flag5 = false; + } + } + if (crateItemID == 4877 || crateItemID == 4878) + { + if (flag5 && Main.rand.Next(maxValue) == 0) + { + if (Main.rand.Next(40) == 0) + { + Main.rand.Next(5); + int number35 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 906, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number35, number2: 1f); + flag6 = false; + } + else + { + int Type; + switch (Main.rand.Next(5)) + { + case 0: + Type = 4822; + break; + case 1: + Type = 4828; + break; + case 2: + Type = 4880; + break; + case 3: + Type = 4881; + break; + default: + Type = 4868; + break; + } + int number36 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number36, number2: 1f); + flag6 = false; + } + if (Main.rand.Next(4) == 0) + { + int number37 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4858, 2); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number37, number2: 1f); + flag6 = false; + } + } + int number38 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4879, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number38, number2: 1f); + flag5 = false; + if (Main.rand.Next(3) == 0) + { + int number39 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4824, Main.rand.Next(7, 11)); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number39, number2: 1f); + flag5 = false; + } + if (Main.rand.Next(2) == 0) + { + int Type = Main.rand.Next(5); + switch (Type) + { + case 0: + Type = 4902; + break; + case 1: + Type = 4903; + break; + case 2: + Type = 4904; + break; + case 3: + Type = 4905; + break; + case 4: + Type = 4906; + break; + } + int number40 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number40, number2: 1f); + flag5 = false; + } + } + if (Main.rand.Next(4) == 0) + { + int number41 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 73, Main.rand.Next(5, 13)); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number41, number2: 1f); + flag5 = false; + } + if (Main.rand.Next(7) == 0) + { + int Type = Main.rand.Next(8); + switch (Type) + { + case 0: + Type = 12; + break; + case 1: + Type = 699; + break; + case 2: + Type = 11; + break; + case 3: + Type = 700; + break; + case 4: + Type = 14; + break; + case 5: + Type = 701; + break; + case 6: + Type = 13; + break; + case 7: + Type = 702; + break; + } + if (Main.rand.Next(2) == 0 & flag1) + { + Type = Main.rand.Next(6); + switch (Type) + { + case 0: + Type = 364; + break; + case 1: + Type = 1104; + break; + case 2: + Type = 365; + break; + case 3: + Type = 1105; + break; + case 4: + Type = 366; + break; + case 5: + Type = 1106; + break; + } + } + int Stack = Main.rand.Next(30, 50); + int number42 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number42, number2: 1f); + flag5 = false; + } + if (Main.rand.Next(4) == 0) + { + int Type = Main.rand.Next(6); + switch (Type) + { + case 0: + Type = 22; + break; + case 1: + Type = 21; + break; + case 2: + Type = 19; + break; + case 3: + Type = 704; + break; + case 4: + Type = 705; + break; + case 5: + Type = 706; + break; + } + int Stack = Main.rand.Next(10, 21); + if ((uint) Main.rand.Next(3) > 0U & flag1) + { + Type = Main.rand.Next(6); + switch (Type) + { + case 0: + Type = 381; + break; + case 1: + Type = 382; + break; + case 2: + Type = 391; + break; + case 3: + Type = 1184; + break; + case 4: + Type = 1191; + break; + case 5: + Type = 1198; + break; + } + Stack -= Main.rand.Next(3); + } + int number43 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number43, number2: 1f); + flag5 = false; + } + } + if (Main.rand.Next(4) == 0) + { + int Type = Main.rand.Next(6); + switch (Type) + { + case 0: + Type = 288; + break; + case 1: + Type = 296; + break; + case 2: + Type = 304; + break; + case 3: + Type = 305; + break; + case 4: + Type = 2322; + break; + case 5: + Type = 2323; + break; + } + int Stack = Main.rand.Next(2, 5); + int number44 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number44, number2: 1f); + flag6 = false; + } + if (Main.rand.Next(2) == 0) + { + int number45 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Main.rand.Next(188, 190), Main.rand.Next(5, 18)); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number45, number2: 1f); + } + if (Main.rand.Next(2) == 0) + { + int number46 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Main.rand.Next(2) != 0 ? 2675 : 2676, Main.rand.Next(2, 7)); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number46, number2: 1f); + } + if (crateItemID == 5002 || crateItemID == 5003) + { + if (Main.rand.Next(3) == 0) + { + int number47 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4090, Main.rand.Next(20, 51)); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number47, number2: 1f); + } + if (Main.rand.Next(10) == 0) + { + int number48 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4460); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number48, number2: 1f); + } + } + if (crateItemID == 3208 || crateItemID == 3987) + { + if (Main.rand.Next(3) == 0) + { + int number49 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4564, Main.rand.Next(20, 51)); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number49, number2: 1f); + } + if (Main.rand.Next(20) == 0) + { + int number50 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 753); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number50, number2: 1f); + } + } + if ((crateItemID == 4405 || crateItemID == 4406) && Main.rand.Next(20) == 0) + { + int number51 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 669); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number51, number2: 1f); + } + if (crateItemID == 4877 || crateItemID == 4878) + { + if (Main.rand.Next(20) == 0) + { + int number52 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4737); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number52, number2: 1f); + } + if (Main.rand.Next(20) == 0) + { + int number53 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 4551); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number53, number2: 1f); + } + } + if (!flag1 || crateItemID != 3982 && crateItemID != 3986 && crateItemID != 3983) + break; + if (Main.rand.Next(2) == 0) + { + int Type = 521; + if (crateItemID == 3986) + Type = 520; + int Stack = Main.rand.Next(2, 6); + int number54 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number54, number2: 1f); + } + if (Main.rand.Next(2) != 0) + break; + int Type1 = 522; + int Stack1 = Main.rand.Next(2, 6); + switch (crateItemID) + { + case 3983: + Type1 = 1332; + break; + case 3986: + Type1 = 502; + Stack1 = Main.rand.Next(4, 11); + break; + } + int number55 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type1, Stack1); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number55, number2: 1f); + break; + } + } + + public int CountItem(int type, int stopCountingAt = 0) + { + int num = 0; + for (int index = 0; index != 58; ++index) + { + if (this.inventory[index].stack > 0 && this.inventory[index].type == type) + { + num += this.inventory[index].stack; + if (num >= stopCountingAt) + return num; + } + } + return num; + } + + public bool ConsumeItem(int type, bool reverseOrder = false) + { + int num1 = 0; + int num2 = 58; + int num3 = 1; + if (reverseOrder) + { + num1 = 57; + num2 = -1; + num3 = -1; + } + for (int index = num1; index != num2; index += num3) + { + if (this.inventory[index].stack > 0 && this.inventory[index].type == type) + { + --this.inventory[index].stack; + if (this.inventory[index].stack <= 0) + this.inventory[index].SetDefaults(); + return true; + } + } + return false; + } + + public void OpenShadowLockbox() + { + bool flag = true; + while (flag) + { + flag = false; + int Type; + switch (Main.rand.Next(6)) + { + case 1: + Type = 274; + break; + case 2: + Type = 220; + break; + case 3: + Type = 112; + break; + case 4: + Type = 218; + break; + case 5: + Type = 3019; + break; + default: + Type = 5010; + break; + } + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + } + } + + public void OpenLockBox() + { + bool flag = true; + while (flag) + { + flag = false; + int num = Main.rand.Next(7); + if (num == 1) + num = 2; + int number1 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, num != 2 ? (num != 3 ? (num != 4 ? (num != 5 ? (num != 6 ? 164 : 113) : 163) : 157) : 156) : 155, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number1, number2: 1f); + if (Main.rand.Next(3) == 0) + { + int number2 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 329, pfix: -1); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number2, number2: 1f); + } + } + } + + public void OpenHerbBag() + { + int num = Main.rand.Next(2, 5); + if (Main.rand.Next(3) == 0) + ++num; + for (int index = 0; index < num; ++index) + { + int Type = Main.rand.Next(14); + if (Type == 0) + Type = 313; + if (Type == 1) + Type = 314; + if (Type == 2) + Type = 315; + if (Type == 3) + Type = 317; + if (Type == 4) + Type = 316; + if (Type == 5) + Type = 318; + if (Type == 6) + Type = 2358; + if (Type == 7) + Type = 307; + if (Type == 8) + Type = 308; + if (Type == 9) + Type = 309; + if (Type == 10) + Type = 311; + if (Type == 11) + Type = 310; + if (Type == 12) + Type = 312; + if (Type == 13) + Type = 2357; + int Stack = Main.rand.Next(2, 5); + if (Main.rand.Next(3) == 0) + Stack += Main.rand.Next(1, 5); + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Type, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + } + } + + public void OpenCanofWorms() + { + this.QuickSpawnItem(2002, Main.rand.Next(5, 9)); + if (Main.rand.Next(10) < 3) + this.QuickSpawnItem(3191, Main.rand.Next(1, 3)); + if (Main.rand.Next(20) != 0) + return; + this.QuickSpawnItem(2895); + } + + public void OpenOyster() + { + if (Main.rand.Next(5) == 0) + { + if (Main.rand.Next(25) == 0) + this.QuickSpawnItem(4414); + else if (Main.rand.Next(5) == 0) + this.QuickSpawnItem(4413); + else + this.QuickSpawnItem(4412); + } + this.QuickSpawnItem(4411); + } + + public void OpenGoodieBag() + { + if (Main.rand.Next(150) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1810); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else if (Main.rand.Next(150) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1800); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else if (Main.rand.Next(4) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1809, Main.rand.Next(10, 41)); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else if (Main.rand.Next(10) == 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, Main.rand.Next(1846, 1851)); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else + { + switch (Main.rand.Next(19)) + { + case 0: + int number1 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1749); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number1, number2: 1f); + int number2 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1750); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number2, number2: 1f); + int number3 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1751); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number3, number2: 1f); + break; + case 1: + int number4 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1746); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number4, number2: 1f); + int number5 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1747); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number5, number2: 1f); + int number6 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1748); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number6, number2: 1f); + break; + case 2: + int number7 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1752); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number7, number2: 1f); + int number8 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1753); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number8, number2: 1f); + break; + case 3: + int number9 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1767); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number9, number2: 1f); + int number10 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1768); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number10, number2: 1f); + int number11 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1769); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number11, number2: 1f); + break; + case 4: + int number12 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1770); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number12, number2: 1f); + int number13 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1771); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number13, number2: 1f); + break; + case 5: + int number14 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1772); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number14, number2: 1f); + int number15 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1773); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number15, number2: 1f); + break; + case 6: + int number16 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1754); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number16, number2: 1f); + int number17 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1755); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number17, number2: 1f); + int number18 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1756); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number18, number2: 1f); + break; + case 7: + int number19 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1757); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number19, number2: 1f); + int number20 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1758); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number20, number2: 1f); + int number21 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1759); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number21, number2: 1f); + break; + case 8: + int number22 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1760); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number22, number2: 1f); + int number23 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1761); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number23, number2: 1f); + int number24 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1762); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number24, number2: 1f); + break; + case 9: + int number25 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1763); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number25, number2: 1f); + int number26 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1764); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number26, number2: 1f); + int number27 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1765); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number27, number2: 1f); + break; + case 10: + int number28 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1766); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number28, number2: 1f); + int number29 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1775); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number29, number2: 1f); + int number30 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1776); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number30, number2: 1f); + break; + case 11: + int number31 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1777); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number31, number2: 1f); + int number32 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1778); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number32, number2: 1f); + break; + case 12: + int number33 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1779); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number33, number2: 1f); + int number34 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1780); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number34, number2: 1f); + int number35 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1781); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number35, number2: 1f); + break; + case 13: + int number36 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1819); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number36, number2: 1f); + int number37 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1820); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number37, number2: 1f); + break; + case 14: + int number38 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1821); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number38, number2: 1f); + int number39 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1822); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number39, number2: 1f); + int number40 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1823); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number40, number2: 1f); + break; + case 15: + int number41 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1824); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number41, number2: 1f); + break; + case 16: + int number42 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1838); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number42, number2: 1f); + int number43 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1839); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number43, number2: 1f); + int number44 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1840); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number44, number2: 1f); + break; + case 17: + int number45 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1841); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number45, number2: 1f); + int number46 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1842); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number46, number2: 1f); + int number47 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1843); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number47, number2: 1f); + break; + case 18: + int number48 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1851); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number48, number2: 1f); + int number49 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 1852); + if (Main.netMode != 1) + break; + NetMessage.SendData(21, number: number49, number2: 1f); + break; + } + } + } + + public void UpdateDyes() + { + this.cHead = 0; + this.cBody = 0; + this.cLegs = 0; + this.cHandOn = 0; + this.cHandOff = 0; + this.cBack = 0; + this.cFront = 0; + this.cShoe = 0; + this.cWaist = 0; + this.cShield = 0; + this.cNeck = 0; + this.cFace = 0; + this.cBalloon = 0; + this.cWings = 0; + this.cCarpet = 0; + this.cFloatingTube = 0; + this.cGrapple = this.cMount = this.cMinecart = this.cPet = this.cLight = this.cYorai = this.cPortalbeStool = this.cUnicornHorn = this.cMinion = this.cLeinShampoo = 0; + this.skinDyePacked = 0; + this.cHead = (int) this.dye[0].dye; + this.cBody = (int) this.dye[1].dye; + this.cLegs = (int) this.dye[2].dye; + if (this.wearsRobe) + this.cLegs = this.cBody; + this.cPet = (int) this.miscDyes[0].dye; + this.cLight = (int) this.miscDyes[1].dye; + this.cMinecart = (int) this.miscDyes[2].dye; + this.cMount = (int) this.miscDyes[3].dye; + this.cGrapple = (int) this.miscDyes[4].dye; + for (int slot = 0; slot < 20; ++slot) + { + if (this.IsAValidEquipmentSlotForIteration(slot)) + { + int index = slot % 10; + this.UpdateItemDye(slot < 10, this.hideVisibleAccessory[index], this.armor[slot], this.dye[index]); + } + } + this.cYorai = this.cPet; + } + + private void UpdateItemDye( + bool effectiveEquipmentSlot, + bool armorHidden, + Item armorItem, + Item dyeItem) + { + if (armorItem.IsAir || effectiveEquipmentSlot & armorHidden && armorItem.wingSlot <= (sbyte) 0 && armorItem.type != 934 && armorItem.type != 4341 && armorItem.type != 4563) + return; + if (armorItem.handOnSlot > (sbyte) 0 && armorItem.handOnSlot < (sbyte) 22) + this.cHandOn = (int) dyeItem.dye; + if (armorItem.handOffSlot > (sbyte) 0 && armorItem.handOffSlot < (sbyte) 14) + this.cHandOff = (int) dyeItem.dye; + if (armorItem.backSlot > (sbyte) 0 && armorItem.backSlot < (sbyte) 30) + this.cBack = (int) dyeItem.dye; + if (armorItem.frontSlot > (sbyte) 0 && armorItem.frontSlot < (sbyte) 9) + this.cFront = (int) dyeItem.dye; + if (armorItem.shoeSlot > (sbyte) 0 && armorItem.shoeSlot < (sbyte) 25) + this.cShoe = (int) dyeItem.dye; + if (armorItem.waistSlot > (sbyte) 0 && armorItem.waistSlot < (sbyte) 17) + this.cWaist = (int) dyeItem.dye; + if (armorItem.shieldSlot > (sbyte) 0 && armorItem.shieldSlot < (sbyte) 10) + this.cShield = (int) dyeItem.dye; + if (armorItem.neckSlot > (sbyte) 0 && armorItem.neckSlot < (sbyte) 11) + this.cNeck = (int) dyeItem.dye; + if (armorItem.faceSlot > (sbyte) 0 && armorItem.faceSlot < (sbyte) 16) + this.cFace = (int) dyeItem.dye; + if (armorItem.balloonSlot > (sbyte) 0 && armorItem.balloonSlot < (sbyte) 18) + this.cBalloon = (int) dyeItem.dye; + if (armorItem.wingSlot > (sbyte) 0 && armorItem.wingSlot < (sbyte) 47) + this.cWings = (int) dyeItem.dye; + if (armorItem.type == 934) + this.cCarpet = (int) dyeItem.dye; + if (armorItem.type == 4404) + this.cFloatingTube = (int) dyeItem.dye; + if (armorItem.type == 4341) + this.cPortalbeStool = (int) dyeItem.dye; + if (armorItem.type == 4563) + this.cUnicornHorn = (int) dyeItem.dye; + if (armorItem.type == 4762) + this.cMinion = (int) dyeItem.dye; + if (armorItem.type != 3929) + return; + this.cLeinShampoo = (int) dyeItem.dye; + } + + public int ArmorSetDye() + { + switch (Main.rand.Next(3)) + { + case 0: + return this.cHead; + case 1: + return this.cBody; + case 2: + return this.cLegs; + default: + return this.cBody; + } + } + + public void UpdateBuffs(int i) + { + if (this.soulDrain > 0 && this.whoAmI == Main.myPlayer) + this.AddBuff(151, 2); + for (int index1 = 0; index1 < 22; ++index1) + { + if (this.buffType[index1] > 0 && this.buffTime[index1] > 0) + { + if (this.whoAmI == Main.myPlayer && !BuffID.Sets.TimeLeftDoesNotDecrease[this.buffType[index1]]) + --this.buffTime[index1]; + if (this.buffType[index1] == 1) + { + this.lavaImmune = true; + this.fireWalk = true; + this.buffImmune[24] = true; + } + else if (BuffID.Sets.BasicMountData[this.buffType[index1]] != null) + { + BuffID.Sets.BuffMountData buffMountData = BuffID.Sets.BasicMountData[this.buffType[index1]]; + this.mount.SetMount(buffMountData.mountID, this, buffMountData.faceLeft); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 158) + this.manaRegenBonus += 2; + else if (this.buffType[index1] == 159 && this.inventory[this.selectedItem].melee) + this.armorPenetration = 12; + else if (this.buffType[index1] == 192) + { + this.pickSpeed -= 0.2f; + this.moveSpeed += 0.2f; + } + else if (this.buffType[index1] == 321) + { + int num = 20; + this.meleeCrit += num; + this.rangedCrit += num; + this.magicCrit += num; + this.minionDamage += (float) num / 100f; + } + else if (this.buffType[index1] == 2) + this.lifeRegen += 4; + else if (this.buffType[index1] == 3) + this.moveSpeed += 0.25f; + else if (this.buffType[index1] == 4) + this.gills = true; + else if (this.buffType[index1] == 5) + this.statDefense += 8; + else if (this.buffType[index1] == 6) + this.manaRegenBuff = true; + else if (this.buffType[index1] == 7) + this.magicDamage += 0.2f; + else if (this.buffType[index1] == 8) + this.slowFall = true; + else if (this.buffType[index1] == 9) + this.findTreasure = true; + else if (this.buffType[index1] == 10) + this.invis = true; + else if (this.buffType[index1] == 11) + Lighting.AddLight((int) ((double) this.position.X + (double) (this.width / 2)) / 16, (int) ((double) this.position.Y + (double) (this.height / 2)) / 16, 0.8f, 0.95f, 1f); + else if (this.buffType[index1] == 12) + this.nightVision = true; + else if (this.buffType[index1] == 13) + this.enemySpawns = true; + else if (this.buffType[index1] == 14) + { + if ((double) this.thorns < 1.0) + this.thorns = 0.3333333f; + } + else if (this.buffType[index1] == 15) + this.waterWalk = true; + else if (this.buffType[index1] == 16) + this.archery = true; + else if (this.buffType[index1] == 17) + this.detectCreature = true; + else if (this.buffType[index1] == 18) + this.gravControl = true; + else if (this.buffType[index1] == 30) + this.bleed = true; + else if (this.buffType[index1] == 31) + this.confused = true; + else if (this.buffType[index1] == 32) + this.slow = true; + else if (this.buffType[index1] == 35) + this.silence = true; + else if (this.buffType[index1] == 160) + this.dazed = true; + else if (this.buffType[index1] == 46) + this.chilled = true; + else if (this.buffType[index1] == 47) + this.frozen = true; + else if (this.buffType[index1] == 156) + this.stoned = true; + else if (this.buffType[index1] == 69) + { + this.ichor = true; + this.statDefense -= 20; + } + else if (this.buffType[index1] == 36) + this.brokenArmor = true; + else if (this.buffType[index1] == 48) + this.honey = true; + else if (this.buffType[index1] == 59) + this.shadowDodge = true; + else if (this.buffType[index1] == 93) + this.ammoBox = true; + else if (this.buffType[index1] == 58) + this.palladiumRegen = true; + else if (this.buffType[index1] == 306) + this.hasTitaniumStormBuff = true; + else if (this.buffType[index1] == 88) + this.chaosState = true; + else if (this.buffType[index1] == 215) + this.statDefense += 5; + else if (this.buffType[index1] == 311) + this.meleeSpeed += 0.5f; + else if (this.buffType[index1] == 308) + this.meleeSpeed += 0.35f; + else if (this.buffType[index1] == 314) + this.meleeSpeed += 0.2f; + else if (this.buffType[index1] == 312) + this.coolWhipBuff = true; + else if (this.buffType[index1] == 63) + ++this.moveSpeed; + else if (this.buffType[index1] == 104) + this.pickSpeed -= 0.25f; + else if (this.buffType[index1] == 105) + this.lifeMagnet = true; + else if (this.buffType[index1] == 106) + this.calmed = true; + else if (this.buffType[index1] == 121) + this.fishingSkill += 15; + else if (this.buffType[index1] == 122) + this.sonarPotion = true; + else if (this.buffType[index1] == 123) + this.cratePotion = true; + else if (this.buffType[index1] == 107) + { + this.tileSpeed += 0.25f; + this.wallSpeed += 0.25f; + ++this.blockRange; + } + else if (this.buffType[index1] == 108) + this.kbBuff = true; + else if (this.buffType[index1] == 109) + { + this.ignoreWater = true; + this.accFlipper = true; + } + else if (this.buffType[index1] == 110) + ++this.maxMinions; + else if (this.buffType[index1] == 150) + ++this.maxMinions; + else if (this.buffType[index1] == 111) + this.dangerSense = true; + else if (this.buffType[index1] == 112) + this.ammoPotion = true; + else if (this.buffType[index1] == 113) + { + this.lifeForce = true; + this.statLifeMax2 += this.statLifeMax / 5 / 20 * 20; + } + else if (this.buffType[index1] == 114) + this.endurance += 0.1f; + else if (this.buffType[index1] == 115) + { + this.meleeCrit += 10; + this.rangedCrit += 10; + this.magicCrit += 10; + } + else if (this.buffType[index1] == 116) + { + this.inferno = true; + Lighting.AddLight((int) ((double) this.Center.X / 16.0), (int) ((double) this.Center.Y / 16.0), 0.65f, 0.4f, 0.1f); + int type = 24; + float num1 = 200f; + bool flag = this.infernoCounter % 60 == 0; + int num2 = 10; + if (this.whoAmI == Main.myPlayer) + { + for (int index2 = 0; index2 < 200; ++index2) + { + NPC npc = Main.npc[index2]; + if (npc.active && !npc.friendly && npc.damage > 0 && !npc.dontTakeDamage && !npc.buffImmune[type] && this.CanNPCBeHitByPlayerOrPlayerProjectile(npc) && (double) Vector2.Distance(this.Center, npc.Center) <= (double) num1) + { + if (npc.FindBuffIndex(type) == -1) + npc.AddBuff(type, 120); + if (flag) + this.ApplyDamageToNPC(npc, num2, 0.0f, 0, false); + } + } + if (this.hostile) + { + for (int playerTargetIndex = 0; playerTargetIndex < (int) byte.MaxValue; ++playerTargetIndex) + { + Player player = Main.player[playerTargetIndex]; + if (player != this && player.active && !player.dead && player.hostile && !player.buffImmune[type] && (player.team != this.team || player.team == 0) && (double) Vector2.Distance(this.Center, player.Center) <= (double) num1) + { + if (player.FindBuffIndex(type) == -1) + player.AddBuff(type, 120); + if (flag) + { + player.Hurt(PlayerDeathReason.LegacyEmpty(), num2, 0, true); + if (Main.netMode != 0) + { + PlayerDeathReason reason = PlayerDeathReason.ByOther(16); + NetMessage.SendPlayerHurt(playerTargetIndex, reason, num2, 0, false, true, -1); + } + } + } + } + } + } + } + else if (this.buffType[index1] == 117) + { + this.meleeDamage += 0.1f; + this.rangedDamage += 0.1f; + this.magicDamage += 0.1f; + this.minionDamage += 0.1f; + } + else if (this.buffType[index1] == 119) + this.loveStruck = true; + else if (this.buffType[index1] == 120) + this.stinky = true; + else if (this.buffType[index1] == 124) + this.resistCold = true; + else if (this.buffType[index1] == 257) + { + if (Main.myPlayer == this.whoAmI) + this.luckPotion = this.buffTime[index1] <= 18000 ? (this.buffTime[index1] <= 10800 ? (byte) 1 : (byte) 2) : (byte) 3; + } + else if (this.buffType[index1] == 165) + { + this.lifeRegen += 6; + this.statDefense += 8; + this.dryadWard = true; + if ((double) this.thorns < 1.0) + this.thorns += 0.2f; + } + else if (this.buffType[index1] == 144) + { + this.electrified = true; + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.3f, 0.8f, 1.1f); + } + else if (this.buffType[index1] == 94) + { + this.manaSick = true; + this.manaSickReduction = Player.manaSickLessDmg * ((float) this.buffTime[index1] / (float) Player.manaSickTime); + } + else if (this.buffType[index1] >= 95 && this.buffType[index1] <= 97) + { + this.buffTime[index1] = 5; + int num = (int) (byte) (1 + this.buffType[index1] - 95); + if (this.beetleOrbs > 0 && this.beetleOrbs != num) + { + if (this.beetleOrbs > num) + { + this.DelBuff(index1); + --index1; + } + else + { + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] >= 95 && this.buffType[b] <= 95 + num - 1) + { + this.DelBuff(b); + --b; + } + } + } + } + this.beetleOrbs = num; + if (!this.beetleDefense) + { + this.beetleOrbs = 0; + this.DelBuff(index1); + --index1; + } + else + this.beetleBuff = true; + } + else if (this.buffType[index1] >= 170 && this.buffType[index1] <= 172) + { + this.buffTime[index1] = 5; + int num = (int) (byte) (1 + this.buffType[index1] - 170); + if (this.solarShields > 0 && this.solarShields != num) + { + if (this.solarShields > num) + { + this.DelBuff(index1); + --index1; + } + else + { + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] >= 170 && this.buffType[b] <= 170 + num - 1) + { + this.DelBuff(b); + --b; + } + } + } + } + this.solarShields = num; + if (!this.setSolar) + { + this.solarShields = 0; + this.DelBuff(index1); + --index1; + } + } + else if (this.buffType[index1] >= 98 && this.buffType[index1] <= 100) + { + int num = (int) (byte) (1 + this.buffType[index1] - 98); + if (this.beetleOrbs > 0 && this.beetleOrbs != num) + { + if (this.beetleOrbs > num) + { + this.DelBuff(index1); + --index1; + } + else + { + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] >= 98 && this.buffType[b] <= 98 + num - 1) + { + this.DelBuff(b); + --b; + } + } + } + } + this.beetleOrbs = num; + this.meleeDamage += 0.1f * (float) this.beetleOrbs; + this.meleeSpeed += 0.1f * (float) this.beetleOrbs; + if (!this.beetleOffense) + { + this.beetleOrbs = 0; + this.DelBuff(index1); + --index1; + } + else + this.beetleBuff = true; + } + else if (this.buffType[index1] >= 176 && this.buffType[index1] <= 178) + { + int nebulaLevelMana = this.nebulaLevelMana; + int num = (int) (byte) (1 + this.buffType[index1] - 176); + if (nebulaLevelMana > 0 && nebulaLevelMana != num) + { + if (nebulaLevelMana > num) + { + this.DelBuff(index1); + --index1; + } + else + { + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] >= 176 && this.buffType[b] <= 178 + num - 1) + { + this.DelBuff(b); + --b; + } + } + } + } + this.nebulaLevelMana = num; + if (this.buffTime[index1] == 2 && this.nebulaLevelMana > 1) + { + --this.nebulaLevelMana; + --this.buffType[index1]; + this.buffTime[index1] = 480; + } + } + else if (this.buffType[index1] >= 173 && this.buffType[index1] <= 175) + { + int nebulaLevelLife = this.nebulaLevelLife; + int num = (int) (byte) (1 + this.buffType[index1] - 173); + if (nebulaLevelLife > 0 && nebulaLevelLife != num) + { + if (nebulaLevelLife > num) + { + this.DelBuff(index1); + --index1; + } + else + { + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] >= 173 && this.buffType[b] <= 175 + num - 1) + { + this.DelBuff(b); + --b; + } + } + } + } + this.nebulaLevelLife = num; + if (this.buffTime[index1] == 2 && this.nebulaLevelLife > 1) + { + --this.nebulaLevelLife; + --this.buffType[index1]; + this.buffTime[index1] = 480; + } + this.lifeRegen += 6 * this.nebulaLevelLife; + } + else if (this.buffType[index1] >= 179 && this.buffType[index1] <= 181) + { + int nebulaLevelDamage = this.nebulaLevelDamage; + int num3 = (int) (byte) (1 + this.buffType[index1] - 179); + if (nebulaLevelDamage > 0 && nebulaLevelDamage != num3) + { + if (nebulaLevelDamage > num3) + { + this.DelBuff(index1); + --index1; + } + else + { + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] >= 179 && this.buffType[b] <= 181 + num3 - 1) + { + this.DelBuff(b); + --b; + } + } + } + } + this.nebulaLevelDamage = num3; + if (this.buffTime[index1] == 2 && this.nebulaLevelDamage > 1) + { + --this.nebulaLevelDamage; + --this.buffType[index1]; + this.buffTime[index1] = 480; + } + float num4 = 0.15f * (float) this.nebulaLevelDamage; + this.meleeDamage += num4; + this.rangedDamage += num4; + this.magicDamage += num4; + this.minionDamage += num4; + } + else if (this.buffType[index1] == 62) + { + if ((double) this.statLife <= (double) this.statLifeMax2 * 0.5) + { + Lighting.AddLight((int) ((double) this.Center.X / 16.0), (int) ((double) this.Center.Y / 16.0), 0.1f, 0.2f, 0.45f); + this.iceBarrier = true; + this.endurance += 0.25f; + ++this.iceBarrierFrameCounter; + if (this.iceBarrierFrameCounter > (byte) 2) + { + this.iceBarrierFrameCounter = (byte) 0; + ++this.iceBarrierFrame; + if (this.iceBarrierFrame >= (byte) 12) + this.iceBarrierFrame = (byte) 0; + } + } + else + { + this.DelBuff(index1); + --index1; + } + } + else if (this.buffType[index1] == 49) + { + for (int index3 = 191; index3 <= 194; ++index3) + { + if (this.ownedProjectileCounts[index3] > 0) + this.pygmy = true; + } + if (!this.pygmy) + { + this.DelBuff(index1); + --index1; + } + else + this.buffTime[index1] = 18000; + } + else if (this.buffType[index1] == 83) + { + if (this.ownedProjectileCounts[317] > 0) + this.raven = true; + if (!this.raven) + { + this.DelBuff(index1); + --index1; + } + else + this.buffTime[index1] = 18000; + } + else if (this.buffType[index1] == 64) + { + if (this.ownedProjectileCounts[266] > 0) + this.slime = true; + if (!this.slime) + { + this.DelBuff(index1); + --index1; + } + else + this.buffTime[index1] = 18000; + } + else if (this.buffType[index1] == 125) + { + if (this.ownedProjectileCounts[373] > 0) + this.hornetMinion = true; + if (!this.hornetMinion) + { + this.DelBuff(index1); + --index1; + } + else + this.buffTime[index1] = 18000; + } + else if (this.buffType[index1] == 126) + { + if (this.ownedProjectileCounts[375] > 0) + this.impMinion = true; + if (!this.impMinion) + { + this.DelBuff(index1); + --index1; + } + else + this.buffTime[index1] = 18000; + } + else if (this.buffType[index1] == 133) + { + if (this.ownedProjectileCounts[390] > 0 || this.ownedProjectileCounts[391] > 0 || this.ownedProjectileCounts[392] > 0) + this.spiderMinion = true; + if (!this.spiderMinion) + { + this.DelBuff(index1); + --index1; + } + else + this.buffTime[index1] = 18000; + } + else if (this.buffType[index1] == 134) + { + if (this.ownedProjectileCounts[387] > 0 || this.ownedProjectileCounts[388] > 0) + this.twinsMinion = true; + if (!this.twinsMinion) + { + this.DelBuff(index1); + --index1; + } + else + this.buffTime[index1] = 18000; + } + else if (this.buffType[index1] == 135) + { + if (this.ownedProjectileCounts[393] > 0 || this.ownedProjectileCounts[394] > 0 || this.ownedProjectileCounts[395] > 0) + this.pirateMinion = true; + if (!this.pirateMinion) + { + this.DelBuff(index1); + --index1; + } + else + this.buffTime[index1] = 18000; + } + else if (this.buffType[index1] == 214) + { + if (this.ownedProjectileCounts[758] > 0) + this.vampireFrog = true; + if (!this.vampireFrog) + { + this.DelBuff(index1); + --index1; + } + else + this.buffTime[index1] = 18000; + } + else if (this.buffType[index1] == 139) + { + if (this.ownedProjectileCounts[407] > 0) + this.sharknadoMinion = true; + if (!this.sharknadoMinion) + { + this.DelBuff(index1); + --index1; + } + else + this.buffTime[index1] = 18000; + } + else if (this.buffType[index1] == 140) + { + if (this.ownedProjectileCounts[423] > 0) + this.UFOMinion = true; + if (!this.UFOMinion) + { + this.DelBuff(index1); + --index1; + } + else + this.buffTime[index1] = 18000; + } + else if (this.buffType[index1] == 182) + { + if (this.ownedProjectileCounts[613] > 0) + this.stardustMinion = true; + if (!this.stardustMinion) + { + this.DelBuff(index1); + --index1; + } + else + this.buffTime[index1] = 18000; + } + else if (this.buffType[index1] == 213) + { + if (this.ownedProjectileCounts[755] > 0) + this.batsOfLight = true; + if (!this.batsOfLight) + { + this.DelBuff(index1); + --index1; + } + else + this.buffTime[index1] = 18000; + } + else if (this.buffType[index1] == 216) + { + if (this.ownedProjectileCounts[759] > 0) + this.babyBird = true; + else if (this.whoAmI == Main.myPlayer && this.numMinions < this.maxMinions) + { + int index4 = this.FindItem(4281); + if (index4 != -1) + { + Item obj = this.inventory[index4]; + int index5 = Projectile.NewProjectile(this.Top, Vector2.Zero, obj.shoot, obj.damage, obj.knockBack, this.whoAmI); + Main.projectile[index5].originalDamage = obj.damage; + this.babyBird = true; + } + } + if (!this.babyBird) + { + this.DelBuff(index1); + --index1; + } + else + this.buffTime[index1] = 18000; + } + else if (this.buffType[index1] == 263) + { + if (this.ownedProjectileCounts[831] > 0) + this.stormTiger = true; + if (!this.stormTiger) + { + this.DelBuff(index1); + --index1; + } + else + this.buffTime[index1] = 18000; + if (this.whoAmI == Main.myPlayer) + this.UpdateStormTigerStatus(); + } + else if (this.buffType[index1] == 271) + { + if (this.ownedProjectileCounts[864] > 0) + this.smolstar = true; + if (!this.smolstar) + { + this.DelBuff(index1); + --index1; + } + else + this.buffTime[index1] = 18000; + } + else if (this.buffType[index1] == 322) + { + if (this.ownedProjectileCounts[946] > 0) + this.empressBlade = true; + if (!this.empressBlade) + { + this.DelBuff(index1); + --index1; + } + else + this.buffTime[index1] = 18000; + } + else if (this.buffType[index1] == 187) + { + if (this.ownedProjectileCounts[623] > 0) + this.stardustGuardian = true; + if (!this.stardustGuardian) + { + this.DelBuff(index1); + --index1; + } + else + this.buffTime[index1] = 18000; + } + else if (this.buffType[index1] == 188) + { + if (this.ownedProjectileCounts[625] > 0) + this.stardustDragon = true; + if (!this.stardustDragon) + { + this.DelBuff(index1); + --index1; + } + else + this.buffTime[index1] = 18000; + } + else if (this.buffType[index1] == 161) + { + if (this.ownedProjectileCounts[533] > 0) + this.DeadlySphereMinion = true; + if (!this.DeadlySphereMinion) + { + this.DelBuff(index1); + --index1; + } + else + this.buffTime[index1] = 18000; + } + else if (this.buffType[index1] == 90) + { + this.mount.SetMount(0, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 128) + { + this.mount.SetMount(1, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 129) + { + this.mount.SetMount(2, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 130) + { + this.mount.SetMount(3, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 131) + { + this.ignoreWater = true; + this.accFlipper = true; + this.mount.SetMount(4, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 132) + { + this.mount.SetMount(5, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 168) + { + this.ignoreWater = true; + this.accFlipper = true; + this.mount.SetMount(12, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 141) + { + this.mount.SetMount(7, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 142) + { + this.mount.SetMount(8, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 143) + { + this.mount.SetMount(9, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 162) + { + this.mount.SetMount(10, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 193) + { + this.mount.SetMount(14, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 212) + { + this.mount.SetMount(17, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 230) + { + this.mount.SetMount(23, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 265) + { + this.canFloatInWater = true; + this.accFlipper = true; + this.mount.SetMount(37, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 275) + { + this.mount.SetMount(40, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 276) + { + this.mount.SetMount(41, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 277) + { + this.mount.SetMount(42, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 278) + { + this.mount.SetMount(43, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 279) + { + this.ignoreWater = true; + this.accFlipper = true; + this.mount.SetMount(44, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 280) + { + this.mount.SetMount(45, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 281) + { + this.mount.SetMount(46, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 282) + { + this.mount.SetMount(47, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 283) + { + this.mount.SetMount(48, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 305) + { + this.ignoreWater = true; + this.accFlipper = true; + this.lavaImmune = true; + this.mount.SetMount(49, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 318) + { + this.mount.SetMount(50, this); + this.buffTime[index1] = 10; + } + else if (this.buffType[index1] == 37) + { + if (Main.wofNPCIndex >= 0 && Main.npc[Main.wofNPCIndex].type == 113) + { + this.gross = true; + this.buffTime[index1] = 10; + } + else + { + this.DelBuff(index1); + --index1; + } + } + else if (this.buffType[index1] == 38) + { + this.buffTime[index1] = 10; + this.tongued = true; + } + else if (this.buffType[index1] == 146) + { + this.moveSpeed += 0.1f; + this.moveSpeed *= 1.1f; + this.sunflower = true; + } + else if (this.buffType[index1] == 19) + { + this.buffTime[index1] = 18000; + this.lightOrb = true; + bool flag = true; + if (this.ownedProjectileCounts[18] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 18, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 155) + { + this.buffTime[index1] = 18000; + this.crimsonHeart = true; + bool flag = true; + if (this.ownedProjectileCounts[500] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 500, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 191) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.companionCube, 653); + else if (this.buffType[index1] == 202) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagDD2Dragon, 701); + else if (this.buffType[index1] == 217) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagUpbeatStar, 764); + else if (this.buffType[index1] == 219) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagBabyShark, 774); + else if (this.buffType[index1] == 258) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagLilHarpy, 815); + else if (this.buffType[index1] == 259) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagFennecFox, 816); + else if (this.buffType[index1] == 260) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagGlitteryButterfly, 817); + else if (this.buffType[index1] == 261) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagBabyImp, 821); + else if (this.buffType[index1] == 262) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagBabyRedPanda, 825); + else if (this.buffType[index1] == 264) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagPlantero, 854); + else if (this.buffType[index1] == 266) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagDynamiteKitten, 858); + else if (this.buffType[index1] == 267) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagBabyWerewolf, 859); + else if (this.buffType[index1] == 268) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagShadowMimic, 860); + else if (this.buffType[index1] == 274) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagVoltBunny, 875); + else if (this.buffType[index1] == 284) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagKingSlimePet, 881); + else if (this.buffType[index1] == 285) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagEyeOfCthulhuPet, 882); + else if (this.buffType[index1] == 286) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagEaterOfWorldsPet, 883); + else if (this.buffType[index1] == 287) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagBrainOfCthulhuPet, 884); + else if (this.buffType[index1] == 288) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagSkeletronPet, 885); + else if (this.buffType[index1] == 289) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagQueenBeePet, 886); + else if (this.buffType[index1] == 290) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagDestroyerPet, 887); + else if (this.buffType[index1] == 291) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagTwinsPet, 888); + else if (this.buffType[index1] == 292) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagSkeletronPrimePet, 889); + else if (this.buffType[index1] == 293) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagPlanteraPet, 890); + else if (this.buffType[index1] == 294) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagGolemPet, 891); + else if (this.buffType[index1] == 295) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagDukeFishronPet, 892); + else if (this.buffType[index1] == 296) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagLunaticCultistPet, 893); + else if (this.buffType[index1] == 297) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagMoonLordPet, 894); + else if (this.buffType[index1] == 298) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagFairyQueenPet, 895); + else if (this.buffType[index1] == 299) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagPumpkingPet, 896); + else if (this.buffType[index1] == 300) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagEverscreamPet, 897); + else if (this.buffType[index1] == 301) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagIceQueenPet, 898); + else if (this.buffType[index1] == 302) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagMartianPet, 899); + else if (this.buffType[index1] == 303) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagDD2OgrePet, 900); + else if (this.buffType[index1] == 304) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagDD2BetsyPet, 901); + else if (this.buffType[index1] == 317) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagQueenSlimePet, 934); + else if (this.buffType[index1] == 200) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagDD2Gato, 703); + else if (this.buffType[index1] == 201) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagDD2Ghost, 702); + else if (this.buffType[index1] == 218) + this.BuffHandle_SpawnPetIfNeededAndSetTime(index1, ref this.petFlagSugarGlider, 765); + else if (this.buffType[index1] == 190) + { + this.buffTime[index1] = 18000; + this.suspiciouslookingTentacle = true; + bool flag = true; + if (this.ownedProjectileCounts[650] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 650, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 27 || this.buffType[index1] == 101 || this.buffType[index1] == 102) + { + this.buffTime[index1] = 18000; + bool flag = true; + int Type = 72; + if (this.buffType[index1] == 27) + this.blueFairy = true; + if (this.buffType[index1] == 101) + { + Type = 86; + this.redFairy = true; + } + if (this.buffType[index1] == 102) + { + Type = 87; + this.greenFairy = true; + } + if (this.head == 45 && this.body == 26 && this.legs == 25) + Type = 72; + if (this.ownedProjectileCounts[Type] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, Type, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 40) + { + this.buffTime[index1] = 18000; + this.bunny = true; + bool flag = true; + if (this.ownedProjectileCounts[111] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 111, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 148) + { + this.rabid = true; + if (Main.rand.Next(1200) == 0) + { + int num5 = Main.rand.Next(6); + float num6 = (float) Main.rand.Next(60, 100) * 0.01f; + switch (num5) + { + case 0: + this.AddBuff(22, (int) (60.0 * (double) num6 * 3.0)); + break; + case 1: + this.AddBuff(23, (int) (60.0 * (double) num6 * 0.75)); + break; + case 2: + this.AddBuff(31, (int) (60.0 * (double) num6 * 1.5)); + break; + case 3: + this.AddBuff(32, (int) (60.0 * (double) num6 * 3.5)); + break; + case 4: + this.AddBuff(33, (int) (60.0 * (double) num6 * 5.0)); + break; + case 5: + this.AddBuff(35, (int) (60.0 * (double) num6 * 1.0)); + break; + } + } + this.meleeDamage += 0.2f; + this.magicDamage += 0.2f; + this.rangedDamage += 0.2f; + this.minionDamage += 0.2f; + } + else if (this.buffType[index1] == 41) + { + this.buffTime[index1] = 18000; + this.penguin = true; + bool flag = true; + if (this.ownedProjectileCounts[112] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 112, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 152) + { + this.buffTime[index1] = 18000; + this.magicLantern = true; + if (this.ownedProjectileCounts[492] == 0 && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 492, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 91) + { + this.buffTime[index1] = 18000; + this.puppy = true; + bool flag = true; + if (this.ownedProjectileCounts[334] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 334, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 92) + { + this.buffTime[index1] = 18000; + this.grinch = true; + bool flag = true; + if (this.ownedProjectileCounts[353] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 353, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 84) + { + this.buffTime[index1] = 18000; + this.blackCat = true; + bool flag = true; + if (this.ownedProjectileCounts[319] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 319, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 61) + { + this.buffTime[index1] = 18000; + this.dino = true; + bool flag = true; + if (this.ownedProjectileCounts[236] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 236, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 154) + { + this.buffTime[index1] = 18000; + this.babyFaceMonster = true; + bool flag = true; + if (this.ownedProjectileCounts[499] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 499, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 65) + { + this.buffTime[index1] = 18000; + this.eyeSpring = true; + bool flag = true; + if (this.ownedProjectileCounts[268] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 268, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 66) + { + this.buffTime[index1] = 18000; + this.snowman = true; + bool flag = true; + if (this.ownedProjectileCounts[269] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 269, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 42) + { + this.buffTime[index1] = 18000; + this.turtle = true; + bool flag = true; + if (this.ownedProjectileCounts[(int) sbyte.MaxValue] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, (int) sbyte.MaxValue, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 45) + { + this.buffTime[index1] = 18000; + this.eater = true; + bool flag = true; + if (this.ownedProjectileCounts[175] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 175, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 50) + { + this.buffTime[index1] = 18000; + this.skeletron = true; + bool flag = true; + if (this.ownedProjectileCounts[197] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 197, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 51) + { + this.buffTime[index1] = 18000; + this.hornet = true; + bool flag = true; + if (this.ownedProjectileCounts[198] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 198, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 52) + { + this.buffTime[index1] = 18000; + this.tiki = true; + bool flag = true; + if (this.ownedProjectileCounts[199] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 199, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 53) + { + this.buffTime[index1] = 18000; + this.lizard = true; + bool flag = true; + if (this.ownedProjectileCounts[200] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 200, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 54) + { + this.buffTime[index1] = 18000; + this.parrot = true; + bool flag = true; + if (this.ownedProjectileCounts[208] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 208, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 55) + { + this.buffTime[index1] = 18000; + this.truffle = true; + bool flag = true; + if (this.ownedProjectileCounts[209] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 209, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 56) + { + this.buffTime[index1] = 18000; + this.sapling = true; + bool flag = true; + if (this.ownedProjectileCounts[210] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 210, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 85) + { + this.buffTime[index1] = 18000; + this.cSapling = true; + bool flag = true; + if (this.ownedProjectileCounts[324] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 324, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 81) + { + this.buffTime[index1] = 18000; + this.spider = true; + bool flag = true; + if (this.ownedProjectileCounts[313] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 313, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 82) + { + this.buffTime[index1] = 18000; + this.squashling = true; + bool flag = true; + if (this.ownedProjectileCounts[314] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 314, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 57) + { + this.buffTime[index1] = 18000; + this.wisp = true; + bool flag = true; + if (this.ownedProjectileCounts[211] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 211, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 60) + { + this.buffTime[index1] = 18000; + this.crystalLeaf = true; + bool flag = true; + for (int index6 = 0; index6 < 1000; ++index6) + { + if (Main.projectile[index6].active && Main.projectile[index6].owner == this.whoAmI && Main.projectile[index6].type == 226) + { + if (!flag) + Main.projectile[index6].Kill(); + flag = false; + } + } + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 226, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == (int) sbyte.MaxValue) + { + this.buffTime[index1] = 18000; + this.zephyrfish = true; + bool flag = true; + if (this.ownedProjectileCounts[380] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 380, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 136) + { + this.buffTime[index1] = 18000; + this.miniMinotaur = true; + bool flag = true; + if (this.ownedProjectileCounts[398] > 0) + flag = false; + if (flag && this.whoAmI == Main.myPlayer) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, 398, 0, 0.0f, this.whoAmI); + } + else if (this.buffType[index1] == 70) + this.venom = true; + else if (this.buffType[index1] == 20) + this.poisoned = true; + else if (this.buffType[index1] == 21) + this.potionDelay = this.buffTime[index1]; + else if (this.buffType[index1] == 22) + this.blind = true; + else if (this.buffType[index1] == 80) + this.blackout = true; + else if (this.buffType[index1] == 23) + { + this.noItems = true; + this.cursed = true; + } + else if (this.buffType[index1] == 24) + this.onFire = true; + else if (this.buffType[index1] == 103) + this.dripping = true; + else if (this.buffType[index1] == 137) + this.drippingSlime = true; + else if (this.buffType[index1] == 320) + this.drippingSparkleSlime = true; + else if (this.buffType[index1] == 67) + this.burned = true; + else if (this.buffType[index1] == 68) + this.suffocating = true; + else if (this.buffType[index1] == 39) + this.onFire2 = true; + else if (this.buffType[index1] == 44) + this.onFrostBurn = true; + else if (this.buffType[index1] == 163) + { + this.headcovered = true; + this.bleed = true; + } + else if (this.buffType[index1] == 164) + this.vortexDebuff = true; + else if (this.buffType[index1] == 194) + this.windPushed = true; + else if (this.buffType[index1] == 195) + this.witheredArmor = true; + else if (this.buffType[index1] == 205) + this.ballistaPanic = true; + else if (this.buffType[index1] == 196) + this.witheredWeapon = true; + else if (this.buffType[index1] == 197) + this.slowOgreSpit = true; + else if (this.buffType[index1] == 198) + this.parryDamageBuff = true; + else if (this.buffType[index1] == 145) + this.moonLeech = true; + else if (this.buffType[index1] == 149) + { + this.webbed = true; + if ((double) this.velocity.Y != 0.0) + this.velocity = new Vector2(0.0f, 1E-06f); + else + this.velocity = Vector2.Zero; + Player.jumpHeight = 0; + this.gravity = 0.0f; + this.moveSpeed = 0.0f; + this.dash = 0; + this.dashType = 0; + this.noKnockback = true; + this.RemoveAllGrapplingHooks(); + } + else if (this.buffType[index1] == 43) + this.defendedByPaladin = true; + else if (this.buffType[index1] == 29) + { + this.magicCrit += 2; + this.magicDamage += 0.05f; + this.statManaMax2 += 20; + this.manaCost -= 0.02f; + } + else if (this.buffType[index1] == 28) + { + if (!Main.dayTime && this.wolfAcc && !this.merman) + { + ++this.lifeRegen; + this.wereWolf = true; + this.meleeCrit += 2; + this.meleeDamage += 0.051f; + this.meleeSpeed += 0.051f; + this.statDefense += 3; + this.moveSpeed += 0.05f; + } + else + { + this.DelBuff(index1); + --index1; + } + } + else if (this.buffType[index1] == 33) + { + this.meleeDamage -= 0.051f; + this.meleeSpeed -= 0.051f; + this.statDefense -= 4; + this.moveSpeed -= 0.1f; + } + else if (this.buffType[index1] == 25) + { + this.tipsy = true; + this.statDefense -= 4; + this.meleeCrit += 2; + this.meleeDamage += 0.1f; + this.meleeSpeed += 0.1f; + } + else if (this.buffType[index1] == 26) + { + this.wellFed = true; + this.statDefense += 2; + this.meleeCrit += 2; + this.meleeDamage += 0.05f; + this.meleeSpeed += 0.05f; + this.magicCrit += 2; + this.magicDamage += 0.05f; + this.rangedCrit += 2; + this.rangedDamage += 0.05f; + this.minionDamage += 0.05f; + this.minionKB += 0.5f; + this.moveSpeed += 0.2f; + this.pickSpeed -= 0.05f; + } + else if (this.buffType[index1] == 206) + { + this.wellFed = true; + this.statDefense += 3; + this.meleeCrit += 3; + this.meleeDamage += 0.075f; + this.meleeSpeed += 0.075f; + this.magicCrit += 3; + this.magicDamage += 0.075f; + this.rangedCrit += 3; + this.rangedDamage += 0.075f; + this.minionDamage += 0.075f; + this.minionKB += 0.75f; + this.moveSpeed += 0.3f; + this.pickSpeed -= 0.1f; + } + else if (this.buffType[index1] == 207) + { + this.wellFed = true; + this.statDefense += 4; + this.meleeCrit += 4; + this.meleeDamage += 0.1f; + this.meleeSpeed += 0.1f; + this.magicCrit += 4; + this.magicDamage += 0.1f; + this.rangedCrit += 4; + this.rangedDamage += 0.1f; + this.minionDamage += 0.1f; + ++this.minionKB; + this.moveSpeed += 0.4f; + this.pickSpeed -= 0.15f; + } + else if (this.buffType[index1] == 71) + this.meleeEnchant = (byte) 1; + else if (this.buffType[index1] == 73) + this.meleeEnchant = (byte) 2; + else if (this.buffType[index1] == 74) + this.meleeEnchant = (byte) 3; + else if (this.buffType[index1] == 75) + this.meleeEnchant = (byte) 4; + else if (this.buffType[index1] == 76) + this.meleeEnchant = (byte) 5; + else if (this.buffType[index1] == 77) + this.meleeEnchant = (byte) 6; + else if (this.buffType[index1] == 78) + this.meleeEnchant = (byte) 7; + else if (this.buffType[index1] == 79) + this.meleeEnchant = (byte) 8; + } + } + if (this.whoAmI != Main.myPlayer || (int) this.luckPotion == (int) this.oldLuckPotion) + return; + this.luckNeedsSync = true; + this.oldLuckPotion = this.luckPotion; + } + + private void UpdateProjectileCaches(int i) + { + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == i) + { + ++this.ownedProjectileCounts[Main.projectile[index].type]; + if (Main.projectile[index].type == 831) + { + int originalDamage = Main.projectile[index].originalDamage; + if (this.highestStormTigerGemOriginalDamage < originalDamage) + this.highestStormTigerGemOriginalDamage = originalDamage; + } + } + } + } + + private void ResetProjectileCaches() + { + this.highestStormTigerGemOriginalDamage = 0; + for (int index = 0; index < this.ownedProjectileCounts.Length; ++index) + this.ownedProjectileCounts[index] = 0; + } + + private void BuffHandle_SpawnPetIfNeededAndSetTime( + int buffIndex, + ref bool petBool, + int petProjID, + int buffTimeToGive = 18000) + { + this.buffTime[buffIndex] = buffTimeToGive; + this.BuffHandle_SpawnPetIfNeeded(ref petBool, petProjID); + } + + private void BuffHandle_SpawnPetIfNeeded(ref bool petBool, int petProjID) + { + petBool = true; + bool flag = true; + if (this.ownedProjectileCounts[petProjID] > 0) + flag = false; + if (!flag || this.whoAmI != Main.myPlayer) + return; + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), 0.0f, 0.0f, petProjID, 0, 0.0f, this.whoAmI); + } + + private void UpdateStormTigerStatus() + { + int Type; + switch (this.GetDesiredStormTigerMinionRank()) + { + case 1: + Type = 833; + break; + case 2: + Type = 834; + break; + case 3: + Type = 835; + break; + default: + Type = -1; + break; + } + bool flag = false; + if (Type == -1) + flag = true; + for (int index = 0; index < ProjectileID.Sets.StormTigerIds.Length; ++index) + { + int stormTigerId = ProjectileID.Sets.StormTigerIds[index]; + if (stormTigerId != Type && this.ownedProjectileCounts[stormTigerId] >= 1) + { + flag = true; + break; + } + } + if (flag) + { + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && projectile.owner == this.whoAmI && projectile.type != Type && ProjectileID.Sets.StormTiger[projectile.type]) + projectile.Kill(); + } + } + else + { + if (this.ownedProjectileCounts[Type] >= 1) + return; + Projectile.NewProjectile(this.Center, Vector2.Zero, Type, 0, 0.0f, this.whoAmI); + } + } + + private int GetDesiredStormTigerMinionRank() + { + int num = 0; + int ownedProjectileCount = this.ownedProjectileCounts[831]; + if (ownedProjectileCount > 0) + num = 1; + if (ownedProjectileCount > 3) + num = 2; + if (ownedProjectileCount > 6) + num = 3; + return num; + } + + public void Counterweight(Vector2 hitPos, int dmg, float kb) + { + if (!this.yoyoGlove && this.counterWeight <= 0) + return; + int index1 = -1; + int num1 = 0; + int num2 = 0; + for (int index2 = 0; index2 < 1000; ++index2) + { + if (Main.projectile[index2].active && Main.projectile[index2].owner == this.whoAmI) + { + if (Main.projectile[index2].counterweight) + ++num2; + else if (Main.projectile[index2].aiStyle == 99) + { + ++num1; + index1 = index2; + } + } + } + if (this.yoyoGlove && num1 < 2) + { + if (index1 < 0) + return; + Vector2 vector2_1 = hitPos - this.Center; + vector2_1.Normalize(); + Vector2 vector2_2 = vector2_1 * 16f; + Projectile.NewProjectile(this.Center.X, this.Center.Y, vector2_2.X, vector2_2.Y, Main.projectile[index1].type, Main.projectile[index1].damage, Main.projectile[index1].knockBack, this.whoAmI, 1f); + } + else + { + if (num2 >= num1) + return; + Vector2 vector2_3 = hitPos - this.Center; + vector2_3.Normalize(); + Vector2 vector2_4 = vector2_3 * 16f; + float KnockBack = (float) (((double) kb + 6.0) / 2.0); + if (num2 > 0) + Projectile.NewProjectile(this.Center.X, this.Center.Y, vector2_4.X, vector2_4.Y, this.counterWeight, (int) ((double) dmg * 0.8), KnockBack, this.whoAmI, 1f); + else + Projectile.NewProjectile(this.Center.X, this.Center.Y, vector2_4.X, vector2_4.Y, this.counterWeight, (int) ((double) dmg * 0.8), KnockBack, this.whoAmI); + } + } + + public int beeType() + { + if (this.strongBees && Main.rand.Next(2) == 0) + { + this.makeStrongBee = true; + return 566; + } + this.makeStrongBee = false; + return 181; + } + + public int beeDamage(int dmg) => this.makeStrongBee ? dmg + Main.rand.Next(1, 4) : dmg + Main.rand.Next(2); + + public float beeKB(float KB) => this.makeStrongBee ? (float) (0.5 + (double) KB * 1.10000002384186) : KB; + + public void Yoraiz0rEye() + { + int index = 0 + this.bodyFrame.Y / 56; + if (index >= Main.OffsetsPlayerHeadgear.Length) + index = 0; + Vector2 vector2_1 = new Vector2((float) (this.width / 2), (float) (this.height / 2)) + Main.OffsetsPlayerHeadgear[index] + (this.MountedCenter - this.Center); + Vector2 posOffset; + float seatAdjustment; + this.sitting.GetSittingOffsetInfo(this, out posOffset, out seatAdjustment); + Vector2 vector2_2 = vector2_1 + (posOffset + new Vector2(0.0f, seatAdjustment)); + float y = -11.5f * this.gravDir; + if ((double) this.gravDir == -1.0) + y -= 4f; + Vector2 spinningpoint1 = new Vector2((float) (3 * this.direction - (this.direction == 1 ? 1 : 0)), y) + Vector2.UnitY * this.gfxOffY + vector2_2; + Vector2 spinningpoint2 = new Vector2((float) (3 * this.shadowDirection[1] - (this.direction == 1 ? 1 : 0)), y) + vector2_2; + Vector2 vector2_3 = Vector2.Zero; + if (this.mount.Active && this.mount.Cart) + { + int num = Math.Sign(this.velocity.X); + if (num == 0) + num = this.direction; + vector2_3 = new Vector2(MathHelper.Lerp(0.0f, -8f, this.fullRotation / 0.7853982f), MathHelper.Lerp(0.0f, 2f, Math.Abs(this.fullRotation / 0.7853982f))).RotatedBy((double) this.fullRotation); + if (num == Math.Sign(this.fullRotation)) + vector2_3 *= MathHelper.Lerp(1f, 0.6f, Math.Abs(this.fullRotation / 0.7853982f)); + } + if ((double) this.fullRotation != 0.0) + { + spinningpoint1 = spinningpoint1.RotatedBy((double) this.fullRotation, this.fullRotationOrigin); + spinningpoint2 = spinningpoint2.RotatedBy((double) this.fullRotation, this.fullRotationOrigin); + } + float num1 = 0.0f; + Vector2 vector2_4 = this.position + spinningpoint1 + vector2_3; + Vector2 vector2_5 = this.oldPosition + spinningpoint2 + vector2_3; + vector2_5.Y -= num1 / 2f; + vector2_4.Y -= num1 / 2f; + float num2 = 1f; + switch (this.yoraiz0rEye % 10) + { + case 1: + return; + case 2: + num2 = 0.5f; + break; + case 3: + num2 = 0.625f; + break; + case 4: + num2 = 0.75f; + break; + case 5: + num2 = 0.875f; + break; + case 6: + num2 = 1f; + break; + case 7: + num2 = 1.1f; + break; + } + if (this.yoraiz0rEye < 7) + { + DelegateMethods.v3_1 = Main.hslToRgb(Main.rgbToHsl(this.eyeColor).X, 1f, 0.5f).ToVector3() * 0.5f * num2; + if (this.velocity != Vector2.Zero) + Utils.PlotTileLine(this.Center, this.Center + this.velocity * 2f, 4f, new Utils.TileActionAttempt(DelegateMethods.CastLightOpen)); + else + Utils.PlotTileLine(this.Left, this.Right, 4f, new Utils.TileActionAttempt(DelegateMethods.CastLightOpen)); + } + int num3 = (int) Vector2.Distance(vector2_4, vector2_5) / 3 + 1; + if ((double) Vector2.Distance(vector2_4, vector2_5) % 3.0 != 0.0) + ++num3; + for (float num4 = 1f; (double) num4 <= (double) num3; ++num4) + { + Dust dust = Main.dust[Dust.NewDust(this.Center, 0, 0, 182)]; + dust.position = Vector2.Lerp(vector2_5, vector2_4, num4 / (float) num3); + dust.noGravity = true; + dust.velocity = Vector2.Zero; + dust.customData = (object) this; + dust.scale = num2; + dust.shader = GameShaders.Armor.GetSecondaryShader(this.cYorai, this); + } + } + + public bool IsAValidEquipmentSlotForIteration(int slot) + { + switch (slot) + { + case 8: + case 18: + bool flag1 = this.extraAccessory; + if ((Main.expertMode ? 1 : (Main.gameMenu ? 1 : 0)) == 0) + flag1 = false; + return flag1; + case 9: + case 19: + bool flag2 = true; + if ((Main.masterMode ? 1 : (Main.gameMenu ? 1 : 0)) == 0) + flag2 = false; + return flag2; + default: + return true; + } + } + + public void UpdateEquips(int i) + { + if (this.inventory[this.selectedItem].type == 277 && (!this.mount.Active || !this.mount.Cart)) + this.trident = true; + for (int index = 0; index < 58; ++index) + { + int type = this.inventory[index].type; + if ((type == 15 || type == 707) && this.accWatch < 1) + this.accWatch = 1; + if ((type == 16 || type == 708) && this.accWatch < 2) + this.accWatch = 2; + if ((type == 17 || type == 709) && this.accWatch < 3) + this.accWatch = 3; + if (type == 393) + this.accCompass = 1; + if (type == 18) + this.accDepthMeter = 1; + if (type == 395 || type == 3123 || type == 3124) + { + this.accWatch = 3; + this.accDepthMeter = 1; + this.accCompass = 1; + } + if (type == 3120 || type == 3036 || type == 3123 || type == 3124) + this.accFishFinder = true; + if (type == 3037 || type == 3036 || type == 3123 || type == 3124) + this.accWeatherRadio = true; + if (type == 3096 || type == 3036 || type == 3123 || type == 3124) + this.accCalendar = true; + if (type == 3084 || type == 3122 || type == 3123 || type == 3124) + this.accThirdEye = true; + if (type == 3095 || type == 3122 || type == 3123 || type == 3124) + this.accJarOfSouls = true; + if (type == 3118 || type == 3122 || type == 3123 || type == 3124) + this.accCritterGuide = true; + if (type == 3099 || type == 3121 || type == 3123 || type == 3124) + this.accStopwatch = true; + if (type == 3102 || type == 3121 || type == 3123 || type == 3124) + this.accOreFinder = true; + if (type == 3119 || type == 3121 || type == 3123 || type == 3124) + this.accDreamCatcher = true; + if (type == 3619 || type == 3611) + this.InfoAccMechShowWires = true; + if (type == 486 || type == 3611) + this.rulerLine = true; + if (type == 2799) + this.rulerGrid = true; + if (type == 2216 || type == 3061) + this.autoPaint = true; + if (type == 3624) + this.autoActuator = true; + if (type == 4346) + this.preventAllItemPickups = true; + if (type == 4767) + this.dontHurtCritters = true; + if (type == 4743) + this.hasFootball = true; + } + if (this.inventory[58].type == 4743) + this.hasFootball = true; + for (int slot = 0; slot < 10; ++slot) + { + if (this.IsAValidEquipmentSlotForIteration(slot) && (!this.armor[slot].expertOnly || Main.expertMode)) + { + int type = this.armor[slot].type; + if ((type == 15 || type == 707) && this.accWatch < 1) + this.accWatch = 1; + if ((type == 16 || type == 708) && this.accWatch < 2) + this.accWatch = 2; + if ((type == 17 || type == 709) && this.accWatch < 3) + this.accWatch = 3; + if (type == 393) + this.accCompass = 1; + if (type == 18) + this.accDepthMeter = 1; + if (type == 395 || type == 3123 || type == 3124) + { + this.accWatch = 3; + this.accDepthMeter = 1; + this.accCompass = 1; + } + if (type == 3120 || type == 3036 || type == 3123 || type == 3124) + this.accFishFinder = true; + if (type == 3037 || type == 3036 || type == 3123 || type == 3124) + this.accWeatherRadio = true; + if (type == 3096 || type == 3036 || type == 3123 || type == 3124) + this.accCalendar = true; + if (type == 3084 || type == 3122 || type == 3123 || type == 3124) + this.accThirdEye = true; + if (type == 3095 || type == 3122 || type == 3123 || type == 3124) + this.accJarOfSouls = true; + if (type == 3118 || type == 3122 || type == 3123 || type == 3124) + this.accCritterGuide = true; + if (type == 3099 || type == 3121 || type == 3123 || type == 3124) + this.accStopwatch = true; + if (type == 3102 || type == 3121 || type == 3123 || type == 3124) + this.accOreFinder = true; + if (type == 3119 || type == 3121 || type == 3123 || type == 3124) + this.accDreamCatcher = true; + if (type == 3619) + this.InfoAccMechShowWires = true; + if (this.armor[slot].type == 3017 || this.armor[slot].type == 3993) + { + this.flowerBoots = true; + if (this.armor[slot].type == 3993) + this.fairyBoots = true; + if (this.whoAmI == Main.myPlayer) + this.DoBootsEffect(new Utils.TileActionAttempt(this.DoBootsEffect_PlaceFlowersOnTile)); + } + if (this.armor[slot].type == 5001) + { + this.moveSpeed += 0.25f; + this.moonLordLegs = true; + } + this.statDefense += this.armor[slot].defense; + this.lifeRegen += this.armor[slot].lifeRegen; + if (this.armor[slot].shieldSlot > (sbyte) 0) + this.hasRaisableShield = true; + switch (this.armor[slot].type) + { + case 3797: + ++this.maxTurrets; + this.manaCost -= 0.1f; + break; + case 3798: + this.magicDamage += 0.1f; + this.minionDamage += 0.2f; + break; + case 3799: + this.minionDamage += 0.1f; + this.magicCrit += 20; + break; + case 3800: + ++this.maxTurrets; + this.lifeRegen += 4; + break; + case 3801: + this.meleeDamage += 0.15f; + this.minionDamage += 0.15f; + break; + case 3802: + this.minionDamage += 0.15f; + this.meleeCrit += 20; + this.moveSpeed += 0.2f; + break; + case 3803: + ++this.maxTurrets; + this.rangedCrit += 10; + break; + case 3804: + this.rangedDamage += 0.2f; + this.minionDamage += 0.2f; + break; + case 3805: + this.minionDamage += 0.1f; + this.moveSpeed += 0.2f; + break; + case 3806: + ++this.maxTurrets; + this.meleeSpeed += 0.2f; + break; + case 3807: + this.meleeDamage += 0.2f; + this.minionDamage += 0.2f; + break; + case 3808: + this.minionDamage += 0.1f; + this.meleeCrit += 10; + this.moveSpeed += 0.2f; + break; + case 3871: + this.maxTurrets += 2; + this.minionDamage += 0.1f; + break; + case 3872: + this.minionDamage += 0.3f; + this.lifeRegen += 8; + break; + case 3873: + this.minionDamage += 0.2f; + this.meleeCrit += 20; + this.moveSpeed += 0.3f; + break; + case 3874: + this.maxTurrets += 2; + this.magicDamage += 0.1f; + this.minionDamage += 0.1f; + break; + case 3875: + this.minionDamage += 0.3f; + this.magicDamage += 0.15f; + break; + case 3876: + this.minionDamage += 0.2f; + this.magicCrit += 25; + break; + case 3877: + this.maxTurrets += 2; + this.minionDamage += 0.1f; + this.rangedCrit += 10; + break; + case 3878: + this.minionDamage += 0.25f; + this.rangedDamage += 0.25f; + break; + case 3879: + this.minionDamage += 0.25f; + this.moveSpeed += 0.2f; + break; + case 3880: + this.maxTurrets += 2; + this.minionDamage += 0.2f; + this.meleeDamage += 0.2f; + break; + case 3881: + this.meleeSpeed += 0.2f; + this.minionDamage += 0.2f; + break; + case 3882: + this.minionDamage += 0.2f; + this.meleeCrit += 20; + this.moveSpeed += 0.2f; + break; + } + if (this.armor[slot].type == 268) + this.accDivingHelm = true; + if (this.armor[slot].type == 238) + this.magicDamage += 0.15f; + if (this.armor[slot].type == 3770) + this.slowFall = true; + if (this.armor[slot].type == 4404) + this.canFloatInWater = true; + if (this.armor[slot].type == 3776) + { + this.magicDamage += 0.15f; + this.minionDamage += 0.15f; + } + if (this.armor[slot].type == 3777) + { + this.statManaMax2 += 40; + ++this.maxMinions; + } + if (this.armor[slot].type == 3778) + { + this.statManaMax2 += 40; + ++this.maxMinions; + } + if (this.armor[slot].type == 3212) + this.armorPenetration += 5; + if (this.armor[slot].type == 2277) + { + this.magicDamage += 0.05f; + this.meleeDamage += 0.05f; + this.rangedDamage += 0.05f; + this.minionDamage += 0.05f; + this.magicCrit += 5; + this.rangedCrit += 5; + this.meleeCrit += 5; + this.meleeSpeed += 0.1f; + this.moveSpeed += 0.1f; + } + if (this.armor[slot].type == 2279) + { + this.magicDamage += 0.06f; + this.magicCrit += 6; + this.manaCost -= 0.1f; + } + if (this.armor[slot].type == 3109 || this.armor[slot].type == 4008) + this.nightVision = true; + if (this.armor[slot].type == 256 || this.armor[slot].type == 257 || this.armor[slot].type == 258) + { + this.rangedCrit += 3; + this.meleeCrit += 3; + this.magicCrit += 3; + } + if (this.armor[slot].type == 3374 || this.armor[slot].type == 3375 || this.armor[slot].type == 3376) + this.rangedCrit += 3; + if (this.armor[slot].type == 151 || this.armor[slot].type == 959 || this.armor[slot].type == 152 || this.armor[slot].type == 153) + this.rangedDamage += 0.05f; + if (this.armor[slot].type == 2275) + { + this.magicDamage += 0.07f; + this.magicCrit += 7; + } + if (this.armor[slot].type == 123 || this.armor[slot].type == 124 || this.armor[slot].type == 125) + this.magicDamage += 0.07f; + if (this.armor[slot].type == 111 || this.armor[slot].type == 228 || this.armor[slot].type == 229 || this.armor[slot].type == 230 || this.armor[slot].type == 960 || this.armor[slot].type == 961 || this.armor[slot].type == 962) + this.statManaMax2 += 20; + if (this.armor[slot].type == 228 || this.armor[slot].type == 960) + this.statManaMax2 += 20; + if (this.armor[slot].type == 228 || this.armor[slot].type == 229 || this.armor[slot].type == 230 || this.armor[slot].type == 960 || this.armor[slot].type == 961 || this.armor[slot].type == 962) + this.magicCrit += 4; + if (this.armor[slot].type == 100 || this.armor[slot].type == 101 || this.armor[slot].type == 102) + this.meleeSpeed += 0.07f; + if (this.armor[slot].type == 956 || this.armor[slot].type == 957 || this.armor[slot].type == 958) + this.meleeSpeed += 0.07f; + if (this.armor[slot].type == 792 || this.armor[slot].type == 793 || this.armor[slot].type == 794) + { + this.meleeDamage += 0.02f; + this.rangedDamage += 0.02f; + this.magicDamage += 0.02f; + this.minionDamage += 0.02f; + } + if (this.armor[slot].type == 371) + { + this.magicCrit += 9; + this.statManaMax2 += 40; + } + if (this.armor[slot].type == 372) + { + this.moveSpeed += 0.07f; + this.meleeSpeed += 0.12f; + } + if (this.armor[slot].type == 373) + { + this.rangedDamage += 0.1f; + this.rangedCrit += 6; + } + if (this.armor[slot].type == 374) + { + this.magicCrit += 3; + this.meleeCrit += 3; + this.rangedCrit += 3; + } + if (this.armor[slot].type == 375) + this.moveSpeed += 0.1f; + if (this.armor[slot].type == 376) + { + this.magicDamage += 0.15f; + this.statManaMax2 += 60; + } + if (this.armor[slot].type == 377) + { + this.meleeCrit += 5; + this.meleeDamage += 0.1f; + } + if (this.armor[slot].type == 378) + { + this.rangedDamage += 0.12f; + this.rangedCrit += 7; + } + if (this.armor[slot].type == 379) + { + this.rangedDamage += 0.05f; + this.meleeDamage += 0.05f; + this.magicDamage += 0.05f; + this.minionDamage += 0.05f; + } + if (this.armor[slot].type == 380) + { + this.magicCrit += 3; + this.meleeCrit += 3; + this.rangedCrit += 3; + } + if (this.armor[slot].type >= 2367 && this.armor[slot].type <= 2369) + this.fishingSkill += 5; + if (this.armor[slot].type == 400) + { + this.magicDamage += 0.11f; + this.magicCrit += 11; + this.statManaMax2 += 80; + } + if (this.armor[slot].type == 401) + { + this.meleeCrit += 7; + this.meleeDamage += 0.14f; + } + if (this.armor[slot].type == 402) + { + this.rangedDamage += 0.14f; + this.rangedCrit += 8; + } + if (this.armor[slot].type == 403) + { + this.rangedDamage += 0.06f; + this.meleeDamage += 0.06f; + this.magicDamage += 0.06f; + this.minionDamage += 0.06f; + } + if (this.armor[slot].type == 404) + { + this.magicCrit += 4; + this.meleeCrit += 4; + this.rangedCrit += 4; + this.moveSpeed += 0.05f; + } + if (this.armor[slot].type == 1205) + { + this.meleeDamage += 0.08f; + this.meleeSpeed += 0.12f; + } + if (this.armor[slot].type == 1206) + { + this.rangedDamage += 0.09f; + this.rangedCrit += 9; + } + if (this.armor[slot].type == 1207) + { + this.magicDamage += 0.07f; + this.magicCrit += 7; + this.statManaMax2 += 60; + } + if (this.armor[slot].type == 1208) + { + this.meleeDamage += 0.03f; + this.rangedDamage += 0.03f; + this.magicDamage += 0.03f; + this.minionDamage += 0.03f; + this.magicCrit += 2; + this.meleeCrit += 2; + this.rangedCrit += 2; + } + if (this.armor[slot].type == 1209) + { + this.meleeDamage += 0.02f; + this.rangedDamage += 0.02f; + this.magicDamage += 0.02f; + this.minionDamage += 0.02f; + ++this.magicCrit; + ++this.meleeCrit; + ++this.rangedCrit; + } + if (this.armor[slot].type == 1210) + { + this.meleeDamage += 0.07f; + this.meleeSpeed += 0.07f; + this.moveSpeed += 0.07f; + } + if (this.armor[slot].type == 1211) + { + this.rangedCrit += 15; + this.moveSpeed += 0.08f; + } + if (this.armor[slot].type == 1212) + { + this.magicCrit += 18; + this.statManaMax2 += 80; + } + if (this.armor[slot].type == 1213) + { + this.magicCrit += 6; + this.meleeCrit += 6; + this.rangedCrit += 6; + } + if (this.armor[slot].type == 1214) + this.moveSpeed += 0.11f; + if (this.armor[slot].type == 1215) + { + this.meleeDamage += 0.08f; + this.meleeCrit += 8; + this.meleeSpeed += 0.08f; + } + if (this.armor[slot].type == 1216) + { + this.rangedDamage += 0.16f; + this.rangedCrit += 7; + } + if (this.armor[slot].type == 1217) + { + this.magicDamage += 0.16f; + this.magicCrit += 7; + this.statManaMax2 += 100; + } + if (this.armor[slot].type == 1218) + { + this.meleeDamage += 0.04f; + this.rangedDamage += 0.04f; + this.magicDamage += 0.04f; + this.minionDamage += 0.04f; + this.magicCrit += 3; + this.meleeCrit += 3; + this.rangedCrit += 3; + } + if (this.armor[slot].type == 1219) + { + this.meleeDamage += 0.03f; + this.rangedDamage += 0.03f; + this.magicDamage += 0.03f; + this.minionDamage += 0.03f; + this.magicCrit += 3; + this.meleeCrit += 3; + this.rangedCrit += 3; + this.moveSpeed += 0.06f; + } + if (this.armor[slot].type == 558 || this.armor[slot].type == 4898) + { + this.magicDamage += 0.12f; + this.magicCrit += 12; + this.statManaMax2 += 100; + } + if (this.armor[slot].type == 559 || this.armor[slot].type == 4896) + { + this.meleeCrit += 10; + this.meleeDamage += 0.1f; + this.meleeSpeed += 0.1f; + } + if (this.armor[slot].type == 553 || this.armor[slot].type == 4897) + { + this.rangedDamage += 0.15f; + this.rangedCrit += 8; + } + if (this.armor[slot].type == 4873 || this.armor[slot].type == 4899) + { + this.minionDamage += 0.1f; + ++this.maxMinions; + } + if (this.armor[slot].type == 551 || this.armor[slot].type == 4900) + { + this.magicCrit += 7; + this.meleeCrit += 7; + this.rangedCrit += 7; + } + if (this.armor[slot].type == 552 || this.armor[slot].type == 4901) + { + this.rangedDamage += 0.07f; + this.meleeDamage += 0.07f; + this.magicDamage += 0.07f; + this.minionDamage += 0.07f; + this.moveSpeed += 0.08f; + } + if (this.armor[slot].type == 4982) + { + this.rangedCrit += 5; + this.meleeCrit += 5; + this.magicCrit += 5; + } + if (this.armor[slot].type == 4983) + { + this.rangedDamage += 0.05f; + this.meleeDamage += 0.05f; + this.magicDamage += 0.05f; + this.minionDamage += 0.05f; + } + if (this.armor[slot].type == 4984) + this.moveSpeed += 0.1f; + if (this.armor[slot].type == 1001) + { + this.meleeDamage += 0.16f; + this.meleeCrit += 6; + } + if (this.armor[slot].type == 1002) + { + this.rangedDamage += 0.16f; + this.chloroAmmoCost80 = true; + } + if (this.armor[slot].type == 1003) + { + this.statManaMax2 += 80; + this.manaCost -= 0.17f; + this.magicDamage += 0.16f; + } + if (this.armor[slot].type == 1004) + { + this.meleeDamage += 0.05f; + this.magicDamage += 0.05f; + this.rangedDamage += 0.05f; + this.minionDamage += 0.05f; + this.magicCrit += 7; + this.meleeCrit += 7; + this.rangedCrit += 7; + } + if (this.armor[slot].type == 1005) + { + this.magicCrit += 8; + this.meleeCrit += 8; + this.rangedCrit += 8; + this.moveSpeed += 0.05f; + } + if (this.armor[slot].type == 2189) + { + this.statManaMax2 += 60; + this.manaCost -= 0.13f; + this.magicDamage += 0.05f; + this.magicCrit += 5; + } + if (this.armor[slot].type == 1503) + this.magicDamage -= 0.4f; + if (this.armor[slot].type == 1504) + { + this.magicDamage += 0.07f; + this.magicCrit += 7; + } + if (this.armor[slot].type == 1505) + { + this.magicDamage += 0.08f; + this.moveSpeed += 0.08f; + } + if (this.armor[slot].type == 1546) + { + this.rangedCrit += 5; + this.arrowDamage += 0.15f; + } + if (this.armor[slot].type == 1547) + { + this.rangedCrit += 5; + this.bulletDamage += 0.15f; + } + if (this.armor[slot].type == 1548) + { + this.rangedCrit += 5; + this.rocketDamage += 0.15f; + } + if (this.armor[slot].type == 1549) + { + this.rangedCrit += 13; + this.rangedDamage += 0.13f; + this.ammoCost80 = true; + } + if (this.armor[slot].type == 1550) + { + this.rangedCrit += 7; + this.moveSpeed += 0.12f; + } + if (this.armor[slot].type == 1282) + { + this.statManaMax2 += 20; + this.manaCost -= 0.05f; + } + if (this.armor[slot].type == 1283) + { + this.statManaMax2 += 40; + this.manaCost -= 0.07f; + } + if (this.armor[slot].type == 1284) + { + this.statManaMax2 += 40; + this.manaCost -= 0.09f; + } + if (this.armor[slot].type == 1285) + { + this.statManaMax2 += 60; + this.manaCost -= 0.11f; + } + if (this.armor[slot].type == 1286 || this.armor[slot].type == 4256) + { + this.statManaMax2 += 60; + this.manaCost -= 0.13f; + } + if (this.armor[slot].type == 1287) + { + this.statManaMax2 += 80; + this.manaCost -= 0.15f; + } + if (this.armor[slot].type == 1316 || this.armor[slot].type == 1317 || this.armor[slot].type == 1318) + this.aggro += 250; + if (this.armor[slot].type == 1316) + this.meleeDamage += 0.06f; + if (this.armor[slot].type == 1317) + { + this.meleeDamage += 0.08f; + this.meleeCrit += 8; + } + if (this.armor[slot].type == 1318) + this.meleeCrit += 4; + if (this.armor[slot].type == 2199 || this.armor[slot].type == 2202) + this.aggro += 250; + if (this.armor[slot].type == 2201) + this.aggro += 400; + if (this.armor[slot].type == 2199) + this.meleeDamage += 0.06f; + if (this.armor[slot].type == 2200) + { + this.meleeDamage += 0.08f; + this.meleeCrit += 8; + this.meleeSpeed += 0.06f; + this.moveSpeed += 0.06f; + } + if (this.armor[slot].type == 2201) + { + this.meleeDamage += 0.05f; + this.meleeCrit += 5; + } + if (this.armor[slot].type == 2202) + { + this.meleeSpeed += 0.06f; + this.moveSpeed += 0.06f; + } + if (this.armor[slot].type == 684) + { + this.rangedDamage += 0.16f; + this.meleeDamage += 0.16f; + } + if (this.armor[slot].type == 685) + { + this.meleeCrit += 11; + this.rangedCrit += 11; + } + if (this.armor[slot].type == 686) + { + this.moveSpeed += 0.08f; + this.meleeSpeed += 0.07f; + } + if (this.armor[slot].type == 2361) + { + ++this.maxMinions; + this.minionDamage += 0.04f; + } + if (this.armor[slot].type == 2362) + { + ++this.maxMinions; + this.minionDamage += 0.04f; + } + if (this.armor[slot].type == 2363) + this.minionDamage += 0.05f; + if (this.armor[slot].type >= 1158 && this.armor[slot].type <= 1161) + ++this.maxMinions; + if (this.armor[slot].type >= 1159 && this.armor[slot].type <= 1161) + this.minionDamage += 0.1f; + if (this.armor[slot].type >= 2370 && this.armor[slot].type <= 2371) + { + this.minionDamage += 0.05f; + ++this.maxMinions; + } + if (this.armor[slot].type == 2372) + { + this.minionDamage += 0.06f; + ++this.maxMinions; + } + if (this.armor[slot].type == 3381 || this.armor[slot].type == 3382 || this.armor[slot].type == 3383) + { + if (this.armor[slot].type != 3381) + ++this.maxMinions; + ++this.maxMinions; + this.minionDamage += 0.22f; + } + if (this.armor[slot].type == 2763) + { + this.aggro += 300; + this.meleeCrit += 26; + this.lifeRegen += 2; + } + if (this.armor[slot].type == 2764) + { + this.aggro += 300; + this.meleeDamage += 0.29f; + this.lifeRegen += 2; + } + if (this.armor[slot].type == 2765) + { + this.aggro += 300; + this.meleeSpeed += 0.15f; + this.moveSpeed += 0.15f; + this.lifeRegen += 2; + } + if (this.armor[slot].type == 2757) + { + this.rangedCrit += 7; + this.rangedDamage += 0.16f; + } + if (this.armor[slot].type == 2758) + { + this.ammoCost75 = true; + this.rangedCrit += 12; + this.rangedDamage += 0.12f; + } + if (this.armor[slot].type == 2759) + { + this.rangedCrit += 8; + this.rangedDamage += 0.08f; + this.moveSpeed += 0.1f; + } + if (this.armor[slot].type == 2760) + { + this.statManaMax2 += 60; + this.manaCost -= 0.15f; + this.magicCrit += 7; + this.magicDamage += 0.07f; + } + if (this.armor[slot].type == 2761) + { + this.magicDamage += 0.09f; + this.magicCrit += 9; + } + if (this.armor[slot].type == 2762) + { + this.moveSpeed += 0.1f; + this.magicDamage += 0.1f; + } + if (this.armor[slot].type == 1832) + { + ++this.maxMinions; + this.minionDamage += 0.11f; + } + if (this.armor[slot].type == 1833) + { + this.maxMinions += 2; + this.minionDamage += 0.11f; + } + if (this.armor[slot].type == 1834) + { + this.moveSpeed += 0.2f; + ++this.maxMinions; + this.minionDamage += 0.11f; + } + if (this.armor[slot].prefix == (byte) 62) + ++this.statDefense; + if (this.armor[slot].prefix == (byte) 63) + this.statDefense += 2; + if (this.armor[slot].prefix == (byte) 64) + this.statDefense += 3; + if (this.armor[slot].prefix == (byte) 65) + this.statDefense += 4; + if (this.armor[slot].prefix == (byte) 66) + this.statManaMax2 += 20; + if (this.armor[slot].prefix == (byte) 67) + { + this.meleeCrit += 2; + this.rangedCrit += 2; + this.magicCrit += 2; + } + if (this.armor[slot].prefix == (byte) 68) + { + this.meleeCrit += 4; + this.rangedCrit += 4; + this.magicCrit += 4; + } + if (this.armor[slot].prefix == (byte) 69) + { + this.meleeDamage += 0.01f; + this.rangedDamage += 0.01f; + this.magicDamage += 0.01f; + this.minionDamage += 0.01f; + } + if (this.armor[slot].prefix == (byte) 70) + { + this.meleeDamage += 0.02f; + this.rangedDamage += 0.02f; + this.magicDamage += 0.02f; + this.minionDamage += 0.02f; + } + if (this.armor[slot].prefix == (byte) 71) + { + this.meleeDamage += 0.03f; + this.rangedDamage += 0.03f; + this.magicDamage += 0.03f; + this.minionDamage += 0.03f; + } + if (this.armor[slot].prefix == (byte) 72) + { + this.meleeDamage += 0.04f; + this.rangedDamage += 0.04f; + this.magicDamage += 0.04f; + this.minionDamage += 0.04f; + } + if (this.armor[slot].prefix == (byte) 73) + this.moveSpeed += 0.01f; + if (this.armor[slot].prefix == (byte) 74) + this.moveSpeed += 0.02f; + if (this.armor[slot].prefix == (byte) 75) + this.moveSpeed += 0.03f; + if (this.armor[slot].prefix == (byte) 76) + this.moveSpeed += 0.04f; + if (this.armor[slot].prefix == (byte) 77) + this.meleeSpeed += 0.01f; + if (this.armor[slot].prefix == (byte) 78) + this.meleeSpeed += 0.02f; + if (this.armor[slot].prefix == (byte) 79) + this.meleeSpeed += 0.03f; + if (this.armor[slot].prefix == (byte) 80) + this.meleeSpeed += 0.04f; + } + } + this.equippedAnyWallSpeedAcc = false; + this.equippedAnyTileSpeedAcc = false; + this.equippedAnyTileRangeAcc = false; + for (int index = 3; index < 10; ++index) + { + if (this.IsAValidEquipmentSlotForIteration(index)) + this.ApplyEquipFunctional(index, this.armor[index]); + } + if (this.skyStoneEffects) + { + this.lifeRegen += 2; + this.statDefense += 4; + this.meleeSpeed += 0.1f; + this.meleeDamage += 0.1f; + this.meleeCrit += 2; + this.rangedDamage += 0.1f; + this.rangedCrit += 2; + this.magicDamage += 0.1f; + this.magicCrit += 2; + this.pickSpeed -= 0.15f; + this.minionDamage += 0.1f; + this.minionKB += 0.5f; + } + if (this.dd2Accessory) + { + this.minionDamage += 0.1f; + ++this.maxTurrets; + } + for (int slot = 3; slot < 10; ++slot) + { + if (this.armor[slot].wingSlot > (sbyte) 0 && this.IsAValidEquipmentSlotForIteration(slot)) + { + if (!this.hideVisibleAccessory[slot] || (double) this.velocity.Y != 0.0 && !this.mount.Active) + this.wings = (int) this.armor[slot].wingSlot; + this.wingsLogic = (int) this.armor[slot].wingSlot; + } + } + for (int index = 13; index < 20; ++index) + { + if (this.IsAValidEquipmentSlotForIteration(index)) + this.ApplyEquipVanity(index, this.armor[index]); + } + if (this.wet && this.ShouldFloatInWater) + this.accFlipper = true; + if (this.whoAmI == Main.myPlayer && Main.SceneMetrics.HasClock && this.accWatch < 3) + ++this.accWatch; + if (this.equippedAnyTileSpeedAcc && this.inventory[this.selectedItem].createTile != 4) + this.tileSpeed += 0.5f; + if (this.equippedAnyWallSpeedAcc) + this.wallSpeed += 0.5f; + if (this.equippedAnyTileRangeAcc && this.whoAmI == Main.myPlayer) + { + Player.tileRangeX += 3; + Player.tileRangeY += 2; + } + if (!this.accThirdEye) + this.accThirdEyeCounter = (byte) 0; + if (Main.netMode == 1 && this.whoAmI == Main.myPlayer) + { + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (index != this.whoAmI && Main.player[index].active && !Main.player[index].dead && Main.player[index].team == this.team && Main.player[index].team != 0) + { + int num = 800; + if ((double) (Main.player[index].Center - this.Center).Length() < (double) num) + { + if (Main.player[index].accWatch > this.accWatch) + this.accWatch = Main.player[index].accWatch; + if (Main.player[index].accCompass > this.accCompass) + this.accCompass = Main.player[index].accCompass; + if (Main.player[index].accDepthMeter > this.accDepthMeter) + this.accDepthMeter = Main.player[index].accDepthMeter; + if (Main.player[index].accFishFinder) + this.accFishFinder = true; + if (Main.player[index].accWeatherRadio) + this.accWeatherRadio = true; + if (Main.player[index].accThirdEye) + this.accThirdEye = true; + if (Main.player[index].accJarOfSouls) + this.accJarOfSouls = true; + if (Main.player[index].accCalendar) + this.accCalendar = true; + if (Main.player[index].accStopwatch) + this.accStopwatch = true; + if (Main.player[index].accOreFinder) + this.accOreFinder = true; + if (Main.player[index].accCritterGuide) + this.accCritterGuide = true; + if (Main.player[index].accDreamCatcher) + this.accDreamCatcher = true; + } + } + } + } + if (!this.accDreamCatcher && this.dpsStarted) + { + this.dpsStarted = false; + this.dpsEnd = DateTime.Now; + } + if (this.HeldItem.type != 4760 || this.ownedProjectileCounts[866] >= 1) + return; + this.hasRaisableShield = true; + } + + private void DoBootsEffect(Utils.TileActionAttempt theEffectMethod) + { + if (this.miscCounter % 2 != 0 || (double) this.velocity.Y != 0.0 || this.grappling[0] != -1 || (double) this.velocity.X == 0.0) + return; + int x = (int) this.Center.X / 16; + int y = (int) ((double) this.position.Y + (double) this.height - 1.0) / 16; + int num = theEffectMethod(x, y) ? 1 : 0; + } + + private bool DoBootsEffect_PlaceFlamesOnTile(int X, int Y) + { + Tile tile = Main.tile[X, Y + 1]; + if (tile == null || !tile.active() || tile.liquid > (byte) 0 || !WorldGen.SolidTileAllowBottomSlope(X, Y + 1)) + return false; + ParticleOrchestrator.RequestParticleSpawn(true, ParticleOrchestraType.FlameWaders, new ParticleOrchestraSettings() + { + PositionInWorld = new Vector2((float) (X * 16 + 8), (float) (Y * 16 + 16)) + }, new int?(this.whoAmI)); + return true; + } + + private bool DoBootsEffect_PlaceFlowersOnTile(int X, int Y) + { + Tile tile = Main.tile[X, Y]; + if (tile == null || tile.active() || tile.liquid != (byte) 0 || Main.tile[X, Y + 1] == null || !WorldGen.SolidTile(X, Y + 1)) + return false; + tile.frameY = (short) 0; + tile.slope((byte) 0); + tile.halfBrick(false); + if (Main.tile[X, Y + 1].type == (ushort) 2 || Main.tile[X, Y + 1].type == (ushort) 477) + { + int num = Main.rand.NextFromList(6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 27, 30, 33, 36, 39, 42); + switch (num) + { + case 21: + case 24: + case 27: + case 30: + case 33: + case 36: + case 39: + case 42: + num += Main.rand.Next(3); + break; + } + tile.active(true); + tile.type = (ushort) 3; + tile.frameX = (short) (num * 18); + tile.color(Main.tile[X, Y + 1].color()); + if (Main.netMode == 1) + NetMessage.SendTileSquare(-1, X, Y, 1); + return true; + } + if (Main.tile[X, Y + 1].type == (ushort) 109 || Main.tile[X, Y + 1].type == (ushort) 492) + { + if (Main.rand.Next(2) == 0) + { + tile.active(true); + tile.type = (ushort) 110; + tile.frameX = (short) (18 * Main.rand.Next(4, 7)); + tile.color(Main.tile[X, Y + 1].color()); + while (tile.frameX == (short) 90) + tile.frameX = (short) (18 * Main.rand.Next(4, 7)); + } + else + { + tile.active(true); + tile.type = (ushort) 113; + tile.frameX = (short) (18 * Main.rand.Next(2, 8)); + tile.color(Main.tile[X, Y + 1].color()); + while (tile.frameX == (short) 90) + tile.frameX = (short) (18 * Main.rand.Next(2, 8)); + } + if (Main.netMode == 1) + NetMessage.SendTileSquare(-1, X, Y, 1); + return true; + } + if (Main.tile[X, Y + 1].type != (ushort) 60) + return false; + tile.active(true); + tile.type = (ushort) 74; + tile.frameX = (short) (18 * Main.rand.Next(9, 17)); + tile.color(Main.tile[X, Y + 1].color()); + if (Main.netMode == 1) + NetMessage.SendTileSquare(-1, X, Y, 1); + return true; + } + + private void ApplyEquipVanity(int itemSlot, Item currentItem) + { + int type = currentItem.type; + if (currentItem.wingSlot > (sbyte) 0) + this.wings = (int) currentItem.wingSlot; + if (type == 861 || type == 3110 || type == 485) + { + this.hideWolf = false; + this.forceWerewolf = true; + } + if (((!this.wet || this.lavaWet ? 0 : (!this.mount.Active ? 1 : (!this.mount.IsConsideredASlimeMount ? 1 : 0))) != 0 || !this.forceWerewolf) && (type == 861 || type == 3110 || type == 497)) + { + this.hideMerman = false; + this.forceMerman = true; + } + if ((!this.mount.Active || this.mount.Type != 47) && (type == 4822 || type == 4874)) + this.DoBootsEffect(new Utils.TileActionAttempt(this.DoBootsEffect_PlaceFlamesOnTile)); + if (Main.myPlayer != this.whoAmI) + return; + this.ApplyMusicBox(currentItem); + } + + private WingStats GetWingStats(int wingID) => wingID <= 0 || wingID >= ArmorIDs.Wing.Sets.Stats.Length ? new WingStats() : ArmorIDs.Wing.Sets.Stats[wingID]; + + private void ApplyEquipFunctional(int itemSlot, Item currentItem) + { + if (currentItem.expertOnly && !Main.expertMode) + return; + if (currentItem.type == 3810 || currentItem.type == 3809 || currentItem.type == 3812 || currentItem.type == 3811) + this.dd2Accessory = true; + switch (currentItem.type) + { + case 3990: + this.accRunSpeed = 6f; + this.sailDash = true; + this.autoJump = true; + this.jumpSpeedBoost += 2.4f; + this.extraFall += 15; + break; + case 3991: + this.manaFlower = true; + this.manaCost -= 0.08f; + this.aggro -= 400; + break; + case 3992: + this.kbGlove = true; + this.meleeSpeed += 0.12f; + this.aggro += 400; + break; + case 3993: + this.accRunSpeed = 6f; + this.rocketBoots = 2; + break; + case 3994: + this.autoJump = true; + this.frogLegJumpBoost = true; + this.accFlipper = true; + break; + case 3995: + this.autoJump = true; + this.frogLegJumpBoost = true; + this.accFlipper = true; + this.spikedBoots += 2; + break; + case 3996: + this.autoJump = true; + this.frogLegJumpBoost = true; + this.spikedBoots += 2; + break; + case 3999: + this.fireWalk = true; + this.magmaStone = true; + break; + case 4000: + this.manaFlower = true; + this.manaCost -= 0.08f; + this.manaMagnet = true; + break; + case 4001: + this.manaFlower = true; + this.manaCost -= 0.08f; + this.starCloak = true; + this.starCloakIsManaCloak = true; + break; + case 4002: + this.magicQuiver = true; + this.arrowDamage += 0.1f; + this.hasMoltenQuiver = true; + break; + case 4003: + this.fireWalk = true; + this.lavaRose = true; + this.magmaStone = true; + break; + case 4004: + this.fireWalk = true; + this.lavaRose = true; + break; + case 4005: + this.rangedCrit += 10; + this.rangedDamage += 0.1f; + this.aggro -= 400; + break; + case 4006: + this.aggro -= 400; + this.magicQuiver = true; + this.arrowDamage += 0.1f; + break; + case 4007: + this.releaseBeesWhenHurt = true; + this.armorPenetration += 5; + break; + case 4038: + this.fireWalk = true; + break; + case 4055: + this.accRunSpeed = 6f; + this.desertDash = true; + break; + case 4056: + this.pickSpeed -= 0.25f; + break; + case 4341: + this.portableStoolInfo.SetStats(26, 26, 26); + break; + case 4409: + this.CanSeeInvisibleBlocks = true; + break; + case 5010: + this.treasureMagnet = true; + break; + } + if (currentItem.type == 3015) + { + this.aggro -= 400; + this.meleeCrit += 5; + this.magicCrit += 5; + this.rangedCrit += 5; + this.meleeDamage += 0.05f; + this.magicDamage += 0.05f; + this.rangedDamage += 0.05f; + this.minionDamage += 0.05f; + } + if (currentItem.type == 3016) + this.aggro += 400; + if (currentItem.type == 2373) + this.accFishingLine = true; + if (currentItem.type == 2374) + this.fishingSkill += 10; + if (currentItem.type == 2375) + this.accTackleBox = true; + if (currentItem.type == 4881) + this.accLavaFishing = true; + if (currentItem.type == 3721) + { + this.accFishingLine = true; + this.accTackleBox = true; + this.fishingSkill += 10; + } + if (currentItem.type == 3090) + { + this.npcTypeNoAggro[1] = true; + this.npcTypeNoAggro[16] = true; + this.npcTypeNoAggro[59] = true; + this.npcTypeNoAggro[71] = true; + this.npcTypeNoAggro[81] = true; + this.npcTypeNoAggro[138] = true; + this.npcTypeNoAggro[121] = true; + this.npcTypeNoAggro[122] = true; + this.npcTypeNoAggro[141] = true; + this.npcTypeNoAggro[147] = true; + this.npcTypeNoAggro[183] = true; + this.npcTypeNoAggro[184] = true; + this.npcTypeNoAggro[204] = true; + this.npcTypeNoAggro[225] = true; + this.npcTypeNoAggro[244] = true; + this.npcTypeNoAggro[302] = true; + this.npcTypeNoAggro[333] = true; + this.npcTypeNoAggro[335] = true; + this.npcTypeNoAggro[334] = true; + this.npcTypeNoAggro[336] = true; + this.npcTypeNoAggro[537] = true; + } + if (currentItem.stringColor > 0) + this.yoyoString = true; + if (currentItem.type == 3366) + { + this.counterWeight = 556 + Main.rand.Next(6); + this.yoyoGlove = true; + this.yoyoString = true; + } + if (currentItem.type >= 3309 && currentItem.type <= 3314) + this.counterWeight = 556 + currentItem.type - 3309; + if (currentItem.type == 3334) + this.yoyoGlove = true; + if (currentItem.type == 3337) + this.shinyStone = true; + if (currentItem.type == 4989) + { + this.empressBrooch = true; + this.moveSpeed += 0.1f; + } + if (currentItem.type == 3336) + { + this.SporeSac(); + this.sporeSac = true; + } + if (currentItem.type == 4987) + { + this.VolatileGelatin(); + this.volatileGelatin = true; + } + if (currentItem.type == 2423) + { + this.autoJump = true; + this.frogLegJumpBoost = true; + } + if (currentItem.type == 857) + this.hasJumpOption_Sandstorm = true; + if (currentItem.type == 983) + { + this.hasJumpOption_Sandstorm = true; + this.jumpBoost = true; + } + if (currentItem.type == 987) + this.hasJumpOption_Blizzard = true; + if (currentItem.type == 1163) + { + this.hasJumpOption_Blizzard = true; + this.jumpBoost = true; + } + if (currentItem.type == 1724) + this.hasJumpOption_Fart = true; + if (currentItem.type == 1863) + { + this.hasJumpOption_Fart = true; + this.jumpBoost = true; + } + if (currentItem.type == 1164) + { + this.hasJumpOption_Cloud = true; + this.hasJumpOption_Sandstorm = true; + this.hasJumpOption_Blizzard = true; + this.jumpBoost = true; + } + if (currentItem.type == 1250) + { + this.jumpBoost = true; + this.hasJumpOption_Cloud = true; + this.noFallDmg = true; + } + if (currentItem.type == 1252) + { + this.hasJumpOption_Sandstorm = true; + this.jumpBoost = true; + this.noFallDmg = true; + } + if (currentItem.type == 1251) + { + this.hasJumpOption_Blizzard = true; + this.jumpBoost = true; + this.noFallDmg = true; + } + if (currentItem.type == 3250) + { + this.hasJumpOption_Fart = true; + this.jumpBoost = true; + this.noFallDmg = true; + } + if (currentItem.type == 3252) + { + this.hasJumpOption_Sail = true; + this.jumpBoost = true; + this.noFallDmg = true; + } + if (currentItem.type == 3251) + { + this.jumpBoost = true; + this.releaseBeesWhenHurt = true; + this.noFallDmg = true; + } + if (currentItem.type == 1249) + { + this.jumpBoost = true; + this.releaseBeesWhenHurt = true; + } + if (currentItem.type == 3241) + { + this.jumpBoost = true; + this.hasJumpOption_Sail = true; + } + if ((currentItem.type == 1253 || currentItem.type == 3997) && (double) this.statLife <= (double) this.statLifeMax2 * 0.5) + this.AddBuff(62, 5); + if (currentItem.type == 1290) + this.panic = true; + if ((currentItem.type == 1300 || currentItem.type == 1858 || currentItem.type == 4005) && (this.inventory[this.selectedItem].useAmmo == AmmoID.Bullet || this.inventory[this.selectedItem].useAmmo == AmmoID.CandyCorn || this.inventory[this.selectedItem].useAmmo == AmmoID.Stake || this.inventory[this.selectedItem].useAmmo == 23)) + this.scope = true; + if (currentItem.type == 1858) + { + this.rangedCrit += 10; + this.rangedDamage += 0.1f; + } + if (currentItem.type == 1303 && this.wet) + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.9f, 0.2f, 0.6f); + if (currentItem.type == 1301) + { + this.meleeCrit += 8; + this.rangedCrit += 8; + this.magicCrit += 8; + this.meleeDamage += 0.1f; + this.rangedDamage += 0.1f; + this.magicDamage += 0.1f; + this.minionDamage += 0.1f; + } + if (currentItem.type == 982) + { + this.statManaMax2 += 20; + ++this.manaRegenDelayBonus; + this.manaRegenBonus += 25; + } + if (currentItem.type == 1595) + { + this.statManaMax2 += 20; + this.magicCuffs = true; + } + if (currentItem.type == 2219) + this.manaMagnet = true; + if (currentItem.type == 2220) + { + this.manaMagnet = true; + this.magicDamage += 0.15f; + } + if (currentItem.type == 2221) + { + this.manaMagnet = true; + this.magicCuffs = true; + } + if (this.whoAmI == Main.myPlayer && currentItem.type == 1923) + { + ++Player.tileRangeX; + ++Player.tileRangeY; + } + if (currentItem.type == 1247) + { + this.starCloak = true; + this.releaseBeesWhenHurt = true; + this.starCloakIsBeeCloak = true; + } + if (currentItem.type == 1248) + { + this.meleeCrit += 10; + this.rangedCrit += 10; + this.magicCrit += 10; + } + if (currentItem.type == 854) + this.discount = true; + if (currentItem.type == 855) + this.coins = true; + if (currentItem.type == 3033) + this.goldRing = true; + if (currentItem.type == 3034) + { + this.goldRing = true; + this.coins = true; + } + if (currentItem.type == 3035) + { + this.goldRing = true; + this.coins = true; + this.discount = true; + } + if (currentItem.type == 53) + this.hasJumpOption_Cloud = true; + if (currentItem.type == 3201) + this.hasJumpOption_Sail = true; + if (currentItem.type == 54) + this.accRunSpeed = 6f; + if (currentItem.type == 3068) + this.cordage = true; + if (currentItem.type == 1579) + { + this.accRunSpeed = 6f; + this.coldDash = true; + } + if (currentItem.type == 3200) + { + this.accRunSpeed = 6f; + this.sailDash = true; + } + if (currentItem.type == 128) + this.rocketBoots = 1; + if (currentItem.type == 156) + this.noKnockback = true; + if (currentItem.type == 158) + this.noFallDmg = true; + if (currentItem.type == 934) + this.carpet = true; + if (currentItem.type == 953) + ++this.spikedBoots; + if (currentItem.type == 975) + ++this.spikedBoots; + if (currentItem.type == 976) + this.spikedBoots += 2; + if (currentItem.type == 977) + this.dashType = 1; + if (currentItem.type == 3097) + this.dashType = 2; + if (currentItem.type == 963) + this.blackBelt = true; + if (currentItem.type == 984) + { + this.blackBelt = true; + this.dashType = 1; + this.spikedBoots = 2; + } + if (currentItem.type == 1131) + this.gravControl2 = true; + if (currentItem.type == 1132) + this.releaseBeesWhenHurt = true; + if (currentItem.type == 1578) + { + this.releaseBeesWhenHurt = true; + this.panic = true; + } + if (currentItem.type == 3224) + this.endurance += 0.17f; + if (currentItem.type == 3223) + this.brainOfConfusion = true; + if (currentItem.type == 950) + this.iceSkate = true; + if (currentItem.type == 159) + this.jumpBoost = true; + if (currentItem.type == 3225) + this.jumpBoost = true; + if (currentItem.type == 187) + this.accFlipper = true; + if (currentItem.type == 211) + this.meleeSpeed += 0.12f; + if (currentItem.type == 223) + this.manaCost -= 0.06f; + if (currentItem.type == 285) + this.moveSpeed += 0.05f; + if (currentItem.type == 212) + this.moveSpeed += 0.1f; + if (currentItem.type == 267) + this.killGuide = true; + if (currentItem.type == 1307) + this.killClothier = true; + if (currentItem.type == 193) + this.fireWalk = true; + if (currentItem.type == 861) + { + this.accMerman = true; + this.wolfAcc = true; + if (this.hideVisibleAccessory[itemSlot]) + { + this.hideMerman = true; + this.hideWolf = true; + } + } + if (currentItem.type == 862) + { + this.starCloak = true; + this.longInvince = true; + this.starCloakIsStarVeil = true; + } + if (currentItem.type == 860) + this.pStone = true; + if (currentItem.type == 863) + this.waterWalk2 = true; + if (currentItem.type == 907) + { + this.waterWalk2 = true; + this.fireWalk = true; + } + if (currentItem.type == 908 || currentItem.type == 4874 || currentItem.type == 5000) + { + this.waterWalk = true; + this.fireWalk = true; + this.lavaMax += 420; + } + if ((!this.mount.Active || this.mount.Type != 47) && !this.hideVisibleAccessory[itemSlot] && (currentItem.type == 4822 || currentItem.type == 4874)) + this.DoBootsEffect(new Utils.TileActionAttempt(this.DoBootsEffect_PlaceFlamesOnTile)); + if (currentItem.type == 906 || currentItem.type == 4038) + this.lavaMax += 420; + if (currentItem.type == 485) + { + this.wolfAcc = true; + if (this.hideVisibleAccessory[itemSlot]) + this.hideWolf = true; + } + if (currentItem.type == 486) + this.rulerLine = true; + if (currentItem.type == 2799) + this.rulerGrid = true; + if (currentItem.type == 394) + { + this.accFlipper = true; + this.accDivingHelm = true; + } + if (currentItem.type == 396) + { + this.noFallDmg = true; + this.fireWalk = true; + } + if (currentItem.type == 397) + { + this.noKnockback = true; + this.fireWalk = true; + } + if (currentItem.type == 399) + { + this.jumpBoost = true; + this.hasJumpOption_Cloud = true; + } + if (currentItem.type == 405) + { + this.accRunSpeed = 6f; + this.rocketBoots = 2; + } + if (currentItem.type == 1860) + { + this.accFlipper = true; + this.accDivingHelm = true; + if (this.wet) + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.9f, 0.2f, 0.6f); + } + if (currentItem.type == 1861) + { + this.arcticDivingGear = true; + this.accFlipper = true; + this.accDivingHelm = true; + this.iceSkate = true; + if (this.wet) + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.2f, 0.8f, 0.9f); + } + if (currentItem.type == 2214) + this.equippedAnyTileSpeedAcc = true; + if (currentItem.type == 2215) + this.equippedAnyTileRangeAcc = true; + if (currentItem.type == 2216) + this.autoPaint = true; + if (currentItem.type == 2217) + this.equippedAnyWallSpeedAcc = true; + if (currentItem.type == 3061) + { + this.equippedAnyWallSpeedAcc = true; + this.equippedAnyTileSpeedAcc = true; + this.autoPaint = true; + this.equippedAnyTileRangeAcc = true; + } + if (currentItem.type == 3624) + this.autoActuator = true; + if (currentItem.type == 897) + { + this.kbGlove = true; + this.meleeSpeed += 0.12f; + } + if (currentItem.type == 1343) + { + this.kbGlove = true; + this.meleeSpeed += 0.1f; + this.meleeDamage += 0.1f; + this.magmaStone = true; + } + if (currentItem.type == 1167) + { + this.minionKB += 2f; + this.minionDamage += 0.15f; + } + if (currentItem.type == 1864) + { + this.minionKB += 2f; + this.minionDamage += 0.15f; + ++this.maxMinions; + } + if (currentItem.type == 1845) + { + this.minionDamage += 0.1f; + ++this.maxMinions; + } + if (currentItem.type == 1321) + { + this.magicQuiver = true; + this.arrowDamage += 0.1f; + } + if (currentItem.type == 1322) + this.magmaStone = true; + if (currentItem.type == 1323) + this.lavaRose = true; + if (currentItem.type == 3333) + this.strongBees = true; + if (currentItem.type == 938 || currentItem.type == 3997 || currentItem.type == 3998) + { + this.noKnockback = true; + if ((double) this.statLife > (double) this.statLifeMax2 * 0.25) + { + this.hasPaladinShield = true; + if (this.whoAmI != Main.myPlayer && this.miscCounter % 10 == 0) + { + int player = Main.myPlayer; + if (Main.player[player].team == this.team && this.team != 0) + { + double num1 = (double) this.position.X - (double) Main.player[player].position.X; + float num2 = this.position.Y - Main.player[player].position.Y; + if (Math.Sqrt(num1 * num1 + (double) num2 * (double) num2) < 800.0) + Main.player[player].AddBuff(43, 20); + } + } + } + } + if (currentItem.type == 936) + { + this.kbGlove = true; + this.meleeSpeed += 0.12f; + this.meleeDamage += 0.12f; + } + if (currentItem.type == 898) + { + this.accRunSpeed = 6.75f; + this.rocketBoots = 2; + this.moveSpeed += 0.08f; + } + if (currentItem.type == 1862) + { + this.accRunSpeed = 6.75f; + this.rocketBoots = 3; + this.moveSpeed += 0.08f; + this.iceSkate = true; + } + if (currentItem.type == 5000) + { + this.accRunSpeed = 6.75f; + this.rocketBoots = 4; + this.moveSpeed += 0.08f; + this.iceSkate = true; + } + if (currentItem.type == 3110) + { + this.accMerman = true; + this.wolfAcc = true; + if (this.hideVisibleAccessory[itemSlot]) + { + this.hideMerman = true; + this.hideWolf = true; + } + } + if (currentItem.type == 1865 || currentItem.type == 3110) + this.skyStoneEffects = true; + if (currentItem.type == 899 && Main.dayTime) + this.skyStoneEffects = true; + if (currentItem.type == 900 && (!Main.dayTime || Main.eclipse)) + this.skyStoneEffects = true; + if (currentItem.type == 407) + ++this.blockRange; + if (currentItem.type == 489) + this.magicDamage += 0.15f; + if (currentItem.type == 490) + this.meleeDamage += 0.15f; + if (currentItem.type == 491) + this.rangedDamage += 0.15f; + if (currentItem.type == 2998) + this.minionDamage += 0.15f; + if (currentItem.type == 935) + { + this.magicDamage += 0.12f; + this.meleeDamage += 0.12f; + this.rangedDamage += 0.12f; + this.minionDamage += 0.12f; + } + if (currentItem.wingSlot != (sbyte) -1) + this.wingTimeMax = this.GetWingStats((int) currentItem.wingSlot).FlyTime; + if (currentItem.wingSlot == (sbyte) 26) + this.ignoreWater = true; + if (currentItem.type == 885) + this.buffImmune[30] = true; + if (currentItem.type == 886) + this.buffImmune[36] = true; + if (currentItem.type == 887) + this.buffImmune[20] = true; + if (currentItem.type == 888) + this.buffImmune[22] = true; + if (currentItem.type == 889) + this.buffImmune[32] = true; + if (currentItem.type == 890) + this.buffImmune[35] = true; + if (currentItem.type == 891) + this.buffImmune[23] = true; + if (currentItem.type == 892) + this.buffImmune[33] = true; + if (currentItem.type == 893) + this.buffImmune[31] = true; + if (currentItem.type == 3781) + this.buffImmune[156] = true; + if (currentItem.type == 901) + { + this.buffImmune[33] = true; + this.buffImmune[36] = true; + } + if (currentItem.type == 902) + { + this.buffImmune[30] = true; + this.buffImmune[20] = true; + } + if (currentItem.type == 903) + { + this.buffImmune[32] = true; + this.buffImmune[31] = true; + } + if (currentItem.type == 904) + { + this.buffImmune[35] = true; + this.buffImmune[23] = true; + } + if (currentItem.type == 1921) + { + this.buffImmune[46] = true; + this.buffImmune[47] = true; + } + if (currentItem.type == 1612) + { + this.buffImmune[33] = true; + this.buffImmune[36] = true; + this.buffImmune[30] = true; + this.buffImmune[20] = true; + this.buffImmune[32] = true; + this.buffImmune[31] = true; + this.buffImmune[35] = true; + this.buffImmune[23] = true; + this.buffImmune[22] = true; + } + if (currentItem.type == 1613) + { + this.buffImmune[46] = true; + this.noKnockback = true; + this.fireWalk = true; + this.buffImmune[33] = true; + this.buffImmune[36] = true; + this.buffImmune[30] = true; + this.buffImmune[20] = true; + this.buffImmune[32] = true; + this.buffImmune[31] = true; + this.buffImmune[35] = true; + this.buffImmune[23] = true; + this.buffImmune[22] = true; + } + if (currentItem.type == 497) + { + this.accMerman = true; + if (this.hideVisibleAccessory[itemSlot]) + this.hideMerman = true; + } + if (currentItem.type == 535) + this.pStone = true; + if (currentItem.type == 536) + this.kbGlove = true; + if (currentItem.type == 532) + this.starCloak = true; + if (currentItem.type == 554) + this.longInvince = true; + if (currentItem.type == 555) + { + this.manaFlower = true; + this.manaCost -= 0.08f; + } + if (Main.myPlayer != this.whoAmI) + return; + if (currentItem.type == 576 && Main.rand.Next(540) == 0 && Main.curMusic > 0 && Main.curMusic <= 89) + { + SoundEngine.PlaySound(SoundID.Item166, this.Center); + int num = -1; + if (Main.curMusic == 1) + num = 0; + if (Main.curMusic == 2) + num = 1; + if (Main.curMusic == 3) + num = 2; + if (Main.curMusic == 4) + num = 4; + if (Main.curMusic == 5) + num = 5; + if (Main.curMusic == 6) + num = 3; + if (Main.curMusic == 7) + num = 6; + if (Main.curMusic == 8) + num = 7; + if (Main.curMusic == 9) + num = 9; + if (Main.curMusic == 10) + num = 8; + if (Main.curMusic == 11) + num = 11; + if (Main.curMusic == 12) + num = 10; + if (Main.curMusic == 13) + num = 12; + if (Main.curMusic == 28) + currentItem.SetDefaults(1963); + else if (Main.curMusic == 29) + currentItem.SetDefaults(1610); + else if (Main.curMusic == 30) + currentItem.SetDefaults(1963); + else if (Main.curMusic == 31) + currentItem.SetDefaults(1964); + else if (Main.curMusic == 32) + currentItem.SetDefaults(1965); + else if (Main.curMusic == 33) + currentItem.SetDefaults(2742); + else if (Main.curMusic == 34) + currentItem.SetDefaults(3370); + else if (Main.curMusic == 35) + currentItem.SetDefaults(3236); + else if (Main.curMusic == 36) + currentItem.SetDefaults(3237); + else if (Main.curMusic == 37) + currentItem.SetDefaults(3235); + else if (Main.curMusic == 38) + currentItem.SetDefaults(3044); + else if (Main.curMusic == 39) + currentItem.SetDefaults(3371); + else if (Main.curMusic == 40) + currentItem.SetDefaults(3796); + else if (Main.curMusic == 41) + currentItem.SetDefaults(3869); + else if (Main.curMusic == 42) + currentItem.SetDefaults(4079); + else if (Main.curMusic == 43) + currentItem.SetDefaults(4077); + else if (Main.curMusic == 44) + currentItem.SetDefaults(4082); + else if (Main.curMusic == 46) + currentItem.SetDefaults(4080); + else if (Main.curMusic == 47) + currentItem.SetDefaults(4081); + else if (Main.curMusic == 48) + currentItem.SetDefaults(4078); + else if (Main.curMusic == 49) + currentItem.SetDefaults(4237); + else if (Main.curMusic == 51) + currentItem.SetDefaults(4356); + else if (Main.curMusic == 52) + currentItem.SetDefaults(4357); + else if (Main.curMusic == 53) + currentItem.SetDefaults(4358); + else if (Main.curMusic == 54) + currentItem.SetDefaults(4421); + else if (Main.curMusic == 55) + currentItem.SetDefaults(4606); + else if (Main.curMusic == 56) + currentItem.SetDefaults(4979); + else if (Main.curMusic == 57) + currentItem.SetDefaults(4985); + else if (Main.curMusic == 58) + currentItem.SetDefaults(4990); + else if (Main.curMusic == 59) + currentItem.SetDefaults(4991); + else if (Main.curMusic == 60) + currentItem.SetDefaults(4992); + else if (Main.curMusic == 61) + currentItem.SetDefaults(5006); + else if (Main.curMusic == 62) + currentItem.SetDefaults(5014); + else if (Main.curMusic == 63) + currentItem.SetDefaults(5015); + else if (Main.curMusic == 64) + currentItem.SetDefaults(5016); + else if (Main.curMusic == 65) + currentItem.SetDefaults(5017); + else if (Main.curMusic == 66) + currentItem.SetDefaults(5018); + else if (Main.curMusic == 67) + currentItem.SetDefaults(5019); + else if (Main.curMusic == 68) + currentItem.SetDefaults(5020); + else if (Main.curMusic == 69) + currentItem.SetDefaults(5021); + else if (Main.curMusic == 70) + currentItem.SetDefaults(5022); + else if (Main.curMusic == 71) + currentItem.SetDefaults(5023); + else if (Main.curMusic == 72) + currentItem.SetDefaults(5024); + else if (Main.curMusic == 73) + currentItem.SetDefaults(5025); + else if (Main.curMusic == 74) + currentItem.SetDefaults(5026); + else if (Main.curMusic == 75) + currentItem.SetDefaults(5027); + else if (Main.curMusic == 76) + currentItem.SetDefaults(5028); + else if (Main.curMusic == 77) + currentItem.SetDefaults(5029); + else if (Main.curMusic == 78) + currentItem.SetDefaults(5030); + else if (Main.curMusic == 79) + currentItem.SetDefaults(5031); + else if (Main.curMusic == 80) + currentItem.SetDefaults(5032); + else if (Main.curMusic == 81) + currentItem.SetDefaults(5033); + else if (Main.curMusic == 82) + currentItem.SetDefaults(5034); + else if (Main.curMusic == 83) + currentItem.SetDefaults(5035); + else if (Main.curMusic == 84) + currentItem.SetDefaults(5036); + else if (Main.curMusic == 85) + currentItem.SetDefaults(5037); + else if (Main.curMusic == 86) + currentItem.SetDefaults(5038); + else if (Main.curMusic == 87) + currentItem.SetDefaults(5039); + else if (Main.curMusic == 88) + currentItem.SetDefaults(5040); + else if (Main.curMusic == 89) + currentItem.SetDefaults(5044); + else if (Main.curMusic > 13) + currentItem.SetDefaults(1596 + Main.curMusic - 14); + else if (num != -1) + currentItem.SetDefaults(num + 562); + } + this.ApplyMusicBox(currentItem); + } + + private void ApplyMusicBox(Item currentItem) + { + if (currentItem.type >= 562 && currentItem.type <= 574) + Main.musicBox2 = currentItem.type - 562; + if (currentItem.type >= 1596 && currentItem.type <= 1609) + Main.musicBox2 = currentItem.type - 1596 + 13; + if (currentItem.type == 1610) + Main.musicBox2 = 27; + if (currentItem.type == 1963) + Main.musicBox2 = 28; + if (currentItem.type == 1964) + Main.musicBox2 = 29; + if (currentItem.type == 1965) + Main.musicBox2 = 30; + if (currentItem.type == 2742) + Main.musicBox2 = 31; + if (currentItem.type == 3044) + Main.musicBox2 = 32; + if (currentItem.type == 3235) + Main.musicBox2 = 33; + if (currentItem.type == 3236) + Main.musicBox2 = 34; + if (currentItem.type == 3237) + Main.musicBox2 = 35; + if (currentItem.type == 3370) + Main.musicBox2 = 36; + if (currentItem.type == 3371) + Main.musicBox2 = 37; + if (currentItem.type == 3796) + Main.musicBox2 = 38; + if (currentItem.type == 3869) + Main.musicBox2 = 39; + if (currentItem.type == 4082) + Main.musicBox2 = 40; + if (currentItem.type == 4078) + Main.musicBox2 = 41; + if (currentItem.type == 4079) + Main.musicBox2 = 42; + if (currentItem.type == 4077) + Main.musicBox2 = 43; + if (currentItem.type == 4080) + Main.musicBox2 = 44; + if (currentItem.type == 4081) + Main.musicBox2 = 45; + if (currentItem.type == 4237) + Main.musicBox2 = 46; + if (currentItem.type == 4356) + Main.musicBox2 = 47; + if (currentItem.type == 4357) + Main.musicBox2 = 48; + if (currentItem.type == 4358) + Main.musicBox2 = 49; + if (currentItem.type == 4421) + Main.musicBox2 = 50; + if (currentItem.type == 4606) + Main.musicBox2 = 51; + if (currentItem.type == 4979) + Main.musicBox2 = 52; + if (currentItem.type == 4985) + Main.musicBox2 = 53; + if (currentItem.type == 4990) + Main.musicBox2 = 54; + if (currentItem.type == 4991) + Main.musicBox2 = 55; + if (currentItem.type == 4992) + Main.musicBox2 = 56; + if (currentItem.type == 5006) + Main.musicBox2 = 57; + if (currentItem.type == 5014) + Main.musicBox2 = 58; + if (currentItem.type == 5015) + Main.musicBox2 = 59; + if (currentItem.type == 5016) + Main.musicBox2 = 60; + if (currentItem.type == 5017) + Main.musicBox2 = 61; + if (currentItem.type == 5018) + Main.musicBox2 = 62; + if (currentItem.type == 5019) + Main.musicBox2 = 63; + if (currentItem.type == 5020) + Main.musicBox2 = 64; + if (currentItem.type == 5021) + Main.musicBox2 = 65; + if (currentItem.type == 5022) + Main.musicBox2 = 66; + if (currentItem.type == 5023) + Main.musicBox2 = 67; + if (currentItem.type == 5024) + Main.musicBox2 = 68; + if (currentItem.type == 5025) + Main.musicBox2 = 69; + if (currentItem.type == 5026) + Main.musicBox2 = 70; + if (currentItem.type == 5027) + Main.musicBox2 = 71; + if (currentItem.type == 5028) + Main.musicBox2 = 72; + if (currentItem.type == 5029) + Main.musicBox2 = 73; + if (currentItem.type == 5030) + Main.musicBox2 = 74; + if (currentItem.type == 5031) + Main.musicBox2 = 75; + if (currentItem.type == 5032) + Main.musicBox2 = 76; + if (currentItem.type == 5033) + Main.musicBox2 = 77; + if (currentItem.type == 5034) + Main.musicBox2 = 78; + if (currentItem.type == 5035) + Main.musicBox2 = 79; + if (currentItem.type == 5036) + Main.musicBox2 = 80; + if (currentItem.type == 5037) + Main.musicBox2 = 81; + if (currentItem.type == 5038) + Main.musicBox2 = 82; + if (currentItem.type == 5039) + Main.musicBox2 = 83; + if (currentItem.type == 5040) + Main.musicBox2 = 84; + if (currentItem.type != 5044) + return; + Main.musicBox2 = 85; + } + + public void UpdateArmorSets(int i) + { + this.setBonus = ""; + if (this.body == 67 && this.legs == 56 && this.head >= 103 && this.head <= 105) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Shroomite"); + this.shroomiteStealth = true; + } + if (this.head == 52 && this.body == 32 && this.legs == 31 || this.head == 53 && this.body == 33 && this.legs == 32 || this.head == 54 && this.body == 34 && this.legs == 33 || this.head == 55 && this.body == 35 && this.legs == 34 || this.head == 70 && this.body == 46 && this.legs == 42 || this.head == 71 && this.body == 47 && this.legs == 43 || this.head == 166 && this.body == 173 && this.legs == 108 || this.head == 167 && this.body == 174 && this.legs == 109) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Wood"); + ++this.statDefense; + } + if (this.head == 1 && this.body == 1 && this.legs == 1 || (this.head == 72 || this.head == 2) && this.body == 2 && this.legs == 2 || this.head == 47 && this.body == 28 && this.legs == 27) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.MetalTier1"); + this.statDefense += 2; + } + if (this.head == 3 && this.body == 3 && this.legs == 3 || (this.head == 73 || this.head == 4) && this.body == 4 && this.legs == 4 || this.head == 48 && this.body == 29 && this.legs == 28 || this.head == 49 && this.body == 30 && this.legs == 29) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.MetalTier2"); + this.statDefense += 3; + } + if (this.head == 50 && this.body == 31 && this.legs == 30) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Platinum"); + this.statDefense += 4; + } + if (this.head == 112 && this.body == 75 && this.legs == 64) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Pumpkin"); + this.meleeDamage += 0.1f; + this.magicDamage += 0.1f; + this.rangedDamage += 0.1f; + this.minionDamage += 0.1f; + } + if (this.head == 22 && this.body == 14 && this.legs == 14) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Ninja"); + this.moveSpeed += 0.2f; + } + if (this.head == 188 && this.body == 189 && this.legs == 129) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Fossil"); + this.ammoCost80 = true; + } + if ((this.head == 75 || this.head == 7) && this.body == 7 && this.legs == 7) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Bone"); + this.rangedCrit += 15; + } + if (this.head == 157 && this.body == 105 && this.legs == 98) + { + int num1 = 0; + this.setBonus = Language.GetTextValue("ArmorSetBonus.BeetleDamage"); + this.beetleOffense = true; + this.beetleCounter -= 3f; + this.beetleCounter -= (float) (this.beetleCountdown / 10); + ++this.beetleCountdown; + if ((double) this.beetleCounter < 0.0) + this.beetleCounter = 0.0f; + int num2 = 400; + int num3 = 1200; + int num4 = 4600; + if ((double) this.beetleCounter > (double) (num2 + num3 + num4 + num3)) + this.beetleCounter = (float) (num2 + num3 + num4 + num3); + if ((double) this.beetleCounter > (double) (num2 + num3 + num4)) + { + this.AddBuff(100, 5, false); + num1 = 3; + } + else if ((double) this.beetleCounter > (double) (num2 + num3)) + { + this.AddBuff(99, 5, false); + num1 = 2; + } + else if ((double) this.beetleCounter > (double) num2) + { + this.AddBuff(98, 5, false); + num1 = 1; + } + if (num1 < this.beetleOrbs) + this.beetleCountdown = 0; + else if (num1 > this.beetleOrbs) + this.beetleCounter += 200f; + if (num1 != this.beetleOrbs && this.beetleOrbs > 0) + { + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] >= 98 && this.buffType[b] <= 100 && this.buffType[b] != 97 + num1) + this.DelBuff(b); + } + } + } + else if (this.head == 157 && this.body == 106 && this.legs == 98) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.BeetleDefense"); + this.beetleDefense = true; + ++this.beetleCounter; + int num = 180; + if ((double) this.beetleCounter >= (double) num) + { + if (this.beetleOrbs > 0 && this.beetleOrbs < 3) + { + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] >= 95 && this.buffType[b] <= 96) + this.DelBuff(b); + } + } + if (this.beetleOrbs < 3) + { + this.AddBuff(95 + this.beetleOrbs, 5, false); + this.beetleCounter = 0.0f; + } + else + this.beetleCounter = (float) num; + } + } + if (!this.beetleDefense && !this.beetleOffense) + { + this.beetleCounter = 0.0f; + } + else + { + ++this.beetleFrameCounter; + if (this.beetleFrameCounter >= 1) + { + this.beetleFrameCounter = 0; + ++this.beetleFrame; + if (this.beetleFrame > 2) + this.beetleFrame = 0; + } + for (int beetleOrbs = this.beetleOrbs; beetleOrbs < 3; ++beetleOrbs) + { + this.beetlePos[beetleOrbs].X = 0.0f; + this.beetlePos[beetleOrbs].Y = 0.0f; + } + for (int index = 0; index < this.beetleOrbs; ++index) + { + this.beetlePos[index] += this.beetleVel[index]; + this.beetleVel[index].X += (float) Main.rand.Next(-100, 101) * 0.005f; + this.beetleVel[index].Y += (float) Main.rand.Next(-100, 101) * 0.005f; + float x1 = this.beetlePos[index].X; + float y1 = this.beetlePos[index].Y; + float num5 = (float) Math.Sqrt((double) x1 * (double) x1 + (double) y1 * (double) y1); + if ((double) num5 > 100.0) + { + float num6 = 20f / num5; + float num7 = x1 * -num6; + float num8 = y1 * -num6; + int num9 = 10; + this.beetleVel[index].X = (this.beetleVel[index].X * (float) (num9 - 1) + num7) / (float) num9; + this.beetleVel[index].Y = (this.beetleVel[index].Y * (float) (num9 - 1) + num8) / (float) num9; + } + else if ((double) num5 > 30.0) + { + float num10 = 10f / num5; + float num11 = x1 * -num10; + float num12 = y1 * -num10; + int num13 = 20; + this.beetleVel[index].X = (this.beetleVel[index].X * (float) (num13 - 1) + num11) / (float) num13; + this.beetleVel[index].Y = (this.beetleVel[index].Y * (float) (num13 - 1) + num12) / (float) num13; + } + float x2 = this.beetleVel[index].X; + float y2 = this.beetleVel[index].Y; + if (Math.Sqrt((double) x2 * (double) x2 + (double) y2 * (double) y2) > 2.0) + this.beetleVel[index] *= 0.9f; + this.beetlePos[index] -= this.velocity * 0.25f; + } + } + if (this.head == 14 && (this.body >= 58 && this.body <= 63 || this.body == 167 || this.body == 213)) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Wizard"); + this.magicCrit += 10; + } + if (this.head == 159 && (this.body >= 58 && this.body <= 63 || this.body == 167 || this.body == 213)) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.MagicHat"); + this.statManaMax2 += 60; + } + if ((this.head == 5 || this.head == 74) && (this.body == 5 || this.body == 48) && (this.legs == 5 || this.legs == 44)) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.ShadowScale"); + this.moveSpeed += 0.15f; + } + if (this.head == 57 && this.body == 37 && this.legs == 35) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Crimson"); + this.crimsonRegen = true; + } + if (this.head == 101 && this.body == 66 && this.legs == 55) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.SpectreHealing"); + this.ghostHeal = true; + } + if (this.head == 156 && this.body == 66 && this.legs == 55) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.SpectreDamage"); + this.ghostHurt = true; + } + if (this.head == 6 && this.body == 6 && this.legs == 6) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Meteor"); + this.spaceGun = true; + } + if (this.head == 46 && this.body == 27 && this.legs == 26) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Frost"); + this.frostBurn = true; + } + if ((this.head == 76 || this.head == 8) && (this.body == 49 || this.body == 8) && (this.legs == 45 || this.legs == 8)) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Jungle"); + this.manaCost -= 0.16f; + } + if (this.head == 9 && this.body == 9 && this.legs == 9) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Molten"); + this.meleeDamage += 0.17f; + } + if (this.head == 11 && this.body == 20 && this.legs == 19) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Mining"); + this.pickSpeed -= 0.3f; + } + if (this.head == 216 && this.body == 20 && this.legs == 19) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Mining"); + this.pickSpeed -= 0.3f; + } + if (this.head == 78 && this.body == 51 && this.legs == 47) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.ChlorophyteMelee"); + this.AddBuff(60, 18000); + this.endurance += 0.05f; + } + else if ((this.head == 80 || this.head == 79) && this.body == 51 && this.legs == 47) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Chlorophyte"); + this.AddBuff(60, 18000); + } + else if (this.crystalLeaf) + { + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] == 60) + this.DelBuff(b); + } + } + if (this.head == 99 && this.body == 65 && this.legs == 54) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Turtle"); + this.endurance += 0.15f; + this.thorns = 1f; + this.turtleThorns = true; + } + if (this.body == 17 && this.legs == 16) + { + if (this.head == 29) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.CobaltCaster"); + this.manaCost -= 0.14f; + } + else if (this.head == 30) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.CobaltMelee"); + this.meleeSpeed += 0.15f; + } + else if (this.head == 31) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.CobaltRanged"); + this.ammoCost80 = true; + } + } + if (this.body == 18 && this.legs == 17) + { + if (this.head == 32) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.MythrilCaster"); + this.manaCost -= 0.17f; + } + else if (this.head == 33) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.MythrilMelee"); + this.meleeCrit += 5; + } + else if (this.head == 34) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.MythrilRanged"); + this.ammoCost80 = true; + } + } + if (this.body == 19 && this.legs == 18) + { + if (this.head == 35) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.AdamantiteCaster"); + this.manaCost -= 0.19f; + } + else if (this.head == 36) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.AdamantiteMelee"); + this.meleeSpeed += 0.18f; + this.moveSpeed += 0.18f; + } + else if (this.head == 37) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.AdamantiteRanged"); + this.ammoCost75 = true; + } + } + if (this.body == 54 && this.legs == 49 && (this.head == 83 || this.head == 84 || this.head == 85)) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Palladium"); + this.onHitRegen = true; + } + if (this.body == 55 && this.legs == 50 && (this.head == 86 || this.head == 87 || this.head == 88)) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Orichalcum"); + this.onHitPetal = true; + } + if (this.body == 56 && this.legs == 51) + { + bool flag = false; + if (this.head == 91) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Titanium"); + this.manaCost -= 0.19f; + flag = true; + } + else if (this.head == 89) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Titanium"); + this.meleeSpeed += 0.18f; + this.moveSpeed += 0.18f; + flag = true; + } + else if (this.head == 90) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Titanium"); + this.ammoCost75 = true; + flag = true; + } + if (flag) + this.onHitTitaniumStorm = true; + } + if ((this.body == 24 || this.body == 229) && (this.legs == 23 || this.legs == 212) && (this.head == 42 || this.head == 41 || this.head == 43 || this.head == 254 || this.head == 257 || this.head == 256 || this.head == (int) byte.MaxValue || this.head == 258)) + { + if (this.head == 254 || this.head == 258) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.HallowedSummoner"); + this.maxMinions += 2; + } + else + this.setBonus = Language.GetTextValue("ArmorSetBonus.Hallowed"); + this.onHitDodge = true; + } + if (this.head == 261 && this.body == 230 && this.legs == 213) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.CrystalNinja"); + this.moveSpeed += 0.15f; + this.rangedDamage += 0.1f; + this.meleeDamage += 0.1f; + this.magicDamage += 0.1f; + this.minionDamage += 0.1f; + this.rangedCrit += 10; + this.meleeCrit += 10; + this.magicCrit += 10; + } + if (this.head == 82 && this.body == 53 && this.legs == 48) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Tiki"); + ++this.maxMinions; + } + if (this.head == 134 && this.body == 95 && this.legs == 79) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Spooky"); + this.minionDamage += 0.25f; + } + if (this.head == 160 && this.body == 168 && this.legs == 103) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Bee"); + this.minionDamage += 0.1f; + if (this.itemAnimation > 0 && this.inventory[this.selectedItem].type == 1121) + AchievementsHelper.HandleSpecialEvent(this, 3); + } + if (this.head == 162 && this.body == 170 && this.legs == 105) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Spider"); + this.minionDamage += 0.12f; + } + if (this.head == 171 && this.body == 177 && this.legs == 112) + { + this.endurance += 0.12f; + this.setSolar = true; + this.setBonus = Language.GetTextValue("ArmorSetBonus.Solar"); + ++this.solarCounter; + int num = 180; + if (this.solarCounter >= num) + { + if (this.solarShields > 0 && this.solarShields < 3) + { + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] >= 170 && this.buffType[b] <= 171) + this.DelBuff(b); + } + } + if (this.solarShields < 3) + { + this.AddBuff(170 + this.solarShields, 5, false); + for (int index = 0; index < 16; ++index) + { + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 6, Alpha: 100)]; + dust.noGravity = true; + dust.scale = 1.7f; + dust.fadeIn = 0.5f; + dust.velocity *= 5f; + dust.shader = GameShaders.Armor.GetSecondaryShader(this.ArmorSetDye(), this); + } + this.solarCounter = 0; + } + else + this.solarCounter = num; + } + for (int solarShields = this.solarShields; solarShields < 3; ++solarShields) + this.solarShieldPos[solarShields] = Vector2.Zero; + for (int index = 0; index < this.solarShields; ++index) + { + this.solarShieldPos[index] += this.solarShieldVel[index]; + Vector2 vector2 = ((float) ((double) this.miscCounter / 100.0 * 6.28318548202515 + (double) index * (6.28318548202515 / (double) this.solarShields))).ToRotationVector2() * 6f; + vector2.X = (float) (this.direction * 20); + this.solarShieldVel[index] = (vector2 - this.solarShieldPos[index]) * 0.2f; + } + if (this.dashDelay >= 0) + { + this.solarDashing = false; + this.solarDashConsumedFlare = false; + } + if (this.solarShields > 0 | (this.solarDashing && this.dashDelay < 0)) + this.dashType = 3; + } + else + this.solarCounter = 0; + if (this.head == 169 && this.body == 175 && this.legs == 110) + { + this.setVortex = true; + this.setBonus = Language.GetTextValue("ArmorSetBonus.Vortex", (object) Language.GetTextValue(Main.ReversedUpDownArmorSetBonuses ? "Key.UP" : "Key.DOWN")); + } + else + this.vortexStealthActive = false; + if (this.head == 170 && this.body == 176 && this.legs == 111) + { + if (this.nebulaCD > 0) + --this.nebulaCD; + this.setNebula = true; + this.setBonus = Language.GetTextValue("ArmorSetBonus.Nebula"); + } + if (this.head == 189 && this.body == 190 && this.legs == 130) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Stardust", (object) Language.GetTextValue(Main.ReversedUpDownArmorSetBonuses ? "Key.UP" : "Key.DOWN")); + this.setStardust = true; + if (this.whoAmI == Main.myPlayer) + { + if (this.FindBuffIndex(187) == -1) + this.AddBuff(187, 3600); + if (this.ownedProjectileCounts[623] < 1) + { + int num = 10; + int Damage = 30; + int index = Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, -1f, 623, Damage, (float) num, Main.myPlayer); + Main.projectile[index].originalDamage = Damage; + } + } + } + else if (this.FindBuffIndex(187) != -1) + this.DelBuff(this.FindBuffIndex(187)); + if (this.head == 200 && this.body == 198 && this.legs == 142) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.Forbidden", (object) Language.GetTextValue(Main.ReversedUpDownArmorSetBonuses ? "Key.UP" : "Key.DOWN")); + this.setForbidden = true; + this.UpdateForbiddenSetLock(); + Lighting.AddLight(this.Center, 0.8f, 0.7f, 0.2f); + } + if (this.head == 204 && this.body == 201 && this.legs == 145) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.SquireTier2"); + this.setSquireT2 = true; + ++this.maxTurrets; + } + if (this.head == 203 && this.body == 200 && this.legs == 144) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.ApprenticeTier2"); + this.setApprenticeT2 = true; + ++this.maxTurrets; + } + if (this.head == 205 && this.body == 202 && (this.legs == 147 || this.legs == 146)) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.HuntressTier2"); + this.setHuntressT2 = true; + ++this.maxTurrets; + } + if (this.head == 206 && this.body == 203 && this.legs == 148) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.MonkTier2"); + this.setMonkT2 = true; + ++this.maxTurrets; + } + if (this.head == 210 && this.body == 204 && this.legs == 152) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.SquireTier3"); + this.setSquireT3 = true; + this.setSquireT2 = true; + ++this.maxTurrets; + } + if (this.head == 211 && this.body == 205 && this.legs == 153) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.ApprenticeTier3"); + this.setApprenticeT3 = true; + this.setApprenticeT2 = true; + ++this.maxTurrets; + } + if (this.head == 212 && this.body == 206 && (this.legs == 154 || this.legs == 155)) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.HuntressTier3"); + this.setHuntressT3 = true; + this.setHuntressT2 = true; + ++this.maxTurrets; + } + if (this.head == 213 && this.body == 207 && this.legs == 156) + { + this.setBonus = Language.GetTextValue("ArmorSetBonus.MonkTier3"); + this.setMonkT3 = true; + this.setMonkT2 = true; + ++this.maxTurrets; + } + this.ApplyArmorSoundAndDustChanges(); + } + + public void UpdateSocialShadow() + { + for (int index = 2; index > 0; --index) + this.shadowDirection[index] = this.shadowDirection[index - 1]; + this.shadowDirection[0] = this.direction; + ++this.shadowCount; + if (this.shadowCount == 1) + { + this.shadowPos[2] = this.shadowPos[1]; + this.shadowRotation[2] = this.shadowRotation[1]; + this.shadowOrigin[2] = this.shadowOrigin[1]; + } + else if (this.shadowCount == 2) + { + this.shadowPos[1] = this.shadowPos[0]; + this.shadowRotation[1] = this.shadowRotation[0]; + this.shadowOrigin[1] = this.shadowOrigin[0]; + } + else + { + if (this.shadowCount < 3) + return; + this.shadowCount = 0; + this.shadowPos[0] = this.position; + this.shadowPos[0].Y += this.gfxOffY; + this.shadowRotation[0] = this.fullRotation; + this.shadowOrigin[0] = this.fullRotationOrigin; + } + } + + public void UpdateTeleportVisuals() + { + if ((double) this.teleportTime <= 0.0) + return; + if (this.teleportStyle == 0) + { + if ((double) Main.rand.Next(100) <= 100.0 * (double) this.teleportTime * 2.0) + { + int index = Dust.NewDust(new Vector2((float) this.getRect().X, (float) this.getRect().Y), this.getRect().Width, this.getRect().Height, 159); + Main.dust[index].scale = this.teleportTime * 1.5f; + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 1.1f; + } + } + else if (this.teleportStyle == 1) + { + if ((double) Main.rand.Next(100) <= 100.0 * (double) this.teleportTime) + { + int index = Dust.NewDust(new Vector2((float) this.getRect().X, (float) this.getRect().Y), this.getRect().Width, this.getRect().Height, 164); + Main.dust[index].scale = this.teleportTime * 1.5f; + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 1.1f; + } + } + else if (this.teleportStyle == 2) + this.teleportTime = 0.005f; + else if (this.teleportStyle == 3) + this.teleportTime = 0.005f; + else if (this.teleportStyle == 4) + { + this.teleportTime -= 0.02f; + if ((double) Main.rand.Next(100) <= 100.0 * (double) this.teleportTime) + { + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 263)]; + dust.color = PortalHelper.GetPortalColor(this.lastPortalColorIndex); + dust.noLight = true; + dust.noGravity = true; + dust.scale = 1.2f; + dust.fadeIn = 0.4f; + } + } + else if (this.teleportStyle == 9) + { + Microsoft.Xna.Framework.Rectangle hitbox = this.Hitbox; + hitbox.Inflate(5, 5); + if ((double) Main.rand.Next(100) <= 100.0 * (double) this.teleportTime) + TeleportPylonsSystem.SpawnInWorldDust(this.lastTeleportPylonStyleUsed, hitbox); + } + this.teleportTime -= 0.005f; + } + + private void UpdateGraveyard(bool now = false) + { + float lerpValue = Utils.GetLerpValue((float) SceneMetrics.GraveyardTileMin, (float) SceneMetrics.GraveyardTileMax, (float) Main.SceneMetrics.GraveyardTileCount, true); + if (now) + this.graveImmediateTime = 30; + if (this.graveImmediateTime > 0) + { + --this.graveImmediateTime; + Main.GraveyardVisualIntensity = lerpValue; + } + else if ((double) Main.GraveyardVisualIntensity < (double) lerpValue) + { + Main.GraveyardVisualIntensity += 0.02f; + if ((double) Main.GraveyardVisualIntensity <= (double) lerpValue) + return; + Main.GraveyardVisualIntensity = lerpValue; + } + else + { + if ((double) Main.GraveyardVisualIntensity <= (double) lerpValue) + return; + Main.GraveyardVisualIntensity -= 0.01f; + if ((double) Main.GraveyardVisualIntensity >= (double) lerpValue) + return; + Main.GraveyardVisualIntensity = lerpValue; + } + } + + public int GetPrimaryBiome() + { + if (this.ZoneDungeon) + return 8; + if (this.ZoneCorrupt) + return 9; + if (this.ZoneCrimson) + return 10; + if (this.ZoneGlowshroom) + return 7; + if (this.ZoneHallow) + return 6; + if (this.ZoneJungle) + return 4; + if (this.ZoneSnow) + return 2; + if (this.ZoneBeach) + return 5; + if (this.ZoneDesert) + return 3; + return (double) this.position.Y > Main.worldSurface * 16.0 ? 1 : 0; + } + + public void UpdateBiomes() + { + Point tileCoordinates1 = this.Center.ToTileCoordinates(); + this.ZoneDungeon = false; + if (Main.SceneMetrics.DungeonTileCount >= 250 && (double) this.Center.Y > Main.worldSurface * 16.0) + { + int index1 = (int) this.Center.X / 16; + int index2 = (int) this.Center.Y / 16; + if (Main.tile[index1, index2] != null && Main.wallDungeon[(int) Main.tile[index1, index2].wall]) + this.ZoneDungeon = true; + } + Tile tileSafely = Framing.GetTileSafely(this.Center); + if (tileSafely != null) + this.behindBackWall = tileSafely.wall > (ushort) 0; + if (this.behindBackWall && this.ZoneDesert && (double) this.Center.Y > Main.worldSurface) + { + if (WallID.Sets.Conversion.Sandstone[(int) tileSafely.wall] || WallID.Sets.Conversion.HardenedSand[(int) tileSafely.wall]) + this.ZoneUndergroundDesert = true; + } + else + this.ZoneUndergroundDesert = false; + this.ZoneGranite = this.behindBackWall && (tileSafely.wall == (ushort) 184 || tileSafely.wall == (ushort) 180); + this.ZoneMarble = this.behindBackWall && (tileSafely.wall == (ushort) 183 || tileSafely.wall == (ushort) 178); + this.ZoneHive = this.behindBackWall && (tileSafely.wall == (ushort) 108 || tileSafely.wall == (ushort) 86); + this.ZoneGemCave = this.behindBackWall && tileSafely.wall >= (ushort) 48 && tileSafely.wall <= (ushort) 53; + this.ZoneCorrupt = Main.SceneMetrics.EnoughTilesForCorruption; + this.ZoneCrimson = Main.SceneMetrics.EnoughTilesForCrimson; + this.ZoneHallow = Main.SceneMetrics.EnoughTilesForHallow; + this.ZoneJungle = Main.SceneMetrics.EnoughTilesForJungle && (double) this.position.Y / 16.0 < (double) Main.UnderworldLayer; + this.ZoneSnow = Main.SceneMetrics.EnoughTilesForSnow; + this.ZoneDesert = Main.SceneMetrics.EnoughTilesForDesert; + this.ZoneGlowshroom = Main.SceneMetrics.EnoughTilesForGlowingMushroom; + this.ZoneMeteor = Main.SceneMetrics.EnoughTilesForMeteor; + this.ZoneWaterCandle = Main.SceneMetrics.WaterCandleCount > 0; + this.ZonePeaceCandle = Main.SceneMetrics.PeaceCandleCount > 0; + this.ZoneGraveyard = Main.SceneMetrics.EnoughTilesForGraveyard; + this.UpdateGraveyard(); + if (this.HasGardenGnomeNearby != Main.SceneMetrics.HasGardenGnome) + { + this.luckNeedsSync = true; + this.HasGardenGnomeNearby = Main.SceneMetrics.HasGardenGnome; + } + this.ZoneUnderworldHeight = tileCoordinates1.Y > Main.UnderworldLayer; + this.ZoneRockLayerHeight = tileCoordinates1.Y <= Main.UnderworldLayer && (double) tileCoordinates1.Y > Main.rockLayer; + this.ZoneDirtLayerHeight = (double) tileCoordinates1.Y <= Main.rockLayer && (double) tileCoordinates1.Y > Main.worldSurface; + this.ZoneOverworldHeight = (double) tileCoordinates1.Y <= Main.worldSurface && (double) tileCoordinates1.Y > Main.worldSurface * 0.349999994039536; + this.ZoneSkyHeight = (double) tileCoordinates1.Y <= Main.worldSurface * 0.349999994039536; + this.ZoneBeach = WorldGen.oceanDepths(tileCoordinates1.X, tileCoordinates1.Y); + this.ZoneRain = Main.raining && (double) tileCoordinates1.Y <= Main.worldSurface; + this.ZoneSandstorm = (double) tileCoordinates1.Y <= Main.worldSurface && this.ZoneDesert && !this.ZoneBeach && Sandstorm.Happening; + this.ZoneTowerSolar = this.ZoneTowerVortex = this.ZoneTowerNebula = this.ZoneTowerStardust = false; + this.ZoneOldOneArmy = false; + Vector2 vector2_1 = Vector2.Zero; + Vector2 vector2_2 = Vector2.Zero; + Vector2 vector2_3 = Vector2.Zero; + Vector2 vector2_4 = Vector2.Zero; + Vector2 zero = Vector2.Zero; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active) + { + if (Main.npc[index].type == 493) + { + if ((double) this.Distance(Main.npc[index].Center) <= 4000.0) + { + this.ZoneTowerStardust = true; + vector2_4 = Main.npc[index].Center; + } + } + else if (Main.npc[index].type == 507) + { + if ((double) this.Distance(Main.npc[index].Center) <= 4000.0) + { + this.ZoneTowerNebula = true; + vector2_3 = Main.npc[index].Center; + } + } + else if (Main.npc[index].type == 422) + { + if ((double) this.Distance(Main.npc[index].Center) <= 4000.0) + { + this.ZoneTowerVortex = true; + vector2_2 = Main.npc[index].Center; + } + } + else if (Main.npc[index].type == 517) + { + if ((double) this.Distance(Main.npc[index].Center) <= 4000.0) + { + this.ZoneTowerSolar = true; + vector2_1 = Main.npc[index].Center; + } + } + else if (Main.npc[index].type == 549 && (double) this.Distance(Main.npc[index].Center) <= 4000.0) + { + this.ZoneOldOneArmy = true; + vector2_1 = Main.npc[index].Center; + } + } + } + bool flag1 = this.ZoneRain && this.ZoneSnow; + bool flag2 = tileCoordinates1.Y > Main.maxTilesY - 320; + bool flag3 = this.ZoneOverworldHeight && (tileCoordinates1.X < 380 || tileCoordinates1.X > Main.maxTilesX - 380); + this.ManageSpecialBiomeVisuals("Stardust", this.ZoneTowerStardust, vector2_4 - new Vector2(0.0f, 10f)); + this.ManageSpecialBiomeVisuals("Nebula", this.ZoneTowerNebula, vector2_3 - new Vector2(0.0f, 10f)); + this.ManageSpecialBiomeVisuals("Vortex", this.ZoneTowerVortex, vector2_2 - new Vector2(0.0f, 10f)); + this.ManageSpecialBiomeVisuals("Solar", this.ZoneTowerSolar, vector2_1 - new Vector2(0.0f, 10f)); + this.ManageSpecialBiomeVisuals("MoonLord", NPC.AnyNPCs(398)); + this.ManageSpecialBiomeVisuals("BloodMoon", Main.bloodMoon || Main.SceneMetrics.BloodMoonMonolith); + this.ManageSpecialBiomeVisuals("Blizzard", Main.UseStormEffects & flag1); + this.ManageSpecialBiomeVisuals("HeatDistortion", Main.UseHeatDistortion && (flag2 || (double) tileCoordinates1.Y < Main.worldSurface && this.ZoneDesert && !flag3 && !Main.raining && !Filters.Scene["Sandstorm"].IsActive())); + if ((double) Main.GraveyardVisualIntensity > 0.0) + { + if (!Filters.Scene["Graveyard"].IsActive()) + { + Filters.Scene.Activate("Graveyard", new Vector2()); + } + else + { + Filters.Scene["Graveyard"].GetShader().UseTargetPosition(this.Center); + float progress = MathHelper.Lerp(0.0f, 0.75f, Main.GraveyardVisualIntensity); + Filters.Scene["Graveyard"].GetShader().UseProgress(progress); + Filters.Scene["Graveyard"].GetShader().UseIntensity(1.2f); + } + } + else if (Filters.Scene["Graveyard"].IsActive()) + Filters.Scene.Deactivate("Graveyard"); + if (!Filters.Scene["WaterDistortion"].IsActive() && Main.WaveQuality > 0) + Filters.Scene.Activate("WaterDistortion", new Vector2()); + else if (Filters.Scene["WaterDistortion"].IsActive() && Main.WaveQuality == 0) + Filters.Scene.Deactivate("WaterDistortion"); + if (Filters.Scene["WaterDistortion"].IsActive()) + { + double num1 = (double) Main.maxTilesX * 0.5 - (double) Math.Abs((float) tileCoordinates1.X - (float) Main.maxTilesX * 0.5f); + float num2 = 1f + Math.Abs(Main.windSpeedCurrent) * 1.25f + MathHelper.Clamp(Main.maxRaining, 0.0f, 1f) * 1.25f + (float) -((double) MathHelper.Clamp((float) ((num1 - 380.0) / 100.0), 0.0f, 1f) * 0.5 - 0.25); + float num3 = 1f - MathHelper.Clamp((float) (3.0 * ((double) ((float) tileCoordinates1.Y - (float) Main.worldSurface) / (Main.rockLayer - Main.worldSurface))), 0.0f, 1f); + float intensity = MathHelper.Clamp(num2 * num3 + (float) (0.899999976158142 - (double) MathHelper.Clamp((float) (Main.maxTilesY - tileCoordinates1.Y - 200) / 300f, 0.0f, 1f) * 0.899999976158142) + (float) ((1.0 - (double) num3) * 0.75), 0.0f, 2.5f); + Filters.Scene["WaterDistortion"].GetShader().UseIntensity(intensity); + } + if (flag2) + { + float intensity = Math.Min(1f, (float) (tileCoordinates1.Y - (Main.maxTilesY - 320)) / 120f) * 2f; + Filters.Scene["HeatDistortion"].GetShader().UseIntensity(intensity); + } + this._shaderObstructionInternalValue = Utils.Clamp(this._shaderObstructionInternalValue + (float) this.behindBackWall.ToDirectionInt() * -0.005f, -0.1f, 1.1f); + this._stormShaderObstruction = Utils.Clamp(this._shaderObstructionInternalValue, 0.0f, 1f); + if (Filters.Scene["Sandstorm"].IsActive()) + { + Filters.Scene["Sandstorm"].GetShader().UseIntensity(this._stormShaderObstruction * 0.4f * Math.Min(1f, Sandstorm.Severity)); + Filters.Scene["Sandstorm"].GetShader().UseOpacity(Math.Min(1f, Sandstorm.Severity * 1.5f) * this._stormShaderObstruction); + ((SimpleOverlay) Overlays.Scene["Sandstorm"]).GetShader().UseOpacity(Math.Min(1f, Sandstorm.Severity * 1.5f) * (1f - this._stormShaderObstruction)); + } + else if (this.ZoneDesert && !flag3 && !Main.raining && !flag2) + { + Vector3 vector3 = Main.tileColor.ToVector3(); + float num = (float) (((double) vector3.X + (double) vector3.Y + (double) vector3.Z) / 3.0); + float intensity = this._stormShaderObstruction * 4f * Math.Max(0.0f, 0.5f - Main.cloudAlpha) * num; + Filters.Scene["HeatDistortion"].GetShader().UseIntensity(intensity); + if ((double) intensity <= 0.0) + Filters.Scene["HeatDistortion"].IsHidden = true; + else + Filters.Scene["HeatDistortion"].IsHidden = false; + } + if (!Player.disabledBlizzardGraphic) + { + try + { + if (flag1) + { + float opacity = Math.Min(1f, Main.cloudAlpha * 2f) * this._stormShaderObstruction; + Filters.Scene["Blizzard"].GetShader().UseIntensity((float) ((double) this._stormShaderObstruction * 0.400000005960464 * (double) Math.Min(1f, Main.cloudAlpha * 2f) * 0.899999976158142 + 0.100000001490116)); + Filters.Scene["Blizzard"].GetShader().UseOpacity(opacity); + ((SimpleOverlay) Overlays.Scene["Blizzard"]).GetShader().UseOpacity(1f - opacity); + } + } + catch + { + Player.disabledBlizzardGraphic = true; + } + } + if (!Player.disabledBlizzardSound) + { + try + { + if (flag1) + { + ActiveSound activeSound1 = SoundEngine.GetActiveSound(Player._strongBlizzardSound); + ActiveSound activeSound2 = SoundEngine.GetActiveSound(Player._insideBlizzardSound); + if (activeSound1 == null) + Player._strongBlizzardSound = SoundEngine.PlayTrackedSound((SoundStyle) SoundID.BlizzardStrongLoop); + if (activeSound2 == null) + Player._insideBlizzardSound = SoundEngine.PlayTrackedSound((SoundStyle) SoundID.BlizzardInsideBuildingLoop); + SoundEngine.GetActiveSound(Player._strongBlizzardSound); + SoundEngine.GetActiveSound(Player._insideBlizzardSound); + } + Player._blizzardSoundVolume = !flag1 ? Math.Max(Player._blizzardSoundVolume - 0.01f, 0.0f) : Math.Min(Player._blizzardSoundVolume + 0.01f, 1f); + float num = Math.Min(1f, Main.cloudAlpha * 2f) * this._stormShaderObstruction; + ActiveSound activeSound3 = SoundEngine.GetActiveSound(Player._strongBlizzardSound); + ActiveSound activeSound4 = SoundEngine.GetActiveSound(Player._insideBlizzardSound); + if ((double) Player._blizzardSoundVolume > 0.0) + { + if (activeSound3 == null) + { + Player._strongBlizzardSound = SoundEngine.PlayTrackedSound((SoundStyle) SoundID.BlizzardStrongLoop); + activeSound3 = SoundEngine.GetActiveSound(Player._strongBlizzardSound); + } + activeSound3.Volume = num * Player._blizzardSoundVolume; + if (activeSound4 == null) + { + Player._insideBlizzardSound = SoundEngine.PlayTrackedSound((SoundStyle) SoundID.BlizzardInsideBuildingLoop); + activeSound4 = SoundEngine.GetActiveSound(Player._insideBlizzardSound); + } + activeSound4.Volume = (1f - num) * Player._blizzardSoundVolume; + } + else + { + if (activeSound3 != null) + activeSound3.Volume = 0.0f; + else + Player._strongBlizzardSound = (SlotId) SlotId.Invalid; + if (activeSound4 != null) + activeSound4.Volume = 0.0f; + else + Player._insideBlizzardSound = (SlotId) SlotId.Invalid; + } + } + catch + { + Player.disabledBlizzardSound = true; + } + } + if (!this.dead) + { + Point tileCoordinates2 = this.Center.ToTileCoordinates(); + if (WorldGen.InWorld(tileCoordinates2.X, tileCoordinates2.Y, 1)) + { + int num = 0; + if (Main.tile[tileCoordinates2.X, tileCoordinates2.Y] != null) + num = (int) Main.tile[tileCoordinates2.X, tileCoordinates2.Y].wall; + switch (num) + { + case 62: + AchievementsHelper.HandleSpecialEvent(this, 13); + break; + case 86: + AchievementsHelper.HandleSpecialEvent(this, 12); + break; + } + } + if (this._funkytownAchievementCheckCooldown > 0) + --this._funkytownAchievementCheckCooldown; + if ((double) this.position.Y / 16.0 > (double) Main.UnderworldLayer) + { + AchievementsHelper.HandleSpecialEvent(this, 14); + } + else + { + if (this._funkytownAchievementCheckCooldown != 0 || (double) this.position.Y / 16.0 >= Main.worldSurface || !this.ZoneGlowshroom) + return; + AchievementsHelper.HandleSpecialEvent(this, 15); + } + } + else + this._funkytownAchievementCheckCooldown = 100; + } + + public void ManageSpecialBiomeVisuals(string biomeName, bool inZone, Vector2 activationSource = default (Vector2)) + { + if (SkyManager.Instance[biomeName] != null && inZone != SkyManager.Instance[biomeName].IsActive()) + { + if (inZone) + SkyManager.Instance.Activate(biomeName, activationSource); + else + SkyManager.Instance.Deactivate(biomeName); + } + if (inZone != Filters.Scene[biomeName].IsActive()) + { + if (inZone) + Filters.Scene.Activate(biomeName, activationSource); + else + Filters.Scene[biomeName].Deactivate(); + } + else if (inZone) + Filters.Scene[biomeName].GetShader().UseTargetPosition(activationSource); + if (Overlays.Scene[biomeName] == null || inZone == (Overlays.Scene[biomeName].Mode != OverlayMode.Inactive)) + return; + if (inZone) + Overlays.Scene.Activate(biomeName, activationSource); + else + Overlays.Scene[biomeName].Deactivate(); + } + + public void GetHairSettings( + out bool fullHair, + out bool hatHair, + out bool hideHair, + out bool backHairDraw, + out bool drawsBackHairWithoutHeadgear) + { + fullHair = hatHair = hideHair = drawsBackHairWithoutHeadgear = false; + switch (this.head) + { + case 0: + case 23: + case 259: + drawsBackHairWithoutHeadgear = true; + break; + case 10: + case 12: + case 28: + case 42: + case 62: + case 97: + case 106: + case 113: + case 116: + case 119: + case 133: + case 138: + case 139: + case 163: + case 178: + case 181: + case 191: + case 198: + case 217: + case 218: + case 220: + case 222: + case 224: + case 225: + case 228: + case 229: + case 230: + case 232: + case 235: + case 238: + case 242: + case 243: + case 244: + case 245: + fullHair = true; + break; + case 13: + case 14: + case 15: + case 16: + case 18: + case 21: + case 24: + case 25: + case 26: + case 29: + case 40: + case 44: + case 51: + case 56: + case 59: + case 60: + case 63: + case 64: + case 65: + case 67: + case 68: + case 69: + case 81: + case 92: + case 94: + case 95: + case 100: + case 114: + case 121: + case 126: + case 130: + case 136: + case 140: + case 143: + case 145: + case 158: + case 159: + case 161: + case 182: + case 184: + case 190: + case 195: + case 215: + case 219: + case 223: + case 226: + case 227: + case 231: + case 233: + case 234: + case 262: + case 263: + case 264: + case 265: + hatHair = true; + break; + } + if (this.face > (sbyte) -1 && ArmorIDs.Face.Sets.PreventHairDraw[(int) this.face]) + hideHair = true; + int hair = this.hair; + backHairDraw = hair > 50 && (hair < 56 || hair > 63) && (hair < 74 || hair > 77) && (hair < 88 || hair > 89) && hair != 94 && hair != 100 && hair != 104 && hair != 112 && hair < 116; + if (hair != 133) + return; + backHairDraw = true; + } + + public void UpdateDead() + { + this._portalPhysicsTime = 0; + this.MountFishronSpecialCounter = 0.0f; + this.gem = -1; + this.ownedLargeGems = (BitsByte) (byte) 0; + this.brainOfConfusionDodgeAnimationCounter = 0; + this.ResetFloorFlags(); + this.wings = 0; + this.wingsLogic = 0; + this.face = this.neck = this.back = this.front = this.handoff = this.handon = this.shoe = this.waist = this.balloon = this.shield = (sbyte) 0; + this.poisoned = false; + this.venom = false; + this.onFire = false; + this.dripping = false; + this.drippingSlime = false; + this.drippingSparkleSlime = false; + this.burned = false; + this.suffocating = false; + this.onFire2 = false; + this.onFrostBurn = false; + this.blind = false; + this.blackout = false; + this.loveStruck = false; + this.dryadWard = false; + this.stinky = false; + this.resistCold = false; + this.electrified = false; + this.moonLeech = false; + this.headcovered = false; + this.vortexDebuff = false; + this.windPushed = false; + this.setForbidden = false; + this.setMonkT3 = false; + this.setHuntressT3 = false; + this.setApprenticeT3 = false; + this.setSquireT3 = false; + this.setForbiddenCooldownLocked = false; + this.setSolar = this.setVortex = this.setNebula = this.setStardust = false; + this.nebulaLevelDamage = this.nebulaLevelLife = this.nebulaLevelMana = 0; + this.trapDebuffSource = false; + this.yoraiz0rEye = 0; + this.yoraiz0rDarkness = false; + this.hasFloatingTube = false; + this.hasUnicornHorn = false; + this.leinforsHair = false; + this.gravDir = 1f; + for (int index = 0; index < 22; ++index) + { + if (this.buffType[index] <= 0 || !Main.persistentBuff[this.buffType[index]]) + { + this.buffTime[index] = 0; + this.buffType[index] = 0; + } + } + if (this.whoAmI == Main.myPlayer) + { + Main.npcChatText = ""; + Main.editSign = false; + Main.npcChatCornerItem = 0; + } + this.numMinions = 0; + this.grappling[0] = -1; + this.grappling[1] = -1; + this.grappling[2] = -1; + this.sign = -1; + this.SetTalkNPC(-1); + this.statLife = 0; + this.channel = false; + this.potionDelay = 0; + this.chest = -1; + this.tileEntityAnchor.Clear(); + this.changeItem = -1; + this.itemAnimation = 0; + this.immuneAlpha += 2; + if (this.immuneAlpha > (int) byte.MaxValue) + this.immuneAlpha = (int) byte.MaxValue; + this.headPosition += this.headVelocity; + this.bodyPosition += this.bodyVelocity; + this.legPosition += this.legVelocity; + this.headRotation += this.headVelocity.X * 0.1f; + this.bodyRotation += this.bodyVelocity.X * 0.1f; + this.legRotation += this.legVelocity.X * 0.1f; + this.headVelocity.Y += 0.1f; + this.bodyVelocity.Y += 0.1f; + this.legVelocity.Y += 0.1f; + this.headVelocity.X *= 0.99f; + this.bodyVelocity.X *= 0.99f; + this.legVelocity.X *= 0.99f; + for (int index = 0; index < this.npcTypeNoAggro.Length; ++index) + this.npcTypeNoAggro[index] = false; + if (this.difficulty == (byte) 2) + { + if (this.respawnTimer > 0) + this.respawnTimer = Utils.Clamp(this.respawnTimer - 1, 0, 1800); + else if (this.whoAmI == Main.myPlayer || Main.netMode == 2) + this.ghost = true; + } + else + { + this.respawnTimer = Utils.Clamp(this.respawnTimer - 1, 0, 1800); + if (this.respawnTimer <= 0 && Main.myPlayer == this.whoAmI) + { + if (Main.mouseItem.type > 0) + Main.playerInventory = true; + this.Spawn(PlayerSpawnContext.ReviveFromDeath); + } + } + if (this.whoAmI != Main.myPlayer || Main.drawingPlayerChat || Main.editSign || Main.editChest || Main.blockInput) + return; + PlayerInput.Triggers.Current.CopyInto(this); + if (this.controlInv) + { + if (!this.releaseInventory) + return; + this.releaseInventory = false; + if (Main.ingameOptionsWindow) + IngameOptions.Close(); + else + IngameOptions.Open(); + } + else + this.releaseInventory = true; + } + + public void UpdatePet(int i) + { + if (i != Main.myPlayer || this.miscEquips[0].buffType < 1 || this.miscEquips[0].stack < 1) + return; + int buffType = this.miscEquips[0].buffType; + if (!Main.vanityPet[buffType] && !Main.lightPet[buffType] || this.hideMisc[0] || this.miscEquips[0].type == 603 && !Main.runningCollectorsEdition || this.FindBuffIndex(buffType) != -1) + return; + this.AddBuff(buffType, 3600); + SoundEngine.PlaySound(this.miscEquips[0].UseSound, this.position); + } + + public void UpdatePetLight(int i) + { + if (i != Main.myPlayer || this.miscEquips[1].buffType < 1 || this.miscEquips[1].stack < 1) + return; + int type = this.miscEquips[1].buffType; + if (!Main.vanityPet[type] && !Main.lightPet[type] || this.hideMisc[1] || this.miscEquips[1].type == 603 && !Main.runningCollectorsEdition) + return; + int buffIndex = this.FindBuffIndex(type); + if (type == 27 && buffIndex == -1) + buffIndex = this.FindBuffIndex(102); + if (type == 27 && buffIndex == -1) + buffIndex = this.FindBuffIndex(101); + if (buffIndex != -1) + return; + if (type == 27) + type = Utils.SelectRandom(Main.rand, 27, 102, 101); + this.AddBuff(type, 3600); + SoundEngine.PlaySound(this.miscEquips[1].UseSound, this.position); + } + + public void TogglePet() + { + this.hideMisc[0] = !this.hideMisc[0]; + if (!this.hideMisc[0]) + return; + this.ClearBuff(this.miscEquips[0].buffType); + } + + public void ToggleLight() + { + this.hideMisc[1] = !this.hideMisc[1]; + if (!this.hideMisc[1]) + return; + this.ClearBuff(this.miscEquips[1].buffType); + if (this.miscEquips[1].buffType != 27) + return; + this.ClearBuff(102); + this.ClearBuff(101); + } + + public bool IsWithinSnappngRangeToTile(int x, int y, int distanceInPixels) => (double) (new Vector2((float) (x * 16 + 8), (float) (y * 16 + 8)) - new Vector2(this.Center.X, this.Bottom.Y - 16f)).Length() <= (double) distanceInPixels; + + public void SmartInteractLookup() + { + Main.ClearSmartInteract(); + if (UILinkPointNavigator.InUse || PlayerInput.UsingGamepad && Main.HoveringOverAnNPC) + Main.SmartInteractTileCoordsSelected.Clear(); + bool flag = PlayerInput.UsingGamepad || Main.SmartCursorEnabled; + if (!flag && !PlayerInput.UsingGamepad) + return; + Vector2 mousevec; + int LX; + int HX; + int LY; + int HY; + this.SmartInteractLookup_PrepareCommonlyUsedInfo(out mousevec, out LX, out HX, out LY, out HY); + Player._smartInteractSys.RunQuery(new SmartInteractScanSettings() + { + DemandOnlyZeroDistanceTargets = PlayerInput.UsingGamepad && !Main.SmartCursorEnabled, + FullInteraction = flag, + HX = HX, + HY = HY, + LX = LX, + LY = LY, + mousevec = mousevec, + player = this + }); + } + + private void SmartInteractLookup_PrepareCommonlyUsedInfo( + out Vector2 mousevec, + out int LX, + out int HX, + out int LY, + out int HY) + { + mousevec = Main.ReverseGravitySupport(Main.MouseScreen) + Main.screenPosition; + int num = 0; + LX = (int) ((double) this.position.X / 16.0) - Player.tileRangeX - num + 1; + HX = (int) (((double) this.position.X + (double) this.width) / 16.0) + Player.tileRangeX + num - 1; + LY = (int) ((double) this.position.Y / 16.0) - Player.tileRangeY - num + 1; + HY = (int) (((double) this.position.Y + (double) this.height) / 16.0) + Player.tileRangeY + num - 2; + LX = Utils.Clamp(LX, 10, Main.maxTilesX - 10); + HX = Utils.Clamp(HX, 10, Main.maxTilesX - 10); + LY = Utils.Clamp(LY, 10, Main.maxTilesY - 10); + HY = Utils.Clamp(HY, 10, Main.maxTilesY - 10); + } + + public void SmartSelectLookup() + { + if (this.mouseInterface) + this.controlTorch = false; + if (this.controlTorch && this.itemAnimation == 0) + { + int tX; + int tY; + PlayerInput.smartSelectPointer.SmartSelectLookup_GetTargetTile(this, out tX, out tY); + int toolStrategy; + bool wetTile; + this.SmartSelect_GetToolStrategy(tX, tY, out toolStrategy, out wetTile); + if (PlayerInput.UsingGamepad && this._lastSmartCursorToolStrategy != -1) + toolStrategy = this._lastSmartCursorToolStrategy; + if (toolStrategy == 0 || toolStrategy == 4) + { + double num1 = (double) Math.Abs((float) ((double) Main.mouseX + (double) Main.screenPosition.X - ((double) this.position.X + (double) (this.width / 2)))); + float num2 = Math.Abs((float) ((double) Main.mouseY + (double) Main.screenPosition.Y - ((double) this.position.Y + (double) (this.height / 2)))) * 1.3f; + if (Math.Sqrt(num1 * num1 + (double) num2 * (double) num2) > 200.0) + toolStrategy = 5; + } + this.SmartSelect_PickToolForStrategy(tX, tY, toolStrategy, wetTile); + this._lastSmartCursorToolStrategy = toolStrategy; + } + else if (this.itemAnimation == 0 && this.DpadRadial.SelectedItem != -1 && this.inventory[this.DpadRadial.SelectedItem].stack > 0) + { + if (this.nonTorch == -1) + this.nonTorch = this.selectedItem; + this.selectedItem = this.DpadRadial.SelectedItem; + this._lastSmartCursorToolStrategy = -1; + } + else if (this.itemAnimation == 0 && this.CircularRadial.SelectedItem != -1 && this.inventory[this.CircularRadial.SelectedItem].stack > 0) + { + if (this.nonTorch == -1) + this.nonTorch = this.selectedItem; + this.selectedItem = this.CircularRadial.SelectedItem; + this._lastSmartCursorToolStrategy = -1; + } + else + { + if (this.nonTorch <= -1 || this.itemAnimation != 0) + return; + this.selectedItem = this.nonTorch; + this.nonTorch = -1; + this._lastSmartCursorToolStrategy = -1; + } + } + + private void SmartSelectLookup_GetTargetTile(out int tX, out int tY) + { + tX = (int) (((double) Main.mouseX + (double) Main.screenPosition.X) / 16.0); + tY = (int) (((double) Main.mouseY + (double) Main.screenPosition.Y) / 16.0); + if ((double) this.gravDir != -1.0) + return; + tY = (int) (((double) Main.screenPosition.Y + (double) Main.screenHeight - (double) Main.mouseY) / 16.0); + } + + private void SmartSelect_PickToolForStrategy(int tX, int tY, int toolStrategy, bool wetTile) + { + for (int t = 0; t < 50; ++t) + { + int type = this.inventory[t].type; + switch (toolStrategy) + { + case 0: + if (ItemID.Sets.Torches[type]) + { + this.SmartSelect_SelectItem(t); + return; + } + if (type == 282 || type == 286 || type == 3002 || type == 3112 || type == 4776) + { + this.SmartSelect_SelectItem(t); + break; + } + break; + case 1: + if (this.inventory[t].hammer > 0) + { + this.SmartSelect_SelectItem(t); + return; + } + break; + case 2: + if (this.inventory[t].axe > 0) + { + this.SmartSelect_SelectItem(t); + return; + } + break; + case 3: + if (this.inventory[t].pick > 0) + { + this.SmartSelect_SelectItem(t); + return; + } + break; + case 4: + if (this.inventory[t].type != 282 && this.inventory[t].type != 286 && this.inventory[t].type != 3002 && this.inventory[t].type != 3112 && this.inventory[t].type != 4776 && this.inventory[t].type != 930 && ItemID.Sets.Torches[type] && !ItemID.Sets.WaterTorches[type]) + { + if (this.nonTorch == -1) + this.nonTorch = this.selectedItem; + if (this.inventory[this.selectedItem].createTile != 4) + { + this.selectedItem = t; + break; + } + break; + } + if (((type == 282 || type == 286 || type == 3002 || type == 3112 ? 1 : (type == 4776 ? 1 : 0)) & (wetTile ? 1 : 0)) != 0) + { + this.SmartSelect_SelectItem(t); + return; + } + if (type == 930 & wetTile) + { + bool flag = false; + for (int index = 57; index >= 0; --index) + { + if (this.inventory[index].ammo == this.inventory[t].useAmmo && this.inventory[index].stack > 0) + { + flag = true; + break; + } + } + if (flag) + { + this.SmartSelect_SelectItem(t); + return; + } + break; + } + if (ItemID.Sets.WaterTorches[type]) + { + this.SmartSelect_SelectItem(t); + return; + } + break; + case 5: + if (ItemID.Sets.Torches[type]) + { + if (this.nonTorch == -1) + this.nonTorch = this.selectedItem; + if (this.inventory[this.selectedItem].createTile != 4) + { + this.selectedItem = t; + break; + } + break; + } + switch (type) + { + case 282: + case 286: + case 3002: + case 3112: + case 4776: + this.SmartSelect_SelectItem(t); + return; + case 930: + bool flag1 = false; + for (int index = 57; index >= 0; --index) + { + if (this.inventory[index].ammo == this.inventory[t].useAmmo && this.inventory[index].stack > 0) + { + flag1 = true; + break; + } + } + if (flag1) + { + this.SmartSelect_SelectItem(t); + return; + } + continue; + default: + continue; + } + case 6: + int num = 929; + if (Main.tile[tX, tY].frameX >= (short) 144) + num = 1345; + else if (Main.tile[tX, tY].frameX >= (short) 72) + num = 1338; + if (type == num) + { + this.SmartSelect_SelectItem(t); + return; + } + break; + case 7: + if (ItemID.Sets.ExtractinatorMode[type] >= 0) + { + this.SmartSelect_SelectItem(t); + return; + } + break; + case 8: + if (ItemID.Sets.IsPaintScraper[type]) + { + this.SmartSelect_SelectItem(t); + return; + } + break; + } + } + } + + private void SmartSelect_SelectItem(int t) + { + if (this.nonTorch == -1) + this.nonTorch = this.selectedItem; + this.selectedItem = t; + } + + private void SmartSelect_GetToolStrategy( + int tX, + int tY, + out int toolStrategy, + out bool wetTile) + { + toolStrategy = 0; + bool flag = false; + wetTile = false; + try + { + int num1 = 0; + int num2 = 0; + if ((double) this.position.X / 16.0 >= (double) tX) + num1 = (int) ((double) this.position.X / 16.0) - tX; + if (((double) this.position.X + (double) this.width) / 16.0 <= (double) tX) + num1 = tX - (int) (((double) this.position.X + (double) this.width) / 16.0); + if ((double) this.position.Y / 16.0 >= (double) tY) + num2 = (int) ((double) this.position.Y / 16.0) - tY; + if (((double) this.position.Y + (double) this.height) / 16.0 <= (double) tY) + num2 = tY - (int) (((double) this.position.Y + (double) this.height) / 16.0); + int pickRange; + int axeRange; + int hammerRange; + int cannonRange; + int extractItemRange; + int paintScraperRange; + this.SmartSelect_GetAvailableToolRanges(out pickRange, out axeRange, out hammerRange, out cannonRange, out extractItemRange, out paintScraperRange); + wetTile = Main.tile[tX, tY].liquid > (byte) 0; + if (Main.tile[tX, tY].active()) + { + int type = (int) Main.tile[tX, tY].type; + if (type == 219 && num1 <= extractItemRange + Player.tileRangeX && num2 <= extractItemRange + Player.tileRangeY) + { + toolStrategy = 7; + flag = true; + } + else if (type == 209 && num1 <= cannonRange + Player.tileRangeX && num2 <= cannonRange + Player.tileRangeY) + { + toolStrategy = 6; + flag = true; + } + else if (Main.tileHammer[type] && num1 <= hammerRange + Player.tileRangeX && num2 <= hammerRange + Player.tileRangeY) + { + toolStrategy = 1; + flag = true; + } + else if (Main.tileAxe[type] && num1 <= axeRange + Player.tileRangeX && num2 <= axeRange + Player.tileRangeY) + { + toolStrategy = 2; + flag = true; + } + else if (type == 184 && num1 <= paintScraperRange + Player.tileRangeX && num2 <= paintScraperRange + Player.tileRangeY) + { + toolStrategy = 8; + flag = true; + } + else if (num1 <= pickRange + Player.tileRangeX) + { + if (num2 <= pickRange + Player.tileRangeY) + { + toolStrategy = 3; + flag = true; + } + } + } + else if (wetTile) + { + if (this.wet) + { + toolStrategy = 4; + flag = true; + } + } + } + catch + { + } + if (flag || !this.wet) + return; + toolStrategy = 4; + } + + private void SmartSelect_GetAvailableToolRanges( + out int pickRange, + out int axeRange, + out int hammerRange, + out int cannonRange, + out int extractItemRange, + out int paintScraperRange) + { + pickRange = -10; + axeRange = -10; + hammerRange = -10; + cannonRange = -10; + extractItemRange = -10; + paintScraperRange = -10; + for (int index = 0; index < 50; ++index) + { + if (this.inventory[index].pick > 0 && pickRange == -10) + pickRange = this.inventory[index].tileBoost; + if (this.inventory[index].axe > 0 && axeRange == -10) + axeRange = this.inventory[index].tileBoost; + if (this.inventory[index].hammer > 0 && hammerRange == -10) + hammerRange = this.inventory[index].tileBoost; + if ((this.inventory[index].type == 929 || this.inventory[index].type == 1338 || this.inventory[index].type == 1345) && cannonRange == -10) + cannonRange = this.inventory[index].tileBoost; + if (ItemID.Sets.IsPaintScraper[this.inventory[index].type] && paintScraperRange == -10) + paintScraperRange = this.inventory[index].tileBoost; + if (ItemID.Sets.ExtractinatorMode[this.inventory[index].type] != -1 && extractItemRange == -10) + extractItemRange = this.inventory[index].tileBoost; + } + } + + private void TryRecalculatingTorchLuck() + { + if (this.happyFunTorchTime) + { + this.luckyTorchCounter = 0; + this.TorchAttack(); + } + else + { + if (this.torchGodCooldown > 0) + --this.torchGodCooldown; + if ((double) this.Center.Y < Main.worldSurface * 16.0) + { + this.UpdateTorchLuck_ConsumeCountersAndCalculate(); + } + else + { + int num1 = 1; + int num2 = 40; + int num3 = (int) this.Center.Y / 16 - num2; + int num4 = (int) this.Center.X / 16 - num2; + int num5 = (int) this.Center.X / 16 + num2; + int num6 = Utils.Clamp(num4, 10, Main.maxTilesX - 10); + int num7 = Utils.Clamp(num5, 10, Main.maxTilesX - 10); + for (int index1 = 0; index1 < num1; ++index1) + { + int index2 = num3 + index1 + this.luckyTorchCounter * num1; + if (index2 >= 10 && index2 <= Main.maxTilesY - 10) + { + for (int index3 = num6; index3 <= num7; ++index3) + { + Tile tile = Main.tile[index3, index2]; + if (tile == null) + return; + if (tile.active() && tile.type == (ushort) 4) + { + if (tile.frameX < (short) 66) + ++this.nearbyTorches; + int index4 = (int) tile.frameY / 22; + if (index4 < 22) + { + this.nearbyTorch[index4] = true; + if (index4 == 17 && (tile.liquid == (byte) 0 || tile.liquidType() != (byte) 0)) + this.dryCoralTorch = true; + } + } + } + if (index2 >= (int) this.Center.Y / 16 + num2) + { + this.UpdateTorchLuck_ConsumeCountersAndCalculate(); + return; + } + } + } + ++this.luckyTorchCounter; + } + } + } + + private void RelightTorches() + { + this.torchGodCooldown = 3600; + for (int index = 0; index < this.numberOfTorchAttacks; ++index) + { + int tileX = this.unlitTorchX[index]; + int tileY = this.unlitTorchY[index]; + if (Main.tile[tileX, tileY].type == (ushort) 4 && Main.tile[tileX, tileY].frameX >= (short) 66) + { + Main.tile[tileX, tileY].frameX -= (short) 66; + NetMessage.SendTileSquare(-1, tileX, tileY, 1); + } + } + } + + private void TorchAttack() + { + if (this.whoAmI != Main.myPlayer) + return; + if ((double) this.position.Y < Main.worldSurface * 16.0) + { + this.RelightTorches(); + this.happyFunTorchTime = false; + if (Main.netMode != 1) + return; + NetMessage.SendData(4, number: this.whoAmI); + } + else + { + this.AddBuff(80, 2); + ++this.torchFunTimer; + if (this.torchFunTimer <= 20) + return; + this.torchFunTimer = 0; + int maxValue = 0; + int num1 = 100; + int num2 = (int) this.Center.X / 16 - num1; + int num3 = (int) this.Center.X / 16 + num1; + int num4 = (int) this.Center.Y / 16 - num1; + int num5 = (int) this.Center.Y / 16 + num1; + int max = Main.maxTilesX - 10; + int num6 = Utils.Clamp(num2, 10, max); + int num7 = Utils.Clamp(num3, 10, Main.maxTilesX - 10); + int num8 = Utils.Clamp(num4, 10, Main.maxTilesY - 10); + int num9 = Utils.Clamp(num5, 10, Main.maxTilesY - 10); + for (int index1 = num6; index1 <= num7; ++index1) + { + for (int index2 = num8; index2 <= num9; ++index2) + { + Tile tile = Main.tile[index1, index2]; + if (tile != null && tile.active() & tile.type == (ushort) 4 && tile.frameX < (short) 66) + { + Player._torchAttackPosX[maxValue] = index1; + Player._torchAttackPosY[maxValue] = index2; + ++maxValue; + if (maxValue >= Player._torchAttackPosX.Length) + break; + } + } + if (maxValue >= Player._torchAttackPosX.Length) + break; + } + if (this.dead) + { + this.RelightTorches(); + this.happyFunTorchTime = false; + if (Main.netMode != 1) + return; + NetMessage.SendData(4, number: this.whoAmI); + } + else if (maxValue == 0 || this.numberOfTorchAttacks >= Player.maxTorchAttacks) + { + this.RelightTorches(); + this.happyFunTorchTime = false; + if (Main.netMode == 1) + NetMessage.SendData(4, number: this.whoAmI); + if (this.numberOfTorchAttacks < 95) + return; + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 5043); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else + { + if (maxValue <= 0) + return; + int index3 = Main.rand.Next(maxValue); + int tileX = Player._torchAttackPosX[index3]; + int tileY = Player._torchAttackPosY[index3]; + if (Main.tile[tileX, tileY].type != (ushort) 4 || Main.tile[tileX, tileY].frameX >= (short) 66) + return; + float num10 = 8f; + int Damage = 20; + if (Damage < 10) + Damage = 10; + int num11 = (int) Main.tile[tileX, tileY].frameY / 22; + int num12; + switch (num11) + { + case 0: + num12 = 6; + break; + case 8: + num12 = 75; + break; + case 9: + num12 = 135; + break; + case 10: + num12 = 158; + break; + case 11: + num12 = 169; + break; + case 12: + num12 = 156; + break; + case 13: + num12 = 234; + break; + case 14: + num12 = 66; + break; + case 15: + num12 = 242; + break; + case 16: + num12 = 293; + break; + case 17: + num12 = 294; + break; + default: + num12 = 58 + num11; + break; + } + Main.tile[tileX, tileY].frameX += (short) 66; + this.unlitTorchX[this.numberOfTorchAttacks] = tileX; + this.unlitTorchY[this.numberOfTorchAttacks] = tileY; + ++this.numberOfTorchAttacks; + NetMessage.SendTileSquare(-1, tileX, tileY, 1); + Vector2 position = new Vector2((float) (tileX * 16 + 8), (float) (tileY * 16)); + Vector2 velocity = this.Center - position; + float ai1 = velocity.Length(); + velocity.Normalize(); + velocity *= num10; + int index4 = Projectile.NewProjectile(position, velocity, 949, Damage, 1f, this.whoAmI, (float) num12, ai1); + Main.projectile[index4].ai[0] = (float) num12; + Main.projectile[index4].ai[1] = ai1; + Main.projectile[index4].netUpdate = true; + if ((maxValue != 1 || this.numberOfTorchAttacks < 95) && this.numberOfTorchAttacks < Player.maxTorchAttacks) + return; + this.torchFunTimer = -180; + } + } + } + + private void UpdateTorchLuck_ConsumeCountersAndCalculate() + { + this.luckyTorchCounter = 0; + this.torchLuck = 0.0f; + if (this.inventory[this.selectedItem].createTile == 4 && this.inventory[this.selectedItem].placeStyle < 22) + this.nearbyTorch[this.inventory[this.selectedItem].placeStyle] = true; + float num1 = 0.0f; + float num2 = 0.0f; + if (!this.ZoneDungeon && !this.ZoneLihzhardTemple) + { + if (this.nearbyTorch[9]) + { + if (this.ZoneSnow) + ++num2; + else + ++num1; + } + if (this.nearbyTorch[16]) + { + if (this.ZoneDesert) + ++num2; + else + ++num1; + } + if (this.nearbyTorch[17]) + { + if (WorldGen.oceanDepths((int) this.Center.X / 16, (int) this.Center.Y / 16)) + ++num2; + else if (this.dryCoralTorch) + ++num1; + } + if (this.nearbyTorch[21]) + { + if (this.ZoneJungle) + ++num2; + else + ++num1; + } + if (this.nearbyTorch[18]) + { + if (this.ZoneCorrupt) + ++num2; + else + ++num1; + } + if (this.nearbyTorch[8] && this.ZoneCorrupt) + ++num2; + if (this.nearbyTorch[19]) + { + if (this.ZoneCrimson) + ++num2; + else + ++num1; + } + if (this.nearbyTorch[11] && this.ZoneCrimson) + ++num2; + if (this.nearbyTorch[20]) + { + if (this.ZoneHallow) + ++num2; + else + ++num1; + } + if (this.nearbyTorch[13] && !this.ZoneSnow && !this.ZoneDesert && !this.ZoneCorrupt && !this.ZoneCrimson && !this.ZoneHallow && !this.ZoneJungle) + num2 += 0.5f; + if (this.nearbyTorch[0]) + { + if (this.ZoneSnow) + num1 += 2f; + else if (this.ZoneDesert || this.ZoneCorrupt || this.ZoneCrimson || this.ZoneHallow) + num1 += 0.5f; + } + } + if ((double) num2 >= 1.0) + ++this.torchLuck; + else if ((double) num2 > 0.0) + this.torchLuck += 0.5f; + if ((double) num1 >= 2.0) + this.torchLuck += -1.5f; + else if ((double) num1 >= 1.0) + this.torchLuck += -1f; + else if ((double) num1 > 0.0) + this.torchLuck += -0.5f; + this.dryCoralTorch = false; + for (int index = 0; index < 22; ++index) + this.nearbyTorch[index] = false; + if ((double) this.torchLuck < 0.0) + this.torchLuck = 0.0f; + if (this.torchGodCooldown <= 0 && !this.unlockedBiomeTorches && this.nearbyTorches > 100 && !this.happyFunTorchTime && (double) this.position.Y > Main.worldSurface * 16.0) + { + bool flag = false; + for (int index = 0; index < this.inventory.Length; ++index) + { + if (this.inventory[index].type == 5043) + { + flag = true; + break; + } + } + if (!flag) + { + this.happyFunTorchTime = true; + this.numberOfTorchAttacks = 0; + } + } + this.nearbyTorches = 0; + } + + public float NormalizedLuck + { + get + { + float num = 0.0f; + if ((double) this.luck > 0.0) + num = this.luck / this.luckMaximumCap; + else if ((double) this.luck < 0.0) + num = (float) -((double) this.luck / (double) this.luckMinimumCap); + return MathHelper.Clamp(num, -1f, 1f); + } + } + + private float GetLadyBugLuck() + { + if (this.ladyBugLuckTimeLeft > 0) + return (float) this.ladyBugLuckTimeLeft / (float) NPC.ladyBugGoodLuckTime; + return this.ladyBugLuckTimeLeft < 0 ? (float) -(double) this.ladyBugLuckTimeLeft / (float) NPC.ladyBugBadLuckTime : 0.0f; + } + + public static float GetClosestPlayersLuck(Point Position) => Main.player[(int) Player.FindClosest(new Vector2((float) (Position.X * 16), (float) (Position.Y * 16)), 1, 1)].luck; + + public static float GetClosestPlayersLuck(Vector2 Position) => Main.player[(int) Player.FindClosest(Position, 1, 1)].luck; + + public int RollLuck(int range) + { + if ((double) this.luck > 0.0 && (double) Main.rand.NextFloat() < (double) this.luck) + return Main.rand.Next(Main.rand.Next(range / 2, range)); + return (double) this.luck < 0.0 && (double) Main.rand.NextFloat() < -(double) this.luck ? Main.rand.Next(Main.rand.Next(range, range * 2)) : Main.rand.Next(range); + } + + public static float GetClosestRollLuck(Vector2 position, int range) => (float) Main.player[(int) Player.FindClosest(position, 1, 1)].RollLuck(range); + + public static float GetClosestRollLuck(int x, int y, int range) => (float) Main.player[(int) Player.FindClosest(new Vector2((float) (x * 16), (float) (y * 16)), 1, 1)].RollLuck(range); + + public void ResetEffects() + { + this.extraAccessorySlots = !this.extraAccessory || !Main.expertMode && !Main.gameMenu ? 0 : 1; + this.fairyBoots = false; + this.moonLordLegs = false; + this.flowerBoots = false; + this.arcticDivingGear = false; + this.noBuilding = false; + this.strongBees = false; + this.armorPenetration = 0; + this.shroomiteStealth = false; + this.statDefense = 0; + this.accWatch = 0; + this.accCompass = 0; + this.accDepthMeter = 0; + this.accDivingHelm = false; + this.canFloatInWater = false; + this.lifeRegen = 0; + this.manaCost = 1f; + this.meleeSpeed = 1f; + this.meleeDamage = 1f; + this.rangedDamage = 1f; + this.magicDamage = 1f; + this.minionDamage = 1f; + this.meleeCrit = 4; + this.rangedCrit = 4; + this.magicCrit = 4; + this.hasFootball = false; + this.drawingFootball = false; + this.minionKB = 0.0f; + this.moveSpeed = 1f; + this.boneArmor = false; + this.honey = false; + this.frostArmor = false; + this.rocketBoots = 0; + this.fireWalk = false; + this.noKnockback = false; + this.jumpBoost = false; + this.frogLegJumpBoost = false; + this.skyStoneEffects = false; + this.noFallDmg = false; + this.accFlipper = false; + this.spawnMax = false; + this.spaceGun = false; + this.killGuide = false; + this.killClothier = false; + this.lavaImmune = false; + this.gills = false; + this.slowFall = false; + this.findTreasure = false; + this.invis = false; + this.nightVision = false; + this.enemySpawns = false; + this.hasTitaniumStormBuff = false; + this.thorns = 0.0f; + this.aggro = 0; + this.waterWalk = false; + this.waterWalk2 = false; + this.detectCreature = false; + this.gravControl = false; + this.releaseBeesWhenHurt = false; + this.gravControl2 = false; + this.statLifeMax2 = this.statLifeMax; + this.statManaMax2 = this.statManaMax; + this.chloroAmmoCost80 = false; + this.ammoCost80 = false; + this.ammoCost75 = false; + this.manaRegenBuff = false; + this.arrowDamage = 1f; + this.bulletDamage = 1f; + this.rocketDamage = 1f; + this.coolWhipBuff = false; + this.yoraiz0rEye = 0; + this.yoraiz0rDarkness = false; + this.hasFloatingTube = false; + this.hasUnicornHorn = false; + this.leinforsHair = false; + this.suspiciouslookingTentacle = false; + this.crimsonHeart = false; + this.lightOrb = false; + this.blueFairy = false; + this.redFairy = false; + this.greenFairy = false; + this.wisp = false; + this.bunny = false; + this.turtle = false; + this.eater = false; + this.trident = false; + this.skeletron = false; + this.hornet = false; + this.zephyrfish = false; + this.tiki = false; + this.lizard = false; + this.parrot = false; + this.sapling = false; + this.cSapling = false; + this.truffle = false; + this.yoyoGlove = false; + this.counterWeight = 0; + this.stringColor = 0; + this.yoyoString = false; + this.shadowDodge = false; + this.palladiumRegen = false; + this.chaosState = false; + this.onHitDodge = false; + this.onHitRegen = false; + this.onHitPetal = false; + this.iceBarrier = false; + this.onHitTitaniumStorm = false; + this.maxMinions = 1; + this.maxTurrets = 1; + this.ammoBox = false; + this.ammoPotion = false; + this.penguin = false; + this.sporeSac = false; + this.shinyStone = false; + this.empressBrooch = false; + this.volatileGelatin = false; + this.dd2Accessory = false; + this.magicLantern = false; + this.rabid = false; + this.sunflower = false; + this.wellFed = false; + this.inferno = false; + this.manaMagnet = false; + this.lifeMagnet = false; + this.treasureMagnet = false; + this.lifeForce = false; + this.dangerSense = false; + if (Main.myPlayer == this.whoAmI) + this.luckPotion = (byte) 0; + this.endurance = 0.0f; + this.calmed = false; + this.beetleOrbs = 0; + this.beetleBuff = false; + this.miniMinotaur = false; + this.goldRing = false; + this.solarShields = 0; + this.GoingDownWithGrapple = false; + this.fishingSkill = 0; + this.cratePotion = false; + this.sonarPotion = false; + this.accTackleBox = false; + this.accFishingLine = false; + this.accLavaFishing = false; + this.accFishFinder = false; + this.accWeatherRadio = false; + this.accThirdEye = false; + this.InfoAccMechShowWires = false; + this.accJarOfSouls = false; + this.accCalendar = false; + this.accStopwatch = false; + this.accOreFinder = false; + this.accCritterGuide = false; + this.accDreamCatcher = false; + this.wallSpeed = 1f; + this.tileSpeed = 1f; + this.autoPaint = false; + this.autoActuator = false; + this.petFlagKingSlimePet = false; + this.petFlagEyeOfCthulhuPet = false; + this.petFlagEaterOfWorldsPet = false; + this.petFlagBrainOfCthulhuPet = false; + this.petFlagSkeletronPet = false; + this.petFlagQueenBeePet = false; + this.petFlagDestroyerPet = false; + this.petFlagTwinsPet = false; + this.petFlagSkeletronPrimePet = false; + this.petFlagPlanteraPet = false; + this.petFlagGolemPet = false; + this.petFlagDukeFishronPet = false; + this.petFlagLunaticCultistPet = false; + this.petFlagMoonLordPet = false; + this.petFlagFairyQueenPet = false; + this.petFlagPumpkingPet = false; + this.petFlagEverscreamPet = false; + this.petFlagIceQueenPet = false; + this.petFlagMartianPet = false; + this.petFlagDD2OgrePet = false; + this.petFlagDD2BetsyPet = false; + this.petFlagQueenSlimePet = false; + this.petFlagVoltBunny = false; + this.petFlagShadowMimic = false; + this.petFlagBabyWerewolf = false; + this.petFlagDynamiteKitten = false; + this.petFlagPlantero = false; + this.petFlagBabyRedPanda = false; + this.petFlagLilHarpy = false; + this.petFlagFennecFox = false; + this.petFlagGlitteryButterfly = false; + this.petFlagBabyImp = false; + this.petFlagBabyShark = false; + this.petFlagUpbeatStar = false; + this.petFlagDD2Gato = false; + this.petFlagDD2Dragon = false; + this.petFlagDD2Ghost = false; + this.companionCube = false; + this.petFlagSugarGlider = false; + this.babyFaceMonster = false; + this.manaSick = false; + this.puppy = false; + this.grinch = false; + this.blackCat = false; + this.spider = false; + this.squashling = false; + this.magicCuffs = false; + this.coldDash = false; + this.desertDash = false; + this.sailDash = false; + this.cordage = false; + this.magicQuiver = false; + this.hasMoltenQuiver = false; + this.magmaStone = false; + this.hasRaisableShield = false; + this.lavaRose = false; + this.eyeSpring = false; + this.snowman = false; + this.scope = false; + this.panic = false; + this.brainOfConfusion = false; + this.dino = false; + this.crystalLeaf = false; + this.pygmy = false; + this.raven = false; + this.slime = false; + this.hornetMinion = false; + this.impMinion = false; + this.twinsMinion = false; + this.spiderMinion = false; + this.pirateMinion = false; + this.sharknadoMinion = false; + this.stardustMinion = false; + this.batsOfLight = false; + this.babyBird = false; + this.stormTiger = false; + this.smolstar = false; + this.empressBlade = false; + this.stardustGuardian = false; + this.stardustDragon = false; + this.UFOMinion = false; + this.DeadlySphereMinion = false; + this.chilled = false; + this.tipsy = false; + this.dazed = false; + this.frozen = false; + this.stoned = false; + this.webbed = false; + this.ichor = false; + this.manaRegenBonus = 0; + this.manaRegenDelayBonus = 0; + this.carpet = false; + this.iceSkate = false; + this.dashType = 0; + this.spikedBoots = 0; + this.blackBelt = false; + this.lavaMax = 0; + this.archery = false; + this.poisoned = false; + this.venom = false; + this.blind = false; + this.blackout = false; + this.onFire = false; + this.dripping = false; + this.drippingSlime = false; + this.drippingSparkleSlime = false; + this.burned = false; + this.suffocating = false; + this.onFire2 = false; + this.onFrostBurn = false; + this.frostBurn = false; + this.noItems = false; + this.cursed = false; + this.blockRange = 0; + this.pickSpeed = 1f; + this.wereWolf = false; + this.rulerGrid = false; + this.rulerLine = true; + this.bleed = false; + this.confused = false; + this.witheredArmor = false; + this.witheredWeapon = false; + this.parryDamageBuff = false; + this.slowOgreSpit = false; + this.wings = 0; + this.wingsLogic = 0; + this.wingTimeMax = 0; + this.brokenArmor = false; + this.silence = false; + this.slow = false; + this.gross = false; + this.tongued = false; + this.kbGlove = false; + this.kbBuff = false; + this.starCloak = false; + this.starCloakIsManaCloak = false; + this.starCloakIsStarVeil = false; + this.starCloakIsBeeCloak = false; + this.longInvince = false; + this.pStone = false; + this.manaFlower = false; + this.crimsonRegen = false; + this.ghostHeal = false; + this.ghostHurt = false; + this.turtleArmor = false; + this.turtleThorns = false; + this.spiderArmor = false; + this.loveStruck = false; + this.stinky = false; + this.dryadWard = false; + this.resistCold = false; + this.electrified = false; + this.moonLeech = false; + this.headcovered = false; + this.vortexDebuff = false; + this.windPushed = false; + this.ballistaPanic = false; + this.vampireFrog = false; + this.CanSeeInvisibleBlocks = false; + this.setVortex = this.setNebula = this.setStardust = false; + this.setForbidden = false; + this.setHuntressT3 = false; + this.setSquireT3 = false; + this.setMonkT3 = false; + this.setApprenticeT3 = false; + this.setHuntressT2 = false; + this.setSquireT2 = false; + this.setMonkT2 = false; + this.setApprenticeT2 = false; + this.setForbiddenCooldownLocked = false; + this.nebulaLevelDamage = this.nebulaLevelLife = this.nebulaLevelMana = 0; + this.ignoreWater = false; + this.meleeEnchant = (byte) 0; + this.discount = false; + this.coins = false; + this.hasJumpOption_Cloud = false; + this.hasJumpOption_Sail = false; + this.hasJumpOption_Sandstorm = false; + this.hasJumpOption_Blizzard = false; + this.hasJumpOption_Fart = false; + this.hasJumpOption_Unicorn = false; + this.hasJumpOption_Santank = false; + this.hasJumpOption_WallOfFleshGoat = false; + this.hasJumpOption_Basilisk = false; + this.defendedByPaladin = false; + this.hasPaladinShield = false; + this.preventAllItemPickups = false; + this.dontHurtCritters = false; + this.portableStoolInfo.Reset(); + this.ResizeHitbox(); + this.autoJump = false; + this.justJumped = false; + this.jumpSpeedBoost = 0.0f; + this.extraFall = 0; + this.creativeGodMode = false; + if (this.phantasmTime > 0) + --this.phantasmTime; + if (this.brainOfConfusionDodgeAnimationCounter > 0) + --this.brainOfConfusionDodgeAnimationCounter; + if (this.wireOperationsCooldown > 0) + --this.wireOperationsCooldown; + if (this.releaseUseItem) + this.ActuationRodLock = false; + for (int index = 0; index < this.npcTypeNoAggro.Length; ++index) + this.npcTypeNoAggro[index] = false; + this.ResetProjectileCaches(); + if (this.whoAmI == Main.myPlayer) + { + Player.tileRangeX = 5; + Player.tileRangeY = 4; + if (Main.GameModeInfo.IsJourneyMode) + { + CreativePowers.FarPlacementRangePower power = CreativePowerManager.Instance.GetPower(); + if (power.GetIsUnlocked() && power.IsEnabledForPlayer(this.whoAmI)) + { + Player.tileRangeX *= 2; + Player.tileRangeY *= 2; + Player.tileRangeX += 8; + Player.tileRangeY += 8; + } + } + } + this.mount.CheckMountBuff(this); + } + + private void UpdateLadyBugLuckTime() + { + if (this.ladyBugLuckTimeLeft > 0) + { + this.ladyBugLuckTimeLeft -= Main.dayRate; + if (this.ladyBugLuckTimeLeft >= 0) + return; + this.ladyBugLuckTimeLeft = 0; + } + else + { + if (this.ladyBugLuckTimeLeft >= 0) + return; + this.ladyBugLuckTimeLeft += Main.dayRate; + if (this.ladyBugLuckTimeLeft <= 0) + return; + this.ladyBugLuckTimeLeft = 0; + } + } + + public void UpdateImmunity() + { + if (this.immune) + { + --this.immuneTime; + if (this.immuneTime <= 0) + { + this.immune = false; + this.immuneNoBlink = false; + } + if (this.immuneNoBlink) + { + this.immuneAlpha = 0; + } + else + { + this.immuneAlpha += this.immuneAlphaDirection * 50; + if (this.immuneAlpha <= 50) + this.immuneAlphaDirection = 1; + else if (this.immuneAlpha >= 205) + this.immuneAlphaDirection = -1; + } + } + else + this.immuneAlpha = 0; + for (int index = 0; index < this.hurtCooldowns.Length; ++index) + { + if (this.hurtCooldowns[index] > 0) + --this.hurtCooldowns[index]; + } + } + + public void UpdateLifeRegen() + { + bool flag = false; + if (this.shinyStone && (double) Math.Abs(this.velocity.X) < 0.05 && (double) Math.Abs(this.velocity.Y) < 0.05 && this.itemAnimation == 0) + flag = true; + if (this.poisoned) + { + if (this.lifeRegen > 0) + this.lifeRegen = 0; + this.lifeRegenTime = 0; + this.lifeRegen -= 4; + } + if (this.venom) + { + if (this.lifeRegen > 0) + this.lifeRegen = 0; + this.lifeRegenTime = 0; + this.lifeRegen -= 30; + } + if (this.onFire) + { + if (this.lifeRegen > 0) + this.lifeRegen = 0; + this.lifeRegenTime = 0; + this.lifeRegen -= 8; + } + if (this.onFrostBurn) + { + if (this.lifeRegen > 0) + this.lifeRegen = 0; + this.lifeRegenTime = 0; + this.lifeRegen -= 12; + } + if (this.onFire2) + { + if (this.lifeRegen > 0) + this.lifeRegen = 0; + this.lifeRegenTime = 0; + this.lifeRegen -= 24; + } + if (this.burned) + { + if (this.lifeRegen > 0) + this.lifeRegen = 0; + this.lifeRegenTime = 0; + this.lifeRegen -= 60; + this.moveSpeed *= 0.5f; + } + if (this.suffocating) + { + if (this.lifeRegen > 0) + this.lifeRegen = 0; + this.lifeRegenTime = 0; + this.lifeRegen -= 40; + } + if (this.electrified) + { + if (this.lifeRegen > 0) + this.lifeRegen = 0; + this.lifeRegenTime = 0; + this.lifeRegen -= 8; + if (this.controlLeft || this.controlRight) + this.lifeRegen -= 32; + } + if (this.tongued && Main.expertMode) + { + if (this.lifeRegen > 0) + this.lifeRegen = 0; + this.lifeRegenTime = 0; + this.lifeRegen -= 100; + } + if (this.honey && this.lifeRegen < 0) + { + this.lifeRegen += 4; + if (this.lifeRegen > 0) + this.lifeRegen = 0; + } + if (this.lifeRegen < 0 && this.nebulaLevelLife > 0) + this.lifeRegen = 0; + if (flag && this.lifeRegen < 0) + this.lifeRegen /= 2; + ++this.lifeRegenTime; + if (this.crimsonRegen) + ++this.lifeRegenTime; + if (this.soulDrain > 0) + this.lifeRegenTime += 2; + if (flag) + { + if (this.lifeRegenTime > 90 && this.lifeRegenTime < 1800) + this.lifeRegenTime = 1800; + this.lifeRegenTime += 4; + this.lifeRegen += 4; + } + if (this.honey) + { + this.lifeRegenTime += 2; + this.lifeRegen += 2; + } + if (this.soulDrain > 0) + { + int num = (5 + this.soulDrain) / 2; + this.lifeRegenTime += num; + this.lifeRegen += num; + } + if (this.whoAmI == Main.myPlayer && Main.SceneMetrics.HasCampfire) + ++this.lifeRegen; + if (this.whoAmI == Main.myPlayer && Main.SceneMetrics.HasHeartLantern) + this.lifeRegen += 2; + if (this.bleed) + this.lifeRegenTime = 0; + float num1 = 0.0f; + if (this.lifeRegenTime >= 300) + ++num1; + if (this.lifeRegenTime >= 600) + ++num1; + if (this.lifeRegenTime >= 900) + ++num1; + if (this.lifeRegenTime >= 1200) + ++num1; + if (this.lifeRegenTime >= 1500) + ++num1; + if (this.lifeRegenTime >= 1800) + ++num1; + if (this.lifeRegenTime >= 2400) + ++num1; + if (this.lifeRegenTime >= 3000) + ++num1; + if (flag) + { + float num2 = (float) (this.lifeRegenTime - 3000) / 300f; + if ((double) num2 > 0.0) + { + if ((double) num2 > 30.0) + num2 = 30f; + num1 += num2; + } + } + else if (this.lifeRegenTime >= 3600) + { + ++num1; + this.lifeRegenTime = 3600; + } + if (this.sitting.isSitting || this.sleeping.isSleeping) + { + this.lifeRegenTime += 10; + num1 *= 1.5f; + } + float num3 = (double) this.velocity.X == 0.0 || this.grappling[0] > 0 ? num1 * 1.25f : num1 * 0.5f; + if (this.crimsonRegen) + num3 *= 1.5f; + if (this.shinyStone) + num3 *= 1.1f; + if (this.whoAmI == Main.myPlayer && Main.SceneMetrics.HasCampfire) + num3 *= 1.1f; + if (Main.expertMode && !this.wellFed) + { + if (this.shinyStone) + num3 *= 0.75f; + else + num3 /= 2f; + } + if (this.rabid) + { + if (this.shinyStone) + num3 *= 0.75f; + else + num3 /= 2f; + } + float num4 = (float) ((double) this.statLifeMax2 / 400.0 * 0.850000023841858 + 0.150000005960464); + this.lifeRegen += (int) Math.Round((double) (num3 * num4)); + this.lifeRegenCount += this.lifeRegen; + if (this.palladiumRegen) + this.lifeRegenCount += 6; + if (flag && this.lifeRegen > 0 && this.statLife < this.statLifeMax2) + { + ++this.lifeRegenCount; + if (flag && (Main.rand.Next(30000) < this.lifeRegenTime || Main.rand.Next(30) == 0)) + { + int index = Dust.NewDust(this.position, this.width, this.height, 55, Alpha: 200, Scale: 0.5f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.75f; + Main.dust[index].fadeIn = 1.3f; + Vector2 vector2_1 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + vector2_1.Normalize(); + Vector2 vector2_2 = vector2_1 * ((float) Main.rand.Next(50, 100) * 0.04f); + Main.dust[index].velocity = vector2_2; + vector2_2.Normalize(); + Vector2 vector2_3 = vector2_2 * 34f; + Main.dust[index].position = this.Center - vector2_3; + } + } + while (this.lifeRegenCount >= 120) + { + this.lifeRegenCount -= 120; + if (this.statLife < this.statLifeMax2) + { + ++this.statLife; + if (this.crimsonRegen) + { + for (int index1 = 0; index1 < 10; ++index1) + { + int index2 = Dust.NewDust(this.position, this.width, this.height, 5, Alpha: 175, Scale: 1.75f); + Main.dust[index2].noGravity = true; + Main.dust[index2].velocity *= 0.75f; + int num5 = Main.rand.Next(-40, 41); + int num6 = Main.rand.Next(-40, 41); + Main.dust[index2].position.X += (float) num5; + Main.dust[index2].position.Y += (float) num6; + Main.dust[index2].velocity.X = (float) -num5 * 0.075f; + Main.dust[index2].velocity.Y = (float) -num6 * 0.075f; + } + } + } + if (this.statLife > this.statLifeMax2) + this.statLife = this.statLifeMax2; + } + if (this.burned || this.suffocating || this.tongued && Main.expertMode) + { + while (this.lifeRegenCount <= -600) + { + this.lifeRegenCount += 600; + this.statLife -= 5; + CombatText.NewText(new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height), CombatText.LifeRegen, 5, dot: true); + if (this.statLife <= 0 && this.whoAmI == Main.myPlayer) + { + if (this.suffocating) + this.KillMe(PlayerDeathReason.ByOther(7), 10.0, 0); + else + this.KillMe(PlayerDeathReason.ByOther(8), 10.0, 0); + } + } + } + else + { + while (this.lifeRegenCount <= -120) + { + if (this.lifeRegenCount <= -480) + { + this.lifeRegenCount += 480; + this.statLife -= 4; + CombatText.NewText(new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height), CombatText.LifeRegen, 4, dot: true); + } + else if (this.lifeRegenCount <= -360) + { + this.lifeRegenCount += 360; + this.statLife -= 3; + CombatText.NewText(new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height), CombatText.LifeRegen, 3, dot: true); + } + else if (this.lifeRegenCount <= -240) + { + this.lifeRegenCount += 240; + this.statLife -= 2; + CombatText.NewText(new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height), CombatText.LifeRegen, 2, dot: true); + } + else + { + this.lifeRegenCount += 120; + --this.statLife; + CombatText.NewText(new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height), CombatText.LifeRegen, 1, dot: true); + } + if (this.statLife <= 0 && this.whoAmI == Main.myPlayer) + { + if (this.poisoned || this.venom) + this.KillMe(PlayerDeathReason.ByOther(9), 10.0, 0); + else if (this.electrified) + this.KillMe(PlayerDeathReason.ByOther(10), 10.0, 0); + else + this.KillMe(PlayerDeathReason.ByOther(8), 10.0, 0); + } + } + } + } + + public void UpdateManaRegen() + { + if (this.nebulaLevelMana > 0) + { + int num = 6; + this.nebulaManaCounter += this.nebulaLevelMana; + if (this.nebulaManaCounter >= num) + { + this.nebulaManaCounter -= num; + ++this.statMana; + if (this.statMana >= this.statManaMax2) + this.statMana = this.statManaMax2; + } + } + else + this.nebulaManaCounter = 0; + if (this.manaRegenDelay > 0) + { + --this.manaRegenDelay; + this.manaRegenDelay -= this.manaRegenDelayBonus; + if ((double) this.velocity.X == 0.0 && (double) this.velocity.Y == 0.0 || this.grappling[0] >= 0 || this.manaRegenBuff) + --this.manaRegenDelay; + } + if (this.manaRegenBuff && this.manaRegenDelay > 20) + this.manaRegenDelay = 20; + if (this.manaRegenDelay <= 0) + { + this.manaRegenDelay = 0; + this.manaRegen = this.statManaMax2 / 7 + 1 + this.manaRegenBonus; + if ((double) this.velocity.X == 0.0 && (double) this.velocity.Y == 0.0 || this.grappling[0] >= 0 || this.manaRegenBuff) + this.manaRegen += this.statManaMax2 / 2; + float num = (float) ((double) this.statMana / (double) this.statManaMax2 * 0.800000011920929 + 0.200000002980232); + if (this.manaRegenBuff) + num = 1f; + this.manaRegen = (int) ((double) this.manaRegen * (double) num * 1.15); + } + else + this.manaRegen = 0; + this.manaRegenCount += this.manaRegen; + while (this.manaRegenCount >= 120) + { + bool flag = false; + this.manaRegenCount -= 120; + if (this.statMana < this.statManaMax2) + { + ++this.statMana; + flag = true; + } + if (this.statMana >= this.statManaMax2) + { + if (this.whoAmI == Main.myPlayer & flag) + { + SoundEngine.PlaySound(25); + for (int index1 = 0; index1 < 5; ++index1) + { + int index2 = Dust.NewDust(this.position, this.width, this.height, 45, Alpha: ((int) byte.MaxValue), Scale: ((float) Main.rand.Next(20, 26) * 0.1f)); + Main.dust[index2].noLight = true; + Main.dust[index2].noGravity = true; + Main.dust[index2].velocity *= 0.5f; + } + } + this.statMana = this.statManaMax2; + } + } + } + + public void UpdateJumpHeight() + { + if (this.mount.Active) + { + Player.jumpHeight = this.mount.JumpHeight(this.velocity.X); + Player.jumpSpeed = this.mount.JumpSpeed(this.velocity.X); + } + else + { + if (this.jumpBoost) + { + Player.jumpHeight = 20; + Player.jumpSpeed = 6.51f; + } + if (this.empressBrooch) + this.jumpSpeedBoost += 2.4f; + if (this.frogLegJumpBoost) + { + this.jumpSpeedBoost += 2.4f; + this.extraFall += 15; + } + if (this.moonLordLegs) + { + this.jumpSpeedBoost += 1.8f; + this.extraFall += 10; + ++Player.jumpHeight; + } + if (this.wereWolf) + { + Player.jumpHeight += 2; + Player.jumpSpeed += 0.2f; + } + if (this.portableStoolInfo.IsInUse) + Player.jumpHeight += 5; + Player.jumpSpeed += this.jumpSpeedBoost; + } + if (this.sticky) + { + Player.jumpHeight /= 10; + Player.jumpSpeed /= 5f; + } + if (!this.dazed) + return; + Player.jumpHeight /= 5; + Player.jumpSpeed /= 2f; + } + + public void FindPulley() + { + if (this.portableStoolInfo.IsInUse || !this.controlUp && !this.controlDown) + return; + int index1 = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int index2 = (int) ((double) this.position.Y - 8.0) / 16; + if (Main.tile[index1, index2] == null || !Main.tile[index1, index2].active() || !Main.tileRope[(int) Main.tile[index1, index2].type]) + return; + float num1 = this.position.Y; + if (Main.tile[index1, index2 - 1] == null) + Main.tile[index1, index2 - 1] = new Tile(); + if (Main.tile[index1, index2 + 1] == null) + Main.tile[index1, index2 + 1] = new Tile(); + if ((!Main.tile[index1, index2 - 1].active() || !Main.tileRope[(int) Main.tile[index1, index2 - 1].type]) && (!Main.tile[index1, index2 + 1].active() || !Main.tileRope[(int) Main.tile[index1, index2 + 1].type])) + num1 = (float) (index2 * 16 + 22); + float x1 = (float) (index1 * 16 + 8 - this.width / 2 + 6 * this.direction); + int num2 = index1 * 16 + 8 - this.width / 2 + 6; + int num3 = index1 * 16 + 8 - this.width / 2; + int num4 = index1 * 16 + 8 - this.width / 2 - 6; + int num5 = 1; + float num6 = Math.Abs(this.position.X - (float) num2); + if ((double) Math.Abs(this.position.X - (float) num3) < (double) num6) + { + num5 = 2; + num6 = Math.Abs(this.position.X - (float) num3); + } + if ((double) Math.Abs(this.position.X - (float) num4) < (double) num6) + { + num5 = 3; + Math.Abs(this.position.X - (float) num4); + } + if (num5 == 1) + { + x1 = (float) num2; + this.pulleyDir = (byte) 2; + this.direction = 1; + } + if (num5 == 2) + { + x1 = (float) num3; + this.pulleyDir = (byte) 1; + } + if (num5 == 3) + { + x1 = (float) num4; + this.pulleyDir = (byte) 2; + this.direction = -1; + } + if (!Collision.SolidCollision(new Vector2(x1, this.position.Y), this.width, this.height)) + { + if (this.whoAmI == Main.myPlayer) + Main.cameraX = Main.cameraX + this.position.X - x1; + this.pulley = true; + this.position.X = x1; + this.gfxOffY = this.position.Y - num1; + this.stepSpeed = 2.5f; + this.position.Y = num1; + this.velocity.X = 0.0f; + } + else + { + float x2 = (float) num2; + this.pulleyDir = (byte) 2; + this.direction = 1; + if (!Collision.SolidCollision(new Vector2(x2, this.position.Y), this.width, this.height)) + { + if (this.whoAmI == Main.myPlayer) + Main.cameraX = Main.cameraX + this.position.X - x2; + this.pulley = true; + this.position.X = x2; + this.gfxOffY = this.position.Y - num1; + this.stepSpeed = 2.5f; + this.position.Y = num1; + this.velocity.X = 0.0f; + } + else + { + float x3 = (float) num4; + this.pulleyDir = (byte) 2; + this.direction = -1; + if (Collision.SolidCollision(new Vector2(x3, this.position.Y), this.width, this.height)) + return; + if (this.whoAmI == Main.myPlayer) + Main.cameraX = Main.cameraX + this.position.X - x3; + this.pulley = true; + this.position.X = x3; + this.gfxOffY = this.position.Y - num1; + this.stepSpeed = 2.5f; + this.position.Y = num1; + this.velocity.X = 0.0f; + } + } + } + + public void HorizontalMovement() + { + if (this.chilled) + this.accRunSpeed = this.maxRunSpeed; + bool flag1 = (this.itemAnimation == 0 || this.inventory[this.selectedItem].useTurn) && this.mount.AllowDirectionChange; + bool flag2 = this.controlLeft || this.controlRight; + float num1 = (float) (((double) this.accRunSpeed + (double) this.maxRunSpeed) / 2.0); + float num2 = 0.0f; + bool flag3 = false; + if (flag2 && this.mount.Active && this.mount.Type == 43 && (double) this.velocity.Y == 0.0 && !this.controlJump) + { + SoundEngine.PlaySound(SoundID.Item168, this.Center); + float num3 = (float) ((double) Player.jumpSpeed * (double) this.gravDir * 0.5); + if ((double) num3 < 2.0) + num3 = 2f; + this.velocity.Y = -(num3 + 0.01f); + this.jump = Player.jumpHeight; + this.fullRotation = 0.0f; + } + else + { + if (this.windPushed && !this.isLockedToATile && ((!this.mount.Active ? 0 : ((double) this.velocity.Y == 0.0 ? 1 : 0)) & (flag2 ? 1 : 0)) == 0) + { + num2 = (float) Math.Sign(Main.windSpeedCurrent) * 0.06f; + if ((double) Math.Abs(Main.windSpeedCurrent) > 0.5) + num2 *= 1.37f; + if ((double) this.velocity.Y != 0.0) + num2 *= 1.5f; + if (flag2) + { + float num4 = num2 * 0.8f; + float max = 0.072f; + num2 = MathHelper.Clamp(num4, -max, max); + } + flag3 = true; + if (Math.Sign(this.direction) != Math.Sign(num2)) + num1 -= Math.Abs(num2) * 40f; + } + if ((double) this.trackBoost != 0.0) + { + this.velocity.X += this.trackBoost; + this.trackBoost = 0.0f; + if ((double) this.velocity.X < 0.0) + { + if ((double) this.velocity.X < -(double) this.maxRunSpeed) + this.velocity.X = -this.maxRunSpeed; + } + else if ((double) this.velocity.X > (double) this.maxRunSpeed) + this.velocity.X = this.maxRunSpeed; + } + if (this.controlLeft && (double) this.velocity.X > -(double) this.maxRunSpeed) + { + if (!this.mount.Active || !this.mount.Cart || (double) this.velocity.Y == 0.0) + { + if ((double) this.velocity.X > (double) this.runSlowdown) + this.velocity.X -= this.runSlowdown; + this.velocity.X -= this.runAcceleration; + } + if (this.onWrongGround) + { + if ((double) this.velocity.X < -(double) this.runSlowdown) + this.velocity.X += this.runSlowdown; + else + this.velocity.X = 0.0f; + } + if (this.mount.Active && this.mount.Cart && !this.onWrongGround) + { + if ((double) this.velocity.X < 0.0 & flag1) + this.direction = -1; + else if (this.itemAnimation <= 0 && (double) this.velocity.Y == 0.0) + { + SoundEngine.PlaySound(SoundID.Item55, (int) this.position.X + this.width / 2, (int) this.position.Y + this.height / 2); + DelegateMethods.Minecart.rotation = this.fullRotation; + DelegateMethods.Minecart.rotationOrigin = this.fullRotationOrigin; + if ((double) Math.Abs(this.velocity.X) > (double) this.maxRunSpeed * 0.66) + { + if (Main.rand.Next(2) == 0) + Minecart.WheelSparks(this.mount.Delegations.MinecartDust, this.position + this.velocity * 0.66f, this.width, this.height, 1); + if (Main.rand.Next(2) == 0) + Minecart.WheelSparks(this.mount.Delegations.MinecartDust, this.position + this.velocity * 0.33f, this.width, this.height, 1); + if (Main.rand.Next(2) == 0) + Minecart.WheelSparks(this.mount.Delegations.MinecartDust, this.position, this.width, this.height, 1); + } + else if ((double) Math.Abs(this.velocity.X) > (double) this.maxRunSpeed * 0.33) + { + if (Main.rand.Next(3) != 0) + Minecart.WheelSparks(this.mount.Delegations.MinecartDust, this.position + this.velocity * 0.5f, this.width, this.height, 1); + if (Main.rand.Next(3) != 0) + Minecart.WheelSparks(this.mount.Delegations.MinecartDust, this.position, this.width, this.height, 1); + } + else + Minecart.WheelSparks(this.mount.Delegations.MinecartDust, this.position, this.width, this.height, 1); + } + } + else if (!this.sandStorm && (this.itemAnimation == 0 || this.inventory[this.selectedItem].useTurn) && this.mount.AllowDirectionChange) + this.direction = -1; + } + else if (this.controlRight && (double) this.velocity.X < (double) this.maxRunSpeed) + { + if (!this.mount.Active || !this.mount.Cart || (double) this.velocity.Y == 0.0) + { + if ((double) this.velocity.X < -(double) this.runSlowdown) + this.velocity.X += this.runSlowdown; + this.velocity.X += this.runAcceleration; + } + if (this.onWrongGround) + { + if ((double) this.velocity.X > (double) this.runSlowdown) + this.velocity.X -= this.runSlowdown; + else + this.velocity.X = 0.0f; + } + if (this.mount.Active && this.mount.Cart && !this.onWrongGround) + { + if ((double) this.velocity.X > 0.0 & flag1) + this.direction = 1; + else if (this.itemAnimation <= 0 && (double) this.velocity.Y == 0.0) + { + SoundEngine.PlaySound(SoundID.Item55, (int) this.position.X + this.width / 2, (int) this.position.Y + this.height / 2); + DelegateMethods.Minecart.rotation = this.fullRotation; + DelegateMethods.Minecart.rotationOrigin = this.fullRotationOrigin; + if ((double) Math.Abs(this.velocity.X) > (double) this.maxRunSpeed * 0.66) + { + if (Main.rand.Next(2) == 0) + Minecart.WheelSparks(this.mount.Delegations.MinecartDust, this.position + this.velocity * 0.66f, this.width, this.height, 1); + if (Main.rand.Next(2) == 0) + Minecart.WheelSparks(this.mount.Delegations.MinecartDust, this.position + this.velocity * 0.33f, this.width, this.height, 1); + if (Main.rand.Next(2) == 0) + Minecart.WheelSparks(this.mount.Delegations.MinecartDust, this.position, this.width, this.height, 1); + } + else if ((double) Math.Abs(this.velocity.X) > (double) this.maxRunSpeed * 0.33) + { + if (Main.rand.Next(3) != 0) + Minecart.WheelSparks(this.mount.Delegations.MinecartDust, this.position + this.velocity * 0.5f, this.width, this.height, 1); + if (Main.rand.Next(3) != 0) + Minecart.WheelSparks(this.mount.Delegations.MinecartDust, this.position, this.width, this.height, 1); + } + else + Minecart.WheelSparks(this.mount.Delegations.MinecartDust, this.position, this.width, this.height, 1); + } + } + else if (!this.sandStorm && (this.itemAnimation == 0 || this.inventory[this.selectedItem].useTurn) && this.mount.AllowDirectionChange) + this.direction = 1; + } + else if (this.controlLeft && (double) this.velocity.X > -(double) this.accRunSpeed && this.dashDelay >= 0) + { + if (this.mount.Active && this.mount.Cart) + { + if ((double) this.velocity.X < 0.0) + this.direction = -1; + } + else if ((this.itemAnimation == 0 || this.inventory[this.selectedItem].useTurn) && this.mount.AllowDirectionChange) + this.direction = -1; + if ((double) this.velocity.Y == 0.0 || this.wingsLogic > 0 || this.mount.CanFly()) + { + if ((double) this.velocity.X > (double) this.runSlowdown) + this.velocity.X -= this.runSlowdown; + this.velocity.X -= this.runAcceleration * 0.2f; + if (this.wingsLogic > 0) + this.velocity.X -= this.runAcceleration * 0.2f; + } + if (this.onWrongGround) + { + if ((double) this.velocity.X < (double) this.runSlowdown) + this.velocity.X += this.runSlowdown; + else + this.velocity.X = 0.0f; + } + if ((double) this.velocity.X < -(double) num1 && (double) this.velocity.Y == 0.0 && !this.mount.Active) + this.SpawnFastRunParticles(); + } + else if (this.controlRight && (double) this.velocity.X < (double) this.accRunSpeed && this.dashDelay >= 0) + { + if (this.mount.Active && this.mount.Cart) + { + if ((double) this.velocity.X > 0.0) + this.direction = -1; + } + else if ((this.itemAnimation == 0 || this.inventory[this.selectedItem].useTurn) && this.mount.AllowDirectionChange) + this.direction = 1; + if ((double) this.velocity.Y == 0.0 || this.wingsLogic > 0 || this.mount.CanFly()) + { + if ((double) this.velocity.X < -(double) this.runSlowdown) + this.velocity.X += this.runSlowdown; + this.velocity.X += this.runAcceleration * 0.2f; + if (this.wingsLogic > 0) + this.velocity.X += this.runAcceleration * 0.2f; + } + if (this.onWrongGround) + { + if ((double) this.velocity.X > (double) this.runSlowdown) + this.velocity.X -= this.runSlowdown; + else + this.velocity.X = 0.0f; + } + if ((double) this.velocity.X > (double) num1 && (double) this.velocity.Y == 0.0 && !this.mount.Active) + this.SpawnFastRunParticles(); + } + else if (this.mount.Active && this.mount.Cart && (double) Math.Abs(this.velocity.X) >= 1.0) + { + if (this.onWrongGround) + { + if ((double) this.velocity.X > 0.0) + { + if ((double) this.velocity.X > (double) this.runSlowdown) + this.velocity.X -= this.runSlowdown; + else + this.velocity.X = 0.0f; + } + else if ((double) this.velocity.X < 0.0) + { + if ((double) this.velocity.X < -(double) this.runSlowdown) + this.velocity.X += this.runSlowdown; + else + this.velocity.X = 0.0f; + } + } + if ((double) this.velocity.X > (double) this.maxRunSpeed) + this.velocity.X = this.maxRunSpeed; + if ((double) this.velocity.X < -(double) this.maxRunSpeed) + this.velocity.X = -this.maxRunSpeed; + } + else if ((double) this.velocity.Y == 0.0) + { + if ((double) this.velocity.X > (double) this.runSlowdown) + this.velocity.X -= this.runSlowdown; + else if ((double) this.velocity.X < -(double) this.runSlowdown) + this.velocity.X += this.runSlowdown; + else + this.velocity.X = 0.0f; + } + else if (!this.PortalPhysicsEnabled) + { + if ((double) this.velocity.X > (double) this.runSlowdown * 0.5) + this.velocity.X -= this.runSlowdown * 0.5f; + else if ((double) this.velocity.X < -(double) this.runSlowdown * 0.5) + this.velocity.X += this.runSlowdown * 0.5f; + else + this.velocity.X = 0.0f; + } + if (flag3) + { + if ((double) num2 < 0.0 && (double) this.velocity.X > (double) num2) + { + this.velocity.X += num2; + if ((double) this.velocity.X < (double) num2) + this.velocity.X = num2; + } + if ((double) num2 > 0.0 && (double) this.velocity.X < (double) num2) + { + this.velocity.X += num2; + if ((double) this.velocity.X > (double) num2) + this.velocity.X = num2; + } + } + bool flag4 = this.mount.Type == 40 || this.mount.Type == 41 || this.mount.Type == 42; + if (this.mount.Active && ((this.mount.Type == 10 ? 1 : (this.mount.Type == 47 ? 1 : 0)) | (flag4 ? 1 : 0)) != 0 && (double) Math.Abs(this.velocity.X) > (double) this.mount.DashSpeed - (double) this.mount.RunSpeed / 2.0) + { + Microsoft.Xna.Framework.Rectangle rect = this.getRect(); + if (this.direction == 1) + rect.Offset(this.width - 1, 0); + rect.Width = 2; + rect.Inflate(6, 12); + int num5 = 60; + if (flag4) + num5 = 30; + float Damage = (float) num5 * this.meleeDamage; + float Knockback = 10f; + if (flag4) + Knockback = 7f; + int NPCImmuneTime = 30; + int PlayerImmuneTime = 6; + this.CollideWithNPCs(rect, Damage, Knockback, NPCImmuneTime, PlayerImmuneTime); + } + if (this.mount.Active && this.mount.Type == 44 && (double) Math.Abs(this.velocity.X) > (double) this.mount.DashSpeed - (double) this.mount.RunSpeed / 4.0) + { + Microsoft.Xna.Framework.Rectangle rect = this.getRect(); + if (this.direction == 1) + rect.Offset(this.width - 1, 0); + rect.Width = 2; + rect.Inflate(6, 12); + float Damage = 100f * this.minionDamage; + float Knockback = 12f; + int NPCImmuneTime = 30; + int PlayerImmuneTime = 6; + this.CollideWithNPCs(rect, Damage, Knockback, NPCImmuneTime, PlayerImmuneTime); + } + if (this.mount.Active && this.mount.Type == 45 && (double) Math.Abs(this.velocity.X) > (double) this.mount.DashSpeed * 0.899999976158142) + { + Microsoft.Xna.Framework.Rectangle rect = this.getRect(); + if (this.direction == 1) + rect.Offset(this.width - 1, 0); + rect.Width = 2; + rect.Inflate(6, 12); + float Damage = 120f * this.minionDamage; + float Knockback = 12f; + int NPCImmuneTime = 30; + int PlayerImmuneTime = 6; + this.CollideWithNPCs(rect, Damage, Knockback, NPCImmuneTime, PlayerImmuneTime); + } + if (this.mount.Active && this.mount.Type == 14 && (double) Math.Abs(this.velocity.X) > (double) this.mount.RunSpeed / 2.0) + { + Microsoft.Xna.Framework.Rectangle rect = this.getRect(); + if (this.direction == 1) + rect.Offset(this.width - 1, 0); + rect.Width = 2; + rect.Inflate(6, 12); + float Damage = 90f * this.minionDamage; + float Knockback = 10f; + int NPCImmuneTime = 30; + int PlayerImmuneTime = 6; + this.CollideWithNPCs(rect, Damage, Knockback, NPCImmuneTime, PlayerImmuneTime); + } + if (this.mount.Active && this.mount.Type == 17 && (double) Math.Abs(this.velocity.X) > (double) this.mount.RunSpeed / 2.0) + { + Microsoft.Xna.Framework.Rectangle rect = this.getRect(); + if (this.direction == 1) + rect.Offset(this.width - 1, 0); + rect.Width = 2; + rect.Inflate(6, 12); + float Damage = 40f; + float Knockback = 10f; + int NPCImmuneTime = 30; + int PlayerImmuneTime = 12; + this.CollideWithNPCs(rect, Damage, Knockback, NPCImmuneTime, PlayerImmuneTime); + } + this.TryUsingDiggerCart(); + if (this.HeldItem.type != 4049 || this.whoAmI != Main.myPlayer) + return; + this.MowTheLawn(); + } + } + + private void TryUsingDiggerCart() + { + if (this.whoAmI != Main.myPlayer || !this.mount.Active || this.mount.Type != 39 || (double) this.velocity.Y != 0.0) + return; + int num1 = 12; + int num2 = 20; + Vector2 vector2_1 = new Vector2(0.0f, this.gravDir * 10f); + Vector2 vector2_2 = this.RotatedRelativePoint(this.Center + new Vector2((float) (num1 * this.direction), this.gravDir * (float) num2)) + vector2_1; + Tile tileSafely = Framing.GetTileSafely(vector2_2); + if (!tileSafely.active() || tileSafely.type != (ushort) 314) + vector2_2 = this.RotatedRelativePoint(this.Center + new Vector2((float) (num1 * this.direction) * 0.5f, this.gravDir * (float) num2)) + vector2_1; + int digDirectionY = this.controlDown.ToInt() - this.controlUp.ToInt(); + if (this.controlUp.ToInt() + this.controlDown.ToInt() + this.controlLeft.ToInt() + this.controlRight.ToInt() <= 0) + return; + MinecartDiggerHelper.Instance.TryDigging(this, vector2_2, this.direction, digDirectionY); + } + + private void SpawnFastRunParticles() + { + int num = 0; + if ((double) this.gravDir == -1.0) + num -= this.height; + if (this.runSoundDelay == 0 && (double) this.velocity.Y == 0.0) + { + SoundEngine.PlaySound(this.hermesStepSound.SoundType, (int) this.position.X, (int) this.position.Y, this.hermesStepSound.SoundStyle); + this.runSoundDelay = this.hermesStepSound.IntendedCooldown; + } + if (this.wings == 3) + { + int index1 = Dust.NewDust(new Vector2(this.position.X - 4f, this.position.Y + (float) this.height + (float) num), this.width + 8, 4, 186, (float) (-(double) this.velocity.X * 0.5), this.velocity.Y * 0.5f, 50, Scale: 1.5f); + Main.dust[index1].velocity *= 0.025f; + Main.dust[index1].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + int index2 = Dust.NewDust(new Vector2(this.position.X - 4f, this.position.Y + (float) this.height + (float) num), this.width + 8, 4, 186, (float) (-(double) this.velocity.X * 0.5), this.velocity.Y * 0.5f, 50, Scale: 1.5f); + Main.dust[index2].velocity *= 0.2f; + Main.dust[index2].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + else if (this.sailDash) + { + for (int index3 = 0; index3 < 4; ++index3) + { + int index4 = Dust.NewDust(new Vector2(this.position.X - 4f, this.position.Y), this.width + 8, this.height, 253, (float) (-(double) this.velocity.X * 0.5), this.velocity.Y * 0.5f, 100, Scale: 1.5f); + Main.dust[index4].noGravity = true; + Main.dust[index4].velocity.X *= 0.2f; + Main.dust[index4].velocity.Y *= 0.2f; + Main.dust[index4].shader = GameShaders.Armor.GetSecondaryShader(this.cShoe, this); + Main.dust[index4].scale += (float) Main.rand.Next(-5, 3) * 0.1f; + Vector2 vector2 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + vector2.Normalize(); + vector2 *= (float) Main.rand.Next(81) * 0.1f; + } + } + else if (this.desertDash) + { + Dust dust = Dust.NewDustDirect(new Vector2(this.position.X - 4f, this.position.Y + (float) this.height + (float) num), this.width + 8, 4, 32, (float) (-(double) this.velocity.X * 0.5), this.velocity.Y * 0.5f); + dust.velocity *= 0.2f; + dust.velocity.Y -= this.gravDir * 2f; + dust.shader = GameShaders.Armor.GetSecondaryShader(this.cShoe, this); + } + else if (this.coldDash) + { + for (int index5 = 0; index5 < 2; ++index5) + { + int index6 = index5 != 0 ? Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2), this.position.Y + (float) this.height + this.gfxOffY), this.width / 2, 6, 76, Scale: 1.35f) : Dust.NewDust(new Vector2(this.position.X, this.position.Y + (float) this.height + this.gfxOffY), this.width / 2, 6, 76, Scale: 1.35f); + Main.dust[index6].scale *= (float) (1.0 + (double) Main.rand.Next(20, 40) * 0.00999999977648258); + Main.dust[index6].noGravity = true; + Main.dust[index6].noLight = true; + Main.dust[index6].velocity *= 1f / 1000f; + Main.dust[index6].velocity.Y -= 3f / 1000f; + Main.dust[index6].shader = GameShaders.Armor.GetSecondaryShader(this.cShoe, this); + } + } + else if (this.fairyBoots) + { + int Type = (int) Main.rand.NextFromList((short) 61, (short) 61, (short) 61, (short) 242, (short) 64, (short) 63); + int Alpha = 0; + for (int index7 = 1; index7 < 3; ++index7) + { + float Scale = 1.5f; + if (index7 == 2) + Scale = 1f; + int index8 = Dust.NewDust(new Vector2(this.position.X - 4f, this.position.Y + (float) this.height + (float) num), this.width + 8, 4, Type, (float) (-(double) this.velocity.X * 0.5), this.velocity.Y * 0.5f, Alpha, Scale: Scale); + Main.dust[index8].velocity *= 1.5f; + if (index7 == 2) + Main.dust[index8].position += Main.dust[index8].velocity; + Main.dust[index8].noGravity = true; + Main.dust[index8].noLightEmittence = true; + Main.dust[index8].shader = GameShaders.Armor.GetSecondaryShader(this.cShoe, this); + } + } + else + { + int index = Dust.NewDust(new Vector2(this.position.X - 4f, this.position.Y + (float) this.height + (float) num), this.width + 8, 4, 16, (float) (-(double) this.velocity.X * 0.5), this.velocity.Y * 0.5f, 50, Scale: 1.5f); + Main.dust[index].velocity.X *= 0.2f; + Main.dust[index].velocity.Y *= 0.2f; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.cShoe, this); + } + } + + private void MowTheLawn() + { + if (this.miscCounter % 2 != 0 || (double) this.velocity.Y != 0.0 || this.grappling[0] != -1 || this.itemAnimation < 1) + return; + Vector2 vector2 = this.Center + new Vector2((float) (this.direction * 38), (float) (this.height / 2 + 4) * this.gravDir); + float num = (float) (1.0 - (double) this.itemAnimation / (double) this.itemAnimationMax) * 2f; + float amount = (double) num >= 1.0 ? num - 1f : 1f - num; + Dust dust = Dust.NewDustDirect(Vector2.Lerp(vector2 + new Vector2((float) (this.direction * -16), this.gravDir * -4f), vector2 + new Vector2((float) (this.direction * -6), this.gravDir * -4f), amount), 0, 0, 31, SpeedY: ((float) (-(double) this.gravDir * 0.25)), Alpha: ((int) sbyte.MaxValue)); + dust.scale = 0.9f; + dust.position -= new Vector2(4f); + if ((double) dust.velocity.Y > 0.0) + dust.velocity.Y *= -1f; + dust.velocity *= 0.25f; + Microsoft.Xna.Framework.Rectangle itemRectangle = Utils.CenteredRectangle(vector2, new Vector2(8f, 20f)); + if ((double) this.velocity.X * (double) this.direction > 0.0 || (double) this.velocity.Y * (double) this.gravDir > 0.0) + { + Microsoft.Xna.Framework.Rectangle myRect = itemRectangle; + myRect.Height -= 4; + myRect.Y += 2; + float Damage = 8f; + float Knockback = 2f; + int NPCImmuneTime = 12; + int PlayerImmuneTime = 6; + this.CollideWithNPCs(myRect, Damage, Knockback, NPCImmuneTime, PlayerImmuneTime); + } + itemRectangle.X -= this.direction * 10; + List tileCutIgnoreList = Player.ItemCheck_GetTileCutIgnoreList(this.HeldItem); + Player.ItemCheck_CutTiles(this.HeldItem, itemRectangle, tileCutIgnoreList); + this.MowGrassTile(vector2); + if (WorldGen.SolidTile(Framing.GetTileSafely(vector2.ToTileCoordinates()))) + return; + this.MowGrassTile(vector2 + new Vector2(0.0f, 16f * this.gravDir)); + } + + private void MowGrassTile(Vector2 thePos) + { + Point tileCoordinates = thePos.ToTileCoordinates(); + Tile tileCache = Main.tile[tileCoordinates.X, tileCoordinates.Y]; + if (tileCache == null || !WorldGen.CanKillTile(tileCoordinates.X, tileCoordinates.Y, WorldGen.SpecialKillTileContext.MowingTheGrass)) + return; + ushort num = 0; + switch (tileCache.type) + { + case 2: + num = (ushort) 477; + break; + case 109: + num = (ushort) 492; + break; + } + if (num == (ushort) 0) + return; + int tileDustAmount = WorldGen.KillTile_GetTileDustAmount(true, tileCache); + for (int index = 0; index < tileDustAmount; ++index) + WorldGen.KillTile_MakeTileDust(tileCoordinates.X, tileCoordinates.Y, tileCache); + tileCache.type = num; + if (Main.netMode != 1) + return; + NetMessage.SendTileSquare(-1, tileCoordinates.X, tileCoordinates.Y, 1); + } + + private int CollideWithNPCs( + Microsoft.Xna.Framework.Rectangle myRect, + float Damage, + float Knockback, + int NPCImmuneTime, + int PlayerImmuneTime) + { + int num = 0; + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[this.whoAmI] == 0 && this.CanNPCBeHitByPlayerOrPlayerProjectile(npc)) + { + Microsoft.Xna.Framework.Rectangle rect = npc.getRect(); + if (myRect.Intersects(rect) && (npc.noTileCollide || Collision.CanHit(this.position, this.width, this.height, npc.position, npc.width, npc.height))) + { + int direction = this.direction; + if ((double) this.velocity.X < 0.0) + direction = -1; + if ((double) this.velocity.X > 0.0) + direction = 1; + if (this.whoAmI == Main.myPlayer) + this.ApplyDamageToNPC(npc, (int) Damage, Knockback, direction, false); + npc.immune[this.whoAmI] = NPCImmuneTime; + this.GiveImmuneTimeForCollisionAttack(PlayerImmuneTime); + ++num; + break; + } + } + } + return num; + } + + public void ApplyDamageToNPC(NPC npc, int damage, float knockback, int direction, bool crit) + { + int num1 = Item.NPCtoBanner(npc.BannerID()); + if (num1 > 0 && this.HasNPCBannerBuff(num1)) + damage = !Main.expertMode ? (int) ((double) damage * (double) ItemID.Sets.BannerStrength[Item.BannerToItem(num1)].NormalDamageDealt) : (int) ((double) damage * (double) ItemID.Sets.BannerStrength[Item.BannerToItem(num1)].ExpertDamageDealt); + this.OnHit(npc.Center.X, npc.Center.Y, (Entity) npc); + if (this.armorPenetration > 0) + damage += npc.checkArmorPenetration(this.armorPenetration); + int dmg = (int) npc.StrikeNPC(damage, knockback, direction, crit); + if (this.accDreamCatcher) + this.addDPS(dmg); + if (Main.netMode != 0) + NetMessage.SendData(28, number: npc.whoAmI, number2: ((float) damage), number3: knockback, number4: ((float) direction), number5: crit.ToInt()); + int num2 = Item.NPCtoBanner(npc.BannerID()); + if (num2 < 0) + return; + this.lastCreatureHit = num2; + } + + public bool SlimeDontHyperJump => this.mount.Active && this.mount.IsConsideredASlimeMount && this.wetSlime > (byte) 0 && !this.controlJump; + + public void GiveImmuneTimeForCollisionAttack(int time) + { + if (this._timeSinceLastImmuneGet <= 20) + ++this._immuneStrikes; + else + this._immuneStrikes = 1; + this._timeSinceLastImmuneGet = 0; + if (this._immuneStrikes >= 3 || this.immune && this.immuneTime > time) + return; + this.immune = true; + this.immuneNoBlink = true; + this.immuneTime = time; + } + + public bool CanNPCBeHitByPlayerOrPlayerProjectile(NPC npc) => !this.dontHurtCritters || !NPCID.Sets.CountsAsCritter[npc.type]; + + public void JumpMovement() + { + if (this.mount.Active && this.mount.IsConsideredASlimeMount && this.wetSlime == (byte) 0 && (double) this.velocity.Y > 0.0) + { + Microsoft.Xna.Framework.Rectangle rect1 = this.getRect(); + rect1.Offset(0, this.height - 1); + rect1.Height = 2; + rect1.Inflate(12, 6); + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[this.whoAmI] == 0 && this.CanNPCBeHitByPlayerOrPlayerProjectile(npc)) + { + Microsoft.Xna.Framework.Rectangle rect2 = npc.getRect(); + if (rect1.Intersects(rect2) && (npc.noTileCollide || Collision.CanHit(this.position, this.width, this.height, npc.position, npc.width, npc.height))) + { + float num = 40f * this.minionDamage; + float knockback = 5f; + int direction = this.direction; + if ((double) this.velocity.X < 0.0) + direction = -1; + if ((double) this.velocity.X > 0.0) + direction = 1; + if (this.whoAmI == Main.myPlayer) + this.ApplyDamageToNPC(npc, (int) num, knockback, direction, false); + npc.immune[this.whoAmI] = 10; + this.velocity.Y = -10f; + this.GiveImmuneTimeForCollisionAttack(6); + break; + } + } + } + } + if (this.mount.Active && this.mount.Type == 17 && (double) this.velocity.Y > 0.0) + { + Microsoft.Xna.Framework.Rectangle rect3 = this.getRect(); + rect3.Offset(0, this.height - 1); + rect3.Height = 2; + rect3.Inflate(12, 6); + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[this.whoAmI] == 0 && this.CanNPCBeHitByPlayerOrPlayerProjectile(npc)) + { + Microsoft.Xna.Framework.Rectangle rect4 = npc.getRect(); + if (rect3.Intersects(rect4) && (npc.noTileCollide || Collision.CanHit(this.position, this.width, this.height, npc.position, npc.width, npc.height))) + { + float num = 40f; + float knockback = 5f; + int direction = this.direction; + if ((double) this.velocity.X < 0.0) + direction = -1; + if ((double) this.velocity.X > 0.0) + direction = 1; + if (this.whoAmI == Main.myPlayer) + this.ApplyDamageToNPC(npc, (int) num, knockback, direction, false); + npc.immune[this.whoAmI] = 12; + this.GiveImmuneTimeForCollisionAttack(12); + break; + } + } + } + } + if (this.controlJump) + { + if (this.sliding) + this.autoJump = false; + bool flag1 = false; + bool flag2 = this.wet && this.accFlipper; + bool flag3 = !this.mount.Active || !this.mount.Cart; + if (this.mount.Active && this.mount.IsConsideredASlimeMount && this.wetSlime > (byte) 0) + { + this.wetSlime = (byte) 0; + flag1 = true; + } + if (this.mount.Active && this.mount.Type == 43 && this.releaseJump && (double) this.velocity.Y != 0.0) + this.isPerformingPogostickTricks = true; + if (this.jump > 0) + { + if ((double) this.velocity.Y == 0.0) + { + this.jump = 0; + } + else + { + this.velocity.Y = -Player.jumpSpeed * this.gravDir; + if (this.merman && (!this.mount.Active || !this.mount.Cart)) + { + if (this.swimTime <= 10) + this.swimTime = 30; + } + else + --this.jump; + } + } + else if ((((this.sliding ? 1 : ((double) this.velocity.Y == 0.0 ? 1 : 0)) | (flag1 ? 1 : 0)) != 0 || this.canJumpAgain_Cloud || this.canJumpAgain_Sandstorm || this.canJumpAgain_Blizzard || this.canJumpAgain_Fart || this.canJumpAgain_Sail || this.canJumpAgain_Unicorn || this.canJumpAgain_Santank || this.canJumpAgain_WallOfFleshGoat || this.canJumpAgain_Basilisk || flag2 & flag3) && (this.releaseJump || this.autoJump && ((double) this.velocity.Y == 0.0 || this.sliding))) + { + if (this.mount.Active && MountID.Sets.Cart[this.mount.Type]) + this.position.Y -= 1f / 1000f; + if (this.sliding || (double) this.velocity.Y == 0.0) + this.justJumped = true; + bool flag4 = false; + if (this.wet && this.accFlipper) + { + if (this.swimTime == 0) + this.swimTime = 30; + flag4 = true; + } + bool flag5 = false; + bool flag6 = false; + bool flag7 = false; + bool flag8 = false; + bool flag9 = false; + bool flag10 = false; + bool flag11 = false; + bool flag12 = false; + if (!flag2 && !flag1) + { + if (this.canJumpAgain_Basilisk) + { + flag12 = true; + this.canJumpAgain_Basilisk = false; + } + if (this.canJumpAgain_WallOfFleshGoat) + { + flag11 = true; + this.canJumpAgain_WallOfFleshGoat = false; + } + else if (this.canJumpAgain_Santank) + { + flag10 = true; + this.canJumpAgain_Santank = false; + } + else if (this.canJumpAgain_Unicorn) + { + flag9 = true; + this.canJumpAgain_Unicorn = false; + } + else if (this.canJumpAgain_Sandstorm) + { + flag5 = true; + this.canJumpAgain_Sandstorm = false; + } + else if (this.canJumpAgain_Blizzard) + { + flag6 = true; + this.canJumpAgain_Blizzard = false; + } + else if (this.canJumpAgain_Fart) + { + this.canJumpAgain_Fart = false; + flag7 = true; + } + else if (this.canJumpAgain_Sail) + { + this.canJumpAgain_Sail = false; + flag8 = true; + } + else + this.canJumpAgain_Cloud = false; + } + this.canRocket = false; + this.rocketRelease = false; + if (((double) this.velocity.Y == 0.0 || this.sliding ? 1 : (!this.autoJump ? 0 : (this.justJumped ? 1 : 0))) != 0) + this.RefreshDoubleJumps(); + if ((((double) this.velocity.Y == 0.0 | flag4 ? 1 : (this.sliding ? 1 : 0)) | (flag1 ? 1 : 0)) != 0) + { + if (this.mount.Active && this.mount.Type == 43) + SoundEngine.PlaySound(SoundID.Item168, this.Center); + this.velocity.Y = -Player.jumpSpeed * this.gravDir; + this.jump = Player.jumpHeight; + if (this.portableStoolInfo.IsInUse) + { + this.position.Y -= (float) this.portableStoolInfo.HeightBoost; + this.gfxOffY += (float) this.portableStoolInfo.HeightBoost; + } + if (this.sliding) + this.velocity.X = (float) (3 * -this.slideDir); + } + else if (flag5) + { + this.isPerformingJump_Sandstorm = true; + int height = this.height; + double gravDir = (double) this.gravDir; + SoundEngine.PlaySound(16, (int) this.position.X, (int) this.position.Y); + this.velocity.Y = -Player.jumpSpeed * this.gravDir; + this.jump = Player.jumpHeight * 3; + } + else if (flag6) + { + this.isPerformingJump_Blizzard = true; + int height = this.height; + double gravDir = (double) this.gravDir; + SoundEngine.PlaySound(16, (int) this.position.X, (int) this.position.Y); + this.velocity.Y = -Player.jumpSpeed * this.gravDir; + this.jump = (int) ((double) Player.jumpHeight * 1.5); + } + else if (flag8) + { + this.isPerformingJump_Sail = true; + int num = this.height; + if ((double) this.gravDir == -1.0) + num = 0; + SoundEngine.PlaySound(16, (int) this.position.X, (int) this.position.Y); + this.velocity.Y = -Player.jumpSpeed * this.gravDir; + this.jump = (int) ((double) Player.jumpHeight * 1.25); + for (int index1 = 0; index1 < 30; ++index1) + { + int index2 = Dust.NewDust(new Vector2(this.position.X, this.position.Y + (float) num), this.width, 12, 253, this.velocity.X * 0.3f, this.velocity.Y * 0.3f, 100, Scale: 1.5f); + if (index1 % 2 == 0) + Main.dust[index2].velocity.X += (float) Main.rand.Next(30, 71) * 0.1f; + else + Main.dust[index2].velocity.X -= (float) Main.rand.Next(30, 71) * 0.1f; + Main.dust[index2].velocity.Y += (float) Main.rand.Next(-10, 31) * 0.1f; + Main.dust[index2].noGravity = true; + Main.dust[index2].scale += (float) Main.rand.Next(-10, 41) * 0.01f; + Main.dust[index2].velocity *= Main.dust[index2].scale * 0.7f; + Vector2 vector2 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + vector2.Normalize(); + vector2 *= (float) Main.rand.Next(81) * 0.1f; + } + } + else if (flag7) + { + this.isPerformingJump_Fart = true; + int num = this.height; + if ((double) this.gravDir == -1.0) + num = 0; + SoundEngine.PlaySound(SoundID.Item16, this.position); + this.velocity.Y = -Player.jumpSpeed * this.gravDir; + this.jump = Player.jumpHeight * 2; + for (int index3 = 0; index3 < 10; ++index3) + { + int index4 = Dust.NewDust(new Vector2(this.position.X - 34f, (float) ((double) this.position.Y + (double) num - 16.0)), 102, 32, 188, (float) (-(double) this.velocity.X * 0.5), this.velocity.Y * 0.5f, 100, Scale: 1.5f); + Main.dust[index4].velocity.X = (float) ((double) Main.dust[index4].velocity.X * 0.5 - (double) this.velocity.X * 0.100000001490116); + Main.dust[index4].velocity.Y = (float) ((double) Main.dust[index4].velocity.Y * 0.5 - (double) this.velocity.Y * 0.300000011920929); + } + int index5 = Gore.NewGore(new Vector2((float) ((double) this.position.X + (double) (this.width / 2) - 16.0), (float) ((double) this.position.Y + (double) num - 16.0)), new Vector2(-this.velocity.X, -this.velocity.Y), Main.rand.Next(435, 438)); + Main.gore[index5].velocity.X = (float) ((double) Main.gore[index5].velocity.X * 0.100000001490116 - (double) this.velocity.X * 0.100000001490116); + Main.gore[index5].velocity.Y = (float) ((double) Main.gore[index5].velocity.Y * 0.100000001490116 - (double) this.velocity.Y * 0.0500000007450581); + int index6 = Gore.NewGore(new Vector2(this.position.X - 36f, (float) ((double) this.position.Y + (double) num - 16.0)), new Vector2(-this.velocity.X, -this.velocity.Y), Main.rand.Next(435, 438)); + Main.gore[index6].velocity.X = (float) ((double) Main.gore[index6].velocity.X * 0.100000001490116 - (double) this.velocity.X * 0.100000001490116); + Main.gore[index6].velocity.Y = (float) ((double) Main.gore[index6].velocity.Y * 0.100000001490116 - (double) this.velocity.Y * 0.0500000007450581); + int index7 = Gore.NewGore(new Vector2((float) ((double) this.position.X + (double) this.width + 4.0), (float) ((double) this.position.Y + (double) num - 16.0)), new Vector2(-this.velocity.X, -this.velocity.Y), Main.rand.Next(435, 438)); + Main.gore[index7].velocity.X = (float) ((double) Main.gore[index7].velocity.X * 0.100000001490116 - (double) this.velocity.X * 0.100000001490116); + Main.gore[index7].velocity.Y = (float) ((double) Main.gore[index7].velocity.Y * 0.100000001490116 - (double) this.velocity.Y * 0.0500000007450581); + } + else if (flag9) + { + this.isPerformingJump_Unicorn = true; + int height = this.height; + double gravDir = (double) this.gravDir; + SoundEngine.PlaySound(16, (int) this.position.X, (int) this.position.Y); + this.velocity.Y = -Player.jumpSpeed * this.gravDir; + this.jump = Player.jumpHeight * 2; + Vector2 center = this.Center; + Vector2 vector2_1 = new Vector2(50f, 20f); + float num1 = 6.283185f * Main.rand.NextFloat(); + for (int index = 0; index < 5; ++index) + { + for (float num2 = 0.0f; (double) num2 < 14.0; ++num2) + { + Dust dust = Main.dust[Dust.NewDust(center, 0, 0, Utils.SelectRandom(Main.rand, 176, 177, 179))]; + Vector2 vector2_2 = Vector2.UnitY.RotatedBy((double) num2 * 6.28318548202515 / 14.0 + (double) num1) * (0.2f * (float) index); + dust.position = center + vector2_2 * vector2_1; + dust.velocity = vector2_2 + new Vector2(0.0f, this.gravDir * 4f); + dust.noGravity = true; + dust.scale = (float) (1.0 + (double) Main.rand.NextFloat() * 0.800000011920929); + dust.fadeIn = Main.rand.NextFloat() * 2f; + dust.shader = GameShaders.Armor.GetSecondaryShader(this.cMount, this); + } + } + } + else if (flag11) + { + this.isPerformingJump_WallOfFleshGoat = true; + int height = this.height; + double gravDir = (double) this.gravDir; + SoundEngine.PlaySound(16, (int) this.position.X, (int) this.position.Y); + this.velocity.Y = -Player.jumpSpeed * this.gravDir; + this.jump = Player.jumpHeight * 2; + Vector2 center = this.Center; + Vector2 vector2_3 = new Vector2(50f, 20f); + float num3 = 6.283185f * Main.rand.NextFloat(); + for (int index = 0; index < 5; ++index) + { + for (float num4 = 0.0f; (double) num4 < 14.0; ++num4) + { + Dust dust = Main.dust[Dust.NewDust(center, 0, 0, 6)]; + Vector2 vector2_4 = Vector2.UnitY.RotatedBy((double) num4 * 6.28318548202515 / 14.0 + (double) num3) * (0.2f * (float) index); + dust.position = center + vector2_4 * vector2_3; + dust.velocity = vector2_4 + new Vector2(0.0f, this.gravDir * 4f); + dust.noGravity = true; + dust.scale = (float) (1.0 + (double) Main.rand.NextFloat() * 0.800000011920929); + dust.fadeIn = Main.rand.NextFloat() * 2f; + dust.shader = GameShaders.Armor.GetSecondaryShader(this.cMount, this); + } + } + } + else if (flag12) + { + this.isPerformingJump_Basilisk = true; + int height = this.height; + double gravDir = (double) this.gravDir; + SoundEngine.PlaySound(16, (int) this.position.X, (int) this.position.Y); + this.velocity.Y = -Player.jumpSpeed * this.gravDir; + this.jump = (int) ((double) Player.jumpHeight * 0.75); + Vector2 center = this.Center; + Vector2 vector2_5 = new Vector2(50f, 20f); + float num5 = 6.283185f * Main.rand.NextFloat(); + for (int index = 0; index < 5; ++index) + { + for (float num6 = 0.0f; (double) num6 < 14.0; ++num6) + { + Dust dust = Main.dust[Dust.NewDust(center, 0, 0, 31)]; + Vector2 vector2_6 = Vector2.UnitY.RotatedBy((double) num6 * 6.28318548202515 / 14.0 + (double) num5) * (0.2f * (float) index); + dust.position = center + vector2_6 * vector2_5; + dust.velocity = vector2_6 + new Vector2(0.0f, this.gravDir * 4f); + dust.noGravity = true; + dust.scale = (float) (1.0 + (double) Main.rand.NextFloat() * 0.800000011920929); + dust.fadeIn = Main.rand.NextFloat() * 2f; + dust.shader = GameShaders.Armor.GetSecondaryShader(this.cMount, this); + } + } + } + else if (flag10) + { + this.isPerformingJump_Santank = true; + int num = this.height; + if ((double) this.gravDir == -1.0) + num = 0; + SoundEngine.PlaySound(16, (int) this.position.X, (int) this.position.Y); + this.velocity.Y = -Player.jumpSpeed * this.gravDir; + this.jump = Player.jumpHeight * 2; + for (int index8 = 0; index8 < 15; ++index8) + { + int index9 = Dust.NewDust(new Vector2(this.position.X - 34f, (float) ((double) this.position.Y + (double) num - 16.0)), 102, 32, 4, (float) (-(double) this.velocity.X * 0.5), this.velocity.Y * 0.5f, 100, new Color(250, 230, 230, 150), 1.5f); + Main.dust[index9].velocity.X = (float) ((double) Main.dust[index9].velocity.X * 0.5 - (double) this.velocity.X * 0.100000001490116); + Main.dust[index9].velocity.Y = (float) ((double) Main.dust[index9].velocity.Y * 0.5 - (double) this.velocity.Y * 0.300000011920929); + Main.dust[index9].noGravity = true; + int index10 = Dust.NewDust(new Vector2(this.position.X - 34f, (float) ((double) this.position.Y + (double) num - 16.0)), 102, 32, 6, (float) (-(double) this.velocity.X * 0.5), this.velocity.Y * 0.5f, 20, Scale: 1.5f); + --Main.dust[index10].velocity.Y; + if (index8 % 2 == 0) + Main.dust[index10].fadeIn = Main.rand.NextFloat() * 2f; + } + float y = this.Bottom.Y - 22f; + for (int index11 = 0; index11 < 3; ++index11) + { + Vector2 Position = this.Center; + switch (index11) + { + case 0: + Position = new Vector2(this.Center.X - 16f, y); + break; + case 1: + Position = new Vector2(this.position.X - 36f, y); + break; + case 2: + Position = new Vector2(this.Right.X + 4f, y); + break; + } + int index12 = Gore.NewGore(Position, new Vector2(-this.velocity.X, -this.velocity.Y), Main.rand.Next(61, 63)); + Main.gore[index12].velocity *= 0.1f; + Main.gore[index12].velocity.X -= this.velocity.X * 0.1f; + Main.gore[index12].velocity.Y -= this.velocity.Y * 0.05f; + Main.gore[index12].velocity += Main.rand.NextVector2Circular(1f, 1f) * 0.5f; + } + } + else + { + this.isPerformingJump_Cloud = true; + int num = this.height; + if ((double) this.gravDir == -1.0) + num = 0; + SoundEngine.PlaySound(16, (int) this.position.X, (int) this.position.Y); + this.velocity.Y = -Player.jumpSpeed * this.gravDir; + this.jump = (int) ((double) Player.jumpHeight * 0.75); + for (int index13 = 0; index13 < 10; ++index13) + { + int index14 = Dust.NewDust(new Vector2(this.position.X - 34f, (float) ((double) this.position.Y + (double) num - 16.0)), 102, 32, 16, (float) (-(double) this.velocity.X * 0.5), this.velocity.Y * 0.5f, 100, Scale: 1.5f); + Main.dust[index14].velocity.X = (float) ((double) Main.dust[index14].velocity.X * 0.5 - (double) this.velocity.X * 0.100000001490116); + Main.dust[index14].velocity.Y = (float) ((double) Main.dust[index14].velocity.Y * 0.5 - (double) this.velocity.Y * 0.300000011920929); + } + int index15 = Gore.NewGore(new Vector2((float) ((double) this.position.X + (double) (this.width / 2) - 16.0), (float) ((double) this.position.Y + (double) num - 16.0)), new Vector2(-this.velocity.X, -this.velocity.Y), Main.rand.Next(11, 14)); + Main.gore[index15].velocity.X = (float) ((double) Main.gore[index15].velocity.X * 0.100000001490116 - (double) this.velocity.X * 0.100000001490116); + Main.gore[index15].velocity.Y = (float) ((double) Main.gore[index15].velocity.Y * 0.100000001490116 - (double) this.velocity.Y * 0.0500000007450581); + int index16 = Gore.NewGore(new Vector2(this.position.X - 36f, (float) ((double) this.position.Y + (double) num - 16.0)), new Vector2(-this.velocity.X, -this.velocity.Y), Main.rand.Next(11, 14)); + Main.gore[index16].velocity.X = (float) ((double) Main.gore[index16].velocity.X * 0.100000001490116 - (double) this.velocity.X * 0.100000001490116); + Main.gore[index16].velocity.Y = (float) ((double) Main.gore[index16].velocity.Y * 0.100000001490116 - (double) this.velocity.Y * 0.0500000007450581); + int index17 = Gore.NewGore(new Vector2((float) ((double) this.position.X + (double) this.width + 4.0), (float) ((double) this.position.Y + (double) num - 16.0)), new Vector2(-this.velocity.X, -this.velocity.Y), Main.rand.Next(11, 14)); + Main.gore[index17].velocity.X = (float) ((double) Main.gore[index17].velocity.X * 0.100000001490116 - (double) this.velocity.X * 0.100000001490116); + Main.gore[index17].velocity.Y = (float) ((double) Main.gore[index17].velocity.Y * 0.100000001490116 - (double) this.velocity.Y * 0.0500000007450581); + } + } + this.releaseJump = false; + } + else + { + this.jump = 0; + this.releaseJump = true; + this.rocketRelease = true; + } + } + + public void DashMovement() + { + if (this.dashDelay == 0) + this.dash = this.dashType; + if (this.dash == 0) + { + this.dashTime = 0; + this.dashDelay = 0; + } + if (this.dash == 2 && this.eocDash > 0) + { + if (this.eocHit < 0) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) ((double) this.position.X + (double) this.velocity.X * 0.5 - 4.0), (int) ((double) this.position.Y + (double) this.velocity.Y * 0.5 - 4.0), this.width + 8, this.height + 8); + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && !npc.dontTakeDamage && !npc.friendly && (npc.aiStyle != 112 || (double) npc.ai[2] <= 1.0) && this.CanNPCBeHitByPlayerOrPlayerProjectile(npc)) + { + Microsoft.Xna.Framework.Rectangle rect = npc.getRect(); + if (rectangle.Intersects(rect) && (npc.noTileCollide || this.CanHit((Entity) npc))) + { + float num = 30f * this.meleeDamage; + float knockback = 9f; + bool crit = false; + if (this.kbGlove) + knockback *= 2f; + if (this.kbBuff) + knockback *= 1.5f; + if (Main.rand.Next(100) < this.meleeCrit) + crit = true; + int direction = this.direction; + if ((double) this.velocity.X < 0.0) + direction = -1; + if ((double) this.velocity.X > 0.0) + direction = 1; + if (this.whoAmI == Main.myPlayer) + this.ApplyDamageToNPC(npc, (int) num, knockback, direction, crit); + this.eocDash = 10; + this.dashDelay = 30; + this.velocity.X = (float) (-direction * 9); + this.velocity.Y = -4f; + this.GiveImmuneTimeForCollisionAttack(4); + this.eocHit = index; + } + } + } + } + else if ((!this.controlLeft || (double) this.velocity.X >= 0.0) && (!this.controlRight || (double) this.velocity.X <= 0.0)) + this.velocity.X *= 0.95f; + } + if (this.dash == 3 && this.dashDelay < 0 && this.whoAmI == Main.myPlayer) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) ((double) this.position.X + (double) this.velocity.X * 0.5 - 4.0), (int) ((double) this.position.Y + (double) this.velocity.Y * 0.5 - 4.0), this.width + 8, this.height + 8); + for (int index1 = 0; index1 < 200; ++index1) + { + NPC npc = Main.npc[index1]; + if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[this.whoAmI] <= 0 && (npc.aiStyle != 112 || (double) npc.ai[2] <= 1.0) && this.CanNPCBeHitByPlayerOrPlayerProjectile(npc)) + { + Microsoft.Xna.Framework.Rectangle rect = npc.getRect(); + if (rectangle.Intersects(rect) && (npc.noTileCollide || this.CanHit((Entity) npc))) + { + if (!this.solarDashConsumedFlare) + { + this.solarDashConsumedFlare = true; + this.ConsumeSolarFlare(); + } + float num = 150f * this.meleeDamage; + float knockback = 9f; + bool crit = false; + if (this.kbGlove) + knockback *= 2f; + if (this.kbBuff) + knockback *= 1.5f; + if (Main.rand.Next(100) < this.meleeCrit) + crit = true; + int direction = this.direction; + if ((double) this.velocity.X < 0.0) + direction = -1; + if ((double) this.velocity.X > 0.0) + direction = 1; + if (this.whoAmI == Main.myPlayer) + { + this.ApplyDamageToNPC(npc, (int) num, knockback, direction, crit); + int index2 = Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, 0.0f, 608, 150, 15f, Main.myPlayer); + Main.projectile[index2].Kill(); + } + npc.immune[this.whoAmI] = 6; + this.GiveImmuneTimeForCollisionAttack(4); + } + } + } + } + if (this.dashDelay > 0) + { + if (this.eocDash > 0) + --this.eocDash; + if (this.eocDash == 0) + this.eocHit = -1; + --this.dashDelay; + } + else if (this.dashDelay < 0) + { + this.StopVanityActions(); + float num1 = 12f; + float num2 = 0.992f; + float num3 = Math.Max(this.accRunSpeed, this.maxRunSpeed); + float num4 = 0.96f; + int num5 = 20; + if (this.dash == 1) + { + for (int index3 = 0; index3 < 2; ++index3) + { + int index4 = (double) this.velocity.Y != 0.0 ? Dust.NewDust(new Vector2(this.position.X, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width, 16, 31, Alpha: 100, Scale: 1.4f) : Dust.NewDust(new Vector2(this.position.X, (float) ((double) this.position.Y + (double) this.height - 4.0)), this.width, 8, 31, Alpha: 100, Scale: 1.4f); + Main.dust[index4].velocity *= 0.1f; + Main.dust[index4].scale *= (float) (1.0 + (double) Main.rand.Next(20) * 0.00999999977648258); + } + } + else if (this.dash == 2) + { + for (int index5 = 0; index5 < 0; ++index5) + { + int index6 = (double) this.velocity.Y != 0.0 ? Dust.NewDust(new Vector2(this.position.X, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width, 16, 31, Alpha: 100, Scale: 1.4f) : Dust.NewDust(new Vector2(this.position.X, (float) ((double) this.position.Y + (double) this.height - 4.0)), this.width, 8, 31, Alpha: 100, Scale: 1.4f); + Main.dust[index6].velocity *= 0.1f; + Main.dust[index6].scale *= (float) (1.0 + (double) Main.rand.Next(20) * 0.00999999977648258); + } + num2 = 0.985f; + num4 = 0.94f; + num5 = 30; + } + else if (this.dash == 3) + { + for (int index7 = 0; index7 < 4; ++index7) + { + int index8 = Dust.NewDust(new Vector2(this.position.X, this.position.Y + 4f), this.width, this.height - 8, 6, Alpha: 100, Scale: 1.7f); + Main.dust[index8].velocity *= 0.1f; + Main.dust[index8].scale *= (float) (1.0 + (double) Main.rand.Next(20) * 0.00999999977648258); + Main.dust[index8].shader = GameShaders.Armor.GetSecondaryShader(this.ArmorSetDye(), this); + Main.dust[index8].noGravity = true; + if (Main.rand.Next(2) == 0) + Main.dust[index8].fadeIn = 0.5f; + } + num1 = 14f; + num2 = 0.985f; + num4 = 0.94f; + num5 = 20; + } + else if (this.dash == 4) + { + for (int index9 = 0; index9 < 2; ++index9) + { + int index10 = Dust.NewDust(new Vector2(this.position.X, this.position.Y + 4f), this.width, this.height - 8, 229, Alpha: 100, Scale: 1.2f); + Main.dust[index10].velocity *= 0.1f; + Main.dust[index10].scale *= (float) (1.0 + (double) Main.rand.Next(20) * 0.00999999977648258); + Main.dust[index10].noGravity = true; + if (Main.rand.Next(2) == 0) + Main.dust[index10].fadeIn = 0.3f; + } + num2 = 0.985f; + num4 = 0.94f; + num5 = 20; + } + if (this.dash <= 0) + return; + this.doorHelper.AllowOpeningDoorsByVelocityAloneForATime(num5 * 3); + this.vortexStealthActive = false; + if ((double) this.velocity.X > (double) num1 || (double) this.velocity.X < -(double) num1) + this.velocity.X *= num2; + else if ((double) this.velocity.X > (double) num3 || (double) this.velocity.X < -(double) num3) + { + this.velocity.X *= num4; + } + else + { + this.dashDelay = num5; + if ((double) this.velocity.X < 0.0) + { + this.velocity.X = -num3; + } + else + { + if ((double) this.velocity.X <= 0.0) + return; + this.velocity.X = num3; + } + } + } + else + { + if (this.dash <= 0 || this.mount.Active) + return; + if (this.dash == 1) + { + int num = 0; + bool flag = false; + if (this.dashTime > 0) + --this.dashTime; + if (this.dashTime < 0) + ++this.dashTime; + if (this.controlRight && this.releaseRight) + { + if (this.dashTime > 0) + { + num = 1; + flag = true; + this.dashTime = 0; + } + else + this.dashTime = 15; + } + else if (this.controlLeft && this.releaseLeft) + { + if (this.dashTime < 0) + { + num = -1; + flag = true; + this.dashTime = 0; + } + else + this.dashTime = -15; + } + if (!flag) + return; + this.velocity.X = 16.9f * (float) num; + Point tileCoordinates1 = (this.Center + new Vector2((float) (num * this.width / 2 + 2), (float) ((double) this.gravDir * (double) -this.height / 2.0 + (double) this.gravDir * 2.0))).ToTileCoordinates(); + Point tileCoordinates2 = (this.Center + new Vector2((float) (num * this.width / 2 + 2), 0.0f)).ToTileCoordinates(); + if (WorldGen.SolidOrSlopedTile(tileCoordinates1.X, tileCoordinates1.Y) || WorldGen.SolidOrSlopedTile(tileCoordinates2.X, tileCoordinates2.Y)) + this.velocity.X /= 2f; + this.dashDelay = -1; + for (int index11 = 0; index11 < 20; ++index11) + { + int index12 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 2f); + Main.dust[index12].position.X += (float) Main.rand.Next(-5, 6); + Main.dust[index12].position.Y += (float) Main.rand.Next(-5, 6); + Main.dust[index12].velocity *= 0.2f; + Main.dust[index12].scale *= (float) (1.0 + (double) Main.rand.Next(20) * 0.00999999977648258); + } + int index13 = Gore.NewGore(new Vector2((float) ((double) this.position.X + (double) (this.width / 2) - 24.0), (float) ((double) this.position.Y + (double) (this.height / 2) - 34.0)), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index13].velocity.X = (float) Main.rand.Next(-50, 51) * 0.01f; + Main.gore[index13].velocity.Y = (float) Main.rand.Next(-50, 51) * 0.01f; + Main.gore[index13].velocity *= 0.4f; + int index14 = Gore.NewGore(new Vector2((float) ((double) this.position.X + (double) (this.width / 2) - 24.0), (float) ((double) this.position.Y + (double) (this.height / 2) - 14.0)), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index14].velocity.X = (float) Main.rand.Next(-50, 51) * 0.01f; + Main.gore[index14].velocity.Y = (float) Main.rand.Next(-50, 51) * 0.01f; + Main.gore[index14].velocity *= 0.4f; + } + else if (this.dash == 2) + { + int num = 0; + bool flag = false; + if (this.dashTime > 0) + --this.dashTime; + if (this.dashTime < 0) + ++this.dashTime; + if (this.controlRight && this.releaseRight) + { + if (this.dashTime > 0) + { + num = 1; + flag = true; + this.dashTime = 0; + } + else + this.dashTime = 15; + } + else if (this.controlLeft && this.releaseLeft) + { + if (this.dashTime < 0) + { + num = -1; + flag = true; + this.dashTime = 0; + } + else + this.dashTime = -15; + } + if (!flag) + return; + this.velocity.X = 14.5f * (float) num; + Point tileCoordinates3 = (this.Center + new Vector2((float) (num * this.width / 2 + 2), (float) ((double) this.gravDir * (double) -this.height / 2.0 + (double) this.gravDir * 2.0))).ToTileCoordinates(); + Point tileCoordinates4 = (this.Center + new Vector2((float) (num * this.width / 2 + 2), 0.0f)).ToTileCoordinates(); + if (WorldGen.SolidOrSlopedTile(tileCoordinates3.X, tileCoordinates3.Y) || WorldGen.SolidOrSlopedTile(tileCoordinates4.X, tileCoordinates4.Y)) + this.velocity.X /= 2f; + this.dashDelay = -1; + this.eocDash = 15; + for (int index15 = 0; index15 < 0; ++index15) + { + int index16 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 2f); + Main.dust[index16].position.X += (float) Main.rand.Next(-5, 6); + Main.dust[index16].position.Y += (float) Main.rand.Next(-5, 6); + Main.dust[index16].velocity *= 0.2f; + Main.dust[index16].scale *= (float) (1.0 + (double) Main.rand.Next(20) * 0.00999999977648258); + } + } + else + { + if (this.dash != 3) + return; + int num = 0; + bool flag = false; + if (this.dashTime > 0) + --this.dashTime; + if (this.dashTime < 0) + ++this.dashTime; + if (this.controlRight && this.releaseRight) + { + if (this.dashTime > 0) + { + num = 1; + flag = true; + this.dashTime = 0; + this.solarDashing = true; + this.solarDashConsumedFlare = false; + } + else + this.dashTime = 15; + } + else if (this.controlLeft && this.releaseLeft) + { + if (this.dashTime < 0) + { + num = -1; + flag = true; + this.dashTime = 0; + this.solarDashing = true; + this.solarDashConsumedFlare = false; + } + else + this.dashTime = -15; + } + if (!flag) + return; + this.velocity.X = 21.9f * (float) num; + Point tileCoordinates5 = (this.Center + new Vector2((float) (num * this.width / 2 + 2), (float) ((double) this.gravDir * (double) -this.height / 2.0 + (double) this.gravDir * 2.0))).ToTileCoordinates(); + Point tileCoordinates6 = (this.Center + new Vector2((float) (num * this.width / 2 + 2), 0.0f)).ToTileCoordinates(); + if (WorldGen.SolidOrSlopedTile(tileCoordinates5.X, tileCoordinates5.Y) || WorldGen.SolidOrSlopedTile(tileCoordinates6.X, tileCoordinates6.Y)) + this.velocity.X /= 2f; + this.dashDelay = -1; + for (int index17 = 0; index17 < 20; ++index17) + { + int index18 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 2f); + Main.dust[index18].position.X += (float) Main.rand.Next(-5, 6); + Main.dust[index18].position.Y += (float) Main.rand.Next(-5, 6); + Main.dust[index18].velocity *= 0.2f; + Main.dust[index18].scale *= (float) (1.0 + (double) Main.rand.Next(20) * 0.00999999977648258); + Main.dust[index18].shader = GameShaders.Armor.GetSecondaryShader(this.ArmorSetDye(), this); + Main.dust[index18].noGravity = true; + Main.dust[index18].fadeIn = 0.5f; + } + } + } + } + + public void WallslideMovement() + { + this.sliding = false; + if (this.slideDir == 0 || this.spikedBoots <= 0 || this.mount.Active || (!this.controlLeft || this.slideDir != -1) && (!this.controlRight || this.slideDir != 1)) + return; + bool flag = false; + float x = this.position.X; + if (this.slideDir == 1) + x += (float) this.width; + float num1 = x + (float) this.slideDir; + float num2 = (float) ((double) this.position.Y + (double) this.height + 1.0); + if ((double) this.gravDir < 0.0) + num2 = this.position.Y - 1f; + float num3 = num1 / 16f; + float num4 = num2 / 16f; + if (WorldGen.SolidTile((int) num3, (int) num4) && WorldGen.SolidTile((int) num3, (int) num4 - 1)) + flag = true; + if (this.spikedBoots >= 2) + { + if (!flag || ((double) this.velocity.Y <= 0.0 || (double) this.gravDir != 1.0) && ((double) this.velocity.Y >= (double) this.gravity || (double) this.gravDir != -1.0)) + return; + float num5 = this.gravity; + if (this.slowFall) + num5 = !this.TryingToHoverUp ? this.gravity / 3f * this.gravDir : this.gravity / 10f * this.gravDir; + this.fallStart = (int) ((double) this.position.Y / 16.0); + if (this.controlDown && (double) this.gravDir == 1.0 || this.controlUp && (double) this.gravDir == -1.0) + { + this.velocity.Y = 4f * this.gravDir; + int index = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) ((this.width / 2 - 4) * this.slideDir), (float) ((double) this.position.Y + (double) (this.height / 2) + (double) (this.height / 2 - 4) * (double) this.gravDir)), 8, 8, 31); + if (this.slideDir < 0) + Main.dust[index].position.X -= 10f; + if ((double) this.gravDir < 0.0) + Main.dust[index].position.Y -= 12f; + Main.dust[index].velocity *= 0.1f; + Main.dust[index].scale *= 1.2f; + Main.dust[index].noGravity = true; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.cShoe, this); + } + else if ((double) this.gravDir == -1.0) + this.velocity.Y = (float) (-(double) num5 + 9.99999974737875E-06) * this.gravDir; + else + this.velocity.Y = (float) (-(double) num5 + 9.99999974737875E-06) * this.gravDir; + this.sliding = true; + } + else + { + if ((!flag || (double) this.velocity.Y <= 0.5 || (double) this.gravDir != 1.0) && ((double) this.velocity.Y >= -0.5 || (double) this.gravDir != -1.0)) + return; + this.fallStart = (int) ((double) this.position.Y / 16.0); + if (this.controlDown) + this.velocity.Y = 4f * this.gravDir; + else + this.velocity.Y = 0.5f * this.gravDir; + this.sliding = true; + int index = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) ((this.width / 2 - 4) * this.slideDir), (float) ((double) this.position.Y + (double) (this.height / 2) + (double) (this.height / 2 - 4) * (double) this.gravDir)), 8, 8, 31); + if (this.slideDir < 0) + Main.dust[index].position.X -= 10f; + if ((double) this.gravDir < 0.0) + Main.dust[index].position.Y -= 12f; + Main.dust[index].velocity *= 0.1f; + Main.dust[index].scale *= 1.2f; + Main.dust[index].noGravity = true; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.cShoe, this); + } + } + + public void CarpetMovement() + { + bool flag = false; + if (this.grappling[0] == -1 && this.carpet && !this.canJumpAgain_Cloud && !this.canJumpAgain_Sandstorm && !this.canJumpAgain_Blizzard && !this.canJumpAgain_Fart && !this.canJumpAgain_Sail && !this.canJumpAgain_Unicorn && !this.canJumpAgain_Santank && !this.canJumpAgain_WallOfFleshGoat && !this.canJumpAgain_Basilisk && this.jump == 0 && (double) this.velocity.Y != 0.0 && this.rocketTime == 0 && (double) this.wingTime == 0.0 && !this.mount.Active) + { + if (this.controlJump && this.canCarpet) + { + this.canCarpet = false; + this.carpetTime = 300; + } + if (this.carpetTime > 0 && this.controlJump) + { + this.fallStart = (int) ((double) this.position.Y / 16.0); + flag = true; + --this.carpetTime; + float gravity = this.gravity; + if ((double) this.gravDir == 1.0 && (double) this.velocity.Y > -(double) gravity) + this.velocity.Y = (float) -((double) gravity + 9.99999997475243E-07); + else if ((double) this.gravDir == -1.0 && (double) this.velocity.Y < (double) gravity) + this.velocity.Y = gravity + 1E-06f; + this.carpetFrameCounter += 1f + Math.Abs(this.velocity.X * 0.5f); + if ((double) this.carpetFrameCounter > 8.0) + { + this.carpetFrameCounter = 0.0f; + ++this.carpetFrame; + } + if (this.carpetFrame < 0) + this.carpetFrame = 0; + if (this.carpetFrame > 5) + this.carpetFrame = 0; + } + } + if (!flag) + this.carpetFrame = -1; + else + this.slowFall = false; + } + + public void DoubleJumpVisuals() + { + if (this.isPerformingJump_Cloud && this.hasJumpOption_Cloud && !this.canJumpAgain_Cloud && (this.canJumpAgain_Sandstorm || !this.hasJumpOption_Sandstorm) && ((double) this.gravDir == 1.0 && (double) this.velocity.Y < 0.0 || (double) this.gravDir == -1.0 && (double) this.velocity.Y > 0.0)) + { + int num = this.height; + if ((double) this.gravDir == -1.0) + num = -6; + int index = Dust.NewDust(new Vector2(this.position.X - 4f, this.position.Y + (float) num), this.width + 8, 4, 16, (float) (-(double) this.velocity.X * 0.5), this.velocity.Y * 0.5f, 100, Scale: 1.5f); + Main.dust[index].velocity.X = (float) ((double) Main.dust[index].velocity.X * 0.5 - (double) this.velocity.X * 0.100000001490116); + Main.dust[index].velocity.Y = (float) ((double) Main.dust[index].velocity.Y * 0.5 - (double) this.velocity.Y * 0.300000011920929); + } + if (this.isPerformingJump_Sandstorm && this.hasJumpOption_Sandstorm && !this.canJumpAgain_Sandstorm && ((double) this.gravDir == 1.0 && (double) this.velocity.Y < 0.0 || (double) this.gravDir == -1.0 && (double) this.velocity.Y > 0.0)) + { + int num = this.height; + if ((double) this.gravDir == -1.0) + num = -6; + float Scale = (float) (((double) this.jump / 75.0 + 1.0) / 2.0); + for (int index1 = 0; index1 < 3; ++index1) + { + int index2 = Dust.NewDust(new Vector2(this.position.X, this.position.Y + (float) (num / 2)), this.width, 32, 124, this.velocity.X * 0.3f, this.velocity.Y * 0.3f, 150, Scale: (1f * Scale)); + Main.dust[index2].velocity *= 0.5f * Scale; + Main.dust[index2].fadeIn = 1.5f * Scale; + } + this.sandStorm = true; + if (this.miscCounter % 3 == 0) + { + int index = Gore.NewGore(new Vector2((float) ((double) this.position.X + (double) (this.width / 2) - 18.0), this.position.Y + (float) (num / 2)), new Vector2(-this.velocity.X, -this.velocity.Y), Main.rand.Next(220, 223), Scale); + Main.gore[index].velocity = this.velocity * 0.3f * Scale; + Main.gore[index].alpha = 100; + } + } + if (this.isPerformingJump_Fart && this.hasJumpOption_Fart && !this.canJumpAgain_Fart && ((double) this.gravDir == 1.0 && (double) this.velocity.Y < 0.0 || (double) this.gravDir == -1.0 && (double) this.velocity.Y > 0.0)) + { + int num = this.height; + if ((double) this.gravDir == -1.0) + num = -6; + int index = Dust.NewDust(new Vector2(this.position.X - 4f, this.position.Y + (float) num), this.width + 8, 4, 188, (float) (-(double) this.velocity.X * 0.5), this.velocity.Y * 0.5f, 100, Scale: 1.5f); + Main.dust[index].velocity.X = (float) ((double) Main.dust[index].velocity.X * 0.5 - (double) this.velocity.X * 0.100000001490116); + Main.dust[index].velocity.Y = (float) ((double) Main.dust[index].velocity.Y * 0.5 - (double) this.velocity.Y * 0.300000011920929); + Main.dust[index].velocity *= 0.5f; + } + if (this.isPerformingJump_Unicorn && this.hasJumpOption_Unicorn && !this.canJumpAgain_Unicorn && ((double) this.gravDir == 1.0 && (double) this.velocity.Y < 0.0 || (double) this.gravDir == -1.0 && (double) this.velocity.Y > 0.0)) + { + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, Utils.SelectRandom(Main.rand, 176, 177, 179))]; + dust.velocity = Vector2.Zero; + dust.noGravity = true; + dust.scale = (float) (0.5 + (double) Main.rand.NextFloat() * 0.800000011920929); + dust.fadeIn = (float) (1.0 + (double) Main.rand.NextFloat() * 2.0); + dust.shader = GameShaders.Armor.GetSecondaryShader(this.cMount, this); + } + if (this.isPerformingJump_Sail && this.hasJumpOption_Sail && !this.canJumpAgain_Sail && ((double) this.gravDir == 1.0 && (double) this.velocity.Y < 1.0 || (double) this.gravDir == -1.0 && (double) this.velocity.Y > 1.0)) + { + int num1 = 1; + if (this.jump > 0) + num1 = 2; + int num2 = this.height - 6; + if ((double) this.gravDir == -1.0) + num2 = 6; + for (int index3 = 0; index3 < num1; ++index3) + { + int index4 = Dust.NewDust(new Vector2(this.position.X, this.position.Y + (float) num2), this.width, 12, 253, this.velocity.X * 0.3f, this.velocity.Y * 0.3f, 100, Scale: 1.5f); + Main.dust[index4].scale += (float) Main.rand.Next(-5, 3) * 0.1f; + if (this.jump <= 0) + Main.dust[index4].scale *= 0.8f; + else + Main.dust[index4].velocity -= this.velocity / 5f; + Main.dust[index4].noGravity = true; + Vector2 vector2 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + vector2.Normalize(); + vector2 *= (float) Main.rand.Next(81) * 0.1f; + } + } + if (!this.isPerformingJump_Blizzard || !this.hasJumpOption_Blizzard || this.canJumpAgain_Blizzard || ((double) this.gravDir != 1.0 || (double) this.velocity.Y >= 0.0) && ((double) this.gravDir != -1.0 || (double) this.velocity.Y <= 0.0)) + return; + int num3 = this.height - 6; + if ((double) this.gravDir == -1.0) + num3 = 6; + for (int index5 = 0; index5 < 2; ++index5) + { + int index6 = Dust.NewDust(new Vector2(this.position.X, this.position.Y + (float) num3), this.width, 12, 76, this.velocity.X * 0.3f, this.velocity.Y * 0.3f); + Main.dust[index6].velocity *= 0.1f; + if (index5 == 0) + Main.dust[index6].velocity += this.velocity * 0.03f; + else + Main.dust[index6].velocity -= this.velocity * 0.03f; + Main.dust[index6].velocity -= this.velocity * 0.1f; + Main.dust[index6].noGravity = true; + Main.dust[index6].noLight = true; + } + for (int index7 = 0; index7 < 3; ++index7) + { + int index8 = Dust.NewDust(new Vector2(this.position.X, this.position.Y + (float) num3), this.width, 12, 76, this.velocity.X * 0.3f, this.velocity.Y * 0.3f); + Main.dust[index8].fadeIn = 1.5f; + Main.dust[index8].velocity *= 0.6f; + Main.dust[index8].velocity += this.velocity * 0.8f; + Main.dust[index8].noGravity = true; + Main.dust[index8].noLight = true; + } + for (int index9 = 0; index9 < 3; ++index9) + { + int index10 = Dust.NewDust(new Vector2(this.position.X, this.position.Y + (float) num3), this.width, 12, 76, this.velocity.X * 0.3f, this.velocity.Y * 0.3f); + Main.dust[index10].fadeIn = 1.5f; + Main.dust[index10].velocity *= 0.6f; + Main.dust[index10].velocity -= this.velocity * 0.8f; + Main.dust[index10].noGravity = true; + Main.dust[index10].noLight = true; + } + } + + public void WingMovement() + { + if (this.wingsLogic == 4 && this.TryingToHoverUp) + { + this.velocity.Y -= 0.2f * this.gravDir; + if ((double) this.gravDir == 1.0) + { + if ((double) this.velocity.Y > 0.0) + --this.velocity.Y; + else if ((double) this.velocity.Y > -(double) Player.jumpSpeed) + this.velocity.Y -= 0.2f; + if ((double) this.velocity.Y < -(double) Player.jumpSpeed * 3.0) + this.velocity.Y = (float) (-(double) Player.jumpSpeed * 3.0); + } + else + { + if ((double) this.velocity.Y < 0.0) + ++this.velocity.Y; + else if ((double) this.velocity.Y < (double) Player.jumpSpeed) + this.velocity.Y += 0.2f; + if ((double) this.velocity.Y > (double) Player.jumpSpeed * 3.0) + this.velocity.Y = Player.jumpSpeed * 3f; + } + this.wingTime -= 2f; + } + else + { + float num1 = 0.1f; + float num2 = 0.5f; + float num3 = 1.5f; + float num4 = 0.5f; + float num5 = 0.1f; + if (this.wingsLogic == 26) + { + num2 = 0.75f; + num5 = 0.15f; + num4 = 1f; + num3 = 2.5f; + num1 = 0.125f; + } + if (this.wingsLogic == 8 || this.wingsLogic == 11 || this.wingsLogic == 24 || this.wingsLogic == 27 || this.wingsLogic == 22) + num3 = 1.66f; + if (this.wingsLogic == 21 || this.wingsLogic == 12 || this.wingsLogic == 20 || this.wingsLogic == 23) + num3 = 1.805f; + if (this.wingsLogic == 37) + { + num2 = 0.75f; + num5 = 0.15f; + num4 = 1f; + num3 = 2.5f; + num1 = 0.125f; + } + if (this.wingsLogic == 44) + { + num2 = 0.85f; + num5 = 0.15f; + num4 = 1f; + num3 = 2.75f; + num1 = 0.125f; + if (this.TryingToHoverUp) + { + this.velocity.Y -= 0.4f * this.gravDir; + if ((double) this.gravDir == 1.0) + { + if ((double) this.velocity.Y > 0.0) + --this.velocity.Y; + else if ((double) this.velocity.Y > -(double) Player.jumpSpeed) + this.velocity.Y -= 0.2f; + if ((double) this.velocity.Y < -(double) Player.jumpSpeed * 3.0) + this.velocity.Y = (float) (-(double) Player.jumpSpeed * 3.0); + } + else + { + if ((double) this.velocity.Y < 0.0) + ++this.velocity.Y; + else if ((double) this.velocity.Y < (double) Player.jumpSpeed) + this.velocity.Y += 0.2f; + if ((double) this.velocity.Y > (double) Player.jumpSpeed * 3.0) + this.velocity.Y = Player.jumpSpeed * 3f; + } + } + if (this.TryingToHoverDown && !this.controlJump && (double) this.velocity.Y != 0.0) + this.velocity.Y += 0.4f; + } + if (this.wingsLogic == 45) + { + num2 = 0.95f; + num5 = 0.15f; + num4 = 1f; + num3 = 4.5f; + if (this.TryingToHoverUp) + { + this.velocity.Y -= 0.4f * this.gravDir; + if ((double) this.gravDir == 1.0) + { + if ((double) this.velocity.Y > 0.0) + --this.velocity.Y; + else if ((double) this.velocity.Y > -(double) Player.jumpSpeed) + this.velocity.Y -= 0.2f; + if ((double) this.velocity.Y < -(double) Player.jumpSpeed * 3.0) + this.velocity.Y = (float) (-(double) Player.jumpSpeed * 3.0); + } + else + { + if ((double) this.velocity.Y < 0.0) + ++this.velocity.Y; + else if ((double) this.velocity.Y < (double) Player.jumpSpeed) + this.velocity.Y += 0.2f; + if ((double) this.velocity.Y > (double) Player.jumpSpeed * 3.0) + this.velocity.Y = Player.jumpSpeed * 3f; + } + } + if (this.TryingToHoverDown && !this.controlJump && (double) this.velocity.Y != 0.0) + this.velocity.Y += 0.4f; + } + if (this.wingsLogic == 29 || this.wingsLogic == 32) + { + num2 = 0.85f; + num5 = 0.15f; + num4 = 1f; + num3 = 3f; + num1 = 0.135f; + } + if (this.wingsLogic == 30 || this.wingsLogic == 31) + { + num4 = 1f; + num3 = 2.45f; + if (!this.TryingToHoverDown) + num1 = 0.15f; + } + this.velocity.Y -= num1 * this.gravDir; + if ((double) this.gravDir == 1.0) + { + if ((double) this.velocity.Y > 0.0) + this.velocity.Y -= num2; + else if ((double) this.velocity.Y > -(double) Player.jumpSpeed * (double) num4) + this.velocity.Y -= num5; + if ((double) this.velocity.Y < -(double) Player.jumpSpeed * (double) num3) + this.velocity.Y = -Player.jumpSpeed * num3; + } + else + { + if ((double) this.velocity.Y < 0.0) + this.velocity.Y += num2; + else if ((double) this.velocity.Y < (double) Player.jumpSpeed * (double) num4) + this.velocity.Y += num5; + if ((double) this.velocity.Y > (double) Player.jumpSpeed * (double) num3) + this.velocity.Y = Player.jumpSpeed * num3; + } + if ((this.wingsLogic == 22 || this.wingsLogic == 28 || this.wingsLogic == 30 || this.wingsLogic == 31 || this.wingsLogic == 37 || this.wingsLogic == 45) && this.TryingToHoverDown && !this.controlLeft && !this.controlRight) + this.wingTime -= 0.5f; + else + --this.wingTime; + } + if (!this.empressBrooch || (double) this.wingTime == 0.0) + return; + this.wingTime = (float) this.wingTimeMax; + } + + public void MoonLeechRope() + { + int index1 = -1; + for (int index2 = 0; index2 < 1000; ++index2) + { + if (Main.projectile[index2].active && Main.projectile[index2].type == 456 && (double) Main.projectile[index2].ai[1] == (double) this.whoAmI) + { + index1 = index2; + break; + } + } + if (index1 == -1 || (double) Main.projectile[index1].ai[0] < 0.0) + return; + Projectile projectile = Main.projectile[index1]; + Vector2 vector2_1 = new Vector2(0.0f, 216f); + Vector2 vector2_2 = Main.npc[(int) Math.Abs(projectile.ai[0]) - 1].Center - this.Center + vector2_1; + if ((double) vector2_2.Length() <= 200.0) + return; + this.position = this.position + Vector2.Normalize(vector2_2) * (vector2_2.Length() - 200f); + } + + public void WOFTongue() + { + if (Main.wofNPCIndex < 0 || !Main.npc[Main.wofNPCIndex].active) + return; + float num1 = Main.npc[Main.wofNPCIndex].position.X + 40f; + if (Main.npc[Main.wofNPCIndex].direction > 0) + num1 -= 96f; + if ((double) this.position.X + (double) this.width > (double) num1 && (double) this.position.X < (double) num1 + 140.0 && this.gross) + { + this.noKnockback = false; + int scaledByStrength = Main.npc[Main.wofNPCIndex].GetAttackDamage_ScaledByStrength(50f); + this.Hurt(PlayerDeathReason.LegacyDefault(), scaledByStrength, Main.npc[Main.wofNPCIndex].direction); + } + if (!this.gross && (double) this.position.Y > (double) ((Main.maxTilesY - 250) * 16) && (double) this.position.X > (double) num1 - 1920.0 && (double) this.position.X < (double) num1 + 1920.0) + { + this.AddBuff(37, 10); + SoundEngine.PlaySound(4, (int) Main.npc[Main.wofNPCIndex].position.X, (int) Main.npc[Main.wofNPCIndex].position.Y, 10); + } + if (this.gross) + { + if ((double) this.position.Y < (double) (Main.UnderworldLayer * 16)) + this.AddBuff(38, 10); + if (Main.npc[Main.wofNPCIndex].direction < 0) + { + if ((double) this.position.X + (double) (this.width / 2) > (double) Main.npc[Main.wofNPCIndex].position.X + (double) (Main.npc[Main.wofNPCIndex].width / 2) + 40.0) + this.AddBuff(38, 10); + } + else if ((double) this.position.X + (double) (this.width / 2) < (double) Main.npc[Main.wofNPCIndex].position.X + (double) (Main.npc[Main.wofNPCIndex].width / 2) - 40.0) + this.AddBuff(38, 10); + } + if (!this.tongued) + return; + this.controlHook = false; + this.controlUseItem = false; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == Main.myPlayer && Main.projectile[index].aiStyle == 7) + Main.projectile[index].Kill(); + } + Vector2 center = this.Center; + double num2 = (double) Main.npc[Main.wofNPCIndex].position.X + (double) (Main.npc[Main.wofNPCIndex].width / 2) - (double) center.X; + float num3 = Main.npc[Main.wofNPCIndex].position.Y + (float) (Main.npc[Main.wofNPCIndex].height / 2) - center.Y; + if (Math.Sqrt(num2 * num2 + (double) num3 * (double) num3) > 3000.0) + { + this.KillMe(PlayerDeathReason.ByOther(11), 1000.0, 0); + } + else + { + if ((double) Main.npc[Main.wofNPCIndex].position.X >= 608.0 && (double) Main.npc[Main.wofNPCIndex].position.X <= (double) ((Main.maxTilesX - 38) * 16)) + return; + this.KillMe(PlayerDeathReason.ByOther(12), 1000.0, 0); + } + } + + public void StatusFromNPC(NPC npc) + { + if (Main.expertMode && (npc.type == 266 && Main.rand.Next(3) == 0 || npc.type == 267)) + { + int num1 = Main.rand.Next(9); + switch (num1) + { + case 2: + case 4: + num1 = Main.rand.Next(9); + break; + } + float num2 = (float) Main.rand.Next(75, 150) * 0.01f; + if (num1 == 0) + this.AddBuff(20, (int) (60.0 * (double) num2 * 3.5)); + else if (num1 == 1) + this.AddBuff(22, (int) (60.0 * (double) num2 * 2.0)); + else if (num1 == 2) + this.AddBuff(23, (int) (60.0 * (double) num2 * 0.5)); + else if (num1 == 3) + this.AddBuff(30, (int) (60.0 * (double) num2 * 5.0)); + else if (num1 == 4) + this.AddBuff(31, (int) (60.0 * (double) num2 * 1.0)); + else if (num1 == 5) + this.AddBuff(32, (int) (60.0 * (double) num2 * 3.5)); + else if (num1 == 6) + this.AddBuff(33, (int) (60.0 * (double) num2 * 7.5)); + else if (num1 == 7) + this.AddBuff(35, (int) (60.0 * (double) num2 * 1.0)); + else if (num1 == 8) + this.AddBuff(36, (int) (60.0 * (double) num2 * 6.5)); + } + if (npc.type == 530 || npc.type == 531) + this.AddBuff(70, Main.rand.Next(240, 241)); + if (npc.type == 159 || npc.type == 158) + this.AddBuff(30, Main.rand.Next(300, 600)); + if (npc.type == 525) + this.AddBuff(39, 240); + if (npc.type == 526) + this.AddBuff(69, 420); + if (npc.type == 527) + this.AddBuff(31, 840); + if (Main.expertMode && (npc.type == 49 || npc.type == 93 || npc.type == 51 || npc.type == 152 || npc.type == 634) && Main.rand.Next(10) == 0) + this.AddBuff(148, Main.rand.Next(1800, 5400)); + if (Main.expertMode && npc.type == 222) + this.AddBuff(20, Main.rand.Next(60, 240)); + if (Main.expertMode && (npc.type == 210 || npc.type == 211)) + this.AddBuff(20, Main.rand.Next(60, 180)); + if (Main.expertMode && npc.type == 35) + this.AddBuff(30, Main.rand.Next(180, 300)); + if (Main.expertMode && npc.type == 36 && Main.rand.Next(2) == 0) + this.AddBuff(32, Main.rand.Next(30, 60)); + if (npc.type >= 269 && npc.type <= 272) + { + if (Main.rand.Next(3) == 0) + this.AddBuff(30, 600); + else if (Main.rand.Next(3) == 0) + this.AddBuff(32, 300); + } + if (npc.type >= 273 && npc.type <= 276 && Main.rand.Next(2) == 0) + this.AddBuff(36, 600); + if (npc.type >= 277 && npc.type <= 280) + this.AddBuff(24, 600); + if (npc.type == 371) + this.AddBuff(103, 60 * Main.rand.Next(3, 8)); + if (npc.type == 370 && Main.expertMode) + { + int type = Utils.SelectRandom(Main.rand, 0, 148, 30); + if (type != 0) + this.AddBuff(type, 60 * Main.rand.Next(3, 11)); + } + if ((npc.type == 1 && npc.netID == -6 || npc.type == 81 || npc.type == 79 || npc.type == 183 || npc.type == 630) && Main.rand.Next(4) == 0) + this.AddBuff(22, 900); + if ((npc.type == 23 || npc.type == 25) && Main.rand.Next(3) == 0) + this.AddBuff(24, 420); + if ((npc.type == 34 || npc.type == 83 || npc.type == 84 || npc.type == 179 || npc.type == 289) && Main.rand.Next(3) == 0) + this.AddBuff(23, 240); + if ((npc.type == 104 || npc.type == 102) && Main.rand.Next(8) == 0) + this.AddBuff(30, 2700); + if (npc.type == 75 && Main.rand.Next(10) == 0) + this.AddBuff(35, 420); + if ((npc.type == 163 || npc.type == 238) && Main.rand.Next(10) == 0) + this.AddBuff(70, 240); + if ((npc.type == 79 || npc.type == 103 || npc.type == 630) && Main.rand.Next(5) == 0) + this.AddBuff(35, 420); + if ((npc.type == 75 || npc.type == 78 || npc.type == 82) && Main.rand.Next(8) == 0) + this.AddBuff(32, 900); + if ((npc.type == 93 || npc.type == 109 || npc.type == 80) && Main.rand.Next(14) == 0) + this.AddBuff(31, 300); + if (npc.type >= 305 && npc.type <= 314 && Main.rand.Next(10) == 0) + this.AddBuff(33, 3600); + if (npc.type == 77 && Main.rand.Next(6) == 0) + this.AddBuff(36, 7200); + if (npc.type == 112 && Main.rand.Next(20) == 0) + this.AddBuff(33, 18000); + if (npc.type == 182 && Main.rand.Next(25) == 0) + this.AddBuff(33, 7200); + if (npc.type == 141 && Main.rand.Next(2) == 0) + this.AddBuff(20, 600); + if (npc.type == 147 && !this.frozen && Main.rand.Next(12) == 0) + this.AddBuff(46, 600); + if (npc.type == 150) + { + if (Main.rand.Next(2) == 0) + this.AddBuff(46, 900); + if (!this.frozen && Main.rand.Next(35) == 0) + this.AddBuff(47, 60); + else if (!this.frozen && Main.expertMode && Main.rand.Next(35) == 0) + this.AddBuff(47, 60); + } + if (npc.type != 184) + return; + this.AddBuff(46, 1200); + if (!this.frozen && Main.rand.Next(15) == 0) + { + this.AddBuff(47, 60); + } + else + { + if (this.frozen || !Main.expertMode || Main.rand.Next(25) != 0) + return; + this.AddBuff(47, 60); + } + } + + public void GrappleMovement() + { + if (this.grappling[0] < 0) + return; + this.StopVanityActions(); + if (Main.myPlayer == this.whoAmI && this.mount.Active) + this.mount.Dismount(this); + this.canCarpet = true; + this.carpetFrame = -1; + this.wingFrame = 1; + if ((double) this.velocity.Y == 0.0 || this.wet && (double) this.velocity.Y > -0.02 && (double) this.velocity.Y < 0.02) + this.wingFrame = 0; + if (this.wings == 4) + this.wingFrame = 3; + if (this.wings == 30) + this.wingFrame = 0; + this.RefreshMovementAbilities(); + this.rocketFrame = false; + this.canRocket = false; + this.rocketRelease = false; + this.fallStart = (int) ((double) this.position.Y / 16.0); + int index1 = -1; + for (int index2 = 0; index2 < this.grapCount; ++index2) + { + if (Main.projectile[this.grappling[index2]].type == 403) + index1 = index2; + } + int? preferredPlayerDirectionToSet; + float preferedPlayerVelocityX; + float preferedPlayerVelocityY; + this.GetGrapplingForces(this.Center, out preferredPlayerDirectionToSet, out preferedPlayerVelocityX, out preferedPlayerVelocityY); + if ((double) preferedPlayerVelocityY > 0.0) + this.GoingDownWithGrapple = true; + this.velocity.X = preferedPlayerVelocityX; + this.velocity.Y = preferedPlayerVelocityY; + if (index1 != -1) + { + Projectile projectile = Main.projectile[this.grappling[index1]]; + if ((double) projectile.position.X < (double) this.position.X + (double) this.width && (double) projectile.position.X + (double) projectile.width >= (double) this.position.X && (double) projectile.position.Y < (double) this.position.Y + (double) this.height && (double) projectile.position.Y + (double) projectile.height >= (double) this.position.Y) + { + int tileX = (int) ((double) projectile.position.X + (double) (projectile.width / 2)) / 16; + int tileY = (int) ((double) projectile.position.Y + (double) (projectile.height / 2)) / 16; + this.velocity = Vector2.Zero; + if (Main.tile[tileX, tileY].type == (ushort) 314) + { + Vector2 Position; + Position.X = projectile.position.X + (float) (projectile.width / 2) - (float) (this.width / 2); + Position.Y = projectile.position.Y + (float) (projectile.height / 2) - (float) (this.height / 2); + this.RemoveAllGrapplingHooks(); + int num = 13; + if (this.miscEquips[2].stack > 0 && this.miscEquips[2].mountType >= 0 && MountID.Sets.Cart[this.miscEquips[2].mountType] && (!this.miscEquips[2].expertOnly || Main.expertMode)) + num = this.miscEquips[2].mountType; + int Height = this.height + Mount.GetHeightBoost(num); + if (Minecart.GetOnTrack(tileX, tileY, ref Position, this.width, Height) && !Collision.SolidCollision(Position, this.width, Height - 20)) + { + this.position = Position; + DelegateMethods.Minecart.rotation = this.fullRotation; + DelegateMethods.Minecart.rotationOrigin = this.fullRotationOrigin; + this.mount.SetMount(num, this, this.minecartLeft); + Minecart.WheelSparks(this.mount.Delegations.MinecartDust, this.position, this.width, this.height, 25); + } + } + } + } + if (this.itemAnimation == 0) + { + if ((double) this.velocity.X == 0.0 && preferredPlayerDirectionToSet.HasValue) + this.ChangeDir(preferredPlayerDirectionToSet.Value); + if ((double) this.velocity.X > 0.0) + this.ChangeDir(1); + if ((double) this.velocity.X < 0.0) + this.ChangeDir(-1); + } + if (this.controlJump) + { + if (!this.releaseJump) + return; + if (((double) this.velocity.Y == 0.0 || this.wet && (double) this.velocity.Y > -0.02 && (double) this.velocity.Y < 0.02) && !this.controlDown) + { + this.velocity.Y = -Player.jumpSpeed; + this.jump = Player.jumpHeight / 2; + this.releaseJump = false; + } + else + { + this.velocity.Y += 0.01f; + this.releaseJump = false; + } + this.RefreshDoubleJumps(); + this.RemoveAllGrapplingHooks(); + } + else + this.releaseJump = true; + } + + public void DoQueenSlimeHookTeleport(Vector2 targetPosition) + { + int num1 = 150; + Vector2 position = this.position; + Vector2 velocity = this.velocity; + for (int index = 0; index < num1; ++index) + { + Vector2 Velocity = (position + this.Size / 2f).DirectionTo(targetPosition).SafeNormalize(Vector2.Zero) * 12f; + Vector2 vector2 = Collision.TileCollision(position, Velocity, this.width, this.height, true, true, (int) this.gravDir); + position += vector2; + } + int num2 = 10; + Vector2 vector2_1 = position - this.position; + this.Teleport(position, num2); + NetMessage.SendData(65, number2: ((float) this.whoAmI), number3: position.X, number4: position.Y, number5: num2); + } + + private void GetGrapplingForces( + Vector2 fromPosition, + out int? preferredPlayerDirectionToSet, + out float preferedPlayerVelocityX, + out float preferedPlayerVelocityY) + { + float num1 = 0.0f; + float num2 = 0.0f; + preferredPlayerDirectionToSet = new int?(); + int num3 = 0; + for (int index = 0; index < this.grapCount; ++index) + { + Projectile projectile = Main.projectile[this.grappling[index]]; + if ((double) projectile.ai[0] == 2.0 && !projectile.position.HasNaNs()) + { + num1 += projectile.position.X + (float) (projectile.width / 2); + num2 += projectile.position.Y + (float) (projectile.height / 2); + ++num3; + if (projectile.type == 446) + { + Vector2 vector2 = new Vector2((float) (this.controlRight.ToInt() - this.controlLeft.ToInt()), (float) (this.controlDown.ToInt() - this.controlUp.ToInt()) * this.gravDir); + if (vector2 != Vector2.Zero) + vector2.Normalize(); + vector2 *= 100f; + Vector2 vec = Vector2.Normalize(this.Center - projectile.Center + vector2); + if (vec.HasNaNs()) + vec = -Vector2.UnitY; + float num4 = 200f; + num1 += vec.X * num4; + num2 += vec.Y * num4; + } + else if (projectile.type == 652) + { + Vector2 vector2_1 = new Vector2((float) (this.controlRight.ToInt() - this.controlLeft.ToInt()), (float) (this.controlDown.ToInt() - this.controlUp.ToInt()) * this.gravDir).SafeNormalize(Vector2.Zero); + Vector2 v = projectile.Center - this.Center; + Vector2 vector2_2 = v.SafeNormalize(Vector2.Zero); + Vector2 vector2_3 = Vector2.Zero; + if (vector2_1 != Vector2.Zero) + vector2_3 = vector2_2 * Vector2.Dot(vector2_2, vector2_1); + float num5 = 6f; + if ((double) Vector2.Dot(vector2_3, v) < 0.0 && (double) v.Length() >= 600.0) + num5 = 0.0f; + num1 += (float) (-(double) v.X + (double) vector2_3.X * (double) num5); + num2 += (float) (-(double) v.Y + (double) vector2_3.Y * (double) num5); + } + else if (projectile.type == 865) + { + Vector2 vector2_4 = (projectile.rotation - 1.570796f).ToRotationVector2().SafeNormalize(Vector2.UnitY); + Vector2 vector2_5 = -vector2_4 * 28f; + num1 += vector2_5.X; + num2 += vector2_5.Y; + if ((double) vector2_4.X != 0.0) + preferredPlayerDirectionToSet = new int?(Math.Sign(vector2_4.X)); + } + } + } + if (num3 == 0) + { + preferedPlayerVelocityX = this.velocity.X; + preferedPlayerVelocityY = this.velocity.Y; + } + else + { + float num6 = num1 / (float) num3; + float num7 = num2 / (float) num3; + Vector2 vector2 = fromPosition; + preferedPlayerVelocityX = num6 - vector2.X; + preferedPlayerVelocityY = num7 - vector2.Y; + float num8 = (float) Math.Sqrt((double) preferedPlayerVelocityX * (double) preferedPlayerVelocityX + (double) preferedPlayerVelocityY * (double) preferedPlayerVelocityY); + float num9 = 11f; + if (Main.projectile[this.grappling[0]].type == 315) + num9 = 14f; + if (Main.projectile[this.grappling[0]].type == 487) + num9 = 12f; + if (Main.projectile[this.grappling[0]].type >= 646 && Main.projectile[this.grappling[0]].type <= 649) + num9 = 16f; + float num10 = (double) num8 <= (double) num9 ? 1f : num9 / num8; + preferedPlayerVelocityX *= num10; + preferedPlayerVelocityY *= num10; + } + } + + private void RefreshMovementAbilities(bool doubleJumps = true) + { + this.wingTime = (float) this.wingTimeMax; + this.rocketTime = this.rocketTimeMax; + this.rocketDelay = 0; + if (!doubleJumps) + return; + this.RefreshDoubleJumps(); + } + + private void RefreshDoubleJumps() + { + if (this.hasJumpOption_Cloud) + this.canJumpAgain_Cloud = true; + if (this.hasJumpOption_Sandstorm) + this.canJumpAgain_Sandstorm = true; + if (this.hasJumpOption_Blizzard) + this.canJumpAgain_Blizzard = true; + if (this.hasJumpOption_Fart) + this.canJumpAgain_Fart = true; + if (this.hasJumpOption_Sail) + this.canJumpAgain_Sail = true; + if (this.hasJumpOption_Unicorn) + this.canJumpAgain_Unicorn = true; + if (this.hasJumpOption_Santank) + this.canJumpAgain_Santank = true; + if (this.hasJumpOption_WallOfFleshGoat) + this.canJumpAgain_WallOfFleshGoat = true; + if (!this.hasJumpOption_Basilisk) + return; + this.canJumpAgain_Basilisk = true; + } + + public void StickyMovement() + { + bool flag = false; + if (this.mount.Type > 0 && MountID.Sets.Cart[this.mount.Type] && (double) Math.Abs(this.velocity.X) > 5.0) + flag = true; + Vector2 vector2_1 = new Vector2(this.position.X + (float) (this.width / 2) - (float) (this.width / 2 / 2), this.position.Y + (float) (this.height / 2) - (float) (this.height / 2 / 2)); + Vector2 vector2_2 = Collision.StickyTiles(this.position, this.velocity, this.width, this.height); + if ((double) vector2_2.Y != -1.0 && (double) vector2_2.X != -1.0) + { + int x = (int) vector2_2.X; + int y = (int) vector2_2.Y; + int type = (int) Main.tile[x, y].type; + if (this.whoAmI == Main.myPlayer && type == 51 && ((double) this.velocity.X != 0.0 || (double) this.velocity.Y != 0.0)) + { + ++this.stickyBreak; + if (this.stickyBreak > Main.rand.Next(20, 100) | flag) + { + this.stickyBreak = 0; + WorldGen.KillTile(x, y); + if (Main.netMode == 1 && !Main.tile[x, y].active() && Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y)); + } + } + if (flag) + return; + this.fallStart = (int) ((double) this.position.Y / 16.0); + if (type != 229) + this.jump = 0; + if ((double) this.velocity.X > 1.0) + this.velocity.X = 1f; + if ((double) this.velocity.X < -1.0) + this.velocity.X = -1f; + if ((double) this.velocity.X > 0.75 || (double) this.velocity.X < -0.75) + this.velocity.X *= 0.85f; + else + this.velocity.X *= 0.6f; + if ((double) this.gravDir == -1.0) + { + if ((double) this.velocity.Y < -1.0) + this.velocity.Y = -1f; + if ((double) this.velocity.Y > 5.0) + this.velocity.Y = 5f; + if ((double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.96f; + else + this.velocity.Y *= 0.3f; + } + else + { + if ((double) this.velocity.Y > 1.0) + this.velocity.Y = 1f; + if ((double) this.velocity.Y < -5.0) + this.velocity.Y = -5f; + if ((double) this.velocity.Y < 0.0) + this.velocity.Y *= 0.96f; + else + this.velocity.Y *= 0.3f; + } + if (type != 229 || Main.rand.Next(5) != 0 || (double) this.velocity.Y <= 0.15 && (double) this.velocity.Y >= 0.0) + return; + if ((double) (x * 16) < (double) this.position.X + (double) (this.width / 2)) + { + int index = Dust.NewDust(new Vector2(this.position.X - 4f, (float) (y * 16)), 4, 16, 153, Alpha: 50); + Main.dust[index].scale += (float) Main.rand.Next(0, 6) * 0.1f; + Main.dust[index].velocity *= 0.1f; + Main.dust[index].noGravity = true; + } + else + { + int index = Dust.NewDust(new Vector2((float) ((double) this.position.X + (double) this.width - 2.0), (float) (y * 16)), 4, 16, 153, Alpha: 50); + Main.dust[index].scale += (float) Main.rand.Next(0, 6) * 0.1f; + Main.dust[index].velocity *= 0.1f; + Main.dust[index].noGravity = true; + } + if (Main.tile[x, y + 1] != null && Main.tile[x, y + 1].type == (ushort) 229 && (double) this.position.Y + (double) this.height > (double) ((y + 1) * 16)) + { + if ((double) (x * 16) < (double) this.position.X + (double) (this.width / 2)) + { + int index = Dust.NewDust(new Vector2(this.position.X - 4f, (float) (y * 16 + 16)), 4, 16, 153, Alpha: 50); + Main.dust[index].scale += (float) Main.rand.Next(0, 6) * 0.1f; + Main.dust[index].velocity *= 0.1f; + Main.dust[index].noGravity = true; + } + else + { + int index = Dust.NewDust(new Vector2((float) ((double) this.position.X + (double) this.width - 2.0), (float) (y * 16 + 16)), 4, 16, 153, Alpha: 50); + Main.dust[index].scale += (float) Main.rand.Next(0, 6) * 0.1f; + Main.dust[index].velocity *= 0.1f; + Main.dust[index].noGravity = true; + } + } + if (Main.tile[x, y + 2] == null || Main.tile[x, y + 2].type != (ushort) 229 || (double) this.position.Y + (double) this.height <= (double) ((y + 2) * 16)) + return; + if ((double) (x * 16) < (double) this.position.X + (double) (this.width / 2)) + { + int index = Dust.NewDust(new Vector2(this.position.X - 4f, (float) (y * 16 + 32)), 4, 16, 153, Alpha: 50); + Main.dust[index].scale += (float) Main.rand.Next(0, 6) * 0.1f; + Main.dust[index].velocity *= 0.1f; + Main.dust[index].noGravity = true; + } + else + { + int index = Dust.NewDust(new Vector2((float) ((double) this.position.X + (double) this.width - 2.0), (float) (y * 16 + 32)), 4, 16, 153, Alpha: 50); + Main.dust[index].scale += (float) Main.rand.Next(0, 6) * 0.1f; + Main.dust[index].velocity *= 0.1f; + Main.dust[index].noGravity = true; + } + } + else + this.stickyBreak = 0; + } + + public bool HasLockedInventory() => this.IsStackingItems(); + + public bool IsStackingItems() + { + for (int index = 0; index < this.inventoryChestStack.Length; ++index) + { + if (this.inventoryChestStack[index]) + { + if (this.inventory[index].type != 0 && this.inventory[index].stack != 0) + return true; + this.inventoryChestStack[index] = false; + } + } + return false; + } + + public List GetNearbyContainerProjectilesList() + { + List intList = new List(); + Vector2 center = this.Center; + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active) + { + int containerIndex = -1; + if (projectile.TryGetContainerIndex(out containerIndex)) + { + Point tileCoordinates = projectile.Hitbox.ClosestPointInRect(center).ToTileCoordinates(); + if (this.IsInTileInteractionRange(tileCoordinates.X, tileCoordinates.Y)) + intList.Add(index); + } + } + } + return intList; + } + + public void UpdateNearbyInteractibleProjectilesList() + { + List projectilesToInteractWith = this._projectilesToInteractWith; + projectilesToInteractWith.Clear(); + if (!Main.CurrentFrameFlags.HadAnActiveInteractibleProjectile) + return; + Vector2 center = this.Center; + for (int index = 0; index < 1000; ++index) + { + if (this.IsProjectileInteractibleAndInInteractionRange(Main.projectile[index], ref center)) + projectilesToInteractWith.Add(index); + } + } + + public bool IsProjectileInteractibleAndInInteractionRange( + Projectile proj, + ref Vector2 compareSpot) + { + if (!proj.active || !proj.IsInteractible()) + return false; + Point tileCoordinates = proj.Hitbox.ClosestPointInRect(compareSpot).ToTileCoordinates(); + return this.IsInTileInteractionRange(tileCoordinates.X, tileCoordinates.Y); + } + + public void QuickStackAllChests() + { + if (this.HasLockedInventory()) + return; + List containerProjectilesList = this.GetNearbyContainerProjectilesList(); + for (int index = 0; index < containerProjectilesList.Count; ++index) + { + int containerIndex; + if (Main.projectile[containerProjectilesList[index]].TryGetContainerIndex(out containerIndex)) + { + int chest = this.chest; + this.chest = containerIndex; + ChestUI.QuickStack(); + this.chest = chest; + } + } + int num1 = 17; + int num2 = (int) ((double) this.Center.X / 16.0); + int num3 = (int) ((double) this.Center.Y / 16.0); + for (int index1 = num2 - num1; index1 <= num2 + num1; ++index1) + { + if (index1 >= 0 && index1 < Main.maxTilesX) + { + for (int index2 = num3 - num1; index2 <= num3 + num1; ++index2) + { + if (index2 >= 0 && index2 < Main.maxTilesY) + { + int num4 = 0; + if (Main.tile[index1, index2].type == (ushort) 29) + num4 = -2; + else if (Main.tile[index1, index2].type == (ushort) 97) + num4 = -3; + else if (Main.tile[index1, index2].type == (ushort) 463) + num4 = -4; + else if (Main.tile[index1, index2].type == (ushort) 491) + num4 = -5; + if (num4 < 0 && (double) (new Vector2((float) (index1 * 16 + 8), (float) (index2 * 16 + 8)) - this.Center).Length() < 250.0) + { + int chest = this.chest; + this.chest = num4; + ChestUI.QuickStack(); + this.chest = chest; + } + } + } + } + } + if (Main.netMode == 1) + { + for (int number = 10; number < 50; ++number) + { + if (this.inventory[number].type > 0 && this.inventory[number].stack > 0 && !this.inventory[number].favorited && !this.inventory[number].IsACoin) + { + NetMessage.SendData(5, number: this.whoAmI, number2: ((float) number), number3: ((float) this.inventory[number].prefix)); + NetMessage.SendData(85, number: number); + this.inventoryChestStack[number] = true; + } + } + } + else + { + bool flag = false; + for (int index = 10; index < 50; ++index) + { + if (this.inventory[index].type > 0 && this.inventory[index].stack > 0 && !this.inventory[index].favorited && !this.inventory[index].IsACoin) + { + int type = this.inventory[index].type; + int stack = this.inventory[index].stack; + this.inventory[index] = Chest.PutItemInNearbyChest(this.inventory[index], this.Center); + if (this.inventory[index].type != type || this.inventory[index].stack != stack) + flag = true; + } + } + if (!flag) + return; + SoundEngine.PlaySound(7); + } + } + + public void CheckDrowning() + { + bool flag = Collision.DrownCollision(this.position, this.width, this.height, this.gravDir); + if (this.armor[0].type == 250 || this.armor[0].type == 4275) + flag = true; + if (this.inventory[this.selectedItem].type == 186) + { + if (this.itemAnimation == 0) + { + try + { + int index1 = (int) (((double) this.position.X + (double) (this.width / 2) + (double) (6 * this.direction)) / 16.0); + int num = 0; + if ((double) this.gravDir == -1.0) + num = this.height; + int index2 = (int) (((double) this.position.Y + (double) num - 44.0 * (double) this.gravDir) / 16.0); + if (Main.tile[index1, index2] != null) + { + if (Main.tile[index1, index2].liquid < (byte) 128) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (Main.tile[index1, index2].active() && Main.tileSolid[(int) Main.tile[index1, index2].type]) + { + if (!Main.tileSolidTop[(int) Main.tile[index1, index2].type]) + goto label_15; + } + flag = false; + } + } + } + catch + { + } + } + } +label_15: + if (this.gills) + flag = false; + if (Main.myPlayer == this.whoAmI) + { + if (this.accMerman) + { + if (flag) + this.merman = true; + flag = false; + } + if (flag) + { + ++this.breathCD; + if (this.breathCD >= this.breathCDMax) + { + this.breathCD = 0; + --this.breath; + if (this.breath == 0) + SoundEngine.PlaySound(23); + if (this.breath <= 0) + { + this.lifeRegenTime = 0; + this.breath = 0; + this.statLife -= 2; + if (this.statLife <= 0) + { + this.statLife = 0; + this.KillMe(PlayerDeathReason.ByOther(1), 10.0, 0); + } + } + } + } + else + { + this.breath += 3; + if (this.breath > this.breathMax) + this.breath = this.breathMax; + this.breathCD = 0; + } + } + if (!flag || Main.rand.Next(20) != 0 || this.lavaWet || this.honeyWet) + return; + int num1 = 0; + if ((double) this.gravDir == -1.0) + num1 += this.height - 12; + if (this.inventory[this.selectedItem].type == 186) + Dust.NewDust(new Vector2((float) ((double) this.position.X + (double) (10 * this.direction) + 4.0), (float) ((double) this.position.Y + (double) num1 - 54.0 * (double) this.gravDir)), this.width - 8, 8, 34, Scale: 1.2f); + else + Dust.NewDust(new Vector2(this.position.X + (float) (12 * this.direction), (float) ((double) this.position.Y + (double) num1 + 4.0 * (double) this.gravDir)), this.width - 8, 8, 34, Scale: 1.2f); + } + + public void CheckCrackedBrickBreak() + { + bool flag1 = false; + if ((double) Main.rand.Next(2, 12) < (double) Math.Abs(this.velocity.X)) + flag1 = true; + if ((double) Main.rand.Next(2, 12) < (double) this.velocity.Y) + flag1 = true; + if (flag1 && (double) this.velocity.Y < 1.0) + { + Point tileCoordinates1 = (this.Bottom + Vector2.UnitY).ToTileCoordinates(); + Point tileCoordinates2 = (this.BottomLeft + Vector2.UnitY).ToTileCoordinates(); + Point tileCoordinates3 = (this.BottomRight + Vector2.UnitY).ToTileCoordinates(); + if (WorldGen.SolidTileAllowBottomSlope(tileCoordinates1.X, tileCoordinates1.Y) && !TileID.Sets.CrackedBricks[(int) Main.tile[tileCoordinates1.X, tileCoordinates1.Y].type] || WorldGen.SolidTileAllowBottomSlope(tileCoordinates2.X, tileCoordinates2.Y) && !TileID.Sets.CrackedBricks[(int) Main.tile[tileCoordinates2.X, tileCoordinates2.Y].type] || WorldGen.SolidTileAllowBottomSlope(tileCoordinates3.X, tileCoordinates3.Y) && !TileID.Sets.CrackedBricks[(int) Main.tile[tileCoordinates3.X, tileCoordinates3.Y].type]) + flag1 = false; + } + if (!flag1) + return; + Vector2 vector2 = this.position + this.velocity; + bool flag2 = false; + int num1 = (int) ((double) vector2.X / 16.0); + int num2 = (int) (((double) vector2.X + (double) this.width) / 16.0); + int num3 = (int) (((double) this.position.Y + (double) this.height + 1.0) / 16.0); + Microsoft.Xna.Framework.Rectangle rect = this.getRect(); + rect.Inflate(1, 1); + for (int i = num1; i <= num2; ++i) + { + for (int index = num3; index <= num3 + 1 && Main.tile[i, index] != null; ++index) + { + if (Main.tile[i, index].nactive() && !WorldGen.SolidTile(i, index - 1) && Main.tile[i, index].type >= (ushort) 481 && Main.tile[i, index].type <= (ushort) 483 && new Microsoft.Xna.Framework.Rectangle(i * 16, index * 16, 16, 16).Intersects(rect)) + { + flag2 = true; + if ((double) this.velocity.Y > 1.0) + this.velocity.Y = 1f; + NetMessage.SendData(13, number: this.whoAmI); + } + } + } + if (!flag2) + return; + int num4 = (int) (((double) vector2.X - 16.0 - 8.0) / 16.0); + int num5 = (int) (((double) vector2.X + (double) this.width + 16.0 + 8.0) / 16.0); + for (int i = num4; i <= num5; ++i) + { + for (int j = num3; j <= num3 + 2; ++j) + { + if (Main.tile[i, j].nactive() && !WorldGen.SolidTile(i, j - 1) && Main.tile[i, j].type >= (ushort) 481 && Main.tile[i, j].type <= (ushort) 483) + { + WorldGen.KillTile(i, j); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) i), number3: ((float) j)); + } + } + } + } + + public void CheckIceBreak() + { + if ((double) this.velocity.Y <= 7.0) + return; + Vector2 vector2 = this.position + this.velocity; + int num1 = (int) ((double) vector2.X / 16.0); + int num2 = (int) (((double) vector2.X + (double) this.width) / 16.0); + int num3 = (int) (((double) this.position.Y + (double) this.height + 1.0) / 16.0); + for (int i = num1; i <= num2; ++i) + { + for (int j = num3; j <= num3 + 1 && Main.tile[i, j] != null; ++j) + { + if (Main.tile[i, j].nactive() && Main.tile[i, j].type == (ushort) 162 && !WorldGen.SolidTile(i, j - 1)) + { + WorldGen.KillTile(i, j); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) i), number3: ((float) j)); + } + } + } + } + + public void SlopeDownMovement() + { + this.sloping = false; + float y = this.velocity.Y; + Vector4 vector4 = Collision.WalkDownSlope(this.position, this.velocity, this.width, this.height, this.gravity * this.gravDir); + this.position.X = vector4.X; + this.position.Y = vector4.Y; + this.velocity.X = vector4.Z; + this.velocity.Y = vector4.W; + if ((double) this.velocity.Y == (double) y) + return; + this.sloping = true; + } + + public void HoneyCollision(bool fallThrough, bool ignorePlats) + { + int Height = !this.onTrack ? this.height : this.height - 20; + Vector2 velocity = this.velocity; + this.velocity = Collision.TileCollision(this.position, this.velocity, this.width, Height, fallThrough, ignorePlats, (int) this.gravDir); + Vector2 vector2 = this.velocity * 0.25f; + if ((double) this.velocity.X != (double) velocity.X) + vector2.X = this.velocity.X; + if ((double) this.velocity.Y != (double) velocity.Y) + vector2.Y = this.velocity.Y; + this.position = this.position + vector2; + } + + public void WaterCollision(bool fallThrough, bool ignorePlats) + { + int Height = !this.onTrack ? this.height : this.height - 20; + Vector2 velocity = this.velocity; + this.velocity = Collision.TileCollision(this.position, this.velocity, this.width, Height, fallThrough, ignorePlats, (int) this.gravDir); + Vector2 vector2 = this.velocity * 0.5f; + if ((double) this.velocity.X != (double) velocity.X) + vector2.X = this.velocity.X; + if ((double) this.velocity.Y != (double) velocity.Y) + vector2.Y = this.velocity.Y; + this.position = this.position + vector2; + this.TryFloatingInWater(); + } + + private void TryFloatingInWater() + { + if (!this.ShouldFloatInWater) + return; + float waterLineHeight; + if (Collision.GetWaterLine(this.Center.ToTileCoordinates(), out waterLineHeight)) + { + float y = this.Center.Y; + if (this.mount.Active && this.mount.Type == 37) + y -= 6f; + float num = y + 8f; + if ((double) num + (double) this.velocity.Y < (double) waterLineHeight) + return; + if ((double) y > (double) waterLineHeight) + { + this.velocity.Y -= 0.4f; + if ((double) this.velocity.Y >= -6.0) + return; + this.velocity.Y = -6f; + } + else + { + this.velocity.Y = waterLineHeight - num; + if ((double) this.velocity.Y < -3.0) + this.velocity.Y = -3f; + if ((double) this.velocity.Y != 0.0) + return; + this.velocity.Y = float.Epsilon; + } + } + else + this.velocity.Y -= 0.4f; + } + + public void DryCollision(bool fallThrough, bool ignorePlats) + { + int Height = !this.onTrack ? this.height : this.height - 10; + if ((double) this.velocity.Length() > 16.0) + { + Vector2 vector2_1 = Collision.TileCollision(this.position, this.velocity, this.width, Height, fallThrough, ignorePlats, (int) this.gravDir); + float num1 = this.velocity.Length(); + Vector2 vector2_2 = Vector2.Normalize(this.velocity); + if ((double) vector2_1.Y == 0.0) + vector2_2.Y = 0.0f; + Vector2 zero1 = Vector2.Zero; + bool flag = this.mount.Type == 7 || this.mount.Type == 8 || this.mount.Type == 12 || this.mount.Type == 44 || this.mount.Type == 48 || this.mount.Type == 49; + Vector2 zero2 = Vector2.Zero; + while ((double) num1 > 0.0) + { + float num2 = num1; + if ((double) num2 > 16.0) + num2 = 16f; + num1 -= num2; + Vector2 velocity1 = vector2_2 * num2; + this.velocity = velocity1; + this.SlopeDownMovement(); + velocity1 = this.velocity; + if ((double) this.velocity.Y == (double) this.gravity && (!this.mount.Active || !this.mount.Cart && !flag)) + Collision.StepDown(ref this.position, ref velocity1, this.width, this.height, ref this.stepSpeed, ref this.gfxOffY, (int) this.gravDir, this.waterWalk || this.waterWalk2); + if ((double) this.gravDir == -1.0) + { + if ((this.carpetFrame != -1 || (double) this.velocity.Y <= (double) this.gravity) && !this.controlUp) + Collision.StepUp(ref this.position, ref velocity1, this.width, this.height, ref this.stepSpeed, ref this.gfxOffY, (int) this.gravDir, this.controlUp); + } + else if (flag || (this.carpetFrame != -1 || (double) this.velocity.Y >= (double) this.gravity) && !this.controlDown && !this.mount.Cart) + Collision.StepUp(ref this.position, ref velocity1, this.width, this.height, ref this.stepSpeed, ref this.gfxOffY, (int) this.gravDir, this.controlUp); + Vector2 Velocity = Collision.TileCollision(this.position, velocity1, this.width, Height, fallThrough, ignorePlats, (int) this.gravDir); + if (Collision.up && (double) this.gravDir == 1.0) + this.jump = 0; + if (this.waterWalk || this.waterWalk2) + { + Vector2 velocity2 = this.velocity; + Velocity = Collision.WaterCollision(this.position, Velocity, this.width, this.height, fallThrough, lavaWalk: this.waterWalk); + Vector2 velocity3 = this.velocity; + if (velocity2 != velocity3) + this.fallStart = (int) ((double) this.position.Y / 16.0); + } + this.position = this.position + Velocity; + bool Falling = false; + if ((double) Velocity.Y > (double) this.gravity) + Falling = true; + if ((double) Velocity.Y < -(double) this.gravity) + Falling = true; + this.velocity = Velocity; + this.UpdateTouchingTiles(); + this.TryBouncingBlocks(Falling); + this.TryLandingOnDetonator(); + this.SlopingCollision(fallThrough, ignorePlats); + Collision.StepConveyorBelt((Entity) this, this.gravDir); + Vector2 velocity4 = this.velocity; + zero1 += velocity4; + } + this.velocity = zero1; + } + else + { + this.velocity = Collision.TileCollision(this.position, this.velocity, this.width, Height, fallThrough, ignorePlats, (int) this.gravDir); + if (Collision.up && (double) this.gravDir == 1.0) + this.jump = 0; + if (this.waterWalk || this.waterWalk2) + { + Vector2 velocity5 = this.velocity; + this.velocity = Collision.WaterCollision(this.position, this.velocity, this.width, this.height, fallThrough, lavaWalk: this.waterWalk); + Vector2 velocity6 = this.velocity; + if (velocity5 != velocity6) + this.fallStart = (int) ((double) this.position.Y / 16.0); + } + this.position = this.position + this.velocity; + } + } + + public void SlopingCollision(bool fallThrough, bool ignorePlats) + { + if (ignorePlats || this.controlDown || this.grappling[0] >= 0 || (double) this.gravDir == -1.0) + this.stairFall = true; + Vector4 vector4 = Collision.SlopeCollision(this.position, this.velocity, this.width, this.height, this.gravity, this.stairFall); + if (Collision.stairFall) + this.stairFall = true; + else if (!fallThrough) + this.stairFall = false; + if (Collision.stair && (double) Math.Abs(vector4.Y - this.position.Y) > 8.0 + (double) Math.Abs(this.velocity.X)) + { + this.gfxOffY -= vector4.Y - this.position.Y; + this.stepSpeed = 4f; + } + Vector2 velocity = this.velocity; + this.position.X = vector4.X; + this.position.Y = vector4.Y; + this.velocity.X = vector4.Z; + this.velocity.Y = vector4.W; + if ((double) this.gravDir != -1.0 || (double) this.velocity.Y != 0.0100999996066093) + return; + this.velocity.Y = 0.0f; + } + + public void FloorVisuals(bool Falling) + { + int x = (int) (((double) this.position.X + (double) (this.width / 2)) / 16.0); + int y = (int) (((double) this.position.Y + (double) this.height) / 16.0); + if ((double) this.gravDir == -1.0) + y = (int) ((double) this.position.Y - 0.100000001490116) / 16; + int type = Player.GetFloorTileType(x, y); + if (type <= -1) + { + this.ResetFloorFlags(); + } + else + { + this.sticky = type == 229; + this.slippy = type == 161 || type == 162 || type == 163 || type == 164 || type == 200 || type == (int) sbyte.MaxValue; + this.slippy2 = type == 197; + this.powerrun = type == 198; + this.runningOnSand = TileID.Sets.Conversion.Sand[type] || TileID.Sets.Conversion.Sandstone[type] || TileID.Sets.Conversion.HardenedSand[type]; + if (Main.tile[x - 1, y].slope() != (byte) 0 || Main.tile[x, y].slope() != (byte) 0 || Main.tile[x + 1, y].slope() != (byte) 0) + type = -1; + if ((this.wet ? 0 : (!this.mount.Cart ? 1 : 0)) == 0) + return; + this.MakeFloorDust(Falling, type); + } + } + + private void ResetFloorFlags() + { + this.slippy = false; + this.slippy2 = false; + this.sticky = false; + this.powerrun = false; + this.runningOnSand = false; + } + + private static int GetFloorTileType(int x, int y) + { + int num = -1; + if (Main.tile[x - 1, y] == null) + Main.tile[x - 1, y] = new Tile(); + if (Main.tile[x + 1, y] == null) + Main.tile[x + 1, y] = new Tile(); + if (Main.tile[x, y] == null) + Main.tile[x, y] = new Tile(); + if (Main.tile[x, y].nactive() && Main.tileSolid[(int) Main.tile[x, y].type]) + num = (int) Main.tile[x, y].type; + else if (Main.tile[x - 1, y].nactive() && Main.tileSolid[(int) Main.tile[x - 1, y].type]) + num = (int) Main.tile[x - 1, y].type; + else if (Main.tile[x + 1, y].nactive() && Main.tileSolid[(int) Main.tile[x + 1, y].type]) + num = (int) Main.tile[x + 1, y].type; + return num; + } + + private void MakeFloorDust(bool Falling, int type) + { + if (type != 147 && type != 25 && type != 53 && type != 189 && type != 0 && type != 123 && type != 57 && type != 112 && type != 116 && type != 196 && type != 193 && type != 195 && type != 197 && type != 199 && type != 229 && type != 371 && type != 460) + return; + int num1 = 1; + if (Falling) + num1 = 20; + for (int index1 = 0; index1 < num1; ++index1) + { + bool flag = true; + int Type = 76; + if (type == 53) + Type = 32; + if (type == 189) + Type = 16; + if (type == 0) + Type = 0; + if (type == 123) + Type = 53; + if (type == 57) + Type = 36; + if (type == 112) + Type = 14; + if (type == 116) + Type = 51; + if (type == 196) + Type = 108; + if (type == 193) + Type = 4; + if (type == 195 || type == 199) + Type = 5; + if (type == 197) + Type = 4; + if (type == 229) + Type = 153; + if (type == 371) + Type = 243; + if (type == 460) + Type = 108; + if (type == 25) + Type = 37; + if (Type == 32 && Main.rand.Next(2) == 0) + flag = false; + if (Type == 14 && Main.rand.Next(2) == 0) + flag = false; + if (Type == 51 && Main.rand.Next(2) == 0) + flag = false; + if (Type == 36 && Main.rand.Next(2) == 0) + flag = false; + if (Type == 0 && Main.rand.Next(3) != 0) + flag = false; + if (Type == 53 && Main.rand.Next(3) != 0) + flag = false; + Color newColor = new Color(); + if (type == 193) + newColor = new Color(30, 100, (int) byte.MaxValue, 100); + if (type == 197) + newColor = new Color(97, 200, (int) byte.MaxValue, 100); + if (!Falling) + { + float num2 = Math.Abs(this.velocity.X) / 3f; + if ((double) Main.rand.Next(100) > (double) num2 * 100.0) + flag = false; + } + if (flag) + { + float num3 = this.velocity.X; + if ((double) num3 > 6.0) + num3 = 6f; + if ((double) num3 < -6.0) + num3 = -6f; + if ((double) this.velocity.X != 0.0 | Falling) + { + int index2 = Dust.NewDust(new Vector2(this.position.X, (float) ((double) this.position.Y + (double) this.height - 2.0)), this.width, 6, Type, Alpha: 50, newColor: newColor); + if ((double) this.gravDir == -1.0) + Main.dust[index2].position.Y -= (float) (this.height + 4); + if (Type == 76) + { + Main.dust[index2].scale += (float) Main.rand.Next(3) * 0.1f; + Main.dust[index2].noLight = true; + } + if (Type == 16 || Type == 108 || Type == 153) + Main.dust[index2].scale += (float) Main.rand.Next(6) * 0.1f; + if (Type == 37) + { + Main.dust[index2].scale += 0.25f; + Main.dust[index2].alpha = 50; + } + if (Type == 5) + Main.dust[index2].scale += (float) Main.rand.Next(2, 8) * 0.1f; + Main.dust[index2].noGravity = true; + if (num1 > 1) + { + Main.dust[index2].velocity.X *= 1.2f; + Main.dust[index2].velocity.Y *= 0.8f; + --Main.dust[index2].velocity.Y; + Main.dust[index2].velocity *= 0.8f; + Main.dust[index2].scale += (float) Main.rand.Next(3) * 0.1f; + Main.dust[index2].velocity.X = (float) (((double) Main.dust[index2].position.X - ((double) this.position.X + (double) (this.width / 2))) * 0.200000002980232); + if ((double) Main.dust[index2].velocity.Y > 0.0) + Main.dust[index2].velocity.Y *= -1f; + Main.dust[index2].velocity.X += num3 * 0.3f; + } + else + Main.dust[index2].velocity *= 0.2f; + Main.dust[index2].position.X -= num3 * 1f; + if ((double) this.gravDir == -1.0) + Main.dust[index2].velocity.Y *= -1f; + } + } + } + } + + public void BordersMovement() + { + if ((double) this.position.X < (double) Main.leftWorld + 640.0 + 16.0) + { + Main.cameraX = 0.0f; + this.position.X = (float) ((double) Main.leftWorld + 640.0 + 16.0); + this.velocity.X = 0.0f; + } + if ((double) this.position.X + (double) this.width > (double) Main.rightWorld - 640.0 - 32.0) + { + Main.cameraX = 0.0f; + this.position.X = (float) ((double) Main.rightWorld - 640.0 - 32.0) - (float) this.width; + this.velocity.X = 0.0f; + } + if ((double) this.position.Y < (double) Main.topWorld + 640.0 + 16.0) + { + this.position.Y = (float) ((double) Main.topWorld + 640.0 + 16.0); + if ((double) this.velocity.Y < 0.11) + this.velocity.Y = 0.11f; + this.gravDir = 1f; + AchievementsHelper.HandleSpecialEvent(this, 11); + } + if ((double) this.position.Y > (double) Main.bottomWorld - 640.0 - 32.0 - (double) this.height) + { + this.position.Y = (float) ((double) Main.bottomWorld - 640.0 - 32.0) - (float) this.height; + this.velocity.Y = 0.0f; + } + if ((double) this.position.Y <= (double) Main.bottomWorld - 640.0 - 150.0 - (double) this.height) + return; + AchievementsHelper.HandleSpecialEvent(this, 10); + } + + public void CollectTaxes() + { + int num1 = Item.buyPrice(copper: 50); + int num2 = Item.buyPrice(gold: 10); + if (!NPC.taxCollector || this.taxMoney >= num2) + return; + int num3 = 0; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && !Main.npc[index].homeless && !NPCID.Sets.IsTownPet[Main.npc[index].type] && NPC.TypeToDefaultHeadIndex(Main.npc[index].type) > 0) + ++num3; + } + this.taxMoney += num1 * num3; + if (this.taxMoney <= num2) + return; + this.taxMoney = num2; + } + + public void GamepadEnableGrappleCooldown() => this._quickGrappleCooldown = 3; + + public void TryInterruptingItemUsage() + { + bool flag1 = false; + if (this.heldProj > -1 && Main.projectile[this.heldProj].IsInterruptible(this)) + flag1 = true; + if (!flag1) + return; + bool flag2 = false; + if (PlayerInput.Triggers.Current.Hotbar1) + flag2 = true; + if (PlayerInput.Triggers.Current.Hotbar2) + flag2 = true; + if (PlayerInput.Triggers.Current.Hotbar3) + flag2 = true; + if (PlayerInput.Triggers.Current.Hotbar4) + flag2 = true; + if (PlayerInput.Triggers.Current.Hotbar5) + flag2 = true; + if (PlayerInput.Triggers.Current.Hotbar6) + flag2 = true; + if (PlayerInput.Triggers.Current.Hotbar7) + flag2 = true; + if (PlayerInput.Triggers.Current.Hotbar8) + flag2 = true; + if (PlayerInput.Triggers.Current.Hotbar9) + flag2 = true; + if (PlayerInput.Triggers.Current.Hotbar10) + flag2 = true; + bool flag3 = Main.hairWindow; + if (flag3) + { + int y = Main.screenHeight / 2 + 60; + flag3 = new Microsoft.Xna.Framework.Rectangle(Main.screenWidth / 2 - TextureAssets.HairStyleBack.Width() / 2, y, TextureAssets.HairStyleBack.Width(), TextureAssets.HairStyleBack.Height()).Contains(Main.MouseScreen.ToPoint()); + } + if ((Main.mapFullscreen || CaptureManager.Instance.Active || flag3 ? 0 : (!Main.playerInventory ? 1 : 0)) != 0) + { + int Offset = PlayerInput.Triggers.Current.HotbarPlus.ToInt() - PlayerInput.Triggers.Current.HotbarMinus.ToInt(); + if (PlayerInput.CurrentProfile.HotbarRadialHoldTimeRequired != -1) + Offset = PlayerInput.Triggers.JustReleased.HotbarPlus.ToInt() - PlayerInput.Triggers.JustReleased.HotbarMinus.ToInt(); + if (PlayerInput.Triggers.Current.HotbarScrollCD != 0) + Offset = 0; + if (!Main.inFancyUI && !Main.ingameOptionsWindow) + Offset += PlayerInput.ScrollWheelDelta / -120; + if (Offset != 0) + { + int num = this.selectedItem + Player.ClampHotbarOffset(Offset); + flag2 = true; + } + } + if (!flag2 || this.heldProj <= -1) + return; + Main.projectile[this.heldProj].Interrupt(this); + } + + private bool CanMoveForwardOnRope(int dir, int x, int y) + { + int index = x + dir; + if (Main.tile[index, y] == null || !Main.tile[index, y].active() || !Main.tileRope[(int) Main.tile[index, y].type]) + return false; + int num = index * 16 + 8 - this.width / 2; + float y1 = this.position.Y; + float y2 = (float) (y * 16 + 22); + if ((!Main.tile[index, y - 1].active() || !Main.tileRope[(int) Main.tile[index, y - 1].type]) && (!Main.tile[index, y + 1].active() || !Main.tileRope[(int) Main.tile[index, y + 1].type])) + y2 = (float) (y * 16 + 22); + return !Collision.SolidCollision(new Vector2((float) num, y2), this.width, this.height); + } + + public void UpdateHairDyeDust() + { + if (Main.netMode == 2 || Main.gamePaused || this.dead || this.ghost || this.stoned || this.frozen || (int) this.hairDye != ContentSamples.CommonlyUsedContentSamples.TeamDyeShaderIndex) + return; + if (Main.rand.Next(45) == 0) + { + int index = Dust.NewDust(this.position, this.width, 8, Main.rand.Next(139, 143), Scale: 1.2f); + Main.dust[index].velocity.X *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.dust[index].velocity.Y *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.dust[index].velocity.X += (float) Main.rand.Next(-50, 51) * 0.01f; + Main.dust[index].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.01f; + --Main.dust[index].velocity.Y; + Main.dust[index].scale *= (float) (0.699999988079071 + (double) Main.rand.Next(-30, 31) * 0.00999999977648258); + Main.dust[index].velocity += this.velocity * 0.2f; + } + if (Main.rand.Next(225) != 0) + return; + int Type = Main.rand.Next(276, 283); + int index1 = Gore.NewGore(new Vector2(this.position.X + (float) Main.rand.Next(this.width), this.position.Y + (float) Main.rand.Next(8)), this.velocity, Type); + Main.gore[index1].velocity.X *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.gore[index1].velocity.Y *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.gore[index1].scale *= (float) (1.0 + (double) Main.rand.Next(-20, 21) * 0.00999999977648258); + Main.gore[index1].velocity.X += (float) Main.rand.Next(-50, 51) * 0.01f; + Main.gore[index1].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.01f; + --Main.gore[index1].velocity.Y; + Main.gore[index1].velocity += this.velocity * 0.2f; + } + + public void Update(int i) + { + this.UpdateHairDyeDust(); + if (i == Main.myPlayer && Main.netMode != 2) + LockOnHelper.Update(); + if (this.launcherWait > 0) + --this.launcherWait; + this.maxFallSpeed = 10f; + this.gravity = Player.defaultGravity; + Player.jumpHeight = 15; + Player.jumpSpeed = 5.01f; + this.maxRunSpeed = 3f; + this.runAcceleration = 0.08f; + this.runSlowdown = 0.2f; + this.accRunSpeed = this.maxRunSpeed; + if (!this.mount.Active || !this.mount.Cart) + this.onWrongGround = false; + this.heldProj = -1; + this.instantMovementAccumulatedThisFrame = Vector2.Zero; + if (this.PortalPhysicsEnabled) + this.maxFallSpeed = 35f; + if (this.wet) + { + if (this.honeyWet) + { + this.gravity = 0.1f; + this.maxFallSpeed = 3f; + } + else if (this.merman) + { + this.gravity = 0.3f; + this.maxFallSpeed = 7f; + } + else if (this.trident && !this.lavaWet) + { + this.gravity = 0.25f; + this.maxFallSpeed = 6f; + Player.jumpHeight = 25; + Player.jumpSpeed = 5.51f; + if (this.controlUp) + { + this.gravity = 0.1f; + this.maxFallSpeed = 2f; + } + } + else + { + this.gravity = 0.2f; + this.maxFallSpeed = 5f; + Player.jumpHeight = 30; + Player.jumpSpeed = 6.01f; + } + } + if (this.vortexDebuff) + this.gravity = 0.0f; + this.maxFallSpeed += 0.01f; + bool flag1 = false; + if (Main.mapFullscreen) + this.GamepadEnableGrappleCooldown(); + else if (this._quickGrappleCooldown > 0) + --this._quickGrappleCooldown; + if (Main.myPlayer == i) + { + TileObject.objectPreview.Reset(); + if (DD2Event.DownedInvasionAnyDifficulty) + this.downedDD2EventAnyDifficulty = true; + } + if (this.active) + { + if (NPC.freeCake && this.talkNPC >= 0 && Main.npc[this.talkNPC].type == 208) + { + NPC.freeCake = false; + if (Main.netMode != 1) + Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, 3750); + } + if (this.emoteTime > 0) + --this.emoteTime; + if ((double) this.ghostDmg > 0.0) + this.ghostDmg -= 4.166667f; + if ((double) this.ghostDmg < 0.0) + this.ghostDmg = 0.0f; + if (Main.expertMode) + { + if ((double) this.lifeSteal < 70.0) + this.lifeSteal += 0.5f; + if ((double) this.lifeSteal > 70.0) + this.lifeSteal = 70f; + } + else + { + if ((double) this.lifeSteal < 80.0) + this.lifeSteal += 0.6f; + if ((double) this.lifeSteal > 80.0) + this.lifeSteal = 80f; + } + this.ResizeHitbox(); + if (this.mount.Active && this.mount.Type == 0) + { + int i1 = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int j = (int) ((double) this.position.Y + (double) (this.height / 2) - 14.0) / 16; + Lighting.AddLight(i1, j, 0.5f, 0.2f, 0.05f); + Lighting.AddLight(i1 + this.direction, j, 0.5f, 0.2f, 0.05f); + Lighting.AddLight(i1 + this.direction * 2, j, 0.5f, 0.2f, 0.05f); + } + this.outOfRange = false; + if (this.whoAmI != Main.myPlayer) + { + int x = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int y = (int) ((double) this.position.Y + (double) (this.height / 2)) / 16; + if (!WorldGen.InWorld(x, y, 4)) + flag1 = true; + else if (Main.tile[x, y] == null) + flag1 = true; + else if (Main.tile[x - 3, y] == null) + flag1 = true; + else if (Main.tile[x + 3, y] == null) + flag1 = true; + else if (Main.tile[x, y - 3] == null) + flag1 = true; + else if (Main.tile[x, y + 3] == null) + flag1 = true; + if (flag1) + { + this.outOfRange = true; + this.numMinions = 0; + this.slotsMinions = 0.0f; + this.itemAnimation = 0; + this.UpdateBuffs(i); + this.PlayerFrame(); + } + } + if (this.tankPet >= 0) + { + if (!this.tankPetReset) + this.tankPetReset = true; + else + this.tankPet = -1; + } + if (i == Main.myPlayer) + this.IsVoidVaultEnabled = this.HasItem(4131); + } + if (this.chatOverhead.timeLeft > 0) + --this.chatOverhead.timeLeft; + if (!this.active | flag1) + return; + this.UpdateMiscCounter(); + ++this.infernoCounter; + if (this.infernoCounter >= 180) + this.infernoCounter = 0; + if (this.starCloakCooldown > 0) + { + --this.starCloakCooldown; + if (Main.rand.Next(5) == 0) + { + for (int index = 0; index < 2; ++index) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 45, Alpha: ((int) byte.MaxValue), Scale: ((float) Main.rand.Next(20, 26) * 0.1f)); + dust.noLight = true; + dust.noGravity = true; + dust.velocity *= 0.5f; + dust.velocity.X = 0.0f; + dust.velocity.Y -= 0.5f; + } + } + if (this.starCloakCooldown == 0) + SoundEngine.PlaySound(25); + } + ++this._timeSinceLastImmuneGet; + if (this._timeSinceLastImmuneGet >= 10000) + this._timeSinceLastImmuneGet = 10000; + float num1 = (float) (Main.maxTilesX / 4200); + float num2 = (float) (((double) this.position.Y / 16.0 - (60.0 + 10.0 * (double) (num1 * num1))) / (Main.worldSurface / 6.0)); + if ((double) num2 < 0.25) + num2 = 0.25f; + if ((double) num2 > 1.0) + num2 = 1f; + this.gravity *= num2; + this.maxRegenDelay = (float) ((1.0 - (double) this.statMana / (double) this.statManaMax2) * 60.0 * 4.0 + 45.0); + this.maxRegenDelay *= 0.7f; + this.UpdateSocialShadow(); + this.UpdateTeleportVisuals(); + this.whoAmI = i; + if (this.whoAmI == Main.myPlayer) + { + if (!DD2Event.Ongoing) + this.PurgeDD2EnergyCrystals(); + this.TryPortalJumping(); + if (this.whoAmI == Main.myPlayer) + this.doorHelper.Update(this); + } + if (this.runSoundDelay > 0) + --this.runSoundDelay; + if (this.attackCD > 0) + --this.attackCD; + if (this.itemAnimation == 0) + this.attackCD = 0; + if (this.potionDelay > 0) + --this.potionDelay; + if (i == Main.myPlayer) + { + if (this.trashItem.type >= 1522 && this.trashItem.type <= 1527) + this.trashItem.SetDefaults(); + if (this.trashItem.type == 3643) + this.trashItem.SetDefaults(); + this.UpdateBiomes(); + this.UpdateMinionTarget(); + } + if (this.ghost) + this.Ghost(); + else if (this.dead) + { + this.UpdateDead(); + this.ResetProjectileCaches(); + this.UpdateProjectileCaches(i); + } + else + { + if ((double) this.velocity.Y == 0.0) + this.mount.FatigueRecovery(); + if (i == Main.myPlayer) + { + this.controlUp = false; + this.controlLeft = false; + this.controlDown = false; + this.controlRight = false; + this.controlJump = false; + this.controlUseItem = false; + this.controlUseTile = false; + this.controlThrow = false; + this.controlInv = false; + this.controlHook = false; + this.controlTorch = false; + this.controlSmart = false; + this.controlMount = false; + this.controlQuickHeal = false; + this.controlQuickMana = false; + this.controlCreativeMenu = false; + this.mapStyle = false; + this.mapAlphaDown = false; + this.mapAlphaUp = false; + this.mapFullScreen = false; + this.mapZoomIn = false; + this.mapZoomOut = false; + if (Main.hasFocus) + { + if (!Main.drawingPlayerChat && !Main.editSign && !Main.editChest && !Main.blockInput) + { + PlayerInput.Triggers.Current.CopyInto(this); + if (Main.mapFullscreen) + { + if (this.controlUp) + Main.mapFullscreenPos.Y -= (float) (1.0 * (16.0 / (double) Main.mapFullscreenScale)); + if (this.controlDown) + Main.mapFullscreenPos.Y += (float) (1.0 * (16.0 / (double) Main.mapFullscreenScale)); + if (this.controlLeft) + Main.mapFullscreenPos.X -= (float) (1.0 * (16.0 / (double) Main.mapFullscreenScale)); + if (this.controlRight) + Main.mapFullscreenPos.X += (float) (1.0 * (16.0 / (double) Main.mapFullscreenScale)); + this.controlUp = false; + this.controlLeft = false; + this.controlDown = false; + this.controlRight = false; + this.controlJump = false; + this.controlUseItem = false; + this.controlUseTile = false; + this.controlThrow = false; + this.controlHook = false; + this.controlTorch = false; + this.controlSmart = false; + this.controlMount = false; + } + if (this.controlQuickHeal) + { + if (this.releaseQuickHeal) + this.QuickHeal(); + this.releaseQuickHeal = false; + } + else + this.releaseQuickHeal = true; + if (this.controlQuickMana) + { + if (this.releaseQuickMana) + this.QuickMana(); + this.releaseQuickMana = false; + } + else + this.releaseQuickMana = true; + if (this.controlCreativeMenu) + { + if (this.releaseCreativeMenu) + this.ToggleCreativeMenu(); + this.releaseCreativeMenu = false; + } + else + this.releaseCreativeMenu = true; + if (this.controlLeft && this.controlRight) + { + this.controlLeft = false; + this.controlRight = false; + } + if (PlayerInput.UsingGamepad || !this.mouseInterface || !ItemSlot.Options.DisableLeftShiftTrashCan) + { + if (Main.cSmartCursorModeIsToggleAndNotHold) + { + if (this.controlSmart && this.releaseSmart) + { + SoundEngine.PlaySound(12); + Main.SmartCursorEnabled = !Main.SmartCursorEnabled; + } + } + else + { + if (this.controlSmart && this.releaseSmart) + SoundEngine.PlaySound(12); + if (Main.SmartCursorEnabled) + { + if (!this.controlSmart && !this.controlUseItem) + Main.SmartCursorEnabled = false; + } + else + Main.SmartCursorEnabled = this.controlSmart; + } + } + this.releaseSmart = !this.controlSmart; + if (this.controlMount) + { + if (this.releaseMount) + this.QuickMount(); + this.releaseMount = false; + } + else + this.releaseMount = true; + if (Main.mapFullscreen) + { + if (this.mapZoomIn) + Main.mapFullscreenScale *= 1.05f; + if (this.mapZoomOut) + Main.mapFullscreenScale *= 0.95f; + } + else + { + switch (Main.mapStyle) + { + case 1: + if (this.mapZoomIn) + Main.mapMinimapScale *= 1.025f; + if (this.mapZoomOut) + Main.mapMinimapScale *= 0.975f; + if (this.mapAlphaUp) + Main.mapMinimapAlpha += 0.015f; + if (this.mapAlphaDown) + { + Main.mapMinimapAlpha -= 0.015f; + break; + } + break; + case 2: + if (this.mapZoomIn) + Main.mapOverlayScale *= 1.05f; + if (this.mapZoomOut) + Main.mapOverlayScale *= 0.95f; + if (this.mapAlphaUp) + Main.mapOverlayAlpha += 0.015f; + if (this.mapAlphaDown) + { + Main.mapOverlayAlpha -= 0.015f; + break; + } + break; + } + if (this.mapStyle) + { + if (this.releaseMapStyle) + { + SoundEngine.PlaySound(12); + ++Main.mapStyle; + if (Main.mapStyle > 2) + Main.mapStyle = 0; + } + this.releaseMapStyle = false; + } + else + this.releaseMapStyle = true; + } + if (this.mapFullScreen) + { + if (this.releaseMapFullscreen) + { + if (Main.mapFullscreen) + { + SoundEngine.PlaySound(11); + Main.mapFullscreen = false; + } + else + this.TryOpeningFullscreenMap(); + } + this.releaseMapFullscreen = false; + } + else + this.releaseMapFullscreen = true; + } + else if (!PlayerInput.UsingGamepad && !Main.editSign && !Main.editChest && !Main.blockInput) + PlayerInput.Triggers.Current.CopyIntoDuringChat(this); + if (this.confused) + { + bool controlLeft = this.controlLeft; + bool controlUp = this.controlUp; + this.controlLeft = this.controlRight; + this.controlRight = controlLeft; + this.controlUp = this.controlRight; + this.controlDown = controlUp; + } + else if (this.cartFlip) + { + if (this.controlRight || this.controlLeft) + { + bool controlLeft = this.controlLeft; + this.controlLeft = this.controlRight; + this.controlRight = controlLeft; + } + else + this.cartFlip = false; + } + for (int index = 0; index < this.doubleTapCardinalTimer.Length; ++index) + { + --this.doubleTapCardinalTimer[index]; + if (this.doubleTapCardinalTimer[index] < 0) + this.doubleTapCardinalTimer[index] = 0; + } + for (int keyDir = 0; keyDir < 4; ++keyDir) + { + bool flag2 = false; + bool flag3 = false; + switch (keyDir) + { + case 0: + flag2 = this.controlDown && this.releaseDown; + flag3 = this.controlDown; + break; + case 1: + flag2 = this.controlUp && this.releaseUp; + flag3 = this.controlUp; + break; + case 2: + flag2 = this.controlRight && this.releaseRight; + flag3 = this.controlRight; + break; + case 3: + flag2 = this.controlLeft && this.releaseLeft; + flag3 = this.controlLeft; + break; + } + if (flag2) + { + if (this.doubleTapCardinalTimer[keyDir] > 0) + this.KeyDoubleTap(keyDir); + else + this.doubleTapCardinalTimer[keyDir] = 15; + } + if (flag3) + { + ++this.holdDownCardinalTimer[keyDir]; + this.KeyHoldDown(keyDir, this.holdDownCardinalTimer[keyDir]); + } + else + this.holdDownCardinalTimer[keyDir] = 0; + } + if (this.controlInv) + { + if (this.releaseInventory) + this.ToggleInv(); + this.releaseInventory = false; + } + else + this.releaseInventory = true; + if (this.delayUseItem) + { + if (!this.controlUseItem) + this.delayUseItem = false; + this.controlUseItem = false; + } + if (this.itemAnimation == 0 && this.ItemTimeIsZero && this.reuseDelay == 0) + { + this.dropItemCheck(); + int selectedItem = this.selectedItem; + bool flag4 = false; + if (!Main.drawingPlayerChat && this.selectedItem != 58 && !Main.editSign && !Main.editChest) + { + if (PlayerInput.Triggers.Current.Hotbar1) + { + this.selectedItem = 0; + flag4 = true; + } + if (PlayerInput.Triggers.Current.Hotbar2) + { + this.selectedItem = 1; + flag4 = true; + } + if (PlayerInput.Triggers.Current.Hotbar3) + { + this.selectedItem = 2; + flag4 = true; + } + if (PlayerInput.Triggers.Current.Hotbar4) + { + this.selectedItem = 3; + flag4 = true; + } + if (PlayerInput.Triggers.Current.Hotbar5) + { + this.selectedItem = 4; + flag4 = true; + } + if (PlayerInput.Triggers.Current.Hotbar6) + { + this.selectedItem = 5; + flag4 = true; + } + if (PlayerInput.Triggers.Current.Hotbar7) + { + this.selectedItem = 6; + flag4 = true; + } + if (PlayerInput.Triggers.Current.Hotbar8) + { + this.selectedItem = 7; + flag4 = true; + } + if (PlayerInput.Triggers.Current.Hotbar9) + { + this.selectedItem = 8; + flag4 = true; + } + if (PlayerInput.Triggers.Current.Hotbar10) + { + this.selectedItem = 9; + flag4 = true; + } + int selectedBinding1 = this.DpadRadial.SelectedBinding; + int selectedBinding2 = this.CircularRadial.SelectedBinding; + int selectedBinding3 = this.QuicksRadial.SelectedBinding; + this.DpadRadial.Update(); + this.CircularRadial.Update(); + this.QuicksRadial.Update(); + if (this.CircularRadial.SelectedBinding >= 0 && selectedBinding2 != this.CircularRadial.SelectedBinding) + this.DpadRadial.ChangeSelection(-1); + if (this.DpadRadial.SelectedBinding >= 0 && selectedBinding1 != this.DpadRadial.SelectedBinding) + this.CircularRadial.ChangeSelection(-1); + if (this.QuicksRadial.SelectedBinding != -1 && PlayerInput.Triggers.JustReleased.RadialQuickbar && !PlayerInput.MiscSettingsTEMP.HotbarRadialShouldBeUsed) + { + switch (this.QuicksRadial.SelectedBinding) + { + case 0: + this.QuickMount(); + break; + case 1: + this.QuickHeal(); + break; + case 2: + this.QuickBuff(); + break; + case 3: + this.QuickMana(); + break; + } + } + if (this.controlTorch | flag4) + { + this.DpadRadial.ChangeSelection(-1); + this.CircularRadial.ChangeSelection(-1); + } + if (this.controlTorch & flag4) + { + if (this.selectedItem != this.nonTorch) + SoundEngine.PlaySound(12); + this.nonTorch = this.selectedItem; + this.selectedItem = selectedItem; + flag4 = false; + } + } + bool flag5 = Main.hairWindow; + Microsoft.Xna.Framework.Rectangle rectangle; + if (flag5) + { + int y = Main.screenHeight / 2 + 60; + rectangle = new Microsoft.Xna.Framework.Rectangle(Main.screenWidth / 2 - TextureAssets.HairStyleBack.Width() / 2, y, TextureAssets.HairStyleBack.Width(), TextureAssets.HairStyleBack.Height()); + flag5 = rectangle.Contains(Main.MouseScreen.ToPoint()); + } + if (flag4 && CaptureManager.Instance.Active) + CaptureManager.Instance.Active = false; + if (selectedItem != this.selectedItem) + SoundEngine.PlaySound(12); + if (Main.mapFullscreen) + { + float num3 = (float) (PlayerInput.ScrollWheelDelta / 120); + if (PlayerInput.UsingGamepad) + num3 += (float) (PlayerInput.Triggers.Current.HotbarPlus.ToInt() - PlayerInput.Triggers.Current.HotbarMinus.ToInt()) * 0.1f; + Main.mapFullscreenScale *= (float) (1.0 + (double) num3 * 0.300000011920929); + } + else if (CaptureManager.Instance.Active) + CaptureManager.Instance.Scrolling(); + else if (!flag5) + { + if (!Main.playerInventory) + { + this.HandleHotbar(); + } + else + { + int mouseScrollDelta = Player.GetMouseScrollDelta(); + bool flag6 = true; + if (Main.recBigList) + { + int num4 = 42; + int y = 340; + int x = 310; + PlayerInput.SetZoom_UI(); + int num5 = (Main.screenWidth - x - 280) / num4; + int num6 = (Main.screenHeight - y - 20) / num4; + rectangle = new Microsoft.Xna.Framework.Rectangle(x, y, num5 * num4, num6 * num4); + if (rectangle.Contains(Main.MouseScreen.ToPoint())) + { + mouseScrollDelta *= -1; + int num7 = Math.Sign(mouseScrollDelta); + for (; mouseScrollDelta != 0; mouseScrollDelta -= num7) + { + if (mouseScrollDelta < 0) + { + Main.recStart -= num5; + if (Main.recStart < 0) + Main.recStart = 0; + } + else + { + Main.recStart += num5; + if (Main.recStart > Main.numAvailableRecipes - num5) + Main.recStart = Main.numAvailableRecipes - num5; + } + } + } + PlayerInput.SetZoom_World(); + } + if (flag6) + { + Main.focusRecipe += mouseScrollDelta; + if (Main.focusRecipe > Main.numAvailableRecipes - 1) + Main.focusRecipe = Main.numAvailableRecipes - 1; + if (Main.focusRecipe < 0) + Main.focusRecipe = 0; + } + } + } + } + else + { + bool flag7 = false; + if (!Main.drawingPlayerChat && this.selectedItem != 58 && !Main.editSign && !Main.editChest) + { + int num8 = -1; + if (Main.keyState.IsKeyDown(Keys.D1)) + { + num8 = 0; + flag7 = true; + } + if (Main.keyState.IsKeyDown(Keys.D2)) + { + num8 = 1; + flag7 = true; + } + if (Main.keyState.IsKeyDown(Keys.D3)) + { + num8 = 2; + flag7 = true; + } + if (Main.keyState.IsKeyDown(Keys.D4)) + { + num8 = 3; + flag7 = true; + } + if (Main.keyState.IsKeyDown(Keys.D5)) + { + num8 = 4; + flag7 = true; + } + if (Main.keyState.IsKeyDown(Keys.D6)) + { + num8 = 5; + flag7 = true; + } + if (Main.keyState.IsKeyDown(Keys.D7)) + { + num8 = 6; + flag7 = true; + } + if (Main.keyState.IsKeyDown(Keys.D8)) + { + num8 = 7; + flag7 = true; + } + if (Main.keyState.IsKeyDown(Keys.D9)) + { + num8 = 8; + flag7 = true; + } + if (Main.keyState.IsKeyDown(Keys.D0)) + { + num8 = 9; + flag7 = true; + } + if (flag7) + { + if (num8 != this.nonTorch) + SoundEngine.PlaySound(12); + this.nonTorch = num8; + } + } + } + } + if (this.selectedItem != 58) + this.SmartSelectLookup(); + if (this.stoned != this.lastStoned) + { + if (this.whoAmI == Main.myPlayer && this.stoned) + { + int Damage = (int) (20.0 * (double) Main.GameModeInfo.EnemyDamageMultiplier); + this.Hurt(PlayerDeathReason.ByOther(5), Damage, 0); + } + SoundEngine.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index1 = 0; index1 < 20; ++index1) + { + int index2 = Dust.NewDust(this.position, this.width, this.height, 1); + if (Main.rand.Next(2) == 0) + Main.dust[index2].noGravity = true; + } + } + this.lastStoned = this.stoned; + if (this.frozen || this.webbed || this.stoned) + { + this.controlJump = false; + this.controlDown = false; + this.controlLeft = false; + this.controlRight = false; + this.controlUp = false; + this.controlUseItem = false; + this.controlUseTile = false; + this.controlThrow = false; + this.gravDir = 1f; + } + this.releaseThrow = !this.controlThrow; + if (this.controlDown && this.releaseDown) + { + if (this.tryKeepingHoveringUp) + this.tryKeepingHoveringUp = false; + else + this.tryKeepingHoveringDown = true; + } + if (this.controlUp && this.releaseUp) + { + if (this.tryKeepingHoveringDown) + this.tryKeepingHoveringDown = false; + else + this.tryKeepingHoveringUp = true; + } + if ((double) this.velocity.Y == 0.0) + { + this.tryKeepingHoveringUp = false; + this.tryKeepingHoveringDown = false; + } + if (Player.Settings.HoverControl == Player.Settings.HoverControlMode.Hold) + { + this.tryKeepingHoveringUp = false; + this.tryKeepingHoveringDown = false; + } + if (Main.netMode == 1) + { + bool flag8 = false; + if (this.controlUp != Main.clientPlayer.controlUp) + flag8 = true; + if (this.controlDown != Main.clientPlayer.controlDown) + flag8 = true; + if (this.controlLeft != Main.clientPlayer.controlLeft) + flag8 = true; + if (this.controlRight != Main.clientPlayer.controlRight) + flag8 = true; + if (this.controlJump != Main.clientPlayer.controlJump) + flag8 = true; + if (this.controlUseItem != Main.clientPlayer.controlUseItem) + flag8 = true; + if (this.selectedItem != Main.clientPlayer.selectedItem) + flag8 = true; + if (flag8) + NetMessage.SendData(13, number: Main.myPlayer); + } + if (Main.playerInventory) + this.AdjTiles(); + this.HandleBeingInChestRange(); + this.tileEntityAnchor.GetTileEntity()?.OnPlayerUpdate(this); + if ((double) this.velocity.Y <= 0.0) + this.fallStart2 = (int) ((double) this.position.Y / 16.0); + if ((double) this.velocity.Y == 0.0) + { + int num9 = 25 + this.extraFall; + int num10 = (int) ((double) this.position.Y / 16.0) - this.fallStart; + if (this.mount.CanFly()) + num10 = 0; + if (this.mount.Cart && Minecart.OnTrack(this.position, this.width, this.height)) + num10 = 0; + if (this.mount.Type == 1) + num10 = 0; + if (num10 > 0 || (double) this.gravDir == -1.0 && num10 < 0) + { + int num11 = (int) ((double) this.position.X / 16.0); + int num12 = (int) (((double) this.position.X + (double) this.width) / 16.0); + int index3 = (int) (((double) this.position.Y + (double) this.height + 1.0) / 16.0); + if ((double) this.gravDir == -1.0) + index3 = (int) (((double) this.position.Y - 1.0) / 16.0); + for (int index4 = num11; index4 <= num12; ++index4) + { + if (Main.tile[index4, index3] != null && Main.tile[index4, index3].active() && (Main.tile[index4, index3].type == (ushort) 189 || Main.tile[index4, index3].type == (ushort) 196 || Main.tile[index4, index3].type == (ushort) 460)) + { + num10 = 0; + break; + } + } + } + bool flag9 = false; + for (int index = 3; index < 10; ++index) + { + if (this.armor[index].stack > 0 && this.armor[index].wingSlot > (sbyte) -1) + flag9 = true; + } + if (this.stoned) + { + int Damage = (int) (((double) num10 * (double) this.gravDir - 2.0) * 20.0); + if (Damage > 0) + { + this.Hurt(PlayerDeathReason.ByOther(5), Damage, 0); + this.immune = false; + } + } + else if (((double) this.gravDir == 1.0 && num10 > num9 || (double) this.gravDir == -1.0 && num10 < -num9) && !this.noFallDmg && !flag9) + { + this.immune = false; + int Damage = (int) ((double) num10 * (double) this.gravDir - (double) num9) * 10; + if (this.mount.Active) + Damage = (int) ((double) Damage * (double) this.mount.FallDamage); + this.Hurt(PlayerDeathReason.ByOther(0), Damage, 0); + if (!this.dead && this.statLife <= this.statLifeMax2 / 10) + AchievementsHelper.HandleSpecialEvent(this, 8); + } + this.fallStart = (int) ((double) this.position.Y / 16.0); + } + if (this.jump > 0 || this.rocketDelay > 0 || this.wet || this.slowFall || (double) num2 < 0.8 || this.tongued) + this.fallStart = (int) ((double) this.position.Y / 16.0); + } + if (Main.netMode != 1) + { + if (this.chest == -1 && this.lastChest >= 0 && Main.chest[this.lastChest] != null && Main.chest[this.lastChest] != null) + NPC.BigMimicSummonCheck(Main.chest[this.lastChest].x, Main.chest[this.lastChest].y); + this.lastChest = this.chest; + } + if (this.mouseInterface) + this.delayUseItem = true; + Player.tileTargetX = (int) (((double) Main.mouseX + (double) Main.screenPosition.X) / 16.0); + Player.tileTargetY = (int) (((double) Main.mouseY + (double) Main.screenPosition.Y) / 16.0); + if ((double) this.gravDir == -1.0) + Player.tileTargetY = (int) (((double) Main.screenPosition.Y + (double) Main.screenHeight - (double) Main.mouseY) / 16.0); + if (Player.tileTargetX >= Main.maxTilesX - 5) + Player.tileTargetX = Main.maxTilesX - 5; + if (Player.tileTargetY >= Main.maxTilesY - 5) + Player.tileTargetY = Main.maxTilesY - 5; + if (Player.tileTargetX < 5) + Player.tileTargetX = 5; + if (Player.tileTargetY < 5) + Player.tileTargetY = 5; + if (Main.tile[Player.tileTargetX - 1, Player.tileTargetY] == null) + Main.tile[Player.tileTargetX - 1, Player.tileTargetY] = new Tile(); + if (Main.tile[Player.tileTargetX + 1, Player.tileTargetY] == null) + Main.tile[Player.tileTargetX + 1, Player.tileTargetY] = new Tile(); + if (Main.tile[Player.tileTargetX, Player.tileTargetY] == null) + Main.tile[Player.tileTargetX, Player.tileTargetY] = new Tile(); + if (this.inventory[this.selectedItem].axe > 0 && !Main.tile[Player.tileTargetX, Player.tileTargetY].active() && this.inventory[this.selectedItem].createWall <= 0 && (this.inventory[this.selectedItem].hammer <= 0 || this.inventory[this.selectedItem].axe != 0)) + { + if (Main.tile[Player.tileTargetX - 1, Player.tileTargetY].active() && Main.tile[Player.tileTargetX - 1, Player.tileTargetY].type == (ushort) 323) + { + if (Main.tile[Player.tileTargetX - 1, Player.tileTargetY].frameY > (short) 4) + --Player.tileTargetX; + } + else if (Main.tile[Player.tileTargetX + 1, Player.tileTargetY].active() && Main.tile[Player.tileTargetX + 1, Player.tileTargetY].type == (ushort) 323 && Main.tile[Player.tileTargetX + 1, Player.tileTargetY].frameY < (short) -4) + ++Player.tileTargetX; + } + if (i == Main.myPlayer) + this.UpdateNearbyInteractibleProjectilesList(); + try + { + if (this.whoAmI == Main.myPlayer) + { + if (Main.instance.IsActive) + { + SmartCursorHelper.SmartCursorLookup(this); + this.SmartInteractLookup(); + } + } + } + catch + { + Main.SmartCursorEnabled = false; + } + this.UpdateImmunity(); + if (this.petalTimer > 0) + --this.petalTimer; + if (this.shadowDodgeTimer > 0) + --this.shadowDodgeTimer; + if (this.jump > 0 || (double) this.velocity.Y != 0.0) + this.ResetFloorFlags(); + this.potionDelayTime = Item.potionDelay; + this.restorationDelayTime = Item.restorationDelay; + if (this.pStone) + { + this.potionDelayTime = (int) ((double) this.potionDelayTime * 0.75); + this.restorationDelayTime = (int) ((double) this.restorationDelayTime * 0.75); + } + if (this.yoraiz0rEye > 0) + this.Yoraiz0rEye(); + this.ResetEffects(); + this.UpdateDyes(); + if (CreativePowerManager.Instance.GetPower().IsEnabledForPlayer(this.whoAmI)) + this.creativeGodMode = true; + if (this.velocity == Vector2.Zero && this.itemAnimation == 0) + ++this.afkCounter; + else + this.afkCounter = 0; + this.meleeCrit += this.inventory[this.selectedItem].crit; + this.magicCrit += this.inventory[this.selectedItem].crit; + this.rangedCrit += this.inventory[this.selectedItem].crit; + if (this.whoAmI == Main.myPlayer) + { + Main.musicBox2 = -1; + if (Main.SceneMetrics.WaterCandleCount > 0) + this.AddBuff(86, 2, false); + if (Main.SceneMetrics.PeaceCandleCount > 0) + this.AddBuff(157, 2, false); + if (Main.SceneMetrics.HasCampfire) + this.AddBuff(87, 2, false); + if (Main.SceneMetrics.HasCatBast) + this.AddBuff(215, 2, false); + if (Main.SceneMetrics.HasStarInBottle) + this.AddBuff(158, 2, false); + if (Main.SceneMetrics.HasHeartLantern) + this.AddBuff(89, 2, false); + if (Main.SceneMetrics.HasSunflower) + this.AddBuff(146, 2, false); + if (Main.SceneMetrics.hasBanner) + this.AddBuff(147, 2, false); + if (!this.behindBackWall && this.ZoneSandstorm) + this.AddBuff(194, 2, false); + } + for (int index = 0; index < 323; ++index) + this.buffImmune[index] = false; + this.UpdateProjectileCaches(i); + this.UpdateBuffs(i); + if (this.whoAmI == Main.myPlayer) + { + if (!this.onFire && !this.poisoned) + this.trapDebuffSource = false; + this.UpdatePet(i); + this.UpdatePetLight(i); + } + this.UpdateLuckFactors(); + this.RecalculateLuck(); + if (this.luckNeedsSync && this.whoAmI == Main.myPlayer) + { + this.luckNeedsSync = false; + NetMessage.SendData(134, number: this.whoAmI); + } + bool flag10 = this.wet && !this.lavaWet && (!this.mount.Active || !this.mount.IsConsideredASlimeMount); + if (this.accMerman & flag10) + { + this.releaseJump = true; + this.wings = 0; + this.merman = true; + this.accFlipper = true; + this.AddBuff(34, 2); + } + else + this.merman = false; + if (!flag10 && this.forceWerewolf) + this.forceMerman = false; + if (this.forceMerman & flag10) + this.wings = 0; + this.accMerman = false; + this.hideMerman = false; + this.forceMerman = false; + if (this.wolfAcc && !this.merman && !Main.dayTime && !this.wereWolf) + this.AddBuff(28, 60); + this.wolfAcc = false; + this.hideWolf = false; + this.forceWerewolf = false; + if (this.whoAmI == Main.myPlayer) + { + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] > 0 && this.buffTime[b] <= 0) + this.DelBuff(b); + } + } + this.beetleDefense = false; + this.beetleOffense = false; + this.setSolar = false; + this.head = this.armor[0].headSlot; + this.body = this.armor[1].bodySlot; + this.legs = this.armor[2].legSlot; + this.ResetVisibleAccessories(); + if ((double) this.MountFishronSpecialCounter > 0.0) + --this.MountFishronSpecialCounter; + if (this._portalPhysicsTime > 0) + --this._portalPhysicsTime; + this.UpdateEquips(i); + this.UpdatePortableStoolUsage(); + if ((double) this.velocity.Y == 0.0 || this.controlJump) + this.portalPhysicsFlag = false; + if (this.inventory[this.selectedItem].type == 3384 || this.portalPhysicsFlag) + this._portalPhysicsTime = 30; + if (this.mount.Active) + this.mount.UpdateEffects(this); + ++this.gemCount; + if (this.gemCount >= 10) + { + this.gem = -1; + this.ownedLargeGems = (BitsByte) (byte) 0; + this.gemCount = 0; + for (int index = 0; index <= 58; ++index) + { + if (this.inventory[index].type == 0 || this.inventory[index].stack == 0) + this.inventory[index].TurnToAir(); + if (this.inventory[index].type >= 1522 && this.inventory[index].type <= 1527) + { + this.gem = this.inventory[index].type - 1522; + this.ownedLargeGems[this.gem] = true; + } + if (this.inventory[index].type == 3643) + { + this.gem = 6; + this.ownedLargeGems[this.gem] = true; + } + } + } + this.UpdateArmorLights(); + this.UpdateArmorSets(i); + if (this.maxTurretsOld != this.maxTurrets) + { + this.UpdateMaxTurrets(); + this.maxTurretsOld = this.maxTurrets; + } + if (this.shieldRaised) + this.statDefense += 20; + if (((this.merman ? 1 : (this.forceMerman ? 1 : 0)) & (flag10 ? 1 : 0)) != 0) + this.wings = 0; + if (this.invis) + { + if (this.itemAnimation == 0 && this.aggro > -750) + this.aggro = -750; + else if (this.aggro > -250) + this.aggro = -250; + } + if (this.inventory[this.selectedItem].type == 3106) + { + if (this.itemAnimation > 0) + { + this.stealthTimer = 15; + if ((double) this.stealth > 0.0) + this.stealth += 0.1f; + } + else if ((double) this.velocity.X > -0.1 && (double) this.velocity.X < 0.1 && (double) this.velocity.Y > -0.1 && (double) this.velocity.Y < 0.1 && !this.mount.Active) + { + if (this.stealthTimer == 0 && (double) this.stealth > 0.0) + { + this.stealth -= 0.02f; + if ((double) this.stealth <= 0.0) + { + this.stealth = 0.0f; + if (Main.netMode == 1) + NetMessage.SendData(84, number: this.whoAmI); + } + } + } + else + { + if ((double) this.stealth > 0.0) + this.stealth += 0.1f; + if (this.mount.Active) + this.stealth = 1f; + } + if ((double) this.stealth > 1.0) + this.stealth = 1f; + this.meleeDamage += (float) ((1.0 - (double) this.stealth) * 3.0); + this.meleeCrit += (int) ((1.0 - (double) this.stealth) * 30.0); + if (this.meleeCrit > 100) + this.meleeCrit = 100; + this.aggro -= (int) ((1.0 - (double) this.stealth) * 750.0); + if (this.stealthTimer > 0) + --this.stealthTimer; + } + else if (this.shroomiteStealth) + { + if (this.itemAnimation > 0) + this.stealthTimer = 5; + if ((double) this.velocity.X > -0.1 && (double) this.velocity.X < 0.1 && (double) this.velocity.Y > -0.1 && (double) this.velocity.Y < 0.1 && !this.mount.Active) + { + if (this.stealthTimer == 0 && (double) this.stealth > 0.0) + { + this.stealth -= 0.015f; + if ((double) this.stealth <= 0.0) + { + this.stealth = 0.0f; + if (Main.netMode == 1) + NetMessage.SendData(84, number: this.whoAmI); + } + } + } + else + { + this.stealth += (Math.Abs(this.velocity.X) + Math.Abs(this.velocity.Y)) * 0.0075f; + if ((double) this.stealth > 1.0) + this.stealth = 1f; + if (this.mount.Active) + this.stealth = 1f; + } + this.rangedDamage += (float) ((1.0 - (double) this.stealth) * 0.600000023841858); + this.rangedCrit += (int) ((1.0 - (double) this.stealth) * 10.0); + this.aggro -= (int) ((1.0 - (double) this.stealth) * 750.0); + if (this.stealthTimer > 0) + --this.stealthTimer; + } + else if (this.setVortex) + { + bool flag11 = false; + if (this.vortexStealthActive) + { + float stealth = this.stealth; + this.stealth -= 0.04f; + if ((double) this.stealth < 0.0) + this.stealth = 0.0f; + else + flag11 = true; + if ((double) this.stealth == 0.0 && (double) stealth != (double) this.stealth && Main.netMode == 1) + NetMessage.SendData(84, number: this.whoAmI); + this.rangedDamage += (float) ((1.0 - (double) this.stealth) * 0.800000011920929); + this.rangedCrit += (int) ((1.0 - (double) this.stealth) * 20.0); + this.aggro -= (int) ((1.0 - (double) this.stealth) * 1200.0); + this.accRunSpeed *= 0.3f; + this.maxRunSpeed *= 0.3f; + if (this.mount.Active) + this.vortexStealthActive = false; + } + else + { + float stealth = this.stealth; + this.stealth += 0.04f; + if ((double) this.stealth > 1.0) + this.stealth = 1f; + else + flag11 = true; + if ((double) this.stealth == 1.0 && (double) stealth != (double) this.stealth && Main.netMode == 1) + NetMessage.SendData(84, number: this.whoAmI); + } + if (flag11) + { + if (Main.rand.Next(2) == 0) + { + Vector2 spinningpoint = Vector2.UnitY.RotatedByRandom(6.28318548202515); + Dust dust = Main.dust[Dust.NewDust(this.Center - spinningpoint * 30f, 0, 0, 229)]; + dust.noGravity = true; + dust.position = this.Center - spinningpoint * (float) Main.rand.Next(5, 11); + dust.velocity = spinningpoint.RotatedBy(1.57079637050629) * 4f; + dust.scale = 0.5f + Main.rand.NextFloat(); + dust.fadeIn = 0.5f; + } + if (Main.rand.Next(2) == 0) + { + Vector2 spinningpoint = Vector2.UnitY.RotatedByRandom(6.28318548202515); + Dust dust = Main.dust[Dust.NewDust(this.Center - spinningpoint * 30f, 0, 0, 240)]; + dust.noGravity = true; + dust.position = this.Center - spinningpoint * 12f; + dust.velocity = spinningpoint.RotatedBy(-1.57079637050629) * 2f; + dust.scale = 0.5f + Main.rand.NextFloat(); + dust.fadeIn = 0.5f; + } + } + } + else + this.stealth = 1f; + if (this.manaSick) + this.magicDamage *= 1f - this.manaSickReduction; + this.meleeSpeed = 1f + (this.meleeSpeed - 1f) * ItemID.Sets.BonusMeleeSpeedMultiplier[this.inventory[this.selectedItem].type]; + if ((double) this.pickSpeed < 0.3) + this.pickSpeed = 0.3f; + if ((double) this.meleeSpeed > 3.0) + this.meleeSpeed = 3f; + if ((double) this.tileSpeed > 3.0) + this.tileSpeed = 3f; + this.tileSpeed = 1f / this.tileSpeed; + if ((double) this.wallSpeed > 3.0) + this.wallSpeed = 3f; + this.wallSpeed = 1f / this.wallSpeed; + if (this.statManaMax2 > 400) + this.statManaMax2 = 400; + if (this.statDefense < 0) + this.statDefense = 0; + if (this.slowOgreSpit) + { + this.moveSpeed /= 3f; + if ((double) this.velocity.Y == 0.0 && (double) Math.Abs(this.velocity.X) > 1.0) + this.velocity.X /= 2f; + } + else if (this.dazed) + this.moveSpeed /= 3f; + else if (this.slow) + this.moveSpeed /= 2f; + else if (this.chilled) + this.moveSpeed *= 0.75f; + if (this.shieldRaised) + { + this.moveSpeed /= 3f; + if ((double) this.velocity.Y == 0.0 && (double) Math.Abs(this.velocity.X) > 3.0) + this.velocity.X /= 2f; + } + if (DD2Event.Ongoing) + { + DD2Event.FindArenaHitbox(); + if (DD2Event.ShouldBlockBuilding(this.Center)) + { + this.noBuilding = true; + this.AddBuff(199, 3); + } + } + this.meleeSpeed = 1f / this.meleeSpeed; + this.UpdateLifeRegen(); + this.soulDrain = 0; + this.UpdateManaRegen(); + if (this.manaRegenCount < 0) + this.manaRegenCount = 0; + if (this.statMana > this.statManaMax2) + this.statMana = this.statManaMax2; + this.runAcceleration *= this.moveSpeed; + this.maxRunSpeed *= this.moveSpeed; + this.UpdateJumpHeight(); + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] > 0 && this.buffTime[b] > 0 && this.buffImmune[this.buffType[b]]) + this.DelBuff(b); + } + if (this.brokenArmor) + this.statDefense /= 2; + if (this.witheredArmor) + this.statDefense /= 2; + if (this.witheredWeapon) + { + this.meleeDamage *= 0.5f; + this.rangedDamage *= 0.5f; + this.magicDamage *= 0.5f; + this.minionDamage *= 0.5f; + } + this.lastTileRangeX = Player.tileRangeX; + this.lastTileRangeY = Player.tileRangeY; + if (this.mount.Active) + this.movementAbilitiesCache.CopyFrom(this); + else + this.movementAbilitiesCache.PasteInto(this); + if (this.mount.Active && this.mount.BlockExtraJumps) + { + this.canJumpAgain_Cloud = false; + this.canJumpAgain_Sandstorm = false; + this.canJumpAgain_Blizzard = false; + this.canJumpAgain_Fart = false; + this.canJumpAgain_Sail = false; + this.canJumpAgain_Unicorn = false; + this.canJumpAgain_Santank = false; + this.canJumpAgain_WallOfFleshGoat = false; + this.canJumpAgain_Basilisk = false; + } + else if (((double) this.velocity.Y == 0.0 ? 1 : (this.sliding ? 1 : 0)) != 0) + { + this.RefreshDoubleJumps(); + } + else + { + if (!this.hasJumpOption_Cloud) + this.canJumpAgain_Cloud = false; + if (!this.hasJumpOption_Sandstorm) + this.canJumpAgain_Sandstorm = false; + if (!this.hasJumpOption_Blizzard) + this.canJumpAgain_Blizzard = false; + if (!this.hasJumpOption_Fart) + this.canJumpAgain_Fart = false; + if (!this.hasJumpOption_Sail) + this.canJumpAgain_Sail = false; + if (!this.hasJumpOption_Unicorn) + this.canJumpAgain_Unicorn = false; + if (!this.hasJumpOption_Santank) + this.canJumpAgain_Santank = false; + if (!this.hasJumpOption_WallOfFleshGoat) + this.canJumpAgain_WallOfFleshGoat = false; + if (!this.hasJumpOption_Basilisk) + this.canJumpAgain_Basilisk = false; + } + if (!this.carpet) + { + this.canCarpet = false; + this.carpetFrame = -1; + } + else if ((double) this.velocity.Y == 0.0 || this.sliding) + { + this.canCarpet = true; + this.carpetTime = 0; + this.carpetFrame = -1; + this.carpetFrameCounter = 0.0f; + } + if ((double) this.gravDir == -1.0) + this.canCarpet = false; + if (this.ropeCount > 0) + --this.ropeCount; + if (!this.pulley && !this.frozen && !this.webbed && !this.stoned && !this.controlJump && (double) this.gravDir == 1.0 && this.ropeCount == 0 && this.grappling[0] == -1 && !this.tongued && !this.mount.Active) + this.FindPulley(); + this.UpdatePettingAnimal(); + this.sitting.UpdateSitting(this); + this.sleeping.UpdateState(this); + this.eyeHelper.Update(this); + if (this.pulley) + { + if (this.mount.Active) + this.pulley = false; + this.sandStorm = false; + this.CancelAllJumpVisualEffects(); + int x = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int y1 = (int) ((double) this.position.Y - 8.0) / 16; + bool flag12 = false; + if (this.pulleyDir == (byte) 0) + this.pulleyDir = (byte) 1; + if (this.pulleyDir == (byte) 1) + { + if (this.direction == -1 && this.controlLeft && (this.releaseLeft || this.leftTimer == 0)) + { + this.pulleyDir = (byte) 2; + flag12 = true; + } + else if (this.direction == 1 && this.controlRight && this.releaseRight || this.rightTimer == 0) + { + this.pulleyDir = (byte) 2; + flag12 = true; + } + else + { + if (this.direction == 1 && this.controlLeft) + { + this.direction = -1; + flag12 = true; + } + if (this.direction == -1 && this.controlRight) + { + this.direction = 1; + flag12 = true; + } + } + } + else if (this.pulleyDir == (byte) 2) + { + if (this.direction == 1 && this.controlLeft) + { + flag12 = true; + if (!Collision.SolidCollision(new Vector2((float) (x * 16 + 8 - this.width / 2), this.position.Y), this.width, this.height)) + { + this.pulleyDir = (byte) 1; + this.direction = -1; + flag12 = true; + } + } + if (this.direction == -1 && this.controlRight) + { + flag12 = true; + if (!Collision.SolidCollision(new Vector2((float) (x * 16 + 8 - this.width / 2), this.position.Y), this.width, this.height)) + { + this.pulleyDir = (byte) 1; + this.direction = 1; + flag12 = true; + } + } + } + int dir = 1; + if (this.controlLeft) + dir = -1; + bool flag13 = this.CanMoveForwardOnRope(dir, x, y1); + if (((!this.controlLeft ? 0 : (this.direction == -1 ? 1 : 0)) & (flag13 ? 1 : 0)) != 0) + this.instantMovementAccumulatedThisFrame.X += -1f; + if (((!this.controlRight ? 0 : (this.direction == 1 ? 1 : 0)) & (flag13 ? 1 : 0)) != 0) + ++this.instantMovementAccumulatedThisFrame.X; + bool flag14 = false; + if (!flag12 && (this.controlLeft && (this.releaseLeft || this.leftTimer == 0) || this.controlRight && (this.releaseRight || this.rightTimer == 0))) + { + int index = x + dir; + if (Main.tile[index, y1] != null && Main.tile[index, y1].active() && Main.tileRope[(int) Main.tile[index, y1].type]) + { + this.pulleyDir = (byte) 1; + this.direction = dir; + int num13 = index * 16 + 8 - this.width / 2; + float y2 = this.position.Y; + float y3 = (float) (y1 * 16 + 22); + if (Main.tile[index, y1 - 1] == null) + Main.tile[index, y1 - 1] = new Tile(); + if (Main.tile[index, y1 + 1] == null) + Main.tile[index, y1 + 1] = new Tile(); + if ((!Main.tile[index, y1 - 1].active() || !Main.tileRope[(int) Main.tile[index, y1 - 1].type]) && (!Main.tile[index, y1 + 1].active() || !Main.tileRope[(int) Main.tile[index, y1 + 1].type])) + y3 = (float) (y1 * 16 + 22); + if (Collision.SolidCollision(new Vector2((float) num13, y3), this.width, this.height)) + { + this.pulleyDir = (byte) 2; + this.direction = -dir; + num13 = this.direction != 1 ? index * 16 + 8 - this.width / 2 - 6 : index * 16 + 8 - this.width / 2 + 6; + } + if (i == Main.myPlayer) + Main.cameraX = Main.cameraX + this.position.X - (float) num13; + this.position.X = (float) num13; + this.gfxOffY = this.position.Y - y3; + this.position.Y = y3; + flag14 = true; + } + } + if (!flag14 && !flag12 && !this.controlUp && (this.controlLeft && this.releaseLeft || this.controlRight && this.releaseRight)) + { + this.pulley = false; + if (this.controlLeft && (double) this.velocity.X == 0.0) + this.velocity.X = -1f; + if (this.controlRight && (double) this.velocity.X == 0.0) + this.velocity.X = 1f; + } + if ((double) this.velocity.X != 0.0) + this.pulley = false; + if (Main.tile[x, y1] == null) + Main.tile[x, y1] = new Tile(); + if (!Main.tile[x, y1].active() || !Main.tileRope[(int) Main.tile[x, y1].type]) + this.pulley = false; + if ((double) this.gravDir != 1.0) + this.pulley = false; + if (this.frozen || this.webbed || this.stoned) + this.pulley = false; + if (!this.pulley) + this.velocity.Y -= this.gravity; + if (this.controlJump) + { + this.pulley = false; + this.jump = Player.jumpHeight; + this.velocity.Y = -Player.jumpSpeed; + } + } + if (this.grapCount > 0) + this.pulley = false; + if (this.pulley) + { + this.fallStart = (int) this.position.Y / 16; + this.wingFrame = 0; + if (this.wings == 4) + this.wingFrame = 3; + int index5 = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int index6 = (int) ((double) this.position.Y - 16.0) / 16; + int num14 = (int) ((double) this.position.Y - 8.0) / 16; + bool flag15 = true; + bool flag16 = false; + if (Main.tile[index5, num14 - 1].active() && Main.tileRope[(int) Main.tile[index5, num14 - 1].type] || Main.tile[index5, num14 + 1].active() && Main.tileRope[(int) Main.tile[index5, num14 + 1].type]) + flag16 = true; + if (Main.tile[index5, index6] == null) + Main.tile[index5, index6] = new Tile(); + if (!Main.tile[index5, index6].active() || !Main.tileRope[(int) Main.tile[index5, index6].type]) + { + flag15 = false; + if ((double) this.velocity.Y < 0.0) + this.velocity.Y = 0.0f; + } + if (flag16) + { + if (this.controlUp & flag15) + { + float x1 = this.position.X; + float y = (float) ((double) this.position.Y - (double) Math.Abs(this.velocity.Y) - 2.0); + if (Collision.SolidCollision(new Vector2(x1, y), this.width, this.height)) + { + float x2 = (float) (index5 * 16 + 8 - this.width / 2 + 6); + if (!Collision.SolidCollision(new Vector2(x2, y), this.width, (int) ((double) this.height + (double) Math.Abs(this.velocity.Y) + 2.0))) + { + if (i == Main.myPlayer) + Main.cameraX = Main.cameraX + this.position.X - x2; + this.pulleyDir = (byte) 2; + this.direction = 1; + this.position.X = x2; + this.velocity.X = 0.0f; + } + else + { + float x3 = (float) (index5 * 16 + 8 - this.width / 2 - 6); + if (!Collision.SolidCollision(new Vector2(x3, y), this.width, (int) ((double) this.height + (double) Math.Abs(this.velocity.Y) + 2.0))) + { + if (i == Main.myPlayer) + Main.cameraX = Main.cameraX + this.position.X - x3; + this.pulleyDir = (byte) 2; + this.direction = -1; + this.position.X = x3; + this.velocity.X = 0.0f; + } + } + } + if ((double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.7f; + if ((double) this.velocity.Y > -3.0) + this.velocity.Y -= 0.2f; + else + this.velocity.Y -= 0.02f; + if ((double) this.velocity.Y < -8.0) + this.velocity.Y = -8f; + } + else if (this.controlDown) + { + float x4 = this.position.X; + float y = this.position.Y; + if (Collision.SolidCollision(new Vector2(x4, y), this.width, (int) ((double) this.height + (double) Math.Abs(this.velocity.Y) + 2.0))) + { + float x5 = (float) (index5 * 16 + 8 - this.width / 2 + 6); + if (!Collision.SolidCollision(new Vector2(x5, y), this.width, (int) ((double) this.height + (double) Math.Abs(this.velocity.Y) + 2.0))) + { + if (i == Main.myPlayer) + Main.cameraX = Main.cameraX + this.position.X - x5; + this.pulleyDir = (byte) 2; + this.direction = 1; + this.position.X = x5; + this.velocity.X = 0.0f; + } + else + { + float x6 = (float) (index5 * 16 + 8 - this.width / 2 - 6); + if (!Collision.SolidCollision(new Vector2(x6, y), this.width, (int) ((double) this.height + (double) Math.Abs(this.velocity.Y) + 2.0))) + { + if (i == Main.myPlayer) + Main.cameraX = Main.cameraX + this.position.X - x6; + this.pulleyDir = (byte) 2; + this.direction = -1; + this.position.X = x6; + this.velocity.X = 0.0f; + } + } + } + if ((double) this.velocity.Y < 0.0) + this.velocity.Y *= 0.7f; + if ((double) this.velocity.Y < 3.0) + this.velocity.Y += 0.2f; + else + this.velocity.Y += 0.1f; + if ((double) this.velocity.Y > (double) this.maxFallSpeed) + this.velocity.Y = this.maxFallSpeed; + } + else + { + this.velocity.Y *= 0.7f; + if ((double) this.velocity.Y > -0.1 && (double) this.velocity.Y < 0.1) + this.velocity.Y = 0.0f; + } + } + else if (this.controlDown) + { + this.ropeCount = 10; + this.pulley = false; + this.velocity.Y = 1f; + } + else + { + this.velocity.Y = 0.0f; + this.position.Y = (float) (index6 * 16 + 22); + } + float num15 = (float) (index5 * 16 + 8 - this.width / 2); + if (this.pulleyDir == (byte) 1) + num15 = (float) (index5 * 16 + 8 - this.width / 2); + if (this.pulleyDir == (byte) 2) + num15 = (float) (index5 * 16 + 8 - this.width / 2 + 6 * this.direction); + if (i == Main.myPlayer) + { + Main.cameraX += this.position.X - num15; + Main.cameraX = MathHelper.Clamp(Main.cameraX, -32f, 32f); + } + this.position.X = num15; + this.pulleyFrameCounter += Math.Abs(this.velocity.Y * 0.75f); + if ((double) this.velocity.Y != 0.0) + this.pulleyFrameCounter += 0.75f; + if ((double) this.pulleyFrameCounter > 10.0) + { + ++this.pulleyFrame; + this.pulleyFrameCounter = 0.0f; + } + if (this.pulleyFrame > 1) + this.pulleyFrame = 0; + this.canCarpet = true; + this.carpetFrame = -1; + this.wingTime = (float) this.wingTimeMax; + this.rocketTime = this.rocketTimeMax; + this.rocketDelay = 0; + this.rocketFrame = false; + this.canRocket = false; + this.rocketRelease = false; + this.DashMovement(); + this.UpdateControlHolds(); + } + else if (this.grappling[0] == -1 && !this.tongued) + { + if (this.wingsLogic > 0 && (double) this.velocity.Y != 0.0 && !this.merman && !this.mount.Active) + this.WingAirLogicTweaks(); + if (this.empressBrooch) + this.runAcceleration *= 2f; + if (this.mount.Active && this.mount.Type == 43 && (double) this.velocity.Y != 0.0) + this.runSlowdown = 0.0f; + if (this.sticky) + { + this.maxRunSpeed *= 0.25f; + this.runAcceleration *= 0.25f; + this.runSlowdown *= 2f; + if ((double) this.velocity.X > (double) this.maxRunSpeed) + this.velocity.X = this.maxRunSpeed; + if ((double) this.velocity.X < -(double) this.maxRunSpeed) + this.velocity.X = -this.maxRunSpeed; + } + else if (this.powerrun) + { + this.maxRunSpeed *= 3.5f; + this.runAcceleration *= 1f; + this.runSlowdown *= 2f; + } + else if (this.runningOnSand && this.desertDash) + { + float num16 = 1.75f; + this.maxRunSpeed *= num16; + this.accRunSpeed *= num16; + this.runAcceleration *= num16; + this.runSlowdown *= num16; + } + else if (this.slippy2) + { + this.runAcceleration *= 0.6f; + this.runSlowdown = 0.0f; + if (this.iceSkate) + { + this.runAcceleration *= 3.5f; + this.maxRunSpeed *= 1.25f; + } + } + else if (this.slippy) + { + this.runAcceleration *= 0.7f; + if (this.iceSkate) + { + this.runAcceleration *= 3.5f; + this.maxRunSpeed *= 1.25f; + } + else + this.runSlowdown *= 0.1f; + } + if (this.sandStorm) + { + this.runAcceleration *= 1.5f; + this.maxRunSpeed *= 2f; + } + if (this.isPerformingJump_Blizzard && this.hasJumpOption_Blizzard) + { + this.runAcceleration *= 3f; + this.maxRunSpeed *= 1.5f; + } + if (this.isPerformingJump_Fart && this.hasJumpOption_Fart) + { + this.runAcceleration *= 3f; + this.maxRunSpeed *= 1.75f; + } + if (this.isPerformingJump_Unicorn && this.hasJumpOption_Unicorn) + { + this.runAcceleration *= 3f; + this.maxRunSpeed *= 1.5f; + } + if (this.isPerformingJump_Santank && this.hasJumpOption_Santank) + { + this.runAcceleration *= 3f; + this.maxRunSpeed *= 1.5f; + } + if (this.isPerformingJump_WallOfFleshGoat && this.hasJumpOption_WallOfFleshGoat) + { + this.runAcceleration *= 3f; + this.maxRunSpeed *= 1.5f; + } + if (this.isPerformingJump_Basilisk && this.hasJumpOption_Basilisk) + { + this.runAcceleration *= 3f; + this.maxRunSpeed *= 1.5f; + } + if (this.isPerformingJump_Sail && this.hasJumpOption_Sail) + { + this.runAcceleration *= 1.5f; + this.maxRunSpeed *= 1.25f; + } + if (this.carpetFrame != -1) + { + this.runAcceleration *= 1.25f; + this.maxRunSpeed *= 1.5f; + } + if (this.inventory[this.selectedItem].type == 3106 && (double) this.stealth < 1.0) + { + this.maxRunSpeed -= (float) ((double) this.maxRunSpeed / 2.0 * (1.0 - (double) this.stealth)); + this.accRunSpeed = this.maxRunSpeed; + } + if (this.mount.Active) + { + this.rocketBoots = 0; + this.wings = 0; + this.wingsLogic = 0; + this.maxRunSpeed = this.mount.RunSpeed; + this.accRunSpeed = this.mount.DashSpeed; + this.runAcceleration = this.mount.Acceleration; + if (this.mount.Type == 12 && !this.MountFishronSpecial) + { + this.runAcceleration /= 2f; + this.maxRunSpeed /= 2f; + } + this.mount.AbilityRecovery(); + if (this.mount.Cart && (double) this.velocity.Y == 0.0) + { + if (!Minecart.OnTrack(this.position, this.width, this.height)) + { + this.fullRotation = 0.0f; + this.onWrongGround = true; + this.runSlowdown = 0.2f; + if (this.controlLeft && this.releaseLeft || this.controlRight && this.releaseRight) + this.mount.Dismount(this); + } + else + { + this.runSlowdown = this.runAcceleration; + this.onWrongGround = false; + } + } + if (this.mount.Type == 8) + this.mount.UpdateDrill(this, this.controlUp, this.controlDown); + } + this.HorizontalMovement(); + if (this.gravControl) + { + if (this.controlUp && this.releaseUp) + { + if ((double) this.gravDir == 1.0) + { + this.gravDir = -1f; + this.fallStart = (int) ((double) this.position.Y / 16.0); + this.jump = 0; + SoundEngine.PlaySound(SoundID.Item8, this.position); + } + else + { + this.gravDir = 1f; + this.fallStart = (int) ((double) this.position.Y / 16.0); + this.jump = 0; + SoundEngine.PlaySound(SoundID.Item8, this.position); + } + } + } + else if (this.gravControl2) + { + if (this.controlUp && this.releaseUp) + { + if ((double) this.gravDir == 1.0) + { + this.gravDir = -1f; + this.fallStart = (int) ((double) this.position.Y / 16.0); + this.jump = 0; + SoundEngine.PlaySound(SoundID.Item8, this.position); + } + else + { + this.gravDir = 1f; + this.fallStart = (int) ((double) this.position.Y / 16.0); + this.jump = 0; + SoundEngine.PlaySound(SoundID.Item8, this.position); + } + } + } + else + this.gravDir = 1f; + if ((double) this.velocity.Y == 0.0 && this.mount.Active && this.mount.CanHover() && this.controlUp && this.releaseUp) + this.velocity.Y = (float) -((double) this.mount.Acceleration + (double) this.gravity + 1.0 / 1000.0); + this.UpdateControlHolds(); + this.sandStorm = false; + this.JumpMovement(); + if (this.wingsLogic == 0) + this.wingTime = 0.0f; + if (this.rocketBoots == 0) + this.rocketTime = 0; + if (this.jump == 0) + this.CancelAllJumpVisualEffects(); + this.DashMovement(); + this.WallslideMovement(); + this.CarpetMovement(); + this.DoubleJumpVisuals(); + if (this.wingsLogic > 0 || this.mount.Active) + this.sandStorm = false; + if (((double) this.gravDir == 1.0 && (double) this.velocity.Y > -(double) Player.jumpSpeed || (double) this.gravDir == -1.0 && (double) this.velocity.Y < (double) Player.jumpSpeed) && (double) this.velocity.Y != 0.0) + this.canRocket = true; + bool wingFlap = false; + if (((double) this.velocity.Y == 0.0 || this.sliding) && this.releaseJump || this.autoJump && this.justJumped) + { + this.mount.ResetFlightTime(this.velocity.X); + this.wingTime = (float) this.wingTimeMax; + } + if (this.wingsLogic > 0 && this.controlJump && (double) this.wingTime > 0.0 && this.jump == 0 && (double) this.velocity.Y != 0.0) + wingFlap = true; + if ((this.wingsLogic == 22 || this.wingsLogic == 28 || this.wingsLogic == 30 || this.wingsLogic == 32 || this.wingsLogic == 29 || this.wingsLogic == 33 || this.wingsLogic == 35 || this.wingsLogic == 37 || this.wingsLogic == 45) && this.controlJump && this.TryingToHoverDown && (double) this.wingTime > 0.0) + wingFlap = true; + if (this.frozen || this.webbed || this.stoned) + { + if (this.mount.Active) + this.mount.Dismount(this); + this.velocity.Y += this.gravity; + if ((double) this.velocity.Y > (double) this.maxFallSpeed) + this.velocity.Y = this.maxFallSpeed; + this.sandStorm = false; + this.CancelAllJumpVisualEffects(); + } + else + { + if (wingFlap) + { + this.WingAirVisuals(); + this.WingMovement(); + } + this.WingFrame(wingFlap); + if (this.wingsLogic > 0 && this.rocketBoots != 0 && (double) this.velocity.Y != 0.0 && this.rocketTime != 0) + { + int num17 = this.rocketTime * 6; + this.wingTime += (float) num17; + if ((double) this.wingTime > (double) (this.wingTimeMax + num17)) + this.wingTime = (float) (this.wingTimeMax + num17); + this.rocketTime = 0; + } + if (wingFlap && this.wings != 4 && this.wings != 22 && this.wings != 0 && this.wings != 24 && this.wings != 28 && this.wings != 30 && this.wings != 33 && this.wings != 45) + { + bool flag17 = this.wingFrame == 3; + if (this.wings == 43 || this.wings == 44) + flag17 = this.wingFrame == 4; + if (flag17) + { + if (!this.flapSound) + SoundEngine.PlaySound(SoundID.Item32, this.position); + this.flapSound = true; + } + else + this.flapSound = false; + } + if ((double) this.velocity.Y == 0.0 || this.sliding || this.autoJump && this.justJumped) + this.rocketTime = this.rocketTimeMax; + if (this.empressBrooch) + this.rocketTime = this.rocketTimeMax; + if (((double) this.wingTime == 0.0 || this.wingsLogic == 0) && this.rocketBoots != 0 && this.controlJump && this.rocketDelay == 0 && this.canRocket && this.rocketRelease && !this.canJumpAgain_Cloud) + { + if (this.rocketTime > 0) + { + --this.rocketTime; + this.rocketDelay = 10; + if (this.rocketDelay2 <= 0) + { + if (this.rocketBoots == 1) + { + SoundEngine.PlaySound(SoundID.Item13, this.position); + this.rocketDelay2 = 30; + } + else if (this.rocketBoots == 2 || this.rocketBoots == 3 || this.rocketBoots == 4) + { + SoundEngine.PlaySound(SoundID.Item24, this.position); + this.rocketDelay2 = 15; + } + } + } + else + this.canRocket = false; + } + if (this.rocketDelay2 > 0) + --this.rocketDelay2; + if (this.rocketDelay == 0) + this.rocketFrame = false; + if (this.rocketDelay > 0) + { + this.rocketFrame = true; + this.RocketBootVisuals(); + if (this.rocketDelay == 0) + this.releaseJump = true; + --this.rocketDelay; + this.velocity.Y -= 0.1f * this.gravDir; + if ((double) this.gravDir == 1.0) + { + if ((double) this.velocity.Y > 0.0) + this.velocity.Y -= 0.5f; + else if ((double) this.velocity.Y > -(double) Player.jumpSpeed * 0.5) + this.velocity.Y -= 0.1f; + if ((double) this.velocity.Y < -(double) Player.jumpSpeed * 1.5) + this.velocity.Y = (float) (-(double) Player.jumpSpeed * 1.5); + } + else + { + if ((double) this.velocity.Y < 0.0) + this.velocity.Y += 0.5f; + else if ((double) this.velocity.Y < (double) Player.jumpSpeed * 0.5) + this.velocity.Y += 0.1f; + if ((double) this.velocity.Y > (double) Player.jumpSpeed * 1.5) + this.velocity.Y = Player.jumpSpeed * 1.5f; + } + } + else if (!wingFlap) + { + if (this.mount.CanHover()) + this.mount.Hover(this); + else if (this.mount.CanFly() && this.controlJump && this.jump == 0) + { + if (this.mount.Flight()) + { + if (this.TryingToHoverDown) + { + this.velocity.Y *= 0.9f; + if ((double) this.velocity.Y > -1.0 && (double) this.velocity.Y < 0.5) + this.velocity.Y = 1E-05f; + } + else + { + float jumpSpeed = Player.jumpSpeed; + if (this.mount.Type == 50) + jumpSpeed *= 0.5f; + if ((double) this.velocity.Y > 0.0) + this.velocity.Y -= 0.5f; + else if ((double) this.velocity.Y > -(double) jumpSpeed * 1.5) + this.velocity.Y -= 0.1f; + if ((double) this.velocity.Y < -(double) jumpSpeed * 1.5) + this.velocity.Y = (float) (-(double) jumpSpeed * 1.5); + } + } + else + { + this.velocity.Y += this.gravity / 3f * this.gravDir; + if ((double) this.gravDir == 1.0) + { + if ((double) this.velocity.Y > (double) this.maxFallSpeed / 3.0 && !this.TryingToHoverDown) + this.velocity.Y = this.maxFallSpeed / 3f; + } + else if ((double) this.velocity.Y < -(double) this.maxFallSpeed / 3.0 && !this.TryingToHoverUp) + this.velocity.Y = (float) (-(double) this.maxFallSpeed / 3.0); + } + } + else if (this.slowFall && !this.TryingToHoverDown) + { + this.gravity = !this.TryingToHoverUp ? this.gravity / 3f * this.gravDir : this.gravity / 10f * this.gravDir; + this.velocity.Y += this.gravity; + } + else if (this.wingsLogic > 0 && this.controlJump && (double) this.velocity.Y > 0.0) + { + bool flag18 = this.wingsLogic != this.wings; + this.fallStart = (int) ((double) this.position.Y / 16.0); + if ((double) this.velocity.Y > 0.0) + { + if (this.wings == 10 && Main.rand.Next(3) == 0) + { + int num18 = 4; + if (this.direction == 1) + num18 = -40; + int index = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num18, (float) ((double) this.position.Y + (double) (this.height / 2) - 15.0)), 30, 30, 76, Alpha: 50, Scale: 0.6f); + Main.dust[index].fadeIn = 1.1f; + Main.dust[index].noGravity = true; + Main.dust[index].noLight = true; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + if (this.wings == 34 && this.ShouldDrawWingsThatAreAlwaysAnimated() && Main.rand.Next(3) == 0) + { + int num19 = 4; + if (this.direction == 1) + num19 = -40; + int index = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num19, (float) ((double) this.position.Y + (double) (this.height / 2) - 15.0)), 30, 30, 261, Alpha: 50, Scale: 0.6f); + Main.dust[index].fadeIn = 1.1f; + Main.dust[index].noGravity = true; + Main.dust[index].noLight = true; + Main.dust[index].noLightEmittence = flag18; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + if (this.wings == 40) + this.ShouldDrawWingsThatAreAlwaysAnimated(); + if (this.wings == 44) + this.ShouldDrawWingsThatAreAlwaysAnimated(); + if (this.wings == 9 && Main.rand.Next(3) == 0) + { + int num20 = 8; + if (this.direction == 1) + num20 = -40; + int index = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num20, (float) ((double) this.position.Y + (double) (this.height / 2) - 15.0)), 30, 30, 6, Alpha: 200, Scale: 2f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].noLightEmittence = flag18; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + if (this.wings == 29 && Main.rand.Next(3) == 0) + { + int num21 = 8; + if (this.direction == 1) + num21 = -40; + int index = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num21, (float) ((double) this.position.Y + (double) (this.height / 2) - 15.0)), 30, 30, 6, Alpha: 100, Scale: 2.4f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].noLightEmittence = flag18; + if (Main.rand.Next(10) == 0) + Main.dust[index].fadeIn = 2f; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + if (this.wings == 6) + { + if (Main.rand.Next(10) == 0) + { + int num22 = 4; + if (this.direction == 1) + num22 = -40; + int index = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num22, (float) ((double) this.position.Y + (double) (this.height / 2) - 12.0)), 30, 20, 55, Alpha: 200); + Main.dust[index].noLightEmittence = flag18; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + } + else if (this.wings == 5 && Main.rand.Next(6) == 0) + { + int num23 = 6; + if (this.direction == 1) + num23 = -30; + int index = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num23, this.position.Y), 18, this.height, 58, Alpha: ((int) byte.MaxValue), Scale: 1.2f); + Main.dust[index].velocity *= 0.3f; + Main.dust[index].noLightEmittence = flag18; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + if (this.wings == 4) + { + --this.rocketDelay2; + if (this.rocketDelay2 <= 0) + { + SoundEngine.PlaySound(SoundID.Item13, this.position); + this.rocketDelay2 = 60; + } + int Type = 6; + float Scale = 1.5f; + int Alpha = 100; + float x = (float) ((double) this.position.X + (double) (this.width / 2) + 16.0); + if (this.direction > 0) + x = (float) ((double) this.position.X + (double) (this.width / 2) - 26.0); + float y = (float) ((double) this.position.Y + (double) this.height - 18.0); + if (Main.rand.Next(2) == 1) + { + x = (float) ((double) this.position.X + (double) (this.width / 2) + 8.0); + if (this.direction > 0) + x = (float) ((double) this.position.X + (double) (this.width / 2) - 20.0); + y += 6f; + } + int index = Dust.NewDust(new Vector2(x, y), 8, 8, Type, Alpha: Alpha, Scale: Scale); + Main.dust[index].velocity.X *= 0.3f; + Main.dust[index].velocity.Y += 10f; + Main.dust[index].noGravity = true; + Main.dust[index].noLightEmittence = flag18; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + ++this.wingFrameCounter; + if (this.wingFrameCounter > 4) + { + ++this.wingFrame; + this.wingFrameCounter = 0; + if (this.wingFrame >= 3) + this.wingFrame = 0; + } + } + else if (this.wings != 22 && this.wings != 28) + { + if (this.wings == 30) + { + ++this.wingFrameCounter; + int num24 = 5; + if (this.wingFrameCounter >= num24 * 3) + this.wingFrameCounter = 0; + this.wingFrame = 1 + this.wingFrameCounter / num24; + } + else if (this.wings == 34) + { + ++this.wingFrameCounter; + int num25 = 7; + if (this.wingFrameCounter >= num25 * 6) + this.wingFrameCounter = 0; + this.wingFrame = this.wingFrameCounter / num25; + } + else if (this.wings != 45) + { + if (this.wings == 40) + this.wingFrame = 0; + else if (this.wings == 44) + this.wingFrame = 2; + else if (this.wings == 39) + { + ++this.wingFrameCounter; + int num26 = 12; + if (this.wingFrameCounter >= num26 * 6) + this.wingFrameCounter = 0; + this.wingFrame = this.wingFrameCounter / num26; + } + else if (this.wings == 26) + { + int num27 = 6; + if (this.direction == 1) + num27 = -30; + int index7 = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num27, this.position.Y), 18, this.height, 217, Alpha: 100, Scale: 1.4f); + Main.dust[index7].noGravity = true; + Main.dust[index7].noLight = true; + Main.dust[index7].velocity /= 4f; + Main.dust[index7].velocity -= this.velocity; + Main.dust[index7].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + if (Main.rand.Next(2) == 0) + { + int num28 = -24; + if (this.direction == 1) + num28 = 12; + float y = this.position.Y; + if ((double) this.gravDir == -1.0) + y += (float) (this.height / 2); + int index8 = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num28, y), 12, this.height / 2, 217, Alpha: 100, Scale: 1.4f); + Main.dust[index8].noGravity = true; + Main.dust[index8].noLight = true; + Main.dust[index8].velocity /= 4f; + Main.dust[index8].velocity -= this.velocity; + Main.dust[index8].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + this.wingFrame = 2; + } + else if (this.wings == 37) + { + Color color = Color.Lerp(Color.Black, Color.White, Main.rand.NextFloat()); + int num29 = 6; + if (this.direction == 1) + num29 = -30; + int index9 = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num29, this.position.Y), 24, this.height, Utils.SelectRandom(Main.rand, 31, 31, 31), Alpha: 100, Scale: 0.7f); + Main.dust[index9].noGravity = true; + Main.dust[index9].noLight = true; + Main.dust[index9].velocity /= 4f; + Main.dust[index9].velocity -= this.velocity; + Main.dust[index9].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + if (Main.dust[index9].type == 55) + Main.dust[index9].color = color; + if (Main.rand.Next(3) == 0) + { + int num30 = -24; + if (this.direction == 1) + num30 = 12; + float y = this.position.Y; + if ((double) this.gravDir == -1.0) + y += (float) (this.height / 2); + int index10 = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num30, y), 12, this.height / 2, Utils.SelectRandom(Main.rand, 31, 31, 31), Alpha: 140, Scale: 0.7f); + Main.dust[index10].noGravity = true; + Main.dust[index10].noLight = true; + Main.dust[index10].velocity /= 4f; + Main.dust[index10].velocity -= this.velocity; + Main.dust[index10].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + if (Main.dust[index10].type == 55) + Main.dust[index10].color = color; + } + this.wingFrame = 2; + } + else if (this.wings != 24) + this.wingFrame = this.wings != 43 ? (this.wings != 12 ? 2 : 3) : 1; + } + } + } + this.velocity.Y += this.gravity / 3f * this.gravDir; + if ((double) this.gravDir == 1.0) + { + if ((double) this.velocity.Y > (double) this.maxFallSpeed / 3.0 && !this.TryingToHoverDown) + this.velocity.Y = this.maxFallSpeed / 3f; + } + else if ((double) this.velocity.Y < -(double) this.maxFallSpeed / 3.0 && !this.TryingToHoverUp) + this.velocity.Y = (float) (-(double) this.maxFallSpeed / 3.0); + } + else if (this.cartRampTime <= 0) + this.velocity.Y += this.gravity * this.gravDir; + else + --this.cartRampTime; + } + if (!this.mount.Active || this.mount.Type != 5) + { + if ((double) this.gravDir == 1.0) + { + if ((double) this.velocity.Y > (double) this.maxFallSpeed) + this.velocity.Y = this.maxFallSpeed; + if (this.slowFall && (double) this.velocity.Y > (double) this.maxFallSpeed / 3.0 && !this.TryingToHoverDown) + this.velocity.Y = this.maxFallSpeed / 3f; + if (this.slowFall && (double) this.velocity.Y > (double) this.maxFallSpeed / 5.0 && this.TryingToHoverUp) + this.velocity.Y = this.maxFallSpeed / 10f; + } + else + { + if ((double) this.velocity.Y < -(double) this.maxFallSpeed) + this.velocity.Y = -this.maxFallSpeed; + if (this.slowFall && (double) this.velocity.Y < -(double) this.maxFallSpeed / 3.0 && !this.TryingToHoverDown) + this.velocity.Y = (float) (-(double) this.maxFallSpeed / 3.0); + if (this.slowFall && (double) this.velocity.Y < -(double) this.maxFallSpeed / 5.0 && this.TryingToHoverUp) + this.velocity.Y = (float) (-(double) this.maxFallSpeed / 10.0); + } + } + } + } + else + this.UpdateControlHolds(); + if (this.mount.Active) + this.wingFrame = 0; + if ((this.wingsLogic == 22 || this.wingsLogic == 28 || this.wingsLogic == 30 || this.wingsLogic == 31 || this.wingsLogic == 33 || this.wingsLogic == 35 || this.wingsLogic == 37 || this.wingsLogic == 45) && this.TryingToHoverDown && this.controlJump && (double) this.wingTime > 0.0 && !this.merman) + { + float num31 = 0.9f; + if (this.wingsLogic == 45) + num31 = 0.8f; + this.velocity.Y *= num31; + if ((double) this.velocity.Y > -2.0 && (double) this.velocity.Y < 1.0) + this.velocity.Y = 1E-05f; + } + if (this.wingsLogic == 37 && this.TryingToHoverDown && this.controlJump && (double) this.wingTime > 0.0 && !this.merman) + { + this.velocity.Y *= 0.92f; + if ((double) this.velocity.Y > -2.0 && (double) this.velocity.Y < 1.0) + this.velocity.Y = 1E-05f; + } + this.GrabItems(i); + this.LookForTileInteractions(); + if (this.tongued) + { + this.StopVanityActions(); + bool flag19 = false; + if (Main.wofNPCIndex >= 0) + { + float num32 = Main.npc[Main.wofNPCIndex].position.X + (float) (Main.npc[Main.wofNPCIndex].width / 2) + (float) (Main.npc[Main.wofNPCIndex].direction * 200); + double num33 = (double) Main.npc[Main.wofNPCIndex].position.Y + (double) (Main.npc[Main.wofNPCIndex].height / 2); + Vector2 center = this.Center; + float num34 = num32 - center.X; + double y = (double) center.Y; + float num35 = (float) (num33 - y); + float num36 = (float) Math.Sqrt((double) num34 * (double) num34 + (double) num35 * (double) num35); + float num37 = 11f; + float num38; + if ((double) num36 > (double) num37) + { + num38 = num37 / num36; + } + else + { + num38 = 1f; + flag19 = true; + } + float num39 = num34 * num38; + float num40 = num35 * num38; + this.velocity.X = num39; + this.velocity.Y = num40; + } + else + flag19 = true; + if (flag19 && Main.myPlayer == this.whoAmI) + { + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] == 38) + this.DelBuff(b); + } + } + } + if (Main.myPlayer == this.whoAmI) + { + this.WOFTongue(); + if (this.controlHook) + { + if (this.releaseHook) + this.QuickGrapple(); + this.releaseHook = false; + } + else + this.releaseHook = true; + if (this.talkNPC >= 0 && (!new Microsoft.Xna.Framework.Rectangle((int) ((double) this.position.X + (double) (this.width / 2) - (double) (Player.tileRangeX * 16)), (int) ((double) this.position.Y + (double) (this.height / 2) - (double) (Player.tileRangeY * 16)), Player.tileRangeX * 16 * 2, Player.tileRangeY * 16 * 2).Intersects(new Microsoft.Xna.Framework.Rectangle((int) Main.npc[this.talkNPC].position.X, (int) Main.npc[this.talkNPC].position.Y, Main.npc[this.talkNPC].width, Main.npc[this.talkNPC].height)) || this.chest != -1 || !Main.npc[this.talkNPC].active || this.tileEntityAnchor.InUse)) + { + if (this.chest == -1) + SoundEngine.PlaySound(11); + this.SetTalkNPC(-1); + Main.npcChatCornerItem = 0; + Main.npcChatText = ""; + } + if (this.sign >= 0) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) ((double) this.position.X + (double) (this.width / 2) - (double) (Player.tileRangeX * 16)), (int) ((double) this.position.Y + (double) (this.height / 2) - (double) (Player.tileRangeY * 16)), Player.tileRangeX * 16 * 2, Player.tileRangeY * 16 * 2); + try + { + bool flag20 = false; + if (Main.sign[this.sign] == null) + flag20 = true; + if (!flag20 && !new Microsoft.Xna.Framework.Rectangle(Main.sign[this.sign].x * 16, Main.sign[this.sign].y * 16, 32, 32).Intersects(rectangle)) + flag20 = true; + if (flag20) + { + SoundEngine.PlaySound(11); + this.sign = -1; + Main.editSign = false; + Main.npcChatText = ""; + } + } + catch + { + SoundEngine.PlaySound(11); + this.sign = -1; + Main.editSign = false; + Main.npcChatText = ""; + } + } + if (Main.editSign) + { + if (this.sign == -1) + Main.editSign = false; + else + Main.InputTextSign(); + } + else if (Main.editChest) + { + Main.InputTextChest(); + if (Main.player[Main.myPlayer].chest == -1) + Main.editChest = false; + } + if (this.mount.Active && this.mount.Cart && (double) Math.Abs(this.velocity.X) > 4.0) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height); + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && !Main.npc[index].dontTakeDamage && !Main.npc[index].friendly && Main.npc[index].immune[i] == 0 && this.CanNPCBeHitByPlayerOrPlayerProjectile(Main.npc[index]) && rectangle.Intersects(new Microsoft.Xna.Framework.Rectangle((int) Main.npc[index].position.X, (int) Main.npc[index].position.Y, Main.npc[index].width, Main.npc[index].height))) + { + float num41 = (float) this.meleeCrit; + if ((double) num41 < (double) this.rangedCrit) + num41 = (float) this.rangedCrit; + if ((double) num41 < (double) this.magicCrit) + num41 = (float) this.magicCrit; + bool crit = false; + if ((double) Main.rand.Next(1, 101) <= (double) num41) + crit = true; + int damage; + float knockback; + this.GetMinecartDamage(Math.Abs(this.velocity.X) / this.maxRunSpeed, out damage, out knockback); + int direction = 1; + if ((double) this.velocity.X < 0.0) + direction = -1; + if (this.whoAmI == Main.myPlayer) + this.ApplyDamageToNPC(Main.npc[index], damage, knockback, direction, crit); + Main.npc[index].immune[i] = 30; + if (!Main.npc[index].active) + AchievementsHelper.HandleSpecialEvent(this, 9); + } + } + } + this.Update_NPCCollision(); + Vector2 vector2 = !this.mount.Active || !this.mount.Cart ? Collision.HurtTiles(this.position, this.velocity, this.width, this.height, this.fireWalk) : Collision.HurtTiles(this.position, this.velocity, this.width, this.height - 16, this.fireWalk); + if ((double) vector2.Y == 0.0 && !this.fireWalk) + { + foreach (Point touchedTile in this.TouchedTiles) + { + Tile tile = Main.tile[touchedTile.X, touchedTile.Y]; + if (tile != null && tile.active() && tile.nactive() && !this.fireWalk && TileID.Sets.TouchDamageHot[(int) tile.type] != 0) + { + vector2.Y = (float) TileID.Sets.TouchDamageHot[(int) tile.type]; + vector2.X = (double) this.Center.X / 16.0 < (double) touchedTile.X + 0.5 ? -1f : 1f; + break; + } + } + } + if ((double) vector2.Y == 20.0) + this.AddBuff(67, 20); + else if ((double) vector2.Y == 15.0) + { + if (this.suffocateDelay < (byte) 5) + ++this.suffocateDelay; + else + this.AddBuff(68, 1); + } + else if ((double) vector2.Y != 0.0) + { + int Damage = Main.DamageVar(vector2.Y, -this.luck); + this.Hurt(PlayerDeathReason.ByOther(3), Damage, 0, cooldownCounter: 0); + if ((double) vector2.Y == 60.0 || (double) vector2.Y == 80.0) + this.AddBuff(30, Main.rand.Next(240, 600)); + } + else + this.suffocateDelay = (byte) 0; + } + if (this.controlRight) + { + this.releaseRight = false; + } + else + { + this.releaseRight = true; + this.rightTimer = 7; + } + if (this.controlLeft) + { + this.releaseLeft = false; + } + else + { + this.releaseLeft = true; + this.leftTimer = 7; + } + this.releaseDown = !this.controlDown; + if (this.rightTimer > 0) + --this.rightTimer; + else if (this.controlRight) + this.rightTimer = 7; + if (this.leftTimer > 0) + --this.leftTimer; + else if (this.controlLeft) + this.leftTimer = 7; + this.GrappleMovement(); + this.StickyMovement(); + this.CheckDrowning(); + if ((double) this.gravDir == -1.0) + { + this.waterWalk = false; + this.waterWalk2 = false; + } + int height = this.height; + if (this.waterWalk) + height -= 6; + bool flag21 = Collision.LavaCollision(this.position, this.width, height); + if (flag21) + { + if (!this.lavaImmune && Main.myPlayer == i && !this.immune) + { + if (this.lavaTime > 0) + --this.lavaTime; + else if (this.lavaRose) + { + this.Hurt(PlayerDeathReason.ByOther(2), 50, 0); + this.AddBuff(24, 210); + } + else + { + this.Hurt(PlayerDeathReason.ByOther(2), 80, 0); + this.AddBuff(24, 420); + } + } + this.lavaWet = true; + } + else + { + this.lavaWet = false; + if (this.lavaTime < this.lavaMax) + ++this.lavaTime; + } + if (this.lavaTime > this.lavaMax) + this.lavaTime = this.lavaMax; + if (this.waterWalk2 && !this.waterWalk) + { + int num42 = height - 6; + } + int num43 = Collision.WetCollision(this.position, this.width, this.height) ? 1 : 0; + bool honey = Collision.honey; + if (honey) + { + this.AddBuff(48, 1800); + this.honeyWet = true; + } + if (num43 != 0) + { + if (this.onFire && !this.lavaWet) + { + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] == 24) + this.DelBuff(b); + } + } + if (!this.wet) + { + if (this.wetCount == (byte) 0) + { + this.wetCount = (byte) 10; + if (!flag21) + { + if (this.honeyWet) + { + for (int index11 = 0; index11 < 20; ++index11) + { + int index12 = Dust.NewDust(new Vector2(this.position.X - 6f, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width + 12, 24, 152); + --Main.dust[index12].velocity.Y; + Main.dust[index12].velocity.X *= 2.5f; + Main.dust[index12].scale = 1.3f; + Main.dust[index12].alpha = 100; + Main.dust[index12].noGravity = true; + } + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + else + { + for (int index13 = 0; index13 < 50; ++index13) + { + int index14 = Dust.NewDust(new Vector2(this.position.X - 6f, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width + 12, 24, Dust.dustWater()); + Main.dust[index14].velocity.Y -= 3f; + Main.dust[index14].velocity.X *= 2.5f; + Main.dust[index14].scale = 0.8f; + Main.dust[index14].alpha = 100; + Main.dust[index14].noGravity = true; + } + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y, 0); + } + } + else + { + for (int index15 = 0; index15 < 20; ++index15) + { + int index16 = Dust.NewDust(new Vector2(this.position.X - 6f, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width + 12, 24, 35); + Main.dust[index16].velocity.Y -= 1.5f; + Main.dust[index16].velocity.X *= 2.5f; + Main.dust[index16].scale = 1.3f; + Main.dust[index16].alpha = 100; + Main.dust[index16].noGravity = true; + } + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + } + this.wet = true; + if (this.ShouldFloatInWater) + { + this.velocity.Y /= 2f; + if ((double) this.velocity.Y > 3.0) + this.velocity.Y = 3f; + } + } + } + else if (this.wet) + { + this.wet = false; + if (this.jump > Player.jumpHeight / 5 && this.wetSlime == (byte) 0) + this.jump = Player.jumpHeight / 5; + if (this.wetCount == (byte) 0) + { + this.wetCount = (byte) 10; + if (!this.lavaWet) + { + if (this.honeyWet) + { + for (int index17 = 0; index17 < 20; ++index17) + { + int index18 = Dust.NewDust(new Vector2(this.position.X - 6f, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width + 12, 24, 152); + --Main.dust[index18].velocity.Y; + Main.dust[index18].velocity.X *= 2.5f; + Main.dust[index18].scale = 1.3f; + Main.dust[index18].alpha = 100; + Main.dust[index18].noGravity = true; + } + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + else + { + for (int index19 = 0; index19 < 50; ++index19) + { + int index20 = Dust.NewDust(new Vector2(this.position.X - 6f, this.position.Y + (float) (this.height / 2)), this.width + 12, 24, Dust.dustWater()); + Main.dust[index20].velocity.Y -= 4f; + Main.dust[index20].velocity.X *= 2.5f; + Main.dust[index20].scale = 0.8f; + Main.dust[index20].alpha = 100; + Main.dust[index20].noGravity = true; + } + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y, 0); + } + } + else + { + for (int index21 = 0; index21 < 20; ++index21) + { + int index22 = Dust.NewDust(new Vector2(this.position.X - 6f, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width + 12, 24, 35); + Main.dust[index22].velocity.Y -= 1.5f; + Main.dust[index22].velocity.X *= 2.5f; + Main.dust[index22].scale = 1.3f; + Main.dust[index22].alpha = 100; + Main.dust[index22].noGravity = true; + } + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + } + } + if (!honey) + this.honeyWet = false; + if (!this.wet) + { + this.lavaWet = false; + this.honeyWet = false; + } + if (this.wetCount > (byte) 0) + --this.wetCount; + if (this.wetSlime > (byte) 0) + --this.wetSlime; + if (this.wet && this.mount.Active) + { + switch (this.mount.Type) + { + case 3: + case 50: + this.wetSlime = (byte) 30; + if ((double) this.velocity.Y > 2.0) + this.velocity.Y *= 0.9f; + this.velocity.Y -= 0.5f; + if ((double) this.velocity.Y < -4.0) + { + this.velocity.Y = -4f; + break; + } + break; + case 5: + case 7: + if (this.whoAmI == Main.myPlayer) + { + this.mount.Dismount(this); + break; + } + break; + } + } + if (Main.expertMode && this.ZoneSnow && this.wet && !this.lavaWet && !this.honeyWet && !this.arcticDivingGear) + this.AddBuff(46, 150); + float num44 = (float) (1.0 + (double) Math.Abs(this.velocity.X) / 3.0); + if ((double) this.gfxOffY > 0.0) + { + this.gfxOffY -= num44 * this.stepSpeed; + if ((double) this.gfxOffY < 0.0) + this.gfxOffY = 0.0f; + } + else if ((double) this.gfxOffY < 0.0) + { + this.gfxOffY += num44 * this.stepSpeed; + if ((double) this.gfxOffY > 0.0) + this.gfxOffY = 0.0f; + } + if ((double) this.gfxOffY > 32.0) + this.gfxOffY = 32f; + if ((double) this.gfxOffY < -32.0) + this.gfxOffY = -32f; + if (Main.myPlayer == i) + { + if (!this.iceSkate) + this.CheckIceBreak(); + this.CheckCrackedBrickBreak(); + } + this.SlopeDownMovement(); + bool flag22 = this.mount.Type == 7 || this.mount.Type == 8 || this.mount.Type == 12 || this.mount.Type == 44 || this.mount.Type == 48 || this.mount.Type == 49; + if ((double) this.velocity.Y == (double) this.gravity && (!this.mount.Active || !this.mount.Cart && !flag22)) + Collision.StepDown(ref this.position, ref this.velocity, this.width, this.height, ref this.stepSpeed, ref this.gfxOffY, (int) this.gravDir, this.waterWalk || this.waterWalk2); + if ((double) this.gravDir == -1.0) + { + if ((this.carpetFrame != -1 || (double) this.velocity.Y <= (double) this.gravity) && !this.controlUp) + Collision.StepUp(ref this.position, ref this.velocity, this.width, this.height, ref this.stepSpeed, ref this.gfxOffY, (int) this.gravDir, this.controlUp); + } + else if ((this.carpetFrame != -1 || (double) this.velocity.Y >= (double) this.gravity) && !this.controlDown && !this.mount.Cart && !flag22 && this.grappling[0] == -1) + Collision.StepUp(ref this.position, ref this.velocity, this.width, this.height, ref this.stepSpeed, ref this.gfxOffY, (int) this.gravDir, this.controlUp); + this.oldPosition = this.position; + this.oldDirection = this.direction; + bool Falling = false; + if ((double) this.velocity.Y > (double) this.gravity) + Falling = true; + if ((double) this.velocity.Y < -(double) this.gravity) + Falling = true; + Vector2 velocity1 = this.velocity; + this.slideDir = 0; + bool ignorePlats = false; + bool fallThrough = this.controlDown; + if ((((double) this.gravDir == -1.0 ? 1 : 0) | (!this.mount.Active ? 0 : (this.mount.Cart || this.mount.Type == 12 || this.mount.Type == 7 || this.mount.Type == 8 || this.mount.Type == 23 || this.mount.Type == 44 ? 1 : (this.mount.Type == 48 ? 1 : 0))) | (this.GoingDownWithGrapple ? 1 : 0)) != 0) + { + ignorePlats = true; + fallThrough = true; + } + this.onTrack = false; + bool flag23 = false; + if (this.mount.Active && this.mount.Cart) + { + float num45 = this.ignoreWater || this.merman ? 1f : (!this.honeyWet ? (!this.wet ? 1f : 0.5f) : 0.25f); + this.velocity = this.velocity * num45; + DelegateMethods.Minecart.rotation = this.fullRotation; + DelegateMethods.Minecart.rotationOrigin = this.fullRotationOrigin; + BitsByte bitsByte = Minecart.TrackCollision(ref this.position, ref this.velocity, ref this.lastBoost, this.width, this.height, this.controlDown, this.controlUp, this.fallStart2, false, this.mount.Delegations); + if (bitsByte[0]) + { + this.onTrack = true; + this.gfxOffY = Minecart.TrackRotation(ref this.fullRotation, this.position + this.velocity, this.width, this.height, this.controlDown, this.controlUp, this.mount.Delegations); + this.fullRotationOrigin = new Vector2((float) (this.width / 2), (float) this.height); + } + if (bitsByte[1]) + { + if (this.controlLeft || this.controlRight) + this.cartFlip = !this.cartFlip; + if ((double) this.velocity.X > 0.0) + this.direction = 1; + else if ((double) this.velocity.X < 0.0) + this.direction = -1; + this.mount.Delegations.MinecartBumperSound(this.position, this.width, this.height); + } + this.velocity = this.velocity / num45; + if (bitsByte[3] && this.whoAmI == Main.myPlayer) + flag23 = true; + if (bitsByte[2]) + this.cartRampTime = (int) ((double) Math.Abs(this.velocity.X) / (double) this.mount.RunSpeed * 20.0); + if (bitsByte[4]) + this.trackBoost -= 4f; + if (bitsByte[5]) + this.trackBoost += 4f; + } + bool flag24 = this.whoAmI == Main.myPlayer && !this.mount.Active; + Vector2 position = this.position; + if (this.vortexDebuff) + this.velocity.Y = (float) ((double) this.velocity.Y * 0.800000011920929 + Math.Cos((double) this.Center.X % 120.0 / 120.0 * 6.28318548202515) * 5.0 * 0.200000002980232); + if (this.tongued) + { + this.position = this.position + this.velocity; + flag24 = false; + } + else if (this.honeyWet && !this.ignoreWater) + this.HoneyCollision(fallThrough, ignorePlats); + else if (this.wet && !this.merman && !this.ignoreWater && !this.trident) + { + this.WaterCollision(fallThrough, ignorePlats); + } + else + { + this.DryCollision(fallThrough, ignorePlats); + if (this.mount.Active && this.mount.IsConsideredASlimeMount && (double) this.velocity.Y != 0.0 && !this.SlimeDontHyperJump) + { + Vector2 velocity2 = this.velocity; + this.velocity.X = 0.0f; + this.DryCollision(fallThrough, ignorePlats); + this.velocity.X = velocity2.X; + } + if (this.mount.Active && this.mount.Type == 43 && (double) this.velocity.Y != 0.0) + { + Vector2 velocity3 = this.velocity; + this.velocity.X = 0.0f; + this.DryCollision(fallThrough, ignorePlats); + this.velocity.X = velocity3.X; + } + } + this.UpdateTouchingTiles(); + this.TryBouncingBlocks(Falling); + this.TryLandingOnDetonator(); + if (!this.tongued) + { + this.SlopingCollision(fallThrough, ignorePlats); + if (!this.isLockedToATile) + Collision.StepConveyorBelt((Entity) this, this.gravDir); + } + if (flag24 && (double) this.velocity.Y == 0.0) + AchievementsHelper.HandleRunning(Math.Abs(this.position.X - position.X)); + if (flag23) + { + NetMessage.SendData(13, number: this.whoAmI); + Minecart.HitTrackSwitch(new Vector2(this.position.X, this.position.Y), this.width, this.height); + } + if ((double) velocity1.X != (double) this.velocity.X) + { + if ((double) velocity1.X < 0.0) + this.slideDir = -1; + else if ((double) velocity1.X > 0.0) + this.slideDir = 1; + } + if ((double) this.gravDir == 1.0 && Collision.up) + { + this.velocity.Y = 0.01f; + if (!this.merman) + this.jump = 0; + } + else if ((double) this.gravDir == -1.0 && Collision.down) + { + this.velocity.Y = -0.01f; + if (!this.merman) + this.jump = 0; + } + if ((double) this.velocity.Y == 0.0 && this.grappling[0] == -1) + this.FloorVisuals(Falling); + if (this.whoAmI == Main.myPlayer) + Collision.SwitchTiles(this.position, this.width, this.height, this.oldPosition, 1); + PressurePlateHelper.UpdatePlayerPosition(this); + this.BordersMovement(); + this.numMinions = 0; + this.slotsMinions = 0.0f; + if (this.mount.Type != 8) + this.ItemCheck_ManageRightClickFeatures(); + this.ItemCheckWrapped(i); + this.PlayerFrame(); + if (this.mount.Type == 8) + this.mount.UseDrill(this); + if (this.statLife > this.statLifeMax2) + this.statLife = this.statLifeMax2; + if (this.statMana > this.statManaMax2) + this.statMana = this.statManaMax2; + this.grappling[0] = -1; + this.grapCount = 0; + this.UpdateReleaseUseTile(); + this.UpdateAdvancedShadows(); + } + } + + private void UpdateControlHolds() + { + if (this.controlUp) + this.releaseUp = false; + else + this.releaseUp = true; + } + + public void TryOpeningFullscreenMap() + { + if (!Main.mapEnabled) + return; + Main.playerInventory = false; + this.sign = -1; + Main.editSign = false; + this.SetTalkNPC(-1); + Main.npcChatCornerItem = 0; + SoundEngine.PlaySound(10); + Main.mapFullscreenScale = 2.5f; + Main.mapFullscreen = true; + Main.resetMapFull = true; + Main.buffString = string.Empty; + } + + public void UpdateLuckFactors() + { + this.UpdateLadyBugLuckTime(); + if (this.whoAmI != Main.myPlayer) + return; + float torchLuck = this.torchLuck; + this.TryRecalculatingTorchLuck(); + if ((double) this.torchLuck == (double) torchLuck) + return; + this.luckNeedsSync = true; + } + + public void RecalculateLuck() + { + this.luck = (float) ((double) this.GetLadyBugLuck() * 0.200000002980232 + (double) this.torchLuck * 0.200000002980232); + this.luck += (float) this.luckPotion * 0.1f; + if (LanternNight.LanternsUp) + this.luck += 0.3f; + if (!this.HasGardenGnomeNearby) + return; + this.luck += 0.2f; + } + + private static int GetMouseScrollDelta() => PlayerInput.ScrollWheelDelta / 120; + + private void UpdatePortableStoolUsage() + { + bool flag = this.portableStoolInfo.HasAStool && this.controlUp && !this.gravControl && !this.mount.Active && (double) this.velocity.X == 0.0 && (double) this.velocity.Y == 0.0 && !this.pulley && this.grappling[0] == -1; + if (flag) + flag = this.CanFitSpace(this.portableStoolInfo.HeightBoost); + if (!flag) + return; + this.portableStoolInfo.IsInUse = true; + this.ResizeHitbox(); + } + + private void ResizeHitbox() + { + this.position.Y += (float) this.height; + this.height = 42 + this.HeightOffsetBoost; + this.position.Y -= (float) this.height; + } + + private void UpdateReleaseUseTile() + { + bool flag = !this.tileInteractAttempted; + if (this._lockTileInteractionsTimer > 0 && !this.releaseUseTile) + flag = false; + this.releaseUseTile = flag; + if (this._lockTileInteractionsTimer <= 0) + return; + --this._lockTileInteractionsTimer; + } + + private void GetMinecartDamage(float currentSpeed, out int damage, out float knockback) + { + switch (this.mount.Type) + { + case 11: + damage = Main.DamageVar((float) (50.0 + 100.0 * (double) currentSpeed), this.luck); + break; + case 13: + damage = Main.DamageVar((float) (15.0 + 30.0 * (double) currentSpeed), this.luck); + break; + case 15: + case 16: + case 18: + case 19: + case 20: + case 21: + case 22: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 38: + case 39: + damage = Main.DamageVar((float) (25.0 + 55.0 * (double) currentSpeed), this.luck); + break; + default: + damage = Main.DamageVar((float) (25.0 + 55.0 * (double) currentSpeed), this.luck); + break; + } + knockback = (float) (5.0 + 25.0 * (double) currentSpeed); + } + + public void UpdateMiscCounter() + { + ++this.miscCounter; + if (this.miscCounter < 300) + return; + this.miscCounter = 0; + } + + private void WingAirLogicTweaks() + { + if (this.wingsLogic < 1) + return; + WingStats wingStats = this.GetWingStats(this.wingsLogic); + bool flag = this.TryingToHoverDown && this.controlJump && (double) this.wingTime > 0.0; + if (wingStats.HasDownHoverStats & flag) + { + if ((double) wingStats.DownHoverSpeedOverride != -1.0) + this.accRunSpeed = wingStats.DownHoverSpeedOverride; + this.runAcceleration *= wingStats.DownHoverAccelerationMult; + } + else + { + if ((double) wingStats.AccRunSpeedOverride != -1.0 && (double) wingStats.AccRunSpeedOverride > (double) this.accRunSpeed) + this.accRunSpeed = wingStats.AccRunSpeedOverride; + this.runAcceleration *= wingStats.AccRunAccelerationMult; + } + if (this.wingsLogic != 45) + return; + this.runSlowdown *= 6f; + } + + private void RocketBootVisuals() + { + int num1 = this.height; + if ((double) this.gravDir == -1.0) + num1 = 4; + for (int index = 0; index < 2; ++index) + { + int num2 = index == 0 ? 2 : -2; + Microsoft.Xna.Framework.Rectangle r = index != 0 ? new Microsoft.Xna.Framework.Rectangle((int) this.position.X + this.width - 4, (int) this.position.Y + num1 - 10, 8, 8) : new Microsoft.Xna.Framework.Rectangle((int) this.position.X - 4, (int) this.position.Y + num1 - 10, 8, 8); + if (this.direction == -1) + r.X -= 4; + int Type = 6; + float Scale = 2.5f; + int Alpha = 100; + float num3 = 1f; + Vector2 vector2 = new Vector2((float) -num2 - this.velocity.X * 0.3f, (float) (2.0 * (double) this.gravDir - (double) this.velocity.Y * 0.300000011920929)); + switch (this.rocketBoots) + { + case 1: + if (this.socialShadowRocketBoots) + { + Type = 27; + Scale = 1.5f; + goto default; + } + else + goto default; + case 2: + if (this.fairyBoots) + { + Type = (int) Main.rand.NextFromList((short) 61, (short) 61, (short) 61, (short) 242, (short) 64, (short) 63); + Scale = 2f; + Alpha = 120; + goto default; + } + else + { + Type = 16; + Scale = 1.5f; + Alpha = 20; + goto default; + } + case 3: + Type = 76; + Scale = 1f; + Alpha = 20; + goto default; + case 4: + int num4 = Main.rand.Next(6); + r.Y += 2 * (int) this.gravDir; + if (num4 == 0 || num4 == 1) + { + Dust dust = Dust.NewDustDirect(r.TopLeft(), r.Width, r.Height, 278, Alpha: 100, newColor: Color.Lerp(Color.LimeGreen, Color.White, Main.rand.NextFloat() * 0.3f)); + dust.shader = GameShaders.Armor.GetSecondaryShader(this.cShoe, this); + dust.scale = 0.66f; + dust.noGravity = true; + dust.velocity *= 0.25f; + dust.velocity -= this.velocity * 0.5f; + dust.velocity += vector2 * 0.5f; + dust.position += dust.velocity * 4f; + if (Main.rand.Next(5) == 0) + { + dust.fadeIn = 0.8f; + break; + } + break; + } + Type = 107; + Alpha = 100; + Scale = 0.7f; + num3 = 0.5f; + goto default; + default: + Dust dust1 = Dust.NewDustDirect(r.TopLeft(), r.Width, r.Height, Type, Alpha: Alpha, Scale: Scale); + dust1.shader = GameShaders.Armor.GetSecondaryShader(this.cShoe, this); + dust1.velocity += vector2; + dust1.velocity *= num3; + switch (this.rocketBoots) + { + case 1: + dust1.noGravity = true; + break; + case 2: + dust1.velocity *= 0.1f; + break; + case 3: + dust1.velocity *= 0.05f; + dust1.velocity.Y += 0.15f; + dust1.noLight = true; + if (Main.rand.Next(2) == 0) + { + dust1.noGravity = true; + dust1.scale = 1.75f; + break; + } + break; + } + if (this.fairyBoots) + { + dust1.noGravity = true; + dust1.noLightEmittence = true; + break; + } + break; + } + } + } + + public void WingFrame(bool wingFlap) + { + bool flag1 = this.wingsLogic != this.wings; + if (this.wings == 4) + { + if (wingFlap || this.jump > 0) + { + --this.rocketDelay2; + if (this.rocketDelay2 <= 0) + { + SoundEngine.PlaySound(SoundID.Item13, this.position); + this.rocketDelay2 = 60; + } + int num = 2; + if (this.TryingToHoverUp) + num = 4; + for (int index1 = 0; index1 < num; ++index1) + { + int Type = 6; + if (this.head == 41) + { + int body = this.body; + } + float Scale = 1.75f; + int Alpha = 100; + float x = (float) ((double) this.position.X + (double) (this.width / 2) + 16.0); + if (this.direction > 0) + x = (float) ((double) this.position.X + (double) (this.width / 2) - 26.0); + float y = (float) ((double) this.position.Y + (double) this.height - 18.0); + if (index1 == 1 || index1 == 3) + { + x = (float) ((double) this.position.X + (double) (this.width / 2) + 8.0); + if (this.direction > 0) + x = (float) ((double) this.position.X + (double) (this.width / 2) - 20.0); + y += 6f; + } + if (index1 > 1) + y += this.velocity.Y; + int index2 = Dust.NewDust(new Vector2(x, y), 8, 8, Type, Alpha: Alpha, Scale: Scale); + Main.dust[index2].velocity.X *= 0.1f; + Main.dust[index2].velocity.Y = (float) ((double) Main.dust[index2].velocity.Y * 1.0 + 2.0 * (double) this.gravDir - (double) this.velocity.Y * 0.300000011920929); + Main.dust[index2].noGravity = true; + Main.dust[index2].noLightEmittence = flag1; + Main.dust[index2].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + if (num == 4) + Main.dust[index2].velocity.Y += 6f; + } + ++this.wingFrameCounter; + if (this.wingFrameCounter <= 4) + return; + ++this.wingFrame; + this.wingFrameCounter = 0; + if (this.wingFrame < 3) + return; + this.wingFrame = 0; + } + else + { + if (this.controlJump && (double) this.velocity.Y != 0.0) + return; + this.wingFrame = 3; + } + } + else if (this.wings == 28 && this.ShouldDrawWingsThatAreAlwaysAnimated()) + { + if (flag1 || (double) this.velocity.Y == 0.0) + return; + Lighting.AddLight(this.Bottom, 0.3f, 0.1f, 0.4f); + } + else if (this.wings == 22) + { + if (!this.controlJump) + { + this.wingFrame = 0; + this.wingFrameCounter = 0; + } + else if ((double) this.wingTime > 0.0) + { + if (this.TryingToHoverDown) + { + if ((double) this.velocity.X != 0.0) + { + ++this.wingFrameCounter; + int num = 2; + if (this.wingFrameCounter < num) + this.wingFrame = 1; + else if (this.wingFrameCounter < num * 2) + this.wingFrame = 2; + else if (this.wingFrameCounter < num * 3) + this.wingFrame = 3; + else if (this.wingFrameCounter < num * 4 - 1) + { + this.wingFrame = 2; + } + else + { + this.wingFrame = 2; + this.wingFrameCounter = 0; + } + } + else + { + ++this.wingFrameCounter; + int num = 6; + if (this.wingFrameCounter < num) + this.wingFrame = 4; + else if (this.wingFrameCounter < num * 2) + this.wingFrame = 5; + else if (this.wingFrameCounter < num * 3 - 1) + { + this.wingFrame = 4; + } + else + { + this.wingFrame = 4; + this.wingFrameCounter = 0; + } + } + } + else + { + ++this.wingFrameCounter; + int num = 2; + if (this.wingFrameCounter < num) + this.wingFrame = 4; + else if (this.wingFrameCounter < num * 2) + this.wingFrame = 5; + else if (this.wingFrameCounter < num * 3) + this.wingFrame = 6; + else if (this.wingFrameCounter < num * 4 - 1) + { + this.wingFrame = 5; + } + else + { + this.wingFrame = 5; + this.wingFrameCounter = 0; + } + } + } + else + { + ++this.wingFrameCounter; + int num = 6; + if (this.wingFrameCounter < num) + this.wingFrame = 4; + else if (this.wingFrameCounter < num * 2) + this.wingFrame = 5; + else if (this.wingFrameCounter < num * 3 - 1) + { + this.wingFrame = 4; + } + else + { + this.wingFrame = 4; + this.wingFrameCounter = 0; + } + } + } + else if (this.wings == 12) + { + if (wingFlap || this.jump > 0) + { + ++this.wingFrameCounter; + int num = 5; + if (this.wingFrameCounter < num) + this.wingFrame = 1; + else if (this.wingFrameCounter < num * 2) + this.wingFrame = 2; + else if (this.wingFrameCounter < num * 3) + this.wingFrame = 3; + else if (this.wingFrameCounter < num * 4 - 1) + { + this.wingFrame = 2; + } + else + { + this.wingFrame = 2; + this.wingFrameCounter = 0; + } + } + else if ((double) this.velocity.Y != 0.0) + this.wingFrame = 2; + else + this.wingFrame = 0; + } + else if (this.wings == 24) + { + if (wingFlap || this.jump > 0) + { + ++this.wingFrameCounter; + int num = 1; + if (this.wingFrameCounter < num) + this.wingFrame = 1; + else if (this.wingFrameCounter < num * 2) + this.wingFrame = 2; + else if (this.wingFrameCounter < num * 3) + { + this.wingFrame = 3; + } + else + { + this.wingFrame = 2; + if (this.wingFrameCounter < num * 4 - 1) + return; + this.wingFrameCounter = 0; + } + } + else if ((double) this.velocity.Y != 0.0) + { + if (this.controlJump) + { + ++this.wingFrameCounter; + int num = 3; + if (this.wingFrameCounter < num) + this.wingFrame = 1; + else if (this.wingFrameCounter < num * 2) + this.wingFrame = 2; + else if (this.wingFrameCounter < num * 3) + { + this.wingFrame = 3; + } + else + { + this.wingFrame = 2; + if (this.wingFrameCounter < num * 4 - 1) + return; + this.wingFrameCounter = 0; + } + } + else if ((double) this.wingTime == 0.0) + this.wingFrame = 0; + else + this.wingFrame = 1; + } + else + this.wingFrame = 0; + } + else if (this.wings == 30) + { + bool flag2 = false; + if (wingFlap || this.jump > 0) + { + ++this.wingFrameCounter; + int num = 2; + if (this.wingFrameCounter >= num * 3) + this.wingFrameCounter = 0; + this.wingFrame = 1 + this.wingFrameCounter / num; + flag2 = true; + } + else if ((double) this.velocity.Y != 0.0) + { + if (this.controlJump) + { + ++this.wingFrameCounter; + int num = 2; + if (this.wingFrameCounter >= num * 3) + this.wingFrameCounter = 0; + this.wingFrame = 1 + this.wingFrameCounter / num; + flag2 = true; + } + else + this.wingFrame = (double) this.wingTime != 0.0 ? 0 : 0; + } + else + this.wingFrame = 0; + if (!flag2) + return; + for (int index = 0; index < 4; ++index) + { + if (Main.rand.Next(4) == 0) + { + Vector2 vector2 = ((float) (0.392699092626572 * (double) index - 0.745398163795471 + 0.0299999993294477 * (double) index)).ToRotationVector2() * new Vector2((float) (-this.direction * 20), 20f); + Dust dust = Main.dust[Dust.NewDust(this.Center, 0, 0, 229, Alpha: 100, newColor: Color.White, Scale: 0.8f)]; + dust.noGravity = true; + dust.noLightEmittence = flag1; + dust.position = this.Center + vector2; + dust.velocity = this.DirectionTo(dust.position) * 2f; + if (Main.rand.Next(10) != 0) + dust.customData = (object) this; + else + dust.fadeIn = 0.5f; + dust.shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + } + for (int index = 0; index < 4; ++index) + { + if (Main.rand.Next(8) == 0) + { + Vector2 vector2 = ((float) (0.392699092626572 * (double) index - 0.705398201942444 + 0.0299999993294477 * (double) index)).ToRotationVector2() * new Vector2((float) (this.direction * 20), 24f) + new Vector2((float) -this.direction * 16f, 0.0f); + Dust dust = Main.dust[Dust.NewDust(this.Center, 0, 0, 229, Alpha: 100, newColor: Color.White, Scale: 0.5f)]; + dust.noGravity = true; + dust.noLightEmittence = flag1; + dust.position = this.Center + vector2; + dust.velocity = Vector2.Normalize(dust.position - this.Center - new Vector2((float) -this.direction * 16f, 0.0f)) * 2f; + dust.position += dust.velocity * 5f; + if (Main.rand.Next(10) != 0) + dust.customData = (object) this; + else + dust.fadeIn = 0.5f; + dust.shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + } + } + else if (this.wings == 34 && this.ShouldDrawWingsThatAreAlwaysAnimated()) + { + if (wingFlap || this.jump > 0) + { + ++this.wingFrameCounter; + int num = 4; + if (this.wingFrameCounter >= num * 6) + this.wingFrameCounter = 0; + this.wingFrame = this.wingFrameCounter / num; + } + else if ((double) this.velocity.Y != 0.0) + { + if (this.controlJump) + { + ++this.wingFrameCounter; + int num = 9; + if (this.wingFrameCounter >= num * 6) + this.wingFrameCounter = 0; + this.wingFrame = this.wingFrameCounter / num; + } + else + { + ++this.wingFrameCounter; + int num = 6; + if (this.wingFrameCounter >= num * 6) + this.wingFrameCounter = 0; + this.wingFrame = this.wingFrameCounter / num; + } + } + else + { + ++this.wingFrameCounter; + int num = 4; + if (this.wingFrameCounter >= num * 6) + this.wingFrameCounter = 0; + this.wingFrame = this.wingFrameCounter / num; + } + } + else if (this.wings == 45 && this.ShouldDrawWingsThatAreAlwaysAnimated()) + { + if ((double) this.wingTime > 0.0) + { + --this.rocketDelay2; + if (this.rocketDelay2 <= 0) + { + SoundEngine.PlaySound(SoundID.Item24, this.position); + this.rocketDelay2 = 30; + } + } + if ((double) this.velocity.Y == 0.0) + { + this.wingFrameCounter = 0; + this.wingFrame = 0; + } + else + { + ++this.wingFrameCounter; + int num = 3; + if ((double) this.wingTime == 0.0) + num = 5; + if (this.wingFrameCounter >= num * 6) + this.wingFrameCounter = 0; + this.wingFrame = this.wingFrameCounter / num; + } + if (Main.rand.Next(8) != 0) + return; + Microsoft.Xna.Framework.Rectangle r = Utils.CenteredRectangle(Main.ReverseGravitySupport(this.Bottom), new Vector2(40f, 24f)); + Dust dust = Dust.NewDustDirect(r.TopLeft(), r.Width, r.Height, 43, newColor: (Color.White * 0.5f), Scale: 0.2f); + dust.fadeIn = 0.4f; + dust.velocity += this.velocity; + dust.velocity *= 0.35f; + dust.shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + else if (this.wings == 44 && this.ShouldDrawWingsThatAreAlwaysAnimated()) + { + int num = 5; + if (wingFlap || this.jump > 0) + { + ++this.wingFrameCounter; + if (this.wingFrameCounter >= num * 6) + this.wingFrameCounter = 0; + this.wingFrame = 1 + this.wingFrameCounter / num; + } + else if ((double) this.velocity.Y != 0.0) + { + if (this.controlJump) + this.wingFrame = 2; + else if (this.ShouldFloatInWater && this.wet) + this.wingFrame = 0; + else + this.wingFrame = 3; + } + else + { + ++this.wingFrameCounter; + if (this.wingFrameCounter >= num * 6) + this.wingFrameCounter = 0; + this.wingFrame = 1 + this.wingFrameCounter / num; + } + } + else if (this.wings == 39 && this.ShouldDrawWingsThatAreAlwaysAnimated()) + { + if (wingFlap || this.jump > 0) + { + ++this.wingFrameCounter; + int num = 4; + if (this.wingFrameCounter >= num * 6) + this.wingFrameCounter = 0; + this.wingFrame = this.wingFrameCounter / num; + } + else if ((double) this.velocity.Y != 0.0) + { + if (this.controlJump) + { + ++this.wingFrameCounter; + int num = 9; + if (this.wingFrameCounter >= num * 6) + this.wingFrameCounter = 0; + this.wingFrame = this.wingFrameCounter / num; + } + else + { + ++this.wingFrameCounter; + int num = 6; + if (this.wingFrameCounter >= num * 6) + this.wingFrameCounter = 0; + this.wingFrame = this.wingFrameCounter / num; + } + } + else + { + ++this.wingFrameCounter; + int num = 4; + if (this.wingFrameCounter >= num * 6) + this.wingFrameCounter = 0; + this.wingFrame = this.wingFrameCounter / num; + } + int num1 = 1; + if (this.wingFrame == 3) + num1 = 5; + if ((double) this.velocity.Y == 0.0) + num1 = 0; + Microsoft.Xna.Framework.Rectangle r = Utils.CenteredRectangle((double) this.gravDir == 1.0 ? this.Bottom + new Vector2(0.0f, -10f) : this.Top + new Vector2(0.0f, 10f), new Vector2(50f, 20f)); + for (int index = 0; index < num1; ++index) + { + Dust dust = Dust.NewDustDirect(r.TopLeft(), r.Width, r.Height, 31, newColor: Color.Black); + dust.scale = 0.7f; + dust.velocity *= 0.4f; + dust.velocity.Y += this.gravDir * 0.5f; + dust.shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + } + else if (this.wings == 33) + { + bool flag3 = false; + if (wingFlap || this.jump > 0) + flag3 = true; + else if ((double) this.velocity.Y != 0.0 && this.controlJump) + flag3 = true; + if (!flag3) + return; + Color rgb = Main.hslToRgb(Main.rgbToHsl(this.eyeColor).X, 1f, 0.5f); + int num2 = this.direction == 1 ? 0 : -4; + int num3 = (double) this.gravDir == 1.0 ? this.height : 0; + for (int index = 0; index < 2; ++index) + { + Dust rf = Main.dust[Dust.NewDust(this.position, this.width, this.height, 182, this.velocity.X, this.velocity.Y, (int) sbyte.MaxValue, rgb)]; + rf.noGravity = true; + rf.fadeIn = 1f; + rf.scale = 1f; + rf.noLight = true; + rf.noLightEmittence = flag1; + rf.shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + if (index == 0) + { + rf.position = new Vector2(this.position.X + (float) num2, this.position.Y + (float) num3); + rf.velocity.X = (float) ((double) rf.velocity.X * 1.0 - 2.0 - (double) this.velocity.X * 0.300000011920929); + rf.velocity.Y = (float) ((double) rf.velocity.Y * 1.0 + 2.0 * (double) this.gravDir - (double) this.velocity.Y * 0.300000011920929); + } + else if (index == 1) + { + rf.position = new Vector2(this.position.X + (float) this.width + (float) num2, this.position.Y + (float) num3); + rf.velocity.X = (float) ((double) rf.velocity.X * 1.0 + 2.0 - (double) this.velocity.X * 0.300000011920929); + rf.velocity.Y = (float) ((double) rf.velocity.Y * 1.0 + 2.0 * (double) this.gravDir - (double) this.velocity.Y * 0.300000011920929); + } + if (rf.dustIndex != 6000) + { + Dust dust = Dust.CloneDust(rf); + dust.scale *= 0.65f; + dust.fadeIn *= 0.65f; + dust.color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + rf.noLight = true; + rf.noLightEmittence = flag1; + rf.shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + } + } + else if (this.wings == 38) + { + bool flag4 = false; + if (wingFlap || this.jump > 0) + { + ++this.wingFrameCounter; + if (this.wingFrameCounter >= 32) + this.wingFrameCounter = 0; + this.wingFrame = 1 + this.wingFrameCounter / 8; + if (this.wingFrame == 4) + this.wingFrame = 2; + flag4 = true; + } + else if ((double) this.velocity.Y != 0.0) + { + if (this.controlJump) + { + ++this.wingFrameCounter; + if (this.wingFrameCounter >= 32) + this.wingFrameCounter = 0; + this.wingFrame = 1 + this.wingFrameCounter / 8; + if (this.wingFrame == 4) + this.wingFrame = 2; + flag4 = true; + } + else + this.wingFrame = 0; + } + else + this.wingFrame = 0; + if (!flag4) + return; + Vector2 vector2_1 = new Vector2((float) this.direction, this.gravDir); + Vector2 vector2_2 = this.velocity * 0.5f; + int Type = 267; + int num = this.miscCounter * this.direction; + for (int index = 0; index < 3; ++index) + { + Vector2 vector2_3 = Vector2.Zero; + if (index != 1) + { + if (index == 2) + vector2_3 = this.velocity * -0.66f; + } + else + vector2_3 = this.velocity * -0.33f; + Dust dust1 = Dust.NewDustPerfect(this.Center + (new Vector2(-39f, 6f) * vector2_1 + new Vector2(2f, 0.0f).RotatedBy((double) num / -15.0 * 6.28318548202515)) + vector2_3, Type, new Vector2?(vector2_2), newColor: this.underShirtColor); + dust1.noGravity = true; + dust1.noLight = true; + dust1.noLightEmittence = flag1; + dust1.scale = 0.47f; + dust1.shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + Dust dust2 = Dust.NewDustPerfect(this.Center + (new Vector2(-23f, 2f) * vector2_1 + new Vector2(2f, 0.0f).RotatedBy((double) num / -15.0 * 6.28318548202515)) + vector2_3, Type, new Vector2?(vector2_2), newColor: this.underShirtColor); + dust2.noGravity = true; + dust2.noLight = true; + dust2.noLightEmittence = flag1; + dust2.scale = 0.35f; + dust2.shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + Dust dust3 = Dust.NewDustPerfect(this.Center + (new Vector2(-31f, -6f) * vector2_1 + new Vector2(2f, 0.0f).RotatedBy((double) num / -20.0 * 6.28318548202515)) + vector2_3, Type, new Vector2?(vector2_2), newColor: this.underShirtColor); + dust3.noGravity = true; + dust3.noLight = true; + dust3.noLightEmittence = flag1; + dust3.scale = 0.49f; + dust3.shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + } + else + { + int num4 = 4; + int num5 = 4; + int num6 = 0; + if (this.wings == 43) + { + num5 = 7; + num6 = 1; + num4 = 3; + } + if (this.wings == 32) + num4 = 3; + if (wingFlap || this.jump > 0) + { + ++this.wingFrameCounter; + if (this.wingFrameCounter <= num4) + return; + ++this.wingFrame; + this.wingFrameCounter = 0; + if (this.wingFrame < num5) + return; + this.wingFrame = num6; + } + else if ((double) this.velocity.Y != 0.0) + { + this.wingFrame = 1; + if (this.wings == 32) + this.wingFrame = 3; + if (this.wings == 43) + { + this.wingFrame = 2; + if (this.ShouldFloatInWater && this.wet) + this.wingFrame = 0; + } + if (this.wings != 29 || Main.rand.Next(5) != 0) + return; + int num7 = 4; + if (this.direction == 1) + num7 = -40; + int index = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num7, (float) ((double) this.position.Y + (double) (this.height / 2) - 15.0)), 30, 30, 6, Alpha: 100, Scale: 2.4f); + Main.dust[index].noGravity = true; + Main.dust[index].noLightEmittence = flag1; + Main.dust[index].velocity *= 0.3f; + if (Main.rand.Next(10) == 0) + Main.dust[index].fadeIn = 2f; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + else + this.wingFrame = 0; + } + } + + public bool ShouldDrawWingsThatAreAlwaysAnimated() => ((double) this.velocity.Y != 0.0 || this.grappling[0] != -1) && (!this.wet || !this.ShouldFloatInWater) && !this.mount.Active; + + private void WingAirVisuals() + { + bool flag = this.wingsLogic != this.wings; + if (this.wings == 10 && Main.rand.Next(2) == 0) + { + int num = 4; + if (this.direction == 1) + num = -40; + int index = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num, (float) ((double) this.position.Y + (double) (this.height / 2) - 15.0)), 30, 30, 76, Alpha: 50, Scale: 0.6f); + Main.dust[index].fadeIn = 1.1f; + Main.dust[index].noGravity = true; + Main.dust[index].noLight = true; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + if (this.wings == 34 && Main.rand.Next(2) == 0) + { + int num = 4; + if (this.direction == 1) + num = -40; + int index = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num, (float) ((double) this.position.Y + (double) (this.height / 2) - 15.0)), 30, 30, 261, Alpha: 50, Scale: 0.6f); + Main.dust[index].fadeIn = 1.1f; + Main.dust[index].noGravity = true; + Main.dust[index].noLight = true; + Main.dust[index].noLightEmittence = flag; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + int wings1 = this.wings; + int wings2 = this.wings; + if (this.wings == 9 && Main.rand.Next(2) == 0) + { + int num = 4; + if (this.direction == 1) + num = -40; + int index = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num, (float) ((double) this.position.Y + (double) (this.height / 2) - 15.0)), 30, 30, 6, Alpha: 200, Scale: 2f); + Main.dust[index].noGravity = true; + Main.dust[index].noLightEmittence = flag; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + if (this.wings == 6 && Main.rand.Next(4) == 0) + { + int num = 4; + if (this.direction == 1) + num = -40; + int index = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num, (float) ((double) this.position.Y + (double) (this.height / 2) - 15.0)), 30, 30, 55, Alpha: 200); + Main.dust[index].velocity *= 0.3f; + Main.dust[index].noLightEmittence = flag; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + if (this.wings == 5 && Main.rand.Next(3) == 0) + { + int num = 6; + if (this.direction == 1) + num = -30; + int index = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num, this.position.Y), 18, this.height, 58, Alpha: ((int) byte.MaxValue), Scale: 1.2f); + Main.dust[index].noLightEmittence = flag; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + if (this.wings == 26) + { + int num1 = 6; + if (this.direction == 1) + num1 = -30; + int index1 = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num1, this.position.Y), 18, this.height, 217, Alpha: 100, Scale: 1.4f); + Main.dust[index1].noGravity = true; + Main.dust[index1].noLight = true; + Main.dust[index1].velocity /= 4f; + Main.dust[index1].velocity -= this.velocity; + Main.dust[index1].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + if (Main.rand.Next(2) == 0) + { + int num2 = -24; + if (this.direction == 1) + num2 = 12; + float y = this.position.Y; + if ((double) this.gravDir == -1.0) + y += (float) (this.height / 2); + int index2 = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num2, y), 12, this.height / 2, 217, Alpha: 100, Scale: 1.4f); + Main.dust[index2].noGravity = true; + Main.dust[index2].noLight = true; + Main.dust[index2].velocity /= 4f; + Main.dust[index2].velocity -= this.velocity; + Main.dust[index2].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + } + if (this.wings == 37) + { + int num3 = 6; + if (this.direction == 1) + num3 = -30; + Dust dust1 = Dust.NewDustDirect(new Vector2(this.position.X + (float) (this.width / 2) + (float) num3, this.position.Y), 24, this.height, Utils.SelectRandom(Main.rand, 31, 31, 31), Alpha: 100); + dust1.noGravity = true; + dust1.noLight = true; + dust1.velocity /= 4f; + dust1.velocity -= this.velocity / 2f; + dust1.shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + if (dust1.type == 55) + { + dust1.noGravity = true; + dust1.velocity *= 2f; + dust1.color = Color.Red; + } + if (Main.rand.Next(3) == 0) + { + int num4 = -24; + if (this.direction == 1) + num4 = 12; + float y = this.position.Y; + if ((double) this.gravDir == -1.0) + y += (float) (this.height / 2); + Dust dust2 = Dust.NewDustDirect(new Vector2(this.position.X + (float) (this.width / 2) + (float) num4, y), 16, this.height / 2, Utils.SelectRandom(Main.rand, 31, 31, 31), Alpha: 100); + dust2.noGravity = true; + dust2.noLight = true; + dust2.velocity /= 4f; + dust2.velocity -= this.velocity / 2f; + dust2.shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + if (dust2.type == 55) + { + dust2.noGravity = true; + dust2.velocity *= 2f; + dust2.color = Color.Red; + } + } + } + if (this.wings == 29 && Main.rand.Next(3) == 0) + { + int num = 4; + if (this.direction == 1) + num = -40; + int index = Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num, (float) ((double) this.position.Y + (double) (this.height / 2) - 15.0)), 30, 30, 6, Alpha: 100, Scale: 2.4f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].noLightEmittence = flag; + if (Main.rand.Next(10) == 0) + Main.dust[index].fadeIn = 2f; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + if (this.wings != 31) + return; + if (Main.rand.Next(6) == 0) + { + int num = 4; + if (this.direction == 1) + num = -40; + Dust dust = Main.dust[Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num, (float) ((double) this.position.Y + (double) (this.height / 2) - 15.0)), 30, 30, 86)]; + dust.noGravity = true; + dust.scale = 1f; + dust.fadeIn = 1.2f; + dust.velocity *= 0.2f; + dust.noLight = true; + dust.shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + if (Main.rand.Next(3) == 0) + { + int num = 4; + if (this.direction == 1) + num = -40; + Dust dust = Main.dust[Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num, (float) ((double) this.position.Y + (double) (this.height / 2) - 15.0)), 30, 30, 240)]; + dust.noGravity = true; + dust.scale = 1.2f; + dust.velocity *= 0.2f; + dust.alpha = 200; + dust.shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + if (Main.rand.Next(2) != 0) + return; + if (Main.rand.Next(6) == 0) + { + int num = -24; + if (this.direction == 1) + num = 12; + float y = this.position.Y; + if ((double) this.gravDir == -1.0) + y += (float) (this.height / 2); + Dust dust = Main.dust[Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num, y), 12, this.height / 2, 86)]; + dust.noGravity = true; + dust.scale = 1f; + dust.fadeIn = 1.2f; + dust.velocity *= 0.2f; + dust.noLight = true; + dust.shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + if (Main.rand.Next(3) != 0) + return; + int num5 = -24; + if (this.direction == 1) + num5 = 12; + float y1 = this.position.Y; + if ((double) this.gravDir == -1.0) + y1 += (float) (this.height / 2); + Dust dust3 = Main.dust[Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2) + (float) num5, y1), 12, this.height / 2, 240)]; + dust3.noGravity = true; + dust3.scale = 1.2f; + dust3.velocity *= 0.2f; + dust3.alpha = 200; + dust3.shader = GameShaders.Armor.GetSecondaryShader(this.cWings, this); + } + + private void HandleBeingInChestRange() + { + if (this.chest != -1) + { + if (this.chest != -2) + this.flyingPigChest = -1; + if (this.chest != -5) + this.voidLensChest = -1; + if (this.flyingPigChest >= 0) + { + if (!Main.projectile[this.flyingPigChest].active || Main.projectile[this.flyingPigChest].type != 525) + { + SoundEngine.PlaySound(SoundID.Item59); + this.chest = -1; + Recipe.FindRecipes(); + } + else + { + int num1 = (int) (((double) this.position.X + (double) this.width * 0.5) / 16.0); + int num2 = (int) (((double) this.position.Y + (double) this.height * 0.5) / 16.0); + Vector2 vector2 = Main.projectile[this.flyingPigChest].Hitbox.ClosestPointInRect(this.Center); + this.chestX = (int) vector2.X / 16; + this.chestY = (int) vector2.Y / 16; + if (num1 >= this.chestX - Player.tileRangeX && num1 <= this.chestX + Player.tileRangeX + 1 && num2 >= this.chestY - Player.tileRangeY && num2 <= this.chestY + Player.tileRangeY + 1) + return; + if (this.chest != -1) + SoundEngine.PlaySound(SoundID.Item59); + this.chest = -1; + Recipe.FindRecipes(); + } + } + else if (this.voidLensChest >= 0) + { + if (!Main.projectile[this.voidLensChest].active || Main.projectile[this.voidLensChest].type != 734) + { + SoundEngine.PlaySound(SoundID.Item130); + this.chest = -1; + Recipe.FindRecipes(); + } + else + { + int num3 = (int) (((double) this.position.X + (double) this.width * 0.5) / 16.0); + int num4 = (int) (((double) this.position.Y + (double) this.height * 0.5) / 16.0); + Vector2 vector2 = Main.projectile[this.voidLensChest].Hitbox.ClosestPointInRect(this.Center); + this.chestX = (int) vector2.X / 16; + this.chestY = (int) vector2.Y / 16; + if (num3 >= this.chestX - Player.tileRangeX && num3 <= this.chestX + Player.tileRangeX + 1 && num4 >= this.chestY - Player.tileRangeY && num4 <= this.chestY + Player.tileRangeY + 1) + return; + if (this.chest != -1) + SoundEngine.PlaySound(SoundID.Item130); + this.chest = -1; + Recipe.FindRecipes(); + } + } + else if (!this.IsInInteractionRangeToMultiTileHitbox(this.chestX, this.chestY)) + { + if (this.chest != -1) + SoundEngine.PlaySound(11); + this.chest = -1; + Recipe.FindRecipes(); + } + else + { + if (Main.tile[this.chestX, this.chestY].active()) + return; + SoundEngine.PlaySound(11); + this.chest = -1; + Recipe.FindRecipes(); + } + } + else + { + this.flyingPigChest = -1; + this.voidLensChest = -1; + } + } + + public bool IsInInteractionRangeToMultiTileHitbox(int chestPointX, int chestPointY) + { + int num1 = (int) (((double) this.position.X + (double) this.width * 0.5) / 16.0); + int num2 = (int) (((double) this.position.Y + (double) this.height * 0.5) / 16.0); + Microsoft.Xna.Framework.Rectangle r = Microsoft.Xna.Framework.Rectangle.Empty; + Tile tile = Main.tile[chestPointX, chestPointY]; + if (tile.type == (ushort) 463 || tile.type == (ushort) 491) + r = new Microsoft.Xna.Framework.Rectangle(chestPointX * 16 - 16, chestPointY * 16 - 32, 48, 64); + if (TileID.Sets.BasicChest[(int) tile.type] || tile.type == (ushort) 97) + r = new Microsoft.Xna.Framework.Rectangle(chestPointX * 16, chestPointY * 16, 32, 32); + if (tile.type == (ushort) 88) + r = new Microsoft.Xna.Framework.Rectangle(chestPointX * 16, chestPointY * 16, 48, 32); + if (tile.type == (ushort) 29) + r = new Microsoft.Xna.Framework.Rectangle(chestPointX * 16, chestPointY * 16, 32, 16); + r.Inflate(-1, -1); + Point tileCoordinates = r.ClosestPointInRect(this.Center).ToTileCoordinates(); + chestPointX = tileCoordinates.X; + chestPointY = tileCoordinates.Y; + return (num1 < chestPointX - Player.tileRangeX || num1 > chestPointX + Player.tileRangeX + 1 || num2 < chestPointY - Player.tileRangeY ? 1 : (num2 > chestPointY + Player.tileRangeY + 1 ? 1 : 0)) == 0; + } + + public void ResetVisibleAccessories() + { + this.handon = (sbyte) -1; + this.handoff = (sbyte) -1; + this.back = (sbyte) -1; + this.front = (sbyte) -1; + this.shoe = (sbyte) -1; + this.waist = (sbyte) -1; + this.shield = (sbyte) -1; + this.neck = (sbyte) -1; + this.face = (sbyte) -1; + this.balloon = (sbyte) -1; + } + + public void UpdateArmorLights() + { + if (this.vortexStealthActive) + return; + float num1 = 0.0f; + float num2 = 0.0f; + float num3 = 0.0f; + switch (this.head) + { + case 11: + num1 = 0.92f; + num2 = 0.8f; + num3 = 0.65f; + break; + case 169: + num1 = 0.0f; + num2 = 0.36f; + num3 = 0.4f; + break; + case 170: + num1 = 0.4f; + num2 = 0.16f; + num3 = 0.36f; + break; + case 171: + num1 = 0.5f; + num2 = 0.25f; + num3 = 0.05f; + break; + case 178: + num1 = 0.1f; + num2 = 0.2f; + num3 = 0.3f; + break; + case 189: + num1 = 0.9f; + num2 = 0.9f; + num3 = 0.7f; + break; + case 211: + num1 = 0.2f; + num2 = 0.4f; + num3 = 0.8f; + break; + case 216: + num1 = 0.7f; + num2 = 0.95f; + num3 = 0.82f; + break; + } + float num4 = 0.0f; + float num5 = 0.0f; + float num6 = 0.0f; + switch (this.body) + { + case 175: + num4 = 0.0f; + num5 = 0.36f; + num6 = 0.4f; + break; + case 176: + num4 = 0.4f; + num5 = 0.16f; + num6 = 0.36f; + break; + case 177: + num4 = 0.5f; + num5 = 0.25f; + num6 = 0.05f; + break; + case 190: + num1 = 0.9f; + num2 = 0.9f; + num3 = 0.7f; + break; + case 205: + num4 = 0.2f; + num5 = 0.4f; + num6 = 0.8f; + break; + } + float num7 = 0.0f; + float num8 = 0.0f; + float num9 = 0.0f; + switch (this.legs) + { + case 110: + num7 = 0.0f; + num8 = 0.36f; + num9 = 0.4f; + break; + case 111: + num7 = 0.4f; + num8 = 0.16f; + num9 = 0.36f; + break; + case 112: + num7 = 0.5f; + num8 = 0.25f; + num9 = 0.05f; + break; + case 130: + num1 = 0.9f; + num2 = 0.9f; + num3 = 0.7f; + break; + } + if ((double) num1 != 0.0 || (double) num2 != 0.0 || (double) num3 != 0.0) + { + float num10 = 1f; + if ((double) num1 == (double) num4 && (double) num2 == (double) num5 && (double) num3 == (double) num6) + num10 += 0.5f; + if ((double) num1 == (double) num7 && (double) num2 == (double) num8 && (double) num3 == (double) num9) + num10 += 0.5f; + Vector2 spinningpoint = new Vector2((float) (this.width / 2 + 8 * this.direction), 2f); + if ((double) this.fullRotation != 0.0) + spinningpoint = spinningpoint.RotatedBy((double) this.fullRotation, this.fullRotationOrigin); + Lighting.AddLight((int) ((double) this.position.X + (double) spinningpoint.X) / 16, (int) ((double) this.position.Y + (double) spinningpoint.Y) / 16, num1 * num10, num2 * num10, num3 * num10); + } + if ((double) num4 != 0.0 || (double) num5 != 0.0 || (double) num6 != 0.0) + { + float num11 = 1f; + if ((double) num4 == (double) num1 && (double) num5 == (double) num2 && (double) num6 == (double) num3) + num11 += 0.5f; + if ((double) num4 == (double) num7 && (double) num5 == (double) num8 && (double) num6 == (double) num9) + num11 += 0.5f; + Vector2 spinningpoint = new Vector2((float) (this.width / 2 + 8), (float) (this.height / 2)); + if ((double) this.fullRotation != 0.0) + spinningpoint = spinningpoint.RotatedBy((double) this.fullRotation, this.fullRotationOrigin); + Lighting.AddLight((int) ((double) this.position.X + (double) spinningpoint.X) / 16, (int) ((double) this.position.Y + (double) spinningpoint.Y) / 16, num4 * num11, num5 * num11, num6 * num11); + } + if ((double) num7 == 0.0 && (double) num8 == 0.0 && (double) num9 == 0.0) + return; + float num12 = 1f; + if ((double) num7 == (double) num4 && (double) num8 == (double) num5 && (double) num9 == (double) num6) + num12 += 0.5f; + if ((double) num7 == (double) num1 && (double) num8 == (double) num2 && (double) num9 == (double) num3) + num12 += 0.5f; + Vector2 spinningpoint1 = new Vector2((float) (this.width / 2 + 8 * this.direction), (float) this.height * 0.75f); + if ((double) this.fullRotation != 0.0) + spinningpoint1 = spinningpoint1.RotatedBy((double) this.fullRotation, this.fullRotationOrigin); + Lighting.AddLight((int) ((double) this.position.X + (double) spinningpoint1.X) / 16, (int) ((double) this.position.Y + (double) spinningpoint1.Y) / 16, num7 * num12, num8 * num12, num9 * num12); + } + + public void Update_NPCCollision() + { + if (this.creativeGodMode) + return; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height); + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && !Main.npc[index].friendly && Main.npc[index].damage > 0) + { + int specialHitSetter = -1; + switch (Main.npc[index].type) + { + case 396: + case 397: + case 398: + case 400: + case 401: + specialHitSetter = 1; + break; + case 636: + specialHitSetter = 1; + break; + } + if ((specialHitSetter != -1 || !this.immune) && (this.dash != 2 || index != this.eocHit || this.eocDash <= 0) && !this.npcTypeNoAggro[Main.npc[index].type]) + { + float damageMultiplier = 1f; + NPC npc1 = Main.npc[index]; + npc1.position = npc1.position + Main.npc[index].netOffset; + Microsoft.Xna.Framework.Rectangle npcRect = new Microsoft.Xna.Framework.Rectangle((int) Main.npc[index].position.X, (int) Main.npc[index].position.Y, Main.npc[index].width, Main.npc[index].height); + NPC.GetMeleeCollisionData(rectangle, index, ref specialHitSetter, ref damageMultiplier, ref npcRect); + if (rectangle.Intersects(npcRect)) + { + if (!this.npcTypeNoAggro[Main.npc[index].type]) + { + bool flag1 = true; + bool flag2 = false; + int num1 = this.CanParryAgainst(rectangle, npcRect, Main.npc[index].velocity) ? 1 : 0; + float num2 = this.thorns; + float knockback = 10f; + if (this.turtleThorns) + num2 = 2f; + if (num1 != 0) + { + num2 = 2f; + knockback = 5f; + flag1 = false; + flag2 = true; + } + int hitDirection = -1; + if ((double) Main.npc[index].position.X + (double) (Main.npc[index].width / 2) < (double) this.position.X + (double) (this.width / 2)) + hitDirection = 1; + int Damage = Main.DamageVar((float) Main.npc[index].damage * damageMultiplier, -this.luck); + int num3 = Item.NPCtoBanner(Main.npc[index].BannerID()); + if (num3 > 0 && this.HasNPCBannerBuff(num3)) + Damage = !Main.expertMode ? (int) ((double) Damage * (double) ItemID.Sets.BannerStrength[Item.BannerToItem(num3)].NormalDamageReceived) : (int) ((double) Damage * (double) ItemID.Sets.BannerStrength[Item.BannerToItem(num3)].ExpertDamageReceived); + if (this.whoAmI == Main.myPlayer && (double) num2 > 0.0 && !this.immune && !Main.npc[index].dontTakeDamage) + { + int damage = (int) ((double) Damage * (double) num2); + if (damage > 1000) + damage = 1000; + this.ApplyDamageToNPC(Main.npc[index], damage, knockback, -hitDirection, false); + } + if (this.resistCold && Main.npc[index].coldDamage) + Damage = (int) ((double) Damage * 0.699999988079071); + if (!this.immune && !flag2) + this.StatusFromNPC(Main.npc[index]); + if (flag1) + this.Hurt(PlayerDeathReason.ByNPC(index), Damage, hitDirection, cooldownCounter: specialHitSetter); + if (num1 != 0) + { + this.GiveImmuneTimeForCollisionAttack(this.longInvince ? 60 : 30); + this.AddBuff(198, 300, false); + } + } + else + continue; + } + NPC npc2 = Main.npc[index]; + npc2.position = npc2.position - Main.npc[index].netOffset; + } + } + } + } + + public bool CanParryAgainst( + Microsoft.Xna.Framework.Rectangle blockingPlayerRect, + Microsoft.Xna.Framework.Rectangle enemyRect, + Vector2 enemyVelocity) + { + return this.shieldParryTimeLeft > 0 && Math.Sign(enemyRect.Center.X - blockingPlayerRect.Center.X) == this.direction && enemyVelocity != Vector2.Zero && !this.immune; + } + + private void PurgeDD2EnergyCrystals() + { + if (this.trashItem.type == 3822) + this.trashItem.TurnToAir(); + for (int index = 0; index < 58; ++index) + { + Item obj = this.inventory[index]; + if (obj.stack > 0 && obj.type == 3822) + obj.TurnToAir(); + } + if (this.chest == -2) + { + Chest bank = this.bank; + for (int index = 0; index < 40; ++index) + { + if (bank.item[index].stack > 0 && bank.item[index].type == 3822) + bank.item[index].TurnToAir(); + } + } + if (this.chest == -4) + { + Chest bank3 = this.bank3; + for (int index = 0; index < 40; ++index) + { + if (bank3.item[index].stack > 0 && bank3.item[index].type == 3822) + bank3.item[index].TurnToAir(); + } + } + if (this.chest == -5) + { + Chest bank4 = this.bank4; + for (int index = 0; index < 40; ++index) + { + if (bank4.item[index].stack > 0 && bank4.item[index].type == 3822) + bank4.item[index].TurnToAir(); + } + } + if (this.chest == -3) + { + Chest bank2 = this.bank2; + for (int index = 0; index < 40; ++index) + { + if (bank2.item[index].stack > 0 && bank2.item[index].type == 3822) + bank2.item[index].TurnToAir(); + } + } + if (this.chest <= -1) + return; + Chest chest = Main.chest[this.chest]; + for (int index = 0; index < 40; ++index) + { + if (chest.item[index].stack > 0 && chest.item[index].type == 3822) + { + chest.item[index].TurnToAir(); + if (Main.netMode == 1) + NetMessage.SendData(32, number: this.chest, number2: ((float) index)); + } + } + } + + public void ItemCheck_ManageRightClickFeatures() + { + bool theGeneralCheck = this.selectedItem != 58 && this.controlUseTile && !this.tileInteractionHappened && this.releaseUseItem && !this.controlUseItem && !this.mouseInterface && !CaptureManager.Instance.Active && !Main.HoveringOverAnNPC && !Main.SmartInteractShowingGenuine; + bool flag = theGeneralCheck; + if (!ItemID.Sets.ItemsThatAllowRepeatedRightClick[this.inventory[this.selectedItem].type] && !Main.mouseRightRelease) + flag = false; + if (flag && this.altFunctionUse == 0) + { + for (int index = 0; index < this._projectilesToInteractWith.Count; ++index) + { + Projectile projectile = Main.projectile[this._projectilesToInteractWith[index]]; + if (projectile.Hitbox.Contains(Main.MouseWorld.ToPoint()) || Main.SmartInteractProj == projectile.whoAmI) + { + theGeneralCheck = false; + flag = false; + break; + } + } + } + if (flag && this.altFunctionUse == 0 && this.inventory[this.selectedItem].type == 3384) + { + this.altFunctionUse = 1; + this.controlUseItem = true; + } + if (flag && this.altFunctionUse == 0 && this.inventory[this.selectedItem].type == 3858) + { + this.altFunctionUse = 1; + this.controlUseItem = true; + } + if (flag && this.altFunctionUse == 0 && this.inventory[this.selectedItem].type == 4673) + { + this.altFunctionUse = 1; + this.controlUseItem = true; + } + if (flag && this.altFunctionUse == 0 && this.inventory[this.selectedItem].type == 3852 && this.itemAnimation == 0) + { + this.altFunctionUse = 1; + this.controlUseItem = true; + } + if (flag && this.altFunctionUse == 0 && this.inventory[this.selectedItem].shoot > 0 && ProjectileID.Sets.TurretFeature[this.inventory[this.selectedItem].shoot]) + { + this.altFunctionUse = 1; + this.controlUseItem = true; + } + if (flag && this.altFunctionUse == 0 && this.inventory[this.selectedItem].shoot > 0 && ProjectileID.Sets.MinionTargettingFeature[this.inventory[this.selectedItem].shoot]) + { + this.altFunctionUse = 1; + this.controlUseItem = true; + } + if (!this.controlUseItem && this.altFunctionUse == 1) + this.altFunctionUse = 0; + this.ItemCheck_ManageRightClickFeatures_ShieldRaise(theGeneralCheck); + } + + public void ItemCheck_ManageRightClickFeatures_ShieldRaise(bool theGeneralCheck) + { + bool flag1 = PlayerInput.Triggers.JustPressed.MouseRight; + if (this.whoAmI != Main.myPlayer) + { + flag1 = this.shieldRaised; + theGeneralCheck = this.shieldRaised; + } + bool shouldGuard = false; + bool flag2 = this.inventory[this.selectedItem].type == 3823 || this.inventory[this.selectedItem].type == 4760; + if (theGeneralCheck & flag2 && this.hasRaisableShield && !this.mount.Active && this.itemAnimation == 0 | flag1) + shouldGuard = true; + if (this.shield_parry_cooldown > 0) + { + --this.shield_parry_cooldown; + if (this.shield_parry_cooldown == 0) + { + SoundEngine.PlaySound(25, this.Center); + for (int index1 = 0; index1 < 10; ++index1) + { + int index2 = Dust.NewDust(this.Center + new Vector2((float) (this.direction * 6 + (this.direction == -1 ? -10 : 0)), -14f), 10, 16, 45, Alpha: ((int) byte.MaxValue), newColor: new Color((int) byte.MaxValue, 100, 0, (int) sbyte.MaxValue), Scale: ((float) Main.rand.Next(10, 16) * 0.1f)); + Main.dust[index2].noLight = true; + Main.dust[index2].noGravity = true; + Main.dust[index2].velocity *= 0.5f; + } + } + } + if (this.shieldParryTimeLeft > 0 && ++this.shieldParryTimeLeft > 20) + this.shieldParryTimeLeft = 0; + this.TryTogglingShield(shouldGuard); + } + + public void TryTogglingShield(bool shouldGuard) + { + if (shouldGuard == this.shieldRaised) + return; + this.shieldRaised = shouldGuard; + if (this.shieldRaised) + { + if (this.shield_parry_cooldown == 0) + this.shieldParryTimeLeft = 1; + this.itemAnimation = 0; + this.itemTime = 0; + this.reuseDelay = 0; + } + else + { + this.shield_parry_cooldown = 15; + this.shieldParryTimeLeft = 0; + if (this.attackCD >= 20) + return; + this.attackCD = 20; + } + } + + private void HandleHotbar() + { + int num = PlayerInput.Triggers.Current.HotbarPlus.ToInt() - PlayerInput.Triggers.Current.HotbarMinus.ToInt(); + if (PlayerInput.CurrentProfile.HotbarAllowsRadial && num != 0 && PlayerInput.Triggers.Current.HotbarHoldTime > PlayerInput.CurrentProfile.HotbarRadialHoldTimeRequired && PlayerInput.CurrentProfile.HotbarRadialHoldTimeRequired != -1) + { + PlayerInput.MiscSettingsTEMP.HotbarRadialShouldBeUsed = true; + PlayerInput.Triggers.Current.HotbarScrollCD = 2; + } + if (PlayerInput.CurrentProfile.HotbarRadialHoldTimeRequired != -1) + { + num = PlayerInput.Triggers.JustReleased.HotbarPlus.ToInt() - PlayerInput.Triggers.JustReleased.HotbarMinus.ToInt(); + if (PlayerInput.Triggers.Current.HotbarScrollCD == 1 && num != 0) + num = 0; + } + if (PlayerInput.Triggers.Current.HotbarScrollCD == 0 && num != 0) + { + this.HotbarOffset += num; + PlayerInput.Triggers.Current.HotbarScrollCD = 8; + } + if (!Main.inFancyUI && !Main.ingameOptionsWindow) + this.HotbarOffset += PlayerInput.ScrollWheelDelta / -120; + this.ScrollHotbar(this.HotbarOffset); + this.HotbarOffset = 0; + } + + private void ItemCheckWrapped(int i) + { + int num1 = this.controlLeft || this.controlRight || this.controlUp || this.controlDown || !PlayerInput.UsingGamepad || !Main.SmartCursorEnabled ? 0 : ((double) PlayerInput.GamepadThumbstickRight.Length() < 0.0500000007450581 ? 1 : 0); + if (num1 != 0) + this.ForceForwardCursor(true); + int num2 = !PlayerInput.smartSelectPointer.ShouldBeUsed() ? 0 : (!Main.SmartCursorEnabled ? 1 : 0); + if (num2 != 0) + this.ForceSmartSelectCursor(true); + LockOnHelper.SetUP(); + int stack1 = this.inventory[this.selectedItem].stack; + if (Main.ignoreErrors) + this.ItemCheck(i); + else + this.ItemCheck(i); + int stack2 = this.inventory[this.selectedItem].stack; + if (stack1 != stack2) + Recipe.FindRecipes(); + LockOnHelper.SetDOWN(); + if (num2 != 0) + this.ForceSmartSelectCursor(false); + if (num1 != 0) + this.ForceForwardCursor(false); + if (this.itemAnimation != 0) + return; + this.lastVisualizedSelectedItem = this.HeldItem.Clone(); + } + + private void ForceForwardCursor(bool state) + { + if (state == this._forceForwardCursor) + return; + this._forceForwardCursor = state; + if (state) + { + this._inputMouseCoordsForward = new Point(PlayerInput.MouseX, PlayerInput.MouseY); + this._mainMouseCoordsForward = new Point(Main.mouseX, Main.mouseY); + Point point = (this.Center - Main.screenPosition + new Vector2((float) (this.direction * 200), 0.0f)).ToPoint(); + Main.mouseX = PlayerInput.MouseX = point.X; + Main.mouseY = PlayerInput.MouseY = point.Y; + } + else + { + PlayerInput.MouseX = this._inputMouseCoordsForward.X; + PlayerInput.MouseY = this._inputMouseCoordsForward.Y; + Main.mouseX = this._mainMouseCoordsForward.X; + Main.mouseY = this._mainMouseCoordsForward.Y; + } + } + + private void ForceSmartSelectCursor(bool state) + { + if (state == this._forceSmartSelectCursor) + return; + this._forceSmartSelectCursor = state; + if (state) + { + this._inputMouseCoordsSmartSelect = new Point(PlayerInput.MouseX, PlayerInput.MouseY); + this._mainMouseCoordsSmartSelect = new Point(Main.mouseX, Main.mouseY); + this._tileTargetSmartSelect = new Point(Player.tileTargetX, Player.tileTargetY); + Point point = PlayerInput.smartSelectPointer.GetPointerPosition().ToPoint(); + Main.mouseX = PlayerInput.MouseX = point.X; + Main.mouseY = PlayerInput.MouseY = point.Y; + Point tileCoordinates = (point.ToVector2() + Main.screenPosition).ToTileCoordinates(); + Player.tileTargetX = tileCoordinates.X; + Player.tileTargetY = tileCoordinates.Y; + } + else + { + PlayerInput.MouseX = this._inputMouseCoordsSmartSelect.X; + PlayerInput.MouseY = this._inputMouseCoordsSmartSelect.Y; + Main.mouseX = this._mainMouseCoordsSmartSelect.X; + Main.mouseY = this._mainMouseCoordsSmartSelect.Y; + Player.tileTargetX = this._tileTargetSmartSelect.X; + Player.tileTargetY = this._tileTargetSmartSelect.Y; + } + } + + public void ScrollHotbar(int Offset) + { + Offset = Player.ClampHotbarOffset(Offset); + this.selectedItem += Offset; + if (Offset != 0) + { + SoundEngine.PlaySound(12); + int num = this.selectedItem - Offset; + this.DpadRadial.ChangeSelection(-1); + this.CircularRadial.ChangeSelection(-1); + this.selectedItem = num + Offset; + this.nonTorch = -1; + } + if (this.changeItem >= 0) + { + if (this.selectedItem != this.changeItem) + SoundEngine.PlaySound(12); + this.selectedItem = this.changeItem; + this.changeItem = -1; + } + if (this.itemAnimation != 0 || this.selectedItem == 58) + return; + while (this.selectedItem > 9) + this.selectedItem -= 10; + while (this.selectedItem < 0) + this.selectedItem += 10; + } + + private static int ClampHotbarOffset(int Offset) + { + while (Offset > 9) + Offset -= 10; + while (Offset < 0) + Offset += 10; + return Offset; + } + + public List GetListOfProjectilesToInteractWithHack() => this._projectilesToInteractWith; + + public void LockGamepadTileInteractions() + { + this.releaseUseTile = false; + this._lockTileInteractionsTimer = 3; + PlayerInput.LockGamepadTileUseButton = true; + } + + public void LookForTileInteractions() + { + if (Main.mapFullscreen || Main.InGameUI.CurrentState == Main.BestiaryUI) + return; + int num1 = Player.tileTargetX; + int num2 = Player.tileTargetY; + if (Main.SmartInteractShowingGenuine && Main.SmartInteractNPC == -1 && Main.SmartInteractProj == -1) + { + num1 = Main.SmartInteractX; + num2 = Main.SmartInteractY; + } + bool flag = this.controlUseTile; + if (PlayerInput.UsingGamepad && Main.HoveringOverAnNPC) + flag = false; + if (Main.gamePaused) + flag = false; + if (this.releaseUseTile) + this.tileInteractionHappened = false; + this.tileInteractAttempted = flag; + if (this.tileInteractAttempted && this.releaseUseTile) + { + if (Main.instance.currentNPCShowingChatBubble > -1 && (this.talkNPC == -1 || !Main.npcChatRelease)) + { + this.tileInteractAttempted = true; + this.releaseUseTile = false; + } + if (Main.HasInteractibleObjectThatIsNotATile) + { + this.tileInteractAttempted = true; + this.releaseUseTile = false; + } + } + if (this.IsInTileInteractionRange(num1, num2)) + { + this.TileInteractionsCheckLongDistance(Player.tileTargetX, Player.tileTargetY); + this.TileInteractionsCheck(num1, num2); + } + else + this.TileInteractionsCheckLongDistance(num1, num2); + this.TryInteractingWithMinecartTrackInNearbyArea(num1, num2); + } + + private void TryInteractingWithMinecartTrackInNearbyArea( + int selectedTargetX, + int selectedTargetY) + { + if (this.mount.Active && MountID.Sets.Cart[this.mount.Type] || !this.botherWithUnaimedMinecartTracks || this.tileInteractionHappened || Main.SmartInteractShowingGenuine || Main.SmartInteractNPC != -1 || Main.SmartInteractProj != -1 || !WorldGen.InWorld(selectedTargetX, selectedTargetY, 10) || (double) this.gravDir != 1.0) + return; + int num = 2; + for (int index1 = selectedTargetX - num; index1 <= selectedTargetX + num; ++index1) + { + for (int index2 = selectedTargetY - num; index2 <= selectedTargetY + num; ++index2) + { + if (this.IsInTileInteractionRange(index1, index2)) + { + Tile tile = Main.tile[index1, index2]; + if (tile != null) + { + if (tile.active() && tile.type == (ushort) 314) + { + if (!this.cursorItemIconEnabled) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 2343; + } + if (this.tileInteractAttempted) + this.TileInteractionsCheck(index1, index2); + } + if (this.tileInteractionHappened) + return; + } + } + } + } + } + + public bool InInteractionRange(int interactX, int interactY) + { + int num1 = (int) (((double) this.position.X + (double) this.width * 0.5) / 16.0); + int num2 = (int) (((double) this.position.Y + (double) this.height * 0.5) / 16.0); + Tile tile = Main.tile[interactX, interactY]; + return tile.type == (ushort) 475 || tile.type == (ushort) 597 ? num1 >= interactX - Player.tileRangeX - 1 && num1 <= interactX + Player.tileRangeX + 2 && num2 >= interactY - Player.tileRangeY - 1 && num2 <= interactY + Player.tileRangeY + 2 : (tile.type == (ushort) 470 ? num1 >= interactX - Player.tileRangeX - 1 && num1 <= interactX + Player.tileRangeX + 1 && num2 >= interactY - Player.tileRangeY - 1 && num2 <= interactY + Player.tileRangeY + 2 : num1 >= interactX - Player.tileRangeX && num1 <= interactX + Player.tileRangeX + 1 && num2 >= interactY - Player.tileRangeY && num2 <= interactY + Player.tileRangeY + 1); + } + + public bool IsInTileInteractionRange(int targetX, int targetY) => (double) this.position.X / 16.0 - (double) Player.tileRangeX <= (double) targetX && ((double) this.position.X + (double) this.width) / 16.0 + (double) Player.tileRangeX - 1.0 >= (double) targetX && (double) this.position.Y / 16.0 - (double) Player.tileRangeY <= (double) targetY && ((double) this.position.Y + (double) this.height) / 16.0 + (double) Player.tileRangeY - 2.0 >= (double) targetY; + + public void TileInteractionsCheck(int myX, int myY) + { + if (Main.tile[myX, myY] == null) + Main.tile[myX, myY] = new Tile(); + if (!Main.tile[myX, myY].active()) + return; + this.TileInteractionsMouseOver(myX, myY); + this.TileInteractionsUse(myX, myY); + } + + private void TileInteractionsCheckLongDistance(int myX, int myY) + { + if (!WorldGen.InWorld(myX, myY, 10) || Main.tile[myX, myY] == null || !Main.tile[myX, myY].active()) + return; + if (TileID.Sets.BasicChest[(int) Main.tile[myX, myY].type]) + { + this.TileInteractionsMouseOver_Containers(myX, myY); + if (this.cursorItemIconText == "") + { + this.cursorItemIconEnabled = false; + this.cursorItemIconID = 0; + } + } + if (Main.tile[myX, myY].type == (ushort) 88) + { + Tile tile = Main.tile[myX, myY]; + int num1 = myX; + int num2 = myY; + int num3 = (int) tile.frameX % 54 / 18; + int X = num1 - num3; + if ((int) tile.frameY % 36 != 0) + --num2; + int Y = num2; + int chest = Chest.FindChest(X, Y); + this.cursorItemIconID = -1; + if (chest < 0) + { + this.cursorItemIconText = Lang.dresserType[0].Value; + } + else + { + this.cursorItemIconText = !(Main.chest[chest].name != "") ? Lang.dresserType[(int) tile.frameX / 54].Value : Main.chest[chest].name; + if (this.cursorItemIconText == Lang.dresserType[(int) tile.frameX / 54].Value) + { + this.cursorItemIconID = Chest.dresserTypeToIcon[(int) tile.frameX / 54]; + this.cursorItemIconText = ""; + } + } + this.noThrow = 2; + this.cursorItemIconEnabled = true; + if (this.cursorItemIconText == "") + { + this.cursorItemIconEnabled = false; + this.cursorItemIconID = 0; + } + } + if (!Main.tileSign[(int) Main.tile[myX, myY].type]) + return; + this.noThrow = 2; + int num4 = (int) Main.tile[myX, myY].frameX / 18; + int num5 = (int) Main.tile[myX, myY].frameY / 18; + int num6 = num4 % 2; + int i = myX - num6; + int j = myY - num5; + Main.signBubble = true; + Main.signX = i * 16 + 16; + Main.signY = j * 16; + int num7 = Sign.ReadSign(i, j, false); + if (num7 == -1 || Player.tileTargetX < i || Player.tileTargetY < j || Player.tileTargetX > i + 1 || Player.tileTargetY > j + 1) + return; + Main.signHover = num7; + this.cursorItemIconEnabled = false; + this.cursorItemIconID = -1; + } + + private void TileInteractionsUse(int myX, int myY) + { + if (WiresUI.Open || this.ownedProjectileCounts[651] > 0) + return; + bool releaseUseTile = this.releaseUseTile; + if (!this.tileInteractAttempted) + return; + bool flag1 = false; + if (Main.tile[myX, myY].type == (ushort) 212 && this.launcherWait <= 0) + { + int index1 = myX; + int index2 = myY; + bool flag2 = false; + for (int index3 = 0; index3 < 58; ++index3) + { + if (this.inventory[index3].type == 949 && this.inventory[index3].stack > 0) + { + --this.inventory[index3].stack; + if (this.inventory[index3].stack <= 0) + this.inventory[index3].SetDefaults(); + flag2 = true; + break; + } + } + if (flag2) + { + flag1 = true; + this.launcherWait = 10; + SoundEngine.PlaySound(SoundID.Item11, this.position); + int num1 = (int) Main.tile[index1, index2].frameX / 18; + int num2 = 0; + for (; num1 >= 3; num1 -= 3) + ++num2; + int num3 = index1 - num1; + int num4 = (int) Main.tile[index1, index2].frameY / 18; + while (num4 >= 3) + num4 -= 3; + int num5 = index2 - num4; + double num6 = 12.0 + (double) Main.rand.Next(450) * 0.00999999977648258; + float num7 = (float) Main.rand.Next(85, 105); + double num8 = (double) Main.rand.Next(-35, 11); + int Type = 166; + int Damage = 35; + float KnockBack = 3.5f; + Vector2 vector2 = new Vector2((float) ((num3 + 2) * 16 - 8), (float) ((num5 + 2) * 16 - 8)); + if (num2 == 0) + { + num7 *= -1f; + vector2.X -= 12f; + } + else + vector2.X += 12f; + float num9 = num7; + float num10 = (float) num8; + double num11 = Math.Sqrt((double) num9 * (double) num9 + (double) num10 * (double) num10); + float num12 = (float) (num6 / num11); + float SpeedX = num9 * num12; + float SpeedY = num10 * num12; + int index4 = Projectile.NewProjectile(vector2.X, vector2.Y, SpeedX, SpeedY, Type, Damage, KnockBack, Main.myPlayer); + Main.projectile[index4].originatedFromActivableTile = true; + } + } + if (releaseUseTile) + { + if (Main.tile[myX, myY].type == (ushort) 132 || Main.tile[myX, myY].type == (ushort) 136 || Main.tile[myX, myY].type == (ushort) 144) + { + flag1 = true; + Wiring.HitSwitch(myX, myY); + NetMessage.SendData(59, number: myX, number2: ((float) myY)); + } + else if (Main.tile[myX, myY].type == (ushort) 597) + { + flag1 = true; + this.TryOpeningFullscreenMap(); + } + else if (Main.tile[myX, myY].type == (ushort) 441 || Main.tile[myX, myY].type == (ushort) 468) + { + flag1 = true; + int num13 = (int) Main.tile[myX, myY].frameX / 18; + while (num13 > 1) + num13 -= 2; + int num14 = myX - num13; + int num15 = myY - (int) Main.tile[myX, myY].frameY / 18; + Animation.NewTemporaryAnimation(2, Main.tile[myX, myY].type, num14, num15); + NetMessage.SendTemporaryAnimation(-1, 2, (int) Main.tile[myX, myY].type, num14, num15); + Wiring.HitSwitch(myX, myY); + NetMessage.SendData(59, number: myX, number2: ((float) myY)); + } + else if (Main.tile[myX, myY].type == (ushort) 139) + { + flag1 = true; + SoundEngine.PlaySound(28, myX * 16, myY * 16, 0); + WorldGen.SwitchMB(myX, myY); + } + else if (Main.tile[myX, myY].type == (ushort) 215) + { + flag1 = true; + SoundEngine.PlaySound(28, myX * 16, myY * 16, 0); + int num16 = (int) Main.tile[myX, myY].frameX % 54 / 18; + int num17 = (int) Main.tile[myX, myY].frameY % 36 / 18; + int index5 = myX - num16; + int index6 = myY - num17; + int num18 = 36; + if (Main.tile[index5, index6].frameY >= (short) 36) + num18 = -36; + for (int index7 = index5; index7 < index5 + 3; ++index7) + { + for (int index8 = index6; index8 < index6 + 2; ++index8) + Main.tile[index7, index8].frameY += (short) num18; + } + NetMessage.SendTileSquare(-1, index5 + 1, index6 + 1, 3); + } + else if (Main.tile[myX, myY].type == (ushort) 207) + { + flag1 = true; + SoundEngine.PlaySound(28, myX * 16, myY * 16, 0); + WorldGen.SwitchFountain(myX, myY); + } + else if (Main.tile[myX, myY].type == (ushort) 410 || Main.tile[myX, myY].type == (ushort) 480 || Main.tile[myX, myY].type == (ushort) 509) + { + flag1 = true; + SoundEngine.PlaySound(28, myX * 16, myY * 16, 0); + this.GamepadEnableGrappleCooldown(); + WorldGen.SwitchMonolith(myX, myY); + } + else if (Main.tile[myX, myY].type == (ushort) 455) + { + flag1 = true; + SoundEngine.PlaySound(28, myX * 16, myY * 16, 0); + this.GamepadEnableGrappleCooldown(); + BirthdayParty.ToggleManualParty(); + } + else if (Main.tile[myX, myY].type == (ushort) 216) + { + flag1 = true; + WorldGen.LaunchRocket(myX, myY); + } + else if (Main.tile[myX, myY].type == (ushort) 386 || Main.tile[myX, myY].type == (ushort) 387) + { + flag1 = true; + bool flag3 = Main.tile[myX, myY].type == (ushort) 387; + int num = WorldGen.ShiftTrapdoor(myX, myY, (double) (myY * 16) > (double) this.Center.Y).ToInt(); + if (num == 0) + num = -WorldGen.ShiftTrapdoor(myX, myY, (double) (myY * 16) <= (double) this.Center.Y).ToInt(); + if (num != 0) + NetMessage.SendData(19, number: (2 + flag3.ToInt()), number2: ((float) myX), number3: ((float) myY), number4: ((float) (num * Math.Sign((float) (myY * 16) - this.Center.Y)))); + } + else if (Main.tile[myX, myY].type == (ushort) 388 || Main.tile[myX, myY].type == (ushort) 389) + { + flag1 = true; + bool closing = Main.tile[myX, myY].type == (ushort) 389; + if (WorldGen.ShiftTallGate(myX, myY, closing)) + NetMessage.SendData(19, number: (4 + closing.ToInt()), number2: ((float) myX), number3: ((float) myY)); + } + else if (Main.tile[myX, myY].type == (ushort) 15 || Main.tile[myX, myY].type == (ushort) 497) + { + if (this.IsWithinSnappngRangeToTile(myX, myY, 40)) + { + flag1 = true; + this.GamepadEnableGrappleCooldown(); + this.sitting.SitDown(this, myX, myY); + } + } + else if (Main.tile[myX, myY].type == (ushort) 89 || Main.tile[myX, myY].type == (ushort) 102 || Main.tile[myX, myY].type == (ushort) 487) + { + if (this.IsWithinSnappngRangeToTile(myX, myY, 40)) + { + flag1 = true; + this.GamepadEnableGrappleCooldown(); + this.sitting.SitDown(this, myX, myY); + } + } + else if (Main.tile[myX, myY].type == (ushort) 335) + { + flag1 = true; + WorldGen.LaunchRocketSmall(myX, myY); + } + else if (Main.tile[myX, myY].type == (ushort) 411 && Main.tile[myX, myY].frameX < (short) 36) + { + flag1 = true; + Wiring.HitSwitch(myX, myY); + NetMessage.SendData(59, number: myX, number2: ((float) myY)); + } + else if (Main.tile[myX, myY].type == (ushort) 494) + { + flag1 = true; + for (int index = 0; index < 1000; ++index) + { + if (ProjectileID.Sets.IsAGolfBall[Main.projectile[index].type] && Main.projectile[index].owner == this.whoAmI) + Main.projectile[index].Kill(); + } + int projType; + this.GetPreferredGolfBallToUse(out projType); + Projectile.NewProjectile((float) (myX * 16) + 8.5f, (float) (myY * 16 + 6), 0.0f, 0.0f, projType, 0, 0.0f, this.whoAmI, ai1: -1f); + } + else if (Main.tile[myX, myY].type == (ushort) 338) + { + flag1 = true; + int index9 = myX; + int index10 = myY; + if (Main.tile[index9, index10].frameY == (short) 18) + --index10; + bool flag4 = false; + for (int index11 = 0; index11 < 1000; ++index11) + { + if (Main.projectile[index11].active && Main.projectile[index11].aiStyle == 73 && (double) Main.projectile[index11].ai[0] == (double) index9 && (double) Main.projectile[index11].ai[1] == (double) index10) + { + flag4 = true; + break; + } + } + if (!flag4) + { + int index12 = Projectile.NewProjectile((float) (index9 * 16 + 8), (float) (index10 * 16 + 2), 0.0f, 0.0f, 419 + Main.rand.Next(4), 0, 0.0f, this.whoAmI, (float) index9, (float) index10); + Main.projectile[index12].originatedFromActivableTile = true; + } + } + else if (Main.tile[myX, myY].type == (ushort) 33 || Main.tile[myX, myY].type == (ushort) 49 || Main.tile[myX, myY].type == (ushort) 372 || Main.tile[myX, myY].type == (ushort) 174) + { + short num = 18; + Tile tile = Main.tile[myX, myY]; + if (tile.frameX > (short) 0) + num = (short) -18; + tile.frameX += num; + NetMessage.SendTileSquare(-1, myX, myY, 1); + flag1 = true; + this.GamepadEnableGrappleCooldown(); + } + else if (Main.tile[myX, myY].type == (ushort) 4 || Main.tile[myX, myY].type == (ushort) 13 || Main.tile[myX, myY].type == (ushort) 50 && Main.tile[myX, myY].frameX == (short) 90) + { + WorldGen.KillTile(myX, myY); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) myX), number3: ((float) myY)); + flag1 = true; + this.GamepadEnableGrappleCooldown(); + } + else if (Main.tile[myX, myY].type == (ushort) 466) + { + flag1 = true; + this.GamepadEnableGrappleCooldown(); + int y = myY; + Tile tileSafely = Framing.GetTileSafely(myX, myY); + if (tileSafely.frameY == (short) 0) + y += 3; + if (tileSafely.frameY == (short) 18) + y += 2; + if (tileSafely.frameY == (short) 36) + ++y; + bool flag5 = !DD2Event.Ongoing && !NPC.AnyNPCs(548) && !Main.pumpkinMoon && !Main.snowMoon; + if (flag5) + flag5 = this.HasItem(3828); + if (flag5) + { + flag5 = !DD2Event.WouldFailSpawningHere(myX, y); + if (!flag5) + DD2Event.FailureMessage(-1); + } + if (flag5) + flag5 = this.ConsumeItem(3828, true); + if (flag5) + DD2Event.SummonCrystal(myX, y); + } + else if (Main.tile[myX, myY].type == (ushort) 334) + { + flag1 = true; + if (this.ItemFitsWeaponRack(this.inventory[this.selectedItem])) + { + this.GamepadEnableGrappleCooldown(); + this.PlaceWeapon(myX, myY); + } + else + { + int num19 = myX; + int j = myY; + if (Main.tile[myX, myY].frameY == (short) 0) + ++j; + if (Main.tile[myX, myY].frameY == (short) 36) + --j; + int frameX = (int) Main.tile[myX, j].frameX; + int num20 = (int) Main.tile[myX, j].frameX; + int num21 = 0; + while (num20 >= 5000) + { + num20 -= 5000; + ++num21; + } + if (num21 != 0) + num20 = (num21 - 1) * 18; + int num22 = num20 % 54; + if (num22 == 18) + { + frameX = (int) Main.tile[myX - 1, j].frameX; + --num19; + } + if (num22 == 36) + { + frameX = (int) Main.tile[myX - 2, j].frameX; + int num23 = num19 - 2; + } + if (frameX >= 5000) + { + this.GamepadEnableGrappleCooldown(); + WorldGen.KillTile(myX, j, true); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) myX), number3: ((float) j), number4: 1f); + } + } + } + else if (Main.tile[myX, myY].type == (ushort) 440) + { + flag1 = true; + int index = myX; + int j = myY; + int num24 = (int) Main.tile[index, j].frameX / 54; + int num25 = (int) Main.tile[index, j].frameY / 54; + int num26 = (int) Main.tile[index, j].frameX % 54 / 18; + int num27 = (int) Main.tile[index, j].frameY % 54 / 18; + int type = -1; + switch (num24) + { + case 0: + type = 1526; + break; + case 1: + type = 1524; + break; + case 2: + type = 1525; + break; + case 3: + type = 1523; + break; + case 4: + type = 1522; + break; + case 5: + type = 1527; + break; + case 6: + type = 3643; + break; + } + if (type != -1) + { + if (num25 == 0 && this.HasItem(type) && this.selectedItem != 58) + { + this.GamepadEnableGrappleCooldown(); + if (Main.netMode != 1) + { + this.ConsumeItem(type); + WorldGen.ToggleGemLock(index, j, true); + } + else + { + this.ConsumeItem(type); + NetMessage.SendData(105, number: index, number2: ((float) j), number3: 1f); + } + } + else if (num25 == 1) + { + this.GamepadEnableGrappleCooldown(); + if (Main.netMode != 1) + WorldGen.ToggleGemLock(index, j, false); + else + NetMessage.SendData(105, number: index, number2: ((float) j)); + } + } + } + else if (Main.tile[myX, myY].type == (ushort) 395) + { + flag1 = true; + TEItemFrame.OnPlayerInteraction(this, myX, myY); + } + else if (Main.tile[myX, myY].type == (ushort) 520) + { + flag1 = true; + TEFoodPlatter.OnPlayerInteraction(this, myX, myY); + } + else if (Main.tile[myX, myY].type == (ushort) 471) + { + flag1 = true; + TEWeaponsRack.OnPlayerInteraction(this, myX, myY); + } + else if (Main.tile[myX, myY].type == (ushort) 470) + { + flag1 = true; + TEDisplayDoll.OnPlayerInteraction(this, myX, myY); + } + else if (Main.tile[myX, myY].type == (ushort) 475) + { + flag1 = true; + TEHatRack.OnPlayerInteraction(this, myX, myY); + } + else if (Main.tile[myX, myY].type == (ushort) 125) + { + flag1 = true; + this.AddBuff(29, 36000); + SoundEngine.PlaySound(SoundID.Item4, this.position); + } + else if (Main.tile[myX, myY].type == (ushort) 621) + { + flag1 = true; + this.AddBuff(192, 7200); + SoundEngine.PlaySound(SoundID.Item2, this.position); + } + else if (Main.tile[myX, myY].type == (ushort) 377) + { + flag1 = true; + this.AddBuff(159, 36000); + SoundEngine.PlaySound(SoundID.Item37, this.position); + } + else if (Main.tile[myX, myY].type == (ushort) 354) + { + flag1 = true; + this.AddBuff(150, 36000); + SoundEngine.PlaySound(SoundID.Item4, this.position); + } + else if (Main.tile[myX, myY].type == (ushort) 287) + { + flag1 = true; + this.AddBuff(93, 36000); + SoundEngine.PlaySound(SoundID.Item149, this.position); + } + else if (Main.tile[myX, myY].type == (ushort) 356) + { + flag1 = true; + if (!Main.fastForwardTime && (Main.netMode == 1 || Main.sundialCooldown == 0)) + { + Main.Sundialing(); + SoundEngine.PlaySound(SoundID.Item4, this.position); + } + } + else if (Main.tile[myX, myY].type == (ushort) 79) + { + flag1 = true; + int num28 = myX; + int num29 = myY; + int num30 = num28 + (int) Main.tile[myX, myY].frameX / 18 * -1; + int x = Main.tile[myX, myY].frameX < (short) 72 ? num30 + 2 : num30 + 4 + 1; + int num31 = (int) Main.tile[myX, myY].frameY / 18; + int num32 = 0; + while (num31 > 1) + { + num31 -= 2; + ++num32; + } + int y = num29 - num31 + 2; + if (!Player.IsHoveringOverABottomSideOfABed(myX, myY)) + { + if (this.IsWithinSnappngRangeToTile(myX, myY, 96)) + { + flag1 = true; + this.GamepadEnableGrappleCooldown(); + this.sleeping.StartSleeping(this, myX, myY); + } + } + else + { + this.FindSpawn(); + if (this.SpawnX == x && this.SpawnY == y) + { + this.RemoveSpawn(); + Main.NewText(Language.GetTextValue("Game.SpawnPointRemoved"), G: (byte) 240, B: (byte) 20); + } + else if (Player.CheckSpawn(x, y)) + { + this.ChangeSpawn(x, y); + Main.NewText(Language.GetTextValue("Game.SpawnPointSet"), G: (byte) 240, B: (byte) 20); + } + } + } + else if (Main.tileSign[(int) Main.tile[myX, myY].type]) + { + flag1 = true; + bool flag6 = true; + if (this.sign >= 0 && Sign.ReadSign(myX, myY, false) == this.sign) + { + this.sign = -1; + Main.npcChatText = ""; + Main.editSign = false; + SoundEngine.PlaySound(11); + flag6 = false; + } + if (flag6) + { + if (Main.netMode == 0) + { + this.SetTalkNPC(-1); + Main.npcChatCornerItem = 0; + Main.playerInventory = false; + Main.editSign = false; + int index = Sign.ReadSign(myX, myY); + if (index < 0) + return; + SoundEngine.PlaySound(10); + this.sign = index; + Main.npcChatText = Main.sign[index].text; + } + else + { + int num33 = (int) Main.tile[myX, myY].frameX / 18; + int num34 = (int) Main.tile[myX, myY].frameY / 18; + while (num33 > 1) + num33 -= 2; + int number = myX - num33; + int index = myY - num34; + if (Main.tileSign[(int) Main.tile[number, index].type]) + NetMessage.SendData(46, number: number, number2: ((float) index)); + } + } + } + else if (Main.tile[myX, myY].type == (ushort) 104) + { + flag1 = true; + string textValue = Language.GetTextValue("GameUI.TimeAtMorning"); + double time = Main.time; + if (!Main.dayTime) + time += 54000.0; + double num35 = time / 86400.0 * 24.0 - 7.5 - 12.0; + if (num35 < 0.0) + num35 += 24.0; + if (num35 >= 12.0) + textValue = Language.GetTextValue("GameUI.TimePastMorning"); + int num36 = (int) num35; + double num37 = (double) (int) ((num35 - (double) num36) * 60.0); + string str = string.Concat((object) num37); + if (num37 < 10.0) + str = "0" + str; + if (num36 > 12) + num36 -= 12; + if (num36 == 0) + num36 = 12; + Main.NewText(Language.GetTextValue("Game.Time", (object) (num36.ToString() + ":" + str + " " + textValue)), G: (byte) 240, B: (byte) 20); + } + else if (Main.tile[myX, myY].type == (ushort) 237) + { + flag1 = true; + bool flag7 = false; + if (!NPC.AnyNPCs(245) && Main.hardMode && NPC.downedPlantBoss) + { + for (int index = 0; index < 58; ++index) + { + if (this.inventory[index].type == 1293) + { + --this.inventory[index].stack; + if (this.inventory[index].stack <= 0) + this.inventory[index].SetDefaults(); + flag7 = true; + break; + } + } + } + if (flag7) + { + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + NPC.SpawnOnPlayer(this.whoAmI, 245); + else + NetMessage.SendData(61, number: this.whoAmI, number2: 245f); + } + } + else if (Main.tile[myX, myY].type == (ushort) 10) + { + flag1 = true; + int num38 = myX; + int num39 = myY; + if (WorldGen.IsLockedDoor(num38, num39)) + { + int num40 = 1141; + for (int index = 0; index < 58; ++index) + { + if (this.inventory[index].type == num40 && this.inventory[index].stack > 0) + { + --this.inventory[index].stack; + if (this.inventory[index].stack <= 0) + this.inventory[index] = new Item(); + WorldGen.UnlockDoor(num38, num39); + if (Main.netMode == 1) + NetMessage.SendData(52, number: this.whoAmI, number2: 2f, number3: ((float) num38), number4: ((float) num39)); + } + } + } + else + { + WorldGen.OpenDoor(myX, myY, this.direction); + if (Main.tile[myX, myY].type != (ushort) 10) + { + NetMessage.SendData(19, number2: ((float) myX), number3: ((float) myY), number4: ((float) this.direction)); + } + else + { + WorldGen.OpenDoor(myX, myY, -this.direction); + if (Main.tile[myX, myY].type != (ushort) 10) + NetMessage.SendData(19, number2: ((float) myX), number3: ((float) myY), number4: ((float) -this.direction)); + } + } + } + else if (Main.tile[myX, myY].type == (ushort) 11) + { + flag1 = true; + if (WorldGen.CloseDoor(myX, myY)) + NetMessage.SendData(19, number: 1, number2: ((float) myX), number3: ((float) myY), number4: ((float) this.direction)); + } + else if (Main.tile[myX, myY].type == (ushort) 88) + { + flag1 = true; + int num41 = (int) Main.tile[myX, myY].frameX / 18 % 3; + int num42 = myX - num41; + int num43 = myY - (int) Main.tile[myX, myY].frameY / 18; + if (Main.tile[myX, myY].frameY == (short) 0) + { + Main.CancelClothesWindow(true); + Main.mouseRightRelease = false; + this.CloseSign(); + this.SetTalkNPC(-1); + Main.npcChatCornerItem = 0; + Main.npcChatText = ""; + if (Main.editChest) + { + SoundEngine.PlaySound(12); + Main.editChest = false; + Main.npcChatText = string.Empty; + } + if (this.editedChestName) + { + NetMessage.SendData(33, text: NetworkText.FromLiteral(Main.chest[this.chest].name), number: this.chest, number2: 1f); + this.editedChestName = false; + } + if (Main.netMode == 1) + { + if (num42 == this.chestX && num43 == this.chestY && this.chest != -1) + { + this.chest = -1; + Recipe.FindRecipes(); + SoundEngine.PlaySound(11); + } + else + { + NetMessage.SendData(31, number: num42, number2: ((float) num43)); + Main.stackSplit = 600; + } + } + else + { + this.flyingPigChest = -1; + this.voidLensChest = -1; + int chest = Chest.FindChest(num42, num43); + if (chest != -1) + { + Main.stackSplit = 600; + if (chest == this.chest) + { + this.chest = -1; + Recipe.FindRecipes(); + SoundEngine.PlaySound(11); + } + else if (chest != this.chest && this.chest == -1) + { + this.OpenChest(num42, num43, chest); + SoundEngine.PlaySound(10); + } + else + { + this.OpenChest(num42, num43, chest); + SoundEngine.PlaySound(12); + } + Recipe.FindRecipes(); + } + } + } + else + { + Main.playerInventory = false; + this.chest = -1; + Recipe.FindRecipes(); + this.SetTalkNPC(-1); + Main.npcChatCornerItem = 0; + Main.npcChatText = ""; + Main.interactedDresserTopLeftX = num42; + Main.interactedDresserTopLeftY = num43; + Main.OpenClothesWindow(); + } + } + else if (Main.tile[myX, myY].type == (ushort) 209) + { + flag1 = true; + Tile tile = Main.tile[myX, myY]; + int num44 = (int) tile.frameX % 72 / 18; + int num45 = (int) tile.frameY % 54 / 18; + int x = myX - num44; + int y = myY - num45; + int angle = (int) tile.frameY / 54; + int num46 = (int) tile.frameX / 72; + int num47 = -1; + if (num44 == 1 || num44 == 2) + num47 = num45; + int num48 = 0; + if (num44 == 3 || num44 == 2 && num46 != 3 && num46 != 4) + num48 = -54; + if (num44 == 0 || num44 == 1 && num46 != 3 && num46 != 4) + num48 = 54; + if (angle >= 8 && num48 > 0) + num48 = 0; + if (angle == 0 && num48 < 0) + num48 = 0; + bool flag8 = false; + if (num48 != 0) + { + for (int index13 = x; index13 < x + 4; ++index13) + { + for (int index14 = y; index14 < y + 3; ++index14) + Main.tile[index13, index14].frameY += (short) num48; + } + flag8 = true; + } + if ((num46 == 3 || num46 == 4) && (num47 == 1 || num47 == 0)) + { + int num49 = num46 == 3 ? 72 : -72; + for (int index15 = x; index15 < x + 4; ++index15) + { + for (int index16 = y; index16 < y + 3; ++index16) + Main.tile[index15, index16].frameX += (short) num49; + } + flag8 = true; + } + if (flag8) + NetMessage.SendTileSquare(-1, x + 1, y + 1, 4); + if (num47 != -1) + { + bool flag9 = false; + if ((num46 == 3 || num46 == 4) && num47 == 2) + flag9 = true; + if (flag9) + WorldGen.ShootFromCannon(x, y, angle, num46 + 1, 0, 0.0f, this.whoAmI); + } + } + else if (Main.tile[myX, myY].type == (ushort) 510 || Main.tile[myX, myY].type == (ushort) 511) + { + flag1 = true; + Tile tile = Main.tile[myX, myY]; + int num50 = (int) tile.frameX % 36 / 18; + int num51 = (int) tile.frameY % 36 / 18; + int tileX = myX - num50; + int tileY = myY - num51; + int num52 = (int) tile.frameY / 36; + int num53 = (int) tile.frameX / 36; + int num54 = 0; + if (num50 == 0) + num54 = -36; + if (num50 == 1) + num54 = 36; + if (num52 >= 7 && num54 > 0) + num54 = -252; + if (num52 == 0 && num54 < 0) + num54 = 252; + bool flag10 = false; + if (num54 != 0) + { + for (int index17 = tileX; index17 < tileX + 2; ++index17) + { + for (int index18 = tileY; index18 < tileY + 2; ++index18) + Main.tile[index17, index18].frameY += (short) num54; + } + flag10 = true; + } + if (flag10) + NetMessage.SendTileSquare(-1, tileX, tileY, 3); + } + else if (TileID.Sets.BasicChest[(int) Main.tile[myX, myY].type] || Main.tile[myX, myY].type == (ushort) 29 || Main.tile[myX, myY].type == (ushort) 97 || Main.tile[myX, myY].type == (ushort) 463 || Main.tile[myX, myY].type == (ushort) 491) + { + flag1 = true; + Main.mouseRightRelease = false; + int num55 = 0; + int num56 = (int) Main.tile[myX, myY].frameX / 18; + while (num56 > 1) + num56 -= 2; + int index19 = myX - num56; + int index20 = myY - (int) Main.tile[myX, myY].frameY / 18; + if (Main.tile[myX, myY].type == (ushort) 29) + num55 = 1; + else if (Main.tile[myX, myY].type == (ushort) 97) + num55 = 2; + else if (Main.tile[myX, myY].type == (ushort) 463) + { + num55 = 3; + if (Main.tile[myX, myY].frameX == (short) 36) + --index19; + else + ++index19; + index20 += 2; + } + else if (Main.tile[myX, myY].type == (ushort) 491) + { + num55 = 4; + if (Main.tile[myX, myY].frameX == (short) 36) + --index19; + else + ++index19; + index20 += 2; + } + this.CloseSign(); + this.SetTalkNPC(-1); + Main.npcChatCornerItem = 0; + Main.npcChatText = ""; + if (Main.editChest) + { + SoundEngine.PlaySound(12); + Main.editChest = false; + Main.npcChatText = string.Empty; + } + if (this.editedChestName) + { + NetMessage.SendData(33, text: NetworkText.FromLiteral(Main.chest[this.chest].name), number: this.chest, number2: 1f); + this.editedChestName = false; + } + bool flag11 = Chest.IsLocked(Main.tile[index19, index20]); + if (Main.netMode == 1 && num55 == 0 && !flag11) + { + if (index19 == this.chestX && index20 == this.chestY && this.chest != -1) + { + this.chest = -1; + Recipe.FindRecipes(); + SoundEngine.PlaySound(11); + } + else + { + NetMessage.SendData(31, number: index19, number2: ((float) index20)); + Main.stackSplit = 600; + } + } + else + { + int newChest = -1; + switch (num55) + { + case 1: + newChest = -2; + break; + case 2: + newChest = -3; + break; + case 3: + newChest = -4; + break; + case 4: + newChest = -5; + break; + default: + bool flag12 = false; + if (Chest.IsLocked(index19, index20)) + { + int type = (int) Main.tile[index19, index20].type; + int num57 = 327; + switch (type) + { + case 21: + if (Main.tile[index19, index20].frameX >= (short) 144 && Main.tile[index19, index20].frameX <= (short) 178) + num57 = 329; + if (Main.tile[index19, index20].frameX >= (short) 828 && Main.tile[index19, index20].frameX <= (short) 1006) + { + int num58 = (int) Main.tile[index19, index20].frameX / 18; + int num59 = 0; + while (num58 >= 2) + { + num58 -= 2; + ++num59; + } + num57 = 1533 + (num59 - 23); + break; + } + break; + case 467: + if ((int) Main.tile[index19, index20].frameX / 36 == 13) + { + num57 = 4714; + break; + } + break; + } + flag12 = true; + for (int index21 = 0; index21 < 58; ++index21) + { + if (this.inventory[index21].type == num57 && this.inventory[index21].stack > 0 && Chest.Unlock(index19, index20)) + { + if (num57 != 329) + { + --this.inventory[index21].stack; + if (this.inventory[index21].stack <= 0) + this.inventory[index21] = new Item(); + } + if (Main.netMode == 1) + NetMessage.SendData(52, number: this.whoAmI, number2: 1f, number3: ((float) index19), number4: ((float) index20)); + } + } + } + if (!flag12) + { + newChest = Chest.FindChest(index19, index20); + break; + } + break; + } + if (newChest != -1) + { + Main.stackSplit = 600; + int num60 = WorldGen.IsChestRigged(index19, index20) ? 1 : 0; + if (newChest == this.chest) + { + this.chest = -1; + SoundEngine.PlaySound(11); + } + else if (newChest != this.chest && this.chest == -1) + { + this.OpenChest(index19, index20, newChest); + SoundEngine.PlaySound(10); + if (Main.tile[index19, index20].frameX >= (short) 36 && Main.tile[index19, index20].frameX < (short) 72) + AchievementsHelper.HandleSpecialEvent(this, 16); + } + else + { + this.OpenChest(index19, index20, newChest); + SoundEngine.PlaySound(12); + } + if (num60 != 0) + { + Wiring.HitSwitch(myX, myY); + NetMessage.SendData(59, number: myX, number2: ((float) myY)); + } + Recipe.FindRecipes(); + } + } + } + else if (Main.tile[myX, myY].type == (ushort) 314 && (double) this.gravDir == 1.0) + { + flag1 = true; + bool flag13 = true; + if (this.mount.Active) + { + if (this.mount.Cart) + flag13 = false; + else + this.mount.Dismount(this); + } + if (flag13) + this.LaunchMinecartHook(myX, myY); + } + } + if (!flag1) + return; + this.tileInteractionHappened = true; + } + + private static bool IsHoveringOverABottomSideOfABed(int myX, int myY) + { + int frameX = (int) Main.tile[myX, myY].frameX; + bool flag1 = frameX / 72 == 1; + bool flag2 = frameX % 72 < 36; + if (flag1) + flag2 = !flag2; + return flag2; + } + + public void PetAnimal(int animalNpcIndex) + { + int targetDirection; + Vector2 playerPositionWhenPetting; + bool isPetSmall; + this.GetPettingInfo(animalNpcIndex, out targetDirection, out playerPositionWhenPetting, out isPetSmall); + Vector2 vector2 = playerPositionWhenPetting.Floor(); + bool flag = this.CanSnapToPosition(vector2 - this.Bottom); + if (flag && !WorldGen.SolidTileAllowBottomSlope((int) vector2.X / 16, (int) vector2.Y / 16)) + flag = false; + if (!flag) + return; + if (this.isPettingAnimal && this.Bottom == vector2) + { + this.StopPettingAnimal(); + } + else + { + this.StopVanityActions(); + this.RemoveAllGrapplingHooks(); + if (this.mount.Active) + this.mount.Dismount(this); + this.Bottom = vector2; + this.ChangeDir(targetDirection); + this.isPettingAnimal = true; + this.isTheAnimalBeingPetSmall = isPetSmall; + this.velocity = Vector2.Zero; + this.gravDir = 1f; + } + } + + private void GetPettingInfo( + int animalNpcIndex, + out int targetDirection, + out Vector2 playerPositionWhenPetting, + out bool isPetSmall) + { + NPC npc = Main.npc[animalNpcIndex]; + targetDirection = (double) npc.Center.X > (double) this.Center.X ? 1 : -1; + isPetSmall = npc.type == 637 || npc.type == 656; + int num = 36; + switch (npc.type) + { + case 637: + num = 28; + break; + case 656: + num = 24; + break; + } + playerPositionWhenPetting = npc.Bottom + new Vector2((float) (-targetDirection * num), 0.0f); + } + + public bool CanSnapToPosition(Vector2 offset) + { + if (Collision.SolidCollision(this.position + offset, this.width, this.height)) + return false; + bool canSnapToPosition = Collision.CanHit(this.position, this.width, this.height, this.position + offset, this.width, this.height); + if (!canSnapToPosition) + { + this.TryAllowingSnappingToPosition(ref canSnapToPosition, this.position, this.position + offset); + if (!canSnapToPosition) + { + int num = Math.Sign(offset.X); + if (num != 0) + { + Vector2 Velocity = new Vector2((float) (num * this.width), 0.0f); + if (Collision.TileCollision(this.position, Velocity, this.width, this.height, true, true, (int) this.gravDir) == Velocity) + this.TryAllowingSnappingToPosition(ref canSnapToPosition, this.position + Velocity, this.position + offset); + } + } + } + return canSnapToPosition; + } + + private void TryAllowingSnappingToPosition( + ref bool canSnapToPosition, + Vector2 pos1, + Vector2 pos2) + { + Vector2 vector2 = new Vector2((float) (this.width - 2), 0.0f); + canSnapToPosition = Collision.CanHit(pos1 + vector2, 2, this.height, pos2, 2, this.height); + if (!canSnapToPosition) + canSnapToPosition = Collision.CanHit(pos1 + vector2, 2, this.height, pos2 + vector2, 2, this.height); + if (!canSnapToPosition) + canSnapToPosition = Collision.CanHit(pos1, 2, this.height, pos2, 2, this.height); + if (canSnapToPosition) + return; + canSnapToPosition = Collision.CanHit(pos1, 2, this.height, pos2 + vector2, 2, this.height); + } + + public void StopVanityActions(bool multiplayerBroadcast = true) + { + this.StopPettingAnimal(); + this.sitting.SitUp(this, multiplayerBroadcast); + this.sleeping.StopSleeping(this, multiplayerBroadcast); + } + + private void StopPettingAnimal() + { + this.isPettingAnimal = false; + this.isTheAnimalBeingPetSmall = false; + } + + private void UpdatePettingAnimal() + { + if (!this.isPettingAnimal) + return; + if (this.talkNPC == -1) + { + this.StopPettingAnimal(); + } + else + { + int num = Math.Sign(Main.npc[this.talkNPC].Center.X - this.Center.X); + if (this.controlLeft || this.controlRight || this.controlUp || this.controlDown || this.controlJump || this.pulley || this.mount.Active || num != this.direction) + { + this.StopPettingAnimal(); + } + else + { + Vector2 playerPositionWhenPetting; + this.GetPettingInfo(this.talkNPC, out int _, out playerPositionWhenPetting, out bool _); + if ((double) this.Bottom.Distance(playerPositionWhenPetting) <= 2.0) + return; + this.StopPettingAnimal(); + } + } + } + + private void OpenChest(int x, int y, int newChest) + { + if (this.chest != -1 && Main.myPlayer == this.whoAmI) + { + for (int index = 0; index < 40; ++index) + ItemSlot.SetGlow(index, -1f, true); + } + this.chest = newChest; + Main.playerInventory = true; + UILinkPointNavigator.ForceMovementCooldown(120); + if (PlayerInput.GrappleAndInteractAreShared) + PlayerInput.Triggers.JustPressed.Grapple = false; + Main.recBigList = false; + this.chestX = x; + this.chestY = y; + } + + public void CloseSign() + { + if (this.sign <= -1) + return; + SoundEngine.PlaySound(11); + this.sign = -1; + Main.editSign = false; + Main.npcChatText = string.Empty; + } + + private void LaunchMinecartHook(int myX, int myY) + { + Vector2 vector2 = new Vector2((float) Main.mouseX + Main.screenPosition.X, (float) Main.mouseY + Main.screenPosition.Y); + vector2 = new Vector2((float) (myX * 16 + 8), (float) (myY * 16 + 8)); + this.minecartLeft = this.direction <= 0; + this.RemoveAllGrapplingHooks(); + Projectile.NewProjectile(vector2.X, vector2.Y, 0.0f, 0.0f, 403, 0, 0.0f, this.whoAmI); + this.releaseHook = false; + } + + public void RemoveAllGrapplingHooks() + { + this.ClearGrapplingBlacklist(); + this.grappling[0] = -1; + this.grapCount = 0; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == this.whoAmI && Main.projectile[index].aiStyle == 7) + Main.projectile[index].Kill(); + } + } + + public void RemoveAllFishingBobbers() + { + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == this.whoAmI && Main.projectile[index].bobber) + Main.projectile[index].Kill(); + } + } + + private void TileInteractionsMouseOver(int myX, int myY) + { + if ((myX != Player.tileTargetX ? 0 : (myY == Player.tileTargetY ? 1 : 0)) == 0) + return; + if (Main.tile[myX, myY].type == (ushort) 79) + { + if (!Player.IsHoveringOverABottomSideOfABed(myX, myY)) + { + if (this.IsWithinSnappngRangeToTile(myX, myY, 96)) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 5013; + } + } + else + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + int num = (int) Main.tile[myX, myY].frameY / 36; + this.cursorItemIconID = num != 0 ? (num != 1 ? (num != 2 ? (num != 3 ? (num != 4 ? (num != 5 ? (num != 6 ? (num != 7 ? (num != 8 ? (num != 9 ? (num != 10 ? (num != 11 ? (num != 12 ? (num < 13 || num > 18 ? (num < 19 || num > 20 ? (num != 21 ? (num != 22 ? (num != 23 ? (num != 24 ? (num != 25 ? (num != 26 ? (num != 27 ? (num != 28 ? (num != 29 ? (num != 30 ? (num != 31 ? (num != 32 ? (num != 33 ? (num != 34 ? (num != 35 ? (num != 36 ? (num != 37 ? (num != 38 ? (num != 39 ? 646 : 4567) : 4299) : 4209) : 4188) : 4167) : 4146) : 3959) : 3932) : 3897) : 3163) : 3164) : 3162) : 2811) : 2669) : 2568) : 2553) : 2538) : 2520) : 2231) : 2139 + num - 19) : 2066 + num - 13) : 1722) : 1721) : 1720) : 1719) : 1473) : 1472) : 1471) : 1470) : 920) : 646) : 645) : 644) : 224; + } + } + if (Main.tile[myX, myY].type == (ushort) 597) + { + int pylonStyleFromTile = TETeleportationPylon.GetPylonStyleFromTile(Main.tile[myX, myY]); + int typeFromTileStyle = TETeleportationPylon.GetPylonItemTypeFromTileStyle(pylonStyleFromTile); + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = typeFromTileStyle; + if (pylonStyleFromTile == 1) + this.cursorItemIconID = 4875; + if (pylonStyleFromTile == 2) + this.cursorItemIconID = 4916; + if (pylonStyleFromTile == 3) + this.cursorItemIconID = 4917; + if (pylonStyleFromTile == 4) + this.cursorItemIconID = 4918; + if (pylonStyleFromTile == 5) + this.cursorItemIconID = 4919; + if (pylonStyleFromTile == 6) + this.cursorItemIconID = 4920; + if (pylonStyleFromTile == 7) + this.cursorItemIconID = 4921; + if (pylonStyleFromTile == 8) + this.cursorItemIconID = 4951; + } + if (Main.tile[myX, myY].type == (ushort) 621) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 3750; + } + if (Main.tile[myX, myY].type == (ushort) 33) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 105; + int num = (int) Main.tile[myX, myY].frameY / 22; + if (num == 1) + this.cursorItemIconID = 1405; + if (num == 2) + this.cursorItemIconID = 1406; + if (num == 3) + this.cursorItemIconID = 1407; + if (num >= 4 && num <= 13) + this.cursorItemIconID = 2045 + num - 4; + if (num >= 14 && num <= 16) + this.cursorItemIconID = 2153 + num - 14; + if (num == 17) + this.cursorItemIconID = 2236; + if (num == 18) + this.cursorItemIconID = 2523; + if (num == 19) + this.cursorItemIconID = 2542; + if (num == 20) + this.cursorItemIconID = 2556; + if (num == 21) + this.cursorItemIconID = 2571; + if (num == 22) + this.cursorItemIconID = 2648; + if (num == 23) + this.cursorItemIconID = 2649; + if (num == 24) + this.cursorItemIconID = 2650; + if (num == 25) + this.cursorItemIconID = 2651; + else if (num == 26) + this.cursorItemIconID = 2818; + else if (num == 27) + this.cursorItemIconID = 3171; + else if (num == 28) + this.cursorItemIconID = 3173; + else if (num == 29) + this.cursorItemIconID = 3172; + else if (num == 30) + this.cursorItemIconID = 3890; + else if (num == 31) + this.cursorItemIconID = 3936; + else if (num == 32) + this.cursorItemIconID = 3962; + else if (num == 33) + this.cursorItemIconID = 4150; + else if (num == 34) + this.cursorItemIconID = 4171; + else if (num == 35) + this.cursorItemIconID = 4192; + else if (num == 36) + this.cursorItemIconID = 4213; + else if (num == 37) + this.cursorItemIconID = 4303; + else if (num == 38) + this.cursorItemIconID = 4571; + } + if (Main.tile[myX, myY].type == (ushort) 21) + this.TileInteractionsMouseOver_Containers(myX, myY); + if (Main.tile[myX, myY].type == (ushort) 467) + this.TileInteractionsMouseOver_Containers(myX, myY); + if (Main.tile[myX, myY].type == (ushort) 441) + { + Tile tile = Main.tile[myX, myY]; + int num1 = myX; + int num2 = myY; + if ((int) tile.frameX % 36 != 0) + { + int num3 = num1 - 1; + } + if ((int) tile.frameY % 36 != 0) + { + int num4 = num2 - 1; + } + this.cursorItemIconID = -1; + this.cursorItemIconID = Chest.chestTypeToIcon[(int) tile.frameX / 36]; + this.noThrow = 2; + this.cursorItemIconEnabled = true; + } + if (Main.tile[myX, myY].type == (ushort) 468) + { + Tile tile = Main.tile[myX, myY]; + int num5 = myX; + int num6 = myY; + if ((int) tile.frameX % 36 != 0) + { + int num7 = num5 - 1; + } + if ((int) tile.frameY % 36 != 0) + { + int num8 = num6 - 1; + } + this.cursorItemIconID = -1; + this.cursorItemIconID = Chest.chestTypeToIcon2[(int) tile.frameX / 36]; + this.noThrow = 2; + this.cursorItemIconEnabled = true; + } + if (Main.tile[myX, myY].type == (ushort) 88) + { + Tile tile = Main.tile[myX, myY]; + int num9 = myX; + int num10 = myY; + int num11 = (int) tile.frameX % 54 / 18; + int X = num9 - num11; + if ((int) tile.frameY % 36 != 0) + --num10; + int Y = num10; + int chest = Chest.FindChest(X, Y); + this.cursorItemIconID = -1; + if (chest < 0) + { + this.cursorItemIconText = Lang.dresserType[0].Value; + } + else + { + this.cursorItemIconText = !(Main.chest[chest].name != "") ? Lang.dresserType[(int) tile.frameX / 54].Value : Main.chest[chest].name; + if (this.cursorItemIconText == Lang.dresserType[(int) tile.frameX / 54].Value) + { + this.cursorItemIconID = Chest.dresserTypeToIcon[(int) tile.frameX / 54]; + this.cursorItemIconText = ""; + } + } + this.noThrow = 2; + this.cursorItemIconEnabled = true; + if (Main.tile[myX, myY].frameY > (short) 0) + { + this.cursorItemIconID = 269; + this.cursorItemIconText = ""; + } + } + if (Main.tile[myX, myY].type == (ushort) 10 || Main.tile[myX, myY].type == (ushort) 11) + { + Tile tile = Main.tile[myX, myY]; + this.noThrow = 2; + this.cursorItemIconEnabled = true; + int frameY = (int) tile.frameY; + int num = 0; + while (frameY >= 54) + { + frameY -= 54; + ++num; + } + if (tile.type == (ushort) 10) + num += 36 * ((int) tile.frameX / 54); + if (tile.type == (ushort) 11) + num += 36 * ((int) tile.frameX / 72); + this.cursorItemIconID = num != 0 ? (num != 9 ? (num != 10 ? (num != 11 ? (num != 12 ? (num != 13 ? (num != 14 ? (num != 15 ? (num != 16 ? (num != 17 ? (num != 18 ? (num != 19 ? (num < 20 || num > 23 ? (num != 24 ? (num != 25 ? (num != 26 ? (num != 27 ? (num != 28 ? (num != 29 ? (num != 30 ? (num != 31 ? (num != 32 ? (num != 33 ? (num != 34 ? (num != 35 ? (num != 36 ? (num != 37 ? (num != 38 ? (num != 39 ? (num != 40 ? (num != 41 ? (num != 42 ? (num != 43 ? (num != 44 ? (num != 45 ? (num < 4 || num > 8 ? 649 + num : 812 + num) : 4576) : 4415) : 4307) : 4218) : 4197) : 4176) : 4155) : 3967) : 3941) : 3888) : 3130) : 3131) : 3129) : 2815) : 2576) : 2561) : 2528) : 2265) : 2044) : 1924) : 1815) : 1793) : 1709 + num - 20) : 1458) : 1413) : 1412) : 1411) : 1140) : 1139) : 1138) : 1137) : 1141) : 912) : 837) : 25; + } + if (Main.tile[myX, myY].type == (ushort) 104) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + switch ((int) Main.tile[myX, myY].frameX / 36) + { + case 0: + this.cursorItemIconID = 359; + break; + case 1: + this.cursorItemIconID = 2237; + break; + case 2: + this.cursorItemIconID = 2238; + break; + case 3: + this.cursorItemIconID = 2239; + break; + case 4: + this.cursorItemIconID = 2240; + break; + case 5: + this.cursorItemIconID = 2241; + break; + case 6: + this.cursorItemIconID = 2560; + break; + case 7: + this.cursorItemIconID = 2575; + break; + case 8: + this.cursorItemIconID = 2591; + break; + case 9: + this.cursorItemIconID = 2592; + break; + case 10: + this.cursorItemIconID = 2593; + break; + case 11: + this.cursorItemIconID = 2594; + break; + case 12: + this.cursorItemIconID = 2595; + break; + case 13: + this.cursorItemIconID = 2596; + break; + case 14: + this.cursorItemIconID = 2597; + break; + case 15: + this.cursorItemIconID = 2598; + break; + case 16: + this.cursorItemIconID = 2599; + break; + case 17: + this.cursorItemIconID = 2600; + break; + case 18: + this.cursorItemIconID = 2601; + break; + case 19: + this.cursorItemIconID = 2602; + break; + case 20: + this.cursorItemIconID = 2603; + break; + case 21: + this.cursorItemIconID = 2604; + break; + case 22: + this.cursorItemIconID = 2605; + break; + case 23: + this.cursorItemIconID = 2606; + break; + case 24: + this.cursorItemIconID = 2809; + break; + case 25: + this.cursorItemIconID = 3126; + break; + case 26: + this.cursorItemIconID = 3128; + break; + case 27: + this.cursorItemIconID = 3127; + break; + case 28: + this.cursorItemIconID = 3898; + break; + case 29: + this.cursorItemIconID = 3899; + break; + case 30: + this.cursorItemIconID = 3900; + break; + case 31: + this.cursorItemIconID = 3901; + break; + case 32: + this.cursorItemIconID = 3902; + break; + case 33: + this.cursorItemIconID = 3940; + break; + case 34: + this.cursorItemIconID = 3966; + break; + case 35: + this.cursorItemIconID = 4154; + break; + case 36: + this.cursorItemIconID = 4175; + break; + case 37: + this.cursorItemIconID = 4196; + break; + case 38: + this.cursorItemIconID = 4217; + break; + case 39: + this.cursorItemIconID = 4306; + break; + case 40: + this.cursorItemIconID = 4575; + break; + } + } + if (Main.tile[myX, myY].type == (ushort) 356) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 3064; + } + if (Main.tile[myX, myY].type == (ushort) 377) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 3198; + } + if (Main.tile[myX, myY].type == (ushort) 209) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + if (Main.tile[myX, myY].frameX < (short) 72) + this.cursorItemIconID = 928; + else if (Main.tile[myX, myY].frameX < (short) 144) + this.cursorItemIconID = 1337; + else if (Main.tile[myX, myY].frameX < (short) 216) + this.cursorItemIconID = 3369; + else if (Main.tile[myX, myY].frameX < (short) 360) + this.cursorItemIconID = 3664; + int num = (int) Main.tile[myX, myY].frameX / 18; + while (num >= 4) + num -= 4; + this.cursorItemIconReversed = num < 2; + } + if (Main.tile[myX, myY].type == (ushort) 216) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + int frameY = (int) Main.tile[myX, myY].frameY; + int num = 0; + while (frameY >= 40) + { + frameY -= 40; + ++num; + } + this.cursorItemIconID = 970 + num; + } + if (Main.tile[myX, myY].type == (ushort) 387 || Main.tile[myX, myY].type == (ushort) 386) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + int x = 0; + int y = 0; + WorldGen.GetTopLeftAndStyles(ref x, ref y, 2, 1 + (Main.tile[myX, myY].type == (ushort) 386).ToInt(), 18, 18); + this.cursorItemIconID = 3239; + } + if (Main.tile[myX, myY].type == (ushort) 389 || Main.tile[myX, myY].type == (ushort) 388) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 3240; + } + if (Main.tile[myX, myY].type == (ushort) 335) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 2700; + } + if (Main.tile[myX, myY].type == (ushort) 15 && this.IsWithinSnappngRangeToTile(myX, myY, 40)) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = WorldGen.GetItemDrop_Chair((int) Main.tile[myX, myY].frameY / 40); + if ((int) Main.tile[myX, myY].frameX / 18 < 1) + this.cursorItemIconReversed = true; + } + if (Main.tile[myX, myY].type == (ushort) 102 && this.IsWithinSnappngRangeToTile(myX, myY, 40)) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 355; + } + if (Main.tile[myX, myY].type == (ushort) 89 && this.IsWithinSnappngRangeToTile(myX, myY, 40)) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = WorldGen.GetItemDrop_Benches((int) Main.tile[myX, myY].frameX / 54); + } + if (Main.tile[myX, myY].type == (ushort) 487 && this.IsWithinSnappngRangeToTile(myX, myY, 40)) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = WorldGen.GetItemDrop_PicnicTables((int) Main.tile[myX, myY].frameX / 72); + } + if (Main.tile[myX, myY].type == (ushort) 497 && this.IsWithinSnappngRangeToTile(myX, myY, 40)) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = WorldGen.GetItemDrop_Toilet((int) Main.tile[myX, myY].frameY / 40); + if ((int) Main.tile[myX, myY].frameX / 18 < 1) + this.cursorItemIconReversed = true; + } + if (Main.tile[myX, myY].type == (ushort) 410) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 3536 + Math.Min((int) Main.tile[myX, myY].frameX / 36, 3); + } + if (Main.tile[myX, myY].type == (ushort) 480) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 4054; + } + if (Main.tile[myX, myY].type == (ushort) 509) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 4318; + } + if (Main.tile[myX, myY].type == (ushort) 463) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 3813; + } + if (Main.tile[myX, myY].type == (ushort) 491) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 4076; + } + if (Main.tile[myX, myY].type == (ushort) 494) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 4089; + } + if (Main.tile[myX, myY].type == (ushort) 411 && Main.tile[myX, myY].frameX < (short) 36) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 3545; + } + if (Main.tile[myX, myY].type == (ushort) 338) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 2738; + } + if (Main.tile[myX, myY].type == (ushort) 455) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 3747; + } + if (Main.tile[myX, myY].type == (ushort) 219 && (this.inventory[this.selectedItem].type == 424 || this.inventory[this.selectedItem].type == 1103)) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = this.inventory[this.selectedItem].type; + } + if (Main.tile[myX, myY].type == (ushort) 212) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 949; + } + if (Main.tile[myX, myY].type == (ushort) 314 && (double) this.gravDir == 1.0) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 2343; + } + if (Main.tile[myX, myY].type == (ushort) 215) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + int num = (int) Main.tile[myX, myY].frameX / 54; + this.cursorItemIconID = num != 0 ? (num < 8 || num > 13 ? (num != 7 ? (num != 6 ? (num != 5 ? 3046 + num - 1 : 3050) : 3723) : 3724) : 4689 + num - 8) : 966; + } + if (Main.tile[myX, myY].type == (ushort) 4) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + int num = (int) Main.tile[myX, myY].frameY / 22; + switch (num) + { + case 0: + this.cursorItemIconID = 8; + break; + case 8: + this.cursorItemIconID = 523; + break; + case 9: + this.cursorItemIconID = 974; + break; + case 10: + this.cursorItemIconID = 1245; + break; + case 11: + this.cursorItemIconID = 1333; + break; + case 12: + this.cursorItemIconID = 2274; + break; + case 13: + this.cursorItemIconID = 3004; + break; + case 14: + this.cursorItemIconID = 3045; + break; + case 15: + this.cursorItemIconID = 3114; + break; + case 16: + this.cursorItemIconID = 4383; + break; + case 17: + this.cursorItemIconID = 4384; + break; + case 18: + this.cursorItemIconID = 4385; + break; + case 19: + this.cursorItemIconID = 4386; + break; + case 20: + this.cursorItemIconID = 4387; + break; + case 21: + this.cursorItemIconID = 4388; + break; + default: + this.cursorItemIconID = 426 + num; + break; + } + } + if (Main.tile[myX, myY].type == (ushort) 13) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + switch ((int) Main.tile[myX, myY].frameX / 18) + { + case 1: + this.cursorItemIconID = 28; + break; + case 2: + this.cursorItemIconID = 110; + break; + case 3: + this.cursorItemIconID = 350; + break; + case 4: + this.cursorItemIconID = 351; + break; + case 5: + this.cursorItemIconID = 2234; + break; + case 6: + this.cursorItemIconID = 2244; + break; + case 7: + this.cursorItemIconID = 2257; + break; + case 8: + this.cursorItemIconID = 2258; + break; + default: + this.cursorItemIconID = 31; + break; + } + } + if (Main.tile[myX, myY].type == (ushort) 29) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 87; + } + if (Main.tile[myX, myY].type == (ushort) 97) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 346; + } + if (Main.tile[myX, myY].type == (ushort) 510) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 4319; + int num = (int) Main.tile[myX, myY].frameX / 18; + while (num >= 2) + num -= 2; + this.cursorItemIconReversed = num == 0; + } + if (Main.tile[myX, myY].type == (ushort) 511) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 4320; + int num = (int) Main.tile[myX, myY].frameX / 18; + while (num >= 2) + num -= 2; + this.cursorItemIconReversed = num == 0; + } + if (Main.tile[myX, myY].type == (ushort) 49) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 148; + } + if (Main.tile[myX, myY].type == (ushort) 174) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 713; + } + if (Main.tile[myX, myY].type == (ushort) 50) + { + this.noThrow = 2; + if (Main.tile[myX, myY].frameX == (short) 90) + { + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 165; + } + } + if (Main.tile[myX, myY].type == (ushort) 139) + { + this.noThrow = 2; + int index1 = myX; + int index2 = myY; + int num = 0; + for (int index3 = (int) Main.tile[index1, index2].frameY / 18; index3 >= 2; index3 -= 2) + ++num; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = num != 28 ? (num != 29 ? (num != 30 ? (num != 31 ? (num != 32 ? (num != 33 ? (num != 34 ? (num != 35 ? (num != 36 ? (num != 37 ? (num != 38 ? (num != 39 ? (num != 40 ? (num != 41 ? (num != 42 ? (num != 43 ? (num != 44 ? (num != 45 ? (num != 46 ? (num != 47 ? (num != 48 ? (num != 49 ? (num != 50 ? (num != 51 ? (num != 52 ? (num != 53 ? (num != 54 ? (num != 55 ? (num != 56 ? (num != 57 ? (num != 58 ? (num != 59 ? (num != 60 ? (num != 61 ? (num != 62 ? (num != 63 ? (num != 64 ? (num != 65 ? (num != 66 ? (num != 67 ? (num != 68 ? (num != 69 ? (num != 70 ? (num != 71 ? (num != 72 ? (num != 73 ? (num != 74 ? (num != 75 ? (num != 76 ? (num != 77 ? (num != 78 ? (num != 79 ? (num != 80 ? (num != 81 ? (num != 82 ? (num != 83 ? (num != 84 ? (num != 85 ? (num < 13 ? 562 + num : 1596 + num - 13) : 5044) : 5040) : 5039) : 5038) : 5037) : 5036) : 5035) : 5034) : 5033) : 5032) : 5031) : 5030) : 5029) : 5028) : 5027) : 5026) : 5025) : 5024) : 5023) : 5022) : 5021) : 5020) : 5019) : 5018) : 5017) : 5016) : 5015) : 5014) : 5006) : 4992) : 4991) : 4990) : 4985) : 4979) : 4606) : 4421) : 4358) : 4357) : 4356) : 4237) : 4081) : 4080) : 4077) : 4079) : 4078) : 4082) : 3869) : 3796) : 3371) : 3370) : 3237) : 3236) : 3235) : 3044) : 2742) : 1965) : 1964) : 1963; + } + if (Main.tile[myX, myY].type == (ushort) 207) + { + this.noThrow = 2; + int index4 = myX; + int index5 = myY; + int num = 0; + for (int index6 = (int) Main.tile[index4, index5].frameX / 18; index6 >= 2; index6 -= 2) + ++num; + this.cursorItemIconEnabled = true; + switch (num) + { + case 0: + this.cursorItemIconID = 909; + break; + case 1: + this.cursorItemIconID = 910; + break; + case 2: + this.cursorItemIconID = 940; + break; + case 3: + this.cursorItemIconID = 941; + break; + case 4: + this.cursorItemIconID = 942; + break; + case 5: + this.cursorItemIconID = 943; + break; + case 6: + this.cursorItemIconID = 944; + break; + case 7: + this.cursorItemIconID = 945; + break; + case 8: + this.cursorItemIconID = 4922; + break; + case 9: + this.cursorItemIconID = 4417; + break; + } + } + if (Main.tileSign[(int) Main.tile[myX, myY].type]) + { + this.noThrow = 2; + int num12 = (int) Main.tile[myX, myY].frameX / 18; + int num13 = (int) Main.tile[myX, myY].frameY / 18; + int num14 = num12 % 2; + int i = myX - num14; + int j = myY - num13; + Main.signBubble = true; + Main.signX = i * 16 + 16; + Main.signY = j * 16; + int num15 = Sign.ReadSign(i, j, false); + if (num15 != -1) + Main.signHover = num15; + if (num15 != -1) + { + Main.signHover = num15; + this.cursorItemIconEnabled = false; + this.cursorItemIconID = -1; + } + } + if (Main.tile[myX, myY].type == (ushort) 237) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 1293; + } + if (Main.tile[myX, myY].type == (ushort) 466) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 3828; + } + if (Main.tile[myX, myY].type == (ushort) 125) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 487; + } + if (Main.tile[myX, myY].type == (ushort) 354) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 2999; + } + if (Main.tile[myX, myY].type == (ushort) 287) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 2177; + } + if (Main.tile[myX, myY].type == (ushort) 132) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 513; + } + if (Main.tile[myX, myY].type == (ushort) 136) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 538; + } + if (Main.tile[myX, myY].type == (ushort) 144) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + int num = (int) Main.tile[myX, myY].frameX / 18; + this.cursorItemIconID = num >= 3 ? 4484 + (num - 3) : 583 + num; + } + if (Main.tile[myX, myY].type == (ushort) 440) + { + int index = myY; + int num16 = (int) Main.tile[myX, index].frameX / 54; + int num17 = (int) Main.tile[myX, index].frameY / 54; + int type = -1; + switch (num16) + { + case 0: + type = 1526; + break; + case 1: + type = 1524; + break; + case 2: + type = 1525; + break; + case 3: + type = 1523; + break; + case 4: + type = 1522; + break; + case 5: + type = 1527; + break; + case 6: + type = 3643; + break; + } + if (type != -1 && (num17 == 1 || this.HasItem(type))) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = type; + } + } + else if (Main.tile[myX, myY].type == (ushort) 470) + { + this.noThrow = 2; + int num = (int) Main.tile[myX, myY].frameX % 136 / 34; + if (num < 2) + { + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 498; + } + else if (num < 4) + { + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 1989; + } + } + else if (Main.tile[myX, myY].type == (ushort) 475) + { + this.noThrow = 2; + this.cursorItemIconEnabled = true; + this.cursorItemIconID = 3977; + } + else if (Main.tile[myX, myY].type == (ushort) 520) + { + this.noThrow = 2; + int key = TEFoodPlatter.Find(myX, myY); + if (key != -1) + { + this.cursorItemIconEnabled = true; + this.cursorItemIconID = ((TEFoodPlatter) TileEntity.ByID[key]).item.type; + } + } + else if (Main.tile[myX, myY].type == (ushort) 395) + { + this.noThrow = 2; + int x = myX; + int y = myY; + int frameX = (int) Main.tile[myX, myY].frameX; + int frameY = (int) Main.tile[myX, myY].frameY; + while (frameY > 0) + { + frameY -= 18; + --y; + } + while (frameX >= 36) + frameX -= 36; + while (frameX > 0) + { + frameX -= 18; + --x; + } + int key = TEItemFrame.Find(x, y); + if (key != -1) + { + this.cursorItemIconEnabled = true; + this.cursorItemIconID = ((TEItemFrame) TileEntity.ByID[key]).item.type; + } + } + else if (Main.tile[myX, myY].type == (ushort) 471) + { + this.noThrow = 2; + int x = myX; + int y = myY; + int frameX = (int) Main.tile[myX, myY].frameX; + int frameY = (int) Main.tile[myX, myY].frameY; + while (frameY > 0) + { + frameY -= 18; + --y; + } + while (frameX >= 54) + frameX -= 54; + while (frameX > 0) + { + frameX -= 18; + --x; + } + int key = TEWeaponsRack.Find(x, y); + if (key != -1) + { + this.cursorItemIconEnabled = true; + this.cursorItemIconID = ((TEWeaponsRack) TileEntity.ByID[key]).item.type; + } + } + else if (Main.tile[myX, myY].type == (ushort) 334) + this.noThrow = 2; + if (!PlayerInput.UsingGamepad || this.cursorItemIconText.Length != 0) + return; + this.cursorItemIconEnabled = false; + this.cursorItemIconID = 0; + } + + public Color ChatColor() + { + switch (this.difficulty) + { + case 1: + return Main.mcColor; + case 2: + return Main.hcColor; + default: + return Color.White; + } + } + + private void TileInteractionsMouseOver_Containers(int myX, int myY) + { + LocalizedText[] localizedTextArray = Lang.chestType; + int[] numArray = Chest.chestTypeToIcon; + Tile tile = Main.tile[myX, myY]; + if (tile.type == (ushort) 467) + { + localizedTextArray = Lang.chestType2; + numArray = Chest.chestTypeToIcon2; + } + int X = myX; + int Y = myY; + if ((int) tile.frameX % 36 != 0) + --X; + if ((int) tile.frameY % 36 != 0) + --Y; + int chest = Chest.FindChest(X, Y); + this.cursorItemIconID = -1; + if (chest < 0) + { + this.cursorItemIconText = localizedTextArray[0].Value; + } + else + { + this.cursorItemIconText = !(Main.chest[chest].name != "") ? localizedTextArray[(int) tile.frameX / 36].Value : Main.chest[chest].name; + if (this.cursorItemIconText == localizedTextArray[(int) tile.frameX / 36].Value) + { + this.cursorItemIconID = numArray[(int) tile.frameX / 36]; + this.cursorItemIconText = ""; + } + } + if (this.cursorItemIconID == 3988) + this.cursorItemIconID = 306; + this.noThrow = 2; + this.cursorItemIconEnabled = true; + } + + private void TryLandingOnDetonator() + { + if (this.whoAmI != Main.myPlayer || (double) this.velocity.Y < 3.0) + return; + Point tileCoordinates = (this.Bottom + new Vector2(0.0f, 0.01f)).ToTileCoordinates(); + Tile tileSafely = Framing.GetTileSafely(tileCoordinates.X, tileCoordinates.Y); + if (!tileSafely.active() || tileSafely.type != (ushort) 411 || tileSafely.frameY != (short) 0 || tileSafely.frameX >= (short) 36) + return; + Wiring.HitSwitch(tileCoordinates.X, tileCoordinates.Y); + NetMessage.SendData(59, number: tileCoordinates.X, number2: ((float) tileCoordinates.Y)); + } + + private void TryBouncingBlocks(bool Falling) + { + int num1 = (double) this.velocity.Y >= 5.0 || (double) this.velocity.Y <= -5.0 ? (!this.wet ? 1 : 0) : 0; + bool flag1 = false; + bool flag2 = false; + float num2 = 1f; + if (num1 == 0) + return; + bool flag3 = false; + int num3 = 0; + foreach (Point touchedTile in this.TouchedTiles) + { + Tile tile = Main.tile[touchedTile.X, touchedTile.Y]; + if (tile != null && tile.active() && tile.nactive() && (flag1 || Main.tileBouncy[(int) tile.type])) + { + flag3 = true; + num3 = touchedTile.Y; + break; + } + } + if (!flag3) + return; + this.velocity.Y *= -0.8f; + if (this.controlJump) + this.velocity.Y = MathHelper.Clamp(this.velocity.Y, -13f, 13f); + this.position.Y = (float) (num3 * 16 - ((double) this.velocity.Y < 0.0 ? this.height : -16)); + this.FloorVisuals(Falling); + if (flag2) + { + Vector2 rotationVector2 = (this.fullRotation - 1.570796f).ToRotationVector2(); + if ((double) rotationVector2.Y > 0.0) + rotationVector2.Y *= -1f; + rotationVector2.Y = (float) ((double) rotationVector2.Y * 0.5 - 0.5); + float num4 = -rotationVector2.Y; + if ((double) num4 < 0.0) + num4 = 0.0f; + float num5 = (float) ((double) num4 * 1.5 + 1.0); + float num6 = MathHelper.Clamp(Math.Abs(this.velocity.Y) * num5 * num2, 2f, 16f); + this.velocity = rotationVector2 * num6; + float num7 = 20f; + Vector2 vector2 = this.Center + (this.fullRotation + 1.570796f).ToRotationVector2() * num7; + Vector2 bottom = this.Bottom; + ParticleOrchestrator.RequestParticleSpawn(true, ParticleOrchestraType.Keybrand, new ParticleOrchestraSettings() + { + PositionInWorld = bottom + }, new int?(this.whoAmI)); + } + this.velocity.Y = MathHelper.Clamp(this.velocity.Y, -20f, 20f); + if ((double) this.velocity.Y * (double) this.gravDir >= 0.0) + return; + this.fallStart = (int) this.position.Y / 16; + } + + private bool CanAcceptItemIntoInventory(Item item) => !this.preventAllItemPickups || ItemID.Sets.IgnoresEncumberingStone[item.type]; + + private void GrabItems(int i) + { + for (int worldItemArrayIndex = 0; worldItemArrayIndex < 400; ++worldItemArrayIndex) + { + Item obj = Main.item[worldItemArrayIndex]; + if (obj.active && obj.noGrabDelay == 0 && obj.playerIndexTheItemIsReservedFor == i && this.CanAcceptItemIntoInventory(obj)) + { + int itemGrabRange = this.GetItemGrabRange(obj); + Microsoft.Xna.Framework.Rectangle hitbox = obj.Hitbox; + if (this.Hitbox.Intersects(hitbox)) + { + if (i == Main.myPlayer && (this.inventory[this.selectedItem].type != 0 ? 0 : (this.itemAnimation > 0 ? 1 : 0)) == 0) + this.PickupItem(i, worldItemArrayIndex, obj); + } + else if (new Microsoft.Xna.Framework.Rectangle((int) this.position.X - itemGrabRange, (int) this.position.Y - itemGrabRange, this.width + itemGrabRange * 2, this.height + itemGrabRange * 2).Intersects(hitbox)) + { + Player.ItemSpaceStatus status = this.ItemSpace(obj); + if (this.CanPullItem(obj, status)) + { + obj.beingGrabbed = true; + if (this.manaMagnet && (obj.type == 184 || obj.type == 1735 || obj.type == 1868)) + this.PullItem_Pickup(obj, 12f, 5); + else if (this.lifeMagnet && (obj.type == 58 || obj.type == 1734 || obj.type == 1867)) + this.PullItem_Pickup(obj, 15f, 5); + else if (ItemID.Sets.NebulaPickup[obj.type]) + this.PullItem_Pickup(obj, 12f, 5); + else if (status.ItemIsGoingToVoidVault) + this.PullItem_ToVoidVault(obj); + else if (this.goldRing && obj.IsACoin) + this.PullItem_Pickup(obj, 12f, 5); + else + this.PullItem_Common(obj, 0.75f); + } + } + } + } + } + + private void PullItem_ToVoidVault(Item itemToPickUp) => this.PullItem_Pickup(itemToPickUp, 12f, 5); + + private void PullItem_Common(Item itemToPickUp, float xPullSpeed) + { + if ((double) this.position.X + (double) this.width * 0.5 > (double) itemToPickUp.position.X + (double) itemToPickUp.width * 0.5) + { + if ((double) itemToPickUp.velocity.X < (double) Player.itemGrabSpeedMax + (double) this.velocity.X) + itemToPickUp.velocity.X += Player.itemGrabSpeed; + if ((double) itemToPickUp.velocity.X < 0.0) + itemToPickUp.velocity.X += Player.itemGrabSpeed * xPullSpeed; + } + else + { + if ((double) itemToPickUp.velocity.X > -(double) Player.itemGrabSpeedMax + (double) this.velocity.X) + itemToPickUp.velocity.X -= Player.itemGrabSpeed; + if ((double) itemToPickUp.velocity.X > 0.0) + itemToPickUp.velocity.X -= Player.itemGrabSpeed * xPullSpeed; + } + if ((double) this.position.Y + (double) this.height * 0.5 > (double) itemToPickUp.position.Y + (double) itemToPickUp.height * 0.5) + { + if ((double) itemToPickUp.velocity.Y < (double) Player.itemGrabSpeedMax) + itemToPickUp.velocity.Y += Player.itemGrabSpeed; + if ((double) itemToPickUp.velocity.Y >= 0.0) + return; + itemToPickUp.velocity.Y += Player.itemGrabSpeed * xPullSpeed; + } + else + { + if ((double) itemToPickUp.velocity.Y > -(double) Player.itemGrabSpeedMax) + itemToPickUp.velocity.Y -= Player.itemGrabSpeed; + if ((double) itemToPickUp.velocity.Y <= 0.0) + return; + itemToPickUp.velocity.Y -= Player.itemGrabSpeed * xPullSpeed; + } + } + + private void PullItem_Pickup(Item itemToPickUp, float speed, int acc) + { + Vector2 vector2 = new Vector2(itemToPickUp.position.X + (float) (itemToPickUp.width / 2), itemToPickUp.position.Y + (float) (itemToPickUp.height / 2)); + float num1 = this.Center.X - vector2.X; + float num2 = this.Center.Y - vector2.Y; + float num3 = (float) Math.Sqrt((double) num1 * (double) num1 + (double) num2 * (double) num2); + float num4 = speed / num3; + float num5 = num1 * num4; + float num6 = num2 * num4; + itemToPickUp.velocity.X = (itemToPickUp.velocity.X * (float) (acc - 1) + num5) / (float) acc; + itemToPickUp.velocity.Y = (itemToPickUp.velocity.Y * (float) (acc - 1) + num6) / (float) acc; + } + + private Item PickupItem(int playerIndex, int worldItemArrayIndex, Item itemToPickUp) + { + if (ItemID.Sets.NebulaPickup[itemToPickUp.type]) + { + SoundEngine.PlaySound(7, (int) this.position.X, (int) this.position.Y); + int buffType = itemToPickUp.buffType; + itemToPickUp = new Item(); + if (Main.netMode == 1) + NetMessage.SendData(102, number: playerIndex, number2: ((float) buffType), number3: this.Center.X, number4: this.Center.Y); + else + this.NebulaLevelup(buffType); + } + if (itemToPickUp.type == 58 || itemToPickUp.type == 1734 || itemToPickUp.type == 1867) + { + SoundEngine.PlaySound(7, (int) this.position.X, (int) this.position.Y); + this.statLife += 20; + if (Main.myPlayer == this.whoAmI) + this.HealEffect(20); + if (this.statLife > this.statLifeMax2) + this.statLife = this.statLifeMax2; + itemToPickUp = new Item(); + } + else if (itemToPickUp.type == 184 || itemToPickUp.type == 1735 || itemToPickUp.type == 1868) + { + SoundEngine.PlaySound(7, (int) this.position.X, (int) this.position.Y); + this.statMana += 100; + if (Main.myPlayer == this.whoAmI) + this.ManaEffect(100); + if (this.statMana > this.statManaMax2) + this.statMana = this.statManaMax2; + itemToPickUp = new Item(); + } + else if (itemToPickUp.type == 4143) + { + SoundEngine.PlaySound(7, (int) this.position.X, (int) this.position.Y); + this.statMana += 50; + if (Main.myPlayer == this.whoAmI) + this.ManaEffect(50); + if (this.statMana > this.statManaMax2) + this.statMana = this.statManaMax2; + itemToPickUp = new Item(); + } + else + itemToPickUp = this.GetItem(playerIndex, itemToPickUp, GetItemSettings.PickupItemFromWorld); + Main.item[worldItemArrayIndex] = itemToPickUp; + if (Main.netMode == 1) + NetMessage.SendData(21, number: worldItemArrayIndex); + return itemToPickUp; + } + + private int GetItemGrabRange(Item item) + { + int defaultItemGrabRange = Player.defaultItemGrabRange; + if (this.goldRing && item.IsACoin) + defaultItemGrabRange += Item.coinGrabRange; + if (this.manaMagnet && (item.type == 184 || item.type == 1735 || item.type == 1868)) + defaultItemGrabRange += Item.manaGrabRange; + if (item.type == 4143) + defaultItemGrabRange += Item.manaGrabRange; + if (this.lifeMagnet && (item.type == 58 || item.type == 1734 || item.type == 1867)) + defaultItemGrabRange += Item.lifeGrabRange; + if (this.treasureMagnet) + defaultItemGrabRange += Item.treasureGrabRange; + if (item.type == 3822) + defaultItemGrabRange += 50; + if (ItemID.Sets.NebulaPickup[item.type]) + defaultItemGrabRange += 100; + return defaultItemGrabRange; + } + + public bool SellItem(Item item, int stack = -1) + { + int calcForSelling; + int calcForBuying; + this.GetItemExpectedPrice(item, out calcForSelling, out calcForBuying); + if (calcForSelling <= 0) + return false; + if (stack == -1) + stack = item.stack; + Item[] objArray = new Item[58]; + for (int index = 0; index < 58; ++index) + { + objArray[index] = new Item(); + objArray[index] = this.inventory[index].Clone(); + } + int num1 = calcForSelling / 5; + if (num1 < 1) + num1 = 1; + int num2 = num1; + int num3 = num1 * stack; + int amount = Main.shopSellbackHelper.GetAmount(item); + if (amount > 0) + num3 += (-num2 + calcForBuying) * Math.Min(amount, item.stack); + bool flag = false; + while (num3 >= 1000000 && !flag) + { + int index = -1; + for (int i = 53; i >= 0; --i) + { + if (index == -1 && (this.inventory[i].type == 0 || this.inventory[i].stack == 0)) + index = i; + while (this.inventory[i].type == 74 && this.inventory[i].stack < this.inventory[i].maxStack && num3 >= 1000000) + { + ++this.inventory[i].stack; + num3 -= 1000000; + this.DoCoins(i); + if (this.inventory[i].stack == 0 && index == -1) + index = i; + } + } + if (num3 >= 1000000) + { + if (index == -1) + { + flag = true; + } + else + { + this.inventory[index].SetDefaults(74); + num3 -= 1000000; + } + } + } + while (num3 >= 10000 && !flag) + { + int index = -1; + for (int i = 53; i >= 0; --i) + { + if (index == -1 && (this.inventory[i].type == 0 || this.inventory[i].stack == 0)) + index = i; + while (this.inventory[i].type == 73 && this.inventory[i].stack < this.inventory[i].maxStack && num3 >= 10000) + { + ++this.inventory[i].stack; + num3 -= 10000; + this.DoCoins(i); + if (this.inventory[i].stack == 0 && index == -1) + index = i; + } + } + if (num3 >= 10000) + { + if (index == -1) + { + flag = true; + } + else + { + this.inventory[index].SetDefaults(73); + num3 -= 10000; + } + } + } + while (num3 >= 100 && !flag) + { + int index = -1; + for (int i = 53; i >= 0; --i) + { + if (index == -1 && (this.inventory[i].type == 0 || this.inventory[i].stack == 0)) + index = i; + while (this.inventory[i].type == 72 && this.inventory[i].stack < this.inventory[i].maxStack && num3 >= 100) + { + ++this.inventory[i].stack; + num3 -= 100; + this.DoCoins(i); + if (this.inventory[i].stack == 0 && index == -1) + index = i; + } + } + if (num3 >= 100) + { + if (index == -1) + { + flag = true; + } + else + { + this.inventory[index].SetDefaults(72); + num3 -= 100; + } + } + } + while (num3 >= 1 && !flag) + { + int index = -1; + for (int i = 53; i >= 0; --i) + { + if (index == -1 && (this.inventory[i].type == 0 || this.inventory[i].stack == 0)) + index = i; + while (this.inventory[i].type == 71 && this.inventory[i].stack < this.inventory[i].maxStack && num3 >= 1) + { + ++this.inventory[i].stack; + --num3; + this.DoCoins(i); + if (this.inventory[i].stack == 0 && index == -1) + index = i; + } + } + if (num3 >= 1) + { + if (index == -1) + { + flag = true; + } + else + { + this.inventory[index].SetDefaults(71); + --num3; + } + } + } + if (!flag) + return true; + for (int index = 0; index < 58; ++index) + this.inventory[index] = objArray[index].Clone(); + return false; + } + + public void RefreshItems() + { + this.RefreshItemArray(this.inventory); + this.RefreshItemArray(this.armor); + this.RefreshItemArray(this.dye); + this.RefreshItemArray(this.miscEquips); + this.RefreshItemArray(this.miscDyes); + this.RefreshItemArray(this.bank.item); + this.RefreshItemArray(this.bank2.item); + this.RefreshItemArray(this.bank3.item); + this.RefreshItemArray(this.bank4.item); + } + + private void RefreshItemArray(Item[] array) + { + for (int index = 0; index < array.Length; ++index) + { + if (!array[index].IsAir) + array[index].Refresh(); + } + } + + public void GetItemExpectedPrice(Item item, out int calcForSelling, out int calcForBuying) + { + if (item.shopSpecialCurrency != -1) + { + CustomCurrencyManager.GetPrices(item, out calcForSelling, out calcForBuying); + } + else + { + int storeValue = item.GetStoreValue(); + calcForSelling = storeValue; + calcForBuying = storeValue; + if (this.discount) + { + if (!item.buyOnce) + calcForBuying = (int) ((double) calcForBuying * 0.800000011920929); + if (item.isAShopItem) + calcForSelling = calcForBuying; + } + if (item.buyOnce) + { + calcForBuying = (int) Math.Round((double) calcForBuying / this.currentShoppingSettings.PriceAdjustment); + calcForSelling = (int) Math.Round((double) calcForSelling / this.currentShoppingSettings.PriceAdjustment); + } + else + { + calcForBuying = (int) Math.Round((double) calcForBuying * this.currentShoppingSettings.PriceAdjustment); + calcForSelling = (int) Math.Round((double) calcForSelling / this.currentShoppingSettings.PriceAdjustment); + } + if (!item.buyOnce) + return; + calcForBuying /= 5; + if (storeValue == 0 || calcForBuying >= 1) + return; + calcForBuying = 1; + } + } + + public bool BuyItem(int price, int customCurrency = -1) + { + if (customCurrency != -1) + return CustomCurrencyManager.BuyItem(this, price, customCurrency); + bool overFlowing; + long num1 = Utils.CoinsCount(out overFlowing, this.inventory, 58, 57, 56, 55, 54); + long num2 = Utils.CoinsCount(out overFlowing, this.bank.item); + long num3 = Utils.CoinsCount(out overFlowing, this.bank2.item); + long num4 = Utils.CoinsCount(out overFlowing, this.bank3.item); + long num5 = Utils.CoinsCount(out overFlowing, this.bank4.item); + if (Utils.CoinsCombineStacks(out overFlowing, num1, num2, num3, num4, num5) < (long) price) + return false; + List inv = new List(); + Dictionary> dictionary = new Dictionary>(); + List slotsEmpty = new List(); + List slotCoins = new List(); + List slotEmptyBank = new List(); + List slotEmptyBank2 = new List(); + List slotEmptyBank3 = new List(); + List slotEmptyBank4 = new List(); + inv.Add(this.inventory); + inv.Add(this.bank.item); + inv.Add(this.bank2.item); + inv.Add(this.bank3.item); + inv.Add(this.bank4.item); + for (int key = 0; key < inv.Count; ++key) + dictionary[key] = new List(); + dictionary[0] = new List() { 58, 57, 56, 55, 54 }; + for (int index = 0; index < inv.Count; ++index) + { + for (int y = 0; y < inv[index].Length; ++y) + { + if (!dictionary[index].Contains(y) && inv[index][y].IsACoin) + slotCoins.Add(new Point(index, y)); + } + } + int num6 = 0; + for (int y = inv[num6].Length - 1; y >= 0; --y) + { + if (!dictionary[num6].Contains(y) && (inv[num6][y].type == 0 || inv[num6][y].stack == 0)) + slotsEmpty.Add(new Point(num6, y)); + } + int num7 = 1; + for (int y = inv[num7].Length - 1; y >= 0; --y) + { + if (!dictionary[num7].Contains(y) && (inv[num7][y].type == 0 || inv[num7][y].stack == 0)) + slotEmptyBank.Add(new Point(num7, y)); + } + int num8 = 2; + for (int y = inv[num8].Length - 1; y >= 0; --y) + { + if (!dictionary[num8].Contains(y) && (inv[num8][y].type == 0 || inv[num8][y].stack == 0)) + slotEmptyBank2.Add(new Point(num8, y)); + } + int num9 = 3; + for (int y = inv[num9].Length - 1; y >= 0; --y) + { + if (!dictionary[num9].Contains(y) && (inv[num9][y].type == 0 || inv[num9][y].stack == 0)) + slotEmptyBank3.Add(new Point(num9, y)); + } + int num10 = 4; + for (int y = inv[num10].Length - 1; y >= 0; --y) + { + if (!dictionary[num10].Contains(y) && (inv[num10][y].type == 0 || inv[num10][y].stack == 0)) + slotEmptyBank4.Add(new Point(num10, y)); + } + return !Player.TryPurchasing(price, inv, slotCoins, slotsEmpty, slotEmptyBank, slotEmptyBank2, slotEmptyBank3, slotEmptyBank4); + } + + private static bool TryPurchasing( + int price, + List inv, + List slotCoins, + List slotsEmpty, + List slotEmptyBank, + List slotEmptyBank2, + List slotEmptyBank3, + List slotEmptyBank4) + { + long num1 = (long) price; + Dictionary dictionary = new Dictionary(); + bool flag = false; + while (num1 > 0L) + { + long num2 = 1000000; + for (int index = 0; index < 4; ++index) + { + if (num1 >= num2) + { + foreach (Point slotCoin in slotCoins) + { + if (inv[slotCoin.X][slotCoin.Y].type == 74 - index) + { + long num3 = num1 / num2; + dictionary[slotCoin] = inv[slotCoin.X][slotCoin.Y].Clone(); + if (num3 < (long) inv[slotCoin.X][slotCoin.Y].stack) + { + inv[slotCoin.X][slotCoin.Y].stack -= (int) num3; + } + else + { + inv[slotCoin.X][slotCoin.Y].SetDefaults(); + slotsEmpty.Add(slotCoin); + } + num1 -= num2 * (long) (dictionary[slotCoin].stack - inv[slotCoin.X][slotCoin.Y].stack); + } + } + } + num2 /= 100L; + } + if (num1 > 0L) + { + if (slotsEmpty.Count > 0) + { + slotsEmpty.Sort(new Comparison(DelegateMethods.CompareYReverse)); + Point point = new Point(-1, -1); + for (int index1 = 0; index1 < inv.Count; ++index1) + { + long num4 = 10000; + for (int index2 = 0; index2 < 3; ++index2) + { + if (num1 >= num4) + { + foreach (Point slotCoin in slotCoins) + { + if (slotCoin.X == index1 && inv[slotCoin.X][slotCoin.Y].type == 74 - index2 && inv[slotCoin.X][slotCoin.Y].stack >= 1) + { + List pointList = slotsEmpty; + if (index1 == 1 && slotEmptyBank.Count > 0) + pointList = slotEmptyBank; + if (index1 == 2 && slotEmptyBank2.Count > 0) + pointList = slotEmptyBank2; + if (index1 == 3 && slotEmptyBank3.Count > 0) + pointList = slotEmptyBank3; + if (index1 == 4 && slotEmptyBank4.Count > 0) + pointList = slotEmptyBank4; + if (--inv[slotCoin.X][slotCoin.Y].stack <= 0) + { + inv[slotCoin.X][slotCoin.Y].SetDefaults(); + pointList.Add(slotCoin); + } + dictionary[pointList[0]] = inv[pointList[0].X][pointList[0].Y].Clone(); + inv[pointList[0].X][pointList[0].Y].SetDefaults(73 - index2); + inv[pointList[0].X][pointList[0].Y].stack = 100; + point = pointList[0]; + pointList.RemoveAt(0); + break; + } + } + } + if (point.X == -1 && point.Y == -1) + num4 /= 100L; + else + break; + } + for (int index3 = 0; index3 < 2; ++index3) + { + if (point.X == -1 && point.Y == -1) + { + foreach (Point slotCoin in slotCoins) + { + if (slotCoin.X == index1 && inv[slotCoin.X][slotCoin.Y].type == 73 + index3 && inv[slotCoin.X][slotCoin.Y].stack >= 1) + { + List pointList = slotsEmpty; + if (index1 == 1 && slotEmptyBank.Count > 0) + pointList = slotEmptyBank; + if (index1 == 2 && slotEmptyBank2.Count > 0) + pointList = slotEmptyBank2; + if (index1 == 3 && slotEmptyBank3.Count > 0) + pointList = slotEmptyBank3; + if (index1 == 4 && slotEmptyBank4.Count > 0) + pointList = slotEmptyBank4; + if (--inv[slotCoin.X][slotCoin.Y].stack <= 0) + { + inv[slotCoin.X][slotCoin.Y].SetDefaults(); + pointList.Add(slotCoin); + } + dictionary[pointList[0]] = inv[pointList[0].X][pointList[0].Y].Clone(); + inv[pointList[0].X][pointList[0].Y].SetDefaults(72 + index3); + inv[pointList[0].X][pointList[0].Y].stack = 100; + point = pointList[0]; + pointList.RemoveAt(0); + break; + } + } + } + } + if (point.X != -1 && point.Y != -1) + { + slotCoins.Add(point); + break; + } + } + slotsEmpty.Sort(new Comparison(DelegateMethods.CompareYReverse)); + slotEmptyBank.Sort(new Comparison(DelegateMethods.CompareYReverse)); + slotEmptyBank2.Sort(new Comparison(DelegateMethods.CompareYReverse)); + slotEmptyBank3.Sort(new Comparison(DelegateMethods.CompareYReverse)); + slotEmptyBank4.Sort(new Comparison(DelegateMethods.CompareYReverse)); + } + else + { + foreach (KeyValuePair keyValuePair in dictionary) + inv[keyValuePair.Key.X][keyValuePair.Key.Y] = keyValuePair.Value.Clone(); + flag = true; + break; + } + } + } + return flag; + } + + public void AdjTiles() + { + int num1 = 4; + int num2 = 3; + for (int index = 0; index < 623; ++index) + { + this.oldAdjTile[index] = this.adjTile[index]; + this.adjTile[index] = false; + } + this.oldAdjWater = this.adjWater; + this.adjWater = false; + this.oldAdjHoney = this.adjHoney; + this.adjHoney = false; + this.oldAdjLava = this.adjLava; + this.adjLava = false; + this.alchemyTable = false; + int num3 = (int) (((double) this.position.X + (double) (this.width / 2)) / 16.0); + int num4 = (int) (((double) this.position.Y + (double) this.height) / 16.0); + for (int index1 = num3 - num1; index1 <= num3 + num1; ++index1) + { + for (int index2 = num4 - num2; index2 < num4 + num2; ++index2) + { + if (Main.tile[index1, index2].active()) + { + this.adjTile[(int) Main.tile[index1, index2].type] = true; + switch (Main.tile[index1, index2].type) + { + case 77: + case 302: + this.adjTile[17] = true; + break; + case 133: + this.adjTile[17] = true; + this.adjTile[77] = true; + break; + case 134: + this.adjTile[16] = true; + break; + case 354: + case 469: + case 487: + this.adjTile[14] = true; + break; + case 355: + this.adjTile[13] = true; + this.adjTile[14] = true; + this.alchemyTable = true; + break; + } + } + if (Main.tile[index1, index2].liquid > (byte) 200 && Main.tile[index1, index2].liquidType() == (byte) 0) + this.adjWater = true; + if (Main.tile[index1, index2].liquid > (byte) 200 && Main.tile[index1, index2].liquidType() == (byte) 2) + this.adjHoney = true; + if (Main.tile[index1, index2].liquid > (byte) 200 && Main.tile[index1, index2].liquidType() == (byte) 1) + this.adjLava = true; + } + } + if (!Main.playerInventory) + return; + bool flag = false; + for (int index = 0; index < 623; ++index) + { + if (this.oldAdjTile[index] != this.adjTile[index]) + { + flag = true; + break; + } + } + if (this.adjWater != this.oldAdjWater) + flag = true; + if (this.adjHoney != this.oldAdjHoney) + flag = true; + if (this.adjLava != this.oldAdjLava) + flag = true; + if (!flag) + return; + Recipe.FindRecipes(); + } + + public bool IsTileTypeInInteractionRange(int targetTileType) + { + int num1 = (int) (((double) this.position.X + (double) (this.width / 2)) / 16.0); + int num2 = (int) (((double) this.position.Y + (double) this.height) / 16.0); + int num3 = Player.tileRangeX; + int num4 = Player.tileRangeY; + if (num3 > 20) + num3 = 20; + if (num4 > 20) + num4 = 20; + int num5 = Utils.Clamp(num1 - num3, 0, Main.maxTilesX - 1); + int num6 = Utils.Clamp(num1 + num3, 0, Main.maxTilesX - 1); + int num7 = Utils.Clamp(num2 - num4, 0, Main.maxTilesY - 1); + int num8 = Utils.Clamp(num2 + num4, 0, Main.maxTilesY - 1); + for (int index1 = num5; index1 <= num6; ++index1) + { + for (int index2 = num7; index2 < num8; ++index2) + { + Tile tile = Main.tile[index1, index2]; + if (tile != null && tile.active() && (int) tile.type == targetTileType) + return true; + } + } + return false; + } + + public void DisplayDollUpdate() + { + if (Main.gamePaused) + return; + ++this.miscCounter; + if (this.miscCounter < 300) + return; + this.miscCounter = 0; + } + + public bool IsColorfulDye(int dye) => dye > 0 && ItemID.Sets.ColorfulDyeValues[dye]; + + public bool ShouldDrawFootball() + { + bool flag = this.hasFootball && !this.pulley && !this.compositeBackArm.enabled; + if (this.HeldItem.type == 4743 && this.itemAnimation > 0) + flag = false; + return flag; + } + + public void PlayerFrame() + { + if (this.swimTime > 0) + { + --this.swimTime; + if (!this.wet) + this.swimTime = 0; + } + this.head = this.armor[0].headSlot; + this.body = this.armor[1].bodySlot; + this.legs = this.armor[2].legSlot; + if (this.armor[10].headSlot >= 0) + this.head = this.armor[10].headSlot; + if (this.armor[11].bodySlot >= 0) + this.body = this.armor[11].bodySlot; + if (this.armor[12].legSlot >= 0) + this.legs = this.armor[12].legSlot; + this.UpdateVisibleAccessories(); + this.wearsRobe = false; + bool somethingSpecial = false; + int num1 = Player.SetMatch(1, this.body, this.Male, ref this.wearsRobe); + if (num1 != -1) + this.legs = num1; + int num2 = Player.SetMatch(2, this.legs, this.Male, ref somethingSpecial); + if (num2 != -1) + this.legs = num2; + int num3 = Player.SetMatch(0, this.head, this.Male, ref somethingSpecial); + if (num3 != -1) + this.head = num3; + if (this.body == 93) + { + this.shield = (sbyte) 0; + this.handoff = (sbyte) 0; + } + if (this.body >= 0) + { + sbyte num4 = (sbyte) (this.Male ? ArmorIDs.Body.Sets.IncludedCapeBack : ArmorIDs.Body.Sets.IncludedCapeBackFemale)[this.body]; + if (num4 != (sbyte) -1 && this.back == (sbyte) -1 && !this.sitting.isSitting) + { + this.back = num4; + this.cBack = this.cBody; + } + sbyte num5 = (sbyte) ArmorIDs.Body.Sets.IncludedCapeFront[this.body]; + if (num5 != (sbyte) -1 && this.front == (sbyte) -1) + { + this.front = num5; + this.cFront = this.cBody; + } + ArmorIDs.Body.Sets.IncludeCapeFrontAndBackInfo frontAndBackInfo = ArmorIDs.Body.Sets.IncludeCapeFrontAndBack[this.body]; + if (!frontAndBackInfo.Invalid && this.back == (sbyte) -1 && this.front == (sbyte) -1 && !this.sitting.isSitting) + { + this.front = frontAndBackInfo.frontCape; + this.back = frontAndBackInfo.backCape; + this.cFront = this.cBody; + this.cBack = this.cBody; + } + } + if (this.legs == 67) + this.shoe = (sbyte) 0; + if (this.legs == 140) + this.shoe = (sbyte) 0; + if ((this.wereWolf || this.forceWerewolf) && !this.hideWolf) + { + this.legs = 20; + this.body = 21; + this.head = 38; + } + bool flag1 = this.wet && !this.lavaWet && (!this.mount.Active || !this.mount.IsConsideredASlimeMount); + if (this.merman || this.forceMerman) + { + if (!this.hideMerman) + { + this.head = 39; + this.legs = 21; + this.body = 22; + } + if (flag1) + this.wings = 0; + } + this.socialShadowRocketBoots = false; + this.socialIgnoreLight = false; + this.socialGhost = false; + this.armorEffectDrawShadow = false; + this.armorEffectDrawShadowSubtle = false; + this.armorEffectDrawOutlines = false; + this.armorEffectDrawShadowLokis = false; + this.armorEffectDrawShadowBasilisk = false; + this.armorEffectDrawOutlinesForbidden = false; + this.armorEffectDrawShadowEOCShield = false; + if (!this.isDisplayDollOrInanimate) + { + if (this.head == 101 && this.body == 66 && this.legs == 55) + this.socialGhost = true; + if (this.head == 156 && this.body == 66 && this.legs == 55) + this.socialGhost = true; + this.SetArmorEffectVisuals(this); + } + this.hermesStepSound.SoundType = 17; + this.hermesStepSound.SoundStyle = -1; + this.hermesStepSound.IntendedCooldown = 9; + if (this.head == 99 && this.body == 65 && this.legs == 54) + this.turtleArmor = true; + if (this.head == 162 && this.body == 170 && this.legs == 105) + this.spiderArmor = true; + this.ApplyArmorSoundAndDustChanges(); + if (this.legs == 140) + { + this.hermesStepSound.SoundType = 2; + this.hermesStepSound.SoundStyle = 24; + this.hermesStepSound.IntendedCooldown = 6; + } + if (this.wings > 0 && this.wings != 33) + { + this.back = (sbyte) -1; + this.front = (sbyte) -1; + } + if (this.head > 0 && this.face != (sbyte) 7) + this.face = (sbyte) -1; + if (this.webbed || this.frozen || this.stoned || Main.gamePaused && !Main.gameMenu) + return; + if (!this.isDisplayDollOrInanimate) + { + if ((this.body == 68 && this.legs == 57 && this.head == 106 || this.body == 74 && this.legs == 63 && this.head == 106) && Main.rand.Next(10) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X - this.velocity.X * 2f, (float) ((double) this.position.Y - 2.0 - (double) this.velocity.Y * 2.0)), this.width, this.height, 43, Alpha: 100, newColor: new Color((int) byte.MaxValue, 0, (int) byte.MaxValue), Scale: 0.3f); + Main.dust[index].fadeIn = 0.8f; + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 2f; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.ArmorSetDye(), this); + } + if (this.wings == 27 && this.wingsLogic == this.wings) + { + float r = 0.4f * this.stealth; + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, r, r * 0.9f, r * 0.2f); + } + if (this.head == 5 && this.body == 5 && this.legs == 5) + this.socialShadowRocketBoots = true; + if (this.head == 5 && this.body == 5 && this.legs == 5 && Main.rand.Next(10) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 14, Alpha: 200, Scale: 1.2f); + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.ArmorSetDye(), this); + } + if (this.head == 76 && this.body == 49 && this.legs == 45) + this.socialShadowRocketBoots = true; + if (this.head == 74 && this.body == 48 && this.legs == 44) + this.socialShadowRocketBoots = true; + if (this.head == 74 && this.body == 48 && this.legs == 44 && Main.rand.Next(10) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 14, Alpha: 200, Scale: 1.2f); + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.ArmorSetDye(), this); + } + if (this.head == 57 && this.body == 37 && this.legs == 35) + { + int maxValue = 10; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) > 1.0) + maxValue = 2; + if (Main.rand.Next(maxValue) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 115, Alpha: 140, Scale: 0.75f); + Main.dust[index].noGravity = true; + Main.dust[index].fadeIn = 1.5f; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].velocity += this.velocity * 0.2f; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.ArmorSetDye(), this); + } + } + if (this.head == 6 && this.body == 6 && this.legs == 6 && (double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) > 1.0 && !this.rocketFrame) + { + for (int index1 = 0; index1 < 2; ++index1) + { + int index2 = Dust.NewDust(new Vector2(this.position.X - this.velocity.X * 2f, (float) ((double) this.position.Y - 2.0 - (double) this.velocity.Y * 2.0)), this.width, this.height, 6, Alpha: 100, Scale: 2f); + Main.dust[index2].noGravity = true; + Main.dust[index2].noLight = true; + Main.dust[index2].velocity.X -= this.velocity.X * 0.5f; + Main.dust[index2].velocity.Y -= this.velocity.Y * 0.5f; + Main.dust[index2].shader = GameShaders.Armor.GetSecondaryShader(this.ArmorSetDye(), this); + } + } + if (this.head == 8 && this.body == 8 && this.legs == 8 && (double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) > 1.0) + { + int index = Dust.NewDust(new Vector2(this.position.X - this.velocity.X * 2f, (float) ((double) this.position.Y - 2.0 - (double) this.velocity.Y * 2.0)), this.width, this.height, 40, Alpha: 50, Scale: 1.4f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity.X = this.velocity.X * 0.25f; + Main.dust[index].velocity.Y = this.velocity.Y * 0.25f; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.ArmorSetDye(), this); + } + if (this.head == 9 && this.body == 9 && this.legs == 9 && (double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) > 1.0 && !this.rocketFrame) + { + for (int index3 = 0; index3 < 2; ++index3) + { + int index4 = Dust.NewDust(new Vector2(this.position.X - this.velocity.X * 2f, (float) ((double) this.position.Y - 2.0 - (double) this.velocity.Y * 2.0)), this.width, this.height, 6, Alpha: 100, Scale: 2f); + Main.dust[index4].noGravity = true; + Main.dust[index4].noLight = true; + Main.dust[index4].velocity.X -= this.velocity.X * 0.5f; + Main.dust[index4].velocity.Y -= this.velocity.Y * 0.5f; + Main.dust[index4].shader = GameShaders.Armor.GetSecondaryShader(this.ArmorSetDye(), this); + } + } + if (this.body == 18 && this.legs == 17 && (this.head == 32 || this.head == 33 || this.head == 34) && Main.rand.Next(10) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X - this.velocity.X * 2f, (float) ((double) this.position.Y - 2.0 - (double) this.velocity.Y * 2.0)), this.width, this.height, 43, Alpha: 100, Scale: 0.3f); + Main.dust[index].fadeIn = 0.8f; + Main.dust[index].velocity *= 0.0f; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.ArmorSetDye(), this); + } + if ((this.body == 24 || this.body == 229) && (this.legs == 23 || this.legs == 212) && (this.head == 43 || this.head == 41 || this.head == 42 || this.head == 254 || this.head == (int) byte.MaxValue || this.head == 256 || this.head == 257 || this.head == 258) && (double) this.velocity.X != 0.0 && (double) this.velocity.Y != 0.0 && Main.rand.Next(10) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X - this.velocity.X * 2f, (float) ((double) this.position.Y - 2.0 - (double) this.velocity.Y * 2.0)), this.width, this.height, 43, Alpha: 100, Scale: 0.3f); + Main.dust[index].fadeIn = 0.8f; + Main.dust[index].velocity *= 0.0f; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(this.ArmorSetDye(), this); + } + if (this.body == 36 && this.head == 56 && (double) this.velocity.X != 0.0 && (double) this.velocity.Y == 0.0) + { + for (int index5 = 0; index5 < 2; ++index5) + { + int index6 = Dust.NewDust(new Vector2(this.position.X, this.position.Y + ((double) this.gravDir == 1.0 ? (float) (this.height - 2) : -4f)), this.width, 6, 106, Alpha: 100, Scale: 0.1f); + Main.dust[index6].fadeIn = 1f; + Main.dust[index6].noGravity = true; + Main.dust[index6].velocity *= 0.2f; + Main.dust[index6].shader = GameShaders.Armor.GetSecondaryShader(this.ArmorSetDye(), this); + } + } + if (this.body == 27 && this.head == 46 && this.legs == 26 && (double) this.velocity.X != 0.0 && (double) this.velocity.Y == 0.0 && this.miscCounter % 2 == 0) + { + for (int index7 = 0; index7 < 2; ++index7) + { + int index8 = index7 != 0 ? Dust.NewDust(new Vector2(this.position.X + (float) (this.width / 2), this.position.Y + (float) this.height + this.gfxOffY), this.width / 2, 6, 76, Scale: 1.35f) : Dust.NewDust(new Vector2(this.position.X, this.position.Y + (float) this.height + this.gfxOffY), this.width / 2, 6, 76, Scale: 1.35f); + Main.dust[index8].scale *= (float) (1.0 + (double) Main.rand.Next(20, 40) * 0.00999999977648258); + Main.dust[index8].noGravity = true; + Main.dust[index8].noLight = true; + Main.dust[index8].velocity *= 1f / 1000f; + Main.dust[index8].velocity.Y -= 3f / 1000f; + Main.dust[index8].shader = GameShaders.Armor.GetSecondaryShader(this.ArmorSetDye(), this); + } + } + } + this.drawingFootball = false; + if (this.ShouldDrawFootball()) + { + this.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, (float) (0.314159274101257 * (double) this.direction * -1.0)); + this.drawingFootball = true; + } + Item.GetDrawHitbox(this.HeldItem.type, this); + bool flag2 = this.CanVisuallyHoldItem(this.HeldItem); + bool flag3 = this.HeldItem.type != 4952; + if (this.mount.Active) + { + this.legFrameCounter = 0.0; + this.legFrame.Y = this.legFrame.Height * 6; + if (this.mount.Type == 23 || this.mount.Type == 45 || this.mount.Type == 48) + { + ref Microsoft.Xna.Framework.Rectangle local = ref this.legFrame; + Microsoft.Xna.Framework.Rectangle legFrame = this.legFrame; + local.Y = 0; + } + if ((double) this.velocity.Y != 0.0) + { + if (this.mount.FlyTime > 0 && this.jump == 0 && this.controlJump && !this.mount.CanHover()) + { + if (this.mount.Type == 0) + { + if (this.direction > 0) + { + if (Main.rand.Next(4) == 0) + { + int index = Dust.NewDust(new Vector2(this.Center.X - 22f, (float) ((double) this.position.Y + (double) this.height - 6.0)), 20, 10, 64, this.velocity.X * 0.25f, this.velocity.Y * 0.25f, (int) byte.MaxValue); + Main.dust[index].velocity *= 0.1f; + Main.dust[index].noLight = true; + } + if (Main.rand.Next(4) == 0) + { + int index = Dust.NewDust(new Vector2(this.Center.X + 12f, (float) ((double) this.position.Y + (double) this.height - 6.0)), 20, 10, 64, this.velocity.X * 0.25f, this.velocity.Y * 0.25f, (int) byte.MaxValue); + Main.dust[index].velocity *= 0.1f; + Main.dust[index].noLight = true; + } + } + else + { + if (Main.rand.Next(4) == 0) + { + int index = Dust.NewDust(new Vector2(this.Center.X - 32f, (float) ((double) this.position.Y + (double) this.height - 6.0)), 20, 10, 64, this.velocity.X * 0.25f, this.velocity.Y * 0.25f, (int) byte.MaxValue); + Main.dust[index].velocity *= 0.1f; + Main.dust[index].noLight = true; + } + if (Main.rand.Next(4) == 0) + { + int index = Dust.NewDust(new Vector2(this.Center.X + 2f, (float) ((double) this.position.Y + (double) this.height - 6.0)), 20, 10, 64, this.velocity.X * 0.25f, this.velocity.Y * 0.25f, (int) byte.MaxValue); + Main.dust[index].velocity *= 0.1f; + Main.dust[index].noLight = true; + } + } + } + this.mount.TryBeginningFlight(this, 3); + this.mount.UpdateFrame(this, 3, this.velocity); + this.mount.TryLanding(this); + } + else if (this.wet) + { + this.mount.UpdateFrame(this, 4, this.velocity); + } + else + { + this.mount.TryBeginningFlight(this, 2); + this.mount.UpdateFrame(this, 2, this.velocity); + this.mount.TryLanding(this); + } + } + else + this.mount.UpdateFrame(this, this.mount.GetIntendedGroundedFrame(this), this.velocity); + } + else if (this.legs != 140) + { + if (this.swimTime > 0) + { + this.legFrameCounter += 2.0; + while (this.legFrameCounter > 8.0) + { + this.legFrameCounter -= 8.0; + this.legFrame.Y += this.legFrame.Height; + } + if (this.legFrame.Y < this.legFrame.Height * 7) + this.legFrame.Y = this.legFrame.Height * 19; + else if (this.legFrame.Y > this.legFrame.Height * 19) + this.legFrame.Y = this.legFrame.Height * 7; + } + else if ((double) this.velocity.Y != 0.0 || this.grappling[0] > -1) + { + this.legFrameCounter = 0.0; + this.legFrame.Y = this.legFrame.Height * 5; + if ((this.wings == 22 || this.wings == 28 || this.wings == 45) && this.ShouldDrawWingsThatAreAlwaysAnimated()) + this.legFrame.Y = 0; + } + else if ((double) this.velocity.X != 0.0) + { + if ((this.slippy || this.slippy2 || this.windPushed) && !this.controlLeft && !this.controlRight) + { + this.legFrameCounter = 0.0; + ref Microsoft.Xna.Framework.Rectangle local = ref this.legFrame; + Microsoft.Xna.Framework.Rectangle legFrame = this.legFrame; + local.Y = 0; + } + else + { + this.legFrameCounter += (double) Math.Abs(this.velocity.X) * 1.3; + while (this.legFrameCounter > 8.0) + { + this.legFrameCounter -= 8.0; + this.legFrame.Y += this.legFrame.Height; + } + if (this.legFrame.Y < this.legFrame.Height * 7) + this.legFrame.Y = this.legFrame.Height * 19; + else if (this.legFrame.Y > this.legFrame.Height * 19) + this.legFrame.Y = this.legFrame.Height * 7; + } + } + else + { + this.legFrameCounter = 0.0; + ref Microsoft.Xna.Framework.Rectangle local = ref this.legFrame; + Microsoft.Xna.Framework.Rectangle legFrame = this.legFrame; + local.Y = 0; + } + } + if (this.carpetFrame >= 0) + { + this.legFrameCounter = 0.0; + ref Microsoft.Xna.Framework.Rectangle local = ref this.legFrame; + Microsoft.Xna.Framework.Rectangle legFrame = this.legFrame; + local.Y = 0; + } + if (this.sandStorm) + { + if (this.grappling[0] >= 0) + this.sandStorm = false; + if (this.miscCounter % 4 == 0 && this.itemAnimation == 0) + { + this.ChangeDir(this.direction * -1); + if (this.inventory[this.selectedItem].holdStyle == 2) + { + if (this.inventory[this.selectedItem].type == 946 || this.inventory[this.selectedItem].type == 4707) + this.itemLocation.X = this.position.X + (float) this.width * 0.5f - (float) (16 * this.direction); + if (this.inventory[this.selectedItem].type == 186) + { + this.itemLocation.X = this.position.X + (float) this.width * 0.5f + (float) (6 * this.direction); + this.itemRotation = 0.79f * (float) -this.direction; + } + } + } + this.legFrameCounter = 0.0; + ref Microsoft.Xna.Framework.Rectangle local = ref this.legFrame; + Microsoft.Xna.Framework.Rectangle legFrame = this.legFrame; + local.Y = 0; + } + else if (((this.itemAnimation <= 0 ? 0 : (this.inventory[this.selectedItem].useStyle != 10 ? 1 : 0)) & (flag3 ? 1 : 0)) != 0) + { + if (this.inventory[this.selectedItem].useStyle == 1 || this.inventory[this.selectedItem].type == 0) + this.bodyFrame.Y = (double) this.itemAnimation >= (double) this.itemAnimationMax * 0.333 ? ((double) this.itemAnimation >= (double) this.itemAnimationMax * 0.666 ? this.bodyFrame.Height : this.bodyFrame.Height * 2) : this.bodyFrame.Height * 3; + else if (this.inventory[this.selectedItem].useStyle == 7) + this.bodyFrame.Y = (double) this.itemAnimation <= (double) this.itemAnimationMax * 0.5 ? this.bodyFrame.Height * 2 : this.bodyFrame.Height * 3; + else if (this.inventory[this.selectedItem].useStyle == 2) + this.bodyFrame.Y = this.bodyFrame.Height * 3; + else if (this.inventory[this.selectedItem].useStyle == 11) + this.bodyFrame.Y = (double) this.itemAnimation <= (double) this.itemAnimationMax * 0.5 ? ((double) this.itemAnimation <= (double) this.itemAnimationMax * 0.15 ? this.bodyFrame.Height * 2 : this.bodyFrame.Height * 3) : this.bodyFrame.Height * 4; + else if (this.inventory[this.selectedItem].useStyle == 9) + this.bodyFrame.Y = 0; + else if (this.inventory[this.selectedItem].useStyle == 6) + { + float num6 = (float) (1.0 - (double) this.itemAnimation / (double) this.itemAnimationMax) * 6f; + if ((double) num6 > 1.0) + num6 = 1f; + this.bodyFrame.Y = (double) num6 < 0.5 ? this.bodyFrame.Height * 2 : this.bodyFrame.Height * 3; + } + else if (this.inventory[this.selectedItem].useStyle == 3) + this.bodyFrame.Y = (double) this.itemAnimation <= (double) this.itemAnimationMax * 0.666 ? this.bodyFrame.Height * 3 : this.bodyFrame.Height * 3; + else if (this.inventory[this.selectedItem].useStyle == 4) + this.bodyFrame.Y = this.bodyFrame.Height * 2; + else if (this.inventory[this.selectedItem].useStyle == 8) + this.bodyFrame.Y = 0; + else if (this.inventory[this.selectedItem].useStyle == 12) + this.bodyFrame.Y = this.bodyFrame.Height * 3; + else if (this.inventory[this.selectedItem].useStyle == 13) + this.bodyFrame.Y = (double) this.itemAnimation >= (double) this.itemAnimationMax * 0.333 ? ((double) this.itemAnimation >= (double) this.itemAnimationMax * 0.666 ? this.bodyFrame.Height : this.bodyFrame.Height * 2) : this.bodyFrame.Height * 3; + else if (this.inventory[this.selectedItem].useStyle == 5) + { + if (this.inventory[this.selectedItem].type == 281 || this.inventory[this.selectedItem].type == 986) + { + this.bodyFrame.Y = this.bodyFrame.Height * 2; + } + else + { + double num7 = (double) this.itemRotation * (double) this.direction; + this.bodyFrame.Y = this.bodyFrame.Height * 3; + if (num7 < -0.75) + { + this.bodyFrame.Y = this.bodyFrame.Height * 2; + if ((double) this.gravDir == -1.0) + this.bodyFrame.Y = this.bodyFrame.Height * 4; + } + if (num7 > 0.6) + { + this.bodyFrame.Y = this.bodyFrame.Height * 4; + if ((double) this.gravDir == -1.0) + this.bodyFrame.Y = this.bodyFrame.Height * 2; + } + } + } + } + else if (this.pulley) + this.bodyFrame.Y = this.pulleyDir != (byte) 2 ? this.bodyFrame.Height * 2 : this.bodyFrame.Height; + else if (flag2 && this.inventory[this.selectedItem].holdStyle == 1 && (!this.wet || !this.inventory[this.selectedItem].noWet) && (!this.happyFunTorchTime || this.inventory[this.selectedItem].createTile != 4)) + this.bodyFrame.Y = this.bodyFrame.Height * 3; + else if (flag2 && this.inventory[this.selectedItem].holdStyle == 2 && (!this.wet || !this.inventory[this.selectedItem].noWet)) + this.bodyFrame.Y = this.bodyFrame.Height * 2; + else if (flag2 && this.inventory[this.selectedItem].holdStyle == 3) + this.bodyFrame.Y = this.bodyFrame.Height * 3; + else if (flag2 && this.inventory[this.selectedItem].holdStyle == 5) + this.bodyFrame.Y = this.bodyFrame.Height * 3; + else if (flag2 && this.inventory[this.selectedItem].holdStyle == 4 && (double) this.velocity.Y == 0.0 && (double) this.gravDir == 1.0) + { + ref Microsoft.Xna.Framework.Rectangle local = ref this.bodyFrame; + Microsoft.Xna.Framework.Rectangle bodyFrame = this.bodyFrame; + local.Y = 0; + } + else if (this.shieldRaised) + this.bodyFrame.Y = this.bodyFrame.Height * 10; + else if (this.mount.Active) + { + this.bodyFrameCounter = 0.0; + this.bodyFrame.Y = this.bodyFrame.Height * this.mount.BodyFrame; + } + else if (this.grappling[0] >= 0) + { + this.sandStorm = false; + this.CancelAllJumpVisualEffects(); + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num8 = 0.0f; + float num9 = 0.0f; + for (int index = 0; index < this.grapCount; ++index) + { + num8 += Main.projectile[this.grappling[index]].position.X + (float) (Main.projectile[this.grappling[index]].width / 2); + num9 += Main.projectile[this.grappling[index]].position.Y + (float) (Main.projectile[this.grappling[index]].height / 2); + } + float num10 = num8 / (float) this.grapCount; + float num11 = num9 / (float) this.grapCount; + float num12 = num10 - vector2.X; + float num13 = num11 - vector2.Y; + if ((double) num13 < 0.0 && (double) Math.Abs(num13) > (double) Math.Abs(num12)) + { + this.bodyFrame.Y = this.bodyFrame.Height * 2; + if ((double) this.gravDir == -1.0) + this.bodyFrame.Y = this.bodyFrame.Height * 4; + } + else if ((double) num13 > 0.0 && (double) Math.Abs(num13) > (double) Math.Abs(num12)) + { + this.bodyFrame.Y = this.bodyFrame.Height * 4; + if ((double) this.gravDir == -1.0) + this.bodyFrame.Y = this.bodyFrame.Height * 2; + } + else + this.bodyFrame.Y = this.bodyFrame.Height * 3; + } + else if (this.wet && this.ShouldFloatInWater) + this.bodyFrame.Y = this.bodyFrame.Height * 9; + else if (this.swimTime > 0) + { + if (this.swimTime > 20) + { + ref Microsoft.Xna.Framework.Rectangle local = ref this.bodyFrame; + Microsoft.Xna.Framework.Rectangle bodyFrame = this.bodyFrame; + local.Y = 0; + } + else if (this.swimTime > 10) + { + this.bodyFrame.Y = this.bodyFrame.Height * 5; + } + else + { + ref Microsoft.Xna.Framework.Rectangle local = ref this.bodyFrame; + Microsoft.Xna.Framework.Rectangle bodyFrame = this.bodyFrame; + local.Y = 0; + } + } + else if ((double) this.velocity.Y != 0.0) + { + this.bodyFrame.Y = !this.sliding ? (this.sandStorm || this.carpetFrame >= 0 ? this.bodyFrame.Height * 6 : (this.eocDash <= 0 ? (this.wings <= 0 ? this.bodyFrame.Height * 5 : (this.wings == 22 || this.wings == 28 || this.wings == 45 ? 0 : ((double) this.velocity.Y <= 0.0 ? this.bodyFrame.Height * 6 : (!this.controlJump ? this.bodyFrame.Height * 5 : this.bodyFrame.Height * 6)))) : this.bodyFrame.Height * 6)) : this.bodyFrame.Height * 3; + this.bodyFrameCounter = 0.0; + } + else if ((double) this.velocity.X != 0.0) + { + if (this.legs == 140) + { + this.bodyFrameCounter += (double) Math.Abs(this.velocity.X) * 0.5; + while (this.bodyFrameCounter > 8.0) + { + this.bodyFrameCounter -= 8.0; + this.bodyFrame.Y += this.bodyFrame.Height; + } + if (this.bodyFrame.Y < this.bodyFrame.Height * 7) + this.bodyFrame.Y = this.bodyFrame.Height * 19; + else if (this.bodyFrame.Y > this.bodyFrame.Height * 19) + this.bodyFrame.Y = this.bodyFrame.Height * 7; + } + else + { + this.bodyFrameCounter += (double) Math.Abs(this.velocity.X) * 1.5; + this.bodyFrame.Y = this.legFrame.Y; + } + } + else + { + this.bodyFrameCounter = 0.0; + ref Microsoft.Xna.Framework.Rectangle local = ref this.bodyFrame; + Microsoft.Xna.Framework.Rectangle bodyFrame = this.bodyFrame; + local.Y = 0; + } + if (this.legs == 140) + { + this.legFrameCounter = 0.0; + this.legFrame.Y = this.legFrame.Height * ((double) this.velocity.Y != 0.0).ToInt(); + int index = this.bodyFrame.Y / this.bodyFrame.Height; + if ((double) Main.OffsetsPlayerHeadgear[index].Y == 0.0) + this.legFrame.Y = this.legFrame.Height * 7; + if (this.wings == 22 || this.wings == 28) + this.legFrame.Y = 0; + } + if (this.legs == 217 && (this.sitting.isSitting || this.sleeping.isSleeping)) + { + this.legFrameCounter = 0.0; + this.legFrame.Y = this.legFrame.Height * 5; + } + if (this.head != 259 || this.skipAnimatingValuesInPlayerFrame) + return; + this.rabbitOrderFrame.Update(); + } + + private void CancelAllJumpVisualEffects() + { + this.isPerformingJump_Cloud = false; + this.isPerformingJump_Sandstorm = false; + this.isPerformingJump_Blizzard = false; + this.isPerformingJump_Fart = false; + this.isPerformingJump_Sail = false; + this.isPerformingJump_Unicorn = false; + this.isPerformingJump_Santank = false; + } + + private void UpdateVisibleAccessories() + { + for (int index = 3; index < 10; ++index) + { + if (this.IsAValidEquipmentSlotForIteration(index)) + { + Item obj = this.armor[index]; + if (obj.shieldSlot == (sbyte) 5 && this.eocDash > 0 && this.shield == (sbyte) -1) + this.shield = obj.shieldSlot; + if (this.shieldRaised && this.shield == (sbyte) -1 && obj.shieldSlot != (sbyte) -1) + this.shield = obj.shieldSlot; + if (!this.ItemIsVisuallyIncompatible(obj)) + { + if (obj.wingSlot > (sbyte) 0) + { + if (!this.hideVisibleAccessory[index] || (double) this.velocity.Y != 0.0 && !this.mount.Active) + this.wings = (int) obj.wingSlot; + else + continue; + } + if (!this.hideVisibleAccessory[index]) + this.UpdateVisibleAccessory(index, obj); + } + } + } + for (int index = 13; index < 20; ++index) + { + if (this.IsAValidEquipmentSlotForIteration(index)) + { + Item obj = this.armor[index]; + if (!this.ItemIsVisuallyIncompatible(obj)) + this.UpdateVisibleAccessory(index, obj); + } + } + if (this.HeldItem.type != 4760 || this.ownedProjectileCounts[866] >= 1) + return; + this.shield = (sbyte) 9; + this.cShield = 0; + } + + private bool ItemIsVisuallyIncompatible(Item item) => this.shield > (sbyte) 0 && this.IsVisibleCapeBad((int) item.frontSlot) || this.compositeBackArm.enabled && item.shieldSlot > (sbyte) 0 || item.shieldSlot > (sbyte) 0 && ItemID.Sets.IsFood[this.HeldItem.type] || this.IsVisibleCapeBad((int) this.front) && item.shieldSlot > (sbyte) 0 || (this.legs == 106 || this.legs == 143 || this.legs == 217) && item.shoeSlot == (sbyte) 15; + + private bool IsVisibleCapeBad(int accFrontSlot) + { + switch (accFrontSlot) + { + case 1: + case 2: + case 3: + case 4: + case 5: + case 8: + return true; + default: + return false; + } + } + + private void UpdateVisibleAccessory(int itemSlot, Item item) + { + if (item.stringColor > 0) + this.stringColor = item.stringColor; + if (item.handOnSlot > (sbyte) 0) + this.handon = item.handOnSlot; + if (item.handOffSlot > (sbyte) 0) + this.handoff = item.handOffSlot; + if (item.backSlot > (sbyte) 0 && !this.sitting.isSitting) + { + this.back = item.backSlot; + this.front = (sbyte) -1; + } + if (item.frontSlot > (sbyte) 0) + this.front = item.frontSlot; + if (item.shoeSlot > (sbyte) 0) + this.shoe = item.shoeSlot; + if (item.waistSlot > (sbyte) 0) + this.waist = item.waistSlot; + if (item.shieldSlot > (sbyte) 0) + this.shield = item.shieldSlot; + if (item.neckSlot > (sbyte) 0) + this.neck = item.neckSlot; + if (item.faceSlot > (sbyte) 0) + this.face = item.faceSlot; + if (item.balloonSlot > (sbyte) 0) + this.balloon = item.balloonSlot; + if (item.wingSlot > (sbyte) 0) + this.wings = (int) item.wingSlot; + if (item.type == 3580) + this.yoraiz0rEye = itemSlot - 2; + if (item.type == 3581) + this.yoraiz0rDarkness = true; + if (item.type == 3929) + this.leinforsHair = true; + if (item.type == 4404) + this.hasFloatingTube = true; + if (item.type != 4563) + return; + this.hasUnicornHorn = true; + } + + public void SetArmorEffectVisuals(Player drawPlayer) + { + if (drawPlayer.head == 111 && drawPlayer.body == 73 && drawPlayer.legs == 62) + { + this.armorEffectDrawShadowSubtle = true; + this.armorEffectDrawOutlines = true; + } + if (drawPlayer.head == 134 && drawPlayer.body == 95 && drawPlayer.legs == 79) + { + this.armorEffectDrawShadowSubtle = true; + this.armorEffectDrawOutlines = true; + } + if (drawPlayer.head == 107 && drawPlayer.body == 69 && drawPlayer.legs == 58) + { + this.armorEffectDrawShadowSubtle = true; + this.armorEffectDrawShadow = true; + } + if (drawPlayer.head == 108 && drawPlayer.body == 70 && drawPlayer.legs == 59) + { + this.armorEffectDrawShadowSubtle = true; + this.armorEffectDrawShadow = true; + } + if (drawPlayer.head == 109 && drawPlayer.body == 71 && drawPlayer.legs == 60) + { + this.armorEffectDrawShadowSubtle = true; + this.armorEffectDrawShadow = true; + } + if (drawPlayer.head == 110 && drawPlayer.body == 72 && drawPlayer.legs == 61) + { + this.armorEffectDrawShadowSubtle = true; + this.armorEffectDrawShadow = true; + } + if (drawPlayer.head == 193 && drawPlayer.body == 194 && drawPlayer.legs == 134) + { + this.armorEffectDrawShadowSubtle = true; + this.armorEffectDrawShadowLokis = true; + this.armorEffectDrawOutlines = true; + } + if (drawPlayer.mount.Active && drawPlayer.mount.Type == 3 && (double) drawPlayer.velocity.Y != 0.0 && !drawPlayer.SlimeDontHyperJump) + this.armorEffectDrawShadow = true; + if (drawPlayer.mount.Active && drawPlayer.mount.Type == 10 && (double) Math.Abs(drawPlayer.velocity.X) > (double) drawPlayer.mount.DashSpeed - (double) drawPlayer.mount.RunSpeed / 2.0) + this.armorEffectDrawShadow = true; + if (drawPlayer.mount.Active && drawPlayer.mount.Type == 44 && (double) Math.Abs(drawPlayer.velocity.X) > (double) drawPlayer.mount.DashSpeed - (double) drawPlayer.mount.RunSpeed / 4.0) + this.armorEffectDrawShadow = true; + if (drawPlayer.mount.Active && drawPlayer.mount.Type == 45 && (double) Math.Abs(drawPlayer.velocity.X) > (double) drawPlayer.mount.DashSpeed * 0.899999976158142) + this.armorEffectDrawShadow = true; + if (drawPlayer.mount.Active && drawPlayer.mount.Type == 14 && (double) Math.Abs(drawPlayer.velocity.X) > (double) drawPlayer.mount.RunSpeed / 2.0) + this.armorEffectDrawShadowBasilisk = true; + if (drawPlayer.mount.Active && drawPlayer.mount.Type == 48) + { + this.armorEffectDrawOutlines = true; + this.armorEffectDrawShadow = true; + } + if (drawPlayer.body == 67 && drawPlayer.legs == 56 && drawPlayer.head >= 103 && drawPlayer.head <= 105) + this.armorEffectDrawShadow = true; + if ((drawPlayer.head == 78 || drawPlayer.head == 79 || drawPlayer.head == 80) && drawPlayer.body == 51 && drawPlayer.legs == 47) + this.armorEffectDrawShadowSubtle = true; + if (drawPlayer.head == 200 && drawPlayer.body == 198 && drawPlayer.legs == 142) + { + this.armorEffectDrawShadowLokis = true; + this.armorEffectDrawOutlinesForbidden = true; + } + if (drawPlayer.head == 171 && drawPlayer.body == 177 && drawPlayer.legs == 112) + { + this.armorEffectDrawShadow = true; + this.armorEffectDrawOutlines = true; + } + if (drawPlayer.head == 169 && drawPlayer.body == 175 && drawPlayer.legs == 110) + this.armorEffectDrawShadow = true; + if (drawPlayer.head == 170 && drawPlayer.body == 176 && drawPlayer.legs == 111) + { + this.armorEffectDrawShadowLokis = true; + this.armorEffectDrawOutlines = true; + } + if (drawPlayer.body == 209 && drawPlayer.legs == 159) + this.armorEffectDrawShadow = true; + if (drawPlayer.eocDash > 0) + this.armorEffectDrawShadowEOCShield = true; + else if (drawPlayer.dashDelay < 0) + this.armorEffectDrawShadow = true; + if (drawPlayer.head == 5 && drawPlayer.body == 5 && drawPlayer.legs == 5) + this.armorEffectDrawShadow = true; + if (drawPlayer.head == 74 && drawPlayer.body == 48 && drawPlayer.legs == 44) + this.armorEffectDrawShadow = true; + if (drawPlayer.head == 76 && drawPlayer.body == 49 && drawPlayer.legs == 45) + this.armorEffectDrawShadow = true; + if (drawPlayer.head == 7 && drawPlayer.body == 7 && drawPlayer.legs == 7) + this.armorEffectDrawShadow = true; + if (drawPlayer.head == 22 && drawPlayer.body == 14 && drawPlayer.legs == 14) + this.armorEffectDrawShadow = true; + if (drawPlayer.dye[0].dye == (byte) 30 && drawPlayer.dye[1].dye == (byte) 30 && drawPlayer.dye[2].dye == (byte) 30 && drawPlayer.head == 4 && drawPlayer.body == 27 && drawPlayer.legs == 26) + { + this.armorEffectDrawShadow = true; + this.armorEffectDrawOutlines = true; + } + if (drawPlayer.head == 189 && drawPlayer.body == 190 && drawPlayer.legs == 130) + this.armorEffectDrawOutlines = true; + if (drawPlayer.body == 17 && drawPlayer.legs == 16 && (drawPlayer.head == 29 || drawPlayer.head == 30 || drawPlayer.head == 31)) + this.armorEffectDrawShadow = true; + if (drawPlayer.body == 19 && drawPlayer.legs == 18 && (drawPlayer.head == 35 || drawPlayer.head == 36 || drawPlayer.head == 37)) + this.armorEffectDrawOutlines = true; + if ((drawPlayer.body == 24 || drawPlayer.body == 229) && (drawPlayer.legs == 23 || drawPlayer.legs == 212) && (drawPlayer.head == 43 || drawPlayer.head == 41 || drawPlayer.head == 42 || drawPlayer.head == 254 || drawPlayer.head == (int) byte.MaxValue || drawPlayer.head == 256 || drawPlayer.head == 257 || drawPlayer.head == 258)) + { + this.armorEffectDrawOutlines = true; + this.armorEffectDrawShadow = true; + } + if (drawPlayer.head == 157 && drawPlayer.legs == 98 && drawPlayer.body != 105) + { + int body = drawPlayer.body; + } + if (drawPlayer.body == 36 && drawPlayer.head == 56) + this.armorEffectDrawOutlines = true; + if (!drawPlayer.stoned && (double) drawPlayer.stealth == 1.0) + return; + this.armorEffectDrawOutlines = false; + this.armorEffectDrawShadow = false; + this.armorEffectDrawShadowSubtle = false; + } + + public static int SetMatch(int armorslot, int type, bool male, ref bool somethingSpecial) + { + int num = -1; + if (armorslot == 0 && type == 201) + num = male ? 201 : 202; + if (armorslot == 1) + { + switch (type) + { + case 15: + num = 88; + break; + case 36: + num = 89; + break; + case 41: + num = 97; + break; + case 42: + num = 90; + break; + case 58: + num = 91; + break; + case 59: + num = 92; + break; + case 60: + num = 93; + break; + case 61: + num = 94; + break; + case 62: + num = 95; + break; + case 63: + num = 96; + break; + case 77: + num = 121; + break; + case 81: + num = 169; + break; + case 88: + num = 168; + break; + case 89: + num = 186; + break; + case 90: + num = 166; + break; + case 93: + num = 165; + break; + case 165: + num = !male ? 99 : 118; + break; + case 166: + num = !male ? 100 : 119; + break; + case 167: + num = male ? 101 : 102; + break; + case 180: + num = 115; + break; + case 181: + num = 116; + break; + case 183: + num = male ? 136 : 123; + break; + case 191: + num = 131; + break; + case 213: + num = 187; + break; + case 215: + num = 189; + break; + case 219: + num = 196; + break; + case 221: + num = 199; + break; + case 223: + num = 204; + break; + case 231: + num = 214; + break; + case 232: + num = 215; + break; + case 233: + num = 216; + break; + } + if (num != -1) + somethingSpecial = true; + } + if (armorslot == 2) + { + switch (type) + { + case 57: + if (male) + { + num = 137; + break; + } + break; + case 83: + if (male) + { + num = 117; + break; + } + break; + case 84: + if (male) + { + num = 120; + break; + } + break; + case 132: + if (male) + { + num = 135; + break; + } + break; + case 146: + num = male ? 146 : 147; + break; + case 154: + num = male ? 155 : 154; + break; + case 158: + if (male) + { + num = 157; + break; + } + break; + case 180: + if (!male) + { + num = 179; + break; + } + break; + case 184: + if (!male) + { + num = 183; + break; + } + break; + case 191: + if (!male) + { + num = 192; + break; + } + break; + case 193: + if (!male) + { + num = 194; + break; + } + break; + case 197: + if (!male) + { + num = 198; + break; + } + break; + case 203: + if (!male) + { + num = 202; + break; + } + break; + case 208: + if (!male) + { + num = 207; + break; + } + break; + } + } + return num; + } + + public void Teleport(Vector2 newPos, int Style = 0, int extraInfo = 0) + { + try + { + this._funkytownAchievementCheckCooldown = 100; + if (Style != 10) + this.RemoveAllGrapplingHooks(); + this.StopVanityActions(); + int extraInfo1 = 0; + if (Style == 4) + extraInfo1 = this.lastPortalColorIndex; + if (Style == 9) + { + this.lastTeleportPylonStyleUsed = extraInfo; + extraInfo1 = this.lastTeleportPylonStyleUsed; + } + float dustCountMult = MathHelper.Clamp((float) (1.0 - (double) this.teleportTime * 0.990000009536743), 0.01f, 1f); + Vector2 position = this.position; + Main.TeleportEffect(this.getRect(), Style, extraInfo1, dustCountMult, otherPosition: newPos); + float num = Vector2.Distance(this.position, newPos); + PressurePlateHelper.UpdatePlayerPosition(this); + this.position = newPos; + if (Style == 8) + { + SoundEngine.PlaySound(SoundID.Item6, position); + SoundEngine.PlaySound(SoundID.Item6, newPos); + } + this.fallStart = (int) ((double) this.position.Y / 16.0); + if (this.whoAmI == Main.myPlayer) + { + bool flag = false; + if ((double) num < (double) new Vector2((float) Main.screenWidth, (float) Main.screenHeight).Length() / 2.0 + 100.0) + { + int time = 0; + if (Style == 1) + time = 10; + Main.SetCameraLerp(0.1f, time); + flag = true; + } + else + { + NPC.ResetNetOffsets(); + Main.BlackFadeIn = (int) byte.MaxValue; + Lighting.Clear(); + Main.screenLastPosition = Main.screenPosition; + Main.screenPosition.X = this.position.X + (float) (this.width / 2) - (float) (Main.screenWidth / 2); + Main.screenPosition.Y = this.position.Y + (float) (this.height / 2) - (float) (Main.screenHeight / 2); + Main.instantBGTransitionCounter = 10; + } + if ((double) dustCountMult > 0.100000001490116 || !flag || Style != 0) + { + if (Main.mapTime < 5) + Main.mapTime = 5; + Main.maxQ = true; + Main.renderNow = true; + } + } + if (Style == 4) + { + this.lastPortalColorIndex = extraInfo; + extraInfo1 = this.lastPortalColorIndex; + this.portalPhysicsFlag = true; + this.gravity = 0.0f; + } + PressurePlateHelper.UpdatePlayerPosition(this); + this.ResetAdvancedShadows(); + for (int index = 0; index < 3; ++index) + this.UpdateSocialShadow(); + this.oldPosition = this.position + this.BlehOldPositionFixer; + Main.TeleportEffect(this.getRect(), Style, extraInfo1, dustCountMult, TeleportationSide.Exit, position); + this.teleportTime = 1f; + this.teleportStyle = Style; + } + catch + { + } + } + + public void DoPotionOfReturnTeleportationAndSetTheComebackPoint() + { + this.RemoveAllGrapplingHooks(); + this.PotionOfReturnOriginalUsePosition = new Vector2?(this.Bottom); + bool immune = this.immune; + int immuneTime = this.immuneTime; + this.StopVanityActions(false); + this.Spawn(PlayerSpawnContext.RecallFromItem); + this.PotionOfReturnHomePosition = new Vector2?(this.Bottom); + NetMessage.SendData(13, number: this.whoAmI); + this.immune = immune; + this.immuneTime = immuneTime; + } + + public void DoPotionOfReturnReturnToOriginalUsePosition() + { + if (!this.PotionOfReturnOriginalUsePosition.HasValue) + return; + Vector2 newPos = this.PotionOfReturnOriginalUsePosition.Value + this.Size * new Vector2(-0.5f, -1f); + int num = 8; + this.Teleport(newPos, num); + NetMessage.SendData(65, number2: ((float) this.whoAmI), number3: newPos.X, number4: newPos.Y, number5: num); + this.PotionOfReturnOriginalUsePosition = new Vector2?(); + this.PotionOfReturnHomePosition = new Vector2?(); + } + + public void AutoFinchStaff() + { + int index = this.FindItem(4281); + if (index == -1) + return; + this.AddBuff(this.inventory[index].buffType, 3600); + } + + public void Spawn(PlayerSpawnContext context) + { + Main.LocalPlayer.creativeInterface = false; + this._funkytownAchievementCheckCooldown = 100; + bool flag1 = false; + if (context == PlayerSpawnContext.SpawningIntoWorld && this.dead) + { + Player.AdjustRespawnTimerForWorldJoining(this); + if (this.dead) + flag1 = true; + } + this.StopVanityActions(); + if (this.whoAmI == Main.myPlayer) + Main.NotifyOfEvent(GameNotificationType.SpawnOrDeath); + if (this.whoAmI == Main.myPlayer) + { + if (Main.mapTime < 5) + Main.mapTime = 5; + Main.instantBGTransitionCounter = 10; + this.FindSpawn(); + if (!Player.CheckSpawn(this.SpawnX, this.SpawnY)) + { + this.SpawnX = -1; + this.SpawnY = -1; + } + Main.maxQ = true; + NPC.ResetNetOffsets(); + } + if (Main.netMode == 1 && this.whoAmI == Main.myPlayer) + NetMessage.SendData(12, number: Main.myPlayer, number2: ((float) (byte) context)); + if (this.whoAmI == Main.myPlayer && context == PlayerSpawnContext.SpawningIntoWorld) + { + this.SetPlayerDataToOutOfClassFields(); + Main.ReleaseHostAndPlayProcess(); + } + this.headPosition = Vector2.Zero; + this.bodyPosition = Vector2.Zero; + this.legPosition = Vector2.Zero; + this.headRotation = 0.0f; + this.bodyRotation = 0.0f; + this.legRotation = 0.0f; + this.rabbitOrderFrame.Reset(); + this.lavaTime = this.lavaMax; + if (!flag1) + { + if (this.statLife <= 0) + { + int num = this.statLifeMax2 / 2; + this.statLife = 100; + if (num > this.statLife) + this.statLife = num; + this.breath = this.breathMax; + if (this.spawnMax) + { + this.statLife = this.statLifeMax2; + this.statMana = this.statManaMax2; + } + } + this.immune = true; + this.dead = false; + this.immuneTime = 0; + } + this.active = true; + Vector2 position = this.position; + if (this.SpawnX >= 0 && this.SpawnY >= 0) + { + int spawnX = this.SpawnX; + int spawnY = this.SpawnY; + this.Spawn_SetPosition(this.SpawnX, this.SpawnY); + } + else + this.Spawn_SetPositionAtWorldSpawn(); + this.wet = false; + this.wetCount = (byte) 0; + this.lavaWet = false; + this.fallStart = (int) ((double) this.position.Y / 16.0); + this.fallStart2 = this.fallStart; + this.velocity.X = 0.0f; + this.velocity.Y = 0.0f; + this.ResetAdvancedShadows(); + for (int index = 0; index < 3; ++index) + this.UpdateSocialShadow(); + this.oldPosition = this.position + this.BlehOldPositionFixer; + this.SetTalkNPC(-1); + if (this.whoAmI == Main.myPlayer) + Main.npcChatCornerItem = 0; + if (!flag1) + { + if (this.pvpDeath) + { + this.pvpDeath = false; + this.immuneTime = 300; + this.statLife = this.statLifeMax; + } + else + this.immuneTime = 60; + if (this.immuneTime > 0 && !this.hostile) + this.immuneNoBlink = true; + } + if (this.whoAmI == Main.myPlayer) + { + if (context == PlayerSpawnContext.SpawningIntoWorld) + Main.LocalGolfState.SetScoreTime(); + bool flag2 = (double) Vector2.Distance(position, this.position) < (double) new Vector2((float) Main.screenWidth, (float) Main.screenHeight).Length() / 2.0 + 100.0; + if (flag2) + { + Main.SetCameraLerp(0.1f, 0); + flag2 = true; + } + else + { + Main.BlackFadeIn = (int) byte.MaxValue; + Lighting.Clear(); + Main.screenLastPosition = Main.screenPosition; + Main.instantBGTransitionCounter = 10; + } + if (!flag2) + Main.renderNow = true; + if (Main.netMode == 1) + Netplay.AddCurrentServerToRecentList(); + if (!flag2) + { + Main.screenPosition.X = this.position.X + (float) (this.width / 2) - (float) (Main.screenWidth / 2); + Main.screenPosition.Y = this.position.Y + (float) (this.height / 2) - (float) (Main.screenHeight / 2); + } + } + if (flag1) + this.immuneAlpha = (int) byte.MaxValue; + this.UpdateGraveyard(true); + if (this.whoAmI != Main.myPlayer || context != PlayerSpawnContext.ReviveFromDeath || this.difficulty != (byte) 3) + return; + this.AutoFinchStaff(); + } + + private void Spawn_SetPositionAtWorldSpawn() + { + int spawnTileX = Main.spawnTileX; + int spawnTileY = Main.spawnTileY; + if (!this.Spawn_IsAreaAValidWorldSpawn(spawnTileX, spawnTileY)) + { + bool flag = false; + if (!flag) + { + for (int index = 0; index < 30; ++index) + { + if (this.Spawn_IsAreaAValidWorldSpawn(spawnTileX, spawnTileY - index)) + { + spawnTileY -= index; + flag = true; + break; + } + } + } + if (!flag) + { + for (int index = 0; index < 30; ++index) + { + if (this.Spawn_IsAreaAValidWorldSpawn(spawnTileX, spawnTileY - index)) + { + spawnTileY -= index; + flag = true; + break; + } + } + } + if (flag) + { + this.Spawn_SetPosition(spawnTileX, spawnTileY); + } + else + { + this.Spawn_SetPosition(Main.spawnTileX, Main.spawnTileY); + if (this.Spawn_IsAreaAValidWorldSpawn(Main.spawnTileX, Main.spawnTileY)) + return; + Player.Spawn_ForceClearArea(Main.spawnTileX, Main.spawnTileY); + } + } + else + { + int floorY = Player.Spawn_DescendFromDefaultSpace(spawnTileX, spawnTileY); + this.Spawn_SetPosition(spawnTileX, floorY); + if (this.Spawn_IsAreaAValidWorldSpawn(spawnTileX, floorY)) + return; + Player.Spawn_ForceClearArea(spawnTileX, floorY); + } + } + + private static int Spawn_DescendFromDefaultSpace(int x, int y) + { + for (int index1 = 0; index1 < 50; ++index1) + { + bool flag = false; + for (int index2 = -1; index2 <= 1; ++index2) + { + Tile tile = Main.tile[x + index2, y + index1]; + if (tile.nactive() && (Main.tileSolid[(int) tile.type] || !Main.tileSolidTop[(int) tile.type])) + { + flag = true; + break; + } + } + if (flag) + { + y += index1; + break; + } + } + return y; + } + + private static void Spawn_ForceClearArea(int floorX, int floorY) + { + for (int i = floorX - 1; i < floorX + 2; ++i) + { + for (int j = floorY - 3; j < floorY; ++j) + { + if (Main.tile[i, j] != null) + { + if (Main.tile[i, j].nactive() && Main.tileSolid[(int) Main.tile[i, j].type] && !Main.tileSolidTop[(int) Main.tile[i, j].type]) + WorldGen.KillTile(i, j); + if (Main.tile[i, j].liquid > (byte) 0) + { + Main.tile[i, j].lava(false); + Main.tile[i, j].liquid = (byte) 0; + WorldGen.SquareTileFrame(i, j); + } + } + } + } + } + + private bool Spawn_IsAreaAValidWorldSpawn(int floorX, int floorY) + { + for (int index1 = floorX - 1; index1 < floorX + 2; ++index1) + { + for (int index2 = floorY - 3; index2 < floorY; ++index2) + { + if (Main.tile[index1, index2] != null && (Main.tile[index1, index2].nactive() && Main.tileSolid[(int) Main.tile[index1, index2].type] && !Main.tileSolidTop[(int) Main.tile[index1, index2].type] || Main.tile[index1, index2].liquid > (byte) 0)) + return false; + } + } + return true; + } + + private void Spawn_SetPosition(int floorX, int floorY) + { + this.position.X = (float) (floorX * 16 + 8 - this.width / 2); + this.position.Y = (float) (floorY * 16 - this.height); + } + + public void SetImmuneTimeForAllTypes(int time) + { + this.immune = true; + this.immuneTime = time; + for (int index = 0; index < this.hurtCooldowns.Length; ++index) + this.hurtCooldowns[index] = time; + } + + public void ShadowDodge() + { + this.SetImmuneTimeForAllTypes(this.longInvince ? 120 : 80); + if (this.whoAmI != Main.myPlayer) + return; + for (int b = 0; b < 22; ++b) + { + if (this.buffTime[b] > 0 && this.buffType[b] == 59) + this.DelBuff(b); + } + NetMessage.SendData(62, number: this.whoAmI, number2: 2f); + } + + public void BrainOfConfusionDodge() + { + this.SetImmuneTimeForAllTypes(this.longInvince ? 120 : 80); + this.brainOfConfusionDodgeAnimationCounter = 300; + if (this.whoAmI != Main.myPlayer) + return; + this.AddBuff(321, 300, false); + NetMessage.SendData(62, number: this.whoAmI, number2: 4f); + } + + public void NinjaDodge() + { + this.SetImmuneTimeForAllTypes(this.longInvince ? 120 : 80); + for (int index1 = 0; index1 < 100; ++index1) + { + int index2 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 2f); + Main.dust[index2].position.X += (float) Main.rand.Next(-20, 21); + Main.dust[index2].position.Y += (float) Main.rand.Next(-20, 21); + Main.dust[index2].velocity *= 0.4f; + Main.dust[index2].scale *= (float) (1.0 + (double) Main.rand.Next(40) * 0.00999999977648258); + Main.dust[index2].shader = GameShaders.Armor.GetSecondaryShader(this.cWaist, this); + if (Main.rand.Next(2) == 0) + { + Main.dust[index2].scale *= (float) (1.0 + (double) Main.rand.Next(40) * 0.00999999977648258); + Main.dust[index2].noGravity = true; + } + } + int index3 = Gore.NewGore(new Vector2((float) ((double) this.position.X + (double) (this.width / 2) - 24.0), (float) ((double) this.position.Y + (double) (this.height / 2) - 24.0)), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index3].scale = 1.5f; + Main.gore[index3].velocity.X = (float) Main.rand.Next(-50, 51) * 0.01f; + Main.gore[index3].velocity.Y = (float) Main.rand.Next(-50, 51) * 0.01f; + Main.gore[index3].velocity *= 0.4f; + int index4 = Gore.NewGore(new Vector2((float) ((double) this.position.X + (double) (this.width / 2) - 24.0), (float) ((double) this.position.Y + (double) (this.height / 2) - 24.0)), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index4].scale = 1.5f; + Main.gore[index4].velocity.X = (float) (1.5 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.gore[index4].velocity.Y = (float) (1.5 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.gore[index4].velocity *= 0.4f; + int index5 = Gore.NewGore(new Vector2((float) ((double) this.position.X + (double) (this.width / 2) - 24.0), (float) ((double) this.position.Y + (double) (this.height / 2) - 24.0)), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index5].scale = 1.5f; + Main.gore[index5].velocity.X = (float) (-1.5 - (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.gore[index5].velocity.Y = (float) (1.5 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.gore[index5].velocity *= 0.4f; + int index6 = Gore.NewGore(new Vector2((float) ((double) this.position.X + (double) (this.width / 2) - 24.0), (float) ((double) this.position.Y + (double) (this.height / 2) - 24.0)), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index6].scale = 1.5f; + Main.gore[index6].velocity.X = (float) (1.5 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.gore[index6].velocity.Y = (float) (-1.5 - (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.gore[index6].velocity *= 0.4f; + int index7 = Gore.NewGore(new Vector2((float) ((double) this.position.X + (double) (this.width / 2) - 24.0), (float) ((double) this.position.Y + (double) (this.height / 2) - 24.0)), new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index7].scale = 1.5f; + Main.gore[index7].velocity.X = (float) (-1.5 - (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.gore[index7].velocity.Y = (float) (-1.5 - (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.gore[index7].velocity *= 0.4f; + if (this.whoAmI != Main.myPlayer) + return; + NetMessage.SendData(62, number: this.whoAmI, number2: 1f); + } + + public void ApplyArmorSoundAndDustChanges() + { + int num1 = this.armor[0].headSlot; + int num2 = this.armor[1].bodySlot; + int num3 = this.armor[2].legSlot; + if (this.armor[10].headSlot >= 0) + num1 = this.armor[10].headSlot; + if (this.armor[11].bodySlot >= 0) + num2 = this.armor[11].bodySlot; + if (this.armor[12].legSlot >= 0) + num3 = this.armor[12].legSlot; + if ((this.wereWolf || this.forceWerewolf) && !this.hideWolf) + { + num3 = 20; + num2 = 21; + num1 = 38; + } + if ((num1 == 75 || num1 == 7) && num2 == 7 && num3 == 7) + this.boneArmor = true; + if (num2 != 27 || num1 != 46 || num3 != 26) + return; + this.frostArmor = true; + } + + public double Hurt( + PlayerDeathReason damageSource, + int Damage, + int hitDirection, + bool pvp = false, + bool quiet = false, + bool Crit = false, + int cooldownCounter = -1) + { + if (this.creativeGodMode) + return 0.0; + bool flag1 = !this.immune; + bool flag2 = false; + int hitContext = cooldownCounter; + if (cooldownCounter == 0) + flag1 = this.hurtCooldowns[cooldownCounter] <= 0; + if (cooldownCounter == 1) + flag1 = this.hurtCooldowns[cooldownCounter] <= 0; + if (cooldownCounter == 2) + { + flag2 = true; + cooldownCounter = -1; + } + if (cooldownCounter == 3) + flag1 = this.hurtCooldowns[cooldownCounter] <= 0; + if (!flag1) + return 0.0; + if (this.whoAmI == Main.myPlayer && this.blackBelt && Main.rand.Next(10) == 0) + { + this.NinjaDodge(); + return 0.0; + } + if (this.whoAmI == Main.myPlayer && this.brainOfConfusion && Main.rand.Next(6) == 0 && this.FindBuffIndex(321) == -1) + { + this.BrainOfConfusionDodge(); + return 0.0; + } + if (this.whoAmI == Main.myPlayer && this.shadowDodge) + { + this.ShadowDodge(); + return 0.0; + } + if (this.whoAmI == Main.myPlayer && this.panic) + this.AddBuff(63, 300); + if (this.whoAmI == Main.myPlayer && this.setSquireT2) + this.AddBuff(205, 300); + this.stealth = 1f; + if (Main.netMode == 1) + NetMessage.SendData(84, number: this.whoAmI); + int Damage1 = Damage; + double dmg = Main.CalculateDamagePlayersTake(Damage1, this.statDefense); + if (Crit) + Damage1 *= 2; + if (dmg >= 1.0) + { + if (this.whoAmI == Main.myPlayer) + { + Main.NotifyOfEvent(GameNotificationType.Damage); + if (this.hasFootball) + { + for (int index = 0; index < 59; ++index) + { + if ((this.inventory[index].stack <= 0 ? 0 : (this.inventory[index].type == 4743 ? 1 : 0)) != 0) + { + Projectile.NewProjectile(this.Center, new Vector2((float) (-hitDirection * 4), -6f), 861, 0, 0.0f, this.whoAmI, ai1: 1f); + this.inventory[index].SetDefaults(); + if (index == 58) + Main.mouseItem = new Item(); + } + } + } + } + if (this.inventory[this.selectedItem].type == 4790 || this.inventory[this.selectedItem].type == 4788 || this.inventory[this.selectedItem].type == 4789) + { + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == this.whoAmI && (Main.projectile[index].type == 879 || Main.projectile[index].type == 877 || Main.projectile[index].type == 878)) + Main.projectile[index].active = false; + } + } + if (this.invis) + { + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] == 10) + this.DelBuff(b); + } + } + dmg = (double) (int) ((1.0 - (double) this.endurance) * dmg); + if (dmg < 1.0) + dmg = 1.0; + if (this.ConsumeSolarFlare()) + { + dmg = (double) (int) ((1.0 - 0.200000002980232) * dmg); + if (dmg < 1.0) + dmg = 1.0; + if (this.whoAmI == Main.myPlayer) + { + int index = Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, 0.0f, 608, 150, 15f, Main.myPlayer); + Main.projectile[index].netUpdate = true; + Main.projectile[index].Kill(); + } + } + if (this.beetleDefense && this.beetleOrbs > 0) + { + dmg = (double) (int) ((1.0 - (double) (0.15f * (float) this.beetleOrbs)) * dmg); + --this.beetleOrbs; + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] >= 95 && this.buffType[b] <= 97) + this.DelBuff(b); + } + if (this.beetleOrbs > 0) + this.AddBuff(95 + this.beetleOrbs - 1, 5, false); + this.beetleCounter = 0.0f; + if (dmg < 1.0) + dmg = 1.0; + } + if (this.magicCuffs) + { + int manaAmount = Damage1; + this.statMana += manaAmount; + if (this.statMana > this.statManaMax2) + this.statMana = this.statManaMax2; + this.ManaEffect(manaAmount); + } + if (this.defendedByPaladin) + { + if (this.whoAmI != Main.myPlayer) + { + if (Main.player[Main.myPlayer].hasPaladinShield) + { + Player player = Main.player[Main.myPlayer]; + if (player.team == this.team && this.team != 0) + { + float num1 = player.Distance(this.Center); + bool flag3 = (double) num1 < 800.0; + if (flag3) + { + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (index != Main.myPlayer && Main.player[index].active && !Main.player[index].dead && !Main.player[index].immune && Main.player[index].hasPaladinShield && Main.player[index].team == this.team && (double) Main.player[index].statLife > (double) Main.player[index].statLifeMax2 * 0.25) + { + float num2 = Main.player[index].Distance(this.Center); + if ((double) num1 > (double) num2 || (double) num1 == (double) num2 && index < Main.myPlayer) + { + flag3 = false; + break; + } + } + } + } + if (flag3) + { + int Damage2 = (int) (dmg * 0.25); + dmg = (double) (int) (dmg * 0.75); + player.Hurt(PlayerDeathReason.LegacyEmpty(), Damage2, 0); + } + } + } + } + else + { + bool flag4 = false; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (index != Main.myPlayer && Main.player[index].active && !Main.player[index].dead && !Main.player[index].immune && Main.player[index].hasPaladinShield && Main.player[index].team == this.team && (double) Main.player[index].statLife > (double) Main.player[index].statLifeMax2 * 0.25) + { + flag4 = true; + break; + } + } + if (flag4) + dmg = (double) (int) (dmg * 0.75); + } + } + if (this.brainOfConfusion && Main.myPlayer == this.whoAmI) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && !Main.npc[index].friendly) + { + int num3 = 300 + (int) dmg * 2; + if (Main.rand.Next(500) < num3) + { + double num4 = (double) (Main.npc[index].Center - this.Center).Length(); + float num5 = (float) Main.rand.Next(200 + (int) dmg / 2, 301 + (int) dmg * 2); + if ((double) num5 > 500.0) + num5 = (float) (500.0 + ((double) num5 - 500.0) * 0.75); + if ((double) num5 > 700.0) + num5 = (float) (700.0 + ((double) num5 - 700.0) * 0.5); + if ((double) num5 > 900.0) + num5 = (float) (900.0 + ((double) num5 - 900.0) * 0.25); + double num6 = (double) num5; + if (num4 < num6) + { + float num7 = (float) Main.rand.Next(90 + (int) dmg / 3, 300 + (int) dmg / 2); + Main.npc[index].AddBuff(31, (int) num7); + } + } + } + } + Projectile.NewProjectile(this.Center.X + (float) Main.rand.Next(-40, 40), this.Center.Y - (float) Main.rand.Next(20, 60), this.velocity.X * 0.3f, this.velocity.Y * 0.3f, 565, 0, 0.0f, this.whoAmI); + } + if (Main.netMode == 1 && this.whoAmI == Main.myPlayer && !quiet) + { + if (!this.noKnockback && hitDirection != 0 && (!this.mount.Active || !this.mount.Cart)) + NetMessage.SendData(13, number: this.whoAmI); + NetMessage.SendData(16, number: this.whoAmI); + NetMessage.SendPlayerHurt(this.whoAmI, damageSource, Damage, hitDirection, Crit, pvp, hitContext); + } + CombatText.NewText(new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height), Crit ? CombatText.DamagedFriendlyCrit : CombatText.DamagedFriendly, (int) dmg, Crit); + this.statLife -= (int) dmg; + switch (cooldownCounter) + { + case -1: + this.immune = true; + this.immuneTime = !pvp ? (dmg != 1.0 ? (this.longInvince ? 80 : 40) : (this.longInvince ? 40 : 20)) : 8; + break; + case 0: + this.hurtCooldowns[cooldownCounter] = dmg != 1.0 ? (this.longInvince ? 80 : 40) : (this.longInvince ? 40 : 20); + break; + case 1: + case 3: + this.hurtCooldowns[cooldownCounter] = dmg != 1.0 ? (this.longInvince ? 80 : 40) : (this.longInvince ? 40 : 20); + break; + } + this.lifeRegenTime = 0; + int? sourceProjectileType = damageSource.SourceProjectileType; + if (sourceProjectileType.HasValue && (!ProjectileID.Sets.DismountsPlayersOnHit.IndexInRange(sourceProjectileType.Value) ? 0 : (ProjectileID.Sets.DismountsPlayersOnHit[sourceProjectileType.Value] ? 1 : 0)) != 0) + this.mount.Dismount(this); + if (this.whoAmI == Main.myPlayer) + { + if (this.starCloak) + { + for (int index1 = 0; index1 < 3; ++index1) + { + float num8 = this.position.X + (float) Main.rand.Next(-400, 400); + float num9 = this.position.Y - (float) Main.rand.Next(500, 800); + Vector2 vector2 = new Vector2(num8, num9); + float num10 = this.position.X + (float) (this.width / 2) - vector2.X; + float num11 = this.position.Y + (float) (this.height / 2) - vector2.Y; + float num12 = num10 + (float) Main.rand.Next(-100, 101); + float num13 = 23f / (float) Math.Sqrt((double) num12 * (double) num12 + (double) num11 * (double) num11); + float SpeedX = num12 * num13; + float SpeedY = num11 * num13; + int Type = 726; + if (this.starCloakIsStarVeil) + Type = 725; + if (this.starCloakIsBeeCloak) + Type = 724; + if (this.starCloakIsManaCloak) + Type = 723; + int index2 = Projectile.NewProjectile(num8, num9, SpeedX, SpeedY, Type, 30, 5f, this.whoAmI); + Main.projectile[index2].ai[1] = this.position.Y; + } + } + if (this.releaseBeesWhenHurt) + { + int num = 1; + if (Main.rand.Next(3) == 0) + ++num; + if (Main.rand.Next(3) == 0) + ++num; + if (this.strongBees && Main.rand.Next(3) == 0) + ++num; + for (int index = 0; index < num; ++index) + Projectile.NewProjectile(this.position.X, this.position.Y, (float) Main.rand.Next(-35, 36) * 0.02f, (float) Main.rand.Next(-35, 36) * 0.02f, this.beeType(), this.beeDamage(7), this.beeKB(0.0f), Main.myPlayer); + } + } + if (flag2 && hitDirection != 0) + { + if (!this.mount.Active || !this.mount.Cart) + { + float num14 = 10.5f; + float num15 = -7.5f; + if (this.noKnockback) + { + num14 = 2.5f; + num15 = -1.5f; + } + this.StopVanityActions(); + this.velocity.X = num14 * (float) hitDirection; + this.velocity.Y = num15; + this.fallStart = (int) ((double) this.position.Y / 16.0); + } + } + else if (!this.noKnockback && hitDirection != 0 && (!this.mount.Active || !this.mount.Cart)) + { + this.StopVanityActions(); + this.velocity.X = 4.5f * (float) hitDirection; + this.velocity.Y = -3.5f; + this.fallStart = (int) ((double) this.position.Y / 16.0); + } + if (this.stoned) + SoundEngine.PlaySound(0, (int) this.position.X, (int) this.position.Y); + else if ((this.wereWolf || this.forceWerewolf) && !this.hideWolf) + SoundEngine.PlaySound(3, (int) this.position.X, (int) this.position.Y, 6); + else if (this.frostArmor) + SoundEngine.PlaySound(SoundID.Item27, this.position); + else if (this.boneArmor) + SoundEngine.PlaySound(3, (int) this.position.X, (int) this.position.Y, 2); + else if (!this.Male) + SoundEngine.PlaySound(20, (int) this.position.X, (int) this.position.Y); + else + SoundEngine.PlaySound(1, (int) this.position.X, (int) this.position.Y); + this.eyeHelper.BlinkBecausePlayerGotHurt(); + if (this.statLife > 0) + { + double num16 = dmg / (double) this.statLifeMax2 * 100.0; + float num17 = (float) (2 * hitDirection); + float num18 = 0.0f; + if (flag2) + { + num16 *= 12.0; + num18 = 6f; + } + for (int index3 = 0; (double) index3 < num16; ++index3) + { + if (this.stoned) + Dust.NewDust(this.position, this.width, this.height, 1, num17 + (float) hitDirection * num18 * Main.rand.NextFloat(), -2f); + else if (this.frostArmor) + { + int index4 = Dust.NewDust(this.position, this.width, this.height, 135, num17 + (float) hitDirection * num18 * Main.rand.NextFloat(), -2f); + Main.dust[index4].shader = GameShaders.Armor.GetSecondaryShader(this.ArmorSetDye(), this); + } + else if (this.boneArmor) + { + int index5 = Dust.NewDust(this.position, this.width, this.height, 26, num17 + (float) hitDirection * num18 * Main.rand.NextFloat(), -2f); + Main.dust[index5].shader = GameShaders.Armor.GetSecondaryShader(this.ArmorSetDye(), this); + } + else + Dust.NewDust(this.position, this.width, this.height, 5, num17 + (float) hitDirection * num18 * Main.rand.NextFloat(), -2f); + } + } + else + { + this.statLife = 0; + if (this.whoAmI == Main.myPlayer) + this.KillMe(damageSource, dmg, hitDirection, pvp); + } + } + if (pvp) + dmg = Main.CalculateDamagePlayersTakeInPVP(Damage1, this.statDefense); + return dmg; + } + + public void KillMeForGood() + { + bool isCloudSave = Main.ActivePlayerFileData.IsCloudSave; + if (FileUtilities.Exists(Main.playerPathName, isCloudSave)) + FileUtilities.Delete(Main.playerPathName, isCloudSave); + if (FileUtilities.Exists(Main.playerPathName + ".bak", isCloudSave)) + FileUtilities.Delete(Main.playerPathName + ".bak", isCloudSave); + Main.ActivePlayerFileData = new PlayerFileData(); + } + + public void KillMe(PlayerDeathReason damageSource, double dmg, int hitDirection, bool pvp = false) + { + if (this.creativeGodMode || this.dead) + return; + this.StopVanityActions(); + if (pvp) + this.pvpDeath = true; + if (this.trapDebuffSource) + AchievementsHelper.HandleSpecialEvent(this, 4); + if (this.whoAmI == Main.myPlayer) + Main.NotifyOfEvent(GameNotificationType.SpawnOrDeath); + this.lastDeathPostion = this.Center; + this.lastDeathTime = DateTime.Now; + this.showLastDeath = true; + int coinsOwned = (int) Utils.CoinsCount(out bool _, this.inventory); + if (Main.myPlayer == this.whoAmI) + { + this.lostCoins = coinsOwned; + this.lostCoinString = Main.ValueToCoins(this.lostCoins); + } + if (Main.myPlayer == this.whoAmI) + Main.mapFullscreen = false; + if (Main.myPlayer == this.whoAmI) + { + this.trashItem.SetDefaults(); + if (this.difficulty == (byte) 0 || this.difficulty == (byte) 3) + { + for (int index = 0; index < 59; ++index) + { + if ((this.inventory[index].stack <= 0 ? 0 : (this.inventory[index].type < 1522 || this.inventory[index].type > 1527 ? (this.inventory[index].type == 3643 ? 1 : 0) : 1)) != 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, this.inventory[index].type); + Main.item[number].netDefaults(this.inventory[index].netID); + Main.item[number].Prefix((int) this.inventory[index].prefix); + Main.item[number].stack = this.inventory[index].stack; + Main.item[number].velocity.Y = (float) Main.rand.Next(-20, 1) * 0.2f; + Main.item[number].velocity.X = (float) Main.rand.Next(-20, 21) * 0.2f; + Main.item[number].noGrabDelay = 100; + Main.item[number].favorited = false; + Main.item[number].newAndShiny = false; + if (Main.netMode == 1) + NetMessage.SendData(21, number: number); + this.inventory[index].SetDefaults(); + } + } + } + else if (this.difficulty == (byte) 1) + this.DropItems(); + else if (this.difficulty == (byte) 2) + { + this.DropItems(); + this.KillMeForGood(); + } + } + SoundEngine.PlaySound(5, (int) this.position.X, (int) this.position.Y); + this.headVelocity.Y = (float) Main.rand.Next(-40, -10) * 0.1f; + this.bodyVelocity.Y = (float) Main.rand.Next(-40, -10) * 0.1f; + this.legVelocity.Y = (float) Main.rand.Next(-40, -10) * 0.1f; + this.headVelocity.X = (float) Main.rand.Next(-20, 21) * 0.1f + (float) (2 * hitDirection); + this.bodyVelocity.X = (float) Main.rand.Next(-20, 21) * 0.1f + (float) (2 * hitDirection); + this.legVelocity.X = (float) Main.rand.Next(-20, 21) * 0.1f + (float) (2 * hitDirection); + if (this.stoned) + { + this.headPosition = Vector2.Zero; + this.bodyPosition = Vector2.Zero; + this.legPosition = Vector2.Zero; + } + for (int index1 = 0; index1 < 100; ++index1) + { + if (this.stoned) + Dust.NewDust(this.position, this.width, this.height, 1, (float) (2 * hitDirection), -2f); + else if (this.frostArmor) + { + int index2 = Dust.NewDust(this.position, this.width, this.height, 135, (float) (2 * hitDirection), -2f); + Main.dust[index2].shader = GameShaders.Armor.GetSecondaryShader(this.ArmorSetDye(), this); + } + else if (this.boneArmor) + { + int index3 = Dust.NewDust(this.position, this.width, this.height, 26, (float) (2 * hitDirection), -2f); + Main.dust[index3].shader = GameShaders.Armor.GetSecondaryShader(this.ArmorSetDye(), this); + } + else + Dust.NewDust(this.position, this.width, this.height, 5, (float) (2 * hitDirection), -2f); + } + this.mount.Dismount(this); + this.dead = true; + this.respawnTimer = 600; + bool flag = false; + if (Main.netMode != 0 && !pvp) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && (Main.npc[index].boss || Main.npc[index].type == 13 || Main.npc[index].type == 14 || Main.npc[index].type == 15) && (double) Math.Abs(this.Center.X - Main.npc[index].Center.X) + (double) Math.Abs(this.Center.Y - Main.npc[index].Center.Y) < 4000.0) + { + flag = true; + break; + } + } + } + if (flag) + this.respawnTimer += 600; + if (Main.expertMode) + this.respawnTimer = (int) ((double) this.respawnTimer * 1.5); + this.immuneAlpha = 0; + if (!ChildSafety.Disabled) + this.immuneAlpha = (int) byte.MaxValue; + this.palladiumRegen = false; + this.iceBarrier = false; + this.crystalLeaf = false; + NetworkText deathText = damageSource.GetDeathText(this.name); + switch (Main.netMode) + { + case 0: + Main.NewText(deathText.ToString(), (byte) 225, (byte) 25, (byte) 25); + break; + case 2: + ChatHelper.BroadcastChatMessage(deathText, new Color(225, 25, 25)); + break; + } + if (Main.netMode == 1 && this.whoAmI == Main.myPlayer) + NetMessage.SendPlayerDeath(this.whoAmI, damageSource, (int) dmg, hitDirection, pvp); + if (this.whoAmI == Main.myPlayer && (this.difficulty == (byte) 0 || this.difficulty == (byte) 3)) + { + if (!pvp) + { + this.DropCoins(); + } + else + { + this.lostCoins = 0; + this.lostCoinString = Main.ValueToCoins(this.lostCoins); + } + } + this.DropTombstone(coinsOwned, deathText, hitDirection); + if (this.whoAmI != Main.myPlayer) + return; + try + { + WorldGen.saveToonWhilePlaying(); + } + catch + { + } + } + + public void DropTombstone(int coinsOwned, NetworkText deathText, int hitDirection) + { + if (Main.netMode == 1) + return; + float num1 = (float) Main.rand.Next(-35, 36) * 0.1f; + while ((double) num1 < 2.0 && (double) num1 > -2.0) + num1 += (float) Main.rand.Next(-30, 31) * 0.1f; + int num2 = Main.rand.Next(6); + int Type = coinsOwned <= 100000 ? (num2 != 0 ? 200 + num2 : 43) : Main.rand.Next(5) + 527; + int index = Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), (float) Main.rand.Next(10, 30) * 0.1f * (float) hitDirection + num1, (float) Main.rand.Next(-40, -20) * 0.1f, Type, 0, 0.0f, Main.myPlayer); + DateTime now = DateTime.Now; + string str1 = now.ToString("D"); + if (GameCulture.FromCultureName(GameCulture.CultureName.English).IsActive) + str1 = now.ToString("MMMM d, yyy"); + string str2 = deathText.ToString() + "\n" + str1; + Main.projectile[index].miscText = str2; + } + + public bool CanPullItem(Item item, Player.ItemSpaceStatus status) => status.CanTakeItem && this.CanAcceptItemIntoInventory(item); + + public Player.ItemSpaceStatus ItemSpace(Item newItem) + { + if (ItemID.Sets.IsAPickup[newItem.type]) + return new Player.ItemSpaceStatus(true); + if (newItem.uniqueStack && this.HasItem(newItem.type)) + return new Player.ItemSpaceStatus(false); + int num = 50; + if (newItem.IsACoin) + num = 54; + for (int index = 0; index < num; ++index) + { + if (this.CanItemSlotAccept(this.inventory[index], newItem)) + return new Player.ItemSpaceStatus(true); + } + if (newItem.ammo > 0 && !newItem.notAmmo) + { + for (int index = 54; index < 58; ++index) + { + if (this.CanGoIntoAmmoOnPickup(this.inventory[index], newItem)) + return new Player.ItemSpaceStatus(true); + } + } + for (int index = 54; index < 58; ++index) + { + if (this.inventory[index].type > 0 && this.inventory[index].stack < this.inventory[index].maxStack && newItem.IsTheSameAs(this.inventory[index])) + return new Player.ItemSpaceStatus(true); + } + return this.ItemSpaceForCofveve(newItem) ? new Player.ItemSpaceStatus(true, true) : new Player.ItemSpaceStatus(false); + } + + public bool ItemSpaceForCofveve(Item newItem) + { + if (!this.IsVoidVaultEnabled || !this.CanVoidVaultAccept(newItem)) + return false; + foreach (Item theSlot in this.bank4.item) + { + if (this.CanItemSlotAccept(theSlot, newItem)) + return true; + } + return false; + } + + public bool CanItemSlotAccept(Item theSlot, Item theItemToAccept) => theSlot.type == 0 || theSlot.stack < theSlot.maxStack && theItemToAccept.IsTheSameAs(theSlot); + + public bool CanGoIntoAmmoOnPickup(Item theSlot, Item theItemToAccept) => (theItemToAccept.CanFillEmptyAmmoSlot() || theSlot.type != 0) && this.CanItemSlotAccept(theSlot, theItemToAccept); + + public void DoCoins(int i) + { + if (this.inventory[i].stack != 100 || this.inventory[i].type != 71 && this.inventory[i].type != 72 && this.inventory[i].type != 73) + return; + this.inventory[i].SetDefaults(this.inventory[i].type + 1); + for (int i1 = 0; i1 < 54; ++i1) + { + if (this.inventory[i1].IsTheSameAs(this.inventory[i]) && i1 != i && this.inventory[i1].type == this.inventory[i].type && this.inventory[i1].stack < this.inventory[i1].maxStack) + { + ++this.inventory[i1].stack; + this.inventory[i].SetDefaults(); + this.inventory[i].active = false; + this.inventory[i].TurnToAir(); + this.DoCoins(i1); + } + } + } + + public Item FillAmmo(int plr, Item newItem, GetItemSettings settings) + { + Item obj = newItem; + for (int i = 54; i < 58; ++i) + { + if (this.inventory[i].type > 0 && this.inventory[i].stack < this.inventory[i].maxStack && obj.IsTheSameAs(this.inventory[i])) + { + SoundEngine.PlaySound(7, (int) this.position.X, (int) this.position.Y); + if (obj.stack + this.inventory[i].stack <= this.inventory[i].maxStack) + { + this.inventory[i].stack += obj.stack; + if (!settings.NoText) + PopupText.NewText(PopupTextContext.RegularItemPickup, newItem, obj.stack); + this.DoCoins(i); + if (plr == Main.myPlayer) + Recipe.FindRecipes(); + settings.HandlePostAction(this.inventory[i]); + return new Item(); + } + obj.stack -= this.inventory[i].maxStack - this.inventory[i].stack; + if (!settings.NoText) + PopupText.NewText(PopupTextContext.RegularItemPickup, newItem, this.inventory[i].maxStack - this.inventory[i].stack); + this.inventory[i].stack = this.inventory[i].maxStack; + this.DoCoins(i); + if (plr == Main.myPlayer) + Recipe.FindRecipes(); + settings.HandlePostAction(this.inventory[i]); + } + } + if (obj.CanFillEmptyAmmoSlot()) + { + for (int i = 54; i < 58; ++i) + { + if (this.inventory[i].type == 0) + { + this.inventory[i] = obj; + if (!settings.NoText) + PopupText.NewText(PopupTextContext.RegularItemPickup, newItem, newItem.stack); + this.DoCoins(i); + SoundEngine.PlaySound(7, (int) this.position.X, (int) this.position.Y); + if (plr == Main.myPlayer) + Recipe.FindRecipes(); + settings.HandlePostAction(this.inventory[i]); + return new Item(); + } + } + } + return obj; + } + + public Item GetItem(int plr, Item newItem, GetItemSettings settings) + { + bool isAcoin = newItem.IsACoin; + Item obj = newItem; + int num1 = 50; + if (newItem.noGrabDelay > 0) + return obj; + int num2 = 0; + if (newItem.uniqueStack && this.HasItem(newItem.type)) + return obj; + if (isAcoin) + { + num2 = -4; + num1 = 54; + } + if (obj.FitsAmmoSlot()) + { + obj = this.FillAmmo(plr, obj, settings); + if (obj.type == 0 || obj.stack == 0) + return new Item(); + } + for (int index = num2; index < 50; ++index) + { + int i = index; + if (i < 0) + i = 54 + index; + if (this.GetItem_FillIntoOccupiedSlot(plr, newItem, settings, obj, i)) + return new Item(); + } + if (!isAcoin && newItem.useStyle != 0) + { + for (int i = 0; i < 10; ++i) + { + if (this.GetItem_FillEmptyInventorySlot(plr, newItem, settings, obj, i)) + return new Item(); + } + } + if (newItem.favorited) + { + for (int i = 0; i < num1; ++i) + { + if (this.GetItem_FillEmptyInventorySlot(plr, newItem, settings, obj, i)) + return new Item(); + } + } + else + { + for (int i = num1 - 1; i >= 0; --i) + { + if (this.GetItem_FillEmptyInventorySlot(plr, newItem, settings, obj, i)) + return new Item(); + } + } + return settings.CanGoIntoVoidVault && this.IsVoidVaultEnabled && this.CanVoidVaultAccept(newItem) && this.GetItem_VoidVault(plr, this.bank4.item, newItem, settings, obj) ? new Item() : obj; + } + + private bool GetItem_VoidVault( + int plr, + Item[] inventory, + Item newItem, + GetItemSettings settings, + Item returnItem) + { + if (!this.CanVoidVaultAccept(newItem)) + return false; + for (int i = 0; i < inventory.Length; ++i) + { + if (this.GetItem_FillIntoOccupiedSlot_VoidBag(plr, inventory, newItem, settings, returnItem, i)) + return true; + } + for (int i = 0; i < inventory.Length; ++i) + { + if (this.GetItem_FillEmptyInventorySlot_VoidBag(plr, inventory, newItem, settings, returnItem, i)) + return true; + } + return false; + } + + private bool CanVoidVaultAccept(Item item) => !item.questItem && item.type != 3822; + + private bool GetItem_FillIntoOccupiedSlot_VoidBag( + int plr, + Item[] inv, + Item newItem, + GetItemSettings settings, + Item returnItem, + int i) + { + if (inv[i].type > 0 && inv[i].stack < inv[i].maxStack && returnItem.IsTheSameAs(inv[i])) + { + if (newItem.IsACoin) + SoundEngine.PlaySound(38, (int) this.position.X, (int) this.position.Y); + else + SoundEngine.PlaySound(7, (int) this.position.X, (int) this.position.Y); + if (returnItem.stack + inv[i].stack <= inv[i].maxStack) + { + inv[i].stack += returnItem.stack; + if (!settings.NoText) + PopupText.NewText(PopupTextContext.ItemPickupToVoidContainer, newItem, returnItem.stack, longText: settings.LongText); + AchievementsHelper.NotifyItemPickup(this, returnItem); + settings.HandlePostAction(inv[i]); + return true; + } + AchievementsHelper.NotifyItemPickup(this, returnItem, inv[i].maxStack - inv[i].stack); + returnItem.stack -= inv[i].maxStack - inv[i].stack; + if (!settings.NoText) + PopupText.NewText(PopupTextContext.ItemPickupToVoidContainer, newItem, inv[i].maxStack - inv[i].stack, longText: settings.LongText); + inv[i].stack = inv[i].maxStack; + settings.HandlePostAction(inv[i]); + } + return false; + } + + private bool GetItem_FillIntoOccupiedSlot( + int plr, + Item newItem, + GetItemSettings settings, + Item returnItem, + int i) + { + if (this.inventory[i].type > 0 && this.inventory[i].stack < this.inventory[i].maxStack && returnItem.IsTheSameAs(this.inventory[i])) + { + if (newItem.IsACoin) + SoundEngine.PlaySound(38, (int) this.position.X, (int) this.position.Y); + else + SoundEngine.PlaySound(7, (int) this.position.X, (int) this.position.Y); + if (returnItem.stack + this.inventory[i].stack <= this.inventory[i].maxStack) + { + this.inventory[i].stack += returnItem.stack; + if (!settings.NoText) + PopupText.NewText(PopupTextContext.RegularItemPickup, newItem, returnItem.stack, longText: settings.LongText); + this.DoCoins(i); + if (plr == Main.myPlayer) + Recipe.FindRecipes(); + AchievementsHelper.NotifyItemPickup(this, returnItem); + settings.HandlePostAction(this.inventory[i]); + return true; + } + AchievementsHelper.NotifyItemPickup(this, returnItem, this.inventory[i].maxStack - this.inventory[i].stack); + returnItem.stack -= this.inventory[i].maxStack - this.inventory[i].stack; + if (!settings.NoText) + PopupText.NewText(PopupTextContext.RegularItemPickup, newItem, this.inventory[i].maxStack - this.inventory[i].stack, longText: settings.LongText); + this.inventory[i].stack = this.inventory[i].maxStack; + this.DoCoins(i); + if (plr == Main.myPlayer) + Recipe.FindRecipes(); + settings.HandlePostAction(this.inventory[i]); + } + return false; + } + + private bool GetItem_FillEmptyInventorySlot_VoidBag( + int plr, + Item[] inv, + Item newItem, + GetItemSettings settings, + Item returnItem, + int i) + { + if (inv[i].type != 0) + return false; + if (newItem.IsACoin) + SoundEngine.PlaySound(38, (int) this.position.X, (int) this.position.Y); + else + SoundEngine.PlaySound(7, (int) this.position.X, (int) this.position.Y); + inv[i] = returnItem; + if (!settings.NoText) + PopupText.NewText(PopupTextContext.ItemPickupToVoidContainer, newItem, newItem.stack, longText: settings.LongText); + this.DoCoins(i); + if (plr == Main.myPlayer) + Recipe.FindRecipes(); + AchievementsHelper.NotifyItemPickup(this, returnItem); + settings.HandlePostAction(inv[i]); + return true; + } + + private bool GetItem_FillEmptyInventorySlot( + int plr, + Item newItem, + GetItemSettings settings, + Item returnItem, + int i) + { + if (this.inventory[i].type != 0) + return false; + if (newItem.IsACoin) + SoundEngine.PlaySound(38, (int) this.position.X, (int) this.position.Y); + else + SoundEngine.PlaySound(7, (int) this.position.X, (int) this.position.Y); + this.inventory[i] = returnItem; + if (!settings.NoText) + PopupText.NewText(PopupTextContext.RegularItemPickup, newItem, newItem.stack, longText: settings.LongText); + this.DoCoins(i); + if (plr == Main.myPlayer) + Recipe.FindRecipes(); + AchievementsHelper.NotifyItemPickup(this, returnItem); + settings.HandlePostAction(this.inventory[i]); + return true; + } + + public void PlaceThing() + { + if (this.itemTime == 0) + this.dontConsumeWand = false; + this.PlaceThing_Paintbrush(); + this.PlaceThing_PaintRoller(); + this.PlaceThing_PaintScrapper(); + this.PlaceThing_CannonBall(); + this.PlaceThing_XMasTreeTops(); + this.PlaceThing_ItemInExtractinator(); + if (this.noBuilding) + return; + this.PlaceThing_Tiles(); + this.PlaceThing_Walls(); + } + + private void PlaceThing_Walls() + { + if (this.inventory[this.selectedItem].createWall < 0 || (double) this.position.X / 16.0 - (double) Player.tileRangeX - (double) this.inventory[this.selectedItem].tileBoost - (double) this.blockRange > (double) Player.tileTargetX || ((double) this.position.X + (double) this.width) / 16.0 + (double) Player.tileRangeX + (double) this.inventory[this.selectedItem].tileBoost - 1.0 + (double) this.blockRange < (double) Player.tileTargetX || (double) this.position.Y / 16.0 - (double) Player.tileRangeY - (double) this.inventory[this.selectedItem].tileBoost - (double) this.blockRange > (double) Player.tileTargetY || ((double) this.position.Y + (double) this.height) / 16.0 + (double) Player.tileRangeY + (double) this.inventory[this.selectedItem].tileBoost - 2.0 + (double) this.blockRange < (double) Player.tileTargetY) + return; + this.cursorItemIconEnabled = true; + if (!this.ItemTimeIsZero || this.itemAnimation <= 0 || !this.controlUseItem || !Main.tile[Player.tileTargetX + 1, Player.tileTargetY].active() && Main.tile[Player.tileTargetX + 1, Player.tileTargetY].wall <= (ushort) 0 && !Main.tile[Player.tileTargetX - 1, Player.tileTargetY].active() && Main.tile[Player.tileTargetX - 1, Player.tileTargetY].wall <= (ushort) 0 && !Main.tile[Player.tileTargetX, Player.tileTargetY + 1].active() && Main.tile[Player.tileTargetX, Player.tileTargetY + 1].wall <= (ushort) 0 && !Main.tile[Player.tileTargetX, Player.tileTargetY - 1].active() && Main.tile[Player.tileTargetX, Player.tileTargetY - 1].wall <= (ushort) 0 || (int) Main.tile[Player.tileTargetX, Player.tileTargetY].wall == this.inventory[this.selectedItem].createWall) + return; + bool canUse = true; + if (this.TileReplacementEnabled) + canUse = this.PlaceThing_TryReplacingWalls(canUse); + if (!canUse) + return; + WorldGen.PlaceWall(Player.tileTargetX, Player.tileTargetY, this.inventory[this.selectedItem].createWall); + if ((int) Main.tile[Player.tileTargetX, Player.tileTargetY].wall != this.inventory[this.selectedItem].createWall) + return; + this.ApplyItemTime(this.inventory[this.selectedItem], this.wallSpeed); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 3, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY), number4: ((float) this.inventory[this.selectedItem].createWall)); + this.PlaceThing_Walls_FillEmptySpace(); + if (!this.autoPaint || this.builderAccStatus[3] != 0) + return; + this.TryPainting(Player.tileTargetX, Player.tileTargetY, true, false); + } + + private void PlaceThing_Walls_FillEmptySpace() + { + if (this.inventory[this.selectedItem].stack <= 1) + return; + int createWall = this.inventory[this.selectedItem].createWall; + for (int index1 = 0; index1 < 4; ++index1) + { + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + if (index1 == 0) + --tileTargetX; + if (index1 == 1) + ++tileTargetX; + if (index1 == 2) + --tileTargetY; + if (index1 == 3) + ++tileTargetY; + if (Main.tile[tileTargetX, tileTargetY].wall == (ushort) 0) + { + int num = 0; + for (int index2 = 0; index2 < 4; ++index2) + { + int index3 = tileTargetX; + int index4 = tileTargetY; + if (index2 == 0) + --index3; + if (index2 == 1) + ++index3; + if (index2 == 2) + --index4; + if (index2 == 3) + ++index4; + if ((int) Main.tile[index3, index4].wall == createWall) + ++num; + } + if (num == 4) + { + WorldGen.PlaceWall(tileTargetX, tileTargetY, createWall); + if ((int) Main.tile[tileTargetX, tileTargetY].wall == createWall) + { + --this.inventory[this.selectedItem].stack; + if (this.inventory[this.selectedItem].stack == 0) + this.inventory[this.selectedItem].SetDefaults(); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 3, number2: ((float) tileTargetX), number3: ((float) tileTargetY), number4: ((float) createWall)); + if (this.autoPaint && this.builderAccStatus[3] == 0) + this.TryPainting(tileTargetX, tileTargetY, true, false); + } + } + } + } + } + + private void PlaceThing_Tiles() + { + int createTile = this.inventory[this.selectedItem].createTile; + if (createTile < 0 || (double) this.position.X / 16.0 - (double) Player.tileRangeX - (double) this.inventory[this.selectedItem].tileBoost - (double) this.blockRange > (double) Player.tileTargetX || ((double) this.position.X + (double) this.width) / 16.0 + (double) Player.tileRangeX + (double) this.inventory[this.selectedItem].tileBoost - 1.0 + (double) this.blockRange < (double) Player.tileTargetX || (double) this.position.Y / 16.0 - (double) Player.tileRangeY - (double) this.inventory[this.selectedItem].tileBoost - (double) this.blockRange > (double) Player.tileTargetY || ((double) this.position.Y + (double) this.height) / 16.0 + (double) Player.tileRangeY + (double) this.inventory[this.selectedItem].tileBoost - 2.0 + (double) this.blockRange < (double) Player.tileTargetY) + return; + this.cursorItemIconEnabled = true; + bool flag = this.PlaceThing_Tiles_CheckLavaBlocking(); + bool canUse = this.PlaceThing_Tiles_CheckRopeUsability(this.PlaceThing_Tiles_CheckWandUsability(this.PlaceThing_Tiles_CheckGamepadTorchUsability(true))); + if (this.TileReplacementEnabled) + canUse = this.PlaceThing_TryReplacingTiles(canUse); + Tile tile = Main.tile[Player.tileTargetX, Player.tileTargetY]; + if (!canUse || (tile.active() || flag) && (!Main.tileCut[(int) tile.type] || tile.type == (ushort) 484) && (tile.type < (ushort) 373 || tile.type > (ushort) 375) && tile.type != (ushort) 461 && createTile != 199 && createTile != 23 && createTile != 2 && createTile != 109 && createTile != 60 && createTile != 70 && !Main.tileMoss[createTile] && !TileID.Sets.BreakableWhenPlacing[(int) tile.type] || !this.ItemTimeIsZero || this.itemAnimation <= 0 || !this.controlUseItem) + return; + bool canPlace1 = false; + bool newObjectType = false; + TileObject objectData = new TileObject(); + bool canPlace2; + if (TileObjectData.CustomPlace(createTile, this.inventory[this.selectedItem].placeStyle) && createTile != 82 && createTile != 227) + { + newObjectType = true; + canPlace2 = TileObject.CanPlace(Player.tileTargetX, Player.tileTargetY, (int) (ushort) this.inventory[this.selectedItem].createTile, this.inventory[this.selectedItem].placeStyle, this.direction, out objectData); + Player.PlaceThing_Tiles_BlockPlacementIfOverPlayers(ref canPlace2, ref objectData); + Player.PlaceThing_Tiles_BlockPlacementForRepeatedPigronatas(ref canPlace2, ref objectData); + Player.PlaceThing_Tiles_BlockPlacementForRepeatedPumpkins(ref canPlace2, ref objectData); + Player.PlaceThing_Tiles_BlockPlacementForRepeatedCoralAndBeachPiles(ref canPlace2, ref objectData); + } + else + canPlace2 = this.PlaceThing_Tiles_BlockPlacementForAssortedThings(canPlace1); + if (!canPlace2) + return; + this.PlaceThing_Tiles_PlaceIt(newObjectType, objectData); + } + + private bool PlaceThing_TryReplacingWalls(bool canUse) + { + if (canUse && this.itemAnimation > 0 && this.ItemTimeIsZero && this.controlUseItem && this.PlaceThing_ValidWallForReplacement() && WorldGen.NearFriendlyWall(Player.tileTargetX, Player.tileTargetY) && WorldGen.ReplaceWall(Player.tileTargetX, Player.tileTargetY, (ushort) this.HeldItem.createWall)) + { + canUse = false; + this.ApplyItemTime(this.HeldItem, this.wallSpeed); + NetMessage.SendData(17, number: 22, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY), number4: ((float) this.HeldItem.createWall)); + if (this.autoPaint && this.builderAccStatus[3] == 0) + this.TryPainting(Player.tileTargetX, Player.tileTargetY, true, false); + } + return canUse; + } + + private bool PlaceThing_ValidWallForReplacement() + { + Tile tile = Main.tile[Player.tileTargetX, Player.tileTargetY]; + return Main.tile[Player.tileTargetX, Player.tileTargetY].wall > (ushort) 0; + } + + private bool PlaceThing_TryReplacingTiles(bool canUse) + { + bool flag = this.PlaceThing_ValidTileForReplacement(); + if (flag) + TileObject.objectPreview.Reset(); + if (this.controlUseItem && ((!canUse || !Main.tile[Player.tileTargetX, Player.tileTargetY].active() || this.itemAnimation <= 0 ? 0 : (this.ItemTimeIsZero ? 1 : 0)) & (flag ? 1 : 0)) != 0) + { + Item bestPickaxe = this.GetBestPickaxe(); + if (bestPickaxe == null) + return false; + Tile tile = Main.tile[Player.tileTargetX, Player.tileTargetY]; + int type = (int) tile.type; + int pickaxeDamage = this.GetPickaxeDamage(Player.tileTargetX, Player.tileTargetY, bestPickaxe.pick, type, tile); + if (pickaxeDamage == 0 || !WorldGen.IsTileReplacable(Player.tileTargetX, Player.tileTargetY)) + return false; + if (true) + { + if (this.hitReplace.AddDamage(this.hitReplace.HitObject(Player.tileTargetX, Player.tileTargetY, 1), pickaxeDamage) >= 100) + { + this.ClearMiningCacheAt(Player.tileTargetX, Player.tileTargetY, 1); + } + else + { + int tileDustAmount = WorldGen.KillTile_GetTileDustAmount(true, tile); + for (int index = 0; index < tileDustAmount; ++index) + WorldGen.KillTile_MakeTileDust(Player.tileTargetX, Player.tileTargetY, tile); + WorldGen.KillTile_PlaySounds(Player.tileTargetX, Player.tileTargetY, true, tile); + if (this.HeldItem.consumable) + ++this.HeldItem.stack; + this.dontConsumeWand = true; + this.ApplyItemTime(bestPickaxe, this.pickSpeed); + this.SetItemAnimation((int) ((double) bestPickaxe.useTime * (double) this.pickSpeed)); + return false; + } + } + int[,] autoAccessoryCache = this.PlaceThing_Tiles_GetAutoAccessoryCache(); + if (WorldGen.ReplaceTile(Player.tileTargetX, Player.tileTargetY, (ushort) this.HeldItem.createTile, this.HeldItem.placeStyle)) + { + canUse = false; + NetMessage.SendData(17, number: 21, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY), number4: ((float) this.HeldItem.createTile), number5: this.HeldItem.placeStyle); + this.ApplyItemTime(this.HeldItem); + this.SetItemAnimation(this.HeldItem.useAnimation); + this.PlaceThing_Tiles_PlaceIt_AutoPaintAndActuate(autoAccessoryCache); + } + } + return canUse; + } + + private bool PlaceThing_ValidTileForReplacement() + { + int createTile = this.HeldItem.createTile; + Tile tileCache = Main.tile[Player.tileTargetX, Player.tileTargetY]; + if (WorldGen.WouldTileReplacementBeBlockedByLiquid(Player.tileTargetX, Player.tileTargetY, 1) || ItemID.Sets.SortingPriorityRopes[this.HeldItem.type] != -1 || Main.tileMoss[createTile] || TileID.Sets.DoesntPlaceWithTileReplacement[createTile] || TileID.Sets.DoesntGetReplacedWithTileReplacement[(int) tileCache.type] || !this.PlaceThing_CheckSpecificValidtyCaseForBlockSwap(createTile, (int) tileCache.type) || Main.tileCut[(int) tileCache.type]) + return false; + if (TileID.Sets.Platforms[(int) tileCache.type] && (int) tileCache.type == createTile) + return (int) tileCache.frameY != this.HeldItem.placeStyle * 18; + if (TileID.Sets.BasicChest[(int) tileCache.type] && TileID.Sets.BasicChest[createTile]) + return (int) tileCache.frameX / 36 != this.HeldItem.placeStyle || (int) tileCache.type != createTile; + if (TileID.Sets.BasicDresser[(int) tileCache.type] && TileID.Sets.BasicDresser[createTile]) + return (int) tileCache.frameX / 54 != this.HeldItem.placeStyle || (int) tileCache.type != createTile; + if (Main.tileFrameImportant[createTile] && !TileID.Sets.Platforms[createTile] || (int) Main.tile[Player.tileTargetX, Player.tileTargetY].type == createTile) + return false; + if (!TileID.Sets.IgnoresTileReplacementDropCheckWhenBeingPlaced[createTile]) + { + int dropItem; + WorldGen.KillTile_GetItemDrops(Player.tileTargetX, Player.tileTargetY, tileCache, out dropItem, out int _, out int _, out int _); + if (dropItem == this.HeldItem.type) + return false; + } + return WorldGen.WouldTileReplacementWork((ushort) createTile, Player.tileTargetX, Player.tileTargetY); + } + + private bool PlaceThing_CheckSpecificValidtyCaseForBlockSwap( + int tileTypeBeingPlaced, + int tileTypeCurrentlyPlaced) + { + return !((TileID.Sets.Falling[tileTypeBeingPlaced] ? 1 : 0) == 0 & TileID.Sets.Falling[tileTypeCurrentlyPlaced]); + } + + private Item GetBestPickaxe() + { + Item obj = (Item) null; + for (int index = 0; index < 50; ++index) + { + if (this.inventory[index].stack > 0 && this.inventory[index].pick > 0 && (obj == null || this.inventory[index].pick > obj.pick)) + obj = this.inventory[index]; + } + return obj; + } + + private TileObject PlaceThing_Tiles_PlaceIt(bool newObjectType, TileObject data) + { + int num = this.inventory[this.selectedItem].placeStyle; + if (!newObjectType) + num = this.PlaceThing_Tiles_PlaceIt_GetLegacyTileStyle(num); + int[,] autoAccessoryCache = this.PlaceThing_Tiles_GetAutoAccessoryCache(); + bool forced = false; + bool flag; + if (newObjectType) + { + flag = TileObject.Place(data); + WorldGen.SquareTileFrame(Player.tileTargetX, Player.tileTargetY); + if (Main.netMode != 1 || !TileID.Sets.IsAContainer[this.inventory[this.selectedItem].createTile]) + SoundEngine.PlaySound(0, Player.tileTargetX * 16, Player.tileTargetY * 16); + } + else + { + if (this.UsingBiomeTorches && this.inventory[this.selectedItem].createTile == 4 && num == 0) + num = this.BiomeTorchPlaceStyle(num); + flag = WorldGen.PlaceTile(Player.tileTargetX, Player.tileTargetY, this.inventory[this.selectedItem].createTile, forced: forced, plr: this.whoAmI, style: num); + } + if (flag) + { + this.ApplyItemTime(this.inventory[this.selectedItem], this.tileSpeed); + if (newObjectType) + { + TileObjectData.CallPostPlacementPlayerHook(Player.tileTargetX, Player.tileTargetY, this.inventory[this.selectedItem].createTile, num, this.direction, data.alternate, data); + if (Main.netMode == 1 && !Main.tileContainer[this.inventory[this.selectedItem].createTile] && this.inventory[this.selectedItem].createTile != 423) + NetMessage.SendObjectPlacment(-1, Player.tileTargetX, Player.tileTargetY, data.type, data.style, data.alternate, data.random, this.direction); + } + else + { + NetMessage.SendData(17, number: 1, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY), number4: ((float) this.inventory[this.selectedItem].createTile), number5: num); + this.PlaceThing_Tiles_PlaceIt_SpinChairs(); + this.PlaceThing_Tiles_PlaceIt_SpinBedsAndBaths(); + } + this.PlaceThing_Tiles_PlaceIt_AdjustPlants(); + this.PlaceThing_Tiles_PlaceIt_SpinTraps(); + this.PlaceThing_Tiles_PlaceIt_TriggerLogicLamp(); + this.PlaceThing_Tiles_PlaceIt_SpinSmartPlatform(); + this.PlaceThing_Tiles_PlaceIt_UnslopeForSolids(); + this.PlaceThing_Tiles_PlaceIt_KillGrassForSolids(); + this.PlaceThing_Tiles_PlaceIt_AutoPaintAndActuate(autoAccessoryCache); + if (PlayerInput.UsingGamepad && ItemID.Sets.SingleUseInGamepad[this.inventory[this.selectedItem].type] && Main.myPlayer == this.whoAmI && !Main.SmartCursorEnabled) + Main.blockMouse = true; + } + return data; + } + + public int BiomeTorchPlaceStyle(int style) + { + if (!this.UsingBiomeTorches || style != 0) + return style; + if (this.ZoneDungeon) + style = 13; + else if ((double) this.position.Y > (double) (Main.UnderworldLayer * 16)) + style = 7; + else if (this.ZoneHallow) + style = 20; + else if (this.ZoneCorrupt) + style = 18; + else if (this.ZoneCrimson) + style = 19; + else if (this.ZoneSnow) + style = 9; + else if (this.ZoneJungle) + style = 21; + else if (this.ZoneDesert && (double) this.position.Y < Main.worldSurface * 16.0 || this.ZoneUndergroundDesert) + style = 16; + return style; + } + + public int BiomeTorchHoldStyle(int style) + { + if (!this.UsingBiomeTorches || style != 8) + return style; + if (this.ZoneDungeon) + style = 3004; + else if ((double) this.position.Y > (double) (Main.UnderworldLayer * 16)) + style = 433; + else if (this.ZoneHallow) + style = 4387; + else if (this.ZoneCorrupt) + style = 4385; + else if (this.ZoneCrimson) + style = 4386; + else if (this.ZoneSnow) + style = 974; + else if (this.ZoneJungle) + style = 4388; + else if (this.ZoneDesert && (double) this.position.Y < Main.worldSurface * 16.0 || this.ZoneUndergroundDesert) + style = 4383; + return style; + } + + private int[,] PlaceThing_Tiles_GetAutoAccessoryCache() + { + int[,] numArray = (int[,]) null; + if (this.autoPaint || this.autoActuator) + { + numArray = new int[11, 11]; + for (int index1 = 0; index1 < 11; ++index1) + { + for (int index2 = 0; index2 < 11; ++index2) + { + int index3 = Player.tileTargetX - 5 + index1; + int index4 = Player.tileTargetY - 5 + index2; + numArray[index1, index2] = !Main.tile[index3, index4].active() ? -1 : (int) Main.tile[index3, index4].type; + } + } + } + return numArray; + } + + private int PlaceThing_Tiles_PlaceIt_GetLegacyTileStyle(int style) + { + int createTile = this.inventory[this.selectedItem].createTile; + if (createTile == 36) + style = Main.rand.Next(7); + if (createTile == 212 && this.direction > 0) + style = 1; + if (createTile == 141) + style = Main.rand.Next(2); + if (createTile == 128 || createTile == 269 || createTile == 334) + style = this.direction >= 0 ? 1 : -1; + if (createTile == 241 && this.inventory[this.selectedItem].placeStyle == 0) + style = Main.rand.Next(0, 9); + if (createTile == 35 && this.inventory[this.selectedItem].placeStyle == 0) + style = Main.rand.Next(9); + if (createTile == 314 && style == 2 && this.direction == 1) + ++style; + return style; + } + + private void PlaceThing_Tiles_PlaceIt_UnslopeForSolids() + { + if (!Main.tileSolid[this.inventory[this.selectedItem].createTile] || this.inventory[this.selectedItem].createTile >= 0 && TileID.Sets.Platforms[this.inventory[this.selectedItem].createTile]) + return; + int tileTargetX1 = Player.tileTargetX; + int j1 = Player.tileTargetY + 1; + if (Main.tile[tileTargetX1, j1] != null && !TileID.Sets.Platforms[(int) Main.tile[tileTargetX1, j1].type] && (Main.tile[tileTargetX1, j1].topSlope() || Main.tile[tileTargetX1, j1].halfBrick())) + { + WorldGen.SlopeTile(tileTargetX1, j1); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 14, number2: ((float) tileTargetX1), number3: ((float) j1)); + } + int tileTargetX2 = Player.tileTargetX; + int j2 = Player.tileTargetY - 1; + if (Main.tile[tileTargetX2, j2] == null || TileID.Sets.Platforms[(int) Main.tile[tileTargetX2, j2].type] || !Main.tile[tileTargetX2, j2].bottomSlope()) + return; + WorldGen.SlopeTile(tileTargetX2, j2); + if (Main.netMode != 1) + return; + NetMessage.SendData(17, number: 14, number2: ((float) tileTargetX2), number3: ((float) j2)); + } + + private void PlaceThing_Tiles_PlaceIt_KillGrassForSolids() + { + if (!Main.tileSolid[this.inventory[this.selectedItem].createTile]) + return; + for (int i1 = Player.tileTargetX - 1; i1 <= Player.tileTargetX + 1; ++i1) + { + for (int j1 = Player.tileTargetY - 1; j1 <= Player.tileTargetY + 1; ++j1) + { + if (Main.tile[i1, j1].active() && this.inventory[this.selectedItem].createTile != (int) Main.tile[i1, j1].type && (Main.tile[i1, j1].type == (ushort) 2 || Main.tile[i1, j1].type == (ushort) 23 || Main.tile[i1, j1].type == (ushort) 60 || Main.tile[i1, j1].type == (ushort) 70 || Main.tile[i1, j1].type == (ushort) 109 || Main.tile[i1, j1].type == (ushort) 199 || Main.tile[i1, j1].type == (ushort) 477 || Main.tile[i1, j1].type == (ushort) 492)) + { + bool flag = true; + for (int i2 = i1 - 1; i2 <= i1 + 1; ++i2) + { + for (int j2 = j1 - 1; j2 <= j1 + 1; ++j2) + { + if (!WorldGen.SolidTile(i2, j2)) + flag = false; + } + } + if (flag) + { + WorldGen.KillTile(i1, j1, true); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) i1), number3: ((float) j1), number4: 1f); + } + } + } + } + } + + private void PlaceThing_Tiles_PlaceIt_AutoPaintAndActuate(int[,] typeCaches) + { + if (!this.autoPaint && !this.autoActuator) + return; + int num1 = 0; + int num2 = 0; + int num3 = 11; + int num4 = 11; + bool platform = TileID.Sets.Platforms[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type]; + bool flag1 = TileID.Sets.Platforms[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type] && TileID.Sets.Platforms[this.inventory[this.selectedItem].createTile]; + if (!Main.tileFrameImportant[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type] | platform) + { + num1 = num2 = 5; + num3 = num4 = 6; + } + for (int index1 = num1; index1 < num3; ++index1) + { + for (int index2 = num2; index2 < num4; ++index2) + { + int index3 = Player.tileTargetX - 5 + index1; + int index4 = Player.tileTargetY - 5 + index2; + if ((Main.tile[index3, index4].active() || typeCaches[index1, index2] != -1) && (!Main.tile[index3, index4].active() || flag1 || typeCaches[index1, index2] != (int) Main.tile[index3, index4].type && (int) Main.tile[index3, index4].type == this.inventory[this.selectedItem].createTile)) + { + if (this.autoPaint && this.builderAccStatus[3] == 0) + this.TryPainting(index3, index4, applyItemAnimation: false); + if (this.autoActuator && this.builderAccStatus[2] == 0) + { + bool flag2 = Main.tileSolid[(int) Main.tile[index3, index4].type] && !TileID.Sets.NotReallySolid[(int) Main.tile[index3, index4].type]; + switch (Main.tile[index3, index4].type) + { + case 314: + case 386: + case 387: + case 388: + case 389: + flag2 = false; + break; + } + if (flag2) + { + int index5 = this.FindItem(849); + if (index5 > -1 && WorldGen.PlaceActuator(index3, index4)) + { + NetMessage.SendData(17, number: 8, number2: ((float) index3), number3: ((float) index4)); + --this.inventory[index5].stack; + if (this.inventory[index5].stack <= 0) + this.inventory[index5].SetDefaults(); + } + } + } + } + } + } + } + + private void PlaceThing_Tiles_PlaceIt_SpinSmartPlatform() + { + if (this.inventory[this.selectedItem].createTile < 0 || !TileID.Sets.Platforms[this.inventory[this.selectedItem].createTile] || !Main.SmartCursorEnabled) + return; + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + int slope1 = -1; + int num1 = 0; + int num2 = 0; + bool flag1 = true; + for (int index1 = -1; index1 < 2; ++index1) + { + for (int index2 = -1; index2 < 2; ++index2) + { + if ((index1 != 0 || index2 != 0) && TileID.Sets.Platforms[(int) Main.tile[tileTargetX + index1, tileTargetY + index2].type]) + flag1 = false; + } + } + if (flag1) + return; + Tile tile1 = Main.tile[tileTargetX - 1, tileTargetY - 1]; + if (tile1.active() && TileID.Sets.Platforms[(int) tile1.type] && tile1.slope() != (byte) 2) + ++num1; + Tile tile2 = Main.tile[tileTargetX - 1, tileTargetY + 1]; + if (tile2.active() && TileID.Sets.Platforms[(int) tile2.type] && tile2.slope() != (byte) 1) + ++num2; + Tile tile3 = Main.tile[tileTargetX + 1, tileTargetY - 1]; + if (tile3.active() && TileID.Sets.Platforms[(int) tile3.type] && tile3.slope() != (byte) 1) + ++num2; + Tile tile4 = Main.tile[tileTargetX + 1, tileTargetY + 1]; + if (tile4.active() && TileID.Sets.Platforms[(int) tile4.type] && tile4.slope() != (byte) 2) + ++num1; + Tile testTile1 = Main.tile[tileTargetX - 1, tileTargetY]; + if (WorldGen.SolidTile(testTile1)) + { + ++num1; + if (TileID.Sets.Platforms[(int) testTile1.type] && testTile1.slope() == (byte) 0) + ++num1; + } + Tile testTile2 = Main.tile[tileTargetX + 1, tileTargetY]; + if (WorldGen.SolidTile(testTile2)) + { + ++num2; + if (TileID.Sets.Platforms[(int) testTile2.type] && testTile2.slope() == (byte) 0) + ++num2; + } + if (num1 > num2) + slope1 = 1; + else if (num2 > num1) + slope1 = 2; + Tile tile5 = Main.tile[tileTargetX - 1, tileTargetY]; + if (tile5.active() && TileID.Sets.Platforms[(int) tile5.type]) + slope1 = 0; + Tile tile6 = Main.tile[tileTargetX + 1, tileTargetY]; + if (tile6.active() && TileID.Sets.Platforms[(int) tile6.type]) + slope1 = 0; + if (slope1 != -1) + { + WorldGen.SlopeTile(tileTargetX, tileTargetY, slope1, true); + int num3 = (int) Main.tile[tileTargetX, tileTargetY].slope(); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 14, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY), number4: ((float) num3)); + int num4; + int num5; + if (slope1 == 1) + { + num4 = -1; + num5 = -1; + } + else + { + num4 = 1; + num5 = -1; + } + Tile tile7 = Main.tile[tileTargetX + num4, tileTargetY + num5]; + if (tile7.active() && TileID.Sets.Platforms[(int) tile7.type] && tile7.slope() == (byte) 0 && (!Main.tile[tileTargetX + num4 + num4, tileTargetY + num5].active() || !TileID.Sets.Platforms[(int) Main.tile[tileTargetX + num4 + num4, tileTargetY + num5].type] || !Main.tile[tileTargetX + num4 + num4, tileTargetY + num5].halfBrick())) + { + WorldGen.SlopeTile(tileTargetX + num4, tileTargetY + num5, slope1); + int num6 = (int) tile7.slope(); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 14, number2: ((float) (tileTargetX + num4)), number3: ((float) (tileTargetY + num5)), number4: ((float) num6)); + } + int num7; + int num8; + if (slope1 == 1) + { + num7 = 1; + num8 = 1; + } + else + { + num7 = -1; + num8 = 1; + } + Tile tile8 = Main.tile[tileTargetX + num7, tileTargetY + num8]; + if (!tile8.active() || !TileID.Sets.Platforms[(int) tile8.type] || tile8.slope() != (byte) 0 || WorldGen.PlatformProperSides(tileTargetX + num7, tileTargetY + num8, true) > 0) + return; + WorldGen.SlopeTile(tileTargetX + num7, tileTargetY + num8, slope1); + int num9 = (int) tile8.slope(); + if (Main.netMode != 1) + return; + NetMessage.SendData(17, number: 14, number2: ((float) (tileTargetX + num7)), number3: ((float) (tileTargetY + num8)), number4: ((float) num9)); + } + else + { + int num10 = -1; + Tile tile9 = Main.tile[tileTargetX + num10, tileTargetY]; + if (tile9.active() && TileID.Sets.Platforms[(int) tile9.type] && tile9.slope() != (byte) 0) + { + int num11 = (tile9.slope() == (byte) 1).ToDirectionInt() * num10; + int slope2 = num11 == -1 ? 0 : (int) tile9.slope(); + bool flag2 = true; + if (Main.tile[tileTargetX + num10 * 2, tileTargetY + num11].active() && TileID.Sets.Platforms[(int) Main.tile[tileTargetX + num10 * 2, tileTargetY].type] && slope2 == (int) Main.tile[tileTargetX + num10 * 2, tileTargetY + num11].slope()) + flag2 = false; + if (Main.tile[tileTargetX, tileTargetY - num11].active() && TileID.Sets.Platforms[(int) Main.tile[tileTargetX, tileTargetY - num11].type] && (int) tile9.slope() == (int) Main.tile[tileTargetX, tileTargetY - num11].slope()) + flag2 = false; + if (flag2) + { + WorldGen.SlopeTile(tileTargetX + num10, tileTargetY, slope2); + int num12 = (int) tile9.slope(); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 14, number2: ((float) (tileTargetX + num10)), number3: ((float) tileTargetY), number4: ((float) num12)); + } + } + int num13 = 1; + int num14 = 0; + Tile tile10 = Main.tile[tileTargetX + num13, tileTargetY + num14]; + if (tile10.active() && TileID.Sets.Platforms[(int) tile10.type] && tile10.slope() != (byte) 0) + { + int num15 = (tile10.slope() == (byte) 1).ToDirectionInt() * num13; + int slope3 = num15 == -1 ? 0 : (int) tile10.slope(); + bool flag3 = true; + if (Main.tile[tileTargetX + num13 * 2, tileTargetY + num15].active() && TileID.Sets.Platforms[(int) Main.tile[tileTargetX + num13 * 2, tileTargetY].type] && slope3 == (int) Main.tile[tileTargetX + num13 * 2, tileTargetY + num15].slope()) + flag3 = false; + if (Main.tile[tileTargetX, tileTargetY - num15].active() && TileID.Sets.Platforms[(int) Main.tile[tileTargetX, tileTargetY - num15].type] && (int) tile10.slope() == (int) Main.tile[tileTargetX, tileTargetY - num15].slope()) + flag3 = false; + if (flag3) + { + WorldGen.SlopeTile(tileTargetX + num13, tileTargetY, slope3); + int num16 = (int) tile10.slope(); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 14, number2: ((float) (tileTargetX + num13)), number3: ((float) tileTargetY), number4: ((float) num16)); + } + } + if (num1 != num2 || WorldGen.PlatformProperSides(tileTargetX, tileTargetY) != 0) + return; + Tile tile11 = Main.tile[tileTargetX, tileTargetY + 1]; + if (!tile11.active() || tile11.halfBrick() || tile11.slope() != (byte) 0 || !Main.tileSolid[(int) tile11.type]) + return; + int slope4 = this.direction == 1 ? 2 : 1; + WorldGen.SlopeTile(tileTargetX, tileTargetY, slope4); + int num17 = (int) Main.tile[tileTargetX, tileTargetY].slope(); + if (Main.netMode != 1) + return; + NetMessage.SendData(17, number: 14, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY), number4: ((float) num17)); + } + } + + private void PlaceThing_Tiles_PlaceIt_TriggerLogicLamp() + { + if (this.inventory[this.selectedItem].createTile != 419) + return; + if (Main.netMode == 1) + NetMessage.SendData(17, number: 18, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + else + Wiring.PokeLogicGate(Player.tileTargetX, Player.tileTargetY); + } + + private void PlaceThing_Tiles_PlaceIt_SpinBedsAndBaths() + { + if (this.inventory[this.selectedItem].createTile != 79 && this.inventory[this.selectedItem].createTile != 90 || Main.netMode != 1) + return; + NetMessage.SendTileSquare(-1, Player.tileTargetX, Player.tileTargetY, 5); + } + + private void PlaceThing_Tiles_PlaceIt_SpinChairs() + { + if (this.inventory[this.selectedItem].createTile != 15) + return; + if (this.direction == 1) + { + Main.tile[Player.tileTargetX, Player.tileTargetY].frameX += (short) 18; + Main.tile[Player.tileTargetX, Player.tileTargetY - 1].frameX += (short) 18; + } + if (Main.netMode != 1) + return; + NetMessage.SendTileSquare(-1, Player.tileTargetX - 1, Player.tileTargetY - 1, 3); + } + + private void PlaceThing_Tiles_PlaceIt_SpinTraps() + { + if (this.inventory[this.selectedItem].createTile != 137) + return; + if (this.direction == 1) + Main.tile[Player.tileTargetX, Player.tileTargetY].frameX += (short) 18; + if (Main.netMode != 1) + return; + NetMessage.SendTileSquare(-1, Player.tileTargetX, Player.tileTargetY, 1); + } + + private void PlaceThing_Tiles_PlaceIt_AdjustPlants() + { + if (this.inventory[this.selectedItem].createTile != 3) + return; + FlowerPacketInfo flowerPacketInfo = ItemID.Sets.flowerPacketInfo[this.inventory[this.selectedItem].type]; + if (flowerPacketInfo == null) + return; + List stylesOnPurity = flowerPacketInfo.stylesOnPurity; + if (stylesOnPurity.Count == 0) + return; + int num = stylesOnPurity[Main.rand.Next(stylesOnPurity.Count)]; + Main.tile[Player.tileTargetX, Player.tileTargetY].frameX = (short) (num * 18); + if (Main.netMode != 1) + return; + NetMessage.SendTileSquare(-1, Player.tileTargetX, Player.tileTargetY, 1); + } + + private bool PlaceThing_Tiles_PlaceIt_StaffOfRegrowthCheck(bool placed) + { + if (this.inventory[this.selectedItem].type == 213 && !placed && Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 1 && Main.tile[Player.tileTargetX, Player.tileTargetY].active()) + { + int num1 = 0; + int num2 = 0; + Point tileCoordinates = this.Center.ToTileCoordinates(); + Dictionary resultsOutput = new Dictionary(); + WorldUtils.Gen(new Point(tileCoordinates.X - 25, tileCoordinates.Y - 25), (GenShape) new Shapes.Rectangle(50, 50), (GenAction) new Actions.TileScanner(new ushort[18] + { + (ushort) 182, + (ushort) 515, + (ushort) 180, + (ushort) 513, + (ushort) 179, + (ushort) 512, + (ushort) 183, + (ushort) 516, + (ushort) 181, + (ushort) 514, + (ushort) 381, + (ushort) 517, + (ushort) 534, + (ushort) 535, + (ushort) 536, + (ushort) 537, + (ushort) 539, + (ushort) 540 + }).Output(resultsOutput)); + foreach (KeyValuePair keyValuePair in resultsOutput) + { + if (keyValuePair.Value > num2) + { + num2 = keyValuePair.Value; + num1 = (int) keyValuePair.Key; + } + } + switch (num1) + { + case 512: + num1 = 179; + break; + case 513: + num1 = 180; + break; + case 514: + num1 = 181; + break; + case 515: + num1 = 182; + break; + case 516: + num1 = 183; + break; + case 517: + num1 = 381; + break; + case 535: + num1 = 534; + break; + case 537: + num1 = 536; + break; + case 540: + num1 = 539; + break; + } + if (num2 == 0) + num1 = Utils.SelectRandom(Main.rand, 182, 180, 179, 183, 181); + if (num1 != 0) + { + Main.tile[Player.tileTargetX, Player.tileTargetY].type = (ushort) num1; + WorldGen.SquareTileFrame(Player.tileTargetX, Player.tileTargetY); + NetMessage.SendTileSquare(-1, Player.tileTargetX, Player.tileTargetY, 1); + placed = true; + } + } + if (this.inventory[this.selectedItem].type == 213 && !placed && Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 38 && Main.tile[Player.tileTargetX, Player.tileTargetY].active()) + { + int num3 = 0; + int num4 = 0; + Point tileCoordinates = this.Center.ToTileCoordinates(); + Dictionary resultsOutput = new Dictionary(); + WorldUtils.Gen(new Point(tileCoordinates.X - 25, tileCoordinates.Y - 25), (GenShape) new Shapes.Rectangle(50, 50), (GenAction) new Actions.TileScanner(new ushort[18] + { + (ushort) 182, + (ushort) 515, + (ushort) 180, + (ushort) 513, + (ushort) 179, + (ushort) 512, + (ushort) 183, + (ushort) 516, + (ushort) 181, + (ushort) 514, + (ushort) 381, + (ushort) 517, + (ushort) 534, + (ushort) 535, + (ushort) 536, + (ushort) 537, + (ushort) 539, + (ushort) 540 + }).Output(resultsOutput)); + foreach (KeyValuePair keyValuePair in resultsOutput) + { + if (keyValuePair.Value > num4) + { + num4 = keyValuePair.Value; + num3 = (int) keyValuePair.Key; + } + } + switch (num3) + { + case 179: + num3 = 512; + break; + case 180: + num3 = 513; + break; + case 181: + num3 = 514; + break; + case 182: + num3 = 515; + break; + case 183: + num3 = 516; + break; + case 381: + num3 = 517; + break; + case 534: + num3 = 535; + break; + case 536: + num3 = 537; + break; + case 539: + num3 = 540; + break; + } + if (num4 == 0) + num3 = Utils.SelectRandom(Main.rand, 515, 513, 512, 516, 514); + if (num3 != 0) + { + Main.tile[Player.tileTargetX, Player.tileTargetY].type = (ushort) num3; + WorldGen.SquareTileFrame(Player.tileTargetX, Player.tileTargetY); + NetMessage.SendTileSquare(-1, Player.tileTargetX, Player.tileTargetY, 1); + placed = true; + } + } + return placed; + } + + private bool PlaceThing_Tiles_BlockPlacementForAssortedThings(bool canPlace) + { + if (this.inventory[this.selectedItem].type == 213) + { + if (Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 0 || Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 1 || Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 38) + canPlace = true; + } + else if (this.inventory[this.selectedItem].createTile == 23 || this.inventory[this.selectedItem].createTile == 2 || this.inventory[this.selectedItem].createTile == 109 || this.inventory[this.selectedItem].createTile == 199) + { + if (Main.tile[Player.tileTargetX, Player.tileTargetY].nactive() && Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 0) + canPlace = true; + } + else if (this.inventory[this.selectedItem].createTile == 227) + canPlace = true; + else if (this.inventory[this.selectedItem].createTile >= 373 && this.inventory[this.selectedItem].createTile <= 375) + { + int tileTargetX = Player.tileTargetX; + int index = Player.tileTargetY - 1; + if (Main.tile[tileTargetX, index].nactive() && Main.tileSolid[(int) Main.tile[tileTargetX, index].type] && !Main.tileSolidTop[(int) Main.tile[tileTargetX, index].type]) + canPlace = true; + } + else if (this.inventory[this.selectedItem].createTile == 461) + { + int tileTargetX = Player.tileTargetX; + int index = Player.tileTargetY - 1; + if (Main.tile[tileTargetX, index].nactive() && Main.tileSolid[(int) Main.tile[tileTargetX, index].type] && !Main.tileSolidTop[(int) Main.tile[tileTargetX, index].type]) + canPlace = true; + } + else if (this.inventory[this.selectedItem].createTile == 60 || this.inventory[this.selectedItem].createTile == 70) + { + if (Main.tile[Player.tileTargetX, Player.tileTargetY].nactive() && Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 59) + canPlace = true; + } + else if (this.inventory[this.selectedItem].createTile == 4 || this.inventory[this.selectedItem].createTile == 136) + { + if (Main.tile[Player.tileTargetX, Player.tileTargetY].wall > (ushort) 0) + { + canPlace = true; + } + else + { + if (!WorldGen.SolidTileNoAttach(Player.tileTargetX, Player.tileTargetY + 1) && !WorldGen.SolidTileNoAttach(Player.tileTargetX - 1, Player.tileTargetY) && !WorldGen.SolidTileNoAttach(Player.tileTargetX + 1, Player.tileTargetY)) + { + if (!WorldGen.SolidTileNoAttach(Player.tileTargetX, Player.tileTargetY + 1) && (Main.tile[Player.tileTargetX, Player.tileTargetY + 1].halfBrick() || Main.tile[Player.tileTargetX, Player.tileTargetY + 1].slope() != (byte) 0)) + { + if (!TileID.Sets.Platforms[(int) Main.tile[Player.tileTargetX, Player.tileTargetY + 1].type]) + { + WorldGen.SlopeTile(Player.tileTargetX, Player.tileTargetY + 1); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 14, number2: ((float) Player.tileTargetX), number3: ((float) (Player.tileTargetY + 1))); + } + } + else if (!WorldGen.SolidTileNoAttach(Player.tileTargetX, Player.tileTargetY + 1) && !WorldGen.SolidTileNoAttach(Player.tileTargetX - 1, Player.tileTargetY) && (Main.tile[Player.tileTargetX - 1, Player.tileTargetY].halfBrick() || Main.tile[Player.tileTargetX - 1, Player.tileTargetY].slope() != (byte) 0)) + { + if (!TileID.Sets.Platforms[(int) Main.tile[Player.tileTargetX - 1, Player.tileTargetY].type]) + { + WorldGen.SlopeTile(Player.tileTargetX - 1, Player.tileTargetY); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 14, number2: ((float) (Player.tileTargetX - 1)), number3: ((float) Player.tileTargetY)); + } + } + else if (!WorldGen.SolidTileNoAttach(Player.tileTargetX, Player.tileTargetY + 1) && !WorldGen.SolidTileNoAttach(Player.tileTargetX + 1, Player.tileTargetY) && (Main.tile[Player.tileTargetX + 1, Player.tileTargetY].halfBrick() || Main.tile[Player.tileTargetX + 1, Player.tileTargetY].slope() != (byte) 0) && !TileID.Sets.Platforms[(int) Main.tile[Player.tileTargetX + 1, Player.tileTargetY].type]) + { + WorldGen.SlopeTile(Player.tileTargetX + 1, Player.tileTargetY); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 14, number2: ((float) (Player.tileTargetX + 1)), number3: ((float) Player.tileTargetY)); + } + } + int index = (int) Main.tile[Player.tileTargetX, Player.tileTargetY + 1].type; + if (Main.tile[Player.tileTargetX, Player.tileTargetY].halfBrick()) + index = -1; + int tree1 = (int) Main.tile[Player.tileTargetX - 1, Player.tileTargetY].type; + int tree2 = (int) Main.tile[Player.tileTargetX + 1, Player.tileTargetY].type; + int tree3 = (int) Main.tile[Player.tileTargetX - 1, Player.tileTargetY - 1].type; + int tree4 = (int) Main.tile[Player.tileTargetX + 1, Player.tileTargetY - 1].type; + int tree5 = (int) Main.tile[Player.tileTargetX - 1, Player.tileTargetY - 1].type; + int tree6 = (int) Main.tile[Player.tileTargetX + 1, Player.tileTargetY + 1].type; + if (!Main.tile[Player.tileTargetX, Player.tileTargetY + 1].nactive()) + index = -1; + if (!Main.tile[Player.tileTargetX - 1, Player.tileTargetY].nactive()) + tree1 = -1; + if (!Main.tile[Player.tileTargetX + 1, Player.tileTargetY].nactive()) + tree2 = -1; + if (!Main.tile[Player.tileTargetX - 1, Player.tileTargetY - 1].nactive()) + tree3 = -1; + if (!Main.tile[Player.tileTargetX + 1, Player.tileTargetY - 1].nactive()) + tree4 = -1; + if (!Main.tile[Player.tileTargetX - 1, Player.tileTargetY + 1].nactive()) + tree5 = -1; + if (!Main.tile[Player.tileTargetX + 1, Player.tileTargetY + 1].nactive()) + tree6 = -1; + if (index >= 0 && Main.tileSolid[index] && (!Main.tileNoAttach[index] || index >= 0 && TileID.Sets.Platforms[index])) + canPlace = true; + else if (tree1 >= 0 && Main.tileSolid[tree1] && !Main.tileNoAttach[tree1] || WorldGen.IsTreeType(tree1) && WorldGen.IsTreeType(tree3) && WorldGen.IsTreeType(tree5) || tree1 >= 0 && TileID.Sets.IsBeam[tree1]) + canPlace = true; + else if (tree2 >= 0 && Main.tileSolid[tree2] && !Main.tileNoAttach[tree2] || WorldGen.IsTreeType(tree2) && WorldGen.IsTreeType(tree4) && WorldGen.IsTreeType(tree6) || tree2 >= 0 && TileID.Sets.IsBeam[tree2]) + canPlace = true; + } + } + else if (this.inventory[this.selectedItem].createTile == 78 || this.inventory[this.selectedItem].createTile == 98 || this.inventory[this.selectedItem].createTile == 100 || this.inventory[this.selectedItem].createTile == 173 || this.inventory[this.selectedItem].createTile == 174 || this.inventory[this.selectedItem].createTile == 324) + { + if (Main.tile[Player.tileTargetX, Player.tileTargetY + 1].nactive() && (Main.tileSolid[(int) Main.tile[Player.tileTargetX, Player.tileTargetY + 1].type] || Main.tileTable[(int) Main.tile[Player.tileTargetX, Player.tileTargetY + 1].type])) + canPlace = true; + } + else if (this.inventory[this.selectedItem].createTile == 419) + { + if (Main.tile[Player.tileTargetX, Player.tileTargetY + 1].active() && (Main.tile[Player.tileTargetX, Player.tileTargetY + 1].type == (ushort) 419 || this.inventory[this.selectedItem].placeStyle != 2 && Main.tile[Player.tileTargetX, Player.tileTargetY + 1].type == (ushort) 420)) + canPlace = true; + } + else if (this.inventory[this.selectedItem].createTile == 13 || this.inventory[this.selectedItem].createTile == 29 || this.inventory[this.selectedItem].createTile == 33 || this.inventory[this.selectedItem].createTile == 49 || this.inventory[this.selectedItem].createTile == 50 || this.inventory[this.selectedItem].createTile == 103) + { + if (Main.tile[Player.tileTargetX, Player.tileTargetY + 1].nactive() && Main.tileTable[(int) Main.tile[Player.tileTargetX, Player.tileTargetY + 1].type]) + canPlace = true; + } + else if (this.inventory[this.selectedItem].createTile == 275 || this.inventory[this.selectedItem].createTile == 276 || this.inventory[this.selectedItem].createTile == 277) + canPlace = true; + else if (this.inventory[this.selectedItem].createTile == 51 || this.inventory[this.selectedItem].createTile == 330 || this.inventory[this.selectedItem].createTile == 331 || this.inventory[this.selectedItem].createTile == 332 || this.inventory[this.selectedItem].createTile == 333 || this.inventory[this.selectedItem].createTile == 336 || this.inventory[this.selectedItem].createTile == 340 || this.inventory[this.selectedItem].createTile == 342 || this.inventory[this.selectedItem].createTile == 341 || this.inventory[this.selectedItem].createTile == 343 || this.inventory[this.selectedItem].createTile == 344 || this.inventory[this.selectedItem].createTile == 379 || this.inventory[this.selectedItem].createTile == 351) + { + if (Main.tile[Player.tileTargetX + 1, Player.tileTargetY].active() || Main.tile[Player.tileTargetX + 1, Player.tileTargetY].wall > (ushort) 0 || Main.tile[Player.tileTargetX - 1, Player.tileTargetY].active() || Main.tile[Player.tileTargetX - 1, Player.tileTargetY].wall > (ushort) 0 || Main.tile[Player.tileTargetX, Player.tileTargetY + 1].active() || Main.tile[Player.tileTargetX, Player.tileTargetY + 1].wall > (ushort) 0 || Main.tile[Player.tileTargetX, Player.tileTargetY - 1].active() || Main.tile[Player.tileTargetX, Player.tileTargetY - 1].wall > (ushort) 0) + canPlace = true; + } + else if (this.inventory[this.selectedItem].createTile == 314) + { + for (int index1 = Player.tileTargetX - 1; index1 <= Player.tileTargetX + 1; ++index1) + { + for (int index2 = Player.tileTargetY - 1; index2 <= Player.tileTargetY + 1; ++index2) + { + Tile tile = Main.tile[index1, index2]; + if (tile.active() || tile.wall > (ushort) 0) + { + canPlace = true; + break; + } + } + } + } + else + { + Tile tile1 = Main.tile[Player.tileTargetX - 1, Player.tileTargetY]; + Tile tile2 = Main.tile[Player.tileTargetX + 1, Player.tileTargetY]; + Tile tile3 = Main.tile[Player.tileTargetX, Player.tileTargetY - 1]; + Tile tile4 = Main.tile[Player.tileTargetX, Player.tileTargetY + 1]; + if (tile2.active() && (Main.tileSolid[(int) tile2.type] || Main.tileRope[(int) tile2.type] || tile2.type == (ushort) 314) || tile2.wall > (ushort) 0 || tile1.active() && (Main.tileSolid[(int) tile1.type] || Main.tileRope[(int) tile1.type] || tile1.type == (ushort) 314) || tile1.wall > (ushort) 0 || tile4.active() && (Main.tileSolid[(int) tile4.type] || TileID.Sets.IsBeam[(int) tile4.type] || Main.tileRope[(int) tile4.type] || tile4.type == (ushort) 314) || tile4.wall > (ushort) 0 || tile3.active() && (Main.tileSolid[(int) tile3.type] || TileID.Sets.IsBeam[(int) tile3.type] || Main.tileRope[(int) tile3.type] || tile3.type == (ushort) 314) || tile3.wall > (ushort) 0) + canPlace = true; + else if (Main.tile[Player.tileTargetX, Player.tileTargetY].wall > (ushort) 0) + canPlace = true; + } + if (this.inventory[this.selectedItem].type == 213 && Main.tile[Player.tileTargetX, Player.tileTargetY].active()) + { + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + if (Main.tile[tileTargetX, tileTargetY].type == (ushort) 3 || Main.tile[tileTargetX, tileTargetY].type == (ushort) 73 || Main.tile[tileTargetX, tileTargetY].type == (ushort) 84) + { + WorldGen.KillTile(Player.tileTargetX, Player.tileTargetY); + if (!Main.tile[Player.tileTargetX, Player.tileTargetY].active() && Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + else if (Main.tile[tileTargetX, tileTargetY].type == (ushort) 83) + { + bool flag = false; + int num = (int) Main.tile[tileTargetX, tileTargetY].frameX / 18; + if (num == 0 && Main.dayTime) + flag = true; + if (num == 1 && !Main.dayTime) + flag = true; + if (num == 3 && !Main.dayTime && (Main.bloodMoon || Main.moonPhase == 0)) + flag = true; + if (num == 4 && (Main.raining || (double) Main.cloudAlpha > 0.0)) + flag = true; + if (num == 5 && !Main.raining && Main.dayTime && Main.time > 40500.0) + flag = true; + if (flag) + { + WorldGen.KillTile(Player.tileTargetX, Player.tileTargetY); + NetMessage.SendData(17, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + } + } + if (Main.tileAlch[this.inventory[this.selectedItem].createTile]) + canPlace = true; + if (Main.tile[Player.tileTargetX, Player.tileTargetY].active() && (Main.tileCut[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type] || TileID.Sets.BreakableWhenPlacing[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type] || Main.tile[Player.tileTargetX, Player.tileTargetY].type >= (ushort) 373 && Main.tile[Player.tileTargetX, Player.tileTargetY].type <= (ushort) 375 || Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 461)) + { + if ((int) Main.tile[Player.tileTargetX, Player.tileTargetY].type != this.inventory[this.selectedItem].createTile) + { + int num = Main.tile[Player.tileTargetX, Player.tileTargetY + 1].type == (ushort) 78 || Main.tile[Player.tileTargetX, Player.tileTargetY + 1].type == (ushort) 380 ? 0 : (Main.tile[Player.tileTargetX, Player.tileTargetY + 1].type != (ushort) 579 ? 1 : 0); + bool flag1 = Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 3 || Main.tile[Player.tileTargetX, Player.tileTargetY].type == (ushort) 73; + bool flag2 = Main.tileAlch[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type] && WorldGen.IsHarvestableHerbWithSeed((int) Main.tile[Player.tileTargetX, Player.tileTargetY].type, (int) Main.tile[Player.tileTargetX, Player.tileTargetY].frameX / 18); + bool flag3 = Main.tileAlch[this.inventory[this.selectedItem].createTile]; + if (num != 0 || (flag1 | flag2) & flag3) + { + WorldGen.KillTile(Player.tileTargetX, Player.tileTargetY); + if (!Main.tile[Player.tileTargetX, Player.tileTargetY].active() && Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + else + canPlace = false; + } + else + canPlace = false; + } + if (!canPlace && this.inventory[this.selectedItem].createTile >= 0 && TileID.Sets.Platforms[this.inventory[this.selectedItem].createTile]) + { + for (int index3 = Player.tileTargetX - 1; index3 <= Player.tileTargetX + 1; ++index3) + { + for (int index4 = Player.tileTargetY - 1; index4 <= Player.tileTargetY + 1; ++index4) + { + if (Main.tile[index3, index4].active()) + { + canPlace = true; + break; + } + } + } + } + if (this.inventory[this.selectedItem].createTile == 3) + { + canPlace = WorldGen.IsFitToPlaceFlowerIn(Player.tileTargetX, Player.tileTargetY, 3); + if (canPlace) + { + WorldGen.KillTile(Player.tileTargetX, Player.tileTargetY); + if (Main.netMode == 1 && !Main.tile[Player.tileTargetX, Player.tileTargetY].active()) + NetMessage.SendData(17, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + } + return canPlace; + } + + private static void PlaceThing_Tiles_BlockPlacementForRepeatedPumpkins( + ref bool canPlace, + ref TileObject data) + { + if (data.type != 254) + return; + for (int index1 = -1; index1 < 1; ++index1) + { + for (int index2 = -1; index2 < 1; ++index2) + { + if (!WorldGen.CanCutTile(Player.tileTargetX + index2, Player.tileTargetY + index1, TileCuttingContext.TilePlacement)) + canPlace = false; + } + } + } + + private static void PlaceThing_Tiles_BlockPlacementForRepeatedCoralAndBeachPiles( + ref bool canPlace, + ref TileObject data) + { + if (data.type != 81 && data.type != 324) + return; + Tile tile = Main.tile[Player.tileTargetX, Player.tileTargetY]; + if (!tile.active() || !Main.tileCut[(int) tile.type] && !TileID.Sets.BreakableWhenPlacing[(int) tile.type] && (tile.type < (ushort) 373 || tile.type > (ushort) 375) && tile.type != (ushort) 461) + return; + canPlace = false; + } + + private static void PlaceThing_Tiles_BlockPlacementForRepeatedPigronatas( + ref bool canPlace, + ref TileObject data) + { + if (data.type != 454) + return; + for (int index = -2; index < 2; ++index) + { + Tile tile = Main.tile[Player.tileTargetX + index, Player.tileTargetY]; + if (tile.active() && tile.type == (ushort) 454) + canPlace = false; + } + } + + private static void PlaceThing_Tiles_BlockPlacementIfOverPlayers( + ref bool canPlace, + ref TileObject data) + { + int width = 0; + int height = 0; + int x = 0; + int y = 0; + switch (data.type) + { + case 138: + width = 32; + height = 32; + x = data.xCoord * 16; + y = data.yCoord * 16; + break; + case 235: + width = 48; + height = 16; + x = data.xCoord * 16; + y = data.yCoord * 16; + break; + case 387: + width = 32; + height = 16; + x = data.xCoord * 16; + y = data.yCoord * 16; + break; + case 476: + width = 16; + height = 16; + x = data.xCoord * 16; + y = data.yCoord * 16; + break; + case 484: + width = 32; + height = 32; + x = data.xCoord * 16; + y = data.yCoord * 16; + break; + } + if (width == 0 || height == 0) + return; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(x, y, width, height); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + Player player = Main.player[index]; + if (player.active && !player.dead && player.Hitbox.Intersects(rectangle)) + { + canPlace = false; + break; + } + } + } + + private bool PlaceThing_Tiles_CheckLavaBlocking() + { + bool flag = false; + if (Main.tile[Player.tileTargetX, Player.tileTargetY].liquid > (byte) 0 && Main.tile[Player.tileTargetX, Player.tileTargetY].lava()) + { + if (Main.tileSolid[this.inventory[this.selectedItem].createTile]) + flag = true; + else if (!TileObjectData.CheckLiquidPlacement(this.inventory[this.selectedItem].createTile, this.inventory[this.selectedItem].placeStyle, Main.tile[Player.tileTargetX, Player.tileTargetY])) + flag = true; + } + return flag; + } + + private bool PlaceThing_Tiles_CheckRopeUsability(bool canUse) + { + if (Main.tileRope[this.inventory[this.selectedItem].createTile] && canUse && Main.tile[Player.tileTargetX, Player.tileTargetY].active() && Main.tileRope[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type]) + { + int tileTargetY = Player.tileTargetY; + int tileTargetX = Player.tileTargetX; + int createTile = this.inventory[this.selectedItem].createTile; + while (Main.tile[tileTargetX, tileTargetY].active() && Main.tileRope[(int) Main.tile[tileTargetX, tileTargetY].type] && tileTargetY < Main.maxTilesX - 5 && Main.tile[tileTargetX, tileTargetY + 2] != null && !Main.tile[tileTargetX, tileTargetY + 1].lava()) + { + ++tileTargetY; + if (Main.tile[tileTargetX, tileTargetY] == null) + { + canUse = false; + tileTargetY = Player.tileTargetY; + break; + } + } + if (!Main.tile[tileTargetX, tileTargetY].active()) + Player.tileTargetY = tileTargetY; + } + return canUse; + } + + private bool PlaceThing_Tiles_CheckWandUsability(bool canUse) + { + if (this.inventory[this.selectedItem].tileWand > 0) + { + int tileWand = this.inventory[this.selectedItem].tileWand; + canUse = false; + for (int index = 0; index < 58; ++index) + { + if (tileWand == this.inventory[index].type && this.inventory[index].stack > 0) + { + canUse = true; + break; + } + } + } + return canUse; + } + + private bool PlaceThing_Tiles_CheckGamepadTorchUsability(bool canUse) + { + if (PlayerInput.UsingGamepad && this.inventory[this.selectedItem].createTile == 4 && Main.SmartCursorEnabled && !Main.SmartCursorShowing) + canUse = false; + return canUse; + } + + private void PlaceThing_ItemInExtractinator() + { + if (ItemID.Sets.ExtractinatorMode[this.inventory[this.selectedItem].type] < 0 || !Main.tile[Player.tileTargetX, Player.tileTargetY].active() || Main.tile[Player.tileTargetX, Player.tileTargetY].type != (ushort) 219 || (double) this.position.X / 16.0 - (double) Player.tileRangeX - (double) this.inventory[this.selectedItem].tileBoost - (double) this.blockRange > (double) Player.tileTargetX || ((double) this.position.X + (double) this.width) / 16.0 + (double) Player.tileRangeX + (double) this.inventory[this.selectedItem].tileBoost - 1.0 + (double) this.blockRange < (double) Player.tileTargetX || (double) this.position.Y / 16.0 - (double) Player.tileRangeY - (double) this.inventory[this.selectedItem].tileBoost - (double) this.blockRange > (double) Player.tileTargetY || ((double) this.position.Y + (double) this.height) / 16.0 + (double) Player.tileRangeY + (double) this.inventory[this.selectedItem].tileBoost - 2.0 + (double) this.blockRange < (double) Player.tileTargetY || !this.ItemTimeIsZero || this.itemAnimation <= 0 || !this.controlUseItem) + return; + this.ApplyItemTime(this.inventory[this.selectedItem]); + SoundEngine.PlaySound(7); + this.ExtractinatorUse(ItemID.Sets.ExtractinatorMode[this.inventory[this.selectedItem].type]); + } + + private void PlaceThing_XMasTreeTops() + { + if (this.inventory[this.selectedItem].type < 1874 || this.inventory[this.selectedItem].type > 1905 || !Main.tile[Player.tileTargetX, Player.tileTargetY].active() || Main.tile[Player.tileTargetX, Player.tileTargetY].type != (ushort) 171 || (double) this.position.X / 16.0 - (double) Player.tileRangeX - (double) this.inventory[this.selectedItem].tileBoost - (double) this.blockRange > (double) Player.tileTargetX || ((double) this.position.X + (double) this.width) / 16.0 + (double) Player.tileRangeX + (double) this.inventory[this.selectedItem].tileBoost - 1.0 + (double) this.blockRange < (double) Player.tileTargetX || (double) this.position.Y / 16.0 - (double) Player.tileRangeY - (double) this.inventory[this.selectedItem].tileBoost - (double) this.blockRange > (double) Player.tileTargetY || ((double) this.position.Y + (double) this.height) / 16.0 + (double) Player.tileRangeY + (double) this.inventory[this.selectedItem].tileBoost - 2.0 + (double) this.blockRange < (double) Player.tileTargetY || !this.ItemTimeIsZero || this.itemAnimation <= 0 || !this.controlUseItem) + return; + int type = this.inventory[this.selectedItem].type; + if (type >= 1874 && type <= 1877) + { + int style = type - 1873; + if (WorldGen.checkXmasTreeDrop(Player.tileTargetX, Player.tileTargetY, 0) == style) + return; + this.ApplyItemTime(this.inventory[this.selectedItem]); + WorldGen.dropXmasTree(Player.tileTargetX, Player.tileTargetY, 0); + WorldGen.setXmasTree(Player.tileTargetX, Player.tileTargetY, 0, style); + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + if (Main.tile[Player.tileTargetX, Player.tileTargetY].frameX < (short) 10) + { + tileTargetX -= (int) Main.tile[Player.tileTargetX, Player.tileTargetY].frameX; + tileTargetY -= (int) Main.tile[Player.tileTargetX, Player.tileTargetY].frameY; + } + NetMessage.SendTileSquare(-1, tileTargetX, tileTargetY, 1); + } + else if (type >= 1878 && type <= 1883) + { + int style = type - 1877; + if (WorldGen.checkXmasTreeDrop(Player.tileTargetX, Player.tileTargetY, 1) == style) + return; + this.ApplyItemTime(this.inventory[this.selectedItem]); + WorldGen.dropXmasTree(Player.tileTargetX, Player.tileTargetY, 1); + WorldGen.setXmasTree(Player.tileTargetX, Player.tileTargetY, 1, style); + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + if (Main.tile[Player.tileTargetX, Player.tileTargetY].frameX < (short) 10) + { + tileTargetX -= (int) Main.tile[Player.tileTargetX, Player.tileTargetY].frameX; + tileTargetY -= (int) Main.tile[Player.tileTargetX, Player.tileTargetY].frameY; + } + NetMessage.SendTileSquare(-1, tileTargetX, tileTargetY, 1); + } + else if (type >= 1884 && type <= 1894) + { + int style = type - 1883; + if (WorldGen.checkXmasTreeDrop(Player.tileTargetX, Player.tileTargetY, 2) == style) + return; + this.ApplyItemTime(this.inventory[this.selectedItem]); + WorldGen.dropXmasTree(Player.tileTargetX, Player.tileTargetY, 2); + WorldGen.setXmasTree(Player.tileTargetX, Player.tileTargetY, 2, style); + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + if (Main.tile[Player.tileTargetX, Player.tileTargetY].frameX < (short) 10) + { + tileTargetX -= (int) Main.tile[Player.tileTargetX, Player.tileTargetY].frameX; + tileTargetY -= (int) Main.tile[Player.tileTargetX, Player.tileTargetY].frameY; + } + NetMessage.SendTileSquare(-1, tileTargetX, tileTargetY, 1); + } + else + { + if (type < 1895 || type > 1905) + return; + int style = type - 1894; + if (WorldGen.checkXmasTreeDrop(Player.tileTargetX, Player.tileTargetY, 3) == style) + return; + this.ApplyItemTime(this.inventory[this.selectedItem]); + WorldGen.dropXmasTree(Player.tileTargetX, Player.tileTargetY, 3); + WorldGen.setXmasTree(Player.tileTargetX, Player.tileTargetY, 3, style); + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + if (Main.tile[Player.tileTargetX, Player.tileTargetY].frameX < (short) 10) + { + tileTargetX -= (int) Main.tile[Player.tileTargetX, Player.tileTargetY].frameX; + tileTargetY -= (int) Main.tile[Player.tileTargetX, Player.tileTargetY].frameY; + } + NetMessage.SendTileSquare(-1, tileTargetX, tileTargetY, 1); + } + } + + private void PlaceThing_CannonBall() + { + if (this.inventory[this.selectedItem].type != 929 && this.inventory[this.selectedItem].type != 1338 && this.inventory[this.selectedItem].type != 1345 || (double) this.position.X / 16.0 - (double) Player.tileRangeX - (double) this.inventory[this.selectedItem].tileBoost - (double) this.blockRange > (double) Player.tileTargetX || ((double) this.position.X + (double) this.width) / 16.0 + (double) Player.tileRangeX + (double) this.inventory[this.selectedItem].tileBoost - 1.0 + (double) this.blockRange < (double) Player.tileTargetX || (double) this.position.Y / 16.0 - (double) Player.tileRangeY - (double) this.inventory[this.selectedItem].tileBoost - (double) this.blockRange > (double) Player.tileTargetY || ((double) this.position.Y + (double) this.height) / 16.0 + (double) Player.tileRangeY + (double) this.inventory[this.selectedItem].tileBoost - 2.0 + (double) this.blockRange < (double) Player.tileTargetY) + return; + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + if (!Main.tile[tileTargetX, tileTargetY].active() || Main.tile[tileTargetX, tileTargetY].type != (ushort) 209) + return; + this.ShootFromCannon(tileTargetX, tileTargetY); + } + + private void PlaceThing_PaintScrapper() + { + if (!ItemID.Sets.IsPaintScraper[this.inventory[this.selectedItem].type] || (double) this.position.X / 16.0 - (double) Player.tileRangeX - (double) this.inventory[this.selectedItem].tileBoost - (double) this.blockRange > (double) Player.tileTargetX || ((double) this.position.X + (double) this.width) / 16.0 + (double) Player.tileRangeX + (double) this.inventory[this.selectedItem].tileBoost - 1.0 + (double) this.blockRange < (double) Player.tileTargetX || (double) this.position.Y / 16.0 - (double) Player.tileRangeY - (double) this.inventory[this.selectedItem].tileBoost - (double) this.blockRange > (double) Player.tileTargetY || ((double) this.position.Y + (double) this.height) / 16.0 + (double) Player.tileRangeY + (double) this.inventory[this.selectedItem].tileBoost - 2.0 + (double) this.blockRange < (double) Player.tileTargetY) + return; + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + if (Main.tile[tileTargetX, tileTargetY] == null) + return; + if (Main.tile[tileTargetX, tileTargetY].wallColor() > (byte) 0 && Main.tile[tileTargetX, tileTargetY].wall > (ushort) 0 || Main.tile[tileTargetX, tileTargetY].color() > (byte) 0 && Main.tile[tileTargetX, tileTargetY].active()) + { + this.cursorItemIconEnabled = true; + if (this.ItemTimeIsZero && this.itemAnimation > 0 && this.controlUseItem) + { + if (Main.tile[tileTargetX, tileTargetY].color() > (byte) 0 && Main.tile[tileTargetX, tileTargetY].active() && WorldGen.paintTile(tileTargetX, tileTargetY, (byte) 0, true)) + this.ApplyItemTime(this.inventory[this.selectedItem], this.tileSpeed); + else if (Main.tile[tileTargetX, tileTargetY].wallColor() > (byte) 0 && Main.tile[tileTargetX, tileTargetY].wall > (ushort) 0 && WorldGen.paintWall(tileTargetX, tileTargetY, (byte) 0, true)) + this.ApplyItemTime(this.inventory[this.selectedItem], this.wallSpeed); + } + } + if (Main.tile[tileTargetX, tileTargetY].type != (ushort) 184) + return; + this.cursorItemIconEnabled = true; + if (!this.ItemTimeIsZero || this.itemAnimation <= 0 || !this.controlUseItem) + return; + int type = (int) Main.tile[tileTargetX, tileTargetY].type; + int frameX = (int) Main.tile[tileTargetX, tileTargetY].frameX; + WorldGen.KillTile(tileTargetX, tileTargetY); + if (Main.tile[tileTargetX, tileTargetY].active()) + return; + this.ApplyItemTime(this.inventory[this.selectedItem]); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) tileTargetX), number3: ((float) tileTargetY)); + if (Main.rand.Next(9) != 0) + return; + int Type = 4349 + frameX / 22; + switch (frameX / 22) + { + case 6: + Type = 4377; + break; + case 7: + Type = 4378; + break; + case 8: + Type = 4389; + break; + } + NetMessage.SendData(21, number: Item.NewItem(tileTargetX * 16, tileTargetY * 16, 16, 16, Type), number2: 1f); + } + + private void PlaceThing_PaintRoller() + { + if (this.inventory[this.selectedItem].type != 1072 && this.inventory[this.selectedItem].type != 1544 || (double) this.position.X / 16.0 - (double) Player.tileRangeX - (double) this.inventory[this.selectedItem].tileBoost - (double) this.blockRange > (double) Player.tileTargetX || ((double) this.position.X + (double) this.width) / 16.0 + (double) Player.tileRangeX + (double) this.inventory[this.selectedItem].tileBoost - 1.0 + (double) this.blockRange < (double) Player.tileTargetX || (double) this.position.Y / 16.0 - (double) Player.tileRangeY - (double) this.inventory[this.selectedItem].tileBoost - (double) this.blockRange > (double) Player.tileTargetY || ((double) this.position.Y + (double) this.height) / 16.0 + (double) Player.tileRangeY + (double) this.inventory[this.selectedItem].tileBoost - 2.0 + (double) this.blockRange < (double) Player.tileTargetY) + return; + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + if (Main.tile[tileTargetX, tileTargetY] == null || Main.tile[tileTargetX, tileTargetY].wall <= (ushort) 0) + return; + this.cursorItemIconEnabled = true; + if (!this.ItemTimeIsZero || this.itemAnimation <= 0 || !this.controlUseItem) + return; + this.TryPainting(tileTargetX, tileTargetY, true); + } + + private void PlaceThing_Paintbrush() + { + if (this.inventory[this.selectedItem].type != 1071 && this.inventory[this.selectedItem].type != 1543 || (double) this.position.X / 16.0 - (double) Player.tileRangeX - (double) this.inventory[this.selectedItem].tileBoost - (double) this.blockRange > (double) Player.tileTargetX || ((double) this.position.X + (double) this.width) / 16.0 + (double) Player.tileRangeX + (double) this.inventory[this.selectedItem].tileBoost - 1.0 + (double) this.blockRange < (double) Player.tileTargetX || (double) this.position.Y / 16.0 - (double) Player.tileRangeY - (double) this.inventory[this.selectedItem].tileBoost - (double) this.blockRange > (double) Player.tileTargetY || ((double) this.position.Y + (double) this.height) / 16.0 + (double) Player.tileRangeY + (double) this.inventory[this.selectedItem].tileBoost - 2.0 + (double) this.blockRange < (double) Player.tileTargetY) + return; + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + if (Main.tile[tileTargetX, tileTargetY] == null || !Main.tile[tileTargetX, tileTargetY].active()) + return; + this.cursorItemIconEnabled = true; + if (!this.ItemTimeIsZero || this.itemAnimation <= 0 || !this.controlUseItem) + return; + this.TryPainting(tileTargetX, tileTargetY); + } + + private void TryPainting(int x, int y, bool paintingAWall = false, bool applyItemAnimation = true) + { + byte color = byte.MaxValue; + Item obj = (Item) null; + for (int index = 54; index < 58; ++index) + { + if (this.inventory[index].stack > 0 && this.inventory[index].paint > (byte) 0) + { + obj = this.inventory[index]; + color = obj.paint; + break; + } + } + if (color == byte.MaxValue) + { + for (int index = 0; index < 58; ++index) + { + if (this.inventory[index].stack > 0 && this.inventory[index].paint > (byte) 0) + { + obj = this.inventory[index]; + color = obj.paint; + break; + } + } + } + if (paintingAWall) + { + if (color == byte.MaxValue || (int) Main.tile[x, y].wallColor() == (int) color || !WorldGen.paintWall(x, y, color, true)) + return; + --obj.stack; + if (obj.stack <= 0) + obj.SetDefaults(); + if (!applyItemAnimation) + return; + this.ApplyItemTime(this.inventory[this.selectedItem], this.wallSpeed); + } + else + { + if (color == byte.MaxValue || (int) Main.tile[x, y].color() == (int) color || !WorldGen.paintTile(x, y, color, true)) + return; + --obj.stack; + if (obj.stack <= 0) + obj.SetDefaults(); + if (!applyItemAnimation) + return; + this.ApplyItemTime(this.inventory[this.selectedItem], this.tileSpeed); + } + } + + private void ShootFromCannon(int x, int y) + { + int ammo = 0; + if (Main.tile[x, y].frameX < (short) 72) + { + if (this.inventory[this.selectedItem].type == 929) + ammo = 1; + } + else if (Main.tile[x, y].frameX < (short) 144) + { + if (this.inventory[this.selectedItem].type == 1338) + ammo = 2; + } + else if (Main.tile[x, y].frameX < (short) 288 && this.inventory[this.selectedItem].type == 1345) + ammo = 3; + if (ammo <= 0) + return; + this.cursorItemIconEnabled = true; + if (!this.ItemTimeIsZero || this.itemAnimation <= 0 || !this.controlUseItem) + return; + int num1 = (int) Main.tile[x, y].frameX / 18; + int num2 = 0; + int angle = 0; + for (; num1 >= 4; num1 -= 4) + ++num2; + int x1 = x - num1; + int num3; + for (num3 = (int) Main.tile[x, y].frameY / 18; num3 >= 3; num3 -= 3) + ++angle; + int y1 = y - num3; + this.ApplyItemTime(this.inventory[this.selectedItem]); + WorldGen.ShootFromCannon(x1, y1, angle, ammo, this.inventory[this.selectedItem].damage, 8f, Main.myPlayer); + } + + private void ExtractinatorUse(int extractType) + { + int maxValue1 = 5000; + int maxValue2 = 25; + int maxValue3 = 50; + int maxValue4 = -1; + if (extractType == 1) + { + maxValue1 /= 3; + maxValue2 *= 2; + maxValue3 = 20; + maxValue4 = 10; + } + int Stack = 1; + int Type; + if (maxValue4 != -1 && Main.rand.Next(maxValue4) == 0) + { + Type = 3380; + if (Main.rand.Next(5) == 0) + Stack += Main.rand.Next(2); + if (Main.rand.Next(10) == 0) + Stack += Main.rand.Next(3); + if (Main.rand.Next(15) == 0) + Stack += Main.rand.Next(4); + } + else if (Main.rand.Next(2) == 0) + { + if (Main.rand.Next(12000) == 0) + { + Type = 74; + if (Main.rand.Next(14) == 0) + Stack += Main.rand.Next(0, 2); + if (Main.rand.Next(14) == 0) + Stack += Main.rand.Next(0, 2); + if (Main.rand.Next(14) == 0) + Stack += Main.rand.Next(0, 2); + } + else if (Main.rand.Next(800) == 0) + { + Type = 73; + if (Main.rand.Next(6) == 0) + Stack += Main.rand.Next(1, 21); + if (Main.rand.Next(6) == 0) + Stack += Main.rand.Next(1, 21); + if (Main.rand.Next(6) == 0) + Stack += Main.rand.Next(1, 21); + if (Main.rand.Next(6) == 0) + Stack += Main.rand.Next(1, 21); + if (Main.rand.Next(6) == 0) + Stack += Main.rand.Next(1, 20); + } + else if (Main.rand.Next(60) == 0) + { + Type = 72; + if (Main.rand.Next(4) == 0) + Stack += Main.rand.Next(5, 26); + if (Main.rand.Next(4) == 0) + Stack += Main.rand.Next(5, 26); + if (Main.rand.Next(4) == 0) + Stack += Main.rand.Next(5, 26); + if (Main.rand.Next(4) == 0) + Stack += Main.rand.Next(5, 25); + } + else + { + Type = 71; + if (Main.rand.Next(3) == 0) + Stack += Main.rand.Next(10, 26); + if (Main.rand.Next(3) == 0) + Stack += Main.rand.Next(10, 26); + if (Main.rand.Next(3) == 0) + Stack += Main.rand.Next(10, 26); + if (Main.rand.Next(3) == 0) + Stack += Main.rand.Next(10, 25); + } + } + else if (maxValue1 != -1 && Main.rand.Next(maxValue1) == 0) + Type = 1242; + else if (maxValue2 != -1 && Main.rand.Next(maxValue2) == 0) + { + switch (Main.rand.Next(6)) + { + case 0: + Type = 181; + break; + case 1: + Type = 180; + break; + case 2: + Type = 177; + break; + case 3: + Type = 179; + break; + case 4: + Type = 178; + break; + default: + Type = 182; + break; + } + if (Main.rand.Next(20) == 0) + Stack += Main.rand.Next(0, 2); + if (Main.rand.Next(30) == 0) + Stack += Main.rand.Next(0, 3); + if (Main.rand.Next(40) == 0) + Stack += Main.rand.Next(0, 4); + if (Main.rand.Next(50) == 0) + Stack += Main.rand.Next(0, 5); + if (Main.rand.Next(60) == 0) + Stack += Main.rand.Next(0, 6); + } + else if (maxValue3 != -1 && Main.rand.Next(maxValue3) == 0) + { + Type = 999; + if (Main.rand.Next(20) == 0) + Stack += Main.rand.Next(0, 2); + if (Main.rand.Next(30) == 0) + Stack += Main.rand.Next(0, 3); + if (Main.rand.Next(40) == 0) + Stack += Main.rand.Next(0, 4); + if (Main.rand.Next(50) == 0) + Stack += Main.rand.Next(0, 5); + if (Main.rand.Next(60) == 0) + Stack += Main.rand.Next(0, 6); + } + else if (Main.rand.Next(3) == 0) + { + if (Main.rand.Next(5000) == 0) + { + Type = 74; + if (Main.rand.Next(10) == 0) + Stack += Main.rand.Next(0, 3); + if (Main.rand.Next(10) == 0) + Stack += Main.rand.Next(0, 3); + if (Main.rand.Next(10) == 0) + Stack += Main.rand.Next(0, 3); + if (Main.rand.Next(10) == 0) + Stack += Main.rand.Next(0, 3); + if (Main.rand.Next(10) == 0) + Stack += Main.rand.Next(0, 3); + } + else if (Main.rand.Next(400) == 0) + { + Type = 73; + if (Main.rand.Next(5) == 0) + Stack += Main.rand.Next(1, 21); + if (Main.rand.Next(5) == 0) + Stack += Main.rand.Next(1, 21); + if (Main.rand.Next(5) == 0) + Stack += Main.rand.Next(1, 21); + if (Main.rand.Next(5) == 0) + Stack += Main.rand.Next(1, 21); + if (Main.rand.Next(5) == 0) + Stack += Main.rand.Next(1, 20); + } + else if (Main.rand.Next(30) == 0) + { + Type = 72; + if (Main.rand.Next(3) == 0) + Stack += Main.rand.Next(5, 26); + if (Main.rand.Next(3) == 0) + Stack += Main.rand.Next(5, 26); + if (Main.rand.Next(3) == 0) + Stack += Main.rand.Next(5, 26); + if (Main.rand.Next(3) == 0) + Stack += Main.rand.Next(5, 25); + } + else + { + Type = 71; + if (Main.rand.Next(2) == 0) + Stack += Main.rand.Next(10, 26); + if (Main.rand.Next(2) == 0) + Stack += Main.rand.Next(10, 26); + if (Main.rand.Next(2) == 0) + Stack += Main.rand.Next(10, 26); + if (Main.rand.Next(2) == 0) + Stack += Main.rand.Next(10, 25); + } + } + else + { + switch (Main.rand.Next(8)) + { + case 0: + Type = 12; + break; + case 1: + Type = 11; + break; + case 2: + Type = 14; + break; + case 3: + Type = 13; + break; + case 4: + Type = 699; + break; + case 5: + Type = 700; + break; + case 6: + Type = 701; + break; + default: + Type = 702; + break; + } + if (Main.rand.Next(20) == 0) + Stack += Main.rand.Next(0, 2); + if (Main.rand.Next(30) == 0) + Stack += Main.rand.Next(0, 3); + if (Main.rand.Next(40) == 0) + Stack += Main.rand.Next(0, 4); + if (Main.rand.Next(50) == 0) + Stack += Main.rand.Next(0, 5); + if (Main.rand.Next(60) == 0) + Stack += Main.rand.Next(0, 6); + } + if (Type <= 0) + return; + Vector2 vector2 = Main.ReverseGravitySupport(Main.MouseScreen) + Main.screenPosition; + if (Main.SmartCursorEnabled || PlayerInput.UsingGamepad) + vector2 = this.Center; + int number = Item.NewItem((int) vector2.X, (int) vector2.Y, 1, 1, Type, Stack, pfix: -1); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + + public void ChangeDir(int dir) + { + if (!this.pulley || this.pulleyDir != (byte) 2) + { + this.direction = dir; + } + else + { + if (this.pulleyDir == (byte) 2 && dir == this.direction) + return; + int num = (int) ((double) this.position.X + (double) (this.width / 2)) / 16 * 16 + 8 - this.width / 2; + if (Collision.SolidCollision(new Vector2((float) num, this.position.Y), this.width, this.height)) + return; + if (this.whoAmI == Main.myPlayer) + Main.cameraX = Main.cameraX + this.position.X - (float) num; + this.pulleyDir = (byte) 1; + this.position.X = (float) num; + this.direction = dir; + } + } + + public Microsoft.Xna.Framework.Rectangle getRect() => new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height); + + private void pumpkinSword(int i, int dmg, float kb) + { + int checkScreenHeight = Main.LogicCheckScreenHeight; + int checkScreenWidth = Main.LogicCheckScreenWidth; + int num1 = Main.rand.Next(100, 300); + int num2 = Main.rand.Next(100, 300); + int num3 = Main.rand.Next(2) != 0 ? num1 + (checkScreenWidth / 2 - num1) : num1 - (checkScreenWidth / 2 + num1); + int num4 = Main.rand.Next(2) != 0 ? num2 + (checkScreenHeight / 2 - num2) : num2 - (checkScreenHeight / 2 + num2); + int num5 = num3 + (int) this.position.X; + int num6 = num4 + (int) this.position.Y; + Vector2 vector2 = new Vector2((float) num5, (float) num6); + float num7 = Main.npc[i].position.X - vector2.X; + float num8 = Main.npc[i].position.Y - vector2.Y; + float num9 = (float) (8.0 / Math.Sqrt((double) num7 * (double) num7 + (double) num8 * (double) num8)); + float SpeedX = num7 * num9; + float SpeedY = num8 * num9; + Projectile.NewProjectile((float) num5, (float) num6, SpeedX, SpeedY, 321, dmg, kb, this.whoAmI, (float) i); + } + + public void PutItemInInventoryFromItemUsage(int type, int selItem = -1) + { + for (int index = 0; index < 58; ++index) + { + Item obj = this.inventory[index]; + if (obj.stack > 0 && obj.type == type && obj.stack < obj.maxStack) + { + ++obj.stack; + return; + } + } + if (selItem >= 0 && (this.inventory[selItem].type == 0 || this.inventory[selItem].stack <= 0)) + { + this.inventory[selItem].SetDefaults(type); + } + else + { + Item newItem = new Item(); + newItem.SetDefaults(type); + if (this.GetItem(this.whoAmI, newItem, GetItemSettings.ItemCreatedFromItemUsage).stack > 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, type, noGrabDelay: true); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else + { + newItem.position.X = this.Center.X - (float) (newItem.width / 2); + newItem.position.Y = this.Center.Y - (float) (newItem.height / 2); + newItem.active = true; + PopupText.NewText(PopupTextContext.RegularItemPickup, newItem, 0); + } + } + } + + public bool SummonItemCheck() + { + int type = this.inventory[this.selectedItem].type; + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && (type == 43 && npc.type == 4 || type == 70 && npc.type == 13 || type == 560 & npc.type == 50 || type == 544 && npc.type == 125 || type == 544 && npc.type == 126 || type == 556 && npc.type == 134 || type == 557 && npc.type == (int) sbyte.MaxValue || type == 1133 && npc.type == 222 || type == 1331 && npc.type == 266 || type == 4988 && npc.type == 657)) + return false; + } + return true; + } + + public PlayerFishingConditions GetFishingConditions() + { + PlayerFishingConditions fishingConditions = new PlayerFishingConditions(); + this.Fishing_GetBestFishingPole(out fishingConditions.PolePower, out fishingConditions.PoleItemType); + this.Fishing_GetBait(out fishingConditions.BaitPower, out fishingConditions.BaitItemType); + if (fishingConditions.BaitItemType == 2673 || fishingConditions.BaitPower == 0 || fishingConditions.PolePower == 0) + return fishingConditions; + int num = fishingConditions.BaitPower + fishingConditions.PolePower + this.fishingSkill; + fishingConditions.LevelMultipliers = Player.Fishing_GetPowerMultiplier(); + fishingConditions.FinalFishingLevel = (int) ((double) num * (double) fishingConditions.LevelMultipliers); + return fishingConditions; + } + + private static float Fishing_GetPowerMultiplier() + { + float num = 1f; + if (Main.raining) + num *= 1.2f; + if ((double) Main.cloudBGAlpha > 0.0) + num *= 1.1f; + if (Main.dayTime && (Main.time < 5400.0 || Main.time > 48600.0)) + num *= 1.3f; + if (Main.dayTime && Main.time > 16200.0 && Main.time < 37800.0) + num *= 0.8f; + if (!Main.dayTime && Main.time > 6480.0 && Main.time < 25920.0) + num *= 0.8f; + if (Main.moonPhase == 0) + num *= 1.1f; + if (Main.moonPhase == 1 || Main.moonPhase == 7) + num *= 1.05f; + if (Main.moonPhase == 3 || Main.moonPhase == 5) + num *= 0.95f; + if (Main.moonPhase == 4) + num *= 0.9f; + if (Main.bloodMoon) + num *= 1.1f; + return num; + } + + private void Fishing_GetBait(out int baitPower, out int baitType) + { + baitPower = 0; + baitType = 0; + for (int index = 54; index < 58; ++index) + { + if (this.inventory[index].stack > 0 && this.inventory[index].bait > 0) + { + baitPower = this.inventory[index].bait; + baitType = this.inventory[index].type; + break; + } + } + if (baitPower != 0 || baitType != 0) + return; + for (int index = 0; index < 50; ++index) + { + if (this.inventory[index].stack > 0 && this.inventory[index].bait > 0) + { + baitPower = this.inventory[index].bait; + baitType = this.inventory[index].type; + break; + } + } + } + + private void Fishing_GetBestFishingPole(out int fishingPolePower, out int fishingPoleType) + { + fishingPolePower = this.inventory[this.selectedItem].fishingPole; + fishingPoleType = this.inventory[this.selectedItem].type; + if (fishingPolePower != 0) + return; + for (int index = 0; index < 58; ++index) + { + if (this.inventory[index].fishingPole > fishingPolePower) + { + fishingPolePower = this.inventory[index].fishingPole; + fishingPoleType = this.inventory[index].type; + } + } + } + + public bool HasUnityPotion() + { + for (int index = 0; index < 58; ++index) + { + if (this.inventory[index].type == 2997 && this.inventory[index].stack > 0) + return true; + } + return false; + } + + public void TakeUnityPotion() + { + for (int index = 0; index < 400; ++index) + { + if (this.inventory[index].type == 2997 && this.inventory[index].stack > 0) + { + --this.inventory[index].stack; + if (this.inventory[index].stack > 0) + break; + this.inventory[index].SetDefaults(); + break; + } + } + } + + public void UnityTeleport(Vector2 telePos) + { + int num = 3; + if (Main.netMode == 0) + this.Teleport(telePos, num); + else + NetMessage.SendData(65, number: 2, number2: ((float) this.whoAmI), number3: telePos.X, number4: telePos.Y, number5: num); + } + + private void PayDD2CrystalsBeforeUse(Item item) + { + int dd2CrystalsToUse = this.GetRequiredDD2CrystalsToUse(item); + for (int index = 0; index < dd2CrystalsToUse; ++index) + this.ConsumeItem(3822, true); + } + + private bool CheckDD2CrystalPaymentLock(Item item) + { + if (!DD2Event.Ongoing) + return true; + int dd2CrystalsToUse = this.GetRequiredDD2CrystalsToUse(item); + return this.CountItem(3822, dd2CrystalsToUse) >= dd2CrystalsToUse; + } + + private int GetRequiredDD2CrystalsToUse(Item item) + { + switch (item.type) + { + case 3818: + case 3819: + case 3820: + return 10; + case 3824: + case 3825: + case 3826: + return 10; + case 3829: + case 3830: + case 3831: + return 10; + case 3832: + case 3833: + case 3834: + return 10; + default: + return 0; + } + } + + public void SporeSac() + { + int Damage = 70; + float KnockBack = 1.5f; + if (Main.rand.Next(15) != 0) + return; + int num1 = 0; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == this.whoAmI && (Main.projectile[index].type == 567 || Main.projectile[index].type == 568)) + ++num1; + } + if (Main.rand.Next(15) < num1 || num1 >= 10) + return; + int num2 = 50; + int num3 = 24; + int num4 = 90; + for (int index1 = 0; index1 < num2; ++index1) + { + int num5 = Main.rand.Next(200 - index1 * 2, 400 + index1 * 2); + Vector2 center = this.Center; + center.X += (float) Main.rand.Next(-num5, num5 + 1); + center.Y += (float) Main.rand.Next(-num5, num5 + 1); + if (!Collision.SolidCollision(center, num3, num3) && !Collision.WetCollision(center, num3, num3)) + { + center.X += (float) (num3 / 2); + center.Y += (float) (num3 / 2); + if (Collision.CanHit(new Vector2(this.Center.X, this.position.Y), 1, 1, center, 1, 1) || Collision.CanHit(new Vector2(this.Center.X, this.position.Y - 50f), 1, 1, center, 1, 1)) + { + int index2 = (int) center.X / 16; + int index3 = (int) center.Y / 16; + bool flag = false; + if (Main.rand.Next(3) == 0 && Main.tile[index2, index3] != null && Main.tile[index2, index3].wall > (ushort) 0) + { + flag = true; + } + else + { + center.X -= (float) (num4 / 2); + center.Y -= (float) (num4 / 2); + if (Collision.SolidCollision(center, num4, num4)) + { + center.X += (float) (num4 / 2); + center.Y += (float) (num4 / 2); + flag = true; + } + else if (Main.tile[index2, index3] != null && Main.tile[index2, index3].active() && Main.tile[index2, index3].type == (ushort) 19) + flag = true; + } + if (flag) + { + for (int index4 = 0; index4 < 1000; ++index4) + { + if (Main.projectile[index4].active && Main.projectile[index4].owner == this.whoAmI && Main.projectile[index4].aiStyle == 105 && (double) (center - Main.projectile[index4].Center).Length() < 48.0) + { + flag = false; + break; + } + } + if (flag && Main.myPlayer == this.whoAmI) + { + Projectile.NewProjectile(center.X, center.Y, 0.0f, 0.0f, 567 + Main.rand.Next(2), Damage, KnockBack, this.whoAmI); + break; + } + } + } + } + } + } + + public void VolatileGelatin() + { + if (Main.myPlayer != this.whoAmI) + return; + ++this.volatileGelatinCounter; + if (this.volatileGelatinCounter <= 50) + return; + this.volatileGelatinCounter = 0; + int Damage = 65; + float KnockBack = 7f; + float num1 = 640f; + NPC npc1 = (NPC) null; + for (int index = 0; index < 200; ++index) + { + NPC npc2 = Main.npc[index]; + if (npc2 != null && npc2.active && npc2.CanBeChasedBy((object) this) && Collision.CanHit((Entity) this, (Entity) npc2)) + { + float num2 = Vector2.Distance(npc2.Center, this.Center); + if ((double) num2 < (double) num1) + { + num1 = num2; + npc1 = npc2; + } + } + } + if (npc1 == null) + return; + Vector2 vector2 = (npc1.Center - this.Center).SafeNormalize(Vector2.Zero) * 6f; + vector2.Y -= 2f; + Projectile.NewProjectile(this.Center.X, this.Center.Y, vector2.X, vector2.Y, 937, Damage, KnockBack, this.whoAmI); + } + + public bool CanHit(Entity ent) => Collision.CanHit(this.position, this.width, this.height, ent.position, ent.width, ent.height) || Collision.CanHitLine(this.Center + new Vector2((float) (this.direction * this.width / 2), (float) ((double) this.gravDir * (double) -this.height / 3.0)), 0, 0, ent.Center + new Vector2(0.0f, (float) (-ent.height / 3)), 0, 0) || Collision.CanHitLine(this.Center + new Vector2((float) (this.direction * this.width / 2), (float) ((double) this.gravDir * (double) -this.height / 3.0)), 0, 0, ent.Center, 0, 0) || Collision.CanHitLine(this.Center + new Vector2((float) (this.direction * this.width / 2), 0.0f), 0, 0, ent.Center + new Vector2(0.0f, (float) (ent.height / 3)), 0, 0); + + public Microsoft.Xna.Framework.Rectangle GetItemDrawFrame(int type) + { + Main.instance.LoadItem(type); + return type == 75 ? TextureAssets.Item[type].Frame(verticalFrames: 8) : TextureAssets.Item[type].Frame(); + } + + public void ItemCheck(int i) + { + if (this.CCed) + { + this.channel = false; + this.itemAnimation = this.itemAnimationMax = 0; + } + else + { + bool consumptionFailed = false; + float offsetHitboxCenter = this.HeightOffsetHitboxCenter; + Item sItem1 = this.inventory[this.selectedItem]; + if (Main.myPlayer == i && PlayerInput.ShouldFastUseItem) + this.controlUseItem = true; + this.ItemCheck_HandleMount(); + int weaponDamage = this.GetWeaponDamage(sItem1); + this.ItemCheck_HandleMPItemAnimation(sItem1); + this.ItemCheck_HackHoldStyles(sItem1); + if (this.itemAnimation < 0) + this.itemAnimation = 0; + if (this.itemTime < 0) + this.itemTime = 0; + if (this.itemAnimation == 0 && this.reuseDelay > 0) + this.ApplyReuseDelay(); + if (Main.myPlayer == i && this.itemAnimation == 0 && TileObjectData.CustomPlace(sItem1.createTile, sItem1.placeStyle)) + TileObject.CanPlace(Player.tileTargetX, Player.tileTargetY, sItem1.createTile, sItem1.placeStyle, this.direction, out TileObject _, true); + if (this.itemAnimation == 0 && this.altFunctionUse == 2) + this.altFunctionUse = 0; + bool flag1 = true; + if ((double) this.gravDir == -1.0 && GolfHelper.IsPlayerHoldingClub(this)) + flag1 = false; + if (flag1 && this.controlUseItem && this.releaseUseItem && this.itemAnimation == 0 && sItem1.useStyle != 0) + { + if (this.altFunctionUse == 1) + this.altFunctionUse = 2; + if (sItem1.shoot == 0) + this.itemRotation = 0.0f; + bool flag2 = this.ItemCheck_CheckCanUse(sItem1); + if (sItem1.potion & flag2) + this.ApplyPotionDelay(sItem1); + if (sItem1.mana > 0 & flag2 && this.whoAmI == Main.myPlayer && sItem1.buffType != 0 && sItem1.buffTime != 0) + this.AddBuff(sItem1.buffType, sItem1.buffTime); + if ((sItem1.shoot <= 0 || !ProjectileID.Sets.MinionTargettingFeature[sItem1.shoot] ? 0 : (this.altFunctionUse == 2 ? 1 : 0)) == 0) + this.ItemCheck_ApplyPetBuffs(sItem1); + if (this.whoAmI == Main.myPlayer && (double) this.gravDir == 1.0 && sItem1.mountType != -1 && this.mount.CanMount(sItem1.mountType, this)) + this.mount.SetMount(sItem1.mountType, this); + if ((sItem1.shoot <= 0 || !ProjectileID.Sets.MinionTargettingFeature[sItem1.shoot] ? 0 : (this.altFunctionUse == 2 ? 1 : 0)) == 0 & flag2 && this.whoAmI == Main.myPlayer && sItem1.shoot >= 0 && sItem1.shoot < 950 && (ProjectileID.Sets.LightPet[sItem1.shoot] || Main.projPet[sItem1.shoot])) + this.FreeUpPetsAndMinions(sItem1); + if (flag2) + this.ItemCheck_StartActualUse(sItem1); + } + if (!this.controlUseItem) + this.channel = false; + Item sItem2 = this.itemAnimation > 0 ? this.lastVisualizedSelectedItem : sItem1; + Microsoft.Xna.Framework.Rectangle drawHitbox = Item.GetDrawHitbox(sItem2.type, this); + this.compositeFrontArm.enabled = false; + this.compositeBackArm.enabled = false; + if (this.itemAnimation > 0) + { + if (sItem1.mana > 0) + this.ItemCheck_ApplyManaRegenDelay(sItem1); + if (Main.dedServ) + { + this.itemHeight = sItem1.height; + this.itemWidth = sItem1.width; + } + else + { + this.itemHeight = drawHitbox.Height; + this.itemWidth = drawHitbox.Width; + } + --this.itemAnimation; + } + if (this.itemAnimation > 0) + this.ItemCheck_ApplyUseStyle(offsetHitboxCenter, sItem2, drawHitbox); + else + this.ItemCheck_ApplyHoldStyle(offsetHitboxCenter, sItem2, drawHitbox); + this.releaseUseItem = !this.controlUseItem; + if (this.itemTime > 0) + { + --this.itemTime; + if (this.ItemTimeIsZero && this.whoAmI == Main.myPlayer) + { + if (!this.JustDroppedAnItem) + { + switch (sItem1.type) + { + case 65: + case 676: + case 723: + case 724: + case 989: + case 1226: + case 1227: + this.EmitMaxManaEffect(); + break; + } + } + PlayerInput.TryEndingFastUse(); + } + } + if (!this.JustDroppedAnItem) + { + this.ItemCheck_EmitHeldItemLight(sItem1); + this.ItemCheck_EmitFoodParticles(sItem1); + this.ItemCheck_EmitDrinkParticles(sItem1); + if (this.whoAmI == Main.myPlayer) + { + bool cShoot = true; + int type = sItem1.type; + if ((type == 65 || type == 676 || type == 723 || type == 724 || type == 757 || type == 674 || type == 675 || type == 989 || type == 1226 || type == 1227) && this.itemAnimation != this.itemAnimationMax - 1) + cShoot = false; + if (type == 3852) + { + if (this.itemAnimation < this.itemAnimationMax - 12) + cShoot = false; + if (this.altFunctionUse == 2 && this.itemAnimation != this.itemAnimationMax - 1) + cShoot = false; + } + if (type == 4956 && this.itemAnimation < this.itemAnimationMax - 3 * sItem1.useTime) + cShoot = false; + if (type == 4952 && this.itemAnimation < this.itemAnimationMax - 8) + cShoot = false; + if (type == 4953 && this.itemAnimation < this.itemAnimationMax - 10) + cShoot = false; + this.ItemCheck_TurretAltFeatureUse(sItem1, cShoot); + this.ItemCheck_MinionAltFeatureUse(sItem1, cShoot); + if (((sItem1.shoot <= 0 || this.itemAnimation <= 0 ? 0 : (this.ItemTimeIsZero ? 1 : 0)) & (cShoot ? 1 : 0)) != 0) + this.ItemCheck_Shoot(i, sItem1, weaponDamage); + this.ItemCheck_UseWiringTools(sItem1); + this.ItemCheck_UseLawnMower(sItem1); + this.ItemCheck_PlayInstruments(sItem1); + this.ItemCheck_UseBuckets(sItem1); + if (!this.channel) + { + this.toolTime = this.itemTime; + } + else + { + --this.toolTime; + if (this.toolTime < 0) + this.toolTime = sItem1.useTime; + } + this.ItemCheck_UseMiningTools(sItem1); + this.ItemCheck_UseRodOfDiscord(sItem1); + this.ItemCheck_UseLifeCrystal(sItem1); + this.ItemCheck_UseLifeFruit(sItem1); + this.ItemCheck_UseManaCrystal(sItem1); + this.ItemCheck_UseDemonHeart(sItem1); + this.ItemCheck_UseTorchGodsFavor(sItem1); + this.ItemCheck_UseEventItems(sItem1); + this.ItemCheck_UseBossSpawners(this.whoAmI, sItem1); + this.ItemCheck_UseCombatBook(sItem1); + this.ItemCheck_UsePetLicenses(sItem1); + if (sItem1.type == 4095 && this.itemAnimation == 2) + Main.LocalGolfState.ResetGolfBall(); + this.PlaceThing(); + if (sItem1.makeNPC > (short) 0) + { + if (!Main.GamepadDisableCursorItemIcon && (double) this.position.X / 16.0 - (double) Player.tileRangeX - (double) sItem1.tileBoost <= (double) Player.tileTargetX && ((double) this.position.X + (double) this.width) / 16.0 + (double) Player.tileRangeX + (double) sItem1.tileBoost - 1.0 >= (double) Player.tileTargetX && (double) this.position.Y / 16.0 - (double) Player.tileRangeY - (double) sItem1.tileBoost <= (double) Player.tileTargetY && ((double) this.position.Y + (double) this.height) / 16.0 + (double) Player.tileRangeY + (double) sItem1.tileBoost - 2.0 >= (double) Player.tileTargetY) + { + this.cursorItemIconEnabled = true; + Main.ItemIconCacheUpdate(sItem1.type); + } + if (this.ItemTimeIsZero && this.itemAnimation > 0 && this.controlUseItem) + consumptionFailed = this.ItemCheck_ReleaseCritter(consumptionFailed, sItem1); + } + } + if ((sItem1.damage >= 0 && sItem1.type > 0 && !sItem1.noMelee || sItem1.type == 1450 || sItem1.type == 1991 || sItem1.type == 3183 || sItem1.type == 4821 || sItem1.type == 3542 || sItem1.type == 3779) && this.itemAnimation > 0) + { + bool dontAttack; + Microsoft.Xna.Framework.Rectangle itemRectangle1; + this.ItemCheck_GetMeleeHitbox(sItem1, drawHitbox, out dontAttack, out itemRectangle1); + if (!dontAttack) + { + Microsoft.Xna.Framework.Rectangle itemRectangle2 = this.ItemCheck_EmitUseVisuals(sItem1, itemRectangle1); + if (Main.myPlayer == this.whoAmI && (sItem1.type == 1991 || sItem1.type == 3183 || sItem1.type == 4821)) + itemRectangle2 = this.ItemCheck_CatchCritters(sItem1, itemRectangle2); + if (sItem1.type == 3183 || sItem1.type == 4821) + { + List tileCutIgnoreList = Player.ItemCheck_GetTileCutIgnoreList(sItem1); + Player.ItemCheck_CutTiles(sItem1, itemRectangle2, tileCutIgnoreList); + } + if (Main.myPlayer == i && sItem1.damage > 0) + { + int num1 = weaponDamage; + float knockBack1 = sItem1.knockBack; + float num2 = 1f; + if (this.kbGlove) + ++num2; + if (this.kbBuff) + num2 += 0.5f; + float knockBack2 = knockBack1 * num2; + if (this.inventory[this.selectedItem].type == 3106) + knockBack2 += knockBack2 * (1f - this.stealth); + List tileCutIgnoreList = Player.ItemCheck_GetTileCutIgnoreList(sItem1); + Player.ItemCheck_CutTiles(sItem1, itemRectangle2, tileCutIgnoreList); + this.ItemCheck_MeleeHitNPCs(sItem1, itemRectangle2, num1, knockBack2); + this.ItemCheck_MeleeHitPVP(sItem1, itemRectangle2, num1, knockBack2); + this.ItemCheck_EmitHammushProjectiles(i, sItem1, itemRectangle2, num1); + } + } + } + if (this.ItemTimeIsZero && this.itemAnimation > 0) + { + if (sItem1.hairDye >= (short) 0) + { + this.ApplyItemTime(sItem1); + if (this.whoAmI == Main.myPlayer) + { + this.hairDye = (byte) sItem1.hairDye; + NetMessage.SendData(4, number: this.whoAmI); + } + } + if (sItem1.healLife > 0) + { + this.statLife += sItem1.healLife; + this.ApplyItemTime(sItem1); + if (Main.myPlayer == this.whoAmI) + this.HealEffect(sItem1.healLife); + } + if (sItem1.healMana > 0) + { + this.statMana += sItem1.healMana; + this.ApplyItemTime(sItem1); + if (Main.myPlayer == this.whoAmI) + { + this.AddBuff(94, Player.manaSickTime); + this.ManaEffect(sItem1.healMana); + } + } + if (sItem1.buffType > 0) + { + if (this.whoAmI == Main.myPlayer && sItem1.buffType != 90 && sItem1.buffType != 27) + this.AddBuff(sItem1.buffType, sItem1.buffTime); + this.ApplyItemTime(sItem1); + } + if (sItem1.type == 678) + { + if (Main.getGoodWorld) + { + this.ApplyItemTime(sItem1); + if (this.whoAmI == Main.myPlayer) + { + for (int index = 0; index < 3; ++index) + { + int type = 0; + int timeToAdd = 108000; + switch (Main.rand.Next(18)) + { + case 0: + type = 16; + break; + case 1: + type = 111; + break; + case 2: + type = 114; + break; + case 3: + type = 8; + break; + case 4: + type = 105; + break; + case 5: + type = 17; + break; + case 6: + type = 116; + break; + case 7: + type = 5; + break; + case 8: + type = 113; + break; + case 9: + type = 7; + break; + case 10: + type = 6; + break; + case 11: + type = 104; + break; + case 12: + type = 115; + break; + case 13: + type = 2; + break; + case 14: + type = 9; + break; + case 15: + type = 3; + break; + case 16: + type = 117; + break; + case 17: + type = 1; + break; + } + this.AddBuff(type, timeToAdd); + } + } + } + else + { + this.ApplyItemTime(sItem1); + if (this.whoAmI == Main.myPlayer) + { + this.AddBuff(20, 216000); + this.AddBuff(22, 216000); + this.AddBuff(23, 216000); + this.AddBuff(24, 216000); + this.AddBuff(30, 216000); + this.AddBuff(31, 216000); + this.AddBuff(32, 216000); + this.AddBuff(33, 216000); + this.AddBuff(35, 216000); + this.AddBuff(36, 216000); + this.AddBuff(68, 216000); + } + } + } + } + if ((sItem1.type == 50 || sItem1.type == 3124 || sItem1.type == 3199) && this.itemAnimation > 0) + { + if (Main.rand.Next(2) == 0) + Dust.NewDust(this.position, this.width, this.height, 15, Alpha: 150, Scale: 1.1f); + if (this.ItemTimeIsZero) + this.ApplyItemTime(sItem1); + else if (this.itemTime == sItem1.useTime / 2) + { + for (int index = 0; index < 70; ++index) + Dust.NewDust(this.position, this.width, this.height, 15, this.velocity.X * 0.5f, this.velocity.Y * 0.5f, 150, Scale: 1.5f); + this.RemoveAllGrapplingHooks(); + this.Spawn(PlayerSpawnContext.RecallFromItem); + for (int index = 0; index < 70; ++index) + Dust.NewDust(this.position, this.width, this.height, 15, Alpha: 150, Scale: 1.5f); + } + } + if (sItem1.type == 4263 && this.itemAnimation > 0) + { + Vector2 vector2 = Vector2.UnitY.RotatedBy((double) this.itemAnimation * 6.28318548202515 / 30.0) * new Vector2(15f, 0.0f); + for (int index = 0; index < 2; ++index) + { + if (Main.rand.Next(3) == 0) + { + Dust dust = Dust.NewDustPerfect(this.Bottom + vector2, Dust.dustWater()); + dust.velocity.Y *= 0.0f; + dust.velocity.Y -= 4.5f; + dust.velocity.X *= 1.5f; + dust.scale = 0.8f; + dust.alpha = 130; + dust.noGravity = true; + dust.fadeIn = 1.1f; + } + } + if (this.ItemTimeIsZero) + this.ApplyItemTime(sItem1); + else if (this.itemTime == 2) + { + switch (Main.netMode) + { + case 0: + this.MagicConch(); + break; + case 1: + if (this.whoAmI == Main.myPlayer) + { + NetMessage.SendData(73, number: 1); + break; + } + break; + } + } + } + if (sItem1.type == 4819 && this.itemAnimation > 0) + { + Vector2 vector2 = Vector2.UnitY.RotatedBy((double) this.itemAnimation * 6.28318548202515 / 30.0) * new Vector2(15f, 0.0f); + for (int index = 0; index < 2; ++index) + { + if (Main.rand.Next(3) == 0) + { + Dust dust = Dust.NewDustPerfect(this.Bottom + vector2, 35); + dust.velocity.Y *= 0.0f; + dust.velocity.Y -= 4.5f; + dust.velocity.X *= 1.5f; + dust.scale = 0.8f; + dust.alpha = 130; + dust.noGravity = true; + dust.fadeIn = 1.1f; + } + } + if (this.ItemTimeIsZero) + this.ApplyItemTime(sItem1); + else if (this.itemTime == 2) + { + switch (Main.netMode) + { + case 0: + this.DemonConch(); + break; + case 1: + if (this.whoAmI == Main.myPlayer) + { + NetMessage.SendData(73, number: 2); + break; + } + break; + } + } + } + if (sItem1.type == 2350 && this.itemAnimation > 0) + { + if (this.ItemTimeIsZero) + { + this.ApplyItemTime(sItem1); + SoundEngine.PlaySound(SoundID.Item3, this.position); + for (int index = 0; index < 10; ++index) + Main.dust[Dust.NewDust(this.position, this.width, this.height, 15, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 150, Color.Cyan, 1.2f)].velocity *= 0.5f; + } + else if (this.itemTime == 20) + { + SoundEngine.PlaySound(this.HeldItem.UseSound, this.position); + for (int index = 0; index < 70; ++index) + Main.dust[Dust.NewDust(this.position, this.width, this.height, 15, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 150, Color.Cyan, 1.2f)].velocity *= 0.5f; + this.RemoveAllGrapplingHooks(); + bool immune = this.immune; + int immuneTime = this.immuneTime; + this.Spawn(PlayerSpawnContext.RecallFromItem); + this.immune = immune; + this.immuneTime = immuneTime; + for (int index = 0; index < 70; ++index) + Main.dust[Dust.NewDust(this.position, this.width, this.height, 15, Alpha: 150, newColor: Color.Cyan, Scale: 1.2f)].velocity *= 0.5f; + if (sItem1.stack > 0) + --sItem1.stack; + } + } + if (sItem1.type == 4870 && this.itemAnimation > 0) + { + if (this.ItemTimeIsZero) + { + this.ApplyItemTime(sItem1); + SoundEngine.PlaySound(SoundID.Item3, this.position); + for (int index = 0; index < 10; ++index) + Main.dust[Dust.NewDust(this.position, this.width, this.height, 15, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 150, Color.Cyan, 1.2f)].velocity *= 0.5f; + } + else if (this.itemTime == 20) + { + SoundEngine.PlaySound(this.HeldItem.UseSound, this.position); + for (int index = 0; index < 70; ++index) + Main.dust[Dust.NewDust(this.position, this.width, this.height, 15, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 150, Color.Cyan, 1.2f)].velocity *= 0.5f; + this.DoPotionOfReturnTeleportationAndSetTheComebackPoint(); + for (int index = 0; index < 70; ++index) + Main.dust[Dust.NewDust(this.position, this.width, this.height, 15, Alpha: 150, newColor: Color.Cyan, Scale: 1.2f)].velocity *= 0.5f; + if (sItem1.stack > 0) + --sItem1.stack; + } + } + if (sItem1.type == 2351 && this.itemAnimation > 0) + { + if (this.ItemTimeIsZero) + this.ApplyItemTime(sItem1); + else if (this.itemTime == 2) + { + switch (Main.netMode) + { + case 0: + this.TeleportationPotion(); + break; + case 1: + if (this.whoAmI == Main.myPlayer) + { + NetMessage.SendData(73); + break; + } + break; + } + if (sItem1.stack > 0) + --sItem1.stack; + } + } + if (sItem1.type == 2756 && this.itemAnimation > 0) + { + if (this.ItemTimeIsZero) + this.ApplyItemTime(sItem1); + else if (this.itemTime == 2) + { + if (this.whoAmI == Main.myPlayer) + { + this.Male = !this.Male; + if (Main.netMode == 1) + NetMessage.SendData(4, number: this.whoAmI); + } + if (sItem1.stack > 0) + --sItem1.stack; + } + else + { + float useTime = (float) sItem1.useTime; + float num3 = (useTime - (float) this.itemTime) / useTime; + float num4 = 44f; + Vector2 vector2 = new Vector2(15f, 0.0f).RotatedBy(9.42477798461914 * (double) num3); + vector2.X *= (float) this.direction; + for (int index1 = 0; index1 < 2; ++index1) + { + int Type = 221; + if (index1 == 1) + { + vector2.X *= -1f; + Type = 219; + } + Vector2 Position = new Vector2(vector2.X, num4 * (1f - num3) - num4 + (float) (this.height / 2)); + Position += this.Center; + int index2 = Dust.NewDust(Position, 0, 0, Type, Alpha: 100); + Main.dust[index2].position = Position; + Main.dust[index2].noGravity = true; + Main.dust[index2].velocity = Vector2.Zero; + Main.dust[index2].scale = 1.3f; + Main.dust[index2].customData = (object) this; + } + } + } + if (i == Main.myPlayer) + { + if (((this.itemTimeMax == 0 ? 0 : (this.itemTime == this.itemTimeMax ? 1 : 0)) | (sItem1.IsAir ? 0 : (sItem1.IsNotTheSameAs(this.lastVisualizedSelectedItem) ? 1 : 0))) != 0) + this.lastVisualizedSelectedItem = sItem1.Clone(); + } + else + this.lastVisualizedSelectedItem = sItem1.Clone(); + if (i == Main.myPlayer) + { + if (!this.dontConsumeWand && this.itemTime == (int) ((double) sItem1.useTime * (double) this.tileSpeed) && sItem1.tileWand > 0) + { + int tileWand = sItem1.tileWand; + for (int index = 0; index < 58; ++index) + { + if (tileWand == this.inventory[index].type && this.inventory[index].stack > 0) + { + --this.inventory[index].stack; + if (this.inventory[index].stack <= 0) + { + this.inventory[index] = new Item(); + break; + } + break; + } + } + } + if (this.itemTimeMax != 0 && this.itemTime == this.itemTimeMax && sItem1.consumable && !consumptionFailed) + { + bool flag3 = true; + if (sItem1.ranged) + { + if (this.chloroAmmoCost80 && Main.rand.Next(5) == 0) + flag3 = false; + if (this.ammoCost80 && Main.rand.Next(5) == 0) + flag3 = false; + if (this.ammoCost75 && Main.rand.Next(4) == 0) + flag3 = false; + } + if (sItem1.IsACoin) + flag3 = true; + bool? nullable = ItemID.Sets.ForceConsumption[sItem1.type]; + if (nullable.HasValue) + flag3 = nullable.Value; + if (flag3) + { + if (sItem1.stack > 0) + --sItem1.stack; + if (sItem1.stack <= 0) + { + this.itemTime = this.itemAnimation; + Main.blockMouse = true; + } + } + } + if (sItem1.stack <= 0 && this.itemAnimation == 0) + this.inventory[this.selectedItem] = new Item(); + if (this.selectedItem == 58 && this.itemAnimation != 0) + Main.mouseItem = sItem1.Clone(); + } + } + if (this.itemAnimation != 0) + return; + this.JustDroppedAnItem = false; + } + } + + private void ItemCheck_EmitFoodParticles(Item sItem) + { + if (this.itemAnimation < 1) + return; + Color[] foodParticleColor = ItemID.Sets.FoodParticleColors[sItem.type]; + if (foodParticleColor == null || foodParticleColor.Length == 0 || Main.rand.Next(2) == 0) + return; + Dust.NewDustPerfect(this.RotatedRelativePoint(this.MountedCenter, addGfxOffY: false) + new Vector2((float) (this.direction * 8), this.gravDir * -4f).RotatedBy((double) this.fullRotation) + Main.rand.NextVector2Square(-4f, 4f), 284, new Vector2?(1.3f * new Vector2((float) this.direction, (float) (-(double) this.gravDir * 0.800000011920929)).RotatedBy(0.628318548202515 * (double) Main.rand.NextFloatDirection())), newColor: foodParticleColor[Main.rand.Next(foodParticleColor.Length)], Scale: ((float) (0.800000011920929 + 0.200000002980232 * (double) Main.rand.NextFloat()))).fadeIn = 0.0f; + } + + private void ItemCheck_EmitDrinkParticles(Item sItem) + { + if (this.itemAnimation < 1) + return; + Color[] drinkParticleColor = ItemID.Sets.DrinkParticleColors[sItem.type]; + if (drinkParticleColor == null || drinkParticleColor.Length == 0) + return; + Dust.NewDustPerfect(this.RotatedRelativePoint(this.MountedCenter, addGfxOffY: false) + new Vector2((float) (this.direction * 8), this.gravDir * -4f).RotatedBy((double) this.fullRotation) + Main.rand.NextVector2Square(-4f, 4f), 284, new Vector2?(1.3f * new Vector2((float) this.direction * 0.1f, (float) (-(double) this.gravDir * 0.100000001490116)).RotatedBy(-0.628318548202515 * (double) Main.rand.NextFloatDirection())), newColor: (drinkParticleColor[Main.rand.Next(drinkParticleColor.Length)] * 0.7f), Scale: ((float) (0.800000011920929 + 0.200000002980232 * (double) Main.rand.NextFloat()))).fadeIn = 0.0f; + } + + private void ItemCheck_UseBossSpawners(int onWhichPlayer, Item sItem) + { + if (!this.ItemTimeIsZero || this.itemAnimation <= 0 || sItem.type != 43 && sItem.type != 70 && sItem.type != 544 && sItem.type != 556 && sItem.type != 557 && sItem.type != 560 && sItem.type != 1133 && sItem.type != 1331 && sItem.type != 4988 || !this.SummonItemCheck()) + return; + if (sItem.type == 560) + { + this.ApplyItemTime(sItem); + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + NPC.SpawnOnPlayer(onWhichPlayer, 50); + else + NetMessage.SendData(61, number: this.whoAmI, number2: 50f); + } + else if (sItem.type == 43) + { + if (Main.dayTime) + return; + this.ApplyItemTime(sItem); + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + NPC.SpawnOnPlayer(onWhichPlayer, 4); + else + NetMessage.SendData(61, number: this.whoAmI, number2: 4f); + } + else if (sItem.type == 70) + { + if (!this.ZoneCorrupt) + return; + this.ApplyItemTime(sItem); + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + NPC.SpawnOnPlayer(onWhichPlayer, 13); + else + NetMessage.SendData(61, number: this.whoAmI, number2: 13f); + } + else if (sItem.type == 544) + { + if (Main.dayTime) + return; + this.ApplyItemTime(sItem); + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + { + NPC.SpawnOnPlayer(onWhichPlayer, 125); + NPC.SpawnOnPlayer(onWhichPlayer, 126); + } + else + { + NetMessage.SendData(61, number: this.whoAmI, number2: 125f); + NetMessage.SendData(61, number: this.whoAmI, number2: 126f); + } + } + else if (sItem.type == 556) + { + if (Main.dayTime) + return; + this.ApplyItemTime(sItem); + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + NPC.SpawnOnPlayer(onWhichPlayer, 134); + else + NetMessage.SendData(61, number: this.whoAmI, number2: 134f); + } + else if (sItem.type == 557) + { + if (Main.dayTime) + return; + this.ApplyItemTime(sItem); + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + NPC.SpawnOnPlayer(onWhichPlayer, (int) sbyte.MaxValue); + else + NetMessage.SendData(61, number: this.whoAmI, number2: ((float) sbyte.MaxValue)); + } + else if (sItem.type == 1133) + { + this.ApplyItemTime(sItem); + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + NPC.SpawnOnPlayer(onWhichPlayer, 222); + else + NetMessage.SendData(61, number: this.whoAmI, number2: 222f); + } + else if (sItem.type == 1331) + { + if (!this.ZoneCrimson) + return; + this.ApplyItemTime(sItem); + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + NPC.SpawnOnPlayer(onWhichPlayer, 266); + else + NetMessage.SendData(61, number: this.whoAmI, number2: 266f); + } + else + { + if (sItem.type != 4988 || !this.ZoneHallow) + return; + this.ApplyItemTime(sItem); + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + NPC.SpawnOnPlayer(onWhichPlayer, 657); + else + NetMessage.SendData(61, number: this.whoAmI, number2: 657f); + } + } + + private void ItemCheck_UseEventItems(Item sItem) + { + if (this.ItemTimeIsZero && this.itemAnimation > 0 && sItem.type == 361 && Main.CanStartInvasion(ignoreDelay: true)) + { + this.ApplyItemTime(sItem); + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + { + if (Main.invasionType == 0) + { + Main.invasionDelay = 0; + Main.StartInvasion(); + } + } + else + NetMessage.SendData(61, number: this.whoAmI, number2: -1f); + } + if (this.ItemTimeIsZero && this.itemAnimation > 0 && sItem.type == 602 && Main.CanStartInvasion(2, true)) + { + this.ApplyItemTime(sItem); + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + { + if (Main.invasionType == 0) + { + Main.invasionDelay = 0; + Main.StartInvasion(2); + } + } + else + NetMessage.SendData(61, number: this.whoAmI, number2: -2f); + } + if (this.ItemTimeIsZero && this.itemAnimation > 0 && sItem.type == 1315 && Main.CanStartInvasion(3, true)) + { + this.ApplyItemTime(sItem); + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + { + if (Main.invasionType == 0) + { + Main.invasionDelay = 0; + Main.StartInvasion(3); + } + } + else + NetMessage.SendData(61, number: this.whoAmI, number2: -3f); + } + if (this.ItemTimeIsZero && this.itemAnimation > 0 && sItem.type == 1844 && !Main.dayTime && !Main.pumpkinMoon && !Main.snowMoon && !DD2Event.Ongoing) + { + this.ApplyItemTime(sItem); + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + { + Main.NewText(Lang.misc[31].Value, (byte) 50, B: (byte) 130); + Main.startPumpkinMoon(); + } + else + NetMessage.SendData(61, number: this.whoAmI, number2: -4f); + } + if (this.ItemTimeIsZero && this.itemAnimation > 0 && sItem.type == 2767 && Main.dayTime && !Main.eclipse) + { + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + this.ApplyItemTime(sItem); + if (Main.netMode == 0) + { + Main.eclipse = true; + Main.NewText(Lang.misc[20].Value, (byte) 50, B: (byte) 130); + } + else + NetMessage.SendData(61, number: this.whoAmI, number2: -6f); + } + if (this.ItemTimeIsZero && this.itemAnimation > 0 && sItem.type == 4271 && !Main.dayTime && !Main.bloodMoon) + { + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + this.ApplyItemTime(sItem); + if (Main.netMode == 0) + { + AchievementsHelper.NotifyProgressionEvent(4); + Main.bloodMoon = true; + if (Main.GetMoonPhase() == MoonPhase.Empty) + Main.moonPhase = 5; + Main.NewText(Lang.misc[8].Value, (byte) 50, B: (byte) 130); + } + else + NetMessage.SendData(61, number: this.whoAmI, number2: -10f); + } + if (this.ItemTimeIsZero && this.itemAnimation > 0 && sItem.type == 3601 && NPC.downedGolemBoss && Main.hardMode && !NPC.AnyDanger() && !NPC.AnyoneNearCultists()) + { + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + this.ApplyItemTime(sItem); + if (Main.netMode == 0) + WorldGen.StartImpendingDoom(); + else + NetMessage.SendData(61, number: this.whoAmI, number2: -8f); + } + if (!this.ItemTimeIsZero || this.itemAnimation <= 0 || sItem.type != 1958 || Main.dayTime || Main.pumpkinMoon || Main.snowMoon || DD2Event.Ongoing) + return; + this.ApplyItemTime(sItem); + SoundEngine.PlaySound(15, (int) this.position.X, (int) this.position.Y, 0); + if (Main.netMode != 1) + { + Main.NewText(Lang.misc[34].Value, (byte) 50, B: (byte) 130); + Main.startSnowMoon(); + } + else + NetMessage.SendData(61, number: this.whoAmI, number2: -5f); + } + + private bool ItemCheck_ReleaseCritter(bool consumptionFailed, Item sItem) + { + if (sItem.makeNPC == (short) 614) + { + this.ApplyItemTime(sItem); + NPC.ReleaseNPC((int) this.Center.X, (int) this.Bottom.Y, (int) sItem.makeNPC, sItem.placeStyle, this.whoAmI); + } + else if ((double) this.position.X / 16.0 - (double) Player.tileRangeX - (double) sItem.tileBoost <= (double) Player.tileTargetX && ((double) this.position.X + (double) this.width) / 16.0 + (double) Player.tileRangeX + (double) sItem.tileBoost - 1.0 >= (double) Player.tileTargetX && (double) this.position.Y / 16.0 - (double) Player.tileRangeY - (double) sItem.tileBoost <= (double) Player.tileTargetY && ((double) this.position.Y + (double) this.height) / 16.0 + (double) Player.tileRangeY + (double) sItem.tileBoost - 2.0 >= (double) Player.tileTargetY) + { + int x = Main.mouseX + (int) Main.screenPosition.X; + int y = Main.mouseY + (int) Main.screenPosition.Y; + this.ApplyItemTime(sItem); + if (!WorldGen.SolidTile(x / 16, y / 16)) + NPC.ReleaseNPC(x, y, (int) sItem.makeNPC, sItem.placeStyle, this.whoAmI); + else + consumptionFailed = true; + } + return consumptionFailed; + } + + private void ItemCheck_MeleeHitPVP( + Item sItem, + Microsoft.Xna.Framework.Rectangle itemRectangle, + int damage, + float knockBack) + { + if (!this.hostile) + return; + for (int index1 = 0; index1 < (int) byte.MaxValue; ++index1) + { + Player player = Main.player[index1]; + if ((index1 == this.whoAmI || !player.active || !player.hostile || player.immune ? 0 : (!player.dead ? 1 : 0)) != 0 && (this.team == 0 ? 1 : (this.team != player.team ? 1 : 0)) != 0 && itemRectangle.Intersects(player.Hitbox) && this.CanHit((Entity) player)) + { + bool flag = false; + if (Main.rand.Next(1, 101) <= 10) + flag = true; + int num1 = Main.DamageVar((float) damage, this.luck); + this.StatusToPlayerPvP(sItem.type, index1); + this.OnHit(player.Center.X, player.Center.Y, (Entity) player); + PlayerDeathReason playerDeathReason = PlayerDeathReason.ByPlayer(this.whoAmI); + int num2 = (int) player.Hurt(playerDeathReason, num1, this.direction, true, Crit: flag); + if (this.inventory[this.selectedItem].type == 3211) + { + Vector2 vector2_1 = new Vector2((float) (this.direction * 100 + Main.rand.Next(-25, 26)), (float) Main.rand.Next(-75, 76)); + vector2_1.Normalize(); + vector2_1 *= (float) Main.rand.Next(30, 41) * 0.1f; + Vector2 vector2_2 = new Vector2((float) (itemRectangle.X + Main.rand.Next(itemRectangle.Width)), (float) (itemRectangle.Y + Main.rand.Next(itemRectangle.Height))); + vector2_2 = (vector2_2 + player.Center * 2f) / 3f; + Projectile.NewProjectile(vector2_2.X, vector2_2.Y, vector2_1.X, vector2_1.Y, 524, (int) ((double) damage * 0.7), knockBack * 0.7f, this.whoAmI); + } + if (this.beetleOffense) + { + this.beetleCounter += (float) num2; + this.beetleCountdown = 0; + } + if (this.meleeEnchant == (byte) 7) + Projectile.NewProjectile(player.Center.X, player.Center.Y, player.velocity.X, player.velocity.Y, 289, 0, 0.0f, this.whoAmI); + if (sItem.type == 1123) + { + int num3 = Main.rand.Next(1, 4); + if (this.strongBees && Main.rand.Next(3) == 0) + ++num3; + for (int index2 = 0; index2 < num3; ++index2) + { + float num4 = (float) (this.direction * 2) + (float) Main.rand.Next(-35, 36) * 0.02f; + float num5 = (float) Main.rand.Next(-35, 36) * 0.02f; + float SpeedX = num4 * 0.2f; + float SpeedY = num5 * 0.2f; + Projectile.NewProjectile((float) (itemRectangle.X + itemRectangle.Width / 2), (float) (itemRectangle.Y + itemRectangle.Height / 2), SpeedX, SpeedY, this.beeType(), this.beeDamage(num1 / 3), this.beeKB(0.0f), this.whoAmI); + } + } + if (this.inventory[this.selectedItem].type == 3106) + { + this.stealth = 1f; + if (Main.netMode == 1) + NetMessage.SendData(84, number: this.whoAmI); + } + if (sItem.type == 1826 && (double) Main.npc[index1].value > 0.0) + this.pumpkinSword(index1, (int) ((double) damage * 1.5), knockBack); + if (Main.netMode != 0) + NetMessage.SendPlayerHurt(index1, playerDeathReason, num1, this.direction, flag, true, -1); + this.attackCD = (int) ((double) this.itemAnimationMax * 0.33); + } + } + } + + public bool HasNPCBannerBuff(int bannerType) => Main.SceneMetrics.NPCBannerBuff[bannerType]; + + private void ItemCheck_MeleeHitNPCs( + Item sItem, + Microsoft.Xna.Framework.Rectangle itemRectangle, + int originalDamage, + float knockBack) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].immune[this.whoAmI] == 0 && this.attackCD == 0) + { + NPC npc1 = Main.npc[index]; + npc1.position = npc1.position + Main.npc[index].netOffset; + if (!Main.npc[index].dontTakeDamage && this.CanNPCBeHitByPlayerOrPlayerProjectile(Main.npc[index])) + { + if (!Main.npc[index].friendly || Main.npc[index].type == 22 && this.killGuide || Main.npc[index].type == 54 && this.killClothier) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) Main.npc[index].position.X, (int) Main.npc[index].position.Y, Main.npc[index].width, Main.npc[index].height); + if (itemRectangle.Intersects(rectangle) && (Main.npc[index].noTileCollide || this.CanHit((Entity) Main.npc[index]))) + { + int damage = originalDamage; + bool crit = false; + int weaponCrit = this.GetWeaponCrit(sItem); + if (Main.rand.Next(1, 101) <= weaponCrit) + crit = true; + int num1 = Item.NPCtoBanner(Main.npc[index].BannerID()); + if (num1 > 0 && this.HasNPCBannerBuff(num1)) + damage = !Main.expertMode ? (int) ((double) damage * (double) ItemID.Sets.BannerStrength[Item.BannerToItem(num1)].NormalDamageDealt) : (int) ((double) damage * (double) ItemID.Sets.BannerStrength[Item.BannerToItem(num1)].ExpertDamageDealt); + if (this.parryDamageBuff && sItem.melee) + { + damage *= 5; + this.parryDamageBuff = false; + this.ClearBuff(198); + } + if (sItem.type == 426 && (double) Main.npc[index].life >= (double) Main.npc[index].lifeMax * 0.899999976158142) + damage = (int) ((double) damage * 2.0); + if (sItem.type == 671) + { + float num2 = 1.5f * Utils.GetLerpValue(1f, 0.1f, (float) Main.npc[index].life / (float) Main.npc[index].lifeMax, true); + damage = (int) ((double) damage * (1.0 + (double) num2)); + Vector2 vector2_1 = itemRectangle.Center.ToVector2(); + Vector2 vector2_2 = Main.npc[index].Hitbox.ClosestPointInRect(vector2_1); + ParticleOrchestrator.RequestParticleSpawn(false, ParticleOrchestraType.Keybrand, new ParticleOrchestraSettings() + { + PositionInWorld = vector2_2 + }, new int?(this.whoAmI)); + } + int num3 = Main.DamageVar((float) damage, this.luck); + this.StatusToNPC(sItem.type, index); + if (Main.npc[index].life > 5) + this.OnHit(Main.npc[index].Center.X, Main.npc[index].Center.Y, (Entity) Main.npc[index]); + if (this.armorPenetration > 0) + num3 += Main.npc[index].checkArmorPenetration(this.armorPenetration); + int dmgDone = (int) Main.npc[index].StrikeNPC(num3, knockBack, this.direction, crit); + this.ApplyNPCOnHitEffects(sItem, itemRectangle, damage, knockBack, index, num3, dmgDone); + int num4 = Item.NPCtoBanner(Main.npc[index].BannerID()); + if (num4 >= 0) + this.lastCreatureHit = num4; + if (Main.netMode != 0) + { + if (crit) + NetMessage.SendData(28, number: index, number2: ((float) num3), number3: knockBack, number4: ((float) this.direction), number5: 1); + else + NetMessage.SendData(28, number: index, number2: ((float) num3), number3: knockBack, number4: ((float) this.direction)); + } + if (this.accDreamCatcher) + this.addDPS(num3); + Main.npc[index].immune[this.whoAmI] = this.itemAnimation; + this.attackCD = Math.Max(1, (int) ((double) this.itemAnimationMax * 0.33)); + } + } + } + else if (Main.npc[index].type == 63 || Main.npc[index].type == 64 || Main.npc[index].type == 103 || Main.npc[index].type == 242) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) Main.npc[index].position.X, (int) Main.npc[index].position.Y, Main.npc[index].width, Main.npc[index].height); + if (itemRectangle.Intersects(rectangle) && (Main.npc[index].noTileCollide || this.CanHit((Entity) Main.npc[index]))) + { + this.Hurt(PlayerDeathReason.LegacyDefault(), (int) ((double) Main.npc[index].damage * 1.3), -this.direction); + Main.npc[index].immune[this.whoAmI] = this.itemAnimation; + this.attackCD = (int) ((double) this.itemAnimationMax * 0.33); + } + } + NPC npc2 = Main.npc[index]; + npc2.position = npc2.position - Main.npc[index].netOffset; + } + } + } + + private void ApplyNPCOnHitEffects( + Item sItem, + Microsoft.Xna.Framework.Rectangle itemRectangle, + int damage, + float knockBack, + int npcIndex, + int dmgRandomized, + int dmgDone) + { + bool flag = !Main.npc[npcIndex].immortal; + if (this.inventory[this.selectedItem].type == 3211) + { + Vector2 vector2_1 = new Vector2((float) (this.direction * 100 + Main.rand.Next(-25, 26)), (float) Main.rand.Next(-75, 76)); + vector2_1.Normalize(); + vector2_1 *= (float) Main.rand.Next(30, 41) * 0.1f; + Vector2 vector2_2 = (new Vector2((float) (itemRectangle.X + Main.rand.Next(itemRectangle.Width)), (float) (itemRectangle.Y + Main.rand.Next(itemRectangle.Height))) + Main.npc[npcIndex].Center * 2f) / 3f; + Projectile.NewProjectile(vector2_2.X, vector2_2.Y, vector2_1.X, vector2_1.Y, 524, (int) ((double) damage * 0.7), knockBack * 0.7f, this.whoAmI); + } + if (this.beetleOffense & flag) + { + this.beetleCounter += (float) dmgDone; + this.beetleCountdown = 0; + } + if (sItem.type == 1826 && ((double) Main.npc[npcIndex].value > 0.0 || Main.npc[npcIndex].damage > 0 && !Main.npc[npcIndex].friendly)) + this.pumpkinSword(npcIndex, (int) ((double) damage * 1.5), knockBack); + if (this.meleeEnchant == (byte) 7) + Projectile.NewProjectile(Main.npc[npcIndex].Center.X, Main.npc[npcIndex].Center.Y, Main.npc[npcIndex].velocity.X, Main.npc[npcIndex].velocity.Y, 289, 0, 0.0f, this.whoAmI); + if (this.inventory[this.selectedItem].type == 3106) + { + this.stealth = 1f; + if (Main.netMode == 1) + NetMessage.SendData(84, number: this.whoAmI); + } + if (sItem.type == 1123 & flag) + { + int num1 = Main.rand.Next(1, 4); + if (this.strongBees && Main.rand.Next(3) == 0) + ++num1; + for (int index = 0; index < num1; ++index) + { + float num2 = (float) (this.direction * 2) + (float) Main.rand.Next(-35, 36) * 0.02f; + float num3 = (float) Main.rand.Next(-35, 36) * 0.02f; + float SpeedX = num2 * 0.2f; + float SpeedY = num3 * 0.2f; + Projectile.NewProjectile((float) (itemRectangle.X + itemRectangle.Width / 2), (float) (itemRectangle.Y + itemRectangle.Height / 2), SpeedX, SpeedY, this.beeType(), this.beeDamage(dmgRandomized / 3), this.beeKB(0.0f), this.whoAmI); + } + } + if ((double) Main.npc[npcIndex].value <= 0.0 || !this.coins || Main.rand.Next(5) != 0) + return; + int Type = 71; + if (Main.rand.Next(10) == 0) + Type = 72; + if (Main.rand.Next(100) == 0) + Type = 73; + int number = Item.NewItem((int) Main.npc[npcIndex].position.X, (int) Main.npc[npcIndex].position.Y, Main.npc[npcIndex].width, Main.npc[npcIndex].height, Type); + Main.item[number].stack = Main.rand.Next(1, 11); + Main.item[number].velocity.Y = (float) Main.rand.Next(-20, 1) * 0.2f; + Main.item[number].velocity.X = (float) Main.rand.Next(10, 31) * 0.2f * (float) this.direction; + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number); + } + + private void ItemCheck_EmitHammushProjectiles( + int i, + Item sItem, + Microsoft.Xna.Framework.Rectangle itemRectangle, + int damage) + { + if (sItem.type != 787) + return; + int itemAnimationMax = this.itemAnimationMax; + if (this.itemAnimation != (int) ((double) itemAnimationMax * 0.1) && this.itemAnimation != (int) ((double) itemAnimationMax * 0.3) && this.itemAnimation != (int) ((double) itemAnimationMax * 0.5) && this.itemAnimation != (int) ((double) itemAnimationMax * 0.7) && this.itemAnimation != (int) ((double) itemAnimationMax * 0.9)) + return; + float num1 = 0.0f; + float num2 = 0.0f; + float num3 = 0.0f; + float num4 = 0.0f; + if (this.itemAnimation == (int) ((double) itemAnimationMax * 0.9)) + num1 = -7f; + if (this.itemAnimation == (int) ((double) itemAnimationMax * 0.7)) + { + num1 = -6f; + num2 = 2f; + } + if (this.itemAnimation == (int) ((double) itemAnimationMax * 0.5)) + { + num1 = -4f; + num2 = 4f; + } + if (this.itemAnimation == (int) ((double) itemAnimationMax * 0.3)) + { + num1 = -2f; + num2 = 6f; + } + if (this.itemAnimation == (int) ((double) itemAnimationMax * 0.1)) + num2 = 7f; + if (this.itemAnimation == (int) ((double) itemAnimationMax * 0.7)) + num4 = 26f; + if (this.itemAnimation == (int) ((double) itemAnimationMax * 0.3)) + { + num4 -= 4f; + num3 -= 20f; + } + if (this.itemAnimation == (int) ((double) itemAnimationMax * 0.1)) + num3 += 6f; + if (this.direction == -1) + { + if (this.itemAnimation == (int) ((double) itemAnimationMax * 0.9)) + num4 -= 8f; + if (this.itemAnimation == (int) ((double) itemAnimationMax * 0.7)) + num4 -= 6f; + } + float num5 = num1 * 1.5f; + float num6 = num2 * 1.5f; + float num7 = num4 * (float) this.direction; + float num8 = num3 * this.gravDir; + Projectile.NewProjectile((float) (itemRectangle.X + itemRectangle.Width / 2) + num7, (float) (itemRectangle.Y + itemRectangle.Height / 2) + num8, (float) this.direction * num6, num5 * this.gravDir, 131, damage / 2, 0.0f, i); + } + + private static List ItemCheck_GetTileCutIgnoreList(Item sItem) + { + List ushortList = (List) null; + if (sItem.type == 213) + ushortList = new List((IEnumerable) new ushort[23] + { + (ushort) 3, + (ushort) 24, + (ushort) 52, + (ushort) 61, + (ushort) 62, + (ushort) 71, + (ushort) 73, + (ushort) 74, + (ushort) 82, + (ushort) 83, + (ushort) 84, + (ushort) 110, + (ushort) 113, + (ushort) 115, + (ushort) 184, + (ushort) 205, + (ushort) 201, + (ushort) 519, + (ushort) 518, + (ushort) 528, + (ushort) 529, + (ushort) 530, + (ushort) 549 + }); + return ushortList; + } + + private static void ItemCheck_CutTiles( + Item sItem, + Microsoft.Xna.Framework.Rectangle itemRectangle, + List ignoreList) + { + int minX = itemRectangle.X / 16; + int maxX = (itemRectangle.X + itemRectangle.Width) / 16 + 1; + int minY = itemRectangle.Y / 16; + int maxY = (itemRectangle.Y + itemRectangle.Height) / 16 + 1; + Utils.ClampWithinWorld(ref minX, ref minY, ref maxX, ref maxY); + for (int index1 = minX; index1 < maxX; ++index1) + { + for (int index2 = minY; index2 < maxY; ++index2) + { + if (Main.tile[index1, index2] != null && Main.tileCut[(int) Main.tile[index1, index2].type] && (ignoreList == null || !ignoreList.Contains(Main.tile[index1, index2].type)) && WorldGen.CanCutTile(index1, index2, TileCuttingContext.AttackMelee)) + { + if (sItem.type == 1786) + { + int type = (int) Main.tile[index1, index2].type; + WorldGen.KillTile(index1, index2); + if (!Main.tile[index1, index2].active()) + { + int Stack = 0; + if (type == 3 || type == 24 || type == 61 || type == 110 || type == 201) + Stack = Main.rand.Next(1, 3); + if (type == 73 || type == 74 || type == 113) + Stack = Main.rand.Next(2, 5); + if (Stack > 0) + { + int number = Item.NewItem(index1 * 16, index2 * 16, 16, 16, 1727, Stack); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + } + } + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) index1), number3: ((float) index2)); + } + else + { + WorldGen.KillTile(index1, index2); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) index1), number3: ((float) index2)); + } + } + } + } + } + + private Microsoft.Xna.Framework.Rectangle ItemCheck_CatchCritters( + Item sItem, + Microsoft.Xna.Framework.Rectangle itemRectangle) + { + bool flag = sItem.type == 3183 || sItem.type == 4821; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].catchItem > (short) 0) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) Main.npc[index].position.X, (int) Main.npc[index].position.Y, Main.npc[index].width, Main.npc[index].height); + if (itemRectangle.Intersects(rectangle)) + { + if (!flag && ItemID.Sets.IsLavaBait[(int) Main.npc[index].catchItem]) + { + if (Main.myPlayer == this.whoAmI) + { + this.Hurt(PlayerDeathReason.ByNPC(index), 1, (double) Main.npc[index].Center.X < (double) this.Center.X ? 1 : -1, cooldownCounter: 3); + this.AddBuff(24, 300, false); + } + } + else if (Main.npc[index].type == 585 || Main.npc[index].type == 583 || Main.npc[index].type == 584) + { + if ((double) Main.npc[index].ai[2] <= 1.0) + NPC.CatchNPC(index, this.whoAmI); + } + else + NPC.CatchNPC(index, this.whoAmI); + } + } + } + return itemRectangle; + } + + private Microsoft.Xna.Framework.Rectangle ItemCheck_EmitUseVisuals( + Item sItem, + Microsoft.Xna.Framework.Rectangle itemRectangle) + { + if (sItem.type == 989 && Main.rand.Next(5) == 0) + { + int Type; + switch (Main.rand.Next(3)) + { + case 0: + Type = 15; + break; + case 1: + Type = 57; + break; + default: + Type = 58; + break; + } + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, Type, (float) (this.direction * 2), Alpha: 150, Scale: 1.3f); + Main.dust[index].velocity *= 0.2f; + } + if (sItem.type == 2880 && Main.rand.Next(2) == 0) + { + int Type = Utils.SelectRandom(Main.rand, 226, 229); + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, Type, (float) (this.direction * 2), Alpha: 150); + Main.dust[index].velocity *= 0.2f; + Main.dust[index].noGravity = true; + } + if ((sItem.type == 44 || sItem.type == 45 || sItem.type == 46 || sItem.type == 103 || sItem.type == 104) && Main.rand.Next(15) == 0) + Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 14, (float) (this.direction * 2), Alpha: 150, Scale: 1.3f); + if (sItem.type == 273 || sItem.type == 675) + { + if (Main.rand.Next(5) == 0) + Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 14, (float) (this.direction * 2), Alpha: 150, Scale: 1.4f); + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 27, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 100, Scale: 1.2f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity.X /= 2f; + Main.dust[index].velocity.Y /= 2f; + } + if (sItem.type == 723 && Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 64, Alpha: 150, Scale: 1.2f); + Main.dust[index].noGravity = true; + } + if (sItem.type == 65) + { + if (Main.rand.Next(5) == 0) + Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 58, Alpha: 150, Scale: 1.2f); + if (Main.rand.Next(10) == 0) + Gore.NewGore(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), new Vector2(), Main.rand.Next(16, 18)); + } + if (sItem.type == 3065) + { + int index1 = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 58, Alpha: 150, Scale: 1.2f); + Main.dust[index1].velocity *= 0.5f; + if (Main.rand.Next(8) == 0) + { + int index2 = Gore.NewGore(new Vector2((float) itemRectangle.Center.X, (float) itemRectangle.Center.Y), new Vector2(), 16); + Main.gore[index2].velocity *= 0.5f; + Main.gore[index2].velocity += new Vector2((float) this.direction, 0.0f); + } + } + if (sItem.type == 190) + { + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 40, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, Scale: 1.2f); + Main.dust[index].noGravity = true; + } + else if (sItem.type == 213) + { + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 3, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, Scale: 1.2f); + Main.dust[index].noGravity = true; + } + if (sItem.type == 121) + { + for (int index3 = 0; index3 < 2; ++index3) + { + int index4 = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 6, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 100, Scale: 2.5f); + Main.dust[index4].noGravity = true; + Main.dust[index4].velocity.X *= 2f; + Main.dust[index4].velocity.Y *= 2f; + } + } + if (sItem.type == 122 || sItem.type == 217) + { + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 6, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 100, Scale: 1.9f); + Main.dust[index].noGravity = true; + } + if (sItem.type == 155) + { + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 172, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 100, Scale: 0.9f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.1f; + } + if (sItem.type == 676 && Main.rand.Next(3) == 0) + { + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 67, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 90, Scale: 1.5f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.2f; + } + if (sItem.type == 3063) + { + int index = Dust.NewDust(itemRectangle.TopLeft(), itemRectangle.Width, itemRectangle.Height, 66, Alpha: 150, newColor: Color.Transparent, Scale: 0.85f); + Main.dust[index].color = Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.5f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity /= 2f; + } + if (sItem.type == 3823) + { + Dust dust = Dust.NewDustDirect(itemRectangle.TopLeft(), itemRectangle.Width, itemRectangle.Height, 6, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 100, Color.Transparent, 0.7f); + dust.noGravity = true; + dust.velocity *= 2f; + dust.fadeIn = 0.9f; + } + if (sItem.type == 724 && Main.rand.Next(5) == 0) + { + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 67, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 90, Scale: 1.5f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.2f; + } + if (sItem.type >= 795 && sItem.type <= 802 && Main.rand.Next(3) == 0) + { + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 115, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 140, Scale: 1.5f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.25f; + } + if (sItem.type == 367 || sItem.type == 368 || sItem.type == 674) + { + if (Main.rand.Next(3) == 0) + { + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 57, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 100, Scale: 1.1f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity.X /= 2f; + Main.dust[index].velocity.Y /= 2f; + Main.dust[index].velocity.X += (float) (this.direction * 2); + } + if (Main.rand.Next(4) == 0) + { + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 43, Alpha: 254, Scale: 0.3f); + Main.dust[index].velocity *= 0.0f; + } + } + if (sItem.type == 4258 || sItem.type == 4259 || sItem.type >= 198 && sItem.type <= 203 || sItem.type >= 3764 && sItem.type <= 3769) + { + float r = 0.5f; + float g = 0.5f; + float b = 0.5f; + if (sItem.type == 198 || sItem.type == 3764) + { + r *= 0.1f; + g *= 0.5f; + b *= 1.2f; + } + else if (sItem.type == 199 || sItem.type == 3765) + { + r *= 1f; + g *= 0.2f; + b *= 0.1f; + } + else if (sItem.type == 200 || sItem.type == 3766) + { + r *= 0.1f; + g *= 1f; + b *= 0.2f; + } + else if (sItem.type == 201 || sItem.type == 3767) + { + r *= 0.8f; + g *= 0.1f; + b *= 1f; + } + else if (sItem.type == 202 || sItem.type == 3768) + { + r *= 0.8f; + g *= 0.9f; + b *= 1f; + } + else if (sItem.type == 203 || sItem.type == 3769) + { + r *= 0.8f; + g *= 0.8f; + b *= 0.0f; + } + else if (sItem.type == 4258 || sItem.type == 4259) + { + r *= 0.9f; + g *= 0.5f; + b *= 0.0f; + } + Lighting.AddLight((int) (((double) this.itemLocation.X + 6.0 + (double) this.velocity.X) / 16.0), (int) (((double) this.itemLocation.Y - 14.0) / 16.0), r, g, b); + } + if (this.frostBurn && sItem.melee && !sItem.noMelee && !sItem.noUseGraphic && Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 135, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 100, Scale: 2.5f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.7f; + Main.dust[index].velocity.Y -= 0.5f; + } + if (sItem.melee && !sItem.noMelee && !sItem.noUseGraphic && this.meleeEnchant > (byte) 0) + { + if (this.meleeEnchant == (byte) 1) + { + if (Main.rand.Next(3) == 0) + { + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 171, Alpha: 100); + Main.dust[index].noGravity = true; + Main.dust[index].fadeIn = 1.5f; + Main.dust[index].velocity *= 0.25f; + } + } + else if (this.meleeEnchant == (byte) 2) + { + if (Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 75, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 100, Scale: 2.5f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.7f; + Main.dust[index].velocity.Y -= 0.5f; + } + } + else if (this.meleeEnchant == (byte) 3) + { + if (Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 6, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 100, Scale: 2.5f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.7f; + Main.dust[index].velocity.Y -= 0.5f; + } + } + else if (this.meleeEnchant == (byte) 4) + { + if (Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 57, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 100, Scale: 1.1f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity.X /= 2f; + Main.dust[index].velocity.Y /= 2f; + } + } + else if (this.meleeEnchant == (byte) 5) + { + if (Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 169, Alpha: 100); + Main.dust[index].velocity.X += (float) this.direction; + Main.dust[index].velocity.Y += 0.2f; + Main.dust[index].noGravity = true; + } + } + else if (this.meleeEnchant == (byte) 6) + { + if (Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 135, Alpha: 100); + Main.dust[index].velocity.X += (float) this.direction; + Main.dust[index].velocity.Y += 0.2f; + Main.dust[index].noGravity = true; + } + } + else if (this.meleeEnchant == (byte) 7) + { + if (Main.rand.Next(20) == 0) + { + int Type = Main.rand.Next(139, 143); + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, Type, this.velocity.X, this.velocity.Y, Scale: 1.2f); + Main.dust[index].velocity.X *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.dust[index].velocity.Y *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.dust[index].velocity.X += (float) Main.rand.Next(-50, 51) * 0.05f; + Main.dust[index].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.05f; + Main.dust[index].scale *= (float) (1.0 + (double) Main.rand.Next(-30, 31) * 0.00999999977648258); + } + if (Main.rand.Next(40) == 0) + { + int Type = Main.rand.Next(276, 283); + int index = Gore.NewGore(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), this.velocity, Type); + Main.gore[index].velocity.X *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.gore[index].velocity.Y *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.gore[index].scale *= (float) (1.0 + (double) Main.rand.Next(-20, 21) * 0.00999999977648258); + Main.gore[index].velocity.X += (float) Main.rand.Next(-50, 51) * 0.05f; + Main.gore[index].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.05f; + } + } + else if (this.meleeEnchant == (byte) 8 && Main.rand.Next(4) == 0) + { + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 46, Alpha: 100); + Main.dust[index].noGravity = true; + Main.dust[index].fadeIn = 1.5f; + Main.dust[index].velocity *= 0.25f; + } + } + if (this.magmaStone && sItem.melee && !sItem.noMelee && !sItem.noUseGraphic && Main.rand.Next(3) != 0) + { + int index = Dust.NewDust(new Vector2((float) itemRectangle.X, (float) itemRectangle.Y), itemRectangle.Width, itemRectangle.Height, 6, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 100, Scale: 2.5f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity.X *= 2f; + Main.dust[index].velocity.Y *= 2f; + } + return itemRectangle; + } + + private void ItemCheck_GetMeleeHitbox( + Item sItem, + Microsoft.Xna.Framework.Rectangle heldItemFrame, + out bool dontAttack, + out Microsoft.Xna.Framework.Rectangle itemRectangle) + { + dontAttack = false; + itemRectangle = new Microsoft.Xna.Framework.Rectangle((int) this.itemLocation.X, (int) this.itemLocation.Y, 32, 32); + if (!Main.dedServ) + itemRectangle = new Microsoft.Xna.Framework.Rectangle((int) this.itemLocation.X, (int) this.itemLocation.Y, heldItemFrame.Width, heldItemFrame.Height); + itemRectangle.Width = (int) ((double) itemRectangle.Width * (double) sItem.scale); + itemRectangle.Height = (int) ((double) itemRectangle.Height * (double) sItem.scale); + if (this.direction == -1) + itemRectangle.X -= itemRectangle.Width; + if ((double) this.gravDir == 1.0) + itemRectangle.Y -= itemRectangle.Height; + if (sItem.useStyle == 1) + { + if ((double) this.itemAnimation < (double) this.itemAnimationMax * 0.333) + { + if (this.direction == -1) + itemRectangle.X -= (int) ((double) itemRectangle.Width * 1.4 - (double) itemRectangle.Width); + itemRectangle.Width = (int) ((double) itemRectangle.Width * 1.4); + itemRectangle.Y += (int) ((double) itemRectangle.Height * 0.5 * (double) this.gravDir); + itemRectangle.Height = (int) ((double) itemRectangle.Height * 1.1); + } + else if ((double) this.itemAnimation >= (double) this.itemAnimationMax * 0.666) + { + if (this.direction == 1) + itemRectangle.X -= (int) ((double) itemRectangle.Width * 1.2); + itemRectangle.Width *= 2; + itemRectangle.Y -= (int) (((double) itemRectangle.Height * 1.4 - (double) itemRectangle.Height) * (double) this.gravDir); + itemRectangle.Height = (int) ((double) itemRectangle.Height * 1.4); + } + } + else if (sItem.useStyle == 3) + { + if ((double) this.itemAnimation > (double) this.itemAnimationMax * 0.666) + { + dontAttack = true; + } + else + { + if (this.direction == -1) + itemRectangle.X -= (int) ((double) itemRectangle.Width * 1.4 - (double) itemRectangle.Width); + itemRectangle.Width = (int) ((double) itemRectangle.Width * 1.4); + itemRectangle.Y += (int) ((double) itemRectangle.Height * 0.6); + itemRectangle.Height = (int) ((double) itemRectangle.Height * 0.6); + if (sItem.type == 946 || sItem.type == 4707) + { + itemRectangle.Height += 14; + itemRectangle.Width -= 10; + if (this.direction == -1) + itemRectangle.X += 10; + } + } + } + if (sItem.type == 1450 && Main.rand.Next(3) == 0) + { + int index = -1; + float x = (float) (itemRectangle.X + Main.rand.Next(itemRectangle.Width)); + float y = (float) (itemRectangle.Y + Main.rand.Next(itemRectangle.Height)); + if (Main.rand.Next(500) == 0) + index = Gore.NewGore(new Vector2(x, y), new Vector2(), 415, (float) Main.rand.Next(51, 101) * 0.01f); + else if (Main.rand.Next(250) == 0) + index = Gore.NewGore(new Vector2(x, y), new Vector2(), 414, (float) Main.rand.Next(51, 101) * 0.01f); + else if (Main.rand.Next(80) == 0) + index = Gore.NewGore(new Vector2(x, y), new Vector2(), 413, (float) Main.rand.Next(51, 101) * 0.01f); + else if (Main.rand.Next(10) == 0) + index = Gore.NewGore(new Vector2(x, y), new Vector2(), 412, (float) Main.rand.Next(51, 101) * 0.01f); + else if (Main.rand.Next(3) == 0) + index = Gore.NewGore(new Vector2(x, y), new Vector2(), 411, (float) Main.rand.Next(51, 101) * 0.01f); + if (index >= 0) + { + Main.gore[index].velocity.X += (float) (this.direction * 2); + Main.gore[index].velocity.Y *= 0.3f; + } + } + if (sItem.type == 3542) + dontAttack = true; + if (sItem.type != 3779) + return; + dontAttack = true; + Vector2 vector2_1 = this.itemLocation + new Vector2((float) (this.direction * 30), -8f); + Vector2 vector2_2 = vector2_1 - this.position; + for (float amount = 0.0f; (double) amount < 1.0; amount += 0.2f) + { + Vector2 vector2_3 = Vector2.Lerp(this.oldPosition + vector2_2 + new Vector2(0.0f, this.gfxOffY), vector2_1, amount); + Dust dust = Main.dust[Dust.NewDust(vector2_1 - Vector2.One * 8f, 16, 16, 27, SpeedY: -2f)]; + dust.noGravity = true; + dust.position = vector2_3; + dust.velocity = new Vector2(0.0f, (float) (-(double) this.gravDir * 2.0)); + dust.scale = 1.2f; + dust.alpha = 200; + } + } + + private void ItemCheck_UseDemonHeart(Item sItem) + { + if (sItem.type != 3335 || this.itemAnimation <= 0 || this.extraAccessory || !Main.expertMode || !this.ItemTimeIsZero) + return; + this.ApplyItemTime(sItem); + this.extraAccessory = true; + NetMessage.SendData(4, number: this.whoAmI); + } + + private void ItemCheck_UseTorchGodsFavor(Item sItem) + { + if (sItem.type != 5043 || this.itemAnimation <= 0 || this.unlockedBiomeTorches || !this.ItemTimeIsZero) + return; + this.ApplyItemTime(sItem); + this.unlockedBiomeTorches = true; + this.UsingBiomeTorches = true; + NetMessage.SendData(4, number: this.whoAmI); + } + + private void ItemCheck_UseManaCrystal(Item sItem) + { + if (sItem.type != 109 || this.itemAnimation <= 0 || this.statManaMax >= 200 || !this.ItemTimeIsZero) + return; + this.ApplyItemTime(sItem); + this.statManaMax += 20; + this.statManaMax2 += 20; + this.statMana += 20; + if (Main.myPlayer == this.whoAmI) + this.ManaEffect(20); + AchievementsHelper.HandleSpecialEvent(this, 1); + } + + private void ItemCheck_UseLifeFruit(Item sItem) + { + if (sItem.type != 1291 || this.itemAnimation <= 0 || this.statLifeMax < 400 || this.statLifeMax >= 500 || !this.ItemTimeIsZero) + return; + this.ApplyItemTime(sItem); + this.statLifeMax += 5; + this.statLifeMax2 += 5; + this.statLife += 5; + if (Main.myPlayer == this.whoAmI) + this.HealEffect(5); + AchievementsHelper.HandleSpecialEvent(this, 2); + } + + private void ItemCheck_UseLifeCrystal(Item sItem) + { + if (sItem.type != 29 || this.itemAnimation <= 0 || this.statLifeMax >= 400 || !this.ItemTimeIsZero) + return; + this.ApplyItemTime(sItem); + this.statLifeMax += 20; + this.statLifeMax2 += 20; + this.statLife += 20; + if (Main.myPlayer == this.whoAmI) + this.HealEffect(20); + AchievementsHelper.HandleSpecialEvent(this, 0); + } + + private void ItemCheck_UseCombatBook(Item sItem) + { + if (NPC.combatBookWasUsed || sItem.type != 4382 || this.itemAnimation <= 0 || !this.ItemTimeIsZero) + return; + this.ApplyItemTime(sItem); + if (Main.netMode == 0) + { + NPC.combatBookWasUsed = true; + Main.NewText(Language.GetTextValue("Misc.CombatBookUsed"), (byte) 50, B: (byte) 130); + } + else + NetMessage.SendData(61, number: this.whoAmI, number2: -11f); + } + + private void ItemCheck_UsePetLicenses(Item sItem) + { + if (sItem.type == 4829 && !NPC.boughtCat && this.itemAnimation > 0 && this.ItemTimeIsZero) + { + this.ApplyItemTime(sItem); + if (Main.netMode == 0) + { + NPC.boughtCat = true; + Main.NewText(Language.GetTextValue("Misc.LicenseCatUsed"), (byte) 50, B: (byte) 130); + } + else + NetMessage.SendData(61, number: this.whoAmI, number2: -12f); + } + if (sItem.type == 4830 && !NPC.boughtDog && this.itemAnimation > 0 && this.ItemTimeIsZero) + { + this.ApplyItemTime(sItem); + if (Main.netMode == 0) + { + NPC.boughtDog = true; + Main.NewText(Language.GetTextValue("Misc.LicenseDogUsed"), (byte) 50, B: (byte) 130); + } + else + NetMessage.SendData(61, number: this.whoAmI, number2: -13f); + } + if (sItem.type != 4910 || NPC.boughtBunny || this.itemAnimation <= 0 || !this.ItemTimeIsZero) + return; + this.ApplyItemTime(sItem); + if (Main.netMode == 0) + { + NPC.boughtBunny = true; + Main.NewText(Language.GetTextValue("Misc.LicenseBunnyUsed"), (byte) 50, B: (byte) 130); + } + else + NetMessage.SendData(61, number: this.whoAmI, number2: -14f); + } + + private void ItemCheck_UseRodOfDiscord(Item sItem) + { + if (Main.myPlayer != this.whoAmI || sItem.type != 1326 || this.itemAnimation <= 0 || !this.ItemTimeIsZero) + return; + this.ApplyItemTime(sItem); + Vector2 vector2; + vector2.X = (float) Main.mouseX + Main.screenPosition.X; + vector2.Y = (double) this.gravDir != 1.0 ? Main.screenPosition.Y + (float) Main.screenHeight - (float) Main.mouseY : (float) Main.mouseY + Main.screenPosition.Y - (float) this.height; + vector2.X -= (float) (this.width / 2); + if ((double) vector2.X <= 50.0 || (double) vector2.X >= (double) (Main.maxTilesX * 16 - 50) || (double) vector2.Y <= 50.0 || (double) vector2.Y >= (double) (Main.maxTilesY * 16 - 50)) + return; + int index1 = (int) ((double) vector2.X / 16.0); + int index2 = (int) ((double) vector2.Y / 16.0); + if (Main.tile[index1, index2].wall == (ushort) 87 && (double) index2 > Main.worldSurface && !NPC.downedPlantBoss || Collision.SolidCollision(vector2, this.width, this.height)) + return; + this.Teleport(vector2, 1); + NetMessage.SendData(65, number2: ((float) this.whoAmI), number3: vector2.X, number4: vector2.Y, number5: 1); + if (this.chaosState) + { + this.statLife -= this.statLifeMax2 / 7; + PlayerDeathReason damageSource = PlayerDeathReason.ByOther(13); + if (Main.rand.Next(2) == 0) + damageSource = PlayerDeathReason.ByOther(this.Male ? 14 : 15); + if (this.statLife <= 0) + this.KillMe(damageSource, 1.0, 0); + this.lifeRegenCount = 0; + this.lifeRegenTime = 0; + } + this.AddBuff(88, 360); + } + + private bool IsTilePoundable(Tile targetTile) => !Main.tileHammer[(int) targetTile.type] && !Main.tileSolid[(int) targetTile.type] && targetTile.type != (ushort) 314 && targetTile.type != (ushort) 424 && targetTile.type != (ushort) 442 && targetTile.type != (ushort) 351; + + private void UseShovel(Player user, Item item, int sX, int sY) + { + for (int x = sX - 1; x <= sX + 1; ++x) + { + for (int y = sY - 1; y <= sY + 1; ++y) + this.DamageTileWithShovel(user, item, x, y); + } + this.itemTime = (int) ((double) item.useTime * (double) this.pickSpeed); + } + + private void DamageTileWithShovel(Player user, Item item, int x, int y) + { + Tile tileSafely = Framing.GetTileSafely(x, y); + if (!TileID.Sets.CanBeDugByShovel[(int) tileSafely.type]) + return; + int pickPower = 30; + if (tileSafely.active() && TileID.Sets.Conversion.Grass[(int) tileSafely.type]) + this.PickTile(x, y, 100); + this.PickTile(x, y, pickPower); + } + + private void ItemCheck_UseMiningTools(Item sItem) + { + Player.SpecialToolUsageSettings toolUsageSettings = new Player.SpecialToolUsageSettings(); + if (sItem.type == 4711) + toolUsageSettings = new Player.SpecialToolUsageSettings() + { + IsAValidTool = true, + UsageAction = new Player.SpecialToolUsageSettings.UseToolAction(this.UseShovel) + }; + if ((sItem.pick > 0 || sItem.axe > 0 || sItem.hammer > 0 ? 1 : (toolUsageSettings.IsAValidTool ? 1 : 0)) == 0) + return; + bool flag = this.IsTargetTileInItemRange(sItem); + if (this.noBuilding) + flag = false; + if (flag && toolUsageSettings.UsageCondition != null) + flag = toolUsageSettings.UsageCondition(this, sItem, Player.tileTargetX, Player.tileTargetY); + if (this.toolTime == 0 && this.itemAnimation > 0 && this.controlUseItem) + { + Tile targetTile = Main.tile[Player.tileTargetX, Player.tileTargetY]; + if (!targetTile.active() || this.IsTilePoundable(targetTile)) + this.poundRelease = false; + } + if (!flag) + return; + if (!Main.GamepadDisableCursorItemIcon) + { + this.cursorItemIconEnabled = true; + Main.ItemIconCacheUpdate(sItem.type); + } + bool canHitWalls = false; + if (this.toolTime == 0 && this.itemAnimation > 0 && this.controlUseItem) + { + if (toolUsageSettings.UsageAction != null) + { + toolUsageSettings.UsageAction(this, sItem, Player.tileTargetX, Player.tileTargetY); + return; + } + this.ItemCheck_UseMiningTools_ActuallyUseMiningTool(sItem, out canHitWalls, Player.tileTargetX, Player.tileTargetY); + } + if (this.releaseUseItem) + this.poundRelease = true; + if (this.toolTime != 0 || this.itemAnimation <= 0 || !this.controlUseItem || !canHitWalls) + return; + int wX; + int wY; + Player.ItemCheck_UseMiningTools_TryFindingWallToHammer(out wX, out wY); + this.ItemCheck_UseMiningTools_TryHittingWall(sItem, wX, wY); + } + + private void ItemCheck_UseMiningTools_ActuallyUseMiningTool( + Item sItem, + out bool canHitWalls, + int x, + int y) + { + int num1 = 0; + canHitWalls = true; + Tile tile = Main.tile[x, y]; + if (!tile.active()) + return; + if (sItem.pick > 0 && !Main.tileAxe[(int) tile.type] && !Main.tileHammer[(int) tile.type] || sItem.axe > 0 && Main.tileAxe[(int) tile.type] || sItem.hammer > 0 && Main.tileHammer[(int) tile.type]) + canHitWalls = false; + int num2 = this.hitTile.HitObject(x, y, 1); + if (Main.tileNoFail[(int) tile.type]) + num1 = 100; + if (Main.tileHammer[(int) tile.type]) + { + canHitWalls = false; + if (sItem.hammer > 0) + { + int damageAmount = num1 + sItem.hammer; + if (!WorldGen.CanKillTile(x, y)) + damageAmount = 0; + if (tile.type == (ushort) 26 && (sItem.hammer < 80 || !Main.hardMode)) + { + damageAmount = 0; + this.Hurt(PlayerDeathReason.ByOther(4), this.statLife / 2, -this.direction); + } + AchievementsHelper.CurrentlyMining = true; + if (this.hitTile.AddDamage(num2, damageAmount) >= 100) + { + this.ClearMiningCacheAt(x, y, 1); + WorldGen.KillTile(x, y); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y)); + } + else + { + WorldGen.KillTile(x, y, true); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y), number4: 1f); + } + if (damageAmount != 0) + this.hitTile.Prune(); + this.ApplyItemTime(sItem); + AchievementsHelper.CurrentlyMining = false; + } + } + else if (Main.tileAxe[(int) tile.type]) + { + int damageAmount = tile.type != (ushort) 80 ? num1 + (int) ((double) sItem.axe * 1.20000004768372) : num1 + (int) ((double) (sItem.axe * 3) * 1.20000004768372); + if (sItem.axe > 0) + { + AchievementsHelper.CurrentlyMining = true; + if (!WorldGen.CanKillTile(x, y)) + damageAmount = 0; + if (this.hitTile.AddDamage(num2, damageAmount) >= 100) + { + this.ClearMiningCacheAt(x, y, 1); + WorldGen.KillTile(x, y); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y)); + } + else + { + WorldGen.KillTile(x, y, true); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y), number4: 1f); + } + if (damageAmount != 0) + this.hitTile.Prune(); + this.ApplyItemTime(sItem); + AchievementsHelper.CurrentlyMining = false; + } + } + else if (sItem.pick > 0) + this.PickTile(x, y, sItem.pick); + if (sItem.pick > 0) + this.itemTime = (int) ((double) sItem.useTime * (double) this.pickSpeed); + this.ItemCheck_UseMiningTools_TryPoundingTile(sItem, num2, ref canHitWalls, x, y); + } + + private static void ItemCheck_UseMiningTools_TryFindingWallToHammer(out int wX, out int wY) + { + wX = Player.tileTargetX; + wY = Player.tileTargetY; + bool flag = true; + if (Main.tile[wX, wY].wall > (ushort) 0) + { + if (!Main.wallHouse[(int) Main.tile[wX, wY].wall]) + { + for (int index1 = wX - 1; index1 < wX + 2; ++index1) + { + for (int index2 = wY - 1; index2 < wY + 2; ++index2) + { + if ((int) Main.tile[index1, index2].wall != (int) Main.tile[wX, wY].wall) + { + flag = false; + break; + } + } + } + } + else + flag = false; + } + if (!flag || Main.tile[wX, wY].active()) + return; + int num1 = -1; + if (((double) Main.mouseX + (double) Main.screenPosition.X) / 16.0 < Math.Round(((double) Main.mouseX + (double) Main.screenPosition.X) / 16.0)) + num1 = 0; + int num2 = -1; + if (((double) Main.mouseY + (double) Main.screenPosition.Y) / 16.0 < Math.Round(((double) Main.mouseY + (double) Main.screenPosition.Y) / 16.0)) + num2 = 0; + for (int index3 = Player.tileTargetX + num1; index3 <= Player.tileTargetX + num1 + 1; ++index3) + { + for (int index4 = Player.tileTargetY + num2; index4 <= Player.tileTargetY + num2 + 1; ++index4) + { + if (flag) + { + wX = index3; + wY = index4; + if (Main.tile[wX, wY].wall > (ushort) 0) + { + if (!Main.wallHouse[(int) Main.tile[wX, wY].wall]) + { + for (int index5 = wX - 1; index5 < wX + 2; ++index5) + { + for (int index6 = wY - 1; index6 < wY + 2; ++index6) + { + if ((int) Main.tile[index5, index6].wall != (int) Main.tile[wX, wY].wall) + { + flag = false; + break; + } + } + } + } + else + flag = false; + } + } + } + } + } + + private void ItemCheck_UseMiningTools_TryHittingWall(Item sItem, int wX, int wY) + { + if (Main.tile[wX, wY].wall <= (ushort) 0 || Main.tile[wX, wY].active() && wX == Player.tileTargetX && wY == Player.tileTargetY && (Main.tileHammer[(int) Main.tile[wX, wY].type] || this.poundRelease) || this.toolTime != 0 || this.itemAnimation <= 0 || !this.controlUseItem || sItem.hammer <= 0) + return; + bool flag = true; + if (!Main.wallHouse[(int) Main.tile[wX, wY].wall]) + { + flag = false; + for (int index1 = wX - 1; index1 < wX + 2; ++index1) + { + for (int index2 = wY - 1; index2 < wY + 2; ++index2) + { + if (Main.tile[index1, index2].wall == (ushort) 0 || Main.wallHouse[(int) Main.tile[index1, index2].wall]) + { + flag = true; + break; + } + } + } + } + if (!flag) + return; + int tileId = this.hitTile.HitObject(wX, wY, 2); + int damageAmount = (int) ((double) sItem.hammer * 1.5); + if (this.hitTile.AddDamage(tileId, damageAmount) >= 100) + { + this.hitTile.Clear(tileId); + this.ClearMiningCacheAt(wX, wY, 2); + WorldGen.KillWall(wX, wY); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 2, number2: ((float) wX), number3: ((float) wY)); + } + else + { + WorldGen.KillWall(wX, wY, true); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 2, number2: ((float) wX), number3: ((float) wY), number4: 1f); + } + if (damageAmount != 0) + this.hitTile.Prune(); + this.itemTime = sItem.useTime / 2; + } + + private void ItemCheck_UseMiningTools_TryPoundingTile( + Item sItem, + int tileHitId, + ref bool hitWall, + int x, + int y) + { + Tile tile1 = Main.tile[x, y]; + if (sItem.hammer > 0 && tile1.active() && (Main.tileSolid[(int) tile1.type] || tile1.type == (ushort) 314 || tile1.type == (ushort) 351 || tile1.type == (ushort) 424 || tile1.type == (ushort) 442) && this.poundRelease) + { + hitWall = false; + this.ApplyItemTime(sItem); + int damageAmount = 100; + if (WorldGen.IsLockedDoor(x, y - 1) || WorldGen.IsLockedDoor(x, y + 1)) + damageAmount = 0; + if (this.hitTile.AddDamage(tileHitId, damageAmount) >= 100) + { + this.ClearMiningCacheAt(x, y, 1); + if (!this.poundRelease) + return; + if (TileID.Sets.Platforms[(int) Main.tile[x, y].type]) + { + if (tile1.halfBrick()) + { + WorldGen.PoundTile(x, y); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 7, number2: ((float) x), number3: ((float) y), number4: 1f); + } + else + { + int slope1 = 1; + int slope2 = 2; + if (TileID.Sets.Platforms[(int) Main.tile[x + 1, y - 1].type] || TileID.Sets.Platforms[(int) Main.tile[x - 1, y + 1].type] || WorldGen.SolidTile(x + 1, y) && !WorldGen.SolidTile(x - 1, y)) + { + slope1 = 2; + slope2 = 1; + } + if (Main.tile[x, y].slope() == (byte) 0) + { + WorldGen.SlopeTile(x, y, slope1); + int num = (int) Main.tile[x, y].slope(); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 14, number2: ((float) x), number3: ((float) y), number4: ((float) num)); + } + else if ((int) Main.tile[x, y].slope() == slope1) + { + WorldGen.SlopeTile(x, y, slope2); + int num = (int) Main.tile[x, y].slope(); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 14, number2: ((float) x), number3: ((float) y), number4: ((float) num)); + } + else + { + WorldGen.SlopeTile(x, y); + int num = (int) Main.tile[x, y].slope(); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 14, number2: ((float) x), number3: ((float) y), number4: ((float) num)); + WorldGen.PoundTile(x, y); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 7, number2: ((float) x), number3: ((float) y), number4: 1f); + } + } + } + else if (Main.tile[x, y].type == (ushort) 314) + { + if (Minecart.FrameTrack(x, y, true) && Main.netMode == 1) + NetMessage.SendData(17, number: 15, number2: ((float) x), number3: ((float) y), number4: 1f); + } + else if (Main.tile[x, y].type == (ushort) 137) + { + int num = 0; + switch ((int) Main.tile[x, y].frameY / 18) + { + case 0: + case 1: + case 2: + switch ((int) Main.tile[x, y].frameX / 18) + { + case 0: + num = 2; + break; + case 1: + num = 3; + break; + case 2: + num = 4; + break; + case 3: + num = 5; + break; + case 4: + num = 1; + break; + case 5: + num = 0; + break; + } + break; + case 3: + case 4: + switch ((int) Main.tile[x, y].frameX / 18) + { + case 0: + case 1: + num = 3; + break; + case 2: + num = 4; + break; + case 3: + num = 2; + break; + case 4: + num = 0; + break; + } + break; + } + Main.tile[x, y].frameX = (short) (num * 18); + if (Main.netMode == 1) + NetMessage.SendTileSquare(-1, x, y, 1); + } + else if (Main.tile[x, y].type == (ushort) 424) + { + Main.tile[x, y].frameX = Main.tile[x, y].frameX != (short) 0 ? (Main.tile[x, y].frameX != (short) 18 ? (short) 0 : (short) 36) : (short) 18; + if (Main.netMode == 1) + NetMessage.SendTileSquare(-1, x, y, 1); + } + else if (Main.tile[x, y].type == (ushort) 442) + { + Tile tile2 = Main.tile[x, y - 1]; + Tile tile3 = Main.tile[x, y + 1]; + Tile tile4 = Main.tile[x - 1, y]; + Tile tile5 = Main.tile[x + 1, y]; + Tile tile6 = Main.tile[x - 1, y + 1]; + Tile tile7 = Main.tile[x + 1, y + 1]; + Tile tile8 = Main.tile[x - 1, y - 1]; + Tile tile9 = Main.tile[x + 1, y - 1]; + int index1 = -1; + int index2 = -1; + int tree1 = -1; + int tree2 = -1; + int tree3 = -1; + int tree4 = -1; + int tree5 = -1; + int tree6 = -1; + if (tile2 != null && tile2.nactive() && !tile2.bottomSlope()) + index2 = (int) tile2.type; + if (tile3 != null && tile3.nactive() && !tile3.halfBrick() && !tile3.topSlope()) + index1 = (int) tile3.type; + if (tile4 != null && tile4.nactive() && (tile4.slope() == (byte) 0 || (int) tile4.slope() % 2 != 1)) + tree1 = (int) tile4.type; + if (tile5 != null && tile5.nactive() && (tile5.slope() == (byte) 0 || (int) tile5.slope() % 2 != 0)) + tree2 = (int) tile5.type; + if (tile6 != null && tile6.nactive()) + tree3 = (int) tile6.type; + if (tile7 != null && tile7.nactive()) + tree4 = (int) tile7.type; + if (tile8 != null && tile8.nactive()) + tree5 = (int) tile8.type; + if (tile9 != null && tile9.nactive()) + tree6 = (int) tile9.type; + bool flag1 = false; + bool flag2 = false; + bool flag3 = false; + bool flag4 = false; + if (index1 >= 0 && Main.tileSolid[index1] && (!Main.tileNoAttach[index1] || TileID.Sets.Platforms[index1]) && (tile3.bottomSlope() || tile3.slope() == (byte) 0) && !tile3.halfBrick()) + flag4 = true; + if (index2 >= 0 && Main.tileSolid[index2] && (!Main.tileNoAttach[index2] || TileID.Sets.Platforms[index2] && tile2.halfBrick()) && (tile2.topSlope() || tile2.slope() == (byte) 0 || tile2.halfBrick())) + flag1 = true; + if (tree1 >= 0 && Main.tileSolid[tree1] && !Main.tileNoAttach[tree1] && (tile4.leftSlope() || tile4.slope() == (byte) 0) && !tile4.halfBrick() || tree1 >= 0 && TileID.Sets.IsBeam[tree1] || WorldGen.IsTreeType(tree1) && WorldGen.IsTreeType(tree5) && WorldGen.IsTreeType(tree3)) + flag2 = true; + if (tree2 >= 0 && Main.tileSolid[tree2] && !Main.tileNoAttach[tree2] && (tile5.rightSlope() || tile5.slope() == (byte) 0) && !tile5.halfBrick() || tree2 >= 0 && TileID.Sets.IsBeam[tree2] || WorldGen.IsTreeType(tree2) && WorldGen.IsTreeType(tree6) && WorldGen.IsTreeType(tree4)) + flag3 = true; + int num1 = (int) Main.tile[x, y].frameX / 22; + short num2 = -2; + switch (num1) + { + case 0: + num2 = !flag2 ? (!flag1 ? (!flag3 ? (short) -1 : (short) 3) : (short) 1) : (short) 2; + break; + case 1: + num2 = !flag3 ? (!flag4 ? (!flag2 ? (short) -1 : (short) 2) : (short) 0) : (short) 3; + break; + case 2: + num2 = !flag1 ? (!flag3 ? (!flag4 ? (short) -1 : (short) 0) : (short) 3) : (short) 1; + break; + case 3: + num2 = !flag4 ? (!flag2 ? (!flag1 ? (short) -1 : (short) 1) : (short) 2) : (short) 0; + break; + } + switch (num2) + { + case -2: + num2 = (short) 0; + break; + case -1: + goto label_106; + } + Main.tile[x, y].frameX = (short) (22 * (int) num2); + if (Main.netMode == 1) + NetMessage.SendTileSquare(-1, x, y, 1); + } + else if ((Main.tile[x, y].halfBrick() || Main.tile[x, y].slope() != (byte) 0) && !Main.tileSolidTop[(int) Main.tile[x, y].type]) + { + int num3 = 1; + int slope3 = 1; + int slope4 = 2; + if ((WorldGen.SolidTile(x + 1, y) || Main.tile[x + 1, y].slope() == (byte) 1 || Main.tile[x + 1, y].slope() == (byte) 3) && !WorldGen.SolidTile(x - 1, y)) + { + slope3 = 2; + slope4 = 1; + } + if (WorldGen.SolidTile(x, y - 1) && !WorldGen.SolidTile(x, y + 1)) + num3 = -1; + if (num3 == 1) + { + if (Main.tile[x, y].slope() == (byte) 0) + WorldGen.SlopeTile(x, y, slope3); + else if ((int) Main.tile[x, y].slope() == slope3) + WorldGen.SlopeTile(x, y, slope4); + else if ((int) Main.tile[x, y].slope() == slope4) + WorldGen.SlopeTile(x, y, slope3 + 2); + else if ((int) Main.tile[x, y].slope() == slope3 + 2) + WorldGen.SlopeTile(x, y, slope4 + 2); + else + WorldGen.SlopeTile(x, y); + } + else if (Main.tile[x, y].slope() == (byte) 0) + WorldGen.SlopeTile(x, y, slope3 + 2); + else if ((int) Main.tile[x, y].slope() == slope3 + 2) + WorldGen.SlopeTile(x, y, slope4 + 2); + else if ((int) Main.tile[x, y].slope() == slope4 + 2) + WorldGen.SlopeTile(x, y, slope3); + else if ((int) Main.tile[x, y].slope() == slope3) + WorldGen.SlopeTile(x, y, slope4); + else + WorldGen.SlopeTile(x, y); + int num4 = (int) Main.tile[x, y].slope(); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 14, number2: ((float) x), number3: ((float) y), number4: ((float) num4)); + } + else + { + WorldGen.PoundTile(x, y); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 7, number2: ((float) x), number3: ((float) y), number4: 1f); + } +label_106: + this.poundRelease = false; + } + else + { + WorldGen.KillTile(x, y, true, true); + SoundEngine.PlaySound(0, x * 16, y * 16); + } + } + else + this.poundRelease = false; + } + + private bool IsTargetTileInItemRange(Item sItem) => (double) this.position.X / 16.0 - (double) Player.tileRangeX - (double) sItem.tileBoost <= (double) Player.tileTargetX && ((double) this.position.X + (double) this.width) / 16.0 + (double) Player.tileRangeX + (double) sItem.tileBoost - 1.0 >= (double) Player.tileTargetX && (double) this.position.Y / 16.0 - (double) Player.tileRangeY - (double) sItem.tileBoost <= (double) Player.tileTargetY && ((double) this.position.Y + (double) this.height) / 16.0 + (double) Player.tileRangeY + (double) sItem.tileBoost - 2.0 >= (double) Player.tileTargetY; + + private void ItemCheck_UseBuckets(Item sItem) + { + if ((sItem.type < 205 || sItem.type > 207) && sItem.type != 1128 && sItem.type != 3031 && sItem.type != 3032 && sItem.type != 4820 && sItem.type != 4872 || this.noBuilding || (double) this.position.X / 16.0 - (double) Player.tileRangeX - (double) sItem.tileBoost > (double) Player.tileTargetX || ((double) this.position.X + (double) this.width) / 16.0 + (double) Player.tileRangeX + (double) sItem.tileBoost - 1.0 < (double) Player.tileTargetX || (double) this.position.Y / 16.0 - (double) Player.tileRangeY - (double) sItem.tileBoost > (double) Player.tileTargetY || ((double) this.position.Y + (double) this.height) / 16.0 + (double) Player.tileRangeY + (double) sItem.tileBoost - 2.0 < (double) Player.tileTargetY) + return; + if (!Main.GamepadDisableCursorItemIcon) + { + this.cursorItemIconEnabled = true; + Main.ItemIconCacheUpdate(sItem.type); + } + if (!this.ItemTimeIsZero || this.itemAnimation <= 0 || !this.controlUseItem) + return; + if (sItem.type == 205 || sItem.type == 3032 && Main.tile[Player.tileTargetX, Player.tileTargetY].liquidType() == (byte) 0 || sItem.type == 4872 && Main.tile[Player.tileTargetX, Player.tileTargetY].lava()) + { + int num1 = (int) Main.tile[Player.tileTargetX, Player.tileTargetY].liquidType(); + int num2 = 0; + for (int index1 = Player.tileTargetX - 1; index1 <= Player.tileTargetX + 1; ++index1) + { + for (int index2 = Player.tileTargetY - 1; index2 <= Player.tileTargetY + 1; ++index2) + { + if ((int) Main.tile[index1, index2].liquidType() == num1) + num2 += (int) Main.tile[index1, index2].liquid; + } + } + if (Main.tile[Player.tileTargetX, Player.tileTargetY].liquid <= (byte) 0 || num2 <= 100 && sItem.type != 3032 && sItem.type != 4872) + return; + int liquidType = (int) Main.tile[Player.tileTargetX, Player.tileTargetY].liquidType(); + if (sItem.type != 3032 && sItem.type != 4872) + { + if (!Main.tile[Player.tileTargetX, Player.tileTargetY].lava()) + { + if (Main.tile[Player.tileTargetX, Player.tileTargetY].honey()) + { + --sItem.stack; + this.PutItemInInventoryFromItemUsage(1128, this.selectedItem); + } + else + { + --sItem.stack; + this.PutItemInInventoryFromItemUsage(206, this.selectedItem); + } + } + else + { + --sItem.stack; + this.PutItemInInventoryFromItemUsage(207, this.selectedItem); + } + } + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + this.ApplyItemTime(sItem); + int liquid = (int) Main.tile[Player.tileTargetX, Player.tileTargetY].liquid; + Main.tile[Player.tileTargetX, Player.tileTargetY].liquid = (byte) 0; + Main.tile[Player.tileTargetX, Player.tileTargetY].lava(false); + Main.tile[Player.tileTargetX, Player.tileTargetY].honey(false); + WorldGen.SquareTileFrame(Player.tileTargetX, Player.tileTargetY, false); + if (Main.netMode == 1) + NetMessage.sendWater(Player.tileTargetX, Player.tileTargetY); + else + Liquid.AddWater(Player.tileTargetX, Player.tileTargetY); + for (int index3 = Player.tileTargetX - 1; index3 <= Player.tileTargetX + 1; ++index3) + { + for (int index4 = Player.tileTargetY - 1; index4 <= Player.tileTargetY + 1; ++index4) + { + if (liquid < 256 && (int) Main.tile[index3, index4].liquidType() == num1) + { + int num3 = (int) Main.tile[index3, index4].liquid; + if (num3 + liquid > (int) byte.MaxValue) + num3 = (int) byte.MaxValue - liquid; + liquid += num3; + Main.tile[index3, index4].liquid -= (byte) num3; + Main.tile[index3, index4].liquidType(liquidType); + if (Main.tile[index3, index4].liquid == (byte) 0) + { + Main.tile[index3, index4].lava(false); + Main.tile[index3, index4].honey(false); + } + WorldGen.SquareTileFrame(index3, index4, false); + if (Main.netMode == 1) + NetMessage.sendWater(index3, index4); + else + Liquid.AddWater(index3, index4); + } + } + } + } + else + { + if (Main.tile[Player.tileTargetX, Player.tileTargetY].liquid >= (byte) 200 || Main.tile[Player.tileTargetX, Player.tileTargetY].nactive() && Main.tileSolid[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type] && !Main.tileSolidTop[(int) Main.tile[Player.tileTargetX, Player.tileTargetY].type] && Main.tile[Player.tileTargetX, Player.tileTargetY].type != (ushort) 546) + return; + if (sItem.type == 207 || sItem.type == 4820) + { + if (Main.tile[Player.tileTargetX, Player.tileTargetY].liquid != (byte) 0 && Main.tile[Player.tileTargetX, Player.tileTargetY].liquidType() != (byte) 1) + return; + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + Main.tile[Player.tileTargetX, Player.tileTargetY].liquidType(1); + Main.tile[Player.tileTargetX, Player.tileTargetY].liquid = byte.MaxValue; + WorldGen.SquareTileFrame(Player.tileTargetX, Player.tileTargetY); + if (sItem.type != 4820) + { + --sItem.stack; + this.PutItemInInventoryFromItemUsage(205, this.selectedItem); + } + this.ApplyItemTime(sItem); + if (Main.netMode != 1) + return; + NetMessage.sendWater(Player.tileTargetX, Player.tileTargetY); + } + else if (sItem.type == 206 || sItem.type == 3031) + { + if (Main.tile[Player.tileTargetX, Player.tileTargetY].liquid != (byte) 0 && Main.tile[Player.tileTargetX, Player.tileTargetY].liquidType() != (byte) 0) + return; + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + Main.tile[Player.tileTargetX, Player.tileTargetY].liquidType(0); + Main.tile[Player.tileTargetX, Player.tileTargetY].liquid = byte.MaxValue; + WorldGen.SquareTileFrame(Player.tileTargetX, Player.tileTargetY); + if (sItem.type != 3031) + { + --sItem.stack; + this.PutItemInInventoryFromItemUsage(205, this.selectedItem); + } + this.ApplyItemTime(sItem); + if (Main.netMode != 1) + return; + NetMessage.sendWater(Player.tileTargetX, Player.tileTargetY); + } + else + { + if (sItem.type != 1128 || Main.tile[Player.tileTargetX, Player.tileTargetY].liquid != (byte) 0 && Main.tile[Player.tileTargetX, Player.tileTargetY].liquidType() != (byte) 2) + return; + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + Main.tile[Player.tileTargetX, Player.tileTargetY].liquidType(2); + Main.tile[Player.tileTargetX, Player.tileTargetY].liquid = byte.MaxValue; + WorldGen.SquareTileFrame(Player.tileTargetX, Player.tileTargetY); + --sItem.stack; + this.PutItemInInventoryFromItemUsage(205, this.selectedItem); + this.ApplyItemTime(sItem); + if (Main.netMode != 1) + return; + NetMessage.sendWater(Player.tileTargetX, Player.tileTargetY); + } + } + } + + private void ItemCheck_PlayInstruments(Item sItem) + { + if (this.itemAnimation > 0 && this.ItemTimeIsZero && (sItem.type == 508 || sItem.type == 507)) + { + this.ApplyItemTime(sItem); + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + double num1 = (double) Main.mouseX + (double) Main.screenPosition.X - (double) vector2.X; + float num2 = (float) Main.mouseY + Main.screenPosition.Y - vector2.Y; + float num3 = (float) Math.Sqrt(num1 * num1 + (double) num2 * (double) num2) / ((float) Main.screenHeight / Main.GameViewMatrix.Zoom.Y / 2f); + if ((double) num3 > 1.0) + num3 = 1f; + float num4 = (float) ((double) num3 * 2.0 - 1.0); + if ((double) num4 < -1.0) + num4 = -1f; + if ((double) num4 > 1.0) + num4 = 1f; + float number2 = (float) Math.Round((double) num4 * (double) Player.musicNotes) / (float) Player.musicNotes; + Main.musicPitch = number2; + LegacySoundStyle type = SoundID.Item26; + if (sItem.type == 507) + type = SoundID.Item35; + SoundEngine.PlaySound(type, this.position); + NetMessage.SendData(58, number: this.whoAmI, number2: number2); + } + if (this.itemAnimation <= 0 || this.mouseInterface) + return; + if (Main.mouseLeft && Main.mouseLeftRelease) + { + if (sItem.type == 1305) + { + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + double num5 = (double) Main.mouseX + (double) Main.screenPosition.X - (double) vector2.X; + float num6 = (float) Main.mouseY + Main.screenPosition.Y - vector2.Y; + float num7 = (float) Math.Sqrt(num5 * num5 + (double) num6 * (double) num6) / ((float) Main.screenHeight / Main.GameViewMatrix.Zoom.Y / 2f); + if ((double) num7 > 1.0) + num7 = 1f; + float num8 = (float) ((double) num7 * 2.0 - 1.0); + if ((double) num8 < -1.0) + num8 = -1f; + if ((double) num8 > 1.0) + num8 = 1f; + float number2 = (float) Math.Round((double) num8 * (double) Player.musicNotes) / (float) Player.musicNotes; + Main.musicPitch = number2; + SoundEngine.PlaySound(SoundID.Item47, this.position); + NetMessage.SendData(58, number: this.whoAmI, number2: number2); + } + else if (sItem.type == 4057 || sItem.type == 4372) + { + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + double num9 = (double) Main.mouseX + (double) Main.screenPosition.X - (double) vector2.X; + float num10 = (float) Main.mouseY + Main.screenPosition.Y - vector2.Y; + float num11 = (float) Math.Sqrt(num9 * num9 + (double) num10 * (double) num10) / ((float) Main.screenHeight / Main.GameViewMatrix.Zoom.Y / 2f); + if ((double) num11 > 1.0) + num11 = 1f; + this.PlayGuitarChord(num11); + NetMessage.SendData(58, number: this.whoAmI, number2: num11); + } + } + if (sItem.type == 4715 && ((!Main.mouseLeft ? 0 : (Main.mouseLeftRelease ? 1 : 0)) | (this.itemAnimation == this.itemAnimationMax - 1 ? 1 : 0)) != 0) + { + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + double num12 = (double) Main.mouseX + (double) Main.screenPosition.X - (double) vector2.X; + float num13 = (float) Main.mouseY + Main.screenPosition.Y - vector2.Y; + float num14 = (float) Math.Sqrt(num12 * num12 + (double) num13 * (double) num13) / ((float) Main.screenHeight / Main.GameViewMatrix.Zoom.Y / 2f); + if ((double) num14 > 1.0) + num14 = 1f; + this.PlayGuitarChord(num14); + NetMessage.SendData(58, number: this.whoAmI, number2: num14); + } + if (sItem.type != 4673) + return; + int x = (int) this.Center.X / 16; + int y = (int) this.Center.Y / 16; + if (!WorldGen.InWorld(x, y) || Main.tile[x, y] == null || Main.tile[x, y].type != (ushort) 486 || (!Main.mouseLeft || !Main.mouseLeftRelease) && (!Main.mouseRight || !Main.mouseRightRelease)) + return; + Vector2 vector2_1 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + double num15 = (double) Main.mouseX + (double) Main.screenPosition.X - (double) vector2_1.X; + float num16 = (float) Main.mouseY + Main.screenPosition.Y - vector2_1.Y; + float num17 = (float) Math.Sqrt(num15 * num15 + (double) num16 * (double) num16) / ((float) Main.screenHeight / Main.GameViewMatrix.Zoom.Y / 2f); + if ((double) num17 > 1.0) + num17 = 1f; + this.PlayDrums(num17); + NetMessage.SendData(58, number: this.whoAmI, number2: num17); + } + + private bool GetSparkleGuitarTarget(out List validTargets) + { + validTargets = new List(); + Microsoft.Xna.Framework.Rectangle rectangle = Utils.CenteredRectangle(this.Center, new Vector2(1000f, 800f)); + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.CanBeChasedBy((object) this) && npc.Hitbox.Intersects(rectangle)) + validTargets.Add(npc); + } + return validTargets.Count != 0; + } + + private bool GetZenithTarget(Vector2 searchCenter, float maxDistance, out int npcTargetIndex) + { + npcTargetIndex = 0; + int? nullable = new int?(); + float num1 = maxDistance; + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.CanBeChasedBy((object) this)) + { + float num2 = searchCenter.Distance(npc.Center); + if ((double) num1 > (double) num2) + { + nullable = new int?(index); + num1 = num2; + } + } + } + if (!nullable.HasValue) + return false; + npcTargetIndex = nullable.Value; + return true; + } + + public void PlayGuitarChord(float range) + { + float num = 1f / 6f; + if ((double) range > (double) num * 5.0) + SoundEngine.PlaySound(51, this.Center); + else if ((double) range > (double) num * 4.0) + SoundEngine.PlaySound(47, this.Center); + else if ((double) range > (double) num * 3.0) + SoundEngine.PlaySound(48, this.Center); + else if ((double) range > (double) num * 2.0) + SoundEngine.PlaySound(49, this.Center); + else if ((double) range > (double) num * 1.0) + SoundEngine.PlaySound(50, this.Center); + else + SoundEngine.PlaySound(52, this.Center); + } + + public void PlayDrums(float range) + { + float num = 1f / 10f; + if ((double) range > (double) num * 9.0) + SoundEngine.PlaySound(59, this.Center); + else if ((double) range > (double) num * 8.0) + SoundEngine.PlaySound(58, this.Center); + else if ((double) range > (double) num * 7.0) + SoundEngine.PlaySound(53, this.Center); + else if ((double) range > (double) num * 6.0) + SoundEngine.PlaySound(57, this.Center); + else if ((double) range > (double) num * 5.0) + SoundEngine.PlaySound(62, this.Center); + else if ((double) range > (double) num * 4.0) + SoundEngine.PlaySound(61, this.Center); + else if ((double) range > (double) num * 3.0) + SoundEngine.PlaySound(54, this.Center); + else if ((double) range > (double) num * 2.0) + SoundEngine.PlaySound(56, this.Center); + else if ((double) range > (double) num * 1.0) + SoundEngine.PlaySound(55, this.Center); + else + SoundEngine.PlaySound(60, this.Center); + } + + private void ItemCheck_UseWiringTools(Item sItem) + { + if (sItem.type != 509 && sItem.type != 510 && sItem.type != 849 && sItem.type != 850 && sItem.type != 851 && sItem.type != 3612 && sItem.type != 3620 && sItem.type != 3625 || (double) this.position.X / 16.0 - (double) Player.tileRangeX - (double) sItem.tileBoost - (double) this.blockRange > (double) Player.tileTargetX || ((double) this.position.X + (double) this.width) / 16.0 + (double) Player.tileRangeX + (double) sItem.tileBoost - 1.0 + (double) this.blockRange < (double) Player.tileTargetX || (double) this.position.Y / 16.0 - (double) Player.tileRangeY - (double) sItem.tileBoost - (double) this.blockRange > (double) Player.tileTargetY || ((double) this.position.Y + (double) this.height) / 16.0 + (double) Player.tileRangeY + (double) sItem.tileBoost - 2.0 + (double) this.blockRange < (double) Player.tileTargetY) + return; + if (!Main.GamepadDisableCursorItemIcon) + { + this.cursorItemIconEnabled = true; + Main.ItemIconCacheUpdate(sItem.type); + } + if (this.itemAnimation <= 0 || !this.ItemTimeIsZero || !this.controlUseItem) + return; + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + if (sItem.type == 509) + { + int index1 = -1; + for (int index2 = 0; index2 < 58; ++index2) + { + if (this.inventory[index2].stack > 0 && this.inventory[index2].type == 530) + { + index1 = index2; + break; + } + } + if (index1 >= 0 && WorldGen.PlaceWire(tileTargetX, tileTargetY)) + { + --this.inventory[index1].stack; + if (this.inventory[index1].stack <= 0) + this.inventory[index1].SetDefaults(); + this.ApplyItemTime(sItem); + NetMessage.SendData(17, number: 5, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + } + else if (sItem.type == 850) + { + int index3 = -1; + for (int index4 = 0; index4 < 58; ++index4) + { + if (this.inventory[index4].stack > 0 && this.inventory[index4].type == 530) + { + index3 = index4; + break; + } + } + if (index3 >= 0 && WorldGen.PlaceWire2(tileTargetX, tileTargetY)) + { + --this.inventory[index3].stack; + if (this.inventory[index3].stack <= 0) + this.inventory[index3].SetDefaults(); + this.ApplyItemTime(sItem); + NetMessage.SendData(17, number: 10, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + } + if (sItem.type == 851) + { + int index5 = -1; + for (int index6 = 0; index6 < 58; ++index6) + { + if (this.inventory[index6].stack > 0 && this.inventory[index6].type == 530) + { + index5 = index6; + break; + } + } + if (index5 >= 0 && WorldGen.PlaceWire3(tileTargetX, tileTargetY)) + { + --this.inventory[index5].stack; + if (this.inventory[index5].stack <= 0) + this.inventory[index5].SetDefaults(); + this.ApplyItemTime(sItem); + NetMessage.SendData(17, number: 12, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + } + if (sItem.type == 3612) + { + int index7 = -1; + for (int index8 = 0; index8 < 58; ++index8) + { + if (this.inventory[index8].stack > 0 && this.inventory[index8].type == 530) + { + index7 = index8; + break; + } + } + if (index7 >= 0 && WorldGen.PlaceWire4(tileTargetX, tileTargetY)) + { + --this.inventory[index7].stack; + if (this.inventory[index7].stack <= 0) + this.inventory[index7].SetDefaults(); + this.ApplyItemTime(sItem); + NetMessage.SendData(17, number: 16, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + } + else if (sItem.type == 510) + { + if (WorldGen.KillActuator(tileTargetX, tileTargetY)) + { + this.ApplyItemTime(sItem); + NetMessage.SendData(17, number: 9, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + else if (WorldGen.KillWire4(tileTargetX, tileTargetY)) + { + this.ApplyItemTime(sItem); + NetMessage.SendData(17, number: 17, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + else if (WorldGen.KillWire3(tileTargetX, tileTargetY)) + { + this.ApplyItemTime(sItem); + NetMessage.SendData(17, number: 13, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + else if (WorldGen.KillWire2(tileTargetX, tileTargetY)) + { + this.ApplyItemTime(sItem); + NetMessage.SendData(17, number: 11, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + else if (WorldGen.KillWire(tileTargetX, tileTargetY)) + { + this.ApplyItemTime(sItem); + NetMessage.SendData(17, number: 6, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + } + else if (sItem.type == 849 && sItem.stack > 0 && WorldGen.PlaceActuator(tileTargetX, tileTargetY)) + { + this.ApplyItemTime(sItem); + NetMessage.SendData(17, number: 8, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + --sItem.stack; + if (sItem.stack <= 0) + sItem.SetDefaults(); + } + if (sItem.type == 3620) + { + Tile tile = Main.tile[tileTargetX, tileTargetY]; + if (tile != null && tile.actuator()) + { + bool flag = tile.inActive(); + if ((!this.ActuationRodLock || this.ActuationRodLockSetting == tile.inActive()) && Wiring.Actuate(tileTargetX, tileTargetY) && flag != tile.inActive()) + { + this.ActuationRodLock = true; + this.ActuationRodLockSetting = !tile.inActive(); + this.ApplyItemTime(sItem); + NetMessage.SendData(17, number: 19, number2: ((float) Player.tileTargetX), number3: ((float) Player.tileTargetY)); + } + } + } + if (sItem.type != 3625) + return; + Point point = new Point(Player.tileTargetX, Player.tileTargetY); + this.ApplyItemTime(sItem); + int toolMode = (int) WiresUI.Settings.ToolMode; + WiresUI.Settings.ToolMode &= ~WiresUI.Settings.MultiToolMode.Actuator; + if (Main.netMode == 1) + NetMessage.SendData(109, number: point.X, number2: ((float) point.Y), number3: ((float) point.X), number4: ((float) point.Y), number5: ((int) WiresUI.Settings.ToolMode)); + else + Wiring.MassWireOperation(point, point, this); + WiresUI.Settings.ToolMode = (WiresUI.Settings.MultiToolMode) toolMode; + } + + private void ItemCheck_UseLawnMower(Item sItem) + { + if (sItem.type != 4049 || (double) this.position.X / 16.0 - (double) Player.tileRangeX - (double) sItem.tileBoost - (double) this.blockRange > (double) Player.tileTargetX || ((double) this.position.X + (double) this.width) / 16.0 + (double) Player.tileRangeX + (double) sItem.tileBoost - 1.0 + (double) this.blockRange < (double) Player.tileTargetX || (double) this.position.Y / 16.0 - (double) Player.tileRangeY - (double) sItem.tileBoost - (double) this.blockRange > (double) Player.tileTargetY || ((double) this.position.Y + (double) this.height) / 16.0 + (double) Player.tileRangeY + (double) sItem.tileBoost - 2.0 + (double) this.blockRange < (double) Player.tileTargetY || this.itemAnimation <= 0 || !this.ItemTimeIsZero || !this.controlUseItem) + return; + this.MowGrassTile(new Point(Player.tileTargetX, Player.tileTargetY).ToWorldCoordinates()); + this.ApplyItemTime(sItem); + } + + private void DestroyOldestProximityMinesOverMinesCap(int minesCap) + { + Player._oldestProjCheckList.Clear(); + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && projectile.owner == this.whoAmI) + { + switch (projectile.type) + { + case 135: + case 138: + case 141: + case 144: + case 778: + case 782: + case 786: + case 789: + case 792: + case 795: + case 798: + case 801: + Player._oldestProjCheckList.Add(projectile); + continue; + default: + continue; + } + } + } + while (Player._oldestProjCheckList.Count > minesCap) + { + Projectile oldestProjCheck = Player._oldestProjCheckList[0]; + for (int index = 1; index < Player._oldestProjCheckList.Count; ++index) + { + if (Player._oldestProjCheckList[index].timeLeft < oldestProjCheck.timeLeft) + oldestProjCheck = Player._oldestProjCheckList[index]; + } + oldestProjCheck.Kill(); + Player._oldestProjCheckList.Remove(oldestProjCheck); + } + Player._oldestProjCheckList.Clear(); + } + + private void ItemCheck_Shoot(int i, Item sItem, int weaponDamage) + { + int projToShoot = sItem.shoot; + float shootSpeed = sItem.shootSpeed; + int damage = sItem.damage; + if (sItem.melee && projToShoot != 699 && projToShoot != 707) + shootSpeed /= this.meleeSpeed; + bool canShoot = false; + int Damage1 = weaponDamage; + float knockBack = sItem.knockBack; + if (projToShoot == 13 || projToShoot == 32 || projToShoot == 315 || projToShoot >= 230 && projToShoot <= 235 || projToShoot == 331) + { + this.grappling[0] = -1; + this.grapCount = 0; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == i) + { + if (Main.projectile[index].type == 13) + Main.projectile[index].Kill(); + if (Main.projectile[index].type == 331) + Main.projectile[index].Kill(); + if (Main.projectile[index].type == 315) + Main.projectile[index].Kill(); + if (Main.projectile[index].type >= 230 && Main.projectile[index].type <= 235) + Main.projectile[index].Kill(); + } + } + } + if (sItem.useAmmo > 0) + this.PickAmmo(sItem, ref projToShoot, ref shootSpeed, ref canShoot, ref Damage1, ref knockBack, ItemID.Sets.gunProj[sItem.type]); + else + canShoot = true; + if (ItemID.Sets.gunProj[sItem.type]) + { + knockBack = sItem.knockBack; + Damage1 = weaponDamage; + shootSpeed = sItem.shootSpeed; + } + if (sItem.IsACoin) + canShoot = false; + if (sItem.type == 1254 && projToShoot == 14) + projToShoot = 242; + if (sItem.type == 1255 && projToShoot == 14) + projToShoot = 242; + if (sItem.type == 1265 && projToShoot == 14) + projToShoot = 242; + if (sItem.type == 3542) + { + if (Main.rand.Next(100) < 20) + { + ++projToShoot; + Damage1 *= 3; + } + else + --shootSpeed; + } + if (sItem.type == 1928) + Damage1 /= 2; + if (projToShoot == 73) + { + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == i) + { + if (Main.projectile[index].type == 73) + projToShoot = 74; + if (projToShoot == 74 && Main.projectile[index].type == 74) + canShoot = false; + } + } + } + if (canShoot) + { + float num1 = this.GetWeaponKnockback(sItem, knockBack); + if (projToShoot == 228) + num1 = 0.0f; + if (projToShoot == 1 && sItem.type == 120) + projToShoot = 2; + if (sItem.type == 682) + projToShoot = 117; + if (sItem.type == 725) + projToShoot = 120; + if (sItem.type == 2796) + projToShoot = 442; + if (sItem.type == 2223) + projToShoot = 357; + this.ApplyItemTime(sItem); + Vector2 vector2_1 = this.RotatedRelativePoint(this.MountedCenter, true); + bool flag1 = true; + if (sItem.type == 3611) + flag1 = false; + Vector2 vector2_2 = Vector2.UnitX.RotatedBy((double) this.fullRotation); + Vector2 v1 = Main.MouseWorld - vector2_1; + Vector2 v2 = this.itemRotation.ToRotationVector2() * (float) this.direction; + if (sItem.type == 3852 && this.itemAnimation != this.itemAnimationMax - 1) + v1 = (v2.ToRotation() + this.fullRotation).ToRotationVector2(); + if (v1 != Vector2.Zero) + v1.Normalize(); + Vector2 vector2_3 = v1; + float num2 = Vector2.Dot(vector2_2, vector2_3); + if (flag1) + { + if ((double) num2 > 0.0) + this.ChangeDir(1); + else + this.ChangeDir(-1); + } + if (sItem.type == 3094 || sItem.type == 3378 || sItem.type == 3543) + vector2_1.Y = this.position.Y + (float) (this.height / 3); + if (sItem.type == 2611) + { + Vector2 vector2_4 = v1; + if (vector2_4 != Vector2.Zero) + vector2_4.Normalize(); + vector2_1 += vector2_4; + } + if (sItem.type == 3827) + vector2_1 += v1.SafeNormalize(Vector2.Zero).RotatedBy((double) this.direction * -1.57079637050629) * 24f; + if (projToShoot == 9) + { + vector2_1 = new Vector2((float) ((double) this.position.X + (double) this.width * 0.5 + (double) (Main.rand.Next(201) * -this.direction) + ((double) Main.mouseX + (double) Main.screenPosition.X - (double) this.position.X)), this.MountedCenter.Y - 600f); + num1 = 0.0f; + Damage1 *= 2; + } + if (sItem.type == 986 || sItem.type == 281) + { + vector2_1.X += (float) (6 * this.direction); + vector2_1.Y -= 6f * this.gravDir; + } + if (sItem.type == 3007) + { + vector2_1.X -= (float) (4 * this.direction); + vector2_1.Y -= 2f * this.gravDir; + } + float f1 = (float) Main.mouseX + Main.screenPosition.X - vector2_1.X; + float f2 = (float) Main.mouseY + Main.screenPosition.Y - vector2_1.Y; + if (sItem.type == 3852 && this.itemAnimation != this.itemAnimationMax - 1) + { + Vector2 vector2_5 = v1; + f1 = vector2_5.X; + f2 = vector2_5.Y; + } + if ((double) this.gravDir == -1.0) + f2 = Main.screenPosition.Y + (float) Main.screenHeight - (float) Main.mouseY - vector2_1.Y; + float num3 = (float) Math.Sqrt((double) f1 * (double) f1 + (double) f2 * (double) f2); + float num4 = num3; + float num5; + if (float.IsNaN(f1) && float.IsNaN(f2) || (double) f1 == 0.0 && (double) f2 == 0.0) + { + f1 = (float) this.direction; + f2 = 0.0f; + num5 = shootSpeed; + } + else + num5 = shootSpeed / num3; + if (sItem.type == 1929 || sItem.type == 2270) + { + f1 += (float) Main.rand.Next(-50, 51) * 0.03f / num5; + f2 += (float) Main.rand.Next(-50, 51) * 0.03f / num5; + } + float num6 = f1 * num5; + float num7 = f2 * num5; + if (sItem.type == 757) + Damage1 = (int) ((double) Damage1 * 1.25); + if (projToShoot == 250) + { + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == this.whoAmI && (Main.projectile[index].type == 250 || Main.projectile[index].type == 251)) + Main.projectile[index].Kill(); + } + } + if (projToShoot == 12 && Collision.CanHitLine(this.Center, 0, 0, vector2_1 + new Vector2(num6, num7) * 4f, 0, 0)) + vector2_1 += new Vector2(num6, num7) * 3f; + if (projToShoot == 728 && !Collision.CanHitLine(this.Center, 0, 0, vector2_1 + new Vector2(num6, num7) * 2f, 0, 0)) + { + vector2_1 = this.Center - new Vector2(num6, num7); + num6 *= 0.5f; + num7 *= 0.5f; + } + if (projToShoot == 802 || projToShoot == 842) + { + Vector2 v3 = new Vector2(num6, num7); + float num8 = 0.7853982f; + Vector2 vector2_6 = v3.SafeNormalize(Vector2.Zero).RotatedBy((double) num8 * ((double) Main.rand.NextFloat() - 0.5)) * (v3.Length() - Main.rand.NextFloatDirection() * 0.7f); + num6 = vector2_6.X; + num7 = vector2_6.Y; + } + if (sItem.useStyle == 5) + { + if (sItem.type == 3029) + { + Vector2 vector2_7 = new Vector2(num6, num7); + vector2_7.X = (float) Main.mouseX + Main.screenPosition.X - vector2_1.X; + vector2_7.Y = (float) ((double) Main.mouseY + (double) Main.screenPosition.Y - (double) vector2_1.Y - 1000.0); + this.itemRotation = (float) Math.Atan2((double) vector2_7.Y * (double) this.direction, (double) vector2_7.X * (double) this.direction); + NetMessage.SendData(13, number: this.whoAmI); + NetMessage.SendData(41, number: this.whoAmI); + } + if (sItem.type == 4381) + { + Vector2 vector2_8 = new Vector2(num6, num7); + vector2_8.X = (float) Main.mouseX + Main.screenPosition.X - vector2_1.X; + vector2_8.Y = (float) ((double) Main.mouseY + (double) Main.screenPosition.Y - (double) vector2_1.Y - 1000.0); + this.itemRotation = (float) Math.Atan2((double) vector2_8.Y * (double) this.direction, (double) vector2_8.X * (double) this.direction); + NetMessage.SendData(13, number: this.whoAmI); + NetMessage.SendData(41, number: this.whoAmI); + } + else if (sItem.type == 3779) + { + this.itemRotation = 0.0f; + NetMessage.SendData(13, number: this.whoAmI); + NetMessage.SendData(41, number: this.whoAmI); + } + else + { + this.itemRotation = (float) Math.Atan2((double) num7 * (double) this.direction, (double) num6 * (double) this.direction) - this.fullRotation; + NetMessage.SendData(13, number: this.whoAmI); + NetMessage.SendData(41, number: this.whoAmI); + } + } + if (sItem.useStyle == 13) + { + this.itemRotation = (float) Math.Atan2((double) num7 * (double) this.direction, (double) num6 * (double) this.direction) - this.fullRotation; + NetMessage.SendData(13, number: this.whoAmI); + NetMessage.SendData(41, number: this.whoAmI); + } + if (projToShoot == 17) + { + vector2_1.X = (float) Main.mouseX + Main.screenPosition.X; + vector2_1.Y = (float) Main.mouseY + Main.screenPosition.Y; + if ((double) this.gravDir == -1.0) + vector2_1.Y = Main.screenPosition.Y + (float) Main.screenHeight - (float) Main.mouseY; + } + if (projToShoot == 76) + { + projToShoot += Main.rand.Next(3); + float num9 = (float) Main.screenHeight / Main.GameViewMatrix.Zoom.Y; + float num10 = num4 / (num9 / 2f); + if ((double) num10 > 1.0) + num10 = 1f; + float num11 = num6 + (float) Main.rand.Next(-40, 41) * 0.01f; + float num12 = num7 + (float) Main.rand.Next(-40, 41) * 0.01f; + float SpeedX = num11 * (num10 + 0.25f); + float SpeedY = num12 * (num10 + 0.25f); + int number = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + Main.projectile[number].ai[1] = 1f; + float num13 = (float) ((double) num10 * 2.0 - 1.0); + if ((double) num13 < -1.0) + num13 = -1f; + if ((double) num13 > 1.0) + num13 = 1f; + float num14 = (float) Math.Round((double) num13 * (double) Player.musicNotes) / (float) Player.musicNotes; + Main.projectile[number].ai[0] = num14; + NetMessage.SendData(27, number: number); + } + else if (sItem.type == 3029) + { + int num15 = 3; + if (projToShoot == 91 || projToShoot == 4 || projToShoot == 5 || projToShoot == 41) + { + if (Main.rand.Next(3) == 0) + --num15; + } + else if (Main.rand.Next(3) == 0) + ++num15; + for (int index1 = 0; index1 < num15; ++index1) + { + vector2_1 = new Vector2((float) ((double) this.position.X + (double) this.width * 0.5 + (double) (Main.rand.Next(201) * -this.direction) + ((double) Main.mouseX + (double) Main.screenPosition.X - (double) this.position.X)), this.MountedCenter.Y - 600f); + vector2_1.X = (float) (((double) vector2_1.X * 10.0 + (double) this.Center.X) / 11.0) + (float) Main.rand.Next(-100, 101); + vector2_1.Y -= (float) (150 * index1); + float num16 = (float) Main.mouseX + Main.screenPosition.X - vector2_1.X; + float num17 = (float) Main.mouseY + Main.screenPosition.Y - vector2_1.Y; + if ((double) num17 < 0.0) + num17 *= -1f; + if ((double) num17 < 20.0) + num17 = 20f; + float num18 = (float) Math.Sqrt((double) num16 * (double) num16 + (double) num17 * (double) num17); + float num19 = shootSpeed / num18; + float num20 = num16 * num19; + float num21 = num17 * num19; + float num22 = num20 + (float) Main.rand.Next(-40, 41) * 0.03f; + float SpeedY = num21 + (float) Main.rand.Next(-40, 41) * 0.03f; + float SpeedX = num22 * ((float) Main.rand.Next(75, 150) * 0.01f); + vector2_1.X += (float) Main.rand.Next(-50, 51); + int index2 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + Main.projectile[index2].noDropItem = true; + } + } + else if (sItem.type == 4381) + { + int num23 = Main.rand.Next(1, 3); + if (Main.rand.Next(3) == 0) + ++num23; + for (int index3 = 0; index3 < num23; ++index3) + { + vector2_1 = new Vector2((float) ((double) this.position.X + (double) this.width * 0.5 + (double) (Main.rand.Next(61) * -this.direction) + ((double) Main.mouseX + (double) Main.screenPosition.X - (double) this.position.X)), this.MountedCenter.Y - 600f); + vector2_1.X = (float) (((double) vector2_1.X * 10.0 + (double) this.Center.X) / 11.0) + (float) Main.rand.Next(-30, 31); + vector2_1.Y -= 150f * Main.rand.NextFloat(); + float num24 = (float) Main.mouseX + Main.screenPosition.X - vector2_1.X; + float num25 = (float) Main.mouseY + Main.screenPosition.Y - vector2_1.Y; + if ((double) num25 < 0.0) + num25 *= -1f; + if ((double) num25 < 20.0) + num25 = 20f; + float num26 = (float) Math.Sqrt((double) num24 * (double) num24 + (double) num25 * (double) num25); + float num27 = shootSpeed / num26; + float num28 = num24 * num27; + float num29 = num25 * num27; + float num30 = num28 + (float) Main.rand.Next(-20, 21) * 0.03f; + float SpeedY = num29 + (float) Main.rand.Next(-40, 41) * 0.03f; + float SpeedX = num30 * ((float) Main.rand.Next(55, 80) * 0.01f); + vector2_1.X += (float) Main.rand.Next(-50, 51); + int index4 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + Main.projectile[index4].noDropItem = true; + } + } + else if (sItem.type == 98 || sItem.type == 533) + { + float SpeedX = num6 + (float) Main.rand.Next(-40, 41) * 0.01f; + float SpeedY = num7 + (float) Main.rand.Next(-40, 41) * 0.01f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + else if (sItem.type == 1319) + { + float SpeedX = num6 + (float) Main.rand.Next(-40, 41) * 0.02f; + float SpeedY = num7 + (float) Main.rand.Next(-40, 41) * 0.02f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + else if (sItem.type == 3107) + { + float SpeedX = num6 + (float) Main.rand.Next(-40, 41) * 0.02f; + float SpeedY = num7 + (float) Main.rand.Next(-40, 41) * 0.02f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + else if (ProjectileID.Sets.IsAGolfBall[projToShoot]) + { + Vector2 vector2_9 = new Vector2((float) Main.mouseX + Main.screenPosition.X, (float) Main.mouseY + Main.screenPosition.Y); + Vector2 vector2_10 = vector2_9 - this.Center; + bool flag2 = false; + if ((double) vector2_10.Length() < 100.0) + flag2 = this.TryPlacingAGolfBallNearANearbyTee(vector2_9); + if (flag2) + return; + if ((double) vector2_10.Length() > 100.0 || !Collision.CanHit(this.Center, 1, 1, vector2_9, 1, 1)) + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num6, num7, projToShoot, Damage1, num1, i); + else + Projectile.NewProjectile(vector2_9.X, vector2_9.Y, 0.0f, 0.0f, projToShoot, Damage1, num1, i); + } + else if (sItem.type == 3053) + { + Vector2 vector2_11 = new Vector2(num6, num7); + vector2_11.Normalize(); + Vector2 vector2_12 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + vector2_12.Normalize(); + Vector2 vector2_13 = vector2_11 * 4f + vector2_12; + vector2_13.Normalize(); + vector2_13 *= sItem.shootSpeed; + float ai1 = (float) Main.rand.Next(10, 80) * (1f / 1000f); + if (Main.rand.Next(2) == 0) + ai1 *= -1f; + float ai0 = (float) Main.rand.Next(10, 80) * (1f / 1000f); + if (Main.rand.Next(2) == 0) + ai0 *= -1f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, vector2_13.X, vector2_13.Y, projToShoot, Damage1, num1, i, ai0, ai1); + } + else if (sItem.type == 3019) + { + Vector2 vector2_14 = new Vector2(num6, num7); + float num31 = vector2_14.Length(); + vector2_14.X += (float) ((double) Main.rand.Next(-100, 101) * 0.00999999977648258 * (double) num31 * 0.150000005960464); + vector2_14.Y += (float) ((double) Main.rand.Next(-100, 101) * 0.00999999977648258 * (double) num31 * 0.150000005960464); + float num32 = num6 + (float) Main.rand.Next(-40, 41) * 0.03f; + float num33 = num7 + (float) Main.rand.Next(-40, 41) * 0.03f; + vector2_14.Normalize(); + vector2_14 *= num31; + Vector2 vector2_15 = new Vector2(num32 * ((float) Main.rand.Next(50, 150) * 0.01f), num33 * ((float) Main.rand.Next(50, 150) * 0.01f)); + vector2_15.X += (float) Main.rand.Next(-100, 101) * 0.025f; + vector2_15.Y += (float) Main.rand.Next(-100, 101) * 0.025f; + vector2_15.Normalize(); + Vector2 vector2_16 = vector2_15 * num31; + float x = vector2_16.X; + float y = vector2_16.Y; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, x, y, projToShoot, Damage1, num1, i, vector2_14.X, vector2_14.Y); + } + else if (sItem.type == 2797) + { + Vector2 vector2_17 = Vector2.Normalize(new Vector2(num6, num7)) * 40f * sItem.scale; + if (Collision.CanHit(vector2_1, 0, 0, vector2_1 + vector2_17, 0, 0)) + vector2_1 += vector2_17; + float rotation = new Vector2(num6, num7).ToRotation(); + float num34 = 2.094395f; + int num35 = Main.rand.Next(4, 5); + if (Main.rand.Next(4) == 0) + ++num35; + for (int index5 = 0; index5 < num35; ++index5) + { + float num36 = (float) (Main.rand.NextDouble() * 0.200000002980232 + 0.0500000007450581); + Vector2 vector2_18 = new Vector2(num6, num7).RotatedBy((double) num34 * Main.rand.NextDouble() - (double) num34 / 2.0) * num36; + int index6 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, vector2_18.X, vector2_18.Y, 444, Damage1, num1, i, rotation); + Main.projectile[index6].localAI[0] = (float) projToShoot; + Main.projectile[index6].localAI[1] = shootSpeed; + } + } + else if (sItem.type == 2270) + { + float SpeedX = num6 + (float) Main.rand.Next(-40, 41) * 0.05f; + float SpeedY = num7 + (float) Main.rand.Next(-40, 41) * 0.05f; + if (Main.rand.Next(3) == 0) + { + SpeedX *= (float) (1.0 + (double) Main.rand.Next(-30, 31) * 0.0199999995529652); + SpeedY *= (float) (1.0 + (double) Main.rand.Next(-30, 31) * 0.0199999995529652); + } + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + else if (sItem.type == 1930) + { + int num37 = 2 + Main.rand.Next(3); + for (int index = 0; index < num37; ++index) + { + float num38 = num6; + float num39 = num7; + float num40 = 0.025f * (float) index; + float num41 = num38 + (float) Main.rand.Next(-35, 36) * num40; + float num42 = num39 + (float) Main.rand.Next(-35, 36) * num40; + float num43 = (float) Math.Sqrt((double) num41 * (double) num41 + (double) num42 * (double) num42); + float num44 = shootSpeed / num43; + float SpeedX = num41 * num44; + float SpeedY = num42 * num44; + Projectile.NewProjectile(vector2_1.X + (float) ((double) num6 * (double) (num37 - index) * 1.75), vector2_1.Y + (float) ((double) num7 * (double) (num37 - index) * 1.75), SpeedX, SpeedY, projToShoot, Damage1, num1, i, (float) Main.rand.Next(0, 10 * (index + 1))); + } + } + else if (sItem.type == 1931) + { + int num45 = 2; + for (int index = 0; index < num45; ++index) + { + vector2_1 = new Vector2((float) ((double) this.position.X + (double) this.width * 0.5 + (double) (Main.rand.Next(201) * -this.direction) + ((double) Main.mouseX + (double) Main.screenPosition.X - (double) this.position.X)), this.MountedCenter.Y - 600f); + vector2_1.X = (float) (((double) vector2_1.X + (double) this.Center.X) / 2.0) + (float) Main.rand.Next(-200, 201); + vector2_1.Y -= (float) (100 * index); + float num46 = (float) Main.mouseX + Main.screenPosition.X - vector2_1.X; + float num47 = (float) Main.mouseY + Main.screenPosition.Y - vector2_1.Y; + if ((double) this.gravDir == -1.0) + num47 = Main.screenPosition.Y + (float) Main.screenHeight - (float) Main.mouseY - vector2_1.Y; + if ((double) num47 < 0.0) + num47 *= -1f; + if ((double) num47 < 20.0) + num47 = 20f; + float num48 = (float) Math.Sqrt((double) num46 * (double) num46 + (double) num47 * (double) num47); + float num49 = shootSpeed / num48; + float num50 = num46 * num49; + float num51 = num47 * num49; + float SpeedX = num50 + (float) Main.rand.Next(-40, 41) * 0.02f; + float SpeedY = num51 + (float) Main.rand.Next(-40, 41) * 0.02f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i, ai1: ((float) Main.rand.Next(5))); + } + } + else if (sItem.type == 2750) + { + int num52 = 1; + for (int index = 0; index < num52; ++index) + { + vector2_1 = new Vector2((float) ((double) this.position.X + (double) this.width * 0.5 + (double) (Main.rand.Next(201) * -this.direction) + ((double) Main.mouseX + (double) Main.screenPosition.X - (double) this.position.X)), this.MountedCenter.Y - 600f); + vector2_1.X = (float) (((double) vector2_1.X + (double) this.Center.X) / 2.0) + (float) Main.rand.Next(-200, 201); + vector2_1.Y -= (float) (100 * index); + float num53 = (float) ((double) Main.mouseX + (double) Main.screenPosition.X - (double) vector2_1.X + (double) Main.rand.Next(-40, 41) * 0.0299999993294477); + float num54 = (float) Main.mouseY + Main.screenPosition.Y - vector2_1.Y; + if ((double) this.gravDir == -1.0) + num54 = Main.screenPosition.Y + (float) Main.screenHeight - (float) Main.mouseY - vector2_1.Y; + if ((double) num54 < 0.0) + num54 *= -1f; + if ((double) num54 < 20.0) + num54 = 20f; + float num55 = (float) Math.Sqrt((double) num53 * (double) num53 + (double) num54 * (double) num54); + float num56 = shootSpeed / num55; + float num57 = num53 * num56; + float num58 = num54 * num56; + float num59 = num57; + float num60 = num58 + (float) Main.rand.Next(-40, 41) * 0.02f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num59 * 0.75f, num60 * 0.75f, projToShoot + Main.rand.Next(3), Damage1, num1, i, ai1: ((float) (0.5 + Main.rand.NextDouble() * 0.300000011920929))); + } + } + else if (sItem.type == 3570) + { + int num61 = 3; + for (int index = 0; index < num61; ++index) + { + vector2_1 = new Vector2((float) ((double) this.position.X + (double) this.width * 0.5 + (double) (Main.rand.Next(201) * -this.direction) + ((double) Main.mouseX + (double) Main.screenPosition.X - (double) this.position.X)), this.MountedCenter.Y - 600f); + vector2_1.X = (float) (((double) vector2_1.X + (double) this.Center.X) / 2.0) + (float) Main.rand.Next(-200, 201); + vector2_1.Y -= (float) (100 * index); + float num62 = (float) Main.mouseX + Main.screenPosition.X - vector2_1.X; + float num63 = (float) Main.mouseY + Main.screenPosition.Y - vector2_1.Y; + float ai1 = num63 + vector2_1.Y; + if ((double) num63 < 0.0) + num63 *= -1f; + if ((double) num63 < 20.0) + num63 = 20f; + float num64 = (float) Math.Sqrt((double) num62 * (double) num62 + (double) num63 * (double) num63); + float num65 = shootSpeed / num64; + Vector2 vector2_19 = new Vector2(num62 * num65, num63 * num65) / 2f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, vector2_19.X, vector2_19.Y, projToShoot, Damage1, num1, i, ai1: ai1); + } + } + else if (sItem.type == 3065) + { + Vector2 vector2_20 = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY); + float ai1 = vector2_20.Y; + if ((double) ai1 > (double) this.Center.Y - 200.0) + ai1 = this.Center.Y - 200f; + for (int index = 0; index < 3; ++index) + { + vector2_1 = this.Center + new Vector2((float) (-Main.rand.Next(0, 401) * this.direction), -600f); + vector2_1.Y -= (float) (100 * index); + Vector2 vector2_21 = vector2_20 - vector2_1; + if ((double) vector2_21.Y < 0.0) + vector2_21.Y *= -1f; + if ((double) vector2_21.Y < 20.0) + vector2_21.Y = 20f; + vector2_21.Normalize(); + Vector2 vector2_22 = vector2_21 * shootSpeed; + float x = vector2_22.X; + float y = vector2_22.Y; + float SpeedX = x; + float SpeedY = y + (float) Main.rand.Next(-40, 41) * 0.02f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1 * 2, num1, i, ai1: ai1); + } + } + else if (sItem.type == 2624) + { + float num66 = 0.3141593f; + int num67 = 5; + Vector2 spinningpoint = new Vector2(num6, num7); + spinningpoint.Normalize(); + spinningpoint *= 40f; + bool flag3 = Collision.CanHit(vector2_1, 0, 0, vector2_1 + spinningpoint, 0, 0); + for (int index7 = 0; index7 < num67; ++index7) + { + float num68 = (float) index7 - (float) (((double) num67 - 1.0) / 2.0); + Vector2 vector2_23 = spinningpoint.RotatedBy((double) num66 * (double) num68); + if (!flag3) + vector2_23 -= spinningpoint; + int index8 = Projectile.NewProjectile(vector2_1.X + vector2_23.X, vector2_1.Y + vector2_23.Y, num6, num7, projToShoot, Damage1, num1, i); + Main.projectile[index8].noDropItem = true; + } + } + else if (sItem.type == 1929) + { + float SpeedX = num6 + (float) Main.rand.Next(-40, 41) * 0.03f; + float SpeedY = num7 + (float) Main.rand.Next(-40, 41) * 0.03f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + else if (sItem.type == 1553) + { + float SpeedX = num6 + (float) Main.rand.Next(-40, 41) * 0.005f; + float SpeedY = num7 + (float) Main.rand.Next(-40, 41) * 0.005f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + else if (sItem.type == 518) + { + float num69 = num6; + float num70 = num7; + float SpeedX = num69 + (float) Main.rand.Next(-40, 41) * 0.04f; + float SpeedY = num70 + (float) Main.rand.Next(-40, 41) * 0.04f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + else if (sItem.type == 1265) + { + float num71 = num6; + float num72 = num7; + float SpeedX = num71 + (float) Main.rand.Next(-30, 31) * 0.03f; + float SpeedY = num72 + (float) Main.rand.Next(-30, 31) * 0.03f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + else if (sItem.type == 4262) + { + float num73 = 2.666667f; + Vector2 bottom = this.Bottom; + int num74 = (int) this.Bottom.X / 16; + float num75 = Math.Abs((float) Main.mouseX + Main.screenPosition.X - this.position.X) / 16f; + if (this.direction < 0) + ++num75; + int num76 = (int) num75; + if (num76 > 15) + num76 = 15; + Point tileCoordinates = this.Center.ToTileCoordinates(); + int maxDistance = 31; + for (int index9 = num76; index9 >= 0; --index9) + { + if (Collision.CanHitLine(this.Center, 1, 1, this.Center + new Vector2((float) (16 * index9 * this.direction), 0.0f), 1, 1)) + { + Point result; + if (WorldUtils.Find(new Point(tileCoordinates.X + this.direction * index9, tileCoordinates.Y), Searches.Chain((GenSearch) new Searches.Down(maxDistance), (GenCondition) new Conditions.MysticSnake()), out result)) + { + int num77 = result.Y; + while (Main.tile[result.X, num77 - 1].active()) + { + --num77; + if (Main.tile[result.X, num77 - 1] == null || num77 < 10 || result.Y - num77 > 7) + { + num77 = -1; + break; + } + } + if (num77 >= 10) + { + result.Y = num77; + for (int index10 = 0; index10 < 1000; ++index10) + { + Projectile projectile = Main.projectile[index10]; + if (projectile.active && projectile.owner == this.whoAmI && projectile.type == projToShoot) + { + if ((double) projectile.ai[1] == 2.0) + projectile.timeLeft = 4; + else + projectile.Kill(); + } + } + Projectile.NewProjectile((float) (result.X * 16 + 8), (float) (result.Y * 16 + 8 - 16), 0.0f, -num73, projToShoot, Damage1, num1, i, (float) (result.Y * 16 + 8 - 16)); + break; + } + } + } + } + } + else if (sItem.type == 4952) + { + Vector2 vector2_24 = Main.rand.NextVector2Circular(1f, 1f) + Main.rand.NextVector2CircularEdge(3f, 3f); + if ((double) vector2_24.Y > 0.0) + vector2_24.Y *= -1f; + float num78 = (float) ((double) this.itemAnimation / (double) this.itemAnimationMax * 0.660000026226044) + this.miscCounterNormalized; + vector2_1 = this.MountedCenter + new Vector2((float) (this.direction * 15), this.gravDir * 3f); + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, vector2_24.X, vector2_24.Y, projToShoot, Damage1, num1, i, -1f, num78 % 1f); + } + else if (sItem.type == 4953) + { + float num79 = 0.3141593f; + int num80 = 5; + Vector2 spinningpoint = new Vector2(num6, num7); + spinningpoint.Normalize(); + spinningpoint *= 40f; + int num81 = Collision.CanHit(vector2_1, 0, 0, vector2_1 + spinningpoint, 0, 0) ? 1 : 0; + int num82 = (this.itemAnimationMax - this.itemAnimation) / 2; + int num83 = num82; + if (this.direction == 1) + num83 = 4 - num82; + float num84 = (float) num83 - (float) (((double) num80 - 1.0) / 2.0); + Vector2 vector2_25 = spinningpoint.RotatedBy((double) num79 * (double) num84); + if (num81 == 0) + vector2_25 -= spinningpoint; + Vector2 mouseWorld = Main.MouseWorld; + Vector2 vector2_26 = vector2_1 + vector2_25; + Vector2 vector2_27 = vector2_26.DirectionTo(mouseWorld).SafeNormalize(-Vector2.UnitY); + Vector2 vector2_28 = this.Center.DirectionTo(this.Center + new Vector2(num6, num7)).SafeNormalize(-Vector2.UnitY); + float lerpValue = Utils.GetLerpValue(100f, 40f, mouseWorld.Distance(this.Center), true); + if ((double) lerpValue > 0.0) + vector2_27 = Vector2.Lerp(vector2_27, vector2_28, lerpValue).SafeNormalize(new Vector2(num6, num7).SafeNormalize(-Vector2.UnitY)); + Vector2 vector2_29 = vector2_27 * shootSpeed; + if (num82 == 2) + { + projToShoot = 932; + Damage1 *= 2; + } + if (projToShoot == 932) + { + float ai1 = (float) ((double) this.miscCounterNormalized * 12.0 % 1.0); + Vector2 velocity = vector2_29.SafeNormalize(Vector2.Zero) * (shootSpeed * 2f); + Projectile.NewProjectile(vector2_26, velocity, projToShoot, Damage1, num1, i, ai1: ai1); + } + else + { + int index = Projectile.NewProjectile(vector2_26, vector2_29, projToShoot, Damage1, num1, i); + Main.projectile[index].noDropItem = true; + } + } + else if (sItem.type == 534) + { + int num85 = Main.rand.Next(4, 6); + for (int index = 0; index < num85; ++index) + { + float num86 = num6; + float num87 = num7; + float SpeedX = num86 + (float) Main.rand.Next(-40, 41) * 0.05f; + float SpeedY = num87 + (float) Main.rand.Next(-40, 41) * 0.05f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + } + else if (sItem.type == 4703) + { + float num88 = 1.570796f; + for (int index = 0; index < 4; ++index) + { + Vector2 v4 = new Vector2(num6, num7); + float num89 = v4.Length(); + v4 = (v4 + v4.SafeNormalize(Vector2.Zero).RotatedBy((double) num88 * (double) Main.rand.NextFloat()) * Main.rand.NextFloatDirection() * 6f).SafeNormalize(Vector2.Zero) * num89; + float x = v4.X; + float y = v4.Y; + float SpeedX = x + (float) Main.rand.Next(-40, 41) * 0.05f; + float SpeedY = y + (float) Main.rand.Next(-40, 41) * 0.05f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + } + else if (sItem.type == 4270) + { + Vector2 targetSpot = Main.MouseWorld + Main.rand.NextVector2Circular(8f, 8f); + Vector2 worldCoordinates = this.FindSharpTearsSpot(targetSpot).ToWorldCoordinates((float) Main.rand.Next(17), (float) Main.rand.Next(17)); + Vector2 vector2_30 = (targetSpot - worldCoordinates).SafeNormalize(-Vector2.UnitY) * 16f; + Projectile.NewProjectile(worldCoordinates.X, worldCoordinates.Y, vector2_30.X, vector2_30.Y, projToShoot, Damage1, num1, i, ai1: ((float) ((double) Main.rand.NextFloat() * 0.5 + 0.5))); + } + else if (sItem.type == 4715) + { + Vector2 vector2_31 = Main.MouseWorld; + List validTargets; + int num90 = this.GetSparkleGuitarTarget(out validTargets) ? 1 : 0; + if (num90 != 0) + { + NPC npc = validTargets[Main.rand.Next(validTargets.Count)]; + vector2_31 = npc.Center + npc.velocity * 20f; + } + Vector2 vector2_32 = vector2_31 - this.Center; + if (num90 == 0) + { + vector2_31 += Main.rand.NextVector2Circular(24f, 24f); + if ((double) vector2_32.Length() > 700.0) + { + vector2_32 *= 700f / vector2_32.Length(); + vector2_31 = this.Center + vector2_32; + } + } + Vector2 vector2_33 = Main.rand.NextVector2CircularEdge(1f, 1f); + if ((double) vector2_33.Y > 0.0) + vector2_33 *= -1f; + if ((double) Math.Abs(vector2_33.Y) < 0.5) + vector2_33.Y = (float) (-(double) Main.rand.NextFloat() * 0.5 - 0.5); + Vector2 vector2_34 = vector2_33 * (vector2_32.Length() * 2f); + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, vector2_34.X, vector2_34.Y, projToShoot, Damage1, num1, i, vector2_31.X, vector2_31.Y); + } + else if (sItem.type == 4722) + { + Vector2 vector2_35 = Main.MouseWorld; + List validTargets; + bool sparkleGuitarTarget = this.GetSparkleGuitarTarget(out validTargets); + if (sparkleGuitarTarget) + { + NPC npc = validTargets[Main.rand.Next(validTargets.Count)]; + vector2_35 = npc.Center + npc.velocity * 20f; + } + Vector2 vector2_36 = vector2_35 - this.Center; + Vector2 vector2_37 = Main.rand.NextVector2CircularEdge(1f, 1f); + float num91 = 1f; + int num92 = 1; + for (int index11 = 0; index11 < num92; ++index11) + { + if (!sparkleGuitarTarget) + { + vector2_35 += Main.rand.NextVector2Circular(24f, 24f); + if ((double) vector2_36.Length() > 700.0) + { + vector2_36 *= 700f / vector2_36.Length(); + vector2_35 = this.Center + vector2_36; + } + float num93 = Utils.GetLerpValue(0.0f, 6f, this.velocity.Length(), true) * 0.8f; + vector2_37 = (vector2_37 * (1f - num93) + this.velocity * num93).SafeNormalize(Vector2.UnitX); + } + float num94 = 60f; + float num95 = (float) ((double) Main.rand.NextFloatDirection() * 3.14159274101257 * (1.0 / (double) num94) * 0.5) * num91; + float num96 = num94 / 2f; + float num97 = (float) (12.0 + (double) Main.rand.NextFloat() * 2.0); + Vector2 vector2_38 = vector2_37 * num97; + Vector2 vector2_39 = new Vector2(0.0f, 0.0f); + Vector2 spinningpoint = vector2_38; + for (int index12 = 0; (double) index12 < (double) num96; ++index12) + { + vector2_39 += spinningpoint; + spinningpoint = spinningpoint.RotatedBy((double) num95); + } + Vector2 vector2_40 = -vector2_39; + Vector2 position = vector2_35 + vector2_40; + float lerpValue = Utils.GetLerpValue((float) this.itemAnimationMax, 0.0f, (float) this.itemAnimation, true); + Vector2 velocity = vector2_38; + int Type = projToShoot; + int Damage2 = Damage1; + double num98 = (double) num1; + int Owner = i; + double num99 = (double) num95; + double num100 = (double) lerpValue; + Projectile.NewProjectile(position, velocity, Type, Damage2, (float) num98, Owner, (float) num99, (float) num100); + } + } + else if (sItem.type == 4607) + Player.SpawnMinionOnCursor(i, projToShoot, damage, num1); + else if (sItem.type == 2188) + { + int num101 = 4; + if (Main.rand.Next(3) == 0) + ++num101; + if (Main.rand.Next(4) == 0) + ++num101; + if (Main.rand.Next(5) == 0) + ++num101; + for (int index = 0; index < num101; ++index) + { + float num102 = num6; + float num103 = num7; + float num104 = 0.05f * (float) index; + float num105 = num102 + (float) Main.rand.Next(-35, 36) * num104; + float num106 = num103 + (float) Main.rand.Next(-35, 36) * num104; + float num107 = (float) Math.Sqrt((double) num105 * (double) num105 + (double) num106 * (double) num106); + float num108 = shootSpeed / num107; + float SpeedX = num105 * num108; + float SpeedY = num106 * num108; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + } + else if (sItem.type == 1308) + { + int num109 = 3; + if (Main.rand.Next(3) == 0) + ++num109; + for (int index = 0; index < num109; ++index) + { + float num110 = num6; + float num111 = num7; + float num112 = 0.05f * (float) index; + float num113 = num110 + (float) Main.rand.Next(-35, 36) * num112; + float num114 = num111 + (float) Main.rand.Next(-35, 36) * num112; + float num115 = (float) Math.Sqrt((double) num113 * (double) num113 + (double) num114 * (double) num114); + float num116 = shootSpeed / num115; + float SpeedX = num113 * num116; + float SpeedY = num114 * num116; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + } + else if (sItem.type == 1258) + { + float num117 = num6; + float num118 = num7; + float SpeedX = num117 + (float) Main.rand.Next(-40, 41) * 0.01f; + float SpeedY = num118 + (float) Main.rand.Next(-40, 41) * 0.01f; + vector2_1.X += (float) Main.rand.Next(-40, 41) * 0.05f; + vector2_1.Y += (float) Main.rand.Next(-45, 36) * 0.05f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + else if (sItem.type == 964) + { + int num119 = Main.rand.Next(3, 5); + for (int index = 0; index < num119; ++index) + { + float num120 = num6; + float num121 = num7; + float SpeedX = num120 + (float) Main.rand.Next(-35, 36) * 0.04f; + float SpeedY = num121 + (float) Main.rand.Next(-35, 36) * 0.04f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + } + else if (sItem.type == 1569) + { + int num122 = 4; + if (Main.rand.Next(2) == 0) + ++num122; + if (Main.rand.Next(4) == 0) + ++num122; + if (Main.rand.Next(8) == 0) + ++num122; + if (Main.rand.Next(16) == 0) + ++num122; + for (int index = 0; index < num122; ++index) + { + float num123 = num6; + float num124 = num7; + float num125 = 0.05f * (float) index; + float num126 = num123 + (float) Main.rand.Next(-35, 36) * num125; + float num127 = num124 + (float) Main.rand.Next(-35, 36) * num125; + float num128 = (float) Math.Sqrt((double) num126 * (double) num126 + (double) num127 * (double) num127); + float num129 = shootSpeed / num128; + float SpeedX = num126 * num129; + float SpeedY = num127 * num129; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + } + else if (sItem.type == 1572 || sItem.type == 2366 || sItem.type == 3571 || sItem.type == 3569) + { + int num130 = sItem.type == 3571 ? 1 : (sItem.type == 3569 ? 1 : 0); + int i1 = (int) ((double) Main.mouseX + (double) Main.screenPosition.X) / 16; + int j = (int) ((double) Main.mouseY + (double) Main.screenPosition.Y) / 16; + if ((double) this.gravDir == -1.0) + j = (int) ((double) Main.screenPosition.Y + (double) Main.screenHeight - (double) Main.mouseY) / 16; + if (num130 == 0) + { + while (j < Main.maxTilesY - 10 && Main.tile[i1, j] != null && !WorldGen.SolidTile2(i1, j) && Main.tile[i1 - 1, j] != null && !WorldGen.SolidTile2(i1 - 1, j) && Main.tile[i1 + 1, j] != null && !WorldGen.SolidTile2(i1 + 1, j)) + ++j; + --j; + } + int index = Projectile.NewProjectile((float) Main.mouseX + Main.screenPosition.X, (float) (j * 16 - 24), 0.0f, 15f, projToShoot, Damage1, num1, i); + Main.projectile[index].originalDamage = damage; + this.UpdateMaxTurrets(); + } + else if (sItem.type == 1244 || sItem.type == 1256) + { + int index = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num6, num7, projToShoot, Damage1, num1, i); + Main.projectile[index].ai[0] = (float) Main.mouseX + Main.screenPosition.X; + Main.projectile[index].ai[1] = (float) Main.mouseY + Main.screenPosition.Y; + } + else if (sItem.type == 1229) + { + int num131 = 2; + if (Main.rand.Next(3) == 0) + ++num131; + for (int index13 = 0; index13 < num131; ++index13) + { + float SpeedX = num6; + float SpeedY = num7; + if (index13 > 0) + { + SpeedX += (float) Main.rand.Next(-35, 36) * 0.04f; + SpeedY += (float) Main.rand.Next(-35, 36) * 0.04f; + } + if (index13 > 1) + { + SpeedX += (float) Main.rand.Next(-35, 36) * 0.04f; + SpeedY += (float) Main.rand.Next(-35, 36) * 0.04f; + } + if (index13 > 2) + { + SpeedX += (float) Main.rand.Next(-35, 36) * 0.04f; + SpeedY += (float) Main.rand.Next(-35, 36) * 0.04f; + } + int index14 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + Main.projectile[index14].noDropItem = true; + } + } + else if (sItem.type == 1121) + { + int num132 = Main.rand.Next(1, 4); + if (Main.rand.Next(6) == 0) + ++num132; + if (Main.rand.Next(6) == 0) + ++num132; + if (this.strongBees && Main.rand.Next(3) == 0) + ++num132; + for (int index15 = 0; index15 < num132; ++index15) + { + float num133 = num6; + float num134 = num7; + float SpeedX = num133 + (float) Main.rand.Next(-35, 36) * 0.02f; + float SpeedY = num134 + (float) Main.rand.Next(-35, 36) * 0.02f; + int index16 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, this.beeType(), this.beeDamage(Damage1), this.beeKB(num1), i); + Main.projectile[index16].magic = true; + } + } + else if (sItem.type == 1155) + { + int num135 = Main.rand.Next(2, 5); + for (int index = 0; index < num135; ++index) + { + float num136 = num6; + float num137 = num7; + float SpeedX = num136 + (float) Main.rand.Next(-35, 36) * 0.02f; + float SpeedY = num137 + (float) Main.rand.Next(-35, 36) * 0.02f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + } + else if (sItem.type == 1801) + { + int num138 = Main.rand.Next(2, 4); + for (int index = 0; index < num138; ++index) + { + float num139 = num6; + float num140 = num7; + float SpeedX = num139 + (float) Main.rand.Next(-35, 36) * 0.05f; + float SpeedY = num140 + (float) Main.rand.Next(-35, 36) * 0.05f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + } + else if (sItem.type == 679) + { + for (int index = 0; index < 6; ++index) + { + float num141 = num6; + float num142 = num7; + float SpeedX = num141 + (float) Main.rand.Next(-40, 41) * 0.05f; + float SpeedY = num142 + (float) Main.rand.Next(-40, 41) * 0.05f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + } + else if (sItem.type == 1156) + { + for (int index = 0; index < 3; ++index) + { + float num143 = num6; + float num144 = num7; + float SpeedX = num143 + (float) Main.rand.Next(-40, 41) * 0.05f; + float SpeedY = num144 + (float) Main.rand.Next(-40, 41) * 0.05f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + } + else if (sItem.type == 4682) + { + for (int index = 0; index < 3; ++index) + { + float num145 = num6; + float num146 = num7; + float SpeedX = num145 + (float) Main.rand.Next(-20, 21) * 0.1f; + float SpeedY = num146 + (float) Main.rand.Next(-20, 21) * 0.1f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + } + else if (sItem.type == 2623) + { + for (int index = 0; index < 3; ++index) + { + float num147 = num6; + float num148 = num7; + float SpeedX = num147 + (float) Main.rand.Next(-40, 41) * 0.1f; + float SpeedY = num148 + (float) Main.rand.Next(-40, 41) * 0.1f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + } + else if (sItem.type == 3210) + { + Vector2 vector2_41 = new Vector2(num6, num7); + vector2_41.X += (float) Main.rand.Next(-30, 31) * 0.04f; + vector2_41.Y += (float) Main.rand.Next(-30, 31) * 0.03f; + vector2_41.Normalize(); + vector2_41 *= (float) Main.rand.Next(70, 91) * 0.1f; + vector2_41.X += (float) Main.rand.Next(-30, 31) * 0.04f; + vector2_41.Y += (float) Main.rand.Next(-30, 31) * 0.03f; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, vector2_41.X, vector2_41.Y, projToShoot, Damage1, num1, i, (float) Main.rand.Next(20)); + } + else if (sItem.type == 434) + { + float SpeedX = num6; + float SpeedY = num7; + if (this.itemAnimation < 5) + { + float num149 = SpeedX + (float) Main.rand.Next(-40, 41) * 0.01f; + float num150 = SpeedY + (float) Main.rand.Next(-40, 41) * 0.01f; + SpeedX = num149 * 1.1f; + SpeedY = num150 * 1.1f; + } + else if (this.itemAnimation < 10) + { + float num151 = SpeedX + (float) Main.rand.Next(-20, 21) * 0.01f; + float num152 = SpeedY + (float) Main.rand.Next(-20, 21) * 0.01f; + SpeedX = num151 * 1.05f; + SpeedY = num152 * 1.05f; + } + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + } + else if (sItem.type == 1157) + { + projToShoot = Main.rand.Next(191, 195); + int index = Player.SpawnMinionOnCursor(i, projToShoot, damage, num1); + Main.projectile[index].localAI[0] = 30f; + } + else if (sItem.type == 1802) + Player.SpawnMinionOnCursor(i, projToShoot, damage, num1); + else if (sItem.type == 2364 || sItem.type == 2365) + Player.SpawnMinionOnCursor(i, projToShoot, damage, num1); + else if (sItem.type == 2535) + { + Vector2 vector2_42 = new Vector2(0.0f, 0.0f).RotatedBy(1.57079637050629); + Player.SpawnMinionOnCursor(i, projToShoot, damage, num1, vector2_42, vector2_42); + Vector2 vector2_43 = vector2_42.RotatedBy(-3.14159274101257); + Player.SpawnMinionOnCursor(i, projToShoot + 1, damage, num1, vector2_43, vector2_43); + } + else if (sItem.type == 2551) + Player.SpawnMinionOnCursor(i, projToShoot + Main.rand.Next(3), damage, num1); + else if (sItem.type == 2584) + Player.SpawnMinionOnCursor(i, projToShoot + Main.rand.Next(3), damage, num1); + else if (sItem.type == 2621) + Player.SpawnMinionOnCursor(i, projToShoot, damage, num1); + else if (sItem.type == 2749 || sItem.type == 3249 || sItem.type == 3474 || sItem.type == 4273 || sItem.type == 4281) + Player.SpawnMinionOnCursor(i, projToShoot, damage, num1); + else if (sItem.type == 3531) + { + int num153 = -1; + int index17 = -1; + for (int index18 = 0; index18 < 1000; ++index18) + { + if (Main.projectile[index18].active && Main.projectile[index18].owner == Main.myPlayer) + { + if (num153 == -1 && Main.projectile[index18].type == 625) + num153 = index18; + if (index17 == -1 && Main.projectile[index18].type == 628) + index17 = index18; + if (num153 != -1 && index17 != -1) + break; + } + } + if (num153 == -1 && index17 == -1) + { + float SpeedX = 0.0f; + float SpeedY = 0.0f; + vector2_1.X = (float) Main.mouseX + Main.screenPosition.X; + vector2_1.Y = (float) Main.mouseY + Main.screenPosition.Y; + int index19 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot, Damage1, num1, i); + int index20 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot + 1, Damage1, num1, i, (float) index19); + int index21 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot + 2, Damage1, num1, i, (float) index20); + int index22 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, projToShoot + 3, Damage1, num1, i, (float) index21); + Main.projectile[index20].localAI[1] = (float) index21; + Main.projectile[index21].localAI[1] = (float) index22; + Main.projectile[index19].originalDamage = damage; + Main.projectile[index20].originalDamage = damage; + Main.projectile[index21].originalDamage = damage; + Main.projectile[index22].originalDamage = damage; + } + else + { + if (num153 == -1 || index17 == -1) + return; + int num154 = (int) Main.projectile[index17].ai[0]; + int index23 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num6, num7, projToShoot + 1, Damage1, num1, i, (float) num154); + int index24 = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num6, num7, projToShoot + 2, Damage1, num1, i, (float) index23); + Main.projectile[index23].localAI[1] = (float) index24; + Main.projectile[index23].netUpdate = true; + Main.projectile[index23].ai[1] = 1f; + Main.projectile[index24].localAI[1] = (float) index17; + Main.projectile[index24].netUpdate = true; + Main.projectile[index24].ai[1] = 1f; + Main.projectile[index17].ai[0] = (float) index24; + Main.projectile[index17].netUpdate = true; + Main.projectile[index17].ai[1] = 1f; + Main.projectile[index23].originalDamage = damage; + Main.projectile[index24].originalDamage = damage; + Main.projectile[index17].originalDamage = damage; + } + } + else if (sItem.type == 1309 || sItem.type == 4758 || sItem.type == 4269 || sItem.type == 5005) + Player.SpawnMinionOnCursor(i, projToShoot, damage, num1); + else if (sItem.shoot > 0 && (Main.projPet[sItem.shoot] || sItem.shoot == 72 || sItem.shoot == 18 || sItem.shoot == 500 || sItem.shoot == 650) && !sItem.summon) + { + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == this.whoAmI) + { + if (sItem.shoot == 72) + { + if (Main.projectile[index].type == 72 || Main.projectile[index].type == 86 || Main.projectile[index].type == 87) + Main.projectile[index].Kill(); + } + else if (sItem.shoot == Main.projectile[index].type) + Main.projectile[index].Kill(); + } + } + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num6, num7, projToShoot, 0, 0.0f, i); + } + else if (sItem.type == 3006) + { + Vector2 vector2_44 = Main.ReverseGravitySupport(Main.MouseScreen) + Main.screenPosition; + int num155 = 0; + float num156 = new Vector2(num6, num7).Length(); + float num157 = (vector2_44 - vector2_1).Length(); + while (Collision.CanHitLine(this.position, this.width, this.height, vector2_1, 1, 1)) + { + ++num155; + vector2_1.X += num6; + vector2_1.Y += num7; + if ((double) (vector2_1 - vector2_44).Length() < 20.0 + (double) Math.Abs(num6) + (double) Math.Abs(num7)) + { + vector2_1 = vector2_44; + break; + } + if ((double) num156 * (double) num155 >= (double) num157) + { + vector2_1 = vector2_44; + break; + } + } + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, 0.0f, 0.0f, projToShoot, Damage1, num1, i); + } + else if (sItem.type == 3014) + { + Vector2 vector2_45; + vector2_45.X = (float) Main.mouseX + Main.screenPosition.X; + vector2_45.Y = (float) Main.mouseY + Main.screenPosition.Y; + while (Collision.CanHitLine(this.position, this.width, this.height, vector2_1, 1, 1)) + { + vector2_1.X += num6; + vector2_1.Y += num7; + if ((double) (vector2_1 - vector2_45).Length() < 20.0 + (double) Math.Abs(num6) + (double) Math.Abs(num7)) + { + vector2_1 = vector2_45; + break; + } + } + bool flag4 = false; + int j1 = (int) vector2_1.Y / 16; + int i2 = (int) vector2_1.X / 16; + int num158 = j1; + while (j1 < Main.maxTilesY - 10 && j1 - num158 < 30 && !WorldGen.SolidTile(i2, j1) && !TileID.Sets.Platforms[(int) Main.tile[i2, j1].type]) + ++j1; + if (!WorldGen.SolidTile(i2, j1) && !TileID.Sets.Platforms[(int) Main.tile[i2, j1].type]) + flag4 = true; + float num159 = (float) (j1 * 16); + int j2 = num158; + while (j2 > 10 && num158 - j2 < 30 && !WorldGen.SolidTile(i2, j2)) + --j2; + float num160 = (float) (j2 * 16 + 16); + float ai1 = num159 - num160; + int num161 = 15; + if ((double) ai1 > (double) (16 * num161)) + ai1 = (float) (16 * num161); + float ai0 = num159 - ai1; + vector2_1.X = (float) ((int) ((double) vector2_1.X / 16.0) * 16); + if (flag4) + return; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, 0.0f, 0.0f, projToShoot, Damage1, num1, i, ai0, ai1); + } + else if (sItem.type == 3384) + { + int num162 = this.altFunctionUse == 2 ? 1 : 0; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num6, num7, projToShoot, Damage1, num1, i, ai1: ((float) num162)); + } + else if (sItem.type == 3473) + { + float ai1 = (float) (((double) Main.rand.NextFloat() - 0.5) * 0.785398185253143); + Vector2 vector2_46 = new Vector2(num6, num7); + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, vector2_46.X, vector2_46.Y, projToShoot, Damage1, num1, i, ai1: ai1); + } + else if (sItem.type == 4956) + { + int num163 = (this.itemAnimationMax - this.itemAnimation) / this.itemTime; + Vector2 velocity = new Vector2(num6, num7); + int num164 = FinalFractalHelper.GetRandomProfileIndex(); + if (num163 == 0) + num164 = 4956; + Vector2 vector2_47 = Main.MouseWorld - this.MountedCenter; + if (num163 == 1 || num163 == 2) + { + int npcTargetIndex; + bool zenithTarget = this.GetZenithTarget(Main.MouseWorld, 400f, out npcTargetIndex); + if (zenithTarget) + vector2_47 = Main.npc[npcTargetIndex].Center - this.MountedCenter; + bool flag5 = num163 == 2; + if (num163 == 1 && !zenithTarget) + flag5 = true; + if (flag5) + vector2_47 += Main.rand.NextVector2Circular(150f, 150f); + } + velocity = vector2_47 / 2f; + float ai0 = (float) Main.rand.Next(-100, 101); + Projectile.NewProjectile(vector2_1, velocity, projToShoot, Damage1, num1, i, ai0, (float) num164); + } + else if (sItem.type == 3836) + { + float ai0 = (float) ((double) Main.rand.NextFloat() * (double) shootSpeed * 0.75) * (float) this.direction; + Vector2 velocity = new Vector2(num6, num7); + Projectile.NewProjectile(vector2_1, velocity, projToShoot, Damage1, num1, i, ai0); + } + else if (sItem.type == 3858) + { + int num165 = this.altFunctionUse == 2 ? 1 : 0; + Vector2 velocity1 = new Vector2(num6, num7); + if (num165 != 0) + { + Vector2 velocity2 = velocity1 * 1.5f; + float ai0 = (float) ((0.300000011920929 + 0.699999988079071 * (double) Main.rand.NextFloat()) * (double) shootSpeed * 1.75) * (float) this.direction; + Projectile.NewProjectile(vector2_1, velocity2, 708, (int) ((double) Damage1 * 0.75), num1 + 4f, i, ai0); + } + else + Projectile.NewProjectile(vector2_1, velocity1, projToShoot, Damage1, num1, i); + } + else if (sItem.type == 3859) + { + Vector2 vector2_48 = new Vector2(num6, num7); + projToShoot = 710; + Damage1 = (int) ((double) Damage1 * 0.699999988079071); + Vector2 v5 = vector2_48 * 0.8f; + Vector2 vector2_49 = v5.SafeNormalize(-Vector2.UnitY); + float num166 = (float) Math.PI / 180f * (float) -this.direction; + for (float num167 = -2.5f; (double) num167 < 3.0; ++num167) + Projectile.NewProjectile(vector2_1, (v5 + vector2_49 * num167 * 0.5f).RotatedBy((double) num167 * (double) num166), projToShoot, Damage1, num1, i); + } + else if (sItem.type == 3870) + { + Vector2 vector2_50 = Vector2.Normalize(new Vector2(num6, num7)) * 40f * sItem.scale; + if (Collision.CanHit(vector2_1, 0, 0, vector2_1 + vector2_50, 0, 0)) + vector2_1 += vector2_50; + Vector2 v6 = new Vector2(num6, num7) * 0.8f; + Vector2 vector2_51 = v6.SafeNormalize(-Vector2.UnitY); + float num168 = (float) Math.PI / 180f * (float) -this.direction; + for (int index = 0; index <= 2; ++index) + Projectile.NewProjectile(vector2_1, (v6 + vector2_51 * (float) index * 1f).RotatedBy((double) index * (double) num168), projToShoot, Damage1, num1, i); + } + else if (sItem.type == 3542) + { + float num169 = (float) (((double) Main.rand.NextFloat() - 0.5) * 0.785398185253143 * 0.699999988079071); + for (int index = 0; index < 10 && !Collision.CanHit(vector2_1, 0, 0, vector2_1 + new Vector2(num6, num7).RotatedBy((double) num169) * 100f, 0, 0); ++index) + num169 = (float) (((double) Main.rand.NextFloat() - 0.5) * 0.785398185253143 * 0.699999988079071); + Vector2 vector2_52 = new Vector2(num6, num7).RotatedBy((double) num169) * (float) (0.949999988079071 + (double) Main.rand.NextFloat() * 0.300000011920929); + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, vector2_52.X, vector2_52.Y, projToShoot, Damage1, num1, i); + } + else if (sItem.type == 3779) + { + float num170 = Main.rand.NextFloat() * 6.283185f; + for (int index = 0; index < 10 && !Collision.CanHit(vector2_1, 0, 0, vector2_1 + new Vector2(num6, num7).RotatedBy((double) num170) * 100f, 0, 0); ++index) + num170 = Main.rand.NextFloat() * 6.283185f; + Vector2 vector2_53 = new Vector2(num6, num7).RotatedBy((double) num170) * (float) (0.949999988079071 + (double) Main.rand.NextFloat() * 0.300000011920929); + Projectile.NewProjectile(vector2_1 + vector2_53 * 30f, Vector2.Zero, projToShoot, Damage1, num1, i, -2f); + } + else if (sItem.type == 3787) + { + float f3 = Main.rand.NextFloat() * 6.283185f; + float num171 = 20f; + float num172 = 60f; + Vector2 position = vector2_1 + f3.ToRotationVector2() * MathHelper.Lerp(num171, num172, Main.rand.NextFloat()); + for (int index = 0; index < 50; ++index) + { + position = vector2_1 + f3.ToRotationVector2() * MathHelper.Lerp(num171, num172, Main.rand.NextFloat()); + if (!Collision.CanHit(vector2_1, 0, 0, position + (position - vector2_1).SafeNormalize(Vector2.UnitX) * 8f, 0, 0)) + f3 = Main.rand.NextFloat() * 6.283185f; + else + break; + } + Vector2 v7 = Main.MouseWorld - position; + Vector2 defaultValue = new Vector2(num6, num7).SafeNormalize(Vector2.UnitY) * shootSpeed; + Vector2 velocity = Vector2.Lerp(v7.SafeNormalize(defaultValue) * shootSpeed, defaultValue, 0.25f); + Projectile.NewProjectile(position, velocity, projToShoot, Damage1, num1, i); + } + else if (sItem.type == 3788) + { + Vector2 v8 = new Vector2(num6, num7); + float num173 = 0.7853982f; + for (int index = 0; index < 2; ++index) + { + Projectile.NewProjectile(vector2_1, v8 + v8.SafeNormalize(Vector2.Zero).RotatedBy((double) num173 * ((double) Main.rand.NextFloat() * 0.5 + 0.5)) * Main.rand.NextFloatDirection() * 2f, projToShoot, Damage1, num1, i); + Projectile.NewProjectile(vector2_1, v8 + v8.SafeNormalize(Vector2.Zero).RotatedBy(-(double) num173 * ((double) Main.rand.NextFloat() * 0.5 + 0.5)) * Main.rand.NextFloatDirection() * 2f, projToShoot, Damage1, num1, i); + } + Projectile.NewProjectile(vector2_1, v8.SafeNormalize(Vector2.UnitX * (float) this.direction) * (shootSpeed * 1.3f), 661, Damage1 * 2, num1, i); + } + else if (sItem.type == 4463 || sItem.type == 486) + Projectile.NewProjectile(vector2_1, new Vector2(num6, num7), projToShoot, Damage1, num1, i); + else if (sItem.type == 3475) + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num6, num7, 615, Damage1, num1, i, (float) (5 * Main.rand.Next(0, 20))); + else if (sItem.type == 3930) + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num6, num7, 714, Damage1, num1, i, (float) (5 * Main.rand.Next(0, 20))); + else if (sItem.type == 3540) + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num6, num7, 630, Damage1, num1, i); + else if (sItem.type == 3854) + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num6, num7, 705, Damage1, num1, i); + else if (sItem.type == 3546) + { + for (int index = 0; index < 2; ++index) + { + float num174 = num6; + float num175 = num7; + float num176 = num174 + (float) Main.rand.Next(-40, 41) * 0.05f; + float num177 = num175 + (float) Main.rand.Next(-40, 41) * 0.05f; + Vector2 vector2_54 = vector2_1 + Vector2.Normalize(new Vector2(num176, num177).RotatedBy(-1.57079637050629 * (double) this.direction)) * 6f; + Projectile.NewProjectile(vector2_54.X, vector2_54.Y, num176, num177, 167 + Main.rand.Next(4), Damage1, num1, i, ai1: 1f); + } + } + else if (sItem.type == 3350) + { + float num178 = num6; + float num179 = num7; + float num180 = num178 + (float) Main.rand.Next(-1, 2) * 0.5f; + float num181 = num179 + (float) Main.rand.Next(-1, 2) * 0.5f; + if (Collision.CanHitLine(this.Center, 0, 0, vector2_1 + new Vector2(num180, num181) * 2f, 0, 0)) + vector2_1 += new Vector2(num180, num181); + Projectile.NewProjectile(vector2_1.X, vector2_1.Y - this.gravDir * 4f, num180, num181, projToShoot, Damage1, num1, i, ai1: ((float) Main.rand.Next(12) / 6f)); + } + else if (sItem.type == 3852) + { + if (this.altFunctionUse == 2) + Projectile.NewProjectile(vector2_1.X, this.Bottom.Y - 100f, (float) this.direction * shootSpeed, 0.0f, 704, Damage1 * 2, num1, i); + else + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num6, num7, projToShoot, Damage1, num1, i); + } + else if (sItem.type == 3818 || sItem.type == 3819 || sItem.type == 3820 || sItem.type == 3824 || sItem.type == 3825 || sItem.type == 3826 || sItem.type == 3829 || sItem.type == 3830 || sItem.type == 3831 || sItem.type == 3832 || sItem.type == 3833 || sItem.type == 3834) + { + this.PayDD2CrystalsBeforeUse(sItem); + int worldX; + int worldY; + int pushYUp; + this.FindSentryRestingSpot(sItem.shoot, out worldX, out worldY, out pushYUp); + int index = Projectile.NewProjectile((float) worldX, (float) (worldY - pushYUp), 0.0f, 0.0f, projToShoot, Damage1, num1, i); + Main.projectile[index].originalDamage = damage; + this.UpdateMaxTurrets(); + } + else + { + int index = Projectile.NewProjectile(vector2_1.X, vector2_1.Y, num6, num7, projToShoot, Damage1, num1, i); + if (sItem.type == 726) + Main.projectile[index].magic = true; + if (sItem.type == 724 || sItem.type == 676) + Main.projectile[index].melee = true; + if (projToShoot == 80) + { + Main.projectile[index].ai[0] = (float) Player.tileTargetX; + Main.projectile[index].ai[1] = (float) Player.tileTargetY; + } + if (sItem.type == 760) + this.DestroyOldestProximityMinesOverMinesCap(20); + if (projToShoot == 442) + { + Main.projectile[index].ai[0] = (float) Player.tileTargetX; + Main.projectile[index].ai[1] = (float) Player.tileTargetY; + } + if (projToShoot == 826) + Main.projectile[index].ai[1] = (float) Main.rand.Next(3); + if (sItem.type == 949) + Main.projectile[index].ai[1] = 1f; + if (Main.projectile[index].aiStyle != 99) + return; + AchievementsHelper.HandleSpecialEvent(this, 7); + } + } + else + { + if (sItem.useStyle != 5 && sItem.useStyle != 13) + return; + this.itemRotation = 0.0f; + NetMessage.SendData(41, number: this.whoAmI); + } + } + + private static int SpawnMinionOnCursor( + int ownerIndex, + int minionProjectileId, + int originalDamageNotScaledByMinionDamage, + float KnockBack, + Vector2 offsetFromCursor = default (Vector2), + Vector2 velocityOnSpawn = default (Vector2)) + { + int index = Projectile.NewProjectile(Main.MouseWorld + offsetFromCursor, velocityOnSpawn, minionProjectileId, originalDamageNotScaledByMinionDamage, KnockBack, ownerIndex); + Main.projectile[index].originalDamage = originalDamageNotScaledByMinionDamage; + return index; + } + + private Point FindSharpTearsSpot(Vector2 targetSpot) + { + targetSpot.ToTileCoordinates(); + Vector2 center = this.Center; + Vector2 endPoint = targetSpot; + int samplesToTake = 3; + float samplingWidth = 4f; + Vector2 vectorTowardsTarget; + float[] samples; + Collision.AimingLaserScan(center, endPoint, samplingWidth, samplesToTake, out vectorTowardsTarget, out samples); + float num = float.PositiveInfinity; + for (int index = 0; index < samples.Length; ++index) + { + if ((double) samples[index] < (double) num) + num = samples[index]; + } + targetSpot = center + vectorTowardsTarget.SafeNormalize(Vector2.Zero) * num; + Point tileCoordinates = targetSpot.ToTileCoordinates(); + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle(tileCoordinates.X, tileCoordinates.Y, 1, 1); + rectangle1.Inflate(6, 16); + Microsoft.Xna.Framework.Rectangle rectangle2 = new Microsoft.Xna.Framework.Rectangle(0, 0, Main.maxTilesX, Main.maxTilesY); + rectangle2.Inflate(-Main.Map.BlackEdgeWidth, -Main.Map.BlackEdgeWidth); + rectangle1 = Microsoft.Xna.Framework.Rectangle.Intersect(rectangle1, rectangle2); + List pointList1 = new List(); + List pointList2 = new List(); + for (int left = rectangle1.Left; left <= rectangle1.Right; ++left) + { + for (int top = rectangle1.Top; top <= rectangle1.Bottom; ++top) + { + if (WorldGen.SolidTile(left, top)) + { + Vector2 vector2 = new Vector2((float) (left * 16 + 8), (float) (top * 16 + 8)); + if ((double) Vector2.Distance(targetSpot, vector2) <= 200.0) + { + if (this.FindSharpTearsOpening(left, top, left > tileCoordinates.X, left < tileCoordinates.X, top > tileCoordinates.Y, top < tileCoordinates.Y)) + pointList1.Add(new Point(left, top)); + else + pointList2.Add(new Point(left, top)); + } + } + } + } + if (pointList1.Count == 0 && pointList2.Count == 0) + pointList1.Add((this.Center.ToTileCoordinates().ToVector2() + Main.rand.NextVector2Square(-2f, 2f)).ToPoint()); + List pointList3 = pointList1; + if (pointList3.Count == 0) + pointList3 = pointList2; + int index1 = Main.rand.Next(pointList3.Count); + return pointList3[index1]; + } + + private bool FindSharpTearsOpening( + int x, + int y, + bool acceptLeft, + bool acceptRight, + bool acceptUp, + bool acceptDown) + { + return acceptLeft && !WorldGen.SolidTile(x - 1, y) || acceptRight && !WorldGen.SolidTile(x + 1, y) || acceptUp && !WorldGen.SolidTile(x, y - 1) || acceptDown && !WorldGen.SolidTile(x, y + 1); + } + + public bool TryPlacingAGolfBallNearANearbyTee(Vector2 placePosition) + { + int num1 = 0; + int num2 = (int) ((double) placePosition.X / 16.0) - Player.tileRangeX - num1 + 1; + int num3 = (int) ((double) placePosition.X / 16.0) + Player.tileRangeX + num1 - 1; + int num4 = (int) ((double) placePosition.Y / 16.0) - Player.tileRangeY - num1 + 1; + int num5 = (int) ((double) placePosition.Y / 16.0) + Player.tileRangeY + num1 - 2; + int lx = Utils.Clamp(num2, 10, Main.maxTilesX - 10); + int hx = Utils.Clamp(num3, 10, Main.maxTilesX - 10); + int ly = Utils.Clamp(num4, 10, Main.maxTilesY - 10); + int hy = Utils.Clamp(num5, 10, Main.maxTilesY - 10); + Vector2 vector2 = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY); + if ((double) this.gravDir == -1.0) + vector2.Y = Main.screenPosition.Y + (float) Main.screenHeight - (float) Main.mouseY; + Point tileCoordinates = placePosition.ToTileCoordinates(); + List> tupleList = new List>(); + for (int index1 = -2; index1 <= 2; ++index1) + { + for (int index2 = -2; index2 <= 2; ++index2) + { + int num6 = tileCoordinates.X + index1; + int num7 = tileCoordinates.Y + index2; + if (WorldGen.InWorld(num6, num7, 1)) + { + Tile tileSafely = Framing.GetTileSafely(num6, num7); + if (tileSafely.active() && tileSafely.type == (ushort) 494) + { + tupleList.Add(new Tuple(num6, num7)); + break; + } + } + } + } + bool flag = false; + if (tupleList.Count > 0) + { + float num8 = -1f; + Tuple tuple = tupleList[0]; + for (int index = 0; index < tupleList.Count; ++index) + { + float num9 = Vector2.Distance(new Vector2((float) tupleList[index].Item1, (float) tupleList[index].Item2) * 16f + Vector2.One * 8f, vector2); + if ((double) num8 == -1.0 || (double) num9 < (double) num8) + { + num8 = num9; + tuple = tupleList[index]; + } + } + if (Collision.InTileBounds(tuple.Item1, tuple.Item2, lx, ly, hx, hy)) + { + flag = true; + for (int index = 0; index < 1000; ++index) + { + if (ProjectileID.Sets.IsAGolfBall[Main.projectile[index].type] && Main.projectile[index].owner == this.whoAmI) + Main.projectile[index].Kill(); + } + int projType; + this.GetPreferredGolfBallToUse(out projType); + Projectile.NewProjectile((float) (tuple.Item1 * 16) + 8.5f, (float) (tuple.Item2 * 16 + 6), 0.0f, 0.0f, projType, 0, 0.0f, this.whoAmI, ai1: -1f); + } + } + return flag; + } + + public void GetPreferredGolfBallToUse(out int projType) + { + projType = 721; + Item obj1 = this.inventory[this.selectedItem]; + if (!obj1.IsAir && obj1.shoot > 0 && ProjectileID.Sets.IsAGolfBall[obj1.shoot]) + { + projType = obj1.shoot; + } + else + { + for (int slot = 19; slot >= 0; --slot) + { + if (this.IsAValidEquipmentSlotForIteration(slot)) + { + int num = slot % 10; + Item obj2 = this.armor[slot]; + if (!obj2.IsAir && obj2.shoot > 0 && ProjectileID.Sets.IsAGolfBall[obj2.shoot]) + { + projType = obj2.shoot; + return; + } + } + } + for (int index = 0; index < 50; ++index) + { + Item obj3 = this.inventory[index]; + if (!obj3.IsAir && obj3.shoot > 0 && ProjectileID.Sets.IsAGolfBall[obj3.shoot]) + { + projType = obj3.shoot; + break; + } + } + } + } + + private void ItemCheck_MinionAltFeatureUse(Item sItem, bool cShoot) + { + if (sItem.shoot <= 0 || !ProjectileID.Sets.MinionTargettingFeature[sItem.shoot] || this.altFunctionUse != 2 || !cShoot || !this.ItemTimeIsZero) + return; + this.ApplyItemTime(sItem); + this.MinionNPCTargetAim(false); + } + + private void ItemCheck_TurretAltFeatureUse(Item sItem, bool cShoot) + { + if (sItem.shoot <= 0 || !ProjectileID.Sets.TurretFeature[sItem.shoot] || this.altFunctionUse != 2 || !cShoot || !this.ItemTimeIsZero) + return; + this.ApplyItemTime(sItem); + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && projectile.owner == Main.myPlayer && ProjectileID.Sets.TurretFeature[projectile.type]) + projectile.Kill(); + } + } + + private void EmitMaxManaEffect() + { + SoundEngine.PlaySound(25); + for (int index1 = 0; index1 < 5; ++index1) + { + int index2 = Dust.NewDust(this.position, this.width, this.height, 45, Alpha: ((int) byte.MaxValue), Scale: ((float) Main.rand.Next(20, 26) * 0.1f)); + Main.dust[index2].noLight = true; + Main.dust[index2].noGravity = true; + Main.dust[index2].velocity *= 0.5f; + } + } + + private void ItemCheck_EmitHeldItemLight(Item sItem) + { + if ((ItemID.Sets.Torches[sItem.type] && !this.wet || ItemID.Sets.WaterTorches[sItem.type]) && !this.pulley && !this.happyFunTorchTime) + { + float R = 1f; + float G = 0.95f; + float B = 0.8f; + int torchID = 0; + int num = this.BiomeTorchHoldStyle(sItem.type); + if (num == 523) + torchID = 8; + else if (num == 974) + torchID = 9; + else if (num == 1245) + torchID = 10; + else if (num == 1333) + torchID = 11; + else if (num == 2274) + torchID = 12; + else if (num == 3004) + torchID = 13; + else if (num == 3045) + torchID = 14; + else if (num == 3114) + torchID = 15; + else if (num == 4383) + torchID = 16; + else if (num == 4384) + torchID = 17; + else if (num == 4385) + torchID = 18; + else if (num == 4386) + torchID = 19; + else if (num == 4387) + torchID = 20; + else if (num == 4388) + torchID = 21; + else if (num >= 427) + torchID = num - 426; + TorchID.TorchColor(torchID, out R, out G, out B); + int Type = TorchID.Dust[torchID]; + int maxValue = 30; + if (this.itemAnimation > 0) + maxValue = 7; + if (this.direction == -1) + { + if (Main.rand.Next(maxValue) == 0) + { + int index = Dust.NewDust(new Vector2(this.itemLocation.X - 16f, this.itemLocation.Y - 14f * this.gravDir), 4, 4, Type, Alpha: 100); + if (Main.rand.Next(3) != 0) + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].velocity.Y -= 1.5f; + Main.dust[index].position = this.RotatedRelativePoint(Main.dust[index].position); + if (Type == 66) + { + Main.dust[index].color = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB); + Main.dust[index].noGravity = true; + } + } + Lighting.AddLight(this.RotatedRelativePoint(new Vector2(this.itemLocation.X - 12f + this.velocity.X, this.itemLocation.Y - 14f + this.velocity.Y)), R, G, B); + } + else + { + if (Main.rand.Next(maxValue) == 0) + { + int index = Dust.NewDust(new Vector2(this.itemLocation.X + 6f, this.itemLocation.Y - 14f * this.gravDir), 4, 4, Type, Alpha: 100); + if (Main.rand.Next(3) != 0) + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].velocity.Y -= 1.5f; + Main.dust[index].position = this.RotatedRelativePoint(Main.dust[index].position); + if (Type == 66) + { + Main.dust[index].color = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB); + Main.dust[index].noGravity = true; + } + } + Lighting.AddLight(this.RotatedRelativePoint(new Vector2(this.itemLocation.X + 12f + this.velocity.X, this.itemLocation.Y - 14f + this.velocity.Y)), R, G, B); + } + } + if ((sItem.type == 105 || sItem.type == 713) && !this.wet && !this.pulley) + { + int maxValue = 20; + if (this.itemAnimation > 0) + maxValue = 7; + if (this.direction == -1) + { + if (Main.rand.Next(maxValue) == 0) + { + int index = Dust.NewDust(new Vector2(this.itemLocation.X - 12f, this.itemLocation.Y - 20f * this.gravDir), 4, 4, 6, Alpha: 100); + if (Main.rand.Next(3) != 0) + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].velocity.Y -= 1.5f; + Main.dust[index].position = this.RotatedRelativePoint(Main.dust[index].position); + } + Lighting.AddLight(this.RotatedRelativePoint(new Vector2(this.itemLocation.X - 16f + this.velocity.X, this.itemLocation.Y - 14f)), 1f, 0.95f, 0.8f); + } + else + { + if (Main.rand.Next(maxValue) == 0) + { + int index = Dust.NewDust(new Vector2(this.itemLocation.X + 4f, this.itemLocation.Y - 20f * this.gravDir), 4, 4, 6, Alpha: 100); + if (Main.rand.Next(3) != 0) + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].velocity.Y -= 1.5f; + Main.dust[index].position = this.RotatedRelativePoint(Main.dust[index].position); + } + Lighting.AddLight(this.RotatedRelativePoint(new Vector2(this.itemLocation.X + 6f + this.velocity.X, this.itemLocation.Y - 14f)), 1f, 0.95f, 0.8f); + } + } + else if (sItem.type == 148 && !this.wet) + { + int maxValue = 10; + if (this.itemAnimation > 0) + maxValue = 7; + if (this.direction == -1) + { + if (Main.rand.Next(maxValue) == 0) + { + int index = Dust.NewDust(new Vector2(this.itemLocation.X - 12f, this.itemLocation.Y - 20f * this.gravDir), 4, 4, 172, Alpha: 100); + if (Main.rand.Next(3) != 0) + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].velocity.Y -= 1.5f; + Main.dust[index].position = this.RotatedRelativePoint(Main.dust[index].position); + } + Lighting.AddLight(this.RotatedRelativePoint(new Vector2(this.itemLocation.X - 16f + this.velocity.X, this.itemLocation.Y - 14f)), 0.0f, 0.5f, 1f); + } + else + { + if (Main.rand.Next(maxValue) == 0) + { + int index = Dust.NewDust(new Vector2(this.itemLocation.X + 4f, this.itemLocation.Y - 20f * this.gravDir), 4, 4, 172, Alpha: 100); + if (Main.rand.Next(3) != 0) + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].velocity.Y -= 1.5f; + Main.dust[index].position = this.RotatedRelativePoint(Main.dust[index].position); + } + Lighting.AddLight(this.RotatedRelativePoint(new Vector2(this.itemLocation.X + 6f + this.velocity.X, this.itemLocation.Y - 14f)), 0.0f, 0.5f, 1f); + } + } + else if (sItem.type == 3117 && !this.wet) + { + this.itemLocation.X -= (float) (this.direction * 4); + int maxValue = 10; + if (this.itemAnimation > 0) + maxValue = 7; + if (this.direction == -1) + { + if (Main.rand.Next(maxValue) == 0) + { + int index = Dust.NewDust(new Vector2(this.itemLocation.X - 10f, this.itemLocation.Y - 20f * this.gravDir), 4, 4, 242, Alpha: 100); + if (Main.rand.Next(3) != 0) + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].velocity.Y -= 1.5f; + Main.dust[index].position = this.RotatedRelativePoint(Main.dust[index].position); + } + Lighting.AddLight(this.RotatedRelativePoint(new Vector2(this.itemLocation.X - 16f + this.velocity.X, this.itemLocation.Y - 14f)), 0.9f, 0.1f, 0.75f); + } + else + { + if (Main.rand.Next(maxValue) == 0) + { + int index = Dust.NewDust(new Vector2(this.itemLocation.X + 6f, this.itemLocation.Y - 20f * this.gravDir), 4, 4, 242, Alpha: 100); + if (Main.rand.Next(3) != 0) + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].velocity.Y -= 1.5f; + Main.dust[index].position = this.RotatedRelativePoint(Main.dust[index].position); + } + Lighting.AddLight(this.RotatedRelativePoint(new Vector2(this.itemLocation.X + 6f + this.velocity.X, this.itemLocation.Y - 14f)), 0.9f, 0.1f, 0.75f); + } + } + if (sItem.type == 282 && !this.pulley) + { + if (this.direction == -1) + Lighting.AddLight(this.RotatedRelativePoint(new Vector2(this.itemLocation.X - 16f + this.velocity.X, this.itemLocation.Y - 14f)), 0.7f, 1f, 0.8f); + else + Lighting.AddLight(this.RotatedRelativePoint(new Vector2(this.itemLocation.X + 6f + this.velocity.X, this.itemLocation.Y - 14f)), 0.7f, 1f, 0.8f); + } + if (sItem.type == 3002 && !this.pulley) + { + float r = 1.05f; + float g = 0.95f; + float b = 0.55f; + if (this.direction == -1) + Lighting.AddLight(this.RotatedRelativePoint(new Vector2(this.itemLocation.X - 16f + this.velocity.X, this.itemLocation.Y - 14f)), r, g, b); + else + Lighting.AddLight(this.RotatedRelativePoint(new Vector2(this.itemLocation.X + 6f + this.velocity.X, this.itemLocation.Y - 14f)), r, g, b); + ++this.spelunkerTimer; + if (this.spelunkerTimer >= (byte) 10) + { + this.spelunkerTimer = (byte) 0; + Main.instance.SpelunkerProjectileHelper.AddSpotToCheck(this.Center); + } + } + if (sItem.type == 286 && !this.pulley) + { + if (this.direction == -1) + Lighting.AddLight(this.RotatedRelativePoint(new Vector2(this.itemLocation.X - 16f + this.velocity.X, this.itemLocation.Y - 14f)), 0.7f, 0.8f, 1f); + else + Lighting.AddLight(this.RotatedRelativePoint(new Vector2(this.itemLocation.X + 6f + this.velocity.X, this.itemLocation.Y - 14f)), 0.7f, 0.8f, 1f); + } + if (sItem.type == 3112 && !this.pulley) + { + if (this.direction == -1) + Lighting.AddLight(this.RotatedRelativePoint(new Vector2(this.itemLocation.X - 16f + this.velocity.X, this.itemLocation.Y - 14f)), 1f, 0.6f, 0.85f); + else + Lighting.AddLight(this.RotatedRelativePoint(new Vector2(this.itemLocation.X + 6f + this.velocity.X, this.itemLocation.Y - 14f)), 1f, 0.6f, 0.85f); + } + if (sItem.type == 4776 && !this.pulley) + { + if (this.direction == -1) + Lighting.AddLight(this.RotatedRelativePoint(new Vector2(this.itemLocation.X - 16f + this.velocity.X, this.itemLocation.Y - 14f)), 0.7f, 0.0f, 1f); + else + Lighting.AddLight(this.RotatedRelativePoint(new Vector2(this.itemLocation.X + 6f + this.velocity.X, this.itemLocation.Y - 14f)), 0.7f, 0.0f, 1f); + } + if (sItem.type == 3542) + { + Vector2 vector2_1 = Main.OffsetsPlayerOnhand[this.bodyFrame.Y / 56] * 2f; + if (this.direction != 1) + vector2_1.X = (float) this.bodyFrame.Width - vector2_1.X; + if ((double) this.gravDir != 1.0) + vector2_1.Y = (float) this.bodyFrame.Height - vector2_1.Y; + Vector2 vector2_2 = this.RotatedRelativePoint(this.MountedCenter - new Vector2(20f, 42f) / 2f + (vector2_1 - new Vector2((float) (this.bodyFrame.Width - this.width), (float) (this.bodyFrame.Height - 42)) / 2f)) - this.velocity; + for (int index = 0; index < 4; ++index) + { + Dust dust = Main.dust[Dust.NewDust(this.Center, 0, 0, 242, (float) (this.direction * 2), Alpha: 150, Scale: 1.3f)]; + dust.position = vector2_2; + dust.velocity *= 0.0f; + dust.noGravity = true; + dust.fadeIn = 1f; + dust.velocity += this.velocity; + if (Main.rand.Next(2) == 0) + { + dust.position += Utils.RandomVector2(Main.rand, -4f, 4f); + dust.scale += Main.rand.NextFloat(); + if (Main.rand.Next(2) == 0) + dust.customData = (object) this; + } + } + } + if (sItem.type != 4952 || this.pulley) + return; + Vector2 pos = this.itemLocation + new Vector2((float) (8 * this.direction), -10f * this.gravDir); + Vector3 rgb = new Vector3(1f, 0.7f, 0.8f) * 1.3f; + Vector2 vector2_3 = this.RotatedRelativePoint(pos); + Lighting.AddLight(vector2_3, rgb); + if (Main.rand.Next(40) != 0) + return; + Vector2 vector2_4 = Main.rand.NextVector2Circular(4f, 4f); + Dust dust1 = Dust.NewDustPerfect(vector2_3 + vector2_4, 43, new Vector2?(Vector2.Zero), 254, new Color((int) byte.MaxValue, (int) byte.MaxValue, 0, (int) byte.MaxValue), 0.3f); + if (vector2_4 != Vector2.Zero) + dust1.velocity = vector2_3.DirectionTo(dust1.position) * 0.2f; + dust1.fadeIn = 0.3f; + dust1.noLightEmittence = true; + dust1.customData = (object) this; + } + + public bool CanVisuallyHoldItem(Item item) => item.holdStyle != 4 || !this.pulley && (double) this.gravDir != -1.0 && (double) this.velocity.Y == 0.0 && !this.mount.Active; + + private void ItemCheck_ApplyHoldStyle(float mountOffset, Item sItem, Microsoft.Xna.Framework.Rectangle heldItemFrame) + { + if (!this.CanVisuallyHoldItem(sItem)) + return; + if (this.isPettingAnimal) + { + int num1 = this.miscCounter % 14 / 7; + Player.CompositeArmStretchAmount stretch = Player.CompositeArmStretchAmount.ThreeQuarters; + if (num1 == 1) + stretch = Player.CompositeArmStretchAmount.Full; + float num2 = 0.3f; + if (this.isTheAnimalBeingPetSmall) + num2 = 0.2f; + this.SetCompositeArmBack(true, stretch, -6.283185f * num2 * (float) this.direction); + } + else if (sItem.holdStyle == 1 && !this.pulley) + { + if (Main.dedServ) + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 + 20.0 * (double) this.direction); + else if (sItem.type == 930) + { + this.itemLocation.X = (float) ((double) this.position.X + (double) (this.width / 2) * 0.5 - 12.0) - (float) (2 * this.direction); + float x = this.position.X + (float) (this.width / 2) + (float) (38 * this.direction); + if (this.direction == 1) + x -= 10f; + float y = this.MountedCenter.Y - 4f * this.gravDir; + if ((double) this.gravDir == -1.0) + y -= 8f; + this.RotateRelativePoint(ref x, ref y); + int Type = 0; + for (int index = 54; index < 58; ++index) + { + if (this.inventory[index].stack > 0 && this.inventory[index].ammo == 931) + { + Type = this.inventory[index].type; + break; + } + } + if (Type == 0) + { + for (int index = 0; index < 54; ++index) + { + if (this.inventory[index].stack > 0 && this.inventory[index].ammo == 931) + { + Type = this.inventory[index].type; + break; + } + } + } + if (Type == 931) + Type = (int) sbyte.MaxValue; + else if (Type == 1614) + Type = 187; + if (Type > 0) + { + int index = Dust.NewDust(new Vector2(x, y + this.gfxOffY), 6, 6, Type, Alpha: 100, Scale: 1.6f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity.Y -= 4f * this.gravDir; + } + } + else if (sItem.type == 968) + { + this.itemLocation.X = this.position.X + (float) this.width * 0.5f + (float) (8 * this.direction); + if (this.whoAmI == Main.myPlayer) + { + int index1 = (int) ((double) this.itemLocation.X + (double) heldItemFrame.Width * 0.800000011920929 * (double) this.direction) / 16; + int index2 = (int) ((double) this.itemLocation.Y + (double) mountOffset + (double) (heldItemFrame.Height / 2)) / 16; + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 215 && Main.tile[index1, index2].frameY < (short) 54) + { + ++this.miscTimer; + if (Main.rand.Next(5) == 0) + ++this.miscTimer; + if (this.miscTimer > 900) + { + this.miscTimer = 0; + sItem.SetDefaults(969); + if (this.selectedItem == 58) + Main.mouseItem.SetDefaults(969); + for (int index3 = 0; index3 < 58; ++index3) + { + if (this.inventory[index3].type == sItem.type && index3 != this.selectedItem && this.inventory[index3].stack < this.inventory[index3].maxStack) + { + SoundEngine.PlaySound(7); + ++this.inventory[index3].stack; + sItem.SetDefaults(); + if (this.selectedItem == 58) + Main.mouseItem.SetDefaults(); + } + } + } + } + else + this.miscTimer = 0; + } + } + else if (sItem.type == 856) + this.itemLocation.X = this.position.X + (float) this.width * 0.5f + (float) (4 * this.direction); + else if (sItem.fishingPole > 0) + { + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 + (double) heldItemFrame.Width * 0.180000007152557 * (double) this.direction); + } + else + { + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 + ((double) heldItemFrame.Width * 0.5 + 2.0) * (double) this.direction); + if (sItem.type == 282 || sItem.type == 286 || sItem.type == 3112 || sItem.type == 4776) + { + this.itemLocation.X -= (float) (this.direction * 2); + this.itemLocation.Y += 4f; + } + else if (sItem.type == 3002) + { + this.itemLocation.X -= (float) (4 * this.direction); + this.itemLocation.Y += 2f; + } + } + this.itemLocation.Y = this.position.Y + 24f + mountOffset; + if (sItem.type == 856) + this.itemLocation.Y = this.position.Y + 34f + mountOffset; + if (sItem.type == 930) + this.itemLocation.Y = this.position.Y + 9f + mountOffset; + if (sItem.fishingPole > 0) + this.itemLocation.Y += 4f; + else if (sItem.type == 3476) + { + this.itemLocation.X = this.Center.X + (float) (14 * this.direction); + this.itemLocation.Y = this.MountedCenter.Y; + } + else if (sItem.type == 3779) + { + this.itemLocation.X = this.Center.X + (float) (6 * this.direction); + this.itemLocation.Y = this.MountedCenter.Y + 6f; + } + else if (sItem.type == 4952) + { + this.itemLocation.X = this.Center.X + (float) (2 * this.direction); + this.itemLocation.Y = this.MountedCenter.Y + 26f; + } + else if (sItem.type == 353) + { + this.itemLocation.X = this.Center.X + (float) (6 * this.direction); + this.itemLocation.Y = this.MountedCenter.Y + 11f; + } + else if (ItemID.Sets.IsFood[sItem.type]) + { + this.itemLocation.X = this.Center.X + (float) (4 * this.direction); + this.itemLocation.Y = this.MountedCenter.Y + (float) (heldItemFrame.Height / 2); + } + else if (sItem.type == 4049 && Main.rand.Next(4) == 0) + { + Dust dust = Dust.NewDustPerfect(this.Center + new Vector2((float) (this.direction * 23), this.gravDir * 6f), 31, new Vector2?(Vector2.Zero), (int) sbyte.MaxValue, Scale: 0.7f); + dust.noGravity = true; + dust.velocity = Main.rand.NextVector2Circular(1f, 1f) + new Vector2(0.0f, -1f); + } + this.itemRotation = 0.0f; + if ((double) this.gravDir != -1.0) + return; + this.itemRotation = -this.itemRotation; + this.itemLocation.Y = (float) ((double) this.position.Y + (double) this.height + ((double) this.position.Y - (double) this.itemLocation.Y)) + mountOffset; + if (sItem.type != 930) + return; + this.itemLocation.Y -= 24f; + } + else if (sItem.holdStyle == 2 && !this.pulley) + { + if (sItem.type == 946 || sItem.type == 4707) + { + this.itemRotation = 0.0f; + this.itemLocation.X = this.position.X + (float) this.width * 0.5f - (float) (16 * this.direction); + this.itemLocation.Y = this.position.Y + 22f + mountOffset; + this.fallStart = (int) ((double) this.position.Y / 16.0); + if ((double) this.gravDir == -1.0) + { + this.itemRotation = -this.itemRotation; + this.itemLocation.Y = (float) ((double) this.position.Y + (double) this.height + ((double) this.position.Y - (double) this.itemLocation.Y)); + if ((double) this.velocity.Y >= -2.0 || this.controlDown) + return; + this.velocity.Y = -2f; + } + else + { + if ((double) this.velocity.Y <= 2.0 || this.controlDown) + return; + this.velocity.Y = 2f; + } + } + else + { + this.itemLocation.X = this.position.X + (float) this.width * 0.5f + (float) (6 * this.direction); + this.itemLocation.Y = this.position.Y + 16f + mountOffset; + this.itemRotation = 0.79f * (float) -this.direction; + if ((double) this.gravDir != -1.0) + return; + this.itemRotation = -this.itemRotation; + this.itemLocation.Y = (float) ((double) this.position.Y + (double) this.height + ((double) this.position.Y - (double) this.itemLocation.Y)); + } + } + else if (sItem.holdStyle == 3 && !this.pulley) + { + if (Main.dedServ) + return; + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 - (double) heldItemFrame.Width * 0.5) - (float) (this.direction * 2); + this.itemLocation.Y = this.MountedCenter.Y - (float) heldItemFrame.Height * 0.5f; + this.itemRotation = 0.0f; + } + else if (sItem.holdStyle == 4) + { + if (Main.dedServ) + return; + this.itemRotation = new Vector2((float) (10 * this.direction), 10f).ToRotation() + 0.7853982f; + if (this.direction == -1) + this.itemRotation += 1.570796f; + Player.CompositeArmStretchAmount stretch1 = Player.CompositeArmStretchAmount.Full; + Player.CompositeArmStretchAmount stretch2 = Player.CompositeArmStretchAmount.ThreeQuarters; + float num3 = -0.3141593f; + if (this.direction == -1) + num3 *= -1f; + float num4 = (float) ((double) this.itemRotation - 0.785398185253143 + 3.14159274101257); + if (this.direction == 1) + num4 += 1.570796f; + float rotation1 = num4 + num3; + float rotation2 = num4 - num3; + Vector2 vector2 = (num4 + 1.570796f).ToRotationVector2() * 2f; + this.itemLocation = this.MountedCenter.Floor() + vector2; + this.SetCompositeArmFront(true, stretch1, rotation1); + this.SetCompositeArmBack(true, stretch2, rotation2); + this.FlipItemLocationAndRotationForGravity(); + } + else if (sItem.holdStyle == 5 && !this.pulley) + { + if (Main.dedServ) + return; + this.itemRotation = 0.0f; + this.itemLocation.X = this.Center.X - (float) (8 * this.direction); + this.itemLocation.Y = this.position.Y + 40f + mountOffset; + this.itemLocation += Main.OffsetsPlayerHeadgear[this.bodyFrame.Y / 56]; + this.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Quarter, -0.7853982f * (float) this.direction); + this.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, -0.3926991f * (float) this.direction); + this.FlipItemLocationAndRotationForGravity(); + } + else + { + if (sItem.holdStyle != 6 || this.pulley || Main.dedServ) + return; + this.itemRotation = 0.0f; + this.itemLocation.X = this.Center.X + (float) (8 * this.direction); + this.itemLocation.Y = (float) ((double) this.position.Y + 40.0 + (double) mountOffset - 2.0); + this.itemLocation += Main.OffsetsPlayerHeadgear[this.bodyFrame.Y / 56]; + this.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.ThreeQuarters, -1.884956f * (float) this.direction); + this.FlipItemLocationAndRotationForGravity(); + } + } + + private void ItemCheck_ApplyManaRegenDelay(Item sItem) + { + if (this.spaceGun && (sItem.type == (int) sbyte.MaxValue || sItem.type == 4347 || sItem.type == 4348)) + return; + this.manaRegenDelay = (int) this.maxRegenDelay; + } + + private Vector2 GetFrontHandPosition( + Player.CompositeArmStretchAmount stretch, + float rotation) + { + float num = rotation + 1.570796f; + Vector2 vector2 = new Vector2((float) Math.Cos((double) num), (float) Math.Sin((double) num)); + switch (stretch) + { + case Player.CompositeArmStretchAmount.Full: + vector2 *= 10f; + break; + case Player.CompositeArmStretchAmount.None: + vector2 *= 4f; + break; + case Player.CompositeArmStretchAmount.Quarter: + vector2 *= 6f; + break; + case Player.CompositeArmStretchAmount.ThreeQuarters: + vector2 *= 8f; + break; + } + return this.MountedCenter + (this.direction != -1 ? vector2 + new Vector2(-4f, -2f) + new Vector2(0.0f, 3f).RotatedBy((double) rotation + 1.57079637050629) : vector2 + new Vector2(4f, -2f) + new Vector2(0.0f, -3f).RotatedBy((double) rotation + 1.57079637050629)); + } + + private Vector2 GetBackHandPosition( + Player.CompositeArmStretchAmount stretch, + float rotation) + { + float num = rotation + 1.570796f; + Vector2 vector2 = new Vector2((float) Math.Cos((double) num), (float) Math.Sin((double) num)); + switch (stretch) + { + case Player.CompositeArmStretchAmount.Full: + vector2 *= new Vector2(10f, 12f); + break; + case Player.CompositeArmStretchAmount.None: + vector2 *= new Vector2(4f, 6f); + break; + case Player.CompositeArmStretchAmount.Quarter: + vector2 *= new Vector2(6f, 8f); + break; + case Player.CompositeArmStretchAmount.ThreeQuarters: + vector2 *= new Vector2(8f, 10f); + break; + } + return this.MountedCenter + (this.direction != -1 ? vector2 + new Vector2(6f, -2f) : vector2 + new Vector2(-6f, -2f)); + } + + public void ItemCheck_ApplyUseStyle(float mountOffset, Item sItem, Microsoft.Xna.Framework.Rectangle heldItemFrame) + { + if (Main.dedServ) + return; + if (sItem.useStyle == 1) + { + if (sItem.type > -1 && Item.claw[sItem.type]) + { + if ((double) this.itemAnimation < (double) this.itemAnimationMax * 0.333) + { + float num = 10f; + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 + ((double) heldItemFrame.Width * 0.5 - (double) num) * (double) this.direction); + this.itemLocation.Y = this.position.Y + 26f + mountOffset; + } + else if ((double) this.itemAnimation < (double) this.itemAnimationMax * 0.666) + { + float num = 8f; + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 + ((double) heldItemFrame.Width * 0.5 - (double) num) * (double) this.direction); + this.itemLocation.Y = this.position.Y + 24f + mountOffset; + } + else + { + float num = 6f; + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 - ((double) heldItemFrame.Width * 0.5 - (double) num) * (double) this.direction); + this.itemLocation.Y = this.position.Y + 20f + mountOffset; + } + this.itemRotation = (float) (((double) this.itemAnimation / (double) this.itemAnimationMax - 0.5) * (double) -this.direction * 3.5 - (double) this.direction * 0.300000011920929); + } + else + { + if ((double) this.itemAnimation < (double) this.itemAnimationMax * 0.333) + { + float num = 10f; + if (heldItemFrame.Width > 32) + num = 14f; + if (heldItemFrame.Width >= 52) + num = 24f; + if (heldItemFrame.Width >= 64) + num = 28f; + if (heldItemFrame.Width >= 92) + num = 38f; + if (sItem.type == 2330 || sItem.type == 2320 || sItem.type == 2341) + num += 8f; + if (sItem.type == 671) + num += 12f; + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 + ((double) heldItemFrame.Width * 0.5 - (double) num) * (double) this.direction); + this.itemLocation.Y = this.position.Y + 24f + mountOffset; + } + else if ((double) this.itemAnimation < (double) this.itemAnimationMax * 0.666) + { + float num1 = 10f; + if (heldItemFrame.Width > 32) + num1 = 18f; + if (heldItemFrame.Width >= 52) + num1 = 24f; + if (heldItemFrame.Width >= 64) + num1 = 28f; + if (heldItemFrame.Width >= 92) + num1 = 38f; + if (sItem.type == 2330 || sItem.type == 2320 || sItem.type == 2341) + num1 += 4f; + if (sItem.type == 671) + num1 += 6f; + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 + ((double) heldItemFrame.Width * 0.5 - (double) num1) * (double) this.direction); + float num2 = 10f; + if (heldItemFrame.Height > 32) + num2 = 8f; + if (heldItemFrame.Height > 52) + num2 = 12f; + if (heldItemFrame.Height > 64) + num2 = 14f; + if (sItem.type == 2330 || sItem.type == 2320 || sItem.type == 2341) + num2 += 4f; + if (sItem.type == 671) + num2 += 10f; + this.itemLocation.Y = this.position.Y + num2 + mountOffset; + } + else + { + float num3 = 6f; + if (heldItemFrame.Width > 32) + num3 = 14f; + if (heldItemFrame.Width >= 48) + num3 = 18f; + if (heldItemFrame.Width >= 52) + num3 = 24f; + if (heldItemFrame.Width >= 64) + num3 = 28f; + if (heldItemFrame.Width >= 92) + num3 = 38f; + if (sItem.type == 2330 || sItem.type == 2320 || sItem.type == 2341) + num3 += 4f; + if (sItem.type == 671) + num3 += 8f; + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 - ((double) heldItemFrame.Width * 0.5 - (double) num3) * (double) this.direction); + float num4 = 10f; + if (heldItemFrame.Height > 32) + num4 = 10f; + if (heldItemFrame.Height > 52) + num4 = 12f; + if (heldItemFrame.Height > 64) + num4 = 14f; + if (sItem.type == 2330 || sItem.type == 2320 || sItem.type == 2341) + num4 += 4f; + if (sItem.type == 671) + num4 += 8f; + this.itemLocation.Y = this.position.Y + num4 + mountOffset; + } + this.itemRotation = (float) (((double) this.itemAnimation / (double) this.itemAnimationMax - 0.5) * (double) -this.direction * 3.5 - (double) this.direction * 0.300000011920929); + } + if ((double) this.gravDir != -1.0) + return; + this.itemRotation = -this.itemRotation; + this.itemLocation.Y = (float) ((double) this.position.Y + (double) this.height + ((double) this.position.Y - (double) this.itemLocation.Y)); + } + else if (sItem.useStyle == 7) + { + this.itemRotation = (float) ((double) this.itemAnimation / (double) this.itemAnimationMax * (double) this.direction * 2.0 + -1.39999997615814 * (double) this.direction); + if ((double) this.itemAnimation < (double) this.itemAnimationMax * 0.5) + { + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 + ((double) heldItemFrame.Width * 0.5 - 9.0 - (double) this.itemRotation * 12.0 * (double) this.direction) * (double) this.direction); + this.itemLocation.Y = (float) ((double) this.position.Y + 38.0 + (double) this.itemRotation * (double) this.direction * 4.0) + mountOffset; + } + else + { + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 + ((double) heldItemFrame.Width * 0.5 - 9.0 - (double) this.itemRotation * 16.0 * (double) this.direction) * (double) this.direction); + this.itemLocation.Y = (float) ((double) this.position.Y + 38.0 + (double) this.itemRotation * (double) this.direction) + mountOffset; + } + if ((double) this.gravDir != -1.0) + return; + this.itemRotation = -this.itemRotation; + this.itemLocation.Y = (float) ((double) this.position.Y + (double) this.height + ((double) this.position.Y - (double) this.itemLocation.Y)); + } + else if (sItem.useStyle == 9) + { + float lerpValue = Utils.GetLerpValue(0.0f, 0.7f, 1f - (float) this.itemAnimation / (float) this.itemAnimationMax, true); + this.itemRotation = (float) ((double) lerpValue * (double) -this.direction * 2.0 + 0.699999988079071 * (double) this.direction); + this.itemLocation = this.MountedCenter + new Vector2((float) (this.direction * 10) * ((float) this.itemAnimation / (float) this.itemAnimationMax), 0.0f); + float num5 = 8f; + float num6 = 7f; + float num7 = 1.256637f; + float f = (float) (-(double) num7 * 0.5 + (1.0 - (double) lerpValue) * (double) num7) + 0.3141593f; + this.itemLocation = this.Center + new Vector2((float) this.direction * num5, 0.0f) + f.ToRotationVector2() * num6 * new Vector2((float) this.direction, 1f); + float rotation = f - 1.570796f; + if (this.direction == -1) + rotation = -rotation; + this.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, rotation); + this.itemLocation = this.GetFrontHandPosition(Player.CompositeArmStretchAmount.Full, rotation); + this.itemLocation -= this.MountedCenter; + this.itemLocation *= MathHelper.Lerp(1.5f, 1.2f, lerpValue); + this.itemLocation += this.MountedCenter; + this.itemLocation.X += (float) this.direction * MathHelper.Lerp(8f, 2f, lerpValue); + if ((double) this.gravDir != -1.0) + return; + this.itemRotation = -this.itemRotation; + this.itemLocation.Y = (float) ((double) this.position.Y + (double) this.height + ((double) this.position.Y - (double) this.itemLocation.Y)); + } + else if (sItem.useStyle == 6) + { + float num = (float) (1.0 - (double) this.itemAnimation / (double) this.itemAnimationMax) * 6f; + if ((double) num > 1.0) + num = 1f; + this.itemRotation = (float) ((1.0 - (double) num) * (double) this.direction * 2.0 - 1.39999997615814 * (double) this.direction); + if ((double) num >= 0.5) + { + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 + ((double) heldItemFrame.Width * 0.5 - 9.0 - (double) this.itemRotation * 12.0 * (double) this.direction) * (double) this.direction); + this.itemLocation.Y = (float) ((double) this.position.Y + 38.0 + (double) this.itemRotation * (double) this.direction * 4.0) + mountOffset; + } + else + { + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 + ((double) heldItemFrame.Width * 0.5 - 9.0 - (double) this.itemRotation * 16.0 * (double) this.direction) * (double) this.direction); + this.itemLocation.Y = (float) ((double) this.position.Y + 38.0 + (double) this.itemRotation * (double) this.direction) + mountOffset; + } + if ((double) this.gravDir != -1.0) + return; + this.itemRotation = -this.itemRotation; + this.itemLocation.Y = (float) ((double) this.position.Y + (double) this.height + ((double) this.position.Y - (double) this.itemLocation.Y)); + } + else if (sItem.useStyle == 2) + { + this.itemLocation = this.MountedCenter + new Vector2((float) (10 * this.direction), -10f).RotatedBy((double) this.itemRotation + 0.785398185253143 * (double) this.direction); + float num8 = (float) (1.0 - (double) this.itemAnimation / (double) this.itemAnimationMax); + Player.CompositeArmStretchAmount stretch = Player.CompositeArmStretchAmount.Full; + if ((double) num8 > 0.25 && (double) num8 <= 0.5) + stretch = Player.CompositeArmStretchAmount.ThreeQuarters; + if ((double) num8 > 0.5 && (double) num8 <= 0.75) + stretch = Player.CompositeArmStretchAmount.Quarter; + if ((double) num8 > 0.75 && (double) num8 <= 1.0) + stretch = Player.CompositeArmStretchAmount.None; + this.SetCompositeArmFront(true, stretch, -1.570796f * (float) this.direction); + this.SetCompositeArmBack(true, stretch, -1.570796f * (float) this.direction); + int num9 = 8; + switch (stretch) + { + case Player.CompositeArmStretchAmount.Full: + num9 = 8; + break; + case Player.CompositeArmStretchAmount.None: + num9 = 2; + break; + case Player.CompositeArmStretchAmount.Quarter: + num9 = 4; + break; + case Player.CompositeArmStretchAmount.ThreeQuarters: + num9 = 6; + break; + } + this.itemLocation = this.MountedCenter + new Vector2((float) ((num9 + 10 - heldItemFrame.Width / 2) * this.direction), (float) (heldItemFrame.Height / 2 - 4)); + if ((double) this.gravDir != -1.0) + return; + this.itemRotation = -this.itemRotation; + this.itemLocation.Y = (float) ((double) this.position.Y + (double) this.height + ((double) this.position.Y - (double) this.itemLocation.Y)); + } + else if (sItem.useStyle == 11) + { + float num10 = (float) (1.0 - (double) this.itemAnimation / (double) this.itemAnimationMax) * 2f; + Player.CompositeArmStretchAmount stretch = Player.CompositeArmStretchAmount.Full; + if ((double) num10 > 0.25 && (double) num10 <= 0.5) + stretch = Player.CompositeArmStretchAmount.ThreeQuarters; + if ((double) num10 > 0.5 && (double) num10 <= 0.75) + stretch = Player.CompositeArmStretchAmount.Quarter; + if ((double) num10 > 0.75 && (double) num10 <= 1.25) + stretch = Player.CompositeArmStretchAmount.None; + if ((double) num10 > 1.25 && (double) num10 <= 1.5) + stretch = Player.CompositeArmStretchAmount.Quarter; + if ((double) num10 > 1.5 && (double) num10 <= 1.75) + stretch = Player.CompositeArmStretchAmount.ThreeQuarters; + if ((double) num10 > 1.75 && (double) num10 <= 2.0) + stretch = Player.CompositeArmStretchAmount.Full; + this.SetCompositeArmFront(true, stretch, -0.7853982f * (float) this.direction); + this.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, -0.1963495f); + int num11 = 8; + switch (stretch) + { + case Player.CompositeArmStretchAmount.Full: + num11 = 8; + break; + case Player.CompositeArmStretchAmount.None: + num11 = 2; + break; + case Player.CompositeArmStretchAmount.Quarter: + num11 = 4; + break; + case Player.CompositeArmStretchAmount.ThreeQuarters: + num11 = 6; + break; + } + this.itemLocation = this.MountedCenter + new Vector2((float) ((num11 + 22 - heldItemFrame.Width / 2) * this.direction), (float) (heldItemFrame.Height / 2 - 8)); + if ((double) this.gravDir != -1.0) + return; + this.itemRotation = -this.itemRotation; + this.itemLocation.Y = (float) ((double) this.position.Y + (double) this.height + ((double) this.position.Y - (double) this.itemLocation.Y)); + } + else if (sItem.useStyle == 3) + { + if ((double) this.itemAnimation > (double) this.itemAnimationMax * 0.666) + { + this.itemLocation.X = -1000f; + this.itemLocation.Y = -1000f; + this.itemRotation = -1.3f * (float) this.direction; + } + else + { + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 + ((double) heldItemFrame.Width * 0.5 - 4.0) * (double) this.direction); + this.itemLocation.Y = this.position.Y + 24f + mountOffset; + float num = (float) ((double) this.itemAnimation / (double) this.itemAnimationMax * (double) heldItemFrame.Width * (double) this.direction * (double) sItem.scale * 1.20000004768372) - (float) (10 * this.direction); + if ((double) num > -4.0 && this.direction == -1) + num = -8f; + if ((double) num < 4.0 && this.direction == 1) + num = 8f; + this.itemLocation.X -= num; + this.itemRotation = 0.8f * (float) this.direction; + if (sItem.type == 946 || sItem.type == 4707) + this.itemLocation.X -= (float) (6 * this.direction); + } + if ((double) this.gravDir != -1.0) + return; + this.itemRotation = -this.itemRotation; + this.itemLocation.Y = (float) ((double) this.position.Y + (double) this.height + ((double) this.position.Y - (double) this.itemLocation.Y)); + } + else if (sItem.useStyle == 4) + { + int num12 = 0; + int num13 = 0; + if (sItem.type == 3601) + num12 = 10; + this.itemRotation = 0.0f; + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 + ((double) heldItemFrame.Width * 0.5 - 9.0 - (double) this.itemRotation * 14.0 * (double) this.direction - 4.0 - (double) num12) * (double) this.direction); + this.itemLocation.Y = (float) ((double) this.position.Y + (double) heldItemFrame.Height * 0.5 + 4.0) + mountOffset + (float) num13; + if ((double) this.gravDir != -1.0) + return; + this.itemRotation = -this.itemRotation; + this.itemLocation.Y = (float) ((double) this.position.Y + (double) this.height + ((double) this.position.Y - (double) this.itemLocation.Y)); + } + else if (sItem.useStyle == 5) + { + if (sItem.type == 3779) + { + this.itemRotation = 0.0f; + this.itemLocation.X = this.Center.X + (float) (6 * this.direction); + this.itemLocation.Y = this.MountedCenter.Y + 6f; + } + else if (sItem.type == 4262) + { + this.itemRotation = 0.0f; + this.itemLocation.X = this.Center.X + (float) -heldItemFrame.Width * 0.5f + (float) (this.direction * -6); + this.itemLocation.Y = this.MountedCenter.Y - 6f; + if (Main.rand.Next(20) != 0) + return; + int Type = Main.rand.Next(570, 573); + Vector2 Position = new Vector2((float) ((double) this.Center.X + (double) (this.direction * 30) - 6.0), this.itemLocation.Y - 30f); + Vector2 Velocity = new Vector2((float) ((double) Main.WindForVisuals * 2.0 + (double) this.direction * 0.300000011920929), -0.5f); + Velocity.X *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Velocity.Y *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + if (Type == 572) + Position.X -= 8f; + if (Type == 571) + Position.X -= 4f; + Gore.NewGore(Position, Velocity, Type, 0.8f); + } + else if (Item.staff[sItem.type]) + { + float num = 6f; + if (sItem.type == 3476) + num = 14f; + this.itemLocation = this.MountedCenter; + this.itemLocation += (this.itemRotation.ToRotationVector2() * num * (float) this.direction).Floor(); + } + else + { + this.itemLocation.X = (float) ((double) this.position.X + (double) this.width * 0.5 - (double) heldItemFrame.Width * 0.5) - (float) (this.direction * 2); + this.itemLocation.Y = this.MountedCenter.Y - (float) heldItemFrame.Height * 0.5f; + } + } + else if (sItem.useStyle == 13) + { + int num14 = this.itemAnimationMax; + if (this.itemTimeMax != 0) + num14 = this.itemTimeMax; + if (num14 == 0) + num14 = sItem.useAnimation; + float num15 = (float) (1.0 - (double) (this.itemAnimation % num14) / (double) num14); + Player.CompositeArmStretchAmount stretch = Player.CompositeArmStretchAmount.Quarter; + if ((double) num15 > 0.330000013113022 && (double) num15 <= 0.660000026226044) + stretch = Player.CompositeArmStretchAmount.ThreeQuarters; + if ((double) num15 > 0.660000026226044 && (double) num15 <= 1.0) + stretch = Player.CompositeArmStretchAmount.Full; + float rotation = this.itemRotation - 1.570796f * (float) this.direction; + this.SetCompositeArmFront(true, stretch, rotation); + } + else if (sItem.useStyle == 8) + { + Projectile projectile1 = (Projectile) null; + if (this.ownedProjectileCounts[722] > 0) + { + for (int index = 0; index < 1000; ++index) + { + Projectile projectile2 = Main.projectile[index]; + if (projectile2.active && projectile2.owner == this.whoAmI && projectile2.type == 722) + { + projectile1 = projectile2; + break; + } + } + } + float num16 = 1f; + if (projectile1 != null) + num16 = MathHelper.Lerp(0.6f, 1f, Utils.GetLerpValue(0.0f, 800f, Vector2.Distance(this.MountedCenter, projectile1.Center), true)); + float num17 = 1f; + if (this.itemAnimation >= sItem.useAnimation - 1 && this.itemAnimation <= sItem.useAnimation) + { + this.itemRotation = new Vector2((float) (10 * this.direction), 10f).ToRotation() + 0.7853982f; + if (this.direction == -1) + this.itemRotation += 1.570796f; + double num18 = 1.0 - (double) this.itemAnimation / (double) this.itemAnimationMax; + Player.CompositeArmStretchAmount stretch1 = Player.CompositeArmStretchAmount.Full; + Player.CompositeArmStretchAmount stretch2 = Player.CompositeArmStretchAmount.ThreeQuarters; + float num19 = -0.3141593f; + if (this.direction == -1) + num19 *= -1f; + float num20 = (float) ((double) this.itemRotation - 0.785398185253143 + 3.14159274101257); + if (this.direction == 1) + num20 += 1.570796f; + float rotation1 = num20 + num19; + float rotation2 = num20 - num19; + this.itemLocation = (this.MountedCenter + (num20 + 1.570796f).ToRotationVector2() * -2f).Floor(); + this.SetCompositeArmFront(true, stretch1, rotation1); + this.SetCompositeArmBack(true, stretch2, rotation2); + } + else if (this.itemAnimation > sItem.useAnimation) + { + float num21 = -Utils.GetLerpValue((float) this.itemAnimationMax, (float) (this.itemAnimationMax * 5), (float) this.itemAnimation, true) * num17; + Player.CompositeArmStretchAmount stretch3 = Player.CompositeArmStretchAmount.Full; + Player.CompositeArmStretchAmount stretch4 = Player.CompositeArmStretchAmount.ThreeQuarters; + float num22 = -0.3141593f * -num21; + this.itemRotation = (float) (1.57079637050629 * (double) -this.direction + 3.14159274101257 + 3.14159274101257 * (double) num21 * (double) -this.direction); + double num23 = -0.628318548202515 * (double) this.direction; + if (this.direction < 1) + num22 *= -1f; + float rotation3 = (float) num23 + num22; + float rotation4 = (float) num23 - num22; + this.itemLocation = (this.MountedCenter + new Vector2((float) (10 * this.direction), num21 * -6f)).Floor(); + this.SetCompositeArmFront(true, stretch3, rotation3); + this.SetCompositeArmBack(true, stretch4, rotation4); + } + else + { + float num24 = (float) (1.0 - (double) this.itemAnimation / (double) this.itemAnimationMax); + Player.CompositeArmStretchAmount stretch5 = Player.CompositeArmStretchAmount.Full; + Player.CompositeArmStretchAmount stretch6 = Player.CompositeArmStretchAmount.ThreeQuarters; + if ((double) num24 > 0.600000023841858) + stretch6 = Player.CompositeArmStretchAmount.Quarter; + float num25 = -0.3141593f; + if (this.direction == -1) + num25 *= -1f; + float num26 = num25 * (float) (1.0 - (double) num24 * 2.20000004768372); + this.itemRotation = (float) (((double) num24 * 3.14159274101257 * 1.60000002384186 - 1.57079637050629) * (double) num17 * (double) -this.direction + 3.14159274101257); + float num27 = (float) (((double) num24 * 3.14159274101257 * 0.600000023841858 + 1.25663709640503) * (double) -this.direction + 3.14159274101257 - 0.785398185253143 + 3.14159274101257); + if (this.direction == 1) + num27 += 1.570796f; + float rotation5 = num27 + num26; + float rotation6 = num27 - num26; + this.itemLocation = (this.MountedCenter + (num27 + 1.570796f).ToRotationVector2() * (float) (-5.0 * (1.0 - (double) num24))).Floor(); + this.SetCompositeArmFront(true, stretch5, rotation5); + this.SetCompositeArmBack(true, stretch6, rotation6); + } + this.FlipItemLocationAndRotationForGravity(); + } + else if (sItem.useStyle == 12) + { + this.itemRotation = 0.0f; + this.itemLocation.X = this.MountedCenter.X - (float) (8 * this.direction); + this.itemLocation.Y = this.position.Y + 40f + mountOffset; + this.itemLocation += Main.OffsetsPlayerHeadgear[this.bodyFrame.Y / 56]; + float num28 = (float) this.itemAnimationMax; + if ((double) num28 == 0.0) + num28 = (float) sItem.useAnimation; + float num29 = (float) (1.0 - (double) this.itemAnimation / (double) num28) * 2f; + float num30 = (float) Math.Cos((double) num29 * 3.14159274101257) * 0.2f; + Player.CompositeArmStretchAmount stretch = Player.CompositeArmStretchAmount.Full; + if ((double) num29 > 0.25 && (double) num29 <= 0.5) + stretch = Player.CompositeArmStretchAmount.ThreeQuarters; + if ((double) num29 > 0.5 && (double) num29 <= 0.75) + stretch = Player.CompositeArmStretchAmount.Quarter; + if ((double) num29 > 0.75 && (double) num29 <= 1.25) + stretch = Player.CompositeArmStretchAmount.None; + if ((double) num29 > 1.25 && (double) num29 <= 1.5) + stretch = Player.CompositeArmStretchAmount.Quarter; + if ((double) num29 > 1.5 && (double) num29 <= 1.75) + stretch = Player.CompositeArmStretchAmount.ThreeQuarters; + if ((double) num29 > 1.75 && (double) num29 <= 2.0) + stretch = Player.CompositeArmStretchAmount.Full; + this.SetCompositeArmFront(true, stretch, (num30 - 0.7853982f) * (float) this.direction); + this.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Quarter, (float) (-0.785398185253143 - (double) num30 * 0.5) * (float) this.direction); + this.FlipItemLocationAndRotationForGravity(); + if (sItem.type != 4715 || stretch != Player.CompositeArmStretchAmount.ThreeQuarters) + return; + Vector2 Position = this.itemLocation + new Vector2((float) heldItemFrame.Width, (float) -heldItemFrame.Height) * new Vector2((float) this.direction, this.gravDir) * 0.3f; + Dust dust1 = Dust.NewDustPerfect(Position, 228, new Vector2?(Main.rand.NextVector2CircularEdge(1f, 1f))); + dust1.noGravity = true; + dust1.noLight = true; + dust1.velocity *= 2f; + float num31 = 0.5f; + for (float num32 = 0.0f; (double) num32 < 1.0; num32 += 0.5f) + { + if (Main.rand.Next(3) == 0) + { + Dust dust2 = Dust.NewDustPerfect(Position, 278, new Vector2?(Vector2.UnitY.RotatedBy((double) num32 * 6.28318548202515 + (double) Main.rand.NextFloat() * (double) num31 - (double) num31 * 0.5 + 1.57079637050629) * (float) (2.0 + (double) Main.rand.NextFloat() * 1.0)), 150, Color.Lerp(Color.White, Color.HotPink, (float) ((double) Main.rand.NextFloat() * 0.5 + 0.5)), 0.45f); + dust2.noGravity = true; + dust2.velocity *= 0.5f; + dust2.customData = (object) this; + dust2.position += dust2.velocity * 6f; + } + } + for (float num33 = 0.0f; (double) num33 < 1.0; num33 += 0.5f) + { + if (Main.rand.Next(3) == 0) + { + Dust dust3 = Dust.NewDustPerfect(Position, 278, new Vector2?(Vector2.UnitY.RotatedBy((double) num33 * 6.28318548202515 + (double) Main.rand.NextFloat() * (double) num31 - (double) num31 * 0.5 + 1.57079637050629) * (float) (0.5 + (double) Main.rand.NextFloat() * 1.0)), 150, Color.Lerp(Color.White, Color.Gold, (float) ((double) Main.rand.NextFloat() * 0.5 + 0.5)), 0.45f); + dust3.noGravity = true; + dust3.velocity *= 0.5f; + dust3.customData = (object) this; + dust3.position += dust3.velocity * 6f; + } + } + } + else + { + if (sItem.useStyle != 14 || Main.dedServ) + return; + this.itemRotation = 0.0f; + this.itemLocation.X = this.Center.X + (float) (6 * this.direction); + this.itemLocation.Y = (float) ((double) this.position.Y + 40.0 + (double) mountOffset - 8.0); + this.itemLocation += Main.OffsetsPlayerHeadgear[this.bodyFrame.Y / 56]; + this.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, -2.356194f * (float) this.direction); + this.FlipItemLocationAndRotationForGravity(); + } + } + + public void FlipItemLocationAndRotationForGravity() + { + if ((double) this.gravDir != -1.0) + return; + this.itemRotation = -this.itemRotation; + this.itemLocation.Y = this.Bottom.Y + (this.position.Y - this.itemLocation.Y); + } + + private void ItemCheck_StartActualUse(Item sItem) + { + bool flag1 = sItem.type == 4711; + if (((sItem.pick > 0 || sItem.axe > 0 ? 1 : (sItem.hammer > 0 ? 1 : 0)) | (flag1 ? 1 : 0)) != 0) + this.toolTime = 1; + if (this.grappling[0] > -1) + { + this.pulley = false; + this.pulleyDir = (byte) 1; + if (this.controlRight) + this.direction = 1; + else if (this.controlLeft) + this.direction = -1; + } + this.channel = sItem.channel; + this.attackCD = 0; + this.ApplyItemAnimation(sItem); + bool flag2 = ItemID.Sets.SkipsInitialUseSound[sItem.type]; + if (sItem.UseSound == null || flag2) + return; + SoundEngine.PlaySound(sItem.UseSound, this.Center); + } + + private void FreeUpPetsAndMinions(Item sItem) + { + if (ProjectileID.Sets.MinionSacrificable[sItem.shoot]) + { + List intList = new List(); + float num1 = 0.0f; + for (int index1 = 0; index1 < 1000; ++index1) + { + if (Main.projectile[index1].active && Main.projectile[index1].owner == this.whoAmI && Main.projectile[index1].minion) + { + int index2; + for (index2 = 0; index2 < intList.Count; ++index2) + { + if ((double) Main.projectile[intList[index2]].minionSlots > (double) Main.projectile[index1].minionSlots) + { + intList.Insert(index2, index1); + break; + } + } + if (index2 == intList.Count) + intList.Add(index1); + num1 += Main.projectile[index1].minionSlots; + } + } + float num2 = (float) ItemID.Sets.StaffMinionSlotsRequired[sItem.type]; + float num3 = 0.0f; + int num4 = 388; + int index3 = -1; + for (int index4 = 0; index4 < intList.Count; ++index4) + { + int type = Main.projectile[intList[index4]].type; + if (type == 626) + { + intList.RemoveAt(index4); + --index4; + } + if (type == 627) + { + if (Main.projectile[(int) Main.projectile[intList[index4]].localAI[1]].type == 628) + index3 = intList[index4]; + intList.RemoveAt(index4); + --index4; + } + } + if (index3 != -1) + { + intList.Add(index3); + intList.Add(Projectile.GetByUUID(Main.projectile[index3].owner, Main.projectile[index3].ai[0])); + } + for (int index5 = 0; index5 < intList.Count && (double) num1 - (double) num3 > (double) this.maxMinions - (double) num2; ++index5) + { + int type = Main.projectile[intList[index5]].type; + if (type != num4 && type != 625 && type != 628 && type != 623) + { + if (type == 388 && num4 == 387) + num4 = 388; + if (type == 387 && num4 == 388) + num4 = 387; + num3 += Main.projectile[intList[index5]].minionSlots; + if (type == 626 || type == 627) + { + Projectile projectile1 = Main.projectile[intList[index5]]; + int byUuid = Projectile.GetByUUID(projectile1.owner, projectile1.ai[0]); + if (Main.projectile.IndexInRange(byUuid)) + { + Projectile projectile2 = Main.projectile[byUuid]; + if (projectile2.type != 625) + projectile2.localAI[1] = projectile1.localAI[1]; + Projectile projectile3 = Main.projectile[(int) projectile1.localAI[1]]; + projectile3.ai[0] = projectile1.ai[0]; + projectile3.ai[1] = 1f; + projectile3.netUpdate = true; + } + } + Main.projectile[intList[index5]].Kill(); + } + } + intList.Clear(); + if ((double) num1 + (double) num2 < 9.0) + return; + AchievementsHelper.HandleSpecialEvent(this, 6); + } + else + { + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == this.whoAmI && Main.projectile[index].type == sItem.shoot) + Main.projectile[index].Kill(); + if (sItem.shoot == 72) + { + if (Main.projectile[index].active && Main.projectile[index].owner == this.whoAmI && Main.projectile[index].type == 86) + Main.projectile[index].Kill(); + if (Main.projectile[index].active && Main.projectile[index].owner == this.whoAmI && Main.projectile[index].type == 87) + Main.projectile[index].Kill(); + } + } + } + } + + private void ApplyPotionDelay(Item sItem) + { + if (sItem.type == 227) + { + this.potionDelay = this.restorationDelayTime; + this.AddBuff(21, this.potionDelay); + } + else + { + this.potionDelay = this.potionDelayTime; + this.AddBuff(21, this.potionDelay); + } + } + + private bool ItemCheck_CheckCanUse(Item sItem) + { + int whoAmI = this.whoAmI; + bool canUse = true; + int i = (int) ((double) Main.mouseX + (double) Main.screenPosition.X) / 16; + int j = (int) ((double) Main.mouseY + (double) Main.screenPosition.Y) / 16; + if ((double) this.gravDir == -1.0) + j = (int) ((double) Main.screenPosition.Y + (double) Main.screenHeight - (double) Main.mouseY) / 16; + if (sItem.type == 3335 && (this.extraAccessory || !Main.expertMode)) + canUse = false; + if (this.pulley && sItem.fishingPole > 0) + canUse = false; + if (this.pulley && ItemID.Sets.IsAKite[sItem.type]) + canUse = false; + if (sItem.type == 3611 && (WiresUI.Settings.ToolMode & (WiresUI.Settings.MultiToolMode.Red | WiresUI.Settings.MultiToolMode.Green | WiresUI.Settings.MultiToolMode.Blue | WiresUI.Settings.MultiToolMode.Yellow | WiresUI.Settings.MultiToolMode.Actuator)) == (WiresUI.Settings.MultiToolMode) 0) + canUse = false; + if ((sItem.type == 3611 || sItem.type == 3625) && this.wireOperationsCooldown > 0) + canUse = false; + if (!this.CheckDD2CrystalPaymentLock(sItem)) + canUse = false; + if (sItem.shoot > -1 && ProjectileID.Sets.IsADD2Turret[sItem.shoot] && !this.downedDD2EventAnyDifficulty && !DD2Event.Ongoing) + canUse = false; + if (sItem.shoot > -1 && ProjectileID.Sets.IsADD2Turret[sItem.shoot] && DD2Event.Ongoing && whoAmI == Main.myPlayer) + { + int worldX; + int worldY; + this.FindSentryRestingSpot(sItem.shoot, out worldX, out worldY, out int _); + if (Player.WouldSpotOverlapWithSentry(worldX, worldY, sItem.shoot == 688 || sItem.shoot == 689 || sItem.shoot == 690)) + canUse = false; + } + if (sItem.shoot > -1 && ProjectileID.Sets.IsADD2Turret[sItem.shoot] && whoAmI == Main.myPlayer) + { + int worldX; + int worldY; + this.FindSentryRestingSpot(sItem.shoot, out worldX, out worldY, out int _); + int num = worldX / 16; + worldY /= 16; + --worldY; + if (sItem.shoot == 688 || sItem.shoot == 689 || sItem.shoot == 690) + { + if (Collision.SolidTiles(num, num, worldY - 2, worldY)) + canUse = false; + } + else if (WorldGen.SolidTile(num, worldY)) + canUse = false; + } + if (this.wet && (sItem.shoot == 85 || sItem.shoot == 15 || sItem.shoot == 34)) + canUse = false; + if (sItem.makeNPC > (short) 0 && !NPC.CanReleaseNPCs(this.whoAmI)) + canUse = false; + if (this.whoAmI == Main.myPlayer && sItem.type == 603 && !Main.runningCollectorsEdition) + canUse = false; + if (sItem.type == 1071 || sItem.type == 1072) + { + bool flag = false; + for (int index = 0; index < 58; ++index) + { + if (this.inventory[index].paint > (byte) 0) + { + flag = true; + break; + } + } + if (!flag) + canUse = false; + } + if (this.noItems) + canUse = false; + if (sItem.tileWand > 0) + { + int tileWand = sItem.tileWand; + canUse = false; + for (int index = 0; index < 58; ++index) + { + if (tileWand == this.inventory[index].type && this.inventory[index].stack > 0) + { + canUse = true; + break; + } + } + } + if ((sItem.shoot == 6 || sItem.shoot == 19 || sItem.shoot == 33 || sItem.shoot == 52 || sItem.shoot == 113 || sItem.shoot == 320 || sItem.shoot == 333 || sItem.shoot == 383 || sItem.shoot == 491 || sItem.shoot == 867 || sItem.shoot == 902 ? 1 : (sItem.shoot == 866 ? 1 : 0)) != 0) + { + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == Main.myPlayer && Main.projectile[index].type == sItem.shoot) + canUse = false; + } + } + if (sItem.shoot == 106) + { + int num = 0; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == Main.myPlayer && Main.projectile[index].type == sItem.shoot) + ++num; + } + if (num >= sItem.stack) + canUse = false; + } + if (sItem.shoot == 272) + { + int num = 0; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == Main.myPlayer && Main.projectile[index].type == sItem.shoot) + ++num; + } + if (num >= sItem.stack) + canUse = false; + } + if (sItem.shoot == 13 || sItem.shoot == 32 || sItem.shoot >= 230 && sItem.shoot <= 235 || sItem.shoot == 315 || sItem.shoot == 331 || sItem.shoot == 372) + { + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == Main.myPlayer && Main.projectile[index].type == sItem.shoot && (double) Main.projectile[index].ai[0] != 2.0) + canUse = false; + } + } + if (sItem.shoot == 332) + { + int num = 0; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == Main.myPlayer && Main.projectile[index].type == sItem.shoot && (double) Main.projectile[index].ai[0] != 2.0) + ++num; + } + if (num >= 3) + canUse = false; + } + if (sItem.potion && this.potionDelay > 0) + canUse = false; + if (sItem.mana > 0 && this.silence) + canUse = false; + if (sItem.mana > 0 & canUse) + canUse = this.ItemCheck_PayMana(sItem, canUse); + if (sItem.type == 43 && Main.dayTime) + canUse = false; + if (sItem.type == 544 && Main.dayTime) + canUse = false; + if (sItem.type == 556 && Main.dayTime) + canUse = false; + if (sItem.type == 557 && Main.dayTime) + canUse = false; + if (sItem.type == 70 && !this.ZoneCorrupt) + canUse = false; + if (sItem.type == 1133 && !this.ZoneJungle) + canUse = false; + if (sItem.type == 1844 && (Main.dayTime || Main.pumpkinMoon || Main.snowMoon || DD2Event.Ongoing)) + canUse = false; + if (sItem.type == 1958 && (Main.dayTime || Main.pumpkinMoon || Main.snowMoon || DD2Event.Ongoing)) + canUse = false; + if (sItem.type == 2767 && (!Main.dayTime || Main.eclipse || !Main.hardMode)) + canUse = false; + if (sItem.type == 4271 && (Main.dayTime || Main.bloodMoon)) + canUse = false; + if (sItem.type == 3601 && (!NPC.downedGolemBoss || !Main.hardMode || NPC.AnyDanger() || NPC.AnyoneNearCultists())) + canUse = false; + if (!this.SummonItemCheck()) + canUse = false; + if (sItem.shoot == 17 & canUse && whoAmI == Main.myPlayer && !Player.ItemCheck_IsValidDirtRodTarget(Main.tile[i, j])) + canUse = false; + if (sItem.fishingPole > 0) + canUse = this.ItemCheck_CheckFishingBobbers(canUse); + if (ItemID.Sets.HasAProjectileThatHasAUsabilityCheck[sItem.type]) + canUse = this.ItemCheck_CheckUsabilityOfProjectiles(canUse); + if (sItem.shoot == 17 & canUse && whoAmI == Main.myPlayer) + { + if (Player.ItemCheck_IsValidDirtRodTarget(Main.tile[i, j])) + { + WorldGen.KillTile(i, j, noItem: true); + if (!Main.tile[i, j].active()) + { + if (Main.netMode == 1) + NetMessage.SendData(17, number: 4, number2: ((float) i), number3: ((float) j)); + } + else + canUse = false; + } + else + canUse = false; + } + if (canUse) + canUse = this.HasAmmo(sItem, canUse); + return canUse; + } + + private bool ItemCheck_CheckUsabilityOfProjectiles(bool canUse) + { + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && projectile.owner == this.whoAmI) + projectile.CheckUsability(this, ref canUse); + } + return canUse; + } + + private bool ItemCheck_CheckFishingBobbers(bool canUse) + { + for (int index = 0; index < 1000; ++index) + { + Projectile bobber = Main.projectile[index]; + if (bobber.active && bobber.owner == this.whoAmI && bobber.bobber) + { + canUse = false; + if (this.whoAmI == Main.myPlayer && (double) bobber.ai[0] == 0.0) + { + bobber.ai[0] = 1f; + float num = -10f; + if (bobber.wet && (double) bobber.velocity.Y > (double) num) + bobber.velocity.Y = num; + bobber.netUpdate2 = true; + if ((double) bobber.ai[1] < 0.0 && (double) bobber.localAI[1] != 0.0) + { + bool pullTheBobber; + int baitTypeUsed; + this.ItemCheck_CheckFishingBobber_PickAndConsumeBait(bobber, out pullTheBobber, out baitTypeUsed); + if (pullTheBobber) + this.ItemCheck_CheckFishingBobber_PullBobber(bobber, baitTypeUsed); + } + } + } + } + return canUse; + } + + private void ItemCheck_CheckFishingBobber_PullBobber(Projectile bobber, int baitTypeUsed) + { + if (baitTypeUsed == 2673) + { + if (Main.netMode != 1) + NPC.SpawnOnPlayer(this.whoAmI, 370); + else + NetMessage.SendData(61, number: this.whoAmI, number2: 370f); + bobber.ai[0] = 2f; + } + else if ((double) bobber.localAI[1] < 0.0) + { + Point point = new Point((int) bobber.position.X, (int) bobber.position.Y); + int Type = (int) -(double) bobber.localAI[1]; + if (Type == 618) + point.Y += 64; + if (Main.netMode == 1) + { + NetMessage.SendData(130, number: (point.X / 16), number2: ((float) (point.Y / 16)), number3: ((float) Type)); + } + else + { + NPC.NewNPC(point.X, point.Y, Type); + bobber.ai[0] = 2f; + } + } + else if (Main.rand.Next(7) == 0 && !this.accFishingLine) + bobber.ai[0] = 2f; + else + bobber.ai[1] = bobber.localAI[1]; + bobber.netUpdate = true; + } + + private void ItemCheck_CheckFishingBobber_PickAndConsumeBait( + Projectile bobber, + out bool pullTheBobber, + out int baitTypeUsed) + { + pullTheBobber = false; + baitTypeUsed = 0; + int index1 = -1; + for (int index2 = 54; index2 < 58; ++index2) + { + if (this.inventory[index2].stack > 0 && this.inventory[index2].bait > 0) + { + index1 = index2; + break; + } + } + if (index1 == -1) + { + for (int index3 = 0; index3 < 50; ++index3) + { + if (this.inventory[index3].stack > 0 && this.inventory[index3].bait > 0) + { + index1 = index3; + break; + } + } + } + if (index1 <= -1) + return; + Item obj1 = this.inventory[index1]; + bool flag = false; + float num = (float) (1.0 + (double) obj1.bait / 6.0); + if ((double) num < 1.0) + num = 1f; + if (this.accTackleBox) + ++num; + if ((double) Main.rand.NextFloat() * (double) num < 1.0) + flag = true; + if ((double) bobber.localAI[1] == -1.0) + flag = true; + if ((double) bobber.localAI[1] > 0.0) + { + Item obj2 = new Item(); + obj2.SetDefaults((int) bobber.localAI[1]); + if (obj2.rare < 0) + flag = false; + } + baitTypeUsed = obj1.type; + if (baitTypeUsed == 2673) + flag = true; + if (flag) + { + if (obj1.type == 4361 || obj1.type == 4362) + NPC.LadyBugKilled(this.Center, obj1.type == 4362); + --obj1.stack; + if (obj1.stack <= 0) + obj1.SetDefaults(); + } + pullTheBobber = true; + } + + private static bool ItemCheck_IsValidDirtRodTarget(Tile t) + { + if (!t.active()) + return false; + return t.type == (ushort) 0 || t.type == (ushort) 2 || t.type == (ushort) 23 || t.type == (ushort) 109 || t.type == (ushort) 199 || t.type == (ushort) 477 || t.type == (ushort) 492; + } + + private bool ItemCheck_PayMana(Item sItem, bool canUse) + { + bool flag1 = this.altFunctionUse == 2; + bool flag2 = false; + int num = (int) ((double) sItem.mana * (double) this.manaCost); + if (sItem.type == 2795) + flag2 = true; + if (sItem.type == 3852 & flag1) + num = (int) ((double) (sItem.mana * 2) * (double) this.manaCost); + if (((sItem.shoot <= 0 ? 0 : (ProjectileID.Sets.TurretFeature[sItem.shoot] ? 1 : 0)) & (flag1 ? 1 : 0)) != 0) + flag2 = true; + if (((sItem.shoot <= 0 ? 0 : (ProjectileID.Sets.MinionTargettingFeature[sItem.shoot] ? 1 : 0)) & (flag1 ? 1 : 0)) != 0) + flag2 = true; + if (sItem.type != 3269 && (!this.spaceGun || sItem.type != (int) sbyte.MaxValue && sItem.type != 4347 && sItem.type != 4348)) + { + if (this.statMana >= num) + { + if (!flag2) + this.statMana -= num; + } + else if (this.manaFlower) + { + this.QuickMana(); + if (this.statMana >= num) + { + if (!flag2) + this.statMana -= num; + } + else + canUse = false; + } + else + canUse = false; + } + return canUse; + } + + private void ItemCheck_TryPlacingWearablesOnMannequins(Item sItem) + { + if (!this.controlUseItem || !this.releaseUseItem || sItem.headSlot <= 0 && sItem.bodySlot <= 0 && sItem.legSlot <= 0) + return; + if (sItem.useStyle == 0) + this.releaseUseItem = false; + if ((double) this.position.X / 16.0 - (double) Player.tileRangeX - (double) sItem.tileBoost > (double) Player.tileTargetX || ((double) this.position.X + (double) this.width) / 16.0 + (double) Player.tileRangeX + (double) sItem.tileBoost - 1.0 < (double) Player.tileTargetX || (double) this.position.Y / 16.0 - (double) Player.tileRangeY - (double) sItem.tileBoost > (double) Player.tileTargetY || ((double) this.position.Y + (double) this.height) / 16.0 + (double) Player.tileRangeY + (double) sItem.tileBoost - 2.0 < (double) Player.tileTargetY) + return; + int tileTargetX = Player.tileTargetX; + int tileTargetY = Player.tileTargetY; + if (!Main.tile[tileTargetX, tileTargetY].active() || Main.tile[tileTargetX, tileTargetY].type != (ushort) 128 && Main.tile[tileTargetX, tileTargetY].type != (ushort) 269) + return; + int frameY = (int) Main.tile[tileTargetX, tileTargetY].frameY; + int num1 = 0; + if (sItem.bodySlot >= 0) + num1 = 1; + if (sItem.legSlot >= 0) + num1 = 2; + int num2; + for (num2 = frameY / 18; num1 > num2; num2 = (int) Main.tile[tileTargetX, tileTargetY].frameY / 18) + ++tileTargetY; + for (; num1 < num2; num2 = (int) Main.tile[tileTargetX, tileTargetY].frameY / 18) + --tileTargetY; + int frameX1 = (int) Main.tile[tileTargetX, tileTargetY].frameX; + while (frameX1 >= 100) + frameX1 -= 100; + if (frameX1 >= 36) + frameX1 -= 36; + int index = tileTargetX - frameX1 / 18; + int frameX2 = (int) Main.tile[index, tileTargetY].frameX; + WorldGen.KillTile(index, tileTargetY, true); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) index), number3: ((float) tileTargetY), number4: 1f); + while (frameX2 >= 100) + frameX2 -= 100; + if (num2 == 0 && sItem.headSlot >= 0) + { + Main.blockMouse = true; + Main.tile[index, tileTargetY].frameX = (short) (frameX2 + sItem.headSlot * 100); + if (Main.netMode == 1) + NetMessage.SendTileSquare(-1, index, tileTargetY, 1); + --sItem.stack; + if (sItem.stack <= 0) + { + sItem.SetDefaults(); + Main.mouseItem.SetDefaults(); + } + if (this.selectedItem == 58) + Main.mouseItem = sItem.Clone(); + this.releaseUseItem = false; + this.mouseInterface = true; + } + else if (num2 == 1 && sItem.bodySlot >= 0) + { + Main.blockMouse = true; + Main.tile[index, tileTargetY].frameX = (short) (frameX2 + sItem.bodySlot * 100); + if (Main.netMode == 1) + NetMessage.SendTileSquare(-1, index, tileTargetY, 1); + --sItem.stack; + if (sItem.stack <= 0) + { + sItem.SetDefaults(); + Main.mouseItem.SetDefaults(); + } + if (this.selectedItem == 58) + Main.mouseItem = sItem.Clone(); + this.releaseUseItem = false; + this.mouseInterface = true; + } + else + { + if (num2 != 2 || sItem.legSlot < 0 || ArmorIDs.Legs.Sets.MannequinIncompatible.Contains(sItem.legSlot)) + return; + Main.blockMouse = true; + Main.tile[index, tileTargetY].frameX = (short) (frameX2 + sItem.legSlot * 100); + if (Main.netMode == 1) + NetMessage.SendTileSquare(-1, index, tileTargetY, 1); + --sItem.stack; + if (sItem.stack <= 0) + { + sItem.SetDefaults(); + Main.mouseItem.SetDefaults(); + } + if (this.selectedItem == 58) + Main.mouseItem = sItem.Clone(); + this.releaseUseItem = false; + this.mouseInterface = true; + } + } + + private void ApplyReuseDelay() + { + this.itemAnimation = this.reuseDelay; + this.itemTime = this.reuseDelay; + this.reuseDelay = 0; + } + + private void ItemCheck_HackHoldStyles(Item sItem) + { + if (sItem.fishingPole > 0) + { + sItem.holdStyle = 0; + if (this.ItemTimeIsZero && this.itemAnimation == 0) + { + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == this.whoAmI && Main.projectile[index].bobber) + sItem.holdStyle = 1; + } + } + } + if (!ItemID.Sets.IsAKite[sItem.type]) + return; + sItem.holdStyle = 0; + if (!this.ItemTimeIsZero || this.itemAnimation != 0) + return; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == this.whoAmI && Main.projectile[index].type == sItem.shoot) + sItem.holdStyle = 1; + } + } + + private void ItemCheck_HandleMPItemAnimation(Item sItem) + { + if (sItem.autoReuse && !this.noItems) + { + this.releaseUseItem = true; + if (this.itemAnimation == 1 && sItem.stack > 0) + { + if (sItem.shoot > 0 && this.whoAmI != Main.myPlayer && this.controlUseItem && sItem.useStyle == 5 && sItem.reuseDelay == 0) + { + this.ApplyItemAnimation(sItem); + if (sItem.UseSound != null) + SoundEngine.PlaySound(sItem.UseSound, this.Center); + } + else + this.itemAnimation = 0; + } + } + this.TryAllowingItemReuse(sItem); + } + + private void TryAllowingItemReuse(Item sItem) + { + bool flag = false; + if (this.kbGlove) + flag = ((flag | sItem.melee ? 1 : 0) | (!sItem.summon ? 0 : (ItemID.Sets.SummonerWeaponThatScalesWithAttackSpeed[sItem.type] ? 1 : 0))) != 0; + if (!flag) + return; + this.releaseUseItem = true; + } + + private void ItemCheck_HandleMount() + { + if (!this.mount.Active) + return; + if (this.mount.Type == 8) + { + this.noItems = true; + if (this.controlUseItem) + { + this.channel = true; + if (this.releaseUseItem) + this.mount.UseAbility(this, Vector2.Zero, true); + this.releaseUseItem = false; + } + } + if (this.whoAmI != Main.myPlayer || (double) this.gravDir != -1.0) + return; + this.mount.Dismount(this); + } + + public static bool WouldSpotOverlapWithSentry(int worldX, int worldY, bool lightningAura) + { + Point point1 = new Point(worldX, worldY - 8); + Point point2 = new Point(worldX + 16, worldY - 8); + Point point3 = new Point(worldX - 16, worldY - 8); + bool flag = false; + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && projectile.sentry) + { + Microsoft.Xna.Framework.Rectangle hitbox = projectile.Hitbox; + if (!lightningAura && hitbox.X > 30) + { + hitbox.X += hitbox.Width / 2; + hitbox.Width = 30; + hitbox.X -= hitbox.Width / 2; + } + if (hitbox.Contains(point1) || hitbox.Contains(point2) || hitbox.Contains(point3)) + { + flag = true; + break; + } + } + } + return flag; + } + + public void FindSentryRestingSpot( + int checkProj, + out int worldX, + out int worldY, + out int pushYUp) + { + bool flag = false; + int i = (int) ((double) Main.mouseX + (double) Main.screenPosition.X) / 16; + int j = (int) ((double) Main.mouseY + (double) Main.screenPosition.Y) / 16; + if ((double) this.gravDir == -1.0) + j = (int) ((double) Main.screenPosition.Y + (double) Main.screenHeight - (double) Main.mouseY) / 16; + worldX = i * 16 + 8; + pushYUp = 41; + switch (checkProj) + { + case 663: + worldX += this.direction; + break; + case 665: + pushYUp += 2; + break; + case 667: + pushYUp += 3; + break; + case 677: + worldX += this.direction; + break; + case 678: + worldX += this.direction; + break; + case 691: + case 692: + case 693: + pushYUp = 20; + worldX += this.direction; + pushYUp += 2; + break; + } + if (!flag) + { + while (j < Main.maxTilesY - 10 && Main.tile[i, j] != null && !WorldGen.SolidTile2(i, j) && Main.tile[i - 1, j] != null && !WorldGen.SolidTile2(i - 1, j) && Main.tile[i + 1, j] != null && !WorldGen.SolidTile2(i + 1, j)) + ++j; + ++j; + } + int num = j - 1; + pushYUp -= 14; + worldY = num * 16; + } + + public void WipeOldestTurret() + { + List projectileList = new List(); + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].WipableTurret) + projectileList.Add(Main.projectile[index]); + } + if (projectileList.Count == 0) + return; + Projectile projectile = projectileList[0]; + for (int index = 1; index < projectileList.Count; ++index) + { + if (projectileList[index].timeLeft < projectile.timeLeft) + projectile = projectileList[index]; + } + projectile.Kill(); + } + + public void UpdateMaxTurrets() + { + List projectileList = new List(); + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].WipableTurret) + projectileList.Add(Main.projectile[index]); + } + int num = 0; + while (projectileList.Count > this.maxTurrets && ++num < 1000) + { + Projectile projectile = projectileList[0]; + for (int index = 1; index < projectileList.Count; ++index) + { + if (projectileList[index].timeLeft < projectile.timeLeft) + projectile = projectileList[index]; + } + projectile.Kill(); + projectileList.Remove(projectile); + } + } + + private void ItemCheck_ApplyPetBuffs(Item sItem) + { + if (this.whoAmI == Main.myPlayer && sItem.type == 603 && Main.runningCollectorsEdition) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 669) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 115) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 3060) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 3628) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 3062) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 3577) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 425) + { + int type = Main.rand.Next(3); + if (type == 0) + type = 27; + if (type == 1) + type = 101; + if (type == 2) + type = 102; + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] == 27 || this.buffType[b] == 101 || this.buffType[b] == 102) + { + this.DelBuff(b); + --b; + } + } + this.AddBuff(type, 3600); + } + if (this.whoAmI == Main.myPlayer && sItem.type == 753) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 994) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 1169) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 1170) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 1171) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 1172) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 1180) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 1181) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 1182) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 1183) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 1242) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 1157) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 1309) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 1311) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 1837) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 1312) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 1798) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 1799) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 1802) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 1810) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 1927) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 1959) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 2364) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 2365) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 3043) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer && sItem.type == 2420) + this.AddBuff(sItem.buffType, 3600); + if (this.whoAmI == Main.myPlayer) + { + switch (sItem.type) + { + case 2535: + case 2551: + case 2584: + case 2587: + case 2621: + case 2749: + case 3249: + case 3474: + case 3531: + case 4269: + case 4273: + case 4281: + case 4607: + case 4758: + case 5005: + this.AddBuff(sItem.buffType, 3600); + break; + } + } + if (this.whoAmI != Main.myPlayer) + return; + int type1 = sItem.type; + if (type1 <= 4605) + { + if (type1 <= 4366) + { + if ((uint) (type1 - 3855) > 2U && (uint) (type1 - 4365) > 1U) + return; + } + else if (type1 != 4425 && (uint) (type1 - 4550) > 1U && (uint) (type1 - 4603) > 2U) + return; + } + else if (type1 <= 4737) + { + if (type1 != 4701 && (uint) (type1 - 4735) > 2U) + return; + } + else if (type1 != 4777 && (uint) (type1 - 4797) > 20U && type1 != 4960) + return; + this.AddBuff(sItem.buffType, 3600); + } + + public float GetWeaponKnockback(Item sItem, float KnockBack) + { + if (sItem.summon) + KnockBack += this.minionKB; + if (sItem.melee && this.kbGlove) + KnockBack *= 2f; + if (this.kbBuff) + KnockBack *= 1.5f; + if (sItem.ranged && this.shroomiteStealth) + KnockBack *= (float) (1.0 + (1.0 - (double) this.stealth) * 0.5); + if (sItem.ranged && this.setVortex) + KnockBack *= (float) (1.0 + (1.0 - (double) this.stealth) * 0.5); + return KnockBack; + } + + public int GetWeaponCrit(Item sItem) + { + if (sItem.melee) + return this.meleeCrit; + if (sItem.ranged) + return this.rangedCrit; + return sItem.magic ? this.magicCrit : 0; + } + + public int GetWeaponDamage(Item sItem) + { + int num = sItem.damage; + if (num > 0) + { + if (sItem.melee) + num = (int) ((double) num * (double) this.meleeDamage + 4.99999987368938E-06); + else if (sItem.ranged) + { + num = (int) ((double) num * (double) this.rangedDamage + 4.99999987368938E-06); + if (sItem.useAmmo == AmmoID.Arrow || sItem.useAmmo == AmmoID.Stake) + num = (int) ((double) num * (double) this.arrowDamage + 4.99999987368938E-06); + if (sItem.useAmmo == AmmoID.Bullet || sItem.useAmmo == AmmoID.CandyCorn) + num = (int) ((double) num * (double) this.bulletDamage + 4.99999987368938E-06); + if (sItem.useAmmo == AmmoID.Rocket || sItem.useAmmo == AmmoID.StyngerBolt || sItem.useAmmo == AmmoID.JackOLantern || sItem.useAmmo == AmmoID.NailFriendly) + num = (int) ((double) num * (double) this.rocketDamage + 4.99999987368938E-06); + } + else if (sItem.magic) + num = (int) ((double) num * (double) this.magicDamage + 4.99999987368938E-06); + else if (sItem.summon) + num = (int) ((double) num * (double) this.minionDamage); + } + return num; + } + + public bool HasAmmo(Item sItem, bool canUse) + { + if (sItem.useAmmo > 0) + { + canUse = false; + for (int index = 0; index < 58; ++index) + { + if (this.inventory[index].ammo == sItem.useAmmo && this.inventory[index].stack > 0) + { + canUse = true; + break; + } + } + } + return canUse; + } + + private bool PickAmmo_TryFindingSpecificMatches( + int launcher, + int ammo, + out int pickedProjectileId) + { + pickedProjectileId = 0; + Dictionary dictionary; + return AmmoID.Sets.SpecificLauncherAmmoProjectileMatches.TryGetValue(launcher, out dictionary) && dictionary.TryGetValue(ammo, out pickedProjectileId); + } + + public void PickAmmo( + Item sItem, + ref int projToShoot, + ref float speed, + ref bool canShoot, + ref int Damage, + ref float KnockBack, + bool dontConsume = false) + { + Item obj = new Item(); + bool flag1 = false; + for (int index = 54; index < 58; ++index) + { + if (this.inventory[index].ammo == sItem.useAmmo && this.inventory[index].stack > 0) + { + obj = this.inventory[index]; + canShoot = true; + flag1 = true; + break; + } + } + if (!flag1) + { + for (int index = 0; index < 54; ++index) + { + if (this.inventory[index].ammo == sItem.useAmmo && this.inventory[index].stack > 0) + { + obj = this.inventory[index]; + canShoot = true; + break; + } + } + } + if (!canShoot) + return; + int pickedProjectileId = -1; + if (this.PickAmmo_TryFindingSpecificMatches(sItem.type, obj.type, out pickedProjectileId)) + projToShoot = pickedProjectileId; + else if (sItem.type == 1946) + projToShoot = 338 + obj.type - 771; + else if (sItem.type == 3930) + projToShoot = 715 + obj.type - AmmoID.Rocket; + else if (sItem.useAmmo == AmmoID.Rocket) + projToShoot += obj.shoot; + else if (sItem.useAmmo == 780) + projToShoot += obj.shoot; + else if (obj.shoot > 0) + projToShoot = obj.shoot; + if (sItem.type == 3019 && projToShoot == 1) + projToShoot = 485; + if (sItem.type == 3052) + projToShoot = 495; + if (sItem.type == 4953 && projToShoot == 1) + projToShoot = 932; + if (sItem.type == 4381) + projToShoot = 819; + if (sItem.type == 3245 && projToShoot == 21) + projToShoot = 532; + if (sItem.type == 4058 && projToShoot == 474) + projToShoot = 117; + if (projToShoot == 42) + { + if (obj.type == 370) + { + projToShoot = 65; + Damage += 5; + } + else if (obj.type == 408) + { + projToShoot = 68; + Damage += 5; + } + else if (obj.type == 1246) + { + projToShoot = 354; + Damage += 5; + } + } + if (this.inventory[this.selectedItem].type == 2888 && projToShoot == 1) + projToShoot = 469; + if (this.hasMoltenQuiver && projToShoot == 1) + projToShoot = 2; + if (this.magicQuiver && (sItem.useAmmo == AmmoID.Arrow || sItem.useAmmo == AmmoID.Stake)) + { + KnockBack = (float) (int) ((double) KnockBack * 1.1); + speed *= 1.1f; + } + speed += obj.shootSpeed; + if (obj.ranged) + { + if (obj.damage > 0) + Damage += (int) ((double) obj.damage * (double) this.rangedDamage); + } + else + Damage += obj.damage; + if ((sItem.useAmmo == AmmoID.Arrow || sItem.useAmmo == AmmoID.Stake) && this.archery) + { + if ((double) speed < 20.0) + { + speed *= 1.2f; + if ((double) speed > 20.0) + speed = 20f; + } + Damage = (int) ((double) Damage * 1.2); + } + KnockBack += obj.knockBack; + bool flag2 = dontConsume; + if (sItem.type == 3245 && Main.rand.Next(3) == 0) + flag2 = true; + if (sItem.type == 3475 && Main.rand.Next(3) != 0) + flag2 = true; + if (sItem.type == 3930 && Main.rand.Next(2) == 0) + flag2 = true; + if (sItem.type == 3540 && Main.rand.Next(3) != 0) + flag2 = true; + if (this.magicQuiver && (sItem.useAmmo == AmmoID.Arrow || sItem.useAmmo == AmmoID.Stake) && Main.rand.Next(5) == 0) + flag2 = true; + if (this.ammoBox && Main.rand.Next(5) == 0) + flag2 = true; + if (this.ammoPotion && Main.rand.Next(5) == 0) + flag2 = true; + if (sItem.type == 1782 && Main.rand.Next(3) == 0) + flag2 = true; + if (sItem.type == 98 && Main.rand.Next(3) == 0) + flag2 = true; + if (sItem.type == 2270 && Main.rand.Next(2) == 0) + flag2 = true; + if (sItem.type == 533 && Main.rand.Next(2) == 0) + flag2 = true; + if (sItem.type == 1929 && Main.rand.Next(2) == 0) + flag2 = true; + if (sItem.type == 1553 && Main.rand.Next(3) != 0) + flag2 = true; + if (sItem.type == 434 && this.itemAnimation < sItem.useAnimation - 2) + flag2 = true; + if (sItem.type == 4953 && this.itemAnimation > sItem.useAnimation - 8) + flag2 = true; + if (this.chloroAmmoCost80 && Main.rand.Next(5) == 0) + flag2 = true; + if (this.ammoCost80 && Main.rand.Next(5) == 0) + flag2 = true; + if (this.ammoCost75 && Main.rand.Next(4) == 0) + flag2 = true; + if (projToShoot == 85 && this.itemAnimation < this.itemAnimationMax - 6) + flag2 = true; + if ((projToShoot == 145 || projToShoot == 146 || projToShoot == 147 || projToShoot == 148 || projToShoot == 149) && this.itemAnimation < this.itemAnimationMax - 5) + flag2 = true; + if (flag2 || !obj.consumable) + return; + --obj.stack; + if (obj.stack > 0) + return; + obj.active = false; + obj.TurnToAir(); + } + + public void GetOtherPlayersPickTile(int x, int y, int pickDamage) => this.hitTile.AddDamage(this.hitTile.HitObject(x, y, 1), pickDamage); + + public void PickTile(int x, int y, int pickPower) + { + int tileId = this.hitTile.HitObject(x, y, 1); + Tile tileTarget = Main.tile[x, y]; + if (tileTarget.type == (ushort) 504) + return; + int num1 = this.GetPickaxeDamage(x, y, pickPower, tileId, tileTarget); + if (!WorldGen.CanKillTile(x, y)) + num1 = 0; + if (Main.getGoodWorld) + num1 *= 2; + if (this.DoesPickTargetTransformOnKill(this.hitTile, num1, x, y, pickPower, tileId, tileTarget)) + num1 = 0; + if (this.hitTile.AddDamage(tileId, num1) >= 100) + { + AchievementsHelper.CurrentlyMining = true; + this.ClearMiningCacheAt(x, y, 1); + if (Main.netMode == 1 && Main.tileContainer[(int) Main.tile[x, y].type]) + { + if (Main.tile[x, y].type == (ushort) 470 || Main.tile[x, y].type == (ushort) 475) + { + NetMessage.SendData(17, number: 20, number2: ((float) x), number3: ((float) y)); + } + else + { + WorldGen.KillTile(x, y, true); + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y), number4: 1f); + } + if (Main.tile[x, y].type == (ushort) 21) + NetMessage.SendData(34, number: 1, number2: ((float) x), number3: ((float) y)); + if (Main.tile[x, y].type == (ushort) 467) + NetMessage.SendData(34, number: 5, number2: ((float) x), number3: ((float) y)); + if (Main.tile[x, y].type == (ushort) 88) + NetMessage.SendData(34, number: 3, number2: ((float) x), number3: ((float) y)); + } + else + { + int j = y; + int num2 = Main.tile[x, j].active() ? 1 : 0; + WorldGen.KillTile(x, j); + if (num2 != 0 && !Main.tile[x, j].active()) + AchievementsHelper.HandleMining(); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) x), number3: ((float) j)); + } + AchievementsHelper.CurrentlyMining = false; + } + else + { + WorldGen.KillTile(x, y, true); + if (Main.netMode == 1) + { + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y), number4: 1f); + NetMessage.SendData(125, number: Main.myPlayer, number2: ((float) x), number3: ((float) y), number4: ((float) num1)); + } + } + if (num1 == 0) + return; + this.hitTile.Prune(); + } + + private void ClearMiningCacheAt(int x, int y, int hitTileCacheType) + { + this.hitReplace.TryClearingAndPruning(x, y, 1); + this.hitTile.TryClearingAndPruning(x, y, 1); + } + + public bool isNearFairy() + { + if (NPC.npcsFoundForCheckActive[583] || NPC.npcsFoundForCheckActive[584] || NPC.npcsFoundForCheckActive[585]) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && (Main.npc[index].type == 583 || Main.npc[index].type == 584 || Main.npc[index].type == 585) && (double) Vector2.Distance(Main.npc[index].Center, this.Center) < (double) NPC.sWidth) + return true; + } + } + return false; + } + + public bool isNearNPC(int type, float range = -1f) + { + if ((double) range == -1.0) + range = (float) NPC.sWidth; + if (NPC.npcsFoundForCheckActive[type]) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == type && (double) Vector2.Distance(Main.npc[index].Center, this.Center) < (double) range) + return true; + } + } + return false; + } + + public bool HasEnoughPickPowerToHurtTile(int x, int y) + { + Item bestPickaxe = this.GetBestPickaxe(); + if (bestPickaxe == null) + return false; + Tile tileTarget = Main.tile[x, y]; + int type = (int) tileTarget.type; + return this.GetPickaxeDamage(Player.tileTargetX, Player.tileTargetY, bestPickaxe.pick, type, tileTarget) != 0; + } + + private int GetPickaxeDamage(int x, int y, int pickPower, int tileId, Tile tileTarget) + { + int num1 = 0; + if (Main.tileNoFail[(int) tileTarget.type]) + num1 = 100; + int num2 = Main.tileDungeon[(int) tileTarget.type] || tileTarget.type == (ushort) 25 || tileTarget.type == (ushort) 58 || tileTarget.type == (ushort) 117 || tileTarget.type == (ushort) 203 ? num1 + pickPower / 2 : (tileTarget.type != (ushort) 85 ? (tileTarget.type == (ushort) 48 || tileTarget.type == (ushort) 232 ? num1 + pickPower * 2 : (tileTarget.type != (ushort) 226 ? (tileTarget.type == (ushort) 107 || tileTarget.type == (ushort) 221 ? num1 + pickPower / 2 : (tileTarget.type == (ushort) 108 || tileTarget.type == (ushort) 222 ? num1 + pickPower / 3 : (tileTarget.type == (ushort) 111 || tileTarget.type == (ushort) 223 ? num1 + pickPower / 4 : (tileTarget.type != (ushort) 211 ? num1 + pickPower : num1 + pickPower / 5)))) : num1 + pickPower / 4)) : num1 + pickPower / 3); + if (tileTarget.type == (ushort) 211 && pickPower < 200) + num2 = 0; + if ((tileTarget.type == (ushort) 25 || tileTarget.type == (ushort) 203) && pickPower < 65) + num2 = 0; + else if (tileTarget.type == (ushort) 117 && pickPower < 65) + num2 = 0; + else if (tileTarget.type == (ushort) 37 && pickPower < 50) + num2 = 0; + else if ((tileTarget.type == (ushort) 22 || tileTarget.type == (ushort) 204) && (double) y > Main.worldSurface && pickPower < 55) + num2 = 0; + else if (tileTarget.type == (ushort) 56 && pickPower < 65) + num2 = 0; + else if (tileTarget.type == (ushort) 77 && pickPower < 65 && y >= Main.UnderworldLayer) + num2 = 0; + else if (tileTarget.type == (ushort) 58 && pickPower < 65) + num2 = 0; + else if ((tileTarget.type == (ushort) 226 || tileTarget.type == (ushort) 237) && pickPower < 210) + num2 = 0; + else if (tileTarget.type == (ushort) 137 && pickPower < 210) + { + switch ((int) tileTarget.frameY / 18) + { + case 1: + case 2: + case 3: + case 4: + num2 = 0; + break; + } + } + else if (Main.tileDungeon[(int) tileTarget.type] && pickPower < 100 && (double) y > Main.worldSurface) + { + if ((double) x < (double) Main.maxTilesX * 0.35 || (double) x > (double) Main.maxTilesX * 0.65) + num2 = 0; + } + else if (tileTarget.type == (ushort) 107 && pickPower < 100) + num2 = 0; + else if (tileTarget.type == (ushort) 108 && pickPower < 110) + num2 = 0; + else if (tileTarget.type == (ushort) 111 && pickPower < 150) + num2 = 0; + else if (tileTarget.type == (ushort) 221 && pickPower < 100) + num2 = 0; + else if (tileTarget.type == (ushort) 222 && pickPower < 110) + num2 = 0; + else if (tileTarget.type == (ushort) 223 && pickPower < 150) + num2 = 0; + if (tileTarget.type == (ushort) 147 || tileTarget.type == (ushort) 0 || tileTarget.type == (ushort) 40 || tileTarget.type == (ushort) 53 || tileTarget.type == (ushort) 57 || tileTarget.type == (ushort) 59 || tileTarget.type == (ushort) 123 || tileTarget.type == (ushort) 224 || tileTarget.type == (ushort) 397) + num2 += pickPower; + if (tileTarget.type == (ushort) 404) + num2 += 5; + if (tileTarget.type == (ushort) 165 || Main.tileRope[(int) tileTarget.type] || tileTarget.type == (ushort) 199) + num2 = 100; + if (tileTarget.type == (ushort) 128 || tileTarget.type == (ushort) 269) + { + if (tileTarget.frameX == (short) 18 || tileTarget.frameX == (short) 54) + { + --x; + tileTarget = Main.tile[x, y]; + this.hitTile.UpdatePosition(tileId, x, y); + } + if (tileTarget.frameX >= (short) 100) + { + num2 = 0; + Main.blockMouse = true; + } + } + if (tileTarget.type == (ushort) 334) + { + if (tileTarget.frameY == (short) 0) + { + ++y; + tileTarget = Main.tile[x, y]; + this.hitTile.UpdatePosition(tileId, x, y); + } + if (tileTarget.frameY == (short) 36) + { + --y; + tileTarget = Main.tile[x, y]; + this.hitTile.UpdatePosition(tileId, x, y); + } + int frameX1 = (int) tileTarget.frameX; + bool flag1 = frameX1 >= 5000; + bool flag2 = false; + if (!flag1) + { + int num3 = frameX1 / 18 % 3; + x -= num3; + tileTarget = Main.tile[x, y]; + if (tileTarget.frameX >= (short) 5000) + flag1 = true; + } + if (flag1) + { + int frameX2 = (int) tileTarget.frameX; + int num4 = 0; + while (frameX2 >= 5000) + { + frameX2 -= 5000; + ++num4; + } + if (num4 != 0) + flag2 = true; + } + if (flag2) + { + num2 = 0; + Main.blockMouse = true; + } + } + return num2; + } + + private bool DoesPickTargetTransformOnKill( + HitTile hitCounter, + int damage, + int x, + int y, + int pickPower, + int tileId, + Tile tileTarget) + { + return hitCounter.AddDamage(tileId, damage, false) >= 100 && (tileTarget.type == (ushort) 2 || tileTarget.type == (ushort) 477 || tileTarget.type == (ushort) 492 || tileTarget.type == (ushort) 23 || tileTarget.type == (ushort) 60 || tileTarget.type == (ushort) 70 || tileTarget.type == (ushort) 109 || tileTarget.type == (ushort) 199 || Main.tileMoss[(int) tileTarget.type] || TileID.Sets.tileMossBrick[(int) tileTarget.type]); + } + + public bool ItemFitsWeaponRack(Item i) + { + bool flag = false; + if (i.fishingPole > 0) + flag = true; + switch (i.netID) + { + case 905: + case 1326: + flag = true; + break; + } + return i.damage > 0 | flag && i.useStyle != 0 && i.stack > 0; + } + + public void PlaceWeapon(int x, int y) + { + if (!Main.tile[x, y].active() || Main.tile[x, y].type != (ushort) 334) + return; + int frameY = (int) Main.tile[x, y].frameY; + int num1 = 1; + int num2; + for (num2 = frameY / 18; num1 > num2; num2 = (int) Main.tile[x, y].frameY / 18) + ++y; + for (; num1 < num2; num2 = (int) Main.tile[x, y].frameY / 18) + --y; + int num3 = (int) Main.tile[x, y].frameX; + int num4 = 0; + while (num3 >= 5000) + { + num3 -= 5000; + ++num4; + } + if (num4 != 0) + num3 = (num4 - 1) * 18; + bool flag = false; + if (num3 >= 54) + { + num3 -= 54; + flag = true; + } + x -= num3 / 18; + int frameX = (int) Main.tile[x, y].frameX; + WorldGen.KillTile(x, y, true); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y), number4: 1f); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) (x + 1)), number3: ((float) y), number4: 1f); + while (frameX >= 5000) + frameX -= 5000; + Main.blockMouse = true; + int num5 = 5000; + int num6 = 10000; + if (flag) + { + num5 = 20000; + num6 = 25000; + } + Main.tile[x, y].frameX = (short) (this.inventory[this.selectedItem].netID + num5 + 100); + Main.tile[x + 1, y].frameX = (short) ((int) this.inventory[this.selectedItem].prefix + num6); + if (Main.netMode == 1) + NetMessage.SendTileSquare(-1, x, y, 1); + if (Main.netMode == 1) + NetMessage.SendTileSquare(-1, x + 1, y, 1); + --this.inventory[this.selectedItem].stack; + if (this.inventory[this.selectedItem].stack <= 0) + { + this.inventory[this.selectedItem].SetDefaults(); + Main.mouseItem.SetDefaults(); + } + if (this.selectedItem == 58) + Main.mouseItem = this.inventory[this.selectedItem].Clone(); + this.releaseUseItem = false; + this.mouseInterface = true; + } + + public bool ItemFitsItemFrame(Item i) => i.stack > 0; + + public Color GetImmuneAlpha(Color newColor, float alphaReduction) + { + float scale = (float) ((int) byte.MaxValue - this.immuneAlpha) / (float) byte.MaxValue; + if ((double) alphaReduction > 0.0) + scale *= 1f - alphaReduction; + return this.immuneAlpha > 125 ? Color.Transparent : Color.Multiply(newColor, scale); + } + + public Color GetImmuneAlphaPure(Color newColor, float alphaReduction) + { + float scale = (float) ((int) byte.MaxValue - this.immuneAlpha) / (float) byte.MaxValue; + if ((double) alphaReduction > 0.0) + scale *= 1f - alphaReduction; + return Color.Multiply(newColor, scale); + } + + public Color GetDeathAlpha(Color newColor) + { + int r = (int) newColor.R + (int) ((double) this.immuneAlpha * 0.9); + int num1 = (int) newColor.G + (int) ((double) this.immuneAlpha * 0.5); + int num2 = (int) newColor.B + (int) ((double) this.immuneAlpha * 0.5); + int num3 = (int) newColor.A + (int) ((double) this.immuneAlpha * 0.4); + if (num3 < 0) + num3 = 0; + if (num3 > (int) byte.MaxValue) + num3 = (int) byte.MaxValue; + int g = num1; + int b = num2; + int a = num3; + return new Color(r, g, b, a); + } + + public void addDPS(int dmg) + { + if (this.dpsStarted) + { + this.dpsLastHit = DateTime.Now; + this.dpsDamage += dmg; + this.dpsEnd = DateTime.Now; + } + else + { + this.dpsStarted = true; + this.dpsStart = DateTime.Now; + this.dpsEnd = DateTime.Now; + this.dpsLastHit = DateTime.Now; + this.dpsDamage = dmg; + } + } + + public void checkDPSTime() + { + int num = 3; + if (!this.dpsStarted || (DateTime.Now - this.dpsLastHit).Seconds < num) + return; + this.dpsStarted = false; + } + + public int getDPS() + { + TimeSpan timeSpan1 = this.dpsEnd - this.dpsStart; + float num = (float) timeSpan1.Milliseconds / 1000f + (float) timeSpan1.Seconds + (float) timeSpan1.Minutes / 60f; + if ((double) num >= 3.0) + { + this.dpsStart = DateTime.Now; + this.dpsStart = this.dpsStart.AddSeconds(-1.0); + this.dpsDamage = (int) ((double) this.dpsDamage / (double) num); + TimeSpan timeSpan2 = this.dpsEnd - this.dpsStart; + num = (float) timeSpan2.Milliseconds / 1000f + (float) timeSpan2.Seconds + (float) timeSpan2.Minutes / 60f; + } + if ((double) num < 1.0) + num = 1f; + return (int) ((double) this.dpsDamage / (double) num); + } + + public int DropCoins() + { + int num1 = 0; + for (int index = 0; index < 59; ++index) + { + if (this.inventory[index].IsACoin) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, this.inventory[index].type); + int num2 = this.inventory[index].stack / 2; + if (Main.expertMode) + num2 = (int) ((double) this.inventory[index].stack * 0.25); + if (Main.masterMode) + num2 = 0; + int num3 = this.inventory[index].stack - num2; + this.inventory[index].stack -= num3; + if (this.inventory[index].type == 71) + num1 += num3; + if (this.inventory[index].type == 72) + num1 += num3 * 100; + if (this.inventory[index].type == 73) + num1 += num3 * 10000; + if (this.inventory[index].type == 74) + num1 += num3 * 1000000; + if (this.inventory[index].stack <= 0) + this.inventory[index] = new Item(); + Main.item[number].stack = num3; + Main.item[number].velocity.Y = (float) Main.rand.Next(-20, 1) * 0.2f; + Main.item[number].velocity.X = (float) Main.rand.Next(-20, 21) * 0.2f; + Main.item[number].noGrabDelay = 100; + if (Main.netMode == 1) + NetMessage.SendData(21, number: number); + if (index == 58) + Main.mouseItem = this.inventory[index].Clone(); + } + } + this.lostCoins = num1; + this.lostCoinString = Main.ValueToCoins(this.lostCoins); + return num1; + } + + public void DropItems() + { + for (int index = 0; index < 59; ++index) + { + if (this.inventory[index].stack > 0) + { + bool flag = true; + if (this.inventory[index].type == 3507 || this.inventory[index].type == 3506 || this.inventory[index].type == 3509) + flag = false; + if (flag) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, this.inventory[index].type); + Main.item[number].netDefaults(this.inventory[index].netID); + Main.item[number].Prefix((int) this.inventory[index].prefix); + Main.item[number].stack = this.inventory[index].stack; + Main.item[number].velocity.Y = (float) Main.rand.Next(-20, 1) * 0.2f; + Main.item[number].velocity.X = (float) Main.rand.Next(-20, 21) * 0.2f; + Main.item[number].noGrabDelay = 100; + Main.item[number].newAndShiny = false; + if (Main.netMode == 1) + NetMessage.SendData(21, number: number); + } + } + this.inventory[index].TurnToAir(); + if (index < this.armor.Length) + { + if (this.armor[index].stack > 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, this.armor[index].type); + Main.item[number].netDefaults(this.armor[index].netID); + Main.item[number].Prefix((int) this.armor[index].prefix); + Main.item[number].stack = this.armor[index].stack; + Main.item[number].velocity.Y = (float) Main.rand.Next(-20, 1) * 0.2f; + Main.item[number].velocity.X = (float) Main.rand.Next(-20, 21) * 0.2f; + Main.item[number].noGrabDelay = 100; + Main.item[number].newAndShiny = false; + if (Main.netMode == 1) + NetMessage.SendData(21, number: number); + } + this.armor[index] = new Item(); + } + if (index < this.dye.Length) + { + if (this.dye[index].stack > 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, this.dye[index].type); + Main.item[number].netDefaults(this.dye[index].netID); + Main.item[number].Prefix((int) this.dye[index].prefix); + Main.item[number].stack = this.dye[index].stack; + Main.item[number].velocity.Y = (float) Main.rand.Next(-20, 1) * 0.2f; + Main.item[number].velocity.X = (float) Main.rand.Next(-20, 21) * 0.2f; + Main.item[number].noGrabDelay = 100; + Main.item[number].newAndShiny = false; + if (Main.netMode == 1) + NetMessage.SendData(21, number: number); + } + this.dye[index].TurnToAir(); + } + if (index < this.miscEquips.Length) + { + if (this.miscEquips[index].stack > 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, this.miscEquips[index].type); + Main.item[number].netDefaults(this.miscEquips[index].netID); + Main.item[number].Prefix((int) this.miscEquips[index].prefix); + Main.item[number].stack = this.miscEquips[index].stack; + Main.item[number].velocity.Y = (float) Main.rand.Next(-20, 1) * 0.2f; + Main.item[number].velocity.X = (float) Main.rand.Next(-20, 21) * 0.2f; + Main.item[number].noGrabDelay = 100; + Main.item[number].newAndShiny = false; + if (Main.netMode == 1) + NetMessage.SendData(21, number: number); + } + this.miscEquips[index].TurnToAir(); + } + if (index < this.miscDyes.Length) + { + if (this.miscDyes[index].stack > 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, this.miscDyes[index].type); + Main.item[number].netDefaults(this.miscDyes[index].netID); + Main.item[number].Prefix((int) this.miscDyes[index].prefix); + Main.item[number].stack = this.miscDyes[index].stack; + Main.item[number].velocity.Y = (float) Main.rand.Next(-20, 1) * 0.2f; + Main.item[number].velocity.X = (float) Main.rand.Next(-20, 21) * 0.2f; + Main.item[number].noGrabDelay = 100; + Main.item[number].newAndShiny = false; + if (Main.netMode == 1) + NetMessage.SendData(21, number: number); + } + this.miscDyes[index].TurnToAir(); + } + } + this.inventory[0].SetDefaults(3507); + this.inventory[0].Prefix(-1); + this.inventory[1].SetDefaults(3509); + this.inventory[1].Prefix(-1); + this.inventory[2].SetDefaults(3506); + this.inventory[2].Prefix(-1); + Main.mouseItem.TurnToAir(); + } + + public object Clone() => this.MemberwiseClone(); + + public void CopyVisuals(Player other) + { + this.skinVariant = other.skinVariant; + this.direction = other.direction; + this.selectedItem = other.selectedItem; + this.extraAccessory = other.extraAccessory; + this.skinColor = other.skinColor; + this.eyeColor = other.eyeColor; + this.hair = other.hair; + this.hairColor = other.hairColor; + this.shirtColor = other.shirtColor; + this.underShirtColor = other.underShirtColor; + this.pantsColor = other.pantsColor; + this.shoeColor = other.shoeColor; + this.position = other.position; + this.velocity = other.velocity; + this.statLife = other.statLife; + this.statLifeMax = other.statLifeMax; + this.statLifeMax2 = other.statLifeMax2; + this.statMana = other.statMana; + this.statManaMax = other.statManaMax; + this.statManaMax2 = other.statManaMax2; + this.hideMisc = other.hideMisc; + for (int index = 0; index < 59; ++index) + { + this.inventory[index] = other.inventory[index].Clone(); + if (index < this.armor.Length) + this.armor[index] = other.armor[index].Clone(); + if (index < this.dye.Length) + this.dye[index] = other.dye[index].Clone(); + if (index < this.miscEquips.Length) + this.miscEquips[index] = other.miscEquips[index].Clone(); + if (index < this.miscDyes.Length) + this.miscDyes[index] = other.miscDyes[index].Clone(); + if (index < this.hideVisibleAccessory.Length) + this.hideVisibleAccessory[index] = other.hideVisibleAccessory[index]; + } + } + + public object clientClone() + { + Player player = new Player(); + player.zone1 = this.zone1; + player.zone2 = this.zone2; + player.zone3 = this.zone3; + player.zone4 = this.zone4; + player.voidVaultInfo = this.voidVaultInfo; + player.luck = this.luck; + player.extraAccessory = this.extraAccessory; + player.MinionRestTargetPoint = this.MinionRestTargetPoint; + player.MinionAttackTargetNPC = this.MinionAttackTargetNPC; + player.direction = this.direction; + player.selectedItem = this.selectedItem; + player.controlUp = this.controlUp; + player.controlDown = this.controlDown; + player.controlLeft = this.controlLeft; + player.controlRight = this.controlRight; + player.controlJump = this.controlJump; + player.controlUseItem = this.controlUseItem; + player.statLife = this.statLife; + player.statLifeMax = this.statLifeMax; + player.statMana = this.statMana; + player.statManaMax = this.statManaMax; + player.position.X = this.position.X; + player.tileEntityAnchor = this.tileEntityAnchor; + player.chest = this.chest; + player.talkNPC = this.talkNPC; + player.hideVisibleAccessory = this.hideVisibleAccessory; + player.hideMisc = this.hideMisc; + player.shieldRaised = this.shieldRaised; + for (int index = 0; index < 59; ++index) + { + player.inventory[index] = this.inventory[index].Clone(); + if (index < this.armor.Length) + player.armor[index] = this.armor[index].Clone(); + if (index < this.dye.Length) + player.dye[index] = this.dye[index].Clone(); + if (index < this.miscEquips.Length) + player.miscEquips[index] = this.miscEquips[index].Clone(); + if (index < this.miscDyes.Length) + player.miscDyes[index] = this.miscDyes[index].Clone(); + if (index < this.bank.item.Length) + player.bank.item[index] = this.bank.item[index].Clone(); + if (index < this.bank2.item.Length) + player.bank2.item[index] = this.bank2.item[index].Clone(); + if (index < this.bank3.item.Length) + player.bank3.item[index] = this.bank3.item[index].Clone(); + if (index < this.bank4.item.Length) + player.bank4.item[index] = this.bank4.item[index].Clone(); + } + player.trashItem = this.trashItem.Clone(); + for (int index = 0; index < 22; ++index) + { + player.buffType[index] = this.buffType[index]; + player.buffTime[index] = this.buffTime[index]; + } + this.DpadRadial.CopyTo(player.DpadRadial); + this.CircularRadial.CopyTo(player.CircularRadial); + return (object) player; + } + + public static bool CheckSpawn(int x, int y) + { + if (x < 10 || x > Main.maxTilesX - 10 || y < 10 || y > Main.maxTilesX - 10 || Main.tile[x, y - 1] == null || !Main.tile[x, y - 1].active() || Main.tile[x, y - 1].type != (ushort) 79) + return false; + for (int index1 = x - 1; index1 <= x + 1; ++index1) + { + for (int index2 = y - 3; index2 < y; ++index2) + { + if (Main.tile[index1, index2] == null) + return false; + if (Main.tile[index1, index2].nactive() && Main.tileSolid[(int) Main.tile[index1, index2].type] && !Main.tileSolidTop[(int) Main.tile[index1, index2].type]) + { + Main.NewText(Language.GetTextValue("Game.BedObstructed"), G: (byte) 240, B: (byte) 20); + return false; + } + } + } + return WorldGen.StartRoomCheck(x, y - 1); + } + + public void FindSpawn() + { + for (int index = 0; index < 200; ++index) + { + if (this.spN[index] == null) + { + this.SpawnX = -1; + this.SpawnY = -1; + break; + } + if (this.spN[index] == Main.worldName && this.spI[index] == Main.worldID) + { + this.SpawnX = this.spX[index]; + this.SpawnY = this.spY[index]; + break; + } + } + } + + public void RemoveSpawn() + { + this.SpawnX = -1; + this.SpawnY = -1; + for (int index1 = 0; index1 < 200 && this.spN[index1] != null; ++index1) + { + if (this.spN[index1] == Main.worldName && this.spI[index1] == Main.worldID) + { + for (int index2 = index1; index2 < 199; ++index2) + { + this.spN[index2] = this.spN[index2 + 1]; + this.spI[index2] = this.spI[index2 + 1]; + this.spX[index2] = this.spX[index2 + 1]; + this.spY[index2] = this.spY[index2 + 1]; + } + this.spN[199] = (string) null; + this.spI[199] = 0; + this.spX[199] = 0; + this.spY[199] = 0; + break; + } + } + } + + public void ChangeSpawn(int x, int y) + { + for (int index1 = 0; index1 < 200 && this.spN[index1] != null; ++index1) + { + if (this.spN[index1] == Main.worldName && this.spI[index1] == Main.worldID) + { + for (int index2 = index1; index2 > 0; --index2) + { + this.spN[index2] = this.spN[index2 - 1]; + this.spI[index2] = this.spI[index2 - 1]; + this.spX[index2] = this.spX[index2 - 1]; + this.spY[index2] = this.spY[index2 - 1]; + } + this.spN[0] = Main.worldName; + this.spI[0] = Main.worldID; + this.spX[0] = x; + this.spY[0] = y; + this.FindSpawn(); + return; + } + } + for (int index = 199; index > 0; --index) + { + if (this.spN[index - 1] != null) + { + this.spN[index] = this.spN[index - 1]; + this.spI[index] = this.spI[index - 1]; + this.spX[index] = this.spX[index - 1]; + this.spY[index] = this.spY[index - 1]; + } + } + this.spN[0] = Main.worldName; + this.spI[0] = Main.worldID; + this.spX[0] = x; + this.spY[0] = y; + this.FindSpawn(); + } + + public static void SavePlayer(PlayerFileData playerFile, bool skipMapSave = false) + { + try + { + Main.Achievements.Save(); + Player.InternalSaveMap(playerFile.IsCloudSave); + if (Main.ServerSideCharacter) + return; + FileUtilities.ProtectedInvoke((Action) (() => Player.InternalSavePlayerFile(playerFile))); + } + catch (Exception ex) + { + string path = playerFile.Path; + FancyErrorPrinter.ShowFileSavingFailError(ex, path); + throw; + } + } + + private static void InternalSavePlayerFile(PlayerFileData playerFile) + { + string path = playerFile.Path; + Player player = playerFile.Player; + bool isCloudSave = playerFile.IsCloudSave; + if (path == null || path == "") + return; + if (FileUtilities.Exists(path, isCloudSave)) + FileUtilities.Copy(path, path + ".bak", isCloudSave); + RijndaelManaged rijndaelManaged = new RijndaelManaged(); + using (Stream stream = isCloudSave ? (Stream) new MemoryStream(2000) : (Stream) new FileStream(path, FileMode.Create)) + { + using (CryptoStream cryptoStream = new CryptoStream(stream, rijndaelManaged.CreateEncryptor(Player.ENCRYPTION_KEY, Player.ENCRYPTION_KEY), CryptoStreamMode.Write)) + { + using (BinaryWriter writer = new BinaryWriter((Stream) cryptoStream)) + { + writer.Write(230); + playerFile.Metadata.Write(writer); + writer.Write(player.name); + writer.Write(player.difficulty); + writer.Write(playerFile.GetPlayTime().Ticks); + writer.Write(player.hair); + writer.Write(player.hairDye); + BitsByte bitsByte1 = (BitsByte) (byte) 0; + for (int key = 0; key < 8; ++key) + bitsByte1[key] = player.hideVisibleAccessory[key]; + writer.Write((byte) bitsByte1); + BitsByte bitsByte2 = (BitsByte) (byte) 0; + for (int key = 0; key < 2; ++key) + bitsByte2[key] = player.hideVisibleAccessory[key + 8]; + writer.Write((byte) bitsByte2); + writer.Write((byte) player.hideMisc); + writer.Write((byte) player.skinVariant); + writer.Write(player.statLife); + writer.Write(player.statLifeMax); + writer.Write(player.statMana); + writer.Write(player.statManaMax); + writer.Write(player.extraAccessory); + writer.Write(player.unlockedBiomeTorches); + writer.Write(player.UsingBiomeTorches); + writer.Write(player.downedDD2EventAnyDifficulty); + writer.Write(player.taxMoney); + writer.Write(player.hairColor.R); + writer.Write(player.hairColor.G); + writer.Write(player.hairColor.B); + writer.Write(player.skinColor.R); + writer.Write(player.skinColor.G); + writer.Write(player.skinColor.B); + writer.Write(player.eyeColor.R); + writer.Write(player.eyeColor.G); + writer.Write(player.eyeColor.B); + writer.Write(player.shirtColor.R); + writer.Write(player.shirtColor.G); + writer.Write(player.shirtColor.B); + writer.Write(player.underShirtColor.R); + writer.Write(player.underShirtColor.G); + writer.Write(player.underShirtColor.B); + writer.Write(player.pantsColor.R); + writer.Write(player.pantsColor.G); + writer.Write(player.pantsColor.B); + writer.Write(player.shoeColor.R); + writer.Write(player.shoeColor.G); + writer.Write(player.shoeColor.B); + for (int index = 0; index < player.armor.Length; ++index) + { + writer.Write(player.armor[index].netID); + writer.Write(player.armor[index].prefix); + } + for (int index = 0; index < player.dye.Length; ++index) + { + writer.Write(player.dye[index].netID); + writer.Write(player.dye[index].prefix); + } + for (int index = 0; index < 58; ++index) + { + writer.Write(player.inventory[index].netID); + writer.Write(player.inventory[index].stack); + writer.Write(player.inventory[index].prefix); + writer.Write(player.inventory[index].favorited); + } + for (int index = 0; index < player.miscEquips.Length; ++index) + { + writer.Write(player.miscEquips[index].netID); + writer.Write(player.miscEquips[index].prefix); + writer.Write(player.miscDyes[index].netID); + writer.Write(player.miscDyes[index].prefix); + } + for (int index = 0; index < 40; ++index) + { + writer.Write(player.bank.item[index].netID); + writer.Write(player.bank.item[index].stack); + writer.Write(player.bank.item[index].prefix); + } + for (int index = 0; index < 40; ++index) + { + writer.Write(player.bank2.item[index].netID); + writer.Write(player.bank2.item[index].stack); + writer.Write(player.bank2.item[index].prefix); + } + for (int index = 0; index < 40; ++index) + { + writer.Write(player.bank3.item[index].netID); + writer.Write(player.bank3.item[index].stack); + writer.Write(player.bank3.item[index].prefix); + } + for (int index = 0; index < 40; ++index) + { + writer.Write(player.bank4.item[index].netID); + writer.Write(player.bank4.item[index].stack); + writer.Write(player.bank4.item[index].prefix); + } + writer.Write((byte) player.voidVaultInfo); + for (int index = 0; index < 22; ++index) + { + if (Main.buffNoSave[player.buffType[index]]) + { + writer.Write(0); + writer.Write(0); + } + else + { + writer.Write(player.buffType[index]); + writer.Write(player.buffTime[index]); + } + } + for (int index = 0; index < 200; ++index) + { + if (player.spN[index] == null) + { + writer.Write(-1); + break; + } + writer.Write(player.spX[index]); + writer.Write(player.spY[index]); + writer.Write(player.spI[index]); + writer.Write(player.spN[index]); + } + writer.Write(player.hbLocked); + for (int index = 0; index < player.hideInfo.Length; ++index) + writer.Write(player.hideInfo[index]); + writer.Write(player.anglerQuestsFinished); + for (int index = 0; index < player.DpadRadial.Bindings.Length; ++index) + writer.Write(player.DpadRadial.Bindings[index]); + for (int index = 0; index < player.builderAccStatus.Length; ++index) + writer.Write(player.builderAccStatus[index]); + writer.Write(player.bartenderQuestLog); + writer.Write(player.dead); + if (player.dead) + writer.Write(player.respawnTimer); + long binary = DateTime.UtcNow.ToBinary(); + writer.Write(binary); + writer.Write(player.golferScoreAccumulated); + player.creativeTracker.Save(writer); + player.SaveTemporaryItemSlotContents(writer); + CreativePowerManager.Instance.SaveToPlayer(player, writer); + writer.Flush(); + cryptoStream.FlushFinalBlock(); + stream.Flush(); + if (!isCloudSave || SocialAPI.Cloud == null) + return; + SocialAPI.Cloud.Write(playerFile.Path, ((MemoryStream) stream).ToArray()); + } + } + } + } + + private void SaveTemporaryItemSlotContents(BinaryWriter writer) + { + Item itemByIndex = Main.CreativeMenu.GetItemByIndex(0); + BitsByte bitsByte = (BitsByte) (byte) 0; + bitsByte[0] = !Main.mouseItem.IsAir; + bitsByte[1] = !itemByIndex.IsAir; + ItemSerializationContext context = ItemSerializationContext.SavingAndLoading; + writer.Write((byte) bitsByte); + if (bitsByte[0]) + Main.mouseItem.Serialize(writer, context); + if (!bitsByte[1]) + return; + itemByIndex.Serialize(writer, context); + } + + private void LoadTemporaryItemSlotContents(BinaryReader reader) + { + BitsByte bitsByte = (BitsByte) reader.ReadByte(); + ItemSerializationContext context = ItemSerializationContext.SavingAndLoading; + if (bitsByte[0]) + { + this._temporaryItemSlots[0] = new Item(); + this._temporaryItemSlots[0].DeserializeFrom(reader, context); + } + if (!bitsByte[1]) + return; + this._temporaryItemSlots[1] = new Item(); + this._temporaryItemSlots[1].DeserializeFrom(reader, context); + } + + public void SetPlayerDataToOutOfClassFields() + { + Item obj1 = new Item(); + if (this._temporaryItemSlots[0] != null) + obj1 = this._temporaryItemSlots[0].Clone(); + Main.mouseItem = obj1; + Item obj2 = new Item(); + if (this._temporaryItemSlots[1] != null) + obj2 = this._temporaryItemSlots[1].Clone(); + Main.CreativeMenu.SetItembyIndex(obj2, 0); + CreativePowerManager.Instance.ApplyLoadedDataToPlayer(this); + } + + public static void ClearPlayerTempInfo() + { + Main.mouseItem.TurnToAir(); + Main.CreativeMenu.GetItemByIndex(0).TurnToAir(); + } + + private static void InternalSaveMap(bool isCloudSave) + { + if (string.IsNullOrEmpty(Main.playerPathName)) + return; + try + { + if (Main.mapEnabled) + Main.Map.Save(); + } + catch + { + } + if (isCloudSave) + return; + Utils.TryCreatingDirectory(Main.PlayerPath); + } + + public static PlayerFileData LoadPlayer(string playerPath, bool cloudSave) + { + PlayerFileData playerFileData = new PlayerFileData(playerPath, cloudSave); + if (cloudSave && SocialAPI.Cloud == null) + return playerFileData; + if (Main.rand == null) + Main.rand = new UnifiedRandom((int) DateTime.Now.Ticks); + Player player1 = new Player(); + try + { + RijndaelManaged rijndaelManaged = new RijndaelManaged(); + rijndaelManaged.Padding = PaddingMode.None; + using (MemoryStream memoryStream = new MemoryStream(FileUtilities.ReadAllBytes(playerPath, cloudSave))) + { + using (CryptoStream cryptoStream = new CryptoStream((Stream) memoryStream, rijndaelManaged.CreateDecryptor(Player.ENCRYPTION_KEY, Player.ENCRYPTION_KEY), CryptoStreamMode.Read)) + { + using (BinaryReader binaryReader = new BinaryReader((Stream) cryptoStream)) + { + int num1 = binaryReader.ReadInt32(); + if (num1 >= 135) + playerFileData.Metadata = FileMetadata.Read(binaryReader, FileType.Player); + else + playerFileData.Metadata = FileMetadata.FromCurrentSettings(FileType.Player); + if (num1 > 230) + { + player1.loadStatus = 1; + player1.name = binaryReader.ReadString(); + playerFileData.Player = player1; + return playerFileData; + } + player1.name = binaryReader.ReadString(); + if (num1 >= 10) + { + if (num1 >= 17) + player1.difficulty = binaryReader.ReadByte(); + else if (binaryReader.ReadBoolean()) + player1.difficulty = (byte) 2; + } + if (num1 >= 138) + playerFileData.SetPlayTime(new TimeSpan(binaryReader.ReadInt64())); + else + playerFileData.SetPlayTime(TimeSpan.Zero); + player1.hair = binaryReader.ReadInt32(); + if (num1 >= 82) + player1.hairDye = binaryReader.ReadByte(); + if (num1 >= 124) + { + BitsByte bitsByte = (BitsByte) binaryReader.ReadByte(); + for (int key = 0; key < 8; ++key) + player1.hideVisibleAccessory[key] = bitsByte[key]; + bitsByte = (BitsByte) binaryReader.ReadByte(); + for (int key = 0; key < 2; ++key) + player1.hideVisibleAccessory[key + 8] = bitsByte[key]; + } + else if (num1 >= 83) + { + BitsByte bitsByte = (BitsByte) binaryReader.ReadByte(); + for (int key = 0; key < 8; ++key) + player1.hideVisibleAccessory[key] = bitsByte[key]; + } + if (num1 >= 119) + player1.hideMisc = (BitsByte) binaryReader.ReadByte(); + if (num1 <= 17) + player1.Male = player1.hair != 5 && player1.hair != 6 && player1.hair != 9 && player1.hair != 11; + else if (num1 < 107) + player1.Male = binaryReader.ReadBoolean(); + else + player1.skinVariant = (int) binaryReader.ReadByte(); + if (num1 < 161 && player1.skinVariant == 7) + player1.skinVariant = 9; + player1.statLife = binaryReader.ReadInt32(); + player1.statLifeMax = binaryReader.ReadInt32(); + if (player1.statLifeMax > 500) + player1.statLifeMax = 500; + player1.statMana = binaryReader.ReadInt32(); + player1.statManaMax = binaryReader.ReadInt32(); + if (player1.statManaMax > 200) + player1.statManaMax = 200; + if (player1.statMana > 400) + player1.statMana = 400; + if (num1 >= 125) + player1.extraAccessory = binaryReader.ReadBoolean(); + if (num1 >= 229) + { + player1.unlockedBiomeTorches = binaryReader.ReadBoolean(); + player1.UsingBiomeTorches = binaryReader.ReadBoolean(); + } + if (num1 >= 182) + player1.downedDD2EventAnyDifficulty = binaryReader.ReadBoolean(); + if (num1 >= 128) + player1.taxMoney = binaryReader.ReadInt32(); + player1.hairColor = binaryReader.ReadRGB(); + player1.skinColor = binaryReader.ReadRGB(); + player1.eyeColor = binaryReader.ReadRGB(); + player1.shirtColor = binaryReader.ReadRGB(); + player1.underShirtColor = binaryReader.ReadRGB(); + player1.pantsColor = binaryReader.ReadRGB(); + player1.shoeColor = binaryReader.ReadRGB(); + Main.player[Main.myPlayer].shirtColor = player1.shirtColor; + Main.player[Main.myPlayer].pantsColor = player1.pantsColor; + Main.player[Main.myPlayer].hairColor = player1.hairColor; + if (num1 >= 38) + { + if (num1 < 124) + { + int num2 = 11; + if (num1 >= 81) + num2 = 16; + for (int index1 = 0; index1 < num2; ++index1) + { + int index2 = index1; + if (index2 >= 8) + index2 += 2; + player1.armor[index2].netDefaults(binaryReader.ReadInt32()); + player1.armor[index2].Prefix((int) binaryReader.ReadByte()); + } + } + else + { + int num3 = 20; + for (int index = 0; index < num3; ++index) + { + player1.armor[index].netDefaults(binaryReader.ReadInt32()); + player1.armor[index].Prefix((int) binaryReader.ReadByte()); + } + } + if (num1 >= 47) + { + int num4 = 3; + if (num1 >= 81) + num4 = 8; + if (num1 >= 124) + num4 = 10; + for (int index3 = 0; index3 < num4; ++index3) + { + int index4 = index3; + player1.dye[index4].netDefaults(binaryReader.ReadInt32()); + player1.dye[index4].Prefix((int) binaryReader.ReadByte()); + } + } + if (num1 >= 58) + { + for (int index = 0; index < 58; ++index) + { + int type = binaryReader.ReadInt32(); + if (type >= 5045) + { + player1.inventory[index].netDefaults(0); + binaryReader.ReadInt32(); + int num5 = (int) binaryReader.ReadByte(); + if (num1 >= 114) + binaryReader.ReadBoolean(); + } + else + { + player1.inventory[index].netDefaults(type); + player1.inventory[index].stack = binaryReader.ReadInt32(); + player1.inventory[index].Prefix((int) binaryReader.ReadByte()); + if (num1 >= 114) + player1.inventory[index].favorited = binaryReader.ReadBoolean(); + } + } + } + else + { + for (int index = 0; index < 48; ++index) + { + int type = binaryReader.ReadInt32(); + if (type >= 5045) + { + player1.inventory[index].netDefaults(0); + binaryReader.ReadInt32(); + int num6 = (int) binaryReader.ReadByte(); + } + else + { + player1.inventory[index].netDefaults(type); + player1.inventory[index].stack = binaryReader.ReadInt32(); + player1.inventory[index].Prefix((int) binaryReader.ReadByte()); + } + } + } + if (num1 >= 117) + { + if (num1 < 136) + { + for (int index = 0; index < 5; ++index) + { + if (index != 1) + { + int type1 = binaryReader.ReadInt32(); + if (type1 >= 5045) + { + player1.miscEquips[index].netDefaults(0); + int num7 = (int) binaryReader.ReadByte(); + } + else + { + player1.miscEquips[index].netDefaults(type1); + player1.miscEquips[index].Prefix((int) binaryReader.ReadByte()); + } + int type2 = binaryReader.ReadInt32(); + if (type2 >= 5045) + { + player1.miscDyes[index].netDefaults(0); + int num8 = (int) binaryReader.ReadByte(); + } + else + { + player1.miscDyes[index].netDefaults(type2); + player1.miscDyes[index].Prefix((int) binaryReader.ReadByte()); + } + } + } + } + else + { + for (int index = 0; index < 5; ++index) + { + int type3 = binaryReader.ReadInt32(); + if (type3 >= 5045) + { + player1.miscEquips[index].netDefaults(0); + int num9 = (int) binaryReader.ReadByte(); + } + else + { + player1.miscEquips[index].netDefaults(type3); + player1.miscEquips[index].Prefix((int) binaryReader.ReadByte()); + } + int type4 = binaryReader.ReadInt32(); + if (type4 >= 5045) + { + player1.miscDyes[index].netDefaults(0); + int num10 = (int) binaryReader.ReadByte(); + } + else + { + player1.miscDyes[index].netDefaults(type4); + player1.miscDyes[index].Prefix((int) binaryReader.ReadByte()); + } + } + } + } + if (num1 >= 58) + { + for (int index = 0; index < 40; ++index) + { + player1.bank.item[index].netDefaults(binaryReader.ReadInt32()); + player1.bank.item[index].stack = binaryReader.ReadInt32(); + player1.bank.item[index].Prefix((int) binaryReader.ReadByte()); + } + for (int index = 0; index < 40; ++index) + { + player1.bank2.item[index].netDefaults(binaryReader.ReadInt32()); + player1.bank2.item[index].stack = binaryReader.ReadInt32(); + player1.bank2.item[index].Prefix((int) binaryReader.ReadByte()); + } + } + else + { + for (int index = 0; index < 20; ++index) + { + player1.bank.item[index].netDefaults(binaryReader.ReadInt32()); + player1.bank.item[index].stack = binaryReader.ReadInt32(); + player1.bank.item[index].Prefix((int) binaryReader.ReadByte()); + } + for (int index = 0; index < 20; ++index) + { + player1.bank2.item[index].netDefaults(binaryReader.ReadInt32()); + player1.bank2.item[index].stack = binaryReader.ReadInt32(); + player1.bank2.item[index].Prefix((int) binaryReader.ReadByte()); + } + } + if (num1 >= 182) + { + for (int index = 0; index < 40; ++index) + { + player1.bank3.item[index].netDefaults(binaryReader.ReadInt32()); + player1.bank3.item[index].stack = binaryReader.ReadInt32(); + player1.bank3.item[index].Prefix((int) binaryReader.ReadByte()); + } + } + if (num1 >= 198) + { + for (int index = 0; index < 40; ++index) + { + player1.bank4.item[index].netDefaults(binaryReader.ReadInt32()); + player1.bank4.item[index].stack = binaryReader.ReadInt32(); + player1.bank4.item[index].Prefix((int) binaryReader.ReadByte()); + } + } + if (num1 >= 199) + player1.voidVaultInfo = (BitsByte) binaryReader.ReadByte(); + } + else + { + for (int index = 0; index < 8; ++index) + { + player1.armor[index].SetDefaults((int) ItemID.FromLegacyName(binaryReader.ReadString(), num1)); + if (num1 >= 36) + player1.armor[index].Prefix((int) binaryReader.ReadByte()); + } + if (num1 >= 6) + { + for (int index = 8; index < 11; ++index) + { + player1.armor[index].SetDefaults((int) ItemID.FromLegacyName(binaryReader.ReadString(), num1)); + if (num1 >= 36) + player1.armor[index].Prefix((int) binaryReader.ReadByte()); + } + } + for (int index = 0; index < 44; ++index) + { + player1.inventory[index].SetDefaults((int) ItemID.FromLegacyName(binaryReader.ReadString(), num1)); + player1.inventory[index].stack = binaryReader.ReadInt32(); + if (num1 >= 36) + player1.inventory[index].Prefix((int) binaryReader.ReadByte()); + } + if (num1 >= 15) + { + for (int index = 44; index < 48; ++index) + { + player1.inventory[index].SetDefaults((int) ItemID.FromLegacyName(binaryReader.ReadString(), num1)); + player1.inventory[index].stack = binaryReader.ReadInt32(); + if (num1 >= 36) + player1.inventory[index].Prefix((int) binaryReader.ReadByte()); + } + } + for (int index = 0; index < 20; ++index) + { + player1.bank.item[index].SetDefaults((int) ItemID.FromLegacyName(binaryReader.ReadString(), num1)); + player1.bank.item[index].stack = binaryReader.ReadInt32(); + if (num1 >= 36) + player1.bank.item[index].Prefix((int) binaryReader.ReadByte()); + } + if (num1 >= 20) + { + for (int index = 0; index < 20; ++index) + { + player1.bank2.item[index].SetDefaults((int) ItemID.FromLegacyName(binaryReader.ReadString(), num1)); + player1.bank2.item[index].stack = binaryReader.ReadInt32(); + if (num1 >= 36) + player1.bank2.item[index].Prefix((int) binaryReader.ReadByte()); + } + } + } + if (num1 < 58) + { + for (int index = 40; index < 48; ++index) + { + player1.inventory[index + 10] = player1.inventory[index].Clone(); + player1.inventory[index].SetDefaults(); + } + } + if (num1 >= 11) + { + int num11 = 22; + if (num1 < 74) + num11 = 10; + for (int index = 0; index < num11; ++index) + { + player1.buffType[index] = binaryReader.ReadInt32(); + player1.buffTime[index] = binaryReader.ReadInt32(); + if (player1.buffType[index] == 0) + { + --index; + --num11; + } + } + } + for (int index = 0; index < 200; ++index) + { + int num12 = binaryReader.ReadInt32(); + if (num12 != -1) + { + player1.spX[index] = num12; + player1.spY[index] = binaryReader.ReadInt32(); + player1.spI[index] = binaryReader.ReadInt32(); + player1.spN[index] = binaryReader.ReadString(); + } + else + break; + } + if (num1 >= 16) + player1.hbLocked = binaryReader.ReadBoolean(); + if (num1 >= 115) + { + int num13 = 13; + for (int index = 0; index < num13; ++index) + player1.hideInfo[index] = binaryReader.ReadBoolean(); + } + if (num1 >= 98) + player1.anglerQuestsFinished = binaryReader.ReadInt32(); + if (num1 >= 162) + { + for (int index = 0; index < 4; ++index) + player1.DpadRadial.Bindings[index] = binaryReader.ReadInt32(); + } + if (num1 >= 164) + { + int num14 = 8; + if (num1 >= 167) + num14 = 10; + if (num1 >= 197) + num14 = 11; + if (num1 >= 230) + num14 = 12; + for (int index = 0; index < num14; ++index) + player1.builderAccStatus[index] = binaryReader.ReadInt32(); + if (num1 < 210) + player1.builderAccStatus[0] = 1; + } + if (num1 >= 181) + player1.bartenderQuestLog = binaryReader.ReadInt32(); + if (num1 >= 200) + { + player1.dead = binaryReader.ReadBoolean(); + if (player1.dead) + player1.respawnTimer = Utils.Clamp(binaryReader.ReadInt32(), 0, 60000); + } + player1.lastTimePlayerWasSaved = 0L; + player1.lastTimePlayerWasSaved = num1 < 202 ? DateTime.UtcNow.ToBinary() : binaryReader.ReadInt64(); + if (num1 >= 206) + player1.golferScoreAccumulated = binaryReader.ReadInt32(); + if (num1 >= 218) + player1.creativeTracker.Load(binaryReader, num1); + if (num1 >= 214) + player1.LoadTemporaryItemSlotContents(binaryReader); + player1.savedPerPlayerFieldsThatArentInThePlayerClass = new Player.SavedPlayerDataWithAnnoyingRules(); + CreativePowerManager.Instance.ResetDataForNewPlayer(player1); + if (num1 >= 220) + CreativePowerManager.Instance.LoadToPlayer(player1, binaryReader, num1); + Player.LoadPlayer_LastMinuteFixes(player1); + } + } + } + player1.PlayerFrame(); + player1.loadStatus = 0; + playerFileData.Player = player1; + return playerFileData; + } + catch + { + } + Player player2 = new Player(); + player2.loadStatus = 2; + if (player1.name != "") + { + player2.name = player1.name; + } + else + { + string[] strArray = playerPath.Split(Path.DirectorySeparatorChar); + player1.name = strArray[strArray.Length - 1].Split('.')[0]; + } + playerFileData.Player = player2; + return playerFileData; + } + + private static void AdjustRespawnTimerForWorldJoining(Player newPlayer) + { + if (Main.myPlayer != newPlayer.whoAmI || !newPlayer.dead) + return; + long ticks = DateTime.UtcNow.ToBinary() - newPlayer.lastTimePlayerWasSaved; + if (ticks <= 0L) + return; + int num = Utils.Clamp((int) (Utils.Clamp(new TimeSpan(ticks).TotalSeconds, 0.0, 1000.0) * 60.0), 0, newPlayer.respawnTimer); + newPlayer.respawnTimer -= num; + if (newPlayer.respawnTimer != 0) + return; + newPlayer.dead = false; + } + + private static void LoadPlayer_LastMinuteFixes(Player newPlayer) + { + newPlayer.skinVariant = (int) MathHelper.Clamp((float) newPlayer.skinVariant, 0.0f, 11f); + for (int index = 3; index < 10; ++index) + { + int type = newPlayer.armor[index].type; + if (type == 908 || type == 4874 || type == 5000) + newPlayer.lavaMax += 420; + if (type == 906 || type == 4038) + newPlayer.lavaMax += 420; + if (newPlayer.wingsLogic == 0 && newPlayer.armor[index].wingSlot >= (sbyte) 0) + newPlayer.wingsLogic = (int) newPlayer.armor[index].wingSlot; + if (type == 158 || type == 396 || type == 1250 || type == 1251 || type == 1252) + newPlayer.noFallDmg = true; + newPlayer.lavaTime = newPlayer.lavaMax; + } + } + + public static PlayerFileData GetFileData(string file, bool cloudSave) + { + if (file == null || cloudSave && SocialAPI.Cloud == null) + return (PlayerFileData) null; + PlayerFileData playerFileData = Player.LoadPlayer(file, cloudSave); + if (playerFileData.Player == null) + return (PlayerFileData) null; + if (playerFileData.Player.loadStatus != 0 && playerFileData.Player.loadStatus != 1) + { + if (FileUtilities.Exists(file + ".bak", cloudSave)) + FileUtilities.Move(file + ".bak", file, cloudSave); + playerFileData = Player.LoadPlayer(file, cloudSave); + if (playerFileData.Player == null) + return (PlayerFileData) null; + } + return playerFileData; + } + + public Color GetHairColor(bool useLighting = true) + { + Color color = Lighting.GetColor((int) ((double) this.position.X + (double) this.width * 0.5) / 16, (int) (((double) this.position.Y + (double) this.height * 0.25) / 16.0)); + return GameShaders.Hair.GetColor((short) this.hairDye, this, useLighting ? color : Color.White); + } + + public bool HasItem(int type) + { + for (int index = 0; index < 58; ++index) + { + if (type == this.inventory[index].type && this.inventory[index].stack > 0) + return true; + } + return false; + } + + public int FindItem(int netid) + { + for (int index = 0; index < 58; ++index) + { + if (netid == this.inventory[index].netID && this.inventory[index].stack > 0) + return index; + } + return -1; + } + + public int FindItem(List netids) + { + for (int index = 0; index < 58; ++index) + { + if (this.inventory[index].stack > 0 && netids.Contains(this.inventory[index].netID)) + return index; + } + return -1; + } + + public int FindItem(bool[] validtypes) + { + for (int index = 0; index < 58; ++index) + { + if (this.inventory[index].stack > 0 && validtypes[this.inventory[index].type]) + return index; + } + return -1; + } + + public Player() + { + this.width = 20; + this.height = 42; + this.name = string.Empty; + this.bodyFrame.Width = 40; + this.bodyFrame.Height = 56; + this.legFrame.Width = 40; + this.legFrame.Height = 56; + this.tileEntityAnchor.Clear(); + this.doorHelper = new DoorOpeningHelper(); + for (int index = 0; index < 59; ++index) + { + if (index < this.armor.Length) + this.armor[index] = new Item(); + this.inventory[index] = new Item(); + } + for (int index = 0; index < 40; ++index) + { + this.bank.item[index] = new Item(); + this.bank2.item[index] = new Item(); + this.bank3.item[index] = new Item(); + this.bank4.item[index] = new Item(); + } + for (int index = 0; index < this.dye.Length; ++index) + this.dye[index] = new Item(); + for (int index = 0; index < this.miscEquips.Length; ++index) + this.miscEquips[index] = new Item(); + for (int index = 0; index < this.miscDyes.Length; ++index) + this.miscDyes[index] = new Item(); + this.trashItem = new Item(); + this.lastVisualizedSelectedItem = new Item(); + this.grappling[0] = -1; + this.statManaMax = 20; + this.extraAccessory = false; + for (int index = 0; index < 623; ++index) + { + this.adjTile[index] = false; + this.oldAdjTile[index] = false; + } + this.hitTile = new HitTile(); + this.hitReplace = new HitTile(); + this.mount = new Mount(); + this.talkNPC = -1; + this.creativeTracker = new CreativeUnlocksTracker(); + } + + public void MagicConch() + { + bool flag1 = (double) this.position.X / 16.0 < (double) (Main.maxTilesX / 2); + int num1 = 50; + int num2 = 50; + int num3 = WorldGen.beachDistance - num1 - num2; + int num4 = !flag1 ? num3 - num2 / 2 : Main.maxTilesX - num3 - 1 - num2; + double num5 = (double) Main.maxTilesY / 1200.0; + double num6 = (double) Main.maxTilesY / 1200.0; + Player.RandomTeleportationAttemptSettings teleportationAttemptSettings = new Player.RandomTeleportationAttemptSettings() + { + avoidAnyLiquid = true, + avoidHurtTiles = true, + attemptsBeforeGivingUp = 1000, + maximumFallDistanceFromOrignalPoint = 300 + }; + Vector2 vector2 = Vector2.Zero; + int directionInt = flag1.ToDirectionInt(); + int startX1 = flag1 ? Main.maxTilesX - 50 : 50; + bool flag2 = true; + Point landingPoint; + if (!TeleportHelpers.RequestMagicConchTeleportPosition(this, -directionInt, startX1, out landingPoint)) + { + flag2 = false; + int startX2 = !flag1 ? Main.maxTilesX - 50 : 50; + if (TeleportHelpers.RequestMagicConchTeleportPosition(this, directionInt, startX2, out landingPoint)) + flag2 = true; + } + if (flag2) + vector2 = landingPoint.ToWorldCoordinates(autoAddY: 16f) - new Vector2((float) (this.width / 2), (float) this.height); + if (flag2) + { + Vector2 newPos = vector2; + this.Teleport(newPos, 5); + this.velocity = Vector2.Zero; + if (Main.netMode != 2) + return; + RemoteClient.CheckSection(this.whoAmI, this.position); + NetMessage.SendData(65, number2: ((float) this.whoAmI), number3: newPos.X, number4: newPos.Y, number5: 5); + } + else + { + Vector2 position = this.position; + this.Teleport(position, 5); + this.velocity = Vector2.Zero; + if (Main.netMode != 2) + return; + RemoteClient.CheckSection(this.whoAmI, this.position); + NetMessage.SendData(65, number2: ((float) this.whoAmI), number3: position.X, number4: position.Y, number5: 5, number6: 1); + } + } + + public void DemonConch() + { + bool canSpawn = false; + int num = Main.maxTilesX / 2; + int teleportRangeX1 = 100; + int teleportRangeX2 = teleportRangeX1 / 2; + int teleportStartY = Main.UnderworldLayer + 20; + int teleportRangeY = 80; + Player.RandomTeleportationAttemptSettings settings = new Player.RandomTeleportationAttemptSettings() + { + mostlySolidFloor = true, + avoidAnyLiquid = true, + avoidLava = true, + avoidHurtTiles = true, + avoidWalls = true, + attemptsBeforeGivingUp = 1000, + maximumFallDistanceFromOrignalPoint = 30 + }; + Vector2 vector2 = this.CheckForGoodTeleportationSpot(ref canSpawn, num - teleportRangeX2, teleportRangeX1, teleportStartY, teleportRangeY, settings); + if (!canSpawn) + vector2 = this.CheckForGoodTeleportationSpot(ref canSpawn, num - teleportRangeX1, teleportRangeX2, teleportStartY, teleportRangeY, settings); + if (!canSpawn) + vector2 = this.CheckForGoodTeleportationSpot(ref canSpawn, num + teleportRangeX2, teleportRangeX2, teleportStartY, teleportRangeY, settings); + if (canSpawn) + { + Vector2 newPos = vector2; + this.Teleport(newPos, 7); + this.velocity = Vector2.Zero; + if (Main.netMode != 2) + return; + RemoteClient.CheckSection(this.whoAmI, this.position); + NetMessage.SendData(65, number2: ((float) this.whoAmI), number3: newPos.X, number4: newPos.Y, number5: 7); + } + else + { + Vector2 position = this.position; + this.Teleport(position, 7); + this.velocity = Vector2.Zero; + if (Main.netMode != 2) + return; + RemoteClient.CheckSection(this.whoAmI, this.position); + NetMessage.SendData(65, number2: ((float) this.whoAmI), number3: position.X, number4: position.Y, number5: 7, number6: 1); + } + } + + public void TeleportationPotion() + { + bool canSpawn = false; + int teleportStartX = 100; + int teleportRangeX = Main.maxTilesX - 200; + int teleportStartY = 100; + int underworldLayer = Main.UnderworldLayer; + Vector2 vector2 = this.CheckForGoodTeleportationSpot(ref canSpawn, teleportStartX, teleportRangeX, teleportStartY, underworldLayer, new Player.RandomTeleportationAttemptSettings() + { + avoidLava = true, + avoidHurtTiles = true, + maximumFallDistanceFromOrignalPoint = 100, + attemptsBeforeGivingUp = 1000 + }); + if (canSpawn) + { + Vector2 newPos = vector2; + this.Teleport(newPos, 2); + this.velocity = Vector2.Zero; + if (Main.netMode != 2) + return; + RemoteClient.CheckSection(this.whoAmI, this.position); + NetMessage.SendData(65, number2: ((float) this.whoAmI), number3: newPos.X, number4: newPos.Y, number5: 2); + } + else + { + Vector2 position = this.position; + this.Teleport(position, 2); + this.velocity = Vector2.Zero; + if (Main.netMode != 2) + return; + RemoteClient.CheckSection(this.whoAmI, this.position); + NetMessage.SendData(65, number2: ((float) this.whoAmI), number3: position.X, number4: position.Y, number5: 2, number6: 1); + } + } + + private Vector2 CheckForGoodTeleportationSpot( + ref bool canSpawn, + int teleportStartX, + int teleportRangeX, + int teleportStartY, + int teleportRangeY, + Player.RandomTeleportationAttemptSettings settings) + { + int num1 = 0; + int num2 = 0; + int num3 = 0; + int width = this.width; + Vector2 Position = new Vector2((float) num2, (float) num3) * 16f + new Vector2((float) (-width / 2 + 8), (float) -this.height); + while (!canSpawn && num1 < settings.attemptsBeforeGivingUp) + { + ++num1; + int num4 = teleportStartX + Main.rand.Next(teleportRangeX); + int num5 = teleportStartY + Main.rand.Next(teleportRangeY); + int num6 = 5; + int index1 = (int) MathHelper.Clamp((float) num4, (float) num6, (float) (Main.maxTilesX - num6)); + int index2 = (int) MathHelper.Clamp((float) num5, (float) num6, (float) (Main.maxTilesY - num6)); + Position = new Vector2((float) index1, (float) index2) * 16f + new Vector2((float) (-width / 2 + 8), (float) -this.height); + if (!Collision.SolidCollision(Position, width, this.height)) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if ((!settings.avoidWalls || Main.tile[index1, index2].wall <= (ushort) 0) && (Main.tile[index1, index2].wall != (ushort) 87 || (double) index2 <= Main.worldSurface || NPC.downedPlantBoss) && (!Main.wallDungeon[(int) Main.tile[index1, index2].wall] || (double) index2 <= Main.worldSurface || NPC.downedBoss3)) + { + int num7 = 0; + while (num7 < settings.maximumFallDistanceFromOrignalPoint) + { + if (Main.tile[index1, index2 + num7] == null) + Main.tile[index1, index2 + num7] = new Tile(); + Tile tile = Main.tile[index1, index2 + num7]; + Position = new Vector2((float) index1, (float) (index2 + num7)) * 16f + new Vector2((float) (-width / 2 + 8), (float) -this.height); + Collision.SlopeCollision(Position, this.velocity, width, this.height, this.gravDir); + if (!Collision.SolidCollision(Position, width, this.height)) + ++num7; + else if (!tile.active() || tile.inActive() || !Main.tileSolid[(int) tile.type]) + ++num7; + else + break; + } + Position.Y -= 16f; + int i1 = (int) Position.X / 16; + int j1 = (int) Position.Y / 16; + int i2 = (int) ((double) Position.X + (double) width * 0.5) / 16; + int j2 = (int) ((double) Position.Y + (double) this.height) / 16; + Tile tileSafely1 = Framing.GetTileSafely(i1, j1); + Tile tileSafely2 = Framing.GetTileSafely(i2, j2); + if (!settings.avoidAnyLiquid || tileSafely2.liquid <= (byte) 0) + { + if (settings.mostlySolidFloor) + { + Tile tileSafely3 = Framing.GetTileSafely(i2 - 1, j2); + Tile tileSafely4 = Framing.GetTileSafely(i2 + 1, j2); + if ((!tileSafely3.active() || tileSafely3.inActive() || !Main.tileSolid[(int) tileSafely3.type] || Main.tileSolidTop[(int) tileSafely3.type] || !tileSafely4.active() || tileSafely4.inActive() || !Main.tileSolid[(int) tileSafely4.type] ? 0 : (!Main.tileSolidTop[(int) tileSafely4.type] ? 1 : 0)) == 0) + continue; + } + if ((!settings.avoidWalls || tileSafely1.wall <= (ushort) 0) && (!settings.avoidAnyLiquid || !Collision.WetCollision(Position, width, this.height)) && (!settings.avoidLava || !Collision.LavaCollision(Position, width, this.height)) && (!settings.avoidHurtTiles || (double) Collision.HurtTiles(Position, this.velocity, width, this.height).Y <= 0.0) && !Collision.SolidCollision(Position, width, this.height) && num7 < settings.maximumFallDistanceFromOrignalPoint - 1) + { + Vector2 Velocity1 = Vector2.UnitX * 16f; + if (!(Collision.TileCollision(Position - Velocity1, Velocity1, this.width, this.height, gravDir: ((int) this.gravDir)) != Velocity1)) + { + Vector2 Velocity2 = -Vector2.UnitX * 16f; + if (!(Collision.TileCollision(Position - Velocity2, Velocity2, this.width, this.height, gravDir: ((int) this.gravDir)) != Velocity2)) + { + Vector2 Velocity3 = Vector2.UnitY * 16f; + if (!(Collision.TileCollision(Position - Velocity3, Velocity3, this.width, this.height, gravDir: ((int) this.gravDir)) != Velocity3)) + { + Vector2 Velocity4 = -Vector2.UnitY * 16f; + if (!(Collision.TileCollision(Position - Velocity4, Velocity4, this.width, this.height, gravDir: ((int) this.gravDir)) != Velocity4)) + { + canSpawn = true; + int num8 = index2 + num7; + break; + } + } + } + } + } + } + } + } + } + return Position; + } + + public void GetAnglerReward() + { + Item newItem1 = new Item(); + newItem1.type = 0; + int anglerQuestsFinished = this.anglerQuestsFinished; + float num1 = 1f; + float num2 = (anglerQuestsFinished > 50 ? (anglerQuestsFinished > 100 ? (anglerQuestsFinished > 150 ? 0.15f : (float) (0.25 - (double) (anglerQuestsFinished - 100) * (1.0 / 500.0))) : (float) (0.5 - (double) (anglerQuestsFinished - 50) * 0.00499999988824129)) : num1 - (float) anglerQuestsFinished * 0.01f) * 0.9f * ((float) (this.currentShoppingSettings.PriceAdjustment + 1.0) / 2f); + switch (anglerQuestsFinished) + { + case 5: + newItem1.SetDefaults(2428); + break; + case 10: + newItem1.SetDefaults(2367); + break; + case 15: + newItem1.SetDefaults(2368); + break; + case 20: + newItem1.SetDefaults(2369); + break; + case 30: + newItem1.SetDefaults(2294); + break; + default: + List itemIdsOfAccsWeWant1 = new List() + { + 2373, + 2374, + 2375 + }; + List itemIdsOfAccsWeWant2 = new List() + { + 3120, + 3037, + 3096 + }; + if (anglerQuestsFinished > 75 && Main.rand.Next((int) (250.0 * (double) num2)) == 0) + { + newItem1.SetDefaults(2294); + break; + } + if (Main.hardMode && anglerQuestsFinished > 25 && Main.rand.Next((int) (100.0 * (double) num2)) == 0) + { + newItem1.SetDefaults(2422); + break; + } + if (Main.hardMode && anglerQuestsFinished > 10 && Main.rand.Next((int) (70.0 * (double) num2)) == 0) + { + newItem1.SetDefaults(2494); + break; + } + if (Main.hardMode && anglerQuestsFinished > 10 && Main.rand.Next((int) (70.0 * (double) num2)) == 0) + { + newItem1.SetDefaults(3031); + break; + } + if (Main.hardMode && anglerQuestsFinished > 10 && Main.rand.Next((int) (70.0 * (double) num2)) == 0) + { + newItem1.SetDefaults(3032); + break; + } + if (Main.rand.Next((int) (80.0 * (double) num2)) == 0) + { + newItem1.SetDefaults(3183); + break; + } + if (Main.rand.Next((int) (60.0 * (double) num2)) == 0) + { + newItem1.SetDefaults(2360); + break; + } + if (Main.rand.Next((int) (60.0 * (double) num2)) == 0) + { + newItem1.SetDefaults(4067); + break; + } + bool botheredRollingForADrop1; + int itemIdToDrop1; + if (this.DropAnglerAccByMissing(itemIdsOfAccsWeWant1, (int) (40.0 * (double) num2), out botheredRollingForADrop1, out itemIdToDrop1)) + { + newItem1.SetDefaults(itemIdToDrop1); + break; + } + if (!botheredRollingForADrop1 && Main.rand.Next((int) (40.0 * (double) num2)) == 0) + { + newItem1.SetDefaults(2373); + break; + } + if (!botheredRollingForADrop1 && Main.rand.Next((int) (40.0 * (double) num2)) == 0) + { + newItem1.SetDefaults(2374); + break; + } + if (!botheredRollingForADrop1 && Main.rand.Next((int) (40.0 * (double) num2)) == 0) + { + newItem1.SetDefaults(2375); + break; + } + bool botheredRollingForADrop2; + int itemIdToDrop2; + if (this.DropAnglerAccByMissing(itemIdsOfAccsWeWant2, (int) (30.0 * (double) num2), out botheredRollingForADrop2, out itemIdToDrop2)) + { + newItem1.SetDefaults(itemIdToDrop2); + break; + } + if (!botheredRollingForADrop2 && Main.rand.Next((int) (30.0 * (double) num2)) == 0) + { + newItem1.SetDefaults(3120); + break; + } + if (!botheredRollingForADrop2 && Main.rand.Next((int) (30.0 * (double) num2)) == 0) + { + newItem1.SetDefaults(3037); + break; + } + if (!botheredRollingForADrop2 && Main.rand.Next((int) (30.0 * (double) num2)) == 0) + { + newItem1.SetDefaults(3096); + break; + } + if (Main.rand.Next((int) (40.0 * (double) num2)) == 0) + { + newItem1.SetDefaults(2417); + break; + } + if (Main.rand.Next((int) (40.0 * (double) num2)) == 0) + { + newItem1.SetDefaults(2498); + break; + } + switch (Main.rand.Next(70)) + { + case 0: + newItem1.SetDefaults(2442); + break; + case 1: + newItem1.SetDefaults(2443); + break; + case 2: + newItem1.SetDefaults(2444); + break; + case 3: + newItem1.SetDefaults(2445); + break; + case 4: + newItem1.SetDefaults(2497); + break; + case 5: + newItem1.SetDefaults(2495); + break; + case 6: + newItem1.SetDefaults(2446); + break; + case 7: + newItem1.SetDefaults(2447); + break; + case 8: + newItem1.SetDefaults(2448); + break; + case 9: + newItem1.SetDefaults(2449); + break; + case 10: + newItem1.SetDefaults(2490); + break; + case 12: + newItem1.SetDefaults(2496); + break; + default: + switch (Main.rand.Next(3)) + { + case 0: + newItem1.SetDefaults(2354); + newItem1.stack = Main.rand.Next(2, 6); + break; + case 1: + newItem1.SetDefaults(2355); + newItem1.stack = Main.rand.Next(2, 6); + break; + default: + newItem1.SetDefaults(2356); + newItem1.stack = Main.rand.Next(2, 6); + break; + } + break; + } + break; + } + newItem1.position = this.Center; + GetItemSettings inventorySettings = GetItemSettings.NPCEntityToPlayerInventorySettings; + Item obj1 = this.GetItem(this.whoAmI, newItem1, inventorySettings); + if (obj1.stack > 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, obj1.type, obj1.stack, noGrabDelay: true); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + } + if (newItem1.type == 2417) + { + Item newItem2 = new Item(); + Item newItem3 = new Item(); + newItem2.SetDefaults(2418); + newItem2.position = this.Center; + Item obj2 = this.GetItem(this.whoAmI, newItem2, inventorySettings); + if (obj2.stack > 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, obj2.type, obj2.stack, noGrabDelay: true); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + } + newItem3.SetDefaults(2419); + newItem3.position = this.Center; + Item obj3 = this.GetItem(this.whoAmI, newItem3, inventorySettings); + if (obj3.stack > 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, obj3.type, obj3.stack, noGrabDelay: true); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + } + } + else if (newItem1.type == 2498) + { + Item newItem4 = new Item(); + Item newItem5 = new Item(); + newItem4.SetDefaults(2499); + newItem4.position = this.Center; + Item obj4 = this.GetItem(this.whoAmI, newItem4, inventorySettings); + if (obj4.stack > 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, obj4.type, obj4.stack, noGrabDelay: true); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + } + newItem5.SetDefaults(2500); + newItem5.position = this.Center; + Item obj5 = this.GetItem(this.whoAmI, newItem5, inventorySettings); + if (obj5.stack > 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, obj5.type, obj5.stack, noGrabDelay: true); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + } + } + Item newItem6 = new Item(); + int num3 = (int) ((double) (int) ((double) ((anglerQuestsFinished + 50) / 2 * Main.rand.Next(50, 201)) * 0.0149999996647239) * 1.5); + if (Main.expertMode) + num3 *= 2; + if (num3 > 100) + { + int num4 = num3 / 100; + if (num4 > 10) + num4 = 10; + if (num4 < 1) + num4 = 1; + newItem6.SetDefaults(73); + newItem6.stack = num4; + } + else + { + if (num3 > 99) + num3 = 99; + if (num3 < 1) + num3 = 1; + newItem6.SetDefaults(72); + newItem6.stack = num3; + } + newItem6.position = this.Center; + Item obj6 = this.GetItem(this.whoAmI, newItem6, inventorySettings); + if (obj6.stack > 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, obj6.type, obj6.stack, noGrabDelay: true); + if (Main.netMode == 1) + NetMessage.SendData(21, number: number, number2: 1f); + } + if (Main.rand.Next((int) (100.0 * (double) num2)) > 50) + return; + Item newItem7 = new Item(); + if (Main.rand.Next((int) (15.0 * (double) num2)) == 0) + newItem7.SetDefaults(2676); + else if (Main.rand.Next((int) (5.0 * (double) num2)) == 0) + newItem7.SetDefaults(2675); + else + newItem7.SetDefaults(2674); + if (Main.rand.Next(25) <= anglerQuestsFinished) + ++newItem7.stack; + if (Main.rand.Next(50) <= anglerQuestsFinished) + ++newItem7.stack; + if (Main.rand.Next(100) <= anglerQuestsFinished) + ++newItem7.stack; + if (Main.rand.Next(150) <= anglerQuestsFinished) + ++newItem7.stack; + if (Main.rand.Next(200) <= anglerQuestsFinished) + ++newItem7.stack; + if (Main.rand.Next(250) <= anglerQuestsFinished) + ++newItem7.stack; + newItem7.position = this.Center; + Item obj7 = this.GetItem(this.whoAmI, newItem7, GetItemSettings.NPCEntityToPlayerInventorySettings); + if (obj7.stack <= 0) + return; + int number1 = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, obj7.type, obj7.stack, noGrabDelay: true); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number1, number2: 1f); + } + + public bool DropAnglerAccByMissing( + List itemIdsOfAccsWeWant, + int randomChanceForASingleAcc, + out bool botheredRollingForADrop, + out int itemIdToDrop) + { + botheredRollingForADrop = false; + itemIdToDrop = 0; + foreach (Item itemToTestAgainst in this.inventory) + this.RemoveAnglerAccOptionsFromRewardPool(itemIdsOfAccsWeWant, itemToTestAgainst); + foreach (Item itemToTestAgainst in this.armor) + this.RemoveAnglerAccOptionsFromRewardPool(itemIdsOfAccsWeWant, itemToTestAgainst); + foreach (Item itemToTestAgainst in this.bank.item) + this.RemoveAnglerAccOptionsFromRewardPool(itemIdsOfAccsWeWant, itemToTestAgainst); + foreach (Item itemToTestAgainst in this.bank2.item) + this.RemoveAnglerAccOptionsFromRewardPool(itemIdsOfAccsWeWant, itemToTestAgainst); + foreach (Item itemToTestAgainst in this.bank3.item) + this.RemoveAnglerAccOptionsFromRewardPool(itemIdsOfAccsWeWant, itemToTestAgainst); + foreach (Item itemToTestAgainst in this.bank4.item) + this.RemoveAnglerAccOptionsFromRewardPool(itemIdsOfAccsWeWant, itemToTestAgainst); + if (itemIdsOfAccsWeWant.Count == 0) + return false; + bool flag = false; + for (int index = 0; index < itemIdsOfAccsWeWant.Count; ++index) + flag |= Main.rand.Next(randomChanceForASingleAcc) == 0; + botheredRollingForADrop = true; + if (!flag) + return false; + itemIdToDrop = Main.rand.NextFromList(itemIdsOfAccsWeWant.ToArray()); + return true; + } + + private void RemoveAnglerAccOptionsFromRewardPool( + List itemIdsOfAccsWeWant, + Item itemToTestAgainst) + { + if (itemToTestAgainst.IsAir) + return; + switch (itemToTestAgainst.type) + { + case 3036: + case 3123: + case 3124: + itemIdsOfAccsWeWant.Remove(3120); + itemIdsOfAccsWeWant.Remove(3037); + itemIdsOfAccsWeWant.Remove(3096); + break; + case 3721: + itemIdsOfAccsWeWant.Remove(2373); + itemIdsOfAccsWeWant.Remove(2375); + itemIdsOfAccsWeWant.Remove(2374); + break; + default: + itemIdsOfAccsWeWant.Remove(itemToTestAgainst.type); + break; + } + } + + public void GetDyeTraderReward() + { + List intList = new List() + { + 3560, + 3028, + 3041, + 3040, + 3025, + 3190, + 3027, + 3026, + 3554, + 3553, + 3555, + 2872, + 3534, + 2871 + }; + if (Main.hardMode) + { + intList.Add(3039); + intList.Add(3038); + intList.Add(3598); + intList.Add(3597); + intList.Add(3600); + intList.Add(3042); + intList.Add(3533); + intList.Add(3561); + if (NPC.downedMechBossAny) + { + intList.Add(2883); + intList.Add(2869); + intList.Add(2873); + intList.Add(2870); + } + if (NPC.downedPlantBoss) + { + intList.Add(2878); + intList.Add(2879); + intList.Add(2884); + intList.Add(2885); + } + if (NPC.downedMartians) + { + intList.Add(2864); + intList.Add(3556); + } + if (NPC.downedMoonlord) + intList.Add(3024); + } + int Type = intList[Main.rand.Next(intList.Count)]; + Item newItem = new Item(); + newItem.SetDefaults(Type); + newItem.stack = 3; + newItem.position = this.Center; + Item obj = this.GetItem(this.whoAmI, newItem, GetItemSettings.NPCEntityToPlayerInventorySettings); + if (obj.stack <= 0) + return; + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, obj.type, obj.stack, noGrabDelay: true); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + + public bool CheckMana(int amount, bool pay = false, bool blockQuickMana = false) + { + int num = (int) ((double) amount * (double) this.manaCost); + if (this.statMana >= num) + { + if (pay) + this.statMana -= num; + return true; + } + if (!this.manaFlower || blockQuickMana) + return false; + this.QuickMana(); + if (this.statMana < num) + return false; + if (pay) + this.statMana -= num; + return true; + } + + public void TryPortalJumping() + { + if (this.mount.Active || this.dead || this.isLockedToATile) + return; + PortalHelper.TryGoingThroughPortals((Entity) this); + } + + public bool ConsumeSolarFlare() + { + if (!this.setSolar || this.solarShields <= 0) + return false; + --this.solarShields; + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] >= 170 && this.buffType[b] <= 172) + this.DelBuff(b); + } + if (this.solarShields > 0 && this.whoAmI == Main.myPlayer) + this.AddBuff(170 + this.solarShields - 1, 5, false); + this.solarCounter = 0; + return true; + } + + public void KeyDoubleTap(int keyDir) + { + int num = 0; + if (Main.ReversedUpDownArmorSetBonuses) + num = 1; + if (keyDir != num) + return; + if (this.setVortex && !this.mount.Active) + this.vortexStealthActive = !this.vortexStealthActive; + if (!this.setForbidden) + return; + this.MinionRestTargetAim(); + if (this.setForbiddenCooldownLocked) + return; + this.CommandForbiddenStorm(); + } + + public void UpdateForbiddenSetLock() + { + List intList = new List(); + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && projectile.type == 656 && projectile.owner == this.whoAmI) + intList.Add(index); + } + this.setForbiddenCooldownLocked = intList.Count > 1; + } + + public void CommandForbiddenStorm() + { + List intList = new List(); + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && projectile.type == 656 && projectile.owner == this.whoAmI) + intList.Add(index); + } + bool flag1 = StrayMethods.CanSpawnSandstormFriendly(this.MinionRestTargetPoint, 30, 30); + int num1 = this.MinionRestTargetPoint == Vector2.Zero ? 1 : 0; + Vector2 center = this.Center; + Vector2 endPoint = this.MinionRestTargetPoint; + if (num1 != 0) + endPoint = center; + int samplesToTake = 10; + float samplingWidth = 60f; + Vector2 vectorTowardsTarget; + float[] samples; + Collision.AimingLaserScan(center, endPoint, samplingWidth, samplesToTake, out vectorTowardsTarget, out samples); + bool flag2 = false; + foreach (float num2 in samples) + { + if ((double) Math.Abs(num2 - vectorTowardsTarget.Length()) < 10.0) + { + flag2 = true; + break; + } + } + float num3 = 0.0f; + for (int index = 0; index < samples.Length; ++index) + { + if ((double) samples[index] > (double) num3) + num3 = samples[index]; + } + if (intList.Count <= 1) + { + Vector2 Position1 = center + vectorTowardsTarget.SafeNormalize(Vector2.Zero) * num3; + Vector2 vector2 = Position1 - center; + if ((double) vector2.Length() > 0.0) + { + for (float num4 = 0.0f; (double) num4 < (double) vector2.Length(); num4 += 15f) + { + Vector2 Position2 = center + vector2 * (num4 / vector2.Length()); + Dust dust = Main.dust[Dust.NewDust(Position2, 0, 0, 269)]; + dust.position = Position2; + dust.fadeIn = 0.5f; + dust.scale = 0.7f; + dust.velocity *= 0.4f; + dust.noLight = true; + } + } + for (float num5 = 0.0f; (double) num5 < 6.28318548202515; num5 += 0.2094395f) + { + Dust dust = Main.dust[Dust.NewDust(Position1, 0, 0, 269)]; + dust.position = Position1; + dust.fadeIn = 1f; + dust.scale = 0.3f; + dust.noLight = true; + } + } + bool flag3 = flag1 & intList.Count <= 1 & flag2; + if (flag3) + { + flag3 = this.CheckMana(20, true); + if (flag3) + this.manaRegenDelay = (int) this.maxRegenDelay; + } + if (!flag3) + return; + foreach (int index in intList) + { + Projectile projectile = Main.projectile[index]; + if ((double) projectile.ai[0] < 780.0) + { + projectile.ai[0] = (float) (780.0 + (double) projectile.ai[0] % 60.0); + projectile.netUpdate = true; + } + } + int Damage = (int) (20.0 * (1.0 + (double) this.magicDamage + (double) this.minionDamage - 2.0)); + Projectile projectile1 = Main.projectile[Projectile.NewProjectile(this.MinionRestTargetPoint, Vector2.Zero, 656, Damage, 0.0f, Main.myPlayer)]; + } + + public void KeyHoldDown(int keyDir, int holdTime) + { + int num = 0; + if (Main.ReversedUpDownArmorSetBonuses) + num = 1; + if (keyDir != num) + return; + if (this.setStardust && holdTime >= 60) + this.MinionRestTargetPoint = Vector2.Zero; + if (!this.setForbidden || holdTime < 60) + return; + this.MinionRestTargetPoint = Vector2.Zero; + } + + public void MinionNPCTargetAim(bool doNotDisableIfTheTargetIsTheSame) + { + Vector2 mouseWorld = Main.MouseWorld; + int index1 = -1; + for (int index2 = 0; index2 < 200; ++index2) + { + if (Main.npc[index2].CanBeChasedBy((object) this) && (index1 == -1 || (double) Main.npc[index2].Hitbox.Distance(mouseWorld) < (double) Main.npc[index1].Hitbox.Distance(mouseWorld))) + index1 = index2; + } + if (this.MinionAttackTargetNPC == index1 && !doNotDisableIfTheTargetIsTheSame) + this.MinionAttackTargetNPC = -1; + else + this.MinionAttackTargetNPC = index1; + } + + public void MinionRestTargetAim() + { + Vector2 mouseWorld = Main.MouseWorld; + float y = mouseWorld.Y; + int i = (int) mouseWorld.X / 16; + int index1 = (int) y / 16; + int num1 = 0; + if ((!Main.tile[i, index1].nactive() || !Main.tileSolid[(int) Main.tile[i, index1].type] ? 0 : (!Main.tileSolidTop[(int) Main.tile[i, index1].type] ? 1 : 0)) != 0) + { + int num2 = 0; + for (int index2 = 0; index2 > -20 && index1 + index2 > 1; --index2) + { + int index3 = index1 + index2; + if ((!Main.tile[i, index3].nactive() || !Main.tileSolid[(int) Main.tile[i, index3].type] ? 0 : (!Main.tileSolidTop[(int) Main.tile[i, index3].type] ? 1 : 0)) != 0) + { + num2 = index2; + } + else + { + num2 = index2; + break; + } + } + int num3 = 0; + for (int index4 = 0; index4 < 20 && index1 + index4 < Main.maxTilesY; ++index4) + { + int index5 = index1 + index4; + if ((!Main.tile[i, index5].nactive() || !Main.tileSolid[(int) Main.tile[i, index5].type] ? 0 : (!Main.tileSolidTop[(int) Main.tile[i, index5].type] ? 1 : 0)) != 0) + { + num3 = index4; + } + else + { + num3 = index4; + break; + } + } + num1 = num3 <= -num2 ? num3 + 3 : num2 - 2; + } + int num4 = index1 + num1; + bool flag = false; + for (int j = num4; j < num4 + 5; ++j) + { + if (WorldGen.SolidTileAllowBottomSlope(i, j)) + flag = true; + } + while (!flag) + { + ++num4; + for (int j = num4; j < num4 + 5; ++j) + { + if (WorldGen.SolidTileAllowBottomSlope(i, j)) + flag = true; + } + } + Vector2 Other = new Vector2((float) (i * 16 + 8), (float) (num4 * 16)); + if ((double) this.Distance(Other) > 1000.0) + return; + this.MinionRestTargetPoint = Other; + } + + public void UpdateMinionTarget() + { + if (this.whoAmI != Main.myPlayer) + return; + if ((double) this.Distance(this.MinionRestTargetPoint) > 1000.0) + this.MinionRestTargetPoint = Vector2.Zero; + if (this.MinionAttackTargetNPC != -1 && (!Main.npc[this.MinionAttackTargetNPC].CanBeChasedBy((object) this) || (double) Main.npc[this.MinionAttackTargetNPC].Hitbox.Distance(this.Center) > 3000.0)) + this.MinionAttackTargetNPC = -1; + if (!this.stardustGuardian || !this.HasMinionRestTarget) + return; + Vector2 minionRestTargetPoint = this.MinionRestTargetPoint; + float num1 = (float) this.miscCounter / 150f; + float num2 = 2.094395f; + for (int index1 = 0; index1 < 3; ++index1) + { + int index2 = Dust.NewDust(minionRestTargetPoint, 0, 0, 135, Alpha: 100, Scale: 1.5f); + Main.dust[index2].noGravity = true; + Main.dust[index2].velocity = Vector2.Zero; + Main.dust[index2].noLight = true; + Main.dust[index2].position = minionRestTargetPoint + ((float) ((double) num1 * 6.28318548202515 + (double) num2 * (double) index1)).ToRotationVector2() * 4f; + Main.dust[index2].shader = GameShaders.Armor.GetSecondaryShader(this.cPet, this); + } + } + + public void NebulaLevelup(int type) + { + if (this.whoAmI != Main.myPlayer) + return; + int timeToAdd = 480; + for (int b = 0; b < 22; ++b) + { + if (this.buffType[b] >= type && this.buffType[b] < type + 3) + this.DelBuff(b); + } + switch (type) + { + case 173: + this.nebulaLevelLife = (int) MathHelper.Clamp((float) (this.nebulaLevelLife + 1), 0.0f, 3f); + this.AddBuff(type + this.nebulaLevelLife - 1, timeToAdd); + break; + case 176: + this.nebulaLevelMana = (int) MathHelper.Clamp((float) (this.nebulaLevelMana + 1), 0.0f, 3f); + this.AddBuff(type + this.nebulaLevelMana - 1, timeToAdd); + break; + case 179: + this.nebulaLevelDamage = (int) MathHelper.Clamp((float) (this.nebulaLevelDamage + 1), 0.0f, 3f); + this.AddBuff(type + this.nebulaLevelDamage - 1, timeToAdd); + break; + } + } + + public void UpdateTouchingTiles() + { + this.TouchedTiles.Clear(); + List pointList1 = (List) null; + List pointList2 = (List) null; + if (!Collision.IsClearSpotTest(this.position + this.velocity, 16f, this.width, this.height, gravDir: ((int) this.gravDir), checkSlopes: true)) + pointList1 = Collision.FindCollisionTile(Math.Sign(this.velocity.Y) == 1 ? 2 : 3, this.position + this.velocity, 16f, this.width, this.height, gravDir: ((int) this.gravDir)); + if (!Collision.IsClearSpotTest(this.position, Math.Abs(this.velocity.Y), this.width, this.height, gravDir: ((int) this.gravDir), checkSlopes: true)) + pointList2 = Collision.FindCollisionTile(Math.Sign(this.velocity.Y) == 1 ? 2 : 3, this.position, Math.Abs(this.velocity.Y), this.width, this.height, gravDir: ((int) this.gravDir), checkSlopes: true); + if (pointList1 != null && pointList2 != null) + { + for (int index = 0; index < pointList2.Count; ++index) + { + if (!pointList1.Contains(pointList2[index])) + pointList1.Add(pointList2[index]); + } + } + if (pointList1 == null && pointList2 != null) + pointList1 = pointList2; + if (pointList1 == null) + return; + this.TouchedTiles = pointList1; + } + + public static class BuilderAccToggleIDs + { + public const int RulerLine = 0; + public const int RulerGrid = 1; + public const int AutoActuate = 2; + public const int AutoPaint = 3; + public const int WireVisibility_Red = 4; + public const int WireVisibility_Green = 5; + public const int WireVisibility_Blue = 6; + public const int WireVisibility_Yellow = 7; + public const int HideAllWires = 8; + public const int WireVisibility_Actuators = 9; + public const int BlockSwap = 10; + public const int TorchBiome = 11; + public const int Count = 12; + } + + public struct RabbitOrderFrameHelper + { + public int DisplayFrame; + private int _frameCounter; + private int _aiState; + private const int AIState_Idle = 0; + private const int AIState_LookingAtCamera = 1; + private const int AIState_Resting = 2; + private const int AIState_EatingCarrot = 3; + + public void Update() + { + switch (this._aiState) + { + case 0: + this.UpdateFrame(0, 0, Main.rand.Next(1, 4), Main.rand.Next(180, 3600)); + break; + case 1: + this.UpdateFrame(7, 9, 0, 20); + break; + case 2: + int gameFramesPerDisplayFrame = 8; + if (this.DisplayFrame == 13) + gameFramesPerDisplayFrame = 120; + this.UpdateFrame(10, 16, 0, gameFramesPerDisplayFrame); + break; + case 3: + this.UpdateFrame(17, 26, 0, 4); + break; + } + } + + public void Reset() => this.ChangeToAIState(0); + + private void ChangeToAIState(int aiState) + { + this._aiState = aiState; + this._frameCounter = 0; + this.Update(); + } + + private void UpdateFrame( + int displayFrameMin, + int displayFrameMax, + int exitAIState, + int gameFramesPerDisplayFrame) + { + this.DisplayFrame = Utils.Clamp(this.DisplayFrame, displayFrameMin, displayFrameMax); + if (this._frameCounter++ < gameFramesPerDisplayFrame) + return; + this._frameCounter = 0; + if (this.DisplayFrame++ < displayFrameMax) + return; + this.ChangeToAIState(exitAIState); + } + } + + public enum CompositeArmStretchAmount + { + Full, + None, + Quarter, + ThreeQuarters, + } + + public struct CompositeArmData + { + public bool enabled; + public Player.CompositeArmStretchAmount stretch; + public float rotation; + + public CompositeArmData( + bool enabled, + Player.CompositeArmStretchAmount intendedStrech, + float rotation) + { + this.enabled = enabled; + this.stretch = intendedStrech; + this.rotation = rotation; + } + } + + public struct ItemSpaceStatus + { + public readonly bool CanTakeItem; + public readonly bool ItemIsGoingToVoidVault; + + public bool CanTakeItemToPersonalInventory => this.CanTakeItem && !this.ItemIsGoingToVoidVault; + + public ItemSpaceStatus(bool CanTakeItem, bool ItemIsGoingToVoidVault = false) + { + this.CanTakeItem = CanTakeItem; + this.ItemIsGoingToVoidVault = ItemIsGoingToVoidVault; + } + } + + private struct SpecialToolUsageSettings + { + public bool IsAValidTool; + public Player.SpecialToolUsageSettings.CanUseToolCondition UsageCondition; + public Player.SpecialToolUsageSettings.UseToolAction UsageAction; + + public delegate bool CanUseToolCondition(Player user, Item item, int targetX, int targetY); + + public delegate void UseToolAction(Player user, Item item, int targetX, int targetY); + } + + public class SavedPlayerDataWithAnnoyingRules + { + public bool godmodePowerEnabled; + public bool farPlacementRangePowerEnabled; + public float spawnRatePowerSliderValue; + } + + private class RandomTeleportationAttemptSettings + { + public bool mostlySolidFloor; + public bool avoidLava; + public bool avoidAnyLiquid; + public bool avoidHurtTiles; + public bool avoidWalls; + public int attemptsBeforeGivingUp; + public int maximumFallDistanceFromOrignalPoint; + } + + public static class Hooks + { + public static event Action OnEnterWorld; + + public static void PlayerConnect(int playerIndex) => PressurePlateHelper.ResetPlayer(playerIndex); + + public static void PlayerDisconnect(int playerIndex) => PressurePlateHelper.ResetPlayer(playerIndex); + + public static void EnterWorld(int playerIndex) + { + if (Player.Hooks.OnEnterWorld == null) + return; + Player.Hooks.OnEnterWorld(Main.player[playerIndex]); + } + } + + public class SmartCursorSettings + { + public static bool SmartBlocksEnabled; + public static bool SmartAxeAfterPickaxe; + } + + public class Settings + { + public static Player.Settings.HoverControlMode HoverControl; + + public static void CycleHoverControl() + { + switch (Player.Settings.HoverControl) + { + case Player.Settings.HoverControlMode.Hold: + Player.Settings.HoverControl = Player.Settings.HoverControlMode.Click; + break; + case Player.Settings.HoverControlMode.Click: + Player.Settings.HoverControl = Player.Settings.HoverControlMode.Hold; + break; + } + } + + public enum HoverControlMode + { + Hold, + Click, + } + } + + public class SelectionRadial + { + private int _SelectedBinding = -1; + public int RadialCount; + public int[] Bindings; + public Player.SelectionRadial.SelectionMode Mode; + + public int SelectedBinding => this._SelectedBinding; + + public int SelectedItem => this._SelectedBinding == -1 ? -1 : this.Bindings[this._SelectedBinding]; + + public SelectionRadial(Player.SelectionRadial.SelectionMode mode = Player.SelectionRadial.SelectionMode.Dpad4) + { + this.Mode = mode; + int num = 0; + switch (mode) + { + case Player.SelectionRadial.SelectionMode.Dpad4: + num = 4; + break; + case Player.SelectionRadial.SelectionMode.RadialCircular: + num = 10; + break; + case Player.SelectionRadial.SelectionMode.RadialQuicks: + num = 4; + break; + } + this.RadialCount = num; + this.Bindings = new int[this.RadialCount]; + for (int index = 0; index < this.RadialCount; ++index) + this.Bindings[index] = -1; + } + + public void Update() + { + switch (this.Mode) + { + case Player.SelectionRadial.SelectionMode.Dpad4: + if (PlayerInput.Triggers.JustPressed.DpadRadial1) + this.ChangeSelection(0); + if (PlayerInput.Triggers.JustPressed.DpadRadial2) + this.ChangeSelection(1); + if (PlayerInput.Triggers.JustPressed.DpadRadial3) + this.ChangeSelection(2); + if (!PlayerInput.Triggers.JustPressed.DpadRadial4) + break; + this.ChangeSelection(3); + break; + case Player.SelectionRadial.SelectionMode.RadialCircular: + case Player.SelectionRadial.SelectionMode.RadialQuicks: + for (int index = 0; index < this.RadialCount; ++index) + this.Bindings[index] = index; + if ((this.Mode != Player.SelectionRadial.SelectionMode.RadialCircular || !PlayerInput.Triggers.Current.RadialHotbar ? (this.Mode != Player.SelectionRadial.SelectionMode.RadialQuicks ? 0 : (PlayerInput.Triggers.Current.RadialQuickbar ? 1 : 0)) : 1) == 0) + break; + bool flag = this.Mode == Player.SelectionRadial.SelectionMode.RadialCircular; + float num = (float) (6.28318548202515 / (double) this.RadialCount / 2.0); + Vector2 v = PlayerInput.GamepadThumbstickRight.RotatedBy((double) num - 1.57079637050629); + if ((double) v.Length() == 0.0) + v = PlayerInput.GamepadThumbstickLeft.RotatedBy((double) num - 1.57079637050629); + int to = -1; + if ((double) v.Length() > 0.300000011920929) + { + to = (int) (((double) v.ToRotation() + 3.14159274101257) / (6.28318548202515 / (double) this.RadialCount)); + if (to >= this.RadialCount) + to -= this.RadialCount; + } + if (to == -1 && flag || this._SelectedBinding == to || to == -1 && v != Vector2.Zero) + break; + this.ChangeSelection(to); + break; + } + } + + public void ChangeBinding(int itemSlot) + { + if (itemSlot < 0 || itemSlot >= 50 || this.Mode != Player.SelectionRadial.SelectionMode.Dpad4) + return; + if (PlayerInput.Triggers.JustPressed.DpadRadial1) + this.Bind(itemSlot, 0); + if (PlayerInput.Triggers.JustPressed.DpadRadial2) + this.Bind(itemSlot, 1); + if (PlayerInput.Triggers.JustPressed.DpadRadial3) + this.Bind(itemSlot, 2); + if (!PlayerInput.Triggers.JustPressed.DpadRadial4) + return; + this.Bind(itemSlot, 3); + } + + public void ChangeSelection(int to) + { + if (this._SelectedBinding == to) + this._SelectedBinding = -1; + else + this._SelectedBinding = to; + } + + private void Bind(int itemslot, int radialslot) + { + this.ChangeSelection(-1); + if (this.Bindings[radialslot] == itemslot) + { + this.Bindings[radialslot] = -1; + } + else + { + for (int index = 0; index < this.RadialCount; ++index) + { + if (this.Bindings[index] == itemslot) + this.Bindings[index] = -1; + } + this.Bindings[radialslot] = itemslot; + } + } + + public int GetDrawMode(int itemslot) + { + if (this.SelectedBinding != -1 && this.Bindings[this.SelectedBinding] == itemslot) + return 2; + for (int index = 0; index < this.RadialCount; ++index) + { + if (this.Bindings[index] == itemslot) + return 1; + } + return 0; + } + + public void CopyTo(Player.SelectionRadial that) + { + that._SelectedBinding = this._SelectedBinding; + that.Mode = this.Mode; + that.RadialCount = this.RadialCount; + Array.Resize(ref that.Bindings, this.RadialCount); + for (int index = 0; index < this.RadialCount; ++index) + that.Bindings[index] = this.Bindings[index]; + } + + public enum SelectionMode + { + Dpad4, + RadialCircular, + RadialQuicks, + } + } + + public struct OverheadMessage + { + public string chatText; + public TextSnippet[] snippets; + public Vector2 messageSize; + public int timeLeft; + public Color color; + + public void NewMessage(string message, int displayTime) + { + this.chatText = message; + this.snippets = ChatManager.ParseMessage(this.chatText, Color.White).ToArray(); + this.messageSize = ChatManager.GetStringSize(FontAssets.MouseText.Value, this.snippets, Vector2.One); + this.timeLeft = displayTime; + } + } + } +} diff --git a/PlayerSpawnContext.cs b/PlayerSpawnContext.cs new file mode 100644 index 0000000..30d1ff4 --- /dev/null +++ b/PlayerSpawnContext.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.PlayerSpawnContext +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria +{ + public enum PlayerSpawnContext + { + ReviveFromDeath, + SpawningIntoWorld, + RecallFromItem, + } +} diff --git a/PopupText.cs b/PopupText.cs new file mode 100644 index 0000000..08aa479 --- /dev/null +++ b/PopupText.cs @@ -0,0 +1,477 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.PopupText +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.GameContent; +using Terraria.Localization; + +namespace Terraria +{ + public class PopupText + { + public Vector2 position; + public Vector2 velocity; + public float alpha; + public int alphaDir = 1; + public string name; + public int stack; + public float scale = 1f; + public float rotation; + public Color color; + public bool active; + public int lifeTime; + public static int activeTime = 60; + public static int numActive; + public bool NoStack; + public bool coinText; + public int coinValue; + public static int sonarText = -1; + public bool expert; + public bool master; + public bool sonar; + public PopupTextContext context; + public int npcNetID; + + public bool notActuallyAnItem => (uint) this.npcNetID > 0U; + + public static float TargetScale => Main.UIScale / Main.GameViewMatrix.Zoom.X; + + public static void ClearSonarText() + { + if (PopupText.sonarText < 0 || !Main.popupText[PopupText.sonarText].sonar) + return; + Main.popupText[PopupText.sonarText].active = false; + PopupText.sonarText = -1; + } + + public static int NewText( + PopupTextContext context, + int npcNetID, + Vector2 position, + bool stay5TimesLonger) + { + if (!Main.showItemText || npcNetID == 0 || Main.netMode == 2) + return -1; + int nextItemTextSlot = PopupText.FindNextItemTextSlot(); + if (nextItemTextSlot >= 0) + { + NPC npc = new NPC(); + npc.SetDefaults(npcNetID); + string typeName = npc.TypeName; + Vector2 vector2 = FontAssets.MouseText.Value.MeasureString(typeName); + PopupText popupText = Main.popupText[nextItemTextSlot]; + Main.popupText[nextItemTextSlot].alpha = 1f; + popupText.alphaDir = -1; + popupText.active = true; + popupText.scale = 0.0f; + popupText.NoStack = true; + popupText.rotation = 0.0f; + popupText.position = position - vector2 / 2f; + popupText.expert = false; + popupText.master = false; + popupText.name = typeName; + popupText.stack = 1; + popupText.velocity.Y = -7f; + popupText.lifeTime = 60; + popupText.context = context; + if (stay5TimesLonger) + popupText.lifeTime *= 5; + popupText.npcNetID = npcNetID; + popupText.coinValue = 0; + popupText.coinText = false; + popupText.color = Color.White; + if (context == PopupTextContext.SonarAlert) + popupText.color = Color.Lerp(Color.White, Color.Crimson, 0.5f); + } + return nextItemTextSlot; + } + + public static int NewText( + PopupTextContext context, + Item newItem, + int stack, + bool noStack = false, + bool longText = false) + { + if (!Main.showItemText || newItem.Name == null || !newItem.active || Main.netMode == 2) + return -1; + bool flag = newItem.type >= 71 && newItem.type <= 74; + for (int index = 0; index < 20; ++index) + { + if (Main.popupText[index].active && !Main.popupText[index].notActuallyAnItem && (Main.popupText[index].name == newItem.AffixName() || flag && Main.popupText[index].coinText) && !Main.popupText[index].NoStack && !noStack) + { + string str1 = newItem.Name + " (" + (object) (Main.popupText[index].stack + stack) + ")"; + string str2 = newItem.Name; + if (Main.popupText[index].stack > 1) + str2 = str2 + " (" + (object) Main.popupText[index].stack + ")"; + FontAssets.MouseText.Value.MeasureString(str2); + Vector2 vector2 = FontAssets.MouseText.Value.MeasureString(str1); + if (Main.popupText[index].lifeTime < 0) + Main.popupText[index].scale = 1f; + if (Main.popupText[index].lifeTime < 60) + Main.popupText[index].lifeTime = 60; + if (flag && Main.popupText[index].coinText) + { + int num = 0; + if (newItem.type == 71) + num += stack; + else if (newItem.type == 72) + num += 100 * stack; + else if (newItem.type == 73) + num += 10000 * stack; + else if (newItem.type == 74) + num += 1000000 * stack; + Main.popupText[index].coinValue += num; + string name = PopupText.ValueToName(Main.popupText[index].coinValue); + vector2 = FontAssets.MouseText.Value.MeasureString(name); + Main.popupText[index].name = name; + if (Main.popupText[index].coinValue >= 1000000) + { + if (Main.popupText[index].lifeTime < 300) + Main.popupText[index].lifeTime = 300; + Main.popupText[index].color = new Color(220, 220, 198); + } + else if (Main.popupText[index].coinValue >= 10000) + { + if (Main.popupText[index].lifeTime < 240) + Main.popupText[index].lifeTime = 240; + Main.popupText[index].color = new Color(224, 201, 92); + } + else if (Main.popupText[index].coinValue >= 100) + { + if (Main.popupText[index].lifeTime < 180) + Main.popupText[index].lifeTime = 180; + Main.popupText[index].color = new Color(181, 192, 193); + } + else if (Main.popupText[index].coinValue >= 1) + { + if (Main.popupText[index].lifeTime < 120) + Main.popupText[index].lifeTime = 120; + Main.popupText[index].color = new Color(246, 138, 96); + } + } + Main.popupText[index].stack += stack; + Main.popupText[index].scale = 0.0f; + Main.popupText[index].rotation = 0.0f; + Main.popupText[index].position.X = (float) ((double) newItem.position.X + (double) newItem.width * 0.5 - (double) vector2.X * 0.5); + Main.popupText[index].position.Y = (float) ((double) newItem.position.Y + (double) newItem.height * 0.25 - (double) vector2.Y * 0.5); + Main.popupText[index].velocity.Y = -7f; + Main.popupText[index].context = context; + Main.popupText[index].npcNetID = 0; + if (Main.popupText[index].coinText) + Main.popupText[index].stack = 1; + return index; + } + } + int nextItemTextSlot = PopupText.FindNextItemTextSlot(); + if (nextItemTextSlot >= 0) + { + string str = newItem.AffixName(); + if (stack > 1) + str = str + " (" + (object) stack + ")"; + Vector2 vector2 = FontAssets.MouseText.Value.MeasureString(str); + Main.popupText[nextItemTextSlot].alpha = 1f; + Main.popupText[nextItemTextSlot].alphaDir = -1; + Main.popupText[nextItemTextSlot].active = true; + Main.popupText[nextItemTextSlot].scale = 0.0f; + Main.popupText[nextItemTextSlot].NoStack = noStack; + Main.popupText[nextItemTextSlot].rotation = 0.0f; + Main.popupText[nextItemTextSlot].position.X = (float) ((double) newItem.position.X + (double) newItem.width * 0.5 - (double) vector2.X * 0.5); + Main.popupText[nextItemTextSlot].position.Y = (float) ((double) newItem.position.Y + (double) newItem.height * 0.25 - (double) vector2.Y * 0.5); + Main.popupText[nextItemTextSlot].color = Color.White; + Main.popupText[nextItemTextSlot].master = false; + if (newItem.rare == 1) + Main.popupText[nextItemTextSlot].color = new Color(150, 150, (int) byte.MaxValue); + else if (newItem.rare == 2) + Main.popupText[nextItemTextSlot].color = new Color(150, (int) byte.MaxValue, 150); + else if (newItem.rare == 3) + Main.popupText[nextItemTextSlot].color = new Color((int) byte.MaxValue, 200, 150); + else if (newItem.rare == 4) + Main.popupText[nextItemTextSlot].color = new Color((int) byte.MaxValue, 150, 150); + else if (newItem.rare == 5) + Main.popupText[nextItemTextSlot].color = new Color((int) byte.MaxValue, 150, (int) byte.MaxValue); + else if (newItem.rare == -13) + Main.popupText[nextItemTextSlot].master = true; + else if (newItem.rare == -11) + Main.popupText[nextItemTextSlot].color = new Color((int) byte.MaxValue, 175, 0); + else if (newItem.rare == -1) + Main.popupText[nextItemTextSlot].color = new Color(130, 130, 130); + else if (newItem.rare == 6) + Main.popupText[nextItemTextSlot].color = new Color(210, 160, (int) byte.MaxValue); + else if (newItem.rare == 7) + Main.popupText[nextItemTextSlot].color = new Color(150, (int) byte.MaxValue, 10); + else if (newItem.rare == 8) + Main.popupText[nextItemTextSlot].color = new Color((int) byte.MaxValue, (int) byte.MaxValue, 10); + else if (newItem.rare == 9) + Main.popupText[nextItemTextSlot].color = new Color(5, 200, (int) byte.MaxValue); + else if (newItem.rare == 10) + Main.popupText[nextItemTextSlot].color = new Color((int) byte.MaxValue, 40, 100); + else if (newItem.rare >= 11) + Main.popupText[nextItemTextSlot].color = new Color(180, 40, (int) byte.MaxValue); + Main.popupText[nextItemTextSlot].expert = newItem.expert; + Main.popupText[nextItemTextSlot].name = newItem.AffixName(); + Main.popupText[nextItemTextSlot].stack = stack; + Main.popupText[nextItemTextSlot].velocity.Y = -7f; + Main.popupText[nextItemTextSlot].lifeTime = 60; + Main.popupText[nextItemTextSlot].context = context; + Main.popupText[nextItemTextSlot].npcNetID = 0; + if (longText) + Main.popupText[nextItemTextSlot].lifeTime *= 5; + Main.popupText[nextItemTextSlot].coinValue = 0; + Main.popupText[nextItemTextSlot].coinText = newItem.type >= 71 && newItem.type <= 74; + if (Main.popupText[nextItemTextSlot].coinText) + { + if (newItem.type == 71) + Main.popupText[nextItemTextSlot].coinValue += Main.popupText[nextItemTextSlot].stack; + else if (newItem.type == 72) + Main.popupText[nextItemTextSlot].coinValue += 100 * Main.popupText[nextItemTextSlot].stack; + else if (newItem.type == 73) + Main.popupText[nextItemTextSlot].coinValue += 10000 * Main.popupText[nextItemTextSlot].stack; + else if (newItem.type == 74) + Main.popupText[nextItemTextSlot].coinValue += 1000000 * Main.popupText[nextItemTextSlot].stack; + Main.popupText[nextItemTextSlot].ValueToName(); + Main.popupText[nextItemTextSlot].stack = 1; + int index = nextItemTextSlot; + if (Main.popupText[index].coinValue >= 1000000) + { + if (Main.popupText[index].lifeTime < 300) + Main.popupText[index].lifeTime = 300; + Main.popupText[index].color = new Color(220, 220, 198); + } + else if (Main.popupText[index].coinValue >= 10000) + { + if (Main.popupText[index].lifeTime < 240) + Main.popupText[index].lifeTime = 240; + Main.popupText[index].color = new Color(224, 201, 92); + } + else if (Main.popupText[index].coinValue >= 100) + { + if (Main.popupText[index].lifeTime < 180) + Main.popupText[index].lifeTime = 180; + Main.popupText[index].color = new Color(181, 192, 193); + } + else if (Main.popupText[index].coinValue >= 1) + { + if (Main.popupText[index].lifeTime < 120) + Main.popupText[index].lifeTime = 120; + Main.popupText[index].color = new Color(246, 138, 96); + } + } + } + return nextItemTextSlot; + } + + private static int FindNextItemTextSlot() + { + int num1 = -1; + for (int index = 0; index < 20; ++index) + { + if (!Main.popupText[index].active) + { + num1 = index; + break; + } + } + if (num1 == -1) + { + double num2 = (double) Main.bottomWorld; + for (int index = 0; index < 20; ++index) + { + if (num2 > (double) Main.popupText[index].position.Y) + { + num1 = index; + num2 = (double) Main.popupText[index].position.Y; + } + } + } + return num1; + } + + private static string ValueToName(int coinValue) + { + int num1 = 0; + int num2 = 0; + int num3 = 0; + int num4 = 0; + int num5 = coinValue; + while (num5 > 0) + { + if (num5 >= 1000000) + { + num5 -= 1000000; + ++num1; + } + else if (num5 >= 10000) + { + num5 -= 10000; + ++num2; + } + else if (num5 >= 100) + { + num5 -= 100; + ++num3; + } + else if (num5 >= 1) + { + --num5; + ++num4; + } + } + string str = ""; + if (num1 > 0) + str = str + (object) num1 + string.Format(" {0} ", (object) Language.GetTextValue("Currency.Platinum")); + if (num2 > 0) + str = str + (object) num2 + string.Format(" {0} ", (object) Language.GetTextValue("Currency.Gold")); + if (num3 > 0) + str = str + (object) num3 + string.Format(" {0} ", (object) Language.GetTextValue("Currency.Silver")); + if (num4 > 0) + str = str + (object) num4 + string.Format(" {0} ", (object) Language.GetTextValue("Currency.Copper")); + if (str.Length > 1) + str = str.Substring(0, str.Length - 1); + return str; + } + + private void ValueToName() + { + int num1 = 0; + int num2 = 0; + int num3 = 0; + int num4 = 0; + int coinValue = this.coinValue; + while (coinValue > 0) + { + if (coinValue >= 1000000) + { + coinValue -= 1000000; + ++num1; + } + else if (coinValue >= 10000) + { + coinValue -= 10000; + ++num2; + } + else if (coinValue >= 100) + { + coinValue -= 100; + ++num3; + } + else if (coinValue >= 1) + { + --coinValue; + ++num4; + } + } + this.name = ""; + if (num1 > 0) + this.name = this.name + (object) num1 + string.Format(" {0} ", (object) Language.GetTextValue("Currency.Platinum")); + if (num2 > 0) + this.name = this.name + (object) num2 + string.Format(" {0} ", (object) Language.GetTextValue("Currency.Gold")); + if (num3 > 0) + this.name = this.name + (object) num3 + string.Format(" {0} ", (object) Language.GetTextValue("Currency.Silver")); + if (num4 > 0) + this.name = this.name + (object) num4 + string.Format(" {0} ", (object) Language.GetTextValue("Currency.Copper")); + if (this.name.Length <= 1) + return; + this.name = this.name.Substring(0, this.name.Length - 1); + } + + public void Update(int whoAmI) + { + if (!this.active) + return; + float targetScale = PopupText.TargetScale; + this.alpha += (float) this.alphaDir * 0.01f; + if ((double) this.alpha <= 0.7) + { + this.alpha = 0.7f; + this.alphaDir = 1; + } + if ((double) this.alpha >= 1.0) + { + this.alpha = 1f; + this.alphaDir = -1; + } + if (this.expert) + this.color = new Color((int) (byte) Main.DiscoR, (int) (byte) Main.DiscoG, (int) (byte) Main.DiscoB, (int) Main.mouseTextColor); + else if (this.master) + this.color = new Color((int) byte.MaxValue, (int) (byte) ((double) Main.masterColor * 200.0), 0, (int) Main.mouseTextColor); + bool flag = false; + string str1 = this.name; + if (this.stack > 1) + str1 = str1 + " (" + (object) this.stack + ")"; + Vector2 vector2_1 = FontAssets.MouseText.Value.MeasureString(str1) * this.scale; + vector2_1.Y *= 0.8f; + Rectangle rectangle1 = new Rectangle((int) ((double) this.position.X - (double) vector2_1.X / 2.0), (int) ((double) this.position.Y - (double) vector2_1.Y / 2.0), (int) vector2_1.X, (int) vector2_1.Y); + for (int index = 0; index < 20; ++index) + { + if (Main.popupText[index].active && index != whoAmI) + { + string str2 = Main.popupText[index].name; + if (Main.popupText[index].stack > 1) + str2 = str2 + " (" + (object) Main.popupText[index].stack + ")"; + Vector2 vector2_2 = FontAssets.MouseText.Value.MeasureString(str2) * Main.popupText[index].scale; + vector2_2.Y *= 0.8f; + Rectangle rectangle2 = new Rectangle((int) ((double) Main.popupText[index].position.X - (double) vector2_2.X / 2.0), (int) ((double) Main.popupText[index].position.Y - (double) vector2_2.Y / 2.0), (int) vector2_2.X, (int) vector2_2.Y); + if (rectangle1.Intersects(rectangle2) && ((double) this.position.Y < (double) Main.popupText[index].position.Y || (double) this.position.Y == (double) Main.popupText[index].position.Y && whoAmI < index)) + { + flag = true; + int num = PopupText.numActive; + if (num > 3) + num = 3; + Main.popupText[index].lifeTime = PopupText.activeTime + 15 * num; + this.lifeTime = PopupText.activeTime + 15 * num; + } + } + } + if (!flag) + { + this.velocity.Y *= 0.86f; + if ((double) this.scale == (double) targetScale) + this.velocity.Y *= 0.4f; + } + else if ((double) this.velocity.Y > -6.0) + this.velocity.Y -= 0.2f; + else + this.velocity.Y *= 0.86f; + this.velocity.X *= 0.93f; + this.position += this.velocity; + --this.lifeTime; + if (this.lifeTime <= 0) + { + this.scale -= 0.03f * targetScale; + if ((double) this.scale < 0.1 * (double) targetScale) + { + this.active = false; + if (PopupText.sonarText == whoAmI) + PopupText.sonarText = -1; + } + this.lifeTime = 0; + } + else + { + if ((double) this.scale < (double) targetScale) + this.scale += 0.1f * targetScale; + if ((double) this.scale <= (double) targetScale) + return; + this.scale = targetScale; + } + } + + public static void UpdateItemText() + { + int num = 0; + for (int whoAmI = 0; whoAmI < 20; ++whoAmI) + { + if (Main.popupText[whoAmI].active) + { + ++num; + Main.popupText[whoAmI].Update(whoAmI); + } + } + PopupText.numActive = num; + } + } +} diff --git a/PopupTextContext.cs b/PopupTextContext.cs new file mode 100644 index 0000000..bad2f12 --- /dev/null +++ b/PopupTextContext.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.PopupTextContext +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria +{ + public enum PopupTextContext + { + RegularItemPickup, + ItemPickupToVoidContainer, + SonarAlert, + ItemReforge, + ItemCraft, + } +} diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..f5baf22 --- /dev/null +++ b/Program.cs @@ -0,0 +1,195 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Program +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using ReLogic.IO; +using ReLogic.OS; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading; +using System.Windows.Forms; +using Terraria.Initializers; +using Terraria.Localization; +using Terraria.Social; +using Terraria.Utilities; + +namespace Terraria +{ + public static class Program + { + public const bool IsServer = false; + public const bool IsXna = true; + public const bool IsFna = false; + public const bool IsDebug = false; + public static Dictionary LaunchParameters = new Dictionary(); + private static int ThingsToLoad; + private static int ThingsLoaded; + public static bool LoadedEverything; + public static IntPtr JitForcedMethodCache; + + public static float LoadedPercentage => Program.ThingsToLoad == 0 ? 1f : (float) Program.ThingsLoaded / (float) Program.ThingsToLoad; + + public static void StartForceLoad() + { + if (!Main.SkipAssemblyLoad) + new Thread(new ParameterizedThreadStart(Program.ForceLoadThread)) + { + IsBackground = true + }.Start(); + else + Program.LoadedEverything = true; + } + + public static void ForceLoadThread(object threadContext) + { + Program.ForceLoadAssembly(Assembly.GetExecutingAssembly(), true); + Program.LoadedEverything = true; + } + + private static void ForceJITOnAssembly(Assembly assembly) + { + foreach (System.Type type in assembly.GetTypes()) + { + foreach (MethodInfo method in type.GetMethods(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic)) + { + if (!method.IsAbstract && !method.ContainsGenericParameters && method.GetMethodBody() != null) + RuntimeHelpers.PrepareMethod(method.MethodHandle); + } + ++Program.ThingsLoaded; + } + } + + private static void ForceStaticInitializers(Assembly assembly) + { + foreach (System.Type type in assembly.GetTypes()) + { + if (!type.IsGenericType) + RuntimeHelpers.RunClassConstructor(type.TypeHandle); + } + } + + private static void ForceLoadAssembly(Assembly assembly, bool initializeStaticMembers) + { + Program.ThingsToLoad = assembly.GetTypes().Length; + Program.ForceJITOnAssembly(assembly); + if (!initializeStaticMembers) + return; + Program.ForceStaticInitializers(assembly); + } + + private static void ForceLoadAssembly(string name, bool initializeStaticMembers) + { + Assembly assembly = (Assembly) null; + Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); + for (int index = 0; index < assemblies.Length; ++index) + { + if (assemblies[index].GetName().Name.Equals(name)) + { + assembly = assemblies[index]; + break; + } + } + if (assembly == (Assembly) null) + assembly = Assembly.Load(name); + Program.ForceLoadAssembly(assembly, initializeStaticMembers); + } + + private static void SetupLogging() + { + if (Program.LaunchParameters.ContainsKey("-logfile")) + { + string launchParameter = Program.LaunchParameters["-logfile"]; + ConsoleOutputMirror.ToFile(launchParameter == null || launchParameter.Trim() == "" ? Path.Combine(Main.SavePath, "Logs", string.Format("Log_{0:yyyyMMddHHmmssfff}.log", (object) DateTime.Now)) : Path.Combine(launchParameter, string.Format("Log_{0:yyyyMMddHHmmssfff}.log", (object) DateTime.Now))); + } + CrashWatcher.Inititialize(); + CrashWatcher.DumpOnException = Program.LaunchParameters.ContainsKey("-minidump"); + CrashWatcher.LogAllExceptions = Program.LaunchParameters.ContainsKey("-logerrors"); + if (!Program.LaunchParameters.ContainsKey("-fulldump")) + return; + Console.WriteLine("Full Dump logs enabled."); + CrashWatcher.EnableCrashDumps(CrashDump.Options.WithFullMemory); + } + + private static void InitializeConsoleOutput() + { + if (Debugger.IsAttached) + return; + try + { + Console.OutputEncoding = Encoding.UTF8; + if (Platform.IsWindows) + Console.InputEncoding = Encoding.Unicode; + else + Console.InputEncoding = Encoding.UTF8; + } + catch + { + } + } + + public static void LaunchGame(string[] args, bool monoArgs = false) + { + Thread.CurrentThread.Name = "Main Thread"; + if (monoArgs) + args = Utils.ConvertMonoArgsToDotNet(args); + if (Platform.IsOSX) + Main.OnEngineLoad += (Action) (() => Main.instance.IsMouseVisible = false); + Program.LaunchParameters = Utils.ParseArguements(args); + ThreadPool.SetMinThreads(8, 8); + LanguageManager.Instance.SetLanguage(GameCulture.DefaultCulture); + Program.InitializeConsoleOutput(); + Program.SetupLogging(); + Platform.Get().SetQuickEditEnabled(false); + using (Main game = new Main()) + { + try + { + Lang.InitializeLegacyLocalization(); + SocialAPI.Initialize(); + LaunchInitializer.LoadParameters(game); + Main.OnEnginePreload += new Action(Program.StartForceLoad); + game.Run(); + } + catch (Exception ex) + { + Program.DisplayException(ex); + } + } + } + + private static void DisplayException(Exception e) + { + try + { + string text = e.ToString(); + if (WorldGen.gen) + { + try + { + text = string.Format("Creating world - Seed: {0} Width: {1}, Height: {2}, Evil: {3}, IsExpert: {4}\n{5}", (object) Main.ActiveWorldFileData.Seed, (object) Main.maxTilesX, (object) Main.maxTilesY, (object) WorldGen.WorldGenParam_Evil, (object) Main.expertMode, (object) text); + } + catch + { + } + } + using (StreamWriter streamWriter = new StreamWriter("client-crashlog.txt", true)) + { + streamWriter.WriteLine((object) DateTime.Now); + streamWriter.WriteLine(text); + streamWriter.WriteLine(""); + } + int num = (int) MessageBox.Show(text, "Terraria: Error"); + } + catch + { + } + } + } +} diff --git a/Projectile.cs b/Projectile.cs new file mode 100644 index 0000000..8b8d1e7 --- /dev/null +++ b/Projectile.cs @@ -0,0 +1,29822 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Projectile +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using ReLogic.Utilities; +using System; +using System.Collections.Generic; +using Terraria.Audio; +using Terraria.Chat; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.GameContent; +using Terraria.GameContent.Achievements; +using Terraria.GameContent.Creative; +using Terraria.GameContent.Drawing; +using Terraria.GameContent.Events; +using Terraria.GameContent.Golf; +using Terraria.Graphics; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.Localization; +using Terraria.Physics; +using Terraria.WorldBuilding; + +namespace Terraria +{ + public class Projectile : Entity + { + public static uint[][] perIDStaticNPCImmunity = new uint[950][]; + public const int SentryLifeTime = 7200; + public const int ArrowLifeTime = 1200; + public float ownerHitCheckDistance = 1000f; + public bool arrow; + public int numHits; + public bool bobber; + public bool netImportant; + public bool noDropItem; + public static int maxAI = 2; + public bool counterweight; + public float scale = 1f; + public float rotation; + public int type; + public int alpha; + public bool sentry; + public short glowMask; + public int owner = (int) byte.MaxValue; + public float[] ai = new float[Projectile.maxAI]; + public float[] localAI = new float[Projectile.maxAI]; + public float gfxOffY; + public float stepSpeed = 1f; + public int aiStyle; + public int timeLeft; + public int soundDelay; + public int damage; + public int originalDamage; + public int spriteDirection = 1; + public bool hostile; + public float knockBack; + public bool friendly; + public int penetrate = 1; + private int[] localNPCImmunity = new int[200]; + private bool usesLocalNPCImmunity; + private bool usesIDStaticNPCImmunity; + public int maxPenetrate = 1; + public int identity; + public float light; + public bool netUpdate; + public bool netUpdate2; + public int netSpam; + public Vector2[] oldPos = new Vector2[10]; + public float[] oldRot = new float[10]; + public int[] oldSpriteDirection = new int[10]; + public bool minion; + public float minionSlots; + public int minionPos; + public int restrikeDelay; + public bool tileCollide; + public int extraUpdates; + public int numUpdates; + public bool ignoreWater; + public bool hide; + public bool ownerHitCheck; + public int[] playerImmune = new int[(int) byte.MaxValue]; + public string miscText = ""; + public bool melee; + public bool ranged; + public bool magic; + public bool coldDamage; + public bool noEnchantments; + public bool noEnchantmentVisuals; + public bool trap; + public bool npcProj; + public bool originatedFromActivableTile; + public int frameCounter; + public int frame; + public bool manualDirectionChange; + public int projUUID = -1; + public bool decidesManualFallThrough; + public bool shouldFallThrough; + public int localNPCHitCooldown = -2; + public int idStaticNPCHitCooldown = -1; + private static Conditions.IsSolid _cachedConditions_solid = new Conditions.IsSolid(); + private static Conditions.NotNull _cachedConditions_notNull = new Conditions.NotNull(); + private List _whipPointsForCollision = new List(); + private static Microsoft.Xna.Framework.Rectangle _lanceHitboxBounds = new Microsoft.Xna.Framework.Rectangle(0, 0, 300, 300); + private static List> _medusaHeadTargetList = new List>(); + private static Projectile.NPCDistanceByIndexComparator _medusaTargetComparer = new Projectile.NPCDistanceByIndexComparator(); + private static List _ai164_blacklistedTargets = new List(); + private static List _ai158_blacklistedTargets = new List(); + private static List _ai156_blacklistedTargets = new List(); + private static float[] _CompanionCubeScreamCooldown = new float[(int) byte.MaxValue]; + + public string Name => Lang.GetProjectileName(this.type).Value; + + public static void InitializeStaticThings() + { + Projectile.perIDStaticNPCImmunity = new uint[950][]; + for (int index = 0; index < Projectile.perIDStaticNPCImmunity.Length; ++index) + Projectile.perIDStaticNPCImmunity[index] = new uint[200]; + WorldGen.Hooks.OnWorldLoad += new Action(Projectile.ResetImmunity); + } + + public static void ResetImmunity() + { + for (int index1 = 0; index1 < 950; ++index1) + { + for (int index2 = 0; index2 < 200; ++index2) + Projectile.perIDStaticNPCImmunity[index1][index2] = 0U; + } + } + + public static bool IsNPCIndexImmuneToProjectileType(int projectileType, int npcIndex) => Projectile.perIDStaticNPCImmunity[projectileType][npcIndex] <= Main.GameUpdateCount; + + public bool WipableTurret => this.owner == Main.myPlayer && this.sentry && !this.TurretShouldPersist(); + + public bool TurretShouldPersist() + { + switch (this.type) + { + case 663: + case 665: + case 667: + case 677: + case 678: + case 679: + case 688: + case 689: + case 690: + case 691: + case 692: + case 693: + return DD2Event.Ongoing; + default: + return false; + } + } + + public float Opacity + { + get => (float) (1.0 - (double) this.alpha / (double) byte.MaxValue); + set => this.alpha = (int) MathHelper.Clamp((float) ((1.0 - (double) value) * (double) byte.MaxValue), 0.0f, (float) byte.MaxValue); + } + + public int MaxUpdates + { + get => this.extraUpdates + 1; + set => this.extraUpdates = value - 1; + } + + public NPC OwnerMinionAttackTargetNPC => Main.player[this.owner].MinionAttackTargetNPC < 0 ? (NPC) null : Main.npc[Main.player[this.owner].MinionAttackTargetNPC]; + + public void SetDefaults(int Type) + { + this.ownerHitCheckDistance = 1000f; + this.counterweight = false; + this.sentry = false; + this.arrow = false; + this.bobber = false; + this.numHits = 0; + this.netImportant = false; + this.manualDirectionChange = false; + this.decidesManualFallThrough = false; + this.shouldFallThrough = false; + this.localNPCHitCooldown = -2; + this.idStaticNPCHitCooldown = -1; + this.usesLocalNPCImmunity = false; + this.usesIDStaticNPCImmunity = false; + int newSize = 10; + if (Type >= 0) + newSize = ProjectileID.Sets.TrailCacheLength[Type]; + if (newSize != this.oldPos.Length) + { + Array.Resize(ref this.oldPos, newSize); + Array.Resize(ref this.oldRot, newSize); + Array.Resize(ref this.oldSpriteDirection, newSize); + } + for (int index = 0; index < this.oldPos.Length; ++index) + { + this.oldPos[index].X = 0.0f; + this.oldPos[index].Y = 0.0f; + this.oldRot[index] = 0.0f; + this.oldSpriteDirection[index] = 0; + } + for (int index = 0; index < Projectile.maxAI; ++index) + { + this.ai[index] = 0.0f; + this.localAI[index] = 0.0f; + } + for (int index = 0; index < (int) byte.MaxValue; ++index) + this.playerImmune[index] = 0; + this.ResetLocalNPCHitImmunity(); + this.noDropItem = false; + this.minion = false; + this.minionSlots = 0.0f; + this.soundDelay = 0; + this.spriteDirection = 1; + this.melee = false; + this.ranged = false; + this.magic = false; + this.ownerHitCheck = false; + this.hide = false; + this.lavaWet = false; + this.wetCount = (byte) 0; + this.wet = false; + this.ignoreWater = false; + this.hostile = false; + this.netUpdate = false; + this.netUpdate2 = false; + this.netSpam = 0; + this.numUpdates = 0; + this.extraUpdates = 0; + this.identity = 0; + this.restrikeDelay = 0; + this.light = 0.0f; + this.penetrate = 1; + this.tileCollide = true; + this.position = Vector2.Zero; + this.velocity = Vector2.Zero; + this.aiStyle = 0; + this.alpha = 0; + this.glowMask = (short) -1; + this.type = Type; + this.active = true; + this.rotation = 0.0f; + this.scale = 1f; + this.owner = (int) byte.MaxValue; + this.timeLeft = 3600; + this.friendly = false; + this.damage = 0; + this.originalDamage = 0; + this.knockBack = 0.0f; + this.miscText = ""; + this.coldDamage = false; + this.noEnchantments = false; + this.noEnchantmentVisuals = false; + this.trap = false; + this.npcProj = false; + this.originatedFromActivableTile = false; + this.projUUID = -1; + this.frame = 0; + this.frameCounter = 0; + if (this.type == 1) + { + this.arrow = true; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.ranged = true; + this.timeLeft = 1200; + } + else if (this.type == 2) + { + this.arrow = true; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.light = 1f; + this.ranged = true; + this.timeLeft = 1200; + } + else if (this.type == 3) + { + this.width = 22; + this.height = 22; + this.aiStyle = 2; + this.friendly = true; + this.penetrate = 4; + this.ranged = true; + } + else if (this.type == 4) + { + this.arrow = true; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.light = 0.35f; + this.penetrate = 5; + this.ranged = true; + this.timeLeft = 1200; + } + else if (this.type == 5) + { + this.arrow = true; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.light = 0.4f; + this.penetrate = -1; + this.alpha = 100; + this.ignoreWater = true; + this.ranged = true; + this.extraUpdates = 1; + this.timeLeft = 120; + } + else if (this.type == 6) + { + this.width = 22; + this.height = 22; + this.aiStyle = 3; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.light = 0.4f; + } + else if (this.type == 7 || this.type == 8) + { + this.width = 28; + this.height = 28; + this.aiStyle = 4; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.magic = true; + } + else if (this.type == 9) + { + this.width = 24; + this.height = 24; + this.aiStyle = 5; + this.friendly = true; + this.penetrate = 2; + this.alpha = 50; + this.scale = 0.8f; + this.tileCollide = false; + this.melee = true; + } + else if (this.type == 10) + { + this.width = 64; + this.height = 64; + this.aiStyle = 6; + this.friendly = true; + this.tileCollide = false; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + } + else if (this.type == 11) + { + this.width = 48; + this.height = 48; + this.aiStyle = 6; + this.friendly = true; + this.tileCollide = false; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + } + else if (this.type == 12) + { + this.width = 18; + this.height = 18; + this.aiStyle = 5; + this.friendly = true; + this.penetrate = -1; + this.alpha = 50; + this.light = 1f; + } + else if (this.type == 13) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 7; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft *= 10; + } + else if (this.type == 14) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 1; + this.light = 0.5f; + this.alpha = (int) byte.MaxValue; + this.scale = 1.2f; + this.timeLeft = 600; + this.ranged = true; + this.extraUpdates = 1; + } + else if (this.type == 15) + { + this.width = 16; + this.height = 16; + this.aiStyle = 8; + this.friendly = true; + this.light = 0.8f; + this.alpha = 100; + this.magic = true; + } + else if (this.type == 16) + { + this.width = 32; + this.height = 32; + this.aiStyle = 9; + this.friendly = true; + this.light = 0.8f; + this.alpha = 100; + this.magic = true; + } + else if (this.type == 17) + { + this.width = 10; + this.height = 10; + this.aiStyle = 10; + this.friendly = true; + this.ignoreWater = true; + } + else if (this.type == 18) + { + this.netImportant = true; + this.width = 32; + this.height = 32; + this.aiStyle = 11; + this.friendly = true; + this.light = 0.9f; + this.alpha = 150; + this.tileCollide = false; + this.penetrate = -1; + this.timeLeft *= 5; + this.ignoreWater = true; + this.scale = 0.8f; + } + else if (this.type == 19) + { + this.width = 22; + this.height = 22; + this.aiStyle = 3; + this.friendly = true; + this.penetrate = -1; + this.light = 1f; + this.melee = true; + } + else if (this.type == 20) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 3; + this.light = 0.75f; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 2; + this.scale = 1.4f; + this.timeLeft = 600; + this.magic = true; + } + else if (this.type == 21) + { + this.width = 16; + this.height = 16; + this.aiStyle = 2; + this.scale = 1.2f; + this.friendly = true; + this.ranged = true; + } + else if (this.type == 22) + { + this.width = 18; + this.height = 18; + this.aiStyle = 12; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.extraUpdates = 2; + this.ignoreWater = true; + this.magic = true; + } + else if (this.type == 23) + { + this.width = 4; + this.height = 4; + this.aiStyle = 13; + this.friendly = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.ranged = true; + } + else if (this.type == 24) + { + this.width = 14; + this.height = 14; + this.aiStyle = 14; + this.friendly = true; + this.penetrate = 6; + this.ranged = true; + } + else if (this.type == 25) + { + this.netImportant = true; + this.width = 22; + this.height = 22; + this.aiStyle = 15; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.scale = 0.9f; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 10; + } + else if (this.type == 26) + { + this.netImportant = true; + this.width = 22; + this.height = 22; + this.aiStyle = 15; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.scale = 0.8f; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 10; + } + else if (this.type == 27) + { + this.width = 16; + this.height = 16; + this.aiStyle = 8; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.timeLeft /= 2; + this.penetrate = 10; + this.magic = true; + } + else if (this.type == 28) + { + this.width = 22; + this.height = 22; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + } + else if (this.type == 29) + { + this.width = 10; + this.height = 10; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + } + else if (this.type == 30) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.ranged = true; + } + else if (this.type == 31) + { + this.knockBack = 6f; + this.width = 10; + this.height = 10; + this.aiStyle = 10; + this.friendly = true; + this.hostile = true; + this.penetrate = -1; + } + else if (this.type == 32) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 7; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft *= 10; + } + else if (this.type == 33) + { + this.width = 38; + this.height = 38; + this.aiStyle = 3; + this.friendly = true; + this.scale = 0.9f; + this.penetrate = -1; + this.melee = true; + } + else if (this.type == 34) + { + this.width = 32; + this.height = 32; + this.aiStyle = 9; + this.friendly = true; + this.light = 0.8f; + this.penetrate = 2; + this.magic = true; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 12; + } + else if (this.type == 35) + { + this.netImportant = true; + this.width = 22; + this.height = 22; + this.aiStyle = 15; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.scale = 0.8f; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 10; + } + else if (this.type == 36) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 2; + this.light = 0.6f; + this.alpha = (int) byte.MaxValue; + this.scale = 1.4f; + this.timeLeft = 600; + this.ranged = true; + this.extraUpdates = 1; + } + else if (this.type == 37) + { + this.width = 22; + this.height = 22; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + } + else if (this.type == 38) + { + this.width = 14; + this.height = 14; + this.aiStyle = 0; + this.hostile = true; + this.penetrate = -1; + this.aiStyle = 1; + this.tileCollide = true; + } + else if (this.type == 39) + { + this.knockBack = 6f; + this.width = 10; + this.height = 10; + this.aiStyle = 10; + this.friendly = true; + this.hostile = true; + this.penetrate = -1; + } + else if (this.type == 40) + { + this.knockBack = 6f; + this.width = 10; + this.height = 10; + this.aiStyle = 10; + this.friendly = true; + this.hostile = true; + this.penetrate = -1; + } + else if (this.type == 41) + { + this.arrow = true; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = -1; + this.ranged = true; + this.light = 0.3f; + } + else if (this.type == 42) + { + this.knockBack = 8f; + this.width = 10; + this.height = 10; + this.aiStyle = 10; + this.ranged = true; + this.friendly = true; + this.extraUpdates = 1; + } + else if (this.type == 43) + { + this.knockBack = 12f; + this.width = 24; + this.height = 24; + this.aiStyle = 17; + this.penetrate = -1; + } + else if (this.type == 44) + { + this.width = 48; + this.height = 48; + this.alpha = 100; + this.light = 0.2f; + this.aiStyle = 18; + this.hostile = true; + this.penetrate = -1; + this.tileCollide = true; + this.scale = 0.9f; + } + else if (this.type == 45) + { + this.width = 48; + this.height = 48; + this.alpha = 100; + this.light = 0.2f; + this.aiStyle = 18; + this.friendly = true; + this.penetrate = 5; + this.tileCollide = true; + this.scale = 0.9f; + this.magic = true; + } + else if (this.type == 46) + { + this.width = 20; + this.height = 20; + this.aiStyle = 19; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1.1f; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 47) + { + this.width = 18; + this.height = 18; + this.aiStyle = 19; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1.1f; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 48) + { + this.width = 12; + this.height = 12; + this.aiStyle = 2; + this.friendly = true; + this.penetrate = 2; + this.ranged = true; + } + else if (this.type == 49) + { + this.width = 18; + this.height = 18; + this.aiStyle = 19; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1.2f; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 50) + { + this.netImportant = true; + this.width = 6; + this.height = 6; + this.aiStyle = 14; + this.penetrate = -1; + this.alpha = 75; + this.light = 1f; + this.timeLeft *= 5; + } + else if (this.type == 51) + { + this.width = 8; + this.height = 8; + this.aiStyle = 1; + this.ranged = true; + this.friendly = true; + } + else if (this.type == 52) + { + this.width = 22; + this.height = 22; + this.aiStyle = 3; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + } + else if (this.type == 53) + { + this.netImportant = true; + this.width = 6; + this.height = 6; + this.aiStyle = 14; + this.penetrate = -1; + this.alpha = 75; + this.light = 1f; + this.timeLeft *= 5; + this.tileCollide = false; + } + else if (this.type == 54) + { + this.width = 12; + this.height = 12; + this.aiStyle = 2; + this.friendly = true; + this.penetrate = 2; + this.ranged = true; + } + else if (this.type == 55) + { + this.width = 10; + this.height = 10; + this.aiStyle = 0; + this.hostile = true; + this.penetrate = -1; + this.aiStyle = 1; + this.tileCollide = true; + } + else if (this.type == 56) + { + this.knockBack = 6f; + this.width = 10; + this.height = 10; + this.aiStyle = 10; + this.friendly = true; + this.hostile = true; + this.penetrate = -1; + } + else if (this.type == 57) + { + this.width = 18; + this.height = 18; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 58) + { + this.width = 18; + this.height = 18; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.scale = 1.08f; + } + else if (this.type == 59) + { + this.width = 22; + this.height = 22; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.scale = 0.9f; + } + else if (this.type == 60) + { + this.width = 22; + this.height = 22; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.scale = 0.9f; + } + else if (this.type == 61) + { + this.width = 18; + this.height = 18; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.scale = 1.16f; + } + else if (this.type == 62) + { + this.width = 22; + this.height = 22; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.scale = 0.9f; + } + else if (this.type == 63) + { + this.netImportant = true; + this.width = 22; + this.height = 22; + this.aiStyle = 15; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 10; + } + else if (this.type == 64) + { + this.width = 18; + this.height = 18; + this.aiStyle = 19; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1.25f; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 65) + { + this.knockBack = 6f; + this.width = 10; + this.height = 10; + this.aiStyle = 10; + this.friendly = true; + this.ranged = true; + this.penetrate = -1; + this.extraUpdates = 1; + } + else if (this.type == 66) + { + this.width = 18; + this.height = 18; + this.aiStyle = 19; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1.27f; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 67) + { + this.knockBack = 6f; + this.width = 10; + this.height = 10; + this.aiStyle = 10; + this.friendly = true; + this.hostile = true; + this.penetrate = -1; + } + else if (this.type == 68) + { + this.knockBack = 6f; + this.width = 10; + this.height = 10; + this.aiStyle = 10; + this.friendly = true; + this.ranged = true; + this.penetrate = -1; + this.extraUpdates = 1; + } + else if (this.type == 69) + { + this.width = 14; + this.height = 14; + this.aiStyle = 2; + this.friendly = true; + this.penetrate = 1; + } + else if (this.type == 70) + { + this.width = 14; + this.height = 14; + this.aiStyle = 2; + this.friendly = true; + this.penetrate = 1; + } + else if (this.type == 621) + { + this.width = 14; + this.height = 14; + this.aiStyle = 2; + this.friendly = true; + this.penetrate = 1; + } + else if (this.type == 71) + { + this.knockBack = 6f; + this.width = 10; + this.height = 10; + this.aiStyle = 10; + this.friendly = true; + this.hostile = true; + this.penetrate = -1; + } + else if (this.type == 72) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 11; + this.friendly = true; + this.light = 0.9f; + this.tileCollide = false; + this.penetrate = -1; + this.timeLeft *= 5; + this.ignoreWater = true; + this.scale = 0.8f; + } + else if (this.type == 73 || this.type == 74) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 7; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft *= 10; + this.light = 0.4f; + } + else if (this.type == 75) + { + this.width = 22; + this.height = 22; + this.aiStyle = 16; + this.hostile = true; + this.penetrate = -1; + } + else if (this.type == 76 || this.type == 77 || this.type == 78) + { + if (this.type == 76) + { + this.width = 10; + this.height = 22; + } + else if (this.type == 77) + { + this.width = 18; + this.height = 24; + } + else + { + this.width = 22; + this.height = 24; + } + this.aiStyle = 21; + this.friendly = true; + this.alpha = 100; + this.light = 0.3f; + this.penetrate = -1; + this.timeLeft = 180; + this.magic = true; + } + else if (this.type == 79) + { + this.width = 32; + this.height = 32; + this.aiStyle = 9; + this.friendly = true; + this.light = 0.8f; + this.magic = true; + this.penetrate = 3; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 12; + } + else if (this.type == 80) + { + this.width = 16; + this.height = 16; + this.aiStyle = 22; + this.friendly = true; + this.magic = true; + this.tileCollide = false; + this.light = 0.5f; + this.coldDamage = true; + } + else if (this.type == 81) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.hostile = true; + } + else if (this.type == 82) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.hostile = true; + } + else if (this.type == 83) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.hostile = true; + this.penetrate = 3; + this.light = 0.75f; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 2; + this.scale = 1.7f; + this.timeLeft = 600; + this.magic = true; + } + else if (this.type == 84) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.hostile = true; + this.penetrate = 3; + this.light = 0.75f; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 2; + this.scale = 1.2f; + this.timeLeft = 600; + this.magic = true; + } + else if (this.type == 85) + { + this.width = 6; + this.height = 6; + this.aiStyle = 23; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.penetrate = 3; + this.extraUpdates = 2; + this.ranged = true; + } + else if (this.type == 86) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 11; + this.friendly = true; + this.light = 0.9f; + this.tileCollide = false; + this.penetrate = -1; + this.timeLeft *= 5; + this.ignoreWater = true; + this.scale = 0.8f; + } + else if (this.type == 87) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 11; + this.friendly = true; + this.light = 0.9f; + this.tileCollide = false; + this.penetrate = -1; + this.timeLeft *= 5; + this.ignoreWater = true; + this.scale = 0.8f; + } + else if (this.type == 88) + { + this.width = 6; + this.height = 6; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 3; + this.light = 0.75f; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 4; + this.scale = 1.4f; + this.timeLeft = 600; + this.magic = true; + } + else if (this.type == 89) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 1; + this.light = 0.5f; + this.alpha = (int) byte.MaxValue; + this.scale = 1.2f; + this.timeLeft = 600; + this.ranged = true; + this.extraUpdates = 1; + } + else if (this.type == 90) + { + this.width = 6; + this.height = 6; + this.aiStyle = 24; + this.friendly = true; + this.penetrate = 1; + this.light = 0.5f; + this.alpha = 50; + this.scale = 1.2f; + this.timeLeft = 600; + this.ranged = true; + this.tileCollide = false; + } + else if (this.type == 91) + { + this.arrow = true; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.ranged = true; + this.timeLeft = 1200; + } + else if (this.type == 92) + { + this.width = 24; + this.height = 24; + this.aiStyle = 5; + this.friendly = true; + this.penetrate = 1; + this.alpha = 50; + this.scale = 0.8f; + this.tileCollide = false; + this.ranged = true; + } + else if (this.type == 93) + { + this.light = 0.15f; + this.width = 12; + this.height = 12; + this.aiStyle = 2; + this.friendly = true; + this.penetrate = 2; + this.magic = true; + } + else if (this.type == 94) + { + this.ignoreWater = true; + this.width = 8; + this.height = 8; + this.aiStyle = 24; + this.friendly = true; + this.light = 0.5f; + this.alpha = 50; + this.scale = 1.2f; + this.timeLeft = 600; + this.magic = true; + this.tileCollide = true; + this.penetrate = 1; + } + else if (this.type == 95) + { + this.width = 16; + this.height = 16; + this.aiStyle = 8; + this.friendly = true; + this.light = 0.8f; + this.alpha = 100; + this.magic = true; + this.penetrate = 2; + } + else if (this.type == 96) + { + this.width = 16; + this.height = 16; + this.aiStyle = 8; + this.hostile = true; + this.light = 0.8f; + this.alpha = 100; + this.magic = true; + this.penetrate = -1; + this.scale = 0.9f; + this.scale = 1.3f; + } + else if (this.type == 97) + { + this.width = 18; + this.height = 18; + this.aiStyle = 19; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1.1f; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 98) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.hostile = true; + this.penetrate = -1; + this.trap = true; + } + else if (this.type == 99 || this.type == 727) + { + this.width = 31; + this.height = 31; + this.aiStyle = 25; + this.friendly = true; + this.hostile = true; + this.ranged = true; + this.penetrate = -1; + this.trap = true; + } + else if (this.type == 100) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.hostile = true; + this.penetrate = 3; + this.light = 0.75f; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 2; + this.scale = 1.8f; + this.timeLeft = 2700; + this.magic = true; + } + else if (this.type == 101) + { + this.width = 6; + this.height = 6; + this.aiStyle = 23; + this.hostile = true; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.extraUpdates = 3; + this.magic = true; + } + else if (this.type == 102) + { + this.width = 22; + this.height = 22; + this.aiStyle = 16; + this.hostile = true; + this.penetrate = -1; + this.ranged = true; + } + else if (this.type == 103) + { + this.arrow = true; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.light = 1f; + this.ranged = true; + this.timeLeft = 1200; + } + else if (this.type == 104) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 1; + this.light = 0.5f; + this.alpha = (int) byte.MaxValue; + this.scale = 1.2f; + this.timeLeft = 600; + this.ranged = true; + this.extraUpdates = 1; + } + else if (this.type == 105) + { + this.width = 18; + this.height = 18; + this.aiStyle = 19; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1.3f; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 106) + { + this.width = 32; + this.height = 32; + this.aiStyle = 3; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.light = 0.4f; + } + else if (this.type == 107) + { + this.width = 22; + this.height = 22; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.scale = 1.1f; + } + else if (this.type == 108) + { + this.width = 260; + this.height = 260; + this.aiStyle = 16; + this.friendly = true; + this.hostile = true; + this.penetrate = -1; + this.tileCollide = false; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 2; + this.trap = true; + } + else if (this.type == 109) + { + this.knockBack = 6f; + this.width = 10; + this.height = 10; + this.aiStyle = 10; + this.hostile = true; + this.scale = 0.9f; + this.penetrate = -1; + this.coldDamage = true; + this.ranged = true; + } + else if (this.type == 110) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.hostile = true; + this.penetrate = -1; + this.light = 0.5f; + this.alpha = (int) byte.MaxValue; + this.scale = 1.2f; + this.timeLeft = 600; + this.ranged = true; + this.extraUpdates = 1; + } + else if (this.type == 111) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 112) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 113) + { + this.width = 22; + this.height = 22; + this.aiStyle = 3; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.light = 0.4f; + this.coldDamage = true; + } + else if (this.type == 114) + { + this.width = 16; + this.height = 16; + this.aiStyle = 27; + this.magic = true; + this.penetrate = 3; + this.light = 0.5f; + this.alpha = (int) byte.MaxValue; + this.friendly = true; + } + else if (this.type == 115) + { + this.width = 16; + this.height = 16; + this.aiStyle = 27; + this.hostile = true; + this.magic = true; + this.penetrate = -1; + this.light = 0.5f; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 116) + { + this.width = 16; + this.height = 16; + this.aiStyle = 27; + this.melee = true; + this.penetrate = 1; + this.light = 0.5f; + this.alpha = (int) byte.MaxValue; + this.friendly = true; + } + else if (this.type == 117) + { + this.arrow = true; + this.extraUpdates = 2; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.ranged = true; + this.timeLeft = 1200; + } + else if (this.type == 118) + { + this.width = 10; + this.height = 10; + this.aiStyle = 28; + this.alpha = (int) byte.MaxValue; + this.melee = true; + this.penetrate = 1; + this.friendly = true; + this.coldDamage = true; + } + else if (this.type == 119) + { + this.width = 14; + this.height = 14; + this.aiStyle = 28; + this.alpha = (int) byte.MaxValue; + this.melee = true; + this.penetrate = 2; + this.friendly = true; + this.coldDamage = true; + } + else if (this.type == 120) + { + this.arrow = true; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.ranged = true; + this.coldDamage = true; + this.extraUpdates = 1; + this.timeLeft = 1200; + } + else if (this.type == 121) + { + this.width = 10; + this.height = 10; + this.aiStyle = 29; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.penetrate = 1; + this.friendly = true; + } + else if (this.type == 122) + { + this.width = 10; + this.height = 10; + this.aiStyle = 29; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.penetrate = 1; + this.friendly = true; + } + else if (this.type == 123) + { + this.width = 10; + this.height = 10; + this.aiStyle = 29; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.penetrate = 1; + this.friendly = true; + } + else if (this.type == 124) + { + this.width = 10; + this.height = 10; + this.aiStyle = 29; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.penetrate = 2; + this.friendly = true; + } + else if (this.type == 125) + { + this.width = 10; + this.height = 10; + this.aiStyle = 29; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.penetrate = 2; + this.friendly = true; + } + else if (this.type == 126) + { + this.width = 10; + this.height = 10; + this.aiStyle = 29; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.penetrate = 2; + this.friendly = true; + } + else if (this.type == (int) sbyte.MaxValue) + { + this.netImportant = true; + this.width = 22; + this.height = 22; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 128) + { + this.width = 14; + this.height = 14; + this.aiStyle = 28; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.friendly = false; + this.hostile = true; + this.coldDamage = true; + } + else if (this.type == 129) + { + this.width = 14; + this.height = 14; + this.aiStyle = 28; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.friendly = false; + this.hostile = true; + this.tileCollide = false; + } + else if (this.type == 130) + { + this.width = 22; + this.height = 22; + this.aiStyle = 19; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1.2f; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 131) + { + this.width = 22; + this.height = 22; + this.aiStyle = 30; + this.friendly = true; + this.penetrate = 1; + this.tileCollide = false; + this.melee = true; + this.light = 0.5f; + } + else if (this.type == 132) + { + this.width = 16; + this.height = 16; + this.aiStyle = 27; + this.melee = true; + this.penetrate = 3; + this.light = 0.5f; + this.alpha = (int) byte.MaxValue; + this.friendly = true; + } + else if (this.type == 133) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.ranged = true; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = -1; + } + else if (this.type == 134) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.ranged = true; + } + else if (this.type == 135) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.ranged = true; + } + else if (this.type == 136) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.ranged = true; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = -1; + } + else if (this.type == 137) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.ranged = true; + } + else if (this.type == 138) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.ranged = true; + } + else if (this.type == 139) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.ranged = true; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = -1; + } + else if (this.type == 140) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.ranged = true; + } + else if (this.type == 141) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.ranged = true; + } + else if (this.type == 142) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.ranged = true; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = -1; + } + else if (this.type == 143) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.ranged = true; + } + else if (this.type == 144) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.ranged = true; + } + else if (this.type == 145) + { + this.width = 6; + this.height = 6; + this.aiStyle = 31; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.extraUpdates = 2; + this.tileCollide = false; + this.ignoreWater = true; + } + else if (this.type == 146) + { + this.width = 6; + this.height = 6; + this.aiStyle = 31; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.extraUpdates = 2; + this.tileCollide = false; + this.ignoreWater = true; + } + else if (this.type == 147) + { + this.width = 6; + this.height = 6; + this.aiStyle = 31; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.extraUpdates = 2; + this.tileCollide = false; + this.ignoreWater = true; + } + else if (this.type == 148) + { + this.width = 6; + this.height = 6; + this.aiStyle = 31; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.extraUpdates = 2; + this.tileCollide = false; + this.ignoreWater = true; + } + else if (this.type == 149) + { + this.width = 6; + this.height = 6; + this.aiStyle = 31; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.extraUpdates = 2; + this.tileCollide = false; + this.ignoreWater = true; + } + else if (this.type == 150 || this.type == 151 || this.type == 152) + { + this.width = 28; + this.height = 28; + this.aiStyle = 4; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.magic = true; + } + else if (this.type == 153) + { + this.width = 18; + this.height = 18; + this.aiStyle = 19; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1.1f; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 154) + { + this.netImportant = true; + this.width = 22; + this.height = 22; + this.aiStyle = 15; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.scale = 0.8f; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 10; + } + else if (this.type == 155) + { + this.netImportant = true; + this.width = 44; + this.height = 44; + this.aiStyle = 32; + this.friendly = true; + } + else if (this.type == 156) + { + this.width = 16; + this.height = 16; + this.aiStyle = 27; + this.melee = true; + this.light = 0.5f; + this.alpha = (int) byte.MaxValue; + this.friendly = true; + } + else if (this.type == 157) + { + this.width = 32; + this.height = 32; + this.aiStyle = 27; + this.melee = true; + this.light = 0.5f; + this.alpha = (int) byte.MaxValue; + this.friendly = true; + this.scale = 1.2f; + } + else if (this.type == 158) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 1; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 600; + this.ranged = true; + this.extraUpdates = 1; + } + else if (this.type == 159) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 1; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 600; + this.ranged = true; + this.extraUpdates = 1; + } + else if (this.type == 160) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 1; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 600; + this.ranged = true; + this.extraUpdates = 1; + } + else if (this.type == 161) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 1; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 600; + this.ranged = true; + this.extraUpdates = 1; + } + else if (this.type == 162) + { + this.width = 16; + this.height = 16; + this.aiStyle = 2; + this.friendly = true; + this.penetrate = 4; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 163) + { + this.netImportant = true; + this.width = 6; + this.height = 6; + this.aiStyle = 33; + this.friendly = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 36000; + } + else if (this.type == 164) + { + this.width = 128; + this.height = 128; + this.aiStyle = 16; + this.friendly = true; + this.hostile = true; + this.penetrate = -1; + this.tileCollide = false; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 2; + } + else if (this.type == 165) + { + this.netImportant = true; + this.width = 12; + this.height = 12; + this.aiStyle = 7; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft *= 10; + } + else if (this.type == 166) + { + this.width = 14; + this.height = 14; + this.aiStyle = 2; + this.friendly = true; + this.ranged = true; + this.coldDamage = true; + } + else if (this.type == 167 || this.type == 168 || this.type == 169 || this.type == 170) + { + this.width = 14; + this.height = 14; + this.aiStyle = 34; + this.friendly = true; + this.ranged = true; + this.timeLeft = 45; + this.usesIDStaticNPCImmunity = true; + this.idStaticNPCHitCooldown = 3; + } + else if (this.type == 171 || this.type == 505 || this.type == 506) + { + this.width = 14; + this.height = 14; + this.aiStyle = 35; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft = 400; + } + else if (this.type == 172) + { + this.arrow = true; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.light = 1f; + this.ranged = true; + this.coldDamage = true; + this.timeLeft = 1200; + } + else if (this.type == 173) + { + this.width = 16; + this.height = 16; + this.aiStyle = 27; + this.melee = true; + this.penetrate = 1; + this.light = 0.2f; + this.alpha = (int) byte.MaxValue; + this.friendly = true; + } + else if (this.type == 174) + { + this.alpha = (int) byte.MaxValue; + this.width = 6; + this.height = 6; + this.aiStyle = 1; + this.hostile = true; + this.penetrate = -1; + this.coldDamage = true; + } + else if (this.type == 175) + { + this.width = 34; + this.height = 34; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 176) + { + this.alpha = (int) byte.MaxValue; + this.width = 6; + this.height = 6; + this.aiStyle = 1; + this.hostile = true; + this.penetrate = -1; + } + else if (this.type == 177) + { + this.width = 10; + this.height = 10; + this.aiStyle = 28; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.friendly = false; + this.hostile = true; + this.coldDamage = true; + } + else if (this.type == 178) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.timeLeft = 2; + } + else if (this.type == 179) + { + this.knockBack = 6f; + this.width = 10; + this.height = 10; + this.aiStyle = 10; + this.friendly = true; + this.hostile = true; + this.penetrate = -1; + } + else if (this.type == 180) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.hostile = true; + this.penetrate = -1; + this.light = 0.5f; + this.alpha = (int) byte.MaxValue; + this.scale = 1.2f; + this.timeLeft = 600; + this.extraUpdates = 1; + } + else if (this.type == 181) + { + this.width = 8; + this.height = 8; + this.aiStyle = 36; + this.friendly = true; + this.penetrate = 3; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 600; + this.extraUpdates = 3; + } + else if (this.type == 182) + { + this.light = 0.15f; + this.width = 30; + this.height = 30; + this.aiStyle = 3; + this.friendly = true; + this.penetrate = 10; + this.melee = true; + this.extraUpdates = 1; + } + else if (this.type == 183) + { + this.width = 14; + this.height = 22; + this.aiStyle = 14; + this.penetrate = 1; + this.timeLeft = 180; + this.ranged = true; + this.friendly = true; + } + else if (this.type == 184) + { + this.width = 6; + this.height = 6; + this.aiStyle = 1; + this.friendly = true; + this.hostile = true; + this.penetrate = -1; + this.trap = true; + } + else if (this.type == 185) + { + this.width = 14; + this.height = 14; + this.aiStyle = 14; + this.friendly = true; + this.hostile = true; + this.penetrate = -1; + this.timeLeft = 900; + this.trap = true; + } + else if (this.type == 186) + { + this.width = 10; + this.height = 14; + this.aiStyle = 37; + this.friendly = true; + this.tileCollide = false; + this.ignoreWater = true; + this.hostile = true; + this.penetrate = -1; + this.timeLeft = 300; + this.trap = true; + } + else if (this.type == 187) + { + this.width = 6; + this.height = 6; + this.aiStyle = 38; + this.alpha = (int) byte.MaxValue; + this.tileCollide = false; + this.ignoreWater = true; + this.timeLeft = 60; + this.trap = true; + } + else if (this.type == 188) + { + this.width = 6; + this.height = 6; + this.aiStyle = 23; + this.friendly = true; + this.hostile = true; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.extraUpdates = 2; + this.trap = true; + } + else if (this.type == 189) + { + this.width = 8; + this.height = 8; + this.aiStyle = 36; + this.friendly = true; + this.penetrate = 3; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 600; + this.magic = true; + this.extraUpdates = 3; + } + else if (this.type == 190) + { + this.width = 22; + this.height = 22; + this.aiStyle = 39; + this.friendly = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.ranged = true; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 14; + } + else if (this.type >= 191 && this.type <= 194) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 26; + this.penetrate = -1; + this.timeLeft *= 5; + this.minion = true; + this.minionSlots = 1f; + if (this.type == 192) + this.scale = 1.025f; + if (this.type == 193) + this.scale = 1.05f; + if (this.type == 194) + this.scale = 1.075f; + } + else if (this.type == 195) + { + this.tileCollide = false; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + } + else if (this.type == 196) + { + this.width = 16; + this.height = 16; + this.aiStyle = 14; + this.penetrate = -1; + this.scale = 0.8f; + } + else if (this.type == 197) + { + this.netImportant = true; + this.width = 42; + this.height = 42; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 198) + { + this.netImportant = true; + this.width = 26; + this.height = 26; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 199) + { + this.netImportant = true; + this.width = 28; + this.height = 28; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + this.ignoreWater = true; + } + else if (this.type == 200) + { + this.netImportant = true; + this.width = 28; + this.height = 28; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 201) + { + this.knockBack = 12f; + this.width = 24; + this.height = 24; + this.aiStyle = 17; + this.penetrate = -1; + } + else if (this.type == 202) + { + this.knockBack = 12f; + this.width = 24; + this.height = 24; + this.aiStyle = 17; + this.penetrate = -1; + } + else if (this.type == 203) + { + this.knockBack = 12f; + this.width = 24; + this.height = 24; + this.aiStyle = 17; + this.penetrate = -1; + } + else if (this.type == 204) + { + this.knockBack = 12f; + this.width = 24; + this.height = 24; + this.aiStyle = 17; + this.penetrate = -1; + } + else if (this.type == 205) + { + this.knockBack = 12f; + this.width = 24; + this.height = 24; + this.aiStyle = 17; + this.penetrate = -1; + } + else if (this.type == 206) + { + this.width = 14; + this.height = 14; + this.aiStyle = 40; + this.friendly = true; + this.penetrate = 1; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 600; + this.magic = true; + } + else if (this.type == 207) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 1; + this.light = 0.5f; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 2; + this.scale = 1.2f; + this.timeLeft = 600; + this.ranged = true; + } + else if (this.type == 208) + { + this.netImportant = true; + this.width = 18; + this.height = 36; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 209) + { + this.width = 12; + this.height = 32; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + this.light = 0.5f; + } + else if (this.type == 210) + { + this.netImportant = true; + this.width = 14; + this.height = 30; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 211) + { + this.netImportant = true; + this.width = 24; + this.height = 24; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + this.light = 1f; + this.ignoreWater = true; + } + else if (this.type == 212) + { + this.width = 18; + this.height = 18; + this.aiStyle = 19; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1.12f; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 213) + { + this.width = 22; + this.height = 22; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.scale = 0.92f; + } + else if (this.type == 214) + { + this.width = 18; + this.height = 18; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 215) + { + this.width = 18; + this.height = 18; + this.aiStyle = 19; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1.27f; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 216) + { + this.width = 22; + this.height = 22; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.scale = 0.93f; + } + else if (this.type == 217) + { + this.width = 18; + this.height = 18; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.scale = 1.12f; + } + else if (this.type == 218) + { + this.width = 18; + this.height = 18; + this.aiStyle = 19; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1.28f; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 219) + { + this.width = 22; + this.height = 22; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.scale = 0.95f; + } + else if (this.type == 220) + { + this.width = 18; + this.height = 18; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.scale = 1.2f; + } + else if (this.type == 221) + { + this.width = 20; + this.height = 20; + this.aiStyle = 41; + this.friendly = true; + this.tileCollide = false; + this.ignoreWater = true; + this.timeLeft = 120; + this.penetrate = -1; + this.scale = (float) (1.0 + (double) Main.rand.Next(30) * 0.00999999977648258); + this.extraUpdates = 2; + } + else if (this.type == 222) + { + this.width = 18; + this.height = 18; + this.aiStyle = 19; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1.3f; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 223) + { + this.width = 22; + this.height = 22; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.scale = 1f; + } + else if (this.type == 224) + { + this.width = 18; + this.height = 18; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.scale = 1.1f; + } + else if (this.type == 225) + { + this.arrow = true; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.ranged = true; + this.extraUpdates = 1; + this.timeLeft = 1200; + } + else if (this.type == 226) + { + this.netImportant = true; + this.width = 22; + this.height = 42; + this.aiStyle = 42; + this.friendly = true; + this.tileCollide = false; + this.penetrate = -1; + this.timeLeft *= 5; + this.light = 0.4f; + this.ignoreWater = true; + } + else if (this.type == 227) + { + this.netImportant = true; + this.tileCollide = false; + this.light = 0.1f; + this.width = 14; + this.height = 14; + this.aiStyle = 43; + this.friendly = true; + this.penetrate = 1; + this.timeLeft = 180; + } + else if (this.type == 228) + { + this.tileCollide = false; + this.width = 30; + this.height = 30; + this.aiStyle = 44; + this.friendly = true; + this.melee = true; + this.scale = 1.1f; + this.penetrate = -1; + this.noEnchantmentVisuals = true; + } + else if (this.type == 229) + { + this.width = 30; + this.height = 30; + this.aiStyle = 44; + this.friendly = true; + this.melee = true; + this.penetrate = -1; + this.light = 0.2f; + this.noEnchantmentVisuals = true; + } + else if (this.type >= 230 && this.type <= 235) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 7; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft *= 10; + } + else if (this.type == 236) + { + this.netImportant = true; + this.width = 34; + this.height = 34; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 237) + { + this.netImportant = true; + this.width = 28; + this.height = 28; + this.aiStyle = 45; + this.penetrate = -1; + } + else if (this.type == 238) + { + this.tileCollide = false; + this.ignoreWater = true; + this.width = 54; + this.height = 28; + this.aiStyle = 45; + this.penetrate = -1; + } + else if (this.type == 239) + { + this.ignoreWater = true; + this.width = 4; + this.height = 40; + this.aiStyle = 45; + this.friendly = true; + this.penetrate = -1; + this.timeLeft = 300; + this.scale = 1.1f; + this.magic = true; + this.extraUpdates = 1; + } + else if (this.type == 240) + { + this.width = 16; + this.height = 16; + this.aiStyle = 2; + this.hostile = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 241) + { + this.knockBack = 6f; + this.width = 10; + this.height = 10; + this.aiStyle = 10; + this.friendly = true; + this.hostile = true; + this.penetrate = -1; + } + else if (this.type == 242) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 1; + this.light = 0.5f; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 7; + this.scale = 1.18f; + this.timeLeft = 600; + this.ranged = true; + this.ignoreWater = true; + } + else if (this.type == 243) + { + this.width = 28; + this.height = 28; + this.aiStyle = 45; + this.penetrate = -1; + } + else if (this.type == 244) + { + this.tileCollide = false; + this.ignoreWater = true; + this.width = 54; + this.height = 28; + this.aiStyle = 45; + this.penetrate = -1; + } + else if (this.type == 245) + { + this.ignoreWater = true; + this.width = 4; + this.height = 40; + this.aiStyle = 45; + this.friendly = true; + this.penetrate = 2; + this.timeLeft = 300; + this.scale = 1.1f; + this.magic = true; + this.extraUpdates = 1; + } + else if (this.type == 246) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.ranged = true; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 1; + } + else if (this.type == 247) + { + this.netImportant = true; + this.width = 34; + this.height = 34; + this.aiStyle = 15; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 10; + } + else if (this.type == 248) + { + this.width = 18; + this.height = 18; + this.aiStyle = 1; + this.friendly = true; + this.melee = true; + } + else if (this.type == 249) + { + this.width = 12; + this.height = 12; + this.aiStyle = 2; + this.friendly = true; + this.ranged = true; + } + else if (this.type == 250) + { + this.width = 12; + this.height = 12; + this.aiStyle = 46; + this.penetrate = -1; + this.magic = true; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.scale = 1.25f; + } + else if (this.type == 251) + { + this.width = 14; + this.height = 14; + this.aiStyle = 46; + this.friendly = true; + this.penetrate = -1; + this.magic = true; + this.alpha = (int) byte.MaxValue; + this.light = 0.3f; + this.tileCollide = false; + this.ignoreWater = true; + this.scale = 1.25f; + } + else if (this.type == 252) + { + this.width = 18; + this.height = 18; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.scale = 1.1f; + } + else if (this.type == 253) + { + this.width = 16; + this.height = 16; + this.aiStyle = 8; + this.friendly = true; + this.light = 0.8f; + this.alpha = 100; + this.magic = true; + this.coldDamage = true; + } + else if (this.type == 254) + { + this.width = 38; + this.height = 38; + this.aiStyle = 47; + this.magic = true; + this.timeLeft = 660; + this.light = 0.5f; + } + else if (this.type == (int) byte.MaxValue) + { + this.width = 8; + this.height = 8; + this.aiStyle = 48; + this.friendly = true; + this.magic = true; + this.extraUpdates = 100; + this.timeLeft = 100; + } + else if (this.type == 256) + { + this.netImportant = true; + this.tileCollide = false; + this.width = 6; + this.height = 6; + this.aiStyle = 7; + this.friendly = true; + this.penetrate = -1; + this.scale = 1f; + this.timeLeft *= 10; + } + else if (this.type == 257) + { + this.ignoreWater = true; + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.hostile = true; + this.penetrate = -1; + this.light = 0.75f; + this.alpha = (int) byte.MaxValue; + this.scale = 1.2f; + this.timeLeft = 600; + this.magic = true; + this.coldDamage = true; + this.extraUpdates = 1; + } + else if (this.type == 258) + { + this.width = 16; + this.height = 16; + this.aiStyle = 8; + this.hostile = true; + this.penetrate = -1; + this.alpha = 100; + this.timeLeft = 300; + } + else if (this.type == 259) + { + this.ignoreWater = true; + this.tileCollide = false; + this.width = 8; + this.height = 8; + this.aiStyle = 1; + this.hostile = true; + this.penetrate = -1; + this.light = 0.3f; + this.scale = 1.1f; + this.magic = true; + this.extraUpdates = 1; + } + else if (this.type == 260) + { + this.width = 8; + this.height = 8; + this.aiStyle = 48; + this.friendly = true; + this.magic = true; + this.extraUpdates = 100; + this.timeLeft = 200; + this.penetrate = 1; + } + else if (this.type == 261) + { + this.width = 32; + this.height = 34; + this.aiStyle = 14; + this.friendly = true; + this.penetrate = 6; + this.magic = true; + this.ignoreWater = true; + this.extraUpdates = 1; + } + else if (this.type == 262) + { + this.width = 30; + this.height = 30; + this.aiStyle = 13; + this.friendly = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.melee = true; + this.extraUpdates = 1; + } + else if (this.type == 263) + { + this.width = 34; + this.height = 34; + this.alpha = 100; + this.light = 0.5f; + this.aiStyle = 18; + this.friendly = true; + this.penetrate = 5; + this.tileCollide = true; + this.scale = 1f; + this.melee = true; + this.timeLeft = 180; + this.coldDamage = true; + } + else if (this.type == 264) + { + this.ignoreWater = true; + this.width = 4; + this.height = 40; + this.aiStyle = 45; + this.hostile = true; + this.penetrate = -1; + this.timeLeft = 120; + this.scale = 1.1f; + this.extraUpdates = 1; + } + else if (this.type == 265) + { + this.width = 12; + this.height = 12; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.friendly = true; + this.magic = true; + this.penetrate = 3; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 6; + this.timeLeft = 30; + } + else if (this.type == 266) + { + this.netImportant = true; + this.alpha = 75; + this.width = 24; + this.height = 16; + this.aiStyle = 26; + this.penetrate = -1; + this.timeLeft *= 5; + this.minion = true; + this.minionSlots = 1f; + this.usesIDStaticNPCImmunity = true; + this.idStaticNPCHitCooldown = 12; + } + else if (this.type == 267) + { + this.alpha = (int) byte.MaxValue; + this.width = 14; + this.height = 14; + this.aiStyle = 1; + this.friendly = true; + this.ranged = true; + } + else if (this.type == 268) + { + this.netImportant = true; + this.width = 18; + this.height = 32; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 269) + { + this.netImportant = true; + this.width = 20; + this.height = 26; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 270) + { + this.width = 26; + this.height = 26; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.hostile = true; + this.penetrate = 3; + } + else if (this.type == 271) + { + this.width = 20; + this.height = 20; + this.aiStyle = 13; + this.friendly = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.melee = true; + this.scale = 1.2f; + } + else if (this.type == 272) + { + this.width = 32; + this.height = 32; + this.aiStyle = 3; + this.friendly = true; + this.scale = 0.9f; + this.penetrate = -1; + this.melee = true; + } + else if (this.type == 273) + { + this.width = 26; + this.height = 26; + this.aiStyle = 13; + this.friendly = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.melee = true; + } + else if (this.type == 274) + { + this.width = 42; + this.height = 42; + this.alpha = 100; + this.light = 0.5f; + this.aiStyle = 18; + this.friendly = true; + this.penetrate = 5; + this.tileCollide = false; + this.scale = 1.1f; + this.melee = true; + this.timeLeft = 180; + } + else if (this.type == 275) + { + this.alpha = (int) byte.MaxValue; + this.width = 14; + this.height = 14; + this.aiStyle = 1; + this.hostile = true; + } + else if (this.type == 276) + { + this.alpha = (int) byte.MaxValue; + this.width = 14; + this.height = 14; + this.aiStyle = 1; + this.hostile = true; + } + else if (this.type == 277) + { + this.alpha = (int) byte.MaxValue; + this.width = 38; + this.height = 38; + this.aiStyle = 14; + this.hostile = true; + } + else if (this.type == 278) + { + this.arrow = true; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.light = 1f; + this.ranged = true; + this.extraUpdates = 1; + this.timeLeft = 1200; + } + else if (this.type == 279) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 1; + this.light = 0.5f; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 2; + this.scale = 1.25f; + this.timeLeft = 600; + this.ranged = true; + } + else if (this.type == 280) + { + this.width = 32; + this.height = 32; + this.aiStyle = 12; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.penetrate = 5; + this.extraUpdates = 2; + this.ignoreWater = true; + this.magic = true; + } + else if (this.type == 281) + { + this.width = 28; + this.height = 28; + this.aiStyle = 49; + this.friendly = true; + this.penetrate = 1; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 600; + } + else if (this.type == 282) + { + this.arrow = true; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.ranged = true; + this.extraUpdates = 1; + this.timeLeft = 1200; + } + else if (this.type == 283) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 1; + this.light = 0.5f; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 2; + this.scale = 1.25f; + this.timeLeft = 600; + this.ranged = true; + } + else if (this.type == 284) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 1; + this.light = 0.5f; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 2; + this.scale = 1.3f; + this.timeLeft = 600; + this.ranged = true; + } + else if (this.type == 285) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 1; + this.light = 0.5f; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 2; + this.scale = 1.3f; + this.timeLeft = 600; + this.ranged = true; + } + else if (this.type == 286) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 1; + this.light = 0.5f; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 2; + this.scale = 1.3f; + this.timeLeft = 600; + this.ranged = true; + } + else if (this.type == 287) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 1; + this.light = 0.5f; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 2; + this.scale = 1.3f; + this.timeLeft = 600; + this.ranged = true; + } + else if (this.type == 288) + { + this.width = 32; + this.height = 32; + this.aiStyle = 12; + this.hostile = true; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.extraUpdates = 2; + this.ignoreWater = true; + this.magic = true; + } + else if (this.type == 289) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.timeLeft = 2; + } + else if (this.type == 290) + { + this.width = 4; + this.height = 4; + this.aiStyle = 48; + this.hostile = true; + this.magic = true; + this.extraUpdates = 100; + this.timeLeft = 100; + this.penetrate = -1; + } + else if (this.type == 291) + { + this.width = 12; + this.height = 12; + this.aiStyle = 50; + this.hostile = true; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.tileCollide = false; + this.penetrate = -1; + } + else if (this.type == 292) + { + this.width = 130; + this.height = 130; + this.aiStyle = 50; + this.hostile = true; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.tileCollide = false; + this.penetrate = -1; + } + else if (this.type == 293) + { + this.width = 12; + this.height = 12; + this.aiStyle = 51; + this.hostile = true; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.tileCollide = false; + this.penetrate = -1; + this.extraUpdates = 1; + } + else if (this.type == 294) + { + this.width = 4; + this.height = 4; + this.aiStyle = 48; + this.friendly = true; + this.magic = true; + this.extraUpdates = 100; + this.timeLeft = 300; + this.penetrate = -1; + } + else if (this.type == 295) + { + this.width = 12; + this.height = 12; + this.aiStyle = 50; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.tileCollide = true; + } + else if (this.type == 296) + { + this.width = 150; + this.height = 150; + this.aiStyle = 50; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.tileCollide = false; + this.penetrate = -1; + } + else if (this.type == 297) + { + this.width = 12; + this.height = 12; + this.aiStyle = 51; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.extraUpdates = 1; + this.penetrate = 3; + } + else if (this.type == 298) + { + this.width = 6; + this.height = 6; + this.aiStyle = 52; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.tileCollide = false; + this.extraUpdates = 3; + } + else if (this.type == 299) + { + this.width = 6; + this.height = 6; + this.aiStyle = 1; + this.hostile = true; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.extraUpdates = 2; + this.magic = true; + this.ignoreWater = true; + this.tileCollide = false; + } + else if (this.type == 300) + { + this.width = 38; + this.height = 38; + this.aiStyle = 2; + this.hostile = true; + this.penetrate = -1; + this.ignoreWater = true; + this.tileCollide = false; + } + else if (this.type == 301) + { + this.width = 38; + this.height = 38; + this.aiStyle = 3; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.extraUpdates = 2; + } + else if (this.type == 302) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.hostile = true; + this.penetrate = -1; + this.light = 0.3f; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 7; + this.scale = 1.18f; + this.timeLeft = 300; + this.ranged = true; + this.ignoreWater = true; + } + else if (this.type == 303) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.hostile = true; + this.penetrate = -1; + this.ranged = true; + } + else if (this.type == 304) + { + this.alpha = (int) byte.MaxValue; + this.width = 30; + this.height = 30; + this.aiStyle = 2; + this.friendly = true; + this.penetrate = 1; + this.melee = true; + this.light = 0.2f; + this.ignoreWater = true; + this.extraUpdates = 0; + } + else if (this.type == 305) + { + this.width = 6; + this.height = 6; + this.aiStyle = 52; + this.alpha = (int) byte.MaxValue; + this.tileCollide = false; + this.extraUpdates = 10; + } + else if (this.type == 306) + { + this.alpha = (int) byte.MaxValue; + this.width = 14; + this.height = 14; + this.aiStyle = 2; + this.friendly = true; + this.penetrate = 1; + this.melee = true; + this.ignoreWater = true; + this.extraUpdates = 1; + } + else if (this.type == 307) + { + this.width = 16; + this.height = 16; + this.aiStyle = 36; + this.penetrate = 1; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 600; + this.melee = true; + this.extraUpdates = 3; + } + else if (this.type == 308) + { + this.width = 80; + this.height = 74; + this.aiStyle = 53; + this.timeLeft = 7200; + this.light = 0.25f; + this.ignoreWater = true; + this.coldDamage = true; + this.sentry = true; + } + else if (this.type == 309) + { + this.width = 14; + this.height = 14; + this.aiStyle = 28; + this.alpha = (int) byte.MaxValue; + this.penetrate = 1; + this.friendly = true; + this.extraUpdates = 3; + this.coldDamage = true; + } + else if (this.type == 310) + { + this.netImportant = true; + this.width = 6; + this.height = 6; + this.aiStyle = 33; + this.friendly = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 36000; + } + else if (this.type == 311) + { + this.width = 10; + this.height = 12; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 3; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 600; + this.ranged = true; + } + else if (this.type == 312) + { + this.alpha = (int) byte.MaxValue; + this.width = 32; + this.height = 32; + this.aiStyle = 1; + this.friendly = true; + this.ranged = true; + this.timeLeft = 300; + this.glowMask = (short) 257; + } + else if (this.type == 313) + { + this.netImportant = true; + this.width = 30; + this.height = 30; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 314) + { + this.netImportant = true; + this.width = 24; + this.height = 40; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 315) + { + this.netImportant = true; + this.width = 14; + this.height = 14; + this.aiStyle = 7; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft *= 10; + } + else if (this.type == 316) + { + this.alpha = (int) byte.MaxValue; + this.width = 16; + this.height = 16; + this.aiStyle = 36; + this.friendly = true; + this.penetrate = 1; + this.timeLeft = 600; + this.magic = true; + } + else if (this.type == 317) + { + this.netImportant = true; + this.width = 28; + this.height = 28; + this.aiStyle = 54; + this.penetrate = 1; + this.timeLeft *= 5; + this.minion = true; + this.minionSlots = 1f; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 10; + } + else if (this.type == 318) + { + this.width = 12; + this.height = 14; + this.aiStyle = 2; + this.friendly = true; + this.ranged = true; + } + else if (this.type == 319) + { + this.netImportant = true; + this.width = 36; + this.height = 30; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 320) + { + this.width = 34; + this.height = 34; + this.aiStyle = 3; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + } + else if (this.type == 321) + { + this.width = 30; + this.height = 30; + this.aiStyle = 55; + this.friendly = true; + this.melee = true; + this.tileCollide = false; + this.ignoreWater = true; + } + else if (this.type == 322) + { + this.netImportant = true; + this.width = 14; + this.height = 14; + this.aiStyle = 7; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft *= 10; + } + else if (this.type == 323) + { + this.penetrate = 10; + this.extraUpdates = 3; + this.width = 14; + this.height = 14; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.friendly = true; + this.ranged = true; + this.scale = 0.8f; + } + else if (this.type == 324) + { + this.netImportant = true; + this.width = 26; + this.height = 38; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 325) + { + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.width = 14; + this.height = 14; + this.aiStyle = 1; + this.hostile = true; + this.tileCollide = false; + this.timeLeft = 420; + } + else if (this.type >= 326 && this.type <= 328) + { + if (this.type == 326) + { + this.width = 14; + this.height = 16; + } + else if (this.type == 327) + { + this.width = 12; + this.height = 14; + } + else + { + this.width = 6; + this.height = 12; + } + this.aiStyle = 14; + this.hostile = true; + this.penetrate = -1; + this.timeLeft = 360; + } + else if (this.type == 329) + { + this.width = 80; + this.height = 80; + this.light = 0.25f; + this.aiStyle = 56; + this.hostile = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft = 420; + } + else if (this.type == 330) + { + this.width = 22; + this.height = 22; + this.aiStyle = 2; + this.friendly = true; + this.penetrate = 6; + this.ranged = true; + } + else if (this.type == 331) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 7; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft *= 10; + } + else if (this.type == 332) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 7; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft *= 10; + this.light = 0.5f; + } + else if (this.type == 333) + { + this.width = 38; + this.height = 38; + this.aiStyle = 3; + this.friendly = true; + this.scale = 0.9f; + this.penetrate = -1; + this.melee = true; + } + else if (this.type == 334) + { + this.netImportant = true; + this.width = 28; + this.height = 28; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 335) + { + this.width = 22; + this.height = 22; + this.aiStyle = 30; + this.friendly = true; + this.penetrate = 1; + this.melee = true; + } + else if (this.type == 336) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.magic = true; + this.scale = 0.8f; + this.extraUpdates = 1; + } + else if (this.type == 337) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.magic = true; + this.tileCollide = false; + this.coldDamage = true; + this.extraUpdates = 1; + } + else if (this.type == 338 || this.type == 339 || this.type == 340 || this.type == 341) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.penetrate = -1; + this.friendly = true; + this.ranged = true; + this.scale = 0.9f; + } + else if (this.type == 342) + { + this.width = 22; + this.height = 2; + this.aiStyle = 19; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1.1f; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.coldDamage = true; + } + else if (this.type == 343) + { + this.alpha = (int) byte.MaxValue; + this.width = 10; + this.height = 10; + this.aiStyle = 57; + this.friendly = true; + this.melee = true; + this.scale = 1.1f; + this.penetrate = 3; + this.coldDamage = true; + } + else if (this.type == 344) + { + this.width = 26; + this.height = 26; + this.aiStyle = 1; + this.friendly = true; + this.scale = 0.9f; + this.alpha = (int) byte.MaxValue; + this.melee = true; + this.coldDamage = true; + this.tileCollide = false; + this.noEnchantmentVisuals = true; + } + else if (this.type == 345) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.hostile = true; + this.scale = 0.8f; + } + else if (this.type == 346) + { + this.width = 18; + this.height = 18; + this.aiStyle = 14; + this.hostile = true; + this.penetrate = -1; + this.timeLeft = 300; + } + else if (this.type == 347) + { + this.width = 6; + this.height = 6; + this.aiStyle = 2; + this.hostile = true; + this.penetrate = -1; + } + else if (this.type == 348) + { + this.aiStyle = 1; + this.width = 48; + this.height = 48; + this.hostile = true; + this.penetrate = -1; + this.tileCollide = false; + this.coldDamage = true; + this.extraUpdates = 1; + this.timeLeft = 900; + } + else if (this.type == 349) + { + this.aiStyle = 1; + this.width = 12; + this.height = 12; + this.hostile = true; + this.penetrate = -1; + this.coldDamage = true; + this.timeLeft = 900; + } + else if (this.type == 350) + { + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.width = 14; + this.height = 14; + this.aiStyle = 1; + this.hostile = true; + this.tileCollide = false; + this.timeLeft /= 2; + } + else if (this.type == 351) + { + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.width = 24; + this.height = 24; + this.aiStyle = 58; + this.hostile = true; + this.tileCollide = false; + } + else if (this.type == 352) + { + this.width = 30; + this.height = 30; + this.aiStyle = 14; + this.hostile = true; + this.penetrate = -1; + this.timeLeft /= 3; + } + else if (this.type == 353) + { + this.netImportant = true; + this.width = 18; + this.height = 28; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 354) + { + this.knockBack = 6f; + this.width = 10; + this.height = 10; + this.aiStyle = 10; + this.friendly = true; + this.ranged = true; + this.penetrate = -1; + this.extraUpdates = 1; + } + else if (this.type == 355) + { + this.width = 12; + this.height = 12; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.friendly = true; + this.magic = true; + this.penetrate = 5; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 6; + this.timeLeft = 45; + } + else if (this.type == 356) + { + this.width = 6; + this.height = 6; + this.aiStyle = 59; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.tileCollide = false; + this.extraUpdates = 3; + } + else if (this.type == 357) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 6; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 2; + this.scale = 1.2f; + this.timeLeft = 600; + this.ranged = true; + } + else if (this.type == 358) + { + this.width = 18; + this.height = 18; + this.aiStyle = 60; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.extraUpdates = 2; + this.ignoreWater = true; + } + else if (this.type == 359) + { + this.width = 14; + this.height = 14; + this.aiStyle = 28; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.penetrate = 2; + this.friendly = true; + this.coldDamage = true; + } + else if (this.type >= 360 && this.type <= 366 || this.type == 381 || this.type == 382 || this.type == 760 || this.type == 775) + { + this.width = 14; + this.height = 14; + this.aiStyle = 61; + this.penetrate = -1; + this.netImportant = true; + this.bobber = true; + } + else if (this.type == 367) + { + this.width = 18; + this.height = 18; + this.aiStyle = 19; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1.1f; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 368) + { + this.width = 18; + this.height = 18; + this.aiStyle = 19; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 369) + { + this.width = 22; + this.height = 22; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 370) + { + this.width = 14; + this.height = 14; + this.aiStyle = 2; + this.friendly = true; + this.penetrate = 1; + } + else if (this.type == 371) + { + this.width = 14; + this.height = 14; + this.aiStyle = 2; + this.friendly = true; + this.penetrate = 1; + } + else if (this.type == 372) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 7; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft *= 10; + } + else if (this.type == 373) + { + this.netImportant = true; + this.width = 24; + this.height = 26; + this.aiStyle = 62; + this.penetrate = -1; + this.timeLeft *= 5; + this.minion = true; + this.minionSlots = 1f; + this.tileCollide = false; + this.ignoreWater = true; + } + else if (this.type == 374) + { + this.width = 10; + this.height = 10; + this.aiStyle = 0; + this.friendly = true; + this.penetrate = 1; + this.aiStyle = 1; + this.tileCollide = true; + this.scale *= 0.9f; + } + else if (this.type == 375) + { + this.netImportant = true; + this.width = 34; + this.height = 26; + this.aiStyle = 62; + this.penetrate = -1; + this.timeLeft *= 5; + this.minion = true; + this.minionSlots = 1f; + this.tileCollide = false; + this.ignoreWater = true; + } + else if (this.type == 376) + { + this.width = 12; + this.height = 12; + this.aiStyle = 0; + this.friendly = true; + this.penetrate = -1; + this.aiStyle = 1; + this.tileCollide = true; + this.timeLeft = 100; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 1; + } + else if (this.type == 377) + { + this.width = 66; + this.height = 50; + this.aiStyle = 53; + this.timeLeft = 7200; + this.ignoreWater = true; + this.sentry = true; + } + else if (this.type == 378) + { + this.width = 16; + this.height = 16; + this.aiStyle = 14; + this.friendly = true; + this.penetrate = -1; + this.timeLeft = 60; + this.scale = 0.9f; + } + else if (this.type == 379) + { + this.width = 14; + this.height = 10; + this.aiStyle = 63; + this.friendly = true; + this.timeLeft = 300; + this.penetrate = 1; + } + else if (this.type == 380) + { + this.netImportant = true; + this.width = 26; + this.height = 26; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 383) + { + this.width = 34; + this.height = 34; + this.aiStyle = 3; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + } + else if (this.type == 384) + { + this.width = 150; + this.height = 42; + this.hostile = true; + this.penetrate = -1; + this.aiStyle = 64; + this.tileCollide = false; + this.ignoreWater = true; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 540; + } + else if (this.type == 385) + { + this.width = 30; + this.height = 30; + this.hostile = true; + this.penetrate = -1; + this.aiStyle = 65; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 300; + } + else if (this.type == 386) + { + this.width = 150; + this.height = 42; + this.hostile = true; + this.penetrate = -1; + this.aiStyle = 64; + this.tileCollide = false; + this.ignoreWater = true; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 840; + } + else if (this.type == 387) + { + this.netImportant = true; + this.width = 40; + this.height = 20; + this.aiStyle = 66; + this.penetrate = -1; + this.timeLeft *= 5; + this.minion = true; + this.minionSlots = 0.5f; + this.tileCollide = false; + this.ignoreWater = true; + this.friendly = true; + this.usesIDStaticNPCImmunity = true; + this.idStaticNPCHitCooldown = 18; + } + else if (this.type == 388) + { + this.netImportant = true; + this.width = 40; + this.height = 20; + this.aiStyle = 66; + this.penetrate = -1; + this.timeLeft *= 5; + this.minion = true; + this.minionSlots = 0.5f; + this.tileCollide = false; + this.ignoreWater = true; + this.friendly = true; + this.usesIDStaticNPCImmunity = true; + this.idStaticNPCHitCooldown = 18; + } + else if (this.type == 389) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 3; + this.light = 0.75f; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 2; + this.scale = 1.2f; + this.timeLeft = 600; + } + else if (this.type == 390 || this.type == 391 || this.type == 392) + { + this.width = 18; + this.height = 18; + this.aiStyle = 26; + this.penetrate = -1; + this.netImportant = true; + this.timeLeft *= 5; + this.minion = true; + this.minionSlots = 1f; + this.usesIDStaticNPCImmunity = true; + this.idStaticNPCHitCooldown = 15; + } + else if (this.type == 393 || this.type == 394 || this.type == 395) + { + this.width = 20; + this.height = 30; + this.aiStyle = 67; + this.penetrate = -1; + this.netImportant = true; + this.timeLeft *= 5; + this.minion = true; + this.minionSlots = 1f; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 18; + this.decidesManualFallThrough = true; + } + else if (this.type == 396) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 7; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft *= 10; + this.alpha = 100; + } + else if (this.type == 397) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.ranged = true; + this.tileCollide = false; + } + else if (this.type == 398) + { + this.netImportant = true; + this.width = 18; + this.height = 38; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 399) + { + this.width = 14; + this.height = 14; + this.aiStyle = 68; + this.friendly = true; + this.penetrate = 1; + this.alpha = (int) byte.MaxValue; + this.ranged = true; + this.noEnchantments = true; + } + else if (this.type >= 400 && this.type <= 402) + { + if (this.type == 400) + { + this.width = 14; + this.height = 16; + } + else if (this.type == 401) + { + this.width = 12; + this.height = 14; + } + else + { + this.width = 6; + this.height = 12; + } + this.penetrate = 3; + this.aiStyle = 14; + this.friendly = true; + this.timeLeft = 360; + this.ranged = true; + this.noEnchantments = true; + } + else if (this.type == 403) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 7; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft *= 10; + } + else if (this.type == 404) + { + this.width = 26; + this.height = 26; + this.aiStyle = 69; + this.friendly = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.melee = true; + } + else if (this.type == 405) + { + this.width = 14; + this.height = 14; + this.aiStyle = 70; + this.friendly = true; + this.penetrate = 1; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 90; + this.melee = true; + this.noEnchantments = true; + } + else if (this.type == 406) + { + this.width = 14; + this.height = 14; + this.aiStyle = 60; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.extraUpdates = 2; + this.ignoreWater = true; + } + else if (this.type == 407) + { + this.netImportant = true; + this.width = 28; + this.height = 40; + this.aiStyle = 62; + this.penetrate = -1; + this.timeLeft *= 5; + this.minion = true; + this.friendly = true; + this.minionSlots = 1f; + this.tileCollide = false; + this.ignoreWater = true; + } + else if (this.type == 408) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + } + else if (this.type == 409) + { + this.width = 30; + this.height = 30; + this.penetrate = -1; + this.aiStyle = 71; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 360; + this.friendly = true; + this.tileCollide = true; + this.extraUpdates = 2; + this.magic = true; + this.ignoreWater = true; + } + else if (this.type == 410) + { + this.width = 14; + this.height = 14; + this.aiStyle = 72; + this.friendly = true; + this.penetrate = 1; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 50; + this.magic = true; + this.ignoreWater = true; + } + else if (this.type >= 411 && this.type <= 414) + { + switch (this.type) + { + default: + this.width = 10; + this.height = 10; + this.aiStyle = 10; + break; + } + } + else if (this.type == 415 || this.type == 416 || this.type == 417 || this.type == 418) + { + this.width = 14; + this.height = 14; + this.aiStyle = 34; + this.friendly = true; + this.ranged = true; + this.timeLeft = 45; + } + else if (this.type >= 419 && this.type <= 422) + { + this.width = 4; + this.height = 4; + this.aiStyle = 73; + this.friendly = true; + this.usesIDStaticNPCImmunity = true; + this.idStaticNPCHitCooldown = 3; + } + else if (this.type == 423) + { + this.netImportant = true; + this.width = 28; + this.height = 28; + this.aiStyle = 62; + this.penetrate = -1; + this.timeLeft *= 5; + this.minion = true; + this.friendly = true; + this.minionSlots = 1f; + this.ignoreWater = true; + } + else if (this.type >= 424 && this.type <= 426) + { + this.width = 24; + this.height = 24; + this.aiStyle = 1; + this.friendly = true; + this.magic = true; + this.tileCollide = false; + this.extraUpdates = 2; + } + else if (this.type == 427) + { + this.width = 22; + this.height = 56; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.glowMask = (short) 2; + } + else if (this.type == 428) + { + this.width = 26; + this.height = 54; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.glowMask = (short) 3; + } + else if (this.type == 429) + { + this.width = 18; + this.height = 56; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.glowMask = (short) 7; + } + else if (this.type == 430) + { + this.width = 30; + this.height = 54; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.glowMask = (short) 8; + } + else if (this.type == 431) + { + this.width = 28; + this.height = 64; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 432) + { + this.width = 30; + this.height = 54; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 610) + { + this.width = 28; + this.height = 64; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.glowMask = (short) 179; + } + else if (this.type == 609) + { + this.width = 30; + this.height = 54; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.glowMask = (short) 180; + } + else if (this.type == 433) + { + this.width = 8; + this.height = 8; + this.aiStyle = 48; + this.friendly = true; + this.extraUpdates = 100; + this.timeLeft = 100; + this.ignoreWater = true; + } + else if (this.type == 434) + { + this.width = 1; + this.height = 1; + this.aiStyle = 74; + this.friendly = true; + this.extraUpdates = 100; + this.penetrate = -1; + } + else if (this.type == 435) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.hostile = true; + this.ignoreWater = true; + } + else if (this.type == 436) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.hostile = true; + this.ignoreWater = true; + } + else if (this.type == 437) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.hostile = true; + this.extraUpdates = 2; + this.ignoreWater = true; + } + else if (this.type == 438) + { + this.width = 8; + this.height = 8; + this.aiStyle = 1; + this.hostile = true; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 3; + this.ignoreWater = true; + } + else if (this.type == 439) + { + this.width = 22; + this.height = 22; + this.aiStyle = 75; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.magic = true; + this.ignoreWater = true; + } + else if (this.type == 440) + { + this.width = 5; + this.height = 5; + this.aiStyle = 1; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 2; + this.scale = 1f; + this.timeLeft = 600; + this.magic = true; + this.ignoreWater = true; + } + else if (this.type == 441) + { + this.width = 1; + this.height = 1; + this.aiStyle = 76; + this.ignoreWater = true; + this.tileCollide = false; + } + else if (this.type == 442) + { + this.width = 14; + this.height = 14; + this.aiStyle = 1; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.scale = 1f; + this.timeLeft = 600; + this.ranged = true; + } + else if (this.type == 443) + { + this.width = 80; + this.height = 80; + this.aiStyle = 77; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.scale = 1f; + this.ranged = true; + this.ignoreWater = true; + this.tileCollide = false; + this.penetrate = -1; + } + else if (this.type == 444) + { + this.width = 10; + this.height = 10; + this.aiStyle = 78; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.scale = 1f; + this.ranged = true; + this.ignoreWater = true; + this.extraUpdates = 1; + } + else if (this.type == 445) + { + this.width = 10; + this.height = 10; + this.aiStyle = 75; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.melee = true; + this.ignoreWater = true; + this.ownerHitCheck = true; + } + else if (this.type == 446) + { + this.netImportant = true; + this.width = 14; + this.height = 14; + this.aiStyle = 7; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft *= 10; + this.light = 0.7f; + } + else if (this.type == 447) + { + this.width = 30; + this.height = 30; + this.aiStyle = 79; + this.hostile = true; + this.penetrate = -1; + this.tileCollide = false; + this.ignoreWater = true; + this.timeLeft = 240; + } + else if (this.type == 448) + { + this.width = 14; + this.height = 14; + this.aiStyle = 80; + this.hostile = true; + this.penetrate = -1; + this.tileCollide = false; + } + else if (this.type == 449) + { + this.width = 5; + this.height = 5; + this.aiStyle = 1; + this.hostile = true; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 1; + this.scale = 1f; + this.timeLeft = 600; + this.ignoreWater = true; + } + else if (this.type == 450) + { + this.width = 14; + this.height = 14; + this.aiStyle = 14; + this.hostile = true; + this.penetrate = -1; + this.timeLeft = 360; + } + else if (this.type == 451) + { + this.width = 16; + this.height = 16; + this.aiStyle = 81; + this.melee = true; + this.penetrate = 3; + this.light = 0.2f; + this.alpha = (int) byte.MaxValue; + this.friendly = true; + } + else if (this.type == 452) + { + this.width = 14; + this.height = 14; + this.aiStyle = 82; + this.hostile = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 600; + } + else if (this.type == 453) + { + this.width = 1; + this.height = 1; + this.aiStyle = 76; + this.ignoreWater = true; + this.tileCollide = false; + } + else if (this.type == 454) + { + this.width = 46; + this.height = 46; + this.aiStyle = 83; + this.hostile = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 600; + this.tileCollide = false; + } + else if (this.type == 455) + { + this.width = 36; + this.height = 36; + this.aiStyle = 84; + this.hostile = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 600; + this.tileCollide = false; + } + else if (this.type == 456) + { + this.width = 16; + this.height = 16; + this.aiStyle = 85; + this.hostile = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 600; + this.tileCollide = false; + } + else if (this.type == 459) + { + this.width = 22; + this.height = 22; + this.aiStyle = 1; + this.friendly = true; + this.magic = true; + this.alpha = (int) byte.MaxValue; + this.scale = 1f; + this.ignoreWater = true; + this.extraUpdates = 1; + } + else if (this.type == 460) + { + this.width = 14; + this.height = 18; + this.aiStyle = 75; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.magic = true; + this.ignoreWater = true; + } + else if (this.type == 461) + { + this.width = 18; + this.height = 18; + this.aiStyle = 84; + this.friendly = true; + this.magic = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.tileCollide = false; + this.hide = true; + } + else if (this.type == 462) + { + this.width = 8; + this.height = 8; + this.aiStyle = 1; + this.hostile = true; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 3; + this.ignoreWater = true; + this.tileCollide = false; + } + else if (this.type == 463) + { + this.width = 48; + this.height = 48; + this.aiStyle = 6; + this.friendly = true; + this.tileCollide = false; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + } + else if (this.type == 464) + { + this.width = 60; + this.height = 60; + this.aiStyle = 86; + this.hostile = true; + this.tileCollide = false; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + } + else if (this.type == 467) + { + this.width = 40; + this.height = 40; + this.aiStyle = 1; + this.hostile = true; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.extraUpdates = 1; + } + else if (this.type == 468) + { + this.width = 40; + this.height = 40; + this.aiStyle = 1; + this.hostile = true; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.extraUpdates = 1; + } + else if (this.type == 465) + { + this.width = 80; + this.height = 80; + this.aiStyle = 88; + this.hostile = true; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.tileCollide = false; + } + else if (this.type == 466) + { + this.width = 14; + this.height = 14; + this.aiStyle = 88; + this.hostile = true; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.tileCollide = true; + this.extraUpdates = 4; + this.timeLeft = 120 * (this.extraUpdates + 1); + } + else if (this.type == 491) + { + this.width = 26; + this.height = 26; + this.aiStyle = 9; + this.friendly = true; + this.melee = true; + this.penetrate = -1; + } + else if (this.type == 500) + { + this.width = 20; + this.height = 20; + this.aiStyle = 67; + this.penetrate = -1; + this.netImportant = true; + this.timeLeft *= 5; + this.friendly = true; + this.ignoreWater = true; + this.scale = 0.8f; + } + else if (this.type == 499) + { + this.netImportant = true; + this.width = 34; + this.height = 34; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 469) + { + this.alpha = (int) byte.MaxValue; + this.arrow = true; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.ranged = true; + this.timeLeft = 1200; + } + else if (this.type == 470) + { + this.width = 10; + this.height = 10; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + } + else if (this.type == 471) + { + this.width = 16; + this.height = 16; + this.aiStyle = 2; + this.scale = 1.2f; + this.hostile = true; + this.ranged = true; + } + else if (this.type == 472) + { + this.width = 8; + this.height = 8; + this.aiStyle = 0; + this.hostile = true; + this.penetrate = -1; + this.aiStyle = 1; + this.tileCollide = true; + this.timeLeft = 50; + } + else if (this.type == 474) + { + this.arrow = true; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.ranged = true; + this.timeLeft = 1200; + this.penetrate = 2; + } + else if (this.type == 473) + { + this.netImportant = true; + this.width = 8; + this.height = 8; + this.aiStyle = 14; + this.penetrate = -1; + this.alpha = 75; + this.light = 1f; + this.timeLeft *= 2; + } + else if (this.type == 475) + { + this.width = 14; + this.height = 14; + this.aiStyle = 35; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft = 400; + } + else if (this.type == 476) + { + this.width = 200; + this.height = 200; + this.aiStyle = -1; + this.friendly = true; + this.tileCollide = false; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.timeLeft = 3; + this.magic = true; + } + else if (this.type == 477) + { + this.alpha = (int) byte.MaxValue; + this.width = 14; + this.height = 14; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 7; + this.extraUpdates = 1; + this.ranged = true; + } + else if (this.type == 478) + { + this.alpha = (int) byte.MaxValue; + this.width = 14; + this.height = 14; + this.aiStyle = 1; + this.friendly = true; + this.timeLeft = 300; + this.ranged = true; + } + else if (this.type == 479) + { + this.alpha = (int) byte.MaxValue; + this.width = 14; + this.height = 14; + this.aiStyle = 1; + this.friendly = true; + this.ranged = true; + } + else if (this.type == 480) + { + this.alpha = (int) byte.MaxValue; + this.width = 12; + this.height = 12; + this.penetrate = 3; + this.aiStyle = 14; + this.friendly = true; + this.timeLeft = 120; + this.ranged = true; + this.noEnchantments = true; + } + else if (this.type == 481) + { + this.width = 22; + this.height = 22; + this.aiStyle = 13; + this.friendly = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.melee = true; + this.extraUpdates = 0; + } + else if (this.type == 482) + { + this.width = 16; + this.height = 200; + this.aiStyle = 87; + this.friendly = true; + this.tileCollide = false; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.timeLeft = 2700; + this.magic = true; + } + else if (this.type == 483) + { + this.width = 14; + this.height = 14; + this.aiStyle = 14; + this.friendly = true; + this.melee = true; + } + else if (this.type == 484) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.melee = true; + this.extraUpdates = 1; + } + else if (this.type == 485) + { + this.arrow = true; + this.width = 24; + this.height = 24; + this.aiStyle = 1; + this.friendly = true; + this.ranged = true; + this.penetrate = -1; + this.timeLeft = 1200; + } + else if (this.type >= 486 && this.type <= 489) + { + if (this.type == 486) + { + this.width = 12; + this.height = 12; + } + else if (this.type == 487) + { + this.width = 22; + this.height = 22; + } + else if (this.type == 488) + { + this.width = 12; + this.height = 12; + this.light = 0.3f; + } + else if (this.type == 489) + { + this.width = 20; + this.height = 16; + } + this.netImportant = true; + this.aiStyle = 7; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft *= 10; + } + else if (this.type == 492) + { + this.netImportant = true; + this.width = 18; + this.height = 32; + this.aiStyle = 90; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 490) + { + this.width = 14; + this.height = 14; + this.aiStyle = 89; + this.hostile = true; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.tileCollide = false; + this.timeLeft = 600; + this.netImportant = true; + } + else if (this.type == 493 || this.type == 494) + { + this.width = 32; + this.height = 32; + this.aiStyle = 4; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.magic = true; + this.light = 0.2f; + } + else if (this.type == 495) + { + this.arrow = true; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.ranged = true; + this.penetrate = 3; + this.timeLeft = 1200; + } + else if (this.type == 496) + { + this.alpha = (int) byte.MaxValue; + this.width = 40; + this.height = 40; + this.aiStyle = 91; + this.friendly = true; + this.magic = true; + this.MaxUpdates = 3; + this.penetrate = 3; + } + else if (this.type == 497) + { + this.width = 30; + this.height = 30; + this.aiStyle = 2; + this.friendly = true; + this.penetrate = 3; + this.melee = true; + } + else if (this.type == 498) + { + this.width = 6; + this.height = 6; + this.aiStyle = 1; + this.hostile = true; + this.penetrate = -1; + this.timeLeft = 180; + } + else if (this.type == 501) + { + this.width = 14; + this.height = 14; + this.aiStyle = 2; + this.scale = 1.1f; + this.hostile = true; + this.ranged = true; + } + else if (this.type == 502) + { + this.width = 16; + this.height = 16; + this.aiStyle = 8; + this.friendly = true; + this.melee = true; + this.penetrate = 5; + } + else if (this.type == 503) + { + this.width = 24; + this.height = 24; + this.aiStyle = 5; + this.friendly = true; + this.penetrate = 2; + this.alpha = (int) byte.MaxValue; + this.tileCollide = false; + this.melee = true; + this.extraUpdates = 1; + } + else if (this.type == 504) + { + this.width = 10; + this.height = 10; + this.aiStyle = 2; + this.friendly = true; + this.melee = true; + this.alpha = (int) byte.MaxValue; + this.penetrate = 2; + this.noEnchantmentVisuals = true; + } + else if (this.type == 507) + { + this.width = 16; + this.height = 16; + this.aiStyle = 1; + this.friendly = true; + this.ranged = true; + this.penetrate = 3; + } + else if (this.type == 508) + { + this.width = 16; + this.height = 16; + this.aiStyle = 1; + this.hostile = true; + this.penetrate = -1; + } + else if (this.type == 509) + { + this.width = 22; + this.height = 22; + this.aiStyle = 20; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + this.scale = 1.2f; + } + else if (this.type == 510) + { + this.width = 18; + this.height = 18; + this.aiStyle = 2; + this.friendly = true; + this.penetrate = 1; + this.magic = true; + } + else if (this.type == 511) + { + this.width = 32; + this.height = 32; + this.aiStyle = 92; + this.friendly = true; + this.penetrate = -1; + this.scale = 1.1f; + this.magic = true; + } + else if (this.type == 512) + { + this.width = 40; + this.height = 38; + this.aiStyle = 92; + this.friendly = true; + this.penetrate = -1; + this.scale = 1.1f; + this.magic = true; + } + else if (this.type == 513) + { + this.width = 30; + this.height = 28; + this.aiStyle = 92; + this.friendly = true; + this.penetrate = -1; + this.scale = 1.1f; + this.magic = true; + } + else if (this.type == 514) + { + this.width = 10; + this.height = 10; + this.aiStyle = 93; + this.friendly = true; + this.penetrate = 3; + this.alpha = (int) byte.MaxValue; + this.ranged = true; + } + else if (this.type == 515) + { + this.netImportant = true; + this.width = 6; + this.height = 6; + this.aiStyle = 14; + this.penetrate = -1; + this.alpha = 75; + this.light = 1f; + this.timeLeft *= 5; + } + else if (this.type == 516) + { + this.width = 22; + this.height = 22; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + } + else if (this.type == 517) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.ranged = true; + } + else if (this.type == 518) + { + this.width = 32; + this.height = 32; + this.aiStyle = 94; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.tileCollide = false; + this.ignoreWater = true; + } + else if (this.type == 519) + { + this.width = 24; + this.height = 24; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + } + else if (this.type == 520) + { + this.width = 22; + this.height = 22; + this.aiStyle = 2; + this.friendly = true; + this.penetrate = 3; + this.ranged = true; + this.coldDamage = true; + } + else if (this.type == 521) + { + this.width = 14; + this.height = 14; + this.aiStyle = 29; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.penetrate = 1; + this.friendly = true; + } + else if (this.type == 522) + { + this.width = 8; + this.height = 8; + this.aiStyle = 29; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.penetrate = 1; + this.friendly = true; + } + else if (this.type == 523) + { + this.width = 32; + this.height = 32; + this.aiStyle = 95; + this.alpha = (int) byte.MaxValue; + this.ranged = true; + this.penetrate = 1; + this.friendly = true; + } + else if (this.type == 524) + { + this.width = 10; + this.height = 10; + this.aiStyle = 96; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.ignoreWater = true; + this.melee = true; + this.extraUpdates = 5; + } + else if (this.type == 525) + { + this.width = 30; + this.height = 24; + this.aiStyle = 97; + this.tileCollide = false; + this.timeLeft = 10800; + this.hide = true; + } + else if (this.type == 526) + { + this.width = 8; + this.height = 8; + this.aiStyle = 98; + this.tileCollide = false; + this.timeLeft = 120; + this.alpha = (int) byte.MaxValue; + } + else if (this.type >= 527 && this.type <= 531) + { + this.knockBack = 12f; + this.width = 24; + this.height = 24; + this.aiStyle = 17; + this.penetrate = -1; + } + else if (this.type == 532) + { + this.width = 16; + this.height = 16; + this.aiStyle = 1; + this.scale = 1f; + this.friendly = true; + this.ranged = true; + this.penetrate = 3; + this.extraUpdates = 1; + } + else if (this.type == 533) + { + this.netImportant = true; + this.width = 20; + this.height = 20; + this.aiStyle = 66; + this.penetrate = -1; + this.timeLeft *= 5; + this.minion = true; + this.minionSlots = 1f; + this.tileCollide = false; + this.ignoreWater = true; + this.friendly = true; + this.usesIDStaticNPCImmunity = true; + this.idStaticNPCHitCooldown = 10; + } + else if (this.type == 534) + { + this.extraUpdates = 0; + this.width = 16; + this.height = 16; + this.aiStyle = 99; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.scale = 1f; + } + else if (this.type >= 541 && this.type <= 555) + { + this.extraUpdates = 0; + this.width = 16; + this.height = 16; + this.aiStyle = 99; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.scale = 1f; + if (this.type == 547) + this.scale = 1.1f; + if (this.type == 554) + this.scale = 1.2f; + if (this.type == 555) + this.scale = 1.15f; + if (this.type == 551 || this.type == 550) + this.scale = 1.1f; + } + else if (this.type >= 562 && this.type <= 564) + { + this.extraUpdates = 0; + this.width = 16; + this.height = 16; + this.aiStyle = 99; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.scale = 1f; + if (this.type == 563) + this.scale = 1.05f; + if (this.type == 564) + this.scale = 1.075f; + } + else if (this.type == 603) + { + this.extraUpdates = 0; + this.width = 16; + this.height = 16; + this.aiStyle = 99; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.scale = 1.15f; + } + else if (this.type == 604) + { + this.extraUpdates = 0; + this.width = 14; + this.height = 14; + this.aiStyle = 115; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.scale = 1.2f; + } + else if (this.type >= 556 && this.type <= 561) + { + this.extraUpdates = 0; + this.width = 10; + this.height = 10; + this.aiStyle = 99; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.scale = 1f; + this.counterweight = true; + } + else if (this.type == 535) + { + this.width = 18; + this.height = 18; + this.aiStyle = 100; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.magic = true; + this.ignoreWater = true; + } + else if (this.type == 536) + { + this.width = 10; + this.height = 10; + this.aiStyle = 101; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.magic = true; + this.ignoreWater = true; + } + else if (this.type == 537) + { + this.width = 22; + this.height = 22; + this.aiStyle = 84; + this.hostile = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 240; + this.tileCollide = false; + } + else if (this.type == 538) + { + this.width = 12; + this.height = 12; + this.aiStyle = 14; + this.hostile = true; + this.penetrate = -1; + this.timeLeft = 120; + this.extraUpdates = 1; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 539) + { + this.width = 18; + this.height = 30; + this.aiStyle = 102; + this.hostile = true; + this.penetrate = -1; + this.timeLeft = 600; + } + else if (this.type == 540) + { + this.width = 20; + this.height = 20; + this.aiStyle = 103; + this.hostile = true; + this.penetrate = -1; + this.timeLeft = 300; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 565) + { + this.width = 28; + this.height = 28; + this.aiStyle = 104; + this.penetrate = -1; + this.tileCollide = false; + this.ignoreWater = true; + this.alpha = (int) byte.MaxValue; + this.scale = 0.8f; + } + else if (this.type == 566) + { + this.width = 16; + this.height = 16; + this.aiStyle = 36; + this.friendly = true; + this.penetrate = 4; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 660; + this.extraUpdates = 3; + } + else if (this.type == 567 || this.type == 568) + { + if (this.type == 567) + { + this.width = 14; + this.height = 14; + } + else + { + this.width = 16; + this.height = 16; + } + this.aiStyle = 105; + this.friendly = true; + this.penetrate = 1; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 3600; + this.tileCollide = false; + this.ignoreWater = true; + } + else if (this.type >= 569 && this.type <= 571) + { + this.width = 32; + this.height = 32; + this.aiStyle = 106; + this.friendly = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 3600; + this.tileCollide = false; + this.ignoreWater = true; + } + else if (this.type == 575) + { + this.width = 24; + this.height = 24; + this.aiStyle = 107; + this.hostile = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft = 420; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 573) + { + this.width = 18; + this.height = 30; + this.aiStyle = 102; + this.hostile = true; + this.penetrate = -1; + this.timeLeft = 600; + } + else if (this.type == 574) + { + this.width = 18; + this.height = 18; + this.aiStyle = 102; + this.hostile = true; + this.timeLeft = 600; + this.tileCollide = false; + } + else if (this.type == 572) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.friendly = false; + this.hostile = true; + } + else if (this.type == 576) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.hostile = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 2; + this.scale = 1.2f; + this.timeLeft = 600; + } + else if (this.type == 577) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.hostile = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 2; + this.scale = 1.2f; + this.timeLeft = 600; + } + else if (this.type == 578 || this.type == 579 || this.type == 813) + { + this.width = 32; + this.height = 32; + this.aiStyle = 108; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.tileCollide = false; + this.ignoreWater = true; + this.hostile = true; + this.hide = true; + } + else if (this.type == 580) + { + this.width = 14; + this.height = 14; + this.aiStyle = 88; + this.hostile = true; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.tileCollide = true; + this.extraUpdates = 4; + this.timeLeft = 600; + } + else if (this.type == 581) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.friendly = false; + this.hostile = true; + } + else if (this.type == 582) + { + this.width = 20; + this.height = 20; + this.aiStyle = 109; + this.friendly = true; + this.penetrate = -1; + this.MaxUpdates = 2; + } + else if (this.type == 583) + { + this.width = 10; + this.height = 10; + this.aiStyle = 2; + this.friendly = true; + this.scale = 0.8f; + } + else if (this.type == 589) + { + this.width = 10; + this.height = 10; + this.aiStyle = 2; + this.friendly = true; + } + else if (this.type == 584) + { + this.width = 10; + this.height = 10; + this.aiStyle = 110; + this.friendly = true; + this.scale = 0.8f; + this.penetrate = 3; + } + else if (this.type == 585) + { + this.width = 26; + this.height = 26; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.friendly = true; + this.penetrate = 3; + } + else if (this.type == 586) + { + this.width = 26; + this.height = 26; + this.aiStyle = 111; + this.alpha = (int) byte.MaxValue; + this.friendly = true; + this.penetrate = -1; + } + else if (this.type == 587) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.friendly = true; + this.ranged = true; + } + else if (this.type == 588) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.ranged = true; + } + else if (this.type == 590) + { + this.width = 14; + this.height = 14; + this.aiStyle = 112; + this.friendly = true; + this.penetrate = 1; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 900; + this.tileCollide = false; + this.ignoreWater = true; + } + else if (this.type == 591) + { + this.width = 8; + this.height = 8; + this.aiStyle = 101; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ignoreWater = true; + } + else if (this.type == 592) + { + this.width = 8; + this.height = 8; + this.aiStyle = 1; + this.hostile = true; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 3; + this.ignoreWater = true; + } + else if (this.type == 593) + { + this.width = 16; + this.height = 16; + this.aiStyle = 1; + this.hostile = true; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 1; + this.ignoreWater = true; + } + else if (this.type == 594) + { + this.width = 40; + this.height = 40; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 2; + } + else if (this.type == 595) + { + this.width = 68; + this.height = 64; + this.aiStyle = 75; + this.friendly = true; + this.tileCollide = false; + this.melee = true; + this.penetrate = -1; + this.ownerHitCheck = true; + } + else if (this.type == 596) + { + this.width = 8; + this.height = 8; + this.aiStyle = 107; + this.hostile = true; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.timeLeft = 180; + this.tileCollide = false; + } + else if (this.type == 597) + { + this.width = 10; + this.height = 10; + this.aiStyle = 29; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.penetrate = 2; + this.friendly = true; + } + else if (this.type == 598) + { + this.width = 16; + this.height = 16; + this.aiStyle = 113; + this.friendly = true; + this.ranged = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.hide = true; + } + else if (this.type == 599) + { + this.width = 22; + this.height = 22; + this.aiStyle = 2; + this.friendly = true; + this.penetrate = 6; + this.ranged = true; + } + else if (this.type == 600) + { + this.width = 14; + this.height = 14; + this.aiStyle = 75; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ignoreWater = true; + } + else if (this.type == 601) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.friendly = true; + this.extraUpdates = 30; + } + else if (this.type == 602) + { + this.width = 10; + this.height = 10; + this.aiStyle = 114; + this.alpha = (int) byte.MaxValue; + this.friendly = true; + this.tileCollide = false; + this.netImportant = true; + } + else if (this.type == 605) + { + this.alpha = (int) byte.MaxValue; + this.width = 6; + this.height = 6; + this.aiStyle = 1; + this.hostile = true; + this.penetrate = -1; + } + else if (this.type == 606) + { + this.width = 5; + this.height = 5; + this.aiStyle = 1; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 2; + this.scale = 1f; + this.timeLeft = 600; + this.ignoreWater = true; + } + else if (this.type == 607) + { + this.width = 10; + this.height = 10; + this.aiStyle = 116; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 600; + this.ignoreWater = true; + this.tileCollide = false; + this.penetrate = -1; + } + else if (this.type == 608) + { + this.width = 160; + this.height = 160; + this.aiStyle = 117; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 3; + this.ignoreWater = true; + this.tileCollide = false; + this.penetrate = -1; + this.hide = true; + } + else if (this.type == 611) + { + this.width = 16; + this.height = 16; + this.aiStyle = 75; + this.friendly = true; + this.melee = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.hide = true; + this.tileCollide = false; + this.ignoreWater = true; + this.usesLocalNPCImmunity = true; + this.noEnchantmentVisuals = true; + } + else if (this.type == 612) + { + this.width = 8; + this.height = 8; + this.aiStyle = 117; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.timeLeft = 60; + this.tileCollide = false; + this.penetrate = -1; + this.usesLocalNPCImmunity = true; + } + else if (this.type == 613) + { + this.netImportant = true; + this.width = 24; + this.height = 24; + this.aiStyle = 62; + this.penetrate = -1; + this.timeLeft *= 5; + this.minion = true; + this.friendly = true; + this.minionSlots = 1f; + this.ignoreWater = true; + } + else if (this.type == 614) + { + this.width = 16; + this.height = 16; + this.aiStyle = 113; + this.friendly = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 615) + { + this.width = 22; + this.height = 22; + this.aiStyle = 75; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ranged = true; + this.ignoreWater = true; + } + else if (this.type == 616) + { + this.width = 14; + this.height = 14; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 1; + this.alpha = (int) byte.MaxValue; + this.ranged = true; + this.extraUpdates = 2; + this.timeLeft = 90 * this.MaxUpdates; + } + else if (this.type == 617) + { + this.width = 32; + this.height = 32; + this.aiStyle = 118; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.hide = true; + this.magic = true; + this.penetrate = 3; + this.usesLocalNPCImmunity = true; + } + else if (this.type == 618) + { + this.tileCollide = false; + this.width = 18; + this.height = 30; + this.aiStyle = 119; + this.penetrate = -1; + this.timeLeft = 420; + this.magic = true; + this.friendly = true; + this.usesLocalNPCImmunity = true; + } + else if (this.type == 619) + { + this.width = 14; + this.height = 14; + this.aiStyle = 29; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.penetrate = 1; + this.friendly = true; + } + else if (this.type == 620) + { + this.width = 8; + this.height = 8; + this.aiStyle = 29; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.penetrate = 1; + this.friendly = true; + } + else if (this.type == 622) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 2; + } + else if (this.type == 623) + { + this.netImportant = true; + this.width = 50; + this.height = 80; + this.aiStyle = 120; + this.penetrate = -1; + this.timeLeft *= 5; + this.minion = true; + this.friendly = true; + this.minionSlots = 0.0f; + this.ignoreWater = true; + this.tileCollide = false; + this.netImportant = true; + this.manualDirectionChange = true; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 5; + } + else if (this.type == 624) + { + this.width = 8; + this.height = 8; + this.aiStyle = 117; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.timeLeft = 60; + this.tileCollide = false; + this.penetrate = -1; + } + else if (this.type >= 625 && this.type <= 628) + { + if (this.type == 625 || this.type == 628) + this.netImportant = true; + if (this.type == 626 || this.type == 627) + this.minionSlots = 0.5f; + this.width = 24; + this.height = 24; + this.aiStyle = 121; + this.penetrate = -1; + this.timeLeft *= 5; + this.minion = true; + this.friendly = true; + this.ignoreWater = true; + this.tileCollide = false; + this.alpha = (int) byte.MaxValue; + this.hide = true; + this.netImportant = true; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 7; + } + else if (this.type == 629) + { + this.width = 8; + this.height = 8; + this.aiStyle = 122; + this.hostile = true; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.timeLeft = 3600; + this.tileCollide = false; + this.penetrate = -1; + this.extraUpdates = 2; + } + else if (this.type == 630 || this.type == 705) + { + this.width = 22; + this.height = 22; + this.aiStyle = 75; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ranged = true; + this.ignoreWater = true; + } + else if (this.type == 631) + { + this.arrow = true; + this.width = 10; + this.height = 10; + this.aiStyle = 122; + this.friendly = true; + this.ranged = true; + this.tileCollide = false; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.extraUpdates = 1; + this.timeLeft = 1200; + } + else if (this.type == 633) + { + this.width = 14; + this.height = 18; + this.aiStyle = 75; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.magic = true; + this.ignoreWater = true; + } + else if (this.type == 632) + { + this.width = 18; + this.height = 18; + this.aiStyle = 84; + this.friendly = true; + this.magic = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.tileCollide = false; + } + else if (this.type == 634) + { + this.width = 40; + this.height = 40; + this.aiStyle = 1; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.extraUpdates = 2; + this.magic = true; + } + else if (this.type == 635) + { + this.width = 40; + this.height = 40; + this.aiStyle = 1; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.friendly = true; + this.extraUpdates = 3; + this.magic = true; + } + else if (this.type == 636) + { + this.width = 16; + this.height = 16; + this.aiStyle = 113; + this.friendly = true; + this.melee = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.hide = true; + this.MaxUpdates = 2; + } + else if (this.type == 637) + { + this.width = 10; + this.height = 10; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + } + else if (this.type == 638) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 5; + this.timeLeft = 600; + this.ranged = true; + this.ignoreWater = true; + this.usesLocalNPCImmunity = true; + this.penetrate = -1; + } + else if (this.type == 639) + { + this.arrow = true; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.ranged = true; + this.MaxUpdates = 2; + this.timeLeft = this.MaxUpdates * 45; + this.ignoreWater = true; + this.usesLocalNPCImmunity = true; + this.alpha = (int) byte.MaxValue; + this.penetrate = 4; + } + else if (this.type == 640) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.ranged = true; + this.MaxUpdates = 3; + this.timeLeft = 90; + this.ignoreWater = true; + this.usesLocalNPCImmunity = true; + this.alpha = (int) byte.MaxValue; + this.penetrate = 4; + } + else if (this.type == 642) + { + this.width = 18; + this.height = 18; + this.aiStyle = 84; + this.friendly = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.tileCollide = false; + this.usesLocalNPCImmunity = true; + } + else if (this.type == 641) + { + this.width = 32; + this.height = 32; + this.aiStyle = 123; + this.timeLeft = 7200; + this.ignoreWater = true; + this.tileCollide = false; + this.alpha = (int) byte.MaxValue; + this.hide = true; + this.sentry = true; + } + else if (this.type == 643) + { + this.width = 32; + this.height = 32; + this.aiStyle = 123; + this.timeLeft = 7200; + this.ignoreWater = true; + this.tileCollide = false; + this.alpha = (int) byte.MaxValue; + this.sentry = true; + } + else if (this.type == 644) + { + this.width = 14; + this.height = 14; + this.aiStyle = 112; + this.penetrate = 1; + this.timeLeft = 900; + this.tileCollide = false; + this.ignoreWater = true; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 645) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.magic = true; + this.tileCollide = false; + this.extraUpdates = 5; + this.penetrate = -1; + this.usesLocalNPCImmunity = true; + } + else if (this.type >= 646 && this.type <= 649) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 7; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft *= 10; + } + else if (this.type == 650) + { + this.width = 20; + this.height = 20; + this.aiStyle = 124; + this.penetrate = -1; + this.netImportant = true; + this.timeLeft *= 5; + this.friendly = true; + this.ignoreWater = true; + this.tileCollide = false; + this.manualDirectionChange = true; + } + else if (this.type == 651) + { + this.width = 10; + this.height = 10; + this.aiStyle = 125; + this.friendly = true; + this.ignoreWater = true; + this.tileCollide = false; + this.penetrate = -1; + } + else if (this.type == 652) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 7; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft *= 10; + } + else if (this.type == 653) + { + this.width = 30; + this.height = 30; + this.aiStyle = 67; + this.penetrate = -1; + this.netImportant = true; + this.timeLeft *= 5; + this.friendly = true; + this.ignoreWater = true; + this.scale = 0.8f; + } + else if (this.type == 654) + { + this.width = 30; + this.height = 30; + this.aiStyle = 126; + this.alpha = (int) byte.MaxValue; + this.tileCollide = false; + this.ignoreWater = true; + this.timeLeft = 120; + this.friendly = true; + this.hostile = true; + this.penetrate = -1; + this.trap = true; + } + else if (this.type == 655) + { + this.width = 31; + this.height = 31; + this.aiStyle = 25; + this.friendly = true; + this.hostile = true; + this.penetrate = -1; + this.trap = true; + } + else if (this.type == 656) + { + this.width = 10; + this.height = 10; + this.aiStyle = (int) sbyte.MaxValue; + this.friendly = true; + this.magic = true; + this.tileCollide = false; + this.penetrate = -1; + this.usesLocalNPCImmunity = true; + this.timeLeft = 1200; + } + else if (this.type == 657) + { + this.width = 10; + this.height = 10; + this.aiStyle = (int) sbyte.MaxValue; + this.hostile = true; + this.tileCollide = false; + this.penetrate = -1; + this.timeLeft = 1200; + } + else if (this.type == 658) + { + this.width = 14; + this.height = 14; + this.aiStyle = 128; + this.penetrate = 1; + this.timeLeft = 900; + this.tileCollide = false; + this.ignoreWater = true; + this.alpha = (int) byte.MaxValue; + this.hostile = true; + } + else if (this.type == 659) + { + this.width = 8; + this.height = 8; + this.aiStyle = 129; + this.friendly = true; + this.magic = true; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.timeLeft = 180; + this.tileCollide = false; + this.penetrate = -1; + } + else if (this.type == 660) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 600; + this.magic = true; + this.ignoreWater = true; + } + else if (this.type == 661) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 40; + this.extraUpdates = 1; + this.ranged = true; + this.ignoreWater = true; + this.usesLocalNPCImmunity = true; + } + else if (this.type == 662 || this.type == 685) + { + this.width = 16; + this.height = 16; + this.aiStyle = 1; + this.hostile = true; + this.penetrate = -1; + } + else if (this.type == 663 || this.type == 665 || this.type == 667) + { + this.width = 30; + this.height = 54; + this.aiStyle = 130; + this.timeLeft = 7200; + this.ignoreWater = true; + this.tileCollide = false; + this.manualDirectionChange = true; + switch (this.type) + { + case 665: + this.height = 58; + this.width = 28; + break; + case 667: + this.height = 60; + this.width = 28; + break; + } + this.sentry = true; + this.netImportant = true; + } + else if (this.type == 664 || this.type == 666 || this.type == 668) + { + this.width = 16; + this.height = 16; + this.aiStyle = 131; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = -1; + } + else if (this.type == 669) + { + this.width = 14; + this.height = 14; + this.aiStyle = 68; + this.friendly = true; + this.penetrate = 1; + this.alpha = (int) byte.MaxValue; + this.ranged = true; + this.noEnchantments = true; + } + else if (this.type == 670) + { + this.width = 30; + this.height = 30; + this.aiStyle = 126; + this.alpha = (int) byte.MaxValue; + this.tileCollide = false; + this.ignoreWater = true; + this.timeLeft = 120; + this.hostile = true; + this.penetrate = -1; + } + else if (this.type == 671) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.friendly = false; + this.hostile = true; + } + else if (this.type == 672) + { + this.width = 10; + this.height = 10; + this.aiStyle = 132; + this.alpha = (int) byte.MaxValue; + this.tileCollide = false; + this.ignoreWater = true; + this.timeLeft = 900; + this.hostile = true; + this.penetrate = -1; + } + else if (this.type == 674 || this.type == 673) + { + this.width = 10; + this.height = 10; + this.aiStyle = 133; + this.alpha = (int) byte.MaxValue; + this.tileCollide = false; + this.ignoreWater = true; + this.timeLeft = 900; + this.hostile = true; + this.penetrate = -1; + this.hide = true; + } + else if (this.type == 675) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.friendly = false; + this.hostile = true; + } + else if (this.type == 676) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.friendly = false; + this.hostile = true; + } + else if (this.type == 677 || this.type == 678 || this.type == 679) + { + this.width = 26; + this.height = 54; + this.aiStyle = 134; + this.timeLeft = 7200; + this.ignoreWater = true; + this.tileCollide = false; + this.manualDirectionChange = true; + this.sentry = true; + this.netImportant = true; + } + else if (this.type == 680) + { + this.width = 16; + this.height = 16; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 4; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = -1; + } + else if (this.type == 681) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.hostile = true; + this.penetrate = -1; + this.ranged = true; + } + else if (this.type == 682) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.hostile = true; + this.ignoreWater = true; + this.timeLeft = 30; + this.scale = 1.2f; + } + else if (this.type == 683) + { + this.width = 30; + this.height = 30; + this.aiStyle = 135; + this.alpha = (int) byte.MaxValue; + this.tileCollide = false; + this.ignoreWater = true; + this.timeLeft = 120; + this.hostile = true; + this.penetrate = -1; + } + else if (this.type == 684) + { + this.width = 16; + this.height = 16; + this.aiStyle = 1; + this.melee = true; + this.penetrate = 5; + this.alpha = (int) byte.MaxValue; + this.friendly = true; + this.tileCollide = false; + } + else if (this.type == 686) + { + this.width = 30; + this.height = 30; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.friendly = false; + this.hostile = true; + } + else if (this.type == 687) + { + this.width = 30; + this.height = 30; + this.aiStyle = 136; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.friendly = false; + this.hostile = true; + } + else if (this.type == 688 || this.type == 689 || this.type == 690) + { + this.width = 16; + this.height = 16; + this.aiStyle = 137; + this.friendly = true; + this.ignoreWater = true; + this.usesLocalNPCImmunity = true; + this.timeLeft = 7200; + this.localNPCHitCooldown = 3; + this.tileCollide = false; + this.penetrate = -1; + this.sentry = true; + this.netImportant = true; + } + else if (this.type == 691 || this.type == 692 || this.type == 693) + { + this.width = 16; + this.height = 16; + this.aiStyle = 138; + this.ignoreWater = true; + this.friendly = true; + this.timeLeft = 7200; + this.tileCollide = false; + this.penetrate = -1; + this.hide = true; + this.sentry = true; + this.netImportant = true; + } + else if (this.type == 694 || this.type == 695 || this.type == 696) + { + this.aiStyle = 139; + this.friendly = true; + this.tileCollide = false; + this.penetrate = -1; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 30; + this.alpha = (int) byte.MaxValue; + this.width = 96; + this.height = 96; + } + else if (this.type == 697) + { + this.width = 16; + this.height = 16; + this.aiStyle = 140; + this.friendly = true; + this.melee = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.hide = true; + this.tileCollide = false; + this.ignoreWater = true; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 12; + this.ownerHitCheck = true; + } + else if (this.type == 698) + { + this.width = 50; + this.height = 200; + this.aiStyle = 141; + this.alpha = (int) byte.MaxValue; + this.tileCollide = false; + this.ignoreWater = true; + this.timeLeft = 120; + this.friendly = true; + this.penetrate = -1; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = -1; + this.melee = true; + } + else if (this.type == 699) + { + this.width = 24; + this.height = 24; + this.aiStyle = 142; + this.friendly = true; + this.melee = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.hide = true; + this.tileCollide = false; + this.ignoreWater = true; + this.usesIDStaticNPCImmunity = true; + this.idStaticNPCHitCooldown = 36; + this.ownerHitCheck = true; + } + else if (this.type == 700) + { + this.width = 40; + this.height = 40; + this.aiStyle = 143; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.friendly = true; + this.melee = true; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = -1; + this.ignoreWater = true; + this.tileCollide = false; + } + else if (this.type == 703 || this.type == 701 || this.type == 702) + { + this.width = 20; + this.height = 20; + this.aiStyle = 144; + this.penetrate = -1; + this.netImportant = true; + this.timeLeft *= 5; + this.scale = 1f; + this.friendly = true; + this.ignoreWater = true; + this.tileCollide = false; + this.manualDirectionChange = true; + } + else if (this.type == 704) + { + this.width = 60; + this.height = 210; + this.aiStyle = 145; + this.friendly = true; + this.magic = true; + this.tileCollide = false; + this.penetrate = -1; + this.usesLocalNPCImmunity = true; + this.timeLeft = 600; + this.localNPCHitCooldown = -1; + this.ignoreWater = true; + } + else if (this.type == 706) + { + this.width = 66; + this.height = 66; + this.aiStyle = 1; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 300; + this.ranged = true; + this.usesLocalNPCImmunity = true; + this.penetrate = -1; + this.localNPCHitCooldown = 10; + } + else if (this.type == 707) + { + this.width = 16; + this.height = 16; + this.aiStyle = 140; + this.friendly = true; + this.melee = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.hide = true; + this.tileCollide = false; + this.ignoreWater = true; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 6; + this.ownerHitCheck = true; + } + else if (this.type == 708) + { + this.width = 24; + this.height = 24; + this.aiStyle = 142; + this.friendly = true; + this.melee = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + this.hide = true; + this.tileCollide = false; + this.ignoreWater = true; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 6; + this.ownerHitCheck = true; + } + else if (this.type == 709) + { + this.width = 12; + this.height = 12; + this.aiStyle = 1; + this.friendly = true; + this.melee = true; + this.alpha = (int) byte.MaxValue; + this.ignoreWater = true; + this.extraUpdates = 1; + this.noEnchantments = true; + this.scale = 0.6f; + } + else if (this.type == 710) + { + this.arrow = true; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.ranged = true; + this.ignoreWater = true; + this.extraUpdates = 1; + this.timeLeft = this.extraUpdates * 60 * 5; + this.usesLocalNPCImmunity = true; + this.alpha = (int) byte.MaxValue; + this.localNPCHitCooldown = -1; + } + else if (this.type == 711) + { + this.width = 30; + this.height = 30; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.friendly = true; + this.magic = true; + this.extraUpdates = 1; + this.scale = 0.7f; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = -1; + } + else if (this.type == 712) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 600; + this.magic = true; + this.extraUpdates = 1; + } + else if (this.type == 713) + { + this.width = 10; + this.height = 10; + this.aiStyle = 146; + this.alpha = (int) byte.MaxValue; + this.tileCollide = false; + this.ignoreWater = true; + this.timeLeft = 900; + this.hostile = true; + this.penetrate = -1; + } + else if (this.type == 714) + { + this.width = 22; + this.height = 22; + this.aiStyle = 75; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.hide = true; + this.ranged = true; + this.ignoreWater = true; + } + else if (this.type == 715 || this.type == 717) + { + this.width = 14; + this.height = 14; + this.aiStyle = 147; + this.friendly = true; + this.penetrate = 1; + this.alpha = (int) byte.MaxValue; + this.ranged = true; + this.extraUpdates = 2; + this.timeLeft = 360 * this.MaxUpdates; + } + else if (this.type == 716 || this.type == 718) + { + this.width = 14; + this.height = 14; + this.aiStyle = 147; + this.friendly = true; + this.penetrate = 1; + this.alpha = (int) byte.MaxValue; + this.ranged = true; + this.extraUpdates = 2; + this.timeLeft = 360 * this.MaxUpdates; + } + else if (this.type == 719) + { + this.width = 10; + this.height = 10; + this.hostile = true; + this.penetrate = -1; + this.aiStyle = 1; + this.tileCollide = true; + } + else if (this.type == 720) + { + this.width = 16; + this.height = 16; + this.aiStyle = 148; + this.tileCollide = false; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 721 || this.type == 739 || this.type == 740 || this.type == 741 || this.type == 742 || this.type == 743 || this.type == 744 || this.type == 745 || this.type == 746 || this.type == 747 || this.type == 748 || this.type == 749 || this.type == 750 || this.type == 751 || this.type == 752) + { + this.netImportant = true; + this.width = 7; + this.height = 7; + this.friendly = true; + this.penetrate = -1; + this.aiStyle = 149; + this.tileCollide = false; + } + else if (this.type == 722) + { + this.width = 2; + this.height = 2; + this.aiStyle = 150; + this.tileCollide = false; + this.ignoreWater = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 723 || this.type == 724 || this.type == 725 || this.type == 726) + { + this.width = 24; + this.height = 24; + this.aiStyle = 5; + this.friendly = true; + this.penetrate = 2; + this.alpha = 50; + this.tileCollide = false; + } + else if (this.type == 728) + { + this.width = 24; + this.height = 24; + this.aiStyle = 151; + this.alpha = (int) byte.MaxValue; + this.tileCollide = true; + this.ranged = true; + this.friendly = true; + this.penetrate = -1; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = -1; + } + else if (this.type == 729) + { + this.width = 20; + this.height = 20; + this.aiStyle = 152; + this.friendly = true; + this.tileCollide = false; + this.ignoreWater = true; + this.ranged = true; + this.penetrate = -1; + this.scale = (float) (1.0 + (double) Main.rand.Next(30) * 0.00999999977648258); + this.extraUpdates = 2; + this.timeLeft = 10 * this.MaxUpdates; + } + else if (this.type == 730) + { + this.width = 18; + this.height = 18; + this.aiStyle = 19; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1f; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 731) + { + this.width = 10; + this.height = 10; + this.aiStyle = 29; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.friendly = true; + this.extraUpdates = 1; + this.timeLeft = 90; + } + else if (this.type == 732) + { + this.tileCollide = true; + this.width = 15; + this.height = 15; + this.aiStyle = 44; + this.friendly = true; + this.penetrate = 1; + this.melee = true; + this.noEnchantmentVisuals = true; + } + else if (this.type == 733) + { + this.width = 2; + this.height = 2; + this.aiStyle = 153; + this.tileCollide = false; + this.ignoreWater = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 734) + { + this.width = 30; + this.height = 24; + this.aiStyle = 154; + this.tileCollide = false; + this.timeLeft = 10800; + this.alpha = (int) byte.MaxValue; + this.hide = true; + } + else if (this.type == 735) + { + this.width = 68; + this.height = 64; + this.aiStyle = 75; + this.friendly = true; + this.tileCollide = false; + this.melee = true; + this.penetrate = -1; + this.ownerHitCheck = true; + } + else if (this.type == 736 || this.type == 737 || this.type == 738) + { + this.knockBack = 6f; + this.width = 10; + this.height = 10; + this.aiStyle = 10; + this.penetrate = -1; + } + else if (this.type == 753) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 7; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft *= 10; + } + else if (this.type == 754) + { + this.width = 16; + this.height = 16; + this.aiStyle = 155; + this.tileCollide = false; + this.ignoreWater = true; + this.penetrate = -1; + this.alpha = (int) byte.MaxValue; + } + else if (this.type == 755) + { + this.netImportant = true; + this.width = 10; + this.height = 10; + this.penetrate = -1; + this.ignoreWater = true; + this.tileCollide = false; + this.friendly = true; + this.minion = true; + this.minionSlots = 1f; + this.timeLeft *= 5; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 15; + this.aiStyle = 156; + } + else if (this.type == 756) + { + this.width = 32; + this.height = 32; + this.aiStyle = 157; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.tileCollide = false; + this.ignoreWater = true; + this.penetrate = 2; + } + else if (this.type == 757) + { + this.netImportant = true; + this.width = 34; + this.height = 34; + this.aiStyle = 15; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 10; + } + else if (this.type == 758) + { + this.width = 20; + this.height = 30; + this.aiStyle = 67; + this.penetrate = -1; + this.netImportant = true; + this.timeLeft *= 5; + this.minion = true; + this.minionSlots = 1f; + this.decidesManualFallThrough = true; + } + else if (this.type == 759) + { + this.netImportant = true; + this.width = 10; + this.height = 10; + this.penetrate = -1; + this.ignoreWater = true; + this.tileCollide = true; + this.friendly = true; + this.minion = true; + this.minionSlots = 1f; + this.timeLeft *= 5; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 15; + this.aiStyle = 158; + this.hide = true; + } + else if (this.type == 761 || this.type == 762) + { + this.width = 10; + this.height = 10; + this.aiStyle = 159; + this.friendly = true; + this.manualDirectionChange = true; + } + else if (this.type == 763) + { + this.width = 10; + this.height = 10; + this.hostile = true; + this.friendly = true; + this.penetrate = -1; + this.aiStyle = 1; + this.tileCollide = true; + this.extraUpdates = 1; + } + else if (this.type == 764) + { + this.width = 20; + this.height = 20; + this.aiStyle = 144; + this.penetrate = -1; + this.netImportant = true; + this.timeLeft *= 5; + this.friendly = true; + this.ignoreWater = true; + this.tileCollide = false; + this.manualDirectionChange = true; + } + else if (this.type == 765) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type >= 766 && this.type <= 770 || this.type == 771) + { + this.width = 4; + this.height = 4; + this.aiStyle = 160; + this.penetrate = -1; + this.extraUpdates = 60; + } + else if (this.type == 772) + { + this.width = 22; + this.height = 22; + this.friendly = true; + this.aiStyle = 1; + this.tileCollide = true; + this.extraUpdates = 1; + } + else if (this.type == 773) + { + this.width = 22; + this.height = 22; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + } + else if (this.type == 774) + { + this.netImportant = true; + this.width = 26; + this.height = 26; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 802) + { + this.width = 18; + this.height = 18; + this.aiStyle = 161; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1f; + this.ownerHitCheck = true; + this.melee = true; + this.extraUpdates = 1; + this.hide = true; + } + else if (this.type == 811 || this.type == 814) + { + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.friendly = false; + this.hostile = true; + } + else if (this.type >= 776 && this.type <= 801 || this.type >= 803 && this.type <= 810) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.ranged = true; + if (this.type == 777 || this.type == 781 || this.type == 794 || this.type == 797 || this.type == 800 || this.type == 785 || this.type == 788 || this.type == 800) + { + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = -1; + } + } + else if (this.type == 812) + { + this.knockBack = 6f; + this.width = 10; + this.height = 10; + this.aiStyle = 10; + this.friendly = true; + this.hostile = true; + this.penetrate = -1; + } + else if (this.type == 815) + { + this.netImportant = true; + this.width = 26; + this.height = 26; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 816) + { + this.netImportant = true; + this.width = 26; + this.height = 32; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 817) + { + this.netImportant = true; + this.width = 26; + this.height = 26; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 819) + { + this.arrow = true; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 1; + this.hide = true; + this.friendly = true; + } + else if (this.type == 818) + { + this.width = 32; + this.height = 32; + this.aiStyle = 162; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.tileCollide = false; + this.ignoreWater = true; + this.penetrate = -1; + this.extraUpdates = 3; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 10; + } + else if (this.type == 820) + { + this.width = 12; + this.height = 12; + this.friendly = true; + this.aiStyle = 163; + this.tileCollide = true; + this.netImportant = true; + this.penetrate = -1; + this.timeLeft = 86400; + } + else if (this.type == 821) + { + this.netImportant = true; + this.width = 20; + this.height = 36; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type >= 822 && this.type <= 824) + { + this.netImportant = true; + this.width = 4; + this.height = 4; + this.aiStyle = 160; + this.penetrate = -1; + this.extraUpdates = 60; + } + else if (this.type == 825) + { + this.netImportant = true; + this.width = 26; + this.height = 32; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type >= 826 && this.type <= 830) + { + this.netImportant = true; + this.width = 4; + this.height = 4; + this.aiStyle = 160; + this.penetrate = -1; + this.extraUpdates = 60; + } + else if (this.type == 836) + { + this.width = 4; + this.height = 4; + this.aiStyle = 112; + this.hostile = true; + } + else if (this.type == 831) + { + this.netImportant = true; + this.width = 10; + this.height = 10; + this.penetrate = -1; + this.ignoreWater = true; + this.tileCollide = false; + this.friendly = true; + this.minion = true; + this.minionSlots = 1f; + this.timeLeft = 60; + this.aiStyle = 164; + this.hide = true; + } + else if (this.type == 833) + { + this.width = 26; + this.height = 20; + this.aiStyle = 67; + this.penetrate = -1; + this.netImportant = true; + this.timeLeft *= 5; + this.minion = true; + this.minionSlots = 0.0f; + this.decidesManualFallThrough = true; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 10; + } + else if (this.type == 834) + { + this.width = 20; + this.height = 30; + this.aiStyle = 67; + this.penetrate = -1; + this.netImportant = true; + this.timeLeft *= 5; + this.minion = true; + this.minionSlots = 0.0f; + this.decidesManualFallThrough = true; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 10; + } + else if (this.type == 835) + { + this.width = 20; + this.height = 30; + this.aiStyle = 67; + this.penetrate = -1; + this.netImportant = true; + this.timeLeft *= 5; + this.minion = true; + this.minionSlots = 0.0f; + this.decidesManualFallThrough = true; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 10; + } + else if (this.type == 837) + { + this.width = 26; + this.height = 26; + this.aiStyle = 1; + this.alpha = (int) byte.MaxValue; + this.friendly = true; + this.magic = true; + this.penetrate = 3; + } + else if (this.type >= 838 && this.type <= 840) + { + this.netImportant = true; + this.width = 4; + this.height = 4; + this.aiStyle = 160; + this.penetrate = -1; + this.extraUpdates = 60; + } + else if (this.type == 841) + this.DefaultToWhip(); + else if (this.type == 842) + { + this.width = 18; + this.height = 18; + this.aiStyle = 161; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1f; + this.ownerHitCheck = true; + this.melee = true; + this.extraUpdates = 1; + this.hide = true; + } + else if (this.type >= 843 && this.type <= 846) + { + this.netImportant = true; + this.width = 4; + this.height = 4; + this.aiStyle = 160; + this.penetrate = -1; + this.extraUpdates = 60; + } + else if (this.type == 847) + { + this.DefaultToWhip(); + this.extraUpdates = 2; + } + else if (this.type == 848) + this.DefaultToWhip(); + else if (this.type == 849) + { + this.DefaultToWhip(); + this.extraUpdates = 2; + } + else if (this.type == 850) + { + this.netImportant = true; + this.width = 4; + this.height = 4; + this.aiStyle = 160; + this.penetrate = -1; + this.extraUpdates = 60; + } + else if (this.type == 851) + { + this.netImportant = true; + this.width = 4; + this.height = 4; + this.aiStyle = 166; + this.penetrate = -1; + this.timeLeft = 300; + } + else if (this.type >= 852 && this.type <= 853) + { + this.netImportant = true; + this.width = 4; + this.height = 4; + this.aiStyle = 160; + this.penetrate = -1; + this.extraUpdates = 60; + } + else if (this.type == 854) + { + this.netImportant = true; + this.width = 26; + this.height = 32; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 855) + { + this.netImportant = true; + this.width = 12; + this.height = 12; + this.aiStyle = 166; + this.penetrate = -1; + this.timeLeft = 1000; + } + else if (this.type == 856) + { + this.width = 32; + this.height = 32; + this.aiStyle = 167; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.magic = true; + this.tileCollide = false; + this.ignoreWater = true; + this.extraUpdates = 2; + this.usesLocalNPCImmunity = true; + } + else if (this.type == 857) + { + this.width = 32; + this.height = 32; + this.aiStyle = 168; + this.friendly = true; + this.alpha = (int) byte.MaxValue; + this.melee = true; + this.tileCollide = false; + this.ignoreWater = true; + this.extraUpdates = 1; + this.usesLocalNPCImmunity = true; + this.manualDirectionChange = true; + this.penetrate = -1; + this.hide = true; + } + else if (this.type == 858) + { + this.netImportant = true; + this.width = 26; + this.height = 20; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 859) + { + this.netImportant = true; + this.width = 20; + this.height = 32; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 860) + { + this.netImportant = true; + this.width = 20; + this.height = 20; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 861) + { + this.netImportant = true; + this.width = 10; + this.height = 10; + this.aiStyle = 2; + this.friendly = true; + } + else if (this.type == 862 || this.type == 863) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.ranged = true; + } + else if (this.type == 864) + { + this.netImportant = true; + this.width = 10; + this.height = 10; + this.penetrate = -1; + this.usesLocalNPCImmunity = true; + this.ignoreWater = true; + this.tileCollide = false; + this.friendly = true; + this.minion = true; + this.minionSlots = 1f; + this.timeLeft = 60; + this.aiStyle = 169; + this.localNPCHitCooldown = 40; + } + else if (this.type == 865) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 7; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft *= 10; + } + else if (this.type == 866) + { + this.light = 0.15f; + this.width = 30; + this.height = 30; + this.aiStyle = 3; + this.friendly = true; + this.penetrate = 5; + this.melee = true; + this.extraUpdates = 1; + this.usesLocalNPCImmunity = true; + } + else if (this.type == 867) + { + this.width = 22; + this.height = 22; + this.aiStyle = 3; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.light = 0.6f; + } + else if (this.type == 868 || this.type == 869) + { + this.width = 18; + this.height = 18; + this.aiStyle = 2; + this.friendly = true; + this.penetrate = 1; + } + else if (this.type == 870) + { + this.netImportant = true; + this.width = 6; + this.height = 6; + this.aiStyle = 14; + this.penetrate = -1; + this.alpha = 75; + this.light = 1f; + this.timeLeft *= 5; + } + else if (this.type == 873) + { + this.width = 30; + this.height = 30; + this.aiStyle = 171; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.friendly = false; + this.hostile = true; + this.timeLeft = 200; + this.tileCollide = false; + this.ignoreWater = true; + } + else if (this.type == 874) + { + this.width = 30; + this.height = 30; + this.aiStyle = 0; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.friendly = false; + this.hostile = true; + this.timeLeft = 210; + this.tileCollide = false; + this.ignoreWater = true; + } + else if (this.type == 871) + { + this.width = 30; + this.height = 30; + this.aiStyle = 172; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.friendly = false; + this.hostile = true; + this.timeLeft = 240; + this.tileCollide = false; + this.ignoreWater = true; + } + else if (this.type == 875) + { + this.netImportant = true; + this.width = 20; + this.height = 20; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 872) + { + this.width = 30; + this.height = 30; + this.aiStyle = 173; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.friendly = false; + this.hostile = true; + this.timeLeft = 660; + this.tileCollide = false; + this.ignoreWater = true; + } + else if (this.type == 876) + { + this.width = 4; + this.height = 4; + this.aiStyle = 1; + this.friendly = true; + this.penetrate = 8; + this.light = 0.75f; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 3; + this.scale = 1.4f; + this.timeLeft = 3600; + this.magic = true; + } + else if (this.type >= 877 && this.type <= 879) + { + this.netImportant = true; + this.width = 25; + this.height = 25; + this.aiStyle = 19; + this.alpha = (int) byte.MaxValue; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1f; + this.hide = true; + this.ownerHitCheck = true; + this.melee = true; + } + else if (this.type == 880) + { + this.width = 32; + this.height = 32; + this.aiStyle = 183; + this.penetrate = -1; + this.timeLeft = 18; + this.ignoreWater = true; + this.tileCollide = false; + this.friendly = true; + this.hostile = false; + this.manualDirectionChange = true; + } + else if (this.type == 881) + { + this.netImportant = true; + this.width = 20; + this.height = 20; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 882) + { + this.width = 20; + this.height = 20; + this.aiStyle = 124; + this.penetrate = -1; + this.netImportant = true; + this.timeLeft *= 5; + this.friendly = true; + this.ignoreWater = true; + this.tileCollide = false; + this.manualDirectionChange = true; + } + else if (this.type == 883) + { + this.width = 20; + this.height = 20; + this.aiStyle = 174; + this.penetrate = -1; + this.timeLeft *= 5; + this.friendly = true; + this.ignoreWater = true; + this.tileCollide = false; + this.netImportant = true; + } + else if (this.type >= 884 && this.type <= 886) + { + this.netImportant = true; + this.width = 20; + this.height = 20; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 887) + { + this.width = 20; + this.height = 20; + this.aiStyle = 174; + this.penetrate = -1; + this.timeLeft *= 5; + this.friendly = true; + this.ignoreWater = true; + this.tileCollide = false; + this.netImportant = true; + } + else if (this.type == 888) + { + this.width = 20; + this.height = 20; + this.aiStyle = 124; + this.penetrate = -1; + this.netImportant = true; + this.timeLeft *= 5; + this.friendly = true; + this.ignoreWater = true; + this.tileCollide = false; + this.manualDirectionChange = true; + } + else if (this.type >= 889 && this.type <= 892) + { + this.netImportant = true; + this.width = 20; + this.height = 20; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 893) + { + this.width = 20; + this.height = 20; + this.aiStyle = 174; + this.penetrate = -1; + this.timeLeft *= 5; + this.friendly = true; + this.ignoreWater = true; + this.tileCollide = false; + this.netImportant = true; + } + else if (this.type == 894) + { + this.netImportant = true; + this.width = 20; + this.height = 20; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type >= 895 && this.type <= 896) + { + this.width = 20; + this.height = 20; + this.aiStyle = 124; + this.penetrate = -1; + this.netImportant = true; + this.timeLeft *= 5; + this.friendly = true; + this.ignoreWater = true; + this.tileCollide = false; + this.manualDirectionChange = true; + } + else if (this.type == 897) + { + this.netImportant = true; + this.width = 20; + this.height = 20; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 898) + { + this.width = 20; + this.height = 20; + this.aiStyle = 124; + this.penetrate = -1; + this.netImportant = true; + this.timeLeft *= 5; + this.friendly = true; + this.ignoreWater = true; + this.tileCollide = false; + this.manualDirectionChange = true; + } + else if (this.type >= 899 && this.type <= 901) + { + this.netImportant = true; + this.width = 20; + this.height = 20; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 902) + { + this.width = 20; + this.height = 20; + this.aiStyle = 3; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.MaxUpdates = 2; + } + else if (this.type >= 903 && this.type <= 906) + { + this.width = 22; + this.height = 22; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + } + else if (this.type == 907) + { + this.width = 22; + this.height = 22; + this.aiStyle = 30; + this.friendly = true; + this.penetrate = 2; + this.melee = true; + } + else if (this.type == 908) + { + this.tileCollide = false; + this.ignoreWater = true; + this.width = 14; + this.height = 14; + this.aiStyle = 175; + this.friendly = true; + this.penetrate = 1; + this.timeLeft = 3600; + this.hide = true; + } + else if (this.type == 909) + { + this.width = 12; + this.height = 12; + this.aiStyle = 2; + this.friendly = false; + this.hostile = true; + this.penetrate = 1; + } + else if (this.type == 910) + { + this.width = 22; + this.height = 22; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + } + else if (this.type == 911) + { + this.width = 22; + this.height = 22; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + } + else if (this.type >= 912 && this.type <= 915) + { + this.DefaultToWhip(); + if (this.type == 915) + this.extraUpdates = 2; + } + else if (this.type == 916) + { + this.width = 18; + this.height = 18; + this.aiStyle = 176; + this.friendly = true; + this.tileCollide = false; + this.penetrate = 2; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = -1; + this.extraUpdates = 2; + } + else if (this.type == 918) + { + this.aiStyle = 178; + this.friendly = true; + this.tileCollide = false; + this.penetrate = -1; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = -1; + this.alpha = (int) byte.MaxValue; + this.width = 96; + this.height = 96; + } + else if (this.type == 917) + { + this.width = 30; + this.height = 30; + this.aiStyle = 177; + this.friendly = true; + this.tileCollide = false; + this.penetrate = -1; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 20; + } + else if (this.type == 919) + { + this.width = 8; + this.height = 8; + this.aiStyle = 179; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.friendly = false; + this.hostile = true; + this.timeLeft = 240; + this.tileCollide = false; + this.ignoreWater = true; + } + else if (this.type == 920) + { + this.alpha = (int) byte.MaxValue; + this.width = 6; + this.height = 6; + this.aiStyle = 1; + this.hostile = true; + this.penetrate = 1; + } + else if (this.type == 921) + { + this.alpha = (int) byte.MaxValue; + this.width = 6; + this.height = 6; + this.aiStyle = 1; + this.hostile = true; + this.penetrate = 3; + } + else if (this.type == 922) + { + this.width = 30; + this.height = 30; + this.aiStyle = 135; + this.alpha = (int) byte.MaxValue; + this.tileCollide = false; + this.ignoreWater = true; + this.timeLeft = 120; + this.hostile = true; + this.penetrate = -1; + } + else if (this.type == 923) + { + this.width = 30; + this.height = 30; + this.aiStyle = 180; + this.alpha = (int) byte.MaxValue; + this.penetrate = -1; + this.friendly = false; + this.hostile = true; + this.timeLeft = 180; + this.tileCollide = false; + this.ignoreWater = true; + this.hide = true; + } + else if (this.type == 926) + { + this.alpha = (int) byte.MaxValue; + this.width = 12; + this.height = 12; + this.scale = 1f; + this.aiStyle = 1; + this.hostile = true; + this.penetrate = 2; + } + else if (this.type == 927) + { + this.width = 40; + this.height = 40; + this.aiStyle = 75; + this.friendly = true; + this.tileCollide = false; + this.melee = true; + this.penetrate = -1; + this.ownerHitCheck = true; + } + else if (this.type == 928) + { + this.netImportant = true; + this.width = 34; + this.height = 34; + this.aiStyle = 14; + this.friendly = true; + this.penetrate = 2; + this.melee = true; + this.timeLeft = 250; + } + else if (this.type == 929) + { + this.width = 32; + this.height = 32; + this.aiStyle = 183; + this.penetrate = -1; + this.timeLeft = 18; + this.ignoreWater = true; + this.tileCollide = false; + this.friendly = true; + this.hostile = false; + this.manualDirectionChange = true; + } + else if (this.type == 930) + { + this.width = 14; + this.height = 14; + this.aiStyle = 16; + this.friendly = true; + this.penetrate = -1; + this.ranged = true; + } + else if (this.type == 931) + { + this.width = 30; + this.height = 30; + this.aiStyle = 171; + this.alpha = (int) byte.MaxValue; + this.penetrate = 3; + this.friendly = true; + this.timeLeft = 240; + this.magic = true; + this.tileCollide = true; + this.ignoreWater = true; + this.extraUpdates = 1; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 60; + } + else if (this.type == 932) + { + this.ranged = true; + this.arrow = true; + this.width = 10; + this.height = 10; + this.aiStyle = 181; + this.penetrate = 5; + this.friendly = true; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = -1; + this.timeLeft = 120; + this.alpha = 0; + this.ignoreWater = true; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 60; + } + else if (this.type == 933) + { + this.width = 32; + this.height = 32; + this.aiStyle = 182; + this.friendly = true; + this.melee = true; + this.tileCollide = false; + this.ignoreWater = true; + this.alpha = (int) byte.MaxValue; + this.extraUpdates = 1; + this.usesLocalNPCImmunity = true; + this.manualDirectionChange = true; + this.localNPCHitCooldown = 15; + this.penetrate = -1; + this.noEnchantmentVisuals = true; + } + else if (this.type == 934) + { + this.netImportant = true; + this.width = 20; + this.height = 20; + this.aiStyle = 26; + this.friendly = true; + this.penetrate = -1; + this.timeLeft *= 5; + } + else if (this.type == 935) + { + this.netImportant = true; + this.width = 18; + this.height = 18; + this.aiStyle = 7; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.timeLeft *= 10; + this.extraUpdates = 3; + } + else if (this.type == 936) + { + this.width = 14; + this.height = 14; + this.aiStyle = 2; + this.friendly = true; + this.penetrate = 1; + this.Opacity = 0.6f; + } + else if (this.type == 937) + { + this.alpha = (int) byte.MaxValue; + this.width = 10; + this.height = 10; + this.aiStyle = 1; + this.hostile = false; + this.friendly = true; + this.penetrate = 3; + this.usesIDStaticNPCImmunity = true; + this.idStaticNPCHitCooldown = 10; + } + else if (this.type >= 938 && this.type <= 945) + { + this.width = 18; + this.height = 18; + this.aiStyle = 161; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1f; + this.ownerHitCheck = true; + this.melee = true; + this.extraUpdates = 1; + this.timeLeft = 360; + this.hide = true; + } + else if (this.type == 946) + { + this.netImportant = true; + this.width = 10; + this.height = 10; + this.penetrate = -1; + this.ignoreWater = true; + this.tileCollide = false; + this.friendly = true; + this.minion = true; + this.minionSlots = 1f; + this.timeLeft *= 5; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 15; + this.aiStyle = 156; + this.scale = 0.75f; + this.manualDirectionChange = true; + this.hide = true; + } + else if (this.type == 947 || this.type == 948) + { + this.netImportant = true; + this.width = 20; + this.height = 20; + this.aiStyle = 15; + this.friendly = true; + this.penetrate = -1; + this.melee = true; + this.scale = 1f; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = 10; + } + else if (this.type == 949) + { + this.width = 4; + this.height = 4; + this.aiStyle = 184; + this.penetrate = -1; + this.hostile = true; + this.tileCollide = false; + } + else + this.active = false; + this.width = (int) ((double) this.width * (double) this.scale); + this.height = (int) ((double) this.height * (double) this.scale); + this.maxPenetrate = this.penetrate; + } + + private void DefaultToWhip() + { + this.width = 18; + this.height = 18; + this.aiStyle = 165; + this.friendly = true; + this.penetrate = -1; + this.tileCollide = false; + this.scale = 1f; + this.ownerHitCheck = true; + this.extraUpdates = 1; + this.usesLocalNPCImmunity = true; + this.localNPCHitCooldown = -1; + } + + public static int GetNextSlot() + { + int num = 1000; + for (int index = 0; index < 1000; ++index) + { + if (!Main.projectile[index].active) + { + num = index; + break; + } + } + return num; + } + + public static int NewProjectile( + Vector2 position, + Vector2 velocity, + int Type, + int Damage, + float KnockBack, + int Owner = 255, + float ai0 = 0.0f, + float ai1 = 0.0f) + { + return Projectile.NewProjectile(position.X, position.Y, velocity.X, velocity.Y, Type, Damage, KnockBack, Owner, ai0, ai1); + } + + public static int FindOldestProjectile() + { + int num1 = 1000; + int num2 = 9999999; + for (int index = 0; index < 1000; ++index) + { + if (!Main.projectile[index].netImportant && Main.projectile[index].timeLeft < num2) + { + num1 = index; + num2 = Main.projectile[index].timeLeft; + } + } + return num1; + } + + public static int NewProjectile( + float X, + float Y, + float SpeedX, + float SpeedY, + int Type, + int Damage, + float KnockBack, + int Owner = 255, + float ai0 = 0.0f, + float ai1 = 0.0f) + { + int number = 1000; + for (int index = 0; index < 1000; ++index) + { + if (!Main.projectile[index].active) + { + number = index; + break; + } + } + if (number == 1000) + number = Projectile.FindOldestProjectile(); + Projectile projectile = Main.projectile[number]; + projectile.SetDefaults(Type); + projectile.position.X = X - (float) projectile.width * 0.5f; + projectile.position.Y = Y - (float) projectile.height * 0.5f; + projectile.owner = Owner; + projectile.velocity.X = SpeedX; + projectile.velocity.Y = SpeedY; + projectile.damage = Damage; + projectile.knockBack = KnockBack; + projectile.identity = number; + projectile.gfxOffY = 0.0f; + projectile.stepSpeed = 1f; + projectile.wet = Collision.WetCollision(projectile.position, projectile.width, projectile.height); + if (projectile.ignoreWater) + projectile.wet = false; + projectile.honeyWet = Collision.honey; + Main.projectileIdentity[Owner, number] = number; + if (projectile.aiStyle == 1) + { + for (; (double) projectile.velocity.X >= 16.0 || (double) projectile.velocity.X <= -16.0 || (double) projectile.velocity.Y >= 16.0 || (double) projectile.velocity.Y < -16.0; projectile.velocity.Y *= 0.97f) + projectile.velocity.X *= 0.97f; + } + if (Owner == Main.myPlayer) + { + switch (Type) + { + case 206: + projectile.ai[0] = (float) Main.rand.Next(-100, 101) * 0.0005f; + projectile.ai[1] = (float) Main.rand.Next(-100, 101) * 0.0005f; + break; + case 335: + projectile.ai[1] = (float) Main.rand.Next(4); + break; + case 358: + projectile.ai[1] = (float) Main.rand.Next(10, 31) * 0.1f; + break; + case 406: + projectile.ai[1] = (float) Main.rand.Next(10, 21) * 0.1f; + break; + default: + projectile.ai[0] = ai0; + projectile.ai[1] = ai1; + break; + } + } + if (Type == 434) + { + projectile.ai[0] = projectile.position.X; + projectile.ai[1] = projectile.position.Y; + } + if (Type > 0 && Type < 950) + { + if (ProjectileID.Sets.NeedsUUID[Type]) + projectile.projUUID = projectile.identity; + if (ProjectileID.Sets.StardustDragon[Type]) + { + int projUuid = Main.projectile[(int) projectile.ai[0]].projUUID; + if (projUuid >= 0) + projectile.ai[0] = (float) projUuid; + } + } + if (Main.netMode != 0 && Owner == Main.myPlayer) + NetMessage.SendData(27, number: number); + if (Owner == Main.myPlayer) + { + if (ProjectileID.Sets.IsAGolfBall[Type] && Damage <= 0) + { + int num1 = 0; + int index1 = 0; + int num2 = 99999999; + for (int index2 = 0; index2 < 1000; ++index2) + { + if (Main.projectile[index2].active && ProjectileID.Sets.IsAGolfBall[Main.projectile[index2].type] && Main.projectile[index2].owner == Owner && Main.projectile[index2].damage <= 0) + { + ++num1; + if (num2 > Main.projectile[index2].timeLeft) + { + index1 = index2; + num2 = Main.projectile[index2].timeLeft; + } + } + } + if (num1 > 10) + Main.projectile[index1].Kill(); + } + if (Type == 28) + projectile.timeLeft = 180; + if (Type == 516) + projectile.timeLeft = 180; + if (Type == 519) + projectile.timeLeft = 180; + if (Type == 29) + projectile.timeLeft = 300; + if (Type == 470) + projectile.timeLeft = 300; + if (Type == 637) + projectile.timeLeft = 300; + if (Type == 30) + projectile.timeLeft = 180; + if (Type == 517) + projectile.timeLeft = 180; + if (Type == 37) + projectile.timeLeft = 180; + if (Type == 773) + projectile.timeLeft = 180; + if (Type == 75) + projectile.timeLeft = 180; + if (Type == 133) + projectile.timeLeft = 180; + if (Type == 136) + projectile.timeLeft = 180; + if (Type == 139) + projectile.timeLeft = 180; + if (Type == 142) + projectile.timeLeft = 180; + if (Type == 397) + projectile.timeLeft = 180; + if (Type == 419) + projectile.timeLeft = 600; + if (Type == 420) + projectile.timeLeft = 600; + if (Type == 421) + projectile.timeLeft = 600; + if (Type == 422) + projectile.timeLeft = 600; + if (Type == 588) + projectile.timeLeft = 180; + if (Type == 779) + projectile.timeLeft = 60; + if (Type == 783) + projectile.timeLeft = 60; + if (Type == 862 || Type == 863) + projectile.timeLeft = 60; + if (Type == 443) + projectile.timeLeft = 300; + if (Type == 681) + projectile.timeLeft = 600; + if (Type == 684) + projectile.timeLeft = 60; + if (Type == 706) + projectile.timeLeft = 120; + if (Type == 680 && Main.player[projectile.owner].setSquireT2) + projectile.penetrate = 7; + if (Type == 777 || Type == 781 || Type == 794 || Type == 797 || Type == 800 || Type == 785 || Type == 788 || Type == 791 || Type == 903 || Type == 904 || Type == 905 || Type == 906 || Type == 910 || Type == 911) + projectile.timeLeft = 180; + } + if (Type == 249) + projectile.frame = Main.rand.Next(5); + return number; + } + + public static Color GetGolfTrailColor(Projectile proj) + { + switch (proj.type) + { + case 739: + return new Color(50, 50, 50, 80); + case 740: + return new Color(30, 50, (int) byte.MaxValue, 40); + case 741: + return new Color(150, 90, 60, 90); + case 742: + return new Color(30, (int) byte.MaxValue, 170, 30); + case 743: + return new Color(30, (int) byte.MaxValue, 30, 40); + case 744: + return new Color(190, (int) byte.MaxValue, 30, 50); + case 745: + return new Color((int) byte.MaxValue, 130, 30, 50); + case 746: + return new Color((int) byte.MaxValue, 50, 110, 50); + case 747: + return new Color(130, 10, 200, 40); + case 748: + return new Color((int) byte.MaxValue, 30, 50, 50); + case 749: + return new Color(100, 180, (int) byte.MaxValue, 30); + case 750: + return new Color(50, 240, 160, 30); + case 751: + return new Color(220, 80, 220, 70); + case 752: + return new Color((int) byte.MaxValue, 180, 50, 30); + default: + return new Color(160, 160, (int) byte.MaxValue, 50); + } + } + + public void StatusNPC(int i) + { + NPC npc = Main.npc[i]; + if (this.melee && Main.player[this.owner].meleeEnchant > (byte) 0 && !this.noEnchantments) + { + int meleeEnchant = (int) Main.player[this.owner].meleeEnchant; + if (meleeEnchant == 1) + npc.AddBuff(70, 60 * Main.rand.Next(5, 10)); + if (meleeEnchant == 2) + npc.AddBuff(39, 60 * Main.rand.Next(3, 7)); + if (meleeEnchant == 3) + npc.AddBuff(24, 60 * Main.rand.Next(3, 7)); + if (meleeEnchant == 5) + npc.AddBuff(69, 60 * Main.rand.Next(10, 20)); + if (meleeEnchant == 6) + npc.AddBuff(31, 60 * Main.rand.Next(1, 4)); + if (meleeEnchant == 8) + npc.AddBuff(20, 60 * Main.rand.Next(5, 10)); + if (meleeEnchant == 4) + npc.AddBuff(72, 120); + } + if (this.type == 195) + { + if (Main.rand.Next(3) == 0) + npc.AddBuff(70, 60 * Main.rand.Next(5, 11)); + else + npc.AddBuff(20, 60 * Main.rand.Next(10, 21)); + } + switch (this.type) + { + case 841: + npc.AddBuff(307, 240); + break; + case 847: + npc.AddBuff(309, 240); + break; + case 848: + npc.AddBuff(319, 240); + break; + case 849: + npc.AddBuff(310, 240); + break; + case 913: + if ((double) this.localAI[0] == 0.0) + npc.AddBuff(313, 240); + npc.AddBuff(24, 240); + break; + case 914: + npc.AddBuff(20, 240); + npc.AddBuff(315, 240); + break; + case 915: + npc.AddBuff(316, 240); + break; + } + if (this.type == 664 && Main.rand.Next(3) == 0) + npc.AddBuff(24, 60 * Main.rand.Next(3, 6)); + if (this.type == 666 && Main.rand.Next(2) == 0) + npc.AddBuff(24, 60 * Main.rand.Next(3, 9)); + if (this.type == 668 && Main.rand.Next(3) != 0) + npc.AddBuff(24, 60 * Main.rand.Next(6, 9)); + if (this.type == 567 || this.type == 568) + npc.AddBuff(20, 60 * Main.rand.Next(5, 11)); + if (this.type == 598 && (double) this.ai[1] == (double) i) + npc.AddBuff(169, 900); + if (this.type == 636 && (double) this.ai[1] == (double) i) + npc.AddBuff(189, 300); + if (this.type == 611) + npc.AddBuff(189, 300); + if (this.type == 612) + npc.AddBuff(189, 300); + if (this.type == 711) + npc.AddBuff(203, 600); + if (this.type == 706) + npc.AddBuff(24, 480); + if (this.type == 614 && (double) this.ai[1] == (double) i) + npc.AddBuff(183, 900); + if (this.type == 585) + npc.AddBuff(153, 60 * Main.rand.Next(5, 11)); + if (this.type == 583) + npc.AddBuff(20, 60 * Main.rand.Next(3, 6)); + if (this.type == 524) + npc.AddBuff(69, 60 * Main.rand.Next(3, 8)); + if (this.type == 504 && Main.rand.Next(2) == 0) + { + if (Main.rand.Next(3) == 0) + npc.AddBuff(24, Main.rand.Next(60, 180)); + else + npc.AddBuff(24, Main.rand.Next(30, 120)); + } + if ((this.type == 694 || this.type == 695 || this.type == 696) && Main.player[this.owner].setHuntressT2 && Main.rand.Next(2) == 0) + npc.AddBuff(204, Main.rand.Next(8, 18) * 30); + if (this.type == 545 && Main.rand.Next(3) == 0) + npc.AddBuff(24, Main.rand.Next(60, 240)); + if (this.type == 553) + npc.AddBuff(24, Main.rand.Next(180, 480)); + if (this.type == 552 && Main.rand.Next(3) != 0) + npc.AddBuff(44, Main.rand.Next(120, 320)); + if (this.type == 495) + npc.AddBuff(153, Main.rand.Next(120, 300)); + if (this.type == 497) + npc.AddBuff(153, Main.rand.Next(60, 180)); + if (this.type == 496) + npc.AddBuff(153, Main.rand.Next(240, 480)); + if (this.type == 476) + npc.AddBuff(151, 30); + if (this.type == 523) + npc.AddBuff(20, 60 * Main.rand.Next(10, 30)); + if (this.type == 478 || this.type == 480) + npc.AddBuff(39, 60 * Main.rand.Next(3, 7)); + if (this.type == 479) + npc.AddBuff(69, 60 * Main.rand.Next(7, 15)); + if (this.type == 379) + npc.AddBuff(70, 60 * Main.rand.Next(2, 5)); + if (this.type >= 390 && this.type <= 392) + npc.AddBuff(70, 60 * Main.rand.Next(2, 5)); + if (this.type == 374) + npc.AddBuff(20, 60 * Main.rand.Next(4, 7)); + if (this.type == 376) + npc.AddBuff(24, 60 * Main.rand.Next(3, 7)); + if (this.type >= 399 && this.type <= 402) + npc.AddBuff(24, 60 * Main.rand.Next(3, 7)); + if (this.type == 295 || this.type == 296) + npc.AddBuff(24, 60 * Main.rand.Next(8, 16)); + if ((this.melee || this.ranged) && !this.npcProj && Main.player[this.owner].frostBurn && !this.noEnchantments) + npc.AddBuff(44, 60 * Main.rand.Next(5, 15)); + if (this.melee && Main.player[this.owner].magmaStone && !this.noEnchantments) + { + if (Main.rand.Next(7) == 0) + npc.AddBuff(24, 360); + else if (Main.rand.Next(3) == 0) + npc.AddBuff(24, 120); + else + npc.AddBuff(24, 60); + } + if (this.type == 287) + npc.AddBuff(72, 120); + if (this.type == 285) + { + if (Main.rand.Next(3) == 0) + npc.AddBuff(31, 180); + else + npc.AddBuff(31, 60); + } + if (this.type == 2 && Main.rand.Next(3) == 0) + npc.AddBuff(24, 180); + if (this.type == 172) + { + if (Main.rand.Next(3) == 0) + npc.AddBuff(44, 180); + } + else if (this.type == 15) + { + if (Main.rand.Next(2) == 0) + npc.AddBuff(24, 300); + } + else if (this.type == 253) + npc.AddBuff(44, 480); + else if (this.type == 19) + { + if (Main.rand.Next(5) == 0) + npc.AddBuff(24, 180); + } + else if (this.type == 33) + { + if (Main.rand.Next(5) == 0) + npc.AddBuff(20, 420); + } + else if (this.type == 34) + { + if (Main.rand.Next(2) == 0) + npc.AddBuff(24, Main.rand.Next(240, 480)); + } + else if (this.type == 948) + { + if (Main.rand.Next(6) == 0) + npc.AddBuff(24, 60 * Main.rand.Next(2, 4)); + } + else if (this.type == 35) + { + if (Main.rand.Next(2) == 0) + npc.AddBuff(24, 300); + } + else if (this.type == 54) + { + if (Main.rand.Next(2) == 0) + npc.AddBuff(20, 600); + } + else if (this.type == 267) + { + if (Main.rand.Next(3) == 0) + npc.AddBuff(20, 3600); + else + npc.AddBuff(20, 1800); + } + else if (this.type == 63) + { + if (Main.rand.Next(5) != 0) + npc.AddBuff(31, 60 * Main.rand.Next(2, 5)); + } + else if (this.type == 85 || this.type == 188) + npc.AddBuff(24, 1200); + else if (this.type == 95 || this.type == 103 || this.type == 104 || this.type == 482) + npc.AddBuff(39, 420); + else if (this.type == 278 || this.type == 279 || this.type == 280) + npc.AddBuff(69, 600); + else if (this.type == 282 || this.type == 283) + npc.AddBuff(70, 600); + if (this.type == 163 || this.type == 310) + { + if (Main.rand.Next(3) == 0) + npc.AddBuff(24, 600); + else + npc.AddBuff(24, 300); + } + else if (this.type == 98) + npc.AddBuff(20, 600); + else if (this.type == 184) + npc.AddBuff(20, 900); + else if (this.type == 265) + { + npc.AddBuff(20, 1800); + } + else + { + if (this.type != 355) + return; + npc.AddBuff(70, 1800); + } + } + + public void StatusPvP(int i) + { + if (this.melee && Main.player[this.owner].meleeEnchant > (byte) 0 && !this.noEnchantments) + { + int meleeEnchant = (int) Main.player[this.owner].meleeEnchant; + if (meleeEnchant == 1) + Main.player[i].AddBuff(70, 60 * Main.rand.Next(5, 10), false); + if (meleeEnchant == 2) + Main.player[i].AddBuff(39, 60 * Main.rand.Next(3, 7), false); + if (meleeEnchant == 3) + Main.player[i].AddBuff(24, 60 * Main.rand.Next(3, 7), false); + if (meleeEnchant == 5) + Main.player[i].AddBuff(69, 60 * Main.rand.Next(10, 20), false); + if (meleeEnchant == 6) + Main.player[i].AddBuff(31, 60 * Main.rand.Next(1, 4), false); + if (meleeEnchant == 8) + Main.player[i].AddBuff(20, 60 * Main.rand.Next(5, 10), false); + } + if (this.type == 295 || this.type == 296) + Main.player[i].AddBuff(24, 60 * Main.rand.Next(8, 16), false); + if (this.type >= 399 && this.type <= 402) + Main.player[i].AddBuff(24, 60 * Main.rand.Next(3, 7), false); + if (this.type == 478 || this.type == 480) + Main.player[i].AddBuff(39, 60 * Main.rand.Next(3, 7), false); + if ((this.melee || this.ranged) && Main.player[this.owner].frostBurn && !this.noEnchantments) + Main.player[i].AddBuff(44, 60 * Main.rand.Next(1, 8), false); + if (this.melee && Main.player[this.owner].magmaStone && !this.noEnchantments) + { + if (Main.rand.Next(4) == 0) + Main.player[i].AddBuff(24, 360, false); + else if (Main.rand.Next(2) == 0) + Main.player[i].AddBuff(24, 240, false); + else + Main.player[i].AddBuff(24, 120, false); + } + if (this.type == 2 && Main.rand.Next(3) == 0) + Main.player[i].AddBuff(24, 180, false); + if (this.type == 172) + { + if (Main.rand.Next(3) == 0) + Main.player[i].AddBuff(44, 240, false); + } + else if (this.type == 15) + { + if (Main.rand.Next(2) == 0) + Main.player[i].AddBuff(24, 300, false); + } + else if (this.type == 253) + { + if (Main.rand.Next(2) == 0) + Main.player[i].AddBuff(44, 480, false); + } + else if (this.type == 19) + { + if (Main.rand.Next(5) == 0) + Main.player[i].AddBuff(24, 180, false); + } + else if (this.type == 33) + { + if (Main.rand.Next(5) == 0) + Main.player[i].AddBuff(20, 420, false); + } + else if (this.type == 34) + { + if (Main.rand.Next(2) == 0) + Main.player[i].AddBuff(24, 240, false); + } + else if (this.type == 35) + { + if (Main.rand.Next(4) == 0) + Main.player[i].AddBuff(24, 180, false); + } + else if (this.type == 54) + { + if (Main.rand.Next(2) == 0) + Main.player[i].AddBuff(20, 600, false); + } + else if (this.type == 267) + { + if (Main.rand.Next(3) == 0) + Main.player[i].AddBuff(20, 3600, false); + else + Main.player[i].AddBuff(20, 1800, false); + } + else if (this.type == 63) + { + if (Main.rand.Next(3) != 0) + Main.player[i].AddBuff(31, 120, false); + } + else if (this.type == 85 || this.type == 188) + Main.player[i].AddBuff(24, 1200, false); + else if (this.type == 95 || this.type == 103 || this.type == 104 || this.type == 482) + Main.player[i].AddBuff(39, 420, false); + else if (this.type == 278 || this.type == 279 || this.type == 280) + Main.player[i].AddBuff(69, 900, false); + else if (this.type == 282 || this.type == 283) + Main.player[i].AddBuff(70, 600, false); + if (this.type == 163 || this.type == 310) + { + if (Main.rand.Next(3) == 0) + Main.player[i].AddBuff(24, 600, false); + else + Main.player[i].AddBuff(24, 300, false); + } + else if (this.type == 265) + { + Main.player[i].AddBuff(20, 1200, false); + } + else + { + if (this.type != 355) + return; + Main.player[i].AddBuff(70, 1800, false); + } + } + + public void ghostHurt(int dmg, Vector2 Position) + { + if (!this.magic || this.damage <= 0) + return; + int damage = this.damage; + if (dmg <= 1) + return; + int num1 = 1000; + if ((double) Main.player[Main.myPlayer].ghostDmg > (double) num1) + return; + Main.player[Main.myPlayer].ghostDmg += (float) damage; + int[] numArray1 = new int[200]; + int maxValue1 = 0; + int[] numArray2 = new int[200]; + int maxValue2 = 0; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].CanBeChasedBy((object) this)) + { + float num2 = Math.Abs(Main.npc[index].position.X + (float) (Main.npc[index].width / 2) - this.position.X + (float) (this.width / 2)) + Math.Abs(Main.npc[index].position.Y + (float) (Main.npc[index].height / 2) - this.position.Y + (float) (this.height / 2)); + if ((double) num2 < 800.0) + { + if (Collision.CanHit(this.position, 1, 1, Main.npc[index].position, Main.npc[index].width, Main.npc[index].height) && (double) num2 > 50.0) + { + numArray1[maxValue2] = index; + ++maxValue2; + } + else if (maxValue2 == 0) + { + numArray1[maxValue1] = index; + ++maxValue1; + } + } + } + } + if (maxValue1 == 0 && maxValue2 == 0) + return; + int num3 = maxValue2 <= 0 ? numArray1[Main.rand.Next(maxValue1)] : numArray1[Main.rand.Next(maxValue2)]; + float num4 = (float) Main.rand.Next(-100, 101); + float num5 = (float) Main.rand.Next(-100, 101); + float num6 = (float) (4.0 / Math.Sqrt((double) num4 * (double) num4 + (double) num5 * (double) num5)); + float SpeedX = num4 * num6; + float SpeedY = num5 * num6; + Projectile.NewProjectile(Position.X, Position.Y, SpeedX, SpeedY, 356, damage, 0.0f, this.owner, (float) num3); + } + + public void ghostHeal(int dmg, Vector2 Position) + { + float num1 = 0.2f - (float) this.numHits * 0.05f; + if ((double) num1 <= 0.0) + return; + float ai1 = (float) dmg * num1; + if ((int) ai1 <= 0 || (double) Main.player[Main.myPlayer].lifeSteal <= 0.0) + return; + Main.player[Main.myPlayer].lifeSteal -= ai1; + if (!this.magic) + return; + float num2 = 0.0f; + int num3 = this.owner; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && !Main.player[index].dead && (!Main.player[this.owner].hostile && !Main.player[index].hostile || Main.player[this.owner].team == Main.player[index].team) && (double) Math.Abs(Main.player[index].position.X + (float) (Main.player[index].width / 2) - this.position.X + (float) (this.width / 2)) + (double) Math.Abs(Main.player[index].position.Y + (float) (Main.player[index].height / 2) - this.position.Y + (float) (this.height / 2)) < 1200.0 && (double) (Main.player[index].statLifeMax2 - Main.player[index].statLife) > (double) num2) + { + num2 = (float) (Main.player[index].statLifeMax2 - Main.player[index].statLife); + num3 = index; + } + } + Projectile.NewProjectile(Position.X, Position.Y, 0.0f, 0.0f, 298, 0, 0.0f, this.owner, (float) num3, ai1); + } + + public void vampireHeal(int dmg, Vector2 Position) + { + float ai1 = (float) dmg * 0.075f; + if ((int) ai1 == 0 || (double) Main.player[Main.myPlayer].lifeSteal <= 0.0) + return; + Main.player[Main.myPlayer].lifeSteal -= ai1; + int owner = this.owner; + Projectile.NewProjectile(Position.X, Position.Y, 0.0f, 0.0f, 305, 0, 0.0f, this.owner, (float) owner, ai1); + } + + public void StatusPlayer(int i) + { + if (Main.player[i].creativeGodMode) + return; + if (this.type == 472) + Main.player[i].AddBuff(149, Main.rand.Next(30, 150)); + if (this.type == 467) + Main.player[i].AddBuff(24, Main.rand.Next(30, 150)); + if (this.type == 581) + { + if (Main.expertMode) + Main.player[i].AddBuff(164, Main.rand.Next(300, 540)); + else if (Main.rand.Next(2) == 0) + Main.player[i].AddBuff(164, Main.rand.Next(360, 720)); + } + if (this.type == 687) + Main.player[i].AddBuff(24, 60 * Main.rand.Next(7, 11)); + if (this.type == 258 && Main.rand.Next(2) == 0) + Main.player[i].AddBuff(24, 60 * Main.rand.Next(5, 8)); + if (this.type == 572 && Main.rand.Next(3) != 0) + Main.player[i].AddBuff(20, Main.rand.Next(120, 240)); + if (this.type == 276) + { + if (Main.expertMode) + Main.player[i].AddBuff(20, Main.rand.Next(120, 540)); + else if (Main.rand.Next(2) == 0) + Main.player[i].AddBuff(20, Main.rand.Next(180, 420)); + } + if (this.type == 436 && Main.rand.Next(5) >= 2) + Main.player[i].AddBuff(31, 300); + if (this.type == 435 && Main.rand.Next(3) != 0) + Main.player[i].AddBuff(144, 300); + if (this.type == 682) + Main.player[i].AddBuff(196, 300); + if (this.type == 437) + Main.player[i].AddBuff(144, 60 * Main.rand.Next(4, 9)); + if (this.type == 348) + { + if (Main.rand.Next(2) == 0) + Main.player[i].AddBuff(46, 600); + else + Main.player[i].AddBuff(46, 300); + if (Main.rand.Next(3) != 0) + { + if (Main.rand.Next(16) == 0) + Main.player[i].AddBuff(47, 60); + else if (Main.rand.Next(12) == 0) + Main.player[i].AddBuff(47, 40); + else if (Main.rand.Next(8) == 0) + Main.player[i].AddBuff(47, 20); + } + } + if (this.type == 349) + { + if (Main.rand.Next(3) == 0) + Main.player[i].AddBuff(46, 600); + else if (Main.rand.Next(2) == 0) + Main.player[i].AddBuff(46, 300); + } + if (this.type >= 399 && this.type <= 402 && !this.hostile) + Main.player[i].AddBuff(24, 60 * Main.rand.Next(3, 7)); + if (this.type == 55 || this.type == 719) + { + if (Main.rand.Next(3) == 0) + Main.player[i].AddBuff(20, 600); + else if (Main.expertMode) + Main.player[i].AddBuff(20, Main.rand.Next(60, 300)); + } + if (this.type == 44 && Main.rand.Next(3) == 0) + Main.player[i].AddBuff(22, 900); + if (this.type == 293) + Main.player[i].AddBuff(80, 60 * Main.rand.Next(2, 7)); + if (this.type == 299) + Main.player[i].AddBuff(23, 240); + if (this.type == 82 && Main.rand.Next(3) == 0) + Main.player[i].AddBuff(24, 420); + if (this.type == 285 && !this.hostile) + { + if (Main.rand.Next(3) == 0) + Main.player[i].AddBuff(31, 180); + else + Main.player[i].AddBuff(31, 60); + } + if (this.type == 96 || this.type == 101) + { + if (Main.rand.Next(6) == 0) + Main.player[i].AddBuff(39, 180); + else if (Main.rand.Next(4) == 0) + Main.player[i].AddBuff(39, 180); + else if (Main.rand.Next(2) == 0) + Main.player[i].AddBuff(39, 120); + } + else if (this.type == 288) + Main.player[i].AddBuff(69, 900); + else if (this.type == 253 && !this.hostile) + Main.player[i].AddBuff(44, 600); + if (this.type == 291 || this.type == 292) + Main.player[i].AddBuff(24, 60 * Main.rand.Next(8, 16)); + if (this.type == 98) + Main.player[i].AddBuff(20, 600); + if (this.type == 184) + Main.player[i].AddBuff(20, 900); + if (this.type == 290) + Main.player[i].AddBuff(32, 60 * Main.rand.Next(5, 16)); + if (this.type == 174) + { + Main.player[i].AddBuff(46, 1200); + if (!Main.player[i].frozen && Main.rand.Next(20) == 0) + Main.player[i].AddBuff(47, 90); + else if (!Main.player[i].frozen && Main.expertMode && Main.rand.Next(20) == 0) + Main.player[i].AddBuff(47, 60); + } + if (this.type == 257) + { + Main.player[i].AddBuff(46, 2700); + if (!Main.player[i].frozen && Main.rand.Next(5) == 0) + Main.player[i].AddBuff(47, 60); + } + if (this.type == 177) + { + Main.player[i].AddBuff(46, 1500); + if (!Main.player[i].frozen && Main.rand.Next(10) == 0) + Main.player[i].AddBuff(47, Main.rand.Next(30, 120)); + } + if (this.type != 176) + return; + if (Main.rand.Next(4) == 0) + { + Main.player[i].AddBuff(20, 1200); + } + else + { + if (Main.rand.Next(2) != 0) + return; + Main.player[i].AddBuff(20, 300); + } + } + + public bool CanHitWithMeleeWeapon(Entity ent) + { + if ((double) this.Distance(ent.Center) > (double) this.ownerHitCheckDistance) + return false; + return Collision.CanHit(Main.player[this.owner].position, Main.player[this.owner].width, Main.player[this.owner].height, ent.position, ent.width, ent.height) || Collision.CanHitLine(Main.player[this.owner].Center + new Vector2((float) (Main.player[this.owner].direction * Main.player[this.owner].width / 2), (float) ((double) Main.player[this.owner].gravDir * (double) -Main.player[this.owner].height / 3.0)), 0, 0, ent.Center + new Vector2(0.0f, (float) (-ent.height / 3)), 0, 0) || Collision.CanHitLine(Main.player[this.owner].Center + new Vector2((float) (Main.player[this.owner].direction * Main.player[this.owner].width / 2), (float) ((double) Main.player[this.owner].gravDir * (double) -Main.player[this.owner].height / 3.0)), 0, 0, ent.Center, 0, 0) || Collision.CanHitLine(Main.player[this.owner].Center + new Vector2((float) (Main.player[this.owner].direction * Main.player[this.owner].width / 2), 0.0f), 0, 0, ent.Center + new Vector2(0.0f, (float) (ent.height / 3)), 0, 0); + } + + public bool CanHitWithOwnBody(Entity ent) + { + if ((double) this.Distance(ent.Center) > (double) this.ownerHitCheckDistance) + return false; + bool flag = Collision.CanHit(this.position, this.width, this.height, ent.position, ent.width, ent.height) || Collision.CanHitLine(this.Center + new Vector2((float) (this.direction * this.width / 2), (float) (-this.height / 3)), 0, 0, ent.Center + new Vector2(0.0f, (float) (-ent.height / 3)), 0, 0) || Collision.CanHitLine(this.Center + new Vector2((float) (this.direction * this.width / 2), (float) (-this.height / 3)), 0, 0, ent.Center, 0, 0) || Collision.CanHitLine(this.Center + new Vector2((float) (this.direction * this.width / 2), 0.0f), 0, 0, ent.Center + new Vector2(0.0f, (float) (ent.height / 3)), 0, 0); + float num = ProjectileID.Sets.ExtendedCanHitCheckRange[this.type]; + if ((double) num != 0.0 && !flag) + { + GenSearch search = ProjectileID.Sets.ExtendedCanHitCheckSearch[this.type]; + Vector2 Position1 = this.Top + new Vector2(0.0f, -num); + Vector2 Position2 = ent.Top + new Vector2(0.0f, -num); + if (search != null) + { + Point result; + if (WorldUtils.Find(this.Top.ToTileCoordinates(), Searches.Chain(search, (GenCondition) Projectile._cachedConditions_notNull, (GenCondition) Projectile._cachedConditions_solid), out result)) + Position1 = result.ToWorldCoordinates(); + if (WorldUtils.Find(ent.Top.ToTileCoordinates(), Searches.Chain(search, (GenCondition) Projectile._cachedConditions_notNull, (GenCondition) Projectile._cachedConditions_solid), out result)) + Position2 = result.ToWorldCoordinates(); + } + flag |= Collision.CanHitLine(Position1, 0, 0, Position2, 0, 0); + } + return flag; + } + + public void Damage() + { + if (this.type == 18 || this.type == 72 || this.type == 86 || this.type == 87 || this.aiStyle == 31 || this.aiStyle == 32 || this.type == 226 || this.type == 378 || this.type == 613 || this.type == 650 || this.type == 882 || this.type == 888 || this.type == 895 || this.type == 896 || this.type == 434 && (double) this.localAI[0] != 0.0 || this.type == 439 || this.type == 444 || this.type == 451 && ((int) ((double) this.ai[0] - 1.0) / this.penetrate == 0 || (double) this.ai[1] < 5.0) && (double) this.ai[0] != 0.0 || this.type == 500 || this.type == 653 || this.type == 460 || this.type == 633 || this.type == 600 || this.type == 601 || this.type == 602 || this.type == 535 || this.type == 631 && (double) this.localAI[1] == 0.0 || this.type == 651 || this.type == 188 && (double) this.localAI[0] < 5.0 || this.aiStyle == 137 && (double) this.ai[0] != 0.0 || this.aiStyle == 138 || this.type == 261 && (double) this.velocity.Length() < 1.5 || this.type == 818 && (double) this.ai[0] < 1.0 || this.type == 831 || this.type == 833 && (double) this.ai[0] == 4.0 || this.type == 834 && (double) this.ai[0] == 4.0 || this.type == 835 && (double) this.ai[0] == 4.0 || this.type == 281 && (double) this.ai[0] == -3.0 || this.type == 923 && (double) this.localAI[0] <= 60.0 || this.type == 919 && (double) this.localAI[0] <= 60.0 || this.aiStyle == 15 && (double) this.ai[0] == 0.0 && (double) this.localAI[1] <= 12.0 || this.type == 861 || this.aiStyle == 93 && (double) this.ai[0] != 0.0 && (double) this.ai[0] != 2.0 || this.aiStyle == 10 && (double) this.localAI[1] == -1.0 || Main.projPet[this.type] && this.type != 266 && this.type != 407 && this.type != 317 && (this.type != 388 || (double) this.ai[0] != 2.0) && (this.type < 390 || this.type > 392) && (this.type < 393 || this.type > 395) && (this.type != 533 || (double) this.ai[0] < 6.0 || (double) this.ai[0] > 8.0) && (this.type < 625 || this.type > 628) && (this.type != 755 || (double) this.ai[0] == 0.0) && (this.type != 946 || (double) this.ai[0] == 0.0) && this.type != 758 && (this.type != 759 || this.frame == Main.projFrames[this.type] - 1) && this.type != 833 && this.type != 834 && this.type != 835 && this.type != 864 && (this.type != 623 || (double) this.ai[0] != 2.0)) + return; + Microsoft.Xna.Framework.Rectangle myRect = new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height); + if (this.type == 85 || this.type == 101) + { + int num = 30; + myRect.X -= num; + myRect.Y -= num; + myRect.Width += num * 2; + myRect.Height += num * 2; + } + if (this.type == 188) + { + int num = 20; + myRect.X -= num; + myRect.Y -= num; + myRect.Width += num * 2; + myRect.Height += num * 2; + } + if (this.aiStyle == 29) + { + int num = 4; + myRect.X -= num; + myRect.Y -= num; + myRect.Width += num * 2; + myRect.Height += num * 2; + } + if (this.friendly && this.owner == Main.myPlayer && !this.npcProj) + { + if (this.aiStyle == 16 && !ProjectileID.Sets.RocketsSkipDamageForPlayers[this.type] && (this.timeLeft <= 1 || this.type == 108 || this.type == 164) || this.type == 286 && (double) this.localAI[1] == -1.0) + { + int player = Main.myPlayer; + if (Main.player[player].active && !Main.player[player].dead && !Main.player[player].immune && (!this.ownerHitCheck || this.CanHitWithMeleeWeapon((Entity) Main.player[player]))) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) Main.player[player].position.X, (int) Main.player[player].position.Y, Main.player[player].width, Main.player[player].height); + if (myRect.Intersects(rectangle)) + { + if ((double) Main.player[player].position.X + (double) (Main.player[player].width / 2) < (double) this.position.X + (double) (this.width / 2)) + this.direction = -1; + else + this.direction = 1; + int Damage = Main.DamageVar((float) this.damage, -Main.player[player].luck); + this.StatusPlayer(player); + int playerIndex = this.owner; + bool pvp = true; + if (this.type == 108) + { + playerIndex = -1; + pvp = false; + } + Main.player[player].Hurt(PlayerDeathReason.ByProjectile(playerIndex, this.whoAmI), Damage, this.direction, pvp); + if (this.trap) + { + Main.player[player].trapDebuffSource = true; + if (Main.player[player].dead) + AchievementsHelper.HandleSpecialEvent(Main.player[player], 4); + } + } + } + } + if (!this.minion) + this.CutTiles(); + } + if (this.owner == Main.myPlayer) + { + float num1 = 1f; + if (ProjectileID.Sets.IsARocketThatDealsDoubleDamageToPrimaryEnemy[this.type] && this.timeLeft > 3) + num1 *= 2f; + if (ProjectileID.Sets.IsAMineThatDealsTripleDamageWhenStationary[this.type] && (double) this.velocity.Length() < 0.5) + num1 *= 3f; + if (this.type == 34 && this.penetrate == 1) + num1 *= 1f; + if (this.aiStyle == 15 && (double) this.ai[0] == 0.0) + num1 *= 1.2f; + if (this.aiStyle == 15 && ((double) this.ai[0] == 1.0 || (double) this.ai[0] == 2.0)) + num1 *= 2f; + if (this.type == 877 || this.type == 879 || this.type == 878) + num1 = (float) (0.100000001490116 + (double) Main.player[this.owner].velocity.Length() / 7.0 * 0.899999976158142); + if (this.damage > 0) + { + int[] localNpcImmunity = this.localNPCImmunity; + if (this.type == 626 || this.type == 627 || this.type == 628) + { + Projectile dragonHeadOfOwner = this.FindStardustDragonHeadOfOwner(); + if (dragonHeadOfOwner != null) + localNpcImmunity = dragonHeadOfOwner.localNPCImmunity; + } + for (int index1 = 0; index1 < 200; ++index1) + { + bool flag1 = !this.usesLocalNPCImmunity && !this.usesIDStaticNPCImmunity || this.usesLocalNPCImmunity && localNpcImmunity[index1] == 0 || this.usesIDStaticNPCImmunity && Projectile.IsNPCIndexImmuneToProjectileType(this.type, index1); + if (((!Main.npc[index1].active ? 0 : (!Main.npc[index1].dontTakeDamage ? 1 : 0)) & (flag1 ? 1 : 0)) != 0 && (Main.npc[index1].aiStyle != 112 || (double) Main.npc[index1].ai[2] <= 1.0)) + { + NPC npc1 = Main.npc[index1]; + npc1.position = npc1.position + Main.npc[index1].netOffset; + bool flag2 = ((((!Main.npc[index1].friendly | this.type == 318 ? 1 : 0) | (Main.npc[index1].type != 22 || this.owner >= (int) byte.MaxValue ? 0 : (Main.player[this.owner].killGuide ? 1 : 0))) != 0 ? 1 : 0) | (Main.npc[index1].type != 54 || this.owner >= (int) byte.MaxValue ? 0 : (Main.player[this.owner].killClothier ? 1 : 0))) != 0; + if (this.owner < (int) byte.MaxValue && !Main.player[this.owner].CanNPCBeHitByPlayerOrPlayerProjectile(Main.npc[index1])) + flag2 = false; + bool flag3 = Main.npc[index1].friendly && !Main.npc[index1].dontTakeDamageFromHostiles; + if ((this.friendly & flag2 || this.hostile & flag3) && (this.owner < 0 || Main.npc[index1].immune[this.owner] == 0 || this.maxPenetrate == 1)) + { + bool flag4 = false; + if (this.type == 11 && (Main.npc[index1].type == 47 || Main.npc[index1].type == 57)) + flag4 = true; + else if (this.type == 31 && Main.npc[index1].type == 69) + flag4 = true; + else if (Main.npc[index1].trapImmune && this.trap) + flag4 = true; + else if (Main.npc[index1].immortal && this.npcProj) + flag4 = true; + if (!flag4 && (Main.npc[index1].noTileCollide || !this.ownerHitCheck || this.CanHitWithMeleeWeapon((Entity) Main.npc[index1]))) + { + bool flag5; + if (Main.npc[index1].type == 414) + { + Microsoft.Xna.Framework.Rectangle rect = Main.npc[index1].getRect(); + int num2 = 8; + rect.X -= num2; + rect.Y -= num2; + rect.Width += num2 * 2; + rect.Height += num2 * 2; + flag5 = this.Colliding(myRect, rect); + } + else + flag5 = this.Colliding(myRect, Main.npc[index1].getRect()); + if (flag5) + { + if (this.type == 876) + { + Vector2 position1 = this.position; + if (Main.rand.Next(20) == 0) + { + this.tileCollide = false; + this.position.X += (float) Main.rand.Next(-256, 257); + } + if (Main.rand.Next(20) == 0) + { + this.tileCollide = false; + this.position.Y += (float) Main.rand.Next(-256, 257); + } + if (Main.rand.Next(2) == 0) + this.tileCollide = false; + if (Main.rand.Next(3) != 0) + { + Vector2 position2 = this.position; + this.position = this.position - this.velocity * (float) Main.rand.Next(0, 40); + if (this.tileCollide && Collision.SolidTiles(this.position, this.width, this.height)) + { + this.position = position2; + this.position = this.position - this.velocity * (float) Main.rand.Next(0, 40); + if (this.tileCollide && Collision.SolidTiles(this.position, this.width, this.height)) + this.position = position2; + } + } + this.velocity = this.velocity * 0.6f; + if (Main.rand.Next(7) == 0) + this.velocity.X += (float) Main.rand.Next(30, 31) * 0.01f; + if (Main.rand.Next(7) == 0) + this.velocity.Y += (float) Main.rand.Next(30, 31) * 0.01f; + this.damage = (int) ((double) this.damage * 0.9); + this.knockBack *= 0.9f; + if (Main.rand.Next(20) == 0) + this.knockBack *= 10f; + if (Main.rand.Next(50) == 0) + this.damage *= 10; + if (Main.rand.Next(7) == 0) + { + Vector2 position3 = this.position; + this.position.X += (float) Main.rand.Next(-64, 65); + if (this.tileCollide && Collision.SolidTiles(this.position, this.width, this.height)) + this.position = position3; + } + if (Main.rand.Next(7) == 0) + { + Vector2 position4 = this.position; + this.position.Y += (float) Main.rand.Next(-64, 65); + if (this.tileCollide && Collision.SolidTiles(this.position, this.width, this.height)) + this.position = position4; + } + if (Main.rand.Next(14) == 0) + this.velocity.X *= -1f; + if (Main.rand.Next(14) == 0) + this.velocity.Y *= -1f; + if (Main.rand.Next(10) == 0) + this.velocity = this.velocity * ((float) Main.rand.Next(1, 201) * 0.0005f); + this.ai[1] = !this.tileCollide ? 1f : 0.0f; + this.netUpdate = true; + } + NPC targetNPC = Main.npc[index1]; + if (targetNPC.reflectsProjectiles && this.CanBeReflected() && targetNPC.CanReflectProjectile(this)) + { + targetNPC.ReflectProjectile(this); + NPC npc2 = Main.npc[index1]; + npc2.position = npc2.position - Main.npc[index1].netOffset; + return; + } + if (this.type == 604) + Main.player[this.owner].Counterweight(targetNPC.Center, this.damage, this.knockBack); + float knockBack = this.knockBack; + bool crit = false; + int armorPenetration = Main.player[this.owner].armorPenetration; + bool flag6 = !this.npcProj && !this.trap; + switch (this.type) + { + case 864: + armorPenetration += 25; + break; + case 877: + case 878: + case 879: + knockBack *= Main.player[this.owner].velocity.Length() / 7f; + break; + case 916: + armorPenetration += 50; + break; + case 917: + armorPenetration += 30; + break; + } + int num3 = (int) ((double) this.damage * (double) num1); + if (this.type > 0 && this.type < 950 && ProjectileID.Sets.StardustDragon[this.type]) + { + float num4 = Utils.Clamp((float) (((double) this.scale - 1.0) * 100.0), 0.0f, 50f); + num3 = (int) ((double) num3 * (1.0 + (double) num4 * 0.230000004172325)); + } + if (this.type > 0 && this.type < 950 && ProjectileID.Sets.StormTiger[this.type]) + { + int num5 = Math.Max(0, Main.player[this.owner].ownedProjectileCounts[831] - 1); + num3 = (int) ((double) num3 * (1.0 + (double) num5 * 0.333333343267441)); + } + if (this.type == 818) + { + int num6 = Math.Max(0, Main.player[this.owner].ownedProjectileCounts[831] - 1); + num3 = (int) ((double) num3 * (1.5 + (double) num6 * 0.333333343267441)); + } + if (flag6) + { + if (this.melee && Main.rand.Next(1, 101) <= Main.player[this.owner].meleeCrit) + crit = true; + if (this.ranged && Main.rand.Next(1, 101) <= Main.player[this.owner].rangedCrit) + crit = true; + if (this.magic && Main.rand.Next(1, 101) <= Main.player[this.owner].magicCrit) + crit = true; + switch (this.type) + { + case 688: + case 689: + case 690: + if (Main.player[this.owner].setMonkT3) + { + if (Main.rand.Next(4) == 0) + { + crit = true; + break; + } + break; + } + if (Main.player[this.owner].setMonkT2 && Main.rand.Next(6) == 0) + { + crit = true; + break; + } + break; + } + } + if (flag6 && (this.minion || ProjectileID.Sets.MinionShot[this.type])) + { + bool flag7 = false; + bool flag8 = false; + bool flag9 = false; + bool flag10 = false; + bool flag11 = false; + bool flag12 = false; + bool flag13 = false; + for (int index2 = 0; index2 < 5; ++index2) + { + if (targetNPC.buffTime[index2] >= 1) + { + switch (targetNPC.buffType[index2]) + { + case 307: + flag7 = true; + continue; + case 309: + flag8 = true; + continue; + case 310: + flag10 = true; + continue; + case 313: + flag9 = true; + continue; + case 315: + flag11 = true; + continue; + case 316: + flag13 = true; + continue; + case 319: + flag12 = true; + continue; + default: + continue; + } + } + } + if (flag7) + num3 += 4; + if (flag11) + num3 += 6; + if (flag8) + num3 += 9; + if (flag12) + { + num3 += 5; + if (Main.rand.Next(20) == 0) + crit = true; + } + if (flag10) + { + int Damage = 10; + int index3 = Projectile.NewProjectile(targetNPC.Center, Vector2.Zero, 916, Damage, 0.0f, this.owner); + Main.projectile[index3].localNPCImmunity[index1] = -1; + Projectile.EmitBlackLightningParticles(targetNPC); + } + if (flag13) + { + int num7 = 20; + num3 += num7; + if (Main.rand.Next(10) == 0) + crit = true; + ParticleOrchestrator.RequestParticleSpawn(false, ParticleOrchestraType.RainbowRodHit, new ParticleOrchestraSettings() + { + PositionInWorld = this.Center + }); + } + if (flag9) + { + targetNPC.RequestBuffRemoval(313); + int Damage = (int) ((double) num3 * 2.0); + int index4 = Projectile.NewProjectile(targetNPC.Center, Vector2.Zero, 918, Damage, 0.0f, this.owner); + Main.projectile[index4].localNPCImmunity[index1] = -1; + num3 += Damage; + } + } + int Damage1 = !flag6 ? Main.DamageVar((float) num3) : Main.DamageVar((float) num3, Main.player[this.owner].luck); + if (this.trap && NPCID.Sets.BelongsToInvasionOldOnesArmy[targetNPC.type]) + Damage1 /= 2; + if (this.type == 482 && (targetNPC.aiStyle == 6 || targetNPC.aiStyle == 37)) + Damage1 /= 2; + if (this.type == 604) + { + this.friendly = false; + this.ai[1] = 1000f; + } + if ((this.type == 400 || this.type == 401 || this.type == 402) && targetNPC.type >= 13 && targetNPC.type <= 15) + { + Damage1 = (int) ((double) Damage1 * 0.65); + if (this.penetrate > 1) + --this.penetrate; + } + if (this.type == 710) + { + if (!WorldUtils.Find(this.Center.ToTileCoordinates(), Searches.Chain((GenSearch) new Searches.Down(12), (GenCondition) Projectile._cachedConditions_notNull, (GenCondition) Projectile._cachedConditions_solid), out Point _)) + Damage1 = (int) ((double) Damage1 * 1.5); + } + if (this.type == 504) + this.ai[0] += (float) ((60.0 - (double) this.ai[0]) / 2.0); + if (this.aiStyle == 3 && this.type != 301 && this.type != 866 && this.type != 902) + { + if ((double) this.ai[0] == 0.0) + { + this.velocity.X = -this.velocity.X; + this.velocity.Y = -this.velocity.Y; + this.netUpdate = true; + } + this.ai[0] = 1f; + } + else if (this.type == 582 || this.type == 902) + { + if ((double) this.ai[0] != 0.0) + this.direction *= -1; + } + else if (this.type == 612) + this.direction = Main.player[this.owner].direction; + else if (this.type == 624) + { + float num8 = 1f; + if ((double) targetNPC.knockBackResist > 0.0) + num8 = 1f / targetNPC.knockBackResist; + this.knockBack = 4f * num8; + knockBack = this.knockBack; + if ((double) targetNPC.Center.X < (double) this.Center.X) + this.direction = 1; + else + this.direction = -1; + } + else if (this.aiStyle == 16) + { + if (this.timeLeft > 3) + this.timeLeft = 3; + if ((double) targetNPC.position.X + (double) (targetNPC.width / 2) < (double) this.position.X + (double) (this.width / 2)) + this.direction = -1; + else + this.direction = 1; + } + else if (this.aiStyle == 68) + { + if (this.timeLeft > 3) + this.timeLeft = 3; + if ((double) targetNPC.position.X + (double) (targetNPC.width / 2) < (double) this.position.X + (double) (this.width / 2)) + this.direction = -1; + else + this.direction = 1; + } + else if (this.aiStyle == 50) + { + if ((double) targetNPC.position.X + (double) (targetNPC.width / 2) < (double) this.position.X + (double) (this.width / 2)) + this.direction = -1; + else + this.direction = 1; + } + else if (this.type == 908) + { + if ((double) targetNPC.position.X + (double) (targetNPC.width / 2) < (double) this.position.X + (double) (this.width / 2)) + this.direction = -1; + else + this.direction = 1; + } + if (this.type == 509) + { + int num9 = Main.rand.Next(2, 6); + for (int index5 = 0; index5 < num9; ++index5) + { + Vector2 vector2 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + vector2 += this.velocity * 3f; + vector2.Normalize(); + vector2 *= (float) Main.rand.Next(35, 81) * 0.1f; + int Damage2 = (int) ((double) this.damage * 0.5); + Projectile.NewProjectile(this.Center.X, this.Center.Y, vector2.X, vector2.Y, 504, Damage2, this.knockBack * 0.2f, this.owner); + } + } + if (this.type == 598 || this.type == 636 || this.type == 614) + { + this.ai[0] = 1f; + this.ai[1] = (float) index1; + this.velocity = (targetNPC.Center - this.Center) * 0.75f; + this.netUpdate = true; + } + if (this.type >= 511 && this.type <= 513) + this.timeLeft = 0; + if (this.type == 659) + this.timeLeft = 0; + if (this.type == 524) + { + this.netUpdate = true; + this.ai[0] += 50f; + } + if ((this.type == 688 || this.type == 689 || this.type == 690) && targetNPC.type != 68 && targetNPC.defense < 999) + Damage1 += targetNPC.defense / 2; + if (this.aiStyle == 39) + { + if ((double) this.ai[1] == 0.0) + { + this.ai[1] = (float) (index1 + 1); + this.netUpdate = true; + } + if ((double) Main.player[this.owner].position.X + (double) (Main.player[this.owner].width / 2) < (double) this.position.X + (double) (this.width / 2)) + this.direction = 1; + else + this.direction = -1; + } + if (this.type == 41 && this.timeLeft > 1) + this.timeLeft = 1; + if (this.aiStyle == 99) + { + Main.player[this.owner].Counterweight(targetNPC.Center, this.damage, this.knockBack); + if ((double) targetNPC.Center.X < (double) Main.player[this.owner].Center.X) + this.direction = -1; + else + this.direction = 1; + if ((double) this.ai[0] >= 0.0) + { + Vector2 vector2 = this.Center - targetNPC.Center; + vector2.Normalize(); + float num10 = 16f; + this.velocity = this.velocity * -0.5f; + this.velocity = this.velocity + vector2 * num10; + this.netUpdate = true; + this.localAI[0] += 20f; + if (!Collision.CanHit(this.position, this.width, this.height, Main.player[this.owner].position, Main.player[this.owner].width, Main.player[this.owner].height)) + { + this.localAI[0] += 40f; + Damage1 = (int) ((double) Damage1 * 0.75); + } + } + } + if (this.type == 856 && !Collision.CanHit(this.position, this.width, this.height, Main.player[this.owner].position, Main.player[this.owner].width, Main.player[this.owner].height)) + Damage1 = (int) ((double) Damage1 * 0.75); + if (this.aiStyle == 93) + { + if ((double) this.ai[0] == 0.0) + { + this.ai[1] = 0.0f; + this.ai[0] = (float) (-index1 - 1); + this.velocity = targetNPC.Center - this.Center; + } + Damage1 = (double) this.ai[0] != 2.0 ? (int) ((double) Damage1 * 0.15) : (int) ((double) Damage1 * 1.35); + } + if (flag6) + { + int num11 = Item.NPCtoBanner(targetNPC.BannerID()); + if (num11 >= 0) + Main.player[Main.myPlayer].lastCreatureHit = num11; + } + if (Main.netMode != 2 & flag6) + { + int num12 = Item.NPCtoBanner(targetNPC.BannerID()); + if (num12 > 0 && Main.player[this.owner].HasNPCBannerBuff(num12)) + Damage1 = !Main.expertMode ? (int) ((double) Damage1 * (double) ItemID.Sets.BannerStrength[Item.BannerToItem(num12)].NormalDamageDealt) : (int) ((double) Damage1 * (double) ItemID.Sets.BannerStrength[Item.BannerToItem(num12)].ExpertDamageDealt); + } + if (Main.expertMode) + { + if ((this.type == 30 || this.type == 397 || this.type == 517 || this.type == 28 || this.type == 37 || this.type == 516 || this.type == 29 || this.type == 470 || this.type == 637 || this.type == 108 || this.type == 281 || this.type == 588 || this.type == 519 || this.type == 773 || this.type == 183 || this.type == 181 || this.type == 566) && targetNPC.type >= 13 && targetNPC.type <= 15) + Damage1 /= 5; + if (this.type == 280 && (targetNPC.type >= 134 && targetNPC.type <= 136 || targetNPC.type == 139)) + Damage1 = (int) ((double) Damage1 * 0.75); + } + if (Main.netMode != 2 && targetNPC.type == 439 && this.type >= 0 && this.type <= 950 && ProjectileID.Sets.CountsAsHoming[this.type]) + Damage1 = (int) ((double) Damage1 * 0.75); + if (this.type == 497 && this.penetrate != 1) + { + this.ai[0] = 25f; + float num13 = this.velocity.Length(); + Vector2 vector2 = targetNPC.Center - this.Center; + vector2.Normalize(); + vector2 *= num13; + this.velocity = -vector2 * 0.9f; + this.netUpdate = true; + } + if (this.type == 323 && (targetNPC.type == 158 || targetNPC.type == 159)) + Damage1 *= 10; + if (this.type == 294) + this.damage = (int) ((double) this.damage * 0.8); + if (this.type == 265) + this.damage = (int) ((double) this.damage * 0.75); + if (this.type == 355) + this.damage = (int) ((double) this.damage * 0.75); + if (this.type == 85) + this.damage = (int) ((double) this.damage * 0.85); + if (this.type == 866) + this.damage = (int) ((double) this.damage * 0.7); + if (this.type == 841) + this.damage = (int) ((double) this.damage * 0.5); + if (this.type == 914) + this.damage = (int) ((double) this.damage * 0.6); + if (this.type == 913) + this.damage = (int) ((double) this.damage * 0.66); + if (this.type == 912) + this.damage = (int) ((double) this.damage * 0.66); + if (this.type == 847) + this.damage = (int) ((double) this.damage * 0.7); + if (this.type == 848) + this.damage = (int) ((double) this.damage * 0.75); + if (this.type == 849) + this.damage = (int) ((double) this.damage * 0.7); + if (this.type == 915) + this.damage = (int) ((double) this.damage * 0.85); + if (this.type == 931) + this.damage = (int) ((double) this.damage * 0.8); + if (this.type == 477 && this.penetrate > 1) + { + int[] numArray = new int[10]; + int maxValue = 0; + int num14 = 700; + int num15 = 20; + for (int index6 = 0; index6 < 200; ++index6) + { + if (index6 != index1 && Main.npc[index6].CanBeChasedBy((object) this)) + { + float num16 = (this.Center - Main.npc[index6].Center).Length(); + if ((double) num16 > (double) num15 && (double) num16 < (double) num14 && Collision.CanHitLine(this.Center, 1, 1, Main.npc[index6].Center, 1, 1)) + { + numArray[maxValue] = index6; + ++maxValue; + if (maxValue >= 9) + break; + } + } + } + if (maxValue > 0) + { + int index7 = Main.rand.Next(maxValue); + Vector2 vector2 = Main.npc[numArray[index7]].Center - this.Center; + float num17 = this.velocity.Length(); + vector2.Normalize(); + this.velocity = vector2 * num17; + this.netUpdate = true; + } + } + if (this.type == 261 && (double) this.velocity.Length() < 3.5) + { + Damage1 /= 2; + knockBack /= 2f; + } + if (flag6 && this.melee && Main.player[this.owner].parryDamageBuff && !ProjectileID.Sets.DontApplyParryDamageBuff[this.type]) + { + Damage1 *= 5; + Main.player[this.owner].parryDamageBuff = false; + Main.player[this.owner].ClearBuff(198); + } + this.StatusNPC(index1); + if (flag6 && targetNPC.life > 5) + this.TryDoingOnHitEffects((Entity) targetNPC); + if (ProjectileID.Sets.ImmediatelyUpdatesNPCBuffFlags[this.type]) + targetNPC.UpdateNPC_BuffSetFlags(false); + if (this.type == 317) + { + this.ai[1] = -1f; + this.netUpdate = true; + } + int hitDirection = this.direction; + if (this.type == 697 || this.type == 699 || this.type == 707 || this.type == 708) + hitDirection = (double) Main.player[this.owner].Center.X < (double) targetNPC.Center.X ? 1 : -1; + if (this.aiStyle == 15) + { + hitDirection = (double) Main.player[this.owner].Center.X < (double) targetNPC.Center.X ? 1 : -1; + if ((double) this.ai[0] == 0.0) + knockBack *= 0.25f; + if ((double) this.ai[0] == 6.0) + knockBack *= 0.5f; + } + if (flag6 && !this.hostile && armorPenetration > 0) + Damage1 += targetNPC.checkArmorPenetration(armorPenetration); + int dmg = !flag6 ? (int) targetNPC.StrikeNPCNoInteraction(Damage1, knockBack, hitDirection, crit) : (int) targetNPC.StrikeNPC(Damage1, knockBack, hitDirection, crit); + if (flag6 && Main.player[this.owner].accDreamCatcher) + Main.player[this.owner].addDPS(dmg); + if (flag6 && !targetNPC.immortal) + { + if (this.type == 756) + { + if (this.penetrate == 1) + { + this.damage = 0; + this.penetrate = -1; + } + else + this.damage = (int) ((double) this.damage * 0.7); + } + if (this.type == 304 && dmg > 0 && targetNPC.lifeMax > 5 && !Main.player[this.owner].moonLeech) + this.vampireHeal(dmg, new Vector2(targetNPC.Center.X, targetNPC.Center.Y)); + if ((double) targetNPC.value > 0.0 && Main.player[this.owner].coins && Main.rand.Next(5) == 0) + { + int Type = 71; + if (Main.rand.Next(10) == 0) + Type = 72; + if (Main.rand.Next(100) == 0) + Type = 73; + int number = Item.NewItem((int) targetNPC.position.X, (int) targetNPC.position.Y, targetNPC.width, targetNPC.height, Type); + Main.item[number].stack = Main.rand.Next(1, 11); + Main.item[number].velocity.Y = (float) Main.rand.Next(-20, 1) * 0.2f; + Main.item[number].velocity.X = (float) Main.rand.Next(10, 31) * 0.2f * (float) hitDirection; + if (Main.netMode == 1) + NetMessage.SendData(21, number: number); + } + if (dmg > 0 && targetNPC.lifeMax > 5 && this.friendly && !this.hostile && this.aiStyle != 59) + { + if (targetNPC.canGhostHeal) + { + if (Main.player[this.owner].ghostHeal && !Main.player[this.owner].moonLeech) + this.ghostHeal(dmg, new Vector2(targetNPC.Center.X, targetNPC.Center.Y)); + if (Main.player[this.owner].ghostHurt) + this.ghostHurt(dmg, new Vector2(targetNPC.Center.X, targetNPC.Center.Y)); + if (this.magic && Main.player[this.owner].setNebula && Main.player[this.owner].nebulaCD == 0 && Main.rand.Next(3) == 0) + { + Main.player[this.owner].nebulaCD = 30; + int Type = Utils.SelectRandom(Main.rand, 3453, 3454, 3455); + int number = Item.NewItem((int) targetNPC.position.X, (int) targetNPC.position.Y, targetNPC.width, targetNPC.height, Type); + Main.item[number].velocity.Y = (float) Main.rand.Next(-20, 1) * 0.2f; + Main.item[number].velocity.X = (float) Main.rand.Next(10, 31) * 0.2f * (float) hitDirection; + if (Main.netMode == 1) + NetMessage.SendData(21, number: number); + } + } + if (this.melee && Main.player[this.owner].beetleOffense && !targetNPC.immortal) + { + if (Main.player[this.owner].beetleOrbs == 0) + Main.player[this.owner].beetleCounter += (float) (dmg * 3); + else if (Main.player[this.owner].beetleOrbs == 1) + Main.player[this.owner].beetleCounter += (float) (dmg * 2); + else + Main.player[this.owner].beetleCounter += (float) dmg; + Main.player[this.owner].beetleCountdown = 0; + } + if (this.arrow && this.type != 631 && Main.player[this.owner].phantasmTime > 0) + { + Vector2 Source = Main.player[this.owner].position + Main.player[this.owner].Size * Utils.RandomVector2(Main.rand, 0.0f, 1f); + Vector2 vector2 = targetNPC.DirectionFrom(Source) * 6f; + int Damage3 = (int) ((double) this.damage * 0.300000011920929); + Projectile.NewProjectile(Source.X, Source.Y, vector2.X, vector2.Y, 631, Damage3, 0.0f, this.owner, (float) index1); + Projectile.NewProjectile(Source.X, Source.Y, vector2.X, vector2.Y, 631, Damage3, 0.0f, this.owner, (float) index1, 15f); + Projectile.NewProjectile(Source.X, Source.Y, vector2.X, vector2.Y, 631, Damage3, 0.0f, this.owner, (float) index1, 30f); + } + Player player = Main.player[this.owner]; + switch (this.type) + { + case 847: + player.AddBuff(308, 180); + break; + case 849: + player.AddBuff(311, 180); + break; + case 912: + int Damage4 = 10; + if (!player.coolWhipBuff) + { + Projectile.NewProjectile(targetNPC.Center, Vector2.Zero, 917, Damage4, 0.0f, this.owner); + player.coolWhipBuff = true; + } + player.AddBuff(312, 180); + break; + case 914: + player.AddBuff(314, 180); + break; + } + } + } + if (flag6 && this.melee && Main.player[this.owner].meleeEnchant == (byte) 7) + Projectile.NewProjectile(targetNPC.Center.X, targetNPC.Center.Y, targetNPC.velocity.X, targetNPC.velocity.Y, 289, 0, 0.0f, this.owner); + if (flag6 && this.type == 913) + this.localAI[0] = 1f; + if (Main.netMode != 0) + { + if (crit) + NetMessage.SendData(28, number: index1, number2: ((float) Damage1), number3: this.knockBack, number4: ((float) hitDirection), number5: 1); + else + NetMessage.SendData(28, number: index1, number2: ((float) Damage1), number3: this.knockBack, number4: ((float) hitDirection)); + } + if (this.type == 916) + Projectile.EmitBlackLightningParticles(targetNPC); + if (this.type >= 390 && this.type <= 392) + this.localAI[1] = 20f; + if (this.usesIDStaticNPCImmunity) + { + targetNPC.immune[this.owner] = 0; + Projectile.perIDStaticNPCImmunity[this.type][index1] = Main.GameUpdateCount + (uint) this.idStaticNPCHitCooldown; + } + else if (this.type == 434) + this.numUpdates = 0; + else if (this.type == 598 || this.type == 636 || this.type == 614) + { + this.damage = 0; + int length = 6; + if (this.type == 614) + length = 10; + if (this.type == 636) + length = 8; + Point[] pointArray = new Point[length]; + int num18 = 0; + for (int x = 0; x < 1000; ++x) + { + if (x != this.whoAmI && Main.projectile[x].active && Main.projectile[x].owner == Main.myPlayer && Main.projectile[x].type == this.type && (double) Main.projectile[x].ai[0] == 1.0 && (double) Main.projectile[x].ai[1] == (double) index1) + { + pointArray[num18++] = new Point(x, Main.projectile[x].timeLeft); + if (num18 >= pointArray.Length) + break; + } + } + if (num18 >= pointArray.Length) + { + int index8 = 0; + for (int index9 = 1; index9 < pointArray.Length; ++index9) + { + if (pointArray[index9].Y < pointArray[index8].Y) + index8 = index9; + } + Main.projectile[pointArray[index8].X].Kill(); + } + } + else if (this.type == 632) + targetNPC.immune[this.owner] = 5; + else if (this.type == 514) + targetNPC.immune[this.owner] = 1; + else if (this.type == 611) + { + if ((double) this.localAI[1] <= 0.0) + Projectile.NewProjectile(targetNPC.Center.X, targetNPC.Center.Y, 0.0f, 0.0f, 612, this.damage, 10f, this.owner, ai1: ((float) (0.850000023841858 + (double) Main.rand.NextFloat() * 1.14999997615814))); + this.localAI[1] = 4f; + } + else if (this.type == 595 || this.type == 735) + targetNPC.immune[this.owner] = 5; + else if (this.type == 927) + targetNPC.immune[this.owner] = 4; + else if (this.type == 286) + targetNPC.immune[this.owner] = 5; + else if (this.type == 443) + targetNPC.immune[this.owner] = 8; + else if (this.type >= 424 && this.type <= 426) + targetNPC.immune[this.owner] = 5; + else if (this.type == 634 || this.type == 635) + targetNPC.immune[this.owner] = 5; + else if (this.type == 659) + targetNPC.immune[this.owner] = 5; + else if (this.type == 246) + targetNPC.immune[this.owner] = 7; + else if (this.type == 249) + targetNPC.immune[this.owner] = 7; + else if (this.type == 16) + targetNPC.immune[this.owner] = 8; + else if (this.type == 409) + targetNPC.immune[this.owner] = 6; + else if (this.type == 407) + targetNPC.immune[this.owner] = 20; + else if (this.type == 311) + targetNPC.immune[this.owner] = 7; + else if (this.type == 582 || this.type == 902) + { + targetNPC.immune[this.owner] = 7; + if ((double) this.ai[0] != 1.0) + { + this.ai[0] = 1f; + this.netUpdate = true; + } + } + else + { + if (this.type == 451) + { + if ((double) this.ai[0] == 0.0) + this.ai[0] += (float) this.penetrate; + else + this.ai[0] -= (float) (this.penetrate + 1); + this.ai[1] = 0.0f; + this.netUpdate = true; + NPC npc3 = Main.npc[index1]; + npc3.position = npc3.position - Main.npc[index1].netOffset; + break; + } + if (this.type == 864) + { + localNpcImmunity[index1] = 10; + targetNPC.immune[this.owner] = 0; + if ((double) this.ai[0] > 0.0) + { + this.ai[0] = -1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + } + } + else if (this.type == 661 || this.type == 856) + { + localNpcImmunity[index1] = 8; + targetNPC.immune[this.owner] = 0; + } + else if (this.type == 866) + { + localNpcImmunity[index1] = -1; + targetNPC.immune[this.owner] = 0; + --this.penetrate; + if (this.penetrate == 0) + { + this.penetrate = 1; + this.damage = 0; + this.ai[1] = -1f; + this.netUpdate = true; + NPC npc4 = Main.npc[index1]; + npc4.position = npc4.position - Main.npc[index1].netOffset; + break; + } + if (this.owner == Main.myPlayer) + { + int targetWithLineOfSight = this.FindTargetWithLineOfSight(); + float num19 = this.ai[1]; + this.ai[1] = (float) targetWithLineOfSight; + if ((double) this.ai[1] != (double) num19) + this.netUpdate = true; + if (targetWithLineOfSight != -1) + this.velocity = this.velocity.Length() * this.DirectionTo(Main.npc[targetWithLineOfSight].Center); + } + } + else if (this.usesLocalNPCImmunity && this.localNPCHitCooldown != -2) + { + targetNPC.immune[this.owner] = 0; + localNpcImmunity[index1] = this.localNPCHitCooldown; + } + else if (this.penetrate != 1) + targetNPC.immune[this.owner] = 10; + } + if (this.type == 710) + this.BetsySharpnel(index1); + if (this.penetrate > 0 && this.type != 317 && this.type != 866) + { + if (this.type == 357) + this.damage = (int) ((double) this.damage * 0.8); + --this.penetrate; + if (this.penetrate == 0) + { + NPC npc5 = Main.npc[index1]; + npc5.position = npc5.position - Main.npc[index1].netOffset; + break; + } + } + if (this.aiStyle == 7) + { + this.ai[0] = 1f; + this.damage = 0; + this.netUpdate = true; + } + else if (this.aiStyle == 13) + { + this.ai[0] = 1f; + this.netUpdate = true; + } + else if (this.aiStyle == 69) + { + this.ai[0] = 1f; + this.netUpdate = true; + } + else if (this.type == 607) + { + this.ai[0] = 1f; + this.netUpdate = true; + this.friendly = false; + } + else if (this.type == 638 || this.type == 639 || this.type == 640) + { + localNpcImmunity[index1] = -1; + targetNPC.immune[this.owner] = 0; + this.damage = (int) ((double) this.damage * 0.96); + } + else if (this.type == 617) + { + localNpcImmunity[index1] = 8; + targetNPC.immune[this.owner] = 0; + } + else if (this.type == 656) + { + localNpcImmunity[index1] = 8; + targetNPC.immune[this.owner] = 0; + ++this.localAI[0]; + } + else if (this.type == 618) + { + localNpcImmunity[index1] = 20; + targetNPC.immune[this.owner] = 0; + } + else if (this.type == 642) + { + localNpcImmunity[index1] = 10; + targetNPC.immune[this.owner] = 0; + } + else if (this.type == 857) + { + localNpcImmunity[index1] = 10; + targetNPC.immune[this.owner] = 0; + } + else if (this.type == 611 || this.type == 612) + { + localNpcImmunity[index1] = 6; + targetNPC.immune[this.owner] = 4; + } + else if (this.type == 645) + { + localNpcImmunity[index1] = -1; + targetNPC.immune[this.owner] = 0; + if ((double) this.ai[1] != -1.0) + { + this.ai[0] = 0.0f; + this.ai[1] = -1f; + this.netUpdate = true; + } + } + ++this.numHits; + if (this.type == 697) + { + if ((double) this.ai[0] >= 42.0) + this.localAI[1] = 1f; + } + else if (this.type == 699) + this.SummonMonkGhast(); + else if (this.type == 706) + this.damage = (int) ((double) this.damage * 0.949999988079071); + else if (this.type == 728) + this.SummonSuperStarSlash(targetNPC.Center); + else if (this.type == 34) + { + if ((double) this.ai[0] == -1.0) + { + this.ai[1] = -1f; + this.netUpdate = true; + } + } + else if (this.type == 79) + { + if ((double) this.ai[0] == -1.0) + { + this.ai[1] = -1f; + this.netUpdate = true; + } + ParticleOrchestrator.RequestParticleSpawn(false, ParticleOrchestraType.RainbowRodHit, new ParticleOrchestraSettings() + { + PositionInWorld = targetNPC.Center, + MovementVector = this.velocity + }); + } + else if (this.type == 931) + { + int targetWithLineOfSight = this.FindTargetWithLineOfSight(); + if (targetWithLineOfSight != -1) + { + this.ai[0] = (float) targetWithLineOfSight; + this.netUpdate = true; + } + } + else if (this.aiStyle == 165) + { + if (targetNPC.active) + Main.player[this.owner].MinionAttackTargetNPC = index1; + } + else if (this.type == 623) + ParticleOrchestrator.RequestParticleSpawn(false, ParticleOrchestraType.StardustPunch, new ParticleOrchestraSettings() + { + PositionInWorld = Vector2.Lerp(this.Center, targetNPC.Hitbox.ClosestPointInRect(this.Center), 0.5f) + new Vector2(0.0f, Main.rand.NextFloatDirection() * 10f), + MovementVector = new Vector2((float) this.direction, Main.rand.NextFloatDirection() * 0.5f) * (float) (3.0 + 3.0 * (double) Main.rand.NextFloat()) + }); + } + } + } + NPC npc6 = Main.npc[index1]; + npc6.position = npc6.position - Main.npc[index1].netOffset; + } + } + } + if (this.damage > 0 && Main.player[Main.myPlayer].hostile) + { + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (index != this.owner) + { + Player player = Main.player[index]; + if (player.active && !player.dead && !player.immune && player.hostile && this.playerImmune[index] <= 0 && (Main.player[Main.myPlayer].team == 0 ? 1 : (Main.player[Main.myPlayer].team != player.team ? 1 : 0)) != 0) + { + bool flag14 = !this.ownerHitCheck; + if (this.ownerHitCheck) + flag14 |= this.CanHitWithMeleeWeapon((Entity) player); + if (flag14 && this.Colliding(myRect, player.getRect())) + { + if (this.aiStyle == 3) + { + if ((double) this.ai[0] == 0.0) + { + this.velocity.X = -this.velocity.X; + this.velocity.Y = -this.velocity.Y; + this.netUpdate = true; + } + this.ai[0] = 1f; + } + else if (this.aiStyle == 16) + { + if (this.timeLeft > 3) + this.timeLeft = 3; + if ((double) player.position.X + (double) (player.width / 2) < (double) this.position.X + (double) (this.width / 2)) + this.direction = -1; + else + this.direction = 1; + } + else if (this.aiStyle == 68) + { + if (this.timeLeft > 3) + this.timeLeft = 3; + if ((double) player.position.X + (double) (player.width / 2) < (double) this.position.X + (double) (this.width / 2)) + this.direction = -1; + else + this.direction = 1; + } + PlayerDeathReason playerDeathReason = PlayerDeathReason.ByProjectile(this.owner, this.whoAmI); + if (this.type == 41 && this.timeLeft > 1) + this.timeLeft = 1; + bool flag15 = false; + if (this.melee && Main.rand.Next(1, 101) <= Main.player[this.owner].meleeCrit) + flag15 = true; + int num20 = Main.DamageVar((float) (int) ((double) this.damage * (double) num1), Main.player[this.owner].luck); + if (!player.immune) + this.StatusPvP(index); + this.TryDoingOnHitEffects((Entity) player); + int dmg = (int) player.Hurt(playerDeathReason, num20, this.direction, true, Crit: flag15); + if (dmg > 0 && Main.player[this.owner].ghostHeal && this.friendly && !this.hostile) + this.ghostHeal(dmg, new Vector2(player.Center.X, player.Center.Y)); + if (this.type == 304 && dmg > 0) + this.vampireHeal(dmg, new Vector2(player.Center.X, player.Center.Y)); + if (this.melee && Main.player[this.owner].meleeEnchant == (byte) 7) + Projectile.NewProjectile(player.Center.X, player.Center.Y, player.velocity.X, player.velocity.Y, 289, 0, 0.0f, this.owner); + if (Main.netMode != 0) + NetMessage.SendPlayerHurt(index, playerDeathReason, num20, this.direction, flag15, true, -1); + this.playerImmune[index] = 40; + if (this.penetrate > 0) + { + --this.penetrate; + if (this.penetrate == 0) + break; + } + if (this.aiStyle == 7) + { + this.ai[0] = 1f; + this.damage = 0; + this.netUpdate = true; + } + else if (this.aiStyle == 13) + { + this.ai[0] = 1f; + this.netUpdate = true; + } + else if (this.aiStyle == 69) + { + this.ai[0] = 1f; + this.netUpdate = true; + } + } + } + } + } + } + } + if (this.type == 10 && Main.netMode != 1) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 534) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) Main.npc[index].position.X, (int) Main.npc[index].position.Y, Main.npc[index].width, Main.npc[index].height); + if (myRect.Intersects(rectangle)) + Main.npc[index].Transform(441); + } + } + } + if (this.type == 11 && Main.netMode != 1) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active) + { + if (Main.npc[index].type == 46 || Main.npc[index].type == 303) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) Main.npc[index].position.X, (int) Main.npc[index].position.Y, Main.npc[index].width, Main.npc[index].height); + if (myRect.Intersects(rectangle)) + Main.npc[index].Transform(47); + } + else if (Main.npc[index].type == 55) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) Main.npc[index].position.X, (int) Main.npc[index].position.Y, Main.npc[index].width, Main.npc[index].height); + if (myRect.Intersects(rectangle)) + Main.npc[index].Transform(57); + } + else if (Main.npc[index].type == 148 || Main.npc[index].type == 149) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) Main.npc[index].position.X, (int) Main.npc[index].position.Y, Main.npc[index].width, Main.npc[index].height); + if (myRect.Intersects(rectangle)) + Main.npc[index].Transform(168); + } + } + } + } + if (this.type == 463 && Main.netMode != 1) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active) + { + if (Main.npc[index].type == 46 || Main.npc[index].type == 303) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) Main.npc[index].position.X, (int) Main.npc[index].position.Y, Main.npc[index].width, Main.npc[index].height); + if (myRect.Intersects(rectangle)) + Main.npc[index].Transform(464); + } + else if (Main.npc[index].type == 55) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) Main.npc[index].position.X, (int) Main.npc[index].position.Y, Main.npc[index].width, Main.npc[index].height); + if (myRect.Intersects(rectangle)) + Main.npc[index].Transform(465); + } + else if (Main.npc[index].type == 148 || Main.npc[index].type == 149) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle((int) Main.npc[index].position.X, (int) Main.npc[index].position.Y, Main.npc[index].width, Main.npc[index].height); + if (myRect.Intersects(rectangle)) + Main.npc[index].Transform(470); + } + } + } + } + if (Main.netMode == 2 || !this.hostile || Main.myPlayer >= (int) byte.MaxValue || this.damage <= 0) + return; + int cooldownCounter = -1; + switch (this.type) + { + case 452: + case 454: + case 455: + case 462: + cooldownCounter = 1; + break; + case 871: + case 872: + case 873: + case 874: + case 919: + case 923: + case 924: + cooldownCounter = 1; + break; + } + int player1 = Main.myPlayer; + bool flag = Main.player[player1].active && !Main.player[player1].dead && (!Main.player[player1].immune || cooldownCounter != -1); + if (flag && this.type == 281) + flag = (double) this.ai[1] - 1.0 == (double) player1; + if (Main.getGoodWorld && this.type == 281) + flag = true; + if (!flag || !this.Colliding(myRect, Main.player[player1].getRect())) + return; + int direction = this.direction; + int hitDirection1 = (double) Main.player[player1].position.X + (double) (Main.player[player1].width / 2) >= (double) this.position.X + (double) (this.width / 2) ? 1 : -1; + if (!Main.player[player1].CanParryAgainst(Main.player[player1].Hitbox, this.Hitbox, this.velocity)) + { + int num21 = Main.DamageVar((float) this.damage, -Main.player[this.owner].luck); + if (!Main.player[player1].immune) + this.StatusPlayer(player1); + if (Main.player[player1].resistCold && this.coldDamage) + num21 = (int) ((double) num21 * 0.699999988079071); + float num22 = Main.GameModeInfo.EnemyDamageMultiplier; + if (Main.GameModeInfo.IsJourneyMode) + { + CreativePowers.DifficultySliderPower power = CreativePowerManager.Instance.GetPower(); + if (power.GetIsUnlocked()) + num22 = power.StrengthMultiplierToGiveNPCs; + } + int Damage = (int) ((double) num21 * (double) num22) * 2; + Main.player[player1].Hurt(PlayerDeathReason.ByProjectile(-1, this.whoAmI), Damage, hitDirection1, cooldownCounter: cooldownCounter); + if (this.trap) + { + Main.player[player1].trapDebuffSource = true; + if (Main.player[player1].dead) + AchievementsHelper.HandleSpecialEvent(Main.player[player1], 4); + } + } + if (false) + return; + if (this.type == 435 || this.type == 682) + --this.penetrate; + if (this.type == 436) + --this.penetrate; + if (this.type == 681) + this.timeLeft = 0; + if (this.type != 437) + return; + --this.penetrate; + } + + private static void EmitBlackLightningParticles(NPC targetNPC) => ParticleOrchestrator.RequestParticleSpawn(false, ParticleOrchestraType.BlackLightningHit, new ParticleOrchestraSettings() + { + PositionInWorld = targetNPC.Center + }); + + private void TryDoingOnHitEffects(Entity entity) + { + switch (this.type) + { + case 221: + break; + case 227: + break; + case 614: + break; + case 729: + break; + case 908: + break; + default: + Main.player[this.owner].OnHit(entity.Center.X, entity.Center.Y, entity); + break; + } + } + + private void SummonSuperStarSlash(Vector2 target) + { + Vector2 v = Main.rand.NextVector2CircularEdge(200f, 200f); + if ((double) v.Y < 0.0) + v.Y *= -1f; + v.Y += 100f; + Vector2 velocity = v.SafeNormalize(Vector2.UnitY) * 6f; + Projectile.NewProjectile(target - velocity * 20f, velocity, 729, this.damage / 2, 0.0f, this.owner, ai1: target.Y); + } + + private void SummonMonkGhast() + { + if ((double) this.localAI[0] > 0.0) + return; + this.localAI[0] = 1000f; + List npcList = new List(); + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.CanBeChasedBy((object) this) && (double) this.Distance(npc.Center) < 800.0) + npcList.Add(npc); + } + Vector2 center = this.Center; + Vector2 vector2_1 = Vector2.Zero; + if (npcList.Count > 0) + { + NPC npc = npcList[Main.rand.Next(npcList.Count)]; + center = npc.Center; + vector2_1 = npc.velocity; + } + int num = Main.rand.Next(2) * 2 - 1; + Vector2 vector2_2 = new Vector2((float) num * (4f + (float) Main.rand.Next(3)), 0.0f); + Vector2 position = center + new Vector2((float) (-num * 120), 0.0f); + Vector2 velocity = vector2_2 + (center + vector2_1 * 15f - position).SafeNormalize(Vector2.Zero) * 2f; + Projectile.NewProjectile(position, velocity, 700, this.damage, 0.0f, this.owner); + } + + private void CutTiles() + { + if (!this.CanCutTiles()) + return; + AchievementsHelper.CurrentlyMining = true; + bool flag = true; + if (this.type == 461 || this.type == 632 || this.type == 642) + { + DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile; + Utils.PlotTileLine(this.Center, this.Center + this.velocity * this.localAI[1], (float) this.width * this.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles)); + } + else if (ProjectileID.Sets.IsAWhip[this.type]) + { + flag = false; + this._whipPointsForCollision.Clear(); + Projectile.FillWhipControlPoints(this, this._whipPointsForCollision); + Vector2 vector2 = new Vector2((float) ((double) this.width * (double) this.scale / 2.0), 0.0f); + for (int index = 0; index < this._whipPointsForCollision.Count; ++index) + { + DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile; + Utils.PlotTileLine(this._whipPointsForCollision[index] - vector2, this._whipPointsForCollision[index] + vector2, (float) this.height * this.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles)); + } + } + else if (this.type == 756) + { + DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile; + Utils.PlotTileLine(this.Center, this.Center + this.velocity.SafeNormalize(-Vector2.UnitY) * 200f * this.scale, 22f * this.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles)); + } + else if (this.type == 927) + { + DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile; + Utils.PlotTileLine(this.Center, this.Center + this.velocity.SafeNormalize(Vector2.UnitX) * 220f * this.scale, 80f * this.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles)); + } + else if (this.type == 802 || this.type == 842 || this.type == 938 || this.type == 939 || this.type == 940 || this.type == 941 || this.type == 942 || this.type == 943 || this.type == 944 || this.type == 945) + { + DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile; + Utils.PlotTileLine(this.Center, this.Center + this.velocity.SafeNormalize(-Vector2.UnitY) * 10f, 10f * this.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles)); + } + else if (this.type == 611) + { + DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile; + Utils.PlotTileLine(this.Center, this.Center + this.velocity + this.velocity.SafeNormalize(Vector2.Zero) * 48f, (float) this.width * this.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles)); + } + else if (this.type == 697 || this.type == 707) + { + float num = 40f; + if (this.type == 707) + num = 60f; + float f = this.rotation - 0.7853982f * (float) Math.Sign(this.velocity.X); + DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile; + Utils.PlotTileLine(this.Center + f.ToRotationVector2() * -num, this.Center + f.ToRotationVector2() * num, (float) this.width * this.scale, new Utils.TileActionAttempt(DelegateMethods.CutTiles)); + } + if (flag) + { + int num1 = (int) ((double) this.position.X / 16.0); + int num2 = (int) (((double) this.position.X + (double) this.width) / 16.0) + 1; + int num3 = (int) ((double) this.position.Y / 16.0); + int num4 = (int) (((double) this.position.Y + (double) this.height) / 16.0) + 1; + if (num1 < 0) + num1 = 0; + if (num2 > Main.maxTilesX) + num2 = Main.maxTilesX; + if (num3 < 0) + num3 = 0; + if (num4 > Main.maxTilesY) + num4 = Main.maxTilesY; + for (int index1 = num1; index1 < num2; ++index1) + { + for (int index2 = num3; index2 < num4; ++index2) + { + if (Main.tile[index1, index2] != null && Main.tileCut[(int) Main.tile[index1, index2].type] && WorldGen.CanCutTile(index1, index2, TileCuttingContext.AttackProjectile)) + { + WorldGen.KillTile(index1, index2); + if (Main.netMode != 0) + NetMessage.SendData(17, number2: ((float) index1), number3: ((float) index2)); + } + } + } + } + AchievementsHelper.CurrentlyMining = false; + } + + private bool CanCutTiles() => this.aiStyle != 45 && this.aiStyle != 137 && this.aiStyle != 92 && this.aiStyle != 105 && this.aiStyle != 106 && !ProjectileID.Sets.IsAGolfBall[this.type] && this.type != 463 && this.type != 69 && this.type != 70 && this.type != 621 && this.type != 10 && this.type != 11 && this.type != 379 && this.type != 407 && this.type != 476 && this.type != 623 && (this.type < 625 || this.type > 628) && this.type != 833 && this.type != 834 && this.type != 835 && this.type != 818 && this.type != 831 && this.type != 820 && this.type != 864; + + public bool Colliding(Microsoft.Xna.Framework.Rectangle myRect, Microsoft.Xna.Framework.Rectangle targetRect) + { + if (this.aiStyle == 15) + { + if ((double) this.ai[0] == 0.0) + { + Vector2 mountedCenter = Main.player[this.owner].MountedCenter; + Vector2 vector2 = targetRect.ClosestPointInRect(mountedCenter) - mountedCenter; + vector2.Y /= 0.8f; + float num = 55f; + return (double) vector2.Length() <= (double) num; + } + } + else if (this.type == 623) + { + if ((double) this.ai[0] == 2.0) + { + Microsoft.Xna.Framework.Rectangle rectangle = Utils.CenteredRectangle(this.Center + new Vector2((float) (this.direction * 40), 0.0f), new Vector2(80f, 40f)); + if (targetRect.Intersects(rectangle)) + return true; + } + } + else + { + if (this.type == 933) + { + float collisionPoint = 0.0f; + float num1 = 40f; + for (int index = 14; index < this.oldPos.Length; index += 15) + { + float num2 = this.localAI[0] - (float) index; + if ((double) num2 >= 0.0 && (double) num2 <= 60.0) + { + Vector2 vector2 = this.oldPos[index] + this.Size / 2f; + Vector2 rotationVector2 = (this.oldRot[index] + 1.570796f).ToRotationVector2(); + Projectile._lanceHitboxBounds.X = (int) vector2.X - Projectile._lanceHitboxBounds.Width / 2; + Projectile._lanceHitboxBounds.Y = (int) vector2.Y - Projectile._lanceHitboxBounds.Height / 2; + if (Projectile._lanceHitboxBounds.Intersects(targetRect) && Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), vector2 - rotationVector2 * num1, vector2 + rotationVector2 * num1, 20f, ref collisionPoint)) + return true; + } + } + Vector2 rotationVector2_1 = (this.rotation + 1.570796f).ToRotationVector2(); + Projectile._lanceHitboxBounds.X = (int) this.position.X - Projectile._lanceHitboxBounds.Width / 2; + Projectile._lanceHitboxBounds.Y = (int) this.position.Y - Projectile._lanceHitboxBounds.Height / 2; + return Projectile._lanceHitboxBounds.Intersects(targetRect) && Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center - rotationVector2_1 * num1, this.Center + rotationVector2_1 * num1, 20f, ref collisionPoint); + } + if (this.type == 927) + { + for (int index = 1; index <= 5; ++index) + { + Microsoft.Xna.Framework.Rectangle rectangle = myRect; + Vector2 vector2 = this.velocity.SafeNormalize(Vector2.Zero) * (float) this.width * (float) index; + rectangle.Offset((int) vector2.X, (int) vector2.Y); + if (rectangle.Intersects(targetRect)) + return true; + } + } + else + { + if (this.type == 877 || this.type == 878 || this.type == 879) + { + float f = (float) ((double) this.rotation - 0.785398185253143 - 1.57079637050629 - (this.spriteDirection == 1 ? 3.14159274101257 : 0.0)); + float collisionPoint = 0.0f; + float num = 95f; + Projectile._lanceHitboxBounds.X = (int) this.position.X - Projectile._lanceHitboxBounds.Width / 2; + Projectile._lanceHitboxBounds.Y = (int) this.position.Y - Projectile._lanceHitboxBounds.Height / 2; + return Projectile._lanceHitboxBounds.Intersects(targetRect) && Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center, this.Center + f.ToRotationVector2() * num, 23f * this.scale, ref collisionPoint); + } + if (this.type == 919 || this.type == 932) + { + double rotation = (double) this.rotation; + float collisionPoint = 0.0f; + float num = 40f; + Vector2 rotationVector2 = ((float) rotation).ToRotationVector2(); + Projectile._lanceHitboxBounds.X = (int) this.position.X - Projectile._lanceHitboxBounds.Width / 2; + Projectile._lanceHitboxBounds.Y = (int) this.position.Y - Projectile._lanceHitboxBounds.Height / 2; + return Projectile._lanceHitboxBounds.Intersects(targetRect) && Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center - rotationVector2 * num, this.Center + rotationVector2 * num, 8f, ref collisionPoint); + } + if (this.type == 923) + { + float collisionPoint = 0.0f; + double scale = (double) this.scale; + double rotation = (double) this.rotation; + Vector2 objectPosition = targetRect.TopLeft(); + Vector2 objectDimensions = targetRect.Size(); + Vector2 rotationVector2 = ((float) rotation).ToRotationVector2(); + float num = this.scale * 0.7f; + return Collision.CheckAABBvLineCollision(objectPosition, objectDimensions, this.Center, this.Center + rotationVector2 * this.scale * 510f, num * 100f, ref collisionPoint) || Collision.CheckAABBvLineCollision(objectPosition, objectDimensions, this.Center, this.Center + rotationVector2 * this.scale * 660f, num * 60f, ref collisionPoint) || Collision.CheckAABBvLineCollision(objectPosition, objectDimensions, this.Center, this.Center + rotationVector2 * this.scale * 800f, num * 10f, ref collisionPoint); + } + if (this.type == 598 && targetRect.Width > 8 && targetRect.Height > 8) + { + targetRect.Inflate(-targetRect.Width / 8, -targetRect.Height / 8); + } + else + { + if (this.type == 872) + { + Microsoft.Xna.Framework.Rectangle hitbox = this.Hitbox; + int num = 80; + for (int index = 0; index < num; index += 2) + { + Vector2 oldPo = this.oldPos[index]; + if (!(oldPo == Vector2.Zero)) + { + hitbox.X = (int) oldPo.X; + hitbox.Y = (int) oldPo.Y; + if (hitbox.Intersects(targetRect)) + return true; + } + } + return false; + } + if (this.type == 871) + { + int pelletStormsCount = this.AI_172_GetPelletStormsCount(); + for (int stormIndex = 0; stormIndex < pelletStormsCount; ++stormIndex) + { + Projectile.HallowBossPelletStormInfo pelletStormInfo = this.AI_172_GetPelletStormInfo(stormIndex); + for (int bulletIndex = 0; bulletIndex < pelletStormInfo.BulletsInStorm; ++bulletIndex) + { + if (pelletStormInfo.IsValid(bulletIndex) && pelletStormInfo.GetBulletHitbox(bulletIndex, this.Center).Intersects(targetRect)) + return true; + } + } + return false; + } + if (ProjectileID.Sets.IsAWhip[this.type]) + { + this._whipPointsForCollision.Clear(); + Projectile.FillWhipControlPoints(this, this._whipPointsForCollision); + for (int index = 0; index < this._whipPointsForCollision.Count; ++index) + { + Point point = this._whipPointsForCollision[index].ToPoint(); + myRect.Location = new Point(point.X - myRect.Width / 2, point.Y - myRect.Height / 2); + if (myRect.Intersects(targetRect)) + return true; + } + return false; + } + if (this.type == 614 && targetRect.Width > 8 && targetRect.Height > 8) + targetRect.Inflate(-targetRect.Width / 8, -targetRect.Height / 8); + else if (this.type == 758) + { + if ((double) this.ai[0] == 2.0 && Utils.CenteredRectangle(this.Center + new Vector2((float) (this.spriteDirection * 30), 0.0f), new Vector2(50f, 20f)).Intersects(targetRect)) + return true; + } + else if (this.type == 636 && targetRect.Width > 8 && targetRect.Height > 8) + targetRect.Inflate(-targetRect.Width / 8, -targetRect.Height / 8); + else if (this.type == 607) + { + myRect.X += (int) this.velocity.X; + myRect.Y += (int) this.velocity.Y; + } + else if (this.type == 661) + { + if ((double) Vector2.Distance(myRect.Center.ToVector2(), targetRect.Center.ToVector2()) > 500.0 || !Collision.CanHitLine(myRect.Center.ToVector2(), 0, 0, targetRect.Center.ToVector2(), 0, 0)) + return false; + } + else if (this.aiStyle == 137) + return myRect.Intersects(targetRect) && (double) targetRect.Distance(this.Center) < (double) (this.height / 2 - 20) && (this.AI_137_CanHit(targetRect.Center.ToVector2()) || this.AI_137_CanHit(targetRect.TopLeft() + new Vector2((float) (targetRect.Width / 2), 0.0f))); + } + } + } + if (myRect.Intersects(targetRect)) + return true; + if (this.type == 461) + { + float collisionPoint = 0.0f; + return Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center, this.Center + this.velocity * this.localAI[1], 22f * this.scale, ref collisionPoint); + } + if (this.type == 697 || this.type == 707) + { + float f = this.rotation - 0.7853982f * (float) Math.Sign(this.velocity.X); + float collisionPoint = 0.0f; + float num = 50f; + if (this.type == 707) + num = 110f; + return Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center + f.ToRotationVector2() * -num, this.Center + f.ToRotationVector2() * num, 23f * this.scale, ref collisionPoint); + } + if (this.type == 699) + { + float f = (float) ((double) this.rotation - 0.785398185253143 * (double) Math.Sign(this.velocity.X) + (this.spriteDirection == -1 ? 3.14159274101257 : 0.0)); + float collisionPoint = 0.0f; + float num = -95f; + return Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center, this.Center + f.ToRotationVector2() * num, 23f * this.scale, ref collisionPoint); + } + if (this.type == 642) + { + float collisionPoint = 0.0f; + return Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center, this.Center + this.velocity * this.localAI[1], 30f * this.scale, ref collisionPoint); + } + if (this.type == 802 || this.type == 842 || this.type == 938 || this.type == 939 || this.type == 940 || this.type == 941 || this.type == 942 || this.type == 943 || this.type == 944 || this.type == 945) + { + float collisionPoint = 0.0f; + return Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center, this.Center + this.velocity * 6f, 10f * this.scale, ref collisionPoint); + } + if (this.type == 632) + { + float collisionPoint = 0.0f; + return Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center, this.Center + this.velocity * this.localAI[1], 22f * this.scale, ref collisionPoint); + } + if (this.type == 455) + { + float collisionPoint = 0.0f; + return Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center, this.Center + this.velocity * this.localAI[1], 36f * this.scale, ref collisionPoint); + } + if (this.type == 611) + { + float collisionPoint = 0.0f; + return Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center, this.Center + this.velocity + this.velocity.SafeNormalize(Vector2.Zero) * 48f, 16f * this.scale, ref collisionPoint); + } + if (this.type == 684) + { + float collisionPoint = 0.0f; + Vector2 vector2 = this.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(-1.57079637050629) * this.scale; + return Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center - vector2 * 40f, this.Center + vector2 * 40f, 16f * this.scale, ref collisionPoint); + } + if (this.type == 537) + { + float collisionPoint = 0.0f; + return Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center, this.Center + this.velocity * this.localAI[1], 22f * this.scale, ref collisionPoint); + } + if (this.type == 756) + { + float collisionPoint = 0.0f; + return Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), this.Center, this.Center + this.velocity.SafeNormalize(-Vector2.UnitY) * 200f * this.scale, 22f * this.scale, ref collisionPoint); + } + if (this.type == 687) + { + float collisionPoint = 0.0f; + float num3 = this.ai[0] / 25f; + if ((double) num3 > 1.0) + num3 = 1f; + float num4 = (float) (((double) this.ai[0] - 38.0) / 40.0); + if ((double) num4 < 0.0) + num4 = 0.0f; + Vector2 lineStart = this.Center + this.rotation.ToRotationVector2() * 400f * num4; + Vector2 lineEnd = this.Center + this.rotation.ToRotationVector2() * 400f * num3; + return Collision.CheckAABBvLineCollision(targetRect.TopLeft(), targetRect.Size(), lineStart, lineEnd, 40f * this.scale, ref collisionPoint); + } + if (this.type == 466 || this.type == 580 || this.type == 686) + { + for (int index = 0; index < this.oldPos.Length && ((double) this.oldPos[index].X != 0.0 || (double) this.oldPos[index].Y != 0.0); ++index) + { + myRect.X = (int) this.oldPos[index].X; + myRect.Y = (int) this.oldPos[index].Y; + if (myRect.Intersects(targetRect)) + return true; + } + return false; + } + if (this.type == 711) + { + if (this.penetrate != -1) + { + for (int index = 0; index < this.oldPos.Length && ((double) this.oldPos[index].X != 0.0 || (double) this.oldPos[index].Y != 0.0); ++index) + { + myRect.X = (int) this.oldPos[index].X; + myRect.Y = (int) this.oldPos[index].Y; + if (myRect.Intersects(targetRect)) + return true; + } + } + } + else if (this.type == 464 && (double) this.ai[1] != 1.0) + { + Vector2 spinningpoint = new Vector2(0.0f, -720f).RotatedBy((double) this.velocity.ToRotation()) * (float) ((double) this.ai[0] % 45.0 / 45.0); + for (int index = 0; index < 6; ++index) + { + float num = (float) ((double) index * 6.28318548202515 / 6.0); + if (Utils.CenteredRectangle(this.Center + spinningpoint.RotatedBy((double) num), new Vector2(30f, 30f)).Intersects(targetRect)) + return true; + } + } + return false; + } + + public void ProjLight() + { + if ((double) this.light <= 0.0) + return; + float r = this.light; + float g = this.light; + float b = this.light; + if (this.type == 446) + { + r *= 0.0f; + b *= 0.8f; + } + else if (this.type == 493 || this.type == 494) + g *= 0.3f; + else if (this.type == 876) + { + r *= 0.1f; + g *= 0.7f; + b *= 1f; + } + else if (this.type == 867) + { + float num = (float) Main.rand.Next(28, 42) * 0.005f + (float) (270 - (int) Main.mouseTextColor) / 500f; + r = 0.1f; + g = (float) (0.300000011920929 + (double) num / 2.0); + b = 0.6f + num; + } + else if (this.type == 332) + { + b *= 0.1f; + g *= 0.6f; + } + else if (this.type == 259) + b *= 0.1f; + else if (this.type == 329) + { + b *= 0.1f; + g *= 0.9f; + } + else if (this.type == 2 || this.type == 82) + { + g *= 0.75f; + b *= 0.55f; + } + else if (this.type == 172) + { + g *= 0.55f; + r *= 0.35f; + } + else if (this.type == 308) + { + g *= 0.7f; + r *= 0.1f; + } + else if (this.type == 304) + { + g *= 0.2f; + b *= 0.1f; + } + else if (this.type == 263) + { + g *= 0.7f; + r *= 0.1f; + } + else if (this.type == 274) + { + g *= 0.1f; + r *= 0.7f; + } + else if (this.type == 254) + r *= 0.1f; + else if (this.type == 94) + { + r *= 0.5f; + g *= 0.0f; + } + else if (this.type == 95 || this.type == 96 || this.type == 103 || this.type == 104) + { + r *= 0.35f; + g *= 1f; + b *= 0.0f; + } + else if (this.type == 4) + { + g *= 0.1f; + r *= 0.5f; + } + else if (this.type == 257) + { + g *= 0.9f; + r *= 0.1f; + } + else if (this.type == 9) + { + g *= 0.1f; + b *= 0.6f; + } + else if (this.type == 488) + { + r = 0.3f; + b = 0.25f; + g = 0.0f; + } + else if (this.type == 92) + { + g *= 0.6f; + r *= 0.8f; + } + else if (this.type == 93) + { + g *= 1f; + r *= 1f; + b *= 0.01f; + } + else if (this.type == 12) + { + r *= 0.9f; + g *= 0.8f; + b *= 0.1f; + } + else if (this.type == 14 || this.type == 110 || this.type == 180 || this.type == 242 || this.type == 302) + { + g *= 0.7f; + b *= 0.1f; + } + else if (this.type == 15) + { + g *= 0.4f; + b *= 0.1f; + r = 1f; + } + else if (this.type == 16) + { + r *= 0.1f; + g *= 0.4f; + b = 1f; + } + else if (this.type == 18) + { + g *= 0.1f; + r *= 0.6f; + } + else if (this.type == 19) + { + g *= 0.5f; + b *= 0.1f; + } + else if (this.type == 20) + { + r *= 0.1f; + b *= 0.3f; + } + else if (this.type == 22) + { + r = 0.0f; + g = 0.0f; + } + else if (this.type == 27) + { + r *= 0.0f; + g *= 0.3f; + b = 1f; + } + else if (this.type == 34) + { + g *= 0.1f; + b *= 0.1f; + } + else if (this.type == 36) + { + r = 0.8f; + g *= 0.2f; + b *= 0.6f; + } + else if (this.type == 41) + { + g *= 0.8f; + b *= 0.6f; + } + else if (this.type == 44 || this.type == 45) + { + b = 1f; + r *= 0.6f; + g *= 0.1f; + } + else if (this.type == 50) + { + r *= 0.7f; + b *= 0.8f; + } + else if (this.type == 515) + { + g *= 0.6f; + b *= 0.85f; + } + else if (this.type == 870) + { + r *= 0.7f; + g = 0.0f; + } + else if (this.type == 53) + { + r *= 0.7f; + g *= 0.8f; + } + else if (this.type == 473) + { + r *= 1.05f; + g *= 0.95f; + b *= 0.55f; + } + else if (this.type == 72) + { + r *= 0.45f; + g *= 0.75f; + b = 1f; + } + else if (this.type == 86) + { + r *= 1f; + g *= 0.45f; + b = 0.75f; + } + else if (this.type == 87) + { + r *= 0.45f; + g = 1f; + b *= 0.75f; + } + else if (this.type == 73) + { + r *= 0.4f; + g *= 0.6f; + b *= 1f; + } + else if (this.type == 74) + { + r *= 1f; + g *= 0.4f; + b *= 0.6f; + } + else if (this.type == 284) + { + r *= 1f; + g *= 0.1f; + b *= 0.8f; + } + else if (this.type == 285) + { + r *= 0.1f; + g *= 0.5f; + b *= 1f; + } + else if (this.type == 286) + { + r *= 1f; + g *= 0.5f; + b *= 0.1f; + } + else if (this.type == 287) + { + r *= 0.9f; + g *= 1f; + b *= 0.4f; + } + else if (this.type == 283) + { + r *= 0.8f; + g *= 0.1f; + } + else if (this.type == 76 || this.type == 77 || this.type == 78) + { + r *= 1f; + g *= 0.3f; + b *= 0.6f; + } + else if (this.type == 79) + { + r = (float) Main.DiscoR / (float) byte.MaxValue; + g = (float) Main.DiscoG / (float) byte.MaxValue; + b = (float) Main.DiscoB / (float) byte.MaxValue; + } + else if (this.type == 80) + { + r *= 0.0f; + g *= 0.8f; + b *= 1f; + } + else if (this.type == 83 || this.type == 88) + { + r *= 0.7f; + g *= 0.0f; + b *= 1f; + } + else if (this.type == 100) + { + r *= 1f; + g *= 0.5f; + b *= 0.0f; + } + else if (this.type == 84 || this.type == 389) + { + r *= 0.8f; + g *= 0.0f; + b *= 0.5f; + } + else if (this.type == 89 || this.type == 90) + { + g *= 0.2f; + b *= 1f; + r *= 0.05f; + } + else if (this.type == 106) + { + r *= 0.0f; + g *= 0.5f; + b *= 1f; + } + else if (this.type == 113) + { + r *= 0.25f; + g *= 0.75f; + b *= 1f; + } + else if (this.type == 114 || this.type == 115) + { + r *= 0.5f; + g *= 0.05f; + b *= 1f; + } + else if (this.type == 116) + b *= 0.25f; + else if (this.type == 131) + { + r *= 0.1f; + g *= 0.4f; + } + else if (this.type == 132 || this.type == 157) + { + r *= 0.2f; + b *= 0.6f; + } + else if (this.type == 156) + { + r *= 1f; + b *= 0.6f; + g = 0.0f; + } + else if (this.type == 173) + { + r *= 0.3f; + b *= 1f; + g = 0.4f; + } + else if (this.type == 207) + { + r *= 0.4f; + b *= 0.4f; + } + else if (this.type == 253) + { + r = 0.0f; + g *= 0.4f; + } + else if (this.type == 211) + { + r *= 0.5f; + g *= 0.9f; + b *= 1f; + this.light = (double) this.localAI[0] != 0.0 ? 1f : 1.5f; + } + else if (this.type == 209) + { + float num1 = (float) (((double) byte.MaxValue - (double) this.alpha) / (double) byte.MaxValue); + float num2 = r * 0.3f; + float num3 = g * 0.4f; + b = b * 1.75f * num1; + r = num2 * num1; + g = num3 * num1; + } + else if (this.type == 226 || this.type == 227 | this.type == 229) + { + r *= 0.25f; + g *= 1f; + b *= 0.5f; + } + else if (this.type == 251) + { + float num4 = (float) Main.DiscoR / (float) byte.MaxValue; + float num5 = (float) Main.DiscoG / (float) byte.MaxValue; + float num6 = (float) Main.DiscoB / (float) byte.MaxValue; + float num7 = (float) (((double) num4 + 1.0) / 2.0); + float num8 = (float) (((double) num5 + 1.0) / 2.0); + float num9 = (float) (((double) num6 + 1.0) / 2.0); + r = num7 * this.light; + g = num8 * this.light; + b = num9 * this.light; + } + else if (this.type == 278 || this.type == 279) + { + r *= 1f; + g *= 1f; + b *= 0.0f; + } + Lighting.AddLight((int) (((double) this.position.X + (double) (this.width / 2)) / 16.0), (int) (((double) this.position.Y + (double) (this.height / 2)) / 16.0), r, g, b); + } + + public Microsoft.Xna.Framework.Rectangle getRect() => new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height); + + public void Update(int i) + { + if (!this.active) + return; + if (Main.netMode == 1 && (ProjectileID.Sets.IsAGolfBall[this.type] || this.type == 820)) + { + int index1 = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int index2 = (int) ((double) this.position.Y + (double) (this.height / 2)) / 16; + if (Main.tile[index1, index2] == null) + return; + } + this.numUpdates = this.extraUpdates; + while (this.numUpdates >= 0) + { + --this.numUpdates; + if (this.type == 640 && (double) this.ai[1] > 0.0) + { + --this.ai[1]; + } + else + { + if ((double) this.position.X <= (double) Main.leftWorld || (double) this.position.X + (double) this.width >= (double) Main.rightWorld || (double) this.position.Y <= (double) Main.topWorld || (double) this.position.Y + (double) this.height >= (double) Main.bottomWorld) + { + this.active = false; + return; + } + if (!this.noEnchantmentVisuals) + this.UpdateEnchantmentVisuals(); + if (this.numUpdates == -1 && (this.minion || this.sentry)) + this.damage = (int) ((double) this.originalDamage * (double) Main.player[this.owner].minionDamage); + if (this.minion && this.numUpdates == -1 && this.type != 625 && this.type != 628) + { + this.minionPos = Main.player[this.owner].numMinions; + if ((double) Main.player[this.owner].slotsMinions + (double) this.minionSlots > (double) Main.player[this.owner].maxMinions && this.owner == Main.myPlayer) + { + if ((this.type == 627 || this.type == 626) && this.owner == Main.myPlayer) + { + int byUuid = Projectile.GetByUUID(this.owner, this.ai[0]); + if (byUuid != -1) + { + Projectile projectile1 = Main.projectile[byUuid]; + if (projectile1.type != 625) + projectile1.localAI[1] = this.localAI[1]; + Projectile projectile2 = Main.projectile[(int) this.localAI[1]]; + projectile2.ai[0] = this.ai[0]; + projectile2.ai[1] = 1f; + projectile2.netUpdate = true; + } + } + this.Kill(); + } + else + { + ++Main.player[this.owner].numMinions; + Main.player[this.owner].slotsMinions += this.minionSlots; + } + } + float num1 = (float) (1.0 + (double) Math.Abs(this.velocity.X) / 3.0); + if ((double) this.gfxOffY > 0.0) + { + this.gfxOffY -= num1 * this.stepSpeed; + if ((double) this.gfxOffY < 0.0) + this.gfxOffY = 0.0f; + } + else if ((double) this.gfxOffY < 0.0) + { + this.gfxOffY += num1 * this.stepSpeed; + if ((double) this.gfxOffY > 0.0) + this.gfxOffY = 0.0f; + } + if ((double) this.gfxOffY > 16.0) + this.gfxOffY = 16f; + if ((double) this.gfxOffY < -16.0) + this.gfxOffY = -16f; + Vector2 velocity = this.velocity; + this.oldVelocity = this.velocity; + this.whoAmI = i; + if (this.soundDelay > 0) + --this.soundDelay; + this.netUpdate = false; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (this.playerImmune[index] > 0) + --this.playerImmune[index]; + } + if (this.usesLocalNPCImmunity) + { + for (int index = 0; index < 200; ++index) + { + if (this.localNPCImmunity[index] > 0) + --this.localNPCImmunity[index]; + } + } + this.AI(); + if (this.ShouldUseWindPhysics() && (double) this.Center.Y < Main.worldSurface * 16.0 && Main.tile[(int) this.Center.X / 16, (int) this.Center.Y / 16] != null && Main.tile[(int) this.Center.X / 16, (int) this.Center.Y / 16].wall == (ushort) 0 && ((double) this.velocity.X > 0.0 && (double) Main.windSpeedCurrent < 0.0 || (double) this.velocity.X < 0.0 && (double) Main.windSpeedCurrent > 0.0 || (double) Math.Abs(this.velocity.X) < (double) Math.Abs(Main.windSpeedCurrent * Main.windPhysicsStrength) * 180.0) && (double) Math.Abs(this.velocity.X) < 16.0) + { + this.velocity.X += Main.windSpeedCurrent * Main.windPhysicsStrength; + double num2 = (double) MathHelper.Clamp(this.velocity.X, -16f, 16f); + } + if (this.owner < (int) byte.MaxValue && !Main.player[this.owner].active) + this.Kill(); + if (this.type == 242 || this.type == 302 || this.type == 638) + this.wet = false; + if (!this.ignoreWater) + { + bool flag1; + bool flag2; + try + { + flag1 = Collision.LavaCollision(this.position, this.width, this.height); + flag2 = Collision.WetCollision(this.position, this.width, this.height); + if (flag1) + this.lavaWet = true; + if (Collision.honey) + this.honeyWet = true; + } + catch + { + this.active = false; + return; + } + if (this.wet && !this.lavaWet) + { + if (this.type == 85 || this.type == 15 || this.type == 34 || this.type == 188) + this.Kill(); + if (this.type == 2) + { + this.type = 1; + this.light = 0.0f; + } + } + if (this.type == 80) + { + flag2 = false; + this.wet = false; + if (flag1 && (double) this.ai[0] >= 0.0) + this.Kill(); + } + if (flag2) + { + if (this.type != 155 && this.wetCount == (byte) 0 && !this.wet) + { + if (!flag1) + { + if (this.honeyWet) + { + for (int index3 = 0; index3 < 10; ++index3) + { + int index4 = Dust.NewDust(new Vector2(this.position.X - 6f, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width + 12, 24, 152); + --Main.dust[index4].velocity.Y; + Main.dust[index4].velocity.X *= 2.5f; + Main.dust[index4].scale = 1.3f; + Main.dust[index4].alpha = 100; + Main.dust[index4].noGravity = true; + } + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + else + { + for (int index5 = 0; index5 < 10; ++index5) + { + int index6 = Dust.NewDust(new Vector2(this.position.X - 6f, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width + 12, 24, Dust.dustWater()); + Main.dust[index6].velocity.Y -= 4f; + Main.dust[index6].velocity.X *= 2.5f; + Main.dust[index6].scale = 1.3f; + Main.dust[index6].alpha = 100; + Main.dust[index6].noGravity = true; + } + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + } + else + { + for (int index7 = 0; index7 < 10; ++index7) + { + int index8 = Dust.NewDust(new Vector2(this.position.X - 6f, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width + 12, 24, 35); + Main.dust[index8].velocity.Y -= 1.5f; + Main.dust[index8].velocity.X *= 2.5f; + Main.dust[index8].scale = 1.3f; + Main.dust[index8].alpha = 100; + Main.dust[index8].noGravity = true; + } + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + } + this.wet = true; + } + else if (this.wet) + { + this.wet = false; + if (this.type == 155) + this.velocity.Y *= 0.5f; + else if (this.wetCount == (byte) 0) + { + this.wetCount = (byte) 10; + if (!this.lavaWet) + { + if (this.honeyWet) + { + for (int index9 = 0; index9 < 10; ++index9) + { + int index10 = Dust.NewDust(new Vector2(this.position.X - 6f, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width + 12, 24, 152); + --Main.dust[index10].velocity.Y; + Main.dust[index10].velocity.X *= 2.5f; + Main.dust[index10].scale = 1.3f; + Main.dust[index10].alpha = 100; + Main.dust[index10].noGravity = true; + } + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + else + { + for (int index11 = 0; index11 < 10; ++index11) + { + int index12 = Dust.NewDust(new Vector2(this.position.X - 6f, this.position.Y + (float) (this.height / 2)), this.width + 12, 24, Dust.dustWater()); + Main.dust[index12].velocity.Y -= 4f; + Main.dust[index12].velocity.X *= 2.5f; + Main.dust[index12].scale = 1.3f; + Main.dust[index12].alpha = 100; + Main.dust[index12].noGravity = true; + } + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + } + else + { + for (int index13 = 0; index13 < 10; ++index13) + { + int index14 = Dust.NewDust(new Vector2(this.position.X - 6f, (float) ((double) this.position.Y + (double) (this.height / 2) - 8.0)), this.width + 12, 24, 35); + Main.dust[index14].velocity.Y -= 1.5f; + Main.dust[index14].velocity.X *= 2.5f; + Main.dust[index14].scale = 1.3f; + Main.dust[index14].alpha = 100; + Main.dust[index14].noGravity = true; + } + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y); + } + } + } + if (!this.wet) + { + this.lavaWet = false; + this.honeyWet = false; + } + if (this.wetCount > (byte) 0) + --this.wetCount; + } + this.oldPosition = this.position; + this.oldDirection = this.direction; + this.HandleMovement(velocity, out int _, out int _); + if (this.AutomaticallyChangesDirection()) + { + if ((double) this.velocity.X < 0.0) + this.direction = -1; + else + this.direction = 1; + } + if (!this.active) + return; + this.ProjLight(); + if (!this.npcProj && this.friendly && Main.player[this.owner].magicQuiver && this.extraUpdates < 1 && this.arrow) + this.extraUpdates = 1; + if (this.type == 2 || this.type == 82) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100); + else if (this.type == 172) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 135, Alpha: 100); + else if (this.type == 103) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 75, Alpha: 100); + if (Main.rand.Next(2) == 0) + { + Main.dust[index].noGravity = true; + Main.dust[index].scale *= 2f; + } + } + else if (this.type == 278) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 169, Alpha: 100); + if (Main.rand.Next(2) == 0) + { + Main.dust[index].noGravity = true; + Main.dust[index].scale *= 1.5f; + } + } + else if (this.type == 4) + { + if (Main.rand.Next(5) == 0) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 14, Alpha: 150, Scale: 1.1f); + } + else if (this.type == 5) + { + int Type; + switch (Main.rand.Next(3)) + { + case 0: + Type = 15; + break; + case 1: + Type = 57; + break; + default: + Type = 58; + break; + } + Dust.NewDust(this.position, this.width, this.height, Type, this.velocity.X * 0.5f, this.velocity.Y * 0.5f, 150, Scale: 1.2f); + } + this.Damage(); + if (this.type == 434 && (double) this.localAI[0] == 0.0 && this.numUpdates == 0) + { + this.extraUpdates = 1; + this.velocity = Vector2.Zero; + this.localAI[0] = 1f; + this.localAI[1] = 0.9999f; + this.netUpdate = true; + } + if (Main.netMode != 1 && (this.type == 99 || this.type == 655 || this.type == 727)) + Collision.SwitchTiles(this.position, this.width, this.height, this.oldPosition, 3); + if (ProjectileID.Sets.TrailingMode[this.type] == 0) + { + for (int index = this.oldPos.Length - 1; index > 0; --index) + this.oldPos[index] = this.oldPos[index - 1]; + this.oldPos[0] = this.position; + } + else if (ProjectileID.Sets.TrailingMode[this.type] == 1) + { + if (this.frameCounter == 0 || this.oldPos[0] == Vector2.Zero) + { + for (int index = this.oldPos.Length - 1; index > 0; --index) + this.oldPos[index] = this.oldPos[index - 1]; + this.oldPos[0] = this.position; + if (this.velocity == Vector2.Zero && this.type == 466) + { + float num3 = (float) ((double) this.rotation + 1.57079637050629 + (Main.rand.Next(2) == 1 ? -1.0 : 1.0) * 1.57079637050629); + float num4 = (float) (Main.rand.NextDouble() * 2.0 + 2.0); + Vector2 vector2 = new Vector2((float) Math.Cos((double) num3) * num4, (float) Math.Sin((double) num3) * num4); + int index = Dust.NewDust(this.oldPos[this.oldPos.Length - 1], 0, 0, 229, vector2.X, vector2.Y); + Main.dust[index].noGravity = true; + Main.dust[index].scale = 1.7f; + } + if (this.velocity == Vector2.Zero && this.type == 580) + { + float num5 = (float) ((double) this.rotation + 1.57079637050629 + (Main.rand.Next(2) == 1 ? -1.0 : 1.0) * 1.57079637050629); + float num6 = (float) (Main.rand.NextDouble() * 2.0 + 2.0); + Vector2 vector2 = new Vector2((float) Math.Cos((double) num5) * num6, (float) Math.Sin((double) num5) * num6); + int index = Dust.NewDust(this.oldPos[this.oldPos.Length - 1], 0, 0, 229, vector2.X, vector2.Y); + Main.dust[index].noGravity = true; + Main.dust[index].scale = 1.7f; + } + } + } + else if (ProjectileID.Sets.TrailingMode[this.type] == 2) + { + for (int index = this.oldPos.Length - 1; index > 0; --index) + { + this.oldPos[index] = this.oldPos[index - 1]; + this.oldRot[index] = this.oldRot[index - 1]; + this.oldSpriteDirection[index] = this.oldSpriteDirection[index - 1]; + } + this.oldPos[0] = this.position; + this.oldRot[0] = this.rotation; + this.oldSpriteDirection[0] = this.spriteDirection; + } + else if (ProjectileID.Sets.TrailingMode[this.type] == 3) + { + for (int index = this.oldPos.Length - 1; index > 0; --index) + { + this.oldPos[index] = this.oldPos[index - 1]; + this.oldRot[index] = this.oldRot[index - 1]; + this.oldSpriteDirection[index] = this.oldSpriteDirection[index - 1]; + } + this.oldPos[0] = this.position; + this.oldRot[0] = this.rotation; + this.oldSpriteDirection[0] = this.spriteDirection; + float amount = 0.65f; + int num7 = 1; + for (int index15 = 0; index15 < num7; ++index15) + { + for (int index16 = this.oldPos.Length - 1; index16 > 0; --index16) + { + if (!(this.oldPos[index16] == Vector2.Zero)) + { + if ((double) this.oldPos[index16].Distance(this.oldPos[index16 - 1]) > 2.0) + this.oldPos[index16] = Vector2.Lerp(this.oldPos[index16], this.oldPos[index16 - 1], amount); + this.oldRot[index16] = (this.oldPos[index16 - 1] - this.oldPos[index16]).SafeNormalize(Vector2.Zero).ToRotation(); + } + } + } + } + else if (ProjectileID.Sets.TrailingMode[this.type] == 4) + { + Vector2 vector2 = Main.player[this.owner].position - Main.player[this.owner].oldPosition; + for (int index = this.oldPos.Length - 1; index > 0; --index) + { + this.oldPos[index] = this.oldPos[index - 1]; + this.oldRot[index] = this.oldRot[index - 1]; + this.oldSpriteDirection[index] = this.oldSpriteDirection[index - 1]; + if (this.numUpdates == 0 && this.oldPos[index] != Vector2.Zero) + this.oldPos[index] += vector2; + } + this.oldPos[0] = this.position; + this.oldRot[0] = this.rotation; + this.oldSpriteDirection[0] = this.spriteDirection; + } + if (ProjectileID.Sets.IsADD2Turret[this.type] && DD2Event.Ongoing) + ++this.timeLeft; + --this.timeLeft; + if (this.timeLeft <= 0) + this.Kill(); + if (this.penetrate == 0) + this.Kill(); + if (this.active && this.owner == Main.myPlayer) + { + if (this.netUpdate2) + this.netUpdate = true; + if (!this.active) + this.netSpam = 0; + if (this.netUpdate) + { + if (this.netSpam < 60) + { + this.netSpam += 5; + NetMessage.SendData(27, number: i); + this.netUpdate2 = false; + } + else + this.netUpdate2 = true; + } + if (this.netSpam > 0) + --this.netSpam; + } + } + } + this.netUpdate = false; + } + + private bool AutomaticallyChangesDirection() => (this.aiStyle != 3 || (double) this.ai[0] != 1.0) && (this.aiStyle != 7 || (double) this.ai[0] != 1.0) && (this.aiStyle != 13 || (double) this.ai[0] != 1.0) && this.aiStyle != 65 && this.aiStyle != 69 && this.aiStyle != 114 && this.aiStyle != 123 && this.aiStyle != 112 && !this.manualDirectionChange && this.aiStyle != 67 && this.aiStyle != 26 && this.aiStyle != 15 && this.aiStyle != 150; + + private void UpdateEnchantmentVisuals() + { + if (this.npcProj) + return; + if (Main.player[this.owner].frostBurn && (this.melee || this.ranged) && this.friendly && !this.hostile && !this.noEnchantments && Main.rand.Next(2 * (1 + this.extraUpdates)) == 0) + { + int index = Dust.NewDust(this.position, this.width, this.height, 135, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 100, Scale: 2f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.7f; + Main.dust[index].velocity.Y -= 0.5f; + } + if (this.melee && Main.player[this.owner].magmaStone && !this.noEnchantments && Main.rand.Next(3) != 0) + { + int index = Dust.NewDust(new Vector2(this.position.X - 4f, this.position.Y - 4f), this.width + 8, this.height + 8, 6, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 100, Scale: 2f); + if (Main.rand.Next(2) == 0) + Main.dust[index].scale = 1.5f; + Main.dust[index].noGravity = true; + Main.dust[index].velocity.X *= 2f; + Main.dust[index].velocity.Y *= 2f; + } + if (!this.melee || Main.player[this.owner].meleeEnchant <= (byte) 0 || this.noEnchantments) + return; + if (Main.player[this.owner].meleeEnchant == (byte) 1 && Main.rand.Next(3) == 0) + { + int index = Dust.NewDust(this.position, this.width, this.height, 171, Alpha: 100); + Main.dust[index].noGravity = true; + Main.dust[index].fadeIn = 1.5f; + Main.dust[index].velocity *= 0.25f; + } + if (Main.player[this.owner].meleeEnchant == (byte) 1) + { + if (Main.rand.Next(3) != 0) + return; + int index = Dust.NewDust(this.position, this.width, this.height, 171, Alpha: 100); + Main.dust[index].noGravity = true; + Main.dust[index].fadeIn = 1.5f; + Main.dust[index].velocity *= 0.25f; + } + else if (Main.player[this.owner].meleeEnchant == (byte) 2) + { + if (Main.rand.Next(2) != 0) + return; + int index = Dust.NewDust(this.position, this.width, this.height, 75, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 100, Scale: 2.5f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.7f; + Main.dust[index].velocity.Y -= 0.5f; + } + else if (Main.player[this.owner].meleeEnchant == (byte) 3) + { + if (Main.rand.Next(2) != 0) + return; + int index = Dust.NewDust(this.position, this.width, this.height, 6, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 100, Scale: 2.5f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.7f; + Main.dust[index].velocity.Y -= 0.5f; + } + else if (Main.player[this.owner].meleeEnchant == (byte) 4) + { + if (Main.rand.Next(2) != 0) + return; + int index = Dust.NewDust(this.position, this.width, this.height, 57, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 100, Scale: 1.1f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity.X /= 2f; + Main.dust[index].velocity.Y /= 2f; + } + else if (Main.player[this.owner].meleeEnchant == (byte) 5) + { + if (Main.rand.Next(2) != 0) + return; + int index = Dust.NewDust(this.position, this.width, this.height, 169, Alpha: 100); + Main.dust[index].velocity.X += (float) this.direction; + Main.dust[index].velocity.Y += 0.2f; + Main.dust[index].noGravity = true; + } + else if (Main.player[this.owner].meleeEnchant == (byte) 6) + { + if (Main.rand.Next(2) != 0) + return; + int index = Dust.NewDust(this.position, this.width, this.height, 135, Alpha: 100); + Main.dust[index].velocity.X += (float) this.direction; + Main.dust[index].velocity.Y += 0.2f; + Main.dust[index].noGravity = true; + } + else if (Main.player[this.owner].meleeEnchant == (byte) 7) + { + Vector2 velocity = this.velocity; + if ((double) velocity.Length() > 4.0) + velocity *= 4f / velocity.Length(); + if (Main.rand.Next(20) == 0) + { + int index = Dust.NewDust(this.position, this.width, this.height, Main.rand.Next(139, 143), velocity.X, velocity.Y, Scale: 1.2f); + Main.dust[index].velocity.X *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.dust[index].velocity.Y *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.dust[index].velocity.X += (float) Main.rand.Next(-50, 51) * 0.05f; + Main.dust[index].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.05f; + Main.dust[index].scale *= (float) (1.0 + (double) Main.rand.Next(-30, 31) * 0.00999999977648258); + } + if (Main.rand.Next(40) != 0) + return; + int Type = Main.rand.Next(276, 283); + int index1 = Gore.NewGore(this.position, velocity, Type); + Main.gore[index1].velocity.X *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.gore[index1].velocity.Y *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.gore[index1].scale *= (float) (1.0 + (double) Main.rand.Next(-20, 21) * 0.00999999977648258); + Main.gore[index1].velocity.X += (float) Main.rand.Next(-50, 51) * 0.05f; + Main.gore[index1].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.05f; + } + else + { + if (Main.player[this.owner].meleeEnchant != (byte) 8 || Main.rand.Next(4) != 0) + return; + int index = Dust.NewDust(this.position, this.width, this.height, 46, Alpha: 100); + Main.dust[index].noGravity = true; + Main.dust[index].fadeIn = 1.5f; + Main.dust[index].velocity *= 0.25f; + } + } + + private void HandleMovement(Vector2 wetVelocity, out int overrideWidth, out int overrideHeight) + { + bool flag1 = false; + overrideWidth = -1; + overrideHeight = -1; + bool flag2 = false; + bool? nullable1 = ProjectileID.Sets.ForcePlateDetection[this.type]; + bool flag3 = nullable1.HasValue && !nullable1.Value; + bool flag4 = nullable1.HasValue && nullable1.Value; + if (this.tileCollide) + { + Vector2 velocity1 = this.velocity; + bool flag5 = true; + Vector2? nullable2 = new Vector2?(); + if (Main.projPet[this.type]) + { + flag5 = false; + if ((double) Main.player[this.owner].position.Y + (double) Main.player[this.owner].height - 12.0 > (double) this.position.Y + (double) this.height) + flag5 = true; + } + if (this.type == 500) + { + flag5 = false; + if ((double) Main.player[this.owner].Bottom.Y > (double) this.Bottom.Y + 4.0) + flag5 = true; + } + if (this.type == 653) + { + flag5 = false; + if ((double) Main.player[this.owner].Bottom.Y > (double) this.Bottom.Y + 4.0) + flag5 = true; + } + if (this.aiStyle == 62) + flag5 = true; + if (this.aiStyle == 66) + flag5 = true; + if (this.type == 317) + flag5 = true; + if (this.type == 373) + flag5 = true; + if (this.aiStyle == 53) + flag5 = false; + if (this.type == 9 || this.type == 12 || this.type == 15 || this.type == 13 || this.type == 31 || this.type == 39 || this.type == 40) + flag5 = false; + if (this.type == 24) + flag5 = false; + switch (this.type) + { + case 663: + case 665: + case 667: + case 677: + case 678: + case 679: + case 688: + case 689: + case 690: + case 691: + case 692: + case 693: + flag5 = false; + break; + case 759: + flag5 = true; + break; + } + if (this.decidesManualFallThrough) + flag5 = this.shouldFallThrough; + if (this.type == 771 || this.type == 822 || this.type == 823 || this.type == 843 || this.type == 846 || this.type == 845 || this.type == 852) + { + overrideWidth = this.width; + overrideHeight = 34; + nullable2 = new Vector2?(new Vector2(0.75f, 0.75f)); + } + if (this.type == 824 || this.type == 839 || this.type == 840 || this.type == 850 || this.type == 853) + { + overrideWidth = this.width; + overrideHeight = 58; + nullable2 = new Vector2?(new Vector2(0.75f, 0.75f)); + } + if (this.type == 826 || this.type == 830 || this.type == 838) + { + overrideWidth = this.width; + overrideHeight = 38; + nullable2 = new Vector2?(new Vector2(0.75f, 0.75f)); + } + if (this.type == 828 || this.type == 829 || this.type == 827 || this.type == 844) + { + overrideWidth = this.width; + overrideHeight = 22; + nullable2 = new Vector2?(new Vector2(0.75f, 0.75f)); + } + if (this.aiStyle == 29 || this.type == 28 || this.aiStyle == 49 || this.type == 906 || this.type == 903 || this.type == 904 || this.type == 910) + { + overrideWidth = this.width - 8; + overrideHeight = this.height - 8; + } + else if (this.type == 250 || this.type == 267 || this.type == 297 || this.type == 323 || this.type == 3 || this.type == 711) + { + overrideWidth = 6; + overrideHeight = 6; + } + else if (this.type == 308) + { + overrideWidth = 26; + overrideHeight = this.height; + } + else if (this.type == 663 || this.type == 665 || this.type == 667 || this.type == 677 || this.type == 678 || this.type == 679 || this.type == 691 || this.type == 692 || this.type == 693) + { + overrideWidth = 16; + overrideHeight = this.height; + } + else if (this.type == 688 || this.type == 689 || this.type == 690) + { + overrideWidth = 16; + overrideHeight = this.height; + nullable2 = new Vector2?(new Vector2(0.5f, 1f)); + } + else if (this.type == 669 || this.type == 706) + { + overrideWidth = 10; + overrideHeight = 10; + } + else if (this.type == 261 || this.type == 277) + { + overrideWidth = 26; + overrideHeight = 26; + } + else if (this.type == 481 || this.type == 491 || this.type == 106 || this.type == 262 || this.type == 271 || this.type == 270 || this.type == 272 || this.type == 273 || this.type == 274 || this.type == 280 || this.type == 288 || this.type == 301 || this.type == 320 || this.type == 333 || this.type == 335 || this.type == 343 || this.type == 344 || this.type == 497 || this.type == 496 || this.type == 6 || this.type == 19 || this.type == 113 || this.type == 52 || this.type == 520 || this.type == 523 || this.type == 585 || this.type == 598 || this.type == 599 || this.type == 636 || this.type == 837 || this.type == 861 || this.type == 867) + { + overrideWidth = 10; + overrideHeight = 10; + } + else if (this.type == 514) + { + overrideWidth = 4; + overrideHeight = 4; + } + else if (this.type == 248 || this.type == 247 || this.type == 507 || this.type == 508 || this.type == 662 || this.type == 680 || this.type == 685 || this.type == 757 || this.type == 928) + { + overrideWidth = this.width - 12; + overrideHeight = this.height - 12; + } + else if (this.aiStyle == 18 || this.type == 254) + { + overrideWidth = this.width - 36; + overrideHeight = this.height - 36; + } + else if (this.type == 182 || this.type == 190 || this.type == 33 || this.type == 229 || this.type == 237 || this.type == 243 || this.type == 866) + { + overrideWidth = this.width - 20; + overrideHeight = this.height - 20; + } + else if (this.aiStyle == 27) + { + overrideWidth = this.width - 12; + overrideHeight = this.height - 12; + } + else if (this.type == 533 && (double) this.ai[0] >= 6.0) + { + overrideWidth = this.width + 6; + overrideHeight = this.height + 6; + } + else if (this.type == 755 && (double) this.ai[0] >= 0.0) + { + overrideWidth = this.width + 6; + overrideHeight = this.height + 6; + } + else if (this.type == 759) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = -velocity1.X; + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = -velocity1.Y; + } + else if (this.type == 582 || this.type == 634 || this.type == 635 || this.type == 902) + { + overrideWidth = 8; + overrideHeight = 8; + } + else if (this.type == 617) + { + overrideWidth = (int) (20.0 * (double) this.scale); + overrideHeight = (int) (20.0 * (double) this.scale); + } + else if (this.type == 304) + { + overrideWidth = 4; + overrideHeight = 4; + } + else if (this.aiStyle == 9) + { + overrideWidth = 4; + overrideHeight = 4; + } + else if (this.type == 931) + { + overrideWidth = 4; + overrideHeight = 4; + } + if ((this.type != 440 && this.type != 449 && this.type != 606 || (double) this.ai[1] != 1.0) && (this.type != 466 || (double) this.localAI[1] != 1.0) && (this.type != 580 || (double) this.localAI[1] <= 0.0) && (this.type != 640 || (double) this.localAI[1] <= 0.0)) + { + if (this.aiStyle == 10) + { + if (this.type >= 736 && this.type <= 738) + this.velocity = Collision.TileCollision(this.position, this.velocity, this.width, this.height, flag5, flag5); + else if (this.type == 42 || this.type == 65 || this.type == 68 || this.type == 354 || this.type == 31 && (double) this.ai[0] == 2.0) + this.velocity = Collision.TileCollision(this.position, this.velocity, this.width, this.height, flag5, flag5); + else + this.velocity = Collision.TileCollision(this.position, this.velocity, this.width, this.height, flag5, flag5); + } + else + { + Vector2 Position = this.position; + int num1 = overrideWidth != -1 ? overrideWidth : this.width; + int num2 = overrideHeight != -1 ? overrideHeight : this.height; + if (overrideHeight != -1 || overrideWidth != -1) + Position = !nullable2.HasValue ? new Vector2(this.position.X + (float) (this.width / 2) - (float) (num1 / 2), this.position.Y + (float) (this.height / 2) - (float) (num2 / 2)) : this.Center - new Vector2((float) num1, (float) num2) * nullable2.Value; + if (this.wet) + { + if (this.honeyWet) + { + Vector2 velocity2 = this.velocity; + this.velocity = Collision.TileCollision(Position, this.velocity, num1, num2, flag5, flag5); + wetVelocity = this.velocity * 0.25f; + if ((double) this.velocity.X != (double) velocity2.X) + wetVelocity.X = this.velocity.X; + if ((double) this.velocity.Y != (double) velocity2.Y) + wetVelocity.Y = this.velocity.Y; + } + else + { + Vector2 velocity3 = this.velocity; + this.velocity = Collision.TileCollision(Position, this.velocity, num1, num2, flag5, flag5); + wetVelocity = this.velocity * 0.5f; + if ((double) this.velocity.X != (double) velocity3.X) + wetVelocity.X = this.velocity.X; + if ((double) this.velocity.Y != (double) velocity3.Y) + wetVelocity.Y = this.velocity.Y; + } + if (!Main.projPet[this.type]) + { + Vector4 vector4 = Collision.SlopeCollision(Position, this.velocity, num1, num2, fall: true); + Vector2 vector2 = this.position - Position; + if (this.aiStyle == 137) + { + if ((double) Position.Y != (double) vector4.Y) + flag1 = true; + if ((double) this.velocity.Y != (double) vector4.W) + flag1 = true; + Position.Y = vector4.Y; + this.position.Y = Position.Y + vector2.Y; + this.velocity.Y = vector4.W; + } + else + { + if ((double) Position.X != (double) vector4.X) + flag1 = true; + if ((double) Position.Y != (double) vector4.Y) + flag1 = true; + if ((double) this.velocity.X != (double) vector4.Z) + flag1 = true; + if ((double) this.velocity.Y != (double) vector4.W) + flag1 = true; + Position.X = vector4.X; + Position.Y = vector4.Y; + this.position = Position + vector2; + this.velocity.X = vector4.Z; + this.velocity.Y = vector4.W; + } + } + } + else + { + int num3 = Math.Min(num1, num2); + if (num3 < 3) + num3 = 3; + if (num3 > 16) + num3 = 16; + if ((double) this.velocity.Length() > (double) num3) + { + Vector2 vector2_1 = Collision.TileCollision(Position, this.velocity, num1, num2, flag5, flag5); + float num4 = this.velocity.Length(); + float num5 = (float) num3; + Vector2 vector2_2 = Vector2.Normalize(this.velocity); + if ((double) vector2_1.Y == 0.0) + vector2_2.Y = 0.0f; + Vector2 zero1 = Vector2.Zero; + Vector2 zero2 = Vector2.Zero; + Vector2 zero3 = Vector2.Zero; + int num6 = 0; + while ((double) num4 > 0.0) + { + ++num6; + if (num6 <= 300) + { + Vector2 oldPosition = Position; + float num7 = num4; + if ((double) num7 > (double) num5) + num7 = num5; + num4 -= num7; + Vector2 Velocity = vector2_2 * num7; + Vector2 vector2_3 = Collision.TileCollision(Position, Velocity, num1, num2, flag5, flag5); + Position += vector2_3; + this.velocity = vector2_3; + if (!Main.projPet[this.type]) + { + Vector4 vector4 = Collision.SlopeCollision(Position, this.velocity, num1, num2, fall: true); + Vector2 vector2_4 = this.position - Position; + if (this.aiStyle == 137) + { + if ((double) Position.Y != (double) vector4.Y) + flag1 = true; + if ((double) this.velocity.Y != (double) vector4.W) + flag1 = true; + Position.Y = vector4.Y; + this.position.Y = Position.Y + vector2_4.Y; + this.velocity.Y = vector4.W; + } + else + { + if ((double) Position.X != (double) vector4.X) + flag1 = true; + if ((double) Position.Y != (double) vector4.Y) + flag1 = true; + if ((double) this.velocity.X != (double) vector4.Z) + flag1 = true; + if ((double) this.velocity.Y != (double) vector4.W) + flag1 = true; + Position.X = vector4.X; + Position.Y = vector4.Y; + this.position = Position + vector2_4; + this.velocity.X = vector4.Z; + this.velocity.Y = vector4.W; + } + } + flag2 = true; + if (this.owner == Main.myPlayer && Position != oldPosition && !flag3) + Collision.SwitchTiles(Position, num1, num2, oldPosition, 4); + Vector2 velocity4 = this.velocity; + zero1 += velocity4; + } + else + break; + } + this.velocity = zero1; + if ((double) Math.Abs(this.velocity.X - velocity1.X) < 9.99999974737875E-05) + this.velocity.X = velocity1.X; + if ((double) Math.Abs(this.velocity.Y - velocity1.Y) < 9.99999974737875E-05) + this.velocity.Y = velocity1.Y; + if (!Main.projPet[this.type]) + { + Vector4 vector4 = Collision.SlopeCollision(Position, this.velocity, num1, num2, fall: true); + Vector2 vector2_5 = this.position - Position; + if (this.aiStyle == 137) + { + if ((double) Position.Y != (double) vector4.Y) + flag1 = true; + if ((double) this.velocity.Y != (double) vector4.W) + flag1 = true; + Position.Y = vector4.Y; + this.position.Y = Position.Y + vector2_5.Y; + this.velocity.Y = vector4.W; + } + else + { + if ((double) Position.X != (double) vector4.X) + flag1 = true; + if ((double) Position.Y != (double) vector4.Y) + flag1 = true; + if ((double) this.velocity.X != (double) vector4.Z) + flag1 = true; + if ((double) this.velocity.Y != (double) vector4.W) + flag1 = true; + Position.X = vector4.X; + Position.Y = vector4.Y; + this.position = Position + vector2_5; + this.velocity.X = vector4.Z; + this.velocity.Y = vector4.W; + } + } + } + else + { + this.velocity = Collision.TileCollision(Position, this.velocity, num1, num2, flag5, flag5); + if (!Main.projPet[this.type]) + { + Vector4 vector4 = Collision.SlopeCollision(Position, this.velocity, num1, num2, fall: true); + Vector2 vector2 = this.position - Position; + if (this.aiStyle == 137) + { + if ((double) Position.Y != (double) vector4.Y) + flag1 = true; + if ((double) this.velocity.Y != (double) vector4.W) + flag1 = true; + Position.Y = vector4.Y; + this.position.Y = Position.Y + vector2.Y; + this.velocity.Y = vector4.W; + } + else + { + if ((double) Position.X != (double) vector4.X) + flag1 = true; + if ((double) Position.Y != (double) vector4.Y) + flag1 = true; + if ((double) this.velocity.X != (double) vector4.Z) + flag1 = true; + if ((double) this.velocity.Y != (double) vector4.W) + flag1 = true; + Position.X = vector4.X; + Position.Y = vector4.Y; + this.position = Position + vector2; + this.velocity.X = vector4.Z; + this.velocity.Y = vector4.W; + } + } + } + } + } + } + if (velocity1 != this.velocity) + flag1 = true; + if (flag1) + { + if (this.owner == Main.myPlayer && this.CanCutTiles() && (this.friendly || this.hostile) && this.damage > 0) + { + int num8 = (int) ((double) this.position.X + (double) this.velocity.X - 1.0) / 16; + int num9 = (int) (((double) this.position.X + (double) this.width + (double) this.velocity.X + 1.0) / 16.0) + 1; + int num10 = (int) ((double) this.position.Y + (double) this.velocity.Y - 1.0) / 16; + int num11 = (int) (((double) this.position.Y + (double) this.height + (double) this.velocity.Y + 1.0) / 16.0) + 1; + if (num8 < 0) + num8 = 0; + if (num9 > Main.maxTilesX) + num9 = Main.maxTilesX; + if (num10 < 0) + num10 = 0; + if (num11 > Main.maxTilesY) + num11 = Main.maxTilesY; + for (int index1 = num8; index1 < num9; ++index1) + { + for (int index2 = num10; index2 < num11; ++index2) + { + if (Main.tile[index1, index2] != null && Main.tile[index1, index2].type == (ushort) 484 && WorldGen.CanCutTile(index1, index2, TileCuttingContext.AttackProjectile)) + { + WorldGen.KillTile(index1, index2); + if (Main.netMode != 0) + NetMessage.SendData(17, number2: ((float) index1), number3: ((float) index2)); + } + } + } + } + if (this.type == 663 || this.type == 665 || this.type == 667 || this.type == 677 || this.type == 678 || this.type == 679 || this.type == 691 || this.type == 692 || this.type == 693 || this.type == 688 || this.type == 689 || this.type == 690) + { + this.position = this.position + this.velocity; + this.velocity = Vector2.Zero; + } + else if (this.type == 434) + { + this.position = this.position + this.velocity; + this.numUpdates = 0; + } + else if (this.type == 601) + { + if (Main.netMode != 2 && this.alpha > 0) + { + if ((double) this.ai[1] != 0.0) + SoundEngine.PlaySound(SoundID.Item114, this.position); + else + SoundEngine.PlaySound(SoundID.Item115, this.position); + } + if (this.owner == Main.myPlayer) + PortalHelper.TryPlacingPortal(this, velocity1, this.velocity); + this.position = this.position + this.velocity; + this.Kill(); + } + else if (this.type == 451) + { + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + this.velocity = velocity1 / 2f; + } + else if (this.type == 645) + { + this.ai[0] = 0.0f; + this.ai[1] = -1f; + this.netUpdate = true; + } + else if (this.type == 584) + { + bool flag6 = false; + if ((double) this.velocity.X != (double) velocity1.X) + { + this.velocity.X = velocity1.X * -0.75f; + flag6 = true; + } + if ((double) this.velocity.Y != (double) velocity1.Y && (double) velocity1.Y > 2.0 || (double) this.velocity.Y == 0.0) + { + this.velocity.Y = velocity1.Y * -0.75f; + flag6 = true; + } + if (flag6) + { + float num = velocity1.Length() / this.velocity.Length(); + if ((double) num == 0.0) + num = 1f; + this.velocity = this.velocity / num; + --this.penetrate; + } + } + else if (this.type == 532) + { + bool flag7 = false; + if ((double) this.velocity.X != (double) velocity1.X) + { + this.velocity.X = velocity1.X * -0.75f; + flag7 = true; + } + if ((double) this.velocity.Y != (double) velocity1.Y && (double) velocity1.Y > 2.0 || (double) this.velocity.Y == 0.0) + { + this.velocity.Y = velocity1.Y * -0.75f; + flag7 = true; + } + if (flag7) + { + float num = velocity1.Length() / this.velocity.Length(); + if ((double) num == 0.0) + num = 1f; + this.velocity = this.velocity / num; + --this.penetrate; + Collision.HitTiles(this.position, velocity1, this.width, this.height); + } + } + else if (this.type == 533) + { + float num12 = 1f; + bool flag8 = false; + if ((double) this.velocity.X != (double) velocity1.X) + { + this.velocity.X = velocity1.X * -num12; + flag8 = true; + } + if ((double) this.velocity.Y != (double) velocity1.Y || (double) this.velocity.Y == 0.0) + { + this.velocity.Y = (float) ((double) velocity1.Y * -(double) num12 * 0.5); + flag8 = true; + } + if (flag8) + { + float num13 = velocity1.Length() / this.velocity.Length(); + if ((double) num13 == 0.0) + num13 = 1f; + this.velocity = this.velocity / num13; + if ((double) this.ai[0] == 7.0 && (double) this.velocity.Y < -0.1) + this.velocity.Y += 0.1f; + if ((double) this.ai[0] >= 6.0 && (double) this.ai[0] < 9.0) + Collision.HitTiles(this.position, velocity1, this.width, this.height); + } + } + else if (this.type == 502) + { + ++this.ai[0]; + SoundEngine.PlaySound(37, (int) this.position.X, (int) this.position.Y, 5 + (int) this.ai[0]); + if ((double) this.ai[0] >= 5.0) + { + this.position = this.position + this.velocity; + this.Kill(); + } + else + { + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = -velocity1.Y; + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = -velocity1.X; + } + Vector2 spinningpoint = new Vector2(0.0f, -3f - this.ai[0]).RotatedByRandom(3.14159274101257); + float num14 = (float) (10.0 + (double) this.ai[0] * 4.0); + Vector2 vector2 = new Vector2(1.05f, 1f); + for (float num15 = 0.0f; (double) num15 < (double) num14; ++num15) + { + int index = Dust.NewDust(this.Center, 0, 0, 66, newColor: Color.Transparent); + Main.dust[index].position = this.Center; + Main.dust[index].velocity = spinningpoint.RotatedBy(6.28318548202515 * (double) num15 / (double) num14) * vector2 * (float) (0.800000011920929 + (double) Main.rand.NextFloat() * 0.400000005960464); + Main.dust[index].color = Main.hslToRgb(num15 / num14, 1f, 0.5f); + Main.dust[index].noGravity = true; + Main.dust[index].scale = (float) (1.0 + (double) this.ai[0] / 3.0); + } + if (Main.myPlayer == this.owner) + { + int width = this.width; + int height = this.height; + int penetrate = this.penetrate; + this.position = this.Center; + this.width = this.height = 40 + 8 * (int) this.ai[0]; + this.Center = this.position; + this.penetrate = -1; + this.Damage(); + this.penetrate = penetrate; + this.position = this.Center; + this.width = width; + this.height = height; + this.Center = this.position; + } + } + else if (this.type == 444) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = -velocity1.X; + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = -velocity1.Y; + this.ai[0] = this.velocity.ToRotation(); + } + else if (this.type == 617) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = (float) (-(double) velocity1.X * 0.349999994039536); + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = (float) (-(double) velocity1.Y * 0.349999994039536); + } + else if (this.type == 440 || this.type == 449 || this.type == 606) + { + if ((double) this.ai[1] != 1.0) + { + this.ai[1] = 1f; + this.position = this.position + this.velocity; + this.velocity = velocity1; + } + } + else if (this.type == 466 || this.type == 580 || this.type == 640) + { + if ((double) this.localAI[1] < 1.0) + { + this.localAI[1] += 2f; + this.position = this.position + this.velocity; + this.velocity = Vector2.Zero; + } + } + else if (this.type == 851) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = (float) (-(double) velocity1.X * 0.800000011920929); + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = (float) (-(double) velocity1.Y * 0.5); + } + else if (this.type == 855) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = -velocity1.X; + if ((double) this.velocity.Y != (double) velocity1.Y) + { + this.velocity.Y = -velocity1.Y; + if ((double) velocity1.Y < 0.0) + this.velocity.Y *= 0.25f; + } + } + else if (this.aiStyle == 54) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = velocity1.X * -0.6f; + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = velocity1.Y * -0.6f; + } + else if (this.type == 861) + { + float num = -1f; + if ((double) this.ai[1] == 1.0) + num = -0.6f; + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = velocity1.X * num; + if ((double) this.velocity.Y != (double) velocity1.Y && (double) velocity1.Y > 0.7) + this.velocity.Y = velocity1.Y * num; + if ((double) Math.Abs(this.velocity.Y) < 0.5) + this.velocity.Y = 0.0f; + if ((double) this.ai[1] != 1.0) + this.netUpdate = true; + this.ai[1] = 1f; + } + else if (!Main.projPet[this.type] && this.type != 500 && this.type != 820 && this.aiStyle != 160 && this.type != 650 && this.type != 882 && this.type != 888 && this.type != 894 && this.type != 895 && this.type != 898 && this.type != 901) + { + if (this.aiStyle == 99) + { + if (this.type >= 556 && this.type <= 561) + { + bool flag9 = false; + if ((double) this.velocity.X != (double) velocity1.X) + { + flag9 = true; + this.velocity.X = velocity1.X * -1f; + } + if ((double) this.velocity.Y != (double) velocity1.Y) + { + flag9 = true; + this.velocity.Y = velocity1.Y * -1f; + } + if (flag9) + { + Vector2 vector2 = Main.player[this.owner].Center - this.Center; + vector2.Normalize(); + vector2 *= this.velocity.Length(); + vector2 *= 0.25f; + this.velocity = this.velocity * 0.75f; + this.velocity = this.velocity + vector2; + if ((double) this.velocity.Length() > 6.0) + this.velocity = this.velocity * 0.5f; + } + } + } + else if (this.type == 604) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = -velocity1.X; + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = -velocity1.Y; + } + else if (this.type == 379) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = velocity1.X * -0.6f; + if ((double) this.velocity.Y != (double) velocity1.Y && (double) velocity1.Y > 2.0) + this.velocity.Y = velocity1.Y * -0.6f; + } + else if (this.type == 491) + { + if ((double) this.ai[0] <= 0.0) + this.ai[0] = -10f; + if ((double) this.velocity.X != (double) velocity1.X && (double) Math.Abs(velocity1.X) > 0.0) + this.velocity.X = velocity1.X * -1f; + if ((double) this.velocity.Y != (double) velocity1.Y && (double) Math.Abs(velocity1.Y) > 0.0) + this.velocity.Y = velocity1.Y * -1f; + } + else if (this.type >= 515 && this.type <= 517 || this.type == 637) + { + if ((double) this.velocity.X != (double) velocity1.X && (double) Math.Abs(velocity1.X) > 1.0) + this.velocity.X = velocity1.X * -0.9f; + if ((double) this.velocity.Y != (double) velocity1.Y && (double) Math.Abs(velocity1.Y) > 1.0) + this.velocity.Y = velocity1.Y * -0.9f; + } + else if (this.type == 921 || this.type == 926 || this.type == 937) + { + if ((double) this.velocity.X != (double) velocity1.X && (double) Math.Abs(velocity1.X) > 1.0) + this.velocity.X = velocity1.X * -0.95f; + if ((double) this.velocity.Y != (double) velocity1.Y && (double) Math.Abs(velocity1.Y) > 1.0) + this.velocity.Y = velocity1.Y * -0.95f; + --this.penetrate; + } + else if (this.type == 681) + this.timeLeft = 4; + else if (this.type == 409) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = velocity1.X * -1f; + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = velocity1.Y * -1f; + } + else if (this.type == 254) + { + this.tileCollide = false; + this.velocity = velocity1; + if (this.timeLeft > 30) + this.timeLeft = 30; + } + else if (this.type == 225) + { + ++this.ai[1]; + if ((double) this.ai[1] == 1.0) + this.damage = (int) ((double) this.damage * 0.660000026226044); + if ((double) this.ai[1] >= 4.0) + { + this.Kill(); + return; + } + this.velocity.X = -velocity1.X; + this.velocity.Y = -velocity1.Y; + int targetWithLineOfSight = this.FindTargetWithLineOfSight(); + if (targetWithLineOfSight != -1) + { + NPC npc = Main.npc[targetWithLineOfSight]; + float t = this.Distance(npc.Center); + Vector2 vector2 = -Vector2.UnitY * MathHelper.Lerp((float) npc.height * 0.1f, (float) npc.height * 0.5f, Utils.GetLerpValue(0.0f, 300f, t, false)); + this.velocity = this.DirectionTo(npc.Center + vector2).SafeNormalize(-Vector2.UnitY) * this.velocity.Length(); + this.netUpdate = true; + } + } + else if (this.type == 155) + { + if ((double) this.ai[1] > 10.0) + { + NetworkText text = NetworkText.FromKey("Game.BallBounceResult", (object) NetworkText.FromKey(Lang.GetProjectileName(this.type).Key), (object) this.ai[1]); + switch (Main.netMode) + { + case 0: + Main.NewText(text.ToString(), G: (byte) 240, B: (byte) 20); + break; + case 2: + ChatHelper.BroadcastChatMessage(text, new Color((int) byte.MaxValue, 240, 20)); + break; + } + } + this.ai[1] = 0.0f; + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = velocity1.X * -0.6f; + if ((double) this.velocity.Y != (double) velocity1.Y && (double) velocity1.Y > 2.0) + this.velocity.Y = velocity1.Y * -0.6f; + } + else if (this.aiStyle == 33) + { + if ((double) this.localAI[0] == 0.0) + { + if (this.wet) + this.position = this.position + velocity1 / 2f; + else + this.position = this.position + velocity1; + this.velocity = this.velocity * 0.0f; + this.localAI[0] = 1f; + } + } + else if (this.type != 308 && this.type != 377) + { + if (this.type == 477) + { + if ((double) this.velocity.Y != (double) velocity1.Y || (double) this.velocity.X != (double) velocity1.X) + { + --this.penetrate; + if (this.penetrate <= 0) + this.Kill(); + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = -velocity1.X; + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = -velocity1.Y; + } + if (this.penetrate > 0 && this.owner == Main.myPlayer) + { + int[] numArray = new int[10]; + int maxValue = 0; + int num16 = 700; + int num17 = 20; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].CanBeChasedBy((object) this)) + { + float num18 = (this.Center - Main.npc[index].Center).Length(); + if ((double) num18 > (double) num17 && (double) num18 < (double) num16 && Collision.CanHitLine(this.Center, 1, 1, Main.npc[index].Center, 1, 1)) + { + numArray[maxValue] = index; + ++maxValue; + if (maxValue >= 9) + break; + } + } + } + if (maxValue > 0) + { + int index = Main.rand.Next(maxValue); + Vector2 vector2 = Main.npc[numArray[index]].Center - this.Center; + float num19 = this.velocity.Length(); + vector2.Normalize(); + this.velocity = vector2 * num19; + this.netUpdate = true; + } + } + } + else if (this.type == 94) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = -velocity1.X; + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = -velocity1.Y; + } + else if (this.type == 496) + { + if ((double) this.velocity.X != (double) velocity1.X) + { + if ((double) Math.Abs(this.velocity.X) < 1.0) + this.velocity.X = -velocity1.X; + else + this.Kill(); + } + if ((double) this.velocity.Y != (double) velocity1.Y) + { + if ((double) Math.Abs(this.velocity.Y) < 1.0) + this.velocity.Y = -velocity1.Y; + else + this.Kill(); + } + } + else if (this.type == 311) + { + if ((double) this.velocity.X != (double) velocity1.X) + { + this.velocity.X = -velocity1.X; + ++this.ai[1]; + } + if ((double) this.velocity.Y != (double) velocity1.Y) + { + this.velocity.Y = -velocity1.Y; + ++this.ai[1]; + } + if ((double) this.ai[1] > 4.0) + this.Kill(); + } + else if (this.type == 312) + { + if ((double) this.velocity.X != (double) velocity1.X) + { + this.velocity.X = -velocity1.X; + ++this.ai[1]; + } + if ((double) this.velocity.Y != (double) velocity1.Y) + { + this.velocity.Y = -velocity1.Y; + ++this.ai[1]; + } + } + else if (this.type == 522 || this.type == 620) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = -velocity1.X; + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = -velocity1.Y; + } + else if (this.type == 524) + { + this.ai[0] += 100f; + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = -velocity1.X; + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = -velocity1.Y; + } + else if (this.aiStyle == 93) + { + if (this.velocity != velocity1) + { + this.ai[1] = 0.0f; + this.ai[0] = 1f; + this.netUpdate = true; + this.tileCollide = false; + this.position = this.position + this.velocity; + this.velocity = velocity1; + this.velocity.Normalize(); + this.velocity = this.velocity * 3f; + } + } + else if (this.type == 281) + { + bool flag10 = (double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < 2.0 || (double) this.ai[0] == -1.0; + if ((double) this.ai[0] == -2.0 || (double) this.ai[0] == -3.0) + flag10 = false; + if (flag10) + { + if (Main.myPlayer == this.owner) + { + int Style = (double) this.velocity.X > 0.0 ? 1 : 2; + if (this.damage == 0) + Style += 2; + NPC.ReleaseNPC((int) this.Center.X, (int) this.Bottom.Y - 4, 614, Style, this.owner); + this.ai[0] = -3f; + this.netUpdate = true; + } + } + else + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = (float) (-(double) velocity1.X * 0.5); + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = (float) (-(double) velocity1.Y * 0.5); + } + } + else if (this.type == 290 || this.type == 294) + { + if ((double) this.velocity.X != (double) velocity1.X) + { + this.position.X += this.velocity.X; + this.velocity.X = -velocity1.X; + } + if ((double) this.velocity.Y != (double) velocity1.Y) + { + this.position.Y += this.velocity.Y; + this.velocity.Y = -velocity1.Y; + } + } + else if ((this.type == 181 || this.type == 189 || this.type == 357 || this.type == 566) && this.penetrate > 0) + { + if (this.type == 357) + this.damage = (int) ((double) this.damage * 0.9); + --this.penetrate; + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = -velocity1.X; + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = -velocity1.Y; + } + else if (this.type == 307 && (double) this.ai[1] < 5.0) + { + ++this.ai[1]; + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = -velocity1.X; + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = -velocity1.Y; + } + else if (this.type == 99) + { + if ((double) this.velocity.Y != (double) velocity1.Y && (double) velocity1.Y > 5.0) + { + Collision.HitTiles(this.position, this.velocity, this.width, this.height); + SoundEngine.PlaySound(0, (int) this.position.X, (int) this.position.Y); + this.velocity.Y = (float) (-(double) velocity1.Y * 0.200000002980232); + } + if ((double) this.velocity.X != (double) velocity1.X) + this.Kill(); + } + else if (this.type == 727) + { + int Damage = 20; + float KnockBack = 2f; + float num20 = 2f; + if ((double) this.velocity.Y != (double) velocity1.Y && (double) velocity1.Y > 5.0) + { + Collision.HitTiles(this.position, this.velocity, this.width, this.height); + SoundEngine.PlaySound(0, (int) this.position.X, (int) this.position.Y); + this.velocity.Y = (float) (-(double) velocity1.Y * 0.649999976158142); + if (this.owner == Main.myPlayer) + { + int num21 = Main.rand.Next(3, 6); + float num22 = Main.rand.NextFloat(); + for (float num23 = 0.0f; (double) num23 < 1.0; num23 += 1f / (float) num21) + { + Vector2 velocity5 = ((float) (((double) num22 + (double) num23) * 6.28318548202515)).ToRotationVector2() * num20; + if ((double) velocity5.Y > 0.0) + velocity5 *= -0.7f; + Projectile.NewProjectile(this.Center, velocity5, 763, Damage, KnockBack, Main.myPlayer); + } + } + } + if ((double) this.velocity.X != (double) velocity1.X) + { + this.Kill(); + if (this.owner == Main.myPlayer) + { + int num24 = Main.rand.Next(3, 6); + float num25 = Main.rand.NextFloat(); + for (float num26 = 0.0f; (double) num26 < 1.0; num26 += 1f / (float) num24) + { + Vector2 velocity6 = ((float) (((double) num25 + (double) num26) * 6.28318548202515)).ToRotationVector2() * num20; + if ((double) velocity6.Y > 0.0) + velocity6 *= -0.7f; + Projectile.NewProjectile(this.Center, velocity6, 763, Damage, KnockBack, Main.myPlayer); + } + } + } + } + else if (this.type == 655) + { + if ((double) this.velocity.Y != (double) velocity1.Y && (double) velocity1.Y > 5.0) + { + Collision.HitTiles(this.position, this.velocity, this.width, this.height); + SoundEngine.PlaySound(0, (int) this.position.X, (int) this.position.Y); + this.velocity.Y = (float) (-(double) velocity1.Y * 0.200000002980232); + } + if ((double) this.velocity.X != (double) velocity1.X) + this.Kill(); + } + else if (this.type == 36) + { + if (this.penetrate > 1) + { + Collision.HitTiles(this.position, this.velocity, this.width, this.height); + SoundEngine.PlaySound(SoundID.Item10, this.position); + --this.penetrate; + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = -velocity1.X; + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = -velocity1.Y; + } + else + this.Kill(); + } + else if (this.aiStyle == 21) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = -velocity1.X; + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = -velocity1.Y; + } + else if (this.aiStyle == 17) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = velocity1.X * -0.75f; + if ((double) this.velocity.Y != (double) velocity1.Y && (double) velocity1.Y > 1.5) + this.velocity.Y = velocity1.Y * -0.7f; + } + else if (this.aiStyle == 15) + this.AI_015_HandleMovementCollision(ref wetVelocity, ref velocity1); + else if (this.aiStyle == 9) + { + bool flag11 = this.owner == Main.myPlayer; + if (this.type == 79) + { + bool flag12 = (double) this.ai[0] >= 0.0; + flag11 &= !flag12; + if (flag12) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X *= 0.1f; + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y *= 0.1f; + } + } + if (flag11) + this.Kill(); + } + else if (this.aiStyle == 39) + { + Collision.HitTiles(this.position, this.velocity, this.width, this.height); + if (this.type == 33 || this.type == 106) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = -velocity1.X; + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = -velocity1.Y; + } + else + { + this.ai[0] = 1f; + if (this.aiStyle == 3) + { + this.velocity.X = -velocity1.X; + this.velocity.Y = -velocity1.Y; + } + } + this.netUpdate = true; + SoundEngine.PlaySound(0, (int) this.position.X, (int) this.position.Y); + } + else if (this.aiStyle == 3 || this.aiStyle == 13 || this.aiStyle == 69 || this.aiStyle == 109) + { + Collision.HitTiles(this.position, this.velocity, this.width, this.height); + if (this.type == 33 || this.type == 106 || this.type == 866) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = -velocity1.X; + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = -velocity1.Y; + } + else + { + this.ai[0] = 1f; + if ((this.aiStyle == 3 || this.aiStyle == 109) && this.type != 383) + { + this.velocity.X = -velocity1.X; + this.velocity.Y = -velocity1.Y; + } + } + this.netUpdate = true; + SoundEngine.PlaySound(0, (int) this.position.X, (int) this.position.Y); + } + else if (this.aiStyle == 8 && this.type != 96) + { + SoundEngine.PlaySound(SoundID.Item10, this.position); + ++this.ai[0]; + if ((double) this.ai[0] >= 5.0 && this.type != 253 || this.type == 253 && (double) this.ai[0] >= 8.0) + { + this.position = this.position + this.velocity; + this.Kill(); + } + else + { + if (this.type == 15 && (double) this.velocity.Y > 4.0) + { + if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = (float) (-(double) velocity1.Y * 0.800000011920929); + } + else if ((double) this.velocity.Y != (double) velocity1.Y) + this.velocity.Y = -velocity1.Y; + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = -velocity1.X; + } + } + else if (this.aiStyle == 61) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = velocity1.X * -0.3f; + if ((double) this.velocity.Y != (double) velocity1.Y && (double) velocity1.Y > 1.0) + this.velocity.Y = velocity1.Y * -0.3f; + } + else if (this.aiStyle == 14) + { + if (this.type == 928) + { + int num = 0; + for (int index = 1000; index >= 0; --index) + { + if (index != this.whoAmI && Main.projectile[index].active && Main.projectile[index].owner == this.owner && Main.projectile[index].type == this.type) + { + ++num; + if (num >= 2 && this.timeLeft > Main.projectile[index].timeLeft && Main.projectile[index].timeLeft > 30) + Main.projectile[index].timeLeft = 2; + } + } + } + if (this.type == 261 && ((double) this.velocity.X != (double) velocity1.X && ((double) velocity1.X < -3.0 || (double) velocity1.X > 3.0) || (double) this.velocity.Y != (double) velocity1.Y && ((double) velocity1.Y < -3.0 || (double) velocity1.Y > 3.0))) + { + for (int index = 0; index < 10; ++index) + Collision.HitTiles(this.position, this.velocity, this.width, this.height); + SoundEngine.PlaySound(0, (int) this.Center.X, (int) this.Center.Y); + this.MakeBoulderOfEarthExplosion(); + } + if (this.type >= 326 && this.type <= 328 && (double) this.velocity.X != (double) velocity1.X) + this.velocity.X = velocity1.X * -0.1f; + if (this.type >= 400 && this.type <= 402) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = velocity1.X * -0.1f; + } + else if (this.type == 870 && (double) this.ai[1] == 0.0) + { + if ((double) this.velocity.X != (double) velocity1.X || (double) this.velocity.Y != (double) velocity1.Y) + { + this.velocity = -velocity1; + this.ai[1] = 1f; + } + } + else if (this.type == 50) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = velocity1.X * -0.2f; + if ((double) this.velocity.Y != (double) velocity1.Y && (double) velocity1.Y > 1.5) + this.velocity.Y = velocity1.Y * -0.2f; + } + else if (this.type == 185) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = velocity1.X * -0.9f; + if ((double) this.velocity.Y != (double) velocity1.Y && (double) velocity1.Y > 1.0) + this.velocity.Y = velocity1.Y * -0.9f; + } + else if (this.type == 277) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = velocity1.X * -0.9f; + if ((double) this.velocity.Y != (double) velocity1.Y && (double) velocity1.Y > 3.0) + this.velocity.Y = velocity1.Y * -0.9f; + } + else if (this.type != 480) + { + if (this.type == 450) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = velocity1.X * -0.1f; + } + else + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = velocity1.X * -0.5f; + if ((double) this.velocity.Y != (double) velocity1.Y && (double) velocity1.Y > 1.0) + this.velocity.Y = velocity1.Y * -0.5f; + } + } + } + else if (this.aiStyle == 16) + { + if ((double) this.velocity.X != (double) velocity1.X) + { + this.velocity.X = velocity1.X * -0.4f; + if (this.type == 29) + this.velocity.X *= 0.8f; + } + if ((double) this.velocity.Y != (double) velocity1.Y && (double) velocity1.Y > 0.7 && this.type != 102) + { + this.velocity.Y = velocity1.Y * -0.4f; + if (this.type == 29) + this.velocity.Y *= 0.8f; + } + if (this.type == 134 || this.type == 137 || this.type == 140 || this.type == 143 || this.type == 303 || this.type >= 338 && this.type <= 341 || this.type == 776 || this.type == 780 || this.type == 793 || this.type == 796 || this.type == 799 || this.type == 784 || this.type == 787 || this.type == 790 || this.type == 803 || this.type == 804 || this.type == 808 || this.type == 809 || this.type == 810 || this.type == 805 || this.type == 806 || this.type == 807 || this.type == 930) + { + this.velocity = this.velocity * 0.0f; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 3; + } + } + else if (this.aiStyle == 68) + { + this.velocity = this.velocity * 0.0f; + this.alpha = (int) byte.MaxValue; + this.timeLeft = 3; + this.netUpdate = true; + } + else if (this.type == 870) + { + if ((double) this.velocity.X != (double) velocity1.X) + this.velocity.X = velocity1.X * -0.2f; + if ((double) this.velocity.Y != (double) velocity1.Y && (double) velocity1.Y > 0.0) + this.velocity.Y = velocity1.Y * -0.2f; + } + else + { + this.position = this.position + this.velocity; + this.Kill(); + } + } + } + } + } + this.UpdatePosition(wetVelocity); + if (flag2 || flag3 || this.owner != Main.myPlayer || !(this.tileCollide | flag4) || !(this.position != this.oldPosition)) + return; + Vector2 Position1 = this.position; + Vector2 oldPosition1 = this.oldPosition; + int Width = overrideWidth != -1 ? overrideWidth : this.width; + int Height = overrideHeight != -1 ? overrideHeight : this.height; + if (overrideHeight != -1 || overrideWidth != -1) + { + Position1 = new Vector2(this.position.X + (float) (this.width / 2) - (float) (Width / 2), this.position.Y + (float) (this.height / 2) - (float) (Height / 2)); + oldPosition1 = new Vector2(this.oldPosition.X + (float) (this.width / 2) - (float) (Width / 2), this.oldPosition.Y + (float) (this.height / 2) - (float) (Height / 2)); + } + Collision.SwitchTiles(Position1, Width, Height, oldPosition1, 4); + } + + private void AI_149_GolfBall() + { + if (!this.npcProj && this.timeLeft < 10) + this.timeLeft = 10; + if ((double) this.ai[1] == -1.0) + { + Tile tileSafely = Framing.GetTileSafely(this.Bottom.ToTileCoordinates()); + if (tileSafely.active() && tileSafely.type == (ushort) 494) + return; + this.ai[1] = 0.0f; + this.netUpdate = true; + } + else + { + BallStepResult ballStepResult = GolfHelper.StepGolfBall((Entity) this, ref this.localAI[0]); + if (ballStepResult.State == BallState.Resting) + { + this.damage = 0; + if (Main.netMode == 1 && this.owner == Main.myPlayer && (double) this.localAI[1] != (double) ballStepResult.State) + this.netUpdate = true; + } + this.localAI[1] = (float) ballStepResult.State; + this.rotation += this.localAI[0]; + if ((double) this.velocity.Y != 0.0 && ballStepResult.State == BallState.Moving) + this.rotation += (float) ((double) this.velocity.X * 0.100000001490116 + (double) this.velocity.Y * 0.100000001490116); + if (ballStepResult.State == BallState.Moving && this.owner == Main.myPlayer) + { + bool? nullable = ProjectileID.Sets.ForcePlateDetection[135]; + if ((!nullable.HasValue ? 0 : (!nullable.Value ? 1 : 0)) == 0 && (double) this.localAI[1] != 0.0) + Collision.SwitchTiles(this.position, this.width, this.height, this.oldPosition, 4); + } + if (ballStepResult.State != BallState.Moving || Main.netMode != 2 || !Main.player.IndexInRange(this.owner) || !Main.player[this.owner].active) + return; + RemoteClient.CheckSection(this.owner, this.position); + } + } + + private void MakeBoulderOfEarthExplosion() + { + this.localAI[0] = 40f; + float MAX_SPREAD = 20f; + int fluff = 10; + int distFluff = 50; + int layerStart = 1; + int num = 6; + if ((double) this.velocity.Length() < 8.0 || (double) Math.Abs(this.velocity.Y) < 4.0) + { + MAX_SPREAD = 15f; + fluff = 7; + distFluff = 30; + num = 4; + } + if ((double) this.velocity.Length() < 4.0 || (double) Math.Abs(this.velocity.Y) < 2.0) + { + MAX_SPREAD = 15f; + fluff = 7; + distFluff = 30; + num = 2; + layerStart = 0; + } + int layerEnd = num; + int layerJump = num - 2; + if (layerJump < 1) + layerJump = 1; + this.CreateGroundExplosion(MAX_SPREAD, fluff, distFluff, layerStart, layerEnd, layerJump); + for (int index = 0; index < 10; ++index) + { + Dust dust = Dust.NewDustPerfect(this.Center + Main.rand.NextVector2Circular((float) (this.width / 2), (float) (this.height / 2)), 228, new Vector2?(Main.rand.NextVector2Circular(3f, 3f))); + dust.scale = 0.6f; + if (index < 5) + { + dust.noGravity = true; + dust.scale = 1.8f; + } + } + } + + private void UpdatePosition(Vector2 wetVelocity) + { + if (this.aiStyle == 4 || this.aiStyle == 38 || this.aiStyle == 84 || this.aiStyle == 148 || this.aiStyle == 7 && (double) this.ai[0] == 2.0 || (this.type == 440 || this.type == 449 || this.type == 606) && (double) this.ai[1] == 1.0 || this.aiStyle == 93 && (double) this.ai[0] < 0.0 || this.type == 540 || this.type == 756 || this.type == 818 || this.type == 856 || this.type == 933 || ProjectileID.Sets.IsAGolfBall[this.type]) + return; + if (this.wet) + this.position = this.position + wetVelocity; + else + this.position = this.position + this.velocity; + if (!Main.projPet[this.type] || !this.tileCollide) + return; + Vector4 vector4 = Collision.SlopeCollision(this.position, this.velocity, this.width, this.height); + this.position.X = vector4.X; + this.position.Y = vector4.Y; + this.velocity.X = vector4.Z; + this.velocity.Y = vector4.W; + } + + public void FishingCheck() + { + if (Main.player[this.owner].wet) + return; + FishingAttempt fisher = new FishingAttempt(); + fisher.X = (int) ((double) this.Center.X / 16.0); + fisher.Y = (int) ((double) this.Center.Y / 16.0); + fisher.bobberType = this.type; + Projectile.GetFishingPondState(fisher.X, fisher.Y, out fisher.inLava, out fisher.inHoney, out fisher.waterTilesCount, out fisher.chumsInWater); + if (fisher.waterTilesCount < 75) + { + Main.player[this.owner].displayedFishingInfo = Language.GetTextValue("GameUI.NotEnoughWater"); + } + else + { + fisher.playerFishingConditions = Main.player[this.owner].GetFishingConditions(); + if (fisher.playerFishingConditions.BaitItemType == 2673) + { + Main.player[this.owner].displayedFishingInfo = Language.GetTextValue("GameUI.FishingWarning"); + if (fisher.X >= 380 && fisher.X <= Main.maxTilesX - 380 || fisher.waterTilesCount <= 1000 || NPC.AnyNPCs(370)) + return; + this.ai[1] = (float) (Main.rand.Next(-180, -60) - 100); + this.localAI[1] = 1f; + this.netUpdate = true; + } + else + { + fisher.fishingLevel = fisher.playerFishingConditions.FinalFishingLevel; + if (fisher.fishingLevel == 0) + return; + fisher.CanFishInLava = ItemID.Sets.CanFishInLava[fisher.playerFishingConditions.PoleItemType] || ItemID.Sets.IsLavaBait[fisher.playerFishingConditions.BaitItemType] || Main.player[this.owner].accLavaFishing; + if (fisher.chumsInWater > 0) + fisher.fishingLevel += 11; + if (fisher.chumsInWater > 1) + fisher.fishingLevel += 6; + if (fisher.chumsInWater > 2) + fisher.fishingLevel += 3; + Main.player[this.owner].displayedFishingInfo = Language.GetTextValue("GameUI.FishingPower", (object) fisher.fishingLevel); + fisher.waterNeededToFish = 300; + float num1 = (float) (Main.maxTilesX / 4200); + float num2 = num1 * num1; + fisher.atmo = (float) (((double) this.position.Y / 16.0 - (60.0 + 10.0 * (double) num2)) / (Main.worldSurface / 6.0)); + if ((double) fisher.atmo < 0.25) + fisher.atmo = 0.25f; + if ((double) fisher.atmo > 1.0) + fisher.atmo = 1f; + fisher.waterNeededToFish = (int) ((double) fisher.waterNeededToFish * (double) fisher.atmo); + fisher.waterQuality = (float) fisher.waterTilesCount / (float) fisher.waterNeededToFish; + if ((double) fisher.waterQuality < 1.0) + fisher.fishingLevel = (int) ((double) fisher.fishingLevel * (double) fisher.waterQuality); + fisher.waterQuality = 1f - fisher.waterQuality; + if (fisher.waterTilesCount < fisher.waterNeededToFish) + Main.player[this.owner].displayedFishingInfo = Language.GetTextValue("GameUI.FullFishingPower", (object) fisher.fishingLevel, (object) -Math.Round((double) fisher.waterQuality * 100.0)); + if ((double) Main.player[this.owner].luck < 0.0) + { + if ((double) Main.rand.NextFloat() < -(double) Main.player[this.owner].luck) + fisher.fishingLevel = (int) ((double) fisher.fishingLevel * (0.9 - (double) Main.rand.NextFloat() * 0.3)); + } + else if ((double) Main.rand.NextFloat() < (double) Main.player[this.owner].luck) + fisher.fishingLevel = (int) ((double) fisher.fishingLevel * (1.1 + (double) Main.rand.NextFloat() * 0.3)); + if (fisher.fishingLevel > 50) + fisher.fishingLevel = (int) (50.0 + (double) (fisher.fishingLevel - 50) * 0.949999988079071); + if (fisher.fishingLevel > 75) + fisher.fishingLevel = (int) (75.0 + (double) (fisher.fishingLevel - 75) * 0.899999976158142); + if (fisher.fishingLevel > 100) + fisher.fishingLevel = (int) (100.0 + (double) (fisher.fishingLevel - 100) * 0.850000023841858); + if (fisher.fishingLevel > 125) + fisher.fishingLevel = (int) (125.0 + (double) (fisher.fishingLevel - 125) * 0.800000011920929); + if (fisher.fishingLevel > 150) + fisher.fishingLevel = (int) (150.0 + (double) (fisher.fishingLevel - 150) * 0.75); + if (fisher.fishingLevel > 175) + fisher.fishingLevel = (int) (175.0 + (double) (fisher.fishingLevel - 175) * 0.699999988079071); + if (fisher.fishingLevel > 200) + fisher.fishingLevel = (int) (200.0 + (double) (fisher.fishingLevel - 200) * 0.649999976158142); + int num3 = (fisher.fishingLevel + 75) / 2; + if (Main.rand.Next(100) > num3) + return; + fisher.heightLevel = 0; + fisher.heightLevel = (double) fisher.Y >= Main.worldSurface * 0.5 ? ((double) fisher.Y >= Main.worldSurface ? ((double) fisher.Y >= Main.rockLayer ? (fisher.Y >= Main.maxTilesY - 300 ? 4 : 3) : 2) : 1) : 0; + this.FishingCheck_RollDropLevels(fisher.fishingLevel, out fisher.common, out fisher.uncommon, out fisher.rare, out fisher.veryrare, out fisher.legendary, out fisher.crate); + this.FishingCheck_ProbeForQuestFish(ref fisher); + this.FishingCheck_RollEnemySpawns(ref fisher); + this.FishingCheck_RollItemDrop(ref fisher); + bool flag = false; + if (fisher.rolledItemDrop > 0) + { + if (Main.player[this.owner].sonarPotion) + { + Item newItem = new Item(); + newItem.SetDefaults(fisher.rolledItemDrop); + newItem.position = this.position; + PopupText.sonarText = PopupText.NewText(PopupTextContext.SonarAlert, newItem, 1, true); + if (PopupText.sonarText > -1) + Main.popupText[PopupText.sonarText].sonar = true; + } + float fishingLevel = (float) fisher.fishingLevel; + this.ai[1] = (float) Main.rand.Next(-240, -90) - fishingLevel; + this.localAI[1] = (float) fisher.rolledItemDrop; + this.netUpdate = true; + flag = true; + } + if (fisher.rolledEnemySpawn > 0) + { + if (Main.player[this.owner].sonarPotion) + { + PopupText.sonarText = PopupText.NewText(PopupTextContext.SonarAlert, fisher.rolledEnemySpawn, this.Center, false); + if (PopupText.sonarText > -1) + Main.popupText[PopupText.sonarText].sonar = true; + } + float fishingLevel = (float) fisher.fishingLevel; + this.ai[1] = (float) Main.rand.Next(-240, -90) - fishingLevel; + this.localAI[1] = (float) -fisher.rolledEnemySpawn; + this.netUpdate = true; + flag = true; + } + if (flag) + return; + int num4 = 0; + if (ItemID.Sets.IsLavaBait[fisher.playerFishingConditions.BaitItemType]) + ++num4; + if (ItemID.Sets.CanFishInLava[fisher.playerFishingConditions.PoleItemType]) + ++num4; + if (Main.player[this.owner].accLavaFishing) + ++num4; + if (num4 < 2) + return; + this.localAI[1] += 240f; + } + } + } + + private void FishingCheck_RollEnemySpawns(ref FishingAttempt fisher) + { + if (fisher.inLava || fisher.inHoney || !Main.bloodMoon || Main.dayTime) + return; + int maxValue = 6; + if (fisher.bobberType == 760) + maxValue = 3; + if (Main.rand.Next(maxValue) != 0) + return; + if (Main.hardMode) + { + fisher.rolledEnemySpawn = (int) Utils.SelectRandom(Main.rand, (short) 620, (short) 621, (short) 586, (short) 587); + if (Main.rand.Next(10) != 0) + return; + fisher.rolledEnemySpawn = 618; + } + else + fisher.rolledEnemySpawn = (int) Utils.SelectRandom(Main.rand, (short) 586, (short) 587); + } + + private void FishingCheck_RollItemDrop(ref FishingAttempt fisher) + { + if (fisher.rolledEnemySpawn > 0) + return; + if (fisher.inLava) + { + if (!fisher.CanFishInLava) + return; + if (fisher.crate && Main.rand.Next(5) == 0) + fisher.rolledItemDrop = Main.hardMode ? 4878 : 4877; + else if (fisher.legendary && Main.hardMode && Main.rand.Next(3) == 0) + fisher.rolledItemDrop = (int) Main.rand.NextFromList((short) 4819, (short) 4820, (short) 4872, (short) 2331); + else if (fisher.legendary && !Main.hardMode && Main.rand.Next(3) == 0) + fisher.rolledItemDrop = (int) Main.rand.NextFromList((short) 4819, (short) 4820, (short) 4872); + else if (fisher.veryrare) + { + fisher.rolledItemDrop = 2312; + } + else + { + if (!fisher.rare) + return; + fisher.rolledItemDrop = 2315; + } + } + else if (fisher.inHoney) + { + if (fisher.rare || fisher.uncommon && Main.rand.Next(2) == 0) + { + fisher.rolledItemDrop = 2314; + } + else + { + if (!fisher.uncommon || fisher.questFish != 2451) + return; + fisher.rolledItemDrop = 2451; + } + } + else if (Main.rand.Next(50) > fisher.fishingLevel && Main.rand.Next(50) > fisher.fishingLevel && fisher.waterTilesCount < fisher.waterNeededToFish) + fisher.rolledItemDrop = Main.rand.Next(2337, 2340); + else if (fisher.crate) + { + bool hardMode = Main.hardMode; + if (fisher.veryrare || fisher.legendary) + fisher.rolledItemDrop = hardMode ? 3981 : 2336; + else if (fisher.rare && Main.player[this.owner].ZoneDungeon) + fisher.rolledItemDrop = hardMode ? 3984 : 3205; + else if (fisher.rare && Main.player[this.owner].ZoneBeach) + fisher.rolledItemDrop = hardMode ? 5003 : 5002; + else if (fisher.rare && Main.player[this.owner].ZoneCorrupt) + fisher.rolledItemDrop = hardMode ? 3982 : 3203; + else if (fisher.rare && Main.player[this.owner].ZoneCrimson) + fisher.rolledItemDrop = hardMode ? 3983 : 3204; + else if (fisher.rare && Main.player[this.owner].ZoneHallow) + fisher.rolledItemDrop = hardMode ? 3986 : 3207; + else if (fisher.rare && Main.player[this.owner].ZoneJungle) + fisher.rolledItemDrop = hardMode ? 3987 : 3208; + else if (fisher.rare && Main.player[this.owner].ZoneSnow) + fisher.rolledItemDrop = hardMode ? 4406 : 4405; + else if (fisher.rare && Main.player[this.owner].ZoneDesert) + fisher.rolledItemDrop = hardMode ? 4408 : 4407; + else if (fisher.rare && fisher.heightLevel == 0) + fisher.rolledItemDrop = hardMode ? 3985 : 3206; + else if (fisher.uncommon) + fisher.rolledItemDrop = hardMode ? 3980 : 2335; + else + fisher.rolledItemDrop = hardMode ? 3979 : 2334; + } + else if (!NPC.combatBookWasUsed && Main.bloodMoon && fisher.legendary && Main.rand.Next(3) == 0) + fisher.rolledItemDrop = 4382; + else if (fisher.legendary && Main.rand.Next(5) == 0) + fisher.rolledItemDrop = 2423; + else if (fisher.legendary && Main.rand.Next(5) == 0) + fisher.rolledItemDrop = 3225; + else if (fisher.legendary && Main.rand.Next(10) == 0) + fisher.rolledItemDrop = 2420; + else if (!fisher.legendary && !fisher.veryrare && fisher.uncommon && Main.rand.Next(5) == 0) + { + fisher.rolledItemDrop = 3196; + } + else + { + bool flag1 = Main.player[this.owner].ZoneDesert; + if (Main.player[this.owner].ZoneDungeon) + { + flag1 = false; + if (fisher.rolledItemDrop == 0 && fisher.veryrare && Main.rand.Next(7) == 0) + fisher.rolledItemDrop = 3000; + } + else + { + bool flag2 = Main.player[this.owner].ZoneCorrupt; + bool flag3 = Main.player[this.owner].ZoneCrimson; + if (flag2 & flag3) + { + if (Main.rand.Next(2) == 0) + flag3 = false; + else + flag2 = false; + } + if (flag2) + { + if (fisher.legendary && Main.hardMode && Main.player[this.owner].ZoneSnow && fisher.heightLevel == 3 && Main.rand.Next(3) != 0) + fisher.rolledItemDrop = 2429; + else if (fisher.legendary && Main.hardMode && Main.rand.Next(2) == 0) + fisher.rolledItemDrop = 3210; + else if (fisher.rare) + fisher.rolledItemDrop = 2330; + else if (fisher.uncommon && fisher.questFish == 2454) + fisher.rolledItemDrop = 2454; + else if (fisher.uncommon && fisher.questFish == 2485) + fisher.rolledItemDrop = 2485; + else if (fisher.uncommon && fisher.questFish == 2457) + fisher.rolledItemDrop = 2457; + else if (fisher.uncommon) + fisher.rolledItemDrop = 2318; + } + else if (flag3) + { + if (fisher.legendary && Main.hardMode && Main.player[this.owner].ZoneSnow && fisher.heightLevel == 3 && Main.rand.Next(3) != 0) + fisher.rolledItemDrop = 2429; + else if (fisher.legendary && Main.hardMode && Main.rand.Next(2) == 0) + fisher.rolledItemDrop = 3211; + else if (fisher.uncommon && fisher.questFish == 2477) + fisher.rolledItemDrop = 2477; + else if (fisher.uncommon && fisher.questFish == 2463) + fisher.rolledItemDrop = 2463; + else if (fisher.uncommon) + fisher.rolledItemDrop = 2319; + else if (fisher.common) + fisher.rolledItemDrop = 2305; + } + else if (Main.player[this.owner].ZoneHallow) + { + if (fisher.legendary && Main.hardMode && Main.player[this.owner].ZoneSnow && fisher.heightLevel == 3 && Main.rand.Next(3) != 0) + fisher.rolledItemDrop = 2429; + else if (fisher.legendary && Main.hardMode && Main.rand.Next(2) == 0) + fisher.rolledItemDrop = 3209; + else if (fisher.heightLevel > 1 && fisher.veryrare) + fisher.rolledItemDrop = 2317; + else if (fisher.heightLevel > 1 && fisher.rare && fisher.questFish == 2465) + fisher.rolledItemDrop = 2465; + else if (fisher.heightLevel < 2 && fisher.rare && fisher.questFish == 2468) + fisher.rolledItemDrop = 2468; + else if (fisher.rare) + fisher.rolledItemDrop = 2310; + else if (fisher.uncommon && fisher.questFish == 2471) + fisher.rolledItemDrop = 2471; + else if (fisher.uncommon) + fisher.rolledItemDrop = 2307; + } + if (fisher.rolledItemDrop == 0 && Main.player[this.owner].ZoneSnow) + { + if (fisher.heightLevel < 2 && fisher.uncommon && fisher.questFish == 2467) + fisher.rolledItemDrop = 2467; + else if (fisher.heightLevel == 1 && fisher.uncommon && fisher.questFish == 2470) + fisher.rolledItemDrop = 2470; + else if (fisher.heightLevel >= 2 && fisher.uncommon && fisher.questFish == 2484) + fisher.rolledItemDrop = 2484; + else if (fisher.heightLevel > 1 && fisher.uncommon && fisher.questFish == 2466) + fisher.rolledItemDrop = 2466; + else if (fisher.common && Main.rand.Next(12) == 0 || fisher.uncommon && Main.rand.Next(6) == 0) + fisher.rolledItemDrop = 3197; + else if (fisher.uncommon) + fisher.rolledItemDrop = 2306; + else if (fisher.common) + fisher.rolledItemDrop = 2299; + else if (fisher.heightLevel > 1 && Main.rand.Next(3) == 0) + fisher.rolledItemDrop = 2309; + } + if (fisher.rolledItemDrop == 0 && Main.player[this.owner].ZoneJungle) + { + if (fisher.heightLevel == 1 && fisher.uncommon && fisher.questFish == 2452) + fisher.rolledItemDrop = 2452; + else if (fisher.heightLevel == 1 && fisher.uncommon && fisher.questFish == 2483) + fisher.rolledItemDrop = 2483; + else if (fisher.heightLevel == 1 && fisher.uncommon && fisher.questFish == 2488) + fisher.rolledItemDrop = 2488; + else if (fisher.heightLevel >= 1 && fisher.uncommon && fisher.questFish == 2486) + fisher.rolledItemDrop = 2486; + else if (fisher.heightLevel > 1 && fisher.uncommon) + fisher.rolledItemDrop = 2311; + else if (fisher.uncommon) + fisher.rolledItemDrop = 2313; + else if (fisher.common) + fisher.rolledItemDrop = 2302; + } + if (fisher.rolledItemDrop == 0 && Main.player[this.owner].ZoneGlowshroom && fisher.uncommon && fisher.questFish == 2475) + fisher.rolledItemDrop = 2475; + } + if (fisher.rolledItemDrop == 0) + { + if (fisher.heightLevel <= 1 && (fisher.X < 380 || fisher.X > Main.maxTilesX - 380) && fisher.waterTilesCount > 1000) + fisher.rolledItemDrop = !fisher.veryrare || Main.rand.Next(2) != 0 ? (!fisher.veryrare ? (!fisher.rare || Main.rand.Next(5) != 0 ? (!fisher.rare || Main.rand.Next(3) != 0 ? (!fisher.uncommon || fisher.questFish != 2480 ? (!fisher.uncommon || fisher.questFish != 2481 ? (!fisher.uncommon ? (!fisher.common || Main.rand.Next(2) != 0 ? (!fisher.common ? 2297 : 2300) : 2301) : 2316) : 2481) : 2480) : 2332) : 2438) : 2342) : 2341; + else if (flag1) + fisher.rolledItemDrop = !fisher.uncommon || fisher.questFish != 4393 ? (!fisher.uncommon || fisher.questFish != 4394 ? (!fisher.uncommon ? (Main.rand.Next(3) != 0 ? 4401 : 4402) : 4410) : 4394) : 4393; + } + if (fisher.rolledItemDrop != 0) + return; + if (fisher.heightLevel < 2 && fisher.uncommon && fisher.questFish == 2461) + fisher.rolledItemDrop = 2461; + else if (fisher.heightLevel == 0 && fisher.uncommon && fisher.questFish == 2453) + fisher.rolledItemDrop = 2453; + else if (fisher.heightLevel == 0 && fisher.uncommon && fisher.questFish == 2473) + fisher.rolledItemDrop = 2473; + else if (fisher.heightLevel == 0 && fisher.uncommon && fisher.questFish == 2476) + fisher.rolledItemDrop = 2476; + else if (fisher.heightLevel < 2 && fisher.uncommon && fisher.questFish == 2458) + fisher.rolledItemDrop = 2458; + else if (fisher.heightLevel < 2 && fisher.uncommon && fisher.questFish == 2459) + fisher.rolledItemDrop = 2459; + else if (fisher.heightLevel == 0 && fisher.uncommon) + fisher.rolledItemDrop = 2304; + else if (fisher.heightLevel > 0 && fisher.heightLevel < 3 && fisher.uncommon && fisher.questFish == 2455) + fisher.rolledItemDrop = 2455; + else if (fisher.heightLevel == 1 && fisher.uncommon && fisher.questFish == 2479) + fisher.rolledItemDrop = 2479; + else if (fisher.heightLevel == 1 && fisher.uncommon && fisher.questFish == 2456) + fisher.rolledItemDrop = 2456; + else if (fisher.heightLevel == 1 && fisher.uncommon && fisher.questFish == 2474) + fisher.rolledItemDrop = 2474; + else if (fisher.heightLevel > 1 && fisher.rare && Main.rand.Next(5) == 0) + { + if (Main.hardMode && Main.rand.Next(2) == 0) + fisher.rolledItemDrop = 2437; + else + fisher.rolledItemDrop = 2436; + } + else if (fisher.heightLevel > 1 && fisher.legendary && Main.rand.Next(3) != 0) + fisher.rolledItemDrop = 2308; + else if (fisher.heightLevel > 1 && fisher.veryrare && Main.rand.Next(2) == 0) + fisher.rolledItemDrop = 2320; + else if (fisher.heightLevel > 1 && fisher.rare) + fisher.rolledItemDrop = 2321; + else if (fisher.heightLevel > 1 && fisher.uncommon && fisher.questFish == 2478) + fisher.rolledItemDrop = 2478; + else if (fisher.heightLevel > 1 && fisher.uncommon && fisher.questFish == 2450) + fisher.rolledItemDrop = 2450; + else if (fisher.heightLevel > 1 && fisher.uncommon && fisher.questFish == 2464) + fisher.rolledItemDrop = 2464; + else if (fisher.heightLevel > 1 && fisher.uncommon && fisher.questFish == 2469) + fisher.rolledItemDrop = 2469; + else if (fisher.heightLevel > 2 && fisher.uncommon && fisher.questFish == 2462) + fisher.rolledItemDrop = 2462; + else if (fisher.heightLevel > 2 && fisher.uncommon && fisher.questFish == 2482) + fisher.rolledItemDrop = 2482; + else if (fisher.heightLevel > 2 && fisher.uncommon && fisher.questFish == 2472) + fisher.rolledItemDrop = 2472; + else if (fisher.heightLevel > 2 && fisher.uncommon && fisher.questFish == 2460) + fisher.rolledItemDrop = 2460; + else if (fisher.heightLevel > 1 && fisher.uncommon && Main.rand.Next(4) != 0) + fisher.rolledItemDrop = 2303; + else if (fisher.heightLevel > 1 && (fisher.uncommon || fisher.common || Main.rand.Next(4) == 0)) + { + if (Main.rand.Next(4) == 0) + fisher.rolledItemDrop = 2303; + else + fisher.rolledItemDrop = 2309; + } + else if (fisher.uncommon && fisher.questFish == 2487) + fisher.rolledItemDrop = 2487; + else if (fisher.waterTilesCount > 1000 && fisher.common) + fisher.rolledItemDrop = 2298; + else + fisher.rolledItemDrop = 2290; + } + } + + private void FishingCheck_ProbeForQuestFish(ref FishingAttempt fisher) + { + fisher.questFish = Main.anglerQuestItemNetIDs[Main.anglerQuest]; + if (Main.player[this.owner].HasItem(fisher.questFish)) + fisher.questFish = -1; + if (!NPC.AnyNPCs(369)) + fisher.questFish = -1; + if (!Main.anglerQuestFinished) + return; + fisher.questFish = -1; + } + + private void FishingCheck_RollDropLevels( + int fishingLevel, + out bool common, + out bool uncommon, + out bool rare, + out bool veryrare, + out bool legendary, + out bool crate) + { + int num1 = 150; + int maxValue1 = num1 / fishingLevel; + int maxValue2 = num1 * 2 / fishingLevel; + int maxValue3 = num1 * 7 / fishingLevel; + int maxValue4 = num1 * 15 / fishingLevel; + int maxValue5 = num1 * 30 / fishingLevel; + int num2 = 10; + if (Main.player[this.owner].cratePotion) + num2 += 10; + if (maxValue1 < 2) + maxValue1 = 2; + if (maxValue2 < 3) + maxValue2 = 3; + if (maxValue3 < 4) + maxValue3 = 4; + if (maxValue4 < 5) + maxValue4 = 5; + if (maxValue5 < 6) + maxValue5 = 6; + common = false; + uncommon = false; + rare = false; + veryrare = false; + legendary = false; + crate = false; + if (Main.rand.Next(maxValue1) == 0) + common = true; + if (Main.rand.Next(maxValue2) == 0) + uncommon = true; + if (Main.rand.Next(maxValue3) == 0) + rare = true; + if (Main.rand.Next(maxValue4) == 0) + veryrare = true; + if (Main.rand.Next(maxValue5) == 0) + legendary = true; + if (Main.rand.Next(100) >= num2) + return; + crate = true; + } + + private static void GetFishingPondState( + int x, + int y, + out bool lava, + out bool honey, + out int numWaters, + out int chumCount) + { + lava = false; + honey = false; + numWaters = 0; + chumCount = 0; + Point tileCoords = new Point(0, 0); + int minX; + int maxX; + Projectile.GetFishingPondWidth(x, y, out minX, out maxX); + for (int i = minX; i <= maxX; ++i) + { + int j = y; + while (Main.tile[i, j].liquid > (byte) 0 && !WorldGen.SolidTile(i, j) && j < Main.maxTilesY - 10) + { + ++numWaters; + ++j; + if (Main.tile[i, j].lava()) + lava = true; + else if (Main.tile[i, j].honey()) + honey = true; + tileCoords.X = i; + tileCoords.Y = j; + chumCount += Main.instance.ChumBucketProjectileHelper.GetChumsInLocation(tileCoords); + } + } + if (!honey) + return; + numWaters = (int) ((double) numWaters * 1.5); + } + + private static void GetFishingPondWidth(int x, int y, out int minX, out int maxX) + { + minX = x; + maxX = x; + while (minX > 10 && Main.tile[minX, y].liquid > (byte) 0 && !WorldGen.SolidTile(minX, y)) + --minX; + while (maxX < Main.maxTilesX - 10 && Main.tile[maxX, y].liquid > (byte) 0 && !WorldGen.SolidTile(maxX, y)) + ++maxX; + } + + public bool CanBeReflected() => this.active && this.friendly && !this.hostile && this.damage > 0 && (this.aiStyle == 1 || this.aiStyle == 2 || this.aiStyle == 8 || this.aiStyle == 21 || this.aiStyle == 24 || this.aiStyle == 28 || this.aiStyle == 29 || this.aiStyle == 131); + + public Color GetFairyQueenWeaponsColor( + float alphaChannelMultiplier = 1f, + float lerpToWhite = 0.0f, + float? rawHueOverride = null) + { + float num = this.ai[1]; + if (rawHueOverride.HasValue) + num = rawHueOverride.Value; + float Hue = (float) (((double) num + 0.5) % 1.0); + float Saturation = 1f; + float Luminosity = 0.5f; + if (Main.player[this.owner].active) + { + switch (Main.player[this.owner].name) + { + case "Acamaeda": + Hue = MathHelper.Lerp(0.06f, 0.28f, Utils.Turn01ToCyclic010(Hue)); + Luminosity = 0.5f; + alphaChannelMultiplier = MathHelper.Lerp(alphaChannelMultiplier, 0.6f, 0.5f); + break; + case "Alchemystics": + Hue = MathHelper.Lerp(0.74f, 0.96f, Utils.Turn01ToCyclic010(Hue)); + Luminosity = 0.6f; + alphaChannelMultiplier = MathHelper.Lerp(alphaChannelMultiplier, 0.6f, 0.5f); + break; + case "Antithesis": + Hue = 0.51f; + Luminosity = MathHelper.Lerp(0.0f, 0.5f, (float) (Math.Cos((double) num * 6.28318548202515) * 0.5 + 0.5)); + break; + case "Aurora3500": + Hue = MathHelper.Lerp(0.33f, 0.8f, Utils.Turn01ToCyclic010(Hue)); + Luminosity = 0.5f; + alphaChannelMultiplier = MathHelper.Lerp(alphaChannelMultiplier, 0.5f, 0.5f); + break; + case "Cenx": + Color color1 = Color.Lerp(new Color(0.3f, 1f, 0.2f), Color.HotPink, MathHelper.SmoothStep(0.0f, 1f, MathHelper.SmoothStep(0.0f, 1f, Utils.PingPongFrom01To010(Hue)))); + if ((double) lerpToWhite != 0.0) + color1 = Color.Lerp(color1, Color.White, lerpToWhite); + color1.A = (byte) ((double) color1.A * (double) alphaChannelMultiplier); + return color1; + case "Criddle": + Hue = MathHelper.Lerp(0.05f, 0.15f, Utils.Turn01ToCyclic010(Hue)); + Luminosity = 0.5f; + alphaChannelMultiplier = MathHelper.Lerp(alphaChannelMultiplier, 0.5f, 0.5f); + break; + case "Crowno": + Luminosity = MathHelper.Lerp(0.25f, 0.4f, Utils.Turn01ToCyclic010(Hue)); + Hue = MathHelper.Lerp(0.7055556f, 0.7833334f, Utils.Turn01ToCyclic010(Hue)); + alphaChannelMultiplier = MathHelper.Lerp(alphaChannelMultiplier, 0.5f, 0.5f); + break; + case "Darthkitten": + Hue = 1f; + Luminosity = MathHelper.Lerp(1f, 0.4f, (float) (Math.Cos((double) num * 6.28318548202515) * 0.5 + 0.5)); + break; + case "Discipile": + Hue = MathHelper.Lerp(0.1f, 0.15f, Utils.Turn01ToCyclic010(Hue)); + Luminosity = 0.5f; + break; + case "Doylee": + Hue = MathHelper.Lerp(0.68f, 1f, Utils.Turn01ToCyclic010(Hue)); + Luminosity = 0.5f; + alphaChannelMultiplier = MathHelper.Lerp(alphaChannelMultiplier, 0.6f, 0.5f); + break; + case "Ghostar": + Hue = 0.66f; + Luminosity = MathHelper.Lerp(0.15f, 0.85f, (float) (Math.Cos((double) num * 6.28318548202515) * 0.5 + 0.5)); + break; + case "Grox The Great": + Hue = MathHelper.Lerp(0.31f, 0.5f, Utils.Turn01ToCyclic010(Hue)); + Luminosity = 0.5f; + alphaChannelMultiplier = MathHelper.Lerp(alphaChannelMultiplier, 1f, 0.8f); + break; + case "Jaxrud": + Hue = MathHelper.Lerp(0.1805556f, 0.4361111f, Utils.Turn01ToCyclic010(Hue)); + Luminosity = 0.5f; + break; + case "Jenosis": + Hue = MathHelper.Lerp(0.9f, 1.13f, Utils.Turn01ToCyclic010(Hue)) % 1f; + Luminosity = 0.5f; + alphaChannelMultiplier = MathHelper.Lerp(alphaChannelMultiplier, 0.5f, 0.5f); + break; + case "Kazzymodus": + Hue = 0.33f; + Luminosity = MathHelper.Lerp(0.15f, 0.4f, (float) (Math.Cos((double) num * 6.28318548202515) * 0.5 + 0.5)); + break; + case "Khaios": + Hue = 0.33f; + Luminosity = MathHelper.Lerp(0.0f, 0.2f, (float) (Math.Cos((double) num * 6.28318548202515) * 0.5 + 0.5)); + break; + case "Lazure": + Hue = MathHelper.Lerp(0.5333334f, 0.9222222f, Utils.Turn01ToCyclic010(Hue)); + Luminosity = 0.5f; + break; + case "Leinfors": + Hue = MathHelper.Lerp(0.7f, 0.77f, Utils.Turn01ToCyclic010(Hue)); + Luminosity = 0.5f; + break; + case "Loki": + Hue = 0.0f; + Luminosity = MathHelper.Lerp(0.0f, 0.25f, (float) (Math.Cos((double) num * 6.28318548202515) * 0.5 + 0.5)); + break; + case "ManaUser": + Hue = MathHelper.Lerp(0.41f, 0.57f, Utils.Turn01ToCyclic010(Hue)); + Luminosity = 0.5f; + break; + case "Mid": + Hue = 0.0f; + Luminosity = MathHelper.Lerp(0.0f, 0.9f, (float) (Math.Cos((double) num * 6.28318548202515) * 0.5 + 0.5)); + break; + case "Nike Leon": + Hue = MathHelper.Lerp(0.04f, 0.1f, Utils.Turn01ToCyclic010(Hue)); + Luminosity = 0.5f; + alphaChannelMultiplier = MathHelper.Lerp(alphaChannelMultiplier, 0.5f, 0.5f); + break; + case "RBrandon": + Hue = 0.03f; + Luminosity = 0.3f; + alphaChannelMultiplier = MathHelper.Lerp(alphaChannelMultiplier, 0.6f, 0.5f); + break; + case "Redigit": + Hue = 0.7f; + Luminosity = 0.5f; + break; + case "Serenity": + Hue = 0.85f; + Luminosity = MathHelper.Lerp(1f, 0.5f, (float) (Math.Cos((double) num * 6.28318548202515) * 0.5 + 0.5)); + break; + case "Sigma": + Hue = MathHelper.Lerp(0.0f, 0.12f, Utils.Turn01ToCyclic010(Hue)); + Luminosity = 0.5f; + alphaChannelMultiplier = MathHelper.Lerp(alphaChannelMultiplier, 0.6f, 0.5f); + break; + case "Unit One": + Color color2 = Color.Lerp(Color.Yellow, Color.Blue, MathHelper.SmoothStep(0.0f, 1f, Utils.PingPongFrom01To010(Hue))); + if ((double) lerpToWhite != 0.0) + color2 = Color.Lerp(color2, Color.White, lerpToWhite); + color2.A = (byte) ((double) color2.A * (double) alphaChannelMultiplier); + return color2; + case "Vulpes Inculta": + Hue = MathHelper.Lerp(0.65f, 0.75f, Utils.Turn01ToCyclic010(Hue)); + Luminosity = 0.5f; + alphaChannelMultiplier = MathHelper.Lerp(alphaChannelMultiplier, 0.5f, 0.5f); + break; + case "Waze3174": + Hue = MathHelper.Lerp(0.33f, 0.0f, Utils.Turn01ToCyclic010(Hue)); + Luminosity = 0.3f; + alphaChannelMultiplier = MathHelper.Lerp(alphaChannelMultiplier, 0.6f, 0.5f); + break; + case "Xman101": + Hue = 0.06f; + Luminosity = MathHelper.Lerp(0.0f, 0.5f, (float) (Math.Cos((double) num * 6.28318548202515) * 0.5 + 0.5)); + break; + case "Yoraiz0r": + Hue = MathHelper.Lerp(0.9f, 0.95f, Utils.Turn01ToCyclic010(Hue)); + Luminosity = 0.5f; + break; + case "Zoomo": + Hue = 0.77f; + Luminosity = 0.5f; + alphaChannelMultiplier = MathHelper.Lerp(alphaChannelMultiplier, 0.6f, 0.5f); + break; + case "darthmorf": + Hue = 0.0f; + Luminosity = MathHelper.Lerp(0.0f, 0.2f, (float) (Math.Cos((double) num * 6.28318548202515) * 0.5 + 0.5)); + break; + case "ppowersteef": + Hue = MathHelper.Lerp(0.0f, 0.15f, Utils.Turn01ToCyclic010(Hue)); + Luminosity = 0.5f; + alphaChannelMultiplier = MathHelper.Lerp(alphaChannelMultiplier, 0.6f, 0.5f); + break; + } + } + Color color3 = Main.hslToRgb(Hue, Saturation, Luminosity) * this.Opacity; + if ((double) lerpToWhite != 0.0) + color3 = Color.Lerp(color3, Color.White, lerpToWhite); + color3.A = (byte) ((double) color3.A * (double) alphaChannelMultiplier); + return color3; + } + + public float GetLastPrismHue( + float laserIndex, + ref float laserLuminance, + ref float laserAlphaMultiplier) + { + if (Main.player[this.owner].active) + { + double forVisualEffects = Main.timeForVisualEffects; + switch (Main.player[this.owner].name) + { + case "Acamaeda": + return (float) (0.180000007152557 + Math.Cos(forVisualEffects / 90.0 * 6.28318548202515) * 0.100000001490116); + case "Aeroblop": + return (float) (0.25 + Math.Cos(forVisualEffects / 180.0 * 6.28318548202515) * 0.100000001490116); + case "Alchemystics": + return (float) (0.730000019073486 + Math.Cos(forVisualEffects / 180.0 * 6.28318548202515) * 0.180000007152557); + case "Antithesis": + laserLuminance = 0.25f; + laserAlphaMultiplier = 0.4f; + return (float) (0.699999988079071 + Math.Cos(forVisualEffects / 180.0 * 6.28318548202515) * 0.0500000007450581); + case "Arkhalis": + case "Darkhalis": + return (float) (0.75 + Math.Cos(forVisualEffects / 180.0 * 6.28318548202515) * 0.0700000002980232); + case "Aurora3500": + laserLuminance = MathHelper.Lerp(0.0f, 0.5f, Utils.GetLerpValue(-1f, 1f, (float) Math.Cos(forVisualEffects / 105.0 * 6.28318548202515), false)); + laserAlphaMultiplier = 0.25f; + return 0.35f; + case "Cenx": + return Main.rgbToHsl(Color.Lerp(new Color(0.3f, 1f, 0.2f), Color.HotPink, MathHelper.SmoothStep(0.0f, 1f, MathHelper.SmoothStep(0.0f, 1f, Utils.PingPongFrom01To010(laserIndex / 6f))))).X; + case "Criddle": + return (float) (0.910000026226044 + Math.Cos(forVisualEffects / 180.0 * 6.28318548202515) * 0.189999997615814); + case "Crowno": + laserLuminance = MathHelper.Lerp(0.25f, 0.4f, Utils.GetLerpValue(-1f, 1f, (float) Math.Cos(forVisualEffects / 105.0 * 6.28318548202515), false)); + laserAlphaMultiplier = 0.5f; + return MathHelper.Lerp(0.7055556f, 0.7833334f, Utils.Turn01ToCyclic010(laserIndex / 6f)); + case "Darthkitten": + laserLuminance = MathHelper.Lerp(0.4f, 0.9f, Utils.GetLerpValue(-1f, 1f, (float) Math.Cos(forVisualEffects / 120.0 * 6.28318548202515), false)); + laserAlphaMultiplier = 0.3f; + return 1f; + case "Devalaous": + return (float) (0.660000026226044 + Math.Cos(forVisualEffects / 180.0 * 6.28318548202515) * 0.100000001490116); + case "Discipile": + laserLuminance = MathHelper.Lerp(0.0f, 0.4f, Utils.GetLerpValue(-1f, 1f, (float) Math.Cos(forVisualEffects / 105.0 * 6.28318548202515), false)); + laserAlphaMultiplier = 0.35f; + return 0.55f; + case "Doylee": + return (float) (0.839999973773956 + Math.Cos(forVisualEffects / 90.0 * 6.28318548202515) * 0.159999996423721); + case "Ghostar": + laserLuminance = MathHelper.Lerp(0.4f, 0.7f, Utils.GetLerpValue(-1f, 1f, (float) Math.Cos(forVisualEffects / 120.0 * 6.28318548202515), false)); + laserAlphaMultiplier = 0.3f; + return 0.66f; + case "Grox The Great": + return (float) (0.409999996423721 + Math.Cos(forVisualEffects / 120.0 * 6.28318548202515) * 0.100000001490116); + case "Jaxrud": + return MathHelper.Lerp(0.1805556f, 0.4361111f, Utils.Turn01ToCyclic010(laserIndex / 6f)); + case "Jenosis": + return (float) (0.660000026226044 + Math.Cos(forVisualEffects / 180.0 * 6.28318548202515) * 0.0799999982118607); + case "Kazzymodus": + laserLuminance = MathHelper.Lerp(0.6f, 0.8f, Utils.GetLerpValue(-1f, 1f, (float) Math.Cos(forVisualEffects / 90.0 * 6.28318548202515), false)); + laserAlphaMultiplier = 0.3f; + return 0.33f; + case "Khaios": + laserLuminance = MathHelper.Lerp(0.0f, 0.1f, Utils.GetLerpValue(-1f, 1f, (float) Math.Cos(forVisualEffects / 105.0 * 6.28318548202515), false)); + laserAlphaMultiplier = 0.25f; + return 0.35f; + case "Lazure": + return MathHelper.Lerp(0.5333334f, 0.9222222f, Utils.Turn01ToCyclic010(laserIndex / 6f)); + case "Leinfors": + return (float) (0.730000019073486 + Math.Cos(forVisualEffects / 3.0 * 6.28318548202515) * 0.0299999993294477); + case "Loki": + laserLuminance = MathHelper.Lerp(0.0f, 0.3f, Utils.GetLerpValue(-1f, 1f, (float) Math.Cos(forVisualEffects / 5.0 * 6.28318548202515), false)); + laserAlphaMultiplier = 0.4f; + return 0.0f; + case "ManaUser": + return (float) (0.490000009536743 + Math.Cos(forVisualEffects / 140.0 * 6.28318548202515) * 0.0799999982118607); + case "Mid": + laserLuminance = 0.25f; + laserAlphaMultiplier = 0.4f; + return (float) (0.860000014305115 + Math.Cos(forVisualEffects / 270.0 * 6.28318548202515) * 0.129999995231628); + case "Nike Leon": + return (float) (0.0700000002980232 + Math.Cos(forVisualEffects / 180.0 * 6.28318548202515) * 0.0399999991059303); + case "RBrandon": + laserLuminance = MathHelper.Lerp(0.0f, 0.5f, Utils.GetLerpValue(-1f, 1f, (float) Math.Cos(forVisualEffects / 105.0 * 6.28318548202515), false)); + laserAlphaMultiplier = 0.4f; + return 1f; + case "Random": + return Main.rand.NextFloat(); + case "Redigit": + return 0.7f; + case "Serenity": + laserLuminance = MathHelper.Lerp(0.9f, 0.65f, Utils.GetLerpValue(-1f, 1f, (float) Math.Cos(forVisualEffects / 120.0 * 6.28318548202515), false)); + laserAlphaMultiplier = 0.3f; + return 0.85f; + case "Sigma": + return (float) (0.0599999986588955 + Math.Cos(forVisualEffects / 180.0 * 6.28318548202515) * 0.0599999986588955); + case "Suweeka": + return (float) (0.5 + Math.Cos(forVisualEffects / 180.0 * 6.28318548202515) * 0.180000007152557); + case "Tsuki": + case "Yoraiz0r": + return 0.92f; + case "Unit One": + return (float) (0.379999995231628 + Math.Cos(forVisualEffects / 90.0 * 6.28318548202515) * 0.239999994635582); + case "Vulpes Inculta": + return (float) (0.699999988079071 + Math.Cos(forVisualEffects / 180.0 * 6.28318548202515) * 0.0500000007450581); + case "W1K": + return (float) (0.75 + Math.Cos(forVisualEffects / 120.0 * 6.28318548202515) * 0.0500000007450581); + case "Waze3174": + return (float) (0.379999995231628 + Math.Cos(forVisualEffects / 90.0 * 6.28318548202515) * 0.239999994635582); + case "Xman101": + laserLuminance = MathHelper.Lerp(0.9f, 0.55f, Utils.GetLerpValue(-1f, 1f, (float) Math.Cos(forVisualEffects / 120.0 * 6.28318548202515), false)); + laserAlphaMultiplier = 0.2f; + return 0.33f; + case "Zoomo": + return 0.77f; + case "darthmorf": + laserLuminance = MathHelper.Lerp(0.0f, 0.2f, Utils.GetLerpValue(-1f, 1f, (float) Math.Cos(forVisualEffects / 105.0 * 6.28318548202515), false)); + laserAlphaMultiplier = 0.4f; + return 0.0f; + case "ppowersteef": + laserLuminance = MathHelper.Lerp(0.1f, 0.5f, Utils.GetLerpValue(-1f, 1f, (float) Math.Cos(forVisualEffects / 105.0 * 6.28318548202515), false)); + laserAlphaMultiplier = 0.25f; + return 0.6f; + } + } + return (float) (int) laserIndex / 6f; + } + + public static int GetByUUID(int owner, float uuid) => Projectile.GetByUUID(owner, (int) uuid); + + public static int GetByUUID(int owner, int uuid) + { + if (uuid < 0 || uuid >= 1000 || owner < 0 || owner >= (int) byte.MaxValue) + return -1; + int index = Main.projectileIdentity[owner, uuid]; + return index >= 0 && Main.projectile[index].active ? index : -1; + } + + public void ProjectileFixDesperation() + { + if (this.owner < 0 || this.owner >= 1000) + return; + switch (this.type) + { + case 461: + case 632: + case 642: + case 644: + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].owner == this.owner && (double) Main.projectile[index].identity == (double) this.ai[1] && Main.projectile[index].active) + { + this.ai[1] = (float) index; + break; + } + } + break; + } + } + + public bool ShouldUseWindPhysics() + { + if (Main.windPhysics) + { + bool? nullable = ProjectileID.Sets.WindPhysicsImmunity[this.type]; + if (nullable.HasValue) + return !nullable.Value; + int aiStyle = this.aiStyle; + if (aiStyle <= 17) + { + if (aiStyle <= 8) + { + if ((uint) (aiStyle - 1) > 1U && aiStyle != 8) + goto label_12; + } + else if (aiStyle != 10 && aiStyle != 14 && (uint) (aiStyle - 16) > 1U) + goto label_12; + } + else if (aiStyle <= 72) + { + switch (aiStyle - 21) + { + case 0: + case 3: + case 7: + case 8: + case 11: + case 12: + case 13: + case 14: + break; + case 1: + case 2: + case 4: + case 5: + case 6: + case 9: + case 10: + goto label_12; + default: + if (aiStyle == 49 || aiStyle == 72) + break; + goto label_12; + } + } + else if (aiStyle != 93 && aiStyle != 96 && aiStyle != 106) + goto label_12; + return true; + } +label_12: + return false; + } + + private void AI_151_SuperStar() + { + this.alpha -= 10; + int num = 100; + if (this.alpha < num) + this.alpha = num; + if (this.soundDelay == 0) + { + this.soundDelay = 20 + Main.rand.Next(40); + SoundEngine.PlaySound(SoundID.Item9, this.position); + } + this.rotation += (float) (((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y)) * 0.00499999988824129) * (float) this.direction; + Vector2 vector2 = new Vector2((float) Main.screenWidth, (float) Main.screenHeight); + if (this.Hitbox.Intersects(Utils.CenteredRectangle(Main.screenPosition + vector2 / 2f, vector2 + new Vector2(400f))) && Main.rand.Next(6) == 0) + Gore.NewGore(this.position, this.velocity * 0.2f, Utils.SelectRandom(Main.rand, 16, 17, 17, 17)); + for (int index = 0; index < 2; ++index) + { + if (Main.rand.Next(8) == 0) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 228, Alpha: ((int) sbyte.MaxValue)); + dust.velocity *= 0.25f; + dust.scale = 1.3f; + dust.noGravity = true; + dust.velocity += this.velocity.RotatedBy(0.392699092626572 * (1.0 - (double) (2 * index))) * 0.2f; + } + } + } + + public bool IsInterruptible(Player player) => this.aiStyle == 160; + + public void Interrupt(Player player) + { + if (this.aiStyle != 160) + return; + this.Kill(); + player.heldProj = -1; + player.itemAnimation = 0; + player.itemTime = 0; + } + + private void AI_152_SuperStarSlash() + { + this.alpha -= 10; + int num = 100; + if (this.alpha < num) + this.alpha = num; + if (this.soundDelay == 0) + { + this.soundDelay = 20 + Main.rand.Next(40); + SoundEngine.PlaySound(SoundID.Item9, this.position); + } + this.rotation = this.velocity.ToRotation() + 1.570796f; + this.tileCollide = false; + } + + private void Resize(int newWidth, int newHeight) + { + this.position = this.Center; + this.width = newWidth; + this.height = newHeight; + this.Center = this.position; + } + + public void AI() + { + // ISSUE: The method is too long to display (70257 instructions) + } + + private void AI_184_BadTorchLuck() + { + this.owner = (int) byte.MaxValue; + if (Main.player[Main.myPlayer].unlockedBiomeTorches) + this.damage = 0; + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + SoundEngine.PlaySound(SoundID.Item8, this.Center); + } + if ((double) this.ai[1] > 0.0) + this.ai[1] -= this.velocity.Length(); + else + this.tileCollide = true; + int Type = (int) this.ai[0]; + float num1 = 4f; + for (float num2 = 0.0f; (double) num2 < (double) num1; ++num2) + { + int index = Dust.NewDust(this.position + this.velocity / num1 * num2, 4, 4, Type, Alpha: 100); + if (Main.rand.Next(3) != 0) + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.3f; + if (Type == 66) + { + Main.dust[index].color = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB); + Main.dust[index].noGravity = true; + } + } + } + + private void AI_121_StardustDragon() + { + Player player = Main.player[this.owner]; + if ((int) Main.timeForVisualEffects % 120 == 0) + this.netUpdate = true; + if (!player.active) + { + this.active = false; + } + else + { + int num1 = this.type == 625 ? 1 : 0; + bool flag1 = this.type == 625 || this.type == 626 || this.type == 627 || this.type == 628; + int num2 = 10; + if (flag1) + { + if (player.dead) + player.stardustDragon = false; + if (player.stardustDragon) + this.timeLeft = 2; + num2 = 30; + if (Main.rand.Next(30) == 0) + { + int index = Dust.NewDust(this.position, this.width, this.height, 135, Scale: 2f); + Main.dust[index].noGravity = true; + Main.dust[index].fadeIn = 2f; + Point tileCoordinates = Main.dust[index].position.ToTileCoordinates(); + if (WorldGen.InWorld(tileCoordinates.X, tileCoordinates.Y, 5) && WorldGen.SolidTile(tileCoordinates.X, tileCoordinates.Y)) + Main.dust[index].noLight = true; + } + } + if (num1 != 0) + { + Vector2 center = player.Center; + float num3 = 700f; + float num4 = 1000f; + int index1 = -1; + if ((double) this.Distance(center) > 2000.0) + { + this.Center = center; + this.netUpdate = true; + } + if (true) + { + NPC minionAttackTargetNpc = this.OwnerMinionAttackTargetNPC; + if (minionAttackTargetNpc != null && minionAttackTargetNpc.CanBeChasedBy((object) this) && (double) this.Distance(minionAttackTargetNpc.Center) < (double) num3 * 2.0) + { + index1 = minionAttackTargetNpc.whoAmI; + if (minionAttackTargetNpc.boss) + { + int whoAmI1 = minionAttackTargetNpc.whoAmI; + } + else + { + int whoAmI2 = minionAttackTargetNpc.whoAmI; + } + } + if (index1 < 0) + { + for (int index2 = 0; index2 < 200; ++index2) + { + NPC npc = Main.npc[index2]; + if (npc.CanBeChasedBy((object) this) && (double) player.Distance(npc.Center) < (double) num4 && (double) this.Distance(npc.Center) < (double) num3) + { + index1 = index2; + int num5 = npc.boss ? 1 : 0; + } + } + } + } + if (index1 != -1) + { + NPC npc = Main.npc[index1]; + Vector2 vector2 = npc.Center - this.Center; + ((double) vector2.X > 0.0).ToDirectionInt(); + ((double) vector2.Y > 0.0).ToDirectionInt(); + float num6 = 0.4f; + if ((double) vector2.Length() < 600.0) + num6 = 0.6f; + if ((double) vector2.Length() < 300.0) + num6 = 0.8f; + if ((double) vector2.Length() > (double) npc.Size.Length() * 0.75) + { + this.velocity = this.velocity + Vector2.Normalize(vector2) * num6 * 1.5f; + if ((double) Vector2.Dot(this.velocity, vector2) < 0.25) + this.velocity = this.velocity * 0.8f; + } + float num7 = 30f; + if ((double) this.velocity.Length() > (double) num7) + this.velocity = Vector2.Normalize(this.velocity) * num7; + } + else + { + float num8 = 0.2f; + Vector2 vector2 = center - this.Center; + if ((double) vector2.Length() < 200.0) + num8 = 0.12f; + if ((double) vector2.Length() < 140.0) + num8 = 0.06f; + if ((double) vector2.Length() > 100.0) + { + if ((double) Math.Abs(center.X - this.Center.X) > 20.0) + this.velocity.X += num8 * (float) Math.Sign(center.X - this.Center.X); + if ((double) Math.Abs(center.Y - this.Center.Y) > 10.0) + this.velocity.Y += num8 * (float) Math.Sign(center.Y - this.Center.Y); + } + else if ((double) this.velocity.Length() > 2.0) + this.velocity = this.velocity * 0.96f; + if ((double) Math.Abs(this.velocity.Y) < 1.0) + this.velocity.Y -= 0.1f; + float num9 = 15f; + if ((double) this.velocity.Length() > (double) num9) + this.velocity = Vector2.Normalize(this.velocity) * num9; + } + this.rotation = this.velocity.ToRotation() + 1.570796f; + int direction1 = this.direction; + this.direction = this.spriteDirection = (double) this.velocity.X > 0.0 ? 1 : -1; + int direction2 = this.direction; + if (direction1 != direction2) + this.netUpdate = true; + float num10 = MathHelper.Clamp(this.localAI[0], 0.0f, 50f); + this.position = this.Center; + this.scale = (float) (1.0 + (double) num10 * 0.00999999977648258); + this.width = this.height = (int) ((double) num2 * (double) this.scale); + this.Center = this.position; + if (this.alpha > 0) + { + for (int index3 = 0; index3 < 2; ++index3) + { + int index4 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 135, Alpha: 100, Scale: 2f); + Main.dust[index4].noGravity = true; + Main.dust[index4].noLight = true; + } + this.alpha -= 42; + if (this.alpha < 0) + this.alpha = 0; + } + } + else + { + bool flag2 = false; + Vector2 vector2_1 = Vector2.Zero; + Vector2 zero = Vector2.Zero; + float num11 = 0.0f; + float num12 = 0.0f; + float num13 = 1f; + if ((double) this.ai[1] == 1.0) + { + this.ai[1] = 0.0f; + this.netUpdate = true; + } + int byUuid = Projectile.GetByUUID(this.owner, (int) this.ai[0]); + if (Main.projectile.IndexInRange(byUuid)) + { + Projectile projectile = Main.projectile[byUuid]; + if (flag1 && projectile.active && (projectile.type == 625 || projectile.type == 626 || projectile.type == 627)) + { + flag2 = true; + vector2_1 = projectile.Center; + Vector2 velocity = projectile.velocity; + num11 = projectile.rotation; + num13 = MathHelper.Clamp(projectile.scale, 0.0f, 50f); + num12 = 16f; + int alpha = projectile.alpha; + projectile.localAI[0] = this.localAI[0] + 1f; + if (projectile.type != 625) + projectile.localAI[1] = (float) this.whoAmI; + if (this.owner == Main.myPlayer && this.type == 628 && projectile.type == 625) + { + projectile.Kill(); + this.Kill(); + return; + } + } + } + if (!flag2) + { + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && projectile.owner == this.owner && ProjectileID.Sets.StardustDragon[projectile.type] && (double) projectile.localAI[1] == (double) this.ai[0]) + { + this.ai[0] = (float) projectile.projUUID; + projectile.localAI[1] = (float) this.whoAmI; + this.netUpdate = true; + } + } + return; + } + if (this.alpha > 0) + { + for (int index5 = 0; index5 < 2; ++index5) + { + int index6 = Dust.NewDust(this.position, this.width, this.height, 135, Alpha: 100, Scale: 2f); + Main.dust[index6].noGravity = true; + Main.dust[index6].noLight = true; + } + } + this.alpha -= 42; + if (this.alpha < 0) + this.alpha = 0; + this.velocity = Vector2.Zero; + Vector2 vector2_2 = vector2_1 - this.Center; + if ((double) num11 != (double) this.rotation) + { + float num14 = MathHelper.WrapAngle(num11 - this.rotation); + vector2_2 = vector2_2.RotatedBy((double) num14 * 0.100000001490116); + } + this.rotation = vector2_2.ToRotation() + 1.570796f; + this.position = this.Center; + this.scale = num13; + this.width = this.height = (int) ((double) num2 * (double) this.scale); + this.Center = this.position; + if (vector2_2 != Vector2.Zero) + this.Center = vector2_1 - Vector2.Normalize(vector2_2) * num12 * num13; + this.spriteDirection = (double) vector2_2.X > 0.0 ? 1 : -1; + } + this.position.X = MathHelper.Clamp(this.position.X, 160f, (float) (Main.maxTilesX * 16 - 160)); + this.position.Y = MathHelper.Clamp(this.position.Y, 160f, (float) (Main.maxTilesY * 16 - 160)); + } + } + + private Projectile FindStardustDragonHeadOfOwner() + { + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && projectile.owner == this.owner && projectile.type == 625) + return projectile; + } + return (Projectile) null; + } + + private void AI_183_ZoologistStrike() + { + this.velocity.X *= 0.2f; + this.velocity.Y = 0.0f; + this.spriteDirection = this.direction = 1; + if ((double) this.velocity.X < 0.0) + this.spriteDirection = this.direction = -1; + ++this.frame; + if (this.frame < Main.projFrames[this.type]) + return; + this.frame = Main.projFrames[this.type] - 1; + } + + private void AI_182_FinalFractal() + { + Player player = Main.player[this.owner]; + Vector2 mountedCenter = player.MountedCenter; + float lerpValue1 = Utils.GetLerpValue(900f, 0.0f, this.velocity.Length() * 2f, true); + this.localAI[0] += MathHelper.Lerp(0.7f, 2f, lerpValue1); + if ((double) this.localAI[0] >= 120.0) + { + this.Kill(); + } + else + { + float lerpValue2 = Utils.GetLerpValue(0.0f, 1f, this.localAI[0] / 60f, true); + double num1 = (double) this.localAI[0] / 60.0; + float num2 = this.ai[0]; + float rotation = this.velocity.ToRotation(); + float num3 = 3.141593f; + float num4 = (double) this.velocity.X > 0.0 ? 1f : -1f; + float num5 = num3 + (float) ((double) num4 * (double) lerpValue2 * 6.28318548202515); + float x = this.velocity.Length() + Utils.GetLerpValue(0.5f, 1f, lerpValue2, true) * 40f; + float num6 = 60f; + if ((double) x < (double) num6) + x = num6; + Vector2 vector2_1 = mountedCenter + this.velocity + (new Vector2(1f, 0.0f).RotatedBy((double) num5) * new Vector2(x, num2 * MathHelper.Lerp(2f, 1f, lerpValue1))).RotatedBy((double) rotation); + Vector2 vector2_2 = (1f - Utils.GetLerpValue(0.0f, 0.5f, lerpValue2, true)) * new Vector2((float) (((double) this.velocity.X > 0.0 ? 1.0 : -1.0) * -(double) x * 0.100000001490116), (float) (-(double) this.ai[0] * 0.300000011920929)); + this.rotation = num5 + rotation + 1.570796f; + this.Center = vector2_1 + vector2_2; + this.spriteDirection = this.direction = (double) this.velocity.X > 0.0 ? 1 : -1; + if ((double) num2 < 0.0) + { + this.rotation = num3 + (float) ((double) num4 * (double) lerpValue2 * -6.28318548202515) + rotation; + this.rotation += 1.570796f; + this.spriteDirection = this.direction = (double) this.velocity.X > 0.0 ? -1 : 1; + } + if (num1 < 1.0) + { + FinalFractalHelper.FinalFractalProfile finalFractalProfile = FinalFractalHelper.GetFinalFractalProfile((int) this.ai[1]); + Vector2 rotationVector2 = (this.rotation - 1.570796f).ToRotationVector2(); + Vector2 center = this.Center; + int num7 = (int) ((double) (1 + (int) ((double) this.velocity.Length() / 100.0)) * (double) Utils.GetLerpValue(0.0f, 0.5f, lerpValue2, true) * (double) Utils.GetLerpValue(1f, 0.5f, lerpValue2, true)); + if (num7 < 1) + num7 = 1; + for (int index = 0; index < num7; ++index) + finalFractalProfile.dustMethod(center + rotationVector2 * finalFractalProfile.trailWidth * MathHelper.Lerp(0.5f, 1f, Main.rand.NextFloat()), (float) ((double) this.rotation - 1.57079637050629 + 1.57079637050629 * (double) this.spriteDirection), player.velocity); + Vector3 vector3_1 = finalFractalProfile.trailColor.ToVector3(); + Vector3 vector3_2 = Vector3.Lerp(Vector3.One, vector3_1, 0.7f); + Lighting.AddLight(this.Center, vector3_1 * 0.5f * this.Opacity); + Lighting.AddLight(mountedCenter, vector3_2 * this.Opacity * 0.15f); + } + this.Opacity = Utils.GetLerpValue(0.0f, 5f, this.localAI[0], true) * Utils.GetLerpValue(120f, 115f, this.localAI[0], true); + } + } + + private void AI_181_FairyQueenRangedItemShot() + { + ++this.ai[0]; + this.alpha = (int) MathHelper.Lerp((float) byte.MaxValue, 0.0f, Utils.GetLerpValue(0.0f, 10f, this.ai[0], true)); + this.rotation = this.velocity.ToRotation(); + if (Main.rand.Next(6) != 0) + return; + Dust dust = Dust.NewDustPerfect(this.Center, 267); + dust.fadeIn = 1f; + dust.noGravity = true; + dust.alpha = 100; + dust.color = this.GetFairyQueenWeaponsColor(lerpToWhite: (Main.rand.NextFloat() * 0.4f)); + dust.noLightEmittence = true; + dust.scale *= 1.5f; + } + + private void AI_009_MagicMissiles() + { + if (this.type == 491) + { + this.AI_009_MagicMissiles_Old(); + } + else + { + int num1 = 32; + Player player = Main.player[this.owner]; + int num2 = Main.maxTilesY * 16; + int num3 = 0; + if ((double) this.ai[0] >= 0.0) + num3 = (int) ((double) this.ai[1] / (double) num2); + bool flag1 = (double) this.ai[0] == -1.0 || (double) this.ai[0] == -2.0; + if (this.type == 34) + { + if (this.frameCounter++ >= 4) + { + this.frameCounter = 0; + if (++this.frame >= Main.projFrames[this.type]) + this.frame = 0; + } + if (this.penetrate == 1 && (double) this.ai[0] >= 0.0 && num3 == 0) + { + this.ai[1] += (float) num2; + num3 = 1; + this.netUpdate = true; + } + if (this.penetrate == 1 && (double) this.ai[0] == -1.0) + { + this.ai[0] = -2f; + this.netUpdate = true; + } + if (num3 > 0 || (double) this.ai[0] == -2.0) + ++this.localAI[0]; + } + if (this.owner == Main.myPlayer) + { + if ((double) this.ai[0] >= 0.0) + { + if (player.channel) + { + Vector2 mouseWorld = Main.MouseWorld; + if ((double) this.ai[0] != (double) mouseWorld.X || (double) this.ai[1] != (double) mouseWorld.Y) + { + this.netUpdate = true; + this.ai[0] = mouseWorld.X; + this.ai[1] = mouseWorld.Y + (float) (num2 * num3); + } + } + else + { + this.netUpdate = true; + this.ai[0] = -1f; + this.ai[1] = -1f; + int targetWithLineOfSight = this.FindTargetWithLineOfSight(); + if (targetWithLineOfSight != -1) + this.ai[1] = (float) targetWithLineOfSight; + else if ((double) this.velocity.Length() < 2.0) + this.velocity = this.DirectionFrom(player.Center) * (float) num1; + else + this.velocity = this.velocity.SafeNormalize(Vector2.Zero) * (float) num1; + } + } + if (flag1 && (double) this.ai[1] == -1.0) + { + int targetWithLineOfSight = this.FindTargetWithLineOfSight(); + if (targetWithLineOfSight != -1) + { + this.ai[1] = (float) targetWithLineOfSight; + this.netUpdate = true; + } + } + } + Vector2? nullable = new Vector2?(); + float amount = 1f; + if ((double) this.ai[0] > 0.0 && (double) this.ai[1] > 0.0) + nullable = new Vector2?(new Vector2(this.ai[0], this.ai[1] % (float) num2)); + if (flag1 && (double) this.ai[1] >= 0.0) + { + int index = (int) this.ai[1]; + if (Main.npc.IndexInRange(index)) + { + NPC npc = Main.npc[index]; + if (npc.CanBeChasedBy((object) this)) + { + nullable = new Vector2?(npc.Center); + float t = this.Distance(nullable.Value); + amount = MathHelper.Lerp(0.0f, 0.2f, Utils.GetLerpValue(200f, 20f, 1f - Utils.GetLerpValue(0.0f, 100f, t, true) * Utils.GetLerpValue(600f, 400f, t, true), true)); + } + else + { + this.ai[1] = -1f; + this.netUpdate = true; + } + } + } + bool flag2 = false; + if (flag1) + flag2 = true; + if (nullable.HasValue) + { + Vector2 Other = nullable.Value; + if ((double) this.Distance(Other) >= 64.0) + { + flag2 = true; + Vector2 v = Other - this.Center; + Vector2 vector2 = v.SafeNormalize(Vector2.Zero) * Math.Min((float) num1, v.Length()); + if ((double) this.velocity.Length() < 4.0) + this.velocity = this.velocity + this.velocity.SafeNormalize(Vector2.Zero).RotatedBy(0.785398185253143).SafeNormalize(Vector2.Zero) * 4f; + if (this.velocity.HasNaNs()) + this.Kill(); + this.velocity = Vector2.Lerp(this.velocity, vector2, amount); + } + else + { + this.velocity = this.velocity * 0.3f; + this.velocity = this.velocity + (Other - this.Center) * 0.3f; + flag2 = (double) this.velocity.Length() >= 2.0; + } + if (this.timeLeft < 60) + this.timeLeft = 60; + } + if (flag1 && (double) this.ai[1] < 0.0) + { + if ((double) this.velocity.Length() != (double) num1) + this.velocity = this.velocity.MoveTowards(this.velocity.SafeNormalize(Vector2.UnitY) * (float) num1, 4f); + if (this.timeLeft > 300) + this.timeLeft = 300; + } + this.rotation = !flag2 || !(this.velocity != Vector2.Zero) ? this.rotation.AngleLerp(0.0f, 0.2f) : this.rotation.AngleTowards(this.velocity.ToRotation(), 0.7853982f); + bool flag3 = (double) this.velocity.Length() > 0.100000001490116 && (double) Vector2.Dot(this.oldVelocity.SafeNormalize(Vector2.Zero), this.velocity.SafeNormalize(Vector2.Zero)) < 0.200000002980232; + if (this.type == 16) + { + if (this.soundDelay == 0 && (double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) > 2.0) + { + this.soundDelay = 10; + SoundEngine.PlaySound(SoundID.Item9, this.position); + } + if (Main.rand.Next(9) == 0) + { + int index = Dust.NewDust(this.position, this.width, this.height, 15, Alpha: 100, Scale: 2f); + Main.dust[index].velocity *= 0.3f; + Main.dust[index].position.X = (float) ((double) this.position.X + (double) (this.width / 2) + 4.0) + (float) Main.rand.Next(-4, 5); + Main.dust[index].position.Y = this.position.Y + (float) (this.height / 2) + (float) Main.rand.Next(-4, 5); + Main.dust[index].noGravity = true; + Main.dust[index].velocity += Main.rand.NextVector2Circular(2f, 2f); + } + if (flag3) + { + int num4 = Main.rand.Next(2, 5); + for (int index = 0; index < num4; ++index) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 15, Alpha: 100, Scale: 1.5f); + dust.velocity *= 0.3f; + dust.position = this.Center; + dust.noGravity = true; + dust.velocity += Main.rand.NextVector2Circular(0.5f, 0.5f); + dust.fadeIn = 2.2f; + } + } + } + if (this.type != 34) + return; + float lerpValue = Utils.GetLerpValue(0.0f, 10f, this.localAI[0], true); + Color newColor = Color.Lerp(Color.Transparent, Color.Crimson, lerpValue); + if (Main.rand.Next(6) == 0) + { + Dust dust = Dust.NewDustDirect(this.Center, 0, 0, 6, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 100, newColor, 3.5f); + dust.noGravity = true; + dust.velocity *= 1.4f; + dust.velocity += Main.rand.NextVector2Circular(1f, 1f); + dust.velocity += this.velocity * 0.15f; + } + if (Main.rand.Next(12) == 0) + { + Dust dust = Dust.NewDustDirect(this.Center, 0, 0, 6, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 100, newColor, 1.5f); + dust.velocity += Main.rand.NextVector2Circular(1f, 1f); + dust.velocity += this.velocity * 0.15f; + } + if (!flag3) + return; + int num5 = Main.rand.Next(2, 5 + (int) ((double) lerpValue * 4.0)); + for (int index = 0; index < num5; ++index) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 6, Alpha: 100, newColor: newColor, Scale: 1.5f); + dust.velocity *= 0.3f; + dust.position = this.Center; + dust.noGravity = true; + dust.velocity += Main.rand.NextVector2Circular(0.5f, 0.5f); + dust.fadeIn = 2.2f; + dust.position += (dust.position - this.Center) * lerpValue * 10f; + } + } + } + + private void AI_009_MagicMissiles_Old() + { + if (Main.myPlayer == this.owner && (double) this.ai[0] <= 0.0) + { + if (Main.player[this.owner].channel) + { + float num1 = 12f; + if (this.type == 16) + num1 = 15f; + if (this.type == 491) + num1 = 20f; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num2 = (float) Main.mouseX + Main.screenPosition.X - vector2.X; + float num3 = (float) Main.mouseY + Main.screenPosition.Y - vector2.Y; + if ((double) Main.player[this.owner].gravDir == -1.0) + num3 = Main.screenPosition.Y + (float) Main.screenHeight - (float) Main.mouseY - vector2.Y; + float num4 = (float) Math.Sqrt((double) num2 * (double) num2 + (double) num3 * (double) num3); + if ((double) this.ai[0] < 0.0) + ++this.ai[0]; + if (this.type == 491 && (double) num4 < 100.0) + { + if ((double) this.velocity.Length() < (double) num1) + { + this.velocity = this.velocity * 1.1f; + if ((double) this.velocity.Length() > (double) num1) + { + this.velocity.Normalize(); + this.velocity = this.velocity * num1; + } + } + if ((double) this.ai[0] == 0.0) + this.ai[0] = -10f; + } + else if ((double) num4 > (double) num1) + { + float num5 = num1 / num4; + float x = num2 * num5; + float y = num3 * num5; + int num6 = (int) ((double) x * 1000.0); + int num7 = (int) ((double) this.velocity.X * 1000.0); + int num8 = (int) ((double) y * 1000.0); + int num9 = (int) ((double) this.velocity.Y * 1000.0); + int num10 = num7; + if (num6 != num10 || num8 != num9) + this.netUpdate = true; + if (this.type == 491) + { + this.velocity = (this.velocity * 4f + new Vector2(x, y)) / 5f; + } + else + { + this.velocity.X = x; + this.velocity.Y = y; + } + } + else + { + int num11 = (int) ((double) num2 * 1000.0); + int num12 = (int) ((double) this.velocity.X * 1000.0); + int num13 = (int) ((double) num3 * 1000.0); + int num14 = (int) ((double) this.velocity.Y * 1000.0); + int num15 = num12; + if (num11 != num15 || num13 != num14) + this.netUpdate = true; + this.velocity.X = num2; + this.velocity.Y = num3; + } + } + else if ((double) this.ai[0] <= 0.0) + { + this.netUpdate = true; + if (this.type != 491) + { + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num16 = (float) Main.mouseX + Main.screenPosition.X - vector2.X; + float num17 = (float) Main.mouseY + Main.screenPosition.Y - vector2.Y; + if ((double) Main.player[this.owner].gravDir == -1.0) + num17 = Main.screenPosition.Y + (float) Main.screenHeight - (float) Main.mouseY - vector2.Y; + float num18 = (float) Math.Sqrt((double) num16 * (double) num16 + (double) num17 * (double) num17); + if ((double) num18 == 0.0 || (double) this.ai[0] < 0.0) + { + vector2 = new Vector2(Main.player[this.owner].position.X + (float) (Main.player[this.owner].width / 2), Main.player[this.owner].position.Y + (float) (Main.player[this.owner].height / 2)); + num16 = this.position.X + (float) this.width * 0.5f - vector2.X; + num17 = this.position.Y + (float) this.height * 0.5f - vector2.Y; + num18 = (float) Math.Sqrt((double) num16 * (double) num16 + (double) num17 * (double) num17); + } + float num19 = (float) (12.0 / (double) num18); + float num20 = num16 * num19; + float num21 = num17 * num19; + this.velocity.X = num20; + this.velocity.Y = num21; + if ((double) this.velocity.X == 0.0 && (double) this.velocity.Y == 0.0) + this.Kill(); + } + this.ai[0] = 1f; + } + } + bool flag = false; + if (this.type == 491) + { + ++this.localAI[0]; + if ((double) this.ai[0] > 0.0 && (double) this.localAI[0] > 15.0) + { + this.tileCollide = false; + Vector2 vector2 = Main.player[this.owner].Center - this.Center; + if ((double) vector2.Length() < 20.0) + this.Kill(); + vector2.Normalize(); + this.velocity = (this.velocity * 5f + vector2 * 25f) / 6f; + } + flag = true; + if ((double) this.ai[0] < 0.0 || (double) this.velocity.X == 0.0 && (double) this.velocity.Y == 0.0) + this.rotation += 0.3f; + else if ((double) this.ai[0] > 0.0) + this.rotation += 0.3f * (float) this.direction; + else + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.57f; + if ((double) Vector2.Distance(this.Center, Main.player[this.owner].Center) > 2000.0) + this.Kill(); + if (Main.rand.Next(2) == 0) + { + int Type; + switch (Main.rand.Next(3)) + { + case 0: + Type = 15; + break; + case 1: + Type = 57; + break; + default: + Type = 58; + break; + } + int index = Dust.NewDust(this.position, this.width, this.height, Type, this.velocity.X * 0.25f, this.velocity.Y * 0.25f, (int) byte.MaxValue, Scale: 0.7f); + Main.dust[index].velocity *= 0.25f; + Main.dust[index].position = (Main.dust[index].position + this.position) / 2f; + } + } + if (this.type == 79) + { + if (this.soundDelay == 0 && (double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) > 2.0) + { + this.soundDelay = 10; + SoundEngine.PlaySound(SoundID.Item9, this.position); + } + for (int index1 = 0; index1 < 1; ++index1) + { + int index2 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 66, Alpha: 100, newColor: new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), Scale: 2.5f); + Main.dust[index2].velocity *= 0.1f; + Main.dust[index2].velocity += this.velocity * 0.2f; + Main.dust[index2].position.X = (float) ((double) this.position.X + (double) (this.width / 2) + 4.0) + (float) Main.rand.Next(-2, 3); + Main.dust[index2].position.Y = this.position.Y + (float) (this.height / 2) + (float) Main.rand.Next(-2, 3); + Main.dust[index2].noGravity = true; + } + } + if (this.type == 16) + { + if (this.soundDelay == 0 && (double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) > 2.0) + { + this.soundDelay = 10; + SoundEngine.PlaySound(SoundID.Item9, this.position); + } + if (Main.rand.Next(9) == 0) + { + int index = Dust.NewDust(this.position, this.width, this.height, 15, Alpha: 100, Scale: 2f); + Main.dust[index].velocity *= 0.3f; + Main.dust[index].position.X = (float) ((double) this.position.X + (double) (this.width / 2) + 4.0) + (float) Main.rand.Next(-4, 5); + Main.dust[index].position.Y = this.position.Y + (float) (this.height / 2) + (float) Main.rand.Next(-4, 5); + Main.dust[index].noGravity = true; + Main.dust[index].velocity += Main.rand.NextVector2Circular(2f, 2f); + } + flag = true; + if (this.velocity != Vector2.Zero) + this.rotation = this.velocity.ToRotation(); + } + if (this.type == 34) + { + if (Main.rand.Next(12) == 0) + { + Dust dust = Dust.NewDustDirect(this.Center, 0, 0, 6, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 100, Scale: 3.5f); + dust.noGravity = true; + dust.velocity *= 1.4f; + dust.velocity += Main.rand.NextVector2Circular(1f, 1f); + dust.velocity += this.velocity * 0.15f; + } + if (Main.rand.Next(24) == 0) + { + Dust dust = Dust.NewDustDirect(this.Center, 0, 0, 6, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 100, Scale: 1.5f); + dust.velocity += Main.rand.NextVector2Circular(1f, 1f); + dust.velocity += this.velocity * 0.15f; + } + flag = true; + if (this.velocity != Vector2.Zero) + this.rotation = this.velocity.ToRotation(); + } + if (!flag && this.velocity != Vector2.Zero) + this.rotation = (float) ((double) this.velocity.ToRotation() - 3.14159274101257 + 0.785398185253143); + if ((double) this.velocity.Y <= 16.0) + return; + this.velocity.Y = 16f; + } + + private void AI_015_HandleMovementCollision(ref Vector2 wetVelocity, ref Vector2 lastVelocity) + { + int num1 = 10; + int num2 = 0; + Vector2 velocity = this.velocity; + float num3 = 0.2f; + if ((double) this.ai[0] == 1.0 || (double) this.ai[0] == 5.0) + num3 = 0.4f; + if ((double) this.ai[0] == 6.0) + num3 = 0.0f; + if ((double) lastVelocity.X != (double) this.velocity.X) + { + if ((double) Math.Abs(lastVelocity.X) > 4.0) + num2 = 1; + this.velocity.X = -lastVelocity.X * num3; + ++this.localAI[0]; + } + if ((double) lastVelocity.Y != (double) this.velocity.Y) + { + if ((double) Math.Abs(lastVelocity.Y) > 4.0) + num2 = 1; + this.velocity.Y = -lastVelocity.Y * num3; + ++this.localAI[0]; + } + if ((double) this.ai[0] == 1.0) + { + this.ai[0] = 5f; + this.localNPCHitCooldown = num1; + this.netUpdate = true; + Point tileCoordinates1 = this.TopLeft.ToTileCoordinates(); + Point tileCoordinates2 = this.BottomRight.ToTileCoordinates(); + num2 = 2; + bool causedShockwaves; + this.CreateImpactExplosion(2, this.Center, ref tileCoordinates1, ref tileCoordinates2, this.width, out causedShockwaves); + this.CreateImpactExplosion2_FlailTileCollision(this.Center, causedShockwaves, velocity); + this.position = this.position - velocity; + } + if (num2 > 0) + { + this.netUpdate = true; + for (int index = 0; index < num2; ++index) + Collision.HitTiles(this.position, velocity, this.width, this.height); + SoundEngine.PlaySound(0, (int) this.position.X, (int) this.position.Y); + } + if (((double) this.ai[0] == 3.0 || (double) this.ai[0] == 0.0 || (double) this.ai[0] == 5.0 ? 1 : ((double) this.ai[0] == 6.0 ? 1 : 0)) == 0 && (double) this.localAI[0] >= 10.0) + { + this.ai[0] = 4f; + this.netUpdate = true; + } + if (!this.wet) + return; + wetVelocity = this.velocity; + } + + private void ResetLocalNPCHitImmunity() + { + for (int index = 0; index < 200; ++index) + this.localNPCImmunity[index] = 0; + } + + private void AI_015_Flails() + { + Player player = Main.player[this.owner]; + if (!player.active || player.dead || player.noItems || player.CCed || (double) Vector2.Distance(this.Center, player.Center) > 900.0) + this.Kill(); + else if (Main.myPlayer == this.owner && Main.mapFullscreen) + { + this.Kill(); + } + else + { + if (this.type == 948 && this.wet && !this.lavaWet) + { + this.type = 947; + this.netUpdate = true; + } + Vector2 mountedCenter = player.MountedCenter; + bool doFastThrowDust = false; + bool flag1 = true; + bool flag2 = false; + int num1 = 10; + float num2 = 24f; + float num3 = 800f; + float num4 = 3f; + float num5 = 16f; + float num6 = 6f; + float num7 = 48f; + float num8 = 1f; + float num9 = 14f; + int num10 = 60; + int num11 = 10; + int num12 = 20; + int num13 = 10; + int num14 = num1 + 5; + switch (this.type) + { + case 25: + num1 = 15; + num2 = 14f; + num5 = 10f; + num7 = 15f; + break; + case 26: + num1 = 15; + num2 = 16f; + num5 = 12f; + num7 = 16f; + break; + case 35: + num1 = 15; + num2 = 17f; + num5 = 14f; + num7 = 18f; + break; + case 63: + num1 = 13; + num2 = 21f; + num5 = 20f; + num7 = 24f; + num12 = 15; + break; + case 154: + num1 = 15; + num2 = 15f; + num5 = 11f; + num7 = 16f; + break; + case 247: + num1 = 13; + num2 = 23f; + num12 = 15; + break; + case 757: + num1 = 13; + num2 = 22f; + num5 = 22f; + num7 = 26f; + num12 = 15; + break; + case 947: + case 948: + num1 = 13; + num2 = 12f; + num5 = 8f; + num7 = 13f; + break; + } + float num15 = 1f / player.meleeSpeed; + float num16 = num2 * num15; + float maxAmountAllowedToMove1 = num8 * num15; + float maxAmountAllowedToMove2 = num9 * num15; + float maxAmountAllowedToMove3 = num4 * num15; + float num17 = num5 * num15; + float maxAmountAllowedToMove4 = num6 * num15; + float num18 = num7 * num15; + float num19 = num16 * (float) num1; + float num20 = num19 + 160f; + this.localNPCHitCooldown = num11; + switch ((int) this.ai[0]) + { + case 0: + flag2 = true; + if (this.owner == Main.myPlayer) + { + Vector2 vector2 = mountedCenter.DirectionTo(Main.MouseWorld).SafeNormalize(Vector2.UnitX * (float) player.direction); + player.ChangeDir((double) vector2.X > 0.0 ? 1 : -1); + if (!player.channel) + { + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.velocity = vector2 * num16 + player.velocity; + this.Center = mountedCenter; + this.netUpdate = true; + this.ResetLocalNPCHitImmunity(); + this.localNPCHitCooldown = num13; + break; + } + } + ++this.localAI[1]; + Vector2 vector2_1 = new Vector2((float) player.direction).RotatedBy(31.4159278869629 * ((double) this.localAI[1] / 60.0) * (double) player.direction); + vector2_1.Y *= 0.8f; + if ((double) vector2_1.Y * (double) player.gravDir > 0.0) + vector2_1.Y *= 0.5f; + this.Center = mountedCenter + vector2_1 * 30f; + this.velocity = Vector2.Zero; + this.localNPCHitCooldown = num12; + break; + case 1: + doFastThrowDust = true; + bool flag3 = (double) this.ai[1]++ >= (double) num1 | (double) this.Distance(mountedCenter) >= (double) num3; + if (player.controlUseItem) + { + this.ai[0] = 6f; + this.ai[1] = 0.0f; + this.netUpdate = true; + this.velocity = this.velocity * 0.2f; + if (Main.myPlayer == this.owner && this.type == 757) + { + Projectile.NewProjectile(this.Center, this.velocity, 928, this.damage, this.knockBack, Main.myPlayer); + break; + } + break; + } + if (flag3) + { + this.ai[0] = 2f; + this.ai[1] = 0.0f; + this.netUpdate = true; + this.velocity = this.velocity * 0.3f; + if (Main.myPlayer == this.owner && this.type == 757) + Projectile.NewProjectile(this.Center, this.velocity, 928, this.damage, this.knockBack, Main.myPlayer); + } + player.ChangeDir((double) player.Center.X < (double) this.Center.X ? 1 : -1); + this.localNPCHitCooldown = num13; + break; + case 2: + Vector2 vector2_2 = this.DirectionTo(mountedCenter).SafeNormalize(Vector2.Zero); + if ((double) this.Distance(mountedCenter) <= (double) num17) + { + this.Kill(); + return; + } + if (player.controlUseItem) + { + this.ai[0] = 6f; + this.ai[1] = 0.0f; + this.netUpdate = true; + this.velocity = this.velocity * 0.2f; + break; + } + this.velocity = this.velocity * 0.98f; + this.velocity = this.velocity.MoveTowards(vector2_2 * num17, maxAmountAllowedToMove3); + player.ChangeDir((double) player.Center.X < (double) this.Center.X ? 1 : -1); + break; + case 3: + if (!player.controlUseItem) + { + this.ai[0] = 4f; + this.ai[1] = 0.0f; + this.netUpdate = true; + break; + } + float num21 = this.Distance(mountedCenter); + this.tileCollide = (double) this.ai[1] == 1.0; + bool flag4 = (double) num21 <= (double) num19; + if (flag4 != this.tileCollide) + { + this.tileCollide = flag4; + this.ai[1] = this.tileCollide ? 1f : 0.0f; + this.netUpdate = true; + } + if ((double) num21 > (double) num10) + { + if ((double) num21 >= (double) num19) + { + this.velocity = this.velocity * 0.5f; + this.velocity = this.velocity.MoveTowards(this.DirectionTo(mountedCenter).SafeNormalize(Vector2.Zero) * maxAmountAllowedToMove2, maxAmountAllowedToMove2); + } + this.velocity = this.velocity * 0.98f; + this.velocity = this.velocity.MoveTowards(this.DirectionTo(mountedCenter).SafeNormalize(Vector2.Zero) * maxAmountAllowedToMove2, maxAmountAllowedToMove1); + } + else + { + if ((double) this.velocity.Length() < 6.0) + { + this.velocity.X *= 0.96f; + this.velocity.Y += 0.2f; + } + if ((double) player.velocity.X == 0.0) + this.velocity.X *= 0.96f; + } + player.ChangeDir((double) player.Center.X < (double) this.Center.X ? 1 : -1); + break; + case 4: + this.tileCollide = false; + Vector2 vector2_3 = this.DirectionTo(mountedCenter).SafeNormalize(Vector2.Zero); + if ((double) this.Distance(mountedCenter) <= (double) num18) + { + this.Kill(); + return; + } + this.velocity = this.velocity * 0.98f; + this.velocity = this.velocity.MoveTowards(vector2_3 * num18, maxAmountAllowedToMove4); + Vector2 Target = this.Center + this.velocity; + Vector2 vector2_4 = mountedCenter.DirectionFrom(Target).SafeNormalize(Vector2.Zero); + if ((double) Vector2.Dot(vector2_3, vector2_4) < 0.0) + { + this.Kill(); + return; + } + player.ChangeDir((double) player.Center.X < (double) this.Center.X ? 1 : -1); + break; + case 5: + if ((double) this.ai[1]++ >= (double) num14) + { + this.ai[0] = 6f; + this.ai[1] = 0.0f; + this.netUpdate = true; + break; + } + this.localNPCHitCooldown = num13; + this.velocity.Y += 0.6f; + this.velocity.X *= 0.95f; + player.ChangeDir((double) player.Center.X < (double) this.Center.X ? 1 : -1); + break; + case 6: + if (!player.controlUseItem || (double) this.Distance(mountedCenter) > (double) num20) + { + this.ai[0] = 4f; + this.ai[1] = 0.0f; + this.netUpdate = true; + break; + } + this.velocity.Y += 0.8f; + this.velocity.X *= 0.95f; + player.ChangeDir((double) player.Center.X < (double) this.Center.X ? 1 : -1); + break; + } + if (this.type == 247) + { + flag1 = false; + float num22 = (float) (((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y)) * 0.00999999977648258); + this.rotation += (double) this.velocity.X > 0.0 ? num22 : -num22; + if ((double) this.ai[0] == 0.0) + this.rotation += 0.418879f * (float) player.direction; + float num23 = 600f; + NPC npc1 = (NPC) null; + if (this.owner == Main.myPlayer) + { + ++this.localAI[0]; + if ((double) this.localAI[0] >= 20.0) + { + this.localAI[0] = 17f; + for (int index = 0; index < 200; ++index) + { + NPC npc2 = Main.npc[index]; + if (npc2.CanBeChasedBy((object) this)) + { + float num24 = this.Distance(npc2.Center); + if ((double) num24 < (double) num23 && Collision.CanHit(this.position, this.width, this.height, npc2.position, npc2.width, npc2.height)) + { + npc1 = npc2; + num23 = num24; + } + } + } + } + if (npc1 != null) + { + this.localAI[0] = 0.0f; + float num25 = 14f; + Vector2 center = this.Center; + Projectile.NewProjectile(center, center.DirectionTo(npc1.Center) * num25, 248, (int) ((double) this.damage / 1.5), this.knockBack / 2f, Main.myPlayer); + } + } + } + this.direction = (double) this.velocity.X > 0.0 ? 1 : -1; + this.spriteDirection = this.direction; + this.ownerHitCheck = flag2; + if (flag1) + { + if ((double) this.velocity.Length() > 1.0) + this.rotation = this.velocity.ToRotation() + this.velocity.X * 0.1f; + else + this.rotation += this.velocity.X * 0.1f; + } + this.timeLeft = 2; + player.heldProj = this.whoAmI; + player.SetDummyItemTime(2); + player.itemRotation = this.DirectionFrom(mountedCenter).ToRotation(); + if ((double) this.Center.X < (double) mountedCenter.X) + player.itemRotation += 3.141593f; + player.itemRotation = MathHelper.WrapAngle(player.itemRotation); + this.AI_015_Flails_Dust(doFastThrowDust); + } + } + + private void AI_015_HandleMovementCollision_Old( + ref Vector2 wetVelocity, + ref Vector2 lastVelocity) + { + bool flag = false; + if ((double) lastVelocity.X != (double) this.velocity.X) + { + if ((double) Math.Abs(lastVelocity.X) > 4.0) + flag = true; + this.position.X += this.velocity.X; + this.velocity.X = (float) (-(double) lastVelocity.X * 0.200000002980232); + } + if ((double) lastVelocity.Y != (double) this.velocity.Y) + { + if ((double) Math.Abs(lastVelocity.Y) > 4.0) + flag = true; + this.position.Y += this.velocity.Y; + this.velocity.Y = (float) (-(double) lastVelocity.Y * 0.200000002980232); + } + this.ai[0] = 1f; + if (flag) + { + this.netUpdate = true; + Collision.HitTiles(this.position, this.velocity, this.width, this.height); + SoundEngine.PlaySound(0, (int) this.position.X, (int) this.position.Y); + } + if (!this.wet) + return; + wetVelocity = this.velocity; + } + + private void AI_015_Flails_Old() + { + this.AI_015_Flails_Dust(false); + bool flag1 = Main.player[this.owner].dead; + if (!flag1) + flag1 = (double) (Main.player[this.owner].Center - this.Center).Length() > 2000.0; + if (flag1) + { + this.Kill(); + } + else + { + Main.player[this.owner].SetDummyItemTime(10); + if ((double) this.position.X + (double) (this.width / 2) > (double) Main.player[this.owner].position.X + (double) (Main.player[this.owner].width / 2)) + { + Main.player[this.owner].ChangeDir(1); + this.direction = 1; + } + else + { + Main.player[this.owner].ChangeDir(-1); + this.direction = -1; + } + Vector2 mountedCenter = Main.player[this.owner].MountedCenter; + Vector2 vector2_1 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num1 = mountedCenter.X - vector2_1.X; + float num2 = mountedCenter.Y - vector2_1.Y; + float num3 = (float) Math.Sqrt((double) num1 * (double) num1 + (double) num2 * (double) num2); + if ((double) this.ai[0] == 0.0) + { + float num4 = 160f; + if (this.type == 63) + num4 *= 1.5f; + if (this.type == 247) + num4 *= 1.5f; + if (this.type == 757) + num4 *= 1.5f; + this.tileCollide = true; + if ((double) num3 > (double) num4) + { + this.ai[0] = 1f; + this.netUpdate = true; + } + else if (!Main.player[this.owner].channel) + { + if ((double) this.velocity.Y < 0.0) + this.velocity.Y *= 0.9f; + ++this.velocity.Y; + this.velocity.X *= 0.9f; + } + } + else if ((double) this.ai[0] == 1.0) + { + float meleeSpeed = Main.player[this.owner].meleeSpeed; + float num5 = 14f / meleeSpeed; + float num6 = 0.9f / meleeSpeed; + float num7 = 300f / meleeSpeed; + int num8 = 60; + if (this.type == 63) + { + num7 *= 1.5f; + num5 *= 1.5f; + num6 *= 1.5f; + } + if (this.type == 247) + { + num7 *= 1.5f; + num5 = 15.9f; + num6 *= 2f; + num8 = 100; + } + if (this.type == 757) + { + num7 *= 1.5f; + num5 = 15.9f; + num6 *= 2f; + num8 = 100; + } + double num9 = (double) Math.Abs(num1); + double num10 = (double) Math.Abs(num2); + if ((double) this.ai[1] == 1.0) + this.tileCollide = false; + if (!Main.player[this.owner].channel || (double) num3 > (double) num7 || !this.tileCollide) + { + this.ai[1] = 1f; + if (this.tileCollide) + this.netUpdate = true; + this.tileCollide = false; + if ((double) num3 < 20.0) + this.Kill(); + } + if (!this.tileCollide) + num6 *= 2f; + if ((double) num3 > (double) num8 || !this.tileCollide) + { + float num11 = num5 / num3; + num1 *= num11; + num2 *= num11; + Vector2 vector2_2 = new Vector2(this.velocity.X, this.velocity.Y); + float num12 = num1 - this.velocity.X; + float num13 = num2 - this.velocity.Y; + float num14 = (float) Math.Sqrt((double) num12 * (double) num12 + (double) num13 * (double) num13); + float num15 = num6 / num14; + float num16 = num12 * num15; + float num17 = num13 * num15; + this.velocity.X *= 0.98f; + this.velocity.Y *= 0.98f; + this.velocity.X += num16; + this.velocity.Y += num17; + } + else + { + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < 6.0) + { + this.velocity.X *= 0.96f; + this.velocity.Y += 0.2f; + } + if ((double) Main.player[this.owner].velocity.X == 0.0) + this.velocity.X *= 0.96f; + } + } + if (this.type == 247) + { + if ((double) this.velocity.X < 0.0) + this.rotation -= (float) (((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y)) * 0.00999999977648258); + else + this.rotation += (float) (((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y)) * 0.00999999977648258); + float num18 = this.position.X; + float num19 = this.position.Y; + float num20 = 600f; + bool flag2 = false; + if (this.owner == Main.myPlayer) + { + ++this.localAI[1]; + if ((double) this.localAI[1] > 20.0) + { + this.localAI[1] = 20f; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].CanBeChasedBy((object) this)) + { + float num21 = Main.npc[index].position.X + (float) (Main.npc[index].width / 2); + float num22 = Main.npc[index].position.Y + (float) (Main.npc[index].height / 2); + float num23 = Math.Abs(this.position.X + (float) (this.width / 2) - num21) + Math.Abs(this.position.Y + (float) (this.height / 2) - num22); + if ((double) num23 < (double) num20 && Collision.CanHit(this.position, this.width, this.height, Main.npc[index].position, Main.npc[index].width, Main.npc[index].height)) + { + num20 = num23; + num18 = num21; + num19 = num22; + flag2 = true; + } + } + } + } + } + if (!flag2) + return; + this.localAI[1] = 0.0f; + vector2_1 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num24 = num18 - vector2_1.X; + float num25 = num19 - vector2_1.Y; + float num26 = (float) (14.0 / Math.Sqrt((double) num24 * (double) num24 + (double) num25 * (double) num25)); + float SpeedX = num24 * num26; + float SpeedY = num25 * num26; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX, SpeedY, 248, (int) ((double) this.damage / 1.5), this.knockBack / 2f, Main.myPlayer); + } + else + this.rotation = (float) Math.Atan2((double) num2, (double) num1) - this.velocity.X * 0.1f; + } + } + + private void AI_015_Flails_Dust(bool doFastThrowDust) + { + if (this.type == 25) + { + int maxValue = 15; + if (doFastThrowDust) + maxValue = 1; + if (Main.rand.Next(maxValue) != 0) + return; + Dust.NewDust(this.position, this.width, this.height, 14, Alpha: 150, Scale: 1.3f); + } + else if (this.type == 757) + { + int maxValue1 = 4; + if ((double) this.velocity.Length() < 8.0) + maxValue1 = 10; + if (doFastThrowDust) + maxValue1 /= 2; + for (int index = 0; index < 2; ++index) + { + if (Main.rand.Next(maxValue1) == 0) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 5, Scale: 0.8f); + dust.velocity += this.velocity / 4f; + dust.fadeIn = 1.3f; + } + } + int maxValue2 = 40; + if (doFastThrowDust) + maxValue2 /= 2; + for (float num = 0.0f; (double) num < 1.0; num += 0.1f) + { + if (Main.rand.Next(maxValue2) == 0) + Dust.NewDustDirect(Vector2.Lerp(Main.player[this.owner].Center, this.Center, Main.rand.NextFloat()) + new Vector2(-8f), 16, 16, 5, Scale: 1.3f).velocity += this.velocity / 4f; + } + } + else if (this.type == 26) + { + int index = Dust.NewDust(this.position, this.width, this.height, 172, this.velocity.X * 0.4f, this.velocity.Y * 0.4f, 100, Scale: 1.5f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity.X /= 2f; + Main.dust[index].velocity.Y /= 2f; + } + else if (this.type == 948 && !this.wet) + { + int index = Dust.NewDust(this.position, this.width, this.height, 6, this.velocity.X * 0.4f, this.velocity.Y * 0.4f, 100, Scale: 1.2f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity.X *= 4f; + Main.dust[index].velocity.Y *= 4f; + Main.dust[index].velocity = (Main.dust[index].velocity + this.velocity) / 2f; + } + else if (this.type == 35) + { + int index = Dust.NewDust(this.position, this.width, this.height, 6, this.velocity.X * 0.4f, this.velocity.Y * 0.4f, 100, Scale: 3f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity.X *= 2f; + Main.dust[index].velocity.Y *= 2f; + } + else + { + if (this.type != 154) + return; + int index = Dust.NewDust(this.position, this.width, this.height, 115, this.velocity.X * 0.4f, this.velocity.Y * 0.4f, 140, Scale: 1.5f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.25f; + } + } + + private void AI_100_Medusa() + { + Player player = Main.player[this.owner]; + Vector2 zero1 = Vector2.Zero; + if (this.type == 535) + { + zero1.X = (float) player.direction * 6f; + zero1.Y = player.gravDir * -14f; + bool flag1 = true; + bool flag2 = (double) this.ai[0] > 0.0; + if (!player.dead) + this.timeLeft = 3; + if ((double) this.ai[0] > 0.0) + --this.ai[0]; + if (flag2) + { + if (this.frame < 8) + this.frame = 8; + if (this.frame >= 12) + this.frame = 8; + ++this.frameCounter; + if (++this.frameCounter >= 5) + { + this.frameCounter = 0; + if (++this.frame >= 12) + this.frame = 8; + } + } + else if (++this.frameCounter >= 5) + { + this.frameCounter = 0; + if (++this.frame >= 8) + this.frame = 0; + } + Vector2 center1 = player.Center; + Vector2 vector2_1 = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY) - center1; + if ((double) player.gravDir == -1.0) + vector2_1.Y = (float) (Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - center1.Y; + Vector2 vector2_2 = new Vector2((float) Math.Sign((double) vector2_1.X == 0.0 ? (float) player.direction : vector2_1.X), 0.0f); + if ((double) vector2_2.X != (double) this.velocity.X || (double) vector2_2.Y != (double) this.velocity.Y) + this.netUpdate = true; + this.velocity = vector2_2; + if (flag2 && this.soundDelay == 0) + SoundEngine.PlaySound(4, (int) this.position.X, (int) this.position.Y, 17); + this.soundDelay = flag2 ? 4 : 0; + if (Main.myPlayer == this.owner) + { + Vector2 Position2 = player.Center + new Vector2((float) (player.direction * 4), player.gravDir * 2f); + if (!player.channel) + { + this.Kill(); + return; + } + if ((!flag2 ? 1 : ((double) this.ai[0] % 15.0 == 0.0 ? 1 : 0)) != 0) + { + bool flag3 = false; + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && (double) this.Distance(npc.Center) < 250.0 && npc.CanBeChasedBy((object) this) && Collision.CanHitLine(npc.position, npc.width, npc.height, Position2, 0, 0)) + { + flag3 = true; + break; + } + } + if (flag3) + { + if (!flag1 || player.CheckMana(player.inventory[player.selectedItem].mana, true)) + { + int damage = this.damage; + Vector2 center2 = this.Center; + int num1 = 0; + float num2 = 0.0f; + Projectile._medusaHeadTargetList.Clear(); + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + float num3 = this.Distance(npc.Center); + if (npc.active && (double) num3 < 250.0 && npc.CanBeChasedBy((object) this) && Collision.CanHitLine(npc.position, npc.width, npc.height, center2, 0, 0)) + Projectile._medusaHeadTargetList.Add(Tuple.Create(index, num3)); + } + Projectile._medusaHeadTargetList.Sort((IComparer>) Projectile._medusaTargetComparer); + for (int index1 = 0; index1 < Projectile._medusaHeadTargetList.Count && index1 < 3; ++index1) + { + Tuple medusaHeadTarget = Projectile._medusaHeadTargetList[index1]; + NPC npc = Main.npc[medusaHeadTarget.Item1]; + Vector2 v = npc.Center - center2; + num2 += v.ToRotation(); + ++num1; + int index2 = Projectile.NewProjectile(center2.X, center2.Y, v.X, v.Y, 536, 0, 0.0f, this.owner, (float) this.whoAmI); + Main.projectile[index2].Center = npc.Center; + Main.projectile[index2].damage = damage; + Main.projectile[index2].Damage(); + Main.projectile[index2].damage = 0; + Main.projectile[index2].Center = center2; + this.ai[0] = 180f; + } + float num4 = num1 == 0 ? (player.direction == 1 ? 0.0f : 3.141593f) : num2 / (float) num1; + for (int index = 0; index < 4; ++index) + { + Vector2 zero2 = Vector2.Zero; + Vector2 vector2_3 = Main.rand.Next(4) == 0 ? Vector2.UnitX.RotatedByRandom(6.28318548202515) * new Vector2(200f, 50f) * (float) ((double) Main.rand.NextFloat() * 0.699999988079071 + 0.300000011920929) : Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) num4) * new Vector2(200f, 50f) * (float) ((double) Main.rand.NextFloat() * 0.699999988079071 + 0.300000011920929); + Projectile.NewProjectile(center2.X, center2.Y, vector2_3.X, vector2_3.Y, 536, 0, 0.0f, this.owner, (float) this.whoAmI); + } + this.ai[0] = 60f; + this.netUpdate = true; + } + } + } + } + Lighting.AddLight(this.Center, 0.9f, 0.75f, 0.1f); + } + this.rotation = (double) player.gravDir == 1.0 ? 0.0f : 3.141593f; + this.spriteDirection = this.direction; + this.timeLeft = 2; + Vector2 vector2_4 = Main.OffsetsPlayerOnhand[player.bodyFrame.Y / 56] * 2f; + if (player.direction != 1) + vector2_4.X = (float) player.bodyFrame.Width - vector2_4.X; + Vector2 vector2_5 = vector2_4 - (player.bodyFrame.Size() - new Vector2((float) player.width, 42f)) / 2f; + this.Center = (player.position + vector2_5 + zero1 - this.velocity).Floor(); + player.ChangeDir(this.direction); + player.heldProj = this.whoAmI; + player.SetDummyItemTime(2); + } + + private void AI_120_StardustGuardian() + { + Player player = Main.player[this.owner]; + if (!player.active) + { + this.active = false; + } + else + { + bool flag1 = this.type == 623; + Vector2 Other = player.Center; + float num1 = 100f; + float lookupRange = 500f; + float num2 = 500f; + float num3 = 100f; + bool flag2 = true; + if (flag1) + { + if (player.dead) + player.stardustGuardian = false; + if (player.stardustGuardian) + this.timeLeft = 2; + num1 = 150f; + Other.X -= (float) ((5 + player.width / 2) * player.direction); + Other.Y -= 25f; + Lighting.AddLight(this.Center, 0.9f, 0.9f, 0.7f); + if ((double) this.ai[0] != 3.0 && this.alpha == (int) byte.MaxValue) + { + this.alpha = 0; + for (int index1 = 0; index1 < 30; ++index1) + { + int index2 = Dust.NewDust(this.position, this.width, this.height, 135, Alpha: 200, Scale: 1.7f); + Main.dust[index2].noGravity = true; + Main.dust[index2].velocity *= 3f; + Main.dust[index2].shader = GameShaders.Armor.GetSecondaryShader(Main.player[this.owner].cPet, Main.player[this.owner]); + int index3 = Dust.NewDust(this.position, this.width, this.height, 135, Alpha: 100); + Main.dust[index3].velocity *= 2f; + Main.dust[index3].noGravity = true; + Main.dust[index3].fadeIn = 2.5f; + Main.dust[index3].shader = GameShaders.Armor.GetSecondaryShader(Main.player[this.owner].cPet, Main.player[this.owner]); + } + } + } + if ((double) this.ai[0] != 0.0) + { + Main.player[this.owner].tankPet = this.whoAmI; + Main.player[this.owner].tankPetReset = false; + } + if ((double) this.ai[0] == 0.0) + { + this.Center = Vector2.Lerp(this.Center, Other, 0.05f); + this.velocity = this.velocity * 0.5f; + this.direction = this.spriteDirection = player.direction; + if (flag1 && ++this.frameCounter >= 9) + { + this.frameCounter = 0; + if (++this.frame >= 8) + this.frame = 0; + } + int targetNPCIndex = -1; + float distanceToClosestTarget = lookupRange; + bool flag3 = flag2; + if (flag1 && (double) Math.Abs(this.Center.X - Other.X) > (double) num1 + 20.0) + flag3 = false; + if (flag3) + this.AI_120_StardustGuardian_FindTarget(lookupRange, ref targetNPCIndex, ref distanceToClosestTarget); + if (targetNPCIndex != -1) + { + NPC npc = Main.npc[targetNPCIndex]; + this.direction = this.spriteDirection = ((double) npc.Center.X > (double) this.Center.X).ToDirectionInt(); + float num4 = Math.Abs(Other.X - this.Center.X); + float num5 = Math.Abs(npc.Center.X - this.Center.X); + float num6 = Math.Abs(Other.Y - this.Center.Y); + float num7 = Math.Abs(npc.Center.Y - this.Bottom.Y); + float directionInt = (float) ((double) npc.Center.Y > (double) this.Bottom.Y).ToDirectionInt(); + if (((double) num4 < (double) num1 || ((double) Other.X - (double) this.Center.X) * (double) this.direction < 0.0) && (double) num5 > 20.0 && (double) num5 < (double) num1 - (double) num4 + 100.0) + this.velocity.X += 0.1f * (float) this.direction; + else + this.velocity.X *= 0.7f; + if (((double) num6 < (double) num3 || ((double) Other.Y - (double) this.Bottom.Y) * (double) directionInt < 0.0) && (double) num7 > 10.0 && (double) num7 < (double) num3 - (double) num6 + 10.0) + this.velocity.Y += 0.1f * directionInt; + else + this.velocity.Y *= 0.7f; + if (this.owner == Main.myPlayer && (double) num5 < (double) num2) + { + this.ai[0] = 2f; + this.ai[1] = (float) targetNPCIndex; + this.netUpdate = true; + } + } + } + else if ((double) this.ai[0] == 1.0) + { + if (player.HasMinionRestTarget) + { + Other = player.MinionRestTargetPoint; + } + else + { + this.ai[0] = 0.0f; + this.netUpdate = true; + } + int targetNPCIndex = -1; + float distanceToClosestTarget = lookupRange; + bool flag4 = true; + if (flag1 && (double) Math.Abs(this.Center.X - Other.X) > (double) num1 + 20.0) + flag4 = false; + if (flag4) + this.AI_120_StardustGuardian_FindTarget(lookupRange, ref targetNPCIndex, ref distanceToClosestTarget); + if (targetNPCIndex != -1) + { + NPC npc = Main.npc[targetNPCIndex]; + this.direction = this.spriteDirection = ((double) npc.Center.X > (double) this.Center.X).ToDirectionInt(); + float num8 = Math.Abs(Other.X - this.Center.X); + float num9 = Math.Abs(npc.Center.X - this.Center.X); + float num10 = Math.Abs(Other.Y - this.Center.Y); + float num11 = Math.Abs(npc.Center.Y - this.Bottom.Y); + float directionInt = (float) ((double) npc.Center.Y > (double) this.Bottom.Y).ToDirectionInt(); + if (((double) num8 < (double) num1 || ((double) Other.X - (double) this.Center.X) * (double) this.direction < 0.0) && (double) num9 > 20.0 && (double) num9 < (double) num1 - (double) num8 + 100.0) + this.velocity.X += 0.1f * (float) this.direction; + else + this.velocity.X *= 0.7f; + if (((double) num10 < (double) num3 || ((double) Other.Y - (double) this.Bottom.Y) * (double) directionInt < 0.0) && (double) num11 > 10.0 && (double) num11 < (double) num3 - (double) num10 + 10.0) + this.velocity.Y += 0.1f * directionInt; + else + this.velocity.Y *= 0.7f; + if (this.owner == Main.myPlayer && (double) num9 < (double) num2) + { + this.ai[0] = 2f; + this.ai[1] = (float) targetNPCIndex; + this.netUpdate = true; + } + } + else + { + if ((double) Math.Abs(Other.X - this.Center.X) > (double) num1 + 40.0) + { + this.ai[0] = 3f; + this.netUpdate = true; + } + else if ((double) Math.Abs(Other.X - this.Center.X) > 20.0) + { + this.direction = this.spriteDirection = ((double) Other.X > (double) this.Center.X).ToDirectionInt(); + this.velocity.X += 0.06f * (float) this.direction; + } + else + { + this.velocity.X *= 0.8f; + this.direction = this.spriteDirection = ((double) player.Center.X < (double) this.Center.X).ToDirectionInt(); + } + if ((double) Math.Abs(Other.Y - this.Center.Y) > (double) num3) + { + this.ai[0] = 3f; + this.netUpdate = true; + } + else if ((double) Math.Abs(Other.Y - this.Center.Y) > 10.0) + this.velocity.Y += 0.06f * (float) Math.Sign(Other.Y - this.Center.Y); + else + this.velocity.Y *= 0.8f; + } + if (flag1 && ++this.frameCounter >= 9) + { + this.frameCounter = 0; + if (++this.frame >= Main.projFrames[this.type] - 4) + this.frame = 0; + } + } + else if ((double) this.ai[0] == 2.0) + { + if (flag1) + { + int num12 = 3; + if (this.frame < 12) + this.frame = 12; + if (this.frame == 12 || this.frame == 13) + num12 = 8; + if (++this.frameCounter >= num12) + { + this.frameCounter = 0; + if (++this.frame >= 19) + this.frame = 14; + } + } + bool flag5 = false; + if (flag2) + flag5 = (double) this.Distance(player.Center) < (double) lookupRange; + NPC npc = (NPC) null; + int index = (int) this.ai[1]; + if (Main.npc.IndexInRange(index)) + { + npc = Main.npc[index]; + if (!npc.CanBeChasedBy((object) this) || (double) this.Distance(npc.Center) > (double) num2) + npc = (NPC) null; + } + if (!flag5 || npc == null) + { + this.ai[1] = 0.0f; + this.ai[0] = 0.0f; + this.netUpdate = true; + if (this.frame < 18) + this.frame = 18; + } + else + { + int num13 = (double) (npc.Center - player.Center).X > 1.0 ? 1 : -1; + Vector2 targetPosition = npc.Center + new Vector2((float) -num13 * (float) ((double) npc.width * 0.5 + 70.0), -10f) - this.Center; + float maxAmountAllowedToMove = 6f * Utils.Remap(targetPosition.Length(), 50f, 400f, 1f, 4f); + int num14 = 32; + this.velocity = this.velocity.MoveTowards(Vector2.Zero.MoveTowards(targetPosition, maxAmountAllowedToMove), (float) num14); + this.direction = this.spriteDirection = num13; + if ((double) this.localAI[0]++ >= 3.0) + { + this.localAI[0] = 0.0f; + int targetNPCIndex = -1; + float distanceToClosestTarget = -1f; + this.AI_120_StardustGuardian_FindTarget(lookupRange, ref targetNPCIndex, ref distanceToClosestTarget); + if (targetNPCIndex != -1) + { + this.ai[1] = (float) targetNPCIndex; + this.netUpdate = true; + } + } + } + } + else + { + double num15 = (double) this.ai[0]; + } + if ((double) this.ai[0] != 3.0) + return; + if (player.HasMinionRestTarget) + { + Other = player.MinionRestTargetPoint; + } + else + { + this.ai[0] = 0.0f; + this.netUpdate = true; + } + if (this.alpha == 0) + { + this.alpha = (int) byte.MaxValue; + for (int index4 = 0; index4 < 30; ++index4) + { + int index5 = Dust.NewDust(this.position, this.width, this.height, 135, Alpha: 200, Scale: 1.7f); + Main.dust[index5].noGravity = true; + Main.dust[index5].velocity *= 3f; + Main.dust[index5].shader = GameShaders.Armor.GetSecondaryShader(Main.player[this.owner].cPet, Main.player[this.owner]); + int index6 = Dust.NewDust(this.position, this.width, this.height, 135, Alpha: 100); + Main.dust[index6].velocity *= 2f; + Main.dust[index6].noGravity = true; + Main.dust[index6].fadeIn = 2.5f; + Main.dust[index6].shader = GameShaders.Armor.GetSecondaryShader(Main.player[this.owner].cPet, Main.player[this.owner]); + } + } + else + { + for (int index7 = 0; index7 < 2; ++index7) + { + int index8 = Dust.NewDust(this.position, this.width, this.height, 135, Alpha: 200, Scale: 1.7f); + Main.dust[index8].noGravity = true; + Main.dust[index8].velocity *= 3f; + Main.dust[index8].noLight = true; + Main.dust[index8].shader = GameShaders.Armor.GetSecondaryShader(Main.player[this.owner].cPet, Main.player[this.owner]); + int index9 = Dust.NewDust(this.position, this.width, this.height, 135, Alpha: 100); + Main.dust[index9].velocity *= 2f; + Main.dust[index9].noGravity = true; + Main.dust[index9].fadeIn = 2.5f; + Main.dust[index9].noLight = true; + Main.dust[index9].shader = GameShaders.Armor.GetSecondaryShader(Main.player[this.owner].cPet, Main.player[this.owner]); + } + } + this.velocity = this.velocity * 0.7f; + this.Center = Vector2.Lerp(this.Center, Other, 0.2f); + if ((double) this.Distance(Other) >= 10.0) + return; + this.ai[0] = 1f; + this.netUpdate = true; + } + } + + private void AI_120_StardustGuardian_FindTarget( + float lookupRange, + ref int targetNPCIndex, + ref float distanceToClosestTarget) + { + Vector2 center = Main.player[this.owner].Center; + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.CanBeChasedBy((object) this)) + { + float num = center.Distance(npc.Center); + if ((double) num < (double) lookupRange) + { + targetNPCIndex = index; + distanceToClosestTarget = num; + lookupRange = num; + } + } + } + } + + private void AI_180_FairyQueenSunDance() + { + if ((double) this.localAI[0] == 0.0) + SoundEngine.PlaySound(SoundID.Item159, this.Center); + ++this.localAI[0]; + float num1 = 180f; + double num2 = (double) this.ai[0] / 6.28318548202515; + float num3 = 0.3490659f; + if ((double) this.localAI[0] >= (double) num1) + { + this.Kill(); + } + else + { + this.alpha -= 15; + if (this.alpha < 0) + this.alpha = 0; + this.scale = Utils.GetLerpValue(0.0f, 20f, this.localAI[0], true) * Utils.GetLerpValue(num1, num1 - 60f, this.localAI[0], true); + this.rotation = this.ai[0] + Utils.GetLerpValue(50f, num1, this.localAI[0], true) * num3; + int index = (int) this.ai[1]; + if (Main.npc.IndexInRange(index)) + { + NPC npc = Main.npc[index]; + if (npc.active && npc.type == 636) + this.Center = npc.Center; + this.velocity = Vector2.Zero; + Vector2 rotationVector2 = this.rotation.ToRotationVector2(); + Vector3 vector3 = Main.hslToRgb((float) (((double) this.ai[0] / 6.28318548202515 + (double) this.localAI[0] / (double) num1) % 1.0), 1f, 0.85f).ToVector3() * this.scale; + float num4 = 800f * this.scale; + DelegateMethods.v3_1 = vector3; + for (float num5 = 0.0f; (double) num5 <= 1.0; num5 += 0.08333334f) + { + Point tileCoordinates = (this.Center + rotationVector2 * num4 * num5).ToTileCoordinates(); + DelegateMethods.CastLightOpen(tileCoordinates.X, tileCoordinates.Y); + } + } + else + this.Kill(); + } + } + + private void AI_179_FairyQueenLance() + { + ++this.localAI[0]; + if ((double) this.localAI[0] >= 60.0) + { + this.velocity = this.ai[0].ToRotationVector2() * 40f; + if (Main.rand.Next(3) == 0) + { + Dust dust = Dust.NewDustPerfect(this.Center, 267); + dust.fadeIn = 1f; + dust.noGravity = true; + dust.alpha = 100; + dust.color = Color.Lerp(this.AI_171_GetColor(), Color.White, Main.rand.NextFloat() * 0.4f); + dust.noLightEmittence = true; + dust.scale *= 1.5f; + } + } + if ((double) this.localAI[0] >= 360.0) + { + this.Kill(); + } + else + { + this.alpha = (int) MathHelper.Lerp((float) byte.MaxValue, 0.0f, Utils.GetLerpValue(0.0f, 20f, this.localAI[0], true)); + this.rotation = this.ai[0]; + } + } + + private void AI_176_EdgyLightning() + { + int index = (int) this.ai[0] - 1; + if (index != -1 && (!Main.npc[index].CanBeChasedBy((object) this) || this.localNPCImmunity[index] != 0)) + { + this.ai[0] = 0.0f; + index = -1; + } + if (index == -1) + { + NPC targetWithinRange = this.FindTargetWithinRange(400f); + if (targetWithinRange != null) + { + index = targetWithinRange.whoAmI; + this.ai[0] = (float) (index + 1); + this.netUpdate = true; + } + } + if (index != -1) + { + Vector2 vec = this.DirectionTo(Main.npc[index].Center); + if (vec.HasNaNs()) + { + this.Kill(); + } + else + { + this.velocity = vec * 10f; + this.rotation = this.velocity.ToRotation(); + if (++this.frameCounter < 3) + return; + this.frameCounter = 0; + this.frame = Main.rand.Next(Main.projFrames[this.type]); + } + } + else + this.Kill(); + } + + private NPC FindTargetWithinRange(float maxRange) + { + NPC npc1 = (NPC) null; + float num1 = maxRange; + for (int index = 0; index < 200; ++index) + { + NPC npc2 = Main.npc[index]; + if (npc2.CanBeChasedBy((object) this) && this.localNPCImmunity[index] == 0) + { + float num2 = this.Distance(npc2.Center); + if ((double) num1 > (double) num2) + { + num1 = num2; + npc1 = npc2; + } + } + } + return npc1; + } + + private void AI_177_IceWhipSlicer() + { + Player player = Main.player[this.owner]; + if (!player.active || player.dead) + { + player.coolWhipBuff = false; + this.Kill(); + } + else + { + if (player.coolWhipBuff) + this.timeLeft = 2; + int index = (int) this.ai[0] - 1; + if (index != -1 && (!Main.npc[index].CanBeChasedBy((object) this) || this.localNPCImmunity[index] > 0)) + { + this.ai[0] = 0.0f; + index = -1; + } + if (index == -1) + { + NPC targetWithinRange = this.FindTargetWithinRange(400f); + if (targetWithinRange != null) + { + index = targetWithinRange.whoAmI; + this.ai[0] = (float) (index + 1); + this.netUpdate = true; + } + } + float num1 = 8f; + float amount = 0.3f; + if (index != -1) + { + NPC npc = Main.npc[index]; + float num2 = this.Distance(npc.Center); + if ((double) num1 > (double) num2) + num1 = num2; + Vector2 vec = this.DirectionTo(npc.Center); + if (!vec.HasNaNs()) + this.velocity = Vector2.Lerp(this.velocity, vec * num1, amount); + } + else + this.velocity = this.velocity * 0.92f; + this.rotation += (float) (0.0209439527243376 + (double) Math.Abs(this.velocity.X) * 0.200000002980232); + if (Main.rand.Next(3) != 0) + return; + Dust dust = Dust.NewDustDirect(this.Center, 0, 0, 43, this.velocity.X, this.velocity.Y, 254, Color.White, 0.5f); + Vector2 vector2 = Main.rand.NextVector2Circular(1f, 1f); + dust.position = this.Center + vector2 * 10f; + dust.velocity = vector2; + } + } + + private void AI_178_FireExplosion() + { + if ((double) this.localAI[0] == 0.0) + { + SoundEngine.PlaySound(SoundID.Item14, this.position); + for (int index1 = 0; index1 < 4; ++index1) + { + int index2 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index2].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + } + for (int index3 = 0; index3 < 30; ++index3) + { + int index4 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 200, Scale: 3.7f); + Main.dust[index4].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.dust[index4].noGravity = true; + Main.dust[index4].velocity *= 3f; + int index5 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 1.5f); + Main.dust[index5].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.dust[index5].velocity *= 2f; + Main.dust[index5].noGravity = true; + Main.dust[index5].fadeIn = 2.5f; + } + for (int index6 = 0; index6 < 10; ++index6) + { + int index7 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Scale: 2.7f); + Main.dust[index7].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index7].noGravity = true; + Main.dust[index7].velocity *= 3f; + } + for (int index8 = 0; index8 < 10; ++index8) + { + int index9 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Scale: 1.5f); + Main.dust[index9].position = this.Center + Vector2.UnitX.RotatedByRandom(3.14159274101257).RotatedBy((double) this.velocity.ToRotation()) * (float) this.width / 2f; + Main.dust[index9].noGravity = true; + Main.dust[index9].velocity *= 3f; + } + for (int index10 = 0; index10 < 2; ++index10) + { + int index11 = Gore.NewGore(this.position + new Vector2((float) (this.width * Main.rand.Next(100)) / 100f, (float) (this.height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index11].position = this.Center + Vector2.UnitY.RotatedByRandom(3.14159274101257) * (float) Main.rand.NextDouble() * (float) this.width / 2f; + Main.gore[index11].velocity *= 0.3f; + Main.gore[index11].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index11].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + } + ++this.localAI[0]; + if ((double) this.localAI[0] < 10.0) + return; + this.Kill(); + } + + private void AI_175_TitaniumStormShards() + { + Player player = Main.player[this.owner]; + if (!player.active || player.dead || !player.hasTitaniumStormBuff) + { + this.Kill(); + } + else + { + if (this.frameCounter == 0) + { + this.frameCounter = 1; + this.frame = Main.rand.Next(12); + this.rotation = Main.rand.NextFloat() * 6.283185f; + } + this.rotation += (float) Math.PI / 200f; + int index; + int totalIndexesInGroup; + this.AI_GetMyGroupIndexAndFillBlackList((List) null, out index, out totalIndexesInGroup); + double num1 = ((double) index / (double) totalIndexesInGroup + (double) player.miscCounterNormalized * 6.0) * 6.28318548202515; + float num2 = (float) (24.0 + (double) totalIndexesInGroup * 6.0); + this.Center = this.Center + (player.position - player.oldPosition); + Vector2 rotationVector2 = ((float) num1).ToRotationVector2(); + this.localAI[0] = rotationVector2.Y; + this.Center = Vector2.Lerp(this.Center, player.Center + rotationVector2 * new Vector2(1f, 0.05f) * num2, 0.3f); + } + } + + private void AI_174_MultisegmentPet() + { + Player player = Main.player[this.owner]; + if (!player.active) + { + this.active = false; + } + else + { + if (this.type == 883) + { + if (player.dead) + player.petFlagEaterOfWorldsPet = false; + if (player.petFlagEaterOfWorldsPet) + this.timeLeft = 2; + } + if (this.type == 887) + { + if (player.dead) + player.petFlagDestroyerPet = false; + if (player.petFlagDestroyerPet) + this.timeLeft = 2; + } + if (this.type == 893) + { + if (player.dead) + player.petFlagLunaticCultistPet = false; + if (player.petFlagLunaticCultistPet) + this.timeLeft = 2; + } + Vector2 center = player.Center; + if ((double) this.Distance(center) > 2000.0) + { + this.Center = center; + this.velocity = Vector2.Zero; + this.netUpdate = true; + } + float num1 = (center - this.Center).Length(); + float num2 = Math.Min(12f, Math.Max(4f, player.velocity.Length())); + double num3 = (double) this.velocity.Length(); + if (this.velocity == Vector2.Zero) + { + this.velocity.X = 2f * (float) player.direction; + Vector2 position = this.position; + for (int index = 0; index < this.oldPos.Length; ++index) + { + position -= this.velocity; + this.oldPos[index] = position; + } + } + if ((double) num1 >= 120.0) + { + float targetAngle = this.AngleTo(center); + this.velocity = this.velocity.ToRotation().AngleTowards(targetAngle, MathHelper.ToRadians(5f)).ToRotationVector2() * num2; + } + if ((double) this.velocity.Length() > (double) num2) + this.velocity = this.velocity.SafeNormalize(Vector2.Zero) * num2; + if ((double) Math.Abs(this.velocity.Y) < 1.0) + this.velocity.Y -= 0.1f; + this.rotation = this.velocity.ToRotation() + 1.570796f; + int direction1 = this.direction; + this.direction = this.spriteDirection = (double) this.velocity.X > 0.0 ? 1 : -1; + int direction2 = this.direction; + if (direction1 != direction2) + this.netUpdate = true; + this.position.X = MathHelper.Clamp(this.position.X, 160f, (float) (Main.maxTilesX * 16 - 160)); + this.position.Y = MathHelper.Clamp(this.position.Y, 160f, (float) (Main.maxTilesY * 16 - 160)); + } + } + + private void AI_173_HallowBossRainbowTrail() + { + this.Opacity = Utils.GetLerpValue(0.0f, 60f, (float) this.timeLeft, true) * Utils.GetLerpValue(660f, 600f, (float) this.timeLeft, true); + float num1 = (float) Math.PI / 360f; + float num2 = 30f; + this.velocity = this.velocity.RotatedBy((double) this.ai[0]); + if ((double) this.ai[0] < (double) num1) + this.ai[0] += num1 / num2; + this.rotation = this.velocity.ToRotation() + 1.570796f; + } + + public Color AI_173_GetColor() + { + if (!NPC.ShouldEmpressBeEnraged()) + return Main.hslToRgb((float) (((double) this.ai[1] + 0.0) % 1.0), 1f, 0.5f) * this.Opacity; + float lerpValue = Utils.GetLerpValue(0.0f, 60f, (float) (int) Main.time, true); + return Color.Lerp(Color.White, Main.OurFavoriteColor, lerpValue) * this.Opacity; + } + + private void AI_171_HallowBossRainbowStreak() + { + bool flag1 = false; + bool flag2 = false; + float from = 140f; + float num1 = 30f; + float num2 = 0.98f; + float num3 = 0.05f; + float num4 = 0.1f; + float num5 = 30f; + if (this.type == 931) + { + from = 180f; + num1 = 20f; + num5 = 30f; + num2 = 0.97f; + num3 = 0.075f; + num4 = 0.125f; + if (this.timeLeft == 238) + { + int alpha = this.alpha; + this.alpha = 0; + Color queenWeaponsColor = this.GetFairyQueenWeaponsColor(); + this.alpha = alpha; + for (int index = 0; index < 3; ++index) + { + Dust dust = Dust.NewDustPerfect(this.Center, 267, new Vector2?(Main.rand.NextVector2CircularEdge(3f, 3f) * (float) ((double) Main.rand.NextFloat() * 0.5 + 0.5)), newColor: queenWeaponsColor); + dust.scale *= 1.2f; + dust.noGravity = true; + } + } + } + if ((double) this.timeLeft > (double) from) + flag1 = true; + else if ((double) this.timeLeft > (double) num1) + flag2 = true; + if (flag1) + { + float num6 = (float) Math.Cos((double) this.whoAmI % 6.0 / 6.0 + (double) this.position.X / 320.0 + (double) this.position.Y / 160.0); + this.velocity = this.velocity * num2; + this.velocity = this.velocity.RotatedBy((double) num6 * 6.28318548202515 * 0.125 * 1.0 / 30.0); + } + if (this.friendly) + { + int index = (int) this.ai[0]; + if (Main.npc.IndexInRange(index) && !Main.npc[index].CanBeChasedBy((object) this)) + { + index = -1; + this.ai[0] = -1f; + this.netUpdate = true; + } + if (index == -1) + { + int targetWithLineOfSight = this.FindTargetWithLineOfSight(); + if (targetWithLineOfSight != -1) + { + this.ai[0] = (float) targetWithLineOfSight; + this.netUpdate = true; + } + } + } + if (flag2) + { + int index = (int) this.ai[0]; + Vector2 vector2 = this.velocity; + if (this.hostile && Main.player.IndexInRange(index)) + vector2 = this.DirectionTo(Main.player[index].Center) * num5; + if (this.friendly) + { + if (Main.npc.IndexInRange(index)) + vector2 = this.DirectionTo(Main.npc[index].Center) * num5; + else + this.timeLeft -= 2; + } + float amount = MathHelper.Lerp(num3, num4, Utils.GetLerpValue(from, 30f, (float) this.timeLeft, true)); + this.velocity = Vector2.SmoothStep(this.velocity, vector2, amount); + if (this.type == 931) + this.velocity = this.velocity * MathHelper.Lerp(0.85f, 1f, Utils.GetLerpValue(0.0f, 90f, (float) this.timeLeft, true)); + } + this.Opacity = Utils.GetLerpValue(240f, 220f, (float) this.timeLeft, true); + this.rotation = this.velocity.ToRotation() + 1.570796f; + } + + public Color AI_171_GetColor() + { + if (!NPC.ShouldEmpressBeEnraged()) + return Main.hslToRgb((float) (((double) this.ai[1] + 0.5) % 1.0), 1f, 0.5f) * this.Opacity; + float lerpValue = Utils.GetLerpValue(0.0f, 60f, (float) (int) Main.time, true); + return Color.Lerp(Color.White, Main.OurFavoriteColor, lerpValue) * this.Opacity; + } + + private void AI_172_HallowBossRainbowPelletStorm() + { + if ((double) this.localAI[1] <= 90.0) + { + ++this.localAI[1]; + this.scale = 0.5f; + this.Opacity = 0.5f; + float lerpValue = Utils.GetLerpValue(0.0f, 90f, this.localAI[1], false); + this.scale = MathHelper.Lerp(5f, 1f, lerpValue); + this.Opacity = (float) (1.0 - (1.0 - (double) lerpValue * (double) lerpValue)); + } + else + { + this.scale = 1f; + this.Opacity = 1f; + float num = (float) (150.0 + 10.0 * (double) this.AI_172_GetPelletStormsCount()); + ++this.localAI[0]; + if ((double) this.localAI[0] >= (double) num) + { + this.Kill(); + } + else + { + this.velocity = Vector2.Zero; + this.rotation = 0.0f; + int pelletStormsCount = this.AI_172_GetPelletStormsCount(); + for (int stormIndex = 0; stormIndex < pelletStormsCount; ++stormIndex) + { + Projectile.HallowBossPelletStormInfo pelletStormInfo = this.AI_172_GetPelletStormInfo(stormIndex); + for (int bulletIndex = 0; bulletIndex < pelletStormInfo.BulletsInStorm; ++bulletIndex) + { + if (pelletStormInfo.IsValid(bulletIndex)) + pelletStormInfo.GetBulletPosition(bulletIndex, this.Center); + } + } + } + } + } + + public int AI_172_GetPelletStormsCount() => 6; + + public Projectile.HallowBossPelletStormInfo AI_172_GetPelletStormInfo(int stormIndex) + { + float from = (float) (0.0 + (double) stormIndex * 10.0); + float to = (float) (90.0 + (double) stormIndex * 10.0); + return new Projectile.HallowBossPelletStormInfo() + { + StartAngle = (float) ((double) stormIndex * 1.04719758033752 - 1.57079637050629 + (double) stormIndex * 0.628318548202515), + AnglePerBullet = 2.094395f, + BulletsInStorm = 3, + BulletsProgressInStormStartNormalized = Utils.GetLerpValue(from, to, this.localAI[0], false), + BulletsProgressInStormBonusByIndexNormalized = 0.0f, + StormTotalRange = 500f, + BulletSize = new Vector2(16f, 16f) + }; + } + + private int FindTargetWithLineOfSight(float maxRange = 800f) + { + float num1 = maxRange; + int num2 = -1; + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + bool flag = npc.CanBeChasedBy((object) this); + if (this.localNPCImmunity[index] != 0) + flag = false; + if (flag) + { + float num3 = this.Distance(Main.npc[index].Center); + if ((double) num3 < (double) num1 && Collision.CanHit(this.position, this.width, this.height, npc.position, npc.width, npc.height)) + { + num1 = num3; + num2 = index; + } + } + } + return num2; + } + + private void AI_170_FairyGlowstick() + { + Point tileCoordinates = this.Center.ToTileCoordinates(); + Vector2 vector2_1 = tileCoordinates.ToVector2(); + int num1 = 10; + Vector2 zero = Vector2.Zero; + int num2 = 0; + float num3 = 3f; + if ((double) this.ai[1] == 1.0) + { + SoundEngine.PlaySound(SoundID.Item28, this.position); + this.rotation = 0.0f; + this.velocity.X = 0.0f; + this.ai[1] = 2f; + } + ++this.frameCounter; + if (this.frameCounter > 4) + { + this.frameCounter = 0; + ++this.frame; + if (this.frame >= Main.projFrames[this.type]) + this.frame = 0; + } + if ((double) this.velocity.Length() > 1.0 && this.timeLeft % 10 == 0) + { + for (int i = tileCoordinates.X - num1; i < tileCoordinates.X + num1 + 1; ++i) + { + for (int j = tileCoordinates.Y - num1; j < tileCoordinates.Y + num1 + 1; ++j) + { + if (WorldGen.SolidTile(i, j)) + { + Vector2 v = vector2_1 - new Vector2((float) i, (float) j); + Vector2 vector2_2 = v.SafeNormalize(Vector2.Zero) * Math.Max((float) num1 - v.Length(), 0.0f) * num3; + zero += vector2_2; + ++num2; + } + } + } + if (num2 > 0) + zero /= (float) num2; + if ((double) zero.Length() > 1.0) + this.velocity = zero; + } + this.velocity = this.velocity * 0.95f; + if ((double) this.velocity.Length() >= 1.0) + return; + this.velocity = Vector2.Zero; + this.netUpdate = true; + } + + private void AI_169_Smolstars() + { + Player player = Main.player[this.owner]; + int num1 = this.type == 864 ? 1 : 0; + Vector2 vector2_1 = player.Top + new Vector2(0.0f, -30f); + if (num1 != 0) + { + if (player.dead) + player.smolstar = false; + if (player.smolstar) + this.timeLeft = 2; + if ((double) this.ai[0] == 0.0) + { + int index; + int totalIndexesInGroup; + this.AI_GetMyGroupIndexAndFillBlackList((List) null, out index, out totalIndexesInGroup); + float num2 = 6.283185f / (float) totalIndexesInGroup; + float num3 = (float) totalIndexesInGroup * 0.66f; + Vector2 vector2_2 = new Vector2(30f, 6f) / 5f * (float) (totalIndexesInGroup - 1); + Vector2 vector2_3 = Vector2.UnitY.RotatedBy((double) num2 * (double) index + (double) Main.GlobalTimeWrappedHourly % (double) num3 / (double) num3 * 6.28318548202515); + Vector2 vec = vector2_1 + vector2_3 * vector2_2; + vec.Y += player.gfxOffY; + vector2_1 = vec.Floor(); + } + } + if ((double) this.ai[0] == 0.0) + { + Vector2 vector2_4 = vector2_1 - this.Center; + float num4 = 10f + Utils.GetLerpValue(200f, 600f, vector2_4.Length(), true) * 30f; + if ((double) vector2_4.Length() >= 3000.0) + this.Center = vector2_1; + this.velocity = vector2_4; + if ((double) this.velocity.Length() > (double) num4) + this.velocity = this.velocity * (num4 / this.velocity.Length()); + int startAttackRange = 800; + int attackTarget = -1; + this.Minion_FindTargetInRange(startAttackRange, ref attackTarget, false); + if (attackTarget != -1) + { + this.ai[0] = 60f; + this.ai[1] = (float) attackTarget; + this.netUpdate = true; + } + float targetAngle = this.velocity.SafeNormalize(Vector2.UnitY).ToRotation() + 1.570796f; + if ((double) vector2_4.Length() < 40.0) + targetAngle = Vector2.UnitY.ToRotation() + 1.570796f; + this.rotation = this.rotation.AngleLerp(targetAngle, 0.2f); + } + else if ((double) this.ai[0] == -1.0) + { + if ((double) this.ai[1] == 0.0) + { + SoundEngine.PlaySound(0, (int) this.position.X, (int) this.position.Y); + for (int index = 0; index < 2; ++index) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 15, this.oldVelocity.X * 0.2f, this.oldVelocity.Y * 0.2f, Scale: 1.4f); + if (Main.rand.Next(3) != 0) + { + dust.scale *= 1.3f; + dust.velocity *= 1.1f; + } + dust.noGravity = true; + dust.fadeIn = 0.0f; + } + this.velocity = this.velocity + Main.rand.NextVector2CircularEdge(4f, 4f); + } + ++this.ai[1]; + this.rotation += (float) ((double) this.velocity.X * 0.100000001490116 + (double) this.velocity.Y * 0.0500000007450581); + this.velocity = this.velocity * 0.92f; + if ((double) this.ai[1] < 9.0) + return; + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + } + else + { + NPC npc = (NPC) null; + int index1 = (int) this.ai[1]; + if (Main.npc.IndexInRange(index1) && Main.npc[index1].CanBeChasedBy((object) this)) + npc = Main.npc[index1]; + if (npc == null) + { + this.ai[0] = -1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + } + else if ((double) player.Distance(npc.Center) >= 900.0) + { + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + this.netUpdate = true; + } + else + { + Vector2 vector2_5 = npc.Center - this.Center; + float num5 = 16f; + this.velocity = vector2_5; + if ((double) this.velocity.Length() > (double) num5) + this.velocity = this.velocity * (num5 / this.velocity.Length()); + this.rotation = this.rotation.AngleLerp(this.velocity.SafeNormalize(Vector2.UnitY).ToRotation() + 1.570796f, 0.4f); + } + float num6 = 0.1f; + float num7 = (float) (this.width * 5); + for (int index2 = 0; index2 < 1000; ++index2) + { + if (index2 != this.whoAmI && Main.projectile[index2].active && Main.projectile[index2].owner == this.owner && Main.projectile[index2].type == this.type && (double) Math.Abs(this.position.X - Main.projectile[index2].position.X) + (double) Math.Abs(this.position.Y - Main.projectile[index2].position.Y) < (double) num7) + { + if ((double) this.position.X < (double) Main.projectile[index2].position.X) + this.velocity.X -= num6; + else + this.velocity.X += num6; + if ((double) this.position.Y < (double) Main.projectile[index2].position.Y) + this.velocity.Y -= num6; + else + this.velocity.Y += num6; + } + } + } + } + + private void AI_019_Spears() + { + Player player = Main.player[this.owner]; + Vector2 vector2_1 = player.RotatedRelativePoint(player.MountedCenter); + this.direction = player.direction; + player.heldProj = this.whoAmI; + player.itemTime = player.itemAnimation; + this.Center = vector2_1; + bool flag1 = Main.player[this.owner].itemAnimation < Main.player[this.owner].itemAnimationMax / 3; + int itemAnimationMax = player.itemAnimationMax; + int itemAnimation = player.itemAnimation; + int frames = Main.player[this.owner].itemAnimationMax / 3; + float num1 = MathHelper.Min((float) itemAnimation, (float) frames); + float num2 = (float) itemAnimation - num1; + float num3 = 0.0f; + float num4 = 0.0f; + float num5 = 0.0f; + bool flag2 = false; + switch (this.type) + { + case 46: + num3 = 3f; + num5 = 1.6f; + num4 = 1.4f; + break; + case 47: + num3 = 4f; + num5 = 1.2f; + num4 = 0.9f; + break; + case 49: + this.spriteDirection = -this.direction; + num3 = 4f; + num5 = 1.1f; + num4 = 0.85f; + break; + case 64: + case 215: + this.spriteDirection = -this.direction; + num3 = 3f; + num5 = 1.9f; + num4 = 1.7f; + break; + case 66: + case 97: + case 212: + case 218: + this.spriteDirection = -this.direction; + num3 = 3f; + num5 = 2.1f; + num4 = 1.9f; + break; + case 105: + num3 = 3f; + num5 = 2.4f; + num4 = 2.1f; + break; + case 130: + this.spriteDirection = -this.direction; + num3 = 3f; + num5 = 1.3f; + num4 = 1f; + break; + case 153: + this.spriteDirection = -this.direction; + num3 = 4f; + num5 = 1.5f; + num4 = 1.3f; + break; + case 222: + num3 = 3f; + num5 = 2.4f; + num4 = 2.1f; + break; + case 342: + num3 = 3f; + num5 = 2.4f; + num4 = 2.1f; + break; + case 367: + this.spriteDirection = -this.direction; + num3 = 3f; + num5 = 1.6f; + num4 = 1.5f; + break; + case 368: + this.spriteDirection = -this.direction; + num3 = 3f; + num5 = 1.5f; + num4 = 1.4f; + break; + case 730: + this.spriteDirection = -this.direction; + num3 = 8f; + num5 = 1.5f; + num4 = 1.2f; + break; + case 877: + case 878: + case 879: + this.alpha -= 40; + if (this.alpha < 0) + this.alpha = 0; + num3 = 28f; + num5 = 0.4f; + num4 = 0.4f; + flag2 = true; + break; + } + float num6 = (float) (itemAnimationMax - frames) - num2; + float num7 = (float) frames - num1; + this.position = this.position + this.velocity * (float) ((double) num3 + (double) num4 * (double) num6 - (double) num5 * (double) num7); + switch (this.type) + { + case 130: + if (((double) this.localAI[0] == 0.0 || (double) this.localAI[0] == 4.0 || (double) this.localAI[0] == 8.0 || (double) this.localAI[0] == 12.0 || (double) this.localAI[0] == 16.0 || (double) this.localAI[0] == 20.0 || (double) this.localAI[0] == 24.0) && this.owner == Main.myPlayer) + Projectile.NewProjectile(this.Center.X, this.Center.Y, this.velocity.X, this.velocity.Y, 131, this.damage / 3, 0.0f, this.owner); + ++this.localAI[0]; + break; + case 222: + if (flag1 && (double) this.localAI[0] == 0.0 && Main.myPlayer == this.owner) + { + this.localAI[0] = 1f; + Projectile.NewProjectile(this.Center.X, this.Center.Y, this.velocity.X, this.velocity.Y, 228, this.damage, this.knockBack, this.owner); + break; + } + break; + case 342: + if (flag1 && (double) this.localAI[0] == 0.0 && Main.myPlayer == this.owner) + { + this.localAI[0] = 1f; + if (Collision.CanHit(player.position, player.width, player.height, this.position, this.width, this.height)) + { + Projectile.NewProjectile(this.Center.X, this.Center.Y, this.velocity.X * 2.4f, this.velocity.Y * 2.4f, 343, (int) ((double) this.damage * 0.8), this.knockBack * 0.85f, this.owner); + break; + } + break; + } + break; + case 730: + if ((double) this.localAI[0] == 0.0 && Main.myPlayer == this.owner) + { + this.localAI[0] = 1f; + Vector2 vector2_2 = this.velocity * 4f; + Projectile.NewProjectile(this.Center.X, this.Center.Y, vector2_2.X, vector2_2.Y, 732, (int) ((double) this.damage * 1.25), this.knockBack * 0.5f, this.owner); + break; + } + break; + } + if (flag2 && player.channel && player.itemAnimation < frames) + player.SetDummyItemTime(frames); + if (player.itemAnimation == 0) + this.Kill(); + this.rotation = (float) (Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.57079637050629 + 0.785398185253143); + if (this.spriteDirection == -1) + this.rotation -= 1.570796f; + if (this.type == 878 || this.type == 879) + { + float num8 = 6f; + float num9 = 0.8f; + float num10 = Vector2.Dot(this.velocity.SafeNormalize(Vector2.UnitX * (float) player.direction), player.velocity.SafeNormalize(Vector2.UnitX * (float) player.direction)); + float num11 = player.velocity.Length(); + if ((double) num11 > (double) num8 && (double) num10 > (double) num9) + { + int maxValue = 8; + if ((double) num11 > (double) num8 + 1.0) + maxValue = 5; + if ((double) num11 > (double) num8 + 2.0) + maxValue = 2; + int Type1 = 14; + int Type2 = 27; + int num12 = 4; + if (this.type == 879) + { + Type1 = 43; + Type2 = 57; + } + if (Main.rand.Next(maxValue + 3) == 0) + Dust.NewDust(this.Center - new Vector2((float) num12, (float) num12), num12 * 2, num12 * 2, Type1, Alpha: 150, Scale: 1.4f); + if (Main.rand.Next(maxValue) == 0) + { + int index1 = Dust.NewDust(this.Center - new Vector2((float) num12, (float) num12), num12 * 2, num12 * 2, Type2, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 100, Scale: 1.2f); + Main.dust[index1].noGravity = true; + Main.dust[index1].velocity *= 0.25f; + int index2 = Dust.NewDust(this.Center - new Vector2((float) num12, (float) num12), num12 * 2, num12 * 2, Type2, Alpha: 150, Scale: 1.4f); + Main.dust[index2].velocity *= 0.25f; + } + } + } + if (this.type == 46) + { + if (Main.rand.Next(5) == 0) + Dust.NewDust(this.position, this.width, this.height, 14, Alpha: 150, Scale: 1.4f); + int index3 = Dust.NewDust(this.position, this.width, this.height, 27, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 100, Scale: 1.2f); + Main.dust[index3].noGravity = true; + Main.dust[index3].velocity /= 2f; + int index4 = Dust.NewDust(this.position - this.velocity * 2f, this.width, this.height, 27, Alpha: 150, Scale: 1.4f); + Main.dust[index4].velocity /= 5f; + } + if (this.type == 730) + { + if (Main.rand.Next(5) == 0) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 226, Alpha: 150, Scale: 0.7f); + dust.noGravity = true; + dust.velocity *= 1.4f; + } + if (Main.rand.Next(5) != 0) + return; + Dust.NewDustDirect(this.position, this.width, this.height, 226, Alpha: 150, Scale: 0.5f).velocity.Y -= 0.5f; + } + else if (this.type == 105) + { + if (Main.rand.Next(3) == 0) + { + int index = Dust.NewDust(this.position, this.width, this.height, 57, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 200, Scale: 1.2f); + Main.dust[index].velocity += this.velocity * 0.3f; + Main.dust[index].velocity *= 0.2f; + } + if (Main.rand.Next(4) != 0) + return; + int index5 = Dust.NewDust(this.position, this.width, this.height, 43, Alpha: 254, Scale: 0.3f); + Main.dust[index5].velocity += this.velocity * 0.5f; + Main.dust[index5].velocity *= 0.5f; + } + else + { + if (this.type != 153) + return; + int index = Dust.NewDust(this.position - this.velocity * 3f, this.width, this.height, 115, this.velocity.X * 0.4f, this.velocity.Y * 0.4f, 140); + Main.dust[index].noGravity = true; + Main.dust[index].fadeIn = 1.25f; + Main.dust[index].velocity *= 0.25f; + } + } + + private void AI_019_Spears_Old() + { + Vector2 vector2_1 = Main.player[this.owner].RotatedRelativePoint(Main.player[this.owner].MountedCenter); + this.direction = Main.player[this.owner].direction; + Main.player[this.owner].heldProj = this.whoAmI; + Main.player[this.owner].itemTime = Main.player[this.owner].itemAnimation; + this.position.X = vector2_1.X - (float) (this.width / 2); + this.position.Y = vector2_1.Y - (float) (this.height / 2); + bool flag = Main.player[this.owner].itemAnimation < Main.player[this.owner].itemAnimationMax / 3; + if (!Main.player[this.owner].frozen) + { + if (this.type == 46) + { + if ((double) this.ai[0] == 0.0) + { + this.ai[0] = 3f; + this.netUpdate = true; + } + if (flag) + this.ai[0] -= 1.6f; + else + this.ai[0] += 1.4f; + } + else if (this.type == 105) + { + if ((double) this.ai[0] == 0.0) + { + this.ai[0] = 3f; + this.netUpdate = true; + } + if (flag) + this.ai[0] -= 2.4f; + else + this.ai[0] += 2.1f; + } + else if (this.type == 367) + { + this.spriteDirection = -this.direction; + if ((double) this.ai[0] == 0.0) + { + this.ai[0] = 3f; + this.netUpdate = true; + } + if (flag) + this.ai[0] -= 1.6f; + else + this.ai[0] += 1.5f; + } + else if (this.type == 368) + { + this.spriteDirection = -this.direction; + if ((double) this.ai[0] == 0.0) + { + this.ai[0] = 3f; + this.netUpdate = true; + } + if (flag) + this.ai[0] -= 1.5f; + else + this.ai[0] += 1.4f; + } + else if (this.type == 222) + { + if ((double) this.ai[0] == 0.0) + { + this.ai[0] = 3f; + this.netUpdate = true; + } + if (flag) + { + this.ai[0] -= 2.4f; + if ((double) this.localAI[0] == 0.0 && Main.myPlayer == this.owner) + { + this.localAI[0] = 1f; + Projectile.NewProjectile(this.Center.X + this.velocity.X * this.ai[0], this.Center.Y + this.velocity.Y * this.ai[0], this.velocity.X, this.velocity.Y, 228, this.damage, this.knockBack, this.owner); + } + } + else + this.ai[0] += 2.1f; + } + else if (this.type == 342) + { + if ((double) this.ai[0] == 0.0) + { + this.ai[0] = 3f; + this.netUpdate = true; + } + if (flag) + { + this.ai[0] -= 2.4f; + if ((double) this.localAI[0] == 0.0 && Main.myPlayer == this.owner) + { + this.localAI[0] = 1f; + if (Collision.CanHit(Main.player[this.owner].position, Main.player[this.owner].width, Main.player[this.owner].height, new Vector2(this.Center.X + this.velocity.X * this.ai[0], this.Center.Y + this.velocity.Y * this.ai[0]), this.width, this.height)) + Projectile.NewProjectile(this.Center.X + this.velocity.X * this.ai[0], this.Center.Y + this.velocity.Y * this.ai[0], this.velocity.X * 2.4f, this.velocity.Y * 2.4f, 343, (int) ((double) this.damage * 0.8), this.knockBack * 0.85f, this.owner); + } + } + else + this.ai[0] += 2.1f; + } + else if (this.type == 47) + { + if ((double) this.ai[0] == 0.0) + { + this.ai[0] = 4f; + this.netUpdate = true; + } + if (flag) + this.ai[0] -= 1.2f; + else + this.ai[0] += 0.9f; + } + else if (this.type == 153) + { + this.spriteDirection = -this.direction; + if ((double) this.ai[0] == 0.0) + { + this.ai[0] = 4f; + this.netUpdate = true; + } + if (flag) + this.ai[0] -= 1.5f; + else + this.ai[0] += 1.3f; + } + else if (this.type == 49) + { + if ((double) this.ai[0] == 0.0) + { + this.ai[0] = 4f; + this.netUpdate = true; + } + if (flag) + this.ai[0] -= 1.1f; + else + this.ai[0] += 0.85f; + } + else if (this.type == 730) + { + this.spriteDirection = -this.direction; + if ((double) this.ai[0] == 0.0) + { + this.ai[0] = 8f; + this.netUpdate = true; + if ((double) this.localAI[0] == 0.0 && Main.myPlayer == this.owner) + { + this.localAI[0] = 1f; + Vector2 vector2_2 = this.velocity * 4f; + Projectile.NewProjectile(this.Center.X + this.velocity.X * this.ai[0], this.Center.Y + this.velocity.Y * this.ai[0], vector2_2.X, vector2_2.Y, 732, (int) ((double) this.damage * 1.25), this.knockBack * 0.5f, this.owner); + } + } + if (flag) + this.ai[0] -= 1.5f; + else + this.ai[0] += 1.2f; + } + else if (this.type == 64 || this.type == 215) + { + this.spriteDirection = -this.direction; + if ((double) this.ai[0] == 0.0) + { + this.ai[0] = 3f; + this.netUpdate = true; + } + if (flag) + this.ai[0] -= 1.9f; + else + this.ai[0] += 1.7f; + } + else if (this.type == 66 || this.type == 97 || this.type == 212 || this.type == 218) + { + this.spriteDirection = -this.direction; + if ((double) this.ai[0] == 0.0) + { + this.ai[0] = 3f; + this.netUpdate = true; + } + if (flag) + this.ai[0] -= 2.1f; + else + this.ai[0] += 1.9f; + } + else if (this.type == 130) + { + this.spriteDirection = -this.direction; + if ((double) this.ai[0] == 0.0) + { + this.ai[0] = 3f; + this.netUpdate = true; + } + if (flag) + this.ai[0] -= 1.3f; + else + ++this.ai[0]; + } + } + this.position = this.position + this.velocity * this.ai[0]; + if (this.type == 130) + { + if ((double) this.ai[1] == 0.0 || (double) this.ai[1] == 4.0 || (double) this.ai[1] == 8.0 || (double) this.ai[1] == 12.0 || (double) this.ai[1] == 16.0 || (double) this.ai[1] == 20.0 || (double) this.ai[1] == 24.0) + Projectile.NewProjectile(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2), this.velocity.X, this.velocity.Y, 131, this.damage / 3, 0.0f, this.owner); + ++this.ai[1]; + } + if (Main.player[this.owner].itemAnimation == 0) + this.Kill(); + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 2.355f; + if (this.spriteDirection == -1) + this.rotation -= 1.57f; + if (this.type == 46) + { + if (Main.rand.Next(5) == 0) + Dust.NewDust(this.position, this.width, this.height, 14, Alpha: 150, Scale: 1.4f); + int index1 = Dust.NewDust(this.position, this.width, this.height, 27, this.velocity.X * 0.2f + (float) (this.direction * 3), this.velocity.Y * 0.2f, 100, Scale: 1.2f); + Main.dust[index1].noGravity = true; + Main.dust[index1].velocity.X /= 2f; + Main.dust[index1].velocity.Y /= 2f; + int index2 = Dust.NewDust(this.position - this.velocity * 2f, this.width, this.height, 27, Alpha: 150, Scale: 1.4f); + Main.dust[index2].velocity.X /= 5f; + Main.dust[index2].velocity.Y /= 5f; + } + if (this.type == 730) + { + if (Main.rand.Next(5) == 0) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 226, Alpha: 150, Scale: 0.7f); + dust.noGravity = true; + dust.velocity *= 1.4f; + } + if (Main.rand.Next(5) != 0) + return; + Dust.NewDustDirect(this.position, this.width, this.height, 226, Alpha: 150, Scale: 0.5f).velocity.Y -= 0.5f; + } + else if (this.type == 105) + { + if (Main.rand.Next(3) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 57, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 200, Scale: 1.2f); + Main.dust[index].velocity += this.velocity * 0.3f; + Main.dust[index].velocity *= 0.2f; + } + if (Main.rand.Next(4) != 0) + return; + int index3 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 43, Alpha: 254, Scale: 0.3f); + Main.dust[index3].velocity += this.velocity * 0.5f; + Main.dust[index3].velocity *= 0.5f; + } + else + { + if (this.type != 153) + return; + int index = Dust.NewDust(this.position - this.velocity * 3f, this.width, this.height, 115, this.velocity.X * 0.4f, this.velocity.Y * 0.4f, 140); + Main.dust[index].noGravity = true; + Main.dust[index].fadeIn = 1.25f; + Main.dust[index].velocity *= 0.25f; + } + } + + private void AI_168_FirstFractal() + { + float from = 60f; + if ((double) ++this.localAI[0] >= (double) from - 1.0) + { + this.Kill(); + } + else + { + if (this.frameCounter == 0) + { + this.frameCounter = 1; + this.frame = Main.rand.Next(15); + } + this.velocity = this.velocity.RotatedBy((double) this.ai[0]); + this.Opacity = Utils.GetLerpValue(0.0f, 12f, this.localAI[0], true) * Utils.GetLerpValue(from, from - 12f, this.localAI[0], true); + this.direction = (double) this.velocity.X > 0.0 ? 1 : -1; + this.spriteDirection = this.direction; + this.rotation = 0.7853982f * (float) this.spriteDirection + this.velocity.ToRotation(); + if (this.spriteDirection == -1) + this.rotation += 3.141593f; + if ((double) this.localAI[0] <= 7.0) + return; + Vector2 vector2 = this.Center - new Vector2(5f); + if (Main.rand.Next(15) != 0) + return; + Dust dust = Dust.NewDustPerfect(this.Center, 278, Alpha: 100, newColor: Color.Lerp(this.GetFirstFractalColor(), Color.White, Main.rand.NextFloat() * 0.3f)); + dust.scale = 0.7f; + dust.noGravity = true; + dust.velocity *= 0.5f; + dust.velocity += this.velocity * 2f; + } + } + + private void AI_167_SparkleGuitar() + { + float num = 90f; + if ((double) ++this.localAI[0] >= (double) num - 1.0) + { + this.Kill(); + } + else + { + float amount = this.localAI[0] / num; + Vector2 center = Main.player[this.owner].Center; + Vector2 vector2_1 = new Vector2(this.ai[0], this.ai[1]); + Vector2 vector2_2 = -this.velocity; + Vector2 vector2_3 = center + vector2_2 * 2f; + Vector2 vector2_4 = vector2_1 + vector2_2 * (float) (1.0 - (double) amount * 3.0); + this.Center = Vector2.CatmullRom(vector2_3, center, vector2_1, vector2_4, amount); + if (this.type != 856) + return; + Lighting.AddLight(this.Center, Color.HotPink.ToVector3() * 0.3f); + this.rotation = (float) (6.28318548202515 * (double) amount * 1.0); + } + } + + private void AI_164_StormTigerGem() + { + Player master = Main.player[this.owner]; + if (this.type == 831) + { + if (master.dead) + master.stormTiger = false; + if (master.stormTiger) + this.timeLeft = 2; + if (++this.frameCounter >= 4) + { + this.frameCounter = 0; + if (++this.frame >= 6) + this.frame = 0; + } + } + List blacklistedTargets = Projectile._ai164_blacklistedTargets; + blacklistedTargets.Clear(); + int index; + int totalIndexesInGroup; + this.AI_GetMyGroupIndexAndFillBlackList(blacklistedTargets, out index, out totalIndexesInGroup); + this.Center = Projectile.AI_164_GetHomeLocation(master, index, totalIndexesInGroup); + } + + public static Vector2 AI_164_GetHomeLocation( + Player master, + int stackedIndex, + int totalIndexes) + { + int num1 = master.bodyFrame.Height; + if (num1 == 0) + num1 = 1; + Vector2 vector2_1 = Main.OffsetsPlayerHeadgear[master.bodyFrame.Y / num1]; + vector2_1.Y -= 2f; + float num2 = master.miscCounterNormalized * 2f; + int num3 = stackedIndex / 4; + int num4 = totalIndexes / 4; + if (totalIndexes % 4 > 0) + ++num4; + int num5 = (totalIndexes - num3 * 4) % 4; + if (num5 == 0) + num5 = 4; + if (num4 - 1 != num3) + num5 = 4; + int num6 = stackedIndex % num5; + float num7 = (float) num6 / (float) num5; + float num8 = num2 + (float) num3 / 8f; + if (stackedIndex >= (num4 - 1) * 4 && num3 > 0) + { + num8 = 0.0f; + switch (num5) + { + case 1: + num7 = 0.0f; + break; + case 2: + num7 = (float) (0.25 + (double) num6 * 0.5); + break; + case 3: + num7 = (float) (num6 - 1) / 6f; + break; + case 4: + num7 = (float) (((double) num6 - 1.5) / 6.0); + break; + } + } + Vector2 vector2_2 = new Vector2(0.0f, (float) (-8 - 12 * num3)).RotatedBy(((double) num8 + (double) num7) * 6.28318548202515); + Vector2 vector2_3 = vector2_1 + (vector2_2 + new Vector2(0.0f, master.gravDir * -40f)); + Vector2 mountedCenter = master.MountedCenter; + int direction = master.direction; + Vector2 vector2_4 = new Vector2(0.0f, master.gravDir * -21f); + Vector2 vec = mountedCenter + vector2_4 + vector2_3; + vec.Y += master.gfxOffY; + return vec.Floor(); + } + + private void AI_162_TigerPounce() + { + if ((double) this.ai[0] < 0.0) + { + this.Opacity = 0.0f; + ++this.ai[0]; + } + else + { + bool flag = true; + if (this.frameCounter == 0) + { + this.frameCounter = 1; + this.localAI[0] = this.Center.X; + this.localAI[1] = this.Center.Y; + flag = true; + } + Vector2 vector2_1 = new Vector2(this.localAI[0], this.localAI[1]); + Vector2 vector2_2 = vector2_1 + this.velocity; + float y = Vector2.Distance(vector2_1, vector2_2) * 1.5f; + float num1 = 0.1f; + Vector2 vector2_3 = Vector2.Lerp(vector2_1, vector2_2, 0.0f - num1) + new Vector2(0.0f, y); + Vector2 vector2_4 = Vector2.Lerp(vector2_1, vector2_2, 1f + num1) + new Vector2(0.0f, y); + if ((double) this.Opacity < 1.0) + this.Opacity += 0.1f; + int num2 = Math.Sign(vector2_2.X - vector2_1.X); + this.rotation += (float) num2 * -0.2f; + this.spriteDirection = num2; + if ((double) this.ai[1] < 1.0) + this.ai[1] = 60f; + this.ai[0] += 1f / this.ai[1]; + float num3 = Utils.Clamp(this.ai[0], 0.0f, 1f); + Vector2 vector2_5 = vector2_1; + Vector2 vector2_6 = vector2_2; + Vector2 vector2_7 = vector2_4; + double num4 = (double) num3; + Vector2 Destination = Vector2.CatmullRom(vector2_3, vector2_5, vector2_6, vector2_7, (float) num4); + if (flag) + { + for (float num5 = 0.0f; (double) num5 < 1.0; num5 += 0.5f) + { + if (Main.rand.Next(19) == 0) + { + Vector2 vector2_8 = this.Center + this.DirectionTo(Destination).SafeNormalize(Vector2.UnitY) * 100f; + Dust dust = Dust.NewDustPerfect(this.Center + this.Size * Main.rand.NextVector2Square(0.0f, 1f), 278, new Vector2?(Main.rand.NextVector2Circular(3f, 3f)), 100, Color.White * 0.4f); + dust.velocity.Y += -0.6f; + dust.velocity += this.velocity * 0.1f; + Main.rand.Next(5); + dust.velocity = (vector2_8 - this.Center) * 0.05f; + dust.fadeIn = 0.0f; + dust.scale = 0.7f; + dust.noGravity = true; + } + } + if (Main.rand.Next(2) == 0) + { + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 269)]; + dust.fadeIn = 0.7f; + dust.scale = 0.4f; + dust.velocity += this.velocity * (1f / 1000f); + dust.noLight = true; + } + } + this.Center = Destination; + if ((double) this.ai[0] < 1.0) + return; + this.Kill(); + } + } + + private void AI_016() + { + if (this.wet && (this.type == 799 || this.type == 800 || this.type == 801 || this.type == 810 || this.type == 906 || this.type == 784 || this.type == 785 || this.type == 786 || this.type == 805 || this.type == 903 || this.type == 787 || this.type == 788 || this.type == 789 || this.type == 806 || this.type == 904 || this.type == 790 || this.type == 791 || this.type == 792 || this.type == 807 || this.type == 905)) + this.timeLeft = 1; + if (this.type == 108 || this.type == 164) + { + ++this.ai[0]; + if ((double) this.ai[0] > 3.0) + this.Kill(); + } + if (this.type == 102) + { + int x = (int) ((double) this.Center.X / 16.0); + int y = (int) ((double) this.Center.Y / 16.0); + if (WorldGen.InWorld(x, y) && Main.tile[x, y].active() && TileID.Sets.Platforms[(int) Main.tile[x, y].type]) + { + this.Kill(); + return; + } + } + if (this.type == 75) + { + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && !Main.player[index].dead && !Main.player[index].ghost && (double) (this.Center - Main.player[index].Center).Length() < 40.0) + { + this.Kill(); + return; + } + } + } + bool flag1 = false; + if (this.type == 37 || this.type == 397 || this.type == 470 || this.type == 519 || this.type == 773 || this.type == 911) + { + try + { + int num1 = (int) ((double) this.position.X / 16.0) - 1; + int num2 = (int) (((double) this.position.X + (double) this.width) / 16.0) + 2; + int num3 = (int) ((double) this.position.Y / 16.0) - 1; + int num4 = (int) (((double) this.position.Y + (double) this.height) / 16.0) + 2; + if (num1 < 0) + num1 = 0; + if (num2 > Main.maxTilesX) + num2 = Main.maxTilesX; + if (num3 < 0) + num3 = 0; + if (num4 > Main.maxTilesY) + num4 = Main.maxTilesY; + for (int index1 = num1; index1 < num2; ++index1) + { + for (int index2 = num3; index2 < num4; ++index2) + { + if (Main.tile[index1, index2] != null && Main.tile[index1, index2].nactive() && Main.tileSolid[(int) Main.tile[index1, index2].type] && !Main.tileSolidTop[(int) Main.tile[index1, index2].type]) + { + Vector2 vector2; + vector2.X = (float) (index1 * 16); + vector2.Y = (float) (index2 * 16); + if ((double) this.position.X + (double) this.width - 4.0 > (double) vector2.X && (double) this.position.X + 4.0 < (double) vector2.X + 16.0 && (double) this.position.Y + (double) this.height - 4.0 > (double) vector2.Y && (double) this.position.Y + 4.0 < (double) vector2.Y + 16.0) + { + if (this.type == 911 && this.owner == Main.myPlayer && (double) this.localAI[0] == 0.0) + { + float num5 = 12f; + if ((double) Vector2.Distance(this.Center, vector2 + new Vector2(8f, 8f)) < (double) num5) + this.Center = this.Center + this.velocity.SafeNormalize(Vector2.Zero) * -4f; + this.localAI[0] = 1f; + this.netUpdate = true; + } + this.velocity.X = 0.0f; + this.velocity.Y = -0.2f; + flag1 = true; + } + } + } + } + } + catch + { + } + } + if (flag1 && this.type == 911) + { + Point tileCoordinates = this.Center.ToTileCoordinates(); + if (WorldGen.SolidOrSlopedTile(Framing.GetTileSafely(tileCoordinates.X, tileCoordinates.Y))) + this.Center = this.Center + (tileCoordinates.ToWorldCoordinates() - this.Center).SafeNormalize(Vector2.Zero) * -4f; + } + if (flag1 && this.type == 773) + { + Player player = Main.player[this.owner]; + Vector2 v = this.DirectionTo(player.Center).SafeNormalize(Vector2.UnitX * (float) player.direction); + float rotation = this.rotation; + float targetAngle = v.ToRotation() + 1.570796f; + this.rotation = this.rotation.AngleLerp(targetAngle, 0.2f); + this.rotation = this.rotation.AngleTowards(targetAngle, 0.05f); + Vector2 rotationVector2 = (this.rotation - 1.570796f).ToRotationVector2(); + if (Main.rand.Next(3) == 0) + { + Dust dust = Dust.NewDustPerfect(this.Center + rotationVector2 * 10f, 59, new Vector2?(rotationVector2 * 2f + Main.rand.NextVector2Circular(0.25f, 0.25f)), Scale: 2f); + dust.noGravity = true; + if (Main.rand.Next(3) == 0) + { + dust.velocity *= 1.5f; + dust.noGravity = false; + dust.scale /= 2f; + } + } + if (Main.rand.Next(3) == 0) + { + Point digDirectionSnap8 = this.GetScarabBombDigDirectionSnap8(); + Dust.NewDustPerfect(this.Center + rotationVector2 * -10f, 59, new Vector2?(digDirectionSnap8.ToVector2() * 1.5f), Scale: 2f).noGravity = true; + } + if (Main.rand.Next(15) == 0) + { + Dust dust = Dust.NewDustPerfect(this.Center + rotationVector2 * 10f, 88, new Vector2?(rotationVector2 * 3f + Main.rand.NextVector2Circular(0.25f, 0.25f)), Scale: 2f); + dust.noGravity = true; + if (Main.rand.Next(3) == 0) + dust.velocity *= 1.5f; + } + bool flag2 = Main.rand.Next(30) == 0; + if ((double) rotation != (double) this.rotation && Main.rand.Next(40) == 0) + flag2 = true; + if (flag2) + { + float num6 = 6.283185f * Main.rand.NextFloat(); + for (float num7 = 0.0f; (double) num7 < 1.0; num7 += 0.1428571f) + { + Vector2 vector2 = ((num7 * 6.283185f + num6).ToRotationVector2() * new Vector2(1f, 0.3f)).RotatedBy((double) targetAngle); + Dust dust = Dust.NewDustPerfect(this.Center + vector2 + rotationVector2 * 8f, 59, new Vector2?(rotationVector2 * 3f + vector2)); + dust.noGravity = true; + dust.fadeIn = 1.6f; + } + } + if (++this.frameCounter >= 3) + { + this.frameCounter = 0; + if (++this.frame >= 4) + this.frame = 0; + } + } + if (this.type == 519) + { + ++this.localAI[1]; + float num = 180f - this.localAI[1]; + if ((double) num < 0.0) + num = 0.0f; + ++this.frameCounter; + if ((double) num < 15.0) + ++this.frameCounter; + if ((double) this.frameCounter >= ((double) num / 10.0 + 6.0) / 2.0) + { + ++this.frame; + this.frameCounter = 0; + if (this.frame >= Main.projFrames[this.type]) + this.frame = 0; + } + } + if (this.type == 681 && (double) this.localAI[1] == 0.0) + this.localAI[1] = 1f; + int Type1 = 6; + if (this.type == 776 || this.type == 780 || this.type == 803 || this.type == 804) + Type1 = 228; + else if (this.type == 784 || this.type == 805) + Type1 = Main.rand.Next(3) == 0 ? 6 : Dust.dustWater(); + else if (this.type == 787 || this.type == 806) + Type1 = Main.rand.Next(3) == 0 ? 6 : 35; + else if (this.type == 790 || this.type == 807) + Type1 = Main.rand.Next(3) == 0 ? 6 : 152; + if (this.type == 102) + { + if ((double) this.velocity.Y > 10.0) + this.velocity.Y = 10f; + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + SoundEngine.PlaySound(SoundID.Item10, this.position); + } + ++this.frameCounter; + if (this.frameCounter > 3) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 1) + this.frame = 0; + if ((double) this.velocity.Y == 0.0) + { + this.position.X += (float) (this.width / 2); + this.position.Y += (float) (this.height / 2); + this.width = 128; + this.height = 128; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + this.damage = 40; + this.knockBack = 8f; + this.timeLeft = 3; + this.netUpdate = true; + } + } + if (this.type == 303 && this.timeLeft <= 3 && this.hostile) + { + this.position.X += (float) (this.width / 2); + this.position.Y += (float) (this.height / 2); + this.width = 128; + this.height = 128; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + } + if (this.owner == Main.myPlayer && this.timeLeft <= 3) + { + this.tileCollide = false; + this.ai[1] = 0.0f; + this.alpha = (int) byte.MaxValue; + if (this.type == 28 || this.type == 37 || this.type == 516 || this.type == 519) + { + this.Resize(128, 128); + this.damage = 100; + this.knockBack = 8f; + } + else if (this.type == 773) + { + this.Resize(48, 96); + this.damage = 100; + this.knockBack = 8f; + } + else if (this.type == 29 || this.type == 470 || this.type == 637) + { + this.Resize(250, 250); + this.damage = 250; + this.knockBack = 10f; + } + else if (this.type == 30 || this.type == 397 || this.type == 517 || this.type == 588) + { + this.Resize(128, 128); + this.knockBack = 8f; + } + else if (this.type == 681) + { + this.Resize(80, 80); + this.knockBack = 8f; + } + else if (this.type == 779 || this.type == 783 || this.type == 862 || this.type == 863) + { + this.Resize(48, 48); + this.knockBack = 8f; + } + else if (this.type == 133 || this.type == 134 || this.type == 135 || this.type == 136 || this.type == 137 || this.type == 138 || this.type == 338 || this.type == 339 || this.type == 930) + { + this.Resize(128, 128); + this.knockBack = 8f; + } + else if (this.type == 794 || this.type == 797 || this.type == 795 || this.type == 798 || this.type == 793 || this.type == 796 || this.type == 808 || this.type == 808) + { + this.Resize(250, 250); + this.knockBack = 12f; + } + else if (this.type == 776 || this.type == 780 || this.type == 777 || this.type == 781 || this.type == 778 || this.type == 782 || this.type == 803 || this.type == 804) + { + this.Resize(128, 128); + this.knockBack = 12f; + } + else if (this.type == 784 || this.type == 785 || this.type == 786 || this.type == 805 || this.type == 903 || this.type == 787 || this.type == 788 || this.type == 789 || this.type == 806 || this.type == 904 || this.type == 790 || this.type == 791 || this.type == 792 || this.type == 807 || this.type == 905 || this.type == 799 || this.type == 800 || this.type == 801 || this.type == 810 || this.type == 906 || this.type == 910 || this.type == 911) + { + if (this.type == 903 || this.type == 904 || this.type == 905 || this.type == 906 || this.type == 910 || this.type == 911) + this.damage = 100; + this.Resize(48, 48); + this.knockBack = 12f; + } + else if (this.type == 139 || this.type == 140 || this.type == 141 || this.type == 142 || this.type == 143 || this.type == 144 || this.type == 340 || this.type == 341) + { + this.Resize(200, 200); + this.knockBack = 10f; + } + } + else + { + if (this.type != 30 && this.type != 75 && this.type != 517 && this.type != 681 && this.type != 588 && this.type != 397 && this.type != 108 && this.type != 133 && this.type != 134 && this.type != 135 && this.type != 136 && this.type != 137 && this.type != 138 && this.type != 139 && this.type != 140 && this.type != 141 && this.type != 142 && this.type != 143 && this.type != 144 && this.type != 164 && this.type != 303 && this.type != 338 && this.type != 339 && this.type != 340 && this.type != 341 && (this.type < 776 || this.type > 801) && (this.type < 803 || this.type > 810) && this.type != 930) + this.damage = 0; + if (this.type == 338 || this.type == 339 || this.type == 340 || this.type == 341 || this.type == 803 || this.type == 804 || this.type == 808 || this.type == 809 || this.type == 810 || this.type == 805 || this.type == 806 || this.type == 807 || this.type == 930) + { + ++this.localAI[1]; + if ((double) this.localAI[1] > 6.0) + { + this.alpha = 0; + } + else + { + this.alpha = (int) ((double) byte.MaxValue - 42.0 * (double) this.localAI[1]) + 100; + if (this.alpha > (int) byte.MaxValue) + this.alpha = (int) byte.MaxValue; + } + for (int index3 = 0; index3 < 2; ++index3) + { + float num8 = 0.0f; + float num9 = 0.0f; + if (index3 == 1) + { + num8 = this.velocity.X * 0.5f; + num9 = this.velocity.Y * 0.5f; + } + if ((double) this.localAI[1] > 9.0) + { + if (Main.rand.Next(2) == 0) + { + int index4 = Dust.NewDust(new Vector2(this.position.X + 3f + num8, this.position.Y + 3f + num9) - this.velocity * 0.5f, this.width - 8, this.height - 8, Type1, Alpha: 100); + Main.dust[index4].scale *= (float) (1.39999997615814 + (double) Main.rand.Next(10) * 0.100000001490116); + Main.dust[index4].velocity *= 0.2f; + Main.dust[index4].noGravity = true; + if (Main.dust[index4].type == 152) + { + Main.dust[index4].scale *= 0.5f; + Main.dust[index4].velocity += this.velocity * 0.1f; + } + else if (Main.dust[index4].type == 35) + { + Main.dust[index4].scale *= 0.5f; + Main.dust[index4].velocity += this.velocity * 0.1f; + } + else if (Main.dust[index4].type == Dust.dustWater()) + { + Main.dust[index4].scale *= 0.65f; + Main.dust[index4].velocity += this.velocity * 0.1f; + } + if (this.type == 808 || this.type == 809) + { + Dust dust1 = Main.dust[index4]; + if (dust1.dustIndex != 6000) + { + dust1 = Dust.NewDustPerfect(dust1.position, dust1.type, new Vector2?(dust1.velocity), dust1.alpha, dust1.color, dust1.scale + 0.5f); + dust1.velocity = Main.rand.NextVector2Circular(3f, 3f); + dust1.noGravity = true; + } + if (dust1.dustIndex != 6000) + { + Dust dust2 = Dust.NewDustPerfect(dust1.position, dust1.type, new Vector2?(dust1.velocity), dust1.alpha, dust1.color, dust1.scale + 0.5f); + dust2.velocity = ((float) (6.28318548202515 * ((double) this.timeLeft / 20.0))).ToRotationVector2() * 3f; + dust2.noGravity = true; + } + } + } + if (Main.rand.Next(2) == 0) + { + int index5 = Dust.NewDust(new Vector2(this.position.X + 3f + num8, this.position.Y + 3f + num9) - this.velocity * 0.5f, this.width - 8, this.height - 8, 31, Alpha: 100, Scale: 0.5f); + Main.dust[index5].fadeIn = (float) (0.5 + (double) Main.rand.Next(5) * 0.100000001490116); + Main.dust[index5].velocity *= 0.05f; + } + } + } + float num10 = this.position.X; + float num11 = this.position.Y; + float num12 = 600f; + if (this.type == 930) + num12 = 650f; + bool flag3 = false; + ++this.ai[0]; + if ((double) this.ai[0] > 30.0) + { + this.ai[0] = 30f; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].CanBeChasedBy((object) this)) + { + float num13 = Main.npc[index].position.X + (float) (Main.npc[index].width / 2); + float num14 = Main.npc[index].position.Y + (float) (Main.npc[index].height / 2); + float num15 = Math.Abs(this.position.X + (float) (this.width / 2) - num13) + Math.Abs(this.position.Y + (float) (this.height / 2) - num14); + if ((double) num15 < (double) num12 && Collision.CanHit(this.position, this.width, this.height, Main.npc[index].position, Main.npc[index].width, Main.npc[index].height)) + { + num12 = num15; + num10 = num13; + num11 = num14; + flag3 = true; + } + } + } + } + if (!flag3) + { + num10 = (float) ((double) this.position.X + (double) (this.width / 2) + (double) this.velocity.X * 100.0); + num11 = (float) ((double) this.position.Y + (double) (this.height / 2) + (double) this.velocity.Y * 100.0); + } + float num16 = 16f; + if (this.type == 930) + num16 = 12f; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num17 = num10 - vector2.X; + float num18 = num11 - vector2.Y; + float num19 = (float) Math.Sqrt((double) num17 * (double) num17 + (double) num18 * (double) num18); + float num20 = num16 / num19; + float num21 = num17 * num20; + float num22 = num18 * num20; + this.velocity.X = (float) (((double) this.velocity.X * 11.0 + (double) num21) / 12.0); + this.velocity.Y = (float) (((double) this.velocity.Y * 11.0 + (double) num22) / 12.0); + } + else if (this.type == 134 || this.type == 137 || this.type == 140 || this.type == 143 || this.type == 303 || this.type == 776 || this.type == 780 || this.type == 793 || this.type == 796 || this.type == 799 || this.type == 784 || this.type == 787 || this.type == 790) + { + if ((double) Math.Abs(this.velocity.X) >= 8.0 || (double) Math.Abs(this.velocity.Y) >= 8.0) + { + for (int index6 = 0; index6 < 2; ++index6) + { + float num23 = 0.0f; + float num24 = 0.0f; + if (index6 == 1) + { + num23 = this.velocity.X * 0.5f; + num24 = this.velocity.Y * 0.5f; + } + int index7 = Dust.NewDust(new Vector2(this.position.X + 3f + num23, this.position.Y + 3f + num24) - this.velocity * 0.5f, this.width - 8, this.height - 8, Type1, Alpha: 100); + Main.dust[index7].scale *= (float) (2.0 + (double) Main.rand.Next(10) * 0.100000001490116); + Main.dust[index7].velocity *= 0.2f; + Main.dust[index7].noGravity = true; + if (Main.dust[index7].type == 152) + { + Main.dust[index7].scale *= 0.5f; + Main.dust[index7].velocity += this.velocity * 0.1f; + } + else if (Main.dust[index7].type == 35) + { + Main.dust[index7].scale *= 0.5f; + Main.dust[index7].velocity += this.velocity * 0.1f; + } + else if (Main.dust[index7].type == Dust.dustWater()) + { + Main.dust[index7].scale *= 0.65f; + Main.dust[index7].velocity += this.velocity * 0.1f; + } + if (this.type == 793 || this.type == 796) + { + Dust dust3 = Main.dust[index7]; + if (dust3.dustIndex != 6000) + { + dust3 = Dust.NewDustPerfect(dust3.position, dust3.type, new Vector2?(dust3.velocity), dust3.alpha, dust3.color, dust3.scale); + dust3.velocity = Main.rand.NextVector2Circular(3f, 3f); + dust3.noGravity = true; + } + if (dust3.dustIndex != 6000) + { + Dust dust4 = Dust.NewDustPerfect(dust3.position, dust3.type, new Vector2?(dust3.velocity), dust3.alpha, dust3.color, dust3.scale); + dust4.velocity = ((float) (6.28318548202515 * ((double) this.timeLeft / 20.0))).ToRotationVector2() * 3f; + dust4.noGravity = true; + } + } + int index8 = Dust.NewDust(new Vector2(this.position.X + 3f + num23, this.position.Y + 3f + num24) - this.velocity * 0.5f, this.width - 8, this.height - 8, 31, Alpha: 100, Scale: 0.5f); + Main.dust[index8].fadeIn = (float) (1.0 + (double) Main.rand.Next(5) * 0.100000001490116); + Main.dust[index8].velocity *= 0.05f; + } + } + if ((double) Math.Abs(this.velocity.X) < 15.0 && (double) Math.Abs(this.velocity.Y) < 15.0) + this.velocity = this.velocity * 1.1f; + } + else if (this.type == 133 || this.type == 136 || this.type == 139 || this.type == 142 || this.type == 777 || this.type == 781 || this.type == 794 || this.type == 797 || this.type == 800 || this.type == 785 || this.type == 788 || this.type == 791) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100); + Main.dust[index].scale *= (float) (1.0 + (double) Main.rand.Next(10) * 0.100000001490116); + Main.dust[index].velocity *= 0.2f; + Main.dust[index].noGravity = true; + } + else if (this.type == 135 || this.type == 138 || this.type == 141 || this.type == 144 || this.type == 778 || this.type == 782 || this.type == 795 || this.type == 798 || this.type == 801 || this.type == 786 || this.type == 789 || this.type == 792) + { + if ((double) this.velocity.X > -0.2 && (double) this.velocity.X < 0.2 && (double) this.velocity.Y > -0.2 && (double) this.velocity.Y < 0.2) + { + this.alpha += 2; + if (this.alpha > 200) + this.alpha = 200; + } + else + { + this.alpha = 0; + int index = Dust.NewDust(new Vector2(this.position.X + 3f, this.position.Y + 3f) - this.velocity * 0.5f, this.width - 8, this.height - 8, 31, Alpha: 100); + Main.dust[index].scale *= (float) (1.60000002384186 + (double) Main.rand.Next(5) * 0.100000001490116); + Main.dust[index].velocity *= 0.05f; + Main.dust[index].noGravity = true; + } + } + else if (this.type == 779 || this.type == 783 || this.type == 862 || this.type == 863) + { + if (Main.rand.Next(25) == 0) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 228, (float) (-(double) this.velocity.X / 10.0), (float) (-(double) this.velocity.Y / 10.0), 100); + dust.noGravity = true; + dust.velocity *= 0.0f; + dust.scale = 1.3f; + } + if (Main.rand.Next(5) == 0) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 31, (float) (-(double) this.velocity.X / 10.0), (float) (-(double) this.velocity.Y / 10.0), 100); + dust.noGravity = true; + dust.velocity *= 0.0f; + dust.scale = 1.3f; + } + if (this.frameCounter == 0) + { + this.frameCounter = 1; + this.frame = Main.rand.Next(4); + } + } + else if (this.type != 30 && this.type != 517 && this.type != 681 && this.type != 397 && this.type != 519 && this.type != 588 && this.type != 779 && this.type != 783 && this.type != 862 && this.type != 863 && Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100); + Main.dust[index].scale = (float) (0.100000001490116 + (double) Main.rand.Next(5) * 0.100000001490116); + Main.dust[index].fadeIn = (float) (1.5 + (double) Main.rand.Next(5) * 0.100000001490116); + Main.dust[index].noGravity = true; + Main.dust[index].position = this.Center + new Vector2(0.0f, (float) (-this.height / 2)).RotatedBy((double) this.rotation) * 1.1f; + int Type2 = 6; + if (this.type == 773) + Type2 = 59; + if (this.type == 903) + Type2 = Dust.dustWater(); + if (this.type == 904) + Type2 = 35; + if (this.type == 905) + Type2 = 152; + if (this.type == 910 || this.type == 911) + Type2 = 0; + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, Type2, Alpha: 100); + dust.scale = (float) (1.0 + (double) Main.rand.Next(5) * 0.100000001490116); + dust.noGravity = true; + dust.position = this.Center + new Vector2(0.0f, (float) (-this.height / 2 - 6)).RotatedBy((double) this.rotation) * 1.1f; + } + else if (this.type == 681) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 6, Alpha: 100); + dust.scale = (float) (1.0 + (double) Main.rand.Next(5) * 0.100000001490116); + dust.noGravity = true; + dust.position = this.Center + new Vector2((float) (6 * Math.Sign(this.velocity.X)), (float) (-this.height / 2 - 6)).RotatedBy((double) this.rotation) * 1.1f; + } + } + ++this.ai[0]; + if (this.type == 338 || this.type == 339 || this.type == 340 || this.type == 341 || this.type == 803 || this.type == 804 || this.type == 808 || this.type == 809 || this.type == 810 || this.type == 805 || this.type == 806 || this.type == 807 || this.type == 930) + { + if ((double) this.velocity.X < 0.0) + { + this.spriteDirection = -1; + this.rotation = (float) Math.Atan2(-(double) this.velocity.Y, -(double) this.velocity.X) - 1.57f; + } + else + { + this.spriteDirection = 1; + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.57f; + } + } + else if (this.type == 134 || this.type == 137 || this.type == 140 || this.type == 143 || this.type == 303 || this.type == 776 || this.type == 780 || this.type == 793 || this.type == 796 || this.type == 799 || this.type == 784 || this.type == 787 || this.type == 790) + { + if (this.velocity != Vector2.Zero) + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.57f; + } + else if (this.type == 135 || this.type == 138 || this.type == 141 || this.type == 144 || this.type == 778 || this.type == 782 || this.type == 795 || this.type == 798 || this.type == 801 || this.type == 786 || this.type == 789 || this.type == 792) + { + this.velocity.Y += 0.2f; + this.velocity = this.velocity * 0.97f; + if ((double) this.velocity.X > -0.1 && (double) this.velocity.X < 0.1) + this.velocity.X = 0.0f; + if ((double) this.velocity.Y > -0.1 && (double) this.velocity.Y < 0.1) + this.velocity.Y = 0.0f; + } + else if (this.type == 133 || this.type == 136 || this.type == 139 || this.type == 142 || this.type == 777 || this.type == 781 || this.type == 794 || this.type == 797 || this.type == 800 || this.type == 785 || this.type == 788 || this.type == 791) + { + if ((double) this.ai[0] > 15.0) + { + if ((double) this.velocity.Y == 0.0) + this.velocity.X *= 0.95f; + this.velocity.Y += 0.2f; + } + } + else if ((this.type == 30 || this.type == 397 || this.type == 517 || this.type == 681 || this.type == 588 || this.type == 779 || this.type == 783 || this.type == 862 || this.type == 863) && (double) this.ai[0] > 10.0 || this.type != 30 && this.type != 397 && this.type != 517 && this.type != 588 && this.type != 779 && this.type != 783 && this.type != 862 && this.type != 863 && (double) this.ai[0] > 5.0) + { + this.ai[0] = 10f; + if ((double) this.velocity.Y == 0.0 && (double) this.velocity.X != 0.0) + { + this.velocity.X *= 0.97f; + if (this.type == 29 || this.type == 470 || this.type == 637) + this.velocity.X *= 0.99f; + if ((double) this.velocity.X > -0.01 && (double) this.velocity.X < 0.01) + { + this.velocity.X = 0.0f; + this.netUpdate = true; + } + } + this.velocity.Y += 0.2f; + if (this.type == 911) + { + this.velocity.X = MathHelper.Clamp(this.velocity.X, -8f, 8f); + this.velocity.Y = MathHelper.Clamp(this.velocity.Y, -8f, 8f); + } + } + if (this.type == 519) + { + this.rotation += this.velocity.X * 0.06f; + } + else + { + if (this.type == 134 || this.type == 137 || this.type == 140 || this.type == 143 || this.type == 303 || this.type >= 338 && this.type <= 341 || this.type == 776 || this.type == 780 || this.type == 793 || this.type == 796 || this.type == 799 || this.type == 784 || this.type == 787 || this.type == 790 || this.type == 803 || this.type == 804 || this.type == 808 || this.type == 809 || this.type == 810 || this.type == 805 || this.type == 806 || this.type == 807 || this.type == 930) + return; + this.rotation += this.velocity.X * 0.1f; + } + } + + private void AI_166_Dove() + { + int num1 = this.type == 855 ? 1 : 0; + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + this.frame = Main.rand.Next(4); + } + int num2 = 4; + if (num1 != 0) + num2 = 6; + if (++this.frameCounter > num2) + { + this.frameCounter = 0; + if (++this.frame > 3) + this.frame = 0; + } + this.spriteDirection = -1; + if ((double) this.velocity.X > 0.0) + this.spriteDirection = 1; + if (num1 != 0) + { + Lighting.AddLight(this.Center, new Vector3(1f, 0.6f, 0.1f) * (float) (1.0 - (double) this.alpha / (double) byte.MaxValue)); + this.rotation = this.velocity.X * 0.2f; + if ((double) this.velocity.Y < -1.0) + { + this.velocity.Y *= 0.99f; + } + else + { + this.velocity.Y += (float) Math.Sin((double) (this.timeLeft % 200) / 200.0 * 6.28318548202515) * 0.25f; + if ((double) this.velocity.Y > 0.5) + this.velocity.Y *= 0.8f; + this.velocity.Y = MathHelper.Clamp(this.velocity.Y, -1.5f, 1.5f); + } + float num3 = Main.WindForVisuals; + if ((double) num3 == 0.0) + num3 = 0.1f; + this.velocity.X += 0.0525f * num3; + this.velocity.X = MathHelper.Clamp(this.velocity.X, -2f, 2f); + } + else + { + this.rotation = this.velocity.X * 0.15f; + this.velocity.Y -= 0.025f; + if ((double) this.velocity.Y < -3.0) + this.velocity.Y = -3f; + this.velocity.X = MathHelper.Clamp(this.velocity.X, -5f, 5f); + } + if (this.timeLeft < 90) + this.alpha += 3; + if (this.alpha < (int) byte.MaxValue) + return; + this.Kill(); + } + + private void AI_161_RapierStabs() + { + Player player = Main.player[this.owner]; + this.rotation = this.velocity.ToRotation() + 1.570796f; + ++this.ai[0]; + this.Opacity = Utils.GetLerpValue(0.0f, 7f, this.ai[0], true) * Utils.GetLerpValue(16f, 12f, this.ai[0], true); + this.Center = player.RotatedRelativePoint(player.MountedCenter, addGfxOffY: false) + this.velocity * (this.ai[0] - 1f); + this.spriteDirection = (double) Vector2.Dot(this.velocity, Vector2.UnitX) < 0.0 ? -1 : 1; + if ((double) this.ai[0] >= 16.0) + this.Kill(); + else + player.heldProj = this.whoAmI; + } + + private void AI_165_Whip() + { + Player player = Main.player[this.owner]; + this.rotation = this.velocity.ToRotation() + 1.570796f; + ++this.ai[0]; + float timeToFlyOut; + Projectile.GetWhipSettings(this, out timeToFlyOut, out int _, out float _); + this.Center = Main.GetPlayerArmPosition(this) + this.velocity * (this.ai[0] - 1f); + this.spriteDirection = (double) Vector2.Dot(this.velocity, Vector2.UnitX) < 0.0 ? -1 : 1; + if ((double) this.ai[0] >= (double) timeToFlyOut || player.itemAnimation == 0) + { + this.Kill(); + } + else + { + player.heldProj = this.whoAmI; + player.itemAnimation = player.itemAnimationMax - (int) ((double) this.ai[0] / (double) this.MaxUpdates); + player.itemTime = player.itemAnimation; + if ((double) this.ai[0] == (double) (int) ((double) timeToFlyOut / 2.0)) + { + this._whipPointsForCollision.Clear(); + Projectile.FillWhipControlPoints(this, this._whipPointsForCollision); + Vector2 position = this._whipPointsForCollision[this._whipPointsForCollision.Count - 1]; + SoundEngine.PlaySound(SoundID.Item153, position); + } + switch (this.type) + { + case 847: + float t1 = this.ai[0] / timeToFlyOut; + if ((double) Utils.GetLerpValue(0.1f, 0.7f, t1, true) * (double) Utils.GetLerpValue(0.9f, 0.7f, t1, true) <= 0.5 || Main.rand.Next(3) == 0) + break; + this._whipPointsForCollision.Clear(); + Projectile.FillWhipControlPoints(this, this._whipPointsForCollision); + int index1 = Main.rand.Next(this._whipPointsForCollision.Count - 10, this._whipPointsForCollision.Count); + Microsoft.Xna.Framework.Rectangle r1 = Utils.CenteredRectangle(this._whipPointsForCollision[index1], new Vector2(30f, 30f)); + int Type = 57; + if (Main.rand.Next(3) == 0) + Type = 43; + Dust dust1 = Dust.NewDustDirect(r1.TopLeft(), r1.Width, r1.Height, Type, Alpha: 100, newColor: Color.White); + dust1.position = this._whipPointsForCollision[index1]; + dust1.fadeIn = 0.3f; + Vector2 spinningpoint = this._whipPointsForCollision[index1] - this._whipPointsForCollision[index1 - 1]; + dust1.noGravity = true; + dust1.velocity *= 0.5f; + dust1.velocity += spinningpoint.RotatedBy((double) player.direction * 1.57079637050629); + dust1.velocity *= 0.5f; + break; + case 848: + float t2 = this.ai[0] / timeToFlyOut; + float num1 = Utils.GetLerpValue(0.1f, 0.7f, t2, true) * Utils.GetLerpValue(0.9f, 0.7f, t2, true); + if ((double) num1 <= 0.100000001490116 || (double) Main.rand.NextFloat() >= (double) num1 / 2.0) + break; + this._whipPointsForCollision.Clear(); + Projectile.FillWhipControlPoints(this, this._whipPointsForCollision); + Microsoft.Xna.Framework.Rectangle r2 = Utils.CenteredRectangle(this._whipPointsForCollision[this._whipPointsForCollision.Count - 1], new Vector2(30f, 30f)); + int index2 = Dust.NewDust(r2.TopLeft(), r2.Width, r2.Height, 172, Alpha: 100, Scale: 1.5f); + Main.dust[index2].noGravity = true; + Main.dust[index2].velocity.X /= 2f; + Main.dust[index2].velocity.Y /= 2f; + break; + case 849: + float t3 = this.ai[0] / timeToFlyOut; + double lerpValue1 = (double) Utils.GetLerpValue(0.1f, 0.7f, t3, true); + double lerpValue2 = (double) Utils.GetLerpValue(0.9f, 0.7f, t3, true); + if ((double) t3 <= 0.400000005960464 || Main.rand.Next(9) == 0) + break; + this._whipPointsForCollision.Clear(); + Projectile.FillWhipControlPoints(this, this._whipPointsForCollision); + Microsoft.Xna.Framework.Rectangle r3 = Utils.CenteredRectangle(this._whipPointsForCollision[this._whipPointsForCollision.Count - 1], new Vector2(30f, 30f)); + Vector2 vector2_1 = this._whipPointsForCollision[this._whipPointsForCollision.Count - 2].DirectionTo(this._whipPointsForCollision[this._whipPointsForCollision.Count - 1]).SafeNormalize(Vector2.Zero); + Dust dust2 = Dust.NewDustDirect(r3.TopLeft(), r3.Width, r3.Height, 191, Scale: 1.3f); + dust2.noGravity = true; + dust2.velocity += vector2_1 * 2f; + if (Main.rand.Next(2) == 0) + ParticleOrchestrator.RequestParticleSpawn(true, ParticleOrchestraType.BlackLightningSmall, new ParticleOrchestraSettings() + { + MovementVector = vector2_1, + PositionInWorld = r3.Center.ToVector2() + }, new int?(this.owner)); + Lighting.AddLight(r3.Center.ToVector2(), new Vector3(0.2f, 0.0f, 0.4f)); + break; + case 912: + float t4 = this.ai[0] / timeToFlyOut; + float num2 = Utils.GetLerpValue(0.1f, 0.7f, t4, true) * Utils.GetLerpValue(0.9f, 0.7f, t4, true); + if ((double) num2 <= 0.100000001490116 || (double) Main.rand.NextFloat() >= (double) num2 / 2.0) + break; + this._whipPointsForCollision.Clear(); + Projectile.FillWhipControlPoints(this, this._whipPointsForCollision); + Microsoft.Xna.Framework.Rectangle r4 = Utils.CenteredRectangle(this._whipPointsForCollision[this._whipPointsForCollision.Count - 1], new Vector2(30f, 30f)); + Vector2 vector2_2 = this._whipPointsForCollision[this._whipPointsForCollision.Count - 2].DirectionTo(this._whipPointsForCollision[this._whipPointsForCollision.Count - 1]).SafeNormalize(Vector2.Zero); + for (int index3 = 0; index3 < 3; ++index3) + { + Dust dust3 = Dust.NewDustDirect(r4.TopLeft(), r4.Width, r4.Height, 16, Scale: 1.2f); + dust3.noGravity = true; + dust3.velocity += vector2_2 * 2f; + } + for (int index4 = 0; index4 < 1; ++index4) + Dust.NewDustDirect(r4.TopLeft(), r4.Width, r4.Height, 13, Scale: 0.8f).velocity += vector2_2 * 2f; + for (int index5 = 0; index5 < 3; ++index5) + { + if (Main.rand.Next(2) != 0) + { + Dust dust4 = Dust.NewDustDirect(r4.TopLeft(), r4.Width, r4.Height, 261, newColor: Color.Transparent, Scale: 0.8f); + dust4.velocity += vector2_2 * 2f; + dust4.velocity *= 0.3f; + dust4.noGravity = true; + } + } + Lighting.AddLight(r4.Center.ToVector2(), new Vector3(0.1f, 0.1f, 0.2f)); + break; + case 913: + float t5 = this.ai[0] / timeToFlyOut; + float num3 = Utils.GetLerpValue(0.1f, 0.7f, t5, true) * Utils.GetLerpValue(0.9f, 0.7f, t5, true); + if ((double) num3 <= 0.100000001490116 || (double) Main.rand.NextFloat() >= (double) num3) + break; + this._whipPointsForCollision.Clear(); + Projectile.FillWhipControlPoints(this, this._whipPointsForCollision); + Microsoft.Xna.Framework.Rectangle r5 = Utils.CenteredRectangle(this._whipPointsForCollision[this._whipPointsForCollision.Count - 1], new Vector2(20f, 20f)); + Vector2 vector2_3 = this._whipPointsForCollision[this._whipPointsForCollision.Count - 2].DirectionTo(this._whipPointsForCollision[this._whipPointsForCollision.Count - 1]).SafeNormalize(Vector2.Zero); + for (int index6 = 0; index6 < 3; ++index6) + { + if (Main.rand.Next(3) == 0) + { + if (Main.rand.Next(7) == 0) + { + Dust dust5 = Dust.NewDustDirect(r5.TopLeft(), r5.Width, r5.Height, 31); + dust5.velocity.X /= 2f; + dust5.velocity.Y /= 2f; + dust5.velocity += vector2_3 * 2f; + dust5.fadeIn = (float) (1.0 + (double) Main.rand.NextFloat() * 0.600000023841858); + dust5.noGravity = true; + } + else + { + Dust dust6 = Dust.NewDustDirect(r5.TopLeft(), r5.Width, r5.Height, 6, Scale: 1.2f); + dust6.velocity += vector2_3 * 2f; + if (Main.rand.Next(3) != 0) + { + dust6.fadeIn = (float) (0.699999988079071 + (double) Main.rand.NextFloat() * 0.899999976158142); + dust6.scale = 0.6f; + dust6.noGravity = true; + } + } + } + } + break; + case 914: + float t6 = this.ai[0] / timeToFlyOut; + float num4 = Utils.GetLerpValue(0.1f, 0.7f, t6, true) * Utils.GetLerpValue(0.9f, 0.7f, t6, true); + if ((double) num4 <= 0.100000001490116 || (double) Main.rand.NextFloat() >= (double) num4 / 2.0) + break; + this._whipPointsForCollision.Clear(); + Projectile.FillWhipControlPoints(this, this._whipPointsForCollision); + Microsoft.Xna.Framework.Rectangle r6 = Utils.CenteredRectangle(this._whipPointsForCollision[this._whipPointsForCollision.Count - 1], new Vector2(30f, 30f)); + Vector2 vector2_4 = this._whipPointsForCollision[this._whipPointsForCollision.Count - 2].DirectionTo(this._whipPointsForCollision[this._whipPointsForCollision.Count - 1]).SafeNormalize(Vector2.Zero); + Dust dust7 = Dust.NewDustDirect(r6.TopLeft(), r6.Width, r6.Height, 39, Scale: 1.2f); + dust7.noGravity = Main.rand.Next(3) == 0; + dust7.velocity += vector2_4 * 2f; + break; + case 915: + float t7 = this.ai[0] / timeToFlyOut; + if ((double) Utils.GetLerpValue(0.1f, 0.7f, t7, true) * (double) Utils.GetLerpValue(0.9f, 0.7f, t7, true) <= 0.100000001490116) + break; + this._whipPointsForCollision.Clear(); + Projectile.FillWhipControlPoints(this, this._whipPointsForCollision); + Microsoft.Xna.Framework.Rectangle r7 = Utils.CenteredRectangle(this._whipPointsForCollision[this._whipPointsForCollision.Count - 1], new Vector2(30f, 30f)); + Vector2 vector2_5 = this._whipPointsForCollision[this._whipPointsForCollision.Count - 2].DirectionTo(this._whipPointsForCollision[this._whipPointsForCollision.Count - 1]).SafeNormalize(Vector2.Zero); + Dust rf = Dust.NewDustDirect(r7.TopLeft(), r7.Width, r7.Height, 267, newColor: Main.hslToRgb((float) ((double) player.miscCounterNormalized * 9.0 % 1.0), 1f, 0.5f), Scale: 1.3f); + rf.velocity *= Main.rand.NextFloat() * 0.8f; + rf.noGravity = true; + rf.scale = (float) (0.899999976158142 + (double) Main.rand.NextFloat() * 0.899999976158142); + rf.fadeIn = Main.rand.NextFloat() * 0.9f; + rf.velocity += vector2_5 * 2f; + if (rf.dustIndex == 6000) + break; + Dust dust8 = Dust.CloneDust(rf); + dust8.scale /= 2f; + dust8.fadeIn *= 0.85f; + dust8.color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + break; + } + } + } + + public static void FillWhipControlPoints(Projectile proj, List controlPoints) + { + float timeToFlyOut; + int segments; + float rangeMultiplier; + Projectile.GetWhipSettings(proj, out timeToFlyOut, out segments, out rangeMultiplier); + float num1 = proj.ai[0] / timeToFlyOut; + float num2 = 0.5f; + float y = 1f + num2; + float num3 = (float) (31.4159278869629 * (1.0 - (double) num1 * (double) y)) * (float) -proj.spriteDirection / (float) segments; + float num4 = num1 * y; + float amount = 0.0f; + if ((double) num4 > 1.0) + { + amount = (num4 - 1f) / num2; + num4 = MathHelper.Lerp(1f, 0.0f, amount); + } + float num5 = proj.ai[0] - 1f; + float num6 = (float) (Main.player[proj.owner].HeldItem.useAnimation * 2) * num1; + float num7 = proj.velocity.Length() * num6 * num4 * rangeMultiplier / (float) segments; + float num8 = 1f; + Vector2 playerArmPosition = Main.GetPlayerArmPosition(proj); + Vector2 vector2_1 = playerArmPosition; + double num9 = 0.0; + float f1 = (float) (num9 - 1.57079637050629); + Vector2 vector2_2 = vector2_1; + float f2 = (float) (num9 + 1.57079637050629 + 1.57079637050629 * (double) proj.spriteDirection); + Vector2 vector2_3 = vector2_1; + float f3 = (float) (num9 + 1.57079637050629); + controlPoints.Add(playerArmPosition); + for (int index = 0; index < segments; ++index) + { + float num10 = (float) index / (float) segments; + float num11 = num3 * num10 * num8; + Vector2 vector2_4 = vector2_1 + f1.ToRotationVector2() * num7; + Vector2 vector2_5 = vector2_3 + f3.ToRotationVector2() * (num7 * 2f); + Vector2 vector2_6 = vector2_2 + f2.ToRotationVector2() * (num7 * 2f); + float num12 = 1f - num4; + float num13 = (float) (1.0 - (double) num12 * (double) num12); + Vector2 vector2_7 = Vector2.Lerp(vector2_6, Vector2.Lerp(vector2_5, vector2_4, (float) ((double) num13 * 0.899999976158142 + 0.100000001490116)), (float) ((double) num13 * 0.699999988079071 + 0.300000011920929)); + Vector2 spinningpoint = playerArmPosition + (vector2_7 - playerArmPosition) * new Vector2(1f, y); + float num14 = amount; + float num15 = num14 * num14; + double radians = (double) proj.rotation + 4.71238899230957 * (double) num15 * (double) proj.spriteDirection; + Vector2 center = playerArmPosition; + Vector2 vector2_8 = spinningpoint.RotatedBy(radians, center); + controlPoints.Add(vector2_8); + f1 += num11; + f3 += num11; + f2 += num11; + vector2_1 = vector2_4; + vector2_3 = vector2_5; + vector2_2 = vector2_6; + } + } + + public static void GetWhipSettings( + Projectile proj, + out float timeToFlyOut, + out int segments, + out float rangeMultiplier) + { + timeToFlyOut = (float) (Main.player[proj.owner].itemAnimationMax * proj.MaxUpdates); + segments = 20; + rangeMultiplier = 1f; + switch (proj.type) + { + case 841: + rangeMultiplier *= 0.75f; + break; + case 847: + segments = 20; + rangeMultiplier *= 1.2f; + break; + case 848: + rangeMultiplier = 0.7f; + break; + case 849: + segments = 30; + rangeMultiplier = 1.2f; + break; + case 912: + rangeMultiplier *= 1.3f; + break; + case 913: + rangeMultiplier *= 1.2f; + break; + case 914: + rangeMultiplier *= 0.9f; + break; + case 915: + segments = 40; + rangeMultiplier = 1.5f; + break; + } + } + + private void AI_160_Kites() + { + Player player = Main.player[this.owner]; + Vector2 vector2_1 = player.RotatedRelativePoint(player.MountedCenter); + this.timeLeft = 60; + bool flag = false; + if (player.CCed || player.noItems) + flag = true; + else if (player.inventory[player.selectedItem].shoot != this.type) + flag = true; + else if (player.pulley) + flag = true; + else if (player.dead) + flag = true; + if (!flag) + flag = (double) (player.Center - this.Center).Length() > 2000.0; + if (flag) + { + this.Kill(); + } + else + { + float min = 4f; + float max = 500f; + float num1 = max / 2f; + if (this.owner == Main.myPlayer && this.extraUpdates == 0) + { + double num2 = (double) this.ai[0]; + if ((double) this.ai[0] == 0.0) + this.ai[0] = num1; + float num3 = this.ai[0]; + if (Main.mouseRight) + num3 -= 5f; + if (Main.mouseLeft) + num3 += 5f; + this.ai[0] = MathHelper.Clamp(num3, min, max); + double num4 = (double) num3; + if (num2 != num4) + this.netUpdate = true; + } + if (this.numUpdates == 1) + this.extraUpdates = 0; + int num5 = 0; + float cloudAlpha = Main.cloudAlpha; + float x = 0.0f; + if (WorldGen.InAPlaceWithWind(this.position, this.width, this.height)) + x = Main.WindForVisuals; + float num6 = Utils.GetLerpValue(0.2f, 0.5f, Math.Abs(x), true) * 0.5f; + switch (num5) + { + case 0: + Vector2 mouseWorld = Main.MouseWorld; + Vector2 Other = this.Center + new Vector2(x, (float) Math.Sin((double) Main.GlobalTimeWrappedHourly) + cloudAlpha * 5f) * 25f; + Vector2 vector2_2 = (Other - this.Center).SafeNormalize(Vector2.Zero) * (float) (3.0 + (double) cloudAlpha * 7.0); + if ((double) num6 == 0.0) + vector2_2 = this.velocity; + float t = this.Distance(Other); + float lerpValue = Utils.GetLerpValue(5f, 10f, t, true); + float y = this.velocity.Y; + if ((double) t > 10.0) + this.velocity = Vector2.Lerp(this.velocity, vector2_2, 0.075f * lerpValue); + this.velocity.Y = y; + this.velocity.Y -= num6; + this.velocity.Y += (float) (0.0199999995529652 + (double) num6 * 0.25); + this.velocity.Y = MathHelper.Clamp(this.velocity.Y, -2f, 2f); + if ((double) this.Center.Y + (double) this.velocity.Y < (double) Other.Y) + this.velocity.Y = MathHelper.Lerp(this.velocity.Y, (float) ((double) this.velocity.Y + (double) num6 + 0.00999999977648258), 0.75f); + this.velocity.X *= 0.98f; + float num7 = this.Distance(vector2_1); + float num8 = this.ai[0]; + if ((double) num7 > (double) num8) + { + Vector2 vector2_3 = this.DirectionTo(vector2_1); + float num9 = num7 - num8; + this.Center = this.Center + vector2_3 * num9; + int num10 = (double) Vector2.Dot(vector2_3, Vector2.UnitY) < 0.800000011920929 ? 1 : ((double) num6 > 0.0 ? 1 : 0); + this.velocity.Y += vector2_3.Y * 0.05f; + if (num10 != 0) + this.velocity.Y -= 0.15f; + this.velocity.X += vector2_3.X * 0.2f; + if ((double) num8 == (double) min && this.owner == Main.myPlayer) + { + this.Kill(); + return; + } + break; + } + break; + case 1: + this.velocity = Vector2.Lerp(this.velocity, this.DirectionTo(vector2_1) * 16f, 1f); + if ((double) this.Distance(vector2_1) < 10.0 && this.owner == Main.myPlayer) + { + this.Kill(); + return; + } + break; + } + this.timeLeft = 2; + Vector2 vector2_4 = this.Center - vector2_1; + int dir = (double) vector2_4.X > 0.0 ? 1 : -1; + if ((double) Math.Abs(vector2_4.X) > (double) Math.Abs(vector2_4.Y) / 2.0) + player.ChangeDir(dir); + Vector2 vector2_5 = this.DirectionTo(vector2_1).SafeNormalize(Vector2.Zero); + if (((double) num6 != 0.0 ? 0 : ((double) this.velocity.Y > -0.0199999995529652 ? 1 : 0)) != 0) + { + this.rotation *= 0.95f; + } + else + { + float num11 = (-vector2_5).ToRotation() + 0.7853982f; + if (this.spriteDirection == -1) + num11 -= 1.570796f * (float) player.direction; + this.rotation = num11 + this.velocity.X * 0.05f; + } + float num12 = this.velocity.Length(); + switch (this.type) + { + case 771: + case 822: + case 823: + case 827: + case 830: + case 838: + case 843: + case 844: + case 845: + case 846: + case 850: + case 852: + this.frame = 0; + break; + case 824: + case 839: + case 840: + case 853: + if ((double) num6 < 0.150000005960464) + { + this.frame = 0; + break; + } + ++this.frameCounter; + if ((double) this.frameCounter > (1.0 - (double) num6) * 10.0) + { + this.frameCounter = 0; + this.frame = Main.rand.Next(4); + break; + } + break; + case 826: + this.frame = (int) this.ai[1]; + break; + case 828: + case 829: + this.frame = (double) num12 >= 6.0 ? 0 : 1; + break; + default: + this.frame = (double) num12 >= 3.0 ? ((double) num12 >= 5.0 ? ((double) num12 >= 7.0 ? 3 : 2) : 1) : 0; + break; + } + this.spriteDirection = player.direction; + } + } + + private void AI_159_PaperAirplanes() + { + if ((double) this.ai[1] == 0.0) + { + this.direction = (double) this.velocity.X > 0.0 ? 1 : -1; + this.rotation = this.velocity.ToRotation(); + this.ai[1] = 1f; + this.ai[0] = (float) -Main.rand.Next(30, 80); + this.netUpdate = true; + } + if (this.wet && this.owner == Main.myPlayer) + this.Kill(); + ++this.ai[0]; + Vector2 spinningpoint = this.rotation.ToRotationVector2() * 8f; + float y = (float) Math.Sin(6.28318548202515 * (Main.timeForVisualEffects % 90.0 / 90.0)) * (float) this.direction * Main.WindForVisuals; + Vector2 v = spinningpoint + new Vector2(Main.WindForVisuals, y); + Vector2 vector2 = Vector2.UnitX * (float) this.direction; + bool flag = this.direction == Math.Sign(Main.WindForVisuals) && (double) this.velocity.Length() > 3.0; + int num1 = (double) this.ai[0] < 20.0 ? 0 : ((double) this.ai[0] <= 69.0 ? 1 : 0); + if ((double) this.ai[0] == 70.0) + this.ai[0] = (float) -Main.rand.Next(120, 600); + int num2 = flag ? 1 : 0; + int num3 = num1 & num2; + if (num3 != 0) + { + float lerpValue = Utils.GetLerpValue(0.0f, 30f, this.ai[0], true); + v = spinningpoint.RotatedBy((double) -this.direction * 6.28318548202515 * 0.0199999995529652 * (double) lerpValue); + } + this.velocity = v.SafeNormalize(Vector2.UnitY) * this.velocity.Length(); + if (num3 == 0) + { + float num4 = MathHelper.Lerp(0.15f, 0.05f, Math.Abs(Main.WindForVisuals)); + if (this.timeLeft % 40 < 20) + this.velocity.Y -= num4; + else + this.velocity.Y += num4; + if ((double) this.velocity.Y < -2.0) + this.velocity.Y = -2f; + if ((double) this.velocity.Y > 2.0) + this.velocity.Y = 2f; + this.velocity.X = MathHelper.Clamp(this.velocity.X + Main.WindForVisuals * (3f / 500f), -6f, 6f); + if ((double) this.velocity.X * (double) this.oldVelocity.X < 0.0) + { + this.direction *= -1; + this.ai[0] = (float) -Main.rand.Next(120, 300); + this.netUpdate = true; + } + } + this.rotation = this.velocity.ToRotation(); + this.spriteDirection = this.direction; + } + + private void AI_158_BabyBird() + { + Player master = Main.player[this.owner]; + if (this.type == 759) + { + if (master.dead) + master.babyBird = false; + if (master.babyBird) + this.timeLeft = 2; + if (++this.frameCounter >= 6) + { + this.frameCounter = 0; + if (++this.frame >= Main.projFrames[this.type] - 1) + this.frame = 0; + } + } + float num1 = 6f; + float num2 = 8f; + int startAttackRange = 800; + float num3 = 150f; + int attackTarget = -1; + this.Minion_FindTargetInRange(startAttackRange, ref attackTarget, false); + if (attackTarget != -1) + { + NPC npc = Main.npc[attackTarget]; + if ((double) master.Distance(npc.Center) > (double) startAttackRange) + attackTarget = -1; + } + if (attackTarget != -1) + { + if (!Collision.SolidCollision(this.position, this.width, this.height)) + this.tileCollide = true; + NPC npc = Main.npc[attackTarget]; + float num4 = this.Distance(npc.Center); + if (new Microsoft.Xna.Framework.Rectangle((int) this.position.X, (int) this.position.Y, this.width, this.height).Intersects(new Microsoft.Xna.Framework.Rectangle((int) npc.position.X, (int) npc.position.Y, npc.width, npc.height))) + { + this.tileCollide = false; + if ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y) < (double) num2) + this.velocity = this.velocity * 1.1f; + if ((double) this.velocity.Length() > (double) num2) + this.velocity = this.velocity * (num1 / this.velocity.Length()); + } + else if ((double) num4 > (double) num3) + { + this.velocity = Vector2.Lerp(this.velocity, this.DirectionTo(npc.Center) * num1, 0.075f); + } + else + { + this.tileCollide = false; + Vector2 vector2 = this.DirectionTo(npc.Center); + this.velocity = this.velocity + new Vector2((float) Math.Sign(vector2.X), (float) Math.Sign(vector2.Y)) * 0.3f; + if ((double) this.velocity.Length() > (double) num2) + this.velocity = this.velocity * (num2 / this.velocity.Length()); + } + float num5 = 0.025f; + float num6 = (float) (this.width * 3); + for (int index = 0; index < 1000; ++index) + { + if (index != this.whoAmI && Main.projectile[index].active && Main.projectile[index].owner == this.owner && Main.projectile[index].type == this.type && (double) Math.Abs(this.position.X - Main.projectile[index].position.X) + (double) Math.Abs(this.position.Y - Main.projectile[index].position.Y) < (double) num6) + { + if ((double) this.position.X < (double) Main.projectile[index].position.X) + this.velocity.X -= num5; + else + this.velocity.X += num5; + if ((double) this.position.Y < (double) Main.projectile[index].position.Y) + this.velocity.Y -= num5; + else + this.velocity.Y += num5; + } + } + this.rotation = this.velocity.X * 0.1f; + this.direction = (double) this.velocity.X > 0.0 ? 1 : -1; + this.spriteDirection = (double) this.velocity.X > 0.0 ? 1 : -1; + } + else + { + this.tileCollide = false; + List blacklistedTargets = Projectile._ai158_blacklistedTargets; + blacklistedTargets.Clear(); + int index1; + this.AI_GetMyGroupIndexAndFillBlackList(blacklistedTargets, out index1, out int _); + this.localAI[0] = (float) index1; + Vector2 homeLocation = Projectile.AI_158_GetHomeLocation(master, index1); + float t = this.Distance(homeLocation); + bool flag = (double) master.gravDir > 0.0 && (double) master.fullRotation == 0.0 && (double) master.headRotation == 0.0; + if ((double) t > 2000.0) + { + this.Center = homeLocation; + this.frame = Main.projFrames[this.type] - 1; + this.frameCounter = 0; + this.velocity = Vector2.Zero; + this.direction = this.spriteDirection = master.direction; + this.rotation = 0.0f; + } + else if ((double) t > 40.0) + { + float num7 = num1 + t * (3f / 500f); + this.velocity = Vector2.Lerp(this.velocity, this.DirectionTo(homeLocation) * MathHelper.Lerp(1f, 5f, Utils.GetLerpValue(40f, 800f, t, true)) * num7, 0.025f); + if ((double) this.velocity.Length() > (double) num7) + this.velocity = this.velocity * (num7 / this.velocity.Length()); + float num8 = 0.05f; + float width = (float) this.width; + for (int index2 = 0; index2 < 1000; ++index2) + { + if (index2 != this.whoAmI && Main.projectile[index2].active && Main.projectile[index2].owner == this.owner && Main.projectile[index2].type == this.type && (double) Math.Abs(this.position.X - Main.projectile[index2].position.X) + (double) Math.Abs(this.position.Y - Main.projectile[index2].position.Y) < (double) width) + { + if ((double) this.position.X < (double) Main.projectile[index2].position.X) + this.velocity.X -= num8; + else + this.velocity.X += num8; + if ((double) this.position.Y < (double) Main.projectile[index2].position.Y) + this.velocity.Y -= num8; + else + this.velocity.Y += num8; + } + } + this.rotation = this.velocity.X * 0.04f; + this.direction = (double) this.velocity.X > 0.0 ? 1 : -1; + this.spriteDirection = (double) this.velocity.X > 0.0 ? 1 : -1; + } + else if ((double) t > 8.0 + (double) master.velocity.Length()) + { + Vector2 vector2 = this.DirectionTo(homeLocation); + this.velocity = this.velocity + new Vector2((float) Math.Sign(vector2.X), (float) Math.Sign(vector2.Y)) * 0.05f; + if ((double) this.velocity.Length() > (double) num1) + this.velocity = this.velocity * (num1 / this.velocity.Length()); + this.rotation = this.velocity.X * 0.1f; + this.direction = (double) this.velocity.X > 0.0 ? 1 : -1; + this.spriteDirection = (double) this.velocity.X > 0.0 ? 1 : -1; + } + else + { + if (!flag) + return; + this.Center = homeLocation; + this.frame = Main.projFrames[this.type] - 1; + this.frameCounter = 0; + this.velocity = Vector2.Zero; + this.direction = this.spriteDirection = master.direction; + this.rotation = 0.0f; + } + } + } + + public static Vector2 AI_158_GetHomeLocation(Player master, int stackedIndex) + { + int num = master.bodyFrame.Height; + if (num == 0) + num = 1; + Vector2 vector2_1 = Main.OffsetsPlayerHeadgear[master.bodyFrame.Y / num]; + vector2_1.Y -= 2f; + switch (stackedIndex % 6) + { + case 1: + vector2_1 += new Vector2((float) (master.direction * 8), master.gravDir * -2f); + break; + case 2: + vector2_1 += new Vector2((float) (master.direction * -10), master.gravDir * -2f); + break; + case 3: + Vector2 vector2_2 = vector2_1; + int direction1 = master.direction; + Vector2 vector2_3 = new Vector2(0.0f, master.gravDir * -10f); + vector2_1 = vector2_2 + vector2_3; + break; + case 4: + vector2_1 += new Vector2((float) (master.direction * 10), master.gravDir * -10f); + break; + case 5: + vector2_1 += new Vector2((float) (master.direction * -12), master.gravDir * -10f); + break; + } + Vector2 vector2_4 = vector2_1 + new Vector2(0.0f, master.gravDir * -16f) * (float) (stackedIndex / 6); + Vector2 vector2_5 = master.RotatedRelativePoint(master.MountedCenter); + int direction2 = master.direction; + Vector2 vector2_6 = new Vector2(0.0f, master.gravDir * -21f); + return (vector2_5 + vector2_6 + vector2_4).Floor(); + } + + private void Minion_FindTargetInRange( + int startAttackRange, + ref int attackTarget, + bool skipIfCannotHitWithOwnBody, + Func customEliminationCheck = null) + { + float maxDistance = (float) startAttackRange; + float val1 = maxDistance; + float val2 = maxDistance; + NPC minionAttackTargetNpc = this.OwnerMinionAttackTargetNPC; + if (minionAttackTargetNpc != null && minionAttackTargetNpc.CanBeChasedBy((object) this) && this.IsInRangeOfMeOrMyOwner((Entity) minionAttackTargetNpc, maxDistance, out float _, out float _, out bool _)) + { + attackTarget = minionAttackTargetNpc.whoAmI; + } + else + { + if (attackTarget >= 0) + return; + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + float myDistance; + float playerDistance; + bool closerIsMe; + if (npc.CanBeChasedBy((object) this) && this.IsInRangeOfMeOrMyOwner((Entity) npc, maxDistance, out myDistance, out playerDistance, out closerIsMe) && (!skipIfCannotHitWithOwnBody || this.CanHitWithOwnBody((Entity) npc)) && (customEliminationCheck == null || customEliminationCheck((Entity) npc, attackTarget))) + { + attackTarget = index; + float num = closerIsMe ? myDistance : playerDistance; + if ((double) val1 > (double) myDistance) + val1 = myDistance; + if ((double) val2 > (double) playerDistance) + val2 = playerDistance; + maxDistance = Math.Max(val1, val2); + } + } + } + } + + private bool AI_067_CustomEliminationCheck_Pirates(Entity otherEntity, int currentTarget) => true; + + private bool AI_067_TigerSpecialAttack() + { + List npcList = new List(); + Vector2 center = Main.player[this.owner].Center; + Microsoft.Xna.Framework.Rectangle rectangle = Utils.CenteredRectangle(center, new Vector2(1600f, 800f)); + int num1 = Main.player[this.owner].ownedProjectileCounts[831] + 1; + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.CanBeChasedBy((object) this) && npc.Hitbox.Intersects(rectangle)) + npcList.Add(npc); + } + if (npcList.Count == 0) + return false; + NPC npc1 = npcList[0]; + for (int index = 1; index < npcList.Count; ++index) + { + if ((double) Vector2.Distance(npc1.Center, center) > (double) Vector2.Distance(npcList[index].Center, center)) + npc1 = npcList[index]; + } + npcList.Remove(npc1); + NPC npc2 = (NPC) null; + if (npcList.Count > 0) + { + npc2 = npcList[0]; + for (int index = 1; index < npcList.Count; ++index) + { + if ((double) this.Distance(npc2.Center) > (double) this.Distance(npcList[index].Center)) + npc2 = npcList[index]; + } + npcList.Remove(npc2); + } + List vector2List = new List(); + if (npc2 != null) + vector2List.Add(npc2.Center); + int num2 = 0; + while (npcList.Count > 0 && vector2List.Count < num1 - 1) + { + int index = Main.rand.Next(npcList.Count); + Vector2 vector2 = npcList[index].velocity * 4f * (float) (num2 + 1); + vector2List.Add(npcList[index].Center + vector2); + npcList.RemoveAt(index); + ++num2; + } + if (npc1 != null) + vector2List.Add(npc1.Center); + Vector2 position = this.Center; + float num3 = (float) Math.Min(20, 30 / vector2List.Count); + float num4 = 0.0f; + for (int index = 0; index < vector2List.Count; ++index) + { + float num5 = 20f; + Vector2 vector2 = vector2List[index]; + vector2.X += (double) position.X < (double) vector2.X ? num5 : -num5; + Vector2 velocity = vector2 - position; + int num6 = (int) Math.Min((double) num3, 4.0 + Math.Ceiling((double) velocity.Length() / 50.0)); + if (num6 < 5) + num6 = 5; + Projectile.NewProjectile(position, velocity, 818, this.damage, 0.0f, this.owner, (float) (-(double) num4 * 4.0), (float) (num6 * 4)); + position = vector2; + num4 += (float) num6; + } + this.Center = position; + this.ai[0] = 4f; + this.ai[1] = num4; + this.netUpdate = true; + return true; + } + + private void AI_067_FreakingPirates() + { + Player player = Main.player[this.owner]; + if (!player.active) + { + this.active = false; + } + else + { + bool flag1 = this.type == 393 || this.type == 394 || this.type == 395; + bool flag2 = this.type == 758; + bool flag3 = this.type == 833 || this.type == 834 || this.type == 835; + bool flag4 = this.type == 834 || this.type == 835; + int startAttackRange = 450; + float num1 = 500f; + float num2 = 300f; + if (flag1) + { + if (player.dead) + player.pirateMinion = false; + if (player.pirateMinion) + this.timeLeft = 2; + startAttackRange = 800; + } + Color color; + if (flag3) + { + if (player.dead) + player.stormTiger = false; + if (player.stormTiger) + this.timeLeft = 2; + startAttackRange = 800; + if ((double) this.ai[0] != 4.0) + { + if (this.velocity != Vector2.Zero && Main.rand.Next(18) == 0) + { + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 269)]; + dust.fadeIn = 0.5f; + dust.scale = 0.3f; + dust.noLight = true; + dust.velocity += this.velocity * 0.005f; + } + if (this.type == 833) + Lighting.AddLight(this.Center, Vector3.One * 0.5f); + if (this.type == 834) + Lighting.AddLight(this.Center, Vector3.One * 0.8f); + if (this.type == 835) + { + Vector2 center = this.Center; + color = Color.Lerp(Main.OurFavoriteColor, Color.White, 0.8f); + Vector3 rgb = color.ToVector3() * 1f; + Lighting.AddLight(center, rgb); + } + } + if (this.owner == Main.myPlayer) + { + if ((double) this.localAI[0] <= 0.0) + { + int num3; + switch (this.type) + { + case 834: + num3 = 300; + break; + case 835: + num3 = 240; + break; + default: + num3 = 360; + break; + } + if (this.damage != 0) + this.localAI[0] = this.AI_067_TigerSpecialAttack() ? (float) num3 : 10f; + } + else + --this.localAI[0]; + } + } + if (flag2) + { + if (player.dead) + player.vampireFrog = false; + if (player.vampireFrog) + this.timeLeft = 2; + startAttackRange = 800; + } + if (this.type == 500) + { + num1 = 200f; + if (player.dead) + player.crimsonHeart = false; + if (player.crimsonHeart) + this.timeLeft = 2; + } + if (this.type == 653) + { + num1 = 300f; + if (player.dead) + player.companionCube = false; + if (player.companionCube) + this.timeLeft = 2; + } + if (flag3 && (double) this.ai[0] == 4.0) + { + this.velocity = Vector2.Zero; + this.frame = 9; + if (flag4) + this.frame = 11; + --this.ai[1]; + if ((double) this.ai[1] > 0.0) + return; + this.ai[0] = 0.0f; + this.ai[1] = 0.0f; + this.netUpdate = true; + } + Vector2 vector2_1 = player.Center; + if (flag1) + { + vector2_1.X -= (float) ((15 + player.width / 2) * player.direction); + vector2_1.X -= (float) (this.minionPos * 20 * player.direction); + } + else if (flag3) + { + vector2_1.X -= (float) ((15 + player.width / 2) * player.direction); + vector2_1.X -= (float) (this.minionPos * 40 * player.direction); + } + else if (flag2) + { + vector2_1.X -= (float) ((35 + player.width / 2) * player.direction); + vector2_1.X -= (float) (this.minionPos * 40 * player.direction); + } + else if (this.type == 500) + { + vector2_1.X -= (float) ((15 + player.width / 2) * player.direction); + vector2_1.X -= (float) (40 * player.direction); + } + else if (this.type == 653) + vector2_1.X = player.Center.X; + if (this.type == 500) + { + Lighting.AddLight(this.Center, 0.9f, 0.1f, 0.3f); + int num4 = 6; + if (this.frame == 0 || this.frame == 2) + num4 = 12; + if (++this.frameCounter >= num4) + { + this.frameCounter = 0; + if (++this.frame >= Main.projFrames[this.type]) + this.frame = 0; + } + this.rotation += this.velocity.X / 20f; + Vector2 spinninpoint = (-Vector2.UnitY).RotatedBy((double) this.rotation).RotatedBy((double) this.direction * 0.200000002980232); + int index = Dust.NewDust(this.Center + spinninpoint * 10f - new Vector2(4f), 0, 0, 5, spinninpoint.X, spinninpoint.Y, newColor: Color.Transparent); + Main.dust[index].scale = 1f; + Main.dust[index].velocity = spinninpoint.RotatedByRandom(0.785398185253143) * 3.5f; + Main.dust[index].noGravity = true; + Main.dust[index].shader = GameShaders.Armor.GetSecondaryShader(Main.player[this.owner].cLight, Main.player[this.owner]); + } + if (this.type == 653) + { + this.rotation += this.velocity.X / 20f; + if (this.owner >= 0 && this.owner < (int) byte.MaxValue) + { + --Projectile._CompanionCubeScreamCooldown[this.owner]; + if ((double) Projectile._CompanionCubeScreamCooldown[this.owner] < 0.0) + Projectile._CompanionCubeScreamCooldown[this.owner] = 0.0f; + } + Tile tileSafely = Framing.GetTileSafely(this.Center); + if (tileSafely.liquid > (byte) 0 && tileSafely.lava()) + ++this.localAI[0]; + else + --this.localAI[0]; + this.localAI[0] = MathHelper.Clamp(this.localAI[0], 0.0f, 20f); + if ((double) this.localAI[0] >= 20.0) + { + if ((double) Projectile._CompanionCubeScreamCooldown[this.owner] == 0.0) + { + Projectile._CompanionCubeScreamCooldown[this.owner] = 3600f; + SoundEngine.PlaySound(Main.rand.Next(10) == 0 ? SoundID.NPCDeath61 : SoundID.NPCDeath59, this.position); + } + this.Kill(); + } + color = Lighting.GetColor((int) this.Center.X / 16, (int) this.Center.Y / 16); + Vector3 vector3_1 = color.ToVector3(); + color = Lighting.GetColor((int) player.Center.X / 16, (int) player.Center.Y / 16); + Vector3 vector3_2 = color.ToVector3(); + if ((double) vector3_1.Length() < 0.150000005960464 && (double) vector3_2.Length() < 0.150000005960464) + ++this.localAI[1]; + else if ((double) this.localAI[1] > 0.0) + --this.localAI[1]; + this.localAI[1] = MathHelper.Clamp(this.localAI[1], -3600f, 120f); + if ((double) this.localAI[1] > (double) Main.rand.Next(30, 120) && !player.immune && player.velocity == Vector2.Zero) + { + if (Main.rand.Next(5) == 0) + { + SoundEngine.PlaySound(SoundID.Item16, this.Center); + this.localAI[1] = -600f; + } + else + { + SoundEngine.PlaySound(SoundID.Item1, this.Center); + player.Hurt(PlayerDeathReason.ByOther(6), 3, 0); + player.immune = false; + player.immuneTime = 0; + this.localAI[1] = (float) (Main.rand.Next(30) * -10 - 300); + } + } + } + bool flag5 = true; + if (this.type == 500 || this.type == 653) + flag5 = false; + this.shouldFallThrough = (double) player.position.Y + (double) player.height - 12.0 > (double) this.position.Y + (double) this.height; + this.friendly = false; + int num5 = 0; + int num6 = 15; + int attackTarget = -1; + bool flag6 = true; + if (flag2) + { + num6 = 20; + num5 = 60; + } + if (flag3) + { + flag6 = false; + this.friendly = true; + this.originalDamage = player.highestStormTigerGemOriginalDamage; + } + if ((double) this.ai[0] == 0.0 & flag5) + this.Minion_FindTargetInRange(startAttackRange, ref attackTarget, true, new Func(this.AI_067_CustomEliminationCheck_Pirates)); + if ((double) this.ai[0] == 1.0) + { + this.tileCollide = false; + float num7 = 0.2f; + float num8 = 10f; + int num9 = 200; + if ((double) num8 < (double) Math.Abs(player.velocity.X) + (double) Math.Abs(player.velocity.Y)) + num8 = Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y); + Vector2 vector2_2 = player.Center - this.Center; + double num10 = (double) vector2_2.Length(); + if (num10 > 2000.0) + this.position = player.Center - new Vector2((float) this.width, (float) this.height) / 2f; + if (num10 < (double) num9 && (double) player.velocity.Y == 0.0 && (double) this.position.Y + (double) this.height <= (double) player.position.Y + (double) player.height && !Collision.SolidCollision(this.position, this.width, this.height)) + { + this.ai[0] = 0.0f; + this.netUpdate = true; + if ((double) this.velocity.Y < -6.0) + this.velocity.Y = -6f; + } + if (num10 >= 60.0) + { + vector2_2.Normalize(); + Vector2 vector2_3 = vector2_2 * num8; + if ((double) this.velocity.X < (double) vector2_3.X) + { + this.velocity.X += num7; + if ((double) this.velocity.X < 0.0) + this.velocity.X += num7 * 1.5f; + } + if ((double) this.velocity.X > (double) vector2_3.X) + { + this.velocity.X -= num7; + if ((double) this.velocity.X > 0.0) + this.velocity.X -= num7 * 1.5f; + } + if ((double) this.velocity.Y < (double) vector2_3.Y) + { + this.velocity.Y += num7; + if ((double) this.velocity.Y < 0.0) + this.velocity.Y += num7 * 1.5f; + } + if ((double) this.velocity.Y > (double) vector2_3.Y) + { + this.velocity.Y -= num7; + if ((double) this.velocity.Y > 0.0) + this.velocity.Y -= num7 * 1.5f; + } + } + if ((double) this.velocity.X != 0.0) + this.spriteDirection = Math.Sign(this.velocity.X); + if (flag1) + { + ++this.frameCounter; + if (this.frameCounter > 3) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame < 10 | this.frame > 13) + this.frame = 10; + this.rotation = this.velocity.X * 0.1f; + } + if (flag2) + { + int num11 = 3; + if (++this.frameCounter >= num11 * 4) + this.frameCounter = 0; + this.frame = 14 + this.frameCounter / num11; + this.rotation = this.velocity.X * 0.15f; + } + if (flag3) + { + this.frame = 8; + if (flag4) + this.frame = 10; + this.rotation += 0.6f * (float) this.spriteDirection; + } + } + if ((double) this.ai[0] == 2.0 && (double) this.ai[1] < 0.0) + { + this.friendly = false; + ++this.ai[1]; + if (num6 >= 0) + { + this.ai[1] = 0.0f; + this.ai[0] = 0.0f; + this.netUpdate = true; + return; + } + } + else if ((double) this.ai[0] == 2.0) + { + this.spriteDirection = this.direction; + this.rotation = 0.0f; + if (flag1) + { + this.friendly = true; + this.frame = 4 + (int) ((double) num6 - (double) this.ai[1]) / (num6 / 3); + if ((double) this.velocity.Y != 0.0) + this.frame += 3; + } + if (flag2) + { + float num12 = ((float) num6 - this.ai[1]) / (float) num6; + if ((double) num12 > 0.25 && (double) num12 < 0.75) + this.friendly = true; + int num13 = (int) ((double) num12 * 5.0); + if (num13 > 2) + num13 = 4 - num13; + this.frame = (double) this.velocity.Y == 0.0 ? 18 + num13 : 21 + num13; + if ((double) this.velocity.Y == 0.0) + this.velocity.X *= 0.8f; + } + this.velocity.Y += 0.4f; + if ((double) this.velocity.Y > 10.0) + this.velocity.Y = 10f; + --this.ai[1]; + if ((double) this.ai[1] <= 0.0) + { + if (num5 > 0) + { + this.ai[1] = (float) -num5; + } + else + { + this.ai[1] = 0.0f; + this.ai[0] = 0.0f; + this.netUpdate = true; + return; + } + } + } + if (attackTarget >= 0) + { + float maxDistance = (float) startAttackRange; + float num14 = 20f; + if (flag2) + num14 = 50f; + NPC npc = Main.npc[attackTarget]; + Vector2 center = npc.Center; + vector2_1 = center; + if (this.IsInRangeOfMeOrMyOwner((Entity) npc, maxDistance, out float _, out float _, out bool _)) + { + this.shouldFallThrough = (double) npc.Center.Y > (double) this.Bottom.Y; + bool flag7 = (double) this.velocity.Y == 0.0; + if (this.wet && (double) this.velocity.Y > 0.0 && !this.shouldFallThrough) + flag7 = true; + if ((double) center.Y < (double) this.Center.Y - 30.0 & flag7) + { + float num15 = (float) Math.Sqrt(((double) center.Y - (double) this.Center.Y) * -1.0 * 2.0 * 0.400000005960464); + if ((double) num15 > 26.0) + num15 = 26f; + this.velocity.Y = -num15; + } + if (flag6 && (double) Vector2.Distance(this.Center, vector2_1) < (double) num14) + { + if ((double) this.velocity.Length() > 10.0) + this.velocity = this.velocity / (this.velocity.Length() / 10f); + this.ai[0] = 2f; + this.ai[1] = (float) num6; + this.netUpdate = true; + this.direction = (double) center.X - (double) this.Center.X > 0.0 ? 1 : -1; + } + if (flag3 && this.Hitbox.Intersects(npc.Hitbox) && (double) this.velocity.Y >= 0.0) + { + this.velocity.Y = -4f; + this.velocity.X = (float) (this.direction * 10); + } + } + if (flag2) + { + int num16 = 1; + if ((double) center.X - (double) this.Center.X < 0.0) + num16 = -1; + vector2_1.X += (float) (20 * -num16); + } + } + if ((double) this.ai[0] == 0.0 && attackTarget < 0) + { + if (Main.player[this.owner].rocketDelay2 > 0) + { + this.ai[0] = 1f; + this.netUpdate = true; + } + Vector2 vector2_4 = player.Center - this.Center; + if ((double) vector2_4.Length() > 2000.0) + this.position = player.Center - new Vector2((float) this.width, (float) this.height) / 2f; + else if ((double) vector2_4.Length() > (double) num1 || (double) Math.Abs(vector2_4.Y) > (double) num2) + { + this.ai[0] = 1f; + this.netUpdate = true; + if ((double) this.velocity.Y > 0.0 && (double) vector2_4.Y < 0.0) + this.velocity.Y = 0.0f; + if ((double) this.velocity.Y < 0.0 && (double) vector2_4.Y > 0.0) + this.velocity.Y = 0.0f; + } + } + if ((double) this.ai[0] == 0.0) + { + if (attackTarget < 0) + { + if ((double) this.Distance(player.Center) > 60.0 && (double) this.Distance(vector2_1) > 60.0 && Math.Sign(vector2_1.X - player.Center.X) != Math.Sign(this.Center.X - player.Center.X)) + vector2_1 = player.Center; + Microsoft.Xna.Framework.Rectangle r1 = Utils.CenteredRectangle(vector2_1, this.Size); + for (int index = 0; index < 20 && !Collision.SolidCollision(r1.TopLeft(), r1.Width, r1.Height); ++index) + { + r1.Y += 16; + vector2_1.Y += 16f; + } + Vector2 vector2_5 = Collision.TileCollision(player.Center - this.Size / 2f, vector2_1 - player.Center, this.width, this.height); + vector2_1 = player.Center - this.Size / 2f + vector2_5; + if ((double) this.Distance(vector2_1) < 32.0) + { + float num17 = player.Center.Distance(vector2_1); + if ((double) player.Center.Distance(this.Center) < (double) num17) + vector2_1 = this.Center; + } + Vector2 vector2_6 = player.Center - vector2_1; + if ((double) vector2_6.Length() > (double) num1 || (double) Math.Abs(vector2_6.Y) > (double) num2) + { + Microsoft.Xna.Framework.Rectangle r2 = Utils.CenteredRectangle(player.Center, this.Size); + Vector2 vector2_7 = vector2_1 - player.Center; + Vector2 vector2_8 = r2.TopLeft(); + for (float num18 = 0.0f; (double) num18 < 1.0; num18 += 0.05f) + { + Vector2 vector2_9 = r2.TopLeft() + vector2_7 * num18; + if (!Collision.SolidCollision(r2.TopLeft() + vector2_7 * num18, r1.Width, r1.Height)) + vector2_8 = vector2_9; + else + break; + } + vector2_1 = vector2_8 + this.Size / 2f; + } + } + this.tileCollide = true; + float num19 = 0.5f; + float num20 = 4f; + float num21 = 4f; + float num22 = 0.1f; + if (flag1 && attackTarget != -1) + { + num19 = 1f; + num20 = 8f; + num21 = 8f; + } + if (flag2 && attackTarget != -1) + { + num19 = 0.7f; + num20 = 6f; + num21 = 6f; + } + if (flag3 && attackTarget != -1) + { + num19 = 0.7f; + num20 = 6f; + num21 = 6f; + } + if ((double) num21 < (double) Math.Abs(player.velocity.X) + (double) Math.Abs(player.velocity.Y)) + { + num21 = Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y); + num19 = 0.7f; + } + int num23 = 0; + bool flag8 = false; + float num24 = vector2_1.X - this.Center.X; + Vector2 vector2_10 = vector2_1 - this.Center; + if (this.type == 653 && (double) Math.Abs(num24) < 150.0) + { + this.rotation = this.rotation.AngleTowards(0.0f, 0.2f); + this.velocity.X *= 0.9f; + if ((double) Math.Abs(this.velocity.X) < 0.1) + this.velocity.X = 0.0f; + } + else if ((double) Math.Abs(num24) > 5.0) + { + if ((double) num24 < 0.0) + { + num23 = -1; + if ((double) this.velocity.X > -(double) num20) + this.velocity.X -= num19; + else + this.velocity.X -= num22; + } + else + { + num23 = 1; + if ((double) this.velocity.X < (double) num20) + this.velocity.X += num19; + else + this.velocity.X += num22; + } + bool flag9 = true; + if (flag1) + flag9 = false; + if (this.type == 653) + flag9 = false; + if (flag2 && attackTarget == -1) + flag9 = false; + if (flag3) + flag9 = (double) vector2_10.Y < -80.0; + if (flag9) + flag8 = true; + } + else + { + this.velocity.X *= 0.9f; + if ((double) Math.Abs(this.velocity.X) < (double) num19 * 2.0) + this.velocity.X = 0.0f; + } + bool flag10 = (double) Math.Abs(vector2_10.X) >= 64.0 || (double) vector2_10.Y <= -48.0 && (double) Math.Abs(vector2_10.X) >= 8.0; + if ((uint) num23 > 0U & flag10) + { + int num25 = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int num26 = (int) this.position.Y / 16; + int i = num25 + num23 + (int) this.velocity.X; + for (int j = num26; j < num26 + this.height / 16 + 1; ++j) + { + if (WorldGen.SolidTile(i, j)) + flag8 = true; + } + } + if (this.type == 500 && (double) this.velocity.X != 0.0) + flag8 = true; + if (this.type == 653 && (double) Math.Abs(this.velocity.X) > 3.0) + flag8 = true; + Collision.StepUp(ref this.position, ref this.velocity, this.width, this.height, ref this.stepSpeed, ref this.gfxOffY); + float num27 = Utils.GetLerpValue(0.0f, 100f, vector2_10.Y, true) * Utils.GetLerpValue(-2f, -6f, this.velocity.Y, true); + if ((double) this.velocity.Y == 0.0 && flag8) + { + for (int index = 0; index < 3; ++index) + { + int i1 = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + if (index == 0) + i1 = (int) this.position.X / 16; + if (index == 2) + i1 = (int) ((double) this.position.X + (double) this.width) / 16; + int j = (int) ((double) this.position.Y + (double) this.height) / 16; + if (WorldGen.SolidTile(i1, j) || Main.tile[i1, j].halfBrick() || Main.tile[i1, j].slope() > (byte) 0 || TileID.Sets.Platforms[(int) Main.tile[i1, j].type] && Main.tile[i1, j].active() && !Main.tile[i1, j].inActive()) + { + try + { + int num28 = (int) ((double) this.position.X + (double) (this.width / 2)) / 16; + int num29 = (int) ((double) this.position.Y + (double) (this.height / 2)) / 16; + int i2 = num28 + num23 + (int) this.velocity.X; + if (!WorldGen.SolidTile(i2, num29 - 1) && !WorldGen.SolidTile(i2, num29 - 2)) + this.velocity.Y = -5.1f; + else if (!WorldGen.SolidTile(i2, num29 - 2)) + this.velocity.Y = -7.1f; + else if (WorldGen.SolidTile(i2, num29 - 5)) + this.velocity.Y = -11.1f; + else if (WorldGen.SolidTile(i2, num29 - 4)) + this.velocity.Y = -10.1f; + else + this.velocity.Y = -9.1f; + } + catch + { + this.velocity.Y = -9.1f; + } + } + } + if ((double) vector2_1.Y - (double) this.Center.Y < -48.0) + { + float num30 = (vector2_1.Y - this.Center.Y) * -1f; + if ((double) num30 < 60.0) + this.velocity.Y = -6f; + else if ((double) num30 < 80.0) + this.velocity.Y = -7f; + else if ((double) num30 < 100.0) + this.velocity.Y = -8f; + else if ((double) num30 < 120.0) + this.velocity.Y = -9f; + else if ((double) num30 < 140.0) + this.velocity.Y = -10f; + else if ((double) num30 < 160.0) + this.velocity.Y = -11f; + else if ((double) num30 < 190.0) + this.velocity.Y = -12f; + else if ((double) num30 < 210.0) + this.velocity.Y = -13f; + else if ((double) num30 < 270.0) + this.velocity.Y = -14f; + else if ((double) num30 < 310.0) + this.velocity.Y = -15f; + else + this.velocity.Y = -16f; + } + if (this.wet && (double) num27 == 0.0) + this.velocity.Y *= 2f; + } + if ((double) this.velocity.X > (double) num21) + this.velocity.X = num21; + if ((double) this.velocity.X < -(double) num21) + this.velocity.X = -num21; + if ((double) this.velocity.X < 0.0) + this.direction = -1; + if ((double) this.velocity.X > 0.0) + this.direction = 1; + if ((double) this.velocity.X == 0.0) + this.direction = (double) player.Center.X > (double) this.Center.X ? 1 : -1; + if ((double) this.velocity.X > (double) num19 && num23 == 1) + this.direction = 1; + if ((double) this.velocity.X < -(double) num19 && num23 == -1) + this.direction = -1; + this.spriteDirection = this.direction; + if (flag1) + { + this.rotation = 0.0f; + if ((double) this.velocity.Y == 0.0) + { + if ((double) this.velocity.X == 0.0) + { + this.frame = 0; + this.frameCounter = 0; + } + else if ((double) Math.Abs(this.velocity.X) >= 0.5) + { + this.frameCounter += (int) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 10) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame >= 4) + this.frame = 0; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else if ((double) this.velocity.Y != 0.0) + { + this.frameCounter = 0; + this.frame = 14; + } + } + if (flag2) + { + this.rotation = 0.0f; + if ((double) this.velocity.Y == 0.0) + { + if ((double) this.velocity.X == 0.0) + { + int num31 = 4; + if (++this.frameCounter >= 7 * num31 && Main.rand.Next(50) == 0) + this.frameCounter = 0; + int num32 = this.frameCounter / num31; + if (num32 >= 4) + num32 = 6 - num32; + if (num32 < 0) + num32 = 0; + this.frame = 1 + num32; + } + else if ((double) Math.Abs(this.velocity.X) >= 0.5) + { + this.frameCounter += (int) Math.Abs(this.velocity.X); + ++this.frameCounter; + int num33 = 15; + if (this.frameCounter >= 8 * num33) + this.frameCounter = 0; + this.frame = this.frameCounter / num33 + 5; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else if ((double) this.velocity.Y != 0.0) + { + if ((double) this.velocity.Y < 0.0) + { + if (this.frame > 9 || this.frame < 5) + { + this.frame = 5; + this.frameCounter = 0; + } + if (++this.frameCounter >= 1 && this.frame < 9) + { + ++this.frame; + this.frameCounter = 0; + } + } + else + { + if (this.frame > 13 || this.frame < 9) + { + this.frame = 9; + this.frameCounter = 0; + } + if (++this.frameCounter >= 2 && this.frame < 11) + { + ++this.frame; + this.frameCounter = 0; + } + } + } + } + if (flag3) + { + int num34 = 8; + if (flag4) + num34 = 10; + this.rotation = 0.0f; + if ((double) this.velocity.Y == 0.0) + { + if ((double) this.velocity.X == 0.0) + { + this.frame = 0; + this.frameCounter = 0; + } + else if ((double) Math.Abs(this.velocity.X) >= 0.5) + { + this.frameCounter += (int) Math.Abs(this.velocity.X); + ++this.frameCounter; + if (this.frameCounter > 10) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame >= num34 || this.frame < 2) + this.frame = 2; + } + else + { + this.frame = 0; + this.frameCounter = 0; + } + } + else if ((double) this.velocity.Y != 0.0) + { + this.frameCounter = 0; + this.frame = 1; + if (flag4) + this.frame = 9; + } + } + this.velocity.Y += (float) (0.400000005960464 + (double) num27 * 1.0); + if ((double) this.velocity.Y > 10.0) + this.velocity.Y = 10f; + } + if (!flag1) + return; + ++this.localAI[0]; + if ((double) this.velocity.X == 0.0) + ++this.localAI[0]; + if ((double) this.localAI[0] < (double) Main.rand.Next(900, 1200)) + return; + this.localAI[0] = 0.0f; + for (int index1 = 0; index1 < 6; ++index1) + { + Vector2 Position = this.Center + Vector2.UnitX * (float) -this.direction * 8f - Vector2.One * 5f + Vector2.UnitY * 8f; + double num35 = (double) -this.direction; + color = new Color(); + Color newColor = color; + int index2 = Dust.NewDust(Position, 3, 6, 216, (float) num35, 1f, newColor: newColor); + Main.dust[index2].velocity /= 2f; + Main.dust[index2].scale = 0.8f; + } + int index3 = Gore.NewGore(this.Center + Vector2.UnitX * (float) -this.direction * 8f, Vector2.Zero, Main.rand.Next(580, 583)); + Main.gore[index3].velocity /= 2f; + Main.gore[index3].velocity.Y = Math.Abs(Main.gore[index3].velocity.Y); + Main.gore[index3].velocity.X = -Math.Abs(Main.gore[index3].velocity.X) * (float) this.direction; + } + } + + private void AI_157_SharpTears() + { + bool flag1 = (double) this.ai[0] < 20.0; + bool flag2 = (double) this.ai[0] > 20.0; + bool flag3 = (double) this.ai[0] >= 30.0; + ++this.ai[0]; + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + this.rotation = this.velocity.ToRotation(); + this.frame = Main.rand.Next(6); + for (int index = 0; index < 30; ++index) + { + Dust dust = Dust.NewDustPerfect(this.Center + Main.rand.NextVector2Circular(24f, 24f), 5, new Vector2?(this.velocity * MathHelper.Lerp(0.2f, 0.7f, Main.rand.NextFloat()))); + dust.velocity += Main.rand.NextVector2Circular(0.5f, 0.5f); + dust.scale = (float) (0.800000011920929 + (double) Main.rand.NextFloat() * 0.5); + } + for (int index = 0; index < 30; ++index) + { + Dust dust = Dust.NewDustPerfect(this.Center + Main.rand.NextVector2Circular(24f, 24f), 5, new Vector2?(Main.rand.NextVector2Circular(2f, 2f) + this.velocity * MathHelper.Lerp(0.2f, 0.5f, Main.rand.NextFloat()))); + dust.velocity += Main.rand.NextVector2Circular(0.5f, 0.5f); + dust.scale = (float) (0.800000011920929 + (double) Main.rand.NextFloat() * 0.5); + dust.fadeIn = 1f; + } + SoundEngine.PlaySound(SoundID.Item113, this.Center); + } + if (flag1) + { + this.Opacity += 0.1f; + this.scale = this.Opacity * this.ai[1]; + for (int index = 0; index < 2; ++index) + { + Dust dust = Dust.NewDustPerfect(this.Center + Main.rand.NextVector2Circular(16f, 16f), 5, new Vector2?(this.velocity * MathHelper.Lerp(0.2f, 0.5f, Main.rand.NextFloat()))); + dust.velocity += Main.rand.NextVector2Circular(0.5f, 0.5f); + dust.velocity *= 0.5f; + dust.scale = (float) (0.800000011920929 + (double) Main.rand.NextFloat() * 0.5); + } + } + if (flag2) + { + this.Opacity -= 0.2f; + for (int index = 0; index < 2; ++index) + { + Dust dust = Dust.NewDustPerfect(this.Center + Main.rand.NextVector2Circular(16f, 16f), 5, new Vector2?(this.velocity * MathHelper.Lerp(0.2f, 0.5f, Main.rand.NextFloat()))); + dust.velocity += Main.rand.NextVector2Circular(0.5f, 0.5f); + dust.velocity *= 0.5f; + dust.scale = (float) (0.800000011920929 + (double) Main.rand.NextFloat() * 0.5); + } + } + if (flag3) + this.Kill(); + Lighting.AddLight(this.Center, new Vector3(0.5f, 0.1f, 0.1f) * this.scale); + } + + private bool IsInRangeOfMeOrMyOwner( + Entity entity, + float maxDistance, + out float myDistance, + out float playerDistance, + out bool closerIsMe) + { + myDistance = Vector2.Distance(entity.Center, this.Center); + if ((double) myDistance < (double) maxDistance && !this.CanHitWithOwnBody(entity)) + myDistance = float.PositiveInfinity; + playerDistance = Vector2.Distance(entity.Center, Main.player[this.owner].Center); + if ((double) playerDistance < (double) maxDistance && !this.CanHitWithMeleeWeapon(entity)) + playerDistance = float.PositiveInfinity; + closerIsMe = (double) myDistance < (double) playerDistance; + return closerIsMe ? (double) myDistance <= (double) maxDistance : (double) playerDistance <= (double) maxDistance; + } + + private void AI_156_BatOfLight() + { + List blacklistedTargets = Projectile._ai156_blacklistedTargets; + Player player = Main.player[this.owner]; + int num1 = this.type == 755 ? 1 : 0; + bool flag = this.type == 946; + if (num1 != 0) + { + if (player.dead) + player.batsOfLight = false; + if (player.batsOfLight) + this.timeLeft = 2; + DelegateMethods.v3_1 = this.AI_156_GetColor().ToVector3(); + Point tileCoordinates = this.Center.ToTileCoordinates(); + DelegateMethods.CastLightOpen(tileCoordinates.X, tileCoordinates.Y); + if (++this.frameCounter >= 6) + { + this.frameCounter = 0; + if (++this.frame >= Main.projFrames[this.type] - 1) + this.frame = 0; + } + int num2 = player.direction; + if ((double) this.velocity.X != 0.0) + num2 = Math.Sign(this.velocity.X); + this.spriteDirection = num2; + } + if (flag) + { + if (player.dead) + player.empressBlade = false; + if (player.empressBlade) + this.timeLeft = 2; + DelegateMethods.v3_1 = this.AI_156_GetColor().ToVector3(); + Point tileCoordinates = this.Center.ToTileCoordinates(); + DelegateMethods.CastLightOpen(tileCoordinates.X, tileCoordinates.Y); + } + blacklistedTargets.Clear(); + this.AI_156_Think(blacklistedTargets); + } + + public Color AI_156_GetColor() + { + if (this.aiStyle != 156) + return Color.Transparent; + int num = this.type == 755 ? 1 : 0; + int type = this.type; + return num != 0 ? Color.Crimson : Color.Transparent; + } + + private void AI_156_Think(List blacklist) + { + bool flag1 = this.type == 755; + bool flag2 = this.type == 946; + int num1 = 60; + int num2 = num1 - 1; + int num3 = num1 + 60; + int num4 = num3 - 1; + int num5 = num1 + 1; + if (flag2) + { + num1 = 40; + num2 = num1 - 1; + num3 = num1 + 40; + num4 = num3 - 1; + num5 = num1 + 1; + } + if ((double) this.ai[0] == -1.0) + { + int index; + int totalIndexesInGroup; + this.AI_GetMyGroupIndexAndFillBlackList(blacklist, out index, out totalIndexesInGroup); + Vector2 idleSpot; + float idleRotation; + this.AI_156_GetIdlePosition(index, totalIndexesInGroup, out idleSpot, out idleRotation); + this.velocity = Vector2.Zero; + this.Center = this.Center.MoveTowards(idleSpot, 32f); + this.rotation = this.rotation.AngleLerp(idleRotation, 0.2f); + if ((double) this.Distance(idleSpot) >= 2.0) + return; + this.ai[0] = 0.0f; + this.netUpdate = true; + } + else if ((double) this.ai[0] == 0.0) + { + if (flag1) + { + int index; + int totalIndexesInGroup; + this.AI_GetMyGroupIndexAndFillBlackList(blacklist, out index, out totalIndexesInGroup); + Vector2 idleSpot; + this.AI_156_GetIdlePosition(index, totalIndexesInGroup, out idleSpot, out float _); + this.velocity = Vector2.Zero; + this.Center = Vector2.SmoothStep(this.Center, idleSpot, 0.45f); + if (Main.rand.Next(20) == 0) + { + int num6 = this.AI_156_TryAttackingNPCs(blacklist); + if (num6 != -1) + { + this.ai[0] = (float) num1; + this.ai[1] = (float) num6; + this.netUpdate = true; + return; + } + } + } + if (!flag2) + return; + int index1; + int totalIndexesInGroup1; + this.AI_GetMyGroupIndexAndFillBlackList(blacklist, out index1, out totalIndexesInGroup1); + Vector2 idleSpot1; + float idleRotation; + this.AI_156_GetIdlePosition(index1, totalIndexesInGroup1, out idleSpot1, out idleRotation); + this.velocity = Vector2.Zero; + this.Center = Vector2.SmoothStep(this.Center, idleSpot1, 0.45f); + this.rotation = this.rotation.AngleLerp(idleRotation, 0.45f); + if (Main.rand.Next(20) != 0) + return; + int num7 = this.AI_156_TryAttackingNPCs(blacklist); + if (num7 == -1) + return; + this.ai[0] = (float) Main.rand.NextFromList(num1, num3); + this.ai[0] = (float) num3; + this.ai[1] = (float) num7; + this.netUpdate = true; + } + else + { + Vector2 vector2_1; + if (flag1) + { + int index = (int) this.ai[1]; + if (!Main.npc.IndexInRange(index)) + { + this.ai[0] = 0.0f; + this.netUpdate = true; + return; + } + NPC npc = Main.npc[index]; + if (!npc.CanBeChasedBy((object) this)) + { + this.ai[0] = 0.0f; + this.netUpdate = true; + return; + } + --this.ai[0]; + if ((double) this.ai[0] >= (double) num2) + { + this.velocity = this.velocity * 0.8f; + if ((double) this.ai[0] != (double) num2) + return; + this.localAI[0] = this.Center.X; + this.localAI[1] = this.Center.Y; + return; + } + float lerpValue = Utils.GetLerpValue((float) num2, 0.0f, this.ai[0], true); + Vector2 vector2_2 = new Vector2(this.localAI[0], this.localAI[1]); + if ((double) lerpValue >= 0.5) + vector2_2 = Main.player[this.owner].Center; + Vector2 center = npc.Center; + float rotation = (center - vector2_2).ToRotation(); + double num8 = (double) center.X > (double) vector2_2.X ? -3.14159274101257 : 3.14159274101257; + float f = (float) (num8 + -num8 * (double) lerpValue * 2.0); + Vector2 spinningpoint = f.ToRotationVector2(); + spinningpoint.Y *= (float) Math.Sin((double) this.identity * 2.29999995231628) * 0.5f; + spinningpoint = spinningpoint.RotatedBy((double) rotation); + vector2_1 = center - vector2_2; + float num9 = vector2_1.Length() / 2f; + this.Center = Vector2.Lerp(vector2_2, center, 0.5f) + spinningpoint * num9; + this.velocity = MathHelper.WrapAngle((float) ((double) rotation + (double) f + 0.0)).ToRotationVector2() * 10f; + this.position = this.position - this.velocity; + if ((double) this.ai[0] == 0.0) + { + int num10 = this.AI_156_TryAttackingNPCs(blacklist); + if (num10 != -1) + { + this.ai[0] = (float) num1; + this.ai[1] = (float) num10; + this.netUpdate = true; + return; + } + this.ai[1] = 0.0f; + this.netUpdate = true; + } + } + if (!flag2) + return; + bool skipBodyCheck = true; + int num11 = 0; + int num12 = num2; + int num13 = 0; + if ((double) this.ai[0] >= (double) num5) + { + num11 = 1; + num12 = num4; + num13 = num5; + } + int index2 = (int) this.ai[1]; + if (!Main.npc.IndexInRange(index2)) + { + int num14 = this.AI_156_TryAttackingNPCs(blacklist, skipBodyCheck); + if (num14 != -1) + { + this.ai[0] = (float) Main.rand.NextFromList(num1, num3); + this.ai[1] = (float) num14; + this.netUpdate = true; + } + else + { + this.ai[0] = -1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + } + } + else + { + NPC npc = Main.npc[index2]; + if (!npc.CanBeChasedBy((object) this)) + { + int num15 = this.AI_156_TryAttackingNPCs(blacklist, skipBodyCheck); + if (num15 != -1) + { + this.ai[0] = (float) Main.rand.NextFromList(num1, num3); + this.ai[1] = (float) num15; + this.netUpdate = true; + } + else + { + this.ai[0] = -1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + } + } + else + { + --this.ai[0]; + if ((double) this.ai[0] >= (double) num12) + { + this.direction = (double) this.Center.X < (double) npc.Center.X ? 1 : -1; + if ((double) this.ai[0] == (double) num12) + { + this.localAI[0] = this.Center.X; + this.localAI[1] = this.Center.Y; + } + } + float lerpValue1 = Utils.GetLerpValue((float) num12, (float) num13, this.ai[0], true); + if (num11 == 0) + { + Vector2 vector2_3 = new Vector2(this.localAI[0], this.localAI[1]); + if ((double) lerpValue1 >= 0.5) + vector2_3 = Vector2.Lerp(npc.Center, Main.player[this.owner].Center, 0.5f); + Vector2 center1 = npc.Center; + float rotation = (center1 - vector2_3).ToRotation(); + double num16 = this.direction == 1 ? -3.14159274101257 : 3.14159274101257; + float f1 = (float) (num16 + -num16 * (double) lerpValue1 * 2.0); + Vector2 vector2_4 = f1.ToRotationVector2(); + vector2_4.Y *= 0.5f; + vector2_4.Y *= (float) (0.800000011920929 + Math.Sin((double) this.identity * 2.29999995231628) * 0.200000002980232); + Vector2 spinningpoint = vector2_4; + double radians = (double) rotation; + vector2_1 = new Vector2(); + Vector2 center2 = vector2_1; + vector2_4 = spinningpoint.RotatedBy(radians, center2); + vector2_1 = center1 - vector2_3; + float num17 = vector2_1.Length() / 2f; + this.Center = Vector2.Lerp(vector2_3, center1, 0.5f) + vector2_4 * num17; + float f2 = MathHelper.WrapAngle((float) ((double) rotation + (double) f1 + 0.0)); + this.rotation = f2 + 1.570796f; + this.velocity = f2.ToRotationVector2() * 10f; + this.position = this.position - this.velocity; + } + if (num11 == 1) + { + Vector2 vector2_5 = new Vector2(this.localAI[0], this.localAI[1]) + new Vector2(0.0f, Utils.GetLerpValue(0.0f, 0.4f, lerpValue1, true) * -100f); + Vector2 v = npc.Center - vector2_5; + Vector2 vector2_6 = v.SafeNormalize(Vector2.Zero) * MathHelper.Clamp(v.Length(), 60f, 150f); + Vector2 vector2_7 = npc.Center + vector2_6; + float lerpValue2 = Utils.GetLerpValue(0.4f, 0.6f, lerpValue1, true); + float lerpValue3 = Utils.GetLerpValue(0.6f, 1f, lerpValue1, true); + this.rotation = this.rotation.AngleTowards(v.SafeNormalize(Vector2.Zero).ToRotation() + 1.570796f, 0.6283185f); + this.Center = Vector2.Lerp(vector2_5, npc.Center, lerpValue2); + if ((double) lerpValue3 > 0.0) + this.Center = Vector2.Lerp(npc.Center, vector2_7, lerpValue3); + } + if ((double) this.ai[0] != (double) num13) + return; + int num18 = this.AI_156_TryAttackingNPCs(blacklist, skipBodyCheck); + if (num18 != -1) + { + this.ai[0] = (float) Main.rand.NextFromList(num1, num3); + this.ai[1] = (float) num18; + this.netUpdate = true; + } + else + { + this.ai[0] = -1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + } + } + } + } + } + + private int AI_156_TryAttackingNPCs(List blackListedTargets, bool skipBodyCheck = false) + { + Vector2 center = Main.player[this.owner].Center; + int num1 = -1; + float num2 = -1f; + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.CanBeChasedBy((object) this) && (npc.boss || !blackListedTargets.Contains(index))) + { + float num3 = npc.Distance(center); + if ((double) num3 <= 1000.0 && ((double) num3 <= (double) num2 || (double) num2 == -1.0) && (skipBodyCheck || this.CanHitWithOwnBody((Entity) npc))) + { + num2 = num3; + num1 = index; + } + } + } + return num1; + } + + private void AI_GetMyGroupIndexAndFillBlackList( + List blackListedTargets, + out int index, + out int totalIndexesInGroup) + { + index = 0; + totalIndexesInGroup = 0; + for (int index1 = 0; index1 < 1000; ++index1) + { + Projectile projectile = Main.projectile[index1]; + if (projectile.active && projectile.owner == this.owner && projectile.type == this.type && (projectile.type != 759 || projectile.frame == Main.projFrames[projectile.type] - 1)) + { + if (this.whoAmI > index1) + ++index; + ++totalIndexesInGroup; + } + } + } + + private void AI_156_GetIdlePosition( + int stackedIndex, + int totalIndexes, + out Vector2 idleSpot, + out float idleRotation) + { + Player player = Main.player[this.owner]; + int num1 = this.type == 755 ? 1 : 0; + bool flag = this.type == 946; + idleRotation = 0.0f; + idleSpot = Vector2.Zero; + if (num1 != 0) + { + float num2 = (float) (((double) totalIndexes - 1.0) / 2.0); + idleSpot = player.Center + -Vector2.UnitY.RotatedBy(4.39822959899902 / (double) totalIndexes * ((double) stackedIndex - (double) num2)) * 40f; + idleRotation = 0.0f; + } + if (!flag) + return; + int num3 = stackedIndex + 1; + idleRotation = (float) ((double) num3 * 6.28318548202515 * 0.0166666675359011 * (double) player.direction + 1.57079637050629); + idleRotation = MathHelper.WrapAngle(idleRotation); + int num4 = num3 % totalIndexes; + Vector2 vector2 = new Vector2(0.0f, 0.5f).RotatedBy(((double) player.miscCounterNormalized * (2.0 + (double) num4) + (double) num4 * 0.5 + (double) player.direction * 1.29999995231628) * 6.28318548202515) * 4f; + idleSpot = idleRotation.ToRotationVector2() * 10f + player.MountedCenter + new Vector2((float) (player.direction * (num3 * -6 - 16)), player.gravDir * -15f); + idleSpot += vector2; + idleRotation += 1.570796f; + } + + private void AI_155_MysticSnakeCoil() + { + if (Main.netMode != 1 && !Main.player[this.owner].active) + { + float num = this.ai[0]; + float y = this.position.Y; + Point tileCoordinates = this.Center.ToTileCoordinates(); + Point end = new Point(tileCoordinates.X, (int) y / 16); + this.AI_155_RemoveRope(new Point(tileCoordinates.X, (int) num / 16), end); + this.Kill(); + } + else + { + int num1 = 80; + int num2 = 1800; + if ((double) this.ai[1] == 0.0) + { + this.spriteDirection = (double) Main.player[this.owner].Center.X > (double) this.Center.X ? -1 : 1; + this.ai[1] = 1f; + this.velocity.Y = -5f; + } + if ((double) this.ai[1] == 1.0) + { + if (Main.rand.Next(6) == 0) + { + Dust dust = Dust.NewDustDirect(this.TopLeft + new Vector2(-6f, 0.0f), 24, 16, 27, Alpha: 150, newColor: Color.Transparent, Scale: 0.6f); + dust.velocity *= 1f; + dust.velocity.X *= 0.5f; + dust.velocity.Y = -3f; + dust.fadeIn = 1.2f; + dust.noGravity = true; + } + this.alpha = Utils.Clamp(this.alpha - 5, 0, (int) byte.MaxValue); + if (++this.frameCounter >= 12) + { + this.frameCounter = 0; + if (++this.frame >= 4) + this.frame = 0; + } + if (Main.myPlayer == this.owner) + { + float num3 = this.ai[0]; + float y1 = this.position.Y; + Point tileCoordinates = this.Center.ToTileCoordinates(); + Point point1 = new Point(tileCoordinates.X, (int) y1 / 16); + Point point2 = new Point(tileCoordinates.X, (int) num3 / 16); + bool flag = point2.Y - point1.Y >= num1; + int x = point2.X; + if (!WorldGen.InWorld(x, point1.Y, 40) || !WorldGen.InWorld(x, point2.Y, 40)) + flag = true; + if (!flag) + { + for (int y2 = point2.Y; y2 >= point1.Y; --y2) + { + if (Main.tile[x, y2].active() && !Main.tileCut[(int) Main.tile[x, y2].type] && Main.tile[x, y2].type != (ushort) 504) + { + flag = true; + break; + } + } + } + if (flag) + { + int num4 = 0; + for (int y3 = point2.Y; y3 > point1.Y; --y3) + { + if ((WorldGen.TileEmpty(x, y3) || Main.tileCut[(int) Main.tile[x, y3].type]) && WorldGen.PlaceTile(x, y3, 504, plr: this.owner)) + { + ++num4; + if (Main.netMode == 1) + NetMessage.SendData(17, number: 1, number2: ((float) x), number3: ((float) y3), number4: 504f); + } + } + this.timeLeft = num2; + this.ai[1] = 2f; + this.netUpdate = true; + this.Top = new Vector2((float) (x * 16 + 8), (float) (point1.Y * 16 + 16)); + this.velocity = Vector2.Zero; + } + } + } + if ((double) this.ai[1] != 2.0) + return; + this.alpha = 0; + int timeLeft = this.timeLeft; + float num5 = this.ai[0]; + float y4 = this.position.Y; + Point tileCoordinates1 = this.Center.ToTileCoordinates(); + Point end = new Point(tileCoordinates1.X, (int) y4 / 16); + Point start = new Point(tileCoordinates1.X, (int) num5 / 16); + int x1 = start.X; + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + for (int y5 = start.Y; y5 >= end.Y; --y5) + { + Tile tile = Main.tile[x1, y5]; + if (tile.active() && tile.type == (ushort) 504) + this.AI_155_SpawnRopeIn(x1, y5); + } + } + else + { + for (int y6 = start.Y; y6 >= end.Y; --y6) + { + Tile tile = Main.tile[x1, y6]; + if (tile.active() && tile.type == (ushort) 504 && Main.rand.Next(80) == 0) + { + Dust dust = Dust.NewDustDirect(new Vector2((float) (x1 * 16 - 6), (float) (y6 * 16)), 28, 16, 27, Alpha: 150, newColor: Color.Transparent, Scale: 0.6f); + dust.velocity *= 1f; + dust.velocity.X = 0.0f; + dust.fadeIn = 1.2f; + dust.noGravity = true; + } + } + } + if (this.timeLeft == 4) + { + for (int y7 = start.Y; y7 >= end.Y; --y7) + { + Tile tile = Main.tile[x1, y7]; + if (tile.active() && tile.type == (ushort) 504) + this.AI_155_SpawnRopeIn(x1, y7); + } + } + if (this.timeLeft > 4) + return; + if (!WorldGen.InWorld(x1, end.Y, 20) || !WorldGen.InWorld(x1, start.Y, 20)) + { + this.Kill(); + } + else + { + if (Main.myPlayer == this.owner) + this.AI_155_RemoveRope(start, end); + this.Kill(); + } + } + } + + private void AI_155_RemoveRope(Point start, Point end) + { + int x = start.X; + for (int y = start.Y; y >= end.Y; --y) + { + Tile tile = Main.tile[x, y]; + if (tile.active() && tile.type == (ushort) 504) + { + WorldGen.KillTile(x, y); + if (Main.netMode != 0) + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y)); + } + } + } + + private void AI_155_SpawnRopeIn(int x, int y) + { + Vector2 Position = new Vector2((float) (x * 16 + 8), (float) (y * 16 + 8)); + if (Main.rand.Next(4) != 0) + { + Gore gore = Gore.NewGoreDirect(Position, Vector2.Zero, Main.rand.Next(61, 64)); + gore.velocity = Main.rand.NextVector2Circular(1.5f, 0.8f); + gore.velocity.X += (float) (0.100000001490116 * ((double) gore.velocity.X > 0.0 ? 1.0 : -1.0)); + gore.position = Position - new Vector2(16f, 16f); + gore.alpha = 170; + } + for (int index = 0; index < 5; ++index) + { + if (Main.rand.Next(8) == 0) + Dust.NewDustDirect(Position + new Vector2(-8f), 16, 16, 31, Alpha: 100, newColor: Color.Transparent).velocity *= 0.4f; + Dust dust = Dust.NewDustDirect(Position + new Vector2(-8f), 16, 16, 27, Alpha: 100, newColor: Color.Transparent, Scale: 1.7f); + dust.velocity *= 2f; + dust.noGravity = true; + } + } + + private void AI_154_VoidLens() + { + Main.CurrentFrameFlags.HadAnActiveInteractibleProjectile = true; + if (this.owner == Main.myPlayer) + { + for (int index = 0; index < 1000; ++index) + { + if (index != this.whoAmI) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && projectile.owner == this.owner && projectile.type == this.type) + { + if (this.timeLeft >= Main.projectile[index].timeLeft) + { + Main.projectile[index].Kill(); + } + else + { + this.Kill(); + return; + } + } + } + } + } + this.velocity = this.velocity * 0.94f; + this.direction = 1; + if (++this.frameCounter >= 5) + { + this.frameCounter = 0; + if (++this.frame >= Main.projFrames[this.type]) + this.frame = 0; + } + if ((double) this.Opacity < 1.0) + { + this.Opacity += 0.03f; + if ((double) this.Opacity > 1.0) + this.Opacity = 1f; + } + new VoidLensHelper(this).Update(); + } + + private void AI_153_ToiletPop() + { + Vector2 center = this.Center; + float SpeedY = -2f; + int num1 = 0; + int num2; + if ((double) this.ai[0] == 0.0) + { + num2 = 6; + num1 = 1; + } + else if ((double) this.ai[0] <= 10.0) + { + if (Main.rand.Next(5) == 0) + num1 = 1; + num2 = 2; + } + else + { + this.Kill(); + return; + } + ++this.ai[0]; + for (int index = 0; index < num2; ++index) + { + Dust dust = Dust.NewDustDirect(center, 3, 6, 216, SpeedY: SpeedY); + dust.velocity.X *= 0.5f; + dust.velocity.Y = -Math.Abs(dust.velocity.Y); + dust.position -= dust.velocity; + dust.scale = 0.8f; + } + for (int index = 0; index < num1; ++index) + { + Gore gore = Gore.NewGoreDirect(center, Vector2.UnitY * -3f + Main.rand.NextVector2Circular(1f, 1f), Main.rand.Next(580, 583)); + gore.velocity.Y = -Math.Abs(gore.velocity.Y); + } + } + + private void AI_150_GolfClubHelper() + { + Player player = Main.player[this.owner]; + if (!player.active) + this.Kill(); + else if ((double) player.gravDir == -1.0) + { + player.SetDummyItemTime(0); + this.Kill(); + } + else + { + bool flag = false; + Microsoft.Xna.Framework.Rectangle rectangle = Utils.CenteredRectangle(player.Center, new Vector2(500f, 500f)); + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && projectile.owner == Main.myPlayer && ProjectileID.Sets.IsAGolfBall[projectile.type] && rectangle.Contains(projectile.Center.ToPoint())) + { + flag = true; + break; + } + } + if (!flag && this.owner == Main.myPlayer && (double) this.ai[0] == 0.0) + player.TryPlacingAGolfBallNearANearbyTee(Main.player[this.owner].Center); + if (!player.channel && (double) this.ai[0] == 0.0) + { + SoundEngine.PlaySound(SoundID.Item1, player.Center); + for (int number = 0; number < 1000; ++number) + { + Projectile projectile = Main.projectile[number]; + Vector2 shotVector = Main.MouseWorld - projectile.Center; + if (projectile.active && ProjectileID.Sets.IsAGolfBall[projectile.type] && projectile.owner == this.owner && GolfHelper.ValidateShot((Entity) projectile, player, ref shotVector)) + { + float num1 = Main.rand.NextFloatDirection(); + for (float num2 = 0.0f; (double) num2 < 1.0; num2 += 0.1f) + { + Dust dust = Dust.NewDustPerfect(projectile.Center, 31, new Vector2?((6.283185f * num2 + num1).ToRotationVector2() * 0.8f), (int) sbyte.MaxValue); + dust.fadeIn = 0.0f; + if ((double) num2 % 0.200000002980232 == 0.0) + dust.velocity *= 0.4f; + } + SoundEngine.PlaySound(SoundID.Item126, projectile.Center); + if (this.owner == Main.myPlayer) + { + GolfHelper.ShotStrength shotStrength = GolfHelper.CalculateShotStrength(this, (Entity) projectile); + Vector2 velocity = Vector2.Normalize(shotVector) * shotStrength.AbsoluteStrength; + GolfHelper.HitGolfBall((Entity) projectile, velocity, shotStrength.RoughLandResistance); + NetMessage.SendData(27, number: number); + } + } + } + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + } + if ((double) this.ai[0] == 1.0) + { + ++this.ai[1]; + if ((double) this.ai[1] >= (double) (player.HeldItem.useAnimation + 30)) + { + this.Kill(); + return; + } + this.velocity = Vector2.Zero; + player.ChangeDir(this.direction); + player.heldProj = this.whoAmI; + int frames = player.HeldItem.useAnimation - (int) this.ai[1]; + if (frames < 2) + frames = 2; + player.SetDummyItemTime(frames); + } + if ((double) this.ai[0] != 0.0) + return; + if (this.owner == Main.myPlayer) + { + Vector2 mouseWorld = Main.MouseWorld; + if (mouseWorld != this.Center) + { + this.netUpdate = true; + this.Center = mouseWorld; + } + if (Main.mouseRight && Main.mouseRightRelease) + { + this.Kill(); + player.mouseInterface = true; + Main.blockMouse = true; + player.SetItemTime(0); + player.itemAnimation = 0; + player.itemAnimationMax = 0; + player.reuseDelay = 0; + return; + } + } + if (this.position != this.oldPosition) + { + if ((double) this.Center.X - (double) player.Center.X > 0.0) + this.direction = 1; + else + this.direction = -1; + } + this.velocity = Vector2.Zero; + player.ChangeDir(this.direction); + player.heldProj = this.whoAmI; + ++this.ai[1]; + int val1 = player.HeldItem.useAnimation * 4; + if ((double) this.ai[1] > (double) (val1 * 3)) + this.ai[1] = (float) val1; + int frames1 = player.HeldItem.useAnimation + Math.Min(val1, (int) this.ai[1]); + if (frames1 < 2) + frames1 = 2; + player.SetDummyItemTime(frames1); + } + } + + public Color GetCeleb2Color() + { + switch ((int) this.ai[0]) + { + case 0: + return Color.Red; + case 1: + return Color.DarkOrange; + case 2: + return Color.Gold; + case 3: + return Color.LimeGreen; + case 4: + return Color.RoyalBlue; + case 5: + return new Color(80, 20, 180); + case 6: + return Color.HotPink; + default: + return Color.Transparent; + } + } + + private void AI_007_GrapplingHooks() + { + if (Main.player[this.owner].dead || Main.player[this.owner].stoned || Main.player[this.owner].webbed || Main.player[this.owner].frozen) + { + this.Kill(); + } + else + { + Vector2 mountedCenter = Main.player[this.owner].MountedCenter; + Vector2 vector2_1 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num1 = mountedCenter.X - vector2_1.X; + float num2 = mountedCenter.Y - vector2_1.Y; + float num3 = (float) Math.Sqrt((double) num1 * (double) num1 + (double) num2 * (double) num2); + this.rotation = (float) Math.Atan2((double) num2, (double) num1) - 1.57f; + if ((double) this.ai[0] == 2.0 && this.type == 865) + { + float num4 = 1.570796f; + this.rotation = (float) (int) Math.Round((double) this.rotation / (double) num4) * num4; + } + if (Main.myPlayer == this.owner) + { + int i = (int) ((double) this.Center.X / 16.0); + int j = (int) ((double) this.Center.Y / 16.0); + if (i > 0 && j > 0 && i < Main.maxTilesX && j < Main.maxTilesY && Main.tile[i, j].nactive() && Main.tile[i, j].type >= (ushort) 481 && Main.tile[i, j].type <= (ushort) 483 && Main.rand.Next(16) == 0) + { + WorldGen.KillTile(i, j); + if (Main.netMode != 0) + NetMessage.SendData(17, number2: ((float) i), number3: ((float) j)); + } + } + if ((double) num3 > 2500.0) + this.Kill(); + if (this.type == 256) + this.rotation = (float) Math.Atan2((double) num2, (double) num1) + 3.925f; + if (this.type == 446) + { + Lighting.AddLight(mountedCenter, 0.0f, 0.4f, 0.3f); + ++this.localAI[0]; + if ((double) this.localAI[0] >= 28.0) + this.localAI[0] = 0.0f; + DelegateMethods.v3_1 = new Vector3(0.0f, 0.4f, 0.3f); + Utils.PlotTileLine(this.Center, mountedCenter, 8f, new Utils.TileActionAttempt(DelegateMethods.CastLightOpen)); + } + if (this.type == 652 && ++this.frameCounter >= 7) + { + this.frameCounter = 0; + if (++this.frame >= Main.projFrames[this.type]) + this.frame = 0; + } + if (this.type >= 646 && this.type <= 649) + { + Vector3 rgb = Vector3.Zero; + switch (this.type) + { + case 646: + rgb = new Vector3(0.7f, 0.5f, 0.1f); + break; + case 647: + rgb = new Vector3(0.0f, 0.6f, 0.7f); + break; + case 648: + rgb = new Vector3(0.6f, 0.2f, 0.6f); + break; + case 649: + rgb = new Vector3(0.6f, 0.6f, 0.9f); + break; + } + Lighting.AddLight(mountedCenter, rgb); + Lighting.AddLight(this.Center, rgb); + DelegateMethods.v3_1 = rgb; + Utils.PlotTileLine(this.Center, mountedCenter, 8f, new Utils.TileActionAttempt(DelegateMethods.CastLightOpen)); + } + if ((double) this.ai[0] == 0.0) + { + if ((double) num3 > 300.0 && this.type == 13 || (double) num3 > 400.0 && this.type == 32 || (double) num3 > 440.0 && this.type == 73 || (double) num3 > 440.0 && this.type == 74 || (double) num3 > 300.0 && this.type == 165 || (double) num3 > 350.0 && this.type == 256 || (double) num3 > 500.0 && this.type == 315 || (double) num3 > 550.0 && this.type == 322 || (double) num3 > 400.0 && this.type == 331 || (double) num3 > 550.0 && this.type == 332 || (double) num3 > 400.0 && this.type == 372 || (double) num3 > 300.0 && this.type == 396 || (double) num3 > 550.0 && this.type >= 646 && this.type <= 649 || (double) num3 > 600.0 && this.type == 652 || (double) num3 > 300.0 && this.type == 865 || (double) num3 > 500.0 && this.type == 935 || (double) num3 > 480.0 && this.type >= 486 && this.type <= 489 || (double) num3 > 500.0 && this.type == 446) + this.ai[0] = 1f; + else if (this.type >= 230 && this.type <= 235) + { + int num5 = 300 + (this.type - 230) * 30; + if ((double) num3 > (double) num5) + this.ai[0] = 1f; + } + else if (this.type == 753) + { + int num6 = 420; + if ((double) num3 > (double) num6) + this.ai[0] = 1f; + } + Vector2 vector2_2 = this.Center - new Vector2(5f); + Vector2 vector2_3 = this.Center + new Vector2(5f); + Point tileCoordinates1 = (vector2_2 - new Vector2(16f)).ToTileCoordinates(); + Vector2 vector2_4 = new Vector2(32f); + Point tileCoordinates2 = (vector2_3 + vector2_4).ToTileCoordinates(); + int num7 = tileCoordinates1.X; + int num8 = tileCoordinates2.X; + int num9 = tileCoordinates1.Y; + int num10 = tileCoordinates2.Y; + if (num7 < 0) + num7 = 0; + if (num8 > Main.maxTilesX) + num8 = Main.maxTilesX; + if (num9 < 0) + num9 = 0; + if (num10 > Main.maxTilesY) + num10 = Main.maxTilesY; + Player player = Main.player[this.owner]; + List pointList = new List(); + for (int index1 = 0; index1 < player.grapCount; ++index1) + { + Projectile projectile = Main.projectile[player.grappling[index1]]; + if (projectile.aiStyle == 7 && (double) projectile.ai[0] == 2.0) + { + Point tileCoordinates3 = projectile.Center.ToTileCoordinates(); + Tile tileSafely1 = Framing.GetTileSafely(tileCoordinates3); + if (tileSafely1.type == (ushort) 314 || TileID.Sets.Platforms[(int) tileSafely1.type]) + { + for (int index2 = -2; index2 <= 2; ++index2) + { + for (int index3 = -2; index3 <= 2; ++index3) + { + Point pt = new Point(tileCoordinates3.X + index2, tileCoordinates3.Y + index3); + Tile tileSafely2 = Framing.GetTileSafely(pt); + if (tileSafely2.type == (ushort) 314 || TileID.Sets.Platforms[(int) tileSafely2.type]) + pointList.Add(pt); + } + } + } + } + } + for (int index4 = num7; index4 < num8; ++index4) + { + for (int index5 = num9; index5 < num10; ++index5) + { + if (Main.tile[index4, index5] == null) + Main.tile[index4, index5] = new Tile(); + Vector2 vector2_5; + vector2_5.X = (float) (index4 * 16); + vector2_5.Y = (float) (index5 * 16); + if ((double) vector2_2.X + 10.0 > (double) vector2_5.X && (double) vector2_2.X < (double) vector2_5.X + 16.0 && (double) vector2_2.Y + 10.0 > (double) vector2_5.Y && (double) vector2_2.Y < (double) vector2_5.Y + 16.0) + { + Tile theTile = Main.tile[index4, index5]; + if (theTile.nactive() && this.AI_007_GrapplingHooks_CanTileBeLatchedOnTo(theTile) && !pointList.Contains(new Point(index4, index5)) && (this.type != 403 || theTile.type == (ushort) 314) && !Main.player[this.owner].IsBlacklistedForGrappling(new Point(index4, index5))) + { + if (Main.player[this.owner].grapCount < 10) + { + Main.player[this.owner].grappling[Main.player[this.owner].grapCount] = this.whoAmI; + ++Main.player[this.owner].grapCount; + } + if (Main.myPlayer == this.owner) + { + int num11 = 0; + int index6 = -1; + int num12 = 100000; + if (this.type == 73 || this.type == 74) + { + for (int index7 = 0; index7 < 1000; ++index7) + { + if (index7 != this.whoAmI && Main.projectile[index7].active && Main.projectile[index7].owner == this.owner && Main.projectile[index7].aiStyle == 7 && (double) Main.projectile[index7].ai[0] == 2.0) + Main.projectile[index7].Kill(); + } + } + else + { + int num13 = 3; + if (this.type == 165) + num13 = 8; + if (this.type == 256) + num13 = 2; + if (this.type == 372) + num13 = 2; + if (this.type == 652) + num13 = 1; + if (this.type >= 646 && this.type <= 649) + num13 = 4; + for (int index8 = 0; index8 < 1000; ++index8) + { + if (Main.projectile[index8].active && Main.projectile[index8].owner == this.owner && Main.projectile[index8].aiStyle == 7) + { + if (Main.projectile[index8].timeLeft < num12) + { + index6 = index8; + num12 = Main.projectile[index8].timeLeft; + } + ++num11; + } + } + if (num11 > num13) + Main.projectile[index6].Kill(); + } + WorldGen.KillTile(index4, index5, true, true); + SoundEngine.PlaySound(0, index4 * 16, index5 * 16); + this.velocity.X = 0.0f; + this.velocity.Y = 0.0f; + this.ai[0] = 2f; + this.position.X = (float) (index4 * 16 + 8 - this.width / 2); + this.position.Y = (float) (index5 * 16 + 8 - this.height / 2); + Microsoft.Xna.Framework.Rectangle? tileVisualHitbox = WorldGen.GetTileVisualHitbox(index4, index5); + if (tileVisualHitbox.HasValue) + this.Center = tileVisualHitbox.Value.Center.ToVector2(); + this.damage = 0; + this.netUpdate = true; + if (Main.myPlayer == this.owner) + { + if (this.type == 935) + Main.player[this.owner].DoQueenSlimeHookTeleport(this.Center); + NetMessage.SendData(13, number: this.owner); + break; + } + break; + } + } + } + } + if ((double) this.ai[0] == 2.0) + break; + } + } + else if ((double) this.ai[0] == 1.0) + { + float num14 = 11f; + if (this.type == 32) + num14 = 15f; + if (this.type == 73 || this.type == 74) + num14 = 17f; + if (this.type == 315) + num14 = 20f; + if (this.type == 322) + num14 = 22f; + if (this.type >= 230 && this.type <= 235) + num14 = (float) (11.0 + (double) (this.type - 230) * 0.75); + if (this.type == 753) + num14 = 15f; + if (this.type == 446) + num14 = 20f; + if (this.type >= 486 && this.type <= 489) + num14 = 18f; + if (this.type >= 646 && this.type <= 649) + num14 = 24f; + if (this.type == 652) + num14 = 24f; + if (this.type == 332) + num14 = 17f; + if ((double) num3 < 24.0) + this.Kill(); + float num15 = num14 / num3; + float num16 = num1 * num15; + float num17 = num2 * num15; + this.velocity.X = num16; + this.velocity.Y = num17; + } + else + { + if ((double) this.ai[0] != 2.0) + return; + Point tileCoordinates = this.Center.ToTileCoordinates(); + if (Main.tile[tileCoordinates.X, tileCoordinates.Y] == null) + Main.tile[tileCoordinates.X, tileCoordinates.Y] = new Tile(); + bool flag = true; + if ((!Main.tile[tileCoordinates.X, tileCoordinates.Y].nactive() ? 0 : (this.AI_007_GrapplingHooks_CanTileBeLatchedOnTo(Main.tile[tileCoordinates.X, tileCoordinates.Y]) ? 1 : 0)) != 0) + flag = false; + if (flag) + { + this.ai[0] = 1f; + } + else + { + if (Main.player[this.owner].grapCount >= 10) + return; + Main.player[this.owner].grappling[Main.player[this.owner].grapCount] = this.whoAmI; + ++Main.player[this.owner].grapCount; + } + } + } + } + + private bool AI_007_GrapplingHooks_CanTileBeLatchedOnTo(Tile theTile) => ((Main.tileSolid[(int) theTile.type] | theTile.type == (ushort) 314 ? 1 : 0) | (this.type != 865 ? 0 : (TileID.Sets.IsATreeTrunk[(int) theTile.type] ? 1 : 0)) | (this.type != 865 ? 0 : (theTile.type == (ushort) 323 ? 1 : 0))) != 0; + + private void AI_147_Celeb2Rocket() + { + int index1 = 0; + int index2 = 1; + int index3 = 1; + ++this.localAI[index1]; + this.alpha = 0; + this.rotation = this.velocity.ToRotation() + 1.570796f; + int num1 = (int) this.ai[0]; + Lighting.AddLight(this.Center, this.GetCeleb2Color().ToVector3() * 0.5f); + switch (num1) + { + case 0: + if ((double) this.localAI[index1] >= 20.0) + { + this.velocity.Y += 0.12f; + this.penetrate = -1; + } + if ((double) this.velocity.Y > 16.0) + this.velocity.Y = 16f; + if ((double) this.localAI[index1] <= 20.0 || (double) this.localAI[index1] % 20.0 != 0.0) + break; + this.AI_147_Explosion(); + break; + case 1: + if ((double) this.localAI[index1] == 10.0) + this.velocity.Y -= 10f; + if ((double) this.localAI[index1] >= 10.0) + this.velocity.Y += 0.25f; + if ((double) this.velocity.Y > 16.0) + this.velocity.Y = 16f; + if ((double) this.localAI[index1] < 10.0) + break; + this.scale += 0.015f; + if ((double) this.scale > 2.5) + this.scale = 2.5f; + if ((double) this.localAI[index1] % 10.0 != 0.0) + break; + double y = (double) this.velocity.Y; + for (float num2 = 0.0f; (double) num2 < 1.0; num2 += 0.12f) + { + Vector2 spinningpoint = (Vector2.UnitX * -8f + -Vector2.UnitY.RotatedBy((double) num2 * 6.28318548202515) * new Vector2(2f, 4f)).RotatedBy((double) this.rotation - 1.57079637050629); + int index4 = Dust.NewDust(this.Center, 0, 0, 267, newColor: Color.Lerp(this.GetCeleb2Color(), Color.White, Main.rand.NextFloat() * 0.3f)); + Main.dust[index4].scale = 0.9f; + Main.dust[index4].fadeIn = 1.1f; + Main.dust[index4].noGravity = true; + Main.dust[index4].position = this.Center + spinningpoint; + Main.dust[index4].velocity = -this.velocity * 0.35f + spinningpoint * 0.35f; + Main.dust[index4].velocity *= this.scale; + if ((double) this.localAI[index1] == 10.0) + Main.dust[index4].velocity = spinningpoint.RotatedBy((double) this.velocity.ToRotation()) * 0.3f; + } + break; + case 2: + if ((double) this.localAI[index1] >= 60.0) + this.velocity.Y += 0.15f; + if ((double) this.velocity.Y <= 16.0) + break; + this.velocity.Y = 16f; + break; + case 3: + float num3 = this.localAI[index2]; + if ((double) num3 == 0.0) + { + float num4 = this.velocity.Length(); + this.localAI[index2] = num4; + num3 = num4; + } + if ((double) this.localAI[index1] >= 25.0 && (double) this.ai[index3] == 0.0) + { + if ((double) this.localAI[index1] >= 20.0) + this.velocity.Y += 0.15f; + if ((double) this.velocity.Y > 16.0) + this.velocity.Y = 16f; + } + if ((double) this.localAI[index1] < 20.0) + break; + float num5 = this.position.X; + float num6 = this.position.Y; + float num7 = 800f; + bool flag = false; + int num8 = 0; + if ((double) this.ai[index3] == 0.0) + { + for (int index5 = 0; index5 < 200; ++index5) + { + if (Main.npc[index5].CanBeChasedBy((object) this) && ((double) this.ai[index3] == 0.0 || (double) this.ai[index3] == (double) (index5 + 1))) + { + float num9 = Main.npc[index5].position.X + (float) (Main.npc[index5].width / 2); + float num10 = Main.npc[index5].position.Y + (float) (Main.npc[index5].height / 2); + float num11 = Math.Abs(this.position.X + (float) (this.width / 2) - num9) + Math.Abs(this.position.Y + (float) (this.height / 2) - num10); + if ((double) num11 < (double) num7 && Collision.CanHit(new Vector2(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2)), 1, 1, Main.npc[index5].position, Main.npc[index5].width, Main.npc[index5].height)) + { + num7 = num11; + num5 = num9; + num6 = num10; + flag = true; + num8 = index5; + } + } + } + if (flag) + this.ai[1] = (float) (num8 + 1); + flag = false; + } + if ((double) this.ai[index3] != 0.0) + { + int index6 = (int) ((double) this.ai[index3] - 1.0); + if (Main.npc[index6].active && Main.npc[index6].CanBeChasedBy((object) this, true)) + { + float num12 = Main.npc[index6].position.X + (float) (Main.npc[index6].width / 2); + float num13 = Main.npc[index6].position.Y + (float) (Main.npc[index6].height / 2); + if ((double) Math.Abs(this.position.X + (float) (this.width / 2) - num12) + (double) Math.Abs(this.position.Y + (float) (this.height / 2) - num13) < 1000.0) + { + flag = true; + num5 = Main.npc[index6].position.X + (float) (Main.npc[index6].width / 2); + num6 = Main.npc[index6].position.Y + (float) (Main.npc[index6].height / 2); + } + } + } + if (!this.friendly) + flag = false; + if (!flag) + break; + double num14 = (double) num3; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num15 = num5 - vector2.X; + float num16 = num6 - vector2.Y; + double num17 = Math.Sqrt((double) num15 * (double) num15 + (double) num16 * (double) num16); + float num18 = (float) (num14 / num17); + float num19 = num15 * num18; + float num20 = num16 * num18; + int num21 = 8; + this.velocity.X = (this.velocity.X * (float) (num21 - 1) + num19) / (float) num21; + this.velocity.Y = (this.velocity.Y * (float) (num21 - 1) + num20) / (float) num21; + break; + case 4: + if ((double) this.localAI[index1] == 1.0 && (double) this.ai[1] == 1.0) + this.localAI[index1] += 45f; + float x = this.velocity.SafeNormalize(Vector2.Zero).RotatedBy((double) this.localAI[index1] * 0.0698131695389748).X; + this.position = this.position + this.velocity.SafeNormalize(Vector2.Zero).RotatedBy(1.57079637050629) * x * 3f; + this.scale = 2f; + if ((double) this.localAI[index1] >= 10.0) + this.velocity.Y += 0.04f; + if ((double) this.velocity.Y <= 16.0) + break; + this.velocity.Y = 16f; + break; + case 5: + if ((double) this.localAI[index1] >= 40.0) + this.velocity.Y += 0.08f; + if ((double) this.velocity.Y <= 16.0) + break; + this.velocity.Y = 16f; + break; + case 6: + if ((double) this.localAI[index1] >= 30.0) + this.velocity.Y += 0.1f; + if ((double) this.velocity.Y <= 16.0) + break; + this.velocity.Y = 16f; + break; + } + } + + private void AI_148_StarSpawner() + { + if (Main.dayTime) + { + this.Kill(); + } + else + { + this.ai[0] += (float) Main.dayRate; + if ((double) this.localAI[0] == 0.0 && Main.netMode != 2) + { + this.localAI[0] = 1f; + if ((double) Main.LocalPlayer.position.Y < Main.worldSurface * 16.0) + Star.StarFall(this.position.X); + } + if (this.owner != Main.myPlayer || (double) this.ai[0] < 180.0) + return; + if ((double) this.ai[1] > -1.0) + { + this.velocity.X *= 0.35f; + if ((double) this.Center.X < (double) Main.player[(int) this.ai[1]].Center.X) + this.velocity.X = Math.Abs(this.velocity.X); + else + this.velocity.X = -Math.Abs(this.velocity.X); + } + Projectile.NewProjectile(this.position.X, this.position.Y, this.velocity.X, this.velocity.Y, 12, 1000, 10f, Main.myPlayer); + this.Kill(); + } + } + + private void AI_147_Explosion() + { + switch ((int) this.ai[0]) + { + case 0: + for (int index = 0; index < 4; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + for (int index1 = 0; index1 < 20; ++index1) + { + int index2 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 130, Alpha: 200, Scale: 1.2f); + Main.dust[index2].noGravity = true; + Main.dust[index2].velocity *= 3f; + int index3 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 130, Alpha: 200, Scale: 0.5f); + Main.dust[index3].velocity *= 1.2f; + Main.dust[index3].noGravity = true; + } + for (int index4 = 0; index4 < 1; ++index4) + { + int index5 = Gore.NewGore(this.position + new Vector2((float) (this.width * Main.rand.Next(100)) / 100f, (float) (this.height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index5].velocity *= 0.3f; + Main.gore[index5].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index5].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + break; + case 1: + Color celeb2Color1 = this.GetCeleb2Color(); + Vector2 center1 = this.Center; + double num1 = (double) Main.rand.NextFloat(); + for (float num2 = 0.0f; (double) num2 < 1.0; num2 += 0.0125f) + { + Dust dust = Dust.NewDustPerfect(center1, 278, Alpha: 200, newColor: Color.Lerp(celeb2Color1, Color.White, Main.rand.NextFloat() * 0.6f)); + dust.scale = 1.1f; + dust.fadeIn = 1.3f; + dust.velocity *= (float) ((double) Main.rand.NextFloat() * 2.0 + 2.0); + if ((double) dust.velocity.Y > 0.0) + dust.velocity *= 0.3f; + dust.velocity *= 2f; + } + for (int index6 = 0; index6 < 3; ++index6) + { + int index7 = Gore.NewGore(this.position + new Vector2((float) (this.width * Main.rand.Next(100)) / 100f, (float) (this.height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index7].velocity *= 0.3f; + Main.gore[index7].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index7].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + this.CreateGroundExplosion(40f, 20, 100, 2, 10, 2); + break; + case 2: + Vector2 center2 = this.Center; + Color celeb2Color2 = this.GetCeleb2Color(); + float num3 = 0.05f; + float num4 = 0.13f; + bool flag = Main.rand.Next(4) == 0; + if (flag) + { + num3 = 0.1f; + num4 = 0.1f; + } + float num5 = Main.rand.NextFloatDirection(); + for (float num6 = 0.0f; (double) num6 < 5.0; ++num6) + { + Vector2 spinningpoint = new Vector2(0.0f, -100f); + Vector2 vector2_1 = center2 + spinningpoint.RotatedBy((double) num5 + (double) num6 * 1.25663709640503); + Vector2 vector2_2 = center2 + spinningpoint.RotatedBy((double) num5 + ((double) num6 + 1.0) * 1.25663709640503); + Vector2 vector2_3 = center2 + spinningpoint.RotatedBy((double) num5 + ((double) num6 + 0.5) * 1.25663709640503) * 0.4f; + for (int index = 0; index < 2; ++index) + { + Vector2 vector2_4 = vector2_1; + Vector2 vector2_5 = vector2_3; + if (index == 1) + { + vector2_4 = vector2_3; + vector2_5 = vector2_2; + } + for (float amount = 0.0f; (double) amount < 1.0; amount += num4) + { + Vector2 vector2_6 = Vector2.Lerp(vector2_4, vector2_5, amount); + Vector2 Position = Vector2.Lerp(vector2_6, center2, 0.9f); + Vector2 vector2_7 = (vector2_6 - Position).SafeNormalize(Vector2.Zero); + Dust dust = Dust.NewDustPerfect(Position, 267, new Vector2?(Vector2.Zero), newColor: celeb2Color2, Scale: 0.5f); + dust.fadeIn = 1.2f; + dust.noGravity = true; + dust.velocity = vector2_7 * Vector2.Distance(vector2_6, Position) * num3; + } + } + } + if (flag) + { + for (int index = 0; index < 4; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + for (int index8 = 0; index8 < 60; ++index8) + { + int index9 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 228, Alpha: 200, Scale: 2.5f); + Main.dust[index9].noGravity = true; + Main.dust[index9].velocity *= 8f; + int index10 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 228, Alpha: 200, Scale: 1.5f); + Main.dust[index10].velocity *= 4.2f; + Main.dust[index10].noGravity = true; + } + for (int index11 = 0; index11 < 1; ++index11) + { + int index12 = Gore.NewGore(this.position + new Vector2((float) (this.width * Main.rand.Next(100)) / 100f, (float) (this.height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index12].velocity *= 0.3f; + Main.gore[index12].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index12].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + break; + } + for (int index = 0; index < 4; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + for (int index13 = 0; index13 < 40; ++index13) + { + int index14 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 228, Alpha: 200, Scale: 2.5f); + Main.dust[index14].noGravity = true; + Main.dust[index14].velocity *= 4f; + int index15 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 228, Alpha: 200, Scale: 1.5f); + Main.dust[index15].velocity *= 2.2f; + Main.dust[index15].noGravity = true; + } + for (int index16 = 0; index16 < 1; ++index16) + { + int index17 = Gore.NewGore(this.position + new Vector2((float) (this.width * Main.rand.Next(100)) / 100f, (float) (this.height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index17].velocity *= 0.3f; + Main.gore[index17].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index17].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + break; + case 3: + Color celeb2Color3 = this.GetCeleb2Color(); + Vector2 center3 = this.Center; + for (int index = 0; index < 4; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + float num7 = Main.rand.NextFloat() * 6.283185f; + for (int index = 0; index < 40; ++index) + { + Dust dust = Dust.NewDustPerfect(center3, 278, Alpha: 100, newColor: Color.Lerp(celeb2Color3, Color.White, Main.rand.NextFloat() * 0.3f)); + dust.scale = (float) (1.29999995231628 * ((double) dust.velocity.Length() / 2.0)); + dust.fadeIn = (float) (1.5 * ((double) dust.velocity.Length() / 2.0)); + dust.noGravity = true; + dust.velocity *= 6f; + if ((double) Math.Abs(dust.velocity.X) > (double) Math.Abs(dust.velocity.Y)) + dust.velocity.Y *= 0.1f; + else + dust.velocity.X *= 0.1f; + dust.velocity = dust.velocity.RotatedBy((double) num7); + } + for (int index18 = 0; index18 < 1; ++index18) + { + int index19 = Gore.NewGore(this.position + new Vector2((float) (this.width * Main.rand.Next(100)) / 100f, (float) (this.height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index19].velocity *= 0.3f; + Main.gore[index19].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index19].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + break; + case 4: + this.GetCeleb2Color(); + Vector2 center4 = this.Center; + double num8 = (double) Main.rand.NextFloat(); + for (float num9 = 0.0f; (double) num9 < 1.0; num9 += 0.025f) + { + Dust dust = Dust.NewDustPerfect(center4, 132, Alpha: 200); + dust.scale = 1.1f; + dust.fadeIn = 1.5f; + dust.velocity *= (float) ((double) Main.rand.NextFloat() * 2.0 + 2.0); + if ((double) dust.velocity.Y > 0.0) + dust.velocity *= 0.3f; + dust.velocity *= 2f; + } + for (int index20 = 0; index20 < 3; ++index20) + { + int index21 = Gore.NewGore(this.position + new Vector2((float) (this.width * Main.rand.Next(100)) / 100f, (float) (this.height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index21].velocity *= 0.3f; + Main.gore[index21].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index21].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + break; + case 5: + Color celeb2Color4 = this.GetCeleb2Color(); + Vector2 center5 = this.Center; + for (int index22 = 0; index22 < 20; ++index22) + { + int index23 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 278, Alpha: 200, newColor: Color.Lerp(celeb2Color4, Color.White, Main.rand.NextFloat() * 0.4f), Scale: 2.5f); + Main.dust[index23].fadeIn = 1.3f; + Main.dust[index23].scale = 1.1f; + Main.dust[index23].velocity *= 2f; + int index24 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 27, Alpha: 200, newColor: celeb2Color4, Scale: 2.5f); + Main.dust[index24].velocity *= 1.2f; + Main.dust[index24].noGravity = true; + } + break; + case 6: + Color celeb2Color5 = this.GetCeleb2Color(); + Vector2 center6 = this.Center; + for (int index = 0; index < 4; ++index) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.5f); + for (float num10 = 0.0f; (double) num10 < 1.0; num10 += 0.015f) + { + Vector2 vector2 = Vector2.UnitY.RotatedBy((double) num10 * 6.28318548202515) * (float) (1.0 + (double) Main.rand.NextFloatDirection() * 0.100000001490116); + Dust dust = Dust.NewDustPerfect(center6 + vector2, 134, new Vector2?(Vector2.Zero), newColor: celeb2Color5); + dust.scale = 1.4f; + dust.velocity = vector2 * 5f; + dust.velocity.Y += -3f; + dust.velocity *= 2f; + } + for (float num11 = 0.0f; (double) num11 < 1.0; num11 += 0.025f) + { + Vector2 vector2 = Vector2.UnitY.RotatedBy((double) num11 * 6.28318548202515) * (float) (1.0 + (double) Main.rand.NextFloatDirection() * 0.200000002980232); + Dust dust = Dust.NewDustPerfect(center6 + vector2, 267, new Vector2?(Vector2.Zero), newColor: celeb2Color5); + dust.noGravity = true; + dust.scale = 0.4f; + dust.fadeIn = 1.2f; + dust.velocity = vector2 * 4f; + dust.velocity.Y += -3f; + dust.velocity *= 2f; + } + for (float num12 = 0.0f; (double) num12 < 1.0; num12 += 0.07f) + { + Vector2 vector2 = Vector2.UnitY.RotatedBy((double) num12 * 6.28318548202515) * (float) (1.0 + (double) Main.rand.NextFloatDirection() * 0.300000011920929); + Dust dust = Dust.NewDustPerfect(center6 + vector2, 267, new Vector2?(Vector2.Zero), newColor: celeb2Color5); + dust.noGravity = true; + dust.scale = 0.4f; + dust.fadeIn = 1.3f; + dust.velocity = vector2 * 7f; + dust.velocity.Y += -3f; + dust.velocity *= 2f; + } + for (int index25 = 0; index25 < 1; ++index25) + { + int index26 = Gore.NewGore(this.position + new Vector2((float) (this.width * Main.rand.Next(100)) / 100f, (float) (this.height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, new Vector2(), Main.rand.Next(61, 64)); + Main.gore[index26].velocity *= 0.3f; + Main.gore[index26].velocity.X += (float) Main.rand.Next(-10, 11) * 0.05f; + Main.gore[index26].velocity.Y += (float) Main.rand.Next(-10, 11) * 0.05f; + } + break; + } + } + + private void CreateGroundExplosion( + float MAX_SPREAD, + int fluff, + int distFluff, + int layerStart, + int layerEnd, + int layerJump) + { + Point tileCoordinates1 = this.TopLeft.ToTileCoordinates(); + Point tileCoordinates2 = this.BottomRight.ToTileCoordinates(); + tileCoordinates1.X -= fluff; + tileCoordinates1.Y -= fluff; + tileCoordinates2.X += fluff; + tileCoordinates2.Y += fluff; + int num1 = tileCoordinates1.X / 2 + tileCoordinates2.X / 2; + int num2 = this.width / 2 + distFluff; + for (int index1 = layerStart; index1 < layerEnd; index1 += layerJump) + { + int num3 = index1; + for (int x = tileCoordinates1.X; x <= tileCoordinates2.X; ++x) + { + for (int y = tileCoordinates1.Y; y <= tileCoordinates2.Y; ++y) + { + if (!WorldGen.InWorld(x, y, 10)) + return; + if ((double) Vector2.Distance(this.Center, new Vector2((float) (x * 16), (float) (y * 16))) <= (double) num2) + { + Tile tileSafely1 = Framing.GetTileSafely(x, y); + if (tileSafely1.active() && Main.tileSolid[(int) tileSafely1.type] && !Main.tileSolidTop[(int) tileSafely1.type] && !Main.tileFrameImportant[(int) tileSafely1.type]) + { + Tile tileSafely2 = Framing.GetTileSafely(x, y - 1); + if (!tileSafely2.active() || !Main.tileSolid[(int) tileSafely2.type] || Main.tileSolidTop[(int) tileSafely2.type]) + { + int tileDustAmount = WorldGen.KillTile_GetTileDustAmount(true, tileSafely1); + for (int index2 = 0; index2 < tileDustAmount; ++index2) + { + Dust dust = Main.dust[WorldGen.KillTile_MakeTileDust(x, y, tileSafely1)]; + dust.velocity.Y -= (float) (3.0 + (double) num3 * 1.5); + dust.velocity.Y *= Main.rand.NextFloat(); + dust.scale += (float) num3 * 0.03f; + } + if (num3 >= 2) + { + for (int index3 = 0; index3 < tileDustAmount - 1; ++index3) + { + Dust dust = Main.dust[WorldGen.KillTile_MakeTileDust(x, y, tileSafely1)]; + dust.velocity.Y -= 1f + (float) num3; + dust.velocity.Y *= Main.rand.NextFloat(); + } + } + if (tileDustAmount > 0 && Main.rand.Next(3) != 0) + { + float num4 = (float) Math.Abs(num1 - x) / (MAX_SPREAD / 2f); + Gore gore = Gore.NewGoreDirect(this.position, Vector2.Zero, 61 + Main.rand.Next(3), (float) (1.0 - (double) num3 * 0.150000005960464 + (double) num4 * 0.5)); + gore.velocity.Y -= (float) (0.100000001490116 + (double) num3 * 0.5 + (double) num4 * (double) num3 * 1.0); + gore.velocity.Y *= Main.rand.NextFloat(); + gore.position = new Vector2((float) (x * 16 + 20), (float) (y * 16 + 20)); + } + } + } + } + } + } + } + } + + public void CheckUsability(Player player, ref bool currentlyUsable) + { + if (this.aiStyle != 160) + return; + currentlyUsable = false; + } + + private void AI_163_Chum() + { + float num1 = 0.05f; + float num2 = (float) (this.width / 2); + for (int index = 0; index < 1000; ++index) + { + if (index != this.whoAmI && Main.projectile[index].active && Main.projectile[index].type == this.type && (double) Math.Abs(this.position.X - Main.projectile[index].position.X) + (double) Math.Abs(this.position.Y - Main.projectile[index].position.Y) < (double) num2) + { + if ((double) this.position.X < (double) Main.projectile[index].position.X) + this.velocity.X -= num1; + else + this.velocity.X += num1; + if ((double) this.position.Y < (double) Main.projectile[index].position.Y) + this.velocity.Y -= num1; + else + this.velocity.Y += num1; + } + } + if (this.wet) + { + this.velocity.X *= 0.9f; + int index1 = (int) ((double) this.Center.X + (double) ((this.width / 2 + 8) * this.direction)) / 16; + int index2 = (int) ((double) this.Center.Y / 16.0); + double num3 = (double) this.position.Y / 16.0; + int index3 = (int) (((double) this.position.Y + (double) this.height) / 16.0); + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (Main.tile[index1, index3] == null) + Main.tile[index1, index3] = new Tile(); + if ((double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.5f; + float waterLine = this.AI_061_FishingBobber_GetWaterLine((int) ((double) this.Center.X / 16.0), (int) ((double) this.Center.Y / 16.0)); + if ((double) this.Center.Y > (double) waterLine) + { + this.velocity.Y -= 0.1f; + if ((double) this.velocity.Y < -8.0) + this.velocity.Y = -8f; + if ((double) this.Center.Y + (double) this.velocity.Y < (double) waterLine) + this.velocity.Y = waterLine - this.Center.Y; + } + else + this.velocity.Y = waterLine - this.Center.Y; + } + else + { + if ((double) this.velocity.Y == 0.0) + this.velocity.X *= 0.95f; + this.velocity.X *= 0.98f; + this.velocity.Y += 0.3f; + if ((double) this.velocity.Y > 15.8999996185303) + this.velocity.Y = 15.9f; + } + if (this.frameCounter == 0) + { + this.frameCounter = 1; + this.frame = Main.rand.Next(4); + } + if (this.frameCounter < 10 && this.wet) + { + ++this.frameCounter; + for (float num4 = 0.0f; (double) num4 < 1.0; num4 += 0.5f) + { + Gore gore = Gore.NewGoreDirect(this.position + Vector2.UnitY * 6f, Vector2.Zero, 1201, this.scale * 0.7f); + gore.velocity = Main.rand.NextVector2CircularEdge(10f, 10f); + if ((double) gore.velocity.Y > 0.0) + gore.velocity.Y *= -1f; + } + for (float num5 = 0.0f; (double) num5 < 2.0; ++num5) + { + Gore gore = Gore.NewGoreDirect(this.position + Vector2.UnitY * 6f, Vector2.Zero, 1208, (float) ((double) this.scale * 0.699999988079071 + (double) Main.rand.NextFloat() * 0.150000005960464)); + gore.velocity = Main.rand.NextVector2CircularEdge(4f, 4f); + if ((double) gore.velocity.Y > 0.0) + gore.velocity.Y *= -1f; + } + } + this.scale = Utils.GetLerpValue(0.0f, 60f, (float) this.timeLeft, true); + this.rotation += this.velocity.X * 0.14f; + bool flag = !this.wet && (double) this.velocity.Length() < 0.800000011920929; + int maxValue = this.wet ? 90 : 5; + if (Main.rand.Next(maxValue) == 0 && !flag) + { + Gore gore = Gore.NewGoreDirect(this.position + Vector2.UnitY * 6f, Vector2.Zero, 1201, this.scale * 0.7f); + if (this.wet) + gore.velocity = Vector2.UnitX * Main.rand.NextFloatDirection() * 0.75f + Vector2.UnitY * Main.rand.NextFloat(); + else if ((double) gore.velocity.Y < 0.0) + gore.velocity.Y = -gore.velocity.Y; + } + Vector2 spot = this.Center + Vector2.UnitY * 16f; + if ((double) this.ai[0] >= 10.0 && this.timeLeft > 60) + { + this.timeLeft = 60; + this.netUpdate = true; + } + if ((double) this.ai[0] >= 10.0 || this.timeLeft <= 60) + return; + Main.instance.ChumBucketProjectileHelper.AddChumLocation(spot); + } + + private void ReduceRemainingChumsInPool() + { + int x = (int) this.Center.X / 16; + int y = (int) this.Center.Y / 16; + List> tupleList = new List>(); + List intList = new List(); + for (int index = 0; index < 1000; ++index) + { + Projectile projectile = Main.projectile[index]; + if (projectile.active && projectile.owner == Main.myPlayer && projectile.timeLeft > 60 && projectile.type == 820) + tupleList.Add(new Tuple(index, (projectile.Center + Vector2.UnitY * 16f).ToTileCoordinates())); + } + if (tupleList.Count == 0) + return; + int minX; + int maxX; + Projectile.GetFishingPondWidth(x, y, out minX, out maxX); + Point point = new Point(); + for (int i = minX; i <= maxX; ++i) + { + point.X = i; + int j = y; + while (Main.tile[i, j].liquid > (byte) 0 && !WorldGen.SolidTile(i, j) && j < Main.maxTilesY - 10) + { + ++j; + point.Y = j; + for (int index = tupleList.Count - 1; index >= 0; --index) + { + if (tupleList[index].Item2 == point) + { + intList.Add(tupleList[index].Item1); + tupleList.RemoveAt(index); + } + } + if (tupleList.Count == 0) + break; + } + if (tupleList.Count == 0) + break; + } + for (int index = 0; index < intList.Count; ++index) + { + Projectile projectile = Main.projectile[intList[index]]; + ++projectile.ai[0]; + projectile.netUpdate = true; + } + } + + private void AI_061_FishingBobber() + { + Player player = Main.player[this.owner]; + this.timeLeft = 60; + bool flag1 = false; + if (player.inventory[player.selectedItem].fishingPole == 0 || player.CCed || player.noItems) + flag1 = true; + else if (player.inventory[player.selectedItem].shoot != this.type) + flag1 = true; + else if (player.pulley) + flag1 = true; + else if (player.dead) + flag1 = true; + if (flag1) + { + this.Kill(); + } + else + { + if ((double) this.ai[1] > 0.0 && (double) this.localAI[1] != 0.0) + { + this.localAI[1] = 0.0f; + if (!this.lavaWet && !this.honeyWet) + this.AI_061_FishingBobber_DoASplash(); + } + if ((double) this.ai[0] >= 1.0) + { + if ((double) this.ai[0] == 2.0) + { + ++this.ai[0]; + SoundEngine.PlaySound(SoundID.Item17, this.position); + if (!this.lavaWet && !this.honeyWet) + this.AI_061_FishingBobber_DoASplash(); + } + if ((double) this.localAI[0] < 100.0) + ++this.localAI[0]; + if (this.frameCounter == 0) + { + this.frameCounter = 1; + this.ReduceRemainingChumsInPool(); + } + this.tileCollide = false; + int num1 = 10; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num2 = player.position.X + (float) (player.width / 2) - vector2.X; + float num3 = player.position.Y + (float) (player.height / 2) - vector2.Y; + float num4 = (float) Math.Sqrt((double) num2 * (double) num2 + (double) num3 * (double) num3); + if ((double) num4 > 3000.0) + this.Kill(); + float num5 = (float) (15.8999996185303 / (double) num4); + float num6 = num2 * num5; + float num7 = num3 * num5; + this.velocity.X = (this.velocity.X * (float) (num1 - 1) + num6) / (float) num1; + this.velocity.Y = (this.velocity.Y * (float) (num1 - 1) + num7) / (float) num1; + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.57f; + if (Main.myPlayer != this.owner || !this.Hitbox.Intersects(player.Hitbox)) + return; + this.Kill(); + } + else + { + bool flag2 = false; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num8 = player.position.X + (float) (player.width / 2) - vector2.X; + float num9 = player.position.Y + (float) (player.height / 2) - vector2.Y; + this.rotation = (float) Math.Atan2((double) num9, (double) num8) + 1.57f; + if (Math.Sqrt((double) num8 * (double) num8 + (double) num9 * (double) num9) > 900.0) + this.ai[0] = 1f; + if (this.wet) + { + this.rotation = 0.0f; + this.velocity.X *= 0.9f; + int index1 = (int) ((double) this.Center.X + (double) ((this.width / 2 + 8) * this.direction)) / 16; + int index2 = (int) ((double) this.Center.Y / 16.0); + double num10 = (double) this.position.Y / 16.0; + int index3 = (int) (((double) this.position.Y + (double) this.height) / 16.0); + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (Main.tile[index1, index3] == null) + Main.tile[index1, index3] = new Tile(); + if ((double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.5f; + float waterLine = this.AI_061_FishingBobber_GetWaterLine((int) ((double) this.Center.X / 16.0), (int) ((double) this.Center.Y / 16.0)); + if ((double) this.Center.Y > (double) waterLine) + { + this.velocity.Y -= 0.1f; + if ((double) this.velocity.Y < -8.0) + this.velocity.Y = -8f; + if ((double) this.Center.Y + (double) this.velocity.Y < (double) waterLine) + this.velocity.Y = waterLine - this.Center.Y; + } + else + this.velocity.Y = waterLine - this.Center.Y; + if ((double) this.velocity.Y >= -0.01 && (double) this.velocity.Y <= 0.01) + flag2 = true; + } + else + { + if ((double) this.velocity.Y == 0.0) + this.velocity.X *= 0.95f; + this.velocity.X *= 0.98f; + this.velocity.Y += 0.2f; + if ((double) this.velocity.Y > 15.8999996185303) + this.velocity.Y = 15.9f; + } + if (Main.myPlayer == this.owner && player.GetFishingConditions().BaitItemType == 2673) + player.displayedFishingInfo = Language.GetTextValue("GameUI.FishingWarning"); + if ((double) this.ai[1] != 0.0) + flag2 = true; + if (!flag2) + return; + if ((double) this.ai[1] == 0.0 && Main.myPlayer == this.owner) + { + int finalFishingLevel = player.GetFishingConditions().FinalFishingLevel; + if (Main.rand.Next(300) < finalFishingLevel) + this.localAI[1] += (float) Main.rand.Next(1, 3); + this.localAI[1] += (float) (finalFishingLevel / 30); + this.localAI[1] += (float) Main.rand.Next(1, 3); + if (Main.rand.Next(60) == 0) + this.localAI[1] += 60f; + if ((double) this.localAI[1] <= 660.0) + return; + this.localAI[1] = 0.0f; + this.FishingCheck(); + } + else + { + if ((double) this.ai[1] >= 0.0) + return; + if ((double) this.velocity.Y == 0.0 || this.honeyWet && (double) Math.Abs(this.velocity.Y) <= 0.00999999977648258) + { + this.velocity.Y = (float) Main.rand.Next(100, 500) * 0.015f; + this.velocity.X = (float) Main.rand.Next(-100, 101) * 0.015f; + this.wet = false; + this.lavaWet = false; + this.honeyWet = false; + } + this.ai[1] += (float) Main.rand.Next(1, 5); + if ((double) this.ai[1] < 0.0) + return; + this.ai[1] = 0.0f; + this.localAI[1] = 0.0f; + this.netUpdate = true; + } + } + } + } + + private float AI_061_FishingBobber_GetWaterLine(int X, int Y) + { + float num = this.position.Y + (float) this.height; + if (Main.tile[X, Y - 1] == null) + Main.tile[X, Y - 1] = new Tile(); + if (Main.tile[X, Y] == null) + Main.tile[X, Y] = new Tile(); + if (Main.tile[X, Y + 1] == null) + Main.tile[X, Y + 1] = new Tile(); + if (Main.tile[X, Y - 1].liquid > (byte) 0) + num = (float) (Y * 16) - (float) ((int) Main.tile[X, Y - 1].liquid / 16); + else if (Main.tile[X, Y].liquid > (byte) 0) + num = (float) ((Y + 1) * 16) - (float) ((int) Main.tile[X, Y].liquid / 16); + else if (Main.tile[X, Y + 1].liquid > (byte) 0) + num = (float) ((Y + 2) * 16) - (float) ((int) Main.tile[X, Y + 1].liquid / 16); + return num; + } + + private void AI_061_FishingBobber_DoASplash() + { + for (int index1 = 0; index1 < 100; ++index1) + { + int index2 = Dust.NewDust(new Vector2(this.position.X - 6f, this.position.Y - 10f), this.width + 12, 24, Dust.dustWater()); + Main.dust[index2].velocity.Y -= 4f; + Main.dust[index2].velocity.X *= 2.5f; + Main.dust[index2].scale = 0.8f; + Main.dust[index2].alpha = 100; + Main.dust[index2].noGravity = true; + } + SoundEngine.PlaySound(19, (int) this.position.X, (int) this.position.Y, 0); + } + + private void AI_061_FishingBobber_GiveItemToPlayer(Player thePlayer, int itemType) + { + Item newItem = new Item(); + newItem.SetDefaults(itemType); + if (itemType == 3196) + { + int finalFishingLevel = thePlayer.GetFishingConditions().FinalFishingLevel; + int minValue = (finalFishingLevel / 20 + 3) / 2; + int num1 = (finalFishingLevel / 10 + 6) / 2; + if (Main.rand.Next(50) < finalFishingLevel) + ++num1; + if (Main.rand.Next(100) < finalFishingLevel) + ++num1; + if (Main.rand.Next(150) < finalFishingLevel) + ++num1; + if (Main.rand.Next(200) < finalFishingLevel) + ++num1; + int num2 = Main.rand.Next(minValue, num1 + 1); + newItem.stack = num2; + } + if (itemType == 3197) + { + int finalFishingLevel = thePlayer.GetFishingConditions().FinalFishingLevel; + int minValue = (finalFishingLevel / 4 + 15) / 2; + int num3 = (finalFishingLevel / 2 + 30) / 2; + if (Main.rand.Next(50) < finalFishingLevel) + num3 += 4; + if (Main.rand.Next(100) < finalFishingLevel) + num3 += 4; + if (Main.rand.Next(150) < finalFishingLevel) + num3 += 4; + if (Main.rand.Next(200) < finalFishingLevel) + num3 += 4; + int num4 = Main.rand.Next(minValue, num3 + 1); + newItem.stack = num4; + } + newItem.newAndShiny = true; + if (thePlayer.GetItem(this.owner, newItem, new GetItemSettings()).stack > 0) + { + int number = Item.NewItem((int) this.position.X, (int) this.position.Y, this.width, this.height, itemType, noGrabDelay: true); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else + { + newItem.position.X = this.Center.X - (float) (newItem.width / 2); + newItem.position.Y = this.Center.Y - (float) (newItem.height / 2); + newItem.active = true; + PopupText.NewText(PopupTextContext.RegularItemPickup, newItem, 0); + } + } + + private void AI_146_DD2Victory() + { + } + + private void BetsySharpnel(int npcIndex) + { + if ((double) this.ai[1] == -1.0 || this.owner != Main.myPlayer) + return; + Vector2 spinningpoint = new Vector2(0.0f, 6f); + Vector2 center = this.Center; + float num1 = 0.7853982f; + int num2 = 5; + float num3 = (float) -((double) num1 * 2.0) / (float) (num2 - 1); + for (int index1 = 0; index1 < num2; ++index1) + { + int index2 = Projectile.NewProjectile(center, spinningpoint.RotatedBy((double) num1 + (double) num3 * (double) index1), 710, this.damage, this.knockBack, this.owner, ai1: -1f); + this.CopyLocalNPCImmunityTimes(Main.projectile[index2]); + } + } + + private void CopyLocalNPCImmunityTimes(Projectile p) + { + for (int index = 0; index < this.localNPCImmunity.Length; ++index) + p.localNPCImmunity[index] = this.localNPCImmunity[index]; + } + + private void AI_001() + { + if (this.type == 469 && this.wet && !this.honeyWet) + this.Kill(); + if (this.type == 601) + { + Color portalColor = PortalHelper.GetPortalColor(this.owner, (int) this.ai[0]); + Lighting.AddLight(this.Center + this.velocity * 3f, portalColor.ToVector3() * 0.5f); + if (this.alpha > 0 && this.alpha <= 15) + { + Color color = portalColor; + color.A = byte.MaxValue; + for (int index = 0; index < 4; ++index) + { + Dust dust = Main.dust[Dust.NewDust(this.Center, 0, 0, 264)]; + dust.position = this.Center; + dust.velocity = this.velocity * 2f + Utils.RandomVector2(Main.rand, -1f, 1f); + dust.color = color; + dust.scale = 1.2f; + dust.noLight = true; + dust.noGravity = true; + dust.customData = (object) Main.player[this.owner]; + } + if ((double) this.ai[0] != 0.0) + SoundEngine.PlaySound(SoundID.Item114, this.position); + else + SoundEngine.PlaySound(SoundID.Item115, this.position); + } + this.alpha -= 15; + if (this.alpha < 0) + this.alpha = 0; + if (++this.frameCounter >= 4) + { + this.frameCounter = 0; + if (++this.frame >= Main.projFrames[this.type]) + this.frame = 0; + } + if (this.alpha == 0) + { + Color color = portalColor; + color.A = byte.MaxValue; + Dust dust = Main.dust[Dust.NewDust(this.Center, 0, 0, 263)]; + dust.position = this.Center; + dust.velocity = this.velocity / 4f; + dust.color = color; + dust.noGravity = true; + dust.scale = 0.6f; + } + } + if (this.type == 472) + { + int index1 = Dust.NewDust(this.position, this.width, this.height, 30); + Main.dust[index1].noGravity = true; + Main.dust[index1].velocity *= 0.25f; + Main.dust[index1].velocity += this.velocity * 0.75f; + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + SoundEngine.PlaySound(SoundID.Item17, this.position); + for (int index2 = 0; index2 < 20; ++index2) + { + int index3 = Dust.NewDust(this.position, this.width, this.height, 30); + Main.dust[index3].noGravity = true; + Main.dust[index3].velocity *= 0.25f; + Main.dust[index3].velocity += this.velocity; + Main.dust[index3].velocity.X *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + Main.dust[index3].velocity.Y *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.00999999977648258); + } + } + } + if (this.type == 323) + { + this.alpha -= 50; + if (this.alpha < 0) + this.alpha = 0; + } + if (this.type == 436) + { + if ((double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item12, this.position); + } + this.alpha -= 40; + if (this.alpha < 0) + this.alpha = 0; + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.frameCounter >= 3) + { + ++this.frame; + this.frameCounter = 0; + if (this.frame >= 4) + this.frame = 0; + } + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.3f, 1.1f, 0.5f); + } + if (this.type == 467) + { + if ((double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item34, this.position); + } + else if ((double) this.ai[1] == 1.0 && Main.netMode != 1) + { + int num1 = -1; + float num2 = 2000f; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && !Main.player[index].dead) + { + Vector2 center = Main.player[index].Center; + float num3 = Vector2.Distance(center, this.Center); + if (((double) num3 < (double) num2 || num1 == -1) && Collision.CanHit(this.Center, 1, 1, center, 1, 1)) + { + num2 = num3; + num1 = index; + } + } + } + if ((double) num2 < 20.0) + { + this.Kill(); + return; + } + if (num1 != -1) + { + this.ai[1] = 21f; + this.ai[0] = (float) num1; + this.netUpdate = true; + } + } + else if ((double) this.ai[1] > 20.0 && (double) this.ai[1] < 200.0) + { + ++this.ai[1]; + int index = (int) this.ai[0]; + if (!Main.player[index].active || Main.player[index].dead) + { + this.ai[1] = 1f; + this.ai[0] = 0.0f; + this.netUpdate = true; + } + else + { + float rotation = this.velocity.ToRotation(); + Vector2 v = Main.player[index].Center - this.Center; + if ((double) v.Length() < 20.0) + { + this.Kill(); + return; + } + float targetAngle = v.ToRotation(); + if (v == Vector2.Zero) + targetAngle = rotation; + float num = rotation.AngleLerp(targetAngle, 0.008f); + this.velocity = new Vector2(this.velocity.Length(), 0.0f).RotatedBy((double) num); + } + } + if ((double) this.ai[1] >= 1.0 && (double) this.ai[1] < 20.0) + { + ++this.ai[1]; + if ((double) this.ai[1] == 20.0) + this.ai[1] = 1f; + } + this.alpha -= 40; + if (this.alpha < 0) + this.alpha = 0; + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.frameCounter >= 3) + { + ++this.frame; + this.frameCounter = 0; + if (this.frame >= 4) + this.frame = 0; + } + Lighting.AddLight(this.Center, 1.1f, 0.9f, 0.4f); + ++this.localAI[0]; + if ((double) this.localAI[0] == 12.0) + { + this.localAI[0] = 0.0f; + for (int index4 = 0; index4 < 12; ++index4) + { + Vector2 vector2 = (Vector2.UnitX * (float) -this.width / 2f + -Vector2.UnitY.RotatedBy((double) index4 * 3.14159274101257 / 6.0) * new Vector2(8f, 16f)).RotatedBy((double) this.rotation - 1.57079637050629); + int index5 = Dust.NewDust(this.Center, 0, 0, 6, Alpha: 160); + Main.dust[index5].scale = 1.1f; + Main.dust[index5].noGravity = true; + Main.dust[index5].position = this.Center + vector2; + Main.dust[index5].velocity = this.velocity * 0.1f; + Main.dust[index5].velocity = Vector2.Normalize(this.Center - this.velocity * 3f - Main.dust[index5].position) * 1.25f; + } + } + if (Main.rand.Next(4) == 0) + { + for (int index6 = 0; index6 < 1; ++index6) + { + Vector2 vector2 = -Vector2.UnitX.RotatedByRandom(0.196349546313286).RotatedBy((double) this.velocity.ToRotation()); + int index7 = Dust.NewDust(this.position, this.width, this.height, 31, Alpha: 100); + Main.dust[index7].velocity *= 0.1f; + Main.dust[index7].position = this.Center + vector2 * (float) this.width / 2f; + Main.dust[index7].fadeIn = 0.9f; + } + } + if (Main.rand.Next(32) == 0) + { + for (int index8 = 0; index8 < 1; ++index8) + { + Vector2 vector2 = -Vector2.UnitX.RotatedByRandom(0.392699092626572).RotatedBy((double) this.velocity.ToRotation()); + int index9 = Dust.NewDust(this.position, this.width, this.height, 31, Alpha: 155, Scale: 0.8f); + Main.dust[index9].velocity *= 0.3f; + Main.dust[index9].position = this.Center + vector2 * (float) this.width / 2f; + if (Main.rand.Next(2) == 0) + Main.dust[index9].fadeIn = 1.4f; + } + } + if (Main.rand.Next(2) == 0) + { + for (int index10 = 0; index10 < 2; ++index10) + { + Vector2 vector2 = -Vector2.UnitX.RotatedByRandom(0.785398185253143).RotatedBy((double) this.velocity.ToRotation()); + int index11 = Dust.NewDust(this.position, this.width, this.height, 6, Scale: 1.2f); + Main.dust[index11].velocity *= 0.3f; + Main.dust[index11].noGravity = true; + Main.dust[index11].position = this.Center + vector2 * (float) this.width / 2f; + if (Main.rand.Next(2) == 0) + Main.dust[index11].fadeIn = 1.4f; + } + } + } + if (this.type == 468) + { + if ((double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item34, this.position); + } + else if ((double) this.ai[1] == 1.0 && Main.netMode != 1) + { + int num4 = -1; + float num5 = 2000f; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && !Main.player[index].dead) + { + Vector2 center = Main.player[index].Center; + float num6 = Vector2.Distance(center, this.Center); + if (((double) num6 < (double) num5 || num4 == -1) && Collision.CanHit(this.Center, 1, 1, center, 1, 1)) + { + num5 = num6; + num4 = index; + } + } + } + if ((double) num5 < 20.0) + { + this.Kill(); + return; + } + if (num4 != -1) + { + this.ai[1] = 21f; + this.ai[0] = (float) num4; + this.netUpdate = true; + } + } + else if ((double) this.ai[1] > 20.0 && (double) this.ai[1] < 200.0) + { + ++this.ai[1]; + int index = (int) this.ai[0]; + if (!Main.player[index].active || Main.player[index].dead) + { + this.ai[1] = 1f; + this.ai[0] = 0.0f; + this.netUpdate = true; + } + else + { + float rotation = this.velocity.ToRotation(); + Vector2 v = Main.player[index].Center - this.Center; + if ((double) v.Length() < 20.0) + { + this.Kill(); + return; + } + float targetAngle = v.ToRotation(); + if (v == Vector2.Zero) + targetAngle = rotation; + float num = rotation.AngleLerp(targetAngle, 0.01f); + this.velocity = new Vector2(this.velocity.Length(), 0.0f).RotatedBy((double) num); + } + } + if ((double) this.ai[1] >= 1.0 && (double) this.ai[1] < 20.0) + { + ++this.ai[1]; + if ((double) this.ai[1] == 20.0) + this.ai[1] = 1f; + } + this.alpha -= 40; + if (this.alpha < 0) + this.alpha = 0; + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.frameCounter >= 3) + { + ++this.frame; + this.frameCounter = 0; + if (this.frame >= 4) + this.frame = 0; + } + Lighting.AddLight(this.Center, 0.2f, 0.1f, 0.6f); + ++this.localAI[0]; + if ((double) this.localAI[0] == 12.0) + { + this.localAI[0] = 0.0f; + for (int index12 = 0; index12 < 12; ++index12) + { + Vector2 vector2 = (Vector2.UnitX * (float) -this.width / 2f + -Vector2.UnitY.RotatedBy((double) index12 * 3.14159274101257 / 6.0) * new Vector2(8f, 16f)).RotatedBy((double) this.rotation - 1.57079637050629); + int index13 = Dust.NewDust(this.Center, 0, 0, 27, Alpha: 160); + Main.dust[index13].scale = 1.1f; + Main.dust[index13].noGravity = true; + Main.dust[index13].position = this.Center + vector2; + Main.dust[index13].velocity = this.velocity * 0.1f; + Main.dust[index13].velocity = Vector2.Normalize(this.Center - this.velocity * 3f - Main.dust[index13].position) * 1.25f; + } + } + if (Main.rand.Next(4) == 0) + { + for (int index14 = 0; index14 < 1; ++index14) + { + Vector2 vector2 = -Vector2.UnitX.RotatedByRandom(0.196349546313286).RotatedBy((double) this.velocity.ToRotation()); + int index15 = Dust.NewDust(this.position, this.width, this.height, 31, Alpha: 100); + Main.dust[index15].velocity *= 0.1f; + Main.dust[index15].position = this.Center + vector2 * (float) this.width / 2f; + Main.dust[index15].fadeIn = 0.9f; + } + } + if (Main.rand.Next(32) == 0) + { + for (int index16 = 0; index16 < 1; ++index16) + { + Vector2 vector2 = -Vector2.UnitX.RotatedByRandom(0.392699092626572).RotatedBy((double) this.velocity.ToRotation()); + int index17 = Dust.NewDust(this.position, this.width, this.height, 31, Alpha: 155, Scale: 0.8f); + Main.dust[index17].velocity *= 0.3f; + Main.dust[index17].position = this.Center + vector2 * (float) this.width / 2f; + if (Main.rand.Next(2) == 0) + Main.dust[index17].fadeIn = 1.4f; + } + } + if (Main.rand.Next(2) == 0) + { + for (int index18 = 0; index18 < 2; ++index18) + { + Vector2 vector2 = -Vector2.UnitX.RotatedByRandom(0.785398185253143).RotatedBy((double) this.velocity.ToRotation()); + int index19 = Dust.NewDust(this.position, this.width, this.height, 27, Scale: 1.2f); + Main.dust[index19].velocity *= 0.3f; + Main.dust[index19].noGravity = true; + Main.dust[index19].position = this.Center + vector2 * (float) this.width / 2f; + if (Main.rand.Next(2) == 0) + Main.dust[index19].fadeIn = 1.4f; + } + } + } + if (this.type == 634 || this.type == 635) + { + float num7 = 5f; + float num8 = 250f; + float num9 = 6f; + Vector2 vector2_1 = new Vector2(8f, 10f); + float num10 = 1.2f; + Vector3 rgb = new Vector3(0.7f, 0.1f, 0.5f); + int num11 = 4 * this.MaxUpdates; + int Type1 = Utils.SelectRandom(Main.rand, 242, 73, 72, 71, (int) byte.MaxValue); + int Type2 = (int) byte.MaxValue; + if (this.type == 635) + { + vector2_1 = new Vector2(10f, 20f); + num10 = 1f; + num8 = 500f; + Type2 = 88; + num11 = 3 * this.MaxUpdates; + rgb = new Vector3(0.4f, 0.6f, 0.9f); + Type1 = Utils.SelectRandom(Main.rand, 242, 59, 88); + } + if ((double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + this.localAI[0] = (float) -Main.rand.Next(48); + SoundEngine.PlaySound(SoundID.Item34, this.position); + } + else if ((double) this.ai[1] == 1.0 && this.owner == Main.myPlayer) + { + int num12 = -1; + float num13 = num8; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].CanBeChasedBy((object) this)) + { + Vector2 center = Main.npc[index].Center; + float num14 = Vector2.Distance(center, this.Center); + if ((double) num14 < (double) num13 && num12 == -1 && Collision.CanHitLine(this.Center, 1, 1, center, 1, 1)) + { + num13 = num14; + num12 = index; + } + } + } + if ((double) num13 < 20.0) + { + this.Kill(); + return; + } + if (num12 != -1) + { + this.ai[1] = num7 + 1f; + this.ai[0] = (float) num12; + this.netUpdate = true; + } + } + else if ((double) this.ai[1] > (double) num7) + { + ++this.ai[1]; + int index = (int) this.ai[0]; + if (!Main.npc[index].active || !Main.npc[index].CanBeChasedBy((object) this)) + { + this.ai[1] = 1f; + this.ai[0] = 0.0f; + this.netUpdate = true; + } + else + { + double rotation = (double) this.velocity.ToRotation(); + Vector2 vector2_2 = Main.npc[index].Center - this.Center; + if ((double) vector2_2.Length() < 20.0) + { + this.Kill(); + return; + } + if (vector2_2 != Vector2.Zero) + { + vector2_2.Normalize(); + vector2_2 *= num9; + } + float num15 = 30f; + this.velocity = (this.velocity * (num15 - 1f) + vector2_2) / num15; + } + } + if ((double) this.ai[1] >= 1.0 && (double) this.ai[1] < (double) num7) + { + ++this.ai[1]; + if ((double) this.ai[1] == (double) num7) + this.ai[1] = 1f; + } + this.alpha -= 40; + if (this.alpha < 0) + this.alpha = 0; + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.frameCounter >= num11) + { + ++this.frame; + this.frameCounter = 0; + if (this.frame >= 4) + this.frame = 0; + } + Lighting.AddLight(this.Center, rgb); + this.rotation = this.velocity.ToRotation(); + ++this.localAI[0]; + if ((double) this.localAI[0] == 48.0) + this.localAI[0] = 0.0f; + else if (this.alpha == 0) + { + for (int index20 = 0; index20 < 2; ++index20) + { + Vector2 vector2_3 = Vector2.UnitX * -30f; + Vector2 vector2_4 = -Vector2.UnitY.RotatedBy((double) this.localAI[0] * 0.130899697542191 + (double) index20 * 3.14159274101257) * vector2_1 - this.rotation.ToRotationVector2() * 10f; + int index21 = Dust.NewDust(this.Center, 0, 0, Type2, Alpha: 160); + Main.dust[index21].scale = num10; + Main.dust[index21].noGravity = true; + Main.dust[index21].position = this.Center + vector2_4 + this.velocity * 2f; + Main.dust[index21].velocity = Vector2.Normalize(this.Center + this.velocity * 2f * 8f - Main.dust[index21].position) * 2f + this.velocity * 2f; + } + } + if (Main.rand.Next(12) == 0) + { + for (int index22 = 0; index22 < 1; ++index22) + { + Vector2 vector2_5 = -Vector2.UnitX.RotatedByRandom(0.196349546313286).RotatedBy((double) this.velocity.ToRotation()); + int index23 = Dust.NewDust(this.position, this.width, this.height, 31, Alpha: 100); + Main.dust[index23].velocity *= 0.1f; + Main.dust[index23].position = this.Center + vector2_5 * (float) this.width / 2f + this.velocity * 2f; + Main.dust[index23].fadeIn = 0.9f; + } + } + if (Main.rand.Next(64) == 0) + { + for (int index24 = 0; index24 < 1; ++index24) + { + Vector2 vector2_6 = -Vector2.UnitX.RotatedByRandom(0.392699092626572).RotatedBy((double) this.velocity.ToRotation()); + int index25 = Dust.NewDust(this.position, this.width, this.height, 31, Alpha: 155, Scale: 0.8f); + Main.dust[index25].velocity *= 0.3f; + Main.dust[index25].position = this.Center + vector2_6 * (float) this.width / 2f; + if (Main.rand.Next(2) == 0) + Main.dust[index25].fadeIn = 1.4f; + } + } + if (Main.rand.Next(4) == 0) + { + for (int index26 = 0; index26 < 2; ++index26) + { + Vector2 vector2_7 = -Vector2.UnitX.RotatedByRandom(0.785398185253143).RotatedBy((double) this.velocity.ToRotation()); + int index27 = Dust.NewDust(this.position, this.width, this.height, Type1, Scale: 1.2f); + Main.dust[index27].velocity *= 0.3f; + Main.dust[index27].noGravity = true; + Main.dust[index27].position = this.Center + vector2_7 * (float) this.width / 2f; + if (Main.rand.Next(2) == 0) + Main.dust[index27].fadeIn = 1.4f; + } + } + if (Main.rand.Next(12) == 0 && this.type == 634) + { + Vector2 vector2_8 = -Vector2.UnitX.RotatedByRandom(0.196349546313286).RotatedBy((double) this.velocity.ToRotation()); + int index = Dust.NewDust(this.position, this.width, this.height, Type2, Alpha: 100); + Main.dust[index].velocity *= 0.3f; + Main.dust[index].position = this.Center + vector2_8 * (float) this.width / 2f; + Main.dust[index].fadeIn = 0.9f; + Main.dust[index].noGravity = true; + } + if (Main.rand.Next(3) == 0 && this.type == 635) + { + Vector2 vector2_9 = -Vector2.UnitX.RotatedByRandom(0.196349546313286).RotatedBy((double) this.velocity.ToRotation()); + int index = Dust.NewDust(this.position, this.width, this.height, Type2, Alpha: 100); + Main.dust[index].velocity *= 0.3f; + Main.dust[index].position = this.Center + vector2_9 * (float) this.width / 2f; + Main.dust[index].fadeIn = 1.2f; + Main.dust[index].scale = 1.5f; + Main.dust[index].noGravity = true; + } + } + if (this.type == 459) + { + this.alpha -= 30; + if (this.alpha < 0) + this.alpha = 0; + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.frameCounter >= 3) + { + ++this.frame; + this.frameCounter = 0; + if (this.frame >= 3) + this.frame = 0; + } + this.position = this.Center; + this.scale = this.ai[1]; + this.width = this.height = (int) (22.0 * (double) this.scale); + this.Center = this.position; + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.4f, 0.85f, 0.9f); + int num; + if ((double) this.scale < 0.85) + { + num = Main.rand.Next(3) == 0 ? 1 : 0; + } + else + { + num = 1; + this.penetrate = -1; + this.maxPenetrate = -1; + } + for (int index28 = 0; index28 < num; ++index28) + { + int index29 = Dust.NewDust(this.position, this.width, this.height, 226, this.velocity.X); + Main.dust[index29].position -= Vector2.One * 3f; + Main.dust[index29].scale = 0.5f; + Main.dust[index29].noGravity = true; + Main.dust[index29].velocity = this.velocity / 3f; + Main.dust[index29].alpha = (int) byte.MaxValue - (int) ((double) byte.MaxValue * (double) this.scale); + } + } + if (this.type == 709) + { + this.alpha -= 30; + if (this.alpha < 0) + this.alpha = 0; + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.frameCounter >= 3) + { + ++this.frame; + this.frameCounter = 0; + if (this.frame >= 3) + this.frame = 0; + } + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.4f, 0.85f, 0.9f); + if ((double) this.ai[1] == 0.0) + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_SkyDragonsFuryShot, this.Center); + ++this.ai[1]; + if ((double) this.ai[1] >= 30.0) + { + this.Kill(); + return; + } + } + if (this.type == 442) + { + this.frame = 0; + if (this.alpha != 0) + { + ++this.localAI[0]; + if ((double) this.localAI[0] >= 4.0) + { + this.alpha -= 90; + if (this.alpha < 0) + { + this.alpha = 0; + this.localAI[0] = 2f; + } + } + } + if ((double) Vector2.Distance(this.Center, new Vector2(this.ai[0], this.ai[1]) * 16f + Vector2.One * 8f) <= 16.0) + { + this.Kill(); + return; + } + if (this.alpha == 0) + { + ++this.localAI[1]; + if ((double) this.localAI[1] >= 120.0) + { + this.Kill(); + return; + } + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.3f, 0.45f, 0.8f); + ++this.localAI[0]; + if ((double) this.localAI[0] == 3.0) + { + this.localAI[0] = 0.0f; + for (int index30 = 0; index30 < 8; ++index30) + { + Vector2 vector2 = (Vector2.UnitX * -8f + -Vector2.UnitY.RotatedBy((double) index30 * 3.14159274101257 / 4.0) * new Vector2(2f, 4f)).RotatedBy((double) this.rotation - 1.57079637050629); + int index31 = Dust.NewDust(this.Center, 0, 0, 135); + Main.dust[index31].scale = 1.5f; + Main.dust[index31].noGravity = true; + Main.dust[index31].position = this.Center + vector2; + Main.dust[index31].velocity = this.velocity * 0.66f; + } + } + } + } + if (this.type == 440 || this.type == 449 || this.type == 606) + { + if (this.alpha > 0) + this.alpha -= 25; + if (this.alpha < 0) + this.alpha = 0; + if (this.type == 440) + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.25f, 0.4f, 0.7f); + if (this.type == 449) + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.7f, 0.65f, 0.3f); + if (this.type == 606) + Lighting.AddLight(this.Center, 0.7f, 0.3f, 0.3f); + float num16 = 100f; + float num17 = 3f; + if (this.type == 606) + { + num16 = 150f; + num17 = 5f; + } + if ((double) this.ai[1] == 0.0) + { + this.localAI[0] += num17; + if ((double) this.localAI[0] == (double) num17 * 1.0 && this.type == 606) + { + for (int index32 = 0; index32 < 4; ++index32) + { + int index33 = Dust.NewDust(this.Center - this.velocity / 2f, 0, 0, 182, Alpha: 100, Scale: 1.4f); + Main.dust[index33].velocity *= 0.2f; + Main.dust[index33].velocity += this.velocity / 10f; + Main.dust[index33].noGravity = true; + } + } + if ((double) this.localAI[0] > (double) num16) + this.localAI[0] = num16; + } + else + { + this.localAI[0] -= num17; + if ((double) this.localAI[0] <= 0.0) + { + this.Kill(); + return; + } + } + } + if (this.type == 438) + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.4f, 0.1f, 0.2f); + if (this.type == 593) + { + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.4f, 0.1f, 0.3f); + if (++this.frameCounter >= 12) + { + if (++this.frame >= Main.projFrames[this.type]) + this.frame = 0; + this.frameCounter = 0; + } + if (Main.rand.Next(2) == 0) + { + Vector2 spinningpoint = Vector2.UnitY.RotatedByRandom(6.28318548202515); + Dust dust = Main.dust[Dust.NewDust(this.Center - spinningpoint * 8f, 0, 0, 240)]; + dust.noGravity = true; + dust.position = this.Center - spinningpoint * 8f * this.scale; + dust.velocity = spinningpoint.RotatedBy(-1.57079637050629) * 2f; + dust.velocity = Vector2.Zero; + dust.scale = 0.5f + Main.rand.NextFloat(); + dust.fadeIn = 0.5f; + } + } + if (this.type == 592) + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.15f, 0.15f, 0.4f); + if (this.type == 462) + { + int index = Dust.NewDust(this.Center, 0, 0, 229, Alpha: 100); + Main.dust[index].noLight = true; + Main.dust[index].noGravity = true; + Main.dust[index].velocity = this.velocity; + Main.dust[index].position -= Vector2.One * 4f; + Main.dust[index].scale = 0.8f; + if (++this.frameCounter >= 9) + { + this.frameCounter = 0; + if (++this.frame >= 5) + this.frame = 0; + } + } + if (this.type == 437) + { + if ((double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item12, this.position); + } + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + for (int index34 = 0; index34 < 4; ++index34) + { + int index35 = Dust.NewDust(this.position, this.width, this.height, 226, this.velocity.X); + Main.dust[index35].position = Vector2.Lerp(Main.dust[index35].position, this.Center, 0.25f); + Main.dust[index35].scale = 0.5f; + Main.dust[index35].noGravity = true; + Main.dust[index35].velocity /= 2f; + Main.dust[index35].velocity += this.velocity * 0.66f; + } + } + if ((double) this.ai[0] < 16.0) + { + for (int index36 = 0; index36 < 2; ++index36) + { + int index37 = Dust.NewDust(this.position, this.width, this.height, 226, this.velocity.X); + Main.dust[index37].position = this.position + new Vector2((float) ((this.direction == 1 ? 1 : 0) * this.width), (float) (2 + (this.height - 4) * index36)); + Main.dust[index37].scale = 0.3f; + Main.dust[index37].noGravity = true; + Main.dust[index37].velocity = Vector2.Zero; + } + } + } + if (this.type == 435) + { + if ((double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item12, this.position); + } + this.alpha -= 40; + if (this.alpha < 0) + this.alpha = 0; + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.frameCounter >= 3) + { + ++this.frame; + this.frameCounter = 0; + if (this.frame >= 4) + this.frame = 0; + } + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.3f, 0.8f, 1.1f); + } + if (this.type == 682) + { + if ((double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.DD2_LightningBugZap, this.position); + for (int index = 0; index < 8; ++index) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 272); + dust.velocity *= 1f; + dust.velocity += this.velocity * 0.65f; + dust.scale = 0.6f; + dust.fadeIn = 0.8f; + dust.noGravity = true; + dust.noLight = true; + dust.position += dust.velocity * 3f; + } + } + this.alpha -= 40; + if (this.alpha < 0) + this.alpha = 0; + this.spriteDirection = this.direction; + ++this.frameCounter; + if (this.frameCounter >= 3) + { + ++this.frame; + this.frameCounter = 0; + if (this.frame >= 4) + this.frame = 0; + } + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.5f, 0.2f, 1.1f); + } + if (this.type == 684) + { + this.alpha -= 40; + if (this.alpha < 0) + this.alpha = 0; + this.spriteDirection = this.direction; + ++this.localAI[0]; + for (int index = 0; index < 1; ++index) + { + Vector2 vector2 = (Utils.RandomVector2(Main.rand, -0.5f, 0.5f) * new Vector2(20f, 80f)).RotatedBy((double) this.velocity.ToRotation()); + Dust dust = Dust.NewDustDirect(this.Center, 0, 0, 60); + dust.alpha = (int) sbyte.MaxValue; + dust.fadeIn = 1.5f; + dust.scale = 1.3f; + dust.velocity *= 0.3f; + dust.position = this.Center + vector2; + dust.noGravity = true; + dust.noLight = true; + dust.color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + } + Lighting.AddLight(this.Center, 1.1f, 0.3f, 0.4f); + } + if (this.type == 408) + { + this.alpha -= 40; + if (this.alpha < 0) + this.alpha = 0; + this.spriteDirection = this.direction; + } + if (this.type == 282) + { + int index = Dust.NewDust(this.position, this.width, this.height, 171, Alpha: 100); + Main.dust[index].scale = (float) Main.rand.Next(1, 10) * 0.1f; + Main.dust[index].noGravity = true; + Main.dust[index].fadeIn = 1.5f; + Main.dust[index].velocity *= 0.25f; + Main.dust[index].velocity += this.velocity * 0.25f; + } + if (this.type == 275 || this.type == 276) + { + ++this.frameCounter; + if (this.frameCounter > 1) + { + this.frameCounter = 0; + ++this.frame; + if (this.frame > 1) + this.frame = 0; + } + } + if (this.type == 225 && Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 40); + Main.dust[index].noGravity = true; + Main.dust[index].scale = 1.3f; + Main.dust[index].velocity *= 0.5f; + } + if (this.type == 174) + { + if (this.alpha == 0) + { + int index = Dust.NewDust(this.oldPosition - this.velocity * 3f, this.width, this.height, 76, Alpha: 50); + Main.dust[index].noGravity = true; + Main.dust[index].noLight = true; + Main.dust[index].velocity *= 0.5f; + } + this.alpha -= 50; + if (this.alpha < 0) + this.alpha = 0; + if ((double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item17, this.position); + } + } + else if (this.type == 605 || this.type == 920 || this.type == 921 || this.type == 926 || this.type == 937) + { + if (this.type == 920 && this.frameCounter == 0) + { + this.frameCounter = 1; + this.frame = Main.rand.Next(3); + } + if (this.alpha == 0 && Main.rand.Next(3) == 0) + { + int Type = 4; + Color newColor = new Color(78, 136, (int) byte.MaxValue, 150); + float Scale = 1.2f; + bool flag = true; + int num = 0; + if (this.type == 921) + { + Type = 243; + newColor = new Color(); + } + if (this.type == 926) + { + Type = 4; + newColor = NPC.AI_121_QueenSlime_GetDustColor(); + newColor.A = (byte) 150; + Scale = 1.2f; + num = 8; + flag = Main.rand.Next(2) == 0; + } + if (this.type == 937) + { + Type = 4; + newColor = NPC.AI_121_QueenSlime_GetDustColor(); + newColor.A = (byte) 150; + } + int index = Dust.NewDust(this.position - new Vector2((float) num, (float) num) + this.velocity, this.width + num * 2, this.height + num * 2, Type, Alpha: 50, newColor: newColor, Scale: Scale); + Main.dust[index].velocity *= 0.3f; + Main.dust[index].velocity += this.velocity * 0.3f; + Main.dust[index].noGravity = flag; + } + this.alpha -= 50; + if (this.alpha < 0) + this.alpha = 0; + if (this.type != 937 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + if (this.type == 926) + SoundEngine.PlaySound(SoundID.Item155, this.position); + else + SoundEngine.PlaySound(SoundID.Item154, this.position); + } + } + else if (this.type == 176) + { + if (this.alpha == 0) + { + int index = Dust.NewDust(this.oldPosition, this.width, this.height, 22, Alpha: 100, Scale: 0.5f); + Main.dust[index].noGravity = true; + Main.dust[index].noLight = true; + Main.dust[index].velocity *= 0.15f; + Main.dust[index].fadeIn = 0.8f; + } + this.alpha -= 50; + if (this.alpha < 0) + this.alpha = 0; + if ((double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item17, this.position); + } + } + if (this.type == 350) + { + this.alpha -= 100; + if (this.alpha < 0) + this.alpha = 0; + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.9f, 0.6f, 0.2f); + if (this.alpha == 0) + { + int num = 2; + if (Main.rand.Next(3) != 0) + { + int index = Dust.NewDust(new Vector2(this.Center.X - (float) num, (float) ((double) this.Center.Y - (double) num - 2.0)) - this.velocity * 0.5f, num * 2, num * 2, 6, Alpha: 100); + Main.dust[index].scale *= (float) (1.29999995231628 + (double) Main.rand.Next(10) * 0.0500000007450581); + Main.dust[index].velocity *= 0.2f; + Main.dust[index].noGravity = true; + Main.dust[index].noLight = true; + Main.dust[index].velocity += this.velocity * 0.25f; + } + if (Main.rand.Next(4) == 0) + { + int index = Dust.NewDust(new Vector2(this.Center.X - (float) num, (float) ((double) this.Center.Y - (double) num - 2.0)) - this.velocity * 0.5f, num * 2, num * 2, 31, Alpha: 100, Scale: 0.5f); + Main.dust[index].fadeIn = (float) (0.600000023841858 + (double) Main.rand.Next(5) * 0.100000001490116); + Main.dust[index].velocity *= 0.05f; + Main.dust[index].velocity += this.velocity * 0.25f; + } + } + if ((double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item42, this.position); + } + } + if (this.type == 325) + { + this.alpha -= 100; + if (this.alpha < 0) + this.alpha = 0; + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, 0.9f, 0.6f, 0.2f); + if (this.alpha == 0) + { + int num = 2; + if (Main.rand.Next(3) != 0) + { + int index = Dust.NewDust(new Vector2(this.Center.X - (float) num, (float) ((double) this.Center.Y - (double) num - 2.0)) - this.velocity * 0.5f, num * 2, num * 2, 6, Alpha: 100); + Main.dust[index].scale *= (float) (1.20000004768372 + (double) Main.rand.Next(10) * 0.0500000007450581); + Main.dust[index].velocity *= 0.2f; + Main.dust[index].noGravity = true; + Main.dust[index].noLight = true; + Main.dust[index].velocity += this.velocity * 0.25f; + } + if (Main.rand.Next(4) == 0) + { + int index = Dust.NewDust(new Vector2(this.Center.X - (float) num, (float) ((double) this.Center.Y - (double) num - 2.0)) - this.velocity * 0.5f, num * 2, num * 2, 31, Alpha: 100, Scale: 0.5f); + Main.dust[index].fadeIn = (float) (0.5 + (double) Main.rand.Next(5) * 0.0500000007450581); + Main.dust[index].velocity *= 0.05f; + } + } + if ((double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item42, this.position); + } + } + if (this.type == 469) + { + ++this.localAI[1]; + if ((double) this.localAI[1] > 2.0) + { + this.alpha -= 50; + if (this.alpha < 0) + this.alpha = 0; + } + } + else if (this.type == 83 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item33, this.position); + } + else if (this.type == 408 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(4, (int) this.position.X, (int) this.position.Y, 19); + } + else if (this.type == 259 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item33, this.position); + } + else if (this.type == 110 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item11, this.position); + } + else if (this.type == 302 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item11, this.position); + } + else if (this.type == 438 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item12, this.position); + } + else if (this.type == 593 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item11, this.position); + } + else if (this.type == 592 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item12, this.position); + } + else if (this.type == 462 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + if (Main.rand.Next(2) == 0) + SoundEngine.PlaySound(SoundID.Item124, this.position); + else + SoundEngine.PlaySound(SoundID.Item125, this.position); + Vector2 vector2 = Vector2.Normalize(this.velocity); + int num = Main.rand.Next(5, 10); + for (int index38 = 0; index38 < num; ++index38) + { + int index39 = Dust.NewDust(this.Center, 0, 0, 229, Alpha: 100); + --Main.dust[index39].velocity.Y; + Main.dust[index39].velocity += vector2 * 2f; + Main.dust[index39].position -= Vector2.One * 4f; + Main.dust[index39].noGravity = true; + } + } + else if (this.type == 84 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item12, this.position); + } + else if (this.type == 389 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item12, this.position); + } + else if (this.type == 257 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item12, this.position); + } + else if (this.type == 100 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item33, this.position); + } + else if (this.type == 98 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item17, this.position); + } + else if (this.type == 184 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item17, this.position); + } + else if (this.type == 195 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item17, this.position); + } + else if (this.type == 275 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item17, this.position); + } + else if (this.type == 276 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item17, this.position); + } + else if ((this.type == 81 || this.type == 82) && (double) this.ai[1] == 0.0) + { + SoundEngine.PlaySound(SoundID.Item5, this.position); + this.ai[1] = 1f; + } + else if (this.type == 180 && (double) this.ai[1] == 0.0) + { + SoundEngine.PlaySound(SoundID.Item11, this.position); + this.ai[1] = 1f; + } + else if (this.type == 248 && (double) this.ai[1] == 0.0) + { + SoundEngine.PlaySound(SoundID.Item17, this.position); + this.ai[1] = 1f; + } + else if (this.type == 576 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item12, this.position); + } + else if (this.type == 577 && (double) this.ai[1] == 0.0) + { + this.ai[1] = 1f; + SoundEngine.PlaySound(SoundID.Item36, this.position); + } + else if (this.type == 710) + { + this.alpha -= 25; + if (this.alpha < 0) + this.alpha = 0; + if (Main.rand.Next(4) == 0) + { + if (Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(this.position, this.width, this.height, 31, Alpha: 100, Scale: 1.6f); + Main.dust[index].noGravity = true; + } + int index40 = Dust.NewDust(this.position, this.width, this.height, 6, Alpha: 100, Scale: 1.2f); + Main.dust[index40].noGravity = true; + Main.dust[index40].velocity *= 2f; + Main.dust[index40].velocity += this.velocity; + Main.dust[index40].fadeIn = (double) this.ai[1] != -1.0 ? 1.22f : 1.5f; + if (this.wet) + this.Kill(); + } + } + else if (this.type == 639) + { + if ((double) this.localAI[0] == 0.0 && (double) this.localAI[1] == 0.0) + { + this.localAI[0] = this.Center.X; + this.localAI[1] = this.Center.Y; + this.ai[0] = this.velocity.X; + this.ai[1] = this.velocity.Y; + } + this.alpha -= 25; + if (this.alpha < 0) + this.alpha = 0; + } + else if (this.type == 640) + { + this.alpha -= 25; + if (this.alpha < 0) + this.alpha = 0; + if (this.velocity == Vector2.Zero) + { + this.ai[0] = 0.0f; + bool flag = true; + for (int index = 1; index < this.oldPos.Length; ++index) + { + if (this.oldPos[index] != this.oldPos[0]) + flag = false; + } + if (flag) + { + this.Kill(); + return; + } + if (Main.rand.Next(this.extraUpdates) == 0 && (this.velocity != Vector2.Zero || Main.rand.Next((double) this.localAI[1] == 2.0 ? 2 : 6) == 0)) + { + for (int index41 = 0; index41 < 2; ++index41) + { + float num18 = this.rotation + (float) ((Main.rand.Next(2) == 1 ? -1.0 : 1.0) * 1.57079637050629); + float num19 = (float) (Main.rand.NextDouble() * 0.800000011920929 + 1.0); + Vector2 vector2 = new Vector2((float) Math.Cos((double) num18) * num19, (float) Math.Sin((double) num18) * num19); + int index42 = Dust.NewDust(this.Center, 0, 0, 229, vector2.X, vector2.Y); + Main.dust[index42].noGravity = true; + Main.dust[index42].scale = 1.2f; + } + if (Main.rand.Next(10) == 0) + { + int index = Dust.NewDust(this.Center + this.velocity.RotatedBy(1.57079637050629) * ((float) Main.rand.NextDouble() - 0.5f) * (float) this.width - Vector2.One * 4f, 8, 8, 31, Alpha: 100, Scale: 1.5f); + Main.dust[index].velocity *= 0.5f; + Main.dust[index].velocity.Y = -Math.Abs(Main.dust[index].velocity.Y); + } + } + } + else if (this.numUpdates == 1) + { + float num20 = (float) ((double) this.rotation + 1.57079637050629 + (Main.rand.Next(2) == 1 ? -1.0 : 1.0) * 1.57079637050629); + float num21 = (float) (Main.rand.NextDouble() * 0.25 + 0.25); + Vector2 vector2 = new Vector2((float) Math.Cos((double) num20) * num21, (float) Math.Sin((double) num20) * num21); + int index = Dust.NewDust(this.position, 0, 0, 229, vector2.X, vector2.Y); + Main.dust[index].noGravity = true; + Main.dust[index].scale = 1.2f; + } + } + if (this.type == 41) + { + int index43 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 31, Alpha: 100, Scale: 1.6f); + Main.dust[index43].noGravity = true; + int index44 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 2f); + Main.dust[index44].noGravity = true; + } + else if (this.type == 55) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 18, Scale: 0.9f); + Main.dust[index].noGravity = true; + } + else if (this.type == 719) + { + if (Main.rand.Next(2) == 0) + Dust.NewDustDirect(this.position - this.velocity, this.width, this.height, 147, Scale: 0.9f).noGravity = true; + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + for (int index = 0; index < 20; ++index) + { + Dust dust = Dust.NewDustDirect(this.position - this.velocity, this.width, this.height, 147, Scale: 1.3f); + dust.noGravity = true; + dust.velocity += this.velocity * 0.75f; + } + for (int index = 0; index < 10; ++index) + { + Dust dust = Dust.NewDustDirect(this.position - this.velocity, this.width, this.height, 147, Scale: 1.3f); + dust.noGravity = true; + dust.velocity *= 2f; + } + } + } + else if (this.type == 763) + { + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + for (int index = 0; index < 5; ++index) + { + Dust dust = Dust.NewDustDirect(this.position - this.velocity, this.width, this.height, 40, Scale: 1.1f); + dust.noGravity = true; + dust.velocity *= 1.5f; + } + } + } + else if (this.type == 772) + { + if (Main.rand.Next(7) == 0) + { + for (int index = 0; index < 1; ++index) + { + Dust dust = Dust.NewDustDirect(this.position - this.velocity, this.width, this.height, Main.rand.NextFromList(86, 87, 88, 89, 90, 91, 138), Scale: 0.7f); + dust.noGravity = true; + dust.velocity = this.velocity * 0.6f; + dust.fadeIn = 0.8f; + } + } + } + else if (this.type == 374) + { + if ((double) this.localAI[0] == 0.0) + { + SoundEngine.PlaySound(SoundID.Item17, this.position); + this.localAI[0] = 1f; + } + if (Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 18, Scale: 0.9f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.5f; + } + } + else if (this.type == 376) + { + if ((double) this.localAI[0] == 0.0) + SoundEngine.PlaySound(SoundID.Item20, this.position); + ++this.localAI[0]; + if ((double) this.localAI[0] > 3.0) + { + int num = 1; + if ((double) this.localAI[0] > 5.0) + num = 2; + for (int index45 = 0; index45 < num; ++index45) + { + int index46 = Dust.NewDust(new Vector2(this.position.X, this.position.Y + 2f), this.width, this.height, 6, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 100, Scale: 2f); + Main.dust[index46].noGravity = true; + Main.dust[index46].velocity.X *= 0.3f; + Main.dust[index46].velocity.Y *= 0.3f; + Main.dust[index46].noLight = true; + } + if (this.wet && !this.lavaWet) + { + this.Kill(); + return; + } + } + } + else if (this.type == 91 && Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(this.position, this.width, this.height, Main.rand.Next(2) != 0 ? 58 : 15, this.velocity.X * 0.25f, this.velocity.Y * 0.25f, 150, Scale: 0.9f); + Main.dust[index].velocity *= 0.25f; + } + if (this.type == 163 || this.type == 310) + { + if (this.alpha > 0) + this.alpha -= 25; + if (this.alpha < 0) + this.alpha = 0; + } + switch (this.type) + { + case 14: + case 20: + case 36: + case 83: + case 84: + case 89: + case 100: + case 104: + case 110: + case 158: + case 159: + case 160: + case 161: + case 180: + case 279: + case 283: + case 284: + case 285: + case 286: + case 287: + case 389: + if (this.alpha > 0) + this.alpha -= 15; + if (this.alpha < 0) + { + this.alpha = 0; + break; + } + break; + case 576: + case 577: + ++this.localAI[1]; + if ((double) this.localAI[1] > 2.0) + { + if (this.alpha > 0) + this.alpha -= 15; + if (this.alpha < 0) + { + this.alpha = 0; + break; + } + break; + } + break; + } + if (this.type == 484) + { + int index = Dust.NewDust(this.position, this.width, this.height, 78); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.1f; + Main.dust[index].scale = 0.75f; + Main.dust[index].position = (Main.dust[index].position + this.Center) / 2f; + Main.dust[index].position += this.velocity * (float) Main.rand.Next(0, 101) * 0.01f; + } + if (this.type == 242 || this.type == 302 || this.type == 438 || this.type == 462 || this.type == 592) + { + float num = (float) Math.Sqrt((double) this.velocity.X * (double) this.velocity.X + (double) this.velocity.Y * (double) this.velocity.Y); + if (this.alpha > 0) + this.alpha -= (int) (byte) ((double) num * 0.9); + if (this.alpha < 0) + this.alpha = 0; + } + if (this.type == 660) + { + DelegateMethods.v3_1 = new Vector3(0.6f, 1f, 1f) * 0.2f; + Utils.PlotTileLine(this.Center, this.Center + this.velocity * 10f, 8f, new Utils.TileActionAttempt(DelegateMethods.CastLightOpen)); + if (this.alpha > 0) + { + SoundEngine.PlaySound(SoundID.Item9, this.Center); + this.alpha = 0; + this.scale = 1.1f; + this.frame = Main.rand.Next(14); + float num = 16f; + for (int index47 = 0; (double) index47 < (double) num; ++index47) + { + Vector2 v = (Vector2.UnitX * 0.0f + -Vector2.UnitY.RotatedBy((double) index47 * (6.28318548202515 / (double) num)) * new Vector2(1f, 4f)).RotatedBy((double) this.velocity.ToRotation()); + int index48 = Dust.NewDust(this.Center, 0, 0, 180); + Main.dust[index48].scale = 1.5f; + Main.dust[index48].noGravity = true; + Main.dust[index48].position = this.Center + v; + Main.dust[index48].velocity = this.velocity * 0.0f + v.SafeNormalize(Vector2.UnitY) * 1f; + } + } + } + if (this.type == 712) + { + DelegateMethods.v3_1 = new Vector3(0.4f, 0.4f, 0.4f) * 0.7f; + Utils.PlotTileLine(this.Center, this.Center + this.velocity * 10f, 8f, new Utils.TileActionAttempt(DelegateMethods.CastLightOpen)); + if (this.alpha == (int) byte.MaxValue) + this.frame = Main.rand.Next(2) * 4; + if (++this.frameCounter >= 4) + { + this.frameCounter = 0; + ++this.frame; + if (this.frame == 4) + this.frame = 0; + if (this.frame >= 8) + this.frame = 4; + } + if (this.alpha > 0) + { + this.alpha = 0; + this.scale = 1.1f; + this.frame = Main.rand.Next(14); + float num = 4f; + for (int index49 = 0; (double) index49 < (double) num; ++index49) + { + Vector2 v = (Vector2.UnitX * 0.0f + -Vector2.UnitY.RotatedBy((double) index49 * (6.28318548202515 / (double) num)) * new Vector2(1f, 4f)).RotatedBy((double) this.velocity.ToRotation()); + int index50 = Dust.NewDust(this.Center, 0, 0, 15); + Main.dust[index50].scale = 1.7f; + Main.dust[index50].noGravity = true; + Main.dust[index50].position = this.Center + v + this.velocity.SafeNormalize(Vector2.Zero) * 50f; + Main.dust[index50].velocity = Main.dust[index50].velocity * 2f + v.SafeNormalize(Vector2.UnitY) * 0.3f + this.velocity.SafeNormalize(Vector2.Zero) * 3f; + Main.dust[index50].velocity *= 0.7f; + Main.dust[index50].position += Main.dust[index50].velocity * 5f; + } + } + } + if (this.type == 661) + { + if (this.alpha <= 0) + { + for (int index51 = 0; index51 < 3; ++index51) + { + int index52 = Dust.NewDust(this.position, this.width, this.height, 240); + Main.dust[index52].noGravity = true; + Main.dust[index52].velocity *= 0.3f; + Main.dust[index52].noLight = true; + } + } + if (this.alpha > 0) + { + this.alpha -= 55; + this.scale = 1.3f; + if (this.alpha < 0) + { + this.alpha = 0; + float num = 16f; + for (int index53 = 0; (double) index53 < (double) num; ++index53) + { + Vector2 vector2 = (Vector2.UnitX * 0.0f + -Vector2.UnitY.RotatedBy((double) index53 * (6.28318548202515 / (double) num)) * new Vector2(1f, 4f)).RotatedBy((double) this.velocity.ToRotation()); + int index54 = Dust.NewDust(this.Center, 0, 0, 62); + Main.dust[index54].scale = 1.5f; + Main.dust[index54].noLight = true; + Main.dust[index54].noGravity = true; + Main.dust[index54].position = this.Center + vector2; + Main.dust[index54].velocity = Main.dust[index54].velocity * 4f + this.velocity * 0.3f; + } + } + } + } + if (this.type == 706) + { + if (this.wet) + { + this.Kill(); + return; + } + if ((double) this.localAI[1] == 0.0) + { + float[] localAi = this.localAI; + SlotId slotId = SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_PhantomPhoenixShot, this.Center); + double num = (double) ((SlotId) ref slotId).ToFloat(); + localAi[0] = (float) num; + ++this.localAI[1]; + for (int index = 0; index < 15; ++index) + { + if (Main.rand.Next(4) != 0) + { + Dust dust = Dust.NewDustDirect(this.Center - this.Size / 4f, this.width / 2, this.height / 2, Utils.SelectRandom(Main.rand, 6, 31, 31)); + dust.noGravity = true; + dust.velocity *= 2.3f; + dust.fadeIn = 1.5f; + dust.noLight = true; + } + } + } + ActiveSound activeSound = SoundEngine.GetActiveSound(SlotId.FromFloat(this.localAI[0])); + if (activeSound != null) + { + activeSound.Position = this.Center; + } + else + { + float[] localAi = this.localAI; + SlotId invalid = (SlotId) SlotId.Invalid; + double num = (double) ((SlotId) ref invalid).ToFloat(); + localAi[0] = (float) num; + } + if (this.alpha <= 0) + { + for (int index = 0; index < 2; ++index) + { + if (Main.rand.Next(4) != 0) + { + Dust dust = Dust.NewDustDirect(this.Center - this.Size / 4f, this.width / 2, this.height / 2, Utils.SelectRandom(Main.rand, 6, 31, 31)); + dust.noGravity = true; + dust.velocity *= 2.3f; + dust.fadeIn = 1.5f; + dust.noLight = true; + } + } + Vector2 vector2_10 = (new Vector2(0.0f, (float) Math.Cos((double) this.frameCounter * 6.28318548202515 / 40.0 - 1.57079637050629)) * 16f).RotatedBy((double) this.rotation); + Vector2 vector2_11 = this.velocity.SafeNormalize(Vector2.Zero); + for (int index = 0; index < 1; ++index) + { + Dust dust1 = Dust.NewDustDirect(this.Center - this.Size / 4f, this.width / 2, this.height / 2, 6); + dust1.noGravity = true; + dust1.position = this.Center + vector2_10; + dust1.velocity *= 0.0f; + dust1.fadeIn = 1.4f; + dust1.scale = 1.15f; + dust1.noLight = true; + dust1.position += this.velocity * 1.2f; + dust1.velocity += vector2_11 * 2f; + Dust dust2 = Dust.NewDustDirect(this.Center - this.Size / 4f, this.width / 2, this.height / 2, 6); + dust2.noGravity = true; + dust2.position = this.Center + vector2_10; + dust2.velocity *= 0.0f; + dust2.fadeIn = 1.4f; + dust2.scale = 1.15f; + dust2.noLight = true; + dust2.position += this.velocity * 0.5f; + dust2.position += this.velocity * 1.2f; + dust2.velocity += vector2_11 * 2f; + } + } + if (++this.frameCounter >= 40) + this.frameCounter = 0; + this.frame = this.frameCounter / 5; + if (this.alpha > 0) + { + this.alpha -= 55; + if (this.alpha < 0) + { + this.alpha = 0; + float num = 16f; + for (int index55 = 0; (double) index55 < (double) num; ++index55) + { + Vector2 vector2 = (Vector2.UnitX * 0.0f + -Vector2.UnitY.RotatedBy((double) index55 * (6.28318548202515 / (double) num)) * new Vector2(1f, 4f)).RotatedBy((double) this.velocity.ToRotation()); + int index56 = Dust.NewDust(this.Center, 0, 0, 6); + Main.dust[index56].scale = 1.5f; + Main.dust[index56].noLight = true; + Main.dust[index56].noGravity = true; + Main.dust[index56].position = this.Center + vector2; + Main.dust[index56].velocity = Main.dust[index56].velocity * 4f + this.velocity * 0.3f; + } + } + } + DelegateMethods.v3_1 = new Vector3(1f, 0.6f, 0.2f); + Utils.PlotTileLine(this.Center, this.Center + this.velocity * 4f, 40f, new Utils.TileActionAttempt(DelegateMethods.CastLightOpen)); + } + if (this.type == 638) + { + float num22 = this.velocity.Length(); + if (this.alpha > 0) + this.alpha -= (int) (byte) ((double) num22 * 0.3); + if (this.alpha < 0) + this.alpha = 0; + Microsoft.Xna.Framework.Rectangle hitbox = this.Hitbox; + hitbox.Offset((int) this.velocity.X, (int) this.velocity.Y); + bool flag = false; + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.active && !npc.dontTakeDamage && npc.immune[this.owner] == 0 && this.localNPCImmunity[index] == 0 && npc.Hitbox.Intersects(hitbox) && !npc.friendly) + { + flag = true; + break; + } + } + if (flag) + { + int num23 = Main.rand.Next(15, 31); + for (int index57 = 0; index57 < num23; ++index57) + { + int index58 = Dust.NewDust(this.Center, 0, 0, 229, Alpha: 100, Scale: 0.8f); + Main.dust[index58].velocity *= 1.6f; + --Main.dust[index58].velocity.Y; + Main.dust[index58].velocity += this.velocity; + Main.dust[index58].noGravity = true; + } + } + } + if (this.type == 257 || this.type == 593) + { + if (this.alpha > 0) + this.alpha -= 10; + if (this.alpha < 0) + this.alpha = 0; + } + if (this.type == 876) + { + this.tileCollide = (double) this.ai[1] == 0.0; + if (this.alpha > 0) + this.alpha -= 10; + if (this.alpha < 0) + this.alpha = 0; + } + if (this.type == 88) + { + if (this.alpha > 0) + this.alpha -= 10; + if (this.alpha < 0) + this.alpha = 0; + } + if (this.type == 532) + ++this.ai[0]; + bool flag1 = true; + int type = this.type; + if (type <= 323) + { + if (type <= 161) + { + if (type <= 55) + { + if (type <= 20) + { + if (type != 5 && type != 14 && type != 20) + goto label_648; + } + else if (type != 36 && type != 38 && type != 55) + goto label_648; + } + else if (type <= 98) + { + if ((uint) (type - 83) > 1U && (uint) (type - 88) > 1U && type != 98) + goto label_648; + } + else if (type <= 104) + { + if (type != 100 && type != 104) + goto label_648; + } + else if (type != 110 && (uint) (type - 158) > 3U) + goto label_648; + } + else if (type <= 259) + { + if (type <= 242) + { + if (type != 180 && type != 184 && type != 242) + goto label_648; + } + else if (type != 248 && type != 257 && type != 259) + goto label_648; + } + else if (type <= 279) + { + if (type != 265 && type != 270 && type != 279) + goto label_648; + } + else if (type <= 299) + { + if ((uint) (type - 283) > 4U && type != 299) + goto label_648; + } + else if (type != 302 && type != 323) + goto label_648; + } + else if (type <= 485) + { + if (type <= 389) + { + if (type <= 355) + { + if (type != 325 && (uint) (type - 348) > 2U && type != 355) + goto label_648; + } + else if (type != 374 && type != 376 && type != 389) + goto label_648; + } + else if (type <= 459) + { + switch (type - 435) + { + case 0: + case 1: + case 3: + case 5: + case 7: + break; + case 2: + case 4: + case 6: + goto label_648; + default: + if (type == 449 || type == 459) + break; + goto label_648; + } + } + else if (type <= 469) + { + if (type != 462 && (uint) (type - 467) > 2U) + goto label_648; + } + else if (type != 472 && (uint) (type - 483) > 2U) + goto label_648; + } + else if (type <= 616) + { + if (type <= 585) + { + if (type != 498 && (uint) (type - 576) > 1U && type != 585) + goto label_648; + } + else if (type <= 601) + { + if ((uint) (type - 592) > 1U && type != 601) + goto label_648; + } + else if (type != 606 && type != 616) + goto label_648; + } + else if (type <= 661) + { + if ((uint) (type - 634) > 1U && (uint) (type - 638) > 1U && (uint) (type - 660) > 1U) + goto label_648; + } + else if (type <= 684) + { + if (type != 682 && type != 684) + goto label_648; + } + else + { + switch (type - 706) + { + case 0: + case 3: + case 4: + case 6: + break; + case 1: + case 2: + case 5: + goto label_648; + default: + if (type != 876) + goto label_648; + else + break; + } + } + flag1 = false; +label_648: + if (flag1) + ++this.ai[0]; + if (this.type == 270) + { + int closest = (int) Player.FindClosest(this.Center, 1, 1); + ++this.ai[1]; + if ((double) this.ai[1] < 110.0 && (double) this.ai[1] > 30.0) + { + float num = this.velocity.Length(); + Vector2 vector2 = Main.player[closest].Center - this.Center; + vector2.Normalize(); + this.velocity = (this.velocity * 24f + vector2 * num) / 25f; + this.velocity.Normalize(); + this.velocity = this.velocity * num; + } + if ((double) this.velocity.Length() < 18.0) + this.velocity = this.velocity * 1.02f; + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + SoundEngine.PlaySound(SoundID.Item8, this.position); + for (int index59 = 0; index59 < 10; ++index59) + { + int index60 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 5, this.velocity.X, this.velocity.Y, Scale: 2f); + Main.dust[index60].noGravity = true; + Main.dust[index60].velocity = this.Center - Main.dust[index60].position; + Main.dust[index60].velocity.Normalize(); + Main.dust[index60].velocity *= -5f; + Main.dust[index60].velocity += this.velocity / 2f; + } + } + } + if (this.type == 585) + { + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + SoundEngine.PlaySound(SoundID.Item8, this.position); + for (int index61 = 0; index61 < 3; ++index61) + { + int index62 = Dust.NewDust(this.position, this.width, this.height, 27, this.velocity.X, this.velocity.Y, Scale: 2f); + Main.dust[index62].noGravity = true; + Main.dust[index62].velocity = this.Center - Main.dust[index62].position; + Main.dust[index62].velocity.Normalize(); + Main.dust[index62].velocity *= -5f; + Main.dust[index62].velocity += this.velocity / 2f; + Main.dust[index62].noLight = true; + } + } + if (this.alpha > 0) + this.alpha -= 50; + if (this.alpha < 0) + this.alpha = 0; + ++this.frameCounter; + if (this.frameCounter >= 12) + this.frameCounter = 0; + this.frame = this.frameCounter / 2; + if (this.frame > 3) + this.frame = 6 - this.frame; + Vector3 vector3 = NPCID.Sets.MagicAuraColor[54].ToVector3(); + Lighting.AddLight(this.Center, vector3.X, vector3.Y, vector3.Z); + if (Main.rand.Next(3) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X + 4f, this.position.Y + 4f), this.width - 8, this.height - 8, 27, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 100, Scale: 2f); + Main.dust[index].position -= this.velocity * 2f; + Main.dust[index].noLight = true; + Main.dust[index].noGravity = true; + Main.dust[index].velocity.X *= 0.3f; + Main.dust[index].velocity.Y *= 0.3f; + } + } + if (this.type == 594) + { + int num = (int) (43.0 - (double) this.ai[1]) / 13; + if (num < 1) + num = 1; + int Type = (double) this.ai[1] < 20.0 ? 6 : 31; + for (int index63 = 0; index63 < num; ++index63) + { + int index64 = Dust.NewDust(new Vector2(this.position.X + 4f, this.position.Y + 4f), this.width - 8, this.height - 8, Type, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, Scale: 2f); + Main.dust[index64].position -= this.velocity * 2f; + Main.dust[index64].noLight = true; + Main.dust[index64].noGravity = true; + Main.dust[index64].velocity.X *= 0.3f; + Main.dust[index64].velocity.Y *= 0.3f; + if (Type == 6) + Main.dust[index64].fadeIn = Main.rand.NextFloat() * 2f; + } + ++this.ai[1]; + if ((double) this.ai[1] > (double) (43 * this.MaxUpdates)) + { + this.Kill(); + return; + } + } + if (this.type == 622) + { + int Type = 229; + if (Main.rand.Next(3) != 0) + { + int index = Dust.NewDust(new Vector2(this.position.X + 4f, this.position.Y + 4f), this.width - 8, this.height - 8, Type, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, Scale: 1.2f); + Main.dust[index].position -= this.velocity * 2f; + Main.dust[index].noLight = true; + Main.dust[index].noGravity = true; + Main.dust[index].velocity.X *= 0.3f; + Main.dust[index].velocity.Y *= 0.3f; + } + ++this.ai[1]; + if ((double) this.ai[1] > (double) (23 * this.MaxUpdates)) + { + this.Kill(); + return; + } + } + if (this.type == 587) + { + Color rgb = Main.hslToRgb(this.ai[1], 1f, 0.5f); + rgb.A = (byte) 200; + ++this.localAI[0]; + if ((double) this.localAI[0] >= 2.0) + { + if ((double) this.localAI[0] == 2.0) + { + SoundEngine.PlaySound(SoundID.Item5, this.position); + for (int index65 = 0; index65 < 4; ++index65) + { + int index66 = Dust.NewDust(this.position, this.width, this.height, 76, this.velocity.X, this.velocity.Y, newColor: rgb, Scale: 1.1f); + Main.dust[index66].noGravity = true; + Main.dust[index66].velocity = this.Center - Main.dust[index66].position; + Main.dust[index66].velocity.Normalize(); + Main.dust[index66].velocity *= -3f; + Main.dust[index66].velocity += this.velocity / 2f; + } + } + else + { + ++this.frame; + if (this.frame > 2) + this.frame = 0; + for (int index67 = 0; index67 < 1; ++index67) + { + int index68 = Dust.NewDust(new Vector2(this.position.X + 4f, this.position.Y + 4f), this.width - 8, this.height - 8, 76, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, newColor: rgb, Scale: 0.9f); + Main.dust[index68].position = this.Center; + Main.dust[index68].noGravity = true; + Main.dust[index68].velocity = this.velocity * 0.5f; + } + } + } + } + if (this.type == 349) + { + this.frame = (int) this.ai[0]; + this.velocity.Y += 0.2f; + if ((double) this.localAI[0] == 0.0 || (double) this.localAI[0] == 2.0) + { + this.scale += 0.01f; + this.alpha -= 50; + if (this.alpha <= 0) + { + this.localAI[0] = 1f; + this.alpha = 0; + } + } + else if ((double) this.localAI[0] == 1.0) + { + this.scale -= 0.01f; + this.alpha += 50; + if (this.alpha >= (int) byte.MaxValue) + { + this.localAI[0] = 2f; + this.alpha = (int) byte.MaxValue; + } + } + } + if (this.type == 348) + { + if ((double) this.localAI[1] == 0.0) + { + this.localAI[1] = 1f; + SoundEngine.PlaySound(SoundID.Item8, this.position); + } + if ((double) this.ai[0] == 0.0 || (double) this.ai[0] == 2.0) + { + this.scale += 0.01f; + this.alpha -= 50; + if (this.alpha <= 0) + { + this.ai[0] = 1f; + this.alpha = 0; + } + } + else if ((double) this.ai[0] == 1.0) + { + this.scale -= 0.01f; + this.alpha += 50; + if (this.alpha >= (int) byte.MaxValue) + { + this.ai[0] = 2f; + this.alpha = (int) byte.MaxValue; + } + } + } + if (this.type == 572) + { + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + SoundEngine.PlaySound(SoundID.Item17, this.position); + } + for (int index69 = 0; index69 < 2; ++index69) + { + int index70 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 40, this.velocity.X, this.velocity.Y, 100); + Main.dust[index70].velocity *= 0.5f; + Main.dust[index70].velocity += this.velocity; + Main.dust[index70].velocity *= 0.5f; + Main.dust[index70].noGravity = true; + Main.dust[index70].scale = 1.2f; + Main.dust[index70].position = (this.Center + this.position) / 2f; + } + } + if (this.type == 577) + Lighting.AddLight(this.Center, 0.1f, 0.3f, 0.4f); + else if (this.type == 576) + { + Lighting.AddLight(this.Center, 0.4f, 0.2f, 0.4f); + for (int index = 0; index < 5; ++index) + { + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 242, this.velocity.X, this.velocity.Y, 100)]; + dust.velocity = Vector2.Zero; + dust.position -= this.velocity / 5f * (float) index; + dust.noGravity = true; + dust.scale = 0.8f; + dust.noLight = true; + } + } + else if (this.type == 581) + { + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + SoundEngine.PlaySound(SoundID.Item17, this.Center); + } + for (int index = 0; index < 2; ++index) + { + int Type = Utils.SelectRandom(Main.rand, 229, 161, 161); + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, Type, this.velocity.X, this.velocity.Y, 100)]; + dust.velocity = dust.velocity / 4f + this.velocity / 2f; + dust.noGravity = true; + dust.scale = 1.2f; + dust.position = this.Center; + dust.noLight = true; + } + } + else if (this.type == 671) + { + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + for (int index = 0; index < 8; ++index) + { + int Type = Utils.SelectRandom(Main.rand, 27, 62); + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, Type, this.velocity.X, this.velocity.Y, 100)]; + dust.velocity = (Main.rand.NextFloatDirection() * 3.141593f).ToRotationVector2() * 2f + this.velocity.SafeNormalize(Vector2.Zero) * 3f; + dust.noGravity = true; + dust.scale = 1.5f; + dust.fadeIn = 1.2f; + dust.position = this.Center; + dust.noLight = true; + } + } + this.alpha -= 20; + if (this.alpha < 0) + this.alpha = 0; + for (int index = 0; index < 2; ++index) + { + int Type = Utils.SelectRandom(Main.rand, 27, 27, 62); + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, Type, this.velocity.X, this.velocity.Y, 100)]; + dust.velocity = dust.velocity / 4f + this.velocity / 2f; + dust.noGravity = true; + dust.scale = 1.2f; + dust.position = this.Center; + dust.noLight = true; + } + } + else if (this.type == 811) + { + if ((double) this.localAI[0] == 0.0) + { + SoundEngine.PlaySound(SoundID.Item17, this.Center); + this.localAI[0] = 1f; + for (int index = 0; index < 8; ++index) + { + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 5, this.velocity.X, this.velocity.Y, 100)]; + dust.velocity = (Main.rand.NextFloatDirection() * 3.141593f).ToRotationVector2() * 2f + this.velocity.SafeNormalize(Vector2.Zero) * 3f; + dust.scale = 1.5f; + dust.fadeIn = 1.7f; + dust.position = this.Center; + } + } + this.alpha -= 20; + if (this.alpha < 0) + this.alpha = 0; + for (int index = 0; index < 2; ++index) + { + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 5, this.velocity.X, this.velocity.Y, 100)]; + dust.velocity = dust.velocity / 4f + this.velocity / 2f; + dust.scale = 1.2f; + dust.position = this.Center + Main.rand.NextFloat() * this.velocity * 2f; + } + } + else if (this.type == 819) + { + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + for (int index = 0; index < 8; ++index) + { + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 5, this.velocity.X, this.velocity.Y, 100)]; + dust.velocity = (Main.rand.NextFloatDirection() * 3.141593f).ToRotationVector2() * 2f + this.velocity.SafeNormalize(Vector2.Zero) * 2f; + dust.scale = 0.9f; + dust.fadeIn = 1.1f; + dust.position = this.Center; + } + } + this.alpha -= 20; + if (this.alpha < 0) + this.alpha = 0; + for (int index = 1; index < 3; ++index) + { + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 5, this.velocity.X, this.velocity.Y, 100)]; + dust.velocity = this.velocity; + dust.velocity *= 0.75f; + dust.scale = 1f; + dust.position = this.Center + this.velocity * (float) index; + } + } + else if (this.type == 814) + { + if ((double) this.localAI[0] == 0.0) + { + SoundEngine.PlaySound(SoundID.Item171, this.Center); + this.localAI[0] = 1f; + for (int index = 0; index < 8; ++index) + { + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 5, this.velocity.X, this.velocity.Y, 100)]; + dust.velocity = (Main.rand.NextFloatDirection() * 3.141593f).ToRotationVector2() * 2f + this.velocity.SafeNormalize(Vector2.Zero) * 2f; + dust.scale = 0.9f; + dust.fadeIn = 1.1f; + dust.position = this.Center; + } + } + this.alpha -= 20; + if (this.alpha < 0) + this.alpha = 0; + for (int index = 0; index < 2; ++index) + { + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 5, this.velocity.X, this.velocity.Y, 100)]; + dust.velocity = dust.velocity / 4f + this.velocity / 2f; + dust.scale = 1.2f; + dust.position = this.Center + Main.rand.NextFloat() * this.velocity * 2f; + } + for (int index = 1; index < this.oldPos.Length && !(this.oldPos[index] == Vector2.Zero); ++index) + { + if (Main.rand.Next(3) == 0) + { + Dust dust = Main.dust[Dust.NewDust(this.oldPos[index], this.width, this.height, 5, this.velocity.X, this.velocity.Y, 100)]; + dust.velocity = dust.velocity / 4f + this.velocity / 2f; + dust.scale = 1.2f; + dust.position = this.oldPos[index] + this.Size / 2f + Main.rand.NextFloat() * this.velocity * 2f; + } + } + } + else if (this.type == 675) + { + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_DarkMageAttack, this.Center); + } + this.alpha -= 20; + if (this.alpha < 0) + this.alpha = 0; + } + else if (this.type == 676) + { + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + SoundEngine.PlaySound(SoundID.Item17, this.Center); + } + this.alpha -= 20; + if (this.alpha < 0) + this.alpha = 0; + for (int index = 0; index < 2; ++index) + { + if (Main.rand.Next(5) != 0) + { + int Type = Utils.SelectRandom(Main.rand, 4, 256); + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, Type, this.velocity.X, this.velocity.Y, 100)]; + dust.velocity = dust.velocity / 4f + this.velocity / 2f; + dust.scale = (float) (0.800000011920929 + (double) Main.rand.NextFloat() * 0.400000005960464); + dust.position = this.Center; + dust.position += new Vector2((float) (this.width * 2), 0.0f).RotatedBy(6.28318548202515 * (double) Main.rand.NextFloat()) * Main.rand.NextFloat(); + dust.noLight = true; + if (dust.type == 4) + dust.color = new Color(80, 170, 40, 120); + } + } + } + else if (this.type == 686) + { + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_BetsyFireballShot, this.Center); + } + if ((double) this.ai[0] >= 2.0) + { + this.alpha -= 25; + if (this.alpha < 0) + this.alpha = 0; + } + if (Main.rand.Next(4) == 0) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 55, Alpha: 200); + dust.scale *= 0.7f; + dust.velocity += this.velocity * 1f; + } + if (Main.rand.Next(3) == 0 && this.oldPos[9] != Vector2.Zero) + { + Dust dust = Dust.NewDustDirect(this.oldPos[9], this.width, this.height, 55, Alpha: 50); + dust.scale *= 0.85f; + dust.velocity += this.velocity * 0.85f; + dust.color = Color.Purple; + } + } + else if (this.type == 711) + { + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + for (int index = 0; index < 10; ++index) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 55, Alpha: 200); + dust.scale *= 0.65f; + dust.velocity *= 1.5f; + dust.velocity += this.velocity * 0.3f; + dust.fadeIn = 0.7f; + } + } + if ((double) this.ai[0] >= 2.0) + { + this.alpha -= 25; + if (this.alpha < 0) + this.alpha = 0; + } + if (Main.rand.Next(4) == 0) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 55, Alpha: 200); + dust.scale *= 0.7f; + dust.velocity += this.velocity * 1f; + } + if (Main.rand.Next(3) == 0 && this.oldPos[9] != Vector2.Zero) + { + Dust dust = Dust.NewDustDirect(this.oldPos[9], this.width, this.height, 55, Alpha: 50); + dust.scale *= 0.85f; + dust.velocity += this.velocity * 0.85f; + dust.color = Color.Purple; + } + } + if (this.type == 299) + { + if ((double) this.localAI[0] == 6.0) + { + SoundEngine.PlaySound(SoundID.Item8, this.position); + for (int index71 = 0; index71 < 40; ++index71) + { + int index72 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 181, Alpha: 100); + Main.dust[index72].velocity *= 3f; + Main.dust[index72].velocity += this.velocity * 0.75f; + Main.dust[index72].scale *= 1.2f; + Main.dust[index72].noGravity = true; + } + } + ++this.localAI[0]; + if ((double) this.localAI[0] > 6.0) + { + for (int index73 = 0; index73 < 3; ++index73) + { + int index74 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 181, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 100); + Main.dust[index74].velocity *= 0.6f; + Main.dust[index74].scale *= 1.4f; + Main.dust[index74].noGravity = true; + } + } + } + else if (this.type == 270 || this.type == 837) + { + if (this.type == 270) + this.alpha = 0; + if (this.alpha > 0) + this.alpha -= 50; + if (this.alpha < 0) + this.alpha = 0; + ++this.frame; + if (this.frame > 2) + this.frame = 0; + if (this.type == 270) + { + for (int index75 = 0; index75 < 2; ++index75) + { + int index76 = Dust.NewDust(new Vector2(this.position.X + 4f, this.position.Y + 4f), this.width - 8, this.height - 8, 5, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 100, Scale: 1.5f); + Main.dust[index76].position -= this.velocity; + Main.dust[index76].noGravity = true; + Main.dust[index76].velocity.X *= 0.3f; + Main.dust[index76].velocity.Y *= 0.3f; + } + } + else + { + for (int index77 = 0; index77 < 2; ++index77) + { + int index78 = Dust.NewDust(new Vector2(this.position.X + 4f, this.position.Y + 4f), this.width - 8, this.height - 8, 6, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 100, Scale: 2f); + Main.dust[index78].position -= this.velocity * 2f; + Main.dust[index78].noGravity = true; + Main.dust[index78].velocity.X *= 0.3f; + Main.dust[index78].velocity.Y *= 0.3f; + } + } + } + if (this.type == 259) + { + if (this.alpha > 0) + this.alpha -= 10; + if (this.alpha < 0) + this.alpha = 0; + } + if (this.type == 265) + { + if (this.alpha > 0) + this.alpha -= 50; + if (this.alpha < 0) + this.alpha = 0; + if (this.alpha == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 163, this.velocity.X, this.velocity.Y, 100, Scale: 1.2f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].velocity -= this.velocity * 0.4f; + } + } + if (this.type == 355) + { + if (this.alpha > 0) + this.alpha -= 50; + if (this.alpha < 0) + this.alpha = 0; + if (this.alpha == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 205, this.velocity.X, this.velocity.Y, 100, Scale: 1.2f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.3f; + Main.dust[index].velocity -= this.velocity * 0.4f; + } + } + if (this.type == 357) + { + if (this.alpha < 170) + { + for (int index79 = 0; index79 < 10; ++index79) + { + float x = this.position.X - this.velocity.X / 10f * (float) index79; + float y = this.position.Y - this.velocity.Y / 10f * (float) index79; + int index80 = Dust.NewDust(new Vector2(x, y), 1, 1, 206); + Main.dust[index80].alpha = this.alpha; + Main.dust[index80].position.X = x; + Main.dust[index80].position.Y = y; + Main.dust[index80].velocity *= 0.0f; + Main.dust[index80].noGravity = true; + } + } + if (this.alpha > 0) + this.alpha -= 25; + if (this.alpha < 0) + this.alpha = 0; + } + else if (this.type == 207 || this.type == 837) + { + if (this.type == 207 && this.alpha < 170) + { + for (int index81 = 0; index81 < 10; ++index81) + { + float x = this.position.X - this.velocity.X / 10f * (float) index81; + float y = this.position.Y - this.velocity.Y / 10f * (float) index81; + int index82 = Dust.NewDust(new Vector2(x, y), 1, 1, 75); + Main.dust[index82].alpha = this.alpha; + Main.dust[index82].position.X = x; + Main.dust[index82].position.Y = y; + Main.dust[index82].velocity *= 0.0f; + Main.dust[index82].noGravity = true; + } + } + float num24 = (float) Math.Sqrt((double) this.velocity.X * (double) this.velocity.X + (double) this.velocity.Y * (double) this.velocity.Y); + float num25 = this.localAI[0]; + if ((double) num25 == 0.0) + { + this.localAI[0] = num24; + num25 = num24; + } + if (this.alpha > 0) + this.alpha -= 25; + if (this.alpha < 0) + this.alpha = 0; + float num26 = this.position.X; + float num27 = this.position.Y; + float num28 = 300f; + bool flag2 = false; + int num29 = 0; + if ((double) this.ai[1] == 0.0) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].CanBeChasedBy((object) this) && ((double) this.ai[1] == 0.0 || (double) this.ai[1] == (double) (index + 1))) + { + float num30 = Main.npc[index].position.X + (float) (Main.npc[index].width / 2); + float num31 = Main.npc[index].position.Y + (float) (Main.npc[index].height / 2); + float num32 = Math.Abs(this.position.X + (float) (this.width / 2) - num30) + Math.Abs(this.position.Y + (float) (this.height / 2) - num31); + if ((double) num32 < (double) num28 && Collision.CanHit(new Vector2(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2)), 1, 1, Main.npc[index].position, Main.npc[index].width, Main.npc[index].height)) + { + num28 = num32; + num26 = num30; + num27 = num31; + flag2 = true; + num29 = index; + } + } + } + if (flag2) + this.ai[1] = (float) (num29 + 1); + flag2 = false; + } + if ((double) this.ai[1] > 0.0) + { + int index = (int) ((double) this.ai[1] - 1.0); + if (Main.npc[index].active && Main.npc[index].CanBeChasedBy((object) this, true) && !Main.npc[index].dontTakeDamage) + { + float num33 = Main.npc[index].position.X + (float) (Main.npc[index].width / 2); + float num34 = Main.npc[index].position.Y + (float) (Main.npc[index].height / 2); + if ((double) Math.Abs(this.position.X + (float) (this.width / 2) - num33) + (double) Math.Abs(this.position.Y + (float) (this.height / 2) - num34) < 1000.0) + { + flag2 = true; + num26 = Main.npc[index].position.X + (float) (Main.npc[index].width / 2); + num27 = Main.npc[index].position.Y + (float) (Main.npc[index].height / 2); + } + } + else + this.ai[1] = 0.0f; + } + if (!this.friendly) + flag2 = false; + if (flag2) + { + double num35 = (double) num25; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num36 = num26 - vector2.X; + float num37 = num27 - vector2.Y; + double num38 = Math.Sqrt((double) num36 * (double) num36 + (double) num37 * (double) num37); + float num39 = (float) (num35 / num38); + float num40 = num36 * num39; + float num41 = num37 * num39; + int num42 = 8; + if (this.type == 837) + num42 = 32; + this.velocity.X = (this.velocity.X * (float) (num42 - 1) + num40) / (float) num42; + this.velocity.Y = (this.velocity.Y * (float) (num42 - 1) + num41) / (float) num42; + } + } + else if (this.type == 81 || this.type == 91) + { + if ((double) this.ai[0] >= 20.0) + { + this.ai[0] = 20f; + this.velocity.Y += 0.07f; + } + } + else if (this.type == 174 || this.type == 605 || this.type == 920 || this.type == 921 || this.type == 926 || this.type == 937) + { + if ((double) this.ai[0] >= 5.0) + { + this.ai[0] = 5f; + this.velocity.Y += 0.15f; + } + } + else if (this.type == 337) + { + if ((double) this.position.Y > (double) Main.player[this.owner].position.Y - 300.0) + this.tileCollide = true; + if ((double) this.position.Y < Main.worldSurface * 16.0) + this.tileCollide = true; + this.frame = (int) this.ai[1]; + if (Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 197); + Main.dust[index].velocity *= 0.5f; + Main.dust[index].noGravity = true; + } + } + else if (this.type == 645) + { + if ((double) this.ai[1] != -1.0 && (double) this.position.Y > (double) this.ai[1]) + this.tileCollide = true; + if (this.position.HasNaNs()) + { + this.Kill(); + return; + } + int num43 = WorldGen.SolidTile(Framing.GetTileSafely((int) this.position.X / 16, (int) this.position.Y / 16)) ? 1 : 0; + Dust dust = Main.dust[Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 229)]; + dust.position = this.Center; + dust.velocity = Vector2.Zero; + dust.noGravity = true; + if (num43 != 0) + dust.noLight = true; + if ((double) this.ai[1] == -1.0) + { + ++this.ai[0]; + this.velocity = Vector2.Zero; + this.tileCollide = false; + this.penetrate = -1; + this.position = this.Center; + this.width = this.height = 140; + this.Center = this.position; + this.alpha -= 10; + if (this.alpha < 0) + this.alpha = 0; + if (++this.frameCounter >= this.MaxUpdates * 3) + { + this.frameCounter = 0; + ++this.frame; + } + if ((double) this.ai[0] < (double) (Main.projFrames[this.type] * this.MaxUpdates * 3)) + return; + this.Kill(); + return; + } + this.alpha = (int) byte.MaxValue; + if (this.numUpdates == 0) + { + int num44 = -1; + float num45 = 60f; + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.CanBeChasedBy((object) this)) + { + float num46 = this.Distance(npc.Center); + if ((double) num46 < (double) num45 && Collision.CanHitLine(this.Center, 0, 0, npc.Center, 0, 0)) + { + num45 = num46; + num44 = index; + } + } + } + if (num44 != -1) + { + this.ai[0] = 0.0f; + this.ai[1] = -1f; + this.netUpdate = true; + return; + } + } + } + else if (this.type >= 424 && this.type <= 426) + { + if ((double) this.position.Y > (double) Main.player[this.owner].position.Y - 300.0) + this.tileCollide = true; + if ((double) this.position.Y < Main.worldSurface * 16.0) + this.tileCollide = true; + this.scale = this.ai[1]; + this.rotation += this.velocity.X * 2f; + Vector2 vector2 = this.Center + Vector2.Normalize(this.velocity) * 10f; + Dust dust3 = Main.dust[Dust.NewDust(this.position, this.width, this.height, 6)]; + dust3.position = vector2; + dust3.velocity = this.velocity.RotatedBy(1.57079637050629) * 0.33f + this.velocity / 4f; + dust3.position += this.velocity.RotatedBy(1.57079637050629); + dust3.fadeIn = 0.5f; + dust3.noGravity = true; + Dust dust4 = Main.dust[Dust.NewDust(this.position, this.width, this.height, 6)]; + dust4.position = vector2; + dust4.velocity = this.velocity.RotatedBy(-1.57079637050629) * 0.33f + this.velocity / 4f; + dust4.position += this.velocity.RotatedBy(-1.57079637050629); + dust4.fadeIn = 0.5f; + dust4.noGravity = true; + for (int index83 = 0; index83 < 1; ++index83) + { + int index84 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6); + Main.dust[index84].velocity *= 0.5f; + Main.dust[index84].scale *= 1.3f; + Main.dust[index84].fadeIn = 1f; + Main.dust[index84].noGravity = true; + } + } + else if (this.type == 344) + { + if (WorldGen.SolidTile((int) this.position.X / 16, (int) ((double) this.position.Y + (double) this.velocity.Y) / 16 + 1) || WorldGen.SolidTile((int) ((double) this.position.X + (double) this.width) / 16, (int) ((double) this.position.Y + (double) this.velocity.Y) / 16 + 1)) + { + this.Kill(); + return; + } + ++this.localAI[1]; + if ((double) this.localAI[1] > 5.0) + { + this.alpha -= 50; + if (this.alpha < 0) + this.alpha = 0; + } + this.frame = (int) this.ai[1]; + if ((double) this.localAI[1] > 20.0) + { + this.localAI[1] = 20f; + this.velocity.Y += 0.15f; + } + this.rotation += Main.windSpeedCurrent * 0.2f; + this.velocity.X += Main.windSpeedCurrent * 0.1f; + } + else if (this.type == 336 || this.type == 345) + { + if (this.type == 345 && (double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + SoundEngine.PlaySound(SoundID.Item1, this.position); + } + if ((double) this.ai[0] >= 50.0) + { + this.ai[0] = 50f; + this.velocity.Y += 0.5f; + } + } + else if (this.type == 246) + { + this.alpha -= 20; + if (this.alpha < 0) + this.alpha = 0; + if ((double) this.ai[0] >= 60.0) + { + this.ai[0] = 60f; + this.velocity.Y += 0.15f; + } + } + else if (this.type == 311) + { + if (this.alpha > 0) + this.alpha -= 50; + if (this.alpha < 0) + this.alpha = 0; + if ((double) this.ai[0] >= 30.0) + { + this.ai[0] = 30f; + if ((double) this.ai[1] == 0.0) + this.ai[1] = 1f; + this.velocity.Y += 0.5f; + } + } + else if (this.type == 312) + { + if ((double) this.ai[0] >= 5.0) + this.alpha = 0; + if ((double) this.ai[0] >= 20.0) + { + this.ai[0] = 30f; + this.velocity.Y += 0.5f; + } + Lighting.AddLight(this.Center, 0.6f, 0.4f, 0.3f); + } + else if (this.type != 239 && this.type != 264) + { + if (this.type == 176) + { + if ((double) this.ai[0] >= 15.0) + { + this.ai[0] = 15f; + this.velocity.Y += 0.05f; + } + } + else if (this.type == 275 || this.type == 276) + { + if (this.alpha > 0) + this.alpha -= 30; + if (this.alpha < 0) + this.alpha = 0; + if ((double) this.ai[0] >= 35.0) + { + this.ai[0] = 35f; + this.velocity.Y += 0.025f; + } + if (Main.expertMode) + { + float num47 = 18f; + int closest = (int) Player.FindClosest(this.Center, 1, 1); + Vector2 vector2 = Main.player[closest].Center - this.Center; + vector2.Normalize(); + vector2 *= num47; + int num48 = 70; + this.velocity = (this.velocity * (float) (num48 - 1) + vector2) / (float) num48; + if ((double) this.velocity.Length() < 14.0) + { + this.velocity.Normalize(); + this.velocity = this.velocity * 14f; + } + this.tileCollide = false; + if (this.timeLeft > 180) + this.timeLeft = 180; + } + } + else if (this.type == 172) + { + if ((double) this.ai[0] >= 17.0) + { + this.ai[0] = 17f; + this.velocity.Y += 0.085f; + } + } + else if (this.type == 117) + { + if ((double) this.ai[0] >= 35.0) + { + this.ai[0] = 35f; + this.velocity.Y += 0.06f; + } + } + else if (this.type == 120) + { + int index = Dust.NewDust(new Vector2(this.position.X - this.velocity.X, this.position.Y - this.velocity.Y), this.width, this.height, 67, this.velocity.X, this.velocity.Y, 100, Scale: 1.2f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.3f; + if ((double) this.ai[0] >= 30.0) + { + this.ai[0] = 30f; + this.velocity.Y += 0.05f; + } + } + else if (this.type == 195) + { + if ((double) this.ai[0] >= 20.0) + { + this.ai[0] = 20f; + this.velocity.Y += 0.075f; + this.tileCollide = true; + } + else + this.tileCollide = false; + } + else if (this.type == 267 || this.type == 477 || this.type == 478 || this.type == 479) + { + ++this.localAI[0]; + if ((double) this.localAI[0] > 3.0) + this.alpha = 0; + if ((double) this.ai[0] >= 20.0) + { + this.ai[0] = 20f; + if (this.type != 477) + this.velocity.Y += 0.075f; + } + if (this.type == 479 && Main.myPlayer == this.owner) + { + if ((double) this.ai[1] >= 0.0) + this.penetrate = -1; + else if (this.penetrate < 0) + this.penetrate = 1; + if ((double) this.ai[1] >= 0.0) + ++this.ai[1]; + if ((double) this.ai[1] > (double) Main.rand.Next(5, 30)) + { + this.ai[1] = -1000f; + float num49 = this.velocity.Length(); + Vector2 velocity = this.velocity; + velocity.Normalize(); + int num50 = Main.rand.Next(2, 4); + if (Main.rand.Next(4) == 0) + ++num50; + for (int index = 0; index < num50; ++index) + { + Vector2 vector2_12 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + vector2_12.Normalize(); + Vector2 vector2_13 = vector2_12 + velocity * 2f; + vector2_13.Normalize(); + vector2_12 = vector2_13 * num49; + Projectile.NewProjectile(this.Center.X, this.Center.Y, vector2_12.X, vector2_12.Y, this.type, this.damage, this.knockBack, this.owner, ai1: -1000f); + } + } + } + if (this.type == 478 && Main.myPlayer == this.owner) + { + ++this.ai[1]; + if ((double) this.ai[1] > (double) Main.rand.Next(5, 20)) + { + if (this.timeLeft > 40) + this.timeLeft -= 20; + this.ai[1] = 0.0f; + Projectile.NewProjectile(this.Center.X, this.Center.Y, 0.0f, 0.0f, 480, (int) ((double) this.damage * 0.8), this.knockBack * 0.5f, this.owner); + } + } + } + else if (this.type == 408) + { + if ((double) this.ai[0] >= 45.0) + { + this.ai[0] = 45f; + this.velocity.Y += 0.05f; + } + } + else if (this.type == 616) + { + if (this.alpha < 170) + { + float num = 3f; + for (int index85 = 0; (double) index85 < (double) num; ++index85) + { + int index86 = Dust.NewDust(this.position, 1, 1, 229); + Main.dust[index86].position = this.Center - this.velocity / num * (float) index85; + Main.dust[index86].velocity *= 0.0f; + Main.dust[index86].noGravity = true; + Main.dust[index86].alpha = 200; + Main.dust[index86].scale = 0.5f; + } + } + float num51 = (float) Math.Sqrt((double) this.velocity.X * (double) this.velocity.X + (double) this.velocity.Y * (double) this.velocity.Y); + float num52 = this.localAI[0]; + if ((double) num52 == 0.0) + { + this.localAI[0] = num51; + num52 = num51; + } + if (this.alpha > 0) + this.alpha -= 25; + if (this.alpha < 0) + this.alpha = 0; + float num53 = this.position.X; + float num54 = this.position.Y; + float num55 = 800f; + bool flag3 = false; + int num56 = 0; + ++this.ai[0]; + if ((double) this.ai[0] > 20.0) + { + --this.ai[0]; + if ((double) this.ai[1] == 0.0) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].CanBeChasedBy((object) this) && ((double) this.ai[1] == 0.0 || (double) this.ai[1] == (double) (index + 1))) + { + float num57 = Main.npc[index].position.X + (float) (Main.npc[index].width / 2); + float num58 = Main.npc[index].position.Y + (float) (Main.npc[index].height / 2); + float num59 = Math.Abs(this.position.X + (float) (this.width / 2) - num57) + Math.Abs(this.position.Y + (float) (this.height / 2) - num58); + if ((double) num59 < (double) num55 && Collision.CanHit(new Vector2(this.position.X + (float) (this.width / 2), this.position.Y + (float) (this.height / 2)), 1, 1, Main.npc[index].position, Main.npc[index].width, Main.npc[index].height)) + { + num55 = num59; + num53 = num57; + num54 = num58; + flag3 = true; + num56 = index; + } + } + } + if (flag3) + this.ai[1] = (float) (num56 + 1); + flag3 = false; + } + if ((double) this.ai[1] != 0.0) + { + int index = (int) ((double) this.ai[1] - 1.0); + if (Main.npc[index].active && Main.npc[index].CanBeChasedBy((object) this, true)) + { + float num60 = Main.npc[index].position.X + (float) (Main.npc[index].width / 2); + float num61 = Main.npc[index].position.Y + (float) (Main.npc[index].height / 2); + if ((double) Math.Abs(this.position.X + (float) (this.width / 2) - num60) + (double) Math.Abs(this.position.Y + (float) (this.height / 2) - num61) < 1000.0) + { + flag3 = true; + num53 = Main.npc[index].position.X + (float) (Main.npc[index].width / 2); + num54 = Main.npc[index].position.Y + (float) (Main.npc[index].height / 2); + } + } + } + if (!this.friendly) + flag3 = false; + if (flag3) + { + double num62 = (double) num52; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num63 = num53 - vector2.X; + float num64 = num54 - vector2.Y; + double num65 = Math.Sqrt((double) num63 * (double) num63 + (double) num64 * (double) num64); + float num66 = (float) (num62 / num65); + float num67 = num63 * num66; + float num68 = num64 * num66; + int num69 = 8; + this.velocity.X = (this.velocity.X * (float) (num69 - 1) + num67) / (float) num69; + this.velocity.Y = (this.velocity.Y * (float) (num69 - 1) + num68) / (float) num69; + } + } + } + else if (this.type == 507 || this.type == 508 || this.type == 662 || this.type == 680 || this.type == 685) + { + if ((double) this.ai[0] > 45.0) + { + this.velocity.X *= 0.98f; + this.velocity.Y += 0.3f; + } + } + else if (this.type == 495) + { + int index = Dust.NewDust(new Vector2(this.position.X - this.velocity.X, this.position.Y - this.velocity.Y), this.width, this.height, 27, this.velocity.X, this.velocity.Y, 100, Scale: 1.2f); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.3f; + if ((double) this.ai[0] >= 30.0) + { + this.ai[0] = 30f; + this.velocity.Y += 0.04f; + } + } + else if (this.type == 498) + { + if ((double) this.localAI[0] == 0.0) + { + ++this.localAI[0]; + SoundEngine.PlaySound(SoundID.Item17, this.position); + } + ++this.ai[0]; + if ((double) this.ai[0] >= 50.0) + { + this.velocity.X *= 0.98f; + this.velocity.Y += 0.15f; + this.rotation += (float) this.direction * 0.5f; + } + else + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.57f; + } + else if (this.type == 437) + { + if ((double) this.ai[0] >= 12.0) + { + if ((double) this.ai[0] >= 20.0) + this.Kill(); + this.alpha += 30; + } + } + else if (this.type != 442 && this.type != 634 && this.type != 635 && this.type != 675) + { + if (this.type == 686 || this.type == 711) + { + if ((double) this.ai[0] >= 10.0) + this.velocity.Y += 0.1f; + if ((double) this.ai[0] >= 20.0) + this.velocity.Y += 0.1f; + if ((double) this.ai[0] > 20.0) + this.ai[0] = 20f; + this.velocity.X *= 0.99f; + if ((double) this.velocity.Y > 32.0) + this.velocity.Y = 32f; + } + else if (this.type == 639) + { + if (this.timeLeft <= this.MaxUpdates * 45 - 14) + this.velocity.Y += 0.1f; + } + else if (this.type == 710) + { + if ((double) this.ai[0] >= 0.0) + { + ++this.ai[0]; + if ((double) this.ai[0] >= 20.0) + { + this.velocity.Y += 0.2f; + if ((double) this.velocity.Y > 0.0) + this.velocity.X *= 0.98f; + if ((double) this.velocity.Y > 12.0) + this.velocity.Y = 12f; + } + } + } + else if ((double) this.ai[0] >= 15.0) + { + this.ai[0] = 15f; + this.velocity.Y += 0.1f; + } + } + } + if (this.type == 921 || this.type == 926 || this.type == 937) + this.rotation += (float) (((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y)) * 0.0500000007450581); + else if (this.type == 248) + { + if ((double) this.velocity.X < 0.0) + this.rotation -= (float) (((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y)) * 0.0500000007450581); + else + this.rotation += (float) (((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y)) * 0.0500000007450581); + } + else if (this.type == 270 || this.type == 585 || this.type == 601 || this.type == 706 || this.type == 837) + { + this.spriteDirection = this.direction; + this.rotation = this.direction >= 0 ? (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) : (float) Math.Atan2(-(double) this.velocity.Y, -(double) this.velocity.X); + } + else if (this.type == 311) + { + if ((double) this.ai[1] != 0.0) + this.rotation += (float) ((double) this.velocity.X * 0.100000001490116 + (double) Main.rand.Next(-10, 11) * 0.025000000372529); + else + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.57f; + } + else if (this.type == 312) + this.rotation += this.velocity.X * 0.02f; + else if (this.type == 675) + this.rotation += this.velocity.X * 0.03f; + else if (this.type != 676) + { + if (this.type == 408) + { + this.rotation = this.velocity.ToRotation(); + if (this.direction == -1) + this.rotation += 3.141593f; + } + else if (this.type == 435 || this.type == 459 || this.type == 682 || this.type == 709) + { + this.rotation = this.velocity.ToRotation(); + if (this.direction == -1) + this.rotation += 3.141593f; + } + else if (this.type == 660) + this.rotation = this.velocity.ToRotation() + 0.7853982f; + else if (this.type == 662 || this.type == 685) + this.rotation = (float) ((double) this.velocity.ToRotation() - 3.14159274101257 - 0.785398185253143); + else if (this.type == 680 || this.type == 684 || this.type == 686 || this.type == 711 || this.type == 712) + this.rotation = this.velocity.ToRotation() + 1.570796f; + else if (this.type == 436) + { + this.rotation = this.velocity.ToRotation(); + this.rotation += 3.141593f; + if (this.direction == -1) + this.rotation += 3.141593f; + } + else if (this.type == 469) + { + if ((double) this.velocity.X > 0.0) + { + this.spriteDirection = -1; + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.57f; + } + else + { + this.spriteDirection = 1; + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.57f; + } + } + else if (this.type == 477) + { + if ((double) this.localAI[1] < 5.0) + { + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.57f; + ++this.localAI[1]; + } + else + this.rotation = (float) (((double) this.rotation * 2.0 + Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.57000005245209) / 3.0); + } + else if (this.type == 532) + this.rotation += (float) (0.200000002980232 + (double) Math.Abs(this.velocity.X) * 0.100000001490116); + else if (this.type == 483) + this.rotation += this.velocity.X * 0.05f; + else if (this.type == 772) + this.rotation += (float) ((double) Math.Sign(this.velocity.X) * ((double) Math.Abs(this.velocity.X) + (double) Math.Abs(this.velocity.Y)) * 0.0500000007450581); + else if (this.type == 485) + { + this.velocity = (this.velocity * 39f + new Vector2(this.ai[0], this.ai[1])) / 40f; + int index = Dust.NewDust(this.position, this.width, this.height, 6); + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 0.2f; + Main.dust[index].position = (Main.dust[index].position + this.Center) / 2f; + ++this.frameCounter; + if (this.frameCounter >= 2) + { + this.frameCounter = 0; + ++this.frame; + if (this.frame >= 5) + this.frame = 0; + } + if ((double) this.velocity.X < 0.0) + { + this.spriteDirection = -1; + this.rotation = (float) Math.Atan2(-(double) this.velocity.Y, -(double) this.velocity.X); + } + else + { + this.spriteDirection = 1; + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X); + } + } + else if (this.type == 640) + { + if (this.velocity != Vector2.Zero) + this.rotation = this.velocity.ToRotation() + 1.570796f; + } + else if (this.type == 325) + this.rotation = this.velocity.ToRotation() - 1.570796f; + else if (this.type != 344 && this.type != 498) + this.rotation = (float) Math.Atan2((double) this.velocity.Y, (double) this.velocity.X) + 1.57f; + } + if ((double) this.velocity.Y <= 16.0) + return; + this.velocity.Y = 16f; + } + + private void AI_010() + { + if (this.type == 31 && (double) this.ai[0] != 2.0) + { + if (Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 32, SpeedY: (this.velocity.Y / 2f)); + Main.dust[index].velocity.X *= 0.4f; + } + } + else if (this.type == 39) + { + if (Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 38, SpeedY: (this.velocity.Y / 2f)); + Main.dust[index].velocity.X *= 0.4f; + } + } + else if (this.type >= 411 && this.type <= 414) + { + if (Main.rand.Next(3) == 0) + { + int Type = 9; + if (this.type == 412 || this.type == 414) + Type = 11; + if (this.type == 413) + Type = 19; + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, Type, SpeedY: (this.velocity.Y / 2f)); + Main.dust[index].noGravity = true; + Main.dust[index].velocity -= this.velocity * 0.5f; + } + } + else if (this.type == 40) + { + if (Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 36, SpeedY: (this.velocity.Y / 2f)); + Main.dust[index].velocity *= 0.4f; + } + } + else if (this.type == 42 || this.type == 31) + { + if (Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 32); + Main.dust[index].velocity.X *= 0.4f; + } + } + else if (this.type == 56 || this.type == 65) + { + if (Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 14); + Main.dust[index].velocity.X *= 0.4f; + } + } + else if (this.type == 67 || this.type == 68) + { + if (Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 51); + Main.dust[index].velocity.X *= 0.4f; + } + } + else if (this.type == 71) + { + if (Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 53); + Main.dust[index].velocity.X *= 0.4f; + } + } + else if (this.type == 179) + { + if (Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 149); + Main.dust[index].velocity.X *= 0.4f; + } + } + else if (this.type == 241 || this.type == 354) + { + if (Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 36); + Main.dust[index].velocity.X *= 0.4f; + } + } + else if (this.type >= 736 && this.type <= 738) + { + if (Main.rand.Next(40) == 0) + { + int index = Dust.NewDust(this.position, this.width, this.height, this.type - 736 + 275); + if (index >= 0) + Main.dust[index].velocity = Main.dust[index].velocity * 0.5f + this.velocity * 0.5f; + } + } + else if (this.type != 109 && Main.rand.Next(20) == 0) + Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 0); + if (this.type >= 736 && this.type <= 738) + { + if ((double) this.localAI[0] == 0.0) + { + this.frame = Main.rand.Next(3); + this.scale = (float) (1.0 - (double) Main.rand.Next(30) * 0.00999999977648258); + } + ++this.localAI[0]; + } + this.tileCollide = true; + this.localAI[1] = 0.0f; + if (Main.myPlayer == this.owner && (double) this.ai[0] == 0.0) + { + this.tileCollide = false; + if (Main.player[this.owner].channel && (this.type < 736 || this.type > 738) && this.type != 40) + { + this.localAI[1] = -1f; + float num1 = 12f; + Vector2 vector2 = new Vector2(this.position.X + (float) this.width * 0.5f, this.position.Y + (float) this.height * 0.5f); + float num2 = (float) Main.mouseX + Main.screenPosition.X - vector2.X; + float num3 = (float) Main.mouseY + Main.screenPosition.Y - vector2.Y; + if ((double) Main.player[this.owner].gravDir == -1.0) + num3 = Main.screenPosition.Y + (float) Main.screenHeight - (float) Main.mouseY - vector2.Y; + float num4 = (float) Math.Sqrt((double) num2 * (double) num2 + (double) num3 * (double) num3); + float num5 = (float) Math.Sqrt((double) num2 * (double) num2 + (double) num3 * (double) num3); + if ((double) num5 > (double) num1) + { + float num6 = num1 / num5; + float num7 = num2 * num6; + float num8 = num3 * num6; + if ((double) num7 != (double) this.velocity.X || (double) num8 != (double) this.velocity.Y) + this.netUpdate = true; + this.velocity.X = num7; + this.velocity.Y = num8; + } + else + { + if ((double) num2 != (double) this.velocity.X || (double) num3 != (double) this.velocity.Y) + this.netUpdate = true; + this.velocity.X = num2; + this.velocity.Y = num3; + } + } + else + { + this.ai[0] = 1f; + this.netUpdate = true; + } + } + if ((double) this.ai[0] == 1.0 && this.type != 109) + { + if (this.type == 42 || this.type == 65 || this.type == 68 || this.type == 354) + { + ++this.ai[1]; + if ((double) this.ai[1] >= 60.0) + { + this.ai[1] = 60f; + this.velocity.Y += 0.2f; + } + } + else + this.velocity.Y += 0.41f; + } + else if ((double) this.ai[0] == 2.0 && this.type != 109) + { + this.velocity.Y += 0.2f; + if ((double) this.velocity.X < -0.04) + this.velocity.X += 0.04f; + else if ((double) this.velocity.X > 0.04) + this.velocity.X -= 0.04f; + else + this.velocity.X = 0.0f; + } + if (this.owner == Main.myPlayer) + { + for (int index1 = (int) ((double) this.position.X / 16.0); index1 <= (int) (((double) this.position.X + (double) this.width) / 16.0); ++index1) + { + for (int index2 = (int) ((double) this.position.Y / 16.0); index2 <= (int) (((double) this.position.Y + (double) this.height) / 16.0); ++index2) + { + if (WorldGen.InWorld(index1, index2) && Main.tile[index1, index2].active()) + { + if (Main.tile[index1, index2].type >= (ushort) 185 && Main.tile[index1, index2].type <= (ushort) 187 || Main.tile[index1, index2].type == (ushort) 165 || Main.tile[index1, index2].type == (ushort) 12 || Main.tile[index1, index2].type == (ushort) 105 || Main.tile[index1, index2].type == (ushort) 178) + WorldGen.KillTile(index1, index2); + else if (Main.tile[index1, index2].topSlope()) + Main.tile[index1, index2].slope((byte) 0); + } + } + } + } + if (this.type >= 736 && this.type <= 738) + { + if (this.frame == 0) + this.rotation -= 0.1f; + else if (this.frame == 1) + this.rotation += 0.1f; + else + this.rotation += 0.15f; + if ((double) this.velocity.Y <= 10.0) + return; + this.velocity.Y = 10f; + } + else + { + this.rotation += 0.1f; + if ((double) this.velocity.Y <= 10.0) + return; + this.velocity.Y = 10f; + } + } + + private void AI_026() + { + // ISSUE: unable to decompile the method. + } + + private void AI_062() + { + if (this.type == 373) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].hornetMinion = false; + if (Main.player[this.owner].hornetMinion) + this.timeLeft = 2; + } + if (this.type == 375) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].impMinion = false; + if (Main.player[this.owner].impMinion) + this.timeLeft = 2; + } + if (this.type == 407) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].sharknadoMinion = false; + if (Main.player[this.owner].sharknadoMinion) + this.timeLeft = 2; + } + if (this.type == 423) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].UFOMinion = false; + if (Main.player[this.owner].UFOMinion) + this.timeLeft = 2; + } + if (this.type == 613) + { + if (Main.player[this.owner].dead) + Main.player[this.owner].stardustMinion = false; + if (Main.player[this.owner].stardustMinion) + this.timeLeft = 2; + Lighting.AddLight(this.Center, 0.2f, 0.6f, 0.7f); + if ((double) this.localAI[1] > 0.0) + --this.localAI[1]; + } + if (this.type == 423) + { + if ((double) this.ai[0] == 2.0) + { + --this.ai[1]; + this.tileCollide = false; + if ((double) this.ai[1] > 3.0) + { + int index = Dust.NewDust(this.Center, 0, 0, 220 + Main.rand.Next(2), this.velocity.X, this.velocity.Y, 100); + Main.dust[index].scale = (float) (0.5 + Main.rand.NextDouble() * 0.300000011920929); + Main.dust[index].velocity /= 2.5f; + Main.dust[index].noGravity = true; + Main.dust[index].noLight = true; + Main.dust[index].frame.Y = 80; + } + if ((double) this.ai[1] != 0.0) + return; + this.ai[1] = 30f; + this.ai[0] = 0.0f; + this.velocity = this.velocity / 5f; + this.velocity.Y = 0.0f; + this.extraUpdates = 0; + this.numUpdates = 0; + this.netUpdate = true; + this.extraUpdates = 0; + this.numUpdates = 0; + } + if (this.extraUpdates > 1) + this.extraUpdates = 0; + if (this.numUpdates > 1) + this.numUpdates = 0; + } + if (this.type == 613) + { + if ((double) this.ai[0] == 2.0) + { + --this.ai[1]; + this.tileCollide = false; + if ((double) this.ai[1] > 3.0) + { + if (this.numUpdates < 20) + { + for (int index = 0; index < 3; ++index) + { + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 229)]; + dust.noGravity = true; + dust.position = this.Center; + dust.velocity *= 3f; + dust.velocity += this.velocity * 3f; + dust.fadeIn = 1f; + } + } + float num1 = (float) (2.0 - (double) this.numUpdates / 30.0); + if ((double) this.scale > 0.0) + { + float num2 = 2f; + for (int index = 0; (double) index < (double) num2; ++index) + { + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 229)]; + dust.noGravity = true; + dust.position = this.Center + Vector2.UnitY.RotatedBy((double) this.numUpdates * 0.104719758033752 + (double) this.whoAmI * 0.785398185253143 + 1.57079637050629) * (float) (this.height / 2) - this.velocity * ((float) index / num2); + dust.velocity = this.velocity / 3f; + dust.fadeIn = num1 / 2f; + dust.scale = num1; + } + } + } + if ((double) this.ai[1] != 0.0) + return; + this.ai[1] = 30f; + this.ai[0] = 0.0f; + this.velocity = this.velocity / 5f; + this.velocity.Y = 0.0f; + this.extraUpdates = 0; + this.numUpdates = 0; + this.netUpdate = true; + float num = 15f; + for (int index = 0; (double) index < (double) num; ++index) + { + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 229)]; + dust.noGravity = true; + dust.position = this.Center - this.velocity * 5f; + dust.velocity *= 3f; + dust.velocity += this.velocity * 3f; + dust.fadeIn = 1f; + if (Main.rand.Next(3) != 0) + { + dust.fadeIn = 2f; + dust.scale = 2f; + dust.velocity /= 8f; + } + } + for (int index = 0; (double) index < (double) num; ++index) + { + Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 229)]; + dust.noGravity = true; + dust.position = this.Center; + dust.velocity *= 3f; + dust.velocity += this.velocity * 3f; + dust.fadeIn = 1f; + if (Main.rand.Next(3) != 0) + { + dust.fadeIn = 2f; + dust.scale = 2f; + dust.velocity /= 8f; + } + } + this.extraUpdates = 0; + this.numUpdates = 0; + } + if (this.extraUpdates > 1) + this.extraUpdates = 0; + if (this.numUpdates > 1) + this.numUpdates = 0; + } + if (this.type == 423 && (double) this.localAI[0] > 0.0) + --this.localAI[0]; + if (this.type == 613 && (double) this.localAI[0] > 0.0) + --this.localAI[0]; + float num3 = 0.05f; + float width = (float) this.width; + if (this.type == 407) + { + num3 = 0.1f; + width *= 2f; + } + for (int index = 0; index < 1000; ++index) + { + if (index != this.whoAmI && Main.projectile[index].active && Main.projectile[index].owner == this.owner && Main.projectile[index].type == this.type && (double) Math.Abs(this.position.X - Main.projectile[index].position.X) + (double) Math.Abs(this.position.Y - Main.projectile[index].position.Y) < (double) width) + { + if ((double) this.position.X < (double) Main.projectile[index].position.X) + this.velocity.X -= num3; + else + this.velocity.X += num3; + if ((double) this.position.Y < (double) Main.projectile[index].position.Y) + this.velocity.Y -= num3; + else + this.velocity.Y += num3; + } + } + Vector2 vector2_1 = this.position; + float num4 = 400f; + if (this.type == 423) + num4 = 300f; + if (this.type == 613) + num4 = 300f; + bool flag = false; + int num5 = -1; + this.tileCollide = true; + if (this.type == 407) + { + this.tileCollide = false; + if (Collision.SolidCollision(this.position, this.width, this.height)) + { + this.alpha += 20; + if (this.alpha > 150) + this.alpha = 150; + } + else + { + this.alpha -= 50; + if (this.alpha < 60) + this.alpha = 60; + } + } + if (this.type == 407 || this.type == 613 || this.type == 423) + { + Vector2 center = Main.player[this.owner].Center; + Vector2 vector2_2 = new Vector2(0.5f); + if (this.type == 423) + vector2_2.Y = 0.0f; + NPC minionAttackTargetNpc = this.OwnerMinionAttackTargetNPC; + if (minionAttackTargetNpc != null && minionAttackTargetNpc.CanBeChasedBy((object) this)) + { + Vector2 vector2_3 = minionAttackTargetNpc.position + minionAttackTargetNpc.Size * vector2_2; + float num6 = Vector2.Distance(vector2_3, center); + if (((double) Vector2.Distance(center, vector2_1) > (double) num6 && (double) num6 < (double) num4 || !flag) && Collision.CanHitLine(this.position, this.width, this.height, minionAttackTargetNpc.position, minionAttackTargetNpc.width, minionAttackTargetNpc.height)) + { + num4 = num6; + vector2_1 = vector2_3; + flag = true; + num5 = minionAttackTargetNpc.whoAmI; + } + } + if (!flag) + { + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.CanBeChasedBy((object) this)) + { + Vector2 vector2_4 = npc.position + npc.Size * vector2_2; + float num7 = Vector2.Distance(vector2_4, center); + if (((double) Vector2.Distance(center, vector2_1) > (double) num7 && (double) num7 < (double) num4 || !flag) && Collision.CanHitLine(this.position, this.width, this.height, npc.position, npc.width, npc.height)) + { + num4 = num7; + vector2_1 = vector2_4; + flag = true; + num5 = index; + } + } + } + } + } + else + { + NPC minionAttackTargetNpc = this.OwnerMinionAttackTargetNPC; + if (minionAttackTargetNpc != null && minionAttackTargetNpc.CanBeChasedBy((object) this)) + { + float num8 = Vector2.Distance(minionAttackTargetNpc.Center, this.Center); + if (((double) Vector2.Distance(this.Center, vector2_1) > (double) num8 && (double) num8 < (double) num4 || !flag) && Collision.CanHitLine(this.position, this.width, this.height, minionAttackTargetNpc.position, minionAttackTargetNpc.width, minionAttackTargetNpc.height)) + { + num4 = num8; + vector2_1 = minionAttackTargetNpc.Center; + flag = true; + num5 = minionAttackTargetNpc.whoAmI; + } + } + if (!flag) + { + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.CanBeChasedBy((object) this)) + { + float num9 = Vector2.Distance(npc.Center, this.Center); + if (((double) Vector2.Distance(this.Center, vector2_1) > (double) num9 && (double) num9 < (double) num4 || !flag) && Collision.CanHitLine(this.position, this.width, this.height, npc.position, npc.width, npc.height)) + { + num4 = num9; + vector2_1 = npc.Center; + flag = true; + num5 = index; + } + } + } + } + } + int num10 = 500; + if (flag) + num10 = 1000; + if (flag && this.type == 423) + num10 = 1200; + if (flag && this.type == 613) + num10 = 1350; + Player player = Main.player[this.owner]; + if ((double) Vector2.Distance(player.Center, this.Center) > (double) num10) + { + this.ai[0] = 1f; + this.netUpdate = true; + } + if ((double) this.ai[0] == 1.0) + this.tileCollide = false; + if (flag && (double) this.ai[0] == 0.0) + { + Vector2 vector2_5 = vector2_1 - this.Center; + float num11 = vector2_5.Length(); + vector2_5.Normalize(); + if (this.type == 423) + { + Vector2 vector2_6 = vector2_1 - Vector2.UnitY * 80f; + int index = (int) vector2_6.Y / 16; + if (index < 0) + index = 0; + Tile tile1 = Main.tile[(int) vector2_6.X / 16, index]; + if (tile1 != null && tile1.active() && Main.tileSolid[(int) tile1.type] && !Main.tileSolidTop[(int) tile1.type]) + { + vector2_6 += Vector2.UnitY * 16f; + Tile tile2 = Main.tile[(int) vector2_6.X / 16, (int) vector2_6.Y / 16]; + if (tile2 != null && tile2.active() && Main.tileSolid[(int) tile2.type] && !Main.tileSolidTop[(int) tile2.type]) + vector2_6 += Vector2.UnitY * 16f; + } + vector2_5 = vector2_6 - this.Center; + num11 = vector2_5.Length(); + vector2_5.Normalize(); + if ((double) num11 > 300.0 && (double) num11 <= 800.0 && (double) this.localAI[0] == 0.0) + { + this.ai[0] = 2f; + this.ai[1] = (float) (int) ((double) num11 / 10.0); + this.extraUpdates = (int) this.ai[1]; + this.velocity = vector2_5 * 10f; + this.localAI[0] = 60f; + return; + } + } + if (this.type == 613) + { + Vector2 vector2_7 = vector2_1; + Vector2 vector2_8 = this.Center - vector2_7; + if (vector2_8 == Vector2.Zero) + vector2_8 = -Vector2.UnitY; + vector2_8.Normalize(); + Vector2 vector2_9 = vector2_7 + vector2_8 * 60f; + int index = (int) vector2_9.Y / 16; + if (index < 0) + index = 0; + Tile tile3 = Main.tile[(int) vector2_9.X / 16, index]; + if (tile3 != null && tile3.active() && Main.tileSolid[(int) tile3.type] && !Main.tileSolidTop[(int) tile3.type]) + { + vector2_9 += Vector2.UnitY * 16f; + Tile tile4 = Main.tile[(int) vector2_9.X / 16, (int) vector2_9.Y / 16]; + if (tile4 != null && tile4.active() && Main.tileSolid[(int) tile4.type] && !Main.tileSolidTop[(int) tile4.type]) + vector2_9 += Vector2.UnitY * 16f; + } + vector2_5 = vector2_9 - this.Center; + num11 = vector2_5.Length(); + vector2_5.Normalize(); + if ((double) num11 > 400.0 && (double) num11 <= 800.0 && (double) this.localAI[0] == 0.0) + { + this.ai[0] = 2f; + this.ai[1] = (float) (int) ((double) num11 / 10.0); + this.extraUpdates = (int) this.ai[1]; + this.velocity = vector2_5 * 10f; + this.localAI[0] = 60f; + return; + } + } + if (this.type == 407) + { + if ((double) num11 > 400.0) + { + float num12 = 2f; + vector2_5 *= num12; + this.velocity = (this.velocity * 20f + vector2_5) / 21f; + } + else + this.velocity = this.velocity * 0.96f; + } + if ((double) num11 > 200.0) + { + float num13 = 6f; + Vector2 vector2_10 = vector2_5 * num13; + this.velocity.X = (float) (((double) this.velocity.X * 40.0 + (double) vector2_10.X) / 41.0); + this.velocity.Y = (float) (((double) this.velocity.Y * 40.0 + (double) vector2_10.Y) / 41.0); + } + else if (this.type == 423 || this.type == 613) + { + if ((double) num11 > 70.0 && (double) num11 < 130.0) + { + float num14 = 7f; + if ((double) num11 < 100.0) + num14 = -3f; + Vector2 vector2_11 = vector2_5 * num14; + this.velocity = (this.velocity * 20f + vector2_11) / 21f; + if ((double) Math.Abs(vector2_11.X) > (double) Math.Abs(vector2_11.Y)) + this.velocity.X = (float) (((double) this.velocity.X * 10.0 + (double) vector2_11.X) / 11.0); + } + else + this.velocity = this.velocity * 0.97f; + } + else if (this.type == 375) + { + if ((double) num11 < 150.0) + { + float num15 = 4f; + Vector2 vector2_12 = vector2_5 * -num15; + this.velocity.X = (float) (((double) this.velocity.X * 40.0 + (double) vector2_12.X) / 41.0); + this.velocity.Y = (float) (((double) this.velocity.Y * 40.0 + (double) vector2_12.Y) / 41.0); + } + else + this.velocity = this.velocity * 0.97f; + } + else if ((double) this.velocity.Y > -1.0) + this.velocity.Y -= 0.1f; + } + else + { + if (!Collision.CanHitLine(this.Center, 1, 1, Main.player[this.owner].Center, 1, 1)) + this.ai[0] = 1f; + float num16 = 6f; + if ((double) this.ai[0] == 1.0) + num16 = 15f; + if (this.type == 407) + num16 = 9f; + Vector2 center = this.Center; + Vector2 vector2_13 = player.Center - center + new Vector2(0.0f, -60f); + if (this.type == 407) + vector2_13 += new Vector2(0.0f, 40f); + if (this.type == 375) + { + this.ai[1] = 3600f; + this.netUpdate = true; + vector2_13 = player.Center - center; + int num17 = 1; + for (int index = 0; index < this.whoAmI; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == this.owner && Main.projectile[index].type == this.type) + ++num17; + } + vector2_13.X -= (float) (10 * Main.player[this.owner].direction); + vector2_13.X -= (float) (num17 * 40 * Main.player[this.owner].direction); + vector2_13.Y -= 10f; + } + float num18 = vector2_13.Length(); + if ((double) num18 > 200.0 && (double) num16 < 9.0) + num16 = 9f; + if (this.type == 375) + num16 = (float) (int) ((double) num16 * 0.75); + if ((double) num18 < 100.0 && (double) this.ai[0] == 1.0 && !Collision.SolidCollision(this.position, this.width, this.height)) + { + this.ai[0] = 0.0f; + this.netUpdate = true; + } + if ((double) num18 > 2000.0) + { + this.position.X = Main.player[this.owner].Center.X - (float) (this.width / 2); + this.position.Y = Main.player[this.owner].Center.Y - (float) (this.width / 2); + } + if (this.type == 375) + { + if ((double) num18 > 10.0) + { + vector2_13.Normalize(); + if ((double) num18 < 50.0) + num16 /= 2f; + this.velocity = (this.velocity * 20f + vector2_13 * num16) / 21f; + } + else + { + this.direction = Main.player[this.owner].direction; + this.velocity = this.velocity * 0.9f; + } + } + else if (this.type == 407) + { + if ((double) Math.Abs(vector2_13.X) > 40.0 || (double) Math.Abs(vector2_13.Y) > 10.0) + { + vector2_13.Normalize(); + this.velocity = (this.velocity * 20f + vector2_13 * num16 * new Vector2(1.25f, 0.65f)) / 21f; + } + else + { + if ((double) this.velocity.X == 0.0 && (double) this.velocity.Y == 0.0) + { + this.velocity.X = -0.15f; + this.velocity.Y = -0.05f; + } + this.velocity = this.velocity * 1.01f; + } + } + else if ((double) num18 > 70.0) + { + vector2_13.Normalize(); + this.velocity = (this.velocity * 20f + vector2_13 * num16) / 21f; + } + else + { + if ((double) this.velocity.X == 0.0 && (double) this.velocity.Y == 0.0) + { + this.velocity.X = -0.15f; + this.velocity.Y = -0.05f; + } + this.velocity = this.velocity * 1.01f; + } + } + this.rotation = this.velocity.X * 0.05f; + ++this.frameCounter; + if (this.type == 373) + { + if (this.frameCounter > 1) + { + ++this.frame; + this.frameCounter = 0; + } + if (this.frame > 2) + this.frame = 0; + } + if (this.type == 375) + { + if (this.frameCounter >= 16) + this.frameCounter = 0; + this.frame = this.frameCounter / 4; + if ((double) this.ai[1] > 0.0 && (double) this.ai[1] < 16.0) + this.frame += 4; + if (Main.rand.Next(6) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 6, Alpha: 100, Scale: 2f); + Main.dust[index].velocity *= 0.3f; + Main.dust[index].noGravity = true; + Main.dust[index].noLight = true; + } + } + if (this.type == 407) + { + int num19 = 2; + if (this.frameCounter >= 6 * num19) + this.frameCounter = 0; + this.frame = this.frameCounter / num19; + if (Main.rand.Next(5) == 0) + { + int index = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, 217, Alpha: 100, Scale: 2f); + Main.dust[index].velocity *= 0.3f; + Main.dust[index].noGravity = true; + Main.dust[index].noLight = true; + } + } + if (this.type == 423 || this.type == 613) + { + int num20 = 3; + if (this.frameCounter >= 4 * num20) + this.frameCounter = 0; + this.frame = this.frameCounter / num20; + } + if ((double) this.velocity.X > 0.0) + this.spriteDirection = this.direction = -1; + else if ((double) this.velocity.X < 0.0) + this.spriteDirection = this.direction = 1; + if (this.type == 373) + { + if ((double) this.ai[1] > 0.0) + this.ai[1] += (float) Main.rand.Next(1, 4); + if ((double) this.ai[1] > 90.0) + { + this.ai[1] = 0.0f; + this.netUpdate = true; + } + } + else if (this.type == 375) + { + if ((double) this.ai[1] > 0.0) + { + ++this.ai[1]; + if (Main.rand.Next(3) == 0) + ++this.ai[1]; + } + if ((double) this.ai[1] > 90.0) + { + this.ai[1] = 0.0f; + this.netUpdate = true; + } + } + else if (this.type == 407) + { + if ((double) this.ai[1] > 0.0) + { + ++this.ai[1]; + if (Main.rand.Next(3) != 0) + ++this.ai[1]; + } + if ((double) this.ai[1] > 60.0) + { + this.ai[1] = 0.0f; + this.netUpdate = true; + } + } + else if (this.type == 423) + { + if ((double) this.ai[1] > 0.0) + { + ++this.ai[1]; + if (Main.rand.Next(3) != 0) + ++this.ai[1]; + } + if ((double) this.ai[1] > 30.0) + { + this.ai[1] = 0.0f; + this.netUpdate = true; + } + } + else if (this.type == 613) + { + if ((double) this.ai[1] > 0.0) + { + ++this.ai[1]; + if (Main.rand.Next(3) != 0) + ++this.ai[1]; + } + if ((double) this.ai[1] > 60.0) + { + this.ai[1] = 0.0f; + this.netUpdate = true; + } + } + if ((double) this.ai[0] != 0.0) + return; + float num21 = 0.0f; + int Type = 0; + if (this.type == 373) + { + num21 = 10f; + Type = 374; + } + else if (this.type == 375) + { + num21 = 11f; + Type = 376; + } + else if (this.type == 407) + { + num21 = 14f; + Type = 408; + } + else if (this.type == 423) + { + num21 = 4f; + Type = 433; + } + else if (this.type == 613) + { + num21 = 14f; + Type = 614; + } + if (!flag) + return; + if (this.type == 375) + { + if ((double) (vector2_1 - this.Center).X > 0.0) + this.spriteDirection = this.direction = -1; + else if ((double) (vector2_1 - this.Center).X < 0.0) + this.spriteDirection = this.direction = 1; + } + if (this.type == 407 && Collision.SolidCollision(this.position, this.width, this.height)) + return; + if (this.type == 423) + { + if ((double) Math.Abs((vector2_1 - this.Center).ToRotation() - 1.570796f) > 0.785398185253143) + { + this.velocity = this.velocity + Vector2.Normalize(vector2_1 - this.Center - Vector2.UnitY * 80f); + } + else + { + if ((double) (vector2_1 - this.Center).Length() > 400.0 || (double) this.ai[1] != 0.0) + return; + ++this.ai[1]; + if (Main.myPlayer != this.owner) + return; + Vector2 vector2_14 = vector2_1 - this.Center; + vector2_14.Normalize(); + Vector2 vector2_15 = vector2_14 * num21; + Projectile.NewProjectile(this.Center.X, this.Center.Y, vector2_15.X, vector2_15.Y, Type, this.damage, 0.0f, Main.myPlayer); + this.netUpdate = true; + } + } + else if ((double) this.ai[1] == 0.0 && this.type == 613) + { + if ((double) (vector2_1 - this.Center).Length() > 500.0 || (double) this.ai[1] != 0.0) + return; + ++this.ai[1]; + if (Main.myPlayer == this.owner) + { + Vector2 vector2_16 = vector2_1 - this.Center; + vector2_16.Normalize(); + Vector2 vector2_17 = vector2_16 * num21; + int index = Projectile.NewProjectile(this.Center.X, this.Center.Y, vector2_17.X, vector2_17.Y, Type, this.damage, 0.0f, Main.myPlayer, ai1: ((float) num5)); + Main.projectile[index].timeLeft = 300; + Main.projectile[index].netUpdate = true; + this.velocity = this.velocity - vector2_17 / 3f; + this.netUpdate = true; + } + for (int index1 = 0; index1 < 5; ++index1) + { + int num22 = this.width / 4; + Vector2 vector2_18 = ((float) Main.rand.NextDouble() * 6.283185f).ToRotationVector2() * (float) Main.rand.Next(24, 41) / 8f; + int index2 = Dust.NewDust(this.Center - Vector2.One * (float) num22, num22 * 2, num22 * 2, 88); + Dust dust = Main.dust[index2]; + Vector2 vector2_19 = Vector2.Normalize(dust.position - this.Center); + dust.position = this.Center + vector2_19 * (float) num22 * this.scale - new Vector2(4f); + dust.velocity = index1 >= 30 ? 2f * vector2_19 * (float) Main.rand.Next(45, 91) / 10f : vector2_19 * dust.velocity.Length() * 2f; + dust.noGravity = true; + dust.scale = 0.7f + Main.rand.NextFloat(); + } + } + else + { + if ((double) this.ai[1] != 0.0) + return; + Vector2 vector2_20 = vector2_1 - this.Center; + ++this.ai[1]; + if (Main.myPlayer != this.owner) + return; + vector2_20.Normalize(); + Vector2 vector2_21 = vector2_20 * num21; + int index = Projectile.NewProjectile(this.Center.X, this.Center.Y, vector2_21.X, vector2_21.Y, Type, this.damage, 0.0f, Main.myPlayer); + Main.projectile[index].timeLeft = 300; + Main.projectile[index].netUpdate = true; + this.netUpdate = true; + } + } + + private void AI_075() + { + Player player = Main.player[this.owner]; + float num1 = 1.570796f; + Vector2 vector2_1 = player.RotatedRelativePoint(player.MountedCenter); + int frames = 2; + float num2 = 0.0f; + if (this.type == 439) + { + ++this.ai[0]; + int num3 = 0; + if ((double) this.ai[0] >= 40.0) + ++num3; + if ((double) this.ai[0] >= 80.0) + ++num3; + if ((double) this.ai[0] >= 120.0) + ++num3; + int num4 = 24; + int num5 = 6; + ++this.ai[1]; + bool flag = false; + if ((double) this.ai[1] >= (double) (num4 - num5 * num3)) + { + this.ai[1] = 0.0f; + flag = true; + } + this.frameCounter += 1 + num3; + if (this.frameCounter >= 4) + { + this.frameCounter = 0; + ++this.frame; + if (this.frame >= 6) + this.frame = 0; + } + if (this.soundDelay <= 0) + { + this.soundDelay = num4 - num5 * num3; + if ((double) this.ai[0] != 1.0) + SoundEngine.PlaySound(SoundID.Item91, this.position); + } + if ((double) this.ai[1] == 1.0 && (double) this.ai[0] != 1.0) + { + Vector2 vector2_2 = this.Center + (Vector2.UnitX * 24f).RotatedBy((double) this.rotation - 1.57079637050629); + for (int index1 = 0; index1 < 2; ++index1) + { + int index2 = Dust.NewDust(vector2_2 - Vector2.One * 8f, 16, 16, 135, this.velocity.X / 2f, this.velocity.Y / 2f, 100); + Main.dust[index2].velocity *= 0.66f; + Main.dust[index2].noGravity = true; + Main.dust[index2].scale = 1.4f; + } + } + if (flag && Main.myPlayer == this.owner) + { + if ((!player.channel || !player.CheckMana(player.inventory[player.selectedItem].mana, true) || player.noItems ? 0 : (!player.CCed ? 1 : 0)) != 0) + { + float num6 = player.inventory[player.selectedItem].shootSpeed * this.scale; + Vector2 vector2_3 = vector2_1; + Vector2 vector2_4 = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY) - vector2_3; + if ((double) player.gravDir == -1.0) + vector2_4.Y = (float) (Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector2_3.Y; + Vector2 vector2_5 = Vector2.Normalize(vector2_4); + if (float.IsNaN(vector2_5.X) || float.IsNaN(vector2_5.Y)) + vector2_5 = -Vector2.UnitY; + Vector2 vector2_6 = vector2_5 * num6; + if ((double) vector2_6.X != (double) this.velocity.X || (double) vector2_6.Y != (double) this.velocity.Y) + this.netUpdate = true; + this.velocity = vector2_6; + int Type = 440; + float num7 = 14f; + int num8 = 7; + for (int index = 0; index < 2; ++index) + { + Vector2 vector2_7 = this.Center + new Vector2((float) Main.rand.Next(-num8, num8 + 1), (float) Main.rand.Next(-num8, num8 + 1)); + Vector2 vector2_8 = (Vector2.Normalize(this.velocity) * num7).RotatedBy(Main.rand.NextDouble() * 0.196349546313286 - 0.0981747731566429); + if (float.IsNaN(vector2_8.X) || float.IsNaN(vector2_8.Y)) + vector2_8 = -Vector2.UnitY; + Projectile.NewProjectile(vector2_7.X, vector2_7.Y, vector2_8.X, vector2_8.Y, Type, this.damage, this.knockBack, this.owner); + } + } + else + this.Kill(); + } + } + if (this.type == 445) + { + if (this.soundDelay <= 0) + { + SoundEngine.PlaySound(SoundID.Item132, this.position); + this.soundDelay = 23; + } + ++this.localAI[0]; + if ((double) this.localAI[0] >= 60.0) + this.localAI[0] = 0.0f; + if ((double) Vector2.Distance(vector2_1, this.Center) >= 5.0) + { + float num9 = this.localAI[0] / 60f; + if ((double) num9 > 0.5) + num9 = 1f - num9; + Vector3 vector3 = Vector3.Lerp(new Vector3(0.0f, 1f, 0.7f), new Vector3(0.0f, 0.7f, 1f), (float) (1.0 - (double) num9 * 2.0)) * 0.5f; + if ((double) Vector2.Distance(vector2_1, this.Center) >= 30.0) + { + Vector2 vector2_9 = this.Center - vector2_1; + vector2_9.Normalize(); + Vector2 vector2_10 = vector2_9 * (Vector2.Distance(vector2_1, this.Center) - 30f); + DelegateMethods.v3_1 = vector3 * 0.8f; + Utils.PlotTileLine(this.Center - vector2_10, this.Center, 8f, new Utils.TileActionAttempt(DelegateMethods.CastLightOpen)); + } + Lighting.AddLight((int) this.Center.X / 16, (int) this.Center.Y / 16, vector3.X, vector3.Y, vector3.Z); + } + if (Main.myPlayer == this.owner) + { + if ((double) this.localAI[1] > 0.0) + --this.localAI[1]; + if (!player.channel || player.noItems || player.CCed) + this.Kill(); + else if ((double) this.localAI[1] == 0.0) + { + Vector2 vector2_11 = vector2_1; + Vector2 vector2_12 = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY) - vector2_11; + if ((double) player.gravDir == -1.0) + vector2_12.Y = (float) (Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector2_11.Y; + if (Main.tile[Player.tileTargetX, Player.tileTargetY].active()) + { + vector2_12 = new Vector2((float) Player.tileTargetX, (float) Player.tileTargetY) * 16f + Vector2.One * 8f - vector2_11; + this.localAI[1] = 2f; + } + Vector2 vector2_13 = Vector2.Lerp(vector2_12, this.velocity, 0.7f); + if (float.IsNaN(vector2_13.X) || float.IsNaN(vector2_13.Y)) + vector2_13 = -Vector2.UnitY; + float num10 = 30f; + if ((double) vector2_13.Length() < (double) num10) + vector2_13 = Vector2.Normalize(vector2_13) * num10; + int tileBoost = player.inventory[player.selectedItem].tileBoost; + int num11 = -Player.tileRangeX - tileBoost + 1; + int num12 = Player.tileRangeX + tileBoost - 1; + int num13 = -Player.tileRangeY - tileBoost; + int num14 = Player.tileRangeY + tileBoost - 1; + int num15 = 12; + bool flag = false; + if ((double) vector2_13.X < (double) (num11 * 16 - num15)) + flag = true; + if ((double) vector2_13.Y < (double) (num13 * 16 - num15)) + flag = true; + if ((double) vector2_13.X > (double) (num12 * 16 + num15)) + flag = true; + if ((double) vector2_13.Y > (double) (num14 * 16 + num15)) + flag = true; + if (flag) + { + Vector2 vector2_14 = Vector2.Normalize(vector2_13); + float num16 = -1f; + if ((double) vector2_14.X < 0.0 && ((double) (num11 * 16 - num15) / (double) vector2_14.X < (double) num16 || (double) num16 == -1.0)) + num16 = (float) (num11 * 16 - num15) / vector2_14.X; + if ((double) vector2_14.X > 0.0 && ((double) (num12 * 16 + num15) / (double) vector2_14.X < (double) num16 || (double) num16 == -1.0)) + num16 = (float) (num12 * 16 + num15) / vector2_14.X; + if ((double) vector2_14.Y < 0.0 && ((double) (num13 * 16 - num15) / (double) vector2_14.Y < (double) num16 || (double) num16 == -1.0)) + num16 = (float) (num13 * 16 - num15) / vector2_14.Y; + if ((double) vector2_14.Y > 0.0 && ((double) (num14 * 16 + num15) / (double) vector2_14.Y < (double) num16 || (double) num16 == -1.0)) + num16 = (float) (num14 * 16 + num15) / vector2_14.Y; + vector2_13 = vector2_14 * num16; + } + if ((double) vector2_13.X != (double) this.velocity.X || (double) vector2_13.Y != (double) this.velocity.Y) + this.netUpdate = true; + this.velocity = vector2_13; + } + } + } + if (this.type == 460) + { + ++this.ai[0]; + int num17 = 0; + if ((double) this.ai[0] >= 80.0) + ++num17; + if ((double) this.ai[0] >= 180.0) + ++num17; + bool flag1 = false; + double num18 = (double) this.ai[0]; + if ((double) this.ai[0] == 80.0 || (double) this.ai[0] == 180.0 || (double) this.ai[0] > 180.0 && (double) this.ai[0] % 20.0 == 0.0) + flag1 = true; + bool flag2 = (double) this.ai[0] >= 180.0; + int num19 = 5; + if (!flag2) + ++this.ai[1]; + bool flag3 = false; + if ((double) this.ai[0] == 1.0) + flag3 = true; + if (flag2 && (double) this.ai[0] % 20.0 == 0.0) + flag3 = true; + if ((double) this.ai[1] >= (double) num19 && !flag2) + { + this.ai[1] = 0.0f; + flag3 = true; + if (!flag2) + { + float num20 = player.inventory[player.selectedItem].shootSpeed * this.scale; + Vector2 vector2_15 = vector2_1; + Vector2 vector2_16 = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY) - vector2_15; + if ((double) player.gravDir == -1.0) + vector2_16.Y = (float) (Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector2_15.Y; + Vector2 vector2_17 = Vector2.Normalize(vector2_16); + if (float.IsNaN(vector2_17.X) || float.IsNaN(vector2_17.Y)) + vector2_17 = -Vector2.UnitY; + Vector2 vector2_18 = vector2_17 * num20; + if ((double) vector2_18.X != (double) this.velocity.X || (double) vector2_18.Y != (double) this.velocity.Y) + this.netUpdate = true; + this.velocity = vector2_18; + } + } + if (this.soundDelay <= 0 && !flag2) + { + this.soundDelay = num19 - num17; + this.soundDelay *= 2; + if ((double) this.ai[0] != 1.0) + SoundEngine.PlaySound(SoundID.Item15, this.position); + } + if ((double) this.ai[0] > 10.0 && !flag2) + { + Vector2 vector2_19 = this.Center + (Vector2.UnitX * 18f).RotatedBy((double) this.rotation - 1.57079637050629); + for (int index3 = 0; index3 < num17 + 1; ++index3) + { + int Type = 226; + float num21 = 0.4f; + if (index3 % 2 == 1) + { + Type = 226; + num21 = 0.65f; + } + Vector2 vector2_20 = vector2_19 + ((float) Main.rand.NextDouble() * 6.283185f).ToRotationVector2() * (12f - (float) (num17 * 2)); + int index4 = Dust.NewDust(vector2_20 - Vector2.One * 8f, 16, 16, Type, this.velocity.X / 2f, this.velocity.Y / 2f); + Main.dust[index4].velocity = Vector2.Normalize(vector2_19 - vector2_20) * 1.5f * (float) (10.0 - (double) num17 * 2.0) / 10f; + Main.dust[index4].noGravity = true; + Main.dust[index4].scale = num21; + Main.dust[index4].customData = (object) player; + } + } + if (flag2) + { + Vector2 vector2_21 = this.Center + (Vector2.UnitX * 14f).RotatedBy((double) this.rotation - 1.57079637050629); + for (int index5 = 0; index5 < 2; ++index5) + { + int Type = 226; + float num22 = 0.35f; + if (index5 % 2 == 1) + { + Type = 226; + num22 = 0.45f; + } + float num23 = Main.rand.NextFloatDirection(); + Vector2 vector2_22 = vector2_21 + ((float) ((double) this.rotation + (double) num23 * 0.785398185253143 * 0.800000011920929 - 1.57079637050629)).ToRotationVector2() * 6f; + int num24 = 24; + int index6 = Dust.NewDust(vector2_22 - Vector2.One * (float) (num24 / 2), num24, num24, Type, this.velocity.X / 2f, this.velocity.Y / 2f); + Main.dust[index6].velocity = (vector2_22 - vector2_21).SafeNormalize(Vector2.Zero) * MathHelper.Lerp(1.5f, 9f, Utils.GetLerpValue(1f, 0.0f, Math.Abs(num23), true)); + Main.dust[index6].noGravity = true; + Main.dust[index6].scale = num22; + Main.dust[index6].customData = (object) player; + Main.dust[index6].fadeIn = 0.5f; + } + } + if (flag3 && Main.myPlayer == this.owner) + { + bool flag4 = !flag1 || player.CheckMana(player.inventory[player.selectedItem].mana, true); + if ((!(player.channel & flag4) || player.noItems ? 0 : (!player.CCed ? 1 : 0)) != 0) + { + if ((double) this.ai[0] == 180.0) + { + Vector2 center = this.Center; + Vector2 vector2_23 = Vector2.Normalize(this.velocity); + if (float.IsNaN(vector2_23.X) || float.IsNaN(vector2_23.Y)) + vector2_23 = -Vector2.UnitY; + int Damage = (int) ((double) this.damage * 1.5); + this.ai[1] = (float) Projectile.NewProjectile(center.X, center.Y, vector2_23.X, vector2_23.Y, 461, Damage, this.knockBack, this.owner, ai1: ((float) this.whoAmI)); + this.netUpdate = true; + } + else if (flag2) + { + Projectile projectile = Main.projectile[(int) this.ai[1]]; + if (!projectile.active || projectile.type != 461) + { + this.Kill(); + return; + } + } + else + { + bool flag5 = false; + if ((double) this.ai[0] == 1.0) + flag5 = true; + if ((double) this.ai[0] <= 50.0 && (double) this.ai[0] % 10.0 == 0.0) + flag5 = true; + if ((double) this.ai[0] >= 80.0 && (double) this.ai[0] < 180.0 && (double) this.ai[0] % 30.0 == 0.0) + flag5 = true; + if (flag5) + { + int Type = 459; + float num25 = 10f; + Vector2 center = this.Center; + Vector2 vector2_24 = Vector2.Normalize(this.velocity) * num25; + if (float.IsNaN(vector2_24.X) || float.IsNaN(vector2_24.Y)) + vector2_24 = -Vector2.UnitY; + float ai1 = (float) (0.699999988079071 + (double) num17 * 0.300000011920929); + int Damage = (double) ai1 < 1.0 ? this.damage : (int) ((double) this.damage * 2.5); + Projectile.NewProjectile(center.X, center.Y, vector2_24.X, vector2_24.Y, Type, Damage, this.knockBack, this.owner, ai1: ai1); + } + } + } + else + this.Kill(); + } + } + if (this.type == 633) + { + float num26 = 30f; + if ((double) this.ai[0] > 90.0) + num26 = 15f; + if ((double) this.ai[0] > 120.0) + num26 = 5f; + this.damage = (int) ((double) player.inventory[player.selectedItem].damage * (double) player.magicDamage); + ++this.ai[0]; + ++this.ai[1]; + bool flag6 = false; + if ((double) this.ai[0] % (double) num26 == 0.0) + flag6 = true; + int num27 = 10; + bool flag7 = false; + if ((double) this.ai[0] % (double) num26 == 0.0) + flag7 = true; + if ((double) this.ai[1] >= 1.0) + { + this.ai[1] = 0.0f; + flag7 = true; + if (Main.myPlayer == this.owner) + { + float num28 = player.inventory[player.selectedItem].shootSpeed * this.scale; + Vector2 vector2_25 = vector2_1; + Vector2 vector2_26 = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY) - vector2_25; + if ((double) player.gravDir == -1.0) + vector2_26.Y = (float) (Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector2_25.Y; + Vector2 vector2_27 = Vector2.Normalize(vector2_26); + if (float.IsNaN(vector2_27.X) || float.IsNaN(vector2_27.Y)) + vector2_27 = -Vector2.UnitY; + Vector2 vector2_28 = Vector2.Normalize(Vector2.Lerp(vector2_27, Vector2.Normalize(this.velocity), 0.92f)) * num28; + if ((double) vector2_28.X != (double) this.velocity.X || (double) vector2_28.Y != (double) this.velocity.Y) + this.netUpdate = true; + this.velocity = vector2_28; + } + } + ++this.frameCounter; + if (this.frameCounter >= ((double) this.ai[0] < 120.0 ? 4 : 1)) + { + this.frameCounter = 0; + if (++this.frame >= 5) + this.frame = 0; + } + if (this.soundDelay <= 0) + { + this.soundDelay = num27; + this.soundDelay *= 2; + if ((double) this.ai[0] != 1.0) + SoundEngine.PlaySound(SoundID.Item15, this.position); + } + if (flag7 && Main.myPlayer == this.owner) + { + bool flag8 = !flag6 || player.CheckMana(player.inventory[player.selectedItem].mana, true); + if ((!(player.channel & flag8) || player.noItems ? 0 : (!player.CCed ? 1 : 0)) != 0) + { + if ((double) this.ai[0] == 1.0) + { + Vector2 center = this.Center; + Vector2 vector2_29 = Vector2.Normalize(this.velocity); + if (float.IsNaN(vector2_29.X) || float.IsNaN(vector2_29.Y)) + vector2_29 = -Vector2.UnitY; + int damage = this.damage; + for (int index = 0; index < 6; ++index) + Projectile.NewProjectile(center.X, center.Y, vector2_29.X, vector2_29.Y, 632, damage, this.knockBack, this.owner, (float) index, (float) this.whoAmI); + this.netUpdate = true; + } + } + else + this.Kill(); + } + } + if (this.type == 595) + { + num1 = 0.0f; + if (this.spriteDirection == -1) + num1 = 3.141593f; + if (++this.frame >= Main.projFrames[this.type]) + this.frame = 0; + --this.soundDelay; + if (this.soundDelay <= 0) + { + SoundEngine.PlaySound(SoundID.Item1, this.Center); + this.soundDelay = 12; + } + if (Main.myPlayer == this.owner) + { + if (player.channel && !player.noItems && !player.CCed) + { + float num29 = 1f; + if (player.inventory[player.selectedItem].shoot == this.type) + num29 = player.inventory[player.selectedItem].shootSpeed * this.scale; + Vector2 vec = Main.MouseWorld - vector2_1; + vec.Normalize(); + if (vec.HasNaNs()) + vec = Vector2.UnitX * (float) player.direction; + vec *= num29; + if ((double) vec.X != (double) this.velocity.X || (double) vec.Y != (double) this.velocity.Y) + this.netUpdate = true; + this.velocity = vec; + } + else + this.Kill(); + } + Vector2 position = this.Center + this.velocity * 3f; + Lighting.AddLight(position, 0.8f, 0.8f, 0.8f); + if (Main.rand.Next(3) == 0) + { + int index = Dust.NewDust(position - this.Size / 2f, this.width, this.height, 63, this.velocity.X, this.velocity.Y, 100, Scale: 2f); + Main.dust[index].noGravity = true; + Main.dust[index].position -= this.velocity; + } + } + if (this.type == 735) + { + num1 = 0.0f; + if (this.spriteDirection == -1) + num1 = 3.141593f; + if (++this.frame >= Main.projFrames[this.type]) + this.frame = 0; + --this.soundDelay; + if (this.soundDelay <= 0) + { + SoundEngine.PlaySound(SoundID.Item1, this.Center); + this.soundDelay = 12; + } + if (Main.myPlayer == this.owner) + { + if (player.channel && !player.noItems && !player.CCed) + { + float num30 = 1f; + if (player.inventory[player.selectedItem].shoot == this.type) + num30 = player.inventory[player.selectedItem].shootSpeed * this.scale; + Vector2 vec = Main.MouseWorld - vector2_1; + vec.Normalize(); + if (vec.HasNaNs()) + vec = Vector2.UnitX * (float) player.direction; + vec *= num30; + if ((double) vec.X != (double) this.velocity.X || (double) vec.Y != (double) this.velocity.Y) + this.netUpdate = true; + this.velocity = vec; + } + else + this.Kill(); + } + Vector2 position = this.Center + this.velocity * 3f; + Lighting.AddLight(position, 0.8f, 0.8f, 0.8f); + if (Main.rand.Next(3) == 0) + { + int index = Dust.NewDust(position - this.Size / 2f, this.width, this.height, 302, this.velocity.X, this.velocity.Y, 100, Scale: 2f); + Main.dust[index].noGravity = true; + Main.dust[index].position -= this.velocity; + } + } + if (this.type == 927) + { + num1 = 0.0f; + ++this.ai[0]; + if ((double) this.ai[0] >= 8.0) + this.ai[0] = 0.0f; + frames = 9; + num2 = (float) ((double) Main.rand.NextFloatDirection() * 6.28318548202515 * 0.0500000007450581); + --this.soundDelay; + if (this.soundDelay <= 0) + { + SoundEngine.PlaySound(SoundID.Item1, this.Center); + this.soundDelay = 6; + } + if (Main.myPlayer == this.owner) + { + if (player.channel && !player.noItems && !player.CCed) + { + float num31 = 1f; + if (player.inventory[player.selectedItem].shoot == this.type) + num31 = player.inventory[player.selectedItem].shootSpeed * this.scale; + Vector2 vec = Main.MouseWorld - vector2_1; + vec.Normalize(); + if (vec.HasNaNs()) + vec = Vector2.UnitX * (float) player.direction; + vec *= num31; + if ((double) vec.X != (double) this.velocity.X || (double) vec.Y != (double) this.velocity.Y) + this.netUpdate = true; + this.velocity = vec; + } + else + this.Kill(); + } + DelegateMethods.v3_1 = new Vector3(0.5f, 0.5f, 0.5f); + Utils.PlotTileLine(this.Center - this.velocity, this.Center + this.velocity.SafeNormalize(Vector2.Zero) * 80f, 16f, new Utils.TileActionAttempt(DelegateMethods.CastLightOpen)); + } + if (this.type == 600) + { + double num32 = (double) this.ai[0]; + ++this.ai[0]; + if (Main.myPlayer == this.owner && (double) this.ai[0] == 1.0) + { + float num33 = player.inventory[player.selectedItem].shootSpeed * this.scale; + Vector2 vector2_30 = vector2_1; + Vector2 vector2_31 = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY) - vector2_30; + if ((double) player.gravDir == -1.0) + vector2_31.Y = (float) (Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector2_30.Y; + Vector2 vector2_32 = Vector2.Normalize(vector2_31); + if (float.IsNaN(vector2_32.X) || float.IsNaN(vector2_32.Y)) + vector2_32 = -Vector2.UnitY; + Vector2 vector2_33 = vector2_32 * num33; + if ((double) vector2_33.X != (double) this.velocity.X || (double) vector2_33.Y != (double) this.velocity.Y) + this.netUpdate = true; + this.velocity = vector2_33; + int Type = 601; + float num34 = 3f; + Vector2 center = this.Center; + Vector2 vector2_34 = Vector2.Normalize(this.velocity) * num34; + if (float.IsNaN(vector2_34.X) || float.IsNaN(vector2_34.Y)) + vector2_34 = -Vector2.UnitY; + Projectile.NewProjectile(center.X, center.Y, vector2_34.X, vector2_34.Y, Type, this.damage, this.knockBack, this.owner, this.ai[1]); + } + if ((double) this.ai[0] >= 30.0) + this.Kill(); + } + if (this.type == 611) + { + if (Main.netMode != 2 && (double) this.localAI[0] == 0.0) + SoundEngine.PlaySound(SoundID.Item116, this.Center); + if ((double) this.localAI[1] > 0.0) + --this.localAI[1]; + this.alpha -= 42; + if (this.alpha < 0) + this.alpha = 0; + if ((double) this.localAI[0] == 0.0) + this.localAI[0] = this.velocity.ToRotation(); + float num35 = (double) this.localAI[0].ToRotationVector2().X >= 0.0 ? 1f : -1f; + if ((double) this.ai[1] <= 0.0) + num35 *= -1f; + Vector2 rotationVector2 = (num35 * (float) ((double) this.ai[0] / 30.0 * 6.28318548202515 - 1.57079637050629)).ToRotationVector2(); + rotationVector2.Y *= (float) Math.Sin((double) this.ai[1]); + if ((double) this.ai[1] <= 0.0) + rotationVector2.Y *= -1f; + Vector2 vector2_35 = rotationVector2.RotatedBy((double) this.localAI[0]); + ++this.ai[0]; + if ((double) this.ai[0] < 30.0) + this.velocity = this.velocity + 48f * vector2_35; + else + this.Kill(); + } + if (this.type == 615) + { + num1 = 0.0f; + if (this.spriteDirection == -1) + num1 = 3.141593f; + ++this.ai[0]; + int num36 = 0; + if ((double) this.ai[0] >= 40.0) + ++num36; + if ((double) this.ai[0] >= 80.0) + ++num36; + if ((double) this.ai[0] >= 120.0) + ++num36; + int num37 = 5; + int num38 = 0; + --this.ai[1]; + bool flag = false; + int num39 = -1; + if ((double) this.ai[1] <= 0.0) + { + this.ai[1] = (float) (num37 - num38 * num36); + flag = true; + if ((int) this.ai[0] / (num37 - num38 * num36) % 7 == 0) + num39 = 0; + } + this.frameCounter += 1 + num36; + if (this.frameCounter >= 4) + { + this.frameCounter = 0; + ++this.frame; + if (this.frame >= Main.projFrames[this.type]) + this.frame = 0; + } + if (this.soundDelay <= 0) + { + this.soundDelay = num37 - num38 * num36; + if ((double) this.ai[0] != 1.0) + SoundEngine.PlaySound(SoundID.Item36, this.position); + } + if (flag && Main.myPlayer == this.owner) + { + bool canShoot = player.channel && player.HasAmmo(player.inventory[player.selectedItem], true) && !player.noItems && !player.CCed; + int projToShoot = 14; + float speed = 14f; + int weaponDamage = player.GetWeaponDamage(player.inventory[player.selectedItem]); + float knockBack = player.inventory[player.selectedItem].knockBack; + if (canShoot) + { + player.PickAmmo(player.inventory[player.selectedItem], ref projToShoot, ref speed, ref canShoot, ref weaponDamage, ref knockBack); + float weaponKnockback = player.GetWeaponKnockback(player.inventory[player.selectedItem], knockBack); + float num40 = player.inventory[player.selectedItem].shootSpeed * this.scale; + Vector2 vector2_36 = vector2_1; + Vector2 vector2_37 = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY) - vector2_36; + if ((double) player.gravDir == -1.0) + vector2_37.Y = (float) (Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector2_36.Y; + Vector2 vector2_38 = Vector2.Normalize(vector2_37); + if (float.IsNaN(vector2_38.X) || float.IsNaN(vector2_38.Y)) + vector2_38 = -Vector2.UnitY; + Vector2 vector2_39 = (vector2_38 * num40).RotatedBy(Main.rand.NextDouble() * 0.130899697542191 - 0.0654498487710953); + if ((double) vector2_39.X != (double) this.velocity.X || (double) vector2_39.Y != (double) this.velocity.Y) + this.netUpdate = true; + this.velocity = vector2_39; + for (int index = 0; index < 1; ++index) + { + Vector2 vector2_40 = (Vector2.Normalize(this.velocity) * speed).RotatedBy(Main.rand.NextDouble() * 0.196349546313286 - 0.0981747731566429); + if (float.IsNaN(vector2_40.X) || float.IsNaN(vector2_40.Y)) + vector2_40 = -Vector2.UnitY; + Projectile.NewProjectile(vector2_36.X, vector2_36.Y, vector2_40.X, vector2_40.Y, projToShoot, weaponDamage, weaponKnockback, this.owner); + } + if (num39 == 0) + { + projToShoot = 616; + float num41 = 8f; + for (int index = 0; index < 1; ++index) + { + Vector2 vector2_41 = (Vector2.Normalize(this.velocity) * num41).RotatedBy(Main.rand.NextDouble() * 0.392699092626572 - 0.196349546313286); + if (float.IsNaN(vector2_41.X) || float.IsNaN(vector2_41.Y)) + vector2_41 = -Vector2.UnitY; + Projectile.NewProjectile(vector2_36.X, vector2_36.Y, vector2_41.X, vector2_41.Y, projToShoot, weaponDamage + 20, weaponKnockback * 1.25f, this.owner); + } + } + } + else + this.Kill(); + } + } + if (this.type == 714) + { + num1 = 0.0f; + if (this.spriteDirection == -1) + num1 = 3.141593f; + ++this.ai[0]; + int num42 = 0; + int num43 = 8; + int num44 = 0; + --this.ai[1]; + bool flag = false; + int num45 = -1; + if ((double) this.ai[1] <= 0.0) + { + this.ai[1] = (float) (num43 - num44 * num42); + flag = true; + int num46 = (int) this.ai[0] / (num43 - num44 * num42); + if (num46 % 7 == 0) + ; + num45 = num46 % 7; + } + double rotation = (double) this.rotation; + Vector2 center = this.Center; + int direction = this.direction; + Vector2 velocity = this.velocity; + this.frameCounter += 1 + num42; + if (this.frameCounter >= 4) + { + this.frameCounter = 0; + ++this.frame; + if (this.frame >= Main.projFrames[this.type]) + this.frame = 0; + } + if (this.soundDelay <= 0 && Main.player[this.owner].controlUseItem) + { + this.soundDelay = num43 - num44 * num42; + if ((double) this.ai[0] != 1.0) + SoundEngine.PlaySound(SoundID.Item156, this.position); + } + if (flag && Main.myPlayer == this.owner) + { + bool canShoot = player.channel && player.HasAmmo(player.inventory[player.selectedItem], true) && !player.noItems && !player.CCed; + int projToShoot = 134; + float speed = 8f; + int weaponDamage = player.GetWeaponDamage(player.inventory[player.selectedItem]); + float knockBack = player.inventory[player.selectedItem].knockBack; + if (num45 == 3) + ++speed; + if (canShoot) + { + player.PickAmmo(player.inventory[player.selectedItem], ref projToShoot, ref speed, ref canShoot, ref weaponDamage, ref knockBack); + float weaponKnockback = player.GetWeaponKnockback(player.inventory[player.selectedItem], knockBack); + float num47 = player.inventory[player.selectedItem].shootSpeed * this.scale; + Vector2 vector2_42 = vector2_1; + Vector2 vector2_43 = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY) - vector2_42; + if ((double) player.gravDir == -1.0) + vector2_43.Y = (float) (Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector2_42.Y; + Vector2 vector2_44 = Vector2.Normalize(vector2_43); + if (float.IsNaN(vector2_44.X) || float.IsNaN(vector2_44.Y)) + vector2_44 = -Vector2.UnitY; + Vector2 vector2_45 = (vector2_44 * num47).RotatedBy((Main.rand.NextDouble() * 0.130899697542191 - 0.0654498487710953) * 0.5); + if ((double) vector2_45.X != (double) this.velocity.X || (double) vector2_45.Y != (double) this.velocity.Y) + this.netUpdate = true; + this.velocity = vector2_45; + for (int index = 0; index < 1; ++index) + { + Vector2 spinningpoint = (Vector2.Normalize(this.velocity) * speed).RotatedBy(Main.rand.NextDouble() * 0.196349546313286 - 0.0981747731566429); + if (float.IsNaN(spinningpoint.X) || float.IsNaN(spinningpoint.Y)) + spinningpoint = -Vector2.UnitY; + Projectile.NewProjectile(vector2_42.X, vector2_42.Y, spinningpoint.X, spinningpoint.Y, projToShoot, weaponDamage, weaponKnockback, this.owner, (float) num45); + if (num45 == 5) + { + for (float num48 = -1f; (double) num48 <= 1.0; num48 += 2f) + { + Vector2 vector2_46 = spinningpoint.RotatedBy(6.28318548202515 * (double) num48 * 1.0 / 80.0); + if (float.IsNaN(spinningpoint.X) || float.IsNaN(spinningpoint.Y)) + vector2_46 = -Vector2.UnitY; + Projectile.NewProjectile(vector2_42.X, vector2_42.Y, vector2_46.X, vector2_46.Y, projToShoot, weaponDamage, weaponKnockback, this.owner, (float) num45); + } + } + if (num45 == 4) + Projectile.NewProjectile(vector2_42.X, vector2_42.Y, spinningpoint.X, spinningpoint.Y, projToShoot, weaponDamage, weaponKnockback, this.owner, (float) num45, 1f); + } + } + else + this.Kill(); + } + Vector2 Position = this.Center + this.velocity.ToRotation().ToRotationVector2() * 40f; + Vector2 vector2_47 = center + velocity.ToRotation().ToRotationVector2() * 40f; + Color rgb = Main.hslToRgb((float) ((double) this.ai[0] / 90.0 % 1.0), 1f, 0.5f); + rgb.A = (byte) 120; + int Type = 267; + Dust dust1 = Dust.NewDustPerfect(Position, Type, new Vector2?(Vector2.Zero)); + dust1.color = rgb; + dust1.scale = 0.6f; + dust1.fadeIn = 0.9f; + dust1.noGravity = true; + Dust dust2 = Dust.NewDustPerfect(Position, Type, new Vector2?(Vector2.Zero)); + dust2.color = rgb; + dust2.scale = 0.6f; + dust2.fadeIn = 0.7f; + dust2.noGravity = true; + dust2.velocity = -this.velocity.RotatedBy(2.09439516067505) / 10f; + Dust dust3 = Dust.NewDustPerfect(Position, Type, new Vector2?(Vector2.Zero)); + dust3.color = rgb; + dust3.scale = 0.6f; + dust3.fadeIn = 0.7f; + dust3.noGravity = true; + dust3.velocity = -this.velocity.RotatedBy(-2.09439516067505) / 10f; + if (Position != vector2_47) + { + float num49 = -1f; + Dust dust4 = Dust.NewDustPerfect(Vector2.Lerp(Position, vector2_47, 0.8f), Type, new Vector2?(Vector2.Zero)); + dust4.velocity = (Position - vector2_47).SafeNormalize(Vector2.Zero) * 2f; + dust4.color = rgb; + dust4.scale = 0.6f; + dust4.fadeIn = 0.9f; + dust4.velocity *= num49; + dust4.noGravity = true; + Dust dust5 = Dust.NewDustPerfect(Vector2.Lerp(Position, vector2_47, 0.5f), Type, new Vector2?(Vector2.Zero)); + dust5.velocity = (Position - vector2_47).SafeNormalize(Vector2.Zero) * 2f; + dust5.color = rgb; + dust5.scale = 0.6f; + dust5.fadeIn = 0.9f; + dust5.velocity *= num49; + dust5.noGravity = true; + Dust dust6 = Dust.NewDustPerfect(Vector2.Lerp(Position, vector2_47, 0.2f), Type, new Vector2?(Vector2.Zero)); + dust6.velocity = (Position - vector2_47).SafeNormalize(Vector2.Zero) * 2f; + dust6.color = rgb; + dust6.scale = 0.6f; + dust6.fadeIn = 0.9f; + dust6.velocity *= num49; + dust6.noGravity = true; + } + } + if (this.type == 630) + { + num1 = 0.0f; + if (this.spriteDirection == -1) + num1 = 3.141593f; + ++this.ai[0]; + int num50 = 0; + if ((double) this.ai[0] >= 40.0) + ++num50; + if ((double) this.ai[0] >= 80.0) + ++num50; + if ((double) this.ai[0] >= 120.0) + ++num50; + int num51 = 24; + int num52 = 2; + --this.ai[1]; + bool flag = false; + if ((double) this.ai[1] <= 0.0) + { + this.ai[1] = (float) (num51 - num52 * num50); + flag = true; + int num53 = (int) this.ai[0] / (num51 - num52 * num50); + } + bool canShoot = player.channel && player.HasAmmo(player.inventory[player.selectedItem], true) && !player.noItems && !player.CCed; + if ((double) this.localAI[0] > 0.0) + --this.localAI[0]; + if (this.soundDelay <= 0 & canShoot) + { + this.soundDelay = num51 - num52 * num50; + if ((double) this.ai[0] != 1.0) + SoundEngine.PlaySound(SoundID.Item5, this.position); + this.localAI[0] = 12f; + } + player.phantasmTime = 2; + if (flag && Main.myPlayer == this.owner) + { + int projToShoot = 14; + float speed = 14f; + int weaponDamage = player.GetWeaponDamage(player.inventory[player.selectedItem]); + float knockBack = player.inventory[player.selectedItem].knockBack; + if (canShoot) + { + player.PickAmmo(player.inventory[player.selectedItem], ref projToShoot, ref speed, ref canShoot, ref weaponDamage, ref knockBack); + float weaponKnockback = player.GetWeaponKnockback(player.inventory[player.selectedItem], knockBack); + float num54 = player.inventory[player.selectedItem].shootSpeed * this.scale; + Vector2 vector2_48 = vector2_1; + Vector2 vector2_49 = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY) - vector2_48; + if ((double) player.gravDir == -1.0) + vector2_49.Y = (float) (Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector2_48.Y; + Vector2 vector2_50 = Vector2.Normalize(vector2_49); + if (float.IsNaN(vector2_50.X) || float.IsNaN(vector2_50.Y)) + vector2_50 = -Vector2.UnitY; + Vector2 vector2_51 = vector2_50 * num54; + if ((double) vector2_51.X != (double) this.velocity.X || (double) vector2_51.Y != (double) this.velocity.Y) + this.netUpdate = true; + this.velocity = vector2_51 * 0.55f; + for (int index7 = 0; index7 < 4; ++index7) + { + Vector2 vector2_52 = Vector2.Normalize(this.velocity) * speed * (float) (0.600000023841858 + (double) Main.rand.NextFloat() * 0.800000011920929); + if (float.IsNaN(vector2_52.X) || float.IsNaN(vector2_52.Y)) + vector2_52 = -Vector2.UnitY; + Vector2 vector2_53 = vector2_48 + Utils.RandomVector2(Main.rand, -15f, 15f); + int index8 = Projectile.NewProjectile(vector2_53.X, vector2_53.Y, vector2_52.X, vector2_52.Y, projToShoot, weaponDamage, weaponKnockback, this.owner); + Main.projectile[index8].noDropItem = true; + } + } + else + this.Kill(); + } + } + if (this.type == 705) + { + num1 = 0.0f; + if (this.spriteDirection == -1) + num1 = 3.141593f; + ++this.ai[0]; + int itemAnimationMax = player.itemAnimationMax; + --this.ai[1]; + bool flag = false; + if ((double) this.ai[1] <= 0.0) + { + this.ai[1] = (float) itemAnimationMax; + flag = true; + } + bool canShoot = player.channel && player.HasAmmo(player.inventory[player.selectedItem], true) && !player.noItems && !player.CCed; + if ((double) this.localAI[0] > 0.0) + --this.localAI[0]; + if (this.soundDelay <= 0 & canShoot) + { + this.soundDelay = itemAnimationMax; + if ((double) this.ai[0] != 1.0) + SoundEngine.PlaySound(SoundID.Item5, this.position); + this.localAI[0] = 12f; + } + if (flag && Main.myPlayer == this.owner) + { + int projToShoot = 14; + float speed = 12f; + int weaponDamage = player.GetWeaponDamage(player.inventory[player.selectedItem]); + float knockBack = player.inventory[player.selectedItem].knockBack; + int num55 = 2; + float max = 1.5f; + if (canShoot) + { + player.PickAmmo(player.inventory[player.selectedItem], ref projToShoot, ref speed, ref canShoot, ref weaponDamage, ref knockBack); + float weaponKnockback = player.GetWeaponKnockback(player.inventory[player.selectedItem], knockBack); + if (projToShoot == 1) + projToShoot = 2; + if (++player.phantomPhoneixCounter >= 3) + { + player.phantomPhoneixCounter = 0; + num55 = 1; + weaponDamage *= 2; + max = 0.0f; + this.ai[1] *= 1.5f; + projToShoot = 706; + speed = 16f; + } + float num56 = player.inventory[player.selectedItem].shootSpeed * this.scale; + Vector2 vector2_54 = vector2_1; + Vector2 vector2_55 = Main.screenPosition + new Vector2((float) Main.mouseX, (float) Main.mouseY) - vector2_54; + if ((double) player.gravDir == -1.0) + vector2_55.Y = (float) (Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector2_54.Y; + Vector2 vector2_56 = Vector2.Normalize(vector2_55); + if (float.IsNaN(vector2_56.X) || float.IsNaN(vector2_56.Y)) + vector2_56 = -Vector2.UnitY; + Vector2 vector2_57 = vector2_56 * num56; + if ((double) vector2_57.X != (double) this.velocity.X || (double) vector2_57.Y != (double) this.velocity.Y) + this.netUpdate = true; + this.velocity = vector2_57 * 0.55f; + for (int index9 = 0; index9 < num55; ++index9) + { + Vector2 vector2_58 = Vector2.Normalize(this.velocity) * speed + Main.rand.NextVector2Square(-max, max); + if (float.IsNaN(vector2_58.X) || float.IsNaN(vector2_58.Y)) + vector2_58 = -Vector2.UnitY; + Vector2 vector2_59 = vector2_54; + int index10 = Projectile.NewProjectile(vector2_59.X, vector2_59.Y, vector2_58.X, vector2_58.Y, projToShoot, weaponDamage, weaponKnockback, this.owner); + Main.projectile[index10].noDropItem = true; + } + } + else + this.Kill(); + } + } + this.position = player.RotatedRelativePoint(player.MountedCenter, addGfxOffY: false) - this.Size / 2f; + this.rotation = this.velocity.ToRotation() + num1; + this.spriteDirection = this.direction; + this.timeLeft = 2; + player.ChangeDir(this.direction); + player.heldProj = this.whoAmI; + player.SetDummyItemTime(frames); + player.itemRotation = MathHelper.WrapAngle((float) Math.Atan2((double) this.velocity.Y * (double) this.direction, (double) this.velocity.X * (double) this.direction) + num2); + if (this.type == 460 || this.type == 611) + { + Vector2 vector2_60 = Main.OffsetsPlayerOnhand[player.bodyFrame.Y / 56] * 2f; + if (player.direction != 1) + vector2_60.X = (float) player.bodyFrame.Width - vector2_60.X; + if ((double) player.gravDir != 1.0) + vector2_60.Y = (float) player.bodyFrame.Height - vector2_60.Y; + Vector2 vector2_61 = vector2_60 - new Vector2((float) (player.bodyFrame.Width - player.width), (float) (player.bodyFrame.Height - 42)) / 2f; + this.Center = player.RotatedRelativePoint(player.MountedCenter - new Vector2(20f, 42f) / 2f + vector2_61, addGfxOffY: false) - this.velocity; + } + if (this.type == 615) + this.position.Y += player.gravDir * 2f; + if (this.type == 714) + this.position.Y += player.gravDir * 2f; + if (this.type == 611 && this.alpha == 0) + { + for (int index = 0; index < 2; ++index) + { + Dust dust = Main.dust[Dust.NewDust(this.position + this.velocity * 2f, this.width, this.height, 6, Alpha: 100, newColor: Color.Transparent, Scale: 2f)]; + dust.noGravity = true; + dust.velocity *= 2f; + dust.velocity += this.localAI[0].ToRotationVector2(); + dust.fadeIn = 1.5f; + } + float num57 = 18f; + for (int index = 0; (double) index < (double) num57; ++index) + { + if (Main.rand.Next(4) == 0) + { + Vector2 Position = this.position + this.velocity + this.velocity * ((float) index / num57); + Dust dust = Main.dust[Dust.NewDust(Position, this.width, this.height, 6, Alpha: 100, newColor: Color.Transparent)]; + dust.noGravity = true; + dust.fadeIn = 0.5f; + dust.velocity += this.localAI[0].ToRotationVector2(); + dust.noLight = true; + } + } + } + if (this.type != 927) + return; + player.itemAnimation = frames - (int) this.ai[0]; + } + + private void AI_099_1() + { + this.timeLeft = 6; + bool flag1 = true; + float num1 = 250f; + float num2 = 0.1f; + float num3 = 15f; + float num4 = 12f; + float num5 = num1 * 0.5f; + float num6 = num3 * 0.8f; + float num7 = num4 * 1.5f; + if (this.owner == Main.myPlayer) + { + bool flag2 = false; + for (int index = 0; index < 1000; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == this.owner && Main.projectile[index].aiStyle == 99 && (Main.projectile[index].type < 556 || Main.projectile[index].type > 561)) + flag2 = true; + } + if (!flag2) + { + this.ai[0] = -1f; + this.netUpdate = true; + } + } + if (Main.player[this.owner].yoyoString) + num5 += (float) ((double) num5 * 0.25 + 10.0); + this.rotation += 0.5f; + if (Main.player[this.owner].dead) + { + this.Kill(); + } + else + { + if (!flag1) + { + Main.player[this.owner].heldProj = this.whoAmI; + Main.player[this.owner].SetDummyItemTime(2); + if ((double) this.position.X + (double) (this.width / 2) > (double) Main.player[this.owner].position.X + (double) (Main.player[this.owner].width / 2)) + { + Main.player[this.owner].ChangeDir(1); + this.direction = 1; + } + else + { + Main.player[this.owner].ChangeDir(-1); + this.direction = -1; + } + } + if ((double) this.ai[0] == 0.0 || (double) this.ai[0] == 1.0) + { + if ((double) this.ai[0] == 1.0) + num5 *= 0.75f; + float num8 = num7 * 0.5f; + bool flag3 = false; + Vector2 vector2_1 = Main.player[this.owner].Center - this.Center; + if ((double) vector2_1.Length() > (double) num5 * 0.9) + flag3 = true; + if ((double) vector2_1.Length() > (double) num5) + { + float num9 = vector2_1.Length() - num5; + Vector2 vector2_2; + vector2_2.X = vector2_1.Y; + vector2_2.Y = vector2_1.X; + vector2_1.Normalize(); + Vector2 vector2_3 = vector2_1 * num5; + this.position = Main.player[this.owner].Center - vector2_3; + this.position.X -= (float) (this.width / 2); + this.position.Y -= (float) (this.height / 2); + float num10 = this.velocity.Length(); + this.velocity.Normalize(); + if ((double) num9 > (double) num10 - 1.0) + num9 = num10 - 1f; + this.velocity = this.velocity * (num10 - num9); + this.velocity.Length(); + Vector2 vector2_4 = new Vector2(this.Center.X, this.Center.Y); + Vector2 vector2_5 = new Vector2(Main.player[this.owner].Center.X, Main.player[this.owner].Center.Y); + if ((double) vector2_4.Y < (double) vector2_5.Y) + vector2_2.Y = Math.Abs(vector2_2.Y); + else if ((double) vector2_4.Y > (double) vector2_5.Y) + vector2_2.Y = -Math.Abs(vector2_2.Y); + if ((double) vector2_4.X < (double) vector2_5.X) + vector2_2.X = Math.Abs(vector2_2.X); + else if ((double) vector2_4.X > (double) vector2_5.X) + vector2_2.X = -Math.Abs(vector2_2.X); + vector2_2.Normalize(); + Vector2 vector2_6 = vector2_2 * this.velocity.Length(); + Vector2 vector2_7 = new Vector2(vector2_6.X, vector2_6.Y); + if ((double) Math.Abs(this.velocity.X) > (double) Math.Abs(this.velocity.Y)) + { + Vector2 velocity = this.velocity; + velocity.Y += vector2_6.Y; + velocity.Normalize(); + Vector2 vector2_8 = velocity * this.velocity.Length(); + if ((double) Math.Abs(vector2_6.X) < 0.1 || (double) Math.Abs(vector2_6.Y) < 0.1) + this.velocity = vector2_8; + else + this.velocity = (vector2_8 + this.velocity * 2f) / 3f; + } + else + { + Vector2 velocity = this.velocity; + velocity.X += vector2_6.X; + velocity.Normalize(); + Vector2 vector2_9 = velocity * this.velocity.Length(); + if ((double) Math.Abs(vector2_6.X) < 0.2 || (double) Math.Abs(vector2_6.Y) < 0.2) + this.velocity = vector2_9; + else + this.velocity = (vector2_9 + this.velocity * 2f) / 3f; + } + } + if (Main.myPlayer == this.owner) + { + if (Main.player[this.owner].channel) + { + Vector2 vector2_10 = new Vector2((float) (Main.mouseX - Main.lastMouseX), (float) (Main.mouseY - Main.lastMouseY)); + if ((double) this.velocity.X != 0.0 || (double) this.velocity.Y != 0.0) + { + if (flag1) + vector2_10 *= -1f; + if (flag3) + { + if ((double) this.Center.X < (double) Main.player[this.owner].Center.X && (double) vector2_10.X < 0.0) + vector2_10.X = 0.0f; + if ((double) this.Center.X > (double) Main.player[this.owner].Center.X && (double) vector2_10.X > 0.0) + vector2_10.X = 0.0f; + if ((double) this.Center.Y < (double) Main.player[this.owner].Center.Y && (double) vector2_10.Y < 0.0) + vector2_10.Y = 0.0f; + if ((double) this.Center.Y > (double) Main.player[this.owner].Center.Y && (double) vector2_10.Y > 0.0) + vector2_10.Y = 0.0f; + } + this.velocity = this.velocity + vector2_10 * num2; + this.netUpdate = true; + } + } + else + { + this.ai[0] = 10f; + this.netUpdate = true; + } + } + if (flag1 || this.type == 562 || this.type == 547 || this.type == 555 || this.type == 564 || this.type == 552 || this.type == 563 || this.type == 549 || this.type == 550 || this.type == 554 || this.type == 553 || this.type == 603) + { + float num11 = 800f; + Vector2 vector2_11 = new Vector2(); + bool flag4 = false; + if (this.type == 549) + num11 = 200f; + if (this.type == 554) + num11 = 400f; + if (this.type == 553) + num11 = 250f; + if (this.type == 603) + num11 = 320f; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].CanBeChasedBy((object) this)) + { + float num12 = Main.npc[index].position.X + (float) (Main.npc[index].width / 2); + float num13 = Main.npc[index].position.Y + (float) (Main.npc[index].height / 2); + float num14 = Math.Abs(this.position.X + (float) (this.width / 2) - num12) + Math.Abs(this.position.Y + (float) (this.height / 2) - num13); + if ((double) num14 < (double) num11 && (this.type != 563 || (double) num14 >= 200.0) && Collision.CanHit(this.position, this.width, this.height, Main.npc[index].position, Main.npc[index].width, Main.npc[index].height) && (double) (Main.npc[index].Center - Main.player[this.owner].Center).Length() < (double) num5 * 0.9) + { + num11 = num14; + vector2_11.X = num12; + vector2_11.Y = num13; + flag4 = true; + } + } + } + if (flag4) + { + vector2_11 -= this.Center; + vector2_11.Normalize(); + if (this.type == 563) + { + vector2_11 *= 4f; + this.velocity = (this.velocity * 14f + vector2_11) / 15f; + } + else if (this.type == 553) + { + vector2_11 *= 5f; + this.velocity = (this.velocity * 12f + vector2_11) / 13f; + } + else if (this.type == 603) + { + vector2_11 *= 16f; + this.velocity = (this.velocity * 9f + vector2_11) / 10f; + } + else if (this.type == 554) + { + vector2_11 *= 8f; + this.velocity = (this.velocity * 6f + vector2_11) / 7f; + } + else + { + vector2_11 *= 6f; + this.velocity = (this.velocity * 7f + vector2_11) / 8f; + } + } + } + if ((double) this.velocity.Length() > (double) num6) + { + this.velocity.Normalize(); + this.velocity = this.velocity * num6; + } + if ((double) this.velocity.Length() >= (double) num8) + return; + this.velocity.Normalize(); + this.velocity = this.velocity * num8; + } + else + { + this.tileCollide = false; + Vector2 vec = Main.player[this.owner].Center - this.Center; + float num15 = vec.Length(); + if ((double) num15 < 40.0 || vec.HasNaNs() || (double) num15 > 2000.0) + { + this.Kill(); + } + else + { + float num16 = num6 * 1.5f; + if (this.type == 546) + num16 *= 1.5f; + if (this.type == 554) + num16 *= 1.25f; + if (this.type == 555) + num16 *= 1.35f; + if (this.type == 562) + num16 *= 1.25f; + float num17 = 12f; + vec.Normalize(); + vec *= num16; + this.velocity = (this.velocity * (num17 - 1f) + vec) / num17; + } + } + } + } + + private void AI_099_2() + { + bool flag1 = false; + for (int index = 0; index < this.whoAmI; ++index) + { + if (Main.projectile[index].active && Main.projectile[index].owner == this.owner && Main.projectile[index].type == this.type) + flag1 = true; + } + if (this.owner == Main.myPlayer) + { + ++this.localAI[0]; + if (flag1) + this.localAI[0] += (float) Main.rand.Next(10, 31) * 0.1f; + float num1 = this.localAI[0] / 60f / (float) ((1.0 + (double) Main.player[this.owner].meleeSpeed) / 2.0); + float num2 = ProjectileID.Sets.YoyosLifeTimeMultiplier[this.type]; + if ((double) num2 != -1.0 && (double) num1 > (double) num2) + this.ai[0] = -1f; + } + if (this.type == 603 && this.owner == Main.myPlayer) + { + ++this.localAI[1]; + if ((double) this.localAI[1] >= 6.0) + { + float num3 = 400f; + Vector2 velocity = this.velocity; + Vector2 vector2_1 = new Vector2((float) Main.rand.Next(-100, 101), (float) Main.rand.Next(-100, 101)); + vector2_1.Normalize(); + Vector2 vector2_2 = vector2_1 * ((float) Main.rand.Next(10, 41) * 0.1f); + if (Main.rand.Next(3) == 0) + vector2_2 *= 2f; + Vector2 vector2_3 = velocity * 0.25f + vector2_2; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].CanBeChasedBy((object) this)) + { + float num4 = Main.npc[index].position.X + (float) (Main.npc[index].width / 2); + float num5 = Main.npc[index].position.Y + (float) (Main.npc[index].height / 2); + float num6 = Math.Abs(this.position.X + (float) (this.width / 2) - num4) + Math.Abs(this.position.Y + (float) (this.height / 2) - num5); + if ((double) num6 < (double) num3 && Collision.CanHit(this.position, this.width, this.height, Main.npc[index].position, Main.npc[index].width, Main.npc[index].height)) + { + num3 = num6; + vector2_3.X = num4; + vector2_3.Y = num5; + Vector2 vector2_4 = vector2_3 - this.Center; + vector2_4.Normalize(); + vector2_3 = vector2_4 * 8f; + } + } + } + Vector2 vector2_5 = vector2_3 * 0.8f; + Projectile.NewProjectile(this.Center.X - vector2_5.X, this.Center.Y - vector2_5.Y, vector2_5.X, vector2_5.Y, 604, this.damage, this.knockBack, this.owner); + this.localAI[1] = 0.0f; + } + } + bool flag2 = false; + if (this.type >= 556 && this.type <= 561) + flag2 = true; + if (Main.player[this.owner].dead) + { + this.Kill(); + } + else + { + if (!flag2 && !flag1) + { + Main.player[this.owner].heldProj = this.whoAmI; + Main.player[this.owner].SetDummyItemTime(2); + if ((double) this.position.X + (double) (this.width / 2) > (double) Main.player[this.owner].position.X + (double) (Main.player[this.owner].width / 2)) + { + Main.player[this.owner].ChangeDir(1); + this.direction = 1; + } + else + { + Main.player[this.owner].ChangeDir(-1); + this.direction = -1; + } + } + if (this.velocity.HasNaNs()) + this.Kill(); + this.timeLeft = 6; + float num7 = ProjectileID.Sets.YoyosMaximumRange[this.type]; + float num8 = ProjectileID.Sets.YoyosTopSpeed[this.type]; + if (this.type == 545) + { + if (Main.rand.Next(6) == 0) + { + int index = Dust.NewDust(this.position, this.width, this.height, 6); + Main.dust[index].noGravity = true; + } + } + else if (this.type == 553 && Main.rand.Next(2) == 0) + { + int index = Dust.NewDust(this.position, this.width, this.height, 6); + Main.dust[index].noGravity = true; + Main.dust[index].scale = 1.6f; + } + if (Main.player[this.owner].yoyoString) + num7 = (float) ((double) num7 * 1.25 + 30.0); + float num9 = num7 / (float) ((1.0 + (double) Main.player[this.owner].meleeSpeed * 3.0) / 4.0); + float val2 = num8 / (float) ((1.0 + (double) Main.player[this.owner].meleeSpeed * 3.0) / 4.0); + float num10 = (float) (14.0 - (double) val2 / 2.0); + if ((double) num10 < 1.0) + num10 = 1f; + float num11 = (float) (5.0 + (double) val2 / 2.0); + if (flag1) + num11 += 20f; + if ((double) this.ai[0] >= 0.0) + { + if ((double) this.velocity.Length() > (double) val2) + this.velocity = this.velocity * 0.98f; + bool flag3 = false; + bool flag4 = false; + Vector2 vector2_6 = Main.player[this.owner].Center - this.Center; + if ((double) vector2_6.Length() > (double) num9) + { + flag3 = true; + if ((double) vector2_6.Length() > (double) num9 * 1.3) + flag4 = true; + } + if (this.owner == Main.myPlayer) + { + if (!Main.player[this.owner].channel || Main.player[this.owner].stoned || Main.player[this.owner].frozen) + { + this.ai[0] = -1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + } + else + { + Vector2 vector2_7 = Main.ReverseGravitySupport(Main.MouseScreen) + Main.screenPosition; + float x = vector2_7.X; + float y = vector2_7.Y; + Vector2 vector2_8 = new Vector2(x, y) - Main.player[this.owner].Center; + if ((double) vector2_8.Length() > (double) num9) + { + vector2_8.Normalize(); + Vector2 vector2_9 = vector2_8 * num9; + Vector2 vector2_10 = Main.player[this.owner].Center + vector2_9; + x = vector2_10.X; + y = vector2_10.Y; + } + if ((double) this.ai[0] != (double) x || (double) this.ai[1] != (double) y) + { + Vector2 vector2_11 = new Vector2(x, y) - Main.player[this.owner].Center; + if ((double) vector2_11.Length() > (double) num9 - 1.0) + { + vector2_11.Normalize(); + vector2_11 *= num9 - 1f; + Vector2 vector2_12 = Main.player[this.owner].Center + vector2_11; + x = vector2_12.X; + y = vector2_12.Y; + } + this.ai[0] = x; + this.ai[1] = y; + this.netUpdate = true; + } + } + } + if (flag4 && this.owner == Main.myPlayer) + { + this.ai[0] = -1f; + this.netUpdate = true; + } + if ((double) this.ai[0] >= 0.0) + { + if (flag3) + { + num10 /= 2f; + val2 *= 2f; + if ((double) this.Center.X > (double) Main.player[this.owner].Center.X && (double) this.velocity.X > 0.0) + this.velocity.X *= 0.5f; + if ((double) this.Center.Y > (double) Main.player[this.owner].Center.Y && (double) this.velocity.Y > 0.0) + this.velocity.Y *= 0.5f; + if ((double) this.Center.X < (double) Main.player[this.owner].Center.X && (double) this.velocity.X < 0.0) + this.velocity.X *= 0.5f; + if ((double) this.Center.Y < (double) Main.player[this.owner].Center.Y && (double) this.velocity.Y < 0.0) + this.velocity.Y *= 0.5f; + } + Vector2 vector2_13 = new Vector2(this.ai[0], this.ai[1]) - this.Center; + if (flag3) + num10 = 1f; + double num12 = (double) this.velocity.Length(); + float num13 = vector2_13.Length(); + if ((double) num13 > (double) num11) + { + vector2_13.Normalize(); + float val1 = Math.Min(num13 / 2f, val2); + if (flag3) + val1 = Math.Min(val1, val2 / 2f); + vector2_13 *= val1; + this.velocity = (this.velocity * (num10 - 1f) + vector2_13) / num10; + } + else if (flag1) + { + if ((double) this.velocity.Length() < (double) val2 * 0.6) + { + vector2_13 = this.velocity; + vector2_13.Normalize(); + vector2_13 *= val2 * 0.6f; + this.velocity = (this.velocity * (num10 - 1f) + vector2_13) / num10; + } + } + else + this.velocity = this.velocity * 0.8f; + if (flag1 && !flag3 && (double) this.velocity.Length() < (double) val2 * 0.6) + { + this.velocity.Normalize(); + this.velocity = this.velocity * (val2 * 0.6f); + } + } + } + else + { + float num14 = (float) (int) ((double) num10 * 0.8); + float num15 = val2 * 1.5f; + this.tileCollide = false; + Vector2 vector2 = Main.player[this.owner].Center - this.Center; + float num16 = vector2.Length(); + if ((double) num16 < (double) num15 + 10.0 || (double) num16 == 0.0 || (double) num16 > 2000.0) + { + this.Kill(); + } + else + { + vector2.Normalize(); + vector2 *= num15; + this.velocity = (this.velocity * (num14 - 1f) + vector2) / num14; + } + } + this.rotation += 0.45f; + } + } + + private void AI_130_FlameBurstTower() + { + float shot_range = 900f; + float angleRatioMax = 1f; + Vector2 vector2_1 = this.Center; + int Type = 664; + int num1 = 12; + float num2 = 12f; + int num3 = 1; + int num4 = 6; + int num5 = 4; + int num6 = 80; + switch (this.type) + { + case 663: + Lighting.AddLight(this.Center, new Vector3(0.4f, 0.2f, 0.1f)); + Lighting.AddLight(this.Bottom + new Vector2(0.0f, -10f), new Vector3(0.4f, 0.2f, 0.1f)); + vector2_1 = this.Bottom + new Vector2((float) (this.direction * 6), -40f); + if ((double) ++this.localAI[0] >= 300.0) + this.localAI[0] = 0.0f; + Microsoft.Xna.Framework.Rectangle r1 = new Microsoft.Xna.Framework.Rectangle((int) this.position.X + this.width / 4, (int) this.position.Y + this.height - 16, this.width / 4 * 3, 6); + if (this.direction == 1) + r1.X -= this.width / 4; + for (int index = 0; index < 1; ++index) + { + if (Main.rand.Next(2) == 0) + { + Dust dust = Dust.NewDustDirect(r1.TopLeft() + new Vector2(-2f, -2f), r1.Width + 4, r1.Height + 4, 270, (float) (-this.direction * 2), -2f, 200, new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0)); + dust.fadeIn = (float) (0.600000023841858 + (double) Main.rand.NextFloat() * 0.600000023841858); + dust.scale = 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.velocity = Vector2.Zero; + dust.velocity.X = (float) -this.direction * Main.rand.NextFloat() * dust.fadeIn; + } + } + r1 = new Microsoft.Xna.Framework.Rectangle((int) this.Center.X, (int) this.Bottom.Y, this.width / 4, 10); + if (this.direction == -1) + r1.X -= r1.Width; + r1.X += this.direction * 4; + r1.Y -= this.height - 10; + for (int index = 0; index < 1; ++index) + { + if (Main.rand.Next(5) == 0) + { + Dust dust = Dust.NewDustDirect(r1.TopLeft(), r1.Width, r1.Height, 6); + dust.fadeIn = 1f; + dust.scale = 1f; + dust.noGravity = true; + dust.noLight = true; + dust.velocity *= 2f; + } + } + break; + case 665: + Lighting.AddLight(this.Center, new Vector3(0.4f, 0.2f, 0.1f) * 1.2f); + Lighting.AddLight(this.Bottom + new Vector2(0.0f, -10f), new Vector3(0.4f, 0.2f, 0.1f) * 1.2f); + num6 = 70; + num2 += 3f; + num4 = 8; + Type = 666; + vector2_1 = this.Bottom + new Vector2((float) (this.direction * 6), -44f); + if ((double) ++this.localAI[0] >= 300.0) + this.localAI[0] = 0.0f; + Microsoft.Xna.Framework.Rectangle r2 = new Microsoft.Xna.Framework.Rectangle((int) this.position.X + this.width / 4, (int) this.position.Y + this.height - 16, this.width / 4 * 2, 6); + if (this.direction == 1) + r2.X -= this.width / 4; + for (int index = 0; index < 1; ++index) + { + if (Main.rand.Next(2) == 0) + { + Dust dust = Dust.NewDustDirect(r2.TopLeft() + new Vector2(-2f, -2f), r2.Width + 4, r2.Height + 4, 270, (float) (-this.direction * 2), -2f, 200, new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0)); + dust.fadeIn = (float) (0.600000023841858 + (double) Main.rand.NextFloat() * 0.600000023841858); + dust.scale = 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.velocity = Vector2.Zero; + dust.velocity.X = (float) -this.direction * Main.rand.NextFloat() * dust.fadeIn; + } + } + r2 = new Microsoft.Xna.Framework.Rectangle((int) this.Center.X, (int) this.Bottom.Y, this.width / 4, 10); + if (this.direction == -1) + r2.X -= r2.Width; + r2.X += this.direction * 4; + r2.Y -= this.height - 10; + for (int index = 0; index < 2; ++index) + { + if (Main.rand.Next(5) == 0) + { + Dust dust = Dust.NewDustDirect(r2.TopLeft(), r2.Width, r2.Height, 6); + dust.fadeIn = 1f; + dust.scale = 1f; + dust.noGravity = true; + dust.noLight = true; + dust.velocity *= 2f; + } + } + break; + case 667: + Lighting.AddLight(this.Center, new Vector3(0.4f, 0.2f, 0.1f) * 1.5f); + Lighting.AddLight(this.Bottom + new Vector2(0.0f, -10f), new Vector3(0.4f, 0.2f, 0.1f) * 1.5f); + num6 = 60; + num2 += 6f; + num4 = 8; + Type = 668; + vector2_1 = this.Bottom + new Vector2((float) (this.direction * 6), -46f); + if ((double) ++this.localAI[0] >= 300.0) + this.localAI[0] = 0.0f; + Microsoft.Xna.Framework.Rectangle r3 = new Microsoft.Xna.Framework.Rectangle((int) this.position.X + this.width / 4, (int) this.position.Y + this.height - 16, this.width / 4 * 2, 6); + if (this.direction == 1) + r3.X -= this.width / 4; + for (int index = 0; index < 1; ++index) + { + if (Main.rand.Next(2) == 0) + { + Dust dust = Dust.NewDustDirect(r3.TopLeft() + new Vector2(-2f, -2f), r3.Width + 4, r3.Height + 4, 270, (float) (-this.direction * 2), -2f, 200, new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0)); + dust.fadeIn = (float) (0.600000023841858 + (double) Main.rand.NextFloat() * 0.600000023841858); + dust.scale = 0.4f; + dust.noGravity = true; + dust.noLight = true; + dust.velocity = Vector2.Zero; + dust.velocity.X = (float) -this.direction * Main.rand.NextFloat() * dust.fadeIn; + } + } + r3 = new Microsoft.Xna.Framework.Rectangle((int) this.Center.X, (int) this.Bottom.Y, this.width / 4, 10); + if (this.direction == -1) + r3.X -= r3.Width; + r3.X += this.direction * 4; + r3.Y -= this.height - 10; + for (int index = 0; index < 3; ++index) + { + if (Main.rand.Next(5) == 0) + { + Dust dust = Dust.NewDustDirect(r3.TopLeft(), r3.Width, r3.Height, 6); + dust.fadeIn = 1.1f; + dust.scale = 1f; + dust.noGravity = true; + dust.noLight = true; + dust.velocity *= 2.4f; + } + } + break; + } + if (Main.player[this.owner].setApprenticeT2) + { + angleRatioMax = 0.1f; + shot_range *= 1.5f; + num2 *= 1.4f; + } + if ((double) this.ai[0] == 0.0) + { + this.direction = this.spriteDirection = Main.player[this.owner].direction; + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + } + if ((double) this.ai[0] == 1.0) + { + this.frame = 0; + bool flag = false; + if ((double) this.ai[1] > 0.0) + --this.ai[1]; + else + flag = true; + if (flag && this.owner == Main.myPlayer) + { + int target = this.AI_130_FlameBurstTower_FindTarget(shot_range, angleRatioMax, vector2_1); + if (target != -1) + { + this.direction = Math.Sign(this.DirectionTo(Main.npc[target].Center).X); + this.ai[0] = 2f; + this.ai[1] = 0.0f; + this.netUpdate = true; + } + } + } + else if ((double) this.ai[0] == 2.0) + { + this.frame = num3 + (int) ((double) this.ai[1] / (double) num5); + if ((double) this.ai[1] == (double) num1) + { + Vector2 vector2_2 = new Vector2((float) this.direction, 0.0f); + int target = this.AI_130_FlameBurstTower_FindTarget(shot_range, angleRatioMax, vector2_1, false); + if (target != -1) + vector2_2 = (Main.npc[target].Center - vector2_1).SafeNormalize(Vector2.UnitX * (float) this.direction); + Vector2 velocity = vector2_2 * num2; + if (this.owner == Main.myPlayer) + Projectile.NewProjectile(vector2_1, velocity, Type, this.damage, this.knockBack, this.owner); + } + if ((double) ++this.ai[1] >= (double) (num4 * num5)) + { + this.ai[0] = 1f; + this.ai[1] = (float) num6; + } + } + this.spriteDirection = this.direction; + this.tileCollide = true; + this.velocity.Y += 0.2f; + } + + private int AI_130_FlameBurstTower_FindTarget( + float shot_range, + float angleRatioMax, + Vector2 shootingSpot, + bool canChangeDirection = true) + { + int index1 = -1; + NPC minionAttackTargetNpc = this.OwnerMinionAttackTargetNPC; + if (minionAttackTargetNpc != null && minionAttackTargetNpc.CanBeChasedBy((object) this)) + { + for (int index2 = 0; index2 < 1; ++index2) + { + if (minionAttackTargetNpc.CanBeChasedBy((object) this)) + { + float num = Vector2.Distance(shootingSpot, minionAttackTargetNpc.Center); + if ((double) num <= (double) shot_range) + { + Vector2 vector2 = (minionAttackTargetNpc.Center - shootingSpot).SafeNormalize(Vector2.UnitY); + if ((double) Math.Abs(vector2.X) >= (double) Math.Abs(vector2.Y) * (double) angleRatioMax && (canChangeDirection || (double) this.direction * (double) vector2.X >= 0.0) && (index1 == -1 || (double) num < (double) Vector2.Distance(shootingSpot, Main.npc[index1].Center)) && Collision.CanHitLine(shootingSpot, 0, 0, minionAttackTargetNpc.Center, 0, 0)) + index1 = minionAttackTargetNpc.whoAmI; + } + } + } + if (index1 != -1) + return index1; + } + for (int index3 = 0; index3 < 200; ++index3) + { + NPC npc = Main.npc[index3]; + if (npc.CanBeChasedBy((object) this)) + { + float num = Vector2.Distance(shootingSpot, npc.Center); + if ((double) num <= (double) shot_range) + { + Vector2 vector2 = (npc.Center - shootingSpot).SafeNormalize(Vector2.UnitY); + if ((double) Math.Abs(vector2.X) >= (double) Math.Abs(vector2.Y) * (double) angleRatioMax && (canChangeDirection || (double) this.direction * (double) vector2.X >= 0.0) && (index1 == -1 || (double) num < (double) Vector2.Distance(shootingSpot, Main.npc[index1].Center)) && Collision.CanHitLine(shootingSpot, 0, 0, npc.Center, 0, 0)) + index1 = index3; + } + } + } + return index1; + } + + private int AI_134_Ballista_FindTarget( + float shot_range, + float deadBottomAngle, + Vector2 shootingSpot) + { + int index1 = -1; + NPC minionAttackTargetNpc = this.OwnerMinionAttackTargetNPC; + if (minionAttackTargetNpc != null && minionAttackTargetNpc.CanBeChasedBy((object) this)) + { + for (int index2 = 0; index2 < 1; ++index2) + { + if (minionAttackTargetNpc.CanBeChasedBy((object) this)) + { + float num = Vector2.Distance(shootingSpot, minionAttackTargetNpc.Center); + if ((double) num <= (double) shot_range) + { + Vector2 vector2 = (minionAttackTargetNpc.Center - shootingSpot).SafeNormalize(Vector2.UnitY); + if (((double) Math.Abs(vector2.X) >= (double) Math.Abs(vector2.Y) * (double) deadBottomAngle || (double) vector2.Y <= 0.0) && (index1 == -1 || (double) num < (double) Vector2.Distance(shootingSpot, Main.npc[index1].Center)) && Collision.CanHitLine(shootingSpot, 0, 0, minionAttackTargetNpc.Center, 0, 0)) + index1 = minionAttackTargetNpc.whoAmI; + } + } + } + if (index1 != -1) + return index1; + } + for (int index3 = 0; index3 < 200; ++index3) + { + NPC npc = Main.npc[index3]; + if (npc.CanBeChasedBy((object) this)) + { + float num = Vector2.Distance(shootingSpot, npc.Center); + if ((double) num <= (double) shot_range) + { + Vector2 vector2 = (npc.Center - shootingSpot).SafeNormalize(Vector2.UnitY); + if (((double) Math.Abs(vector2.X) >= (double) Math.Abs(vector2.Y) * (double) deadBottomAngle || (double) vector2.Y <= 0.0) && (index1 == -1 || (double) num < (double) Vector2.Distance(shootingSpot, Main.npc[index1].Center)) && Collision.CanHitLine(shootingSpot, 0, 0, npc.Center, 0, 0)) + index1 = index3; + } + } + } + return index1; + } + + private void AI_131_FlameBurstShot() + { + if (this.type != 664 && this.type != 666 && this.type != 668) + return; + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_FlameburstTowerShot, this.Center); + } + if (this.alpha > 0) + { + this.alpha -= 25; + if (this.alpha < 0) + this.alpha = 0; + } + int num = 1; + if (this.type == 666) + num = 2; + if (this.type == 668) + num = 3; + for (int index = 0; index < num; ++index) + { + if (Main.rand.Next(2) != 0) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 6, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 100, Scale: 2f); + dust.noGravity = true; + dust.velocity *= 0.3f; + if (Main.rand.Next(1) == 0) + { + dust.velocity.Y += (float) Math.Sign(dust.velocity.Y) * 1.2f; + dust.fadeIn += 0.5f; + } + } + } + this.rotation = this.velocity.ToRotation() + 1.570796f; + } + + private void AI_134_Ballista() + { + float shot_range = 900f; + float deadBottomAngle = 0.75f; + Vector2 center = this.Center; + int Type = 680; + float num1 = 16f; + int num2 = 1; + int num3 = 5; + int num4 = 5; + int num5 = 180; + if (Main.player[this.owner].setSquireT2) + num1 = 21f; + if (Main.player[this.owner].setSquireT3) + num5 = 100; + if (Main.player[this.owner].ballistaPanic) + num5 = 60; + if (Main.player[this.owner].ballistaPanic && Main.player[this.owner].setSquireT3) + num5 = 30; + int num6 = num4; + if (this.type == 677) + center.Y -= 4f; + if ((double) this.ai[0] == 0.0) + { + this.direction = this.spriteDirection = Main.player[this.owner].direction; + this.ai[0] = 1f; + this.ai[1] = 0.0f; + this.netUpdate = true; + if (this.direction == -1) + this.rotation = 3.141593f; + } + if ((double) this.ai[0] == 1.0) + { + this.frame = 0; + bool flag = false; + if (Main.player[this.owner].ballistaPanic && (double) this.ai[1] > 60.0) + this.ai[1] = 60f; + if (Main.player[this.owner].ballistaPanic && Main.player[this.owner].setSquireT3 && (double) this.ai[1] > 30.0) + this.ai[1] = 30f; + if ((double) this.ai[1] > 0.0) + --this.ai[1]; + else + flag = true; + int target = this.AI_134_Ballista_FindTarget(shot_range, deadBottomAngle, center); + if (target != -1) + { + Vector2 v = (Main.npc[target].Center - center).SafeNormalize(Vector2.UnitY); + this.rotation = this.rotation.AngleLerp(v.ToRotation(), 0.08f); + if ((double) this.rotation > 1.57079637050629 || (double) this.rotation < -1.57079637050629) + this.direction = -1; + else + this.direction = 1; + if (flag && this.owner == Main.myPlayer) + { + this.direction = Math.Sign(v.X); + this.ai[0] = 2f; + this.ai[1] = 0.0f; + this.netUpdate = true; + } + } + else + { + float targetAngle = 0.0f; + if (this.direction == -1) + targetAngle = 3.141593f; + this.rotation = this.rotation.AngleLerp(targetAngle, 0.05f); + } + } + else if ((double) this.ai[0] == 2.0) + { + this.frame = num2 + (int) ((double) this.ai[1] / (double) num4); + if ((double) this.ai[1] == (double) num6) + { + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_BallistaTowerShot, this.Center); + Vector2 v = new Vector2((float) this.direction, 0.0f); + int target = this.AI_134_Ballista_FindTarget(shot_range, deadBottomAngle, center); + if (target != -1) + v = (Main.npc[target].Center - center).SafeNormalize(Vector2.UnitX * (float) this.direction); + this.rotation = v.ToRotation(); + if ((double) this.rotation > 1.57079637050629 || (double) this.rotation < -1.57079637050629) + this.direction = -1; + else + this.direction = 1; + Vector2 velocity = v * num1; + if (this.owner == Main.myPlayer) + Projectile.NewProjectile(center, velocity, Type, this.damage, this.knockBack, this.owner); + } + if ((double) ++this.ai[1] >= (double) (num3 * num4)) + { + this.ai[0] = 1f; + this.ai[1] = (float) num5; + } + } + this.spriteDirection = this.direction; + this.tileCollide = true; + this.velocity.Y += 0.2f; + } + + private void AI_135_OgreStomp() + { + float num1 = 40f; + if (this.type == 922) + num1 = 30f; + ++this.ai[0]; + if ((double) this.ai[0] > 9.0) + { + this.Kill(); + } + else + { + this.velocity = Vector2.Zero; + this.position = this.Center; + this.Size = new Vector2(16f, 16f) * MathHelper.Lerp(5f, num1, Utils.GetLerpValue(0.0f, 9f, this.ai[0], false)); + this.Center = this.position; + Point tileCoordinates1 = this.TopLeft.ToTileCoordinates(); + Point tileCoordinates2 = this.BottomRight.ToTileCoordinates(); + int num2 = tileCoordinates1.X / 2 + tileCoordinates2.X / 2; + int num3 = this.width / 2; + if ((int) this.ai[0] % 3 != 0) + return; + int num4 = (int) this.ai[0] / 3; + for (int x = tileCoordinates1.X; x <= tileCoordinates2.X; ++x) + { + for (int y = tileCoordinates1.Y; y <= tileCoordinates2.Y; ++y) + { + if ((double) Vector2.Distance(this.Center, new Vector2((float) (x * 16), (float) (y * 16))) <= (double) num3) + { + Tile tileSafely1 = Framing.GetTileSafely(x, y); + if (tileSafely1.active() && Main.tileSolid[(int) tileSafely1.type] && !Main.tileSolidTop[(int) tileSafely1.type] && !Main.tileFrameImportant[(int) tileSafely1.type]) + { + Tile tileSafely2 = Framing.GetTileSafely(x, y - 1); + if (!tileSafely2.active() || !Main.tileSolid[(int) tileSafely2.type] || Main.tileSolidTop[(int) tileSafely2.type]) + { + int tileDustAmount = WorldGen.KillTile_GetTileDustAmount(true, tileSafely1); + for (int index = 0; index < tileDustAmount; ++index) + { + Dust dust = Main.dust[WorldGen.KillTile_MakeTileDust(x, y, tileSafely1)]; + dust.velocity.Y -= (float) (3.0 + (double) num4 * 1.5); + dust.velocity.Y *= Main.rand.NextFloat(); + dust.velocity.Y *= 0.75f; + dust.scale += (float) num4 * 0.03f; + } + if (num4 >= 2) + { + if (this.type == 922) + { + Color dustColor = NPC.AI_121_QueenSlime_GetDustColor(); + dustColor.A = (byte) 150; + for (int index1 = 0; index1 < tileDustAmount - 1; ++index1) + { + int index2 = Dust.NewDust(this.position, 12, 12, 4, Alpha: 50, newColor: dustColor, Scale: 1.5f); + Main.dust[index2].velocity.Y -= (float) (0.100000001490116 + (double) num4 * 0.5); + Main.dust[index2].velocity.Y *= Main.rand.NextFloat(); + Main.dust[index2].velocity.X *= Main.rand.NextFloatDirection() * 3f; + Main.dust[index2].position = new Vector2((float) (x * 16 + Main.rand.Next(16)), (float) (y * 16 + Main.rand.Next(16))); + if (Main.rand.Next(3) != 0) + { + Main.dust[index2].velocity *= 0.5f; + Main.dust[index2].noGravity = true; + } + } + } + else + { + for (int index = 0; index < tileDustAmount - 1; ++index) + { + Dust dust = Main.dust[WorldGen.KillTile_MakeTileDust(x, y, tileSafely1)]; + dust.velocity.Y -= 1f + (float) num4; + dust.velocity.Y *= Main.rand.NextFloat(); + dust.velocity.Y *= 0.75f; + } + } + } + if (tileDustAmount > 0 && Main.rand.Next(3) != 0) + { + float num5 = (float) Math.Abs(num2 - x) / (num1 / 2f); + if (this.type == 922) + { + Color dustColor = NPC.AI_121_QueenSlime_GetDustColor(); + dustColor.A = (byte) 150; + for (int index3 = 0; index3 < 3; ++index3) + { + int index4 = Dust.NewDust(this.position, this.width, this.height, 31, Alpha: 50, newColor: dustColor, Scale: ((float) (2.0 - (double) num4 * 0.150000005960464 + (double) num5 * 0.5))); + Main.dust[index4].velocity.Y -= (float) (0.100000001490116 + (double) num4 * 0.5 + (double) num5 * (double) num4 * 1.0); + Main.dust[index4].velocity.Y *= Main.rand.NextFloat(); + Main.dust[index4].velocity.X *= Main.rand.NextFloatDirection() * 3f; + Main.dust[index4].position = new Vector2((float) (x * 16 + 20), (float) (y * 16 + 20)); + if (Main.rand.Next(3) != 0) + { + Main.dust[index4].velocity *= 0.5f; + Main.dust[index4].noGravity = true; + } + } + } + else + { + Gore gore = Gore.NewGoreDirect(this.position, Vector2.Zero, 61 + Main.rand.Next(3), (float) (1.0 - (double) num4 * 0.150000005960464 + (double) num5 * 0.5)); + gore.velocity.Y -= (float) (0.100000001490116 + (double) num4 * 0.5 + (double) num5 * (double) num4 * 1.0); + gore.velocity.Y *= Main.rand.NextFloat(); + gore.position = new Vector2((float) (x * 16 + 20), (float) (y * 16 + 20)); + } + } + } + } + } + } + } + } + } + + private void AI_136_BetsyBreath() + { + if ((double) this.ai[1] < 0.0 || (double) this.ai[1] > 200.0) + { + this.Kill(); + } + else + { + NPC npc = Main.npc[(int) this.ai[1]]; + float num1 = -8f; + this.Center = npc.Center + new Vector2((110f + num1) * (float) npc.spriteDirection, 30f).RotatedBy((double) npc.rotation); + this.rotation = npc.DirectionTo(this.Center).ToRotation(); + DelegateMethods.v3_1 = new Vector3(1.2f, 1f, 0.3f); + float num2 = this.ai[0] / 40f; + if ((double) num2 > 1.0) + num2 = 1f; + float num3 = (float) (((double) this.ai[0] - 38.0) / 40.0); + if ((double) num3 < 0.0) + num3 = 0.0f; + Utils.PlotTileLine(this.Center + this.rotation.ToRotationVector2() * 400f * num3, this.Center + this.rotation.ToRotationVector2() * 400f * num2, 16f, new Utils.TileActionAttempt(DelegateMethods.CastLight)); + Utils.PlotTileLine(this.Center + this.rotation.ToRotationVector2().RotatedBy(0.196349546313286) * 400f * num3, this.Center + this.rotation.ToRotationVector2().RotatedBy(0.196349546313286) * 400f * num2, 16f, new Utils.TileActionAttempt(DelegateMethods.CastLight)); + Utils.PlotTileLine(this.Center + this.rotation.ToRotationVector2().RotatedBy(-0.196349546313286) * 400f * num3, this.Center + this.rotation.ToRotationVector2().RotatedBy(-0.196349546313286) * 400f * num2, 16f, new Utils.TileActionAttempt(DelegateMethods.CastLight)); + if ((double) num3 == 0.0 && (double) num2 > 0.100000001490116) + { + for (int index = 0; index < 3; ++index) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 6); + dust.fadeIn = 1.5f; + dust.velocity = this.rotation.ToRotationVector2().RotatedBy((double) Main.rand.NextFloatDirection() * 0.261799395084381) * (float) (0.5 + (double) Main.rand.NextFloat() * 2.5) * 15f; + dust.velocity += npc.velocity * 2f; + dust.noLight = true; + dust.noGravity = true; + dust.alpha = 200; + } + } + if (Main.rand.Next(5) == 0 && (double) this.ai[0] >= 15.0) + { + Gore gore = Gore.NewGoreDirect(this.Center + this.rotation.ToRotationVector2() * 300f - Utils.RandomVector2(Main.rand, -20f, 20f), Vector2.Zero, 61 + Main.rand.Next(3), 0.5f); + gore.velocity *= 0.3f; + gore.velocity += this.rotation.ToRotationVector2() * 4f; + } + for (int index = 0; index < 1; ++index) + { + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 31); + dust.fadeIn = 1.5f; + dust.scale = 0.4f; + dust.velocity = this.rotation.ToRotationVector2().RotatedBy((double) Main.rand.NextFloatDirection() * 0.261799395084381) * (float) (0.5 + (double) Main.rand.NextFloat() * 2.5) * 15f; + dust.velocity += npc.velocity * 2f; + dust.velocity *= 0.3f; + dust.noLight = true; + dust.noGravity = true; + float amount = Main.rand.NextFloat(); + dust.position = Vector2.Lerp(this.Center + this.rotation.ToRotationVector2() * 400f * num3, this.Center + this.rotation.ToRotationVector2() * 400f * num2, amount); + dust.position += this.rotation.ToRotationVector2().RotatedBy(1.57079637050629) * (float) (20.0 + 100.0 * ((double) amount - 0.5)); + } + ++this.frameCounter; + ++this.ai[0]; + if ((double) this.ai[0] < 78.0) + return; + this.Kill(); + } + } + + private void AI_137_LightningAura() + { + int maxDistance = 10; + int num1 = 999; + int num2 = 30; + int num3 = 40; + int num4 = 4; + this.knockBack = 0.0f; + if (Main.player[this.owner].setMonkT2) + num2 -= 5; + if (Main.player[this.owner].setMonkT3) + { + maxDistance = 14; + num4 = 8; + } + ++this.ai[0]; + if ((double) this.ai[0] >= (double) num2) + this.ai[0] = 0.0f; + if ((double) this.ai[0] == 0.0) + { + bool flag = false; + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.CanBeChasedBy((object) this) && (double) npc.Hitbox.Distance(this.Center) < (double) (this.width / 2) && this.Colliding(this.Hitbox, npc.Hitbox)) + { + flag = true; + break; + } + } + if (flag) + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_LightningAuraZap, this.Center); + } + if ((double) this.localAI[0] == 0.0) + { + this.localAI[0] = 1f; + this.velocity = Vector2.Zero; + Point tileCoordinates = this.Center.ToTileCoordinates(); + bool flag = true; + Point result1; + if (!WorldUtils.Find(tileCoordinates, Searches.Chain((GenSearch) new Searches.Down(500), (GenCondition) Projectile._cachedConditions_notNull, (GenCondition) Projectile._cachedConditions_solid), out result1)) + { + this.position.Y += 16f; + return; + } + Point result2; + if (!WorldUtils.Find(new Point(result1.X, result1.Y - 1), Searches.Chain((GenSearch) new Searches.Up(maxDistance), (GenCondition) Projectile._cachedConditions_notNull, (GenCondition) Projectile._cachedConditions_solid), out result2)) + result2 = new Point(tileCoordinates.X, tileCoordinates.Y - maxDistance - 1); + int num5 = 0; + if (flag && Main.tile[result1.X, result1.Y] != null && Main.tile[result1.X, result1.Y].blockType() == 1) + num5 += 8; + Vector2 worldCoordinates1 = result1.ToWorldCoordinates(autoAddY: ((float) num5)); + Vector2 worldCoordinates2 = result2.ToWorldCoordinates(autoAddY: 0.0f); + this.Size = new Vector2(1f, worldCoordinates1.Y - worldCoordinates2.Y); + if (this.height > maxDistance * 16) + this.height = maxDistance * 16; + if (this.height < num4 * 16) + this.height = num4 * 16; + this.height *= 2; + this.width = (int) ((double) this.height * 1.0); + if (this.width > num1) + this.width = num1; + this.Center = worldCoordinates1; + } + if (++this.frameCounter >= 8) + { + this.frameCounter = 0; + if (++this.frame >= Main.projFrames[this.type]) + this.frame = 0; + } + DelegateMethods.v3_1 = new Vector3(0.2f, 0.7f, 1f); + Utils.PlotTileLine(this.Center + Vector2.UnitX * -40f, this.Center + Vector2.UnitX * 40f, 80f, new Utils.TileActionAttempt(DelegateMethods.CastLightOpen)); + Vector2 vector2_1 = new Vector2(this.Top.X, this.position.Y + (float) num3); + for (int index = 0; index < 4; ++index) + { + if (Main.rand.Next(6) == 0) + { + Vector2 vector2_2 = Main.rand.NextVector2Unit(); + if ((double) Math.Abs(vector2_2.X) >= 0.119999997317791) + { + Vector2 vector2_3 = this.Center + vector2_2 * new Vector2((float) ((this.height - num3) / 2)); + if (!WorldGen.SolidTile((int) vector2_3.X / 16, (int) vector2_3.Y / 16) && this.AI_137_CanHit(vector2_3)) + { + Dust dust = Dust.NewDustDirect(vector2_3, 0, 0, 226, Alpha: 100); + dust.position = vector2_3; + dust.velocity = (vector2_1 - dust.position).SafeNormalize(Vector2.Zero); + dust.scale = 0.7f; + dust.fadeIn = 1f; + dust.noGravity = true; + dust.noLight = true; + } + } + } + } + for (int index = 0; index < 0; ++index) + { + if (Main.rand.Next(10) == 0) + { + Vector2 vector2_4 = Main.rand.NextVector2Unit(); + if ((double) Math.Abs(vector2_4.X) >= 0.119999997317791) + { + Vector2 vector2_5 = this.Center + vector2_4 * new Vector2((float) ((this.height - num3) / 2)) * Main.rand.NextFloat(); + if (!WorldGen.SolidTile((int) vector2_5.X / 16, (int) vector2_5.Y / 16) && this.AI_137_CanHit(vector2_5)) + { + Dust dust = Dust.NewDustDirect(vector2_5, 0, 0, 226, Alpha: 100); + dust.velocity *= 0.6f; + dust.velocity += Vector2.UnitY * -2f; + dust.noGravity = true; + dust.noLight = true; + } + } + } + } + for (int index = 0; index < 4; ++index) + { + if (Main.rand.Next(10) == 0) + { + Dust dust = Dust.NewDustDirect(vector2_1 - new Vector2(8f, 0.0f), 16, this.height / 2 - 40, 226, Alpha: 100); + dust.velocity *= 0.6f; + dust.velocity += Vector2.UnitY * -2f; + dust.scale = 0.7f; + dust.noGravity = true; + dust.noLight = true; + } + } + this.tileCollide = true; + this.velocity.Y += 0.2f; + } + + private void AI_138_ExplosiveTrap() + { + this.spriteDirection = this.direction = 1; + int num1 = 110; + int Type = 694; + int num2 = 48; + if (Main.player[this.owner].setHuntressT2) + num1 = 74; + if (Main.player[this.owner].setHuntressT3) + num1 = 40; + switch (this.type) + { + case 692: + Type = 695; + break; + case 693: + Type = 696; + break; + } + Lighting.AddLight(this.Center, 0.6f, 0.5f, 0.3f); + if (++this.frameCounter >= 12) + { + this.frameCounter = 0; + if (++this.frame >= Main.projFrames[this.type]) + this.frame = 0; + } + if ((double) this.localAI[0] > 0.0) + --this.localAI[0]; + if ((double) this.localAI[0] <= 0.0 && this.owner == Main.myPlayer) + { + this.localAI[0] = 3f; + bool flag = false; + Microsoft.Xna.Framework.Rectangle rectangle = Utils.CenteredRectangle(this.Center + new Vector2(0.0f, (float) -num2), new Vector2((float) (num2 * 2))); + for (int index = 0; index < 200; ++index) + { + NPC npc = Main.npc[index]; + if (npc.CanBeChasedBy((object) this) && rectangle.Intersects(npc.Hitbox)) + { + flag = true; + break; + } + } + if (flag) + { + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_ExplosiveTrapExplode); + this.localAI[0] = (float) num1; + Projectile.NewProjectile(this.Center + new Vector2(0.0f, (float) -num2), Vector2.Zero, Type, this.damage, this.knockBack, this.owner); + } + } + this.tileCollide = true; + this.velocity.Y += 0.2f; + } + + private void AI_139_ExplosiveTrapExplosion() + { + int projFrame = Main.projFrames[this.type]; + int num = 3; + this.alpha -= 25; + if (this.alpha < 0) + this.alpha = 0; + if ((double) this.localAI[0] == 0.0) + this.localAI[0] = 1f; + if (++this.frameCounter >= num) + { + this.frameCounter = 0; + if (++this.frame >= projFrame) + { + this.Kill(); + return; + } + } + DelegateMethods.v3_1 = new Vector3(1.3f, 0.9f, 0.2f); + Utils.PlotTileLine(this.Top, this.Bottom, 2f, new Utils.TileActionAttempt(DelegateMethods.CastLightOpen)); + } + + private void AI_140_MonkStaffT1() + { + float num1 = 50f; + float num2 = 2f; + float num3 = 20f; + Player player = Main.player[this.owner]; + float num4 = -0.7853982f; + Vector2 vector2_1 = player.RotatedRelativePoint(player.MountedCenter); + Vector2 vector2_2 = Vector2.Zero; + if (player.dead) + { + this.Kill(); + } + else + { + if (this.type == 697) + { + int Damage = this.damage * 3; + int num5 = Math.Sign(this.velocity.X); + this.velocity = new Vector2((float) num5, 0.0f); + if ((double) this.ai[0] == 0.0) + { + this.rotation = (float) ((double) new Vector2((float) num5, -player.gravDir).ToRotation() + (double) num4 + 3.14159274101257); + if ((double) this.velocity.X < 0.0) + this.rotation -= 1.570796f; + } + this.alpha -= 128; + if (this.alpha < 0) + this.alpha = 0; + double num6 = (double) this.ai[0] / (double) num1; + ++this.ai[0]; + this.rotation += 6.283185f * num2 / num1 * (float) num5; + bool flag = (double) this.ai[0] == (double) (int) ((double) num1 / 2.0); + if ((double) this.ai[0] >= (double) num1 || flag && !player.controlUseItem) + { + this.Kill(); + player.reuseDelay = 10; + } + else if (flag) + { + Vector2 mouseWorld = Main.MouseWorld; + int dir = (double) player.DirectionTo(mouseWorld).X > 0.0 ? 1 : -1; + if ((double) dir != (double) this.velocity.X) + { + player.ChangeDir(dir); + this.velocity = new Vector2((float) dir, 0.0f); + this.netUpdate = true; + this.rotation -= 3.141593f; + } + } + float num7 = this.rotation - 0.7853982f * (float) num5; + vector2_2 = (num7 + (num5 == -1 ? 3.141593f : 0.0f)).ToRotationVector2() * (this.ai[0] / num1) * num3; + Vector2 vec = this.Center + (num7 + (num5 == -1 ? 3.141593f : 0.0f)).ToRotationVector2() * 30f; + if (Main.rand.Next(2) == 0) + { + Dust dust = Dust.NewDustDirect(vec - new Vector2(5f), 10, 10, 31, player.velocity.X, player.velocity.Y, 150); + dust.velocity = this.DirectionTo(dust.position) * 0.1f + dust.velocity * 0.1f; + } + if (num6 >= 0.75) + { + Dust dust = Dust.NewDustDirect(vec - new Vector2(5f), 10, 10, 55, player.velocity.X, player.velocity.Y, 50); + dust.velocity = this.DirectionTo(dust.position) * 0.1f + dust.velocity * 0.1f; + dust.noGravity = true; + dust.color = new Color(20, (int) byte.MaxValue, 100, 160); + } + if ((double) this.ai[0] >= (double) num1 - 8.0 && (double) this.ai[0] < (double) num1 - 2.0) + { + for (int index = 0; index < 5; ++index) + { + Dust dust = Dust.NewDustDirect(vec - new Vector2(5f), 10, 10, 55, player.velocity.X, player.velocity.Y, 50); + dust.velocity *= 1.2f; + dust.noGravity = true; + dust.scale += 0.1f; + dust.color = new Color(20, (int) byte.MaxValue, 100, 160); + } + } + if ((double) this.ai[0] == (double) num1 - 3.0 && this.owner == Main.myPlayer) + { + if ((double) this.localAI[1] != 1.0) + { + if (!WorldUtils.Find(vec.ToTileCoordinates(), Searches.Chain((GenSearch) new Searches.Down(4), (GenCondition) Projectile._cachedConditions_notNull, (GenCondition) Projectile._cachedConditions_solid), out Point _)) + { + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_MonkStaffGroundMiss, this.Center); + goto label_26; + } + } + Projectile.NewProjectile(vec + new Vector2((float) (num5 * 20), -60f), Vector2.Zero, 698, Damage, 0.0f, this.owner); + SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_MonkStaffGroundImpact, this.Center); + } + } +label_26: + if (this.type == 707) + { + Lighting.AddLight(player.Center, 0.75f, 0.9f, 1.15f); + int num8 = Math.Sign(this.velocity.X); + this.velocity = new Vector2((float) num8, 0.0f); + if ((double) this.ai[0] == 0.0) + { + this.rotation = (float) ((double) new Vector2((float) num8, -player.gravDir).ToRotation() + (double) num4 + 3.14159274101257); + if ((double) this.velocity.X < 0.0) + this.rotation -= 1.570796f; + } + this.alpha -= 128; + if (this.alpha < 0) + this.alpha = 0; + double num9 = (double) this.ai[0] / (double) num1; + float num10 = 1f; + this.ai[0] += num10; + this.rotation += 6.283185f * num2 / num1 * (float) num8; + bool flag = (double) this.ai[0] == (double) (int) ((double) num1 / 2.0); + if ((double) this.ai[0] >= (double) num1 || flag && !player.controlUseItem) + { + this.Kill(); + player.reuseDelay = 2; + } + else if (flag) + { + Vector2 mouseWorld = Main.MouseWorld; + int dir = (double) player.DirectionTo(mouseWorld).X > 0.0 ? 1 : -1; + if ((double) dir != (double) this.velocity.X) + { + player.ChangeDir(dir); + this.velocity = new Vector2((float) dir, 0.0f); + this.netUpdate = true; + this.rotation -= 3.141593f; + } + } + if (((double) this.ai[0] == (double) num10 || (double) this.ai[0] == (double) (int) ((double) num1 / 2.0) && this.active) && this.owner == Main.myPlayer) + { + Vector2 mouseWorld = Main.MouseWorld; + Vector2 vector2_3 = player.DirectionTo(mouseWorld) * 0.0f; + } + float f = this.rotation - 0.7853982f * (float) num8; + vector2_2 = (f + (num8 == -1 ? 3.141593f : 0.0f)).ToRotationVector2() * (this.ai[0] / num1) * num3; + Vector2 vector2_4 = this.Center + (f + (num8 == -1 ? 3.141593f : 0.0f)).ToRotationVector2() * 30f; + Vector2 rotationVector2 = f.ToRotationVector2(); + Vector2 vector2_5 = rotationVector2.RotatedBy(1.57079637050629 * (double) this.spriteDirection); + if (Main.rand.Next(2) == 0) + { + Dust dust = Dust.NewDustDirect(vector2_4 - new Vector2(5f), 10, 10, 31, player.velocity.X, player.velocity.Y, 150); + dust.velocity = this.DirectionTo(dust.position) * 0.1f + dust.velocity * 0.1f; + } + for (int index = 0; index < 4; ++index) + { + float num11 = 1f; + float num12 = 1f; + switch (index - 1) + { + case 0: + num12 = -1f; + break; + case 1: + num12 = 1.25f; + num11 = 0.5f; + break; + case 2: + num12 = -1.25f; + num11 = 0.5f; + break; + } + if (Main.rand.Next(6) != 0) + { + Dust dust = Dust.NewDustDirect(this.position, 0, 0, 226, Alpha: 100); + dust.position = this.Center + rotationVector2 * (float) (60.0 + (double) Main.rand.NextFloat() * 20.0) * num12; + dust.velocity = vector2_5 * (float) (4.0 + 4.0 * (double) Main.rand.NextFloat()) * num12 * num11; + dust.noGravity = true; + dust.noLight = true; + dust.scale = 0.5f; + dust.customData = (object) this; + if (Main.rand.Next(4) == 0) + dust.noGravity = false; + } + } + } + this.position = vector2_1 - this.Size / 2f; + this.position = this.position + vector2_2; + this.spriteDirection = this.direction; + this.timeLeft = 2; + player.ChangeDir(this.direction); + player.heldProj = this.whoAmI; + player.SetDummyItemTime(2); + player.itemRotation = MathHelper.WrapAngle(this.rotation); + } + } + + private void AI_141_MonkStaffT1Explosion() + { + Point tileCoordinates1 = this.TopLeft.ToTileCoordinates(); + Point tileCoordinates2 = this.BottomRight.ToTileCoordinates(); + int num1 = tileCoordinates1.X / 2; + int num2 = tileCoordinates2.X / 2; + int width = this.width; + ++this.ai[0]; + if ((double) this.ai[0] > 20.0) + { + this.Kill(); + } + else + { + if ((double) this.ai[0] != 1.0) + return; + bool causedShockwaves; + this.CreateImpactExplosion(6, this.Bottom, ref tileCoordinates1, ref tileCoordinates2, width, out causedShockwaves); + this.CreateImpactExplosion2_SleepyOctopod(this.Bottom, causedShockwaves); + } + } + + private void CreateImpactExplosion( + int dustAmountMultiplier, + Vector2 explosionOrigin, + ref Point scanAreaStart, + ref Point scanAreaEnd, + int explosionRange, + out bool causedShockwaves) + { + causedShockwaves = false; + int num1 = 4; + for (int x = scanAreaStart.X; x <= scanAreaEnd.X; ++x) + { + for (int y = scanAreaStart.Y; y <= scanAreaEnd.Y; ++y) + { + if ((double) Vector2.Distance(explosionOrigin, new Vector2((float) (x * 16), (float) (y * 16))) <= (double) explosionRange) + { + Tile tileSafely1 = Framing.GetTileSafely(x, y); + if (tileSafely1.active() && Main.tileSolid[(int) tileSafely1.type] && !Main.tileSolidTop[(int) tileSafely1.type] && !Main.tileFrameImportant[(int) tileSafely1.type]) + { + Tile tileSafely2 = Framing.GetTileSafely(x, y - 1); + if (!tileSafely2.active() || !Main.tileSolid[(int) tileSafely2.type] || Main.tileSolidTop[(int) tileSafely2.type]) + { + int num2 = WorldGen.KillTile_GetTileDustAmount(true, tileSafely1) * dustAmountMultiplier; + for (int index = 0; index < num2; ++index) + { + Dust dust = Main.dust[WorldGen.KillTile_MakeTileDust(x, y, tileSafely1)]; + dust.velocity.Y -= (float) (3.0 + (double) num1 * 1.5); + dust.velocity.Y *= Main.rand.NextFloat(); + dust.scale += (float) num1 * 0.03f; + } + if (num1 >= 2) + { + for (int index = 0; index < num2 - 1; ++index) + { + Dust dust = Main.dust[WorldGen.KillTile_MakeTileDust(x, y, tileSafely1)]; + dust.velocity.Y -= 1f + (float) num1; + dust.velocity.Y *= Main.rand.NextFloat(); + } + } + if (num2 > 0) + causedShockwaves = true; + } + } + } + } + } + } + + private void CreateImpactExplosion2_SleepyOctopod( + Vector2 explosionOrigin, + bool causedShockwaves) + { + Vector2 vector2_1 = explosionOrigin; + Vector2 spinningpoint = new Vector2(7f, 0.0f); + Vector2 vector2_2 = new Vector2(1f, 0.7f); + Color color = new Color(20, (int) byte.MaxValue, 100, 200); + for (float num = 0.0f; (double) num < 25.0; ++num) + { + Vector2 vector2_3 = spinningpoint.RotatedBy((double) num * 6.28318548202515 / 25.0) * vector2_2; + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 55); + dust.alpha = 0; + if (!causedShockwaves) + dust.alpha = 50; + dust.color = color; + dust.position = vector2_1 + vector2_3; + dust.velocity.Y -= 3f; + dust.velocity.X *= 0.5f; + dust.fadeIn = (float) (0.5 + (double) Main.rand.NextFloat() * 0.5); + dust.noLight = true; + } + if (causedShockwaves) + return; + for (float num = 0.0f; (double) num < 25.0; ++num) + { + Vector2 vector2_4 = spinningpoint.RotatedBy((double) num * 6.28318548202515 / 25.0) * vector2_2; + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 55); + dust.alpha = 100; + dust.color = color; + dust.position = vector2_1 + vector2_4; + dust.velocity.Y -= 5f; + dust.velocity.X *= 0.8f; + dust.fadeIn = (float) (0.5 + (double) Main.rand.NextFloat() * 0.5); + dust.noLight = true; + } + } + + private void CreateImpactExplosion2_FlailTileCollision( + Vector2 explosionOrigin, + bool causedShockwaves, + Vector2 velocityBeforeCollision) + { + Vector2 vector2_1 = explosionOrigin; + Vector2 spinningpoint = new Vector2(7f, 0.0f); + Vector2 vector2_2 = new Vector2(1f, 0.7f); + Color color = Color.White * 0.5f; + Vector2 vector2_3 = velocityBeforeCollision.SafeNormalize(Vector2.Zero); + for (float num = 0.0f; (double) num < 8.0; ++num) + { + Vector2 vector2_4 = spinningpoint.RotatedBy((double) num * 6.28318548202515 / 8.0) * vector2_2; + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 31); + dust.alpha = 0; + if (!causedShockwaves) + dust.alpha = 50; + dust.color = color; + dust.position = vector2_1 + vector2_4; + dust.velocity.Y -= 0.8f; + dust.velocity.X *= 0.8f; + dust.fadeIn = (float) (0.300000011920929 + (double) Main.rand.NextFloat() * 0.400000005960464); + dust.scale = 0.4f; + dust.noLight = true; + dust.velocity += vector2_3 * 2f; + } + if (causedShockwaves) + return; + for (float num = 0.0f; (double) num < 8.0; ++num) + { + Vector2 vector2_5 = spinningpoint.RotatedBy((double) num * 6.28318548202515 / 8.0) * vector2_2; + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 31); + dust.alpha = 100; + dust.color = color; + dust.position = vector2_1 + vector2_5; + --dust.velocity.Y; + dust.velocity.X *= 0.4f; + dust.fadeIn = (float) (0.300000011920929 + (double) Main.rand.NextFloat() * 0.400000005960464); + dust.scale = 0.4f; + dust.noLight = true; + dust.velocity += vector2_3 * 1.5f; + } + } + + private void AI_142_MonkStaffT2And3() + { + Player player = Main.player[this.owner]; + Vector2 vector2_1 = player.RotatedRelativePoint(player.MountedCenter); + this.direction = player.direction; + player.heldProj = this.whoAmI; + this.Center = vector2_1; + if (player.dead) + { + this.Kill(); + } + else + { + if (!player.frozen) + { + if (this.type == 699) + { + this.spriteDirection = this.direction = player.direction; + Vector2 Origin = vector2_1; + this.alpha -= (int) sbyte.MaxValue; + if (this.alpha < 0) + this.alpha = 0; + if ((double) this.localAI[0] > 0.0) + --this.localAI[0]; + float num1 = 1f - (float) player.itemAnimation / (float) player.itemAnimationMax; + float rotation = this.velocity.ToRotation(); + float x = this.velocity.Length(); + float num2 = 22f; + Vector2 spinningpoint1 = new Vector2(1f, 0.0f).RotatedBy(3.14159274101257 + (double) num1 * 6.28318548202515) * new Vector2(x, this.ai[0]); + this.position = this.position + (spinningpoint1.RotatedBy((double) rotation) + new Vector2(x + num2, 0.0f).RotatedBy((double) rotation)); + Vector2 Target = Origin + spinningpoint1.RotatedBy((double) rotation) + new Vector2((float) ((double) x + (double) num2 + 40.0), 0.0f).RotatedBy((double) rotation); + this.rotation = Origin.AngleTo(Target) + 0.7853982f * (float) player.direction; + if (this.spriteDirection == -1) + this.rotation += 3.141593f; + Origin.DirectionTo(this.Center); + Vector2 vector2_2 = Origin.DirectionTo(Target); + Vector2 spinningpoint2 = this.velocity.SafeNormalize(Vector2.UnitY); + float num3 = 2f; + for (int index = 0; (double) index < (double) num3; ++index) + { + Dust dust = Dust.NewDustDirect(this.Center, 14, 14, 228, Alpha: 110); + dust.velocity = Origin.DirectionTo(dust.position) * 2f; + dust.position = this.Center + spinningpoint2.RotatedBy((double) num1 * 6.28318548202515 * 2.0 + (double) index / (double) num3 * 6.28318548202515) * 10f; + dust.scale = (float) (1.0 + 0.600000023841858 * (double) Main.rand.NextFloat()); + dust.velocity += spinningpoint2 * 3f; + dust.noGravity = true; + } + for (int index = 0; index < 1; ++index) + { + if (Main.rand.Next(3) == 0) + { + Dust dust = Dust.NewDustDirect(this.Center, 20, 20, 228, Alpha: 110); + dust.velocity = Origin.DirectionTo(dust.position) * 2f; + dust.position = this.Center + vector2_2 * -110f; + dust.scale = (float) (0.449999988079071 + 0.400000005960464 * (double) Main.rand.NextFloat()); + dust.fadeIn = (float) (0.699999988079071 + 0.400000005960464 * (double) Main.rand.NextFloat()); + dust.noGravity = true; + dust.noLight = true; + } + } + } + else if (this.type == 708) + { + Lighting.AddLight(player.Center, 0.75f, 0.9f, 1.15f); + this.spriteDirection = this.direction = player.direction; + this.alpha -= (int) sbyte.MaxValue; + if (this.alpha < 0) + this.alpha = 0; + float num4 = 1f - (float) player.itemAnimation / (float) player.itemAnimationMax; + float rotation = this.velocity.ToRotation(); + float x = this.velocity.Length(); + float num5 = 22f; + Vector2 spinningpoint3 = new Vector2(1f, 0.0f).RotatedBy(3.14159274101257 + (double) num4 * 6.28318548202515) * new Vector2(x, this.ai[0]); + this.position = this.position + (spinningpoint3.RotatedBy((double) rotation) + new Vector2(x + num5, 0.0f).RotatedBy((double) rotation)); + Vector2 vector2_3 = vector2_1 + spinningpoint3.RotatedBy((double) rotation) + new Vector2((float) ((double) x + (double) num5 + 40.0), 0.0f).RotatedBy((double) rotation); + this.rotation = (vector2_3 - vector2_1).SafeNormalize(Vector2.UnitX).ToRotation() + 0.7853982f * (float) player.direction; + if (this.spriteDirection == -1) + this.rotation += 3.141593f; + (this.Center - vector2_1).SafeNormalize(Vector2.Zero); + (vector2_3 - vector2_1).SafeNormalize(Vector2.Zero); + Vector2 spinningpoint4 = this.velocity.SafeNormalize(Vector2.UnitY); + if ((player.itemAnimation == 2 || player.itemAnimation == 6 || player.itemAnimation == 10) && this.owner == Main.myPlayer) + { + Vector2 vector2_4 = (spinningpoint4 + Main.rand.NextVector2Square(-0.2f, 0.2f)) * 12f; + switch (player.itemAnimation) + { + case 2: + vector2_4 = spinningpoint4.RotatedBy(0.383972465991974); + break; + case 6: + vector2_4 = spinningpoint4.RotatedBy(-0.383972465991974); + break; + case 10: + vector2_4 = spinningpoint4.RotatedBy(0.0); + break; + } + Projectile.NewProjectile(this.Center, vector2_4 * (10f + (float) Main.rand.Next(4)), 709, this.damage, 0.0f, this.owner); + } + for (int index = 0; index < 3; index += 2) + { + float num6 = 1f; + float num7 = 1f; + switch (index - 1) + { + case 0: + num7 = -1f; + break; + case 1: + num7 = 1.25f; + num6 = 0.5f; + break; + case 2: + num7 = -1.25f; + num6 = 0.5f; + break; + } + if (Main.rand.Next(6) != 0) + { + float num8 = num7 * 1.2f; + Dust dust = Dust.NewDustDirect(this.position, this.width, this.height, 226, Alpha: 100); + dust.velocity = spinningpoint4 * (float) (4.0 + 4.0 * (double) Main.rand.NextFloat()) * num8 * num6; + dust.noGravity = true; + dust.noLight = true; + dust.scale = 0.75f; + dust.fadeIn = 0.8f; + dust.customData = (object) this; + if (Main.rand.Next(3) == 0) + { + dust.noGravity = false; + dust.fadeIn = 0.0f; + } + } + } + } + } + if (player.itemAnimation != 2) + return; + this.Kill(); + player.reuseDelay = 2; + } + } + + private void AI_143_MonkStaffT2Ghast() + { + SlotId slotId; + if ((double) this.ai[0] == 0.0) + { + float[] localAi = this.localAI; + slotId = SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_GhastlyGlaiveImpactGhost, this.Center); + double num = (double) ((SlotId) ref slotId).ToFloat(); + localAi[1] = (float) num; + } + ActiveSound activeSound = SoundEngine.GetActiveSound(SlotId.FromFloat(this.localAI[1])); + if (activeSound == null) + { + float[] localAi = this.localAI; + slotId = (SlotId) SlotId.Invalid; + double num = (double) ((SlotId) ref slotId).ToFloat(); + localAi[1] = (float) num; + } + else + activeSound.Position = this.Center; + ++this.ai[0]; + if ((double) this.ai[0] > 50.0) + { + this.alpha += 25; + if (this.alpha > (int) byte.MaxValue) + this.alpha = (int) byte.MaxValue; + } + else + { + this.alpha -= 25; + if (this.alpha < 100) + this.alpha = 100; + } + this.velocity = this.velocity * 0.98f; + if (++this.frameCounter >= 5) + { + this.frameCounter = 0; + if (++this.frame >= 4) + this.frame = 0; + } + if ((double) this.ai[0] >= 60.0) + this.Kill(); + this.direction = this.spriteDirection = (double) this.velocity.X > 0.0 ? 1 : -1; + this.rotation = this.velocity.ToRotation(); + if (this.spriteDirection == -1) + this.rotation += 3.141593f; + if ((double) this.ai[0] < 10.0 || (double) this.ai[0] >= 34.0) + return; + Vector2 spinningpoint = this.velocity.SafeNormalize(Vector2.UnitY); + float num1 = this.ai[0] / 60f; + float num2 = 2f; + for (int index = 0; (double) index < (double) num2; ++index) + { + Dust dust = Dust.NewDustDirect(this.Center, 14, 14, 228, Alpha: 110); + dust.velocity = spinningpoint * 2f; + dust.position = this.Center + spinningpoint.RotatedBy((double) num1 * 6.28318548202515 * 2.0 + (double) index / (double) num2 * 6.28318548202515) * 7f; + dust.scale = (float) (1.0 + 0.600000023841858 * (double) Main.rand.NextFloat()); + dust.velocity += spinningpoint * 3f; + dust.noGravity = true; + } + } + + private void AI_144_DD2Pet() + { + Player player = Main.player[this.owner]; + float num1 = 4f; + int num2 = 6; + int num3 = 4; + int num4 = Main.projFrames[this.type]; + int num5 = 0; + float num6 = 0.08f; + bool flag1 = false; + float num7 = 0.1f; + Vector2 vector2_1 = new Vector2((float) (player.direction * 30), -20f); + if (player.dead) + { + this.Kill(); + } + else + { + bool flag2 = true; + switch (this.type) + { + case 701: + if (player.petFlagDD2Dragon) + { + this.timeLeft = 2; + break; + } + break; + case 702: + if (player.petFlagDD2Ghost) + this.timeLeft = 2; + vector2_1.Y += (float) Math.Cos((double) this.localAI[0] * 0.0523598790168762) * 2f; + num3 = 4; + num2 = 10; + flag2 = false; + num1 = 6f; + Vector2 vector2_2 = new Vector2(this.spriteDirection == -1 ? -6f : -2f, -26f).RotatedBy((double) this.rotation); + if (Main.rand.Next(24) == 0) + { + Dust dust = Dust.NewDustDirect(this.Center + vector2_2, 4, 4, 135, Alpha: 100); + if (Main.rand.Next(3) != 0) + { + dust.noGravity = true; + dust.velocity.Y -= 3f; + dust.noLight = true; + } + else if (Main.rand.Next(2) != 0) + dust.noLight = true; + dust.velocity *= 0.5f; + dust.velocity.Y -= 0.9f; + dust.scale += (float) (0.100000001490116 + (double) Main.rand.NextFloat() * 0.600000023841858); + } + DelegateMethods.v3_1 = new Vector3(0.3f, 0.5f, 1f); + Utils.PlotTileLine(this.Center, this.Center + this.velocity * 6f, 20f, new Utils.TileActionAttempt(DelegateMethods.CastLightOpen)); + Utils.PlotTileLine(this.Left, this.Right, 20f, new Utils.TileActionAttempt(DelegateMethods.CastLightOpen)); + Utils.PlotTileLine(player.Center, player.Center + player.velocity * 6f, 40f, new Utils.TileActionAttempt(DelegateMethods.CastLightOpen)); + Utils.PlotTileLine(player.Left, player.Right, 40f, new Utils.TileActionAttempt(DelegateMethods.CastLightOpen)); + break; + case 703: + if (player.petFlagDD2Gato) + this.timeLeft = 2; + vector2_1.Y += (float) Math.Cos((double) this.localAI[0] * 0.104719758033752) * 2f; + num2 = 4; + num3 = 2; + num1 = 3f; + num4 = 4; + break; + case 764: + num7 = 0.025f; + num6 = 0.04f; + flag1 = true; + ++this.localAI[0]; + if ((double) this.localAI[0] > 120.0) + this.localAI[0] = 0.0f; + this.localAI[1] += this.velocity.X * 0.01f; + this.localAI[1] += 0.008333334f; + if ((double) this.localAI[1] < -6.28318548202515) + this.localAI[1] += 6.283185f; + if ((double) this.localAI[1] > 6.28318548202515) + this.localAI[1] -= 6.283185f; + if ((double) this.velocity.Length() < 4.0) + { + this.localAI[1] *= 0.9f; + if ((double) this.velocity.Length() > 0.100000001490116 && Main.rand.Next(30) == 0) + { + Dust dust = Dust.NewDustDirect(this.position - this.velocity, this.width, this.height, 292, this.velocity.X * 0.5f, this.velocity.Y * 0.5f, 150); + dust.velocity *= 0.3f; + dust.noLightEmittence = true; + } + } + else + { + Vector2 vector2_3 = new Vector2((float) Main.screenWidth, (float) Main.screenHeight); + this.Hitbox.Intersects(Utils.CenteredRectangle(Main.screenPosition + vector2_3 / 2f, vector2_3 + new Vector2(400f))); + if (Main.rand.Next(15) == 0) + Dust.NewDustDirect(this.position - this.velocity, this.width, this.height, 292, this.velocity.X * 0.5f, this.velocity.Y * 0.5f, 150, Scale: 0.9f).noLightEmittence = true; + } + float amount = (float) ((double) this.localAI[0] / 120.0 * 2.0); + if ((double) amount > 1.0) + amount = 2f - amount; + this.Opacity = MathHelper.Lerp(0.4f, 0.75f, amount); + vector2_1.Y += (float) Math.Cos((double) this.localAI[0] / 120.0 * 6.28318548202515) * 2f; + if (player.petFlagUpbeatStar) + { + this.timeLeft = 2; + break; + } + break; + } + if (flag2 && (player.suspiciouslookingTentacle || player.petFlagDD2Ghost)) + vector2_1.X += (float) (-player.direction * 64); + this.direction = this.spriteDirection = player.direction; + Vector2 vector2_4 = player.MountedCenter + vector2_1; + double num8 = (double) Vector2.Distance(this.Center, vector2_4); + if (num8 > 1000.0) + this.Center = player.Center + vector2_1; + Vector2 vector2_5 = vector2_4 - this.Center; + if (num8 < (double) num1) + this.velocity = this.velocity * 0.25f; + if (vector2_5 != Vector2.Zero) + { + if ((double) vector2_5.Length() < (double) num1 * 0.5) + this.velocity = vector2_5; + else + this.velocity = vector2_5 * num7; + } + if ((double) this.velocity.Length() > 6.0) + { + float num9 = (float) ((double) this.velocity.X * (double) num6 + (double) this.velocity.Y * (double) this.spriteDirection * 0.0199999995529652); + if ((double) Math.Abs(this.rotation - num9) >= 3.14159274101257) + { + if ((double) num9 < (double) this.rotation) + this.rotation -= 6.283185f; + else + this.rotation += 6.283185f; + } + float num10 = 12f; + this.rotation = (this.rotation * (num10 - 1f) + num9) / num10; + if (++this.frameCounter >= num3) + { + this.frameCounter = 0; + if (++this.frame >= num4) + this.frame = num5; + } + } + else + { + if ((double) this.rotation > 3.14159274101257) + this.rotation -= 6.283185f; + if ((double) this.rotation > -0.00499999988824129 && (double) this.rotation < 0.00499999988824129) + this.rotation = 0.0f; + else + this.rotation *= 0.96f; + if (++this.frameCounter >= num2) + { + this.frameCounter = 0; + if (++this.frame >= num4) + this.frame = num5; + } + } + if (flag1) + return; + ++this.localAI[0]; + if ((double) this.localAI[0] <= 120.0) + return; + this.localAI[0] = 0.0f; + } + } + + private void AI_145_BookStaffStorm() + { + float num1 = 300f; + SlotId slotId; + if (this.soundDelay == 0) + { + this.soundDelay = -1; + float[] localAi = this.localAI; + slotId = SoundEngine.PlayTrackedSound((SoundStyle) SoundID.DD2_BookStaffTwisterLoop, this.Center); + double num2 = (double) ((SlotId) ref slotId).ToFloat(); + localAi[1] = (float) num2; + } + ActiveSound activeSound = SoundEngine.GetActiveSound(SlotId.FromFloat(this.localAI[1])); + if (activeSound != null) + { + activeSound.Position = this.Center; + activeSound.Volume = (float) (1.0 - (double) Math.Max(this.ai[0] - (num1 - 15f), 0.0f) / 15.0); + } + else + { + float[] localAi = this.localAI; + slotId = (SlotId) SlotId.Invalid; + double num3 = (double) ((SlotId) ref slotId).ToFloat(); + localAi[1] = (float) num3; + } + if ((double) this.localAI[0] >= 16.0 && (double) this.ai[0] < (double) num1 - 15.0) + this.ai[0] = num1 - 15f; + ++this.ai[0]; + if ((double) this.ai[0] >= (double) num1) + this.Kill(); + Vector2 top = this.Top; + Vector2 bottom = this.Bottom; + Vector2 vector2_1 = Vector2.Lerp(top, bottom, 0.5f); + Vector2 vector2_2 = new Vector2(0.0f, bottom.Y - top.Y); + vector2_2.X = vector2_2.Y * 0.2f; + int Width = 16; + int Height = 160; + for (int index = 0; index < 1; ++index) + { + Vector2 Position = new Vector2(this.Center.X - (float) (Width / 2), this.position.Y + (float) this.height - (float) Height); + if (Collision.SolidCollision(Position, Width, Height) || Collision.WetCollision(Position, Width, Height)) + { + if ((double) this.velocity.Y > 0.0) + this.velocity.Y = 0.0f; + if ((double) this.velocity.Y > -4.0) + { + this.velocity.Y -= 2f; + } + else + { + this.velocity.Y -= 4f; + this.localAI[0] += 2f; + } + if ((double) this.velocity.Y < -16.0) + this.velocity.Y = -16f; + } + else + { + --this.localAI[0]; + if ((double) this.localAI[0] < 0.0) + this.localAI[0] = 0.0f; + if ((double) this.velocity.Y < 0.0) + this.velocity.Y = 0.0f; + if ((double) this.velocity.Y < 4.0) + this.velocity.Y += 2f; + else + this.velocity.Y += 4f; + if ((double) this.velocity.Y > 16.0) + this.velocity.Y = 16f; + } + } + if ((double) this.ai[0] < (double) num1 - 30.0) + { + for (int index = 0; index < 1; ++index) + { + float num4 = -1f; + float num5 = 0.9f; + float amount = Main.rand.NextFloat(); + Vector2 vector2_3 = new Vector2(MathHelper.Lerp(0.1f, 1f, Main.rand.NextFloat()), MathHelper.Lerp(num4, num5, amount)); + vector2_3.X *= MathHelper.Lerp(2.2f, 0.6f, amount); + vector2_3.X *= -1f; + Vector2 vector2_4 = new Vector2(6f, 10f); + Vector2 Position = vector2_1 + vector2_2 * vector2_3 * 0.5f + vector2_4; + Dust dust = Main.dust[Dust.NewDust(Position, 0, 0, 274)]; + dust.position = Position; + dust.fadeIn = 1.3f; + dust.scale = 0.87f; + dust.alpha = 211; + if ((double) vector2_3.X > -1.20000004768372) + dust.velocity.X = 1f + Main.rand.NextFloat(); + dust.noGravity = true; + dust.velocity.Y = (float) ((double) Main.rand.NextFloat() * -0.5 - 1.29999995231628); + dust.velocity.X += this.velocity.X * 2.1f; + dust.noLight = true; + } + } + Vector2 Position1 = this.Bottom + new Vector2(-25f, -25f); + for (int index = 0; index < 4; ++index) + { + Dust dust = Dust.NewDustDirect(Position1, 50, 25, 31, this.velocity.X, -2f, 100); + dust.fadeIn = 1.1f; + dust.noGravity = true; + } + for (int index = 0; index < 1; ++index) + { + if (Main.rand.Next(5) == 0) + { + Gore gore = Gore.NewGoreDirect(this.TopLeft + Main.rand.NextVector2Square(0.0f, 1f) * this.Size, new Vector2(this.velocity.X * 1.5f, (float) (-(double) Main.rand.NextFloat() * 16.0)), Utils.SelectRandom(Main.rand, 1007, 1008, 1008)); + gore.timeLeft = 60; + gore.alpha = 50; + gore.velocity.X += this.velocity.X; + } + } + for (int index = 0; index < 1; ++index) + { + if (Main.rand.Next(7) == 0) + { + Gore gore = Gore.NewGoreDirect(this.TopLeft + Main.rand.NextVector2Square(0.0f, 1f) * this.Size, new Vector2(this.velocity.X * 1.5f, (float) (-(double) Main.rand.NextFloat() * 16.0)), Utils.SelectRandom(Main.rand, 1007, 1008, 1008)); + gore.timeLeft = 0; + gore.alpha = 80; + } + } + for (int index = 0; index < 1; ++index) + { + if (Main.rand.Next(7) == 0) + { + Gore gore = Gore.NewGoreDirect(this.TopLeft + Main.rand.NextVector2Square(0.0f, 1f) * this.Size, new Vector2(this.velocity.X * 1.5f, (float) (-(double) Main.rand.NextFloat() * 16.0)), Utils.SelectRandom(Main.rand, 1007, 1008, 1008)); + gore.timeLeft = 0; + gore.alpha = 80; + } + } + } + + public bool AI_137_CanHit(Vector2 targetPosition) + { + if (WorldGen.SolidTile((int) targetPosition.X / 16, (int) targetPosition.Y / 16)) + return false; + Vector2 Position1 = this.Top + Vector2.UnitY * 20f; + bool flag = Collision.CanHitLine(Position1, 0, 0, targetPosition, 0, 0); + if (!flag) + { + Vector2 v = targetPosition - Position1; + Vector2 spinningpoint = v.SafeNormalize(Vector2.UnitY); + Vector2 vector2_1 = Vector2.Lerp(Position1, targetPosition, 0.5f); + Vector2 vector2_2 = vector2_1 + spinningpoint.RotatedBy(1.57079637050629) * v.Length() * 0.2f; + if (Collision.CanHitLine(Position1, 0, 0, vector2_2, 0, 0) && Collision.CanHitLine(vector2_2, 0, 0, targetPosition, 0, 0)) + flag = true; + if (!flag) + { + Vector2 vector2_3 = vector2_1 + spinningpoint.RotatedBy(-1.57079637050629) * v.Length() * 0.2f; + if (Collision.CanHitLine(Position1, 0, 0, vector2_3, 0, 0) && Collision.CanHitLine(vector2_3, 0, 0, targetPosition, 0, 0)) + flag = true; + } + } + return flag; + } + + private Point GetScarabBombDigDirectionSnap8() + { + Vector2 vector2 = this.DirectionTo(Main.player[this.owner].Center); + Point point = new Point((double) vector2.X > 0.0 ? -1 : 1, (double) vector2.Y > 0.0 ? -1 : 1); + if ((double) Math.Abs(vector2.X) > (double) Math.Abs(vector2.Y) * 2.0) + point.Y = 0; + else if ((double) Math.Abs(vector2.Y) > (double) Math.Abs(vector2.X) * 2.0) + point.X = 0; + return point; + } + + public Color GetFirstFractalColor() => Main.hslToRgb(this.ai[1], 1f, 0.5f); + + public void Kill_DirtAndFluidProjectiles_RunDelegateMethodPushUpForHalfBricks( + Point pt, + float size, + Utils.TileActionAttempt plot) + { + Tile tile = Main.tile[pt.X, pt.Y]; + if (tile != null && tile.active() && tile.halfBrick()) + { + int index = pt.Y - 1; + if (index >= 0 && !WorldGen.SolidOrSlopedTile(Main.tile[pt.X, index])) + --pt.Y; + } + DelegateMethods.v2_1 = pt.ToVector2(); + DelegateMethods.f_1 = size; + Utils.PlotTileArea(pt.X, pt.Y, plot); + } + + public void Kill() + { + // ISSUE: The method is too long to display (51354 instructions) + } + + private void DoRainbowCrystalStaffExplosion() + { + Vector2 spinningpoint = new Vector2(0.0f, -3f).RotatedByRandom(3.14159274101257); + float num1 = (float) Main.rand.Next(7, 13); + Vector2 vector2 = new Vector2(2.1f, 2f); + Color rgb = Main.hslToRgb(this.ai[0], 1f, 0.5f); + rgb.A = byte.MaxValue; + for (float num2 = 0.0f; (double) num2 < (double) num1; ++num2) + { + int dustIndex = Dust.NewDust(this.Center, 0, 0, 267, newColor: rgb); + Main.dust[dustIndex].position = this.Center; + Main.dust[dustIndex].velocity = spinningpoint.RotatedBy(6.28318548202515 * (double) num2 / (double) num1) * vector2 * (float) (0.800000011920929 + (double) Main.rand.NextFloat() * 0.400000005960464); + Main.dust[dustIndex].noGravity = true; + Main.dust[dustIndex].scale = 2f; + Main.dust[dustIndex].fadeIn = Main.rand.NextFloat() * 2f; + if (dustIndex != 6000) + { + Dust dust = Dust.CloneDust(dustIndex); + dust.scale /= 2f; + dust.fadeIn /= 2f; + dust.color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + } + } + for (float num3 = 0.0f; (double) num3 < (double) num1; ++num3) + { + int dustIndex = Dust.NewDust(this.Center, 0, 0, 267, newColor: rgb); + Main.dust[dustIndex].position = this.Center; + Main.dust[dustIndex].velocity = spinningpoint.RotatedBy(6.28318548202515 * (double) num3 / (double) num1) * vector2 * (float) (0.800000011920929 + (double) Main.rand.NextFloat() * 0.400000005960464); + Main.dust[dustIndex].velocity *= Main.rand.NextFloat() * 0.8f; + Main.dust[dustIndex].noGravity = true; + Main.dust[dustIndex].scale = Main.rand.NextFloat() * 1f; + Main.dust[dustIndex].fadeIn = Main.rand.NextFloat() * 2f; + if (dustIndex != 6000) + { + Dust dust = Dust.CloneDust(dustIndex); + dust.scale /= 2f; + dust.fadeIn /= 2f; + dust.color = new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + } + } + } + + private bool ShouldWallExplode( + Vector2 compareSpot, + int radius, + int minI, + int maxI, + int minJ, + int maxJ) + { + bool flag = false; + for (int index1 = minI; index1 <= maxI; ++index1) + { + for (int index2 = minJ; index2 <= maxJ; ++index2) + { + double num1 = (double) Math.Abs((float) index1 - compareSpot.X / 16f); + float num2 = Math.Abs((float) index2 - compareSpot.Y / 16f); + if (Math.Sqrt(num1 * num1 + (double) num2 * (double) num2) < (double) radius && Main.tile[index1, index2] != null && Main.tile[index1, index2].wall == (ushort) 0) + { + flag = true; + break; + } + } + } + return flag; + } + + public Color GetFloatingDaggerMinionGlowColor() => Main.hslToRgb((float) (0.660000026226044 + 0.330000013113022 * (double) ((float) (this.whoAmI % 6) / 6f)), 0.7f, 0.6f) * 0.7f; + + private bool CanExplodeTile(int x, int y) + { + if (Main.tileDungeon[(int) Main.tile[x, y].type] || TileID.Sets.BasicChest[(int) Main.tile[x, y].type]) + return false; + switch (Main.tile[x, y].type) + { + case 26: + case 37: + case 88: + case 107: + case 108: + case 111: + case 211: + case 221: + case 222: + case 223: + case 226: + case 237: + return false; + case 58: + if (!Main.hardMode) + return false; + break; + case 77: + if (!Main.hardMode && y >= Main.UnderworldLayer) + return false; + break; + case 137: + if (!NPC.downedGolemBoss) + { + switch ((int) Main.tile[x, y].frameY / 18) + { + case 1: + case 2: + case 3: + case 4: + return false; + } + } + else + break; + break; + } + return true; + } + + private void ExplodeTiles( + Vector2 compareSpot, + int radius, + int minI, + int maxI, + int minJ, + int maxJ, + bool wallSplode) + { + AchievementsHelper.CurrentlyMining = true; + for (int index1 = minI; index1 <= maxI; ++index1) + { + for (int index2 = minJ; index2 <= maxJ; ++index2) + { + double num1 = (double) Math.Abs((float) index1 - compareSpot.X / 16f); + float num2 = Math.Abs((float) index2 - compareSpot.Y / 16f); + if (Math.Sqrt(num1 * num1 + (double) num2 * (double) num2) < (double) radius) + { + bool flag = true; + if (Main.tile[index1, index2] != null && Main.tile[index1, index2].active()) + { + flag = this.CanExplodeTile(index1, index2); + if (flag) + { + WorldGen.KillTile(index1, index2); + if (!Main.tile[index1, index2].active() && Main.netMode != 0) + NetMessage.SendData(17, number2: ((float) index1), number3: ((float) index2)); + } + } + if (flag) + { + for (int i = index1 - 1; i <= index1 + 1; ++i) + { + for (int j = index2 - 1; j <= index2 + 1; ++j) + { + if (Main.tile[i, j] != null && Main.tile[i, j].wall > (ushort) 0 && wallSplode) + { + WorldGen.KillWall(i, j); + if (Main.tile[i, j].wall == (ushort) 0 && Main.netMode != 0) + NetMessage.SendData(17, number: 2, number2: ((float) i), number3: ((float) j)); + } + } + } + } + } + } + } + AchievementsHelper.CurrentlyMining = false; + } + + private void ExplodeCrackedTiles( + Vector2 compareSpot, + int radius, + int minI, + int maxI, + int minJ, + int maxJ) + { + AchievementsHelper.CurrentlyMining = true; + for (int i = minI; i <= maxI; ++i) + { + for (int j = minJ; j <= maxJ; ++j) + { + double num1 = (double) Math.Abs((float) i - compareSpot.X / 16f); + float num2 = Math.Abs((float) j - compareSpot.Y / 16f); + if (Math.Sqrt(num1 * num1 + (double) num2 * (double) num2) < (double) radius) + { + bool flag = false; + if (Main.tile[i, j] != null && Main.tile[i, j].active()) + { + if (Main.tile[i, j].type >= (ushort) 481 && Main.tile[i, j].type <= (ushort) 483) + flag = true; + if (flag) + { + WorldGen.KillTile(i, j); + if (!Main.tile[i, j].active() && Main.netMode != 0) + NetMessage.SendData(17, number2: ((float) i), number3: ((float) j)); + } + } + } + } + } + AchievementsHelper.CurrentlyMining = false; + } + + public bool TryGetContainerIndex(out int containerIndex) + { + containerIndex = -1; + if (this.type == 525) + { + containerIndex = -2; + return true; + } + if (this.type != 734) + return false; + containerIndex = -5; + return true; + } + + public bool IsInteractible() + { + switch (this.type) + { + case 525: + case 734: + return true; + default: + return false; + } + } + + public Color GetAlpha(Color newColor) + { + if (this.type == 937) + newColor.A = (byte) ((double) newColor.A * 0.75); + if (this.type == 880 || this.type == 929) + newColor.A /= (byte) 2; + if (this.type == 855) + newColor = Color.Lerp(newColor, new Color((int) byte.MaxValue, 200, 60), 0.5f); + if (this.type == 933) + newColor = Color.White * this.Opacity; + if (this.type == 270) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) Utils.WrappedLerp(0.0f, (float) byte.MaxValue, (float) (this.timeLeft % 40) / 40f)); + if (this.type == 837) + return this.alpha > 0 ? Color.Transparent : new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 200); + if (this.type == 180 || this.type == 345 || this.type == 586) + return Color.Lerp(newColor, Color.White, 0.75f); + if (this.type == 764 || this.type == 856 || this.type == 857 || this.type == 864) + return Color.White; + if (this.type == 873 || this.type == 872 || this.type == 931 || this.type == 913 || this.type == 34) + return Color.White * this.Opacity; + if (this.type == 756) + return Color.Lerp(newColor, Color.Black, 0.25f); + if (this.type == 895) + return Color.White * this.Opacity; + if (this.type == 893 || this.type == 907) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 150); + if (this.type == 833 || this.type == 834 || this.type == 835 || this.type == 912) + return Color.Lerp(newColor, Color.White, 0.25f); + if (this.type == 351 || this.type == 350) + { + Point tileCoordinates = this.Center.ToTileCoordinates(); + return WorldGen.InWorld(tileCoordinates.X, tileCoordinates.Y) && !WorldGen.SolidTile(tileCoordinates.X, tileCoordinates.Y) ? Color.Lerp(newColor, Color.White, 0.15f) : Color.Lerp(newColor, Color.White, 0.05f); + } + if (this.type == 346 || this.type == 347 || this.type == 325 || this.type == 755) + return Color.Lerp(newColor, Color.White, 0.75f); + int num1; + int num2; + int num3; + if (this.type == 650) + { + int num4 = (int) ((double) newColor.R * 1.5); + int num5 = (int) ((double) newColor.G * 1.5); + int num6 = (int) ((double) newColor.B * 1.5); + if (num4 > (int) byte.MaxValue) + num1 = (int) byte.MaxValue; + if (num5 > (int) byte.MaxValue) + num2 = (int) byte.MaxValue; + if (num6 > (int) byte.MaxValue) + num3 = (int) byte.MaxValue; + } + else + { + if (this.type == 948) + return Color.White; + if (this.type == 604 || this.type == 631) + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, 0); + if (this.type == 636) + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, 64 - this.alpha / 4); + if (this.type == 673 || this.type == 706) + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, 180 - this.alpha / 2 - this.alpha / 4); + if (this.type == 603 || this.type == 633) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 200); + if (this.type == 623 || this.type >= 625 && this.type <= 628 || this.type == 710) + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha); + if (this.type == 645 || this.type == 643) + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) sbyte.MaxValue - this.alpha / 2); + if (this.type == 611) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 200); + if (this.type == 640 || this.type == 644 || this.type == 658) + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, 0); + if (this.type == 612) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue); + if (this.aiStyle == 105) + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha); + if (this.type == 554) + return new Color(200, 200, 200, 200); + if (this.type == 601) + return PortalHelper.GetPortalColor(this.owner, (int) this.ai[0]); + if (this.type == 602) + { + Color portalColor = PortalHelper.GetPortalColor(this.owner, (int) this.ai[1]); + portalColor.A = (byte) 227; + return portalColor; + } + if (this.type == 585) + { + byte a = newColor.A; + newColor = Color.Lerp(newColor, Color.White, 0.5f); + newColor.A = a; + return newColor; + } + if (this.type == 714) + { + byte a = newColor.A; + newColor = Color.Lerp(newColor, Color.White, 0.8f); + newColor.A = a; + newColor *= (float) a / (float) byte.MaxValue; + return newColor; + } + if (this.type == 573 || this.type == 578 || this.type == 579 || this.type == 617 || this.type == 641 || this.type == 707 || this.type == 813) + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha); + if (this.type == 9 || this.type == 490) + return Color.White; + if (this.type == 575 || this.type == 596 || this.type == 659) + { + if (this.timeLeft < 30) + this.alpha = (int) ((double) byte.MaxValue - (double) byte.MaxValue * (double) ((float) this.timeLeft / 30f)); + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, 128 - this.alpha / 2); + } + if (this.type == 546) + return new Color((int) byte.MaxValue, 200, (int) byte.MaxValue, 200); + if (this.type == 553) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, 200, 200); + if (this.type == 540) + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, 0); + if (this.type == 498) + return new Color((int) byte.MaxValue, 100, 20, 200); + if (this.type == 538) + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha); + if (this.type == 518) + { + float num7 = (float) (1.0 - (double) this.alpha / (double) byte.MaxValue); + return new Color((int) (200.0 * (double) num7), (int) (200.0 * (double) num7), (int) (200.0 * (double) num7), (int) (100.0 * (double) num7)); + } + if (this.type == 518 || this.type == 595 || this.type == 735) + { + Color color = Color.Lerp(newColor, Color.White, 0.85f); + color.A = (byte) 128; + return color * (float) (1.0 - (double) this.alpha / (double) byte.MaxValue); + } + if (this.type == 536 || this.type == 607) + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, 63 - this.alpha / 4); + if (this.type == 591) + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, 63 - this.alpha / 4); + if (this.type == 493 || this.type == 494) + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha); + if (this.type == 492) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + if (this.type == 491) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + if (this.type == 485 || this.type == 502) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 200); + if (this.type == 488) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + if (this.type == 477 || this.type == 478 || this.type == 479) + return this.alpha == 0 ? new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 200) : new Color(0, 0, 0, 0); + if (this.type == 473) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + if (this.type == 50 || this.type == 53 || this.type == 515 || this.type == 870) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + if (this.type == 723 || this.type == 724 || this.type == 725 || this.type == 726 || this.type == 728) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * this.Opacity; + if (this.type == 92) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + if (this.type == 91) + return new Color(200, 200, 200, 0); + if (this.type == 34 || this.type == 15 || this.type == 93 || this.type == 94 || this.type == 95 || this.type == 96 || this.type == 253 || this.type == 258 || this.type == 102 && this.alpha < (int) byte.MaxValue) + return new Color(200, 200, 200, 25); + if (this.type == 465) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * (float) (1.0 - (double) this.alpha / (double) byte.MaxValue); + if (this.type == 503) + { + Color color1 = Color.Lerp(newColor, Color.White, 0.5f) * (float) (1.0 - (double) this.alpha / (double) byte.MaxValue); + Color color2 = Color.Lerp(Color.Purple, Color.White, 0.33f); + float num8 = (float) (0.25 + Math.Cos((double) this.localAI[0]) * 0.25); + Color color3 = color2; + double num9 = (double) num8; + return Color.Lerp(color1, color3, (float) num9); + } + if (this.type == 467) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue) * (float) (1.0 - (double) this.alpha / (double) byte.MaxValue); + if (this.type == 694 || this.type == 695 || this.type == 696) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue) * (float) (1.0 - (double) this.alpha / (double) byte.MaxValue); + if (this.type == 634 || this.type == 635) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) sbyte.MaxValue) * this.Opacity; + if (this.type == 671) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue) * this.Opacity; + if (this.type == 664 || this.type == 666 || this.type == 668) + { + newColor = Color.Lerp(newColor, Color.White, 0.5f); + return new Color((int) newColor.R, (int) newColor.G, (int) newColor.B, 200) * this.Opacity; + } + if (this.type == 451) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 200) * (float) (((double) byte.MaxValue - (double) this.alpha) / (double) byte.MaxValue); + if (this.type == 684) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 200) * (float) (((double) byte.MaxValue - (double) this.alpha) / (double) byte.MaxValue); + if (this.type == 454 || this.type == 452) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue) * (float) (1.0 - (double) this.alpha / (double) byte.MaxValue); + if (this.type == 464) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue) * (float) (((double) byte.MaxValue - (double) this.alpha) / (double) byte.MaxValue); + if (this.type == 450) + return new Color(200, 200, 200, (int) byte.MaxValue - this.alpha); + if (this.type == 459 || this.type == 709) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 200); + if (this.type == 447) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 200); + if (this.type == 446) + return Color.Lerp(newColor, Color.White, 0.8f) * (float) (1.0 - (double) this.alpha / (double) byte.MaxValue); + if (this.type == 691 || this.type == 692 || this.type == 693) + return Color.Lerp(newColor, Color.White, 0.4f) * (float) (1.0 - (double) this.alpha / (double) byte.MaxValue); + if (this.type >= 646 && this.type <= 649) + return Color.Lerp(newColor, Color.White, 0.8f) * (float) (1.0 - (double) this.alpha / (double) byte.MaxValue); + if (this.type == 445) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 128) * (float) (1.0 - (double) this.alpha / (double) byte.MaxValue); + if (this.type == 440 || this.type == 449 || this.type == 606) + { + num1 = (int) byte.MaxValue - this.alpha; + num2 = (int) byte.MaxValue - this.alpha; + num3 = (int) byte.MaxValue - this.alpha; + } + else + { + if (this.type == 444) + return newColor * (float) (1.0 - (double) this.alpha / (double) byte.MaxValue); + if (this.type == 443 || this.type == 675 || this.type == 686 || this.type == 711) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 128) * (float) (1.0 - (double) this.alpha / (double) byte.MaxValue); + if (this.type == 676) + return newColor * this.Opacity; + if (this.type == 438) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 128) * (float) (1.0 - (double) this.alpha / (double) byte.MaxValue); + if (this.type == 592) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 128) * (float) (1.0 - (double) this.alpha / (double) byte.MaxValue); + if (this.type == 437 || this.type == 700) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) * (float) (1.0 - (double) this.alpha / (double) byte.MaxValue); + if (this.type == 462) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 128) * (float) (1.0 - (double) this.alpha / (double) byte.MaxValue); + if (this.type == 352) + { + Color color = Color.Lerp(newColor, Color.White, 0.5f); + color.A = (byte) ((double) color.A * ((double) this.alpha / (double) byte.MaxValue)); + return new Color((int) color.R, (int) color.G, (int) color.B, (int) color.A); + } + if (this.type == 435 || this.type == 732 || this.type == 731) + { + newColor = Color.Lerp(newColor, Color.White, 0.8f); + return new Color((int) newColor.R, (int) newColor.G, (int) newColor.B, 25); + } + if (this.type == 682) + { + newColor = Color.Lerp(newColor, Color.White, 0.8f); + return new Color((int) newColor.R, (int) newColor.G, (int) newColor.B, (int) sbyte.MaxValue); + } + if (this.type == 436) + { + newColor = Color.Lerp(newColor, Color.White, 0.8f); + return new Color((int) newColor.R, (int) newColor.G, (int) newColor.B, 25); + } + if (this.type == 409) + return new Color(250, 250, 250, 200); + if (this.type == 348 || this.type == 349) + return new Color(200, 200, 200, this.alpha); + if (this.type == 337) + return new Color(250, 250, 250, 150); + if (this.type >= 424 && this.type <= 426) + { + byte num10 = 150; + if ((int) newColor.R < (int) num10) + newColor.R = num10; + if ((int) newColor.G < (int) num10) + newColor.G = num10; + if ((int) newColor.B < (int) num10) + newColor.B = num10; + return new Color((int) newColor.R, (int) newColor.G, (int) newColor.B, (int) byte.MaxValue); + } + if (this.type == 431 || this.type == 432) + return new Color(250, 250, 250, (int) byte.MaxValue - this.alpha); + if (this.type == 343 || this.type == 344) + { + float num11 = (float) (1.0 - (double) this.alpha / (double) byte.MaxValue); + return new Color((int) (250.0 * (double) num11), (int) (250.0 * (double) num11), (int) (250.0 * (double) num11), (int) (100.0 * (double) num11)); + } + if (this.type == 332) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + if (this.type == 329) + return new Color(200, 200, 200, 50); + if (this.type >= 326 && this.type <= 328 || this.type >= 400 && this.type <= 402) + return Color.Transparent; + if (this.type == 324 && this.frame >= 6 && this.frame <= 9) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + if (this.type == 16) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + if (this.type == 321) + return new Color(200, 200, 200, 0); + if (this.type == 76 || this.type == 77 || this.type == 78) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + if (this.type == 308) + return new Color(200, 200, (int) byte.MaxValue, 125); + if (this.type == 263) + return this.timeLeft < (int) byte.MaxValue ? new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) (byte) this.timeLeft) : new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue); + if (this.type == 274) + { + if (this.timeLeft >= 85) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 100); + byte num12 = (byte) (this.timeLeft * 3); + byte num13 = (byte) (100.0 * ((double) num12 / (double) byte.MaxValue)); + return new Color((int) num12, (int) num12, (int) num12, (int) num13); + } + if (this.type == 5) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + if (this.type == 300 || this.type == 301) + return new Color(250, 250, 250, 50); + if (this.type == 712) + return Color.Lerp(newColor, Color.White, 0.4f) * this.Opacity; + if (this.type == 304) + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) (byte) ((double) ((int) byte.MaxValue - this.alpha) / 3.0)); + if (this.type == 116 || this.type == 132 || this.type == 156 || this.type == 157 || this.type == 157 || this.type == 173) + { + if ((double) this.localAI[1] >= 15.0) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, this.alpha); + if ((double) this.localAI[1] < 5.0) + return Color.Transparent; + int num14 = (int) (((double) this.localAI[1] - 5.0) / 10.0 * (double) byte.MaxValue); + return new Color(num14, num14, num14, num14); + } + if (this.type == 254) + { + if (this.timeLeft < 30) + this.alpha = (int) ((double) byte.MaxValue - (double) byte.MaxValue * (double) ((float) this.timeLeft / 30f)); + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, 0); + } + if (this.type == 265 || this.type == 355) + return this.alpha > 0 ? Color.Transparent : new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + if (this.type == 257) + return this.alpha > 200 ? Color.Transparent : new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, 0); + if (this.type == 259) + return this.alpha > 200 ? Color.Transparent : new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, 0); + if (this.type >= 150 && this.type <= 152) + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha); + if (this.type == 250) + return Color.Transparent; + if (this.type == 251) + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, 0); + if (this.type == 131) + return new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, 0); + if (this.type == 211) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0); + if (this.type == 229) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 50); + if (this.type == 221 || this.type == 729) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 200); + if (this.type == 20) + return this.alpha <= 150 ? new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 0) : new Color(0, 0, 0, 0); + if (this.type == 207) + { + num1 = (int) byte.MaxValue - this.alpha; + num2 = (int) byte.MaxValue - this.alpha; + num3 = (int) byte.MaxValue - this.alpha; + } + else + { + if (this.type == 242) + return this.alpha < 140 ? new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 100) : Color.Transparent; + if (this.type == 638) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 100) * this.Opacity; + if (this.type == 660) + return new Color(150, (int) byte.MaxValue, (int) byte.MaxValue, 0) * this.Opacity; + if (this.type == 209) + { + num1 = (int) newColor.R - this.alpha; + num2 = (int) newColor.G - this.alpha; + num3 = (int) newColor.B - this.alpha / 2; + } + else + { + if (this.type == 130) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 175); + if (this.type == 182) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 200); + if (this.type == 226) + { + int maxValue1 = (int) byte.MaxValue; + int maxValue2 = (int) byte.MaxValue; + int maxValue3 = (int) byte.MaxValue; + float num15 = (float) ((double) Main.mouseTextColor / 200.0 - 0.300000011920929); + int num16 = (int) ((double) maxValue1 * (double) num15); + int num17 = (int) ((double) maxValue2 * (double) num15); + int num18 = (int) ((double) maxValue3 * (double) num15); + int r = num16 + 50; + if (r > (int) byte.MaxValue) + r = (int) byte.MaxValue; + int g = num17 + 50; + if (g > (int) byte.MaxValue) + g = (int) byte.MaxValue; + int b = num18 + 50; + if (b > (int) byte.MaxValue) + b = (int) byte.MaxValue; + return new Color(r, g, b, 200); + } + if (this.type == 227) + { + int maxValue; + int num19 = maxValue = (int) byte.MaxValue; + int num20 = maxValue; + int num21 = maxValue; + float num22 = (float) ((double) Main.mouseTextColor / 100.0 - 1.60000002384186); + int num23 = (int) ((double) num21 * (double) num22); + int num24 = (int) ((double) num20 * (double) num22); + int num25 = (int) ((double) num19 * (double) num22); + int a = (int) (100.0 * (double) num22); + int r = num23 + 50; + if (r > (int) byte.MaxValue) + r = (int) byte.MaxValue; + int g = num24 + 50; + if (g > (int) byte.MaxValue) + g = (int) byte.MaxValue; + int b = num25 + 50; + if (b > (int) byte.MaxValue) + b = (int) byte.MaxValue; + return new Color(r, g, b, a); + } + if (this.type == 114 || this.type == 115) + { + if ((double) this.localAI[1] >= 15.0) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, this.alpha); + if ((double) this.localAI[1] < 5.0) + return Color.Transparent; + int num26 = (int) (((double) this.localAI[1] - 5.0) / 10.0 * (double) byte.MaxValue); + return new Color(num26, num26, num26, num26); + } + if (this.type == 83 || this.type == 88 || this.type == 89 || this.type == 90 || this.type == 100 || this.type == 104 || this.type == 279 || this.type >= 283 && this.type <= 287 || this.type == 876) + return this.alpha < 200 ? new Color((int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, (int) byte.MaxValue - this.alpha, 0) : Color.Transparent; + if (this.type == 34 || this.type == 35 || this.type == 15 || this.type == 19 || this.type == 44 || this.type == 45) + return Color.White; + if (this.type == 79) + { + num1 = Main.DiscoR; + num2 = Main.DiscoG; + num3 = Main.DiscoB; + return new Color(); + } + if (this.type == 9 || this.type == 15 || this.type == 34 || this.type == 50 || this.type == 53 || this.type == 76 || this.type == 77 || this.type == 78 || this.type == 92 || this.type == 91) + { + num1 = (int) newColor.R - this.alpha / 3; + num2 = (int) newColor.G - this.alpha / 3; + num3 = (int) newColor.B - this.alpha / 3; + } + else + { + if (this.type == 18) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, 50); + if (this.type == 16 || this.type == 44 || this.type == 45) + { + num1 = (int) newColor.R; + num2 = (int) newColor.G; + num3 = (int) newColor.B; + } + else if (this.type == 12 || this.type == 72 || this.type == 86 || this.type == 87) + return new Color((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue, (int) newColor.A - this.alpha); + } + } + } + } + } + float num27 = (float) ((int) byte.MaxValue - this.alpha) / (float) byte.MaxValue; + int r1 = (int) ((double) newColor.R * (double) num27); + int g1 = (int) ((double) newColor.G * (double) num27); + int b1 = (int) ((double) newColor.B * (double) num27); + int a1 = (int) newColor.A - this.alpha; + if (a1 < 0) + a1 = 0; + if (a1 > (int) byte.MaxValue) + a1 = (int) byte.MaxValue; + return new Color(r1, g1, b1, a1); + } + + public override string ToString() => "type:" + (object) this.type + "name:" + this.Name + ", active:" + this.active.ToString() + ", whoAmI:" + (object) this.whoAmI + ", identity:" + (object) this.identity + ", ai0:" + (object) this.ai[0] + " , uuid:" + (object) this.projUUID; + + private class NPCDistanceByIndexComparator : IComparer> + { + public int Compare(Tuple npcIndex1, Tuple npcIndex2) => npcIndex1.Item2.CompareTo(npcIndex2.Item2); + } + + public struct HallowBossPelletStormInfo + { + public float StartAngle; + public float AnglePerBullet; + public int BulletsInStorm; + public float BulletsProgressInStormStartNormalized; + public float BulletsProgressInStormBonusByIndexNormalized; + public float StormTotalRange; + public Vector2 BulletSize; + + public float GetBulletProgress(int bulletIndex) => this.BulletsProgressInStormStartNormalized + this.BulletsProgressInStormBonusByIndexNormalized * (float) bulletIndex; + + public bool IsValid(int bulletIndex) + { + float bulletProgress = this.GetBulletProgress(bulletIndex); + return (double) bulletProgress >= 0.0 && (double) bulletProgress <= 1.0; + } + + public Vector2 GetBulletPosition(int bulletIndex, Vector2 centerPoint) => centerPoint + Vector2.UnitX.RotatedBy((double) this.StartAngle + (double) this.AnglePerBullet * (double) bulletIndex) * this.StormTotalRange * this.GetBulletProgress(bulletIndex); + + public Microsoft.Xna.Framework.Rectangle GetBulletHitbox( + int bulletIndex, + Vector2 centerPoint) + { + return Utils.CenteredRectangle(this.GetBulletPosition(bulletIndex, centerPoint), this.BulletSize); + } + } + } +} diff --git a/Rain.cs b/Rain.cs new file mode 100644 index 0000000..d43e6f3 --- /dev/null +++ b/Rain.cs @@ -0,0 +1,136 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Rain +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using Terraria.Graphics.Effects; + +namespace Terraria +{ + public class Rain + { + public Vector2 position; + public Vector2 velocity; + public float scale; + public float rotation; + public int alpha; + public bool active; + public byte type; + + public static void ClearRain() + { + for (int index = 0; index < Main.maxRain; ++index) + Main.rain[index].active = false; + } + + public static void MakeRain() + { + if (Main.netMode == 2 || Main.gamePaused || (double) Main.screenPosition.Y > Main.worldSurface * 16.0 || Main.gameMenu) + return; + float num1 = (float) Main.screenWidth / 1920f * 25f * (float) (0.25 + 1.0 * (double) Main.cloudAlpha); + if (Filters.Scene["Sandstorm"].IsActive()) + return; + for (int index = 0; (double) index < (double) num1; ++index) + { + int num2 = 600; + if ((double) Main.player[Main.myPlayer].velocity.Y < 0.0) + num2 += (int) ((double) Math.Abs(Main.player[Main.myPlayer].velocity.Y) * 30.0); + Vector2 Position; + Position.X = (float) Main.rand.Next((int) Main.screenPosition.X - num2, (int) Main.screenPosition.X + Main.screenWidth + num2); + Position.Y = Main.screenPosition.Y - (float) Main.rand.Next(20, 100); + Position.X -= (float) ((double) Main.windSpeedCurrent * 15.0 * 40.0); + Position.X += Main.player[Main.myPlayer].velocity.X * 40f; + if ((double) Position.X < 0.0) + Position.X = 0.0f; + if ((double) Position.X > (double) ((Main.maxTilesX - 1) * 16)) + Position.X = (float) ((Main.maxTilesX - 1) * 16); + int i = (int) Position.X / 16; + int j = (int) Position.Y / 16; + if (i < 0) + i = 0; + if (i > Main.maxTilesX - 1) + i = Main.maxTilesX - 1; + if (j < 0) + j = 0; + if (j > Main.maxTilesY - 1) + j = Main.maxTilesY - 1; + if (Main.gameMenu || !WorldGen.SolidTile(i, j) && Main.tile[i, j].wall <= (ushort) 0) + { + Vector2 Velocity = new Vector2(Main.windSpeedCurrent * 18f, 14f); + Rain.NewRain(Position, Velocity); + } + } + } + + public void Update() + { + if (Main.gamePaused) + return; + this.position += this.velocity; + if (Main.gameMenu) + { + if ((double) this.position.Y <= (double) Main.screenPosition.Y + (double) Main.screenHeight + 2000.0) + return; + this.active = false; + } + else + { + if (!Collision.SolidCollision(this.position, 2, 2) && (double) this.position.Y <= (double) Main.screenPosition.Y + (double) Main.screenHeight + 100.0 && !Collision.WetCollision(this.position, 2, 2)) + return; + this.active = false; + if ((double) Main.rand.Next(100) >= (double) Main.gfxQuality * 100.0) + return; + int index = Dust.NewDust(this.position - this.velocity, 2, 2, Dust.dustWater()); + Main.dust[index].position.X -= 2f; + Main.dust[index].position.Y += 2f; + Main.dust[index].alpha = 38; + Main.dust[index].velocity *= 0.1f; + Main.dust[index].velocity += -this.velocity * 0.025f; + Main.dust[index].velocity.Y -= 2f; + Main.dust[index].scale = 0.6f; + Main.dust[index].noGravity = true; + } + } + + private static int NewRain(Vector2 Position, Vector2 Velocity) + { + int index1 = -1; + int num1 = (int) ((double) Main.maxRain * (double) Main.cloudAlpha); + if (num1 > Main.maxRain) + num1 = Main.maxRain; + float num2 = (float) Main.maxTilesX / 6400f; + double num3 = (double) Math.Max(0.0f, Math.Min(1f, (float) (((double) Main.player[Main.myPlayer].position.Y / 16.0 - 85.0 * (double) num2) / (60.0 * (double) num2)))); + float num4 = (float) ((1.0 + (double) Main.gfxQuality) / 2.0); + if ((double) num4 < 0.9) + num1 = (int) ((double) num1 * (double) num4); + float num5 = (float) (800 - Main.SceneMetrics.SnowTileCount); + if ((double) num5 < 0.0) + num5 = 0.0f; + float num6 = num5 / 800f; + int num7 = (int) ((double) (int) ((double) num1 * (double) num6) * Math.Pow((double) Main.atmo, 9.0)); + if ((double) Main.atmo < 0.4) + num7 = 0; + for (int index2 = 0; index2 < num7; ++index2) + { + if (!Main.rain[index2].active) + { + index1 = index2; + break; + } + } + if (index1 == -1) + return Main.maxRain; + Rain rain = Main.rain[index1]; + rain.active = true; + rain.position = Position; + rain.scale = (float) (1.0 + (double) Main.rand.Next(-20, 21) * 0.00999999977648258); + rain.velocity = Velocity * rain.scale; + rain.rotation = (float) Math.Atan2((double) rain.velocity.X, -(double) rain.velocity.Y); + rain.type = (byte) (Main.waterStyle * 3 + Main.rand.Next(3)); + return index1; + } + } +} diff --git a/Recipe.cs b/Recipe.cs new file mode 100644 index 0000000..12f9226 --- /dev/null +++ b/Recipe.cs @@ -0,0 +1,1357 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Recipe +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using Terraria.GameContent.Achievements; +using Terraria.ID; +using Terraria.Localization; + +namespace Terraria +{ + public class Recipe + { + public static int maxRequirements = 15; + public static int maxRecipes = 3000; + public static int numRecipes; + private static Recipe currentRecipe = new Recipe(); + public Item createItem = new Item(); + public Item[] requiredItem = new Item[Recipe.maxRequirements]; + public int[] requiredTile = new int[Recipe.maxRequirements]; + public int[] acceptedGroups = new int[Recipe.maxRequirements]; + public bool needHoney; + public bool needWater; + public bool needLava; + public bool anyWood; + public bool anyIronBar; + public bool anyPressurePlate; + public bool anySand; + public bool anyFragment; + public bool alchemy; + public bool needSnowBiome; + public bool needGraveyardBiome; + private static bool _hasDelayedFindRecipes; + + public void RequireGroup(string name) + { + int num; + if (!RecipeGroup.recipeGroupIDs.TryGetValue(name, out num)) + return; + for (int index = 0; index < Recipe.maxRequirements; ++index) + { + if (this.acceptedGroups[index] == -1) + { + this.acceptedGroups[index] = num; + break; + } + } + } + + public void RequireGroup(int id) + { + for (int index = 0; index < Recipe.maxRequirements; ++index) + { + if (this.acceptedGroups[index] == -1) + { + this.acceptedGroups[index] = id; + break; + } + } + } + + public bool ProcessGroupsForText(int type, out string theText) + { + for (int index = 0; index < Recipe.maxRequirements; ++index) + { + int acceptedGroup = this.acceptedGroups[index]; + if (acceptedGroup != -1) + { + if (RecipeGroup.recipeGroups[acceptedGroup].ValidItems.Contains(type)) + { + theText = RecipeGroup.recipeGroups[acceptedGroup].GetText(); + return true; + } + } + else + break; + } + theText = ""; + return false; + } + + public bool AcceptedByItemGroups(int invType, int reqType) + { + for (int index = 0; index < Recipe.maxRequirements; ++index) + { + int acceptedGroup = this.acceptedGroups[index]; + if (acceptedGroup != -1) + { + if (RecipeGroup.recipeGroups[acceptedGroup].ValidItems.Contains(invType) && RecipeGroup.recipeGroups[acceptedGroup].ValidItems.Contains(reqType)) + return true; + } + else + break; + } + return false; + } + + public Recipe() + { + for (int index = 0; index < Recipe.maxRequirements; ++index) + { + this.requiredItem[index] = new Item(); + this.requiredTile[index] = -1; + this.acceptedGroups[index] = -1; + } + } + + public void Create() + { + for (int index1 = 0; index1 < Recipe.maxRequirements; ++index1) + { + Item compareItem = this.requiredItem[index1]; + if (compareItem.type != 0) + { + int num1 = compareItem.stack; + if (this.alchemy && Main.player[Main.myPlayer].alchemyTable) + { + if (num1 > 1) + { + int num2 = 0; + for (int index2 = 0; index2 < num1; ++index2) + { + if (Main.rand.Next(3) == 0) + ++num2; + } + num1 -= num2; + } + else if (Main.rand.Next(3) == 0) + num1 = 0; + } + if (num1 > 0) + { + Item[] inventory = Main.player[Main.myPlayer].inventory; + for (int index3 = 0; index3 < 58; ++index3) + { + Item obj = inventory[index3]; + if (num1 > 0) + { + if (obj.IsTheSameAs(compareItem) || this.useWood(obj.type, compareItem.type) || this.useSand(obj.type, compareItem.type) || this.useFragment(obj.type, compareItem.type) || this.useIronBar(obj.type, compareItem.type) || this.usePressurePlate(obj.type, compareItem.type) || this.AcceptedByItemGroups(obj.type, compareItem.type)) + { + if (obj.stack > num1) + { + obj.stack -= num1; + num1 = 0; + } + else + { + num1 -= obj.stack; + inventory[index3] = new Item(); + } + } + } + else + break; + } + if (Main.player[Main.myPlayer].chest != -1) + { + if (Main.player[Main.myPlayer].chest > -1) + inventory = Main.chest[Main.player[Main.myPlayer].chest].item; + else if (Main.player[Main.myPlayer].chest == -2) + inventory = Main.player[Main.myPlayer].bank.item; + else if (Main.player[Main.myPlayer].chest == -3) + inventory = Main.player[Main.myPlayer].bank2.item; + else if (Main.player[Main.myPlayer].chest == -4) + inventory = Main.player[Main.myPlayer].bank3.item; + else if (Main.player[Main.myPlayer].chest == -5) + inventory = Main.player[Main.myPlayer].bank4.item; + for (int index4 = 0; index4 < 40; ++index4) + { + Item obj = inventory[index4]; + if (num1 > 0) + { + if (obj.IsTheSameAs(compareItem) || this.useWood(obj.type, compareItem.type) || this.useSand(obj.type, compareItem.type) || this.useIronBar(obj.type, compareItem.type) || this.usePressurePlate(obj.type, compareItem.type) || this.useFragment(obj.type, compareItem.type) || this.AcceptedByItemGroups(obj.type, compareItem.type)) + { + if (obj.stack > num1) + { + obj.stack -= num1; + if (Main.netMode == 1 && Main.player[Main.myPlayer].chest >= 0) + NetMessage.SendData(32, number: Main.player[Main.myPlayer].chest, number2: ((float) index4)); + num1 = 0; + } + else + { + num1 -= obj.stack; + inventory[index4] = new Item(); + if (Main.netMode == 1 && Main.player[Main.myPlayer].chest >= 0) + NetMessage.SendData(32, number: Main.player[Main.myPlayer].chest, number2: ((float) index4)); + } + } + } + else + break; + } + } + } + } + else + break; + } + AchievementsHelper.NotifyItemCraft(this); + AchievementsHelper.NotifyItemPickup(Main.player[Main.myPlayer], this.createItem); + Recipe.FindRecipes(); + } + + public bool useWood(int invType, int reqType) + { + if (!this.anyWood) + return false; + switch (reqType) + { + case 9: + case 619: + case 620: + case 621: + case 911: + case 1729: + case 2503: + case 2504: + switch (invType) + { + case 9: + case 619: + case 620: + case 621: + case 911: + case 1729: + case 2503: + case 2504: + return true; + default: + return false; + } + default: + return false; + } + } + + public bool useIronBar(int invType, int reqType) => this.anyIronBar && (reqType == 22 || reqType == 704) && (invType == 22 || invType == 704); + + public bool useSand(int invType, int reqType) => (reqType == 169 || reqType == 408 || reqType == 1246 || reqType == 370 || reqType == 3272 || reqType == 3338 || reqType == 3274 || reqType == 3275) && this.anySand && (invType == 169 || invType == 408 || invType == 1246 || invType == 370 || invType == 3272 || invType == 3338 || invType == 3274 || invType == 3275); + + public bool useFragment(int invType, int reqType) => (reqType == 3458 || reqType == 3456 || reqType == 3457 || reqType == 3459) && this.anyFragment && (invType == 3458 || invType == 3456 || invType == 3457 || invType == 3459); + + public bool usePressurePlate(int invType, int reqType) + { + if (!this.anyPressurePlate) + return false; + switch (reqType) + { + case 529: + case 541: + case 542: + case 543: + case 852: + case 853: + case 1151: + case 4261: + switch (invType) + { + case 529: + case 541: + case 542: + case 543: + case 852: + case 853: + case 1151: + case 4261: + return true; + default: + return false; + } + default: + return false; + } + } + + public static void GetThroughDelayedFindRecipes() + { + if (!Recipe._hasDelayedFindRecipes) + return; + Recipe._hasDelayedFindRecipes = false; + Recipe.FindRecipes(); + } + + public static void FindRecipes(bool canDelayCheck = false) + { + if (canDelayCheck) + { + Recipe._hasDelayedFindRecipes = true; + } + else + { + int num1 = Main.availableRecipe[Main.focusRecipe]; + float num2 = Main.availableRecipeY[Main.focusRecipe]; + for (int index = 0; index < Recipe.maxRecipes; ++index) + Main.availableRecipe[index] = 0; + Main.numAvailableRecipes = 0; + if ((Main.guideItem.type <= 0 || Main.guideItem.stack <= 0 ? 0 : (Main.guideItem.Name != "" ? 1 : 0)) != 0) + { + for (int index1 = 0; index1 < Recipe.maxRecipes && Main.recipe[index1].createItem.type != 0; ++index1) + { + for (int index2 = 0; index2 < Recipe.maxRequirements && Main.recipe[index1].requiredItem[index2].type != 0; ++index2) + { + if (Main.guideItem.IsTheSameAs(Main.recipe[index1].requiredItem[index2]) || Main.recipe[index1].useWood(Main.guideItem.type, Main.recipe[index1].requiredItem[index2].type) || Main.recipe[index1].useSand(Main.guideItem.type, Main.recipe[index1].requiredItem[index2].type) || Main.recipe[index1].useIronBar(Main.guideItem.type, Main.recipe[index1].requiredItem[index2].type) || Main.recipe[index1].useFragment(Main.guideItem.type, Main.recipe[index1].requiredItem[index2].type) || Main.recipe[index1].AcceptedByItemGroups(Main.guideItem.type, Main.recipe[index1].requiredItem[index2].type) || Main.recipe[index1].usePressurePlate(Main.guideItem.type, Main.recipe[index1].requiredItem[index2].type)) + { + Main.availableRecipe[Main.numAvailableRecipes] = index1; + ++Main.numAvailableRecipes; + break; + } + } + } + } + else + { + Dictionary dictionary = new Dictionary(); + Item[] inventory = Main.player[Main.myPlayer].inventory; + for (int index = 0; index < 58; ++index) + { + Item obj = inventory[index]; + if (obj.stack > 0) + { + if (dictionary.ContainsKey(obj.netID)) + dictionary[obj.netID] += obj.stack; + else + dictionary[obj.netID] = obj.stack; + } + } + if (Main.player[Main.myPlayer].chest != -1) + { + if (Main.player[Main.myPlayer].chest > -1) + inventory = Main.chest[Main.player[Main.myPlayer].chest].item; + else if (Main.player[Main.myPlayer].chest == -2) + inventory = Main.player[Main.myPlayer].bank.item; + else if (Main.player[Main.myPlayer].chest == -3) + inventory = Main.player[Main.myPlayer].bank2.item; + else if (Main.player[Main.myPlayer].chest == -4) + inventory = Main.player[Main.myPlayer].bank3.item; + else if (Main.player[Main.myPlayer].chest == -5) + inventory = Main.player[Main.myPlayer].bank4.item; + for (int index = 0; index < 40; ++index) + { + Item obj = inventory[index]; + if (obj != null && obj.stack > 0) + { + if (dictionary.ContainsKey(obj.netID)) + dictionary[obj.netID] += obj.stack; + else + dictionary[obj.netID] = obj.stack; + } + } + } + for (int index3 = 0; index3 < Recipe.maxRecipes && Main.recipe[index3].createItem.type != 0; ++index3) + { + bool flag1 = true; + if (flag1) + { + for (int index4 = 0; index4 < Recipe.maxRequirements && Main.recipe[index3].requiredTile[index4] != -1; ++index4) + { + if (!Main.player[Main.myPlayer].adjTile[Main.recipe[index3].requiredTile[index4]]) + { + flag1 = false; + break; + } + } + } + if (flag1) + { + for (int index5 = 0; index5 < Recipe.maxRequirements; ++index5) + { + Item obj = Main.recipe[index3].requiredItem[index5]; + if (obj.type != 0) + { + int stack = obj.stack; + bool flag2 = false; + foreach (int key in dictionary.Keys) + { + if (Main.recipe[index3].useWood(key, obj.type) || Main.recipe[index3].useSand(key, obj.type) || Main.recipe[index3].useIronBar(key, obj.type) || Main.recipe[index3].useFragment(key, obj.type) || Main.recipe[index3].AcceptedByItemGroups(key, obj.type) || Main.recipe[index3].usePressurePlate(key, obj.type)) + { + stack -= dictionary[key]; + flag2 = true; + } + } + if (!flag2 && dictionary.ContainsKey(obj.netID)) + stack -= dictionary[obj.netID]; + if (stack > 0) + { + flag1 = false; + break; + } + } + else + break; + } + } + if (flag1) + { + int num3 = !Main.recipe[index3].needWater || Main.player[Main.myPlayer].adjWater ? 1 : (Main.player[Main.myPlayer].adjTile[172] ? 1 : 0); + bool flag3 = !Main.recipe[index3].needHoney || Main.recipe[index3].needHoney == Main.player[Main.myPlayer].adjHoney; + bool flag4 = !Main.recipe[index3].needLava || Main.recipe[index3].needLava == Main.player[Main.myPlayer].adjLava; + bool flag5 = !Main.recipe[index3].needSnowBiome || Main.player[Main.myPlayer].ZoneSnow; + bool flag6 = !Main.recipe[index3].needGraveyardBiome || Main.player[Main.myPlayer].ZoneGraveyard; + int num4 = flag3 ? 1 : 0; + if ((num3 & num4 & (flag4 ? 1 : 0) & (flag5 ? 1 : 0) & (flag6 ? 1 : 0)) == 0) + flag1 = false; + } + if (flag1) + { + Main.availableRecipe[Main.numAvailableRecipes] = index3; + ++Main.numAvailableRecipes; + } + } + } + for (int index = 0; index < Main.numAvailableRecipes; ++index) + { + if (num1 == Main.availableRecipe[index]) + { + Main.focusRecipe = index; + break; + } + } + if (Main.focusRecipe >= Main.numAvailableRecipes) + Main.focusRecipe = Main.numAvailableRecipes - 1; + if (Main.focusRecipe < 0) + Main.focusRecipe = 0; + float num5 = Main.availableRecipeY[Main.focusRecipe] - num2; + for (int index = 0; index < Recipe.maxRecipes; ++index) + Main.availableRecipeY[index] -= num5; + } + } + + public static void SetupRecipeGroups() + { + RecipeGroupID.Birds = RecipeGroup.RegisterGroup("Birds", new RecipeGroup((Func) (() => Lang.misc[37].Value + " " + Lang.GetNPCNameValue(74)), new int[3] + { + 2015, + 2016, + 2017 + })); + RecipeGroupID.Scorpions = RecipeGroup.RegisterGroup("Scorpions", new RecipeGroup((Func) (() => Lang.misc[37].Value + " " + Lang.GetNPCNameValue(367)), new int[2] + { + 2157, + 2156 + })); + RecipeGroupID.Squirrels = RecipeGroup.RegisterGroup("Squirrels", new RecipeGroup((Func) (() => Lang.misc[37].Value + " " + Lang.GetNPCNameValue(299)), new int[2] + { + 2018, + 3563 + })); + RecipeGroupID.Bugs = RecipeGroup.RegisterGroup("Bugs", new RecipeGroup((Func) (() => Lang.misc[37].Value + " " + Lang.misc[85].Value), new int[3] + { + 3194, + 3192, + 3193 + })); + RecipeGroupID.Ducks = RecipeGroup.RegisterGroup("Ducks", new RecipeGroup((Func) (() => Lang.misc[37].Value + " " + Lang.misc[86].Value), new int[2] + { + 2123, + 2122 + })); + RecipeGroupID.Butterflies = RecipeGroup.RegisterGroup("Butterflies", new RecipeGroup((Func) (() => Lang.misc[37].Value + " " + Lang.misc[87].Value), new int[8] + { + 1998, + 2001, + 1994, + 1995, + 1996, + 1999, + 1997, + 2000 + })); + RecipeGroupID.Fireflies = RecipeGroup.RegisterGroup("Fireflies", new RecipeGroup((Func) (() => Lang.misc[37].Value + " " + Lang.misc[88].Value), new int[2] + { + 1992, + 2004 + })); + RecipeGroupID.Snails = RecipeGroup.RegisterGroup("Snails", new RecipeGroup((Func) (() => Lang.misc[37].Value + " " + Lang.misc[95].Value), new int[2] + { + 2006, + 2007 + })); + RecipeGroupID.Dragonflies = RecipeGroup.RegisterGroup("Dragonflies", new RecipeGroup((Func) (() => Lang.misc[37].Value + " " + Lang.misc[105].Value), new int[6] + { + 4334, + 4335, + 4336, + 4338, + 4339, + 4337 + })); + RecipeGroupID.Turtles = RecipeGroup.RegisterGroup("Turtles", new RecipeGroup((Func) (() => Lang.misc[37].Value + " " + Lang.GetNPCNameValue(616)), new int[2] + { + 4464, + 4465 + })); + RecipeGroupID.Fruit = RecipeGroup.RegisterGroup("Fruit", new RecipeGroup((Func) (() => Lang.misc[37].Value + " " + Language.GetTextValue("Misc.Fruit")), new int[17] + { + 4009, + 4282, + 4283, + 4284, + 4285, + 4286, + 4287, + 4288, + 4289, + 4290, + 4291, + 4292, + 4293, + 4294, + 4295, + 4296, + 4297 + })); + } + + public static void SetupRecipes() + { + // ISSUE: The method is too long to display (57289 instructions) + } + + private static void UpdateMaterialFieldForAllRecipes() + { + for (int index1 = 0; index1 < Recipe.numRecipes; ++index1) + { + for (int index2 = 0; Main.recipe[index1].requiredItem[index2].type > 0; ++index2) + Main.recipe[index1].requiredItem[index2].material = ItemID.Sets.IsAMaterial[Main.recipe[index1].requiredItem[index2].type]; + Main.recipe[index1].createItem.material = ItemID.Sets.IsAMaterial[Main.recipe[index1].createItem.type]; + } + } + + public static void UpdateWhichItemsAreMaterials() + { + for (int Type = 0; Type < 5045; ++Type) + { + Item obj = new Item(); + obj.SetDefaults(Type, true); + obj.checkMat(); + ItemID.Sets.IsAMaterial[Type] = obj.material; + } + } + + private static void AddSolarFurniture() + { + Recipe.currentRecipe.createItem.SetDefaults(4229); + Recipe.currentRecipe.createItem.stack = 10; + Recipe.currentRecipe.SetIngridients(3, 10, 3458, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4233); + Recipe.currentRecipe.createItem.stack = 4; + Recipe.currentRecipe.SetIngridients(4229, 1); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4145); + Recipe.currentRecipe.SetIngridients(4229, 14); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4146); + Recipe.currentRecipe.SetIngridients(4229, 15, 225, 5); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4147); + Recipe.currentRecipe.SetIngridients(4229, 20, 149, 10); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4148); + Recipe.currentRecipe.SetIngridients(4229, 16); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4149); + Recipe.currentRecipe.SetIngridients(4229, 5, 8, 3); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4150); + Recipe.currentRecipe.SetIngridients(4229, 4, 8, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4151); + Recipe.currentRecipe.SetIngridients(4229, 4); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4152); + Recipe.currentRecipe.SetIngridients(4229, 4, 8, 4, 85, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4153); + Recipe.currentRecipe.SetIngridients(4229, 8, 22, 2); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.currentRecipe.anyIronBar = true; + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4154); + Recipe.currentRecipe.SetIngridients(4229, 10, 22, 3, 170, 6); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.currentRecipe.anyIronBar = true; + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4155); + Recipe.currentRecipe.SetIngridients(4229, 6); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4156); + Recipe.currentRecipe.SetIngridients(8, 1, 4229, 3); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4157); + Recipe.currentRecipe.SetIngridients(4229, 6, 8, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4158); + Recipe.currentRecipe.SetIngridients(4229, 15, 154, 4, 149, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4160); + Recipe.currentRecipe.SetIngridients(4229, 6, 206, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4161); + Recipe.currentRecipe.SetIngridients(4229, 5, 225, 2); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4162); + Recipe.currentRecipe.SetIngridients(4229, 8); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4163); + Recipe.currentRecipe.SetIngridients(4229, 10); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4165); + Recipe.currentRecipe.SetIngridients(4229, 6); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + } + + private static void AddVortexFurniture() + { + Recipe.currentRecipe.createItem.SetDefaults(4230); + Recipe.currentRecipe.createItem.stack = 10; + Recipe.currentRecipe.SetIngridients(3, 10, 3456, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4234); + Recipe.currentRecipe.createItem.stack = 4; + Recipe.currentRecipe.SetIngridients(4230, 1); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4166); + Recipe.currentRecipe.SetIngridients(4230, 14); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4167); + Recipe.currentRecipe.SetIngridients(4230, 15, 225, 5); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4168); + Recipe.currentRecipe.SetIngridients(4230, 20, 149, 10); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4169); + Recipe.currentRecipe.SetIngridients(4230, 16); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4170); + Recipe.currentRecipe.SetIngridients(4230, 5, 8, 3); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4171); + Recipe.currentRecipe.SetIngridients(4230, 4, 8, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4172); + Recipe.currentRecipe.SetIngridients(4230, 4); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4173); + Recipe.currentRecipe.SetIngridients(4230, 4, 8, 4, 85, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4174); + Recipe.currentRecipe.SetIngridients(4230, 8, 22, 2); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.currentRecipe.anyIronBar = true; + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4175); + Recipe.currentRecipe.SetIngridients(4230, 10, 22, 3, 170, 6); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.currentRecipe.anyIronBar = true; + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4176); + Recipe.currentRecipe.SetIngridients(4230, 6); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4177); + Recipe.currentRecipe.SetIngridients(8, 1, 4230, 3); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4178); + Recipe.currentRecipe.SetIngridients(4230, 6, 8, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4179); + Recipe.currentRecipe.SetIngridients(4230, 15, 154, 4, 149, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4181); + Recipe.currentRecipe.SetIngridients(4230, 6, 206, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4182); + Recipe.currentRecipe.SetIngridients(4230, 5, 225, 2); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4183); + Recipe.currentRecipe.SetIngridients(4230, 8); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4184); + Recipe.currentRecipe.SetIngridients(4230, 10); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4186); + Recipe.currentRecipe.SetIngridients(4230, 6); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + } + + private static void AddNebulaFurniture() + { + Recipe.currentRecipe.createItem.SetDefaults(4231); + Recipe.currentRecipe.createItem.stack = 10; + Recipe.currentRecipe.SetIngridients(3, 10, 3457, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4235); + Recipe.currentRecipe.createItem.stack = 4; + Recipe.currentRecipe.SetIngridients(4231, 1); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4187); + Recipe.currentRecipe.SetIngridients(4231, 14); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4188); + Recipe.currentRecipe.SetIngridients(4231, 15, 225, 5); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4189); + Recipe.currentRecipe.SetIngridients(4231, 20, 149, 10); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4190); + Recipe.currentRecipe.SetIngridients(4231, 16); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4191); + Recipe.currentRecipe.SetIngridients(4231, 5, 8, 3); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4192); + Recipe.currentRecipe.SetIngridients(4231, 4, 8, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4193); + Recipe.currentRecipe.SetIngridients(4231, 4); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4194); + Recipe.currentRecipe.SetIngridients(4231, 4, 8, 4, 85, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4195); + Recipe.currentRecipe.SetIngridients(4231, 8, 22, 2); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.currentRecipe.anyIronBar = true; + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4196); + Recipe.currentRecipe.SetIngridients(4231, 10, 22, 3, 170, 6); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.currentRecipe.anyIronBar = true; + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4197); + Recipe.currentRecipe.SetIngridients(4231, 6); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4198); + Recipe.currentRecipe.SetIngridients(8, 1, 4231, 3); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4199); + Recipe.currentRecipe.SetIngridients(4231, 6, 8, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4200); + Recipe.currentRecipe.SetIngridients(4231, 15, 154, 4, 149, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4202); + Recipe.currentRecipe.SetIngridients(4231, 6, 206, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4203); + Recipe.currentRecipe.SetIngridients(4231, 5, 225, 2); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4204); + Recipe.currentRecipe.SetIngridients(4231, 8); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4205); + Recipe.currentRecipe.SetIngridients(4231, 10); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4207); + Recipe.currentRecipe.SetIngridients(4231, 6); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + } + + private static void AddStardustFurniture() + { + Recipe.currentRecipe.createItem.SetDefaults(4232); + Recipe.currentRecipe.createItem.stack = 10; + Recipe.currentRecipe.SetIngridients(3, 10, 3459, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4236); + Recipe.currentRecipe.createItem.stack = 4; + Recipe.currentRecipe.SetIngridients(4232, 1); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4208); + Recipe.currentRecipe.SetIngridients(4232, 14); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4209); + Recipe.currentRecipe.SetIngridients(4232, 15, 225, 5); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4210); + Recipe.currentRecipe.SetIngridients(4232, 20, 149, 10); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4211); + Recipe.currentRecipe.SetIngridients(4232, 16); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4212); + Recipe.currentRecipe.SetIngridients(4232, 5, 8, 3); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4213); + Recipe.currentRecipe.SetIngridients(4232, 4, 8, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4214); + Recipe.currentRecipe.SetIngridients(4232, 4); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4215); + Recipe.currentRecipe.SetIngridients(4232, 4, 8, 4, 85, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4216); + Recipe.currentRecipe.SetIngridients(4232, 8, 22, 2); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.currentRecipe.anyIronBar = true; + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4217); + Recipe.currentRecipe.SetIngridients(4232, 10, 22, 3, 170, 6); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.currentRecipe.anyIronBar = true; + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4218); + Recipe.currentRecipe.SetIngridients(4232, 6); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4219); + Recipe.currentRecipe.SetIngridients(8, 1, 4232, 3); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4220); + Recipe.currentRecipe.SetIngridients(4232, 6, 8, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4221); + Recipe.currentRecipe.SetIngridients(4232, 15, 154, 4, 149, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4223); + Recipe.currentRecipe.SetIngridients(4232, 6, 206, 1); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4224); + Recipe.currentRecipe.SetIngridients(4232, 5, 225, 2); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4225); + Recipe.currentRecipe.SetIngridients(4232, 8); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4226); + Recipe.currentRecipe.SetIngridients(4232, 10); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4228); + Recipe.currentRecipe.SetIngridients(4232, 6); + Recipe.currentRecipe.SetCraftingStation(412); + Recipe.AddRecipe(); + } + + private static void AddSpiderFurniture() + { + Recipe.currentRecipe.createItem.SetDefaults(4139); + Recipe.currentRecipe.createItem.stack = 10; + Recipe.currentRecipe.SetIngridients(150, 10, 2607, 1); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4140); + Recipe.currentRecipe.createItem.stack = 4; + Recipe.currentRecipe.SetIngridients(4139, 1); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3931); + Recipe.currentRecipe.SetIngridients(4139, 14); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3932); + Recipe.currentRecipe.SetIngridients(4139, 15, 225, 5); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3933); + Recipe.currentRecipe.SetIngridients(4139, 20, 149, 10); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3934); + Recipe.currentRecipe.SetIngridients(4139, 16); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3935); + Recipe.currentRecipe.SetIngridients(4139, 5, 8, 3); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3936); + Recipe.currentRecipe.SetIngridients(4139, 4, 8, 1); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3937); + Recipe.currentRecipe.SetIngridients(4139, 4); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3938); + Recipe.currentRecipe.SetIngridients(4139, 4, 8, 4, 85, 1); + Recipe.currentRecipe.SetCraftingStation(16); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3939); + Recipe.currentRecipe.SetIngridients(4139, 8, 22, 2); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.currentRecipe.anyIronBar = true; + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3940); + Recipe.currentRecipe.SetIngridients(4139, 10, 22, 3, 170, 6); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.currentRecipe.anyIronBar = true; + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3941); + Recipe.currentRecipe.SetIngridients(4139, 6); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3942); + Recipe.currentRecipe.SetIngridients(8, 1, 4139, 3); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3943); + Recipe.currentRecipe.SetIngridients(4139, 6, 8, 1); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3944); + Recipe.currentRecipe.SetIngridients(4139, 15, 154, 4, 149, 1); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3946); + Recipe.currentRecipe.SetIngridients(4139, 6, 206, 1); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3947); + Recipe.currentRecipe.SetIngridients(4139, 5, 225, 2); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3948); + Recipe.currentRecipe.SetIngridients(4139, 8); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3949); + Recipe.currentRecipe.SetIngridients(4139, 10); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4125); + Recipe.currentRecipe.SetIngridients(4139, 6); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + } + + private static void AddLesionFurniture() + { + int num = 3955; + Recipe.currentRecipe.createItem.SetDefaults(3955); + Recipe.currentRecipe.SetIngridients(61, 2); + Recipe.currentRecipe.SetCraftingStation(218); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3975); + Recipe.currentRecipe.SetIngridients(num, 10); + Recipe.currentRecipe.anyWood = true; + Recipe.currentRecipe.SetCraftingStation(499); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3956); + Recipe.currentRecipe.createItem.stack = 4; + Recipe.currentRecipe.SetIngridients(3955, 1); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3967); + Recipe.currentRecipe.SetIngridients(num, 6); + Recipe.currentRecipe.anyWood = true; + Recipe.currentRecipe.SetCraftingStation(499); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3963); + Recipe.currentRecipe.SetIngridients(num, 4); + Recipe.currentRecipe.anyWood = true; + Recipe.currentRecipe.SetCraftingStation(499); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3965); + Recipe.currentRecipe.SetIngridients(num, 8, 22, 2); + Recipe.currentRecipe.anyWood = true; + Recipe.currentRecipe.anyIronBar = true; + Recipe.currentRecipe.SetCraftingStation(499); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3974); + Recipe.currentRecipe.SetIngridients(num, 8); + Recipe.currentRecipe.anyWood = true; + Recipe.currentRecipe.SetCraftingStation(499); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3972); + Recipe.currentRecipe.SetIngridients(num, 6, 206, 1); + Recipe.currentRecipe.anyWood = true; + Recipe.currentRecipe.SetCraftingStation(499); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3970); + Recipe.currentRecipe.SetIngridients(num, 6, 8, 1); + Recipe.currentRecipe.anyWood = true; + Recipe.currentRecipe.SetCraftingStation(499); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3962); + Recipe.currentRecipe.SetIngridients(num, 4, 8, 1); + Recipe.currentRecipe.anyWood = true; + Recipe.currentRecipe.SetCraftingStation(499); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3969); + Recipe.currentRecipe.SetIngridients(num, 3, 8, 1); + Recipe.currentRecipe.anyWood = true; + Recipe.currentRecipe.SetCraftingStation(499); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3961); + Recipe.currentRecipe.SetIngridients(num, 5, 8, 3); + Recipe.currentRecipe.anyWood = true; + Recipe.currentRecipe.SetCraftingStation(499); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3959); + Recipe.currentRecipe.SetIngridients(num, 15, 225, 5); + Recipe.currentRecipe.anyWood = true; + Recipe.currentRecipe.SetCraftingStation(499); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3968); + Recipe.currentRecipe.SetIngridients(num, 16); + Recipe.currentRecipe.anyWood = true; + Recipe.currentRecipe.SetCraftingStation(499); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3960); + Recipe.currentRecipe.SetIngridients(num, 20, 149, 10); + Recipe.currentRecipe.anyWood = true; + Recipe.currentRecipe.SetCraftingStation(499); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3966); + Recipe.currentRecipe.SetIngridients(22, 3, 170, 6, num, 10); + Recipe.currentRecipe.anyWood = true; + Recipe.currentRecipe.anyIronBar = true; + Recipe.currentRecipe.SetCraftingStation(499); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3973); + Recipe.currentRecipe.SetIngridients(num, 5, 225, 2); + Recipe.currentRecipe.anyWood = true; + Recipe.currentRecipe.SetCraftingStation(499); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3971); + Recipe.currentRecipe.SetIngridients(154, 4, num, 15, 149, 1); + Recipe.currentRecipe.anyWood = true; + Recipe.currentRecipe.SetCraftingStation(499); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3958); + Recipe.currentRecipe.SetIngridients(num, 14); + Recipe.currentRecipe.anyWood = true; + Recipe.currentRecipe.SetCraftingStation(499); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(3964); + Recipe.currentRecipe.SetIngridients(num, 4, 8, 4, 85, 1); + Recipe.currentRecipe.anyWood = true; + Recipe.currentRecipe.SetCraftingStation(499); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4126); + Recipe.currentRecipe.SetIngridients(3955, 6); + Recipe.currentRecipe.SetCraftingStation(499); + Recipe.AddRecipe(); + } + + private static void AddSandstoneFurniture() + { + Recipe.currentRecipe.createItem.SetDefaults(4720); + Recipe.currentRecipe.createItem.stack = 2; + Recipe.currentRecipe.SetIngridients(4051, 1); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4298); + Recipe.currentRecipe.SetIngridients(4051, 14); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4299); + Recipe.currentRecipe.SetIngridients(4051, 15, 225, 5); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4300); + Recipe.currentRecipe.SetIngridients(4051, 20, 149, 10); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4301); + Recipe.currentRecipe.SetIngridients(4051, 16); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4302); + Recipe.currentRecipe.SetIngridients(4051, 5, 8, 3); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4303); + Recipe.currentRecipe.SetIngridients(4051, 4, 8, 1); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4304); + Recipe.currentRecipe.SetIngridients(4051, 4); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4305); + Recipe.currentRecipe.SetIngridients(4051, 4, 8, 4, 85, 1); + Recipe.currentRecipe.SetCraftingStation(16); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4267); + Recipe.currentRecipe.SetIngridients(4051, 8, 22, 2); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.currentRecipe.anyIronBar = true; + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4306); + Recipe.currentRecipe.SetIngridients(4051, 10, 22, 3, 170, 6); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.currentRecipe.anyIronBar = true; + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4307); + Recipe.currentRecipe.SetIngridients(4051, 6); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4308); + Recipe.currentRecipe.SetIngridients(8, 1, 4051, 3); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4309); + Recipe.currentRecipe.SetIngridients(4051, 6, 8, 1); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4310); + Recipe.currentRecipe.SetIngridients(4051, 15, 154, 4, 149, 1); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4312); + Recipe.currentRecipe.SetIngridients(4051, 6, 206, 1); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4313); + Recipe.currentRecipe.SetIngridients(4051, 5, 225, 2); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4314); + Recipe.currentRecipe.SetIngridients(4051, 8); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4315); + Recipe.currentRecipe.SetIngridients(4051, 10); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4316); + Recipe.currentRecipe.SetIngridients(4051, 6); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + } + + private static void AddBambooFurniture() + { + Recipe.currentRecipe.createItem.SetDefaults(4566); + Recipe.currentRecipe.SetIngridients(4564, 14); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4567); + Recipe.currentRecipe.SetIngridients(4564, 15, 225, 5); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4568); + Recipe.currentRecipe.SetIngridients(4564, 20, 149, 10); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4569); + Recipe.currentRecipe.SetIngridients(4564, 16); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4570); + Recipe.currentRecipe.SetIngridients(4564, 5, 8, 3); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4571); + Recipe.currentRecipe.SetIngridients(4564, 4, 8, 1); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4572); + Recipe.currentRecipe.SetIngridients(4564, 4); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4573); + Recipe.currentRecipe.SetIngridients(4564, 4, 8, 4, 85, 1); + Recipe.currentRecipe.SetCraftingStation(16); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4574); + Recipe.currentRecipe.SetIngridients(4564, 8, 22, 2); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.currentRecipe.anyIronBar = true; + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4575); + Recipe.currentRecipe.SetIngridients(4564, 10, 22, 3, 170, 6); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.currentRecipe.anyIronBar = true; + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4576); + Recipe.currentRecipe.SetIngridients(4564, 6); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4577); + Recipe.currentRecipe.SetIngridients(8, 1, 4564, 3); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4578); + Recipe.currentRecipe.SetIngridients(4564, 6, 8, 1); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4579); + Recipe.currentRecipe.SetIngridients(4564, 15, 154, 4, 149, 1); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4581); + Recipe.currentRecipe.SetIngridients(4564, 6, 206, 1); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4582); + Recipe.currentRecipe.SetIngridients(4564, 5, 225, 2); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4583); + Recipe.currentRecipe.SetIngridients(4564, 8); + Recipe.currentRecipe.SetCraftingStation(18); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4584); + Recipe.currentRecipe.SetIngridients(4564, 10); + Recipe.AddRecipe(); + Recipe.currentRecipe.createItem.SetDefaults(4586); + Recipe.currentRecipe.SetIngridients(4564, 6); + Recipe.currentRecipe.SetCraftingStation(106); + Recipe.AddRecipe(); + } + + private static void CreateReversePlatformRecipes() + { + int numRecipes = Recipe.numRecipes; + for (int index1 = 0; index1 < numRecipes; ++index1) + { + if (Main.recipe[index1].createItem.createTile >= 0 && TileID.Sets.Platforms[Main.recipe[index1].createItem.createTile] && Main.recipe[index1].requiredItem[1].type == 0) + { + Recipe.currentRecipe.createItem.SetDefaults(Main.recipe[index1].requiredItem[0].type); + Recipe.currentRecipe.createItem.stack = Main.recipe[index1].requiredItem[0].stack; + Recipe.currentRecipe.requiredItem[0].SetDefaults(Main.recipe[index1].createItem.type); + Recipe.currentRecipe.requiredItem[0].stack = Main.recipe[index1].createItem.stack; + for (int index2 = 0; index2 < Recipe.currentRecipe.requiredTile.Length; ++index2) + Recipe.currentRecipe.requiredTile[index2] = Main.recipe[index1].requiredTile[index2]; + Recipe.AddRecipe(); + Recipe recipe = Main.recipe[Recipe.numRecipes - 1]; + for (int index3 = Recipe.numRecipes - 2; index3 > index1; --index3) + Main.recipe[index3 + 1] = Main.recipe[index3]; + Main.recipe[index1 + 1] = recipe; + } + } + } + + private static void CreateReverseWallRecipes() + { + int numRecipes = Recipe.numRecipes; + for (int index1 = 0; index1 < numRecipes; ++index1) + { + if (Main.recipe[index1].createItem.createWall > 0 && Main.recipe[index1].requiredItem[1].type == 0 && Main.recipe[index1].requiredItem[0].createWall == -1) + { + Recipe.currentRecipe.createItem.SetDefaults(Main.recipe[index1].requiredItem[0].type); + Recipe.currentRecipe.createItem.stack = Main.recipe[index1].requiredItem[0].stack; + Recipe.currentRecipe.requiredItem[0].SetDefaults(Main.recipe[index1].createItem.type); + Recipe.currentRecipe.requiredItem[0].stack = Main.recipe[index1].createItem.stack; + for (int index2 = 0; index2 < Recipe.currentRecipe.requiredTile.Length; ++index2) + Recipe.currentRecipe.requiredTile[index2] = Main.recipe[index1].requiredTile[index2]; + Recipe.AddRecipe(); + Recipe recipe = Main.recipe[Recipe.numRecipes - 1]; + for (int index3 = Recipe.numRecipes - 2; index3 > index1; --index3) + Main.recipe[index3 + 1] = Main.recipe[index3]; + Main.recipe[index1 + 1] = recipe; + } + } + } + + public void SetIngridients(params int[] ingridients) + { + if (ingridients.Length == 1) + ingridients = new int[2]{ ingridients[0], 1 }; + if (ingridients.Length % 2 != 0) + throw new Exception("Bad ingridients amount"); + for (int index1 = 0; index1 < ingridients.Length; index1 += 2) + { + int index2 = index1 / 2; + this.requiredItem[index2].SetDefaults(ingridients[index1]); + this.requiredItem[index2].stack = ingridients[index1 + 1]; + } + } + + public void SetCraftingStation(params int[] tileIDs) + { + for (int index = 0; index < tileIDs.Length; ++index) + this.requiredTile[index] = tileIDs[index]; + } + + private static void AddRecipe() + { + if (Recipe.currentRecipe.requiredTile[0] == 13) + Recipe.currentRecipe.alchemy = true; + Main.recipe[Recipe.numRecipes] = Recipe.currentRecipe; + Recipe.currentRecipe = new Recipe(); + ++Recipe.numRecipes; + } + + public static int GetRequiredTileStyle(int tileID) => tileID == 26 && WorldGen.crimson ? 1 : 0; + } +} diff --git a/RecipeGroup.cs b/RecipeGroup.cs new file mode 100644 index 0000000..a9f432f --- /dev/null +++ b/RecipeGroup.cs @@ -0,0 +1,36 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.RecipeGroup +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; + +namespace Terraria +{ + public class RecipeGroup + { + public Func GetText; + public HashSet ValidItems; + public int IconicItemId; + public static Dictionary recipeGroups = new Dictionary(); + public static Dictionary recipeGroupIDs = new Dictionary(); + public static int nextRecipeGroupIndex; + + public RecipeGroup(Func getName, params int[] validItems) + { + this.GetText = getName; + this.ValidItems = new HashSet((IEnumerable) validItems); + this.IconicItemId = validItems[0]; + } + + public static int RegisterGroup(string name, RecipeGroup rec) + { + int key = RecipeGroup.nextRecipeGroupIndex++; + RecipeGroup.recipeGroups.Add(key, rec); + RecipeGroup.recipeGroupIDs.Add(name, key); + return key; + } + } +} diff --git a/Ref`1.cs b/Ref`1.cs new file mode 100644 index 0000000..2bd7f86 --- /dev/null +++ b/Ref`1.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Ref`1 +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria +{ + public class Ref + { + public T Value; + + public Ref() + { + } + + public Ref(T value) => this.Value = value; + } +} diff --git a/RemoteClient.cs b/RemoteClient.cs new file mode 100644 index 0000000..b21da9f --- /dev/null +++ b/RemoteClient.cs @@ -0,0 +1,276 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.RemoteClient +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.Localization; +using Terraria.Net.Sockets; + +namespace Terraria +{ + public class RemoteClient + { + public ISocket Socket; + public int Id; + public string Name = "Anonymous"; + public bool IsActive; + public bool PendingTermination; + public bool PendingTerminationApproved; + public bool IsAnnouncementCompleted; + public int State; + public int TimeOutTimer; + public string StatusText = ""; + public string StatusText2; + public int StatusCount; + public int StatusMax; + public bool[,] TileSections = new bool[Main.maxTilesX / 200 + 1, Main.maxTilesY / 150 + 1]; + public byte[] ReadBuffer; + public float SpamProjectile; + public float SpamAddBlock; + public float SpamDeleteBlock; + public float SpamWater; + public float SpamProjectileMax = 100f; + public float SpamAddBlockMax = 100f; + public float SpamDeleteBlockMax = 500f; + public float SpamWaterMax = 50f; + private volatile bool _isReading; + private static List _pendingSectionFraming = new List(); + + public bool IsConnected() => this.Socket != null && this.Socket.IsConnected(); + + public void SpamUpdate() + { + if (!Netplay.SpamCheck) + { + this.SpamProjectile = 0.0f; + this.SpamDeleteBlock = 0.0f; + this.SpamAddBlock = 0.0f; + this.SpamWater = 0.0f; + } + else + { + if ((double) this.SpamProjectile > (double) this.SpamProjectileMax) + NetMessage.BootPlayer(this.Id, NetworkText.FromKey("Net.CheatingProjectileSpam")); + if ((double) this.SpamAddBlock > (double) this.SpamAddBlockMax) + NetMessage.BootPlayer(this.Id, NetworkText.FromKey("Net.CheatingTileSpam")); + if ((double) this.SpamDeleteBlock > (double) this.SpamDeleteBlockMax) + NetMessage.BootPlayer(this.Id, NetworkText.FromKey("Net.CheatingTileRemovalSpam")); + if ((double) this.SpamWater > (double) this.SpamWaterMax) + NetMessage.BootPlayer(this.Id, NetworkText.FromKey("Net.CheatingLiquidSpam")); + this.SpamProjectile -= 0.4f; + if ((double) this.SpamProjectile < 0.0) + this.SpamProjectile = 0.0f; + this.SpamAddBlock -= 0.3f; + if ((double) this.SpamAddBlock < 0.0) + this.SpamAddBlock = 0.0f; + this.SpamDeleteBlock -= 5f; + if ((double) this.SpamDeleteBlock < 0.0) + this.SpamDeleteBlock = 0.0f; + this.SpamWater -= 0.2f; + if ((double) this.SpamWater >= 0.0) + return; + this.SpamWater = 0.0f; + } + } + + public void SpamClear() + { + this.SpamProjectile = 0.0f; + this.SpamAddBlock = 0.0f; + this.SpamDeleteBlock = 0.0f; + this.SpamWater = 0.0f; + } + + public static void CheckSection(int playerIndex, Vector2 position, int fluff = 1) + { + int index1 = playerIndex; + int sectionX = Netplay.GetSectionX((int) ((double) position.X / 16.0)); + int sectionY = Netplay.GetSectionY((int) ((double) position.Y / 16.0)); + int num = 0; + for (int index2 = sectionX - fluff; index2 < sectionX + fluff + 1; ++index2) + { + for (int index3 = sectionY - fluff; index3 < sectionY + fluff + 1; ++index3) + { + if (index2 >= 0 && index2 < Main.maxSectionsX && index3 >= 0 && index3 < Main.maxSectionsY && !Netplay.Clients[index1].TileSections[index2, index3]) + ++num; + } + } + if (num <= 0) + return; + int number = num; + NetMessage.SendData(9, index1, text: Lang.inter[44].ToNetworkText(), number: number); + Netplay.Clients[index1].StatusText2 = Language.GetTextValue("Net.IsReceivingTileData"); + Netplay.Clients[index1].StatusMax += number; + RemoteClient._pendingSectionFraming.Clear(); + for (int index4 = sectionX - fluff; index4 < sectionX + fluff + 1; ++index4) + { + for (int index5 = sectionY - fluff; index5 < sectionY + fluff + 1; ++index5) + { + if (index4 >= 0 && index4 < Main.maxSectionsX && index5 >= 0 && index5 < Main.maxSectionsY && !Netplay.Clients[index1].TileSections[index4, index5]) + { + NetMessage.SendSection(index1, index4, index5); + RemoteClient._pendingSectionFraming.Add(new Point(index4, index5)); + } + } + } + foreach (Point point in RemoteClient._pendingSectionFraming) + NetMessage.SendData(11, index1, number: point.X, number2: ((float) point.Y), number3: ((float) point.X), number4: ((float) point.Y)); + } + + public bool SectionRange(int size, int firstX, int firstY) + { + for (int index = 0; index < 4; ++index) + { + int x = firstX; + int y = firstY; + if (index == 1) + x += size; + if (index == 2) + y += size; + if (index == 3) + { + x += size; + y += size; + } + if (this.TileSections[Netplay.GetSectionX(x), Netplay.GetSectionY(y)]) + return true; + } + return false; + } + + public void ResetSections() + { + for (int index1 = 0; index1 < Main.maxSectionsX; ++index1) + { + for (int index2 = 0; index2 < Main.maxSectionsY; ++index2) + this.TileSections[index1, index2] = false; + } + } + + public void Reset() + { + this.ResetSections(); + if (this.Id < (int) byte.MaxValue) + Main.player[this.Id] = new Player(); + this.TimeOutTimer = 0; + this.StatusCount = 0; + this.StatusMax = 0; + this.StatusText2 = ""; + this.StatusText = ""; + this.State = 0; + this._isReading = false; + this.PendingTermination = false; + this.PendingTerminationApproved = false; + this.SpamClear(); + this.IsActive = false; + NetMessage.buffer[this.Id].Reset(); + if (this.Socket == null) + return; + this.Socket.Close(); + } + + public void ServerWriteCallBack(object state) + { + --NetMessage.buffer[this.Id].spamCount; + if (this.StatusMax <= 0) + return; + ++this.StatusCount; + } + + public void Update() + { + if (!this.IsActive) + { + this.State = 0; + this.IsActive = true; + } + this.TryRead(); + this.UpdateStatusText(); + } + + private void TryRead() + { + if (this._isReading) + return; + try + { + if (!this.Socket.IsDataAvailable()) + return; + this._isReading = true; + this.Socket.AsyncReceive(this.ReadBuffer, 0, this.ReadBuffer.Length, new SocketReceiveCallback(this.ServerReadCallBack)); + } + catch + { + this.PendingTermination = true; + } + } + + private void ServerReadCallBack(object state, int length) + { + if (!Netplay.Disconnect) + { + int streamLength = length; + if (streamLength == 0) + { + this.PendingTermination = true; + } + else + { + try + { + NetMessage.ReceiveBytes(this.ReadBuffer, streamLength, this.Id); + } + catch + { + if (!Main.ignoreErrors) + throw; + } + } + } + this._isReading = false; + } + + private void UpdateStatusText() + { + if (this.StatusMax > 0 && this.StatusText2 != "") + { + if (this.StatusCount >= this.StatusMax) + { + this.StatusText = Language.GetTextValue("Net.ClientStatusComplete", (object) this.Socket.GetRemoteAddress(), (object) this.Name, (object) this.StatusText2); + this.StatusText2 = ""; + this.StatusMax = 0; + this.StatusCount = 0; + } + else + this.StatusText = "(" + (object) this.Socket.GetRemoteAddress() + ") " + this.Name + " " + this.StatusText2 + ": " + (object) (int) ((double) this.StatusCount / (double) this.StatusMax * 100.0) + "%"; + } + else if (this.State == 0) + this.StatusText = Language.GetTextValue("Net.ClientConnecting", (object) string.Format("({0}) {1}", (object) this.Socket.GetRemoteAddress(), (object) this.Name)); + else if (this.State == 1) + this.StatusText = Language.GetTextValue("Net.ClientSendingData", (object) this.Socket.GetRemoteAddress(), (object) this.Name); + else if (this.State == 2) + { + this.StatusText = Language.GetTextValue("Net.ClientRequestedWorldInfo", (object) this.Socket.GetRemoteAddress(), (object) this.Name); + } + else + { + if (this.State == 3) + return; + if (this.State != 10) + return; + try + { + this.StatusText = Language.GetTextValue("Net.ClientPlaying", (object) this.Socket.GetRemoteAddress(), (object) this.Name); + } + catch (Exception ex) + { + this.PendingTermination = true; + } + } + } + } +} diff --git a/RemoteServer.cs b/RemoteServer.cs new file mode 100644 index 0000000..13e0285 --- /dev/null +++ b/RemoteServer.cs @@ -0,0 +1,78 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.RemoteServer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.IO; +using Terraria.Localization; +using Terraria.Net.Sockets; + +namespace Terraria +{ + public class RemoteServer + { + public ISocket Socket = (ISocket) new TcpSocket(); + public bool IsActive; + public int State; + public int TimeOutTimer; + public bool IsReading; + public byte[] ReadBuffer; + public string StatusText; + public int StatusCount; + public int StatusMax; + public BitsByte StatusTextFlags; + + public bool HideStatusTextPercent => this.StatusTextFlags[0]; + + public bool StatusTextHasShadows => this.StatusTextFlags[1]; + + public void ClientWriteCallBack(object state) => --NetMessage.buffer[256].spamCount; + + public void ClientReadCallBack(object state, int length) + { + try + { + if (!Netplay.Disconnect) + { + int streamLength = length; + if (streamLength == 0) + { + Netplay.Disconnect = true; + Main.statusText = Language.GetTextValue("Net.LostConnection"); + } + else if (Main.ignoreErrors) + { + try + { + NetMessage.ReceiveBytes(this.ReadBuffer, streamLength); + } + catch + { + } + } + else + NetMessage.ReceiveBytes(this.ReadBuffer, streamLength); + } + this.IsReading = false; + } + catch (Exception ex) + { + try + { + using (StreamWriter streamWriter = new StreamWriter("client-crashlog.txt", true)) + { + streamWriter.WriteLine((object) DateTime.Now); + streamWriter.WriteLine((object) ex); + streamWriter.WriteLine(""); + } + } + catch + { + } + Netplay.Disconnect = true; + } + } + } +} diff --git a/ResolutionChangeEvent.cs b/ResolutionChangeEvent.cs new file mode 100644 index 0000000..6f6f776 --- /dev/null +++ b/ResolutionChangeEvent.cs @@ -0,0 +1,10 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ResolutionChangeEvent +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria +{ + public delegate void ResolutionChangeEvent(int width, int height); +} diff --git a/SceneMetrics.cs b/SceneMetrics.cs new file mode 100644 index 0000000..438eed0 --- /dev/null +++ b/SceneMetrics.cs @@ -0,0 +1,370 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.SceneMetrics +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.ID; +using Terraria.WorldBuilding; + +namespace Terraria +{ + public class SceneMetrics + { + public static int CorruptionTileThreshold = 300; + public static int CorruptionTileMax = 1000; + public static int CrimsonTileThreshold = 300; + public static int CrimsonTileMax = 1000; + public static int HallowTileThreshold = 125; + public static int HallowTileMax = 600; + public static int JungleTileThreshold = 140; + public static int JungleTileMax = 700; + public static int SnowTileThreshold = 1500; + public static int SnowTileMax = 6000; + public static int DesertTileThreshold = 1500; + public static int MushroomTileThreshold = 100; + public static int MushroomTileMax = 200; + public static int MeteorTileThreshold = 75; + public static int GraveyardTileMax = 32; + public static int GraveyardTileMin = 12; + public static int GraveyardTileThreshold = 24; + public bool[] NPCBannerBuff = new bool[289]; + public bool hasBanner; + private readonly int[] _tileCounts = new int[623]; + private readonly World _world; + private readonly List _oreFinderTileLocations = new List(512); + public int bestOre; + + public Point? ClosestOrePosition { get; private set; } + + public int EvilTileCount { get; set; } + + public int HolyTileCount { get; set; } + + public int HoneyBlockCount { get; set; } + + public int ActiveMusicBox { get; set; } + + public int SandTileCount { get; private set; } + + public int MushroomTileCount { get; private set; } + + public int SnowTileCount { get; private set; } + + public int WaterCandleCount { get; private set; } + + public int PeaceCandleCount { get; private set; } + + public int PartyMonolithCount { get; private set; } + + public int MeteorTileCount { get; private set; } + + public int BloodTileCount { get; private set; } + + public int JungleTileCount { get; private set; } + + public int DungeonTileCount { get; private set; } + + public bool HasSunflower { get; private set; } + + public bool HasGardenGnome { get; private set; } + + public bool HasClock { get; private set; } + + public bool HasCampfire { get; private set; } + + public bool HasStarInBottle { get; private set; } + + public bool HasHeartLantern { get; private set; } + + public int ActiveFountainColor { get; private set; } + + public int ActiveMonolithType { get; private set; } + + public bool BloodMoonMonolith { get; private set; } + + public bool MoonLordMonolith { get; private set; } + + public bool HasCatBast { get; private set; } + + public int GraveyardTileCount { get; private set; } + + public bool EnoughTilesForJungle => this.JungleTileCount >= SceneMetrics.JungleTileThreshold; + + public bool EnoughTilesForHallow => this.HolyTileCount >= SceneMetrics.HallowTileThreshold; + + public bool EnoughTilesForSnow => this.SnowTileCount >= SceneMetrics.SnowTileThreshold; + + public bool EnoughTilesForGlowingMushroom => this.MushroomTileCount >= SceneMetrics.MushroomTileThreshold; + + public bool EnoughTilesForDesert => this.SandTileCount >= SceneMetrics.DesertTileThreshold; + + public bool EnoughTilesForCorruption => this.EvilTileCount >= SceneMetrics.CorruptionTileThreshold; + + public bool EnoughTilesForCrimson => this.BloodTileCount >= SceneMetrics.CrimsonTileThreshold; + + public bool EnoughTilesForMeteor => this.MeteorTileCount >= SceneMetrics.MeteorTileThreshold; + + public bool EnoughTilesForGraveyard => this.GraveyardTileCount >= SceneMetrics.GraveyardTileThreshold; + + public SceneMetrics(World world) + { + this._world = world; + this.Reset(); + } + + public void ScanAndExportToMain(SceneMetricsScanSettings settings) + { + this.Reset(); + int num1 = 0; + int num2 = 0; + if (settings.ScanOreFinderData) + this._oreFinderTileLocations.Clear(); + if (settings.BiomeScanCenterPositionInWorld.HasValue) + { + Point tileCoordinates = settings.BiomeScanCenterPositionInWorld.Value.ToTileCoordinates(); + Microsoft.Xna.Framework.Rectangle tileRectangle = new Microsoft.Xna.Framework.Rectangle(tileCoordinates.X - Main.buffScanAreaWidth / 2, tileCoordinates.Y - Main.buffScanAreaHeight / 2, Main.buffScanAreaWidth, Main.buffScanAreaHeight); + tileRectangle = WorldUtils.ClampToWorld(this._world, tileRectangle); + for (int left = tileRectangle.Left; left < tileRectangle.Right; ++left) + { + for (int top = tileRectangle.Top; top < tileRectangle.Bottom; ++top) + { + if (tileRectangle.Contains(left, top)) + { + Tile tile = this._world.Tiles[left, top]; + if (tile != null && tile.active()) + { + tileRectangle.Contains(left, top); + if (!TileID.Sets.isDesertBiomeSand[(int) tile.type] || !WorldGen.oceanDepths(left, top)) + ++this._tileCounts[(int) tile.type]; + if (tile.type == (ushort) 215 && tile.frameY < (short) 36) + this.HasCampfire = true; + if (tile.type == (ushort) 49 && tile.frameX < (short) 18) + ++num1; + if (tile.type == (ushort) 372 && tile.frameX < (short) 18) + ++num2; + if (tile.type == (ushort) 405 && tile.frameX < (short) 54) + this.HasCampfire = true; + if (tile.type == (ushort) 506 && tile.frameX < (short) 72) + this.HasCatBast = true; + if (tile.type == (ushort) 42 && tile.frameY >= (short) 324 && tile.frameY <= (short) 358) + this.HasHeartLantern = true; + if (tile.type == (ushort) 42 && tile.frameY >= (short) 252 && tile.frameY <= (short) 286) + this.HasStarInBottle = true; + if (tile.type == (ushort) 91 && (tile.frameX >= (short) 396 || tile.frameY >= (short) 54)) + { + int banner = (int) tile.frameX / 18 - 21; + for (int frameY = (int) tile.frameY; frameY >= 54; frameY -= 54) + banner = banner + 90 + 21; + int index = Item.BannerToItem(banner); + if (ItemID.Sets.BannerStrength[index].Enabled) + { + this.NPCBannerBuff[banner] = true; + this.hasBanner = true; + } + } + if (settings.ScanOreFinderData && Main.tileOreFinderPriority[(int) tile.type] != (short) 0) + this._oreFinderTileLocations.Add(new Point(left, top)); + } + } + } + } + } + if (settings.VisualScanArea.HasValue) + { + Microsoft.Xna.Framework.Rectangle world = WorldUtils.ClampToWorld(this._world, settings.VisualScanArea.Value); + for (int left = world.Left; left < world.Right; ++left) + { + for (int top = world.Top; top < world.Bottom; ++top) + { + Tile tile = this._world.Tiles[left, top]; + if (tile != null && tile.active()) + { + if (tile.type == (ushort) 104) + this.HasClock = true; + switch (tile.type) + { + case 139: + if (tile.frameX >= (short) 36) + { + this.ActiveMusicBox = (int) tile.frameY / 36; + continue; + } + continue; + case 207: + if (tile.frameY >= (short) 72) + { + switch ((int) tile.frameX / 36) + { + case 0: + this.ActiveFountainColor = 0; + continue; + case 1: + this.ActiveFountainColor = 12; + continue; + case 2: + this.ActiveFountainColor = 3; + continue; + case 3: + this.ActiveFountainColor = 5; + continue; + case 4: + this.ActiveFountainColor = 2; + continue; + case 5: + this.ActiveFountainColor = 10; + continue; + case 6: + this.ActiveFountainColor = 4; + continue; + case 7: + this.ActiveFountainColor = 9; + continue; + case 8: + this.ActiveFountainColor = 8; + continue; + case 9: + this.ActiveFountainColor = 6; + continue; + default: + this.ActiveFountainColor = -1; + continue; + } + } + else + continue; + case 410: + if (tile.frameY >= (short) 56) + { + this.ActiveMonolithType = (int) tile.frameX / 36; + continue; + } + continue; + case 480: + if (tile.frameY >= (short) 54) + { + this.BloodMoonMonolith = true; + continue; + } + continue; + case 509: + if (tile.frameY >= (short) 56) + { + this.ActiveMonolithType = 4; + continue; + } + continue; + default: + continue; + } + } + } + } + } + this.WaterCandleCount = num1; + this.PeaceCandleCount = num2; + this.ExportTileCountsToMain(); + if (!settings.ScanOreFinderData) + return; + this.UpdateOreFinderData(); + } + + private void ExportTileCountsToMain() + { + if (this._tileCounts[27] > 0) + this.HasSunflower = true; + if (this._tileCounts[567] > 0) + this.HasGardenGnome = true; + this.HoneyBlockCount = this._tileCounts[229]; + this.HolyTileCount = this._tileCounts[109] + this._tileCounts[492] + this._tileCounts[110] + this._tileCounts[113] + this._tileCounts[117] + this._tileCounts[116] + this._tileCounts[164] + this._tileCounts[403] + this._tileCounts[402]; + this.EvilTileCount = this._tileCounts[23] + this._tileCounts[24] + this._tileCounts[25] + this._tileCounts[32] + this._tileCounts[112] + this._tileCounts[163] + this._tileCounts[400] + this._tileCounts[398] + -10 * this._tileCounts[27]; + this.BloodTileCount = this._tileCounts[199] + this._tileCounts[203] + this._tileCounts[200] + this._tileCounts[401] + this._tileCounts[399] + this._tileCounts[234] + this._tileCounts[352] - 10 * this._tileCounts[27]; + this.SnowTileCount = this._tileCounts[147] + this._tileCounts[148] + this._tileCounts[161] + this._tileCounts[162] + this._tileCounts[164] + this._tileCounts[163] + this._tileCounts[200]; + this.JungleTileCount = this._tileCounts[60] + this._tileCounts[61] + this._tileCounts[62] + this._tileCounts[74] + this._tileCounts[226] + this._tileCounts[225]; + this.MushroomTileCount = this._tileCounts[70] + this._tileCounts[71] + this._tileCounts[72] + this._tileCounts[528]; + this.MeteorTileCount = this._tileCounts[37]; + this.DungeonTileCount = this._tileCounts[41] + this._tileCounts[43] + this._tileCounts[44] + this._tileCounts[481] + this._tileCounts[482] + this._tileCounts[483]; + this.SandTileCount = this._tileCounts[53] + this._tileCounts[112] + this._tileCounts[116] + this._tileCounts[234] + this._tileCounts[397] + this._tileCounts[398] + this._tileCounts[402] + this._tileCounts[399] + this._tileCounts[396] + this._tileCounts[400] + this._tileCounts[403] + this._tileCounts[401]; + this.PartyMonolithCount = this._tileCounts[455]; + this.GraveyardTileCount = this._tileCounts[85]; + this.GraveyardTileCount -= this._tileCounts[27] / 2; + if (this._tileCounts[27] > 0) + this.HasSunflower = true; + if (this.GraveyardTileCount > SceneMetrics.GraveyardTileMin) + this.HasSunflower = false; + if (this.GraveyardTileCount < 0) + this.GraveyardTileCount = 0; + if (this.HolyTileCount < 0) + this.HolyTileCount = 0; + if (this.EvilTileCount < 0) + this.EvilTileCount = 0; + if (this.BloodTileCount < 0) + this.BloodTileCount = 0; + int holyTileCount = this.HolyTileCount; + this.HolyTileCount -= this.EvilTileCount; + this.HolyTileCount -= this.BloodTileCount; + this.EvilTileCount -= holyTileCount; + this.BloodTileCount -= holyTileCount; + if (this.HolyTileCount < 0) + this.HolyTileCount = 0; + if (this.EvilTileCount < 0) + this.EvilTileCount = 0; + if (this.BloodTileCount >= 0) + return; + this.BloodTileCount = 0; + } + + public int GetTileCount(ushort tileId) => this._tileCounts[(int) tileId]; + + public void Reset() + { + Array.Clear((Array) this._tileCounts, 0, this._tileCounts.Length); + this.SandTileCount = 0; + this.EvilTileCount = 0; + this.BloodTileCount = 0; + this.GraveyardTileCount = 0; + this.MushroomTileCount = 0; + this.SnowTileCount = 0; + this.HolyTileCount = 0; + this.MeteorTileCount = 0; + this.JungleTileCount = 0; + this.DungeonTileCount = 0; + this.HasCampfire = false; + this.HasSunflower = false; + this.HasGardenGnome = false; + this.HasStarInBottle = false; + this.HasHeartLantern = false; + this.HasClock = false; + this.HasCatBast = false; + this.ActiveMusicBox = -1; + this.WaterCandleCount = 0; + this.ActiveFountainColor = -1; + this.ActiveMonolithType = -1; + this.bestOre = -1; + this.BloodMoonMonolith = false; + this.MoonLordMonolith = false; + Array.Clear((Array) this.NPCBannerBuff, 0, this.NPCBannerBuff.Length); + this.hasBanner = false; + } + + private void UpdateOreFinderData() + { + int index = -1; + foreach (Point finderTileLocation in this._oreFinderTileLocations) + { + Tile tile = this._world.Tiles[finderTileLocation.X, finderTileLocation.Y]; + if (SceneMetrics.IsValidForOreFinder(tile) && (index < 0 || (int) Main.tileOreFinderPriority[(int) tile.type] > (int) Main.tileOreFinderPriority[index])) + { + index = (int) tile.type; + this.ClosestOrePosition = new Point?(finderTileLocation); + } + } + this.bestOre = index; + } + + public static bool IsValidForOreFinder(Tile t) => (t.type != (ushort) 227 || t.frameX >= (short) 272 && t.frameX <= (short) 374) && Main.tileOreFinderPriority[(int) t.type] > (short) 0; + } +} diff --git a/SceneMetricsScanSettings.cs b/SceneMetricsScanSettings.cs new file mode 100644 index 0000000..dfa2bdc --- /dev/null +++ b/SceneMetricsScanSettings.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.SceneMetricsScanSettings +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria +{ + public struct SceneMetricsScanSettings + { + public Rectangle? VisualScanArea; + public Vector2? BiomeScanCenterPositionInWorld; + public bool ScanOreFinderData; + } +} diff --git a/Server/Game.cs b/Server/Game.cs new file mode 100644 index 0000000..ec06a7e --- /dev/null +++ b/Server/Game.cs @@ -0,0 +1,156 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Server.Game +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Content; +using Microsoft.Xna.Framework.Graphics; +using System; + +namespace Terraria.Server +{ + public class Game : IDisposable + { + public GameComponentCollection Components => (GameComponentCollection) null; + + public ContentManager Content + { + get => (ContentManager) null; + set + { + } + } + + public GraphicsDevice GraphicsDevice => (GraphicsDevice) null; + + public TimeSpan InactiveSleepTime + { + get => TimeSpan.Zero; + set + { + } + } + + public bool IsActive => true; + + public bool IsFixedTimeStep + { + get => true; + set + { + } + } + + public bool IsMouseVisible + { + get => false; + set + { + } + } + + public LaunchParameters LaunchParameters => (LaunchParameters) null; + + public GameServiceContainer Services => (GameServiceContainer) null; + + public TimeSpan TargetElapsedTime + { + get => TimeSpan.Zero; + set + { + } + } + + public GameWindow Window => (GameWindow) null; + + public event EventHandler Activated; + + public event EventHandler Deactivated; + + public event EventHandler Disposed; + + public event EventHandler Exiting; + + protected virtual bool BeginDraw() => true; + + protected virtual void BeginRun() + { + } + + public void Dispose() + { + } + + protected virtual void Dispose(bool disposing) + { + } + + protected virtual void Draw(GameTime gameTime) + { + } + + protected virtual void EndDraw() + { + } + + protected virtual void EndRun() + { + } + + public void Exit() + { + } + + protected virtual void Initialize() + { + } + + protected virtual void LoadContent() + { + } + + protected virtual void OnActivated(object sender, EventArgs args) + { + } + + protected virtual void OnDeactivated(object sender, EventArgs args) + { + } + + protected virtual void OnExiting(object sender, EventArgs args) + { + } + + public void ResetElapsedTime() + { + } + + public void Run() + { + } + + public void RunOneFrame() + { + } + + protected virtual bool ShowMissingRequirementMessage(Exception exception) => true; + + public void SuppressDraw() + { + } + + public void Tick() + { + } + + protected virtual void UnloadContent() + { + } + + protected virtual void Update(GameTime gameTime) + { + } + } +} diff --git a/ShoppingSettings.cs b/ShoppingSettings.cs new file mode 100644 index 0000000..433092c --- /dev/null +++ b/ShoppingSettings.cs @@ -0,0 +1,20 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ShoppingSettings +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria +{ + public struct ShoppingSettings + { + public double PriceAdjustment; + public string HappinessReport; + + public static ShoppingSettings NotInShop => new ShoppingSettings() + { + PriceAdjustment = 1.0, + HappinessReport = "" + }; + } +} diff --git a/Sign.cs b/Sign.cs new file mode 100644 index 0000000..3569584 --- /dev/null +++ b/Sign.cs @@ -0,0 +1,74 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Sign +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria +{ + public class Sign + { + public const int maxSigns = 1000; + public int x; + public int y; + public string text; + + public static void KillSign(int x, int y) + { + for (int index = 0; index < 1000; ++index) + { + if (Main.sign[index] != null && Main.sign[index].x == x && Main.sign[index].y == y) + Main.sign[index] = (Sign) null; + } + } + + public static int ReadSign(int i, int j, bool CreateIfMissing = true) + { + int num1 = (int) Main.tile[i, j].frameX / 18; + int num2 = (int) Main.tile[i, j].frameY / 18; + int num3 = num1 % 2; + int x = i - num3; + int y = j - num2; + if (!Main.tileSign[(int) Main.tile[x, y].type]) + { + Sign.KillSign(x, y); + return -1; + } + int num4 = -1; + for (int index = 0; index < 1000; ++index) + { + if (Main.sign[index] != null && Main.sign[index].x == x && Main.sign[index].y == y) + { + num4 = index; + break; + } + } + if (num4 < 0 & CreateIfMissing) + { + for (int index = 0; index < 1000; ++index) + { + if (Main.sign[index] == null) + { + num4 = index; + Main.sign[index] = new Sign(); + Main.sign[index].x = x; + Main.sign[index].y = y; + Main.sign[index].text = ""; + break; + } + } + } + return num4; + } + + public static void TextSign(int i, string text) + { + if (Main.tile[Main.sign[i].x, Main.sign[i].y] == null || !Main.tile[Main.sign[i].x, Main.sign[i].y].active() || !Main.tileSign[(int) Main.tile[Main.sign[i].x, Main.sign[i].y].type]) + Main.sign[i] = (Sign) null; + else + Main.sign[i].text = text; + } + + public override string ToString() => "x" + (object) this.x + "\ty" + (object) this.y + "\t" + this.text; + } +} diff --git a/Social/Base/AchievementsSocialModule.cs b/Social/Base/AchievementsSocialModule.cs new file mode 100644 index 0000000..c77b616 --- /dev/null +++ b/Social/Base/AchievementsSocialModule.cs @@ -0,0 +1,29 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Base.AchievementsSocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Social.Base +{ + public abstract class AchievementsSocialModule : ISocialModule + { + public abstract void Initialize(); + + public abstract void Shutdown(); + + public abstract byte[] GetEncryptionKey(); + + public abstract string GetSavePath(); + + public abstract void UpdateIntStat(string name, int value); + + public abstract void UpdateFloatStat(string name, float value); + + public abstract void CompleteAchievement(string name); + + public abstract bool IsAchievementCompleted(string name); + + public abstract void StoreStats(); + } +} diff --git a/Social/Base/CloudSocialModule.cs b/Social/Base/CloudSocialModule.cs new file mode 100644 index 0000000..501d00b --- /dev/null +++ b/Social/Base/CloudSocialModule.cs @@ -0,0 +1,48 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Base.CloudSocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using Terraria.IO; + +namespace Terraria.Social.Base +{ + public abstract class CloudSocialModule : ISocialModule + { + public bool EnabledByDefault; + + public virtual void Initialize() + { + Main.Configuration.OnLoad += (Action) (preferences => this.EnabledByDefault = preferences.Get("CloudSavingDefault", false)); + Main.Configuration.OnSave += (Action) (preferences => preferences.Put("CloudSavingDefault", (object) this.EnabledByDefault)); + } + + public abstract void Shutdown(); + + public abstract IEnumerable GetFiles(); + + public abstract bool Write(string path, byte[] data, int length); + + public abstract void Read(string path, byte[] buffer, int length); + + public abstract bool HasFile(string path); + + public abstract int GetFileSize(string path); + + public abstract bool Delete(string path); + + public byte[] Read(string path) + { + byte[] buffer = new byte[this.GetFileSize(path)]; + this.Read(path, buffer, buffer.Length); + return buffer; + } + + public void Read(string path, byte[] buffer) => this.Read(path, buffer, buffer.Length); + + public bool Write(string path, byte[] data) => this.Write(path, data, data.Length); + } +} diff --git a/Social/Base/FriendsSocialModule.cs b/Social/Base/FriendsSocialModule.cs new file mode 100644 index 0000000..ac5bc4a --- /dev/null +++ b/Social/Base/FriendsSocialModule.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Base.FriendsSocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Social.Base +{ + public abstract class FriendsSocialModule : ISocialModule + { + public abstract string GetUsername(); + + public abstract void OpenJoinInterface(); + + public abstract void Initialize(); + + public abstract void Shutdown(); + } +} diff --git a/Social/Base/NetSocialModule.cs b/Social/Base/NetSocialModule.cs new file mode 100644 index 0000000..7749863 --- /dev/null +++ b/Social/Base/NetSocialModule.cs @@ -0,0 +1,45 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Base.NetSocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Diagnostics; +using Terraria.Net; +using Terraria.Net.Sockets; + +namespace Terraria.Social.Base +{ + public abstract class NetSocialModule : ISocialModule + { + public abstract void Initialize(); + + public abstract void Shutdown(); + + public abstract void Close(RemoteAddress address); + + public abstract bool IsConnected(RemoteAddress address); + + public abstract void Connect(RemoteAddress address); + + public abstract bool Send(RemoteAddress address, byte[] data, int length); + + public abstract int Receive(RemoteAddress address, byte[] data, int offset, int length); + + public abstract bool IsDataAvailable(RemoteAddress address); + + public abstract void LaunchLocalServer(Process process, ServerMode mode); + + public abstract bool CanInvite(); + + public abstract void OpenInviteInterface(); + + public abstract void CancelJoin(); + + public abstract bool StartListening(SocketConnectionAccepted callback); + + public abstract void StopListening(); + + public abstract ulong GetLobbyId(); + } +} diff --git a/Social/Base/OverlaySocialModule.cs b/Social/Base/OverlaySocialModule.cs new file mode 100644 index 0000000..b78e353 --- /dev/null +++ b/Social/Base/OverlaySocialModule.cs @@ -0,0 +1,26 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Base.OverlaySocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Social.Base +{ + public abstract class OverlaySocialModule : ISocialModule + { + public abstract void Initialize(); + + public abstract void Shutdown(); + + public abstract bool IsGamepadTextInputActive(); + + public abstract bool ShowGamepadTextInput( + string description, + uint maxLength, + bool multiLine = false, + string existingText = "", + bool password = false); + + public abstract string GetGamepadText(); + } +} diff --git a/Social/Base/RichPresenceState.cs b/Social/Base/RichPresenceState.cs new file mode 100644 index 0000000..95dca0f --- /dev/null +++ b/Social/Base/RichPresenceState.cs @@ -0,0 +1,41 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Base.RichPresenceState +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using Terraria.GameContent.UI.States; + +namespace Terraria.Social.Base +{ + public class RichPresenceState : IEquatable + { + public RichPresenceState.GameModeState GameMode; + + public bool Equals(RichPresenceState other) => this.GameMode == other.GameMode; + + public static RichPresenceState GetCurrentState() + { + RichPresenceState richPresenceState = new RichPresenceState(); + if (Main.gameMenu) + { + int num = Main.MenuUI.CurrentState is UICharacterCreation ? 1 : 0; + bool flag = Main.MenuUI.CurrentState is UIWorldCreation; + richPresenceState.GameMode = num == 0 ? (!flag ? RichPresenceState.GameModeState.InMainMenu : RichPresenceState.GameModeState.CreatingWorld) : RichPresenceState.GameModeState.CreatingPlayer; + } + else + richPresenceState.GameMode = Main.netMode != 0 ? RichPresenceState.GameModeState.PlayingMulti : RichPresenceState.GameModeState.PlayingSingle; + return richPresenceState; + } + + public enum GameModeState + { + InMainMenu, + CreatingPlayer, + CreatingWorld, + PlayingSingle, + PlayingMulti, + } + } +} diff --git a/Social/Base/ServerJoinRequestEvent.cs b/Social/Base/ServerJoinRequestEvent.cs new file mode 100644 index 0000000..b279bf1 --- /dev/null +++ b/Social/Base/ServerJoinRequestEvent.cs @@ -0,0 +1,10 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Base.ServerJoinRequestEvent +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Social.Base +{ + public delegate void ServerJoinRequestEvent(UserJoinToServerRequest request); +} diff --git a/Social/Base/ServerJoinRequestsManager.cs b/Social/Base/ServerJoinRequestsManager.cs new file mode 100644 index 0000000..9ffecc1 --- /dev/null +++ b/Social/Base/ServerJoinRequestsManager.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Base.ServerJoinRequestsManager +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; + +namespace Terraria.Social.Base +{ + public class ServerJoinRequestsManager + { + private readonly List _requests; + public readonly ReadOnlyCollection CurrentRequests; + + public event ServerJoinRequestEvent OnRequestAdded; + + public event ServerJoinRequestEvent OnRequestRemoved; + + public ServerJoinRequestsManager() + { + this._requests = new List(); + this.CurrentRequests = new ReadOnlyCollection((IList) this._requests); + } + + public void Update() + { + for (int index = this._requests.Count - 1; index >= 0; --index) + { + if (!this._requests[index].IsValid()) + this.RemoveRequestAtIndex(index); + } + } + + public void Add(UserJoinToServerRequest request) + { + for (int index = this._requests.Count - 1; index >= 0; --index) + { + if (this._requests[index].Equals((object) request)) + this.RemoveRequestAtIndex(index); + } + this._requests.Add(request); + request.OnAccepted += (Action) (() => this.RemoveRequest(request)); + request.OnRejected += (Action) (() => this.RemoveRequest(request)); + if (this.OnRequestAdded == null) + return; + this.OnRequestAdded(request); + } + + private void RemoveRequestAtIndex(int i) + { + UserJoinToServerRequest request = this._requests[i]; + this._requests.RemoveAt(i); + if (this.OnRequestRemoved == null) + return; + this.OnRequestRemoved(request); + } + + private void RemoveRequest(UserJoinToServerRequest request) + { + if (!this._requests.Remove(request) || this.OnRequestRemoved == null) + return; + this.OnRequestRemoved(request); + } + } +} diff --git a/Social/Base/UserJoinToServerRequest.cs b/Social/Base/UserJoinToServerRequest.cs new file mode 100644 index 0000000..94de277 --- /dev/null +++ b/Social/Base/UserJoinToServerRequest.cs @@ -0,0 +1,45 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Base.UserJoinToServerRequest +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Terraria.Social.Base +{ + public abstract class UserJoinToServerRequest + { + internal string UserDisplayName { get; private set; } + + internal string UserFullIdentifier { get; private set; } + + public event Action OnAccepted; + + public event Action OnRejected; + + public UserJoinToServerRequest(string userDisplayName, string fullIdentifier) + { + this.UserDisplayName = userDisplayName; + this.UserFullIdentifier = fullIdentifier; + } + + public void Accept() + { + if (this.OnAccepted == null) + return; + this.OnAccepted(); + } + + public void Reject() + { + if (this.OnRejected == null) + return; + this.OnRejected(); + } + + public abstract bool IsValid(); + + public abstract string GetUserWrapperText(); + } +} diff --git a/Social/ISocialModule.cs b/Social/ISocialModule.cs new file mode 100644 index 0000000..7e976a4 --- /dev/null +++ b/Social/ISocialModule.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.ISocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Social +{ + public interface ISocialModule + { + void Initialize(); + + void Shutdown(); + } +} diff --git a/Social/SocialAPI.cs b/Social/SocialAPI.cs new file mode 100644 index 0000000..32d40a4 --- /dev/null +++ b/Social/SocialAPI.cs @@ -0,0 +1,96 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.SocialAPI +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using Terraria.Social.Base; +using Terraria.Social.WeGame; + +namespace Terraria.Social +{ + public static class SocialAPI + { + private static SocialMode _mode; + public static Terraria.Social.Base.FriendsSocialModule Friends; + public static Terraria.Social.Base.AchievementsSocialModule Achievements; + public static Terraria.Social.Base.CloudSocialModule Cloud; + public static Terraria.Social.Base.NetSocialModule Network; + public static Terraria.Social.Base.OverlaySocialModule Overlay; + public static ServerJoinRequestsManager JoinRequests; + private static List _modules; + + public static SocialMode Mode => SocialAPI._mode; + + public static void Initialize(SocialMode? mode = null) + { + if (!mode.HasValue) + { + mode = new SocialMode?(SocialMode.None); + mode = new SocialMode?(SocialMode.Steam); + } + SocialAPI._mode = mode.Value; + SocialAPI._modules = new List(); + SocialAPI.JoinRequests = new ServerJoinRequestsManager(); + Main.OnTickForInternalCodeOnly += new Action(SocialAPI.JoinRequests.Update); + switch (SocialAPI.Mode) + { + case SocialMode.Steam: + SocialAPI.LoadSteam(); + break; + case SocialMode.WeGame: + SocialAPI.LoadWeGame(); + break; + } + foreach (ISocialModule module in SocialAPI._modules) + module.Initialize(); + } + + public static void Shutdown() + { + SocialAPI._modules.Reverse(); + foreach (ISocialModule module in SocialAPI._modules) + module.Shutdown(); + } + + private static T LoadModule() where T : ISocialModule, new() + { + T obj = new T(); + SocialAPI._modules.Add((ISocialModule) obj); + return obj; + } + + private static T LoadModule(T module) where T : ISocialModule + { + SocialAPI._modules.Add((ISocialModule) module); + return module; + } + + private static void LoadDiscord() + { + } + + private static void LoadSteam() + { + SocialAPI.LoadModule(); + SocialAPI.Friends = (Terraria.Social.Base.FriendsSocialModule) SocialAPI.LoadModule(); + SocialAPI.Achievements = (Terraria.Social.Base.AchievementsSocialModule) SocialAPI.LoadModule(); + SocialAPI.Cloud = (Terraria.Social.Base.CloudSocialModule) SocialAPI.LoadModule(); + SocialAPI.Overlay = (Terraria.Social.Base.OverlaySocialModule) SocialAPI.LoadModule(); + SocialAPI.Network = (Terraria.Social.Base.NetSocialModule) SocialAPI.LoadModule(); + WeGameHelper.WriteDebugString("LoadSteam modules"); + } + + private static void LoadWeGame() + { + SocialAPI.LoadModule(); + SocialAPI.Cloud = (Terraria.Social.Base.CloudSocialModule) SocialAPI.LoadModule(); + SocialAPI.Friends = (Terraria.Social.Base.FriendsSocialModule) SocialAPI.LoadModule(); + SocialAPI.Overlay = (Terraria.Social.Base.OverlaySocialModule) SocialAPI.LoadModule(); + SocialAPI.Network = (Terraria.Social.Base.NetSocialModule) SocialAPI.LoadModule(); + WeGameHelper.WriteDebugString("LoadWeGame modules"); + } + } +} diff --git a/Social/SocialMode.cs b/Social/SocialMode.cs new file mode 100644 index 0000000..76148ba --- /dev/null +++ b/Social/SocialMode.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.SocialMode +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Social +{ + public enum SocialMode + { + None, + Steam, + WeGame, + } +} diff --git a/Social/Steam/AchievementsSocialModule.cs b/Social/Steam/AchievementsSocialModule.cs new file mode 100644 index 0000000..c094c86 --- /dev/null +++ b/Social/Steam/AchievementsSocialModule.cs @@ -0,0 +1,108 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.AchievementsSocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Steamworks; +using System; +using System.Collections.Generic; +using System.Threading; + +namespace Terraria.Social.Steam +{ + public class AchievementsSocialModule : Terraria.Social.Base.AchievementsSocialModule + { + private const string FILE_NAME = "/achievements-steam.dat"; + private Callback _userStatsReceived; + private bool _areStatsReceived; + private Dictionary _intStatCache = new Dictionary(); + private Dictionary _floatStatCache = new Dictionary(); + + public override void Initialize() + { + // ISSUE: method pointer + this._userStatsReceived = Callback.Create(new Callback.DispatchDelegate((object) this, __methodptr(OnUserStatsReceived))); + SteamUserStats.RequestCurrentStats(); + while (!this._areStatsReceived) + { + CoreSocialModule.Pulse(); + Thread.Sleep(10); + } + } + + public override void Shutdown() => this.StoreStats(); + + public override bool IsAchievementCompleted(string name) + { + bool flag; + return SteamUserStats.GetAchievement(name, ref flag) & flag; + } + + public override byte[] GetEncryptionKey() + { + byte[] numArray = new byte[16]; + byte[] bytes = BitConverter.GetBytes((ulong) SteamUser.GetSteamID().m_SteamID); + Array.Copy((Array) bytes, (Array) numArray, 8); + Array.Copy((Array) bytes, 0, (Array) numArray, 8, 8); + return numArray; + } + + public override string GetSavePath() => "/achievements-steam.dat"; + + private int GetIntStat(string name) + { + int num; + if (this._intStatCache.TryGetValue(name, out num) || !SteamUserStats.GetStat(name, ref num)) + return num; + this._intStatCache.Add(name, num); + return num; + } + + private float GetFloatStat(string name) + { + float num; + if (this._floatStatCache.TryGetValue(name, out num) || !SteamUserStats.GetStat(name, ref num)) + return num; + this._floatStatCache.Add(name, num); + return num; + } + + private bool SetFloatStat(string name, float value) + { + this._floatStatCache[name] = value; + return SteamUserStats.SetStat(name, value); + } + + public override void UpdateIntStat(string name, int value) + { + if (this.GetIntStat(name) >= value) + return; + this.SetIntStat(name, value); + } + + private bool SetIntStat(string name, int value) + { + this._intStatCache[name] = value; + return SteamUserStats.SetStat(name, value); + } + + public override void UpdateFloatStat(string name, float value) + { + if ((double) this.GetFloatStat(name) >= (double) value) + return; + this.SetFloatStat(name, value); + } + + public override void StoreStats() => SteamUserStats.StoreStats(); + + public override void CompleteAchievement(string name) => SteamUserStats.SetAchievement(name); + + private void OnUserStatsReceived(UserStatsReceived_t results) + { + if (results.m_nGameID != 105600L || !CSteamID.op_Equality((CSteamID) results.m_steamIDUser, SteamUser.GetSteamID())) + return; + this._areStatsReceived = true; + } + } +} diff --git a/Social/Steam/CloudSocialModule.cs b/Social/Steam/CloudSocialModule.cs new file mode 100644 index 0000000..fb4feee --- /dev/null +++ b/Social/Steam/CloudSocialModule.cs @@ -0,0 +1,79 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.CloudSocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Steamworks; +using System; +using System.Collections.Generic; + +namespace Terraria.Social.Steam +{ + public class CloudSocialModule : Terraria.Social.Base.CloudSocialModule + { + private const uint WRITE_CHUNK_SIZE = 1024; + private object ioLock = new object(); + private byte[] writeBuffer = new byte[1024]; + + public override void Initialize() => base.Initialize(); + + public override void Shutdown() + { + } + + public override IEnumerable GetFiles() + { + lock (this.ioLock) + { + int fileCount = SteamRemoteStorage.GetFileCount(); + List stringList = new List(fileCount); + for (int index = 0; index < fileCount; ++index) + { + int num; + stringList.Add(SteamRemoteStorage.GetFileNameAndSize(index, ref num)); + } + return (IEnumerable) stringList; + } + } + + public override bool Write(string path, byte[] data, int length) + { + lock (this.ioLock) + { + UGCFileWriteStreamHandle_t writeStreamHandleT = SteamRemoteStorage.FileWriteStreamOpen(path); + for (uint index = 0; (long) index < (long) length; index += 1024U) + { + int num = (int) Math.Min(1024L, (long) length - (long) index); + Array.Copy((Array) data, (long) index, (Array) this.writeBuffer, 0L, (long) num); + SteamRemoteStorage.FileWriteStreamWriteChunk(writeStreamHandleT, this.writeBuffer, num); + } + return SteamRemoteStorage.FileWriteStreamClose(writeStreamHandleT); + } + } + + public override int GetFileSize(string path) + { + lock (this.ioLock) + return SteamRemoteStorage.GetFileSize(path); + } + + public override void Read(string path, byte[] buffer, int size) + { + lock (this.ioLock) + SteamRemoteStorage.FileRead(path, buffer, size); + } + + public override bool HasFile(string path) + { + lock (this.ioLock) + return SteamRemoteStorage.FileExists(path); + } + + public override bool Delete(string path) + { + lock (this.ioLock) + return SteamRemoteStorage.FileDelete(path); + } + } +} diff --git a/Social/Steam/CoreSocialModule.cs b/Social/Steam/CoreSocialModule.cs new file mode 100644 index 0000000..8c55efa --- /dev/null +++ b/Social/Steam/CoreSocialModule.cs @@ -0,0 +1,109 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.CoreSocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using ReLogic.OS; +using Steamworks; +using System; +using System.Threading; +using System.Windows.Forms; +using Terraria.Localization; + +namespace Terraria.Social.Steam +{ + public class CoreSocialModule : ISocialModule + { + private static CoreSocialModule _instance; + public const int SteamAppId = 105600; + private bool IsSteamValid; + private object _steamTickLock = new object(); + private object _steamCallbackLock = new object(); + private Callback _onOverlayActivated; + + public static event Action OnTick; + + public void Initialize() + { + CoreSocialModule._instance = this; + if (SteamAPI.RestartAppIfNecessary(new AppId_t(105600U))) + { + Environment.Exit(1); + } + else + { + if (!SteamAPI.Init()) + { + int num = (int) MessageBox.Show(Language.GetTextValue("Error.LaunchFromSteam"), Language.GetTextValue("Error.Error")); + Environment.Exit(1); + } + this.IsSteamValid = true; + new Thread(new ParameterizedThreadStart(this.SteamCallbackLoop)) + { + IsBackground = true + }.Start(); + new Thread(new ParameterizedThreadStart(this.SteamTickLoop)) + { + IsBackground = true + }.Start(); + Main.OnTickForThirdPartySoftwareOnly += new Action(this.PulseSteamTick); + Main.OnTickForThirdPartySoftwareOnly += new Action(this.PulseSteamCallback); + if (!Platform.IsOSX) + return; + // ISSUE: method pointer + this._onOverlayActivated = Callback.Create(new Callback.DispatchDelegate((object) this, __methodptr(OnOverlayActivated))); + } + } + + public void PulseSteamTick() + { + if (!Monitor.TryEnter(this._steamTickLock)) + return; + Monitor.Pulse(this._steamTickLock); + Monitor.Exit(this._steamTickLock); + } + + public void PulseSteamCallback() + { + if (!Monitor.TryEnter(this._steamCallbackLock)) + return; + Monitor.Pulse(this._steamCallbackLock); + Monitor.Exit(this._steamCallbackLock); + } + + public static void Pulse() + { + CoreSocialModule._instance.PulseSteamTick(); + CoreSocialModule._instance.PulseSteamCallback(); + } + + private void SteamTickLoop(object context) + { + Monitor.Enter(this._steamTickLock); + while (this.IsSteamValid) + { + if (CoreSocialModule.OnTick != null) + CoreSocialModule.OnTick(); + Monitor.Wait(this._steamTickLock); + } + Monitor.Exit(this._steamTickLock); + } + + private void SteamCallbackLoop(object context) + { + Monitor.Enter(this._steamCallbackLock); + while (this.IsSteamValid) + { + SteamAPI.RunCallbacks(); + Monitor.Wait(this._steamCallbackLock); + } + Monitor.Exit(this._steamCallbackLock); + SteamAPI.Shutdown(); + } + + public void Shutdown() => Application.ApplicationExit += (EventHandler) ((obj, evt) => this.IsSteamValid = false); + + public void OnOverlayActivated(GameOverlayActivated_t result) => Main.instance.IsMouseVisible = result.m_bActive == 1; + } +} diff --git a/Social/Steam/FriendsSocialModule.cs b/Social/Steam/FriendsSocialModule.cs new file mode 100644 index 0000000..671ecba --- /dev/null +++ b/Social/Steam/FriendsSocialModule.cs @@ -0,0 +1,25 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.FriendsSocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Steamworks; + +namespace Terraria.Social.Steam +{ + public class FriendsSocialModule : Terraria.Social.Base.FriendsSocialModule + { + public override void Initialize() + { + } + + public override void Shutdown() + { + } + + public override string GetUsername() => SteamFriends.GetPersonaName(); + + public override void OpenJoinInterface() => SteamFriends.ActivateGameOverlay("Friends"); + } +} diff --git a/Social/Steam/Lobby.cs b/Social/Steam/Lobby.cs new file mode 100644 index 0000000..24d9568 --- /dev/null +++ b/Social/Steam/Lobby.cs @@ -0,0 +1,123 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.Lobby +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Steamworks; +using System; +using System.Collections.Generic; + +namespace Terraria.Social.Steam +{ + public class Lobby + { + private HashSet _usersSeen = new HashSet(); + private byte[] _messageBuffer = new byte[1024]; + public CSteamID Id = (CSteamID) CSteamID.Nil; + public CSteamID Owner = (CSteamID) CSteamID.Nil; + public LobbyState State; + private CallResult _lobbyEnter; + private CallResult.APIDispatchDelegate _lobbyEnterExternalCallback; + private CallResult _lobbyCreated; + private CallResult.APIDispatchDelegate _lobbyCreatedExternalCallback; + + public Lobby() + { + // ISSUE: method pointer + this._lobbyEnter = CallResult.Create(new CallResult.APIDispatchDelegate((object) this, __methodptr(OnLobbyEntered))); + // ISSUE: method pointer + this._lobbyCreated = CallResult.Create(new CallResult.APIDispatchDelegate((object) this, __methodptr(OnLobbyCreated))); + } + + public void Create( + bool inviteOnly, + CallResult.APIDispatchDelegate callResult) + { + SteamAPICall_t lobby = SteamMatchmaking.CreateLobby(inviteOnly ? (ELobbyType) 0 : (ELobbyType) 1, 256); + this._lobbyCreatedExternalCallback = callResult; + this._lobbyCreated.Set(lobby, (CallResult.APIDispatchDelegate) null); + this.State = LobbyState.Creating; + } + + public void OpenInviteOverlay() + { + if (this.State == LobbyState.Inactive) + SteamFriends.ActivateGameOverlayInviteDialog(new CSteamID(Main.LobbyId)); + else + SteamFriends.ActivateGameOverlayInviteDialog(this.Id); + } + + public void Join( + CSteamID lobbyId, + CallResult.APIDispatchDelegate callResult) + { + if (this.State != LobbyState.Inactive) + return; + this.State = LobbyState.Connecting; + this._lobbyEnterExternalCallback = callResult; + this._lobbyEnter.Set(SteamMatchmaking.JoinLobby(lobbyId), (CallResult.APIDispatchDelegate) null); + } + + public byte[] GetMessage(int index) + { + CSteamID csteamId; + EChatEntryType echatEntryType; + int lobbyChatEntry = SteamMatchmaking.GetLobbyChatEntry(this.Id, index, ref csteamId, this._messageBuffer, this._messageBuffer.Length, ref echatEntryType); + byte[] numArray = new byte[lobbyChatEntry]; + Array.Copy((Array) this._messageBuffer, (Array) numArray, lobbyChatEntry); + return numArray; + } + + public int GetUserCount() => SteamMatchmaking.GetNumLobbyMembers(this.Id); + + public CSteamID GetUserByIndex(int index) => SteamMatchmaking.GetLobbyMemberByIndex(this.Id, index); + + public bool SendMessage(byte[] data) => this.SendMessage(data, data.Length); + + public bool SendMessage(byte[] data, int length) => this.State == LobbyState.Active && SteamMatchmaking.SendLobbyChatMsg(this.Id, data, length); + + public void Set(CSteamID lobbyId) + { + this.Id = lobbyId; + this.State = LobbyState.Active; + this.Owner = SteamMatchmaking.GetLobbyOwner(lobbyId); + } + + public void SetPlayedWith(CSteamID userId) + { + if (this._usersSeen.Contains(userId)) + return; + SteamFriends.SetPlayedWith(userId); + this._usersSeen.Add(userId); + } + + public void Leave() + { + if (this.State == LobbyState.Active) + SteamMatchmaking.LeaveLobby(this.Id); + this.State = LobbyState.Inactive; + this._usersSeen.Clear(); + } + + private void OnLobbyEntered(LobbyEnter_t result, bool failure) + { + if (this.State != LobbyState.Connecting) + return; + this.State = !failure ? LobbyState.Active : LobbyState.Inactive; + this.Id = new CSteamID((ulong) result.m_ulSteamIDLobby); + this.Owner = SteamMatchmaking.GetLobbyOwner(this.Id); + this._lobbyEnterExternalCallback.Invoke(result, failure); + } + + private void OnLobbyCreated(LobbyCreated_t result, bool failure) + { + if (this.State != LobbyState.Creating) + return; + this.State = !failure ? LobbyState.Active : LobbyState.Inactive; + this.Id = new CSteamID((ulong) result.m_ulSteamIDLobby); + this.Owner = SteamMatchmaking.GetLobbyOwner(this.Id); + this._lobbyCreatedExternalCallback.Invoke(result, failure); + } + } +} diff --git a/Social/Steam/LobbyState.cs b/Social/Steam/LobbyState.cs new file mode 100644 index 0000000..4fdc167 --- /dev/null +++ b/Social/Steam/LobbyState.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.LobbyState +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Social.Steam +{ + public enum LobbyState + { + Inactive, + Connecting, + Creating, + Active, + } +} diff --git a/Social/Steam/NetClientSocialModule.cs b/Social/Steam/NetClientSocialModule.cs new file mode 100644 index 0000000..b8a7183 --- /dev/null +++ b/Social/Steam/NetClientSocialModule.cs @@ -0,0 +1,243 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.NetClientSocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Steamworks; +using System; +using System.Diagnostics; +using Terraria.Localization; +using Terraria.Net; +using Terraria.Net.Sockets; +using Terraria.Social.WeGame; + +namespace Terraria.Social.Steam +{ + public class NetClientSocialModule : NetSocialModule + { + private Callback _gameLobbyJoinRequested; + private Callback _p2pSessionRequest; + private Callback _p2pSessionConnectfail; + private HAuthTicket _authTicket = (HAuthTicket) HAuthTicket.Invalid; + private byte[] _authData = new byte[1021]; + private uint _authDataLength; + private bool _hasLocalHost; + + public NetClientSocialModule() + : base(2, 1) + { + } + + public override void Initialize() + { + base.Initialize(); + // ISSUE: method pointer + this._gameLobbyJoinRequested = Callback.Create(new Callback.DispatchDelegate((object) this, __methodptr(OnLobbyJoinRequest))); + // ISSUE: method pointer + this._p2pSessionRequest = Callback.Create(new Callback.DispatchDelegate((object) this, __methodptr(OnP2PSessionRequest))); + // ISSUE: method pointer + this._p2pSessionConnectfail = Callback.Create(new Callback.DispatchDelegate((object) this, __methodptr(OnSessionConnectFail))); + Main.OnEngineLoad += new Action(this.CheckParameters); + } + + private void CheckParameters() + { + ulong result; + if (!Program.LaunchParameters.ContainsKey("+connect_lobby") || !ulong.TryParse(Program.LaunchParameters["+connect_lobby"], out result)) + return; + this.ConnectToLobby(result); + } + + public void ConnectToLobby(ulong lobbyId) + { + CSteamID lobbySteamId = new CSteamID(lobbyId); + if (!((CSteamID) ref lobbySteamId).IsValid()) + return; + Main.OpenPlayerSelect((Main.OnPlayerSelected) (playerData => + { + Main.ServerSideCharacter = false; + playerData.SetAsActive(); + Main.menuMode = 882; + Main.statusText = Language.GetTextValue("Social.Joining"); + WeGameHelper.WriteDebugString(" CheckParameters, lobby.join"); + // ISSUE: method pointer + this._lobby.Join(lobbySteamId, new CallResult.APIDispatchDelegate((object) this, __methodptr(OnLobbyEntered))); + })); + } + + public override void LaunchLocalServer(Process process, ServerMode mode) + { + WeGameHelper.WriteDebugString(nameof (LaunchLocalServer)); + if (this._lobby.State != LobbyState.Inactive) + this._lobby.Leave(); + ProcessStartInfo startInfo = process.StartInfo; + startInfo.Arguments = startInfo.Arguments + " -steam -localsteamid " + (object) (ulong) SteamUser.GetSteamID().m_SteamID; + if (mode.HasFlag((Enum) ServerMode.Lobby)) + { + this._hasLocalHost = true; + if (mode.HasFlag((Enum) ServerMode.FriendsCanJoin)) + process.StartInfo.Arguments += " -lobby friends"; + else + process.StartInfo.Arguments += " -lobby private"; + if (mode.HasFlag((Enum) ServerMode.FriendsOfFriends)) + process.StartInfo.Arguments += " -friendsoffriends"; + } + SteamFriends.SetRichPresence("status", Language.GetTextValue("Social.StatusInGame")); + Netplay.OnDisconnect += new Action(this.OnDisconnect); + process.Start(); + } + + public override ulong GetLobbyId() => 0; + + public override bool StartListening(SocketConnectionAccepted callback) => false; + + public override void StopListening() + { + } + + public override void Close(RemoteAddress address) + { + SteamFriends.ClearRichPresence(); + this.Close(this.RemoteAddressToSteamId(address)); + } + + public override bool CanInvite() => (this._hasLocalHost || this._lobby.State == LobbyState.Active || Main.LobbyId != 0UL) && (uint) Main.netMode > 0U; + + public override void OpenInviteInterface() => this._lobby.OpenInviteOverlay(); + + private void Close(CSteamID user) + { + if (!this._connectionStateMap.ContainsKey(user)) + return; + SteamNetworking.CloseP2PSessionWithUser(user); + this.ClearAuthTicket(); + this._connectionStateMap[user] = NetSocialModule.ConnectionState.Inactive; + this._lobby.Leave(); + this._reader.ClearUser(user); + this._writer.ClearUser(user); + } + + public override void Connect(RemoteAddress address) + { + } + + public override void CancelJoin() + { + if (this._lobby.State == LobbyState.Inactive) + return; + this._lobby.Leave(); + } + + private void OnLobbyJoinRequest(GameLobbyJoinRequested_t result) + { + WeGameHelper.WriteDebugString(" OnLobbyJoinRequest"); + if (this._lobby.State != LobbyState.Inactive) + this._lobby.Leave(); + string friendName = SteamFriends.GetFriendPersonaName((CSteamID) result.m_steamIDFriend); + Main.QueueMainThreadAction((Action) (() => Main.OpenPlayerSelect((Main.OnPlayerSelected) (playerData => + { + Main.ServerSideCharacter = false; + playerData.SetAsActive(); + Main.menuMode = 882; + Main.statusText = Language.GetTextValue("Social.JoiningFriend", (object) friendName); + // ISSUE: method pointer + this._lobby.Join((CSteamID) result.m_steamIDLobby, new CallResult.APIDispatchDelegate((object) this, __methodptr(OnLobbyEntered))); + })))); + } + + private void OnLobbyEntered(LobbyEnter_t result, bool failure) + { + WeGameHelper.WriteDebugString(" OnLobbyEntered"); + SteamNetworking.AllowP2PPacketRelay(true); + this.SendAuthTicket(this._lobby.Owner); + int num = 0; + P2PSessionState_t p2PsessionStateT; + while (SteamNetworking.GetP2PSessionState(this._lobby.Owner, ref p2PsessionStateT) && p2PsessionStateT.m_bConnectionActive != 1) + { + switch ((byte) p2PsessionStateT.m_eP2PSessionError) + { + case 1: + this.ClearAuthTicket(); + return; + case 2: + this.ClearAuthTicket(); + return; + case 3: + this.ClearAuthTicket(); + return; + case 4: + if (++num > 5) + { + this.ClearAuthTicket(); + return; + } + SteamNetworking.CloseP2PSessionWithUser(this._lobby.Owner); + this.SendAuthTicket(this._lobby.Owner); + continue; + case 5: + this.ClearAuthTicket(); + return; + default: + continue; + } + } + this._connectionStateMap[this._lobby.Owner] = NetSocialModule.ConnectionState.Connected; + SteamFriends.SetPlayedWith(this._lobby.Owner); + SteamFriends.SetRichPresence("status", Language.GetTextValue("Social.StatusInGame")); + Main.clrInput(); + Netplay.ServerPassword = ""; + Main.GetInputText(""); + Main.autoPass = false; + Main.netMode = 1; + Netplay.OnConnectedToSocialServer((ISocket) new SocialSocket((RemoteAddress) new SteamAddress(this._lobby.Owner))); + } + + private void SendAuthTicket(CSteamID address) + { + WeGameHelper.WriteDebugString(" SendAuthTicket"); + if (HAuthTicket.op_Equality(this._authTicket, (HAuthTicket) HAuthTicket.Invalid)) + this._authTicket = SteamUser.GetAuthSessionTicket(this._authData, this._authData.Length, ref this._authDataLength); + int length = (int) this._authDataLength + 3; + byte[] numArray = new byte[length]; + numArray[0] = (byte) (length & (int) byte.MaxValue); + numArray[1] = (byte) (length >> 8 & (int) byte.MaxValue); + numArray[2] = (byte) 93; + for (int index = 0; (long) index < (long) this._authDataLength; ++index) + numArray[index + 3] = this._authData[index]; + SteamNetworking.SendP2PPacket(address, numArray, (uint) length, (EP2PSend) 2, 1); + } + + private void ClearAuthTicket() + { + if (HAuthTicket.op_Inequality(this._authTicket, (HAuthTicket) HAuthTicket.Invalid)) + SteamUser.CancelAuthTicket(this._authTicket); + this._authTicket = (HAuthTicket) HAuthTicket.Invalid; + for (int index = 0; index < this._authData.Length; ++index) + this._authData[index] = (byte) 0; + this._authDataLength = 0U; + } + + private void OnDisconnect() + { + SteamFriends.ClearRichPresence(); + this._hasLocalHost = false; + Netplay.OnDisconnect -= new Action(this.OnDisconnect); + } + + private void OnSessionConnectFail(P2PSessionConnectFail_t result) + { + WeGameHelper.WriteDebugString(" OnSessionConnectFail"); + this.Close((CSteamID) result.m_steamIDRemote); + } + + private void OnP2PSessionRequest(P2PSessionRequest_t result) + { + WeGameHelper.WriteDebugString(" OnP2PSessionRequest"); + CSteamID steamIdRemote = (CSteamID) result.m_steamIDRemote; + if (!this._connectionStateMap.ContainsKey(steamIdRemote) || this._connectionStateMap[steamIdRemote] == NetSocialModule.ConnectionState.Inactive) + return; + SteamNetworking.AcceptP2PSessionWithUser(steamIdRemote); + } + } +} diff --git a/Social/Steam/NetServerSocialModule.cs b/Social/Steam/NetServerSocialModule.cs new file mode 100644 index 0000000..ce2bbff --- /dev/null +++ b/Social/Steam/NetServerSocialModule.cs @@ -0,0 +1,197 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.NetServerSocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Steamworks; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using Terraria.Localization; +using Terraria.Net; +using Terraria.Net.Sockets; + +namespace Terraria.Social.Steam +{ + public class NetServerSocialModule : NetSocialModule + { + private ServerMode _mode; + private Callback _p2pSessionRequest; + private bool _acceptingClients; + private SocketConnectionAccepted _connectionAcceptedCallback; + + public NetServerSocialModule() + : base(1, 2) + { + } + + private void BroadcastConnectedUsers() + { + List ulongList = new List(); + foreach (KeyValuePair connectionState in this._connectionStateMap) + { + if (connectionState.Value == NetSocialModule.ConnectionState.Connected) + ulongList.Add((ulong) connectionState.Key.m_SteamID); + } + byte[] numArray = new byte[ulongList.Count * 8 + 1]; + using (MemoryStream memoryStream = new MemoryStream(numArray)) + { + using (BinaryWriter binaryWriter = new BinaryWriter((Stream) memoryStream)) + { + binaryWriter.Write((byte) 1); + foreach (ulong num in ulongList) + binaryWriter.Write(num); + } + } + this._lobby.SendMessage(numArray); + } + + public override void Initialize() + { + base.Initialize(); + this._reader.SetReadEvent(new SteamP2PReader.OnReadEvent(this.OnPacketRead)); + // ISSUE: method pointer + this._p2pSessionRequest = Callback.Create(new Callback.DispatchDelegate((object) this, __methodptr(OnP2PSessionRequest))); + if (Program.LaunchParameters.ContainsKey("-lobby")) + { + this._mode |= ServerMode.Lobby; + string launchParameter = Program.LaunchParameters["-lobby"]; + if (!(launchParameter == "private")) + { + if (launchParameter == "friends") + { + this._mode |= ServerMode.FriendsCanJoin; + // ISSUE: method pointer + this._lobby.Create(false, new CallResult.APIDispatchDelegate((object) this, __methodptr(OnLobbyCreated))); + } + else + Console.WriteLine(Language.GetTextValue("Error.InvalidLobbyFlag", (object) "private", (object) "friends")); + } + else + { + // ISSUE: method pointer + this._lobby.Create(true, new CallResult.APIDispatchDelegate((object) this, __methodptr(OnLobbyCreated))); + } + } + if (!Program.LaunchParameters.ContainsKey("-friendsoffriends")) + return; + this._mode |= ServerMode.FriendsOfFriends; + } + + public override ulong GetLobbyId() => (ulong) this._lobby.Id.m_SteamID; + + public override void OpenInviteInterface() + { + } + + public override void CancelJoin() + { + } + + public override bool CanInvite() => false; + + public override void LaunchLocalServer(Process process, ServerMode mode) + { + } + + public override bool StartListening(SocketConnectionAccepted callback) + { + this._acceptingClients = true; + this._connectionAcceptedCallback = callback; + return true; + } + + public override void StopListening() => this._acceptingClients = false; + + public override void Connect(RemoteAddress address) + { + } + + public override void Close(RemoteAddress address) => this.Close(this.RemoteAddressToSteamId(address)); + + private void Close(CSteamID user) + { + if (!this._connectionStateMap.ContainsKey(user)) + return; + SteamUser.EndAuthSession(user); + SteamNetworking.CloseP2PSessionWithUser(user); + this._connectionStateMap[user] = NetSocialModule.ConnectionState.Inactive; + this._reader.ClearUser(user); + this._writer.ClearUser(user); + } + + private void OnLobbyCreated(LobbyCreated_t result, bool failure) + { + if (failure) + return; + SteamFriends.SetRichPresence("status", Language.GetTextValue("Social.StatusInGame")); + } + + private bool OnPacketRead(byte[] data, int length, CSteamID userId) + { + if (!this._connectionStateMap.ContainsKey(userId) || this._connectionStateMap[userId] == NetSocialModule.ConnectionState.Inactive) + { + P2PSessionRequest_t result; + result.m_steamIDRemote = (__Null) userId; + this.OnP2PSessionRequest(result); + if (!this._connectionStateMap.ContainsKey(userId) || this._connectionStateMap[userId] == NetSocialModule.ConnectionState.Inactive) + return false; + } + NetSocialModule.ConnectionState connectionState = this._connectionStateMap[userId]; + if (connectionState != NetSocialModule.ConnectionState.Authenticating) + return connectionState == NetSocialModule.ConnectionState.Connected; + if (length < 3 || ((int) data[1] << 8 | (int) data[0]) != length || data[2] != (byte) 93) + return false; + byte[] numArray = new byte[data.Length - 3]; + Array.Copy((Array) data, 3, (Array) numArray, 0, numArray.Length); + switch ((int) SteamUser.BeginAuthSession(numArray, numArray.Length, userId)) + { + case 0: + this._connectionStateMap[userId] = NetSocialModule.ConnectionState.Connected; + this.BroadcastConnectedUsers(); + break; + case 1: + this.Close(userId); + break; + case 2: + this.Close(userId); + break; + case 3: + this.Close(userId); + break; + case 4: + this.Close(userId); + break; + case 5: + this.Close(userId); + break; + } + return false; + } + + private void OnP2PSessionRequest(P2PSessionRequest_t result) + { + CSteamID steamIdRemote = (CSteamID) result.m_steamIDRemote; + if (this._connectionStateMap.ContainsKey(steamIdRemote) && this._connectionStateMap[steamIdRemote] != NetSocialModule.ConnectionState.Inactive) + { + SteamNetworking.AcceptP2PSessionWithUser(steamIdRemote); + } + else + { + if (!this._acceptingClients || !this._mode.HasFlag((Enum) ServerMode.FriendsOfFriends) && SteamFriends.GetFriendRelationship(steamIdRemote) != 3) + return; + SteamNetworking.AcceptP2PSessionWithUser(steamIdRemote); + P2PSessionState_t p2PsessionStateT; + do + ; + while (SteamNetworking.GetP2PSessionState(steamIdRemote, ref p2PsessionStateT) && p2PsessionStateT.m_bConnecting == 1); + if (p2PsessionStateT.m_bConnectionActive == null) + this.Close(steamIdRemote); + this._connectionStateMap[steamIdRemote] = NetSocialModule.ConnectionState.Authenticating; + this._connectionAcceptedCallback((ISocket) new SocialSocket((RemoteAddress) new SteamAddress(steamIdRemote))); + } + } + } +} diff --git a/Social/Steam/NetSocialModule.cs b/Social/Steam/NetSocialModule.cs new file mode 100644 index 0000000..96b1679 --- /dev/null +++ b/Social/Steam/NetSocialModule.cs @@ -0,0 +1,126 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.NetSocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Steamworks; +using System; +using System.Collections.Concurrent; +using System.IO; +using Terraria.Net; + +namespace Terraria.Social.Steam +{ + public abstract class NetSocialModule : Terraria.Social.Base.NetSocialModule + { + protected const int ServerReadChannel = 1; + protected const int ClientReadChannel = 2; + protected const int LobbyMessageJoin = 1; + protected const ushort GamePort = 27005; + protected const ushort SteamPort = 27006; + protected const ushort QueryPort = 27007; + protected static readonly byte[] _handshake = new byte[10] + { + (byte) 10, + (byte) 0, + (byte) 93, + (byte) 114, + (byte) 101, + (byte) 108, + (byte) 111, + (byte) 103, + (byte) 105, + (byte) 99 + }; + protected SteamP2PReader _reader; + protected SteamP2PWriter _writer; + protected Lobby _lobby = new Lobby(); + protected ConcurrentDictionary _connectionStateMap = new ConcurrentDictionary(); + protected object _steamLock = new object(); + private Callback _lobbyChatMessage; + + protected NetSocialModule(int readChannel, int writeChannel) + { + this._reader = new SteamP2PReader(readChannel); + this._writer = new SteamP2PWriter(writeChannel); + } + + public override void Initialize() + { + CoreSocialModule.OnTick += new Action(this._reader.ReadTick); + CoreSocialModule.OnTick += new Action(this._writer.SendAll); + NetSocialModule netSocialModule = this; + // ISSUE: virtual method pointer + this._lobbyChatMessage = Callback.Create(new Callback.DispatchDelegate((object) netSocialModule, __vmethodptr(netSocialModule, OnLobbyChatMessage))); + } + + public override void Shutdown() => this._lobby.Leave(); + + public override bool IsConnected(RemoteAddress address) + { + if (address == null) + return false; + CSteamID steamId = this.RemoteAddressToSteamId(address); + if (!this._connectionStateMap.ContainsKey(steamId) || this._connectionStateMap[steamId] != NetSocialModule.ConnectionState.Connected) + return false; + if (this.GetSessionState(steamId).m_bConnectionActive == 1) + return true; + this.Close(address); + return false; + } + + protected virtual void OnLobbyChatMessage(LobbyChatMsg_t result) + { + if (result.m_ulSteamIDLobby != this._lobby.Id.m_SteamID || result.m_eChatEntryType != 1 || result.m_ulSteamIDUser != this._lobby.Owner.m_SteamID) + return; + byte[] message = this._lobby.GetMessage((int) result.m_iChatID); + if (message.Length == 0) + return; + using (MemoryStream memoryStream = new MemoryStream(message)) + { + using (BinaryReader binaryReader = new BinaryReader((Stream) memoryStream)) + { + if (binaryReader.ReadByte() != (byte) 1) + return; + while ((long) message.Length - memoryStream.Position >= 8L) + { + CSteamID userId; + // ISSUE: explicit constructor call + ((CSteamID) ref userId).\u002Ector(binaryReader.ReadUInt64()); + if (CSteamID.op_Inequality(userId, SteamUser.GetSteamID())) + this._lobby.SetPlayedWith(userId); + } + } + } + } + + protected P2PSessionState_t GetSessionState(CSteamID userId) + { + P2PSessionState_t p2PsessionStateT; + SteamNetworking.GetP2PSessionState(userId, ref p2PsessionStateT); + return p2PsessionStateT; + } + + protected CSteamID RemoteAddressToSteamId(RemoteAddress address) => ((SteamAddress) address).SteamId; + + public override bool Send(RemoteAddress address, byte[] data, int length) + { + this._writer.QueueSend(this.RemoteAddressToSteamId(address), data, length); + return true; + } + + public override int Receive(RemoteAddress address, byte[] data, int offset, int length) => address == null ? 0 : this._reader.Receive(this.RemoteAddressToSteamId(address), data, offset, length); + + public override bool IsDataAvailable(RemoteAddress address) => this._reader.IsDataAvailable(this.RemoteAddressToSteamId(address)); + + public enum ConnectionState + { + Inactive, + Authenticating, + Connected, + } + + protected delegate void AsyncHandshake(CSteamID client); + } +} diff --git a/Social/Steam/OverlaySocialModule.cs b/Social/Steam/OverlaySocialModule.cs new file mode 100644 index 0000000..e644315 --- /dev/null +++ b/Social/Steam/OverlaySocialModule.cs @@ -0,0 +1,50 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.OverlaySocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Steamworks; + +namespace Terraria.Social.Steam +{ + public class OverlaySocialModule : Terraria.Social.Base.OverlaySocialModule + { + private Callback _gamepadTextInputDismissed; + private bool _gamepadTextInputActive; + + public override void Initialize() => this._gamepadTextInputDismissed = Callback.Create(new Callback.DispatchDelegate((object) this, __methodptr(OnGamepadTextInputDismissed))); + + public override void Shutdown() + { + } + + public override bool IsGamepadTextInputActive() => this._gamepadTextInputActive; + + public override bool ShowGamepadTextInput( + string description, + uint maxLength, + bool multiLine = false, + string existingText = "", + bool password = false) + { + if (this._gamepadTextInputActive) + return false; + int num = SteamUtils.ShowGamepadTextInput(password ? (EGamepadTextInputMode) 1 : (EGamepadTextInputMode) 0, multiLine ? (EGamepadTextInputLineMode) 1 : (EGamepadTextInputLineMode) 0, description, maxLength, existingText) ? 1 : 0; + if (num == 0) + return num != 0; + this._gamepadTextInputActive = true; + return num != 0; + } + + public override string GetGamepadText() + { + uint gamepadTextLength = SteamUtils.GetEnteredGamepadTextLength(); + string str; + SteamUtils.GetEnteredGamepadTextInput(ref str, gamepadTextLength); + return str; + } + + private void OnGamepadTextInputDismissed(GamepadTextInputDismissed_t result) => this._gamepadTextInputActive = false; + } +} diff --git a/Social/Steam/SteamP2PReader.cs b/Social/Steam/SteamP2PReader.cs new file mode 100644 index 0000000..0dfbf1c --- /dev/null +++ b/Social/Steam/SteamP2PReader.cs @@ -0,0 +1,121 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.SteamP2PReader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Steamworks; +using System; +using System.Collections.Generic; + +namespace Terraria.Social.Steam +{ + public class SteamP2PReader + { + public object SteamLock = new object(); + private const int BUFFER_SIZE = 4096; + private Dictionary> _pendingReadBuffers = new Dictionary>(); + private Queue _deletionQueue = new Queue(); + private Queue _bufferPool = new Queue(); + private int _channel; + private SteamP2PReader.OnReadEvent _readEvent; + + public SteamP2PReader(int channel) => this._channel = channel; + + public void ClearUser(CSteamID id) + { + lock (this._pendingReadBuffers) + this._deletionQueue.Enqueue(id); + } + + public bool IsDataAvailable(CSteamID id) + { + lock (this._pendingReadBuffers) + { + if (!this._pendingReadBuffers.ContainsKey(id)) + return false; + Queue pendingReadBuffer = this._pendingReadBuffers[id]; + return pendingReadBuffer.Count != 0 && pendingReadBuffer.Peek().Size != 0U; + } + } + + public void SetReadEvent(SteamP2PReader.OnReadEvent method) => this._readEvent = method; + + private bool IsPacketAvailable(out uint size) + { + lock (this.SteamLock) + return SteamNetworking.IsP2PPacketAvailable(ref size, this._channel); + } + + public void ReadTick() + { + lock (this._pendingReadBuffers) + { + while (this._deletionQueue.Count > 0) + this._pendingReadBuffers.Remove(this._deletionQueue.Dequeue()); + uint size1; + while (this.IsPacketAvailable(out size1)) + { + byte[] data = this._bufferPool.Count != 0 ? this._bufferPool.Dequeue() : new byte[(int) Math.Max(size1, 4096U)]; + uint size2; + CSteamID csteamId; + bool flag; + lock (this.SteamLock) + flag = SteamNetworking.ReadP2PPacket(data, (uint) data.Length, ref size2, ref csteamId, this._channel); + if (flag) + { + if (this._readEvent == null || this._readEvent(data, (int) size2, csteamId)) + { + if (!this._pendingReadBuffers.ContainsKey(csteamId)) + this._pendingReadBuffers[csteamId] = new Queue(); + this._pendingReadBuffers[csteamId].Enqueue(new SteamP2PReader.ReadResult(data, size2)); + } + else + this._bufferPool.Enqueue(data); + } + } + } + } + + public int Receive(CSteamID user, byte[] buffer, int bufferOffset, int bufferSize) + { + uint num1 = 0; + lock (this._pendingReadBuffers) + { + if (!this._pendingReadBuffers.ContainsKey(user)) + return 0; + Queue pendingReadBuffer = this._pendingReadBuffers[user]; + while (pendingReadBuffer.Count > 0) + { + SteamP2PReader.ReadResult readResult = pendingReadBuffer.Peek(); + uint num2 = Math.Min((uint) bufferSize - num1, readResult.Size - readResult.Offset); + if (num2 == 0U) + return (int) num1; + Array.Copy((Array) readResult.Data, (long) readResult.Offset, (Array) buffer, (long) bufferOffset + (long) num1, (long) num2); + if ((int) num2 == (int) readResult.Size - (int) readResult.Offset) + this._bufferPool.Enqueue(pendingReadBuffer.Dequeue().Data); + else + readResult.Offset += num2; + num1 += num2; + } + } + return (int) num1; + } + + public class ReadResult + { + public byte[] Data; + public uint Size; + public uint Offset; + + public ReadResult(byte[] data, uint size) + { + this.Data = data; + this.Size = size; + this.Offset = 0U; + } + } + + public delegate bool OnReadEvent(byte[] data, int size, CSteamID user); + } +} diff --git a/Social/Steam/SteamP2PWriter.cs b/Social/Steam/SteamP2PWriter.cs new file mode 100644 index 0000000..cc895d5 --- /dev/null +++ b/Social/Steam/SteamP2PWriter.cs @@ -0,0 +1,106 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.Steam.SteamP2PWriter +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Steamworks; +using System; +using System.Collections.Generic; + +namespace Terraria.Social.Steam +{ + public class SteamP2PWriter + { + private const int BUFFER_SIZE = 1024; + private Dictionary> _pendingSendData = new Dictionary>(); + private Dictionary> _pendingSendDataSwap = new Dictionary>(); + private Queue _bufferPool = new Queue(); + private int _channel; + private object _lock = new object(); + + public SteamP2PWriter(int channel) => this._channel = channel; + + public void QueueSend(CSteamID user, byte[] data, int length) + { + lock (this._lock) + { + Queue writeInformationQueue; + if (this._pendingSendData.ContainsKey(user)) + writeInformationQueue = this._pendingSendData[user]; + else + this._pendingSendData[user] = writeInformationQueue = new Queue(); + int val1 = length; + int sourceIndex = 0; + while (val1 > 0) + { + SteamP2PWriter.WriteInformation writeInformation; + if (writeInformationQueue.Count == 0 || 1024 - writeInformationQueue.Peek().Size == 0) + { + writeInformation = this._bufferPool.Count <= 0 ? new SteamP2PWriter.WriteInformation() : new SteamP2PWriter.WriteInformation(this._bufferPool.Dequeue()); + writeInformationQueue.Enqueue(writeInformation); + } + else + writeInformation = writeInformationQueue.Peek(); + int length1 = Math.Min(val1, 1024 - writeInformation.Size); + Array.Copy((Array) data, sourceIndex, (Array) writeInformation.Data, writeInformation.Size, length1); + writeInformation.Size += length1; + val1 -= length1; + sourceIndex += length1; + } + } + } + + public void ClearUser(CSteamID user) + { + lock (this._lock) + { + if (this._pendingSendData.ContainsKey(user)) + { + Queue writeInformationQueue = this._pendingSendData[user]; + while (writeInformationQueue.Count > 0) + this._bufferPool.Enqueue(writeInformationQueue.Dequeue().Data); + } + if (!this._pendingSendDataSwap.ContainsKey(user)) + return; + Queue writeInformationQueue1 = this._pendingSendDataSwap[user]; + while (writeInformationQueue1.Count > 0) + this._bufferPool.Enqueue(writeInformationQueue1.Dequeue().Data); + } + } + + public void SendAll() + { + lock (this._lock) + Utils.Swap>>(ref this._pendingSendData, ref this._pendingSendDataSwap); + foreach (KeyValuePair> keyValuePair in this._pendingSendDataSwap) + { + Queue writeInformationQueue = keyValuePair.Value; + while (writeInformationQueue.Count > 0) + { + SteamP2PWriter.WriteInformation writeInformation = writeInformationQueue.Dequeue(); + SteamNetworking.SendP2PPacket(keyValuePair.Key, writeInformation.Data, (uint) writeInformation.Size, (EP2PSend) 2, this._channel); + this._bufferPool.Enqueue(writeInformation.Data); + } + } + } + + public class WriteInformation + { + public byte[] Data; + public int Size; + + public WriteInformation() + { + this.Data = new byte[1024]; + this.Size = 0; + } + + public WriteInformation(byte[] data) + { + this.Data = data; + this.Size = 0; + } + } + } +} diff --git a/Social/WeGame/AchievementsSocialModule.cs b/Social/WeGame/AchievementsSocialModule.cs new file mode 100644 index 0000000..b5aee8b --- /dev/null +++ b/Social/WeGame/AchievementsSocialModule.cs @@ -0,0 +1,173 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.AchievementsSocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using rail; +using System; +using System.Threading; + +namespace Terraria.Social.WeGame +{ + public class AchievementsSocialModule : Terraria.Social.Base.AchievementsSocialModule + { + private const string FILE_NAME = "/achievements-wegame.dat"; + private bool _areStatsReceived; + private bool _areAchievementReceived; + private RailCallBackHelper _callbackHelper = new RailCallBackHelper(); + private IRailPlayerAchievement _playerAchievement; + private IRailPlayerStats _playerStats; + + public override void Initialize() + { + // ISSUE: method pointer + this._callbackHelper.RegisterCallback((RAILEventID) 2001, new RailEventCallBackHandler((object) this, __methodptr(RailEventCallBack))); + // ISSUE: method pointer + this._callbackHelper.RegisterCallback((RAILEventID) 2101, new RailEventCallBackHandler((object) this, __methodptr(RailEventCallBack))); + IRailPlayerStats myPlayerStats = this.GetMyPlayerStats(); + IRailPlayerAchievement playerAchievement = this.GetMyPlayerAchievement(); + if (myPlayerStats == null || playerAchievement == null) + return; + myPlayerStats.AsyncRequestStats(""); + playerAchievement.AsyncRequestAchievement(""); + while (!this._areStatsReceived && !this._areAchievementReceived) + { + CoreSocialModule.RailEventTick(); + Thread.Sleep(10); + } + } + + public override void Shutdown() => this.StoreStats(); + + private IRailPlayerStats GetMyPlayerStats() + { + if (this._playerStats == null) + { + IRailStatisticHelper irailStatisticHelper = rail_api.RailFactory().RailStatisticHelper(); + if (irailStatisticHelper != null) + { + RailID railId = new RailID(); + ((RailComparableID) railId).id_ = (__Null) 0L; + this._playerStats = irailStatisticHelper.CreatePlayerStats(railId); + } + } + return this._playerStats; + } + + private IRailPlayerAchievement GetMyPlayerAchievement() + { + if (this._playerAchievement == null) + { + IRailAchievementHelper achievementHelper = rail_api.RailFactory().RailAchievementHelper(); + if (achievementHelper != null) + { + RailID railId = new RailID(); + ((RailComparableID) railId).id_ = (__Null) 0L; + this._playerAchievement = achievementHelper.CreatePlayerAchievement(railId); + } + } + return this._playerAchievement; + } + + public void RailEventCallBack(RAILEventID eventId, EventBase data) + { + if (eventId != 2001) + { + if (eventId != 2101) + return; + this._areAchievementReceived = true; + } + else + this._areStatsReceived = true; + } + + public override bool IsAchievementCompleted(string name) + { + bool flag = false; + RailResult railResult = (RailResult) 1; + IRailPlayerAchievement playerAchievement = this.GetMyPlayerAchievement(); + if (playerAchievement != null) + railResult = playerAchievement.HasAchieved(name, ref flag); + return flag && railResult == 0; + } + + public override byte[] GetEncryptionKey() + { + RailID railId = rail_api.RailFactory().RailPlayer().GetRailID(); + byte[] numArray = new byte[16]; + byte[] bytes = BitConverter.GetBytes((ulong) ((RailComparableID) railId).id_); + Array.Copy((Array) bytes, (Array) numArray, 8); + Array.Copy((Array) bytes, 0, (Array) numArray, 8, 8); + return numArray; + } + + public override string GetSavePath() => "/achievements-wegame.dat"; + + private int GetIntStat(string name) + { + int num = 0; + this.GetMyPlayerStats()?.GetStatValue(name, ref num); + return num; + } + + private float GetFloatStat(string name) + { + double num = 0.0; + this.GetMyPlayerStats()?.GetStatValue(name, ref num); + return (float) num; + } + + private bool SetFloatStat(string name, float value) + { + IRailPlayerStats myPlayerStats = this.GetMyPlayerStats(); + RailResult railResult = (RailResult) 1; + if (myPlayerStats != null) + railResult = myPlayerStats.SetStatValue(name, (double) value); + return railResult == 0; + } + + public override void UpdateIntStat(string name, int value) + { + IRailPlayerStats myPlayerStats = this.GetMyPlayerStats(); + if (myPlayerStats == null) + return; + int num = 0; + if (myPlayerStats.GetStatValue(name, ref num) != null || num >= value) + return; + myPlayerStats.SetStatValue(name, value); + } + + private bool SetIntStat(string name, int value) + { + IRailPlayerStats myPlayerStats = this.GetMyPlayerStats(); + RailResult railResult = (RailResult) 1; + if (myPlayerStats != null) + railResult = myPlayerStats.SetStatValue(name, value); + return railResult == 0; + } + + public override void UpdateFloatStat(string name, float value) + { + IRailPlayerStats myPlayerStats = this.GetMyPlayerStats(); + if (myPlayerStats == null) + return; + double num = 0.0; + if (myPlayerStats.GetStatValue(name, ref num) != null || num >= (double) value) + return; + myPlayerStats.SetStatValue(name, (double) value); + } + + public override void StoreStats() + { + this.SaveStats(); + this.SaveAchievement(); + } + + private void SaveStats() => this.GetMyPlayerStats()?.AsyncStoreStats(""); + + private void SaveAchievement() => this.GetMyPlayerAchievement()?.AsyncStoreAchievement(""); + + public override void CompleteAchievement(string name) => this.GetMyPlayerAchievement()?.MakeAchievement(name); + } +} diff --git a/Social/WeGame/AsyncTaskHelper.cs b/Social/WeGame/AsyncTaskHelper.cs new file mode 100644 index 0000000..749055b --- /dev/null +++ b/Social/WeGame/AsyncTaskHelper.cs @@ -0,0 +1,26 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.AsyncTaskHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Threading.Tasks; + +namespace Terraria.Social.WeGame +{ + public class AsyncTaskHelper + { + private CurrentThreadRunner _currentThreadRunner; + + private AsyncTaskHelper() => this._currentThreadRunner = new CurrentThreadRunner(); + + public void RunAsyncTaskAndReply(Action task, Action replay) => Task.Factory.StartNew((Action) (() => + { + task(); + this._currentThreadRunner.Run(replay); + })); + + public void RunAsyncTask(Action task) => Task.Factory.StartNew(task); + } +} diff --git a/Social/WeGame/CloudSocialModule.cs b/Social/WeGame/CloudSocialModule.cs new file mode 100644 index 0000000..e36bcab --- /dev/null +++ b/Social/WeGame/CloudSocialModule.cs @@ -0,0 +1,93 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.CloudSocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using rail; +using System.Collections.Generic; + +namespace Terraria.Social.WeGame +{ + public class CloudSocialModule : Terraria.Social.Base.CloudSocialModule + { + private object ioLock = new object(); + + public override void Initialize() => base.Initialize(); + + public override void Shutdown() + { + } + + public override IEnumerable GetFiles() + { + lock (this.ioLock) + { + uint fileCount = rail_api.RailFactory().RailStorageHelper().GetFileCount(); + List stringList = new List((int) fileCount); + ulong num = 0; + for (uint index = 0; index < fileCount; ++index) + { + string str; + rail_api.RailFactory().RailStorageHelper().GetFileNameAndSize(index, ref str, ref num); + stringList.Add(str); + } + return (IEnumerable) stringList; + } + } + + public override bool Write(string path, byte[] data, int length) + { + lock (this.ioLock) + { + bool flag = true; + IRailFile irailFile = !rail_api.RailFactory().RailStorageHelper().IsFileExist(path) ? rail_api.RailFactory().RailStorageHelper().CreateFile(path) : rail_api.RailFactory().RailStorageHelper().OpenFile(path); + if (irailFile != null) + { + int num = (int) irailFile.Write(data, (uint) length); + irailFile.Close(); + } + else + flag = false; + return flag; + } + } + + public override int GetFileSize(string path) + { + lock (this.ioLock) + { + IRailFile irailFile = rail_api.RailFactory().RailStorageHelper().OpenFile(path); + if (irailFile == null) + return 0; + int size = (int) irailFile.GetSize(); + irailFile.Close(); + return size; + } + } + + public override void Read(string path, byte[] buffer, int size) + { + lock (this.ioLock) + { + IRailFile irailFile = rail_api.RailFactory().RailStorageHelper().OpenFile(path); + if (irailFile == null) + return; + int num = (int) irailFile.Read(buffer, (uint) size); + irailFile.Close(); + } + } + + public override bool HasFile(string path) + { + lock (this.ioLock) + return rail_api.RailFactory().RailStorageHelper().IsFileExist(path); + } + + public override bool Delete(string path) + { + lock (this.ioLock) + return rail_api.RailFactory().RailStorageHelper().RemoveFile(path) == 0; + } + } +} diff --git a/Social/WeGame/CoreSocialModule.cs b/Social/WeGame/CoreSocialModule.cs new file mode 100644 index 0000000..078a797 --- /dev/null +++ b/Social/WeGame/CoreSocialModule.cs @@ -0,0 +1,87 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.CoreSocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using rail; +using System; +using System.Runtime.InteropServices; +using System.Threading; +using System.Windows.Forms; + +namespace Terraria.Social.WeGame +{ + public class CoreSocialModule : ISocialModule + { + private RailCallBackHelper _callbackHelper = new RailCallBackHelper(); + private static object _railTickLock = new object(); + private bool isRailValid; + + [DllImport("kernel32.dll")] + private static extern uint GetCurrentThreadId(); + + public static event Action OnTick; + + public void Initialize() + { + RailGameID railGameId = new RailGameID(); + ((RailComparableID) railGameId).id_ = (__Null) 2000328L; + string[] strArray = new string[1]{ " " }; + if (rail_api.RailNeedRestartAppForCheckingEnvironment(railGameId, strArray.Length, strArray)) + Environment.Exit(1); + if (!rail_api.RailInitialize()) + Environment.Exit(1); + // ISSUE: method pointer + this._callbackHelper.RegisterCallback((RAILEventID) 2, new RailEventCallBackHandler((object) null, __methodptr(RailEventCallBack))); + this.isRailValid = true; + ThreadPool.QueueUserWorkItem(new WaitCallback(this.TickThread), (object) null); + Main.OnTickForThirdPartySoftwareOnly += new Action(CoreSocialModule.RailEventTick); + } + + public static void RailEventTick() + { + rail_api.RailFireEvents(); + if (!Monitor.TryEnter(CoreSocialModule._railTickLock)) + return; + Monitor.Pulse(CoreSocialModule._railTickLock); + Monitor.Exit(CoreSocialModule._railTickLock); + } + + private void TickThread(object context) + { + Monitor.Enter(CoreSocialModule._railTickLock); + while (this.isRailValid) + { + if (CoreSocialModule.OnTick != null) + CoreSocialModule.OnTick(); + Monitor.Wait(CoreSocialModule._railTickLock); + } + Monitor.Exit(CoreSocialModule._railTickLock); + } + + public void Shutdown() + { + Application.ApplicationExit += (EventHandler) ((obj, evt) => this.isRailValid = false); + this._callbackHelper.UnregisterAllCallback(); + rail_api.RailFinalize(); + } + + public static void RailEventCallBack(RAILEventID eventId, EventBase data) + { + if (eventId != 2) + return; + CoreSocialModule.ProcessRailSystemStateChange((RailSystemState) ((RailSystemStateChanged) data).state); + } + + public static void SaveAndQuitCallBack() => Main.WeGameRequireExitGame(); + + private static void ProcessRailSystemStateChange(RailSystemState state) + { + if (state != 2 && state != 3) + return; + int num = (int) MessageBox.Show("检测到WeGame异常,游戏将自动保存进度并退出游戏", "Terraria--WeGame Error"); + WorldGen.SaveAndQuit(new Action(CoreSocialModule.SaveAndQuitCallBack)); + } + } +} diff --git a/Social/WeGame/CurrentThreadRunner.cs b/Social/WeGame/CurrentThreadRunner.cs new file mode 100644 index 0000000..9bddde7 --- /dev/null +++ b/Social/WeGame/CurrentThreadRunner.cs @@ -0,0 +1,20 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.CurrentThreadRunner +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Windows.Threading; + +namespace Terraria.Social.WeGame +{ + public class CurrentThreadRunner + { + private Dispatcher _dsipatcher; + + public CurrentThreadRunner() => this._dsipatcher = Dispatcher.CurrentDispatcher; + + public void Run(Action f) => this._dsipatcher.BeginInvoke((Delegate) f); + } +} diff --git a/Social/WeGame/FriendsSocialModule.cs b/Social/WeGame/FriendsSocialModule.cs new file mode 100644 index 0000000..94babe6 --- /dev/null +++ b/Social/WeGame/FriendsSocialModule.cs @@ -0,0 +1,35 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.FriendsSocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using rail; + +namespace Terraria.Social.WeGame +{ + public class FriendsSocialModule : Terraria.Social.Base.FriendsSocialModule + { + public override void Initialize() + { + } + + public override void Shutdown() + { + } + + public override string GetUsername() + { + string str; + rail_api.RailFactory().RailPlayer().GetPlayerName(ref str); + WeGameHelper.WriteDebugString("GetUsername by wegame" + str); + return str; + } + + public override void OpenJoinInterface() + { + WeGameHelper.WriteDebugString("OpenJoinInterface by wegame"); + rail_api.RailFactory().RailFloatingWindow().AsyncShowRailFloatingWindow((EnumRailWindowType) 10, ""); + } + } +} diff --git a/Social/WeGame/IPCBase.cs b/Social/WeGame/IPCBase.cs new file mode 100644 index 0000000..de8f69b --- /dev/null +++ b/Social/WeGame/IPCBase.cs @@ -0,0 +1,179 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.IPCBase +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using System.IO; +using System.IO.Pipes; +using System.Linq; +using System.Text; +using System.Threading; + +namespace Terraria.Social.WeGame +{ + public abstract class IPCBase + { + private List> _producer = new List>(); + private List> _consumer = new List>(); + private List _totalData = new List(); + private object _listLock = new object(); + private volatile bool _haveDataToReadFlag; + protected volatile bool _pipeBrokenFlag; + protected PipeStream _pipeStream; + protected CancellationTokenSource _cancelTokenSrc; + protected Action _onDataArrive; + + public int BufferSize { set; get; } + + public virtual event Action OnDataArrive + { + add => this._onDataArrive += value; + remove => this._onDataArrive -= value; + } + + public IPCBase() => this.BufferSize = 256; + + protected void AddPackToList(List pack) + { + lock (this._listLock) + { + this._producer.Add(pack); + this._haveDataToReadFlag = true; + } + } + + protected List> GetPackList() + { + List> byteListList = (List>) null; + lock (this._listLock) + { + List> producer = this._producer; + this._producer = this._consumer; + this._consumer = producer; + this._producer.Clear(); + byteListList = this._consumer; + this._haveDataToReadFlag = false; + } + return byteListList; + } + + protected bool HaveDataToRead() => this._haveDataToReadFlag; + + public virtual void Reset() + { + this._cancelTokenSrc.Cancel(); + this._pipeStream.Dispose(); + this._pipeStream = (PipeStream) null; + } + + public virtual void ProcessDataArriveEvent() + { + if (!this.HaveDataToRead()) + return; + List> packList = this.GetPackList(); + if (packList == null || this._onDataArrive == null) + return; + foreach (List byteList in packList) + this._onDataArrive(byteList.ToArray()); + } + + protected virtual bool BeginReadData() + { + bool flag = false; + IPCContent ipcContent = new IPCContent() + { + data = new byte[this.BufferSize], + CancelToken = this._cancelTokenSrc.Token + }; + WeGameHelper.WriteDebugString(nameof (BeginReadData)); + try + { + if (this._pipeStream != null) + { + this._pipeStream.BeginRead(ipcContent.data, 0, this.BufferSize, new AsyncCallback(this.ReadCallback), (object) ipcContent); + flag = true; + } + } + catch (IOException ex) + { + this._pipeBrokenFlag = true; + WeGameHelper.WriteDebugString("BeginReadData Exception, {0}", (object) ex.Message); + } + return flag; + } + + public virtual void ReadCallback(IAsyncResult result) + { + WeGameHelper.WriteDebugString("ReadCallback: " + Thread.CurrentThread.ManagedThreadId.ToString()); + IPCContent asyncState = (IPCContent) result.AsyncState; + try + { + int count = this._pipeStream.EndRead(result); + if (!asyncState.CancelToken.IsCancellationRequested) + { + if (count <= 0) + return; + this._totalData.AddRange(((IEnumerable) asyncState.data).Take(count)); + if (!this._pipeStream.IsMessageComplete) + return; + this.AddPackToList(this._totalData); + this._totalData = new List(); + } + else + WeGameHelper.WriteDebugString("IPCBase.ReadCallback.cancel"); + } + catch (IOException ex) + { + this._pipeBrokenFlag = true; + WeGameHelper.WriteDebugString("ReadCallback Exception, {0}", (object) ex.Message); + } + catch (InvalidOperationException ex) + { + this._pipeBrokenFlag = true; + WeGameHelper.WriteDebugString("ReadCallback Exception, {0}", (object) ex.Message); + } + } + + public virtual bool Send(string value) => this.Send(Encoding.UTF8.GetBytes(value)); + + public virtual bool Send(byte[] data) + { + bool flag = false; + if (this._pipeStream != null) + { + if (this._pipeStream.IsConnected) + { + try + { + this._pipeStream.BeginWrite(data, 0, data.Length, new AsyncCallback(this.SendCallback), (object) null); + flag = true; + } + catch (IOException ex) + { + this._pipeBrokenFlag = true; + WeGameHelper.WriteDebugString("Send Exception, {0}", (object) ex.Message); + } + } + } + return flag; + } + + protected virtual void SendCallback(IAsyncResult result) + { + try + { + if (this._pipeStream == null) + return; + this._pipeStream.EndWrite(result); + } + catch (IOException ex) + { + this._pipeBrokenFlag = true; + WeGameHelper.WriteDebugString("SendCallback Exception, {0}", (object) ex.Message); + } + } + } +} diff --git a/Social/WeGame/IPCClient.cs b/Social/WeGame/IPCClient.cs new file mode 100644 index 0000000..fe9df71 --- /dev/null +++ b/Social/WeGame/IPCClient.cs @@ -0,0 +1,89 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.IPCClient +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.IO.Pipes; +using System.Threading; +using System.Threading.Tasks; + +namespace Terraria.Social.WeGame +{ + public class IPCClient : IPCBase + { + private bool _connectedFlag; + + public event Action OnConnected; + + public override event Action OnDataArrive + { + add => this._onDataArrive = this._onDataArrive + value; + remove => this._onDataArrive = this._onDataArrive - value; + } + + private NamedPipeClientStream GetPipeStream() => (NamedPipeClientStream) this._pipeStream; + + private void ProcessConnectedEvent() + { + if (!this._connectedFlag) + return; + if (this.OnConnected != null) + this.OnConnected(); + this._connectedFlag = false; + } + + private void ProcessPipeBrokenEvent() + { + if (!this._pipeBrokenFlag) + return; + this.Reset(); + this._pipeBrokenFlag = false; + } + + private void CheckFlagAndFireEvent() + { + this.ProcessConnectedEvent(); + this.ProcessDataArriveEvent(); + this.ProcessPipeBrokenEvent(); + } + + public void Init(string clientName) + { + } + + public void ConnectTo(string serverName) + { + if (this.GetPipeStream() != null) + return; + this._pipeStream = (PipeStream) new NamedPipeClientStream(".", serverName, PipeDirection.InOut, PipeOptions.Asynchronous); + this._cancelTokenSrc = new CancellationTokenSource(); + Task.Factory.StartNew((Action) (content => + { + this.GetPipeStream().Connect(); + if (((CancellationToken) content).IsCancellationRequested) + return; + this.GetPipeStream().ReadMode = PipeTransmissionMode.Message; + this.BeginReadData(); + this._connectedFlag = true; + }), (object) this._cancelTokenSrc.Token); + } + + public void Tick() => this.CheckFlagAndFireEvent(); + + public override void ReadCallback(IAsyncResult result) + { + IPCContent asyncState = (IPCContent) result.AsyncState; + base.ReadCallback(result); + if (!asyncState.CancelToken.IsCancellationRequested) + { + if (!this.GetPipeStream().IsConnected) + return; + this.BeginReadData(); + } + else + WeGameHelper.WriteDebugString("ReadCallback cancel"); + } + } +} diff --git a/Social/WeGame/IPCContent.cs b/Social/WeGame/IPCContent.cs new file mode 100644 index 0000000..b3cd194 --- /dev/null +++ b/Social/WeGame/IPCContent.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.IPCContent +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Threading; + +namespace Terraria.Social.WeGame +{ + public class IPCContent + { + public byte[] data; + + public CancellationToken CancelToken { get; set; } + } +} diff --git a/Social/WeGame/IPCMessage.cs b/Social/WeGame/IPCMessage.cs new file mode 100644 index 0000000..e8ecc8d --- /dev/null +++ b/Social/WeGame/IPCMessage.cs @@ -0,0 +1,45 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.IPCMessage +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Terraria.Social.WeGame +{ + public class IPCMessage + { + private IPCMessageType _cmd; + private string _jsonData; + + public void Build(IPCMessageType cmd, T t) + { + this._jsonData = WeGameHelper.Serialize(t); + this._cmd = cmd; + } + + public void BuildFrom(byte[] data) + { + byte[] array1 = ((IEnumerable) data).Take(4).ToArray(); + byte[] array2 = ((IEnumerable) data).Skip(4).ToArray(); + this._cmd = (IPCMessageType) BitConverter.ToInt32(array1, 0); + this._jsonData = Encoding.UTF8.GetString(array2); + } + + public void Parse(out T value) => WeGameHelper.UnSerialize(this._jsonData, out value); + + public byte[] GetBytes() + { + List byteList = new List(); + byteList.AddRange((IEnumerable) BitConverter.GetBytes((int) this._cmd)); + byteList.AddRange((IEnumerable) Encoding.UTF8.GetBytes(this._jsonData)); + return byteList.ToArray(); + } + + public IPCMessageType GetCmd() => this._cmd; + } +} diff --git a/Social/WeGame/IPCMessageType.cs b/Social/WeGame/IPCMessageType.cs new file mode 100644 index 0000000..4e74b0e --- /dev/null +++ b/Social/WeGame/IPCMessageType.cs @@ -0,0 +1,14 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.IPCMessageType +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Social.WeGame +{ + public enum IPCMessageType + { + IPCMessageTypeReportServerID, + IPCMessageTypeNotifyFriendList, + } +} diff --git a/Social/WeGame/IPCServer.cs b/Social/WeGame/IPCServer.cs new file mode 100644 index 0000000..2947369 --- /dev/null +++ b/Social/WeGame/IPCServer.cs @@ -0,0 +1,124 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.IPCServer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.IO; +using System.IO.Pipes; +using System.Threading; + +namespace Terraria.Social.WeGame +{ + public class IPCServer : IPCBase + { + private string _serverName; + private bool _haveClientAccessFlag; + + public event Action OnClientAccess; + + public override event Action OnDataArrive + { + add => this._onDataArrive = this._onDataArrive + value; + remove => this._onDataArrive = this._onDataArrive - value; + } + + private NamedPipeServerStream GetPipeStream() => (NamedPipeServerStream) this._pipeStream; + + public void Init(string serverName) => this._serverName = serverName; + + private void LazyCreatePipe() + { + if (this.GetPipeStream() != null) + return; + this._pipeStream = (PipeStream) new NamedPipeServerStream(this._serverName, PipeDirection.InOut, 1, PipeTransmissionMode.Message, PipeOptions.Asynchronous); + this._cancelTokenSrc = new CancellationTokenSource(); + } + + public override void ReadCallback(IAsyncResult result) + { + IPCContent asyncState = (IPCContent) result.AsyncState; + base.ReadCallback(result); + if (!asyncState.CancelToken.IsCancellationRequested) + this.ContinueReadOrWait(); + else + WeGameHelper.WriteDebugString("servcer.ReadCallback cancel"); + } + + public void StartListen() + { + this.LazyCreatePipe(); + WeGameHelper.WriteDebugString("begin listen"); + this.GetPipeStream().BeginWaitForConnection(new AsyncCallback(this.ConnectionCallback), (object) this._cancelTokenSrc.Token); + } + + private void RestartListen() => this.StartListen(); + + private void ConnectionCallback(IAsyncResult result) + { + try + { + this._haveClientAccessFlag = true; + WeGameHelper.WriteDebugString("Connected in"); + this.GetPipeStream().EndWaitForConnection(result); + if (!((CancellationToken) result.AsyncState).IsCancellationRequested) + this.BeginReadData(); + else + WeGameHelper.WriteDebugString("ConnectionCallback but user cancel"); + } + catch (IOException ex) + { + this._pipeBrokenFlag = true; + WeGameHelper.WriteDebugString("ConnectionCallback Exception, {0}", (object) ex.Message); + } + } + + public void ContinueReadOrWait() + { + if (this.GetPipeStream().IsConnected) + { + this.BeginReadData(); + } + else + { + try + { + this.GetPipeStream().BeginWaitForConnection(new AsyncCallback(this.ConnectionCallback), (object) null); + } + catch (IOException ex) + { + this._pipeBrokenFlag = true; + WeGameHelper.WriteDebugString("ContinueReadOrWait Exception, {0}", (object) ex.Message); + } + } + } + + private void ProcessClientAccessEvent() + { + if (!this._haveClientAccessFlag) + return; + if (this.OnClientAccess != null) + this.OnClientAccess(); + this._haveClientAccessFlag = false; + } + + private void CheckFlagAndFireEvent() + { + this.ProcessClientAccessEvent(); + this.ProcessDataArriveEvent(); + this.ProcessPipeBrokenEvent(); + } + + private void ProcessPipeBrokenEvent() + { + if (!this._pipeBrokenFlag) + return; + this.Reset(); + this._pipeBrokenFlag = false; + this.RestartListen(); + } + + public void Tick() => this.CheckFlagAndFireEvent(); + } +} diff --git a/Social/WeGame/Lobby.cs b/Social/WeGame/Lobby.cs new file mode 100644 index 0000000..cdcc779 --- /dev/null +++ b/Social/WeGame/Lobby.cs @@ -0,0 +1,102 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.Lobby +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using rail; +using System; + +namespace Terraria.Social.WeGame +{ + public class Lobby + { + private RailCallBackHelper _callbackHelper = new RailCallBackHelper(); + public LobbyState State; + private bool _gameServerInitSuccess; + private IRailGameServer _gameServer; + public Action _lobbyCreatedExternalCallback; + private RailID _server_id; + + private IRailGameServer RailServerHelper + { + get => this._gameServerInitSuccess ? this._gameServer : (IRailGameServer) null; + set => this._gameServer = value; + } + + private IRailGameServerHelper GetRailServerHelper() => rail_api.RailFactory().RailGameServerHelper(); + + private void RegisterGameServerEvent() + { + if (this._callbackHelper == null) + return; + // ISSUE: method pointer + this._callbackHelper.RegisterCallback((RAILEventID) 3002, new RailEventCallBackHandler((object) this, __methodptr(OnRailEvent))); + } + + public void OnRailEvent(RAILEventID id, EventBase data) + { + WeGameHelper.WriteDebugString("OnRailEvent,id=" + id.ToString() + " ,result=" + data.result.ToString()); + if (id != 3002) + return; + this.OnGameServerCreated((CreateGameServerResult) data); + } + + private void OnGameServerCreated(CreateGameServerResult result) + { + if (((EventBase) result).result != null) + return; + this._gameServerInitSuccess = true; + this._lobbyCreatedExternalCallback((RailID) result.game_server_id); + this._server_id = (RailID) result.game_server_id; + } + + public void Create(bool inviteOnly) + { + if (this.State == LobbyState.Inactive) + this.RegisterGameServerEvent(); + this.RailServerHelper = rail_api.RailFactory().RailGameServerHelper().AsyncCreateGameServer(new CreateGameServerOptions() + { + has_password = (__Null) 0, + enable_team_voice = (__Null) 0 + }, "terraria", "terraria"); + this.State = LobbyState.Creating; + } + + public void OpenInviteOverlay() + { + WeGameHelper.WriteDebugString("OpenInviteOverlay by wegame"); + rail_api.RailFactory().RailFloatingWindow().AsyncShowRailFloatingWindow((EnumRailWindowType) 10, ""); + } + + public void Join(RailID local_peer, RailID remote_peer) + { + if (this.State != LobbyState.Inactive) + WeGameHelper.WriteDebugString("Lobby connection attempted while already in a lobby. This should never happen?"); + else + this.State = LobbyState.Connecting; + } + + public byte[] GetMessage(int index) => (byte[]) null; + + public int GetUserCount() => 0; + + public RailID GetUserByIndex(int index) => (RailID) null; + + public bool SendMessage(byte[] data) => this.SendMessage(data, data.Length); + + public bool SendMessage(byte[] data, int length) => false; + + public void Set(RailID lobbyId) + { + } + + public void SetPlayedWith(RailID userId) + { + } + + public void Leave() => this.State = LobbyState.Inactive; + + public IRailGameServer GetServer() => this.RailServerHelper; + } +} diff --git a/Social/WeGame/LobbyState.cs b/Social/WeGame/LobbyState.cs new file mode 100644 index 0000000..245569d --- /dev/null +++ b/Social/WeGame/LobbyState.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.LobbyState +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Social.WeGame +{ + public enum LobbyState + { + Inactive, + Connecting, + Creating, + Active, + } +} diff --git a/Social/WeGame/MessageDispatcherBase.cs b/Social/WeGame/MessageDispatcherBase.cs new file mode 100644 index 0000000..c522a42 --- /dev/null +++ b/Social/WeGame/MessageDispatcherBase.cs @@ -0,0 +1,12 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.MessageDispatcherBase +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Social.WeGame +{ + public abstract class MessageDispatcherBase + { + } +} diff --git a/Social/WeGame/MessageDispatcherClient.cs b/Social/WeGame/MessageDispatcherClient.cs new file mode 100644 index 0000000..4716b8c --- /dev/null +++ b/Social/WeGame/MessageDispatcherClient.cs @@ -0,0 +1,52 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.MessageDispatcherClient +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Terraria.Social.WeGame +{ + public class MessageDispatcherClient + { + private IPCClient _ipcClient = new IPCClient(); + private string _severName; + private string _clientName; + + public event Action OnMessage; + + public event Action OnConnected; + + public void Init(string clientName, string serverName) + { + this._clientName = clientName; + this._severName = serverName; + this._ipcClient.Init(clientName); + this._ipcClient.OnDataArrive += new Action(this.OnDataArrive); + this._ipcClient.OnConnected += new Action(this.OnServerConnected); + } + + public void Start() => this._ipcClient.ConnectTo(this._severName); + + private void OnDataArrive(byte[] data) + { + IPCMessage ipcMessage = new IPCMessage(); + ipcMessage.BuildFrom(data); + if (this.OnMessage == null) + return; + this.OnMessage(ipcMessage); + } + + private void OnServerConnected() + { + if (this.OnConnected == null) + return; + this.OnConnected(); + } + + public void Tick() => this._ipcClient.Tick(); + + public bool SendMessage(IPCMessage msg) => this._ipcClient.Send(msg.GetBytes()); + } +} diff --git a/Social/WeGame/MessageDispatcherServer.cs b/Social/WeGame/MessageDispatcherServer.cs new file mode 100644 index 0000000..6902308 --- /dev/null +++ b/Social/WeGame/MessageDispatcherServer.cs @@ -0,0 +1,48 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.MessageDispatcherServer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Terraria.Social.WeGame +{ + public class MessageDispatcherServer + { + private IPCServer _ipcSever = new IPCServer(); + + public event Action OnIPCClientAccess; + + public event Action OnMessage; + + public void Init(string serverName) + { + this._ipcSever.Init(serverName); + this._ipcSever.OnDataArrive += new Action(this.OnDataArrive); + this._ipcSever.OnClientAccess += new Action(this.OnClientAccess); + } + + public void OnClientAccess() + { + if (this.OnIPCClientAccess == null) + return; + this.OnIPCClientAccess(); + } + + public void Start() => this._ipcSever.StartListen(); + + private void OnDataArrive(byte[] data) + { + IPCMessage ipcMessage = new IPCMessage(); + ipcMessage.BuildFrom(data); + if (this.OnMessage == null) + return; + this.OnMessage(ipcMessage); + } + + public void Tick() => this._ipcSever.Tick(); + + public bool SendMessage(IPCMessage msg) => this._ipcSever.Send(msg.GetBytes()); + } +} diff --git a/Social/WeGame/NetClientSocialModule.cs b/Social/WeGame/NetClientSocialModule.cs new file mode 100644 index 0000000..8a3f412 --- /dev/null +++ b/Social/WeGame/NetClientSocialModule.cs @@ -0,0 +1,498 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.NetClientSocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using rail; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Text; +using Terraria.Localization; +using Terraria.Net; +using Terraria.Net.Sockets; + +namespace Terraria.Social.WeGame +{ + public class NetClientSocialModule : NetSocialModule + { + private RailCallBackHelper _callbackHelper = new RailCallBackHelper(); + private bool _hasLocalHost; + private IPCServer server = new IPCServer(); + private readonly string _serverIDMedataKey = "terraria.serverid"; + private RailID _inviter_id = new RailID(); + private List _player_info_list; + private MessageDispatcherServer _msgServer; + + private void OnIPCClientAccess() + { + WeGameHelper.WriteDebugString("IPC client access"); + this.SendFriendListToLocalServer(); + } + + private void LazyCreateWeGameMsgServer() + { + if (this._msgServer != null) + return; + this._msgServer = new MessageDispatcherServer(); + this._msgServer.Init("WeGame.Terraria.Message.Server"); + this._msgServer.OnMessage += new Action(this.OnWegameMessage); + this._msgServer.OnIPCClientAccess += new Action(this.OnIPCClientAccess); + CoreSocialModule.OnTick += new Action(this._msgServer.Tick); + this._msgServer.Start(); + } + + private void OnWegameMessage(IPCMessage message) + { + if (message.GetCmd() != IPCMessageType.IPCMessageTypeReportServerID) + return; + ReportServerID reportServerID; + message.Parse(out reportServerID); + this.OnReportServerID(reportServerID); + } + + private void OnReportServerID(ReportServerID reportServerID) + { + WeGameHelper.WriteDebugString("OnReportServerID - " + reportServerID._serverID); + this.AsyncSetMyMetaData(this._serverIDMedataKey, reportServerID._serverID); + this.AsyncSetInviteCommandLine(reportServerID._serverID); + } + + public override void Initialize() + { + base.Initialize(); + this.RegisterRailEvent(); + this.AsyncGetFriendsInfo(); + this._reader.SetReadEvent(new WeGameP2PReader.OnReadEvent(this.OnPacketRead)); + this._reader.SetLocalPeer(this.GetLocalPeer()); + this._writer.SetLocalPeer(this.GetLocalPeer()); + Main.OnEngineLoad += new Action(this.CheckParameters); + } + + private void AsyncSetInviteCommandLine(string cmdline) => rail_api.RailFactory().RailFriends().AsyncSetInviteCommandLine(cmdline, ""); + + private void AsyncSetMyMetaData(string key, string value) + { + List railKeyValueList = new List(); + railKeyValueList.Add(new RailKeyValue() + { + key = (__Null) key, + value = (__Null) value + }); + rail_api.RailFactory().RailFriends().AsyncSetMyMetadata(railKeyValueList, ""); + } + + private bool TryAuthUserByRecvData(RailID user, byte[] data, int length) + { + WeGameHelper.WriteDebugString("TryAuthUserByRecvData user:{0}", (object) (ulong) ((RailComparableID) user).id_); + if (length < 3) + { + WeGameHelper.WriteDebugString("Failed to validate authentication packet: Too short. (Length: " + (object) length + ")"); + return false; + } + int num = (int) data[1] << 8 | (int) data[0]; + if (num != length) + { + WeGameHelper.WriteDebugString("Failed to validate authentication packet: Packet size mismatch. (" + (object) num + "!=" + (object) length + ")"); + return false; + } + if (data[2] == (byte) 93) + return true; + WeGameHelper.WriteDebugString("Failed to validate authentication packet: Packet type is not correct. (Type: " + (object) data[2] + ")"); + return false; + } + + private bool OnPacketRead(byte[] data, int size, RailID user) + { + if (!this._connectionStateMap.ContainsKey(user)) + return false; + NetSocialModule.ConnectionState connectionState = this._connectionStateMap[user]; + if (connectionState != NetSocialModule.ConnectionState.Authenticating) + return connectionState == NetSocialModule.ConnectionState.Connected; + if (!this.TryAuthUserByRecvData(user, data, size)) + { + WeGameHelper.WriteDebugString(" Auth Server Ticket Failed"); + this.Close(user); + } + else + { + WeGameHelper.WriteDebugString("OnRailAuthSessionTicket Auth Success.."); + this.OnAuthSuccess(user); + } + return false; + } + + private void OnAuthSuccess(RailID remote_peer) + { + if (!this._connectionStateMap.ContainsKey(remote_peer)) + return; + this._connectionStateMap[remote_peer] = NetSocialModule.ConnectionState.Connected; + this.AsyncSetPlayWith(this._inviter_id); + this.AsyncSetMyMetaData("status", Language.GetTextValue("Social.StatusInGame")); + // ISSUE: explicit non-virtual call + this.AsyncSetMyMetaData(this._serverIDMedataKey, __nonvirtual (((RailComparableID) remote_peer).id_.ToString())); + Main.clrInput(); + Netplay.ServerPassword = ""; + Main.GetInputText(""); + Main.autoPass = false; + Main.netMode = 1; + Netplay.OnConnectedToSocialServer((ISocket) new SocialSocket((RemoteAddress) new WeGameAddress(remote_peer, this.GetFriendNickname(this._inviter_id)))); + // ISSUE: explicit non-virtual call + WeGameHelper.WriteDebugString("OnConnectToSocialServer server:" + __nonvirtual (((RailComparableID) remote_peer).id_.ToString())); + } + + private bool GetRailConnectIDFromCmdLine(RailID server_id) + { + foreach (string commandLineArg in Environment.GetCommandLineArgs()) + { + string str = "--rail_connect_cmd="; + int num = commandLineArg.IndexOf(str); + if (num != -1) + { + ulong result = 0; + if (ulong.TryParse(commandLineArg.Substring(num + str.Length), out result)) + { + ((RailComparableID) server_id).id_ = (__Null) (long) result; + return true; + } + } + } + return false; + } + + private void CheckParameters() + { + RailID server_id = new RailID(); + if (!this.GetRailConnectIDFromCmdLine(server_id)) + return; + if (((RailComparableID) server_id).IsValid()) + Main.OpenPlayerSelect((Main.OnPlayerSelected) (playerData => + { + Main.ServerSideCharacter = false; + playerData.SetAsActive(); + Main.menuMode = 882; + Main.statusText = Language.GetTextValue("Social.Joining"); + WeGameHelper.WriteDebugString(" CheckParameters, lobby.join"); + this.JoinServer(server_id); + })); + else + WeGameHelper.WriteDebugString("Invalid RailID passed to +connect_lobby"); + } + + public override void LaunchLocalServer(Process process, ServerMode mode) + { + if (this._lobby.State != LobbyState.Inactive) + this._lobby.Leave(); + this.LazyCreateWeGameMsgServer(); + ProcessStartInfo startInfo1 = process.StartInfo; + startInfo1.Arguments = startInfo1.Arguments + " -wegame -localwegameid " + (object) (ulong) ((RailComparableID) this.GetLocalPeer()).id_; + if (mode.HasFlag((Enum) ServerMode.Lobby)) + { + this._hasLocalHost = true; + if (mode.HasFlag((Enum) ServerMode.FriendsCanJoin)) + process.StartInfo.Arguments += " -lobby friends"; + else + process.StartInfo.Arguments += " -lobby private"; + if (mode.HasFlag((Enum) ServerMode.FriendsOfFriends)) + process.StartInfo.Arguments += " -friendsoffriends"; + } + string str; + rail_api.RailFactory().RailUtils().GetLaunchAppParameters((EnumRailLaunchAppType) 2, ref str); + ProcessStartInfo startInfo2 = process.StartInfo; + startInfo2.Arguments = startInfo2.Arguments + " " + str; + WeGameHelper.WriteDebugString("LaunchLocalServer,cmd_line:" + process.StartInfo.Arguments); + this.AsyncSetMyMetaData("status", Language.GetTextValue("Social.StatusInGame")); + Netplay.OnDisconnect += new Action(this.OnDisconnect); + process.Start(); + } + + public override void Shutdown() + { + this.AsyncSetInviteCommandLine(""); + this.CleanMyMetaData(); + this.UnRegisterRailEvent(); + base.Shutdown(); + } + + public override ulong GetLobbyId() => 0; + + public override bool StartListening(SocketConnectionAccepted callback) => false; + + public override void StopListening() + { + } + + public override void Close(RemoteAddress address) + { + this.CleanMyMetaData(); + this.Close(this.RemoteAddressToRailId(address)); + } + + public override bool CanInvite() => (this._hasLocalHost || this._lobby.State == LobbyState.Active || Main.LobbyId != 0UL) && (uint) Main.netMode > 0U; + + public override void OpenInviteInterface() => this._lobby.OpenInviteOverlay(); + + private void Close(RailID remote_peer) + { + if (!this._connectionStateMap.ContainsKey(remote_peer)) + return; + WeGameHelper.WriteDebugString("CloseRemotePeer, remote:{0}", (object) (ulong) ((RailComparableID) remote_peer).id_); + rail_api.RailFactory().RailNetworkHelper().CloseSession(this.GetLocalPeer(), remote_peer); + this._connectionStateMap[remote_peer] = NetSocialModule.ConnectionState.Inactive; + this._lobby.Leave(); + this._reader.ClearUser(remote_peer); + this._writer.ClearUser(remote_peer); + } + + public override void Connect(RemoteAddress address) + { + } + + public override void CancelJoin() + { + if (this._lobby.State == LobbyState.Inactive) + return; + this._lobby.Leave(); + } + + private void RegisterRailEvent() + { + RAILEventID[] railEventIdArray = new RAILEventID[7] + { + (RAILEventID) 16001, + (RAILEventID) 16002, + (RAILEventID) 13503, + (RAILEventID) 13501, + (RAILEventID) 12003, + (RAILEventID) 12002, + (RAILEventID) 12010 + }; + foreach (int num in railEventIdArray) + { + // ISSUE: method pointer + this._callbackHelper.RegisterCallback((RAILEventID) num, new RailEventCallBackHandler((object) this, __methodptr(OnRailEvent))); + } + } + + private void UnRegisterRailEvent() => this._callbackHelper.UnregisterAllCallback(); + + public void OnRailEvent(RAILEventID id, EventBase data) + { + WeGameHelper.WriteDebugString("OnRailEvent,id=" + id.ToString() + " ,result=" + data.result.ToString()); + if (id <= 12010) + { + if (id != 12002) + { + if (id != 12003) + { + if (id != 12010) + return; + this.OnFriendlistChange((RailFriendsListChanged) data); + } + else + this.OnGetFriendMetaData((RailFriendsGetMetadataResult) data); + } + else + this.OnRailSetMetaData((RailFriendsSetMetadataResult) data); + } + else if (id <= 13503) + { + if (id != 13501) + { + if (id != 13503) + return; + this.OnRailRespondInvation((RailUsersRespondInvitation) data); + } + else + this.OnRailGetUsersInfo((RailUsersInfoData) data); + } + else if (id != 16001) + { + if (id != 16002) + return; + this.OnRailCreateSessionFailed((CreateSessionFailed) data); + } + else + this.OnRailCreateSessionRequest((CreateSessionRequest) data); + } + + private string DumpMataDataString(List list) + { + StringBuilder stringBuilder = new StringBuilder(); + foreach (RailKeyValueResult railKeyValueResult in list) + stringBuilder.Append("key: " + (string) railKeyValueResult.key + " value: " + (string) railKeyValueResult.value); + return stringBuilder.ToString(); + } + + private string GetValueByKey(string key, List list) + { + string str = (string) null; + foreach (RailKeyValueResult railKeyValueResult in list) + { + if ((string) railKeyValueResult.key == key) + { + str = (string) railKeyValueResult.value; + break; + } + } + return str; + } + + private bool SendFriendListToLocalServer() + { + bool flag = false; + if (this._hasLocalHost) + { + List list = new List(); + if (this.GetRailFriendList(list)) + { + WeGameFriendListInfo t = new WeGameFriendListInfo() + { + _friendList = list + }; + IPCMessage msg = new IPCMessage(); + msg.Build(IPCMessageType.IPCMessageTypeNotifyFriendList, t); + flag = this._msgServer.SendMessage(msg); + WeGameHelper.WriteDebugString("NotifyFriendListToServer: " + flag.ToString()); + } + } + return flag; + } + + private bool GetRailFriendList(List list) + { + bool flag = false; + IRailFriends irailFriends = rail_api.RailFactory().RailFriends(); + if (irailFriends != null) + flag = irailFriends.GetFriendsList(list) == 0; + return flag; + } + + private void OnGetFriendMetaData(RailFriendsGetMetadataResult data) + { + if (((EventBase) data).result != null || ((List) data.friend_kvs).Count <= 0) + return; + WeGameHelper.WriteDebugString("OnGetFriendMetaData - " + this.DumpMataDataString((List) data.friend_kvs)); + string valueByKey = this.GetValueByKey(this._serverIDMedataKey, (List) data.friend_kvs); + if (valueByKey == null) + return; + if (valueByKey.Length > 0) + { + RailID server_id = new RailID(); + ((RailComparableID) server_id).id_ = (__Null) (long) ulong.Parse(valueByKey); + if (((RailComparableID) server_id).IsValid()) + this.JoinServer(server_id); + else + WeGameHelper.WriteDebugString("JoinServer failed, invalid server id"); + } + else + WeGameHelper.WriteDebugString("can not find server id key"); + } + + private void JoinServer(RailID server_id) + { + WeGameHelper.WriteDebugString("JoinServer:{0}", (object) (ulong) ((RailComparableID) server_id).id_); + this._connectionStateMap[server_id] = NetSocialModule.ConnectionState.Authenticating; + int length = 3; + byte[] numArray = new byte[length]; + numArray[0] = (byte) (length & (int) byte.MaxValue); + numArray[1] = (byte) (length >> 8 & (int) byte.MaxValue); + numArray[2] = (byte) 93; + rail_api.RailFactory().RailNetworkHelper().SendReliableData(this.GetLocalPeer(), server_id, numArray, (uint) length); + } + + private string GetFriendNickname(RailID rail_id) + { + if (this._player_info_list != null) + { + foreach (PlayerPersonalInfo playerInfo in this._player_info_list) + { + if (RailComparableID.op_Equality((RailComparableID) playerInfo.rail_id, (RailComparableID) rail_id)) + return (string) playerInfo.rail_name; + } + } + return ""; + } + + private void OnRailGetUsersInfo(RailUsersInfoData data) => this._player_info_list = (List) data.user_info_list; + + private void OnFriendlistChange(RailFriendsListChanged data) + { + if (!this._hasLocalHost) + return; + this.SendFriendListToLocalServer(); + } + + private void AsyncGetFriendsInfo() + { + IRailFriends irailFriends = rail_api.RailFactory().RailFriends(); + if (irailFriends == null) + return; + List railFriendInfoList = new List(); + irailFriends.GetFriendsList(railFriendInfoList); + List railIdList = new List(); + foreach (RailFriendInfo railFriendInfo in railFriendInfoList) + railIdList.Add((RailID) railFriendInfo.friend_rail_id); + irailFriends.AsyncGetPersonalInfo(railIdList, ""); + } + + private void AsyncSetPlayWith(RailID rail_id) + { + List railUserPlayedWithList = new List(); + railUserPlayedWithList.Add(new RailUserPlayedWith() + { + rail_id = (__Null) rail_id + }); + rail_api.RailFactory().RailFriends()?.AsyncReportPlayedWithUserList(railUserPlayedWithList, ""); + } + + private void OnRailSetMetaData(RailFriendsSetMetadataResult data) => WeGameHelper.WriteDebugString("OnRailSetMetaData - " + ((EventBase) data).result.ToString()); + + private void OnRailRespondInvation(RailUsersRespondInvitation data) + { + WeGameHelper.WriteDebugString(" request join game"); + if (this._lobby.State != LobbyState.Inactive) + this._lobby.Leave(); + this._inviter_id = (RailID) data.inviter_id; + Main.OpenPlayerSelect((Main.OnPlayerSelected) (playerData => + { + Main.ServerSideCharacter = false; + playerData.SetAsActive(); + Main.menuMode = 882; + Main.statusText = Language.GetTextValue("Social.JoiningFriend", (object) this.GetFriendNickname((RailID) data.inviter_id)); + this.AsyncGetServerIDByOwener((RailID) data.inviter_id); + WeGameHelper.WriteDebugString("inviter_id: " + (object) (ulong) ((RailComparableID) data.inviter_id).id_); + })); + } + + private void AsyncGetServerIDByOwener(RailID ownerID) => rail_api.RailFactory().RailFriends()?.AsyncGetFriendMetadata(ownerID, new List() + { + this._serverIDMedataKey + }, ""); + + private void OnRailCreateSessionRequest(CreateSessionRequest result) + { + WeGameHelper.WriteDebugString(nameof (OnRailCreateSessionRequest)); + if (!this._connectionStateMap.ContainsKey((RailID) result.remote_peer) || this._connectionStateMap[(RailID) result.remote_peer] == NetSocialModule.ConnectionState.Inactive) + return; + WeGameHelper.WriteDebugString("AcceptSessionRequest, local{0}, remote:{1}", (object) (ulong) ((RailComparableID) result.local_peer).id_, (object) (ulong) ((RailComparableID) result.remote_peer).id_); + rail_api.RailFactory().RailNetworkHelper().AcceptSessionRequest((RailID) result.local_peer, (RailID) result.remote_peer); + } + + private void OnRailCreateSessionFailed(CreateSessionFailed result) + { + WeGameHelper.WriteDebugString("OnRailCreateSessionFailed, CloseRemote: local:{0}, remote:{1}", (object) (ulong) ((RailComparableID) result.local_peer).id_, (object) (ulong) ((RailComparableID) result.remote_peer).id_); + this.Close((RailID) result.remote_peer); + } + + private void CleanMyMetaData() => rail_api.RailFactory().RailFriends()?.AsyncClearAllMyMetadata(""); + + private void OnDisconnect() + { + this.CleanMyMetaData(); + this._hasLocalHost = false; + Netplay.OnDisconnect -= new Action(this.OnDisconnect); + } + } +} diff --git a/Social/WeGame/NetServerSocialModule.cs b/Social/WeGame/NetServerSocialModule.cs new file mode 100644 index 0000000..08eb8fe --- /dev/null +++ b/Social/WeGame/NetServerSocialModule.cs @@ -0,0 +1,358 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.NetServerSocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using rail; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Text; +using Terraria.Localization; +using Terraria.Net; +using Terraria.Net.Sockets; + +namespace Terraria.Social.WeGame +{ + public class NetServerSocialModule : NetSocialModule + { + private SocketConnectionAccepted _connectionAcceptedCallback; + private bool _acceptingClients; + private ServerMode _mode; + private RailCallBackHelper _callbackHelper = new RailCallBackHelper(); + private MessageDispatcherClient _client = new MessageDispatcherClient(); + private bool _serverConnected; + private RailID _serverID = new RailID(); + private Action _ipcConnetedAction; + private List _wegameFriendList; + + public NetServerSocialModule() => this._lobby._lobbyCreatedExternalCallback = new Action(this.OnLobbyCreated); + + private void BroadcastConnectedUsers() + { + } + + private bool AcceptAnUserSession(RailID local_peer, RailID remote_peer) + { + bool flag = false; + // ISSUE: explicit non-virtual call + // ISSUE: explicit non-virtual call + WeGameHelper.WriteDebugString("AcceptAnUserSession server:" + __nonvirtual (((RailComparableID) local_peer).id_.ToString()) + " remote:" + __nonvirtual (((RailComparableID) remote_peer).id_.ToString())); + IRailNetwork irailNetwork = rail_api.RailFactory().RailNetworkHelper(); + if (irailNetwork != null) + flag = irailNetwork.AcceptSessionRequest(local_peer, remote_peer) == 0; + return flag; + } + + private void TerminateRemotePlayerSession(RailID remote_id) => rail_api.RailFactory().RailPlayer()?.TerminateSessionOfPlayer(remote_id); + + private bool CloseNetWorkSession(RailID remote_peer) + { + bool flag = false; + IRailNetwork irailNetwork = rail_api.RailFactory().RailNetworkHelper(); + if (irailNetwork != null) + flag = irailNetwork.CloseSession(this._serverID, remote_peer) == 0; + return flag; + } + + private RailID GetServerID() + { + RailID railId = (RailID) null; + IRailGameServer server = this._lobby.GetServer(); + if (server != null) + railId = server.GetGameServerRailID(); + return railId ?? new RailID(); + } + + private void CloseAndUpdateUserState(RailID remote_peer) + { + if (!this._connectionStateMap.ContainsKey(remote_peer)) + return; + WeGameHelper.WriteDebugString("CloseAndUpdateUserState, remote:{0}", (object) (ulong) ((RailComparableID) remote_peer).id_); + this.TerminateRemotePlayerSession(remote_peer); + this.CloseNetWorkSession(remote_peer); + this._connectionStateMap[remote_peer] = NetSocialModule.ConnectionState.Inactive; + this._reader.ClearUser(remote_peer); + this._writer.ClearUser(remote_peer); + } + + public void OnConnected() + { + this._serverConnected = true; + if (this._ipcConnetedAction != null) + this._ipcConnetedAction(); + this._ipcConnetedAction = (Action) null; + WeGameHelper.WriteDebugString("IPC connected"); + } + + private void OnCreateSessionRequest(CreateSessionRequest data) + { + if (!this._acceptingClients) + WeGameHelper.WriteDebugString(" - Ignoring connection from " + (object) (ulong) ((RailComparableID) data.remote_peer).id_ + " while _acceptionClients is false."); + else if (!this._mode.HasFlag((Enum) ServerMode.FriendsOfFriends) && !this.IsWeGameFriend((RailID) data.remote_peer)) + { + WeGameHelper.WriteDebugString("Ignoring connection from " + (object) (ulong) ((RailComparableID) data.remote_peer).id_ + ". Friends of friends is disabled."); + } + else + { + WeGameHelper.WriteDebugString("pass wegame friend check"); + this.AcceptAnUserSession((RailID) data.local_peer, (RailID) data.remote_peer); + this._connectionStateMap[(RailID) data.remote_peer] = NetSocialModule.ConnectionState.Authenticating; + if (this._connectionAcceptedCallback == null) + return; + this._connectionAcceptedCallback((ISocket) new SocialSocket((RemoteAddress) new WeGameAddress((RailID) data.remote_peer, ""))); + } + } + + private void OnCreateSessionFailed(CreateSessionFailed data) + { + WeGameHelper.WriteDebugString("CreateSessionFailed, local:{0}, remote:{1}", (object) (ulong) ((RailComparableID) data.local_peer).id_, (object) (ulong) ((RailComparableID) data.remote_peer).id_); + this.CloseAndUpdateUserState((RailID) data.remote_peer); + } + + private bool GetRailFriendList(List list) + { + bool flag = false; + IRailFriends irailFriends = rail_api.RailFactory().RailFriends(); + if (irailFriends != null) + flag = irailFriends.GetFriendsList(list) == 0; + return flag; + } + + private void OnWegameMessage(IPCMessage message) + { + if (message.GetCmd() != IPCMessageType.IPCMessageTypeNotifyFriendList) + return; + WeGameFriendListInfo friendListInfo; + message.Parse(out friendListInfo); + this.UpdateFriendList(friendListInfo); + } + + private void UpdateFriendList(WeGameFriendListInfo friendListInfo) + { + this._wegameFriendList = friendListInfo._friendList; + WeGameHelper.WriteDebugString("On update friend list - " + this.DumpFriendListString(friendListInfo._friendList)); + } + + private bool IsWeGameFriend(RailID id) + { + bool flag = false; + if (this._wegameFriendList != null) + { + foreach (RailFriendInfo wegameFriend in this._wegameFriendList) + { + if (RailComparableID.op_Equality((RailComparableID) wegameFriend.friend_rail_id, (RailComparableID) id)) + { + flag = true; + break; + } + } + } + return flag; + } + + private string DumpFriendListString(List list) + { + StringBuilder stringBuilder = new StringBuilder(); + foreach (RailFriendInfo railFriendInfo in list) + stringBuilder.AppendLine(string.Format("friend_id: {0}, type: {1}, online: {2}, playing: {3}", (object) (ulong) ((RailComparableID) railFriendInfo.friend_rail_id).id_, (object) (EnumRailFriendType) railFriendInfo.friend_type, (object) ((RailFriendOnLineState) railFriendInfo.online_state).friend_online_state.ToString(), (object) (uint) ((RailFriendOnLineState) railFriendInfo.online_state).game_define_game_playing_state)); + return stringBuilder.ToString(); + } + + private bool IsActiveUser(RailID user) => this._connectionStateMap.ContainsKey(user) && (uint) this._connectionStateMap[user] > 0U; + + private void UpdateUserStateBySessionAuthResult(GameServerStartSessionWithPlayerResponse data) + { + RailID remoteRailId = (RailID) data.remote_rail_id; + RailResult result = (RailResult) ((EventBase) data).result; + if (!this._connectionStateMap.ContainsKey(remoteRailId)) + return; + if (result == null) + { + WeGameHelper.WriteDebugString("UpdateUserStateBySessionAuthResult Auth Success"); + this.BroadcastConnectedUsers(); + } + else + { + WeGameHelper.WriteDebugString("UpdateUserStateBySessionAuthResult Auth Failed"); + this.CloseAndUpdateUserState(remoteRailId); + } + } + + private bool TryAuthUserByRecvData(RailID user, byte[] data, int length) + { + WeGameHelper.WriteDebugString("TryAuthUserByRecvData user:{0}", (object) (ulong) ((RailComparableID) user).id_); + if (length < 3) + { + WeGameHelper.WriteDebugString("Failed to validate authentication packet: Too short. (Length: " + (object) length + ")"); + return false; + } + int num = (int) data[1] << 8 | (int) data[0]; + if (num != length) + { + WeGameHelper.WriteDebugString("Failed to validate authentication packet: Packet size mismatch. (" + (object) num + "!=" + (object) length + ")"); + return false; + } + if (data[2] == (byte) 93) + return true; + WeGameHelper.WriteDebugString("Failed to validate authentication packet: Packet type is not correct. (Type: " + (object) data[2] + ")"); + return false; + } + + private bool OnPacketRead(byte[] data, int size, RailID user) + { + if (!this.IsActiveUser(user)) + { + WeGameHelper.WriteDebugString("OnPacketRead IsActiveUser false"); + return false; + } + NetSocialModule.ConnectionState connectionState = this._connectionStateMap[user]; + if (connectionState != NetSocialModule.ConnectionState.Authenticating) + return connectionState == NetSocialModule.ConnectionState.Connected; + if (!this.TryAuthUserByRecvData(user, data, size)) + this.CloseAndUpdateUserState(user); + else + this.OnAuthSuccess(user); + return false; + } + + private void OnAuthSuccess(RailID remote_peer) + { + if (!this._connectionStateMap.ContainsKey(remote_peer)) + return; + this._connectionStateMap[remote_peer] = NetSocialModule.ConnectionState.Connected; + int length = 3; + byte[] numArray = new byte[length]; + numArray[0] = (byte) (length & (int) byte.MaxValue); + numArray[1] = (byte) (length >> 8 & (int) byte.MaxValue); + numArray[2] = (byte) 93; + rail_api.RailFactory().RailNetworkHelper().SendReliableData(this._serverID, remote_peer, numArray, (uint) length); + } + + public void OnRailEvent(RAILEventID event_id, EventBase data) + { + WeGameHelper.WriteDebugString("OnRailEvent,id=" + event_id.ToString() + " ,result=" + data.result.ToString()); + if (event_id != 3006) + { + if (event_id != 16001) + { + if (event_id != 16002) + return; + this.OnCreateSessionFailed((CreateSessionFailed) data); + } + else + this.OnCreateSessionRequest((CreateSessionRequest) data); + } + else + this.UpdateUserStateBySessionAuthResult((GameServerStartSessionWithPlayerResponse) data); + } + + private void OnLobbyCreated(RailID lobbyID) + { + WeGameHelper.WriteDebugString("SetLocalPeer: {0}", (object) (ulong) ((RailComparableID) lobbyID).id_); + this._reader.SetLocalPeer(lobbyID); + this._writer.SetLocalPeer(lobbyID); + this._serverID = lobbyID; + Action action = (Action) (() => + { + // ISSUE: explicit non-virtual call + ReportServerID t = new ReportServerID() + { + _serverID = __nonvirtual (((RailComparableID) lobbyID).id_.ToString()) + }; + IPCMessage msg = new IPCMessage(); + msg.Build(IPCMessageType.IPCMessageTypeReportServerID, t); + WeGameHelper.WriteDebugString("Send serverID to game client - " + this._client.SendMessage(msg).ToString()); + }); + if (this._serverConnected) + { + action(); + } + else + { + this._ipcConnetedAction += action; + WeGameHelper.WriteDebugString("report server id fail, no connection"); + } + } + + private void RegisterRailEvent() + { + RAILEventID[] railEventIdArray = new RAILEventID[4] + { + (RAILEventID) 16001, + (RAILEventID) 16002, + (RAILEventID) 3006, + (RAILEventID) 3005 + }; + foreach (int num in railEventIdArray) + { + // ISSUE: method pointer + this._callbackHelper.RegisterCallback((RAILEventID) num, new RailEventCallBackHandler((object) this, __methodptr(OnRailEvent))); + } + } + + public override void Initialize() + { + base.Initialize(); + this._mode |= ServerMode.Lobby; + this.RegisterRailEvent(); + this._reader.SetReadEvent(new WeGameP2PReader.OnReadEvent(this.OnPacketRead)); + if (Program.LaunchParameters.ContainsKey("-lobby")) + { + this._mode |= ServerMode.Lobby; + string launchParameter = Program.LaunchParameters["-lobby"]; + if (!(launchParameter == "private")) + { + if (launchParameter == "friends") + { + this._mode |= ServerMode.FriendsCanJoin; + this._lobby.Create(false); + } + else + Console.WriteLine(Language.GetTextValue("Error.InvalidLobbyFlag", (object) "private", (object) "friends")); + } + else + this._lobby.Create(true); + } + if (Program.LaunchParameters.ContainsKey("-friendsoffriends")) + this._mode |= ServerMode.FriendsOfFriends; + this._client.Init("WeGame.Terraria.Message.Client", "WeGame.Terraria.Message.Server"); + this._client.OnConnected += new Action(this.OnConnected); + this._client.OnMessage += new Action(this.OnWegameMessage); + CoreSocialModule.OnTick += new Action(this._client.Tick); + this._client.Start(); + } + + public override ulong GetLobbyId() => (ulong) ((RailComparableID) this._serverID).id_; + + public override void OpenInviteInterface() + { + } + + public override void CancelJoin() + { + } + + public override bool CanInvite() => false; + + public override void LaunchLocalServer(Process process, ServerMode mode) + { + } + + public override bool StartListening(SocketConnectionAccepted callback) + { + this._acceptingClients = true; + this._connectionAcceptedCallback = callback; + return false; + } + + public override void StopListening() => this._acceptingClients = false; + + public override void Connect(RemoteAddress address) + { + } + + public override void Close(RemoteAddress address) => this.CloseAndUpdateUserState(this.RemoteAddressToRailId(address)); + } +} diff --git a/Social/WeGame/NetSocialModule.cs b/Social/WeGame/NetSocialModule.cs new file mode 100644 index 0000000..b23c10e --- /dev/null +++ b/Social/WeGame/NetSocialModule.cs @@ -0,0 +1,86 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.NetSocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using rail; +using System; +using System.Collections.Concurrent; +using Terraria.Net; + +namespace Terraria.Social.WeGame +{ + public abstract class NetSocialModule : Terraria.Social.Base.NetSocialModule + { + protected const int LobbyMessageJoin = 1; + protected Lobby _lobby = new Lobby(); + protected WeGameP2PReader _reader; + protected WeGameP2PWriter _writer; + protected ConcurrentDictionary _connectionStateMap = new ConcurrentDictionary(); + protected static readonly byte[] _handshake = new byte[10] + { + (byte) 10, + (byte) 0, + (byte) 93, + (byte) 114, + (byte) 101, + (byte) 108, + (byte) 111, + (byte) 103, + (byte) 105, + (byte) 99 + }; + + protected NetSocialModule() + { + this._reader = new WeGameP2PReader(); + this._writer = new WeGameP2PWriter(); + } + + public override void Initialize() + { + CoreSocialModule.OnTick += new Action(this._reader.ReadTick); + CoreSocialModule.OnTick += new Action(this._writer.SendAll); + } + + public override void Shutdown() => this._lobby.Leave(); + + public override bool IsConnected(RemoteAddress address) + { + if (address == null) + return false; + RailID railId = this.RemoteAddressToRailId(address); + return this._connectionStateMap.ContainsKey(railId) && this._connectionStateMap[railId] == NetSocialModule.ConnectionState.Connected; + } + + protected RailID GetLocalPeer() => rail_api.RailFactory().RailPlayer().GetRailID(); + + protected bool GetSessionState(RailID userId, RailNetworkSessionState state) + { + if (rail_api.RailFactory().RailNetworkHelper().GetSessionState(userId, state) == null) + return true; + WeGameHelper.WriteDebugString("GetSessionState Failed user:{0}", (object) (ulong) ((RailComparableID) userId).id_); + return false; + } + + protected RailID RemoteAddressToRailId(RemoteAddress address) => ((WeGameAddress) address).rail_id; + + public override bool Send(RemoteAddress address, byte[] data, int length) + { + this._writer.QueueSend(this.RemoteAddressToRailId(address), data, length); + return true; + } + + public override int Receive(RemoteAddress address, byte[] data, int offset, int length) => address == null ? 0 : this._reader.Receive(this.RemoteAddressToRailId(address), data, offset, length); + + public override bool IsDataAvailable(RemoteAddress address) => this._reader.IsDataAvailable(this.RemoteAddressToRailId(address)); + + public enum ConnectionState + { + Inactive, + Authenticating, + Connected, + } + } +} diff --git a/Social/WeGame/OverlaySocialModule.cs b/Social/WeGame/OverlaySocialModule.cs new file mode 100644 index 0000000..a1e1265 --- /dev/null +++ b/Social/WeGame/OverlaySocialModule.cs @@ -0,0 +1,35 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.OverlaySocialModule +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Social.WeGame +{ + public class OverlaySocialModule : Terraria.Social.Base.OverlaySocialModule + { + private bool _gamepadTextInputActive; + + public override void Initialize() + { + } + + public override void Shutdown() + { + } + + public override bool IsGamepadTextInputActive() => this._gamepadTextInputActive; + + public override bool ShowGamepadTextInput( + string description, + uint maxLength, + bool multiLine = false, + string existingText = "", + bool password = false) + { + return false; + } + + public override string GetGamepadText() => ""; + } +} diff --git a/Social/WeGame/ReportServerID.cs b/Social/WeGame/ReportServerID.cs new file mode 100644 index 0000000..58fc40b --- /dev/null +++ b/Social/WeGame/ReportServerID.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.ReportServerID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Runtime.Serialization; + +namespace Terraria.Social.WeGame +{ + [DataContract] + public class ReportServerID + { + [DataMember] + public string _serverID; + } +} diff --git a/Social/WeGame/WeGameFriendListInfo.cs b/Social/WeGame/WeGameFriendListInfo.cs new file mode 100644 index 0000000..003978c --- /dev/null +++ b/Social/WeGame/WeGameFriendListInfo.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.WeGameFriendListInfo +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using rail; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Terraria.Social.WeGame +{ + [DataContract] + public class WeGameFriendListInfo + { + [DataMember] + public List _friendList; + } +} diff --git a/Social/WeGame/WeGameHelper.cs b/Social/WeGame/WeGameHelper.cs new file mode 100644 index 0000000..1784cec --- /dev/null +++ b/Social/WeGame/WeGameHelper.cs @@ -0,0 +1,44 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.WeGameHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.IO; +using System.Runtime.InteropServices; +using System.Runtime.Serialization.Json; +using System.Text; + +namespace Terraria.Social.WeGame +{ + public class WeGameHelper + { + [DllImport("kernel32.dll", CharSet = CharSet.Auto)] + private static extern void OutputDebugString(string message); + + public static void WriteDebugString(string format, params object[] args) + { + string str = "[WeGame] - " + format; + } + + public static string Serialize(T data) + { + using (MemoryStream memoryStream = new MemoryStream()) + { + new DataContractJsonSerializer(typeof (T)).WriteObject((Stream) memoryStream, (object) data); + memoryStream.Position = 0L; + using (StreamReader streamReader = new StreamReader((Stream) memoryStream, Encoding.UTF8)) + return streamReader.ReadToEnd(); + } + } + + public static void UnSerialize(string str, out T data) + { + using (MemoryStream memoryStream = new MemoryStream(Encoding.Unicode.GetBytes(str))) + { + DataContractJsonSerializer contractJsonSerializer = new DataContractJsonSerializer(typeof (T)); + data = (T) contractJsonSerializer.ReadObject((Stream) memoryStream); + } + } + } +} diff --git a/Social/WeGame/WeGameP2PReader.cs b/Social/WeGame/WeGameP2PReader.cs new file mode 100644 index 0000000..e8a562d --- /dev/null +++ b/Social/WeGame/WeGameP2PReader.cs @@ -0,0 +1,138 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.WeGameP2PReader +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using rail; +using System; +using System.Collections.Generic; + +namespace Terraria.Social.WeGame +{ + public class WeGameP2PReader + { + public object RailLock = new object(); + private const int BUFFER_SIZE = 4096; + private Dictionary> _pendingReadBuffers = new Dictionary>(); + private Queue _deletionQueue = new Queue(); + private Queue _bufferPool = new Queue(); + private WeGameP2PReader.OnReadEvent _readEvent; + private RailID _local_id; + + public void ClearUser(RailID id) + { + lock (this._pendingReadBuffers) + this._deletionQueue.Enqueue(id); + } + + public bool IsDataAvailable(RailID id) + { + lock (this._pendingReadBuffers) + { + if (!this._pendingReadBuffers.ContainsKey(id)) + return false; + Queue pendingReadBuffer = this._pendingReadBuffers[id]; + return pendingReadBuffer.Count != 0 && pendingReadBuffer.Peek().Size != 0U; + } + } + + public void SetReadEvent(WeGameP2PReader.OnReadEvent method) => this._readEvent = method; + + private bool IsPacketAvailable(out uint size) + { + lock (this.RailLock) + { + IRailNetwork irailNetwork = rail_api.RailFactory().RailNetworkHelper(); + RailID railId1 = new RailID(); + ((RailComparableID) railId1).id_ = ((RailComparableID) this.GetLocalPeer()).id_; + RailID railId2 = railId1; + ref uint local = ref size; + return irailNetwork.IsDataReady(railId2, ref local); + } + } + + private RailID GetLocalPeer() => this._local_id; + + public void SetLocalPeer(RailID rail_id) + { + if (RailComparableID.op_Equality((RailComparableID) this._local_id, (RailComparableID) null)) + this._local_id = new RailID(); + ((RailComparableID) this._local_id).id_ = ((RailComparableID) rail_id).id_; + } + + private bool IsValid() => RailComparableID.op_Inequality((RailComparableID) this._local_id, (RailComparableID) null) && ((RailComparableID) this._local_id).IsValid(); + + public void ReadTick() + { + if (!this.IsValid()) + return; + lock (this._pendingReadBuffers) + { + while (this._deletionQueue.Count > 0) + this._pendingReadBuffers.Remove(this._deletionQueue.Dequeue()); + uint size; + while (this.IsPacketAvailable(out size)) + { + byte[] data = this._bufferPool.Count != 0 ? this._bufferPool.Dequeue() : new byte[(int) Math.Max(size, 4096U)]; + RailID railId = new RailID(); + bool flag; + lock (this.RailLock) + flag = rail_api.RailFactory().RailNetworkHelper().ReadData(this.GetLocalPeer(), railId, data, size) == 0; + if (flag) + { + if (this._readEvent == null || this._readEvent(data, (int) size, railId)) + { + if (!this._pendingReadBuffers.ContainsKey(railId)) + this._pendingReadBuffers[railId] = new Queue(); + this._pendingReadBuffers[railId].Enqueue(new WeGameP2PReader.ReadResult(data, size)); + } + else + this._bufferPool.Enqueue(data); + } + } + } + } + + public int Receive(RailID user, byte[] buffer, int bufferOffset, int bufferSize) + { + uint num1 = 0; + lock (this._pendingReadBuffers) + { + if (!this._pendingReadBuffers.ContainsKey(user)) + return 0; + Queue pendingReadBuffer = this._pendingReadBuffers[user]; + while (pendingReadBuffer.Count > 0) + { + WeGameP2PReader.ReadResult readResult = pendingReadBuffer.Peek(); + uint num2 = Math.Min((uint) bufferSize - num1, readResult.Size - readResult.Offset); + if (num2 == 0U) + return (int) num1; + Array.Copy((Array) readResult.Data, (long) readResult.Offset, (Array) buffer, (long) bufferOffset + (long) num1, (long) num2); + if ((int) num2 == (int) readResult.Size - (int) readResult.Offset) + this._bufferPool.Enqueue(pendingReadBuffer.Dequeue().Data); + else + readResult.Offset += num2; + num1 += num2; + } + } + return (int) num1; + } + + public class ReadResult + { + public byte[] Data; + public uint Size; + public uint Offset; + + public ReadResult(byte[] data, uint size) + { + this.Data = data; + this.Size = size; + this.Offset = 0U; + } + } + + public delegate bool OnReadEvent(byte[] data, int size, RailID user); + } +} diff --git a/Social/WeGame/WeGameP2PWriter.cs b/Social/WeGame/WeGameP2PWriter.cs new file mode 100644 index 0000000..0e35082 --- /dev/null +++ b/Social/WeGame/WeGameP2PWriter.cs @@ -0,0 +1,117 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Social.WeGame.WeGameP2PWriter +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using rail; +using System; +using System.Collections.Generic; + +namespace Terraria.Social.WeGame +{ + public class WeGameP2PWriter + { + private const int BUFFER_SIZE = 1024; + private RailID _local_id; + private Dictionary> _pendingSendData = new Dictionary>(); + private Dictionary> _pendingSendDataSwap = new Dictionary>(); + private Queue _bufferPool = new Queue(); + private object _lock = new object(); + + public void QueueSend(RailID user, byte[] data, int length) + { + lock (this._lock) + { + Queue writeInformationQueue; + if (this._pendingSendData.ContainsKey(user)) + writeInformationQueue = this._pendingSendData[user]; + else + this._pendingSendData[user] = writeInformationQueue = new Queue(); + int val1 = length; + int sourceIndex = 0; + while (val1 > 0) + { + WeGameP2PWriter.WriteInformation writeInformation; + if (writeInformationQueue.Count == 0 || 1024 - writeInformationQueue.Peek().Size == 0) + { + writeInformation = this._bufferPool.Count <= 0 ? new WeGameP2PWriter.WriteInformation() : new WeGameP2PWriter.WriteInformation(this._bufferPool.Dequeue()); + writeInformationQueue.Enqueue(writeInformation); + } + else + writeInformation = writeInformationQueue.Peek(); + int length1 = Math.Min(val1, 1024 - writeInformation.Size); + Array.Copy((Array) data, sourceIndex, (Array) writeInformation.Data, writeInformation.Size, length1); + writeInformation.Size += length1; + val1 -= length1; + sourceIndex += length1; + } + } + } + + public void ClearUser(RailID user) + { + lock (this._lock) + { + if (this._pendingSendData.ContainsKey(user)) + { + Queue writeInformationQueue = this._pendingSendData[user]; + while (writeInformationQueue.Count > 0) + this._bufferPool.Enqueue(writeInformationQueue.Dequeue().Data); + } + if (!this._pendingSendDataSwap.ContainsKey(user)) + return; + Queue writeInformationQueue1 = this._pendingSendDataSwap[user]; + while (writeInformationQueue1.Count > 0) + this._bufferPool.Enqueue(writeInformationQueue1.Dequeue().Data); + } + } + + public void SetLocalPeer(RailID rail_id) + { + if (RailComparableID.op_Equality((RailComparableID) this._local_id, (RailComparableID) null)) + this._local_id = new RailID(); + ((RailComparableID) this._local_id).id_ = ((RailComparableID) rail_id).id_; + } + + private RailID GetLocalPeer() => this._local_id; + + private bool IsValid() => RailComparableID.op_Inequality((RailComparableID) this._local_id, (RailComparableID) null) && ((RailComparableID) this._local_id).IsValid(); + + public void SendAll() + { + if (!this.IsValid()) + return; + lock (this._lock) + Utils.Swap>>(ref this._pendingSendData, ref this._pendingSendDataSwap); + foreach (KeyValuePair> keyValuePair in this._pendingSendDataSwap) + { + Queue writeInformationQueue = keyValuePair.Value; + while (writeInformationQueue.Count > 0) + { + WeGameP2PWriter.WriteInformation writeInformation = writeInformationQueue.Dequeue(); + int num = rail_api.RailFactory().RailNetworkHelper().SendData(this.GetLocalPeer(), keyValuePair.Key, writeInformation.Data, (uint) writeInformation.Size) == 0 ? 1 : 0; + this._bufferPool.Enqueue(writeInformation.Data); + } + } + } + + public class WriteInformation + { + public byte[] Data; + public int Size; + + public WriteInformation() + { + this.Data = new byte[1024]; + this.Size = 0; + } + + public WriteInformation(byte[] data) + { + this.Data = data; + this.Size = 0; + } + } + } +} diff --git a/Star.cs b/Star.cs new file mode 100644 index 0000000..fbac371 --- /dev/null +++ b/Star.cs @@ -0,0 +1,206 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Star +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using Terraria.Utilities; + +namespace Terraria +{ + public class Star + { + public Vector2 position; + public float scale; + public float rotation; + public int type; + public float twinkle; + public float twinkleSpeed; + public float rotationSpeed; + public bool falling; + public bool hidden; + public Vector2 fallSpeed; + public int fallTime; + public static bool dayCheck = false; + public static float starfallBoost = 1f; + public static int starFallCount = 0; + public float fadeIn; + + public static void NightSetup() + { + Star.starfallBoost = 1f; + if (Main.rand.Next(10) == 0) + Star.starfallBoost = (float) Main.rand.Next(300, 501) * 0.01f; + else if (Main.rand.Next(3) == 0) + Star.starfallBoost = (float) Main.rand.Next(100, 151) * 0.01f; + Star.starFallCount = 0; + } + + public static void StarFall(float positionX) + { + ++Star.starFallCount; + int index1 = -1; + float num1 = -1f; + float num2 = (float) ((double) positionX / (double) Main.rightWorld * 1920.0); + for (int index2 = 0; index2 < Main.numStars; ++index2) + { + if (!Main.star[index2].hidden && !Main.star[index2].falling) + { + float num3 = Math.Abs(Main.star[index2].position.X - num2); + if ((double) num1 == -1.0 || (double) num3 < (double) num1) + { + index1 = index2; + num1 = num3; + } + } + } + if (index1 < 0) + return; + Main.star[index1].Fall(); + } + + public static void SpawnStars(int s = -1) + { + FastRandom withRandomSeed = FastRandom.CreateWithRandomSeed(); + int num1 = withRandomSeed.Next(200, 400); + int num2 = 0; + int num3 = num1; + if (s >= 0) + { + num2 = s; + num3 = s + 1; + } + for (int index1 = num2; index1 < num3; ++index1) + { + Main.star[index1] = new Star(); + if (s >= 0) + { + Main.star[index1].fadeIn = 1f; + int num4 = 10; + int num5 = -2000; + for (int index2 = 0; index2 < num4; ++index2) + { + float num6 = (float) withRandomSeed.Next(1921); + int num7 = 2000; + for (int index3 = 0; index3 < Main.numStars; ++index3) + { + if (index3 != s && !Main.star[index3].hidden && !Main.star[index3].falling) + { + int num8 = (int) Math.Abs(num6 - Main.star[index3].position.X); + if (num8 < num7) + num7 = num8; + } + } + if (s == 0 || num7 > num5) + { + num5 = num7; + Main.star[index1].position.X = num6; + } + } + } + else + Main.star[index1].position.X = (float) withRandomSeed.Next(1921); + Main.star[index1].position.Y = (float) withRandomSeed.Next(1201); + Main.star[index1].rotation = (float) withRandomSeed.Next(628) * 0.01f; + Main.star[index1].scale = (float) withRandomSeed.Next(70, 130) * (3f / 500f); + Main.star[index1].type = withRandomSeed.Next(0, 4); + Main.star[index1].twinkle = (float) withRandomSeed.Next(60, 101) * 0.01f; + Main.star[index1].twinkleSpeed = (float) withRandomSeed.Next(30, 110) * 0.0001f; + if (withRandomSeed.Next(2) == 0) + Main.star[index1].twinkleSpeed *= -1f; + Main.star[index1].rotationSpeed = (float) withRandomSeed.Next(5, 50) * 0.0001f; + if (withRandomSeed.Next(2) == 0) + Main.star[index1].rotationSpeed *= -1f; + if (withRandomSeed.Next(40) == 0) + { + Main.star[index1].scale *= 2f; + Main.star[index1].twinkleSpeed /= 2f; + Main.star[index1].rotationSpeed /= 2f; + } + } + if (s != -1) + return; + Main.numStars = num1; + } + + public void Fall() + { + this.fallTime = 0; + this.falling = true; + this.fallSpeed.Y = (float) Main.rand.Next(700, 1001) * 0.01f; + this.fallSpeed.X = (float) Main.rand.Next(-400, 401) * 0.01f; + } + + public void Update() + { + if (this.falling && !this.hidden) + { + this.fallTime += Main.dayRate; + this.position += this.fallSpeed * (float) (Main.dayRate + 99) / 100f; + if ((double) this.position.Y > 1500.0) + this.hidden = true; + this.twinkle += this.twinkleSpeed * 3f; + if ((double) this.twinkle > 1.0) + { + this.twinkle = 1f; + this.twinkleSpeed *= -1f; + } + else if ((double) this.twinkle < 0.6) + { + this.twinkle = 0.6f; + this.twinkleSpeed *= -1f; + } + this.rotation += 0.5f; + if ((double) this.rotation > 6.28) + this.rotation -= 6.28f; + if ((double) this.rotation >= 0.0) + return; + this.rotation += 6.28f; + } + else + { + if ((double) this.fadeIn > 0.0) + { + this.fadeIn -= 6.172839E-05f * (float) Main.dayRate; + if ((double) this.fadeIn < 0.0) + this.fadeIn = 0.0f; + } + this.twinkle += this.twinkleSpeed; + if ((double) this.twinkle > 1.0) + { + this.twinkle = 1f; + this.twinkleSpeed *= -1f; + } + else if ((double) this.twinkle < 0.6) + { + this.twinkle = 0.6f; + this.twinkleSpeed *= -1f; + } + this.rotation += this.rotationSpeed; + if ((double) this.rotation > 6.28) + this.rotation -= 6.28f; + if ((double) this.rotation >= 0.0) + return; + this.rotation += 6.28f; + } + } + + public static void UpdateStars() + { + if (!Main.dayTime) + Star.dayCheck = false; + else if (!Star.dayCheck && Main.time >= 27000.0) + { + for (int s = 0; s < Main.numStars; ++s) + { + if (Main.star[s].hidden) + Star.SpawnStars(s); + } + } + for (int index = 0; index < Main.numStars; ++index) + Main.star[index].Update(); + } + } +} diff --git a/StrayMethods.cs b/StrayMethods.cs new file mode 100644 index 0000000..4c66ad1 --- /dev/null +++ b/StrayMethods.cs @@ -0,0 +1,162 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.StrayMethods +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; + +namespace Terraria +{ + public class StrayMethods + { + public static bool CountSandHorizontally( + int i, + int j, + bool[] fittingTypes, + int requiredTotalSpread = 4, + int spreadInEachAxis = 5) + { + if (!WorldGen.InWorld(i, j, 2)) + return false; + int num1 = 0; + int num2 = 0; + for (int i1 = i - 1; num1 < spreadInEachAxis && i1 > 0; --i1) + { + Tile tile = Main.tile[i1, j]; + if (tile.active() && fittingTypes[(int) tile.type] && !WorldGen.SolidTileAllowBottomSlope(i1, j - 1)) + ++num1; + else if (!tile.active()) + break; + } + for (int i2 = i + 1; num2 < spreadInEachAxis && i2 < Main.maxTilesX - 1; ++i2) + { + Tile tile = Main.tile[i2, j]; + if (tile.active() && fittingTypes[(int) tile.type] && !WorldGen.SolidTileAllowBottomSlope(i2, j - 1)) + ++num2; + else if (!tile.active()) + break; + } + return num1 + num2 + 1 >= requiredTotalSpread; + } + + public static bool CanSpawnSandstormHostile(Vector2 position, int expandUp, int expandDown) + { + bool flag = true; + Point tileCoordinates = position.ToTileCoordinates(); + for (int index = -1; index <= 1; ++index) + { + int topY; + int bottomY; + Collision.ExpandVertically(tileCoordinates.X + index, tileCoordinates.Y, out topY, out bottomY, expandUp, expandDown); + ++topY; + --bottomY; + if (bottomY - topY < 20) + { + flag = false; + break; + } + } + return flag; + } + + public static bool CanSpawnSandstormFriendly(Vector2 position, int expandUp, int expandDown) + { + bool flag = true; + Point tileCoordinates = position.ToTileCoordinates(); + for (int index = -1; index <= 1; ++index) + { + int topY; + int bottomY; + Collision.ExpandVertically(tileCoordinates.X + index, tileCoordinates.Y, out topY, out bottomY, expandUp, expandDown); + ++topY; + --bottomY; + if (bottomY - topY < 10) + { + flag = false; + break; + } + } + return flag; + } + + public static void CheckArenaScore( + Vector2 arenaCenter, + out Point xLeftEnd, + out Point xRightEnd, + int walkerWidthInTiles = 5, + int walkerHeightInTiles = 10) + { + bool showDebug = false; + Point tileCoordinates = arenaCenter.ToTileCoordinates(); + xLeftEnd = xRightEnd = tileCoordinates; + int bottomY; + Collision.ExpandVertically(tileCoordinates.X, tileCoordinates.Y, out int _, out bottomY, 0, 4); + tileCoordinates.Y = bottomY; + if (showDebug) + Dust.QuickDust(tileCoordinates, Color.Blue).scale = 5f; + Point lastIteratedFloorSpot1; + StrayMethods.SendWalker(tileCoordinates, walkerHeightInTiles, -1, out int _, out lastIteratedFloorSpot1, 120, showDebug); + Point lastIteratedFloorSpot2; + StrayMethods.SendWalker(tileCoordinates, walkerHeightInTiles, 1, out int _, out lastIteratedFloorSpot2, 120, showDebug); + ++lastIteratedFloorSpot1.X; + --lastIteratedFloorSpot2.X; + if (showDebug) + Dust.QuickDustLine(lastIteratedFloorSpot1.ToWorldCoordinates(), lastIteratedFloorSpot2.ToWorldCoordinates(), 50f, Color.Pink); + xLeftEnd = lastIteratedFloorSpot1; + xRightEnd = lastIteratedFloorSpot2; + } + + public static void SendWalker( + Point startFloorPosition, + int height, + int direction, + out int distanceCoveredInTiles, + out Point lastIteratedFloorSpot, + int maxDistance = 100, + bool showDebug = false) + { + distanceCoveredInTiles = 0; + --startFloorPosition.Y; + lastIteratedFloorSpot = startFloorPosition; + for (int index1 = 0; index1 < maxDistance; ++index1) + { + for (int index2 = 0; index2 < 3 && WorldGen.SolidTile3(startFloorPosition.X, startFloorPosition.Y); ++index2) + --startFloorPosition.Y; + int topY1; + int bottomY1; + Collision.ExpandVertically(startFloorPosition.X, startFloorPosition.Y, out topY1, out bottomY1, height, 2); + ++topY1; + --bottomY1; + if (!WorldGen.SolidTile3(startFloorPosition.X, bottomY1 + 1)) + { + int topY2; + int bottomY2; + Collision.ExpandVertically(startFloorPosition.X, bottomY1, out topY2, out bottomY2, 0, 6); + if (showDebug) + Dust.QuickBox(new Vector2((float) (startFloorPosition.X * 16 + 8), (float) (topY2 * 16)), new Vector2((float) (startFloorPosition.X * 16 + 8), (float) (bottomY2 * 16)), 1, Color.Blue, (Action) null); + if (!WorldGen.SolidTile3(startFloorPosition.X, bottomY2)) + break; + } + if (bottomY1 - topY1 >= height - 1) + { + if (showDebug) + { + Dust.QuickDust(startFloorPosition, Color.Green).scale = 1f; + Dust.QuickBox(new Vector2((float) (startFloorPosition.X * 16 + 8), (float) (topY1 * 16)), new Vector2((float) (startFloorPosition.X * 16 + 8), (float) (bottomY1 * 16 + 16)), 1, Color.Red, (Action) null); + } + distanceCoveredInTiles += direction; + startFloorPosition.X += direction; + startFloorPosition.Y = bottomY1; + lastIteratedFloorSpot = startFloorPosition; + if (Math.Abs(distanceCoveredInTiles) >= maxDistance) + break; + } + else + break; + } + distanceCoveredInTiles = Math.Abs(distanceCoveredInTiles); + } + } +} diff --git a/Terraria.csproj b/Terraria.csproj new file mode 100644 index 0000000..52c66aa --- /dev/null +++ b/Terraria.csproj @@ -0,0 +1,1110 @@ + + + + + Debug + AnyCPU + {7D3CE319-F33B-432A-BB01-21F097B10C55} + WinExe + Terraria + v4.0 + Client + 1.4.0.5 + 512 + Terraria + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Terraria.pdb b/Terraria.pdb new file mode 100644 index 0000000..16f08ec Binary files /dev/null and b/Terraria.pdb differ diff --git a/Terraria.sln b/Terraria.sln new file mode 100644 index 0000000..5a331d7 --- /dev/null +++ b/Terraria.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Terraria", "Terraria.csproj", "{7D3CE319-F33B-432A-BB01-21F097B10C55}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7D3CE319-F33B-432A-BB01-21F097B10C55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7D3CE319-F33B-432A-BB01-21F097B10C55}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7D3CE319-F33B-432A-BB01-21F097B10C55}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7D3CE319-F33B-432A-BB01-21F097B10C55}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/TestHighFPSIssues.cs b/TestHighFPSIssues.cs new file mode 100644 index 0000000..344d7d3 --- /dev/null +++ b/TestHighFPSIssues.cs @@ -0,0 +1,66 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.TestHighFPSIssues +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria.GameInput; + +namespace Terraria +{ + public class TestHighFPSIssues + { + private static List _tapUpdates = new List(); + private static List _tapUpdateEnds = new List(); + private static List _tapDraws = new List(); + private static int conU; + private static int conUH; + private static int conD; + private static int conDH; + private static int race; + + public static void TapUpdate(GameTime gt) + { + TestHighFPSIssues._tapUpdates.Add(gt.TotalGameTime.TotalMilliseconds); + TestHighFPSIssues.conD = 0; + --TestHighFPSIssues.race; + if (++TestHighFPSIssues.conU <= TestHighFPSIssues.conUH) + return; + TestHighFPSIssues.conUH = TestHighFPSIssues.conU; + } + + public static void TapUpdateEnd(GameTime gt) => TestHighFPSIssues._tapUpdateEnds.Add(gt.TotalGameTime.TotalMilliseconds); + + public static void TapDraw(GameTime gt) + { + TestHighFPSIssues._tapDraws.Add(gt.TotalGameTime.TotalMilliseconds); + TestHighFPSIssues.conU = 0; + ++TestHighFPSIssues.race; + if (++TestHighFPSIssues.conD <= TestHighFPSIssues.conDH) + return; + TestHighFPSIssues.conDH = TestHighFPSIssues.conD; + } + + public static void Update(GameTime gt) + { + if (PlayerInput.Triggers.Current.Down) + { + int num; + TestHighFPSIssues.conDH = num = 0; + TestHighFPSIssues.conUH = num; + TestHighFPSIssues.race = num; + } + double num1 = gt.TotalGameTime.TotalMilliseconds - 5000.0; + while (TestHighFPSIssues._tapUpdates.Count > 0 && TestHighFPSIssues._tapUpdates[0] < num1) + TestHighFPSIssues._tapUpdates.RemoveAt(0); + while (TestHighFPSIssues._tapDraws.Count > 0 && TestHighFPSIssues._tapDraws[0] < num1) + TestHighFPSIssues._tapDraws.RemoveAt(0); + while (TestHighFPSIssues._tapUpdateEnds.Count > 0 && TestHighFPSIssues._tapUpdateEnds[0] < num1) + TestHighFPSIssues._tapUpdateEnds.RemoveAt(0); + Main.versionNumber = "total (u/d) " + (object) TestHighFPSIssues._tapUpdates.Count + " " + (object) TestHighFPSIssues._tapUpdateEnds.Count + " " + (object) TestHighFPSIssues.race + " " + (object) TestHighFPSIssues.conUH + " " + (object) TestHighFPSIssues.conDH; + Main.NewText(Main.versionNumber); + } + } +} diff --git a/Testing/ChatCommands/ArgumentHelper.cs b/Testing/ChatCommands/ArgumentHelper.cs new file mode 100644 index 0000000..6f7fc49 --- /dev/null +++ b/Testing/ChatCommands/ArgumentHelper.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Testing.ChatCommands.ArgumentHelper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Terraria.Testing.ChatCommands +{ + public static class ArgumentHelper + { + public static ArgumentListResult ParseList(string arguments) => new ArgumentListResult(((IEnumerable) arguments.Split(' ')).Select((Func) (arg => arg.Trim())).Where((Func) (arg => (uint) arg.Length > 0U))); + } +} diff --git a/Testing/ChatCommands/ArgumentListResult.cs b/Testing/ChatCommands/ArgumentListResult.cs new file mode 100644 index 0000000..a467982 --- /dev/null +++ b/Testing/ChatCommands/ArgumentListResult.cs @@ -0,0 +1,40 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Testing.ChatCommands.ArgumentListResult +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace Terraria.Testing.ChatCommands +{ + public class ArgumentListResult : IEnumerable, IEnumerable + { + public static readonly ArgumentListResult Empty = new ArgumentListResult(true); + public static readonly ArgumentListResult Invalid = new ArgumentListResult(false); + public readonly bool IsValid; + private readonly List _results; + + public int Count => this._results.Count; + + public string this[int index] => this._results[index]; + + public ArgumentListResult(IEnumerable results) + { + this._results = results.ToList(); + this.IsValid = true; + } + + private ArgumentListResult(bool isValid) + { + this._results = new List(); + this.IsValid = isValid; + } + + public IEnumerator GetEnumerator() => (IEnumerator) this._results.GetEnumerator(); + + IEnumerator IEnumerable.GetEnumerator() => (IEnumerator) this.GetEnumerator(); + } +} diff --git a/Testing/PacketHistory.cs b/Testing/PacketHistory.cs new file mode 100644 index 0000000..2e0dc08 --- /dev/null +++ b/Testing/PacketHistory.cs @@ -0,0 +1,103 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Testing.PacketHistory +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Text; +using System.Threading; + +namespace Terraria.Testing +{ + public class PacketHistory + { + private byte[] _buffer; + private PacketHistory.PacketView[] _packets; + private int _bufferPosition; + private int _historyPosition; + + public PacketHistory(int historySize = 100, int bufferSize = 65535) + { + } + + [Conditional("DEBUG")] + public void Record(byte[] buffer, int offset, int length) + { + length = Math.Max(0, length); + PacketHistory.PacketView packetView = this.AppendPacket(length); + Buffer.BlockCopy((Array) buffer, offset, (Array) this._buffer, packetView.Offset, length); + } + + private PacketHistory.PacketView AppendPacket(int size) + { + int offset = this._bufferPosition; + if (offset + size > this._buffer.Length) + offset = 0; + PacketHistory.PacketView packetView = new PacketHistory.PacketView(offset, size, DateTime.Now); + this._packets[this._historyPosition] = packetView; + this._historyPosition = (this._historyPosition + 1) % this._packets.Length; + this._bufferPosition = offset + size; + return packetView; + } + + [Conditional("DEBUG")] + public void Dump(string reason) + { + byte[] numArray = new byte[this._buffer.Length]; + Buffer.BlockCopy((Array) this._buffer, this._bufferPosition, (Array) numArray, 0, this._buffer.Length - this._bufferPosition); + Buffer.BlockCopy((Array) this._buffer, 0, (Array) numArray, this._buffer.Length - this._bufferPosition, this._bufferPosition); + StringBuilder stringBuilder = new StringBuilder(); + int num = 1; + for (int index1 = 0; index1 < this._packets.Length; ++index1) + { + PacketHistory.PacketView packet = this._packets[(index1 + this._historyPosition) % this._packets.Length]; + if (packet.Offset != 0 || packet.Length != 0) + { + stringBuilder.Append(string.Format("Packet {0} [Assumed MessageID: {4}, Size: {2}, Buffer Position: {1}, Timestamp: {3:G}]\r\n", (object) num++, (object) packet.Offset, (object) packet.Length, (object) packet.Time, (object) this._buffer[packet.Offset])); + for (int index2 = 0; index2 < packet.Length; ++index2) + { + stringBuilder.Append(this._buffer[packet.Offset + index2].ToString("X2") + " "); + if (index2 % 16 == 15 && index2 != this._packets.Length - 1) + stringBuilder.Append("\r\n"); + } + stringBuilder.Append("\r\n\r\n"); + } + } + stringBuilder.Append(reason); + Directory.CreateDirectory(Path.Combine(Main.SavePath, "NetDump")); + File.WriteAllText(Path.Combine(Main.SavePath, "NetDump", this.CreateDumpFileName()), stringBuilder.ToString()); + } + + private string CreateDumpFileName() + { + DateTime localTime = DateTime.Now.ToLocalTime(); + return string.Format("Net_{0}_{1}_{2}_{3}.txt", (object) "Terraria", (object) Main.versionNumber, (object) localTime.ToString("MM-dd-yy_HH-mm-ss-ffff", (IFormatProvider) CultureInfo.InvariantCulture), (object) Thread.CurrentThread.ManagedThreadId); + } + + [Conditional("DEBUG")] + private void InitializeBuffer(int historySize, int bufferSize) + { + this._packets = new PacketHistory.PacketView[historySize]; + this._buffer = new byte[bufferSize]; + } + + private struct PacketView + { + public static readonly PacketHistory.PacketView Empty = new PacketHistory.PacketView(0, 0, DateTime.Now); + public readonly int Offset; + public readonly int Length; + public readonly DateTime Time; + + public PacketView(int offset, int length, DateTime time) + { + this.Offset = offset; + this.Length = length; + this.Time = time; + } + } + } +} diff --git a/Tile.cs b/Tile.cs new file mode 100644 index 0000000..12cbb98 --- /dev/null +++ b/Tile.cs @@ -0,0 +1,499 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Tile +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.DataStructures; + +namespace Terraria +{ + public class Tile + { + public ushort type; + public ushort wall; + public byte liquid; + public short sTileHeader; + public byte bTileHeader; + public byte bTileHeader2; + public byte bTileHeader3; + public short frameX; + public short frameY; + public const int Type_Solid = 0; + public const int Type_Halfbrick = 1; + public const int Type_SlopeDownRight = 2; + public const int Type_SlopeDownLeft = 3; + public const int Type_SlopeUpRight = 4; + public const int Type_SlopeUpLeft = 5; + public const int Liquid_Water = 0; + public const int Liquid_Lava = 1; + public const int Liquid_Honey = 2; + + public Tile() + { + this.type = (ushort) 0; + this.wall = (ushort) 0; + this.liquid = (byte) 0; + this.sTileHeader = (short) 0; + this.bTileHeader = (byte) 0; + this.bTileHeader2 = (byte) 0; + this.bTileHeader3 = (byte) 0; + this.frameX = (short) 0; + this.frameY = (short) 0; + } + + public Tile(Tile copy) + { + if (copy == null) + { + this.type = (ushort) 0; + this.wall = (ushort) 0; + this.liquid = (byte) 0; + this.sTileHeader = (short) 0; + this.bTileHeader = (byte) 0; + this.bTileHeader2 = (byte) 0; + this.bTileHeader3 = (byte) 0; + this.frameX = (short) 0; + this.frameY = (short) 0; + } + else + { + this.type = copy.type; + this.wall = copy.wall; + this.liquid = copy.liquid; + this.sTileHeader = copy.sTileHeader; + this.bTileHeader = copy.bTileHeader; + this.bTileHeader2 = copy.bTileHeader2; + this.bTileHeader3 = copy.bTileHeader3; + this.frameX = copy.frameX; + this.frameY = copy.frameY; + } + } + + public object Clone() => this.MemberwiseClone(); + + public void ClearEverything() + { + this.type = (ushort) 0; + this.wall = (ushort) 0; + this.liquid = (byte) 0; + this.sTileHeader = (short) 0; + this.bTileHeader = (byte) 0; + this.bTileHeader2 = (byte) 0; + this.bTileHeader3 = (byte) 0; + this.frameX = (short) 0; + this.frameY = (short) 0; + } + + public void ClearTile() + { + this.slope((byte) 0); + this.halfBrick(false); + this.active(false); + this.inActive(false); + } + + public void CopyFrom(Tile from) + { + this.type = from.type; + this.wall = from.wall; + this.liquid = from.liquid; + this.sTileHeader = from.sTileHeader; + this.bTileHeader = from.bTileHeader; + this.bTileHeader2 = from.bTileHeader2; + this.bTileHeader3 = from.bTileHeader3; + this.frameX = from.frameX; + this.frameY = from.frameY; + } + + public int collisionType + { + get + { + if (!this.active()) + return 0; + if (this.halfBrick()) + return 2; + if (this.slope() > (byte) 0) + return 2 + (int) this.slope(); + return Main.tileSolid[(int) this.type] && !Main.tileSolidTop[(int) this.type] ? 1 : -1; + } + } + + public bool isTheSameAs(Tile compTile) + { + if (compTile == null || (int) this.sTileHeader != (int) compTile.sTileHeader || this.active() && ((int) this.type != (int) compTile.type || Main.tileFrameImportant[(int) this.type] && ((int) this.frameX != (int) compTile.frameX || (int) this.frameY != (int) compTile.frameY)) || (int) this.wall != (int) compTile.wall || (int) this.liquid != (int) compTile.liquid) + return false; + if (compTile.liquid == (byte) 0) + { + if ((int) this.wallColor() != (int) compTile.wallColor() || this.wire4() != compTile.wire4()) + return false; + } + else if ((int) this.bTileHeader != (int) compTile.bTileHeader) + return false; + return true; + } + + public int blockType() + { + if (this.halfBrick()) + return 1; + int num = (int) this.slope(); + if (num > 0) + ++num; + return num; + } + + public void liquidType(int liquidType) + { + switch (liquidType) + { + case 0: + this.bTileHeader &= (byte) 159; + break; + case 1: + this.lava(true); + break; + case 2: + this.honey(true); + break; + } + } + + public byte liquidType() => (byte) (((int) this.bTileHeader & 96) >> 5); + + public bool nactive() => ((int) this.sTileHeader & 96) == 32; + + public void ResetToType(ushort type) + { + this.liquid = (byte) 0; + this.sTileHeader = (short) 32; + this.bTileHeader = (byte) 0; + this.bTileHeader2 = (byte) 0; + this.bTileHeader3 = (byte) 0; + this.frameX = (short) 0; + this.frameY = (short) 0; + this.type = type; + } + + internal void ClearMetadata() + { + this.liquid = (byte) 0; + this.sTileHeader = (short) 0; + this.bTileHeader = (byte) 0; + this.bTileHeader2 = (byte) 0; + this.bTileHeader3 = (byte) 0; + this.frameX = (short) 0; + this.frameY = (short) 0; + } + + public Color actColor(Color oldColor) + { + if (!this.inActive()) + return oldColor; + double num = 0.4; + return new Color((int) (byte) (num * (double) oldColor.R), (int) (byte) (num * (double) oldColor.G), (int) (byte) (num * (double) oldColor.B), (int) oldColor.A); + } + + public void actColor(ref Vector3 oldColor) + { + if (!this.inActive()) + return; + oldColor *= 0.4f; + } + + public bool topSlope() + { + byte num = this.slope(); + return num == (byte) 1 || num == (byte) 2; + } + + public bool bottomSlope() + { + byte num = this.slope(); + return num == (byte) 3 || num == (byte) 4; + } + + public bool leftSlope() + { + byte num = this.slope(); + return num == (byte) 2 || num == (byte) 4; + } + + public bool rightSlope() + { + byte num = this.slope(); + return num == (byte) 1 || num == (byte) 3; + } + + public bool HasSameSlope(Tile tile) => ((int) this.sTileHeader & 29696) == ((int) tile.sTileHeader & 29696); + + public byte wallColor() => (byte) ((uint) this.bTileHeader & 31U); + + public void wallColor(byte wallColor) => this.bTileHeader = (byte) ((uint) this.bTileHeader & 224U | (uint) wallColor); + + public bool lava() => ((int) this.bTileHeader & 32) == 32; + + public void lava(bool lava) + { + if (lava) + this.bTileHeader = (byte) ((int) this.bTileHeader & 159 | 32); + else + this.bTileHeader &= (byte) 223; + } + + public bool honey() => ((int) this.bTileHeader & 64) == 64; + + public void honey(bool honey) + { + if (honey) + this.bTileHeader = (byte) ((int) this.bTileHeader & 159 | 64); + else + this.bTileHeader &= (byte) 191; + } + + public bool wire4() => ((int) this.bTileHeader & 128) == 128; + + public void wire4(bool wire4) + { + if (wire4) + this.bTileHeader |= (byte) 128; + else + this.bTileHeader &= (byte) 127; + } + + public int wallFrameX() => ((int) this.bTileHeader2 & 15) * 36; + + public void wallFrameX(int wallFrameX) => this.bTileHeader2 = (byte) ((int) this.bTileHeader2 & 240 | wallFrameX / 36 & 15); + + public byte frameNumber() => (byte) (((int) this.bTileHeader2 & 48) >> 4); + + public void frameNumber(byte frameNumber) => this.bTileHeader2 = (byte) ((int) this.bTileHeader2 & 207 | ((int) frameNumber & 3) << 4); + + public byte wallFrameNumber() => (byte) (((int) this.bTileHeader2 & 192) >> 6); + + public void wallFrameNumber(byte wallFrameNumber) => this.bTileHeader2 = (byte) ((int) this.bTileHeader2 & 63 | ((int) wallFrameNumber & 3) << 6); + + public int wallFrameY() => ((int) this.bTileHeader3 & 7) * 36; + + public void wallFrameY(int wallFrameY) => this.bTileHeader3 = (byte) ((int) this.bTileHeader3 & 248 | wallFrameY / 36 & 7); + + public bool checkingLiquid() => ((int) this.bTileHeader3 & 8) == 8; + + public void checkingLiquid(bool checkingLiquid) + { + if (checkingLiquid) + this.bTileHeader3 |= (byte) 8; + else + this.bTileHeader3 &= (byte) 247; + } + + public bool skipLiquid() => ((int) this.bTileHeader3 & 16) == 16; + + public void skipLiquid(bool skipLiquid) + { + if (skipLiquid) + this.bTileHeader3 |= (byte) 16; + else + this.bTileHeader3 &= (byte) 239; + } + + public byte color() => (byte) ((uint) this.sTileHeader & 31U); + + public void color(byte color) => this.sTileHeader = (short) ((int) this.sTileHeader & 65504 | (int) color); + + public bool active() => ((int) this.sTileHeader & 32) == 32; + + public void active(bool active) + { + if (active) + this.sTileHeader |= (short) 32; + else + this.sTileHeader &= (short) -33; + } + + public bool inActive() => ((int) this.sTileHeader & 64) == 64; + + public void inActive(bool inActive) + { + if (inActive) + this.sTileHeader |= (short) 64; + else + this.sTileHeader &= (short) -65; + } + + public bool wire() => ((int) this.sTileHeader & 128) == 128; + + public void wire(bool wire) + { + if (wire) + this.sTileHeader |= (short) 128; + else + this.sTileHeader &= (short) -129; + } + + public bool wire2() => ((int) this.sTileHeader & 256) == 256; + + public void wire2(bool wire2) + { + if (wire2) + this.sTileHeader |= (short) 256; + else + this.sTileHeader &= (short) -257; + } + + public bool wire3() => ((int) this.sTileHeader & 512) == 512; + + public void wire3(bool wire3) + { + if (wire3) + this.sTileHeader |= (short) 512; + else + this.sTileHeader &= (short) -513; + } + + public bool halfBrick() => ((int) this.sTileHeader & 1024) == 1024; + + public void halfBrick(bool halfBrick) + { + if (halfBrick) + this.sTileHeader |= (short) 1024; + else + this.sTileHeader &= (short) -1025; + } + + public bool actuator() => ((int) this.sTileHeader & 2048) == 2048; + + public void actuator(bool actuator) + { + if (actuator) + this.sTileHeader |= (short) 2048; + else + this.sTileHeader &= (short) -2049; + } + + public byte slope() => (byte) (((int) this.sTileHeader & 28672) >> 12); + + public void slope(byte slope) => this.sTileHeader = (short) ((int) this.sTileHeader & 36863 | ((int) slope & 7) << 12); + + public void Clear(TileDataType types) + { + if ((types & TileDataType.Tile) != (TileDataType) 0) + { + this.type = (ushort) 0; + this.active(false); + this.frameX = (short) 0; + this.frameY = (short) 0; + } + if ((types & TileDataType.Wall) != (TileDataType) 0) + { + this.wall = (ushort) 0; + this.wallFrameX(0); + this.wallFrameY(0); + } + if ((types & TileDataType.TilePaint) != (TileDataType) 0) + this.color((byte) 0); + if ((types & TileDataType.WallPaint) != (TileDataType) 0) + this.wallColor((byte) 0); + if ((types & TileDataType.Liquid) != (TileDataType) 0) + { + this.liquid = (byte) 0; + this.liquidType(0); + this.checkingLiquid(false); + } + if ((types & TileDataType.Slope) != (TileDataType) 0) + { + this.slope((byte) 0); + this.halfBrick(false); + } + if ((types & TileDataType.Wiring) != (TileDataType) 0) + { + this.wire(false); + this.wire2(false); + this.wire3(false); + this.wire4(false); + } + if ((types & TileDataType.Actuator) == (TileDataType) 0) + return; + this.actuator(false); + this.inActive(false); + } + + public static void SmoothSlope(int x, int y, bool applyToNeighbors = true, bool sync = false) + { + if (applyToNeighbors) + { + Tile.SmoothSlope(x + 1, y, false, sync); + Tile.SmoothSlope(x - 1, y, false, sync); + Tile.SmoothSlope(x, y + 1, false, sync); + Tile.SmoothSlope(x, y - 1, false, sync); + } + Tile tile = Main.tile[x, y]; + if (!WorldGen.CanPoundTile(x, y) || !WorldGen.SolidOrSlopedTile(x, y)) + return; + bool flag1 = !WorldGen.TileEmpty(x, y - 1); + bool flag2 = !WorldGen.SolidOrSlopedTile(x, y - 1) & flag1; + bool flag3 = WorldGen.SolidOrSlopedTile(x, y + 1); + bool flag4 = WorldGen.SolidOrSlopedTile(x - 1, y); + bool flag5 = WorldGen.SolidOrSlopedTile(x + 1, y); + int num1 = (flag1 ? 1 : 0) << 3 | (flag3 ? 1 : 0) << 2 | (flag4 ? 1 : 0) << 1 | (flag5 ? 1 : 0); + bool flag6 = tile.halfBrick(); + int num2 = (int) tile.slope(); + switch (num1) + { + case 4: + tile.slope((byte) 0); + tile.halfBrick(true); + break; + case 5: + tile.halfBrick(false); + tile.slope((byte) 2); + break; + case 6: + tile.halfBrick(false); + tile.slope((byte) 1); + break; + case 9: + if (!flag2) + { + tile.halfBrick(false); + tile.slope((byte) 4); + break; + } + break; + case 10: + if (!flag2) + { + tile.halfBrick(false); + tile.slope((byte) 3); + break; + } + break; + default: + tile.halfBrick(false); + tile.slope((byte) 0); + break; + } + if (!sync) + return; + int num3 = (int) tile.slope(); + bool flag7 = flag6 != tile.halfBrick(); + bool flag8 = num2 != num3; + if (flag7 & flag8) + NetMessage.SendData(17, number: 23, number2: ((float) x), number3: ((float) y), number4: ((float) num3)); + else if (flag7) + { + NetMessage.SendData(17, number: 7, number2: ((float) x), number3: ((float) y), number4: 1f); + } + else + { + if (!flag8) + return; + NetMessage.SendData(17, number: 14, number2: ((float) x), number3: ((float) y), number4: ((float) num3)); + } + } + + public override string ToString() => "Tile Type:" + (object) this.type + " Active:" + this.active().ToString() + " Wall:" + (object) this.wall + " Slope:" + (object) this.slope() + " fX:" + (object) this.frameX + " fY:" + (object) this.frameY; + } +} diff --git a/TileChangeReceivedEvent.cs b/TileChangeReceivedEvent.cs new file mode 100644 index 0000000..507122d --- /dev/null +++ b/TileChangeReceivedEvent.cs @@ -0,0 +1,12 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.TileChangeReceivedEvent +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.ID; + +namespace Terraria +{ + public delegate void TileChangeReceivedEvent(int x, int y, int count, TileChangeType type); +} diff --git a/TileObject.cs b/TileObject.cs new file mode 100644 index 0000000..2d1b04e --- /dev/null +++ b/TileObject.cs @@ -0,0 +1,732 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.TileObject +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ObjectData; + +namespace Terraria +{ + public struct TileObject + { + public int xCoord; + public int yCoord; + public int type; + public int style; + public int alternate; + public int random; + public static TileObject Empty = new TileObject(); + public static TileObjectPreviewData objectPreview = new TileObjectPreviewData(); + + public static bool Place(TileObject toBePlaced) + { + TileObjectData tileData = TileObjectData.GetTileData(toBePlaced.type, toBePlaced.style, toBePlaced.alternate); + if (tileData == null) + return false; + if (tileData.HookPlaceOverride.hook != null) + { + int num1; + int num2; + if (tileData.HookPlaceOverride.processedCoordinates) + { + num1 = toBePlaced.xCoord; + num2 = toBePlaced.yCoord; + } + else + { + num1 = toBePlaced.xCoord + (int) tileData.Origin.X; + num2 = toBePlaced.yCoord + (int) tileData.Origin.Y; + } + if (tileData.HookPlaceOverride.hook(num1, num2, toBePlaced.type, toBePlaced.style, 1, toBePlaced.alternate) == tileData.HookPlaceOverride.badReturn) + return false; + } + else + { + ushort type = (ushort) toBePlaced.type; + int placementStyle = tileData.CalculatePlacementStyle(toBePlaced.style, toBePlaced.alternate, toBePlaced.random); + int num3 = 0; + if (tileData.StyleWrapLimit > 0) + { + num3 = placementStyle / tileData.StyleWrapLimit * tileData.StyleLineSkip; + placementStyle %= tileData.StyleWrapLimit; + } + int num4; + int num5; + if (tileData.StyleHorizontal) + { + num4 = tileData.CoordinateFullWidth * placementStyle; + num5 = tileData.CoordinateFullHeight * num3; + } + else + { + num4 = tileData.CoordinateFullWidth * num3; + num5 = tileData.CoordinateFullHeight * placementStyle; + } + int xCoord = toBePlaced.xCoord; + int yCoord = toBePlaced.yCoord; + for (int index1 = 0; index1 < tileData.Width; ++index1) + { + for (int index2 = 0; index2 < tileData.Height; ++index2) + { + Tile tileSafely = Framing.GetTileSafely(xCoord + index1, yCoord + index2); + if (tileSafely.active() && tileSafely.type != (ushort) 484 && (Main.tileCut[(int) tileSafely.type] || TileID.Sets.BreakableWhenPlacing[(int) tileSafely.type])) + { + WorldGen.KillTile(xCoord + index1, yCoord + index2); + if (!Main.tile[xCoord + index1, yCoord + index2].active() && Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) (yCoord + index1)), number3: ((float) (yCoord + index2))); + } + } + } + for (int index3 = 0; index3 < tileData.Width; ++index3) + { + int num6 = num4 + index3 * (tileData.CoordinateWidth + tileData.CoordinatePadding); + int num7 = num5; + for (int index4 = 0; index4 < tileData.Height; ++index4) + { + Tile tileSafely = Framing.GetTileSafely(xCoord + index3, yCoord + index4); + if (!tileSafely.active()) + { + tileSafely.active(true); + tileSafely.frameX = (short) num6; + tileSafely.frameY = (short) num7; + tileSafely.type = type; + } + num7 += tileData.CoordinateHeights[index4] + tileData.CoordinatePadding; + } + } + } + if (tileData.FlattenAnchors) + { + AnchorData anchorBottom = tileData.AnchorBottom; + if (anchorBottom.tileCount != 0 && (anchorBottom.type & AnchorType.SolidTile) == AnchorType.SolidTile) + { + int num = toBePlaced.xCoord + anchorBottom.checkStart; + int j = toBePlaced.yCoord + tileData.Height; + for (int index = 0; index < anchorBottom.tileCount; ++index) + { + Tile tileSafely = Framing.GetTileSafely(num + index, j); + if (Main.tileSolid[(int) tileSafely.type] && !Main.tileSolidTop[(int) tileSafely.type] && tileSafely.blockType() != 0) + WorldGen.SlopeTile(num + index, j); + } + } + AnchorData anchorTop = tileData.AnchorTop; + if (anchorTop.tileCount != 0 && (anchorTop.type & AnchorType.SolidTile) == AnchorType.SolidTile) + { + int num = toBePlaced.xCoord + anchorTop.checkStart; + int j = toBePlaced.yCoord - 1; + for (int index = 0; index < anchorTop.tileCount; ++index) + { + Tile tileSafely = Framing.GetTileSafely(num + index, j); + if (Main.tileSolid[(int) tileSafely.type] && !Main.tileSolidTop[(int) tileSafely.type] && tileSafely.blockType() != 0) + WorldGen.SlopeTile(num + index, j); + } + } + AnchorData anchorRight = tileData.AnchorRight; + if (anchorRight.tileCount != 0 && (anchorRight.type & AnchorType.SolidTile) == AnchorType.SolidTile) + { + int i = toBePlaced.xCoord + tileData.Width; + int num = toBePlaced.yCoord + anchorRight.checkStart; + for (int index = 0; index < anchorRight.tileCount; ++index) + { + Tile tileSafely = Framing.GetTileSafely(i, num + index); + if (Main.tileSolid[(int) tileSafely.type] && !Main.tileSolidTop[(int) tileSafely.type] && tileSafely.blockType() != 0) + WorldGen.SlopeTile(i, num + index); + } + } + AnchorData anchorLeft = tileData.AnchorLeft; + if (anchorLeft.tileCount != 0 && (anchorLeft.type & AnchorType.SolidTile) == AnchorType.SolidTile) + { + int i = toBePlaced.xCoord - 1; + int num = toBePlaced.yCoord + anchorLeft.checkStart; + for (int index = 0; index < anchorLeft.tileCount; ++index) + { + Tile tileSafely = Framing.GetTileSafely(i, num + index); + if (Main.tileSolid[(int) tileSafely.type] && !Main.tileSolidTop[(int) tileSafely.type] && tileSafely.blockType() != 0) + WorldGen.SlopeTile(i, num + index); + } + } + } + return true; + } + + public static bool CanPlace( + int x, + int y, + int type, + int style, + int dir, + out TileObject objectData, + bool onlyCheck = false) + { + TileObjectData tileData1 = TileObjectData.GetTileData(type, style); + objectData = TileObject.Empty; + if (tileData1 == null) + return false; + int num1 = x - (int) tileData1.Origin.X; + int num2 = y - (int) tileData1.Origin.Y; + if (num1 < 0 || num1 + tileData1.Width >= Main.maxTilesX || num2 < 0 || num2 + tileData1.Height >= Main.maxTilesY) + return false; + bool flag1 = tileData1.RandomStyleRange > 0; + if (TileObjectPreviewData.placementCache == null) + TileObjectPreviewData.placementCache = new TileObjectPreviewData(); + TileObjectPreviewData.placementCache.Reset(); + int num3 = 0; + if (tileData1.AlternatesCount != 0) + num3 = tileData1.AlternatesCount; + float num4 = -1f; + float num5 = -1f; + int num6 = 0; + TileObjectData tileObjectData = (TileObjectData) null; + int alternate = 0 - 1; + while (alternate < num3) + { + ++alternate; + TileObjectData tileData2 = TileObjectData.GetTileData(type, style, alternate); + if (tileData2.Direction == TileObjectDirection.None || (tileData2.Direction != TileObjectDirection.PlaceLeft || dir != 1) && (tileData2.Direction != TileObjectDirection.PlaceRight || dir != -1)) + { + int num7 = x - (int) tileData2.Origin.X; + int num8 = y - (int) tileData2.Origin.Y; + if (num7 < 5 || num7 + tileData2.Width > Main.maxTilesX - 5 || num8 < 5 || num8 + tileData2.Height > Main.maxTilesY - 5) + return false; + Rectangle rectangle = new Rectangle(0, 0, tileData2.Width, tileData2.Height); + int X = 0; + int Y = 0; + if (tileData2.AnchorTop.tileCount != 0) + { + if (rectangle.Y == 0) + { + rectangle.Y = -1; + ++rectangle.Height; + ++Y; + } + int checkStart = tileData2.AnchorTop.checkStart; + if (checkStart < rectangle.X) + { + rectangle.Width += rectangle.X - checkStart; + X += rectangle.X - checkStart; + rectangle.X = checkStart; + } + int num9 = checkStart + tileData2.AnchorTop.tileCount - 1; + int num10 = rectangle.X + rectangle.Width - 1; + if (num9 > num10) + rectangle.Width += num9 - num10; + } + if (tileData2.AnchorBottom.tileCount != 0) + { + if (rectangle.Y + rectangle.Height == tileData2.Height) + ++rectangle.Height; + int checkStart = tileData2.AnchorBottom.checkStart; + if (checkStart < rectangle.X) + { + rectangle.Width += rectangle.X - checkStart; + X += rectangle.X - checkStart; + rectangle.X = checkStart; + } + int num11 = checkStart + tileData2.AnchorBottom.tileCount - 1; + int num12 = rectangle.X + rectangle.Width - 1; + if (num11 > num12) + rectangle.Width += num11 - num12; + } + if (tileData2.AnchorLeft.tileCount != 0) + { + if (rectangle.X == 0) + { + rectangle.X = -1; + ++rectangle.Width; + ++X; + } + int checkStart = tileData2.AnchorLeft.checkStart; + if ((tileData2.AnchorLeft.type & AnchorType.Tree) == AnchorType.Tree) + --checkStart; + if (checkStart < rectangle.Y) + { + rectangle.Width += rectangle.Y - checkStart; + Y += rectangle.Y - checkStart; + rectangle.Y = checkStart; + } + int num13 = checkStart + tileData2.AnchorLeft.tileCount - 1; + if ((tileData2.AnchorLeft.type & AnchorType.Tree) == AnchorType.Tree) + num13 += 2; + int num14 = rectangle.Y + rectangle.Height - 1; + if (num13 > num14) + rectangle.Height += num13 - num14; + } + if (tileData2.AnchorRight.tileCount != 0) + { + if (rectangle.X + rectangle.Width == tileData2.Width) + ++rectangle.Width; + int checkStart = tileData2.AnchorLeft.checkStart; + if ((tileData2.AnchorRight.type & AnchorType.Tree) == AnchorType.Tree) + --checkStart; + if (checkStart < rectangle.Y) + { + rectangle.Width += rectangle.Y - checkStart; + Y += rectangle.Y - checkStart; + rectangle.Y = checkStart; + } + int num15 = checkStart + tileData2.AnchorRight.tileCount - 1; + if ((tileData2.AnchorRight.type & AnchorType.Tree) == AnchorType.Tree) + num15 += 2; + int num16 = rectangle.Y + rectangle.Height - 1; + if (num15 > num16) + rectangle.Height += num15 - num16; + } + if (onlyCheck) + { + TileObject.objectPreview.Reset(); + TileObject.objectPreview.Active = true; + TileObject.objectPreview.Type = (ushort) type; + TileObject.objectPreview.Style = (short) style; + TileObject.objectPreview.Alternate = alternate; + TileObject.objectPreview.Size = new Point16(rectangle.Width, rectangle.Height); + TileObject.objectPreview.ObjectStart = new Point16(X, Y); + TileObject.objectPreview.Coordinates = new Point16(num7 - X, num8 - Y); + } + float num17 = 0.0f; + float num18 = (float) (tileData2.Width * tileData2.Height); + float num19 = 0.0f; + float num20 = 0.0f; + for (int index1 = 0; index1 < tileData2.Width; ++index1) + { + for (int index2 = 0; index2 < tileData2.Height; ++index2) + { + Tile tileSafely = Framing.GetTileSafely(num7 + index1, num8 + index2); + bool flag2 = !tileData2.LiquidPlace(tileSafely); + bool flag3 = false; + if (tileData2.AnchorWall) + { + ++num20; + if (!tileData2.isValidWallAnchor((int) tileSafely.wall)) + flag3 = true; + else + ++num19; + } + bool flag4 = false; + if (tileSafely.active() && (!Main.tileCut[(int) tileSafely.type] || tileSafely.type == (ushort) 484) && !TileID.Sets.BreakableWhenPlacing[(int) tileSafely.type]) + flag4 = true; + if (flag4 | flag2 | flag3) + { + if (onlyCheck) + TileObject.objectPreview[index1 + X, index2 + Y] = 2; + } + else + { + if (onlyCheck) + TileObject.objectPreview[index1 + X, index2 + Y] = 1; + ++num17; + } + } + } + AnchorData anchorBottom = tileData2.AnchorBottom; + if (anchorBottom.tileCount != 0) + { + num20 += (float) anchorBottom.tileCount; + int height = tileData2.Height; + for (int index = 0; index < anchorBottom.tileCount; ++index) + { + int num21 = anchorBottom.checkStart + index; + Tile tileSafely = Framing.GetTileSafely(num7 + num21, num8 + height); + bool flag5 = false; + if (tileSafely.nactive()) + { + if ((anchorBottom.type & AnchorType.SolidTile) == AnchorType.SolidTile && Main.tileSolid[(int) tileSafely.type] && !Main.tileSolidTop[(int) tileSafely.type] && !Main.tileNoAttach[(int) tileSafely.type] && (tileData2.FlattenAnchors || tileSafely.blockType() == 0)) + flag5 = tileData2.isValidTileAnchor((int) tileSafely.type); + if (!flag5 && ((anchorBottom.type & AnchorType.SolidWithTop) == AnchorType.SolidWithTop || (anchorBottom.type & AnchorType.Table) == AnchorType.Table)) + { + if (TileID.Sets.Platforms[(int) tileSafely.type]) + { + int num22 = (int) tileSafely.frameX / TileObjectData.PlatformFrameWidth(); + if (!tileSafely.halfBrick() && WorldGen.PlatformProperTopFrame(tileSafely.frameX)) + flag5 = true; + } + else if (Main.tileSolid[(int) tileSafely.type] && Main.tileSolidTop[(int) tileSafely.type]) + flag5 = true; + } + if (!flag5 && (anchorBottom.type & AnchorType.Table) == AnchorType.Table && !TileID.Sets.Platforms[(int) tileSafely.type] && Main.tileTable[(int) tileSafely.type] && tileSafely.blockType() == 0) + flag5 = true; + if (!flag5 && (anchorBottom.type & AnchorType.SolidSide) == AnchorType.SolidSide && Main.tileSolid[(int) tileSafely.type] && !Main.tileSolidTop[(int) tileSafely.type]) + { + switch (tileSafely.blockType()) + { + case 4: + case 5: + flag5 = tileData2.isValidTileAnchor((int) tileSafely.type); + break; + } + } + if (!flag5 && (anchorBottom.type & AnchorType.AlternateTile) == AnchorType.AlternateTile && tileData2.isValidAlternateAnchor((int) tileSafely.type)) + flag5 = true; + } + else if (!flag5 && (anchorBottom.type & AnchorType.EmptyTile) == AnchorType.EmptyTile) + flag5 = true; + if (!flag5) + { + if (onlyCheck) + TileObject.objectPreview[num21 + X, height + Y] = 2; + } + else + { + if (onlyCheck) + TileObject.objectPreview[num21 + X, height + Y] = 1; + ++num19; + } + } + } + AnchorData anchorTop = tileData2.AnchorTop; + if (anchorTop.tileCount != 0) + { + num20 += (float) anchorTop.tileCount; + int num23 = -1; + for (int index = 0; index < anchorTop.tileCount; ++index) + { + int num24 = anchorTop.checkStart + index; + Tile tileSafely = Framing.GetTileSafely(num7 + num24, num8 + num23); + bool flag6 = false; + if (tileSafely.nactive()) + { + if (Main.tileSolid[(int) tileSafely.type] && !Main.tileSolidTop[(int) tileSafely.type] && !Main.tileNoAttach[(int) tileSafely.type] && (tileData2.FlattenAnchors || tileSafely.blockType() == 0)) + flag6 = tileData2.isValidTileAnchor((int) tileSafely.type); + if (!flag6 && (anchorTop.type & AnchorType.SolidBottom) == AnchorType.SolidBottom && (Main.tileSolid[(int) tileSafely.type] && (!Main.tileSolidTop[(int) tileSafely.type] || TileID.Sets.Platforms[(int) tileSafely.type] && (tileSafely.halfBrick() || tileSafely.topSlope())) || tileSafely.halfBrick() || tileSafely.topSlope()) && !TileID.Sets.NotReallySolid[(int) tileSafely.type] && !tileSafely.bottomSlope()) + flag6 = tileData2.isValidTileAnchor((int) tileSafely.type); + if (!flag6 && (anchorTop.type & AnchorType.SolidSide) == AnchorType.SolidSide && Main.tileSolid[(int) tileSafely.type] && !Main.tileSolidTop[(int) tileSafely.type]) + { + switch (tileSafely.blockType()) + { + case 2: + case 3: + flag6 = tileData2.isValidTileAnchor((int) tileSafely.type); + break; + } + } + if (!flag6 && (anchorTop.type & AnchorType.AlternateTile) == AnchorType.AlternateTile && tileData2.isValidAlternateAnchor((int) tileSafely.type)) + flag6 = true; + } + else if (!flag6 && (anchorTop.type & AnchorType.EmptyTile) == AnchorType.EmptyTile) + flag6 = true; + if (!flag6) + { + if (onlyCheck) + TileObject.objectPreview[num24 + X, num23 + Y] = 2; + } + else + { + if (onlyCheck) + TileObject.objectPreview[num24 + X, num23 + Y] = 1; + ++num19; + } + } + } + AnchorData anchorRight = tileData2.AnchorRight; + if (anchorRight.tileCount != 0) + { + num20 += (float) anchorRight.tileCount; + int width = tileData2.Width; + for (int index = 0; index < anchorRight.tileCount; ++index) + { + int num25 = anchorRight.checkStart + index; + Tile tileSafely1 = Framing.GetTileSafely(num7 + width, num8 + num25); + bool flag7 = false; + if (tileSafely1.nactive()) + { + if (Main.tileSolid[(int) tileSafely1.type] && !Main.tileSolidTop[(int) tileSafely1.type] && !Main.tileNoAttach[(int) tileSafely1.type] && (tileData2.FlattenAnchors || tileSafely1.blockType() == 0)) + flag7 = tileData2.isValidTileAnchor((int) tileSafely1.type); + if (!flag7 && (anchorRight.type & AnchorType.SolidSide) == AnchorType.SolidSide && Main.tileSolid[(int) tileSafely1.type] && !Main.tileSolidTop[(int) tileSafely1.type]) + { + switch (tileSafely1.blockType()) + { + case 2: + case 4: + flag7 = tileData2.isValidTileAnchor((int) tileSafely1.type); + break; + } + } + if (!flag7 && (anchorRight.type & AnchorType.Tree) == AnchorType.Tree && TileID.Sets.IsATreeTrunk[(int) tileSafely1.type]) + { + flag7 = true; + if (index == 0) + { + ++num20; + Tile tileSafely2 = Framing.GetTileSafely(num7 + width, num8 + num25 - 1); + if (tileSafely2.nactive() && TileID.Sets.IsATreeTrunk[(int) tileSafely2.type]) + { + ++num19; + if (onlyCheck) + TileObject.objectPreview[width + X, num25 + Y - 1] = 1; + } + else if (onlyCheck) + TileObject.objectPreview[width + X, num25 + Y - 1] = 2; + } + if (index == anchorRight.tileCount - 1) + { + ++num20; + Tile tileSafely3 = Framing.GetTileSafely(num7 + width, num8 + num25 + 1); + if (tileSafely3.nactive() && TileID.Sets.IsATreeTrunk[(int) tileSafely3.type]) + { + ++num19; + if (onlyCheck) + TileObject.objectPreview[width + X, num25 + Y + 1] = 1; + } + else if (onlyCheck) + TileObject.objectPreview[width + X, num25 + Y + 1] = 2; + } + } + if (!flag7 && (anchorRight.type & AnchorType.AlternateTile) == AnchorType.AlternateTile && tileData2.isValidAlternateAnchor((int) tileSafely1.type)) + flag7 = true; + } + else if (!flag7 && (anchorRight.type & AnchorType.EmptyTile) == AnchorType.EmptyTile) + flag7 = true; + if (!flag7) + { + if (onlyCheck) + TileObject.objectPreview[width + X, num25 + Y] = 2; + } + else + { + if (onlyCheck) + TileObject.objectPreview[width + X, num25 + Y] = 1; + ++num19; + } + } + } + AnchorData anchorLeft = tileData2.AnchorLeft; + if (anchorLeft.tileCount != 0) + { + num20 += (float) anchorLeft.tileCount; + int num26 = -1; + for (int index = 0; index < anchorLeft.tileCount; ++index) + { + int num27 = anchorLeft.checkStart + index; + Tile tileSafely4 = Framing.GetTileSafely(num7 + num26, num8 + num27); + bool flag8 = false; + if (tileSafely4.nactive()) + { + if (Main.tileSolid[(int) tileSafely4.type] && !Main.tileSolidTop[(int) tileSafely4.type] && !Main.tileNoAttach[(int) tileSafely4.type] && (tileData2.FlattenAnchors || tileSafely4.blockType() == 0)) + flag8 = tileData2.isValidTileAnchor((int) tileSafely4.type); + if (!flag8 && (anchorLeft.type & AnchorType.SolidSide) == AnchorType.SolidSide && Main.tileSolid[(int) tileSafely4.type] && !Main.tileSolidTop[(int) tileSafely4.type]) + { + switch (tileSafely4.blockType()) + { + case 3: + case 5: + flag8 = tileData2.isValidTileAnchor((int) tileSafely4.type); + break; + } + } + if (!flag8 && (anchorLeft.type & AnchorType.Tree) == AnchorType.Tree && TileID.Sets.IsATreeTrunk[(int) tileSafely4.type]) + { + flag8 = true; + if (index == 0) + { + ++num20; + Tile tileSafely5 = Framing.GetTileSafely(num7 + num26, num8 + num27 - 1); + if (tileSafely5.nactive() && TileID.Sets.IsATreeTrunk[(int) tileSafely5.type]) + { + ++num19; + if (onlyCheck) + TileObject.objectPreview[num26 + X, num27 + Y - 1] = 1; + } + else if (onlyCheck) + TileObject.objectPreview[num26 + X, num27 + Y - 1] = 2; + } + if (index == anchorLeft.tileCount - 1) + { + ++num20; + Tile tileSafely6 = Framing.GetTileSafely(num7 + num26, num8 + num27 + 1); + if (tileSafely6.nactive() && TileID.Sets.IsATreeTrunk[(int) tileSafely6.type]) + { + ++num19; + if (onlyCheck) + TileObject.objectPreview[num26 + X, num27 + Y + 1] = 1; + } + else if (onlyCheck) + TileObject.objectPreview[num26 + X, num27 + Y + 1] = 2; + } + } + if (!flag8 && (anchorLeft.type & AnchorType.AlternateTile) == AnchorType.AlternateTile && tileData2.isValidAlternateAnchor((int) tileSafely4.type)) + flag8 = true; + } + else if (!flag8 && (anchorLeft.type & AnchorType.EmptyTile) == AnchorType.EmptyTile) + flag8 = true; + if (!flag8) + { + if (onlyCheck) + TileObject.objectPreview[num26 + X, num27 + Y] = 2; + } + else + { + if (onlyCheck) + TileObject.objectPreview[num26 + X, num27 + Y] = 1; + ++num19; + } + } + } + if (tileData2.HookCheckIfCanPlace.hook != null) + { + if (tileData2.HookCheckIfCanPlace.processedCoordinates) + { + Point16 origin1 = tileData2.Origin; + Point16 origin2 = tileData2.Origin; + } + if (tileData2.HookCheckIfCanPlace.hook(x, y, type, style, dir, alternate) == tileData2.HookCheckIfCanPlace.badReturn && tileData2.HookCheckIfCanPlace.badResponse == 0) + { + num19 = 0.0f; + num17 = 0.0f; + TileObject.objectPreview.AllInvalid(); + } + } + float num28 = num19 / num20; + float num29 = num17 / num18; + if ((double) num29 == 1.0 && (double) num20 == 0.0) + { + num28 = 1f; + num29 = 1f; + } + if ((double) num28 == 1.0 && (double) num29 == 1.0) + { + num4 = 1f; + num5 = 1f; + num6 = alternate; + tileObjectData = tileData2; + break; + } + if ((double) num28 > (double) num4 || (double) num28 == (double) num4 && (double) num29 > (double) num5) + { + TileObjectPreviewData.placementCache.CopyFrom(TileObject.objectPreview); + num4 = num28; + num5 = num29; + tileObjectData = tileData2; + num6 = alternate; + } + } + } + int num30 = -1; + if (flag1) + { + if (TileObjectPreviewData.randomCache == null) + TileObjectPreviewData.randomCache = new TileObjectPreviewData(); + bool flag9 = false; + if ((int) TileObjectPreviewData.randomCache.Type == type) + { + Point16 coordinates = TileObjectPreviewData.randomCache.Coordinates; + Point16 objectStart = TileObjectPreviewData.randomCache.ObjectStart; + int num31 = (int) coordinates.X + (int) objectStart.X; + int num32 = (int) coordinates.Y + (int) objectStart.Y; + int num33 = x - (int) tileData1.Origin.X; + int num34 = y - (int) tileData1.Origin.Y; + if (num31 != num33 || num32 != num34) + flag9 = true; + } + else + flag9 = true; + num30 = !flag9 ? TileObjectPreviewData.randomCache.Random : Main.rand.Next(tileData1.RandomStyleRange); + } + if (onlyCheck) + { + if ((double) num4 != 1.0 || (double) num5 != 1.0) + { + TileObject.objectPreview.CopyFrom(TileObjectPreviewData.placementCache); + alternate = num6; + } + TileObject.objectPreview.Random = num30; + if (tileData1.RandomStyleRange > 0) + TileObjectPreviewData.randomCache.CopyFrom(TileObject.objectPreview); + } + if (!onlyCheck) + { + objectData.xCoord = x - (int) tileObjectData.Origin.X; + objectData.yCoord = y - (int) tileObjectData.Origin.Y; + objectData.type = type; + objectData.style = style; + objectData.alternate = alternate; + objectData.random = num30; + } + return (double) num4 == 1.0 && (double) num5 == 1.0; + } + + public static void DrawPreview(SpriteBatch sb, TileObjectPreviewData op, Vector2 position) + { + Point16 coordinates = op.Coordinates; + Texture2D texture = TextureAssets.Tile[(int) op.Type].Value; + TileObjectData tileData = TileObjectData.GetTileData((int) op.Type, (int) op.Style, op.Alternate); + int placementStyle = tileData.CalculatePlacementStyle((int) op.Style, op.Alternate, op.Random); + int num1 = 0; + int drawYoffset = tileData.DrawYOffset; + int drawXoffset = tileData.DrawXOffset; + int num2 = placementStyle + tileData.DrawStyleOffset; + int styleWrapLimit = tileData.StyleWrapLimit; + int styleLineSkip = tileData.StyleLineSkip; + int? nullable; + if (tileData.StyleWrapLimitVisualOverride.HasValue) + { + nullable = tileData.StyleWrapLimitVisualOverride; + styleWrapLimit = nullable.Value; + } + nullable = tileData.styleLineSkipVisualOverride; + if (nullable.HasValue) + { + nullable = tileData.styleLineSkipVisualOverride; + styleLineSkip = nullable.Value; + } + if (styleWrapLimit > 0) + { + num1 = num2 / styleWrapLimit * styleLineSkip; + num2 %= styleWrapLimit; + } + int num3; + int num4; + if (tileData.StyleHorizontal) + { + num3 = tileData.CoordinateFullWidth * num2; + num4 = tileData.CoordinateFullHeight * num1; + } + else + { + num3 = tileData.CoordinateFullWidth * num1; + num4 = tileData.CoordinateFullHeight * num2; + } + for (int x1 = 0; x1 < (int) op.Size.X; ++x1) + { + int x2 = num3 + (x1 - (int) op.ObjectStart.X) * (tileData.CoordinateWidth + tileData.CoordinatePadding); + int y1 = num4; + for (int y2 = 0; y2 < (int) op.Size.Y; ++y2) + { + int i = (int) coordinates.X + x1; + int num5 = (int) coordinates.Y + y2; + if (y2 == 0 && tileData.DrawStepDown != 0 && WorldGen.SolidTile(Framing.GetTileSafely(i, num5 - 1))) + drawYoffset += tileData.DrawStepDown; + Color color1; + switch (op[x1, y2]) + { + case 1: + color1 = Color.White; + break; + case 2: + color1 = Color.Red * 0.7f; + break; + default: + continue; + } + Color color2 = color1 * 0.5f; + if (x1 >= (int) op.ObjectStart.X && x1 < (int) op.ObjectStart.X + tileData.Width && y2 >= (int) op.ObjectStart.Y && y2 < (int) op.ObjectStart.Y + tileData.Height) + { + SpriteEffects effects = SpriteEffects.None; + if (tileData.DrawFlipHorizontal && i % 2 == 0) + effects |= SpriteEffects.FlipHorizontally; + if (tileData.DrawFlipVertical && num5 % 2 == 0) + effects |= SpriteEffects.FlipVertically; + Rectangle rectangle = new Rectangle(x2, y1, tileData.CoordinateWidth, tileData.CoordinateHeights[y2 - (int) op.ObjectStart.Y]); + sb.Draw(texture, new Vector2((float) (i * 16 - (int) ((double) position.X + (double) (tileData.CoordinateWidth - 16) / 2.0) + drawXoffset), (float) (num5 * 16 - (int) position.Y + drawYoffset)), new Rectangle?(rectangle), color2, 0.0f, Vector2.Zero, 1f, effects, 0.0f); + y1 += tileData.CoordinateHeights[y2 - (int) op.ObjectStart.Y] + tileData.CoordinatePadding; + } + } + } + } + } +} diff --git a/TimeLogger.cs b/TimeLogger.cs new file mode 100644 index 0000000..63e73cf --- /dev/null +++ b/TimeLogger.cs @@ -0,0 +1,306 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.TimeLogger +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Diagnostics; +using System.IO; +using System.IO.Compression; +using System.Text; + +namespace Terraria +{ + public static class TimeLogger + { + private static StreamWriter logWriter; + private static StringBuilder logBuilder; + private static int framesToLog; + private static int currentFrame; + private static bool startLoggingNextFrame; + private static bool endLoggingThisFrame; + private static bool currentlyLogging; + private static Stopwatch detailedDrawTimer; + private static double lastDetailedDrawTime; + private static TimeLogger.TimeLogData[] renderTimes; + private static TimeLogger.TimeLogData[] drawTimes; + private static TimeLogger.TimeLogData[] lightingTimes; + private static TimeLogger.TimeLogData[] detailedDrawTimes; + private const int maxTimeDelay = 100; + + public static void Initialize() + { + TimeLogger.currentFrame = 0; + TimeLogger.framesToLog = -1; + TimeLogger.detailedDrawTimer = new Stopwatch(); + TimeLogger.renderTimes = new TimeLogger.TimeLogData[10]; + TimeLogger.drawTimes = new TimeLogger.TimeLogData[10]; + TimeLogger.lightingTimes = new TimeLogger.TimeLogData[5]; + TimeLogger.detailedDrawTimes = new TimeLogger.TimeLogData[40]; + for (int index = 0; index < TimeLogger.renderTimes.Length; ++index) + TimeLogger.renderTimes[index].logText = string.Format("Render #{0}", (object) index); + TimeLogger.drawTimes[0].logText = "Drawing Solid Tiles"; + TimeLogger.drawTimes[1].logText = "Drawing Non-Solid Tiles"; + TimeLogger.drawTimes[2].logText = "Drawing Wall Tiles"; + TimeLogger.drawTimes[3].logText = "Drawing Underground Background"; + TimeLogger.drawTimes[4].logText = "Drawing Water Tiles"; + TimeLogger.drawTimes[5].logText = "Drawing Black Tiles"; + TimeLogger.lightingTimes[0].logText = "Lighting Initialization"; + for (int index = 1; index < TimeLogger.lightingTimes.Length; ++index) + TimeLogger.lightingTimes[index].logText = string.Format("Lighting Pass #{0}", (object) index); + TimeLogger.detailedDrawTimes[0].logText = "Finding color tiles"; + TimeLogger.detailedDrawTimes[1].logText = "Initial Map Update"; + TimeLogger.detailedDrawTimes[2].logText = "Finding Waterfalls"; + TimeLogger.detailedDrawTimes[3].logText = "Map Section Update"; + TimeLogger.detailedDrawTimes[4].logText = "Map Update"; + TimeLogger.detailedDrawTimes[5].logText = "Section Framing"; + TimeLogger.detailedDrawTimes[6].logText = "Sky Background"; + TimeLogger.detailedDrawTimes[7].logText = "Sun, Moon & Stars"; + TimeLogger.detailedDrawTimes[8].logText = "Surface Background"; + TimeLogger.detailedDrawTimes[9].logText = "Map"; + TimeLogger.detailedDrawTimes[10].logText = "Player Chat"; + TimeLogger.detailedDrawTimes[11].logText = "Water Target"; + TimeLogger.detailedDrawTimes[12].logText = "Background Target"; + TimeLogger.detailedDrawTimes[13].logText = "Black Tile Target"; + TimeLogger.detailedDrawTimes[14].logText = "Wall Target"; + TimeLogger.detailedDrawTimes[15].logText = "Non Solid Tile Target"; + TimeLogger.detailedDrawTimes[16].logText = "Waterfalls"; + TimeLogger.detailedDrawTimes[17].logText = "Solid Tile Target"; + TimeLogger.detailedDrawTimes[18].logText = "NPCs (Behind Tiles)"; + TimeLogger.detailedDrawTimes[19].logText = "NPC"; + TimeLogger.detailedDrawTimes[20].logText = "Projectiles"; + TimeLogger.detailedDrawTimes[21].logText = "Players"; + TimeLogger.detailedDrawTimes[22].logText = "Items"; + TimeLogger.detailedDrawTimes[23].logText = "Rain"; + TimeLogger.detailedDrawTimes[24].logText = "Gore"; + TimeLogger.detailedDrawTimes[25].logText = "Dust"; + TimeLogger.detailedDrawTimes[26].logText = "Water Target"; + TimeLogger.detailedDrawTimes[27].logText = "Interface"; + TimeLogger.detailedDrawTimes[28].logText = "Render Solid Tiles"; + TimeLogger.detailedDrawTimes[29].logText = "Render Non Solid Tiles"; + TimeLogger.detailedDrawTimes[30].logText = "Render Black Tiles"; + TimeLogger.detailedDrawTimes[31].logText = "Render Water/Wires"; + TimeLogger.detailedDrawTimes[32].logText = "Render Walls"; + TimeLogger.detailedDrawTimes[33].logText = "Render Backgrounds"; + TimeLogger.detailedDrawTimes[34].logText = "Drawing Wires"; + TimeLogger.detailedDrawTimes[35].logText = "Render layers up to Players"; + TimeLogger.detailedDrawTimes[36].logText = "Render Items/Rain/Gore/Dust/Water/Map"; + TimeLogger.detailedDrawTimes[37].logText = "Render Interface"; + for (int index = 0; index < TimeLogger.detailedDrawTimes.Length; ++index) + { + if (string.IsNullOrEmpty(TimeLogger.detailedDrawTimes[index].logText)) + TimeLogger.detailedDrawTimes[index].logText = string.Format("Unnamed detailed draw #{0}", (object) index); + } + } + + public static void Start() + { + if (TimeLogger.currentlyLogging) + { + TimeLogger.endLoggingThisFrame = true; + TimeLogger.startLoggingNextFrame = false; + } + else + { + TimeLogger.startLoggingNextFrame = true; + TimeLogger.endLoggingThisFrame = false; + Main.NewText("Detailed logging started", (byte) 250, (byte) 250, (byte) 0); + } + } + + public static void NewDrawFrame() + { + for (int index = 0; index < TimeLogger.renderTimes.Length; ++index) + TimeLogger.renderTimes[index].usedLastDraw = false; + for (int index = 0; index < TimeLogger.drawTimes.Length; ++index) + TimeLogger.drawTimes[index].usedLastDraw = false; + for (int index = 0; index < TimeLogger.lightingTimes.Length; ++index) + TimeLogger.lightingTimes[index].usedLastDraw = false; + if (TimeLogger.startLoggingNextFrame) + { + TimeLogger.startLoggingNextFrame = false; + DateTime now = DateTime.Now; + string path = Main.SavePath + Path.DirectorySeparatorChar.ToString() + "TerrariaDrawLog.7z"; + try + { + TimeLogger.logWriter = new StreamWriter((Stream) new GZipStream((Stream) new FileStream(path, FileMode.Create), CompressionMode.Compress)); + TimeLogger.logBuilder = new StringBuilder(5000); + TimeLogger.framesToLog = 600; + TimeLogger.currentFrame = 1; + TimeLogger.currentlyLogging = true; + } + catch + { + Main.NewText("Detailed logging could not be started.", (byte) 250, (byte) 250, (byte) 0); + } + } + if (TimeLogger.currentlyLogging) + TimeLogger.logBuilder.AppendLine(string.Format("Start of Frame #{0}", (object) TimeLogger.currentFrame)); + TimeLogger.detailedDrawTimer.Restart(); + TimeLogger.lastDetailedDrawTime = TimeLogger.detailedDrawTimer.Elapsed.TotalMilliseconds; + } + + public static void EndDrawFrame() + { + if (TimeLogger.currentFrame <= TimeLogger.framesToLog) + { + TimeLogger.logBuilder.AppendLine(string.Format("End of Frame #{0}", (object) TimeLogger.currentFrame)); + TimeLogger.logBuilder.AppendLine(); + if (TimeLogger.endLoggingThisFrame) + { + TimeLogger.endLoggingThisFrame = false; + TimeLogger.logBuilder.AppendLine("Logging ended early"); + TimeLogger.currentFrame = TimeLogger.framesToLog; + } + if (TimeLogger.logBuilder.Length > 4000) + { + TimeLogger.logWriter.Write(TimeLogger.logBuilder.ToString()); + TimeLogger.logBuilder.Clear(); + } + ++TimeLogger.currentFrame; + if (TimeLogger.currentFrame > TimeLogger.framesToLog) + { + Main.NewText("Detailed logging ended.", (byte) 250, (byte) 250, (byte) 0); + TimeLogger.logWriter.Write(TimeLogger.logBuilder.ToString()); + TimeLogger.logBuilder.Clear(); + TimeLogger.logBuilder = (StringBuilder) null; + TimeLogger.logWriter.Flush(); + TimeLogger.logWriter.Close(); + TimeLogger.logWriter = (StreamWriter) null; + TimeLogger.framesToLog = -1; + TimeLogger.currentFrame = 0; + TimeLogger.currentlyLogging = false; + } + } + TimeLogger.detailedDrawTimer.Stop(); + } + + private static void UpdateTime(TimeLogger.TimeLogData[] times, int type, double time) + { + bool flag = false; + if (times[type].resetMaxTime > 0) + --times[type].resetMaxTime; + else + times[type].timeMax = 0.0f; + times[type].time = (float) time; + if ((double) times[type].timeMax < time) + { + flag = true; + times[type].timeMax = (float) time; + times[type].resetMaxTime = 100; + } + times[type].usedLastDraw = true; + if (TimeLogger.currentFrame == 0) + return; + TimeLogger.logBuilder.AppendLine(string.Format(" {0} : {1:F4}ms {2}", (object) times[type].logText, (object) time, flag ? (object) " - New Maximum" : (object) string.Empty)); + } + + public static void RenderTime(int renderType, double timeElapsed) + { + if (renderType < 0 || renderType >= TimeLogger.renderTimes.Length) + return; + TimeLogger.UpdateTime(TimeLogger.renderTimes, renderType, timeElapsed); + } + + public static float GetRenderTime(int renderType) => TimeLogger.renderTimes[renderType].time; + + public static float GetRenderMax(int renderType) => TimeLogger.renderTimes[renderType].timeMax; + + public static void DrawTime(int drawType, double timeElapsed) + { + if (drawType < 0 || drawType >= TimeLogger.drawTimes.Length) + return; + TimeLogger.UpdateTime(TimeLogger.drawTimes, drawType, timeElapsed); + } + + public static float GetDrawTime(int drawType) => TimeLogger.drawTimes[drawType].time; + + public static float GetDrawTotal() + { + float num = 0.0f; + for (int index = 0; index < TimeLogger.drawTimes.Length; ++index) + num += TimeLogger.drawTimes[index].time; + return num; + } + + public static void LightingTime(int lightingType, double timeElapsed) + { + if (lightingType < 0 || lightingType >= TimeLogger.lightingTimes.Length) + return; + TimeLogger.UpdateTime(TimeLogger.lightingTimes, lightingType, timeElapsed); + } + + public static float GetLightingTime(int lightingType) => TimeLogger.lightingTimes[lightingType].time; + + public static float GetLightingTotal() + { + float num = 0.0f; + for (int index = 0; index < TimeLogger.lightingTimes.Length; ++index) + num += TimeLogger.lightingTimes[index].time; + return num; + } + + public static void DetailedDrawReset() => TimeLogger.lastDetailedDrawTime = TimeLogger.detailedDrawTimer.Elapsed.TotalMilliseconds; + + public static void DetailedDrawTime(int detailedDrawType) + { + if (detailedDrawType < 0 || detailedDrawType >= TimeLogger.detailedDrawTimes.Length) + return; + double totalMilliseconds = TimeLogger.detailedDrawTimer.Elapsed.TotalMilliseconds; + double time = totalMilliseconds - TimeLogger.lastDetailedDrawTime; + TimeLogger.lastDetailedDrawTime = totalMilliseconds; + TimeLogger.UpdateTime(TimeLogger.detailedDrawTimes, detailedDrawType, time); + } + + public static float GetDetailedDrawTime(int detailedDrawType) => TimeLogger.detailedDrawTimes[detailedDrawType].time; + + public static float GetDetailedDrawTotal() + { + float num = 0.0f; + for (int index = 0; index < TimeLogger.detailedDrawTimes.Length; ++index) + { + if (TimeLogger.detailedDrawTimes[index].usedLastDraw) + num += TimeLogger.detailedDrawTimes[index].time; + } + return num; + } + + public static void MenuDrawTime(double timeElapsed) + { + if (!TimeLogger.currentlyLogging) + return; + TimeLogger.logBuilder.AppendLine(string.Format("Menu Render Time : {0:F4}", (object) timeElapsed)); + } + + public static void SplashDrawTime(double timeElapsed) + { + if (!TimeLogger.currentlyLogging) + return; + TimeLogger.logBuilder.AppendLine(string.Format("Splash Render Time : {0:F4}", (object) timeElapsed)); + } + + public static void MapDrawTime(double timeElapsed) + { + if (!TimeLogger.currentlyLogging) + return; + TimeLogger.logBuilder.AppendLine(string.Format("Full Screen Map Render Time : {0:F4}", (object) timeElapsed)); + } + + public static void DrawException(Exception e) + { + if (!TimeLogger.currentlyLogging) + return; + TimeLogger.logBuilder.AppendLine(e.ToString()); + } + + private struct TimeLogData + { + public float time; + public float timeMax; + public int resetMaxTime; + public bool usedLastDraw; + public string logText; + } + } +} diff --git a/UI/AchievementAdvisor.cs b/UI/AchievementAdvisor.cs new file mode 100644 index 0000000..dd65cf2 --- /dev/null +++ b/UI/AchievementAdvisor.cs @@ -0,0 +1,399 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.AchievementAdvisor +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.Achievements; +using Terraria.GameInput; + +namespace Terraria.UI +{ + public class AchievementAdvisor + { + private List _cards = new List(); + private Asset _achievementsTexture; + private Asset _achievementsBorderTexture; + private Asset _achievementsBorderMouseHoverFatTexture; + private Asset _achievementsBorderMouseHoverThinTexture; + private AchievementAdvisorCard _hoveredCard; + + public bool CanDrawAboveCoins => Main.screenWidth >= 1000 && !PlayerInput.UsingGamepad; + + public void LoadContent() + { + this._achievementsTexture = Main.Assets.Request("Images/UI/Achievements", (AssetRequestMode) 1); + this._achievementsBorderTexture = Main.Assets.Request("Images/UI/Achievement_Borders", (AssetRequestMode) 1); + this._achievementsBorderMouseHoverFatTexture = Main.Assets.Request("Images/UI/Achievement_Borders_MouseHover", (AssetRequestMode) 1); + this._achievementsBorderMouseHoverThinTexture = Main.Assets.Request("Images/UI/Achievement_Borders_MouseHoverThin", (AssetRequestMode) 1); + } + + public void Draw(SpriteBatch spriteBatch) + { + } + + public void DrawOneAchievement(SpriteBatch spriteBatch, Vector2 position, bool large) + { + List bestCards = this.GetBestCards(1); + if (bestCards.Count < 1) + return; + AchievementAdvisorCard achievementAdvisorCard = bestCards[0]; + float scale = 0.35f; + if (large) + scale = 0.75f; + this._hoveredCard = (AchievementAdvisorCard) null; + bool hovered; + this.DrawCard(bestCards[0], spriteBatch, position + new Vector2(8f) * scale, scale, out hovered); + if (!hovered) + return; + this._hoveredCard = achievementAdvisorCard; + if (PlayerInput.IgnoreMouseInterface) + return; + Main.player[Main.myPlayer].mouseInterface = true; + if (!Main.mouseLeft || !Main.mouseLeftRelease) + return; + Main.ingameOptionsWindow = false; + IngameFancyUI.OpenAchievementsAndGoto(this._hoveredCard.achievement); + } + + public void Update() => this._hoveredCard = (AchievementAdvisorCard) null; + + public void DrawOptionsPanel( + SpriteBatch spriteBatch, + Vector2 leftPosition, + Vector2 rightPosition) + { + List bestCards = this.GetBestCards(); + this._hoveredCard = (AchievementAdvisorCard) null; + int num = bestCards.Count; + if (num > 5) + num = 5; + bool hovered; + for (int index = 0; index < num; ++index) + { + this.DrawCard(bestCards[index], spriteBatch, leftPosition + new Vector2((float) (42 * index), 0.0f), 0.5f, out hovered); + if (hovered) + this._hoveredCard = bestCards[index]; + } + for (int index = 5; index < bestCards.Count; ++index) + { + this.DrawCard(bestCards[index], spriteBatch, rightPosition + new Vector2((float) (42 * index), 0.0f), 0.5f, out hovered); + if (hovered) + this._hoveredCard = bestCards[index]; + } + if (this._hoveredCard == null) + return; + if (this._hoveredCard.achievement.IsCompleted) + { + this._hoveredCard = (AchievementAdvisorCard) null; + } + else + { + if (PlayerInput.IgnoreMouseInterface) + return; + Main.player[Main.myPlayer].mouseInterface = true; + if (!Main.mouseLeft || !Main.mouseLeftRelease) + return; + Main.ingameOptionsWindow = false; + IngameFancyUI.OpenAchievementsAndGoto(this._hoveredCard.achievement); + } + } + + public void DrawMouseHover() + { + if (this._hoveredCard == null) + return; + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, (BlendState) null, (SamplerState) null, (DepthStencilState) null, (RasterizerState) null, (Effect) null, Main.UIScaleMatrix); + PlayerInput.SetZoom_UI(); + Item obj = new Item(); + obj.SetDefaults(0, true); + obj.SetNameOverride(this._hoveredCard.achievement.FriendlyName.Value); + obj.ToolTip = ItemTooltip.FromLanguageKey(this._hoveredCard.achievement.Description.Key); + obj.type = 1; + obj.scale = 0.0f; + obj.rare = 10; + obj.value = -1; + Main.HoverItem = obj; + Main.instance.MouseText(""); + Main.mouseText = true; + } + + private void DrawCard( + AchievementAdvisorCard card, + SpriteBatch spriteBatch, + Vector2 position, + float scale, + out bool hovered) + { + hovered = false; + if (Main.MouseScreen.Between(position, position + card.frame.Size() * scale)) + { + Main.LocalPlayer.mouseInterface = true; + hovered = true; + } + Color color = Color.White; + if (!hovered) + color = new Color(220, 220, 220, 220); + Vector2 vector2_1 = new Vector2(-4f) * scale; + Vector2 vector2_2 = new Vector2(-8f) * scale; + Texture2D texture = this._achievementsBorderMouseHoverFatTexture.Value; + if ((double) scale > 0.5) + { + texture = this._achievementsBorderMouseHoverThinTexture.Value; + vector2_2 = new Vector2(-5f) * scale; + } + Rectangle frame = card.frame; + frame.X += 528; + spriteBatch.Draw(this._achievementsTexture.Value, position, new Rectangle?(frame), color, 0.0f, Vector2.Zero, scale, SpriteEffects.None, 0.0f); + spriteBatch.Draw(this._achievementsBorderTexture.Value, position + vector2_1, new Rectangle?(), color, 0.0f, Vector2.Zero, scale, SpriteEffects.None, 0.0f); + if (!hovered) + return; + spriteBatch.Draw(texture, position + vector2_2, new Rectangle?(), Main.OurFavoriteColor, 0.0f, Vector2.Zero, scale, SpriteEffects.None, 0.0f); + } + + private List GetBestCards(int cardsAmount = 10) + { + List achievementAdvisorCardList = new List(); + for (int index = 0; index < this._cards.Count; ++index) + { + AchievementAdvisorCard card = this._cards[index]; + if (!card.achievement.IsCompleted && card.IsAchievableInWorld()) + { + achievementAdvisorCardList.Add(card); + if (achievementAdvisorCardList.Count >= cardsAmount) + break; + } + } + return achievementAdvisorCardList; + } + + public void Initialize() + { + float num1 = 1f; + List cards1 = this._cards; + Achievement achievement1 = Main.Achievements.GetAchievement("TIMBER"); + double num2 = (double) num1; + float num3 = (float) (num2 + 1.0); + AchievementAdvisorCard achievementAdvisorCard1 = new AchievementAdvisorCard(achievement1, (float) num2); + cards1.Add(achievementAdvisorCard1); + List cards2 = this._cards; + Achievement achievement2 = Main.Achievements.GetAchievement("BENCHED"); + double num4 = (double) num3; + float num5 = (float) (num4 + 1.0); + AchievementAdvisorCard achievementAdvisorCard2 = new AchievementAdvisorCard(achievement2, (float) num4); + cards2.Add(achievementAdvisorCard2); + List cards3 = this._cards; + Achievement achievement3 = Main.Achievements.GetAchievement("OBTAIN_HAMMER"); + double num6 = (double) num5; + float num7 = (float) (num6 + 1.0); + AchievementAdvisorCard achievementAdvisorCard3 = new AchievementAdvisorCard(achievement3, (float) num6); + cards3.Add(achievementAdvisorCard3); + List cards4 = this._cards; + Achievement achievement4 = Main.Achievements.GetAchievement("NO_HOBO"); + double num8 = (double) num7; + float num9 = (float) (num8 + 1.0); + AchievementAdvisorCard achievementAdvisorCard4 = new AchievementAdvisorCard(achievement4, (float) num8); + cards4.Add(achievementAdvisorCard4); + List cards5 = this._cards; + Achievement achievement5 = Main.Achievements.GetAchievement("YOU_CAN_DO_IT"); + double num10 = (double) num9; + float num11 = (float) (num10 + 1.0); + AchievementAdvisorCard achievementAdvisorCard5 = new AchievementAdvisorCard(achievement5, (float) num10); + cards5.Add(achievementAdvisorCard5); + List cards6 = this._cards; + Achievement achievement6 = Main.Achievements.GetAchievement("OOO_SHINY"); + double num12 = (double) num11; + float num13 = (float) (num12 + 1.0); + AchievementAdvisorCard achievementAdvisorCard6 = new AchievementAdvisorCard(achievement6, (float) num12); + cards6.Add(achievementAdvisorCard6); + List cards7 = this._cards; + Achievement achievement7 = Main.Achievements.GetAchievement("HEAVY_METAL"); + double num14 = (double) num13; + float num15 = (float) (num14 + 1.0); + AchievementAdvisorCard achievementAdvisorCard7 = new AchievementAdvisorCard(achievement7, (float) num14); + cards7.Add(achievementAdvisorCard7); + List cards8 = this._cards; + Achievement achievement8 = Main.Achievements.GetAchievement("MATCHING_ATTIRE"); + double num16 = (double) num15; + float num17 = (float) (num16 + 1.0); + AchievementAdvisorCard achievementAdvisorCard8 = new AchievementAdvisorCard(achievement8, (float) num16); + cards8.Add(achievementAdvisorCard8); + List cards9 = this._cards; + Achievement achievement9 = Main.Achievements.GetAchievement("HEART_BREAKER"); + double num18 = (double) num17; + float num19 = (float) (num18 + 1.0); + AchievementAdvisorCard achievementAdvisorCard9 = new AchievementAdvisorCard(achievement9, (float) num18); + cards9.Add(achievementAdvisorCard9); + List cards10 = this._cards; + Achievement achievement10 = Main.Achievements.GetAchievement("I_AM_LOOT"); + double num20 = (double) num19; + float num21 = (float) (num20 + 1.0); + AchievementAdvisorCard achievementAdvisorCard10 = new AchievementAdvisorCard(achievement10, (float) num20); + cards10.Add(achievementAdvisorCard10); + List cards11 = this._cards; + Achievement achievement11 = Main.Achievements.GetAchievement("HOLD_ON_TIGHT"); + double num22 = (double) num21; + float num23 = (float) (num22 + 1.0); + AchievementAdvisorCard achievementAdvisorCard11 = new AchievementAdvisorCard(achievement11, (float) num22); + cards11.Add(achievementAdvisorCard11); + List cards12 = this._cards; + Achievement achievement12 = Main.Achievements.GetAchievement("STAR_POWER"); + double num24 = (double) num23; + float num25 = (float) (num24 + 1.0); + AchievementAdvisorCard achievementAdvisorCard12 = new AchievementAdvisorCard(achievement12, (float) num24); + cards12.Add(achievementAdvisorCard12); + List cards13 = this._cards; + Achievement achievement13 = Main.Achievements.GetAchievement("EYE_ON_YOU"); + double num26 = (double) num25; + float num27 = (float) (num26 + 1.0); + AchievementAdvisorCard achievementAdvisorCard13 = new AchievementAdvisorCard(achievement13, (float) num26); + cards13.Add(achievementAdvisorCard13); + List cards14 = this._cards; + Achievement achievement14 = Main.Achievements.GetAchievement("SMASHING_POPPET"); + double num28 = (double) num27; + float num29 = (float) (num28 + 1.0); + AchievementAdvisorCard achievementAdvisorCard14 = new AchievementAdvisorCard(achievement14, (float) num28); + cards14.Add(achievementAdvisorCard14); + List cards15 = this._cards; + Achievement achievement15 = Main.Achievements.GetAchievement("WHERES_MY_HONEY"); + double num30 = (double) num29; + float num31 = (float) (num30 + 1.0); + AchievementAdvisorCard achievementAdvisorCard15 = new AchievementAdvisorCard(achievement15, (float) num30); + cards15.Add(achievementAdvisorCard15); + List cards16 = this._cards; + Achievement achievement16 = Main.Achievements.GetAchievement("STING_OPERATION"); + double num32 = (double) num31; + float num33 = (float) (num32 + 1.0); + AchievementAdvisorCard achievementAdvisorCard16 = new AchievementAdvisorCard(achievement16, (float) num32); + cards16.Add(achievementAdvisorCard16); + List cards17 = this._cards; + Achievement achievement17 = Main.Achievements.GetAchievement("BONED"); + double num34 = (double) num33; + float num35 = (float) (num34 + 1.0); + AchievementAdvisorCard achievementAdvisorCard17 = new AchievementAdvisorCard(achievement17, (float) num34); + cards17.Add(achievementAdvisorCard17); + List cards18 = this._cards; + Achievement achievement18 = Main.Achievements.GetAchievement("DUNGEON_HEIST"); + double num36 = (double) num35; + float num37 = (float) (num36 + 1.0); + AchievementAdvisorCard achievementAdvisorCard18 = new AchievementAdvisorCard(achievement18, (float) num36); + cards18.Add(achievementAdvisorCard18); + List cards19 = this._cards; + Achievement achievement19 = Main.Achievements.GetAchievement("ITS_GETTING_HOT_IN_HERE"); + double num38 = (double) num37; + float num39 = (float) (num38 + 1.0); + AchievementAdvisorCard achievementAdvisorCard19 = new AchievementAdvisorCard(achievement19, (float) num38); + cards19.Add(achievementAdvisorCard19); + List cards20 = this._cards; + Achievement achievement20 = Main.Achievements.GetAchievement("MINER_FOR_FIRE"); + double num40 = (double) num39; + float num41 = (float) (num40 + 1.0); + AchievementAdvisorCard achievementAdvisorCard20 = new AchievementAdvisorCard(achievement20, (float) num40); + cards20.Add(achievementAdvisorCard20); + List cards21 = this._cards; + Achievement achievement21 = Main.Achievements.GetAchievement("STILL_HUNGRY"); + double num42 = (double) num41; + float num43 = (float) (num42 + 1.0); + AchievementAdvisorCard achievementAdvisorCard21 = new AchievementAdvisorCard(achievement21, (float) num42); + cards21.Add(achievementAdvisorCard21); + List cards22 = this._cards; + Achievement achievement22 = Main.Achievements.GetAchievement("ITS_HARD"); + double num44 = (double) num43; + float num45 = (float) (num44 + 1.0); + AchievementAdvisorCard achievementAdvisorCard22 = new AchievementAdvisorCard(achievement22, (float) num44); + cards22.Add(achievementAdvisorCard22); + List cards23 = this._cards; + Achievement achievement23 = Main.Achievements.GetAchievement("BEGONE_EVIL"); + double num46 = (double) num45; + float num47 = (float) (num46 + 1.0); + AchievementAdvisorCard achievementAdvisorCard23 = new AchievementAdvisorCard(achievement23, (float) num46); + cards23.Add(achievementAdvisorCard23); + List cards24 = this._cards; + Achievement achievement24 = Main.Achievements.GetAchievement("EXTRA_SHINY"); + double num48 = (double) num47; + float num49 = (float) (num48 + 1.0); + AchievementAdvisorCard achievementAdvisorCard24 = new AchievementAdvisorCard(achievement24, (float) num48); + cards24.Add(achievementAdvisorCard24); + List cards25 = this._cards; + Achievement achievement25 = Main.Achievements.GetAchievement("HEAD_IN_THE_CLOUDS"); + double num50 = (double) num49; + float num51 = (float) (num50 + 1.0); + AchievementAdvisorCard achievementAdvisorCard25 = new AchievementAdvisorCard(achievement25, (float) num50); + cards25.Add(achievementAdvisorCard25); + List cards26 = this._cards; + Achievement achievement26 = Main.Achievements.GetAchievement("BUCKETS_OF_BOLTS"); + double num52 = (double) num51; + float num53 = (float) (num52 + 1.0); + AchievementAdvisorCard achievementAdvisorCard26 = new AchievementAdvisorCard(achievement26, (float) num52); + cards26.Add(achievementAdvisorCard26); + List cards27 = this._cards; + Achievement achievement27 = Main.Achievements.GetAchievement("DRAX_ATTAX"); + double num54 = (double) num53; + float num55 = (float) (num54 + 1.0); + AchievementAdvisorCard achievementAdvisorCard27 = new AchievementAdvisorCard(achievement27, (float) num54); + cards27.Add(achievementAdvisorCard27); + List cards28 = this._cards; + Achievement achievement28 = Main.Achievements.GetAchievement("PHOTOSYNTHESIS"); + double num56 = (double) num55; + float num57 = (float) (num56 + 1.0); + AchievementAdvisorCard achievementAdvisorCard28 = new AchievementAdvisorCard(achievement28, (float) num56); + cards28.Add(achievementAdvisorCard28); + List cards29 = this._cards; + Achievement achievement29 = Main.Achievements.GetAchievement("GET_A_LIFE"); + double num58 = (double) num57; + float num59 = (float) (num58 + 1.0); + AchievementAdvisorCard achievementAdvisorCard29 = new AchievementAdvisorCard(achievement29, (float) num58); + cards29.Add(achievementAdvisorCard29); + List cards30 = this._cards; + Achievement achievement30 = Main.Achievements.GetAchievement("THE_GREAT_SOUTHERN_PLANTKILL"); + double num60 = (double) num59; + float num61 = (float) (num60 + 1.0); + AchievementAdvisorCard achievementAdvisorCard30 = new AchievementAdvisorCard(achievement30, (float) num60); + cards30.Add(achievementAdvisorCard30); + List cards31 = this._cards; + Achievement achievement31 = Main.Achievements.GetAchievement("TEMPLE_RAIDER"); + double num62 = (double) num61; + float num63 = (float) (num62 + 1.0); + AchievementAdvisorCard achievementAdvisorCard31 = new AchievementAdvisorCard(achievement31, (float) num62); + cards31.Add(achievementAdvisorCard31); + List cards32 = this._cards; + Achievement achievement32 = Main.Achievements.GetAchievement("LIHZAHRDIAN_IDOL"); + double num64 = (double) num63; + float num65 = (float) (num64 + 1.0); + AchievementAdvisorCard achievementAdvisorCard32 = new AchievementAdvisorCard(achievement32, (float) num64); + cards32.Add(achievementAdvisorCard32); + List cards33 = this._cards; + Achievement achievement33 = Main.Achievements.GetAchievement("ROBBING_THE_GRAVE"); + double num66 = (double) num65; + float num67 = (float) (num66 + 1.0); + AchievementAdvisorCard achievementAdvisorCard33 = new AchievementAdvisorCard(achievement33, (float) num66); + cards33.Add(achievementAdvisorCard33); + List cards34 = this._cards; + Achievement achievement34 = Main.Achievements.GetAchievement("OBSESSIVE_DEVOTION"); + double num68 = (double) num67; + float num69 = (float) (num68 + 1.0); + AchievementAdvisorCard achievementAdvisorCard34 = new AchievementAdvisorCard(achievement34, (float) num68); + cards34.Add(achievementAdvisorCard34); + List cards35 = this._cards; + Achievement achievement35 = Main.Achievements.GetAchievement("STAR_DESTROYER"); + double num70 = (double) num69; + float num71 = (float) (num70 + 1.0); + AchievementAdvisorCard achievementAdvisorCard35 = new AchievementAdvisorCard(achievement35, (float) num70); + cards35.Add(achievementAdvisorCard35); + List cards36 = this._cards; + Achievement achievement36 = Main.Achievements.GetAchievement("CHAMPION_OF_TERRARIA"); + double num72 = (double) num71; + float num73 = (float) (num72 + 1.0); + AchievementAdvisorCard achievementAdvisorCard36 = new AchievementAdvisorCard(achievement36, (float) num72); + cards36.Add(achievementAdvisorCard36); + this._cards.OrderBy((Func) (x => x.order)); + } + } +} diff --git a/UI/AchievementAdvisorCard.cs b/UI/AchievementAdvisorCard.cs new file mode 100644 index 0000000..a0abcdd --- /dev/null +++ b/UI/AchievementAdvisorCard.cs @@ -0,0 +1,38 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.AchievementAdvisorCard +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.Achievements; + +namespace Terraria.UI +{ + public class AchievementAdvisorCard + { + private const int _iconSize = 64; + private const int _iconSizeWithSpace = 66; + private const int _iconsPerRow = 8; + public Achievement achievement; + public float order; + public Rectangle frame; + public int achievementIndex; + + public AchievementAdvisorCard(Achievement achievement, float order) + { + this.achievement = achievement; + this.order = order; + this.achievementIndex = Main.Achievements.GetIconIndex(achievement.Name); + this.frame = new Rectangle(this.achievementIndex % 8 * 66, this.achievementIndex / 8 * 66, 64, 64); + } + + public bool IsAchievableInWorld() + { + string name = this.achievement.Name; + if (name == "MASTERMIND") + return WorldGen.crimson; + return !(name == "WORM_FODDER") || !WorldGen.crimson; + } + } +} diff --git a/UI/Alignment.cs b/UI/Alignment.cs new file mode 100644 index 0000000..5018641 --- /dev/null +++ b/UI/Alignment.cs @@ -0,0 +1,33 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.Alignment +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.UI +{ + public struct Alignment + { + public static readonly Alignment TopLeft = new Alignment(0.0f, 0.0f); + public static readonly Alignment Top = new Alignment(0.5f, 0.0f); + public static readonly Alignment TopRight = new Alignment(1f, 0.0f); + public static readonly Alignment Left = new Alignment(0.0f, 0.5f); + public static readonly Alignment Center = new Alignment(0.5f, 0.5f); + public static readonly Alignment Right = new Alignment(1f, 0.5f); + public static readonly Alignment BottomLeft = new Alignment(0.0f, 1f); + public static readonly Alignment Bottom = new Alignment(0.5f, 1f); + public static readonly Alignment BottomRight = new Alignment(1f, 1f); + public readonly float VerticalOffsetMultiplier; + public readonly float HorizontalOffsetMultiplier; + + public Vector2 OffsetMultiplier => new Vector2(this.HorizontalOffsetMultiplier, this.VerticalOffsetMultiplier); + + private Alignment(float horizontal, float vertical) + { + this.HorizontalOffsetMultiplier = horizontal; + this.VerticalOffsetMultiplier = vertical; + } + } +} diff --git a/UI/CalculatedStyle.cs b/UI/CalculatedStyle.cs new file mode 100644 index 0000000..4789670 --- /dev/null +++ b/UI/CalculatedStyle.cs @@ -0,0 +1,32 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.CalculatedStyle +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.UI +{ + public struct CalculatedStyle + { + public float X; + public float Y; + public float Width; + public float Height; + + public CalculatedStyle(float x, float y, float width, float height) + { + this.X = x; + this.Y = y; + this.Width = width; + this.Height = height; + } + + public Rectangle ToRectangle() => new Rectangle((int) this.X, (int) this.Y, (int) this.Width, (int) this.Height); + + public Vector2 Position() => new Vector2(this.X, this.Y); + + public Vector2 Center() => new Vector2(this.X + this.Width * 0.5f, this.Y + this.Height * 0.5f); + } +} diff --git a/UI/Chat/ChatLine.cs b/UI/Chat/ChatLine.cs new file mode 100644 index 0000000..dcf7cfa --- /dev/null +++ b/UI/Chat/ChatLine.cs @@ -0,0 +1,41 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.Chat.ChatLine +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.UI.Chat +{ + public class ChatLine + { + public Color color = Color.White; + public int showTime; + public string originalText = ""; + public TextSnippet[] parsedText = new TextSnippet[0]; + private int? parsingPixelLimit; + private bool needsParsing; + + public void UpdateTimeLeft() + { + if (this.showTime > 0) + --this.showTime; + if (!this.needsParsing) + return; + this.needsParsing = false; + } + + public void Copy(ChatLine other) + { + this.needsParsing = other.needsParsing; + this.parsingPixelLimit = other.parsingPixelLimit; + this.originalText = other.originalText; + this.parsedText = other.parsedText; + this.showTime = other.showTime; + this.color = other.color; + } + + public void FlagAsNeedsReprocessing() => this.needsParsing = true; + } +} diff --git a/UI/Chat/ChatManager.cs b/UI/Chat/ChatManager.cs new file mode 100644 index 0000000..77200b1 --- /dev/null +++ b/UI/Chat/ChatManager.cs @@ -0,0 +1,435 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.Chat.ChatManager +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Graphics; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Text.RegularExpressions; +using Terraria.Chat; +using Terraria.GameContent.UI.Chat; + +namespace Terraria.UI.Chat +{ + public static class ChatManager + { + public static readonly ChatCommandProcessor Commands = new ChatCommandProcessor(); + private static ConcurrentDictionary _handlers = new ConcurrentDictionary(); + public static readonly Vector2[] ShadowDirections = new Vector2[4] + { + -Vector2.UnitX, + Vector2.UnitX, + -Vector2.UnitY, + Vector2.UnitY + }; + + public static Color WaveColor(Color color) + { + float num = (float) Main.mouseTextColor / (float) byte.MaxValue; + color = Color.Lerp(color, Color.Black, 1f - num); + color.A = Main.mouseTextColor; + return color; + } + + public static void ConvertNormalSnippets(TextSnippet[] snippets) + { + for (int index = 0; index < snippets.Length; ++index) + { + TextSnippet snippet = snippets[index]; + if (snippets[index].GetType() == typeof (TextSnippet)) + { + PlainTagHandler.PlainSnippet plainSnippet = new PlainTagHandler.PlainSnippet(snippet.Text, snippet.Color, snippet.Scale); + snippets[index] = (TextSnippet) plainSnippet; + } + } + } + + public static void Register(params string[] names) where T : ITagHandler, new() + { + T obj = new T(); + for (int index = 0; index < names.Length; ++index) + ChatManager._handlers[names[index].ToLower()] = (ITagHandler) obj; + } + + private static ITagHandler GetHandler(string tagName) + { + string lower = tagName.ToLower(); + return ChatManager._handlers.ContainsKey(lower) ? ChatManager._handlers[lower] : (ITagHandler) null; + } + + public static List ParseMessage(string text, Color baseColor) + { + text = text.Replace("\r", ""); + MatchCollection matchCollection = ChatManager.Regexes.Format.Matches(text); + List textSnippetList = new List(); + int startIndex = 0; + foreach (Match match in matchCollection) + { + if (match.Index > startIndex) + textSnippetList.Add(new TextSnippet(text.Substring(startIndex, match.Index - startIndex), baseColor)); + startIndex = match.Index + match.Length; + string tagName = match.Groups["tag"].Value; + string text1 = match.Groups[nameof (text)].Value; + string options = match.Groups["options"].Value; + ITagHandler handler = ChatManager.GetHandler(tagName); + if (handler != null) + { + textSnippetList.Add(handler.Parse(text1, baseColor, options)); + textSnippetList[textSnippetList.Count - 1].TextOriginal = match.ToString(); + } + else + textSnippetList.Add(new TextSnippet(text1, baseColor)); + } + if (text.Length > startIndex) + textSnippetList.Add(new TextSnippet(text.Substring(startIndex, text.Length - startIndex), baseColor)); + return textSnippetList; + } + + public static bool AddChatText(DynamicSpriteFont font, string text, Vector2 baseScale) + { + int num = Main.screenWidth - 330; + if ((double) ChatManager.GetStringSize(font, Main.chatText + text, baseScale).X > (double) num) + return false; + Main.chatText += text; + return true; + } + + public static Vector2 GetStringSize( + DynamicSpriteFont font, + string text, + Vector2 baseScale, + float maxWidth = -1f) + { + TextSnippet[] array = ChatManager.ParseMessage(text, Color.White).ToArray(); + return ChatManager.GetStringSize(font, array, baseScale, maxWidth); + } + + public static Vector2 GetStringSize( + DynamicSpriteFont font, + TextSnippet[] snippets, + Vector2 baseScale, + float maxWidth = -1f) + { + Vector2 vec = new Vector2((float) Main.mouseX, (float) Main.mouseY); + Vector2 zero = Vector2.Zero; + Vector2 minimum = zero; + Vector2 vector2_1 = minimum; + float x = font.MeasureString(" ").X; + float num1 = 0.0f; + for (int index1 = 0; index1 < snippets.Length; ++index1) + { + TextSnippet snippet = snippets[index1]; + snippet.Update(); + float scale = snippet.Scale; + Vector2 size; + if (snippet.UniqueDraw(true, out size, (SpriteBatch) null)) + { + minimum.X += size.X * baseScale.X * scale; + vector2_1.X = Math.Max(vector2_1.X, minimum.X); + vector2_1.Y = Math.Max(vector2_1.Y, minimum.Y + size.Y); + } + else + { + string[] strArray1 = snippet.Text.Split('\n'); + foreach (string str in strArray1) + { + char[] chArray = new char[1]{ ' ' }; + string[] strArray2 = str.Split(chArray); + for (int index2 = 0; index2 < strArray2.Length; ++index2) + { + if (index2 != 0) + minimum.X += x * baseScale.X * scale; + if ((double) maxWidth > 0.0) + { + float num2 = font.MeasureString(strArray2[index2]).X * baseScale.X * scale; + if ((double) minimum.X - (double) zero.X + (double) num2 > (double) maxWidth) + { + minimum.X = zero.X; + minimum.Y += (float) font.LineSpacing * num1 * baseScale.Y; + vector2_1.Y = Math.Max(vector2_1.Y, minimum.Y); + num1 = 0.0f; + } + } + if ((double) num1 < (double) scale) + num1 = scale; + Vector2 vector2_2 = font.MeasureString(strArray2[index2]); + vec.Between(minimum, minimum + vector2_2); + minimum.X += vector2_2.X * baseScale.X * scale; + vector2_1.X = Math.Max(vector2_1.X, minimum.X); + vector2_1.Y = Math.Max(vector2_1.Y, minimum.Y + vector2_2.Y); + } + if (strArray1.Length > 1) + { + minimum.X = zero.X; + minimum.Y += (float) font.LineSpacing * num1 * baseScale.Y; + vector2_1.Y = Math.Max(vector2_1.Y, minimum.Y); + num1 = 0.0f; + } + } + } + } + return vector2_1; + } + + public static void DrawColorCodedStringShadow( + SpriteBatch spriteBatch, + DynamicSpriteFont font, + TextSnippet[] snippets, + Vector2 position, + Color baseColor, + float rotation, + Vector2 origin, + Vector2 baseScale, + float maxWidth = -1f, + float spread = 2f) + { + for (int index = 0; index < ChatManager.ShadowDirections.Length; ++index) + ChatManager.DrawColorCodedString(spriteBatch, font, snippets, position + ChatManager.ShadowDirections[index] * spread, baseColor, rotation, origin, baseScale, out int _, maxWidth, true); + } + + public static Vector2 DrawColorCodedString( + SpriteBatch spriteBatch, + DynamicSpriteFont font, + TextSnippet[] snippets, + Vector2 position, + Color baseColor, + float rotation, + Vector2 origin, + Vector2 baseScale, + out int hoveredSnippet, + float maxWidth, + bool ignoreColors = false) + { + int num1 = -1; + Vector2 vec = new Vector2((float) Main.mouseX, (float) Main.mouseY); + Vector2 vector2_1 = position; + Vector2 vector2_2 = vector2_1; + float x = font.MeasureString(" ").X; + Color color = baseColor; + float num2 = 0.0f; + for (int index1 = 0; index1 < snippets.Length; ++index1) + { + TextSnippet snippet = snippets[index1]; + snippet.Update(); + if (!ignoreColors) + color = snippet.GetVisibleColor(); + float scale = snippet.Scale; + Vector2 size; + if (snippet.UniqueDraw(false, out size, spriteBatch, vector2_1, color, scale)) + { + if (vec.Between(vector2_1, vector2_1 + size)) + num1 = index1; + vector2_1.X += size.X * baseScale.X * scale; + vector2_2.X = Math.Max(vector2_2.X, vector2_1.X); + } + else + { + snippet.Text.Split('\n'); + string[] strArray1 = Regex.Split(snippet.Text, "(\n)"); + bool flag = true; + for (int index2 = 0; index2 < strArray1.Length; ++index2) + { + string input = strArray1[index2]; + Regex.Split(input, "( )"); + string[] strArray2 = input.Split(' '); + if (input == "\n") + { + vector2_1.Y += (float) font.LineSpacing * num2 * baseScale.Y; + vector2_1.X = position.X; + vector2_2.Y = Math.Max(vector2_2.Y, vector2_1.Y); + num2 = 0.0f; + flag = false; + } + else + { + for (int index3 = 0; index3 < strArray2.Length; ++index3) + { + if (index3 != 0) + vector2_1.X += x * baseScale.X * scale; + if ((double) maxWidth > 0.0) + { + float num3 = font.MeasureString(strArray2[index3]).X * baseScale.X * scale; + if ((double) vector2_1.X - (double) position.X + (double) num3 > (double) maxWidth) + { + vector2_1.X = position.X; + vector2_1.Y += (float) font.LineSpacing * num2 * baseScale.Y; + vector2_2.Y = Math.Max(vector2_2.Y, vector2_1.Y); + num2 = 0.0f; + } + } + if ((double) num2 < (double) scale) + num2 = scale; + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, font, strArray2[index3], vector2_1, color, rotation, origin, baseScale * snippet.Scale * scale, SpriteEffects.None, 0.0f); + Vector2 vector2_3 = font.MeasureString(strArray2[index3]); + if (vec.Between(vector2_1, vector2_1 + vector2_3)) + num1 = index1; + vector2_1.X += vector2_3.X * baseScale.X * scale; + vector2_2.X = Math.Max(vector2_2.X, vector2_1.X); + } + if (strArray1.Length > 1 & flag) + { + vector2_1.Y += (float) font.LineSpacing * num2 * baseScale.Y; + vector2_1.X = position.X; + vector2_2.Y = Math.Max(vector2_2.Y, vector2_1.Y); + num2 = 0.0f; + } + flag = true; + } + } + } + } + hoveredSnippet = num1; + return vector2_2; + } + + public static Vector2 DrawColorCodedStringWithShadow( + SpriteBatch spriteBatch, + DynamicSpriteFont font, + TextSnippet[] snippets, + Vector2 position, + float rotation, + Vector2 origin, + Vector2 baseScale, + out int hoveredSnippet, + float maxWidth = -1f, + float spread = 2f) + { + ChatManager.DrawColorCodedStringShadow(spriteBatch, font, snippets, position, Color.Black, rotation, origin, baseScale, maxWidth, spread); + return ChatManager.DrawColorCodedString(spriteBatch, font, snippets, position, Color.White, rotation, origin, baseScale, out hoveredSnippet, maxWidth); + } + + public static Vector2 DrawColorCodedStringWithShadow( + SpriteBatch spriteBatch, + DynamicSpriteFont font, + TextSnippet[] snippets, + Vector2 position, + float rotation, + Color color, + Vector2 origin, + Vector2 baseScale, + out int hoveredSnippet, + float maxWidth = -1f, + float spread = 2f) + { + ChatManager.DrawColorCodedStringShadow(spriteBatch, font, snippets, position, Color.Black, rotation, origin, baseScale, maxWidth, spread); + return ChatManager.DrawColorCodedString(spriteBatch, font, snippets, position, color, rotation, origin, baseScale, out hoveredSnippet, maxWidth, true); + } + + public static void DrawColorCodedStringShadow( + SpriteBatch spriteBatch, + DynamicSpriteFont font, + string text, + Vector2 position, + Color baseColor, + float rotation, + Vector2 origin, + Vector2 baseScale, + float maxWidth = -1f, + float spread = 2f) + { + for (int index = 0; index < ChatManager.ShadowDirections.Length; ++index) + ChatManager.DrawColorCodedString(spriteBatch, font, text, position + ChatManager.ShadowDirections[index] * spread, baseColor, rotation, origin, baseScale, maxWidth, true); + } + + public static Vector2 DrawColorCodedString( + SpriteBatch spriteBatch, + DynamicSpriteFont font, + string text, + Vector2 position, + Color baseColor, + float rotation, + Vector2 origin, + Vector2 baseScale, + float maxWidth = -1f, + bool ignoreColors = false) + { + Vector2 vector2_1 = position; + Vector2 vector2_2 = vector2_1; + string[] strArray1 = text.Split('\n'); + float x = font.MeasureString(" ").X; + Color color = baseColor; + float num1 = 1f; + float num2 = 0.0f; + foreach (string str1 in strArray1) + { + char[] chArray = new char[1]{ ':' }; + foreach (string str2 in str1.Split(chArray)) + { + if (str2.StartsWith("sss")) + { + if (str2.StartsWith("sss1")) + { + if (!ignoreColors) + color = Color.Red; + } + else if (str2.StartsWith("sss2")) + { + if (!ignoreColors) + color = Color.Blue; + } + else if (str2.StartsWith("sssr") && !ignoreColors) + color = Color.White; + } + else + { + string[] strArray2 = str2.Split(' '); + for (int index = 0; index < strArray2.Length; ++index) + { + if (index != 0) + vector2_1.X += x * baseScale.X * num1; + if ((double) maxWidth > 0.0) + { + float num3 = font.MeasureString(strArray2[index]).X * baseScale.X * num1; + if ((double) vector2_1.X - (double) position.X + (double) num3 > (double) maxWidth) + { + vector2_1.X = position.X; + vector2_1.Y += (float) font.LineSpacing * num2 * baseScale.Y; + vector2_2.Y = Math.Max(vector2_2.Y, vector2_1.Y); + num2 = 0.0f; + } + } + if ((double) num2 < (double) num1) + num2 = num1; + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, font, strArray2[index], vector2_1, color, rotation, origin, baseScale * num1, SpriteEffects.None, 0.0f); + vector2_1.X += font.MeasureString(strArray2[index]).X * baseScale.X * num1; + vector2_2.X = Math.Max(vector2_2.X, vector2_1.X); + } + } + } + vector2_1.X = position.X; + vector2_1.Y += (float) font.LineSpacing * num2 * baseScale.Y; + vector2_2.Y = Math.Max(vector2_2.Y, vector2_1.Y); + num2 = 0.0f; + } + return vector2_2; + } + + public static Vector2 DrawColorCodedStringWithShadow( + SpriteBatch spriteBatch, + DynamicSpriteFont font, + string text, + Vector2 position, + Color baseColor, + float rotation, + Vector2 origin, + Vector2 baseScale, + float maxWidth = -1f, + float spread = 2f) + { + TextSnippet[] array = ChatManager.ParseMessage(text, baseColor).ToArray(); + ChatManager.ConvertNormalSnippets(array); + ChatManager.DrawColorCodedStringShadow(spriteBatch, font, array, position, new Color(0, 0, 0, (int) baseColor.A), rotation, origin, baseScale, maxWidth, spread); + return ChatManager.DrawColorCodedString(spriteBatch, font, array, position, Color.White, rotation, origin, baseScale, out int _, maxWidth); + } + + public static class Regexes + { + public static readonly Regex Format = new Regex("(?[a-zA-Z]{1,10})(\\/(?[^:]+))?:(?.+?)(? _parsedText; + private Color _color; + private int _widthLimitInPixels; + private int _timeLeft; + + public void SetContents(string text, Color color, int widthLimitInPixels) + { + this.OriginalText = text; + this._color = color; + this._widthLimitInPixels = widthLimitInPixels; + this.MarkToNeedRefresh(); + this._parsedText = new List(); + this._timeLeft = 600; + this.Refresh(); + } + + public void MarkToNeedRefresh() => this._prepared = false; + + public void Update() + { + if (this._timeLeft > 0) + --this._timeLeft; + this.Refresh(); + } + + public TextSnippet[] GetSnippetWithInversedIndex(int snippetIndex) => this._parsedText[this._parsedText.Count - 1 - snippetIndex]; + + public int LineCount => this._parsedText.Count; + + public bool CanBeShownWhenChatIsClosed => this._timeLeft > 0; + + public bool Prepared => this._prepared; + + public void Refresh() + { + if (this._prepared) + return; + this._prepared = true; + int maxWidth = this._widthLimitInPixels; + if (maxWidth == -1) + maxWidth = Main.screenWidth - 320; + List> textSnippetListList = Utils.WordwrapStringSmart(this.OriginalText, this._color, FontAssets.MouseText.Value, maxWidth, 10); + this._parsedText.Clear(); + for (int index = 0; index < textSnippetListList.Count; ++index) + this._parsedText.Add(textSnippetListList[index].ToArray()); + } + } +} diff --git a/UI/Chat/ITagHandler.cs b/UI/Chat/ITagHandler.cs new file mode 100644 index 0000000..2a5b0f9 --- /dev/null +++ b/UI/Chat/ITagHandler.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.Chat.ITagHandler +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.UI.Chat +{ + public interface ITagHandler + { + TextSnippet Parse(string text, Color baseColor = default (Color), string options = null); + } +} diff --git a/UI/Chat/TextSnippet.cs b/UI/Chat/TextSnippet.cs new file mode 100644 index 0000000..3cb761b --- /dev/null +++ b/UI/Chat/TextSnippet.cs @@ -0,0 +1,73 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.Chat.TextSnippet +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Graphics; + +namespace Terraria.UI.Chat +{ + public class TextSnippet + { + public string Text; + public string TextOriginal; + public Color Color = Color.White; + public float Scale = 1f; + public bool CheckForHover; + public bool DeleteWhole; + + public TextSnippet(string text = "") + { + this.Text = text; + this.TextOriginal = text; + } + + public TextSnippet(string text, Color color, float scale = 1f) + { + this.Text = text; + this.TextOriginal = text; + this.Color = color; + this.Scale = scale; + } + + public virtual void Update() + { + } + + public virtual void OnHover() + { + } + + public virtual void OnClick() + { + } + + public virtual Color GetVisibleColor() => ChatManager.WaveColor(this.Color); + + public virtual bool UniqueDraw( + bool justCheckingString, + out Vector2 size, + SpriteBatch spriteBatch, + Vector2 position = default (Vector2), + Color color = default (Color), + float scale = 1f) + { + size = Vector2.Zero; + return false; + } + + public virtual TextSnippet CopyMorph(string newText) + { + TextSnippet textSnippet = (TextSnippet) this.MemberwiseClone(); + textSnippet.Text = newText; + return textSnippet; + } + + public virtual float GetStringLength(DynamicSpriteFont font) => font.MeasureString(this.Text).X * this.Scale; + + public override string ToString() => "Text: " + this.Text + " | OriginalText: " + this.TextOriginal; + } +} diff --git a/UI/ChestUI.cs b/UI/ChestUI.cs new file mode 100644 index 0000000..261e06e --- /dev/null +++ b/UI/ChestUI.cs @@ -0,0 +1,1216 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.ChestUI +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Input; +using System.Collections.Generic; +using Terraria.Audio; +using Terraria.GameContent; +using Terraria.GameInput; +using Terraria.Localization; +using Terraria.UI.Chat; +using Terraria.UI.Gamepad; + +namespace Terraria.UI +{ + public class ChestUI + { + public const float buttonScaleMinimum = 0.75f; + public const float buttonScaleMaximum = 1f; + public static float[] ButtonScale = new float[7]; + public static bool[] ButtonHovered = new bool[7]; + + public static void UpdateHover(int ID, bool hovering) + { + if (hovering) + { + if (!ChestUI.ButtonHovered[ID]) + SoundEngine.PlaySound(12); + ChestUI.ButtonHovered[ID] = true; + ChestUI.ButtonScale[ID] += 0.05f; + if ((double) ChestUI.ButtonScale[ID] <= 1.0) + return; + ChestUI.ButtonScale[ID] = 1f; + } + else + { + ChestUI.ButtonHovered[ID] = false; + ChestUI.ButtonScale[ID] -= 0.05f; + if ((double) ChestUI.ButtonScale[ID] >= 0.75) + return; + ChestUI.ButtonScale[ID] = 0.75f; + } + } + + public static void Draw(SpriteBatch spritebatch) + { + if (Main.player[Main.myPlayer].chest != -1 && !Main.recBigList) + { + Main.inventoryScale = 0.755f; + if (Utils.FloatIntersect((float) Main.mouseX, (float) Main.mouseY, 0.0f, 0.0f, 73f, (float) Main.instance.invBottom, 560f * Main.inventoryScale, 224f * Main.inventoryScale)) + Main.player[Main.myPlayer].mouseInterface = true; + ChestUI.DrawName(spritebatch); + ChestUI.DrawButtons(spritebatch); + ChestUI.DrawSlots(spritebatch); + } + else + { + for (int index = 0; index < 7; ++index) + { + ChestUI.ButtonScale[index] = 0.75f; + ChestUI.ButtonHovered[index] = false; + } + } + } + + private static void DrawName(SpriteBatch spritebatch) + { + Player player = Main.player[Main.myPlayer]; + string text = string.Empty; + if (Main.editChest) + { + text = Main.npcChatText; + ++Main.instance.textBlinkerCount; + if (Main.instance.textBlinkerCount >= 20) + { + Main.instance.textBlinkerState = Main.instance.textBlinkerState != 0 ? 0 : 1; + Main.instance.textBlinkerCount = 0; + } + if (Main.instance.textBlinkerState == 1) + text += "|"; + Main.instance.DrawWindowsIMEPanel(new Vector2(120f, 518f)); + } + else if (player.chest > -1) + { + if (Main.chest[player.chest] == null) + Main.chest[player.chest] = new Chest(); + Chest chest = Main.chest[player.chest]; + if (chest.name != "") + { + text = chest.name; + } + else + { + Tile tile = Main.tile[player.chestX, player.chestY]; + if (tile.type == (ushort) 21) + text = Lang.chestType[(int) tile.frameX / 36].Value; + else if (tile.type == (ushort) 467 && (int) tile.frameX / 36 == 4) + text = Lang.GetItemNameValue(3988); + else if (tile.type == (ushort) 467) + text = Lang.chestType2[(int) tile.frameX / 36].Value; + else if (tile.type == (ushort) 88) + text = Lang.dresserType[(int) tile.frameX / 54].Value; + } + } + else if (player.chest == -2) + text = Lang.inter[32].Value; + else if (player.chest == -3) + text = Lang.inter[33].Value; + else if (player.chest == -4) + text = Lang.GetItemNameValue(3813); + else if (player.chest == -5) + text = Lang.GetItemNameValue(4076); + Color color = new Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor); + Color baseColor = Color.White * (float) (1.0 - ((double) byte.MaxValue - (double) Main.mouseTextColor) / (double) byte.MaxValue * 0.5); + baseColor.A = byte.MaxValue; + int lineAmount; + Utils.WordwrapString(text, FontAssets.MouseText.Value, 200, 1, out lineAmount); + int num = lineAmount + 1; + for (int index = 0; index < num; ++index) + ChatManager.DrawColorCodedStringWithShadow(spritebatch, FontAssets.MouseText.Value, text, new Vector2(504f, (float) (Main.instance.invBottom + index * 26)), baseColor, 0.0f, Vector2.Zero, Vector2.One, spread: 1.5f); + } + + private static void DrawButtons(SpriteBatch spritebatch) + { + for (int ID = 0; ID < 7; ++ID) + ChestUI.DrawButton(spritebatch, ID, 506, Main.instance.invBottom + 40); + } + + private static void DrawButton(SpriteBatch spriteBatch, int ID, int X, int Y) + { + Player player = Main.player[Main.myPlayer]; + if (ID == 5 && player.chest < -1 || ID == 6 && !Main.editChest) + ChestUI.UpdateHover(ID, false); + else if (ID == 7 && player.chest != -5) + { + ChestUI.UpdateHover(ID, false); + } + else + { + int num1 = ID; + if (ID == 7) + num1 = 5; + Y += num1 * 26; + float num2 = ChestUI.ButtonScale[ID]; + string text = ""; + switch (ID) + { + case 0: + text = Lang.inter[29].Value; + break; + case 1: + text = Lang.inter[30].Value; + break; + case 2: + text = Lang.inter[31].Value; + break; + case 3: + text = Lang.inter[82].Value; + break; + case 4: + text = Lang.inter[122].Value; + break; + case 5: + text = Lang.inter[Main.editChest ? 47 : 61].Value; + break; + case 6: + text = Lang.inter[63].Value; + break; + case 7: + text = !player.IsVoidVaultEnabled ? Language.GetTextValue("UI.ToggleBank4VacuumIsOff") : Language.GetTextValue("UI.ToggleBank4VacuumIsOn"); + break; + } + Vector2 vector2_1 = FontAssets.MouseText.Value.MeasureString(text); + Color color = new Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor) * num2; + Color baseColor = Color.White * 0.97f * (float) (1.0 - ((double) byte.MaxValue - (double) Main.mouseTextColor) / (double) byte.MaxValue * 0.5); + baseColor.A = byte.MaxValue; + X += (int) ((double) vector2_1.X * (double) num2 / 2.0); + bool flag = Utils.FloatIntersect((float) Main.mouseX, (float) Main.mouseY, 0.0f, 0.0f, (float) X - vector2_1.X / 2f, (float) (Y - 12), vector2_1.X, 24f); + if (ChestUI.ButtonHovered[ID]) + flag = Utils.FloatIntersect((float) Main.mouseX, (float) Main.mouseY, 0.0f, 0.0f, (float) ((double) X - (double) vector2_1.X / 2.0 - 10.0), (float) (Y - 12), vector2_1.X + 16f, 24f); + if (flag) + baseColor = Main.OurFavoriteColor; + ChatManager.DrawColorCodedStringWithShadow(spriteBatch, FontAssets.MouseText.Value, text, new Vector2((float) X, (float) Y), baseColor, 0.0f, vector2_1 / 2f, new Vector2(num2), spread: 1.5f); + Vector2 vector2_2 = vector2_1 * num2; + switch (ID) + { + case 0: + UILinkPointNavigator.SetPosition(500, new Vector2((float) X - (float) ((double) vector2_2.X * (double) num2 / 2.0 * 0.800000011920929), (float) Y)); + break; + case 1: + UILinkPointNavigator.SetPosition(501, new Vector2((float) X - (float) ((double) vector2_2.X * (double) num2 / 2.0 * 0.800000011920929), (float) Y)); + break; + case 2: + UILinkPointNavigator.SetPosition(502, new Vector2((float) X - (float) ((double) vector2_2.X * (double) num2 / 2.0 * 0.800000011920929), (float) Y)); + break; + case 3: + UILinkPointNavigator.SetPosition(503, new Vector2((float) X - (float) ((double) vector2_2.X * (double) num2 / 2.0 * 0.800000011920929), (float) Y)); + break; + case 4: + UILinkPointNavigator.SetPosition(505, new Vector2((float) X - (float) ((double) vector2_2.X * (double) num2 / 2.0 * 0.800000011920929), (float) Y)); + break; + case 5: + UILinkPointNavigator.SetPosition(504, new Vector2((float) X, (float) Y)); + break; + case 6: + UILinkPointNavigator.SetPosition(504, new Vector2((float) X, (float) Y)); + break; + case 7: + UILinkPointNavigator.SetPosition(506, new Vector2((float) X - (float) ((double) vector2_2.X * (double) num2 / 2.0 * 0.800000011920929), (float) Y)); + break; + } + if (!flag) + { + ChestUI.UpdateHover(ID, false); + } + else + { + ChestUI.UpdateHover(ID, true); + if (PlayerInput.IgnoreMouseInterface) + return; + player.mouseInterface = true; + if (!Main.mouseLeft || !Main.mouseLeftRelease) + return; + switch (ID) + { + case 0: + ChestUI.LootAll(); + break; + case 1: + ChestUI.DepositAll(); + break; + case 2: + ChestUI.QuickStack(); + break; + case 3: + ChestUI.Restock(); + break; + case 4: + ItemSorting.SortChest(); + break; + case 5: + ChestUI.RenameChest(); + break; + case 6: + ChestUI.RenameChestCancel(); + break; + case 7: + ChestUI.ToggleVacuum(); + break; + } + Recipe.FindRecipes(); + } + } + } + + private static void ToggleVacuum() + { + Player player = Main.player[Main.myPlayer]; + player.IsVoidVaultEnabled = !player.IsVoidVaultEnabled; + } + + private static void DrawSlots(SpriteBatch spriteBatch) + { + Player player = Main.player[Main.myPlayer]; + int context = 0; + Item[] inv = (Item[]) null; + if (player.chest > -1) + { + context = 3; + inv = Main.chest[player.chest].item; + } + if (player.chest == -2) + { + context = 4; + inv = player.bank.item; + } + if (player.chest == -3) + { + context = 4; + inv = player.bank2.item; + } + if (player.chest == -4) + { + context = 4; + inv = player.bank3.item; + } + if (player.chest == -5) + { + context = 4; + inv = player.bank4.item; + } + Main.inventoryScale = 0.755f; + if (Utils.FloatIntersect((float) Main.mouseX, (float) Main.mouseY, 0.0f, 0.0f, 73f, (float) Main.instance.invBottom, 560f * Main.inventoryScale, 224f * Main.inventoryScale) && !PlayerInput.IgnoreMouseInterface) + player.mouseInterface = true; + for (int index1 = 0; index1 < 10; ++index1) + { + for (int index2 = 0; index2 < 4; ++index2) + { + int num1 = (int) (73.0 + (double) (index1 * 56) * (double) Main.inventoryScale); + int num2 = (int) ((double) Main.instance.invBottom + (double) (index2 * 56) * (double) Main.inventoryScale); + int slot = index1 + index2 * 10; + Color color = new Color(100, 100, 100, 100); + if (Utils.FloatIntersect((float) Main.mouseX, (float) Main.mouseY, 0.0f, 0.0f, (float) num1, (float) num2, (float) TextureAssets.InventoryBack.Width() * Main.inventoryScale, (float) TextureAssets.InventoryBack.Height() * Main.inventoryScale) && !PlayerInput.IgnoreMouseInterface) + { + player.mouseInterface = true; + ItemSlot.Handle(inv, context, slot); + } + ItemSlot.Draw(spriteBatch, inv, context, slot, new Vector2((float) num1, (float) num2)); + } + } + } + + public static void LootAll() + { + GetItemSettings lootAllSettings = GetItemSettings.LootAllSettings; + Player player = Main.player[Main.myPlayer]; + if (player.chest > -1) + { + Chest chest = Main.chest[player.chest]; + for (int index = 0; index < 40; ++index) + { + if (chest.item[index].type > 0) + { + chest.item[index].position = player.Center; + chest.item[index] = player.GetItem(Main.myPlayer, chest.item[index], lootAllSettings); + if (Main.netMode == 1) + NetMessage.SendData(32, number: player.chest, number2: ((float) index)); + } + } + } + else if (player.chest == -3) + { + for (int index = 0; index < 40; ++index) + { + if (player.bank2.item[index].type > 0) + { + player.bank2.item[index].position = player.Center; + player.bank2.item[index] = player.GetItem(Main.myPlayer, player.bank2.item[index], lootAllSettings); + } + } + } + else if (player.chest == -4) + { + for (int index = 0; index < 40; ++index) + { + if (player.bank3.item[index].type > 0) + { + player.bank3.item[index].position = player.Center; + player.bank3.item[index] = player.GetItem(Main.myPlayer, player.bank3.item[index], lootAllSettings); + } + } + } + else if (player.chest == -5) + { + for (int index = 0; index < 40; ++index) + { + if (player.bank4.item[index].type > 0) + { + player.bank4.item[index].position = player.Center; + player.bank4.item[index] = player.GetItem(Main.myPlayer, player.bank4.item[index], lootAllSettings); + } + } + } + else + { + for (int index = 0; index < 40; ++index) + { + if (player.bank.item[index].type > 0) + { + player.bank.item[index].position = player.Center; + player.bank.item[index] = player.GetItem(Main.myPlayer, player.bank.item[index], lootAllSettings); + } + } + } + } + + public static void DepositAll() + { + Player player = Main.player[Main.myPlayer]; + if (player.chest > -1) + ChestUI.MoveCoins(player.inventory, Main.chest[player.chest].item); + else if (player.chest == -3) + ChestUI.MoveCoins(player.inventory, player.bank2.item); + else if (player.chest == -4) + ChestUI.MoveCoins(player.inventory, player.bank3.item); + else if (player.chest == -5) + ChestUI.MoveCoins(player.inventory, player.bank4.item); + else + ChestUI.MoveCoins(player.inventory, player.bank.item); + for (int index1 = 49; index1 >= 10; --index1) + { + if (player.inventory[index1].stack > 0 && player.inventory[index1].type > 0 && !player.inventory[index1].favorited) + { + if (player.inventory[index1].maxStack > 1) + { + for (int index2 = 0; index2 < 40; ++index2) + { + if (player.chest > -1) + { + Chest chest = Main.chest[player.chest]; + if (chest.item[index2].stack < chest.item[index2].maxStack && player.inventory[index1].IsTheSameAs(chest.item[index2])) + { + int num = player.inventory[index1].stack; + if (player.inventory[index1].stack + chest.item[index2].stack > chest.item[index2].maxStack) + num = chest.item[index2].maxStack - chest.item[index2].stack; + player.inventory[index1].stack -= num; + chest.item[index2].stack += num; + SoundEngine.PlaySound(7); + if (player.inventory[index1].stack <= 0) + { + player.inventory[index1].SetDefaults(); + if (Main.netMode == 1) + { + NetMessage.SendData(32, number: player.chest, number2: ((float) index2)); + break; + } + break; + } + if (chest.item[index2].type == 0) + { + chest.item[index2] = player.inventory[index1].Clone(); + player.inventory[index1].SetDefaults(); + } + if (Main.netMode == 1) + NetMessage.SendData(32, number: player.chest, number2: ((float) index2)); + } + } + else if (player.chest == -3) + { + if (player.bank2.item[index2].stack < player.bank2.item[index2].maxStack && player.inventory[index1].IsTheSameAs(player.bank2.item[index2])) + { + int num = player.inventory[index1].stack; + if (player.inventory[index1].stack + player.bank2.item[index2].stack > player.bank2.item[index2].maxStack) + num = player.bank2.item[index2].maxStack - player.bank2.item[index2].stack; + player.inventory[index1].stack -= num; + player.bank2.item[index2].stack += num; + SoundEngine.PlaySound(7); + if (player.inventory[index1].stack <= 0) + { + player.inventory[index1].SetDefaults(); + break; + } + if (player.bank2.item[index2].type == 0) + { + player.bank2.item[index2] = player.inventory[index1].Clone(); + player.inventory[index1].SetDefaults(); + } + } + } + else if (player.chest == -4) + { + if (player.bank3.item[index2].stack < player.bank3.item[index2].maxStack && player.inventory[index1].IsTheSameAs(player.bank3.item[index2])) + { + int num = player.inventory[index1].stack; + if (player.inventory[index1].stack + player.bank3.item[index2].stack > player.bank3.item[index2].maxStack) + num = player.bank3.item[index2].maxStack - player.bank3.item[index2].stack; + player.inventory[index1].stack -= num; + player.bank3.item[index2].stack += num; + SoundEngine.PlaySound(7); + if (player.inventory[index1].stack <= 0) + { + player.inventory[index1].SetDefaults(); + break; + } + if (player.bank3.item[index2].type == 0) + { + player.bank3.item[index2] = player.inventory[index1].Clone(); + player.inventory[index1].SetDefaults(); + } + } + } + else if (player.chest == -5) + { + if (player.bank4.item[index2].stack < player.bank4.item[index2].maxStack && player.inventory[index1].IsTheSameAs(player.bank4.item[index2])) + { + int num = player.inventory[index1].stack; + if (player.inventory[index1].stack + player.bank4.item[index2].stack > player.bank4.item[index2].maxStack) + num = player.bank4.item[index2].maxStack - player.bank4.item[index2].stack; + player.inventory[index1].stack -= num; + player.bank4.item[index2].stack += num; + SoundEngine.PlaySound(7); + if (player.inventory[index1].stack <= 0) + { + player.inventory[index1].SetDefaults(); + break; + } + if (player.bank4.item[index2].type == 0) + { + player.bank4.item[index2] = player.inventory[index1].Clone(); + player.inventory[index1].SetDefaults(); + } + } + } + else if (player.bank.item[index2].stack < player.bank.item[index2].maxStack && player.inventory[index1].IsTheSameAs(player.bank.item[index2])) + { + int num = player.inventory[index1].stack; + if (player.inventory[index1].stack + player.bank.item[index2].stack > player.bank.item[index2].maxStack) + num = player.bank.item[index2].maxStack - player.bank.item[index2].stack; + player.inventory[index1].stack -= num; + player.bank.item[index2].stack += num; + SoundEngine.PlaySound(7); + if (player.inventory[index1].stack <= 0) + { + player.inventory[index1].SetDefaults(); + break; + } + if (player.bank.item[index2].type == 0) + { + player.bank.item[index2] = player.inventory[index1].Clone(); + player.inventory[index1].SetDefaults(); + } + } + } + } + if (player.inventory[index1].stack > 0) + { + if (player.chest > -1) + { + for (int index3 = 0; index3 < 40; ++index3) + { + if (Main.chest[player.chest].item[index3].stack == 0) + { + SoundEngine.PlaySound(7); + Main.chest[player.chest].item[index3] = player.inventory[index1].Clone(); + player.inventory[index1].SetDefaults(); + if (Main.netMode == 1) + { + NetMessage.SendData(32, number: player.chest, number2: ((float) index3)); + break; + } + break; + } + } + } + else if (player.chest == -3) + { + for (int index4 = 0; index4 < 40; ++index4) + { + if (player.bank2.item[index4].stack == 0) + { + SoundEngine.PlaySound(7); + player.bank2.item[index4] = player.inventory[index1].Clone(); + player.inventory[index1].SetDefaults(); + break; + } + } + } + else if (player.chest == -4) + { + for (int index5 = 0; index5 < 40; ++index5) + { + if (player.bank3.item[index5].stack == 0) + { + SoundEngine.PlaySound(7); + player.bank3.item[index5] = player.inventory[index1].Clone(); + player.inventory[index1].SetDefaults(); + break; + } + } + } + else if (player.chest == -5) + { + for (int index6 = 0; index6 < 40; ++index6) + { + if (player.bank4.item[index6].stack == 0) + { + SoundEngine.PlaySound(7); + player.bank4.item[index6] = player.inventory[index1].Clone(); + player.inventory[index1].SetDefaults(); + break; + } + } + } + else + { + for (int index7 = 0; index7 < 40; ++index7) + { + if (player.bank.item[index7].stack == 0) + { + SoundEngine.PlaySound(7); + player.bank.item[index7] = player.inventory[index1].Clone(); + player.inventory[index1].SetDefaults(); + break; + } + } + } + } + } + } + } + + public static void QuickStack() + { + Player player = Main.player[Main.myPlayer]; + if (player.chest == -5) + ChestUI.MoveCoins(player.inventory, player.bank4.item); + else if (player.chest == -4) + ChestUI.MoveCoins(player.inventory, player.bank3.item); + else if (player.chest == -3) + ChestUI.MoveCoins(player.inventory, player.bank2.item); + else if (player.chest == -2) + ChestUI.MoveCoins(player.inventory, player.bank.item); + Item[] inventory = player.inventory; + Item[] objArray = player.bank.item; + if (player.chest > -1) + objArray = Main.chest[player.chest].item; + else if (player.chest == -2) + objArray = player.bank.item; + else if (player.chest == -3) + objArray = player.bank2.item; + else if (player.chest == -4) + objArray = player.bank3.item; + else if (player.chest == -5) + objArray = player.bank4.item; + List intList1 = new List(); + List intList2 = new List(); + List intList3 = new List(); + Dictionary dictionary = new Dictionary(); + List intList4 = new List(); + bool[] flagArray = new bool[objArray.Length]; + for (int index = 0; index < 40; ++index) + { + if (objArray[index].type > 0 && objArray[index].stack > 0 && (objArray[index].type < 71 || objArray[index].type > 74)) + { + intList2.Add(index); + intList1.Add(objArray[index].netID); + } + if (objArray[index].type == 0 || objArray[index].stack <= 0) + intList3.Add(index); + } + int num1 = 50; + if (player.chest <= -2) + num1 += 4; + for (int key = 10; key < num1; ++key) + { + if (intList1.Contains(inventory[key].netID) && !inventory[key].favorited) + dictionary.Add(key, inventory[key].netID); + } + for (int index1 = 0; index1 < intList2.Count; ++index1) + { + int index2 = intList2[index1]; + int netId = objArray[index2].netID; + foreach (KeyValuePair keyValuePair in dictionary) + { + if (keyValuePair.Value == netId && inventory[keyValuePair.Key].netID == netId) + { + int num2 = inventory[keyValuePair.Key].stack; + int num3 = objArray[index2].maxStack - objArray[index2].stack; + if (num3 != 0) + { + if (num2 > num3) + num2 = num3; + SoundEngine.PlaySound(7); + objArray[index2].stack += num2; + inventory[keyValuePair.Key].stack -= num2; + if (inventory[keyValuePair.Key].stack == 0) + inventory[keyValuePair.Key].SetDefaults(); + flagArray[index2] = true; + } + else + break; + } + } + } + foreach (KeyValuePair keyValuePair in dictionary) + { + if (inventory[keyValuePair.Key].stack == 0) + intList4.Add(keyValuePair.Key); + } + foreach (int key in intList4) + dictionary.Remove(key); + for (int index3 = 0; index3 < intList3.Count; ++index3) + { + int index4 = intList3[index3]; + bool flag = true; + int netId = objArray[index4].netID; + if (netId < 71 || netId > 74) + { + foreach (KeyValuePair keyValuePair in dictionary) + { + if (keyValuePair.Value == netId && inventory[keyValuePair.Key].netID == netId || flag && inventory[keyValuePair.Key].stack > 0) + { + SoundEngine.PlaySound(7); + if (flag) + { + netId = keyValuePair.Value; + objArray[index4] = inventory[keyValuePair.Key]; + inventory[keyValuePair.Key] = new Item(); + } + else + { + int num4 = inventory[keyValuePair.Key].stack; + int num5 = objArray[index4].maxStack - objArray[index4].stack; + if (num5 != 0) + { + if (num4 > num5) + num4 = num5; + objArray[index4].stack += num4; + inventory[keyValuePair.Key].stack -= num4; + if (inventory[keyValuePair.Key].stack == 0) + inventory[keyValuePair.Key] = new Item(); + } + else + break; + } + flagArray[index4] = true; + flag = false; + } + } + } + } + if (Main.netMode == 1 && player.chest >= 0) + { + for (int index = 0; index < flagArray.Length; ++index) + NetMessage.SendData(32, number: player.chest, number2: ((float) index)); + } + intList1.Clear(); + intList2.Clear(); + intList3.Clear(); + dictionary.Clear(); + intList4.Clear(); + } + + public static void RenameChest() + { + Player player = Main.player[Main.myPlayer]; + if (!Main.editChest) + IngameFancyUI.OpenVirtualKeyboard(2); + else + ChestUI.RenameChestSubmit(player); + } + + public static void RenameChestSubmit(Player player) + { + SoundEngine.PlaySound(12); + Main.editChest = false; + int chest = player.chest; + if (chest < 0) + return; + if (Main.npcChatText == Main.defaultChestName) + Main.npcChatText = ""; + if (!(Main.chest[chest].name != Main.npcChatText)) + return; + Main.chest[chest].name = Main.npcChatText; + if (Main.netMode != 1) + return; + player.editedChestName = true; + } + + public static void RenameChestCancel() + { + SoundEngine.PlaySound(12); + Main.editChest = false; + Main.npcChatText = string.Empty; + Main.blockKey = Keys.Escape.ToString(); + } + + public static void Restock() + { + Player player = Main.player[Main.myPlayer]; + Item[] inventory = player.inventory; + Item[] objArray = player.bank.item; + if (player.chest > -1) + objArray = Main.chest[player.chest].item; + else if (player.chest == -2) + objArray = player.bank.item; + else if (player.chest == -3) + objArray = player.bank2.item; + else if (player.chest == -4) + objArray = player.bank3.item; + else if (player.chest == -5) + objArray = player.bank4.item; + HashSet intSet = new HashSet(); + List intList1 = new List(); + List intList2 = new List(); + for (int index = 57; index >= 0; --index) + { + if ((index < 50 || index >= 54) && (inventory[index].type < 71 || inventory[index].type > 74)) + { + if (inventory[index].stack > 0 && inventory[index].maxStack > 1 && inventory[index].prefix == (byte) 0) + { + intSet.Add(inventory[index].netID); + if (inventory[index].stack < inventory[index].maxStack) + intList1.Add(index); + } + else if (inventory[index].stack == 0 || inventory[index].netID == 0 || inventory[index].type == 0) + intList2.Add(index); + } + } + bool flag1 = false; + for (int index1 = 0; index1 < objArray.Length; ++index1) + { + if (objArray[index1].stack >= 1 && objArray[index1].prefix == (byte) 0 && intSet.Contains(objArray[index1].netID)) + { + bool flag2 = false; + for (int index2 = 0; index2 < intList1.Count; ++index2) + { + int slot = intList1[index2]; + int context = 0; + if (slot >= 50) + context = 2; + if (inventory[slot].netID == objArray[index1].netID && ItemSlot.PickItemMovementAction(inventory, context, slot, objArray[index1]) != -1) + { + int num = objArray[index1].stack; + if (inventory[slot].maxStack - inventory[slot].stack < num) + num = inventory[slot].maxStack - inventory[slot].stack; + inventory[slot].stack += num; + objArray[index1].stack -= num; + flag1 = true; + if (inventory[slot].stack == inventory[slot].maxStack) + { + if (Main.netMode == 1 && Main.player[Main.myPlayer].chest > -1) + NetMessage.SendData(32, number: Main.player[Main.myPlayer].chest, number2: ((float) index1)); + intList1.RemoveAt(index2); + --index2; + } + if (objArray[index1].stack == 0) + { + objArray[index1] = new Item(); + flag2 = true; + if (Main.netMode == 1 && Main.player[Main.myPlayer].chest > -1) + { + NetMessage.SendData(32, number: Main.player[Main.myPlayer].chest, number2: ((float) index1)); + break; + } + break; + } + } + } + if (!flag2 && intList2.Count > 0 && objArray[index1].ammo != 0) + { + for (int index3 = 0; index3 < intList2.Count; ++index3) + { + int context = 0; + if (intList2[index3] >= 50) + context = 2; + if (ItemSlot.PickItemMovementAction(inventory, context, intList2[index3], objArray[index1]) != -1) + { + Utils.Swap(ref inventory[intList2[index3]], ref objArray[index1]); + if (Main.netMode == 1 && Main.player[Main.myPlayer].chest > -1) + NetMessage.SendData(32, number: Main.player[Main.myPlayer].chest, number2: ((float) index1)); + intList1.Add(intList2[index3]); + intList2.RemoveAt(index3); + flag1 = true; + break; + } + } + } + } + } + if (!flag1) + return; + SoundEngine.PlaySound(7); + } + + public static void MoveCoins(Item[] pInv, Item[] cInv) + { + bool flag1 = false; + int[] numArray1 = new int[4]; + List intList1 = new List(); + List intList2 = new List(); + bool flag2 = false; + int[] numArray2 = new int[40]; + for (int index = 0; index < cInv.Length; ++index) + { + numArray2[index] = -1; + if (cInv[index].stack < 1 || cInv[index].type < 1) + { + intList2.Add(index); + cInv[index] = new Item(); + } + if (cInv[index] != null && cInv[index].stack > 0) + { + int num = 0; + if (cInv[index].type == 71) + num = 1; + if (cInv[index].type == 72) + num = 2; + if (cInv[index].type == 73) + num = 3; + if (cInv[index].type == 74) + num = 4; + numArray2[index] = num - 1; + if (num > 0) + { + numArray1[num - 1] += cInv[index].stack; + intList2.Add(index); + cInv[index] = new Item(); + flag2 = true; + } + } + } + if (!flag2) + return; + for (int index = 0; index < pInv.Length; ++index) + { + if (index != 58 && pInv[index] != null && pInv[index].stack > 0) + { + int num = 0; + if (pInv[index].type == 71) + num = 1; + if (pInv[index].type == 72) + num = 2; + if (pInv[index].type == 73) + num = 3; + if (pInv[index].type == 74) + num = 4; + if (num > 0) + { + flag1 = true; + numArray1[num - 1] += pInv[index].stack; + intList1.Add(index); + pInv[index] = new Item(); + } + } + } + for (int index = 0; index < 3; ++index) + { + while (numArray1[index] >= 100) + { + numArray1[index] -= 100; + ++numArray1[index + 1]; + } + } + for (int index1 = 0; index1 < 40; ++index1) + { + if (numArray2[index1] >= 0 && cInv[index1].type == 0) + { + int index2 = index1; + int index3 = numArray2[index1]; + if (numArray1[index3] > 0) + { + cInv[index2].SetDefaults(71 + index3); + cInv[index2].stack = numArray1[index3]; + if (cInv[index2].stack > cInv[index2].maxStack) + cInv[index2].stack = cInv[index2].maxStack; + numArray1[index3] -= cInv[index2].stack; + numArray2[index1] = -1; + } + if (Main.netMode == 1 && Main.player[Main.myPlayer].chest > -1) + NetMessage.SendData(32, number: Main.player[Main.myPlayer].chest, number2: ((float) index2)); + intList2.Remove(index2); + } + } + for (int index4 = 0; index4 < 40; ++index4) + { + if (numArray2[index4] >= 0 && cInv[index4].type == 0) + { + int index5 = index4; + int index6 = 3; + while (index6 >= 0) + { + if (numArray1[index6] > 0) + { + cInv[index5].SetDefaults(71 + index6); + cInv[index5].stack = numArray1[index6]; + if (cInv[index5].stack > cInv[index5].maxStack) + cInv[index5].stack = cInv[index5].maxStack; + numArray1[index6] -= cInv[index5].stack; + numArray2[index4] = -1; + break; + } + if (numArray1[index6] == 0) + --index6; + } + if (Main.netMode == 1 && Main.player[Main.myPlayer].chest > -1) + NetMessage.SendData(32, number: Main.player[Main.myPlayer].chest, number2: ((float) index5)); + intList2.Remove(index5); + } + } + while (intList2.Count > 0) + { + int index7 = intList2[0]; + int index8 = 3; + while (index8 >= 0) + { + if (numArray1[index8] > 0) + { + cInv[index7].SetDefaults(71 + index8); + cInv[index7].stack = numArray1[index8]; + if (cInv[index7].stack > cInv[index7].maxStack) + cInv[index7].stack = cInv[index7].maxStack; + numArray1[index8] -= cInv[index7].stack; + break; + } + if (numArray1[index8] == 0) + --index8; + } + if (Main.netMode == 1 && Main.player[Main.myPlayer].chest > -1) + NetMessage.SendData(32, number: Main.player[Main.myPlayer].chest, number2: ((float) intList2[0])); + intList2.RemoveAt(0); + } + int index9 = 3; + while (index9 >= 0 && intList1.Count > 0) + { + int index10 = intList1[0]; + if (numArray1[index9] > 0) + { + pInv[index10].SetDefaults(71 + index9); + pInv[index10].stack = numArray1[index9]; + if (pInv[index10].stack > pInv[index10].maxStack) + pInv[index10].stack = pInv[index10].maxStack; + numArray1[index9] -= pInv[index10].stack; + flag1 = false; + intList1.RemoveAt(0); + } + if (numArray1[index9] == 0) + --index9; + } + if (!flag1) + return; + SoundEngine.PlaySound(7); + } + + public static bool TryPlacingInChest(Item I, bool justCheck) + { + bool sync; + Item[] chestinv; + ChestUI.GetContainerUsageInfo(out sync, out chestinv); + if (ChestUI.IsBlockedFromTransferIntoChest(I, chestinv)) + return false; + Player player = Main.player[Main.myPlayer]; + bool flag = false; + if (I.maxStack > 1) + { + for (int index = 0; index < 40; ++index) + { + if (chestinv[index].stack < chestinv[index].maxStack && I.IsTheSameAs(chestinv[index])) + { + int num = I.stack; + if (I.stack + chestinv[index].stack > chestinv[index].maxStack) + num = chestinv[index].maxStack - chestinv[index].stack; + if (justCheck) + { + flag = flag || num > 0; + break; + } + I.stack -= num; + chestinv[index].stack += num; + SoundEngine.PlaySound(7); + if (I.stack <= 0) + { + I.SetDefaults(); + if (sync) + { + NetMessage.SendData(32, number: player.chest, number2: ((float) index)); + break; + } + break; + } + if (chestinv[index].type == 0) + { + chestinv[index] = I.Clone(); + I.SetDefaults(); + } + if (sync) + NetMessage.SendData(32, number: player.chest, number2: ((float) index)); + } + } + } + if (I.stack > 0) + { + for (int index = 0; index < 40; ++index) + { + if (chestinv[index].stack == 0) + { + if (justCheck) + { + flag = true; + break; + } + SoundEngine.PlaySound(7); + chestinv[index] = I.Clone(); + I.SetDefaults(); + if (sync) + { + NetMessage.SendData(32, number: player.chest, number2: ((float) index)); + break; + } + break; + } + } + } + return flag; + } + + public static void GetContainerUsageInfo(out bool sync, out Item[] chestinv) + { + sync = false; + Player player = Main.player[Main.myPlayer]; + chestinv = player.bank.item; + if (player.chest > -1) + { + chestinv = Main.chest[player.chest].item; + sync = Main.netMode == 1; + } + else if (player.chest == -2) + chestinv = player.bank.item; + else if (player.chest == -3) + chestinv = player.bank2.item; + else if (player.chest == -4) + { + chestinv = player.bank3.item; + } + else + { + if (player.chest != -5) + return; + chestinv = player.bank4.item; + } + } + + public static bool IsBlockedFromTransferIntoChest(Item item, Item[] container) => item.type == 3213 && item.favorited && container == Main.LocalPlayer.bank.item || item.type == 4131 && item.favorited && container == Main.LocalPlayer.bank4.item; + + public static bool TryPlacingInPlayer(int slot, bool justCheck) + { + bool flag1 = false; + Player player = Main.player[Main.myPlayer]; + Item[] inventory = player.inventory; + Item[] objArray = player.bank.item; + if (player.chest > -1) + { + objArray = Main.chest[player.chest].item; + flag1 = Main.netMode == 1; + } + else if (player.chest == -2) + objArray = player.bank.item; + else if (player.chest == -3) + objArray = player.bank2.item; + else if (player.chest == -4) + objArray = player.bank3.item; + else if (player.chest == -5) + objArray = player.bank4.item; + Item obj = objArray[slot]; + bool flag2 = false; + if (obj.maxStack > 1) + { + for (int index = 49; index >= 0; --index) + { + if (inventory[index].stack < inventory[index].maxStack && obj.IsTheSameAs(inventory[index])) + { + int num = obj.stack; + if (obj.stack + inventory[index].stack > inventory[index].maxStack) + num = inventory[index].maxStack - inventory[index].stack; + if (justCheck) + { + flag2 = flag2 || num > 0; + break; + } + obj.stack -= num; + inventory[index].stack += num; + SoundEngine.PlaySound(7); + if (obj.stack <= 0) + { + obj.SetDefaults(); + if (flag1) + { + NetMessage.SendData(32, number: player.chest, number2: ((float) index)); + break; + } + break; + } + if (inventory[index].type == 0) + { + inventory[index] = obj.Clone(); + obj.SetDefaults(); + } + if (flag1) + NetMessage.SendData(32, number: player.chest, number2: ((float) index)); + } + } + } + if (obj.stack > 0) + { + for (int index = 49; index >= 0; --index) + { + if (inventory[index].stack == 0) + { + if (justCheck) + { + flag2 = true; + break; + } + SoundEngine.PlaySound(7); + inventory[index] = obj.Clone(); + obj.SetDefaults(); + if (flag1) + { + NetMessage.SendData(32, number: player.chest, number2: ((float) index)); + break; + } + break; + } + } + } + return flag2; + } + + public class ButtonID + { + public const int LootAll = 0; + public const int DepositAll = 1; + public const int QuickStack = 2; + public const int Restock = 3; + public const int Sort = 4; + public const int RenameChest = 5; + public const int RenameChestCancel = 6; + public const int ToggleVacuum = 7; + public const int Count = 7; + } + } +} diff --git a/UI/EmptyDiagnosticsUI.cs b/UI/EmptyDiagnosticsUI.cs new file mode 100644 index 0000000..89d33ba --- /dev/null +++ b/UI/EmptyDiagnosticsUI.cs @@ -0,0 +1,37 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.EmptyDiagnosticsUI +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.UI +{ + public class EmptyDiagnosticsUI : INetDiagnosticsUI + { + public void Reset() + { + } + + public void CountReadMessage(int messageId, int messageLength) + { + } + + public void CountSentMessage(int messageId, int messageLength) + { + } + + public void CountReadModuleMessage(int moduleMessageId, int messageLength) + { + } + + public void CountSentModuleMessage(int moduleMessageId, int messageLength) + { + } + + public void Draw(SpriteBatch spriteBatch) + { + } + } +} diff --git a/UI/FancyErrorPrinter.cs b/UI/FancyErrorPrinter.cs new file mode 100644 index 0000000..972e6ab --- /dev/null +++ b/UI/FancyErrorPrinter.cs @@ -0,0 +1,121 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.FancyErrorPrinter +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using ReLogic.Content; +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using System.Windows.Forms; + +namespace Terraria.UI +{ + public class FancyErrorPrinter + { + public static void ShowFailedToLoadAssetError(Exception exception, string filePath) + { + bool flag = false; + if (exception is UnauthorizedAccessException) + flag = true; + if (exception is FileNotFoundException) + flag = true; + if (exception is DirectoryNotFoundException) + flag = true; + if (exception is AssetLoadException) + flag = true; + if (!flag) + return; + StringBuilder text = new StringBuilder(); + text.AppendLine("Failed to load asset: \"" + filePath.Replace("/", "\\") + "\"!"); + List suggestions = new List(); + suggestions.Add("Try verifying integrity of game files via Steam, the asset may be missing."); + suggestions.Add("If you are using an Anti-virus, please make sure it does not block Terraria in any way."); + text.AppendLine(); + text.AppendLine("Suggestions:"); + FancyErrorPrinter.AppendSuggestions(text, suggestions); + text.AppendLine(); + FancyErrorPrinter.IncludeOriginalMessage(text, exception); + FancyErrorPrinter.ShowTheBox(text.ToString()); + Console.WriteLine(text.ToString()); + } + + public static void ShowFileSavingFailError(Exception exception, string filePath) + { + bool flag = false; + if (exception is UnauthorizedAccessException) + flag = true; + if (exception is FileNotFoundException) + flag = true; + if (exception is DirectoryNotFoundException) + flag = true; + if (!flag) + return; + StringBuilder text = new StringBuilder(); + text.AppendLine("Failed to create the file: \"" + filePath.Replace("/", "\\") + "\"!"); + List suggestions = new List(); + suggestions.Add("If you are using an Anti-virus, please make sure it does not block Terraria in any way."); + suggestions.Add("Try making sure your `Documents/My Games/Terraria` folder is not set to 'read-only'."); + suggestions.Add("Try verifying integrity of game files via Steam."); + if (filePath.ToLower().Contains("onedrive")) + suggestions.Add("Try updating OneDrive."); + text.AppendLine(); + text.AppendLine("Suggestions:"); + FancyErrorPrinter.AppendSuggestions(text, suggestions); + text.AppendLine(); + FancyErrorPrinter.IncludeOriginalMessage(text, exception); + FancyErrorPrinter.ShowTheBox(text.ToString()); + Console.WriteLine(text.ToString()); + } + + public static void ShowDirectoryCreationFailError(Exception exception, string folderPath) + { + bool flag = false; + if (exception is UnauthorizedAccessException) + flag = true; + if (exception is FileNotFoundException) + flag = true; + if (exception is DirectoryNotFoundException) + flag = true; + if (!flag) + return; + StringBuilder text = new StringBuilder(); + text.AppendLine("Failed to create the folder: \"" + folderPath.Replace("/", "\\") + "\"!"); + List suggestions = new List(); + suggestions.Add("If you are using an Anti-virus, please make sure it does not block Terraria in any way."); + suggestions.Add("Try making sure your `Documents/My Games/Terraria` folder is not set to 'read-only'."); + suggestions.Add("Try verifying integrity of game files via Steam."); + if (folderPath.ToLower().Contains("onedrive")) + suggestions.Add("Try updating OneDrive."); + text.AppendLine(); + text.AppendLine("Suggestions:"); + FancyErrorPrinter.AppendSuggestions(text, suggestions); + text.AppendLine(); + FancyErrorPrinter.IncludeOriginalMessage(text, exception); + FancyErrorPrinter.ShowTheBox(text.ToString()); + Console.WriteLine((object) exception); + } + + private static void IncludeOriginalMessage(StringBuilder text, Exception exception) + { + text.AppendLine("The original Error below"); + text.Append((object) exception); + } + + private static void AppendSuggestions(StringBuilder text, List suggestions) + { + for (int index = 0; index < suggestions.Count; ++index) + { + string suggestion = suggestions[index]; + text.AppendLine((index + 1).ToString() + ". " + suggestion); + } + } + + private static void ShowTheBox(string preparedMessage) + { + int num = (int) MessageBox.Show(preparedMessage, "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand); + } + } +} diff --git a/UI/GameInterfaceDrawMethod.cs b/UI/GameInterfaceDrawMethod.cs new file mode 100644 index 0000000..d60dce6 --- /dev/null +++ b/UI/GameInterfaceDrawMethod.cs @@ -0,0 +1,10 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.GameInterfaceDrawMethod +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.UI +{ + public delegate bool GameInterfaceDrawMethod(); +} diff --git a/UI/GameInterfaceLayer.cs b/UI/GameInterfaceLayer.cs new file mode 100644 index 0000000..7170fa7 --- /dev/null +++ b/UI/GameInterfaceLayer.cs @@ -0,0 +1,59 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.GameInterfaceLayer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria.GameInput; + +namespace Terraria.UI +{ + public class GameInterfaceLayer + { + public readonly string Name; + public InterfaceScaleType ScaleType; + + public GameInterfaceLayer(string name, InterfaceScaleType scaleType) + { + this.Name = name; + this.ScaleType = scaleType; + } + + public bool Draw() + { + Matrix transformMatrix; + if (this.ScaleType == InterfaceScaleType.Game) + { + PlayerInput.SetZoom_World(); + transformMatrix = Main.GameViewMatrix.ZoomMatrix; + } + else if (this.ScaleType == InterfaceScaleType.UI) + { + PlayerInput.SetZoom_UI(); + transformMatrix = Main.UIScaleMatrix; + } + else + { + PlayerInput.SetZoom_Unscaled(); + transformMatrix = Matrix.Identity; + } + bool flag = false; + Main.spriteBatch.Begin(SpriteSortMode.Deferred, (BlendState) null, (SamplerState) null, (DepthStencilState) null, (RasterizerState) null, (Effect) null, transformMatrix); + try + { + flag = this.DrawSelf(); + } + catch (Exception ex) + { + TimeLogger.DrawException(ex); + } + Main.spriteBatch.End(); + return flag; + } + + protected virtual bool DrawSelf() => true; + } +} diff --git a/UI/Gamepad/GamepadMainMenuHandler.cs b/UI/Gamepad/GamepadMainMenuHandler.cs new file mode 100644 index 0000000..f37675a --- /dev/null +++ b/UI/Gamepad/GamepadMainMenuHandler.cs @@ -0,0 +1,89 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.Gamepad.GamepadMainMenuHandler +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.GameInput; + +namespace Terraria.UI.Gamepad +{ + public class GamepadMainMenuHandler + { + public static int LastMainMenu = -1; + public static List MenuItemPositions = new List(20); + public static int LastDrew = -1; + public static bool CanRun = false; + + public static void Update() + { + if (!GamepadMainMenuHandler.CanRun) + { + UILinkPage page = UILinkPointNavigator.Pages[1000]; + page.CurrentPoint = page.DefaultPoint; + Vector2 vector2 = new Vector2((float) Math.Cos((double) Main.GlobalTimeWrappedHourly * 6.28318548202515), (float) Math.Sin((double) Main.GlobalTimeWrappedHourly * 6.28318548202515 * 2.0)) * new Vector2(30f, 15f) + Vector2.UnitY * 20f; + UILinkPointNavigator.SetPosition(2000, new Vector2((float) Main.screenWidth, (float) Main.screenHeight) / 2f + vector2); + } + else + { + if (!Main.gameMenu || Main.MenuUI.IsVisible || GamepadMainMenuHandler.LastDrew != Main.menuMode) + return; + int lastMainMenu = GamepadMainMenuHandler.LastMainMenu; + GamepadMainMenuHandler.LastMainMenu = Main.menuMode; + switch (Main.menuMode) + { + case 17: + case 18: + case 19: + case 21: + case 22: + case 23: + case 24: + case 26: + if (GamepadMainMenuHandler.MenuItemPositions.Count >= 4) + { + Vector2 menuItemPosition = GamepadMainMenuHandler.MenuItemPositions[3]; + GamepadMainMenuHandler.MenuItemPositions.RemoveAt(3); + if (Main.menuMode == 17) + { + GamepadMainMenuHandler.MenuItemPositions.Insert(0, menuItemPosition); + break; + } + break; + } + break; + case 28: + if (GamepadMainMenuHandler.MenuItemPositions.Count >= 3) + { + GamepadMainMenuHandler.MenuItemPositions.RemoveAt(1); + break; + } + break; + } + UILinkPage page = UILinkPointNavigator.Pages[1000]; + if (lastMainMenu != Main.menuMode) + page.CurrentPoint = page.DefaultPoint; + for (int index = 0; index < GamepadMainMenuHandler.MenuItemPositions.Count; ++index) + { + Vector2 vector2 = GamepadMainMenuHandler.MenuItemPositions[index] * Main.UIScale; + if (index == 0 && lastMainMenu != GamepadMainMenuHandler.LastMainMenu && PlayerInput.UsingGamepad && Main.InvisibleCursorForGamepad) + { + Main.mouseX = PlayerInput.MouseX = (int) vector2.X; + Main.mouseY = PlayerInput.MouseY = (int) vector2.Y; + Main.menuFocus = -1; + } + UILinkPoint link = page.LinkMap[2000 + index]; + link.Position = vector2; + link.Up = index != 0 ? 2000 + index - 1 : -1; + link.Left = -3; + link.Right = -4; + link.Down = index != GamepadMainMenuHandler.MenuItemPositions.Count - 1 ? 2000 + index + 1 : -2; + } + GamepadMainMenuHandler.MenuItemPositions.Clear(); + } + } + } +} diff --git a/UI/Gamepad/GamepadPageID.cs b/UI/Gamepad/GamepadPageID.cs new file mode 100644 index 0000000..0fcd811 --- /dev/null +++ b/UI/Gamepad/GamepadPageID.cs @@ -0,0 +1,41 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.Gamepad.GamepadPageID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.UI.Gamepad +{ + public static class GamepadPageID + { + public const int None = -1; + public const int Inventory = 0; + public const int Coins = 1; + public const int Ammo = 2; + public const int Armor = 3; + public const int Chest = 4; + public const int Reforge = 5; + public const int NPCHousing = 6; + public const int Equipment = 7; + public const int Tabs = 8; + public const int CraftSmall = 9; + public const int CraftsBig = 10; + public const int HairCustomizationStyle = 11; + public const int HairCustomizationColor = 12; + public const int NPCShop = 13; + public const int ClothCustomizationStyle = 14; + public const int ClothCustomizationColor = 15; + public const int PVP = 16; + public const int InfoAccs = 17; + public const int BuilderAccs = 18; + public const int BuffsOnEquipment = 19; + public const int DisplayDoll = 20; + public const int HatRack = 21; + public const int MainMenu = 1000; + public const int IngameOptionsLeft = 1001; + public const int IngameOptionsRight = 1002; + public const int NPCChat = 1003; + public const int FancyUI = 1004; + public const int CreativeMenu = 1005; + } +} diff --git a/UI/Gamepad/GamepadPointID.cs b/UI/Gamepad/GamepadPointID.cs new file mode 100644 index 0000000..591f08c --- /dev/null +++ b/UI/Gamepad/GamepadPointID.cs @@ -0,0 +1,238 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.Gamepad.GamepadPointID +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.UI.Gamepad +{ + public static class GamepadPointID + { + public const int EndUp = -1; + public const int EndDown = -2; + public const int EndLeft = -3; + public const int EndRight = -4; + public const int Inventory0 = 0; + public const int Inventory1 = 1; + public const int Inventory2 = 2; + public const int Inventory3 = 3; + public const int Inventory4 = 4; + public const int Inventory5 = 5; + public const int Inventory6 = 6; + public const int Inventory7 = 7; + public const int Inventory8 = 8; + public const int Inventory9 = 9; + public const int Inventory10 = 10; + public const int Inventory11 = 11; + public const int Inventory12 = 12; + public const int Inventory13 = 13; + public const int Inventory14 = 14; + public const int Inventory15 = 15; + public const int Inventory16 = 16; + public const int Inventory17 = 17; + public const int Inventory18 = 18; + public const int Inventory19 = 19; + public const int Inventory20 = 20; + public const int Inventory21 = 21; + public const int Inventory22 = 22; + public const int Inventory23 = 23; + public const int Inventory24 = 24; + public const int Inventory25 = 25; + public const int Inventory26 = 26; + public const int Inventory27 = 27; + public const int Inventory28 = 28; + public const int Inventory29 = 29; + public const int Inventory30 = 30; + public const int Inventory31 = 31; + public const int Inventory32 = 32; + public const int Inventory33 = 33; + public const int Inventory34 = 34; + public const int Inventory35 = 35; + public const int Inventory36 = 36; + public const int Inventory37 = 37; + public const int Inventory38 = 38; + public const int Inventory39 = 39; + public const int Inventory40 = 40; + public const int Inventory41 = 41; + public const int Inventory42 = 42; + public const int Inventory43 = 43; + public const int Inventory44 = 44; + public const int Inventory45 = 45; + public const int Inventory46 = 46; + public const int Inventory47 = 47; + public const int Inventory48 = 48; + public const int Inventory49 = 49; + public const int Coins0 = 50; + public const int Coins1 = 51; + public const int Coins2 = 52; + public const int Coins3 = 53; + public const int Ammo0 = 54; + public const int Ammo1 = 55; + public const int Ammo2 = 56; + public const int Ammo3 = 57; + public const int Armor0 = 100; + public const int Armor1 = 101; + public const int Armor2 = 102; + public const int Armor3 = 103; + public const int Armor4 = 104; + public const int Armor5 = 105; + public const int Armor6 = 106; + public const int Armor7 = 107; + public const int Armor8 = 108; + public const int Armor9 = 109; + public const int Armor10 = 110; + public const int Armor11 = 111; + public const int Armor12 = 112; + public const int Armor13 = 113; + public const int Armor14 = 114; + public const int Armor15 = 115; + public const int Armor16 = 116; + public const int Armor17 = 117; + public const int Armor18 = 118; + public const int Armor19 = 119; + public const int DyeArmor0 = 120; + public const int DyeArmor1 = 121; + public const int DyeArmor2 = 122; + public const int DyeArmor3 = 123; + public const int DyeArmor4 = 124; + public const int DyeArmor5 = 125; + public const int DyeArmor6 = 126; + public const int DyeArmor7 = 127; + public const int DyeArmor8 = 128; + public const int DyeArmor9 = 129; + public const int Equips0 = 180; + public const int Equips1 = 181; + public const int Equips2 = 182; + public const int Equips3 = 183; + public const int Equips4 = 184; + public const int DyeEquips0 = 185; + public const int DyeEquips1 = 186; + public const int DyeEquips2 = 187; + public const int DyeEquips3 = 188; + public const int DyeEquips4 = 189; + public const int TrashItem = 300; + public const int QuickStackToNearbyChests = 301; + public const int SortInventory = 302; + public const int ReforgeSlot = 303; + public const int ReforgeButton = 304; + public const int TabEquips = 305; + public const int TabNPCs = 306; + public const int TabCamera = 307; + public const int TabSettings = 308; + public const int EmoteMenu = 309; + public const int BestiaryMenu = 310; + public const int CreativeMenuToggle = 311; + public const int Chest0 = 400; + public const int Chest1 = 401; + public const int Chest2 = 402; + public const int Chest3 = 403; + public const int Chest4 = 404; + public const int Chest5 = 405; + public const int Chest6 = 406; + public const int Chest7 = 407; + public const int Chest8 = 408; + public const int Chest9 = 409; + public const int Chest10 = 410; + public const int Chest11 = 411; + public const int Chest12 = 412; + public const int Chest13 = 413; + public const int Chest14 = 414; + public const int Chest15 = 415; + public const int Chest16 = 416; + public const int Chest17 = 417; + public const int Chest18 = 418; + public const int Chest19 = 419; + public const int Chest20 = 420; + public const int Chest21 = 421; + public const int Chest22 = 422; + public const int Chest23 = 423; + public const int Chest24 = 424; + public const int Chest25 = 425; + public const int Chest26 = 426; + public const int Chest27 = 427; + public const int Chest28 = 428; + public const int Chest29 = 429; + public const int Chest30 = 430; + public const int Chest31 = 431; + public const int Chest32 = 432; + public const int Chest33 = 433; + public const int Chest34 = 434; + public const int Chest35 = 435; + public const int Chest36 = 436; + public const int Chest37 = 437; + public const int Chest38 = 438; + public const int Chest39 = 439; + public const int ChestActLootAll = 500; + public const int ChestActDepositAll = 501; + public const int ChestActQuickStack = 502; + public const int ChestActRestock = 503; + public const int ChestActRenameChest = 504; + public const int ChestSort = 505; + public const int ChestToggleVacuum = 506; + public const int NPCHousing0 = 600; + public const int CraftsBig = 700; + public const int CraftsSmall = 1500; + public const int PVP0 = 1550; + public const int PVPShield = 1557; + public const int AchievementAdvisor = 1570; + public const int MainMenu = 2000; + public const int MenuHack1 = 2001; + public const int MenuHack2 = 2002; + public const int MenuHack3 = 2003; + public const int MenuHack4 = 2004; + public const int MenuHack5 = 2005; + public const int MenuHack6 = 2006; + public const int MenuHack7 = 2007; + public const int MenuHack8 = 2008; + public const int MenuHack9 = 2009; + public const int MenuHack10 = 2010; + public const int MenuHack11 = 2011; + public const int MenuHack12 = 2012; + public const int MenuHack13 = 2013; + public const int MenuHack14 = 2014; + public const int MenuHack15 = 2015; + public const int MenuHack16 = 2016; + public const int MenuHack17 = 2017; + public const int MenuHack18 = 2018; + public const int MenuHack19 = 2019; + public const int NPCChat0 = 2500; + public const int NPCChat1 = 2501; + public const int NPCChat2 = 2502; + public const int NPCChat3 = 2503; + public const int StylistColorH = 2600; + public const int StylistColorS = 2601; + public const int StylistColorL = 2602; + public const int StylistColorOk = 2603; + public const int StylistColorClose = 2604; + public const int StylistStyle0 = 2605; + public const int NPCShop0 = 2700; + public const int NPCShop37 = 2737; + public const int NPCShop38 = 2738; + public const int NPCShop39 = 2739; + public const int ClothColorH = 2800; + public const int ClothColorS = 2801; + public const int ClothColorL = 2802; + public const int ClothColorOk = 2803; + public const int ClothColorClose = 2804; + public const int ClothStyle = 2805; + public const int ClothPicker0 = 2806; + public const int ClothPicker1 = 2807; + public const int ClothPicker2 = 2808; + public const int ClothPicker3 = 2809; + public const int ClothPicker4 = 2810; + public const int ClothPicker5 = 2811; + public const int IngameOptionsLeft0 = 2900; + public const int IngameOptionsRight0 = 2930; + public const int FancyUI0 = 3000; + public const int FancyUILast = 4999; + public const int HatRack0 = 5000; + public const int HatRack3 = 5003; + public const int DisplayDoll0 = 5100; + public const int DisplayDoll15 = 5115; + public const int BuilderAccs = 6000; + public const int BuffsForEquips = 9000; + public const int CreativeMenu0 = 10000; + public const int CreativeMenuLast = 11000; + public const int CreativeResearchItem0 = 15000; + } +} diff --git a/UI/Gamepad/UILinkPage.cs b/UI/Gamepad/UILinkPage.cs new file mode 100644 index 0000000..ec92abb --- /dev/null +++ b/UI/Gamepad/UILinkPage.cs @@ -0,0 +1,114 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.Gamepad.UILinkPage +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; + +namespace Terraria.UI.Gamepad +{ + public class UILinkPage + { + public int ID; + public int PageOnLeft = -1; + public int PageOnRight = -1; + public int DefaultPoint; + public int CurrentPoint; + public Dictionary LinkMap = new Dictionary(); + + public event Action ReachEndEvent; + + public event Action TravelEvent; + + public event Action LeaveEvent; + + public event Action EnterEvent; + + public event Action UpdateEvent; + + public event Func IsValidEvent; + + public event Func CanEnterEvent; + + public event Action OnPageMoveAttempt; + + public UILinkPage() + { + } + + public UILinkPage(int id) => this.ID = id; + + public void Update() + { + if (this.UpdateEvent == null) + return; + this.UpdateEvent(); + } + + public void Leave() + { + if (this.LeaveEvent == null) + return; + this.LeaveEvent(); + } + + public void Enter() + { + if (this.EnterEvent == null) + return; + this.EnterEvent(); + } + + public bool IsValid() => this.IsValidEvent == null || this.IsValidEvent(); + + public bool CanEnter() => this.CanEnterEvent == null || this.CanEnterEvent(); + + public void TravelUp() => this.Travel(this.LinkMap[this.CurrentPoint].Up); + + public void TravelDown() => this.Travel(this.LinkMap[this.CurrentPoint].Down); + + public void TravelLeft() => this.Travel(this.LinkMap[this.CurrentPoint].Left); + + public void TravelRight() => this.Travel(this.LinkMap[this.CurrentPoint].Right); + + public void SwapPageLeft() + { + if (this.OnPageMoveAttempt != null) + this.OnPageMoveAttempt(-1); + UILinkPointNavigator.ChangePage(this.PageOnLeft); + } + + public void SwapPageRight() + { + if (this.OnPageMoveAttempt != null) + this.OnPageMoveAttempt(1); + UILinkPointNavigator.ChangePage(this.PageOnRight); + } + + private void Travel(int next) + { + if (next < 0) + { + if (this.ReachEndEvent == null) + return; + this.ReachEndEvent(this.CurrentPoint, next); + if (this.TravelEvent == null) + return; + this.TravelEvent(); + } + else + { + UILinkPointNavigator.ChangePoint(next); + if (this.TravelEvent == null) + return; + this.TravelEvent(); + } + } + + public event Func OnSpecialInteracts; + + public string SpecialInteractions() => this.OnSpecialInteracts != null ? this.OnSpecialInteracts() : string.Empty; + } +} diff --git a/UI/Gamepad/UILinkPoint.cs b/UI/Gamepad/UILinkPoint.cs new file mode 100644 index 0000000..f14f321 --- /dev/null +++ b/UI/Gamepad/UILinkPoint.cs @@ -0,0 +1,48 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.Gamepad.UILinkPoint +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; + +namespace Terraria.UI.Gamepad +{ + public class UILinkPoint + { + public int ID; + public bool Enabled; + public Vector2 Position; + public int Left; + public int Right; + public int Up; + public int Down; + + public int Page { get; private set; } + + public UILinkPoint(int id, bool enabled, int left, int right, int up, int down) + { + this.ID = id; + this.Enabled = enabled; + this.Left = left; + this.Right = right; + this.Up = up; + this.Down = down; + } + + public void SetPage(int page) => this.Page = page; + + public void Unlink() + { + this.Left = -3; + this.Right = -4; + this.Up = -1; + this.Down = -2; + } + + public event Func OnSpecialInteracts; + + public string SpecialInteractions() => this.OnSpecialInteracts != null ? this.OnSpecialInteracts() : string.Empty; + } +} diff --git a/UI/Gamepad/UILinkPointNavigator.cs b/UI/Gamepad/UILinkPointNavigator.cs new file mode 100644 index 0000000..47219f1 --- /dev/null +++ b/UI/Gamepad/UILinkPointNavigator.cs @@ -0,0 +1,335 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.Gamepad.UILinkPointNavigator +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.GameContent.Tile_Entities; +using Terraria.GameInput; + +namespace Terraria.UI.Gamepad +{ + public class UILinkPointNavigator + { + public static Dictionary Pages = new Dictionary(); + public static Dictionary Points = new Dictionary(); + public static int CurrentPage = 1000; + public static int OldPage = 1000; + private static int XCooldown; + private static int YCooldown; + private static Vector2 LastInput; + private static int PageLeftCD; + private static int PageRightCD; + public static bool InUse; + public static int OverridePoint = -1; + + public static int CurrentPoint => UILinkPointNavigator.Pages[UILinkPointNavigator.CurrentPage].CurrentPoint; + + public static bool Available => Main.playerInventory || Main.ingameOptionsWindow || Main.player[Main.myPlayer].talkNPC != -1 || Main.player[Main.myPlayer].sign != -1 || Main.mapFullscreen || Main.clothesWindow || Main.MenuUI.IsVisible || Main.InGameUI.IsVisible; + + public static void GoToDefaultPage(int specialFlag = 0) + { + TileEntity tileEntity = Main.LocalPlayer.tileEntityAnchor.GetTileEntity(); + if (Main.MenuUI.IsVisible) + UILinkPointNavigator.CurrentPage = 1004; + else if (Main.InGameUI.IsVisible || specialFlag == 1) + UILinkPointNavigator.CurrentPage = 1004; + else if (Main.gameMenu) + UILinkPointNavigator.CurrentPage = 1000; + else if (Main.ingameOptionsWindow) + UILinkPointNavigator.CurrentPage = 1001; + else if (Main.CreativeMenu.Enabled) + UILinkPointNavigator.CurrentPage = 1005; + else if (Main.hairWindow) + UILinkPointNavigator.CurrentPage = 12; + else if (Main.clothesWindow) + UILinkPointNavigator.CurrentPage = 15; + else if (Main.npcShop != 0) + UILinkPointNavigator.CurrentPage = 13; + else if (Main.InGuideCraftMenu) + UILinkPointNavigator.CurrentPage = 9; + else if (Main.InReforgeMenu) + UILinkPointNavigator.CurrentPage = 5; + else if (Main.player[Main.myPlayer].chest != -1) + UILinkPointNavigator.CurrentPage = 4; + else if (tileEntity is TEDisplayDoll) + UILinkPointNavigator.CurrentPage = 20; + else if (tileEntity is TEHatRack) + UILinkPointNavigator.CurrentPage = 21; + else if (Main.player[Main.myPlayer].talkNPC != -1 || Main.player[Main.myPlayer].sign != -1) + UILinkPointNavigator.CurrentPage = 1003; + else + UILinkPointNavigator.CurrentPage = 0; + } + + public static void Update() + { + bool inUse = UILinkPointNavigator.InUse; + UILinkPointNavigator.InUse = false; + bool flag1 = true; + if (flag1) + { + switch (PlayerInput.CurrentInputMode) + { + case InputMode.Keyboard: + case InputMode.KeyboardUI: + case InputMode.Mouse: + if (!Main.gameMenu) + { + flag1 = false; + break; + } + break; + } + } + if (flag1 && PlayerInput.NavigatorRebindingLock > 0) + flag1 = false; + if (flag1 && !Main.gameMenu && !PlayerInput.UsingGamepadUI) + flag1 = false; + if (flag1 && !Main.gameMenu && PlayerInput.InBuildingMode) + flag1 = false; + if (flag1 && !Main.gameMenu && !UILinkPointNavigator.Available) + flag1 = false; + bool flag2 = false; + UILinkPage uiLinkPage; + if (!UILinkPointNavigator.Pages.TryGetValue(UILinkPointNavigator.CurrentPage, out uiLinkPage)) + flag2 = true; + else if (!uiLinkPage.IsValid()) + flag2 = true; + if (flag2) + { + UILinkPointNavigator.GoToDefaultPage(); + UILinkPointNavigator.ProcessChanges(); + flag1 = false; + } + if (inUse != flag1) + { + if (!flag1) + { + uiLinkPage.Leave(); + UILinkPointNavigator.GoToDefaultPage(); + UILinkPointNavigator.ProcessChanges(); + } + else + { + UILinkPointNavigator.GoToDefaultPage(); + UILinkPointNavigator.ProcessChanges(); + uiLinkPage.Enter(); + } + if (flag1) + { + Main.player[Main.myPlayer].releaseInventory = false; + Main.player[Main.myPlayer].releaseUseTile = false; + PlayerInput.LockGamepadTileUseButton = true; + } + if (!Main.gameMenu) + { + if (flag1) + PlayerInput.NavigatorCachePosition(); + else + PlayerInput.NavigatorUnCachePosition(); + } + } + if (!flag1) + return; + UILinkPointNavigator.InUse = true; + UILinkPointNavigator.OverridePoint = -1; + if (UILinkPointNavigator.PageLeftCD > 0) + --UILinkPointNavigator.PageLeftCD; + if (UILinkPointNavigator.PageRightCD > 0) + --UILinkPointNavigator.PageRightCD; + Vector2 navigatorDirections = PlayerInput.Triggers.Current.GetNavigatorDirections(); + int num1 = !PlayerInput.Triggers.Current.HotbarMinus ? 0 : (!PlayerInput.Triggers.Current.HotbarPlus ? 1 : 0); + bool flag3 = PlayerInput.Triggers.Current.HotbarPlus && !PlayerInput.Triggers.Current.HotbarMinus; + if (num1 == 0) + UILinkPointNavigator.PageLeftCD = 0; + if (!flag3) + UILinkPointNavigator.PageRightCD = 0; + int num2 = num1 == 0 ? 0 : (UILinkPointNavigator.PageLeftCD == 0 ? 1 : 0); + bool flag4 = flag3 && UILinkPointNavigator.PageRightCD == 0; + if ((double) UILinkPointNavigator.LastInput.X != (double) navigatorDirections.X) + UILinkPointNavigator.XCooldown = 0; + if ((double) UILinkPointNavigator.LastInput.Y != (double) navigatorDirections.Y) + UILinkPointNavigator.YCooldown = 0; + if (UILinkPointNavigator.XCooldown > 0) + --UILinkPointNavigator.XCooldown; + if (UILinkPointNavigator.YCooldown > 0) + --UILinkPointNavigator.YCooldown; + UILinkPointNavigator.LastInput = navigatorDirections; + if (num2 != 0) + UILinkPointNavigator.PageLeftCD = 16; + if (flag4) + UILinkPointNavigator.PageRightCD = 16; + UILinkPointNavigator.Pages[UILinkPointNavigator.CurrentPage].Update(); + int num3 = 10; + if (!Main.gameMenu && Main.playerInventory && !Main.ingameOptionsWindow && !Main.inFancyUI && (UILinkPointNavigator.CurrentPage == 0 || UILinkPointNavigator.CurrentPage == 4 || UILinkPointNavigator.CurrentPage == 2 || UILinkPointNavigator.CurrentPage == 1 || UILinkPointNavigator.CurrentPage == 20 || UILinkPointNavigator.CurrentPage == 21)) + num3 = PlayerInput.CurrentProfile.InventoryMoveCD; + if ((double) navigatorDirections.X == -1.0 && UILinkPointNavigator.XCooldown == 0) + { + UILinkPointNavigator.XCooldown = num3; + UILinkPointNavigator.Pages[UILinkPointNavigator.CurrentPage].TravelLeft(); + } + if ((double) navigatorDirections.X == 1.0 && UILinkPointNavigator.XCooldown == 0) + { + UILinkPointNavigator.XCooldown = num3; + UILinkPointNavigator.Pages[UILinkPointNavigator.CurrentPage].TravelRight(); + } + if ((double) navigatorDirections.Y == -1.0 && UILinkPointNavigator.YCooldown == 0) + { + UILinkPointNavigator.YCooldown = num3; + UILinkPointNavigator.Pages[UILinkPointNavigator.CurrentPage].TravelUp(); + } + if ((double) navigatorDirections.Y == 1.0 && UILinkPointNavigator.YCooldown == 0) + { + UILinkPointNavigator.YCooldown = num3; + UILinkPointNavigator.Pages[UILinkPointNavigator.CurrentPage].TravelDown(); + } + UILinkPointNavigator.XCooldown = UILinkPointNavigator.YCooldown = Math.Max(UILinkPointNavigator.XCooldown, UILinkPointNavigator.YCooldown); + if (num2 != 0) + UILinkPointNavigator.Pages[UILinkPointNavigator.CurrentPage].SwapPageLeft(); + if (flag4) + UILinkPointNavigator.Pages[UILinkPointNavigator.CurrentPage].SwapPageRight(); + if (PlayerInput.Triggers.Current.UsedMovementKey) + { + Vector2 position = UILinkPointNavigator.Points[UILinkPointNavigator.CurrentPoint].Position; + Vector2 vector2_1 = new Vector2((float) PlayerInput.MouseX, (float) PlayerInput.MouseY); + float num4 = 0.3f; + if (PlayerInput.InvisibleGamepadInMenus) + num4 = 1f; + Vector2 vector2_2 = position; + double num5 = (double) num4; + Vector2 vector2_3 = Vector2.Lerp(vector2_1, vector2_2, (float) num5); + if (Main.gameMenu) + { + if ((double) Math.Abs(vector2_3.X - position.X) <= 5.0) + vector2_3.X = position.X; + if ((double) Math.Abs(vector2_3.Y - position.Y) <= 5.0) + vector2_3.Y = position.Y; + } + PlayerInput.MouseX = (int) vector2_3.X; + PlayerInput.MouseY = (int) vector2_3.Y; + } + UILinkPointNavigator.ResetFlagsEnd(); + } + + public static void ResetFlagsEnd() + { + UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 0; + UILinkPointNavigator.Shortcuts.BackButtonLock = false; + UILinkPointNavigator.Shortcuts.BackButtonCommand = 0; + } + + public static string GetInstructions() + { + string str1 = UILinkPointNavigator.Pages[UILinkPointNavigator.CurrentPage].SpecialInteractions(); + string str2 = UILinkPointNavigator.Points[UILinkPointNavigator.CurrentPoint].SpecialInteractions(); + if (!string.IsNullOrEmpty(str2)) + { + if (string.IsNullOrEmpty(str1)) + return str2; + str1 = str1 + " " + str2; + } + return str1; + } + + public static void ForceMovementCooldown(int time) + { + UILinkPointNavigator.LastInput = PlayerInput.Triggers.Current.GetNavigatorDirections(); + UILinkPointNavigator.XCooldown = time; + UILinkPointNavigator.YCooldown = time; + } + + public static void SetPosition(int ID, Vector2 Position) => UILinkPointNavigator.Points[ID].Position = Position * Main.UIScale; + + public static void RegisterPage(UILinkPage page, int ID, bool automatedDefault = true) + { + if (automatedDefault) + page.DefaultPoint = page.LinkMap.Keys.First(); + page.CurrentPoint = page.DefaultPoint; + page.ID = ID; + UILinkPointNavigator.Pages.Add(page.ID, page); + foreach (KeyValuePair link in page.LinkMap) + { + link.Value.SetPage(ID); + UILinkPointNavigator.Points.Add(link.Key, link.Value); + } + } + + public static void ChangePage(int PageID) + { + if (!UILinkPointNavigator.Pages.ContainsKey(PageID) || !UILinkPointNavigator.Pages[PageID].CanEnter()) + return; + SoundEngine.PlaySound(12); + UILinkPointNavigator.CurrentPage = PageID; + UILinkPointNavigator.ProcessChanges(); + } + + public static void ChangePoint(int PointID) + { + if (!UILinkPointNavigator.Points.ContainsKey(PointID)) + return; + UILinkPointNavigator.CurrentPage = UILinkPointNavigator.Points[PointID].Page; + UILinkPointNavigator.OverridePoint = PointID; + UILinkPointNavigator.ProcessChanges(); + } + + public static void ProcessChanges() + { + UILinkPage page = UILinkPointNavigator.Pages[UILinkPointNavigator.OldPage]; + if (UILinkPointNavigator.OldPage != UILinkPointNavigator.CurrentPage) + { + page.Leave(); + if (!UILinkPointNavigator.Pages.TryGetValue(UILinkPointNavigator.CurrentPage, out page)) + { + UILinkPointNavigator.GoToDefaultPage(); + UILinkPointNavigator.ProcessChanges(); + UILinkPointNavigator.OverridePoint = -1; + } + page.CurrentPoint = page.DefaultPoint; + page.Enter(); + page.Update(); + UILinkPointNavigator.OldPage = UILinkPointNavigator.CurrentPage; + } + if (UILinkPointNavigator.OverridePoint == -1 || !page.LinkMap.ContainsKey(UILinkPointNavigator.OverridePoint)) + return; + page.CurrentPoint = UILinkPointNavigator.OverridePoint; + } + + public static class Shortcuts + { + public static int NPCS_IconsPerColumn = 100; + public static int NPCS_IconsTotal = 0; + public static int NPCS_LastHovered = -2; + public static bool NPCS_IconsDisplay = false; + public static int CRAFT_IconsPerRow = 100; + public static int CRAFT_IconsPerColumn = 100; + public static int CRAFT_CurrentIngridientsCount = 0; + public static int CRAFT_CurrentRecipeBig = 0; + public static int CRAFT_CurrentRecipeSmall = 0; + public static bool NPCCHAT_ButtonsLeft = false; + public static bool NPCCHAT_ButtonsMiddle = false; + public static bool NPCCHAT_ButtonsRight = false; + public static bool NPCCHAT_ButtonsRight2 = false; + public static int INGAMEOPTIONS_BUTTONS_LEFT = 0; + public static int INGAMEOPTIONS_BUTTONS_RIGHT = 0; + public static bool CREATIVE_ItemSlotShouldHighlightAsSelected = false; + public static int OPTIONS_BUTTON_SPECIALFEATURE; + public static int BackButtonCommand; + public static bool BackButtonInUse = false; + public static bool BackButtonLock; + public static int FANCYUI_HIGHEST_INDEX = 1; + public static int FANCYUI_SPECIAL_INSTRUCTIONS = 0; + public static int INFOACCCOUNT = 0; + public static int BUILDERACCCOUNT = 0; + public static int BUFFS_PER_COLUMN = 0; + public static int BUFFS_DRAWN = 0; + public static int INV_MOVE_OPTION_CD = 0; + } + } +} diff --git a/UI/IInGameNotification.cs b/UI/IInGameNotification.cs new file mode 100644 index 0000000..9b9354e --- /dev/null +++ b/UI/IInGameNotification.cs @@ -0,0 +1,29 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.IInGameNotification +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.UI +{ + public interface IInGameNotification + { + object CreationObject { get; } + + bool ShouldBeRemoved { get; } + + void Update(); + + void DrawInGame(SpriteBatch spriteBatch, Vector2 bottomAnchorPosition); + + void PushAnchor(ref Vector2 positionAnchorBottom); + + void DrawInNotificationsArea( + SpriteBatch spriteBatch, + Rectangle area, + ref int gamepadPointLocalIndexTouse); + } +} diff --git a/UI/INetDiagnosticsUI.cs b/UI/INetDiagnosticsUI.cs new file mode 100644 index 0000000..c1bb7f7 --- /dev/null +++ b/UI/INetDiagnosticsUI.cs @@ -0,0 +1,25 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.INetDiagnosticsUI +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework.Graphics; + +namespace Terraria.UI +{ + public interface INetDiagnosticsUI + { + void Reset(); + + void Draw(SpriteBatch spriteBatch); + + void CountReadMessage(int messageId, int messageLength); + + void CountSentMessage(int messageId, int messageLength); + + void CountReadModuleMessage(int moduleMessageId, int messageLength); + + void CountSentModuleMessage(int moduleMessageId, int messageLength); + } +} diff --git a/UI/InGameNotificationsTracker.cs b/UI/InGameNotificationsTracker.cs new file mode 100644 index 0000000..73c7798 --- /dev/null +++ b/UI/InGameNotificationsTracker.cs @@ -0,0 +1,102 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.InGameNotificationsTracker +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; +using Terraria.Achievements; +using Terraria.GameInput; +using Terraria.Social; +using Terraria.Social.Base; + +namespace Terraria.UI +{ + public class InGameNotificationsTracker + { + private static List _notifications = new List(); + + public static void Initialize() + { + Main.Achievements.OnAchievementCompleted += new Achievement.AchievementCompleted(InGameNotificationsTracker.AddCompleted); + SocialAPI.JoinRequests.OnRequestAdded += new ServerJoinRequestEvent(InGameNotificationsTracker.JoinRequests_OnRequestAdded); + SocialAPI.JoinRequests.OnRequestRemoved += new ServerJoinRequestEvent(InGameNotificationsTracker.JoinRequests_OnRequestRemoved); + } + + private static void JoinRequests_OnRequestAdded(UserJoinToServerRequest request) => InGameNotificationsTracker.AddJoinRequest(request); + + private static void JoinRequests_OnRequestRemoved(UserJoinToServerRequest request) + { + for (int index = InGameNotificationsTracker._notifications.Count - 1; index >= 0; --index) + { + if (InGameNotificationsTracker._notifications[index].CreationObject == request) + InGameNotificationsTracker._notifications.RemoveAt(index); + } + } + + public static void DrawInGame(SpriteBatch sb) + { + float y = (float) (Main.screenHeight - 40); + if (PlayerInput.UsingGamepad) + y -= 25f; + Vector2 positionAnchorBottom = new Vector2((float) (Main.screenWidth / 2), y); + foreach (IInGameNotification notification in InGameNotificationsTracker._notifications) + { + notification.DrawInGame(sb, positionAnchorBottom); + notification.PushAnchor(ref positionAnchorBottom); + if ((double) positionAnchorBottom.Y < -100.0) + break; + } + } + + public static void DrawInIngameOptions( + SpriteBatch spriteBatch, + Rectangle area, + ref int gamepadPointIdLocalIndexToUse) + { + int num1 = 4; + int height = area.Height / 5 - num1; + Rectangle area1 = new Rectangle(area.X, area.Y, area.Width - 6, height); + int num2 = 0; + foreach (IInGameNotification notification in InGameNotificationsTracker._notifications) + { + notification.DrawInNotificationsArea(spriteBatch, area1, ref gamepadPointIdLocalIndexToUse); + area1.Y += height + num1; + ++num2; + if (num2 >= 5) + break; + } + } + + public static void AddCompleted(Achievement achievement) + { + if (Main.netMode == 2) + return; + InGameNotificationsTracker._notifications.Add((IInGameNotification) new InGamePopups.AchievementUnlockedPopup(achievement)); + } + + public static void AddJoinRequest(UserJoinToServerRequest request) + { + if (Main.netMode == 2) + return; + InGameNotificationsTracker._notifications.Add((IInGameNotification) new InGamePopups.PlayerWantsToJoinGamePopup(request)); + } + + public static void Clear() => InGameNotificationsTracker._notifications.Clear(); + + public static void Update() + { + for (int index = 0; index < InGameNotificationsTracker._notifications.Count; ++index) + { + InGameNotificationsTracker._notifications[index].Update(); + if (InGameNotificationsTracker._notifications[index].ShouldBeRemoved) + { + InGameNotificationsTracker._notifications.Remove(InGameNotificationsTracker._notifications[index]); + --index; + } + } + } + } +} diff --git a/UI/InGamePopups.cs b/UI/InGamePopups.cs new file mode 100644 index 0000000..a0aff0b --- /dev/null +++ b/UI/InGamePopups.cs @@ -0,0 +1,275 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.InGamePopups +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.Achievements; +using Terraria.GameContent; +using Terraria.GameInput; +using Terraria.Social.Base; + +namespace Terraria.UI +{ + public class InGamePopups + { + public class AchievementUnlockedPopup : IInGameNotification + { + private Achievement _theAchievement; + private Asset _achievementTexture; + private Asset _achievementBorderTexture; + private const int _iconSize = 64; + private const int _iconSizeWithSpace = 66; + private const int _iconsPerRow = 8; + private int _iconIndex; + private Rectangle _achievementIconFrame; + private string _title; + private int _ingameDisplayTimeLeft; + + public bool ShouldBeRemoved { get; private set; } + + public object CreationObject { get; private set; } + + public AchievementUnlockedPopup(Achievement achievement) + { + this.CreationObject = (object) achievement; + this._ingameDisplayTimeLeft = 300; + this._theAchievement = achievement; + this._title = achievement.FriendlyName.Value; + int iconIndex = Main.Achievements.GetIconIndex(achievement.Name); + this._iconIndex = iconIndex; + this._achievementIconFrame = new Rectangle(iconIndex % 8 * 66, iconIndex / 8 * 66, 64, 64); + this._achievementTexture = Main.Assets.Request("Images/UI/Achievements", (AssetRequestMode) 2); + this._achievementBorderTexture = Main.Assets.Request("Images/UI/Achievement_Borders", (AssetRequestMode) 2); + } + + public void Update() + { + --this._ingameDisplayTimeLeft; + if (this._ingameDisplayTimeLeft >= 0) + return; + this._ingameDisplayTimeLeft = 0; + } + + private float Scale + { + get + { + if (this._ingameDisplayTimeLeft < 30) + return MathHelper.Lerp(0.0f, 1f, (float) this._ingameDisplayTimeLeft / 30f); + return this._ingameDisplayTimeLeft > 285 ? MathHelper.Lerp(1f, 0.0f, (float) (((double) this._ingameDisplayTimeLeft - 285.0) / 15.0)) : 1f; + } + } + + private float Opacity + { + get + { + float scale = this.Scale; + return (double) scale <= 0.5 ? 0.0f : (float) (((double) scale - 0.5) / 0.5); + } + } + + public void PushAnchor(ref Vector2 anchorPosition) + { + float num = 50f * this.Opacity; + anchorPosition.Y -= num; + } + + public void DrawInGame(SpriteBatch sb, Vector2 bottomAnchorPosition) + { + float opacity = this.Opacity; + if ((double) opacity <= 0.0) + return; + float num1 = this.Scale * 1.1f; + Vector2 size = (FontAssets.ItemStack.Value.MeasureString(this._title) + new Vector2(58f, 10f)) * num1; + Rectangle rectangle = Utils.CenteredRectangle(bottomAnchorPosition + new Vector2(0.0f, (float) (-(double) size.Y * 0.5)), size); + Vector2 mouseScreen = Main.MouseScreen; + int num2 = rectangle.Contains(mouseScreen.ToPoint()) ? 1 : 0; + Color c = num2 != 0 ? new Color(64, 109, 164) * 0.75f : new Color(64, 109, 164) * 0.5f; + Utils.DrawInvBG(sb, rectangle, c); + float scale = num1 * 0.3f; + Vector2 position = rectangle.Right() - Vector2.UnitX * num1 * (float) (12.0 + (double) scale * (double) this._achievementIconFrame.Width); + sb.Draw(this._achievementTexture.Value, position, new Rectangle?(this._achievementIconFrame), Color.White * opacity, 0.0f, new Vector2(0.0f, (float) (this._achievementIconFrame.Height / 2)), scale, SpriteEffects.None, 0.0f); + sb.Draw(this._achievementBorderTexture.Value, position, new Rectangle?(), Color.White * opacity, 0.0f, new Vector2(0.0f, (float) (this._achievementIconFrame.Height / 2)), scale, SpriteEffects.None, 0.0f); + Color color = new Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor / 5, (int) Main.mouseTextColor); + Utils.DrawBorderString(sb, this._title, position - Vector2.UnitX * 10f, color * opacity, num1 * 0.9f, 1f, 0.4f); + if (num2 == 0) + return; + this.OnMouseOver(); + } + + private void OnMouseOver() + { + if (PlayerInput.IgnoreMouseInterface) + return; + Main.player[Main.myPlayer].mouseInterface = true; + if (!Main.mouseLeft || !Main.mouseLeftRelease) + return; + Main.mouseLeftRelease = false; + IngameFancyUI.OpenAchievementsAndGoto(this._theAchievement); + this._ingameDisplayTimeLeft = 0; + this.ShouldBeRemoved = true; + } + + public void DrawInNotificationsArea( + SpriteBatch spriteBatch, + Rectangle area, + ref int gamepadPointLocalIndexTouse) + { + Utils.DrawInvBG(spriteBatch, area, Color.Red); + } + } + + public class PlayerWantsToJoinGamePopup : IInGameNotification + { + private int _timeLeft; + private const int _timeLeftMax = 1800; + private string _displayTextWithoutTime; + private UserJoinToServerRequest _request; + + private float Scale + { + get + { + if (this._timeLeft < 30) + return MathHelper.Lerp(0.0f, 1f, (float) this._timeLeft / 30f); + return this._timeLeft > 1785 ? MathHelper.Lerp(1f, 0.0f, (float) (((double) this._timeLeft - 1785.0) / 15.0)) : 1f; + } + } + + private float Opacity + { + get + { + float scale = this.Scale; + return (double) scale <= 0.5 ? 0.0f : (float) (((double) scale - 0.5) / 0.5); + } + } + + public object CreationObject { get; private set; } + + public PlayerWantsToJoinGamePopup(UserJoinToServerRequest request) + { + this._request = request; + this.CreationObject = (object) request; + this._timeLeft = 1800; + switch (Main.rand.Next(5)) + { + case 1: + this._displayTextWithoutTime = "This Fucker Wants to Join you"; + break; + case 2: + this._displayTextWithoutTime = "This Weirdo Wants to Join you"; + break; + case 3: + this._displayTextWithoutTime = "This Great Gal Wants to Join you"; + break; + case 4: + this._displayTextWithoutTime = "The one guy who beat you up 30 years ago Wants to Join you"; + break; + default: + this._displayTextWithoutTime = "This Bloke Wants to Join you"; + break; + } + } + + public bool ShouldBeRemoved => this._timeLeft <= 0; + + public void Update() => --this._timeLeft; + + public void DrawInGame(SpriteBatch spriteBatch, Vector2 bottomAnchorPosition) + { + float opacity = this.Opacity; + if ((double) opacity <= 0.0) + return; + string text = Utils.FormatWith(this._request.GetUserWrapperText(), (object) new + { + DisplayName = this._request.UserDisplayName, + FullId = this._request.UserFullIdentifier + }); + float num = this.Scale * 1.1f; + Vector2 size = (FontAssets.ItemStack.Value.MeasureString(text) + new Vector2(58f, 10f)) * num; + Rectangle R = Utils.CenteredRectangle(bottomAnchorPosition + new Vector2(0.0f, (float) (-(double) size.Y * 0.5)), size); + Vector2 mouseScreen = Main.MouseScreen; + Color c = R.Contains(mouseScreen.ToPoint()) ? new Color(64, 109, 164) * 0.75f : new Color(64, 109, 164) * 0.5f; + Utils.DrawInvBG(spriteBatch, R, c); + new Vector2((float) R.Left, (float) R.Center.Y).X += 32f; + Texture2D texture2D1 = Main.Assets.Request("Images/UI/ButtonPlay", (AssetRequestMode) 1).Value; + Vector2 position = new Vector2((float) (R.Left + 7), (float) ((double) MathHelper.Lerp((float) R.Top, (float) R.Bottom, 0.5f) - (double) (texture2D1.Height / 2) - 1.0)); + bool flag1 = Utils.CenteredRectangle(position + new Vector2((float) (texture2D1.Width / 2), 0.0f), texture2D1.Size()).Contains(mouseScreen.ToPoint()); + spriteBatch.Draw(texture2D1, position, new Rectangle?(), Color.White * (flag1 ? 1f : 0.5f), 0.0f, new Vector2(0.0f, 0.5f) * texture2D1.Size(), 1f, SpriteEffects.None, 0.0f); + if (flag1) + this.OnMouseOver(); + Texture2D texture2D2 = Main.Assets.Request("Images/UI/ButtonDelete", (AssetRequestMode) 1).Value; + position = new Vector2((float) (R.Left + 7), (float) ((double) MathHelper.Lerp((float) R.Top, (float) R.Bottom, 0.5f) + (double) (texture2D2.Height / 2) + 1.0)); + bool flag2 = Utils.CenteredRectangle(position + new Vector2((float) (texture2D2.Width / 2), 0.0f), texture2D2.Size()).Contains(mouseScreen.ToPoint()); + spriteBatch.Draw(texture2D2, position, new Rectangle?(), Color.White * (flag2 ? 1f : 0.5f), 0.0f, new Vector2(0.0f, 0.5f) * texture2D2.Size(), 1f, SpriteEffects.None, 0.0f); + if (flag2) + this.OnMouseOver(true); + Color color = new Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor / 5, (int) Main.mouseTextColor); + Utils.DrawBorderString(spriteBatch, text, R.Center.ToVector2() + new Vector2(10f, 0.0f), color * opacity, num * 0.9f, 0.5f, 0.4f); + } + + private void OnMouseOver(bool reject = false) + { + if (PlayerInput.IgnoreMouseInterface) + return; + Main.player[Main.myPlayer].mouseInterface = true; + if (!Main.mouseLeft || !Main.mouseLeftRelease) + return; + Main.mouseLeftRelease = false; + this._timeLeft = 0; + if (reject) + this._request.Reject(); + else + this._request.Accept(); + } + + public void PushAnchor(ref Vector2 positionAnchorBottom) + { + float num = 70f * this.Opacity; + positionAnchorBottom.Y -= num; + } + + public void DrawInNotificationsArea( + SpriteBatch spriteBatch, + Rectangle area, + ref int gamepadPointLocalIndexTouse) + { + string userWrapperText = this._request.GetUserWrapperText(); + string userDisplayName = this._request.UserDisplayName; + Utils.TrimTextIfNeeded(ref userDisplayName, FontAssets.MouseText.Value, 0.9f, (float) (area.Width / 4)); + var data = new + { + DisplayName = userDisplayName, + FullId = this._request.UserFullIdentifier + }; + string text = Utils.FormatWith(userWrapperText, (object) data); + Vector2 mouseScreen = Main.MouseScreen; + Color c = area.Contains(mouseScreen.ToPoint()) ? new Color(64, 109, 164) * 0.75f : new Color(64, 109, 164) * 0.5f; + Utils.DrawInvBG(spriteBatch, area, c); + Vector2 pos = new Vector2((float) area.Left, (float) area.Center.Y); + pos.X += 32f; + Texture2D texture2D1 = Main.Assets.Request("Images/UI/ButtonPlay", (AssetRequestMode) 1).Value; + Vector2 position = new Vector2((float) (area.Left + 7), (float) ((double) MathHelper.Lerp((float) area.Top, (float) area.Bottom, 0.5f) - (double) (texture2D1.Height / 2) - 1.0)); + bool flag1 = Utils.CenteredRectangle(position + new Vector2((float) (texture2D1.Width / 2), 0.0f), texture2D1.Size()).Contains(mouseScreen.ToPoint()); + spriteBatch.Draw(texture2D1, position, new Rectangle?(), Color.White * (flag1 ? 1f : 0.5f), 0.0f, new Vector2(0.0f, 0.5f) * texture2D1.Size(), 1f, SpriteEffects.None, 0.0f); + if (flag1) + this.OnMouseOver(); + Texture2D texture2D2 = Main.Assets.Request("Images/UI/ButtonDelete", (AssetRequestMode) 1).Value; + position = new Vector2((float) (area.Left + 7), (float) ((double) MathHelper.Lerp((float) area.Top, (float) area.Bottom, 0.5f) + (double) (texture2D2.Height / 2) + 1.0)); + bool flag2 = Utils.CenteredRectangle(position + new Vector2((float) (texture2D2.Width / 2), 0.0f), texture2D2.Size()).Contains(mouseScreen.ToPoint()); + spriteBatch.Draw(texture2D2, position, new Rectangle?(), Color.White * (flag2 ? 1f : 0.5f), 0.0f, new Vector2(0.0f, 0.5f) * texture2D2.Size(), 1f, SpriteEffects.None, 0.0f); + if (flag2) + this.OnMouseOver(true); + pos.X += 6f; + Color color = new Color((int) Main.mouseTextColor, (int) Main.mouseTextColor, (int) Main.mouseTextColor / 5, (int) Main.mouseTextColor); + Utils.DrawBorderString(spriteBatch, text, pos, color, 0.9f, anchory: 0.4f); + } + } + } +} diff --git a/UI/IngameFancyUI.cs b/UI/IngameFancyUI.cs new file mode 100644 index 0000000..03d6ffa --- /dev/null +++ b/UI/IngameFancyUI.cs @@ -0,0 +1,191 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.IngameFancyUI +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria.Achievements; +using Terraria.Audio; +using Terraria.GameContent.UI.States; +using Terraria.GameInput; +using Terraria.Localization; +using Terraria.UI.Gamepad; + +namespace Terraria.UI +{ + public class IngameFancyUI + { + private static bool CoverForOneUIFrame; + + public static void CoverNextFrame() => IngameFancyUI.CoverForOneUIFrame = true; + + public static bool CanCover() + { + if (!IngameFancyUI.CoverForOneUIFrame) + return false; + IngameFancyUI.CoverForOneUIFrame = false; + return true; + } + + public static void OpenAchievements() + { + IngameFancyUI.CoverNextFrame(); + Main.playerInventory = false; + Main.editChest = false; + Main.npcChatText = ""; + Main.inFancyUI = true; + IngameFancyUI.ClearChat(); + Main.InGameUI.SetState((UIState) Main.AchievementsMenu); + } + + public static void OpenAchievementsAndGoto(Achievement achievement) + { + IngameFancyUI.OpenAchievements(); + Main.AchievementsMenu.GotoAchievement(achievement); + } + + private static void ClearChat() + { + Main.ClosePlayerChat(); + Main.chatText = ""; + } + + public static void OpenKeybinds() => IngameFancyUI.OpenUIState((UIState) Main.ManageControlsMenu); + + public static void OpenUIState(UIState uiState) + { + IngameFancyUI.CoverNextFrame(); + Main.playerInventory = false; + Main.editChest = false; + Main.npcChatText = ""; + Main.inFancyUI = true; + IngameFancyUI.ClearChat(); + Main.InGameUI.SetState(uiState); + } + + public static bool CanShowVirtualKeyboard(int context) => UIVirtualKeyboard.CanDisplay(context); + + public static void OpenVirtualKeyboard(int keyboardContext) + { + IngameFancyUI.CoverNextFrame(); + IngameFancyUI.ClearChat(); + SoundEngine.PlaySound(12); + string labelText = ""; + switch (keyboardContext) + { + case 1: + Main.editSign = true; + labelText = Language.GetTextValue("UI.EnterMessage"); + break; + case 2: + labelText = Language.GetTextValue("UI.EnterNewName"); + Player player = Main.player[Main.myPlayer]; + Main.npcChatText = Main.chest[player.chest].name; + Tile tile = Main.tile[player.chestX, player.chestY]; + if (tile.type == (ushort) 21) + Main.defaultChestName = Lang.chestType[(int) tile.frameX / 36].Value; + else if (tile.type == (ushort) 467 && (int) tile.frameX / 36 == 4) + Main.defaultChestName = Lang.GetItemNameValue(3988); + else if (tile.type == (ushort) 467) + Main.defaultChestName = Lang.chestType2[(int) tile.frameX / 36].Value; + else if (tile.type == (ushort) 88) + Main.defaultChestName = Lang.dresserType[(int) tile.frameX / 54].Value; + if (Main.npcChatText == "") + Main.npcChatText = Main.defaultChestName; + Main.editChest = true; + break; + } + Main.clrInput(); + if (!IngameFancyUI.CanShowVirtualKeyboard(keyboardContext)) + return; + Main.inFancyUI = true; + switch (keyboardContext) + { + case 1: + Main.InGameUI.SetState((UIState) new UIVirtualKeyboard(labelText, Main.npcChatText, (UIVirtualKeyboard.KeyboardSubmitEvent) (s => + { + Main.SubmitSignText(); + IngameFancyUI.Close(); + }), (Action) (() => + { + Main.InputTextSignCancel(); + IngameFancyUI.Close(); + }), keyboardContext)); + break; + case 2: + Main.InGameUI.SetState((UIState) new UIVirtualKeyboard(labelText, Main.npcChatText, (UIVirtualKeyboard.KeyboardSubmitEvent) (s => + { + ChestUI.RenameChestSubmit(Main.player[Main.myPlayer]); + IngameFancyUI.Close(); + }), (Action) (() => + { + ChestUI.RenameChestCancel(); + IngameFancyUI.Close(); + }), keyboardContext)); + break; + } + UILinkPointNavigator.GoToDefaultPage(1); + } + + public static void Close() + { + Main.inFancyUI = false; + SoundEngine.PlaySound(11); + bool flag1 = !Main.gameMenu; + bool flag2 = !(Main.InGameUI.CurrentState is UIVirtualKeyboard); + bool flag3 = false; + switch (UIVirtualKeyboard.KeyboardContext) + { + case 2: + case 3: + flag3 = true; + break; + } + if (flag1 && !(flag2 | flag3)) + flag1 = false; + if (flag1) + Main.playerInventory = true; + if (!Main.gameMenu && Main.InGameUI.CurrentState is UIEmotesMenu) + Main.playerInventory = false; + Main.LocalPlayer.releaseInventory = false; + Main.InGameUI.SetState((UIState) null); + UILinkPointNavigator.Shortcuts.FANCYUI_SPECIAL_INSTRUCTIONS = 0; + } + + public static bool Draw(SpriteBatch spriteBatch, GameTime gameTime) + { + bool flag = false; + if (Main.InGameUI.CurrentState is UIVirtualKeyboard && UIVirtualKeyboard.KeyboardContext > 0) + { + if (!Main.inFancyUI) + Main.InGameUI.SetState((UIState) null); + if (Main.screenWidth >= 1705 || !PlayerInput.UsingGamepad) + flag = true; + } + if (!Main.gameMenu) + { + Main.mouseText = false; + if (Main.InGameUI != null && Main.InGameUI.IsElementUnderMouse()) + Main.player[Main.myPlayer].mouseInterface = true; + Main.instance.GUIBarsDraw(); + if (Main.InGameUI.CurrentState is UIVirtualKeyboard && UIVirtualKeyboard.KeyboardContext > 0) + Main.instance.GUIChatDraw(); + if (!Main.inFancyUI) + Main.InGameUI.SetState((UIState) null); + Main.instance.DrawMouseOver(); + Main.DrawCursor(Main.DrawThickCursor()); + } + return flag; + } + + public static void MouseOver() + { + if (!Main.inFancyUI || !Main.InGameUI.IsElementUnderMouse()) + return; + Main.mouseText = true; + } + } +} diff --git a/UI/InterfaceScaleType.cs b/UI/InterfaceScaleType.cs new file mode 100644 index 0000000..e972695 --- /dev/null +++ b/UI/InterfaceScaleType.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.InterfaceScaleType +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.UI +{ + public enum InterfaceScaleType + { + Game, + UI, + None, + } +} diff --git a/UI/ItemSlot.cs b/UI/ItemSlot.cs new file mode 100644 index 0000000..3811fe2 --- /dev/null +++ b/UI/ItemSlot.cs @@ -0,0 +1,2824 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.ItemSlot +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.GameContent.Achievements; +using Terraria.GameContent.UI; +using Terraria.GameContent.UI.Chat; +using Terraria.GameInput; +using Terraria.ID; +using Terraria.Localization; +using Terraria.UI.Chat; +using Terraria.UI.Gamepad; + +namespace Terraria.UI +{ + public class ItemSlot + { + public static bool DrawGoldBGForCraftingMaterial = false; + public static bool ShiftForcedOn; + private static Item[] singleSlotArray = new Item[1]; + private static bool[] canFavoriteAt = new bool[31]; + private static bool[] canShareAt = new bool[31]; + private static float[] inventoryGlowHue = new float[58]; + private static int[] inventoryGlowTime = new int[58]; + private static float[] inventoryGlowHueChest = new float[58]; + private static int[] inventoryGlowTimeChest = new int[58]; + private static int _customCurrencyForSavings = -1; + private static int dyeSlotCount; + private static int accSlotToSwapTo; + public static float CircularRadialOpacity; + public static float QuicksRadialOpacity; + + static ItemSlot() + { + ItemSlot.canFavoriteAt[0] = true; + ItemSlot.canFavoriteAt[1] = true; + ItemSlot.canFavoriteAt[2] = true; + ItemSlot.canShareAt[15] = true; + ItemSlot.canShareAt[4] = true; + ItemSlot.canShareAt[5] = true; + ItemSlot.canShareAt[6] = true; + ItemSlot.canShareAt[7] = true; + ItemSlot.canShareAt[27] = true; + ItemSlot.canShareAt[26] = true; + ItemSlot.canShareAt[23] = true; + ItemSlot.canShareAt[24] = true; + ItemSlot.canShareAt[25] = true; + ItemSlot.canShareAt[22] = true; + ItemSlot.canShareAt[3] = true; + ItemSlot.canShareAt[8] = true; + ItemSlot.canShareAt[9] = true; + ItemSlot.canShareAt[10] = true; + ItemSlot.canShareAt[11] = true; + ItemSlot.canShareAt[12] = true; + ItemSlot.canShareAt[16] = true; + ItemSlot.canShareAt[20] = true; + ItemSlot.canShareAt[18] = true; + ItemSlot.canShareAt[19] = true; + ItemSlot.canShareAt[17] = true; + ItemSlot.canShareAt[29] = true; + ItemSlot.canShareAt[30] = true; + } + + public static bool ShiftInUse => Main.keyState.PressingShift() || ItemSlot.ShiftForcedOn; + + public static bool ControlInUse => Main.keyState.PressingControl(); + + public static bool NotUsingGamepad => !PlayerInput.UsingGamepad; + + public static void SetGlow(int index, float hue, bool chest) + { + if (chest) + { + if ((double) hue < 0.0) + { + ItemSlot.inventoryGlowTimeChest[index] = 0; + ItemSlot.inventoryGlowHueChest[index] = 0.0f; + } + else + { + ItemSlot.inventoryGlowTimeChest[index] = 300; + ItemSlot.inventoryGlowHueChest[index] = hue; + } + } + else + { + ItemSlot.inventoryGlowTime[index] = 300; + ItemSlot.inventoryGlowHue[index] = hue; + } + } + + public static void UpdateInterface() + { + if (!Main.playerInventory || Main.player[Main.myPlayer].talkNPC == -1) + ItemSlot._customCurrencyForSavings = -1; + for (int index = 0; index < ItemSlot.inventoryGlowTime.Length; ++index) + { + if (ItemSlot.inventoryGlowTime[index] > 0) + { + --ItemSlot.inventoryGlowTime[index]; + if (ItemSlot.inventoryGlowTime[index] == 0) + ItemSlot.inventoryGlowHue[index] = 0.0f; + } + } + for (int index = 0; index < ItemSlot.inventoryGlowTimeChest.Length; ++index) + { + if (ItemSlot.inventoryGlowTimeChest[index] > 0) + { + --ItemSlot.inventoryGlowTimeChest[index]; + if (ItemSlot.inventoryGlowTimeChest[index] == 0) + ItemSlot.inventoryGlowHueChest[index] = 0.0f; + } + } + } + + public static void Handle(ref Item inv, int context = 0) + { + ItemSlot.singleSlotArray[0] = inv; + ItemSlot.Handle(ItemSlot.singleSlotArray, context); + inv = ItemSlot.singleSlotArray[0]; + Recipe.FindRecipes(); + } + + public static void Handle(Item[] inv, int context = 0, int slot = 0) + { + ItemSlot.OverrideHover(inv, context, slot); + ItemSlot.LeftClick(inv, context, slot); + ItemSlot.RightClick(inv, context, slot); + if (Main.mouseLeftRelease && Main.mouseLeft) + Recipe.FindRecipes(); + ItemSlot.MouseHover(inv, context, slot); + } + + public static void OverrideHover(ref Item inv, int context = 0) + { + ItemSlot.singleSlotArray[0] = inv; + ItemSlot.OverrideHover(ItemSlot.singleSlotArray, context); + inv = ItemSlot.singleSlotArray[0]; + } + + public static bool isEquipLocked(int type) => Main.npcShop > 0 && (type == 854 || type == 3035); + + public static void OverrideHover(Item[] inv, int context = 0, int slot = 0) + { + Item obj = inv[slot]; + if (ItemSlot.NotUsingGamepad && ItemSlot.Options.DisableLeftShiftTrashCan) + { + if (ItemSlot.ControlInUse) + { + if (obj.type > 0 && obj.stack > 0 && !inv[slot].favorited) + { + switch (context) + { + case 0: + case 1: + case 2: + Main.cursorOverride = Main.npcShop <= 0 || obj.favorited ? 6 : 10; + break; + case 3: + case 4: + case 7: + if (Main.player[Main.myPlayer].ItemSpace(obj).CanTakeItemToPersonalInventory) + { + Main.cursorOverride = 6; + break; + } + break; + } + } + } + else if (ItemSlot.ShiftInUse) + { + bool flag = false; + if (Main.LocalPlayer.tileEntityAnchor.IsInValidUseTileEntity()) + flag = Main.LocalPlayer.tileEntityAnchor.GetTileEntity().OverrideItemSlotHover(inv, context, slot); + if (obj.type > 0 && obj.stack > 0 && !inv[slot].favorited && !flag) + { + switch (context) + { + case 0: + case 1: + case 2: + if (context == 0 && Main.CreativeMenu.IsShowingResearchMenu()) + { + Main.cursorOverride = 9; + break; + } + if (context == 0 && Main.InReforgeMenu) + { + if (obj.maxStack == 1 && obj.Prefix(-3)) + { + Main.cursorOverride = 9; + break; + } + break; + } + if (context == 0 && Main.InGuideCraftMenu) + { + if (obj.material) + { + Main.cursorOverride = 9; + break; + } + break; + } + if (Main.player[Main.myPlayer].chest != -1 && ChestUI.TryPlacingInChest(obj, true)) + { + Main.cursorOverride = 9; + break; + } + break; + case 3: + case 4: + if (Main.player[Main.myPlayer].ItemSpace(obj).CanTakeItemToPersonalInventory) + { + Main.cursorOverride = 8; + break; + } + break; + case 5: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 16: + case 17: + case 18: + case 19: + case 20: + case 23: + case 24: + case 25: + case 26: + case 27: + case 29: + if (Main.player[Main.myPlayer].ItemSpace(inv[slot]).CanTakeItemToPersonalInventory) + { + Main.cursorOverride = 7; + break; + } + break; + } + } + } + } + else if (ItemSlot.ShiftInUse) + { + bool flag = false; + if (Main.LocalPlayer.tileEntityAnchor.IsInValidUseTileEntity()) + flag = Main.LocalPlayer.tileEntityAnchor.GetTileEntity().OverrideItemSlotHover(inv, context, slot); + if (obj.type > 0 && obj.stack > 0 && !inv[slot].favorited && !flag) + { + switch (context) + { + case 0: + case 1: + case 2: + if (Main.npcShop > 0 && !obj.favorited) + { + Main.cursorOverride = 10; + break; + } + if (context == 0 && Main.CreativeMenu.IsShowingResearchMenu()) + { + Main.cursorOverride = 9; + break; + } + if (context == 0 && Main.InReforgeMenu) + { + if (obj.maxStack == 1 && obj.Prefix(-3)) + { + Main.cursorOverride = 9; + break; + } + break; + } + if (context == 0 && Main.InGuideCraftMenu) + { + if (obj.material) + { + Main.cursorOverride = 9; + break; + } + break; + } + if (Main.player[Main.myPlayer].chest != -1) + { + if (ChestUI.TryPlacingInChest(obj, true)) + { + Main.cursorOverride = 9; + break; + } + break; + } + Main.cursorOverride = 6; + break; + case 3: + case 4: + if (Main.player[Main.myPlayer].ItemSpace(obj).CanTakeItemToPersonalInventory) + { + Main.cursorOverride = 8; + break; + } + break; + case 5: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 16: + case 17: + case 18: + case 19: + case 20: + case 23: + case 24: + case 25: + case 26: + case 27: + case 29: + if (Main.player[Main.myPlayer].ItemSpace(inv[slot]).CanTakeItemToPersonalInventory) + { + Main.cursorOverride = 7; + break; + } + break; + } + } + } + if (!Main.keyState.IsKeyDown(Main.FavoriteKey) || !ItemSlot.canFavoriteAt[context] && (!Main.drawingPlayerChat || !ItemSlot.canShareAt[context])) + return; + if (obj.type > 0 && obj.stack > 0 && Main.drawingPlayerChat) + { + Main.cursorOverride = 2; + } + else + { + if (obj.type <= 0 || obj.stack <= 0) + return; + Main.cursorOverride = 3; + } + } + + private static bool OverrideLeftClick(Item[] inv, int context = 0, int slot = 0) + { + if (context == 10 && ItemSlot.isEquipLocked(inv[slot].type) || Main.LocalPlayer.tileEntityAnchor.IsInValidUseTileEntity() && Main.LocalPlayer.tileEntityAnchor.GetTileEntity().OverrideItemSlotLeftClick(inv, context, slot)) + return true; + Item I = inv[slot]; + switch (Main.cursorOverride) + { + case 2: + if (ChatManager.AddChatText(FontAssets.MouseText.Value, ItemTagHandler.GenerateTag(I), Vector2.One)) + SoundEngine.PlaySound(12); + return true; + case 3: + if (!ItemSlot.canFavoriteAt[context]) + return false; + I.favorited = !I.favorited; + SoundEngine.PlaySound(12); + return true; + case 7: + if (context == 29) + { + Item newItem = new Item(); + newItem.SetDefaults(inv[slot].netID); + newItem.stack = newItem.maxStack; + Main.player[Main.myPlayer].GetItem(Main.myPlayer, newItem, GetItemSettings.InventoryEntityToPlayerInventorySettings); + SoundEngine.PlaySound(12); + return true; + } + inv[slot] = Main.player[Main.myPlayer].GetItem(Main.myPlayer, inv[slot], GetItemSettings.InventoryEntityToPlayerInventorySettings); + SoundEngine.PlaySound(12); + return true; + case 8: + inv[slot] = Main.player[Main.myPlayer].GetItem(Main.myPlayer, inv[slot], GetItemSettings.InventoryEntityToPlayerInventorySettings); + if (Main.player[Main.myPlayer].chest > -1) + NetMessage.SendData(32, number: Main.player[Main.myPlayer].chest, number2: ((float) slot)); + return true; + case 9: + if (Main.CreativeMenu.IsShowingResearchMenu()) + { + Main.CreativeMenu.SwapItem(ref inv[slot]); + SoundEngine.PlaySound(7); + } + else if (Main.InReforgeMenu) + { + Utils.Swap(ref inv[slot], ref Main.reforgeItem); + SoundEngine.PlaySound(7); + } + else if (Main.InGuideCraftMenu) + { + Utils.Swap(ref inv[slot], ref Main.guideItem); + Recipe.FindRecipes(); + SoundEngine.PlaySound(7); + } + else + ChestUI.TryPlacingInChest(inv[slot], false); + return true; + default: + return false; + } + } + + public static void LeftClick(ref Item inv, int context = 0) + { + ItemSlot.singleSlotArray[0] = inv; + ItemSlot.LeftClick(ItemSlot.singleSlotArray, context); + inv = ItemSlot.singleSlotArray[0]; + } + + public static void LeftClick(Item[] inv, int context = 0, int slot = 0) + { + Player player = Main.player[Main.myPlayer]; + bool flag = Main.mouseLeftRelease && Main.mouseLeft; + if (flag) + { + if (ItemSlot.OverrideLeftClick(inv, context, slot)) + return; + inv[slot].newAndShiny = false; + if (ItemSlot.LeftClick_SellOrTrash(inv, context, slot) || player.itemAnimation != 0 || player.itemTime != 0) + return; + } + int num1 = ItemSlot.PickItemMovementAction(inv, context, slot, Main.mouseItem); + if (num1 != 3 && !flag) + return; + switch (num1) + { + case 0: + if (context == 6 && Main.mouseItem.type != 0) + inv[slot].SetDefaults(); + if (context != 11 || inv[slot].FitsAccessoryVanitySlot) + { + Utils.Swap(ref inv[slot], ref Main.mouseItem); + if (inv[slot].stack > 0) + { + switch (context) + { + case 0: + AchievementsHelper.NotifyItemPickup(player, inv[slot]); + break; + case 8: + case 9: + case 10: + case 11: + case 12: + case 16: + case 17: + case 25: + case 27: + AchievementsHelper.HandleOnEquip(player, inv[slot], context); + break; + } + } + if (inv[slot].type == 0 || inv[slot].stack < 1) + inv[slot] = new Item(); + if (Main.mouseItem.IsTheSameAs(inv[slot])) + { + Utils.Swap(ref inv[slot].favorited, ref Main.mouseItem.favorited); + if (inv[slot].stack != inv[slot].maxStack && Main.mouseItem.stack != Main.mouseItem.maxStack) + { + if (Main.mouseItem.stack + inv[slot].stack <= Main.mouseItem.maxStack) + { + inv[slot].stack += Main.mouseItem.stack; + Main.mouseItem.stack = 0; + } + else + { + int num2 = Main.mouseItem.maxStack - inv[slot].stack; + inv[slot].stack += num2; + Main.mouseItem.stack -= num2; + } + } + } + if (Main.mouseItem.type == 0 || Main.mouseItem.stack < 1) + Main.mouseItem = new Item(); + if (Main.mouseItem.type > 0 || inv[slot].type > 0) + { + Recipe.FindRecipes(); + SoundEngine.PlaySound(7); + } + if (context == 3 && Main.netMode == 1) + { + NetMessage.SendData(32, number: player.chest, number2: ((float) slot)); + break; + } + break; + } + break; + case 1: + if (Main.mouseItem.stack == 1 && Main.mouseItem.type > 0 && inv[slot].type > 0 && inv[slot].IsNotTheSameAs(Main.mouseItem) && (context != 11 || Main.mouseItem.FitsAccessoryVanitySlot)) + { + Utils.Swap(ref inv[slot], ref Main.mouseItem); + SoundEngine.PlaySound(7); + if (inv[slot].stack > 0) + { + if (context <= 12) + { + if (context != 0) + { + if ((uint) (context - 8) > 4U) + goto label_59; + } + else + { + AchievementsHelper.NotifyItemPickup(player, inv[slot]); + goto label_59; + } + } + else if ((uint) (context - 16) > 1U && context != 25 && context != 27) + goto label_59; + AchievementsHelper.HandleOnEquip(player, inv[slot], context); + } + } + else if (Main.mouseItem.type == 0 && inv[slot].type > 0) + { + Utils.Swap(ref inv[slot], ref Main.mouseItem); + if (inv[slot].type == 0 || inv[slot].stack < 1) + inv[slot] = new Item(); + if (Main.mouseItem.type == 0 || Main.mouseItem.stack < 1) + Main.mouseItem = new Item(); + if (Main.mouseItem.type > 0 || inv[slot].type > 0) + { + Recipe.FindRecipes(); + SoundEngine.PlaySound(7); + } + } + else if (Main.mouseItem.type > 0 && inv[slot].type == 0 && (context != 11 || Main.mouseItem.FitsAccessoryVanitySlot)) + { + if (Main.mouseItem.stack == 1) + { + Utils.Swap(ref inv[slot], ref Main.mouseItem); + if (inv[slot].type == 0 || inv[slot].stack < 1) + inv[slot] = new Item(); + if (Main.mouseItem.type == 0 || Main.mouseItem.stack < 1) + Main.mouseItem = new Item(); + if (Main.mouseItem.type > 0 || inv[slot].type > 0) + { + Recipe.FindRecipes(); + SoundEngine.PlaySound(7); + } + } + else + { + --Main.mouseItem.stack; + inv[slot].SetDefaults(Main.mouseItem.type); + Recipe.FindRecipes(); + SoundEngine.PlaySound(7); + } + if (inv[slot].stack > 0) + { + if (context <= 12) + { + if (context != 0) + { + if ((uint) (context - 8) > 4U) + goto label_59; + } + else + { + AchievementsHelper.NotifyItemPickup(player, inv[slot]); + goto label_59; + } + } + else if ((uint) (context - 16) > 1U && context != 25 && context != 27) + goto label_59; + AchievementsHelper.HandleOnEquip(player, inv[slot], context); + } + } +label_59: + if ((context == 23 || context == 24) && Main.netMode == 1) + NetMessage.SendData(121, number: Main.myPlayer, number2: ((float) player.tileEntityAnchor.interactEntityID), number3: ((float) slot)); + if (context == 26 && Main.netMode == 1) + { + NetMessage.SendData(124, number: Main.myPlayer, number2: ((float) player.tileEntityAnchor.interactEntityID), number3: ((float) slot)); + break; + } + break; + case 2: + if (Main.mouseItem.stack == 1 && Main.mouseItem.dye > (byte) 0 && inv[slot].type > 0 && inv[slot].type != Main.mouseItem.type) + { + Utils.Swap(ref inv[slot], ref Main.mouseItem); + SoundEngine.PlaySound(7); + if (inv[slot].stack > 0) + { + if (context <= 12) + { + if (context != 0) + { + if ((uint) (context - 8) > 4U) + goto label_95; + } + else + { + AchievementsHelper.NotifyItemPickup(player, inv[slot]); + goto label_95; + } + } + else if ((uint) (context - 16) > 1U && context != 25 && context != 27) + goto label_95; + AchievementsHelper.HandleOnEquip(player, inv[slot], context); + } + } + else if (Main.mouseItem.type == 0 && inv[slot].type > 0) + { + Utils.Swap(ref inv[slot], ref Main.mouseItem); + if (inv[slot].type == 0 || inv[slot].stack < 1) + inv[slot] = new Item(); + if (Main.mouseItem.type == 0 || Main.mouseItem.stack < 1) + Main.mouseItem = new Item(); + if (Main.mouseItem.type > 0 || inv[slot].type > 0) + { + Recipe.FindRecipes(); + SoundEngine.PlaySound(7); + } + } + else if (Main.mouseItem.dye > (byte) 0 && inv[slot].type == 0) + { + if (Main.mouseItem.stack == 1) + { + Utils.Swap(ref inv[slot], ref Main.mouseItem); + if (inv[slot].type == 0 || inv[slot].stack < 1) + inv[slot] = new Item(); + if (Main.mouseItem.type == 0 || Main.mouseItem.stack < 1) + Main.mouseItem = new Item(); + if (Main.mouseItem.type > 0 || inv[slot].type > 0) + { + Recipe.FindRecipes(); + SoundEngine.PlaySound(7); + } + } + else + { + --Main.mouseItem.stack; + inv[slot].SetDefaults(Main.mouseItem.type); + Recipe.FindRecipes(); + SoundEngine.PlaySound(7); + } + if (inv[slot].stack > 0) + { + if (context <= 12) + { + if (context != 0) + { + if ((uint) (context - 8) > 4U) + goto label_95; + } + else + { + AchievementsHelper.NotifyItemPickup(player, inv[slot]); + goto label_95; + } + } + else if ((uint) (context - 16) > 1U && context != 25 && context != 27) + goto label_95; + AchievementsHelper.HandleOnEquip(player, inv[slot], context); + } + } +label_95: + if (context == 25 && Main.netMode == 1) + NetMessage.SendData(121, number: Main.myPlayer, number2: ((float) player.tileEntityAnchor.interactEntityID), number3: ((float) slot), number4: 1f); + if (context == 27 && Main.netMode == 1) + { + NetMessage.SendData(124, number: Main.myPlayer, number2: ((float) player.tileEntityAnchor.interactEntityID), number3: ((float) slot), number4: 1f); + break; + } + break; + case 3: + ItemSlot.HandleShopSlot(inv, slot, false, true); + break; + case 4: + Chest chest = Main.instance.shop[Main.npcShop]; + if (player.SellItem(Main.mouseItem)) + { + chest.AddItemToShop(Main.mouseItem); + Main.mouseItem.SetDefaults(); + SoundEngine.PlaySound(18); + } + else if (Main.mouseItem.value == 0) + { + chest.AddItemToShop(Main.mouseItem); + Main.mouseItem.SetDefaults(); + SoundEngine.PlaySound(7); + } + Recipe.FindRecipes(); + Main.stackSplit = 9999; + break; + default: + if (num1 == 5 && Main.mouseItem.IsAir) + { + SoundEngine.PlaySound(7); + Main.mouseItem.SetDefaults(inv[slot].netID); + Main.mouseItem.stack = Main.mouseItem.maxStack; + break; + } + break; + } + if ((uint) context <= 2U || context == 5) + return; + inv[slot].favorited = false; + } + + private static bool LeftClick_SellOrTrash(Item[] inv, int context, int slot) + { + bool flag1 = false; + bool flag2 = false; + if (ItemSlot.NotUsingGamepad && ItemSlot.Options.DisableLeftShiftTrashCan) + { + switch (context) + { + case 0: + case 1: + case 2: + case 3: + case 4: + case 7: + flag1 = true; + break; + } + if (ItemSlot.ControlInUse & flag1) + { + ItemSlot.SellOrTrash(inv, context, slot); + flag2 = true; + } + } + else + { + switch (context) + { + case 0: + case 1: + case 2: + case 3: + case 4: + flag1 = Main.player[Main.myPlayer].chest == -1; + break; + } + if (ItemSlot.ShiftInUse & flag1) + { + ItemSlot.SellOrTrash(inv, context, slot); + flag2 = true; + } + } + return flag2; + } + + private static void SellOrTrash(Item[] inv, int context, int slot) + { + Player player = Main.player[Main.myPlayer]; + if (inv[slot].type <= 0) + return; + if (Main.npcShop > 0 && !inv[slot].favorited) + { + Chest chest = Main.instance.shop[Main.npcShop]; + if (inv[slot].type >= 71 && inv[slot].type <= 74) + return; + if (player.SellItem(inv[slot])) + { + chest.AddItemToShop(inv[slot]); + inv[slot].SetDefaults(); + SoundEngine.PlaySound(18); + Recipe.FindRecipes(); + } + else + { + if (inv[slot].value != 0) + return; + chest.AddItemToShop(inv[slot]); + inv[slot].SetDefaults(); + SoundEngine.PlaySound(7); + Recipe.FindRecipes(); + } + } + else + { + if (inv[slot].favorited) + return; + SoundEngine.PlaySound(7); + player.trashItem = inv[slot].Clone(); + inv[slot].SetDefaults(); + if (context == 3 && Main.netMode == 1) + NetMessage.SendData(32, number: player.chest, number2: ((float) slot)); + Recipe.FindRecipes(); + } + } + + private static string GetOverrideInstructions(Item[] inv, int context, int slot) + { + Player player = Main.player[Main.myPlayer]; + TileEntity tileEntity = player.tileEntityAnchor.GetTileEntity(); + string instruction; + if (tileEntity != null && tileEntity.TryGetItemGamepadOverrideInstructions(inv, context, slot, out instruction)) + return instruction; + if (inv[slot].type > 0 && inv[slot].stack > 0) + { + if (!inv[slot].favorited) + { + switch (context) + { + case 0: + case 1: + case 2: + if (Main.npcShop > 0 && !inv[slot].favorited) + return Lang.misc[75].Value; + if (Main.player[Main.myPlayer].chest != -1) + { + if (ChestUI.TryPlacingInChest(inv[slot], true)) + return Lang.misc[76].Value; + break; + } + return Main.InGuideCraftMenu && inv[slot].material ? Lang.misc[76].Value : Lang.misc[74].Value; + case 3: + case 4: + if (Main.player[Main.myPlayer].ItemSpace(inv[slot]).CanTakeItemToPersonalInventory) + return Lang.misc[76].Value; + break; + case 5: + case 8: + case 9: + case 10: + case 11: + case 12: + case 16: + case 17: + case 18: + case 19: + case 20: + case 25: + case 27: + if (Main.player[Main.myPlayer].ItemSpace(inv[slot]).CanTakeItemToPersonalInventory) + return Lang.misc[68].Value; + break; + } + } + bool flag = false; + if ((uint) context <= 4U) + flag = player.chest == -1; + if (flag) + { + if (Main.npcShop > 0 && !inv[slot].favorited) + { + Chest chest = Main.instance.shop[Main.npcShop]; + return inv[slot].type >= 71 && inv[slot].type <= 74 ? "" : Lang.misc[75].Value; + } + if (!inv[slot].favorited) + return Lang.misc[74].Value; + } + } + return ""; + } + + public static int PickItemMovementAction(Item[] inv, int context, int slot, Item checkItem) + { + Player player = Main.player[Main.myPlayer]; + int num = -1; + switch (context) + { + case 0: + num = 0; + break; + case 1: + if (checkItem.type == 0 || checkItem.type == 71 || checkItem.type == 72 || checkItem.type == 73 || checkItem.type == 74) + { + num = 0; + break; + } + break; + case 2: + if (checkItem.FitsAmmoSlot()) + { + num = 0; + break; + } + break; + case 3: + num = 0; + break; + case 4: + Item[] chestinv; + ChestUI.GetContainerUsageInfo(out bool _, out chestinv); + if (!ChestUI.IsBlockedFromTransferIntoChest(checkItem, chestinv)) + { + num = 0; + break; + } + break; + case 5: + if (checkItem.Prefix(-3) || checkItem.type == 0) + { + num = 0; + break; + } + break; + case 6: + num = 0; + break; + case 7: + if (checkItem.material || checkItem.type == 0) + { + num = 0; + break; + } + break; + case 8: + if (checkItem.type == 0 || checkItem.headSlot > -1 && slot == 0 || checkItem.bodySlot > -1 && slot == 1 || checkItem.legSlot > -1 && slot == 2) + { + num = 1; + break; + } + break; + case 9: + if (checkItem.type == 0 || checkItem.headSlot > -1 && slot == 10 || checkItem.bodySlot > -1 && slot == 11 || checkItem.legSlot > -1 && slot == 12) + { + num = 1; + break; + } + break; + case 10: + if (checkItem.type == 0 || checkItem.accessory && !ItemSlot.AccCheck(Main.LocalPlayer.armor, checkItem, slot)) + { + num = 1; + break; + } + break; + case 11: + if (checkItem.type == 0 || checkItem.accessory && !ItemSlot.AccCheck(Main.LocalPlayer.armor, checkItem, slot)) + { + num = 1; + break; + } + break; + case 23: + if (checkItem.type == 0 || checkItem.headSlot > 0 && slot == 0 || checkItem.bodySlot > 0 && slot == 1 || checkItem.legSlot > 0 && slot == 2) + { + num = 1; + break; + } + break; + case 24: + if (checkItem.type == 0 || checkItem.accessory && !ItemSlot.AccCheck(inv, checkItem, slot)) + { + num = 1; + break; + } + break; + case 26: + if (checkItem.type == 0 || checkItem.headSlot > 0) + { + num = 1; + break; + } + break; + default: + if (context == 12 || context == 25 || context == 27) + { + num = 2; + break; + } + switch (context) + { + case 15: + if (checkItem.type == 0 && inv[slot].type > 0) + { + num = 3; + break; + } + if (checkItem.type == inv[slot].type && checkItem.type > 0 && checkItem.stack < checkItem.maxStack && inv[slot].stack > 0) + { + num = 3; + break; + } + if (inv[slot].type == 0 && checkItem.type > 0 && (checkItem.type < 71 || checkItem.type > 74)) + { + num = 4; + break; + } + break; + case 16: + if (checkItem.type == 0 || Main.projHook[checkItem.shoot]) + { + num = 1; + break; + } + break; + case 17: + if (checkItem.type == 0 || checkItem.mountType != -1 && !MountID.Sets.Cart[checkItem.mountType]) + { + num = 1; + break; + } + break; + case 18: + if (checkItem.type == 0 || checkItem.mountType != -1 && MountID.Sets.Cart[checkItem.mountType]) + { + num = 1; + break; + } + break; + case 19: + if (checkItem.type == 0 || checkItem.buffType > 0 && Main.vanityPet[checkItem.buffType] && !Main.lightPet[checkItem.buffType]) + { + num = 1; + break; + } + break; + case 20: + if (checkItem.type == 0 || checkItem.buffType > 0 && Main.lightPet[checkItem.buffType]) + { + num = 1; + break; + } + break; + default: + if (context == 29 && checkItem.type == 0 && inv[slot].type > 0) + { + num = 5; + break; + } + break; + } + break; + } + if (context == 30) + num = 0; + return num; + } + + public static void RightClick(ref Item inv, int context = 0) + { + ItemSlot.singleSlotArray[0] = inv; + ItemSlot.RightClick(ItemSlot.singleSlotArray, context); + inv = ItemSlot.singleSlotArray[0]; + } + + public static void RightClick(Item[] inv, int context = 0, int slot = 0) + { + Player player = Main.player[Main.myPlayer]; + inv[slot].newAndShiny = false; + if (player.itemAnimation > 0 || ItemSlot.RightClick_FindSpecialActions(inv, context, slot, player)) + return; + if ((context == 0 || context == 4 || context == 3) && Main.mouseRight && Main.mouseRightRelease && inv[slot].maxStack == 1) + { + ItemSlot.SwapEquip(inv, context, slot); + } + else + { + if (Main.stackSplit > 1 || !Main.mouseRight) + return; + bool flag = true; + if (context == 0 && inv[slot].maxStack <= 1) + flag = false; + if (context == 3 && inv[slot].maxStack <= 1) + flag = false; + if (context == 4 && inv[slot].maxStack <= 1) + flag = false; + if (!flag || !Main.mouseItem.IsTheSameAs(inv[slot]) && Main.mouseItem.type != 0 || Main.mouseItem.stack >= Main.mouseItem.maxStack && Main.mouseItem.type != 0) + return; + ItemSlot.PickupItemIntoMouse(inv, context, slot, player); + SoundEngine.PlaySound(12); + ItemSlot.RefreshStackSplitCooldown(); + } + } + + public static void PickupItemIntoMouse(Item[] inv, int context, int slot, Player player) + { + if (Main.mouseItem.type == 0) + { + Main.mouseItem = inv[slot].Clone(); + if (context == 29) + Main.mouseItem.SetDefaults(Main.mouseItem.type); + Main.mouseItem.stack = 0; + Main.mouseItem.favorited = inv[slot].favorited && inv[slot].stack == 1; + } + ++Main.mouseItem.stack; + if (context != 29) + --inv[slot].stack; + if (inv[slot].stack <= 0) + inv[slot] = new Item(); + Recipe.FindRecipes(); + if (context == 3 && Main.netMode == 1) + NetMessage.SendData(32, number: player.chest, number2: ((float) slot)); + if ((context == 23 || context == 24) && Main.netMode == 1) + NetMessage.SendData(121, number: Main.myPlayer, number2: ((float) player.tileEntityAnchor.interactEntityID), number3: ((float) slot)); + if (context == 25 && Main.netMode == 1) + NetMessage.SendData(121, number: Main.myPlayer, number2: ((float) player.tileEntityAnchor.interactEntityID), number3: ((float) slot), number4: 1f); + if (context == 26 && Main.netMode == 1) + NetMessage.SendData(124, number: Main.myPlayer, number2: ((float) player.tileEntityAnchor.interactEntityID), number3: ((float) slot)); + if (context != 27 || Main.netMode != 1) + return; + NetMessage.SendData(124, number: Main.myPlayer, number2: ((float) player.tileEntityAnchor.interactEntityID), number3: ((float) slot), number4: 1f); + } + + public static void RefreshStackSplitCooldown() + { + if (Main.stackSplit == 0) + Main.stackSplit = 30; + else + Main.stackSplit = Main.stackDelay; + } + + private static bool RightClick_FindSpecialActions( + Item[] inv, + int context, + int slot, + Player player) + { + bool flag1 = false; + switch (context) + { + case 0: + flag1 = true; + if (Main.mouseRight && (inv[slot].type >= 3318 && inv[slot].type <= 3332 || inv[slot].type == 3860 || inv[slot].type == 3862 || inv[slot].type == 3861 || inv[slot].type == 4782 || inv[slot].type == 4957)) + { + if (Main.mouseRightRelease) + { + player.OpenBossBag(inv[slot].type); + --inv[slot].stack; + if (inv[slot].stack == 0) + inv[slot].SetDefaults(); + SoundEngine.PlaySound(7); + Main.stackSplit = 30; + Main.mouseRightRelease = false; + Recipe.FindRecipes(); + break; + } + break; + } + if (Main.mouseRight && inv[slot].type > 0 && inv[slot].type < 5045 && ItemID.Sets.IsFishingCrate[inv[slot].type]) + { + if (Main.mouseRightRelease) + { + player.OpenFishingCrate(inv[slot].type); + --inv[slot].stack; + if (inv[slot].stack == 0) + inv[slot].SetDefaults(); + SoundEngine.PlaySound(7); + Main.stackSplit = 30; + Main.mouseRightRelease = false; + Recipe.FindRecipes(); + break; + } + break; + } + if (Main.mouseRight && inv[slot].type == 3093) + { + if (Main.mouseRightRelease) + { + player.OpenHerbBag(); + --inv[slot].stack; + if (inv[slot].stack == 0) + inv[slot].SetDefaults(); + SoundEngine.PlaySound(7); + Main.stackSplit = 30; + Main.mouseRightRelease = false; + Recipe.FindRecipes(); + break; + } + break; + } + if (Main.mouseRight && inv[slot].type == 4345) + { + if (Main.mouseRightRelease) + { + player.OpenCanofWorms(); + --inv[slot].stack; + if (inv[slot].stack == 0) + inv[slot].SetDefaults(); + SoundEngine.PlaySound(7); + Main.stackSplit = 30; + Main.mouseRightRelease = false; + Recipe.FindRecipes(); + break; + } + break; + } + if (Main.mouseRight && inv[slot].type == 4410) + { + if (Main.mouseRightRelease) + { + player.OpenOyster(); + --inv[slot].stack; + if (inv[slot].stack == 0) + inv[slot].SetDefaults(); + SoundEngine.PlaySound(7); + Main.stackSplit = 30; + Main.mouseRightRelease = false; + Recipe.FindRecipes(); + break; + } + break; + } + if (Main.mouseRight && inv[slot].type == 1774) + { + if (Main.mouseRightRelease) + { + --inv[slot].stack; + if (inv[slot].stack == 0) + inv[slot].SetDefaults(); + SoundEngine.PlaySound(7); + Main.stackSplit = 30; + Main.mouseRightRelease = false; + player.OpenGoodieBag(); + Recipe.FindRecipes(); + break; + } + break; + } + if (Main.mouseRight && inv[slot].type == 3085) + { + if (Main.mouseRightRelease && player.ConsumeItem(327)) + { + --inv[slot].stack; + if (inv[slot].stack == 0) + inv[slot].SetDefaults(); + SoundEngine.PlaySound(7); + Main.stackSplit = 30; + Main.mouseRightRelease = false; + player.OpenLockBox(); + Recipe.FindRecipes(); + break; + } + break; + } + if (Main.mouseRight && inv[slot].type == 4879) + { + if (Main.mouseRightRelease && player.HasItem(329)) + { + --inv[slot].stack; + if (inv[slot].stack == 0) + inv[slot].SetDefaults(); + SoundEngine.PlaySound(7); + Main.stackSplit = 30; + Main.mouseRightRelease = false; + player.OpenShadowLockbox(); + Recipe.FindRecipes(); + break; + } + break; + } + if (Main.mouseRight && inv[slot].type == 1869) + { + if (Main.mouseRightRelease) + { + --inv[slot].stack; + if (inv[slot].stack == 0) + inv[slot].SetDefaults(); + SoundEngine.PlaySound(7); + Main.stackSplit = 30; + Main.mouseRightRelease = false; + player.openPresent(); + Recipe.FindRecipes(); + break; + } + break; + } + if (Main.mouseRight && Main.mouseRightRelease && (inv[slot].type == 599 || inv[slot].type == 600 || inv[slot].type == 601)) + { + SoundEngine.PlaySound(7); + Main.stackSplit = 30; + Main.mouseRightRelease = false; + int num = Main.rand.Next(14); + if (num == 0 && Main.hardMode) + inv[slot].SetDefaults(602); + else if (num <= 7) + { + inv[slot].SetDefaults(586); + inv[slot].stack = Main.rand.Next(20, 50); + } + else + { + inv[slot].SetDefaults(591); + inv[slot].stack = Main.rand.Next(20, 50); + } + Recipe.FindRecipes(); + break; + } + flag1 = false; + break; + case 9: + case 11: + flag1 = true; + if (Main.mouseRight && Main.mouseRightRelease) + { + if (Main.npcShop > 0) + return true; + if (inv[slot].type > 0 && inv[slot].stack > 0 || inv[slot - 10].type > 0 && inv[slot - 10].stack > 0) + { + Item obj = inv[slot - 10]; + bool flag2 = context != 11 || obj.FitsAccessoryVanitySlot || obj.IsAir; + if (flag2 && context == 11 && inv[slot].wingSlot > (sbyte) 0) + { + for (int index = 3; index < 10; ++index) + { + if (inv[index].wingSlot > (sbyte) 0 && index != slot - 10) + flag2 = false; + } + } + if (flag2) + { + Utils.Swap(ref inv[slot], ref inv[slot - 10]); + SoundEngine.PlaySound(7); + Recipe.FindRecipes(); + if (inv[slot].stack > 0) + { + switch (context) + { + case 0: + AchievementsHelper.NotifyItemPickup(player, inv[slot]); + break; + case 8: + case 9: + case 10: + case 11: + case 12: + case 16: + case 17: + case 25: + case 27: + AchievementsHelper.HandleOnEquip(player, inv[slot], context); + break; + } + } + else + break; + } + else + break; + } + else + break; + } + else + break; + break; + case 12: + case 25: + case 27: + flag1 = true; + if (Main.mouseRight && Main.mouseRightRelease) + { + bool flag3 = false; + if (!flag3 && (Main.mouseItem.stack < Main.mouseItem.maxStack && Main.mouseItem.type > 0 || Main.mouseItem.IsAir) && inv[slot].type > 0 && (Main.mouseItem.type == inv[slot].type || Main.mouseItem.IsAir)) + { + flag3 = true; + if (Main.mouseItem.IsAir) + Main.mouseItem.SetDefaults(inv[slot].type); + else + ++Main.mouseItem.stack; + inv[slot].SetDefaults(); + SoundEngine.PlaySound(7); + } + if (flag3) + { + if (context == 25 && Main.netMode == 1) + NetMessage.SendData(121, number: Main.myPlayer, number2: ((float) player.tileEntityAnchor.interactEntityID), number3: ((float) slot), number4: 1f); + if (context == 27 && Main.netMode == 1) + { + NetMessage.SendData(124, number: Main.myPlayer, number2: ((float) player.tileEntityAnchor.interactEntityID), number3: ((float) slot), number4: 1f); + break; + } + break; + } + break; + } + break; + case 15: + flag1 = true; + ItemSlot.HandleShopSlot(inv, slot, true, false); + break; + } + return flag1; + } + + private static void HandleShopSlot( + Item[] inv, + int slot, + bool rightClickIsValid, + bool leftClickIsValid) + { + if (Main.cursorOverride == 2) + return; + Chest chest = Main.instance.shop[Main.npcShop]; + bool flag = Main.mouseRight & rightClickIsValid || Main.mouseLeft & leftClickIsValid; + if (!(Main.stackSplit <= 1 & flag) || inv[slot].type <= 0 || !Main.mouseItem.IsTheSameAs(inv[slot]) && Main.mouseItem.type != 0) + return; + int num = Main.superFastStack + 1; + Player localPlayer = Main.LocalPlayer; + for (int index = 0; index < num; ++index) + { + if (Main.mouseItem.stack < Main.mouseItem.maxStack || Main.mouseItem.type == 0) + { + int calcForBuying; + localPlayer.GetItemExpectedPrice(inv[slot], out int _, out calcForBuying); + if (localPlayer.BuyItem(calcForBuying, inv[slot].shopSpecialCurrency) && inv[slot].stack > 0) + { + if (index == 0) + { + if (inv[slot].value > 0) + SoundEngine.PlaySound(18); + else + SoundEngine.PlaySound(7); + } + if (Main.mouseItem.type == 0) + { + Main.mouseItem.netDefaults(inv[slot].netID); + if (inv[slot].prefix != (byte) 0) + Main.mouseItem.Prefix((int) inv[slot].prefix); + Main.mouseItem.stack = 0; + } + if (!inv[slot].buyOnce) + Main.shopSellbackHelper.Add(inv[slot]); + ++Main.mouseItem.stack; + ItemSlot.RefreshStackSplitCooldown(); + if (inv[slot].buyOnce && --inv[slot].stack <= 0) + inv[slot].SetDefaults(); + } + } + } + } + + public static void Draw( + SpriteBatch spriteBatch, + ref Item inv, + int context, + Vector2 position, + Color lightColor = default (Color)) + { + ItemSlot.singleSlotArray[0] = inv; + ItemSlot.Draw(spriteBatch, ItemSlot.singleSlotArray, context, 0, position, lightColor); + inv = ItemSlot.singleSlotArray[0]; + } + + public static void Draw( + SpriteBatch spriteBatch, + Item[] inv, + int context, + int slot, + Vector2 position, + Color lightColor = default (Color)) + { + Player player = Main.player[Main.myPlayer]; + Item obj = inv[slot]; + float inventoryScale = Main.inventoryScale; + Color color1 = Color.White; + if (lightColor != Color.Transparent) + color1 = lightColor; + int ID = -1; + bool flag1 = false; + int num1 = 0; + if (PlayerInput.UsingGamepadUI) + { + switch (context) + { + case 0: + case 1: + case 2: + ID = slot; + break; + case 3: + case 4: + ID = 400 + slot; + break; + case 5: + ID = 303; + break; + case 6: + ID = 300; + break; + case 7: + ID = 1500; + break; + case 8: + case 9: + case 10: + case 11: + ID = 100 + slot; + break; + case 12: + if (inv == player.dye) + ID = 120 + slot; + if (inv == player.miscDyes) + { + ID = 185 + slot; + break; + } + break; + case 15: + ID = 2700 + slot; + break; + case 16: + ID = 184; + break; + case 17: + ID = 183; + break; + case 18: + ID = 182; + break; + case 19: + ID = 180; + break; + case 20: + ID = 181; + break; + case 22: + if (UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeBig != -1) + ID = 700 + UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeBig; + if (UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeSmall != -1) + { + ID = 1500 + UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeSmall + 1; + break; + } + break; + case 23: + ID = 5100 + slot; + break; + case 24: + ID = 5100 + slot; + break; + case 25: + ID = 5108 + slot; + break; + case 26: + ID = 5000 + slot; + break; + case 27: + ID = 5002 + slot; + break; + case 29: + ID = 3000 + slot; + if (UILinkPointNavigator.Shortcuts.CREATIVE_ItemSlotShouldHighlightAsSelected) + { + ID = UILinkPointNavigator.CurrentPoint; + break; + } + break; + case 30: + ID = 15000 + slot; + break; + } + flag1 = UILinkPointNavigator.CurrentPoint == ID; + if (context == 0) + { + num1 = player.DpadRadial.GetDrawMode(slot); + if (num1 > 0 && !PlayerInput.CurrentProfile.UsingDpadHotbar()) + num1 = 0; + } + } + Texture2D texture2D1 = TextureAssets.InventoryBack.Value; + Color color2 = Main.inventoryBack; + bool flag2 = false; + if (obj.type > 0 && obj.stack > 0 && obj.favorited && context != 13 && context != 21 && context != 22 && context != 14) + { + texture2D1 = TextureAssets.InventoryBack10.Value; + if (context == 0 && slot < 10 && player.selectedItem == slot) + { + color2 = Color.White; + texture2D1 = TextureAssets.InventoryBack17.Value; + } + } + else if (obj.type > 0 && obj.stack > 0 && ItemSlot.Options.HighlightNewItems && obj.newAndShiny && context != 13 && context != 21 && context != 14 && context != 22) + { + texture2D1 = TextureAssets.InventoryBack15.Value; + float num2 = (float) ((double) ((float) Main.mouseTextColor / (float) byte.MaxValue) * 0.200000002980232 + 0.800000011920929); + color2 = color2.MultiplyRGBA(new Color(num2, num2, num2)); + } + else if (PlayerInput.UsingGamepadUI && obj.type > 0 && obj.stack > 0 && num1 != 0 && context != 13 && context != 21 && context != 22) + { + texture2D1 = TextureAssets.InventoryBack15.Value; + float num3 = (float) ((double) ((float) Main.mouseTextColor / (float) byte.MaxValue) * 0.200000002980232 + 0.800000011920929); + color2 = num1 != 1 ? color2.MultiplyRGBA(new Color(num3 / 2f, num3, num3 / 2f)) : color2.MultiplyRGBA(new Color(num3, num3 / 2f, num3 / 2f)); + } + else if (context == 0 && slot < 10) + { + texture2D1 = TextureAssets.InventoryBack9.Value; + if (player.selectedItem == slot && !PlayerInput.UsingGamepad) + { + texture2D1 = TextureAssets.InventoryBack14.Value; + color2 = Color.White; + } + } + else if (context == 28) + { + texture2D1 = TextureAssets.InventoryBack7.Value; + color2 = Color.White; + } + else if (context == 10 || context == 8 || context == 16 || context == 17 || context == 19 || context == 18 || context == 20) + texture2D1 = TextureAssets.InventoryBack3.Value; + else if (context == 11 || context == 9 || context == 24 || context == 23 || context == 26) + texture2D1 = TextureAssets.InventoryBack8.Value; + else if (context == 12 || context == 25 || context == 27) + { + texture2D1 = TextureAssets.InventoryBack12.Value; + } + else + { + switch (context) + { + case 3: + texture2D1 = TextureAssets.InventoryBack5.Value; + break; + case 4: + texture2D1 = TextureAssets.InventoryBack2.Value; + break; + default: + if (context == 7 || context == 5) + { + texture2D1 = TextureAssets.InventoryBack4.Value; + break; + } + switch (context) + { + case 6: + texture2D1 = TextureAssets.InventoryBack7.Value; + break; + case 13: + byte num4 = 200; + if (slot == Main.player[Main.myPlayer].selectedItem) + { + texture2D1 = TextureAssets.InventoryBack14.Value; + num4 = byte.MaxValue; + } + color2 = new Color((int) num4, (int) num4, (int) num4, (int) num4); + break; + default: + if (context == 14 || context == 21) + { + flag2 = true; + break; + } + switch (context) + { + case 15: + texture2D1 = TextureAssets.InventoryBack6.Value; + break; + case 22: + texture2D1 = TextureAssets.InventoryBack4.Value; + if (ItemSlot.DrawGoldBGForCraftingMaterial) + { + ItemSlot.DrawGoldBGForCraftingMaterial = false; + texture2D1 = TextureAssets.InventoryBack14.Value; + float t = (float) color2.A / (float) byte.MaxValue; + color2 = Color.White * ((double) t >= 0.699999988079071 ? 1f : Utils.GetLerpValue(0.0f, 0.7f, t, true)); + break; + } + break; + case 29: + color2 = new Color(53, 69, (int) sbyte.MaxValue, (int) byte.MaxValue); + texture2D1 = TextureAssets.InventoryBack18.Value; + break; + case 30: + flag2 = !flag1; + break; + } + break; + } + break; + } + } + if ((context == 0 || context == 2) && ItemSlot.inventoryGlowTime[slot] > 0 && !inv[slot].favorited && !inv[slot].IsAir) + { + float num5 = Main.invAlpha / (float) byte.MaxValue; + Color color3 = new Color(63, 65, 151, (int) byte.MaxValue) * num5; + Color color4 = Main.hslToRgb(ItemSlot.inventoryGlowHue[slot], 1f, 0.5f) * num5; + float num6 = (float) ItemSlot.inventoryGlowTime[slot] / 300f; + float num7 = num6 * num6; + Color color5 = color4; + double num8 = (double) num7 / 2.0; + color2 = Color.Lerp(color3, color5, (float) num8); + texture2D1 = TextureAssets.InventoryBack13.Value; + } + if ((context == 4 || context == 3) && ItemSlot.inventoryGlowTimeChest[slot] > 0 && !inv[slot].favorited && !inv[slot].IsAir) + { + float num9 = Main.invAlpha / (float) byte.MaxValue; + Color color6 = new Color(130, 62, 102, (int) byte.MaxValue) * num9; + if (context == 3) + color6 = new Color(104, 52, 52, (int) byte.MaxValue) * num9; + Color color7 = Main.hslToRgb(ItemSlot.inventoryGlowHueChest[slot], 1f, 0.5f) * num9; + float num10 = (float) ItemSlot.inventoryGlowTimeChest[slot] / 300f; + float num11 = num10 * num10; + color2 = Color.Lerp(color6, color7, num11 / 2f); + texture2D1 = TextureAssets.InventoryBack13.Value; + } + if (flag1) + { + texture2D1 = TextureAssets.InventoryBack14.Value; + color2 = Color.White; + } + if (context == 28 && Main.MouseScreen.Between(position, position + texture2D1.Size() * inventoryScale) && !player.mouseInterface) + { + texture2D1 = TextureAssets.InventoryBack14.Value; + color2 = Color.White; + } + if (!flag2) + spriteBatch.Draw(texture2D1, position, new Rectangle?(), color2, 0.0f, new Vector2(), inventoryScale, SpriteEffects.None, 0.0f); + int num12 = -1; + switch (context) + { + case 8: + case 23: + if (slot == 0) + num12 = 0; + if (slot == 1) + num12 = 6; + if (slot == 2) + { + num12 = 12; + break; + } + break; + case 9: + if (slot == 10) + num12 = 3; + if (slot == 11) + num12 = 9; + if (slot == 12) + { + num12 = 15; + break; + } + break; + case 10: + case 24: + num12 = 11; + break; + case 11: + num12 = 2; + break; + case 12: + case 25: + case 27: + num12 = 1; + break; + case 16: + num12 = 4; + break; + case 17: + num12 = 13; + break; + case 18: + num12 = 7; + break; + case 19: + num12 = 10; + break; + case 20: + num12 = 17; + break; + case 26: + num12 = 0; + break; + } + if ((obj.type <= 0 || obj.stack <= 0) && num12 != -1) + { + Texture2D texture2D2 = TextureAssets.Extra[54].Value; + Rectangle r = texture2D2.Frame(3, 6, num12 % 3, num12 / 3); + r.Width -= 2; + r.Height -= 2; + spriteBatch.Draw(texture2D2, position + texture2D1.Size() / 2f * inventoryScale, new Rectangle?(r), Color.White * 0.35f, 0.0f, r.Size() / 2f, inventoryScale, SpriteEffects.None, 0.0f); + } + Vector2 vector2 = texture2D1.Size() * inventoryScale; + if (obj.type > 0 && obj.stack > 0) + { + Main.instance.LoadItem(obj.type); + Texture2D texture2D3 = TextureAssets.Item[obj.type].Value; + Rectangle r = Main.itemAnimations[obj.type] == null ? texture2D3.Frame() : Main.itemAnimations[obj.type].GetFrame(texture2D3); + Color currentColor = color1; + float scale1 = 1f; + ItemSlot.GetItemLight(ref currentColor, ref scale1, obj); + float num13 = 1f; + if (r.Width > 32 || r.Height > 32) + num13 = r.Width <= r.Height ? 32f / (float) r.Height : 32f / (float) r.Width; + float scale2 = num13 * inventoryScale; + Vector2 position1 = position + vector2 / 2f - r.Size() * scale2 / 2f; + Vector2 origin = r.Size() * (float) ((double) scale1 / 2.0 - 0.5); + spriteBatch.Draw(texture2D3, position1, new Rectangle?(r), obj.GetAlpha(currentColor), 0.0f, origin, scale2 * scale1, SpriteEffects.None, 0.0f); + if (obj.color != Color.Transparent) + spriteBatch.Draw(texture2D3, position1, new Rectangle?(r), obj.GetColor(color1), 0.0f, origin, scale2 * scale1, SpriteEffects.None, 0.0f); + if (ItemID.Sets.TrapSigned[obj.type]) + spriteBatch.Draw(TextureAssets.Wire.Value, position + new Vector2(40f, 40f) * inventoryScale, new Rectangle?(new Rectangle(4, 58, 8, 8)), color1, 0.0f, new Vector2(4f), 1f, SpriteEffects.None, 0.0f); + if (obj.stack > 1) + ChatManager.DrawColorCodedStringWithShadow(spriteBatch, FontAssets.ItemStack.Value, obj.stack.ToString(), position + new Vector2(10f, 26f) * inventoryScale, color1, 0.0f, Vector2.Zero, new Vector2(inventoryScale), spread: inventoryScale); + int num14 = -1; + if (context == 13) + { + if (obj.DD2Summon) + { + for (int index = 0; index < 58; ++index) + { + if (inv[index].type == 3822) + num14 += inv[index].stack; + } + if (num14 >= 0) + ++num14; + } + if (obj.useAmmo > 0) + { + int useAmmo = obj.useAmmo; + num14 = 0; + for (int index = 0; index < 58; ++index) + { + if (inv[index].ammo == useAmmo) + num14 += inv[index].stack; + } + } + if (obj.fishingPole > 0) + { + num14 = 0; + for (int index = 0; index < 58; ++index) + { + if (inv[index].bait > 0) + num14 += inv[index].stack; + } + } + if (obj.tileWand > 0) + { + int tileWand = obj.tileWand; + num14 = 0; + for (int index = 0; index < 58; ++index) + { + if (inv[index].type == tileWand) + num14 += inv[index].stack; + } + } + if (obj.type == 509 || obj.type == 851 || obj.type == 850 || obj.type == 3612 || obj.type == 3625 || obj.type == 3611) + { + num14 = 0; + for (int index = 0; index < 58; ++index) + { + if (inv[index].type == 530) + num14 += inv[index].stack; + } + } + } + if (num14 != -1) + ChatManager.DrawColorCodedStringWithShadow(spriteBatch, FontAssets.ItemStack.Value, num14.ToString(), position + new Vector2(8f, 30f) * inventoryScale, color1, 0.0f, Vector2.Zero, new Vector2(inventoryScale * 0.8f), spread: inventoryScale); + if (context == 13) + { + string text = string.Concat((object) (slot + 1)); + if (text == "10") + text = "0"; + ChatManager.DrawColorCodedStringWithShadow(spriteBatch, FontAssets.ItemStack.Value, text, position + new Vector2(8f, 4f) * inventoryScale, color1, 0.0f, Vector2.Zero, new Vector2(inventoryScale), spread: inventoryScale); + } + if (context == 13 && obj.potion) + { + Vector2 position2 = position + texture2D1.Size() * inventoryScale / 2f - TextureAssets.Cd.Value.Size() * inventoryScale / 2f; + Color color8 = obj.GetAlpha(color1) * ((float) player.potionDelay / (float) player.potionDelayTime); + spriteBatch.Draw(TextureAssets.Cd.Value, position2, new Rectangle?(), color8, 0.0f, new Vector2(), scale2, SpriteEffects.None, 0.0f); + } + if ((context == 10 || context == 18) && obj.expertOnly && !Main.expertMode) + { + Vector2 position3 = position + texture2D1.Size() * inventoryScale / 2f - TextureAssets.Cd.Value.Size() * inventoryScale / 2f; + Color white = Color.White; + spriteBatch.Draw(TextureAssets.Cd.Value, position3, new Rectangle?(), white, 0.0f, new Vector2(), scale2, SpriteEffects.None, 0.0f); + } + } + else if (context == 6) + { + Texture2D texture2D4 = TextureAssets.Trash.Value; + Vector2 position4 = position + texture2D1.Size() * inventoryScale / 2f - texture2D4.Size() * inventoryScale / 2f; + spriteBatch.Draw(texture2D4, position4, new Rectangle?(), new Color(100, 100, 100, 100), 0.0f, new Vector2(), inventoryScale, SpriteEffects.None, 0.0f); + } + if (context == 0 && slot < 10) + { + float num15 = inventoryScale; + string text = string.Concat((object) (slot + 1)); + if (text == "10") + text = "0"; + Color baseColor = Main.inventoryBack; + int num16 = 0; + if (Main.player[Main.myPlayer].selectedItem == slot) + { + baseColor = Color.White; + baseColor.A = (byte) 200; + num16 -= 2; + float num17 = num15 * 1.4f; + } + ChatManager.DrawColorCodedStringWithShadow(spriteBatch, FontAssets.ItemStack.Value, text, position + new Vector2(6f, (float) (4 + num16)) * inventoryScale, baseColor, 0.0f, Vector2.Zero, new Vector2(inventoryScale), spread: inventoryScale); + } + if (ID == -1) + return; + UILinkPointNavigator.SetPosition(ID, position + vector2 * 0.75f); + } + + public static void MouseHover(ref Item inv, int context = 0) + { + ItemSlot.singleSlotArray[0] = inv; + ItemSlot.MouseHover(ItemSlot.singleSlotArray, context); + inv = ItemSlot.singleSlotArray[0]; + } + + public static void MouseHover(Item[] inv, int context = 0, int slot = 0) + { + if (context == 6 && Main.hoverItemName == null) + Main.hoverItemName = Lang.inter[3].Value; + if (inv[slot].type > 0 && inv[slot].stack > 0) + { + ItemSlot._customCurrencyForSavings = inv[slot].shopSpecialCurrency; + Main.hoverItemName = inv[slot].Name; + if (inv[slot].stack > 1) + Main.hoverItemName = Main.hoverItemName + " (" + (object) inv[slot].stack + ")"; + Main.HoverItem = inv[slot].Clone(); + Main.HoverItem.tooltipContext = context; + if (context == 8 && slot <= 2) + Main.HoverItem.wornArmor = true; + else if (context == 11 || context == 9) + { + Main.HoverItem.social = true; + } + else + { + if (context != 15) + return; + Main.HoverItem.buy = true; + } + } + else + { + if (context == 10 || context == 11 || context == 24) + Main.hoverItemName = Lang.inter[9].Value; + if (context == 11) + Main.hoverItemName = Lang.inter[11].Value + " " + Main.hoverItemName; + if (context == 8 || context == 9 || context == 23 || context == 26) + { + if (slot == 0 || slot == 10 || context == 26) + Main.hoverItemName = Lang.inter[12].Value; + else if (slot == 1 || slot == 11) + Main.hoverItemName = Lang.inter[13].Value; + else if (slot == 2 || slot == 12) + Main.hoverItemName = Lang.inter[14].Value; + else if (slot >= 10) + Main.hoverItemName = Lang.inter[11].Value + " " + Main.hoverItemName; + } + if (context == 12 || context == 25 || context == 27) + Main.hoverItemName = Lang.inter[57].Value; + if (context == 16) + Main.hoverItemName = Lang.inter[90].Value; + if (context == 17) + Main.hoverItemName = Lang.inter[91].Value; + if (context == 19) + Main.hoverItemName = Lang.inter[92].Value; + if (context == 18) + Main.hoverItemName = Lang.inter[93].Value; + if (context != 20) + return; + Main.hoverItemName = Lang.inter[94].Value; + } + } + + public static void SwapEquip(ref Item inv, int context = 0) + { + ItemSlot.singleSlotArray[0] = inv; + ItemSlot.SwapEquip(ItemSlot.singleSlotArray, context, 0); + inv = ItemSlot.singleSlotArray[0]; + } + + public static void SwapEquip(Item[] inv, int context, int slot) + { + Player player = Main.player[Main.myPlayer]; + if (ItemSlot.isEquipLocked(inv[slot].type)) + return; + if (inv[slot].dye > (byte) 0) + { + bool success; + inv[slot] = ItemSlot.DyeSwap(inv[slot], out success); + if (success) + { + Main.EquipPageSelected = 0; + AchievementsHelper.HandleOnEquip(player, inv[slot], 12); + } + } + else if (Main.projHook[inv[slot].shoot]) + { + bool success; + inv[slot] = ItemSlot.EquipSwap(inv[slot], player.miscEquips, 4, out success); + if (success) + { + Main.EquipPageSelected = 2; + AchievementsHelper.HandleOnEquip(player, inv[slot], 16); + } + } + else if (inv[slot].mountType != -1 && !MountID.Sets.Cart[inv[slot].mountType]) + { + bool success; + inv[slot] = ItemSlot.EquipSwap(inv[slot], player.miscEquips, 3, out success); + if (success) + { + Main.EquipPageSelected = 2; + AchievementsHelper.HandleOnEquip(player, inv[slot], 17); + } + } + else if (inv[slot].mountType != -1 && MountID.Sets.Cart[inv[slot].mountType]) + { + bool success; + inv[slot] = ItemSlot.EquipSwap(inv[slot], player.miscEquips, 2, out success); + if (success) + Main.EquipPageSelected = 2; + } + else if (inv[slot].buffType > 0 && Main.lightPet[inv[slot].buffType]) + { + bool success; + inv[slot] = ItemSlot.EquipSwap(inv[slot], player.miscEquips, 1, out success); + if (success) + Main.EquipPageSelected = 2; + } + else if (inv[slot].buffType > 0 && Main.vanityPet[inv[slot].buffType]) + { + bool success; + inv[slot] = ItemSlot.EquipSwap(inv[slot], player.miscEquips, 0, out success); + if (success) + Main.EquipPageSelected = 2; + } + else + { + Item obj = inv[slot]; + bool success; + inv[slot] = ItemSlot.ArmorSwap(inv[slot], out success); + if (success) + { + Main.EquipPageSelected = 0; + AchievementsHelper.HandleOnEquip(player, obj, obj.accessory ? 10 : 8); + } + } + Recipe.FindRecipes(); + if (context != 3 || Main.netMode != 1) + return; + NetMessage.SendData(32, number: player.chest, number2: ((float) slot)); + } + + public static bool Equippable(ref Item inv, int context = 0) + { + ItemSlot.singleSlotArray[0] = inv; + int num = ItemSlot.Equippable(ItemSlot.singleSlotArray, context, 0) ? 1 : 0; + inv = ItemSlot.singleSlotArray[0]; + return num != 0; + } + + public static bool Equippable(Item[] inv, int context, int slot) + { + Player player = Main.player[Main.myPlayer]; + return inv[slot].dye > (byte) 0 || Main.projHook[inv[slot].shoot] || inv[slot].mountType != -1 || inv[slot].buffType > 0 && Main.lightPet[inv[slot].buffType] || inv[slot].buffType > 0 && Main.vanityPet[inv[slot].buffType] || inv[slot].headSlot >= 0 || inv[slot].bodySlot >= 0 || inv[slot].legSlot >= 0 || inv[slot].accessory; + } + + private static bool AccCheck(Item[] itemCollection, Item item, int slot) + { + if (ItemSlot.isEquipLocked(item.type)) + return true; + if (slot != -1 && (itemCollection[slot].IsTheSameAs(item) || itemCollection[slot].wingSlot > (sbyte) 0 && item.wingSlot > (sbyte) 0)) + return false; + for (int index = 0; index < itemCollection.Length; ++index) + { + if (slot < 10 && index < 10 && (item.wingSlot > (sbyte) 0 && itemCollection[index].wingSlot > (sbyte) 0 || slot >= 10 && index >= 10 && item.wingSlot > (sbyte) 0 && itemCollection[index].wingSlot > (sbyte) 0) || item.IsTheSameAs(itemCollection[index])) + return true; + } + return false; + } + + private static Item DyeSwap(Item item, out bool success) + { + success = false; + if (item.dye <= (byte) 0) + return item; + Player player = Main.player[Main.myPlayer]; + for (int index = 0; index < 10; ++index) + { + if (player.dye[index].type == 0) + { + ItemSlot.dyeSlotCount = index; + break; + } + } + if (ItemSlot.dyeSlotCount >= 10) + ItemSlot.dyeSlotCount = 0; + if (ItemSlot.dyeSlotCount < 0) + ItemSlot.dyeSlotCount = 9; + Item obj = player.dye[ItemSlot.dyeSlotCount].Clone(); + player.dye[ItemSlot.dyeSlotCount] = item.Clone(); + ++ItemSlot.dyeSlotCount; + if (ItemSlot.dyeSlotCount >= 10) + ItemSlot.accSlotToSwapTo = 0; + SoundEngine.PlaySound(7); + Recipe.FindRecipes(); + success = true; + return obj; + } + + private static Item ArmorSwap(Item item, out bool success) + { + success = false; + if (item.headSlot == -1 && item.bodySlot == -1 && item.legSlot == -1 && !item.accessory) + return item; + Player player = Main.player[Main.myPlayer]; + int index1 = !item.vanity || item.accessory ? 0 : 10; + item.favorited = false; + Item obj = item; + if (item.headSlot != -1) + { + obj = player.armor[index1].Clone(); + player.armor[index1] = item.Clone(); + } + else if (item.bodySlot != -1) + { + obj = player.armor[index1 + 1].Clone(); + player.armor[index1 + 1] = item.Clone(); + } + else if (item.legSlot != -1) + { + obj = player.armor[index1 + 2].Clone(); + player.armor[index1 + 2] = item.Clone(); + } + else if (item.accessory) + { + int num = 3; + for (int slot = 3; slot < 10; ++slot) + { + if (player.IsAValidEquipmentSlotForIteration(slot)) + { + num = slot; + if (player.armor[slot].type == 0) + { + ItemSlot.accSlotToSwapTo = slot - 3; + break; + } + } + } + for (int index2 = 0; index2 < player.armor.Length; ++index2) + { + if (item.IsTheSameAs(player.armor[index2])) + ItemSlot.accSlotToSwapTo = index2 - 3; + if (index2 < 10 && item.wingSlot > (sbyte) 0 && player.armor[index2].wingSlot > (sbyte) 0) + ItemSlot.accSlotToSwapTo = index2 - 3; + } + if (ItemSlot.accSlotToSwapTo > num) + return item; + if (ItemSlot.accSlotToSwapTo < 0) + ItemSlot.accSlotToSwapTo = num - 3; + int index3 = 3 + ItemSlot.accSlotToSwapTo; + if (ItemSlot.isEquipLocked(player.armor[index3].type)) + return item; + for (int index4 = 0; index4 < player.armor.Length; ++index4) + { + if (item.IsTheSameAs(player.armor[index4])) + index3 = index4; + } + obj = player.armor[index3].Clone(); + player.armor[index3] = item.Clone(); + ItemSlot.accSlotToSwapTo = 0; + } + SoundEngine.PlaySound(7); + Recipe.FindRecipes(); + success = true; + return obj; + } + + private static Item EquipSwap(Item item, Item[] inv, int slot, out bool success) + { + success = false; + Player player = Main.player[Main.myPlayer]; + item.favorited = false; + Item obj = inv[slot].Clone(); + inv[slot] = item.Clone(); + SoundEngine.PlaySound(7); + Recipe.FindRecipes(); + success = true; + return obj; + } + + public static void DrawMoney( + SpriteBatch sb, + string text, + float shopx, + float shopy, + int[] coinsArray, + bool horizontal = false) + { + Utils.DrawBorderStringFourWay(sb, FontAssets.MouseText.Value, text, shopx, shopy + 40f, Color.White * ((float) Main.mouseTextColor / (float) byte.MaxValue), Color.Black, Vector2.Zero); + if (horizontal) + { + for (int index = 0; index < 4; ++index) + { + Main.instance.LoadItem(74 - index); + if (index == 0) + { + int coins = coinsArray[3 - index]; + } + Vector2 position = new Vector2((float) ((double) shopx + (double) ChatManager.GetStringSize(FontAssets.MouseText.Value, text, Vector2.One).X + (double) (24 * index) + 45.0), shopy + 50f); + sb.Draw(TextureAssets.Item[74 - index].Value, position, new Rectangle?(), Color.White, 0.0f, TextureAssets.Item[74 - index].Value.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + Utils.DrawBorderStringFourWay(sb, FontAssets.ItemStack.Value, coinsArray[3 - index].ToString(), position.X - 11f, position.Y, Color.White, Color.Black, new Vector2(0.3f), 0.75f); + } + } + else + { + for (int index = 0; index < 4; ++index) + { + Main.instance.LoadItem(74 - index); + int num = index != 0 || coinsArray[3 - index] <= 99 ? 0 : -6; + sb.Draw(TextureAssets.Item[74 - index].Value, new Vector2(shopx + 11f + (float) (24 * index), shopy + 75f), new Rectangle?(), Color.White, 0.0f, TextureAssets.Item[74 - index].Value.Size() / 2f, 1f, SpriteEffects.None, 0.0f); + Utils.DrawBorderStringFourWay(sb, FontAssets.ItemStack.Value, coinsArray[3 - index].ToString(), shopx + (float) (24 * index) + (float) num, shopy + 75f, Color.White, Color.Black, new Vector2(0.3f), 0.75f); + } + } + } + + public static void DrawSavings(SpriteBatch sb, float shopx, float shopy, bool horizontal = false) + { + Player player = Main.player[Main.myPlayer]; + if (ItemSlot._customCurrencyForSavings != -1) + { + CustomCurrencyManager.DrawSavings(sb, ItemSlot._customCurrencyForSavings, shopx, shopy, horizontal); + } + else + { + bool overFlowing; + long num1 = Utils.CoinsCount(out overFlowing, player.bank.item); + long num2 = Utils.CoinsCount(out overFlowing, player.bank2.item); + long num3 = Utils.CoinsCount(out overFlowing, player.bank3.item); + long num4 = Utils.CoinsCount(out overFlowing, player.bank4.item); + long count = Utils.CoinsCombineStacks(out overFlowing, num1, num2, num3, num4); + if (count <= 0L) + return; + Main.instance.LoadItem(4076); + Main.instance.LoadItem(3813); + Main.instance.LoadItem(346); + Main.instance.LoadItem(87); + if (num4 > 0L) + sb.Draw(TextureAssets.Item[4076].Value, Utils.CenteredRectangle(new Vector2(shopx + 92f, shopy + 45f), TextureAssets.Item[4076].Value.Size() * 0.65f), new Rectangle?(), Color.White); + if (num3 > 0L) + sb.Draw(TextureAssets.Item[3813].Value, Utils.CenteredRectangle(new Vector2(shopx + 92f, shopy + 45f), TextureAssets.Item[3813].Value.Size() * 0.65f), new Rectangle?(), Color.White); + if (num2 > 0L) + sb.Draw(TextureAssets.Item[346].Value, Utils.CenteredRectangle(new Vector2(shopx + 80f, shopy + 50f), TextureAssets.Item[346].Value.Size() * 0.65f), new Rectangle?(), Color.White); + if (num1 > 0L) + sb.Draw(TextureAssets.Item[87].Value, Utils.CenteredRectangle(new Vector2(shopx + 70f, shopy + 60f), TextureAssets.Item[87].Value.Size() * 0.65f), new Rectangle?(), Color.White); + ItemSlot.DrawMoney(sb, Lang.inter[66].Value, shopx, shopy, Utils.CoinsSplit(count), horizontal); + } + } + + public static void GetItemLight(ref Color currentColor, Item item, bool outInTheWorld = false) + { + float scale = 1f; + ItemSlot.GetItemLight(ref currentColor, ref scale, item, outInTheWorld); + } + + public static void GetItemLight(ref Color currentColor, int type, bool outInTheWorld = false) + { + float scale = 1f; + ItemSlot.GetItemLight(ref currentColor, ref scale, type, outInTheWorld); + } + + public static void GetItemLight( + ref Color currentColor, + ref float scale, + Item item, + bool outInTheWorld = false) + { + ItemSlot.GetItemLight(ref currentColor, ref scale, item.type, outInTheWorld); + } + + public static Color GetItemLight( + ref Color currentColor, + ref float scale, + int type, + bool outInTheWorld = false) + { + if (type < 0 || type > 5045) + return currentColor; + if (type == 662 || type == 663) + { + currentColor.R = (byte) Main.DiscoR; + currentColor.G = (byte) Main.DiscoG; + currentColor.B = (byte) Main.DiscoB; + currentColor.A = byte.MaxValue; + } + else if (ItemID.Sets.ItemIconPulse[type]) + { + scale = Main.essScale; + currentColor.R = (byte) ((double) currentColor.R * (double) scale); + currentColor.G = (byte) ((double) currentColor.G * (double) scale); + currentColor.B = (byte) ((double) currentColor.B * (double) scale); + currentColor.A = (byte) ((double) currentColor.A * (double) scale); + } + else if (type == 58 || type == 184 || type == 4143) + { + scale = (float) ((double) Main.essScale * 0.25 + 0.75); + currentColor.R = (byte) ((double) currentColor.R * (double) scale); + currentColor.G = (byte) ((double) currentColor.G * (double) scale); + currentColor.B = (byte) ((double) currentColor.B * (double) scale); + currentColor.A = (byte) ((double) currentColor.A * (double) scale); + } + return currentColor; + } + + public static void DrawRadialCircular(SpriteBatch sb, Vector2 position) + { + ItemSlot.CircularRadialOpacity = MathHelper.Clamp(ItemSlot.CircularRadialOpacity + (!PlayerInput.UsingGamepad || !PlayerInput.Triggers.Current.RadialHotbar ? -0.15f : 0.25f), 0.0f, 1f); + if ((double) ItemSlot.CircularRadialOpacity == 0.0) + return; + Player player = Main.player[Main.myPlayer]; + Texture2D texture2D1 = TextureAssets.HotbarRadial[2].Value; + float num1 = ItemSlot.CircularRadialOpacity * 0.9f; + float num2 = ItemSlot.CircularRadialOpacity * 1f; + float num3 = (float) Main.mouseTextColor / (float) byte.MaxValue; + Color color = Color.White * ((float) (1.0 - (1.0 - (double) num3) * (1.0 - (double) num3)) * 0.785f) * num1; + Texture2D texture2D2 = TextureAssets.HotbarRadial[1].Value; + float num4 = 6.283185f / (float) player.CircularRadial.RadialCount; + float num5 = -1.570796f; + for (int index = 0; index < player.CircularRadial.RadialCount; ++index) + { + int binding = player.CircularRadial.Bindings[index]; + Vector2 vector2 = new Vector2(150f, 0.0f).RotatedBy((double) num5 + (double) num4 * (double) index) * num2; + float num6 = 0.85f; + if (player.CircularRadial.SelectedBinding == index) + num6 = 1.7f; + sb.Draw(texture2D2, position + vector2, new Rectangle?(), color * num6, 0.0f, texture2D2.Size() / 2f, num2 * num6, SpriteEffects.None, 0.0f); + if (binding != -1) + { + double inventoryScale = (double) Main.inventoryScale; + Main.inventoryScale = num2 * num6; + ItemSlot.Draw(sb, player.inventory, 14, binding, position + vector2 + new Vector2(-26f * num2 * num6), Color.White); + Main.inventoryScale = (float) inventoryScale; + } + } + } + + public static void DrawRadialQuicks(SpriteBatch sb, Vector2 position) + { + ItemSlot.QuicksRadialOpacity = MathHelper.Clamp(ItemSlot.QuicksRadialOpacity + (!PlayerInput.UsingGamepad || !PlayerInput.Triggers.Current.RadialQuickbar ? -0.15f : 0.25f), 0.0f, 1f); + if ((double) ItemSlot.QuicksRadialOpacity == 0.0) + return; + Player player = Main.player[Main.myPlayer]; + Texture2D texture2D = TextureAssets.HotbarRadial[2].Value; + Texture2D texture = TextureAssets.QuicksIcon.Value; + float num1 = ItemSlot.QuicksRadialOpacity * 0.9f; + float num2 = ItemSlot.QuicksRadialOpacity * 1f; + float num3 = (float) Main.mouseTextColor / (float) byte.MaxValue; + Color color = Color.White * ((float) (1.0 - (1.0 - (double) num3) * (1.0 - (double) num3)) * 0.785f) * num1; + float num4 = 6.283185f / (float) player.QuicksRadial.RadialCount; + float num5 = -1.570796f; + Item obj1 = player.QuickHeal_GetItemToUse(); + Item obj2 = player.QuickMana_GetItemToUse(); + Item obj3 = (Item) null; + Item obj4 = (Item) null; + if (obj1 == null) + { + obj1 = new Item(); + obj1.SetDefaults(28); + } + if (obj2 == null) + { + obj2 = new Item(); + obj2.SetDefaults(110); + } + if (obj3 == null) + { + obj3 = new Item(); + obj3.SetDefaults(292); + } + if (obj4 == null) + { + obj4 = new Item(); + obj4.SetDefaults(2428); + } + for (int index = 0; index < player.QuicksRadial.RadialCount; ++index) + { + Item inv = obj4; + if (index == 1) + inv = obj1; + if (index == 2) + inv = obj3; + if (index == 3) + inv = obj2; + int binding = player.QuicksRadial.Bindings[index]; + Vector2 vector2 = new Vector2(120f, 0.0f).RotatedBy((double) num5 + (double) num4 * (double) index) * num2; + float num6 = 0.85f; + if (player.QuicksRadial.SelectedBinding == index) + num6 = 1.7f; + sb.Draw(texture2D, position + vector2, new Rectangle?(), color * num6, 0.0f, texture2D.Size() / 2f, (float) ((double) num2 * (double) num6 * 1.29999995231628), SpriteEffects.None, 0.0f); + double inventoryScale = (double) Main.inventoryScale; + Main.inventoryScale = num2 * num6; + ItemSlot.Draw(sb, ref inv, 14, position + vector2 + new Vector2(-26f * num2 * num6), Color.White); + Main.inventoryScale = (float) inventoryScale; + sb.Draw(texture, position + vector2 + new Vector2(34f, 20f) * 0.85f * num2 * num6, new Rectangle?(), color * num6, 0.0f, texture2D.Size() / 2f, (float) ((double) num2 * (double) num6 * 1.29999995231628), SpriteEffects.None, 0.0f); + } + } + + public static void DrawRadialDpad(SpriteBatch sb, Vector2 position) + { + if (!PlayerInput.UsingGamepad || !PlayerInput.CurrentProfile.UsingDpadHotbar()) + return; + Player player = Main.player[Main.myPlayer]; + if (player.chest != -1) + return; + Texture2D texture2D = TextureAssets.HotbarRadial[0].Value; + float num = (float) Main.mouseTextColor / (float) byte.MaxValue; + Color color = Color.White * ((float) (1.0 - (1.0 - (double) num) * (1.0 - (double) num)) * 0.785f); + sb.Draw(texture2D, position, new Rectangle?(), color, 0.0f, texture2D.Size() / 2f, Main.inventoryScale, SpriteEffects.None, 0.0f); + for (int index = 0; index < 4; ++index) + { + int binding = player.DpadRadial.Bindings[index]; + if (binding != -1) + ItemSlot.Draw(sb, player.inventory, 14, binding, position + new Vector2((float) (texture2D.Width / 3), 0.0f).RotatedBy(1.57079637050629 * (double) index - 1.57079637050629) + new Vector2(-26f * Main.inventoryScale), Color.White); + } + } + + public static string GetGamepadInstructions(ref Item inv, int context = 0) + { + ItemSlot.singleSlotArray[0] = inv; + string gamepadInstructions = ItemSlot.GetGamepadInstructions(ItemSlot.singleSlotArray, context); + inv = ItemSlot.singleSlotArray[0]; + return gamepadInstructions; + } + + public static string GetGamepadInstructions(Item[] inv, int context = 0, int slot = 0) + { + Player player = Main.player[Main.myPlayer]; + string s = ""; + if (inv == null || inv[slot] == null || Main.mouseItem == null) + return s; + if (context == 0 || context == 1 || context == 2) + { + if (inv[slot].type > 0 && inv[slot].stack > 0) + { + string str; + if (Main.mouseItem.type > 0) + { + str = s + PlayerInput.BuildCommand(Lang.misc[65].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + if (inv[slot].type == Main.mouseItem.type && Main.mouseItem.stack < inv[slot].maxStack && inv[slot].maxStack > 1) + str += PlayerInput.BuildCommand(Lang.misc[55].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseRight"]); + } + else + { + if (context == 0 && player.chest == -1) + player.DpadRadial.ChangeBinding(slot); + str = s + PlayerInput.BuildCommand(Lang.misc[54].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + if (inv[slot].maxStack > 1) + str += PlayerInput.BuildCommand(Lang.misc[55].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseRight"]); + } + if (inv[slot].maxStack == 1 && ItemSlot.Equippable(inv, context, slot)) + { + str += PlayerInput.BuildCommand(Lang.misc[67].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Grapple"]); + if (PlayerInput.Triggers.JustPressed.Grapple) + ItemSlot.SwapEquip(inv, context, slot); + } + s = str + PlayerInput.BuildCommand(Lang.misc[83].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["SmartCursor"]); + if (PlayerInput.Triggers.JustPressed.SmartCursor) + inv[slot].favorited = !inv[slot].favorited; + } + else if (Main.mouseItem.type > 0) + s += PlayerInput.BuildCommand(Lang.misc[65].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + } + if (context == 3 || context == 4) + { + if (inv[slot].type > 0 && inv[slot].stack > 0) + { + if (Main.mouseItem.type > 0) + { + s += PlayerInput.BuildCommand(Lang.misc[65].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + if (inv[slot].type == Main.mouseItem.type && Main.mouseItem.stack < inv[slot].maxStack && inv[slot].maxStack > 1) + s += PlayerInput.BuildCommand(Lang.misc[55].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseRight"]); + } + else + { + s += PlayerInput.BuildCommand(Lang.misc[54].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + if (inv[slot].maxStack > 1) + s += PlayerInput.BuildCommand(Lang.misc[55].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseRight"]); + } + if (inv[slot].maxStack == 1 && ItemSlot.Equippable(inv, context, slot)) + { + s += PlayerInput.BuildCommand(Lang.misc[67].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Grapple"]); + if (PlayerInput.Triggers.JustPressed.Grapple) + ItemSlot.SwapEquip(inv, context, slot); + } + } + else if (Main.mouseItem.type > 0) + s += PlayerInput.BuildCommand(Lang.misc[65].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + } + if (context == 15) + { + if (inv[slot].type > 0 && inv[slot].stack > 0) + { + if (Main.mouseItem.type > 0) + { + if (inv[slot].type == Main.mouseItem.type && Main.mouseItem.stack < inv[slot].maxStack && inv[slot].maxStack > 1) + s += PlayerInput.BuildCommand(Lang.misc[91].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseRight"]); + } + else + s += PlayerInput.BuildCommand(Lang.misc[90].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"], PlayerInput.ProfileGamepadUI.KeyStatus["MouseRight"]); + } + else if (Main.mouseItem.type > 0) + s += PlayerInput.BuildCommand(Lang.misc[92].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + } + if (context == 8 || context == 9 || context == 16 || context == 17 || context == 18 || context == 19 || context == 20) + { + if (inv[slot].type > 0 && inv[slot].stack > 0) + { + if (Main.mouseItem.type > 0) + { + if (ItemSlot.Equippable(ref Main.mouseItem, context)) + s += PlayerInput.BuildCommand(Lang.misc[65].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + } + else if (context != 8 || !ItemSlot.isEquipLocked(inv[slot].type)) + s += PlayerInput.BuildCommand(Lang.misc[54].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + if (context == 8 && slot >= 3) + { + bool flag = player.hideVisibleAccessory[slot]; + s += PlayerInput.BuildCommand(Lang.misc[flag ? 77 : 78].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Grapple"]); + if (PlayerInput.Triggers.JustPressed.Grapple) + { + player.hideVisibleAccessory[slot] = !player.hideVisibleAccessory[slot]; + SoundEngine.PlaySound(12); + if (Main.netMode == 1) + NetMessage.SendData(4, number: Main.myPlayer); + } + } + if ((context == 16 || context == 17 || context == 18 || context == 19 || context == 20) && slot < 2) + { + bool flag = player.hideMisc[slot]; + s += PlayerInput.BuildCommand(Lang.misc[flag ? 77 : 78].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Grapple"]); + if (PlayerInput.Triggers.JustPressed.Grapple) + { + player.hideMisc[slot] = !player.hideMisc[slot]; + SoundEngine.PlaySound(12); + if (Main.netMode == 1) + NetMessage.SendData(4, number: Main.myPlayer); + } + } + } + else + { + if (Main.mouseItem.type > 0 && ItemSlot.Equippable(ref Main.mouseItem, context)) + s += PlayerInput.BuildCommand(Lang.misc[65].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + if (context == 8 && slot >= 3) + { + bool flag = player.hideVisibleAccessory[slot]; + s += PlayerInput.BuildCommand(Lang.misc[flag ? 77 : 78].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Grapple"]); + if (PlayerInput.Triggers.JustPressed.Grapple) + { + player.hideVisibleAccessory[slot] = !player.hideVisibleAccessory[slot]; + SoundEngine.PlaySound(12); + if (Main.netMode == 1) + NetMessage.SendData(4, number: Main.myPlayer); + } + } + if ((context == 16 || context == 17 || context == 18 || context == 19 || context == 20) && slot < 2) + { + bool flag = player.hideMisc[slot]; + s += PlayerInput.BuildCommand(Lang.misc[flag ? 77 : 78].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Grapple"]); + if (PlayerInput.Triggers.JustPressed.Grapple) + { + if (slot == 0) + player.TogglePet(); + if (slot == 1) + player.ToggleLight(); + Main.mouseLeftRelease = false; + SoundEngine.PlaySound(12); + if (Main.netMode == 1) + NetMessage.SendData(4, number: Main.myPlayer); + } + } + } + } + if (context == 12 || context == 25 || context == 27) + { + if (inv[slot].type > 0 && inv[slot].stack > 0) + { + if (Main.mouseItem.type > 0) + { + if (Main.mouseItem.dye > (byte) 0) + s += PlayerInput.BuildCommand(Lang.misc[65].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + } + else + s += PlayerInput.BuildCommand(Lang.misc[54].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + if (context == 12 || context == 25 || context == 27) + { + int num = -1; + if (inv == player.dye) + num = slot; + if (inv == player.miscDyes) + num = 10 + slot; + if (num != -1) + { + if (num < 10) + { + bool flag = player.hideVisibleAccessory[slot]; + s += PlayerInput.BuildCommand(Lang.misc[flag ? 77 : 78].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Grapple"]); + if (PlayerInput.Triggers.JustPressed.Grapple) + { + player.hideVisibleAccessory[slot] = !player.hideVisibleAccessory[slot]; + SoundEngine.PlaySound(12); + if (Main.netMode == 1) + NetMessage.SendData(4, number: Main.myPlayer); + } + } + else + { + bool flag = player.hideMisc[slot]; + s += PlayerInput.BuildCommand(Lang.misc[flag ? 77 : 78].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["Grapple"]); + if (PlayerInput.Triggers.JustPressed.Grapple) + { + player.hideMisc[slot] = !player.hideMisc[slot]; + SoundEngine.PlaySound(12); + if (Main.netMode == 1) + NetMessage.SendData(4, number: Main.myPlayer); + } + } + } + } + } + else if (Main.mouseItem.type > 0 && Main.mouseItem.dye > (byte) 0) + s += PlayerInput.BuildCommand(Lang.misc[65].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + return s; + } + if (context == 6) + { + if (inv[slot].type > 0 && inv[slot].stack > 0) + { + if (Main.mouseItem.type > 0) + s += PlayerInput.BuildCommand(Lang.misc[74].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + else + s += PlayerInput.BuildCommand(Lang.misc[54].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + } + else if (Main.mouseItem.type > 0) + s += PlayerInput.BuildCommand(Lang.misc[74].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + return s; + } + if (context == 5 || context == 7) + { + bool flag = false; + if (context == 5) + flag = Main.mouseItem.Prefix(-3) || Main.mouseItem.type == 0; + if (context == 7) + flag = Main.mouseItem.material; + if (inv[slot].type > 0 && inv[slot].stack > 0) + { + if (Main.mouseItem.type > 0) + { + if (flag) + s += PlayerInput.BuildCommand(Lang.misc[65].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + } + else + s += PlayerInput.BuildCommand(Lang.misc[54].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + } + else if (Main.mouseItem.type > 0 & flag) + s += PlayerInput.BuildCommand(Lang.misc[65].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["MouseLeft"]); + return s; + } + string overrideInstructions = ItemSlot.GetOverrideInstructions(inv, context, slot); + bool flag1 = Main.mouseItem.type > 0 && (context == 0 || context == 1 || context == 2 || context == 6 || context == 15 || context == 7 || context == 4 || context == 3); + if (context != 8 || !ItemSlot.isEquipLocked(inv[slot].type)) + { + if (flag1 && string.IsNullOrEmpty(overrideInstructions)) + { + s += PlayerInput.BuildCommand(Lang.inter[121].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["SmartSelect"]); + if (PlayerInput.Triggers.JustPressed.SmartSelect) + player.DropSelectedItem(); + } + else if (!string.IsNullOrEmpty(overrideInstructions)) + { + ItemSlot.ShiftForcedOn = true; + int cursorOverride = Main.cursorOverride; + ItemSlot.OverrideHover(inv, context, slot); + if (-1 != Main.cursorOverride) + { + s += PlayerInput.BuildCommand(overrideInstructions, false, PlayerInput.ProfileGamepadUI.KeyStatus["SmartSelect"]); + if (PlayerInput.Triggers.JustPressed.SmartSelect) + { + int num = Main.mouseLeft ? 1 : 0; + Main.mouseLeft = true; + ItemSlot.LeftClick(inv, context, slot); + Main.mouseLeft = num != 0; + } + } + Main.cursorOverride = cursorOverride; + ItemSlot.ShiftForcedOn = false; + } + } + if (!ItemSlot.TryEnteringFastUseMode(inv, context, slot, player, ref s)) + ItemSlot.TryEnteringBuildingMode(inv, context, slot, player, ref s); + return s; + } + + private static bool TryEnteringFastUseMode( + Item[] inv, + int context, + int slot, + Player player, + ref string s) + { + int num = 0; + if (Main.mouseItem.CanBeQuickUsed) + num = 1; + if (num == 0 && Main.mouseItem.stack <= 0 && context == 0 && inv[slot].CanBeQuickUsed) + num = 2; + if (num <= 0) + return false; + s += PlayerInput.BuildCommand(Language.GetTextValue("UI.QuickUseItem"), false, PlayerInput.ProfileGamepadUI.KeyStatus["QuickMount"]); + if (PlayerInput.Triggers.JustPressed.QuickMount) + { + switch (num) + { + case 1: + PlayerInput.TryEnteringFastUseModeForMouseItem(); + break; + case 2: + PlayerInput.TryEnteringFastUseModeForInventorySlot(slot); + break; + } + } + return true; + } + + private static bool TryEnteringBuildingMode( + Item[] inv, + int context, + int slot, + Player player, + ref string s) + { + int num = 0; + if (ItemSlot.IsABuildingItem(Main.mouseItem)) + num = 1; + if (num == 0 && Main.mouseItem.stack <= 0 && context == 0 && ItemSlot.IsABuildingItem(inv[slot])) + num = 2; + if (num > 0) + { + Item mouseItem = Main.mouseItem; + if (num == 1) + mouseItem = Main.mouseItem; + if (num == 2) + mouseItem = inv[slot]; + if (num != 1 || player.ItemSpace(mouseItem).CanTakeItemToPersonalInventory) + { + if (mouseItem.damage > 0 && mouseItem.ammo == 0) + s += PlayerInput.BuildCommand(Lang.misc[60].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["QuickMount"]); + else if (mouseItem.createTile >= 0 || mouseItem.createWall > 0) + s += PlayerInput.BuildCommand(Lang.misc[61].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["QuickMount"]); + else + s += PlayerInput.BuildCommand(Lang.misc[63].Value, false, PlayerInput.ProfileGamepadUI.KeyStatus["QuickMount"]); + if (PlayerInput.Triggers.JustPressed.QuickMount) + PlayerInput.EnterBuildingMode(); + return true; + } + } + return false; + } + + public static bool IsABuildingItem(Item item) => item.type > 0 && item.stack > 0 && item.useStyle != 0 && item.useTime > 0; + + public static void SelectEquipPage(Item item) + { + Main.EquipPage = -1; + if (item.IsAir) + return; + if (Main.projHook[item.shoot]) + Main.EquipPage = 2; + else if (item.mountType != -1) + Main.EquipPage = 2; + else if (item.buffType > 0 && Main.vanityPet[item.buffType]) + Main.EquipPage = 2; + else if (item.buffType > 0 && Main.lightPet[item.buffType]) + Main.EquipPage = 2; + else if (item.dye > (byte) 0 && Main.EquipPageSelected == 1) + { + Main.EquipPage = 0; + } + else + { + if (item.legSlot == -1 && item.headSlot == -1 && item.bodySlot == -1 && !item.accessory) + return; + Main.EquipPage = 0; + } + } + + public class Options + { + public static bool DisableLeftShiftTrashCan = true; + public static bool HighlightNewItems = true; + } + + public class Context + { + public const int InventoryItem = 0; + public const int InventoryCoin = 1; + public const int InventoryAmmo = 2; + public const int ChestItem = 3; + public const int BankItem = 4; + public const int PrefixItem = 5; + public const int TrashItem = 6; + public const int GuideItem = 7; + public const int EquipArmor = 8; + public const int EquipArmorVanity = 9; + public const int EquipAccessory = 10; + public const int EquipAccessoryVanity = 11; + public const int EquipDye = 12; + public const int HotbarItem = 13; + public const int ChatItem = 14; + public const int ShopItem = 15; + public const int EquipGrapple = 16; + public const int EquipMount = 17; + public const int EquipMinecart = 18; + public const int EquipPet = 19; + public const int EquipLight = 20; + public const int MouseItem = 21; + public const int CraftingMaterial = 22; + public const int DisplayDollArmor = 23; + public const int DisplayDollAccessory = 24; + public const int DisplayDollDye = 25; + public const int HatRackHat = 26; + public const int HatRackDye = 27; + public const int GoldDebug = 28; + public const int CreativeInfinite = 29; + public const int CreativeSacrifice = 30; + public const int Count = 31; + } + } +} diff --git a/UI/ItemSorting.cs b/UI/ItemSorting.cs new file mode 100644 index 0000000..ed0b446 --- /dev/null +++ b/UI/ItemSorting.cs @@ -0,0 +1,1134 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.ItemSorting +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.ID; + +namespace Terraria.UI +{ + public class ItemSorting + { + private static List _layerList = new List(); + private static Dictionary> _layerWhiteLists = new Dictionary>(); + + public static void SetupWhiteLists() + { + ItemSorting._layerWhiteLists.Clear(); + List itemSortingLayerList = new List(); + List objList = new List(); + List intList1 = new List(); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.WeaponsMelee); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.WeaponsRanged); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.WeaponsMagic); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.WeaponsMinions); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.WeaponsAssorted); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.WeaponsAmmo); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.ToolsPicksaws); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.ToolsHamaxes); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.ToolsPickaxes); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.ToolsAxes); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.ToolsHammers); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.ToolsTerraforming); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.ToolsAmmoLeftovers); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.ArmorCombat); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.ArmorVanity); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.ArmorAccessories); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.EquipGrapple); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.EquipMount); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.EquipCart); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.EquipLightPet); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.EquipVanityPet); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.PotionsDyes); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.PotionsHairDyes); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.PotionsLife); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.PotionsMana); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.PotionsElixirs); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.PotionsBuffs); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.MiscValuables); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.MiscPainting); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.MiscWiring); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.MiscMaterials); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.MiscRopes); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.MiscExtractinator); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.LastMaterials); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.LastTilesImportant); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.LastTilesCommon); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.LastNotTrash); + itemSortingLayerList.Add(ItemSorting.ItemSortingLayers.LastTrash); + for (int type = -48; type < 5045; ++type) + { + Item obj = new Item(); + obj.netDefaults(type); + objList.Add(obj); + intList1.Add(type + 48); + } + Item[] array = objList.ToArray(); + foreach (ItemSorting.ItemSortingLayer itemSortingLayer in itemSortingLayerList) + { + List intList2 = itemSortingLayer.SortingMethod(itemSortingLayer, array, intList1); + List intList3 = new List(); + for (int index = 0; index < intList2.Count; ++index) + intList3.Add(array[intList2[index]].netID); + ItemSorting._layerWhiteLists.Add(itemSortingLayer.Name, intList3); + } + } + + private static void SetupSortingPriorities() + { + Player player = Main.player[Main.myPlayer]; + ItemSorting._layerList.Clear(); + List floatList = new List() + { + player.meleeDamage, + player.rangedDamage, + player.magicDamage, + player.minionDamage + }; + floatList.Sort((Comparison) ((x, y) => y.CompareTo(x))); + for (int index = 0; index < 5; ++index) + { + if (!ItemSorting._layerList.Contains(ItemSorting.ItemSortingLayers.WeaponsMelee) && (double) player.meleeDamage == (double) floatList[0]) + { + floatList.RemoveAt(0); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.WeaponsMelee); + } + if (!ItemSorting._layerList.Contains(ItemSorting.ItemSortingLayers.WeaponsRanged) && (double) player.rangedDamage == (double) floatList[0]) + { + floatList.RemoveAt(0); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.WeaponsRanged); + } + if (!ItemSorting._layerList.Contains(ItemSorting.ItemSortingLayers.WeaponsMagic) && (double) player.magicDamage == (double) floatList[0]) + { + floatList.RemoveAt(0); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.WeaponsMagic); + } + if (!ItemSorting._layerList.Contains(ItemSorting.ItemSortingLayers.WeaponsMinions) && (double) player.minionDamage == (double) floatList[0]) + { + floatList.RemoveAt(0); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.WeaponsMinions); + } + } + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.WeaponsAssorted); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.WeaponsAmmo); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.ToolsPicksaws); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.ToolsHamaxes); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.ToolsPickaxes); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.ToolsAxes); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.ToolsHammers); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.ToolsTerraforming); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.ToolsAmmoLeftovers); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.ArmorCombat); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.ArmorVanity); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.ArmorAccessories); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.EquipGrapple); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.EquipMount); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.EquipCart); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.EquipLightPet); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.EquipVanityPet); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.PotionsDyes); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.PotionsHairDyes); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.PotionsLife); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.PotionsMana); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.PotionsElixirs); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.PotionsBuffs); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.MiscValuables); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.MiscPainting); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.MiscWiring); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.MiscMaterials); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.MiscRopes); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.MiscExtractinator); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.LastMaterials); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.LastTilesImportant); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.LastTilesCommon); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.LastNotTrash); + ItemSorting._layerList.Add(ItemSorting.ItemSortingLayers.LastTrash); + } + + private static void Sort(Item[] inv, params int[] ignoreSlots) + { + ItemSorting.SetupSortingPriorities(); + List intList1 = new List(); + for (int index = 0; index < inv.Length; ++index) + { + if (!((IEnumerable) ignoreSlots).Contains(index)) + { + Item obj = inv[index]; + if (obj != null && obj.stack != 0 && obj.type != 0 && !obj.favorited) + intList1.Add(index); + } + } + for (int index1 = 0; index1 < intList1.Count; ++index1) + { + Item obj1 = inv[intList1[index1]]; + if (obj1.stack < obj1.maxStack) + { + int num1 = obj1.maxStack - obj1.stack; + for (int index2 = index1; index2 < intList1.Count; ++index2) + { + if (index1 != index2) + { + Item obj2 = inv[intList1[index2]]; + if (obj1.type == obj2.type && obj2.stack != obj2.maxStack) + { + int num2 = obj2.stack; + if (num1 < num2) + num2 = num1; + obj1.stack += num2; + obj2.stack -= num2; + num1 -= num2; + if (obj2.stack == 0) + { + inv[intList1[index2]] = new Item(); + intList1.Remove(intList1[index2]); + --index1; + int num3 = index2 - 1; + break; + } + if (num1 == 0) + break; + } + } + } + } + } + List intList2 = new List((IEnumerable) intList1); + for (int index = 0; index < inv.Length; ++index) + { + if (!((IEnumerable) ignoreSlots).Contains(index) && !intList2.Contains(index)) + { + Item obj = inv[index]; + if (obj == null || obj.stack == 0 || obj.type == 0) + intList2.Add(index); + } + } + intList2.Sort(); + List intList3 = new List(); + List intList4 = new List(); + foreach (ItemSorting.ItemSortingLayer layer in ItemSorting._layerList) + { + List intList5 = layer.SortingMethod(layer, inv, intList1); + if (intList5.Count > 0) + intList4.Add(intList5.Count); + intList3.AddRange((IEnumerable) intList5); + } + intList3.AddRange((IEnumerable) intList1); + List objList = new List(); + foreach (int index in intList3) + { + objList.Add(inv[index]); + inv[index] = new Item(); + } + float num = 1f / (float) intList4.Count; + float hue = num / 2f; + for (int index3 = 0; index3 < objList.Count; ++index3) + { + int index4 = intList2[0]; + ItemSlot.SetGlow(index4, hue, Main.player[Main.myPlayer].chest != -1); + --intList4[0]; + if (intList4[0] == 0) + { + intList4.RemoveAt(0); + hue += num; + } + inv[index4] = objList[index3]; + intList2.Remove(index4); + } + } + + public static void SortInventory() + { + if (!Main.LocalPlayer.HasItem(905)) + ItemSorting.SortCoins(); + ItemSorting.SortAmmo(); + ItemSorting.Sort(Main.player[Main.myPlayer].inventory, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 50, 51, 52, 53, 54, 55, 56, 57, 58); + } + + public static void SortChest() + { + int chest = Main.player[Main.myPlayer].chest; + if (chest == -1) + return; + Item[] inv = Main.player[Main.myPlayer].bank.item; + if (chest == -3) + inv = Main.player[Main.myPlayer].bank2.item; + if (chest == -4) + inv = Main.player[Main.myPlayer].bank3.item; + if (chest == -5) + inv = Main.player[Main.myPlayer].bank4.item; + if (chest > -1) + inv = Main.chest[chest].item; + Tuple[] tupleArray1 = new Tuple[40]; + for (int index = 0; index < 40; ++index) + tupleArray1[index] = Tuple.Create(inv[index].netID, inv[index].stack, (int) inv[index].prefix); + ItemSorting.Sort(inv); + Tuple[] tupleArray2 = new Tuple[40]; + for (int index = 0; index < 40; ++index) + tupleArray2[index] = Tuple.Create(inv[index].netID, inv[index].stack, (int) inv[index].prefix); + if (Main.netMode != 1 || Main.player[Main.myPlayer].chest <= -1) + return; + for (int index = 0; index < 40; ++index) + { + if (tupleArray2[index] != tupleArray1[index]) + NetMessage.SendData(32, number: Main.player[Main.myPlayer].chest, number2: ((float) index)); + } + } + + public static void SortAmmo() + { + ItemSorting.ClearAmmoSlotSpaces(); + ItemSorting.FillAmmoFromInventory(); + } + + public static void FillAmmoFromInventory() + { + List intList1 = new List(); + List intList2 = new List(); + Item[] inventory = Main.player[Main.myPlayer].inventory; + for (int index = 54; index < 58; ++index) + { + ItemSlot.SetGlow(index, 0.31f, false); + Item obj = inventory[index]; + if (obj.IsAir) + intList2.Add(index); + else if (obj.ammo != AmmoID.None) + { + if (!intList1.Contains(obj.type)) + intList1.Add(obj.type); + ItemSorting.RefillItemStack(inventory, inventory[index], 0, 50); + } + } + if (intList2.Count < 1) + return; + for (int index1 = 0; index1 < 50; ++index1) + { + Item obj = inventory[index1]; + if (obj.stack >= 1 && obj.CanFillEmptyAmmoSlot() && intList1.Contains(obj.type)) + { + int index2 = intList2[0]; + intList2.Remove(index2); + Utils.Swap(ref inventory[index1], ref inventory[index2]); + ItemSorting.RefillItemStack(inventory, inventory[index2], 0, 50); + if (intList2.Count == 0) + break; + } + } + if (intList2.Count < 1) + return; + for (int index3 = 0; index3 < 50; ++index3) + { + Item obj = inventory[index3]; + if (obj.stack >= 1 && obj.CanFillEmptyAmmoSlot() && obj.FitsAmmoSlot()) + { + int index4 = intList2[0]; + intList2.Remove(index4); + Utils.Swap(ref inventory[index3], ref inventory[index4]); + ItemSorting.RefillItemStack(inventory, inventory[index4], 0, 50); + if (intList2.Count == 0) + break; + } + } + } + + public static void ClearAmmoSlotSpaces() + { + Item[] inventory = Main.player[Main.myPlayer].inventory; + for (int index = 54; index < 58; ++index) + { + Item itemToRefill = inventory[index]; + if (!itemToRefill.IsAir && itemToRefill.ammo != AmmoID.None && itemToRefill.stack < itemToRefill.maxStack) + ItemSorting.RefillItemStack(inventory, itemToRefill, index + 1, 58); + } + for (int slot = 54; slot < 58; ++slot) + { + if (inventory[slot].type > 0) + ItemSorting.TrySlidingUp(inventory, slot, 54); + } + } + + private static void SortCoins() + { + Item[] inventory = Main.LocalPlayer.inventory; + bool overFlowing; + long count = Utils.CoinsCount(out overFlowing, inventory, 58); + if (overFlowing) + return; + int[] numArray = Utils.CoinsSplit(count); + int num1 = 0; + for (int index = 0; index < 3; ++index) + { + int num2 = numArray[index]; + while (num2 > 0) + { + num2 -= 99; + ++num1; + } + } + int num3 = numArray[3]; + while (num3 > 999) + { + num3 -= 999; + ++num1; + } + int num4 = 0; + for (int index = 0; index < 58; ++index) + { + if (inventory[index].type >= 71 && inventory[index].type <= 74 && inventory[index].stack > 0) + ++num4; + } + if (num4 < num1) + return; + for (int index = 0; index < 58; ++index) + { + if (inventory[index].type >= 71 && inventory[index].type <= 74 && inventory[index].stack > 0) + inventory[index].TurnToAir(); + } +label_23: + int index1; + int num5; + bool flag; + do + { + index1 = -1; + for (int index2 = 3; index2 >= 0; --index2) + { + if (numArray[index2] > 0) + { + index1 = index2; + break; + } + } + if (index1 != -1) + { + num5 = numArray[index1]; + if (index1 == 3 && num5 > 999) + num5 = 999; + flag = false; + if (!flag) + { + for (int index3 = 50; index3 < 54; ++index3) + { + if (inventory[index3].IsAir) + { + inventory[index3].SetDefaults(71 + index1); + inventory[index3].stack = num5; + numArray[index1] -= num5; + flag = true; + break; + } + } + } + } + else + goto label_17; + } + while (flag); + goto label_38; +label_17: + return; +label_38: + for (int index4 = 0; index4 < 50; ++index4) + { + if (inventory[index4].IsAir) + { + inventory[index4].SetDefaults(71 + index1); + inventory[index4].stack = num5; + numArray[index1] -= num5; + break; + } + } + goto label_23; + } + + private static void RefillItemStack( + Item[] inv, + Item itemToRefill, + int loopStartIndex, + int loopEndIndex) + { + int num1 = itemToRefill.maxStack - itemToRefill.stack; + if (num1 <= 0) + return; + for (int index = loopStartIndex; index < loopEndIndex; ++index) + { + Item obj = inv[index]; + if (obj.stack >= 1 && obj.type == itemToRefill.type) + { + int num2 = obj.stack; + if (num2 > num1) + num2 = num1; + num1 -= num2; + itemToRefill.stack += num2; + obj.stack -= num2; + if (obj.stack <= 0) + obj.TurnToAir(); + if (num1 <= 0) + break; + } + } + } + + private static void TrySlidingUp(Item[] inv, int slot, int minimumIndex) + { + for (int index = slot; index > minimumIndex; --index) + { + if (inv[index - 1].IsAir) + Utils.Swap(ref inv[index], ref inv[index - 1]); + } + } + + private class ItemSortingLayer + { + public readonly string Name; + public readonly Func, List> SortingMethod; + + public ItemSortingLayer( + string name, + Func, List> method) + { + this.Name = name; + this.SortingMethod = method; + } + + public void Validate(ref List indexesSortable, Item[] inv) + { + List list; + if (!ItemSorting._layerWhiteLists.TryGetValue(this.Name, out list)) + return; + indexesSortable = indexesSortable.Where((Func) (i => list.Contains(inv[i].netID))).ToList(); + } + + public override string ToString() => this.Name; + } + + private class ItemSortingLayers + { + public static ItemSorting.ItemSortingLayer WeaponsMelee = new ItemSorting.ItemSortingLayer("Weapons - Melee", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].maxStack == 1 && inv[i].damage > 0 && inv[i].ammo == 0 && inv[i].melee && inv[i].pick < 1 && inv[i].hammer < 1 && inv[i].axe < 1)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = inv[y].OriginalDamage.CompareTo(inv[x].OriginalDamage); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer WeaponsRanged = new ItemSorting.ItemSortingLayer("Weapons - Ranged", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].maxStack == 1 && inv[i].damage > 0 && inv[i].ammo == 0 && inv[i].ranged)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = inv[y].OriginalDamage.CompareTo(inv[x].OriginalDamage); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer WeaponsMagic = new ItemSorting.ItemSortingLayer("Weapons - Magic", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].maxStack == 1 && inv[i].damage > 0 && inv[i].ammo == 0 && inv[i].magic)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = inv[y].OriginalDamage.CompareTo(inv[x].OriginalDamage); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer WeaponsMinions = new ItemSorting.ItemSortingLayer("Weapons - Minions", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].maxStack == 1 && inv[i].damage > 0 && inv[i].summon)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = inv[y].OriginalDamage.CompareTo(inv[x].OriginalDamage); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer WeaponsAssorted = new ItemSorting.ItemSortingLayer("Weapons - Assorted", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].damage > 0 && inv[i].ammo == 0 && inv[i].pick == 0 && inv[i].axe == 0 && inv[i].hammer == 0)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = inv[y].OriginalDamage.CompareTo(inv[x].OriginalDamage); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer WeaponsAmmo = new ItemSorting.ItemSortingLayer("Weapons - Ammo", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].ammo > 0 && inv[i].damage > 0)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = inv[y].OriginalDamage.CompareTo(inv[x].OriginalDamage); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer ToolsPicksaws = new ItemSorting.ItemSortingLayer("Tools - Picksaws", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].pick > 0 && inv[i].axe > 0)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => inv[x].pick.CompareTo(inv[y].pick))); + return list; + })); + public static ItemSorting.ItemSortingLayer ToolsHamaxes = new ItemSorting.ItemSortingLayer("Tools - Hamaxes", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].hammer > 0 && inv[i].axe > 0)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => inv[x].axe.CompareTo(inv[y].axe))); + return list; + })); + public static ItemSorting.ItemSortingLayer ToolsPickaxes = new ItemSorting.ItemSortingLayer("Tools - Pickaxes", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].pick > 0)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => inv[x].pick.CompareTo(inv[y].pick))); + return list; + })); + public static ItemSorting.ItemSortingLayer ToolsAxes = new ItemSorting.ItemSortingLayer("Tools - Axes", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].pick > 0)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => inv[x].axe.CompareTo(inv[y].axe))); + return list; + })); + public static ItemSorting.ItemSortingLayer ToolsHammers = new ItemSorting.ItemSortingLayer("Tools - Hammers", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].hammer > 0)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => inv[x].hammer.CompareTo(inv[y].hammer))); + return list; + })); + public static ItemSorting.ItemSortingLayer ToolsTerraforming = new ItemSorting.ItemSortingLayer("Tools - Terraforming", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].netID > 0 && ItemID.Sets.SortingPriorityTerraforming[inv[i].netID] > -1)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = ItemID.Sets.SortingPriorityTerraforming[inv[x].netID].CompareTo(ItemID.Sets.SortingPriorityTerraforming[inv[y].netID]); + if (num == 0) + num = inv[y].stack.CompareTo(inv[x].stack); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer ToolsAmmoLeftovers = new ItemSorting.ItemSortingLayer("Weapons - Ammo Leftovers", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].ammo > 0)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = inv[y].OriginalDamage.CompareTo(inv[x].OriginalDamage); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer ArmorCombat = new ItemSorting.ItemSortingLayer("Armor - Combat", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => (inv[i].bodySlot >= 0 || inv[i].headSlot >= 0 || inv[i].legSlot >= 0) && !inv[i].vanity)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = inv[y].OriginalDefense.CompareTo(inv[x].OriginalDefense); + if (num == 0) + num = inv[x].netID.CompareTo(inv[y].netID); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer ArmorVanity = new ItemSorting.ItemSortingLayer("Armor - Vanity", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => (inv[i].bodySlot >= 0 || inv[i].headSlot >= 0 || inv[i].legSlot >= 0) && inv[i].vanity)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = inv[x].netID.CompareTo(inv[y].netID); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer ArmorAccessories = new ItemSorting.ItemSortingLayer("Armor - Accessories", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].accessory)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[x].vanity.CompareTo(inv[y].vanity); + if (num == 0) + num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = inv[y].OriginalDefense.CompareTo(inv[x].OriginalDefense); + if (num == 0) + num = inv[x].netID.CompareTo(inv[y].netID); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer EquipGrapple = new ItemSorting.ItemSortingLayer("Equip - Grapple", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => Main.projHook[inv[i].shoot])).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = inv[x].netID.CompareTo(inv[y].netID); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer EquipMount = new ItemSorting.ItemSortingLayer("Equip - Mount", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].mountType != -1 && !MountID.Sets.Cart[inv[i].mountType])).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = inv[x].netID.CompareTo(inv[y].netID); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer EquipCart = new ItemSorting.ItemSortingLayer("Equip - Cart", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].mountType != -1 && MountID.Sets.Cart[inv[i].mountType])).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = inv[x].netID.CompareTo(inv[y].netID); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer EquipLightPet = new ItemSorting.ItemSortingLayer("Equip - Light Pet", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].buffType > 0 && Main.lightPet[inv[i].buffType])).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = inv[x].netID.CompareTo(inv[y].netID); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer EquipVanityPet = new ItemSorting.ItemSortingLayer("Equip - Vanity Pet", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].buffType > 0 && Main.vanityPet[inv[i].buffType])).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = inv[x].netID.CompareTo(inv[y].netID); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer PotionsLife = new ItemSorting.ItemSortingLayer("Potions - Life", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].consumable && inv[i].healLife > 0 && inv[i].healMana < 1)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].healLife.CompareTo(inv[x].healLife); + if (num == 0) + num = inv[y].stack.CompareTo(inv[x].stack); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer PotionsMana = new ItemSorting.ItemSortingLayer("Potions - Mana", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].consumable && inv[i].healLife < 1 && inv[i].healMana > 0)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].healMana.CompareTo(inv[x].healMana); + if (num == 0) + num = inv[y].stack.CompareTo(inv[x].stack); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer PotionsElixirs = new ItemSorting.ItemSortingLayer("Potions - Elixirs", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].consumable && inv[i].healLife > 0 && inv[i].healMana > 0)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].healLife.CompareTo(inv[x].healLife); + if (num == 0) + num = inv[y].stack.CompareTo(inv[x].stack); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer PotionsBuffs = new ItemSorting.ItemSortingLayer("Potions - Buffs", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].consumable && inv[i].buffType > 0)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = inv[x].netID.CompareTo(inv[y].netID); + if (num == 0) + num = inv[y].stack.CompareTo(inv[x].stack); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer PotionsDyes = new ItemSorting.ItemSortingLayer("Potions - Dyes", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].dye > (byte) 0)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = inv[y].dye.CompareTo(inv[x].dye); + if (num == 0) + num = inv[y].stack.CompareTo(inv[x].stack); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer PotionsHairDyes = new ItemSorting.ItemSortingLayer("Potions - Hair Dyes", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].hairDye >= (short) 0)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = inv[y].hairDye.CompareTo(inv[x].hairDye); + if (num == 0) + num = inv[y].stack.CompareTo(inv[x].stack); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer MiscValuables = new ItemSorting.ItemSortingLayer("Misc - Importants", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].netID > 0 && ItemID.Sets.SortingPriorityBossSpawns[inv[i].netID] > -1)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = ItemID.Sets.SortingPriorityBossSpawns[inv[x].netID].CompareTo(ItemID.Sets.SortingPriorityBossSpawns[inv[y].netID]); + if (num == 0) + num = inv[y].stack.CompareTo(inv[x].stack); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer MiscWiring = new ItemSorting.ItemSortingLayer("Misc - Wiring", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].netID > 0 && ItemID.Sets.SortingPriorityWiring[inv[i].netID] > -1 || inv[i].mech)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = ItemID.Sets.SortingPriorityWiring[inv[y].netID].CompareTo(ItemID.Sets.SortingPriorityWiring[inv[x].netID]); + if (num == 0) + num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = inv[y].netID.CompareTo(inv[x].netID); + if (num == 0) + num = inv[y].stack.CompareTo(inv[x].stack); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer MiscMaterials = new ItemSorting.ItemSortingLayer("Misc - Materials", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].netID > 0 && ItemID.Sets.SortingPriorityMaterials[inv[i].netID] > -1)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = ItemID.Sets.SortingPriorityMaterials[inv[y].netID].CompareTo(ItemID.Sets.SortingPriorityMaterials[inv[x].netID]); + if (num == 0) + num = inv[y].stack.CompareTo(inv[x].stack); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer MiscExtractinator = new ItemSorting.ItemSortingLayer("Misc - Extractinator", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].netID > 0 && ItemID.Sets.SortingPriorityExtractibles[inv[i].netID] > -1)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = ItemID.Sets.SortingPriorityExtractibles[inv[y].netID].CompareTo(ItemID.Sets.SortingPriorityExtractibles[inv[x].netID]); + if (num == 0) + num = inv[y].stack.CompareTo(inv[x].stack); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer MiscPainting = new ItemSorting.ItemSortingLayer("Misc - Painting", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].netID > 0 && ItemID.Sets.SortingPriorityPainting[inv[i].netID] > -1 || inv[i].paint > (byte) 0)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = ItemID.Sets.SortingPriorityPainting[inv[y].netID].CompareTo(ItemID.Sets.SortingPriorityPainting[inv[x].netID]); + if (num == 0) + num = inv[x].paint.CompareTo(inv[y].paint); + if (num == 0) + num = inv[y].stack.CompareTo(inv[x].stack); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer MiscRopes = new ItemSorting.ItemSortingLayer("Misc - Ropes", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].netID > 0 && ItemID.Sets.SortingPriorityRopes[inv[i].netID] > -1)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = ItemID.Sets.SortingPriorityRopes[inv[y].netID].CompareTo(ItemID.Sets.SortingPriorityRopes[inv[x].netID]); + if (num == 0) + num = inv[y].stack.CompareTo(inv[x].stack); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer LastMaterials = new ItemSorting.ItemSortingLayer("Last - Materials", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].createTile < 0 && inv[i].createWall < 1)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = inv[y].value.CompareTo(inv[x].value); + if (num == 0) + num = inv[y].stack.CompareTo(inv[x].stack); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer LastTilesImportant = new ItemSorting.ItemSortingLayer("Last - Tiles (Frame Important)", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].createTile >= 0 && Main.tileFrameImportant[inv[i].createTile])).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = string.Compare(inv[x].Name, inv[y].Name, StringComparison.OrdinalIgnoreCase); + if (num == 0) + num = inv[y].stack.CompareTo(inv[x].stack); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer LastTilesCommon = new ItemSorting.ItemSortingLayer("Last - Tiles (Common), Walls", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].createWall > 0 || inv[i].createTile >= 0)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = string.Compare(inv[x].Name, inv[y].Name, StringComparison.OrdinalIgnoreCase); + if (num == 0) + num = inv[y].stack.CompareTo(inv[x].stack); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer LastNotTrash = new ItemSorting.ItemSortingLayer("Last - Not Trash", (Func, List>) ((layer, inv, itemsToSort) => + { + List list = itemsToSort.Where((Func) (i => inv[i].OriginalRarity >= 0)).ToList(); + layer.Validate(ref list, inv); + foreach (int num in list) + itemsToSort.Remove(num); + list.Sort((Comparison) ((x, y) => + { + int num = inv[y].OriginalRarity.CompareTo(inv[x].OriginalRarity); + if (num == 0) + num = string.Compare(inv[x].Name, inv[y].Name, StringComparison.OrdinalIgnoreCase); + if (num == 0) + num = inv[y].stack.CompareTo(inv[x].stack); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return list; + })); + public static ItemSorting.ItemSortingLayer LastTrash = new ItemSorting.ItemSortingLayer("Last - Trash", (Func, List>) ((layer, inv, itemsToSort) => + { + List indexesSortable = new List((IEnumerable) itemsToSort); + layer.Validate(ref indexesSortable, inv); + foreach (int num in indexesSortable) + itemsToSort.Remove(num); + indexesSortable.Sort((Comparison) ((x, y) => + { + int num = inv[y].value.CompareTo(inv[x].value); + if (num == 0) + num = inv[y].stack.CompareTo(inv[x].stack); + if (num == 0) + num = x.CompareTo(y); + return num; + })); + return indexesSortable; + })); + } + } +} diff --git a/UI/ItemTooltip.cs b/UI/ItemTooltip.cs new file mode 100644 index 0000000..a3f961d --- /dev/null +++ b/UI/ItemTooltip.cs @@ -0,0 +1,79 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.ItemTooltip +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using Terraria.Localization; + +namespace Terraria.UI +{ + public class ItemTooltip + { + public static readonly ItemTooltip None = new ItemTooltip(); + private static readonly List _globalProcessors = new List(); + private static ulong _globalValidatorKey = 1; + private string[] _tooltipLines; + private ulong _validatorKey; + private readonly LocalizedText _text; + private string _processedText; + + public int Lines + { + get + { + this.ValidateTooltip(); + return this._tooltipLines == null ? 0 : this._tooltipLines.Length; + } + } + + private ItemTooltip() + { + } + + private ItemTooltip(string key) => this._text = Language.GetText(key); + + public static ItemTooltip FromLanguageKey(string key) => !Language.Exists(key) ? ItemTooltip.None : new ItemTooltip(key); + + public string GetLine(int line) + { + this.ValidateTooltip(); + return this._tooltipLines[line]; + } + + private void ValidateTooltip() + { + if ((long) this._validatorKey == (long) ItemTooltip._globalValidatorKey) + return; + this._validatorKey = ItemTooltip._globalValidatorKey; + if (this._text == null) + { + this._tooltipLines = (string[]) null; + this._processedText = string.Empty; + } + else + { + string tooltip = this._text.Value; + foreach (TooltipProcessor globalProcessor in ItemTooltip._globalProcessors) + tooltip = globalProcessor(tooltip); + this._tooltipLines = tooltip.Split('\n'); + this._processedText = tooltip; + } + } + + public static void AddGlobalProcessor(TooltipProcessor processor) => ItemTooltip._globalProcessors.Add(processor); + + public static void RemoveGlobalProcessor(TooltipProcessor processor) => ItemTooltip._globalProcessors.Remove(processor); + + public static void ClearGlobalProcessors() => ItemTooltip._globalProcessors.Clear(); + + public static void InvalidateTooltips() + { + ++ItemTooltip._globalValidatorKey; + if (ItemTooltip._globalValidatorKey != ulong.MaxValue) + return; + ItemTooltip._globalValidatorKey = 0UL; + } + } +} diff --git a/UI/LegacyGameInterfaceLayer.cs b/UI/LegacyGameInterfaceLayer.cs new file mode 100644 index 0000000..dd0bade --- /dev/null +++ b/UI/LegacyGameInterfaceLayer.cs @@ -0,0 +1,24 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.LegacyGameInterfaceLayer +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.UI +{ + public class LegacyGameInterfaceLayer : GameInterfaceLayer + { + private GameInterfaceDrawMethod _drawMethod; + + public LegacyGameInterfaceLayer( + string name, + GameInterfaceDrawMethod drawMethod, + InterfaceScaleType scaleType = InterfaceScaleType.Game) + : base(name, scaleType) + { + this._drawMethod = drawMethod; + } + + protected override bool DrawSelf() => this._drawMethod(); + } +} diff --git a/UI/LegacyNetDiagnosticsUI.cs b/UI/LegacyNetDiagnosticsUI.cs new file mode 100644 index 0000000..aa9db35 --- /dev/null +++ b/UI/LegacyNetDiagnosticsUI.cs @@ -0,0 +1,142 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.LegacyNetDiagnosticsUI +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Graphics; +using Terraria.GameContent; + +namespace Terraria.UI +{ + public class LegacyNetDiagnosticsUI : INetDiagnosticsUI + { + public static bool netDiag; + public static int txData = 0; + public static int rxData = 0; + public static int txMsg = 0; + public static int rxMsg = 0; + private const int maxMsg = 141; + public static int[] rxMsgType = new int[141]; + public static int[] rxDataType = new int[141]; + public static int[] txMsgType = new int[141]; + public static int[] txDataType = new int[141]; + + public void Reset() + { + LegacyNetDiagnosticsUI.rxMsg = 0; + LegacyNetDiagnosticsUI.rxData = 0; + LegacyNetDiagnosticsUI.txMsg = 0; + LegacyNetDiagnosticsUI.txData = 0; + for (int index = 0; index < 141; ++index) + { + LegacyNetDiagnosticsUI.rxMsgType[index] = 0; + LegacyNetDiagnosticsUI.rxDataType[index] = 0; + LegacyNetDiagnosticsUI.txMsgType[index] = 0; + LegacyNetDiagnosticsUI.txDataType[index] = 0; + } + } + + public void CountReadMessage(int messageId, int messageLength) + { + ++LegacyNetDiagnosticsUI.rxMsg; + LegacyNetDiagnosticsUI.rxData += messageLength; + ++LegacyNetDiagnosticsUI.rxMsgType[messageId]; + LegacyNetDiagnosticsUI.rxDataType[messageId] += messageLength; + } + + public void CountSentMessage(int messageId, int messageLength) + { + ++LegacyNetDiagnosticsUI.txMsg; + LegacyNetDiagnosticsUI.txData += messageLength; + ++LegacyNetDiagnosticsUI.txMsgType[messageId]; + LegacyNetDiagnosticsUI.txDataType[messageId] += messageLength; + } + + public void Draw(SpriteBatch spriteBatch) + { + LegacyNetDiagnosticsUI.DrawTitles(spriteBatch); + LegacyNetDiagnosticsUI.DrawMesageLines(spriteBatch); + } + + private static void DrawMesageLines(SpriteBatch spriteBatch) + { + for (int msgId = 0; msgId < 141; ++msgId) + { + int num1 = 200; + int num2 = 120; + int num3 = msgId / 50; + int x = num1 + num3 * 400; + int y = num2 + (msgId - num3 * 50) * 13; + LegacyNetDiagnosticsUI.PrintNetDiagnosticsLineForMessage(spriteBatch, msgId, x, y); + } + } + + private static void DrawTitles(SpriteBatch spriteBatch) + { + for (int index = 0; index < 4; ++index) + { + string str = ""; + int num1 = 20; + int num2 = 220; + if (index == 0) + { + str = "RX Msgs: " + string.Format("{0:0,0}", (object) LegacyNetDiagnosticsUI.rxMsg); + num2 += index * 20; + } + else if (index == 1) + { + str = "RX Bytes: " + string.Format("{0:0,0}", (object) LegacyNetDiagnosticsUI.rxData); + num2 += index * 20; + } + else if (index == 2) + { + str = "TX Msgs: " + string.Format("{0:0,0}", (object) LegacyNetDiagnosticsUI.txMsg); + num2 += index * 20; + } + else if (index == 3) + { + str = "TX Bytes: " + string.Format("{0:0,0}", (object) LegacyNetDiagnosticsUI.txData); + num2 += index * 20; + } + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, str, new Vector2((float) num1, (float) num2), Color.White, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + } + + private static void PrintNetDiagnosticsLineForMessage( + SpriteBatch spriteBatch, + int msgId, + int x, + int y) + { + float num = 0.7f; + string str1 = msgId.ToString() + ": "; + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, str1, new Vector2((float) x, (float) y), Color.White, 0.0f, new Vector2(), num, SpriteEffects.None, 0.0f); + x += 30; + string str2 = "rx:" + string.Format("{0:0,0}", (object) LegacyNetDiagnosticsUI.rxMsgType[msgId]); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, str2, new Vector2((float) x, (float) y), Color.White, 0.0f, new Vector2(), num, SpriteEffects.None, 0.0f); + x += 70; + string str3 = string.Format("{0:0,0}", (object) LegacyNetDiagnosticsUI.rxDataType[msgId]); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, str3, new Vector2((float) x, (float) y), Color.White, 0.0f, new Vector2(), num, SpriteEffects.None, 0.0f); + x += 70; + string str4 = msgId.ToString() + ": "; + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, str4, new Vector2((float) x, (float) y), Color.White, 0.0f, new Vector2(), num, SpriteEffects.None, 0.0f); + x += 30; + string str5 = "tx:" + string.Format("{0:0,0}", (object) LegacyNetDiagnosticsUI.txMsgType[msgId]); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, str5, new Vector2((float) x, (float) y), Color.White, 0.0f, new Vector2(), num, SpriteEffects.None, 0.0f); + x += 70; + string str6 = string.Format("{0:0,0}", (object) LegacyNetDiagnosticsUI.txDataType[msgId]); + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, str6, new Vector2((float) x, (float) y), Color.White, 0.0f, new Vector2(), num, SpriteEffects.None, 0.0f); + } + + public void CountReadModuleMessage(int moduleMessageId, int messageLength) + { + } + + public void CountSentModuleMessage(int moduleMessageId, int messageLength) + { + } + } +} diff --git a/UI/NetDiagnosticsUI.cs b/UI/NetDiagnosticsUI.cs new file mode 100644 index 0000000..c83cd8f --- /dev/null +++ b/UI/NetDiagnosticsUI.cs @@ -0,0 +1,146 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.NetDiagnosticsUI +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Graphics; +using System.Collections.Generic; +using Terraria.GameContent; + +namespace Terraria.UI +{ + public class NetDiagnosticsUI : INetDiagnosticsUI + { + private NetDiagnosticsUI.CounterForMessage[] _counterByMessageId = new NetDiagnosticsUI.CounterForMessage[141]; + private Dictionary _counterByModuleId = new Dictionary(); + private int _highestFoundReadBytes = 1; + private int _highestFoundReadCount = 1; + + public void Reset() + { + for (int index = 0; index < this._counterByMessageId.Length; ++index) + this._counterByMessageId[index].Reset(); + this._counterByModuleId.Clear(); + this._counterByMessageId[10].exemptFromBadScoreTest = true; + this._counterByMessageId[82].exemptFromBadScoreTest = true; + } + + public void CountReadMessage(int messageId, int messageLength) => this._counterByMessageId[messageId].CountReadMessage(messageLength); + + public void CountSentMessage(int messageId, int messageLength) => this._counterByMessageId[messageId].CountSentMessage(messageLength); + + public void CountReadModuleMessage(int moduleMessageId, int messageLength) + { + NetDiagnosticsUI.CounterForMessage counterForMessage; + this._counterByModuleId.TryGetValue(moduleMessageId, out counterForMessage); + counterForMessage.CountReadMessage(messageLength); + this._counterByModuleId[moduleMessageId] = counterForMessage; + } + + public void CountSentModuleMessage(int moduleMessageId, int messageLength) + { + NetDiagnosticsUI.CounterForMessage counterForMessage; + this._counterByModuleId.TryGetValue(moduleMessageId, out counterForMessage); + counterForMessage.CountSentMessage(messageLength); + this._counterByModuleId[moduleMessageId] = counterForMessage; + } + + public void Draw(SpriteBatch spriteBatch) + { + int num1 = this._counterByMessageId.Length + this._counterByModuleId.Count; + for (int index = 0; index <= num1 / 51; ++index) + Utils.DrawInvBG(spriteBatch, 190 + 400 * index, 110, 390, 683, new Color()); + Vector2 position; + for (int index = 0; index < this._counterByMessageId.Length; ++index) + { + int num2 = index / 51; + int num3 = index - num2 * 51; + position.X = (float) (200 + num2 * 400); + position.Y = (float) (120 + num3 * 13); + this.DrawCounter(spriteBatch, ref this._counterByMessageId[index], index.ToString(), position); + } + int num4 = this._counterByMessageId.Length + 1; + foreach (KeyValuePair keyValuePair in this._counterByModuleId) + { + int num5 = num4 / 51; + int num6 = num4 - num5 * 51; + position.X = (float) (200 + num5 * 400); + position.Y = (float) (120 + num6 * 13); + NetDiagnosticsUI.CounterForMessage counter = keyValuePair.Value; + this.DrawCounter(spriteBatch, ref counter, ".." + keyValuePair.Key.ToString(), position); + ++num4; + } + } + + private void DrawCounter( + SpriteBatch spriteBatch, + ref NetDiagnosticsUI.CounterForMessage counter, + string title, + Vector2 position) + { + if (!counter.exemptFromBadScoreTest) + { + if (this._highestFoundReadCount < counter.timesReceived) + this._highestFoundReadCount = counter.timesReceived; + if (this._highestFoundReadBytes < counter.bytesReceived) + this._highestFoundReadBytes = counter.bytesReceived; + } + Vector2 pos = position; + string str = title + ": "; + Color color = Main.hslToRgb((float) (0.300000011920929 * (1.0 - (double) Utils.Remap((float) counter.bytesReceived, 0.0f, (float) this._highestFoundReadBytes, 0.0f, 1f))), 1f, 0.5f); + if (counter.exemptFromBadScoreTest) + color = Color.White; + string text1 = str; + this.DrawText(spriteBatch, text1, pos, color); + pos.X += 30f; + string text2 = "rx:" + string.Format("{0,0}", (object) counter.timesReceived); + this.DrawText(spriteBatch, text2, pos, color); + pos.X += 70f; + string text3 = string.Format("{0,0}", (object) counter.bytesReceived); + this.DrawText(spriteBatch, text3, pos, color); + pos.X += 70f; + string text4 = str; + this.DrawText(spriteBatch, text4, pos, color); + pos.X += 30f; + string text5 = "tx:" + string.Format("{0,0}", (object) counter.timesSent); + this.DrawText(spriteBatch, text5, pos, color); + pos.X += 70f; + string text6 = string.Format("{0,0}", (object) counter.bytesSent); + this.DrawText(spriteBatch, text6, pos, color); + } + + private void DrawText(SpriteBatch spriteBatch, string text, Vector2 pos, Color color) => DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, text, pos, color, 0.0f, Vector2.Zero, 0.7f, SpriteEffects.None, 0.0f); + + private struct CounterForMessage + { + public int timesReceived; + public int timesSent; + public int bytesReceived; + public int bytesSent; + public bool exemptFromBadScoreTest; + + public void Reset() + { + this.timesReceived = 0; + this.timesSent = 0; + this.bytesReceived = 0; + this.bytesSent = 0; + } + + public void CountReadMessage(int messageLength) + { + ++this.timesReceived; + this.bytesReceived += messageLength; + } + + public void CountSentMessage(int messageLength) + { + ++this.timesSent; + this.bytesSent += messageLength; + } + } + } +} diff --git a/UI/SnapPoint.cs b/UI/SnapPoint.cs new file mode 100644 index 0000000..3b5e52a --- /dev/null +++ b/UI/SnapPoint.cs @@ -0,0 +1,44 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.SnapPoint +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System.Diagnostics; + +namespace Terraria.UI +{ + [DebuggerDisplay("Snap Point - {Name} {Id}")] + public class SnapPoint + { + public string Name; + private Vector2 _anchor; + private Vector2 _offset; + + public int Id { get; private set; } + + public Vector2 Position { get; private set; } + + public SnapPoint(string name, int id, Vector2 anchor, Vector2 offset) + { + this.Name = name; + this.Id = id; + this._anchor = anchor; + this._offset = offset; + } + + public void Calculate(UIElement element) + { + CalculatedStyle dimensions = element.GetDimensions(); + this.Position = dimensions.Position() + this._offset + this._anchor * new Vector2(dimensions.Width, dimensions.Height); + } + + public void ThisIsAHackThatChangesTheSnapPointsInfo(Vector2 anchor, Vector2 offset, int id) + { + this._anchor = anchor; + this._offset = offset; + this.Id = id; + } + } +} diff --git a/UI/StyleDimension.cs b/UI/StyleDimension.cs new file mode 100644 index 0000000..492bbd5 --- /dev/null +++ b/UI/StyleDimension.cs @@ -0,0 +1,36 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.StyleDimension +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.UI +{ + public struct StyleDimension + { + public static StyleDimension Fill = new StyleDimension(0.0f, 1f); + public static StyleDimension Empty = new StyleDimension(0.0f, 0.0f); + public float Pixels; + public float Precent; + + public StyleDimension(float pixels, float precent) + { + this.Pixels = pixels; + this.Precent = precent; + } + + public void Set(float pixels, float precent) + { + this.Pixels = pixels; + this.Precent = precent; + } + + public float GetValue(float containerSize) => this.Pixels + this.Precent * containerSize; + + public static StyleDimension FromPixels(float pixels) => new StyleDimension(pixels, 0.0f); + + public static StyleDimension FromPercent(float percent) => new StyleDimension(0.0f, percent); + + public static StyleDimension FromPixelsAndPercent(float pixels, float percent) => new StyleDimension(pixels, percent); + } +} diff --git a/UI/TooltipProcessor.cs b/UI/TooltipProcessor.cs new file mode 100644 index 0000000..6ed0228 --- /dev/null +++ b/UI/TooltipProcessor.cs @@ -0,0 +1,10 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.TooltipProcessor +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.UI +{ + public delegate string TooltipProcessor(string tooltip); +} diff --git a/UI/UIAlign.cs b/UI/UIAlign.cs new file mode 100644 index 0000000..d0e35fe --- /dev/null +++ b/UI/UIAlign.cs @@ -0,0 +1,18 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.UIAlign +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.UI +{ + public static class UIAlign + { + public const float Left = 0.0f; + public const float Center = 0.5f; + public const float Right = 1f; + public const float Top = 0.0f; + public const float Middle = 0.5f; + public const float Bottom = 1f; + } +} diff --git a/UI/UIElement.cs b/UI/UIElement.cs new file mode 100644 index 0000000..694cf42 --- /dev/null +++ b/UI/UIElement.cs @@ -0,0 +1,432 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.UIElement +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Graphics; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using Terraria.GameContent.UI.Elements; + +namespace Terraria.UI +{ + public class UIElement : IComparable + { + protected readonly List Elements = new List(); + public StyleDimension Top; + public StyleDimension Left; + public StyleDimension Width; + public StyleDimension Height; + public StyleDimension MaxWidth = StyleDimension.Fill; + public StyleDimension MaxHeight = StyleDimension.Fill; + public StyleDimension MinWidth = StyleDimension.Empty; + public StyleDimension MinHeight = StyleDimension.Empty; + private bool _isInitialized; + public bool IgnoresMouseInteraction; + public bool OverflowHidden; + public SamplerState OverrideSamplerState; + public float PaddingTop; + public float PaddingLeft; + public float PaddingRight; + public float PaddingBottom; + public float MarginTop; + public float MarginLeft; + public float MarginRight; + public float MarginBottom; + public float HAlign; + public float VAlign; + private CalculatedStyle _innerDimensions; + private CalculatedStyle _dimensions; + private CalculatedStyle _outerDimensions; + private static readonly RasterizerState OverflowHiddenRasterizerState = new RasterizerState() + { + CullMode = CullMode.None, + ScissorTestEnable = true + }; + public bool UseImmediateMode; + private SnapPoint _snapPoint; + private static int _idCounter = 0; + + public UIElement Parent { get; private set; } + + public int UniqueId { get; private set; } + + public IEnumerable Children => (IEnumerable) this.Elements; + + public event UIElement.MouseEvent OnMouseDown; + + public event UIElement.MouseEvent OnMouseUp; + + public event UIElement.MouseEvent OnClick; + + public event UIElement.MouseEvent OnMouseOver; + + public event UIElement.MouseEvent OnMouseOut; + + public event UIElement.MouseEvent OnDoubleClick; + + public event UIElement.ScrollWheelEvent OnScrollWheel; + + public event UIElement.ElementEvent OnUpdate; + + public bool IsMouseHovering { get; private set; } + + public UIElement() => this.UniqueId = UIElement._idCounter++; + + public void SetSnapPoint(string name, int id, Vector2? anchor = null, Vector2? offset = null) + { + if (!anchor.HasValue) + anchor = new Vector2?(new Vector2(0.5f)); + if (!offset.HasValue) + offset = new Vector2?(Vector2.Zero); + this._snapPoint = new SnapPoint(name, id, anchor.Value, offset.Value); + } + + public bool GetSnapPoint(out SnapPoint point) + { + point = this._snapPoint; + if (this._snapPoint != null) + this._snapPoint.Calculate(this); + return this._snapPoint != null; + } + + protected virtual void DrawSelf(SpriteBatch spriteBatch) + { + } + + protected virtual void DrawChildren(SpriteBatch spriteBatch) + { + foreach (UIElement element in this.Elements) + element.Draw(spriteBatch); + } + + public void Append(UIElement element) + { + element.Remove(); + element.Parent = this; + this.Elements.Add(element); + element.Recalculate(); + } + + public void Remove() + { + if (this.Parent == null) + return; + this.Parent.RemoveChild(this); + } + + public void RemoveChild(UIElement child) + { + this.Elements.Remove(child); + child.Parent = (UIElement) null; + } + + public void RemoveAllChildren() + { + foreach (UIElement element in this.Elements) + element.Parent = (UIElement) null; + this.Elements.Clear(); + } + + public virtual void Draw(SpriteBatch spriteBatch) + { + int num = this.OverflowHidden ? 1 : 0; + bool useImmediateMode = this.UseImmediateMode; + RasterizerState rasterizerState = spriteBatch.GraphicsDevice.RasterizerState; + Rectangle scissorRectangle = spriteBatch.GraphicsDevice.ScissorRectangle; + SamplerState anisotropicClamp = SamplerState.AnisotropicClamp; + if (useImmediateMode || this.OverrideSamplerState != null) + { + spriteBatch.End(); + spriteBatch.Begin(useImmediateMode ? SpriteSortMode.Immediate : SpriteSortMode.Deferred, BlendState.AlphaBlend, this.OverrideSamplerState != null ? this.OverrideSamplerState : anisotropicClamp, DepthStencilState.None, UIElement.OverflowHiddenRasterizerState, (Effect) null, Main.UIScaleMatrix); + this.DrawSelf(spriteBatch); + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, anisotropicClamp, DepthStencilState.None, UIElement.OverflowHiddenRasterizerState, (Effect) null, Main.UIScaleMatrix); + } + else + this.DrawSelf(spriteBatch); + if (num != 0) + { + spriteBatch.End(); + Rectangle clippingRectangle = this.GetClippingRectangle(spriteBatch); + spriteBatch.GraphicsDevice.ScissorRectangle = clippingRectangle; + spriteBatch.GraphicsDevice.RasterizerState = UIElement.OverflowHiddenRasterizerState; + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, anisotropicClamp, DepthStencilState.None, UIElement.OverflowHiddenRasterizerState, (Effect) null, Main.UIScaleMatrix); + } + this.DrawChildren(spriteBatch); + if (num == 0) + return; + spriteBatch.End(); + spriteBatch.GraphicsDevice.ScissorRectangle = scissorRectangle; + spriteBatch.GraphicsDevice.RasterizerState = rasterizerState; + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, anisotropicClamp, DepthStencilState.None, rasterizerState, (Effect) null, Main.UIScaleMatrix); + } + + public virtual void Update(GameTime gameTime) + { + if (this.OnUpdate != null) + this.OnUpdate(this); + foreach (UIElement element in this.Elements) + element.Update(gameTime); + } + + public Rectangle GetClippingRectangle(SpriteBatch spriteBatch) + { + Vector2 position1 = new Vector2(this._innerDimensions.X, this._innerDimensions.Y); + Vector2 position2 = new Vector2(this._innerDimensions.Width, this._innerDimensions.Height) + position1; + Vector2 vector2_1 = Vector2.Transform(position1, Main.UIScaleMatrix); + Vector2 vector2_2 = Vector2.Transform(position2, Main.UIScaleMatrix); + Rectangle rectangle = new Rectangle((int) vector2_1.X, (int) vector2_1.Y, (int) ((double) vector2_2.X - (double) vector2_1.X), (int) ((double) vector2_2.Y - (double) vector2_1.Y)); + int max1 = (int) ((double) Main.screenWidth * (double) Main.UIScale); + int max2 = (int) ((double) Main.screenHeight * (double) Main.UIScale); + rectangle.X = Utils.Clamp(rectangle.X, 0, max1); + rectangle.Y = Utils.Clamp(rectangle.Y, 0, max2); + rectangle.Width = Utils.Clamp(rectangle.Width, 0, max1 - rectangle.X); + rectangle.Height = Utils.Clamp(rectangle.Height, 0, max2 - rectangle.Y); + Rectangle scissorRectangle = spriteBatch.GraphicsDevice.ScissorRectangle; + int x = Utils.Clamp(rectangle.Left, scissorRectangle.Left, scissorRectangle.Right); + int y = Utils.Clamp(rectangle.Top, scissorRectangle.Top, scissorRectangle.Bottom); + int num1 = Utils.Clamp(rectangle.Right, scissorRectangle.Left, scissorRectangle.Right); + int num2 = Utils.Clamp(rectangle.Bottom, scissorRectangle.Top, scissorRectangle.Bottom); + return new Rectangle(x, y, num1 - x, num2 - y); + } + + public virtual List GetSnapPoints() + { + List snapPointList = new List(); + SnapPoint point; + if (this.GetSnapPoint(out point)) + snapPointList.Add(point); + foreach (UIElement element in this.Elements) + snapPointList.AddRange((IEnumerable) element.GetSnapPoints()); + return snapPointList; + } + + public virtual void Recalculate() + { + CalculatedStyle parentDimensions1 = this.Parent == null ? UserInterface.ActiveInstance.GetDimensions() : this.Parent.GetInnerDimensions(); + if (this.Parent != null && this.Parent is UIList) + parentDimensions1.Height = float.MaxValue; + CalculatedStyle parentDimensions2 = this.GetDimensionsBasedOnParentDimensions(parentDimensions1); + this._outerDimensions = parentDimensions2; + parentDimensions2.X += this.MarginLeft; + parentDimensions2.Y += this.MarginTop; + parentDimensions2.Width -= this.MarginLeft + this.MarginRight; + parentDimensions2.Height -= this.MarginTop + this.MarginBottom; + this._dimensions = parentDimensions2; + parentDimensions2.X += this.PaddingLeft; + parentDimensions2.Y += this.PaddingTop; + parentDimensions2.Width -= this.PaddingLeft + this.PaddingRight; + parentDimensions2.Height -= this.PaddingTop + this.PaddingBottom; + this._innerDimensions = parentDimensions2; + this.RecalculateChildren(); + } + + private CalculatedStyle GetDimensionsBasedOnParentDimensions( + CalculatedStyle parentDimensions) + { + CalculatedStyle calculatedStyle; + calculatedStyle.X = this.Left.GetValue(parentDimensions.Width) + parentDimensions.X; + calculatedStyle.Y = this.Top.GetValue(parentDimensions.Height) + parentDimensions.Y; + float min1 = this.MinWidth.GetValue(parentDimensions.Width); + float max1 = this.MaxWidth.GetValue(parentDimensions.Width); + float min2 = this.MinHeight.GetValue(parentDimensions.Height); + float max2 = this.MaxHeight.GetValue(parentDimensions.Height); + calculatedStyle.Width = MathHelper.Clamp(this.Width.GetValue(parentDimensions.Width), min1, max1); + calculatedStyle.Height = MathHelper.Clamp(this.Height.GetValue(parentDimensions.Height), min2, max2); + calculatedStyle.Width += this.MarginLeft + this.MarginRight; + calculatedStyle.Height += this.MarginTop + this.MarginBottom; + calculatedStyle.X += (float) ((double) parentDimensions.Width * (double) this.HAlign - (double) calculatedStyle.Width * (double) this.HAlign); + calculatedStyle.Y += (float) ((double) parentDimensions.Height * (double) this.VAlign - (double) calculatedStyle.Height * (double) this.VAlign); + return calculatedStyle; + } + + public UIElement GetElementAt(Vector2 point) + { + UIElement uiElement = (UIElement) null; + for (int index = this.Elements.Count - 1; index >= 0; --index) + { + UIElement element = this.Elements[index]; + if (!element.IgnoresMouseInteraction && element.ContainsPoint(point)) + { + uiElement = element; + break; + } + } + if (uiElement != null) + return uiElement.GetElementAt(point); + if (this.IgnoresMouseInteraction) + return (UIElement) null; + return this.ContainsPoint(point) ? this : (UIElement) null; + } + + public virtual bool ContainsPoint(Vector2 point) => (double) point.X > (double) this._dimensions.X && (double) point.Y > (double) this._dimensions.Y && (double) point.X < (double) this._dimensions.X + (double) this._dimensions.Width && (double) point.Y < (double) this._dimensions.Y + (double) this._dimensions.Height; + + public virtual Rectangle GetViewCullingArea() => this._dimensions.ToRectangle(); + + public void SetPadding(float pixels) + { + this.PaddingBottom = pixels; + this.PaddingLeft = pixels; + this.PaddingRight = pixels; + this.PaddingTop = pixels; + } + + public virtual void RecalculateChildren() + { + foreach (UIElement element in this.Elements) + element.Recalculate(); + } + + public CalculatedStyle GetInnerDimensions() => this._innerDimensions; + + public CalculatedStyle GetDimensions() => this._dimensions; + + public CalculatedStyle GetOuterDimensions() => this._outerDimensions; + + public void CopyStyle(UIElement element) + { + this.Top = element.Top; + this.Left = element.Left; + this.Width = element.Width; + this.Height = element.Height; + this.PaddingBottom = element.PaddingBottom; + this.PaddingLeft = element.PaddingLeft; + this.PaddingRight = element.PaddingRight; + this.PaddingTop = element.PaddingTop; + this.HAlign = element.HAlign; + this.VAlign = element.VAlign; + this.MinWidth = element.MinWidth; + this.MaxWidth = element.MaxWidth; + this.MinHeight = element.MinHeight; + this.MaxHeight = element.MaxHeight; + this.Recalculate(); + } + + public virtual void MouseDown(UIMouseEvent evt) + { + if (this.OnMouseDown != null) + this.OnMouseDown(evt, this); + if (this.Parent == null) + return; + this.Parent.MouseDown(evt); + } + + public virtual void MouseUp(UIMouseEvent evt) + { + if (this.OnMouseUp != null) + this.OnMouseUp(evt, this); + if (this.Parent == null) + return; + this.Parent.MouseUp(evt); + } + + public virtual void MouseOver(UIMouseEvent evt) + { + this.IsMouseHovering = true; + if (this.OnMouseOver != null) + this.OnMouseOver(evt, this); + if (this.Parent == null) + return; + this.Parent.MouseOver(evt); + } + + public virtual void MouseOut(UIMouseEvent evt) + { + this.IsMouseHovering = false; + if (this.OnMouseOut != null) + this.OnMouseOut(evt, this); + if (this.Parent == null) + return; + this.Parent.MouseOut(evt); + } + + public virtual void Click(UIMouseEvent evt) + { + if (this.OnClick != null) + this.OnClick(evt, this); + if (this.Parent == null) + return; + this.Parent.Click(evt); + } + + public virtual void DoubleClick(UIMouseEvent evt) + { + if (this.OnDoubleClick != null) + this.OnDoubleClick(evt, this); + if (this.Parent == null) + return; + this.Parent.DoubleClick(evt); + } + + public virtual void ScrollWheel(UIScrollWheelEvent evt) + { + if (this.OnScrollWheel != null) + this.OnScrollWheel(evt, this); + if (this.Parent == null) + return; + this.Parent.ScrollWheel(evt); + } + + public void Activate() + { + if (!this._isInitialized) + this.Initialize(); + this.OnActivate(); + foreach (UIElement element in this.Elements) + element.Activate(); + } + + public virtual void OnActivate() + { + } + + [Conditional("DEBUG")] + public void DrawDebugHitbox(BasicDebugDrawer drawer, float colorIntensity = 0.0f) + { + if (this.IsMouseHovering) + colorIntensity += 0.1f; + Color rgb = Main.hslToRgb(colorIntensity, colorIntensity, 0.5f); + CalculatedStyle innerDimensions = this.GetInnerDimensions(); + drawer.DrawLine(innerDimensions.Position(), innerDimensions.Position() + new Vector2(innerDimensions.Width, 0.0f), 2f, rgb); + drawer.DrawLine(innerDimensions.Position() + new Vector2(innerDimensions.Width, 0.0f), innerDimensions.Position() + new Vector2(innerDimensions.Width, innerDimensions.Height), 2f, rgb); + drawer.DrawLine(innerDimensions.Position() + new Vector2(innerDimensions.Width, innerDimensions.Height), innerDimensions.Position() + new Vector2(0.0f, innerDimensions.Height), 2f, rgb); + drawer.DrawLine(innerDimensions.Position() + new Vector2(0.0f, innerDimensions.Height), innerDimensions.Position(), 2f, rgb); + foreach (UIElement element in this.Elements) + ; + } + + public void Deactivate() + { + this.OnDeactivate(); + foreach (UIElement element in this.Elements) + element.Deactivate(); + } + + public virtual void OnDeactivate() + { + } + + public void Initialize() + { + this.OnInitialize(); + this._isInitialized = true; + } + + public virtual void OnInitialize() + { + } + + public virtual int CompareTo(object obj) => 0; + + public delegate void MouseEvent(UIMouseEvent evt, UIElement listeningElement); + + public delegate void ScrollWheelEvent(UIScrollWheelEvent evt, UIElement listeningElement); + + public delegate void ElementEvent(UIElement affectedElement); + } +} diff --git a/UI/UIEvent.cs b/UI/UIEvent.cs new file mode 100644 index 0000000..e641cc8 --- /dev/null +++ b/UI/UIEvent.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.UIEvent +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.UI +{ + public class UIEvent + { + public readonly UIElement Target; + + public UIEvent(UIElement target) => this.Target = target; + } +} diff --git a/UI/UIMouseEvent.cs b/UI/UIMouseEvent.cs new file mode 100644 index 0000000..2321093 --- /dev/null +++ b/UI/UIMouseEvent.cs @@ -0,0 +1,21 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.UIMouseEvent +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.UI +{ + public class UIMouseEvent : UIEvent + { + public readonly Vector2 MousePosition; + + public UIMouseEvent(UIElement target, Vector2 mousePosition) + : base(target) + { + this.MousePosition = mousePosition; + } + } +} diff --git a/UI/UIScrollWheelEvent.cs b/UI/UIScrollWheelEvent.cs new file mode 100644 index 0000000..fd8415e --- /dev/null +++ b/UI/UIScrollWheelEvent.cs @@ -0,0 +1,21 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.UIScrollWheelEvent +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.UI +{ + public class UIScrollWheelEvent : UIMouseEvent + { + public readonly int ScrollWheelValue; + + public UIScrollWheelEvent(UIElement target, Vector2 mousePosition, int scrollWheelValue) + : base(target, mousePosition) + { + this.ScrollWheelValue = scrollWheelValue; + } + } +} diff --git a/UI/UIState.cs b/UI/UIState.cs new file mode 100644 index 0000000..8ea9b82 --- /dev/null +++ b/UI/UIState.cs @@ -0,0 +1,18 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.UIState +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.UI +{ + public class UIState : UIElement + { + public UIState() + { + this.Width.Precent = 1f; + this.Height.Precent = 1f; + this.Recalculate(); + } + } +} diff --git a/UI/UserInterface.cs b/UI/UserInterface.cs new file mode 100644 index 0000000..36a5c06 --- /dev/null +++ b/UI/UserInterface.cs @@ -0,0 +1,213 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.UI.UserInterface +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Graphics; +using System; +using System.Collections.Generic; +using Terraria.GameInput; + +namespace Terraria.UI +{ + public class UserInterface + { + private const double DOUBLE_CLICK_TIME = 500.0; + private const double STATE_CHANGE_CLICK_DISABLE_TIME = 200.0; + private const int MAX_HISTORY_SIZE = 32; + private const int HISTORY_PRUNE_SIZE = 4; + public static UserInterface ActiveInstance = new UserInterface(); + private List _history = new List(); + public Vector2 MousePosition; + private bool _wasMouseDown; + private UIElement _lastElementHover; + private UIElement _lastElementDown; + private UIElement _lastElementClicked; + private double _lastMouseDownTime; + private double _clickDisabledTimeRemaining; + private bool _isStateDirty; + public bool IsVisible; + private UIState _currentState; + + public void ResetLasts() + { + if (this._lastElementHover != null) + this._lastElementHover.MouseOut(new UIMouseEvent(this._lastElementHover, this.MousePosition)); + this._lastElementHover = (UIElement) null; + this._lastElementDown = (UIElement) null; + this._lastElementClicked = (UIElement) null; + } + + public void EscapeElements() => this._lastElementHover = (UIElement) null; + + public UIState CurrentState => this._currentState; + + public UserInterface() => UserInterface.ActiveInstance = this; + + public void Use() + { + if (UserInterface.ActiveInstance != this) + { + UserInterface.ActiveInstance = this; + this.Recalculate(); + } + else + UserInterface.ActiveInstance = this; + } + + private void ResetState() + { + this.GetMousePosition(); + this._wasMouseDown = Main.mouseLeft; + if (this._lastElementHover != null) + this._lastElementHover.MouseOut(new UIMouseEvent(this._lastElementHover, this.MousePosition)); + this._lastElementHover = (UIElement) null; + this._lastElementDown = (UIElement) null; + this._lastElementClicked = (UIElement) null; + this._lastMouseDownTime = 0.0; + this._clickDisabledTimeRemaining = Math.Max(this._clickDisabledTimeRemaining, 200.0); + } + + private void GetMousePosition() => this.MousePosition = new Vector2((float) Main.mouseX, (float) Main.mouseY); + + public void Update(GameTime time) + { + if (this._currentState == null) + return; + this.GetMousePosition(); + bool flag1 = Main.mouseLeft && Main.hasFocus; + UIElement target = Main.hasFocus ? this._currentState.GetElementAt(this.MousePosition) : (UIElement) null; + double disabledTimeRemaining = this._clickDisabledTimeRemaining; + TimeSpan timeSpan = time.ElapsedGameTime; + double totalMilliseconds = timeSpan.TotalMilliseconds; + this._clickDisabledTimeRemaining = Math.Max(0.0, disabledTimeRemaining - totalMilliseconds); + bool flag2 = this._clickDisabledTimeRemaining > 0.0; + if (target != this._lastElementHover) + { + if (this._lastElementHover != null) + this._lastElementHover.MouseOut(new UIMouseEvent(this._lastElementHover, this.MousePosition)); + target?.MouseOver(new UIMouseEvent(target, this.MousePosition)); + this._lastElementHover = target; + } + if (flag1 && !this._wasMouseDown && target != null && !flag2) + { + this._lastElementDown = target; + target.MouseDown(new UIMouseEvent(target, this.MousePosition)); + if (this._lastElementClicked == target) + { + timeSpan = time.TotalGameTime; + if (timeSpan.TotalMilliseconds - this._lastMouseDownTime < 500.0) + { + target.DoubleClick(new UIMouseEvent(target, this.MousePosition)); + this._lastElementClicked = (UIElement) null; + } + } + timeSpan = time.TotalGameTime; + this._lastMouseDownTime = timeSpan.TotalMilliseconds; + } + else if (!flag1 && this._wasMouseDown && this._lastElementDown != null && !flag2) + { + UIElement lastElementDown = this._lastElementDown; + if (lastElementDown.ContainsPoint(this.MousePosition)) + { + lastElementDown.Click(new UIMouseEvent(lastElementDown, this.MousePosition)); + this._lastElementClicked = this._lastElementDown; + } + lastElementDown.MouseUp(new UIMouseEvent(lastElementDown, this.MousePosition)); + this._lastElementDown = (UIElement) null; + } + if (PlayerInput.ScrollWheelDeltaForUI != 0) + { + target?.ScrollWheel(new UIScrollWheelEvent(target, this.MousePosition, PlayerInput.ScrollWheelDeltaForUI)); + PlayerInput.ScrollWheelDeltaForUI = 0; + } + this._wasMouseDown = flag1; + if (this._currentState == null) + return; + this._currentState.Update(time); + } + + public void Draw(SpriteBatch spriteBatch, GameTime time) + { + this.Use(); + if (this._currentState == null) + return; + if (this._isStateDirty) + { + this._currentState.Recalculate(); + this._isStateDirty = false; + } + this._currentState.Draw(spriteBatch); + } + + public void DrawDebugHitbox(BasicDebugDrawer drawer) + { + UIState currentState = this._currentState; + } + + public void SetState(UIState state) + { + if (state == this._currentState) + return; + if (state != null) + this.AddToHistory(state); + if (this._currentState != null) + { + if (this._lastElementHover != null) + this._lastElementHover.MouseOut(new UIMouseEvent(this._lastElementHover, this.MousePosition)); + this._currentState.Deactivate(); + } + this._currentState = state; + this.ResetState(); + if (state == null) + return; + this._isStateDirty = true; + state.Activate(); + state.Recalculate(); + } + + public void GoBack() + { + if (this._history.Count < 2) + return; + UIState state = this._history[this._history.Count - 2]; + this._history.RemoveRange(this._history.Count - 2, 2); + this.SetState(state); + } + + private void AddToHistory(UIState state) + { + this._history.Add(state); + if (this._history.Count <= 32) + return; + this._history.RemoveRange(0, 4); + } + + public void Recalculate() + { + if (this._currentState == null) + return; + this._currentState.Recalculate(); + } + + public CalculatedStyle GetDimensions() + { + Vector2 originalScreenSize = PlayerInput.OriginalScreenSize; + return new CalculatedStyle(0.0f, 0.0f, originalScreenSize.X / Main.UIScale, originalScreenSize.Y / Main.UIScale); + } + + internal void RefreshState() + { + if (this._currentState != null) + this._currentState.Deactivate(); + this.ResetState(); + this._currentState.Activate(); + this._currentState.Recalculate(); + } + + public bool IsElementUnderMouse() => this.IsVisible && this._lastElementHover != null && !(this._lastElementHover is UIState); + } +} diff --git a/Utilities/CrashDump.cs b/Utilities/CrashDump.cs new file mode 100644 index 0000000..e14a7a5 --- /dev/null +++ b/Utilities/CrashDump.cs @@ -0,0 +1,125 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Utilities.CrashDump +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using ReLogic.OS; +using System; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Runtime.InteropServices; +using System.Threading; + +namespace Terraria.Utilities +{ + public static class CrashDump + { + public static bool WriteException(CrashDump.Options options, string outputDirectory = ".") => CrashDump.Write(options, CrashDump.ExceptionInfo.Present, outputDirectory); + + public static bool Write(CrashDump.Options options, string outputDirectory = ".") => CrashDump.Write(options, CrashDump.ExceptionInfo.None, outputDirectory); + + private static string CreateDumpName() + { + DateTime localTime = DateTime.Now.ToLocalTime(); + return string.Format("{0}_{1}_{2}_{3}.dmp", (object) "Terraria", (object) Main.versionNumber, (object) localTime.ToString("MM-dd-yy_HH-mm-ss-ffff", (IFormatProvider) CultureInfo.InvariantCulture), (object) Thread.CurrentThread.ManagedThreadId); + } + + private static bool Write( + CrashDump.Options options, + CrashDump.ExceptionInfo exceptionInfo, + string outputDirectory) + { + if (!Platform.IsWindows) + return false; + string path = Path.Combine(outputDirectory, CrashDump.CreateDumpName()); + if (!Utils.TryCreatingDirectory(outputDirectory)) + return false; + using (FileStream fileStream = File.Create(path)) + return CrashDump.Write((SafeHandle) fileStream.SafeFileHandle, options, exceptionInfo); + } + + private static bool Write( + SafeHandle fileHandle, + CrashDump.Options options, + CrashDump.ExceptionInfo exceptionInfo) + { + if (!Platform.IsWindows) + return false; + Process currentProcess = Process.GetCurrentProcess(); + IntPtr handle = currentProcess.Handle; + uint id = (uint) currentProcess.Id; + CrashDump.MiniDumpExceptionInformation expParam; + expParam.ThreadId = CrashDump.GetCurrentThreadId(); + expParam.ClientPointers = false; + expParam.ExceptionPointers = IntPtr.Zero; + if (exceptionInfo == CrashDump.ExceptionInfo.Present) + expParam.ExceptionPointers = Marshal.GetExceptionPointers(); + return !(expParam.ExceptionPointers == IntPtr.Zero) ? CrashDump.MiniDumpWriteDump(handle, id, fileHandle, (uint) options, ref expParam, IntPtr.Zero, IntPtr.Zero) : CrashDump.MiniDumpWriteDump(handle, id, fileHandle, (uint) options, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero); + } + + [DllImport("dbghelp.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall, SetLastError = true)] + private static extern bool MiniDumpWriteDump( + IntPtr hProcess, + uint processId, + SafeHandle hFile, + uint dumpType, + ref CrashDump.MiniDumpExceptionInformation expParam, + IntPtr userStreamParam, + IntPtr callbackParam); + + [DllImport("dbghelp.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall, SetLastError = true)] + private static extern bool MiniDumpWriteDump( + IntPtr hProcess, + uint processId, + SafeHandle hFile, + uint dumpType, + IntPtr expParam, + IntPtr userStreamParam, + IntPtr callbackParam); + + [DllImport("kernel32.dll")] + private static extern uint GetCurrentThreadId(); + + [System.Flags] + public enum Options : uint + { + Normal = 0, + WithDataSegs = 1, + WithFullMemory = 2, + WithHandleData = 4, + FilterMemory = 8, + ScanMemory = 16, // 0x00000010 + WithUnloadedModules = 32, // 0x00000020 + WithIndirectlyReferencedMemory = 64, // 0x00000040 + FilterModulePaths = 128, // 0x00000080 + WithProcessThreadData = 256, // 0x00000100 + WithPrivateReadWriteMemory = 512, // 0x00000200 + WithoutOptionalData = 1024, // 0x00000400 + WithFullMemoryInfo = 2048, // 0x00000800 + WithThreadInfo = 4096, // 0x00001000 + WithCodeSegs = 8192, // 0x00002000 + WithoutAuxiliaryState = 16384, // 0x00004000 + WithFullAuxiliaryState = 32768, // 0x00008000 + WithPrivateWriteCopyMemory = 65536, // 0x00010000 + IgnoreInaccessibleMemory = 131072, // 0x00020000 + ValidTypeFlags = IgnoreInaccessibleMemory | WithPrivateWriteCopyMemory | WithFullAuxiliaryState | WithoutAuxiliaryState | WithCodeSegs | WithThreadInfo | WithFullMemoryInfo | WithoutOptionalData | WithPrivateReadWriteMemory | WithProcessThreadData | FilterModulePaths | WithIndirectlyReferencedMemory | WithUnloadedModules | ScanMemory | FilterMemory | WithHandleData | WithFullMemory | WithDataSegs, // 0x0003FFFF + } + + private enum ExceptionInfo + { + None, + Present, + } + + [StructLayout(LayoutKind.Sequential, Pack = 4)] + private struct MiniDumpExceptionInformation + { + public uint ThreadId; + public IntPtr ExceptionPointers; + [MarshalAs(UnmanagedType.Bool)] + public bool ClientPointers; + } + } +} diff --git a/Utilities/CrashWatcher.cs b/Utilities/CrashWatcher.cs new file mode 100644 index 0000000..ee38c20 --- /dev/null +++ b/Utilities/CrashWatcher.cs @@ -0,0 +1,58 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Utilities.CrashWatcher +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Diagnostics; +using System.IO; +using System.Runtime.ExceptionServices; +using System.Threading; + +namespace Terraria.Utilities +{ + public static class CrashWatcher + { + public static bool LogAllExceptions { get; set; } + + public static bool DumpOnException { get; set; } + + public static bool DumpOnCrash { get; private set; } + + public static CrashDump.Options CrashDumpOptions { get; private set; } + + private static string DumpPath => Path.Combine(Main.SavePath, "Dumps"); + + public static void Inititialize() + { + Console.WriteLine("Error Logging Enabled."); + AppDomain.CurrentDomain.FirstChanceException += (EventHandler) ((sender, exceptionArgs) => + { + if (!CrashWatcher.LogAllExceptions) + return; + Console.Write("================\r\n" + string.Format("{0}: First-Chance Exception\r\nThread: {1} [{2}]\r\nCulture: {3}\r\nException: {4}\r\n", (object) DateTime.Now, (object) Thread.CurrentThread.ManagedThreadId, (object) Thread.CurrentThread.Name, (object) Thread.CurrentThread.CurrentCulture.Name, (object) exceptionArgs.Exception.ToString()) + "================\r\n\r\n"); + }); + AppDomain.CurrentDomain.UnhandledException += (UnhandledExceptionEventHandler) ((sender, exceptionArgs) => + { + Console.Write("================\r\n" + string.Format("{0}: Unhandled Exception\r\nThread: {1} [{2}]\r\nCulture: {3}\r\nException: {4}\r\n", (object) DateTime.Now, (object) Thread.CurrentThread.ManagedThreadId, (object) Thread.CurrentThread.Name, (object) Thread.CurrentThread.CurrentCulture.Name, (object) exceptionArgs.ExceptionObject.ToString()) + "================\r\n"); + if (!CrashWatcher.DumpOnCrash) + return; + CrashDump.WriteException(CrashWatcher.CrashDumpOptions, CrashWatcher.DumpPath); + }); + } + + public static void EnableCrashDumps(CrashDump.Options options) + { + CrashWatcher.DumpOnCrash = true; + CrashWatcher.CrashDumpOptions = options; + } + + public static void DisableCrashDumps() => CrashWatcher.DumpOnCrash = false; + + [Conditional("DEBUG")] + private static void HookDebugExceptionDialog() + { + } + } +} diff --git a/Utilities/FastRandom.cs b/Utilities/FastRandom.cs new file mode 100644 index 0000000..9db7638 --- /dev/null +++ b/Utilities/FastRandom.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Utilities.FastRandom +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Terraria.Utilities +{ + public struct FastRandom + { + private const ulong RANDOM_MULTIPLIER = 25214903917; + private const ulong RANDOM_ADD = 11; + private const ulong RANDOM_MASK = 281474976710655; + + public ulong Seed { get; private set; } + + public FastRandom(ulong seed) + : this() + { + this.Seed = seed; + } + + public FastRandom(int seed) + : this() + { + this.Seed = (ulong) seed; + } + + public FastRandom WithModifier(ulong modifier) => new FastRandom(FastRandom.NextSeed(modifier) ^ this.Seed); + + public FastRandom WithModifier(int x, int y) => this.WithModifier((ulong) ((long) x + 2654435769L + ((long) y << 6)) + ((ulong) y >> 2)); + + public static FastRandom CreateWithRandomSeed() => new FastRandom((ulong) Guid.NewGuid().GetHashCode()); + + public void NextSeed() => this.Seed = FastRandom.NextSeed(this.Seed); + + private int NextBits(int bits) + { + this.Seed = FastRandom.NextSeed(this.Seed); + return (int) (this.Seed >> 48 - bits); + } + + public float NextFloat() => (float) this.NextBits(24) * 5.960464E-08f; + + public double NextDouble() => (double) this.NextBits(32) * 4.65661287307739E-10; + + public int Next(int max) + { + if ((max & -max) == max) + return (int) ((long) max * (long) this.NextBits(31) >> 31); + int num1; + int num2; + do + { + num1 = this.NextBits(31); + num2 = num1 % max; + } + while (num1 - num2 + (max - 1) < 0); + return num2; + } + + public int Next(int min, int max) => this.Next(max - min) + min; + + private static ulong NextSeed(ulong seed) => (ulong) ((long) seed * 25214903917L + 11L & 281474976710655L); + } +} diff --git a/Utilities/FileOperationAPIWrapper.cs b/Utilities/FileOperationAPIWrapper.cs new file mode 100644 index 0000000..6f12f4d --- /dev/null +++ b/Utilities/FileOperationAPIWrapper.cs @@ -0,0 +1,95 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Utilities.FileOperationAPIWrapper +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Runtime.InteropServices; + +namespace Terraria.Utilities +{ + public static class FileOperationAPIWrapper + { + [DllImport("shell32.dll", CharSet = CharSet.Auto)] + private static extern int SHFileOperation(ref FileOperationAPIWrapper.SHFILEOPSTRUCT FileOp); + + private static bool Send(string path, FileOperationAPIWrapper.FileOperationFlags flags) + { + try + { + FileOperationAPIWrapper.SHFILEOPSTRUCT FileOp = new FileOperationAPIWrapper.SHFILEOPSTRUCT() + { + wFunc = FileOperationAPIWrapper.FileOperationType.FO_DELETE, + pFrom = path + "\0\0", + fFlags = FileOperationAPIWrapper.FileOperationFlags.FOF_ALLOWUNDO | flags + }; + FileOperationAPIWrapper.SHFileOperation(ref FileOp); + return true; + } + catch (Exception ex) + { + return false; + } + } + + private static bool Send(string path) => FileOperationAPIWrapper.Send(path, FileOperationAPIWrapper.FileOperationFlags.FOF_NOCONFIRMATION | FileOperationAPIWrapper.FileOperationFlags.FOF_WANTNUKEWARNING); + + public static bool MoveToRecycleBin(string path) => FileOperationAPIWrapper.Send(path, FileOperationAPIWrapper.FileOperationFlags.FOF_SILENT | FileOperationAPIWrapper.FileOperationFlags.FOF_NOCONFIRMATION | FileOperationAPIWrapper.FileOperationFlags.FOF_NOERRORUI); + + private static bool DeleteFile(string path, FileOperationAPIWrapper.FileOperationFlags flags) + { + try + { + FileOperationAPIWrapper.SHFILEOPSTRUCT FileOp = new FileOperationAPIWrapper.SHFILEOPSTRUCT() + { + wFunc = FileOperationAPIWrapper.FileOperationType.FO_DELETE, + pFrom = path + "\0\0", + fFlags = flags + }; + FileOperationAPIWrapper.SHFileOperation(ref FileOp); + return true; + } + catch (Exception ex) + { + return false; + } + } + + private static bool DeleteCompletelySilent(string path) => FileOperationAPIWrapper.DeleteFile(path, FileOperationAPIWrapper.FileOperationFlags.FOF_SILENT | FileOperationAPIWrapper.FileOperationFlags.FOF_NOCONFIRMATION | FileOperationAPIWrapper.FileOperationFlags.FOF_NOERRORUI); + + [Flags] + private enum FileOperationFlags : ushort + { + FOF_SILENT = 4, + FOF_NOCONFIRMATION = 16, // 0x0010 + FOF_ALLOWUNDO = 64, // 0x0040 + FOF_SIMPLEPROGRESS = 256, // 0x0100 + FOF_NOERRORUI = 1024, // 0x0400 + FOF_WANTNUKEWARNING = 16384, // 0x4000 + } + + private enum FileOperationType : uint + { + FO_MOVE = 1, + FO_COPY = 2, + FO_DELETE = 3, + FO_RENAME = 4, + } + + [StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Auto)] + private struct SHFILEOPSTRUCT + { + public IntPtr hwnd; + [MarshalAs(UnmanagedType.U4)] + public FileOperationAPIWrapper.FileOperationType wFunc; + public string pFrom; + public string pTo; + public FileOperationAPIWrapper.FileOperationFlags fFlags; + [MarshalAs(UnmanagedType.Bool)] + public bool fAnyOperationsAborted; + public IntPtr hNameMappings; + public string lpszProgressTitle; + } + } +} diff --git a/Utilities/FileUtilities.cs b/Utilities/FileUtilities.cs new file mode 100644 index 0000000..200b248 --- /dev/null +++ b/Utilities/FileUtilities.cs @@ -0,0 +1,163 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Utilities.FileUtilities +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.IO; +using System.Text.RegularExpressions; +using System.Threading; +using Terraria.Social; + +namespace Terraria.Utilities +{ + public static class FileUtilities + { + private static Regex FileNameRegex = new Regex("^(?.*[\\\\\\/])?(?:$|(?.+?)(?:(?\\.[^.]*$)|$))", RegexOptions.IgnoreCase | RegexOptions.Compiled); + + public static bool Exists(string path, bool cloud) => cloud && SocialAPI.Cloud != null ? SocialAPI.Cloud.HasFile(path) : File.Exists(path); + + public static void Delete(string path, bool cloud) + { + if (cloud && SocialAPI.Cloud != null) + SocialAPI.Cloud.Delete(path); + else + FileOperationAPIWrapper.MoveToRecycleBin(path); + } + + public static string GetFullPath(string path, bool cloud) => !cloud ? Path.GetFullPath(path) : path; + + public static void Copy(string source, string destination, bool cloud, bool overwrite = true) + { + if (!cloud) + { + File.Copy(source, destination, overwrite); + } + else + { + if (SocialAPI.Cloud == null || !overwrite && SocialAPI.Cloud.HasFile(destination)) + return; + SocialAPI.Cloud.Write(destination, SocialAPI.Cloud.Read(source)); + } + } + + public static void Move(string source, string destination, bool cloud, bool overwrite = true) + { + FileUtilities.Copy(source, destination, cloud, overwrite); + FileUtilities.Delete(source, cloud); + } + + public static int GetFileSize(string path, bool cloud) => cloud && SocialAPI.Cloud != null ? SocialAPI.Cloud.GetFileSize(path) : (int) new FileInfo(path).Length; + + public static void Read(string path, byte[] buffer, int length, bool cloud) + { + if (cloud && SocialAPI.Cloud != null) + { + SocialAPI.Cloud.Read(path, buffer, length); + } + else + { + using (FileStream fileStream = File.OpenRead(path)) + fileStream.Read(buffer, 0, length); + } + } + + public static byte[] ReadAllBytes(string path, bool cloud) => cloud && SocialAPI.Cloud != null ? SocialAPI.Cloud.Read(path) : File.ReadAllBytes(path); + + public static void WriteAllBytes(string path, byte[] data, bool cloud) => FileUtilities.Write(path, data, data.Length, cloud); + + public static void Write(string path, byte[] data, int length, bool cloud) + { + if (cloud && SocialAPI.Cloud != null) + { + SocialAPI.Cloud.Write(path, data, length); + } + else + { + string parentFolderPath = FileUtilities.GetParentFolderPath(path); + if (parentFolderPath != "") + Utils.TryCreatingDirectory(parentFolderPath); + FileUtilities.RemoveReadOnlyAttribute(path); + using (FileStream fileStream = File.Open(path, FileMode.Create)) + { + while (fileStream.Position < (long) length) + fileStream.Write(data, (int) fileStream.Position, Math.Min(length - (int) fileStream.Position, 2048)); + } + } + } + + public static void RemoveReadOnlyAttribute(string path) + { + if (!File.Exists(path)) + return; + try + { + FileAttributes attributes = File.GetAttributes(path); + if ((attributes & FileAttributes.ReadOnly) != FileAttributes.ReadOnly) + return; + FileAttributes fileAttributes = attributes & ~FileAttributes.ReadOnly; + File.SetAttributes(path, fileAttributes); + } + catch (Exception ex) + { + } + } + + public static bool MoveToCloud(string localPath, string cloudPath) + { + if (SocialAPI.Cloud == null) + return false; + FileUtilities.WriteAllBytes(cloudPath, FileUtilities.ReadAllBytes(localPath, false), true); + FileUtilities.Delete(localPath, false); + return true; + } + + public static bool MoveToLocal(string cloudPath, string localPath) + { + if (SocialAPI.Cloud == null) + return false; + FileUtilities.WriteAllBytes(localPath, FileUtilities.ReadAllBytes(cloudPath, true), false); + FileUtilities.Delete(cloudPath, true); + return true; + } + + public static string GetFileName(string path, bool includeExtension = true) + { + Match match = FileUtilities.FileNameRegex.Match(path); + if (match == null || match.Groups["fileName"] == null) + return ""; + includeExtension &= match.Groups["extension"] != null; + return match.Groups["fileName"].Value + (includeExtension ? match.Groups["extension"].Value : ""); + } + + public static string GetParentFolderPath(string path, bool includeExtension = true) + { + Match match = FileUtilities.FileNameRegex.Match(path); + return match == null || match.Groups[nameof (path)] == null ? "" : match.Groups[nameof (path)].Value; + } + + public static void CopyFolder(string sourcePath, string destinationPath) + { + Directory.CreateDirectory(destinationPath); + foreach (string directory in Directory.GetDirectories(sourcePath, "*", SearchOption.AllDirectories)) + Directory.CreateDirectory(directory.Replace(sourcePath, destinationPath)); + foreach (string file in Directory.GetFiles(sourcePath, "*.*", SearchOption.AllDirectories)) + File.Copy(file, file.Replace(sourcePath, destinationPath), true); + } + + public static void ProtectedInvoke(Action action) + { + bool isBackground = Thread.CurrentThread.IsBackground; + try + { + Thread.CurrentThread.IsBackground = false; + action(); + } + finally + { + Thread.CurrentThread.IsBackground = isBackground; + } + } + } +} diff --git a/Utilities/IntRange.cs b/Utilities/IntRange.cs new file mode 100644 index 0000000..d89dc0d --- /dev/null +++ b/Utilities/IntRange.cs @@ -0,0 +1,32 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Utilities.IntRange +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Newtonsoft.Json; + +namespace Terraria.Utilities +{ + public struct IntRange + { + [JsonProperty("Min")] + public readonly int Minimum; + [JsonProperty("Max")] + public readonly int Maximum; + + public IntRange(int minimum, int maximum) + { + this.Minimum = minimum; + this.Maximum = maximum; + } + + public static IntRange operator *(IntRange range, float scale) => new IntRange((int) ((double) range.Minimum * (double) scale), (int) ((double) range.Maximum * (double) scale)); + + public static IntRange operator *(float scale, IntRange range) => range * scale; + + public static IntRange operator /(IntRange range, float scale) => new IntRange((int) ((double) range.Minimum / (double) scale), (int) ((double) range.Maximum / (double) scale)); + + public static IntRange operator /(float scale, IntRange range) => range / scale; + } +} diff --git a/Utilities/NPCUtils.cs b/Utilities/NPCUtils.cs new file mode 100644 index 0000000..ec9ed4d --- /dev/null +++ b/Utilities/NPCUtils.cs @@ -0,0 +1,278 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Utilities.NPCUtils +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; + +namespace Terraria.Utilities +{ + public static class NPCUtils + { + public static NPCUtils.TargetSearchResults SearchForTarget( + Vector2 position, + NPCUtils.TargetSearchFlag flags = NPCUtils.TargetSearchFlag.All, + NPCUtils.SearchFilter playerFilter = null, + NPCUtils.SearchFilter npcFilter = null) + { + return NPCUtils.SearchForTarget((NPC) null, position, flags, playerFilter, npcFilter); + } + + public static NPCUtils.TargetSearchResults SearchForTarget( + NPC searcher, + NPCUtils.TargetSearchFlag flags = NPCUtils.TargetSearchFlag.All, + NPCUtils.SearchFilter playerFilter = null, + NPCUtils.SearchFilter npcFilter = null) + { + return NPCUtils.SearchForTarget(searcher, searcher.Center, flags, playerFilter, npcFilter); + } + + public static NPCUtils.TargetSearchResults SearchForTarget( + NPC searcher, + Vector2 position, + NPCUtils.TargetSearchFlag flags = NPCUtils.TargetSearchFlag.All, + NPCUtils.SearchFilter playerFilter = null, + NPCUtils.SearchFilter npcFilter = null) + { + float num1 = float.MaxValue; + int nearestNPCIndex = -1; + float adjustedTankDistance = float.MaxValue; + float nearestTankDistance = float.MaxValue; + int nearestTankIndex = -1; + NPCUtils.TargetType tankType = NPCUtils.TargetType.Player; + if (flags.HasFlag((Enum) NPCUtils.TargetSearchFlag.NPCs)) + { + for (int index = 0; index < 200; ++index) + { + NPC entity = Main.npc[index]; + if (entity.active && entity.whoAmI != searcher.whoAmI && (npcFilter == null || npcFilter(entity))) + { + float num2 = Vector2.DistanceSquared(position, entity.Center); + if ((double) num2 < (double) num1) + { + nearestNPCIndex = index; + num1 = num2; + } + } + } + } + if (flags.HasFlag((Enum) NPCUtils.TargetSearchFlag.Players)) + { + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + Player entity = Main.player[index]; + if (entity.active && !entity.dead && !entity.ghost && (playerFilter == null || playerFilter(entity))) + { + float num3 = Vector2.Distance(position, entity.Center); + float num4 = num3 - (float) entity.aggro; + bool flag = searcher != null && entity.npcTypeNoAggro[searcher.type]; + if (searcher != null & flag && searcher.direction == 0) + num4 += 1000f; + if ((double) num4 < (double) adjustedTankDistance) + { + nearestTankIndex = index; + adjustedTankDistance = num4; + nearestTankDistance = num3; + tankType = NPCUtils.TargetType.Player; + } + if (entity.tankPet >= 0 && !flag) + { + Vector2 center = Main.projectile[entity.tankPet].Center; + float num5 = Vector2.Distance(position, center); + float num6 = num5 - 200f; + if ((double) num6 < (double) adjustedTankDistance && (double) num6 < 200.0 && Collision.CanHit(position, 0, 0, center, 0, 0)) + { + nearestTankIndex = index; + adjustedTankDistance = num6; + nearestTankDistance = num5; + tankType = NPCUtils.TargetType.TankPet; + } + } + } + } + } + return new NPCUtils.TargetSearchResults(searcher, nearestNPCIndex, (float) Math.Sqrt((double) num1), nearestTankIndex, nearestTankDistance, adjustedTankDistance, tankType); + } + + public static void TargetClosestOldOnesInvasion( + NPC searcher, + bool faceTarget = true, + Vector2? checkPosition = null) + { + NPCUtils.TargetSearchResults searchResults = NPCUtils.SearchForTarget(searcher, playerFilter: NPCUtils.SearchFilters.OnlyPlayersInCertainDistance(searcher.Center, 200f), npcFilter: new NPCUtils.SearchFilter(NPCUtils.SearchFilters.OnlyCrystal)); + if (!searchResults.FoundTarget) + return; + searcher.target = searchResults.NearestTargetIndex; + searcher.targetRect = searchResults.NearestTargetHitbox; + if (!(searcher.ShouldFaceTarget(ref searchResults) & faceTarget)) + return; + searcher.FaceTarget(); + } + + public static void TargetClosestNonBees(NPC searcher, bool faceTarget = true, Vector2? checkPosition = null) + { + NPCUtils.TargetSearchResults searchResults = NPCUtils.SearchForTarget(searcher, npcFilter: new NPCUtils.SearchFilter(NPCUtils.SearchFilters.NonBeeNPCs)); + if (!searchResults.FoundTarget) + return; + searcher.target = searchResults.NearestTargetIndex; + searcher.targetRect = searchResults.NearestTargetHitbox; + if (!(searcher.ShouldFaceTarget(ref searchResults) & faceTarget)) + return; + searcher.FaceTarget(); + } + + public static void TargetClosestCommon(NPC searcher, bool faceTarget = true, Vector2? checkPosition = null) => searcher.TargetClosest(faceTarget); + + public static void TargetClosestBetsy(NPC searcher, bool faceTarget = true, Vector2? checkPosition = null) + { + NPCUtils.TargetSearchResults searchResults = NPCUtils.SearchForTarget(searcher, npcFilter: new NPCUtils.SearchFilter(NPCUtils.SearchFilters.OnlyCrystal)); + if (!searchResults.FoundTarget) + return; + NPCUtils.TargetType targetType = searchResults.NearestTargetType; + if (searchResults.FoundTank && !searchResults.NearestTankOwner.dead) + targetType = NPCUtils.TargetType.Player; + searcher.target = searchResults.NearestTargetIndex; + searcher.targetRect = searchResults.NearestTargetHitbox; + if (!(searcher.ShouldFaceTarget(ref searchResults, new NPCUtils.TargetType?(targetType)) & faceTarget)) + return; + searcher.FaceTarget(); + } + + public delegate bool SearchFilter(T entity) where T : Entity; + + public delegate void NPCTargetingMethod(NPC searcher, bool faceTarget, Vector2? checkPosition); + + public static class SearchFilters + { + public static bool OnlyCrystal(NPC npc) => npc.type == 548 && !npc.dontTakeDamageFromHostiles; + + public static NPCUtils.SearchFilter OnlyPlayersInCertainDistance( + Vector2 position, + float maxDistance) + { + return (NPCUtils.SearchFilter) (player => (double) player.Distance(position) <= (double) maxDistance); + } + + public static bool NonBeeNPCs(NPC npc) => npc.type != 211 && npc.type != 210 && npc.type != 222 && npc.CanBeChasedBy(); + } + + public enum TargetType + { + None, + NPC, + Player, + TankPet, + } + + public struct TargetSearchResults + { + private NPCUtils.TargetType _nearestTargetType; + private int _nearestNPCIndex; + private float _nearestNPCDistance; + private int _nearestTankIndex; + private float _nearestTankDistance; + private float _adjustedTankDistance; + private NPCUtils.TargetType _nearestTankType; + + public int NearestTargetIndex + { + get + { + switch (this._nearestTargetType) + { + case NPCUtils.TargetType.NPC: + return this.NearestNPC.WhoAmIToTargettingIndex; + case NPCUtils.TargetType.Player: + case NPCUtils.TargetType.TankPet: + return this._nearestTankIndex; + default: + return -1; + } + } + } + + public Rectangle NearestTargetHitbox + { + get + { + switch (this._nearestTargetType) + { + case NPCUtils.TargetType.NPC: + return this.NearestNPC.Hitbox; + case NPCUtils.TargetType.Player: + return this.NearestTankOwner.Hitbox; + case NPCUtils.TargetType.TankPet: + return Main.projectile[this.NearestTankOwner.tankPet].Hitbox; + default: + return Rectangle.Empty; + } + } + } + + public NPCUtils.TargetType NearestTargetType => this._nearestTargetType; + + public bool FoundTarget => (uint) this._nearestTargetType > 0U; + + public NPC NearestNPC => this._nearestNPCIndex != -1 ? Main.npc[this._nearestNPCIndex] : (NPC) null; + + public bool FoundNPC => this._nearestNPCIndex != -1; + + public int NearestNPCIndex => this._nearestNPCIndex; + + public float NearestNPCDistance => this._nearestNPCDistance; + + public Player NearestTankOwner => this._nearestTankIndex != -1 ? Main.player[this._nearestTankIndex] : (Player) null; + + public bool FoundTank => this._nearestTankIndex != -1; + + public int NearestTankOwnerIndex => this._nearestTankIndex; + + public float NearestTankDistance => this._nearestTankDistance; + + public float AdjustedTankDistance => this._adjustedTankDistance; + + public NPCUtils.TargetType NearestTankType => this._nearestTankType; + + public TargetSearchResults( + NPC searcher, + int nearestNPCIndex, + float nearestNPCDistance, + int nearestTankIndex, + float nearestTankDistance, + float adjustedTankDistance, + NPCUtils.TargetType tankType) + { + this._nearestNPCIndex = nearestNPCIndex; + this._nearestNPCDistance = nearestNPCDistance; + this._nearestTankIndex = nearestTankIndex; + this._adjustedTankDistance = adjustedTankDistance; + this._nearestTankDistance = nearestTankDistance; + this._nearestTankType = tankType; + if (this._nearestNPCIndex != -1 && this._nearestTankIndex != -1) + { + if ((double) this._nearestNPCDistance < (double) this._adjustedTankDistance) + this._nearestTargetType = NPCUtils.TargetType.NPC; + else + this._nearestTargetType = tankType; + } + else if (this._nearestNPCIndex != -1) + this._nearestTargetType = NPCUtils.TargetType.NPC; + else if (this._nearestTankIndex != -1) + this._nearestTargetType = tankType; + else + this._nearestTargetType = NPCUtils.TargetType.None; + } + } + + [Flags] + public enum TargetSearchFlag + { + None = 0, + NPCs = 1, + Players = 2, + All = Players | NPCs, // 0x00000003 + } + } +} diff --git a/Utilities/PlatformUtilities.cs b/Utilities/PlatformUtilities.cs new file mode 100644 index 0000000..9c80c17 --- /dev/null +++ b/Utilities/PlatformUtilities.cs @@ -0,0 +1,17 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Utilities.PlatformUtilities +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.Utilities +{ + public static class PlatformUtilities + { + public const bool IsXNA = true; + public const bool IsFNA = false; + public const bool IsWindows = true; + public const bool IsOSX = false; + public const bool IsLinux = false; + } +} diff --git a/Utilities/Terraria/Utilities/FloatRange.cs b/Utilities/Terraria/Utilities/FloatRange.cs new file mode 100644 index 0000000..66316e2 --- /dev/null +++ b/Utilities/Terraria/Utilities/FloatRange.cs @@ -0,0 +1,32 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Utilities.Terraria.Utilities.FloatRange +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Newtonsoft.Json; + +namespace Terraria.Utilities.Terraria.Utilities +{ + public struct FloatRange + { + [JsonProperty("Min")] + public readonly float Minimum; + [JsonProperty("Max")] + public readonly float Maximum; + + public FloatRange(float minimum, float maximum) + { + this.Minimum = minimum; + this.Maximum = maximum; + } + + public static FloatRange operator *(FloatRange range, float scale) => new FloatRange(range.Minimum * scale, range.Maximum * scale); + + public static FloatRange operator *(float scale, FloatRange range) => range * scale; + + public static FloatRange operator /(FloatRange range, float scale) => new FloatRange(range.Minimum / scale, range.Maximum / scale); + + public static FloatRange operator /(float scale, FloatRange range) => range / scale; + } +} diff --git a/Utilities/UnifiedRandom.cs b/Utilities/UnifiedRandom.cs new file mode 100644 index 0000000..f1c0592 --- /dev/null +++ b/Utilities/UnifiedRandom.cs @@ -0,0 +1,112 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Utilities.UnifiedRandom +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; + +namespace Terraria.Utilities +{ + [Serializable] + public class UnifiedRandom + { + private const int MBIG = 2147483647; + private const int MSEED = 161803398; + private const int MZ = 0; + private int inext; + private int inextp; + private int[] SeedArray = new int[56]; + + public UnifiedRandom() + : this(Environment.TickCount) + { + } + + public UnifiedRandom(int Seed) + { + int num1 = 161803398 - (Seed == int.MinValue ? int.MaxValue : Math.Abs(Seed)); + this.SeedArray[55] = num1; + int num2 = 1; + for (int index1 = 1; index1 < 55; ++index1) + { + int index2 = 21 * index1 % 55; + this.SeedArray[index2] = num2; + num2 = num1 - num2; + if (num2 < 0) + num2 += int.MaxValue; + num1 = this.SeedArray[index2]; + } + for (int index3 = 1; index3 < 5; ++index3) + { + for (int index4 = 1; index4 < 56; ++index4) + { + this.SeedArray[index4] -= this.SeedArray[1 + (index4 + 30) % 55]; + if (this.SeedArray[index4] < 0) + this.SeedArray[index4] += int.MaxValue; + } + } + this.inext = 0; + this.inextp = 21; + Seed = 1; + } + + protected virtual double Sample() => (double) this.InternalSample() * 4.6566128752458E-10; + + private int InternalSample() + { + int inext = this.inext; + int inextp = this.inextp; + int index1; + if ((index1 = inext + 1) >= 56) + index1 = 1; + int index2; + if ((index2 = inextp + 1) >= 56) + index2 = 1; + int num = this.SeedArray[index1] - this.SeedArray[index2]; + if (num == int.MaxValue) + --num; + if (num < 0) + num += int.MaxValue; + this.SeedArray[index1] = num; + this.inext = index1; + this.inextp = index2; + return num; + } + + public virtual int Next() => this.InternalSample(); + + private double GetSampleForLargeRange() + { + int num = this.InternalSample(); + if ((this.InternalSample() % 2 == 0 ? 1 : 0) != 0) + num = -num; + return ((double) num + 2147483646.0) / 4294967293.0; + } + + public virtual int Next(int minValue, int maxValue) + { + if (minValue > maxValue) + throw new ArgumentOutOfRangeException(nameof (minValue), "minValue must be less than maxValue"); + long num = (long) maxValue - (long) minValue; + return num <= (long) int.MaxValue ? (int) (this.Sample() * (double) num) + minValue : (int) ((long) (this.GetSampleForLargeRange() * (double) num) + (long) minValue); + } + + public virtual int Next(int maxValue) + { + if (maxValue < 0) + throw new ArgumentOutOfRangeException(nameof (maxValue), "maxValue must be positive."); + return (int) (this.Sample() * (double) maxValue); + } + + public virtual double NextDouble() => this.Sample(); + + public virtual void NextBytes(byte[] buffer) + { + if (buffer == null) + throw new ArgumentNullException(nameof (buffer)); + for (int index = 0; index < buffer.Length; ++index) + buffer[index] = (byte) (this.InternalSample() % 256); + } + } +} diff --git a/Utilities/WeightedRandom`1.cs b/Utilities/WeightedRandom`1.cs new file mode 100644 index 0000000..a502e83 --- /dev/null +++ b/Utilities/WeightedRandom`1.cs @@ -0,0 +1,76 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Utilities.WeightedRandom`1 +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Terraria.Utilities +{ + public class WeightedRandom + { + public readonly List> elements = new List>(); + public readonly UnifiedRandom random; + public bool needsRefresh = true; + private double _totalWeight; + + public WeightedRandom() => this.random = new UnifiedRandom(); + + public WeightedRandom(int seed) => this.random = new UnifiedRandom(seed); + + public WeightedRandom(UnifiedRandom random) => this.random = random; + + public WeightedRandom(params Tuple[] theElements) + { + this.random = new UnifiedRandom(); + this.elements = ((IEnumerable>) theElements).ToList>(); + } + + public WeightedRandom(int seed, params Tuple[] theElements) + { + this.random = new UnifiedRandom(seed); + this.elements = ((IEnumerable>) theElements).ToList>(); + } + + public WeightedRandom(UnifiedRandom random, params Tuple[] theElements) + { + this.random = random; + this.elements = ((IEnumerable>) theElements).ToList>(); + } + + public void Add(T element, double weight = 1.0) + { + this.elements.Add(new Tuple(element, weight)); + this.needsRefresh = true; + } + + public T Get() + { + if (this.needsRefresh) + this.CalculateTotalWeight(); + double num = this.random.NextDouble() * this._totalWeight; + foreach (Tuple element in this.elements) + { + if (num <= element.Item2) + return element.Item1; + num -= element.Item2; + } + return default (T); + } + + public void CalculateTotalWeight() + { + this._totalWeight = 0.0; + foreach (Tuple element in this.elements) + this._totalWeight += element.Item2; + this.needsRefresh = false; + } + + public void Clear() => this.elements.Clear(); + + public static implicit operator T(WeightedRandom weightedRandom) => weightedRandom.Get(); + } +} diff --git a/Utils.cs b/Utils.cs new file mode 100644 index 0000000..9ef5ddc --- /dev/null +++ b/Utils.cs @@ -0,0 +1,1546 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Utils +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Graphics.PackedVector; +using Microsoft.Xna.Framework.Input; +using ReLogic.Content; +using ReLogic.Graphics; +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text.RegularExpressions; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.UI; +using Terraria.UI.Chat; +using Terraria.Utilities; +using Terraria.Utilities.Terraria.Utilities; + +namespace Terraria +{ + public static class Utils + { + public const long MaxCoins = 999999999; + public static Dictionary charLengths = new Dictionary(); + private static Regex _substitutionRegex = new Regex("{(\\?(?:!)?)?([a-zA-Z][\\w\\.]*)}", RegexOptions.Compiled); + private const ulong RANDOM_MULTIPLIER = 25214903917; + private const ulong RANDOM_ADD = 11; + private const ulong RANDOM_MASK = 281474976710655; + + public static Color ColorLerp_BlackToWhite(float percent) => Color.Lerp(Color.Black, Color.White, percent); + + public static Vector2 Round(Vector2 input) => new Vector2((float) Math.Round((double) input.X), (float) Math.Round((double) input.Y)); + + public static bool IsPowerOfTwo(int x) => x != 0 && (x & x - 1) == 0; + + public static float SmoothStep(float min, float max, float x) => MathHelper.Clamp((float) (((double) x - (double) min) / ((double) max - (double) min)), 0.0f, 1f); + + public static float UnclampedSmoothStep(float min, float max, float x) => (float) (((double) x - (double) min) / ((double) max - (double) min)); + + public static Dictionary ParseArguements(string[] args) + { + string str1 = (string) null; + string str2 = ""; + Dictionary dictionary = new Dictionary(); + string str3; + for (int index = 0; index < args.Length; ++index) + { + if (args[index].Length != 0) + { + if (args[index][0] == '-' || args[index][0] == '+') + { + if (str1 != null) + { + dictionary.Add(str1.ToLower(), str2); + str3 = ""; + } + str1 = args[index]; + str2 = ""; + } + else + { + if (str2 != "") + str2 += " "; + str2 += args[index]; + } + } + } + if (str1 != null) + { + dictionary.Add(str1.ToLower(), str2); + str3 = ""; + } + return dictionary; + } + + public static void Swap(ref T t1, ref T t2) + { + T obj = t1; + t1 = t2; + t2 = obj; + } + + public static T Clamp(T value, T min, T max) where T : IComparable + { + if (value.CompareTo(max) > 0) + return max; + return value.CompareTo(min) < 0 ? min : value; + } + + public static float Turn01ToCyclic010(float value) => (float) (1.0 - (Math.Cos((double) value * 6.28318548202515) * 0.5 + 0.5)); + + public static float PingPongFrom01To010(float value) + { + value %= 1f; + if ((double) value < 0.0) + ++value; + return (double) value >= 0.5 ? (float) (2.0 - (double) value * 2.0) : value * 2f; + } + + public static float MultiLerp(float percent, params float[] floats) + { + float num1 = (float) (1.0 / ((double) floats.Length - 1.0)); + float num2 = num1; + int index; + for (index = 0; (double) percent / (double) num2 > 1.0 && index < floats.Length - 2; ++index) + num2 += num1; + return MathHelper.Lerp(floats[index], floats[index + 1], (percent - num1 * (float) index) / num1); + } + + public static float WrappedLerp(float value1, float value2, float percent) + { + float amount = percent * 2f; + if ((double) amount > 1.0) + amount = 2f - amount; + return MathHelper.Lerp(value1, value2, amount); + } + + public static float GetLerpValue(float from, float to, float t, bool clamped = false) + { + if (clamped) + { + if ((double) from < (double) to) + { + if ((double) t < (double) from) + return 0.0f; + if ((double) t > (double) to) + return 1f; + } + else + { + if ((double) t < (double) to) + return 1f; + if ((double) t > (double) from) + return 0.0f; + } + } + return (float) (((double) t - (double) from) / ((double) to - (double) from)); + } + + public static float Remap( + float fromValue, + float fromMin, + float fromMax, + float toMin, + float toMax, + bool clamped = true) + { + return MathHelper.Lerp(toMin, toMax, Utils.GetLerpValue(fromMin, fromMax, fromValue, clamped)); + } + + public static void ClampWithinWorld( + ref int minX, + ref int minY, + ref int maxX, + ref int maxY, + bool lastValuesInclusiveToIteration = false, + int fluffX = 0, + int fluffY = 0) + { + int num = lastValuesInclusiveToIteration ? 1 : 0; + minX = Utils.Clamp(minX, fluffX, Main.maxTilesX - num - fluffX); + maxX = Utils.Clamp(maxX, fluffX, Main.maxTilesX - num - fluffX); + minY = Utils.Clamp(minY, fluffY, Main.maxTilesY - num - fluffY); + maxY = Utils.Clamp(maxY, fluffY, Main.maxTilesY - num - fluffY); + } + + public static double GetLerpValue(double from, double to, double t, bool clamped = false) + { + if (clamped) + { + if (from < to) + { + if (t < from) + return 0.0; + if (t > to) + return 1.0; + } + else + { + if (t < to) + return 1.0; + if (t > from) + return 0.0; + } + } + return (t - from) / (to - from); + } + + public static string[] ConvertMonoArgsToDotNet(string[] brokenArgs) + { + ArrayList arrayList = new ArrayList(); + string str = ""; + for (int index = 0; index < brokenArgs.Length; ++index) + { + if (brokenArgs[index].StartsWith("-")) + { + if (str != "") + { + arrayList.Add((object) str); + str = ""; + } + else + arrayList.Add((object) ""); + arrayList.Add((object) brokenArgs[index]); + } + else + { + if (str != "") + str += " "; + str += brokenArgs[index]; + } + } + arrayList.Add((object) str); + string[] strArray = new string[arrayList.Count]; + arrayList.CopyTo((Array) strArray); + return strArray; + } + + public static T Max(params T[] args) where T : IComparable + { + T obj = args[0]; + for (int index = 1; index < args.Length; ++index) + { + if (obj.CompareTo((object) args[index]) < 0) + obj = args[index]; + } + return obj; + } + + public static List> WordwrapStringSmart( + string text, + Color c, + DynamicSpriteFont font, + int maxWidth, + int maxLines) + { + TextSnippet[] array = ChatManager.ParseMessage(text, c).ToArray(); + List> textSnippetListList = new List>(); + List textSnippetList1 = new List(); + for (int index1 = 0; index1 < array.Length; ++index1) + { + TextSnippet textSnippet = array[index1]; + string[] strArray = textSnippet.Text.Split('\n'); + for (int index2 = 0; index2 < strArray.Length - 1; ++index2) + { + textSnippetList1.Add(textSnippet.CopyMorph(strArray[index2])); + textSnippetListList.Add(textSnippetList1); + textSnippetList1 = new List(); + } + textSnippetList1.Add(textSnippet.CopyMorph(strArray[strArray.Length - 1])); + } + textSnippetListList.Add(textSnippetList1); + if (maxWidth != -1) + { + for (int index3 = 0; index3 < textSnippetListList.Count; ++index3) + { + List textSnippetList2 = textSnippetListList[index3]; + float num1 = 0.0f; + for (int index4 = 0; index4 < textSnippetList2.Count; ++index4) + { + float stringLength = textSnippetList2[index4].GetStringLength(font); + if ((double) stringLength + (double) num1 > (double) maxWidth) + { + int num2 = maxWidth - (int) num1; + if ((double) num1 > 0.0) + num2 -= 16; + int num3 = Math.Min(textSnippetList2[index4].Text.Length, num2 / 8); + if (num3 < 0) + num3 = 0; + string[] strArray = textSnippetList2[index4].Text.Split(' '); + int num4 = num3; + if (strArray.Length > 1) + { + num4 = 0; + for (int index5 = 0; index5 < strArray.Length && num4 + strArray[index5].Length <= num3; ++index5) + num4 += strArray[index5].Length + 1; + if (num4 > num3) + num4 = num3; + } + string newText1 = textSnippetList2[index4].Text.Substring(0, num4); + string newText2 = textSnippetList2[index4].Text.Substring(num4); + List textSnippetList3 = new List() + { + textSnippetList2[index4].CopyMorph(newText2) + }; + for (int index6 = index4 + 1; index6 < textSnippetList2.Count; ++index6) + textSnippetList3.Add(textSnippetList2[index6]); + textSnippetList2[index4] = textSnippetList2[index4].CopyMorph(newText1); + textSnippetListList[index3] = textSnippetListList[index3].Take(index4 + 1).ToList(); + textSnippetListList.Insert(index3 + 1, textSnippetList3); + break; + } + num1 += stringLength; + } + } + } + if (maxLines != -1) + { + while (textSnippetListList.Count > 10) + textSnippetListList.RemoveAt(10); + } + return textSnippetListList; + } + + public static string[] WordwrapString( + string text, + DynamicSpriteFont font, + int maxWidth, + int maxLines, + out int lineAmount) + { + string[] strArray = new string[maxLines]; + int index1 = 0; + List stringList1 = new List((IEnumerable) text.Split('\n')); + List stringList2 = new List((IEnumerable) stringList1[0].Split(' ')); + for (int index2 = 1; index2 < stringList1.Count && index2 < maxLines; ++index2) + { + stringList2.Add("\n"); + stringList2.AddRange((IEnumerable) stringList1[index2].Split(' ')); + } + bool flag = true; + while (stringList2.Count > 0) + { + string str1 = stringList2[0]; + string str2 = " "; + if (stringList2.Count == 1) + str2 = ""; + if (str1 == "\n") + { + // ISSUE: explicit reference operation + ^ref strArray[index1++] += str1; + flag = true; + if (index1 < maxLines) + stringList2.RemoveAt(0); + else + break; + } + else if (flag) + { + if ((double) font.MeasureString(str1).X > (double) maxWidth) + { + char ch = str1[0]; + string str3 = ch.ToString() ?? ""; + int num = 1; + while (true) + { + DynamicSpriteFont dynamicSpriteFont = font; + string str4 = str3; + ch = str1[num]; + string str5 = ch.ToString(); + string str6 = str4 + str5 + "-"; + if ((double) dynamicSpriteFont.MeasureString(str6).X <= (double) maxWidth) + { + string str7 = str3; + ch = str1[num++]; + string str8 = ch.ToString(); + str3 = str7 + str8; + } + else + break; + } + string str9 = str3 + "-"; + strArray[index1++] = str9 + " "; + if (index1 < maxLines) + { + stringList2.RemoveAt(0); + stringList2.Insert(0, str1.Substring(num)); + } + else + break; + } + else + { + ref string local = ref strArray[index1]; + local = local + str1 + str2; + flag = false; + stringList2.RemoveAt(0); + } + } + else if ((double) font.MeasureString(strArray[index1] + str1).X > (double) maxWidth) + { + ++index1; + if (index1 < maxLines) + flag = true; + else + break; + } + else + { + ref string local = ref strArray[index1]; + local = local + str1 + str2; + flag = false; + stringList2.RemoveAt(0); + } + } + lineAmount = index1; + if (lineAmount == maxLines) + --lineAmount; + return strArray; + } + + public static Rectangle CenteredRectangle(Vector2 center, Vector2 size) => new Rectangle((int) ((double) center.X - (double) size.X / 2.0), (int) ((double) center.Y - (double) size.Y / 2.0), (int) size.X, (int) size.Y); + + public static Vector2 Vector2FromElipse(Vector2 angleVector, Vector2 elipseSizes) + { + if (elipseSizes == Vector2.Zero || angleVector == Vector2.Zero) + return Vector2.Zero; + angleVector.Normalize(); + Vector2 vector2 = Vector2.One / Vector2.Normalize(elipseSizes); + angleVector *= vector2; + angleVector.Normalize(); + return angleVector * elipseSizes / 2f; + } + + public static bool FloatIntersect( + float r1StartX, + float r1StartY, + float r1Width, + float r1Height, + float r2StartX, + float r2StartY, + float r2Width, + float r2Height) + { + return (double) r1StartX <= (double) r2StartX + (double) r2Width && (double) r1StartY <= (double) r2StartY + (double) r2Height && (double) r1StartX + (double) r1Width >= (double) r2StartX && (double) r1StartY + (double) r1Height >= (double) r2StartY; + } + + public static long CoinsCount(out bool overFlowing, Item[] inv, params int[] ignoreSlots) + { + List intList = new List((IEnumerable) ignoreSlots); + long num = 0; + for (int index = 0; index < inv.Length; ++index) + { + if (!intList.Contains(index)) + { + switch (inv[index].type) + { + case 71: + num += (long) inv[index].stack; + break; + case 72: + num += (long) (inv[index].stack * 100); + break; + case 73: + num += (long) (inv[index].stack * 10000); + break; + case 74: + num += (long) (inv[index].stack * 1000000); + break; + } + if (num >= 999999999L) + { + overFlowing = true; + return 999999999; + } + } + } + overFlowing = false; + return num; + } + + public static int[] CoinsSplit(long count) + { + int[] numArray = new int[4]; + long num1 = 0; + long num2 = 1000000; + for (int index = 3; index >= 0; --index) + { + numArray[index] = (int) ((count - num1) / num2); + num1 += (long) numArray[index] * num2; + num2 /= 100L; + } + return numArray; + } + + public static long CoinsCombineStacks(out bool overFlowing, params long[] coinCounts) + { + long num = 0; + foreach (long coinCount in coinCounts) + { + num += coinCount; + if (num >= 999999999L) + { + overFlowing = true; + return 999999999; + } + } + overFlowing = false; + return num; + } + + public static void PoofOfSmoke(Vector2 position) + { + int num = Main.rand.Next(3, 7); + for (int index1 = 0; index1 < num; ++index1) + { + int index2 = Gore.NewGore(position, (Main.rand.NextFloat() * 6.283185f).ToRotationVector2() * new Vector2(2f, 0.7f) * 0.7f, Main.rand.Next(11, 14)); + Main.gore[index2].scale = 0.7f; + Main.gore[index2].velocity *= 0.5f; + } + for (int index = 0; index < 10; ++index) + { + Dust dust = Main.dust[Dust.NewDust(position, 14, 14, 16, Alpha: 100, Scale: 1.5f)]; + dust.position += new Vector2(5f); + dust.velocity = (Main.rand.NextFloat() * 6.283185f).ToRotationVector2() * new Vector2(2f, 0.7f) * 0.7f * (float) (0.5 + 0.5 * (double) Main.rand.NextFloat()); + } + } + + public static Vector2 ToScreenPosition(this Vector2 worldPosition) => Vector2.Transform(worldPosition - Main.screenPosition, Main.GameViewMatrix.ZoomMatrix) / Main.UIScale; + + public static string PrettifyPercentDisplay(float percent, string originalFormat) => string.Format("{0:" + originalFormat + "}", (object) percent).TrimEnd('0', '%', ' ').TrimEnd('.', ' ').TrimStart('0', ' ') + "%"; + + public static void TrimTextIfNeeded( + ref string text, + DynamicSpriteFont font, + float scale, + float maxWidth) + { + int num = 0; + for (Vector2 vector2 = font.MeasureString(text) * scale; (double) vector2.X > (double) maxWidth; vector2 = font.MeasureString(text) * scale) + { + text = text.Substring(0, text.Length - 1); + ++num; + } + if (num <= 0) + return; + text = text.Substring(0, text.Length - 1) + "…"; + } + + public static string FormatWith(string original, object obj) + { + string input = original; + PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(obj); + return Utils._substitutionRegex.Replace(input, (MatchEvaluator) (match => + { + if (match.Groups[1].Length != 0) + return ""; + PropertyDescriptor propertyDescriptor = properties.Find(match.Groups[2].ToString(), false); + return propertyDescriptor == null ? "" : (propertyDescriptor.GetValue(obj) ?? (object) "").ToString(); + })); + } + + public static bool TryCreatingDirectory(string folderPath) + { + if (Directory.Exists(folderPath)) + return true; + try + { + Directory.CreateDirectory(folderPath); + return true; + } + catch (Exception ex) + { + string folderPath1 = folderPath; + FancyErrorPrinter.ShowDirectoryCreationFailError(ex, folderPath1); + return false; + } + } + + public static void OpenFolder(string folderPath) + { + if (!Utils.TryCreatingDirectory(folderPath)) + return; + Process.Start(folderPath); + } + + public static byte[] ToByteArray(this string str) + { + byte[] numArray = new byte[str.Length * 2]; + Buffer.BlockCopy((Array) str.ToCharArray(), 0, (Array) numArray, 0, numArray.Length); + return numArray; + } + + public static float NextFloat(this UnifiedRandom r) => (float) r.NextDouble(); + + public static float NextFloatDirection(this UnifiedRandom r) => (float) (r.NextDouble() * 2.0 - 1.0); + + public static float NextFloat(this UnifiedRandom random, FloatRange range) => random.NextFloat() * (range.Maximum - range.Minimum) + range.Minimum; + + public static T NextFromList(this UnifiedRandom random, params T[] objs) => objs[random.Next(objs.Length)]; + + public static int Next(this UnifiedRandom random, IntRange range) => random.Next(range.Minimum, range.Maximum + 1); + + public static Vector2 NextVector2Square(this UnifiedRandom r, float min, float max) => new Vector2((max - min) * (float) r.NextDouble() + min, (max - min) * (float) r.NextDouble() + min); + + public static Vector2 NextVector2FromRectangle(this UnifiedRandom r, Rectangle rect) => new Vector2((float) rect.X + r.NextFloat() * (float) rect.Width, (float) rect.Y + r.NextFloat() * (float) rect.Height); + + public static Vector2 NextVector2Unit( + this UnifiedRandom r, + float startRotation = 0.0f, + float rotationRange = 6.283185f) + { + return (startRotation + rotationRange * r.NextFloat()).ToRotationVector2(); + } + + public static Vector2 NextVector2Circular( + this UnifiedRandom r, + float circleHalfWidth, + float circleHalfHeight) + { + return r.NextVector2Unit() * new Vector2(circleHalfWidth, circleHalfHeight) * r.NextFloat(); + } + + public static Vector2 NextVector2CircularEdge( + this UnifiedRandom r, + float circleHalfWidth, + float circleHalfHeight) + { + return r.NextVector2Unit() * new Vector2(circleHalfWidth, circleHalfHeight); + } + + public static int Width(this Asset asset) => !asset.IsLoaded ? 0 : asset.Value.Width; + + public static int Height(this Asset asset) => !asset.IsLoaded ? 0 : asset.Value.Height; + + public static Rectangle Frame( + this Asset tex, + int horizontalFrames = 1, + int verticalFrames = 1, + int frameX = 0, + int frameY = 0, + int sizeOffsetX = 0, + int sizeOffsetY = 0) + { + return !tex.IsLoaded ? Rectangle.Empty : tex.Value.Frame(horizontalFrames, verticalFrames, frameX, frameY, sizeOffsetX, sizeOffsetY); + } + + public static Rectangle OffsetSize(this Rectangle rect, int xSize, int ySize) + { + rect.Width += xSize; + rect.Height += ySize; + return rect; + } + + public static Vector2 Size(this Asset tex) => !tex.IsLoaded ? Vector2.Zero : tex.Value.Size(); + + public static Rectangle Frame( + this Texture2D tex, + int horizontalFrames = 1, + int verticalFrames = 1, + int frameX = 0, + int frameY = 0, + int sizeOffsetX = 0, + int sizeOffsetY = 0) + { + int num1 = tex.Width / horizontalFrames; + int num2 = tex.Height / verticalFrames; + return new Rectangle(num1 * frameX, num2 * frameY, num1 + sizeOffsetX, num2 + sizeOffsetY); + } + + public static Vector2 OriginFlip( + this Rectangle rect, + Vector2 origin, + SpriteEffects effects) + { + if (effects.HasFlag((Enum) SpriteEffects.FlipHorizontally)) + origin.X = (float) rect.Width - origin.X; + if (effects.HasFlag((Enum) SpriteEffects.FlipVertically)) + origin.Y = (float) rect.Height - origin.Y; + return origin; + } + + public static Vector2 Size(this Texture2D tex) => new Vector2((float) tex.Width, (float) tex.Height); + + public static void WriteRGB(this BinaryWriter bb, Color c) + { + bb.Write(c.R); + bb.Write(c.G); + bb.Write(c.B); + } + + public static void WriteVector2(this BinaryWriter bb, Vector2 v) + { + bb.Write(v.X); + bb.Write(v.Y); + } + + public static void WritePackedVector2(this BinaryWriter bb, Vector2 v) + { + HalfVector2 halfVector2 = new HalfVector2(v.X, v.Y); + bb.Write(halfVector2.PackedValue); + } + + public static Color ReadRGB(this BinaryReader bb) => new Color((int) bb.ReadByte(), (int) bb.ReadByte(), (int) bb.ReadByte()); + + public static Vector2 ReadVector2(this BinaryReader bb) => new Vector2(bb.ReadSingle(), bb.ReadSingle()); + + public static Vector2 ReadPackedVector2(this BinaryReader bb) => new HalfVector2() + { + PackedValue = bb.ReadUInt32() + }.ToVector2(); + + public static Vector2 Left(this Rectangle r) => new Vector2((float) r.X, (float) (r.Y + r.Height / 2)); + + public static Vector2 Right(this Rectangle r) => new Vector2((float) (r.X + r.Width), (float) (r.Y + r.Height / 2)); + + public static Vector2 Top(this Rectangle r) => new Vector2((float) (r.X + r.Width / 2), (float) r.Y); + + public static Vector2 Bottom(this Rectangle r) => new Vector2((float) (r.X + r.Width / 2), (float) (r.Y + r.Height)); + + public static Vector2 TopLeft(this Rectangle r) => new Vector2((float) r.X, (float) r.Y); + + public static Vector2 TopRight(this Rectangle r) => new Vector2((float) (r.X + r.Width), (float) r.Y); + + public static Vector2 BottomLeft(this Rectangle r) => new Vector2((float) r.X, (float) (r.Y + r.Height)); + + public static Vector2 BottomRight(this Rectangle r) => new Vector2((float) (r.X + r.Width), (float) (r.Y + r.Height)); + + public static Vector2 Center(this Rectangle r) => new Vector2((float) (r.X + r.Width / 2), (float) (r.Y + r.Height / 2)); + + public static Vector2 Size(this Rectangle r) => new Vector2((float) r.Width, (float) r.Height); + + public static float Distance(this Rectangle r, Vector2 point) + { + if (Utils.FloatIntersect((float) r.Left, (float) r.Top, (float) r.Width, (float) r.Height, point.X, point.Y, 0.0f, 0.0f)) + return 0.0f; + return (double) point.X >= (double) r.Left && (double) point.X <= (double) r.Right ? ((double) point.Y < (double) r.Top ? (float) r.Top - point.Y : point.Y - (float) r.Bottom) : ((double) point.Y >= (double) r.Top && (double) point.Y <= (double) r.Bottom ? ((double) point.X < (double) r.Left ? (float) r.Left - point.X : point.X - (float) r.Right) : ((double) point.X < (double) r.Left ? ((double) point.Y < (double) r.Top ? Vector2.Distance(point, r.TopLeft()) : Vector2.Distance(point, r.BottomLeft())) : ((double) point.Y < (double) r.Top ? Vector2.Distance(point, r.TopRight()) : Vector2.Distance(point, r.BottomRight())))); + } + + public static Vector2 ClosestPointInRect(this Rectangle r, Vector2 point) + { + Vector2 vector2 = point; + if ((double) vector2.X < (double) r.Left) + vector2.X = (float) r.Left; + if ((double) vector2.X > (double) r.Right) + vector2.X = (float) r.Right; + if ((double) vector2.Y < (double) r.Top) + vector2.Y = (float) r.Top; + if ((double) vector2.Y > (double) r.Bottom) + vector2.Y = (float) r.Bottom; + return vector2; + } + + public static Rectangle Modified(this Rectangle r, int x, int y, int w, int h) => new Rectangle(r.X + x, r.Y + y, r.Width + w, r.Height + h); + + public static float ToRotation(this Vector2 v) => (float) Math.Atan2((double) v.Y, (double) v.X); + + public static Vector2 ToRotationVector2(this float f) => new Vector2((float) Math.Cos((double) f), (float) Math.Sin((double) f)); + + public static Vector2 RotatedBy( + this Vector2 spinningpoint, + double radians, + Vector2 center = default (Vector2)) + { + float num1 = (float) Math.Cos(radians); + float num2 = (float) Math.Sin(radians); + Vector2 vector2_1 = spinningpoint - center; + Vector2 vector2_2 = center; + vector2_2.X += (float) ((double) vector2_1.X * (double) num1 - (double) vector2_1.Y * (double) num2); + vector2_2.Y += (float) ((double) vector2_1.X * (double) num2 + (double) vector2_1.Y * (double) num1); + return vector2_2; + } + + public static Vector2 RotatedByRandom(this Vector2 spinninpoint, double maxRadians) => spinninpoint.RotatedBy(Main.rand.NextDouble() * maxRadians - Main.rand.NextDouble() * maxRadians); + + public static Vector2 Floor(this Vector2 vec) + { + vec.X = (float) (int) vec.X; + vec.Y = (float) (int) vec.Y; + return vec; + } + + public static bool HasNaNs(this Vector2 vec) => float.IsNaN(vec.X) || float.IsNaN(vec.Y); + + public static bool Between(this Vector2 vec, Vector2 minimum, Vector2 maximum) => (double) vec.X >= (double) minimum.X && (double) vec.X <= (double) maximum.X && (double) vec.Y >= (double) minimum.Y && (double) vec.Y <= (double) maximum.Y; + + public static Vector2 ToVector2(this Point p) => new Vector2((float) p.X, (float) p.Y); + + public static Vector2 ToVector2(this Point16 p) => new Vector2((float) p.X, (float) p.Y); + + public static Vector2 ToWorldCoordinates(this Point p, float autoAddX = 8f, float autoAddY = 8f) => p.ToVector2() * 16f + new Vector2(autoAddX, autoAddY); + + public static Vector2 ToWorldCoordinates(this Point16 p, float autoAddX = 8f, float autoAddY = 8f) => p.ToVector2() * 16f + new Vector2(autoAddX, autoAddY); + + public static Vector2 MoveTowards( + this Vector2 currentPosition, + Vector2 targetPosition, + float maxAmountAllowedToMove) + { + Vector2 v = targetPosition - currentPosition; + return (double) v.Length() < (double) maxAmountAllowedToMove ? targetPosition : currentPosition + v.SafeNormalize(Vector2.Zero) * maxAmountAllowedToMove; + } + + public static Point16 ToTileCoordinates16(this Vector2 vec) => new Point16((int) vec.X >> 4, (int) vec.Y >> 4); + + public static Point ToTileCoordinates(this Vector2 vec) => new Point((int) vec.X >> 4, (int) vec.Y >> 4); + + public static Point ToPoint(this Vector2 v) => new Point((int) v.X, (int) v.Y); + + public static Vector2 SafeNormalize(this Vector2 v, Vector2 defaultValue) => v == Vector2.Zero || v.HasNaNs() ? defaultValue : Vector2.Normalize(v); + + public static Vector2 ClosestPointOnLine(this Vector2 P, Vector2 A, Vector2 B) + { + Vector2 vector2_1 = P - A; + Vector2 vector2_2 = B - A; + float num1 = vector2_2.LengthSquared(); + Vector2 vector2_3 = vector2_2; + float num2 = Vector2.Dot(vector2_1, vector2_3) / num1; + if ((double) num2 < 0.0) + return A; + return (double) num2 > 1.0 ? B : A + vector2_2 * num2; + } + + public static bool RectangleLineCollision( + Vector2 rectTopLeft, + Vector2 rectBottomRight, + Vector2 lineStart, + Vector2 lineEnd) + { + if (lineStart.Between(rectTopLeft, rectBottomRight) || lineEnd.Between(rectTopLeft, rectBottomRight)) + return true; + Vector2 P = new Vector2(rectBottomRight.X, rectTopLeft.Y); + Vector2 vector2 = new Vector2(rectTopLeft.X, rectBottomRight.Y); + Vector2[] vector2Array = new Vector2[4] + { + rectTopLeft.ClosestPointOnLine(lineStart, lineEnd), + P.ClosestPointOnLine(lineStart, lineEnd), + vector2.ClosestPointOnLine(lineStart, lineEnd), + rectBottomRight.ClosestPointOnLine(lineStart, lineEnd) + }; + for (int index = 0; index < vector2Array.Length; ++index) + { + if (vector2Array[0].Between(rectTopLeft, vector2)) + return true; + } + return false; + } + + public static Vector2 RotateRandom(this Vector2 spinninpoint, double maxRadians) => spinninpoint.RotatedBy(Main.rand.NextDouble() * maxRadians - Main.rand.NextDouble() * maxRadians); + + public static float AngleTo(this Vector2 Origin, Vector2 Target) => (float) Math.Atan2((double) Target.Y - (double) Origin.Y, (double) Target.X - (double) Origin.X); + + public static float AngleFrom(this Vector2 Origin, Vector2 Target) => (float) Math.Atan2((double) Origin.Y - (double) Target.Y, (double) Origin.X - (double) Target.X); + + public static Vector2 rotateTowards( + Vector2 currentPosition, + Vector2 currentVelocity, + Vector2 targetPosition, + float maxChange) + { + float num = currentVelocity.Length(); + float targetAngle = currentPosition.AngleTo(targetPosition); + return currentVelocity.ToRotation().AngleTowards(targetAngle, (float) Math.PI / 180f).ToRotationVector2() * num; + } + + public static float Distance(this Vector2 Origin, Vector2 Target) => Vector2.Distance(Origin, Target); + + public static float DistanceSQ(this Vector2 Origin, Vector2 Target) => Vector2.DistanceSquared(Origin, Target); + + public static Vector2 DirectionTo(this Vector2 Origin, Vector2 Target) => Vector2.Normalize(Target - Origin); + + public static Vector2 DirectionFrom(this Vector2 Origin, Vector2 Target) => Vector2.Normalize(Origin - Target); + + public static bool WithinRange(this Vector2 Origin, Vector2 Target, float MaxRange) => (double) Vector2.DistanceSquared(Origin, Target) <= (double) MaxRange * (double) MaxRange; + + public static Vector2 XY(this Vector4 vec) => new Vector2(vec.X, vec.Y); + + public static Vector2 ZW(this Vector4 vec) => new Vector2(vec.Z, vec.W); + + public static Vector3 XZW(this Vector4 vec) => new Vector3(vec.X, vec.Z, vec.W); + + public static Vector3 YZW(this Vector4 vec) => new Vector3(vec.Y, vec.Z, vec.W); + + public static Color MultiplyRGB(this Color firstColor, Color secondColor) => new Color((int) (byte) ((double) ((int) firstColor.R * (int) secondColor.R) / (double) byte.MaxValue), (int) (byte) ((double) ((int) firstColor.G * (int) secondColor.G) / (double) byte.MaxValue), (int) (byte) ((double) ((int) firstColor.B * (int) secondColor.B) / (double) byte.MaxValue)); + + public static Color MultiplyRGBA(this Color firstColor, Color secondColor) => new Color((int) (byte) ((double) ((int) firstColor.R * (int) secondColor.R) / (double) byte.MaxValue), (int) (byte) ((double) ((int) firstColor.G * (int) secondColor.G) / (double) byte.MaxValue), (int) (byte) ((double) ((int) firstColor.B * (int) secondColor.B) / (double) byte.MaxValue), (int) (byte) ((double) ((int) firstColor.A * (int) secondColor.A) / (double) byte.MaxValue)); + + public static string Hex3(this Color color) + { + byte num = color.R; + string str1 = num.ToString("X2"); + num = color.G; + string str2 = num.ToString("X2"); + num = color.B; + string str3 = num.ToString("X2"); + return (str1 + str2 + str3).ToLower(); + } + + public static string Hex4(this Color color) + { + byte num = color.R; + string str1 = num.ToString("X2"); + num = color.G; + string str2 = num.ToString("X2"); + num = color.B; + string str3 = num.ToString("X2"); + num = color.A; + string str4 = num.ToString("X2"); + return (str1 + str2 + str3 + str4).ToLower(); + } + + public static int ToDirectionInt(this bool value) => !value ? -1 : 1; + + public static int ToInt(this bool value) => !value ? 0 : 1; + + public static int ModulusPositive(this int myInteger, int modulusNumber) => (myInteger % modulusNumber + modulusNumber) % modulusNumber; + + public static float AngleLerp(this float curAngle, float targetAngle, float amount) + { + float angle; + if ((double) targetAngle < (double) curAngle) + { + float num = targetAngle + 6.283185f; + angle = (double) num - (double) curAngle > (double) curAngle - (double) targetAngle ? MathHelper.Lerp(curAngle, targetAngle, amount) : MathHelper.Lerp(curAngle, num, amount); + } + else + { + if ((double) targetAngle <= (double) curAngle) + return curAngle; + float num = targetAngle - 6.283185f; + angle = (double) targetAngle - (double) curAngle > (double) curAngle - (double) num ? MathHelper.Lerp(curAngle, num, amount) : MathHelper.Lerp(curAngle, targetAngle, amount); + } + return MathHelper.WrapAngle(angle); + } + + public static float AngleTowards(this float curAngle, float targetAngle, float maxChange) + { + curAngle = MathHelper.WrapAngle(curAngle); + targetAngle = MathHelper.WrapAngle(targetAngle); + if ((double) curAngle < (double) targetAngle) + { + if ((double) targetAngle - (double) curAngle > 3.14159274101257) + curAngle += 6.283185f; + } + else if ((double) curAngle - (double) targetAngle > 3.14159274101257) + curAngle -= 6.283185f; + curAngle += MathHelper.Clamp(targetAngle - curAngle, -maxChange, maxChange); + return MathHelper.WrapAngle(curAngle); + } + + public static bool deepCompare(this int[] firstArray, int[] secondArray) + { + if (firstArray == null && secondArray == null) + return true; + if (firstArray == null || secondArray == null || firstArray.Length != secondArray.Length) + return false; + for (int index = 0; index < firstArray.Length; ++index) + { + if (firstArray[index] != secondArray[index]) + return false; + } + return true; + } + + public static List GetTrueIndexes(this bool[] array) + { + List intList = new List(); + for (int index = 0; index < array.Length; ++index) + { + if (array[index]) + intList.Add(index); + } + return intList; + } + + public static List GetTrueIndexes(params bool[][] arrays) + { + List source = new List(); + foreach (bool[] array in arrays) + source.AddRange((IEnumerable) array.GetTrueIndexes()); + return source.Distinct().ToList(); + } + + public static bool PressingShift(this KeyboardState kb) => kb.IsKeyDown(Keys.LeftShift) || kb.IsKeyDown(Keys.RightShift); + + public static bool PressingControl(this KeyboardState kb) => kb.IsKeyDown(Keys.LeftControl) || kb.IsKeyDown(Keys.RightControl); + + public static bool PlotLine(Point16 p0, Point16 p1, Utils.TileActionAttempt plot, bool jump = true) => Utils.PlotLine((int) p0.X, (int) p0.Y, (int) p1.X, (int) p1.Y, plot, jump); + + public static bool PlotLine(Point p0, Point p1, Utils.TileActionAttempt plot, bool jump = true) => Utils.PlotLine(p0.X, p0.Y, p1.X, p1.Y, plot, jump); + + private static bool PlotLine( + int x0, + int y0, + int x1, + int y1, + Utils.TileActionAttempt plot, + bool jump = true) + { + if (x0 == x1 && y0 == y1) + return plot(x0, y0); + bool flag = Math.Abs(y1 - y0) > Math.Abs(x1 - x0); + if (flag) + { + Utils.Swap(ref x0, ref y0); + Utils.Swap(ref x1, ref y1); + } + int num1 = Math.Abs(x1 - x0); + int num2 = Math.Abs(y1 - y0); + int num3 = num1 / 2; + int num4 = y0; + int num5 = x0 < x1 ? 1 : -1; + int num6 = y0 < y1 ? 1 : -1; + for (int index = x0; index != x1; index += num5) + { + if (flag) + { + if (!plot(num4, index)) + return false; + } + else if (!plot(index, num4)) + return false; + num3 -= num2; + if (num3 < 0) + { + num4 += num6; + if (!jump) + { + if (flag) + { + if (!plot(num4, index)) + return false; + } + else if (!plot(index, num4)) + return false; + } + num3 += num1; + } + } + return true; + } + + public static int RandomNext(ref ulong seed, int bits) + { + seed = Utils.RandomNextSeed(seed); + return (int) (seed >> 48 - bits); + } + + public static ulong RandomNextSeed(ulong seed) => (ulong) ((long) seed * 25214903917L + 11L & 281474976710655L); + + public static float RandomFloat(ref ulong seed) => (float) Utils.RandomNext(ref seed, 24) / 1.677722E+07f; + + public static int RandomInt(ref ulong seed, int max) + { + if ((max & -max) == max) + return (int) ((long) max * (long) Utils.RandomNext(ref seed, 31) >> 31); + int num1; + int num2; + do + { + num1 = Utils.RandomNext(ref seed, 31); + num2 = num1 % max; + } + while (num1 - num2 + (max - 1) < 0); + return num2; + } + + public static int RandomInt(ref ulong seed, int min, int max) => Utils.RandomInt(ref seed, max - min) + min; + + public static bool PlotTileLine( + Vector2 start, + Vector2 end, + float width, + Utils.TileActionAttempt plot) + { + float num = width / 2f; + Vector2 vector2_1 = end - start; + Vector2 vector2_2 = vector2_1 / vector2_1.Length(); + Vector2 vector2_3 = new Vector2(-vector2_2.Y, vector2_2.X) * num; + Point tileCoordinates1 = (start - vector2_3).ToTileCoordinates(); + Point tileCoordinates2 = (start + vector2_3).ToTileCoordinates(); + Point tileCoordinates3 = start.ToTileCoordinates(); + Point tileCoordinates4 = end.ToTileCoordinates(); + Point lineMinOffset = new Point(tileCoordinates1.X - tileCoordinates3.X, tileCoordinates1.Y - tileCoordinates3.Y); + Point lineMaxOffset = new Point(tileCoordinates2.X - tileCoordinates3.X, tileCoordinates2.Y - tileCoordinates3.Y); + return Utils.PlotLine(tileCoordinates3.X, tileCoordinates3.Y, tileCoordinates4.X, tileCoordinates4.Y, (Utils.TileActionAttempt) ((x, y) => Utils.PlotLine(x + lineMinOffset.X, y + lineMinOffset.Y, x + lineMaxOffset.X, y + lineMaxOffset.Y, plot, false))); + } + + public static bool PlotTileTale( + Vector2 start, + Vector2 end, + float width, + Utils.TileActionAttempt plot) + { + float halfWidth = width / 2f; + Vector2 vector2_1 = end - start; + Vector2 vector2_2 = vector2_1 / vector2_1.Length(); + Vector2 perpOffset = new Vector2(-vector2_2.Y, vector2_2.X); + Point pointStart = start.ToTileCoordinates(); + Point tileCoordinates1 = end.ToTileCoordinates(); + int length = 0; + Utils.PlotLine(pointStart.X, pointStart.Y, tileCoordinates1.X, tileCoordinates1.Y, (Utils.TileActionAttempt) ((_param1, _param2) => + { + ++length; + return true; + })); + length--; + int curLength = 0; + return Utils.PlotLine(pointStart.X, pointStart.Y, tileCoordinates1.X, tileCoordinates1.Y, (Utils.TileActionAttempt) ((x, y) => + { + float num = (float) (1.0 - (double) curLength / (double) length); + ++curLength; + Point tileCoordinates2 = (start - perpOffset * halfWidth * num).ToTileCoordinates(); + Point tileCoordinates3 = (start + perpOffset * halfWidth * num).ToTileCoordinates(); + Point point1 = new Point(tileCoordinates2.X - pointStart.X, tileCoordinates2.Y - pointStart.Y); + Point point2 = new Point(tileCoordinates3.X - pointStart.X, tileCoordinates3.Y - pointStart.Y); + return Utils.PlotLine(x + point1.X, y + point1.Y, x + point2.X, y + point2.Y, plot, false); + })); + } + + public static bool PlotTileArea(int x, int y, Utils.TileActionAttempt plot) + { + if (!WorldGen.InWorld(x, y)) + return false; + List pointList1 = new List(); + List pointList2 = new List(); + HashSet pointSet = new HashSet(); + pointList2.Add(new Point(x, y)); + while (pointList2.Count > 0) + { + pointList1.Clear(); + pointList1.AddRange((IEnumerable) pointList2); + pointList2.Clear(); + while (pointList1.Count > 0) + { + Point point1 = pointList1[0]; + if (!WorldGen.InWorld(point1.X, point1.Y, 1)) + { + pointList1.Remove(point1); + } + else + { + pointSet.Add(point1); + pointList1.Remove(point1); + if (plot(point1.X, point1.Y)) + { + Point point2 = new Point(point1.X - 1, point1.Y); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X + 1, point1.Y); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X, point1.Y - 1); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X, point1.Y + 1); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + } + } + } + } + return true; + } + + public static int RandomConsecutive(double random, int odds) => (int) Math.Log(1.0 - random, 1.0 / (double) odds); + + public static Vector2 RandomVector2(UnifiedRandom random, float min, float max) => new Vector2((max - min) * (float) random.NextDouble() + min, (max - min) * (float) random.NextDouble() + min); + + public static bool IndexInRange(this T[] t, int index) => index >= 0 && index < t.Length; + + public static bool IndexInRange(this List t, int index) => index >= 0 && index < t.Count; + + public static T SelectRandom(UnifiedRandom random, params T[] choices) => choices[random.Next(choices.Length)]; + + public static void DrawBorderStringFourWay( + SpriteBatch sb, + DynamicSpriteFont font, + string text, + float x, + float y, + Color textColor, + Color borderColor, + Vector2 origin, + float scale = 1f) + { + Color color = borderColor; + Vector2 zero = Vector2.Zero; + for (int index = 0; index < 5; ++index) + { + switch (index) + { + case 0: + zero.X = x - 2f; + zero.Y = y; + break; + case 1: + zero.X = x + 2f; + zero.Y = y; + break; + case 2: + zero.X = x; + zero.Y = y - 2f; + break; + case 3: + zero.X = x; + zero.Y = y + 2f; + break; + default: + zero.X = x; + zero.Y = y; + color = textColor; + break; + } + DynamicSpriteFontExtensionMethods.DrawString(sb, font, text, zero, color, 0.0f, origin, scale, SpriteEffects.None, 0.0f); + } + } + + public static Vector2 DrawBorderString( + SpriteBatch sb, + string text, + Vector2 pos, + Color color, + float scale = 1f, + float anchorx = 0.0f, + float anchory = 0.0f, + int maxCharactersDisplayed = -1) + { + if (maxCharactersDisplayed != -1 && text.Length > maxCharactersDisplayed) + text.Substring(0, maxCharactersDisplayed); + DynamicSpriteFont font = FontAssets.MouseText.Value; + Vector2 vector2 = font.MeasureString(text); + ChatManager.DrawColorCodedStringWithShadow(sb, font, text, pos, color, 0.0f, new Vector2(anchorx, anchory) * vector2, new Vector2(scale), spread: 1.5f); + return vector2 * scale; + } + + public static Vector2 DrawBorderStringBig( + SpriteBatch spriteBatch, + string text, + Vector2 pos, + Color color, + float scale = 1f, + float anchorx = 0.0f, + float anchory = 0.0f, + int maxCharactersDisplayed = -1) + { + if (maxCharactersDisplayed != -1 && text.Length > maxCharactersDisplayed) + text.Substring(0, maxCharactersDisplayed); + DynamicSpriteFont dynamicSpriteFont = FontAssets.DeathText.Value; + for (int index1 = -1; index1 < 2; ++index1) + { + for (int index2 = -1; index2 < 2; ++index2) + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, dynamicSpriteFont, text, pos + new Vector2((float) index1, (float) index2), Color.Black, 0.0f, new Vector2(anchorx, anchory) * dynamicSpriteFont.MeasureString(text), scale, SpriteEffects.None, 0.0f); + } + DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, dynamicSpriteFont, text, pos, color, 0.0f, new Vector2(anchorx, anchory) * dynamicSpriteFont.MeasureString(text), scale, SpriteEffects.None, 0.0f); + return dynamicSpriteFont.MeasureString(text) * scale; + } + + public static void DrawInvBG(SpriteBatch sb, Rectangle R, Color c = default (Color)) => Utils.DrawInvBG(sb, R.X, R.Y, R.Width, R.Height, c); + + public static void DrawInvBG(SpriteBatch sb, float x, float y, float w, float h, Color c = default (Color)) => Utils.DrawInvBG(sb, (int) x, (int) y, (int) w, (int) h, c); + + public static void DrawInvBG(SpriteBatch sb, int x, int y, int w, int h, Color c = default (Color)) + { + if (c == new Color()) + c = new Color(63, 65, 151, (int) byte.MaxValue) * 0.785f; + Texture2D texture = TextureAssets.InventoryBack13.Value; + if (w < 20) + w = 20; + if (h < 20) + h = 20; + sb.Draw(texture, new Rectangle(x, y, 10, 10), new Rectangle?(new Rectangle(0, 0, 10, 10)), c); + sb.Draw(texture, new Rectangle(x + 10, y, w - 20, 10), new Rectangle?(new Rectangle(10, 0, 10, 10)), c); + sb.Draw(texture, new Rectangle(x + w - 10, y, 10, 10), new Rectangle?(new Rectangle(texture.Width - 10, 0, 10, 10)), c); + sb.Draw(texture, new Rectangle(x, y + 10, 10, h - 20), new Rectangle?(new Rectangle(0, 10, 10, 10)), c); + sb.Draw(texture, new Rectangle(x + 10, y + 10, w - 20, h - 20), new Rectangle?(new Rectangle(10, 10, 10, 10)), c); + sb.Draw(texture, new Rectangle(x + w - 10, y + 10, 10, h - 20), new Rectangle?(new Rectangle(texture.Width - 10, 10, 10, 10)), c); + sb.Draw(texture, new Rectangle(x, y + h - 10, 10, 10), new Rectangle?(new Rectangle(0, texture.Height - 10, 10, 10)), c); + sb.Draw(texture, new Rectangle(x + 10, y + h - 10, w - 20, 10), new Rectangle?(new Rectangle(10, texture.Height - 10, 10, 10)), c); + sb.Draw(texture, new Rectangle(x + w - 10, y + h - 10, 10, 10), new Rectangle?(new Rectangle(texture.Width - 10, texture.Height - 10, 10, 10)), c); + } + + public static string ReadEmbeddedResource(string path) + { + using (Stream manifestResourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(path)) + { + using (StreamReader streamReader = new StreamReader(manifestResourceStream)) + return streamReader.ReadToEnd(); + } + } + + public static void DrawSplicedPanel( + SpriteBatch sb, + Texture2D texture, + int x, + int y, + int w, + int h, + int leftEnd, + int rightEnd, + int topEnd, + int bottomEnd, + Color c) + { + if (w < leftEnd + rightEnd) + w = leftEnd + rightEnd; + if (h < topEnd + bottomEnd) + h = topEnd + bottomEnd; + sb.Draw(texture, new Rectangle(x, y, leftEnd, topEnd), new Rectangle?(new Rectangle(0, 0, leftEnd, topEnd)), c); + sb.Draw(texture, new Rectangle(x + leftEnd, y, w - leftEnd - rightEnd, topEnd), new Rectangle?(new Rectangle(leftEnd, 0, texture.Width - leftEnd - rightEnd, topEnd)), c); + sb.Draw(texture, new Rectangle(x + w - rightEnd, y, topEnd, rightEnd), new Rectangle?(new Rectangle(texture.Width - rightEnd, 0, rightEnd, topEnd)), c); + sb.Draw(texture, new Rectangle(x, y + topEnd, leftEnd, h - topEnd - bottomEnd), new Rectangle?(new Rectangle(0, topEnd, leftEnd, texture.Height - topEnd - bottomEnd)), c); + sb.Draw(texture, new Rectangle(x + leftEnd, y + topEnd, w - leftEnd - rightEnd, h - topEnd - bottomEnd), new Rectangle?(new Rectangle(leftEnd, topEnd, texture.Width - leftEnd - rightEnd, texture.Height - topEnd - bottomEnd)), c); + sb.Draw(texture, new Rectangle(x + w - rightEnd, y + topEnd, rightEnd, h - topEnd - bottomEnd), new Rectangle?(new Rectangle(texture.Width - rightEnd, topEnd, rightEnd, texture.Height - topEnd - bottomEnd)), c); + sb.Draw(texture, new Rectangle(x, y + h - bottomEnd, leftEnd, bottomEnd), new Rectangle?(new Rectangle(0, texture.Height - bottomEnd, leftEnd, bottomEnd)), c); + sb.Draw(texture, new Rectangle(x + leftEnd, y + h - bottomEnd, w - leftEnd - rightEnd, bottomEnd), new Rectangle?(new Rectangle(leftEnd, texture.Height - bottomEnd, texture.Width - leftEnd - rightEnd, bottomEnd)), c); + sb.Draw(texture, new Rectangle(x + w - rightEnd, y + h - bottomEnd, rightEnd, bottomEnd), new Rectangle?(new Rectangle(texture.Width - rightEnd, texture.Height - bottomEnd, rightEnd, bottomEnd)), c); + } + + public static void DrawSettingsPanel( + SpriteBatch spriteBatch, + Vector2 position, + float width, + Color color) + { + Utils.DrawPanel(TextureAssets.SettingsPanel.Value, 2, 0, spriteBatch, position, width, color); + } + + public static void DrawSettings2Panel( + SpriteBatch spriteBatch, + Vector2 position, + float width, + Color color) + { + Utils.DrawPanel(TextureAssets.SettingsPanel.Value, 2, 0, spriteBatch, position, width, color); + } + + public static void DrawPanel( + Texture2D texture, + int edgeWidth, + int edgeShove, + SpriteBatch spriteBatch, + Vector2 position, + float width, + Color color) + { + spriteBatch.Draw(texture, position, new Rectangle?(new Rectangle(0, 0, edgeWidth, texture.Height)), color); + spriteBatch.Draw(texture, new Vector2(position.X + (float) edgeWidth, position.Y), new Rectangle?(new Rectangle(edgeWidth + edgeShove, 0, texture.Width - (edgeWidth + edgeShove) * 2, texture.Height)), color, 0.0f, Vector2.Zero, new Vector2((width - (float) (edgeWidth * 2)) / (float) (texture.Width - (edgeWidth + edgeShove) * 2), 1f), SpriteEffects.None, 0.0f); + spriteBatch.Draw(texture, new Vector2(position.X + width - (float) edgeWidth, position.Y), new Rectangle?(new Rectangle(texture.Width - edgeWidth, 0, edgeWidth, texture.Height)), color); + } + + public static void DrawRectangle( + SpriteBatch sb, + Vector2 start, + Vector2 end, + Color colorStart, + Color colorEnd, + float width) + { + Utils.DrawLine(sb, start, new Vector2(start.X, end.Y), colorStart, colorEnd, width); + Utils.DrawLine(sb, start, new Vector2(end.X, start.Y), colorStart, colorEnd, width); + Utils.DrawLine(sb, end, new Vector2(start.X, end.Y), colorStart, colorEnd, width); + Utils.DrawLine(sb, end, new Vector2(end.X, start.Y), colorStart, colorEnd, width); + } + + public static void DrawLaser( + SpriteBatch sb, + Texture2D tex, + Vector2 start, + Vector2 end, + Vector2 scale, + Utils.LaserLineFraming framing) + { + Vector2 vector2_1 = start; + Vector2 vector2_2 = Vector2.Normalize(end - start); + float distanceLeft1 = (end - start).Length(); + float rotation = vector2_2.ToRotation() - 1.570796f; + if (vector2_2.HasNaNs()) + return; + float distanceCovered; + Rectangle frame; + Vector2 origin; + Color color; + framing(0, vector2_1, distanceLeft1, new Rectangle(), out distanceCovered, out frame, out origin, out color); + sb.Draw(tex, vector2_1, new Rectangle?(frame), color, rotation, frame.Size() / 2f, scale, SpriteEffects.None, 0.0f); + float distanceLeft2 = distanceLeft1 - distanceCovered * scale.Y; + Vector2 vector2_3 = vector2_1 + vector2_2 * ((float) frame.Height - origin.Y) * scale.Y; + if ((double) distanceLeft2 > 0.0) + { + float num = 0.0f; + while ((double) num + 1.0 < (double) distanceLeft2) + { + framing(1, vector2_3, distanceLeft2 - num, frame, out distanceCovered, out frame, out origin, out color); + if ((double) distanceLeft2 - (double) num < (double) frame.Height) + { + distanceCovered *= (distanceLeft2 - num) / (float) frame.Height; + frame.Height = (int) ((double) distanceLeft2 - (double) num); + } + sb.Draw(tex, vector2_3, new Rectangle?(frame), color, rotation, origin, scale, SpriteEffects.None, 0.0f); + num += distanceCovered * scale.Y; + vector2_3 += vector2_2 * distanceCovered * scale.Y; + } + } + framing(2, vector2_3, distanceLeft2, new Rectangle(), out distanceCovered, out frame, out origin, out color); + sb.Draw(tex, vector2_3, new Rectangle?(frame), color, rotation, origin, scale, SpriteEffects.None, 0.0f); + } + + public static void DrawLine(SpriteBatch spriteBatch, Point start, Point end, Color color) => Utils.DrawLine(spriteBatch, new Vector2((float) (start.X << 4), (float) (start.Y << 4)), new Vector2((float) (end.X << 4), (float) (end.Y << 4)), color); + + public static void DrawLine(SpriteBatch spriteBatch, Vector2 start, Vector2 end, Color color) + { + float num1 = Vector2.Distance(start, end); + Vector2 v = (end - start) / num1; + Vector2 vector2 = start; + Vector2 screenPosition = Main.screenPosition; + float rotation = v.ToRotation(); + for (float num2 = 0.0f; (double) num2 <= (double) num1; num2 += 4f) + { + float num3 = num2 / num1; + spriteBatch.Draw(TextureAssets.BlackTile.Value, vector2 - screenPosition, new Rectangle?(), new Color(new Vector4(num3, num3, num3, 1f) * color.ToVector4()), rotation, Vector2.Zero, 0.25f, SpriteEffects.None, 0.0f); + vector2 = start + num2 * v; + } + } + + public static void DrawLine( + SpriteBatch spriteBatch, + Vector2 start, + Vector2 end, + Color colorStart, + Color colorEnd, + float width) + { + float num1 = Vector2.Distance(start, end); + Vector2 v = (end - start) / num1; + Vector2 vector2 = start; + Vector2 screenPosition = Main.screenPosition; + float rotation = v.ToRotation(); + float scale = width / 16f; + for (float num2 = 0.0f; (double) num2 <= (double) num1; num2 += width) + { + float amount = num2 / num1; + spriteBatch.Draw(TextureAssets.BlackTile.Value, vector2 - screenPosition, new Rectangle?(), Color.Lerp(colorStart, colorEnd, amount), rotation, Vector2.Zero, scale, SpriteEffects.None, 0.0f); + vector2 = start + num2 * v; + } + } + + public static void DrawRectForTilesInWorld( + SpriteBatch spriteBatch, + Rectangle rect, + Color color) + { + Utils.DrawRectForTilesInWorld(spriteBatch, new Point(rect.X, rect.Y), new Point(rect.X + rect.Width, rect.Y + rect.Height), color); + } + + public static void DrawRectForTilesInWorld( + SpriteBatch spriteBatch, + Point start, + Point end, + Color color) + { + Utils.DrawRect(spriteBatch, new Vector2((float) (start.X << 4), (float) (start.Y << 4)), new Vector2((float) ((end.X << 4) - 4), (float) ((end.Y << 4) - 4)), color); + } + + public static void DrawRect(SpriteBatch spriteBatch, Rectangle rect, Color color) => Utils.DrawRect(spriteBatch, new Vector2((float) rect.X, (float) rect.Y), new Vector2((float) (rect.X + rect.Width), (float) (rect.Y + rect.Height)), color); + + public static void DrawRect(SpriteBatch spriteBatch, Vector2 start, Vector2 end, Color color) + { + Utils.DrawLine(spriteBatch, start, new Vector2(start.X, end.Y), color); + Utils.DrawLine(spriteBatch, start, new Vector2(end.X, start.Y), color); + Utils.DrawLine(spriteBatch, end, new Vector2(start.X, end.Y), color); + Utils.DrawLine(spriteBatch, end, new Vector2(end.X, start.Y), color); + } + + public static void DrawRect( + SpriteBatch spriteBatch, + Vector2 topLeft, + Vector2 topRight, + Vector2 bottomRight, + Vector2 bottomLeft, + Color color) + { + Utils.DrawLine(spriteBatch, topLeft, topRight, color); + Utils.DrawLine(spriteBatch, topRight, bottomRight, color); + Utils.DrawLine(spriteBatch, bottomRight, bottomLeft, color); + Utils.DrawLine(spriteBatch, bottomLeft, topLeft, color); + } + + public static void DrawCursorSingle( + SpriteBatch sb, + Color color, + float rot = float.NaN, + float scale = 1f, + Vector2 manualPosition = default (Vector2), + int cursorSlot = 0, + int specialMode = 0) + { + bool flag1 = false; + bool flag2 = true; + bool flag3 = true; + Vector2 origin = Vector2.Zero; + Vector2 vector2_1 = new Vector2((float) Main.mouseX, (float) Main.mouseY); + if (manualPosition != Vector2.Zero) + vector2_1 = manualPosition; + if (float.IsNaN(rot)) + { + rot = 0.0f; + } + else + { + flag1 = true; + rot -= 2.356194f; + } + if (cursorSlot == 4 || cursorSlot == 5) + { + flag2 = false; + origin = new Vector2(8f); + if (flag1 && specialMode == 0) + { + float num1 = rot; + if ((double) num1 < 0.0) + num1 += 6.283185f; + for (float num2 = 0.0f; (double) num2 < 4.0; ++num2) + { + if ((double) Math.Abs(num1 - 1.570796f * num2) <= 0.785398185253143) + { + rot = 1.570796f * num2; + break; + } + } + } + } + Vector2 vector2_2 = Vector2.One; + if (Main.ThickMouse && cursorSlot == 0 || cursorSlot == 1) + vector2_2 = Main.DrawThickCursor(cursorSlot == 1); + if (flag2) + sb.Draw(TextureAssets.Cursors[cursorSlot].Value, vector2_1 + vector2_2 + Vector2.One, new Rectangle?(), color.MultiplyRGB(new Color(0.2f, 0.2f, 0.2f, 0.5f)), rot, origin, scale * 1.1f, SpriteEffects.None, 0.0f); + if (!flag3) + return; + sb.Draw(TextureAssets.Cursors[cursorSlot].Value, vector2_1 + vector2_2, new Rectangle?(), color, rot, origin, scale, SpriteEffects.None, 0.0f); + } + + public delegate bool TileActionAttempt(int x, int y); + + public delegate void LaserLineFraming( + int stage, + Vector2 currentPosition, + float distanceLeft, + Rectangle lastFrame, + out float distanceCovered, + out Rectangle frame, + out Vector2 origin, + out Color color); + + public delegate Color ColorLerpMethod(float percent); + } +} diff --git a/WaterfallManager.cs b/WaterfallManager.cs new file mode 100644 index 0000000..597ad34 --- /dev/null +++ b/WaterfallManager.cs @@ -0,0 +1,843 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WaterfallManager +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using Terraria.ID; +using Terraria.IO; + +namespace Terraria +{ + public class WaterfallManager + { + private const int minWet = 160; + private const int maxWaterfallCountDefault = 1000; + private const int maxLength = 100; + private const int maxTypes = 24; + public int maxWaterfallCount = 1000; + private int qualityMax; + private int currentMax; + private WaterfallManager.WaterfallData[] waterfalls; + private Asset[] waterfallTexture = new Asset[24]; + private int wFallFrCounter; + private int regularFrame; + private int wFallFrCounter2; + private int slowFrame; + private int rainFrameCounter; + private int rainFrameForeground; + private int rainFrameBackground; + private int snowFrameCounter; + private int snowFrameForeground; + private int findWaterfallCount; + private int waterfallDist = 100; + + public WaterfallManager() + { + this.waterfalls = new WaterfallManager.WaterfallData[1000]; + Main.Configuration.OnLoad += (Action) (preferences => + { + this.maxWaterfallCount = Math.Max(0, preferences.Get("WaterfallDrawLimit", 1000)); + this.waterfalls = new WaterfallManager.WaterfallData[this.maxWaterfallCount]; + }); + } + + public void LoadContent() + { + for (int index = 0; index < 24; ++index) + this.waterfallTexture[index] = Main.Assets.Request("Images/Waterfall_" + (object) index, (AssetRequestMode) 2); + } + + public bool CheckForWaterfall(int i, int j) + { + for (int index = 0; index < this.currentMax; ++index) + { + if (this.waterfalls[index].x == i && this.waterfalls[index].y == j) + return true; + } + return false; + } + + public void FindWaterfalls(bool forced = false) + { + ++this.findWaterfallCount; + if (this.findWaterfallCount < 30 && !forced) + return; + this.findWaterfallCount = 0; + this.waterfallDist = (int) (75.0 * (double) Main.gfxQuality) + 25; + this.qualityMax = (int) ((double) this.maxWaterfallCount * (double) Main.gfxQuality); + this.currentMax = 0; + int num1 = (int) ((double) Main.screenPosition.X / 16.0 - 1.0); + int num2 = (int) (((double) Main.screenPosition.X + (double) Main.screenWidth) / 16.0) + 2; + int num3 = (int) ((double) Main.screenPosition.Y / 16.0 - 1.0); + int num4 = (int) (((double) Main.screenPosition.Y + (double) Main.screenHeight) / 16.0) + 2; + int num5 = num1 - this.waterfallDist; + int num6 = num2 + this.waterfallDist; + int num7 = num3 - this.waterfallDist; + int num8 = num4 + 20; + if (num5 < 0) + num5 = 0; + if (num6 > Main.maxTilesX) + num6 = Main.maxTilesX; + if (num7 < 0) + num7 = 0; + if (num8 > Main.maxTilesY) + num8 = Main.maxTilesY; + for (int index1 = num5; index1 < num6; ++index1) + { + for (int index2 = num7; index2 < num8; ++index2) + { + Tile tile = Main.tile[index1, index2]; + if (tile == null) + { + tile = new Tile(); + Main.tile[index1, index2] = tile; + } + if (tile.active()) + { + if (tile.halfBrick()) + { + Tile testTile1 = Main.tile[index1, index2 - 1]; + if (testTile1 == null) + { + testTile1 = new Tile(); + Main.tile[index1, index2 - 1] = testTile1; + } + if (testTile1.liquid < (byte) 16 || WorldGen.SolidTile(testTile1)) + { + Tile testTile2 = Main.tile[index1 - 1, index2]; + if (testTile2 == null) + { + testTile2 = new Tile(); + Main.tile[index1 - 1, index2] = testTile2; + } + Tile testTile3 = Main.tile[index1 + 1, index2]; + if (testTile3 == null) + { + testTile3 = new Tile(); + Main.tile[index1 + 1, index2] = testTile3; + } + if ((testTile2.liquid > (byte) 160 || testTile3.liquid > (byte) 160) && (testTile2.liquid == (byte) 0 && !WorldGen.SolidTile(testTile2) && testTile2.slope() == (byte) 0 || testTile3.liquid == (byte) 0 && !WorldGen.SolidTile(testTile3) && testTile3.slope() == (byte) 0) && this.currentMax < this.qualityMax) + { + this.waterfalls[this.currentMax].type = 0; + this.waterfalls[this.currentMax].type = testTile1.lava() || testTile3.lava() || testTile2.lava() ? 1 : (testTile1.honey() || testTile3.honey() || testTile2.honey() ? 14 : 0); + this.waterfalls[this.currentMax].x = index1; + this.waterfalls[this.currentMax].y = index2; + ++this.currentMax; + } + } + } + if (tile.type == (ushort) 196) + { + Tile testTile = Main.tile[index1, index2 + 1]; + if (testTile == null) + { + testTile = new Tile(); + Main.tile[index1, index2 + 1] = testTile; + } + if (!WorldGen.SolidTile(testTile) && testTile.slope() == (byte) 0 && this.currentMax < this.qualityMax) + { + this.waterfalls[this.currentMax].type = 11; + this.waterfalls[this.currentMax].x = index1; + this.waterfalls[this.currentMax].y = index2 + 1; + ++this.currentMax; + } + } + if (tile.type == (ushort) 460) + { + Tile testTile = Main.tile[index1, index2 + 1]; + if (testTile == null) + { + testTile = new Tile(); + Main.tile[index1, index2 + 1] = testTile; + } + if (!WorldGen.SolidTile(testTile) && testTile.slope() == (byte) 0 && this.currentMax < this.qualityMax) + { + this.waterfalls[this.currentMax].type = 22; + this.waterfalls[this.currentMax].x = index1; + this.waterfalls[this.currentMax].y = index2 + 1; + ++this.currentMax; + } + } + } + } + } + } + + public void UpdateFrame() + { + ++this.wFallFrCounter; + if (this.wFallFrCounter > 2) + { + this.wFallFrCounter = 0; + ++this.regularFrame; + if (this.regularFrame > 15) + this.regularFrame = 0; + } + ++this.wFallFrCounter2; + if (this.wFallFrCounter2 > 6) + { + this.wFallFrCounter2 = 0; + ++this.slowFrame; + if (this.slowFrame > 15) + this.slowFrame = 0; + } + ++this.rainFrameCounter; + if (this.rainFrameCounter > 0) + { + ++this.rainFrameForeground; + if (this.rainFrameForeground > 7) + this.rainFrameForeground -= 8; + if (this.rainFrameCounter > 2) + { + this.rainFrameCounter = 0; + --this.rainFrameBackground; + if (this.rainFrameBackground < 0) + this.rainFrameBackground = 7; + } + } + if (++this.snowFrameCounter <= 3) + return; + this.snowFrameCounter = 0; + if (++this.snowFrameForeground <= 7) + return; + this.snowFrameForeground = 0; + } + + private void DrawWaterfall(SpriteBatch spriteBatch, int Style = 0, float Alpha = 1f) + { + Main.tileSolid[546] = false; + float num1 = 0.0f; + float num2 = 99999f; + float num3 = 99999f; + int num4 = -1; + int num5 = -1; + float num6 = 0.0f; + float num7 = 99999f; + float num8 = 99999f; + int num9 = -1; + int num10 = -1; + for (int index1 = 0; index1 < this.currentMax; ++index1) + { + int num11 = 0; + int index2 = this.waterfalls[index1].type; + int x1 = this.waterfalls[index1].x; + int y = this.waterfalls[index1].y; + int num12 = 0; + int num13 = 0; + int num14 = 0; + int num15 = 0; + int num16 = 0; + int index3 = 0; + int x2; + switch (index2) + { + case 0: + index2 = Style; + goto default; + case 1: + case 14: + if (!Main.drewLava && this.waterfalls[index1].stopAtStep != 0) + { + x2 = 32 * this.slowFrame; + break; + } + continue; + case 2: + if (Main.drewLava) + continue; + goto default; + case 11: + case 22: + if (!Main.drewLava) + { + int num17 = this.waterfallDist / 4; + if (index2 == 22) + num17 = this.waterfallDist / 2; + if (this.waterfalls[index1].stopAtStep > num17) + this.waterfalls[index1].stopAtStep = num17; + if (this.waterfalls[index1].stopAtStep != 0 && (double) (y + num17) >= (double) Main.screenPosition.Y / 16.0 && (double) x1 >= (double) Main.screenPosition.X / 16.0 - 20.0 && (double) x1 <= ((double) Main.screenPosition.X + (double) Main.screenWidth) / 16.0 + 20.0) + { + int num18; + int num19; + if (x1 % 2 == 0) + { + num18 = this.rainFrameForeground + 3; + if (num18 > 7) + num18 -= 8; + num19 = this.rainFrameBackground + 2; + if (num19 > 7) + num19 -= 8; + if (index2 == 22) + { + num18 = this.snowFrameForeground + 3; + if (num18 > 7) + num18 -= 8; + } + } + else + { + num18 = this.rainFrameForeground; + num19 = this.rainFrameBackground; + if (index2 == 22) + num18 = this.snowFrameForeground; + } + Rectangle rectangle1 = new Rectangle(num19 * 18, 0, 16, 16); + Rectangle rectangle2 = new Rectangle(num18 * 18, 0, 16, 16); + Vector2 origin = new Vector2(8f, 8f); + Vector2 position = y % 2 != 0 ? new Vector2((float) (x1 * 16 + 8), (float) (y * 16 + 8)) - Main.screenPosition : new Vector2((float) (x1 * 16 + 9), (float) (y * 16 + 8)) - Main.screenPosition; + Tile tile = Main.tile[x1, y - 1]; + if (tile.active() && tile.bottomSlope()) + position.Y -= 16f; + bool flag = false; + float rotation = 0.0f; + for (int index4 = 0; index4 < num17; ++index4) + { + Color color1 = Lighting.GetColor(x1, y); + float num20 = 0.6f; + float num21 = 0.3f; + if (index4 > num17 - 8) + { + float num22 = (float) (num17 - index4) / 8f; + num20 *= num22; + num21 *= num22; + } + Color color2 = color1 * num20; + Color color3 = color1 * num21; + if (index2 == 22) + { + spriteBatch.Draw(this.waterfallTexture[22].Value, position, new Rectangle?(rectangle2), color2, 0.0f, origin, 1f, SpriteEffects.None, 0.0f); + } + else + { + spriteBatch.Draw(this.waterfallTexture[12].Value, position, new Rectangle?(rectangle1), color3, rotation, origin, 1f, SpriteEffects.None, 0.0f); + spriteBatch.Draw(this.waterfallTexture[11].Value, position, new Rectangle?(rectangle2), color2, rotation, origin, 1f, SpriteEffects.None, 0.0f); + } + if (!flag) + { + ++y; + Tile testTile = Main.tile[x1, y]; + if (WorldGen.SolidTile(testTile)) + flag = true; + if (testTile.liquid > (byte) 0) + { + int num23 = (int) (16.0 * ((double) testTile.liquid / (double) byte.MaxValue)) & 254; + if (num23 < 15) + { + rectangle2.Height -= num23; + rectangle1.Height -= num23; + } + else + break; + } + if (y % 2 == 0) + ++position.X; + else + --position.X; + position.Y += 16f; + } + else + break; + } + this.waterfalls[index1].stopAtStep = 0; + continue; + } + continue; + } + continue; + default: + x2 = 32 * this.regularFrame; + break; + } + int num24 = 0; + int num25 = this.waterfallDist; + Color color4 = Color.White; + for (int index5 = 0; index5 < num25; ++index5) + { + if (num24 < 2) + { + switch (index2) + { + case 1: + double num26; + float r1 = (float) (num26 = (0.550000011920929 + (double) (270 - (int) Main.mouseTextColor) / 900.0) * 0.400000005960464); + float g1 = (float) (num26 * 0.300000011920929); + float b1 = (float) (num26 * 0.100000001490116); + Lighting.AddLight(x1, y, r1, g1, b1); + break; + case 2: + float num27 = (float) Main.DiscoR / (float) byte.MaxValue; + float num28 = (float) Main.DiscoG / (float) byte.MaxValue; + float num29 = (float) Main.DiscoB / (float) byte.MaxValue; + float r2 = num27 * 0.2f; + float g2 = num28 * 0.2f; + float b2 = num29 * 0.2f; + Lighting.AddLight(x1, y, r2, g2, b2); + break; + case 15: + float r3 = 0.0f; + float g3 = 0.0f; + float b3 = 0.2f; + Lighting.AddLight(x1, y, r3, g3, b3); + break; + case 16: + float r4 = 0.0f; + float g4 = 0.2f; + float b4 = 0.0f; + Lighting.AddLight(x1, y, r4, g4, b4); + break; + case 17: + float r5 = 0.0f; + float g5 = 0.0f; + float b5 = 0.2f; + Lighting.AddLight(x1, y, r5, g5, b5); + break; + case 18: + float r6 = 0.0f; + float g6 = 0.2f; + float b6 = 0.0f; + Lighting.AddLight(x1, y, r6, g6, b6); + break; + case 19: + float r7 = 0.2f; + float g7 = 0.0f; + float b7 = 0.0f; + Lighting.AddLight(x1, y, r7, g7, b7); + break; + case 20: + Lighting.AddLight(x1, y, 0.2f, 0.2f, 0.2f); + break; + case 21: + float r8 = 0.2f; + float g8 = 0.0f; + float b8 = 0.0f; + Lighting.AddLight(x1, y, r8, g8, b8); + break; + } + Tile tile = Main.tile[x1, y]; + if (tile == null) + { + tile = new Tile(); + Main.tile[x1, y] = tile; + } + if (!tile.nactive() || !Main.tileSolid[(int) tile.type] || Main.tileSolidTop[(int) tile.type] || TileID.Sets.Platforms[(int) tile.type] || tile.blockType() != 0) + { + Tile testTile1 = Main.tile[x1 - 1, y]; + if (testTile1 == null) + { + testTile1 = new Tile(); + Main.tile[x1 - 1, y] = testTile1; + } + Tile testTile2 = Main.tile[x1, y + 1]; + if (testTile2 == null) + { + testTile2 = new Tile(); + Main.tile[x1, y + 1] = testTile2; + } + Tile testTile3 = Main.tile[x1 + 1, y]; + if (testTile3 == null) + { + testTile3 = new Tile(); + Main.tile[x1 + 1, y] = testTile3; + } + int num30 = (int) tile.liquid / 16; + int num31 = 0; + int num32 = num15; + int num33; + int num34; + if (testTile2.topSlope() && !tile.halfBrick() && testTile2.type != (ushort) 19) + { + if (testTile2.slope() == (byte) 1) + { + num31 = 1; + num33 = 1; + num14 = 1; + num15 = num14; + } + else + { + num31 = -1; + num33 = -1; + num14 = -1; + num15 = num14; + } + num34 = 1; + } + else if (!WorldGen.SolidTile(testTile2) && !testTile2.bottomSlope() && !tile.halfBrick() || !testTile2.active() && !tile.halfBrick()) + { + num24 = 0; + num34 = 1; + num33 = 0; + } + else if ((WorldGen.SolidTile(testTile1) || testTile1.topSlope() || testTile1.liquid > (byte) 0) && !WorldGen.SolidTile(testTile3) && testTile3.liquid == (byte) 0) + { + if (num14 == -1) + ++num24; + num33 = 1; + num34 = 0; + num14 = 1; + } + else if ((WorldGen.SolidTile(testTile3) || testTile3.topSlope() || testTile3.liquid > (byte) 0) && !WorldGen.SolidTile(testTile1) && testTile1.liquid == (byte) 0) + { + if (num14 == 1) + ++num24; + num33 = -1; + num34 = 0; + num14 = -1; + } + else if ((!WorldGen.SolidTile(testTile3) && !tile.topSlope() || testTile3.liquid == (byte) 0) && !WorldGen.SolidTile(testTile1) && !tile.topSlope() && testTile1.liquid == (byte) 0) + { + num34 = 0; + num33 = num14; + } + else + { + ++num24; + num34 = 0; + num33 = 0; + } + if (num24 >= 2) + { + num14 *= -1; + num33 *= -1; + } + int num35 = -1; + if (index2 != 1 && index2 != 14) + { + if (testTile2.active()) + num35 = (int) testTile2.type; + if (tile.active()) + num35 = (int) tile.type; + } + switch (num35) + { + case 160: + index2 = 2; + break; + case 262: + case 263: + case 264: + case 265: + case 266: + case 267: + case 268: + index2 = 15 + num35 - 262; + break; + } + if (WorldGen.SolidTile(testTile2) && !tile.halfBrick()) + num11 = 8; + else if (num13 != 0) + num11 = 0; + Color color5 = Lighting.GetColor(x1, y); + Color color6 = color5; + float num36; + switch (index2) + { + case 1: + num36 = 1f; + break; + case 14: + num36 = 0.8f; + break; + default: + num36 = tile.wall != (ushort) 0 || (double) y >= Main.worldSurface ? 0.6f * Alpha : Alpha; + break; + } + if (index5 > num25 - 10) + num36 *= (float) (num25 - index5) / 10f; + float num37 = (float) color5.R * num36; + float num38 = (float) color5.G * num36; + float num39 = (float) color5.B * num36; + float num40 = (float) color5.A * num36; + switch (index2) + { + case 1: + if ((double) num37 < 190.0 * (double) num36) + num37 = 190f * num36; + if ((double) num38 < 190.0 * (double) num36) + num38 = 190f * num36; + if ((double) num39 < 190.0 * (double) num36) + { + num39 = 190f * num36; + break; + } + break; + case 2: + num37 = (float) Main.DiscoR * num36; + num38 = (float) Main.DiscoG * num36; + num39 = (float) Main.DiscoB * num36; + break; + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + num37 = (float) byte.MaxValue * num36; + num38 = (float) byte.MaxValue * num36; + num39 = (float) byte.MaxValue * num36; + break; + } + color5 = new Color((int) num37, (int) num38, (int) num39, (int) num40); + if (index2 == 1) + { + float num41 = Math.Abs((float) (x1 * 16 + 8) - (Main.screenPosition.X + (float) (Main.screenWidth / 2))); + float num42 = Math.Abs((float) (y * 16 + 8) - (Main.screenPosition.Y + (float) (Main.screenHeight / 2))); + if ((double) num41 < (double) (Main.screenWidth * 2) && (double) num42 < (double) (Main.screenHeight * 2)) + { + float num43 = (float) (1.0 - Math.Sqrt((double) num41 * (double) num41 + (double) num42 * (double) num42) / ((double) Main.screenWidth * 0.75)); + if ((double) num43 > 0.0) + num6 += num43; + } + if ((double) num41 < (double) num7) + { + num7 = num41; + num9 = x1 * 16 + 8; + } + if ((double) num42 < (double) num8) + { + num8 = num41; + num10 = y * 16 + 8; + } + } + else if (index2 != 1 && index2 != 14 && index2 != 11 && index2 != 12 && index2 != 22) + { + float num44 = Math.Abs((float) (x1 * 16 + 8) - (Main.screenPosition.X + (float) (Main.screenWidth / 2))); + float num45 = Math.Abs((float) (y * 16 + 8) - (Main.screenPosition.Y + (float) (Main.screenHeight / 2))); + if ((double) num44 < (double) (Main.screenWidth * 2) && (double) num45 < (double) (Main.screenHeight * 2)) + { + float num46 = (float) (1.0 - Math.Sqrt((double) num44 * (double) num44 + (double) num45 * (double) num45) / ((double) Main.screenWidth * 0.75)); + if ((double) num46 > 0.0) + num1 += num46; + } + if ((double) num44 < (double) num2) + { + num2 = num44; + num4 = x1 * 16 + 8; + } + if ((double) num45 < (double) num3) + { + num3 = num44; + num5 = y * 16 + 8; + } + } + if (index5 > 50 && (color6.R > (byte) 20 || color6.B > (byte) 20 || color6.G > (byte) 20)) + { + float num47 = (float) color6.R; + if ((double) color6.G > (double) num47) + num47 = (float) color6.G; + if ((double) color6.B > (double) num47) + num47 = (float) color6.B; + if ((double) Main.rand.Next(20000) < (double) num47 / 30.0) + { + int index6 = Dust.NewDust(new Vector2((float) (x1 * 16 - num14 * 7), (float) (y * 16 + 6)), 10, 8, 43, Alpha: 254, newColor: Color.White, Scale: 0.5f); + Main.dust[index6].velocity *= 0.0f; + } + } + if (num12 == 0 && num31 != 0 && num13 == 1 && num14 != num15) + { + num31 = 0; + num14 = num15; + color5 = Color.White; + if (num14 == 1) + spriteBatch.Draw(this.waterfallTexture[index2].Value, new Vector2((float) (x1 * 16 - 16), (float) (y * 16 + 16)) - Main.screenPosition, new Rectangle?(new Rectangle(x2, 24, 32, 16 - num30)), color5, 0.0f, Vector2.Zero, 1f, SpriteEffects.FlipHorizontally, 0.0f); + else + spriteBatch.Draw(this.waterfallTexture[index2].Value, new Vector2((float) (x1 * 16 - 16), (float) (y * 16 + 16)) - Main.screenPosition, new Rectangle?(new Rectangle(x2, 24, 32, 8)), color5, 0.0f, Vector2.Zero, 1f, SpriteEffects.FlipHorizontally, 0.0f); + } + if (num16 != 0 && num33 == 0 && num34 == 1) + { + if (num14 == 1) + { + if (index3 != index2) + spriteBatch.Draw(this.waterfallTexture[index3].Value, new Vector2((float) (x1 * 16), (float) (y * 16 + num11 + 8)) - Main.screenPosition, new Rectangle?(new Rectangle(x2, 0, 16, 16 - num30 - 8)), color4, 0.0f, Vector2.Zero, 1f, SpriteEffects.FlipHorizontally, 0.0f); + else + spriteBatch.Draw(this.waterfallTexture[index2].Value, new Vector2((float) (x1 * 16), (float) (y * 16 + num11 + 8)) - Main.screenPosition, new Rectangle?(new Rectangle(x2, 0, 16, 16 - num30 - 8)), color5, 0.0f, Vector2.Zero, 1f, SpriteEffects.FlipHorizontally, 0.0f); + } + else + spriteBatch.Draw(this.waterfallTexture[index2].Value, new Vector2((float) (x1 * 16), (float) (y * 16 + num11 + 8)) - Main.screenPosition, new Rectangle?(new Rectangle(x2, 0, 16, 16 - num30 - 8)), color5, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); + } + if (num11 == 8 && num13 == 1 && num16 == 0) + { + if (num15 == -1) + { + if (index3 != index2) + spriteBatch.Draw(this.waterfallTexture[index3].Value, new Vector2((float) (x1 * 16), (float) (y * 16)) - Main.screenPosition, new Rectangle?(new Rectangle(x2, 24, 32, 8)), color4, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + else + spriteBatch.Draw(this.waterfallTexture[index2].Value, new Vector2((float) (x1 * 16), (float) (y * 16)) - Main.screenPosition, new Rectangle?(new Rectangle(x2, 24, 32, 8)), color5, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + else if (index3 != index2) + spriteBatch.Draw(this.waterfallTexture[index3].Value, new Vector2((float) (x1 * 16 - 16), (float) (y * 16)) - Main.screenPosition, new Rectangle?(new Rectangle(x2, 24, 32, 8)), color4, 0.0f, new Vector2(), 1f, SpriteEffects.FlipHorizontally, 0.0f); + else + spriteBatch.Draw(this.waterfallTexture[index2].Value, new Vector2((float) (x1 * 16 - 16), (float) (y * 16)) - Main.screenPosition, new Rectangle?(new Rectangle(x2, 24, 32, 8)), color5, 0.0f, new Vector2(), 1f, SpriteEffects.FlipHorizontally, 0.0f); + } + if (num31 != 0 && num12 == 0) + { + if (num32 == 1) + { + if (index3 != index2) + spriteBatch.Draw(this.waterfallTexture[index3].Value, new Vector2((float) (x1 * 16 - 16), (float) (y * 16)) - Main.screenPosition, new Rectangle?(new Rectangle(x2, 24, 32, 16 - num30)), color4, 0.0f, new Vector2(), 1f, SpriteEffects.FlipHorizontally, 0.0f); + else + spriteBatch.Draw(this.waterfallTexture[index2].Value, new Vector2((float) (x1 * 16 - 16), (float) (y * 16)) - Main.screenPosition, new Rectangle?(new Rectangle(x2, 24, 32, 16 - num30)), color5, 0.0f, new Vector2(), 1f, SpriteEffects.FlipHorizontally, 0.0f); + } + else if (index3 != index2) + spriteBatch.Draw(this.waterfallTexture[index3].Value, new Vector2((float) (x1 * 16), (float) (y * 16)) - Main.screenPosition, new Rectangle?(new Rectangle(x2, 24, 32, 16 - num30)), color4, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + else + spriteBatch.Draw(this.waterfallTexture[index2].Value, new Vector2((float) (x1 * 16), (float) (y * 16)) - Main.screenPosition, new Rectangle?(new Rectangle(x2, 24, 32, 16 - num30)), color5, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + if (num34 == 1 && num31 == 0 && num16 == 0) + { + if (num14 == -1) + { + if (num13 == 0) + spriteBatch.Draw(this.waterfallTexture[index2].Value, new Vector2((float) (x1 * 16), (float) (y * 16 + num11)) - Main.screenPosition, new Rectangle?(new Rectangle(x2, 0, 16, 16 - num30)), color5, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + else if (index3 != index2) + spriteBatch.Draw(this.waterfallTexture[index3].Value, new Vector2((float) (x1 * 16), (float) (y * 16)) - Main.screenPosition, new Rectangle?(new Rectangle(x2, 24, 32, 16 - num30)), color4, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + else + spriteBatch.Draw(this.waterfallTexture[index2].Value, new Vector2((float) (x1 * 16), (float) (y * 16)) - Main.screenPosition, new Rectangle?(new Rectangle(x2, 24, 32, 16 - num30)), color5, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + } + else if (num13 == 0) + spriteBatch.Draw(this.waterfallTexture[index2].Value, new Vector2((float) (x1 * 16), (float) (y * 16 + num11)) - Main.screenPosition, new Rectangle?(new Rectangle(x2, 0, 16, 16 - num30)), color5, 0.0f, new Vector2(), 1f, SpriteEffects.FlipHorizontally, 0.0f); + else if (index3 != index2) + spriteBatch.Draw(this.waterfallTexture[index3].Value, new Vector2((float) (x1 * 16 - 16), (float) (y * 16)) - Main.screenPosition, new Rectangle?(new Rectangle(x2, 24, 32, 16 - num30)), color4, 0.0f, new Vector2(), 1f, SpriteEffects.FlipHorizontally, 0.0f); + else + spriteBatch.Draw(this.waterfallTexture[index2].Value, new Vector2((float) (x1 * 16 - 16), (float) (y * 16)) - Main.screenPosition, new Rectangle?(new Rectangle(x2, 24, 32, 16 - num30)), color5, 0.0f, new Vector2(), 1f, SpriteEffects.FlipHorizontally, 0.0f); + } + else + { + switch (num33) + { + case -1: + if (Main.tile[x1, y].liquid <= (byte) 0 || Main.tile[x1, y].halfBrick()) + { + if (num31 == -1) + { + for (int index7 = 0; index7 < 8; ++index7) + { + int num48 = index7 * 2; + int num49 = index7 * 2; + int num50 = 14 - index7 * 2; + num11 = 8; + if (num12 == 0 && index7 > 5) + num50 = 4; + spriteBatch.Draw(this.waterfallTexture[index2].Value, new Vector2((float) (x1 * 16 + num48), (float) (y * 16 + num11 + num50)) - Main.screenPosition, new Rectangle?(new Rectangle(16 + x2 + num49, 0, 2, 16 - num11)), color5, 0.0f, new Vector2(), 1f, SpriteEffects.FlipHorizontally, 0.0f); + } + break; + } + int height = 16; + if (TileID.Sets.BlocksWaterDrawingBehindSelf[(int) Main.tile[x1, y].type]) + height = 8; + else if (TileID.Sets.BlocksWaterDrawingBehindSelf[(int) Main.tile[x1, y + 1].type]) + height = 8; + spriteBatch.Draw(this.waterfallTexture[index2].Value, new Vector2((float) (x1 * 16), (float) (y * 16 + num11)) - Main.screenPosition, new Rectangle?(new Rectangle(16 + x2, 0, 16, height)), color5, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + break; + } + break; + case 0: + if (num34 == 0) + { + if (Main.tile[x1, y].liquid <= (byte) 0 || Main.tile[x1, y].halfBrick()) + spriteBatch.Draw(this.waterfallTexture[index2].Value, new Vector2((float) (x1 * 16), (float) (y * 16 + num11)) - Main.screenPosition, new Rectangle?(new Rectangle(16 + x2, 0, 16, 16)), color5, 0.0f, new Vector2(), 1f, SpriteEffects.None, 0.0f); + index5 = 1000; + break; + } + break; + case 1: + if (Main.tile[x1, y].liquid <= (byte) 0 || Main.tile[x1, y].halfBrick()) + { + if (num31 == 1) + { + for (int index8 = 0; index8 < 8; ++index8) + { + int num51 = index8 * 2; + int num52 = 14 - index8 * 2; + int num53 = num51; + num11 = 8; + if (num12 == 0 && index8 < 2) + num53 = 4; + spriteBatch.Draw(this.waterfallTexture[index2].Value, new Vector2((float) (x1 * 16 + num51), (float) (y * 16 + num11 + num53)) - Main.screenPosition, new Rectangle?(new Rectangle(16 + x2 + num52, 0, 2, 16 - num11)), color5, 0.0f, new Vector2(), 1f, SpriteEffects.FlipHorizontally, 0.0f); + } + break; + } + int height = 16; + if (TileID.Sets.BlocksWaterDrawingBehindSelf[(int) Main.tile[x1, y].type]) + height = 8; + else if (TileID.Sets.BlocksWaterDrawingBehindSelf[(int) Main.tile[x1, y + 1].type]) + height = 8; + spriteBatch.Draw(this.waterfallTexture[index2].Value, new Vector2((float) (x1 * 16), (float) (y * 16 + num11)) - Main.screenPosition, new Rectangle?(new Rectangle(16 + x2, 0, 16, height)), color5, 0.0f, new Vector2(), 1f, SpriteEffects.FlipHorizontally, 0.0f); + break; + } + break; + } + } + if (tile.liquid > (byte) 0 && !tile.halfBrick()) + index5 = 1000; + num13 = num34; + num15 = num14; + num12 = num33; + x1 += num33; + y += num34; + num16 = num31; + color4 = color5; + if (index3 != index2) + index3 = index2; + if (testTile1.active() && (testTile1.type == (ushort) 189 || testTile1.type == (ushort) 196) || testTile3.active() && (testTile3.type == (ushort) 189 || testTile3.type == (ushort) 196) || testTile2.active() && (testTile2.type == (ushort) 189 || testTile2.type == (ushort) 196)) + num25 = (int) ((double) (40 * (Main.maxTilesX / 4200)) * (double) Main.gfxQuality); + } + else + break; + } + } + } + Main.ambientWaterfallX = (float) num4; + Main.ambientWaterfallY = (float) num5; + Main.ambientWaterfallStrength = num1; + Main.ambientLavafallX = (float) num9; + Main.ambientLavafallY = (float) num10; + Main.ambientLavafallStrength = num6; + Main.tileSolid[546] = true; + } + + public void Draw(SpriteBatch spriteBatch) + { + for (int index = 0; index < this.currentMax; ++index) + this.waterfalls[index].stopAtStep = this.waterfallDist; + Main.drewLava = false; + if ((double) Main.liquidAlpha[0] > 0.0) + this.DrawWaterfall(spriteBatch, Alpha: Main.liquidAlpha[0]); + if ((double) Main.liquidAlpha[2] > 0.0) + this.DrawWaterfall(spriteBatch, 3, Main.liquidAlpha[2]); + if ((double) Main.liquidAlpha[3] > 0.0) + this.DrawWaterfall(spriteBatch, 4, Main.liquidAlpha[3]); + if ((double) Main.liquidAlpha[4] > 0.0) + this.DrawWaterfall(spriteBatch, 5, Main.liquidAlpha[4]); + if ((double) Main.liquidAlpha[5] > 0.0) + this.DrawWaterfall(spriteBatch, 6, Main.liquidAlpha[5]); + if ((double) Main.liquidAlpha[6] > 0.0) + this.DrawWaterfall(spriteBatch, 7, Main.liquidAlpha[6]); + if ((double) Main.liquidAlpha[7] > 0.0) + this.DrawWaterfall(spriteBatch, 8, Main.liquidAlpha[7]); + if ((double) Main.liquidAlpha[8] > 0.0) + this.DrawWaterfall(spriteBatch, 9, Main.liquidAlpha[8]); + if ((double) Main.liquidAlpha[9] > 0.0) + this.DrawWaterfall(spriteBatch, 10, Main.liquidAlpha[9]); + if ((double) Main.liquidAlpha[10] > 0.0) + this.DrawWaterfall(spriteBatch, 13, Main.liquidAlpha[10]); + if ((double) Main.liquidAlpha[12] <= 0.0) + return; + this.DrawWaterfall(spriteBatch, 23, Main.liquidAlpha[12]); + } + + public struct WaterfallData + { + public int x; + public int y; + public int type; + public int stopAtStep; + } + } +} diff --git a/WindowsLaunch.cs b/WindowsLaunch.cs new file mode 100644 index 0000000..5600a52 --- /dev/null +++ b/WindowsLaunch.cs @@ -0,0 +1,76 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WindowsLaunch +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using System.IO; +using System.Reflection; +using System.Runtime.InteropServices; +using Terraria.Social; + +namespace Terraria +{ + public static class WindowsLaunch + { + private static WindowsLaunch.HandlerRoutine _handleRoutine; + + private static bool ConsoleCtrlCheck(WindowsLaunch.CtrlTypes ctrlType) + { + bool flag = false; + switch (ctrlType) + { + case WindowsLaunch.CtrlTypes.CTRL_C_EVENT: + flag = true; + break; + case WindowsLaunch.CtrlTypes.CTRL_BREAK_EVENT: + flag = true; + break; + case WindowsLaunch.CtrlTypes.CTRL_CLOSE_EVENT: + flag = true; + break; + case WindowsLaunch.CtrlTypes.CTRL_LOGOFF_EVENT: + case WindowsLaunch.CtrlTypes.CTRL_SHUTDOWN_EVENT: + flag = true; + break; + } + if (flag) + SocialAPI.Shutdown(); + return true; + } + + [DllImport("Kernel32")] + public static extern bool SetConsoleCtrlHandler(WindowsLaunch.HandlerRoutine handler, bool add); + + [STAThread] + private static void Main(string[] args) + { + AppDomain.CurrentDomain.AssemblyResolve += (ResolveEventHandler) ((sender, sargs) => + { + string resourceName = new AssemblyName(sargs.Name).Name + ".dll"; + string name = Array.Find(typeof (Program).Assembly.GetManifestResourceNames(), (Predicate) (element => element.EndsWith(resourceName))); + if (name == null) + return (Assembly) null; + using (Stream manifestResourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(name)) + { + byte[] numArray = new byte[manifestResourceStream.Length]; + manifestResourceStream.Read(numArray, 0, numArray.Length); + return Assembly.Load(numArray); + } + }); + Program.LaunchGame(args); + } + + public delegate bool HandlerRoutine(WindowsLaunch.CtrlTypes ctrlType); + + public enum CtrlTypes + { + CTRL_C_EVENT = 0, + CTRL_BREAK_EVENT = 1, + CTRL_CLOSE_EVENT = 2, + CTRL_LOGOFF_EVENT = 5, + CTRL_SHUTDOWN_EVENT = 6, + } + } +} diff --git a/Wiring.cs b/Wiring.cs new file mode 100644 index 0000000..f8f9c9f --- /dev/null +++ b/Wiring.cs @@ -0,0 +1,2555 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.Wiring +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.GameContent.Events; +using Terraria.GameContent.UI; +using Terraria.ID; +using Terraria.Localization; + +namespace Terraria +{ + public static class Wiring + { + public static bool blockPlayerTeleportationForOneIteration; + public static bool running; + private static Dictionary _wireSkip; + private static DoubleStack _wireList; + private static DoubleStack _wireDirectionList; + private static Dictionary _toProcess; + private static Queue _GatesCurrent; + private static Queue _LampsToCheck; + private static Queue _GatesNext; + private static Dictionary _GatesDone; + private static Dictionary _PixelBoxTriggers; + private static Vector2[] _teleport; + private const int MaxPump = 20; + private static int[] _inPumpX; + private static int[] _inPumpY; + private static int _numInPump; + private static int[] _outPumpX; + private static int[] _outPumpY; + private static int _numOutPump; + private const int MaxMech = 1000; + private static int[] _mechX; + private static int[] _mechY; + private static int _numMechs; + private static int[] _mechTime; + private static int _currentWireColor; + private static int CurrentUser = (int) byte.MaxValue; + + public static void SetCurrentUser(int plr = -1) + { + if (plr < 0 || plr > (int) byte.MaxValue) + plr = (int) byte.MaxValue; + if (Main.netMode == 0) + plr = Main.myPlayer; + Wiring.CurrentUser = plr; + } + + public static void Initialize() + { + Wiring._wireSkip = new Dictionary(); + Wiring._wireList = new DoubleStack(); + Wiring._wireDirectionList = new DoubleStack(); + Wiring._toProcess = new Dictionary(); + Wiring._GatesCurrent = new Queue(); + Wiring._GatesNext = new Queue(); + Wiring._GatesDone = new Dictionary(); + Wiring._LampsToCheck = new Queue(); + Wiring._PixelBoxTriggers = new Dictionary(); + Wiring._inPumpX = new int[20]; + Wiring._inPumpY = new int[20]; + Wiring._outPumpX = new int[20]; + Wiring._outPumpY = new int[20]; + Wiring._teleport = new Vector2[2]; + Wiring._mechX = new int[1000]; + Wiring._mechY = new int[1000]; + Wiring._mechTime = new int[1000]; + } + + public static void SkipWire(int x, int y) => Wiring._wireSkip[new Point16(x, y)] = true; + + public static void SkipWire(Point16 point) => Wiring._wireSkip[point] = true; + + public static void UpdateMech() + { + Wiring.SetCurrentUser(); + for (int index1 = Wiring._numMechs - 1; index1 >= 0; --index1) + { + --Wiring._mechTime[index1]; + if (Main.tile[Wiring._mechX[index1], Wiring._mechY[index1]].active() && Main.tile[Wiring._mechX[index1], Wiring._mechY[index1]].type == (ushort) 144) + { + if (Main.tile[Wiring._mechX[index1], Wiring._mechY[index1]].frameY == (short) 0) + { + Wiring._mechTime[index1] = 0; + } + else + { + int num = (int) Main.tile[Wiring._mechX[index1], Wiring._mechY[index1]].frameX / 18; + switch (num) + { + case 0: + num = 60; + break; + case 1: + num = 180; + break; + case 2: + num = 300; + break; + case 3: + num = 30; + break; + case 4: + num = 15; + break; + } + if (Math.IEEERemainder((double) Wiring._mechTime[index1], (double) num) == 0.0) + { + Wiring._mechTime[index1] = 18000; + Wiring.TripWire(Wiring._mechX[index1], Wiring._mechY[index1], 1, 1); + } + } + } + if (Wiring._mechTime[index1] <= 0) + { + if (Main.tile[Wiring._mechX[index1], Wiring._mechY[index1]].active() && Main.tile[Wiring._mechX[index1], Wiring._mechY[index1]].type == (ushort) 144) + { + Main.tile[Wiring._mechX[index1], Wiring._mechY[index1]].frameY = (short) 0; + NetMessage.SendTileSquare(-1, Wiring._mechX[index1], Wiring._mechY[index1], 1); + } + if (Main.tile[Wiring._mechX[index1], Wiring._mechY[index1]].active() && Main.tile[Wiring._mechX[index1], Wiring._mechY[index1]].type == (ushort) 411) + { + Tile tile = Main.tile[Wiring._mechX[index1], Wiring._mechY[index1]]; + int num1 = (int) tile.frameX % 36 / 18; + int num2 = (int) tile.frameY % 36 / 18; + int tileX = Wiring._mechX[index1] - num1; + int tileY = Wiring._mechY[index1] - num2; + int num3 = 36; + if (Main.tile[tileX, tileY].frameX >= (short) 36) + num3 = -36; + for (int index2 = tileX; index2 < tileX + 2; ++index2) + { + for (int index3 = tileY; index3 < tileY + 2; ++index3) + Main.tile[index2, index3].frameX += (short) num3; + } + NetMessage.SendTileSquare(-1, tileX, tileY, 2); + } + for (int index4 = index1; index4 < Wiring._numMechs; ++index4) + { + Wiring._mechX[index4] = Wiring._mechX[index4 + 1]; + Wiring._mechY[index4] = Wiring._mechY[index4 + 1]; + Wiring._mechTime[index4] = Wiring._mechTime[index4 + 1]; + } + --Wiring._numMechs; + } + } + } + + public static void HitSwitch(int i, int j) + { + if (!WorldGen.InWorld(i, j) || Main.tile[i, j] == null) + return; + if (Main.tile[i, j].type == (ushort) 135 || Main.tile[i, j].type == (ushort) 314 || Main.tile[i, j].type == (ushort) 423 || Main.tile[i, j].type == (ushort) 428 || Main.tile[i, j].type == (ushort) 442 || Main.tile[i, j].type == (ushort) 476) + { + SoundEngine.PlaySound(28, i * 16, j * 16, 0); + Wiring.TripWire(i, j, 1, 1); + } + else if (Main.tile[i, j].type == (ushort) 440) + { + SoundEngine.PlaySound(28, i * 16 + 16, j * 16 + 16, 0); + Wiring.TripWire(i, j, 3, 3); + } + else if (Main.tile[i, j].type == (ushort) 136) + { + Main.tile[i, j].frameY = Main.tile[i, j].frameY != (short) 0 ? (short) 0 : (short) 18; + SoundEngine.PlaySound(28, i * 16, j * 16, 0); + Wiring.TripWire(i, j, 1, 1); + } + else if (Main.tile[i, j].type == (ushort) 443) + Wiring.GeyserTrap(i, j); + else if (Main.tile[i, j].type == (ushort) 144) + { + if (Main.tile[i, j].frameY == (short) 0) + { + Main.tile[i, j].frameY = (short) 18; + if (Main.netMode != 1) + Wiring.CheckMech(i, j, 18000); + } + else + Main.tile[i, j].frameY = (short) 0; + SoundEngine.PlaySound(28, i * 16, j * 16, 0); + } + else if (Main.tile[i, j].type == (ushort) 441 || Main.tile[i, j].type == (ushort) 468) + { + int num1 = (int) Main.tile[i, j].frameX / 18 * -1; + int num2 = (int) Main.tile[i, j].frameY / 18 * -1; + int num3 = num1 % 4; + if (num3 < -1) + num3 += 2; + int left = num3 + i; + int top = num2 + j; + SoundEngine.PlaySound(28, i * 16, j * 16, 0); + Wiring.TripWire(left, top, 2, 2); + } + else if (Main.tile[i, j].type == (ushort) 467) + { + if ((int) Main.tile[i, j].frameX / 36 != 4) + return; + int num4 = (int) Main.tile[i, j].frameX / 18 * -1; + int num5 = (int) Main.tile[i, j].frameY / 18 * -1; + int num6 = num4 % 4; + if (num6 < -1) + num6 += 2; + int left = num6 + i; + int top = num5 + j; + SoundEngine.PlaySound(28, i * 16, j * 16, 0); + Wiring.TripWire(left, top, 2, 2); + } + else + { + if (Main.tile[i, j].type != (ushort) 132 && Main.tile[i, j].type != (ushort) 411) + return; + short num7 = 36; + int num8 = (int) Main.tile[i, j].frameX / 18 * -1; + int num9 = (int) Main.tile[i, j].frameY / 18 * -1; + int num10 = num8 % 4; + if (num10 < -1) + { + num10 += 2; + num7 = (short) -36; + } + int index1 = num10 + i; + int index2 = num9 + j; + if (Main.netMode != 1 && Main.tile[index1, index2].type == (ushort) 411) + Wiring.CheckMech(index1, index2, 60); + for (int index3 = index1; index3 < index1 + 2; ++index3) + { + for (int index4 = index2; index4 < index2 + 2; ++index4) + { + if (Main.tile[index3, index4].type == (ushort) 132 || Main.tile[index3, index4].type == (ushort) 411) + Main.tile[index3, index4].frameX += num7; + } + } + WorldGen.TileFrame(index1, index2); + SoundEngine.PlaySound(28, i * 16, j * 16, 0); + Wiring.TripWire(index1, index2, 2, 2); + } + } + + public static void PokeLogicGate(int lampX, int lampY) + { + if (Main.netMode == 1) + return; + Wiring._LampsToCheck.Enqueue(new Point16(lampX, lampY)); + Wiring.LogicGatePass(); + } + + public static bool Actuate(int i, int j) + { + Tile tile = Main.tile[i, j]; + if (!tile.actuator()) + return false; + if (tile.inActive()) + Wiring.ReActive(i, j); + else + Wiring.DeActive(i, j); + return true; + } + + public static void ActuateForced(int i, int j) + { + if (Main.tile[i, j].inActive()) + Wiring.ReActive(i, j); + else + Wiring.DeActive(i, j); + } + + public static void MassWireOperation(Point ps, Point pe, Player master) + { + int wireCount = 0; + int actuatorCount = 0; + for (int index = 0; index < 58; ++index) + { + if (master.inventory[index].type == 530) + wireCount += master.inventory[index].stack; + if (master.inventory[index].type == 849) + actuatorCount += master.inventory[index].stack; + } + int num1 = wireCount; + int num2 = actuatorCount; + Wiring.MassWireOperationInner(ps, pe, master.Center, master.direction == 1, ref wireCount, ref actuatorCount); + int num3 = wireCount; + int num4 = num1 - num3; + int num5 = num2 - actuatorCount; + if (Main.netMode == 2) + { + NetMessage.SendData(110, master.whoAmI, number: 530, number2: ((float) num4), number3: ((float) master.whoAmI)); + NetMessage.SendData(110, master.whoAmI, number: 849, number2: ((float) num5), number3: ((float) master.whoAmI)); + } + else + { + for (int index = 0; index < num4; ++index) + master.ConsumeItem(530); + for (int index = 0; index < num5; ++index) + master.ConsumeItem(849); + } + } + + private static bool CheckMech(int i, int j, int time) + { + for (int index = 0; index < Wiring._numMechs; ++index) + { + if (Wiring._mechX[index] == i && Wiring._mechY[index] == j) + return false; + } + if (Wiring._numMechs >= 999) + return false; + Wiring._mechX[Wiring._numMechs] = i; + Wiring._mechY[Wiring._numMechs] = j; + Wiring._mechTime[Wiring._numMechs] = time; + ++Wiring._numMechs; + return true; + } + + private static void XferWater() + { + for (int index1 = 0; index1 < Wiring._numInPump; ++index1) + { + int i1 = Wiring._inPumpX[index1]; + int j1 = Wiring._inPumpY[index1]; + int liquid1 = (int) Main.tile[i1, j1].liquid; + if (liquid1 > 0) + { + bool lava = Main.tile[i1, j1].lava(); + bool honey = Main.tile[i1, j1].honey(); + for (int index2 = 0; index2 < Wiring._numOutPump; ++index2) + { + int i2 = Wiring._outPumpX[index2]; + int j2 = Wiring._outPumpY[index2]; + int liquid2 = (int) Main.tile[i2, j2].liquid; + if (liquid2 < (int) byte.MaxValue) + { + bool flag1 = Main.tile[i2, j2].lava(); + bool flag2 = Main.tile[i2, j2].honey(); + if (liquid2 == 0) + { + flag1 = lava; + flag2 = honey; + } + if (lava == flag1 && honey == flag2) + { + int num = liquid1; + if (num + liquid2 > (int) byte.MaxValue) + num = (int) byte.MaxValue - liquid2; + Main.tile[i2, j2].liquid += (byte) num; + Main.tile[i1, j1].liquid -= (byte) num; + liquid1 = (int) Main.tile[i1, j1].liquid; + Main.tile[i2, j2].lava(lava); + Main.tile[i2, j2].honey(honey); + WorldGen.SquareTileFrame(i2, j2); + if (Main.tile[i1, j1].liquid == (byte) 0) + { + Main.tile[i1, j1].lava(false); + WorldGen.SquareTileFrame(i1, j1); + break; + } + } + } + } + WorldGen.SquareTileFrame(i1, j1); + } + } + } + + private static void TripWire(int left, int top, int width, int height) + { + if (Main.netMode == 1) + return; + Wiring.running = true; + if (Wiring._wireList.Count != 0) + Wiring._wireList.Clear(true); + if (Wiring._wireDirectionList.Count != 0) + Wiring._wireDirectionList.Clear(true); + Vector2[] vector2Array1 = new Vector2[8]; + int num1 = 0; + Point16 back; + for (int X = left; X < left + width; ++X) + { + for (int Y = top; Y < top + height; ++Y) + { + back = new Point16(X, Y); + Tile tile = Main.tile[X, Y]; + if (tile != null && tile.wire()) + Wiring._wireList.PushBack(back); + } + } + Wiring._teleport[0].X = -1f; + Wiring._teleport[0].Y = -1f; + Wiring._teleport[1].X = -1f; + Wiring._teleport[1].Y = -1f; + if (Wiring._wireList.Count > 0) + { + Wiring._numInPump = 0; + Wiring._numOutPump = 0; + Wiring.HitWire(Wiring._wireList, 1); + if (Wiring._numInPump > 0 && Wiring._numOutPump > 0) + Wiring.XferWater(); + } + Vector2[] vector2Array2 = vector2Array1; + int index1 = num1; + int num2 = index1 + 1; + Vector2 vector2_1 = Wiring._teleport[0]; + vector2Array2[index1] = vector2_1; + Vector2[] vector2Array3 = vector2Array1; + int index2 = num2; + int num3 = index2 + 1; + Vector2 vector2_2 = Wiring._teleport[1]; + vector2Array3[index2] = vector2_2; + for (int X = left; X < left + width; ++X) + { + for (int Y = top; Y < top + height; ++Y) + { + back = new Point16(X, Y); + Tile tile = Main.tile[X, Y]; + if (tile != null && tile.wire2()) + Wiring._wireList.PushBack(back); + } + } + Wiring._teleport[0].X = -1f; + Wiring._teleport[0].Y = -1f; + Wiring._teleport[1].X = -1f; + Wiring._teleport[1].Y = -1f; + if (Wiring._wireList.Count > 0) + { + Wiring._numInPump = 0; + Wiring._numOutPump = 0; + Wiring.HitWire(Wiring._wireList, 2); + if (Wiring._numInPump > 0 && Wiring._numOutPump > 0) + Wiring.XferWater(); + } + Vector2[] vector2Array4 = vector2Array1; + int index3 = num3; + int num4 = index3 + 1; + Vector2 vector2_3 = Wiring._teleport[0]; + vector2Array4[index3] = vector2_3; + Vector2[] vector2Array5 = vector2Array1; + int index4 = num4; + int num5 = index4 + 1; + Vector2 vector2_4 = Wiring._teleport[1]; + vector2Array5[index4] = vector2_4; + Wiring._teleport[0].X = -1f; + Wiring._teleport[0].Y = -1f; + Wiring._teleport[1].X = -1f; + Wiring._teleport[1].Y = -1f; + for (int X = left; X < left + width; ++X) + { + for (int Y = top; Y < top + height; ++Y) + { + back = new Point16(X, Y); + Tile tile = Main.tile[X, Y]; + if (tile != null && tile.wire3()) + Wiring._wireList.PushBack(back); + } + } + if (Wiring._wireList.Count > 0) + { + Wiring._numInPump = 0; + Wiring._numOutPump = 0; + Wiring.HitWire(Wiring._wireList, 3); + if (Wiring._numInPump > 0 && Wiring._numOutPump > 0) + Wiring.XferWater(); + } + Vector2[] vector2Array6 = vector2Array1; + int index5 = num5; + int num6 = index5 + 1; + Vector2 vector2_5 = Wiring._teleport[0]; + vector2Array6[index5] = vector2_5; + Vector2[] vector2Array7 = vector2Array1; + int index6 = num6; + int num7 = index6 + 1; + Vector2 vector2_6 = Wiring._teleport[1]; + vector2Array7[index6] = vector2_6; + Wiring._teleport[0].X = -1f; + Wiring._teleport[0].Y = -1f; + Wiring._teleport[1].X = -1f; + Wiring._teleport[1].Y = -1f; + for (int X = left; X < left + width; ++X) + { + for (int Y = top; Y < top + height; ++Y) + { + back = new Point16(X, Y); + Tile tile = Main.tile[X, Y]; + if (tile != null && tile.wire4()) + Wiring._wireList.PushBack(back); + } + } + if (Wiring._wireList.Count > 0) + { + Wiring._numInPump = 0; + Wiring._numOutPump = 0; + Wiring.HitWire(Wiring._wireList, 4); + if (Wiring._numInPump > 0 && Wiring._numOutPump > 0) + Wiring.XferWater(); + } + Vector2[] vector2Array8 = vector2Array1; + int index7 = num7; + int num8 = index7 + 1; + Vector2 vector2_7 = Wiring._teleport[0]; + vector2Array8[index7] = vector2_7; + Vector2[] vector2Array9 = vector2Array1; + int index8 = num8; + int num9 = index8 + 1; + Vector2 vector2_8 = Wiring._teleport[1]; + vector2Array9[index8] = vector2_8; + Wiring.running = false; + for (int index9 = 0; index9 < 8; index9 += 2) + { + Wiring._teleport[0] = vector2Array1[index9]; + Wiring._teleport[1] = vector2Array1[index9 + 1]; + if ((double) Wiring._teleport[0].X >= 0.0 && (double) Wiring._teleport[1].X >= 0.0) + Wiring.Teleport(); + } + Wiring.PixelBoxPass(); + Wiring.LogicGatePass(); + } + + private static void PixelBoxPass() + { + foreach (KeyValuePair pixelBoxTrigger in Wiring._PixelBoxTriggers) + { + if (pixelBoxTrigger.Value != (byte) 2) + { + if (pixelBoxTrigger.Value == (byte) 1) + { + if (Main.tile[(int) pixelBoxTrigger.Key.X, (int) pixelBoxTrigger.Key.Y].frameX != (short) 0) + { + Main.tile[(int) pixelBoxTrigger.Key.X, (int) pixelBoxTrigger.Key.Y].frameX = (short) 0; + NetMessage.SendTileSquare(-1, (int) pixelBoxTrigger.Key.X, (int) pixelBoxTrigger.Key.Y, 1); + } + } + else if (pixelBoxTrigger.Value == (byte) 3 && Main.tile[(int) pixelBoxTrigger.Key.X, (int) pixelBoxTrigger.Key.Y].frameX != (short) 18) + { + Main.tile[(int) pixelBoxTrigger.Key.X, (int) pixelBoxTrigger.Key.Y].frameX = (short) 18; + NetMessage.SendTileSquare(-1, (int) pixelBoxTrigger.Key.X, (int) pixelBoxTrigger.Key.Y, 1); + } + } + } + Wiring._PixelBoxTriggers.Clear(); + } + + private static void LogicGatePass() + { + if (Wiring._GatesCurrent.Count != 0) + return; + Wiring._GatesDone.Clear(); + while (Wiring._LampsToCheck.Count > 0) + { + while (Wiring._LampsToCheck.Count > 0) + { + Point16 point16 = Wiring._LampsToCheck.Dequeue(); + Wiring.CheckLogicGate((int) point16.X, (int) point16.Y); + } + while (Wiring._GatesNext.Count > 0) + { + Utils.Swap>(ref Wiring._GatesCurrent, ref Wiring._GatesNext); + while (Wiring._GatesCurrent.Count > 0) + { + Point16 key = Wiring._GatesCurrent.Peek(); + bool flag; + if (Wiring._GatesDone.TryGetValue(key, out flag) && flag) + { + Wiring._GatesCurrent.Dequeue(); + } + else + { + Wiring._GatesDone.Add(key, true); + Wiring.TripWire((int) key.X, (int) key.Y, 1, 1); + Wiring._GatesCurrent.Dequeue(); + } + } + } + } + Wiring._GatesDone.Clear(); + if (!Wiring.blockPlayerTeleportationForOneIteration) + return; + Wiring.blockPlayerTeleportationForOneIteration = false; + } + + private static void CheckLogicGate(int lampX, int lampY) + { + if (!WorldGen.InWorld(lampX, lampY, 1)) + return; + for (int index1 = lampY; index1 < Main.maxTilesY; ++index1) + { + Tile tile1 = Main.tile[lampX, index1]; + if (!tile1.active()) + break; + if (tile1.type == (ushort) 420) + { + bool flag1; + Wiring._GatesDone.TryGetValue(new Point16(lampX, index1), out flag1); + int num1 = (int) tile1.frameY / 18; + bool flag2 = tile1.frameX == (short) 18; + bool flag3 = tile1.frameX == (short) 36; + if (num1 < 0) + break; + int num2 = 0; + int num3 = 0; + bool flag4 = false; + for (int index2 = index1 - 1; index2 > 0; --index2) + { + Tile tile2 = Main.tile[lampX, index2]; + if (tile2.active() && tile2.type == (ushort) 419) + { + if (tile2.frameX == (short) 36) + { + flag4 = true; + break; + } + ++num2; + num3 += (tile2.frameX == (short) 18).ToInt(); + } + else + break; + } + bool flag5; + switch (num1) + { + case 0: + flag5 = num2 == num3; + break; + case 1: + flag5 = num3 > 0; + break; + case 2: + flag5 = num2 != num3; + break; + case 3: + flag5 = num3 == 0; + break; + case 4: + flag5 = num3 == 1; + break; + case 5: + flag5 = num3 != 1; + break; + default: + return; + } + bool flag6 = !flag4 & flag3; + bool flag7 = false; + if (flag4 && Framing.GetTileSafely(lampX, lampY).frameX == (short) 36) + flag7 = true; + if (!(flag5 != flag2 | flag6 | flag7)) + break; + int num4 = (int) tile1.frameX % 18 / 18; + tile1.frameX = (short) (18 * flag5.ToInt()); + if (flag4) + tile1.frameX = (short) 36; + Wiring.SkipWire(lampX, index1); + WorldGen.SquareTileFrame(lampX, index1); + NetMessage.SendTileSquare(-1, lampX, index1, 1); + bool flag8 = !flag4 | flag7; + if (flag7) + { + if (num3 == 0 || num2 == 0) + ; + flag8 = (double) Main.rand.NextFloat() < (double) num3 / (double) num2; + } + if (flag6) + flag8 = false; + if (!flag8) + break; + if (!flag1) + { + Wiring._GatesNext.Enqueue(new Point16(lampX, index1)); + break; + } + Vector2 position = new Vector2((float) lampX, (float) index1) * 16f - new Vector2(10f); + Utils.PoofOfSmoke(position); + NetMessage.SendData(106, number: ((int) position.X), number2: position.Y); + break; + } + if (tile1.type != (ushort) 419) + break; + } + } + + private static void HitWire(DoubleStack next, int wireType) + { + Wiring._wireDirectionList.Clear(true); + for (int index = 0; index < next.Count; ++index) + { + Point16 point16 = next.PopFront(); + Wiring.SkipWire(point16); + Wiring._toProcess.Add(point16, (byte) 4); + next.PushBack(point16); + Wiring._wireDirectionList.PushBack((byte) 0); + } + Wiring._currentWireColor = wireType; + while (next.Count > 0) + { + Point16 key = next.PopFront(); + int num1 = (int) Wiring._wireDirectionList.PopFront(); + int x = (int) key.X; + int y = (int) key.Y; + if (!Wiring._wireSkip.ContainsKey(key)) + Wiring.HitWireSingle(x, y); + for (int index = 0; index < 4; ++index) + { + int X; + int Y; + switch (index) + { + case 0: + X = x; + Y = y + 1; + break; + case 1: + X = x; + Y = y - 1; + break; + case 2: + X = x + 1; + Y = y; + break; + case 3: + X = x - 1; + Y = y; + break; + default: + X = x; + Y = y + 1; + break; + } + if (X >= 2 && X < Main.maxTilesX - 2 && Y >= 2 && Y < Main.maxTilesY - 2) + { + Tile tile1 = Main.tile[X, Y]; + if (tile1 != null) + { + Tile tile2 = Main.tile[x, y]; + if (tile2 != null) + { + byte num2 = 3; + if (tile1.type == (ushort) 424 || tile1.type == (ushort) 445) + num2 = (byte) 0; + if (tile2.type == (ushort) 424) + { + switch ((int) tile2.frameX / 18) + { + case 0: + if (index == num1) + break; + continue; + case 1: + if (num1 == 0 && index == 3 || num1 == 3 && index == 0 || num1 == 1 && index == 2 || num1 == 2 && index == 1) + break; + continue; + case 2: + if (num1 == 0 && index == 2 || num1 == 2 && index == 0 || num1 == 1 && index == 3 || num1 == 3 && index == 1) + break; + continue; + } + } + if (tile2.type == (ushort) 445) + { + if (index == num1) + { + if (Wiring._PixelBoxTriggers.ContainsKey(key)) + Wiring._PixelBoxTriggers[key] |= index == 0 | index == 1 ? (byte) 2 : (byte) 1; + else + Wiring._PixelBoxTriggers[key] = index == 0 | index == 1 ? (byte) 2 : (byte) 1; + } + else + continue; + } + bool flag; + switch (wireType) + { + case 1: + flag = tile1.wire(); + break; + case 2: + flag = tile1.wire2(); + break; + case 3: + flag = tile1.wire3(); + break; + case 4: + flag = tile1.wire4(); + break; + default: + flag = false; + break; + } + if (flag) + { + Point16 point16 = new Point16(X, Y); + byte num3; + if (Wiring._toProcess.TryGetValue(point16, out num3)) + { + --num3; + if (num3 == (byte) 0) + Wiring._toProcess.Remove(point16); + else + Wiring._toProcess[point16] = num3; + } + else + { + next.PushBack(point16); + Wiring._wireDirectionList.PushBack((byte) index); + if (num2 > (byte) 0) + Wiring._toProcess.Add(point16, num2); + } + } + } + } + } + } + } + Wiring._wireSkip.Clear(); + Wiring._toProcess.Clear(); + } + + private static void HitWireSingle(int i, int j) + { + Tile tile1 = Main.tile[i, j]; + int type = (int) tile1.type; + if (tile1.actuator()) + Wiring.ActuateForced(i, j); + if (!tile1.active()) + return; + switch (type) + { + case 144: + Wiring.HitSwitch(i, j); + WorldGen.SquareTileFrame(i, j); + NetMessage.SendTileSquare(-1, i, j, 1); + break; + case 421: + if (!tile1.actuator()) + { + tile1.type = (ushort) 422; + WorldGen.SquareTileFrame(i, j); + NetMessage.SendTileSquare(-1, i, j, 1); + break; + } + break; + default: + if (type == 422 && !tile1.actuator()) + { + tile1.type = (ushort) 421; + WorldGen.SquareTileFrame(i, j); + NetMessage.SendTileSquare(-1, i, j, 1); + break; + } + break; + } + if (type >= (int) byte.MaxValue && type <= 268) + { + if (tile1.actuator()) + return; + if (type >= 262) + tile1.type -= (ushort) 7; + else + tile1.type += (ushort) 7; + WorldGen.SquareTileFrame(i, j); + NetMessage.SendTileSquare(-1, i, j, 1); + } + else + { + switch (type) + { + case 130: + if (Main.tile[i, j - 1] != null && Main.tile[i, j - 1].active() && (TileID.Sets.BasicChest[(int) Main.tile[i, j - 1].type] || TileID.Sets.BasicChestFake[(int) Main.tile[i, j - 1].type] || Main.tile[i, j - 1].type == (ushort) 88)) + break; + tile1.type = (ushort) 131; + WorldGen.SquareTileFrame(i, j); + NetMessage.SendTileSquare(-1, i, j, 1); + break; + case 131: + tile1.type = (ushort) 130; + WorldGen.SquareTileFrame(i, j); + NetMessage.SendTileSquare(-1, i, j, 1); + break; + case 209: + int num1 = (int) tile1.frameX % 72 / 18; + int num2 = (int) tile1.frameY % 54 / 18; + int num3 = i - num1; + int num4 = j - num2; + int angle = (int) tile1.frameY / 54; + int num5 = (int) tile1.frameX / 72; + int num6 = -1; + if (num1 == 1 || num1 == 2) + num6 = num2; + int num7 = 0; + if (num1 == 3) + num7 = -54; + if (num1 == 0) + num7 = 54; + if (angle >= 8 && num7 > 0) + num7 = 0; + if (angle == 0 && num7 < 0) + num7 = 0; + bool flag1 = false; + if (num7 != 0) + { + for (int x = num3; x < num3 + 4; ++x) + { + for (int y = num4; y < num4 + 3; ++y) + { + Wiring.SkipWire(x, y); + Main.tile[x, y].frameY += (short) num7; + } + } + flag1 = true; + } + if ((num5 == 3 || num5 == 4) && (num6 == 0 || num6 == 1)) + { + int num8 = num5 == 3 ? 72 : -72; + for (int x = num3; x < num3 + 4; ++x) + { + for (int y = num4; y < num4 + 3; ++y) + { + Wiring.SkipWire(x, y); + Main.tile[x, y].frameX += (short) num8; + } + } + flag1 = true; + } + if (flag1) + NetMessage.SendTileSquare(-1, num3 + 1, num4 + 1, 4); + if (num6 == -1) + break; + bool flag2 = true; + if ((num5 == 3 || num5 == 4) && num6 < 2) + flag2 = false; + if (!(Wiring.CheckMech(num3, num4, 30) & flag2)) + break; + WorldGen.ShootFromCannon(num3, num4, angle, num5 + 1, 0, 0.0f, Wiring.CurrentUser); + break; + case 212: + int num9 = (int) tile1.frameX % 54 / 18; + int num10 = (int) tile1.frameY % 54 / 18; + int i1 = i - num9; + int j1 = j - num10; + int num11 = (int) tile1.frameX / 54; + int num12 = -1; + if (num9 == 1) + num12 = num10; + int num13 = 0; + if (num9 == 0) + num13 = -54; + if (num9 == 2) + num13 = 54; + if (num11 >= 1 && num13 > 0) + num13 = 0; + if (num11 == 0 && num13 < 0) + num13 = 0; + bool flag3 = false; + if (num13 != 0) + { + for (int x = i1; x < i1 + 3; ++x) + { + for (int y = j1; y < j1 + 3; ++y) + { + Wiring.SkipWire(x, y); + Main.tile[x, y].frameX += (short) num13; + } + } + flag3 = true; + } + if (flag3) + NetMessage.SendTileSquare(-1, i1 + 1, j1 + 1, 4); + if (num12 == -1 || !Wiring.CheckMech(i1, j1, 10)) + break; + double num14 = 12.0 + (double) Main.rand.Next(450) * 0.00999999977648258; + float num15 = (float) Main.rand.Next(85, 105); + double num16 = (double) Main.rand.Next(-35, 11); + int Type1 = 166; + int Damage1 = 0; + float KnockBack1 = 0.0f; + Vector2 vector2_1 = new Vector2((float) ((i1 + 2) * 16 - 8), (float) ((j1 + 2) * 16 - 8)); + if ((int) tile1.frameX / 54 == 0) + { + num15 *= -1f; + vector2_1.X -= 12f; + } + else + vector2_1.X += 12f; + float num17 = num15; + float num18 = (float) num16; + double num19 = Math.Sqrt((double) num17 * (double) num17 + (double) num18 * (double) num18); + float num20 = (float) (num14 / num19); + float SpeedX1 = num17 * num20; + float SpeedY1 = num18 * num20; + Projectile.NewProjectile(vector2_1.X, vector2_1.Y, SpeedX1, SpeedY1, Type1, Damage1, KnockBack1, Wiring.CurrentUser); + break; + case 215: + int num21 = (int) tile1.frameX % 54 / 18; + int num22 = (int) tile1.frameY % 36 / 18; + int index1 = i - num21; + int index2 = j - num22; + int num23 = 36; + if (Main.tile[index1, index2].frameY >= (short) 36) + num23 = -36; + for (int x = index1; x < index1 + 3; ++x) + { + for (int y = index2; y < index2 + 2; ++y) + { + Wiring.SkipWire(x, y); + Main.tile[x, y].frameY += (short) num23; + } + } + NetMessage.SendTileSquare(-1, index1 + 1, index2 + 1, 3); + break; + case 405: + int num24 = (int) tile1.frameX % 54 / 18; + int num25 = (int) tile1.frameY % 36 / 18; + int index3 = i - num24; + int index4 = j - num25; + int num26 = 54; + if (Main.tile[index3, index4].frameX >= (short) 54) + num26 = -54; + for (int x = index3; x < index3 + 3; ++x) + { + for (int y = index4; y < index4 + 2; ++y) + { + Wiring.SkipWire(x, y); + Main.tile[x, y].frameX += (short) num26; + } + } + NetMessage.SendTileSquare(-1, index3 + 1, index4 + 1, 3); + break; + case 406: + int num27 = (int) tile1.frameX % 54 / 18; + int num28 = (int) tile1.frameY % 54 / 18; + int index5 = i - num27; + int index6 = j - num28; + int num29 = 54; + if (Main.tile[index5, index6].frameY >= (short) 108) + num29 = -108; + for (int x = index5; x < index5 + 3; ++x) + { + for (int y = index6; y < index6 + 3; ++y) + { + Wiring.SkipWire(x, y); + Main.tile[x, y].frameY += (short) num29; + } + } + NetMessage.SendTileSquare(-1, index5 + 1, index6 + 1, 3); + break; + case 411: + int num30 = (int) tile1.frameX % 36 / 18; + int num31 = (int) tile1.frameY % 36 / 18; + int tileX = i - num30; + int tileY = j - num31; + int num32 = 36; + if (Main.tile[tileX, tileY].frameX >= (short) 36) + num32 = -36; + for (int x = tileX; x < tileX + 2; ++x) + { + for (int y = tileY; y < tileY + 2; ++y) + { + Wiring.SkipWire(x, y); + Main.tile[x, y].frameX += (short) num32; + } + } + NetMessage.SendTileSquare(-1, tileX, tileY, 2); + break; + case 419: + int num33 = 18; + if ((int) tile1.frameX >= num33) + num33 = -num33; + if (tile1.frameX == (short) 36) + num33 = 0; + Wiring.SkipWire(i, j); + tile1.frameX += (short) num33; + WorldGen.SquareTileFrame(i, j); + NetMessage.SendTileSquare(-1, i, j, 1); + Wiring._LampsToCheck.Enqueue(new Point16(i, j)); + break; + case 425: + int num34 = (int) tile1.frameX % 36 / 18; + int num35 = (int) tile1.frameY % 36 / 18; + int i2 = i - num34; + int j2 = j - num35; + for (int x = i2; x < i2 + 2; ++x) + { + for (int y = j2; y < j2 + 2; ++y) + Wiring.SkipWire(x, y); + } + if (Main.AnnouncementBoxDisabled) + break; + Color pink = Color.Pink; + int index7 = Sign.ReadSign(i2, j2, false); + if (index7 == -1 || Main.sign[index7] == null || string.IsNullOrWhiteSpace(Main.sign[index7].text)) + break; + if (Main.AnnouncementBoxRange == -1) + { + if (Main.netMode == 0) + { + Main.NewTextMultiline(Main.sign[index7].text, c: pink, WidthLimit: 460); + break; + } + if (Main.netMode != 2) + break; + NetMessage.SendData(107, text: NetworkText.FromLiteral(Main.sign[index7].text), number: ((int) byte.MaxValue), number2: ((float) pink.R), number3: ((float) pink.G), number4: ((float) pink.B), number5: 460); + break; + } + switch (Main.netMode) + { + case 0: + if ((double) Main.player[Main.myPlayer].Distance(new Vector2((float) (i2 * 16 + 16), (float) (j2 * 16 + 16))) > (double) Main.AnnouncementBoxRange) + return; + Main.NewTextMultiline(Main.sign[index7].text, c: pink, WidthLimit: 460); + return; + case 2: + for (int remoteClient = 0; remoteClient < (int) byte.MaxValue; ++remoteClient) + { + if (Main.player[remoteClient].active && (double) Main.player[remoteClient].Distance(new Vector2((float) (i2 * 16 + 16), (float) (j2 * 16 + 16))) <= (double) Main.AnnouncementBoxRange) + NetMessage.SendData(107, remoteClient, text: NetworkText.FromLiteral(Main.sign[index7].text), number: ((int) byte.MaxValue), number2: ((float) pink.R), number3: ((float) pink.G), number4: ((float) pink.B), number5: 460); + } + return; + default: + return; + } + case 452: + int num36 = (int) tile1.frameX % 54 / 18; + int num37 = (int) tile1.frameY % 54 / 18; + int index8 = i - num36; + int index9 = j - num37; + int num38 = 54; + if (Main.tile[index8, index9].frameX >= (short) 54) + num38 = -54; + for (int x = index8; x < index8 + 3; ++x) + { + for (int y = index9; y < index9 + 3; ++y) + { + Wiring.SkipWire(x, y); + Main.tile[x, y].frameX += (short) num38; + } + } + NetMessage.SendTileSquare(-1, index8 + 1, index9 + 1, 3); + break; + default: + if (type == 387 || type == 386) + { + bool flag4 = type == 387; + int num39 = WorldGen.ShiftTrapdoor(i, j, true).ToInt(); + if (num39 == 0) + num39 = -WorldGen.ShiftTrapdoor(i, j, false).ToInt(); + if (num39 == 0) + break; + NetMessage.SendData(19, number: (3 - flag4.ToInt()), number2: ((float) i), number3: ((float) j), number4: ((float) num39)); + break; + } + if (type == 389 || type == 388) + { + bool closing = type == 389; + WorldGen.ShiftTallGate(i, j, closing); + NetMessage.SendData(19, number: (4 + closing.ToInt()), number2: ((float) i), number3: ((float) j)); + break; + } + switch (type) + { + case 10: + int direction = 1; + if (Main.rand.Next(2) == 0) + direction = -1; + if (!WorldGen.OpenDoor(i, j, direction)) + { + if (!WorldGen.OpenDoor(i, j, -direction)) + return; + NetMessage.SendData(19, number2: ((float) i), number3: ((float) j), number4: ((float) -direction)); + return; + } + NetMessage.SendData(19, number2: ((float) i), number3: ((float) j), number4: ((float) direction)); + return; + case 11: + if (!WorldGen.CloseDoor(i, j, true)) + return; + NetMessage.SendData(19, number: 1, number2: ((float) i), number3: ((float) j)); + return; + case 216: + WorldGen.LaunchRocket(i, j); + Wiring.SkipWire(i, j); + return; + default: + if (type == 497 || type == 15 && (int) tile1.frameY / 40 == 1 || type == 15 && (int) tile1.frameY / 40 == 20) + { + int num40 = j - (int) tile1.frameY % 40 / 18; + int num41 = i; + Wiring.SkipWire(num41, num40); + Wiring.SkipWire(num41, num40 + 1); + if (!Wiring.CheckMech(num41, num40, 60)) + return; + Projectile.NewProjectile((float) (num41 * 16 + 8), (float) (num40 * 16 + 12), 0.0f, 0.0f, 733, 0, 0.0f, Main.myPlayer); + return; + } + switch (type) + { + case 4: + if (tile1.frameX < (short) 66) + tile1.frameX += (short) 66; + else + tile1.frameX -= (short) 66; + NetMessage.SendTileSquare(-1, i, j, 1); + return; + case 42: + int num42 = (int) tile1.frameY / 18; + while (num42 >= 2) + num42 -= 2; + int y1 = j - num42; + short num43 = 18; + if (tile1.frameX > (short) 0) + num43 = (short) -18; + Main.tile[i, y1].frameX += num43; + Main.tile[i, y1 + 1].frameX += num43; + Wiring.SkipWire(i, y1); + Wiring.SkipWire(i, y1 + 1); + NetMessage.SendTileSquare(-1, i, j, 3); + return; + case 93: + int num44 = (int) tile1.frameY / 18; + while (num44 >= 3) + num44 -= 3; + int y2 = j - num44; + short num45 = 18; + if (tile1.frameX > (short) 0) + num45 = (short) -18; + Main.tile[i, y2].frameX += num45; + Main.tile[i, y2 + 1].frameX += num45; + Main.tile[i, y2 + 2].frameX += num45; + Wiring.SkipWire(i, y2); + Wiring.SkipWire(i, y2 + 1); + Wiring.SkipWire(i, y2 + 2); + NetMessage.SendTileSquare(-1, i, y2 + 1, 3); + return; + case 149: + if (tile1.frameX < (short) 54) + tile1.frameX += (short) 54; + else + tile1.frameX -= (short) 54; + NetMessage.SendTileSquare(-1, i, j, 1); + return; + case 235: + int num46 = i - (int) tile1.frameX / 18; + if (tile1.wall == (ushort) 87 && (double) j > Main.worldSurface && !NPC.downedPlantBoss) + return; + if ((double) Wiring._teleport[0].X == -1.0) + { + Wiring._teleport[0].X = (float) num46; + Wiring._teleport[0].Y = (float) j; + if (!tile1.halfBrick()) + return; + Wiring._teleport[0].Y += 0.5f; + return; + } + if ((double) Wiring._teleport[0].X == (double) num46 && (double) Wiring._teleport[0].Y == (double) j) + return; + Wiring._teleport[1].X = (float) num46; + Wiring._teleport[1].Y = (float) j; + if (!tile1.halfBrick()) + return; + Wiring._teleport[1].Y += 0.5f; + return; + case 244: + int num47 = (int) tile1.frameX / 18; + while (num47 >= 3) + num47 -= 3; + int num48 = (int) tile1.frameY / 18; + while (num48 >= 3) + num48 -= 3; + int index10 = i - num47; + int index11 = j - num48; + int num49 = 54; + if (Main.tile[index10, index11].frameX >= (short) 54) + num49 = -54; + for (int x = index10; x < index10 + 3; ++x) + { + for (int y3 = index11; y3 < index11 + 2; ++y3) + { + Wiring.SkipWire(x, y3); + Main.tile[x, y3].frameX += (short) num49; + } + } + NetMessage.SendTileSquare(-1, index10 + 1, index11 + 1, 3); + return; + case 335: + int num50 = j - (int) tile1.frameY / 18; + int num51 = i - (int) tile1.frameX / 18; + Wiring.SkipWire(num51, num50); + Wiring.SkipWire(num51, num50 + 1); + Wiring.SkipWire(num51 + 1, num50); + Wiring.SkipWire(num51 + 1, num50 + 1); + if (!Wiring.CheckMech(num51, num50, 30)) + return; + WorldGen.LaunchRocketSmall(num51, num50); + return; + case 338: + int num52 = j - (int) tile1.frameY / 18; + int num53 = i - (int) tile1.frameX / 18; + Wiring.SkipWire(num53, num52); + Wiring.SkipWire(num53, num52 + 1); + if (!Wiring.CheckMech(num53, num52, 30)) + return; + bool flag5 = false; + for (int index12 = 0; index12 < 1000; ++index12) + { + if (Main.projectile[index12].active && Main.projectile[index12].aiStyle == 73 && (double) Main.projectile[index12].ai[0] == (double) num53 && (double) Main.projectile[index12].ai[1] == (double) num52) + { + flag5 = true; + break; + } + } + if (flag5) + return; + Projectile.NewProjectile((float) (num53 * 16 + 8), (float) (num52 * 16 + 2), 0.0f, 0.0f, 419 + Main.rand.Next(4), 0, 0.0f, Main.myPlayer, (float) num53, (float) num52); + return; + case 429: + int num54 = (int) Main.tile[i, j].frameX / 18; + bool flag6 = num54 % 2 >= 1; + bool flag7 = num54 % 4 >= 2; + bool flag8 = num54 % 8 >= 4; + bool flag9 = num54 % 16 >= 8; + bool flag10 = false; + short num55 = 0; + switch (Wiring._currentWireColor) + { + case 1: + num55 = (short) 18; + flag10 = !flag6; + break; + case 2: + num55 = (short) 72; + flag10 = !flag8; + break; + case 3: + num55 = (short) 36; + flag10 = !flag7; + break; + case 4: + num55 = (short) 144; + flag10 = !flag9; + break; + } + if (flag10) + tile1.frameX += num55; + else + tile1.frameX -= num55; + NetMessage.SendTileSquare(-1, i, j, 1); + return; + case 565: + int num56 = (int) tile1.frameX / 18; + while (num56 >= 2) + num56 -= 2; + int num57 = (int) tile1.frameY / 18; + while (num57 >= 2) + num57 -= 2; + int index13 = i - num56; + int index14 = j - num57; + int num58 = 36; + if (Main.tile[index13, index14].frameX >= (short) 36) + num58 = -36; + for (int x = index13; x < index13 + 2; ++x) + { + for (int y4 = index14; y4 < index14 + 2; ++y4) + { + Wiring.SkipWire(x, y4); + Main.tile[x, y4].frameX += (short) num58; + } + } + NetMessage.SendTileSquare(-1, index13 + 1, index14 + 1, 3); + return; + default: + if (type == 126 || type == 95 || type == 100 || type == 173 || type == 564) + { + int num59 = (int) tile1.frameY / 18; + while (num59 >= 2) + num59 -= 2; + int index15 = j - num59; + int num60 = (int) tile1.frameX / 18; + if (num60 > 1) + num60 -= 2; + int index16 = i - num60; + short num61 = 36; + if (Main.tile[index16, index15].frameX > (short) 0) + num61 = (short) -36; + Main.tile[index16, index15].frameX += num61; + Main.tile[index16, index15 + 1].frameX += num61; + Main.tile[index16 + 1, index15].frameX += num61; + Main.tile[index16 + 1, index15 + 1].frameX += num61; + Wiring.SkipWire(index16, index15); + Wiring.SkipWire(index16 + 1, index15); + Wiring.SkipWire(index16, index15 + 1); + Wiring.SkipWire(index16 + 1, index15 + 1); + NetMessage.SendTileSquare(-1, index16, index15, 3); + return; + } + switch (type) + { + case 34: + int num62 = (int) tile1.frameY / 18; + while (num62 >= 3) + num62 -= 3; + int index17 = j - num62; + int num63 = (int) tile1.frameX % 108 / 18; + if (num63 > 2) + num63 -= 3; + int index18 = i - num63; + short num64 = 54; + if ((int) Main.tile[index18, index17].frameX % 108 > 0) + num64 = (short) -54; + for (int x = index18; x < index18 + 3; ++x) + { + for (int y5 = index17; y5 < index17 + 3; ++y5) + { + Main.tile[x, y5].frameX += num64; + Wiring.SkipWire(x, y5); + } + } + NetMessage.SendTileSquare(-1, index18 + 1, index17 + 1, 3); + return; + case 314: + if (!Wiring.CheckMech(i, j, 5)) + return; + Minecart.FlipSwitchTrack(i, j); + return; + case 593: + int index19 = i; + int index20 = j; + Wiring.SkipWire(index19, index20); + short num65 = Main.tile[index19, index20].frameX != (short) 0 ? (short) -18 : (short) 18; + Main.tile[index19, index20].frameX += num65; + if (Main.netMode == 2) + NetMessage.SendTileRange(-1, index19, index20, 1, 1); + int num66 = num65 > (short) 0 ? 4 : 3; + Animation.NewTemporaryAnimation(num66, (ushort) 593, index19, index20); + NetMessage.SendTemporaryAnimation(-1, num66, 593, index19, index20); + return; + case 594: + int num67 = (int) tile1.frameY / 18; + while (num67 >= 2) + num67 -= 2; + int index21 = j - num67; + int num68 = (int) tile1.frameX / 18; + if (num68 > 1) + num68 -= 2; + int index22 = i - num68; + Wiring.SkipWire(index22, index21); + Wiring.SkipWire(index22, index21 + 1); + Wiring.SkipWire(index22 + 1, index21); + Wiring.SkipWire(index22 + 1, index21 + 1); + short num69 = Main.tile[index22, index21].frameX != (short) 0 ? (short) -36 : (short) 36; + for (int index23 = 0; index23 < 2; ++index23) + { + for (int index24 = 0; index24 < 2; ++index24) + Main.tile[index22 + index23, index21 + index24].frameX += num69; + } + if (Main.netMode == 2) + NetMessage.SendTileRange(-1, index22, index21, 2, 2); + int num70 = num69 > (short) 0 ? 4 : 3; + Animation.NewTemporaryAnimation(num70, (ushort) 594, index22, index21); + NetMessage.SendTemporaryAnimation(-1, num70, 594, index22, index21); + return; + default: + if (type == 33 || type == 174 || type == 49 || type == 372) + { + short num71 = 18; + if (tile1.frameX > (short) 0) + num71 = (short) -18; + tile1.frameX += num71; + NetMessage.SendTileSquare(-1, i, j, 3); + return; + } + switch (type) + { + case 92: + int num72 = j - (int) tile1.frameY / 18; + short num73 = 18; + if (tile1.frameX > (short) 0) + num73 = (short) -18; + for (int y6 = num72; y6 < num72 + 6; ++y6) + { + Main.tile[i, y6].frameX += num73; + Wiring.SkipWire(i, y6); + } + NetMessage.SendTileSquare(-1, i, num72 + 3, 7); + return; + case 137: + int num74 = (int) tile1.frameY / 18; + Vector2 vector2_2 = Vector2.Zero; + float SpeedX2 = 0.0f; + float SpeedY2 = 0.0f; + int Type2 = 0; + int Damage2 = 0; + switch (num74) + { + case 0: + case 1: + case 2: + if (Wiring.CheckMech(i, j, 200)) + { + int num75 = tile1.frameX == (short) 0 ? -1 : (tile1.frameX == (short) 18 ? 1 : 0); + int num76 = tile1.frameX < (short) 36 ? 0 : (tile1.frameX < (short) 72 ? -1 : 1); + vector2_2 = new Vector2((float) (i * 16 + 8 + 10 * num75), (float) (j * 16 + 8 + 10 * num76)); + float num77 = 3f; + if (num74 == 0) + { + Type2 = 98; + Damage2 = 20; + num77 = 12f; + } + if (num74 == 1) + { + Type2 = 184; + Damage2 = 40; + num77 = 12f; + } + if (num74 == 2) + { + Type2 = 187; + Damage2 = 40; + num77 = 5f; + } + SpeedX2 = (float) num75 * num77; + SpeedY2 = (float) num76 * num77; + break; + } + break; + case 3: + if (Wiring.CheckMech(i, j, 300)) + { + int num78 = 200; + for (int index25 = 0; index25 < 1000; ++index25) + { + if (Main.projectile[index25].active && Main.projectile[index25].type == Type2) + { + float num79 = (new Vector2((float) (i * 16 + 8), (float) (j * 18 + 8)) - Main.projectile[index25].Center).Length(); + if ((double) num79 < 50.0) + num78 -= 50; + else if ((double) num79 < 100.0) + num78 -= 15; + else if ((double) num79 < 200.0) + num78 -= 10; + else if ((double) num79 < 300.0) + num78 -= 8; + else if ((double) num79 < 400.0) + num78 -= 6; + else if ((double) num79 < 500.0) + num78 -= 5; + else if ((double) num79 < 700.0) + num78 -= 4; + else if ((double) num79 < 900.0) + num78 -= 3; + else if ((double) num79 < 1200.0) + num78 -= 2; + else + --num78; + } + } + if (num78 > 0) + { + Type2 = 185; + Damage2 = 40; + int num80 = 0; + int num81 = 0; + switch ((int) tile1.frameX / 18) + { + case 0: + case 1: + num80 = 0; + num81 = 1; + break; + case 2: + num80 = 0; + num81 = -1; + break; + case 3: + num80 = -1; + num81 = 0; + break; + case 4: + num80 = 1; + num81 = 0; + break; + } + SpeedX2 = (float) (4 * num80) + (float) Main.rand.Next((num80 == 1 ? 20 : 0) - 20, 21 - (num80 == -1 ? 20 : 0)) * 0.05f; + SpeedY2 = (float) (4 * num81) + (float) Main.rand.Next((num81 == 1 ? 20 : 0) - 20, 21 - (num81 == -1 ? 20 : 0)) * 0.05f; + vector2_2 = new Vector2((float) (i * 16 + 8 + 14 * num80), (float) (j * 16 + 8 + 14 * num81)); + break; + } + break; + } + break; + case 4: + if (Wiring.CheckMech(i, j, 90)) + { + int num82 = 0; + int num83 = 0; + switch ((int) tile1.frameX / 18) + { + case 0: + case 1: + num82 = 0; + num83 = 1; + break; + case 2: + num82 = 0; + num83 = -1; + break; + case 3: + num82 = -1; + num83 = 0; + break; + case 4: + num82 = 1; + num83 = 0; + break; + } + SpeedX2 = (float) (8 * num82); + SpeedY2 = (float) (8 * num83); + Damage2 = 60; + Type2 = 186; + vector2_2 = new Vector2((float) (i * 16 + 8 + 18 * num82), (float) (j * 16 + 8 + 18 * num83)); + break; + } + break; + } + switch (num74 + 10) + { + case 0: + if (Wiring.CheckMech(i, j, 200)) + { + int num84 = -1; + if (tile1.frameX != (short) 0) + num84 = 1; + SpeedX2 = (float) (12 * num84); + Damage2 = 20; + Type2 = 98; + vector2_2 = new Vector2((float) (i * 16 + 8), (float) (j * 16 + 7)); + vector2_2.X += (float) (10 * num84); + vector2_2.Y += 2f; + break; + } + break; + case 1: + if (Wiring.CheckMech(i, j, 200)) + { + int num85 = -1; + if (tile1.frameX != (short) 0) + num85 = 1; + SpeedX2 = (float) (12 * num85); + Damage2 = 40; + Type2 = 184; + vector2_2 = new Vector2((float) (i * 16 + 8), (float) (j * 16 + 7)); + vector2_2.X += (float) (10 * num85); + vector2_2.Y += 2f; + break; + } + break; + case 2: + if (Wiring.CheckMech(i, j, 200)) + { + int num86 = -1; + if (tile1.frameX != (short) 0) + num86 = 1; + SpeedX2 = (float) (5 * num86); + Damage2 = 40; + Type2 = 187; + vector2_2 = new Vector2((float) (i * 16 + 8), (float) (j * 16 + 7)); + vector2_2.X += (float) (10 * num86); + vector2_2.Y += 2f; + break; + } + break; + case 3: + if (Wiring.CheckMech(i, j, 300)) + { + Type2 = 185; + int num87 = 200; + for (int index26 = 0; index26 < 1000; ++index26) + { + if (Main.projectile[index26].active && Main.projectile[index26].type == Type2) + { + float num88 = (new Vector2((float) (i * 16 + 8), (float) (j * 18 + 8)) - Main.projectile[index26].Center).Length(); + if ((double) num88 < 50.0) + num87 -= 50; + else if ((double) num88 < 100.0) + num87 -= 15; + else if ((double) num88 < 200.0) + num87 -= 10; + else if ((double) num88 < 300.0) + num87 -= 8; + else if ((double) num88 < 400.0) + num87 -= 6; + else if ((double) num88 < 500.0) + num87 -= 5; + else if ((double) num88 < 700.0) + num87 -= 4; + else if ((double) num88 < 900.0) + num87 -= 3; + else if ((double) num88 < 1200.0) + num87 -= 2; + else + --num87; + } + } + if (num87 > 0) + { + SpeedX2 = (float) Main.rand.Next(-20, 21) * 0.05f; + SpeedY2 = (float) (4.0 + (double) Main.rand.Next(0, 21) * 0.0500000007450581); + Damage2 = 40; + vector2_2 = new Vector2((float) (i * 16 + 8), (float) (j * 16 + 16)); + vector2_2.Y += 6f; + Projectile.NewProjectile((float) (int) vector2_2.X, (float) (int) vector2_2.Y, SpeedX2, SpeedY2, Type2, Damage2, 2f, Main.myPlayer); + break; + } + break; + } + break; + case 4: + if (Wiring.CheckMech(i, j, 90)) + { + SpeedX2 = 0.0f; + SpeedY2 = 8f; + Damage2 = 60; + Type2 = 186; + vector2_2 = new Vector2((float) (i * 16 + 8), (float) (j * 16 + 16)); + vector2_2.Y += 10f; + break; + } + break; + } + if (Type2 == 0) + return; + Projectile.NewProjectile((float) (int) vector2_2.X, (float) (int) vector2_2.Y, SpeedX2, SpeedY2, Type2, Damage2, 2f, Main.myPlayer); + return; + case 443: + Wiring.GeyserTrap(i, j); + return; + case 531: + int num89 = (int) tile1.frameX / 36; + int num90 = (int) tile1.frameY / 54; + int i3 = i - ((int) tile1.frameX - num89 * 36) / 18; + int j3 = j - ((int) tile1.frameY - num90 * 54) / 18; + if (!Wiring.CheckMech(i3, j3, 900)) + return; + Vector2 vector2_3 = new Vector2((float) (i3 + 1), (float) j3) * 16f; + vector2_3.Y += 28f; + int Type3 = 99; + int Damage3 = 70; + float KnockBack2 = 10f; + if (Type3 == 0) + return; + Projectile.NewProjectile((float) (int) vector2_3.X, (float) (int) vector2_3.Y, 0.0f, 0.0f, Type3, Damage3, KnockBack2, Main.myPlayer); + return; + default: + if (type == 139 || type == 35) + { + WorldGen.SwitchMB(i, j); + return; + } + if (type == 207) + { + WorldGen.SwitchFountain(i, j); + return; + } + if (type == 410 || type == 480 || type == 509) + { + WorldGen.SwitchMonolith(i, j); + return; + } + switch (type) + { + case 141: + WorldGen.KillTile(i, j, noItem: true); + NetMessage.SendTileSquare(-1, i, j, 1); + Projectile.NewProjectile((float) (i * 16 + 8), (float) (j * 16 + 8), 0.0f, 0.0f, 108, 500, 10f, Main.myPlayer); + return; + case 210: + WorldGen.ExplodeMine(i, j); + return; + case 455: + BirthdayParty.ToggleManualParty(); + return; + default: + if (type == 142 || type == 143) + { + int y7 = j - (int) tile1.frameY / 18; + int num91 = (int) tile1.frameX / 18; + if (num91 > 1) + num91 -= 2; + int x = i - num91; + Wiring.SkipWire(x, y7); + Wiring.SkipWire(x, y7 + 1); + Wiring.SkipWire(x + 1, y7); + Wiring.SkipWire(x + 1, y7 + 1); + if (type == 142) + { + for (int index27 = 0; index27 < 4 && Wiring._numInPump < 19; ++index27) + { + int num92; + int num93; + switch (index27) + { + case 0: + num92 = x; + num93 = y7 + 1; + break; + case 1: + num92 = x + 1; + num93 = y7 + 1; + break; + case 2: + num92 = x; + num93 = y7; + break; + default: + num92 = x + 1; + num93 = y7; + break; + } + Wiring._inPumpX[Wiring._numInPump] = num92; + Wiring._inPumpY[Wiring._numInPump] = num93; + ++Wiring._numInPump; + } + return; + } + for (int index28 = 0; index28 < 4 && Wiring._numOutPump < 19; ++index28) + { + int num94; + int num95; + switch (index28) + { + case 0: + num94 = x; + num95 = y7 + 1; + break; + case 1: + num94 = x + 1; + num95 = y7 + 1; + break; + case 2: + num94 = x; + num95 = y7; + break; + default: + num94 = x + 1; + num95 = y7; + break; + } + Wiring._outPumpX[Wiring._numOutPump] = num94; + Wiring._outPumpY[Wiring._numOutPump] = num95; + ++Wiring._numOutPump; + } + return; + } + switch (type) + { + case 105: + int num96 = j - (int) tile1.frameY / 18; + int num97 = (int) tile1.frameX / 18; + int num98 = 0; + while (num97 >= 2) + { + num97 -= 2; + ++num98; + } + int num99 = i - num97; + int num100 = i - (int) tile1.frameX % 36 / 18; + int num101 = j - (int) tile1.frameY % 54 / 18; + int num102 = (int) tile1.frameY / 54 % 3; + int num103 = (int) tile1.frameX / 36 + num102 * 55; + Wiring.SkipWire(num100, num101); + Wiring.SkipWire(num100, num101 + 1); + Wiring.SkipWire(num100, num101 + 2); + Wiring.SkipWire(num100 + 1, num101); + Wiring.SkipWire(num100 + 1, num101 + 1); + Wiring.SkipWire(num100 + 1, num101 + 2); + int X = num100 * 16 + 16; + int Y = (num101 + 3) * 16; + int index29 = -1; + int num104 = -1; + bool flag11 = true; + bool flag12 = false; + switch (num103) + { + case 5: + num104 = 73; + break; + case 13: + num104 = 24; + break; + case 30: + num104 = 6; + break; + case 35: + num104 = 2; + break; + case 51: + num104 = (int) Utils.SelectRandom(Main.rand, (short) 299, (short) 538); + break; + case 52: + num104 = 356; + break; + case 53: + num104 = 357; + break; + case 54: + num104 = (int) Utils.SelectRandom(Main.rand, (short) 355, (short) 358); + break; + case 55: + num104 = (int) Utils.SelectRandom(Main.rand, (short) 367, (short) 366); + break; + case 56: + num104 = (int) Utils.SelectRandom(Main.rand, (short) 359, (short) 359, (short) 359, (short) 359, (short) 360); + break; + case 57: + num104 = 377; + break; + case 58: + num104 = 300; + break; + case 59: + num104 = (int) Utils.SelectRandom(Main.rand, (short) 364, (short) 362); + break; + case 60: + num104 = 148; + break; + case 61: + num104 = 361; + break; + case 62: + num104 = (int) Utils.SelectRandom(Main.rand, (short) 487, (short) 486, (short) 485); + break; + case 63: + num104 = 164; + flag11 &= NPC.MechSpawn((float) X, (float) Y, 165); + break; + case 64: + num104 = 86; + flag12 = true; + break; + case 65: + num104 = 490; + break; + case 66: + num104 = 82; + break; + case 67: + num104 = 449; + break; + case 68: + num104 = 167; + break; + case 69: + num104 = 480; + break; + case 70: + num104 = 48; + break; + case 71: + num104 = (int) Utils.SelectRandom(Main.rand, (short) 170, (short) 180, (short) 171); + flag12 = true; + break; + case 72: + num104 = 481; + break; + case 73: + num104 = 482; + break; + case 74: + num104 = 430; + break; + case 75: + num104 = 489; + break; + case 76: + num104 = 611; + break; + case 77: + num104 = 602; + break; + case 78: + num104 = (int) Utils.SelectRandom(Main.rand, (short) 595, (short) 596, (short) 599, (short) 597, (short) 600, (short) 598); + break; + case 79: + num104 = (int) Utils.SelectRandom(Main.rand, (short) 616, (short) 617); + break; + } + if (((num104 == -1 || !Wiring.CheckMech(num100, num101, 30) ? 0 : (NPC.MechSpawn((float) X, (float) Y, num104) ? 1 : 0)) & (flag11 ? 1 : 0)) != 0) + { + if (!flag12 || !Collision.SolidTiles(num100 - 2, num100 + 3, num101, num101 + 2)) + { + index29 = NPC.NewNPC(X, Y, num104); + } + else + { + Vector2 position = new Vector2((float) (X - 4), (float) (Y - 22)) - new Vector2(10f); + Utils.PoofOfSmoke(position); + NetMessage.SendData(106, number: ((int) position.X), number2: position.Y); + } + } + if (index29 <= -1) + { + switch (num103) + { + case 2: + if (Wiring.CheckMech(num100, num101, 600) && Item.MechSpawn((float) X, (float) Y, 184) && Item.MechSpawn((float) X, (float) Y, 1735) && Item.MechSpawn((float) X, (float) Y, 1868)) + { + Item.NewItem(X, Y - 16, 0, 0, 184); + break; + } + break; + case 4: + if (Wiring.CheckMech(num100, num101, 30) && NPC.MechSpawn((float) X, (float) Y, 1)) + { + index29 = NPC.NewNPC(X, Y - 12, 1); + break; + } + break; + case 7: + if (Wiring.CheckMech(num100, num101, 30) && NPC.MechSpawn((float) X, (float) Y, 49)) + { + index29 = NPC.NewNPC(X - 4, Y - 6, 49); + break; + } + break; + case 8: + if (Wiring.CheckMech(num100, num101, 30) && NPC.MechSpawn((float) X, (float) Y, 55)) + { + index29 = NPC.NewNPC(X, Y - 12, 55); + break; + } + break; + case 9: + int num105 = 46; + if (BirthdayParty.PartyIsUp) + num105 = 540; + if (Wiring.CheckMech(num100, num101, 30) && NPC.MechSpawn((float) X, (float) Y, num105)) + { + index29 = NPC.NewNPC(X, Y - 12, num105); + break; + } + break; + case 10: + if (Wiring.CheckMech(num100, num101, 30) && NPC.MechSpawn((float) X, (float) Y, 21)) + { + index29 = NPC.NewNPC(X, Y, 21); + break; + } + break; + case 16: + if (Wiring.CheckMech(num100, num101, 30) && NPC.MechSpawn((float) X, (float) Y, 42)) + { + if (!Collision.SolidTiles(num100 - 1, num100 + 1, num101, num101 + 1)) + { + index29 = NPC.NewNPC(X, Y - 12, 42); + break; + } + Vector2 position = new Vector2((float) (X - 4), (float) (Y - 22)) - new Vector2(10f); + Utils.PoofOfSmoke(position); + NetMessage.SendData(106, number: ((int) position.X), number2: position.Y); + break; + } + break; + case 17: + if (Wiring.CheckMech(num100, num101, 600) && Item.MechSpawn((float) X, (float) Y, 166)) + { + Item.NewItem(X, Y - 20, 0, 0, 166); + break; + } + break; + case 18: + if (Wiring.CheckMech(num100, num101, 30) && NPC.MechSpawn((float) X, (float) Y, 67)) + { + index29 = NPC.NewNPC(X, Y - 12, 67); + break; + } + break; + case 23: + if (Wiring.CheckMech(num100, num101, 30) && NPC.MechSpawn((float) X, (float) Y, 63)) + { + index29 = NPC.NewNPC(X, Y - 12, 63); + break; + } + break; + case 27: + if (Wiring.CheckMech(num100, num101, 30) && NPC.MechSpawn((float) X, (float) Y, 85)) + { + index29 = NPC.NewNPC(X - 9, Y, 85); + break; + } + break; + case 28: + if (Wiring.CheckMech(num100, num101, 30) && NPC.MechSpawn((float) X, (float) Y, 74)) + { + index29 = NPC.NewNPC(X, Y - 12, (int) Utils.SelectRandom(Main.rand, (short) 74, (short) 297, (short) 298)); + break; + } + break; + case 34: + for (int index30 = 0; index30 < 2; ++index30) + { + for (int index31 = 0; index31 < 3; ++index31) + { + Tile tile2 = Main.tile[num100 + index30, num101 + index31]; + tile2.type = (ushort) 349; + tile2.frameX = (short) (index30 * 18 + 216); + tile2.frameY = (short) (index31 * 18); + } + } + Animation.NewTemporaryAnimation(0, (ushort) 349, num100, num101); + if (Main.netMode == 2) + { + NetMessage.SendTileRange(-1, num100, num101, 2, 3); + break; + } + break; + case 37: + if (Wiring.CheckMech(num100, num101, 600) && Item.MechSpawn((float) X, (float) Y, 58) && Item.MechSpawn((float) X, (float) Y, 1734) && Item.MechSpawn((float) X, (float) Y, 1867)) + { + Item.NewItem(X, Y - 16, 0, 0, 58); + break; + } + break; + case 40: + if (Wiring.CheckMech(num100, num101, 300)) + { + int length = 50; + int[] numArray = new int[length]; + int maxValue = 0; + for (int index32 = 0; index32 < 200; ++index32) + { + if (Main.npc[index32].active && (Main.npc[index32].type == 17 || Main.npc[index32].type == 19 || Main.npc[index32].type == 22 || Main.npc[index32].type == 38 || Main.npc[index32].type == 54 || Main.npc[index32].type == 107 || Main.npc[index32].type == 108 || Main.npc[index32].type == 142 || Main.npc[index32].type == 160 || Main.npc[index32].type == 207 || Main.npc[index32].type == 209 || Main.npc[index32].type == 227 || Main.npc[index32].type == 228 || Main.npc[index32].type == 229 || Main.npc[index32].type == 368 || Main.npc[index32].type == 369 || Main.npc[index32].type == 550 || Main.npc[index32].type == 441 || Main.npc[index32].type == 588)) + { + numArray[maxValue] = index32; + ++maxValue; + if (maxValue >= length) + break; + } + } + if (maxValue > 0) + { + int number = numArray[Main.rand.Next(maxValue)]; + Main.npc[number].position.X = (float) (X - Main.npc[number].width / 2); + Main.npc[number].position.Y = (float) (Y - Main.npc[number].height - 1); + NetMessage.SendData(23, number: number); + break; + } + break; + } + break; + case 41: + if (Wiring.CheckMech(num100, num101, 300)) + { + int length = 50; + int[] numArray = new int[length]; + int maxValue = 0; + for (int index33 = 0; index33 < 200; ++index33) + { + if (Main.npc[index33].active && (Main.npc[index33].type == 18 || Main.npc[index33].type == 20 || Main.npc[index33].type == 124 || Main.npc[index33].type == 178 || Main.npc[index33].type == 208 || Main.npc[index33].type == 353 || Main.npc[index33].type == 633)) + { + numArray[maxValue] = index33; + ++maxValue; + if (maxValue >= length) + break; + } + } + if (maxValue > 0) + { + int number = numArray[Main.rand.Next(maxValue)]; + Main.npc[number].position.X = (float) (X - Main.npc[number].width / 2); + Main.npc[number].position.Y = (float) (Y - Main.npc[number].height - 1); + NetMessage.SendData(23, number: number); + break; + } + break; + } + break; + case 42: + if (Wiring.CheckMech(num100, num101, 30) && NPC.MechSpawn((float) X, (float) Y, 58)) + { + index29 = NPC.NewNPC(X, Y - 12, 58); + break; + } + break; + case 50: + if (Wiring.CheckMech(num100, num101, 30) && NPC.MechSpawn((float) X, (float) Y, 65)) + { + if (!Collision.SolidTiles(num100 - 2, num100 + 3, num101, num101 + 2)) + { + index29 = NPC.NewNPC(X, Y - 12, 65); + break; + } + Vector2 position = new Vector2((float) (X - 4), (float) (Y - 22)) - new Vector2(10f); + Utils.PoofOfSmoke(position); + NetMessage.SendData(106, number: ((int) position.X), number2: position.Y); + break; + } + break; + } + } + if (index29 < 0) + return; + Main.npc[index29].value = 0.0f; + Main.npc[index29].npcSlots = 0.0f; + Main.npc[index29].SpawnedFromStatue = true; + return; + case 349: + int num106 = (int) tile1.frameY / 18 % 3; + int index34 = j - num106; + int num107 = (int) tile1.frameX / 18; + while (num107 >= 2) + num107 -= 2; + int index35 = i - num107; + Wiring.SkipWire(index35, index34); + Wiring.SkipWire(index35, index34 + 1); + Wiring.SkipWire(index35, index34 + 2); + Wiring.SkipWire(index35 + 1, index34); + Wiring.SkipWire(index35 + 1, index34 + 1); + Wiring.SkipWire(index35 + 1, index34 + 2); + short num108 = Main.tile[index35, index34].frameX != (short) 0 ? (short) -216 : (short) 216; + for (int index36 = 0; index36 < 2; ++index36) + { + for (int index37 = 0; index37 < 3; ++index37) + Main.tile[index35 + index36, index34 + index37].frameX += num108; + } + if (Main.netMode == 2) + NetMessage.SendTileRange(-1, index35, index34, 2, 3); + Animation.NewTemporaryAnimation(num108 > (short) 0 ? 0 : 1, (ushort) 349, index35, index34); + return; + case 506: + int num109 = (int) tile1.frameY / 18 % 3; + int index38 = j - num109; + int num110 = (int) tile1.frameX / 18; + while (num110 >= 2) + num110 -= 2; + int index39 = i - num110; + Wiring.SkipWire(index39, index38); + Wiring.SkipWire(index39, index38 + 1); + Wiring.SkipWire(index39, index38 + 2); + Wiring.SkipWire(index39 + 1, index38); + Wiring.SkipWire(index39 + 1, index38 + 1); + Wiring.SkipWire(index39 + 1, index38 + 2); + short num111 = Main.tile[index39, index38].frameX >= (short) 72 ? (short) -72 : (short) 72; + for (int index40 = 0; index40 < 2; ++index40) + { + for (int index41 = 0; index41 < 3; ++index41) + Main.tile[index39 + index40, index38 + index41].frameX += num111; + } + if (Main.netMode != 2) + return; + NetMessage.SendTileRange(-1, index39, index38, 2, 3); + return; + case 546: + tile1.type = (ushort) 557; + WorldGen.SquareTileFrame(i, j); + NetMessage.SendTileSquare(-1, i, j, 1); + return; + case 557: + tile1.type = (ushort) 546; + WorldGen.SquareTileFrame(i, j); + NetMessage.SendTileSquare(-1, i, j, 1); + return; + default: + return; + } + } + } + } + } + } + } + } + } + + private static void GeyserTrap(int i, int j) + { + Tile tile = Main.tile[i, j]; + if (tile.type != (ushort) 443) + return; + int num = (int) tile.frameX / 36; + int i1 = i - ((int) tile.frameX - num * 36) / 18; + int j1 = j; + if (!Wiring.CheckMech(i1, j1, 200)) + return; + Vector2 zero = Vector2.Zero; + Vector2 vector2_1 = Vector2.Zero; + int Type = 654; + int Damage = 20; + Vector2 vector2_2; + if (num < 2) + { + vector2_2 = new Vector2((float) (i1 + 1), (float) j1) * 16f; + vector2_1 = new Vector2(0.0f, -8f); + } + else + { + vector2_2 = new Vector2((float) (i1 + 1), (float) (j1 + 1)) * 16f; + vector2_1 = new Vector2(0.0f, 8f); + } + if (Type == 0) + return; + Projectile.NewProjectile((float) (int) vector2_2.X, (float) (int) vector2_2.Y, vector2_1.X, vector2_1.Y, Type, Damage, 2f, Main.myPlayer); + } + + private static void Teleport() + { + if ((double) Wiring._teleport[0].X < (double) Wiring._teleport[1].X + 3.0 && (double) Wiring._teleport[0].X > (double) Wiring._teleport[1].X - 3.0 && (double) Wiring._teleport[0].Y > (double) Wiring._teleport[1].Y - 3.0 && (double) Wiring._teleport[0].Y < (double) Wiring._teleport[1].Y) + return; + Rectangle[] rectangleArray = new Rectangle[2]; + rectangleArray[0].X = (int) ((double) Wiring._teleport[0].X * 16.0); + rectangleArray[0].Width = 48; + rectangleArray[0].Height = 48; + rectangleArray[0].Y = (int) ((double) Wiring._teleport[0].Y * 16.0 - (double) rectangleArray[0].Height); + rectangleArray[1].X = (int) ((double) Wiring._teleport[1].X * 16.0); + rectangleArray[1].Width = 48; + rectangleArray[1].Height = 48; + rectangleArray[1].Y = (int) ((double) Wiring._teleport[1].Y * 16.0 - (double) rectangleArray[1].Height); + for (int index1 = 0; index1 < 2; ++index1) + { + Vector2 vector2_1 = new Vector2((float) (rectangleArray[1].X - rectangleArray[0].X), (float) (rectangleArray[1].Y - rectangleArray[0].Y)); + if (index1 == 1) + vector2_1 = new Vector2((float) (rectangleArray[0].X - rectangleArray[1].X), (float) (rectangleArray[0].Y - rectangleArray[1].Y)); + if (!Wiring.blockPlayerTeleportationForOneIteration) + { + for (int playerIndex = 0; playerIndex < (int) byte.MaxValue; ++playerIndex) + { + if (Main.player[playerIndex].active && !Main.player[playerIndex].dead && !Main.player[playerIndex].teleporting && Wiring.TeleporterHitboxIntersects(rectangleArray[index1], Main.player[playerIndex].Hitbox)) + { + Vector2 vector2_2 = Main.player[playerIndex].position + vector2_1; + Main.player[playerIndex].teleporting = true; + if (Main.netMode == 2) + RemoteClient.CheckSection(playerIndex, vector2_2); + Main.player[playerIndex].Teleport(vector2_2); + if (Main.netMode == 2) + NetMessage.SendData(65, number2: ((float) playerIndex), number3: vector2_2.X, number4: vector2_2.Y); + } + } + } + for (int index2 = 0; index2 < 200; ++index2) + { + if (Main.npc[index2].active && !Main.npc[index2].teleporting && Main.npc[index2].lifeMax > 5 && !Main.npc[index2].boss && !Main.npc[index2].noTileCollide) + { + int type = Main.npc[index2].type; + if (!NPCID.Sets.TeleportationImmune[type] && Wiring.TeleporterHitboxIntersects(rectangleArray[index1], Main.npc[index2].Hitbox)) + { + Main.npc[index2].teleporting = true; + Main.npc[index2].Teleport(Main.npc[index2].position + vector2_1); + } + } + } + } + for (int index = 0; index < (int) byte.MaxValue; ++index) + Main.player[index].teleporting = false; + for (int index = 0; index < 200; ++index) + Main.npc[index].teleporting = false; + } + + private static bool TeleporterHitboxIntersects(Rectangle teleporter, Rectangle entity) + { + Rectangle rectangle = Rectangle.Union(teleporter, entity); + return rectangle.Width <= teleporter.Width + entity.Width && rectangle.Height <= teleporter.Height + entity.Height; + } + + private static void DeActive(int i, int j) + { + if (!Main.tile[i, j].active() || Main.tile[i, j].type == (ushort) 226 && (double) j > Main.worldSurface && !NPC.downedPlantBoss) + return; + bool flag = Main.tileSolid[(int) Main.tile[i, j].type] && !TileID.Sets.NotReallySolid[(int) Main.tile[i, j].type]; + switch (Main.tile[i, j].type) + { + case 314: + case 386: + case 387: + case 388: + case 389: + case 476: + flag = false; + break; + } + if (!flag || Main.tile[i, j - 1].active() && (TileID.Sets.BasicChest[(int) Main.tile[i, j - 1].type] || Main.tile[i, j - 1].type == (ushort) 26 || Main.tile[i, j - 1].type == (ushort) 77 || Main.tile[i, j - 1].type == (ushort) 88 || Main.tile[i, j - 1].type == (ushort) 470 || Main.tile[i, j - 1].type == (ushort) 475 || Main.tile[i, j - 1].type == (ushort) 237 || Main.tile[i, j - 1].type == (ushort) 597 || !WorldGen.CanKillTile(i, j - 1))) + return; + Main.tile[i, j].inActive(true); + WorldGen.SquareTileFrame(i, j, false); + if (Main.netMode == 1) + return; + NetMessage.SendTileSquare(-1, i, j, 1); + } + + private static void ReActive(int i, int j) + { + Main.tile[i, j].inActive(false); + WorldGen.SquareTileFrame(i, j, false); + if (Main.netMode == 1) + return; + NetMessage.SendTileSquare(-1, i, j, 1); + } + + private static void MassWireOperationInner( + Point ps, + Point pe, + Vector2 dropPoint, + bool dir, + ref int wireCount, + ref int actuatorCount) + { + Math.Abs(ps.X - pe.X); + Math.Abs(ps.Y - pe.Y); + int num1 = Math.Sign(pe.X - ps.X); + int num2 = Math.Sign(pe.Y - ps.Y); + WiresUI.Settings.MultiToolMode toolMode = WiresUI.Settings.ToolMode; + Point pt = new Point(); + bool flag1 = false; + Item.StartCachingType(530); + Item.StartCachingType(849); + bool flag2 = dir; + int num3; + int num4; + int num5; + if (flag2) + { + pt.X = ps.X; + num3 = ps.Y; + num4 = pe.Y; + num5 = num2; + } + else + { + pt.Y = ps.Y; + num3 = ps.X; + num4 = pe.X; + num5 = num1; + } + for (int index = num3; index != num4 && !flag1; index += num5) + { + if (flag2) + pt.Y = index; + else + pt.X = index; + bool? nullable = Wiring.MassWireOperationStep(pt, toolMode, ref wireCount, ref actuatorCount); + if (nullable.HasValue && !nullable.Value) + { + flag1 = true; + break; + } + } + int num6; + int num7; + int num8; + if (flag2) + { + pt.Y = pe.Y; + num6 = ps.X; + num7 = pe.X; + num8 = num1; + } + else + { + pt.X = pe.X; + num6 = ps.Y; + num7 = pe.Y; + num8 = num2; + } + for (int index = num6; index != num7 && !flag1; index += num8) + { + if (!flag2) + pt.Y = index; + else + pt.X = index; + bool? nullable = Wiring.MassWireOperationStep(pt, toolMode, ref wireCount, ref actuatorCount); + if (nullable.HasValue && !nullable.Value) + { + flag1 = true; + break; + } + } + if (!flag1) + Wiring.MassWireOperationStep(pe, toolMode, ref wireCount, ref actuatorCount); + Item.DropCache(dropPoint, Vector2.Zero, 530); + Item.DropCache(dropPoint, Vector2.Zero, 849); + } + + private static bool? MassWireOperationStep( + Point pt, + WiresUI.Settings.MultiToolMode mode, + ref int wiresLeftToConsume, + ref int actuatorsLeftToConstume) + { + if (!WorldGen.InWorld(pt.X, pt.Y, 1)) + return new bool?(); + Tile tile = Main.tile[pt.X, pt.Y]; + if (tile == null) + return new bool?(); + if (!mode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Cutter)) + { + if (mode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Red) && !tile.wire()) + { + if (wiresLeftToConsume <= 0) + return new bool?(false); + --wiresLeftToConsume; + WorldGen.PlaceWire(pt.X, pt.Y); + NetMessage.SendData(17, number: 5, number2: ((float) pt.X), number3: ((float) pt.Y)); + } + if (mode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Green) && !tile.wire3()) + { + if (wiresLeftToConsume <= 0) + return new bool?(false); + --wiresLeftToConsume; + WorldGen.PlaceWire3(pt.X, pt.Y); + NetMessage.SendData(17, number: 12, number2: ((float) pt.X), number3: ((float) pt.Y)); + } + if (mode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Blue) && !tile.wire2()) + { + if (wiresLeftToConsume <= 0) + return new bool?(false); + --wiresLeftToConsume; + WorldGen.PlaceWire2(pt.X, pt.Y); + NetMessage.SendData(17, number: 10, number2: ((float) pt.X), number3: ((float) pt.Y)); + } + if (mode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Yellow) && !tile.wire4()) + { + if (wiresLeftToConsume <= 0) + return new bool?(false); + --wiresLeftToConsume; + WorldGen.PlaceWire4(pt.X, pt.Y); + NetMessage.SendData(17, number: 16, number2: ((float) pt.X), number3: ((float) pt.Y)); + } + if (mode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Actuator) && !tile.actuator()) + { + if (actuatorsLeftToConstume <= 0) + return new bool?(false); + --actuatorsLeftToConstume; + WorldGen.PlaceActuator(pt.X, pt.Y); + NetMessage.SendData(17, number: 8, number2: ((float) pt.X), number3: ((float) pt.Y)); + } + } + if (mode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Cutter)) + { + if (mode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Red) && tile.wire() && WorldGen.KillWire(pt.X, pt.Y)) + NetMessage.SendData(17, number: 6, number2: ((float) pt.X), number3: ((float) pt.Y)); + if (mode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Green) && tile.wire3() && WorldGen.KillWire3(pt.X, pt.Y)) + NetMessage.SendData(17, number: 13, number2: ((float) pt.X), number3: ((float) pt.Y)); + if (mode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Blue) && tile.wire2() && WorldGen.KillWire2(pt.X, pt.Y)) + NetMessage.SendData(17, number: 11, number2: ((float) pt.X), number3: ((float) pt.Y)); + if (mode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Yellow) && tile.wire4() && WorldGen.KillWire4(pt.X, pt.Y)) + NetMessage.SendData(17, number: 17, number2: ((float) pt.X), number3: ((float) pt.Y)); + if (mode.HasFlag((Enum) WiresUI.Settings.MultiToolMode.Actuator) && tile.actuator() && WorldGen.KillActuator(pt.X, pt.Y)) + NetMessage.SendData(17, number: 9, number2: ((float) pt.X), number3: ((float) pt.Y)); + } + return new bool?(true); + } + } +} diff --git a/World.cs b/World.cs new file mode 100644 index 0000000..7917b8b --- /dev/null +++ b/World.cs @@ -0,0 +1,19 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.World +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria +{ + public class World + { + public Tile[,] Tiles => Main.tile; + + public int TileColumns => Main.maxTilesX; + + public int TileRows => Main.maxTilesY; + + public Player[] Players => Main.player; + } +} diff --git a/WorldBuilding/Actions.cs b/WorldBuilding/Actions.cs new file mode 100644 index 0000000..fc33324 --- /dev/null +++ b/WorldBuilding/Actions.cs @@ -0,0 +1,388 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.Actions +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; +using Terraria.DataStructures; +using Terraria.GameContent; + +namespace Terraria.WorldBuilding +{ + public static class Actions + { + public static GenAction Chain(params GenAction[] actions) + { + for (int index = 0; index < actions.Length - 1; ++index) + actions[index].NextAction = actions[index + 1]; + return actions[0]; + } + + public static GenAction Continue(GenAction action) => (GenAction) new Actions.ContinueWrapper(action); + + public class ContinueWrapper : GenAction + { + private GenAction _action; + + public ContinueWrapper(GenAction action) => this._action = action; + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + this._action.Apply(origin, x, y, args); + return this.UnitApply(origin, x, y, args); + } + } + + public class Count : GenAction + { + private Ref _count; + + public Count(Ref count) => this._count = count; + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + ++this._count.Value; + return this.UnitApply(origin, x, y, args); + } + } + + public class Scanner : GenAction + { + private Ref _count; + + public Scanner(Ref count) => this._count = count; + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + ++this._count.Value; + return this.UnitApply(origin, x, y, args); + } + } + + public class TileScanner : GenAction + { + private ushort[] _tileIds; + private Dictionary _tileCounts; + + public TileScanner(params ushort[] tiles) + { + this._tileIds = tiles; + this._tileCounts = new Dictionary(); + for (int index = 0; index < tiles.Length; ++index) + this._tileCounts[this._tileIds[index]] = 0; + } + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + Tile tile = GenBase._tiles[x, y]; + if (tile.active() && this._tileCounts.ContainsKey(tile.type)) + this._tileCounts[tile.type]++; + return this.UnitApply(origin, x, y, args); + } + + public Actions.TileScanner Output(Dictionary resultsOutput) + { + this._tileCounts = resultsOutput; + for (int index = 0; index < this._tileIds.Length; ++index) + { + if (!this._tileCounts.ContainsKey(this._tileIds[index])) + this._tileCounts[this._tileIds[index]] = 0; + } + return this; + } + + public Dictionary GetResults() => this._tileCounts; + + public int GetCount(ushort tileId) => !this._tileCounts.ContainsKey(tileId) ? -1 : this._tileCounts[tileId]; + } + + public class Blank : GenAction + { + public override bool Apply(Point origin, int x, int y, params object[] args) => this.UnitApply(origin, x, y, args); + } + + public class Custom : GenAction + { + private GenBase.CustomPerUnitAction _perUnit; + + public Custom(GenBase.CustomPerUnitAction perUnit) => this._perUnit = perUnit; + + public override bool Apply(Point origin, int x, int y, params object[] args) => this._perUnit(x, y, args) | this.UnitApply(origin, x, y, args); + } + + public class ClearMetadata : GenAction + { + public override bool Apply(Point origin, int x, int y, params object[] args) + { + GenBase._tiles[x, y].ClearMetadata(); + return this.UnitApply(origin, x, y, args); + } + } + + public class Clear : GenAction + { + public override bool Apply(Point origin, int x, int y, params object[] args) + { + GenBase._tiles[x, y].ClearEverything(); + return this.UnitApply(origin, x, y, args); + } + } + + public class ClearTile : GenAction + { + private bool _frameNeighbors; + + public ClearTile(bool frameNeighbors = false) => this._frameNeighbors = frameNeighbors; + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + WorldUtils.ClearTile(x, y, this._frameNeighbors); + return this.UnitApply(origin, x, y, args); + } + } + + public class ClearWall : GenAction + { + private bool _frameNeighbors; + + public ClearWall(bool frameNeighbors = false) => this._frameNeighbors = frameNeighbors; + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + WorldUtils.ClearWall(x, y, this._frameNeighbors); + return this.UnitApply(origin, x, y, args); + } + } + + public class HalfBlock : GenAction + { + private bool _value; + + public HalfBlock(bool value = true) => this._value = value; + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + GenBase._tiles[x, y].halfBrick(this._value); + return this.UnitApply(origin, x, y, args); + } + } + + public class SetTile : GenAction + { + private ushort _type; + private bool _doFraming; + private bool _doNeighborFraming; + + public SetTile(ushort type, bool setSelfFrames = false, bool setNeighborFrames = true) + { + this._type = type; + this._doFraming = setSelfFrames; + this._doNeighborFraming = setNeighborFrames; + } + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + GenBase._tiles[x, y].Clear(~(TileDataType.Wiring | TileDataType.Actuator)); + GenBase._tiles[x, y].type = this._type; + GenBase._tiles[x, y].active(true); + if (this._doFraming) + WorldUtils.TileFrame(x, y, this._doNeighborFraming); + return this.UnitApply(origin, x, y, args); + } + } + + public class SetTileKeepWall : GenAction + { + private ushort _type; + private bool _doFraming; + private bool _doNeighborFraming; + + public SetTileKeepWall(ushort type, bool setSelfFrames = false, bool setNeighborFrames = true) + { + this._type = type; + this._doFraming = setSelfFrames; + this._doNeighborFraming = setNeighborFrames; + } + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + ushort wall = GenBase._tiles[x, y].wall; + int wallFrameX = GenBase._tiles[x, y].wallFrameX(); + int wallFrameY = GenBase._tiles[x, y].wallFrameY(); + GenBase._tiles[x, y].Clear(~(TileDataType.Wiring | TileDataType.Actuator)); + GenBase._tiles[x, y].type = this._type; + GenBase._tiles[x, y].active(true); + if (wall > (ushort) 0) + { + GenBase._tiles[x, y].wall = wall; + GenBase._tiles[x, y].wallFrameX(wallFrameX); + GenBase._tiles[x, y].wallFrameY(wallFrameY); + } + if (this._doFraming) + WorldUtils.TileFrame(x, y, this._doNeighborFraming); + return this.UnitApply(origin, x, y, args); + } + } + + public class DebugDraw : GenAction + { + private Color _color; + private SpriteBatch _spriteBatch; + + public DebugDraw(SpriteBatch spriteBatch, Color color = default (Color)) + { + this._spriteBatch = spriteBatch; + this._color = color; + } + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + this._spriteBatch.Draw(TextureAssets.MagicPixel.Value, new Microsoft.Xna.Framework.Rectangle((x << 4) - (int) Main.screenPosition.X, (y << 4) - (int) Main.screenPosition.Y, 16, 16), this._color); + return this.UnitApply(origin, x, y, args); + } + } + + public class SetSlope : GenAction + { + private int _slope; + + public SetSlope(int slope) => this._slope = slope; + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + WorldGen.SlopeTile(x, y, this._slope); + return this.UnitApply(origin, x, y, args); + } + } + + public class SetHalfTile : GenAction + { + private bool _halfTile; + + public SetHalfTile(bool halfTile) => this._halfTile = halfTile; + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + GenBase._tiles[x, y].halfBrick(this._halfTile); + return this.UnitApply(origin, x, y, args); + } + } + + public class PlaceTile : GenAction + { + private ushort _type; + private int _style; + + public PlaceTile(ushort type, int style = 0) + { + this._type = type; + this._style = style; + } + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + WorldGen.PlaceTile(x, y, (int) this._type, true, style: this._style); + return this.UnitApply(origin, x, y, args); + } + } + + public class RemoveWall : GenAction + { + public override bool Apply(Point origin, int x, int y, params object[] args) + { + GenBase._tiles[x, y].wall = (ushort) 0; + return this.UnitApply(origin, x, y, args); + } + } + + public class PlaceWall : GenAction + { + private ushort _type; + private bool _neighbors; + + public PlaceWall(ushort type, bool neighbors = true) + { + this._type = type; + this._neighbors = neighbors; + } + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + GenBase._tiles[x, y].wall = this._type; + WorldGen.SquareWallFrame(x, y); + if (this._neighbors) + { + WorldGen.SquareWallFrame(x + 1, y); + WorldGen.SquareWallFrame(x - 1, y); + WorldGen.SquareWallFrame(x, y - 1); + WorldGen.SquareWallFrame(x, y + 1); + } + return this.UnitApply(origin, x, y, args); + } + } + + public class SetLiquid : GenAction + { + private int _type; + private byte _value; + + public SetLiquid(int type = 0, byte value = 255) + { + this._value = value; + this._type = type; + } + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + GenBase._tiles[x, y].liquidType(this._type); + GenBase._tiles[x, y].liquid = this._value; + return this.UnitApply(origin, x, y, args); + } + } + + public class SwapSolidTile : GenAction + { + private ushort _type; + + public SwapSolidTile(ushort type) => this._type = type; + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + Tile tile = GenBase._tiles[x, y]; + if (!WorldGen.SolidTile(tile)) + return this.Fail(); + tile.ResetToType(this._type); + return this.UnitApply(origin, x, y, args); + } + } + + public class SetFrames : GenAction + { + private bool _frameNeighbors; + + public SetFrames(bool frameNeighbors = false) => this._frameNeighbors = frameNeighbors; + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + WorldUtils.TileFrame(x, y, this._frameNeighbors); + return this.UnitApply(origin, x, y, args); + } + } + + public class Smooth : GenAction + { + private bool _applyToNeighbors; + + public Smooth(bool applyToNeighbors = false) => this._applyToNeighbors = applyToNeighbors; + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + Tile.SmoothSlope(x, y, this._applyToNeighbors); + return this.UnitApply(origin, x, y, args); + } + } + } +} diff --git a/WorldBuilding/Conditions.cs b/WorldBuilding/Conditions.cs new file mode 100644 index 0000000..7d98b70 --- /dev/null +++ b/WorldBuilding/Conditions.cs @@ -0,0 +1,56 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.Conditions +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.WorldBuilding +{ + public static class Conditions + { + public class IsTile : GenCondition + { + private ushort[] _types; + + public IsTile(params ushort[] types) => this._types = types; + + protected override bool CheckValidity(int x, int y) + { + if (GenBase._tiles[x, y].active()) + { + for (int index = 0; index < this._types.Length; ++index) + { + if ((int) GenBase._tiles[x, y].type == (int) this._types[index]) + return true; + } + } + return false; + } + } + + public class Continue : GenCondition + { + protected override bool CheckValidity(int x, int y) => false; + } + + public class MysticSnake : GenCondition + { + protected override bool CheckValidity(int x, int y) => GenBase._tiles[x, y].active() && !Main.tileCut[(int) GenBase._tiles[x, y].type] && GenBase._tiles[x, y].type != (ushort) 504; + } + + public class IsSolid : GenCondition + { + protected override bool CheckValidity(int x, int y) => WorldGen.InWorld(x, y, 10) && GenBase._tiles[x, y].active() && Main.tileSolid[(int) GenBase._tiles[x, y].type]; + } + + public class HasLava : GenCondition + { + protected override bool CheckValidity(int x, int y) => GenBase._tiles[x, y].liquid > (byte) 0 && GenBase._tiles[x, y].liquidType() == (byte) 1; + } + + public class NotNull : GenCondition + { + protected override bool CheckValidity(int x, int y) => GenBase._tiles[x, y] != null; + } + } +} diff --git a/WorldBuilding/GenAction.cs b/WorldBuilding/GenAction.cs new file mode 100644 index 0000000..17bf03d --- /dev/null +++ b/WorldBuilding/GenAction.cs @@ -0,0 +1,40 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.GenAction +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.WorldBuilding +{ + public abstract class GenAction : GenBase + { + public GenAction NextAction; + public ShapeData OutputData; + private bool _returnFalseOnFailure = true; + + public abstract bool Apply(Point origin, int x, int y, params object[] args); + + protected bool UnitApply(Point origin, int x, int y, params object[] args) + { + if (this.OutputData != null) + this.OutputData.Add(x - origin.X, y - origin.Y); + return this.NextAction == null || this.NextAction.Apply(origin, x, y, args); + } + + public GenAction IgnoreFailures() + { + this._returnFalseOnFailure = false; + return this; + } + + protected bool Fail() => !this._returnFalseOnFailure; + + public GenAction Output(ShapeData data) + { + this.OutputData = data; + return this; + } + } +} diff --git a/WorldBuilding/GenBase.cs b/WorldBuilding/GenBase.cs new file mode 100644 index 0000000..5b5c5d0 --- /dev/null +++ b/WorldBuilding/GenBase.cs @@ -0,0 +1,23 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.GenBase +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.Utilities; + +namespace Terraria.WorldBuilding +{ + public class GenBase + { + protected static UnifiedRandom _random => WorldGen.genRand; + + protected static Tile[,] _tiles => Main.tile; + + protected static int _worldWidth => Main.maxTilesX; + + protected static int _worldHeight => Main.maxTilesY; + + public delegate bool CustomPerUnitAction(int x, int y, params object[] args); + } +} diff --git a/WorldBuilding/GenCondition.cs b/WorldBuilding/GenCondition.cs new file mode 100644 index 0000000..f32ad80 --- /dev/null +++ b/WorldBuilding/GenCondition.cs @@ -0,0 +1,78 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.GenCondition +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.WorldBuilding +{ + public abstract class GenCondition : GenBase + { + private bool InvertResults; + private int _width; + private int _height; + private GenCondition.AreaType _areaType = GenCondition.AreaType.None; + + public bool IsValid(int x, int y) + { + switch (this._areaType) + { + case GenCondition.AreaType.And: + for (int x1 = x; x1 < x + this._width; ++x1) + { + for (int y1 = y; y1 < y + this._height; ++y1) + { + if (!this.CheckValidity(x1, y1)) + return this.InvertResults; + } + } + return !this.InvertResults; + case GenCondition.AreaType.Or: + for (int x2 = x; x2 < x + this._width; ++x2) + { + for (int y2 = y; y2 < y + this._height; ++y2) + { + if (this.CheckValidity(x2, y2)) + return !this.InvertResults; + } + } + return this.InvertResults; + case GenCondition.AreaType.None: + return this.CheckValidity(x, y) ^ this.InvertResults; + default: + return true; + } + } + + public GenCondition Not() + { + this.InvertResults = !this.InvertResults; + return this; + } + + public GenCondition AreaOr(int width, int height) + { + this._areaType = GenCondition.AreaType.Or; + this._width = width; + this._height = height; + return this; + } + + public GenCondition AreaAnd(int width, int height) + { + this._areaType = GenCondition.AreaType.And; + this._width = width; + this._height = height; + return this; + } + + protected abstract bool CheckValidity(int x, int y); + + private enum AreaType + { + And, + Or, + None, + } + } +} diff --git a/WorldBuilding/GenModShape.cs b/WorldBuilding/GenModShape.cs new file mode 100644 index 0000000..ea4401c --- /dev/null +++ b/WorldBuilding/GenModShape.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.GenModShape +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.WorldBuilding +{ + public abstract class GenModShape : GenShape + { + protected ShapeData _data; + + public GenModShape(ShapeData data) => this._data = data; + } +} diff --git a/WorldBuilding/GenPass.cs b/WorldBuilding/GenPass.cs new file mode 100644 index 0000000..f7c39cb --- /dev/null +++ b/WorldBuilding/GenPass.cs @@ -0,0 +1,49 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.GenPass +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System; +using Terraria.IO; + +namespace Terraria.WorldBuilding +{ + public abstract class GenPass : GenBase + { + public string Name; + public float Weight; + private Action _onComplete; + private Action _onBegin; + + public GenPass(string name, float loadWeight) + { + this.Name = name; + this.Weight = loadWeight; + } + + protected abstract void ApplyPass(GenerationProgress progress, GameConfiguration configuration); + + public void Apply(GenerationProgress progress, GameConfiguration configuration) + { + if (this._onBegin != null) + this._onBegin(this); + this.ApplyPass(progress, configuration); + if (this._onComplete == null) + return; + this._onComplete(this); + } + + public GenPass OnBegin(Action beginAction) + { + this._onBegin = beginAction; + return this; + } + + public GenPass OnComplete(Action completionAction) + { + this._onComplete = completionAction; + return this; + } + } +} diff --git a/WorldBuilding/GenSearch.cs b/WorldBuilding/GenSearch.cs new file mode 100644 index 0000000..ec3d965 --- /dev/null +++ b/WorldBuilding/GenSearch.cs @@ -0,0 +1,41 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.GenSearch +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.WorldBuilding +{ + public abstract class GenSearch : GenBase + { + public static Point NOT_FOUND = new Point(int.MaxValue, int.MaxValue); + private bool _requireAll = true; + private GenCondition[] _conditions; + + public GenSearch Conditions(params GenCondition[] conditions) + { + this._conditions = conditions; + return this; + } + + public abstract Point Find(Point origin); + + protected bool Check(int x, int y) + { + for (int index = 0; index < this._conditions.Length; ++index) + { + if (this._requireAll ^ this._conditions[index].IsValid(x, y)) + return !this._requireAll; + } + return this._requireAll; + } + + public GenSearch RequireAll(bool mode) + { + this._requireAll = mode; + return this; + } + } +} diff --git a/WorldBuilding/GenShape.cs b/WorldBuilding/GenShape.cs new file mode 100644 index 0000000..bc8a287 --- /dev/null +++ b/WorldBuilding/GenShape.cs @@ -0,0 +1,37 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.GenShape +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.WorldBuilding +{ + public abstract class GenShape : GenBase + { + private ShapeData _outputData; + protected bool _quitOnFail; + + public abstract bool Perform(Point origin, GenAction action); + + protected bool UnitApply(GenAction action, Point origin, int x, int y, params object[] args) + { + if (this._outputData != null) + this._outputData.Add(x - origin.X, y - origin.Y); + return action.Apply(origin, x, y, args); + } + + public GenShape Output(ShapeData outputData) + { + this._outputData = outputData; + return this; + } + + public GenShape QuitOnFail(bool value = true) + { + this._quitOnFail = value; + return this; + } + } +} diff --git a/WorldBuilding/GenShapeActionPair.cs b/WorldBuilding/GenShapeActionPair.cs new file mode 100644 index 0000000..6e1e473 --- /dev/null +++ b/WorldBuilding/GenShapeActionPair.cs @@ -0,0 +1,20 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.GenShapeActionPair +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.WorldBuilding +{ + public struct GenShapeActionPair + { + public readonly GenShape Shape; + public readonly GenAction Action; + + public GenShapeActionPair(GenShape shape, GenAction action) + { + this.Shape = shape; + this.Action = action; + } + } +} diff --git a/WorldBuilding/GenStructure.cs b/WorldBuilding/GenStructure.cs new file mode 100644 index 0000000..041eb97 --- /dev/null +++ b/WorldBuilding/GenStructure.cs @@ -0,0 +1,15 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.GenStructure +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.WorldBuilding +{ + public abstract class GenStructure : GenBase + { + public abstract bool Place(Point origin, StructureMap structures); + } +} diff --git a/WorldBuilding/GenerationProgress.cs b/WorldBuilding/GenerationProgress.cs new file mode 100644 index 0000000..bcbe224 --- /dev/null +++ b/WorldBuilding/GenerationProgress.cs @@ -0,0 +1,45 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.GenerationProgress +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.WorldBuilding +{ + public class GenerationProgress + { + private string _message = ""; + private float _value; + private float _totalProgress; + public float TotalWeight; + public float CurrentPassWeight = 1f; + + public string Message + { + get => string.Format(this._message, (object) this.Value); + set => this._message = value.Replace("%", "{0:0.0%}"); + } + + public float Value + { + set => this._value = Utils.Clamp(value, 0.0f, 1f); + get => this._value; + } + + public float TotalProgress => (double) this.TotalWeight == 0.0 ? 0.0f : (this.Value * this.CurrentPassWeight + this._totalProgress) / this.TotalWeight; + + public void Set(float value) => this.Value = value; + + public void Start(float weight) + { + this.CurrentPassWeight = weight; + this._value = 0.0f; + } + + public void End() + { + this._totalProgress += this.CurrentPassWeight; + this._value = 0.0f; + } + } +} diff --git a/WorldBuilding/MicroBiome.cs b/WorldBuilding/MicroBiome.cs new file mode 100644 index 0000000..be6f0f7 --- /dev/null +++ b/WorldBuilding/MicroBiome.cs @@ -0,0 +1,12 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.MicroBiome +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria.WorldBuilding +{ + public abstract class MicroBiome : GenStructure + { + } +} diff --git a/WorldBuilding/ModShapes.cs b/WorldBuilding/ModShapes.cs new file mode 100644 index 0000000..2ad5e12 --- /dev/null +++ b/WorldBuilding/ModShapes.cs @@ -0,0 +1,130 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.ModShapes +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using Terraria.DataStructures; + +namespace Terraria.WorldBuilding +{ + public static class ModShapes + { + public class All : GenModShape + { + public All(ShapeData data) + : base(data) + { + } + + public override bool Perform(Point origin, GenAction action) + { + foreach (Point16 point16 in this._data.GetData()) + { + if (!this.UnitApply(action, origin, (int) point16.X + origin.X, (int) point16.Y + origin.Y) && this._quitOnFail) + return false; + } + return true; + } + } + + public class OuterOutline : GenModShape + { + private static readonly int[] POINT_OFFSETS = new int[16] + { + 1, + 0, + -1, + 0, + 0, + 1, + 0, + -1, + 1, + 1, + 1, + -1, + -1, + 1, + -1, + -1 + }; + private bool _useDiagonals; + private bool _useInterior; + + public OuterOutline(ShapeData data, bool useDiagonals = true, bool useInterior = false) + : base(data) + { + this._useDiagonals = useDiagonals; + this._useInterior = useInterior; + } + + public override bool Perform(Point origin, GenAction action) + { + int num = this._useDiagonals ? 16 : 8; + foreach (Point16 point16 in this._data.GetData()) + { + if (this._useInterior && !this.UnitApply(action, origin, (int) point16.X + origin.X, (int) point16.Y + origin.Y) && this._quitOnFail) + return false; + for (int index = 0; index < num; index += 2) + { + if (!this._data.Contains((int) point16.X + ModShapes.OuterOutline.POINT_OFFSETS[index], (int) point16.Y + ModShapes.OuterOutline.POINT_OFFSETS[index + 1]) && !this.UnitApply(action, origin, origin.X + (int) point16.X + ModShapes.OuterOutline.POINT_OFFSETS[index], origin.Y + (int) point16.Y + ModShapes.OuterOutline.POINT_OFFSETS[index + 1]) && this._quitOnFail) + return false; + } + } + return true; + } + } + + public class InnerOutline : GenModShape + { + private static readonly int[] POINT_OFFSETS = new int[16] + { + 1, + 0, + -1, + 0, + 0, + 1, + 0, + -1, + 1, + 1, + 1, + -1, + -1, + 1, + -1, + -1 + }; + private bool _useDiagonals; + + public InnerOutline(ShapeData data, bool useDiagonals = true) + : base(data) + { + this._useDiagonals = useDiagonals; + } + + public override bool Perform(Point origin, GenAction action) + { + int num = this._useDiagonals ? 16 : 8; + foreach (Point16 point16 in this._data.GetData()) + { + bool flag = false; + for (int index = 0; index < num; index += 2) + { + if (!this._data.Contains((int) point16.X + ModShapes.InnerOutline.POINT_OFFSETS[index], (int) point16.Y + ModShapes.InnerOutline.POINT_OFFSETS[index + 1])) + { + flag = true; + break; + } + } + if (flag && !this.UnitApply(action, origin, (int) point16.X + origin.X, (int) point16.Y + origin.Y) && this._quitOnFail) + return false; + } + return true; + } + } + } +} diff --git a/WorldBuilding/Modifiers.cs b/WorldBuilding/Modifiers.cs new file mode 100644 index 0000000..5e5da01 --- /dev/null +++ b/WorldBuilding/Modifiers.cs @@ -0,0 +1,469 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.Modifiers +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; + +namespace Terraria.WorldBuilding +{ + public static class Modifiers + { + public class ShapeScale : GenAction + { + private int _scale; + + public ShapeScale(int scale) => this._scale = scale; + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + bool flag = false; + for (int index1 = 0; index1 < this._scale; ++index1) + { + for (int index2 = 0; index2 < this._scale; ++index2) + flag |= !this.UnitApply(origin, (x - origin.X << 1) + index1 + origin.X, (y - origin.Y << 1) + index2 + origin.Y); + } + return !flag; + } + } + + public class Expand : GenAction + { + private int _xExpansion; + private int _yExpansion; + + public Expand(int expansion) + { + this._xExpansion = expansion; + this._yExpansion = expansion; + } + + public Expand(int xExpansion, int yExpansion) + { + this._xExpansion = xExpansion; + this._yExpansion = yExpansion; + } + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + bool flag = false; + for (int index1 = -this._xExpansion; index1 <= this._xExpansion; ++index1) + { + for (int index2 = -this._yExpansion; index2 <= this._yExpansion; ++index2) + flag |= !this.UnitApply(origin, x + index1, y + index2, args); + } + return !flag; + } + } + + public class RadialDither : GenAction + { + private float _innerRadius; + private float _outerRadius; + + public RadialDither(float innerRadius, float outerRadius) + { + this._innerRadius = innerRadius; + this._outerRadius = outerRadius; + } + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + Vector2 vector2 = new Vector2((float) origin.X, (float) origin.Y); + float num = Math.Max(0.0f, Math.Min(1f, (float) (((double) Vector2.Distance(new Vector2((float) x, (float) y), vector2) - (double) this._innerRadius) / ((double) this._outerRadius - (double) this._innerRadius)))); + return GenBase._random.NextDouble() > (double) num ? this.UnitApply(origin, x, y, args) : this.Fail(); + } + } + + public class Blotches : GenAction + { + private int _minX; + private int _minY; + private int _maxX; + private int _maxY; + private double _chance; + + public Blotches(int scale = 2, double chance = 0.3) + { + this._minX = scale; + this._minY = scale; + this._maxX = scale; + this._maxY = scale; + this._chance = chance; + } + + public Blotches(int xScale, int yScale, double chance = 0.3) + { + this._minX = xScale; + this._maxX = xScale; + this._minY = yScale; + this._maxY = yScale; + this._chance = chance; + } + + public Blotches(int leftScale, int upScale, int rightScale, int downScale, double chance = 0.3) + { + this._minX = leftScale; + this._maxX = rightScale; + this._minY = upScale; + this._maxY = downScale; + this._chance = chance; + } + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + GenBase._random.NextDouble(); + if (GenBase._random.NextDouble() >= this._chance) + return this.UnitApply(origin, x, y, args); + bool flag = false; + int num1 = GenBase._random.Next(1 - this._minX, 1); + int num2 = GenBase._random.Next(0, this._maxX); + int num3 = GenBase._random.Next(1 - this._minY, 1); + int num4 = GenBase._random.Next(0, this._maxY); + for (int index1 = num1; index1 <= num2; ++index1) + { + for (int index2 = num3; index2 <= num4; ++index2) + flag |= !this.UnitApply(origin, x + index1, y + index2, args); + } + return !flag; + } + } + + public class InShape : GenAction + { + private readonly ShapeData _shapeData; + + public InShape(ShapeData shapeData) => this._shapeData = shapeData; + + public override bool Apply(Point origin, int x, int y, params object[] args) => !this._shapeData.Contains(x - origin.X, y - origin.Y) ? this.Fail() : this.UnitApply(origin, x, y, args); + } + + public class NotInShape : GenAction + { + private readonly ShapeData _shapeData; + + public NotInShape(ShapeData shapeData) => this._shapeData = shapeData; + + public override bool Apply(Point origin, int x, int y, params object[] args) => this._shapeData.Contains(x - origin.X, y - origin.Y) ? this.Fail() : this.UnitApply(origin, x, y, args); + } + + public class Conditions : GenAction + { + private readonly GenCondition[] _conditions; + + public Conditions(params GenCondition[] conditions) => this._conditions = conditions; + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + bool flag = true; + for (int index = 0; index < this._conditions.Length; ++index) + flag &= this._conditions[index].IsValid(x, y); + return flag ? this.UnitApply(origin, x, y, args) : this.Fail(); + } + } + + public class OnlyWalls : GenAction + { + private ushort[] _types; + + public OnlyWalls(params ushort[] types) => this._types = types; + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + for (int index = 0; index < this._types.Length; ++index) + { + if ((int) GenBase._tiles[x, y].wall == (int) this._types[index]) + return this.UnitApply(origin, x, y, args); + } + return this.Fail(); + } + } + + public class OnlyTiles : GenAction + { + private ushort[] _types; + + public OnlyTiles(params ushort[] types) => this._types = types; + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + if (!GenBase._tiles[x, y].active()) + return this.Fail(); + for (int index = 0; index < this._types.Length; ++index) + { + if ((int) GenBase._tiles[x, y].type == (int) this._types[index]) + return this.UnitApply(origin, x, y, args); + } + return this.Fail(); + } + } + + public class IsTouching : GenAction + { + private static readonly int[] DIRECTIONS = new int[16] + { + 0, + -1, + 1, + 0, + -1, + 0, + 0, + 1, + -1, + -1, + 1, + -1, + -1, + 1, + 1, + 1 + }; + private bool _useDiagonals; + private ushort[] _tileIds; + + public IsTouching(bool useDiagonals, params ushort[] tileIds) + { + this._useDiagonals = useDiagonals; + this._tileIds = tileIds; + } + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + int num = this._useDiagonals ? 16 : 8; + for (int index1 = 0; index1 < num; index1 += 2) + { + Tile tile = GenBase._tiles[x + Modifiers.IsTouching.DIRECTIONS[index1], y + Modifiers.IsTouching.DIRECTIONS[index1 + 1]]; + if (tile.active()) + { + for (int index2 = 0; index2 < this._tileIds.Length; ++index2) + { + if ((int) tile.type == (int) this._tileIds[index2]) + return this.UnitApply(origin, x, y, args); + } + } + } + return this.Fail(); + } + } + + public class NotTouching : GenAction + { + private static readonly int[] DIRECTIONS = new int[16] + { + 0, + -1, + 1, + 0, + -1, + 0, + 0, + 1, + -1, + -1, + 1, + -1, + -1, + 1, + 1, + 1 + }; + private bool _useDiagonals; + private ushort[] _tileIds; + + public NotTouching(bool useDiagonals, params ushort[] tileIds) + { + this._useDiagonals = useDiagonals; + this._tileIds = tileIds; + } + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + int num = this._useDiagonals ? 16 : 8; + for (int index1 = 0; index1 < num; index1 += 2) + { + Tile tile = GenBase._tiles[x + Modifiers.NotTouching.DIRECTIONS[index1], y + Modifiers.NotTouching.DIRECTIONS[index1 + 1]]; + if (tile.active()) + { + for (int index2 = 0; index2 < this._tileIds.Length; ++index2) + { + if ((int) tile.type == (int) this._tileIds[index2]) + return this.Fail(); + } + } + } + return this.UnitApply(origin, x, y, args); + } + } + + public class IsTouchingAir : GenAction + { + private static readonly int[] DIRECTIONS = new int[16] + { + 0, + -1, + 1, + 0, + -1, + 0, + 0, + 1, + -1, + -1, + 1, + -1, + -1, + 1, + 1, + 1 + }; + private bool _useDiagonals; + + public IsTouchingAir(bool useDiagonals = false) => this._useDiagonals = useDiagonals; + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + int num = this._useDiagonals ? 16 : 8; + for (int index = 0; index < num; index += 2) + { + if (!GenBase._tiles[x + Modifiers.IsTouchingAir.DIRECTIONS[index], y + Modifiers.IsTouchingAir.DIRECTIONS[index + 1]].active()) + return this.UnitApply(origin, x, y, args); + } + return this.Fail(); + } + } + + public class SkipTiles : GenAction + { + private ushort[] _types; + + public SkipTiles(params ushort[] types) => this._types = types; + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + if (!GenBase._tiles[x, y].active()) + return this.UnitApply(origin, x, y, args); + for (int index = 0; index < this._types.Length; ++index) + { + if ((int) GenBase._tiles[x, y].type == (int) this._types[index]) + return this.Fail(); + } + return this.UnitApply(origin, x, y, args); + } + } + + public class HasLiquid : GenAction + { + private int _liquidType; + private int _liquidLevel; + + public HasLiquid(int liquidLevel = -1, int liquidType = -1) + { + this._liquidType = liquidType; + this._liquidLevel = liquidLevel; + } + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + Tile tile = GenBase._tiles[x, y]; + return (this._liquidType == -1 || this._liquidType == (int) tile.liquidType()) && (this._liquidLevel == -1 && tile.liquid != (byte) 0 || this._liquidLevel == (int) tile.liquid) ? this.UnitApply(origin, x, y, args) : this.Fail(); + } + } + + public class SkipWalls : GenAction + { + private ushort[] _types; + + public SkipWalls(params ushort[] types) => this._types = types; + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + for (int index = 0; index < this._types.Length; ++index) + { + if ((int) GenBase._tiles[x, y].wall == (int) this._types[index]) + return this.Fail(); + } + return this.UnitApply(origin, x, y, args); + } + } + + public class IsEmpty : GenAction + { + public override bool Apply(Point origin, int x, int y, params object[] args) => !GenBase._tiles[x, y].active() ? this.UnitApply(origin, x, y, args) : this.Fail(); + } + + public class IsSolid : GenAction + { + public override bool Apply(Point origin, int x, int y, params object[] args) => GenBase._tiles[x, y].active() && WorldGen.SolidOrSlopedTile(x, y) ? this.UnitApply(origin, x, y, args) : this.Fail(); + } + + public class IsNotSolid : GenAction + { + public override bool Apply(Point origin, int x, int y, params object[] args) => !GenBase._tiles[x, y].active() || !WorldGen.SolidOrSlopedTile(x, y) ? this.UnitApply(origin, x, y, args) : this.Fail(); + } + + public class RectangleMask : GenAction + { + private int _xMin; + private int _yMin; + private int _xMax; + private int _yMax; + + public RectangleMask(int xMin, int xMax, int yMin, int yMax) + { + this._xMin = xMin; + this._yMin = yMin; + this._xMax = xMax; + this._yMax = yMax; + } + + public override bool Apply(Point origin, int x, int y, params object[] args) => x >= this._xMin + origin.X && x <= this._xMax + origin.X && y >= this._yMin + origin.Y && y <= this._yMax + origin.Y ? this.UnitApply(origin, x, y, args) : this.Fail(); + } + + public class Offset : GenAction + { + private int _xOffset; + private int _yOffset; + + public Offset(int x, int y) + { + this._xOffset = x; + this._yOffset = y; + } + + public override bool Apply(Point origin, int x, int y, params object[] args) => this.UnitApply(origin, x + this._xOffset, y + this._yOffset, args); + } + + public class Dither : GenAction + { + private double _failureChance; + + public Dither(double failureChance = 0.5) => this._failureChance = failureChance; + + public override bool Apply(Point origin, int x, int y, params object[] args) => GenBase._random.NextDouble() >= this._failureChance ? this.UnitApply(origin, x, y, args) : this.Fail(); + } + + public class Flip : GenAction + { + private bool _flipX; + private bool _flipY; + + public Flip(bool flipX, bool flipY) + { + this._flipX = flipX; + this._flipY = flipY; + } + + public override bool Apply(Point origin, int x, int y, params object[] args) + { + if (this._flipX) + x = origin.X * 2 - x; + if (this._flipY) + y = origin.Y * 2 - y; + return this.UnitApply(origin, x, y, args); + } + } + } +} diff --git a/WorldBuilding/Passes.cs b/WorldBuilding/Passes.cs new file mode 100644 index 0000000..0a0268c --- /dev/null +++ b/WorldBuilding/Passes.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.Passes +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Terraria.IO; + +namespace Terraria.WorldBuilding +{ + public static class Passes + { + public class Clear : GenPass + { + public Clear() + : base("clear", 1f) + { + } + + protected override void ApplyPass( + GenerationProgress progress, + GameConfiguration configuration) + { + for (int index1 = 0; index1 < GenBase._worldWidth; ++index1) + { + for (int index2 = 0; index2 < GenBase._worldHeight; ++index2) + { + if (GenBase._tiles[index1, index2] == null) + GenBase._tiles[index1, index2] = new Tile(); + else + GenBase._tiles[index1, index2].ClearEverything(); + } + } + } + } + + public class ScatterCustom : GenPass + { + private GenBase.CustomPerUnitAction _perUnit; + private int _count; + + public ScatterCustom( + string name, + float loadWeight, + int count, + GenBase.CustomPerUnitAction perUnit = null) + : base(name, loadWeight) + { + this._perUnit = perUnit; + this._count = count; + } + + public void SetCustomAction(GenBase.CustomPerUnitAction perUnit) => this._perUnit = perUnit; + + protected override void ApplyPass( + GenerationProgress progress, + GameConfiguration configuration) + { + int count = this._count; + while (count > 0) + { + if (this._perUnit(GenBase._random.Next(1, GenBase._worldWidth), GenBase._random.Next(1, GenBase._worldHeight), new object[0])) + --count; + } + } + } + } +} diff --git a/WorldBuilding/Searches.cs b/WorldBuilding/Searches.cs new file mode 100644 index 0000000..90b0c40 --- /dev/null +++ b/WorldBuilding/Searches.cs @@ -0,0 +1,108 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.Searches +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.WorldBuilding +{ + public static class Searches + { + public static GenSearch Chain(GenSearch search, params GenCondition[] conditions) => search.Conditions(conditions); + + public class Left : GenSearch + { + private int _maxDistance; + + public Left(int maxDistance) => this._maxDistance = maxDistance; + + public override Point Find(Point origin) + { + for (int index = 0; index < this._maxDistance; ++index) + { + if (this.Check(origin.X - index, origin.Y)) + return new Point(origin.X - index, origin.Y); + } + return GenSearch.NOT_FOUND; + } + } + + public class Right : GenSearch + { + private int _maxDistance; + + public Right(int maxDistance) => this._maxDistance = maxDistance; + + public override Point Find(Point origin) + { + for (int index = 0; index < this._maxDistance; ++index) + { + if (this.Check(origin.X + index, origin.Y)) + return new Point(origin.X + index, origin.Y); + } + return GenSearch.NOT_FOUND; + } + } + + public class Down : GenSearch + { + private int _maxDistance; + + public Down(int maxDistance) => this._maxDistance = maxDistance; + + public override Point Find(Point origin) + { + for (int index = 0; index < this._maxDistance; ++index) + { + if (this.Check(origin.X, origin.Y + index)) + return new Point(origin.X, origin.Y + index); + } + return GenSearch.NOT_FOUND; + } + } + + public class Up : GenSearch + { + private int _maxDistance; + + public Up(int maxDistance) => this._maxDistance = maxDistance; + + public override Point Find(Point origin) + { + for (int index = 0; index < this._maxDistance; ++index) + { + if (this.Check(origin.X, origin.Y - index)) + return new Point(origin.X, origin.Y - index); + } + return GenSearch.NOT_FOUND; + } + } + + public class Rectangle : GenSearch + { + private int _width; + private int _height; + + public Rectangle(int width, int height) + { + this._width = width; + this._height = height; + } + + public override Point Find(Point origin) + { + for (int index1 = 0; index1 < this._width; ++index1) + { + for (int index2 = 0; index2 < this._height; ++index2) + { + if (this.Check(origin.X + index1, origin.Y + index2)) + return new Point(origin.X + index1, origin.Y + index2); + } + } + return GenSearch.NOT_FOUND; + } + } + } +} diff --git a/WorldBuilding/ShapeData.cs b/WorldBuilding/ShapeData.cs new file mode 100644 index 0000000..3bb89b1 --- /dev/null +++ b/WorldBuilding/ShapeData.cs @@ -0,0 +1,68 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.ShapeData +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.DataStructures; + +namespace Terraria.WorldBuilding +{ + public class ShapeData + { + private HashSet _points; + + public int Count => this._points.Count; + + public ShapeData() => this._points = new HashSet(); + + public ShapeData(ShapeData original) => this._points = new HashSet((IEnumerable) original._points); + + public void Add(int x, int y) => this._points.Add(new Point16(x, y)); + + public void Remove(int x, int y) => this._points.Remove(new Point16(x, y)); + + public HashSet GetData() => this._points; + + public void Clear() => this._points.Clear(); + + public bool Contains(int x, int y) => this._points.Contains(new Point16(x, y)); + + public void Add(ShapeData shapeData, Point localOrigin, Point remoteOrigin) + { + foreach (Point16 point16 in shapeData.GetData()) + this.Add(remoteOrigin.X - localOrigin.X + (int) point16.X, remoteOrigin.Y - localOrigin.Y + (int) point16.Y); + } + + public void Subtract(ShapeData shapeData, Point localOrigin, Point remoteOrigin) + { + foreach (Point16 point16 in shapeData.GetData()) + this.Remove(remoteOrigin.X - localOrigin.X + (int) point16.X, remoteOrigin.Y - localOrigin.Y + (int) point16.Y); + } + + public static Microsoft.Xna.Framework.Rectangle GetBounds( + Point origin, + params ShapeData[] shapes) + { + int val1_1 = (int) shapes[0]._points.First().X; + int val1_2 = val1_1; + int val1_3 = (int) shapes[0]._points.First().Y; + int val1_4 = val1_3; + for (int index = 0; index < shapes.Length; ++index) + { + foreach (Point16 point in shapes[index]._points) + { + val1_1 = Math.Max(val1_1, (int) point.X); + val1_2 = Math.Min(val1_2, (int) point.X); + val1_3 = Math.Max(val1_3, (int) point.Y); + val1_4 = Math.Min(val1_4, (int) point.Y); + } + } + return new Microsoft.Xna.Framework.Rectangle(val1_2 + origin.X, val1_4 + origin.Y, val1_1 - val1_2, val1_3 - val1_4); + } + } +} diff --git a/WorldBuilding/Shapes.cs b/WorldBuilding/Shapes.cs new file mode 100644 index 0000000..615a16f --- /dev/null +++ b/WorldBuilding/Shapes.cs @@ -0,0 +1,194 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.Shapes +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; + +namespace Terraria.WorldBuilding +{ + public static class Shapes + { + public class Circle : GenShape + { + private int _verticalRadius; + private int _horizontalRadius; + + public Circle(int radius) + { + this._verticalRadius = radius; + this._horizontalRadius = radius; + } + + public Circle(int horizontalRadius, int verticalRadius) + { + this._horizontalRadius = horizontalRadius; + this._verticalRadius = verticalRadius; + } + + public void SetRadius(int radius) + { + this._verticalRadius = radius; + this._horizontalRadius = radius; + } + + public override bool Perform(Point origin, GenAction action) + { + int num1 = (this._horizontalRadius + 1) * (this._horizontalRadius + 1); + for (int y = origin.Y - this._verticalRadius; y <= origin.Y + this._verticalRadius; ++y) + { + float num2 = (float) this._horizontalRadius / (float) this._verticalRadius * (float) (y - origin.Y); + int num3 = Math.Min(this._horizontalRadius, (int) Math.Sqrt((double) num1 - (double) num2 * (double) num2)); + for (int x = origin.X - num3; x <= origin.X + num3; ++x) + { + if (!this.UnitApply(action, origin, x, y) && this._quitOnFail) + return false; + } + } + return true; + } + } + + public class HalfCircle : GenShape + { + private int _radius; + + public HalfCircle(int radius) => this._radius = radius; + + public override bool Perform(Point origin, GenAction action) + { + int num1 = (this._radius + 1) * (this._radius + 1); + for (int y = origin.Y - this._radius; y <= origin.Y; ++y) + { + int num2 = Math.Min(this._radius, (int) Math.Sqrt((double) (num1 - (y - origin.Y) * (y - origin.Y)))); + for (int x = origin.X - num2; x <= origin.X + num2; ++x) + { + if (!this.UnitApply(action, origin, x, y) && this._quitOnFail) + return false; + } + } + return true; + } + } + + public class Slime : GenShape + { + private int _radius; + private float _xScale; + private float _yScale; + + public Slime(int radius) + { + this._radius = radius; + this._xScale = 1f; + this._yScale = 1f; + } + + public Slime(int radius, float xScale, float yScale) + { + this._radius = radius; + this._xScale = xScale; + this._yScale = yScale; + } + + public override bool Perform(Point origin, GenAction action) + { + float radius = (float) this._radius; + int num1 = (this._radius + 1) * (this._radius + 1); + for (int y = origin.Y - (int) ((double) radius * (double) this._yScale); y <= origin.Y; ++y) + { + float num2 = (float) (y - origin.Y) / this._yScale; + int num3 = (int) Math.Min((float) this._radius * this._xScale, this._xScale * (float) Math.Sqrt((double) num1 - (double) num2 * (double) num2)); + for (int x = origin.X - num3; x <= origin.X + num3; ++x) + { + if (!this.UnitApply(action, origin, x, y) && this._quitOnFail) + return false; + } + } + for (int y = origin.Y + 1; y <= origin.Y + (int) ((double) radius * (double) this._yScale * 0.5) - 1; ++y) + { + float num4 = (float) (y - origin.Y) * (2f / this._yScale); + int num5 = (int) Math.Min((float) this._radius * this._xScale, this._xScale * (float) Math.Sqrt((double) num1 - (double) num4 * (double) num4)); + for (int x = origin.X - num5; x <= origin.X + num5; ++x) + { + if (!this.UnitApply(action, origin, x, y) && this._quitOnFail) + return false; + } + } + return true; + } + } + + public class Rectangle : GenShape + { + private Microsoft.Xna.Framework.Rectangle _area; + + public Rectangle(Microsoft.Xna.Framework.Rectangle area) => this._area = area; + + public Rectangle(int width, int height) => this._area = new Microsoft.Xna.Framework.Rectangle(0, 0, width, height); + + public void SetArea(Microsoft.Xna.Framework.Rectangle area) => this._area = area; + + public override bool Perform(Point origin, GenAction action) + { + for (int x = origin.X + this._area.Left; x < origin.X + this._area.Right; ++x) + { + for (int y = origin.Y + this._area.Top; y < origin.Y + this._area.Bottom; ++y) + { + if (!this.UnitApply(action, origin, x, y) && this._quitOnFail) + return false; + } + } + return true; + } + } + + public class Tail : GenShape + { + private float _width; + private Vector2 _endOffset; + + public Tail(float width, Vector2 endOffset) + { + this._width = width * 16f; + this._endOffset = endOffset * 16f; + } + + public override bool Perform(Point origin, GenAction action) + { + Vector2 start = new Vector2((float) (origin.X << 4), (float) (origin.Y << 4)); + return Utils.PlotTileTale(start, start + this._endOffset, this._width, (Utils.TileActionAttempt) ((x, y) => this.UnitApply(action, origin, x, y) || !this._quitOnFail)); + } + } + + public class Mound : GenShape + { + private int _halfWidth; + private int _height; + + public Mound(int halfWidth, int height) + { + this._halfWidth = halfWidth; + this._height = height; + } + + public override bool Perform(Point origin, GenAction action) + { + int height = this._height; + float halfWidth = (float) this._halfWidth; + for (int index1 = -this._halfWidth; index1 <= this._halfWidth; ++index1) + { + int num = Math.Min(this._height, (int) (-((double) (this._height + 1) / ((double) halfWidth * (double) halfWidth)) * ((double) index1 + (double) halfWidth) * ((double) index1 - (double) halfWidth))); + for (int index2 = 0; index2 < num; ++index2) + { + if (!this.UnitApply(action, origin, index1 + origin.X, origin.Y - index2) && this._quitOnFail) + return false; + } + } + return true; + } + } + } +} diff --git a/WorldBuilding/SimpleStructure.cs b/WorldBuilding/SimpleStructure.cs new file mode 100644 index 0000000..94b0757 --- /dev/null +++ b/WorldBuilding/SimpleStructure.cs @@ -0,0 +1,91 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.SimpleStructure +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; + +namespace Terraria.WorldBuilding +{ + public class SimpleStructure : GenStructure + { + private int[,] _data; + private int _width; + private int _height; + private GenAction[] _actions; + private bool _xMirror; + private bool _yMirror; + + public int Width => this._width; + + public int Height => this._height; + + public SimpleStructure(params string[] data) => this.ReadData(data); + + public SimpleStructure(string data) => this.ReadData(data.Split('\n')); + + private void ReadData(string[] lines) + { + this._height = lines.Length; + this._width = lines[0].Length; + this._data = new int[this._width, this._height]; + for (int index1 = 0; index1 < this._height; ++index1) + { + for (int index2 = 0; index2 < this._width; ++index2) + { + int num = (int) lines[index1][index2]; + switch (num) + { + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + this._data[index2, index1] = num - 48; + break; + default: + this._data[index2, index1] = -1; + break; + } + } + } + } + + public SimpleStructure SetActions(params GenAction[] actions) + { + this._actions = actions; + return this; + } + + public SimpleStructure Mirror(bool horizontalMirror, bool verticalMirror) + { + this._xMirror = horizontalMirror; + this._yMirror = verticalMirror; + return this; + } + + public override bool Place(Point origin, StructureMap structures) + { + if (!structures.CanPlace(new Microsoft.Xna.Framework.Rectangle(origin.X, origin.Y, this._width, this._height))) + return false; + for (int index1 = 0; index1 < this._width; ++index1) + { + for (int index2 = 0; index2 < this._height; ++index2) + { + int num1 = this._xMirror ? -index1 : index1; + int num2 = this._yMirror ? -index2 : index2; + if (this._data[index1, index2] != -1 && !this._actions[this._data[index1, index2]].Apply(origin, num1 + origin.X, num2 + origin.Y)) + return false; + } + } + structures.AddProtectedStructure(new Microsoft.Xna.Framework.Rectangle(origin.X, origin.Y, this._width, this._height)); + return true; + } + } +} diff --git a/WorldBuilding/StructureMap.cs b/WorldBuilding/StructureMap.cs new file mode 100644 index 0000000..8937296 --- /dev/null +++ b/WorldBuilding/StructureMap.cs @@ -0,0 +1,88 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.StructureMap +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria.ID; + +namespace Terraria.WorldBuilding +{ + public class StructureMap + { + private readonly List _structures = new List(2048); + private readonly List _protectedStructures = new List(2048); + private readonly object _lock = new object(); + + public bool CanPlace(Microsoft.Xna.Framework.Rectangle area, int padding = 0) => this.CanPlace(area, TileID.Sets.GeneralPlacementTiles, padding); + + public bool CanPlace(Microsoft.Xna.Framework.Rectangle area, bool[] validTiles, int padding = 0) + { + lock (this._lock) + { + if (area.X < 0 || area.Y < 0 || area.X + area.Width > Main.maxTilesX - 1 || area.Y + area.Height > Main.maxTilesY - 1) + return false; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(area.X - padding, area.Y - padding, area.Width + padding * 2, area.Height + padding * 2); + for (int index = 0; index < this._protectedStructures.Count; ++index) + { + if (rectangle.Intersects(this._protectedStructures[index])) + return false; + } + for (int x = rectangle.X; x < rectangle.X + rectangle.Width; ++x) + { + for (int y = rectangle.Y; y < rectangle.Y + rectangle.Height; ++y) + { + if (Main.tile[x, y].active()) + { + ushort type = Main.tile[x, y].type; + if (!validTiles[(int) type]) + return false; + } + } + } + return true; + } + } + + public Microsoft.Xna.Framework.Rectangle GetBoundingBox() + { + lock (this._lock) + { + if (this._structures.Count == 0) + return Microsoft.Xna.Framework.Rectangle.Empty; + Point point1 = new Point(this._structures.Min((Func) (rect => rect.Left)), this._structures.Min((Func) (rect => rect.Top))); + Point point2 = new Point(this._structures.Max((Func) (rect => rect.Right)), this._structures.Max((Func) (rect => rect.Bottom))); + return new Microsoft.Xna.Framework.Rectangle(point1.X, point1.Y, point2.X - point1.X, point2.Y - point1.Y); + } + } + + public void AddStructure(Microsoft.Xna.Framework.Rectangle area, int padding = 0) + { + lock (this._lock) + { + area.Inflate(padding, padding); + this._structures.Add(area); + } + } + + public void AddProtectedStructure(Microsoft.Xna.Framework.Rectangle area, int padding = 0) + { + lock (this._lock) + { + area.Inflate(padding, padding); + this._structures.Add(area); + this._protectedStructures.Add(area); + } + } + + public void Reset() + { + lock (this._lock) + this._protectedStructures.Clear(); + } + } +} diff --git a/WorldBuilding/TileFont.cs b/WorldBuilding/TileFont.cs new file mode 100644 index 0000000..635839b --- /dev/null +++ b/WorldBuilding/TileFont.cs @@ -0,0 +1,838 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.TileFont +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; + +namespace Terraria.WorldBuilding +{ + public class TileFont + { + private static readonly Dictionary MicroFont = new Dictionary() + { + { + 'A', + new byte[5] + { + (byte) 124, + (byte) 68, + (byte) 68, + (byte) 124, + (byte) 68 + } + }, + { + 'B', + new byte[5] + { + (byte) 124, + (byte) 68, + (byte) 120, + (byte) 68, + (byte) 124 + } + }, + { + 'C', + new byte[5] + { + (byte) 124, + (byte) 64, + (byte) 64, + (byte) 64, + (byte) 124 + } + }, + { + 'D', + new byte[5] + { + (byte) 120, + (byte) 68, + (byte) 68, + (byte) 68, + (byte) 120 + } + }, + { + 'E', + new byte[5] + { + (byte) 124, + (byte) 64, + (byte) 120, + (byte) 64, + (byte) 124 + } + }, + { + 'F', + new byte[5] + { + (byte) 124, + (byte) 64, + (byte) 112, + (byte) 64, + (byte) 64 + } + }, + { + 'G', + new byte[5] + { + (byte) 124, + (byte) 64, + (byte) 76, + (byte) 68, + (byte) 124 + } + }, + { + 'H', + new byte[5] + { + (byte) 68, + (byte) 68, + (byte) 124, + (byte) 68, + (byte) 68 + } + }, + { + 'I', + new byte[5] + { + (byte) 124, + (byte) 16, + (byte) 16, + (byte) 16, + (byte) 124 + } + }, + { + 'J', + new byte[5] + { + (byte) 12, + (byte) 4, + (byte) 4, + (byte) 68, + (byte) 124 + } + }, + { + 'K', + new byte[5] + { + (byte) 68, + (byte) 72, + (byte) 112, + (byte) 72, + (byte) 68 + } + }, + { + 'L', + new byte[5] + { + (byte) 64, + (byte) 64, + (byte) 64, + (byte) 64, + (byte) 124 + } + }, + { + 'M', + new byte[5] + { + (byte) 68, + (byte) 108, + (byte) 84, + (byte) 68, + (byte) 68 + } + }, + { + 'N', + new byte[5] + { + (byte) 68, + (byte) 100, + (byte) 84, + (byte) 76, + (byte) 68 + } + }, + { + 'O', + new byte[5] + { + (byte) 124, + (byte) 68, + (byte) 68, + (byte) 68, + (byte) 124 + } + }, + { + 'P', + new byte[5] + { + (byte) 120, + (byte) 68, + (byte) 120, + (byte) 64, + (byte) 64 + } + }, + { + 'Q', + new byte[5] + { + (byte) 124, + (byte) 68, + (byte) 68, + (byte) 124, + (byte) 16 + } + }, + { + 'R', + new byte[5] + { + (byte) 120, + (byte) 68, + (byte) 120, + (byte) 68, + (byte) 68 + } + }, + { + 'S', + new byte[5] + { + (byte) 124, + (byte) 64, + (byte) 124, + (byte) 4, + (byte) 124 + } + }, + { + 'T', + new byte[5] + { + (byte) 124, + (byte) 16, + (byte) 16, + (byte) 16, + (byte) 16 + } + }, + { + 'U', + new byte[5] + { + (byte) 68, + (byte) 68, + (byte) 68, + (byte) 68, + (byte) 124 + } + }, + { + 'V', + new byte[5] + { + (byte) 68, + (byte) 68, + (byte) 40, + (byte) 40, + (byte) 16 + } + }, + { + 'W', + new byte[5] + { + (byte) 68, + (byte) 68, + (byte) 84, + (byte) 84, + (byte) 40 + } + }, + { + 'X', + new byte[5] + { + (byte) 68, + (byte) 40, + (byte) 16, + (byte) 40, + (byte) 68 + } + }, + { + 'Y', + new byte[5] + { + (byte) 68, + (byte) 68, + (byte) 40, + (byte) 16, + (byte) 16 + } + }, + { + 'Z', + new byte[5] + { + (byte) 124, + (byte) 8, + (byte) 16, + (byte) 32, + (byte) 124 + } + }, + { + 'a', + new byte[5] + { + (byte) 56, + (byte) 4, + (byte) 60, + (byte) 68, + (byte) 60 + } + }, + { + 'b', + new byte[5] + { + (byte) 64, + (byte) 120, + (byte) 68, + (byte) 68, + (byte) 120 + } + }, + { + 'c', + new byte[5] + { + (byte) 56, + (byte) 68, + (byte) 64, + (byte) 68, + (byte) 56 + } + }, + { + 'd', + new byte[5] + { + (byte) 4, + (byte) 60, + (byte) 68, + (byte) 68, + (byte) 60 + } + }, + { + 'e', + new byte[5] + { + (byte) 56, + (byte) 68, + (byte) 124, + (byte) 64, + (byte) 60 + } + }, + { + 'f', + new byte[5] + { + (byte) 28, + (byte) 32, + (byte) 120, + (byte) 32, + (byte) 32 + } + }, + { + 'g', + new byte[5] + { + (byte) 56, + (byte) 68, + (byte) 60, + (byte) 4, + (byte) 120 + } + }, + { + 'h', + new byte[5] + { + (byte) 64, + (byte) 64, + (byte) 120, + (byte) 68, + (byte) 68 + } + }, + { + 'i', + new byte[5] + { + (byte) 16, + (byte) 0, + (byte) 16, + (byte) 16, + (byte) 16 + } + }, + { + 'j', + new byte[5] + { + (byte) 4, + (byte) 4, + (byte) 4, + (byte) 4, + (byte) 120 + } + }, + { + 'k', + new byte[5] + { + (byte) 64, + (byte) 72, + (byte) 112, + (byte) 72, + (byte) 68 + } + }, + { + 'l', + new byte[5] + { + (byte) 64, + (byte) 64, + (byte) 64, + (byte) 64, + (byte) 60 + } + }, + { + 'm', + new byte[5] + { + (byte) 40, + (byte) 84, + (byte) 84, + (byte) 84, + (byte) 84 + } + }, + { + 'n', + new byte[5] + { + (byte) 120, + (byte) 68, + (byte) 68, + (byte) 68, + (byte) 68 + } + }, + { + 'o', + new byte[5] + { + (byte) 56, + (byte) 68, + (byte) 68, + (byte) 68, + (byte) 56 + } + }, + { + 'p', + new byte[5] + { + (byte) 56, + (byte) 68, + (byte) 68, + (byte) 120, + (byte) 64 + } + }, + { + 'q', + new byte[5] + { + (byte) 56, + (byte) 68, + (byte) 68, + (byte) 60, + (byte) 4 + } + }, + { + 'r', + new byte[5] + { + (byte) 88, + (byte) 100, + (byte) 64, + (byte) 64, + (byte) 64 + } + }, + { + 's', + new byte[5] + { + (byte) 60, + (byte) 64, + (byte) 56, + (byte) 4, + (byte) 120 + } + }, + { + 't', + new byte[5] + { + (byte) 64, + (byte) 112, + (byte) 64, + (byte) 68, + (byte) 56 + } + }, + { + 'u', + new byte[5] + { + (byte) 0, + (byte) 68, + (byte) 68, + (byte) 68, + (byte) 56 + } + }, + { + 'v', + new byte[5] + { + (byte) 0, + (byte) 68, + (byte) 68, + (byte) 40, + (byte) 16 + } + }, + { + 'w', + new byte[5] + { + (byte) 84, + (byte) 84, + (byte) 84, + (byte) 84, + (byte) 40 + } + }, + { + 'x', + new byte[5] + { + (byte) 68, + (byte) 68, + (byte) 56, + (byte) 68, + (byte) 68 + } + }, + { + 'y', + new byte[5] + { + (byte) 68, + (byte) 68, + (byte) 60, + (byte) 4, + (byte) 120 + } + }, + { + 'z', + new byte[5] + { + (byte) 124, + (byte) 4, + (byte) 56, + (byte) 64, + (byte) 124 + } + }, + { + '0', + new byte[5] + { + (byte) 124, + (byte) 76, + (byte) 84, + (byte) 100, + (byte) 124 + } + }, + { + '1', + new byte[5] + { + (byte) 16, + (byte) 48, + (byte) 16, + (byte) 16, + (byte) 56 + } + }, + { + '2', + new byte[5] + { + (byte) 120, + (byte) 4, + (byte) 56, + (byte) 64, + (byte) 124 + } + }, + { + '3', + new byte[5] + { + (byte) 124, + (byte) 4, + (byte) 56, + (byte) 4, + (byte) 124 + } + }, + { + '4', + new byte[5] + { + (byte) 64, + (byte) 64, + (byte) 80, + (byte) 124, + (byte) 16 + } + }, + { + '5', + new byte[5] + { + (byte) 124, + (byte) 64, + (byte) 120, + (byte) 4, + (byte) 120 + } + }, + { + '6', + new byte[5] + { + (byte) 124, + (byte) 64, + (byte) 124, + (byte) 68, + (byte) 124 + } + }, + { + '7', + new byte[5] + { + (byte) 124, + (byte) 4, + (byte) 8, + (byte) 16, + (byte) 16 + } + }, + { + '8', + new byte[5] + { + (byte) 124, + (byte) 68, + (byte) 124, + (byte) 68, + (byte) 124 + } + }, + { + '9', + new byte[5] + { + (byte) 124, + (byte) 68, + (byte) 124, + (byte) 4, + (byte) 124 + } + }, + { + '-', + new byte[5] + { + (byte) 0, + (byte) 0, + (byte) 124, + (byte) 0, + (byte) 0 + } + }, + { + ' ', + new byte[5] + } + }; + + public static void DrawString(Point start, string text, TileFont.DrawMode mode) + { + Point position = start; + foreach (char key in text) + { + if (key == '\n') + { + position.X = start.X; + position.Y += 6; + } + byte[] charData; + if (TileFont.MicroFont.TryGetValue(key, out charData)) + { + TileFont.DrawChar(position, charData, mode); + position.X += 6; + } + } + } + + private static void DrawChar(Point position, byte[] charData, TileFont.DrawMode mode) + { + if (mode.HasBackground) + { + for (int index1 = -1; index1 < charData.Length + 1; ++index1) + { + for (int index2 = -1; index2 < 6; ++index2) + { + Main.tile[position.X + index2, position.Y + index1].ResetToType(mode.BackgroundTile); + WorldGen.TileFrame(position.X + index2, position.Y + index1); + } + } + } + for (int index3 = 0; index3 < charData.Length; ++index3) + { + int num = (int) charData[index3] << 1; + for (int index4 = 0; index4 < 5; ++index4) + { + if ((num & 128) == 128) + { + Main.tile[position.X + index4, position.Y + index3].ResetToType(mode.ForegroundTile); + WorldGen.TileFrame(position.X + index4, position.Y + index3); + } + num <<= 1; + } + } + } + + public static Point MeasureString(string text) + { + Point zero = Point.Zero; + Point point1 = zero; + Point point2 = new Point(0, 5); + foreach (char key in text) + { + if (key == '\n') + { + point1.X = zero.X; + point1.Y += 6; + point2.Y = point1.Y + 5; + } + if (TileFont.MicroFont.TryGetValue(key, out byte[] _)) + { + point1.X += 6; + point2.X = Math.Max(point2.X, point1.X - 1); + } + } + return point2; + } + + public static void HLineLabel( + Point start, + int width, + string text, + TileFont.DrawMode mode, + bool rightSideText = false) + { + Point point = TileFont.MeasureString(text); + for (int x = start.X; x < start.X + width; ++x) + { + Main.tile[x, start.Y].ResetToType(mode.ForegroundTile); + WorldGen.TileFrame(x, start.Y); + } + TileFont.DrawString(new Point(rightSideText ? start.X + width + 1 : start.X - point.X - 1, start.Y - point.Y / 2), text, mode); + } + + public static void VLineLabel( + Point start, + int height, + string text, + TileFont.DrawMode mode, + bool bottomText = false) + { + Point point = TileFont.MeasureString(text); + for (int y = start.Y; y < start.Y + height; ++y) + { + Main.tile[start.X, y].ResetToType(mode.ForegroundTile); + WorldGen.TileFrame(start.X, y); + } + TileFont.DrawString(new Point(start.X - point.X / 2, bottomText ? start.Y + height + 1 : start.Y - point.Y - 1), text, mode); + } + + public struct DrawMode + { + public readonly ushort ForegroundTile; + public readonly ushort BackgroundTile; + public readonly bool HasBackground; + + public DrawMode(ushort foregroundTile) + { + this.ForegroundTile = foregroundTile; + this.HasBackground = false; + this.BackgroundTile = (ushort) 0; + } + + public DrawMode(ushort foregroundTile, ushort backgroundTile) + { + this.ForegroundTile = foregroundTile; + this.BackgroundTile = backgroundTile; + this.HasBackground = true; + } + } + } +} diff --git a/WorldBuilding/WorldGenConfiguration.cs b/WorldBuilding/WorldGenConfiguration.cs new file mode 100644 index 0000000..5f5084c --- /dev/null +++ b/WorldBuilding/WorldGenConfiguration.cs @@ -0,0 +1,50 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.WorldGenConfiguration +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System.IO; +using System.Reflection; +using Terraria.IO; + +namespace Terraria.WorldBuilding +{ + public class WorldGenConfiguration : GameConfiguration + { + private readonly JObject _biomeRoot; + private readonly JObject _passRoot; + + public WorldGenConfiguration(JObject configurationRoot) + : base(configurationRoot) + { + this._biomeRoot = (JObject) configurationRoot["Biomes"] ?? new JObject(); + this._passRoot = (JObject) configurationRoot["Passes"] ?? new JObject(); + } + + public T CreateBiome() where T : MicroBiome, new() => this.CreateBiome(typeof (T).Name); + + public T CreateBiome(string name) where T : MicroBiome, new() + { + JToken jtoken; + return this._biomeRoot.TryGetValue(name, ref jtoken) ? jtoken.ToObject() : new T(); + } + + public GameConfiguration GetPassConfiguration(string name) + { + JToken jtoken; + return this._passRoot.TryGetValue(name, ref jtoken) ? new GameConfiguration((JObject) jtoken) : new GameConfiguration(new JObject()); + } + + public static WorldGenConfiguration FromEmbeddedPath(string path) + { + using (Stream manifestResourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(path)) + { + using (StreamReader streamReader = new StreamReader(manifestResourceStream)) + return new WorldGenConfiguration(JsonConvert.DeserializeObject(streamReader.ReadToEnd())); + } + } + } +} diff --git a/WorldBuilding/WorldGenRange.cs b/WorldBuilding/WorldGenRange.cs new file mode 100644 index 0000000..a57c888 --- /dev/null +++ b/WorldBuilding/WorldGenRange.cs @@ -0,0 +1,61 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.WorldGenRange +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Terraria.Utilities; + +namespace Terraria.WorldBuilding +{ + public class WorldGenRange + { + public static readonly WorldGenRange Empty = new WorldGenRange(0, 0); + [JsonProperty("Min")] + public readonly int Minimum; + [JsonProperty("Max")] + public readonly int Maximum; + [JsonProperty] + [JsonConverter(typeof (StringEnumConverter))] + public readonly WorldGenRange.ScalingMode ScaleWith; + + public int ScaledMinimum => this.ScaleValue(this.Minimum); + + public int ScaledMaximum => this.ScaleValue(this.Maximum); + + public WorldGenRange(int minimum, int maximum) + { + this.Minimum = minimum; + this.Maximum = maximum; + } + + public int GetRandom(UnifiedRandom random) => random.Next(this.ScaledMinimum, this.ScaledMaximum + 1); + + private int ScaleValue(int value) + { + float num = 1f; + switch (this.ScaleWith) + { + case WorldGenRange.ScalingMode.None: + num = 1f; + break; + case WorldGenRange.ScalingMode.WorldArea: + num = (float) (Main.maxTilesX * Main.maxTilesY) / 5040000f; + break; + case WorldGenRange.ScalingMode.WorldWidth: + num = (float) Main.maxTilesX / 4200f; + break; + } + return (int) ((double) num * (double) value); + } + + public enum ScalingMode + { + None, + WorldArea, + WorldWidth, + } + } +} diff --git a/WorldBuilding/WorldGenerator.cs b/WorldBuilding/WorldGenerator.cs new file mode 100644 index 0000000..8cce00b --- /dev/null +++ b/WorldBuilding/WorldGenerator.cs @@ -0,0 +1,56 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.WorldGenerator +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using System.Collections.Generic; +using System.Diagnostics; +using Terraria.Utilities; + +namespace Terraria.WorldBuilding +{ + public class WorldGenerator + { + private readonly List _passes = new List(); + private float _totalLoadWeight; + private readonly int _seed; + private readonly WorldGenConfiguration _configuration; + public static GenerationProgress CurrentGenerationProgress; + + public WorldGenerator(int seed, WorldGenConfiguration configuration) + { + this._seed = seed; + this._configuration = configuration; + } + + public void Append(GenPass pass) + { + this._passes.Add(pass); + this._totalLoadWeight += pass.Weight; + } + + public void GenerateWorld(GenerationProgress progress = null) + { + Stopwatch stopwatch = new Stopwatch(); + float num = 0.0f; + foreach (GenPass pass in this._passes) + num += pass.Weight; + if (progress == null) + progress = new GenerationProgress(); + WorldGenerator.CurrentGenerationProgress = progress; + progress.TotalWeight = num; + foreach (GenPass pass in this._passes) + { + WorldGen._genRand = new UnifiedRandom(this._seed); + Main.rand = new UnifiedRandom(this._seed); + stopwatch.Start(); + progress.Start(pass.Weight); + pass.Apply(progress, this._configuration.GetPassConfiguration(pass.Name)); + progress.End(); + stopwatch.Reset(); + } + WorldGenerator.CurrentGenerationProgress = (GenerationProgress) null; + } + } +} diff --git a/WorldBuilding/WorldUtils.cs b/WorldBuilding/WorldUtils.cs new file mode 100644 index 0000000..8e4b49b --- /dev/null +++ b/WorldBuilding/WorldUtils.cs @@ -0,0 +1,119 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldBuilding.WorldUtils +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; + +namespace Terraria.WorldBuilding +{ + public static class WorldUtils + { + public static Microsoft.Xna.Framework.Rectangle ClampToWorld( + World world, + Microsoft.Xna.Framework.Rectangle tileRectangle) + { + int x = Math.Max(0, Math.Min(tileRectangle.Left, world.TileColumns)); + int y = Math.Max(0, Math.Min(tileRectangle.Top, world.TileRows)); + int num1 = Math.Max(0, Math.Min(tileRectangle.Right, world.TileColumns)); + int num2 = Math.Max(0, Math.Min(tileRectangle.Bottom, world.TileRows)); + return new Microsoft.Xna.Framework.Rectangle(x, y, num1 - x, num2 - y); + } + + public static bool Gen(Point origin, GenShape shape, GenAction action) => shape.Perform(origin, action); + + public static bool Gen(Point origin, GenShapeActionPair pair) => pair.Shape.Perform(origin, pair.Action); + + public static bool Find(Point origin, GenSearch search, out Point result) + { + result = search.Find(origin); + return !(result == GenSearch.NOT_FOUND); + } + + public static void ClearTile(int x, int y, bool frameNeighbors = false) + { + Main.tile[x, y].ClearTile(); + if (!frameNeighbors) + return; + WorldGen.TileFrame(x + 1, y); + WorldGen.TileFrame(x - 1, y); + WorldGen.TileFrame(x, y + 1); + WorldGen.TileFrame(x, y - 1); + } + + public static void ClearWall(int x, int y, bool frameNeighbors = false) + { + Main.tile[x, y].wall = (ushort) 0; + if (!frameNeighbors) + return; + WorldGen.SquareWallFrame(x + 1, y); + WorldGen.SquareWallFrame(x - 1, y); + WorldGen.SquareWallFrame(x, y + 1); + WorldGen.SquareWallFrame(x, y - 1); + } + + public static void TileFrame(int x, int y, bool frameNeighbors = false) + { + WorldGen.TileFrame(x, y, true); + if (!frameNeighbors) + return; + WorldGen.TileFrame(x + 1, y, true); + WorldGen.TileFrame(x - 1, y, true); + WorldGen.TileFrame(x, y + 1, true); + WorldGen.TileFrame(x, y - 1, true); + } + + public static void ClearChestLocation(int x, int y) + { + WorldUtils.ClearTile(x, y, true); + WorldUtils.ClearTile(x - 1, y, true); + WorldUtils.ClearTile(x, y - 1, true); + WorldUtils.ClearTile(x - 1, y - 1, true); + } + + public static void WireLine(Point start, Point end) + { + Point point1 = start; + Point point2 = end; + if (end.X < start.X) + Utils.Swap(ref end.X, ref start.X); + if (end.Y < start.Y) + Utils.Swap(ref end.Y, ref start.Y); + for (int x = start.X; x <= end.X; ++x) + WorldGen.PlaceWire(x, point1.Y); + for (int y = start.Y; y <= end.Y; ++y) + WorldGen.PlaceWire(point2.X, y); + } + + public static void DebugRegen() + { + WorldGen.clearWorld(); + WorldGen.GenerateWorld(Main.ActiveWorldFileData.Seed); + Main.NewText("World Regen Complete."); + } + + public static void DebugRotate() + { + int num1 = 0; + int num2 = 0; + int maxTilesY = Main.maxTilesY; + for (int index1 = 0; index1 < Main.maxTilesX / Main.maxTilesY; ++index1) + { + for (int index2 = 0; index2 < maxTilesY / 2; ++index2) + { + for (int index3 = index2; index3 < maxTilesY - index2; ++index3) + { + Tile tile = Main.tile[index3 + num1, index2 + num2]; + Main.tile[index3 + num1, index2 + num2] = Main.tile[index2 + num1, maxTilesY - index3 + num2]; + Main.tile[index2 + num1, maxTilesY - index3 + num2] = Main.tile[maxTilesY - index3 + num1, maxTilesY - index2 + num2]; + Main.tile[maxTilesY - index3 + num1, maxTilesY - index2 + num2] = Main.tile[maxTilesY - index2 + num1, index3 + num2]; + Main.tile[maxTilesY - index2 + num1, index3 + num2] = tile; + } + } + num1 += maxTilesY; + } + } + } +} diff --git a/WorldGen.cs b/WorldGen.cs new file mode 100644 index 0000000..a0f4451 --- /dev/null +++ b/WorldGen.cs @@ -0,0 +1,54797 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldGen +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; +using Terraria.Audio; +using Terraria.Chat; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.GameContent; +using Terraria.GameContent.Achievements; +using Terraria.GameContent.Biomes; +using Terraria.GameContent.Creative; +using Terraria.GameContent.Events; +using Terraria.GameContent.Generation; +using Terraria.GameContent.Tile_Entities; +using Terraria.GameContent.UI.States; +using Terraria.Graphics.Capture; +using Terraria.ID; +using Terraria.IO; +using Terraria.Localization; +using Terraria.Map; +using Terraria.ObjectData; +using Terraria.UI; +using Terraria.Utilities; +using Terraria.WorldBuilding; + +namespace Terraria +{ + public class WorldGen + { + public static TownRoomManager TownManager = new TownRoomManager(); + private static int lAltarX; + private static int lAltarY; + private static Queue> _postGenActions = new Queue>(); + public static int tileReframeCount; + public static bool noMapUpdate; + public static double worldSurfaceLow; + public static int tLeft; + public static int tRight; + public static int tTop; + public static int tBottom; + public static int tRooms; + public static int[] mossType = new int[3]; + public static ushort neonMossType; + public static int copperBar = 20; + public static int ironBar = 22; + public static int silverBar = 21; + public static int goldBar = 19; + private const int NUM_SEASHELL_STYLES = 2; + public static int treeBG1; + public static int treeBG2; + public static int treeBG3; + public static int treeBG4; + public static int corruptBG; + public static int jungleBG; + public static int snowBG; + public static int hallowBG; + public static int crimsonBG; + public static int desertBG; + public static int oceanBG; + public static int mushroomBG; + public static int underworldBG; + private static ushort crackedType = 481; + public static int oceanDistance = 250; + public static int beachDistance = 380; + public static bool skipDesertTileCheck = false; + public static bool crimson; + public static ushort mossTile = 179; + public static ushort mossWall = 54; + public static bool[] gem = new bool[6]; + public static int[] tileCounts = new int[623]; + public static int totalEvil; + public static int totalBlood; + public static int totalGood; + public static int totalSolid; + public static int totalEvil2; + public static int totalBlood2; + public static int totalGood2; + public static int totalSolid2; + public static byte tEvil; + public static byte tBlood; + public static byte tGood; + public static string currentWorldSeed; + public static bool dungeonLake = false; + public static int totalX; + public static int totalD; + public static bool IsGeneratingHardMode; + private static Vector2[] heartPos = new Vector2[100]; + private static int heartCount; + public static int maxTreeShakes = 200; + public static int numTreeShakes = 0; + public static int[] treeShakeX = new int[WorldGen.maxTreeShakes]; + public static int[] treeShakeY = new int[WorldGen.maxTreeShakes]; + public static int lavaLine; + public static int waterLine; + public static bool noTileActions; + public static bool spawnEye; + public static int spawnHardBoss; + public static int numLarva; + public static int[] larvaX = new int[100]; + public static int[] larvaY = new int[100]; + public static volatile bool gen; + public static bool shadowOrbSmashed; + public static int shadowOrbCount; + public static int altarCount; + public static bool spawnMeteor; + public static bool loadFailed = false; + public static bool loadSuccess = false; + public static bool worldCleared; + public static bool worldBackup; + public static bool loadBackup = false; + private static int lastMaxTilesX; + private static int lastMaxTilesY; + private static bool mergeUp; + private static bool mergeDown; + private static bool mergeLeft; + private static bool mergeRight; + private static bool stopDrops; + public static bool mudWall; + private static int grassSpread; + public static bool noLiquidCheck; + public static bool AllowedToSpreadInfections = true; + [ThreadStatic] + public static UnifiedRandom _genRand; + [ThreadStatic] + public static int _genRandSeed = -2; + public static int _lastSeed; + public static string statusText = ""; + public static bool destroyObject; + public static int spawnDelay; + public static int prioritizedTownNPCType; + public static int numTileCount; + public static int maxTileCount = 3500; + public static int maxWallOut2 = 5000; + public static Dictionary CountedTiles = new Dictionary(WorldGen.maxTileCount); + public static int lavaCount; + public static int iceCount; + public static int rockCount; + public static int shroomCount; + public static int maxRoomTiles = 750; + public static int numRoomTiles; + public static int[] roomX = new int[WorldGen.maxRoomTiles]; + public static int[] roomY = new int[WorldGen.maxRoomTiles]; + public static int roomCeilingsCount; + public static int[] roomCeilingX = new int[WorldGen.maxRoomTiles]; + public static int[] roomCeilingY = new int[WorldGen.maxRoomTiles]; + public static int roomX1; + public static int roomX2; + public static int roomY1; + public static int roomY2; + public static bool canSpawn; + public static bool[] houseTile = new bool[623]; + public static int bestX; + public static int bestY; + public static int hiScore; + public static int dungeonX; + public static int dungeonY; + public static Vector2 lastDungeonHall = Vector2.Zero; + public static int maxDRooms = 100; + public static int numDRooms; + public static int[] dRoomX = new int[WorldGen.maxDRooms]; + public static int[] dRoomY = new int[WorldGen.maxDRooms]; + public static int[] dRoomSize = new int[WorldGen.maxDRooms]; + private static bool[] dRoomTreasure = new bool[WorldGen.maxDRooms]; + private static int[] dRoomL = new int[WorldGen.maxDRooms]; + private static int[] dRoomR = new int[WorldGen.maxDRooms]; + private static int[] dRoomT = new int[WorldGen.maxDRooms]; + private static int[] dRoomB = new int[WorldGen.maxDRooms]; + private static int numDDoors; + private static int[] DDoorX = new int[500]; + private static int[] DDoorY = new int[500]; + private static int[] DDoorPos = new int[500]; + private static int numDungeonPlatforms; + private static int[] dungeonPlatformX = new int[500]; + private static int[] dungeonPlatformY = new int[500]; + private static bool generatedShadowKey; + private static int JungleItemCount; + private static int[] JChestX = new int[100]; + private static int[] JChestY = new int[100]; + private static int numJChests; + public static int dEnteranceX; + public static bool dSurface; + private static double dxStrength1; + private static double dyStrength1; + private static double dxStrength2; + private static double dyStrength2; + private static int dMinX; + private static int dMaxX; + private static int dMinY; + private static int dMaxY; + private static int numIslandHouses; + private static int houseCount; + private static bool[] skyLake = new bool[30]; + private static int[] floatingIslandHouseX = new int[30]; + private static int[] floatingIslandHouseY = new int[30]; + private static int[] floatingIslandStyle = new int[30]; + private static int numMCaves; + private static int[] mCaveX = new int[30]; + private static int[] mCaveY = new int[30]; + public static int WorldGenParam_Evil = -1; + private static int maxTunnels = 50; + private static int numTunnels; + private static int[] tunnelX = new int[WorldGen.maxTunnels]; + private static int maxOrePatch = 50; + private static int numOrePatch; + private static int[] orePatchX = new int[WorldGen.maxOrePatch]; + private static int maxOasis = 20; + private static int numOasis = 0; + private static Vector2[] oasisPosition = new Vector2[WorldGen.maxOasis]; + private static int[] oasisWidth = new int[WorldGen.maxOasis]; + private static int oasisHeight = 20; + private static int maxMushroomBiomes = 50; + private static int numMushroomBiomes = 0; + private static Vector2[] mushroomBiomesPosition = new Vector2[WorldGen.maxMushroomBiomes]; + private static int maxLakes = 50; + private static int numLakes = 0; + private static int[] LakeX = new int[WorldGen.maxLakes]; + private static int maxOceanCaveTreasure = 2; + private static int numOceanCaveTreasure = 0; + private static Point[] oceanCaveTreasure = new Point[WorldGen.maxOceanCaveTreasure]; + private static int cactusWaterWidth = 50; + private static int cactusWaterHeight = 25; + private static int cactusWaterLimit = 25; + private static int JungleX; + private static int hellChest; + private static int[] hellChestItem = new int[7]; + private static bool roomTorch; + private static bool roomDoor; + private static bool roomChair; + private static bool roomTable; + private static bool roomOccupied; + private static bool roomEvil; + public static Point16[] statueList; + public static List StatuesWithTraps = new List((IEnumerable) new int[4] + { + 4, + 7, + 10, + 18 + }); + public static Microsoft.Xna.Framework.Rectangle UndergroundDesertLocation = Microsoft.Xna.Framework.Rectangle.Empty; + public static Microsoft.Xna.Framework.Rectangle UndergroundDesertHiveLocation = Microsoft.Xna.Framework.Rectangle.Empty; + public static MysticLogFairiesEvent mysticLogsEvent = new MysticLogFairiesEvent(); + private static bool currentlyTryingToUseAlternateHousingSpot; + private static int sharedRoomX; + public static TownNPCRoomCheckFailureReason roomCheckFailureReason = TownNPCRoomCheckFailureReason.None; + public static bool generatingWorld = false; + private static int[,] trapDiag = new int[4, 2]; + private static int tileCounterNum; + private static int tileCounterMax = 20; + private static int[] tileCounterX = new int[WorldGen.tileCounterMax]; + private static int[] tileCounterY = new int[WorldGen.tileCounterMax]; + private static WorldGenerator _generator; + public static int SmallConsecutivesFound = 0; + public static int SmallConsecutivesEliminated = 0; + public static bool drunkWorldGen = false; + public static bool getGoodWorldGen = false; + public static bool drunkWorldGenText = false; + public static bool placingTraps = false; + public const bool USE_FRAMING_SKIP_FOR_UNIMPORTANT_TILES_IN_WORLDGEN = false; + public static bool notTheBees = false; + private static int catTailDistance = 8; + public static TreeTopsInfo TreeTops = new TreeTopsInfo(); + public static BackgroundChangeFlashInfo BackgroundsCache = new BackgroundChangeFlashInfo(); + private static bool fossilBreak = false; + private const bool BUBBLES_SOLID_STATE_FOR_HOUSING = true; + private static bool skipFramingDuringGen = false; + + public static UnifiedRandom genRand + { + get + { + if (WorldGen._lastSeed != WorldGen._genRandSeed) + { + WorldGen._genRand = new UnifiedRandom(WorldGen._lastSeed); + WorldGen._genRandSeed = WorldGen._lastSeed; + } + if (WorldGen._genRand == null) + { + WorldGen._genRand = new UnifiedRandom(WorldGen._lastSeed); + WorldGen._genRandSeed = WorldGen._lastSeed; + } + return WorldGen._genRand; + } + } + + public static void SetupStatueList() + { + List point16List = new List(); + for (int Y = 0; Y < 44; ++Y) + point16List.Add(new Point16(105, Y)); + point16List[34] = new Point16(349, 0); + point16List[43] = new Point16(105, 50); + point16List.Add(new Point16(105, 63)); + point16List.Add(new Point16(105, 64)); + point16List.Add(new Point16(105, 65)); + point16List.Add(new Point16(105, 66)); + point16List.Add(new Point16(105, 68)); + point16List.Add(new Point16(105, 69)); + point16List.Add(new Point16(105, 70)); + point16List.Add(new Point16(105, 71)); + point16List.Add(new Point16(105, 72)); + point16List.Add(new Point16(105, 73)); + point16List.Add(new Point16(105, 75)); + point16List.Add(new Point16(105, 51)); + point16List.Add(new Point16(105, 52)); + point16List.Add(new Point16(105, 53)); + point16List.Add(new Point16(105, 54)); + point16List.Add(new Point16(105, 55)); + point16List.Add(new Point16(105, 56)); + point16List.Add(new Point16(105, 57)); + point16List.Add(new Point16(105, 58)); + point16List.Add(new Point16(105, 59)); + point16List.Add(new Point16(105, 60)); + point16List.Add(new Point16(105, 61)); + point16List.Add(new Point16(105, 62)); + point16List.Add(new Point16(105, 77)); + point16List.Add(new Point16(105, 78)); + if (Main.expertMode) + { + point16List.Add(new Point16(105, 67)); + point16List.Add(new Point16(105, 74)); + } + WorldGen.statueList = point16List.ToArray(); + } + + public static void PlaceStatueTrap(int x, int y) + { + for (int index1 = -10; index1 <= 10; ++index1) + { + for (int index2 = -10; index2 <= 10; ++index2) + { + Tile testTile = Main.tile[x + index1, y + index2 + 1]; + Tile tile = Main.tile[x + index1, y + index2]; + if (!tile.active() && WorldGen.SolidTile2(testTile)) + { + WorldGen.PlaceTile(x + index1, y + index2, 135, true); + if (tile.active() && tile.type == (ushort) 135) + { + WorldUtils.WireLine(new Point(x, y), new Point(x + index1, y + index2)); + return; + } + } + } + } + } + + public static bool EmptyLiquid(int x, int y) + { + if (!WorldGen.InWorld(x, y)) + return false; + Tile tile = Main.tile[x, y]; + if (tile == null) + return false; + int num = (int) tile.liquidType(); + if (tile.nactive() && Main.tileSolid[(int) tile.type] && !Main.tileSolidTop[(int) tile.type]) + return false; + tile.Clear(TileDataType.Liquid); + WorldGen.SquareTileFrame(x, y, false); + if (Main.netMode == 1) + NetMessage.sendWater(x, y); + else + Liquid.AddWater(x, y); + return true; + } + + public static bool PlaceLiquid(int x, int y, byte liquidType, byte amount) + { + if (!WorldGen.InWorld(x, y)) + return false; + Tile tile = Main.tile[x, y]; + if (tile == null) + return false; + byte num1 = tile.liquidType(); + if (tile.nactive() && Main.tileSolid[(int) tile.type] && !Main.tileSolidTop[(int) tile.type]) + return false; + if (tile.liquid == (byte) 0 || (int) liquidType == (int) num1) + { + tile.liquidType((int) liquidType); + if ((int) amount + (int) tile.liquid > (int) byte.MaxValue) + amount = (byte) ((uint) byte.MaxValue - (uint) tile.liquid); + tile.liquid += amount; + WorldGen.SquareTileFrame(x, y); + if (Main.netMode != 0) + NetMessage.sendWater(x, y); + return true; + } + ushort num2 = 0; + if (liquidType == (byte) 0 && num1 == (byte) 1 || liquidType == (byte) 1 && num1 == (byte) 0) + num2 = (ushort) 56; + else if (liquidType == (byte) 0 && num1 == (byte) 2 || liquidType == (byte) 2 && num1 == (byte) 0) + num2 = (ushort) 229; + else if (liquidType == (byte) 1 && num1 == (byte) 2 || liquidType == (byte) 2 && num1 == (byte) 1) + num2 = (ushort) 230; + if (num2 == (ushort) 0) + return false; + tile.liquid = (byte) 0; + tile.liquidType(0); + WorldGen.PlaceTile(x, y, (int) num2, true); + WorldGen.SquareTileFrame(x, y); + if (Main.netMode != 0) + NetMessage.SendTileSquare(-1, x - 1, y - 1, 3, num2 == (ushort) 56 ? TileChangeType.LavaWater : TileChangeType.HoneyLava); + return true; + } + + public static bool MoveTownNPC(int x, int y, int n) + { + if (!WorldGen.StartRoomCheck(x, y)) + { + string textValue = Lang.inter[40].Value; + switch (WorldGen.roomCheckFailureReason) + { + case TownNPCRoomCheckFailureReason.TooCloseToWorldEdge: + textValue = Language.GetTextValue("TownNPCHousingFailureReasons.TooCloseToWorldEdge"); + break; + case TownNPCRoomCheckFailureReason.RoomIsTooBig: + textValue = Language.GetTextValue("TownNPCHousingFailureReasons.RoomIsTooBig"); + break; + case TownNPCRoomCheckFailureReason.RoomIsTooSmall: + textValue = Language.GetTextValue("TownNPCHousingFailureReasons.RoomIsTooSmall"); + break; + case TownNPCRoomCheckFailureReason.HoleInWallIsTooBig: + textValue = Language.GetTextValue("TownNPCHousingFailureReasons.HoleInWallIsTooBig"); + break; + case TownNPCRoomCheckFailureReason.RoomCheckStartedInASolidTile: + textValue = Language.GetTextValue("TownNPCHousingFailureReasons.RoomCheckStartedInASolidTile"); + break; + } + Main.NewText(textValue, G: (byte) 240, B: (byte) 20); + return false; + } + if (!WorldGen.RoomNeeds(WorldGen.prioritizedTownNPCType)) + { + int index = 0; + int length = (WorldGen.roomTorch ? 0 : 1) + (WorldGen.roomDoor ? 0 : 1) + (WorldGen.roomTable ? 0 : 1) + (WorldGen.roomChair ? 0 : 1); + string[] strArray = new string[length]; + if (!WorldGen.roomTorch) + { + strArray[index] = Language.GetTextValue("Game.HouseLightSource"); + ++index; + } + if (!WorldGen.roomDoor) + { + strArray[index] = Language.GetTextValue("Game.HouseDoor"); + ++index; + } + if (!WorldGen.roomTable) + { + strArray[index] = Language.GetTextValue("Game.HouseTable"); + ++index; + } + if (!WorldGen.roomChair) + { + strArray[index] = Language.GetTextValue("Game.HouseChair"); + int num = index + 1; + } + Main.NewText(Language.GetTextValue("Game.HouseMissing_" + (object) length, (object[]) strArray), G: (byte) 240, B: (byte) 20); + return false; + } + int npcTypeAskingToScoreRoom = WorldGen.prioritizedTownNPCType; + if (n >= 0) + npcTypeAskingToScoreRoom = Main.npc[n].type; + WorldGen.ScoreRoom(npcTypeAskingToScoreRoom: npcTypeAskingToScoreRoom); + if (WorldGen.hiScore <= 0) + { + if (WorldGen.roomOccupied) + Main.NewText(Lang.inter[41].Value, G: (byte) 240, B: (byte) 20); + else if (WorldGen.roomEvil) + Main.NewText(Lang.inter[42].Value, G: (byte) 240, B: (byte) 20); + else + Main.NewText(Lang.inter[40].Value, G: (byte) 240, B: (byte) 20); + return false; + } + if (n < 0 || WorldGen.CheckSpecialTownNPCSpawningConditions(Main.npc[n].type)) + return true; + Main.NewText(Lang.inter[55].Value + " " + Main.npc[n].TypeName, G: (byte) 240, B: (byte) 20); + return false; + } + + public static void moveRoom(int x, int y, int n) + { + if (Main.netMode == 1) + { + NetMessage.SendData(60, number: n, number2: ((float) x), number3: ((float) y)); + } + else + { + WorldGen.prioritizedTownNPCType = Main.npc[n].type; + Main.npc[n].homeless = true; + int num = (int) WorldGen.SpawnTownNPC(x, y); + WorldGen.TownManager.SetRoom(Main.npc[n].type, Main.npc[n].homeTileX, Main.npc[n].homeTileY); + } + } + + public static bool IsNPCEvictable(int n) + { + if (n < 0) + return false; + Microsoft.Xna.Framework.Rectangle hitbox = Main.LocalPlayer.Hitbox; + hitbox.Inflate(Main.LogicCheckScreenWidth / 2, Main.LogicCheckScreenHeight / 2); + NPC npc = Main.npc[n]; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(npc.homeTileX * 16, npc.homeTileY * 16, 16, 16); + return hitbox.Intersects(rectangle); + } + + public static void kickOut(int n) + { + if (Main.netMode == 1) + { + NetMessage.SendData(60, number: n, number4: 1f); + } + else + { + Main.npc[n].homeless = true; + WorldGen.TownManager.KickOut(Main.npc[n]); + } + } + + public static bool IsThereASpawnablePrioritizedTownNPC( + int x, + int y, + ref bool canSpawnNewTownNPC) + { + if (WorldGen.CheckSpecialTownNPCSpawningConditions(WorldGen.prioritizedTownNPCType) && NPC.AnyNPCs(WorldGen.prioritizedTownNPCType)) + { + canSpawnNewTownNPC = false; + return true; + } + List occupantsList = new List(); + WorldGen.TownManager.AddOccupantsToList(x, y, occupantsList); + for (int index1 = 0; index1 < occupantsList.Count; ++index1) + { + int index2 = occupantsList[index1]; + if (Main.townNPCCanSpawn[index2] && !NPC.AnyNPCs(index2) && WorldGen.CheckSpecialTownNPCSpawningConditions(index2)) + { + WorldGen.prioritizedTownNPCType = index2; + canSpawnNewTownNPC = true; + return true; + } + } + for (int index = 0; index < 663; ++index) + { + if (Main.townNPCCanSpawn[index] && WorldGen.CheckSpecialTownNPCSpawningConditions(index)) + { + if (NPC.AnyNPCs(index)) + { + Main.townNPCCanSpawn[index] = false; + } + else + { + if (WorldGen.TownManager.HasRoomQuick(index)) + { + WorldGen.prioritizedTownNPCType = index; + canSpawnNewTownNPC = true; + return true; + } + if (!NPCID.Sets.IsTownPet[WorldGen.prioritizedTownNPCType] || NPCID.Sets.IsTownPet[index]) + { + WorldGen.prioritizedTownNPCType = index; + canSpawnNewTownNPC = true; + return true; + } + } + } + } + return false; + } + + public static bool IsThereASpawnablePrioritizedTownNPC_Old(int x, int y) + { + if (WorldGen.CheckSpecialTownNPCSpawningConditions(WorldGen.prioritizedTownNPCType) && NPC.AnyNPCs(WorldGen.prioritizedTownNPCType)) + return true; + List occupantsList = new List(); + WorldGen.TownManager.AddOccupantsToList(x, y, occupantsList); + for (int index1 = 0; index1 < occupantsList.Count; ++index1) + { + int index2 = occupantsList[index1]; + if (Main.townNPCCanSpawn[index2] && !NPC.AnyNPCs(index2) && WorldGen.CheckSpecialTownNPCSpawningConditions(index2)) + { + WorldGen.prioritizedTownNPCType = index2; + return true; + } + } + int num = -1; + for (int index = 0; index < 663; ++index) + { + if (Main.townNPCCanSpawn[index] && WorldGen.CheckSpecialTownNPCSpawningConditions(index)) + { + if (NPC.AnyNPCs(index)) + Main.townNPCCanSpawn[index] = false; + else if (WorldGen.TownManager.HasRoomQuick(index)) + { + if (num == -1) + num = index; + } + else if (!NPCID.Sets.IsTownPet[WorldGen.prioritizedTownNPCType] || NPCID.Sets.IsTownPet[index]) + { + WorldGen.prioritizedTownNPCType = index; + return true; + } + } + } + if (num == -1) + return false; + WorldGen.prioritizedTownNPCType = num; + return true; + } + + public static bool CheckSpecialTownNPCSpawningConditions(int type) + { + if (type != 160) + return true; + if ((double) WorldGen.roomY2 > Main.worldSurface) + return false; + int num1 = 0; + int num2 = WorldGen.roomX1 - Main.buffScanAreaWidth / 2 / 16 - 1 - Lighting.OffScreenTiles; + int num3 = WorldGen.roomX2 + Main.buffScanAreaWidth / 2 / 16 + 1 + Lighting.OffScreenTiles; + int num4 = WorldGen.roomY1 - Main.buffScanAreaHeight / 2 / 16 - 1 - Lighting.OffScreenTiles; + int num5 = WorldGen.roomY2 + Main.buffScanAreaHeight / 2 / 16 + 1 + Lighting.OffScreenTiles; + if (num2 < 0) + num2 = 0; + if (num3 >= Main.maxTilesX) + num3 = Main.maxTilesX - 1; + if (num4 < 0) + num4 = 0; + if (num5 >= Main.maxTilesY) + num5 = Main.maxTilesY - 1; + for (int index1 = num2 + 1; index1 < num3; ++index1) + { + for (int index2 = num4 + 2; index2 < num5 + 2; ++index2) + { + Tile tile = Main.tile[index1, index2]; + if (tile.active() && (tile.type == (ushort) 70 || tile.type == (ushort) 71 || tile.type == (ushort) 72 || tile.type == (ushort) 528)) + ++num1; + } + } + return num1 >= SceneMetrics.MushroomTileThreshold; + } + + public static void UnspawnTravelNPC() + { + int number = -1; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 368) + { + number = index; + break; + } + } + if (number < 0) + return; + int num1 = (int) ((double) Main.npc[number].Center.X / 16.0); + int num2 = (int) ((double) Main.npc[number].Center.Y / 16.0); + bool flag = true; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(num1 * 16 + 8 - NPC.sWidth / 2 - NPC.safeRangeX, num2 * 16 + 8 - NPC.sHeight / 2 - NPC.safeRangeY, NPC.sWidth + NPC.safeRangeX * 2, NPC.sHeight + NPC.safeRangeY * 2); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && new Microsoft.Xna.Framework.Rectangle((int) Main.player[index].position.X, (int) Main.player[index].position.Y, Main.player[index].width, Main.player[index].height).Intersects(rectangle)) + { + flag = false; + break; + } + } + if (!flag) + return; + string fullName = Main.npc[number].FullName; + switch (Main.netMode) + { + case 0: + Main.NewText(Lang.misc[35].Format((object) fullName), (byte) 50, (byte) 125); + break; + case 2: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[35].Key, (object) Main.npc[number].GetFullNetName()), new Color(50, 125, (int) byte.MaxValue)); + break; + } + Main.npc[number].active = false; + Main.npc[number].netSkip = -1; + Main.npc[number].life = 0; + NetMessage.SendData(23, number: number); + } + + public static void SpawnTravelNPC() + { + if (Main.eclipse || !Main.dayTime || Main.invasionType > 0 && Main.invasionDelay == 0 && Main.invasionSize > 0) + return; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type == 368) + return; + } + Chest.SetupTravelShop(); + NetMessage.SendTravelShop(-1); + int[] numArray = new int[200]; + int maxValue = 0; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].townNPC && Main.npc[index].type != 37 && !Main.npc[index].homeless) + { + numArray[maxValue] = index; + ++maxValue; + } + } + if (maxValue == 0) + return; + int index1 = numArray[Main.rand.Next(maxValue)]; + WorldGen.bestX = Main.npc[index1].homeTileX; + WorldGen.bestY = Main.npc[index1].homeTileY; + int minValue = WorldGen.bestX; + int num1 = WorldGen.bestX; + int bestY = WorldGen.bestY; + for (int bestX = WorldGen.bestX; bestX > WorldGen.bestX - 10 && (WorldGen.SolidTile(bestX, bestY) || Main.tileSolidTop[(int) Main.tile[bestX, bestY].type]) && (!Main.tile[bestX, bestY - 1].active() || !Main.tileSolid[(int) Main.tile[bestX, bestY - 1].type] || Main.tileSolidTop[(int) Main.tile[bestX, bestY - 1].type]) && (!Main.tile[bestX, bestY - 2].active() || !Main.tileSolid[(int) Main.tile[bestX, bestY - 2].type] || Main.tileSolidTop[(int) Main.tile[bestX, bestY - 2].type]) && (!Main.tile[bestX, bestY - 3].active() || !Main.tileSolid[(int) Main.tile[bestX, bestY - 3].type] || Main.tileSolidTop[(int) Main.tile[bestX, bestY - 3].type]); --bestX) + minValue = bestX; + for (int bestX = WorldGen.bestX; bestX < WorldGen.bestX + 10 && (WorldGen.SolidTile(bestX, bestY) || Main.tileSolidTop[(int) Main.tile[bestX, bestY].type]) && (!Main.tile[bestX, bestY - 1].active() || !Main.tileSolid[(int) Main.tile[bestX, bestY - 1].type] || Main.tileSolidTop[(int) Main.tile[bestX, bestY - 1].type]) && (!Main.tile[bestX, bestY - 2].active() || !Main.tileSolid[(int) Main.tile[bestX, bestY - 2].type] || Main.tileSolidTop[(int) Main.tile[bestX, bestY - 2].type]) && (!Main.tile[bestX, bestY - 3].active() || !Main.tileSolid[(int) Main.tile[bestX, bestY - 3].type] || Main.tileSolidTop[(int) Main.tile[bestX, bestY - 3].type]); ++bestX) + num1 = bestX; + for (int index2 = 0; index2 < 30; ++index2) + { + int num2 = Main.rand.Next(minValue, num1 + 1); + if (index2 < 20) + { + if (num2 < WorldGen.bestX - 1 || num2 > WorldGen.bestX + 1) + { + WorldGen.bestX = num2; + break; + } + } + else if (num2 != WorldGen.bestX) + { + WorldGen.bestX = num2; + break; + } + } + int index3 = WorldGen.bestX; + int index4 = WorldGen.bestY; + bool flag = false; + if (!flag && (double) index4 <= Main.worldSurface) + { + for (int index5 = 20; index5 < 500; ++index5) + { + for (int index6 = 0; index6 < 2; ++index6) + { + index3 = index6 != 0 ? WorldGen.bestX - index5 * 2 : WorldGen.bestX + index5 * 2; + if (index3 > 10 && index3 < Main.maxTilesX - 10) + { + int num3 = WorldGen.bestY - index5; + double num4 = (double) (WorldGen.bestY + index5); + if (num3 < 10) + num3 = 10; + if (num4 > Main.worldSurface) + num4 = Main.worldSurface; + for (int index7 = num3; (double) index7 < num4; ++index7) + { + index4 = index7; + if (Main.tile[index3, index4].nactive() && Main.tileSolid[(int) Main.tile[index3, index4].type]) + { + if (Main.tile[index3, index4 - 3].liquid == (byte) 0 && Main.tile[index3, index4 - 2].liquid == (byte) 0 && Main.tile[index3, index4 - 1].liquid == (byte) 0 && !Collision.SolidTiles(index3 - 1, index3 + 1, index4 - 3, index4 - 1)) + { + flag = true; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(index3 * 16 + 8 - NPC.sWidth / 2 - NPC.safeRangeX, index4 * 16 + 8 - NPC.sHeight / 2 - NPC.safeRangeY, NPC.sWidth + NPC.safeRangeX * 2, NPC.sHeight + NPC.safeRangeY * 2); + for (int index8 = 0; index8 < (int) byte.MaxValue; ++index8) + { + if (Main.player[index8].active && new Microsoft.Xna.Framework.Rectangle((int) Main.player[index8].position.X, (int) Main.player[index8].position.Y, Main.player[index8].width, Main.player[index8].height).Intersects(rectangle)) + { + flag = false; + break; + } + } + break; + } + break; + } + } + } + if (flag) + break; + } + if (flag) + break; + } + } + int index9 = NPC.NewNPC(index3 * 16, index4 * 16, 368, 1); + Main.npc[index9].homeTileX = WorldGen.bestX; + Main.npc[index9].homeTileY = WorldGen.bestY; + Main.npc[index9].homeless = true; + if (index3 < WorldGen.bestX) + Main.npc[index9].direction = 1; + else if (index3 > WorldGen.bestX) + Main.npc[index9].direction = -1; + Main.npc[index9].netUpdate = true; + string fullName = Main.npc[index9].FullName; + if (Main.netMode == 0) + { + Main.NewText(Language.GetTextValue("Announcement.HasArrived", (object) fullName), (byte) 50, (byte) 125); + } + else + { + if (Main.netMode != 2) + return; + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasArrived", (object) Main.npc[index9].GetFullNetName()), new Color(50, 125, (int) byte.MaxValue)); + } + } + + public static TownNPCSpawnResult SpawnTownNPC(int x, int y) + { + if (Main.wallHouse[(int) Main.tile[x, y].wall]) + WorldGen.canSpawn = true; + if (!WorldGen.canSpawn || !WorldGen.StartRoomCheck(x, y) || !WorldGen.RoomNeeds(WorldGen.prioritizedTownNPCType)) + return TownNPCSpawnResult.Blocked; + int ahomelessNpc = WorldGen.FindAHomelessNPC(); + int npcTypeAskingToScoreRoom = WorldGen.prioritizedTownNPCType; + if (ahomelessNpc != -1) + npcTypeAskingToScoreRoom = Main.npc[ahomelessNpc].type; + WorldGen.ScoreRoom(npcTypeAskingToScoreRoom: npcTypeAskingToScoreRoom); + if (WorldGen.hiScore <= 0) + return TownNPCSpawnResult.Blocked; + bool canSpawnNewTownNPC = true; + if (!WorldGen.IsThereASpawnablePrioritizedTownNPC(WorldGen.bestX, WorldGen.bestY, ref canSpawnNewTownNPC)) + return TownNPCSpawnResult.Blocked; + int prioritizedTownNpcType1 = WorldGen.prioritizedTownNPCType; + if (ahomelessNpc != -1) + { + Main.townNPCCanSpawn[WorldGen.prioritizedTownNPCType] = false; + Main.npc[ahomelessNpc].homeTileX = WorldGen.bestX; + Main.npc[ahomelessNpc].homeTileY = WorldGen.bestY; + Main.npc[ahomelessNpc].homeless = false; + AchievementsHelper.NotifyProgressionEvent(8); + WorldGen.prioritizedTownNPCType = 0; + return TownNPCSpawnResult.RelocatedHomeless; + } + if (canSpawnNewTownNPC && ahomelessNpc == -1) + { + Point roomPosition; + if (WorldGen.TownManager.HasRoom(prioritizedTownNpcType1, out roomPosition) && !WorldGen.currentlyTryingToUseAlternateHousingSpot) + { + int bestX = WorldGen.bestX; + int bestY = WorldGen.bestY; + WorldGen.currentlyTryingToUseAlternateHousingSpot = true; + TownNPCSpawnResult townNpcSpawnResult = WorldGen.SpawnTownNPC(roomPosition.X, roomPosition.Y - 2); + WorldGen.currentlyTryingToUseAlternateHousingSpot = false; + WorldGen.bestX = bestX; + WorldGen.bestY = bestY; + if (townNpcSpawnResult == TownNPCSpawnResult.Successful) + return townNpcSpawnResult; + } + int spawnTileX = WorldGen.bestX; + int spawnTileY = WorldGen.bestY; + int prioritizedTownNpcType2 = WorldGen.prioritizedTownNPCType; + if (WorldGen.IsRoomConsideredAlreadyOccupied(spawnTileX, spawnTileY, prioritizedTownNpcType2)) + return TownNPCSpawnResult.BlockedInfiHousing; + bool flag = false; + if (!flag) + { + flag = true; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(spawnTileX * 16 + 8 - NPC.sWidth / 2 - NPC.safeRangeX, spawnTileY * 16 + 8 - NPC.sHeight / 2 - NPC.safeRangeY, NPC.sWidth + NPC.safeRangeX * 2, NPC.sHeight + NPC.safeRangeY * 2); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && new Microsoft.Xna.Framework.Rectangle((int) Main.player[index].position.X, (int) Main.player[index].position.Y, Main.player[index].width, Main.player[index].height).Intersects(rectangle)) + { + flag = false; + break; + } + } + } + if (!flag && (double) spawnTileY <= Main.worldSurface) + { + for (int index1 = 1; index1 < 500; ++index1) + { + for (int index2 = 0; index2 < 2; ++index2) + { + spawnTileX = index2 != 0 ? WorldGen.bestX - index1 : WorldGen.bestX + index1; + if (spawnTileX > 10 && spawnTileX < Main.maxTilesX - 10) + { + int num1 = WorldGen.bestY - index1; + double num2 = (double) (WorldGen.bestY + index1); + if (num1 < 10) + num1 = 10; + if (num2 > Main.worldSurface) + num2 = Main.worldSurface; + for (int index3 = num1; (double) index3 < num2; ++index3) + { + spawnTileY = index3; + if (Main.tile[spawnTileX, spawnTileY].nactive() && Main.tileSolid[(int) Main.tile[spawnTileX, spawnTileY].type]) + { + if (!Collision.SolidTiles(spawnTileX - 1, spawnTileX + 1, spawnTileY - 3, spawnTileY - 1)) + { + flag = true; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(spawnTileX * 16 + 8 - NPC.sWidth / 2 - NPC.safeRangeX, spawnTileY * 16 + 8 - NPC.sHeight / 2 - NPC.safeRangeY, NPC.sWidth + NPC.safeRangeX * 2, NPC.sHeight + NPC.safeRangeY * 2); + for (int index4 = 0; index4 < (int) byte.MaxValue; ++index4) + { + if (Main.player[index4].active && new Microsoft.Xna.Framework.Rectangle((int) Main.player[index4].position.X, (int) Main.player[index4].position.Y, Main.player[index4].width, Main.player[index4].height).Intersects(rectangle)) + { + flag = false; + break; + } + } + break; + } + break; + } + } + } + if (flag) + break; + } + if (flag) + break; + } + } + int index5 = NPC.NewNPC(spawnTileX * 16, spawnTileY * 16, prioritizedTownNpcType1, 1); + Main.townNPCCanSpawn[prioritizedTownNpcType1] = false; + Main.npc[index5].homeTileX = WorldGen.bestX; + Main.npc[index5].homeTileY = WorldGen.bestY; + if (spawnTileX < WorldGen.bestX) + Main.npc[index5].direction = 1; + else if (spawnTileX > WorldGen.bestX) + Main.npc[index5].direction = -1; + Main.npc[index5].netUpdate = true; + string fullName = Main.npc[index5].FullName; + switch (Main.netMode) + { + case 0: + Main.NewText(Language.GetTextValue("Announcement.HasArrived", (object) fullName), (byte) 50, (byte) 125); + break; + case 2: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasArrived", (object) Main.npc[index5].GetFullNetName()), new Color(50, 125, (int) byte.MaxValue)); + break; + } + AchievementsHelper.NotifyProgressionEvent(8); + if (Main.npc[index5].type == 160) + AchievementsHelper.NotifyProgressionEvent(18); + WorldGen.CheckAchievement_RealEstate(); + WorldGen.prioritizedTownNPCType = 0; + } + return TownNPCSpawnResult.Successful; + } + + private static int FindAHomelessNPC() + { + int num = -1; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].homeless && Main.npc[index].type == WorldGen.prioritizedTownNPCType && WorldGen.CheckSpecialTownNPCSpawningConditions(Main.npc[index].type)) + { + num = index; + break; + } + } + return num; + } + + private static bool IsRoomConsideredAlreadyOccupied( + int spawnTileX, + int spawnTileY, + int npcTypeToSpawn) + { + bool flag = false; + for (int index = 0; index < 200; ++index) + { + NPC npc2 = Main.npc[index]; + if (npc2.active && npc2.townNPC && !npc2.homeless && npc2.homeTileX == spawnTileX && npc2.homeTileY == spawnTileY && !WorldGen.TownManager.CanNPCsLiveWithEachOther(npcTypeToSpawn, npc2)) + { + flag = true; + break; + } + } + return flag; + } + + public static void CheckAchievement_RealEstate() + { + bool[] flagArray = new bool[663]; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].type >= 0 && Main.npc[index].type < 663) + flagArray[Main.npc[index].type] = true; + } + if (!flagArray[38] || !flagArray[17] || !flagArray[107] || !flagArray[19] || !flagArray[22] || !flagArray[124] || !flagArray[228] || !flagArray[178] || !flagArray[18] || !flagArray[229] || !flagArray[209] || !flagArray[54] || !flagArray[108] || !flagArray[160] || !flagArray[20] || !flagArray[369] || !flagArray[207] || !flagArray[227] || !flagArray[208] || !flagArray[441] || !flagArray[353] || !flagArray[588] || !flagArray[633]) + return; + AchievementsHelper.NotifyProgressionEvent(17); + } + + public static bool RoomNeeds(int npcType) + { + WorldGen.roomChair = false; + WorldGen.roomDoor = false; + WorldGen.roomTable = false; + WorldGen.roomTorch = false; + for (int index = 0; index < TileID.Sets.RoomNeeds.CountsAsChair.Length; ++index) + { + if (WorldGen.houseTile[TileID.Sets.RoomNeeds.CountsAsChair[index]]) + { + WorldGen.roomChair = true; + break; + } + } + for (int index = 0; index < TileID.Sets.RoomNeeds.CountsAsTable.Length; ++index) + { + if (WorldGen.houseTile[TileID.Sets.RoomNeeds.CountsAsTable[index]]) + { + WorldGen.roomTable = true; + break; + } + } + for (int index = 0; index < TileID.Sets.RoomNeeds.CountsAsTorch.Length; ++index) + { + if (WorldGen.houseTile[TileID.Sets.RoomNeeds.CountsAsTorch[index]]) + { + WorldGen.roomTorch = true; + break; + } + } + for (int index = 0; index < TileID.Sets.RoomNeeds.CountsAsDoor.Length; ++index) + { + if (WorldGen.houseTile[TileID.Sets.RoomNeeds.CountsAsDoor[index]]) + { + WorldGen.roomDoor = true; + break; + } + } + WorldGen.canSpawn = WorldGen.roomChair && WorldGen.roomTable && WorldGen.roomDoor && WorldGen.roomTorch; + return WorldGen.canSpawn; + } + + public static void QuickFindHome(int npc) + { + bool flag = Main.tileSolid[379]; + Main.tileSolid[379] = true; + if (Main.npc[npc].homeTileX > 10 && Main.npc[npc].homeTileY > 10 && Main.npc[npc].homeTileX < Main.maxTilesX - 10 && Main.npc[npc].homeTileY < Main.maxTilesY) + { + WorldGen.canSpawn = false; + WorldGen.StartRoomCheck(Main.npc[npc].homeTileX, Main.npc[npc].homeTileY - 1); + if (!WorldGen.canSpawn) + { + for (int x = Main.npc[npc].homeTileX - 1; x < Main.npc[npc].homeTileX + 2; ++x) + { + int y = Main.npc[npc].homeTileY - 1; + while (y < Main.npc[npc].homeTileY + 2 && !WorldGen.StartRoomCheck(x, y)) + ++y; + } + } + if (!WorldGen.canSpawn) + { + int num = 10; + for (int x = Main.npc[npc].homeTileX - num; x <= Main.npc[npc].homeTileX + num; x += 2) + { + int y = Main.npc[npc].homeTileY - num; + while (y <= Main.npc[npc].homeTileY + num && !WorldGen.StartRoomCheck(x, y)) + y += 2; + } + } + if (WorldGen.canSpawn) + { + WorldGen.RoomNeeds(Main.npc[npc].type); + if (WorldGen.canSpawn) + WorldGen.ScoreRoom(npc, Main.npc[npc].type); + if (WorldGen.canSpawn && WorldGen.hiScore > 0) + WorldGen.canSpawn = WorldGen.IsRoomConsideredOccupiedForNPCIndex(npc); + if (WorldGen.canSpawn && WorldGen.hiScore > 0) + { + Main.npc[npc].homeTileX = WorldGen.bestX; + Main.npc[npc].homeTileY = WorldGen.bestY; + Main.npc[npc].homeless = false; + AchievementsHelper.NotifyProgressionEvent(8); + WorldGen.canSpawn = false; + } + else + Main.npc[npc].homeless = true; + } + else + Main.npc[npc].homeless = true; + } + Main.tileSolid[379] = flag; + } + + private static bool IsRoomConsideredOccupiedForNPCIndex(int npc) + { + bool flag = true; + for (int index = 0; index < 200; ++index) + { + if (index != npc) + { + NPC npc2 = Main.npc[index]; + if (npc2.active && npc2.townNPC && !npc2.homeless && npc2.homeTileX == WorldGen.bestX && npc2.homeTileY == WorldGen.bestY && !WorldGen.TownManager.CanNPCsLiveWithEachOther(Main.npc[npc], npc2)) + { + flag = false; + break; + } + } + } + return flag; + } + + private static bool ScoreRoom_IsThisRoomOccupiedBySomeone(int ignoreNPC = -1, int npcTypeAsking = -1) + { + for (int index1 = 0; index1 < 200; ++index1) + { + if (Main.npc[index1].active && Main.npc[index1].townNPC && ignoreNPC != index1 && !Main.npc[index1].homeless) + { + for (int index2 = 0; index2 < WorldGen.numRoomTiles; ++index2) + { + if (Main.npc[index1].homeTileX == WorldGen.roomX[index2] && Main.npc[index1].homeTileY == WorldGen.roomY[index2]) + { + bool flag = false; + for (int index3 = 0; index3 < WorldGen.numRoomTiles; ++index3) + { + if (Main.npc[index1].homeTileX == WorldGen.roomX[index3] && Main.npc[index1].homeTileY - 1 == WorldGen.roomY[index3]) + { + if (WorldGen.TownManager.CanNPCsLiveWithEachOther(npcTypeAsking, Main.npc[index1])) + { + WorldGen.sharedRoomX = Main.npc[index1].homeTileX; + } + else + { + flag = true; + break; + } + } + } + if (flag) + return true; + } + } + } + } + return false; + } + + public static void CountTileTypesInArea( + int[] tileTypeCounts, + int startX, + int endX, + int startY, + int endY) + { + for (int index1 = startX; index1 <= endX; ++index1) + { + for (int index2 = startY; index2 <= endY; ++index2) + { + if (Main.tile[index1, index2].active()) + ++tileTypeCounts[(int) Main.tile[index1, index2].type]; + } + } + } + + public static int GetTileTypeCountByCategory(int[] tileTypeCounts, TileScanGroup group) + { + switch (group) + { + case TileScanGroup.None: + return 0; + case TileScanGroup.Corruption: + return tileTypeCounts[23] + tileTypeCounts[24] + tileTypeCounts[25] + tileTypeCounts[32] + tileTypeCounts[112] + tileTypeCounts[163] + tileTypeCounts[400] + tileTypeCounts[398] + -5 * tileTypeCounts[27]; + case TileScanGroup.Crimson: + return tileTypeCounts[199] + tileTypeCounts[203] + tileTypeCounts[200] + tileTypeCounts[401] + tileTypeCounts[399] + tileTypeCounts[234] + tileTypeCounts[352] - 5 * tileTypeCounts[27]; + case TileScanGroup.Hallow: + return tileTypeCounts[109] + tileTypeCounts[110] + tileTypeCounts[113] + tileTypeCounts[117] + tileTypeCounts[116] + tileTypeCounts[164] + tileTypeCounts[403] + tileTypeCounts[402]; + case TileScanGroup.TotalGoodEvil: + int typeCountByCategory1 = WorldGen.GetTileTypeCountByCategory(tileTypeCounts, TileScanGroup.Hallow); + int typeCountByCategory2 = WorldGen.GetTileTypeCountByCategory(tileTypeCounts, TileScanGroup.Corruption); + int typeCountByCategory3 = WorldGen.GetTileTypeCountByCategory(tileTypeCounts, TileScanGroup.Crimson); + int num1 = 5 * tileTypeCounts[27]; + int num2 = typeCountByCategory3; + int num3 = typeCountByCategory2 + num2 + num1; + return typeCountByCategory1 - num3; + default: + return 0; + } + } + + public static void ScoreRoom(int ignoreNPC = -1, int npcTypeAskingToScoreRoom = -1) + { + WorldGen.roomOccupied = false; + WorldGen.roomEvil = false; + WorldGen.sharedRoomX = -1; + if (WorldGen.ScoreRoom_IsThisRoomOccupiedBySomeone(ignoreNPC, npcTypeAskingToScoreRoom)) + { + WorldGen.roomOccupied = true; + WorldGen.hiScore = -1; + } + else + { + WorldGen.hiScore = 0; + int num1 = 50; + int num2 = 40; + int num3 = WorldGen.roomX1 - Main.buffScanAreaWidth / 2 / 16 - 1 - num2; + int num4 = WorldGen.roomX2 + Main.buffScanAreaWidth / 2 / 16 + 1 + num2; + int num5 = WorldGen.roomY1 - Main.buffScanAreaHeight / 2 / 16 - 1 - num2; + int num6 = WorldGen.roomY2 + Main.buffScanAreaHeight / 2 / 16 + 1 + num2; + if (num3 < 5) + num3 = 5; + if (num4 >= Main.maxTilesX - 5) + num4 = Main.maxTilesX - 6; + if (num5 < 5) + num5 = 5; + if (num6 >= Main.maxTilesY - 5) + num6 = Main.maxTilesY - 6; + int[] tileTypeCounts = new int[623]; + WorldGen.CountTileTypesInArea(tileTypeCounts, num3 + 1, num4 - 1, num5 + 2, num6 + 1); + int num7 = -WorldGen.GetTileTypeCountByCategory(tileTypeCounts, TileScanGroup.TotalGoodEvil); + if (num7 < 50) + num7 = 0; + int num8 = num1 - num7; + if (num8 <= -250) + { + WorldGen.hiScore = num8; + WorldGen.roomEvil = true; + } + else + { + int roomX1 = WorldGen.roomX1; + int roomX2 = WorldGen.roomX2; + int roomY1 = WorldGen.roomY1; + int roomY2 = WorldGen.roomY2; + for (int index1 = roomX1 + 1; index1 < roomX2; ++index1) + { + for (int index2 = roomY1 + 2; index2 < roomY2 + 2; ++index2) + { + if (Main.tile[index1, index2].nactive() && WorldGen.ScoreRoom_CanBeHomeSpot(index1, index2)) + { + int num9 = num8; + if (Main.tileSolid[(int) Main.tile[index1, index2].type] && !Main.tileSolidTop[(int) Main.tile[index1, index2].type] && !Collision.SolidTiles(index1 - 1, index1 + 1, index2 - 3, index2 - 1) && Main.tile[index1 - 1, index2].nactive() && Main.tileSolid[(int) Main.tile[index1 - 1, index2].type] && Main.tile[index1 + 1, index2].nactive() && Main.tileSolid[(int) Main.tile[index1 + 1, index2].type]) + { + int num10 = 0; + int num11 = 0; + for (int x = index1 - 2; x < index1 + 3; ++x) + { + for (int y = index2 - 4; y < index2; ++y) + { + Tile tile = Main.tile[x, y]; + if (tile.nactive() && !TileID.Sets.IgnoredInHouseScore[(int) tile.type]) + { + if (x == index1) + ++num10; + else if (TileID.Sets.BasicChest[(int) tile.type]) + ++num11; + else if (tile.type == (ushort) 10 || tile.type == (ushort) 388) + num9 -= 20; + else if (WorldGen.IsOpenDoorAnchorFrame(x, y)) + num9 -= 20; + else if (Main.tileSolid[(int) tile.type]) + num9 -= 5; + else + num9 += 5; + } + } + } + if (WorldGen.sharedRoomX >= 0 && num9 >= 1 && Math.Abs(WorldGen.sharedRoomX - index1) < 3) + num9 = 1; + if (num9 > 0 && num11 > 0) + { + num9 -= 30 * num11; + if (num9 < 1) + num9 = 1; + } + if (num9 > 0 && num10 > 0) + { + num9 -= 15 * num10; + if (num9 <= 0) + num9 = 0; + } + if (num9 > WorldGen.hiScore) + { + bool flag1 = WorldGen.Housing_CheckIfInRoom(index1, index2); + bool[] flagArray = new bool[3]; + for (int index3 = 1; index3 <= 3; ++index3) + { + if (!Main.tile[index1, index2 - index3].active() || !Main.tileSolid[(int) Main.tile[index1, index2 - index3].type]) + flagArray[index3 - 1] = true; + if (!WorldGen.Housing_CheckIfInRoom(index1, index2 - index3)) + flagArray[index3 - 1] = false; + } + foreach (bool flag2 in flagArray) + { + if (!flag2) + { + flag1 = false; + break; + } + } + if (flag1 && !WorldGen.Housing_CheckIfIsCeiling(index1, index2)) + { + WorldGen.hiScore = num9; + WorldGen.bestX = index1; + WorldGen.bestY = index2; + } + } + } + } + } + } + } + } + } + + private static bool ScoreRoom_CanBeHomeSpot(int x, int y) + { + Tile tile = Main.tile[x, y]; + return !tile.active() || tile.type != (ushort) 379; + } + + private static bool Housing_CheckIfIsCeiling(int i, int j) + { + bool flag = false; + for (int index = 0; index < WorldGen.roomCeilingsCount; ++index) + { + if (WorldGen.roomCeilingX[index] == i) + { + if (WorldGen.roomCeilingY[index] == j) + { + flag = true; + break; + } + break; + } + } + return flag; + } + + private static bool Housing_CheckIfInRoom(int i, int j) + { + bool flag = false; + for (int index = 0; index < WorldGen.numRoomTiles; ++index) + { + if (WorldGen.roomX[index] == i && WorldGen.roomY[index] == j) + { + flag = true; + break; + } + } + return flag; + } + + public static bool StartRoomCheck(int x, int y) + { + WorldGen.roomX1 = x; + WorldGen.roomX2 = x; + WorldGen.roomY1 = y; + WorldGen.roomY2 = y; + WorldGen.numRoomTiles = 0; + WorldGen.roomCeilingsCount = 0; + for (int index = 0; index < 623; ++index) + WorldGen.houseTile[index] = false; + WorldGen.canSpawn = true; + if (Main.tile[x, y].nactive() && Main.tileSolid[(int) Main.tile[x, y].type]) + { + WorldGen.roomCheckFailureReason = TownNPCRoomCheckFailureReason.RoomCheckStartedInASolidTile; + WorldGen.canSpawn = false; + return false; + } + WorldGen.roomCheckFailureReason = TownNPCRoomCheckFailureReason.None; + WorldGen.CheckRoom(x, y); + if (!WorldGen.canSpawn) + return false; + if (WorldGen.numRoomTiles < 60) + { + WorldGen.roomCheckFailureReason = TownNPCRoomCheckFailureReason.RoomIsTooSmall; + WorldGen.canSpawn = false; + return false; + } + return WorldGen.canSpawn; + } + + public static void CheckRoom(int x, int y) + { + if (!WorldGen.canSpawn) + return; + if (x < 10 || y < 10 || x >= Main.maxTilesX - 10 || y >= WorldGen.lastMaxTilesY - 10) + { + WorldGen.roomCheckFailureReason = TownNPCRoomCheckFailureReason.TooCloseToWorldEdge; + WorldGen.canSpawn = false; + } + else + { + for (int index = 0; index < WorldGen.numRoomTiles; ++index) + { + if (WorldGen.roomX[index] == x && WorldGen.roomY[index] == y) + return; + } + WorldGen.roomX[WorldGen.numRoomTiles] = x; + WorldGen.roomY[WorldGen.numRoomTiles] = y; + bool flag1 = false; + for (int index = 0; index < WorldGen.roomCeilingsCount; ++index) + { + if (WorldGen.roomCeilingX[index] == x) + { + flag1 = true; + if (WorldGen.roomCeilingY[index] > y) + { + WorldGen.roomCeilingY[index] = y; + break; + } + break; + } + } + if (!flag1) + { + WorldGen.roomCeilingX[WorldGen.roomCeilingsCount] = x; + WorldGen.roomCeilingY[WorldGen.roomCeilingsCount] = y; + ++WorldGen.roomCeilingsCount; + } + ++WorldGen.numRoomTiles; + if (WorldGen.numRoomTiles >= WorldGen.maxRoomTiles) + { + WorldGen.roomCheckFailureReason = TownNPCRoomCheckFailureReason.RoomIsTooBig; + WorldGen.canSpawn = false; + } + else + { + if (Main.tile[x, y].nactive()) + { + WorldGen.houseTile[(int) Main.tile[x, y].type] = true; + if (Main.tileSolid[(int) Main.tile[x, y].type] || Main.tile[x, y].type == (ushort) 11 && (Main.tile[x, y].frameX == (short) 0 || Main.tile[x, y].frameX == (short) 54 || Main.tile[x, y].frameX == (short) 72 || Main.tile[x, y].frameX == (short) 126) || Main.tile[x, y].type == (ushort) 389 || Main.tile[x, y].type == (ushort) 386 && (Main.tile[x, y].frameX < (short) 36 && Main.tile[x, y].frameY == (short) 18 || Main.tile[x, y].frameX >= (short) 36 && Main.tile[x, y].frameY == (short) 0)) + return; + } + if (x < WorldGen.roomX1) + WorldGen.roomX1 = x; + if (x > WorldGen.roomX2) + WorldGen.roomX2 = x; + if (y < WorldGen.roomY1) + WorldGen.roomY1 = y; + if (y > WorldGen.roomY2) + WorldGen.roomY2 = y; + bool flag2 = false; + bool flag3 = false; + for (int index = -2; index < 3; ++index) + { + if (Main.wallHouse[(int) Main.tile[x + index, y].wall]) + flag2 = true; + if (Main.tile[x + index, y].nactive() && (Main.tileSolid[(int) Main.tile[x + index, y].type] || TileID.Sets.HousingWalls[(int) Main.tile[x + index, y].type])) + flag2 = true; + if (Main.wallHouse[(int) Main.tile[x, y + index].wall]) + flag3 = true; + if (Main.tile[x, y + index].nactive() && (Main.tileSolid[(int) Main.tile[x, y + index].type] || TileID.Sets.HousingWalls[(int) Main.tile[x, y + index].type])) + flag3 = true; + } + if (!flag2 || !flag3) + { + WorldGen.roomCheckFailureReason = TownNPCRoomCheckFailureReason.HoleInWallIsTooBig; + WorldGen.canSpawn = false; + } + else + { + for (int x1 = x - 1; x1 < x + 2; ++x1) + { + for (int y1 = y - 1; y1 < y + 2; ++y1) + { + if ((x1 != x || y1 != y) && WorldGen.canSpawn) + WorldGen.CheckRoom(x1, y1); + } + } + } + } + } + } + + public static void dropMeteor() + { + bool flag = true; + if (Main.netMode == 1) + return; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active) + { + flag = false; + break; + } + } + int num1 = 0; + int num2 = (int) (400.0 * (double) (Main.maxTilesX / 4200)); + for (int index1 = 5; index1 < Main.maxTilesX - 5; ++index1) + { + for (int index2 = 5; (double) index2 < Main.worldSurface; ++index2) + { + if (Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 37) + { + ++num1; + if (num1 > num2) + return; + } + } + } + float num3 = 600f; + while (!flag) + { + float num4 = (float) Main.maxTilesX * 0.08f; + int i1 = Main.rand.Next(150, Main.maxTilesX - 150); + while ((double) i1 > (double) Main.spawnTileX - (double) num4 && (double) i1 < (double) Main.spawnTileX + (double) num4) + i1 = Main.rand.Next(150, Main.maxTilesX - 150); + for (int j1 = (int) (Main.worldSurface * 0.3); j1 < Main.maxTilesY; ++j1) + { + if (Main.tile[i1, j1].active() && Main.tileSolid[(int) Main.tile[i1, j1].type] && !TileID.Sets.Platforms[(int) Main.tile[i1, j1].type]) + { + int num5 = 0; + int num6 = 15; + for (int i2 = i1 - num6; i2 < i1 + num6; ++i2) + { + for (int j2 = j1 - num6; j2 < j1 + num6; ++j2) + { + if (WorldGen.SolidTile(i2, j2)) + { + ++num5; + if (Main.tile[i2, j2].type == (ushort) 189 || Main.tile[i2, j2].type == (ushort) 202) + num5 -= 100; + } + else if (Main.tile[i2, j2].liquid > (byte) 0) + --num5; + } + } + if ((double) num5 >= (double) num3) + { + flag = WorldGen.meteor(i1, j1); + if (!flag) + break; + break; + } + num3 -= 0.5f; + break; + } + } + if ((double) num3 < 100.0) + break; + } + } + + public static bool meteor(int i, int j, bool ignorePlayers = false) + { + if (i < 50 || i > Main.maxTilesX - 50 || j < 50 || j > Main.maxTilesY - 50) + return false; + int num1 = 35; + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle((i - num1) * 16, (j - num1) * 16, num1 * 2 * 16, num1 * 2 * 16); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && !ignorePlayers) + { + Microsoft.Xna.Framework.Rectangle rectangle2 = new Microsoft.Xna.Framework.Rectangle((int) ((double) Main.player[index].position.X + (double) (Main.player[index].width / 2) - (double) (NPC.sWidth / 2) - (double) NPC.safeRangeX), (int) ((double) Main.player[index].position.Y + (double) (Main.player[index].height / 2) - (double) (NPC.sHeight / 2) - (double) NPC.safeRangeY), NPC.sWidth + NPC.safeRangeX * 2, NPC.sHeight + NPC.safeRangeY * 2); + if (rectangle1.Intersects(rectangle2)) + return false; + } + } + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active) + { + Microsoft.Xna.Framework.Rectangle rectangle3 = new Microsoft.Xna.Framework.Rectangle((int) Main.npc[index].position.X, (int) Main.npc[index].position.Y, Main.npc[index].width, Main.npc[index].height); + if (rectangle1.Intersects(rectangle3)) + return false; + } + } + for (int index1 = i - num1; index1 < i + num1; ++index1) + { + for (int index2 = j - num1; index2 < j + num1; ++index2) + { + if (Main.tile[index1, index2].active()) + { + if (TileID.Sets.BasicChest[(int) Main.tile[index1, index2].type] || Main.tileDungeon[(int) Main.tile[index1, index2].type]) + return false; + switch (Main.tile[index1, index2].type) + { + case 226: + case 470: + case 475: + case 488: + case 597: + return false; + default: + continue; + } + } + } + } + WorldGen.stopDrops = true; + int num2 = WorldGen.genRand.Next(17, 23); + for (int index3 = i - num2; index3 < i + num2; ++index3) + { + for (int index4 = j - num2; index4 < j + num2; ++index4) + { + if (index4 > j + Main.rand.Next(-2, 3) - 5) + { + double num3 = (double) Math.Abs(i - index3); + float num4 = (float) Math.Abs(j - index4); + if (Math.Sqrt(num3 * num3 + (double) num4 * (double) num4) < (double) num2 * 0.9 + (double) Main.rand.Next(-4, 5)) + { + if (!Main.tileSolid[(int) Main.tile[index3, index4].type]) + Main.tile[index3, index4].active(false); + Main.tile[index3, index4].type = (ushort) 37; + } + } + } + } + int num5 = WorldGen.genRand.Next(8, 14); + for (int index5 = i - num5; index5 < i + num5; ++index5) + { + for (int index6 = j - num5; index6 < j + num5; ++index6) + { + if (index6 > j + Main.rand.Next(-2, 3) - 4) + { + double num6 = (double) Math.Abs(i - index5); + float num7 = (float) Math.Abs(j - index6); + if (Math.Sqrt(num6 * num6 + (double) num7 * (double) num7) < (double) num5 * 0.8 + (double) Main.rand.Next(-3, 4)) + Main.tile[index5, index6].active(false); + } + } + } + int num8 = WorldGen.genRand.Next(25, 35); + for (int i1 = i - num8; i1 < i + num8; ++i1) + { + for (int j1 = j - num8; j1 < j + num8; ++j1) + { + double num9 = (double) Math.Abs(i - i1); + float num10 = (float) Math.Abs(j - j1); + if (Math.Sqrt(num9 * num9 + (double) num10 * (double) num10) < (double) num8 * 0.7) + { + if (TileID.Sets.GetsDestroyedForMeteors[(int) Main.tile[i1, j1].type]) + WorldGen.KillTile(i1, j1); + Main.tile[i1, j1].liquid = (byte) 0; + } + if (Main.tile[i1, j1].type == (ushort) 37) + { + if (!WorldGen.SolidTile(i1 - 1, j1) && !WorldGen.SolidTile(i1 + 1, j1) && !WorldGen.SolidTile(i1, j1 - 1) && !WorldGen.SolidTile(i1, j1 + 1)) + Main.tile[i1, j1].active(false); + else if ((Main.tile[i1, j1].halfBrick() || Main.tile[i1 - 1, j1].topSlope()) && !WorldGen.SolidTile(i1, j1 + 1)) + Main.tile[i1, j1].active(false); + } + WorldGen.SquareTileFrame(i1, j1); + WorldGen.SquareWallFrame(i1, j1); + } + } + int num11 = WorldGen.genRand.Next(23, 32); + for (int i2 = i - num11; i2 < i + num11; ++i2) + { + for (int j2 = j - num11; j2 < j + num11; ++j2) + { + if (j2 > j + WorldGen.genRand.Next(-3, 4) - 3 && Main.tile[i2, j2].active() && Main.rand.Next(10) == 0) + { + double num12 = (double) Math.Abs(i - i2); + float num13 = (float) Math.Abs(j - j2); + if (Math.Sqrt(num12 * num12 + (double) num13 * (double) num13) < (double) num11 * 0.8) + { + if (TileID.Sets.GetsDestroyedForMeteors[(int) Main.tile[i2, j2].type]) + WorldGen.KillTile(i2, j2); + Main.tile[i2, j2].type = (ushort) 37; + WorldGen.SquareTileFrame(i2, j2); + } + } + } + } + int num14 = WorldGen.genRand.Next(30, 38); + for (int i3 = i - num14; i3 < i + num14; ++i3) + { + for (int j3 = j - num14; j3 < j + num14; ++j3) + { + if (j3 > j + WorldGen.genRand.Next(-2, 3) && Main.tile[i3, j3].active() && Main.rand.Next(20) == 0) + { + double num15 = (double) Math.Abs(i - i3); + float num16 = (float) Math.Abs(j - j3); + if (Math.Sqrt(num15 * num15 + (double) num16 * (double) num16) < (double) num14 * 0.85) + { + if (TileID.Sets.GetsDestroyedForMeteors[(int) Main.tile[i3, j3].type]) + WorldGen.KillTile(i3, j3); + Main.tile[i3, j3].type = (ushort) 37; + WorldGen.SquareTileFrame(i3, j3); + } + } + } + } + WorldGen.stopDrops = false; + if (Main.netMode == 0) + Main.NewText(Lang.gen[59].Value, (byte) 50, B: (byte) 130); + else if (Main.netMode == 2) + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(Lang.gen[59].Key), new Color(50, (int) byte.MaxValue, 130)); + if (Main.netMode != 1) + NetMessage.SendTileSquare(-1, i, j, 40); + return true; + } + + public static void setWorldSize() + { + Main.bottomWorld = (float) (Main.maxTilesY * 16); + Main.rightWorld = (float) (Main.maxTilesX * 16); + Main.maxSectionsX = Main.maxTilesX / 200; + Main.maxSectionsY = Main.maxTilesY / 150; + } + + public static void worldGenCallback(object threadContext) + { + SoundEngine.PlaySound(10); + WorldGen.clearWorld(); + WorldGen.GenerateWorld(Main.ActiveWorldFileData.Seed, threadContext as GenerationProgress); + WorldFile.SaveWorld(Main.ActiveWorldFileData.IsCloudSave, true); + if (Main.menuMode == 10 || Main.menuMode == 888) + Main.menuMode = 6; + SoundEngine.PlaySound(10); + WorldGen.generatingWorld = false; + } + + public static Task CreateNewWorld(GenerationProgress progress = null) + { + WorldGen.generatingWorld = true; + Main.rand = new UnifiedRandom(Main.ActiveWorldFileData.Seed); + WorldGen.gen = true; + Main.menuMode = 888; + try + { + Main.MenuUI.SetState((UIState) new UIWorldLoad()); + } + catch + { + } + return Task.Factory.StartNew(new Action(WorldGen.worldGenCallback), (object) progress); + } + + public static void JustQuit() + { + try + { + SoundEngine.PlaySound(34, Style: 0); + SoundEngine.PlaySound(35, Style: 0); + } + catch + { + } + Main.invasionProgress = -1; + Main.invasionProgressDisplayLeft = 0; + Main.invasionProgressAlpha = 0.0f; + Main.invasionProgressIcon = 0; + Main.menuMode = 10; + Main.gameMenu = true; + SoundEngine.StopTrackedSounds(); + CaptureInterface.ResetFocus(); + Main.ActivePlayerFileData.StopPlayTimer(); + Main.fastForwardTime = false; + Main.UpdateTimeRate(); + if (Main.netMode == 0) + { + Main.GoToWorldSelect(); + Main.player[Main.myPlayer].position = new Vector2(0.0f, 0.0f); + } + else + { + if (Main.netMode != 1) + return; + Main.menuMode = 0; + Netplay.Disconnect = true; + Main.netMode = 0; + } + } + + public static void SaveAndQuitCallBack(object threadContext) + { + int netMode = Main.netMode; + try + { + SoundEngine.PlaySound(34, Style: 0); + SoundEngine.PlaySound(35, Style: 0); + } + catch + { + } + if (netMode == 0) + WorldFile.CacheSaveTime(); + Main.invasionProgress = -1; + Main.invasionProgressDisplayLeft = 0; + Main.invasionProgressAlpha = 0.0f; + Main.invasionProgressIcon = 0; + Main.menuMode = 10; + Main.gameMenu = true; + SoundEngine.StopTrackedSounds(); + CaptureInterface.ResetFocus(); + Main.ActivePlayerFileData.StopPlayTimer(); + Player.SavePlayer(Main.ActivePlayerFileData); + Player.ClearPlayerTempInfo(); + Rain.ClearRain(); + if (netMode == 0) + { + WorldFile.SaveWorld(); + SoundEngine.PlaySound(10); + } + else + { + Netplay.Disconnect = true; + Main.netMode = 0; + } + Main.fastForwardTime = false; + Main.UpdateTimeRate(); + Main.menuMode = 0; + if (threadContext == null) + return; + ((Action) threadContext)(); + } + + public static void SaveAndQuit(Action callback = null) + { + SoundEngine.PlaySound(11); + ThreadPool.QueueUserWorkItem(new WaitCallback(WorldGen.SaveAndQuitCallBack), (object) callback); + } + + public static void playWorldCallBack(object threadContext) + { + if (Main.rand == null) + Main.rand = new UnifiedRandom((int) DateTime.Now.Ticks); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (index != Main.myPlayer) + Main.player[index].active = false; + } + WorldGen.noMapUpdate = true; + WorldFile.LoadWorld(Main.ActiveWorldFileData.IsCloudSave); + if (WorldGen.loadFailed || !WorldGen.loadSuccess) + { + WorldFile.LoadWorld(Main.ActiveWorldFileData.IsCloudSave); + if (WorldGen.loadFailed || !WorldGen.loadSuccess) + { + bool isCloudSave = Main.ActiveWorldFileData.IsCloudSave; + WorldGen.worldBackup = FileUtilities.Exists(Main.worldPathName + ".bak", isCloudSave); + if (!Main.dedServ) + { + if (WorldGen.worldBackup) + { + Main.menuMode = 200; + return; + } + Main.menuMode = 201; + return; + } + if (WorldGen.worldBackup) + { + FileUtilities.Copy(Main.worldPathName, Main.worldPathName + ".bad", isCloudSave); + FileUtilities.Copy(Main.worldPathName + ".bak", Main.worldPathName, isCloudSave); + FileUtilities.Delete(Main.worldPathName + ".bak", isCloudSave); + WorldFile.LoadWorld(Main.ActiveWorldFileData.IsCloudSave); + if (WorldGen.loadFailed || !WorldGen.loadSuccess) + { + WorldFile.LoadWorld(Main.ActiveWorldFileData.IsCloudSave); + if (WorldGen.loadFailed || !WorldGen.loadSuccess) + { + FileUtilities.Copy(Main.worldPathName, Main.worldPathName + ".bak", isCloudSave); + FileUtilities.Copy(Main.worldPathName + ".bad", Main.worldPathName, isCloudSave); + FileUtilities.Delete(Main.worldPathName + ".bad", isCloudSave); + Console.WriteLine(Language.GetTextValue("Error.LoadFailed")); + return; + } + } + } + else + { + Console.WriteLine(Language.GetTextValue("Error.LoadFailedNoBackup")); + return; + } + } + } + if (Main.mapEnabled) + Main.Map.Load(); + if (Main.netMode != 2) + Main.sectionManager.SetAllFramesLoaded(); + while (Main.loadMapLock) + { + float num = (float) Main.loadMapLastX / (float) Main.maxTilesX; + Main.statusText = Lang.gen[68].Value + " " + (object) (int) ((double) num * 100.0 + 1.0) + "%"; + Thread.Sleep(0); + if (!Main.mapEnabled) + break; + } + if (Main.gameMenu) + Main.gameMenu = false; + if (Main.netMode == 0 && Main.anglerWhoFinishedToday.Contains(Main.player[Main.myPlayer].name)) + Main.anglerQuestFinished = true; + Main.player[Main.myPlayer].Spawn(PlayerSpawnContext.SpawningIntoWorld); + Main.ActivePlayerFileData.StartPlayTimer(); + WorldGen._lastSeed = Main.ActiveWorldFileData.Seed; + Player.Hooks.EnterWorld(Main.myPlayer); + WorldFile.SetOngoingToTemps(); + SoundEngine.PlaySound(11); + Main.resetClouds = true; + WorldGen.noMapUpdate = false; + } + + public static void playWorld() => ThreadPool.QueueUserWorkItem(new WaitCallback(WorldGen.playWorldCallBack), (object) 1); + + public static void saveAndPlayCallBack(object threadContext) => WorldFile.SaveWorld(); + + public static void saveAndPlay() => ThreadPool.QueueUserWorkItem(new WaitCallback(WorldGen.saveAndPlayCallBack), (object) 1); + + public static void saveToonWhilePlayingCallBack(object threadContext) => Player.SavePlayer(Main.ActivePlayerFileData); + + public static void saveToonWhilePlaying() => ThreadPool.QueueUserWorkItem(new WaitCallback(WorldGen.saveToonWhilePlayingCallBack), (object) 1); + + public static void serverLoadWorldCallBack() + { + Main.rand = new UnifiedRandom((int) DateTime.Now.Ticks); + WorldFile.LoadWorld(Main.ActiveWorldFileData.IsCloudSave); + if (WorldGen.loadFailed || !WorldGen.loadSuccess) + { + WorldFile.LoadWorld(Main.ActiveWorldFileData.IsCloudSave); + if (WorldGen.loadFailed || !WorldGen.loadSuccess) + { + bool isCloudSave = Main.ActiveWorldFileData.IsCloudSave; + WorldGen.worldBackup = FileUtilities.Exists(Main.worldPathName + ".bak", isCloudSave); + if (!Main.dedServ) + { + if (WorldGen.worldBackup) + { + Main.menuMode = 200; + return; + } + Main.menuMode = 201; + return; + } + if (WorldGen.worldBackup) + { + FileUtilities.Copy(Main.worldPathName + ".bak", Main.worldPathName, isCloudSave); + FileUtilities.Delete(Main.worldPathName + ".bak", isCloudSave); + WorldFile.LoadWorld(Main.ActiveWorldFileData.IsCloudSave); + if (WorldGen.loadFailed || !WorldGen.loadSuccess) + { + WorldFile.LoadWorld(Main.ActiveWorldFileData.IsCloudSave); + if (WorldGen.loadFailed || !WorldGen.loadSuccess) + { + Console.WriteLine(Language.GetTextValue("Error.LoadFailed")); + return; + } + } + } + else + { + Console.WriteLine(Language.GetTextValue("Error.LoadFailedNoBackup")); + return; + } + } + } + WorldGen._lastSeed = Main.ActiveWorldFileData.Seed; + SoundEngine.PlaySound(10); + WorldFile.SetOngoingToTemps(); + WorldGen.Hooks.WorldLoaded(); + } + + public static Task serverLoadWorld() => Task.Factory.StartNew(new Action(WorldGen.serverLoadWorldCallBack)); + + public static void clearWorld() + { + Main.getGoodWorld = false; + Main.drunkWorld = false; + NPC.ResetBadgerHatTime(); + NPC.freeCake = false; + Main.mapDelay = 2; + Main.ResetWindCounter(true); + WorldGen.TownManager = new TownRoomManager(); + WorldGen.Hooks.ClearWorld(); + TileEntity.Clear(); + Main.checkXMas(); + Main.checkHalloween(); + if (Main.mapReady) + { + for (int index = 0; index < WorldGen.lastMaxTilesX; ++index) + { + double num = (double) index / (double) WorldGen.lastMaxTilesX; + Main.statusText = Lang.gen[65].Value; + } + Main.Map.Clear(); + } + NPC.MoonLordCountdown = 0; + Main.forceHalloweenForToday = false; + Main.forceXMasForToday = false; + NPC.RevengeManager.Reset(); + Main.pumpkinMoon = false; + Main.clearMap = true; + Main.mapTime = 0; + Main.updateMap = false; + Main.mapReady = false; + Main.refreshMap = false; + Main.eclipse = false; + Main.slimeRain = false; + Main.slimeRainTime = 0.0; + Main.slimeWarningTime = 0; + Main.sundialCooldown = 0; + Main.fastForwardTime = false; + BirthdayParty.WorldClear(); + LanternNight.WorldClear(); + WorldGen.mysticLogsEvent.WorldClear(); + Sandstorm.WorldClear(); + Main.UpdateTimeRate(); + Main.wofNPCIndex = -1; + NPC.waveKills = 0.0f; + WorldGen.spawnHardBoss = 0; + WorldGen.totalSolid2 = 0; + WorldGen.totalGood2 = 0; + WorldGen.totalEvil2 = 0; + WorldGen.totalBlood2 = 0; + WorldGen.totalSolid = 0; + WorldGen.totalGood = 0; + WorldGen.totalEvil = 0; + WorldGen.totalBlood = 0; + WorldFile.ResetTemps(); + Main.maxRaining = 0.0f; + WorldGen.totalX = 0; + WorldGen.totalD = 0; + WorldGen.tEvil = (byte) 0; + WorldGen.tBlood = (byte) 0; + WorldGen.tGood = (byte) 0; + WorldGen.spawnEye = false; + WorldGen.prioritizedTownNPCType = 0; + WorldGen.shadowOrbCount = 0; + WorldGen.altarCount = 0; + WorldGen.SavedOreTiers.Copper = -1; + WorldGen.SavedOreTiers.Iron = -1; + WorldGen.SavedOreTiers.Silver = -1; + WorldGen.SavedOreTiers.Gold = -1; + WorldGen.SavedOreTiers.Cobalt = -1; + WorldGen.SavedOreTiers.Mythril = -1; + WorldGen.SavedOreTiers.Adamantite = -1; + Main.cloudBGActive = 0.0f; + Main.raining = false; + Main.hardMode = false; + Main.helpText = 0; + Main.BartenderHelpTextIndex = 0; + Main.dungeonX = 0; + Main.dungeonY = 0; + NPC.downedBoss1 = false; + NPC.downedBoss2 = false; + NPC.downedBoss3 = false; + NPC.downedQueenBee = false; + NPC.downedSlimeKing = false; + NPC.downedMechBossAny = false; + NPC.downedMechBoss1 = false; + NPC.downedMechBoss2 = false; + NPC.downedMechBoss3 = false; + NPC.downedFishron = false; + NPC.downedAncientCultist = false; + NPC.downedMoonlord = false; + NPC.downedHalloweenKing = false; + NPC.downedHalloweenTree = false; + NPC.downedChristmasIceQueen = false; + NPC.downedChristmasSantank = false; + NPC.downedChristmasTree = false; + NPC.downedPlantBoss = false; + NPC.downedGolemBoss = false; + NPC.downedEmpressOfLight = false; + NPC.downedQueenSlime = false; + NPC.combatBookWasUsed = false; + NPC.savedStylist = false; + NPC.savedGoblin = false; + NPC.savedWizard = false; + NPC.savedMech = false; + NPC.savedTaxCollector = false; + NPC.savedAngler = false; + NPC.savedBartender = false; + NPC.savedGolfer = false; + NPC.boughtCat = false; + NPC.boughtDog = false; + NPC.boughtBunny = false; + NPC.downedGoblins = false; + NPC.downedClown = false; + NPC.downedFrost = false; + NPC.downedPirates = false; + NPC.downedMartians = false; + int num1; + NPC.LunarApocalypseIsUp = (num1 = 0) != 0; + NPC.downedTowerStardust = num1 != 0; + NPC.downedTowerNebula = num1 != 0; + NPC.downedTowerVortex = num1 != 0; + NPC.downedTowerSolar = num1 != 0; + int num2; + NPC.TowerActiveStardust = (num2 = 0) != 0; + NPC.TowerActiveNebula = num2 != 0; + NPC.TowerActiveVortex = num2 != 0; + NPC.TowerActiveSolar = num2 != 0; + DD2Event.ResetProgressEntirely(); + NPC.ClearFoundActiveNPCs(); + Main.BestiaryTracker.Reset(); + Main.PylonSystem.Reset(); + CreativePowerManager.Instance.Reset(); + Main.CreativeMenu.Reset(); + WorldGen.shadowOrbSmashed = false; + WorldGen.spawnMeteor = false; + WorldGen.stopDrops = false; + Main.invasionDelay = 0; + Main.invasionType = 0; + Main.invasionSize = 0; + Main.invasionWarn = 0; + Main.invasionX = 0.0; + Main.invasionSizeStart = 0; + Main.treeX[0] = Main.maxTilesX; + Main.treeX[1] = Main.maxTilesX; + Main.treeX[2] = Main.maxTilesX; + Main.treeStyle[0] = 0; + Main.treeStyle[1] = 0; + Main.treeStyle[2] = 0; + Main.treeStyle[3] = 0; + WorldGen.noLiquidCheck = false; + Liquid.numLiquid = 0; + LiquidBuffer.numLiquidBuffer = 0; + if (Main.netMode == 1 || WorldGen.lastMaxTilesX > Main.maxTilesX || WorldGen.lastMaxTilesY > Main.maxTilesY) + { + for (int index1 = 0; index1 < WorldGen.lastMaxTilesX; ++index1) + { + float num3 = (float) index1 / (float) WorldGen.lastMaxTilesX; + Main.statusText = Lang.gen[46].Value + " " + (object) (int) ((double) num3 * 100.0 + 1.0) + "%"; + for (int index2 = 0; index2 < WorldGen.lastMaxTilesY; ++index2) + Main.tile[index1, index2] = (Tile) null; + } + } + WorldGen.lastMaxTilesX = Main.maxTilesX; + WorldGen.lastMaxTilesY = Main.maxTilesY; + if (Main.netMode != 2) + Main.sectionManager = new WorldSections(Main.maxTilesX / 200, Main.maxTilesY / 150); + if (Main.netMode != 1) + { + for (int index3 = 0; index3 < Main.maxTilesX; ++index3) + { + float num4 = (float) index3 / (float) Main.maxTilesX; + Main.statusText = Lang.gen[47].Value + " " + (object) (int) ((double) num4 * 100.0 + 1.0) + "%"; + for (int index4 = 0; index4 < Main.maxTilesY; ++index4) + { + if (Main.tile[index3, index4] == null) + Main.tile[index3, index4] = new Tile(); + else + Main.tile[index3, index4].ClearEverything(); + } + } + } + for (int index = 0; index < Main.countsAsHostForGameplay.Length; ++index) + Main.countsAsHostForGameplay[index] = false; + CombatText.clearAll(); + for (int index = 0; index < 6000; ++index) + { + Main.dust[index] = new Dust(); + Main.dust[index].dustIndex = index; + } + for (int index = 0; index < 600; ++index) + Main.gore[index] = new Gore(); + for (int index = 0; index < 400; ++index) + { + Main.item[index] = new Item(); + Main.timeItemSlotCannotBeReusedFor[index] = 0; + } + for (int index = 0; index < 200; ++index) + Main.npc[index] = new NPC(); + for (int index = 0; index < 1000; ++index) + Main.projectile[index] = new Projectile(); + for (int index = 0; index < 8000; ++index) + Main.chest[index] = (Chest) null; + for (int index = 0; index < 1000; ++index) + Main.sign[index] = (Sign) null; + for (int index = 0; index < Liquid.maxLiquid; ++index) + Main.liquid[index] = new Liquid(); + for (int index = 0; index < 50000; ++index) + Main.liquidBuffer[index] = new LiquidBuffer(); + WorldGen.setWorldSize(); + Star.SpawnStars(); + WorldGen.worldCleared = true; + } + + public static void setBG(int bg, int style) + { + switch (bg) + { + case 0: + WorldGen.treeBG1 = style; + WorldGen.SetForestBGSet(style, Main.treeMntBGSet1, Main.treeBGSet1); + break; + case 1: + WorldGen.corruptBG = style; + switch (style) + { + case 1: + Main.corruptBG[0] = 56; + Main.corruptBG[1] = 57; + Main.corruptBG[2] = 58; + return; + case 2: + Main.corruptBG[0] = 211; + Main.corruptBG[1] = 212; + Main.corruptBG[2] = 213; + return; + case 3: + Main.corruptBG[0] = 225; + Main.corruptBG[1] = 226; + Main.corruptBG[2] = 227; + return; + case 4: + Main.corruptBG[0] = 240; + Main.corruptBG[1] = 241; + Main.corruptBG[2] = 242; + return; + default: + Main.corruptBG[0] = 12; + Main.corruptBG[1] = 13; + Main.corruptBG[2] = 14; + return; + } + case 2: + WorldGen.jungleBG = style; + switch (style) + { + case 1: + Main.jungleBG[0] = 59; + Main.jungleBG[1] = 60; + Main.jungleBG[2] = 61; + return; + case 2: + Main.jungleBG[0] = 222; + Main.jungleBG[1] = 223; + Main.jungleBG[2] = 224; + return; + case 3: + Main.jungleBG[0] = 237; + Main.jungleBG[1] = 238; + Main.jungleBG[2] = 239; + return; + case 4: + Main.jungleBG[0] = 284; + Main.jungleBG[1] = 285; + Main.jungleBG[2] = 286; + return; + case 5: + Main.jungleBG[0] = 271; + Main.jungleBG[1] = 272; + Main.jungleBG[2] = 273; + return; + default: + Main.jungleBG[0] = 15; + Main.jungleBG[1] = 16; + Main.jungleBG[2] = 17; + return; + } + case 3: + WorldGen.snowBG = style; + Main.snowMntBG[0] = 35; + Main.snowMntBG[1] = 36; + switch (style) + { + case 1: + Main.snowBG[0] = 97; + Main.snowBG[1] = 96; + Main.snowBG[2] = 95; + return; + case 2: + Main.snowMntBG[0] = 98; + Main.snowMntBG[1] = 99; + Main.snowBG[0] = -1; + Main.snowBG[1] = -1; + Main.snowBG[2] = -1; + return; + case 3: + Main.snowMntBG[0] = 98; + Main.snowMntBG[1] = 100; + Main.snowBG[0] = -1; + Main.snowBG[1] = -1; + Main.snowBG[2] = -1; + return; + case 4: + Main.snowMntBG[0] = 98; + Main.snowMntBG[1] = 101; + Main.snowBG[0] = -1; + Main.snowBG[1] = -1; + Main.snowBG[2] = -1; + return; + case 5: + Main.snowMntBG[0] = -1; + Main.snowMntBG[1] = -1; + Main.snowBG[0] = 258; + Main.snowBG[1] = 259; + Main.snowBG[2] = 260; + return; + case 6: + Main.snowMntBG[0] = -1; + Main.snowMntBG[1] = -1; + Main.snowBG[0] = 263; + Main.snowBG[1] = 264; + Main.snowBG[2] = 265; + return; + case 7: + Main.snowMntBG[0] = 269; + Main.snowMntBG[1] = 270; + Main.snowBG[0] = 267; + Main.snowBG[1] = 266; + Main.snowBG[2] = 268; + return; + case 21: + Main.snowMntBG[0] = 98; + Main.snowMntBG[1] = 99; + Main.snowBG[0] = 95; + Main.snowBG[1] = 96; + Main.snowBG[2] = 97; + return; + case 22: + Main.snowMntBG[0] = 98; + Main.snowMntBG[1] = 99; + Main.snowBG[0] = 37; + Main.snowBG[1] = 38; + Main.snowBG[2] = 39; + return; + case 31: + Main.snowMntBG[0] = 98; + Main.snowMntBG[1] = 100; + Main.snowBG[0] = 95; + Main.snowBG[1] = 96; + Main.snowBG[2] = 97; + return; + case 32: + Main.snowMntBG[0] = 98; + Main.snowMntBG[1] = 100; + Main.snowBG[0] = 37; + Main.snowBG[1] = 38; + Main.snowBG[2] = 39; + return; + case 41: + Main.snowMntBG[0] = 98; + Main.snowMntBG[1] = 101; + Main.snowBG[0] = 95; + Main.snowBG[1] = 96; + Main.snowBG[2] = 97; + return; + case 42: + Main.snowMntBG[0] = 98; + Main.snowMntBG[1] = 101; + Main.snowBG[0] = 37; + Main.snowBG[1] = 38; + Main.snowBG[2] = 39; + return; + default: + Main.snowBG[0] = 37; + Main.snowBG[1] = 38; + Main.snowBG[2] = 39; + return; + } + case 4: + WorldGen.hallowBG = style; + switch (style) + { + case 1: + Main.hallowBG[0] = 102; + Main.hallowBG[1] = 103; + Main.hallowBG[2] = 104; + return; + case 2: + Main.hallowBG[0] = 219; + Main.hallowBG[1] = 220; + Main.hallowBG[2] = 221; + return; + case 3: + Main.hallowBG[0] = 243; + Main.hallowBG[1] = 244; + Main.hallowBG[2] = 245; + return; + case 4: + Main.hallowBG[0] = -1; + Main.hallowBG[1] = 261; + Main.hallowBG[2] = 262; + return; + default: + Main.hallowBG[0] = 29; + Main.hallowBG[1] = 30; + Main.hallowBG[2] = 31; + return; + } + case 5: + WorldGen.crimsonBG = style; + switch (style) + { + case 1: + Main.crimsonBG[0] = 105; + Main.crimsonBG[1] = 106; + Main.crimsonBG[2] = 107; + return; + case 2: + Main.crimsonBG[0] = 174; + Main.crimsonBG[1] = -1; + Main.crimsonBG[2] = 175; + return; + case 3: + Main.crimsonBG[0] = 214; + Main.crimsonBG[1] = 215; + Main.crimsonBG[2] = 216; + return; + case 4: + Main.crimsonBG[0] = -1; + Main.crimsonBG[1] = 229; + Main.crimsonBG[2] = 230; + return; + case 5: + Main.crimsonBG[0] = (int) byte.MaxValue; + Main.crimsonBG[1] = 256; + Main.crimsonBG[2] = 257; + return; + default: + Main.crimsonBG[0] = 43; + Main.crimsonBG[1] = 44; + Main.crimsonBG[2] = 45; + return; + } + case 6: + WorldGen.desertBG = style; + switch (style) + { + case 1: + Main.desertBG[0] = 108; + Main.desertBG[1] = 109; + Main.desertBG[2] = -1; + return; + case 2: + Main.desertBG[0] = 207; + Main.desertBG[1] = 208; + Main.desertBG[2] = -1; + return; + case 3: + Main.desertBG[0] = 217; + Main.desertBG[1] = 218; + Main.desertBG[2] = -1; + return; + case 4: + Main.desertBG[0] = 248; + Main.desertBG[1] = 249; + Main.desertBG[2] = 250; + return; + default: + Main.desertBG[0] = 21; + Main.desertBG[1] = 20; + Main.desertBG[2] = -1; + return; + } + case 7: + WorldGen.oceanBG = style; + switch (style) + { + case 1: + Main.oceanBG = 110; + return; + case 2: + Main.oceanBG = 111; + return; + case 3: + Main.oceanBG = 209; + return; + case 4: + Main.oceanBG = 210; + return; + case 5: + Main.oceanBG = 283; + return; + default: + Main.oceanBG = 28; + return; + } + case 8: + WorldGen.mushroomBG = style; + switch (style) + { + case 1: + Main.mushroomBG[0] = 231; + Main.mushroomBG[1] = 232; + Main.mushroomBG[2] = 233; + return; + case 2: + Main.mushroomBG[0] = 234; + Main.mushroomBG[1] = 235; + Main.mushroomBG[2] = 236; + return; + case 3: + Main.mushroomBG[0] = 287; + Main.mushroomBG[1] = 288; + Main.mushroomBG[2] = 289; + return; + default: + Main.mushroomBG[0] = 46; + Main.mushroomBG[1] = 47; + Main.mushroomBG[2] = 48; + return; + } + case 9: + WorldGen.underworldBG = style; + if (style != 1) + { + if (style != 2) + { + Main.underworldBG[0] = 0; + Main.underworldBG[1] = 1; + Main.underworldBG[2] = 2; + Main.underworldBG[3] = 3; + Main.underworldBG[4] = 4; + break; + } + Main.underworldBG[0] = 10; + Main.underworldBG[1] = 11; + Main.underworldBG[2] = 12; + Main.underworldBG[3] = 13; + Main.underworldBG[4] = 9; + break; + } + Main.underworldBG[0] = 5; + Main.underworldBG[1] = 6; + Main.underworldBG[2] = 7; + Main.underworldBG[3] = 8; + Main.underworldBG[4] = 9; + break; + case 10: + WorldGen.treeBG2 = style; + WorldGen.SetForestBGSet(style, Main.treeMntBGSet2, Main.treeBGSet2); + break; + case 11: + WorldGen.treeBG3 = style; + WorldGen.SetForestBGSet(style, Main.treeMntBGSet3, Main.treeBGSet3); + break; + case 12: + WorldGen.treeBG4 = style; + WorldGen.SetForestBGSet(style, Main.treeMntBGSet4, Main.treeBGSet4); + break; + } + } + + private static void SetForestBGSet(int style, int[] mountainSet, int[] treeSet) + { + mountainSet[0] = 7; + mountainSet[1] = 8; + switch (style) + { + case 1: + treeSet[0] = 50; + treeSet[1] = 51; + treeSet[2] = 52; + break; + case 2: + treeSet[0] = 53; + treeSet[1] = 54; + treeSet[2] = 55; + break; + case 3: + mountainSet[1] = 90; + treeSet[0] = 91; + treeSet[1] = -1; + treeSet[2] = 92; + break; + case 4: + mountainSet[0] = 93; + mountainSet[1] = 94; + treeSet[0] = -1; + treeSet[1] = -1; + treeSet[2] = -1; + break; + case 5: + mountainSet[0] = 93; + mountainSet[1] = 94; + treeSet[0] = -1; + treeSet[1] = -1; + treeSet[2] = 55; + break; + case 6: + mountainSet[0] = 171; + mountainSet[1] = 172; + treeSet[0] = 173; + treeSet[1] = -1; + treeSet[2] = -1; + break; + case 7: + mountainSet[0] = 176; + mountainSet[1] = 177; + treeSet[0] = 178; + treeSet[1] = -1; + treeSet[2] = -1; + break; + case 8: + mountainSet[0] = 179; + mountainSet[1] = 180; + treeSet[0] = 184; + treeSet[1] = -1; + treeSet[2] = -1; + break; + case 9: + mountainSet[0] = 277; + mountainSet[1] = 278; + treeSet[0] = 279; + treeSet[1] = -1; + treeSet[2] = -1; + break; + case 10: + mountainSet[0] = 280; + mountainSet[1] = 281; + treeSet[0] = 282; + treeSet[1] = -1; + treeSet[2] = -1; + break; + case 31: + mountainSet[1] = 90; + treeSet[0] = 91; + treeSet[1] = -1; + treeSet[2] = 11; + break; + case 51: + mountainSet[0] = 93; + mountainSet[1] = 94; + treeSet[0] = -1; + treeSet[1] = -1; + treeSet[2] = 11; + break; + case 71: + mountainSet[0] = 176; + mountainSet[1] = 177; + treeSet[0] = 178; + treeSet[1] = -1; + treeSet[2] = 11; + break; + case 72: + mountainSet[0] = 176; + mountainSet[1] = 177; + treeSet[0] = 178; + treeSet[1] = -1; + treeSet[2] = 52; + break; + case 73: + mountainSet[0] = 176; + mountainSet[1] = 177; + treeSet[0] = 178; + treeSet[1] = -1; + treeSet[2] = 55; + break; + default: + treeSet[0] = 9; + treeSet[1] = 10; + treeSet[2] = 11; + break; + } + } + + public static void RandomizeWeather() + { + Main.numClouds = WorldGen.genRand.Next(10, 200); + Main.windSpeedCurrent = 0.0f; + while ((double) Main.windSpeedCurrent == 0.0) + { + Main.windSpeedCurrent = (float) WorldGen.genRand.Next(-400, 401) * (1f / 1000f); + Main.windSpeedTarget = Main.windSpeedCurrent; + } + Cloud.resetClouds(); + } + + public static void RandomizeMoonState() => Main.moonType = WorldGen.genRand.Next(9); + + public static void RandomizeBackgroundBasedOnPlayer(UnifiedRandom random, Player player) + { + if (player.ZoneGlowshroom) + { + int mushroomBg = WorldGen.mushroomBG; + while (mushroomBg == WorldGen.mushroomBG) + WorldGen.setBG(8, random.Next(4)); + } + else if (player.ZoneUnderworldHeight) + { + int underworldBg = WorldGen.underworldBG; + while (underworldBg == WorldGen.underworldBG) + WorldGen.setBG(9, random.Next(3)); + } + else if (player.ZoneDesert) + { + int desertBg = WorldGen.desertBG; + while (desertBg == WorldGen.desertBG) + WorldGen.setBG(6, random.Next(5)); + } + else if (player.ZoneHallow) + { + int hallowBg = WorldGen.hallowBG; + while (hallowBg == WorldGen.hallowBG) + WorldGen.setBG(4, random.Next(5)); + } + else if (player.ZoneCorrupt) + { + int corruptBg = WorldGen.corruptBG; + while (corruptBg == WorldGen.corruptBG) + WorldGen.setBG(1, random.Next(5)); + } + else if (player.ZoneCrimson) + { + int crimsonBg = WorldGen.crimsonBG; + while (crimsonBg == WorldGen.crimsonBG) + WorldGen.setBG(5, random.Next(6)); + } + else if (player.ZoneJungle) + { + int jungleBg = WorldGen.jungleBG; + while (jungleBg == WorldGen.jungleBG) + WorldGen.setBG(2, random.Next(6)); + } + else if (player.ZoneSnow) + { + int snowBg = WorldGen.snowBG; + while (snowBg == WorldGen.snowBG) + { + WorldGen.snowBG = random.Next(8); + if (WorldGen.snowBG == 2 && random.Next(2) == 0) + WorldGen.snowBG = random.Next(2) != 0 ? 22 : 21; + if (WorldGen.snowBG == 3 && random.Next(2) == 0) + WorldGen.snowBG = random.Next(2) != 0 ? 32 : 31; + if (WorldGen.snowBG == 4 && random.Next(2) == 0) + WorldGen.snowBG = random.Next(2) != 0 ? 42 : 41; + WorldGen.setBG(3, WorldGen.snowBG); + } + } + else if (player.ZoneBeach) + { + int oceanBg = WorldGen.oceanBG; + while (oceanBg == WorldGen.oceanBG) + WorldGen.setBG(7, random.Next(6)); + } + else + { + int num = (int) ((double) player.Center.X / 16.0); + if (num < Main.treeX[0]) + { + int treeBg1 = WorldGen.treeBG1; + while (treeBg1 == WorldGen.treeBG1) + WorldGen.treeBG1 = WorldGen.RollRandomForestBGStyle(random); + WorldGen.setBG(0, WorldGen.treeBG1); + } + else if (num < Main.treeX[1]) + { + int treeBg2 = WorldGen.treeBG2; + while (treeBg2 == WorldGen.treeBG2) + WorldGen.treeBG2 = WorldGen.RollRandomForestBGStyle(random); + WorldGen.setBG(10, WorldGen.treeBG2); + } + else if (num < Main.treeX[2]) + { + int treeBg3 = WorldGen.treeBG3; + while (treeBg3 == WorldGen.treeBG3) + WorldGen.treeBG3 = WorldGen.RollRandomForestBGStyle(random); + WorldGen.setBG(11, WorldGen.treeBG3); + } + else + { + int treeBg4 = WorldGen.treeBG4; + while (treeBg4 == WorldGen.treeBG4) + WorldGen.treeBG4 = WorldGen.RollRandomForestBGStyle(random); + WorldGen.setBG(12, WorldGen.treeBG4); + } + } + WorldGen.BackgroundsCache.UpdateCache(); + } + + public static void RandomizeBackgrounds(UnifiedRandom random) + { + WorldGen.treeBG1 = WorldGen.RollRandomForestBGStyle(random); + WorldGen.treeBG2 = WorldGen.RollRandomForestBGStyle(random); + while (WorldGen.treeBG2 == WorldGen.treeBG1) + WorldGen.treeBG2 = WorldGen.RollRandomForestBGStyle(random); + WorldGen.treeBG3 = WorldGen.RollRandomForestBGStyle(random); + while (WorldGen.treeBG3 == WorldGen.treeBG1 || WorldGen.treeBG3 == WorldGen.treeBG2) + WorldGen.treeBG3 = WorldGen.RollRandomForestBGStyle(random); + WorldGen.treeBG4 = WorldGen.RollRandomForestBGStyle(random); + while (WorldGen.treeBG4 == WorldGen.treeBG1 || WorldGen.treeBG4 == WorldGen.treeBG2 || WorldGen.treeBG4 == WorldGen.treeBG3) + WorldGen.treeBG4 = WorldGen.RollRandomForestBGStyle(random); + WorldGen.setBG(0, WorldGen.treeBG1); + WorldGen.setBG(10, WorldGen.treeBG2); + WorldGen.setBG(11, WorldGen.treeBG3); + WorldGen.setBG(12, WorldGen.treeBG4); + WorldGen.setBG(1, random.Next(5)); + WorldGen.setBG(2, random.Next(6)); + WorldGen.snowBG = random.Next(8); + if (WorldGen.snowBG == 2 && random.Next(2) == 0) + WorldGen.snowBG = random.Next(2) != 0 ? 22 : 21; + if (WorldGen.snowBG == 3 && random.Next(2) == 0) + WorldGen.snowBG = random.Next(2) != 0 ? 32 : 31; + if (WorldGen.snowBG == 4 && random.Next(2) == 0) + WorldGen.snowBG = random.Next(2) != 0 ? 42 : 41; + WorldGen.setBG(3, WorldGen.snowBG); + WorldGen.setBG(4, random.Next(5)); + WorldGen.setBG(5, random.Next(6)); + WorldGen.setBG(6, random.Next(5)); + WorldGen.setBG(7, random.Next(6)); + WorldGen.setBG(8, random.Next(4)); + WorldGen.setBG(9, random.Next(3)); + } + + private static int RollRandomForestBGStyle(UnifiedRandom random) + { + int num = random.Next(11); + if ((num == 1 || num == 2) && random.Next(2) == 0) + num = random.Next(11); + if (num == 0) + num = random.Next(11); + if (num == 3 && random.Next(3) == 0) + num = 31; + if (num == 5 && random.Next(2) == 0) + num = 51; + if (num == 7 && random.Next(4) == 0) + num = random.Next(71, 74); + return num; + } + + public static void RandomizeTreeStyle() + { + switch (Main.maxTilesX) + { + case 4200: + Main.treeX[0] = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.5 - (double) Main.maxTilesX * 0.25), (int) ((double) Main.maxTilesX * 0.5 + (double) Main.maxTilesX * 0.25)); + Main.treeStyle[0] = WorldGen.genRand.Next(6); + Main.treeStyle[1] = WorldGen.genRand.Next(6); + while (Main.treeStyle[1] == Main.treeStyle[0]) + Main.treeStyle[1] = WorldGen.genRand.Next(6); + Main.treeX[1] = Main.maxTilesX; + Main.treeX[2] = Main.maxTilesX; + for (int index = 0; index < 2; ++index) + { + if (Main.treeStyle[index] == 0 && WorldGen.genRand.Next(3) != 0) + Main.treeStyle[index] = 4; + } + break; + case 6400: + Main.treeX[0] = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.334 - (double) Main.maxTilesX * 0.200000002980232), (int) ((double) Main.maxTilesX * 0.334 + (double) Main.maxTilesX * 0.200000002980232)); + Main.treeX[1] = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.667 - (double) Main.maxTilesX * 0.200000002980232), (int) ((double) Main.maxTilesX * 0.667 + (double) Main.maxTilesX * 0.200000002980232)); + Main.treeStyle[0] = WorldGen.genRand.Next(6); + Main.treeStyle[1] = WorldGen.genRand.Next(6); + Main.treeStyle[2] = WorldGen.genRand.Next(6); + while (Main.treeStyle[1] == Main.treeStyle[0]) + Main.treeStyle[1] = WorldGen.genRand.Next(6); + while (Main.treeStyle[2] == Main.treeStyle[0] || Main.treeStyle[2] == Main.treeStyle[1]) + Main.treeStyle[2] = WorldGen.genRand.Next(6); + Main.treeX[2] = Main.maxTilesX; + for (int index = 0; index < 3; ++index) + { + if (Main.treeStyle[index] == 0 && WorldGen.genRand.Next(3) != 0) + Main.treeStyle[index] = 4; + } + break; + default: + Main.treeX[0] = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.25 - (double) Main.maxTilesX * 0.150000005960464), (int) ((double) Main.maxTilesX * 0.25 + (double) Main.maxTilesX * 0.150000005960464)); + Main.treeX[1] = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.5 - (double) Main.maxTilesX * 0.150000005960464), (int) ((double) Main.maxTilesX * 0.5 + (double) Main.maxTilesX * 0.150000005960464)); + Main.treeX[2] = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.75 - (double) Main.maxTilesX * 0.150000005960464), (int) ((double) Main.maxTilesX * 0.75 + (double) Main.maxTilesX * 0.150000005960464)); + Main.treeStyle[0] = WorldGen.genRand.Next(6); + Main.treeStyle[1] = WorldGen.genRand.Next(6); + Main.treeStyle[2] = WorldGen.genRand.Next(6); + Main.treeStyle[3] = WorldGen.genRand.Next(6); + while (Main.treeStyle[1] == Main.treeStyle[0]) + Main.treeStyle[1] = WorldGen.genRand.Next(6); + while (Main.treeStyle[2] == Main.treeStyle[0] || Main.treeStyle[2] == Main.treeStyle[1]) + Main.treeStyle[2] = WorldGen.genRand.Next(6); + while (Main.treeStyle[3] == Main.treeStyle[0] || Main.treeStyle[3] == Main.treeStyle[1] || Main.treeStyle[3] == Main.treeStyle[2]) + Main.treeStyle[3] = WorldGen.genRand.Next(6); + for (int index = 0; index < 4; ++index) + { + if (Main.treeStyle[index] == 0 && WorldGen.genRand.Next(3) != 0) + Main.treeStyle[index] = 4; + } + break; + } + } + + public static void RandomizeCaveBackgrounds() + { + int maxValue = 8; + switch (Main.maxTilesX) + { + case 4200: + Main.caveBackX[0] = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.5 - (double) Main.maxTilesX * 0.25), (int) ((double) Main.maxTilesX * 0.5 + (double) Main.maxTilesX * 0.25)); + Main.caveBackX[1] = Main.maxTilesX; + Main.caveBackX[2] = Main.maxTilesX; + Main.caveBackStyle[0] = WorldGen.genRand.Next(maxValue); + Main.caveBackStyle[1] = WorldGen.genRand.Next(maxValue); + while (Main.caveBackStyle[1] == Main.caveBackStyle[0]) + Main.caveBackStyle[1] = WorldGen.genRand.Next(maxValue); + break; + case 6400: + Main.caveBackX[0] = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.334 - (double) Main.maxTilesX * 0.200000002980232), (int) ((double) Main.maxTilesX * 0.334 + (double) Main.maxTilesX * 0.200000002980232)); + Main.caveBackX[1] = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.667 - (double) Main.maxTilesX * 0.200000002980232), (int) ((double) Main.maxTilesX * 0.667 + (double) Main.maxTilesX * 0.200000002980232)); + Main.caveBackX[2] = Main.maxTilesX; + Main.caveBackStyle[0] = WorldGen.genRand.Next(maxValue); + Main.caveBackStyle[1] = WorldGen.genRand.Next(maxValue); + Main.caveBackStyle[2] = WorldGen.genRand.Next(maxValue); + while (Main.caveBackStyle[1] == Main.caveBackStyle[0]) + Main.caveBackStyle[1] = WorldGen.genRand.Next(maxValue); + while (Main.caveBackStyle[2] == Main.caveBackStyle[0] || Main.caveBackStyle[2] == Main.caveBackStyle[1]) + Main.caveBackStyle[2] = WorldGen.genRand.Next(maxValue); + break; + default: + Main.caveBackX[0] = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.25 - (double) Main.maxTilesX * 0.150000005960464), (int) ((double) Main.maxTilesX * 0.25 + (double) Main.maxTilesX * 0.150000005960464)); + Main.caveBackX[1] = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.5 - (double) Main.maxTilesX * 0.150000005960464), (int) ((double) Main.maxTilesX * 0.5 + (double) Main.maxTilesX * 0.150000005960464)); + Main.caveBackX[2] = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.75 - (double) Main.maxTilesX * 0.150000005960464), (int) ((double) Main.maxTilesX * 0.75 + (double) Main.maxTilesX * 0.150000005960464)); + Main.caveBackStyle[0] = WorldGen.genRand.Next(maxValue); + Main.caveBackStyle[1] = WorldGen.genRand.Next(maxValue); + Main.caveBackStyle[2] = WorldGen.genRand.Next(maxValue); + Main.caveBackStyle[3] = WorldGen.genRand.Next(maxValue); + while (Main.caveBackStyle[1] == Main.caveBackStyle[0]) + Main.caveBackStyle[1] = WorldGen.genRand.Next(maxValue); + while (Main.caveBackStyle[2] == Main.caveBackStyle[0] || Main.caveBackStyle[2] == Main.caveBackStyle[1]) + Main.caveBackStyle[2] = WorldGen.genRand.Next(maxValue); + while (Main.caveBackStyle[3] == Main.caveBackStyle[0] || Main.caveBackStyle[3] == Main.caveBackStyle[1] || Main.caveBackStyle[3] == Main.caveBackStyle[2]) + Main.caveBackStyle[3] = WorldGen.genRand.Next(maxValue); + break; + } + Main.iceBackStyle = WorldGen.genRand.Next(4); + Main.hellBackStyle = WorldGen.genRand.Next(3); + Main.jungleBackStyle = WorldGen.genRand.Next(2); + } + + private static void ResetGenerator() + { + WorldGen.numOrePatch = 0; + WorldGen.numTunnels = 0; + WorldGen.numLakes = 0; + WorldGen.numMushroomBiomes = 0; + WorldGen.numOceanCaveTreasure = 0; + WorldGen.numOasis = 0; + WorldGen.mudWall = false; + WorldGen.hellChest = 0; + WorldGen.JungleX = 0; + WorldGen.numMCaves = 0; + WorldGen.numIslandHouses = 0; + WorldGen.houseCount = 0; + WorldGen.dEnteranceX = 0; + WorldGen.numDRooms = 0; + WorldGen.numDDoors = 0; + WorldGen.generatedShadowKey = false; + WorldGen.numDungeonPlatforms = 0; + WorldGen.numJChests = 0; + WorldGen.JungleItemCount = 0; + } + + public static bool mayanTrap(int x2, int y2) + { + int num1 = 1; + if (WorldGen.genRand.Next(3) == 0) + num1 = 0; + int index1 = x2; + int y = y2; + while (!WorldGen.SolidOrSlopedTile(index1, y)) + { + ++y; + if (y >= Main.maxTilesY - 300) + return false; + } + if (Main.tile[index1, y].type == (ushort) 232 || Main.tile[index1, y].type == (ushort) 10) + return false; + int j = y - 1; + if (Main.tile[index1, j].liquid > (byte) 0 && Main.tile[index1, j].lava()) + return false; + if (num1 == -1 && WorldGen.genRand.Next(20) == 0) + num1 = 2; + else if (num1 == -1) + num1 = WorldGen.genRand.Next(2); + if (Main.tile[index1, j].nactive() || Main.tile[index1 - 1, j].nactive() || Main.tile[index1 + 1, j].nactive() || Main.tile[index1, j - 1].nactive() || Main.tile[index1 - 1, j - 1].nactive() || Main.tile[index1 + 1, j - 1].nactive() || Main.tile[index1, j - 2].nactive() || Main.tile[index1 - 1, j - 2].nactive() || Main.tile[index1 + 1, j - 2].nactive() || Main.tile[index1, j + 1].type == (ushort) 10 || Main.tile[index1, j + 1].type == (ushort) 48 || Main.tile[index1, j + 1].type == (ushort) 232) + return false; + switch (num1) + { + case 0: + int x1 = index1; + int index2 = j - WorldGen.genRand.Next(3); + while (!WorldGen.SolidOrSlopedTile(x1, index2)) + --x1; + int x3 = x1; + int x4 = index1; + while (!WorldGen.SolidOrSlopedTile(x4, index2)) + ++x4; + int x5 = x4; + int num2 = index1 - x3; + int num3 = x5 - index1; + bool flag1 = false; + bool flag2 = false; + if (num2 > 5 && num2 < 50) + flag1 = true; + if (num3 > 5 && num3 < 50) + flag2 = true; + if (flag1 && !WorldGen.SolidOrSlopedTile(x3, index2 + 1)) + flag1 = false; + if (flag2 && !WorldGen.SolidOrSlopedTile(x5, index2 + 1)) + flag2 = false; + if (flag1 && (Main.tile[x3, index2].type == (ushort) 10 || Main.tile[x3, index2].type == (ushort) 48 || Main.tile[x3, index2 + 1].type == (ushort) 10 || Main.tile[x3, index2 + 1].type == (ushort) 48)) + flag1 = false; + if (flag2 && (Main.tile[x5, index2].type == (ushort) 10 || Main.tile[x5, index2].type == (ushort) 48 || Main.tile[x5, index2 + 1].type == (ushort) 10 || Main.tile[x5, index2 + 1].type == (ushort) 48)) + flag2 = false; + int num4; + int i; + if (flag1 & flag2) + { + num4 = 1; + i = x3; + if (WorldGen.genRand.Next(2) == 0) + { + i = x5; + num4 = -1; + } + } + else if (flag2) + { + i = x5; + num4 = -1; + } + else + { + if (!flag1) + return false; + i = x3; + num4 = 1; + } + if (Main.tile[i, index2].wall != (ushort) 87 || Main.tile[i, index2].type == (ushort) 190 || Main.tile[i, index2].type == (ushort) 135 || Main.tile[i, index2].type == (ushort) 137 || Main.tile[i, index2].type == (ushort) 232 || Main.tile[i, index2].type == (ushort) 237 || Main.tile[i, index2].type == (ushort) 10) + return false; + WorldGen.PlaceTile(index1, j, 135, true, true, style: 6); + WorldGen.KillTile(i, index2); + int num5 = WorldGen.genRand.Next(3); + if (Main.tile[index1, j].wire()) + num5 = 0; + if (Main.tile[index1, j].wire2()) + num5 = 1; + if (Main.tile[index1, j].wire3()) + num5 = 2; + int num6 = Math.Abs(i - index1); + int style1 = 1; + if (num6 < 10 && WorldGen.genRand.Next(3) != 0) + style1 = 2; + WorldGen.PlaceTile(i, index2, 137, true, true, style: style1); + if (num4 == 1) + Main.tile[i, index2].frameX += (short) 18; + int num7 = WorldGen.genRand.Next(5); + int index3 = index2; + while (num7 > 0) + { + --num7; + --index3; + if (WorldGen.SolidTile(i, index3) && WorldGen.SolidTile(i - num4, index3) && !WorldGen.SolidOrSlopedTile(i + num4, index3)) + { + WorldGen.PlaceTile(i, index3, 137, true, true, style: style1); + if (num4 == 1) + Main.tile[i, index3].frameX += (short) 18; + switch (num5) + { + case 0: + Main.tile[i, index3].wire(true); + continue; + case 1: + Main.tile[i, index3].wire2(true); + continue; + case 2: + Main.tile[i, index3].wire3(true); + continue; + default: + continue; + } + } + else + break; + } + int index4 = index1; + int index5 = j; + while (index4 != i || index5 != index2) + { + switch (num5) + { + case 0: + Main.tile[index4, index5].wire(true); + break; + case 1: + Main.tile[index4, index5].wire2(true); + break; + case 2: + Main.tile[index4, index5].wire3(true); + break; + } + if (index4 > i) + --index4; + if (index4 < i) + ++index4; + switch (num5) + { + case 0: + Main.tile[index4, index5].wire(true); + break; + case 1: + Main.tile[index4, index5].wire2(true); + break; + case 2: + Main.tile[index4, index5].wire3(true); + break; + } + if (index5 > index2) + --index5; + if (index5 < index2) + ++index5; + switch (num5) + { + case 0: + Main.tile[index4, index5].wire(true); + continue; + case 1: + Main.tile[index4, index5].wire2(true); + continue; + case 2: + Main.tile[index4, index5].wire3(true); + continue; + default: + continue; + } + } + return true; + case 1: + int index6 = index1; + int index7 = j; + while (!WorldGen.SolidOrSlopedTile(index6, index7)) + { + --index7; + if ((double) index7 < Main.worldSurface) + return false; + } + int num8 = Math.Abs(index7 - j); + if (num8 < 3) + return false; + int num9 = WorldGen.genRand.Next(3); + if (Main.tile[index1, j].wire()) + num9 = 0; + if (Main.tile[index1, j].wire2()) + num9 = 1; + if (Main.tile[index1, j].wire3()) + num9 = 2; + int style2 = 3; + if (num8 < 16 && WorldGen.genRand.Next(3) != 0) + style2 = 4; + if (Main.tile[index6, index7].type == (ushort) 135 || Main.tile[index6, index7].type == (ushort) 137 || Main.tile[index6, index7].type == (ushort) 232 || Main.tile[index6, index7].type == (ushort) 237 || Main.tile[index6, index7].type == (ushort) 10 || Main.tile[index6, index7].wall != (ushort) 87) + return false; + WorldGen.PlaceTile(index1, j, 135, true, true, style: 6); + WorldGen.PlaceTile(index6, index7, 137, true, true, style: style2); + for (int index8 = 0; index8 < 2; ++index8) + { + int num10 = WorldGen.genRand.Next(1, 5); + int index9 = index6; + int num11 = -1; + if (index8 == 1) + num11 = 1; + while (num10 > 0) + { + --num10; + index9 += num11; + if (WorldGen.SolidTile(index9, index7 - 1) && !WorldGen.SolidOrSlopedTile(index9, index7 + 1)) + { + WorldGen.PlaceTile(index9, index7, 137, true, true, style: style2); + switch (num9) + { + case 0: + Main.tile[index9, index7].wire(true); + continue; + case 1: + Main.tile[index9, index7].wire2(true); + continue; + case 2: + Main.tile[index9, index7].wire3(true); + continue; + default: + continue; + } + } + else + break; + } + } + int index10 = index1; + int index11 = j; + while (index10 != index6 || index11 != index7) + { + switch (num9) + { + case 0: + Main.tile[index10, index11].wire(true); + break; + case 1: + Main.tile[index10, index11].wire2(true); + break; + case 2: + Main.tile[index10, index11].wire3(true); + break; + } + if (index10 > index6) + --index10; + if (index10 < index6) + ++index10; + switch (num9) + { + case 0: + Main.tile[index10, index11].wire(true); + break; + case 1: + Main.tile[index10, index11].wire2(true); + break; + case 2: + Main.tile[index10, index11].wire3(true); + break; + } + if (index11 > index7) + --index11; + if (index11 < index7) + ++index11; + switch (num9) + { + case 0: + Main.tile[index10, index11].wire(true); + continue; + case 1: + Main.tile[index10, index11].wire2(true); + continue; + case 2: + Main.tile[index10, index11].wire3(true); + continue; + default: + continue; + } + } + return true; + default: + return false; + } + } + + public static bool placeLavaTrap(int x, int y) + { + int num1 = 5; + int num2 = 50; + int num3 = 40; + int num4 = 20; + int num5 = 4; + if (Main.tile[x, y].active() || Main.tile[x, y].liquid < byte.MaxValue || !Main.tile[x, y].lava()) + return false; + int num6 = 0; + for (int index1 = x - num1; index1 <= x + num1; ++index1) + { + for (int index2 = y - num1; index2 <= y + num1; ++index2) + { + if (Main.tile[index1, index2].lava() && !Main.tile[index1, index2].active() && Main.tile[index1, index2].liquid == byte.MaxValue) + ++num6; + } + } + if (num6 < num2) + return false; + int index3 = y; + while (!Main.tile[x, index3].active()) + { + ++index3; + if (index3 > Main.maxTilesY - 200) + return false; + } + if (!Main.tileSolid[(int) Main.tile[x, index3].type] || Main.tileSolidTop[(int) Main.tile[x, index3].type]) + return false; + int num7 = index3; + for (int index4 = x - num4; index4 <= x + num4; ++index4) + { + for (int index5 = index3 - num4; index5 <= index3 + num4; ++index5) + { + if (Main.tile[index4, index5].wire()) + return false; + } + } + while (Main.tile[x, index3].active() && Main.tileSolid[(int) Main.tile[x, index3].type] && !Main.tileSolidTop[(int) Main.tile[x, index3].type]) + { + ++index3; + if (index3 > Main.maxTilesY - 200) + return false; + } + Tile tile = Main.tile[x, index3 - 1]; + if (Main.tileDungeon[(int) tile.type] || tile.type == (ushort) 225 || tile.type == (ushort) 226) + return false; + int num8 = index3; + while (!Main.tile[x, index3].active()) + { + ++index3; + if (index3 > Main.maxTilesY - 200 || Main.tile[x, index3].liquid > (byte) 0) + return false; + } + if (!Main.tileSolid[(int) Main.tile[x, index3].type] || Main.tileSolidTop[(int) Main.tile[x, index3].type]) + return false; + int j = index3 - 1; + if (j - num7 > num3 || j - num8 < num5) + return false; + Main.tile[x, index3].slope((byte) 0); + Main.tile[x, index3].halfBrick(false); + WorldGen.PlaceTile(x, j, 135, forced: true, style: 7); + for (int index6 = num7; index6 <= j; ++index6) + { + Main.tile[x, index6].wire(true); + if (index6 < num8) + { + Main.tile[x, index6].slope((byte) 0); + Main.tile[x, index6].halfBrick(false); + Main.tile[x, index6].actuator(true); + } + } + return true; + } + + public static bool IsTileNearby(int x, int y, int type, int distance) + { + for (int x1 = x - distance; x1 <= x + distance; ++x1) + { + for (int y1 = y - distance; y1 <= y + distance; ++y1) + { + if (WorldGen.InWorld(x1, y1) && Main.tile[x1, y1].active() && (int) Main.tile[x1, y1].type == type) + return true; + } + } + return false; + } + + public static bool placeTrap(int x2, int y2, int type = -1) + { + int index1 = x2; + int j1 = y2; + bool flag1 = false; + bool flag2 = false; + while (!WorldGen.SolidTile(index1, j1)) + { + ++j1; + if (j1 > Main.maxTilesY - 10) + return false; + if (j1 >= Main.maxTilesY - 300) + flag2 = true; + } + int index2 = j1 - 1; + if (WorldGen.IsTileNearby(index1, index2, 70, 20) || Main.tile[index1, index2].wall == (ushort) 87) + return false; + if (Main.tile[index1, index2].liquid > (byte) 0 && Main.tile[index1, index2].lava()) + flag1 = true; + if (type == -1 && WorldGen.genRand.Next(20) == 0) + type = 2; + else if (type == -1 && index2 > WorldGen.lavaLine + 30 && WorldGen.genRand.Next(6) != 0) + type = 3; + else if (type == -1) + type = WorldGen.genRand.Next(2); + if (!WorldGen.InWorld(index1, index2, 3) || flag1 && type != 3 || flag2 && type != 3 || Main.tile[index1, index2].nactive() || Main.tile[index1 - 1, index2].nactive() || Main.tile[index1 + 1, index2].nactive() || Main.tile[index1, index2 - 1].nactive() || Main.tile[index1 - 1, index2 - 1].nactive() || Main.tile[index1 + 1, index2 - 1].nactive() || Main.tile[index1, index2 - 2].nactive() || Main.tile[index1 - 1, index2 - 2].nactive() || Main.tile[index1 + 1, index2 - 2].nactive() || Main.tile[index1, index2 + 1].type == (ushort) 48 || Main.tile[index1, index2 + 1].type == (ushort) 232) + return false; + if (type == 1) + { + for (int index3 = index1 - 3; index3 <= index1 + 3; ++index3) + { + for (int index4 = index2 - 3; index4 <= index2 + 3; ++index4) + { + if (Main.tile[index3, index4].type == (ushort) 147 || Main.tile[index3, index4].type == (ushort) 161) + type = 0; + } + } + } + if (type == 0) + { + int i1 = index1; + int j2 = index2 - WorldGen.genRand.Next(3); + while (!WorldGen.SolidTile(i1, j2) && !Main.tileCracked[(int) Main.tile[i1, j2].type]) + { + --i1; + if (i1 < 0) + return false; + } + int i2 = i1; + int i3 = index1; + while (!WorldGen.SolidTile(i3, j2) && !Main.tileCracked[(int) Main.tile[i3, j2].type]) + { + ++i3; + if (i3 > Main.maxTilesX) + return false; + } + int i4 = i3; + int num1 = index1 - i2; + int num2 = i4 - index1; + bool flag3 = false; + bool flag4 = false; + if (num1 > 5 && num1 < 50) + flag3 = true; + if (num2 > 5 && num2 < 50) + flag4 = true; + if (flag3 && !WorldGen.SolidTile(i2, j2 + 1)) + flag3 = false; + if (flag4 && !WorldGen.SolidTile(i4, j2 + 1)) + flag4 = false; + if (flag3 && (Main.tile[i2, j2].type == (ushort) 10 || Main.tile[i2, j2].type == (ushort) 48 || Main.tile[i2, j2 + 1].type == (ushort) 10 || Main.tile[i2, j2 + 1].type == (ushort) 48)) + flag3 = false; + if (flag4 && (Main.tile[i4, j2].type == (ushort) 10 || Main.tile[i4, j2].type == (ushort) 48 || Main.tile[i4, j2 + 1].type == (ushort) 10 || Main.tile[i4, j2 + 1].type == (ushort) 48)) + flag4 = false; + int num3; + int i5; + if (flag3 & flag4) + { + num3 = 1; + i5 = i2; + if (WorldGen.genRand.Next(2) == 0) + { + i5 = i4; + num3 = -1; + } + } + else if (flag4) + { + i5 = i4; + num3 = -1; + } + else if (flag3) + { + i5 = i2; + num3 = 1; + } + else + { + ++WorldGen.trapDiag[type, 0]; + return false; + } + if (Main.tile[i5, j2].type == (ushort) 190) + { + ++WorldGen.trapDiag[type, 0]; + return false; + } + if (Main.tile[index1, index2].wall > (ushort) 0) + WorldGen.PlaceTile(index1, index2, 135, true, true, style: 2); + else + WorldGen.PlaceTile(index1, index2, 135, true, true, style: WorldGen.genRand.Next(2, 4)); + WorldGen.KillTile(i5, j2); + WorldGen.PlaceTile(i5, j2, 137, true, true); + if (num3 == 1) + Main.tile[i5, j2].frameX += (short) 18; + int index5 = index1; + int index6 = index2; + while (index5 != i5 || index6 != j2) + { + Main.tile[index5, index6].wire(true); + if (index5 > i5) + --index5; + if (index5 < i5) + ++index5; + Main.tile[index5, index6].wire(true); + if (index6 > j2) + --index6; + if (index6 < j2) + ++index6; + Main.tile[index5, index6].wire(true); + } + ++WorldGen.trapDiag[type, 1]; + return true; + } + if (type == 1) + { + int num4 = index1; + int y = index2 - 8; + int index7 = num4 + WorldGen.genRand.Next(-1, 2); + if (WorldGen.IsTileNearby(index7, y, 138, 10)) + return false; + bool flag5 = true; + while (flag5) + { + bool flag6 = true; + int num5 = 0; + for (int i = index7 - 2; i <= index7 + 3; ++i) + { + for (int j3 = y; j3 <= y + 3; ++j3) + { + if (!WorldGen.SolidTile(i, j3)) + flag6 = false; + if (Main.tile[i, j3].active() && (Main.tile[i, j3].type == (ushort) 0 || Main.tile[i, j3].type == (ushort) 1 || Main.tile[i, j3].type == (ushort) 59)) + ++num5; + } + } + --y; + if ((double) y < Main.worldSurface) + { + ++WorldGen.trapDiag[type, 0]; + return false; + } + if (flag6 && num5 > 2) + flag5 = false; + } + if (index2 - y <= 5 || index2 - y >= 40) + { + ++WorldGen.trapDiag[type, 0]; + return false; + } + for (int i = index7; i <= index7 + 1; ++i) + { + for (int j4 = y; j4 <= index2; ++j4) + WorldGen.KillTile(i, j4); + } + for (int i = index7 - 2; i <= index7 + 3; ++i) + { + for (int j5 = y - 2; j5 <= y + 3; ++j5) + { + if (WorldGen.SolidTile(i, j5)) + Main.tile[i, j5].type = (ushort) 1; + } + } + WorldGen.PlaceTile(index1, index2, 135, true, true, style: 7); + WorldGen.PlaceTile(index7, y + 2, 130, true); + WorldGen.PlaceTile(index7 + 1, y + 2, 130, true); + WorldGen.PlaceTile(index7 + 1, y + 1, 138, true); + int index8 = y + 2; + Main.tile[index7, index8].wire(true); + Main.tile[index7 + 1, index8].wire(true); + int j6 = index8 + 1; + WorldGen.PlaceTile(index7, j6, 130, true); + WorldGen.PlaceTile(index7 + 1, j6, 130, true); + Main.tile[index7, j6].wire(true); + Main.tile[index7 + 1, j6].wire(true); + WorldGen.PlaceTile(index7, j6 + 1, 130, true); + WorldGen.PlaceTile(index7 + 1, j6 + 1, 130, true); + Main.tile[index7, j6 + 1].wire(true); + Main.tile[index7 + 1, j6 + 1].wire(true); + int index9 = index1; + int index10 = index2; + while (index9 != index7 || index10 != j6) + { + Main.tile[index9, index10].wire(true); + if (index9 > index7) + --index9; + if (index9 < index7) + ++index9; + Main.tile[index9, index10].wire(true); + if (index10 > j6) + --index10; + if (index10 < j6) + ++index10; + Main.tile[index9, index10].wire(true); + } + ++WorldGen.trapDiag[type, 1]; + return true; + } + if (type == 2) + { + int num = WorldGen.genRand.Next(4, 7); + int i6 = index1 + WorldGen.genRand.Next(-1, 2); + int j7 = index2; + for (int index11 = 0; index11 < num; ++index11) + { + ++j7; + if (!WorldGen.SolidTile(i6, j7)) + { + ++WorldGen.trapDiag[type, 0]; + return false; + } + } + for (int i7 = i6 - 2; i7 <= i6 + 2; ++i7) + { + for (int j8 = j7 - 2; j8 <= j7 + 2; ++j8) + { + if (!WorldGen.SolidTile(i7, j8)) + return false; + } + } + WorldGen.KillTile(i6, j7); + Main.tile[i6, j7].active(true); + Main.tile[i6, j7].type = (ushort) 141; + Main.tile[i6, j7].frameX = (short) 0; + Main.tile[i6, j7].frameY = (short) (18 * WorldGen.genRand.Next(2)); + WorldGen.PlaceTile(index1, index2, 135, true, true, style: WorldGen.genRand.Next(2, 4)); + int index12 = index1; + int index13 = index2; + while (index12 != i6 || index13 != j7) + { + Main.tile[index12, index13].wire(true); + if (index12 > i6) + --index12; + if (index12 < i6) + ++index12; + Main.tile[index12, index13].wire(true); + if (index13 > j7) + --index13; + if (index13 < j7) + ++index13; + Main.tile[index12, index13].wire(true); + } + ++WorldGen.trapDiag[type, 1]; + } + else if (type == 3 && !Main.tile[index1 + 1, index2].active()) + { + for (int i = index1; i <= index1 + 1; ++i) + { + int j9 = index2 + 1; + if (!WorldGen.SolidTile(i, j9)) + return false; + } + int num = WorldGen.genRand.Next(2); + for (int index14 = 0; index14 < 2; ++index14) + { + Main.tile[index1 + index14, index2].active(true); + Main.tile[index1 + index14, index2].type = (ushort) 443; + Main.tile[index1 + index14, index2].frameX = (short) (18 * index14 + 36 * num); + Main.tile[index1 + index14, index2].frameY = (short) 0; + } + return true; + } + return false; + } + + public static int countWires(int x, int y, int size) + { + int num = 0; + for (int x1 = x - size; x1 <= x + size; ++x1) + { + for (int y1 = y - size; y1 <= y + size; ++y1) + { + if (WorldGen.InWorld(x1, y1)) + { + if (Main.tile[x1, y1].wire()) + ++num; + if (Main.tile[x1, y1].wire2()) + ++num; + if (Main.tile[x1, y1].wire3()) + ++num; + if (Main.tile[x1, y1].wire4()) + ++num; + } + } + } + return num; + } + + public static int countTiles(int x, int y, bool jungle = false, bool lavaOk = false) + { + WorldGen.numTileCount = 0; + WorldGen.shroomCount = 0; + WorldGen.lavaCount = 0; + WorldGen.iceCount = 0; + WorldGen.rockCount = 0; + WorldGen.CountedTiles.Clear(); + WorldGen.nextCount(x, y, jungle, lavaOk); + return WorldGen.numTileCount; + } + + public static void nextCount(int x, int y, bool jungle = false, bool lavaOk = false) + { + if (WorldGen.numTileCount >= WorldGen.maxTileCount) + return; + if (x <= 1 || x >= Main.maxTilesX - 1 || y <= 1 || y >= Main.maxTilesY - 1) + { + WorldGen.numTileCount = WorldGen.maxTileCount; + } + else + { + if (WorldGen.CountedTiles.ContainsKey(new Point(x, y))) + return; + if (Main.tile[x, y].wall == (ushort) 244) + { + WorldGen.numTileCount = WorldGen.maxTileCount; + } + else + { + if (!jungle) + { + if (Main.tile[x, y].wall != (ushort) 0) + { + WorldGen.numTileCount = WorldGen.maxTileCount; + return; + } + if (!lavaOk) + { + if (Main.tile[x, y].lava() && Main.tile[x, y].liquid > (byte) 0) + { + ++WorldGen.lavaCount; + WorldGen.numTileCount = WorldGen.maxTileCount; + return; + } + } + else if (Main.tile[x, y].lava() && Main.tile[x, y].liquid > (byte) 0) + ++WorldGen.lavaCount; + } + if (Main.tile[x, y].active()) + { + if (Main.tile[x, y].type == (ushort) 70) + ++WorldGen.shroomCount; + if (Main.tile[x, y].type == (ushort) 1) + ++WorldGen.rockCount; + if (Main.tile[x, y].type == (ushort) 147 || Main.tile[x, y].type == (ushort) 161) + ++WorldGen.iceCount; + } + if (WorldGen.SolidTile(x, y)) + return; + WorldGen.CountedTiles.Add(new Point(x, y), true); + ++WorldGen.numTileCount; + WorldGen.nextCount(x - 1, y, jungle, lavaOk); + WorldGen.nextCount(x + 1, y, jungle, lavaOk); + WorldGen.nextCount(x, y - 1, jungle, lavaOk); + WorldGen.nextCount(x, y + 1, jungle, lavaOk); + } + } + } + + public static int countDirtTiles(int x, int y) + { + WorldGen.numTileCount = 0; + WorldGen.CountedTiles.Clear(); + WorldGen.nextDirtCount(x, y); + return WorldGen.numTileCount; + } + + public static void nextDirtCount(int x, int y) + { + if (WorldGen.numTileCount >= WorldGen.maxTileCount) + return; + if (x <= 1 || x >= Main.maxTilesX - 1 || y <= 1 || y >= Main.maxTilesY - 1) + { + WorldGen.numTileCount = WorldGen.maxTileCount; + } + else + { + if (WorldGen.CountedTiles.ContainsKey(new Point(x, y))) + return; + if (Main.tile[x, y].active() && (Main.tile[x, y].type == (ushort) 147 || Main.tile[x, y].type == (ushort) 161)) + WorldGen.numTileCount = WorldGen.maxTileCount; + else if (Main.tile[x, y].wall == (ushort) 244 || Main.tile[x, y].wall == (ushort) 83 || Main.tile[x, y].wall == (ushort) 3 || Main.tile[x, y].wall == (ushort) 187 || Main.tile[x, y].wall == (ushort) 216) + { + WorldGen.numTileCount = WorldGen.maxTileCount; + } + else + { + if (WorldGen.SolidTile(x, y) || Main.tile[x, y].wall != (ushort) 2 && Main.tile[x, y].wall != (ushort) 59) + return; + WorldGen.CountedTiles.Add(new Point(x, y), true); + ++WorldGen.numTileCount; + WorldGen.nextDirtCount(x - 1, y); + WorldGen.nextDirtCount(x + 1, y); + WorldGen.nextDirtCount(x, y - 1); + WorldGen.nextDirtCount(x, y + 1); + WorldGen.nextDirtCount(x - 1, y - 1); + WorldGen.nextDirtCount(x - 1, y + 1); + WorldGen.nextDirtCount(x + 1, y - 1); + WorldGen.nextDirtCount(x + 1, y + 1); + WorldGen.nextDirtCount(x - 2, y); + WorldGen.nextDirtCount(x + 2, y); + } + } + } + + public static bool InWorld(int x, int y, int fluff = 0) => x >= fluff && x < Main.maxTilesX - fluff && y >= fluff && y < Main.maxTilesY - fluff; + + public static void gemCave(int x, int y) + { + WorldGen.countTiles(x, y); + for (int index = 0; index < 6; ++index) + WorldGen.gem[index] = false; + WorldGen.gem[WorldGen.genRand.Next(6)] = true; + for (int index = 0; index < 6; ++index) + { + if (WorldGen.genRand.Next(6) == 0) + WorldGen.gem[index] = true; + } + WorldGen.Spread.Gem(x, y); + } + + public static int randGem() + { + int index = WorldGen.genRand.Next(6); + while (!WorldGen.gem[index]) + index = WorldGen.genRand.Next(6); + return index; + } + + public static ushort randGemTile() + { + if (WorldGen.genRand.Next(20) != 0) + return 1; + switch ((ushort) WorldGen.randGem()) + { + case 0: + return 67; + case 1: + return 66; + case 2: + return 63; + case 3: + return 65; + case 4: + return 64; + default: + return 68; + } + } + + public static void randMoss() + { + WorldGen.neonMossType = WorldGen.genRand.NextFromList((ushort) 539, (ushort) 536, (ushort) 534); + WorldGen.mossType[0] = WorldGen.genRand.Next(5); + WorldGen.mossType[1] = WorldGen.genRand.Next(5); + while (WorldGen.mossType[1] == WorldGen.mossType[0]) + WorldGen.mossType[1] = WorldGen.genRand.Next(5); + WorldGen.mossType[2] = WorldGen.genRand.Next(5); + while (WorldGen.mossType[2] == WorldGen.mossType[0] || WorldGen.mossType[2] == WorldGen.mossType[1]) + WorldGen.mossType[2] = WorldGen.genRand.Next(5); + } + + public static void neonMossBiome(int i, int j, int maxY = 99999) + { + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j; + Vector2 vector2_2; + vector2_2.X = (float) ((double) WorldGen.genRand.NextFloat() * 4.0 - 2.0); + vector2_2.Y = (float) ((double) WorldGen.genRand.NextFloat() * 4.0 - 2.0); + if ((double) vector2_2.X == 0.0) + vector2_2.X = 1f; + while ((double) vector2_2.Length() < 4.0) + vector2_2 *= 1.5f; + double num1 = (double) WorldGen.genRand.Next(60, 80); + double num2 = (double) WorldGen.genRand.Next(30, 40); + float num3 = (float) (Main.maxTilesX / 4200); + if (WorldGen.getGoodWorldGen) + num3 *= 1.5f; + double num4 = num1 * (double) num3; + double num5 = num2 * (double) num3; + while (num5 > 0.0) + { + num4 *= 0.980000019073486; + --num5; + int num6 = (int) ((double) vector2_1.X - num4); + int num7 = (int) ((double) vector2_1.X + num4); + int num8 = (int) ((double) vector2_1.Y - num4); + int num9 = (int) ((double) vector2_1.Y + num4); + if (num6 < 1) + num6 = 1; + if (num7 > Main.maxTilesX - 1) + num7 = Main.maxTilesX - 1; + if (num8 < 1) + num8 = 1; + if (num9 > Main.maxTilesY - 1) + num9 = Main.maxTilesY - 1; + if ((double) num8 < Main.rockLayer) + { + num8 = (int) Main.rockLayer; + if ((double) vector2_2.Y < 5.0) + vector2_2.Y = 5f; + } + if (num9 > maxY) + { + num9 = maxY; + if ((double) vector2_2.Y > -5.0) + vector2_2.Y = -5f; + } + double num10 = num4 * (1.0 + (double) WorldGen.genRand.NextFloat() * 0.400000005960464 - 0.200000002980232); + for (int x = num6; x < num7; ++x) + { + for (int index = num8; index < num9; ++index) + { + if ((double) new Vector2(Math.Abs((float) x - vector2_1.X), Math.Abs((float) index - vector2_1.Y)).Length() < num10 * 0.8 && WorldGen.TileType(x, index) == 1 && (!Main.tile[x - 1, index].active() || !Main.tile[x + 1, index].active() || !Main.tile[x, index - 1].active() || !Main.tile[x, index + 1].active())) + WorldGen.SpreadGrass(x - 1, index, 1, (int) WorldGen.neonMossType); + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) ((double) WorldGen.genRand.NextFloat() * 4.0 - 2.0); + vector2_2.Y += (float) ((double) WorldGen.genRand.NextFloat() * 4.0 - 2.0); + vector2_2.Y = MathHelper.Clamp(vector2_2.Y, -10f, 10f); + vector2_2.X = MathHelper.Clamp(vector2_2.X, -10f, 10f); + } + } + + public static void setMoss(int x, int y) + { + int index = (double) x >= (double) Main.maxTilesX * 0.334 ? ((double) x >= (double) Main.maxTilesX * 0.667 ? 2 : 1) : 0; + WorldGen.mossWall = (ushort) (54 + WorldGen.mossType[index]); + WorldGen.mossTile = (ushort) (179 + WorldGen.mossType[index]); + } + + public static void FillWallHolesInArea(Microsoft.Xna.Framework.Rectangle worldCoordsArea) + { + int num1 = Math.Max(worldCoordsArea.Left, 0); + int num2 = Math.Min(worldCoordsArea.Right, Main.maxTilesX); + int num3 = 0; + for (int x = num1; x <= num2; ++x) + { + if (x >= 0 && x < Main.maxTilesX) + num3 += WorldGen.FillWallHolesInColumn(x, worldCoordsArea.Top, worldCoordsArea.Bottom); + } + } + + private static int FillWallHolesInColumn(int x, int startY, int endY) + { + int num = 0; + x = Utils.Clamp(x, 2, Main.maxTilesX - 1 - 2); + startY = Math.Max(startY, 2); + endY = Math.Min(endY, Main.maxTilesY - 2); + bool flag = false; + for (int originY = startY; originY < endY; ++originY) + { + if (Main.tile[x, originY].wall == (ushort) 0) + { + if (flag) + { + flag = false; + if (WorldGen.FillWallHolesInSpot(x, originY, 150)) + ++num; + } + } + else + flag = true; + } + return num; + } + + private static bool FillWallHolesInSpot(int originX, int originY, int maxWallsThreshold) + { + if (!WorldGen.InWorld(originX, originY, 2)) + return false; + List pointList1 = new List(); + List pointList2 = new List(); + HashSet pointSet = new HashSet(); + Dictionary dictionary = new Dictionary(); + pointList2.Add(new Point(originX, originY)); + while (pointList2.Count > 0) + { + pointList1.Clear(); + pointList1.AddRange((IEnumerable) pointList2); + pointList2.Clear(); + while (pointList1.Count > 0) + { + if (pointSet.Count >= maxWallsThreshold) + return false; + Point point1 = pointList1[0]; + if (pointSet.Contains(point1)) + pointList1.Remove(point1); + else if (!WorldGen.InWorld(point1.X, point1.Y, 1)) + { + pointList1.Remove(point1); + } + else + { + pointSet.Add(point1); + pointList1.Remove(point1); + Tile tile = Main.tile[point1.X, point1.Y]; + if (tile.wall != (ushort) 0) + { + dictionary[tile.wall] = !dictionary.ContainsKey(tile.wall) ? 1 : dictionary[tile.wall] + 1; + } + else + { + bool flag = false; + if (!flag) + { + int y = point1.Y; + for (int index = point1.X - 1; index <= point1.X + 1; ++index) + { + if (!Main.tile[index, y].active()) + { + flag = true; + break; + } + } + } + if (!flag) + { + int x = point1.X; + for (int index = point1.Y - 1; index <= point1.Y + 1; ++index) + { + if (!Main.tile[x, index].active()) + { + flag = true; + break; + } + } + } + if (flag) + { + Point point2 = new Point(point1.X - 1, point1.Y); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X + 1, point1.Y); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X, point1.Y - 1); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X, point1.Y + 1); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + } + } + } + } + } + if (pointSet.Count == 1) + return false; + ushort num1 = 0; + int num2 = -1; + foreach (KeyValuePair keyValuePair in dictionary) + { + if (keyValuePair.Value > num2) + { + num1 = keyValuePair.Key; + num2 = keyValuePair.Value; + } + } + if (num2 == -1) + num1 = (ushort) 2; + foreach (Point point in pointSet) + { + Tile tile = Main.tile[point.X, point.Y]; + if (tile.wall == (ushort) 0) + tile.wall = num1; + } + return true; + } + + public static void tileCountAndDestroy() + { + for (int x = 10; x < Main.maxTilesX - 10; ++x) + { + for (int y = 10; y < Main.maxTilesY - 10; ++y) + { + if (Main.tile[x, y].active() && WorldGen.tileCounter(x, y) < WorldGen.tileCounterMax) + WorldGen.tileCounterKill(); + } + } + } + + public static int tileCounter(int x, int y) + { + WorldGen.tileCounterNum = 0; + WorldGen.tileCounterNext(x, y); + return WorldGen.tileCounterNum; + } + + public static void tileCounterNext(int x, int y) + { + if (WorldGen.tileCounterNum >= WorldGen.tileCounterMax || x < 5 || x > Main.maxTilesX - 5 || y < 5 || y > Main.maxTilesY - 5 || !Main.tile[x, y].active() || !Main.tileSolid[(int) Main.tile[x, y].type] || !TileID.Sets.CanBeClearedDuringGeneration[(int) Main.tile[x, y].type]) + return; + for (int index = 0; index < WorldGen.tileCounterNum; ++index) + { + if (WorldGen.tileCounterX[index] == x && WorldGen.tileCounterY[index] == y) + return; + } + WorldGen.tileCounterX[WorldGen.tileCounterNum] = x; + WorldGen.tileCounterY[WorldGen.tileCounterNum] = y; + ++WorldGen.tileCounterNum; + WorldGen.tileCounterNext(x - 1, y); + WorldGen.tileCounterNext(x + 1, y); + WorldGen.tileCounterNext(x, y - 1); + WorldGen.tileCounterNext(x, y + 1); + } + + public static void tileCounterKill() + { + for (int index1 = 0; index1 < WorldGen.tileCounterNum; ++index1) + { + int index2 = WorldGen.tileCounterX[index1]; + int index3 = WorldGen.tileCounterY[index1]; + Main.tile[index2, index3].active(false); + } + } + + private static void AddGenerationPass(string name, WorldGenLegacyMethod method) => WorldGen._generator.Append((GenPass) new PassLegacy(name, method)); + + private static void AddGenerationPass(GenPass pass) => WorldGen._generator.Append(pass); + + private static void AddGenerationPass(string name, float weight, WorldGenLegacyMethod method) => WorldGen._generator.Append((GenPass) new PassLegacy(name, method, weight)); + + public static bool checkUnderground(int x, int y) + { + try + { + int num1 = 120; + int num2 = 80; + int num3 = 3; + if ((double) y > Main.worldSurface + (double) num2) + return true; + if ((double) y < Main.worldSurface / 2.0) + return false; + int num4 = y - num2; + int num5 = x - num1 / 2; + int num6 = 0; + if (num5 < 0) + num5 = 0; + if (num5 >= Main.maxTilesX - num1) + num5 = Main.maxTilesX - num1 - 1; + for (int i = num5; i < num5 + num1; ++i) + { + for (int j = num4; j < num4 + num3; ++j) + { + if (WorldGen.SolidTile(i, j) || Main.tile[x, y].wall > (ushort) 0) + ++num6; + } + } + if ((double) num6 >= (double) (num1 * num3) * 0.8) + return true; + } + catch + { + } + return false; + } + + public static int GetNextJungleChestItem() + { + int num = 211; + switch (WorldGen.JungleItemCount % 4) + { + case 0: + num = 211; + break; + case 1: + num = 212; + break; + case 2: + num = 213; + break; + case 3: + num = 964; + break; + } + if (WorldGen.genRand.Next(50) == 0) + num = 753; + else if (WorldGen.genRand.Next(30) == 0) + num = 2292; + else if (WorldGen.genRand.Next(20) == 0) + num = 3017; + ++WorldGen.JungleItemCount; + return num; + } + + private static void ScanTileColumnAndRemoveClumps(int x) + { + int num = 0; + int y = 0; + for (int index = 10; index < Main.maxTilesY - 10; ++index) + { + if (Main.tile[x, index].active() && Main.tileSolid[(int) Main.tile[x, index].type] && TileID.Sets.CanBeClearedDuringGeneration[(int) Main.tile[x, index].type]) + { + if (num == 0) + y = index; + ++num; + } + else + { + if (num > 0 && num < WorldGen.tileCounterMax) + { + ++WorldGen.SmallConsecutivesFound; + if (WorldGen.tileCounter(x, y) < WorldGen.tileCounterMax) + { + ++WorldGen.SmallConsecutivesEliminated; + WorldGen.tileCounterKill(); + } + } + num = 0; + } + } + } + + public static void OreHelper(int X, int Y) + { + for (int index1 = X - 1; index1 <= X + 1; ++index1) + { + for (int index2 = Y - 1; index2 <= Y + 1; ++index2) + { + if (Main.tile[index1, index2].type == (ushort) 1 || Main.tile[index1, index2].type == (ushort) 40) + Main.tile[index1, index2].type = (ushort) 0; + } + } + } + + public static bool StonePatch(int X, int Y) + { + int i1 = X; + int j1 = Y; + while (!WorldGen.SolidTile(i1, j1)) + { + ++j1; + if ((double) j1 > Main.worldSurface) + return false; + } + if (!TileID.Sets.Conversion.Grass[(int) Main.tile[i1, j1].type] || !TileID.Sets.Conversion.Grass[(int) Main.tile[i1 - 1, j1].type] || !TileID.Sets.Conversion.Grass[(int) Main.tile[i1 + 1, j1].type] || Main.tile[i1, j1].wall > (ushort) 0) + return false; + for (int index1 = i1 - 10; index1 <= i1 + 10; ++index1) + { + for (int index2 = j1 + 7; index2 <= j1 + 30; ++index2) + { + if (!Main.tile[index1, index2].active() || Main.tileDungeon[(int) Main.tile[index1, index2].type] || TileID.Sets.Clouds[(int) Main.tile[index1, index2].type] || TileID.Sets.Conversion.Sand[(int) Main.tile[index1, index2].type] || Main.tile[index1, index2].wall == (ushort) 0 || Main.tile[index1, index2].type == (ushort) 199 || Main.tile[index1, index2].type == (ushort) 23) + return false; + } + } + Vector2 vector2_1 = new Vector2((float) i1, (float) j1); + Vector2 vector2_2; + vector2_2.X = (float) ((double) WorldGen.genRand.NextFloat() * 0.600000023841858 - 0.300000011920929); + vector2_2.Y = (float) ((double) WorldGen.genRand.NextFloat() * 0.5 + 0.5); + float num1 = (float) WorldGen.genRand.Next(13, 18); + int num2 = WorldGen.genRand.Next(13, 19); + if (WorldGen.genRand.Next(3) == 0) + num1 += (float) WorldGen.genRand.Next(3); + if (WorldGen.genRand.Next(3) == 0) + num2 += WorldGen.genRand.Next(3); + while (num2 > 0) + { + --num2; + for (int i2 = i1 - (int) num1 * 4; (double) i2 <= (double) i1 + (double) num1 * 4.0; ++i2) + { + for (int j2 = j1 - (int) num1 * 4; (double) j2 <= (double) j1 + (double) num1 * 4.0; ++j2) + { + float num3 = (float) ((double) num1 * (0.699999988079071 + (double) WorldGen.genRand.NextFloat() * 0.600000023841858) * 0.300000011920929); + if (WorldGen.genRand.Next(8) == 0) + num3 *= 2f; + Vector2 vector2_3 = vector2_1 - new Vector2((float) i2, (float) j2); + if ((double) vector2_3.Length() < (double) num3 * 2.0 && !Main.tile[i2, j2].active() && Main.tile[i2, j2 + 1].active() && Main.tile[i2, j2 + 1].type == (ushort) 1 && WorldGen.genRand.Next(7) == 0 && WorldGen.SolidTile(i2 - 1, j2 + 1) && WorldGen.SolidTile(i2 + 1, j2 + 1)) + { + if (WorldGen.genRand.Next(3) != 0) + WorldGen.PlaceTile(i2, j2, 186, true, style: WorldGen.genRand.Next(7, 13)); + if (WorldGen.genRand.Next(3) != 0) + WorldGen.PlaceSmallPile(i2, j2, WorldGen.genRand.Next(6), 1); + WorldGen.PlaceSmallPile(i2, j2, WorldGen.genRand.Next(6), 0); + } + if ((double) vector2_3.Length() < (double) num3) + { + if (Main.tileSolid[(int) Main.tile[i2, j2].type]) + Main.tile[i2, j2].type = (ushort) 1; + if (!WorldGen.gen) + WorldGen.SquareTileFrame(i2, j2); + } + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) ((double) WorldGen.genRand.NextFloat() * 0.200000002980232 - 0.100000001490116); + vector2_2.Y += (float) ((double) WorldGen.genRand.NextFloat() * 0.200000002980232 - 0.100000001490116); + double num4 = (double) MathHelper.Clamp(vector2_2.X, -0.3f, 0.3f); + double num5 = (double) MathHelper.Clamp(vector2_2.Y, 0.5f, 1f); + } + return true; + } + + public static bool ShellPile(int X, int Y) + { + int i1 = X; + int j1 = Y; + while (!WorldGen.SolidTile(i1, j1)) + { + ++j1; + if ((double) j1 > Main.worldSurface) + return false; + } + if (Main.tile[i1, j1].type != (ushort) 53 || Main.tile[i1, j1].wall > (ushort) 0) + return false; + int num1 = j1 - 1; + Vector2 vector2_1 = new Vector2((float) i1, (float) num1); + Vector2 vector2_2; + vector2_2.X = (float) ((double) WorldGen.genRand.NextFloat() * 0.600000023841858 - 0.300000011920929); + vector2_2.Y = (float) ((double) WorldGen.genRand.NextFloat() * 0.5 + 0.5); + float num2 = (float) WorldGen.genRand.Next(2, 4); + if (WorldGen.genRand.Next(10) == 0) + ++num2; + int num3 = WorldGen.genRand.Next(3, 6); + while (num3 > 0) + { + --num3; + for (int i2 = i1 - (int) num2 * 4; (double) i2 <= (double) i1 + (double) num2 * 4.0; ++i2) + { + for (int j2 = num1 + (int) num2 * 4; (double) j2 > (double) num1 - (double) num2 * 4.0; --j2) + { + float num4 = (float) ((double) num2 * (double) WorldGen.genRand.Next(70, 91) * 0.00999999977648258); + Vector2 vector2_3 = vector2_1 - new Vector2((float) i2, (float) j2); + vector2_3.X *= 0.6f; + if ((double) vector2_3.Length() < (double) num4) + { + if (j2 <= num1 + 1 || WorldGen.genRand.Next(6) == 0) + { + Main.tile[i2, j2].type = (ushort) 495; + Main.tile[i2, j2].active(true); + Main.tile[i2, j2].halfBrick(false); + Main.tile[i2, j2].slope((byte) 0); + if (!Main.tile[i2, j2 + 1].active()) + { + Main.tile[i2, j2 + 1].type = (ushort) 495; + Main.tile[i2, j2 + 1].active(true); + Main.tile[i2, j2 + 1].halfBrick(false); + Main.tile[i2, j2 + 1].slope((byte) 0); + if (!Main.tile[i2, j2 + 2].active()) + { + Main.tile[i2, j2 + 2].type = (ushort) 53; + Main.tile[i2, j2 + 2].active(true); + Main.tile[i2, j2 + 2].halfBrick(false); + Main.tile[i2, j2 + 2].slope((byte) 0); + if (!Main.tile[i2, j2 + 3].active()) + { + Main.tile[i2, j2 + 3].type = (ushort) 397; + Main.tile[i2, j2 + 3].active(true); + Main.tile[i2, j2 + 3].halfBrick(false); + Main.tile[i2, j2 + 3].slope((byte) 0); + } + } + } + if (!WorldGen.gen) + WorldGen.SquareTileFrame(i2, j2); + } + else if (Main.tile[i2, j2].type != (ushort) 495) + { + Main.tile[i2, j2].active(true); + Main.tile[i2, j2].halfBrick(false); + Main.tile[i2, j2].slope((byte) 0); + Main.tile[i2, j2].type = (ushort) 53; + if (!WorldGen.gen) + WorldGen.SquareTileFrame(i2, j2); + } + } + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) ((double) WorldGen.genRand.NextFloat() * 0.200000002980232 - 0.100000001490116); + vector2_2.Y += (float) ((double) WorldGen.genRand.NextFloat() * 0.200000002980232 - 0.100000001490116); + double num5 = (double) MathHelper.Clamp(vector2_2.X, -0.3f, 0.3f); + double num6 = (double) MathHelper.Clamp(vector2_2.Y, 0.5f, 1f); + } + return true; + } + + public static bool OrePatch(int X, int Y) + { + ushort num1 = (ushort) WorldGen.SavedOreTiers.Copper; + if (WorldGen.genRand.Next(3) == 0) + num1 = (ushort) WorldGen.SavedOreTiers.Iron; + int index1 = X; + int j = Y; + while (!WorldGen.SolidTile(index1, j)) + { + ++j; + if ((double) j > Main.worldSurface) + return false; + } + if (!TileID.Sets.Conversion.Grass[(int) Main.tile[index1, j].type] || !TileID.Sets.Conversion.Grass[(int) Main.tile[index1 - 1, j].type] || !TileID.Sets.Conversion.Grass[(int) Main.tile[index1 + 1, j].type] || Main.tile[index1, j].wall > (ushort) 0) + return false; + for (int index2 = index1 - 10; index2 <= index1 + 10; ++index2) + { + for (int index3 = j + 7; index3 <= j + 30; ++index3) + { + if (!Main.tile[index2, index3].active() || Main.tileDungeon[(int) Main.tile[index2, index3].type] || TileID.Sets.Clouds[(int) Main.tile[index2, index3].type] || TileID.Sets.Conversion.Sand[(int) Main.tile[index2, index3].type] || Main.tile[index2, index3].wall == (ushort) 0) + return false; + } + } + int index4 = j + WorldGen.genRand.Next(2); + Main.tile[index1, index4].type = num1; + Main.tile[index1, index4].active(true); + WorldGen.OreHelper(index1, index4); + if (!WorldGen.gen) + WorldGen.SquareTileFrame(index1, index4); + int num2 = index4; + while (index4 < num2 + WorldGen.genRand.Next(8, 13)) + { + index1 += WorldGen.genRand.Next(-1, 2); + index4 += WorldGen.genRand.Next(1, 3); + if (WorldGen.genRand.Next(3) == 0) + ++index4; + Main.tile[index1, index4].type = num1; + Main.tile[index1, index4].active(true); + WorldGen.OreHelper(index1, index4); + if (!WorldGen.gen) + WorldGen.SquareTileFrame(index1, index4); + if (WorldGen.genRand.Next(4) == 0) + { + int index5 = index1 + WorldGen.genRand.Next(-2, 3); + int index6 = index4 + WorldGen.genRand.Next(2); + Main.tile[index5, index6].type = num1; + Main.tile[index5, index6].active(true); + WorldGen.OreHelper(index5, index6); + if (!WorldGen.gen) + WorldGen.SquareTileFrame(index5, index6); + } + } + Vector2 vector2_1 = new Vector2((float) index1, (float) index4); + Vector2 vector2_2; + vector2_2.X = (float) ((double) WorldGen.genRand.NextFloat() * 0.600000023841858 - 0.300000011920929); + vector2_2.Y = (float) ((double) WorldGen.genRand.NextFloat() * 0.5 + 0.5); + float num3 = (float) WorldGen.genRand.Next(5, 9); + int num4 = WorldGen.genRand.Next(9, 14); + if (WorldGen.genRand.Next(3) == 0) + num3 += (float) WorldGen.genRand.Next(2); + if (WorldGen.genRand.Next(3) == 0) + num4 += WorldGen.genRand.Next(2); + while (num4 > 0) + { + --num4; + for (int index7 = index1 - (int) num3 * 4; (double) index7 <= (double) index1 + (double) num3 * 4.0; ++index7) + { + for (int index8 = index4 - (int) num3 * 4; (double) index8 <= (double) index4 + (double) num3 * 4.0; ++index8) + { + float num5 = (float) ((double) num3 * (0.5 + (double) WorldGen.genRand.NextFloat() * 0.5) * 0.100000001490116); + float num6 = (float) ((double) num3 * (0.699999988079071 + (double) WorldGen.genRand.NextFloat() * 0.600000023841858) * 0.300000011920929); + if (WorldGen.genRand.Next(8) == 0) + num6 *= 2f; + Vector2 vector2_3 = vector2_1 - new Vector2((float) index7, (float) index8); + if ((double) vector2_3.Length() < (double) num5) + Main.tile[index7, index8].active(false); + else if ((double) vector2_3.Length() < (double) num6) + { + Main.tile[index7, index8].type = num1; + if (WorldGen.genRand.Next(4) == 0) + Main.tile[index7, index8].active(true); + WorldGen.OreHelper(index7, index8); + if (!WorldGen.gen) + WorldGen.SquareTileFrame(index7, index8); + } + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) ((double) WorldGen.genRand.NextFloat() * 0.200000002980232 - 0.100000001490116); + vector2_2.Y += (float) ((double) WorldGen.genRand.NextFloat() * 0.200000002980232 - 0.100000001490116); + double num7 = (double) MathHelper.Clamp(vector2_2.X, -0.3f, 0.3f); + double num8 = (double) MathHelper.Clamp(vector2_2.Y, 0.5f, 1f); + } + return true; + } + + public static bool PlaceOasis(int X, int Y) + { + int index1 = X; + int index2 = Y; + if (Main.tile[index1, index2].active() || Main.tile[index1, index2].wall != (ushort) 0) + return false; + while (!Main.tile[index1, index2].active() && Main.tile[index1, index2].wall == (ushort) 0 && (double) index2 <= Main.worldSurface) + ++index2; + if ((double) index2 > Main.worldSurface - 10.0 || Main.tile[index1, index2].type != (ushort) 53) + return false; + int num1 = 350; + for (int index3 = 0; index3 < WorldGen.numOasis; ++index3) + { + if ((double) Vector2.Distance(WorldGen.oasisPosition[index3], new Vector2((float) index1, (float) index2)) < (double) num1) + return false; + } + int num2 = WorldGen.genRand.Next(45, 61); + int oasisHeight = WorldGen.oasisHeight; + int num3 = num2 + 50; + int num4 = 4; + for (int index4 = index1 - num3; index4 <= index1 + num3; ++index4) + { + for (int index5 = index2 - oasisHeight; index5 <= index2 + oasisHeight + num4; ++index5) + { + Tile tile = Main.tile[index4, index5]; + if (tile.active()) + { + if (Main.tileSolid[(int) tile.type] && ((tile.type == (ushort) 151 || tile.type == (ushort) 397) && Math.Abs(index4 - index1) < num2 && Math.Abs(index5 - index2) < oasisHeight / 2 || tile.type != (ushort) 53)) + return false; + } + else if ((tile.liquid > (byte) 0 || tile.wall > (ushort) 0) && Math.Abs(index4 - index1) < num2 && Math.Abs(index5 - index2) < oasisHeight / 2) + return false; + } + if (index4 > index1 - num2 / 2 && index4 < index1 - num2 / 2 && (Main.tile[index4, index2 - 6].active() || !Main.tile[index4, index2 + 1].active())) + return false; + } + int num5 = 5; + int num6 = index2; + while (!Main.tile[index1 - num2, index2 + num5].active() || Main.tile[index1 - num2, index2 + num5].wall != (ushort) 0 || !Main.tile[index1 + num2, index2 + num5].active() || Main.tile[index1 + num2, index2 + num5].wall != (ushort) 0) + { + ++index2; + if (index2 - num6 > 20) + break; + } + int num7 = num2 / 2; + int num8 = index1 - num2 * 3; + int num9 = index1 + num2 * 3; + int num10 = index2 - oasisHeight * 4; + int num11 = index2 + oasisHeight * 3; + if (num8 < 0) + num8 = 0; + if (num9 > Main.maxTilesX) + num9 = Main.maxTilesX; + if (num10 < 0) + num10 = 0; + if (num11 > Main.maxTilesY) + num11 = Main.maxTilesY; + for (int index6 = num8; index6 < num9; ++index6) + { + for (int index7 = num10; index7 < num11; ++index7) + { + float num12 = (float) Math.Abs(index6 - index1) * 0.7f; + float num13 = (float) Math.Abs(index7 - index2) * 1.35f; + double num14 = Math.Sqrt((double) num12 * (double) num12 + (double) num13 * (double) num13); + float num15 = (float) num7 * (float) (0.529999971389771 + (double) WorldGen.genRand.NextFloat() * 0.0399999991059303); + float num16 = (1f - (float) Math.Abs(index6 - index1) / (float) (num9 - index1)) * 2.3f; + float num17 = num16 * num16; + float num18 = num17 * num17; + double num19 = (double) num15; + if (num14 < num19) + { + if (index7 == index2 + 1) + Main.tile[index6, index7].liquid = (byte) 127; + else if (index7 > index2 + 1) + Main.tile[index6, index7].liquid = byte.MaxValue; + Main.tile[index6, index7].lava(false); + Main.tile[index6, index7].active(false); + } + else if (index7 < index2 && (double) num12 < (double) num15 + (double) Math.Abs(index7 - index2) * 3.0 * (double) num18) + { + if (Main.tile[index6, index7].type == (ushort) 53) + Main.tile[index6, index7].active(false); + } + else if (index7 >= index2 && (double) num12 < (double) num15 + (double) Math.Abs(index7 - index2) * (double) num18 && Main.tile[index6, index7].wall == (ushort) 0) + { + if (Main.tile[index6, index7].active() && Main.tileSolid[(int) Main.tile[index6, index7].type] && !Main.tileSolidTop[(int) Main.tile[index6, index7].type]) + { + Main.tile[index6, index7].slope((byte) 0); + Main.tile[index6, index7].halfBrick(false); + } + else + { + Main.tile[index6, index7].active(true); + Main.tile[index6, index7].type = (ushort) 53; + Main.tile[index6, index7].slope((byte) 0); + Main.tile[index6, index7].halfBrick(false); + } + } + } + } + int num20 = 50; + int num21 = index1 - num2 * 2; + int num22 = index1 + num2 * 2; + int num23 = index2 + oasisHeight * 2; + for (int index8 = num21; index8 < num22; ++index8) + { + for (int index9 = num23; index9 >= index2; --index9) + { + double num24 = (double) Math.Abs(index8 - index1) * 0.699999988079071; + float num25 = (float) Math.Abs(index9 - index2) * 1.35f; + if (Math.Sqrt(num24 * num24 + (double) num25 * (double) num25) > (double) ((float) num7 * 0.57f)) + { + bool flag1 = false; + if (!Main.tile[index8, index9].active() && Main.tile[index8, index9].wall == (ushort) 0) + { + int num26 = -1; + int num27 = -1; + for (int index10 = index8; index10 <= index8 + num20 && Main.tile[index10, index9 + 1].active() && Main.tileSolid[(int) Main.tile[index10, index9 + 1].type] && Main.tile[index10, index9].wall <= (ushort) 0; ++index10) + { + if (Main.tile[index10, index9].active() && Main.tileSolid[(int) Main.tile[index10, index9].type]) + { + if (Main.tile[index10, index9].type == (ushort) 53) + flag1 = true; + num27 = index10; + break; + } + if (Main.tile[index10, index9].active()) + break; + } + for (int index11 = index8; index11 >= index8 - num20 && Main.tile[index11, index9 + 1].active() && Main.tileSolid[(int) Main.tile[index11, index9 + 1].type] && Main.tile[index11, index9].wall <= (ushort) 0; --index11) + { + if (Main.tile[index11, index9].active() && Main.tileSolid[(int) Main.tile[index11, index9].type]) + { + if (Main.tile[index11, index9].type == (ushort) 53) + flag1 = true; + num26 = index11; + break; + } + if (Main.tile[index11, index9].active()) + break; + } + bool flag2 = true; + if (((num26 <= -1 ? 0 : (num27 > -1 ? 1 : 0)) & (flag2 ? 1 : 0)) != 0) + { + int num28 = 0; + for (int index12 = num26 + 1; index12 < num27; ++index12) + { + if (num27 - num26 > 5 && WorldGen.genRand.Next(5) == 0) + num28 = WorldGen.genRand.Next(5, 10); + Main.tile[index12, index9].active(true); + Main.tile[index12, index9].type = (ushort) 53; + if (num28 > 0) + { + --num28; + Main.tile[index12, index9 - 1].active(true); + Main.tile[index12, index9 - 1].type = (ushort) 53; + } + } + } + } + } + } + } + if (WorldGen.numOasis < WorldGen.maxOasis) + { + WorldGen.oasisPosition[WorldGen.numOasis] = new Vector2((float) index1, (float) index2); + WorldGen.oasisWidth[WorldGen.numOasis] = num2; + ++WorldGen.numOasis; + } + return true; + } + + public static bool BiomeTileCheck(int x, int y) + { + int num = 50; + for (int x1 = x - num; x1 <= x + num; ++x1) + { + for (int y1 = y - num; y1 <= y + num; ++y1) + { + if (WorldGen.InWorld(x1, y1)) + { + if (Main.tile[x1, y1].active()) + { + switch (Main.tile[x1, y1].type) + { + case 70: + case 72: + case 147: + case 161: + case 162: + case 367: + case 368: + case 396: + case 397: + return true; + } + } + switch (Main.tile[x1, y1].wall) + { + case 187: + case 216: + return true; + default: + continue; + } + } + } + } + return false; + } + + public static double oceanLevel => (Main.worldSurface + Main.rockLayer) / 2.0 + 40.0; + + public static bool oceanDepths(int x, int y) => (double) y <= WorldGen.oceanLevel && (x < WorldGen.beachDistance || x > Main.maxTilesX - WorldGen.beachDistance); + + public static void GenerateWorld(int seed, GenerationProgress customProgressObject = null) + { + WorldGen.drunkWorldGen = false; + WorldGen.drunkWorldGenText = false; + if (seed == 5162020) + { + WorldGen.drunkWorldGen = true; + WorldGen.drunkWorldGenText = true; + Main.drunkWorld = true; + Main.rand = new UnifiedRandom(); + seed = Main.rand.Next(999999999); + if (!Main.dayTime) + Main.time = 0.0; + } + if (WorldGen.notTheBees) + { + Main.rand = new UnifiedRandom(); + seed = Main.rand.Next(999999999); + } + if (WorldGen.getGoodWorldGen) + { + Main.getGoodWorld = true; + Main.rand = new UnifiedRandom(); + seed = Main.rand.Next(999999999); + } + else + Main.getGoodWorld = false; + Console.WriteLine("Creating world - Seed: {0} Width: {1}, Height: {2}, Evil: {3}, IsExpert: {4}", (object) seed, (object) Main.maxTilesX, (object) Main.maxTilesY, (object) WorldGen.WorldGenParam_Evil, (object) Main.expertMode); + Main.lockMenuBGChange = true; + WorldGenConfiguration configuration = WorldGenConfiguration.FromEmbeddedPath("Terraria.GameContent.WorldBuilding.Configuration.json"); + WorldGen.Hooks.ProcessWorldGenConfig(ref configuration); + WorldGen._lastSeed = seed; + WorldGen._generator = new WorldGenerator(seed, configuration); + WorldGen._genRand = new UnifiedRandom(seed); + Main.rand = new UnifiedRandom(seed); + StructureMap structures = new StructureMap(); + WorldGen.worldSurfaceLow = 0.0; + double worldSurface = 0.0; + double worldSurfaceHigh = 0.0; + double rockLayerLow = 0.0; + double rockLayer = 0.0; + double rockLayerHigh = 0.0; + int copper = 7; + int iron = 6; + int silver = 9; + int gold = 8; + int dungeonSide = 0; + ushort jungleHut = (ushort) WorldGen.genRand.Next(5); + int shellStartXLeft = 0; + int shellStartYLeft = 0; + int shellStartXRight = 0; + int shellStartYRight = 0; + int howFar = 0; + int[] PyrX = (int[]) null; + int[] PyrY = (int[]) null; + int numPyr = 0; + int jungleMinX = -1; + int jungleMaxX = -1; + int[] snowMinX = new int[Main.maxTilesY]; + int[] snowMaxX = new int[Main.maxTilesY]; + int snowTop = 0; + int snowBottom = 0; + float dub2 = 0.0f; + int skyLakes = 1; + if (Main.maxTilesX > 8000) + ++skyLakes; + if (Main.maxTilesX > 6000) + ++skyLakes; + int beachSandRandomCenter = 275 + 5 + 40; + int beachSandRandomWidthRange = 20; + int beachSandDungeonExtraWidth = 40; + int beachSandJungleExtraWidth = 20; + int oceanWaterStartRandomMin = 220; + int oceanWaterStartRandomMax = oceanWaterStartRandomMin + 40; + int oceanWaterForcedJungleLength = 275; + int leftBeachEnd = 0; + int rightBeachStart = 0; + int minSsandBeforeWater = 50; + int evilBiomeBeachAvoidance = beachSandRandomCenter + 60; + int evilBiomeAvoidanceMidFixer = 50; + int lakesBeachAvoidance = beachSandRandomCenter + 20; + int smallHolesBeachAvoidance = beachSandRandomCenter + 20; + int num1 = beachSandRandomCenter; + int surfaceCavesBeachAvoidance2 = beachSandRandomCenter + 20; + int jungleOriginX = 0; + int snowOriginLeft = 0; + int snowOriginRight = 0; + int logX = -1; + int logY = -1; + int dungeonLocation = 0; + WorldGen.AddGenerationPass("Reset", (WorldGenLegacyMethod) ((progress, passConfig) => + { + WorldGen.numOceanCaveTreasure = 0; + WorldGen.skipDesertTileCheck = false; + WorldGen.gen = true; + Liquid.ReInit(); + WorldGen.noTileActions = true; + progress.Message = ""; + WorldGen.SetupStatueList(); + WorldGen.RandomizeWeather(); + Main.cloudAlpha = 0.0f; + Main.maxRaining = 0.0f; + Main.raining = false; + WorldGen.heartCount = 0; + Main.checkXMas(); + Main.checkHalloween(); + WorldGen.ResetGenerator(); + WorldGen.UndergroundDesertLocation = Microsoft.Xna.Framework.Rectangle.Empty; + WorldGen.UndergroundDesertHiveLocation = Microsoft.Xna.Framework.Rectangle.Empty; + WorldGen.numLarva = 0; + WorldGen.hellChestItem = new int[WorldGen.hellChestItem.Length]; + for (int index1 = 0; index1 < WorldGen.hellChestItem.Length; ++index1) + { + bool flag = true; + while (flag) + { + flag = false; + WorldGen.hellChestItem[index1] = WorldGen.genRand.Next(WorldGen.hellChestItem.Length); + for (int index2 = 0; index2 < index1; ++index2) + { + if (WorldGen.hellChestItem[index2] == WorldGen.hellChestItem[index1]) + flag = true; + } + } + } + int num2 = 86400; + Main.slimeRainTime = (double) -WorldGen.genRand.Next(num2 * 2, num2 * 3); + Main.cloudBGActive = (float) -WorldGen.genRand.Next(8640, 86400); + WorldGen.skipFramingDuringGen = false; + WorldGen.SavedOreTiers.Copper = 7; + WorldGen.SavedOreTiers.Iron = 6; + WorldGen.SavedOreTiers.Silver = 9; + WorldGen.SavedOreTiers.Gold = 8; + WorldGen.copperBar = 20; + WorldGen.ironBar = 22; + WorldGen.silverBar = 21; + WorldGen.goldBar = 19; + if (WorldGen.genRand.Next(2) == 0) + { + copper = 166; + WorldGen.copperBar = 703; + WorldGen.SavedOreTiers.Copper = 166; + } + if (WorldGen.genRand.Next(2) == 0) + { + iron = 167; + WorldGen.ironBar = 704; + WorldGen.SavedOreTiers.Iron = 167; + } + if (WorldGen.genRand.Next(2) == 0) + { + silver = 168; + WorldGen.silverBar = 705; + WorldGen.SavedOreTiers.Silver = 168; + } + if (WorldGen.genRand.Next(2) == 0) + { + gold = 169; + WorldGen.goldBar = 706; + WorldGen.SavedOreTiers.Gold = 169; + } + WorldGen.crimson = WorldGen.genRand.Next(2) == 0; + if (WorldGen.WorldGenParam_Evil == 0) + WorldGen.crimson = false; + if (WorldGen.WorldGenParam_Evil == 1) + WorldGen.crimson = true; + switch (jungleHut) + { + case 0: + jungleHut = (ushort) 119; + break; + case 1: + jungleHut = (ushort) 120; + break; + case 2: + jungleHut = (ushort) 158; + break; + case 3: + jungleHut = (ushort) 175; + break; + case 4: + jungleHut = (ushort) 45; + break; + } + Main.worldID = WorldGen.genRand.Next(int.MaxValue); + WorldGen.RandomizeTreeStyle(); + WorldGen.RandomizeCaveBackgrounds(); + WorldGen.RandomizeBackgrounds(WorldGen.genRand); + WorldGen.RandomizeMoonState(); + WorldGen.TreeTops.CopyExistingWorldInfoForWorldGeneration(); + dungeonSide = WorldGen.genRand.Next(2) == 0 ? -1 : 1; + if (dungeonSide == -1) + { + float num3 = (float) (1.0 - (double) WorldGen.genRand.Next(15, 30) * 0.00999999977648258); + jungleOriginX = (int) ((double) Main.maxTilesX * (double) num3); + } + else + { + float num4 = (float) WorldGen.genRand.Next(15, 30) * 0.01f; + jungleOriginX = (int) ((double) Main.maxTilesX * (double) num4); + } + int num5 = WorldGen.genRand.Next(Main.maxTilesX); + if (WorldGen.drunkWorldGen) + dungeonSide *= -1; + if (dungeonSide == 1) + { + while ((double) num5 < (double) Main.maxTilesX * 0.600000023841858 || (double) num5 > (double) Main.maxTilesX * 0.75) + num5 = WorldGen.genRand.Next(Main.maxTilesX); + } + else + { + while ((double) num5 < (double) Main.maxTilesX * 0.25 || (double) num5 > (double) Main.maxTilesX * 0.400000005960464) + num5 = WorldGen.genRand.Next(Main.maxTilesX); + } + if (WorldGen.drunkWorldGen) + dungeonSide *= -1; + int num6 = WorldGen.genRand.Next(50, 90); + float num7 = (float) (Main.maxTilesX / 4200); + int num8 = num6 + (int) ((double) WorldGen.genRand.Next(20, 40) * (double) num7) + (int) ((double) WorldGen.genRand.Next(20, 40) * (double) num7); + int num9 = num5 - num8; + int num10 = WorldGen.genRand.Next(50, 90) + (int) ((double) WorldGen.genRand.Next(20, 40) * (double) num7) + (int) ((double) WorldGen.genRand.Next(20, 40) * (double) num7); + int num11 = num5 + num10; + if (num9 < 0) + num9 = 0; + if (num11 > Main.maxTilesX) + num11 = Main.maxTilesX; + snowOriginLeft = num9; + snowOriginRight = num11; + leftBeachEnd = WorldGen.genRand.Next(beachSandRandomCenter - beachSandRandomWidthRange, beachSandRandomCenter + beachSandRandomWidthRange); + if (dungeonSide == 1) + leftBeachEnd += beachSandDungeonExtraWidth; + else + leftBeachEnd += beachSandJungleExtraWidth; + rightBeachStart = Main.maxTilesX - WorldGen.genRand.Next(beachSandRandomCenter - beachSandRandomWidthRange, beachSandRandomCenter + beachSandRandomWidthRange); + if (dungeonSide == -1) + rightBeachStart -= beachSandDungeonExtraWidth; + else + rightBeachStart -= beachSandJungleExtraWidth; + int num12 = 50; + if (dungeonSide == -1) + dungeonLocation = WorldGen.genRand.Next(leftBeachEnd + num12, (int) ((double) Main.maxTilesX * 0.2)); + else + dungeonLocation = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.8), rightBeachStart - num12); + })); + WorldGen.AddGenerationPass(new TerrainPass().OnBegin((Action) (pass => + { + TerrainPass terrainPass = pass as TerrainPass; + terrainPass.LeftBeachSize = leftBeachEnd; + terrainPass.RightBeachSize = Main.maxTilesX - rightBeachStart; + })).OnComplete((Action) (pass => + { + TerrainPass terrainPass = pass as TerrainPass; + rockLayer = terrainPass.RockLayer; + rockLayerHigh = terrainPass.RockLayerHigh; + rockLayerLow = terrainPass.RockLayerLow; + worldSurface = terrainPass.WorldSurface; + worldSurfaceHigh = terrainPass.WorldSurfaceHigh; + WorldGen.worldSurfaceLow = terrainPass.WorldSurfaceLow; + WorldGen.waterLine = terrainPass.WaterLine; + WorldGen.lavaLine = terrainPass.LavaLine; + }))); + WorldGen.AddGenerationPass("Dunes", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[1].Value; + int random = passConfig.Get("Count").GetRandom(WorldGen.genRand); + float num13 = passConfig.Get("ChanceOfPyramid"); + if (WorldGen.drunkWorldGen) + num13 = 1f; + float num14 = (float) Main.maxTilesX / 4200f; + PyrX = new int[random + 3]; + PyrY = new int[random + 3]; + DunesBiome biome = configuration.CreateBiome(); + for (int index3 = 0; index3 < random; ++index3) + { + progress.Set((float) index3 / (float) random); + Point origin = Point.Zero; + bool flag1 = false; + int num15 = 0; + bool flag2; + bool flag3; + bool flag4; + for (; !flag1; flag1 = !(flag2 | flag3 | flag4)) + { + origin = WorldGen.RandomWorldPoint(right: 500, left: 500); + flag2 = Math.Abs(origin.X - jungleOriginX) < (int) (600.0 * (double) num14); + flag3 = Math.Abs(origin.X - Main.maxTilesX / 2) < 300; + flag4 = origin.X > snowOriginLeft - 300 && origin.Y < snowOriginRight + 300; + ++num15; + if (num15 >= Main.maxTilesX) + flag2 = false; + if (num15 >= Main.maxTilesX * 2) + flag4 = false; + } + biome.Place(origin, structures); + if ((double) WorldGen.genRand.NextFloat() <= (double) num13) + { + int index4 = WorldGen.genRand.Next(origin.X - 200, origin.X + 200); + for (int index5 = 0; index5 < Main.maxTilesY; ++index5) + { + if (Main.tile[index4, index5].active()) + { + PyrX[numPyr] = index4; + PyrY[numPyr] = index5 + 20; + ++numPyr; + break; + } + } + } + } + })); + WorldGen.AddGenerationPass("Ocean Sand", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Language.GetTextValue("WorldGeneration.OceanSand"); + for (int index6 = 0; index6 < 3; ++index6) + { + progress.Set((float) index6 / 3f); + int num16 = WorldGen.genRand.Next(Main.maxTilesX); + while ((double) num16 > (double) Main.maxTilesX * 0.400000005960464 && (double) num16 < (double) Main.maxTilesX * 0.600000023841858) + num16 = WorldGen.genRand.Next(Main.maxTilesX); + int num17 = WorldGen.genRand.Next(35, 90); + if (index6 == 1) + { + float num18 = (float) (Main.maxTilesX / 4200); + num17 += (int) ((double) WorldGen.genRand.Next(20, 40) * (double) num18); + } + if (WorldGen.genRand.Next(3) == 0) + num17 *= 2; + if (index6 == 1) + num17 *= 2; + int num19 = num16 - num17; + int num20 = WorldGen.genRand.Next(35, 90); + if (WorldGen.genRand.Next(3) == 0) + num20 *= 2; + if (index6 == 1) + num20 *= 2; + int num21 = num16 + num20; + if (num19 < 0) + num19 = 0; + if (num21 > Main.maxTilesX) + num21 = Main.maxTilesX; + switch (index6) + { + case 0: + num19 = 0; + num21 = leftBeachEnd; + break; + case 1: + continue; + case 2: + num19 = rightBeachStart; + num21 = Main.maxTilesX; + break; + } + int num22 = WorldGen.genRand.Next(50, 100); + for (int index7 = num19; index7 < num21; ++index7) + { + if (WorldGen.genRand.Next(2) == 0) + { + num22 += WorldGen.genRand.Next(-1, 2); + if (num22 < 50) + num22 = 50; + if (num22 > 200) + num22 = 200; + } + for (int index8 = 0; (double) index8 < (Main.worldSurface + Main.rockLayer) / 2.0; ++index8) + { + if (Main.tile[index7, index8].active()) + { + if (index7 == (num19 + num21) / 2 && WorldGen.genRand.Next(6) == 0) + { + PyrX[numPyr] = index7; + PyrY[numPyr] = index8; + ++numPyr; + } + int num23 = num22; + if (index7 - num19 < num23) + num23 = index7 - num19; + if (num21 - index7 < num23) + num23 = num21 - index7; + int num24 = num23 + WorldGen.genRand.Next(5); + for (int index9 = index8; index9 < index8 + num24; ++index9) + { + if (index7 > num19 + WorldGen.genRand.Next(5) && index7 < num21 - WorldGen.genRand.Next(5)) + Main.tile[index7, index9].type = (ushort) 53; + } + break; + } + } + } + } + })); + WorldGen.AddGenerationPass("Sand Patches", (WorldGenLegacyMethod) ((progress, passConfig) => + { + int num25 = (int) ((double) Main.maxTilesX * 0.0130000002682209); + for (int index = 0; index < num25; ++index) + { + int i = WorldGen.genRand.Next(0, Main.maxTilesX); + int j; + for (j = WorldGen.genRand.Next((int) Main.worldSurface, (int) Main.rockLayer); (double) i > (double) Main.maxTilesX * 0.46 && (double) i < (double) Main.maxTilesX * 0.54 && (double) j < Main.worldSurface + 150.0; j = WorldGen.genRand.Next((int) Main.worldSurface, (int) Main.rockLayer)) + i = WorldGen.genRand.Next(0, Main.maxTilesX); + WorldGen.TileRunner(i, j, (double) WorldGen.genRand.Next(15, 70), WorldGen.genRand.Next(20, 130), 53); + } + })); + WorldGen.AddGenerationPass("Tunnels", (WorldGenLegacyMethod) ((progress, passConfig) => + { + for (int index10 = 0; index10 < (int) ((double) Main.maxTilesX * 0.0015) && WorldGen.numTunnels < WorldGen.maxTunnels - 1; ++index10) + { + int[] numArray1 = new int[10]; + int[] numArray2 = new int[10]; + int num26 = WorldGen.genRand.Next(450, Main.maxTilesX - 450); + while ((double) num26 > (double) Main.maxTilesX * 0.4 && (double) num26 < (double) Main.maxTilesX * 0.6) + num26 = WorldGen.genRand.Next(450, Main.maxTilesX - 450); + int index11 = 0; + bool flag; + do + { + flag = false; + for (int index12 = 0; index12 < 10; ++index12) + { + int index13 = num26 % Main.maxTilesX; + while (!Main.tile[index13, index11].active()) + ++index11; + if (Main.tile[index13, index11].type == (ushort) 53) + flag = true; + numArray1[index12] = index13; + numArray2[index12] = index11 - WorldGen.genRand.Next(11, 16); + num26 = index13 + WorldGen.genRand.Next(5, 11); + } + } + while (flag); + WorldGen.tunnelX[WorldGen.numTunnels] = numArray1[5]; + ++WorldGen.numTunnels; + for (int index14 = 0; index14 < 10; ++index14) + { + WorldGen.TileRunner(numArray1[index14], numArray2[index14], (double) WorldGen.genRand.Next(5, 8), WorldGen.genRand.Next(6, 9), 0, true, -2f, -0.3f); + WorldGen.TileRunner(numArray1[index14], numArray2[index14], (double) WorldGen.genRand.Next(5, 8), WorldGen.genRand.Next(6, 9), 0, true, 2f, -0.3f); + } + } + })); + WorldGen.AddGenerationPass("Mount Caves", (WorldGenLegacyMethod) ((progress, passConfig) => + { + WorldGen.numMCaves = 0; + progress.Message = Lang.gen[2].Value; + for (int index15 = 0; index15 < (int) ((double) Main.maxTilesX * 0.001); ++index15) + { + progress.Set((float) ((double) index15 / (double) Main.maxTilesX * (1.0 / 1000.0))); + int num27 = 0; + bool flag5 = false; + bool flag6 = false; + int i = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.25), (int) ((double) Main.maxTilesX * 0.75)); + while (!flag6) + { + flag6 = true; + while (i > Main.maxTilesX / 2 - 90 && i < Main.maxTilesX / 2 + 90) + i = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.25), (int) ((double) Main.maxTilesX * 0.75)); + for (int index16 = 0; index16 < WorldGen.numMCaves; ++index16) + { + if (Math.Abs(i - WorldGen.mCaveX[index16]) < 100) + { + ++num27; + flag6 = false; + break; + } + } + if (num27 >= Main.maxTilesX / 5) + { + flag5 = true; + break; + } + } + if (!flag5) + { + for (int j = 0; (double) j < Main.worldSurface; ++j) + { + if (Main.tile[i, j].active()) + { + for (int index17 = i - 50; index17 < i + 50; ++index17) + { + for (int index18 = j - 25; index18 < j + 25; ++index18) + { + if (Main.tile[index17, index18].active() && (Main.tile[index17, index18].type == (ushort) 53 || Main.tile[index17, index18].type == (ushort) 151 || Main.tile[index17, index18].type == (ushort) 274)) + flag5 = true; + } + } + if (!flag5) + { + WorldGen.Mountinater(i, j); + WorldGen.mCaveX[WorldGen.numMCaves] = i; + WorldGen.mCaveY[WorldGen.numMCaves] = j; + ++WorldGen.numMCaves; + break; + } + } + } + } + } + })); + WorldGen.AddGenerationPass("Dirt Wall Backgrounds", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[3].Value; + for (int index19 = 1; index19 < Main.maxTilesX - 1; ++index19) + { + ushort num28 = 2; + float num29 = (float) index19 / (float) Main.maxTilesX; + progress.Set(num29); + bool flag = false; + howFar += WorldGen.genRand.Next(-1, 2); + if (howFar < 0) + howFar = 0; + if (howFar > 10) + howFar = 10; + for (int index20 = 0; (double) index20 < Main.worldSurface + 10.0 && (double) index20 <= Main.worldSurface + (double) howFar; ++index20) + { + if (Main.tile[index19, index20].active()) + num28 = Main.tile[index19, index20].type != (ushort) 147 ? (ushort) 2 : (ushort) 40; + if (flag && Main.tile[index19, index20].wall != (ushort) 64) + Main.tile[index19, index20].wall = num28; + if (Main.tile[index19, index20].active() && Main.tile[index19 - 1, index20].active() && Main.tile[index19 + 1, index20].active() && Main.tile[index19, index20 + 1].active() && Main.tile[index19 - 1, index20 + 1].active() && Main.tile[index19 + 1, index20 + 1].active()) + flag = true; + } + } + })); + WorldGen.AddGenerationPass("Rocks In Dirt", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[4].Value; + float num30 = (float) (Main.maxTilesX * Main.maxTilesY) * 0.00015f; + for (int index = 0; (double) index < (double) num30; ++index) + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next(0, (int) WorldGen.worldSurfaceLow + 1), (double) WorldGen.genRand.Next(4, 15), WorldGen.genRand.Next(5, 40), 1); + progress.Set(0.34f); + float num31 = (float) (Main.maxTilesX * Main.maxTilesY) * 0.0002f; + for (int index = 0; (double) index < (double) num31; ++index) + { + int i = WorldGen.genRand.Next(0, Main.maxTilesX); + int j = WorldGen.genRand.Next((int) WorldGen.worldSurfaceLow, (int) worldSurfaceHigh + 1); + if (!Main.tile[i, j - 10].active()) + j = WorldGen.genRand.Next((int) WorldGen.worldSurfaceLow, (int) worldSurfaceHigh + 1); + WorldGen.TileRunner(i, j, (double) WorldGen.genRand.Next(4, 10), WorldGen.genRand.Next(5, 30), 1); + } + progress.Set(0.67f); + float num32 = (float) (Main.maxTilesX * Main.maxTilesY) * 0.0045f; + for (int index = 0; (double) index < (double) num32; ++index) + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) worldSurfaceHigh, (int) rockLayerHigh + 1), (double) WorldGen.genRand.Next(2, 7), WorldGen.genRand.Next(2, 23), 1); + })); + WorldGen.AddGenerationPass("Dirt In Rocks", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[5].Value; + float num33 = (float) (Main.maxTilesX * Main.maxTilesY) * 0.005f; + for (int index = 0; (double) index < (double) num33; ++index) + { + progress.Set((float) index / num33); + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) rockLayerLow, Main.maxTilesY), (double) WorldGen.genRand.Next(2, 6), WorldGen.genRand.Next(2, 40), 0); + } + })); + WorldGen.AddGenerationPass("Clay", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[6].Value; + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 2E-05); ++index) + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next(0, (int) WorldGen.worldSurfaceLow), (double) WorldGen.genRand.Next(4, 14), WorldGen.genRand.Next(10, 50), 40); + progress.Set(0.25f); + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 5E-05); ++index) + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) WorldGen.worldSurfaceLow, (int) worldSurfaceHigh + 1), (double) WorldGen.genRand.Next(8, 14), WorldGen.genRand.Next(15, 45), 40); + progress.Set(0.5f); + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 2E-05); ++index) + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) worldSurfaceHigh, (int) rockLayerHigh + 1), (double) WorldGen.genRand.Next(8, 15), WorldGen.genRand.Next(5, 50), 40); + progress.Set(0.75f); + for (int index21 = 5; index21 < Main.maxTilesX - 5; ++index21) + { + for (int index22 = 1; (double) index22 < Main.worldSurface - 1.0; ++index22) + { + if (Main.tile[index21, index22].active()) + { + for (int index23 = index22; index23 < index22 + 5; ++index23) + { + if (Main.tile[index21, index23].type == (ushort) 40) + Main.tile[index21, index23].type = (ushort) 0; + } + break; + } + } + } + })); + int i2; + WorldGen.AddGenerationPass("Small Holes", (WorldGenLegacyMethod) ((progress, passConfig) => + { + i2 = 0; + progress.Message = Lang.gen[7].Value; + double num34 = worldSurfaceHigh; + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.0015); ++index) + { + float num35 = (float) index / ((float) (Main.maxTilesX * Main.maxTilesY) * 0.0015f); + progress.Set(num35); + int type = -1; + if (WorldGen.genRand.Next(5) == 0) + type = -2; + int i1 = WorldGen.genRand.Next(0, Main.maxTilesX); + int j1; + for (j1 = WorldGen.genRand.Next((int) worldSurfaceHigh, Main.maxTilesY); (i1 < smallHolesBeachAvoidance || i1 > Main.maxTilesX - smallHolesBeachAvoidance) && (double) j1 < num34 || (double) i1 > (double) Main.maxTilesX * 0.45 && (double) i1 < (double) Main.maxTilesX * 0.55 && (double) j1 < worldSurface; j1 = WorldGen.genRand.Next((int) worldSurfaceHigh, Main.maxTilesY)) + i1 = WorldGen.genRand.Next(0, Main.maxTilesX); + WorldGen.TileRunner(i1, j1, (double) WorldGen.genRand.Next(2, 5), WorldGen.genRand.Next(2, 20), type); + int i3 = WorldGen.genRand.Next(0, Main.maxTilesX); + int j2; + for (j2 = WorldGen.genRand.Next((int) worldSurfaceHigh, Main.maxTilesY); (i3 < smallHolesBeachAvoidance || i3 > Main.maxTilesX - smallHolesBeachAvoidance) && (double) j2 < num34 || (double) i3 > (double) Main.maxTilesX * 0.45 && (double) i3 < (double) Main.maxTilesX * 0.55 && (double) j2 < worldSurface; j2 = WorldGen.genRand.Next((int) worldSurfaceHigh, Main.maxTilesY)) + i3 = WorldGen.genRand.Next(0, Main.maxTilesX); + WorldGen.TileRunner(i3, j2, (double) WorldGen.genRand.Next(8, 15), WorldGen.genRand.Next(7, 30), type); + } + })); + WorldGen.AddGenerationPass("Dirt Layer Caves", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[8].Value; + double num36 = worldSurfaceHigh; + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 3E-05); ++index) + { + float num37 = (float) index / ((float) (Main.maxTilesX * Main.maxTilesY) * 3E-05f); + progress.Set(num37); + if (rockLayerHigh <= (double) Main.maxTilesY) + { + int type = -1; + if (WorldGen.genRand.Next(6) == 0) + type = -2; + int i = WorldGen.genRand.Next(0, Main.maxTilesX); + int j; + for (j = WorldGen.genRand.Next((int) WorldGen.worldSurfaceLow, (int) rockLayerHigh + 1); (i < smallHolesBeachAvoidance || i > Main.maxTilesX - smallHolesBeachAvoidance) && (double) j < num36 || (double) i >= (double) Main.maxTilesX * 0.45 && (double) i <= (double) Main.maxTilesX * 0.55 && (double) j < Main.worldSurface; j = WorldGen.genRand.Next((int) WorldGen.worldSurfaceLow, (int) rockLayerHigh + 1)) + i = WorldGen.genRand.Next(0, Main.maxTilesX); + WorldGen.TileRunner(i, j, (double) WorldGen.genRand.Next(5, 15), WorldGen.genRand.Next(30, 200), type); + } + } + })); + WorldGen.AddGenerationPass("Rock Layer Caves", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[9].Value; + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.00013); ++index) + { + float num38 = (float) index / ((float) (Main.maxTilesX * Main.maxTilesY) * 0.00013f); + progress.Set(num38); + if (rockLayerHigh <= (double) Main.maxTilesY) + { + int type = -1; + if (WorldGen.genRand.Next(10) == 0) + type = -2; + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) rockLayerHigh, Main.maxTilesY), (double) WorldGen.genRand.Next(6, 20), WorldGen.genRand.Next(50, 300), type); + } + } + })); + WorldGen.AddGenerationPass("Surface Caves", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[10].Value; + for (int index = 0; index < (int) ((double) Main.maxTilesX * 0.002); ++index) + { + i2 = WorldGen.genRand.Next(0, Main.maxTilesX); + while ((double) i2 > (double) Main.maxTilesX * 0.449999988079071 && (double) i2 < (double) Main.maxTilesX * 0.550000011920929 || i2 < leftBeachEnd + 20 || i2 > rightBeachStart - 20) + i2 = WorldGen.genRand.Next(0, Main.maxTilesX); + for (int j = 0; (double) j < worldSurfaceHigh; ++j) + { + if (Main.tile[i2, j].active()) + { + WorldGen.TileRunner(i2, j, (double) WorldGen.genRand.Next(3, 6), WorldGen.genRand.Next(5, 50), -1, speedX: ((float) WorldGen.genRand.Next(-10, 11) * 0.1f), speedY: 1f); + break; + } + } + } + progress.Set(0.2f); + for (int index = 0; index < (int) ((double) Main.maxTilesX * 0.0007); ++index) + { + i2 = WorldGen.genRand.Next(0, Main.maxTilesX); + while ((double) i2 > (double) Main.maxTilesX * 0.430000007152557 && (double) i2 < (double) Main.maxTilesX * 0.569999992847443 || i2 < leftBeachEnd + 20 || i2 > rightBeachStart - 20) + i2 = WorldGen.genRand.Next(0, Main.maxTilesX); + for (int j = 0; (double) j < worldSurfaceHigh; ++j) + { + if (Main.tile[i2, j].active()) + { + WorldGen.TileRunner(i2, j, (double) WorldGen.genRand.Next(10, 15), WorldGen.genRand.Next(50, 130), -1, speedX: ((float) WorldGen.genRand.Next(-10, 11) * 0.1f), speedY: 2f); + break; + } + } + } + progress.Set(0.4f); + for (int index = 0; index < (int) ((double) Main.maxTilesX * 0.0003); ++index) + { + i2 = WorldGen.genRand.Next(0, Main.maxTilesX); + while ((double) i2 > (double) Main.maxTilesX * 0.400000005960464 && (double) i2 < (double) Main.maxTilesX * 0.600000023841858 || i2 < leftBeachEnd + 20 || i2 > rightBeachStart - 20) + i2 = WorldGen.genRand.Next(0, Main.maxTilesX); + for (int j = 0; (double) j < worldSurfaceHigh; ++j) + { + if (Main.tile[i2, j].active()) + { + WorldGen.TileRunner(i2, j, (double) WorldGen.genRand.Next(12, 25), WorldGen.genRand.Next(150, 500), -1, speedX: ((float) WorldGen.genRand.Next(-10, 11) * 0.1f), speedY: 4f); + WorldGen.TileRunner(i2, j, (double) WorldGen.genRand.Next(8, 17), WorldGen.genRand.Next(60, 200), -1, speedX: ((float) WorldGen.genRand.Next(-10, 11) * 0.1f), speedY: 2f); + WorldGen.TileRunner(i2, j, (double) WorldGen.genRand.Next(5, 13), WorldGen.genRand.Next(40, 170), -1, speedX: ((float) WorldGen.genRand.Next(-10, 11) * 0.1f), speedY: 2f); + break; + } + } + } + progress.Set(0.6f); + for (int index = 0; index < (int) ((double) Main.maxTilesX * 0.0004); ++index) + { + i2 = WorldGen.genRand.Next(0, Main.maxTilesX); + while ((double) i2 > (double) Main.maxTilesX * 0.400000005960464 && (double) i2 < (double) Main.maxTilesX * 0.600000023841858 || i2 < leftBeachEnd + 20 || i2 > rightBeachStart - 20) + i2 = WorldGen.genRand.Next(0, Main.maxTilesX); + for (int j = 0; (double) j < worldSurfaceHigh; ++j) + { + if (Main.tile[i2, j].active()) + { + WorldGen.TileRunner(i2, j, (double) WorldGen.genRand.Next(7, 12), WorldGen.genRand.Next(150, 250), -1, speedY: 1f, noYChange: true); + break; + } + } + } + progress.Set(0.8f); + float num39 = (float) (Main.maxTilesX / 4200); + for (int index = 0; (double) index < 5.0 * (double) num39; ++index) + { + try + { + WorldGen.Caverer(WorldGen.genRand.Next(surfaceCavesBeachAvoidance2, Main.maxTilesX - surfaceCavesBeachAvoidance2), WorldGen.genRand.Next((int) Main.rockLayer, Main.maxTilesY - 400)); + } + catch + { + } + } + })); + WorldGen.AddGenerationPass("Generate Ice Biome", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[56].Value; + snowTop = (int) Main.worldSurface; + int num40 = WorldGen.lavaLine - WorldGen.genRand.Next(160, 200); + int num41 = snowOriginLeft; + int num42 = snowOriginRight; + int num43 = 10; + for (int index24 = 0; index24 <= WorldGen.lavaLine - 140; ++index24) + { + progress.Set((float) index24 / (float) (WorldGen.lavaLine - 140)); + num41 += WorldGen.genRand.Next(-4, 4); + num42 += WorldGen.genRand.Next(-3, 5); + if (index24 > 0) + { + num41 = (num41 + snowMinX[index24 - 1]) / 2; + num42 = (num42 + snowMaxX[index24 - 1]) / 2; + } + if (dungeonSide > 0) + { + if (WorldGen.genRand.Next(4) == 0) + { + ++num41; + ++num42; + } + } + else if (WorldGen.genRand.Next(4) == 0) + { + --num41; + --num42; + } + snowMinX[index24] = num41; + snowMaxX[index24] = num42; + for (int index25 = num41; index25 < num42; ++index25) + { + if (index24 < num40) + { + if (Main.tile[index25, index24].wall == (ushort) 2) + Main.tile[index25, index24].wall = (ushort) 40; + switch (Main.tile[index25, index24].type) + { + case 0: + case 2: + case 23: + case 40: + case 53: + Main.tile[index25, index24].type = (ushort) 147; + continue; + case 1: + Main.tile[index25, index24].type = (ushort) 161; + continue; + default: + continue; + } + } + else + { + num43 += WorldGen.genRand.Next(-3, 4); + if (WorldGen.genRand.Next(3) == 0) + { + num43 += WorldGen.genRand.Next(-4, 5); + if (WorldGen.genRand.Next(3) == 0) + num43 += WorldGen.genRand.Next(-6, 7); + } + if (num43 < 0) + num43 = WorldGen.genRand.Next(3); + else if (num43 > 50) + num43 = 50 - WorldGen.genRand.Next(3); + for (int index26 = index24; index26 < index24 + num43; ++index26) + { + if (Main.tile[index25, index26].wall == (ushort) 2) + Main.tile[index25, index26].wall = (ushort) 40; + switch (Main.tile[index25, index26].type) + { + case 0: + case 2: + case 23: + case 40: + case 53: + Main.tile[index25, index26].type = (ushort) 147; + break; + case 1: + Main.tile[index25, index26].type = (ushort) 161; + break; + } + } + } + } + if (snowBottom < index24) + snowBottom = index24; + } + })); + WorldGen.AddGenerationPass("Grass", (WorldGenLegacyMethod) ((progress, passConfig) => + { + float num44 = (float) (Main.maxTilesX * Main.maxTilesY) * (1f / 500f); + for (int index27 = 0; (double) index27 < (double) num44; ++index27) + { + progress.Set((float) index27 / num44); + int index28 = WorldGen.genRand.Next(1, Main.maxTilesX - 1); + int index29 = WorldGen.genRand.Next((int) WorldGen.worldSurfaceLow, (int) worldSurfaceHigh); + if (index29 >= Main.maxTilesY) + index29 = Main.maxTilesY - 2; + if (Main.tile[index28 - 1, index29].active() && Main.tile[index28 - 1, index29].type == (ushort) 0 && Main.tile[index28 + 1, index29].active() && Main.tile[index28 + 1, index29].type == (ushort) 0 && Main.tile[index28, index29 - 1].active() && Main.tile[index28, index29 - 1].type == (ushort) 0 && Main.tile[index28, index29 + 1].active() && Main.tile[index28, index29 + 1].type == (ushort) 0) + { + Main.tile[index28, index29].active(true); + Main.tile[index28, index29].type = (ushort) 2; + } + int index30 = WorldGen.genRand.Next(1, Main.maxTilesX - 1); + int index31 = WorldGen.genRand.Next(0, (int) WorldGen.worldSurfaceLow); + if (index31 >= Main.maxTilesY) + index31 = Main.maxTilesY - 2; + if (Main.tile[index30 - 1, index31].active() && Main.tile[index30 - 1, index31].type == (ushort) 0 && Main.tile[index30 + 1, index31].active() && Main.tile[index30 + 1, index31].type == (ushort) 0 && Main.tile[index30, index31 - 1].active() && Main.tile[index30, index31 - 1].type == (ushort) 0 && Main.tile[index30, index31 + 1].active() && Main.tile[index30, index31 + 1].type == (ushort) 0) + { + Main.tile[index30, index31].active(true); + Main.tile[index30, index31].type = (ushort) 2; + } + } + })); + WorldGen.AddGenerationPass(new JunglePass().OnBegin((Action) (pass => + { + JunglePass junglePass = pass as JunglePass; + junglePass.JungleOriginX = jungleOriginX; + junglePass.DungeonSide = dungeonSide; + junglePass.WorldSurface = worldSurface; + junglePass.LeftBeachEnd = leftBeachEnd; + junglePass.RightBeachStart = rightBeachStart; + })).OnComplete((Action) (pass => WorldGen.JungleX = (pass as JunglePass).JungleX))); + WorldGen.AddGenerationPass("Mud Caves To Grass", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[77].Value; + WorldGen.NotTheBees(); + for (int i = 0; i < Main.maxTilesX; ++i) + { + for (int j = 0; j < Main.maxTilesY; ++j) + { + if (Main.tile[i, j].active()) + { + WorldGen.grassSpread = 0; + WorldGen.SpreadGrass(i, j, 59, 60); + } + progress.Set((float) (0.200000002980232 * ((double) (i * Main.maxTilesY + j) / (double) (Main.maxTilesX * Main.maxTilesY)))); + } + } + WorldGen.SmallConsecutivesFound = 0; + WorldGen.SmallConsecutivesEliminated = 0; + float num45 = (float) (Main.maxTilesX - 20); + for (int x = 10; x < Main.maxTilesX - 10; ++x) + { + WorldGen.ScanTileColumnAndRemoveClumps(x); + float num46 = (float) (x - 10) / num45; + progress.Set((float) (0.200000002980232 + (double) num46 * 0.800000011920929)); + } + })); + WorldGen.AddGenerationPass("Full Desert", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[78].Value; + Main.tileSolid[484] = false; + int num47 = 0; + int num48 = dungeonSide; + int maxValue = Main.maxTilesX / 2; + int num49 = WorldGen.genRand.Next(maxValue) / 8 + maxValue / 8; + int x = maxValue + num49 * -num48; + if (WorldGen.drunkWorldGen) + num48 *= -1; + int num50 = 0; + DesertBiome biome = configuration.CreateBiome(); + while (!biome.Place(new Point(x, (int) worldSurfaceHigh + 25), structures)) + { + int num51 = WorldGen.genRand.Next(maxValue) / 2 + maxValue / 8 + WorldGen.genRand.Next(num50 / 12); + x = maxValue + num51 * -num48; + if (++num50 > Main.maxTilesX / 4) + { + num48 *= -1; + num50 = 0; + ++num47; + if (num47 >= 2) + WorldGen.skipDesertTileCheck = true; + } + } + })); + WorldGen.AddGenerationPass("Floating Islands", (WorldGenLegacyMethod) ((progress, passConfig) => + { + WorldGen.numIslandHouses = 0; + WorldGen.houseCount = 0; + progress.Message = Lang.gen[12].Value; + int num52 = (int) ((double) Main.maxTilesX * 0.0008); + int num53 = 0; + float num54 = (float) (num52 + skyLakes); + for (int index32 = 0; (double) index32 < (double) num54; ++index32) + { + progress.Set((float) index32 / num54); + int num55 = Main.maxTilesX; + while (--num55 > 0) + { + bool flag7 = true; + int i = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.1), (int) ((double) Main.maxTilesX * 0.9)); + while (i > Main.maxTilesX / 2 - 150 && i < Main.maxTilesX / 2 + 150) + i = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.1), (int) ((double) Main.maxTilesX * 0.9)); + for (int index33 = 0; index33 < WorldGen.numIslandHouses; ++index33) + { + if (i > WorldGen.floatingIslandHouseX[index33] - 180 && i < WorldGen.floatingIslandHouseX[index33] + 180) + { + flag7 = false; + break; + } + } + if (flag7) + { + bool flag8 = false; + int num56 = 0; + for (int index34 = 200; (double) index34 < Main.worldSurface; ++index34) + { + if (Main.tile[i, index34].active()) + { + num56 = index34; + flag8 = true; + break; + } + } + if (flag8) + { + int num57 = 0; + num55 = -1; + int j = Math.Min(WorldGen.genRand.Next(90, num56 - 100), (int) WorldGen.worldSurfaceLow - 50); + if (num53 >= num52) + { + WorldGen.skyLake[WorldGen.numIslandHouses] = true; + WorldGen.CloudLake(i, j); + } + else + { + WorldGen.skyLake[WorldGen.numIslandHouses] = false; + if (WorldGen.drunkWorldGen) + { + if (WorldGen.genRand.Next(2) == 0) + { + num57 = 3; + WorldGen.SnowCloudIsland(i, j); + } + else + { + num57 = 1; + WorldGen.DesertCloudIsland(i, j); + } + } + else + { + if (WorldGen.getGoodWorldGen) + num57 = !WorldGen.crimson ? 4 : 5; + WorldGen.CloudIsland(i, j); + } + } + WorldGen.floatingIslandHouseX[WorldGen.numIslandHouses] = i; + WorldGen.floatingIslandHouseY[WorldGen.numIslandHouses] = j; + WorldGen.floatingIslandStyle[WorldGen.numIslandHouses] = num57; + ++WorldGen.numIslandHouses; + ++num53; + } + } + } + } + })); + WorldGen.AddGenerationPass("Mushroom Patches", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[13].Value; + float num58 = (float) (Main.maxTilesX / 700); + if ((double) num58 > (double) WorldGen.maxMushroomBiomes) + num58 = (float) WorldGen.maxMushroomBiomes; + for (int index35 = 0; (double) index35 < (double) num58; ++index35) + { + int num59 = 0; + bool flag = true; + while (flag) + { + int i = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.2), (int) ((double) Main.maxTilesX * 0.8)); + if (num59 > Main.maxTilesX / 4) + i = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.25), (int) ((double) Main.maxTilesX * 0.975)); + int j = WorldGen.genRand.Next((int) Main.rockLayer + 50, Main.maxTilesY - 300); + flag = false; + int num60 = 100; + int num61 = 500; + for (int x = i - num60; x < i + num60; x += 3) + { + for (int y = j - num60; y < j + num60; y += 3) + { + if (WorldGen.InWorld(x, y)) + { + if (Main.tile[x, y].type == (ushort) 147 || Main.tile[x, y].type == (ushort) 161 || Main.tile[x, y].type == (ushort) 162 || Main.tile[x, y].type == (ushort) 60 || Main.tile[x, y].type == (ushort) 368 || Main.tile[x, y].type == (ushort) 367) + { + flag = true; + break; + } + if (WorldGen.UndergroundDesertLocation.Contains(new Point(x, y))) + { + flag = true; + break; + } + } + else + flag = true; + } + } + if (!flag) + { + for (int index36 = 0; index36 < WorldGen.numMushroomBiomes; ++index36) + { + if ((double) Vector2.Distance(WorldGen.mushroomBiomesPosition[index36], new Vector2((float) i, (float) j)) < (double) num61) + flag = true; + } + } + if (!flag && WorldGen.numMushroomBiomes < WorldGen.maxMushroomBiomes) + { + WorldGen.ShroomPatch(i, j); + for (int index37 = 0; index37 < 5; ++index37) + WorldGen.ShroomPatch(i + WorldGen.genRand.Next(-40, 41), j + WorldGen.genRand.Next(-40, 41)); + WorldGen.mushroomBiomesPosition[WorldGen.numMushroomBiomes].X = (float) i; + WorldGen.mushroomBiomesPosition[WorldGen.numMushroomBiomes].Y = (float) j; + ++WorldGen.numMushroomBiomes; + } + ++num59; + if (num59 > Main.maxTilesX / 2) + break; + } + } + for (int index = 0; index < Main.maxTilesX; ++index) + { + progress.Set((float) index / (float) Main.maxTilesX); + for (int worldSurface1 = (int) Main.worldSurface; worldSurface1 < Main.maxTilesY; ++worldSurface1) + { + if (WorldGen.InWorld(index, worldSurface1, 50) && Main.tile[index, worldSurface1].active()) + { + WorldGen.grassSpread = 0; + WorldGen.SpreadGrass(index, worldSurface1, 59, 70, false); + } + } + } + for (int index38 = 0; index38 < Main.maxTilesX; ++index38) + { + for (int worldSurface2 = (int) Main.worldSurface; worldSurface2 < Main.maxTilesY; ++worldSurface2) + { + if (Main.tile[index38, worldSurface2].active() && Main.tile[index38, worldSurface2].type == (ushort) 70) + { + int Type = 59; + for (int i = index38 - 1; i <= index38 + 1; ++i) + { + for (int j = worldSurface2 - 1; j <= worldSurface2 + 1; ++j) + { + if (Main.tile[i, j].active()) + { + if (!Main.tile[i - 1, j].active() && !Main.tile[i + 1, j].active()) + WorldGen.KillTile(i, j); + else if (!Main.tile[i, j - 1].active() && !Main.tile[i, j + 1].active()) + WorldGen.KillTile(i, j); + } + else if (Main.tile[i - 1, j].active() && Main.tile[i + 1, j].active()) + { + WorldGen.PlaceTile(i, j, Type); + if (Main.tile[i - 1, worldSurface2].type == (ushort) 70) + Main.tile[i - 1, worldSurface2].type = (ushort) 59; + if (Main.tile[i + 1, worldSurface2].type == (ushort) 70) + Main.tile[i + 1, worldSurface2].type = (ushort) 59; + } + else if (Main.tile[i, j - 1].active() && Main.tile[i, j + 1].active()) + { + WorldGen.PlaceTile(i, j, Type); + if (Main.tile[i, worldSurface2 - 1].type == (ushort) 70) + Main.tile[i, worldSurface2 - 1].type = (ushort) 59; + if (Main.tile[i, worldSurface2 + 1].type == (ushort) 70) + Main.tile[i, worldSurface2 + 1].type = (ushort) 59; + } + } + } + if (WorldGen.genRand.Next(4) == 0) + { + int index39 = index38 + WorldGen.genRand.Next(-20, 21); + int index40 = worldSurface2 + WorldGen.genRand.Next(-20, 21); + if (Main.tile[index39, index40].type == (ushort) 59) + Main.tile[index39, index40].type = (ushort) 70; + } + } + } + } + })); + WorldGen.AddGenerationPass("Marble", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[80].Value; + int random = passConfig.Get("Count").GetRandom(WorldGen.genRand); + float num62 = (float) (Main.maxTilesX - 160) / (float) random; + MarbleBiome biome = configuration.CreateBiome(); + int num63 = 0; + int num64 = 0; + while (num64 < random) + { + float num65 = (float) num64 / (float) random; + progress.Set(num65); + Point origin = WorldGen.RandomRectanglePoint((int) ((double) num65 * (double) (Main.maxTilesX - 160)) + 80, (int) rockLayer + 20, (int) num62, Main.maxTilesY - ((int) rockLayer + 40) - 200); + while ((double) origin.X > (double) Main.maxTilesX * 0.45 && (double) origin.X < (double) Main.maxTilesX * 0.55) + origin.X = WorldGen.genRand.Next(WorldGen.beachDistance, Main.maxTilesX - WorldGen.beachDistance); + ++num63; + if (biome.Place(origin, structures) || num63 > Main.maxTilesX) + { + ++num64; + num63 = 0; + } + } + })); + WorldGen.AddGenerationPass("Granite", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[81].Value; + int random = passConfig.Get("Count").GetRandom(WorldGen.genRand); + float num66 = (float) (Main.maxTilesX - 200) / (float) random; + List pointList = new List(random); + int num67 = 0; + int num68 = 0; + while (num68 < random) + { + float num69 = (float) num68 / (float) random; + progress.Set(num69); + Point origin = WorldGen.RandomRectanglePoint((int) ((double) num69 * (double) (Main.maxTilesX - 200)) + 100, (int) rockLayer + 20, (int) num66, Main.maxTilesY - ((int) rockLayer + 40) - 200); + while ((double) origin.X > (double) Main.maxTilesX * 0.45 && (double) origin.X < (double) Main.maxTilesX * 0.55) + origin.X = WorldGen.genRand.Next(WorldGen.beachDistance, Main.maxTilesX - WorldGen.beachDistance); + ++num67; + if (GraniteBiome.CanPlace(origin, structures)) + { + pointList.Add(origin); + ++num68; + } + else if (num67 > Main.maxTilesX) + { + ++num68; + num67 = 0; + } + } + GraniteBiome biome = configuration.CreateBiome(); + for (int index = 0; index < random; ++index) + biome.Place(pointList[index], structures); + })); + WorldGen.AddGenerationPass("Dirt To Mud", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[14].Value; + float num70 = (float) (Main.maxTilesX * Main.maxTilesY) * (1f / 1000f); + for (int index = 0; (double) index < (double) num70; ++index) + { + progress.Set((float) index / num70); + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) rockLayerLow, Main.maxTilesY), (double) WorldGen.genRand.Next(2, 6), WorldGen.genRand.Next(2, 40), 59, ignoreTileType: 53); + } + })); + WorldGen.AddGenerationPass("Silt", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[15].Value; + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.0001); ++index) + { + int i = WorldGen.genRand.Next(0, Main.maxTilesX); + int j = WorldGen.genRand.Next((int) rockLayerHigh, Main.maxTilesY); + if (Main.tile[i, j].wall != (ushort) 187 && Main.tile[i, j].wall != (ushort) 216) + WorldGen.TileRunner(i, j, (double) WorldGen.genRand.Next(5, 12), WorldGen.genRand.Next(15, 50), 123); + } + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.0005); ++index) + { + int i = WorldGen.genRand.Next(0, Main.maxTilesX); + int j = WorldGen.genRand.Next((int) rockLayerHigh, Main.maxTilesY); + if (Main.tile[i, j].wall != (ushort) 187 && Main.tile[i, j].wall != (ushort) 216) + WorldGen.TileRunner(i, j, (double) WorldGen.genRand.Next(2, 5), WorldGen.genRand.Next(2, 5), 123); + } + })); + WorldGen.AddGenerationPass("Shinies", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[16].Value; + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 6E-05); ++index) + { + if (WorldGen.drunkWorldGen) + copper = WorldGen.genRand.Next(2) != 0 ? 166 : 7; + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) WorldGen.worldSurfaceLow, (int) worldSurfaceHigh), (double) WorldGen.genRand.Next(3, 6), WorldGen.genRand.Next(2, 6), copper); + } + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 8E-05); ++index) + { + if (WorldGen.drunkWorldGen) + copper = WorldGen.genRand.Next(2) != 0 ? 166 : 7; + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) worldSurfaceHigh, (int) rockLayerHigh), (double) WorldGen.genRand.Next(3, 7), WorldGen.genRand.Next(3, 7), copper); + } + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.0002); ++index) + { + if (WorldGen.drunkWorldGen) + copper = WorldGen.genRand.Next(2) != 0 ? 166 : 7; + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) rockLayerLow, Main.maxTilesY), (double) WorldGen.genRand.Next(4, 9), WorldGen.genRand.Next(4, 8), copper); + } + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 3E-05); ++index) + { + if (WorldGen.drunkWorldGen) + iron = WorldGen.genRand.Next(2) != 0 ? 167 : 6; + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) WorldGen.worldSurfaceLow, (int) worldSurfaceHigh), (double) WorldGen.genRand.Next(3, 7), WorldGen.genRand.Next(2, 5), iron); + } + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 8E-05); ++index) + { + if (WorldGen.drunkWorldGen) + iron = WorldGen.genRand.Next(2) != 0 ? 167 : 6; + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) worldSurfaceHigh, (int) rockLayerHigh), (double) WorldGen.genRand.Next(3, 6), WorldGen.genRand.Next(3, 6), iron); + } + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.0002); ++index) + { + if (WorldGen.drunkWorldGen) + iron = WorldGen.genRand.Next(2) != 0 ? 167 : 6; + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) rockLayerLow, Main.maxTilesY), (double) WorldGen.genRand.Next(4, 9), WorldGen.genRand.Next(4, 8), iron); + } + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 2.6E-05); ++index) + { + if (WorldGen.drunkWorldGen) + silver = WorldGen.genRand.Next(2) != 0 ? 168 : 9; + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) worldSurfaceHigh, (int) rockLayerHigh), (double) WorldGen.genRand.Next(3, 6), WorldGen.genRand.Next(3, 6), silver); + } + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.00015); ++index) + { + if (WorldGen.drunkWorldGen) + silver = WorldGen.genRand.Next(2) != 0 ? 168 : 9; + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) rockLayerLow, Main.maxTilesY), (double) WorldGen.genRand.Next(4, 9), WorldGen.genRand.Next(4, 8), silver); + } + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.00017); ++index) + { + if (WorldGen.drunkWorldGen) + silver = WorldGen.genRand.Next(2) != 0 ? 168 : 9; + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next(0, (int) WorldGen.worldSurfaceLow), (double) WorldGen.genRand.Next(4, 9), WorldGen.genRand.Next(4, 8), silver); + } + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.00012); ++index) + { + if (WorldGen.drunkWorldGen) + gold = WorldGen.genRand.Next(2) != 0 ? 169 : 8; + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) rockLayerLow, Main.maxTilesY), (double) WorldGen.genRand.Next(4, 8), WorldGen.genRand.Next(4, 8), gold); + } + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.00012); ++index) + { + if (WorldGen.drunkWorldGen) + gold = WorldGen.genRand.Next(2) != 0 ? 169 : 8; + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next(0, (int) WorldGen.worldSurfaceLow - 20), (double) WorldGen.genRand.Next(4, 8), WorldGen.genRand.Next(4, 8), gold); + } + if (WorldGen.drunkWorldGen) + { + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 2.25E-05 / 2.0); ++index) + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) Main.rockLayer, Main.maxTilesY), (double) WorldGen.genRand.Next(3, 6), WorldGen.genRand.Next(4, 8), 204); + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 2.25E-05 / 2.0); ++index) + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) Main.rockLayer, Main.maxTilesY), (double) WorldGen.genRand.Next(3, 6), WorldGen.genRand.Next(4, 8), 22); + } + if (WorldGen.crimson) + { + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 2.25E-05); ++index) + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) Main.rockLayer, Main.maxTilesY), (double) WorldGen.genRand.Next(3, 6), WorldGen.genRand.Next(4, 8), 204); + } + else + { + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 2.25E-05); ++index) + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int) Main.rockLayer, Main.maxTilesY), (double) WorldGen.genRand.Next(3, 6), WorldGen.genRand.Next(4, 8), 22); + } + })); + WorldGen.AddGenerationPass("Webs", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[17].Value; + for (int index41 = 0; index41 < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.0006); ++index41) + { + int index42 = WorldGen.genRand.Next(20, Main.maxTilesX - 20); + int index43 = WorldGen.genRand.Next((int) worldSurfaceHigh, Main.maxTilesY - 20); + if (index41 < WorldGen.numMCaves) + { + index42 = WorldGen.mCaveX[index41]; + index43 = WorldGen.mCaveY[index41]; + } + if (!Main.tile[index42, index43].active() && ((double) index43 > Main.worldSurface || Main.tile[index42, index43].wall > (ushort) 0)) + { + while (!Main.tile[index42, index43].active() && index43 > (int) WorldGen.worldSurfaceLow) + --index43; + int j = index43 + 1; + int num71 = 1; + if (WorldGen.genRand.Next(2) == 0) + num71 = -1; + while (!Main.tile[index42, j].active() && index42 > 10 && index42 < Main.maxTilesX - 10) + index42 += num71; + int i = index42 - num71; + if ((double) j > Main.worldSurface || Main.tile[i, j].wall > (ushort) 0) + WorldGen.TileRunner(i, j, (double) WorldGen.genRand.Next(4, 11), WorldGen.genRand.Next(2, 4), 51, true, (float) num71, -1f, overRide: false); + } + } + })); + WorldGen.AddGenerationPass("Underworld", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[18].Value; + progress.Set(0.0f); + int num72 = Main.maxTilesY - WorldGen.genRand.Next(150, 190); + for (int index44 = 0; index44 < Main.maxTilesX; ++index44) + { + num72 += WorldGen.genRand.Next(-3, 4); + if (num72 < Main.maxTilesY - 190) + num72 = Main.maxTilesY - 190; + if (num72 > Main.maxTilesY - 160) + num72 = Main.maxTilesY - 160; + for (int index45 = num72 - 20 - WorldGen.genRand.Next(3); index45 < Main.maxTilesY; ++index45) + { + if (index45 >= num72) + { + Main.tile[index44, index45].active(false); + Main.tile[index44, index45].lava(false); + Main.tile[index44, index45].liquid = (byte) 0; + } + else + Main.tile[index44, index45].type = (ushort) 57; + } + } + int num73 = Main.maxTilesY - WorldGen.genRand.Next(40, 70); + for (int index46 = 10; index46 < Main.maxTilesX - 10; ++index46) + { + num73 += WorldGen.genRand.Next(-10, 11); + if (num73 > Main.maxTilesY - 60) + num73 = Main.maxTilesY - 60; + if (num73 < Main.maxTilesY - 100) + num73 = Main.maxTilesY - 120; + for (int index47 = num73; index47 < Main.maxTilesY - 10; ++index47) + { + if (!Main.tile[index46, index47].active()) + { + Main.tile[index46, index47].lava(true); + Main.tile[index46, index47].liquid = byte.MaxValue; + } + } + } + for (int index48 = 0; index48 < Main.maxTilesX; ++index48) + { + if (WorldGen.genRand.Next(50) == 0) + { + int index49 = Main.maxTilesY - 65; + while (!Main.tile[index48, index49].active() && index49 > Main.maxTilesY - 135) + --index49; + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), index49 + WorldGen.genRand.Next(20, 50), (double) WorldGen.genRand.Next(15, 20), 1000, 57, true, speedY: ((float) WorldGen.genRand.Next(1, 3)), noYChange: true); + } + } + Liquid.QuickWater(-2); + for (int i = 0; i < Main.maxTilesX; ++i) + { + float num74 = (float) i / (float) (Main.maxTilesX - 1); + progress.Set((float) ((double) num74 / 2.0 + 0.5)); + if (WorldGen.genRand.Next(13) == 0) + { + int index = Main.maxTilesY - 65; + while ((Main.tile[i, index].liquid > (byte) 0 || Main.tile[i, index].active()) && index > Main.maxTilesY - 140) + --index; + if (!WorldGen.drunkWorldGen || WorldGen.genRand.Next(3) == 0 || (double) i <= (double) Main.maxTilesX * 0.4 || (double) i >= (double) Main.maxTilesX * 0.6) + WorldGen.TileRunner(i, index - WorldGen.genRand.Next(2, 5), (double) WorldGen.genRand.Next(5, 30), 1000, 57, true, speedY: ((float) WorldGen.genRand.Next(1, 3)), noYChange: true); + float num75 = (float) WorldGen.genRand.Next(1, 3); + if (WorldGen.genRand.Next(3) == 0) + num75 *= 0.5f; + if (!WorldGen.drunkWorldGen || WorldGen.genRand.Next(3) == 0 || (double) i <= (double) Main.maxTilesX * 0.4 || (double) i >= (double) Main.maxTilesX * 0.6) + { + if (WorldGen.genRand.Next(2) == 0) + WorldGen.TileRunner(i, index - WorldGen.genRand.Next(2, 5), (double) (int) ((double) WorldGen.genRand.Next(5, 15) * (double) num75), (int) ((double) WorldGen.genRand.Next(10, 15) * (double) num75), 57, true, 1f, 0.3f); + if (WorldGen.genRand.Next(2) == 0) + { + float num76 = (float) WorldGen.genRand.Next(1, 3); + WorldGen.TileRunner(i, index - WorldGen.genRand.Next(2, 5), (double) (int) ((double) WorldGen.genRand.Next(5, 15) * (double) num76), (int) ((double) WorldGen.genRand.Next(10, 15) * (double) num76), 57, true, -1f, 0.3f); + } + } + WorldGen.TileRunner(i + WorldGen.genRand.Next(-10, 10), index + WorldGen.genRand.Next(-10, 10), (double) WorldGen.genRand.Next(5, 15), WorldGen.genRand.Next(5, 10), -2, speedX: ((float) WorldGen.genRand.Next(-1, 3)), speedY: ((float) WorldGen.genRand.Next(-1, 3))); + if (WorldGen.genRand.Next(3) == 0) + WorldGen.TileRunner(i + WorldGen.genRand.Next(-10, 10), index + WorldGen.genRand.Next(-10, 10), (double) WorldGen.genRand.Next(10, 30), WorldGen.genRand.Next(10, 20), -2, speedX: ((float) WorldGen.genRand.Next(-1, 3)), speedY: ((float) WorldGen.genRand.Next(-1, 3))); + if (WorldGen.genRand.Next(5) == 0) + WorldGen.TileRunner(i + WorldGen.genRand.Next(-15, 15), index + WorldGen.genRand.Next(-15, 10), (double) WorldGen.genRand.Next(15, 30), WorldGen.genRand.Next(5, 20), -2, speedX: ((float) WorldGen.genRand.Next(-1, 3)), speedY: ((float) WorldGen.genRand.Next(-1, 3))); + } + } + for (int index = 0; index < Main.maxTilesX; ++index) + WorldGen.TileRunner(WorldGen.genRand.Next(20, Main.maxTilesX - 20), WorldGen.genRand.Next(Main.maxTilesY - 180, Main.maxTilesY - 10), (double) WorldGen.genRand.Next(2, 7), WorldGen.genRand.Next(2, 7), -2); + if (WorldGen.drunkWorldGen) + { + for (int index = 0; index < Main.maxTilesX * 2; ++index) + WorldGen.TileRunner(WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.35), (int) ((double) Main.maxTilesX * 0.65)), WorldGen.genRand.Next(Main.maxTilesY - 180, Main.maxTilesY - 10), (double) WorldGen.genRand.Next(5, 20), WorldGen.genRand.Next(5, 10), -2); + } + for (int index = 0; index < Main.maxTilesX; ++index) + { + if (!Main.tile[index, Main.maxTilesY - 145].active()) + { + Main.tile[index, Main.maxTilesY - 145].liquid = byte.MaxValue; + Main.tile[index, Main.maxTilesY - 145].lava(true); + } + if (!Main.tile[index, Main.maxTilesY - 144].active()) + { + Main.tile[index, Main.maxTilesY - 144].liquid = byte.MaxValue; + Main.tile[index, Main.maxTilesY - 144].lava(true); + } + } + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.0008); ++index) + WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next(Main.maxTilesY - 140, Main.maxTilesY), (double) WorldGen.genRand.Next(2, 7), WorldGen.genRand.Next(3, 7), 58); + WorldGen.AddHellHouses(); + })); + WorldGen.AddGenerationPass("Corruption", (WorldGenLegacyMethod) ((progress, passConfig) => + { + int num77 = Main.maxTilesX; + int num78 = 0; + int num79 = Main.maxTilesX; + int num80 = 0; + for (int index50 = 0; index50 < Main.maxTilesX; ++index50) + { + for (int index51 = 0; (double) index51 < Main.worldSurface; ++index51) + { + if (Main.tile[index50, index51].active()) + { + if (Main.tile[index50, index51].type == (ushort) 60) + { + if (index50 < num77) + num77 = index50; + if (index50 > num78) + num78 = index50; + } + else if (Main.tile[index50, index51].type == (ushort) 147 || Main.tile[index50, index51].type == (ushort) 161) + { + if (index50 < num79) + num79 = index50; + if (index50 > num80) + num80 = index50; + } + } + } + } + int num81 = 10; + int num82 = num77 - num81; + int num83 = num78 + num81; + int num84 = num79 - num81; + int num85 = num80 + num81; + int minValue = 500; + int num86 = 100; + bool flag9 = WorldGen.crimson; + bool flag10 = true; + double num87 = (double) Main.maxTilesX * 0.00045; + if (WorldGen.drunkWorldGen) + { + flag9 = true; + num87 /= 2.0; + if (WorldGen.genRand.Next(2) == 0) + flag10 = false; + } + if (flag9) + { + progress.Message = Lang.gen[72].Value; + for (int index52 = 0; (double) index52 < num87; ++index52) + { + int num88 = num84; + int num89 = num85; + int num90 = num82; + int num91 = num83; + float num92 = (float) index52 / (float) num87; + progress.Set(num92); + bool flag11 = false; + int i = 0; + int num93 = 0; + int num94 = 0; + while (!flag11) + { + flag11 = true; + int num95 = Main.maxTilesX / 2; + int num96 = 200; + if (WorldGen.drunkWorldGen) + { + num96 = 100; + i = !flag10 ? WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.5), Main.maxTilesX - minValue) : WorldGen.genRand.Next(minValue, (int) ((double) Main.maxTilesX * 0.5)); + } + else + i = WorldGen.genRand.Next(minValue, Main.maxTilesX - minValue); + num93 = i - WorldGen.genRand.Next(200) - 100; + num94 = i + WorldGen.genRand.Next(200) + 100; + if (num93 < evilBiomeBeachAvoidance) + num93 = evilBiomeBeachAvoidance; + if (num94 > Main.maxTilesX - evilBiomeBeachAvoidance) + num94 = Main.maxTilesX - evilBiomeBeachAvoidance; + if (i < num93 + evilBiomeAvoidanceMidFixer) + i = num93 + evilBiomeAvoidanceMidFixer; + if (i > num94 - evilBiomeAvoidanceMidFixer) + i = num94 - evilBiomeAvoidanceMidFixer; + if (dungeonSide < 0 && num93 < 400) + num93 = 400; + else if (dungeonSide > 0 && num93 > Main.maxTilesX - 400) + num93 = Main.maxTilesX - 400; + if (i > num95 - num96 && i < num95 + num96) + flag11 = false; + if (num93 > num95 - num96 && num93 < num95 + num96) + flag11 = false; + if (num94 > num95 - num96 && num94 < num95 + num96) + flag11 = false; + if (i > WorldGen.UndergroundDesertLocation.X && i < WorldGen.UndergroundDesertLocation.X + WorldGen.UndergroundDesertLocation.Width) + flag11 = false; + if (num93 > WorldGen.UndergroundDesertLocation.X && num93 < WorldGen.UndergroundDesertLocation.X + WorldGen.UndergroundDesertLocation.Width) + flag11 = false; + if (num94 > WorldGen.UndergroundDesertLocation.X && num94 < WorldGen.UndergroundDesertLocation.X + WorldGen.UndergroundDesertLocation.Width) + flag11 = false; + if (num93 < dungeonLocation + num86 && num94 > dungeonLocation - num86) + flag11 = false; + if (num93 < num89 && num94 > num88) + { + ++num88; + --num89; + flag11 = false; + } + if (num93 < num91 && num94 > num90) + { + ++num90; + --num91; + flag11 = false; + } + } + WorldGen.CrimStart(i, (int) WorldGen.worldSurfaceLow - 10); + for (int index53 = num93; index53 < num94; ++index53) + { + for (int worldSurfaceLow = (int) WorldGen.worldSurfaceLow; (double) worldSurfaceLow < Main.worldSurface - 1.0; ++worldSurfaceLow) + { + if (Main.tile[index53, worldSurfaceLow].active()) + { + int num97 = worldSurfaceLow + WorldGen.genRand.Next(10, 14); + for (int index54 = worldSurfaceLow; index54 < num97; ++index54) + { + if ((Main.tile[index53, index54].type == (ushort) 59 || Main.tile[index53, index54].type == (ushort) 60) && index53 >= num93 + WorldGen.genRand.Next(5) && index53 < num94 - WorldGen.genRand.Next(5)) + Main.tile[index53, index54].type = (ushort) 0; + } + break; + } + } + } + double num98 = Main.worldSurface + 40.0; + for (int index55 = num93; index55 < num94; ++index55) + { + num98 += (double) WorldGen.genRand.Next(-2, 3); + if (num98 < Main.worldSurface + 30.0) + num98 = Main.worldSurface + 30.0; + if (num98 > Main.worldSurface + 50.0) + num98 = Main.worldSurface + 50.0; + i2 = index55; + bool flag12 = false; + for (int worldSurfaceLow = (int) WorldGen.worldSurfaceLow; (double) worldSurfaceLow < num98; ++worldSurfaceLow) + { + if (Main.tile[i2, worldSurfaceLow].active()) + { + if (Main.tile[i2, worldSurfaceLow].type == (ushort) 53 && i2 >= num93 + WorldGen.genRand.Next(5) && i2 <= num94 - WorldGen.genRand.Next(5)) + Main.tile[i2, worldSurfaceLow].type = (ushort) 234; + if (Main.tile[i2, worldSurfaceLow].type == (ushort) 0 && (double) worldSurfaceLow < Main.worldSurface - 1.0 && !flag12) + { + WorldGen.grassSpread = 0; + WorldGen.SpreadGrass(i2, worldSurfaceLow, grass: 199); + } + flag12 = true; + if (Main.tile[i2, worldSurfaceLow].wall == (ushort) 216) + Main.tile[i2, worldSurfaceLow].wall = (ushort) 218; + else if (Main.tile[i2, worldSurfaceLow].wall == (ushort) 187) + Main.tile[i2, worldSurfaceLow].wall = (ushort) 221; + if (Main.tile[i2, worldSurfaceLow].type == (ushort) 1) + { + if (i2 >= num93 + WorldGen.genRand.Next(5) && i2 <= num94 - WorldGen.genRand.Next(5)) + Main.tile[i2, worldSurfaceLow].type = (ushort) 203; + } + else if (Main.tile[i2, worldSurfaceLow].type == (ushort) 2) + Main.tile[i2, worldSurfaceLow].type = (ushort) 199; + else if (Main.tile[i2, worldSurfaceLow].type == (ushort) 161) + Main.tile[i2, worldSurfaceLow].type = (ushort) 200; + else if (Main.tile[i2, worldSurfaceLow].type == (ushort) 396) + Main.tile[i2, worldSurfaceLow].type = (ushort) 401; + else if (Main.tile[i2, worldSurfaceLow].type == (ushort) 397) + Main.tile[i2, worldSurfaceLow].type = (ushort) 399; + } + } + } + int num99 = WorldGen.genRand.Next(10, 15); + for (int index56 = 0; index56 < num99; ++index56) + { + int num100 = 0; + bool flag13 = false; + int num101 = 0; + while (!flag13) + { + ++num100; + int x = WorldGen.genRand.Next(num93 - num101, num94 + num101); + int y; + for (y = WorldGen.genRand.Next((int) (Main.worldSurface - (double) (num101 / 2)), (int) (Main.worldSurface + 100.0 + (double) num101)); WorldGen.oceanDepths(x, y); y = WorldGen.genRand.Next((int) (Main.worldSurface - (double) (num101 / 2)), (int) (Main.worldSurface + 100.0 + (double) num101))) + x = WorldGen.genRand.Next(num93 - num101, num94 + num101); + if (num100 > 100) + { + ++num101; + num100 = 0; + } + if (!Main.tile[x, y].active()) + { + while (!Main.tile[x, y].active()) + ++y; + --y; + } + else + { + while (Main.tile[x, y].active() && (double) y > Main.worldSurface) + --y; + } + if ((num101 > 10 || Main.tile[x, y + 1].active() && Main.tile[x, y + 1].type == (ushort) 203) && !WorldGen.IsTileNearby(x, y, 26, 3)) + { + WorldGen.Place3x2(x, y, (ushort) 26, 1); + if (Main.tile[x, y].type == (ushort) 26) + flag13 = true; + } + if (num101 > 100) + flag13 = true; + } + } + } + WorldGen.CrimPlaceHearts(); + } + if (WorldGen.drunkWorldGen) + flag9 = false; + if (flag9) + return; + progress.Message = Lang.gen[20].Value; + for (int index57 = 0; (double) index57 < num87; ++index57) + { + int num102 = num84; + int num103 = num85; + int num104 = num82; + int num105 = num83; + float num106 = (float) index57 / (float) num87; + progress.Set(num106); + bool flag14 = false; + int num107 = 0; + int num108 = 0; + int num109 = 0; + while (!flag14) + { + flag14 = true; + int num110 = Main.maxTilesX / 2; + int num111 = 200; + num107 = !WorldGen.drunkWorldGen ? WorldGen.genRand.Next(minValue, Main.maxTilesX - minValue) : (flag10 ? WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.5), Main.maxTilesX - minValue) : WorldGen.genRand.Next(minValue, (int) ((double) Main.maxTilesX * 0.5))); + num108 = num107 - WorldGen.genRand.Next(200) - 100; + num109 = num107 + WorldGen.genRand.Next(200) + 100; + if (num108 < evilBiomeBeachAvoidance) + num108 = evilBiomeBeachAvoidance; + if (num109 > Main.maxTilesX - evilBiomeBeachAvoidance) + num109 = Main.maxTilesX - evilBiomeBeachAvoidance; + if (num107 < num108 + evilBiomeAvoidanceMidFixer) + num107 = num108 + evilBiomeAvoidanceMidFixer; + if (num107 > num109 - evilBiomeAvoidanceMidFixer) + num107 = num109 - evilBiomeAvoidanceMidFixer; + if (num107 > num110 - num111 && num107 < num110 + num111) + flag14 = false; + if (num108 > num110 - num111 && num108 < num110 + num111) + flag14 = false; + if (num109 > num110 - num111 && num109 < num110 + num111) + flag14 = false; + if (num107 > WorldGen.UndergroundDesertLocation.X && num107 < WorldGen.UndergroundDesertLocation.X + WorldGen.UndergroundDesertLocation.Width) + flag14 = false; + if (num108 > WorldGen.UndergroundDesertLocation.X && num108 < WorldGen.UndergroundDesertLocation.X + WorldGen.UndergroundDesertLocation.Width) + flag14 = false; + if (num109 > WorldGen.UndergroundDesertLocation.X && num109 < WorldGen.UndergroundDesertLocation.X + WorldGen.UndergroundDesertLocation.Width) + flag14 = false; + if (num108 < dungeonLocation + num86 && num109 > dungeonLocation - num86) + flag14 = false; + if (num108 < num103 && num109 > num102) + { + ++num102; + --num103; + flag14 = false; + } + if (num108 < num105 && num109 > num104) + { + ++num104; + --num105; + flag14 = false; + } + } + int num112 = 0; + for (int i = num108; i < num109; ++i) + { + if (num112 > 0) + --num112; + if (i == num107 || num112 == 0) + { + for (int worldSurfaceLow = (int) WorldGen.worldSurfaceLow; (double) worldSurfaceLow < Main.worldSurface - 1.0; ++worldSurfaceLow) + { + if (Main.tile[i, worldSurfaceLow].active() || Main.tile[i, worldSurfaceLow].wall > (ushort) 0) + { + if (i == num107) + { + num112 = 20; + WorldGen.ChasmRunner(i, worldSurfaceLow, WorldGen.genRand.Next(150) + 150, true); + break; + } + if (WorldGen.genRand.Next(35) == 0 && num112 == 0) + { + num112 = 30; + bool makeOrb = true; + WorldGen.ChasmRunner(i, worldSurfaceLow, WorldGen.genRand.Next(50) + 50, makeOrb); + break; + } + break; + } + } + } + for (int worldSurfaceLow = (int) WorldGen.worldSurfaceLow; (double) worldSurfaceLow < Main.worldSurface - 1.0; ++worldSurfaceLow) + { + if (Main.tile[i, worldSurfaceLow].active()) + { + int num113 = worldSurfaceLow + WorldGen.genRand.Next(10, 14); + for (int index58 = worldSurfaceLow; index58 < num113; ++index58) + { + if ((Main.tile[i, index58].type == (ushort) 59 || Main.tile[i, index58].type == (ushort) 60) && i >= num108 + WorldGen.genRand.Next(5) && i < num109 - WorldGen.genRand.Next(5)) + Main.tile[i, index58].type = (ushort) 0; + } + break; + } + } + } + double num114 = Main.worldSurface + 40.0; + for (int index59 = num108; index59 < num109; ++index59) + { + num114 += (double) WorldGen.genRand.Next(-2, 3); + if (num114 < Main.worldSurface + 30.0) + num114 = Main.worldSurface + 30.0; + if (num114 > Main.worldSurface + 50.0) + num114 = Main.worldSurface + 50.0; + i2 = index59; + bool flag15 = false; + for (int worldSurfaceLow = (int) WorldGen.worldSurfaceLow; (double) worldSurfaceLow < num114; ++worldSurfaceLow) + { + if (Main.tile[i2, worldSurfaceLow].active()) + { + if (Main.tile[i2, worldSurfaceLow].type == (ushort) 53 && i2 >= num108 + WorldGen.genRand.Next(5) && i2 <= num109 - WorldGen.genRand.Next(5)) + Main.tile[i2, worldSurfaceLow].type = (ushort) 112; + if (Main.tile[i2, worldSurfaceLow].type == (ushort) 0 && (double) worldSurfaceLow < Main.worldSurface - 1.0 && !flag15) + { + WorldGen.grassSpread = 0; + WorldGen.SpreadGrass(i2, worldSurfaceLow, grass: 23); + } + flag15 = true; + if (Main.tile[i2, worldSurfaceLow].type == (ushort) 1 && i2 >= num108 + WorldGen.genRand.Next(5) && i2 <= num109 - WorldGen.genRand.Next(5)) + Main.tile[i2, worldSurfaceLow].type = (ushort) 25; + if (Main.tile[i2, worldSurfaceLow].wall == (ushort) 216) + Main.tile[i2, worldSurfaceLow].wall = (ushort) 217; + else if (Main.tile[i2, worldSurfaceLow].wall == (ushort) 187) + Main.tile[i2, worldSurfaceLow].wall = (ushort) 220; + if (Main.tile[i2, worldSurfaceLow].type == (ushort) 2) + Main.tile[i2, worldSurfaceLow].type = (ushort) 23; + if (Main.tile[i2, worldSurfaceLow].type == (ushort) 161) + Main.tile[i2, worldSurfaceLow].type = (ushort) 163; + else if (Main.tile[i2, worldSurfaceLow].type == (ushort) 396) + Main.tile[i2, worldSurfaceLow].type = (ushort) 400; + else if (Main.tile[i2, worldSurfaceLow].type == (ushort) 397) + Main.tile[i2, worldSurfaceLow].type = (ushort) 398; + } + } + } + for (int index60 = num108; index60 < num109; ++index60) + { + for (int index61 = 0; index61 < Main.maxTilesY - 50; ++index61) + { + if (Main.tile[index60, index61].active() && Main.tile[index60, index61].type == (ushort) 31) + { + int num115 = index60 - 13; + int num116 = index60 + 13; + int num117 = index61 - 13; + int num118 = index61 + 13; + for (int index62 = num115; index62 < num116; ++index62) + { + if (index62 > 10 && index62 < Main.maxTilesX - 10) + { + for (int index63 = num117; index63 < num118; ++index63) + { + if (Math.Abs(index62 - index60) + Math.Abs(index63 - index61) < 9 + WorldGen.genRand.Next(11) && WorldGen.genRand.Next(3) != 0 && Main.tile[index62, index63].type != (ushort) 31) + { + Main.tile[index62, index63].active(true); + Main.tile[index62, index63].type = (ushort) 25; + if (Math.Abs(index62 - index60) <= 1 && Math.Abs(index63 - index61) <= 1) + Main.tile[index62, index63].active(false); + } + if (Main.tile[index62, index63].type != (ushort) 31 && Math.Abs(index62 - index60) <= 2 + WorldGen.genRand.Next(3) && Math.Abs(index63 - index61) <= 2 + WorldGen.genRand.Next(3)) + Main.tile[index62, index63].active(false); + } + } + } + } + } + } + } + })); + WorldGen.AddGenerationPass("Lakes", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[19].Value; + int num119 = Main.maxTilesX / 4200; + int num120 = WorldGen.genRand.Next(num119 * 3, num119 * 6); + for (int index64 = 0; index64 < num120; ++index64) + { + int num121 = Main.maxTilesX / 4; + if (WorldGen.numLakes >= WorldGen.maxLakes - 1) + break; + float num122 = (float) index64 / (float) num120; + progress.Set(num122); + while (num121 > 0) + { + bool flag = false; + --num121; + int i4 = WorldGen.genRand.Next(lakesBeachAvoidance, Main.maxTilesX - lakesBeachAvoidance); + while ((double) i4 > (double) Main.maxTilesX * 0.45 && (double) i4 < (double) Main.maxTilesX * 0.55) + i4 = WorldGen.genRand.Next(lakesBeachAvoidance, Main.maxTilesX - lakesBeachAvoidance); + for (int index65 = 0; index65 < WorldGen.numLakes; ++index65) + { + if (Math.Abs(i4 - WorldGen.LakeX[index65]) < 150) + { + flag = true; + break; + } + } + for (int index66 = 0; index66 < WorldGen.numMCaves; ++index66) + { + if (Math.Abs(i4 - WorldGen.mCaveX[index66]) < 100) + { + flag = true; + break; + } + } + for (int index67 = 0; index67 < WorldGen.numTunnels; ++index67) + { + if (Math.Abs(i4 - WorldGen.tunnelX[index67]) < 100) + { + flag = true; + break; + } + } + if (!flag) + { + int j3 = (int) WorldGen.worldSurfaceLow - 20; + while (!Main.tile[i4, j3].active()) + { + ++j3; + if ((double) j3 >= Main.worldSurface || Main.tile[i4, j3].wall > (ushort) 0) + { + flag = true; + break; + } + } + if (Main.tile[i4, j3].type == (ushort) 53) + flag = true; + if (!flag) + { + int num123 = 50; + for (int index68 = i4 - num123; index68 <= i4 + num123; ++index68) + { + for (int index69 = j3 - num123; index69 <= j3 + num123; ++index69) + { + if (Main.tile[index68, index69].type == (ushort) 203 || Main.tile[index68, index69].type == (ushort) 25) + { + flag = true; + break; + } + } + } + if (!flag) + { + int num124 = j3; + int num125 = 20; + while (!WorldGen.SolidTile(i4 - num125, j3) || !WorldGen.SolidTile(i4 + num125, j3)) + { + ++j3; + if ((double) j3 > Main.worldSurface - 50.0) + flag = true; + } + if (j3 - num124 <= 10) + { + int num126 = 60; + for (int index70 = i4 - num126; index70 <= i4 + num126; ++index70) + { + int index71 = j3 - 20; + if (Main.tile[index70, index71].active() || Main.tile[index70, index71].wall > (ushort) 0) + flag = true; + } + if (!flag) + { + int num127 = 0; + for (int i5 = i4 - num126; i5 <= i4 + num126; ++i5) + { + for (int j4 = j3; j4 <= j3 + num126 * 2; ++j4) + { + if (WorldGen.SolidTile(i5, j4)) + ++num127; + } + } + int num128 = (num126 * 2 + 1) * (num126 * 2 + 1); + if ((double) num127 >= (double) num128 * 0.8 && !WorldGen.UndergroundDesertLocation.Intersects(new Microsoft.Xna.Framework.Rectangle(i4 - 8, j3 - 8, 16, 16))) + { + WorldGen.SonOfLakinater(i4, j3); + WorldGen.LakeX[WorldGen.numLakes] = i4; + ++WorldGen.numLakes; + break; + } + } + } + } + } + } + } + } + })); + WorldGen.AddGenerationPass("Dungeon", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Set(1f); + int num129 = dungeonLocation; + int num130 = (int) ((Main.worldSurface + Main.rockLayer) / 2.0) + WorldGen.genRand.Next(-200, 200); + int num131 = (int) ((Main.worldSurface + Main.rockLayer) / 2.0) + 200; + int y = num130; + bool flag = false; + for (int index = 0; index < 10; ++index) + { + if (WorldGen.SolidTile(num129, y + index)) + { + flag = true; + break; + } + } + if (!flag) + { + while (y < num131 && !WorldGen.SolidTile(num129, y + 10)) + ++y; + } + if (WorldGen.drunkWorldGen) + y = (int) Main.worldSurface + 70; + WorldGen.MakeDungeon(num129, y); + })); + WorldGen.AddGenerationPass("Slush", (WorldGenLegacyMethod) ((progress, passConfig) => + { + for (int index72 = snowTop; index72 < snowBottom; ++index72) + { + for (int index73 = snowMinX[index72]; index73 < snowMaxX[index72]; ++index73) + { + switch (Main.tile[index73, index72].type) + { + case 1: + Main.tile[index73, index72].type = (ushort) 161; + break; + case 59: + bool flag = true; + int num132 = 3; + for (int index74 = index73 - num132; index74 <= index73 + num132; ++index74) + { + for (int index75 = index72 - num132; index75 <= index72 + num132; ++index75) + { + if (Main.tile[index74, index75].type == (ushort) 60 || Main.tile[index74, index75].type == (ushort) 70 || Main.tile[index74, index75].type == (ushort) 71 || Main.tile[index74, index75].type == (ushort) 72) + { + flag = false; + break; + } + } + } + if (flag) + { + Main.tile[index73, index72].type = (ushort) 224; + break; + } + break; + case 123: + Main.tile[index73, index72].type = (ushort) 224; + break; + } + } + } + })); + WorldGen.AddGenerationPass("Mountain Caves", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[21].Value; + for (int index = 0; index < WorldGen.numMCaves; ++index) + { + int i = WorldGen.mCaveX[index]; + int j = WorldGen.mCaveY[index]; + WorldGen.CaveOpenater(i, j); + WorldGen.Cavinator(i, j, WorldGen.genRand.Next(40, 50)); + } + })); + WorldGen.AddGenerationPass("Beaches", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[22].Value; + bool floridaStyle1 = false; + bool floridaStyle2 = false; + if (WorldGen.genRand.Next(4) == 0) + { + if (WorldGen.genRand.Next(2) == 0) + floridaStyle1 = true; + else + floridaStyle2 = true; + } + for (int index76 = 0; index76 < 2; ++index76) + { + if (index76 == 0) + { + int num133 = 0; + int num134 = WorldGen.genRand.Next(oceanWaterStartRandomMin, oceanWaterStartRandomMax); + if (dungeonSide == 1) + num134 = oceanWaterForcedJungleLength; + int num135 = leftBeachEnd - minSsandBeforeWater; + if (num134 > num135) + num134 = num135; + int count = 0; + float depth = 1f; + int index77 = 0; + while (!Main.tile[num134 - 1, index77].active()) + ++index77; + shellStartYLeft = index77; + int num136 = index77 + WorldGen.genRand.Next(1, 5); + for (int index78 = num134 - 1; index78 >= num133; --index78) + { + if (index78 > 30) + { + ++count; + depth = WorldGen.TuneOceanDepth(count, depth, floridaStyle1); + } + else + ++depth; + int num137 = WorldGen.genRand.Next(15, 20); + for (int index79 = 0; (double) index79 < (double) num136 + (double) depth + (double) num137; ++index79) + { + if ((double) index79 < (double) num136 + (double) depth * 0.75 - 3.0) + { + Main.tile[index78, index79].active(false); + if (index79 > num136) + Main.tile[index78, index79].liquid = byte.MaxValue; + else if (index79 == num136) + { + Main.tile[index78, index79].liquid = (byte) 127; + if (shellStartXLeft == 0) + shellStartXLeft = index78; + } + } + else if (index79 > num136) + { + Main.tile[index78, index79].type = (ushort) 53; + Main.tile[index78, index79].active(true); + } + Main.tile[index78, index79].wall = (ushort) 0; + } + } + } + else + { + int index80 = Main.maxTilesX - WorldGen.genRand.Next(oceanWaterStartRandomMin, oceanWaterStartRandomMax); + int maxTilesX = Main.maxTilesX; + if (dungeonSide == -1) + index80 = Main.maxTilesX - oceanWaterForcedJungleLength; + int num138 = rightBeachStart + minSsandBeforeWater; + if (index80 < num138) + index80 = num138; + float depth = 1f; + int count = 0; + int index81 = 0; + while (!Main.tile[index80, index81].active()) + ++index81; + shellStartXRight = 0; + shellStartYRight = index81; + int num139 = index81 + WorldGen.genRand.Next(1, 5); + for (int index82 = index80; index82 < maxTilesX; ++index82) + { + if (index82 < maxTilesX - 30) + { + ++count; + depth = WorldGen.TuneOceanDepth(count, depth, floridaStyle2); + } + else + ++depth; + int num140 = WorldGen.genRand.Next(15, 20); + for (int index83 = 0; (double) index83 < (double) num139 + (double) depth + (double) num140; ++index83) + { + if ((double) index83 < (double) num139 + (double) depth * 0.75 - 3.0) + { + Main.tile[index82, index83].active(false); + if (index83 > num139) + Main.tile[index82, index83].liquid = byte.MaxValue; + else if (index83 == num139) + { + Main.tile[index82, index83].liquid = (byte) 127; + if (shellStartXRight == 0) + shellStartXRight = index82; + } + } + else if (index83 > num139) + { + Main.tile[index82, index83].type = (ushort) 53; + Main.tile[index82, index83].active(true); + } + Main.tile[index82, index83].wall = (ushort) 0; + } + } + } + } + })); + WorldGen.AddGenerationPass("Gems", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[23].Value; + Main.tileSolid[484] = false; + for (int type = 63; type <= 68; ++type) + { + float num141 = (float) (type - 63) / 6f; + progress.Set(num141); + float num142 = 0.0f; + switch (type) + { + case 63: + num142 = (float) Main.maxTilesX * 0.3f; + break; + case 64: + num142 = (float) Main.maxTilesX * 0.1f; + break; + case 65: + num142 = (float) Main.maxTilesX * 0.25f; + break; + case 66: + num142 = (float) Main.maxTilesX * 0.45f; + break; + case 67: + num142 = (float) Main.maxTilesX * 0.5f; + break; + case 68: + num142 = (float) Main.maxTilesX * 0.05f; + break; + } + float num143 = num142 * 0.2f; + for (int index = 0; (double) index < (double) num143; ++index) + { + int i = WorldGen.genRand.Next(0, Main.maxTilesX); + int j; + for (j = WorldGen.genRand.Next((int) Main.worldSurface, Main.maxTilesY); Main.tile[i, j].type != (ushort) 1; j = WorldGen.genRand.Next((int) Main.worldSurface, Main.maxTilesY)) + i = WorldGen.genRand.Next(0, Main.maxTilesX); + WorldGen.TileRunner(i, j, (double) WorldGen.genRand.Next(2, 6), WorldGen.genRand.Next(3, 7), type); + } + } + for (int index84 = 0; index84 < 2; ++index84) + { + int num144 = 1; + int num145 = 5; + int num146 = Main.maxTilesX - 5; + if (index84 == 1) + { + num144 = -1; + num145 = Main.maxTilesX - 5; + num146 = 5; + } + for (int index85 = num145; index85 != num146; index85 += num144) + { + if (index85 <= WorldGen.UndergroundDesertLocation.Left || index85 >= WorldGen.UndergroundDesertLocation.Right) + { + for (int index86 = 10; index86 < Main.maxTilesY - 10; ++index86) + { + if (Main.tile[index85, index86].active() && Main.tile[index85, index86 + 1].active() && Main.tileSand[(int) Main.tile[index85, index86].type] && Main.tileSand[(int) Main.tile[index85, index86 + 1].type]) + { + ushort type = Main.tile[index85, index86].type; + int index87 = index85 + num144; + int index88 = index86 + 1; + if (!Main.tile[index87, index86].active() && !Main.tile[index87, index88].active()) + { + while (!Main.tile[index87, index88].active()) + ++index88; + int index89 = index88 - 1; + Main.tile[index85, index86].active(false); + Main.tile[index87, index89].active(true); + Main.tile[index87, index89].type = type; + } + } + } + } + } + } + })); + WorldGen.AddGenerationPass("Gravitating Sand", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[24].Value; + for (int x = 0; x < Main.maxTilesX; ++x) + { + float num147 = (float) x / (float) (Main.maxTilesX - 1); + progress.Set(num147); + bool flag = false; + int num148 = 0; + for (int y = Main.maxTilesY - 1; y > 0; --y) + { + if (WorldGen.SolidOrSlopedTile(x, y)) + { + ushort type = Main.tile[x, y].type; + if (flag && y < (int) Main.worldSurface && y != num148 - 1 && TileID.Sets.Falling[(int) type]) + { + for (int index = y; index < num148; ++index) + Main.tile[x, index].ResetToType(type); + } + flag = true; + num148 = y; + } + } + } + })); + WorldGen.AddGenerationPass("Create Ocean Caves", (WorldGenLegacyMethod) ((progress, passConfig) => + { + for (int index = 0; index < 2; ++index) + { + if (WorldGen.genRand.Next(4) == 0 || WorldGen.drunkWorldGen) + { + progress.Message = Lang.gen[90].Value; + int i = WorldGen.genRand.Next(55, 95); + if (index == 1) + i = WorldGen.genRand.Next(Main.maxTilesX - 95, Main.maxTilesX - 55); + int j = 0; + while (!Main.tile[i, j].active()) + ++j; + WorldGen.oceanCave(i, j); + } + } + })); + WorldGen.AddGenerationPass("Clean Up Dirt", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[25].Value; + for (int index90 = 3; index90 < Main.maxTilesX - 3; ++index90) + { + float num149 = (float) index90 / (float) Main.maxTilesX; + progress.Set(0.5f * num149); + bool flag = true; + for (int index91 = 0; (double) index91 < Main.worldSurface; ++index91) + { + if (flag) + { + if (Main.tile[index90, index91].wall == (ushort) 2 || Main.tile[index90, index91].wall == (ushort) 40 || Main.tile[index90, index91].wall == (ushort) 64 || Main.tile[index90, index91].wall == (ushort) 86) + Main.tile[index90, index91].wall = (ushort) 0; + if (Main.tile[index90, index91].type != (ushort) 53 && Main.tile[index90, index91].type != (ushort) 112 && Main.tile[index90, index91].type != (ushort) 234) + { + if (Main.tile[index90 - 1, index91].wall == (ushort) 2 || Main.tile[index90 - 1, index91].wall == (ushort) 40 || Main.tile[index90 - 1, index91].wall == (ushort) 40) + Main.tile[index90 - 1, index91].wall = (ushort) 0; + if ((Main.tile[index90 - 2, index91].wall == (ushort) 2 || Main.tile[index90 - 2, index91].wall == (ushort) 40 || Main.tile[index90 - 2, index91].wall == (ushort) 40) && WorldGen.genRand.Next(2) == 0) + Main.tile[index90 - 2, index91].wall = (ushort) 0; + if ((Main.tile[index90 - 3, index91].wall == (ushort) 2 || Main.tile[index90 - 3, index91].wall == (ushort) 40 || Main.tile[index90 - 3, index91].wall == (ushort) 40) && WorldGen.genRand.Next(2) == 0) + Main.tile[index90 - 3, index91].wall = (ushort) 0; + if (Main.tile[index90 + 1, index91].wall == (ushort) 2 || Main.tile[index90 + 1, index91].wall == (ushort) 40 || Main.tile[index90 + 1, index91].wall == (ushort) 40) + Main.tile[index90 + 1, index91].wall = (ushort) 0; + if ((Main.tile[index90 + 2, index91].wall == (ushort) 2 || Main.tile[index90 + 2, index91].wall == (ushort) 40 || Main.tile[index90 + 2, index91].wall == (ushort) 40) && WorldGen.genRand.Next(2) == 0) + Main.tile[index90 + 2, index91].wall = (ushort) 0; + if ((Main.tile[index90 + 3, index91].wall == (ushort) 2 || Main.tile[index90 + 3, index91].wall == (ushort) 40 || Main.tile[index90 + 3, index91].wall == (ushort) 40) && WorldGen.genRand.Next(2) == 0) + Main.tile[index90 + 3, index91].wall = (ushort) 0; + if (Main.tile[index90, index91].active()) + flag = false; + } + } + else if (Main.tile[index90, index91].wall == (ushort) 0 && Main.tile[index90, index91 + 1].wall == (ushort) 0 && Main.tile[index90, index91 + 2].wall == (ushort) 0 && Main.tile[index90, index91 + 3].wall == (ushort) 0 && Main.tile[index90, index91 + 4].wall == (ushort) 0 && Main.tile[index90 - 1, index91].wall == (ushort) 0 && Main.tile[index90 + 1, index91].wall == (ushort) 0 && Main.tile[index90 - 2, index91].wall == (ushort) 0 && Main.tile[index90 + 2, index91].wall == (ushort) 0 && !Main.tile[index90, index91].active() && !Main.tile[index90, index91 + 1].active() && !Main.tile[index90, index91 + 2].active() && !Main.tile[index90, index91 + 3].active()) + flag = true; + } + } + for (int index92 = Main.maxTilesX - 5; index92 >= 5; --index92) + { + float num150 = (float) index92 / (float) Main.maxTilesX; + progress.Set((float) (1.0 - 0.5 * (double) num150)); + bool flag = true; + for (int index93 = 0; (double) index93 < Main.worldSurface; ++index93) + { + if (flag) + { + if (Main.tile[index92, index93].wall == (ushort) 2 || Main.tile[index92, index93].wall == (ushort) 40 || Main.tile[index92, index93].wall == (ushort) 64) + Main.tile[index92, index93].wall = (ushort) 0; + if (Main.tile[index92, index93].type != (ushort) 53) + { + if (Main.tile[index92 - 1, index93].wall == (ushort) 2 || Main.tile[index92 - 1, index93].wall == (ushort) 40 || Main.tile[index92 - 1, index93].wall == (ushort) 40) + Main.tile[index92 - 1, index93].wall = (ushort) 0; + if ((Main.tile[index92 - 2, index93].wall == (ushort) 2 || Main.tile[index92 - 2, index93].wall == (ushort) 40 || Main.tile[index92 - 2, index93].wall == (ushort) 40) && WorldGen.genRand.Next(2) == 0) + Main.tile[index92 - 2, index93].wall = (ushort) 0; + if ((Main.tile[index92 - 3, index93].wall == (ushort) 2 || Main.tile[index92 - 3, index93].wall == (ushort) 40 || Main.tile[index92 - 3, index93].wall == (ushort) 40) && WorldGen.genRand.Next(2) == 0) + Main.tile[index92 - 3, index93].wall = (ushort) 0; + if (Main.tile[index92 + 1, index93].wall == (ushort) 2 || Main.tile[index92 + 1, index93].wall == (ushort) 40 || Main.tile[index92 + 1, index93].wall == (ushort) 40) + Main.tile[index92 + 1, index93].wall = (ushort) 0; + if ((Main.tile[index92 + 2, index93].wall == (ushort) 2 || Main.tile[index92 + 2, index93].wall == (ushort) 40 || Main.tile[index92 + 2, index93].wall == (ushort) 40) && WorldGen.genRand.Next(2) == 0) + Main.tile[index92 + 2, index93].wall = (ushort) 0; + if ((Main.tile[index92 + 3, index93].wall == (ushort) 2 || Main.tile[index92 + 3, index93].wall == (ushort) 40 || Main.tile[index92 + 3, index93].wall == (ushort) 40) && WorldGen.genRand.Next(2) == 0) + Main.tile[index92 + 3, index93].wall = (ushort) 0; + if (Main.tile[index92, index93].active()) + flag = false; + } + } + else if (Main.tile[index92, index93].wall == (ushort) 0 && Main.tile[index92, index93 + 1].wall == (ushort) 0 && Main.tile[index92, index93 + 2].wall == (ushort) 0 && Main.tile[index92, index93 + 3].wall == (ushort) 0 && Main.tile[index92, index93 + 4].wall == (ushort) 0 && Main.tile[index92 - 1, index93].wall == (ushort) 0 && Main.tile[index92 + 1, index93].wall == (ushort) 0 && Main.tile[index92 - 2, index93].wall == (ushort) 0 && Main.tile[index92 + 2, index93].wall == (ushort) 0 && !Main.tile[index92, index93].active() && !Main.tile[index92, index93 + 1].active() && !Main.tile[index92, index93 + 2].active() && !Main.tile[index92, index93 + 3].active()) + flag = true; + } + } + })); + WorldGen.AddGenerationPass("Pyramids", (WorldGenLegacyMethod) ((progress, passConfig) => + { + for (int index94 = 0; index94 < numPyr; ++index94) + { + int i = PyrX[index94]; + int index95 = PyrY[index94]; + if (i > 300 && i < Main.maxTilesX - 300 && (dungeonSide >= 0 || (double) i >= (double) WorldGen.dungeonX + (double) Main.maxTilesX * 0.15) && (dungeonSide <= 0 || (double) i <= (double) WorldGen.dungeonX - (double) Main.maxTilesX * 0.15)) + { + while (!Main.tile[i, index95].active() && (double) index95 < Main.worldSurface) + ++index95; + if ((double) index95 < Main.worldSurface && Main.tile[i, index95].type == (ushort) 53) + { + int num151 = Main.maxTilesX; + for (int index96 = 0; index96 < index94; ++index96) + { + int num152 = Math.Abs(i - PyrX[index96]); + if (num152 < num151) + num151 = num152; + } + int num153 = 220; + if (WorldGen.drunkWorldGen) + num153 /= 2; + if (num151 >= num153) + { + int j = index95 - 1; + WorldGen.Pyramid(i, j); + } + } + } + } + })); + WorldGen.AddGenerationPass("Dirt Rock Wall Runner", (WorldGenLegacyMethod) ((progress, passConfig) => + { + for (int index = 0; index < Main.maxTilesX; ++index) + { + int i = WorldGen.genRand.Next(10, Main.maxTilesX - 10); + int j = WorldGen.genRand.Next(10, (int) Main.worldSurface); + if (Main.tile[i, j].wall == (ushort) 2) + WorldGen.DirtyRockRunner(i, j); + } + })); + WorldGen.AddGenerationPass("Living Trees", (WorldGenLegacyMethod) ((progress, passConfig) => + { + int num154 = 200; + float num155 = (float) (Main.maxTilesX / 4200); + int num156 = WorldGen.genRand.Next(0, (int) (2.0 * (double) num155) + 1); + if (num156 == 0 && WorldGen.genRand.Next(2) == 0) + ++num156; + if (WorldGen.drunkWorldGen) + num156 += (int) (2.0 * (double) num155); + for (int index97 = 0; index97 < num156; ++index97) + { + bool flag16 = false; + int num157 = 0; + while (!flag16) + { + ++num157; + if (num157 > Main.maxTilesX / 2) + flag16 = true; + int i6 = WorldGen.genRand.Next(WorldGen.beachDistance, Main.maxTilesX - WorldGen.beachDistance); + if (i6 <= Main.maxTilesX / 2 - num154 || i6 >= Main.maxTilesX / 2 + num154) + { + int index98 = 0; + while (!Main.tile[i6, index98].active() && (double) index98 < Main.worldSurface) + ++index98; + if (Main.tile[i6, index98].type == (ushort) 0) + { + int j5 = index98 - 1; + if (j5 > 150) + { + bool flag17 = true; + for (int index99 = i6 - 50; index99 < i6 + 50; ++index99) + { + for (int index100 = j5 - 50; index100 < j5 + 50; ++index100) + { + if (Main.tile[index99, index100].active()) + { + switch (Main.tile[index99, index100].type) + { + case 41: + case 43: + case 44: + case 189: + case 196: + case 460: + case 481: + case 482: + case 483: + flag17 = false; + continue; + default: + continue; + } + } + } + } + for (int index101 = 0; index101 < WorldGen.numMCaves; ++index101) + { + if (i6 > WorldGen.mCaveX[index101] - 50 && i6 < WorldGen.mCaveX[index101] + 50) + { + flag17 = false; + break; + } + } + if (flag17) + { + flag16 = WorldGen.GrowLivingTree(i6, j5); + if (flag16) + { + for (int index102 = -1; index102 <= 1; ++index102) + { + if (index102 != 0) + { + int i7 = i6; + int num158 = WorldGen.genRand.Next(4); + if (WorldGen.drunkWorldGen) + num158 += WorldGen.genRand.Next(2, 5); + for (int index103 = 0; index103 < num158; ++index103) + { + i7 += WorldGen.genRand.Next(13, 31) * index102; + if (i7 <= Main.maxTilesX / 2 - num154 || i7 >= Main.maxTilesX / 2 + num154) + { + int j6 = j5; + if (Main.tile[i7, j6].active()) + { + while (Main.tile[i7, j6].active()) + --j6; + } + else + { + while (!Main.tile[i7, j6].active()) + ++j6; + --j6; + } + bool flag18 = true; + for (int index104 = i6 - 50; index104 < i6 + 50; ++index104) + { + for (int index105 = j5 - 50; index105 < j5 + 50; ++index105) + { + if (Main.tile[index104, index105].active()) + { + switch (Main.tile[index104, index105].type) + { + case 41: + case 43: + case 44: + case 189: + case 196: + case 460: + case 481: + case 482: + case 483: + flag18 = false; + continue; + default: + continue; + } + } + } + } + if (flag18) + WorldGen.GrowLivingTree(i7, j6, true); + } + } + } + } + } + } + } + } + } + } + } + Main.tileSolid[192] = false; + })); + WorldGen.AddGenerationPass("Wood Tree Walls", (WorldGenLegacyMethod) ((progress, passConfig) => + { + for (int index106 = 25; index106 < Main.maxTilesX - 25; ++index106) + { + for (int index107 = 25; (double) index107 < Main.worldSurface; ++index107) + { + if (Main.tile[index106, index107].type == (ushort) 191 || Main.tile[index106, index107 - 1].type == (ushort) 191 || Main.tile[index106 - 1, index107].type == (ushort) 191 || Main.tile[index106 + 1, index107].type == (ushort) 191 || Main.tile[index106, index107 + 1].type == (ushort) 191) + { + bool flag = true; + for (int index108 = index106 - 1; index108 <= index106 + 1; ++index108) + { + for (int index109 = index107 - 1; index109 <= index107 + 1; ++index109) + { + if (index108 != index106 && index109 != index107 && Main.tile[index108, index109].type != (ushort) 191 && Main.tile[index108, index109].wall != (ushort) 244) + flag = false; + } + } + if (flag) + Main.tile[index106, index107].wall = (ushort) 244; + } + } + } + })); + WorldGen.AddGenerationPass("Altars", (WorldGenLegacyMethod) ((progress, passConfig) => + { + Main.tileSolid[484] = false; + progress.Message = Lang.gen[26].Value; + int num159 = (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 1.99999994947575E-05); + for (int index110 = 0; index110 < num159; ++index110) + { + progress.Set((float) index110 / (float) num159); + for (int index111 = 0; index111 < 10000; ++index111) + { + int x = WorldGen.genRand.Next(281, Main.maxTilesX - 3 - 280); + while ((double) x > (double) Main.maxTilesX * 0.45 && (double) x < (double) Main.maxTilesX * 0.55) + x = WorldGen.genRand.Next(281, Main.maxTilesX - 3 - 280); + int y; + for (y = (int) (Main.worldSurface * 2.0 + Main.rockLayer) / 3; WorldGen.oceanDepths(x, y); y = (int) (Main.worldSurface * 2.0 + Main.rockLayer) / 3) + { + x = WorldGen.genRand.Next(281, Main.maxTilesX - 3 - 280); + while ((double) x > (double) Main.maxTilesX * 0.45 && (double) x < (double) Main.maxTilesX * 0.55) + x = WorldGen.genRand.Next(281, Main.maxTilesX - 3 - 280); + } + int style = WorldGen.crimson ? 1 : 0; + if (!WorldGen.IsTileNearby(x, y, 26, 3)) + WorldGen.Place3x2(x, y, (ushort) 26, style); + if (Main.tile[x, y].type == (ushort) 26) + break; + } + } + })); + WorldGen.AddGenerationPass("Wet Jungle", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Set(1f); + for (int index = 0; index < Main.maxTilesX; ++index) + { + i2 = index; + for (int worldSurfaceLow = (int) WorldGen.worldSurfaceLow; (double) worldSurfaceLow < Main.worldSurface - 1.0; ++worldSurfaceLow) + { + if (Main.tile[i2, worldSurfaceLow].active()) + { + if (Main.tile[i2, worldSurfaceLow].type == (ushort) 60) + { + Main.tile[i2, worldSurfaceLow - 1].liquid = byte.MaxValue; + Main.tile[i2, worldSurfaceLow - 2].liquid = byte.MaxValue; + break; + } + break; + } + } + } + })); + WorldGen.AddGenerationPass("Jungle Temple", (WorldGenLegacyMethod) ((progress, passConfig) => + { + int num160 = 0; + progress.Message = Lang.gen[70].Value; + long num161 = 0; + double num162 = 0.25; + while (true) + { + do + { + int y = WorldGen.genRand.Next((int) Main.rockLayer, Main.maxTilesY - 500); + int x = (int) (((WorldGen.genRand.NextDouble() * num162 + 0.1) * (double) -dungeonSide + 0.5) * (double) Main.maxTilesX); + if (Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 60) + { + WorldGen.makeTemple(x, y); + return; + } + } + while (num161++ <= 2000000L); + if (num162 == 0.35) + { + ++num160; + if (num160 > 10) + break; + } + num162 = Math.Min(0.35, num162 + 0.05); + num161 = 0L; + } + })); + WorldGen.AddGenerationPass("Hives", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[71].Value; + float num163 = (float) (Main.maxTilesX / 4200); + float num164 = (float) (1 + WorldGen.genRand.Next((int) (5.0 * (double) num163), (int) (8.0 * (double) num163))); + if (WorldGen.drunkWorldGen) + num164 *= 0.667f; + int num165 = 10000; + HiveBiome biome = configuration.CreateBiome(); +label_10: + while ((double) num164 > 0.0 && num165 > 0) + { + --num165; + Point origin = WorldGen.RandomWorldPoint((int) (Main.worldSurface + Main.rockLayer) >> 1, 20, 300, 20); + if (WorldGen.drunkWorldGen) + WorldGen.RandomWorldPoint((int) Main.worldSurface, 20, 300, 20); + if (biome.Place(origin, structures)) + { + --num164; + int num166 = WorldGen.genRand.Next(5); + int num167 = 0; + int num168 = 10000; + while (true) + { + int x; + int y; + do + { + if (num167 < num166 && num168 > 0) + { + float num169 = (float) ((double) WorldGen.genRand.NextFloat() * 60.0 + 30.0); + double a; + x = (int) (Math.Cos(a = (double) WorldGen.genRand.NextFloat() * 6.28318548202515) * (double) num169) + origin.X; + y = (int) (Math.Sin(a) * (double) num169) + origin.Y; + --num168; + } + else + goto label_10; + } + while (x <= 50 || x >= Main.maxTilesX - 50 || !biome.Place(new Point(x, y), structures)); + ++num167; + } + } + } + })); + WorldGen.AddGenerationPass("Jungle Chests", (WorldGenLegacyMethod) ((progress, passConfig) => + { + WorldGen.genRand.Next(40, Main.maxTilesX - 40); + WorldGen.genRand.Next((int) (Main.worldSurface + Main.rockLayer) / 2, Main.maxTilesY - 400); + float num170 = (float) WorldGen.genRand.Next(7, 12) * (float) (Main.maxTilesX / 4200); + int num171 = 0; + for (int index112 = 0; (double) index112 < (double) num170; ++index112) + { + bool flag19 = true; + while (flag19) + { + ++num171; + int index113 = WorldGen.genRand.Next(40, Main.maxTilesX / 2 - 40); + if (dungeonSide < 0) + index113 += Main.maxTilesX / 2; + int index114 = WorldGen.genRand.Next((int) (Main.worldSurface + Main.rockLayer) / 2, Main.maxTilesY - 400); + if (Main.tile[index113, index114].type == (ushort) 60) + { + int num172 = 30; + flag19 = false; + for (int index115 = index113 - num172; index115 < index113 + num172; index115 += 3) + { + for (int index116 = index114 - num172; index116 < index114 + num172; index116 += 3) + { + if (Main.tile[index115, index116].active() && (Main.tile[index115, index116].type == (ushort) 225 || Main.tile[index115, index116].type == (ushort) 229 || Main.tile[index115, index116].type == (ushort) 226 || Main.tile[index115, index116].type == (ushort) 119 || Main.tile[index115, index116].type == (ushort) 120)) + flag19 = true; + if (Main.tile[index115, index116].wall == (ushort) 86 || Main.tile[index115, index116].wall == (ushort) 87) + flag19 = true; + } + } + } + if (!flag19) + { + int num173 = WorldGen.genRand.Next(2, 4); + int num174 = WorldGen.genRand.Next(2, 4); + ushort num175 = 0; + switch (jungleHut) + { + case 45: + num175 = (ushort) 10; + break; + case 119: + num175 = (ushort) 23; + break; + case 120: + num175 = (ushort) 24; + break; + case 158: + num175 = (ushort) 42; + break; + case 175: + num175 = (ushort) 45; + break; + } + for (int index117 = index113 - num173 - 1; index117 <= index113 + num173 + 1; ++index117) + { + for (int index118 = index114 - num174 - 1; index118 <= index114 + num174 + 1; ++index118) + { + Main.tile[index117, index118].active(true); + Main.tile[index117, index118].type = jungleHut; + Main.tile[index117, index118].liquid = (byte) 0; + Main.tile[index117, index118].lava(false); + } + } + for (int index119 = index113 - num173; index119 <= index113 + num173; ++index119) + { + for (int index120 = index114 - num174; index120 <= index114 + num174; ++index120) + { + Main.tile[index119, index120].active(false); + Main.tile[index119, index120].wall = num175; + } + } + bool flag20 = false; + int num176 = 0; + while (!flag20 && num176 < 100) + { + ++num176; + int i = WorldGen.genRand.Next(index113 - num173, index113 + num173 + 1); + int j = WorldGen.genRand.Next(index114 - num174, index114 + num174 - 2); + WorldGen.PlaceTile(i, j, 4, true, style: 3); + if (Main.tile[i, j].type == (ushort) 4) + flag20 = true; + } + for (int index121 = index113 - num173 - 1; index121 <= index113 + num173 + 1; ++index121) + { + for (int index122 = index114 + num174 - 2; index122 <= index114 + num174; ++index122) + Main.tile[index121, index122].active(false); + } + for (int index123 = index113 - num173 - 1; index123 <= index113 + num173 + 1; ++index123) + { + for (int index124 = index114 + num174 - 2; index124 <= index114 + num174 - 1; ++index124) + Main.tile[index123, index124].active(false); + } + for (int index125 = index113 - num173 - 1; index125 <= index113 + num173 + 1; ++index125) + { + int num177 = 4; + for (int index126 = index114 + num174 + 2; !Main.tile[index125, index126].active() && index126 < Main.maxTilesY && num177 > 0; --num177) + { + Main.tile[index125, index126].active(true); + Main.tile[index125, index126].type = (ushort) 59; + ++index126; + } + } + int num178 = num173 - WorldGen.genRand.Next(1, 3); + int index127 = index114 - num174 - 2; + while (num178 > -1) + { + for (int index128 = index113 - num178 - 1; index128 <= index113 + num178 + 1; ++index128) + { + Main.tile[index128, index127].active(true); + Main.tile[index128, index127].type = jungleHut; + } + num178 -= WorldGen.genRand.Next(1, 3); + --index127; + } + WorldGen.JChestX[WorldGen.numJChests] = index113; + WorldGen.JChestY[WorldGen.numJChests] = index114; + structures.AddProtectedStructure(new Microsoft.Xna.Framework.Rectangle(index113 - num178 - 1, index114 - num174 - 1, index113 + num178 + 1, index114 + num174 + 1)); + ++WorldGen.numJChests; + num171 = 0; + } + else if (num171 > Main.maxTilesX * 10) + { + ++index112; + num171 = 0; + break; + } + } + } + Main.tileSolid[137] = false; + })); + WorldGen.AddGenerationPass("Settle Liquids", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[27].Value; + if (WorldGen.notTheBees) + WorldGen.NotTheBees(); + Liquid.worldGenTilesIgnoreWater(true); + Liquid.QuickWater(3); + WorldGen.WaterCheck(); + int num179 = 0; + Liquid.quickSettle = true; + while (num179 < 10) + { + int num180 = Liquid.numLiquid + LiquidBuffer.numLiquidBuffer; + ++num179; + float num181 = 0.0f; + while (Liquid.numLiquid > 0) + { + float num182 = (float) (num180 - (Liquid.numLiquid + LiquidBuffer.numLiquidBuffer)) / (float) num180; + if (Liquid.numLiquid + LiquidBuffer.numLiquidBuffer > num180) + num180 = Liquid.numLiquid + LiquidBuffer.numLiquidBuffer; + if ((double) num182 > (double) num181) + num181 = num182; + else + num182 = num181; + if (num179 == 1) + progress.Set((float) ((double) num182 / 3.0 + 0.330000013113022)); + int num183 = 10; + if (num179 > num183) + ; + Liquid.UpdateLiquid(); + } + WorldGen.WaterCheck(); + progress.Set((float) ((double) num179 * 0.100000001490116 / 3.0 + 0.660000026226044)); + } + Liquid.quickSettle = false; + Liquid.worldGenTilesIgnoreWater(false); + Main.tileSolid[484] = false; + })); + WorldGen.AddGenerationPass("Remove Water From Sand", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Set(1f); +label_11: + for (int index129 = 400; index129 < Main.maxTilesX - 400; ++index129) + { + i2 = index129; + for (int index130 = 100; (double) index130 < Main.worldSurface - 1.0; ++index130) + { + if (Main.tile[i2, index130].active()) + { + switch (Main.tile[i2, index130].type) + { + case 53: + case 151: + case 396: + case 397: + case 404: + case 407: + int index131 = index130; + while (index131 > 100) + { + --index131; + if (!Main.tile[i2, index131].active()) + Main.tile[i2, index131].liquid = (byte) 0; + else + break; + } + goto label_11; + default: + goto label_11; + } + } + } + } + Main.tileSolid[192] = true; + })); + WorldGen.AddGenerationPass("Oasis", (WorldGenLegacyMethod) ((progress, passConfig) => + { + if (WorldGen.notTheBees) + return; + progress.Set(1f); + int num184 = Main.maxTilesX / 2100 + WorldGen.genRand.Next(2); + for (int index = 0; index < num184; ++index) + { + int minValue = WorldGen.beachDistance + 300; + int num185 = Main.maxTilesX * 2; + while (num185 > 0) + { + --num185; + if (WorldGen.PlaceOasis(WorldGen.genRand.Next(minValue, Main.maxTilesX - minValue), WorldGen.genRand.Next(100, (int) Main.worldSurface))) + num185 = -1; + } + } + })); + WorldGen.AddGenerationPass("Shell Piles", (WorldGenLegacyMethod) ((progress, passConfig) => + { + if (WorldGen.notTheBees) + return; + progress.Set(1f); + if (WorldGen.genRand.Next(2) == 0) + { + int num186 = shellStartXLeft; + int num187 = shellStartYLeft; + for (int index132 = num186 - 20; index132 <= num186 + 20; ++index132) + { + for (int index133 = num187 - 10; index133 <= num187 + 10; ++index133) + { + if (Main.tile[index132, index133].active() && Main.tile[index132, index133].type == (ushort) 53 && !Main.tile[index132, index133 - 1].active() && Main.tile[index132, index133 - 1].liquid == (byte) 0 && !Main.tile[index132 - 1, index133].active() && Main.tile[index132 - 1, index133].liquid > (byte) 0) + { + shellStartXLeft = index132; + shellStartYLeft = index133; + } + } + } + shellStartYLeft -= 50; + shellStartXLeft -= WorldGen.genRand.Next(5); + if (WorldGen.genRand.Next(2) == 0) + shellStartXLeft -= WorldGen.genRand.Next(10); + if (WorldGen.genRand.Next(3) == 0) + shellStartXLeft -= WorldGen.genRand.Next(15); + if (WorldGen.genRand.Next(4) != 0) + WorldGen.ShellPile(shellStartXLeft, shellStartYLeft); + int maxValue = WorldGen.genRand.Next(2, 4); + if (WorldGen.genRand.Next(maxValue) == 0) + WorldGen.ShellPile(shellStartXLeft - WorldGen.genRand.Next(10, 35), shellStartYLeft); + if (WorldGen.genRand.Next(maxValue) == 0) + WorldGen.ShellPile(shellStartXLeft - WorldGen.genRand.Next(40, 65), shellStartYLeft); + if (WorldGen.genRand.Next(maxValue) == 0) + WorldGen.ShellPile(shellStartXLeft - WorldGen.genRand.Next(70, 95), shellStartYLeft); + if (WorldGen.genRand.Next(maxValue) == 0) + WorldGen.ShellPile(shellStartXLeft - WorldGen.genRand.Next(100, 125), shellStartYLeft); + if (WorldGen.genRand.Next(maxValue) == 0) + WorldGen.ShellPile(shellStartXLeft + WorldGen.genRand.Next(10, 25), shellStartYLeft); + } + if (WorldGen.genRand.Next(2) != 0) + return; + int num188 = shellStartXRight; + int num189 = shellStartYRight; + for (int index134 = num188 - 20; index134 <= num188 + 20; ++index134) + { + for (int index135 = num189 - 10; index135 <= num189 + 10; ++index135) + { + if (Main.tile[index134, index135].active() && Main.tile[index134, index135].type == (ushort) 53 && !Main.tile[index134, index135 - 1].active() && Main.tile[index134, index135 - 1].liquid == (byte) 0 && !Main.tile[index134 + 1, index135].active() && Main.tile[index134 + 1, index135].liquid > (byte) 0) + { + shellStartXRight = index134; + shellStartYRight = index135; + } + } + } + shellStartYRight -= 50; + shellStartXRight += WorldGen.genRand.Next(5); + if (WorldGen.genRand.Next(2) == 0) + shellStartXLeft += WorldGen.genRand.Next(10); + if (WorldGen.genRand.Next(3) == 0) + shellStartXLeft += WorldGen.genRand.Next(15); + if (WorldGen.genRand.Next(4) != 0) + WorldGen.ShellPile(shellStartXRight, shellStartYRight); + int maxValue1 = WorldGen.genRand.Next(2, 4); + if (WorldGen.genRand.Next(maxValue1) == 0) + WorldGen.ShellPile(shellStartXRight + WorldGen.genRand.Next(10, 35), shellStartYRight); + if (WorldGen.genRand.Next(maxValue1) == 0) + WorldGen.ShellPile(shellStartXRight + WorldGen.genRand.Next(40, 65), shellStartYRight); + if (WorldGen.genRand.Next(maxValue1) == 0) + WorldGen.ShellPile(shellStartXRight + WorldGen.genRand.Next(70, 95), shellStartYRight); + if (WorldGen.genRand.Next(maxValue1) == 0) + WorldGen.ShellPile(shellStartXRight + WorldGen.genRand.Next(100, 125), shellStartYRight); + if (WorldGen.genRand.Next(maxValue1) != 0) + return; + WorldGen.ShellPile(shellStartXRight - WorldGen.genRand.Next(10, 25), shellStartYRight); + })); + WorldGen.AddGenerationPass("Smooth World", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[60].Value; + Main.tileSolid[(int) WorldGen.crackedType] = true; + for (int index136 = 20; index136 < Main.maxTilesX - 20; ++index136) + { + float num190 = (float) index136 / (float) Main.maxTilesX; + progress.Set(num190); + for (int index137 = 20; index137 < Main.maxTilesY - 20; ++index137) + { + if (Main.tile[index136, index137].type != (ushort) 48 && Main.tile[index136, index137].type != (ushort) 137 && Main.tile[index136, index137].type != (ushort) 232 && Main.tile[index136, index137].type != (ushort) 191 && Main.tile[index136, index137].type != (ushort) 151 && Main.tile[index136, index137].type != (ushort) 274) + { + if (!Main.tile[index136, index137 - 1].active() && Main.tile[index136 - 1, index137].type != (ushort) 136 && Main.tile[index136 + 1, index137].type != (ushort) 136) + { + if (WorldGen.SolidTile(index136, index137) && TileID.Sets.CanBeClearedDuringGeneration[(int) Main.tile[index136, index137].type]) + { + if (!Main.tile[index136 - 1, index137].halfBrick() && !Main.tile[index136 + 1, index137].halfBrick() && Main.tile[index136 - 1, index137].slope() == (byte) 0 && Main.tile[index136 + 1, index137].slope() == (byte) 0) + { + if (WorldGen.SolidTile(index136, index137 + 1)) + { + if (!WorldGen.SolidTile(index136 - 1, index137) && !Main.tile[index136 - 1, index137 + 1].halfBrick() && WorldGen.SolidTile(index136 - 1, index137 + 1) && WorldGen.SolidTile(index136 + 1, index137) && !Main.tile[index136 + 1, index137 - 1].active()) + { + if (WorldGen.genRand.Next(2) == 0) + WorldGen.SlopeTile(index136, index137, 2); + else + WorldGen.PoundTile(index136, index137); + } + else if (!WorldGen.SolidTile(index136 + 1, index137) && !Main.tile[index136 + 1, index137 + 1].halfBrick() && WorldGen.SolidTile(index136 + 1, index137 + 1) && WorldGen.SolidTile(index136 - 1, index137) && !Main.tile[index136 - 1, index137 - 1].active()) + { + if (WorldGen.genRand.Next(2) == 0) + WorldGen.SlopeTile(index136, index137, 1); + else + WorldGen.PoundTile(index136, index137); + } + else if (WorldGen.SolidTile(index136 + 1, index137 + 1) && WorldGen.SolidTile(index136 - 1, index137 + 1) && !Main.tile[index136 + 1, index137].active() && !Main.tile[index136 - 1, index137].active()) + WorldGen.PoundTile(index136, index137); + if (WorldGen.SolidTile(index136, index137)) + { + if (WorldGen.SolidTile(index136 - 1, index137) && WorldGen.SolidTile(index136 + 1, index137 + 2) && !Main.tile[index136 + 1, index137].active() && !Main.tile[index136 + 1, index137 + 1].active() && !Main.tile[index136 - 1, index137 - 1].active()) + WorldGen.KillTile(index136, index137); + else if (WorldGen.SolidTile(index136 + 1, index137) && WorldGen.SolidTile(index136 - 1, index137 + 2) && !Main.tile[index136 - 1, index137].active() && !Main.tile[index136 - 1, index137 + 1].active() && !Main.tile[index136 + 1, index137 - 1].active()) + WorldGen.KillTile(index136, index137); + else if (!Main.tile[index136 - 1, index137 + 1].active() && !Main.tile[index136 - 1, index137].active() && WorldGen.SolidTile(index136 + 1, index137) && WorldGen.SolidTile(index136, index137 + 2)) + { + if (WorldGen.genRand.Next(5) == 0) + WorldGen.KillTile(index136, index137); + else if (WorldGen.genRand.Next(5) == 0) + WorldGen.PoundTile(index136, index137); + else + WorldGen.SlopeTile(index136, index137, 2); + } + else if (!Main.tile[index136 + 1, index137 + 1].active() && !Main.tile[index136 + 1, index137].active() && WorldGen.SolidTile(index136 - 1, index137) && WorldGen.SolidTile(index136, index137 + 2)) + { + if (WorldGen.genRand.Next(5) == 0) + WorldGen.KillTile(index136, index137); + else if (WorldGen.genRand.Next(5) == 0) + WorldGen.PoundTile(index136, index137); + else + WorldGen.SlopeTile(index136, index137, 1); + } + } + } + if (WorldGen.SolidTile(index136, index137) && !Main.tile[index136 - 1, index137].active() && !Main.tile[index136 + 1, index137].active()) + WorldGen.KillTile(index136, index137); + } + } + else if (!Main.tile[index136, index137].active() && Main.tile[index136, index137 + 1].type != (ushort) 151 && Main.tile[index136, index137 + 1].type != (ushort) 274) + { + if (Main.tile[index136 + 1, index137].type != (ushort) 190 && Main.tile[index136 + 1, index137].type != (ushort) 48 && Main.tile[index136 + 1, index137].type != (ushort) 232 && WorldGen.SolidTile(index136 - 1, index137 + 1) && WorldGen.SolidTile(index136 + 1, index137) && !Main.tile[index136 - 1, index137].active() && !Main.tile[index136 + 1, index137 - 1].active()) + { + if (Main.tile[index136 + 1, index137].type == (ushort) 495) + WorldGen.PlaceTile(index136, index137, (int) Main.tile[index136 + 1, index137].type); + else + WorldGen.PlaceTile(index136, index137, (int) Main.tile[index136, index137 + 1].type); + if (WorldGen.genRand.Next(2) == 0) + WorldGen.SlopeTile(index136, index137, 2); + else + WorldGen.PoundTile(index136, index137); + } + if (Main.tile[index136 - 1, index137].type != (ushort) 190 && Main.tile[index136 - 1, index137].type != (ushort) 48 && Main.tile[index136 - 1, index137].type != (ushort) 232 && WorldGen.SolidTile(index136 + 1, index137 + 1) && WorldGen.SolidTile(index136 - 1, index137) && !Main.tile[index136 + 1, index137].active() && !Main.tile[index136 - 1, index137 - 1].active()) + { + if (Main.tile[index136 - 1, index137].type == (ushort) 495) + WorldGen.PlaceTile(index136, index137, (int) Main.tile[index136 - 1, index137].type); + else + WorldGen.PlaceTile(index136, index137, (int) Main.tile[index136, index137 + 1].type); + if (WorldGen.genRand.Next(2) == 0) + WorldGen.SlopeTile(index136, index137, 1); + else + WorldGen.PoundTile(index136, index137); + } + } + } + else if (!Main.tile[index136, index137 + 1].active() && WorldGen.genRand.Next(2) == 0 && WorldGen.SolidTile(index136, index137) && !Main.tile[index136 - 1, index137].halfBrick() && !Main.tile[index136 + 1, index137].halfBrick() && Main.tile[index136 - 1, index137].slope() == (byte) 0 && Main.tile[index136 + 1, index137].slope() == (byte) 0 && WorldGen.SolidTile(index136, index137 - 1)) + { + if (WorldGen.SolidTile(index136 - 1, index137) && !WorldGen.SolidTile(index136 + 1, index137) && WorldGen.SolidTile(index136 - 1, index137 - 1)) + WorldGen.SlopeTile(index136, index137, 3); + else if (WorldGen.SolidTile(index136 + 1, index137) && !WorldGen.SolidTile(index136 - 1, index137) && WorldGen.SolidTile(index136 + 1, index137 - 1)) + WorldGen.SlopeTile(index136, index137, 4); + } + if (TileID.Sets.Conversion.Sand[(int) Main.tile[index136, index137].type]) + Tile.SmoothSlope(index136, index137, false); + } + } + } + for (int i = 20; i < Main.maxTilesX - 20; ++i) + { + for (int j = 20; j < Main.maxTilesY - 20; ++j) + { + if (WorldGen.genRand.Next(2) == 0 && !Main.tile[i, j - 1].active() && Main.tile[i, j].type != (ushort) 137 && Main.tile[i, j].type != (ushort) 48 && Main.tile[i, j].type != (ushort) 232 && Main.tile[i, j].type != (ushort) 191 && Main.tile[i, j].type != (ushort) 151 && Main.tile[i, j].type != (ushort) 274 && Main.tile[i, j].type != (ushort) 75 && Main.tile[i, j].type != (ushort) 76 && WorldGen.SolidTile(i, j) && Main.tile[i - 1, j].type != (ushort) 137 && Main.tile[i + 1, j].type != (ushort) 137) + { + if (WorldGen.SolidTile(i, j + 1) && WorldGen.SolidTile(i + 1, j) && !Main.tile[i - 1, j].active()) + WorldGen.SlopeTile(i, j, 2); + if (WorldGen.SolidTile(i, j + 1) && WorldGen.SolidTile(i - 1, j) && !Main.tile[i + 1, j].active()) + WorldGen.SlopeTile(i, j, 1); + } + if (Main.tile[i, j].slope() == (byte) 1 && !WorldGen.SolidTile(i - 1, j)) + { + WorldGen.SlopeTile(i, j); + WorldGen.PoundTile(i, j); + } + if (Main.tile[i, j].slope() == (byte) 2 && !WorldGen.SolidTile(i + 1, j)) + { + WorldGen.SlopeTile(i, j); + WorldGen.PoundTile(i, j); + } + } + } + Main.tileSolid[137] = true; + Main.tileSolid[190] = false; + Main.tileSolid[192] = false; + Main.tileSolid[(int) WorldGen.crackedType] = false; + })); + WorldGen.AddGenerationPass("Waterfalls", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[69].Value; + Main.tileSolid[191] = false; + for (int i = 20; i < Main.maxTilesX - 20; ++i) + { + float num191 = (float) i / (float) Main.maxTilesX; + progress.Set(num191 * 0.5f); + for (int j = 20; j < Main.maxTilesY - 20; ++j) + { + if (WorldGen.SolidTile(i, j) && !Main.tile[i - 1, j].active() && WorldGen.SolidTile(i, j + 1) && !Main.tile[i + 1, j].active() && (Main.tile[i - 1, j].liquid > (byte) 0 || Main.tile[i + 1, j].liquid > (byte) 0)) + { + bool flag = true; + int num192 = WorldGen.genRand.Next(8, 20); + int num193 = WorldGen.genRand.Next(8, 20); + int num194 = j - num192; + int num195 = num193 + j; + for (int index = num194; index <= num195; ++index) + { + if (Main.tile[i, index].halfBrick()) + flag = false; + } + if ((Main.tile[i, j].type == (ushort) 75 || Main.tile[i, j].type == (ushort) 76) && WorldGen.genRand.Next(10) != 0) + flag = false; + if (flag) + WorldGen.PoundTile(i, j); + } + } + } + for (int i = 20; i < Main.maxTilesX - 20; ++i) + { + float num196 = (float) i / (float) Main.maxTilesX; + progress.Set((float) ((double) num196 * 0.5 + 0.5)); + for (int j = 20; j < Main.maxTilesY - 20; ++j) + { + if (Main.tile[i, j].type != (ushort) 48 && Main.tile[i, j].type != (ushort) 232 && WorldGen.SolidTile(i, j) && WorldGen.SolidTile(i, j + 1)) + { + if (!WorldGen.SolidTile(i + 1, j) && Main.tile[i - 1, j].halfBrick() && Main.tile[i - 2, j].liquid > (byte) 0) + WorldGen.PoundTile(i, j); + if (!WorldGen.SolidTile(i - 1, j) && Main.tile[i + 1, j].halfBrick() && Main.tile[i + 2, j].liquid > (byte) 0) + WorldGen.PoundTile(i, j); + } + } + } + Main.tileSolid[191] = true; + })); + WorldGen.AddGenerationPass("Ice", (WorldGenLegacyMethod) ((progress, passConfig) => + { + if (WorldGen.notTheBees) + WorldGen.NotTheBees(); + progress.Set(1f); + for (int i = 10; i < Main.maxTilesX - 10; ++i) + { + for (int worldSurface3 = (int) Main.worldSurface; worldSurface3 < Main.maxTilesY - 100; ++worldSurface3) + { + if (Main.tile[i, worldSurface3].liquid > (byte) 0 && !Main.tile[i, worldSurface3].lava()) + WorldGen.MakeWateryIceThing(i, worldSurface3); + } + } + Main.tileSolid[226] = false; + Main.tileSolid[162] = false; + })); + WorldGen.AddGenerationPass("Wall Variety", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[79].Value; + int num197 = (int) (300.0 * (double) ((float) (Main.maxTilesX * Main.maxTilesY) / 5040000f)); + int num198 = num197; + ShapeData data = new ShapeData(); + while (num197 > 0) + { + progress.Set((float) (1.0 - (double) num197 / (double) num198)); + Point point = WorldGen.RandomWorldPoint((int) worldSurface, 2, 190, 2); + Tile tile1 = Main.tile[point.X, point.Y]; + Tile tile2 = Main.tile[point.X, point.Y - 1]; + ushort type = 0; + if (tile1.type == (ushort) 60) + type = (ushort) (204 + WorldGen.genRand.Next(4)); + else if (tile1.type == (ushort) 1 && tile2.wall == (ushort) 0) + type = (double) point.Y >= rockLayer ? (point.Y >= WorldGen.lavaLine ? (ushort) (208 + WorldGen.genRand.Next(4)) : (ushort) (212 + WorldGen.genRand.Next(4))) : (ushort) (196 + WorldGen.genRand.Next(4)); + if (tile1.active() && type != (ushort) 0 && !tile2.active()) + { + bool foundInvalidTile = false; + bool flag; + if (tile1.type == (ushort) 60) + flag = WorldUtils.Gen(new Point(point.X, point.Y - 1), (GenShape) new ShapeFloodFill(1000), Actions.Chain((GenAction) new Modifiers.IsNotSolid(), new Actions.Blank().Output(data), (GenAction) new Actions.ContinueWrapper(Actions.Chain((GenAction) new Modifiers.IsTouching(true, new ushort[6] + { + (ushort) 147, + (ushort) 161, + (ushort) 396, + (ushort) 397, + (ushort) 70, + (ushort) 191 + }), (GenAction) new Actions.Custom((GenBase.CustomPerUnitAction) ((x, y, args) => + { + foundInvalidTile = true; + return true; + })))))); + else + flag = WorldUtils.Gen(new Point(point.X, point.Y - 1), (GenShape) new ShapeFloodFill(1000), Actions.Chain((GenAction) new Modifiers.IsNotSolid(), new Actions.Blank().Output(data), (GenAction) new Actions.ContinueWrapper(Actions.Chain((GenAction) new Modifiers.IsTouching(true, new ushort[7] + { + (ushort) 60, + (ushort) 147, + (ushort) 161, + (ushort) 396, + (ushort) 397, + (ushort) 70, + (ushort) 191 + }), (GenAction) new Modifiers.IsTouching(true, new ushort[6] + { + (ushort) 147, + (ushort) 161, + (ushort) 396, + (ushort) 397, + (ushort) 70, + (ushort) 191 + }), (GenAction) new Actions.Custom((GenBase.CustomPerUnitAction) ((x, y, args) => + { + foundInvalidTile = true; + return true; + })))))); + if (data.Count > 50 & flag && !foundInvalidTile) + { + WorldUtils.Gen(new Point(point.X, point.Y), (GenShape) new ModShapes.OuterOutline(data, useInterior: true), Actions.Chain((GenAction) new Modifiers.SkipWalls(new ushort[1] + { + (ushort) 87 + }), (GenAction) new Actions.PlaceWall(type))); + --num197; + } + data.Clear(); + } + } + })); + WorldGen.AddGenerationPass("Life Crystals", (WorldGenLegacyMethod) ((progress, passConfig) => + { + if (WorldGen.getGoodWorldGen) + Main.tileSolid[56] = false; + if (WorldGen.notTheBees) + WorldGen.NotTheBees(); + dub2 = (float) (Main.maxTilesX / 4200); + progress.Message = Lang.gen[28].Value; + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 2E-05); ++index) + { + float num199 = (float) index / ((float) (Main.maxTilesX * Main.maxTilesY) * 2E-05f); + progress.Set(num199); + bool flag = false; + int num200 = 0; + while (!flag) + { + if (WorldGen.AddLifeCrystal(WorldGen.genRand.Next(40, Main.maxTilesX - 40), WorldGen.genRand.Next((int) (Main.worldSurface * 2.0 + Main.rockLayer) / 3, Main.maxTilesY - 300))) + { + flag = true; + } + else + { + ++num200; + if (num200 >= 10000) + flag = true; + } + } + } + Main.tileSolid[225] = false; + })); + WorldGen.AddGenerationPass("Statues", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[29].Value; + int index138 = 0; + int num201 = (int) ((double) (WorldGen.statueList.Length * 2) * (double) dub2); + for (int index139 = 0; index139 < num201; ++index139) + { + if (index138 >= WorldGen.statueList.Length) + index138 = 0; + int x = (int) WorldGen.statueList[index138].X; + int y1 = (int) WorldGen.statueList[index138].Y; + float num202 = (float) (index139 / num201); + progress.Set(num202); + bool flag = false; + int num203 = 0; + while (!flag) + { + int index140 = WorldGen.genRand.Next(20, Main.maxTilesX - 20); + int y2; + for (y2 = WorldGen.genRand.Next((int) (Main.worldSurface * 2.0 + Main.rockLayer) / 3, Main.maxTilesY - 300); WorldGen.oceanDepths(index140, y2); y2 = WorldGen.genRand.Next((int) (Main.worldSurface * 2.0 + Main.rockLayer) / 3, Main.maxTilesY - 300)) + index140 = WorldGen.genRand.Next(20, Main.maxTilesX - 20); + while (!Main.tile[index140, y2].active()) + { + ++y2; + if (y2 >= Main.maxTilesY) + break; + } + if (y2 < Main.maxTilesY) + { + int index141 = y2 - 1; + WorldGen.PlaceTile(index140, index141, x, true, true, style: y1); + if (Main.tile[index140, index141].active() && (int) Main.tile[index140, index141].type == x) + { + flag = true; + if (WorldGen.StatuesWithTraps.Contains(index138)) + WorldGen.PlaceStatueTrap(index140, index141); + ++index138; + } + else + { + ++num203; + if (num203 >= 10000) + flag = true; + } + } + } + } + })); + WorldGen.AddGenerationPass("Buried Chests", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[30].Value; + Main.tileSolid[226] = true; + Main.tileSolid[162] = true; + Main.tileSolid[225] = true; + CaveHouseBiome biome = configuration.CreateBiome(); + int random1 = passConfig.Get("CaveHouseCount").GetRandom(WorldGen.genRand); + int random2 = passConfig.Get("UnderworldChestCount").GetRandom(WorldGen.genRand); + int random3 = passConfig.Get("CaveChestCount").GetRandom(WorldGen.genRand); + int random4 = passConfig.Get("AdditionalDesertHouseCount").GetRandom(WorldGen.genRand); + int num204 = random1 + random2 + random3 + random4; + int num205 = 10000; + for (int index142 = 0; index142 < random3 && num205 > 0; ++index142) + { + progress.Set((float) index142 / (float) num204); + int index143 = WorldGen.genRand.Next(20, Main.maxTilesX - 20); + int index144 = WorldGen.genRand.Next((int) ((worldSurfaceHigh + 20.0 + Main.rockLayer) / 2.0), Main.maxTilesY - 230); + ushort wall = Main.tile[index143, index144].wall; + if (Main.wallDungeon[(int) wall] || wall == (ushort) 87 || WorldGen.oceanDepths(index143, index144) || !WorldGen.AddBuriedChest(index143, index144)) + { + --num205; + --index142; + } + } + int num206 = 10000; + for (int index = 0; index < random2 && num206 > 0; ++index) + { + progress.Set((float) (index + random3) / (float) num204); + int i = WorldGen.genRand.Next(20, Main.maxTilesX - 20); + int j = WorldGen.genRand.Next(Main.UnderworldLayer, Main.maxTilesY - 50); + if (Main.wallDungeon[(int) Main.tile[i, j].wall] || !WorldGen.AddBuriedChest(i, j)) + { + --num206; + --index; + } + } + int num207 = 10000; + for (int index = 0; index < random1 && num207 > 0; ++index) + { + progress.Set((float) (index + random3 + random2) / (float) num204); + int x = WorldGen.genRand.Next(80, Main.maxTilesX - 80); + int y = WorldGen.genRand.Next((int) (worldSurfaceHigh + 20.0), Main.maxTilesY - 230); + if (WorldGen.oceanDepths(x, y) || !biome.Place(new Point(x, y), structures)) + { + --num207; + --index; + } + } + int num208 = 10000; + Microsoft.Xna.Framework.Rectangle desertHiveLocation = WorldGen.UndergroundDesertHiveLocation; + if ((double) desertHiveLocation.Y < Main.worldSurface + 26.0) + { + int num209 = (int) Main.worldSurface + 26 - desertHiveLocation.Y; + desertHiveLocation.Y += num209; + desertHiveLocation.Height -= num209; + } + for (int index = 0; index < random4 && num208 > 0; ++index) + { + progress.Set((float) (index + random3 + random2 + random1) / (float) num204); + if (!biome.Place(WorldGen.RandomRectanglePoint(desertHiveLocation), structures)) + { + --num208; + --index; + } + } + Main.tileSolid[226] = false; + Main.tileSolid[162] = false; + Main.tileSolid[225] = false; + })); + WorldGen.AddGenerationPass("Surface Chests", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[31].Value; + for (int index145 = 0; index145 < (int) ((double) Main.maxTilesX * 0.005); ++index145) + { + float num210 = (float) index145 / ((float) Main.maxTilesX * 0.005f); + progress.Set(num210); + bool flag21 = false; + int num211 = 0; + while (!flag21) + { + int index146 = WorldGen.genRand.Next(300, Main.maxTilesX - 300); + int index147; + for (index147 = WorldGen.genRand.Next((int) WorldGen.worldSurfaceLow, (int) Main.worldSurface); WorldGen.oceanDepths(index146, index147); index147 = WorldGen.genRand.Next((int) WorldGen.worldSurfaceLow, (int) Main.worldSurface)) + index146 = WorldGen.genRand.Next(300, Main.maxTilesX - 300); + bool flag22 = false; + if (!Main.tile[index146, index147].active()) + { + if (Main.tile[index146, index147].wall == (ushort) 2 || Main.tile[index146, index147].wall == (ushort) 59 || Main.tile[index146, index147].wall == (ushort) 244) + flag22 = true; + } + else + { + int num212 = 50; + int num213 = index146; + int num214 = index147; + int maxValue = 1; + for (int index148 = num213 - num212; index148 <= num213 + num212; index148 += 2) + { + for (int index149 = num214 - num212; index149 <= num214 + num212; index149 += 2) + { + if ((double) index149 < Main.worldSurface && !Main.tile[index148, index149].active() && Main.tile[index148, index149].wall == (ushort) 244 && WorldGen.genRand.Next(maxValue) == 0) + { + ++maxValue; + flag22 = true; + index146 = index148; + index147 = index149; + } + } + } + } + if (flag22 && WorldGen.AddBuriedChest(index146, index147, notNearOtherChests: true)) + { + flag21 = true; + } + else + { + ++num211; + if (num211 >= 2000) + flag21 = true; + } + } + } + })); + WorldGen.AddGenerationPass("Jungle Chests Placement", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[32].Value; + for (int index150 = 0; index150 < WorldGen.numJChests; ++index150) + { + float num215 = (float) (index150 / WorldGen.numJChests); + progress.Set(num215); + int nextJungleChestItem = WorldGen.GetNextJungleChestItem(); + if (!WorldGen.AddBuriedChest(WorldGen.JChestX[index150] + WorldGen.genRand.Next(2), WorldGen.JChestY[index150], nextJungleChestItem, Style: 10)) + { + for (int i = WorldGen.JChestX[index150] - 1; i <= WorldGen.JChestX[index150] + 1; ++i) + { + for (int j = WorldGen.JChestY[index150]; j <= WorldGen.JChestY[index150] + 2; ++j) + WorldGen.KillTile(i, j); + } + for (int index151 = WorldGen.JChestX[index150] - 1; index151 <= WorldGen.JChestX[index150] + 1; ++index151) + { + for (int index152 = WorldGen.JChestY[index150]; index152 <= WorldGen.JChestY[index150] + 3; ++index152) + { + if (index152 < Main.maxTilesY) + { + Main.tile[index151, index152].slope((byte) 0); + Main.tile[index151, index152].halfBrick(false); + } + } + } + WorldGen.AddBuriedChest(WorldGen.JChestX[index150], WorldGen.JChestY[index150], nextJungleChestItem, Style: 10); + } + } + })); + WorldGen.AddGenerationPass("Water Chests", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[33].Value; + for (int index = 0; index < WorldGen.numOceanCaveTreasure; ++index) + { + int contain = (int) WorldGen.genRand.NextFromList((short) 863, (short) 186, (short) 277, (short) 187, (short) 4404, (short) 4425); + bool flag = false; + float num216 = 2f; + while (!flag && (double) num216 < 50.0) + { + num216 += 0.1f; + int num217 = WorldGen.genRand.Next(WorldGen.oceanCaveTreasure[index].X - (int) num216, WorldGen.oceanCaveTreasure[index].X + (int) num216 + 1); + int j = WorldGen.genRand.Next(WorldGen.oceanCaveTreasure[index].Y - (int) num216 / 2, WorldGen.oceanCaveTreasure[index].Y + (int) num216 / 2 + 1); + int i = num217 >= Main.maxTilesX ? (int) ((double) num217 + (double) num216 / 2.0) : (int) ((double) num217 - (double) num216 / 2.0); + if (Main.tile[i, j].liquid > (byte) 250 && (Main.tile[i, j].liquidType() == (byte) 0 || WorldGen.notTheBees)) + flag = WorldGen.AddBuriedChest(i, j, contain, Style: 17, trySlope: true); + } + } + int num218 = 0; + for (int index = 0; (double) index < 9.0 * (double) dub2; ++index) + { + float num219 = (float) index / (9f * dub2); + progress.Set(num219); + ++num218; + int contain; + if (WorldGen.genRand.Next(10) == 0) + contain = 4425; + else if (WorldGen.genRand.Next(10) == 0) + { + contain = 863; + } + else + { + switch (num218) + { + case 1: + contain = 186; + break; + case 2: + contain = 4404; + break; + case 3: + contain = 277; + break; + default: + contain = 187; + num218 = 0; + break; + } + } + bool flag23 = false; + int num220 = 0; + while (!flag23) + { + int i = WorldGen.genRand.Next(50, Main.maxTilesX - 50); + int j; + for (j = WorldGen.genRand.Next(1, Main.UnderworldLayer); Main.tile[i, j].liquid < (byte) 250 || Main.tile[i, j].liquidType() != (byte) 0 && !WorldGen.notTheBees; j = WorldGen.genRand.Next(50, Main.UnderworldLayer)) + i = WorldGen.genRand.Next(50, Main.maxTilesX - 50); + flag23 = WorldGen.AddBuriedChest(i, j, contain, Style: 17, trySlope: (i < WorldGen.beachDistance || i > Main.maxTilesX - WorldGen.beachDistance)); + ++num220; + if (num220 > 10000) + break; + } + bool flag24 = false; + int num221 = 0; + while (!flag24) + { + int i = WorldGen.genRand.Next(50, Main.maxTilesX - 50); + int j; + for (j = WorldGen.genRand.Next((int) Main.worldSurface, Main.UnderworldLayer); Main.tile[i, j].liquid < (byte) 250 || Main.tile[i, j].liquidType() != (byte) 0 && !WorldGen.notTheBees; j = WorldGen.genRand.Next((int) Main.worldSurface, Main.UnderworldLayer)) + i = WorldGen.genRand.Next(50, Main.maxTilesX - 50); + flag24 = WorldGen.AddBuriedChest(i, j, contain, Style: 17, trySlope: (i < WorldGen.beachDistance || i > Main.maxTilesX - WorldGen.beachDistance)); + ++num221; + if (num221 > 10000) + break; + } + } + })); + WorldGen.AddGenerationPass("Spider Caves", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[64].Value; + WorldGen.maxTileCount = 3500; + int num222 = Main.maxTilesX / 2; + int num223 = (int) ((double) Main.maxTilesX * 0.005); + if (WorldGen.getGoodWorldGen) + num223 *= 3; + for (int index = 0; index < num223; ++index) + { + float num224 = (float) index / ((float) Main.maxTilesX * 0.005f); + progress.Set(num224); + int num225 = 0; + int x = WorldGen.genRand.Next(200, Main.maxTilesX - 200); + int y = WorldGen.genRand.Next((int) (Main.worldSurface + Main.rockLayer) / 2, Main.maxTilesY - 230); + int num226 = WorldGen.countTiles(x, y, lavaOk: true); + while ((num226 >= 3500 || num226 < 500) && num225 < num222) + { + ++num225; + x = WorldGen.genRand.Next(200, Main.maxTilesX - 200); + y = WorldGen.genRand.Next((int) Main.rockLayer + 30, Main.maxTilesY - 230); + num226 = WorldGen.countTiles(x, y, lavaOk: true); + if (WorldGen.shroomCount > 1) + num226 = 0; + } + if (num225 < num222) + WorldGen.Spread.Spider(x, y); + } + Main.tileSolid[162] = true; + })); + WorldGen.AddGenerationPass("Gem Caves", (WorldGenLegacyMethod) ((progress, passConfig) => + { + if (WorldGen.notTheBees) + return; + progress.Message = Lang.gen[64].Value; + WorldGen.maxTileCount = 300; + for (int index153 = 0; index153 < (int) ((double) Main.maxTilesX * 0.003); ++index153) + { + float num227 = (float) index153 / ((float) Main.maxTilesX * (3f / 1000f)); + progress.Set(num227); + int num228 = 0; + int x = WorldGen.genRand.Next(200, Main.maxTilesX - 200); + int y = WorldGen.genRand.Next((int) Main.rockLayer + 30, Main.maxTilesY - 230); + for (int index154 = WorldGen.countTiles(x, y); (index154 >= 300 || index154 < 50 || WorldGen.lavaCount > 0 || WorldGen.iceCount > 0 || WorldGen.rockCount == 0) && num228 < 1000; index154 = WorldGen.countTiles(x, y)) + { + ++num228; + x = WorldGen.genRand.Next(200, Main.maxTilesX - 200); + y = WorldGen.genRand.Next((int) Main.rockLayer + 30, Main.maxTilesY - 230); + } + if (num228 < 1000) + WorldGen.gemCave(x, y); + } + })); + WorldGen.AddGenerationPass("Moss", (WorldGenLegacyMethod) ((progress, passConfig) => + { + if (WorldGen.notTheBees) + return; + progress.Message = Lang.gen[61].Value; + WorldGen.randMoss(); + int num229 = Main.maxTilesX / 2100; + int num230 = 0; + int num231 = 0; + while (num231 < num229) + { + int i = WorldGen.genRand.Next(100, Main.maxTilesX - 100); + if (WorldGen.getGoodWorldGen) + { + while ((double) i > (double) Main.maxTilesX * 0.42 && (double) i < (double) Main.maxTilesX * 0.48) + i = WorldGen.genRand.Next(100, Main.maxTilesX - 100); + } + else if (!WorldGen.drunkWorldGen) + { + while ((double) i > (double) Main.maxTilesX * 0.38 && (double) i < (double) Main.maxTilesX * 0.62) + i = WorldGen.genRand.Next(100, Main.maxTilesX - 100); + } + int j = WorldGen.genRand.Next((int) Main.rockLayer + 40, WorldGen.lavaLine - 40); + bool flag = false; + int num232 = 50; +label_19: + for (int index155 = i - num232; index155 <= i + num232; ++index155) + { + for (int index156 = j - num232; index156 <= j + num232; ++index156) + { + if (Main.tile[index155, index156].active()) + { + int type = (int) Main.tile[index155, index156].type; + switch (type) + { + case 60: + case 70: + case 147: + case 161: + case 367: + case 368: + case 396: + case 397: + flag = true; + index155 = i + num232 + 1; + goto label_19; + default: + if (!Main.tileDungeon[type]) + continue; + goto case 60; + } + } + } + } + if (flag) + { + ++num230; + if (num230 > Main.maxTilesX) + ++num231; + } + else + { + num230 = 0; + ++num231; + WorldGen.neonMossBiome(i, j, WorldGen.lavaLine); + } + } + WorldGen.maxTileCount = 2500; + for (int index157 = 0; index157 < (int) ((double) Main.maxTilesX * 0.01); ++index157) + { + float num233 = (float) index157 / ((float) Main.maxTilesX * 0.01f); + progress.Set(num233); + int num234 = 0; + int x = WorldGen.genRand.Next(200, Main.maxTilesX - 200); + int y = WorldGen.genRand.Next((int) (Main.worldSurface + Main.rockLayer) / 2, WorldGen.waterLine); + for (int index158 = WorldGen.countTiles(x, y); (index158 >= 2500 || index158 < 10 || WorldGen.lavaCount > 0 || WorldGen.iceCount > 0 || WorldGen.rockCount == 0 || WorldGen.shroomCount > 0) && num234 < 1000; index158 = WorldGen.countTiles(x, y)) + { + ++num234; + x = WorldGen.genRand.Next(200, Main.maxTilesX - 200); + y = WorldGen.genRand.Next((int) Main.rockLayer + 30, Main.maxTilesY - 230); + } + if (num234 < 1000) + { + WorldGen.setMoss(x, y); + WorldGen.Spread.Moss(x, y); + } + } + for (int index = 0; index < Main.maxTilesX; ++index) + { + int x = WorldGen.genRand.Next(50, Main.maxTilesX - 50); + int y = WorldGen.genRand.Next((int) (Main.worldSurface + Main.rockLayer) / 2, WorldGen.lavaLine); + if (Main.tile[x, y].type == (ushort) 1) + { + WorldGen.setMoss(x, y); + Main.tile[x, y].type = WorldGen.mossTile; + } + } + float num235 = (float) Main.maxTilesX * 0.05f; + while ((double) num235 > 0.0) + { + int x = WorldGen.genRand.Next(50, Main.maxTilesX - 50); + int y = WorldGen.genRand.Next((int) (Main.worldSurface + Main.rockLayer) / 2, WorldGen.lavaLine); + if (Main.tile[x, y].type == (ushort) 1 && (!Main.tile[x - 1, y].active() || !Main.tile[x + 1, y].active() || !Main.tile[x, y - 1].active() || !Main.tile[x, y + 1].active())) + { + WorldGen.setMoss(x, y); + Main.tile[x, y].type = WorldGen.mossTile; + --num235; + } + } + float num236 = (float) Main.maxTilesX * 0.065f; + while ((double) num236 > 0.0) + { + int index159 = WorldGen.genRand.Next(50, Main.maxTilesX - 50); + int index160 = WorldGen.genRand.Next(WorldGen.waterLine, Main.UnderworldLayer); + if (Main.tile[index159, index160].type == (ushort) 1 && (!Main.tile[index159 - 1, index160].active() || !Main.tile[index159 + 1, index160].active() || !Main.tile[index159, index160 - 1].active() || !Main.tile[index159, index160 + 1].active())) + { + int num237 = 25; + int num238 = 0; + for (int index161 = index159 - num237; index161 < index159 + num237; ++index161) + { + for (int index162 = index160 - num237; index162 < index160 + num237; ++index162) + { + if (Main.tile[index161, index162].liquid > (byte) 0 && Main.tile[index161, index162].lava()) + ++num238; + } + } + if (num238 > 20) + { + Main.tile[index159, index160].type = (ushort) 381; + --num236; + } + else + num236 -= 1f / 500f; + } + } + for (int index163 = 0; index163 < Main.maxTilesX; ++index163) + { + for (int index164 = 0; index164 < Main.maxTilesY; ++index164) + { + if (Main.tile[index163, index164].active() && Main.tileMoss[(int) Main.tile[index163, index164].type]) + { + for (int index165 = 0; index165 < 4; ++index165) + { + int i = index163; + int j = index164; + if (index165 == 0) + --i; + if (index165 == 1) + ++i; + if (index165 == 2) + --j; + if (index165 == 3) + ++j; + try + { + WorldGen.grassSpread = 0; + WorldGen.SpreadGrass(i, j, 1, (int) Main.tile[index163, index164].type); + } + catch + { + WorldGen.grassSpread = 0; + WorldGen.SpreadGrass(i, j, 1, (int) Main.tile[index163, index164].type, false); + } + } + } + } + } + })); + WorldGen.AddGenerationPass("Temple", (WorldGenLegacyMethod) ((progress, passConfig) => + { + Main.tileSolid[162] = false; + Main.tileSolid[226] = true; + WorldGen.templePart2(); + Main.tileSolid[232] = false; + })); + WorldGen.AddGenerationPass("Cave Walls", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[63].Value; + WorldGen.maxTileCount = 1500; + for (int index166 = 0; index166 < (int) ((double) Main.maxTilesX * 0.04); ++index166) + { + float num239 = (float) index166 / ((float) Main.maxTilesX * 0.04f); + progress.Set(num239 * 0.66f); + int num240 = 0; + int x = WorldGen.genRand.Next(200, Main.maxTilesX - 200); + int y = WorldGen.genRand.Next((int) (Main.worldSurface + Main.rockLayer) / 2, Main.maxTilesY - 220); + for (int index167 = WorldGen.countTiles(x, y, lavaOk: true); (index167 >= WorldGen.maxTileCount || index167 < 10) && num240 < 500; index167 = WorldGen.countTiles(x, y, lavaOk: true)) + { + ++num240; + x = WorldGen.genRand.Next(200, Main.maxTilesX - 200); + y = WorldGen.genRand.Next((int) (Main.worldSurface + Main.rockLayer) / 2, Main.maxTilesY - 220); + } + if (num240 < 500) + { + int wallType = WorldGen.genRand.Next(2); + if ((double) WorldGen.shroomCount > (double) WorldGen.rockCount * 0.75) + wallType = 80; + else if (WorldGen.iceCount > 0) + { + switch (wallType) + { + case 0: + wallType = 40; + break; + case 1: + wallType = 71; + break; + } + } + else if (WorldGen.lavaCount > 0) + { + wallType = 79; + } + else + { + wallType = WorldGen.genRand.Next(4); + switch (wallType) + { + case 0: + wallType = 59; + break; + case 1: + wallType = 61; + break; + case 2: + wallType = 170; + break; + case 3: + wallType = 171; + break; + } + } + WorldGen.Spread.Wall(x, y, wallType); + } + } + WorldGen.maxTileCount = 1500; + float num241 = (float) Main.maxTilesX * 0.02f; + for (int index = 0; (double) index < (double) num241; ++index) + { + float num242 = (float) index / ((float) Main.maxTilesX * 0.02f); + progress.Set((float) ((double) num242 * 0.330000013113022 + 0.660000026226044)); + int num243 = 0; + int x = WorldGen.genRand.Next(200, Main.maxTilesX - 200); + int y = WorldGen.genRand.Next((int) Main.worldSurface, WorldGen.lavaLine); + int num244 = 0; + if (Main.tile[x, y].wall == (ushort) 64) + num244 = WorldGen.countTiles(x, y, true); + while ((num244 >= WorldGen.maxTileCount || num244 < 10) && num243 < 1000) + { + ++num243; + x = WorldGen.genRand.Next(200, Main.maxTilesX - 200); + y = WorldGen.genRand.Next((int) Main.worldSurface, WorldGen.lavaLine); + if (!Main.wallHouse[(int) Main.tile[x, y].wall] && Main.tile[x, y].wall != (ushort) 244) + num244 = Main.tile[x, y].wall != (ushort) 64 ? 0 : WorldGen.countTiles(x, y, true); + } + if (num243 < 1000) + WorldGen.Spread.Wall2(x, y, 15); + } + })); + WorldGen.AddGenerationPass("Jungle Trees", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[83].Value; + for (int i = 0; i < Main.maxTilesX; ++i) + { + progress.Set((float) i / (float) Main.maxTilesX); + for (int y = (int) Main.worldSurface - 1; y < Main.maxTilesY - 350; ++y) + { + if (WorldGen.genRand.Next(10) == 0 || WorldGen.drunkWorldGen) + WorldGen.GrowUndergroundTree(i, y); + } + } + })); + WorldGen.AddGenerationPass("Floating Island Houses", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Set(1f); + for (int index = 0; index < WorldGen.numIslandHouses; ++index) + { + if (!WorldGen.skyLake[index]) + WorldGen.IslandHouse(WorldGen.floatingIslandHouseX[index], WorldGen.floatingIslandHouseY[index], WorldGen.floatingIslandStyle[index]); + } + })); + WorldGen.AddGenerationPass("Quick Cleanup", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Set(1f); + if (WorldGen.notTheBees) + WorldGen.NotTheBees(); + Main.tileSolid[137] = false; + Main.tileSolid[130] = false; + for (int index168 = 20; index168 < Main.maxTilesX - 20; ++index168) + { + for (int y = 20; y < Main.maxTilesY - 20; ++y) + { + if ((double) y < Main.worldSurface && WorldGen.oceanDepths(index168, y) && Main.tile[index168, y].type == (ushort) 53 && Main.tile[index168, y].active()) + { + if (Main.tile[index168, y].bottomSlope()) + Main.tile[index168, y].slope((byte) 0); + for (int index169 = y + 1; index169 < y + WorldGen.genRand.Next(4, 7) && (!Main.tile[index168, index169].active() || Main.tile[index168, index169].type != (ushort) 397 && Main.tile[index168, index169].type != (ushort) 53) && (!Main.tile[index168, index169 + 1].active() || Main.tile[index168, index169 + 1].type != (ushort) 397 && Main.tile[index168, index169 + 1].type != (ushort) 53 && Main.tile[index168, index169 + 1].type != (ushort) 495) && (!Main.tile[index168, index169 + 2].active() || Main.tile[index168, index169 + 2].type != (ushort) 397 && Main.tile[index168, index169 + 2].type != (ushort) 53 && Main.tile[index168, index169 + 2].type != (ushort) 495); ++index169) + { + Main.tile[index168, index169].type = (ushort) 0; + Main.tile[index168, index169].active(true); + Main.tile[index168, index169].halfBrick(false); + Main.tile[index168, index169].slope((byte) 0); + } + } + if (Main.tile[index168, y].wall == (ushort) 187 || Main.tile[index168, y].wall == (ushort) 216) + { + if (Main.tile[index168, y].type == (ushort) 59 || Main.tile[index168, y].type == (ushort) 123 || Main.tile[index168, y].type == (ushort) 224) + Main.tile[index168, y].type = (ushort) 397; + if (Main.tile[index168, y].type == (ushort) 368 || Main.tile[index168, y].type == (ushort) 367) + Main.tile[index168, y].type = (ushort) 397; + if ((double) y <= Main.rockLayer) + Main.tile[index168, y].liquid = (byte) 0; + else if (Main.tile[index168, y].liquid > (byte) 0) + { + Main.tile[index168, y].liquid = byte.MaxValue; + Main.tile[index168, y].lava(true); + } + } + if ((double) y < Main.worldSurface && Main.tile[index168, y].active() && Main.tile[index168, y].type == (ushort) 53 && Main.tile[index168, y + 1].wall == (ushort) 0 && !WorldGen.SolidTile(index168, y + 1)) + { + ushort num245 = 0; + int num246 = 3; + for (int index170 = index168 - num246; index170 <= index168 + num246; ++index170) + { + for (int index171 = y - num246; index171 <= y + num246; ++index171) + { + if (Main.tile[index170, index171].wall > (ushort) 0) + { + num245 = Main.tile[index170, index171].wall; + break; + } + } + } + if (num245 > (ushort) 0) + { + Main.tile[index168, y + 1].wall = num245; + if (Main.tile[index168, y].wall == (ushort) 0) + Main.tile[index168, y].wall = num245; + } + } + if (Main.tile[index168, y].type != (ushort) 19 && TileID.Sets.CanBeClearedDuringGeneration[(int) Main.tile[index168, y].type]) + { + if (Main.tile[index168, y].topSlope() || Main.tile[index168, y].halfBrick()) + { + if (Main.tile[index168, y].type != (ushort) 225 || !Main.tile[index168, y].halfBrick()) + { + if (!WorldGen.SolidTile(index168, y + 1)) + Main.tile[index168, y].active(false); + if (Main.tile[index168 + 1, y].type == (ushort) 137 || Main.tile[index168 - 1, y].type == (ushort) 137) + Main.tile[index168, y].active(false); + } + } + else if (Main.tile[index168, y].bottomSlope()) + { + if (!WorldGen.SolidTile(index168, y - 1)) + Main.tile[index168, y].active(false); + if (Main.tile[index168 + 1, y].type == (ushort) 137 || Main.tile[index168 - 1, y].type == (ushort) 137) + Main.tile[index168, y].active(false); + } + } + } + } + })); + WorldGen.AddGenerationPass("Pots", (WorldGenLegacyMethod) ((progress, passConfig) => + { + Main.tileSolid[137] = true; + Main.tileSolid[130] = true; + progress.Message = Lang.gen[35].Value; + for (int index = 0; index < (int) ((double) (Main.maxTilesX * Main.maxTilesY) * 0.0008); ++index) + { + float num247 = (float) index / ((float) (Main.maxTilesX * Main.maxTilesY) * 0.0008f); + progress.Set(num247); + bool flag25 = false; + int num248 = 0; + while (!flag25) + { + int num249 = WorldGen.genRand.Next((int) worldSurfaceHigh, Main.maxTilesY - 10); + if ((double) num247 > 0.93) + num249 = Main.maxTilesY - 150; + else if ((double) num247 > 0.75) + num249 = (int) WorldGen.worldSurfaceLow; + int x = WorldGen.genRand.Next(1, Main.maxTilesX); + bool flag26 = false; + for (int y = num249; y < Main.maxTilesY; ++y) + { + if (!flag26) + { + if (Main.tile[x, y].active() && Main.tileSolid[(int) Main.tile[x, y].type] && !Main.tile[x, y - 1].lava()) + flag26 = true; + } + else if ((double) y >= Main.worldSurface || Main.tile[x, y].wall != (ushort) 0) + { + int style = WorldGen.genRand.Next(0, 4); + int num250 = 0; + int num251 = 0; + if (y < Main.maxTilesY - 5) + { + num250 = (int) Main.tile[x, y + 1].type; + num251 = (int) Main.tile[x, y].wall; + } + if (num250 == 147 || num250 == 161 || num250 == 162) + style = WorldGen.genRand.Next(4, 7); + if (num250 == 60) + style = WorldGen.genRand.Next(7, 10); + if (Main.wallDungeon[(int) Main.tile[x, y].wall]) + style = WorldGen.genRand.Next(10, 13); + if (num250 == 41 || num250 == 43 || num250 == 44 || num250 == 481 || num250 == 482 || num250 == 483) + style = WorldGen.genRand.Next(10, 13); + if (num250 == 22 || num250 == 23 || num250 == 25) + style = WorldGen.genRand.Next(16, 19); + if (num250 == 199 || num250 == 203 || num250 == 204 || num250 == 200) + style = WorldGen.genRand.Next(22, 25); + if (num250 == 367) + style = WorldGen.genRand.Next(31, 34); + if (num250 == 226) + style = WorldGen.genRand.Next(28, 31); + if (num251 == 187 || num251 == 216) + style = WorldGen.genRand.Next(34, 37); + if (y > Main.UnderworldLayer) + style = WorldGen.genRand.Next(13, 16); + if (!WorldGen.oceanDepths(x, y) && WorldGen.PlacePot(x, y, style: style)) + { + flag25 = true; + break; + } + ++num248; + if (num248 >= 10000) + { + flag25 = true; + break; + } + } + } + } + } + })); + WorldGen.AddGenerationPass("Hellforge", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[36].Value; + for (int index172 = 0; index172 < Main.maxTilesX / 200; ++index172) + { + float num252 = (float) (index172 / (Main.maxTilesX / 200)); + progress.Set(num252); + bool flag = false; + int num253 = 0; + while (!flag) + { + int i = WorldGen.genRand.Next(1, Main.maxTilesX); + int index173 = WorldGen.genRand.Next(Main.maxTilesY - 250, Main.maxTilesY - 30); + try + { + if (Main.tile[i, index173].wall != (ushort) 13) + { + if (Main.tile[i, index173].wall != (ushort) 14) + continue; + } + while (!Main.tile[i, index173].active() && index173 < Main.maxTilesY - 20) + ++index173; + int j = index173 - 1; + WorldGen.PlaceTile(i, j, 77); + if (Main.tile[i, j].type == (ushort) 77) + { + flag = true; + } + else + { + ++num253; + if (num253 >= 10000) + flag = true; + } + } + catch + { + } + } + } + })); + WorldGen.AddGenerationPass("Spreading Grass", (WorldGenLegacyMethod) ((progress, passConfig) => + { + if (WorldGen.notTheBees) + return; + progress.Message = Lang.gen[37].Value; + for (int index174 = 50; index174 < Main.maxTilesX - 50; ++index174) + { + for (int index175 = 50; (double) index175 <= Main.worldSurface; ++index175) + { + if (Main.tile[index174, index175].active()) + { + int type = (int) Main.tile[index174, index175].type; + if (Main.tile[index174, index175].active() && type == 60) + { + for (int index176 = index174 - 1; index176 <= index174 + 1; ++index176) + { + for (int index177 = index175 - 1; index177 <= index175 + 1; ++index177) + { + if (Main.tile[index176, index177].active() && Main.tile[index176, index177].type == (ushort) 0) + Main.tile[index176, index177].type = Main.tile[index176, index177 - 1].active() ? (ushort) 59 : (ushort) 60; + } + } + } + else if (type == 1 || type == 40 || TileID.Sets.Ore[type]) + { + int num254 = 3; + bool flag = false; + ushort num255 = 0; + for (int index178 = index174 - num254; index178 <= index174 + num254; ++index178) + { + for (int index179 = index175 - num254; index179 <= index175 + num254; ++index179) + { + if (Main.tile[index178, index179].active()) + { + if (Main.tile[index178, index179].type == (ushort) 53 || num255 == (ushort) 53) + num255 = (ushort) 53; + else if (Main.tile[index178, index179].type == (ushort) 59 || Main.tile[index178, index179].type == (ushort) 60 || Main.tile[index178, index179].type == (ushort) 147 || Main.tile[index178, index179].type == (ushort) 161 || Main.tile[index178, index179].type == (ushort) 199 || Main.tile[index178, index179].type == (ushort) 23) + num255 = Main.tile[index178, index179].type; + } + else if (index179 < index175 && Main.tile[index178, index179].wall == (ushort) 0) + flag = true; + } + } + if (flag) + { + switch (num255) + { + case 23: + case 199: + if (Main.tile[index174, index175 - 1].active()) + { + num255 = (ushort) 0; + break; + } + break; + case 59: + case 60: + if (index174 >= jungleMinX && index174 <= jungleMaxX) + { + num255 = Main.tile[index174, index175 - 1].active() ? (ushort) 59 : (ushort) 60; + break; + } + break; + } + Main.tile[index174, index175].type = num255; + } + } + } + } + } + for (int index = 10; index < Main.maxTilesX - 10; ++index) + { + i2 = index; + bool flag = true; + for (int j = 0; (double) j < Main.worldSurface - 1.0; ++j) + { + if (Main.tile[i2, j].active()) + { + if (flag) + { + if (Main.tile[i2, j].type == (ushort) 0) + { + try + { + WorldGen.grassSpread = 0; + WorldGen.SpreadGrass(i2, j); + } + catch + { + WorldGen.grassSpread = 0; + WorldGen.SpreadGrass(i2, j, repeat: false); + } + } + } + if ((double) j <= worldSurfaceHigh) + flag = false; + else + break; + } + else if (Main.tile[i2, j].wall == (ushort) 0) + flag = true; + } + } + })); + WorldGen.AddGenerationPass("Surface Ore and Stone", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Set(1f); + int num256 = WorldGen.genRand.Next(Main.maxTilesX / 4200 * 5, Main.maxTilesX / 4200 * 10); + for (int index180 = 0; index180 < num256; ++index180) + { + int num257 = Main.maxTilesX / 420; + while (num257 > 0) + { + --num257; + int X = WorldGen.genRand.Next(WorldGen.beachDistance, Main.maxTilesX - WorldGen.beachDistance); + while ((double) X >= (double) Main.maxTilesX * 0.48 && (double) X <= (double) Main.maxTilesX * 0.52) + X = WorldGen.genRand.Next(WorldGen.beachDistance, Main.maxTilesX - WorldGen.beachDistance); + int Y = WorldGen.genRand.Next((int) WorldGen.worldSurfaceLow, (int) worldSurface); + bool flag = false; + for (int index181 = 0; index181 < WorldGen.numOrePatch; ++index181) + { + if (Math.Abs(X - WorldGen.orePatchX[index181]) < 200) + flag = true; + } + if (!flag && WorldGen.OrePatch(X, Y)) + { + if (WorldGen.numOrePatch < WorldGen.maxOrePatch - 1) + { + WorldGen.orePatchX[WorldGen.numOrePatch] = X; + ++WorldGen.numOrePatch; + break; + } + break; + } + } + } + int num258 = WorldGen.genRand.Next(1, Main.maxTilesX / 4200 * 7); + for (int index182 = 0; index182 < num258; ++index182) + { + int num259 = Main.maxTilesX / 420; + while (num259 > 0) + { + --num259; + int X = WorldGen.genRand.Next(WorldGen.beachDistance, Main.maxTilesX - WorldGen.beachDistance); + while ((double) X >= (double) Main.maxTilesX * 0.47 && (double) X <= (double) Main.maxTilesX * 0.53) + X = WorldGen.genRand.Next(WorldGen.beachDistance, Main.maxTilesX - WorldGen.beachDistance); + int Y = WorldGen.genRand.Next((int) WorldGen.worldSurfaceLow, (int) worldSurface); + bool flag = false; + for (int index183 = 0; index183 < WorldGen.numOrePatch; ++index183) + { + if (Math.Abs(X - WorldGen.orePatchX[index183]) < 100) + flag = true; + } + if (!flag && WorldGen.StonePatch(X, Y)) + break; + } + } + })); + WorldGen.AddGenerationPass("Place Fallen Log", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[85].Value; + int num260 = Main.maxTilesX / 2100 + WorldGen.genRand.Next(-1, 2); + for (int index184 = 0; index184 < num260; ++index184) + { + progress.Set((float) index184 / (float) num260); + int minValue = WorldGen.beachDistance + 20; + int num261 = 50000; + int num262 = 5000; + while (num261 > 0) + { + --num261; + int i = WorldGen.genRand.Next(minValue, Main.maxTilesX - minValue); + int index185 = WorldGen.genRand.Next(10, (int) Main.worldSurface); + bool flag27 = false; + if (num261 < num262) + flag27 = true; + if (num261 > num262 / 2) + { + while ((double) i > (double) Main.maxTilesX * 0.4 && (double) i < (double) Main.maxTilesX * 0.6) + i = WorldGen.genRand.Next(minValue, Main.maxTilesX - minValue); + } + if (!Main.tile[i, index185].active() && Main.tile[i, index185].wall == (ushort) 0) + { + while (!Main.tile[i, index185].active() && Main.tile[i, index185].wall == (ushort) 0 && (double) index185 <= Main.worldSurface) + ++index185; + bool flag28 = true; + if ((double) index185 > Main.worldSurface - 10.0) + flag28 = false; + else if (!flag27) + { + int num263 = 50; + for (int index186 = i - num263; index186 < i + num263; ++index186) + { + if (index186 > 10 && index186 < Main.maxTilesX - 10) + { + for (int index187 = index185 - num263; index187 < index185 + num263; ++index187) + { + if (index187 > 10 && index187 < Main.maxTilesY - 10) + { + int type = (int) Main.tile[index186, index187].type; + switch (type) + { + case 53: + flag28 = false; + continue; + case 189: + flag28 = false; + continue; + default: + if (Main.tileDungeon[type]) + { + flag28 = false; + continue; + } + if (TileID.Sets.Crimson[type]) + { + flag28 = false; + continue; + } + if (TileID.Sets.Corrupt[type]) + { + flag28 = false; + continue; + } + continue; + } + } + } + } + } + if (flag28) + { + int num264 = 10; + int num265 = 10; + for (int index188 = i - num264; index188 < i + num264; ++index188) + { + for (int index189 = index185 - num265; index189 < index185 - 1; ++index189) + { + if (Main.tile[index188, index189].active() && Main.tileSolid[(int) Main.tile[index188, index189].type]) + flag28 = false; + if (Main.tile[index188, index189].wall != (ushort) 0) + flag28 = false; + } + } + } + } + if (flag28 && (Main.tile[i, index185 - 1].liquid == (byte) 0 || num261 < num262 / 5) && (Main.tile[i, index185].type == (ushort) 2 || WorldGen.notTheBees && Main.tile[i, index185].type == (ushort) 60) && (Main.tile[i - 1, index185].type == (ushort) 2 || WorldGen.notTheBees && Main.tile[i - 1, index185].type == (ushort) 60) && (Main.tile[i + 1, index185].type == (ushort) 2 || WorldGen.notTheBees && Main.tile[i + 1, index185].type == (ushort) 60)) + { + int j = index185 - 1; + WorldGen.PlaceTile(i, j, 488); + if (Main.tile[i, j].active() && Main.tile[i, j].type == (ushort) 488) + { + if (WorldGen.genRand.Next(2) == 0) + { + logX = i; + logY = j; + } + num261 = -1; + } + } + } + } + } + })); + WorldGen.AddGenerationPass("Traps", (WorldGenLegacyMethod) ((progress, passConfig) => + { + if (WorldGen.notTheBees) + return; + WorldGen.placingTraps = true; + progress.Message = Lang.gen[34].Value; + float num266 = (float) Main.maxTilesX * 0.05f; + if (WorldGen.getGoodWorldGen) + num266 *= 1.5f; + for (int index190 = 0; (double) index190 < (double) num266; ++index190) + { + progress.Set((float) ((double) index190 / (double) num266 / 2.0)); + for (int index191 = 0; index191 < 1150; ++index191) + { + int index192 = WorldGen.genRand.Next(200, Main.maxTilesX - 200); + int index193; + for (index193 = WorldGen.genRand.Next((int) Main.worldSurface, Main.maxTilesY - 210); WorldGen.oceanDepths(index192, index193); index193 = WorldGen.genRand.Next((int) Main.worldSurface, Main.maxTilesY - 210)) + index192 = WorldGen.genRand.Next(200, Main.maxTilesX - 200); + if (Main.tile[index192, index193].wall == (ushort) 0 && WorldGen.placeTrap(index192, index193)) + break; + } + } + float num267 = (float) Main.maxTilesX * (3f / 1000f); + if (WorldGen.getGoodWorldGen) + num267 *= 1.5f; + for (int index194 = 0; (double) index194 < (double) num267; ++index194) + { + progress.Set((float) ((double) index194 / (double) num267 / 2.0 + 0.5)); + for (int index195 = 0; index195 < 20000; ++index195) + { + int i = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.15), (int) ((double) Main.maxTilesX * 0.85)); + int j = WorldGen.genRand.Next((int) Main.worldSurface + 20, Main.maxTilesY - 210); + if (Main.tile[i, j].wall == (ushort) 187 && WorldGen.PlaceSandTrap(i, j)) + break; + } + } + if (WorldGen.drunkWorldGen) + { + for (int index196 = 0; index196 < 8; ++index196) + { + progress.Message = Lang.gen[34].Value; + float num268 = 100f; + for (int index197 = 0; (double) index197 < (double) num268; ++index197) + { + progress.Set((float) index197 / num268); + Thread.Sleep(10); + } + } + } + WorldGen.placingTraps = false; + })); + WorldGen.AddGenerationPass("Piles", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[89].Value; + Main.tileSolid[229] = false; + Main.tileSolid[190] = false; + Main.tileSolid[196] = false; + Main.tileSolid[189] = false; + Main.tileSolid[202] = false; + Main.tileSolid[460] = false; + for (int index198 = 0; (double) index198 < (double) Main.maxTilesX * 0.06; ++index198) + { + int num269 = Main.maxTilesX / 2; + bool flag = false; + while (!flag && num269 > 0) + { + --num269; + int index199 = WorldGen.genRand.Next(25, Main.maxTilesX - 25); + int index200; + for (index200 = WorldGen.genRand.Next((int) Main.worldSurface, Main.maxTilesY - 300); WorldGen.oceanDepths(index199, index200); index200 = WorldGen.genRand.Next((int) Main.worldSurface, Main.maxTilesY - 300)) + index199 = WorldGen.genRand.Next(25, Main.maxTilesX - 25); + if (!Main.tile[index199, index200].active()) + { + int Type = 186; + while (!Main.tile[index199, index200 + 1].active() && index200 < Main.maxTilesY - 5) + ++index200; + int style = WorldGen.genRand.Next(22); + switch (style) + { + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + style = WorldGen.genRand.Next(22); + break; + } + if ((Main.tile[index199, index200 + 1].type == (ushort) 0 || Main.tile[index199, index200 + 1].type == (ushort) 1 || Main.tileMoss[(int) Main.tile[index199, index200 + 1].type]) && WorldGen.genRand.Next(5) == 0) + { + style = WorldGen.genRand.Next(23, 29); + Type = 187; + } + if (index200 > Main.maxTilesY - 300 || Main.wallDungeon[(int) Main.tile[index199, index200].wall] || Main.tile[index199, index200 + 1].type == (ushort) 30 || Main.tile[index199, index200 + 1].type == (ushort) 19 || Main.tile[index199, index200 + 1].type == (ushort) 25 || Main.tile[index199, index200 + 1].type == (ushort) 203) + { + style = WorldGen.genRand.Next(7); + Type = 186; + } + if (Main.tile[index199, index200 + 1].type == (ushort) 147 || Main.tile[index199, index200 + 1].type == (ushort) 161 || Main.tile[index199, index200 + 1].type == (ushort) 162) + { + style = WorldGen.genRand.Next(26, 32); + Type = 186; + } + if (Main.tile[index199, index200 + 1].type == (ushort) 60) + { + Type = 187; + style = WorldGen.genRand.Next(6); + } + if ((Main.tile[index199, index200 + 1].type == (ushort) 57 || Main.tile[index199, index200 + 1].type == (ushort) 58) && WorldGen.genRand.Next(3) < 2) + { + Type = 187; + style = WorldGen.genRand.Next(6, 9); + } + if (Main.tile[index199, index200 + 1].type == (ushort) 226) + { + Type = 187; + style = WorldGen.genRand.Next(18, 23); + } + if (Main.tile[index199, index200 + 1].type == (ushort) 70) + { + style = WorldGen.genRand.Next(32, 35); + Type = 186; + } + if (Main.tile[index199, index200 + 1].type == (ushort) 396 || Main.tile[index199, index200 + 1].type == (ushort) 397 || Main.tile[index199, index200 + 1].type == (ushort) 404) + { + style = WorldGen.genRand.Next(29, 35); + Type = 187; + } + if (Main.tile[index199, index200 + 1].type == (ushort) 368) + { + style = WorldGen.genRand.Next(35, 41); + Type = 187; + } + if (Main.tile[index199, index200 + 1].type == (ushort) 367) + { + style = WorldGen.genRand.Next(41, 47); + Type = 187; + } + if (Type == 186 && style >= 7 && style <= 15 && WorldGen.genRand.Next(75) == 0) + { + Type = 187; + style = 17; + } + if (Main.wallDungeon[(int) Main.tile[index199, index200].wall] && WorldGen.genRand.Next(3) != 0) + { + flag = true; + } + else + { + WorldGen.PlaceTile(index199, index200, Type, true, style: style); + if (Main.tile[index199, index200].type == (ushort) 186 || Main.tile[index199, index200].type == (ushort) 187) + flag = true; + if (flag && Type == 186 && style <= 7) + { + int num270 = WorldGen.genRand.Next(1, 5); + for (int index201 = 0; index201 < num270; ++index201) + { + int i = index199 + WorldGen.genRand.Next(-10, 11); + int j = index200 - WorldGen.genRand.Next(5); + if (!Main.tile[i, j].active()) + { + while (!Main.tile[i, j + 1].active() && j < Main.maxTilesY - 5) + ++j; + int X = WorldGen.genRand.Next(12, 36); + WorldGen.PlaceSmallPile(i, j, X, 0); + } + } + } + } + } + } + } + for (int index202 = 0; (double) index202 < (double) Main.maxTilesX * 0.01; ++index202) + { + int num271 = Main.maxTilesX / 2; + bool flag = false; + while (!flag && num271 > 0) + { + --num271; + int i8 = WorldGen.genRand.Next(25, Main.maxTilesX - 25); + int j7 = WorldGen.genRand.Next(Main.maxTilesY - 300, Main.maxTilesY - 10); + if (!Main.tile[i8, j7].active()) + { + int Type = 186; + while (!Main.tile[i8, j7 + 1].active() && j7 < Main.maxTilesY - 5) + ++j7; + int style = WorldGen.genRand.Next(22); + switch (style) + { + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + style = WorldGen.genRand.Next(22); + break; + } + if (j7 > Main.maxTilesY - 300 || Main.wallDungeon[(int) Main.tile[i8, j7].wall] || Main.tile[i8, j7 + 1].type == (ushort) 30 || Main.tile[i8, j7 + 1].type == (ushort) 19) + style = WorldGen.genRand.Next(7); + if ((Main.tile[i8, j7 + 1].type == (ushort) 57 || Main.tile[i8, j7 + 1].type == (ushort) 58) && WorldGen.genRand.Next(3) < 2) + { + Type = 187; + style = WorldGen.genRand.Next(6, 9); + } + if (Main.tile[i8, j7 + 1].type == (ushort) 147 || Main.tile[i8, j7 + 1].type == (ushort) 161 || Main.tile[i8, j7 + 1].type == (ushort) 162) + style = WorldGen.genRand.Next(26, 32); + WorldGen.PlaceTile(i8, j7, Type, true, style: style); + if (Main.tile[i8, j7].type == (ushort) 186 || Main.tile[i8, j7].type == (ushort) 187) + flag = true; + if (flag && Type == 186 && style <= 7) + { + int num272 = WorldGen.genRand.Next(1, 5); + for (int index203 = 0; index203 < num272; ++index203) + { + int i9 = i8 + WorldGen.genRand.Next(-10, 11); + int j8 = j7 - WorldGen.genRand.Next(5); + if (!Main.tile[i9, j8].active()) + { + while (!Main.tile[i9, j8 + 1].active() && j8 < Main.maxTilesY - 5) + ++j8; + int X = WorldGen.genRand.Next(12, 36); + WorldGen.PlaceSmallPile(i9, j8, X, 0); + } + } + } + } + } + } + for (int index204 = 0; (double) index204 < (double) Main.maxTilesX * 0.003; ++index204) + { + int num273 = Main.maxTilesX / 2; + bool flag = false; + while (!flag && num273 > 0) + { + --num273; + int Type = 186; + int index205 = WorldGen.genRand.Next(25, Main.maxTilesX - 25); + int index206; + for (index206 = WorldGen.genRand.Next(10, (int) Main.worldSurface); WorldGen.oceanDepths(index205, index206); index206 = WorldGen.genRand.Next(10, (int) Main.worldSurface)) + index205 = WorldGen.genRand.Next(25, Main.maxTilesX - 25); + if (!Main.tile[index205, index206].active()) + { + while (!Main.tile[index205, index206 + 1].active() && index206 < Main.maxTilesY - 5) + ++index206; + int style = WorldGen.genRand.Next(7, 13); + if (index206 > Main.maxTilesY - 300 || Main.wallDungeon[(int) Main.tile[index205, index206].wall] || Main.tile[index205, index206 + 1].type == (ushort) 30 || Main.tile[index205, index206 + 1].type == (ushort) 19 || Main.tile[index205, index206 + 1].type == (ushort) 25 || Main.tile[index205, index206 + 1].type == (ushort) 203 || Main.tile[index205, index206 + 1].type == (ushort) 234 || Main.tile[index205, index206 + 1].type == (ushort) 112) + style = -1; + if (Main.tile[index205, index206 + 1].type == (ushort) 147 || Main.tile[index205, index206 + 1].type == (ushort) 161 || Main.tile[index205, index206 + 1].type == (ushort) 162) + style = WorldGen.genRand.Next(26, 32); + if (Main.tile[index205, index206 + 1].type == (ushort) 53) + { + Type = 187; + style = WorldGen.genRand.Next(52, 55); + } + if (Main.tile[index205, index206 + 1].type == (ushort) 2 || Main.tile[index205 - 1, index206 + 1].type == (ushort) 2 || Main.tile[index205 + 1, index206 + 1].type == (ushort) 2) + { + Type = 187; + style = WorldGen.genRand.Next(14, 17); + } + if (Main.tile[index205, index206 + 1].type == (ushort) 151 || Main.tile[index205, index206 + 1].type == (ushort) 274) + { + Type = 186; + style = WorldGen.genRand.Next(7); + } + if (style >= 0) + WorldGen.PlaceTile(index205, index206, Type, true, style: style); + if ((int) Main.tile[index205, index206].type == Type) + flag = true; + } + } + } + for (int index207 = 0; (double) index207 < (double) Main.maxTilesX * 0.0035; ++index207) + { + int num274 = Main.maxTilesX / 2; + bool flag = false; + while (!flag && num274 > 0) + { + --num274; + int i10 = WorldGen.genRand.Next(25, Main.maxTilesX - 25); + int j9 = WorldGen.genRand.Next(10, (int) Main.worldSurface); + if (!Main.tile[i10, j9].active() && Main.tile[i10, j9].wall > (ushort) 0) + { + int Type = 186; + while (!Main.tile[i10, j9 + 1].active() && j9 < Main.maxTilesY - 5) + ++j9; + int style = WorldGen.genRand.Next(7, 13); + if (j9 > Main.maxTilesY - 300 || Main.wallDungeon[(int) Main.tile[i10, j9].wall] || Main.tile[i10, j9 + 1].type == (ushort) 30 || Main.tile[i10, j9 + 1].type == (ushort) 19) + style = -1; + if (Main.tile[i10, j9 + 1].type == (ushort) 25) + style = WorldGen.genRand.Next(7); + if (Main.tile[i10, j9 + 1].type == (ushort) 147 || Main.tile[i10, j9 + 1].type == (ushort) 161 || Main.tile[i10, j9 + 1].type == (ushort) 162) + style = WorldGen.genRand.Next(26, 32); + if (Main.tile[i10, j9 + 1].type == (ushort) 2 || Main.tile[i10 - 1, j9 + 1].type == (ushort) 2 || Main.tile[i10 + 1, j9 + 1].type == (ushort) 2) + { + Type = 187; + style = WorldGen.genRand.Next(14, 17); + } + if (Main.tile[i10, j9 + 1].type == (ushort) 151 || Main.tile[i10, j9 + 1].type == (ushort) 274) + { + Type = 186; + style = WorldGen.genRand.Next(7); + } + if (style >= 0) + WorldGen.PlaceTile(i10, j9, Type, true, style: style); + if ((int) Main.tile[i10, j9].type == Type) + flag = true; + if (flag && style <= 7) + { + int num275 = WorldGen.genRand.Next(1, 5); + for (int index208 = 0; index208 < num275; ++index208) + { + int i11 = i10 + WorldGen.genRand.Next(-10, 11); + int j10 = j9 - WorldGen.genRand.Next(5); + if (!Main.tile[i11, j10].active()) + { + while (!Main.tile[i11, j10 + 1].active() && j10 < Main.maxTilesY - 5) + ++j10; + int X = WorldGen.genRand.Next(12, 36); + WorldGen.PlaceSmallPile(i11, j10, X, 0); + } + } + } + } + } + } + for (int index209 = 0; (double) index209 < (double) Main.maxTilesX * 0.6; ++index209) + { + int num276 = Main.maxTilesX / 2; + bool flag = false; + while (!flag && num276 > 0) + { + --num276; + int index210 = WorldGen.genRand.Next(25, Main.maxTilesX - 25); + int index211 = WorldGen.genRand.Next((int) Main.worldSurface, Main.maxTilesY - 20); + if (Main.tile[index210, index211].wall == (ushort) 87 && WorldGen.genRand.Next(2) == 0) + { + index210 = WorldGen.genRand.Next(25, Main.maxTilesX - 25); + index211 = WorldGen.genRand.Next((int) Main.worldSurface, Main.maxTilesY - 20); + } + for (; WorldGen.oceanDepths(index210, index211); index211 = WorldGen.genRand.Next((int) Main.worldSurface, Main.maxTilesY - 20)) + index210 = WorldGen.genRand.Next(25, Main.maxTilesX - 25); + if (!Main.tile[index210, index211].active()) + { + while (!Main.tile[index210, index211 + 1].active() && index211 < Main.maxTilesY - 5) + ++index211; + int Y = WorldGen.genRand.Next(2); + int X1 = WorldGen.genRand.Next(36); + switch (X1) + { + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + X1 = WorldGen.genRand.Next(36); + break; + } + if (Y == 1) + { + X1 = WorldGen.genRand.Next(25); + switch (X1) + { + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + X1 = WorldGen.genRand.Next(25); + break; + } + } + if (index211 > Main.maxTilesY - 300) + { + if (Y == 0) + X1 = WorldGen.genRand.Next(12, 28); + if (Y == 1) + X1 = WorldGen.genRand.Next(6, 16); + } + if (Main.wallDungeon[(int) Main.tile[index210, index211].wall] || Main.tile[index210, index211 + 1].type == (ushort) 30 || Main.tile[index210, index211 + 1].type == (ushort) 19 || Main.tile[index210, index211 + 1].type == (ushort) 25 || Main.tile[index210, index211 + 1].type == (ushort) 203 || Main.tile[index210, index211].wall == (ushort) 87) + { + if (Y == 0 && X1 < 12) + X1 += 12; + if (Y == 1 && X1 < 6) + X1 += 6; + if (Y == 1 && X1 >= 17) + X1 -= 10; + } + if (Main.tile[index210, index211 + 1].type == (ushort) 147 || Main.tile[index210, index211 + 1].type == (ushort) 161 || Main.tile[index210, index211 + 1].type == (ushort) 162) + { + if (Y == 0 && X1 < 12) + X1 += 36; + if (Y == 1 && X1 >= 20) + X1 += 6; + if (Y == 1 && X1 < 6) + X1 += 25; + } + if (Main.tile[index210, index211 + 1].type == (ushort) 151 || Main.tile[index210, index211 + 1].type == (ushort) 274) + { + if (Y == 0) + X1 = WorldGen.genRand.Next(12, 28); + if (Y == 1) + X1 = WorldGen.genRand.Next(12, 19); + } + if (Main.tile[index210, index211 + 1].type == (ushort) 368) + { + if (Y == 0) + X1 = WorldGen.genRand.Next(60, 66); + if (Y == 1) + X1 = WorldGen.genRand.Next(47, 53); + } + if (Main.tile[index210, index211 + 1].type == (ushort) 367) + { + if (Y == 0) + X1 = WorldGen.genRand.Next(66, 72); + if (Y == 1) + X1 = WorldGen.genRand.Next(53, 59); + } + flag = Main.wallDungeon[(int) Main.tile[index210, index211].wall] && WorldGen.genRand.Next(3) != 0 || WorldGen.PlaceSmallPile(index210, index211, X1, Y); + if (flag && Y == 1 && X1 >= 6 && X1 <= 15) + { + int num277 = WorldGen.genRand.Next(1, 5); + for (int index212 = 0; index212 < num277; ++index212) + { + int i = index210 + WorldGen.genRand.Next(-10, 11); + int j = index211 - WorldGen.genRand.Next(5); + if (!Main.tile[i, j].active()) + { + while (!Main.tile[i, j + 1].active() && j < Main.maxTilesY - 5) + ++j; + int X2 = WorldGen.genRand.Next(12, 36); + WorldGen.PlaceSmallPile(i, j, X2, 0); + } + } + } + } + } + } + for (int index213 = 0; (double) index213 < (double) Main.maxTilesX * 0.0199999995529652; ++index213) + { + int num278 = Main.maxTilesX / 2; + bool flag = false; + while (!flag && num278 > 0) + { + --num278; + int index214 = WorldGen.genRand.Next(25, Main.maxTilesX - 25); + int index215; + for (index215 = WorldGen.genRand.Next(15, (int) Main.worldSurface); WorldGen.oceanDepths(index214, index215); index215 = WorldGen.genRand.Next(15, (int) Main.worldSurface)) + index214 = WorldGen.genRand.Next(25, Main.maxTilesX - 25); + if (!Main.tile[index214, index215].active()) + { + while (!Main.tile[index214, index215 + 1].active() && index215 < Main.maxTilesY - 5) + ++index215; + int Y = WorldGen.genRand.Next(2); + int X = WorldGen.genRand.Next(11); + if (Y == 1) + X = WorldGen.genRand.Next(5); + if (Main.tile[index214, index215 + 1].type == (ushort) 147 || Main.tile[index214, index215 + 1].type == (ushort) 161 || Main.tile[index214, index215 + 1].type == (ushort) 162) + { + if (Y == 0 && X < 12) + X += 36; + if (Y == 1 && X >= 20) + X += 6; + if (Y == 1 && X < 6) + X += 25; + } + if (Main.tile[index214, index215 + 1].type == (ushort) 2 && Y == 1) + X = WorldGen.genRand.Next(38, 41); + if (Main.tile[index214, index215 + 1].type == (ushort) 151 || Main.tile[index214, index215 + 1].type == (ushort) 274) + { + if (Y == 0) + X = WorldGen.genRand.Next(12, 28); + if (Y == 1) + X = WorldGen.genRand.Next(12, 19); + } + if (!Main.wallDungeon[(int) Main.tile[index214, index215].wall] && Main.tile[index214, index215 + 1].type != (ushort) 30 && Main.tile[index214, index215 + 1].type != (ushort) 19 && Main.tile[index214, index215 + 1].type != (ushort) 41 && Main.tile[index214, index215 + 1].type != (ushort) 43 && Main.tile[index214, index215 + 1].type != (ushort) 44 && Main.tile[index214, index215 + 1].type != (ushort) 481 && Main.tile[index214, index215 + 1].type != (ushort) 482 && Main.tile[index214, index215 + 1].type != (ushort) 483 && Main.tile[index214, index215 + 1].type != (ushort) 45 && Main.tile[index214, index215 + 1].type != (ushort) 46 && Main.tile[index214, index215 + 1].type != (ushort) 47 && Main.tile[index214, index215 + 1].type != (ushort) 175 && Main.tile[index214, index215 + 1].type != (ushort) 176 && Main.tile[index214, index215 + 1].type != (ushort) 177 && Main.tile[index214, index215 + 1].type != (ushort) 53 && Main.tile[index214, index215 + 1].type != (ushort) 25 && Main.tile[index214, index215 + 1].type != (ushort) 203) + flag = WorldGen.PlaceSmallPile(index214, index215, X, Y); + } + } + } + for (int index = 0; (double) index < (double) Main.maxTilesX * 0.150000005960464; ++index) + { + int num279 = Main.maxTilesX / 2; + bool flag = false; + while (!flag && num279 > 0) + { + --num279; + int i = WorldGen.genRand.Next(25, Main.maxTilesX - 25); + int j = WorldGen.genRand.Next(15, (int) Main.worldSurface); + if (!Main.tile[i, j].active() && (Main.tile[i, j].wall == (ushort) 2 || Main.tile[i, j].wall == (ushort) 40)) + { + while (!Main.tile[i, j + 1].active() && j < Main.maxTilesY - 5) + ++j; + int Y = WorldGen.genRand.Next(2); + int X = WorldGen.genRand.Next(11); + if (Y == 1) + X = WorldGen.genRand.Next(5); + if (Main.tile[i, j + 1].type == (ushort) 147 || Main.tile[i, j + 1].type == (ushort) 161 || Main.tile[i, j + 1].type == (ushort) 162) + { + if (Y == 0 && X < 12) + X += 36; + if (Y == 1 && X >= 20) + X += 6; + if (Y == 1 && X < 6) + X += 25; + } + if (Main.tile[i, j + 1].type == (ushort) 2 && Y == 1) + X = WorldGen.genRand.Next(38, 41); + if (Main.tile[i, j + 1].type == (ushort) 151 || Main.tile[i, j + 1].type == (ushort) 274) + { + if (Y == 0) + X = WorldGen.genRand.Next(12, 28); + if (Y == 1) + X = WorldGen.genRand.Next(12, 19); + } + if ((Main.tile[i, j].liquid != byte.MaxValue || Main.tile[i, j + 1].type != (ushort) 53 || Main.tile[i, j].wall != (ushort) 0) && !Main.wallDungeon[(int) Main.tile[i, j].wall] && Main.tile[i, j + 1].type != (ushort) 30 && Main.tile[i, j + 1].type != (ushort) 19 && Main.tile[i, j + 1].type != (ushort) 41 && Main.tile[i, j + 1].type != (ushort) 43 && Main.tile[i, j + 1].type != (ushort) 44 && Main.tile[i, j + 1].type != (ushort) 481 && Main.tile[i, j + 1].type != (ushort) 482 && Main.tile[i, j + 1].type != (ushort) 483 && Main.tile[i, j + 1].type != (ushort) 45 && Main.tile[i, j + 1].type != (ushort) 46 && Main.tile[i, j + 1].type != (ushort) 47 && Main.tile[i, j + 1].type != (ushort) 175 && Main.tile[i, j + 1].type != (ushort) 176 && Main.tile[i, j + 1].type != (ushort) 177 && Main.tile[i, j + 1].type != (ushort) 25 && Main.tile[i, j + 1].type != (ushort) 203) + flag = WorldGen.PlaceSmallPile(i, j, X, Y); + } + } + } + Main.tileSolid[190] = true; + Main.tileSolid[192] = true; + Main.tileSolid[196] = true; + Main.tileSolid[189] = true; + Main.tileSolid[202] = true; + Main.tileSolid[225] = true; + Main.tileSolid[460] = true; + })); + WorldGen.AddGenerationPass("Spawn Point", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Set(1f); + int num280 = 5; + bool flag = true; + while (flag) + { + int index216 = Main.maxTilesX / 2 + WorldGen.genRand.Next(-num280, num280 + 1); + for (int index217 = 0; index217 < Main.maxTilesY; ++index217) + { + if (Main.tile[index216, index217].active()) + { + Main.spawnTileX = index216; + Main.spawnTileY = index217; + break; + } + } + flag = false; + ++num280; + if ((double) Main.spawnTileY > Main.worldSurface) + flag = true; + if (Main.tile[Main.spawnTileX, Main.spawnTileY - 1].liquid > (byte) 0) + flag = true; + } + int num281 = 10; + while ((double) Main.spawnTileY > Main.worldSurface) + { + int index218 = WorldGen.genRand.Next(Main.maxTilesX / 2 - num281, Main.maxTilesX / 2 + num281); + for (int index219 = 0; index219 < Main.maxTilesY; ++index219) + { + if (Main.tile[index218, index219].active()) + { + Main.spawnTileX = index218; + Main.spawnTileY = index219; + break; + } + } + ++num281; + } + })); + WorldGen.AddGenerationPass("Grass Wall", (WorldGenLegacyMethod) ((progress, passConfig) => + { + WorldGen.maxTileCount = 3500; + progress.Set(1f); + for (int index220 = 50; index220 < Main.maxTilesX - 50; ++index220) + { + for (int index221 = 0; (double) index221 < Main.worldSurface - 10.0; ++index221) + { + if (WorldGen.genRand.Next(4) == 0) + { + bool flag = false; + int x = -1; + int y = -1; + if (Main.tile[index220, index221].active() && Main.tile[index220, index221].type == (ushort) 2 && (Main.tile[index220, index221].wall == (ushort) 2 || Main.tile[index220, index221].wall == (ushort) 63)) + { + for (int i = index220 - 1; i <= index220 + 1; ++i) + { + for (int j = index221 - 1; j <= index221 + 1; ++j) + { + if (Main.tile[i, j].wall == (ushort) 0 && !WorldGen.SolidTile(i, j)) + flag = true; + } + } + if (flag) + { + for (int i = index220 - 1; i <= index220 + 1; ++i) + { + for (int j = index221 - 1; j <= index221 + 1; ++j) + { + if ((Main.tile[i, j].wall == (ushort) 2 || Main.tile[i, j].wall == (ushort) 15) && !WorldGen.SolidTile(i, j)) + { + x = i; + y = j; + } + } + } + } + } + if (flag && x > -1 && y > -1) + { + if (WorldGen.countDirtTiles(x, y) < WorldGen.maxTileCount) + { + try + { + WorldGen.Spread.Wall2(x, y, 63); + } + catch + { + } + } + } + } + } + } + for (int i = 5; i < Main.maxTilesX - 5; ++i) + { + for (int j = 10; (double) j < Main.worldSurface - 1.0; ++j) + { + if (Main.tile[i, j].wall == (ushort) 63 && WorldGen.genRand.Next(10) == 0) + Main.tile[i, j].wall = (ushort) 65; + if (Main.tile[i, j].active() && Main.tile[i, j].type == (ushort) 0) + { + bool flag = false; + for (int index222 = i - 1; index222 <= i + 1; ++index222) + { + for (int index223 = j - 1; index223 <= j + 1; ++index223) + { + if (Main.tile[index222, index223].wall == (ushort) 63 || Main.tile[index222, index223].wall == (ushort) 65) + { + flag = true; + break; + } + } + } + if (flag) + WorldGen.SpreadGrass(i, j); + } + } + } + })); + WorldGen.AddGenerationPass("Guide", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Set(1f); + if (WorldGen.getGoodWorldGen) + { + int index = NPC.NewNPC(Main.spawnTileX * 16, Main.spawnTileY * 16, 38); + Main.npc[index].homeTileX = Main.spawnTileX; + Main.npc[index].homeTileY = Main.spawnTileY; + Main.npc[index].direction = 1; + Main.npc[index].homeless = true; + } + else if (WorldGen.drunkWorldGen) + { + int index = NPC.NewNPC(Main.spawnTileX * 16, Main.spawnTileY * 16, 208); + Main.npc[index].homeTileX = Main.spawnTileX; + Main.npc[index].homeTileY = Main.spawnTileY; + Main.npc[index].direction = 1; + Main.npc[index].homeless = true; + } + else if (WorldGen.notTheBees) + { + int index = NPC.NewNPC(Main.spawnTileX * 16, Main.spawnTileY * 16, 17); + Main.npc[index].homeTileX = Main.spawnTileX; + Main.npc[index].homeTileY = Main.spawnTileY; + Main.npc[index].direction = 1; + Main.npc[index].homeless = true; + } + else + { + int index = NPC.NewNPC(Main.spawnTileX * 16, Main.spawnTileY * 16, 22); + Main.npc[index].homeTileX = Main.spawnTileX; + Main.npc[index].homeTileY = Main.spawnTileY; + Main.npc[index].direction = 1; + Main.npc[index].homeless = true; + } + })); + WorldGen.AddGenerationPass("Sunflowers", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[39].Value; + for (int index224 = 0; (double) index224 < (double) Main.maxTilesX * 0.002; ++index224) + { + progress.Set((float) ((double) index224 / (double) Main.maxTilesX * (1.0 / 500.0))); + int num282 = Main.maxTilesX / 2; + int num283 = WorldGen.genRand.Next(Main.maxTilesX); + int num284 = num283 - WorldGen.genRand.Next(10) - 7; + int num285 = num283 + WorldGen.genRand.Next(10) + 7; + if (num284 < 0) + num284 = 0; + if (num285 > Main.maxTilesX - 1) + num285 = Main.maxTilesX - 1; + for (int i = num284; i < num285; ++i) + { + for (int index225 = 1; (double) index225 < Main.worldSurface - 1.0; ++index225) + { + if (Main.tile[i, index225].type == (ushort) 2 && Main.tile[i, index225].active() && !Main.tile[i, index225 - 1].active()) + WorldGen.PlaceTile(i, index225 - 1, 27, true); + if (Main.tile[i, index225].active()) + break; + } + } + } + })); + WorldGen.AddGenerationPass("Planting Trees", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[40].Value; + if (!WorldGen.drunkWorldGen) + { + for (int index = 0; (double) index < (double) Main.maxTilesX * 0.003; ++index) + { + progress.Set((float) ((double) index / (double) Main.maxTilesX * (3.0 / 1000.0))); + int num286 = WorldGen.genRand.Next(50, Main.maxTilesX - 50); + int num287 = WorldGen.genRand.Next(25, 50); + for (int i = num286 - num287; i < num286 + num287; ++i) + { + for (int y = 20; (double) y < Main.worldSurface; ++y) + WorldGen.GrowEpicTree(i, y); + } + } + } + WorldGen.AddTrees(); + })); + WorldGen.AddGenerationPass("Herbs", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[41].Value; + for (int index = 0; (double) index < (double) Main.maxTilesX * 1.7; ++index) + { + progress.Set((float) ((double) index / (double) Main.maxTilesX * 1.70000004768372)); + WorldGen.PlantAlch(); + } + })); + WorldGen.AddGenerationPass("Dye Plants", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Set(1f); + for (int index = 0; index < Main.maxTilesX; ++index) + WorldGen.plantDye(WorldGen.genRand.Next(100, Main.maxTilesX - 100), WorldGen.genRand.Next(100, Main.UnderworldLayer)); + WorldGen.MatureTheHerbPlants(); + })); + WorldGen.AddGenerationPass("Webs And Honey", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Set(1f); + for (int index = 100; index < Main.maxTilesX - 100; ++index) + { + for (int worldSurface4 = (int) Main.worldSurface; worldSurface4 < Main.maxTilesY - 100; ++worldSurface4) + { + if (Main.tile[index, worldSurface4].wall == (ushort) 86) + { + if (Main.tile[index, worldSurface4].liquid > (byte) 0) + Main.tile[index, worldSurface4].honey(true); + if (WorldGen.genRand.Next(3) == 0) + WorldGen.PlaceTight(index, worldSurface4); + } + if (Main.tile[index, worldSurface4].wall == (ushort) 62) + { + Main.tile[index, worldSurface4].liquid = (byte) 0; + Main.tile[index, worldSurface4].lava(false); + } + if (Main.tile[index, worldSurface4].wall == (ushort) 62 && !Main.tile[index, worldSurface4].active() && WorldGen.genRand.Next(10) != 0) + { + int num288 = WorldGen.genRand.Next(2, 5); + int num289 = index - num288; + int num290 = index + num288; + int num291 = worldSurface4 - num288; + int num292 = worldSurface4 + num288; + bool flag = false; + for (int i = num289; i <= num290; ++i) + { + for (int j = num291; j <= num292; ++j) + { + if (WorldGen.SolidTile(i, j)) + { + flag = true; + break; + } + } + } + if (flag) + { + WorldGen.PlaceTile(index, worldSurface4, 51, true); + WorldGen.TileFrame(index, worldSurface4); + } + } + } + } + })); + WorldGen.AddGenerationPass("Weeds", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[42].Value; + if (Main.halloween) + { + for (int index226 = 40; index226 < Main.maxTilesX - 40; ++index226) + { + for (int index227 = 50; (double) index227 < Main.worldSurface; ++index227) + { + if (Main.tile[index226, index227].active() && Main.tile[index226, index227].type == (ushort) 2 && WorldGen.genRand.Next(15) == 0) + { + WorldGen.PlacePumpkin(index226, index227 - 1); + int num293 = WorldGen.genRand.Next(5); + for (int index228 = 0; index228 < num293; ++index228) + WorldGen.GrowPumpkin(index226, index227 - 1, 254); + } + } + } + } + for (int i = 0; i < Main.maxTilesX; ++i) + { + progress.Set((float) i / (float) Main.maxTilesX); + for (int index = 1; index < Main.maxTilesY; ++index) + { + if (Main.tile[i, index].type == (ushort) 2 && Main.tile[i, index].nactive()) + { + if (!Main.tile[i, index - 1].active()) + WorldGen.PlaceTile(i, index - 1, 3, true); + } + else if (Main.tile[i, index].type == (ushort) 23 && Main.tile[i, index].nactive()) + { + if (!Main.tile[i, index - 1].active()) + WorldGen.PlaceTile(i, index - 1, 24, true); + } + else if (Main.tile[i, index].type == (ushort) 199 && Main.tile[i, index].nactive() && !Main.tile[i, index - 1].active()) + WorldGen.PlaceTile(i, index - 1, 201, true); + } + } + })); + WorldGen.AddGenerationPass("Glowing Mushrooms and Jungle Plants", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Set(1f); + for (int i = 0; i < Main.maxTilesX; ++i) + { + for (int y = 0; y < Main.maxTilesY; ++y) + { + if (Main.tile[i, y].active()) + { + if (y >= (int) Main.worldSurface && Main.tile[i, y].type == (ushort) 70 && !Main.tile[i, y - 1].active()) + { + WorldGen.GrowTree(i, y); + if (!Main.tile[i, y - 1].active()) + { + WorldGen.GrowTree(i, y); + if (!Main.tile[i, y - 1].active()) + { + WorldGen.GrowShroom(i, y); + if (!Main.tile[i, y - 1].active()) + WorldGen.PlaceTile(i, y - 1, 71, true); + } + } + } + if (Main.tile[i, y].type == (ushort) 60 && !Main.tile[i, y - 1].active()) + WorldGen.PlaceTile(i, y - 1, 61, true); + } + } + } + })); + WorldGen.AddGenerationPass("Jungle Plants", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Set(1f); + for (int index229 = 0; index229 < Main.maxTilesX * 100; ++index229) + { + int X2 = WorldGen.genRand.Next(40, Main.maxTilesX / 2 - 40); + if (dungeonSide < 0) + X2 += Main.maxTilesX / 2; + int index230 = WorldGen.genRand.Next(Main.maxTilesY - 300); + while (!Main.tile[X2, index230].active() && index230 < Main.maxTilesY - 300) + ++index230; + if (Main.tile[X2, index230].active() && Main.tile[X2, index230].type == (ushort) 60) + { + int Y2 = index230 - 1; + WorldGen.PlaceJunglePlant(X2, Y2, (ushort) 233, WorldGen.genRand.Next(8), 0); + if (Main.tile[X2, Y2].type != (ushort) 233) + WorldGen.PlaceJunglePlant(X2, Y2, (ushort) 233, WorldGen.genRand.Next(12), 1); + } + } + })); + WorldGen.AddGenerationPass("Vines", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[43].Value; + for (int index231 = 5; index231 < Main.maxTilesX - 5; ++index231) + { + progress.Set((float) index231 / (float) Main.maxTilesX); + int num294 = 0; + ushort num295 = 52; + for (int y = 0; (double) y < Main.worldSurface; ++y) + { + if (num294 > 0 && !Main.tile[index231, y].active()) + { + Main.tile[index231, y].active(true); + Main.tile[index231, y].type = num295; + Main.tile[index231, y].color(Main.tile[index231, y - 1].color()); + --num294; + } + else + num294 = 0; + if (Main.tile[index231, y].active() && !Main.tile[index231, y].bottomSlope() && (Main.tile[index231, y].type == (ushort) 2 || Main.tile[index231, y].type == (ushort) 192 && WorldGen.genRand.Next(4) == 0) && WorldGen.GrowMoreVines(index231, y)) + { + num295 = (ushort) 52; + if (Main.tile[index231, y].wall == (ushort) 68 || Main.tile[index231, y].wall == (ushort) 65 || Main.tile[index231, y].wall == (ushort) 66 || Main.tile[index231, y].wall == (ushort) 63) + num295 = (ushort) 382; + else if (Main.tile[index231, y + 1].wall == (ushort) 68 || Main.tile[index231, y + 1].wall == (ushort) 65 || Main.tile[index231, y + 1].wall == (ushort) 66 || Main.tile[index231, y + 1].wall == (ushort) 63) + num295 = (ushort) 382; + if (WorldGen.genRand.Next(5) < 3) + num294 = WorldGen.genRand.Next(1, 10); + } + } + int num296 = 0; + for (int index232 = 5; index232 < Main.maxTilesY - 5; ++index232) + { + if (num296 > 0 && !Main.tile[index231, index232].active()) + { + Main.tile[index231, index232].active(true); + Main.tile[index231, index232].type = (ushort) 62; + --num296; + } + else + num296 = 0; + if (Main.tile[index231, index232].active() && Main.tile[index231, index232].type == (ushort) 60 && !Main.tile[index231, index232].bottomSlope() && WorldGen.GrowMoreVines(index231, index232)) + { + if (WorldGen.notTheBees && index232 < Main.maxTilesY - 10 && Main.tile[index231, index232 - 1].active() && !Main.tile[index231, index232 - 1].bottomSlope() && Main.tile[index231 + 1, index232 - 1].active() && !Main.tile[index231 + 1, index232 - 1].bottomSlope() && (Main.tile[index231, index232 - 1].type == (ushort) 60 || Main.tile[index231, index232 - 1].type == (ushort) 444 || Main.tile[index231, index232 - 1].type == (ushort) 230)) + { + bool flag = true; + for (int index233 = index231; index233 < index231 + 2; ++index233) + { + for (int index234 = index232 + 1; index234 < index232 + 3; ++index234) + { + if (Main.tile[index233, index234].active() && (!Main.tileCut[(int) Main.tile[index233, index234].type] || Main.tile[index233, index234].type == (ushort) 444)) + { + flag = false; + break; + } + if (Main.tile[index233, index234].liquid > (byte) 0 || Main.wallHouse[(int) Main.tile[index233, index234].wall]) + { + flag = false; + break; + } + } + if (!flag) + break; + } + if (flag) + { + if (WorldGen.CountNearBlocksTypes(index231, index232, WorldGen.genRand.Next(3, 10), 1, 444) > 0) + flag = false; + } + if (flag) + { + for (int i = index231; i < index231 + 2; ++i) + { + for (int j = index232 + 1; j < index232 + 3; ++j) + WorldGen.KillTile(i, j); + } + for (int index235 = index231; index235 < index231 + 2; ++index235) + { + for (int index236 = index232 + 1; index236 < index232 + 3; ++index236) + { + Main.tile[index235, index236].active(true); + Main.tile[index235, index236].type = (ushort) 444; + Main.tile[index235, index236].frameX = (short) ((index235 - index231) * 18); + Main.tile[index235, index236].frameY = (short) ((index236 - index232 - 1) * 18); + } + } + continue; + } + } + else if (index231 < Main.maxTilesX - 1 && index232 < Main.maxTilesY - 2 && Main.tile[index231 + 1, index232].active() && Main.tile[index231 + 1, index232].type == (ushort) 60 && !Main.tile[index231 + 1, index232].bottomSlope() && WorldGen.genRand.Next(40) == 0) + { + bool flag = true; + for (int index237 = index231; index237 < index231 + 2; ++index237) + { + for (int index238 = index232 + 1; index238 < index232 + 3; ++index238) + { + if (Main.tile[index237, index238].active() && (!Main.tileCut[(int) Main.tile[index237, index238].type] || Main.tile[index237, index238].type == (ushort) 444)) + { + flag = false; + break; + } + if (Main.tile[index237, index238].liquid > (byte) 0 || Main.wallHouse[(int) Main.tile[index237, index238].wall]) + { + flag = false; + break; + } + } + if (!flag) + break; + } + if (flag) + { + if (WorldGen.CountNearBlocksTypes(index231, index232, 20, 1, 444) > 0) + flag = false; + } + if (flag) + { + for (int i = index231; i < index231 + 2; ++i) + { + for (int j = index232 + 1; j < index232 + 3; ++j) + WorldGen.KillTile(i, j); + } + for (int index239 = index231; index239 < index231 + 2; ++index239) + { + for (int index240 = index232 + 1; index240 < index232 + 3; ++index240) + { + Main.tile[index239, index240].active(true); + Main.tile[index239, index240].type = (ushort) 444; + Main.tile[index239, index240].frameX = (short) ((index239 - index231) * 18); + Main.tile[index239, index240].frameY = (short) ((index240 - index232 - 1) * 18); + } + } + continue; + } + } + if (WorldGen.genRand.Next(5) < 3) + num296 = WorldGen.genRand.Next(1, 10); + } + } + int num297 = 0; + for (int y = 0; y < Main.maxTilesY; ++y) + { + if (num297 > 0 && !Main.tile[index231, y].active()) + { + Main.tile[index231, y].active(true); + Main.tile[index231, y].type = (ushort) 528; + --num297; + } + else + num297 = 0; + if (Main.tile[index231, y].active() && Main.tile[index231, y].type == (ushort) 70 && WorldGen.genRand.Next(5) == 0 && !Main.tile[index231, y].bottomSlope() && WorldGen.GrowMoreVines(index231, y) && WorldGen.genRand.Next(5) < 3) + num297 = WorldGen.genRand.Next(1, 10); + } + int num298 = 0; + for (int y = 0; y < Main.maxTilesY; ++y) + { + if (num298 > 0 && !Main.tile[index231, y].active()) + { + Main.tile[index231, y].active(true); + Main.tile[index231, y].type = (ushort) 205; + --num298; + } + else + num298 = 0; + if (Main.tile[index231, y].active() && !Main.tile[index231, y].bottomSlope() && Main.tile[index231, y].type == (ushort) 199 && WorldGen.GrowMoreVines(index231, y) && WorldGen.genRand.Next(5) < 3) + num298 = WorldGen.genRand.Next(1, 10); + } + } + })); + WorldGen.AddGenerationPass("Flowers", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[44].Value; + for (int index241 = 0; (double) index241 < (double) Main.maxTilesX * 0.004; ++index241) + { + progress.Set((float) ((double) index241 / (double) Main.maxTilesX * 0.00400000018998981)); + int index242 = WorldGen.genRand.Next(32, Main.maxTilesX - 32); + int num299 = WorldGen.genRand.Next(15, 30); + int num300 = WorldGen.genRand.Next(15, 30); + for (int index243 = num300; (double) index243 < Main.worldSurface - (double) num300 - 1.0; ++index243) + { + if (Main.tile[index242, index243].active()) + { + if (logX >= 0) + { + index242 = logX; + index243 = logY; + logX = -1; + } + int num301 = WorldGen.genRand.NextFromList(21, 24, 27, 30, 33, 36, 39, 42); + for (int i = index242 - num299; i < index242 + num299; ++i) + { + for (int j = index243 - num300; j < index243 + num300; ++j) + { + if (Main.tile[i, j].type != (ushort) 488 && !Main.tileSolid[(int) Main.tile[i, j].type]) + { + if (Main.tile[i, j].type == (ushort) 3) + { + Main.tile[i, j].frameX = (short) ((num301 + WorldGen.genRand.Next(3)) * 18); + if (WorldGen.genRand.Next(3) != 0) + Main.tile[i, j].type = (ushort) 73; + } + else if (Main.tile[i, j + 1].wall == (ushort) 0 && (Main.tile[i, j + 1].type == (ushort) 2 || (Main.tile[i, j + 1].type == (ushort) 40 || Main.tile[i, j + 1].type == (ushort) 1 || TileID.Sets.Ore[(int) Main.tile[i, j + 1].type]) && !Main.tile[i, j].active()) && (!Main.tile[i, j].active() || Main.tile[i, j].type == (ushort) 185 || Main.tile[i, j].type == (ushort) 186 || Main.tile[i, j].type == (ushort) 187 || Main.tile[i, j].type == (ushort) 5 && (double) i < (double) Main.maxTilesX * 0.48 || (double) i > (double) Main.maxTilesX * 0.52)) + { + if (Main.tile[i, j + 1].type == (ushort) 40 || Main.tile[i, j + 1].type == (ushort) 1 || TileID.Sets.Ore[(int) Main.tile[i, j + 1].type]) + { + Main.tile[i, j + 1].type = (ushort) 2; + if (Main.tile[i, j + 2].type == (ushort) 40 || Main.tile[i, j + 2].type == (ushort) 1 || TileID.Sets.Ore[(int) Main.tile[i, j + 2].type]) + Main.tile[i, j + 2].type = (ushort) 2; + } + WorldGen.KillTile(i, j); + if (WorldGen.genRand.Next(2) == 0) + { + Main.tile[i, j + 1].slope((byte) 0); + Main.tile[i, j + 1].halfBrick(false); + } + WorldGen.PlaceTile(i, j, 3); + if (Main.tile[i, j].active() && Main.tile[i, j].type == (ushort) 3) + { + Main.tile[i, j].frameX = (short) ((num301 + WorldGen.genRand.Next(3)) * 18); + if (WorldGen.genRand.Next(3) != 0) + Main.tile[i, j].type = (ushort) 73; + } + if (Main.tile[i, j + 2].type == (ushort) 40 || Main.tile[i, j + 2].type == (ushort) 1 || TileID.Sets.Ore[(int) Main.tile[i, j + 2].type]) + Main.tile[i, j + 2].type = (ushort) 0; + } + } + } + } + break; + } + } + } + })); + WorldGen.AddGenerationPass("Mushrooms", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[45].Value; + for (int index244 = 0; (double) index244 < (double) Main.maxTilesX * 0.002; ++index244) + { + progress.Set((float) ((double) index244 / (double) Main.maxTilesX * (1.0 / 500.0))); + int index245 = WorldGen.genRand.Next(20, Main.maxTilesX - 20); + int num302 = WorldGen.genRand.Next(4, 10); + int num303 = WorldGen.genRand.Next(15, 30); + for (int index246 = 1; (double) index246 < Main.worldSurface - 1.0; ++index246) + { + if (Main.tile[index245, index246].active()) + { + for (int index247 = index245 - num302; index247 < index245 + num302; ++index247) + { + for (int index248 = index246 - num303; index248 < index246 + num303 && index247 >= 10 && index248 >= 0 && index247 <= Main.maxTilesX - 10 && index248 <= Main.maxTilesY - 10; ++index248) + { + if (Main.tile[index247, index248].type == (ushort) 3 || Main.tile[index247, index248].type == (ushort) 24) + Main.tile[index247, index248].frameX = (short) 144; + else if (Main.tile[index247, index248].type == (ushort) 201) + Main.tile[index247, index248].frameX = (short) 270; + } + } + break; + } + } + } + })); + WorldGen.AddGenerationPass("Gems In Ice Biome", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Set(1f); + for (int index249 = 0; (double) index249 < (double) Main.maxTilesX * 0.25; ++index249) + { + int index250 = WorldGen.genRand.Next((int) (Main.worldSurface + Main.rockLayer) / 2, WorldGen.lavaLine); + int index251 = WorldGen.genRand.Next(snowMinX[index250], snowMaxX[index250]); + if (Main.tile[index251, index250].active() && (Main.tile[index251, index250].type == (ushort) 147 || Main.tile[index251, index250].type == (ushort) 161 || Main.tile[index251, index250].type == (ushort) 162 || Main.tile[index251, index250].type == (ushort) 224)) + { + int num304 = WorldGen.genRand.Next(1, 4); + int num305 = WorldGen.genRand.Next(1, 4); + int num306 = WorldGen.genRand.Next(1, 4); + int num307 = WorldGen.genRand.Next(1, 4); + int num308 = WorldGen.genRand.Next(12); + int style = num308 >= 3 ? (num308 >= 6 ? (num308 >= 8 ? (num308 >= 10 ? (num308 >= 11 ? 5 : 4) : 3) : 2) : 1) : 0; + for (int i = index251 - num304; i < index251 + num305; ++i) + { + for (int j = index250 - num306; j < index250 + num307; ++j) + { + if (!Main.tile[i, j].active()) + WorldGen.PlaceTile(i, j, 178, true, style: style); + } + } + } + } + })); + WorldGen.AddGenerationPass("Random Gems", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Set(1f); + for (int index = 0; index < Main.maxTilesX; ++index) + { + int i = WorldGen.genRand.Next(20, Main.maxTilesX - 20); + int j = WorldGen.genRand.Next((int) Main.rockLayer, Main.maxTilesY - 300); + if (!Main.tile[i, j].active() && !Main.tile[i, j].lava() && !Main.wallDungeon[(int) Main.tile[i, j].wall] && Main.tile[i, j].wall != (ushort) 27) + { + int num309 = WorldGen.genRand.Next(12); + int style = num309 >= 3 ? (num309 >= 6 ? (num309 >= 8 ? (num309 >= 10 ? (num309 >= 11 ? 5 : 4) : 3) : 2) : 1) : 0; + WorldGen.PlaceTile(i, j, 178, true, style: style); + } + } + for (int index252 = 0; index252 < Main.maxTilesX; ++index252) + { + int index253 = WorldGen.genRand.Next(20, Main.maxTilesX - 20); + int index254 = WorldGen.genRand.Next((int) Main.worldSurface, Main.maxTilesY - 300); + if (!Main.tile[index253, index254].active() && !Main.tile[index253, index254].lava() && (Main.tile[index253, index254].wall == (ushort) 216 || Main.tile[index253, index254].wall == (ushort) 187)) + { + int num310 = WorldGen.genRand.Next(1, 4); + int num311 = WorldGen.genRand.Next(1, 4); + int num312 = WorldGen.genRand.Next(1, 4); + int num313 = WorldGen.genRand.Next(1, 4); + for (int i = index253 - num310; i < index253 + num311; ++i) + { + for (int j = index254 - num312; j < index254 + num313; ++j) + { + if (!Main.tile[i, j].active()) + WorldGen.PlaceTile(i, j, 178, true, style: 6); + } + } + } + } + })); + WorldGen.AddGenerationPass("Moss Grass", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Set(1f); + for (int index255 = 5; index255 < Main.maxTilesX - 5; ++index255) + { + for (int index256 = 5; index256 < Main.maxTilesY - 5; ++index256) + { + if (Main.tile[index255, index256].active() && Main.tileMoss[(int) Main.tile[index255, index256].type]) + { + for (int index257 = 0; index257 < 4; ++index257) + { + int i = index255; + int j = index256; + if (index257 == 0) + --i; + if (index257 == 1) + ++i; + if (index257 == 2) + --j; + if (index257 == 3) + ++j; + if (!Main.tile[i, j].active()) + WorldGen.PlaceTile(i, j, 184, true); + } + } + } + } + })); + WorldGen.AddGenerationPass("Muds Walls In Jungle", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Set(1f); + int num314 = 0; + int num315 = 0; + bool flag29 = false; + for (int index258 = 5; index258 < Main.maxTilesX - 5; ++index258) + { + for (int index259 = 0; (double) index259 < Main.worldSurface + 20.0; ++index259) + { + if (Main.tile[index258, index259].active() && Main.tile[index258, index259].type == (ushort) 60) + { + num314 = index258; + flag29 = true; + break; + } + } + if (flag29) + break; + } + bool flag30 = false; + for (int index260 = Main.maxTilesX - 5; index260 > 5; --index260) + { + for (int index261 = 0; (double) index261 < Main.worldSurface + 20.0; ++index261) + { + if (Main.tile[index260, index261].active() && Main.tile[index260, index261].type == (ushort) 60) + { + num315 = index260; + flag30 = true; + break; + } + } + if (flag30) + break; + } + jungleMinX = num314; + jungleMaxX = num315; + for (int index262 = num314; index262 <= num315; ++index262) + { + for (int index263 = 0; (double) index263 < Main.worldSurface + 20.0; ++index263) + { + if ((index262 >= num314 + 2 && index262 <= num315 - 2 || WorldGen.genRand.Next(2) != 0) && (index262 >= num314 + 3 && index262 <= num315 - 3 || WorldGen.genRand.Next(3) != 0) && (Main.tile[index262, index263].wall == (ushort) 2 || Main.tile[index262, index263].wall == (ushort) 59)) + Main.tile[index262, index263].wall = (ushort) 15; + } + } + })); + WorldGen.AddGenerationPass("Larva", (WorldGenLegacyMethod) ((progress, passConfig) => + { + Main.tileSolid[229] = true; + progress.Set(1f); + for (int index264 = 0; index264 < WorldGen.numLarva; ++index264) + { + int i = WorldGen.larvaX[index264]; + int j = WorldGen.larvaY[index264]; + for (int index265 = i - 1; index265 <= i + 1; ++index265) + { + for (int index266 = j - 2; index266 <= j + 1; ++index266) + { + if (index266 != j + 1) + { + Main.tile[index265, index266].active(false); + } + else + { + Main.tile[index265, index266].active(true); + Main.tile[index265, index266].type = (ushort) 225; + Main.tile[index265, index266].slope((byte) 0); + Main.tile[index265, index266].halfBrick(false); + } + } + } + WorldGen.PlaceTile(i, j, 231, true); + } + Main.tileSolid[232] = true; + Main.tileSolid[162] = true; + })); + WorldGen.AddGenerationPass("Settle Liquids Again", (WorldGenLegacyMethod) ((progress, passConfig) => + { + if (WorldGen.getGoodWorldGen) + Main.tileSolid[56] = true; + progress.Message = Lang.gen[27].Value; + if (WorldGen.notTheBees) + WorldGen.NotTheBees(); + Liquid.worldGenTilesIgnoreWater(true); + Liquid.QuickWater(3); + WorldGen.WaterCheck(); + int num316 = 0; + Liquid.quickSettle = true; + int num317 = 10; + while (num316 < num317) + { + int num318 = Liquid.numLiquid + LiquidBuffer.numLiquidBuffer; + ++num316; + float num319 = 0.0f; + while (Liquid.numLiquid > 0) + { + float num320 = (float) (num318 - (Liquid.numLiquid + LiquidBuffer.numLiquidBuffer)) / (float) num318; + if (Liquid.numLiquid + LiquidBuffer.numLiquidBuffer > num318) + num318 = Liquid.numLiquid + LiquidBuffer.numLiquidBuffer; + if ((double) num320 > (double) num319) + num319 = num320; + else + num320 = num319; + if (num316 == 1) + progress.Set((float) ((double) num320 / 3.0 + 0.330000013113022)); + Liquid.UpdateLiquid(); + } + WorldGen.WaterCheck(); + progress.Set((float) ((double) (num316 / num317) / 3.0 + 0.660000026226044)); + } + Liquid.quickSettle = false; + Liquid.worldGenTilesIgnoreWater(false); + Main.tileSolid[484] = false; + })); + WorldGen.AddGenerationPass("Cactus, Palm Trees, & Coral", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[38].Value; + int num321 = 8; + int num322 = 400; + int num323 = WorldGen.genRand.Next(3, 13); + int num324 = WorldGen.genRand.Next(3, 13); + WorldGen.genRand.Next(2, 6); + WorldGen.genRand.Next(2, 6); + int num325 = 380; + for (int index267 = 0; index267 < WorldGen.numOasis; ++index267) + { + int num326 = (int) ((double) WorldGen.oasisWidth[index267] * 1.5); + for (int index268 = (int) WorldGen.oasisPosition[index267].X - num326; index268 <= (int) WorldGen.oasisPosition[index267].X + num326; ++index268) + { + for (int index269 = (int) WorldGen.oasisPosition[index267].Y - WorldGen.oasisHeight; index269 <= (int) WorldGen.oasisPosition[index267].Y + WorldGen.oasisHeight; ++index269) + { + float num327 = 1f; + int num328 = 8; + for (int x = index268 - num328; x <= index268 + num328; ++x) + { + for (int y = index269 - num328; y <= index269 + num328; ++y) + { + if (WorldGen.InWorld(x, y) && Main.tile[x, y] != null && Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 323) + num327 = 0.13f; + } + } + if ((double) WorldGen.genRand.NextFloat() < (double) num327) + WorldGen.GrowPalmTree(index268, index269); + if (WorldGen.PlantSeaOat(index268, index269)) + { + if (WorldGen.genRand.Next(2) == 0) + WorldGen.GrowSeaOat(index268, index269); + if (WorldGen.genRand.Next(2) == 0) + WorldGen.GrowSeaOat(index268, index269); + } + WorldGen.PlaceOasisPlant(index268, index269); + } + } + } + for (int index270 = 0; index270 < 3; ++index270) + { + progress.Set((float) index270 / 3f); + int num329; + int num330; + bool flag; + int maxValue; + switch (index270) + { + case 1: + num329 = num322; + num330 = Main.maxTilesX - num322; + flag = true; + maxValue = num321; + break; + case 2: + num329 = Main.maxTilesX - num325; + num330 = Main.maxTilesX - 5; + flag = false; + maxValue = num324; + break; + default: + num329 = 5; + num330 = num325; + flag = false; + maxValue = num323; + break; + } + for (int index271 = num329; index271 < num330; ++index271) + { + if (WorldGen.genRand.Next(maxValue) == 0) + { + for (int index272 = 0; (double) index272 < Main.worldSurface - 1.0; ++index272) + { + Tile tile3 = Main.tile[index271, index272]; + if (tile3.active() && (tile3.type == (ushort) 53 || tile3.type == (ushort) 112 || tile3.type == (ushort) 234)) + { + Tile tile4 = Main.tile[index271, index272 - 1]; + if (!tile4.active() && tile4.wall == (ushort) 0) + { + if (flag) + { + int num331 = 0; + for (int index273 = index271 - WorldGen.cactusWaterWidth; index273 < index271 + WorldGen.cactusWaterWidth; ++index273) + { + for (int index274 = index272 - WorldGen.cactusWaterHeight; index274 < index272 + WorldGen.cactusWaterHeight; ++index274) + num331 += (int) Main.tile[index273, index274].liquid; + } + if (num331 / (int) byte.MaxValue > WorldGen.cactusWaterLimit) + { + if (WorldGen.genRand.Next(4) == 0) + { + WorldGen.GrowPalmTree(index271, index272); + break; + } + break; + } + WorldGen.PlantCactus(index271, index272); + break; + } + if (Main.tile[index271, index272 - 2].liquid == byte.MaxValue && Main.tile[index271, index272 - 3].liquid == byte.MaxValue && Main.tile[index271, index272 - 4].liquid == byte.MaxValue) + { + if (WorldGen.genRand.Next(2) == 0) + { + WorldGen.PlaceTile(index271, index272 - 1, 81, true); + break; + } + WorldGen.PlaceTile(index271, index272 - 1, 324, true, style: WorldGen.RollRandomSeaShellStyle()); + break; + } + if (Main.tile[index271, index272 - 2].liquid == (byte) 0 && (double) index272 < Main.worldSurface) + { + WorldGen.PlaceTile(index271, index272 - 1, 324, true, style: WorldGen.RollRandomSeaShellStyle()); + break; + } + } + } + } + } + else + { + for (int index275 = 0; (double) index275 < Main.worldSurface - 1.0; ++index275) + { + if (WorldGen.PlantSeaOat(index271, index275)) + { + if (WorldGen.genRand.Next(2) == 0) + WorldGen.GrowSeaOat(index271, index275); + if (WorldGen.genRand.Next(2) == 0) + WorldGen.GrowSeaOat(index271, index275); + } + WorldGen.PlaceOasisPlant(index271, index275); + } + } + } + } + })); + WorldGen.AddGenerationPass("Tile Cleanup", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[84].Value; + for (int i = 40; i < Main.maxTilesX - 40; ++i) + { + progress.Set((float) (i - 40) / (float) (Main.maxTilesX - 80)); + for (int j = 40; j < Main.maxTilesY - 40; ++j) + { + if (Main.tile[i, j].active() && Main.tile[i, j].topSlope() && (Main.tile[i, j].leftSlope() && Main.tile[i + 1, j].halfBrick() || Main.tile[i, j].rightSlope() && Main.tile[i - 1, j].halfBrick())) + { + Main.tile[i, j].slope((byte) 0); + Main.tile[i, j].halfBrick(true); + } + if (Main.tile[i, j].active() && Main.tile[i, j].liquid > (byte) 0 && TileID.Sets.SlowlyDiesInWater[(int) Main.tile[i, j].type]) + WorldGen.KillTile(i, j); + if (!Main.tile[i, j].active() && Main.tile[i, j].liquid == (byte) 0 && WorldGen.genRand.Next(3) != 0 && WorldGen.SolidTile(i, j - 1)) + { + int num332 = WorldGen.genRand.Next(15, 21); + for (int index = j - 2; index >= j - num332; --index) + { + if (Main.tile[i, index].liquid >= (byte) 128) + { + int num333 = 373; + if (Main.tile[i, index].lava()) + num333 = 374; + else if (Main.tile[i, index].honey()) + num333 = 375; + if (WorldGen.genRand.Next(j - index) <= 1) + { + if (Main.tile[i, j].wall == (ushort) 86) + num333 = 375; + Main.tile[i, j].type = (ushort) num333; + Main.tile[i, j].frameX = (short) 0; + Main.tile[i, j].frameY = (short) 0; + Main.tile[i, j].active(true); + break; + } + } + } + if (!Main.tile[i, j].active()) + { + int num334 = WorldGen.genRand.Next(3, 11); + for (int index = j + 1; index <= j + num334; ++index) + { + if (Main.tile[i, index].liquid >= (byte) 200) + { + int num335 = 373; + if (Main.tile[i, index].lava()) + num335 = 374; + else if (Main.tile[i, index].honey()) + num335 = 375; + if (WorldGen.genRand.Next((index - j) * 3) <= 1) + { + Main.tile[i, j].type = (ushort) num335; + Main.tile[i, j].frameX = (short) 0; + Main.tile[i, j].frameY = (short) 0; + Main.tile[i, j].active(true); + break; + } + } + } + } + if (!Main.tile[i, j].active() && WorldGen.genRand.Next(4) == 0) + { + Tile tile = Main.tile[i, j - 1]; + if (TileID.Sets.Conversion.Sandstone[(int) tile.type] || TileID.Sets.Conversion.HardenedSand[(int) tile.type]) + { + Main.tile[i, j].type = (ushort) 461; + Main.tile[i, j].frameX = (short) 0; + Main.tile[i, j].frameY = (short) 0; + Main.tile[i, j].active(true); + } + } + } + if (Main.tile[i, j].type == (ushort) 137) + { + if (Main.tile[i, j].frameY <= (short) 52) + { + int num336 = -1; + if (Main.tile[i, j].frameX >= (short) 18) + num336 = 1; + if (Main.tile[i + num336, j].halfBrick() || Main.tile[i + num336, j].slope() != (byte) 0) + Main.tile[i + num336, j].active(false); + } + } + else if (Main.tile[i, j].type == (ushort) 162 && Main.tile[i, j + 1].liquid == (byte) 0 && WorldGen.CanKillTile(i, j)) + Main.tile[i, j].active(false); + if (Main.tile[i, j].wall == (ushort) 13 || Main.tile[i, j].wall == (ushort) 14) + Main.tile[i, j].liquid = (byte) 0; + if (Main.tile[i, j].type == (ushort) 31) + { + int num337 = (int) Main.tile[i, j].frameX / 18; + int num338 = 0; + int num339 = i; + int num340 = num338 + num337 / 2; + int num341 = !WorldGen.drunkWorldGen ? (WorldGen.crimson ? 1 : 0) : (Main.tile[i, j].wall != (ushort) 83 ? 0 : 1); + int num342 = num337 % 2; + int num343 = num339 - num342; + int num344 = (int) Main.tile[i, j].frameY / 18; + int num345 = 0; + int num346 = j; + int num347 = num345 + num344 / 2; + int num348 = num344 % 2; + int num349 = num346 - num348; + for (int index276 = 0; index276 < 2; ++index276) + { + for (int index277 = 0; index277 < 2; ++index277) + { + int index278 = num343 + index276; + int index279 = num349 + index277; + Main.tile[index278, index279].active(true); + Main.tile[index278, index279].slope((byte) 0); + Main.tile[index278, index279].halfBrick(false); + Main.tile[index278, index279].type = (ushort) 31; + Main.tile[index278, index279].frameX = (short) (index276 * 18 + 36 * num341); + Main.tile[index278, index279].frameY = (short) (index277 * 18 + 36 * num347); + } + } + } + if (Main.tile[i, j].type == (ushort) 12) + { + int num350 = (int) Main.tile[i, j].frameX / 18; + int num351 = 0; + int num352 = i; + int num353 = num351 + num350 / 2; + int num354 = num350 % 2; + int num355 = num352 - num354; + int num356 = (int) Main.tile[i, j].frameY / 18; + int num357 = 0; + int num358 = j; + int num359 = num357 + num356 / 2; + int num360 = num356 % 2; + int num361 = num358 - num360; + for (int index280 = 0; index280 < 2; ++index280) + { + for (int index281 = 0; index281 < 2; ++index281) + { + int index282 = num355 + index280; + int index283 = num361 + index281; + Main.tile[index282, index283].active(true); + Main.tile[index282, index283].slope((byte) 0); + Main.tile[index282, index283].halfBrick(false); + Main.tile[index282, index283].type = (ushort) 12; + Main.tile[index282, index283].frameX = (short) (index280 * 18 + 36 * num353); + Main.tile[index282, index283].frameY = (short) (index281 * 18 + 36 * num359); + } + if (!Main.tile[index280, j + 2].active()) + { + Main.tile[index280, j + 2].active(true); + if (!Main.tileSolid[(int) Main.tile[index280, j + 2].type] || Main.tileSolidTop[(int) Main.tile[index280, j + 2].type]) + Main.tile[index280, j + 2].type = (ushort) 0; + } + Main.tile[index280, j + 2].slope((byte) 0); + Main.tile[index280, j + 2].halfBrick(false); + } + } + if (TileID.Sets.BasicChest[(int) Main.tile[i, j].type]) + { + int num362 = (int) Main.tile[i, j].frameX / 18; + int num363 = 0; + ushort num364 = 21; + int num365 = i; + int Y = j - (int) Main.tile[i, j].frameY / 18; + if (Main.tile[i, j].type == (ushort) 467) + num364 = (ushort) 467; + for (; num362 >= 2; num362 -= 2) + ++num363; + int X = num365 - num362; + int chest = Chest.FindChest(X, Y); + if (chest != -1) + { + switch (Main.chest[chest].item[0].type) + { + case 1156: + num363 = 23; + break; + case 1260: + num363 = 26; + break; + case 1569: + num363 = 25; + break; + case 1571: + num363 = 24; + break; + case 1572: + num363 = 27; + break; + } + } + for (int index284 = 0; index284 < 2; ++index284) + { + for (int index285 = 0; index285 < 2; ++index285) + { + int index286 = X + index284; + int index287 = Y + index285; + Main.tile[index286, index287].active(true); + Main.tile[index286, index287].slope((byte) 0); + Main.tile[index286, index287].halfBrick(false); + Main.tile[index286, index287].type = num364; + Main.tile[index286, index287].frameX = (short) (index284 * 18 + 36 * num363); + Main.tile[index286, index287].frameY = (short) (index285 * 18); + } + if (!Main.tile[index284, j + 2].active()) + { + Main.tile[index284, j + 2].active(true); + if (!Main.tileSolid[(int) Main.tile[index284, j + 2].type] || Main.tileSolidTop[(int) Main.tile[index284, j + 2].type]) + Main.tile[index284, j + 2].type = (ushort) 0; + } + Main.tile[index284, j + 2].slope((byte) 0); + Main.tile[index284, j + 2].halfBrick(false); + } + } + if (Main.tile[i, j].type == (ushort) 28) + { + int num366 = (int) Main.tile[i, j].frameX / 18; + int num367 = 0; + int num368 = i; + for (; num366 >= 2; num366 -= 2) + ++num367; + int num369 = num368 - num366; + int num370 = (int) Main.tile[i, j].frameY / 18; + int num371 = 0; + int num372 = j; + for (; num370 >= 2; num370 -= 2) + ++num371; + int num373 = num372 - num370; + for (int index288 = 0; index288 < 2; ++index288) + { + for (int index289 = 0; index289 < 2; ++index289) + { + int index290 = num369 + index288; + int index291 = num373 + index289; + Main.tile[index290, index291].active(true); + Main.tile[index290, index291].slope((byte) 0); + Main.tile[index290, index291].halfBrick(false); + Main.tile[index290, index291].type = (ushort) 28; + Main.tile[index290, index291].frameX = (short) (index288 * 18 + 36 * num367); + Main.tile[index290, index291].frameY = (short) (index289 * 18 + 36 * num371); + } + if (!Main.tile[index288, j + 2].active()) + { + Main.tile[index288, j + 2].active(true); + if (!Main.tileSolid[(int) Main.tile[index288, j + 2].type] || Main.tileSolidTop[(int) Main.tile[index288, j + 2].type]) + Main.tile[index288, j + 2].type = (ushort) 0; + } + Main.tile[index288, j + 2].slope((byte) 0); + Main.tile[index288, j + 2].halfBrick(false); + } + } + if (Main.tile[i, j].type == (ushort) 26) + { + int num374 = (int) Main.tile[i, j].frameX / 18; + int num375 = 0; + int num376 = i; + int num377 = j - (int) Main.tile[i, j].frameY / 18; + for (; num374 >= 3; num374 -= 3) + ++num375; + int num378 = num376 - num374; + int num379 = !WorldGen.drunkWorldGen ? (!WorldGen.crimson ? 0 : 1) : (Main.tile[i, j].wall != (ushort) 83 ? 0 : 1); + for (int index292 = 0; index292 < 3; ++index292) + { + for (int index293 = 0; index293 < 2; ++index293) + { + int index294 = num378 + index292; + int index295 = num377 + index293; + Main.tile[index294, index295].active(true); + Main.tile[index294, index295].slope((byte) 0); + Main.tile[index294, index295].halfBrick(false); + Main.tile[index294, index295].type = (ushort) 26; + Main.tile[index294, index295].frameX = (short) (index292 * 18 + 54 * num379); + Main.tile[index294, index295].frameY = (short) (index293 * 18); + } + if (!Main.tile[num378 + index292, num377 + 2].active() || !Main.tileSolid[(int) Main.tile[num378 + index292, num377 + 2].type] || Main.tileSolidTop[(int) Main.tile[num378 + index292, num377 + 2].type]) + { + Main.tile[num378 + index292, num377 + 2].active(true); + if (!TileID.Sets.Platforms[(int) Main.tile[num378 + index292, num377 + 2].type] && (!Main.tileSolid[(int) Main.tile[num378 + index292, num377 + 2].type] || Main.tileSolidTop[(int) Main.tile[num378 + index292, num377 + 2].type])) + Main.tile[num378 + index292, num377 + 2].type = (ushort) 0; + } + Main.tile[num378 + index292, num377 + 2].slope((byte) 0); + Main.tile[num378 + index292, num377 + 2].halfBrick(false); + if (Main.tile[num378 + index292, num377 + 3].type == (ushort) 28 && (int) Main.tile[num378 + index292, num377 + 3].frameY % 36 >= 18) + { + Main.tile[num378 + index292, num377 + 3].type = (ushort) 0; + Main.tile[num378 + index292, num377 + 3].active(false); + } + } + for (int index = 0; index < 3; ++index) + { + if ((Main.tile[num378 - 1, num377 + index].type == (ushort) 28 || Main.tile[num378 - 1, num377 + index].type == (ushort) 12) && (int) Main.tile[num378 - 1, num377 + index].frameX % 36 < 18) + { + Main.tile[num378 - 1, num377 + index].type = (ushort) 0; + Main.tile[num378 - 1, num377 + index].active(false); + } + if ((Main.tile[num378 + 3, num377 + index].type == (ushort) 28 || Main.tile[num378 + 3, num377 + index].type == (ushort) 12) && (int) Main.tile[num378 + 3, num377 + index].frameX % 36 >= 18) + { + Main.tile[num378 + 3, num377 + index].type = (ushort) 0; + Main.tile[num378 + 3, num377 + index].active(false); + } + } + } + if (Main.tile[i, j].type == (ushort) 237 && Main.tile[i, j + 1].type == (ushort) 232) + Main.tile[i, j + 1].type = (ushort) 226; + if (Main.tile[i, j].wall == (ushort) 87) + Main.tile[i, j].liquid = (byte) 0; + } + } + })); + WorldGen.AddGenerationPass("Lihzahrd Altars", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Set(1f); + for (int index296 = 0; index296 < 3; ++index296) + { + for (int index297 = 0; index297 < 2; ++index297) + { + int index298 = WorldGen.lAltarX + index296; + int index299 = WorldGen.lAltarY + index297; + Main.tile[index298, index299].active(true); + Main.tile[index298, index299].type = (ushort) 237; + Main.tile[index298, index299].frameX = (short) (index296 * 18); + Main.tile[index298, index299].frameY = (short) (index297 * 18); + } + Main.tile[WorldGen.lAltarX + index296, WorldGen.lAltarY + 2].active(true); + Main.tile[WorldGen.lAltarX + index296, WorldGen.lAltarY + 2].slope((byte) 0); + Main.tile[WorldGen.lAltarX + index296, WorldGen.lAltarY + 2].halfBrick(false); + Main.tile[WorldGen.lAltarX + index296, WorldGen.lAltarY + 2].type = (ushort) 226; + } + for (int index300 = 0; index300 < 3; ++index300) + { + for (int index301 = 0; index301 < 2; ++index301) + WorldGen.SquareTileFrame(WorldGen.lAltarX + index300, WorldGen.lAltarY + index301); + } + })); + WorldGen.AddGenerationPass("Micro Biomes", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[76].Value; + double num380 = (double) (Main.maxTilesX * Main.maxTilesY) / 5040000.0; + float num381 = 10f; + if (WorldGen.getGoodWorldGen) + num381 *= 10f; + DeadMansChestBiome biome1 = configuration.CreateBiome(); + List possibleChestsToTrapify = biome1.GetPossibleChestsToTrapify(structures); + int random5 = passConfig.Get("DeadManChests").GetRandom(WorldGen.genRand); + int num382 = 0; + while (num382 < random5 && possibleChestsToTrapify.Count > 0) + { + int index = possibleChestsToTrapify[WorldGen.genRand.Next(possibleChestsToTrapify.Count)]; + Point origin = new Point(Main.chest[index].x, Main.chest[index].y); + biome1.Place(origin, structures); + ++num382; + possibleChestsToTrapify.Remove(index); + } + progress.Set(1f / num381); + if (!WorldGen.notTheBees) + { + ThinIceBiome biome2 = configuration.CreateBiome(); + int random6 = passConfig.Get("ThinIcePatchCount").GetRandom(WorldGen.genRand); + int num383 = 0; + while (num383 < random6) + { + if (biome2.Place(WorldGen.RandomWorldPoint((int) Main.worldSurface + 20, 50, 200, 50), structures)) + ++num383; + } + } + progress.Set(0.1f); + progress.Set(2f / num381); + EnchantedSwordBiome biome3 = configuration.CreateBiome(); + int random7 = passConfig.Get("SwordShrineAttempts").GetRandom(WorldGen.genRand); + float num384 = passConfig.Get("SwordShrinePlacementChance"); + for (int index = 0; index < random7; ++index) + { + if ((double) WorldGen.genRand.NextFloat() <= (double) num384) + { + int num385 = 0; + while (num385++ <= Main.maxTilesX) + { + Point origin; + origin.Y = (int) worldSurface + WorldGen.genRand.Next(50, 100); + origin.X = WorldGen.genRand.Next(2) != 0 ? WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.699999988079071), Main.maxTilesX - 50) : WorldGen.genRand.Next(50, (int) ((double) Main.maxTilesX * 0.300000011920929)); + if (biome3.Place(origin, structures)) + break; + } + } + } + progress.Set(0.2f); + progress.Set(3f / num381); + if (!WorldGen.notTheBees) + { + CampsiteBiome biome4 = configuration.CreateBiome(); + int random8 = passConfig.Get("CampsiteCount").GetRandom(WorldGen.genRand); + int num386 = 0; + while (num386 < random8) + { + if (biome4.Place(WorldGen.RandomWorldPoint((int) Main.worldSurface, WorldGen.beachDistance, 200, WorldGen.beachDistance), structures)) + ++num386; + } + } + progress.Set(4f / num381); + if (!WorldGen.notTheBees) + { + MiningExplosivesBiome biome5 = configuration.CreateBiome(); + int num387 = passConfig.Get("ExplosiveTrapCount").GetRandom(WorldGen.genRand); + if (WorldGen.getGoodWorldGen) + num387 = (int) ((double) num387 * 1.5); + int num388 = 0; + while (num388 < num387) + { + if (biome5.Place(WorldGen.RandomWorldPoint((int) rockLayer, WorldGen.beachDistance, 200, WorldGen.beachDistance), structures)) + ++num388; + } + } + progress.Set(0.3f); + progress.Set(5f / num381); + MahoganyTreeBiome biome6 = configuration.CreateBiome(); + int random9 = passConfig.Get("LivingTreeCount").GetRandom(WorldGen.genRand); + int num389 = 0; + for (int index = 0; num389 < random9 && index < 20000; ++index) + { + if (biome6.Place(WorldGen.RandomWorldPoint((int) Main.worldSurface + 50, 50, 500, 50), structures)) + ++num389; + } + progress.Set(0.4f); + progress.Set(6f / num381); + progress.Set(7f / num381); + TrackGenerator trackGenerator = new TrackGenerator(); + int random10 = passConfig.Get("LongTrackCount").GetRandom(WorldGen.genRand); + WorldGenRange worldGenRange1 = passConfig.Get("LongTrackLength"); + int num390 = Main.maxTilesX * 10; + int num391 = 0; + int num392 = 0; + while (num392 < random10) + { + if (trackGenerator.Place(WorldGen.RandomWorldPoint((int) Main.worldSurface, 10, 200, 10), worldGenRange1.ScaledMinimum, worldGenRange1.ScaledMaximum)) + { + ++num392; + num391 = 0; + } + else + { + ++num391; + if (num391 > num390) + { + ++num392; + num391 = 0; + } + } + } + progress.Set(8f / num381); + int random11 = passConfig.Get("StandardTrackCount").GetRandom(WorldGen.genRand); + WorldGenRange worldGenRange2 = passConfig.Get("StandardTrackLength"); + int num393 = 0; + while (num393 < random11) + { + if (trackGenerator.Place(WorldGen.RandomWorldPoint((int) Main.worldSurface, 10, 200, 10), worldGenRange2.ScaledMinimum, worldGenRange2.ScaledMaximum)) + ++num393; + } + progress.Set(9f / num381); + if (!WorldGen.notTheBees) + { + double num394 = (double) Main.maxTilesX * 0.02; + if (WorldGen.getGoodWorldGen) + { + float num395 = num381 * 2f; + } + for (int index = 0; (double) index < num394; ++index) + { + int num396 = 0; + while (num396 < 10150 && !WorldGen.placeLavaTrap(WorldGen.genRand.Next(200, Main.maxTilesX - 200), WorldGen.genRand.Next(WorldGen.lavaLine - 100, Main.maxTilesY - 210))) + ++num396; + } + } + progress.Set(1f); + })); + WorldGen.AddGenerationPass("Water Plants", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[88].Value; + for (int x = 20; x < Main.maxTilesX - 20; ++x) + { + progress.Set((float) x / (float) Main.maxTilesX); + for (int index302 = 1; (double) index302 < Main.worldSurface; ++index302) + { + if (WorldGen.genRand.Next(5) == 0 && Main.tile[x, index302].liquid > (byte) 0) + { + if (!Main.tile[x, index302].active()) + { + if (WorldGen.genRand.Next(2) == 0) + { + WorldGen.PlaceLilyPad(x, index302); + } + else + { + Point point = WorldGen.PlaceCatTail(x, index302); + if (WorldGen.InWorld(point.X, point.Y)) + { + int num397 = WorldGen.genRand.Next(14); + for (int index303 = 0; index303 < num397; ++index303) + WorldGen.GrowCatTail(point.X, point.Y); + WorldGen.SquareTileFrame(point.X, point.Y); + } + } + } + if ((!Main.tile[x, index302].active() || Main.tile[x, index302].type == (ushort) 61 || Main.tile[x, index302].type == (ushort) 74) && WorldGen.PlaceBamboo(x, index302)) + { + int num398 = WorldGen.genRand.Next(10, 20); + int num399 = 0; + while (num399 < num398 && WorldGen.PlaceBamboo(x, index302 - num399)) + ++num399; + } + } + } + for (int underworldLayer = Main.UnderworldLayer; (double) underworldLayer > Main.worldSurface; --underworldLayer) + { + if (Main.tile[x, underworldLayer].type == (ushort) 53 && WorldGen.genRand.Next(3) != 0) + WorldGen.GrowCheckSeaweed(x, underworldLayer); + else if (Main.tile[x, underworldLayer].type == (ushort) 549) + WorldGen.GrowCheckSeaweed(x, underworldLayer); + } + } + })); + WorldGen.AddGenerationPass("Stalac", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Set(1f); + for (int index = 20; index < Main.maxTilesX - 20; ++index) + { + for (int worldSurface5 = (int) Main.worldSurface; worldSurface5 < Main.maxTilesY - 20; ++worldSurface5) + { + if ((WorldGen.drunkWorldGen || WorldGen.genRand.Next(5) == 0) && Main.tile[index, worldSurface5 - 1].liquid == (byte) 0) + { + int num400 = WorldGen.genRand.Next(7); + int treeTileType = 0; + switch (num400) + { + case 0: + treeTileType = 583; + break; + case 1: + treeTileType = 584; + break; + case 2: + treeTileType = 585; + break; + case 3: + treeTileType = 586; + break; + case 4: + treeTileType = 587; + break; + case 5: + treeTileType = 588; + break; + case 6: + treeTileType = 589; + break; + } + WorldGen.TryGrowingTreeByType(treeTileType, index, worldSurface5); + } + if (!WorldGen.oceanDepths(index, worldSurface5) && !Main.tile[index, worldSurface5].active() && WorldGen.genRand.Next(5) == 0) + { + if ((Main.tile[index, worldSurface5 - 1].type == (ushort) 1 || Main.tile[index, worldSurface5 - 1].type == (ushort) 147 || Main.tile[index, worldSurface5 - 1].type == (ushort) 161 || Main.tile[index, worldSurface5 - 1].type == (ushort) 25 || Main.tile[index, worldSurface5 - 1].type == (ushort) 203 || Main.tileStone[(int) Main.tile[index, worldSurface5 - 1].type] || Main.tileMoss[(int) Main.tile[index, worldSurface5 - 1].type]) && !Main.tile[index, worldSurface5].active() && !Main.tile[index, worldSurface5 + 1].active()) + Main.tile[index, worldSurface5 - 1].slope((byte) 0); + if ((Main.tile[index, worldSurface5 + 1].type == (ushort) 1 || Main.tile[index, worldSurface5 + 1].type == (ushort) 147 || Main.tile[index, worldSurface5 + 1].type == (ushort) 161 || Main.tile[index, worldSurface5 + 1].type == (ushort) 25 || Main.tile[index, worldSurface5 + 1].type == (ushort) 203 || Main.tileStone[(int) Main.tile[index, worldSurface5 + 1].type] || Main.tileMoss[(int) Main.tile[index, worldSurface5 + 1].type]) && !Main.tile[index, worldSurface5].active() && !Main.tile[index, worldSurface5 - 1].active()) + Main.tile[index, worldSurface5 + 1].slope((byte) 0); + WorldGen.PlaceTight(index, worldSurface5); + } + } + for (int y = 5; y < (int) Main.worldSurface; ++y) + { + if ((Main.tile[index, y - 1].type == (ushort) 147 || Main.tile[index, y - 1].type == (ushort) 161) && WorldGen.genRand.Next(5) == 0) + { + if (!Main.tile[index, y].active() && !Main.tile[index, y + 1].active()) + Main.tile[index, y - 1].slope((byte) 0); + WorldGen.PlaceTight(index, y); + } + if ((Main.tile[index, y - 1].type == (ushort) 25 || Main.tile[index, y - 1].type == (ushort) 203) && WorldGen.genRand.Next(5) == 0) + { + if (!Main.tile[index, y].active() && !Main.tile[index, y + 1].active()) + Main.tile[index, y - 1].slope((byte) 0); + WorldGen.PlaceTight(index, y); + } + if ((Main.tile[index, y + 1].type == (ushort) 25 || Main.tile[index, y + 1].type == (ushort) 203) && WorldGen.genRand.Next(5) == 0) + { + if (!Main.tile[index, y].active() && !Main.tile[index, y - 1].active()) + Main.tile[index, y + 1].slope((byte) 0); + WorldGen.PlaceTight(index, y); + } + } + } + })); + WorldGen.AddGenerationPass("Remove Broken Traps", (WorldGenLegacyMethod) ((progress, passConfig) => + { + progress.Message = Lang.gen[82].Value; + List pointsWeAlreadyWentOver = new List(); + int num401 = 50; + for (int x = num401; x < Main.maxTilesX - num401; ++x) + { + float num402 = (float) (x - num401) / (float) (Main.maxTilesX - num401 * 2); + progress.Set(num402); + for (int y = 50; y < Main.maxTilesY - 50; ++y) + { + if (Main.tile[x, y].wire() && !pointsWeAlreadyWentOver.Contains(new Point(x, y))) + WorldGen.ClearBrokenTraps(new Point(x, y), pointsWeAlreadyWentOver); + } + } + })); + WorldGen.AddGenerationPass("Final Cleanup", (WorldGenLegacyMethod) ((progress, passConfig) => + { + WorldGen.FillWallHolesInArea(new Microsoft.Xna.Framework.Rectangle(0, 0, Main.maxTilesX, (int) Main.worldSurface)); + progress.Message = Lang.gen[86].Value; + for (int index304 = 0; index304 < Main.maxTilesX; ++index304) + { + progress.Set((float) index304 / (float) Main.maxTilesX); + for (int index305 = 0; index305 < Main.maxTilesY; ++index305) + { + if (Main.tile[index304, index305].active() && !WorldGen.SolidTile(index304, index305 + 1) && (Main.tile[index304, index305].type == (ushort) 53 || Main.tile[index304, index305].type == (ushort) 112 || Main.tile[index304, index305].type == (ushort) 234 || Main.tile[index304, index305].type == (ushort) 224 || Main.tile[index304, index305].type == (ushort) 123)) + { + if ((double) index305 < Main.worldSurface + 10.0 && !Main.tile[index304, index305 + 1].active() && Main.tile[index304, index305 + 1].wall != (ushort) 191 && !WorldGen.oceanDepths(index304, index305)) + { + int num403 = 10; + int index306 = index305 + 1; + for (int index307 = index306; index307 < index306 + 10; ++index307) + { + if (Main.tile[index304, index307].active() && Main.tile[index304, index307].type == (ushort) 314) + { + num403 = 0; + break; + } + } + for (; !Main.tile[index304, index306].active() && num403 > 0 && index306 < Main.maxTilesY - 50; --num403) + { + Main.tile[index304, index306 - 1].slope((byte) 0); + Main.tile[index304, index306 - 1].halfBrick(false); + Main.tile[index304, index306].active(true); + Main.tile[index304, index306].type = Main.tile[index304, index305].type; + Main.tile[index304, index306].slope((byte) 0); + Main.tile[index304, index306].halfBrick(false); + ++index306; + } + if (num403 == 0 && !Main.tile[index304, index306].active()) + { + switch (Main.tile[index304, index305].type) + { + case 53: + Main.tile[index304, index306].type = (ushort) 397; + Main.tile[index304, index306].active(true); + break; + case 112: + Main.tile[index304, index306].type = (ushort) 398; + Main.tile[index304, index306].active(true); + break; + case 123: + Main.tile[index304, index306].type = (ushort) 1; + Main.tile[index304, index306].active(true); + break; + case 224: + Main.tile[index304, index306].type = (ushort) 147; + Main.tile[index304, index306].active(true); + break; + case 234: + Main.tile[index304, index306].type = (ushort) 399; + Main.tile[index304, index306].active(true); + break; + } + } + else if (Main.tile[index304, index306].active() && Main.tileSolid[(int) Main.tile[index304, index306].type] && !Main.tileSolidTop[(int) Main.tile[index304, index306].type]) + { + Main.tile[index304, index306].slope((byte) 0); + Main.tile[index304, index306].halfBrick(false); + } + } + else if (Main.tileSolid[(int) Main.tile[index304, index305 + 1].type] && !Main.tileSolidTop[(int) Main.tile[index304, index305 + 1].type] && (Main.tile[index304, index305 + 1].topSlope() || Main.tile[index304, index305 + 1].halfBrick())) + { + Main.tile[index304, index305 + 1].slope((byte) 0); + Main.tile[index304, index305 + 1].halfBrick(false); + } + else + { + switch (Main.tile[index304, index305].type) + { + case 53: + Main.tile[index304, index305].type = (ushort) 397; + break; + case 112: + Main.tile[index304, index305].type = (ushort) 398; + break; + case 123: + Main.tile[index304, index305].type = (ushort) 1; + break; + case 224: + Main.tile[index304, index305].type = (ushort) 147; + break; + case 234: + Main.tile[index304, index305].type = (ushort) 399; + break; + } + } + } + if ((Main.tile[index304, index305].wall == (ushort) 187 || Main.tile[index304, index305].wall == (ushort) 216) && Main.tile[index304, index305].liquid > (byte) 0) + { + Main.tile[index304, index305].liquid = byte.MaxValue; + Main.tile[index304, index305].lava(true); + } + if (Main.tile[index304, index305].type == (ushort) 485 || Main.tile[index304, index305].type == (ushort) 187 || Main.tile[index304, index305].type == (ushort) 165) + WorldGen.TileFrame(index304, index305); + if (Main.tile[index304, index305].type == (ushort) 28) + WorldGen.TileFrame(index304, index305); + if (Main.tile[index304, index305].type == (ushort) 137) + { + Main.tile[index304, index305].slope((byte) 0); + Main.tile[index304, index305].halfBrick(false); + } + if (Main.tile[index304, index305].active() && TileID.Sets.Boulders[(int) Main.tile[index304, index305].type]) + { + int num404 = (int) Main.tile[index304, index305].frameX / 18; + int num405 = index304 - num404; + int num406 = (int) Main.tile[index304, index305].frameY / 18; + int num407 = index305 - num406; + for (int index308 = 0; index308 < 2; ++index308) + { + for (int index309 = 0; index309 < 2; ++index309) + { + int index310 = num405 + index308; + int index311 = num407 + index309; + Main.tile[index310, index311].active(true); + Main.tile[index310, index311].slope((byte) 0); + Main.tile[index310, index311].halfBrick(false); + Main.tile[index310, index311].type = Main.tile[index304, index305].type; + Main.tile[index310, index311].frameX = (short) (index308 * 18); + Main.tile[index310, index311].frameY = (short) (index309 * 18); + } + } + } + if (Main.tile[index304, index305].type == (ushort) 323 && Main.tile[index304, index305].liquid > (byte) 0) + WorldGen.KillTile(index304, index305); + if (Main.wallDungeon[(int) Main.tile[index304, index305].wall]) + { + Main.tile[index304, index305].lava(false); + if (Main.tile[index304, index305].active() && Main.tile[index304, index305].type == (ushort) 56) + { + WorldGen.KillTile(index304, index305); + Main.tile[index304, index305].lava(false); + Main.tile[index304, index305].liquid = byte.MaxValue; + } + } + if (Main.tile[index304, index305].active() && Main.tile[index304, index305].type == (ushort) 314) + { + int num408 = 15; + int num409 = 1; + for (int index312 = index305; index305 - index312 < num408; --index312) + Main.tile[index304, index312].liquid = (byte) 0; + for (int index313 = index305; index313 - index305 < num409; ++index313) + Main.tile[index304, index313].liquid = (byte) 0; + } + if (Main.tile[index304, index305].active() && Main.tile[index304, index305].type == (ushort) 332 && !Main.tile[index304, index305 + 1].active()) + { + Main.tile[index304, index305 + 1].ClearEverything(); + Main.tile[index304, index305 + 1].active(true); + Main.tile[index304, index305 + 1].type = (ushort) 332; + } + if (index304 > WorldGen.beachDistance && index304 < Main.maxTilesX - WorldGen.beachDistance && (double) index305 < Main.worldSurface && Main.tile[index304, index305].liquid > (byte) 0 && Main.tile[index304, index305].liquid < byte.MaxValue && Main.tile[index304 - 1, index305].liquid < byte.MaxValue && Main.tile[index304 + 1, index305].liquid < byte.MaxValue && Main.tile[index304, index305 + 1].liquid < byte.MaxValue && !TileID.Sets.Clouds[(int) Main.tile[index304 - 1, index305].type] && !TileID.Sets.Clouds[(int) Main.tile[index304 + 1, index305].type] && !TileID.Sets.Clouds[(int) Main.tile[index304, index305 + 1].type]) + Main.tile[index304, index305].liquid = (byte) 0; + } + } + if (WorldGen.drunkWorldGen) + WorldGen.FinishDrunkGen(); + if (WorldGen.notTheBees) + { + WorldGen.NotTheBees(); + WorldGen.FinishNotTheBees(); + WorldGen.notTheBees = false; + } + if (WorldGen.getGoodWorldGen) + { + WorldGen.FinishGetGoodWorld(); + WorldGen.getGoodWorldGen = false; + } + WorldGen.noTileActions = false; + Main.tileSolid[(int) WorldGen.crackedType] = true; + Main.tileSolid[484] = true; + WorldGen.gen = false; + Main.AnglerQuestSwap(); + WorldGen.skipFramingDuringGen = false; + progress.Message = Lang.gen[87].Value; + })); + WorldGen._generator.GenerateWorld(customProgressObject); + WorldGen.ConsumePostGenActions(structures); + Main.WorldFileMetadata = FileMetadata.FromCurrentSettings(FileType.World); + Main.NotifyOfEvent(GameNotificationType.WorldGen); + WorldGen.drunkWorldGenText = false; + } + + private static void NotTheBees() + { + if (!WorldGen.notTheBees) + return; + for (int x = 0; x < Main.maxTilesX; ++x) + { + for (int y = 0; y < Main.maxTilesY - 180; ++y) + { + if (Main.tile[x, y].type == (ushort) 52) + Main.tile[x, y].type = (ushort) 62; + if ((WorldGen.SolidOrSlopedTile(x, y) || TileID.Sets.CrackedBricks[(int) Main.tile[x, y].type]) && !TileID.Sets.Ore[(int) Main.tile[x, y].type] && Main.tile[x, y].type != (ushort) 123 && Main.tile[x, y].type != (ushort) 40) + { + if (Main.tile[x, y].type == (ushort) 191 || Main.tile[x, y].type == (ushort) 383) + Main.tile[x, y].type = (ushort) 383; + else if (Main.tile[x, y].type == (ushort) 192 || Main.tile[x, y].type == (ushort) 384) + Main.tile[x, y].type = (ushort) 384; + else if (Main.tile[x, y].type != (ushort) 151 && Main.tile[x, y].type != (ushort) 189 && Main.tile[x, y].type != (ushort) 196 && Main.tile[x, y].type != (ushort) 120 && Main.tile[x, y].type != (ushort) 158 && Main.tile[x, y].type != (ushort) 175 && Main.tile[x, y].type != (ushort) 45 && Main.tile[x, y].type != (ushort) 119) + { + if (Main.tile[x, y].type >= (ushort) 63 && Main.tile[x, y].type <= (ushort) 68) + Main.tile[x, y].type = (ushort) 230; + else if (Main.tile[x, y].type != (ushort) 57 && Main.tile[x, y].type != (ushort) 76 && Main.tile[x, y].type != (ushort) 75 && Main.tile[x, y].type != (ushort) 229 && Main.tile[x, y].type != (ushort) 230 && Main.tile[x, y].type != (ushort) 407 && Main.tile[x, y].type != (ushort) 404) + { + if (Main.tile[x, y].type == (ushort) 224) + Main.tile[x, y].type = (ushort) 229; + else if (Main.tile[x, y].type == (ushort) 53) + { + if (x < WorldGen.beachDistance + WorldGen.genRand.Next(3) || x > Main.maxTilesX - WorldGen.beachDistance - WorldGen.genRand.Next(3)) + Main.tile[x, y].type = (ushort) 229; + } + else if ((x <= WorldGen.beachDistance - WorldGen.genRand.Next(3) || x >= Main.maxTilesX - WorldGen.beachDistance + WorldGen.genRand.Next(3) || Main.tile[x, y].type != (ushort) 397 && Main.tile[x, y].type != (ushort) 396) && Main.tile[x, y].type != (ushort) 10 && Main.tile[x, y].type != (ushort) 203 && Main.tile[x, y].type != (ushort) 25 && Main.tile[x, y].type != (ushort) 137 && Main.tile[x, y].type != (ushort) 138 && Main.tile[x, y].type != (ushort) 141) + { + if (Main.tileDungeon[(int) Main.tile[x, y].type] || TileID.Sets.CrackedBricks[(int) Main.tile[x, y].type]) + Main.tile[x, y].color((byte) 14); + else if (Main.tile[x, y].type == (ushort) 226) + Main.tile[x, y].color((byte) 15); + else if (Main.tile[x, y].type != (ushort) 202 && Main.tile[x, y].type != (ushort) 70 && Main.tile[x, y].type != (ushort) 48 && Main.tile[x, y].type != (ushort) 232) + Main.tile[x, y].type = !TileID.Sets.Conversion.Grass[(int) Main.tile[x, y].type] ? (Main.tile[x, y].type == (ushort) 0 || Main.tile[x, y].type == (ushort) 59 ? (ushort) 59 : (y <= WorldGen.lavaLine + WorldGen.genRand.Next(-2, 3) + 2 ? (ushort) 225 : (ushort) 230)) : (y <= WorldGen.lavaLine + WorldGen.genRand.Next(-2, 3) + 2 ? (ushort) 60 : (ushort) 70); + } + } + } + } + if (Main.tile[x, y].wall != (ushort) 15 && Main.tile[x, y].wall != (ushort) 64 && Main.tile[x, y].wall != (ushort) 204 && Main.tile[x, y].wall != (ushort) 205 && Main.tile[x, y].wall != (ushort) 206 && Main.tile[x, y].wall != (ushort) 207 && Main.tile[x, y].wall != (ushort) 23 && Main.tile[x, y].wall != (ushort) 24 && Main.tile[x, y].wall != (ushort) 42 && Main.tile[x, y].wall != (ushort) 10 && Main.tile[x, y].wall != (ushort) 21 && Main.tile[x, y].wall != (ushort) 82 && Main.tile[x, y].wall != (ushort) 187 && Main.tile[x, y].wall != (ushort) 216 && Main.tile[x, y].wall != (ushort) 34 && Main.tile[x, y].wall != (ushort) 244) + { + if (Main.tile[x, y].wall == (ushort) 87) + Main.tile[x, y].wallColor((byte) 15); + else if (Main.wallDungeon[(int) Main.tile[x, y].wall]) + Main.tile[x, y].wallColor((byte) 14); + else if (Main.tile[x, y].wall == (ushort) 2) + Main.tile[x, y].wall = (ushort) 2; + else if (Main.tile[x, y].wall == (ushort) 196) + Main.tile[x, y].wall = (ushort) 196; + else if (Main.tile[x, y].wall == (ushort) 197) + Main.tile[x, y].wall = (ushort) 197; + else if (Main.tile[x, y].wall == (ushort) 198) + Main.tile[x, y].wall = (ushort) 198; + else if (Main.tile[x, y].wall == (ushort) 199) + Main.tile[x, y].wall = (ushort) 199; + else if (Main.tile[x, y].wall == (ushort) 63) + Main.tile[x, y].wall = (ushort) 64; + else if (Main.tile[x, y].wall != (ushort) 3 && Main.tile[x, y].wall != (ushort) 83 && Main.tile[x, y].wall != (ushort) 73 && Main.tile[x, y].wall != (ushort) 13 && Main.tile[x, y].wall != (ushort) 14 && Main.tile[x, y].wall > (ushort) 0) + Main.tile[x, y].wall = (ushort) 86; + } + if (Main.tile[x, y].liquid > (byte) 0 && y <= WorldGen.lavaLine + 2) + { + if ((double) y > Main.rockLayer && (x < WorldGen.beachDistance + 200 || x > Main.maxTilesX - WorldGen.beachDistance - 200)) + Main.tile[x, y].honey(false); + else if (Main.wallDungeon[(int) Main.tile[x, y].wall]) + Main.tile[x, y].honey(false); + else + Main.tile[x, y].honey(true); + } + } + } + } + + private static void FinishNotTheBees() + { + if (!WorldGen.notTheBees) + return; + int num1 = 0; + for (int index1 = 20; (double) index1 < Main.worldSurface; ++index1) + { + for (int index2 = 20; index2 < Main.maxTilesX - 20; ++index2) + { + if (Main.tile[index2, index1].active() && TileID.Sets.Clouds[(int) Main.tile[index2, index1].type]) + { + num1 = index1; + break; + } + } + } + for (int i1 = 20; i1 < Main.maxTilesX - 20; ++i1) + { + for (int j = 20; j < Main.maxTilesY - 20; ++j) + { + int num2 = 20; + if (Main.tile[i1, j].type == (ushort) 25) + { + for (int i2 = i1 - num2; i2 <= i1 + num2; ++i2) + { + for (int index = j - num2; index <= j + num2; ++index) + { + if (Main.tile[i2, index].type == (ushort) 60) + { + if (Main.tile[i2, index + 1].type == (ushort) 444) + WorldGen.KillTile(i2, index + 1); + Main.tile[i2, index].type = (ushort) 23; + if (Main.tile[i2, index - 1].type == (ushort) 61 || Main.tile[i2, index - 1].type == (ushort) 74) + { + Main.tile[i2, index - 1].active(false); + WorldGen.PlaceTile(i2, index - 1, 24); + } + } + else if (Main.tile[i2, index - 1].type == (ushort) 233 || Main.tile[i2, index - 1].type == (ushort) 82) + WorldGen.KillTile(i2, index - 1); + if (Main.tile[i2, index].type == (ushort) 59) + Main.tile[i2, index].type = (ushort) 0; + } + } + } + else if (Main.tile[i1, j].type == (ushort) 203) + { + for (int i3 = i1 - num2; i3 <= i1 + num2; ++i3) + { + for (int index = j - num2; index <= j + num2; ++index) + { + if (Main.tile[i3, index].type == (ushort) 60) + { + if (Main.tile[i3, index + 1].type == (ushort) 444) + WorldGen.KillTile(i3, index + 1); + Main.tile[i3, index].type = (ushort) 199; + if (Main.tile[i3, index - 1].type == (ushort) 61 || Main.tile[i3, index - 1].type == (ushort) 74) + { + Main.tile[i3, index - 1].active(false); + WorldGen.PlaceTile(i3, index - 1, 201); + } + else if (Main.tile[i3, index - 1].type == (ushort) 233 || Main.tile[i3, index - 1].type == (ushort) 82) + WorldGen.KillTile(i3, index - 1); + } + if (Main.tile[i3, index].type == (ushort) 59) + Main.tile[i3, index].type = (ushort) 0; + } + } + } + if (Main.tile[i1, j].type == (ushort) 382 || Main.tile[i1, j].type == (ushort) 52) + Main.tile[i1, j].type = (ushort) 62; + if (j > WorldGen.lavaLine + WorldGen.genRand.Next(-2, 3) + 2) + WorldGen.SpreadGrass(i1, j, 59, 70); + else + WorldGen.SpreadGrass(i1, j, 59, 60); + if ((double) j > Main.rockLayer + 20.0 + (double) WorldGen.genRand.Next(-2, 3) && j <= WorldGen.lavaLine + 2 - 20 - WorldGen.genRand.Next(-2, 3) && (i1 < WorldGen.beachDistance + 200 - 20 - WorldGen.genRand.Next(-2, 3) || i1 > Main.maxTilesX - WorldGen.beachDistance - 200 + 20 + WorldGen.genRand.Next(-2, 3))) + { + if (Main.tile[i1, j].liquid > (byte) 0) + { + Main.tile[i1, j].honey(false); + Main.tile[i1, j].lava(false); + } + if (Main.tile[i1, j].type == (ushort) 59) + { + bool flag = false; + for (int index3 = i1 - 1; index3 <= i1 + 1; ++index3) + { + for (int index4 = j - 1; index4 <= j + 1; ++index4) + { + if (Main.tile[index3, index4].type == (ushort) 60) + flag = true; + } + } + if (!flag) + Main.tile[i1, j].type = (double) j >= (Main.rockLayer + (double) WorldGen.lavaLine) / 2.0 ? (ushort) 147 : (ushort) 161; + } + } + if (Main.tile[i1, j].type == (ushort) 7 || Main.tile[i1, j].type == (ushort) 166 || Main.tile[i1, j].type == (ushort) 6 || Main.tile[i1, j].type == (ushort) 167) + { + if ((double) j > ((double) WorldGen.lavaLine + Main.rockLayer * 2.0) / 3.0 + (double) WorldGen.genRand.Next(-2, 3) + 2.0) + Main.tile[i1, j].type = (ushort) 0; + } + else if ((Main.tile[i1, j].type == (ushort) 123 || Main.tile[i1, j].type == (ushort) 40) && (double) j > ((double) WorldGen.lavaLine + Main.rockLayer) / 2.0 + (double) WorldGen.genRand.Next(-2, 3) + 2.0) + Main.tile[i1, j].type = (ushort) 1; + if (j > num1 && (Main.tile[i1, j].liquid == (byte) 0 || !Main.tile[i1, j].lava()) && WorldGen.genRand.Next(25) == 0) + WorldGen.PlaceTile(i1, j, 231, true); + } + } + for (int checkedY = 20; checkedY < num1; ++checkedY) + { + for (int index = 20; index <= Main.maxTilesX - 20; ++index) + { + Main.tile[index, checkedY].honey(false); + if (Main.tile[index, checkedY].type == (ushort) 375) + Main.tile[index, checkedY].type = (ushort) 373; + if (Main.tile[index, checkedY].type == (ushort) 60) + { + Main.tile[index, checkedY].type = (ushort) 2; + if (WorldGen.genRand.Next(2) == 0) + WorldGen.GrowTreeWithSettings(index, checkedY, WorldGen.GrowTreeSettings.Profiles.VanityTree_Willow); + else + WorldGen.GrowTreeWithSettings(index, checkedY, WorldGen.GrowTreeSettings.Profiles.VanityTree_Sakura); + if (!Main.tile[index, checkedY - 1].active()) + WorldGen.PlaceTile(index, checkedY - 1, 3); + } + if (Main.tile[index, checkedY].type == (ushort) 59) + Main.tile[index, checkedY].type = (ushort) 0; + } + } + } + + private static void FinishGetGoodWorld() + { + int num1 = 0; + for (int index1 = 20; (double) index1 < Main.worldSurface; ++index1) + { + for (int index2 = 20; index2 < Main.maxTilesX - 20; ++index2) + { + if (Main.tile[index2, index1].active() && TileID.Sets.Clouds[(int) Main.tile[index2, index1].type]) + { + num1 = index1; + break; + } + } + } + byte num2 = (byte) WorldGen.genRand.Next(13, 25); + for (int index3 = 0; index3 < Main.maxTilesX; ++index3) + { + bool flag = false; + for (int index4 = 0; index4 < Main.maxTilesY; ++index4) + { + if (Main.tile[index3, index4].active() && Main.tileDungeon[(int) Main.tile[index3, index4].type]) + { + if (Main.tile[index3, index4].type == (ushort) 44) + { + num2 = (byte) WorldGen.genRand.Next(13, 15); + if (WorldGen.genRand.Next(2) == 0) + num2 = (byte) WorldGen.genRand.Next(23, 25); + } + if (Main.tile[index3, index4].type == (ushort) 43) + num2 = (byte) WorldGen.genRand.Next(15, 19); + if (Main.tile[index3, index4].type == (ushort) 41) + num2 = (byte) WorldGen.genRand.Next(19, 23); + } + } + if (flag) + break; + } + for (int i = 0; i < Main.maxTilesX; ++i) + { + for (int index = 5; index < Main.maxTilesY - 5; ++index) + { + if (Main.tile[i, index].active() && (Main.tileDungeon[(int) Main.tile[i, index].type] || TileID.Sets.CrackedBricks[(int) Main.tile[i, index].type])) + Main.tile[i, index].color(num2); + if (Main.wallDungeon[(int) Main.tile[i, index].wall]) + Main.tile[i, index].wallColor(num2); + if (Main.tile[i, index].active() && (Main.tile[i, index].type == (ushort) 226 || Main.tile[i, index].type == (ushort) 137 && Main.tile[i, index].frameY > (short) 0)) + Main.tile[i, index].color((byte) 17); + if (Main.tile[i, index].wall == (ushort) 87) + Main.tile[i, index].wallColor((byte) 25); + if (Main.tile[i, index].active()) + { + if (Main.tile[i, index].type == (ushort) 57 && WorldGen.genRand.Next(15) == 0) + { + if (Main.tile[i, index - 1].type == (ushort) 57) + Main.tile[i, index].active(false); + Main.tile[i, index].liquid = byte.MaxValue; + Main.tile[i, index].lava(true); + } + if (index < num1 && Main.tile[i, index].type == (ushort) 2) + { + Main.tile[i, index].type = !WorldGen.crimson ? (ushort) 23 : (ushort) 199; + if (Main.tile[i, index - 1].type == (ushort) 3) + Main.tile[i, index - 1].active(false); + if (Main.tile[i, index - 1].type == (ushort) 73) + Main.tile[i, index - 1].active(false); + if (Main.tile[i, index - 1].type == (ushort) 27) + WorldGen.KillTile(i, index - 1); + if (Main.tile[i, index - 1].type == (ushort) 596) + WorldGen.KillTile(i, index - 1); + if (Main.tile[i, index - 1].type == (ushort) 616) + WorldGen.KillTile(i, index - 1); + if (Main.tile[i, index - 1].type == (ushort) 82) + WorldGen.KillTile(i, index - 1); + if (Main.tile[i, index - 1].type == (ushort) 83) + WorldGen.KillTile(i, index - 1); + if (Main.tile[i, index - 1].type == (ushort) 186) + WorldGen.KillTile(i, index - 1); + if (Main.tile[i, index - 1].type == (ushort) 187) + WorldGen.KillTile(i, index - 1); + if (Main.tile[i, index - 1].type == (ushort) 185) + WorldGen.KillTile(i, index - 1); + if (Main.tile[i, index - 1].type == (ushort) 227) + WorldGen.KillTile(i, index - 1); + } + } + } + } + for (int index5 = 0; index5 < 8000 && Main.chest[index5] != null; ++index5) + { + if (WorldGen.genRand.Next(10) == 0 && Main.chest[index5].item[1].stack != 0) + { + for (int index6 = 1; index6 < 40; ++index6) + { + if (Main.chest[index5].item[index6].stack == 0) + { + Main.chest[index5].item[index6].SetDefaults(678); + break; + } + } + } + } + } + + private static void FinishDrunkGen() + { + byte color = (byte) WorldGen.genRand.Next(13, 25); + byte num = 16; + for (int index1 = 0; index1 < Main.maxTilesX; ++index1) + { + bool flag = false; + for (int index2 = 0; index2 < Main.maxTilesY; ++index2) + { + if (Main.tile[index1, index2].active() && Main.tileDungeon[(int) Main.tile[index1, index2].type]) + { + if (Main.tile[index1, index2].type == (ushort) 44) + { + color = (byte) WorldGen.genRand.Next(13, 15); + if (WorldGen.genRand.Next(2) == 0) + color = (byte) WorldGen.genRand.Next(23, 25); + } + if (Main.tile[index1, index2].type == (ushort) 43) + color = (byte) WorldGen.genRand.Next(15, 19); + if (Main.tile[index1, index2].type == (ushort) 41) + color = (byte) WorldGen.genRand.Next(19, 23); + } + } + if (flag) + break; + } + for (int index3 = 0; index3 < Main.maxTilesX; ++index3) + { + for (int index4 = 0; index4 < Main.maxTilesY; ++index4) + { + if (Main.tile[index3, index4].active() && (Main.tileDungeon[(int) Main.tile[index3, index4].type] || TileID.Sets.CrackedBricks[(int) Main.tile[index3, index4].type])) + Main.tile[index3, index4].color(color); + if (Main.wallDungeon[(int) Main.tile[index3, index4].wall]) + Main.tile[index3, index4].wallColor((byte) 25); + if (Main.tile[index3, index4].active() && (Main.tile[index3, index4].type == (ushort) 226 || Main.tile[index3, index4].type == (ushort) 137 && Main.tile[index3, index4].frameY > (short) 0)) + Main.tile[index3, index4].color(num); + if (Main.tile[index3, index4].wall == (ushort) 87) + Main.tile[index3, index4].wallColor(num); + } + } + for (int index5 = 0; index5 < 8000 && Main.chest[index5] != null; ++index5) + { + if (WorldGen.genRand.Next(15) == 0 && Main.chest[index5].item[1].stack != 0) + { + for (int index6 = 1; index6 < 40; ++index6) + { + if (Main.chest[index5].item[index6].stack == 0) + { + Main.chest[index5].item[index6].SetDefaults(5001); + break; + } + } + } + if (WorldGen.genRand.Next(30) == 0 && Main.chest[index5].item[1].stack != 0) + { + for (int index7 = 1; index7 < 40; ++index7) + { + if (Main.chest[index5].item[index7].stack == 0) + { + Main.chest[index5].item[index7].SetDefaults(678); + break; + } + } + } + } + } + + public static bool IsItATrap(Tile tile) => tile.actuator() || tile.active() && TileID.Sets.IsAMechanism[(int) tile.type]; + + public static bool IsItATrigger(Tile tile) => tile.active() && (TileID.Sets.IsATrigger[(int) tile.type] || tile.type == (ushort) 467 && (int) tile.frameX / 36 == 4 || tile.type == (ushort) 314 && Minecart.IsPressurePlate(tile)); + + public static void ClearAllBrokenTraps() + { + List pointsWeAlreadyWentOver = new List(); + for (int x = 50; x < Main.maxTilesX - 50; ++x) + { + for (int y = 50; y < Main.maxTilesY - 50; ++y) + { + if (Main.tile[x, y].wire() && !pointsWeAlreadyWentOver.Contains(new Point(x, y))) + WorldGen.ClearBrokenTraps(new Point(x, y), pointsWeAlreadyWentOver); + } + } + } + + public static void ClearBrokenTraps(Point startTileCoords, List pointsWeAlreadyWentOver) + { + List t1 = new List(); + List t2 = new List(); + List pointList = new List(); + bool flag1 = false; + bool flag2 = false; + t2.Add(startTileCoords); + while (t2.Count > 0) + { + Utils.Swap>(ref t1, ref t2); + while (t1.Count > 0) + { + Point point1 = t1[0]; + t1.RemoveAt(0); + if (WorldGen.InWorld(point1.X, point1.Y, 5)) + { + Tile tile = Main.tile[point1.X, point1.Y]; + if (tile.wire()) + { + pointsWeAlreadyWentOver.Add(point1); + pointList.Add(point1); + if (WorldGen.IsItATrap(tile)) + flag1 = true; + if (WorldGen.IsItATrigger(tile)) + flag2 = true; + if (!(flag2 & flag1)) + { + Point point2 = new Point(point1.X - 1, point1.Y); + if (!pointList.Contains(point2)) + t2.Add(point2); + point2 = new Point(point1.X + 1, point1.Y); + if (!pointList.Contains(point2)) + t2.Add(point2); + point2 = new Point(point1.X, point1.Y - 1); + if (!pointList.Contains(point2)) + t2.Add(point2); + point2 = new Point(point1.X, point1.Y + 1); + if (!pointList.Contains(point2)) + t2.Add(point2); + } + else + break; + } + } + } + if (flag2 & flag1) + break; + } + if (flag2 && flag1) + return; + foreach (Point point in pointList) + { + Tile tile = Main.tile[point.X, point.Y]; + tile.wire(false); + if (WorldGen.IsItATrap(tile)) + { + if (tile.actuator()) + Main.tile[point.X, point.Y].actuator(false); + else if (tile.type != (ushort) 105) + WorldGen.KillTile(point.X, point.Y); + } + else if (WorldGen.IsItATrigger(tile)) + { + if (tile.type == (ushort) 314) + tile.frameX = (short) 1; + else + WorldGen.KillTile(point.X, point.Y); + } + } + } + + private static float TuneOceanDepth(int count, float depth, bool floridaStyle = false) + { + if (!floridaStyle) + { + if (count < 3) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.2f; + else if (count < 6) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.15f; + else if (count < 9) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.1f; + else if (count < 15) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.07f; + else if (count < 50) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.05f; + else if (count < 75) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.04f; + else if (count < 100) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.03f; + else if (count < 125) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.02f; + else if (count < 150) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.01f; + else if (count < 175) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.005f; + else if (count < 200) + depth += (float) WorldGen.genRand.Next(10, 20) * (1f / 1000f); + else if (count < 230) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.01f; + else if (count < 235) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.05f; + else if (count < 240) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.1f; + else if (count < 245) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.05f; + else if (count < (int) byte.MaxValue) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.01f; + } + else if (count < 3) + depth += (float) WorldGen.genRand.Next(10, 20) * (1f / 1000f); + else if (count < 6) + depth += (float) WorldGen.genRand.Next(10, 20) * (1f / 500f); + else if (count < 9) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.004f; + else if (count < 15) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.007f; + else if (count < 50) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.01f; + else if (count < 75) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.014f; + else if (count < 100) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.019f; + else if (count < 125) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.027f; + else if (count < 150) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.038f; + else if (count < 175) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.052f; + else if (count < 200) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.08f; + else if (count < 230) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.12f; + else if (count < 235) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.16f; + else if (count < 240) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.27f; + else if (count < 245) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.43f; + else if (count < (int) byte.MaxValue) + depth += (float) WorldGen.genRand.Next(10, 20) * 0.6f; + return depth; + } + + public static void QueuePostGenAction(Action action) => WorldGen._postGenActions.Enqueue(action); + + public static void ConsumePostGenActions(StructureMap structures) + { + while (WorldGen._postGenActions.Count > 0) + WorldGen._postGenActions.Dequeue()(structures); + } + + public static Point RandomRectanglePoint(Microsoft.Xna.Framework.Rectangle rectangle) => new Point(WorldGen.genRand.Next(rectangle.X, rectangle.X + rectangle.Width), WorldGen.genRand.Next(rectangle.Y, rectangle.Y + rectangle.Height)); + + public static Point RandomRectanglePoint(int x, int y, int width, int height) => new Point(WorldGen.genRand.Next(x, x + width), WorldGen.genRand.Next(y, y + height)); + + public static Point RandomWorldPoint(int padding) => WorldGen.RandomWorldPoint(padding, padding, padding, padding); + + public static Point RandomWorldPoint(int top = 0, int right = 0, int bottom = 0, int left = 0) => new Point(WorldGen.genRand.Next(left, Main.maxTilesX - right), WorldGen.genRand.Next(top, Main.maxTilesY - bottom)); + + public static bool GrowPalmTree(int i, int y) + { + int index1 = y; + if (!WorldGen.InWorld(i, y)) + return false; + while (Main.tile[i, index1].type == (ushort) 20) + { + ++index1; + if (Main.tile[i, index1] == null) + return false; + } + Tile tile1 = Main.tile[i, index1]; + Tile tile2 = Main.tile[i, index1 - 1]; + int num1 = (int) tile1.slope(); + tile1.halfBrick(); + if (!tile1.active() || tile1.halfBrick() || tile1.slope() != (byte) 0 || tile2.wall != (ushort) 0 || tile2.liquid != (byte) 0 || tile1.type != (ushort) 53 && tile1.type != (ushort) 234 && tile1.type != (ushort) 116 && tile1.type != (ushort) 112 || !WorldGen.EmptyTileCheck(i, i, index1 - 2, index1 - 1, 20) || !WorldGen.EmptyTileCheck(i - 1, i + 1, index1 - 30, index1 - 3, 20)) + return false; + int num2 = WorldGen.genRand.Next(10, 21); + int num3 = WorldGen.genRand.Next(-8, 9) * 2; + short num4 = 0; + for (int index2 = 0; index2 < num2; ++index2) + { + Tile tile3 = Main.tile[i, index1 - 1 - index2]; + if (index2 == 0) + { + tile3.active(true); + tile3.type = (ushort) 323; + tile3.frameX = (short) 66; + tile3.frameY = (short) 0; + } + else if (index2 == num2 - 1) + { + tile3.active(true); + tile3.type = (ushort) 323; + tile3.frameX = (short) (22 * WorldGen.genRand.Next(4, 7)); + tile3.frameY = num4; + } + else + { + if ((int) num4 != num3) + { + float num5 = (float) index2 / (float) num2; + if ((double) num5 >= 0.25 && ((double) num5 < 0.5 && WorldGen.genRand.Next(13) == 0 || (double) num5 < 0.699999988079071 && WorldGen.genRand.Next(9) == 0 || (double) num5 < 0.949999988079071 && WorldGen.genRand.Next(5) == 0 || true)) + { + short num6 = (short) Math.Sign(num3); + num4 += (short) ((int) num6 * 2); + } + } + tile3.active(true); + tile3.type = (ushort) 323; + tile3.frameX = (short) (22 * WorldGen.genRand.Next(0, 3)); + tile3.frameY = num4; + } + } + WorldGen.RangeFrame(i - 2, index1 - num2 - 1, i + 2, index1 + 1); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, i, (int) ((double) index1 - (double) num2 * 0.5), num2 + 1); + return true; + } + + public static bool IsPalmOasisTree(int x) => x >= WorldGen.beachDistance && x <= Main.maxTilesX - WorldGen.beachDistance; + + public static bool GrowEpicTree(int i, int y) + { + int index1 = y; + while (Main.tile[i, index1].type == (ushort) 20) + ++index1; + if (Main.tile[i, index1].active() && !Main.tile[i, index1].halfBrick() && Main.tile[i, index1].slope() == (byte) 0 && Main.tile[i, index1].type == (ushort) 2 && Main.tile[i, index1 - 1].wall == (ushort) 0 && Main.tile[i, index1 - 1].liquid == (byte) 0 && (Main.tile[i - 1, index1].active() && (Main.tile[i - 1, index1].type == (ushort) 2 || Main.tile[i - 1, index1].type == (ushort) 23 || Main.tile[i - 1, index1].type == (ushort) 60 || Main.tile[i - 1, index1].type == (ushort) 109) || Main.tile[i + 1, index1].active() && (Main.tile[i + 1, index1].type == (ushort) 2 || Main.tile[i + 1, index1].type == (ushort) 23 || Main.tile[i + 1, index1].type == (ushort) 60 || Main.tile[i + 1, index1].type == (ushort) 109))) + { + int num1 = 2; + if (WorldGen.EmptyTileCheck(i - num1, i + num1, index1 - 55, index1 - 1, 20)) + { + bool flag1 = false; + bool flag2 = false; + int num2 = WorldGen.genRand.Next(20, 30); + if (WorldGen.drunkWorldGen) + num2 = WorldGen.genRand.Next(3, 7); + for (int index2 = index1 - num2; index2 < index1; ++index2) + { + Main.tile[i, index2].frameNumber((byte) WorldGen.genRand.Next(3)); + Main.tile[i, index2].active(true); + Main.tile[i, index2].type = (ushort) 5; + int num3 = WorldGen.genRand.Next(3); + int num4 = WorldGen.genRand.Next(10); + if (index2 == index1 - 1 || index2 == index1 - num2) + num4 = 0; + while (((num4 == 5 ? 1 : (num4 == 7 ? 1 : 0)) & (flag1 ? 1 : 0)) != 0 || ((num4 == 6 ? 1 : (num4 == 7 ? 1 : 0)) & (flag2 ? 1 : 0)) != 0) + num4 = WorldGen.genRand.Next(10); + flag1 = false; + flag2 = false; + if (num4 == 5 || num4 == 7) + flag1 = true; + if (num4 == 6 || num4 == 7) + flag2 = true; + switch (num4) + { + case 1: + if (num3 == 0) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 66; + } + if (num3 == 1) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 88; + } + if (num3 == 2) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 110; + break; + } + break; + case 2: + if (num3 == 0) + { + Main.tile[i, index2].frameX = (short) 22; + Main.tile[i, index2].frameY = (short) 0; + } + if (num3 == 1) + { + Main.tile[i, index2].frameX = (short) 22; + Main.tile[i, index2].frameY = (short) 22; + } + if (num3 == 2) + { + Main.tile[i, index2].frameX = (short) 22; + Main.tile[i, index2].frameY = (short) 44; + break; + } + break; + case 3: + if (num3 == 0) + { + Main.tile[i, index2].frameX = (short) 44; + Main.tile[i, index2].frameY = (short) 66; + } + if (num3 == 1) + { + Main.tile[i, index2].frameX = (short) 44; + Main.tile[i, index2].frameY = (short) 88; + } + if (num3 == 2) + { + Main.tile[i, index2].frameX = (short) 44; + Main.tile[i, index2].frameY = (short) 110; + break; + } + break; + case 4: + if (num3 == 0) + { + Main.tile[i, index2].frameX = (short) 22; + Main.tile[i, index2].frameY = (short) 66; + } + if (num3 == 1) + { + Main.tile[i, index2].frameX = (short) 22; + Main.tile[i, index2].frameY = (short) 88; + } + if (num3 == 2) + { + Main.tile[i, index2].frameX = (short) 22; + Main.tile[i, index2].frameY = (short) 110; + break; + } + break; + case 5: + if (num3 == 0) + { + Main.tile[i, index2].frameX = (short) 88; + Main.tile[i, index2].frameY = (short) 0; + } + if (num3 == 1) + { + Main.tile[i, index2].frameX = (short) 88; + Main.tile[i, index2].frameY = (short) 22; + } + if (num3 == 2) + { + Main.tile[i, index2].frameX = (short) 88; + Main.tile[i, index2].frameY = (short) 44; + break; + } + break; + case 6: + if (num3 == 0) + { + Main.tile[i, index2].frameX = (short) 66; + Main.tile[i, index2].frameY = (short) 66; + } + if (num3 == 1) + { + Main.tile[i, index2].frameX = (short) 66; + Main.tile[i, index2].frameY = (short) 88; + } + if (num3 == 2) + { + Main.tile[i, index2].frameX = (short) 66; + Main.tile[i, index2].frameY = (short) 110; + break; + } + break; + case 7: + if (num3 == 0) + { + Main.tile[i, index2].frameX = (short) 110; + Main.tile[i, index2].frameY = (short) 66; + } + if (num3 == 1) + { + Main.tile[i, index2].frameX = (short) 110; + Main.tile[i, index2].frameY = (short) 88; + } + if (num3 == 2) + { + Main.tile[i, index2].frameX = (short) 110; + Main.tile[i, index2].frameY = (short) 110; + break; + } + break; + default: + if (num3 == 0) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 0; + } + if (num3 == 1) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 22; + } + if (num3 == 2) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 44; + break; + } + break; + } + if (num4 == 5 || num4 == 7) + { + Main.tile[i - 1, index2].active(true); + Main.tile[i - 1, index2].type = (ushort) 5; + int num5 = WorldGen.genRand.Next(3); + if (WorldGen.genRand.Next(3) < 2) + { + if (num5 == 0) + { + Main.tile[i - 1, index2].frameX = (short) 44; + Main.tile[i - 1, index2].frameY = (short) 198; + } + if (num5 == 1) + { + Main.tile[i - 1, index2].frameX = (short) 44; + Main.tile[i - 1, index2].frameY = (short) 220; + } + if (num5 == 2) + { + Main.tile[i - 1, index2].frameX = (short) 44; + Main.tile[i - 1, index2].frameY = (short) 242; + } + } + else + { + if (num5 == 0) + { + Main.tile[i - 1, index2].frameX = (short) 66; + Main.tile[i - 1, index2].frameY = (short) 0; + } + if (num5 == 1) + { + Main.tile[i - 1, index2].frameX = (short) 66; + Main.tile[i - 1, index2].frameY = (short) 22; + } + if (num5 == 2) + { + Main.tile[i - 1, index2].frameX = (short) 66; + Main.tile[i - 1, index2].frameY = (short) 44; + } + } + } + if (num4 == 6 || num4 == 7) + { + Main.tile[i + 1, index2].active(true); + Main.tile[i + 1, index2].type = (ushort) 5; + int num6 = WorldGen.genRand.Next(3); + if (WorldGen.genRand.Next(3) < 2) + { + if (num6 == 0) + { + Main.tile[i + 1, index2].frameX = (short) 66; + Main.tile[i + 1, index2].frameY = (short) 198; + } + if (num6 == 1) + { + Main.tile[i + 1, index2].frameX = (short) 66; + Main.tile[i + 1, index2].frameY = (short) 220; + } + if (num6 == 2) + { + Main.tile[i + 1, index2].frameX = (short) 66; + Main.tile[i + 1, index2].frameY = (short) 242; + } + } + else + { + if (num6 == 0) + { + Main.tile[i + 1, index2].frameX = (short) 88; + Main.tile[i + 1, index2].frameY = (short) 66; + } + if (num6 == 1) + { + Main.tile[i + 1, index2].frameX = (short) 88; + Main.tile[i + 1, index2].frameY = (short) 88; + } + if (num6 == 2) + { + Main.tile[i + 1, index2].frameX = (short) 88; + Main.tile[i + 1, index2].frameY = (short) 110; + } + } + } + } + int num7 = WorldGen.genRand.Next(3); + bool flag3 = false; + bool flag4 = false; + if (Main.tile[i - 1, index1].active() && !Main.tile[i - 1, index1].halfBrick() && Main.tile[i - 1, index1].slope() == (byte) 0 && (Main.tile[i - 1, index1].type == (ushort) 2 || Main.tile[i - 1, index1].type == (ushort) 23 || Main.tile[i - 1, index1].type == (ushort) 60 || Main.tile[i - 1, index1].type == (ushort) 109)) + flag3 = true; + if (Main.tile[i + 1, index1].active() && !Main.tile[i + 1, index1].halfBrick() && Main.tile[i + 1, index1].slope() == (byte) 0 && (Main.tile[i + 1, index1].type == (ushort) 2 || Main.tile[i + 1, index1].type == (ushort) 23 || Main.tile[i + 1, index1].type == (ushort) 60 || Main.tile[i + 1, index1].type == (ushort) 109)) + flag4 = true; + if (!flag3) + { + if (num7 == 0) + num7 = 2; + if (num7 == 1) + num7 = 3; + } + if (!flag4) + { + if (num7 == 0) + num7 = 1; + if (num7 == 2) + num7 = 3; + } + if (flag3 && !flag4) + num7 = 2; + if (flag4 && !flag3) + num7 = 1; + if (num7 == 0 || num7 == 1) + { + Main.tile[i + 1, index1 - 1].active(true); + Main.tile[i + 1, index1 - 1].type = (ushort) 5; + int num8 = WorldGen.genRand.Next(3); + if (num8 == 0) + { + Main.tile[i + 1, index1 - 1].frameX = (short) 22; + Main.tile[i + 1, index1 - 1].frameY = (short) 132; + } + if (num8 == 1) + { + Main.tile[i + 1, index1 - 1].frameX = (short) 22; + Main.tile[i + 1, index1 - 1].frameY = (short) 154; + } + if (num8 == 2) + { + Main.tile[i + 1, index1 - 1].frameX = (short) 22; + Main.tile[i + 1, index1 - 1].frameY = (short) 176; + } + } + if (num7 == 0 || num7 == 2) + { + Main.tile[i - 1, index1 - 1].active(true); + Main.tile[i - 1, index1 - 1].type = (ushort) 5; + int num9 = WorldGen.genRand.Next(3); + if (num9 == 0) + { + Main.tile[i - 1, index1 - 1].frameX = (short) 44; + Main.tile[i - 1, index1 - 1].frameY = (short) 132; + } + if (num9 == 1) + { + Main.tile[i - 1, index1 - 1].frameX = (short) 44; + Main.tile[i - 1, index1 - 1].frameY = (short) 154; + } + if (num9 == 2) + { + Main.tile[i - 1, index1 - 1].frameX = (short) 44; + Main.tile[i - 1, index1 - 1].frameY = (short) 176; + } + } + int num10 = WorldGen.genRand.Next(3); + switch (num7) + { + case 0: + if (num10 == 0) + { + Main.tile[i, index1 - 1].frameX = (short) 88; + Main.tile[i, index1 - 1].frameY = (short) 132; + } + if (num10 == 1) + { + Main.tile[i, index1 - 1].frameX = (short) 88; + Main.tile[i, index1 - 1].frameY = (short) 154; + } + if (num10 == 2) + { + Main.tile[i, index1 - 1].frameX = (short) 88; + Main.tile[i, index1 - 1].frameY = (short) 176; + break; + } + break; + case 1: + if (num10 == 0) + { + Main.tile[i, index1 - 1].frameX = (short) 0; + Main.tile[i, index1 - 1].frameY = (short) 132; + } + if (num10 == 1) + { + Main.tile[i, index1 - 1].frameX = (short) 0; + Main.tile[i, index1 - 1].frameY = (short) 154; + } + if (num10 == 2) + { + Main.tile[i, index1 - 1].frameX = (short) 0; + Main.tile[i, index1 - 1].frameY = (short) 176; + break; + } + break; + case 2: + if (num10 == 0) + { + Main.tile[i, index1 - 1].frameX = (short) 66; + Main.tile[i, index1 - 1].frameY = (short) 132; + } + if (num10 == 1) + { + Main.tile[i, index1 - 1].frameX = (short) 66; + Main.tile[i, index1 - 1].frameY = (short) 154; + } + if (num10 == 2) + { + Main.tile[i, index1 - 1].frameX = (short) 66; + Main.tile[i, index1 - 1].frameY = (short) 176; + break; + } + break; + } + if (WorldGen.genRand.Next(13) != 0) + { + int num11 = WorldGen.genRand.Next(3); + if (num11 == 0) + { + Main.tile[i, index1 - num2].frameX = (short) 22; + Main.tile[i, index1 - num2].frameY = (short) 198; + } + if (num11 == 1) + { + Main.tile[i, index1 - num2].frameX = (short) 22; + Main.tile[i, index1 - num2].frameY = (short) 220; + } + if (num11 == 2) + { + Main.tile[i, index1 - num2].frameX = (short) 22; + Main.tile[i, index1 - num2].frameY = (short) 242; + } + } + else + { + int num12 = WorldGen.genRand.Next(3); + if (num12 == 0) + { + Main.tile[i, index1 - num2].frameX = (short) 0; + Main.tile[i, index1 - num2].frameY = (short) 198; + } + if (num12 == 1) + { + Main.tile[i, index1 - num2].frameX = (short) 0; + Main.tile[i, index1 - num2].frameY = (short) 220; + } + if (num12 == 2) + { + Main.tile[i, index1 - num2].frameX = (short) 0; + Main.tile[i, index1 - num2].frameY = (short) 242; + } + } + WorldGen.RangeFrame(i - 2, index1 - num2 - 1, i + 2, index1 + 1); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, i, (int) ((double) index1 - (double) num2 * 0.5), num2 + 1); + return true; + } + } + return false; + } + + public static bool Pyramid(int i, int j) + { + ushort num1 = 151; + int num2 = j - WorldGen.genRand.Next(0, 7); + int num3 = WorldGen.genRand.Next(9, 13); + int num4 = 1; + int num5 = j + WorldGen.genRand.Next(75, 125); + for (int index1 = num2; index1 < num5; ++index1) + { + for (int index2 = i - num4; index2 < i + num4 - 1; ++index2) + { + Main.tile[index2, index1].type = num1; + Main.tile[index2, index1].active(true); + Main.tile[index2, index1].halfBrick(false); + Main.tile[index2, index1].slope((byte) 0); + } + ++num4; + } + for (int i1 = i - num4 - 5; i1 <= i + num4 + 5; ++i1) + { + for (int j1 = j - 1; j1 <= num5 + 1; ++j1) + { + bool flag = true; + for (int index3 = i1 - 1; index3 <= i1 + 1; ++index3) + { + for (int index4 = j1 - 1; index4 <= j1 + 1; ++index4) + { + if ((int) Main.tile[index3, index4].type != (int) num1) + flag = false; + } + } + if (flag) + { + Main.tile[i1, j1].wall = (ushort) 34; + WorldGen.SquareWallFrame(i1, j1); + } + } + } + int num6 = 1; + if (WorldGen.genRand.Next(2) == 0) + num6 = -1; + int num7 = i - num3 * num6; + int j2 = j + num3; + int num8 = WorldGen.genRand.Next(5, 8); + bool flag1 = true; + int num9 = WorldGen.genRand.Next(20, 30); + while (flag1) + { + flag1 = false; + bool flag2 = false; + for (int index5 = j2; index5 <= j2 + num8; ++index5) + { + int index6 = num7; + if (Main.tile[index6, index5 - 1].type == (ushort) 53) + flag2 = true; + if ((int) Main.tile[index6, index5].type == (int) num1) + { + Main.tile[index6, index5 + 1].wall = (ushort) 34; + Main.tile[index6 + num6, index5].wall = (ushort) 34; + Main.tile[index6, index5].active(false); + flag1 = true; + } + if (flag2) + { + Main.tile[index6, index5].type = (ushort) 53; + Main.tile[index6, index5].active(true); + Main.tile[index6, index5].halfBrick(false); + Main.tile[index6, index5].slope((byte) 0); + } + } + num7 -= num6; + } + int index7 = i - num3 * num6; + bool flag3 = true; + bool flag4 = false; + bool flag5 = true; + while (flag5) + { + for (int index8 = j2; index8 <= j2 + num8; ++index8) + { + int index9 = index7; + Main.tile[index9, index8].active(false); + } + index7 += num6; + ++j2; + --num9; + if (j2 >= num5 - num8 * 2) + num9 = 10; + if (num9 <= 0) + { + bool flag6 = false; + if (!flag3 && !flag4) + { + flag4 = true; + flag6 = true; + int num10 = WorldGen.genRand.Next(7, 13); + int num11 = WorldGen.genRand.Next(23, 28); + int num12 = num11; + int num13 = index7; + while (num11 > 0) + { + for (int index10 = j2 - num10 + num8; index10 <= j2 + num8; ++index10) + { + if (num11 == num12 || num11 == 1) + { + if (index10 >= j2 - num10 + num8 + 2) + Main.tile[index7, index10].active(false); + } + else if (num11 == num12 - 1 || num11 == 2 || num11 == num12 - 2 || num11 == 3) + { + if (index10 >= j2 - num10 + num8 + 1) + Main.tile[index7, index10].active(false); + } + else + Main.tile[index7, index10].active(false); + } + --num11; + index7 += num6; + } + int num14 = index7 - num6; + int minValue = num14; + int maxValue = num13; + if (num14 > num13) + { + minValue = num13; + maxValue = num14; + } + int contain = WorldGen.genRand.Next(3); + switch (contain) + { + case 0: + contain = 857; + break; + case 1: + contain = 848; + break; + case 2: + contain = 934; + break; + } + WorldGen.AddBuriedChest((minValue + maxValue) / 2, j2, contain, Style: 1); + int num15 = WorldGen.genRand.Next(1, 10); + for (int index11 = 0; index11 < num15; ++index11) + WorldGen.PlaceSmallPile(WorldGen.genRand.Next(minValue, maxValue), j2 + num8, WorldGen.genRand.Next(16, 19), 1); + WorldGen.PlaceTile(minValue + 2, j2 - num10 + num8 + 1, 91, true, style: WorldGen.genRand.Next(4, 7)); + WorldGen.PlaceTile(minValue + 3, j2 - num10 + num8, 91, true, style: WorldGen.genRand.Next(4, 7)); + WorldGen.PlaceTile(maxValue - 2, j2 - num10 + num8 + 1, 91, true, style: WorldGen.genRand.Next(4, 7)); + WorldGen.PlaceTile(maxValue - 3, j2 - num10 + num8, 91, true, style: WorldGen.genRand.Next(4, 7)); + for (int x = minValue; x <= maxValue; ++x) + WorldGen.PlacePot(x, j2 + num8, style: WorldGen.genRand.Next(25, 28)); + } + if (flag3) + { + flag3 = false; + num6 *= -1; + num9 = WorldGen.genRand.Next(15, 20); + } + else if (flag6) + { + num9 = WorldGen.genRand.Next(10, 15); + } + else + { + num6 *= -1; + num9 = WorldGen.genRand.Next(20, 40); + } + } + if (j2 >= num5 - num8) + flag5 = false; + } + int num16 = WorldGen.genRand.Next(100, 200); + int num17 = WorldGen.genRand.Next(500, 800); + bool flag7 = true; + int num18 = num8; + int num19 = WorldGen.genRand.Next(10, 50); + if (num6 == 1) + index7 -= num18; + int num20 = WorldGen.genRand.Next(5, 10); + while (flag7) + { + --num16; + --num17; + --num19; + for (int index12 = index7 - num20 - WorldGen.genRand.Next(0, 2); index12 <= index7 + num18 + num20 + WorldGen.genRand.Next(0, 2); ++index12) + { + int index13 = j2; + if (index12 >= index7 && index12 <= index7 + num18) + { + Main.tile[index12, index13].active(false); + } + else + { + Main.tile[index12, index13].type = num1; + Main.tile[index12, index13].active(true); + Main.tile[index12, index13].halfBrick(false); + Main.tile[index12, index13].slope((byte) 0); + } + if (index12 >= index7 - 1 && index12 <= index7 + 1 + num18) + Main.tile[index12, index13].wall = (ushort) 34; + } + ++j2; + index7 += num6; + if (num16 <= 0) + { + flag7 = false; + for (int index14 = index7 + 1; index14 <= index7 + num18 - 1; ++index14) + { + if (Main.tile[index14, j2].active()) + flag7 = true; + } + } + if (num19 < 0) + { + num19 = WorldGen.genRand.Next(10, 50); + num6 *= -1; + } + if (num17 <= 0) + flag7 = false; + } + return true; + } + + public static bool GrowLivingTree(int i, int j, bool patch = false) + { + int index1 = 0; + int[] numArray1 = new int[1000]; + int[] numArray2 = new int[1000]; + int[] numArray3 = new int[1000]; + int[] numArray4 = new int[1000]; + int index2 = 0; + int[] numArray5 = new int[2000]; + int[] numArray6 = new int[2000]; + bool[] flagArray = new bool[2000]; + if (!WorldGen.SolidTile(i, j + 1) || Main.tile[i, j].active() || Main.tile[i, j + 1].type != (ushort) 0 && Main.tile[i, j + 1].type != (ushort) 2 && Main.tile[i, j + 1].type != (ushort) 1 && Main.tile[i, j + 1].type != (ushort) 40 && !TileID.Sets.Ore[(int) Main.tile[i, j + 1].type] || j < 150) + return false; + int num1 = i - WorldGen.genRand.Next(2, 3); + int num2 = i + WorldGen.genRand.Next(2, 3); + if (WorldGen.genRand.Next(5) == 0) + { + if (WorldGen.genRand.Next(2) == 0) + --num1; + else + ++num2; + } + int num3 = num2 - num1; + bool flag1 = num3 >= 4; + int num4 = i - 50; + int num5 = i + 50; + if (patch) + { + num4 = i - 20; + num5 = i + 20; + num1 = i - WorldGen.genRand.Next(1, 3); + num2 = i + WorldGen.genRand.Next(1, 3); + flag1 = num3 >= 4; + } + for (int index3 = num4; index3 <= num5; ++index3) + { + for (int index4 = 5; index4 < j - 5; ++index4) + { + if (Main.tile[index3, index4].active()) + { + if (!patch) + return false; + switch (Main.tile[index3, index4].type) + { + case 0: + case 1: + case 2: + case 191: + case 192: + continue; + default: + return false; + } + } + } + } + int num6 = num1; + int num7 = num2; + int minl = num1; + int minr = num2; + bool flag2 = true; + int num8 = WorldGen.genRand.Next(-8, -4); + int num9 = WorldGen.genRand.Next(2); + int index5 = j; + int num10 = WorldGen.genRand.Next(5, 15); + Main.tileSolid[48] = false; + while (flag2) + { + ++num8; + if (num8 > num10) + { + num10 = WorldGen.genRand.Next(5, 15); + num8 = 0; + numArray2[index1] = index5 + WorldGen.genRand.Next(5); + if (WorldGen.genRand.Next(5) == 0) + num9 = num9 != 0 ? 0 : 1; + if (num9 == 0) + { + numArray3[index1] = -1; + numArray1[index1] = num1; + numArray4[index1] = num2 - num1; + if (WorldGen.genRand.Next(2) == 0) + ++num1; + ++num6; + num9 = 1; + } + else + { + numArray3[index1] = 1; + numArray1[index1] = num2; + numArray4[index1] = num2 - num1; + if (WorldGen.genRand.Next(2) == 0) + --num2; + --num7; + num9 = 0; + } + if (num6 == num7) + flag2 = false; + ++index1; + } + for (int index6 = num1; index6 <= num2; ++index6) + { + Main.tile[index6, index5].type = (ushort) 191; + Main.tile[index6, index5].active(true); + Main.tile[index6, index5].halfBrick(false); + } + --index5; + } + for (int index7 = 0; index7 < index1 - 1; ++index7) + { + int index8 = numArray1[index7] + numArray3[index7]; + int index9 = numArray2[index7]; + int num11 = (int) ((double) numArray4[index7] * (1.0 + (double) WorldGen.genRand.Next(20, 30) * 0.100000001490116)); + Main.tile[index8, index9 + 1].type = (ushort) 191; + Main.tile[index8, index9 + 1].active(true); + Main.tile[index8, index9 + 1].halfBrick(false); + int num12 = WorldGen.genRand.Next(3, 5); + while (num11 > 0) + { + --num11; + Main.tile[index8, index9].type = (ushort) 191; + Main.tile[index8, index9].active(true); + Main.tile[index8, index9].halfBrick(false); + if (WorldGen.genRand.Next(10) == 0) + { + if (WorldGen.genRand.Next(2) == 0) + --index9; + else + ++index9; + } + else + index8 += numArray3[index7]; + if (num12 > 0) + --num12; + else if (WorldGen.genRand.Next(2) == 0) + { + num12 = WorldGen.genRand.Next(2, 5); + if (WorldGen.genRand.Next(2) == 0) + { + Main.tile[index8, index9].type = (ushort) 191; + Main.tile[index8, index9].active(true); + Main.tile[index8, index9].halfBrick(false); + Main.tile[index8, index9 - 1].type = (ushort) 191; + Main.tile[index8, index9 - 1].active(true); + Main.tile[index8, index9 - 1].halfBrick(false); + numArray5[index2] = index8; + numArray6[index2] = index9; + ++index2; + } + else + { + Main.tile[index8, index9].type = (ushort) 191; + Main.tile[index8, index9].active(true); + Main.tile[index8, index9].halfBrick(false); + Main.tile[index8, index9 + 1].type = (ushort) 191; + Main.tile[index8, index9 + 1].active(true); + Main.tile[index8, index9 + 1].halfBrick(false); + numArray5[index2] = index8; + numArray6[index2] = index9; + ++index2; + } + } + if (num11 == 0) + { + numArray5[index2] = index8; + numArray6[index2] = index9; + ++index2; + } + } + } + int index10 = (num1 + num2) / 2; + int index11 = index5; + int num13 = WorldGen.genRand.Next(num3 * 3, num3 * 5); + int num14 = 0; + int num15 = 0; + for (; num13 > 0; --num13) + { + Main.tile[index10, index11].type = (ushort) 191; + Main.tile[index10, index11].active(true); + Main.tile[index10, index11].halfBrick(false); + if (num14 > 0) + --num14; + if (num15 > 0) + --num15; + for (int index12 = -1; index12 < 2; ++index12) + { + if (index12 != 0 && (index12 < 0 && num14 == 0 || index12 > 0 && num15 == 0) && WorldGen.genRand.Next(2) == 0) + { + int index13 = index10; + int index14 = index11; + int num16 = WorldGen.genRand.Next(num3, num3 * 3); + if (index12 < 0) + num14 = WorldGen.genRand.Next(3, 5); + if (index12 > 0) + num15 = WorldGen.genRand.Next(3, 5); + int num17 = 0; + while (num16 > 0) + { + --num16; + index13 += index12; + Main.tile[index13, index14].type = (ushort) 191; + Main.tile[index13, index14].active(true); + Main.tile[index13, index14].halfBrick(false); + if (num16 == 0) + { + numArray5[index2] = index13; + numArray6[index2] = index14; + flagArray[index2] = true; + ++index2; + } + if (WorldGen.genRand.Next(5) == 0) + { + if (WorldGen.genRand.Next(2) == 0) + --index14; + else + ++index14; + Main.tile[index13, index14].type = (ushort) 191; + Main.tile[index13, index14].active(true); + Main.tile[index13, index14].halfBrick(false); + } + if (num17 > 0) + --num17; + else if (WorldGen.genRand.Next(3) == 0) + { + num17 = WorldGen.genRand.Next(2, 4); + int index15 = index13; + int num18 = index14; + int index16 = WorldGen.genRand.Next(2) != 0 ? num18 + 1 : num18 - 1; + Main.tile[index15, index16].type = (ushort) 191; + Main.tile[index15, index16].active(true); + Main.tile[index15, index16].halfBrick(false); + numArray5[index2] = index15; + numArray6[index2] = index16; + flagArray[index2] = true; + int index17 = index2 + 1; + numArray5[index17] = index15 + WorldGen.genRand.Next(-5, 6); + numArray6[index17] = index16 + WorldGen.genRand.Next(-5, 6); + flagArray[index17] = true; + index2 = index17 + 1; + } + } + } + } + numArray5[index2] = index10; + numArray6[index2] = index11; + ++index2; + if (WorldGen.genRand.Next(4) == 0) + { + if (WorldGen.genRand.Next(2) == 0) + --index10; + else + ++index10; + Main.tile[index10, index11].type = (ushort) 191; + Main.tile[index10, index11].active(true); + Main.tile[index10, index11].halfBrick(false); + } + --index11; + } + for (int i1 = minl; i1 <= minr; ++i1) + { + int num19 = WorldGen.genRand.Next(1, 6); + int j1 = j + 1; + while (num19 > 0) + { + if (WorldGen.SolidTile(i1, j1)) + --num19; + Main.tile[i1, j1].type = (ushort) 191; + Main.tile[i1, j1].active(true); + Main.tile[i1, j1].halfBrick(false); + ++j1; + } + int num20 = j1; + int num21 = WorldGen.genRand.Next(2, num3 + 1); + for (int index18 = 0; index18 < num21; ++index18) + { + int index19 = num20; + int num22 = (minl + minr) / 2; + int num23 = 1; + int num24 = i1 >= num22 ? 1 : -1; + if (i1 == num22 || num3 > 6 && (i1 == num22 - 1 || i1 == num22 + 1)) + num24 = 0; + int num25 = num24; + int index20 = i1; + int num26 = WorldGen.genRand.Next((int) ((double) num3 * 3.5), num3 * 6); + while (num26 > 0) + { + --num26; + index20 += num24; + if (Main.tile[index20, index19].wall != (ushort) 244) + { + Main.tile[index20, index19].type = (ushort) 191; + Main.tile[index20, index19].active(true); + Main.tile[index20, index19].halfBrick(false); + } + index19 += num23; + if (Main.tile[index20, index19].wall != (ushort) 244) + { + Main.tile[index20, index19].type = (ushort) 191; + Main.tile[index20, index19].active(true); + Main.tile[index20, index19].halfBrick(false); + } + if (!Main.tile[index20, index19 + 1].active()) + { + num24 = 0; + num23 = 1; + } + if (WorldGen.genRand.Next(3) == 0) + num24 = num25 >= 0 ? (num25 <= 0 ? WorldGen.genRand.Next(-1, 2) : (num24 != 0 ? 0 : 1)) : (num24 != 0 ? 0 : -1); + if (WorldGen.genRand.Next(3) == 0) + num23 = num23 != 0 ? 0 : 1; + } + } + } + for (int index21 = 0; index21 < index2; ++index21) + { + int num27 = (int) ((double) WorldGen.genRand.Next(5, 8) * (1.0 + (double) num3 * 0.0500000007450581)); + if (flagArray[index21]) + num27 = WorldGen.genRand.Next(6, 12) + num3; + int num28 = numArray5[index21] - num27 * 2; + int num29 = numArray5[index21] + num27 * 2; + int num30 = numArray6[index21] - num27 * 2; + int num31 = numArray6[index21] + num27 * 2; + float num32 = (float) (2.0 - (double) WorldGen.genRand.Next(5) * 0.100000001490116); + for (int i2 = num28; i2 <= num29; ++i2) + { + for (int index22 = num30; index22 <= num31; ++index22) + { + if (Main.tile[i2, index22].type != (ushort) 191) + { + if (flagArray[index21]) + { + if ((double) (new Vector2((float) numArray5[index21], (float) numArray6[index21]) - new Vector2((float) i2, (float) index22)).Length() < (double) num27 * 0.9) + { + Main.tile[i2, index22].type = (ushort) 192; + Main.tile[i2, index22].active(true); + Main.tile[i2, index22].halfBrick(false); + } + } + else if ((double) Math.Abs(numArray5[index21] - i2) + (double) Math.Abs(numArray6[index21] - index22) * (double) num32 < (double) num27) + { + Main.tile[i2, index22].type = (ushort) 192; + Main.tile[i2, index22].active(true); + Main.tile[i2, index22].halfBrick(false); + } + } + } + if (WorldGen.genRand.Next(30) == 0) + { + int j2 = num30; + if (!Main.tile[i2, j2].active()) + { + while (!Main.tile[i2, j2 + 1].active() && j2 < num31) + ++j2; + if (Main.tile[i2, j2 + 1].type == (ushort) 192) + WorldGen.PlaceTile(i2, j2, 187, true, style: WorldGen.genRand.Next(50, 52)); + } + } + if (!flagArray[index21] && WorldGen.genRand.Next(15) == 0) + { + int j3 = num31; + int num33 = j3 + 100; + if (!Main.tile[i2, j3].active()) + { + while (!Main.tile[i2, j3 + 1].active() && j3 < num33) + ++j3; + if (Main.tile[i2, j3 + 1].type != (ushort) 192) + { + if (WorldGen.genRand.Next(2) == 0) + { + WorldGen.PlaceTile(i2, j3, 187, true, style: WorldGen.genRand.Next(47, 50)); + } + else + { + int Y = WorldGen.genRand.Next(2); + int X = 72; + if (Y == 1) + X = WorldGen.genRand.Next(59, 62); + WorldGen.PlaceSmallPile(i2, j3, X, Y); + } + } + } + } + } + } + if (flag1) + { + bool flag3 = false; + for (int j4 = j; j4 < j + 20 && (double) j4 < Main.worldSurface - 2.0; ++j4) + { + for (int i3 = minl; i3 <= minr; ++i3) + { + if (Main.tile[i3, j4].wall == (ushort) 0 && !WorldGen.SolidTile(i3, j4)) + flag3 = true; + } + } + if (!flag3) + WorldGen.GrowLivingTree_MakePassage(j, num3, ref minl, ref minr, patch); + } + Main.tileSolid[48] = true; + return true; + } + + public static bool GrowDungeonTree(int i, int j, bool patch = false) + { + int index1 = 0; + int[] numArray1 = new int[1000]; + int[] numArray2 = new int[1000]; + int[] numArray3 = new int[1000]; + int[] numArray4 = new int[1000]; + int index2 = 0; + int[] numArray5 = new int[2000]; + int[] numArray6 = new int[2000]; + bool[] flagArray = new bool[2000]; + int num1 = i - WorldGen.genRand.Next(2, 3); + int num2 = i + WorldGen.genRand.Next(2, 3); + if (WorldGen.genRand.Next(5) == 0) + { + if (WorldGen.genRand.Next(2) == 0) + --num1; + else + ++num2; + } + int num3 = num2 - num1; + int num4 = num1; + int num5 = num2; + int minl = num1; + int minr = num2; + bool flag = true; + int num6 = WorldGen.genRand.Next(-8, -4); + int num7 = WorldGen.genRand.Next(2); + int index3 = j; + int num8 = WorldGen.genRand.Next(5, 15); + Main.tileSolid[48] = false; + while (flag) + { + ++num6; + if (num6 > num8) + { + num8 = WorldGen.genRand.Next(5, 15); + num6 = 0; + numArray2[index1] = index3 + WorldGen.genRand.Next(5); + if (WorldGen.genRand.Next(5) == 0) + num7 = num7 != 0 ? 0 : 1; + if (num7 == 0) + { + numArray3[index1] = -1; + numArray1[index1] = num1; + numArray4[index1] = num2 - num1; + if (WorldGen.genRand.Next(2) == 0) + ++num1; + ++num4; + num7 = 1; + } + else + { + numArray3[index1] = 1; + numArray1[index1] = num2; + numArray4[index1] = num2 - num1; + if (WorldGen.genRand.Next(2) == 0) + --num2; + --num5; + num7 = 0; + } + if (num4 == num5) + flag = false; + ++index1; + } + for (int index4 = num1; index4 <= num2; ++index4) + { + Main.tile[index4, index3].type = (ushort) 191; + Main.tile[index4, index3].active(true); + Main.tile[index4, index3].halfBrick(false); + Main.tile[index4, index3].color((byte) 28); + } + --index3; + } + for (int index5 = 0; index5 < index1 - 1; ++index5) + { + int index6 = numArray1[index5] + numArray3[index5]; + int index7 = numArray2[index5]; + int num9 = (int) ((double) numArray4[index5] * (1.0 + (double) WorldGen.genRand.Next(20, 30) * 0.100000001490116)); + Main.tile[index6, index7 + 1].type = (ushort) 191; + Main.tile[index6, index7 + 1].active(true); + Main.tile[index6, index7 + 1].halfBrick(false); + Main.tile[index6, index7 + 1].color((byte) 28); + int num10 = WorldGen.genRand.Next(3, 5); + while (num9 > 0) + { + --num9; + Main.tile[index6, index7].type = (ushort) 191; + Main.tile[index6, index7].active(true); + Main.tile[index6, index7].halfBrick(false); + Main.tile[index6, index7].color((byte) 28); + if (WorldGen.genRand.Next(10) == 0) + { + if (WorldGen.genRand.Next(2) == 0) + --index7; + else + ++index7; + } + else + index6 += numArray3[index5]; + if (num10 > 0) + --num10; + else if (WorldGen.genRand.Next(2) == 0) + { + num10 = WorldGen.genRand.Next(2, 5); + if (WorldGen.genRand.Next(2) == 0) + { + Main.tile[index6, index7].type = (ushort) 191; + Main.tile[index6, index7].active(true); + Main.tile[index6, index7].halfBrick(false); + Main.tile[index6, index7].color((byte) 28); + Main.tile[index6, index7 - 1].type = (ushort) 191; + Main.tile[index6, index7 - 1].active(true); + Main.tile[index6, index7 - 1].halfBrick(false); + Main.tile[index6, index7 - 1].color((byte) 28); + numArray5[index2] = index6; + numArray6[index2] = index7; + ++index2; + } + else + { + Main.tile[index6, index7].type = (ushort) 191; + Main.tile[index6, index7].active(true); + Main.tile[index6, index7].halfBrick(false); + Main.tile[index6, index7].color((byte) 28); + Main.tile[index6, index7 + 1].type = (ushort) 191; + Main.tile[index6, index7 + 1].active(true); + Main.tile[index6, index7 + 1].halfBrick(false); + Main.tile[index6, index7 + 1].color((byte) 28); + numArray5[index2] = index6; + numArray6[index2] = index7; + ++index2; + } + } + if (num9 == 0) + { + numArray5[index2] = index6; + numArray6[index2] = index7; + ++index2; + } + } + } + int index8 = (num1 + num2) / 2; + int index9 = index3; + int num11 = WorldGen.genRand.Next(num3 * 3, num3 * 5); + int num12 = 0; + int num13 = 0; + for (; num11 > 0; --num11) + { + Main.tile[index8, index9].type = (ushort) 191; + Main.tile[index8, index9].active(true); + Main.tile[index8, index9].halfBrick(false); + Main.tile[index8, index9].color((byte) 28); + if (num12 > 0) + --num12; + if (num13 > 0) + --num13; + for (int index10 = -1; index10 < 2; ++index10) + { + if (index10 != 0 && (index10 < 0 && num12 == 0 || index10 > 0 && num13 == 0) && WorldGen.genRand.Next(2) == 0) + { + int index11 = index8; + int index12 = index9; + int num14 = WorldGen.genRand.Next(num3, num3 * 3); + if (index10 < 0) + num12 = WorldGen.genRand.Next(3, 5); + if (index10 > 0) + num13 = WorldGen.genRand.Next(3, 5); + int num15 = 0; + while (num14 > 0) + { + --num14; + index11 += index10; + Main.tile[index11, index12].type = (ushort) 191; + Main.tile[index11, index12].active(true); + Main.tile[index11, index12].halfBrick(false); + Main.tile[index11, index12].color((byte) 28); + if (num14 == 0) + { + numArray5[index2] = index11; + numArray6[index2] = index12; + flagArray[index2] = true; + ++index2; + } + if (WorldGen.genRand.Next(5) == 0) + { + if (WorldGen.genRand.Next(2) == 0) + --index12; + else + ++index12; + Main.tile[index11, index12].type = (ushort) 191; + Main.tile[index11, index12].active(true); + Main.tile[index11, index12].halfBrick(false); + Main.tile[index11, index12].color((byte) 28); + } + if (num15 > 0) + --num15; + else if (WorldGen.genRand.Next(3) == 0) + { + num15 = WorldGen.genRand.Next(2, 4); + int index13 = index11; + int num16 = index12; + int index14 = WorldGen.genRand.Next(2) != 0 ? num16 + 1 : num16 - 1; + Main.tile[index13, index14].type = (ushort) 191; + Main.tile[index13, index14].active(true); + Main.tile[index13, index14].halfBrick(false); + Main.tile[index13, index14].color((byte) 28); + numArray5[index2] = index13; + numArray6[index2] = index14; + flagArray[index2] = true; + int index15 = index2 + 1; + numArray5[index15] = index13 + WorldGen.genRand.Next(-5, 6); + numArray6[index15] = index14 + WorldGen.genRand.Next(-5, 6); + flagArray[index15] = true; + index2 = index15 + 1; + } + } + } + } + numArray5[index2] = index8; + numArray6[index2] = index9; + ++index2; + if (WorldGen.genRand.Next(4) == 0) + { + if (WorldGen.genRand.Next(2) == 0) + --index8; + else + ++index8; + Main.tile[index8, index9].type = (ushort) 191; + Main.tile[index8, index9].active(true); + Main.tile[index8, index9].halfBrick(false); + Main.tile[index8, index9].color((byte) 28); + } + --index9; + } + for (int i1 = minl; i1 <= minr; ++i1) + { + int num17 = WorldGen.genRand.Next(1, 6); + int j1 = j + 1; + while (num17 > 0) + { + if (WorldGen.SolidTile(i1, j1)) + --num17; + Main.tile[i1, j1].type = (ushort) 191; + Main.tile[i1, j1].active(true); + Main.tile[i1, j1].halfBrick(false); + ++j1; + } + int num18 = j1; + int num19 = WorldGen.genRand.Next(2, num3 + 1); + for (int index16 = 0; index16 < num19; ++index16) + { + int index17 = num18; + int num20 = (minl + minr) / 2; + int num21 = 1; + int num22 = i1 >= num20 ? 1 : -1; + if (i1 == num20 || num3 > 6 && (i1 == num20 - 1 || i1 == num20 + 1)) + num22 = 0; + int num23 = num22; + int index18 = i1; + int num24 = WorldGen.genRand.Next((int) ((double) num3 * 3.5), num3 * 6); + while (num24 > 0) + { + --num24; + index18 += num22; + if (Main.tile[index18, index17].wall != (ushort) 244) + { + Main.tile[index18, index17].type = (ushort) 191; + Main.tile[index18, index17].active(true); + Main.tile[index18, index17].halfBrick(false); + } + index17 += num21; + if (Main.tile[index18, index17].wall != (ushort) 244) + { + Main.tile[index18, index17].type = (ushort) 191; + Main.tile[index18, index17].active(true); + Main.tile[index18, index17].halfBrick(false); + } + if (!Main.tile[index18, index17 + 1].active()) + { + num22 = 0; + num21 = 1; + } + if (WorldGen.genRand.Next(3) == 0) + num22 = num23 >= 0 ? (num23 <= 0 ? WorldGen.genRand.Next(-1, 2) : (num22 != 0 ? 0 : 1)) : (num22 != 0 ? 0 : -1); + if (WorldGen.genRand.Next(3) == 0) + num21 = num21 != 0 ? 0 : 1; + } + } + } + for (int index19 = 0; index19 < index2; ++index19) + { + int num25 = (int) ((double) WorldGen.genRand.Next(5, 8) * (1.0 + (double) num3 * 0.0500000007450581)); + if (flagArray[index19]) + num25 = WorldGen.genRand.Next(6, 12) + num3; + int num26 = numArray5[index19] - num25 * 2; + int num27 = numArray5[index19] + num25 * 2; + int num28 = numArray6[index19] - num25 * 2; + int num29 = numArray6[index19] + num25 * 2; + float num30 = (float) (2.0 - (double) WorldGen.genRand.Next(5) * 0.100000001490116); + for (int index20 = num26; index20 <= num27; ++index20) + { + for (int index21 = num28; index21 <= num29; ++index21) + { + if (Main.tile[index20, index21].type != (ushort) 191) + { + if (flagArray[index19]) + { + if ((double) (new Vector2((float) numArray5[index19], (float) numArray6[index19]) - new Vector2((float) index20, (float) index21)).Length() < (double) num25 * 0.9) + { + Main.tile[index20, index21].type = (ushort) 192; + Main.tile[index20, index21].active(true); + Main.tile[index20, index21].halfBrick(false); + Main.tile[index20, index21].color((byte) 28); + } + } + else if ((double) Math.Abs(numArray5[index19] - index20) + (double) Math.Abs(numArray6[index19] - index21) * (double) num30 < (double) num25) + { + Main.tile[index20, index21].type = (ushort) 192; + Main.tile[index20, index21].active(true); + Main.tile[index20, index21].halfBrick(false); + Main.tile[index20, index21].color((byte) 28); + } + } + } + } + } + WorldGen.GrowDungeonTree_MakePassage(j, num3, ref minl, ref minr, patch); + Main.tileSolid[48] = true; + return true; + } + + private static bool GrowLivingTree_HorizontalTunnel(int i, int j) + { + int num1 = i; + int y = j; + int num2 = num1; + int num3 = num1; + int num4 = 80; + bool flag1 = false; + int num5 = 1; + if (WorldGen.genRand.Next(2) == 0) + num5 *= -1; + for (int index1 = 0; index1 < 2; ++index1) + { + bool flag2 = false; + if (num2 == num1 && num5 > 0) + { + for (int x = num1 + 5; x < num1 + num4; ++x) + { + if (!WorldGen.InWorld(x, y, 10)) + return false; + if ((double) y < Main.worldSurface) + { + int index2 = y - 7; + while (index2 <= y + 7 && Main.tile[x, index2].wall != (ushort) 0) + ++index2; + } + if (Main.tile[x, j].type == (ushort) 48) + { + flag1 = true; + break; + } + if (Main.tile[x, j].type == (ushort) 191) + { + for (int index3 = y - 2; index3 <= y; ++index3) + { + if (Main.tile[x + 2, index3].wall != (ushort) 244) + flag2 = true; + } + if (!flag2) + { + index1 = 2; + num3 = x + 2; + break; + } + break; + } + if (!Main.tile[x, j].active()) + { + bool flag3 = true; + for (int index4 = y - 2; index4 <= y; ++index4) + { + if ((double) y < Main.worldSurface + 3.0 && (Main.tile[x + 1, index4].wall == (ushort) 0 || Main.tile[x + 2, index4].wall == (ushort) 0 || Main.tile[x + 3, index4].wall == (ushort) 0)) + return false; + if (Main.tile[x, index4].active() || Main.tile[x + 1, index4].active() || Main.tile[x + 2, index4].active()) + flag3 = false; + } + if (flag3) + { + index1 = 2; + num3 = x; + break; + } + } + } + } + bool flag4 = false; + if (num3 == num1 && num5 < 0) + { + for (int x = num1 - 5; x > num1 - num4; --x) + { + if (!WorldGen.InWorld(x, y, 10)) + return false; + if ((double) y < Main.worldSurface) + { + int index5 = y - 7; + while (index5 <= y + 7 && Main.tile[x, index5].wall != (ushort) 0) + ++index5; + } + if (Main.tile[x, j].type == (ushort) 48) + { + flag1 = true; + break; + } + if (Main.tile[x, y].type == (ushort) 191) + { + for (int index6 = y - 2; index6 <= y; ++index6) + { + if (Main.tile[x - 3, index6].wall != (ushort) 244) + flag4 = true; + } + if (!flag4) + { + index1 = 2; + num2 = x - 2; + break; + } + break; + } + if (!Main.tile[x, j].active()) + { + bool flag5 = true; + for (int index7 = y - 2; index7 <= y; ++index7) + { + if ((double) y < Main.worldSurface + 3.0 && (Main.tile[x - 1, index7].wall == (ushort) 0 || Main.tile[x - 2, index7].wall == (ushort) 0 || Main.tile[x - 3, index7].wall == (ushort) 0)) + return false; + if (Main.tile[x, index7].active() || Main.tile[x - 1, index7].active() || Main.tile[x - 2, index7].active()) + flag5 = false; + } + if (flag5) + { + index1 = 2; + num2 = x; + break; + } + } + } + } + num5 *= -1; + } + if (num2 == num3) + return false; + bool flag6 = false; + bool flag7 = false; + for (int j1 = y - 5; j1 <= y + 1; ++j1) + { + for (int i1 = num2; i1 <= num3; ++i1) + { + int num6 = 2; + if (Math.Abs(i1 - num3) > 3 && Math.Abs(i1 - num2) > 3) + num6 = 4; + if (Main.tile[i1, j1].wall != (ushort) 244 && Main.tile[i1, j1].type != (ushort) 19 && Main.tile[i1, j1].type != (ushort) 15 && Main.tile[i1, j1].type != (ushort) 304 && Main.tile[i1, j1].type != (ushort) 21 && Main.tile[i1, j1].type != (ushort) 10) + { + if (!Main.wallDungeon[(int) Main.tile[i1, j1].wall] && (!Main.tile[i1, j1].active() || !Main.wallDungeon[(int) Main.tile[i1, j1 - 1].wall] && !Main.wallDungeon[(int) Main.tile[i1, j1 + 1].wall])) + { + Main.tile[i1, j1].active(true); + Main.tile[i1, j1].type = (ushort) 191; + Main.tile[i1, j1].halfBrick(false); + } + if (Main.tile[i1, j1 - 1].type == (ushort) 40) + Main.tile[i1, j1 - 1].type = (ushort) 0; + if (Main.tile[i1, j1 + 1].type == (ushort) 40) + Main.tile[i1, j1 + 1].type = (ushort) 0; + } + if (j1 >= y - num6 && j1 <= y && Main.tile[i1, j1].type != (ushort) 19 && Main.tile[i1, j1].type != (ushort) 15 && Main.tile[i1, j1].type != (ushort) 304 && Main.tile[i1, j1].type != (ushort) 21 && Main.tile[i1, j1].type != (ushort) 10 && Main.tile[i1, j1 - 1].type != (ushort) 15 && Main.tile[i1, j1 - 1].type != (ushort) 304 && Main.tile[i1, j1 - 1].type != (ushort) 21 && Main.tile[i1, j1 - 1].type != (ushort) 10 && Main.tile[i1, j1 + 1].type != (ushort) 10) + { + if (!Main.wallDungeon[(int) Main.tile[i1, j1].wall]) + Main.tile[i1, j1].wall = (ushort) 244; + Main.tile[i1, j1].liquid = (byte) 0; + Main.tile[i1, j1].active(false); + } + if (j1 == y) + { + int style = 7; + if (Main.wallDungeon[(int) Main.tile[i1, j1].wall] || Main.wallDungeon[(int) Main.tile[i1, j1 - 1].wall] || Main.wallDungeon[(int) Main.tile[i1, j1 - 2].wall]) + style = 13; + if (i1 <= num2 + 4 && !flag6) + { + if (Main.tile[i1 - 1, j1].type == (ushort) 10 || Main.tile[i1 + 1, j1].type == (ushort) 10) + flag6 = true; + else if (WorldGen.genRand.Next(3) == 0) + { + WorldGen.PlaceTile(i1, j1, 10, true, style: style); + if (Main.tile[i1, j1].type == (ushort) 10) + flag6 = true; + } + } + if (i1 >= num3 - 4 && !flag7) + { + if (Main.tile[i1 - 1, j1].type == (ushort) 10 || Main.tile[i1 + 1, j1].type == (ushort) 10) + flag7 = true; + else if (WorldGen.genRand.Next(3) == 0) + { + WorldGen.PlaceTile(i1, j1, 10, true, style: style); + if (Main.tile[i1, j1].type == (ushort) 10) + flag7 = true; + } + } + } + } + } + return true; + } + + private static void GrowDungeonTree_MakePassage( + int j, + int W, + ref int minl, + ref int minr, + bool noSecretRoom = false) + { + int num1 = minl; + int num2 = minr; + int num3 = (minl + minr) / 2; + int num4 = 5; + int j1 = j - 6; + int num5 = 0; + bool flag = true; + WorldGen.genRand.Next(5, 16); +label_1: + int num6; + int style; + while (true) + { + int num7; + do + { + do + { + ++j1; + if (j1 <= WorldGen.dungeonY - 5) + { + num6 = (minl + minr) / 2; + int num8 = 1; + if (j1 > j && W <= 4) + ++num8; + for (int i = minl - num8; i <= minr + num8; ++i) + { + if (i > num6 - 2 && i <= num6 + 1) + { + if (j1 > j - 4) + { + if (Main.tile[i, j1].type != (ushort) 19 && Main.tile[i, j1].type != (ushort) 15 && Main.tile[i, j1].type != (ushort) 304 && Main.tile[i, j1].type != (ushort) 21 && Main.tile[i, j1].type != (ushort) 10 && Main.tile[i, j1 - 1].type != (ushort) 15 && Main.tile[i, j1 - 1].type != (ushort) 304 && Main.tile[i, j1 - 1].type != (ushort) 21 && Main.tile[i, j1 - 1].type != (ushort) 10 && Main.tile[i, j1 + 1].type != (ushort) 10) + Main.tile[i, j1].active(false); + if (!Main.wallDungeon[(int) Main.tile[i, j1].wall]) + Main.tile[i, j1].wall = (ushort) 244; + if (!Main.wallDungeon[(int) Main.tile[i - 1, j1].wall] && (Main.tile[i - 1, j1].wall > (ushort) 0 || (double) j1 >= Main.worldSurface)) + Main.tile[i - 1, j1].wall = (ushort) 244; + if (!Main.wallDungeon[(int) Main.tile[i + 1, j1].wall] && (Main.tile[i + 1, j1].wall > (ushort) 0 || (double) j1 >= Main.worldSurface)) + Main.tile[i + 1, j1].wall = (ushort) 244; + if (j1 == j && i > num6 - 2 && i <= num6 + 1) + { + Main.tile[i, j1 + 1].active(false); + WorldGen.PlaceTile(i, j1 + 1, 19, true, style: 23); + } + } + } + else + { + if (Main.tile[i, j1].type != (ushort) 15 && Main.tile[i, j1].type != (ushort) 304 && Main.tile[i, j1].type != (ushort) 21 && Main.tile[i, j1].type != (ushort) 10 && Main.tile[i - 1, j1].type != (ushort) 10 && Main.tile[i + 1, j1].type != (ushort) 10) + { + if (!Main.wallDungeon[(int) Main.tile[i, j1].wall]) + { + Main.tile[i, j1].type = (ushort) 191; + Main.tile[i, j1].active(true); + Main.tile[i, j1].halfBrick(false); + } + if (Main.tile[i - 1, j1].type == (ushort) 40) + Main.tile[i - 1, j1].type = (ushort) 0; + if (Main.tile[i + 1, j1].type == (ushort) 40) + Main.tile[i + 1, j1].type = (ushort) 0; + } + if (j1 <= j && j1 > j - 4 && i > minl - num8 && i <= minr + num8 - 1) + Main.tile[i, j1].wall = (ushort) 244; + } + if (!WorldGen.gen) + { + WorldGen.SquareTileFrame(i, j1); + WorldGen.SquareWallFrame(i, j1); + } + } + ++num5; + } + else + goto label_50; + } + while (num5 < 6); + num5 = 0; + num7 = WorldGen.genRand.Next(3); + if (num7 == 0) + num7 = -1; + if (flag) + num7 = 2; + if (num7 == -1 && Main.tile[minl - num4, j1].wall == (ushort) 244) + num7 = 1; + else if (num7 == 1 && Main.tile[minr + num4, j1].wall == (ushort) 244) + num7 = -1; + if (num7 == 2) + { + flag = false; + style = 23; + if (Main.wallDungeon[(int) Main.tile[minl, j1 + 1].wall] || Main.wallDungeon[(int) Main.tile[minl + 1, j1 + 1].wall] || Main.wallDungeon[(int) Main.tile[minl + 2, j1 + 1].wall]) + style = 12; + } + else + goto label_49; + } + while (!WorldGen.SolidTile(minl - 1, j1 + 1) && !WorldGen.SolidTile(minr + 1, j1 + 1) && style == 12); + break; +label_49: + minl += num7; + minr += num7; + } + for (int i = minl; i <= minr; ++i) + { + if (i > num6 - 2 && i <= num6 + 1) + { + Main.tile[i, j1 + 1].active(false); + WorldGen.PlaceTile(i, j1 + 1, 19, true, style: style); + } + } + goto label_1; +label_50: + minl = num1; + minr = num2; + int num9 = (minl + minr) / 2; + for (int index1 = minl; index1 <= minr; ++index1) + { + for (int index2 = j - 3; index2 <= j; ++index2) + { + Main.tile[index1, index2].active(false); + if (!Main.wallDungeon[(int) Main.tile[index1, index2].wall]) + Main.tile[index1, index2].wall = (ushort) 244; + } + } + } + + private static void GrowLivingTree_MakePassage( + int j, + int W, + ref int minl, + ref int minr, + bool noSecretRoom = false) + { + bool flag1 = noSecretRoom; + int num1 = minl; + int num2 = minr; + bool flag2 = false; + int num3 = (minl + minr) / 2; + int num4 = 5; + int index1 = j - 6; + int num5 = 50; + int num6 = WorldGen.genRand.Next(400, 700); + int num7 = 0; + bool flag3 = true; + int num8 = WorldGen.genRand.Next(5, 16); + while (num6 > 0) + { + ++index1; + --num6; + --num5; + int i1 = (minl + minr) / 2; + if (!Main.tile[minl, index1].active() && Main.tile[minl, index1].wall == (ushort) 244 && !Main.tile[minr, index1].active() && Main.tile[minr, index1].wall == (ushort) 244) + break; + int num9 = 1; + if (index1 > j && W <= 4) + ++num9; + for (int i2 = minl - num9; i2 <= minr + num9; ++i2) + { + if (Main.wallDungeon[(int) Main.tile[i2, index1].wall]) + { + flag1 = true; + flag2 = true; + } + if (i2 > i1 - 2 && i2 <= i1 + 1) + { + if (index1 > j - 4) + { + if (Main.tile[i2, index1].type != (ushort) 19 && Main.tile[i2, index1].type != (ushort) 15 && Main.tile[i2, index1].type != (ushort) 304 && Main.tile[i2, index1].type != (ushort) 21 && Main.tile[i2, index1].type != (ushort) 10 && Main.tile[i2, index1 - 1].type != (ushort) 15 && Main.tile[i2, index1 - 1].type != (ushort) 304 && Main.tile[i2, index1 - 1].type != (ushort) 21 && Main.tile[i2, index1 - 1].type != (ushort) 10 && Main.tile[i2, index1 + 1].type != (ushort) 10) + Main.tile[i2, index1].active(false); + if (!Main.wallDungeon[(int) Main.tile[i2, index1].wall]) + Main.tile[i2, index1].wall = (ushort) 244; + if (!Main.wallDungeon[(int) Main.tile[i2 - 1, index1].wall] && (Main.tile[i2 - 1, index1].wall > (ushort) 0 || (double) index1 >= Main.worldSurface)) + Main.tile[i2 - 1, index1].wall = (ushort) 244; + if (!Main.wallDungeon[(int) Main.tile[i2 + 1, index1].wall] && (Main.tile[i2 + 1, index1].wall > (ushort) 0 || (double) index1 >= Main.worldSurface)) + Main.tile[i2 + 1, index1].wall = (ushort) 244; + if (index1 == j && i2 > i1 - 2 && i2 <= i1 + 1) + { + Main.tile[i2, index1 + 1].active(false); + WorldGen.PlaceTile(i2, index1 + 1, 19, true, style: 23); + } + } + } + else + { + if (Main.tile[i2, index1].type != (ushort) 15 && Main.tile[i2, index1].type != (ushort) 304 && Main.tile[i2, index1].type != (ushort) 21 && Main.tile[i2, index1].type != (ushort) 10 && Main.tile[i2 - 1, index1].type != (ushort) 10 && Main.tile[i2 + 1, index1].type != (ushort) 10) + { + if (!Main.wallDungeon[(int) Main.tile[i2, index1].wall]) + { + Main.tile[i2, index1].type = (ushort) 191; + Main.tile[i2, index1].active(true); + Main.tile[i2, index1].halfBrick(false); + } + if (Main.tile[i2 - 1, index1].type == (ushort) 40) + Main.tile[i2 - 1, index1].type = (ushort) 0; + if (Main.tile[i2 + 1, index1].type == (ushort) 40) + Main.tile[i2 + 1, index1].type = (ushort) 0; + } + if (index1 <= j && index1 > j - 4 && i2 > minl - num9 && i2 <= minr + num9 - 1) + Main.tile[i2, index1].wall = (ushort) 244; + } + if (!WorldGen.gen) + { + WorldGen.SquareTileFrame(i2, index1); + WorldGen.SquareWallFrame(i2, index1); + } + } + ++num7; + if (num7 >= 6) + { + num7 = 0; + int num10 = WorldGen.genRand.Next(3); + if (num10 == 0) + num10 = -1; + if (flag3) + num10 = 2; + if (num10 == -1 && Main.tile[minl - num4, index1].wall == (ushort) 244) + num10 = 1; + else if (num10 == 1 && Main.tile[minr + num4, index1].wall == (ushort) 244) + num10 = -1; + if (num10 == 2) + { + flag3 = false; + int style = 23; + if (Main.wallDungeon[(int) Main.tile[minl, index1 + 1].wall] || Main.wallDungeon[(int) Main.tile[minl + 1, index1 + 1].wall] || Main.wallDungeon[(int) Main.tile[minl + 2, index1 + 1].wall]) + style = 12; + for (int i3 = minl; i3 <= minr; ++i3) + { + if (i3 > i1 - 2 && i3 <= i1 + 1) + { + Main.tile[i3, index1 + 1].active(false); + WorldGen.PlaceTile(i3, index1 + 1, 19, true, style: style); + } + } + } + else + { + minl += num10; + minr += num10; + } + if (noSecretRoom) + { + --num8; + if (num8 <= 0) + num8 = !WorldGen.GrowLivingTree_HorizontalTunnel(i1, index1) ? WorldGen.genRand.Next(2, 11) : WorldGen.genRand.Next(5, 21); + } + if (num5 <= 0 && !flag1) + { + flag1 = true; + WorldGen.GrowLivingTreePassageRoom(minl, minr, index1); + } + } + if (flag2) + { + bool flag4 = true; + for (int i4 = minl; i4 <= minr; ++i4) + { + for (int j1 = index1 + 1; j1 <= index1 + 2; ++j1) + { + if (WorldGen.SolidTile(i4, j1)) + flag4 = false; + } + } + if (flag4) + num6 = 0; + } + else if (num5 <= 0) + { + bool flag5 = true; + for (int i5 = minl; i5 <= minr; ++i5) + { + for (int j2 = index1 + 1; j2 <= index1 + 4; ++j2) + { + if (WorldGen.SolidTile(i5, j2)) + flag5 = false; + } + } + if (flag5) + num6 = 0; + } + } + minl = num1; + minr = num2; + int num11 = (minl + minr) / 2; + for (int index2 = minl; index2 <= minr; ++index2) + { + for (int index3 = j - 3; index3 <= j; ++index3) + { + Main.tile[index2, index3].active(false); + bool flag6 = true; + for (int index4 = index2 - 1; index4 <= index2 + 1; ++index4) + { + for (int index5 = index3 - 1; index5 <= index3 + 1; ++index5) + { + if (!Main.tile[index4, index5].active() && Main.tile[index4, index5].wall == (ushort) 0) + flag6 = false; + } + } + if (flag6 && !Main.wallDungeon[(int) Main.tile[index2, index3].wall]) + Main.tile[index2, index3].wall = (ushort) 244; + } + } + } + + private static void GrowLivingTreePassageRoom(int minl, int minr, int Y) + { + int num1 = WorldGen.genRand.Next(2); + if (num1 == 0) + num1 = -1; + int num2 = Y - 2; + int num3 = Y; + int num4 = (minl + minr) / 2; + if (num1 < 0) + --num4; + if (num1 > 0) + ++num4; + int num5 = WorldGen.genRand.Next(15, 30); + int num6 = num4 + num5; + if (num1 < 0) + { + num6 = num4; + num4 -= num5; + } + for (int index1 = num4; index1 < num6; ++index1) + { + for (int index2 = Y - 20; index2 < Y + 10; ++index2) + { + if (Main.tile[index1, index2].wall == (ushort) 0 && !Main.tile[index1, index2].active() && (double) index2 < Main.worldSurface) + return; + } + } + WorldGen.dMinX = num4; + WorldGen.dMaxX = num6; + if (num1 < 0) + WorldGen.dMinX -= 40; + else + WorldGen.dMaxX += 40; + for (int index3 = num4; index3 <= num6; ++index3) + { + for (int index4 = num2 - 2; index4 <= num3 + 2; ++index4) + { + if (Main.tile[index3 - 1, index4].type == (ushort) 40) + Main.tile[index3 - 1, index4].type = (ushort) 0; + if (Main.tile[index3 + 1, index4].type == (ushort) 40) + Main.tile[index3 + 1, index4].type = (ushort) 0; + if (Main.tile[index3, index4 - 1].type == (ushort) 40) + Main.tile[index3, index4 - 1].type = (ushort) 0; + if (Main.tile[index3, index4 + 1].type == (ushort) 40) + Main.tile[index3, index4 + 1].type = (ushort) 0; + if (Main.tile[index3, index4].wall != (ushort) 244 && Main.tile[index3, index4].type != (ushort) 19) + { + Main.tile[index3, index4].active(true); + Main.tile[index3, index4].type = (ushort) 191; + Main.tile[index3, index4].halfBrick(false); + } + if (index4 >= num2 && index4 <= num3) + { + Main.tile[index3, index4].liquid = (byte) 0; + Main.tile[index3, index4].wall = (ushort) 244; + Main.tile[index3, index4].active(false); + } + } + } + int i1 = (minl + minr) / 2 + 3 * num1; + int j = Y; + WorldGen.PlaceTile(i1, j, 10, true, style: 7); + int num7 = WorldGen.genRand.Next(5, 9); + int num8 = WorldGen.genRand.Next(4, 6); + int num9; + int num10; + if (num1 < 0) + { + num9 = num4 + num7; + num10 = num4 - num7; + } + else + { + num10 = num6 - num7; + num9 = num6 + num7; + } + int num11 = num3 - num8; + for (int index5 = num10 - 2; index5 <= num9 + 2; ++index5) + { + for (int index6 = num11 - 2; index6 <= num3 + 2; ++index6) + { + if (Main.tile[index5 - 1, index6].type == (ushort) 40) + Main.tile[index5 - 1, index6].type = (ushort) 40; + if (Main.tile[index5 + 1, index6].type == (ushort) 40) + Main.tile[index5 + 1, index6].type = (ushort) 40; + if (Main.tile[index5, index6 - 1].type == (ushort) 40) + Main.tile[index5, index6 - 1].type = (ushort) 40; + if (Main.tile[index5, index6 + 1].type == (ushort) 40) + Main.tile[index5, index6 + 1].type = (ushort) 40; + if (Main.tile[index5, index6].wall != (ushort) 244 && Main.tile[index5, index6].type != (ushort) 19) + { + Main.tile[index5, index6].active(true); + Main.tile[index5, index6].type = (ushort) 191; + Main.tile[index5, index6].halfBrick(false); + } + if (index6 >= num11 && index6 <= num3 && index5 >= num10 && index5 <= num9) + { + Main.tile[index5, index6].liquid = (byte) 0; + Main.tile[index5, index6].wall = (ushort) 244; + Main.tile[index5, index6].active(false); + } + } + } + int i2 = num10 - 2; + if (num1 < 0) + i2 = num9 + 2; + WorldGen.PlaceTile(i2, j, 10, true, style: 7); + int i3 = num9; + if (num1 < 0) + i3 = num10; + int maxValue = 2; + if (WorldGen.genRand.Next(maxValue) == 0) + { + maxValue += 2; + WorldGen.PlaceTile(i3, Y, 15, true, style: 5); + if (num1 < 0) + { + Main.tile[i3, Y - 1].frameX += (short) 18; + Main.tile[i3, Y].frameX += (short) 18; + } + } + int i4 = num9 - 2; + if (num1 < 0) + i4 = num10 + 2; + WorldGen.PlaceTile(i4, Y, 304, true); + int i5 = num9 - 4; + if (num1 < 0) + i5 = num10 + 4; + if (WorldGen.genRand.Next(maxValue) == 0) + { + WorldGen.PlaceTile(i5, Y, 15, true, style: 5); + if (num1 > 0) + { + Main.tile[i5, Y - 1].frameX += (short) 18; + Main.tile[i5, Y].frameX += (short) 18; + } + } + int i6 = num9 - 7; + if (num1 < 0) + i6 = num10 + 8; + int contain = 832; + if (WorldGen.genRand.Next(3) == 0) + contain = 4281; + WorldGen.AddBuriedChest(i6, Y, contain, Style: 12); + } + + public static void TreeGrowFXCheck(int x, int y) + { + int treeHeight = 1; + int passStyle = -1; + Tile topTile = (Tile) null; + for (int index = -1; index > -100; --index) + { + Tile tile = Main.tile[x, y + index]; + if (tile.active() && TileID.Sets.GetsCheckedForLeaves[(int) tile.type]) + { + topTile = tile; + ++treeHeight; + } + else + break; + } + for (int index = 1; index < 5; ++index) + { + Tile t = Main.tile[x, y + index]; + if (t.active() && TileID.Sets.GetsCheckedForLeaves[(int) t.type]) + { + ++treeHeight; + } + else + { + WorldGen.GetTreeLeaf(x, topTile, t, ref treeHeight, out int _, out passStyle); + break; + } + } + if (treeHeight <= 0 || passStyle <= 0) + return; + if (Main.netMode == 2) + NetMessage.SendData(112, number: 1, number2: ((float) x), number3: ((float) y), number4: ((float) treeHeight), number5: passStyle); + if (Main.netMode != 0) + return; + WorldGen.TreeGrowFX(x, y, treeHeight, passStyle); + } + + public static void GetTreeLeaf( + int x, + Tile topTile, + Tile t, + ref int treeHeight, + out int treeFrame, + out int passStyle) + { + treeFrame = 0; + passStyle = -1; + if (topTile.frameX == (short) 22 || topTile.frameX == (short) 44 || topTile.frameX == (short) 66) + { + if (topTile.frameY == (short) 220) + treeFrame = 1; + else if (topTile.frameY == (short) 242) + treeFrame = 2; + } + if (topTile.frameX == (short) 44 || topTile.frameX == (short) 66) + { + if (topTile.frameY == (short) 220) + treeFrame = 1; + else if (topTile.frameY == (short) 242) + treeFrame = 2; + } + switch (topTile.type) + { + case 583: + case 584: + case 585: + case 586: + case 587: + case 588: + case 589: + passStyle = 1249 + ((int) topTile.type - 583); + break; + case 596: + passStyle = 1248; + break; + case 616: + passStyle = 1257; + break; + } + if (passStyle > -1) + return; + switch (t.type) + { + case 2: + case 477: + passStyle = 910; + break; + case 23: + case 400: + passStyle = 915; + break; + case 53: + passStyle = 911; + break; + case 60: + passStyle = 914; + break; + case 70: + passStyle = 912; + break; + case 109: + case 492: + int num1 = 917; + if (WorldGen.GetHollowTreeFoliageStyle() != 20) + { + if (x % 3 == 1) + treeFrame += 3; + if (x % 3 == 2) + treeFrame += 6; + switch (treeFrame) + { + case 0: + passStyle = 2; + break; + case 1: + passStyle = 1; + break; + case 2: + passStyle = 7; + break; + case 3: + passStyle = 4; + break; + case 4: + passStyle = 5; + break; + case 5: + passStyle = 6; + break; + case 6: + passStyle = 3; + break; + case 7: + passStyle = 8; + break; + case 8: + passStyle = 0; + break; + } + } + else + { + int num2 = 196; + if (x % 6 == 1) + treeFrame += 3; + else if (x % 6 == 2) + treeFrame += 6; + else if (x % 6 == 3) + treeFrame += 9; + else if (x % 6 == 4) + treeFrame += 12; + else if (x % 6 == 5) + treeFrame += 15; + switch (treeFrame) + { + case 0: + passStyle = num2; + break; + case 1: + passStyle = num2; + break; + case 2: + passStyle = num2; + break; + case 3: + passStyle = num2 + 1; + break; + case 4: + passStyle = num2 + 2; + break; + case 5: + passStyle = num2 + 1; + break; + case 6: + passStyle = num2 + 3; + break; + case 7: + passStyle = num2 + 4; + break; + case 8: + passStyle = num2 + 5; + break; + case 9: + passStyle = num2 + 6; + break; + case 10: + passStyle = num2 + 6; + break; + case 11: + passStyle = num2 + 6; + break; + case 12: + passStyle = num2 + 7; + break; + case 13: + passStyle = num2 + 7; + break; + case 14: + passStyle = num2 + 7; + break; + case 15: + passStyle = num2 + 8; + break; + case 16: + passStyle = num2 + 8; + break; + case 17: + passStyle = num2 + 8; + break; + } + } + passStyle += num1; + treeHeight += 5; + break; + case 116: + passStyle = 919; + break; + case 147: + passStyle = 913; + break; + case 199: + case 234: + passStyle = 916; + break; + } + } + + public static void TreeGrowFX(int x, int y, int height, int treeGore, bool hitTree = false) + { + Vector2 vector2_1 = new Vector2((float) x, (float) y) * 16f + new Vector2(8f, 8f); + int Type = treeGore; + int num1 = 4; + int maxValue = 2; + for (int index1 = 0; index1 > -height; --index1) + { + if (index1 > -height / 2 && Main.rand.Next(3) != 0) + { + for (int index2 = 0; index2 < 5; ++index2) + Dust.NewDust(vector2_1 + new Vector2(-16f, (float) (index1 * 16)) + Utils.RandomVector2(Main.rand, -20f, 20f), 4, 4, num1 + Main.rand.Next(maxValue), SpeedY: -4f, Alpha: 100); + } + else + { + float max = 10f; + Vector2 vector2_2 = new Vector2(5f, 7f); + Gore.NewGore(vector2_1 + new Vector2(-16f, (float) (index1 * 16)) - vector2_2, Utils.RandomVector2(Main.rand, -max, max), Type, (float) (0.699999988079071 + (double) Main.rand.NextFloat() * 0.600000023841858)); + Gore.NewGore(vector2_1 + new Vector2(0.0f, (float) (index1 * 16)) - vector2_2, Utils.RandomVector2(Main.rand, -max, max), Type, (float) (0.699999988079071 + (double) Main.rand.NextFloat() * 0.600000023841858)); + Gore.NewGore(vector2_1 + new Vector2(16f, (float) (index1 * 16)) - vector2_2, Utils.RandomVector2(Main.rand, -max, max), Type, (float) (0.699999988079071 + (double) Main.rand.NextFloat() * 0.600000023841858)); + if (index1 == -height + 1) + { + int num2 = 20; + if (hitTree) + num2 = 5; + for (int index3 = 0; index3 < num2; ++index3) + Gore.NewGore(vector2_1 + new Vector2(0.0f, (float) (index1 * 16 - 40)) + Utils.RandomVector2(Main.rand, -40f, 40f) - vector2_2, Utils.RandomVector2(Main.rand, -10f, 10f), Type, (float) (0.699999988079071 + (double) Main.rand.NextFloat() * 0.600000023841858)); + } + } + } + } + + public static bool IsTileALeafyTreeTop(int i, int j) + { + Tile tileSafely = Framing.GetTileSafely(i, j); + return tileSafely.active() && TileID.Sets.GetsCheckedForLeaves[(int) tileSafely.type] && (tileSafely.type == (ushort) 323 && tileSafely.frameX >= (short) 88 || tileSafely.frameX == (short) 22 && tileSafely.frameY >= (short) 198 && tileSafely.frameY <= (short) 242); + } + + public static bool IsTileTypeFitForTree(ushort type) + { + if (type <= (ushort) 70) + { + if (type <= (ushort) 23) + { + if (type != (ushort) 2 && type != (ushort) 23) + goto label_8; + } + else if (type != (ushort) 60 && type != (ushort) 70) + goto label_8; + } + else if (type <= (ushort) 147) + { + if (type != (ushort) 109 && type != (ushort) 147) + goto label_8; + } + else if (type != (ushort) 199 && type != (ushort) 477 && type != (ushort) 492) + goto label_8; + return true; +label_8: + return false; + } + + public static bool GrowTree(int i, int y) + { + int index1 = y; + while (Main.tile[i, index1].type == (ushort) 20) + ++index1; + if ((Main.tile[i - 1, index1 - 1].liquid != (byte) 0 || Main.tile[i, index1 - 1].liquid != (byte) 0 || Main.tile[i + 1, index1 - 1].liquid != (byte) 0) && !WorldGen.notTheBees || !Main.tile[i, index1].nactive() || Main.tile[i, index1].halfBrick() || Main.tile[i, index1].slope() != (byte) 0 || !WorldGen.IsTileTypeFitForTree(Main.tile[i, index1].type) || Main.tile[i, index1 - 1].wall != (ushort) 0 && Main.tile[i, index1 - 1].wall != (ushort) 106 && Main.tile[i, index1 - 1].wall != (ushort) 107 && (Main.tile[i, index1 - 1].wall < (ushort) 138 || Main.tile[i, index1 - 1].wall > (ushort) 141) && Main.tile[i, index1 - 1].wall != (ushort) 145 && Main.tile[i, index1 - 1].wall != (ushort) 150 && Main.tile[i, index1 - 1].wall != (ushort) 152 && Main.tile[i, index1 - 1].wall != (ushort) 80 || (!Main.tile[i - 1, index1].active() || !WorldGen.IsTileTypeFitForTree(Main.tile[i - 1, index1].type)) && (!Main.tile[i + 1, index1].active() || !WorldGen.IsTileTypeFitForTree(Main.tile[i + 1, index1].type))) + return false; + byte color = Main.tile[i, index1].color(); + int num1 = 2; + int num2 = WorldGen.genRand.Next(5, 17); + int num3 = num2 + 4; + if (Main.tile[i, index1].type == (ushort) 60) + num3 += 5; + bool flag1 = false; + if (Main.tile[i, index1].type == (ushort) 70 && WorldGen.EmptyTileCheck(i - num1, i + num1, index1 - num3, index1 - 3, 20) && WorldGen.EmptyTileCheck(i - 1, i + 1, index1 - 2, index1 - 1, 20)) + flag1 = true; + if (WorldGen.EmptyTileCheck(i - num1, i + num1, index1 - num3, index1 - 1, 20)) + flag1 = true; + if (!flag1) + return false; + bool flag2 = false; + bool flag3 = false; + for (int index2 = index1 - num2; index2 < index1; ++index2) + { + Main.tile[i, index2].frameNumber((byte) WorldGen.genRand.Next(3)); + Main.tile[i, index2].active(true); + Main.tile[i, index2].type = (ushort) 5; + Main.tile[i, index2].color(color); + int num4 = WorldGen.genRand.Next(3); + int num5 = WorldGen.genRand.Next(10); + if (index2 == index1 - 1 || index2 == index1 - num2) + num5 = 0; + while (((num5 == 5 ? 1 : (num5 == 7 ? 1 : 0)) & (flag2 ? 1 : 0)) != 0 || ((num5 == 6 ? 1 : (num5 == 7 ? 1 : 0)) & (flag3 ? 1 : 0)) != 0) + num5 = WorldGen.genRand.Next(10); + flag2 = false; + flag3 = false; + if (num5 == 5 || num5 == 7) + flag2 = true; + if (num5 == 6 || num5 == 7) + flag3 = true; + switch (num5) + { + case 1: + if (num4 == 0) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 66; + } + if (num4 == 1) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 88; + } + if (num4 == 2) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 110; + break; + } + break; + case 2: + if (num4 == 0) + { + Main.tile[i, index2].frameX = (short) 22; + Main.tile[i, index2].frameY = (short) 0; + } + if (num4 == 1) + { + Main.tile[i, index2].frameX = (short) 22; + Main.tile[i, index2].frameY = (short) 22; + } + if (num4 == 2) + { + Main.tile[i, index2].frameX = (short) 22; + Main.tile[i, index2].frameY = (short) 44; + break; + } + break; + case 3: + if (num4 == 0) + { + Main.tile[i, index2].frameX = (short) 44; + Main.tile[i, index2].frameY = (short) 66; + } + if (num4 == 1) + { + Main.tile[i, index2].frameX = (short) 44; + Main.tile[i, index2].frameY = (short) 88; + } + if (num4 == 2) + { + Main.tile[i, index2].frameX = (short) 44; + Main.tile[i, index2].frameY = (short) 110; + break; + } + break; + case 4: + if (num4 == 0) + { + Main.tile[i, index2].frameX = (short) 22; + Main.tile[i, index2].frameY = (short) 66; + } + if (num4 == 1) + { + Main.tile[i, index2].frameX = (short) 22; + Main.tile[i, index2].frameY = (short) 88; + } + if (num4 == 2) + { + Main.tile[i, index2].frameX = (short) 22; + Main.tile[i, index2].frameY = (short) 110; + break; + } + break; + case 5: + if (num4 == 0) + { + Main.tile[i, index2].frameX = (short) 88; + Main.tile[i, index2].frameY = (short) 0; + } + if (num4 == 1) + { + Main.tile[i, index2].frameX = (short) 88; + Main.tile[i, index2].frameY = (short) 22; + } + if (num4 == 2) + { + Main.tile[i, index2].frameX = (short) 88; + Main.tile[i, index2].frameY = (short) 44; + break; + } + break; + case 6: + if (num4 == 0) + { + Main.tile[i, index2].frameX = (short) 66; + Main.tile[i, index2].frameY = (short) 66; + } + if (num4 == 1) + { + Main.tile[i, index2].frameX = (short) 66; + Main.tile[i, index2].frameY = (short) 88; + } + if (num4 == 2) + { + Main.tile[i, index2].frameX = (short) 66; + Main.tile[i, index2].frameY = (short) 110; + break; + } + break; + case 7: + if (num4 == 0) + { + Main.tile[i, index2].frameX = (short) 110; + Main.tile[i, index2].frameY = (short) 66; + } + if (num4 == 1) + { + Main.tile[i, index2].frameX = (short) 110; + Main.tile[i, index2].frameY = (short) 88; + } + if (num4 == 2) + { + Main.tile[i, index2].frameX = (short) 110; + Main.tile[i, index2].frameY = (short) 110; + break; + } + break; + default: + if (num4 == 0) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 0; + } + if (num4 == 1) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 22; + } + if (num4 == 2) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 44; + break; + } + break; + } + if (num5 == 5 || num5 == 7) + { + Main.tile[i - 1, index2].active(true); + Main.tile[i - 1, index2].type = (ushort) 5; + Main.tile[i - 1, index2].color(color); + int num6 = WorldGen.genRand.Next(3); + if (WorldGen.genRand.Next(3) < 2) + { + if (num6 == 0) + { + Main.tile[i - 1, index2].frameX = (short) 44; + Main.tile[i - 1, index2].frameY = (short) 198; + } + if (num6 == 1) + { + Main.tile[i - 1, index2].frameX = (short) 44; + Main.tile[i - 1, index2].frameY = (short) 220; + } + if (num6 == 2) + { + Main.tile[i - 1, index2].frameX = (short) 44; + Main.tile[i - 1, index2].frameY = (short) 242; + } + } + else + { + if (num6 == 0) + { + Main.tile[i - 1, index2].frameX = (short) 66; + Main.tile[i - 1, index2].frameY = (short) 0; + } + if (num6 == 1) + { + Main.tile[i - 1, index2].frameX = (short) 66; + Main.tile[i - 1, index2].frameY = (short) 22; + } + if (num6 == 2) + { + Main.tile[i - 1, index2].frameX = (short) 66; + Main.tile[i - 1, index2].frameY = (short) 44; + } + } + } + if (num5 == 6 || num5 == 7) + { + Main.tile[i + 1, index2].active(true); + Main.tile[i + 1, index2].type = (ushort) 5; + Main.tile[i + 1, index2].color(color); + int num7 = WorldGen.genRand.Next(3); + if (WorldGen.genRand.Next(3) < 2) + { + if (num7 == 0) + { + Main.tile[i + 1, index2].frameX = (short) 66; + Main.tile[i + 1, index2].frameY = (short) 198; + } + if (num7 == 1) + { + Main.tile[i + 1, index2].frameX = (short) 66; + Main.tile[i + 1, index2].frameY = (short) 220; + } + if (num7 == 2) + { + Main.tile[i + 1, index2].frameX = (short) 66; + Main.tile[i + 1, index2].frameY = (short) 242; + } + } + else + { + if (num7 == 0) + { + Main.tile[i + 1, index2].frameX = (short) 88; + Main.tile[i + 1, index2].frameY = (short) 66; + } + if (num7 == 1) + { + Main.tile[i + 1, index2].frameX = (short) 88; + Main.tile[i + 1, index2].frameY = (short) 88; + } + if (num7 == 2) + { + Main.tile[i + 1, index2].frameX = (short) 88; + Main.tile[i + 1, index2].frameY = (short) 110; + } + } + } + } + int num8 = WorldGen.genRand.Next(3); + bool flag4 = false; + bool flag5 = false; + if (Main.tile[i - 1, index1].nactive() && !Main.tile[i - 1, index1].halfBrick() && Main.tile[i - 1, index1].slope() == (byte) 0 && WorldGen.IsTileTypeFitForTree(Main.tile[i - 1, index1].type)) + flag4 = true; + if (Main.tile[i + 1, index1].nactive() && !Main.tile[i + 1, index1].halfBrick() && Main.tile[i + 1, index1].slope() == (byte) 0 && WorldGen.IsTileTypeFitForTree(Main.tile[i + 1, index1].type)) + flag5 = true; + if (!flag4) + { + if (num8 == 0) + num8 = 2; + if (num8 == 1) + num8 = 3; + } + if (!flag5) + { + if (num8 == 0) + num8 = 1; + if (num8 == 2) + num8 = 3; + } + if (flag4 && !flag5) + num8 = 2; + if (flag5 && !flag4) + num8 = 1; + if (num8 == 0 || num8 == 1) + { + Main.tile[i + 1, index1 - 1].active(true); + Main.tile[i + 1, index1 - 1].type = (ushort) 5; + Main.tile[i + 1, index1 - 1].color(color); + int num9 = WorldGen.genRand.Next(3); + if (num9 == 0) + { + Main.tile[i + 1, index1 - 1].frameX = (short) 22; + Main.tile[i + 1, index1 - 1].frameY = (short) 132; + } + if (num9 == 1) + { + Main.tile[i + 1, index1 - 1].frameX = (short) 22; + Main.tile[i + 1, index1 - 1].frameY = (short) 154; + } + if (num9 == 2) + { + Main.tile[i + 1, index1 - 1].frameX = (short) 22; + Main.tile[i + 1, index1 - 1].frameY = (short) 176; + } + } + if (num8 == 0 || num8 == 2) + { + Main.tile[i - 1, index1 - 1].active(true); + Main.tile[i - 1, index1 - 1].type = (ushort) 5; + Main.tile[i - 1, index1 - 1].color(color); + int num10 = WorldGen.genRand.Next(3); + if (num10 == 0) + { + Main.tile[i - 1, index1 - 1].frameX = (short) 44; + Main.tile[i - 1, index1 - 1].frameY = (short) 132; + } + if (num10 == 1) + { + Main.tile[i - 1, index1 - 1].frameX = (short) 44; + Main.tile[i - 1, index1 - 1].frameY = (short) 154; + } + if (num10 == 2) + { + Main.tile[i - 1, index1 - 1].frameX = (short) 44; + Main.tile[i - 1, index1 - 1].frameY = (short) 176; + } + } + int num11 = WorldGen.genRand.Next(3); + switch (num8) + { + case 0: + if (num11 == 0) + { + Main.tile[i, index1 - 1].frameX = (short) 88; + Main.tile[i, index1 - 1].frameY = (short) 132; + } + if (num11 == 1) + { + Main.tile[i, index1 - 1].frameX = (short) 88; + Main.tile[i, index1 - 1].frameY = (short) 154; + } + if (num11 == 2) + { + Main.tile[i, index1 - 1].frameX = (short) 88; + Main.tile[i, index1 - 1].frameY = (short) 176; + break; + } + break; + case 1: + if (num11 == 0) + { + Main.tile[i, index1 - 1].frameX = (short) 0; + Main.tile[i, index1 - 1].frameY = (short) 132; + } + if (num11 == 1) + { + Main.tile[i, index1 - 1].frameX = (short) 0; + Main.tile[i, index1 - 1].frameY = (short) 154; + } + if (num11 == 2) + { + Main.tile[i, index1 - 1].frameX = (short) 0; + Main.tile[i, index1 - 1].frameY = (short) 176; + break; + } + break; + case 2: + if (num11 == 0) + { + Main.tile[i, index1 - 1].frameX = (short) 66; + Main.tile[i, index1 - 1].frameY = (short) 132; + } + if (num11 == 1) + { + Main.tile[i, index1 - 1].frameX = (short) 66; + Main.tile[i, index1 - 1].frameY = (short) 154; + } + if (num11 == 2) + { + Main.tile[i, index1 - 1].frameX = (short) 66; + Main.tile[i, index1 - 1].frameY = (short) 176; + break; + } + break; + } + if (WorldGen.genRand.Next(13) != 0) + { + int num12 = WorldGen.genRand.Next(3); + if (num12 == 0) + { + Main.tile[i, index1 - num2].frameX = (short) 22; + Main.tile[i, index1 - num2].frameY = (short) 198; + } + if (num12 == 1) + { + Main.tile[i, index1 - num2].frameX = (short) 22; + Main.tile[i, index1 - num2].frameY = (short) 220; + } + if (num12 == 2) + { + Main.tile[i, index1 - num2].frameX = (short) 22; + Main.tile[i, index1 - num2].frameY = (short) 242; + } + } + else + { + int num13 = WorldGen.genRand.Next(3); + if (num13 == 0) + { + Main.tile[i, index1 - num2].frameX = (short) 0; + Main.tile[i, index1 - num2].frameY = (short) 198; + } + if (num13 == 1) + { + Main.tile[i, index1 - num2].frameX = (short) 0; + Main.tile[i, index1 - num2].frameY = (short) 220; + } + if (num13 == 2) + { + Main.tile[i, index1 - num2].frameX = (short) 0; + Main.tile[i, index1 - num2].frameY = (short) 242; + } + } + WorldGen.RangeFrame(i - 2, index1 - num2 - 1, i + 2, index1 + 1); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, i, (int) ((double) index1 - (double) num2 * 0.5), num2 + 1); + return true; + } + + public static bool DefaultTreeWallTest(int wallType) + { + switch (wallType) + { + case 0: + case 80: + case 106: + case 107: + case 138: + case 139: + case 140: + case 141: + case 145: + case 150: + case 152: + case 245: + case 315: + return true; + default: + return false; + } + } + + public static bool GemTreeWallTest(int wallType) + { + if (WorldGen.DefaultTreeWallTest(wallType)) + return true; + switch (wallType) + { + case 2: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 61: + case 185: + case 196: + case 197: + case 198: + case 199: + case 208: + case 209: + case 210: + case 211: + case 212: + case 213: + case 214: + case 215: + return true; + default: + return false; + } + } + + public static bool GemTreeGroundTest(int tileType) => tileType >= 0 && (TileID.Sets.Conversion.Stone[tileType] || TileID.Sets.Conversion.Moss[tileType]); + + public static bool VanityTreeGroundTest(int tileType) => tileType >= 0 && TileID.Sets.Conversion.Grass[tileType]; + + public static bool TryGrowingTreeByType(int treeTileType, int checkedX, int checkedY) + { + bool flag = false; + switch (treeTileType) + { + case 5: + flag = WorldGen.GrowTree(checkedX, checkedY); + break; + case 583: + flag = WorldGen.GrowTreeWithSettings(checkedX, checkedY, WorldGen.GrowTreeSettings.Profiles.GemTree_Topaz); + break; + case 584: + flag = WorldGen.GrowTreeWithSettings(checkedX, checkedY, WorldGen.GrowTreeSettings.Profiles.GemTree_Amethyst); + break; + case 585: + flag = WorldGen.GrowTreeWithSettings(checkedX, checkedY, WorldGen.GrowTreeSettings.Profiles.GemTree_Sappphire); + break; + case 586: + flag = WorldGen.GrowTreeWithSettings(checkedX, checkedY, WorldGen.GrowTreeSettings.Profiles.GemTree_Emerald); + break; + case 587: + flag = WorldGen.GrowTreeWithSettings(checkedX, checkedY, WorldGen.GrowTreeSettings.Profiles.GemTree_Ruby); + break; + case 588: + flag = WorldGen.GrowTreeWithSettings(checkedX, checkedY, WorldGen.GrowTreeSettings.Profiles.GemTree_Diamond); + break; + case 589: + flag = WorldGen.GrowTreeWithSettings(checkedX, checkedY, WorldGen.GrowTreeSettings.Profiles.GemTree_Amber); + break; + case 596: + flag = WorldGen.GrowTreeWithSettings(checkedX, checkedY, WorldGen.GrowTreeSettings.Profiles.VanityTree_Sakura); + break; + case 616: + flag = WorldGen.GrowTreeWithSettings(checkedX, checkedY, WorldGen.GrowTreeSettings.Profiles.VanityTree_Willow); + break; + } + return flag; + } + + public static bool GrowTreeWithSettings( + int checkedX, + int checkedY, + WorldGen.GrowTreeSettings settings) + { + int index1 = checkedY; + while ((int) Main.tile[checkedX, index1].type == (int) settings.SaplingTileType) + ++index1; + if (Main.tile[checkedX - 1, index1 - 1].liquid != (byte) 0 || Main.tile[checkedX, index1 - 1].liquid != (byte) 0 || Main.tile[checkedX + 1, index1 - 1].liquid != (byte) 0) + return false; + Tile tile1 = Main.tile[checkedX, index1]; + if ((!tile1.nactive() || tile1.halfBrick() ? 0 : (tile1.slope() == (byte) 0 ? 1 : 0)) == 0) + return false; + bool flag1 = settings.WallTest((int) Main.tile[checkedX, index1 - 1].wall); + if (!settings.GroundTest((int) tile1.type) || !flag1 || (!Main.tile[checkedX - 1, index1].active() || !settings.GroundTest((int) Main.tile[checkedX - 1, index1].type) ? (!Main.tile[checkedX + 1, index1].active() ? 0 : (settings.GroundTest((int) Main.tile[checkedX + 1, index1].type) ? 1 : 0)) : 1) == 0) + return false; + byte color = Main.tile[checkedX, index1].color(); + int num1 = 2; + int num2 = WorldGen.genRand.Next(settings.TreeHeightMin, settings.TreeHeightMax + 1); + int num3 = num2 + settings.TreeTopPaddingNeeded; + if (!WorldGen.EmptyTileCheck(checkedX - num1, checkedX + num1, index1 - num3, index1 - 1, 20)) + return false; + bool flag2 = false; + bool flag3 = false; + for (int index2 = index1 - num2; index2 < index1; ++index2) + { + Tile tile2 = Main.tile[checkedX, index2]; + tile2.frameNumber((byte) WorldGen.genRand.Next(3)); + tile2.active(true); + tile2.type = settings.TreeTileType; + tile2.color(color); + int num4 = WorldGen.genRand.Next(3); + int num5 = WorldGen.genRand.Next(10); + if (index2 == index1 - 1 || index2 == index1 - num2) + num5 = 0; + while (((num5 == 5 ? 1 : (num5 == 7 ? 1 : 0)) & (flag2 ? 1 : 0)) != 0 || ((num5 == 6 ? 1 : (num5 == 7 ? 1 : 0)) & (flag3 ? 1 : 0)) != 0) + num5 = WorldGen.genRand.Next(10); + flag2 = false; + flag3 = false; + if (num5 == 5 || num5 == 7) + flag2 = true; + if (num5 == 6 || num5 == 7) + flag3 = true; + switch (num5) + { + case 1: + if (num4 == 0) + { + tile2.frameX = (short) 0; + tile2.frameY = (short) 66; + } + if (num4 == 1) + { + tile2.frameX = (short) 0; + tile2.frameY = (short) 88; + } + if (num4 == 2) + { + tile2.frameX = (short) 0; + tile2.frameY = (short) 110; + break; + } + break; + case 2: + if (num4 == 0) + { + tile2.frameX = (short) 22; + tile2.frameY = (short) 0; + } + if (num4 == 1) + { + tile2.frameX = (short) 22; + tile2.frameY = (short) 22; + } + if (num4 == 2) + { + tile2.frameX = (short) 22; + tile2.frameY = (short) 44; + break; + } + break; + case 3: + if (num4 == 0) + { + tile2.frameX = (short) 44; + tile2.frameY = (short) 66; + } + if (num4 == 1) + { + tile2.frameX = (short) 44; + tile2.frameY = (short) 88; + } + if (num4 == 2) + { + tile2.frameX = (short) 44; + tile2.frameY = (short) 110; + break; + } + break; + case 4: + if (num4 == 0) + { + tile2.frameX = (short) 22; + tile2.frameY = (short) 66; + } + if (num4 == 1) + { + tile2.frameX = (short) 22; + tile2.frameY = (short) 88; + } + if (num4 == 2) + { + tile2.frameX = (short) 22; + tile2.frameY = (short) 110; + break; + } + break; + case 5: + if (num4 == 0) + { + tile2.frameX = (short) 88; + tile2.frameY = (short) 0; + } + if (num4 == 1) + { + tile2.frameX = (short) 88; + tile2.frameY = (short) 22; + } + if (num4 == 2) + { + tile2.frameX = (short) 88; + tile2.frameY = (short) 44; + break; + } + break; + case 6: + if (num4 == 0) + { + tile2.frameX = (short) 66; + tile2.frameY = (short) 66; + } + if (num4 == 1) + { + tile2.frameX = (short) 66; + tile2.frameY = (short) 88; + } + if (num4 == 2) + { + tile2.frameX = (short) 66; + tile2.frameY = (short) 110; + break; + } + break; + case 7: + if (num4 == 0) + { + tile2.frameX = (short) 110; + tile2.frameY = (short) 66; + } + if (num4 == 1) + { + tile2.frameX = (short) 110; + tile2.frameY = (short) 88; + } + if (num4 == 2) + { + tile2.frameX = (short) 110; + tile2.frameY = (short) 110; + break; + } + break; + default: + if (num4 == 0) + { + tile2.frameX = (short) 0; + tile2.frameY = (short) 0; + } + if (num4 == 1) + { + tile2.frameX = (short) 0; + tile2.frameY = (short) 22; + } + if (num4 == 2) + { + tile2.frameX = (short) 0; + tile2.frameY = (short) 44; + break; + } + break; + } + if (num5 == 5 || num5 == 7) + { + Tile tile3 = Main.tile[checkedX - 1, index2]; + tile3.active(true); + tile3.type = settings.TreeTileType; + tile3.color(color); + int num6 = WorldGen.genRand.Next(3); + if (WorldGen.genRand.Next(3) < 2) + { + if (num6 == 0) + { + tile3.frameX = (short) 44; + tile3.frameY = (short) 198; + } + if (num6 == 1) + { + tile3.frameX = (short) 44; + tile3.frameY = (short) 220; + } + if (num6 == 2) + { + tile3.frameX = (short) 44; + tile3.frameY = (short) 242; + } + } + else + { + if (num6 == 0) + { + tile3.frameX = (short) 66; + tile3.frameY = (short) 0; + } + if (num6 == 1) + { + tile3.frameX = (short) 66; + tile3.frameY = (short) 22; + } + if (num6 == 2) + { + tile3.frameX = (short) 66; + tile3.frameY = (short) 44; + } + } + } + if (num5 == 6 || num5 == 7) + { + Tile tile4 = Main.tile[checkedX + 1, index2]; + tile4.active(true); + tile4.type = settings.TreeTileType; + tile4.color(color); + int num7 = WorldGen.genRand.Next(3); + if (WorldGen.genRand.Next(3) < 2) + { + if (num7 == 0) + { + tile4.frameX = (short) 66; + tile4.frameY = (short) 198; + } + if (num7 == 1) + { + tile4.frameX = (short) 66; + tile4.frameY = (short) 220; + } + if (num7 == 2) + { + tile4.frameX = (short) 66; + tile4.frameY = (short) 242; + } + } + else + { + if (num7 == 0) + { + tile4.frameX = (short) 88; + tile4.frameY = (short) 66; + } + if (num7 == 1) + { + tile4.frameX = (short) 88; + tile4.frameY = (short) 88; + } + if (num7 == 2) + { + tile4.frameX = (short) 88; + tile4.frameY = (short) 110; + } + } + } + } + bool flag4 = false; + bool flag5 = false; + if (Main.tile[checkedX - 1, index1].nactive() && !Main.tile[checkedX - 1, index1].halfBrick() && Main.tile[checkedX - 1, index1].slope() == (byte) 0 && WorldGen.IsTileTypeFitForTree(Main.tile[checkedX - 1, index1].type)) + flag4 = true; + if (Main.tile[checkedX + 1, index1].nactive() && !Main.tile[checkedX + 1, index1].halfBrick() && Main.tile[checkedX + 1, index1].slope() == (byte) 0 && WorldGen.IsTileTypeFitForTree(Main.tile[checkedX + 1, index1].type)) + flag5 = true; + if (WorldGen.genRand.Next(3) == 0) + flag4 = false; + if (WorldGen.genRand.Next(3) == 0) + flag5 = false; + if (flag5) + { + Main.tile[checkedX + 1, index1 - 1].active(true); + Main.tile[checkedX + 1, index1 - 1].type = settings.TreeTileType; + Main.tile[checkedX + 1, index1 - 1].color(color); + int num8 = WorldGen.genRand.Next(3); + if (num8 == 0) + { + Main.tile[checkedX + 1, index1 - 1].frameX = (short) 22; + Main.tile[checkedX + 1, index1 - 1].frameY = (short) 132; + } + if (num8 == 1) + { + Main.tile[checkedX + 1, index1 - 1].frameX = (short) 22; + Main.tile[checkedX + 1, index1 - 1].frameY = (short) 154; + } + if (num8 == 2) + { + Main.tile[checkedX + 1, index1 - 1].frameX = (short) 22; + Main.tile[checkedX + 1, index1 - 1].frameY = (short) 176; + } + } + if (flag4) + { + Main.tile[checkedX - 1, index1 - 1].active(true); + Main.tile[checkedX - 1, index1 - 1].type = settings.TreeTileType; + Main.tile[checkedX - 1, index1 - 1].color(color); + int num9 = WorldGen.genRand.Next(3); + if (num9 == 0) + { + Main.tile[checkedX - 1, index1 - 1].frameX = (short) 44; + Main.tile[checkedX - 1, index1 - 1].frameY = (short) 132; + } + if (num9 == 1) + { + Main.tile[checkedX - 1, index1 - 1].frameX = (short) 44; + Main.tile[checkedX - 1, index1 - 1].frameY = (short) 154; + } + if (num9 == 2) + { + Main.tile[checkedX - 1, index1 - 1].frameX = (short) 44; + Main.tile[checkedX - 1, index1 - 1].frameY = (short) 176; + } + } + int num10 = WorldGen.genRand.Next(3); + if (flag4 & flag5) + { + if (num10 == 0) + { + Main.tile[checkedX, index1 - 1].frameX = (short) 88; + Main.tile[checkedX, index1 - 1].frameY = (short) 132; + } + if (num10 == 1) + { + Main.tile[checkedX, index1 - 1].frameX = (short) 88; + Main.tile[checkedX, index1 - 1].frameY = (short) 154; + } + if (num10 == 2) + { + Main.tile[checkedX, index1 - 1].frameX = (short) 88; + Main.tile[checkedX, index1 - 1].frameY = (short) 176; + } + } + else if (flag4) + { + if (num10 == 0) + { + Main.tile[checkedX, index1 - 1].frameX = (short) 0; + Main.tile[checkedX, index1 - 1].frameY = (short) 132; + } + if (num10 == 1) + { + Main.tile[checkedX, index1 - 1].frameX = (short) 0; + Main.tile[checkedX, index1 - 1].frameY = (short) 154; + } + if (num10 == 2) + { + Main.tile[checkedX, index1 - 1].frameX = (short) 0; + Main.tile[checkedX, index1 - 1].frameY = (short) 176; + } + } + else if (flag5) + { + if (num10 == 0) + { + Main.tile[checkedX, index1 - 1].frameX = (short) 66; + Main.tile[checkedX, index1 - 1].frameY = (short) 132; + } + if (num10 == 1) + { + Main.tile[checkedX, index1 - 1].frameX = (short) 66; + Main.tile[checkedX, index1 - 1].frameY = (short) 154; + } + if (num10 == 2) + { + Main.tile[checkedX, index1 - 1].frameX = (short) 66; + Main.tile[checkedX, index1 - 1].frameY = (short) 176; + } + } + if (WorldGen.genRand.Next(13) != 0) + { + int num11 = WorldGen.genRand.Next(3); + if (num11 == 0) + { + Main.tile[checkedX, index1 - num2].frameX = (short) 22; + Main.tile[checkedX, index1 - num2].frameY = (short) 198; + } + if (num11 == 1) + { + Main.tile[checkedX, index1 - num2].frameX = (short) 22; + Main.tile[checkedX, index1 - num2].frameY = (short) 220; + } + if (num11 == 2) + { + Main.tile[checkedX, index1 - num2].frameX = (short) 22; + Main.tile[checkedX, index1 - num2].frameY = (short) 242; + } + } + else + { + int num12 = WorldGen.genRand.Next(3); + if (num12 == 0) + { + Main.tile[checkedX, index1 - num2].frameX = (short) 0; + Main.tile[checkedX, index1 - num2].frameY = (short) 198; + } + if (num12 == 1) + { + Main.tile[checkedX, index1 - num2].frameX = (short) 0; + Main.tile[checkedX, index1 - num2].frameY = (short) 220; + } + if (num12 == 2) + { + Main.tile[checkedX, index1 - num2].frameX = (short) 0; + Main.tile[checkedX, index1 - num2].frameY = (short) 242; + } + } + WorldGen.RangeFrame(checkedX - 2, index1 - num2 - 1, checkedX + 2, index1 + 1); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, checkedX, (int) ((double) index1 - (double) num2 * 0.5), num2 + 1); + return true; + } + + public static void GrowUndergroundTree(int i, int y) + { + int index1 = y; + if (Main.tile[i, index1].type != (ushort) 60 || !Main.tile[i, index1].nactive() || Main.tile[i, index1].halfBrick() || Main.tile[i, index1].slope() != (byte) 0 || Main.tile[i, index1].type != (ushort) 60 || (!Main.tile[i - 1, index1].active() || Main.tile[i - 1, index1].type != (ushort) 60) && (!Main.tile[i + 1, index1].active() || Main.tile[i + 1, index1].type != (ushort) 60)) + return; + int num1 = 1; + int num2 = WorldGen.genRand.Next(5, 15); + int num3 = num2 + 2; + if (Main.tile[i, index1].type == (ushort) 60) + num3 += 5; + if (!WorldGen.EmptyTileCheck(i - num1, i + num1, index1 - num3, index1 - 1, 20)) + return; + bool flag1 = false; + bool flag2 = false; + for (int index2 = index1 - num2; index2 < index1; ++index2) + { + Main.tile[i, index2].frameNumber((byte) WorldGen.genRand.Next(3)); + Main.tile[i, index2].active(true); + Main.tile[i, index2].type = (ushort) 5; + int num4 = WorldGen.genRand.Next(3); + int num5 = WorldGen.genRand.Next(10); + if (index2 == index1 - 1 || index2 == index1 - num2) + num5 = 0; + while (((num5 == 5 ? 1 : (num5 == 7 ? 1 : 0)) & (flag1 ? 1 : 0)) != 0 || ((num5 == 6 ? 1 : (num5 == 7 ? 1 : 0)) & (flag2 ? 1 : 0)) != 0) + num5 = WorldGen.genRand.Next(10); + flag1 = false; + flag2 = false; + if (num5 == 5 || num5 == 7) + flag1 = true; + if (num5 == 6 || num5 == 7) + flag2 = true; + switch (num5) + { + case 1: + if (num4 == 0) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 66; + } + if (num4 == 1) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 88; + } + if (num4 == 2) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 110; + break; + } + break; + case 2: + if (num4 == 0) + { + Main.tile[i, index2].frameX = (short) 22; + Main.tile[i, index2].frameY = (short) 0; + } + if (num4 == 1) + { + Main.tile[i, index2].frameX = (short) 22; + Main.tile[i, index2].frameY = (short) 22; + } + if (num4 == 2) + { + Main.tile[i, index2].frameX = (short) 22; + Main.tile[i, index2].frameY = (short) 44; + break; + } + break; + case 3: + if (num4 == 0) + { + Main.tile[i, index2].frameX = (short) 44; + Main.tile[i, index2].frameY = (short) 66; + } + if (num4 == 1) + { + Main.tile[i, index2].frameX = (short) 44; + Main.tile[i, index2].frameY = (short) 88; + } + if (num4 == 2) + { + Main.tile[i, index2].frameX = (short) 44; + Main.tile[i, index2].frameY = (short) 110; + break; + } + break; + case 4: + if (num4 == 0) + { + Main.tile[i, index2].frameX = (short) 22; + Main.tile[i, index2].frameY = (short) 66; + } + if (num4 == 1) + { + Main.tile[i, index2].frameX = (short) 22; + Main.tile[i, index2].frameY = (short) 88; + } + if (num4 == 2) + { + Main.tile[i, index2].frameX = (short) 22; + Main.tile[i, index2].frameY = (short) 110; + break; + } + break; + case 5: + if (num4 == 0) + { + Main.tile[i, index2].frameX = (short) 88; + Main.tile[i, index2].frameY = (short) 0; + } + if (num4 == 1) + { + Main.tile[i, index2].frameX = (short) 88; + Main.tile[i, index2].frameY = (short) 22; + } + if (num4 == 2) + { + Main.tile[i, index2].frameX = (short) 88; + Main.tile[i, index2].frameY = (short) 44; + break; + } + break; + case 6: + if (num4 == 0) + { + Main.tile[i, index2].frameX = (short) 66; + Main.tile[i, index2].frameY = (short) 66; + } + if (num4 == 1) + { + Main.tile[i, index2].frameX = (short) 66; + Main.tile[i, index2].frameY = (short) 88; + } + if (num4 == 2) + { + Main.tile[i, index2].frameX = (short) 66; + Main.tile[i, index2].frameY = (short) 110; + break; + } + break; + case 7: + if (num4 == 0) + { + Main.tile[i, index2].frameX = (short) 110; + Main.tile[i, index2].frameY = (short) 66; + } + if (num4 == 1) + { + Main.tile[i, index2].frameX = (short) 110; + Main.tile[i, index2].frameY = (short) 88; + } + if (num4 == 2) + { + Main.tile[i, index2].frameX = (short) 110; + Main.tile[i, index2].frameY = (short) 110; + break; + } + break; + default: + if (num4 == 0) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 0; + } + if (num4 == 1) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 22; + } + if (num4 == 2) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 44; + break; + } + break; + } + if (num5 == 5 || num5 == 7) + { + Main.tile[i - 1, index2].active(true); + Main.tile[i - 1, index2].type = (ushort) 5; + int num6 = WorldGen.genRand.Next(3); + if (WorldGen.genRand.Next(3) < 2) + { + if (num6 == 0) + { + Main.tile[i - 1, index2].frameX = (short) 44; + Main.tile[i - 1, index2].frameY = (short) 198; + } + if (num6 == 1) + { + Main.tile[i - 1, index2].frameX = (short) 44; + Main.tile[i - 1, index2].frameY = (short) 220; + } + if (num6 == 2) + { + Main.tile[i - 1, index2].frameX = (short) 44; + Main.tile[i - 1, index2].frameY = (short) 242; + } + } + else + { + if (num6 == 0) + { + Main.tile[i - 1, index2].frameX = (short) 66; + Main.tile[i - 1, index2].frameY = (short) 0; + } + if (num6 == 1) + { + Main.tile[i - 1, index2].frameX = (short) 66; + Main.tile[i - 1, index2].frameY = (short) 22; + } + if (num6 == 2) + { + Main.tile[i - 1, index2].frameX = (short) 66; + Main.tile[i - 1, index2].frameY = (short) 44; + } + } + } + if (num5 == 6 || num5 == 7) + { + Main.tile[i + 1, index2].active(true); + Main.tile[i + 1, index2].type = (ushort) 5; + int num7 = WorldGen.genRand.Next(3); + if (WorldGen.genRand.Next(3) < 2) + { + if (num7 == 0) + { + Main.tile[i + 1, index2].frameX = (short) 66; + Main.tile[i + 1, index2].frameY = (short) 198; + } + if (num7 == 1) + { + Main.tile[i + 1, index2].frameX = (short) 66; + Main.tile[i + 1, index2].frameY = (short) 220; + } + if (num7 == 2) + { + Main.tile[i + 1, index2].frameX = (short) 66; + Main.tile[i + 1, index2].frameY = (short) 242; + } + } + else + { + if (num7 == 0) + { + Main.tile[i + 1, index2].frameX = (short) 88; + Main.tile[i + 1, index2].frameY = (short) 66; + } + if (num7 == 1) + { + Main.tile[i + 1, index2].frameX = (short) 88; + Main.tile[i + 1, index2].frameY = (short) 88; + } + if (num7 == 2) + { + Main.tile[i + 1, index2].frameX = (short) 88; + Main.tile[i + 1, index2].frameY = (short) 110; + } + } + } + } + int num8 = WorldGen.genRand.Next(3); + bool flag3 = false; + bool flag4 = false; + if (Main.tile[i - 1, index1].nactive() && !Main.tile[i - 1, index1].halfBrick() && Main.tile[i - 1, index1].slope() == (byte) 0 && (Main.tile[i - 1, index1].type == (ushort) 2 || Main.tile[i - 1, index1].type == (ushort) 23 || Main.tile[i - 1, index1].type == (ushort) 60 || Main.tile[i - 1, index1].type == (ushort) 109 || Main.tile[i - 1, index1].type == (ushort) 147)) + flag3 = true; + if (Main.tile[i + 1, index1].nactive() && !Main.tile[i + 1, index1].halfBrick() && Main.tile[i + 1, index1].slope() == (byte) 0 && (Main.tile[i + 1, index1].type == (ushort) 2 || Main.tile[i + 1, index1].type == (ushort) 23 || Main.tile[i + 1, index1].type == (ushort) 60 || Main.tile[i + 1, index1].type == (ushort) 109 || Main.tile[i + 1, index1].type == (ushort) 147)) + flag4 = true; + if (!flag3) + { + if (num8 == 0) + num8 = 2; + if (num8 == 1) + num8 = 3; + } + if (!flag4) + { + if (num8 == 0) + num8 = 1; + if (num8 == 2) + num8 = 3; + } + if (flag3 && !flag4) + num8 = 2; + if (flag4 && !flag3) + num8 = 1; + if (num8 == 0 || num8 == 1) + { + Main.tile[i + 1, index1 - 1].active(true); + Main.tile[i + 1, index1 - 1].type = (ushort) 5; + int num9 = WorldGen.genRand.Next(3); + if (num9 == 0) + { + Main.tile[i + 1, index1 - 1].frameX = (short) 22; + Main.tile[i + 1, index1 - 1].frameY = (short) 132; + } + if (num9 == 1) + { + Main.tile[i + 1, index1 - 1].frameX = (short) 22; + Main.tile[i + 1, index1 - 1].frameY = (short) 154; + } + if (num9 == 2) + { + Main.tile[i + 1, index1 - 1].frameX = (short) 22; + Main.tile[i + 1, index1 - 1].frameY = (short) 176; + } + } + if (num8 == 0 || num8 == 2) + { + Main.tile[i - 1, index1 - 1].active(true); + Main.tile[i - 1, index1 - 1].type = (ushort) 5; + int num10 = WorldGen.genRand.Next(3); + if (num10 == 0) + { + Main.tile[i - 1, index1 - 1].frameX = (short) 44; + Main.tile[i - 1, index1 - 1].frameY = (short) 132; + } + if (num10 == 1) + { + Main.tile[i - 1, index1 - 1].frameX = (short) 44; + Main.tile[i - 1, index1 - 1].frameY = (short) 154; + } + if (num10 == 2) + { + Main.tile[i - 1, index1 - 1].frameX = (short) 44; + Main.tile[i - 1, index1 - 1].frameY = (short) 176; + } + } + int num11 = WorldGen.genRand.Next(3); + switch (num8) + { + case 0: + if (num11 == 0) + { + Main.tile[i, index1 - 1].frameX = (short) 88; + Main.tile[i, index1 - 1].frameY = (short) 132; + } + if (num11 == 1) + { + Main.tile[i, index1 - 1].frameX = (short) 88; + Main.tile[i, index1 - 1].frameY = (short) 154; + } + if (num11 == 2) + { + Main.tile[i, index1 - 1].frameX = (short) 88; + Main.tile[i, index1 - 1].frameY = (short) 176; + break; + } + break; + case 1: + if (num11 == 0) + { + Main.tile[i, index1 - 1].frameX = (short) 0; + Main.tile[i, index1 - 1].frameY = (short) 132; + } + if (num11 == 1) + { + Main.tile[i, index1 - 1].frameX = (short) 0; + Main.tile[i, index1 - 1].frameY = (short) 154; + } + if (num11 == 2) + { + Main.tile[i, index1 - 1].frameX = (short) 0; + Main.tile[i, index1 - 1].frameY = (short) 176; + break; + } + break; + case 2: + if (num11 == 0) + { + Main.tile[i, index1 - 1].frameX = (short) 66; + Main.tile[i, index1 - 1].frameY = (short) 132; + } + if (num11 == 1) + { + Main.tile[i, index1 - 1].frameX = (short) 66; + Main.tile[i, index1 - 1].frameY = (short) 154; + } + if (num11 == 2) + { + Main.tile[i, index1 - 1].frameX = (short) 66; + Main.tile[i, index1 - 1].frameY = (short) 176; + break; + } + break; + } + if (WorldGen.genRand.Next(8) != 0) + { + int num12 = WorldGen.genRand.Next(3); + if (num12 == 0) + { + Main.tile[i, index1 - num2].frameX = (short) 22; + Main.tile[i, index1 - num2].frameY = (short) 198; + } + if (num12 == 1) + { + Main.tile[i, index1 - num2].frameX = (short) 22; + Main.tile[i, index1 - num2].frameY = (short) 220; + } + if (num12 == 2) + { + Main.tile[i, index1 - num2].frameX = (short) 22; + Main.tile[i, index1 - num2].frameY = (short) 242; + } + } + else + { + int num13 = WorldGen.genRand.Next(3); + if (num13 == 0) + { + Main.tile[i, index1 - num2].frameX = (short) 0; + Main.tile[i, index1 - num2].frameY = (short) 198; + } + if (num13 == 1) + { + Main.tile[i, index1 - num2].frameX = (short) 0; + Main.tile[i, index1 - num2].frameY = (short) 220; + } + if (num13 == 2) + { + Main.tile[i, index1 - num2].frameX = (short) 0; + Main.tile[i, index1 - num2].frameY = (short) 242; + } + } + WorldGen.RangeFrame(i - 2, index1 - num2 - 1, i + 2, index1 + 1); + if (Main.netMode != 2 || WorldGen.gen) + return; + NetMessage.SendTileSquare(-1, i, (int) ((double) index1 - (double) num2 * 0.5), num2 + 1); + } + + public static bool GrowShroom(int i, int y) + { + int index1 = y; + if (Main.tile[i - 1, index1 - 1].lava() || Main.tile[i - 1, index1 - 1].lava() || Main.tile[i + 1, index1 - 1].lava() || !Main.tile[i, index1].nactive() || Main.tile[i, index1].type != (ushort) 70 || Main.tile[i, index1 - 1].wall != (ushort) 0 || !Main.tile[i - 1, index1].active() || Main.tile[i - 1, index1].type != (ushort) 70 || !Main.tile[i + 1, index1].active() || Main.tile[i + 1, index1].type != (ushort) 70 || !WorldGen.EmptyTileCheck(i - 2, i + 2, index1 - 13, index1 - 3, 71) || !WorldGen.EmptyTileCheck(i - 1, i + 1, index1 - 3, index1 - 1, 71)) + return false; + if (WorldGen.gen && WorldGen.genRand.Next(3) != 0) + { + Main.tile[i, index1].halfBrick(false); + Main.tile[i, index1].slope((byte) 0); + } + if (Main.tile[i, index1].halfBrick() || Main.tile[i, index1].slope() != (byte) 0) + return false; + int num1 = WorldGen.genRand.Next(4, 11); + for (int index2 = index1 - num1; index2 < index1; ++index2) + { + Main.tile[i, index2].frameNumber((byte) WorldGen.genRand.Next(3)); + Main.tile[i, index2].active(true); + Main.tile[i, index2].type = (ushort) 72; + int num2 = WorldGen.genRand.Next(3); + if (num2 == 0) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 0; + } + if (num2 == 1) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 18; + } + if (num2 == 2) + { + Main.tile[i, index2].frameX = (short) 0; + Main.tile[i, index2].frameY = (short) 36; + } + } + int num3 = WorldGen.genRand.Next(3); + if (num3 == 0) + { + Main.tile[i, index1 - num1].frameX = (short) 36; + Main.tile[i, index1 - num1].frameY = (short) 0; + } + if (num3 == 1) + { + Main.tile[i, index1 - num1].frameX = (short) 36; + Main.tile[i, index1 - num1].frameY = (short) 18; + } + if (num3 == 2) + { + Main.tile[i, index1 - num1].frameX = (short) 36; + Main.tile[i, index1 - num1].frameY = (short) 36; + } + WorldGen.RangeFrame(i - 2, index1 - num1 - 1, i + 2, index1 + 1); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, i, (int) ((double) index1 - (double) num1 * 0.5), num1 + 1); + return true; + } + + public static void AddTrees() + { + float num1 = (float) (0.100000001490116 + (double) WorldGen.genRand.NextFloat() * 0.349999994039536); + float num2 = (float) (0.100000001490116 + (double) WorldGen.genRand.NextFloat() * 0.349999994039536); + for (int index1 = 1; index1 < Main.maxTilesX - 1; ++index1) + { + for (int index2 = 20; (double) index2 < Main.worldSurface; ++index2) + { + if (index1 < 380) + { + if ((double) WorldGen.genRand.NextFloat() < (double) num1 && Main.tile[index1, index2].liquid == (byte) 0) + WorldGen.GrowPalmTree(index1, index2); + } + else if (index1 > Main.maxTilesX - 380 && (double) WorldGen.genRand.NextFloat() < (double) num2 && Main.tile[index1, index2].liquid == (byte) 0) + WorldGen.GrowPalmTree(index1, index2); + int maxValue = 20; + if (WorldGen.drunkWorldGen) + maxValue /= 3; + if (Main.tile[index1, index2].type == (ushort) 2 && WorldGen.genRand.Next(maxValue) == 0) + { + if (WorldGen.genRand.Next(2) == 0) + WorldGen.GrowTreeWithSettings(index1, index2, WorldGen.GrowTreeSettings.Profiles.VanityTree_Willow); + else + WorldGen.GrowTreeWithSettings(index1, index2, WorldGen.GrowTreeSettings.Profiles.VanityTree_Sakura); + } + else + WorldGen.GrowTree(index1, index2); + } + if (WorldGen.genRand.Next(3) == 0) + ++index1; + if (WorldGen.genRand.Next(4) == 0) + ++index1; + } + } + + public static void ExplodeMine(int i, int j) + { + int type = (int) Main.tile[i, j].type; + WorldGen.KillTile(i, j, noItem: true); + NetMessage.SendTileSquare(-1, i, j, 1); + Projectile.NewProjectile((float) (i * 16 + 8), (float) (j * 16 + 8), 0.0f, 0.0f, 164, 250, 10f, Main.myPlayer); + } + + public static bool EmptyTileCheck(int startX, int endX, int startY, int endY, int ignoreID = -1) + { + if (startX < 0 || endX >= Main.maxTilesX || startY < 0 || endY >= Main.maxTilesY) + return false; + bool flag = false; + if (ignoreID != -1 && TileID.Sets.CommonSapling[ignoreID]) + flag = true; +label_20: + for (int index1 = startX; index1 < endX + 1; ++index1) + { + for (int index2 = startY; index2 < endY + 1; ++index2) + { + if (Main.tile[index1, index2].active()) + { + switch (ignoreID) + { + case -1: + return false; + case 11: + if (Main.tile[index1, index2].type != (ushort) 11) + return false; + continue; + case 71: + if (Main.tile[index1, index2].type != (ushort) 71) + return false; + continue; + default: + if (flag) + { + if (!TileID.Sets.CommonSapling[(int) Main.tile[index1, index2].type]) + { + switch (Main.tile[index1, index2].type) + { + case 3: + case 24: + case 32: + case 61: + case 62: + case 69: + case 71: + case 73: + case 74: + case 82: + case 83: + case 84: + case 110: + case 113: + case 201: + case 233: + case 352: + case 485: + case 529: + case 530: + continue; + default: + return false; + } + } + else + goto label_20; + } + else + continue; + } + } + } + } + return true; + } + + public static void StartHardmode() + { + if (Main.netMode == 1 || Main.hardMode) + return; + Main.hardMode = true; + ThreadPool.QueueUserWorkItem(new WaitCallback(WorldGen.smCallBack), (object) 1); + } + + public static void smCallBack(object threadContext) + { + WorldGen.IsGeneratingHardMode = true; + if (Main.rand == null) + Main.rand = new UnifiedRandom((int) DateTime.Now.Ticks); + float num1 = (float) WorldGen.genRand.Next(300, 400) * (1f / 1000f); + float num2 = (float) WorldGen.genRand.Next(200, 300) * (1f / 1000f); + int i1 = (int) ((double) Main.maxTilesX * (double) num1); + int i2 = (int) ((double) Main.maxTilesX * (1.0 - (double) num1)); + int num3 = 1; + if (WorldGen.genRand.Next(2) == 0) + { + i2 = (int) ((double) Main.maxTilesX * (double) num1); + i1 = (int) ((double) Main.maxTilesX * (1.0 - (double) num1)); + num3 = -1; + } + int num4 = 1; + if (WorldGen.dungeonX < Main.maxTilesX / 2) + num4 = -1; + if (num4 < 0) + { + if (i2 < i1) + i2 = (int) ((double) Main.maxTilesX * (double) num2); + else + i1 = (int) ((double) Main.maxTilesX * (double) num2); + } + else if (i2 > i1) + i2 = (int) ((double) Main.maxTilesX * (1.0 - (double) num2)); + else + i1 = (int) ((double) Main.maxTilesX * (1.0 - (double) num2)); + WorldGen.GERunner(i1, 0, (float) (3 * num3), 5f); + WorldGen.GERunner(i2, 0, (float) (3 * -num3), 5f, false); + int num5 = (int) (25.0 * (double) ((float) Main.maxTilesX / 4200f)); + ShapeData data = new ShapeData(); + int num6 = 0; + while (num5 > 0) + { + if (++num6 % 15000 == 0) + --num5; + Point point = WorldGen.RandomWorldPoint((int) Main.worldSurface - 100, 1, 190, 1); + Tile tile1 = Main.tile[point.X, point.Y]; + Tile tile2 = Main.tile[point.X, point.Y - 1]; + ushort type = 0; + if (TileID.Sets.Crimson[(int) tile1.type]) + type = (ushort) (192 + WorldGen.genRand.Next(4)); + else if (TileID.Sets.Corrupt[(int) tile1.type]) + type = (ushort) (188 + WorldGen.genRand.Next(4)); + else if (TileID.Sets.Hallow[(int) tile1.type]) + type = (ushort) (200 + WorldGen.genRand.Next(4)); + if (tile1.active() && type != (ushort) 0 && !tile2.active()) + { + bool flag = WorldUtils.Gen(new Point(point.X, point.Y - 1), (GenShape) new ShapeFloodFill(1000), Actions.Chain((GenAction) new Modifiers.IsNotSolid(), (GenAction) new Modifiers.OnlyWalls(new ushort[31] + { + (ushort) 0, + (ushort) 54, + (ushort) 55, + (ushort) 56, + (ushort) 57, + (ushort) 58, + (ushort) 59, + (ushort) 61, + (ushort) 185, + (ushort) 212, + (ushort) 213, + (ushort) 214, + (ushort) 215, + (ushort) 2, + (ushort) 196, + (ushort) 197, + (ushort) 198, + (ushort) 199, + (ushort) 15, + (ushort) 40, + (ushort) 71, + (ushort) 64, + (ushort) 204, + (ushort) 205, + (ushort) 206, + (ushort) 207, + (ushort) 208, + (ushort) 209, + (ushort) 210, + (ushort) 211, + (ushort) 71 + }), new Actions.Blank().Output(data))); + if (data.Count > 50 & flag) + { + WorldUtils.Gen(new Point(point.X, point.Y), (GenShape) new ModShapes.OuterOutline(data, useInterior: true), (GenAction) new Actions.PlaceWall(type)); + --num5; + } + data.Clear(); + } + } + switch (Main.netMode) + { + case 0: + Main.NewText(Lang.misc[15].Value, (byte) 50, B: (byte) 130); + break; + case 2: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[15].Key), new Color(50, (int) byte.MaxValue, 130)); + break; + } + AchievementsHelper.NotifyProgressionEvent(9); + if (Main.netMode == 2) + Netplay.ResetSections(); + WorldGen.IsGeneratingHardMode = false; + } + + public static bool PlaceDoor(int i, int j, int type, int style = 0) + { + int num1 = style / 36; + int num2 = style % 36; + int num3 = 54 * num1; + int num4 = 54 * num2; + try + { + if (!Main.tile[i, j - 2].nactive() || !Main.tileSolid[(int) Main.tile[i, j - 2].type] || !WorldGen.SolidTile(i, j + 2)) + return false; + Main.tile[i, j - 1].active(true); + Main.tile[i, j - 1].type = (ushort) 10; + Main.tile[i, j - 1].frameY = (short) num4; + Main.tile[i, j - 1].frameX = (short) (num3 + WorldGen.genRand.Next(3) * 18); + Main.tile[i, j].active(true); + Main.tile[i, j].type = (ushort) 10; + Main.tile[i, j].frameY = (short) (num4 + 18); + Main.tile[i, j].frameX = (short) (num3 + WorldGen.genRand.Next(3) * 18); + Main.tile[i, j + 1].active(true); + Main.tile[i, j + 1].type = (ushort) 10; + Main.tile[i, j + 1].frameY = (short) (num4 + 36); + Main.tile[i, j + 1].frameX = (short) (num3 + WorldGen.genRand.Next(3) * 18); + return true; + } + catch + { + return false; + } + } + + public static bool CloseDoor(int i, int j, bool forced = false) + { + int num1 = 0; + int num2 = i; + if (Main.tile[i, j] == null) + Main.tile[i, j] = new Tile(); + int frameX = (int) Main.tile[i, j].frameX; + Tile tile = Main.tile[i, j]; + if (tile.type != (ushort) 11) + return false; + int frameY = (int) tile.frameY; + int num3 = 0; + int num4 = 0; + while (frameY >= 54) + { + frameY -= 54; + ++num3; + } + if (frameX >= 72) + { + int num5 = num3 + 36 * (frameX / 72); + num4 += 54 * (frameX / 72); + } + int y = j - frameY / 18; + switch (frameX % 72) + { + case 0: + num2 = i; + num1 = 1; + break; + case 18: + num2 = i - 1; + num1 = 1; + break; + case 36: + num2 = i + 1; + num1 = -1; + break; + case 54: + num2 = i; + num1 = -1; + break; + } + int num6 = num2; + if (num1 == -1) + num6 = num2 - 1; + if (!forced) + { + for (int j1 = y; j1 < y + 3; ++j1) + { + if (!Collision.EmptyTile(num2, j1, true)) + return false; + } + } + for (int index1 = num6; index1 < num6 + 2; ++index1) + { + for (int index2 = y; index2 < y + 3; ++index2) + { + if (index1 == num2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + Main.tile[index1, index2].type = (ushort) 10; + Main.tile[index1, index2].frameX = (short) (WorldGen.genRand.Next(3) * 18 + num4); + } + else + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + Main.tile[index1, index2].active(false); + } + } + } + if (Main.netMode != 1 && Wiring.running) + { + Wiring.SkipWire(num2, y); + Wiring.SkipWire(num2, y + 1); + Wiring.SkipWire(num2, y + 2); + } + for (int i1 = num2 - 1; i1 <= num2 + 1; ++i1) + { + for (int j2 = y - 1; j2 <= y + 2; ++j2) + WorldGen.TileFrame(i1, j2); + } + SoundEngine.PlaySound(9, i * 16, j * 16); + return true; + } + + public static bool AddLifeCrystal(int i, int j) + { + for (int index = j; index < Main.maxTilesY; ++index) + { + if (Main.tile[i, index].active() && Main.tileSolid[(int) Main.tile[i, index].type]) + { + int endX = i; + int endY = index - 1; + if (Main.tile[endX, endY - 1].lava() || Main.tile[endX - 1, endY - 1].lava() || !WorldGen.EmptyTileCheck(endX - 1, endX, endY - 1, endY) || Main.wallDungeon[(int) Main.tile[endX, endY].wall]) + return false; + Tile tile1 = Main.tile[endX - 1, endY + 1]; + Tile tile2 = Main.tile[endX, endY + 1]; + if (!tile1.nactive() || !Main.tileSolid[(int) tile1.type] || !tile2.nactive() || !Main.tileSolid[(int) tile2.type]) + return false; + if (tile1.blockType() != 0) + { + tile1.slope((byte) 0); + tile1.halfBrick(false); + } + if (tile2.blockType() != 0) + { + tile2.slope((byte) 0); + tile2.halfBrick(false); + } + Main.tile[endX - 1, endY - 1].active(true); + Main.tile[endX - 1, endY - 1].type = (ushort) 12; + Main.tile[endX - 1, endY - 1].frameX = (short) 0; + Main.tile[endX - 1, endY - 1].frameY = (short) 0; + Main.tile[endX, endY - 1].active(true); + Main.tile[endX, endY - 1].type = (ushort) 12; + Main.tile[endX, endY - 1].frameX = (short) 18; + Main.tile[endX, endY - 1].frameY = (short) 0; + Main.tile[endX - 1, endY].active(true); + Main.tile[endX - 1, endY].type = (ushort) 12; + Main.tile[endX - 1, endY].frameX = (short) 0; + Main.tile[endX - 1, endY].frameY = (short) 18; + Main.tile[endX, endY].active(true); + Main.tile[endX, endY].type = (ushort) 12; + Main.tile[endX, endY].frameX = (short) 18; + Main.tile[endX, endY].frameY = (short) 18; + return true; + } + } + return false; + } + + public static void AddShadowOrb(int x, int y) + { + if (x < 10 || x > Main.maxTilesX - 10 || y < 10 || y > Main.maxTilesY - 10) + return; + for (int index1 = x - 1; index1 < x + 1; ++index1) + { + for (int index2 = y - 1; index2 < y + 1; ++index2) + { + if (Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 31) + return; + } + } + short num = 0; + if (WorldGen.crimson) + num += (short) 36; + Main.tile[x - 1, y - 1].active(true); + Main.tile[x - 1, y - 1].type = (ushort) 31; + Main.tile[x - 1, y - 1].frameX = num; + Main.tile[x - 1, y - 1].frameY = (short) 0; + Main.tile[x, y - 1].active(true); + Main.tile[x, y - 1].type = (ushort) 31; + Main.tile[x, y - 1].frameX = (short) (18 + (int) num); + Main.tile[x, y - 1].frameY = (short) 0; + Main.tile[x - 1, y].active(true); + Main.tile[x - 1, y].type = (ushort) 31; + Main.tile[x - 1, y].frameX = num; + Main.tile[x - 1, y].frameY = (short) 18; + Main.tile[x, y].active(true); + Main.tile[x, y].type = (ushort) 31; + Main.tile[x, y].frameX = (short) (18 + (int) num); + Main.tile[x, y].frameY = (short) 18; + } + + public static void AddHellHouses() + { + int num1 = (int) ((double) Main.maxTilesX * 0.25); + for (int i = 100; i < Main.maxTilesX - 100; ++i) + { + if ((!WorldGen.drunkWorldGen || i <= num1 || i >= Main.maxTilesX - num1) && (WorldGen.drunkWorldGen || i >= num1 && i <= Main.maxTilesX - num1)) + { + int j = Main.maxTilesY - 40; + while (Main.tile[i, j].active() || Main.tile[i, j].liquid > (byte) 0) + --j; + if (Main.tile[i, j + 1].active()) + { + ushort tileType = (ushort) WorldGen.genRand.Next(75, 77); + byte wallType = 13; + if (WorldGen.genRand.Next(5) > 0) + tileType = (ushort) 75; + if (tileType == (ushort) 75) + wallType = (byte) 14; + if (WorldGen.getGoodWorldGen) + tileType = (ushort) 76; + WorldGen.HellFort(i, j, tileType, wallType); + i += WorldGen.genRand.Next(30, 130); + if (WorldGen.genRand.Next(10) == 0) + i += WorldGen.genRand.Next(0, 200); + } + } + } + float num2 = (float) (Main.maxTilesX / 4200); + for (int index1 = 0; (double) index1 < 200.0 * (double) num2; ++index1) + { + int num3 = 0; + bool flag1 = false; + while (!flag1) + { + ++num3; + int index2 = WorldGen.genRand.Next((int) ((double) Main.maxTilesX * 0.2), (int) ((double) Main.maxTilesX * 0.8)); + int j = WorldGen.genRand.Next(Main.maxTilesY - 300, Main.maxTilesY - 20); + if (Main.tile[index2, j].active() && (Main.tile[index2, j].type == (ushort) 75 || Main.tile[index2, j].type == (ushort) 76)) + { + int num4 = 0; + if (Main.tile[index2 - 1, j].wall > (ushort) 0) + num4 = -1; + else if (Main.tile[index2 + 1, j].wall > (ushort) 0) + num4 = 1; + if (!Main.tile[index2 + num4, j].active() && !Main.tile[index2 + num4, j + 1].active()) + { + bool flag2 = false; + for (int index3 = index2 - 8; index3 < index2 + 8; ++index3) + { + for (int index4 = j - 8; index4 < j + 8; ++index4) + { + if (Main.tile[index3, index4].active() && Main.tile[index3, index4].type == (ushort) 4) + { + flag2 = true; + break; + } + } + } + if (!flag2) + { + WorldGen.PlaceTile(index2 + num4, j, 4, true, true, style: 7); + flag1 = true; + } + } + } + if (num3 > 1000) + flag1 = true; + } + } + float num5 = 4200000f / (float) Main.maxTilesX; + for (int index5 = 0; (double) index5 < (double) num5; ++index5) + { + int num6 = 0; + int i1 = WorldGen.genRand.Next(num1, Main.maxTilesX - num1); + int j = WorldGen.genRand.Next(Main.maxTilesY - 250, Main.maxTilesY - 20); + while (Main.tile[i1, j].wall != (ushort) 13 && Main.tile[i1, j].wall != (ushort) 14 || Main.tile[i1, j].active()) + { + i1 = WorldGen.genRand.Next(num1, Main.maxTilesX - num1); + j = WorldGen.genRand.Next(Main.maxTilesY - 250, Main.maxTilesY - 20); + if (WorldGen.drunkWorldGen) + i1 = WorldGen.genRand.Next(2) != 0 ? WorldGen.genRand.Next(Main.maxTilesX - num1, Main.maxTilesX - 50) : WorldGen.genRand.Next(50, num1); + ++num6; + if (num6 > 100000) + break; + } + if (num6 <= 100000 && (Main.tile[i1, j].wall == (ushort) 13 || Main.tile[i1, j].wall == (ushort) 14) && !Main.tile[i1, j].active()) + { + while (!WorldGen.SolidTile(i1, j) && j < Main.maxTilesY - 20) + ++j; + int index6 = j - 1; + int i2 = i1; + int i3 = i1; + while (!Main.tile[i2, index6].active() && WorldGen.SolidTile(i2, index6 + 1)) + --i2; + int num7 = i2 + 1; + while (!Main.tile[i3, index6].active() && WorldGen.SolidTile(i3, index6 + 1)) + ++i3; + int num8 = i3 - 1; + int num9 = num8 - num7; + int index7 = (num8 + num7) / 2; + if (!Main.tile[index7, index6].active() && (Main.tile[index7, index6].wall == (ushort) 13 || Main.tile[index7, index6].wall == (ushort) 14) && WorldGen.SolidTile(index7, index6 + 1)) + { + int style1 = 16; + int style2 = 13; + int style3 = 14; + int style4 = 49; + int style5 = 4; + int style6 = 8; + int style7 = 15; + int style8 = 9; + int style9 = 10; + int style10 = 17; + int style11 = 25; + int style12 = 25; + int style13 = 23; + int style14 = 25; + int num10 = WorldGen.genRand.Next(13); + int num11 = 0; + int num12 = 0; + if (num10 == 0) + { + num11 = 5; + num12 = 4; + } + if (num10 == 1) + { + num11 = 4; + num12 = 3; + } + if (num10 == 2) + { + num11 = 3; + num12 = 5; + } + if (num10 == 3) + { + num11 = 4; + num12 = 6; + } + if (num10 == 4) + { + num11 = 3; + num12 = 3; + } + if (num10 == 5) + { + num11 = 5; + num12 = 3; + } + if (num10 == 6) + { + num11 = 5; + num12 = 4; + } + if (num10 == 7) + { + num11 = 5; + num12 = 4; + } + if (num10 == 8) + { + num11 = 5; + num12 = 4; + } + if (num10 == 9) + { + num11 = 3; + num12 = 5; + } + if (num10 == 10) + { + num11 = 5; + num12 = 3; + } + if (num10 == 11) + { + num11 = 2; + num12 = 4; + } + if (num10 == 12) + { + num11 = 3; + num12 = 3; + } + for (int index8 = index7 - num11; index8 <= index7 + num11; ++index8) + { + for (int index9 = index6 - num12; index9 <= index6; ++index9) + { + if (Main.tile[index8, index9].active()) + { + num10 = -1; + break; + } + } + } + if ((double) num9 < (double) num11 * 1.75) + num10 = -1; + switch (num10) + { + case 0: + WorldGen.PlaceTile(index7, index6, 14, true, style: style2); + int num13 = WorldGen.genRand.Next(6); + if (num13 < 3) + WorldGen.PlaceTile(index7 + num13, index6 - 2, 33, true, style: style12); + if (Main.tile[index7, index6].active()) + { + if (!Main.tile[index7 - 2, index6].active()) + { + WorldGen.PlaceTile(index7 - 2, index6, 15, true, style: style1); + if (Main.tile[index7 - 2, index6].active()) + { + Main.tile[index7 - 2, index6].frameX += (short) 18; + Main.tile[index7 - 2, index6 - 1].frameX += (short) 18; + } + } + if (!Main.tile[index7 + 2, index6].active()) + { + WorldGen.PlaceTile(index7 + 2, index6, 15, true, style: style1); + continue; + } + continue; + } + continue; + case 1: + WorldGen.PlaceTile(index7, index6, 18, true, style: style3); + int num14 = WorldGen.genRand.Next(4); + if (num14 < 2) + WorldGen.PlaceTile(index7 + num14, index6 - 1, 33, true, style: style12); + if (Main.tile[index7, index6].active()) + { + if (WorldGen.genRand.Next(2) == 0) + { + if (!Main.tile[index7 - 1, index6].active()) + { + WorldGen.PlaceTile(index7 - 1, index6, 15, true, style: style1); + if (Main.tile[index7 - 1, index6].active()) + { + Main.tile[index7 - 1, index6].frameX += (short) 18; + Main.tile[index7 - 1, index6 - 1].frameX += (short) 18; + continue; + } + continue; + } + continue; + } + if (!Main.tile[index7 + 2, index6].active()) + { + WorldGen.PlaceTile(index7 + 2, index6, 15, true, style: style1); + continue; + } + continue; + } + continue; + case 2: + WorldGen.PlaceTile(index7, index6, 105, true, style: style4); + continue; + case 3: + WorldGen.PlaceTile(index7, index6, 101, true, style: style5); + continue; + case 4: + if (WorldGen.genRand.Next(2) == 0) + { + WorldGen.PlaceTile(index7, index6, 15, true, style: style1); + Main.tile[index7, index6].frameX += (short) 18; + Main.tile[index7, index6 - 1].frameX += (short) 18; + continue; + } + WorldGen.PlaceTile(index7, index6, 15, true, style: style1); + continue; + case 5: + if (WorldGen.genRand.Next(2) == 0) + { + WorldGen.Place4x2(index7, index6, (ushort) 79, 1, style6); + continue; + } + WorldGen.Place4x2(index7, index6, (ushort) 79, style: style6); + continue; + case 6: + WorldGen.PlaceTile(index7, index6, 87, true, style: style7); + continue; + case 7: + WorldGen.PlaceTile(index7, index6, 88, true, style: style8); + continue; + case 8: + WorldGen.PlaceTile(index7, index6, 89, true, style: style9); + continue; + case 9: + WorldGen.PlaceTile(index7, index6, 104, true, style: style10); + continue; + case 10: + if (WorldGen.genRand.Next(2) == 0) + { + WorldGen.Place4x2(index7, index6, (ushort) 90, 1, style14); + continue; + } + WorldGen.Place4x2(index7, index6, (ushort) 90, style: style14); + continue; + case 11: + WorldGen.PlaceTile(index7, index6, 93, true, style: style13); + continue; + case 12: + WorldGen.PlaceTile(index7, index6, 100, true, style: style11); + continue; + default: + continue; + } + } + } + } + float num15 = 420000f / (float) Main.maxTilesX; + for (int index10 = 0; (double) index10 < (double) num15; ++index10) + { + int num16 = 0; + int index11 = WorldGen.genRand.Next(num1, Main.maxTilesX - num1); + int index12 = WorldGen.genRand.Next(Main.maxTilesY - 250, Main.maxTilesY - 20); + while (Main.tile[index11, index12].wall != (ushort) 13 && Main.tile[index11, index12].wall != (ushort) 14 || Main.tile[index11, index12].active()) + { + index11 = WorldGen.genRand.Next(num1, Main.maxTilesX - num1); + index12 = WorldGen.genRand.Next(Main.maxTilesY - 250, Main.maxTilesY - 20); + if (WorldGen.drunkWorldGen) + index11 = WorldGen.genRand.Next(2) != 0 ? WorldGen.genRand.Next(Main.maxTilesX - num1, Main.maxTilesX - 50) : WorldGen.genRand.Next(50, num1); + ++num16; + if (num16 > 100000) + break; + } + if (num16 <= 100000) + { + for (int index13 = 0; index13 < 2; ++index13) + { + int index14 = index11; + int index15 = index11; + while (!Main.tile[index14, index12].active() && (Main.tile[index14, index12].wall == (ushort) 13 || Main.tile[index14, index12].wall == (ushort) 14)) + --index14; + int num17 = index14 + 1; + while (!Main.tile[index15, index12].active() && (Main.tile[index15, index12].wall == (ushort) 13 || Main.tile[index15, index12].wall == (ushort) 14)) + ++index15; + int num18 = index15 - 1; + index11 = (num17 + num18) / 2; + int index16 = index12; + int index17 = index12; + while (!Main.tile[index11, index16].active() && (Main.tile[index11, index16].wall == (ushort) 13 || Main.tile[index11, index16].wall == (ushort) 14)) + --index16; + int num19 = index16 + 1; + while (!Main.tile[index11, index17].active() && (Main.tile[index11, index17].wall == (ushort) 13 || Main.tile[index11, index17].wall == (ushort) 14)) + ++index17; + int num20 = index17 - 1; + index12 = (num19 + num20) / 2; + } + int index18 = index11; + int index19 = index11; + while (!Main.tile[index18, index12].active() && !Main.tile[index18, index12 - 1].active() && !Main.tile[index18, index12 + 1].active()) + --index18; + int num21 = index18 + 1; + while (!Main.tile[index19, index12].active() && !Main.tile[index19, index12 - 1].active() && !Main.tile[index19, index12 + 1].active()) + ++index19; + int num22 = index19 - 1; + int index20 = index12; + int index21 = index12; + while (!Main.tile[index11, index20].active() && !Main.tile[index11 - 1, index20].active() && !Main.tile[index11 + 1, index20].active()) + --index20; + int num23 = index20 + 1; + while (!Main.tile[index11, index21].active() && !Main.tile[index11 - 1, index21].active() && !Main.tile[index11 + 1, index21].active()) + ++index21; + int num24 = index21 - 1; + int num25 = (num21 + num22) / 2; + int num26 = (num23 + num24) / 2; + int num27 = num22 - num21; + int num28 = num24 - num23; + if (num27 > 7 && num28 > 5) + { + int num29 = 0; + if (WorldGen.nearPicture2(num25, num26)) + num29 = -1; + if (num29 == 0) + { + Vector2 vector2 = WorldGen.randHellPicture(); + int x = (int) vector2.X; + int y = (int) vector2.Y; + if (!WorldGen.nearPicture(num25, num26)) + WorldGen.PlaceTile(num25, num26, x, true, style: y); + } + } + } + } + int[] numArray = new int[3] + { + WorldGen.genRand.Next(16, 22), + WorldGen.genRand.Next(16, 22), + WorldGen.genRand.Next(16, 22) + }; + while (numArray[1] == numArray[0]) + numArray[1] = WorldGen.genRand.Next(16, 22); + while (numArray[2] == numArray[0] || numArray[2] == numArray[1]) + numArray[2] = WorldGen.genRand.Next(16, 22); + float num30 = 420000f / (float) Main.maxTilesX; + for (int index22 = 0; (double) index22 < (double) num30; ++index22) + { + int num31 = 0; + int i; + int j1; + do + { + i = WorldGen.genRand.Next(num1, Main.maxTilesX - num1); + j1 = WorldGen.genRand.Next(Main.maxTilesY - 250, Main.maxTilesY - 20); + if (WorldGen.drunkWorldGen) + i = WorldGen.genRand.Next(2) != 0 ? WorldGen.genRand.Next(Main.maxTilesX - num1, Main.maxTilesX - 50) : WorldGen.genRand.Next(50, num1); + ++num31; + } + while (num31 <= 100000 && (Main.tile[i, j1].wall != (ushort) 13 && Main.tile[i, j1].wall != (ushort) 14 || Main.tile[i, j1].active())); + if (num31 <= 100000) + { + while (!WorldGen.SolidTile(i, j1) && j1 > 10) + --j1; + int j2 = j1 + 1; + if (Main.tile[i, j2].wall == (ushort) 13 || Main.tile[i, j2].wall == (ushort) 14) + { + int num32 = WorldGen.genRand.Next(3); + int style15 = 32; + int style16 = 32; + int num33; + int num34; + switch (num32) + { + case 1: + num33 = 3; + num34 = 3; + break; + case 2: + num33 = 1; + num34 = 2; + break; + default: + num33 = 1; + num34 = 3; + break; + } + for (int index23 = i - 1; index23 <= i + num33; ++index23) + { + for (int index24 = j2; index24 <= j2 + num34; ++index24) + { + Tile tile = Main.tile[i, j2]; + if (index23 < i || index23 == i + num33) + { + if (tile.active()) + { + switch (tile.type) + { + case 10: + case 11: + case 34: + case 42: + case 91: + num32 = -1; + continue; + default: + continue; + } + } + } + else if (tile.active()) + num32 = -1; + } + } + switch (num32) + { + case 0: + WorldGen.PlaceTile(i, j2, 91, true, style: numArray[WorldGen.genRand.Next(3)]); + continue; + case 1: + WorldGen.PlaceTile(i, j2, 34, true, style: style15); + continue; + case 2: + WorldGen.PlaceTile(i, j2, 42, true, style: style16); + continue; + default: + continue; + } + } + } + } + } + + public static void HellFort(int i, int j, ushort tileType = 75, byte wallType = 14) + { + int[] numArray1 = new int[5]; + int[] numArray2 = new int[5]; + int[] numArray3 = new int[10]; + int[] numArray4 = new int[10]; + int minValue1 = 8; + int maxValue1 = 20; + if (WorldGen.drunkWorldGen) + { + minValue1 /= 2; + maxValue1 *= 2; + } + numArray1[2] = i - WorldGen.genRand.Next(minValue1 / 2, maxValue1 / 2); + numArray2[2] = i + WorldGen.genRand.Next(minValue1 / 2, maxValue1 / 2); + numArray1[3] = numArray2[2]; + numArray2[3] = numArray1[3] + WorldGen.genRand.Next(minValue1, maxValue1); + numArray1[4] = numArray2[3]; + numArray2[4] = numArray1[4] + WorldGen.genRand.Next(minValue1, maxValue1); + numArray2[1] = numArray1[2]; + numArray1[1] = numArray2[1] - WorldGen.genRand.Next(minValue1, maxValue1); + numArray2[0] = numArray1[1]; + numArray1[0] = numArray2[0] - WorldGen.genRand.Next(minValue1, maxValue1); + int minValue2 = 6; + int maxValue2 = 12; + numArray3[3] = j - WorldGen.genRand.Next(minValue2, maxValue2); + numArray4[3] = j; + for (int index = 4; index < 10; ++index) + { + numArray3[index] = numArray4[index - 1]; + numArray4[index] = numArray3[index] + WorldGen.genRand.Next(minValue2, maxValue2); + } + for (int index = 2; index >= 0; --index) + { + numArray4[index] = numArray3[index + 1]; + numArray3[index] = numArray4[index] - WorldGen.genRand.Next(minValue2, maxValue2); + } + bool flag1 = false; + bool flag2 = false; + bool[,] flagArray1 = new bool[5, 10]; + int num1 = 3; + int num2 = 3; + for (int index1 = 0; index1 < 2; ++index1) + { + if (WorldGen.genRand.Next(3) == 0 || WorldGen.drunkWorldGen) + { + flag1 = true; + int index2 = WorldGen.genRand.Next(10); + if (index2 < num1) + num1 = index2; + if (index2 > num2) + num2 = index2; + int index3 = 1; + if (WorldGen.genRand.Next(2) == 0 || WorldGen.drunkWorldGen) + { + flagArray1[0, index2] = true; + flagArray1[1, index2] = true; + index3 = 0; + } + else + flagArray1[1, index2] = true; + int num3 = WorldGen.genRand.Next(2); + if (num3 == 0) + num3 = -1; + for (int index4 = WorldGen.genRand.Next(10); index4 > 0 && index2 >= 0 && index2 < 10; index2 += num3) + flagArray1[index3, index2] = true; + } + if (WorldGen.genRand.Next(3) == 0 || WorldGen.drunkWorldGen) + { + flag2 = true; + int index5 = WorldGen.genRand.Next(10); + if (index5 < num1) + num1 = index5; + if (index5 > num2) + num2 = index5; + int index6 = 3; + if (WorldGen.genRand.Next(2) == 0 || WorldGen.drunkWorldGen) + { + flagArray1[3, index5] = true; + flagArray1[4, index5] = true; + index6 = 4; + } + else + flagArray1[3, index5] = true; + int num4 = WorldGen.genRand.Next(2); + if (num4 == 0) + num4 = -1; + for (int index7 = WorldGen.genRand.Next(10); index7 > 0 && index5 >= 0 && index5 < 10; index5 += num4) + flagArray1[index6, index5] = true; + } + } + for (int index8 = 0; index8 < 5; ++index8) + { + int index9 = numArray1[index8]; + bool flag3 = false; + if (index9 < 10 || index9 > Main.maxTilesX - 10) + { + flag3 = true; + } + else + { + for (int underworldLayer = Main.UnderworldLayer; underworldLayer < Main.maxTilesY; ++underworldLayer) + { + if (Main.tile[index9, underworldLayer].wall > (ushort) 0) + flag3 = true; + } + } + if (flag3) + { + for (int index10 = 0; index10 < 10; ++index10) + flagArray1[index8, index10] = false; + } + } + int num5 = WorldGen.genRand.Next(10); + if (num5 < num1) + num1 = num5; + int num6 = WorldGen.genRand.Next(10); + if (num6 > num2) + num2 = num6; + if (!flag1 && !flag2) + { + while (num2 - num1 < 5) + { + int num7 = WorldGen.genRand.Next(10); + if (num7 < num1) + num1 = num7; + int num8 = WorldGen.genRand.Next(10); + if (num8 > num2) + num2 = num8; + } + } + for (int index = num1; index <= num2; ++index) + flagArray1[2, index] = true; + for (int index11 = 0; index11 < 5; ++index11) + { + for (int index12 = 0; index12 < 10; ++index12) + { + if (flagArray1[index11, index12] && (numArray3[index12] < Main.UnderworldLayer || numArray4[index12] > Main.maxTilesY - 20)) + flagArray1[index11, index12] = false; + } + } + for (int index13 = 0; index13 < 5; ++index13) + { + for (int index14 = 0; index14 < 10; ++index14) + { + if (flagArray1[index13, index14]) + { + for (int index15 = numArray1[index13]; index15 <= numArray2[index13]; ++index15) + { + for (int index16 = numArray3[index14]; index16 <= numArray4[index14] && index15 >= 10 && index15 <= Main.maxTilesX - 10; ++index16) + { + Main.tile[index15, index16].liquid = (byte) 0; + if (index15 == numArray1[index13] || index15 == numArray2[index13] || index16 == numArray3[index14] || index16 == numArray4[index14]) + { + Main.tile[index15, index16].active(true); + Main.tile[index15, index16].type = tileType; + Main.tile[index15, index16].halfBrick(false); + Main.tile[index15, index16].slope((byte) 0); + } + else + { + Main.tile[index15, index16].wall = (ushort) wallType; + Main.tile[index15, index16].active(false); + } + } + } + } + } + } + int style1 = 19; + int style2 = 13; + for (int index17 = 0; index17 < 4; ++index17) + { + bool[] flagArray2 = new bool[10]; + bool flag4 = false; + for (int index18 = 0; index18 < 10; ++index18) + { + if (flagArray1[index17, index18] && flagArray1[index17 + 1, index18]) + { + flagArray2[index18] = true; + flag4 = true; + } + } + while (flag4) + { + int index19 = WorldGen.genRand.Next(10); + if (flagArray2[index19]) + { + flag4 = false; + Main.tile[numArray2[index17], numArray4[index19] - 1].active(false); + Main.tile[numArray2[index17], numArray4[index19] - 2].active(false); + Main.tile[numArray2[index17], numArray4[index19] - 3].active(false); + Main.tile[numArray2[index17], numArray4[index19] - 1].wall = (ushort) wallType; + Main.tile[numArray2[index17], numArray4[index19] - 2].wall = (ushort) wallType; + Main.tile[numArray2[index17], numArray4[index19] - 3].wall = (ushort) wallType; + WorldGen.PlaceTile(numArray2[index17], numArray4[index19] - 1, 10, true, style: style1); + } + } + } + for (int index20 = 0; index20 < 5; ++index20) + { + for (int index21 = 0; index21 < 10; ++index21) + { + if (flagArray1[index20, index21]) + { + if (index21 > 0 && flagArray1[index20, index21 - 1]) + { + int num9 = WorldGen.genRand.Next(numArray1[index20] + 2, numArray2[index20] - 1); + int num10 = WorldGen.genRand.Next(numArray1[index20] + 2, numArray2[index20] - 1); + int num11 = 0; + while (num10 - num9 < 2 || num10 - num9 > 5) + { + num9 = WorldGen.genRand.Next(numArray1[index20] + 2, numArray2[index20] - 1); + num10 = WorldGen.genRand.Next(numArray1[index20] + 2, numArray2[index20] - 1); + ++num11; + if (num11 > 10000) + break; + } + if (num11 <= 10000) + { + for (int i1 = num9; i1 <= num10 && i1 >= 20 && i1 <= Main.maxTilesX - 20; ++i1) + { + Main.tile[i1, numArray3[index21]].active(false); + WorldGen.PlaceTile(i1, numArray3[index21], 19, true, true, style: style2); + Main.tile[i1, numArray3[index21]].wall = (ushort) wallType; + } + } + else + break; + } + if (index20 < 4 && flagArray1[index20 + 1, index21] && WorldGen.genRand.Next(3) == 0) + { + Main.tile[numArray2[index20], numArray4[index21] - 1].active(false); + Main.tile[numArray2[index20], numArray4[index21] - 2].active(false); + Main.tile[numArray2[index20], numArray4[index21] - 3].active(false); + Main.tile[numArray2[index20], numArray4[index21] - 1].wall = (ushort) wallType; + Main.tile[numArray2[index20], numArray4[index21] - 2].wall = (ushort) wallType; + Main.tile[numArray2[index20], numArray4[index21] - 3].wall = (ushort) wallType; + WorldGen.PlaceTile(numArray2[index20], numArray4[index21] - 1, 10, true, style: style1); + } + } + } + } + bool flag5 = false; + for (int index22 = 0; index22 < 5; ++index22) + { + bool[] flagArray3 = new bool[10]; + for (int index23 = 0; index23 < 10; ++index23) + { + if (flagArray1[index22, index23]) + { + flag5 = true; + flagArray3[index23] = true; + } + } + if (flag5) + { + bool flag6 = false; + for (int index24 = 0; index24 < 10; ++index24) + { + if (flagArray3[index24]) + { + if (!Main.tile[numArray1[index22] - 1, numArray4[index24] - 1].active() && !Main.tile[numArray1[index22] - 1, numArray4[index24] - 2].active() && !Main.tile[numArray1[index22] - 1, numArray4[index24] - 3].active() && Main.tile[numArray1[index22] - 1, numArray4[index24] - 1].liquid == (byte) 0 && Main.tile[numArray1[index22] - 1, numArray4[index24] - 2].liquid == (byte) 0 && Main.tile[numArray1[index22] - 1, numArray4[index24] - 3].liquid == (byte) 0) + flag6 = true; + else + flagArray3[index24] = false; + } + } + while (flag6) + { + int index25 = WorldGen.genRand.Next(10); + if (flagArray3[index25]) + { + flag6 = false; + Main.tile[numArray1[index22], numArray4[index25] - 1].active(false); + Main.tile[numArray1[index22], numArray4[index25] - 2].active(false); + Main.tile[numArray1[index22], numArray4[index25] - 3].active(false); + WorldGen.PlaceTile(numArray1[index22], numArray4[index25] - 1, 10, true, style: style1); + } + } + break; + } + } + bool flag7 = false; + for (int index26 = 4; index26 >= 0; --index26) + { + bool[] flagArray4 = new bool[10]; + for (int index27 = 0; index27 < 10; ++index27) + { + if (flagArray1[index26, index27]) + { + flag7 = true; + flagArray4[index27] = true; + } + } + if (flag7) + { + bool flag8 = false; + for (int index28 = 0; index28 < 10; ++index28) + { + if (flagArray4[index28]) + { + if (index26 >= 20 && index26 <= Main.maxTilesX - 20) + { + if (!Main.tile[numArray2[index26] + 1, numArray4[index28] - 1].active() && !Main.tile[numArray2[index26] + 1, numArray4[index28] - 2].active() && !Main.tile[numArray2[index26] + 1, numArray4[index28] - 3].active() && Main.tile[numArray2[index26] + 1, numArray4[index28] - 1].liquid == (byte) 0 && Main.tile[numArray2[index26] + 1, numArray4[index28] - 2].liquid == (byte) 0 && Main.tile[numArray2[index26] + 1, numArray4[index28] - 3].liquid == (byte) 0) + flag8 = true; + else + flagArray4[index28] = false; + } + else + break; + } + } + while (flag8) + { + int index29 = WorldGen.genRand.Next(10); + if (flagArray4[index29]) + { + flag8 = false; + Main.tile[numArray2[index26], numArray4[index29] - 1].active(false); + Main.tile[numArray2[index26], numArray4[index29] - 2].active(false); + Main.tile[numArray2[index26], numArray4[index29] - 3].active(false); + WorldGen.PlaceTile(numArray2[index26], numArray4[index29] - 1, 10, true, style: style1); + } + } + break; + } + } + bool flag9 = false; + for (int index30 = 0; index30 < 10; ++index30) + { + bool[] flagArray5 = new bool[10]; + for (int index31 = 0; index31 < 5; ++index31) + { + if (flagArray1[index31, index30]) + { + flag9 = true; + flagArray5[index31] = true; + } + } + if (flag9) + { + bool flag10 = true; + while (flag10) + { + int index32 = WorldGen.genRand.Next(5); + if (flagArray5[index32]) + { + int num12 = WorldGen.genRand.Next(numArray1[index32] + 2, numArray2[index32] - 1); + int num13 = WorldGen.genRand.Next(numArray1[index32] + 2, numArray2[index32] - 1); + int num14 = 0; + while (num13 - num12 < 2 || num13 - num12 > 5) + { + num12 = WorldGen.genRand.Next(numArray1[index32] + 2, numArray2[index32] - 1); + num13 = WorldGen.genRand.Next(numArray1[index32] + 2, numArray2[index32] - 1); + ++num14; + if (num14 > 10000) + break; + } + if (num14 > 10000) + break; + for (int index33 = num12; index33 <= num13 && index33 >= 10 && index33 <= Main.maxTilesX - 10; ++index33) + { + if (Main.tile[index33, numArray3[index30] - 1].active() || Main.tile[index33, numArray3[index30] - 1].liquid > (byte) 0) + flag10 = false; + } + if (flag10) + { + for (int i2 = num12; i2 <= num13 && i2 >= 10 && i2 <= Main.maxTilesX - 10; ++i2) + { + Main.tile[i2, numArray3[index30]].active(false); + WorldGen.PlaceTile(i2, numArray3[index30], 19, true, true, style: style2); + } + } + flag10 = false; + } + } + break; + } + } + } + + public static void HellHouse(int i, int j, byte type = 76, byte wall = 13) + { + int width = WorldGen.genRand.Next(8, 20); + int num1 = WorldGen.genRand.Next(1, 3); + int num2 = WorldGen.genRand.Next(4, 13); + int i1 = i; + int j1 = j; + for (int index = 0; index < num1; ++index) + { + int height = WorldGen.genRand.Next(5, 9); + WorldGen.HellRoom(i1, j1, width, height, type, wall); + j1 -= height; + } + int j2 = j; + for (int index = 0; index < num2; ++index) + { + int height = WorldGen.genRand.Next(5, 9); + j2 += height; + WorldGen.HellRoom(i1, j2, width, height, type, wall); + } + for (int index1 = i - width / 2; index1 <= i + width / 2; ++index1) + { + int index2 = j; + while (index2 < Main.maxTilesY && (Main.tile[index1, index2].active() && (Main.tile[index1, index2].type == (ushort) 76 || Main.tile[index1, index2].type == (ushort) 75) || Main.tile[i, index2].wall == (ushort) 13 || Main.tile[i, index2].wall == (ushort) 14)) + ++index2; + int num3 = 6 + WorldGen.genRand.Next(3); + while (index2 < Main.maxTilesY && !Main.tile[index1, index2].active()) + { + --num3; + Main.tile[index1, index2].active(true); + Main.tile[index1, index2].type = (ushort) 57; + ++index2; + if (num3 <= 0) + break; + } + } + int index3 = j; + while (index3 < Main.maxTilesY && (Main.tile[i, index3].active() && (Main.tile[i, index3].type == (ushort) 76 || Main.tile[i, index3].type == (ushort) 75) || Main.tile[i, index3].wall == (ushort) 13 || Main.tile[i, index3].wall == (ushort) 14)) + ++index3; + int index4 = index3 - 1; + int maxValue = index4; + while (Main.tile[i, index4].active() && (Main.tile[i, index4].type == (ushort) 76 || Main.tile[i, index4].type == (ushort) 75) || Main.tile[i, index4].wall == (ushort) 13 || Main.tile[i, index4].wall == (ushort) 14) + { + --index4; + if (Main.tile[i, index4].active() && (Main.tile[i, index4].type == (ushort) 76 || Main.tile[i, index4].type == (ushort) 75)) + { + int num4 = WorldGen.genRand.Next(i - width / 2 + 1, i + width / 2 - 1); + int num5 = WorldGen.genRand.Next(i - width / 2 + 1, i + width / 2 - 1); + if (num4 > num5) + { + int num6 = num4; + num4 = num5; + num5 = num6; + } + if (num4 == num5) + { + if (num4 < i) + ++num5; + else + --num4; + } + for (int index5 = num4; index5 <= num5; ++index5) + { + if (Main.tile[index5, index4 - 1].wall == (ushort) 13) + Main.tile[index5, index4].wall = (ushort) 13; + if (Main.tile[index5, index4 - 1].wall == (ushort) 14) + Main.tile[index5, index4].wall = (ushort) 14; + Main.tile[index5, index4].type = (ushort) 19; + Main.tile[index5, index4].active(true); + } + --index4; + } + } + int minValue = index4; + float num7 = (float) ((maxValue - minValue) * width) * 0.02f; + for (int index6 = 0; (double) index6 < (double) num7; ++index6) + { + int num8 = WorldGen.genRand.Next(i - width / 2, i + width / 2 + 1); + int num9 = WorldGen.genRand.Next(minValue, maxValue); + int num10 = WorldGen.genRand.Next(3, 8); + for (int index7 = num8 - num10; index7 <= num8 + num10; ++index7) + { + for (int index8 = num9 - num10; index8 <= num9 + num10; ++index8) + { + double num11 = (double) Math.Abs(index7 - num8); + float num12 = (float) Math.Abs(index8 - num9); + if (Math.Sqrt(num11 * num11 + (double) num12 * (double) num12) < (double) num10 * 0.4) + { + try + { + if (Main.tile[index7, index8].type == (ushort) 76 || Main.tile[index7, index8].type == (ushort) 19) + Main.tile[index7, index8].active(false); + Main.tile[index7, index8].wall = (ushort) 0; + } + catch + { + } + } + } + } + } + } + + public static void HellRoom(int i, int j, int width, int height, byte type = 76, byte wall = 13) + { + if (j > Main.maxTilesY - 40) + return; + for (int index1 = i - width / 2; index1 <= i + width / 2; ++index1) + { + for (int index2 = j - height; index2 <= j; ++index2) + { + try + { + Main.tile[index1, index2].active(true); + Main.tile[index1, index2].type = (ushort) type; + Main.tile[index1, index2].liquid = (byte) 0; + Main.tile[index1, index2].lava(false); + } + catch + { + } + } + } + for (int index3 = i - width / 2 + 1; index3 <= i + width / 2 - 1; ++index3) + { + for (int index4 = j - height + 1; index4 <= j - 1; ++index4) + { + try + { + Main.tile[index3, index4].active(false); + Main.tile[index3, index4].wall = (ushort) wall; + Main.tile[index3, index4].liquid = (byte) 0; + Main.tile[index3, index4].lava(false); + } + catch + { + } + } + } + } + + public static void templeCleaner(int x, int y) + { + int index1 = x; + int index2 = y; + int num = 0; + if (Main.tile[x + 1, y].active() && Main.tile[x + 1, y].type == (ushort) 226) + ++num; + if (Main.tile[x - 1, y].active() && Main.tile[x - 1, y].type == (ushort) 226) + ++num; + if (Main.tile[x, y + 1].active() && Main.tile[x, y + 1].type == (ushort) 226) + ++num; + if (Main.tile[x, y - 1].active() && Main.tile[x, y - 1].type == (ushort) 226) + ++num; + if (Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 226) + { + if (num > 1) + return; + Main.tile[index1, index2].active(false); + Main.tile[index1, index2].wall = (ushort) 87; + } + else + { + if (Main.tile[x, y].active() || num != 3) + return; + Main.tile[index1, index2].active(true); + Main.tile[index1, index2].type = (ushort) 226; + Main.tile[index1, index2].liquid = (byte) 0; + Main.tile[index1, index2].slope((byte) 0); + Main.tile[index1, index2].halfBrick(false); + } + } + + public static Vector2 templePather(Vector2 templePath, int destX, int destY) + { + int x = (int) templePath.X; + int y = (int) templePath.Y; + int num1 = WorldGen.genRand.Next(5, 20); + int num2 = WorldGen.genRand.Next(2, 5); + while (num1 > 0 && (x != destX || y != destY)) + { + --num1; + if (x > destX) + --x; + if (x < destX) + ++x; + if (y > destY) + --y; + if (y < destY) + ++y; + for (int index1 = x - num2; index1 < x + num2; ++index1) + { + for (int index2 = y - num2; index2 < y + num2; ++index2) + { + Main.tile[index1, index2].active(false); + Main.tile[index1, index2].wall = (ushort) 87; + } + } + } + return new Vector2((float) x, (float) y); + } + + public static void outerTempled(int x, int y) + { + if (Main.tile[x, y].active() & Main.tile[x, y].type == (ushort) 226 || Main.tile[x, y].wall == (ushort) 87) + return; + int num = 6; + for (int index1 = x - num; index1 <= x + num; ++index1) + { + for (int index2 = y - num; index2 <= y + num; ++index2) + { + if (!Main.tile[index1, index2].active() && Main.tile[index1, index2].wall == (ushort) 87) + { + int index3 = x; + int index4 = y; + Main.tile[index3, index4].active(true); + Main.tile[index3, index4].type = (ushort) 226; + Main.tile[index3, index4].liquid = (byte) 0; + Main.tile[index3, index4].slope((byte) 0); + Main.tile[index3, index4].halfBrick(false); + return; + } + } + } + } + + public static void makeTemple(int x, int y) + { + Microsoft.Xna.Framework.Rectangle[] rectangleArray = new Microsoft.Xna.Framework.Rectangle[100]; + float num1 = (float) (Main.maxTilesX / 4200); + int maxValue = WorldGen.genRand.Next((int) ((double) num1 * 10.0), (int) ((double) num1 * 16.0)); + if (WorldGen.drunkWorldGen) + maxValue *= 3; + if (WorldGen.getGoodWorldGen) + maxValue *= 3; + int num2 = 1; + if (WorldGen.genRand.Next(2) == 0) + num2 = -1; + int num3 = num2; + int num4 = x; + int num5 = y; + int num6 = x; + int num7 = y; + int num8 = WorldGen.genRand.Next(1, 3); + int num9 = 0; + for (int index1 = 0; index1 < maxValue; ++index1) + { + ++num9; + int num10 = num2; + int num11 = num6; + int num12 = num7; + bool flag = true; + int width1 = 0; + int height1 = 0; + int num13 = -10; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(num11 - width1 / 2, num12 - height1 / 2, width1, height1); + while (flag) + { + int num14 = num6; + int num15 = num7; + int width2 = WorldGen.genRand.Next(25, 50); + int height2 = WorldGen.genRand.Next(20, 35); + if (height2 > width2) + height2 = width2; + if (index1 == maxValue - 1) + { + int num16 = WorldGen.genRand.Next(55, 65); + int num17 = WorldGen.genRand.Next(45, 50); + if (num17 > num16) + num17 = num16; + width2 = (int) ((double) num16 * 1.6); + height2 = (int) ((double) num17 * 1.35); + num15 += WorldGen.genRand.Next(5, 10); + } + if (num9 > num8) + { + num12 = num15 + (WorldGen.genRand.Next(height2 + 1, height2 + 3) + num13); + num11 = num14 + WorldGen.genRand.Next(-5, 6); + num10 = num2 * -1; + } + else + { + num11 = num14 + (WorldGen.genRand.Next(width2 + 1, width2 + 3) + num13) * num10; + num12 = num15 + WorldGen.genRand.Next(-5, 6); + } + flag = false; + rectangle = new Microsoft.Xna.Framework.Rectangle(num11 - width2 / 2, num12 - height2 / 2, width2, height2); + for (int index2 = 0; index2 < index1; ++index2) + { + if (rectangle.Intersects(rectangleArray[index2])) + flag = true; + if (WorldGen.genRand.Next(100) == 0) + ++num13; + } + } + if (num9 > num8) + { + ++num8; + num9 = 1; + } + rectangleArray[index1] = rectangle; + num2 = num10; + num6 = num11; + num7 = num12; + } + for (int index3 = 0; index3 < maxValue; ++index3) + { + for (int index4 = 0; index4 < 2; ++index4) + { + for (int index5 = 0; index5 < maxValue; ++index5) + { + for (int index6 = 0; index6 < 2; ++index6) + { + int x1 = rectangleArray[index3].X; + if (index4 == 1) + x1 += rectangleArray[index3].Width - 1; + int y1 = rectangleArray[index3].Y; + int num18 = y1 + rectangleArray[index3].Height; + int x2 = rectangleArray[index5].X; + if (index6 == 1) + x2 += rectangleArray[index5].Width - 1; + int y2 = rectangleArray[index5].Y; + int num19 = y2 + rectangleArray[index5].Height; + while (x1 != x2 || y1 != y2 || num18 != num19) + { + if (x1 < x2) + ++x1; + if (x1 > x2) + --x1; + if (y1 < y2) + ++y1; + if (y1 > y2) + --y1; + if (num18 < num19) + ++num18; + if (num18 > num19) + --num18; + int index7 = x1; + for (int index8 = y1; index8 < num18; ++index8) + { + Main.tile[index7, index8].active(true); + Main.tile[index7, index8].type = (ushort) 226; + Main.tile[index7, index8].liquid = (byte) 0; + Main.tile[index7, index8].slope((byte) 0); + Main.tile[index7, index8].halfBrick(false); + } + } + } + } + } + } + for (int index9 = 0; index9 < maxValue; ++index9) + { + if (true) + { + for (int x3 = rectangleArray[index9].X; x3 < rectangleArray[index9].X + rectangleArray[index9].Width; ++x3) + { + for (int y3 = rectangleArray[index9].Y; y3 < rectangleArray[index9].Y + rectangleArray[index9].Height; ++y3) + { + Main.tile[x3, y3].active(true); + Main.tile[x3, y3].type = (ushort) 226; + Main.tile[x3, y3].liquid = (byte) 0; + Main.tile[x3, y3].slope((byte) 0); + Main.tile[x3, y3].halfBrick(false); + } + } + int x4 = rectangleArray[index9].X; + int num20 = x4 + rectangleArray[index9].Width; + int y4 = rectangleArray[index9].Y; + int num21 = y4 + rectangleArray[index9].Height; + int num22 = x4 + WorldGen.genRand.Next(3, 8); + int num23 = num20 - WorldGen.genRand.Next(3, 8); + int num24 = y4 + WorldGen.genRand.Next(3, 8); + int num25 = num21 - WorldGen.genRand.Next(3, 8); + int num26 = num22; + int num27 = num23; + int num28 = num24; + int num29 = num25; + int num30 = (num22 + num23) / 2; + int num31 = (num24 + num25) / 2; + for (int index10 = num22; index10 < num23; ++index10) + { + for (int index11 = num24; index11 < num25; ++index11) + { + if (WorldGen.genRand.Next(20) == 0) + num28 += WorldGen.genRand.Next(-1, 2); + if (WorldGen.genRand.Next(20) == 0) + num29 += WorldGen.genRand.Next(-1, 2); + if (WorldGen.genRand.Next(20) == 0) + num26 += WorldGen.genRand.Next(-1, 2); + if (WorldGen.genRand.Next(20) == 0) + num27 += WorldGen.genRand.Next(-1, 2); + if (num26 < num22) + num26 = num22; + if (num27 > num23) + num27 = num23; + if (num28 < num24) + num28 = num24; + if (num29 > num25) + num29 = num25; + if (num26 > num30) + num26 = num30; + if (num27 < num30) + num27 = num30; + if (num28 > num31) + num28 = num31; + if (num29 < num31) + num29 = num31; + if (index10 >= num26 && index10 < num27 & index11 >= num28 && index11 <= num29) + { + Main.tile[index10, index11].active(false); + Main.tile[index10, index11].wall = (ushort) 87; + } + } + } + for (int index12 = num25; index12 > num24; --index12) + { + for (int index13 = num23; index13 > num22; --index13) + { + if (WorldGen.genRand.Next(20) == 0) + num28 += WorldGen.genRand.Next(-1, 2); + if (WorldGen.genRand.Next(20) == 0) + num29 += WorldGen.genRand.Next(-1, 2); + if (WorldGen.genRand.Next(20) == 0) + num26 += WorldGen.genRand.Next(-1, 2); + if (WorldGen.genRand.Next(20) == 0) + num27 += WorldGen.genRand.Next(-1, 2); + if (num26 < num22) + num26 = num22; + if (num27 > num23) + num27 = num23; + if (num28 < num24) + num28 = num24; + if (num29 > num25) + num29 = num25; + if (num26 > num30) + num26 = num30; + if (num27 < num30) + num27 = num30; + if (num28 > num31) + num28 = num31; + if (num29 < num31) + num29 = num31; + if (index13 >= num26 && index13 < num27 & index12 >= num28 && index12 <= num29) + { + Main.tile[index13, index12].active(false); + Main.tile[index13, index12].wall = (ushort) 87; + } + } + } + } + } + Vector2 templePath = new Vector2((float) num4, (float) num5); + for (int index14 = 0; index14 < maxValue; ++index14) + { + Microsoft.Xna.Framework.Rectangle rectangle = rectangleArray[index14]; + rectangle.X += 8; + rectangle.Y += 8; + rectangle.Width -= 16; + rectangle.Height -= 16; + bool flag1 = true; + while (flag1) + { + int destX = WorldGen.genRand.Next(rectangle.X, rectangle.X + rectangle.Width); + int destY = WorldGen.genRand.Next(rectangle.Y, rectangle.Y + rectangle.Height); + if (index14 == maxValue - 1) + { + destX = rectangle.X + rectangle.Width / 2 + WorldGen.genRand.Next(-10, 10); + destY = rectangle.Y + rectangle.Height / 2 + WorldGen.genRand.Next(-10, 10); + } + templePath = WorldGen.templePather(templePath, destX, destY); + if ((double) templePath.X == (double) destX && (double) templePath.Y == (double) destY) + flag1 = false; + } + if (index14 < maxValue - 1) + { + if (WorldGen.genRand.Next(3) != 0) + { + int index15 = index14 + 1; + if (rectangleArray[index15].Y >= rectangleArray[index14].Y + rectangleArray[index14].Height) + { + rectangle.X = rectangleArray[index15].X; + if (index14 == 0) + { + if (num2 > 0) + rectangle.X += (int) ((double) rectangleArray[index15].Width * 0.8); + else + rectangle.X += (int) ((double) rectangleArray[index15].Width * 0.2); + } + else if (rectangleArray[index15].X < rectangleArray[index14].X) + rectangle.X += (int) ((double) rectangleArray[index15].Width * 0.2); + else + rectangle.X += (int) ((double) rectangleArray[index15].Width * 0.8); + rectangle.Y = rectangleArray[index15].Y; + } + else + { + rectangle.X = (rectangleArray[index14].X + rectangleArray[index14].Width / 2 + rectangleArray[index15].X + rectangleArray[index15].Width / 2) / 2; + rectangle.Y = (int) ((double) rectangleArray[index15].Y + (double) rectangleArray[index15].Height * 0.8); + } + int x5 = rectangle.X; + int y5 = rectangle.Y; + bool flag2 = true; + while (flag2) + { + int destX = WorldGen.genRand.Next(x5 - 6, x5 + 7); + int destY = WorldGen.genRand.Next(y5 - 6, y5 + 7); + templePath = WorldGen.templePather(templePath, destX, destY); + if ((double) templePath.X == (double) destX && (double) templePath.Y == (double) destY) + flag2 = false; + } + } + else + { + int index16 = index14 + 1; + int num32 = (rectangleArray[index14].X + rectangleArray[index14].Width / 2 + rectangleArray[index16].X + rectangleArray[index16].Width / 2) / 2; + int num33 = (rectangleArray[index14].Y + rectangleArray[index14].Height / 2 + rectangleArray[index16].Y + rectangleArray[index16].Height / 2) / 2; + bool flag3 = true; + while (flag3) + { + int destX = WorldGen.genRand.Next(num32 - 6, num32 + 7); + int destY = WorldGen.genRand.Next(num33 - 6, num33 + 7); + templePath = WorldGen.templePather(templePath, destX, destY); + if ((double) templePath.X == (double) destX && (double) templePath.Y == (double) destY) + flag3 = false; + } + } + } + } + int num34 = Main.maxTilesX - 20; + int num35 = 20; + int num36 = Main.maxTilesY - 20; + int num37 = 20; + for (int index = 0; index < maxValue; ++index) + { + if (rectangleArray[index].X < num34) + num34 = rectangleArray[index].X; + if (rectangleArray[index].X + rectangleArray[index].Width > num35) + num35 = rectangleArray[index].X + rectangleArray[index].Width; + if (rectangleArray[index].Y < num36) + num36 = rectangleArray[index].Y; + if (rectangleArray[index].Y + rectangleArray[index].Height > num37) + num37 = rectangleArray[index].Y + rectangleArray[index].Height; + } + int num38 = num34 - 10; + int num39 = num35 + 10; + int num40 = num36 - 10; + int num41 = num37 + 10; + for (int x6 = num38; x6 < num39; ++x6) + { + for (int y6 = num40; y6 < num41; ++y6) + WorldGen.outerTempled(x6, y6); + } + for (int x7 = num39; x7 >= num38; --x7) + { + for (int y7 = num40; y7 < num41 / 2; ++y7) + WorldGen.outerTempled(x7, y7); + } + for (int y8 = num40; y8 < num41; ++y8) + { + for (int x8 = num38; x8 < num39; ++x8) + WorldGen.outerTempled(x8, y8); + } + for (int y9 = num41; y9 >= num40; --y9) + { + for (int x9 = num38; x9 < num39; ++x9) + WorldGen.outerTempled(x9, y9); + } + int num42 = -num3; + Vector2 vector2 = new Vector2((float) num4, (float) num5); + int num43 = WorldGen.genRand.Next(2, 5); + bool flag4 = true; + int num44 = 0; + int num45 = WorldGen.genRand.Next(9, 14); + while (flag4) + { + ++num44; + if (num44 >= num45) + { + num44 = 0; + --vector2.Y; + } + vector2.X += (float) num42; + int x10 = (int) vector2.X; + flag4 = false; + for (int index = (int) vector2.Y - num43; (double) index < (double) vector2.Y + (double) num43; ++index) + { + if (Main.tile[x10, index].wall == (ushort) 87 || Main.tile[x10, index].active() && Main.tile[x10, index].type == (ushort) 226) + flag4 = true; + if (Main.tile[x10, index].active() && Main.tile[x10, index].type == (ushort) 226) + { + Main.tile[x10, index].active(false); + Main.tile[x10, index].wall = (ushort) 87; + } + } + } + int i1 = num4; + int index17 = num5; + while (!Main.tile[i1, index17].active()) + ++index17; + int j1 = index17 - 4; + int index18 = j1; + while (Main.tile[i1, index18].active() && Main.tile[i1, index18].type == (ushort) 226 || Main.tile[i1, index18].wall == (ushort) 87) + --index18; + int num46 = index18 + 2; + for (int index19 = i1 - 1; index19 <= i1 + 1; ++index19) + { + for (int index20 = num46; index20 <= j1; ++index20) + { + Main.tile[index19, index20].active(true); + Main.tile[index19, index20].type = (ushort) 226; + Main.tile[index19, index20].liquid = (byte) 0; + Main.tile[index19, index20].slope((byte) 0); + Main.tile[index19, index20].halfBrick(false); + } + } + for (int index21 = i1 - 4; index21 <= i1 + 4; ++index21) + { + for (int index22 = j1 - 1; index22 < j1 + 3; ++index22) + { + Main.tile[index21, index22].active(false); + Main.tile[index21, index22].wall = (ushort) 87; + } + } + for (int index23 = i1 - 1; index23 <= i1 + 1; ++index23) + { + for (int index24 = j1 - 5; index24 <= j1 + 8; ++index24) + { + Main.tile[index23, index24].active(true); + Main.tile[index23, index24].type = (ushort) 226; + Main.tile[index23, index24].liquid = (byte) 0; + Main.tile[index23, index24].slope((byte) 0); + Main.tile[index23, index24].halfBrick(false); + } + } + for (int index25 = i1 - 3; index25 <= i1 + 3; ++index25) + { + for (int index26 = j1 - 2; index26 < j1 + 3; ++index26) + { + if (index26 >= j1 || index25 < num4 - 1 || index25 > num4 + 1) + { + Main.tile[index25, index26].active(false); + Main.tile[index25, index26].wall = (ushort) 87; + } + } + } + WorldGen.PlaceTile(i1, j1, 10, true, style: 11); + for (int x11 = num38; x11 < num39; ++x11) + { + for (int y10 = num40; y10 < num41; ++y10) + WorldGen.templeCleaner(x11, y10); + } + for (int y11 = num41; y11 >= num40; --y11) + { + for (int x12 = num39; x12 >= num38; --x12) + WorldGen.templeCleaner(x12, y11); + } + for (int index27 = num38; index27 < num39; ++index27) + { + for (int index28 = num40; index28 < num41; ++index28) + { + bool flag5 = true; + for (int index29 = index27 - 1; index29 <= index27 + 1; ++index29) + { + for (int index30 = index28 - 1; index30 <= index28 + 1; ++index30) + { + if ((!Main.tile[index29, index30].active() || Main.tile[index29, index30].type != (ushort) 226) && Main.tile[index29, index30].wall != (ushort) 87) + { + flag5 = false; + break; + } + } + } + if (flag5) + Main.tile[index27, index28].wall = (ushort) 87; + } + } + int num47 = 0; + Microsoft.Xna.Framework.Rectangle rectangle1 = rectangleArray[maxValue - 1]; + int num48 = rectangle1.Width / 2; + int num49 = rectangle1.Height / 2; + do + { + ++num47; + int i2 = rectangle1.X + num48 + 15 - WorldGen.genRand.Next(30); + int j2 = rectangle1.Y + num49 + 15 - WorldGen.genRand.Next(30); + WorldGen.PlaceTile(i2, j2, 237); + if (Main.tile[i2, j2].type == (ushort) 237) + { + WorldGen.lAltarX = i2 - (int) Main.tile[i2, j2].frameX / 18; + WorldGen.lAltarY = j2 - (int) Main.tile[i2, j2].frameY / 18; + goto label_296; + } + } + while (num47 < 1000); + int num50 = rectangle1.X + num48; + int num51 = rectangle1.Y + num49; + int index31 = num50 + WorldGen.genRand.Next(-10, 11); + int index32 = num51 + WorldGen.genRand.Next(-10, 11); + while (!Main.tile[index31, index32].active()) + ++index32; + Main.tile[index31 - 1, index32].active(true); + Main.tile[index31 - 1, index32].slope((byte) 0); + Main.tile[index31 - 1, index32].halfBrick(false); + Main.tile[index31 - 1, index32].type = (ushort) 226; + Main.tile[index31, index32].active(true); + Main.tile[index31, index32].slope((byte) 0); + Main.tile[index31, index32].halfBrick(false); + Main.tile[index31, index32].type = (ushort) 226; + Main.tile[index31 + 1, index32].active(true); + Main.tile[index31 + 1, index32].slope((byte) 0); + Main.tile[index31 + 1, index32].halfBrick(false); + Main.tile[index31 + 1, index32].type = (ushort) 226; + int num52 = index32 - 2; + int num53 = index31 - 1; + for (int index33 = -1; index33 <= 3; ++index33) + { + for (int index34 = -1; index34 <= 1; ++index34) + { + x = num53 + index33; + y = num52 + index34; + Main.tile[x, y].active(false); + } + } + WorldGen.lAltarX = num53; + WorldGen.lAltarY = num52; + for (int index35 = 0; index35 <= 2; ++index35) + { + for (int index36 = 0; index36 <= 1; ++index36) + { + x = num53 + index35; + y = num52 + index36; + Main.tile[x, y].active(true); + Main.tile[x, y].type = (ushort) 237; + Main.tile[x, y].frameX = (short) (index35 * 18); + Main.tile[x, y].frameY = (short) (index36 * 18); + } + } + for (int index37 = 0; index37 <= 2; ++index37) + { + for (int index38 = 0; index38 <= 1; ++index38) + { + x = num53 + index37; + y = num52 + index38; + WorldGen.SquareTileFrame(x, y); + } + } +label_296: + float num54 = (float) maxValue * 1.1f * (float) (1.0 + (double) WorldGen.genRand.Next(-25, 26) * 0.00999999977648258); + if (WorldGen.drunkWorldGen) + num54 *= 1.5f; + int num55 = 0; + while ((double) num54 > 0.0) + { + ++num55; + int index39 = WorldGen.genRand.Next(maxValue); + int index40 = WorldGen.genRand.Next(rectangleArray[index39].X, rectangleArray[index39].X + rectangleArray[index39].Width); + int index41 = WorldGen.genRand.Next(rectangleArray[index39].Y, rectangleArray[index39].Y + rectangleArray[index39].Height); + if (Main.tile[index40, index41].wall == (ushort) 87 && !Main.tile[index40, index41].active()) + { + bool flag6 = false; + if (WorldGen.genRand.Next(2) == 0) + { + int num56 = 1; + if (WorldGen.genRand.Next(2) == 0) + num56 = -1; + while (!Main.tile[index40, index41].active()) + index41 += num56; + int num57 = index41 - num56; + int num58 = WorldGen.genRand.Next(2); + int num59 = WorldGen.genRand.Next(3, 10); + bool flag7 = true; + for (int index42 = index40 - num59; index42 < index40 + num59; ++index42) + { + for (int index43 = num57 - num59; index43 < num57 + num59; ++index43) + { + if (Main.tile[index42, index43].active() && (Main.tile[index42, index43].type == (ushort) 10 || Main.tile[index42, index43].type == (ushort) 237)) + { + flag7 = false; + break; + } + } + } + if (flag7) + { + for (int i3 = index40 - num59; i3 < index40 + num59; ++i3) + { + for (int j3 = num57 - num59; j3 < num57 + num59; ++j3) + { + if (WorldGen.SolidTile(i3, j3) && Main.tile[i3, j3].type != (ushort) 232 && !WorldGen.SolidTile(i3, j3 - num56)) + { + Main.tile[i3, j3].type = (ushort) 232; + flag6 = true; + if (num58 == 0) + { + Main.tile[i3, j3 - 1].type = (ushort) 232; + Main.tile[i3, j3 - 1].active(true); + if (WorldGen.drunkWorldGen) + { + Main.tile[i3, j3 - 2].type = (ushort) 232; + Main.tile[i3, j3 - 2].active(true); + } + } + else + { + Main.tile[i3, j3 + 1].type = (ushort) 232; + Main.tile[i3, j3 + 1].active(true); + if (WorldGen.drunkWorldGen) + { + Main.tile[i3, j3 + 2].type = (ushort) 232; + Main.tile[i3, j3 + 2].active(true); + } + } + ++num58; + if (num58 > 1) + num58 = 0; + } + } + } + } + if (flag6) + { + num55 = 0; + --num54; + } + } + else + { + int num60 = 1; + if (WorldGen.genRand.Next(2) == 0) + num60 = -1; + while (!Main.tile[index40, index41].active()) + index40 += num60; + int num61 = index40 - num60; + int num62 = WorldGen.genRand.Next(2); + int num63 = WorldGen.genRand.Next(3, 10); + bool flag8 = true; + for (int index44 = num61 - num63; index44 < num61 + num63; ++index44) + { + for (int index45 = index41 - num63; index45 < index41 + num63; ++index45) + { + if (Main.tile[index44, index45].active() && Main.tile[index44, index45].type == (ushort) 10) + { + flag8 = false; + break; + } + } + } + if (flag8) + { + for (int i4 = num61 - num63; i4 < num61 + num63; ++i4) + { + for (int j4 = index41 - num63; j4 < index41 + num63; ++j4) + { + if (WorldGen.SolidTile(i4, j4) && Main.tile[i4, j4].type != (ushort) 232 && !WorldGen.SolidTile(i4 - num60, j4)) + { + Main.tile[i4, j4].type = (ushort) 232; + flag6 = true; + if (num62 == 0) + { + Main.tile[i4 - 1, j4].type = (ushort) 232; + Main.tile[i4 - 1, j4].active(true); + if (WorldGen.drunkWorldGen) + { + Main.tile[i4 - 2, j4].type = (ushort) 232; + Main.tile[i4 - 2, j4].active(true); + } + } + else + { + Main.tile[i4 + 1, j4].type = (ushort) 232; + Main.tile[i4 + 1, j4].active(true); + if (WorldGen.drunkWorldGen) + { + Main.tile[i4 - 2, j4].type = (ushort) 232; + Main.tile[i4 - 2, j4].active(true); + } + } + ++num62; + if (num62 > 1) + num62 = 0; + } + } + } + } + if (flag6) + { + num55 = 0; + --num54; + } + } + } + if (num55 > 1000) + { + num55 = 0; + --num54; + } + } + WorldGen.tLeft = num38; + WorldGen.tRight = num39; + WorldGen.tTop = num40; + WorldGen.tBottom = num41; + WorldGen.tRooms = maxValue; + } + + public static void templePart2() + { + int tLeft = WorldGen.tLeft; + int tRight = WorldGen.tRight; + int tTop = WorldGen.tTop; + int tBottom = WorldGen.tBottom; + int tRooms = WorldGen.tRooms; + float num1 = (float) tRooms * 1.9f * (float) (1.0 + (double) WorldGen.genRand.Next(-15, 16) * 0.00999999977648258); + int num2 = 0; + while ((double) num1 > 0.0) + { + int x2 = WorldGen.genRand.Next(tLeft, tRight); + int y2 = WorldGen.genRand.Next(tTop, tBottom); + if (Main.tile[x2, y2].wall == (ushort) 87 && !Main.tile[x2, y2].active()) + { + if (WorldGen.mayanTrap(x2, y2)) + { + --num1; + num2 = 0; + } + else + ++num2; + } + else + ++num2; + if (num2 > 100) + { + num2 = 0; + --num1; + } + } + Main.tileSolid[232] = false; + float num3 = (float) tRooms * 0.35f * (float) (1.0 + (double) WorldGen.genRand.Next(-15, 16) * 0.00999999977648258); + int contain = 1293; + int num4 = 0; + while ((double) num3 > 0.0) + { + int i = WorldGen.genRand.Next(tLeft, tRight); + int j = WorldGen.genRand.Next(tTop, tBottom); + if (Main.tile[i, j].wall == (ushort) 87 && !Main.tile[i, j].active() && WorldGen.AddBuriedChest(i, j, contain, true, 16)) + { + --num3; + num4 = 0; + } + ++num4; + if (num4 > 10000) + break; + } + float num5 = (float) tRooms * 1.25f * (float) (1.0 + (double) WorldGen.genRand.Next(-25, 36) * 0.00999999977648258); + int num6 = 0; + while ((double) num5 > 0.0) + { + ++num6; + int index1 = WorldGen.genRand.Next(tLeft, tRight); + int index2 = WorldGen.genRand.Next(tTop, tBottom); + if (Main.tile[index1, index2].wall == (ushort) 87 && !Main.tile[index1, index2].active()) + { + int i = index1; + int index3 = index2; + while (!Main.tile[i, index3].active()) + { + ++index3; + if (index3 > tBottom) + break; + } + int j = index3 - 1; + if (j <= tBottom) + { + WorldGen.PlaceTile(i, j, 105, true, style: WorldGen.genRand.Next(43, 46)); + if (Main.tile[i, j].type == (ushort) 105) + --num5; + } + } + } + float num7 = (float) tRooms * 1.35f * (float) (1.0 + (double) WorldGen.genRand.Next(-15, 26) * 0.00999999977648258); + int num8 = 0; + while ((double) num7 > 0.0) + { + ++num8; + int index4 = WorldGen.genRand.Next(tLeft, tRight); + int index5 = WorldGen.genRand.Next(tTop, tBottom); + if (Main.tile[index4, index5].wall == (ushort) 87 && !Main.tile[index4, index5].active()) + { + int i = index4; + int index6 = index5; + while (!Main.tile[i, index6].active()) + { + ++index6; + if (index6 > tBottom) + break; + } + int j = index6 - 1; + if (j <= tBottom) + { + switch (WorldGen.genRand.Next(3)) + { + case 0: + WorldGen.PlaceTile(i, j, 18, true, style: 10); + if (Main.tile[i, j].type == (ushort) 18) + { + --num7; + break; + } + break; + case 1: + WorldGen.PlaceTile(i, j, 14, true, style: 9); + if (Main.tile[i, j].type == (ushort) 14) + { + --num7; + break; + } + break; + case 2: + WorldGen.PlaceTile(i, j, 15, true, style: 12); + if (Main.tile[i, j].type == (ushort) 15) + { + --num7; + break; + } + break; + } + } + } + if (num8 > 10000) + break; + } + Main.tileSolid[232] = true; + } + + public static bool nearPicture(int x, int y) + { + for (int index1 = x - 4; index1 <= x + 3; ++index1) + { + for (int index2 = y - 3; index2 <= y + 2; ++index2) + { + if (Main.tile[index1, index2].active()) + return true; + } + } + return false; + } + + public static bool nearPicture2(int x, int y) + { + if (Main.tile[x, y].wall != (ushort) 7 && Main.tile[x, y].wall != (ushort) 8 && Main.tile[x, y].wall != (ushort) 9) + { + for (int index1 = x - 8; index1 <= x + 8; ++index1) + { + for (int index2 = y - 5; index2 <= y + 5; ++index2) + { + if (Main.tile[index1, index2].active() && (Main.tile[index1, index2].type == (ushort) 240 || Main.tile[index1, index2].type == (ushort) 241 || Main.tile[index1, index2].type == (ushort) 242)) + return true; + } + } + } + else + { + for (int index3 = x - 15; index3 <= x + 15; ++index3) + { + for (int index4 = y - 10; index4 <= y + 10; ++index4) + { + if (Main.tile[index3, index4].active() && (Main.tile[index3, index4].type == (ushort) 240 || Main.tile[index3, index4].type == (ushort) 241 || Main.tile[index3, index4].type == (ushort) 242)) + return true; + } + } + } + return false; + } + + public static void MakeDungeon(int x, int y) + { + WorldGen.dEnteranceX = 0; + WorldGen.numDRooms = 0; + WorldGen.numDDoors = 0; + WorldGen.numDungeonPlatforms = 0; + int num1 = WorldGen.genRand.Next(3); + WorldGen.genRand.Next(3); + ushort tileType; + int wallType1; + switch (num1) + { + case 0: + tileType = (ushort) 41; + wallType1 = 7; + WorldGen.crackedType = (ushort) 481; + break; + case 1: + tileType = (ushort) 43; + wallType1 = 8; + WorldGen.crackedType = (ushort) 482; + break; + default: + tileType = (ushort) 44; + wallType1 = 9; + WorldGen.crackedType = (ushort) 483; + break; + } + Main.tileSolid[(int) WorldGen.crackedType] = false; + WorldGen.dungeonLake = true; + WorldGen.numDDoors = 0; + WorldGen.numDungeonPlatforms = 0; + WorldGen.numDRooms = 0; + WorldGen.dungeonX = x; + WorldGen.dungeonY = y; + WorldGen.dMinX = x; + WorldGen.dMaxX = x; + WorldGen.dMinY = y; + WorldGen.dMaxY = y; + WorldGen.dxStrength1 = (double) WorldGen.genRand.Next(25, 30); + WorldGen.dyStrength1 = (double) WorldGen.genRand.Next(20, 25); + WorldGen.dxStrength2 = (double) WorldGen.genRand.Next(35, 50); + WorldGen.dyStrength2 = (double) WorldGen.genRand.Next(10, 15); + float num2 = (float) (Main.maxTilesX / 60); + float num3 = num2 + (float) WorldGen.genRand.Next(0, (int) ((double) num2 / 3.0)); + float num4 = num3; + int num5 = 5; + WorldGen.DungeonRoom(WorldGen.dungeonX, WorldGen.dungeonY, tileType, wallType1); + while ((double) num3 > 0.0) + { + if (WorldGen.dungeonX < WorldGen.dMinX) + WorldGen.dMinX = WorldGen.dungeonX; + if (WorldGen.dungeonX > WorldGen.dMaxX) + WorldGen.dMaxX = WorldGen.dungeonX; + if (WorldGen.dungeonY > WorldGen.dMaxY) + WorldGen.dMaxY = WorldGen.dungeonY; + --num3; + Main.statusText = Lang.gen[58].Value + " " + (object) (int) (((double) num4 - (double) num3) / (double) num4 * 60.0) + "%"; + if (num5 > 0) + --num5; + if (num5 == 0 & WorldGen.genRand.Next(3) == 0) + { + num5 = 5; + if (WorldGen.genRand.Next(2) == 0) + { + int dungeonX = WorldGen.dungeonX; + int dungeonY = WorldGen.dungeonY; + WorldGen.DungeonHalls(WorldGen.dungeonX, WorldGen.dungeonY, tileType, wallType1); + if (WorldGen.genRand.Next(2) == 0) + WorldGen.DungeonHalls(WorldGen.dungeonX, WorldGen.dungeonY, tileType, wallType1); + WorldGen.DungeonRoom(WorldGen.dungeonX, WorldGen.dungeonY, tileType, wallType1); + WorldGen.dungeonX = dungeonX; + WorldGen.dungeonY = dungeonY; + } + else + WorldGen.DungeonRoom(WorldGen.dungeonX, WorldGen.dungeonY, tileType, wallType1); + } + else + WorldGen.DungeonHalls(WorldGen.dungeonX, WorldGen.dungeonY, tileType, wallType1); + } + WorldGen.DungeonRoom(WorldGen.dungeonX, WorldGen.dungeonY, tileType, wallType1); + int num6 = WorldGen.dRoomX[0]; + int num7 = WorldGen.dRoomY[0]; + for (int index = 0; index < WorldGen.numDRooms; ++index) + { + if (WorldGen.dRoomY[index] < num7) + { + num6 = WorldGen.dRoomX[index]; + num7 = WorldGen.dRoomY[index]; + } + } + WorldGen.dungeonX = num6; + WorldGen.dungeonY = num7; + WorldGen.dEnteranceX = num6; + WorldGen.dSurface = false; + int num8 = 5; + if (WorldGen.drunkWorldGen) + WorldGen.dSurface = true; + while (!WorldGen.dSurface) + { + if (num8 > 0) + --num8; + if (num8 == 0 && WorldGen.genRand.Next(5) == 0 && (double) WorldGen.dungeonY > Main.worldSurface + 100.0) + { + num8 = 10; + int dungeonX = WorldGen.dungeonX; + int dungeonY = WorldGen.dungeonY; + WorldGen.DungeonHalls(WorldGen.dungeonX, WorldGen.dungeonY, tileType, wallType1, true); + WorldGen.DungeonRoom(WorldGen.dungeonX, WorldGen.dungeonY, tileType, wallType1); + WorldGen.dungeonX = dungeonX; + WorldGen.dungeonY = dungeonY; + } + WorldGen.DungeonStairs(WorldGen.dungeonX, WorldGen.dungeonY, tileType, wallType1); + } + WorldGen.DungeonEnt(WorldGen.dungeonX, WorldGen.dungeonY, tileType, wallType1); + Main.statusText = Lang.gen[58].Value + " 65%"; + int num9 = Main.maxTilesX * 2; + int i1; + int j1; + int num10; + int wallType2; + for (int index = 0; index < num9; index = (!WorldGen.DungeonPitTrap(i1, j1, (ushort) num10, wallType2) ? index + 1 : index + 1500) + 1) + { + i1 = WorldGen.genRand.Next(WorldGen.dMinX, WorldGen.dMaxX); + int minValue = WorldGen.dMinY; + if ((double) minValue < Main.worldSurface) + minValue = (int) Main.worldSurface; + j1 = WorldGen.genRand.Next(minValue, WorldGen.dMaxY); + num10 = (int) tileType; + wallType2 = wallType1; + } + for (int index1 = 0; index1 < WorldGen.numDRooms; ++index1) + { + for (int index2 = WorldGen.dRoomL[index1]; index2 <= WorldGen.dRoomR[index1]; ++index2) + { + if (!Main.tile[index2, WorldGen.dRoomT[index1] - 1].active()) + { + WorldGen.dungeonPlatformX[WorldGen.numDungeonPlatforms] = index2; + WorldGen.dungeonPlatformY[WorldGen.numDungeonPlatforms] = WorldGen.dRoomT[index1] - 1; + ++WorldGen.numDungeonPlatforms; + break; + } + } + for (int index3 = WorldGen.dRoomL[index1]; index3 <= WorldGen.dRoomR[index1]; ++index3) + { + if (!Main.tile[index3, WorldGen.dRoomB[index1] + 1].active()) + { + WorldGen.dungeonPlatformX[WorldGen.numDungeonPlatforms] = index3; + WorldGen.dungeonPlatformY[WorldGen.numDungeonPlatforms] = WorldGen.dRoomB[index1] + 1; + ++WorldGen.numDungeonPlatforms; + break; + } + } + for (int index4 = WorldGen.dRoomT[index1]; index4 <= WorldGen.dRoomB[index1]; ++index4) + { + if (!Main.tile[WorldGen.dRoomL[index1] - 1, index4].active()) + { + WorldGen.DDoorX[WorldGen.numDDoors] = WorldGen.dRoomL[index1] - 1; + WorldGen.DDoorY[WorldGen.numDDoors] = index4; + WorldGen.DDoorPos[WorldGen.numDDoors] = -1; + ++WorldGen.numDDoors; + break; + } + } + for (int index5 = WorldGen.dRoomT[index1]; index5 <= WorldGen.dRoomB[index1]; ++index5) + { + if (!Main.tile[WorldGen.dRoomR[index1] + 1, index5].active()) + { + WorldGen.DDoorX[WorldGen.numDDoors] = WorldGen.dRoomR[index1] + 1; + WorldGen.DDoorY[WorldGen.numDDoors] = index5; + WorldGen.DDoorPos[WorldGen.numDDoors] = 1; + ++WorldGen.numDDoors; + break; + } + } + } + Main.statusText = Lang.gen[58].Value + " 70%"; + int num11 = 0; + int num12 = 1000; + int num13 = 0; + int num14 = Main.maxTilesX / 100; + if (WorldGen.getGoodWorldGen) + num14 *= 3; + while (num13 < num14) + { + ++num11; + int index6 = WorldGen.genRand.Next(WorldGen.dMinX, WorldGen.dMaxX); + int index7 = WorldGen.genRand.Next((int) Main.worldSurface + 25, WorldGen.dMaxY); + if (WorldGen.drunkWorldGen) + index7 = WorldGen.genRand.Next(WorldGen.dungeonY + 25, WorldGen.dMaxY); + int num15 = index6; + if ((int) Main.tile[index6, index7].wall == wallType1 && !Main.tile[index6, index7].active()) + { + int num16 = 1; + if (WorldGen.genRand.Next(2) == 0) + num16 = -1; + while (!Main.tile[index6, index7].active()) + index7 += num16; + if (Main.tile[index6 - 1, index7].active() && Main.tile[index6 + 1, index7].active() && (int) Main.tile[index6 - 1, index7].type != (int) WorldGen.crackedType && !Main.tile[index6 - 1, index7 - num16].active() && !Main.tile[index6 + 1, index7 - num16].active()) + { + ++num13; + for (int index8 = WorldGen.genRand.Next(5, 13); Main.tile[index6 - 1, index7].active() && (int) Main.tile[index6 - 1, index7].type != (int) WorldGen.crackedType && Main.tile[index6, index7 + num16].active() && Main.tile[index6, index7].active() && !Main.tile[index6, index7 - num16].active() && index8 > 0; --index8) + { + Main.tile[index6, index7].type = (ushort) 48; + if (!Main.tile[index6 - 1, index7 - num16].active() && !Main.tile[index6 + 1, index7 - num16].active()) + { + Main.tile[index6, index7 - num16].Clear(TileDataType.Slope); + Main.tile[index6, index7 - num16].type = (ushort) 48; + Main.tile[index6, index7 - num16].active(true); + Main.tile[index6, index7 - num16 * 2].Clear(TileDataType.Slope); + Main.tile[index6, index7 - num16 * 2].type = (ushort) 48; + Main.tile[index6, index7 - num16 * 2].active(true); + } + --index6; + } + int num17 = WorldGen.genRand.Next(5, 13); + for (int index9 = num15 + 1; Main.tile[index9 + 1, index7].active() && (int) Main.tile[index9 + 1, index7].type != (int) WorldGen.crackedType && Main.tile[index9, index7 + num16].active() && Main.tile[index9, index7].active() && !Main.tile[index9, index7 - num16].active() && num17 > 0; --num17) + { + Main.tile[index9, index7].type = (ushort) 48; + if (!Main.tile[index9 - 1, index7 - num16].active() && !Main.tile[index9 + 1, index7 - num16].active()) + { + Main.tile[index9, index7 - num16].Clear(TileDataType.Slope); + Main.tile[index9, index7 - num16].type = (ushort) 48; + Main.tile[index9, index7 - num16].active(true); + Main.tile[index9, index7 - num16 * 2].Clear(TileDataType.Slope); + Main.tile[index9, index7 - num16 * 2].type = (ushort) 48; + Main.tile[index9, index7 - num16 * 2].active(true); + } + ++index9; + } + } + } + if (num11 > num12) + { + num11 = 0; + ++num13; + } + } + int num18 = 0; + int num19 = 1000; + int num20 = 0; + Main.statusText = Lang.gen[58].Value + " 75%"; + while (num20 < num14) + { + ++num18; + int index10 = WorldGen.genRand.Next(WorldGen.dMinX, WorldGen.dMaxX); + int index11 = WorldGen.genRand.Next((int) Main.worldSurface + 25, WorldGen.dMaxY); + int num21 = index11; + if ((int) Main.tile[index10, index11].wall == wallType1 && !Main.tile[index10, index11].active()) + { + int num22 = 1; + if (WorldGen.genRand.Next(2) == 0) + num22 = -1; + while (index10 > 5 && index10 < Main.maxTilesX - 5 && !Main.tile[index10, index11].active()) + index10 += num22; + if (Main.tile[index10, index11 - 1].active() && Main.tile[index10, index11 + 1].active() && (int) Main.tile[index10, index11 - 1].type != (int) WorldGen.crackedType && !Main.tile[index10 - num22, index11 - 1].active() && !Main.tile[index10 - num22, index11 + 1].active()) + { + ++num20; + for (int index12 = WorldGen.genRand.Next(5, 13); Main.tile[index10, index11 - 1].active() && (int) Main.tile[index10, index11 - 1].type != (int) WorldGen.crackedType && Main.tile[index10 + num22, index11].active() && Main.tile[index10, index11].active() && !Main.tile[index10 - num22, index11].active() && index12 > 0; --index12) + { + Main.tile[index10, index11].type = (ushort) 48; + if (!Main.tile[index10 - num22, index11 - 1].active() && !Main.tile[index10 - num22, index11 + 1].active()) + { + Main.tile[index10 - num22, index11].type = (ushort) 48; + Main.tile[index10 - num22, index11].active(true); + Main.tile[index10 - num22, index11].Clear(TileDataType.Slope); + Main.tile[index10 - num22 * 2, index11].type = (ushort) 48; + Main.tile[index10 - num22 * 2, index11].active(true); + Main.tile[index10 - num22 * 2, index11].Clear(TileDataType.Slope); + } + --index11; + } + int num23 = WorldGen.genRand.Next(5, 13); + for (int index13 = num21 + 1; Main.tile[index10, index13 + 1].active() && (int) Main.tile[index10, index13 + 1].type != (int) WorldGen.crackedType && Main.tile[index10 + num22, index13].active() && Main.tile[index10, index13].active() && !Main.tile[index10 - num22, index13].active() && num23 > 0; --num23) + { + Main.tile[index10, index13].type = (ushort) 48; + if (!Main.tile[index10 - num22, index13 - 1].active() && !Main.tile[index10 - num22, index13 + 1].active()) + { + Main.tile[index10 - num22, index13].type = (ushort) 48; + Main.tile[index10 - num22, index13].active(true); + Main.tile[index10 - num22, index13].Clear(TileDataType.Slope); + Main.tile[index10 - num22 * 2, index13].type = (ushort) 48; + Main.tile[index10 - num22 * 2, index13].active(true); + Main.tile[index10 - num22 * 2, index13].Clear(TileDataType.Slope); + } + ++index13; + } + } + } + if (num18 > num19) + { + num18 = 0; + ++num20; + } + } + Main.statusText = Lang.gen[58].Value + " 80%"; + for (int index14 = 0; index14 < WorldGen.numDDoors; ++index14) + { + int num24 = WorldGen.DDoorX[index14] - 10; + int num25 = WorldGen.DDoorX[index14] + 10; + int num26 = 100; + int num27 = 0; + for (int index15 = num24; index15 < num25; ++index15) + { + bool flag1 = true; + int index16 = WorldGen.DDoorY[index14]; + while (index16 > 10 && !Main.tile[index15, index16].active()) + --index16; + if (!Main.tileDungeon[(int) Main.tile[index15, index16].type]) + flag1 = false; + int num28 = index16; + int index17 = WorldGen.DDoorY[index14]; + while (!Main.tile[index15, index17].active()) + ++index17; + if (!Main.tileDungeon[(int) Main.tile[index15, index17].type]) + flag1 = false; + int num29 = index17; + if (num29 - num28 >= 3) + { + int num30 = index15 - 20; + int num31 = index15 + 20; + int num32 = num29 - 10; + int num33 = num29 + 10; + for (int index18 = num30; index18 < num31; ++index18) + { + for (int index19 = num32; index19 < num33; ++index19) + { + if (Main.tile[index18, index19].active() && Main.tile[index18, index19].type == (ushort) 10) + { + flag1 = false; + break; + } + } + } + if (flag1) + { + for (int index20 = num29 - 3; index20 < num29; ++index20) + { + for (int index21 = index15 - 3; index21 <= index15 + 3; ++index21) + { + if (Main.tile[index21, index20].active()) + { + flag1 = false; + break; + } + } + } + } + if (flag1 && num29 - num28 < 20) + { + bool flag2 = false; + if (WorldGen.DDoorPos[index14] == 0 && num29 - num28 < num26) + flag2 = true; + if (WorldGen.DDoorPos[index14] == -1 && index15 > num27) + flag2 = true; + if (WorldGen.DDoorPos[index14] == 1 && (index15 < num27 || num27 == 0)) + flag2 = true; + if (flag2) + { + num27 = index15; + num26 = num29 - num28; + } + } + } + } + if (num26 < 20) + { + int i2 = num27; + int index22 = WorldGen.DDoorY[index14]; + int index23 = index22; + for (; !Main.tile[i2, index22].active(); ++index22) + Main.tile[i2, index22].active(false); + while (!Main.tile[i2, index23].active()) + --index23; + int j2 = index22 - 1; + int num34 = index23 + 1; + for (int index24 = num34; index24 < j2 - 2; ++index24) + { + Main.tile[i2, index24].Clear(TileDataType.Slope); + Main.tile[i2, index24].active(true); + Main.tile[i2, index24].type = tileType; + } + int style = 13; + if (WorldGen.genRand.Next(3) == 0) + { + switch (wallType1) + { + case 7: + style = 16; + break; + case 8: + style = 17; + break; + case 9: + style = 18; + break; + } + } + WorldGen.PlaceTile(i2, j2, 10, true, style: style); + int index25 = i2 - 1; + int index26 = j2 - 3; + while (!Main.tile[index25, index26].active()) + --index26; + if (j2 - index26 < j2 - num34 + 5 && Main.tileDungeon[(int) Main.tile[index25, index26].type]) + { + for (int index27 = j2 - 4 - WorldGen.genRand.Next(3); index27 > index26; --index27) + { + Main.tile[index25, index27].Clear(TileDataType.Slope); + Main.tile[index25, index27].active(true); + Main.tile[index25, index27].type = tileType; + } + } + int index28 = index25 + 2; + int index29 = j2 - 3; + while (!Main.tile[index28, index29].active()) + --index29; + if (j2 - index29 < j2 - num34 + 5 && Main.tileDungeon[(int) Main.tile[index28, index29].type]) + { + for (int index30 = j2 - 4 - WorldGen.genRand.Next(3); index30 > index29; --index30) + { + Main.tile[index28, index30].active(true); + Main.tile[index28, index30].Clear(TileDataType.Slope); + Main.tile[index28, index30].type = tileType; + } + } + int index31 = j2 + 1; + int num35 = index28 - 1; + Main.tile[num35 - 1, index31].active(true); + Main.tile[num35 - 1, index31].type = tileType; + Main.tile[num35 - 1, index31].Clear(TileDataType.Slope); + Main.tile[num35 + 1, index31].active(true); + Main.tile[num35 + 1, index31].type = tileType; + Main.tile[num35 + 1, index31].Clear(TileDataType.Slope); + } + } + int[] roomWall = new int[3]; + switch (wallType1) + { + case 7: + roomWall[0] = 7; + roomWall[1] = 94; + roomWall[2] = 95; + break; + case 9: + roomWall[0] = 9; + roomWall[1] = 96; + roomWall[2] = 97; + break; + default: + roomWall[0] = 8; + roomWall[1] = 98; + roomWall[2] = 99; + break; + } + for (int index32 = 0; index32 < 5; ++index32) + { + for (int index33 = 0; index33 < 3; ++index33) + { + int num36 = WorldGen.genRand.Next(40, 240); + int num37 = WorldGen.genRand.Next(WorldGen.dMinX, WorldGen.dMaxX); + int num38 = WorldGen.genRand.Next(WorldGen.dMinY, WorldGen.dMaxY); + for (int x1 = num37 - num36; x1 < num37 + num36; ++x1) + { + for (int y1 = num38 - num36; y1 < num38 + num36; ++y1) + { + if ((double) y1 > Main.worldSurface) + { + double num39 = (double) Math.Abs(num37 - x1); + float num40 = (float) Math.Abs(num38 - y1); + if (Math.Sqrt(num39 * num39 + (double) num40 * (double) num40) < (double) num36 * 0.4 && Main.wallDungeon[(int) Main.tile[x1, y1].wall]) + WorldGen.Spread.WallDungeon(x1, y1, roomWall[index33]); + } + } + } + } + } + Main.statusText = Lang.gen[58].Value + " 85%"; + for (int index34 = 0; index34 < WorldGen.numDungeonPlatforms; ++index34) + { + int index35 = WorldGen.dungeonPlatformX[index34]; + int num41 = WorldGen.dungeonPlatformY[index34]; + int num42 = Main.maxTilesX; + int num43 = 10; + if ((double) num41 < Main.worldSurface + 50.0) + num43 = 20; + for (int index36 = num41 - 5; index36 <= num41 + 5; ++index36) + { + int index37 = index35; + int index38 = index35; + bool flag3 = false; + if (Main.tile[index37, index36].active()) + { + flag3 = true; + } + else + { + while (!Main.tile[index37, index36].active()) + { + --index37; + if (!Main.tileDungeon[(int) Main.tile[index37, index36].type] || index37 == 0) + { + flag3 = true; + break; + } + } + while (!Main.tile[index38, index36].active()) + { + ++index38; + if (!Main.tileDungeon[(int) Main.tile[index38, index36].type] || index38 == Main.maxTilesX - 1) + { + flag3 = true; + break; + } + } + } + if (!flag3 && index38 - index37 <= num43) + { + bool flag4 = true; + int num44 = index35 - num43 / 2 - 2; + int num45 = index35 + num43 / 2 + 2; + int num46 = index36 - 5; + int num47 = index36 + 5; + for (int index39 = num44; index39 <= num45; ++index39) + { + for (int index40 = num46; index40 <= num47; ++index40) + { + if (Main.tile[index39, index40].active() && Main.tile[index39, index40].type == (ushort) 19) + { + flag4 = false; + break; + } + } + } + for (int index41 = index36 + 3; index41 >= index36 - 5; --index41) + { + if (Main.tile[index35, index41].active()) + { + flag4 = false; + break; + } + } + if (flag4) + { + num42 = index36; + break; + } + } + } + if (num42 > num41 - 10 && num42 < num41 + 10) + { + int i3 = index35; + int j3 = num42; + int i4 = index35 + 1; + for (; !Main.tile[i3, j3].active(); --i3) + { + Main.tile[i3, j3].active(true); + Main.tile[i3, j3].type = (ushort) 19; + Main.tile[i3, j3].Clear(TileDataType.Slope); + switch (wallType1) + { + case 7: + Main.tile[i3, j3].frameY = (short) 108; + break; + case 8: + Main.tile[i3, j3].frameY = (short) 144; + break; + default: + Main.tile[i3, j3].frameY = (short) 126; + break; + } + WorldGen.TileFrame(i3, j3); + } + for (; !Main.tile[i4, j3].active(); ++i4) + { + Main.tile[i4, j3].active(true); + Main.tile[i4, j3].type = (ushort) 19; + Main.tile[i4, j3].Clear(TileDataType.Slope); + switch (wallType1) + { + case 7: + Main.tile[i4, j3].frameY = (short) 108; + break; + case 8: + Main.tile[i4, j3].frameY = (short) 144; + break; + default: + Main.tile[i4, j3].frameY = (short) 126; + break; + } + WorldGen.TileFrame(i4, j3); + } + } + } + int num48 = 5; + if (WorldGen.drunkWorldGen) + num48 = 6; + for (int index = 0; index < num48; ++index) + { + bool flag = false; + while (!flag) + { + int i5 = WorldGen.genRand.Next(WorldGen.dMinX, WorldGen.dMaxX); + int j4 = WorldGen.genRand.Next((int) Main.worldSurface, WorldGen.dMaxY); + if (Main.wallDungeon[(int) Main.tile[i5, j4].wall] && !Main.tile[i5, j4].active()) + { + ushort chestTileType = 21; + int contain = 0; + int Style = 0; + switch (index) + { + case 0: + Style = 23; + contain = 1156; + break; + case 1: + if (!WorldGen.crimson) + { + Style = 24; + contain = 1571; + break; + } + Style = 25; + contain = 1569; + break; + case 2: + Style = 26; + contain = 1260; + break; + case 3: + Style = 27; + contain = 1572; + break; + case 4: + chestTileType = (ushort) 467; + Style = 13; + contain = 4607; + break; + case 5: + if (WorldGen.crimson) + { + Style = 24; + contain = 1571; + break; + } + Style = 25; + contain = 1569; + break; + } + flag = WorldGen.AddBuriedChest(i5, j4, contain, Style: Style, chestTileType: chestTileType); + } + } + } + int[] numArray = new int[3] + { + WorldGen.genRand.Next(9, 13), + WorldGen.genRand.Next(9, 13), + 0 + }; + while (numArray[1] == numArray[0]) + numArray[1] = WorldGen.genRand.Next(9, 13); + numArray[2] = WorldGen.genRand.Next(9, 13); + while (numArray[2] == numArray[0] || numArray[2] == numArray[1]) + numArray[2] = WorldGen.genRand.Next(9, 13); + Main.statusText = Lang.gen[58].Value + " 90%"; + int num49 = 0; + int num50 = 1000; + int num51 = 0; + while (num51 < Main.maxTilesX / 20) + { + ++num49; + int index42 = WorldGen.genRand.Next(WorldGen.dMinX, WorldGen.dMaxX); + int j5 = WorldGen.genRand.Next(WorldGen.dMinY, WorldGen.dMaxY); + bool flag5 = true; + if (Main.wallDungeon[(int) Main.tile[index42, j5].wall] && !Main.tile[index42, j5].active()) + { + int num52 = 1; + if (WorldGen.genRand.Next(2) == 0) + num52 = -1; + while (flag5 && !Main.tile[index42, j5].active()) + { + index42 -= num52; + if (index42 < 5 || index42 > Main.maxTilesX - 5) + flag5 = false; + else if (Main.tile[index42, j5].active() && !Main.tileDungeon[(int) Main.tile[index42, j5].type]) + flag5 = false; + } + if (flag5 && Main.tile[index42, j5].active() && Main.tileDungeon[(int) Main.tile[index42, j5].type] && Main.tile[index42, j5 - 1].active() && Main.tileDungeon[(int) Main.tile[index42, j5 - 1].type] && Main.tile[index42, j5 + 1].active() && Main.tileDungeon[(int) Main.tile[index42, j5 + 1].type]) + { + int i6 = index42 + num52; + for (int index43 = i6 - 3; index43 <= i6 + 3; ++index43) + { + for (int index44 = j5 - 3; index44 <= j5 + 3; ++index44) + { + if (Main.tile[index43, index44].active() && Main.tile[index43, index44].type == (ushort) 19) + { + flag5 = false; + break; + } + } + } + if (flag5 && !Main.tile[i6, j5 - 1].active() & !Main.tile[i6, j5 - 2].active() & !Main.tile[i6, j5 - 3].active()) + { + int index45 = i6; + int num53 = i6; + while (index45 > WorldGen.dMinX && index45 < WorldGen.dMaxX && !Main.tile[index45, j5].active() && !Main.tile[index45, j5 - 1].active() && !Main.tile[index45, j5 + 1].active()) + index45 += num52; + int num54 = Math.Abs(i6 - index45); + bool flag6 = false; + if (WorldGen.genRand.Next(2) == 0) + flag6 = true; + if (num54 > 5) + { + for (int index46 = WorldGen.genRand.Next(1, 4); index46 > 0; --index46) + { + Main.tile[i6, j5].active(true); + Main.tile[i6, j5].Clear(TileDataType.Slope); + Main.tile[i6, j5].type = (ushort) 19; + Main.tile[i6, j5].frameY = (int) Main.tile[i6, j5].wall != roomWall[0] ? ((int) Main.tile[i6, j5].wall != roomWall[1] ? (short) (18 * numArray[2]) : (short) (18 * numArray[1])) : (short) (18 * numArray[0]); + WorldGen.TileFrame(i6, j5); + if (flag6) + { + WorldGen.PlaceTile(i6, j5 - 1, 50, true); + if (WorldGen.genRand.Next(50) == 0 && (double) j5 > (Main.worldSurface + Main.rockLayer) / 2.0 && Main.tile[i6, j5 - 1].type == (ushort) 50) + Main.tile[i6, j5 - 1].frameX = (short) 90; + } + i6 += num52; + } + num49 = 0; + ++num51; + if (!flag6 && WorldGen.genRand.Next(2) == 0) + { + int i7 = num53; + int j6 = j5 - 1; + int Type = 0; + if (WorldGen.genRand.Next(4) == 0) + Type = 1; + switch (Type) + { + case 0: + Type = 13; + break; + case 1: + Type = 49; + break; + } + WorldGen.PlaceTile(i7, j6, Type, true); + if (Main.tile[i7, j6].type == (ushort) 13) + Main.tile[i7, j6].frameX = WorldGen.genRand.Next(2) != 0 ? (short) 36 : (short) 18; + } + } + } + } + } + if (num49 > num50) + { + num49 = 0; + ++num51; + } + } + Main.statusText = Lang.gen[58].Value + " 95%"; + int num55 = 1; + for (int index = 0; index < WorldGen.numDRooms; ++index) + { + int num56 = 0; + while (num56 < 1000) + { + int num57 = (int) ((double) WorldGen.dRoomSize[index] * 0.4); + int i8 = WorldGen.dRoomX[index] + WorldGen.genRand.Next(-num57, num57 + 1); + int j7 = WorldGen.dRoomY[index] + WorldGen.genRand.Next(-num57, num57 + 1); + int Style = 2; + if (num55 == 1) + ++num55; + int contain; + if (num55 == 2) + contain = 155; + else if (num55 == 3) + contain = 156; + else if (num55 == 4) + contain = 157; + else if (num55 == 5) + contain = 163; + else if (num55 == 6) + contain = 113; + else if (num55 == 7) + contain = 3317; + else if (num55 == 8) + { + contain = 327; + Style = 0; + } + else + { + contain = 164; + num55 = 0; + } + if ((double) j7 < Main.worldSurface + 50.0) + { + contain = 327; + Style = 0; + } + if (contain == 0 && WorldGen.genRand.Next(2) == 0) + { + num56 = 1000; + } + else + { + if (WorldGen.AddBuriedChest(i8, j7, contain, Style: Style)) + { + num56 += 1000; + ++num55; + } + ++num56; + } + } + } + WorldGen.dMinX -= 25; + WorldGen.dMaxX += 25; + WorldGen.dMinY -= 25; + WorldGen.dMaxY += 25; + if (WorldGen.dMinX < 0) + WorldGen.dMinX = 0; + if (WorldGen.dMaxX > Main.maxTilesX) + WorldGen.dMaxX = Main.maxTilesX; + if (WorldGen.dMinY < 0) + WorldGen.dMinY = 0; + if (WorldGen.dMaxY > Main.maxTilesY) + WorldGen.dMaxY = Main.maxTilesY; + int failCount = 0; + int failMax1 = 1000; + int numAdd1 = 0; + WorldGen.MakeDungeon_Lights(tileType, ref failCount, failMax1, ref numAdd1, roomWall); + failCount = 0; + int failMax2 = 1000; + int numAdd2 = 0; + WorldGen.MakeDungeon_Traps(ref failCount, failMax2, ref numAdd2); + float count1 = WorldGen.MakeDungeon_GroundFurniture(wallType1); + float count2 = WorldGen.MakeDungeon_Pictures(roomWall, count1); + WorldGen.MakeDungeon_Banners(roomWall, count2); + } + + private static void MakeDungeon_Traps(ref int failCount, int failMax, ref int numAdd) + { + while (numAdd < Main.maxTilesX / 500) + { + ++failCount; + int x2 = WorldGen.genRand.Next(WorldGen.dMinX, WorldGen.dMaxX); + int y2 = WorldGen.genRand.Next(WorldGen.dMinY, WorldGen.dMaxY); + while ((double) y2 < Main.worldSurface) + y2 = WorldGen.genRand.Next(WorldGen.dMinY, WorldGen.dMaxY); + if (Main.wallDungeon[(int) Main.tile[x2, y2].wall] && WorldGen.placeTrap(x2, y2, 0)) + failCount = failMax; + if (failCount > failMax) + { + ++numAdd; + failCount = 0; + } + } + } + + private static void MakeDungeon_Lights( + ushort tileType, + ref int failCount, + int failMax, + ref int numAdd, + int[] roomWall) + { + int[] numArray = new int[3] + { + WorldGen.genRand.Next(7), + WorldGen.genRand.Next(7), + 0 + }; + while (numArray[1] == numArray[0]) + numArray[1] = WorldGen.genRand.Next(7); + numArray[2] = WorldGen.genRand.Next(7); + while (numArray[2] == numArray[0] || numArray[2] == numArray[1]) + numArray[2] = WorldGen.genRand.Next(7); + while (numAdd < Main.maxTilesX / 150) + { + ++failCount; + int index1 = WorldGen.genRand.Next(WorldGen.dMinX, WorldGen.dMaxX); + int index2 = WorldGen.genRand.Next(WorldGen.dMinY, WorldGen.dMaxY); + if (Main.wallDungeon[(int) Main.tile[index1, index2].wall]) + { + for (int y = index2; y > WorldGen.dMinY; --y) + { + if (Main.tile[index1, y - 1].active() && (int) Main.tile[index1, y - 1].type == (int) tileType) + { + bool flag1 = false; + for (int index3 = index1 - 15; index3 < index1 + 15; ++index3) + { + for (int index4 = y - 15; index4 < y + 15; ++index4) + { + if (index3 > 0 && index3 < Main.maxTilesX && index4 > 0 && index4 < Main.maxTilesY && (Main.tile[index3, index4].type == (ushort) 42 || Main.tile[index3, index4].type == (ushort) 34)) + { + flag1 = true; + break; + } + } + } + if (Main.tile[index1 - 1, y].active() || Main.tile[index1 + 1, y].active() || Main.tile[index1 - 1, y + 1].active() || Main.tile[index1 + 1, y + 1].active() || Main.tile[index1, y + 2].active()) + flag1 = true; + if (!flag1) + { + bool flag2 = false; + if (!flag2 && WorldGen.genRand.Next(7) == 0) + { + int style = 27; + switch (roomWall[0]) + { + case 7: + style = 27; + break; + case 8: + style = 28; + break; + case 9: + style = 29; + break; + } + bool flag3 = false; + for (int index5 = 0; index5 < 15; ++index5) + { + if (WorldGen.SolidTile(index1, y + index5)) + { + flag3 = true; + break; + } + } + if (!flag3) + WorldGen.PlaceChand(index1, y, (ushort) 34, style); + if (Main.tile[index1, y].type == (ushort) 34) + { + flag2 = true; + failCount = 0; + ++numAdd; + for (int index6 = 0; index6 < 1000; ++index6) + { + int i = index1 + WorldGen.genRand.Next(-12, 13); + int j = y + WorldGen.genRand.Next(3, 21); + if (!Main.tile[i, j].active() && !Main.tile[i, j + 1].active() && Main.tileDungeon[(int) Main.tile[i - 1, j].type] && Main.tileDungeon[(int) Main.tile[i + 1, j].type] && Collision.CanHit(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, new Vector2((float) (index1 * 16), (float) (y * 16 + 1)), 16, 16)) + { + if ((WorldGen.SolidTile(i - 1, j) && Main.tile[i - 1, j].type != (ushort) 10 || WorldGen.SolidTile(i + 1, j) && Main.tile[i + 1, j].type != (ushort) 10 || WorldGen.SolidTile(i, j + 1)) && Main.wallDungeon[(int) Main.tile[i, j].wall] && (Main.tileDungeon[(int) Main.tile[i - 1, j].type] || Main.tileDungeon[(int) Main.tile[i + 1, j].type])) + WorldGen.PlaceTile(i, j, 136, true); + if (Main.tile[i, j].active()) + { + while (i != index1 || j != y) + { + Main.tile[i, j].wire(true); + if (i > index1) + --i; + if (i < index1) + ++i; + Main.tile[i, j].wire(true); + if (j > y) + --j; + if (j < y) + ++j; + Main.tile[i, j].wire(true); + } + if (WorldGen.genRand.Next(3) > 0) + { + Main.tile[index1, y].frameX = (short) 18; + Main.tile[index1, y + 1].frameX = (short) 18; + break; + } + break; + } + } + } + } + } + if (!flag2) + { + int style = numArray[0]; + if ((int) Main.tile[index1, y].wall == roomWall[1]) + style = numArray[1]; + if ((int) Main.tile[index1, y].wall == roomWall[2]) + style = numArray[2]; + WorldGen.Place1x2Top(index1, y, (ushort) 42, style); + if (Main.tile[index1, y].type == (ushort) 42) + { + failCount = 0; + ++numAdd; + for (int index7 = 0; index7 < 1000; ++index7) + { + int i = index1 + WorldGen.genRand.Next(-12, 13); + int j = y + WorldGen.genRand.Next(3, 21); + if (!Main.tile[i, j].active() && !Main.tile[i, j + 1].active() && Main.tile[i - 1, j].type != (ushort) 48 && Main.tile[i + 1, j].type != (ushort) 48 && Collision.CanHit(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, new Vector2((float) (index1 * 16), (float) (y * 16 + 1)), 16, 16)) + { + if (WorldGen.SolidTile(i - 1, j) && Main.tile[i - 1, j].type != (ushort) 10 || WorldGen.SolidTile(i + 1, j) && Main.tile[i + 1, j].type != (ushort) 10 || WorldGen.SolidTile(i, j + 1)) + WorldGen.PlaceTile(i, j, 136, true); + if (Main.tile[i, j].active()) + { + while (i != index1 || j != y) + { + Main.tile[i, j].wire(true); + if (i > index1) + --i; + if (i < index1) + ++i; + Main.tile[i, j].wire(true); + if (j > y) + --j; + if (j < y) + ++j; + Main.tile[i, j].wire(true); + } + if (WorldGen.genRand.Next(3) > 0) + { + Main.tile[index1, y].frameX = (short) 18; + Main.tile[index1, y + 1].frameX = (short) 18; + break; + } + break; + } + } + } + break; + } + break; + } + break; + } + break; + } + } + } + if (failCount > failMax) + { + ++numAdd; + failCount = 0; + } + } + } + + private static float MakeDungeon_Banners(int[] roomWall, float count) + { + count = 840000f / (float) Main.maxTilesX; + for (int index1 = 0; (double) index1 < (double) count; ++index1) + { + int i = WorldGen.genRand.Next(WorldGen.dMinX, WorldGen.dMaxX); + int j1; + for (j1 = WorldGen.genRand.Next(WorldGen.dMinY, WorldGen.dMaxY); !Main.wallDungeon[(int) Main.tile[i, j1].wall] || Main.tile[i, j1].active(); j1 = WorldGen.genRand.Next(WorldGen.dMinY, WorldGen.dMaxY)) + i = WorldGen.genRand.Next(WorldGen.dMinX, WorldGen.dMaxX); + while (!WorldGen.SolidTile(i, j1) && j1 > 10) + --j1; + int j2 = j1 + 1; + if (Main.wallDungeon[(int) Main.tile[i, j2].wall] && Main.tile[i, j2 - 1].type != (ushort) 48 && !Main.tile[i, j2].active() && !Main.tile[i, j2 + 1].active() && !Main.tile[i, j2 + 2].active() && !Main.tile[i, j2 + 3].active()) + { + bool flag = true; + for (int index2 = i - 1; index2 <= i + 1; ++index2) + { + for (int index3 = j2; index3 <= j2 + 3; ++index3) + { + if (Main.tile[index2, index3].active() && (Main.tile[index2, index3].type == (ushort) 10 || Main.tile[index2, index3].type == (ushort) 11 || Main.tile[index2, index3].type == (ushort) 91)) + flag = false; + } + } + if (flag) + { + int num = 10; + if ((int) Main.tile[i, j2].wall == roomWall[1]) + num = 12; + if ((int) Main.tile[i, j2].wall == roomWall[2]) + num = 14; + int style = num + WorldGen.genRand.Next(2); + WorldGen.PlaceTile(i, j2, 91, true, style: style); + } + } + } + return count; + } + + private static float MakeDungeon_Pictures(int[] roomWall, float count) + { + count = 420000f / (float) Main.maxTilesX; + for (int index1 = 0; (double) index1 < (double) count; ++index1) + { + int index2 = WorldGen.genRand.Next(WorldGen.dMinX, WorldGen.dMaxX); + int index3; + for (index3 = WorldGen.genRand.Next((int) Main.worldSurface, WorldGen.dMaxY); !Main.wallDungeon[(int) Main.tile[index2, index3].wall] || Main.tile[index2, index3].active(); index3 = WorldGen.genRand.Next((int) Main.worldSurface, WorldGen.dMaxY)) + index2 = WorldGen.genRand.Next(WorldGen.dMinX, WorldGen.dMaxX); + for (int index4 = 0; index4 < 2; ++index4) + { + int index5 = index2; + int index6 = index2; + while (!Main.tile[index5, index3].active() && Main.wallDungeon[(int) Main.tile[index5, index3].wall]) + --index5; + int num1 = index5 + 1; + while (!Main.tile[index6, index3].active() && Main.wallDungeon[(int) Main.tile[index6, index3].wall]) + ++index6; + int num2 = index6 - 1; + index2 = (num1 + num2) / 2; + int index7 = index3; + int index8 = index3; + while (!Main.tile[index2, index7].active() && Main.wallDungeon[(int) Main.tile[index2, index7].wall]) + --index7; + int num3 = index7 + 1; + while (!Main.tile[index2, index8].active() && Main.wallDungeon[(int) Main.tile[index2, index8].wall]) + ++index8; + int num4 = index8 - 1; + index3 = (num3 + num4) / 2; + } + int index9 = index2; + int index10 = index2; + while (!Main.tile[index9, index3].active() && !Main.tile[index9, index3 - 1].active() && !Main.tile[index9, index3 + 1].active()) + --index9; + int num5 = index9 + 1; + while (!Main.tile[index10, index3].active() && !Main.tile[index10, index3 - 1].active() && !Main.tile[index10, index3 + 1].active()) + ++index10; + int num6 = index10 - 1; + int index11 = index3; + int index12 = index3; + while (!Main.tile[index2, index11].active() && !Main.tile[index2 - 1, index11].active() && !Main.tile[index2 + 1, index11].active()) + --index11; + int num7 = index11 + 1; + while (!Main.tile[index2, index12].active() && !Main.tile[index2 - 1, index12].active() && !Main.tile[index2 + 1, index12].active()) + ++index12; + int num8 = index12 - 1; + int index13 = (num5 + num6) / 2; + int index14 = (num7 + num8) / 2; + int num9 = num6 - num5; + int num10 = num8 - num7; + if (num9 > 7 && num10 > 5) + { + bool[] flagArray = new bool[3] + { + true, + false, + false + }; + if (num9 > num10 * 3 && num9 > 21) + flagArray[1] = true; + if (num10 > num9 * 3 && num10 > 21) + flagArray[2] = true; + int index15 = WorldGen.genRand.Next(3); + if ((int) Main.tile[index13, index14].wall == roomWall[0]) + index15 = 0; + while (!flagArray[index15]) + index15 = WorldGen.genRand.Next(3); + if (WorldGen.nearPicture2(index13, index14)) + index15 = -1; + switch (index15) + { + case 0: + Vector2 vector2_1 = WorldGen.randPictureTile(); + if ((int) Main.tile[index13, index14].wall != roomWall[0]) + vector2_1 = WorldGen.randBoneTile(); + int x1 = (int) vector2_1.X; + int y1 = (int) vector2_1.Y; + if (!WorldGen.nearPicture(index13, index14)) + { + WorldGen.PlaceTile(index13, index14, x1, true, style: y1); + continue; + } + continue; + case 1: + Vector2 vector2_2 = WorldGen.randPictureTile(); + if ((int) Main.tile[index13, index14].wall != roomWall[0]) + vector2_2 = WorldGen.randBoneTile(); + int x2 = (int) vector2_2.X; + int y2 = (int) vector2_2.Y; + if (!Main.tile[index13, index14].active()) + WorldGen.PlaceTile(index13, index14, x2, true, style: y2); + int num11 = index13; + int num12 = index14; + int index16 = index14; + for (int index17 = 0; index17 < 2; ++index17) + { + index13 += 7; + int index18 = index16; + int index19 = index16; + while (!Main.tile[index13, index18].active() && !Main.tile[index13 - 1, index18].active() && !Main.tile[index13 + 1, index18].active()) + --index18; + int num13 = index18 + 1; + while (!Main.tile[index13, index19].active() && !Main.tile[index13 - 1, index19].active() && !Main.tile[index13 + 1, index19].active()) + ++index19; + int num14 = index19 - 1; + index16 = (num13 + num14) / 2; + Vector2 vector2_3 = WorldGen.randPictureTile(); + if ((int) Main.tile[index13, index16].wall != roomWall[0]) + vector2_3 = WorldGen.randBoneTile(); + int x3 = (int) vector2_3.X; + int y3 = (int) vector2_3.Y; + if (Math.Abs(num12 - index16) < 4 && !WorldGen.nearPicture(index13, index16)) + WorldGen.PlaceTile(index13, index16, x3, true, style: y3); + else + break; + } + int index20 = index14; + int index21 = num11; + for (int index22 = 0; index22 < 2; ++index22) + { + index21 -= 7; + int index23 = index20; + int index24 = index20; + while (!Main.tile[index21, index23].active() && !Main.tile[index21 - 1, index23].active() && !Main.tile[index21 + 1, index23].active()) + --index23; + int num15 = index23 + 1; + while (!Main.tile[index21, index24].active() && !Main.tile[index21 - 1, index24].active() && !Main.tile[index21 + 1, index24].active()) + ++index24; + int num16 = index24 - 1; + index20 = (num15 + num16) / 2; + Vector2 vector2_4 = WorldGen.randPictureTile(); + if ((int) Main.tile[index21, index20].wall != roomWall[0]) + vector2_4 = WorldGen.randBoneTile(); + int x4 = (int) vector2_4.X; + int y4 = (int) vector2_4.Y; + if (Math.Abs(num12 - index20) < 4 && !WorldGen.nearPicture(index21, index20)) + WorldGen.PlaceTile(index21, index20, x4, true, style: y4); + else + break; + } + continue; + case 2: + Vector2 vector2_5 = WorldGen.randPictureTile(); + if ((int) Main.tile[index13, index14].wall != roomWall[0]) + vector2_5 = WorldGen.randBoneTile(); + int x5 = (int) vector2_5.X; + int y5 = (int) vector2_5.Y; + if (!Main.tile[index13, index14].active()) + WorldGen.PlaceTile(index13, index14, x5, true, style: y5); + int num17 = index14; + int num18 = index13; + int index25 = index13; + for (int index26 = 0; index26 < 3; ++index26) + { + index14 += 7; + int index27 = index25; + int index28 = index25; + while (!Main.tile[index27, index14].active() && !Main.tile[index27, index14 - 1].active() && !Main.tile[index27, index14 + 1].active()) + --index27; + int num19 = index27 + 1; + while (!Main.tile[index28, index14].active() && !Main.tile[index28, index14 - 1].active() && !Main.tile[index28, index14 + 1].active()) + ++index28; + int num20 = index28 - 1; + index25 = (num19 + num20) / 2; + Vector2 vector2_6 = WorldGen.randPictureTile(); + if ((int) Main.tile[index25, index14].wall != roomWall[0]) + vector2_6 = WorldGen.randBoneTile(); + int x6 = (int) vector2_6.X; + int y6 = (int) vector2_6.Y; + if (Math.Abs(num18 - index25) < 4 && !WorldGen.nearPicture(index25, index14)) + WorldGen.PlaceTile(index25, index14, x6, true, style: y6); + else + break; + } + int index29 = index13; + int index30 = num17; + for (int index31 = 0; index31 < 3; ++index31) + { + index30 -= 7; + int index32 = index29; + int index33 = index29; + while (!Main.tile[index32, index30].active() && !Main.tile[index32, index30 - 1].active() && !Main.tile[index32, index30 + 1].active()) + --index32; + int num21 = index32 + 1; + while (!Main.tile[index33, index30].active() && !Main.tile[index33, index30 - 1].active() && !Main.tile[index33, index30 + 1].active()) + ++index33; + int num22 = index33 - 1; + index29 = (num21 + num22) / 2; + Vector2 vector2_7 = WorldGen.randPictureTile(); + if ((int) Main.tile[index29, index30].wall != roomWall[0]) + vector2_7 = WorldGen.randBoneTile(); + int x7 = (int) vector2_7.X; + int y7 = (int) vector2_7.Y; + if (Math.Abs(num18 - index29) < 4 && !WorldGen.nearPicture(index29, index30)) + WorldGen.PlaceTile(index29, index30, x7, true, style: y7); + else + break; + } + continue; + default: + continue; + } + } + } + return count; + } + + private static float MakeDungeon_GroundFurniture(int wallType) + { + float num1 = (float) (2000.0 * (double) Main.maxTilesX / 4200.0); + int num2 = 1 + Main.maxTilesX / 4200; + int num3 = 1 + Main.maxTilesX / 4200; + for (int index1 = 0; (double) index1 < (double) num1; ++index1) + { + if (num2 > 0 || num3 > 0) + --index1; + int i1 = WorldGen.genRand.Next(WorldGen.dMinX, WorldGen.dMaxX); + int j; + for (j = WorldGen.genRand.Next((int) Main.worldSurface + 10, WorldGen.dMaxY); !Main.wallDungeon[(int) Main.tile[i1, j].wall] || Main.tile[i1, j].active(); j = WorldGen.genRand.Next((int) Main.worldSurface + 10, WorldGen.dMaxY)) + i1 = WorldGen.genRand.Next(WorldGen.dMinX, WorldGen.dMaxX); + if (Main.wallDungeon[(int) Main.tile[i1, j].wall] && !Main.tile[i1, j].active()) + { + while (!WorldGen.SolidTile(i1, j) && j < Main.UnderworldLayer) + ++j; + int index2 = j - 1; + int i2 = i1; + int i3 = i1; + while (!Main.tile[i2, index2].active() && WorldGen.SolidTile(i2, index2 + 1)) + --i2; + int num4 = i2 + 1; + while (!Main.tile[i3, index2].active() && WorldGen.SolidTile(i3, index2 + 1)) + ++i3; + int num5 = i3 - 1; + int num6 = num5 - num4; + int index3 = (num5 + num4) / 2; + if (!Main.tile[index3, index2].active() && Main.wallDungeon[(int) Main.tile[index3, index2].wall] && WorldGen.SolidTile(index3, index2 + 1) && Main.tile[index3, index2 + 1].type != (ushort) 48) + { + int style1 = 13; + int style2 = 10; + int style3 = 11; + int style4 = 1; + int style5 = 46; + int style6 = 1; + int style7 = 5; + int style8 = 11; + int style9 = 5; + int style10 = 6; + int style11 = 21; + int style12 = 22; + int style13 = 24; + int style14 = 30; + switch (wallType) + { + case 8: + style1 = 14; + style2 = 11; + style3 = 12; + style4 = 2; + style5 = 47; + style6 = 2; + style7 = 6; + style8 = 12; + style9 = 6; + style10 = 7; + style11 = 22; + style12 = 23; + style13 = 25; + style14 = 31; + break; + case 9: + style1 = 15; + style2 = 12; + style3 = 13; + style4 = 3; + style5 = 48; + style6 = 3; + style7 = 7; + style8 = 13; + style9 = 7; + style10 = 8; + style11 = 23; + style12 = 24; + style13 = 26; + style14 = 32; + break; + } + if (Main.tile[index3, index2].wall >= (ushort) 94 && Main.tile[index3, index2].wall <= (ushort) 105) + { + style1 = 17; + style2 = 14; + style3 = 15; + style4 = -1; + style5 = -1; + style6 = 5; + style7 = -1; + style8 = -1; + style9 = -1; + style10 = -1; + style11 = -1; + style12 = -1; + style13 = -1; + style14 = -1; + } + int num7 = WorldGen.genRand.Next(13); + if ((num7 == 10 || num7 == 11 || num7 == 12) && WorldGen.genRand.Next(4) != 0) + num7 = WorldGen.genRand.Next(13); + while (num7 == 2 && style5 == -1 || num7 == 5 && style7 == -1 || num7 == 6 && style8 == -1 || num7 == 7 && style9 == -1 || num7 == 8 && style10 == -1 || num7 == 9 && style11 == -1 || num7 == 10 && style12 == -1 || num7 == 11 && style13 == -1 || num7 == 12 && style14 == -1) + num7 = WorldGen.genRand.Next(13); + int num8 = 0; + int num9 = 0; + if (num7 == 0) + { + num8 = 5; + num9 = 4; + } + if (num7 == 1) + { + num8 = 4; + num9 = 3; + } + if (num7 == 2) + { + num8 = 3; + num9 = 5; + } + if (num7 == 3) + { + num8 = 4; + num9 = 6; + } + if (num7 == 4) + { + num8 = 3; + num9 = 3; + } + if (num7 == 5) + { + num8 = 5; + num9 = 3; + } + if (num7 == 6) + { + num8 = 5; + num9 = 4; + } + if (num7 == 7) + { + num8 = 5; + num9 = 4; + } + if (num7 == 8) + { + num8 = 5; + num9 = 4; + } + if (num7 == 9) + { + num8 = 5; + num9 = 3; + } + if (num7 == 10) + { + num8 = 2; + num9 = 4; + } + if (num7 == 11) + { + num8 = 3; + num9 = 3; + } + if (num7 == 12) + { + num8 = 2; + num9 = 5; + } + for (int index4 = index3 - num8; index4 <= index3 + num8; ++index4) + { + for (int index5 = index2 - num9; index5 <= index2; ++index5) + { + if (Main.tile[index4, index5].active()) + { + num7 = -1; + break; + } + } + } + if ((double) num6 < (double) num8 * 1.75) + num7 = -1; + if (num2 > 0 || num3 > 0) + { + if (num2 > 0) + { + WorldGen.PlaceTile(index3, index2, 355, true); + if (Main.tile[index3, index2].type == (ushort) 355) + --num2; + } + else if (num3 > 0) + { + WorldGen.PlaceTile(index3, index2, 354, true); + if (Main.tile[index3, index2].type == (ushort) 354) + --num3; + } + } + else + { + switch (num7) + { + case 0: + WorldGen.PlaceTile(index3, index2, 14, true, style: style2); + if (Main.tile[index3, index2].active()) + { + if (!Main.tile[index3 - 2, index2].active()) + { + WorldGen.PlaceTile(index3 - 2, index2, 15, true, style: style1); + if (Main.tile[index3 - 2, index2].active()) + { + Main.tile[index3 - 2, index2].frameX += (short) 18; + Main.tile[index3 - 2, index2 - 1].frameX += (short) 18; + } + } + if (!Main.tile[index3 + 2, index2].active()) + WorldGen.PlaceTile(index3 + 2, index2, 15, true, style: style1); + } + for (int i4 = index3 - 1; i4 <= index3 + 1; ++i4) + { + if (WorldGen.genRand.Next(2) == 0 && !Main.tile[i4, index2 - 2].active()) + { + int num10 = WorldGen.genRand.Next(5); + if (style4 != -1 && num10 <= 1 && !Main.tileLighted[(int) Main.tile[i4 - 1, index2 - 2].type]) + WorldGen.PlaceTile(i4, index2 - 2, 33, true, style: style4); + if (num10 == 2 && !Main.tileLighted[(int) Main.tile[i4 - 1, index2 - 2].type]) + WorldGen.PlaceTile(i4, index2 - 2, 49, true); + if (num10 == 3) + WorldGen.PlaceTile(i4, index2 - 2, 50, true); + if (num10 == 4) + WorldGen.PlaceTile(i4, index2 - 2, 103, true); + } + } + continue; + case 1: + WorldGen.PlaceTile(index3, index2, 18, true, style: style3); + if (Main.tile[index3, index2].active()) + { + if (WorldGen.genRand.Next(2) == 0) + { + if (!Main.tile[index3 - 1, index2].active()) + { + WorldGen.PlaceTile(index3 - 1, index2, 15, true, style: style1); + if (Main.tile[index3 - 1, index2].active()) + { + Main.tile[index3 - 1, index2].frameX += (short) 18; + Main.tile[index3 - 1, index2 - 1].frameX += (short) 18; + } + } + } + else if (!Main.tile[index3 + 2, index2].active()) + WorldGen.PlaceTile(index3 + 2, index2, 15, true, style: style1); + for (int i5 = index3; i5 <= index3 + 1; ++i5) + { + if (WorldGen.genRand.Next(2) == 0 && !Main.tile[i5, index2 - 1].active()) + { + int num11 = WorldGen.genRand.Next(5); + if (style4 != -1 && num11 <= 1 && !Main.tileLighted[(int) Main.tile[i5 - 1, index2 - 1].type]) + WorldGen.PlaceTile(i5, index2 - 1, 33, true, style: style4); + if (num11 == 2 && !Main.tileLighted[(int) Main.tile[i5 - 1, index2 - 1].type]) + WorldGen.PlaceTile(i5, index2 - 1, 49, true); + if (num11 == 3) + WorldGen.PlaceTile(i5, index2 - 1, 50, true); + if (num11 == 4) + WorldGen.PlaceTile(i5, index2 - 1, 103, true); + } + } + continue; + } + continue; + case 2: + WorldGen.PlaceTile(index3, index2, 105, true, style: style5); + continue; + case 3: + WorldGen.PlaceTile(index3, index2, 101, true, style: style6); + continue; + case 4: + if (WorldGen.genRand.Next(2) == 0) + { + WorldGen.PlaceTile(index3, index2, 15, true, style: style1); + Main.tile[index3, index2].frameX += (short) 18; + Main.tile[index3, index2 - 1].frameX += (short) 18; + continue; + } + WorldGen.PlaceTile(index3, index2, 15, true, style: style1); + continue; + case 5: + if (WorldGen.genRand.Next(2) == 0) + { + WorldGen.Place4x2(index3, index2, (ushort) 79, 1, style7); + continue; + } + WorldGen.Place4x2(index3, index2, (ushort) 79, style: style7); + continue; + case 6: + WorldGen.PlaceTile(index3, index2, 87, true, style: style8); + continue; + case 7: + WorldGen.PlaceTile(index3, index2, 88, true, style: style9); + continue; + case 8: + WorldGen.PlaceTile(index3, index2, 89, true, style: style10); + continue; + case 9: + if (WorldGen.genRand.Next(2) == 0) + { + WorldGen.Place4x2(index3, index2, (ushort) 90, 1, style11); + continue; + } + WorldGen.Place4x2(index3, index2, (ushort) 90, style: style11); + continue; + case 10: + WorldGen.PlaceTile(index3, index2, 93, true, style: style13); + continue; + case 11: + WorldGen.PlaceTile(index3, index2, 100, true, style: style12); + continue; + case 12: + WorldGen.PlaceTile(index3, index2, 104, true, style: style14); + continue; + default: + continue; + } + } + } + } + } + return num1; + } + + public static Vector2 randBoneTile() + { + int num1 = WorldGen.genRand.Next(2); + int num2 = 0; + switch (num1) + { + case 0: + num1 = 240; + num2 = WorldGen.genRand.Next(2); + switch (num2) + { + case 0: + num2 = 16; + break; + case 1: + num2 = 17; + break; + } + break; + case 1: + num1 = 241; + num2 = WorldGen.genRand.Next(9); + break; + } + return new Vector2((float) num1, (float) num2); + } + + public static Vector2 randHellPicture() + { + int num1 = WorldGen.genRand.Next(4); + if (num1 == 1) + num1 = WorldGen.genRand.Next(4); + int num2; + int num3; + if (num1 == 0) + { + num2 = 240; + num3 = WorldGen.genRand.Next(5); + switch (num3) + { + case 0: + num3 = 27; + break; + case 1: + num3 = 29; + break; + case 2: + num3 = 30; + break; + case 3: + num3 = 31; + break; + case 4: + num3 = 32; + break; + } + } + else if (num1 == 1) + { + num2 = 242; + num3 = 14; + } + else if (num1 == 2) + { + num2 = 245; + num3 = WorldGen.genRand.Next(3); + switch (num3) + { + case 0: + num3 = 1; + break; + case 1: + num3 = 2; + break; + case 2: + num3 = 4; + break; + } + } + else + { + num2 = 246; + num3 = WorldGen.genRand.Next(3); + switch (num3) + { + case 0: + num3 = 0; + break; + case 1: + num3 = 16; + break; + case 2: + num3 = 17; + break; + } + } + return new Vector2((float) num2, (float) num3); + } + + public static Vector2 RandHousePictureDesert() + { + int num1 = WorldGen.genRand.Next(4); + int num2; + int num3; + if (num1 <= 1) + { + num2 = 240; + num3 = 63 + WorldGen.genRand.Next(6); + } + else if (num1 == 2) + { + num2 = 245; + num3 = 7 + WorldGen.genRand.Next(2); + } + else + { + num2 = 242; + num3 = 37 + WorldGen.genRand.Next(6); + } + return new Vector2((float) num2, (float) num3); + } + + public static Vector2 randHousePicture() + { + int num1 = WorldGen.genRand.Next(4); + if (num1 >= 3 && WorldGen.genRand.Next(10) != 0) + num1 = WorldGen.genRand.Next(3); + int num2; + int num3; + if (num1 <= 1) + { + num2 = 240; + int maxValue = 10; + num3 = WorldGen.genRand.Next(maxValue); + if (num3 == 9) + num3 = WorldGen.genRand.Next(maxValue); + if (num3 == 5) + num3 = WorldGen.genRand.Next(maxValue); + if (num3 == 6) + num3 = WorldGen.genRand.Next(maxValue); + if (num3 == 0) + num3 = 26; + else if (num3 == 1) + num3 = 28; + else if (num3 == 2) + num3 = 20; + else if (num3 == 3) + num3 = 21; + else if (num3 == 4) + num3 = 22; + else if (num3 == 5) + num3 = 24; + else if (num3 == 6) + num3 = 25; + else if (num3 == 7) + num3 = 33; + else if (num3 == 8) + num3 = 34; + else if (num3 == 9) + num3 = 35; + } + else if (num1 == 2) + { + int maxValue = 4; + num2 = 245; + num3 = WorldGen.genRand.Next(maxValue); + if (num3 == 2) + num3 = WorldGen.genRand.Next(maxValue); + if (num3 == 0) + num3 = WorldGen.genRand.Next(maxValue); + if (num3 == 0) + num3 = WorldGen.genRand.Next(maxValue); + if (num3 == 0) + num3 = WorldGen.genRand.Next(maxValue); + if (num3 == 0) + num3 = 0; + else if (num3 == 1) + num3 = 3; + else if (num3 == 2) + num3 = 5; + else if (num3 == 3) + num3 = 6; + } + else + { + num2 = 246; + num3 = 1; + } + return new Vector2((float) num2, (float) num3); + } + + public static Vector2 randPictureTile() + { + int num1 = WorldGen.genRand.Next(3); + int num2 = 0; + if (num1 <= 1) + { + int maxValue = 7; + num1 = 240; + num2 = WorldGen.genRand.Next(maxValue); + if (num2 == 6) + num2 = WorldGen.genRand.Next(maxValue); + if (num2 == 0) + num2 = 12; + else if (num2 == 1) + num2 = 13; + else if (num2 == 2) + num2 = 14; + else if (num2 == 3) + num2 = 15; + else if (num2 == 4) + num2 = 18; + else if (num2 == 5) + num2 = 19; + else if (num2 == 6) + num2 = 23; + } + else if (num1 == 2) + { + num1 = 242; + num2 = WorldGen.genRand.Next(17); + if (num2 > 13) + { + switch (num2) + { + case 14: + num2 = 15; + break; + case 15: + num2 = 16; + break; + case 16: + num2 = 30; + break; + } + } + } + return new Vector2((float) num1, (float) num2); + } + + public static void DungeonStairs(int i, int j, ushort tileType, int wallType) + { + Vector2 zero = Vector2.Zero; + double num1 = (double) WorldGen.genRand.Next(5, 9); + int num2 = 1; + Vector2 vector2; + vector2.X = (float) i; + vector2.Y = (float) j; + int num3 = WorldGen.genRand.Next(10, 30); + int num4 = i <= WorldGen.dEnteranceX ? 1 : -1; + if (i > Main.maxTilesX - 400) + num4 = -1; + else if (i < 400) + num4 = 1; + zero.Y = -1f; + zero.X = (float) num4; + if (WorldGen.genRand.Next(3) != 0) + zero.X *= (float) (1.0 + (double) WorldGen.genRand.Next(0, 200) * 0.00999999977648258); + else if (WorldGen.genRand.Next(3) == 0) + zero.X *= (float) WorldGen.genRand.Next(50, 76) * 0.01f; + else if (WorldGen.genRand.Next(6) == 0) + zero.Y *= 2f; + if (WorldGen.dungeonX < Main.maxTilesX / 2 && (double) zero.X < 0.0 && (double) zero.X < 0.5) + zero.X = -0.5f; + if (WorldGen.dungeonX > Main.maxTilesX / 2 && (double) zero.X > 0.0 && (double) zero.X > 0.5) + zero.X = -0.5f; + if (WorldGen.drunkWorldGen) + { + num2 = num4 * -1; + zero.X *= -1f; + } + while (num3 > 0) + { + --num3; + int num5 = (int) ((double) vector2.X - num1 - 4.0 - (double) WorldGen.genRand.Next(6)); + int num6 = (int) ((double) vector2.X + num1 + 4.0 + (double) WorldGen.genRand.Next(6)); + int num7 = (int) ((double) vector2.Y - num1 - 4.0); + int num8 = (int) ((double) vector2.Y + num1 + 4.0 + (double) WorldGen.genRand.Next(6)); + if (num5 < 0) + num5 = 0; + if (num6 > Main.maxTilesX) + num6 = Main.maxTilesX; + if (num7 < 0) + num7 = 0; + if (num8 > Main.maxTilesY) + num8 = Main.maxTilesY; + int num9 = 1; + if ((double) vector2.X > (double) (Main.maxTilesX / 2)) + num9 = -1; + int i1 = (int) ((double) vector2.X + WorldGen.dxStrength1 * 0.600000023841858 * (double) num9 + WorldGen.dxStrength2 * (double) num9); + int num10 = (int) (WorldGen.dyStrength2 * 0.5); + if ((double) vector2.Y < Main.worldSurface - 5.0 && Main.tile[i1, (int) ((double) vector2.Y - num1 - 6.0 + (double) num10)].wall == (ushort) 0 && Main.tile[i1, (int) ((double) vector2.Y - num1 - 7.0 + (double) num10)].wall == (ushort) 0 && Main.tile[i1, (int) ((double) vector2.Y - num1 - 8.0 + (double) num10)].wall == (ushort) 0) + { + WorldGen.dSurface = true; + WorldGen.TileRunner(i1, (int) ((double) vector2.Y - num1 - 6.0 + (double) num10), (double) WorldGen.genRand.Next(25, 35), WorldGen.genRand.Next(10, 20), -1, speedY: -1f); + } + for (int index1 = num5; index1 < num6; ++index1) + { + for (int index2 = num7; index2 < num8; ++index2) + { + Main.tile[index1, index2].liquid = (byte) 0; + if (!Main.wallDungeon[(int) Main.tile[index1, index2].wall]) + { + Main.tile[index1, index2].wall = (ushort) 0; + Main.tile[index1, index2].active(true); + Main.tile[index1, index2].type = tileType; + } + } + } + for (int index3 = num5 + 1; index3 < num6 - 1; ++index3) + { + for (int index4 = num7 + 1; index4 < num8 - 1; ++index4) + Main.tile[index3, index4].wall = (ushort) wallType; + } + int num11 = 0; + if (WorldGen.genRand.Next((int) num1) == 0) + num11 = WorldGen.genRand.Next(1, 3); + int num12 = (int) ((double) vector2.X - num1 * 0.5 - (double) num11); + int num13 = (int) ((double) vector2.X + num1 * 0.5 + (double) num11); + int num14 = (int) ((double) vector2.Y - num1 * 0.5 - (double) num11); + int num15 = (int) ((double) vector2.Y + num1 * 0.5 + (double) num11); + if (num12 < 0) + num12 = 0; + if (num13 > Main.maxTilesX) + num13 = Main.maxTilesX; + if (num14 < 0) + num14 = 0; + if (num15 > Main.maxTilesY) + num15 = Main.maxTilesY; + for (int i2 = num12; i2 < num13; ++i2) + { + for (int j1 = num14; j1 < num15; ++j1) + { + Main.tile[i2, j1].active(false); + WorldGen.PlaceWall(i2, j1, wallType, true); + } + } + if (WorldGen.dSurface) + num3 = 0; + vector2 += zero; + if ((double) vector2.Y < Main.worldSurface) + zero.Y *= 0.98f; + } + WorldGen.dungeonX = (int) vector2.X; + WorldGen.dungeonY = (int) vector2.Y; + } + + public static bool PlaceSandTrap(int i, int j) + { + int num1 = 6; + int num2 = 4; + int num3 = 25; + int i1 = i; + int index1 = j; + while (!Main.tile[i1, index1].active() && index1 < Main.UnderworldLayer) + ++index1; + if (!Main.tileSolid[(int) Main.tile[i1, index1].type] || Main.tile[i1, index1].halfBrick() || Main.tile[i1, index1].topSlope() || Main.tile[i1, index1].type != (ushort) 53 && Main.tile[i1, index1].type != (ushort) 397 && Main.tile[i1, index1].type != (ushort) 396 || Main.tile[i1, index1].wall != (ushort) 216 && Main.tile[i1, index1].wall != (ushort) 187) + return false; + int j1 = index1 - 1; + int num4 = -1; + int num5 = WorldGen.genRand.Next(6, 12); + int num6 = WorldGen.genRand.Next(6, 14); + for (int index2 = i1 - num3; index2 <= i1 + num3; ++index2) + { + for (int index3 = j1 - num3; index3 < j1 + num3; ++index3) + { + if (Main.tile[index2, index3].wire() || TileID.Sets.BasicChest[(int) Main.tile[index2, index3].type] || TileID.Sets.Paintings[(int) Main.tile[index2, index3].type] || Main.tile[index2, index3].type == (ushort) 10 || Main.tile[index2, index3].type == (ushort) 19 || Main.tile[index2, index3].type == (ushort) 15 || Main.tile[index2, index3].type == (ushort) 219) + return false; + } + } + for (int index4 = i1 - 2; index4 <= i1 + 2; ++index4) + { + for (int index5 = j1 + 1; index5 <= j1 + 3; ++index5) + { + if (!Main.tile[index4, index5].active() || !Main.tileSolid[(int) Main.tile[index4, index5].type]) + return false; + } + } + for (int index6 = j1; index6 > j1 - 30; --index6) + { + if (Main.tile[i1, index6].active()) + { + if (Main.tile[i1, index6].type != (ushort) 396) + return false; + num4 = index6; + break; + } + } + if (num4 <= -1 || j1 - num4 < num6 + num2) + return false; + int num7 = 0; + int index7 = (j1 + num4) / 2; + for (int index8 = i1 - num5; index8 <= i1 + num5; ++index8) + { + if (Main.tile[index8, index7].active() && Main.tileSolid[(int) Main.tile[index8, index7].type]) + return false; + for (int index9 = num4 - num6; index9 <= num4; ++index9) + { + if (Main.tile[index8, index9].active()) + { + if (TileID.Sets.Ore[(int) Main.tile[index8, index9].type] || Main.tile[index8, index9].type == (ushort) 404) + return false; + if (Main.tileSolid[(int) Main.tile[index8, index9].type]) + ++num7; + } + } + } + float num8 = (float) ((num5 * 2 + 1) * (num6 + 1)) * 0.75f; + if ((double) num7 < (double) num8) + return false; + for (int index10 = i1 - num5 - 1; index10 <= i1 + num5 + 1; ++index10) + { + for (int index11 = num4 - num6; index11 <= num4; ++index11) + { + bool flag = false; + if (Main.tile[index10, index11].active() && Main.tileSolid[(int) Main.tile[index10, index11].type]) + flag = true; + if (index11 == num4) + { + Main.tile[index10, index11].slope((byte) 0); + Main.tile[index10, index11].halfBrick(false); + if (!flag) + { + Main.tile[index10, index11].active(true); + Main.tile[index10, index11].type = (ushort) 396; + } + } + else if (index11 == num4 - num6) + { + Main.tile[index10, index11].ClearTile(); + Main.tile[index10, index11].active(true); + Main.tile[index10, index11].type = !flag || !Main.tile[index10, index11 - 1].active() || !Main.tileSolid[(int) Main.tile[index10, index11 - 1].type] ? (ushort) 396 : (ushort) 397; + } + else if (index10 == i1 - num5 - 1 || index10 == i1 + num5 + 1) + { + if (!flag) + { + Main.tile[index10, index11].ClearTile(); + Main.tile[index10, index11].active(true); + Main.tile[index10, index11].type = (ushort) 396; + } + else + { + Main.tile[index10, index11].slope((byte) 0); + Main.tile[index10, index11].halfBrick(false); + } + } + else + { + Main.tile[index10, index11].ClearTile(); + Main.tile[index10, index11].active(true); + Main.tile[index10, index11].type = (ushort) 53; + } + } + } + for (int index12 = (int) ((double) num4 - (double) num6 * 0.666000008583069); (double) index12 <= (double) num4 - (double) num6 * 0.333; ++index12) + { + if ((double) index12 < (double) num4 - (double) num6 * 0.400000005960464) + { + if (Main.tile[i1 - num5 - 2, index12].bottomSlope()) + Main.tile[i1 - num5 - 2, index12].slope((byte) 0); + } + else if ((double) index12 > (double) num4 - (double) num6 * 0.600000023841858) + { + if (Main.tile[i1 - num5 - 2, index12].topSlope()) + Main.tile[i1 - num5 - 2, index12].slope((byte) 0); + Main.tile[i1 - num5 - 2, index12].halfBrick(false); + } + else + { + Main.tile[i1 - num5 - 2, index12].halfBrick(false); + Main.tile[i1 - num5 - 2, index12].slope((byte) 0); + } + if (!Main.tile[i1 - num5 - 2, index12].active() || !Main.tileSolid[(int) Main.tile[i1 - num5 - 2, index12].type]) + { + Main.tile[i1 - num5 - 2, index12].active(true); + Main.tile[i1 - num5 - 2, index12].type = (ushort) 396; + } + if (!Main.tile[i1 + num5 + 2, index12].active() || !Main.tileSolid[(int) Main.tile[i1 + num5 + 2, index12].type]) + { + Main.tile[i1 + num5 + 2, index12].active(true); + Main.tile[i1 + num5 + 2, index12].type = (ushort) 396; + } + } + for (int index13 = num4 - num6; index13 <= num4; ++index13) + { + Main.tile[i1 - num5 - 2, index13].slope((byte) 0); + Main.tile[i1 - num5 - 2, index13].halfBrick(false); + Main.tile[i1 - num5 - 1, index13].slope((byte) 0); + Main.tile[i1 - num5 - 1, index13].halfBrick(false); + Main.tile[i1 - num5 + 1, index13].slope((byte) 0); + Main.tile[i1 - num5 + 1, index13].halfBrick(false); + Main.tile[i1 - num5 + 2, index13].slope((byte) 0); + Main.tile[i1 - num5 + 2, index13].halfBrick(false); + } + for (int index14 = i1 - num5 - 1; index14 < i1 + num5 + 1; ++index14) + { + int index15 = j1 - num6 - 1; + if (Main.tile[index14, index15].bottomSlope()) + Main.tile[index14, index15].slope((byte) 0); + Main.tile[index14, index15].halfBrick(false); + } + WorldGen.KillTile(i1 - 2, j1); + WorldGen.KillTile(i1 - 1, j1); + WorldGen.KillTile(i1 + 1, j1); + WorldGen.KillTile(i1 + 2, j1); + WorldGen.PlaceTile(i1, j1, 135, true, style: 7); + for (int i2 = i1 - num5; i2 <= i1 + num5; ++i2) + { + int num9 = j1; + if ((double) i2 < (double) i1 - (double) num5 * 0.8 || (double) i2 > (double) i1 + (double) num5 * 0.8) + num9 = j1 - 3; + else if ((double) i2 < (double) i1 - (double) num5 * 0.6 || (double) i2 > (double) i1 + (double) num5 * 0.6) + num9 = j1 - 2; + else if ((double) i2 < (double) i1 - (double) num5 * 0.4 || (double) i2 > (double) i1 + (double) num5 * 0.4) + num9 = j1 - 1; + for (int j2 = num4; j2 <= j1; ++j2) + { + if (i2 == i1 && j2 <= j1) + Main.tile[i1, j2].wire(true); + if (Main.tile[i2, j2].active() && Main.tileSolid[(int) Main.tile[i2, j2].type]) + { + if (j2 < num4 + num1 - 4) + { + Main.tile[i2, j2].actuator(true); + Main.tile[i2, j2].wire(true); + } + else if (j2 < num9) + WorldGen.KillTile(i2, j2); + } + } + } + return true; + } + + public static bool DungeonPitTrap(int i, int j, ushort tileType, int wallType) + { + int num1 = 30; + int i1 = i; + int index1 = j; + int num2 = index1; + int num3 = WorldGen.genRand.Next(8, 19); + int num4 = WorldGen.genRand.Next(19, 46); + int num5 = num3 + WorldGen.genRand.Next(6, 10); + int num6 = num4 + WorldGen.genRand.Next(6, 10); + if (!Main.wallDungeon[(int) Main.tile[i1, index1].wall] || Main.tile[i1, index1].active()) + return false; + for (int j1 = index1; j1 < Main.maxTilesY; ++j1) + { + if (j1 > Main.maxTilesY - 300) + return false; + if (Main.tile[i1, j1].active() && WorldGen.SolidTile(i1, j1)) + { + if (Main.tile[i1, j1].type == (ushort) 48) + return false; + index1 = j1; + break; + } + } + if (!Main.wallDungeon[(int) Main.tile[i1 - num3, index1].wall] || !Main.wallDungeon[(int) Main.tile[i1 + num3, index1].wall]) + return false; + for (int index2 = index1; index2 < index1 + num1; ++index2) + { + bool flag = true; + for (int index3 = i1 - num3; index3 <= i1 + num3; ++index3) + { + Tile tile = Main.tile[index3, index2]; + if (tile.active() && Main.tileDungeon[(int) tile.type]) + flag = false; + } + if (flag) + { + index1 = index2; + break; + } + } + for (int index4 = i1 - num3; index4 <= i1 + num3; ++index4) + { + for (int index5 = index1; index5 <= index1 + num4; ++index5) + { + Tile tile = Main.tile[index4, index5]; + if (tile.active() && (Main.tileDungeon[(int) tile.type] || (int) tile.type == (int) WorldGen.crackedType)) + return false; + } + } + bool flag1 = false; + if (WorldGen.dungeonLake) + { + flag1 = true; + WorldGen.dungeonLake = false; + } + else if (WorldGen.genRand.Next(8) == 0) + flag1 = true; + for (int index6 = i1 - num3; index6 <= i1 + num3; ++index6) + { + for (int index7 = num2; index7 <= index1 + num4; ++index7) + { + if (Main.tileDungeon[(int) Main.tile[index6, index7].type]) + { + Main.tile[index6, index7].type = WorldGen.crackedType; + Main.tile[index6, index7].wall = (ushort) wallType; + } + } + } + for (int index8 = i1 - num5; index8 <= i1 + num5; ++index8) + { + for (int index9 = num2; index9 <= index1 + num6; ++index9) + { + Main.tile[index8, index9].lava(false); + Main.tile[index8, index9].liquid = (byte) 0; + if (!Main.wallDungeon[(int) Main.tile[index8, index9].wall] && (int) Main.tile[index8, index9].type != (int) WorldGen.crackedType) + { + Main.tile[index8, index9].Clear(TileDataType.Slope); + Main.tile[index8, index9].type = tileType; + Main.tile[index8, index9].active(true); + if (index8 > i1 - num5 && index8 < i1 + num5 && index9 < index1 + num6) + Main.tile[index8, index9].wall = (ushort) wallType; + } + } + } + for (int index10 = i1 - num3; index10 <= i1 + num3; ++index10) + { + for (int index11 = num2; index11 <= index1 + num4; ++index11) + { + if ((int) Main.tile[index10, index11].type != (int) WorldGen.crackedType) + { + if (flag1) + Main.tile[index10, index11].liquid = byte.MaxValue; + if (index10 == i1 - num3 || index10 == i1 + num3 || index11 == index1 + num4) + Main.tile[index10, index11].type = (ushort) 48; + else if (index10 == i1 - num3 + 1 && index11 % 2 == 0 || index10 == i1 + num3 - 1 && index11 % 2 == 0 || index11 == index1 + num4 - 1 && index10 % 2 == 0) + Main.tile[index10, index11].type = (ushort) 48; + else + Main.tile[index10, index11].active(false); + } + } + } + return true; + } + + public static void DungeonHalls(int i, int j, ushort tileType, int wallType, bool forceX = false) + { + Vector2 zero1 = Vector2.Zero; + double num1 = (double) WorldGen.genRand.Next(4, 6); + double num2 = num1; + Vector2 zero2 = Vector2.Zero; + Vector2 zero3 = Vector2.Zero; + Vector2 vector2; + vector2.X = (float) i; + vector2.Y = (float) j; + int num3 = WorldGen.genRand.Next(35, 80); + bool flag1 = false; + if (WorldGen.genRand.Next(5) == 0) + flag1 = true; + if (forceX) + { + num3 += 20; + WorldGen.lastDungeonHall = Vector2.Zero; + } + else if (WorldGen.genRand.Next(5) == 0) + { + num1 *= 2.0; + num3 /= 2; + } + bool flag2 = false; + bool flag3 = false; + bool flag4 = true; + while (!flag2) + { + bool flag5 = false; + int num4; + if (flag4 && !forceX) + { + bool flag6 = true; + bool flag7 = true; + bool flag8 = true; + bool flag9 = true; + int num5 = num3; + bool flag10 = false; + for (int index1 = j; index1 > j - num5; --index1) + { + int index2 = i; + if ((int) Main.tile[index2, index1].wall == wallType) + { + if (flag10) + { + flag6 = false; + break; + } + } + else + flag10 = true; + } + bool flag11 = false; + for (int index3 = j; index3 < j + num5; ++index3) + { + int index4 = i; + if ((int) Main.tile[index4, index3].wall == wallType) + { + if (flag11) + { + flag7 = false; + break; + } + } + else + flag11 = true; + } + bool flag12 = false; + for (int index5 = i; index5 > i - num5; --index5) + { + int index6 = j; + if ((int) Main.tile[index5, index6].wall == wallType) + { + if (flag12) + { + flag8 = false; + break; + } + } + else + flag12 = true; + } + bool flag13 = false; + for (int index7 = i; index7 < i + num5; ++index7) + { + int index8 = j; + if ((int) Main.tile[index7, index8].wall == wallType) + { + if (flag13) + { + flag9 = false; + break; + } + } + else + flag13 = true; + } + if (!flag8 && !flag9 && !flag6 && !flag7) + { + num4 = WorldGen.genRand.Next(2) != 0 ? 1 : -1; + if (WorldGen.genRand.Next(2) == 0) + flag5 = true; + } + else + { + WorldGen.genRand.Next(4); + int num6; + do + { + num6 = WorldGen.genRand.Next(4); + } + while (!(num6 == 0 & flag6) && !(num6 == 1 & flag7) && !(num6 == 2 & flag8) && !(num6 == 3 & flag9)); + switch (num6) + { + case 0: + num4 = -1; + break; + case 1: + num4 = 1; + break; + default: + flag5 = true; + num4 = num6 != 2 ? 1 : -1; + break; + } + } + } + else + { + num4 = WorldGen.genRand.Next(2) != 0 ? 1 : -1; + if (WorldGen.genRand.Next(2) == 0) + flag5 = true; + } + flag4 = false; + if (forceX) + flag5 = true; + if (flag5) + { + zero2.Y = 0.0f; + zero2.X = (float) num4; + zero3.Y = 0.0f; + zero3.X = (float) -num4; + zero1.Y = 0.0f; + zero1.X = (float) num4; + if (WorldGen.genRand.Next(3) == 0) + zero1.Y = WorldGen.genRand.Next(2) != 0 ? 0.2f : -0.2f; + } + else + { + ++num1; + zero1.Y = (float) num4; + zero1.X = 0.0f; + zero2.X = 0.0f; + zero2.Y = (float) num4; + zero3.X = 0.0f; + zero3.Y = (float) -num4; + if (WorldGen.genRand.Next(3) != 0) + { + flag3 = true; + zero1.X = WorldGen.genRand.Next(2) != 0 ? (float) -WorldGen.genRand.Next(10, 20) * 0.1f : (float) WorldGen.genRand.Next(10, 20) * 0.1f; + } + else if (WorldGen.genRand.Next(2) == 0) + zero1.X = WorldGen.genRand.Next(2) != 0 ? (float) -WorldGen.genRand.Next(20, 40) * 0.01f : (float) WorldGen.genRand.Next(20, 40) * 0.01f; + else + num3 /= 2; + } + if (WorldGen.lastDungeonHall != zero3) + flag2 = true; + } + int num7 = 0; + if (!forceX) + { + if ((double) vector2.X > (double) (WorldGen.lastMaxTilesX - 200)) + { + int num8 = -1; + zero2.Y = 0.0f; + zero2.X = (float) num8; + zero1.Y = 0.0f; + zero1.X = (float) num8; + if (WorldGen.genRand.Next(3) == 0) + zero1.Y = WorldGen.genRand.Next(2) != 0 ? 0.2f : -0.2f; + } + else if ((double) vector2.X < 200.0) + { + int num9 = 1; + zero2.Y = 0.0f; + zero2.X = (float) num9; + zero1.Y = 0.0f; + zero1.X = (float) num9; + if (WorldGen.genRand.Next(3) == 0) + zero1.Y = WorldGen.genRand.Next(2) != 0 ? 0.2f : -0.2f; + } + else if ((double) vector2.Y > (double) (WorldGen.lastMaxTilesY - 300)) + { + int num10 = -1; + ++num1; + zero1.Y = (float) num10; + zero1.X = 0.0f; + zero2.X = 0.0f; + zero2.Y = (float) num10; + if (WorldGen.genRand.Next(2) == 0) + zero1.X = WorldGen.genRand.Next(2) != 0 ? (float) -WorldGen.genRand.Next(20, 50) * 0.01f : (float) WorldGen.genRand.Next(20, 50) * 0.01f; + } + else if ((double) vector2.Y < Main.rockLayer + 100.0) + { + int num11 = 1; + ++num1; + zero1.Y = (float) num11; + zero1.X = 0.0f; + zero2.X = 0.0f; + zero2.Y = (float) num11; + if (WorldGen.genRand.Next(3) != 0) + { + flag3 = true; + zero1.X = WorldGen.genRand.Next(2) != 0 ? (float) -WorldGen.genRand.Next(10, 20) * 0.1f : (float) WorldGen.genRand.Next(10, 20) * 0.1f; + } + else if (WorldGen.genRand.Next(2) == 0) + zero1.X = WorldGen.genRand.Next(2) != 0 ? (float) WorldGen.genRand.Next(20, 50) * 0.01f : (float) WorldGen.genRand.Next(20, 50) * 0.01f; + } + else if ((double) vector2.X < (double) (Main.maxTilesX / 2) && (double) vector2.X > (double) Main.maxTilesX * 0.25) + { + int num12 = -1; + zero2.Y = 0.0f; + zero2.X = (float) num12; + zero1.Y = 0.0f; + zero1.X = (float) num12; + if (WorldGen.genRand.Next(3) == 0) + zero1.Y = WorldGen.genRand.Next(2) != 0 ? 0.2f : -0.2f; + } + else if ((double) vector2.X > (double) (Main.maxTilesX / 2) && (double) vector2.X < (double) Main.maxTilesX * 0.75) + { + int num13 = 1; + zero2.Y = 0.0f; + zero2.X = (float) num13; + zero1.Y = 0.0f; + zero1.X = (float) num13; + if (WorldGen.genRand.Next(3) == 0) + zero1.Y = WorldGen.genRand.Next(2) != 0 ? 0.2f : -0.2f; + } + } + if ((double) zero2.Y == 0.0) + { + WorldGen.DDoorX[WorldGen.numDDoors] = (int) vector2.X; + WorldGen.DDoorY[WorldGen.numDDoors] = (int) vector2.Y; + WorldGen.DDoorPos[WorldGen.numDDoors] = 0; + ++WorldGen.numDDoors; + } + else + { + WorldGen.dungeonPlatformX[WorldGen.numDungeonPlatforms] = (int) vector2.X; + WorldGen.dungeonPlatformY[WorldGen.numDungeonPlatforms] = (int) vector2.Y; + ++WorldGen.numDungeonPlatforms; + } + WorldGen.lastDungeonHall = zero2; + if ((double) Math.Abs(zero1.X) > (double) Math.Abs(zero1.Y) && WorldGen.genRand.Next(3) != 0) + num1 = (double) (int) (num2 * ((double) WorldGen.genRand.Next(110, 150) * 0.01)); + while (num3 > 0) + { + ++num7; + if ((double) zero2.X > 0.0 && (double) vector2.X > (double) (Main.maxTilesX - 100)) + num3 = 0; + else if ((double) zero2.X < 0.0 && (double) vector2.X < 100.0) + num3 = 0; + else if ((double) zero2.Y > 0.0 && (double) vector2.Y > (double) (Main.maxTilesY - 100)) + num3 = 0; + else if ((double) zero2.Y < 0.0 && (double) vector2.Y < Main.rockLayer + 50.0) + num3 = 0; + --num3; + int num14 = (int) ((double) vector2.X - num1 - 4.0 - (double) WorldGen.genRand.Next(6)); + int num15 = (int) ((double) vector2.X + num1 + 4.0 + (double) WorldGen.genRand.Next(6)); + int num16 = (int) ((double) vector2.Y - num1 - 4.0 - (double) WorldGen.genRand.Next(6)); + int num17 = (int) ((double) vector2.Y + num1 + 4.0 + (double) WorldGen.genRand.Next(6)); + if (num14 < 0) + num14 = 0; + if (num15 > Main.maxTilesX) + num15 = Main.maxTilesX; + if (num16 < 0) + num16 = 0; + if (num17 > Main.maxTilesY) + num17 = Main.maxTilesY; + for (int index9 = num14; index9 < num15; ++index9) + { + for (int index10 = num16; index10 < num17; ++index10) + { + if (index9 < WorldGen.dMinX) + WorldGen.dMinX = index9; + if (index9 > WorldGen.dMaxX) + WorldGen.dMaxX = index9; + if (index10 > WorldGen.dMaxY) + WorldGen.dMaxY = index10; + Main.tile[index9, index10].liquid = (byte) 0; + if (!Main.wallDungeon[(int) Main.tile[index9, index10].wall]) + { + Main.tile[index9, index10].active(true); + Main.tile[index9, index10].type = tileType; + Main.tile[index9, index10].Clear(TileDataType.Slope); + } + } + } + for (int index11 = num14 + 1; index11 < num15 - 1; ++index11) + { + for (int index12 = num16 + 1; index12 < num17 - 1; ++index12) + Main.tile[index11, index12].wall = (ushort) wallType; + } + int num18 = 0; + if ((double) zero1.Y == 0.0 && WorldGen.genRand.Next((int) num1 + 1) == 0) + num18 = WorldGen.genRand.Next(1, 3); + else if ((double) zero1.X == 0.0 && WorldGen.genRand.Next((int) num1 - 1) == 0) + num18 = WorldGen.genRand.Next(1, 3); + else if (WorldGen.genRand.Next((int) num1 * 3) == 0) + num18 = WorldGen.genRand.Next(1, 3); + int num19 = (int) ((double) vector2.X - num1 * 0.5 - (double) num18); + int num20 = (int) ((double) vector2.X + num1 * 0.5 + (double) num18); + int num21 = (int) ((double) vector2.Y - num1 * 0.5 - (double) num18); + int num22 = (int) ((double) vector2.Y + num1 * 0.5 + (double) num18); + if (num19 < 0) + num19 = 0; + if (num20 > Main.maxTilesX) + num20 = Main.maxTilesX; + if (num21 < 0) + num21 = 0; + if (num22 > Main.maxTilesY) + num22 = Main.maxTilesY; + for (int index13 = num19; index13 < num20; ++index13) + { + for (int index14 = num21; index14 < num22; ++index14) + { + Main.tile[index13, index14].Clear(TileDataType.Slope); + if (flag1) + { + if (Main.tile[index13, index14].active() || (int) Main.tile[index13, index14].wall != wallType) + { + Main.tile[index13, index14].active(true); + Main.tile[index13, index14].type = WorldGen.crackedType; + } + } + else + Main.tile[index13, index14].active(false); + Main.tile[index13, index14].Clear(TileDataType.Slope); + Main.tile[index13, index14].wall = (ushort) wallType; + } + } + vector2 += zero1; + if (flag3 && num7 > WorldGen.genRand.Next(10, 20)) + { + num7 = 0; + zero1.X *= -1f; + } + } + WorldGen.dungeonX = (int) vector2.X; + WorldGen.dungeonY = (int) vector2.Y; + if ((double) zero2.Y == 0.0) + { + WorldGen.DDoorX[WorldGen.numDDoors] = (int) vector2.X; + WorldGen.DDoorY[WorldGen.numDDoors] = (int) vector2.Y; + WorldGen.DDoorPos[WorldGen.numDDoors] = 0; + ++WorldGen.numDDoors; + } + else + { + WorldGen.dungeonPlatformX[WorldGen.numDungeonPlatforms] = (int) vector2.X; + WorldGen.dungeonPlatformY[WorldGen.numDungeonPlatforms] = (int) vector2.Y; + ++WorldGen.numDungeonPlatforms; + } + } + + public static void DungeonRoom(int i, int j, ushort tileType, int wallType) + { + double num1 = (double) WorldGen.genRand.Next(15, 30); + Vector2 vector2_1; + vector2_1.X = (float) WorldGen.genRand.Next(-10, 11) * 0.1f; + vector2_1.Y = (float) WorldGen.genRand.Next(-10, 11) * 0.1f; + Vector2 vector2_2; + vector2_2.X = (float) i; + vector2_2.Y = (float) j - (float) num1 / 2f; + int num2 = WorldGen.genRand.Next(10, 20); + double num3 = (double) vector2_2.X; + double num4 = (double) vector2_2.X; + double num5 = (double) vector2_2.Y; + double num6 = (double) vector2_2.Y; + while (num2 > 0) + { + --num2; + int num7 = (int) ((double) vector2_2.X - num1 * 0.800000011920929 - 5.0); + int num8 = (int) ((double) vector2_2.X + num1 * 0.800000011920929 + 5.0); + int num9 = (int) ((double) vector2_2.Y - num1 * 0.800000011920929 - 5.0); + int num10 = (int) ((double) vector2_2.Y + num1 * 0.800000011920929 + 5.0); + if (num7 < 0) + num7 = 0; + if (num8 > Main.maxTilesX) + num8 = Main.maxTilesX; + if (num9 < 0) + num9 = 0; + if (num10 > Main.maxTilesY) + num10 = Main.maxTilesY; + for (int index1 = num7; index1 < num8; ++index1) + { + for (int index2 = num9; index2 < num10; ++index2) + { + if (index1 < WorldGen.dMinX) + WorldGen.dMinX = index1; + if (index1 > WorldGen.dMaxX) + WorldGen.dMaxX = index1; + if (index2 > WorldGen.dMaxY) + WorldGen.dMaxY = index2; + Main.tile[index1, index2].liquid = (byte) 0; + if (!Main.wallDungeon[(int) Main.tile[index1, index2].wall]) + { + Main.tile[index1, index2].Clear(TileDataType.Slope); + Main.tile[index1, index2].active(true); + Main.tile[index1, index2].type = tileType; + } + } + } + for (int index3 = num7 + 1; index3 < num8 - 1; ++index3) + { + for (int index4 = num9 + 1; index4 < num10 - 1; ++index4) + Main.tile[index3, index4].wall = (ushort) wallType; + } + int num11 = (int) ((double) vector2_2.X - num1 * 0.5); + int num12 = (int) ((double) vector2_2.X + num1 * 0.5); + int num13 = (int) ((double) vector2_2.Y - num1 * 0.5); + int num14 = (int) ((double) vector2_2.Y + num1 * 0.5); + if (num11 < 0) + num11 = 0; + if (num12 > Main.maxTilesX) + num12 = Main.maxTilesX; + if (num13 < 0) + num13 = 0; + if (num14 > Main.maxTilesY) + num14 = Main.maxTilesY; + if ((double) num11 < num3) + num3 = (double) num11; + if ((double) num12 > num4) + num4 = (double) num12; + if ((double) num13 < num5) + num5 = (double) num13; + if ((double) num14 > num6) + num6 = (double) num14; + for (int index5 = num11; index5 < num12; ++index5) + { + for (int index6 = num13; index6 < num14; ++index6) + { + Main.tile[index5, index6].active(false); + Main.tile[index5, index6].wall = (ushort) wallType; + } + } + vector2_2 += vector2_1; + vector2_1.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + vector2_1.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if ((double) vector2_1.X > 1.0) + vector2_1.X = 1f; + if ((double) vector2_1.X < -1.0) + vector2_1.X = -1f; + if ((double) vector2_1.Y > 1.0) + vector2_1.Y = 1f; + if ((double) vector2_1.Y < -1.0) + vector2_1.Y = -1f; + } + WorldGen.dRoomX[WorldGen.numDRooms] = (int) vector2_2.X; + WorldGen.dRoomY[WorldGen.numDRooms] = (int) vector2_2.Y; + WorldGen.dRoomSize[WorldGen.numDRooms] = (int) num1; + WorldGen.dRoomL[WorldGen.numDRooms] = (int) num3; + WorldGen.dRoomR[WorldGen.numDRooms] = (int) num4; + WorldGen.dRoomT[WorldGen.numDRooms] = (int) num5; + WorldGen.dRoomB[WorldGen.numDRooms] = (int) num6; + WorldGen.dRoomTreasure[WorldGen.numDRooms] = false; + ++WorldGen.numDRooms; + } + + public static void DungeonEnt(int i, int j, ushort tileType, int wallType) + { + int num1 = 60; + for (int index1 = i - num1; index1 < i + num1; ++index1) + { + for (int index2 = j - num1; index2 < j + num1; ++index2) + { + Main.tile[index1, index2].liquid = (byte) 0; + Main.tile[index1, index2].lava(false); + Main.tile[index1, index2].Clear(TileDataType.Slope); + } + } + double dxStrength1 = WorldGen.dxStrength1; + double dyStrength1 = WorldGen.dyStrength1; + Vector2 vector2; + vector2.X = (float) i; + vector2.Y = (float) j - (float) dyStrength1 / 2f; + WorldGen.dMinY = (int) vector2.Y; + int num2 = 1; + if (i > Main.maxTilesX / 2) + num2 = -1; + if (WorldGen.drunkWorldGen || WorldGen.getGoodWorldGen) + num2 *= -1; + int num3 = (int) ((double) vector2.X - dxStrength1 * 0.600000023841858 - (double) WorldGen.genRand.Next(2, 5)); + int num4 = (int) ((double) vector2.X + dxStrength1 * 0.600000023841858 + (double) WorldGen.genRand.Next(2, 5)); + int num5 = (int) ((double) vector2.Y - dyStrength1 * 0.600000023841858 - (double) WorldGen.genRand.Next(2, 5)); + int num6 = (int) ((double) vector2.Y + dyStrength1 * 0.600000023841858 + (double) WorldGen.genRand.Next(8, 16)); + if (num3 < 0) + num3 = 0; + if (num4 > Main.maxTilesX) + num4 = Main.maxTilesX; + if (num5 < 0) + num5 = 0; + if (num6 > Main.maxTilesY) + num6 = Main.maxTilesY; + for (int index3 = num3; index3 < num4; ++index3) + { + for (int index4 = num5; index4 < num6; ++index4) + { + Main.tile[index3, index4].liquid = (byte) 0; + if ((int) Main.tile[index3, index4].wall != wallType) + { + Main.tile[index3, index4].wall = (ushort) 0; + if (index3 > num3 + 1 && index3 < num4 - 2 && index4 > num5 + 1 && index4 < num6 - 2) + Main.tile[index3, index4].wall = (ushort) wallType; + Main.tile[index3, index4].active(true); + Main.tile[index3, index4].type = tileType; + Main.tile[index3, index4].Clear(TileDataType.Slope); + } + } + } + int num7 = num3; + int num8 = num3 + 5 + WorldGen.genRand.Next(4); + int num9 = num5 - 3 - WorldGen.genRand.Next(3); + int num10 = num5; + for (int index5 = num7; index5 < num8; ++index5) + { + for (int index6 = num9; index6 < num10; ++index6) + { + Main.tile[index5, index6].liquid = (byte) 0; + if ((int) Main.tile[index5, index6].wall != wallType) + { + Main.tile[index5, index6].active(true); + Main.tile[index5, index6].type = tileType; + Main.tile[index5, index6].Clear(TileDataType.Slope); + } + } + } + int num11 = num4 - 5 - WorldGen.genRand.Next(4); + int num12 = num4; + int num13 = num5 - 3 - WorldGen.genRand.Next(3); + int num14 = num5; + for (int index7 = num11; index7 < num12; ++index7) + { + for (int index8 = num13; index8 < num14; ++index8) + { + Main.tile[index7, index8].liquid = (byte) 0; + if ((int) Main.tile[index7, index8].wall != wallType) + { + Main.tile[index7, index8].active(true); + Main.tile[index7, index8].type = tileType; + Main.tile[index7, index8].Clear(TileDataType.Slope); + } + } + } + int num15 = 1 + WorldGen.genRand.Next(2); + int num16 = 2 + WorldGen.genRand.Next(4); + int num17 = 0; + for (int index9 = num3; index9 < num4; ++index9) + { + for (int index10 = num5 - num15; index10 < num5; ++index10) + { + Main.tile[index9, index10].liquid = (byte) 0; + if ((int) Main.tile[index9, index10].wall != wallType) + { + Main.tile[index9, index10].active(true); + Main.tile[index9, index10].type = tileType; + Main.tile[index9, index10].Clear(TileDataType.Slope); + } + } + ++num17; + if (num17 >= num16) + { + index9 += num16; + num17 = 0; + } + } + for (int index11 = num3; index11 < num4; ++index11) + { + for (int index12 = num6; (double) index12 < Main.worldSurface; ++index12) + { + Main.tile[index11, index12].liquid = (byte) 0; + if (!Main.wallDungeon[(int) Main.tile[index11, index12].wall]) + { + Main.tile[index11, index12].active(true); + Main.tile[index11, index12].type = tileType; + } + if (index11 > num3 && index11 < num4 - 1) + Main.tile[index11, index12].wall = (ushort) wallType; + Main.tile[index11, index12].Clear(TileDataType.Slope); + } + } + int num18 = (int) ((double) vector2.X - dxStrength1 * 0.600000023841858); + int num19 = (int) ((double) vector2.X + dxStrength1 * 0.600000023841858); + int num20 = (int) ((double) vector2.Y - dyStrength1 * 0.600000023841858); + int num21 = (int) ((double) vector2.Y + dyStrength1 * 0.600000023841858); + if (num18 < 0) + num18 = 0; + if (num19 > Main.maxTilesX) + num19 = Main.maxTilesX; + if (num20 < 0) + num20 = 0; + if (num21 > Main.maxTilesY) + num21 = Main.maxTilesY; + for (int index13 = num18; index13 < num19; ++index13) + { + for (int index14 = num20; index14 < num21; ++index14) + { + Main.tile[index13, index14].liquid = (byte) 0; + Main.tile[index13, index14].wall = (ushort) wallType; + Main.tile[index13, index14].Clear(TileDataType.Slope); + } + } + int num22 = (int) ((double) vector2.X - dxStrength1 * 0.6 - 1.0); + int num23 = (int) ((double) vector2.X + dxStrength1 * 0.6 + 1.0); + int num24 = (int) ((double) vector2.Y - dyStrength1 * 0.6 - 1.0); + int num25 = (int) ((double) vector2.Y + dyStrength1 * 0.6 + 1.0); + if (num22 < 0) + num22 = 0; + if (num23 > Main.maxTilesX) + num23 = Main.maxTilesX; + if (num24 < 0) + num24 = 0; + if (num25 > Main.maxTilesY) + num25 = Main.maxTilesY; + if (WorldGen.drunkWorldGen) + num22 -= 4; + for (int index15 = num22; index15 < num23; ++index15) + { + for (int index16 = num24; index16 < num25; ++index16) + { + Main.tile[index15, index16].liquid = (byte) 0; + Main.tile[index15, index16].wall = (ushort) wallType; + Main.tile[index15, index16].Clear(TileDataType.Slope); + } + } + int num26 = (int) ((double) vector2.X - dxStrength1 * 0.5); + int num27 = (int) ((double) vector2.X + dxStrength1 * 0.5); + int num28 = (int) ((double) vector2.Y - dyStrength1 * 0.5); + int num29 = (int) ((double) vector2.Y + dyStrength1 * 0.5); + if (num26 < 0) + num26 = 0; + if (num27 > Main.maxTilesX) + num27 = Main.maxTilesX; + if (num28 < 0) + num28 = 0; + if (num29 > Main.maxTilesY) + num29 = Main.maxTilesY; + for (int index17 = num26; index17 < num27; ++index17) + { + for (int index18 = num28; index18 < num29; ++index18) + { + Main.tile[index17, index18].liquid = (byte) 0; + Main.tile[index17, index18].active(false); + Main.tile[index17, index18].wall = (ushort) wallType; + } + } + int x = (int) vector2.X; + int index19 = num29; + for (int index20 = 0; index20 < 20; ++index20) + { + int index21 = (int) vector2.X - index20; + if (!Main.tile[index21, index19].active() && Main.wallDungeon[(int) Main.tile[index21, index19].wall]) + { + WorldGen.dungeonPlatformX[WorldGen.numDungeonPlatforms] = index21; + WorldGen.dungeonPlatformY[WorldGen.numDungeonPlatforms] = index19; + ++WorldGen.numDungeonPlatforms; + break; + } + int index22 = (int) vector2.X + index20; + if (!Main.tile[index22, index19].active() && Main.wallDungeon[(int) Main.tile[index22, index19].wall]) + { + WorldGen.dungeonPlatformX[WorldGen.numDungeonPlatforms] = index22; + WorldGen.dungeonPlatformY[WorldGen.numDungeonPlatforms] = index19; + ++WorldGen.numDungeonPlatforms; + break; + } + } + vector2.X += (float) (dxStrength1 * 0.600000023841858) * (float) num2; + vector2.Y += (float) dyStrength1 * 0.5f; + double dxStrength2 = WorldGen.dxStrength2; + double dyStrength2 = WorldGen.dyStrength2; + vector2.X += (float) (dxStrength2 * 0.550000011920929) * (float) num2; + vector2.Y -= (float) dyStrength2 * 0.5f; + int num30 = (int) ((double) vector2.X - dxStrength2 * 0.600000023841858 - (double) WorldGen.genRand.Next(1, 3)); + int num31 = (int) ((double) vector2.X + dxStrength2 * 0.600000023841858 + (double) WorldGen.genRand.Next(1, 3)); + int num32 = (int) ((double) vector2.Y - dyStrength2 * 0.600000023841858 - (double) WorldGen.genRand.Next(1, 3)); + int num33 = (int) ((double) vector2.Y + dyStrength2 * 0.600000023841858 + (double) WorldGen.genRand.Next(6, 16)); + if (num30 < 0) + num30 = 0; + if (num31 > Main.maxTilesX) + num31 = Main.maxTilesX; + if (num32 < 0) + num32 = 0; + if (num33 > Main.maxTilesY) + num33 = Main.maxTilesY; + for (int index23 = num30; index23 < num31; ++index23) + { + for (int index24 = num32; index24 < num33; ++index24) + { + Main.tile[index23, index24].liquid = (byte) 0; + if ((int) Main.tile[index23, index24].wall != wallType) + { + bool flag = true; + if (num2 < 0) + { + if ((double) index23 < (double) vector2.X - dxStrength2 * 0.5) + flag = false; + } + else if ((double) index23 > (double) vector2.X + dxStrength2 * 0.5 - 1.0) + flag = false; + if (flag) + { + Main.tile[index23, index24].wall = (ushort) 0; + Main.tile[index23, index24].active(true); + Main.tile[index23, index24].type = tileType; + Main.tile[index23, index24].Clear(TileDataType.Slope); + } + } + } + } + for (int index25 = num30; index25 < num31; ++index25) + { + for (int index26 = num33; (double) index26 < Main.worldSurface; ++index26) + { + Main.tile[index25, index26].liquid = (byte) 0; + if (!Main.wallDungeon[(int) Main.tile[index25, index26].wall]) + { + Main.tile[index25, index26].active(true); + Main.tile[index25, index26].type = tileType; + } + Main.tile[index25, index26].wall = (ushort) wallType; + Main.tile[index25, index26].Clear(TileDataType.Slope); + } + } + int num34 = (int) ((double) vector2.X - dxStrength2 * 0.5); + int num35 = (int) ((double) vector2.X + dxStrength2 * 0.5); + int num36 = num34; + if (num2 < 0) + ++num36; + int num37 = num36 + 5 + WorldGen.genRand.Next(4); + int num38 = num32 - 3 - WorldGen.genRand.Next(3); + int num39 = num32; + for (int index27 = num36; index27 < num37; ++index27) + { + for (int index28 = num38; index28 < num39; ++index28) + { + Main.tile[index27, index28].liquid = (byte) 0; + if ((int) Main.tile[index27, index28].wall != wallType) + { + Main.tile[index27, index28].active(true); + Main.tile[index27, index28].type = tileType; + Main.tile[index27, index28].Clear(TileDataType.Slope); + } + } + } + int num40 = num35 - 5 - WorldGen.genRand.Next(4); + int num41 = num35; + int num42 = num32 - 3 - WorldGen.genRand.Next(3); + int num43 = num32; + for (int index29 = num40; index29 < num41; ++index29) + { + for (int index30 = num42; index30 < num43; ++index30) + { + Main.tile[index29, index30].liquid = (byte) 0; + if ((int) Main.tile[index29, index30].wall != wallType) + { + Main.tile[index29, index30].active(true); + Main.tile[index29, index30].type = tileType; + Main.tile[index29, index30].Clear(TileDataType.Slope); + } + } + } + int num44 = 1 + WorldGen.genRand.Next(2); + int num45 = 2 + WorldGen.genRand.Next(4); + int num46 = 0; + if (num2 < 0) + ++num35; + for (int index31 = num34 + 1; index31 < num35 - 1; ++index31) + { + for (int index32 = num32 - num44; index32 < num32; ++index32) + { + Main.tile[index31, index32].liquid = (byte) 0; + if ((int) Main.tile[index31, index32].wall != wallType) + { + Main.tile[index31, index32].active(true); + Main.tile[index31, index32].type = tileType; + Main.tile[index31, index32].Clear(TileDataType.Slope); + } + } + ++num46; + if (num46 >= num45) + { + index31 += num45; + num46 = 0; + } + } + if (!WorldGen.drunkWorldGen) + { + int num47 = (int) ((double) vector2.X - dxStrength2 * 0.6); + int num48 = (int) ((double) vector2.X + dxStrength2 * 0.6); + int num49 = (int) ((double) vector2.Y - dyStrength2 * 0.6); + int num50 = (int) ((double) vector2.Y + dyStrength2 * 0.6); + if (num47 < 0) + num47 = 0; + if (num48 > Main.maxTilesX) + num48 = Main.maxTilesX; + if (num49 < 0) + num49 = 0; + if (num50 > Main.maxTilesY) + num50 = Main.maxTilesY; + for (int index33 = num47; index33 < num48; ++index33) + { + for (int index34 = num49; index34 < num50; ++index34) + { + Main.tile[index33, index34].liquid = (byte) 0; + Main.tile[index33, index34].wall = (ushort) 0; + } + } + } + int num51 = (int) ((double) vector2.X - dxStrength2 * 0.5); + int num52 = (int) ((double) vector2.X + dxStrength2 * 0.5); + int num53 = (int) ((double) vector2.Y - dyStrength2 * 0.5); + int num54 = (int) ((double) vector2.Y + dyStrength2 * 0.5); + if (num51 < 0) + num51 = 0; + if (num52 > Main.maxTilesX) + num52 = Main.maxTilesX; + if (num53 < 0) + num53 = 0; + if (num54 > Main.maxTilesY) + num54 = Main.maxTilesY; + for (int index35 = num51; index35 < num52; ++index35) + { + for (int index36 = num53; index36 < num54; ++index36) + { + Main.tile[index35, index36].liquid = (byte) 0; + Main.tile[index35, index36].active(false); + Main.tile[index35, index36].wall = (ushort) 0; + } + } + Main.dungeonX = (int) vector2.X; + Main.dungeonY = num54; + int index37 = NPC.NewNPC(Main.dungeonX * 16 + 8, Main.dungeonY * 16, 37); + Main.npc[index37].homeless = false; + Main.npc[index37].homeTileX = Main.dungeonX; + Main.npc[index37].homeTileY = Main.dungeonY; + if (WorldGen.drunkWorldGen) + { + int worldSurface = (int) Main.worldSurface; + while (Main.tile[WorldGen.dungeonX, worldSurface].active() || Main.tile[WorldGen.dungeonX, worldSurface].wall > (ushort) 0 || Main.tile[WorldGen.dungeonX, worldSurface - 1].active() || Main.tile[WorldGen.dungeonX, worldSurface - 1].wall > (ushort) 0 || Main.tile[WorldGen.dungeonX, worldSurface - 2].active() || Main.tile[WorldGen.dungeonX, worldSurface - 2].wall > (ushort) 0 || Main.tile[WorldGen.dungeonX, worldSurface - 3].active() || Main.tile[WorldGen.dungeonX, worldSurface - 3].wall > (ushort) 0 || Main.tile[WorldGen.dungeonX, worldSurface - 4].active() || Main.tile[WorldGen.dungeonX, worldSurface - 4].wall > (ushort) 0) + { + --worldSurface; + if (worldSurface < 50) + break; + } + if (worldSurface > 50) + WorldGen.GrowDungeonTree(WorldGen.dungeonX, worldSurface); + } + if (!WorldGen.drunkWorldGen) + { + int num55 = 100; + if (num2 == 1) + { + int num56 = 0; + for (int index38 = num52; index38 < num52 + num55; ++index38) + { + ++num56; + for (int index39 = num54 + num56; index39 < num54 + num55; ++index39) + { + Main.tile[index38, index39].liquid = (byte) 0; + Main.tile[index38, index39 - 1].liquid = (byte) 0; + Main.tile[index38, index39 - 2].liquid = (byte) 0; + Main.tile[index38, index39 - 3].liquid = (byte) 0; + if (!Main.wallDungeon[(int) Main.tile[index38, index39].wall] && Main.tile[index38, index39].wall != (ushort) 3 && Main.tile[index38, index39].wall != (ushort) 83) + { + Main.tile[index38, index39].active(true); + Main.tile[index38, index39].type = tileType; + Main.tile[index38, index39].Clear(TileDataType.Slope); + } + } + } + } + else + { + int num57 = 0; + for (int index40 = num51; index40 > num51 - num55; --index40) + { + ++num57; + for (int index41 = num54 + num57; index41 < num54 + num55; ++index41) + { + Main.tile[index40, index41].liquid = (byte) 0; + Main.tile[index40, index41 - 1].liquid = (byte) 0; + Main.tile[index40, index41 - 2].liquid = (byte) 0; + Main.tile[index40, index41 - 3].liquid = (byte) 0; + if (!Main.wallDungeon[(int) Main.tile[index40, index41].wall] && Main.tile[index40, index41].wall != (ushort) 3 && Main.tile[index40, index41].wall != (ushort) 83) + { + Main.tile[index40, index41].active(true); + Main.tile[index40, index41].type = tileType; + Main.tile[index40, index41].Clear(TileDataType.Slope); + } + } + } + } + } + int num58 = 1 + WorldGen.genRand.Next(2); + int num59 = 2 + WorldGen.genRand.Next(4); + int num60 = 0; + int num61 = (int) ((double) vector2.X - dxStrength2 * 0.5); + int num62 = (int) ((double) vector2.X + dxStrength2 * 0.5); + int num63; + int num64; + if (WorldGen.drunkWorldGen) + { + if (num2 == 1) + { + num63 = num62 - 1; + num64 = num61 - 1; + } + else + { + num64 = num61 + 1; + num63 = num62 + 1; + } + } + else + { + num64 = num61 + 2; + num63 = num62 - 2; + } + for (int i1 = num64; i1 < num63; ++i1) + { + for (int j1 = num53; j1 < num54 + 1; ++j1) + WorldGen.PlaceWall(i1, j1, wallType, true); + if (!WorldGen.drunkWorldGen) + { + ++num60; + if (num60 >= num59) + { + i1 += num59 * 2; + num60 = 0; + } + } + } + if (WorldGen.drunkWorldGen) + { + int num65 = (int) ((double) vector2.X - dxStrength2 * 0.5); + int num66 = (int) ((double) vector2.X + dxStrength2 * 0.5); + if (num2 == 1) + num65 = num66 - 3; + else + num66 = num65 + 3; + for (int index42 = num65; index42 < num66; ++index42) + { + for (int index43 = num53; index43 < num54 + 1; ++index43) + { + Main.tile[index42, index43].active(true); + Main.tile[index42, index43].type = tileType; + Main.tile[index42, index43].Clear(TileDataType.Slope); + } + } + } + vector2.X -= (float) (dxStrength2 * 0.600000023841858) * (float) num2; + vector2.Y += (float) dyStrength2 * 0.5f; + double num67 = 15.0; + double num68 = 3.0; + vector2.Y -= (float) num68 * 0.5f; + int num69 = (int) ((double) vector2.X - num67 * 0.5); + int num70 = (int) ((double) vector2.X + num67 * 0.5); + int num71 = (int) ((double) vector2.Y - num68 * 0.5); + int num72 = (int) ((double) vector2.Y + num68 * 0.5); + if (num69 < 0) + num69 = 0; + if (num70 > Main.maxTilesX) + num70 = Main.maxTilesX; + if (num71 < 0) + num71 = 0; + if (num72 > Main.maxTilesY) + num72 = Main.maxTilesY; + for (int index44 = num69; index44 < num70; ++index44) + { + for (int index45 = num71; index45 < num72; ++index45) + Main.tile[index44, index45].active(false); + } + if (num2 < 0) + --vector2.X; + WorldGen.PlaceTile((int) vector2.X, (int) vector2.Y + 1, 10, true, style: 13); + } + + public static bool AddBuriedChest( + Point point, + int contain = 0, + bool notNearOtherChests = false, + int Style = -1) + { + return WorldGen.AddBuriedChest(point.X, point.Y, contain, notNearOtherChests, Style); + } + + public static bool IsChestRigged(int x, int y) => Main.tile[x, y].type == (ushort) 467 && (int) Main.tile[x, y].frameX / 36 == 4; + + private static bool IsUndergroundDesert(int x, int y) + { + if ((double) y < Main.worldSurface || (double) x < (double) Main.maxTilesX * 0.15 || (double) x > (double) Main.maxTilesX * 0.85) + return false; + int num = 15; + for (int index1 = x - num; index1 <= x + num; ++index1) + { + for (int index2 = y - num; index2 <= y + num; ++index2) + { + if (Main.tile[index1, index2].wall == (ushort) 187 || Main.tile[index1, index2].wall == (ushort) 216) + return true; + } + } + return false; + } + + private static bool IsDungeon(int x, int y) => (double) y >= Main.worldSurface && x >= 0 && x <= Main.maxTilesX && Main.wallDungeon[(int) Main.tile[x, y].wall]; + + public static bool AddBuriedChest( + int i, + int j, + int contain = 0, + bool notNearOtherChests = false, + int Style = -1, + bool trySlope = false, + ushort chestTileType = 0) + { + if (chestTileType == (ushort) 0) + chestTileType = (ushort) 21; + bool flag1 = false; + bool flag2 = false; + bool flag3 = false; + bool flag4 = false; + bool flag5 = false; + bool flag6 = false; + bool flag7 = false; + bool flag8 = false; + int maxValue = 15; + for (int index1 = j; index1 < Main.maxTilesY - 10; ++index1) + { + int num1 = -1; + int num2 = -1; + if (trySlope && Main.tile[i, index1].active() && Main.tileSolid[(int) Main.tile[i, index1].type] && !Main.tileSolidTop[(int) Main.tile[i, index1].type]) + { + if (Style == 17) + { + int num3 = 30; + for (int x = i - num3; x <= i + num3; ++x) + { + for (int y = index1 - num3; y <= index1 + num3; ++y) + { + if (!WorldGen.InWorld(x, y, 5) || Main.tile[x, y].active() && (Main.tile[x, y].type == (ushort) 21 || Main.tile[x, y].type == (ushort) 467)) + return false; + } + } + } + if (Main.tile[i - 1, index1].topSlope()) + { + num1 = (int) Main.tile[i - 1, index1].slope(); + Main.tile[i - 1, index1].slope((byte) 0); + } + if (Main.tile[i, index1].topSlope()) + { + num2 = (int) Main.tile[i, index1].slope(); + Main.tile[i, index1].slope((byte) 0); + } + } + int num4 = 2; + for (int index2 = i - num4; index2 <= i + num4; ++index2) + { + for (int index3 = index1 - num4; index3 <= index1 + num4; ++index3) + { + if (Main.tile[index2, index3].active() && (TileID.Sets.Boulders[(int) Main.tile[index2, index3].type] || Main.tile[index2, index3].type == (ushort) 26 || Main.tile[index2, index3].type == (ushort) 237)) + return false; + } + } + if (WorldGen.SolidTile(i, index1)) + { + bool flag9 = false; + int num5 = i; + int num6 = index1; + int style = 0; + if ((double) num6 >= Main.worldSurface + 25.0 || contain > 0) + style = 1; + if (Style >= 0) + style = Style; + if (contain == 0 && (double) num6 >= Main.worldSurface + 25.0 && num6 <= Main.maxTilesY - 205 && WorldGen.IsUndergroundDesert(i, index1)) + { + flag2 = true; + style = 10; + chestTileType = (ushort) 467; + int num7 = -1; + int num8 = -1; + for (int index4 = (int) Main.worldSurface - 100; index4 < Main.maxTilesY - 200; ++index4) + { + for (int index5 = 100; index5 < Main.maxTilesX - 100; ++index5) + { + if (Main.tile[index5, index4].wall == (ushort) 216 || Main.tile[index5, index4].wall == (ushort) 187) + { + if (num7 == -1) + num7 = index4; + num8 = index4; + break; + } + } + } + if (num6 > (num7 * 3 + num8 * 4) / 7) + contain = (int) Utils.SelectRandom(WorldGen.genRand, (short) 4061, (short) 4062, (short) 4276); + else + contain = (int) Utils.SelectRandom(WorldGen.genRand, (short) 4056, (short) 4055, (short) 4262, (short) 4263); + if (WorldGen.getGoodWorldGen && WorldGen.genRand.Next(maxValue) == 0) + contain = 52; + } + if (chestTileType == (ushort) 21 && (style == 11 || contain == 0 && (double) num6 >= Main.worldSurface + 25.0 && num6 <= Main.maxTilesY - 205 && (Main.tile[i, index1].type == (ushort) 147 || Main.tile[i, index1].type == (ushort) 161 || Main.tile[i, index1].type == (ushort) 162))) + { + flag1 = true; + style = 11; + switch (WorldGen.genRand.Next(6)) + { + case 0: + contain = 670; + break; + case 1: + contain = 724; + break; + case 2: + contain = 950; + break; + case 3: + contain = 1319; + break; + case 4: + contain = 987; + break; + default: + contain = 1579; + break; + } + if (WorldGen.genRand.Next(20) == 0) + contain = 997; + if (WorldGen.genRand.Next(50) == 0) + contain = 669; + if (WorldGen.getGoodWorldGen && WorldGen.genRand.Next(maxValue) == 0) + contain = 52; + } + if (chestTileType == (ushort) 21 && (Style == 10 || contain == 211 || contain == 212 || contain == 213 || contain == 753)) + { + flag3 = true; + style = 10; + if (WorldGen.getGoodWorldGen && WorldGen.genRand.Next(maxValue) == 0) + contain = 52; + } + if (chestTileType == (ushort) 21 && num6 > Main.maxTilesY - 205 && contain == 0) + { + flag7 = true; + if (WorldGen.hellChest == WorldGen.hellChestItem[1]) + { + contain = 220; + style = 4; + flag9 = true; + } + else if (WorldGen.hellChest == WorldGen.hellChestItem[2]) + { + contain = 112; + style = 4; + flag9 = true; + } + else if (WorldGen.hellChest == WorldGen.hellChestItem[3]) + { + contain = 218; + style = 4; + flag9 = true; + } + else if (WorldGen.hellChest == WorldGen.hellChestItem[4]) + { + contain = 274; + style = 4; + flag9 = true; + } + else if (WorldGen.hellChest == WorldGen.hellChestItem[5]) + { + contain = 3019; + style = 4; + flag9 = true; + } + else + { + contain = 5010; + style = 4; + flag9 = true; + } + if (WorldGen.getGoodWorldGen && WorldGen.genRand.Next(maxValue) == 0) + contain = 52; + } + if (chestTileType == (ushort) 21 && style == 17) + { + flag4 = true; + if (WorldGen.getGoodWorldGen && WorldGen.genRand.Next(maxValue) == 0) + contain = 52; + } + if (chestTileType == (ushort) 21 && style == 12) + { + flag5 = true; + if (WorldGen.getGoodWorldGen && WorldGen.genRand.Next(maxValue) == 0) + contain = 52; + } + if (chestTileType == (ushort) 21 && style == 32) + { + flag6 = true; + if (WorldGen.getGoodWorldGen && WorldGen.genRand.Next(maxValue) == 0) + contain = 52; + } + if (chestTileType == (ushort) 21 && style != 0 && WorldGen.IsDungeon(i, index1)) + { + flag8 = true; + if (WorldGen.getGoodWorldGen && WorldGen.genRand.Next(maxValue) == 0) + contain = 52; + } + int index6 = chestTileType != (ushort) 467 ? WorldGen.PlaceChest(num5 - 1, num6 - 1, chestTileType, notNearOtherChests, style) : WorldGen.PlaceChest(num5 - 1, num6 - 1, chestTileType, notNearOtherChests, style); + if (index6 >= 0) + { + if (flag9) + { + ++WorldGen.hellChest; + if (WorldGen.hellChest > 4) + WorldGen.hellChest = 0; + } + Chest chest = Main.chest[index6]; + int index7 = 0; + while (index7 == 0) + { + if (style == 0 && (double) num6 < Main.worldSurface + 25.0 || contain == 848) + { + if (contain > 0) + { + chest.item[index7].SetDefaults(contain); + chest.item[index7].Prefix(-1); + ++index7; + switch (contain) + { + case 832: + chest.item[index7].SetDefaults(933); + ++index7; + if (WorldGen.genRand.Next(10) == 0) + { + int Type = WorldGen.genRand.Next(2); + switch (Type) + { + case 0: + Type = 4429; + break; + case 1: + Type = 4427; + break; + } + chest.item[index7].SetDefaults(Type); + ++index7; + break; + } + break; + case 848: + chest.item[index7].SetDefaults(866); + ++index7; + break; + } + } + else + { + int num9 = WorldGen.genRand.Next(12); + if (num9 == 0) + { + chest.item[index7].SetDefaults(280); + chest.item[index7].Prefix(-1); + } + if (num9 == 1) + { + chest.item[index7].SetDefaults(281); + chest.item[index7].Prefix(-1); + } + if (num9 == 2) + { + chest.item[index7].SetDefaults(284); + chest.item[index7].Prefix(-1); + } + if (num9 == 3) + { + chest.item[index7].SetDefaults(282); + chest.item[index7].stack = WorldGen.genRand.Next(40, 75); + } + if (num9 == 4) + { + chest.item[index7].SetDefaults(279); + chest.item[index7].stack = WorldGen.genRand.Next(150, 300); + } + if (num9 == 5) + { + chest.item[index7].SetDefaults(285); + chest.item[index7].Prefix(-1); + } + if (num9 == 6) + { + chest.item[index7].SetDefaults(953); + chest.item[index7].Prefix(-1); + } + if (num9 == 7) + { + chest.item[index7].SetDefaults(946); + chest.item[index7].Prefix(-1); + } + if (num9 == 8) + { + chest.item[index7].SetDefaults(3068); + chest.item[index7].Prefix(-1); + } + if (num9 == 9) + { + chest.item[index7].SetDefaults(3069); + chest.item[index7].Prefix(-1); + } + if (num9 == 10) + { + chest.item[index7].SetDefaults(3084); + chest.item[index7].Prefix(-1); + } + if (num9 == 11) + { + chest.item[index7].SetDefaults(4341); + chest.item[index7].Prefix(-1); + } + ++index7; + } + if (WorldGen.genRand.Next(6) == 0) + { + chest.item[index7].SetDefaults(3093); + chest.item[index7].stack = 1; + if (WorldGen.genRand.Next(5) == 0) + chest.item[index7].stack += WorldGen.genRand.Next(2); + if (WorldGen.genRand.Next(10) == 0) + chest.item[index7].stack += WorldGen.genRand.Next(3); + ++index7; + } + if (WorldGen.genRand.Next(6) == 0) + { + chest.item[index7].SetDefaults(4345); + chest.item[index7].stack = 1; + if (WorldGen.genRand.Next(5) == 0) + chest.item[index7].stack += WorldGen.genRand.Next(2); + if (WorldGen.genRand.Next(10) == 0) + chest.item[index7].stack += WorldGen.genRand.Next(3); + ++index7; + } + if (WorldGen.genRand.Next(3) == 0) + { + chest.item[index7].SetDefaults(168); + chest.item[index7].stack = WorldGen.genRand.Next(3, 6); + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num10 = WorldGen.genRand.Next(2); + int num11 = WorldGen.genRand.Next(8) + 3; + if (num10 == 0) + chest.item[index7].SetDefaults(WorldGen.copperBar); + if (num10 == 1) + chest.item[index7].SetDefaults(WorldGen.ironBar); + chest.item[index7].stack = num11; + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num12 = WorldGen.genRand.Next(50, 101); + chest.item[index7].SetDefaults(965); + chest.item[index7].stack = num12; + ++index7; + } + if (WorldGen.genRand.Next(3) != 0) + { + int num13 = WorldGen.genRand.Next(2); + int num14 = WorldGen.genRand.Next(26) + 25; + if (num13 == 0) + chest.item[index7].SetDefaults(40); + if (num13 == 1) + chest.item[index7].SetDefaults(42); + chest.item[index7].stack = num14; + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num15 = WorldGen.genRand.Next(3) + 3; + chest.item[index7].SetDefaults(28); + chest.item[index7].stack = num15; + ++index7; + } + if (WorldGen.genRand.Next(3) != 0) + { + chest.item[index7].SetDefaults(2350); + chest.item[index7].stack = WorldGen.genRand.Next(3, 6); + ++index7; + } + if (WorldGen.genRand.Next(3) > 0) + { + int num16 = WorldGen.genRand.Next(6); + int num17 = WorldGen.genRand.Next(1, 3); + if (num16 == 0) + chest.item[index7].SetDefaults(292); + if (num16 == 1) + chest.item[index7].SetDefaults(298); + if (num16 == 2) + chest.item[index7].SetDefaults(299); + if (num16 == 3) + chest.item[index7].SetDefaults(290); + if (num16 == 4) + chest.item[index7].SetDefaults(2322); + if (num16 == 5) + chest.item[index7].SetDefaults(2325); + chest.item[index7].stack = num17; + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num18 = WorldGen.genRand.Next(2); + int num19 = WorldGen.genRand.Next(11) + 10; + if (num18 == 0) + chest.item[index7].SetDefaults(8); + if (num18 == 1) + chest.item[index7].SetDefaults(31); + chest.item[index7].stack = num19; + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + chest.item[index7].SetDefaults(72); + chest.item[index7].stack = WorldGen.genRand.Next(10, 30); + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + chest.item[index7].SetDefaults(9); + chest.item[index7].stack = WorldGen.genRand.Next(50, 100); + ++index7; + } + } + else if ((double) num6 < Main.rockLayer) + { + if (contain > 0) + { + if (contain == 832) + { + chest.item[index7].SetDefaults(933); + ++index7; + } + chest.item[index7].SetDefaults(contain); + chest.item[index7].Prefix(-1); + ++index7; + if (flag4 && WorldGen.genRand.Next(2) == 0) + { + chest.item[index7].SetDefaults(4460); + ++index7; + } + if (flag5 && WorldGen.genRand.Next(10) == 0) + { + int Type = WorldGen.genRand.Next(2); + switch (Type) + { + case 0: + Type = 4429; + break; + case 1: + Type = 4427; + break; + } + chest.item[index7].SetDefaults(Type); + ++index7; + } + if (flag8 && (!WorldGen.generatedShadowKey || WorldGen.genRand.Next(3) == 0)) + { + WorldGen.generatedShadowKey = true; + chest.item[index7].SetDefaults(329); + ++index7; + } + } + else + { + switch (WorldGen.genRand.Next(6)) + { + case 0: + chest.item[index7].SetDefaults(49); + chest.item[index7].Prefix(-1); + break; + case 1: + chest.item[index7].SetDefaults(50); + chest.item[index7].Prefix(-1); + break; + case 2: + chest.item[index7].SetDefaults(53); + chest.item[index7].Prefix(-1); + break; + case 3: + chest.item[index7].SetDefaults(54); + chest.item[index7].Prefix(-1); + break; + case 4: + chest.item[index7].SetDefaults(5011); + chest.item[index7].Prefix(-1); + break; + default: + chest.item[index7].SetDefaults(975); + chest.item[index7].Prefix(-1); + break; + } + ++index7; + if (WorldGen.genRand.Next(20) == 0) + { + chest.item[index7].SetDefaults(997); + chest.item[index7].Prefix(-1); + ++index7; + } + else if (WorldGen.genRand.Next(20) == 0) + { + chest.item[index7].SetDefaults(930); + chest.item[index7].Prefix(-1); + int index8 = index7 + 1; + chest.item[index8].SetDefaults(931); + chest.item[index8].stack = WorldGen.genRand.Next(26) + 25; + index7 = index8 + 1; + } + if (flag6 && WorldGen.genRand.Next(2) == 0) + { + chest.item[index7].SetDefaults(4450); + ++index7; + } + if (flag6 && WorldGen.genRand.Next(3) == 0) + { + chest.item[index7].SetDefaults(4779); + int index9 = index7 + 1; + chest.item[index9].SetDefaults(4780); + int index10 = index9 + 1; + chest.item[index10].SetDefaults(4781); + index7 = index10 + 1; + } + } + if (flag2) + { + if (WorldGen.genRand.Next(3) == 0) + { + chest.item[index7].SetDefaults(4423); + chest.item[index7].stack = WorldGen.genRand.Next(10, 20); + ++index7; + } + } + else if (WorldGen.genRand.Next(3) == 0) + { + chest.item[index7].SetDefaults(166); + chest.item[index7].stack = WorldGen.genRand.Next(10, 20); + ++index7; + } + if (WorldGen.genRand.Next(5) == 0) + { + chest.item[index7].SetDefaults(52); + ++index7; + } + if (WorldGen.genRand.Next(3) == 0) + { + int num20 = WorldGen.genRand.Next(50, 101); + chest.item[index7].SetDefaults(965); + chest.item[index7].stack = num20; + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num21 = WorldGen.genRand.Next(2); + int num22 = WorldGen.genRand.Next(10) + 5; + if (num21 == 0) + chest.item[index7].SetDefaults(WorldGen.ironBar); + if (num21 == 1) + chest.item[index7].SetDefaults(WorldGen.silverBar); + chest.item[index7].stack = num22; + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num23 = WorldGen.genRand.Next(2); + int num24 = WorldGen.genRand.Next(25) + 25; + if (num23 == 0) + chest.item[index7].SetDefaults(40); + if (num23 == 1) + chest.item[index7].SetDefaults(42); + chest.item[index7].stack = num24; + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num25 = WorldGen.genRand.Next(3) + 3; + chest.item[index7].SetDefaults(28); + chest.item[index7].stack = num25; + ++index7; + } + if (WorldGen.genRand.Next(3) > 0) + { + int num26 = WorldGen.genRand.Next(9); + int num27 = WorldGen.genRand.Next(1, 3); + if (num26 == 0) + chest.item[index7].SetDefaults(289); + if (num26 == 1) + chest.item[index7].SetDefaults(298); + if (num26 == 2) + chest.item[index7].SetDefaults(299); + if (num26 == 3) + chest.item[index7].SetDefaults(290); + if (num26 == 4) + chest.item[index7].SetDefaults(303); + if (num26 == 5) + chest.item[index7].SetDefaults(291); + if (num26 == 6) + chest.item[index7].SetDefaults(304); + if (num26 == 7) + chest.item[index7].SetDefaults(2322); + if (num26 == 8) + chest.item[index7].SetDefaults(2329); + chest.item[index7].stack = num27; + ++index7; + } + if (WorldGen.genRand.Next(3) != 0) + { + int num28 = WorldGen.genRand.Next(2, 5); + chest.item[index7].SetDefaults(2350); + chest.item[index7].stack = num28; + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num29 = WorldGen.genRand.Next(11) + 10; + if (style == 11) + chest.item[index7].SetDefaults(974); + else + chest.item[index7].SetDefaults(8); + chest.item[index7].stack = num29; + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + chest.item[index7].SetDefaults(72); + chest.item[index7].stack = WorldGen.genRand.Next(50, 90); + ++index7; + } + } + else if (num6 < Main.maxTilesY - 250) + { + if (contain > 0) + { + chest.item[index7].SetDefaults(contain); + chest.item[index7].Prefix(-1); + ++index7; + if (flag1 && WorldGen.genRand.Next(5) == 0) + { + chest.item[index7].SetDefaults(3199); + ++index7; + } + if (flag2) + { + if (WorldGen.genRand.Next(7) == 0) + { + chest.item[index7].SetDefaults(4346); + ++index7; + } + if (WorldGen.genRand.Next(15) == 0) + { + chest.item[index7].SetDefaults(4066); + ++index7; + } + } + if (flag3 && WorldGen.genRand.Next(6) == 0) + { + Item[] objArray1 = chest.item; + int index11 = index7; + int num30 = index11 + 1; + objArray1[index11].SetDefaults(3360); + Item[] objArray2 = chest.item; + int index12 = num30; + index7 = index12 + 1; + objArray2[index12].SetDefaults(3361); + } + if (flag3 && WorldGen.genRand.Next(10) == 0) + chest.item[index7++].SetDefaults(4426); + if (flag4 && WorldGen.genRand.Next(2) == 0) + { + chest.item[index7].SetDefaults(4460); + ++index7; + } + if (flag8 && (!WorldGen.generatedShadowKey || WorldGen.genRand.Next(3) == 0)) + { + WorldGen.generatedShadowKey = true; + chest.item[index7].SetDefaults(329); + ++index7; + } + } + else + { + int num31 = WorldGen.genRand.Next(7); + if (WorldGen.genRand.Next(40) == 0 && num6 > WorldGen.lavaLine) + { + chest.item[index7].SetDefaults(906); + chest.item[index7].Prefix(-1); + } + else if (WorldGen.genRand.Next(15) == 0) + { + chest.item[index7].SetDefaults(997); + chest.item[index7].Prefix(-1); + } + else + { + if (num31 == 0) + { + chest.item[index7].SetDefaults(49); + chest.item[index7].Prefix(-1); + } + if (num31 == 1) + { + chest.item[index7].SetDefaults(50); + chest.item[index7].Prefix(-1); + } + if (num31 == 2) + { + chest.item[index7].SetDefaults(53); + chest.item[index7].Prefix(-1); + } + if (num31 == 3) + { + chest.item[index7].SetDefaults(54); + chest.item[index7].Prefix(-1); + } + if (num31 == 4) + { + chest.item[index7].SetDefaults(5011); + chest.item[index7].Prefix(-1); + } + if (num31 == 5) + { + chest.item[index7].SetDefaults(975); + chest.item[index7].Prefix(-1); + } + if (num31 == 6) + { + chest.item[index7].SetDefaults(930); + chest.item[index7].Prefix(-1); + ++index7; + chest.item[index7].SetDefaults(931); + chest.item[index7].stack = WorldGen.genRand.Next(26) + 25; + } + } + ++index7; + if (flag6 && WorldGen.genRand.Next(2) == 0) + { + chest.item[index7].SetDefaults(4450); + ++index7; + } + if (flag6 && WorldGen.genRand.Next(3) == 0) + { + chest.item[index7].SetDefaults(4779); + int index13 = index7 + 1; + chest.item[index13].SetDefaults(4780); + int index14 = index13 + 1; + chest.item[index14].SetDefaults(4781); + index7 = index14 + 1; + } + } + if (WorldGen.genRand.Next(5) == 0) + { + chest.item[index7].SetDefaults(43); + ++index7; + } + if (WorldGen.genRand.Next(3) == 0) + { + chest.item[index7].SetDefaults(167); + ++index7; + } + if (WorldGen.genRand.Next(4) == 0) + { + chest.item[index7].SetDefaults(51); + chest.item[index7].stack = WorldGen.genRand.Next(26) + 25; + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num32 = WorldGen.genRand.Next(2); + int num33 = WorldGen.genRand.Next(8) + 3; + if (num32 == 0) + chest.item[index7].SetDefaults(WorldGen.goldBar); + if (num32 == 1) + chest.item[index7].SetDefaults(WorldGen.silverBar); + chest.item[index7].stack = num33; + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num34 = WorldGen.genRand.Next(2); + int num35 = WorldGen.genRand.Next(26) + 25; + if (num34 == 0) + chest.item[index7].SetDefaults(41); + if (num34 == 1) + chest.item[index7].SetDefaults(279); + chest.item[index7].stack = num35; + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num36 = WorldGen.genRand.Next(3) + 3; + chest.item[index7].SetDefaults(188); + chest.item[index7].stack = num36; + ++index7; + } + if (WorldGen.genRand.Next(3) > 0) + { + int num37 = WorldGen.genRand.Next(6); + int num38 = WorldGen.genRand.Next(1, 3); + if (num37 == 0) + chest.item[index7].SetDefaults(296); + if (num37 == 1) + chest.item[index7].SetDefaults(295); + if (num37 == 2) + chest.item[index7].SetDefaults(299); + if (num37 == 3) + chest.item[index7].SetDefaults(302); + if (num37 == 4) + chest.item[index7].SetDefaults(303); + if (num37 == 5) + chest.item[index7].SetDefaults(305); + chest.item[index7].stack = num38; + ++index7; + } + if (WorldGen.genRand.Next(3) > 1) + { + int num39 = WorldGen.genRand.Next(6); + int num40 = WorldGen.genRand.Next(1, 3); + if (num39 == 0) + chest.item[index7].SetDefaults(301); + if (num39 == 1) + chest.item[index7].SetDefaults(297); + if (num39 == 2) + chest.item[index7].SetDefaults(304); + if (num39 == 3) + chest.item[index7].SetDefaults(2329); + if (num39 == 4) + chest.item[index7].SetDefaults(2351); + if (num39 == 5) + chest.item[index7].SetDefaults(2326); + chest.item[index7].stack = num40; + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num41 = WorldGen.genRand.Next(2, 5); + chest.item[index7].SetDefaults(2350); + chest.item[index7].stack = num41; + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num42 = WorldGen.genRand.Next(2); + int num43 = WorldGen.genRand.Next(15) + 15; + if (num42 == 0) + { + if (style == 11) + chest.item[index7].SetDefaults(974); + else + chest.item[index7].SetDefaults(8); + } + if (num42 == 1) + chest.item[index7].SetDefaults(282); + chest.item[index7].stack = num43; + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + chest.item[index7].SetDefaults(73); + chest.item[index7].stack = WorldGen.genRand.Next(1, 3); + ++index7; + } + } + else + { + if (contain > 0) + { + chest.item[index7].SetDefaults(contain); + chest.item[index7].Prefix(-1); + ++index7; + if (flag7 && WorldGen.genRand.Next(10) == 0) + { + chest.item[index7].SetDefaults(4443); + ++index7; + } + if (flag7 && WorldGen.genRand.Next(10) == 0) + { + chest.item[index7].SetDefaults(4737); + ++index7; + } + else if (flag7 && WorldGen.genRand.Next(10) == 0) + { + chest.item[index7].SetDefaults(4551); + ++index7; + } + } + else + { + int num44 = WorldGen.genRand.Next(4); + if (num44 == 0) + { + chest.item[index7].SetDefaults(49); + chest.item[index7].Prefix(-1); + } + if (num44 == 1) + { + chest.item[index7].SetDefaults(50); + chest.item[index7].Prefix(-1); + } + if (num44 == 2) + { + chest.item[index7].SetDefaults(53); + chest.item[index7].Prefix(-1); + } + if (num44 == 3) + { + chest.item[index7].SetDefaults(54); + chest.item[index7].Prefix(-1); + } + ++index7; + } + if (WorldGen.genRand.Next(3) == 0) + { + chest.item[index7].SetDefaults(167); + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num45 = WorldGen.genRand.Next(2); + int num46 = WorldGen.genRand.Next(15) + 15; + if (num45 == 0) + chest.item[index7].SetDefaults(117); + if (num45 == 1) + chest.item[index7].SetDefaults(WorldGen.goldBar); + chest.item[index7].stack = num46; + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num47 = WorldGen.genRand.Next(2); + int num48 = WorldGen.genRand.Next(25) + 50; + if (num47 == 0) + chest.item[index7].SetDefaults(265); + if (num47 == 1) + { + if (WorldGen.SavedOreTiers.Silver == 168) + chest.item[index7].SetDefaults(4915); + else + chest.item[index7].SetDefaults(278); + } + chest.item[index7].stack = num48; + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num49 = WorldGen.genRand.Next(6) + 15; + chest.item[index7].SetDefaults(227); + chest.item[index7].stack = num49; + ++index7; + } + if (WorldGen.genRand.Next(4) > 0) + { + int num50 = WorldGen.genRand.Next(8); + int num51 = WorldGen.genRand.Next(1, 3); + if (num50 == 0) + chest.item[index7].SetDefaults(296); + if (num50 == 1) + chest.item[index7].SetDefaults(295); + if (num50 == 2) + chest.item[index7].SetDefaults(293); + if (num50 == 3) + chest.item[index7].SetDefaults(288); + if (num50 == 4) + chest.item[index7].SetDefaults(294); + if (num50 == 5) + chest.item[index7].SetDefaults(297); + if (num50 == 6) + chest.item[index7].SetDefaults(304); + if (num50 == 7) + chest.item[index7].SetDefaults(2323); + chest.item[index7].stack = num51; + ++index7; + } + if (WorldGen.genRand.Next(3) > 0) + { + int num52 = WorldGen.genRand.Next(8); + int num53 = WorldGen.genRand.Next(1, 3); + if (num52 == 0) + chest.item[index7].SetDefaults(305); + if (num52 == 1) + chest.item[index7].SetDefaults(301); + if (num52 == 2) + chest.item[index7].SetDefaults(302); + if (num52 == 3) + chest.item[index7].SetDefaults(288); + if (num52 == 4) + chest.item[index7].SetDefaults(300); + if (num52 == 5) + chest.item[index7].SetDefaults(2351); + if (num52 == 6) + chest.item[index7].SetDefaults(2348); + if (num52 == 7) + chest.item[index7].SetDefaults(2345); + chest.item[index7].stack = num53; + ++index7; + } + if (WorldGen.genRand.Next(3) == 0) + { + int num54 = WorldGen.genRand.Next(1, 3); + if (WorldGen.genRand.Next(2) == 0) + chest.item[index7].SetDefaults(2350); + else + chest.item[index7].SetDefaults(4870); + chest.item[index7].stack = num54; + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + int num55 = WorldGen.genRand.Next(2); + int num56 = WorldGen.genRand.Next(15) + 15; + if (num55 == 0) + chest.item[index7].SetDefaults(8); + if (num55 == 1) + chest.item[index7].SetDefaults(282); + chest.item[index7].stack = num56; + ++index7; + } + if (WorldGen.genRand.Next(2) == 0) + { + chest.item[index7].SetDefaults(73); + chest.item[index7].stack = WorldGen.genRand.Next(2, 5); + ++index7; + } + } + if (index7 > 0 && chestTileType == (ushort) 21) + { + if (style == 10 && WorldGen.genRand.Next(4) == 0) + { + chest.item[index7].SetDefaults(2204); + ++index7; + } + if (style == 11 && WorldGen.genRand.Next(7) == 0) + { + chest.item[index7].SetDefaults(2198); + ++index7; + } + if (style == 13 && WorldGen.genRand.Next(3) == 0) + { + chest.item[index7].SetDefaults(2197); + ++index7; + } + if (style == 16) + { + chest.item[index7].SetDefaults(2195); + ++index7; + } + if (Main.wallDungeon[(int) Main.tile[i, index1].wall] && WorldGen.genRand.Next(8) == 0) + { + chest.item[index7].SetDefaults(2192); + ++index7; + } + if (style == 16) + { + if (WorldGen.genRand.Next(5) == 0) + { + chest.item[index7].SetDefaults(2767); + ++index7; + } + else + { + chest.item[index7].SetDefaults(2766); + chest.item[index7].stack = WorldGen.genRand.Next(3, 8); + ++index7; + } + } + } + } + return true; + } + if (trySlope) + { + if (num1 > -1) + Main.tile[i - 1, index1].slope((byte) num1); + if (num2 > -1) + Main.tile[i, index1].slope((byte) num2); + } + return false; + } + } + return false; + } + + public static void UnlockDoor(int i, int j) + { + int index1 = i; + int index2 = j; + if (Main.tile[index1, index2] == null) + return; + while (Main.tile[index1, index2].frameY != (short) 594) + { + --index2; + if (Main.tile[index1, index2].frameY < (short) 594 || index2 <= 0) + return; + } + SoundEngine.PlaySound(22, index1 * 16, index2 * 16 + 16); + for (int index3 = index2; index3 <= index2 + 2; ++index3) + { + if (Main.tile[index1, index3] == null) + Main.tile[index1, index3] = new Tile(); + Main.tile[index1, index3].frameY += (short) 54; + for (int index4 = 0; index4 < 4; ++index4) + Dust.NewDust(new Vector2((float) (index1 * 16), (float) (index3 * 16)), 16, 16, 11); + } + AchievementsHelper.NotifyProgressionEvent(22); + } + + public static bool OpenDoor(int i, int j, int direction) + { + if (Main.tile[i, j - 1] == null) + Main.tile[i, j - 1] = new Tile(); + if (Main.tile[i, j - 2] == null) + Main.tile[i, j - 2] = new Tile(); + if (Main.tile[i, j + 1] == null) + Main.tile[i, j + 1] = new Tile(); + if (Main.tile[i, j] == null) + Main.tile[i, j] = new Tile(); + Tile t = Main.tile[i, j]; + if (t.type != (ushort) 10 || WorldGen.IsLockedDoor(t)) + return false; + short num1 = 0; + int frameY = (int) t.frameY; + int num2 = 0; + while (frameY >= 54) + { + frameY -= 54; + ++num2; + } + if (t.frameX >= (short) 54) + { + int num3 = (int) t.frameX / 54; + num2 += 36 * num3; + num1 += (short) (72 * num3); + } + int y = j - frameY / 18; + int index = i; + byte color1 = Main.tile[index, y].color(); + if (Main.tile[index, y + 1] == null) + Main.tile[index, y + 1] = new Tile(); + byte color2 = Main.tile[index, y + 1].color(); + if (Main.tile[index, y + 2] == null) + Main.tile[index, y + 2] = new Tile(); + byte color3 = Main.tile[index, y + 2].color(); + int x; + int i1; + if (direction == -1) + { + x = i - 1; + num1 += (short) 36; + i1 = i - 1; + } + else + { + x = i; + i1 = i + 1; + } + for (int j1 = y; j1 < y + 3; ++j1) + { + if (Main.tile[i1, j1] == null) + Main.tile[i1, j1] = new Tile(); + if (Main.tile[i1, j1].active()) + { + if (!Main.tileCut[(int) Main.tile[i1, j1].type] && Main.tile[i1, j1].type != (ushort) 3 && Main.tile[i1, j1].type != (ushort) 24 && Main.tile[i1, j1].type != (ushort) 52 && Main.tile[i1, j1].type != (ushort) 61 && Main.tile[i1, j1].type != (ushort) 62 && Main.tile[i1, j1].type != (ushort) 69 && Main.tile[i1, j1].type != (ushort) 71 && Main.tile[i1, j1].type != (ushort) 73 && Main.tile[i1, j1].type != (ushort) 74 && Main.tile[i1, j1].type != (ushort) 110 && Main.tile[i1, j1].type != (ushort) 113 && Main.tile[i1, j1].type != (ushort) 115 && Main.tile[i1, j1].type != (ushort) 165) + return false; + WorldGen.KillTile(i1, j1); + } + } + if (Main.netMode != 1 && Wiring.running) + { + Wiring.SkipWire(x, y); + Wiring.SkipWire(x, y + 1); + Wiring.SkipWire(x, y + 2); + Wiring.SkipWire(x + 1, y); + Wiring.SkipWire(x + 1, y + 1); + Wiring.SkipWire(x + 1, y + 2); + } + int num4 = num2 % 36 * 54; + SoundEngine.PlaySound(8, i * 16, j * 16); + Main.tile[x, y].active(true); + Main.tile[x, y].type = (ushort) 11; + Main.tile[x, y].frameY = (short) num4; + Main.tile[x, y].frameX = num1; + Main.tile[x, y].color(color1); + if (Main.tile[x + 1, y] == null) + Main.tile[x + 1, y] = new Tile(); + Main.tile[x + 1, y].active(true); + Main.tile[x + 1, y].type = (ushort) 11; + Main.tile[x + 1, y].frameY = (short) num4; + Main.tile[x + 1, y].frameX = (short) ((int) num1 + 18); + Main.tile[x + 1, y].color(color1); + if (Main.tile[x, y + 1] == null) + Main.tile[x, y + 1] = new Tile(); + Main.tile[x, y + 1].active(true); + Main.tile[x, y + 1].type = (ushort) 11; + Main.tile[x, y + 1].frameY = (short) (num4 + 18); + Main.tile[x, y + 1].frameX = num1; + Main.tile[x, y + 1].color(color2); + if (Main.tile[x + 1, y + 1] == null) + Main.tile[x + 1, y + 1] = new Tile(); + Main.tile[x + 1, y + 1].active(true); + Main.tile[x + 1, y + 1].type = (ushort) 11; + Main.tile[x + 1, y + 1].frameY = (short) (num4 + 18); + Main.tile[x + 1, y + 1].frameX = (short) ((int) num1 + 18); + Main.tile[x + 1, y + 1].color(color2); + if (Main.tile[x, y + 2] == null) + Main.tile[x, y + 2] = new Tile(); + Main.tile[x, y + 2].active(true); + Main.tile[x, y + 2].type = (ushort) 11; + Main.tile[x, y + 2].frameY = (short) (num4 + 36); + Main.tile[x, y + 2].frameX = num1; + Main.tile[x, y + 2].color(color3); + if (Main.tile[x + 1, y + 2] == null) + Main.tile[x + 1, y + 2] = new Tile(); + Main.tile[x + 1, y + 2].active(true); + Main.tile[x + 1, y + 2].type = (ushort) 11; + Main.tile[x + 1, y + 2].frameY = (short) (num4 + 36); + Main.tile[x + 1, y + 2].frameX = (short) ((int) num1 + 18); + Main.tile[x + 1, y + 2].color(color3); + for (int i2 = x - 1; i2 <= x + 2; ++i2) + { + for (int j2 = y - 1; j2 <= y + 2; ++j2) + WorldGen.TileFrame(i2, j2); + } + return true; + } + + public static void Check1xX(int x, int j, short type) + { + if (WorldGen.destroyObject) + return; + int frameX = (int) Main.tile[x, j].frameX; + int num1 = 3; + if (type == (short) 92) + num1 = 6; + int frameY = (int) Main.tile[x, j].frameY; + int num2 = 0; + while (frameY >= 18 * num1) + { + frameY -= 18 * num1; + ++num2; + } + int num3 = (int) Main.tile[x, j].frameX / 18; + int num4 = j - frameY / 18; + bool flag = false; + for (int index = 0; index < num1; ++index) + { + if (Main.tile[x, num4 + index] == null) + Main.tile[x, num4 + index] = new Tile(); + if (!Main.tile[x, num4 + index].active()) + flag = true; + else if ((int) Main.tile[x, num4 + index].type != (int) type) + flag = true; + else if ((int) Main.tile[x, num4 + index].frameY != index * 18 + num2 * num1 * 18) + flag = true; + else if ((int) Main.tile[x, num4 + index].frameX != frameX) + flag = true; + } + if (Main.tile[x, num4 + num1] == null) + Main.tile[x, num4 + num1] = new Tile(); + if (!WorldGen.SolidTileAllowBottomSlope(x, num4 + num1)) + flag = true; + if (!flag) + return; + WorldGen.destroyObject = true; + for (int index = 0; index < num1; ++index) + { + if ((int) Main.tile[x, num4 + index].type == (int) type) + WorldGen.KillTile(x, num4 + index); + } + if (type == (short) 92) + Item.NewItem(x * 16, j * 16, 32, 32, 341); + if (type == (short) 453) + { + int Type = num3 >= 2 ? (num3 >= 4 ? 3743 : 3745) : 3744; + Item.NewItem(x * 16, j * 16, 16, 32, Type); + } + if (type == (short) 93) + { + int Type = 0; + if (num2 == 0) + Type = 342; + else if (num2 >= 1 && num2 <= 10) + Type = 2082 + num2 - 1; + else if (num2 >= 11 && num2 <= 16) + { + Type = 2129 + num2 - 11; + } + else + { + switch (num2) + { + case 17: + Type = 2225; + break; + case 18: + Type = 2533; + break; + case 19: + Type = 2547; + break; + case 20: + Type = 2563; + break; + case 21: + Type = 2578; + break; + case 22: + Type = 2643; + break; + case 23: + Type = 2644; + break; + case 24: + Type = 2645; + break; + case 25: + Type = 2646; + break; + case 26: + Type = 2647; + break; + case 27: + Type = 2819; + break; + case 28: + Type = 3135; + break; + case 29: + Type = 3137; + break; + case 30: + Type = 3136; + break; + case 31: + Type = 3892; + break; + case 32: + Type = 3942; + break; + case 33: + Type = 3969; + break; + case 34: + Type = 4156; + break; + case 35: + Type = 4177; + break; + case 36: + Type = 4198; + break; + case 37: + Type = 4219; + break; + case 38: + Type = 4308; + break; + case 39: + Type = 4577; + break; + } + } + Item.NewItem(x * 16, j * 16, 32, 32, Type); + } + WorldGen.destroyObject = false; + } + + public static void Check2xX(int i, int j, ushort type) + { + if (WorldGen.destroyObject) + return; + int index1 = i; + int frameX1 = (int) Main.tile[i, j].frameX; + while (frameX1 >= 36) + frameX1 -= 36; + if (frameX1 == 18) + --index1; + if (Main.tile[index1, j] == null) + Main.tile[index1, j] = new Tile(); + int num1 = (int) Main.tile[index1, j].frameY / 18; + int num2 = 3; + if (type == (ushort) 104) + num2 = 5; + if (type == (ushort) 207) + num2 = 4; + int num3 = 0; + while (num1 >= num2) + { + num1 -= num2; + num3 += num2 * 18; + } + int y = j - num1; + if (type == (ushort) 410 && num3 != 0) + num3 += 2; + if (Main.tile[index1, y] == null) + Main.tile[index1, y] = new Tile(); + int frameX2 = (int) Main.tile[index1, j].frameX; + int frameY = (int) Main.tile[index1, j].frameY; + bool flag = false; + for (int index2 = 0; index2 < num2; ++index2) + { + if (Main.tile[index1, y + index2] == null) + Main.tile[index1, y + index2] = new Tile(); + if (!Main.tile[index1, y + index2].active()) + flag = true; + else if ((int) Main.tile[index1, y + index2].type != (int) type) + flag = true; + else if ((int) Main.tile[index1, y + index2].frameY != index2 * 18 + num3) + flag = true; + else if ((int) Main.tile[index1, y + index2].frameX != frameX2) + flag = true; + if (Main.tile[index1 + 1, y + index2] == null) + Main.tile[index1 + 1, y + index2] = new Tile(); + if (!Main.tile[index1 + 1, y + index2].active()) + flag = true; + else if ((int) Main.tile[index1 + 1, y + index2].type != (int) type) + flag = true; + else if ((int) Main.tile[index1 + 1, y + index2].frameY != index2 * 18 + num3) + flag = true; + else if ((int) Main.tile[index1 + 1, y + index2].frameX != frameX2 + 18) + flag = true; + } + if (type == (ushort) 465 || type == (ushort) 531 || type == (ushort) 591 || type == (ushort) 592) + { + for (int index3 = 0; index3 < 2; ++index3) + { + if (!WorldGen.SolidTileAllowTopSlope(index1 + index3, y - 1)) + { + flag = true; + break; + } + } + } + else + { + if (!WorldGen.SolidTileAllowBottomSlope(index1, y + num2)) + flag = true; + if (!WorldGen.SolidTileAllowBottomSlope(index1 + 1, y + num2)) + flag = true; + } + if (!flag) + return; + WorldGen.destroyObject = true; + for (int index4 = 0; index4 < num2; ++index4) + { + if ((int) Main.tile[index1, y + index4].type == (int) type) + WorldGen.KillTile(index1, y + index4); + if ((int) Main.tile[index1 + 1, y + index4].type == (int) type) + WorldGen.KillTile(index1 + 1, y + index4); + } + if (type == (ushort) 104) + { + int num4 = frameX2 / 36; + int Type = num4 < 1 || num4 > 5 ? (num4 != 6 ? (num4 != 7 ? (num4 < 8 || num4 > 23 ? (num4 != 24 ? (num4 != 25 ? (num4 != 26 ? (num4 != 27 ? (num4 != 28 ? (num4 != 29 ? (num4 != 30 ? (num4 != 31 ? (num4 != 32 ? (num4 != 33 ? (num4 != 34 ? (num4 != 35 ? (num4 != 36 ? (num4 != 37 ? (num4 != 38 ? (num4 != 39 ? (num4 != 40 ? 359 : 4575) : 4306) : 4217) : 4196) : 4175) : 4154) : 3966) : 3940) : 3902) : 3901) : 3900) : 3899) : 3898) : 3127) : 3128) : 3126) : 2809) : 2591 + num4 - 8) : 2575) : 2560) : 2237 + num4 - 1; + Item.NewItem(index1 * 16, j * 16, 32, 32, Type); + } + if (type == (ushort) 105) + { + int num5 = frameX2 / 36 + frameY / 54 % 3 * 55; + int Type = num5 != 0 ? (num5 != 1 ? (num5 != 43 ? (num5 != 44 ? (num5 != 45 ? (num5 != 46 ? (num5 != 47 ? (num5 != 48 ? (num5 != 49 ? (num5 != 50 ? (num5 < 51 || num5 > 62 ? (num5 < 63 || num5 > 75 ? (num5 != 76 ? (num5 != 77 ? (num5 != 78 ? (num5 != 79 ? 438 + num5 - 2 : 4466) : 4342) : 4360) : 4397) : 3708 + num5 - 63) : 3651 + num5 - 51) : 2672) : 1462) : 1410) : 1409) : 1408) : 1154) : 1153) : 1152) : 52) : 360; + Item.NewItem(index1 * 16, j * 16, 32, 32, Type); + } + if (type == (ushort) 356) + Item.NewItem(index1 * 16, j * 16, 32, 32, 3064); + if (type == (ushort) 456) + Item.NewItem(index1 * 16, j * 16, 32, 32, 3748); + if (type == (ushort) 337) + { + int num6 = frameX2 / 36; + Item.NewItem(index1 * 16, j * 16, 32, 32, 2702 + num6); + } + if (type == (ushort) 207) + { + int Type = frameX2 / 36; + switch (Type) + { + case 0: + Type = 909; + break; + case 1: + Type = 910; + break; + default: + if (Type >= 2 && Type <= 7) + { + Type = 938 + Type; + break; + } + switch (Type) + { + case 8: + Type = 4922; + break; + case 9: + Type = 4417; + break; + } + break; + } + Item.NewItem(index1 * 16, j * 16, 32, 32, Type); + } + if (type == (ushort) 410) + { + int num7 = frameX2 / 36; + Item.NewItem(index1 * 16, j * 16, 32, 32, num7 + 3536); + } + if (type == (ushort) 480) + Item.NewItem(index1 * 16, j * 16, 32, 32, 4054); + if (type == (ushort) 509) + Item.NewItem(index1 * 16, j * 16, 32, 32, 4318); + if (type == (ushort) 489) + Item.NewItem(index1 * 16, j * 16, 32, 32, 4074); + if (type == (ushort) 320) + Item.NewItem(index1 * 16, j * 16, 32, 32, 2496); + if (type == (ushort) 349) + Item.NewItem(index1 * 16, j * 16, 32, 32, 470); + if (type == (ushort) 506) + Item.NewItem(index1 * 16, j * 16, 32, 32, 4276); + if (type == (ushort) 545) + Item.NewItem(index1 * 16, j * 16, 32, 32, 4420); + if (type == (ushort) 465) + Item.NewItem(index1 * 16, j * 16, 32, 32, 3815); + if (type == (ushort) 531) + Item.NewItem(index1 * 16, j * 16, 32, 32, 4355); + if (type == (ushort) 378) + { + Item.NewItem(index1 * 16, j * 16, 32, 48, 3202); + TETrainingDummy.Kill(index1, y); + } + if (type == (ushort) 560) + { + int num8 = frameX2 / 36; + Item.NewItem(index1 * 16, j * 16, 32, 32, num8 + 4599); + } + if (type == (ushort) 591) + { + int num9 = frameX2 / 36; + Item.NewItem(index1 * 16, j * 16, 32, 32, num9 + 4858); + } + if (type == (ushort) 592) + Item.NewItem(index1 * 16, j * 16, 32, 32, 4867); + WorldGen.destroyObject = false; + } + + public static void PlaceTight(int x, int y, bool spiders = false) + { + if (Main.tile[x, y - 1] == null) + Main.tile[x, y - 1] = new Tile(); + if (Main.tile[x, y] == null) + Main.tile[x, y] = new Tile(); + if (Main.tile[x, y + 1] == null) + Main.tile[x, y + 1] = new Tile(); + WorldGen.PlaceUncheckedStalactite(x, y, WorldGen.genRand.Next(2) == 0, WorldGen.genRand.Next(3), spiders); + if (Main.tile[x, y].type != (ushort) 165) + return; + WorldGen.CheckTight(x, y); + } + + public static void PlaceUncheckedStalactite( + int x, + int y, + bool preferSmall, + int variation, + bool spiders) + { + ushort num1 = 165; + variation = Utils.Clamp(variation, 0, 2); + if (WorldGen.SolidTile(x, y - 1) && !Main.tile[x, y].active() && !Main.tile[x, y + 1].active()) + { + if (spiders) + { + int num2 = 108 + variation * 18; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num2; + Main.tile[x, y].frameY = (short) 0; + Main.tile[x, y + 1].type = num1; + Main.tile[x, y + 1].active(true); + Main.tile[x, y + 1].frameX = (short) num2; + Main.tile[x, y + 1].frameY = (short) 18; + } + else + { + if (Main.tile[x, y - 1].type == (ushort) 147 || Main.tile[x, y - 1].type == (ushort) 161 || Main.tile[x, y - 1].type == (ushort) 163 || Main.tile[x, y - 1].type == (ushort) 164 || Main.tile[x, y - 1].type == (ushort) 200) + { + if (preferSmall) + { + int num3 = variation * 18; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num3; + Main.tile[x, y].frameY = (short) 72; + } + else + { + int num4 = variation * 18; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num4; + Main.tile[x, y].frameY = (short) 0; + Main.tile[x, y + 1].type = num1; + Main.tile[x, y + 1].active(true); + Main.tile[x, y + 1].frameX = (short) num4; + Main.tile[x, y + 1].frameY = (short) 18; + } + } + if (Main.tile[x, y - 1].type == (ushort) 1 || Main.tileMoss[(int) Main.tile[x, y - 1].type] || Main.tile[x, y - 1].type == (ushort) 117 || Main.tile[x, y - 1].type == (ushort) 25 || Main.tile[x, y - 1].type == (ushort) 203) + { + if (preferSmall) + { + int num5 = 54 + variation * 18; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num5; + Main.tile[x, y].frameY = (short) 72; + } + else + { + int num6 = 54 + variation * 18; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num6; + Main.tile[x, y].frameY = (short) 0; + Main.tile[x, y + 1].type = num1; + Main.tile[x, y + 1].active(true); + Main.tile[x, y + 1].frameX = (short) num6; + Main.tile[x, y + 1].frameY = (short) 18; + } + } + if (Main.tile[x, y - 1].type == (ushort) 225) + { + int num7 = 162 + variation * 18; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num7; + Main.tile[x, y].frameY = (short) 72; + } + if (Main.tile[x, y - 1].type == (ushort) 396 || Main.tile[x, y - 1].type == (ushort) 397) + { + if (preferSmall) + { + int num8 = 378 + variation * 18; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num8; + Main.tile[x, y].frameY = (short) 72; + } + else + { + int num9 = 378 + variation * 18; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num9; + Main.tile[x, y].frameY = (short) 0; + Main.tile[x, y + 1].type = num1; + Main.tile[x, y + 1].active(true); + Main.tile[x, y + 1].frameX = (short) num9; + Main.tile[x, y + 1].frameY = (short) 18; + } + } + if (Main.tile[x, y - 1].type == (ushort) 368) + { + if (preferSmall) + { + int num10 = 432 + variation * 18; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num10; + Main.tile[x, y].frameY = (short) 72; + } + else + { + int num11 = 432 + variation * 18; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num11; + Main.tile[x, y].frameY = (short) 0; + Main.tile[x, y + 1].type = num1; + Main.tile[x, y + 1].active(true); + Main.tile[x, y + 1].frameX = (short) num11; + Main.tile[x, y + 1].frameY = (short) 18; + } + } + if (Main.tile[x, y - 1].type != (ushort) 367) + return; + if (preferSmall) + { + int num12 = 486 + variation * 18; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num12; + Main.tile[x, y].frameY = (short) 72; + } + else + { + int num13 = 486 + variation * 18; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num13; + Main.tile[x, y].frameY = (short) 0; + Main.tile[x, y + 1].type = num1; + Main.tile[x, y + 1].active(true); + Main.tile[x, y + 1].frameX = (short) num13; + Main.tile[x, y + 1].frameY = (short) 18; + } + } + } + else + { + if (spiders || !WorldGen.SolidTile(x, y + 1) || Main.tile[x, y].active() || Main.tile[x, y - 1].active()) + return; + if (Main.tile[x, y + 1].type == (ushort) 1 || Main.tileMoss[(int) Main.tile[x, y + 1].type] || Main.tile[x, y - 1].type == (ushort) 117 || Main.tile[x, y - 1].type == (ushort) 25 || Main.tile[x, y - 1].type == (ushort) 203) + { + if (preferSmall) + { + int num14 = 54 + variation * 18; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num14; + Main.tile[x, y].frameY = (short) 90; + } + else + { + int num15 = 54 + variation * 18; + Main.tile[x, y - 1].type = num1; + Main.tile[x, y - 1].active(true); + Main.tile[x, y - 1].frameX = (short) num15; + Main.tile[x, y - 1].frameY = (short) 36; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num15; + Main.tile[x, y].frameY = (short) 54; + } + } + if (Main.tile[x, y + 1].type == (ushort) 225) + { + int num16 = 162 + variation * 18; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num16; + Main.tile[x, y].frameY = (short) 90; + } + if (Main.tile[x, y + 1].type == (ushort) 396 || Main.tile[x, y + 1].type == (ushort) 397) + { + if (preferSmall) + { + int num17 = 378 + variation * 18; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num17; + Main.tile[x, y].frameY = (short) 90; + } + else + { + int num18 = 378 + variation * 18; + Main.tile[x, y - 1].type = num1; + Main.tile[x, y - 1].active(true); + Main.tile[x, y - 1].frameX = (short) num18; + Main.tile[x, y - 1].frameY = (short) 36; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num18; + Main.tile[x, y].frameY = (short) 54; + } + } + if (Main.tile[x, y + 1].type == (ushort) 368) + { + if (preferSmall) + { + int num19 = 432 + variation * 18; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num19; + Main.tile[x, y].frameY = (short) 90; + } + else + { + int num20 = 432 + variation * 18; + Main.tile[x, y - 1].type = num1; + Main.tile[x, y - 1].active(true); + Main.tile[x, y - 1].frameX = (short) num20; + Main.tile[x, y - 1].frameY = (short) 36; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num20; + Main.tile[x, y].frameY = (short) 54; + } + } + if (Main.tile[x, y + 1].type != (ushort) 367) + return; + if (preferSmall) + { + int num21 = 486 + variation * 18; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num21; + Main.tile[x, y].frameY = (short) 90; + } + else + { + int num22 = 486 + variation * 18; + Main.tile[x, y - 1].type = num1; + Main.tile[x, y - 1].active(true); + Main.tile[x, y - 1].frameX = (short) num22; + Main.tile[x, y - 1].frameY = (short) 36; + Main.tile[x, y].type = num1; + Main.tile[x, y].active(true); + Main.tile[x, y].frameX = (short) num22; + Main.tile[x, y].frameY = (short) 54; + } + } + } + + public static bool UpdateStalagtiteStyle(int x, int j) + { + if (Main.netMode == 1 || Main.tile[x, j] == null) + return true; + int style; + bool fail1; + WorldGen.GetStalagtiteStyle(x, j, out style, out fail1); + if (fail1) + return false; + bool fail2; + int desiredStyle; + int height; + int y; + WorldGen.GetDesiredStalagtiteStyle(x, j, out fail2, out desiredStyle, out height, out y); + if (fail2) + return false; + if (style != desiredStyle) + { + int num = WorldGen.genRand.Next(3) * 18; + switch (desiredStyle) + { + case 0: + num += 54; + break; + case 1: + num += 216; + break; + case 2: + num += 270; + break; + case 3: + num += 324; + break; + case 4: + num += 378; + break; + case 5: + num += 432; + break; + case 6: + num += 486; + break; + case 7: + num = num; + break; + case 8: + num += 540; + break; + case 9: + num += 594; + break; + case 10: + num += 648; + break; + } + for (int index = y; index < y + height; ++index) + Main.tile[x, index].frameX = (short) num; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, x, y, 2); + } + return true; + } + + private static void GetDesiredStalagtiteStyle( + int x, + int j, + out bool fail, + out int desiredStyle, + out int height, + out int y) + { + fail = false; + desiredStyle = 0; + height = 1; + y = j; + if (Main.tile[x, y].frameY == (short) 72) + desiredStyle = (int) Main.tile[x, y - 1].type; + else if (Main.tile[x, y].frameY == (short) 90) + desiredStyle = (int) Main.tile[x, y + 1].type; + else if (Main.tile[x, y].frameY >= (short) 36) + { + if (Main.tile[x, y].frameY == (short) 54) + --y; + height = 2; + desiredStyle = (int) Main.tile[x, y + 2].type; + } + else + { + if (Main.tile[x, y].frameY == (short) 18) + --y; + height = 2; + desiredStyle = (int) Main.tile[x, y - 1].type; + } + if (desiredStyle == 1 || Main.tileMoss[desiredStyle]) + desiredStyle = 0; + else if (desiredStyle == 200) + desiredStyle = 10; + else if (desiredStyle == 164) + desiredStyle = 8; + else if (desiredStyle == 163) + desiredStyle = 9; + else if (desiredStyle == 117 || desiredStyle == 402 || desiredStyle == 403) + desiredStyle = 1; + else if (desiredStyle == 25 || desiredStyle == 398 || desiredStyle == 400) + desiredStyle = 2; + else if (desiredStyle == 203 || desiredStyle == 399 || desiredStyle == 401) + desiredStyle = 3; + else if (desiredStyle == 396 || desiredStyle == 397) + desiredStyle = 4; + else if (desiredStyle == 367) + desiredStyle = 6; + else if (desiredStyle == 368) + desiredStyle = 5; + else if (desiredStyle == 161 || desiredStyle == 147) + desiredStyle = 7; + else + fail = true; + } + + private static void GetStalagtiteStyle(int x, int y, out int style, out bool fail) + { + style = 0; + fail = false; + switch ((int) Main.tile[x, y].frameX / 54) + { + case 0: + style = 7; + break; + case 1: + style = 0; + break; + case 4: + style = 1; + break; + case 5: + style = 2; + break; + case 6: + style = 3; + break; + case 7: + style = 4; + break; + case 8: + style = 5; + break; + case 9: + style = 6; + break; + case 10: + style = 8; + break; + case 11: + style = 9; + break; + case 12: + style = 10; + break; + default: + fail = true; + break; + } + } + + public static void CheckTight(int x, int j) + { + if (Main.tile[x, j] == null) + return; + int j1 = j; + if (Main.tile[x, j1].frameY == (short) 72) + { + if (Main.tile[x, j1 - 1] == null) + Main.tile[x, j1 - 1] = new Tile(); + if (Main.tile[x, j1] == null) + Main.tile[x, j1] = new Tile(); + if (Main.tile[x, j1 + 1] == null) + Main.tile[x, j1 + 1] = new Tile(); + bool flag = false; + if (!WorldGen.SolidTile(x, j1 - 1)) + flag = true; + if (!flag && !WorldGen.UpdateStalagtiteStyle(x, j1)) + flag = true; + if (!flag) + return; + WorldGen.destroyObject = true; + if ((int) Main.tile[x, j1].type == (int) Main.tile[x, j].type) + WorldGen.KillTile(x, j1); + WorldGen.destroyObject = false; + } + else if (Main.tile[x, j1].frameY == (short) 90) + { + if (Main.tile[x, j1 - 1] == null) + Main.tile[x, j1 - 1] = new Tile(); + if (Main.tile[x, j1] == null) + Main.tile[x, j1] = new Tile(); + if (Main.tile[x, j1 + 1] == null) + Main.tile[x, j1 + 1] = new Tile(); + bool flag = false; + if (!WorldGen.SolidTile(x, j1 + 1)) + flag = true; + if (!flag && !WorldGen.UpdateStalagtiteStyle(x, j1)) + flag = true; + if (!flag) + return; + WorldGen.destroyObject = true; + if ((int) Main.tile[x, j1].type == (int) Main.tile[x, j].type) + WorldGen.KillTile(x, j1); + WorldGen.destroyObject = false; + } + else if (Main.tile[x, j1].frameY >= (short) 36) + { + if (Main.tile[x, j1].frameY == (short) 54) + --j1; + if (Main.tile[x, j1] == null) + Main.tile[x, j1] = new Tile(); + if (Main.tile[x, j1 + 1] == null) + Main.tile[x, j1 + 1] = new Tile(); + if (Main.tile[x, j1 + 2] == null) + Main.tile[x, j1 + 2] = new Tile(); + bool flag = false; + if (!WorldGen.SolidTile(x, j1 + 2)) + flag = true; + if ((int) Main.tile[x, j1 + 1].type != (int) Main.tile[x, j1].type) + flag = true; + if ((int) Main.tile[x, j1 + 1].frameX != (int) Main.tile[x, j1].frameX) + flag = true; + if (!flag && !WorldGen.UpdateStalagtiteStyle(x, j1)) + flag = true; + if (!flag) + return; + WorldGen.destroyObject = true; + if ((int) Main.tile[x, j1].type == (int) Main.tile[x, j].type) + WorldGen.KillTile(x, j1); + if ((int) Main.tile[x, j1 + 1].type == (int) Main.tile[x, j].type) + WorldGen.KillTile(x, j1 + 1); + WorldGen.destroyObject = false; + } + else + { + if (Main.tile[x, j1].frameY == (short) 18) + --j1; + if (Main.tile[x, j1 - 1] == null) + Main.tile[x, j1 - 1] = new Tile(); + if (Main.tile[x, j1] == null) + Main.tile[x, j1] = new Tile(); + if (Main.tile[x, j1 + 1] == null) + Main.tile[x, j1 + 1] = new Tile(); + bool flag = false; + if (!WorldGen.SolidTile(x, j1 - 1)) + flag = true; + if ((int) Main.tile[x, j1 + 1].type != (int) Main.tile[x, j1].type) + flag = true; + if ((int) Main.tile[x, j1 + 1].frameX != (int) Main.tile[x, j1].frameX) + flag = true; + if (!flag && !WorldGen.UpdateStalagtiteStyle(x, j1)) + flag = true; + if (!flag) + return; + WorldGen.destroyObject = true; + if ((int) Main.tile[x, j1].type == (int) Main.tile[x, j].type) + WorldGen.KillTile(x, j1); + if ((int) Main.tile[x, j1 + 1].type == (int) Main.tile[x, j].type) + WorldGen.KillTile(x, j1 + 1); + WorldGen.destroyObject = false; + } + } + + public static void Place1xX(int x, int y, ushort type, int style = 0) + { + int num1 = style * 18; + int num2 = 3; + if (type == (ushort) 92) + num2 = 6; + bool flag = true; + for (int index = y - num2 + 1; index < y + 1; ++index) + { + if (Main.tile[x, index] == null) + Main.tile[x, index] = new Tile(); + if (Main.tile[x, index].active()) + flag = false; + if (type == (ushort) 93 && Main.tile[x, index].liquid > (byte) 0) + flag = false; + } + if (!flag || !WorldGen.SolidTile2(x, y + 1)) + return; + for (int index = 0; index < num2; ++index) + { + Main.tile[x, y - num2 + 1 + index].active(true); + Main.tile[x, y - num2 + 1 + index].frameY = (short) (index * 18 + num2 * num1); + Main.tile[x, y - num2 + 1 + index].frameX = (short) 0; + Main.tile[x, y - num2 + 1 + index].type = type; + } + } + + public static int checkXmasTreeDrop(int x, int y, int obj) + { + int index1 = x; + int index2 = y; + if (Main.tile[x, y].frameX < (short) 10) + { + index1 -= (int) Main.tile[x, y].frameX; + index2 -= (int) Main.tile[x, y].frameY; + } + int num1 = 0; + if (((int) Main.tile[index1, index2].frameY & 1) == 1) + ++num1; + if (((int) Main.tile[index1, index2].frameY & 2) == 2) + num1 += 2; + if (((int) Main.tile[index1, index2].frameY & 4) == 4) + num1 += 4; + int num2 = 0; + if (((int) Main.tile[index1, index2].frameY & 8) == 8) + ++num2; + if (((int) Main.tile[index1, index2].frameY & 16) == 16) + num2 += 2; + if (((int) Main.tile[index1, index2].frameY & 32) == 32) + num2 += 4; + int num3 = 0; + if (((int) Main.tile[index1, index2].frameY & 64) == 64) + ++num3; + if (((int) Main.tile[index1, index2].frameY & 128) == 128) + num3 += 2; + if (((int) Main.tile[index1, index2].frameY & 256) == 256) + num3 += 4; + if (((int) Main.tile[index1, index2].frameY & 512) == 512) + num3 += 8; + int num4 = 0; + if (((int) Main.tile[index1, index2].frameY & 1024) == 1024) + ++num4; + if (((int) Main.tile[index1, index2].frameY & 2048) == 2048) + num4 += 2; + if (((int) Main.tile[index1, index2].frameY & 4096) == 4096) + num4 += 4; + if (((int) Main.tile[index1, index2].frameY & 8192) == 8192) + num4 += 8; + if (obj == 0 && num1 > 0) + return num1; + if (obj == 1 && num2 > 0) + return num2; + if (obj == 2 && num3 > 0) + return num3; + return obj == 3 && num4 > 0 ? num4 : -1; + } + + public static void dropXmasTree(int x, int y, int obj) + { + int index1 = x; + int index2 = y; + if (Main.tile[x, y].frameX < (short) 10) + { + index1 -= (int) Main.tile[x, y].frameX; + index2 -= (int) Main.tile[x, y].frameY; + } + int num1 = 0; + if (((int) Main.tile[index1, index2].frameY & 1) == 1) + ++num1; + if (((int) Main.tile[index1, index2].frameY & 2) == 2) + num1 += 2; + if (((int) Main.tile[index1, index2].frameY & 4) == 4) + num1 += 4; + int num2 = 0; + if (((int) Main.tile[index1, index2].frameY & 8) == 8) + ++num2; + if (((int) Main.tile[index1, index2].frameY & 16) == 16) + num2 += 2; + if (((int) Main.tile[index1, index2].frameY & 32) == 32) + num2 += 4; + int num3 = 0; + if (((int) Main.tile[index1, index2].frameY & 64) == 64) + ++num3; + if (((int) Main.tile[index1, index2].frameY & 128) == 128) + num3 += 2; + if (((int) Main.tile[index1, index2].frameY & 256) == 256) + num3 += 4; + if (((int) Main.tile[index1, index2].frameY & 512) == 512) + num3 += 8; + int num4 = 0; + if (((int) Main.tile[index1, index2].frameY & 1024) == 1024) + ++num4; + if (((int) Main.tile[index1, index2].frameY & 2048) == 2048) + num4 += 2; + if (((int) Main.tile[index1, index2].frameY & 4096) == 4096) + num4 += 4; + if (((int) Main.tile[index1, index2].frameY & 8192) == 8192) + num4 += 8; + if (obj == 0 && num1 > 0) + { + int number = Item.NewItem(x * 16, y * 16, 16, 16, 1874 + num1 - 1); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else if (obj == 1 && num2 > 0) + { + int number = Item.NewItem(x * 16, y * 16, 16, 16, 1878 + num2 - 1); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else if (obj == 2 && num3 > 0) + { + int number = Item.NewItem(x * 16, y * 16, 16, 16, 1884 + num3 - 1); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + else + { + if (obj != 3 || num4 <= 0) + return; + int number = Item.NewItem(x * 16, y * 16, 16, 16, 1895 + num4 - 1); + if (Main.netMode != 1) + return; + NetMessage.SendData(21, number: number, number2: 1f); + } + } + + public static void setXmasTree(int x, int y, int obj, int style) + { + int index1 = x; + int index2 = y; + if (Main.tile[x, y].frameX < (short) 10) + { + index1 -= (int) Main.tile[x, y].frameX; + index2 -= (int) Main.tile[x, y].frameY; + } + if (obj == 0) + { + if ((style & 1) == 1) + Main.tile[index1, index2].frameY |= (short) 1; + else + Main.tile[index1, index2].frameY &= (short) -2; + if ((style & 2) == 2) + Main.tile[index1, index2].frameY |= (short) 2; + else + Main.tile[index1, index2].frameY &= (short) -3; + if ((style & 4) == 4) + Main.tile[index1, index2].frameY |= (short) 4; + else + Main.tile[index1, index2].frameY &= (short) -5; + } + if (obj == 1) + { + if ((style & 1) == 1) + Main.tile[index1, index2].frameY |= (short) 8; + else + Main.tile[index1, index2].frameY &= (short) -9; + if ((style & 2) == 2) + Main.tile[index1, index2].frameY |= (short) 16; + else + Main.tile[index1, index2].frameY &= (short) -17; + if ((style & 4) == 4) + Main.tile[index1, index2].frameY |= (short) 32; + else + Main.tile[index1, index2].frameY &= (short) -33; + } + if (obj == 2) + { + if ((style & 1) == 1) + Main.tile[index1, index2].frameY |= (short) 64; + else + Main.tile[index1, index2].frameY &= (short) -65; + if ((style & 2) == 2) + Main.tile[index1, index2].frameY |= (short) 128; + else + Main.tile[index1, index2].frameY &= (short) -129; + if ((style & 4) == 4) + Main.tile[index1, index2].frameY |= (short) 256; + else + Main.tile[index1, index2].frameY &= (short) -257; + if ((style & 8) == 8) + Main.tile[index1, index2].frameY |= (short) 512; + else + Main.tile[index1, index2].frameY &= (short) -513; + } + if (obj != 3) + return; + if ((style & 1) == 1) + Main.tile[index1, index2].frameY |= (short) 1024; + else + Main.tile[index1, index2].frameY &= (short) -1025; + if ((style & 2) == 2) + Main.tile[index1, index2].frameY |= (short) 2048; + else + Main.tile[index1, index2].frameY &= (short) -2049; + if ((style & 4) == 4) + Main.tile[index1, index2].frameY |= (short) 4096; + else + Main.tile[index1, index2].frameY &= (short) -4097; + if ((style & 8) == 8) + Main.tile[index1, index2].frameY |= (short) 8192; + else + Main.tile[index1, index2].frameY &= (short) -8193; + } + + public static int PlaceXmasTree_Direct( + int x, + int y, + int type, + int style, + int dir, + int alternate) + { + for (short index1 = 0; index1 < (short) 4; ++index1) + { + for (short index2 = 0; index2 < (short) 8; ++index2) + { + Tile tile = Main.tile[x + (int) index1, y + (int) index2]; + tile.active(true); + tile.type = (ushort) type; + if (index1 == (short) 0 && index2 == (short) 0) + { + tile.frameX = (short) 10; + tile.frameY = (short) 0; + } + else + { + tile.frameX = index1; + tile.frameY = index2; + } + } + } + return 0; + } + + public static void PlaceXmasTree(int x, int y, ushort type = 171) + { + bool flag = true; + int num1 = x - 1; + int num2 = y - 7; + for (int i = num1; i < num1 + 4; ++i) + { + for (int index = num2; index < num2 + 8; ++index) + { + if (Main.tile[i, index].active()) + flag = false; + } + if (i > num1 && i < num1 + 3 && !WorldGen.SolidTile(i, num2 + 8)) + flag = false; + } + if (!flag) + return; + int num3 = 0; + for (int index1 = num1; index1 < num1 + 4; ++index1) + { + int num4 = 0; + for (int index2 = num2; index2 < num2 + 8; ++index2) + { + Main.tile[index1, index2].active(true); + if (num3 == 0 && num4 == 0) + { + Main.tile[index1, index2].frameX = (short) 10; + Main.tile[index1, index2].frameY = (short) 0; + } + else + { + Main.tile[index1, index2].frameX = (short) num3; + Main.tile[index1, index2].frameY = (short) num4; + } + Main.tile[index1, index2].type = type; + Main.tile[index1, index2].active(true); + ++num4; + } + ++num3; + } + } + + public static void CheckXmasTree(int x, int y) + { + if (WorldGen.destroyObject) + return; + int num1 = x; + int num2 = y; + if (Main.tile[x, y].frameX < (short) 10) + { + num1 -= (int) Main.tile[x, y].frameX; + num2 -= (int) Main.tile[x, y].frameY; + } + bool flag = false; + int num3 = 0; + for (int i = num1; i < num1 + 4; ++i) + { + int num4 = 0; + for (int index = num2; index < num2 + 8; ++index) + { + if (Main.tile[i, index].active() && Main.tile[i, index].type == (ushort) 171) + { + if (num3 != 0 && num4 != 0 && (int) Main.tile[i, index].frameX != num3 && (int) Main.tile[i, index].frameY != num4) + flag = true; + } + else + flag = true; + ++num4; + } + ++num3; + if (i > num1 && i < num1 + 3 && !WorldGen.SolidTile2(i, num2 + 8)) + flag = true; + } + if (!flag) + return; + WorldGen.destroyObject = true; + for (int i = num1; i < num1 + 4; ++i) + { + for (int j = num2; j < num2 + 8; ++j) + { + if (Main.tile[i, j].type == (ushort) 171) + WorldGen.KillTile(i, j); + } + } + Item.NewItem(x * 16, y * 16, 32, 32, 1873); + WorldGen.destroyObject = false; + } + + public static void Place2xX(int x, int y, ushort type, int style = 0) + { + int num1 = style * 36; + int num2 = 0; + int num3 = 3; + if (type == (ushort) 105 && style == 34) + { + type = (ushort) 349; + style = 0; + num1 = 0; + } + if (type == (ushort) 105) + { + int num4 = style / 55; + num1 -= 1980 * num4; + num2 += 54 * num4; + } + if (type == (ushort) 104) + num3 = 5; + if (type == (ushort) 207) + num3 = 4; + bool flag = true; + for (int index = y - num3 + 1; index < y + 1; ++index) + { + if (Main.tile[x, index] == null) + Main.tile[x, index] = new Tile(); + if (Main.tile[x, index].active()) + flag = false; + if (Main.tile[x + 1, index] == null) + Main.tile[x + 1, index] = new Tile(); + if (Main.tile[x + 1, index].active()) + flag = false; + } + if (!flag || !WorldGen.SolidTile2(x, y + 1) || !WorldGen.SolidTile2(x + 1, y + 1)) + return; + for (int index = 0; index < num3; ++index) + { + Main.tile[x, y - num3 + 1 + index].active(true); + Main.tile[x, y - num3 + 1 + index].frameY = (short) (num2 + index * 18); + Main.tile[x, y - num3 + 1 + index].frameX = (short) num1; + Main.tile[x, y - num3 + 1 + index].type = type; + Main.tile[x + 1, y - num3 + 1 + index].active(true); + Main.tile[x + 1, y - num3 + 1 + index].frameY = (short) (num2 + index * 18); + Main.tile[x + 1, y - num3 + 1 + index].frameX = (short) (num1 + 18); + Main.tile[x + 1, y - num3 + 1 + index].type = type; + } + } + + public static int GetItemDrop_Benches(int style) + { + switch (style) + { + case 1: + return 2397; + case 2: + return 2398; + case 3: + return 2399; + case 4: + return 2400; + case 5: + return 2401; + case 6: + return 2402; + case 7: + return 2403; + case 8: + return 2404; + case 9: + return 2405; + case 10: + return 2406; + case 11: + return 2407; + case 12: + return 2408; + case 13: + return 2409; + case 14: + return 2410; + case 15: + return 2411; + case 16: + return 2412; + case 17: + return 2413; + case 18: + return 2414; + case 19: + return 2415; + case 20: + return 2416; + case 21: + return 2521; + case 22: + return 2527; + case 23: + return 2539; + case 24: + return 858; + case 25: + return 2582; + case 26: + return 2634; + case 27: + return 2635; + case 28: + return 2636; + case 29: + return 2823; + case 30: + return 3150; + case 31: + return 3152; + case 32: + return 3151; + case 33: + return 3918; + case 34: + return 3919; + case 35: + return 3947; + case 36: + return 3973; + case 37: + return 4161; + case 38: + return 4182; + case 39: + return 4203; + case 40: + return 4224; + case 41: + return 4313; + case 42: + return 4582; + case 43: + return 4993; + default: + return 335; + } + } + + public static int GetItemDrop_PicnicTables(int style) => style == 0 || style != 1 ? 4064 : 4065; + + public static int GetItemDrop_Chair(int style) + { + switch (style) + { + case 1: + return 358; + case 2: + return 628; + case 3: + return 629; + case 4: + return 630; + case 5: + return 806; + case 6: + return 807; + case 7: + return 808; + case 8: + return 809; + case 9: + return 810; + case 10: + return 826; + case 11: + return 915; + case 12: + return 1143; + case 13: + return 1396; + case 14: + return 1399; + case 15: + return 1402; + case 16: + return 1459; + case 17: + return 1509; + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + return 1703 + style - 18; + case 24: + return 1792; + case 25: + return 1814; + case 26: + return 1925; + case 27: + return 2228; + case 28: + return 2288; + case 29: + return 2524; + case 30: + return 2557; + case 31: + return 2572; + case 32: + return 2812; + case 33: + return 3174; + case 34: + return 3176; + case 35: + return 3175; + case 36: + return 3889; + case 37: + return 3937; + case 38: + return 3963; + case 39: + return 4151; + case 40: + return 4172; + case 41: + return 4193; + case 42: + return 4214; + case 43: + return 4304; + case 44: + return 4572; + default: + return 34; + } + } + + public static int GetItemDrop_Toilet(int style) + { + int num = 4096 + style; + switch (style) + { + case 32: + num = 4141; + break; + case 33: + num = 4165; + break; + case 34: + num = 4186; + break; + case 35: + num = 4207; + break; + case 36: + num = 4228; + break; + case 37: + num = 4316; + break; + case 38: + num = 4586; + break; + case 39: + num = 4731; + break; + } + if (num > 4731) + num = 4731; + return num; + } + + public static void Check1x2(int x, int j, ushort type) + { + if (WorldGen.destroyObject) + return; + int j1 = j; + bool flag = true; + if (Main.tile[x, j1] == null) + Main.tile[x, j1] = new Tile(); + if (Main.tile[x, j1 + 1] == null) + Main.tile[x, j1 + 1] = new Tile(); + int frameY = (int) Main.tile[x, j1].frameY; + int style = 0; + while (frameY >= 40) + { + frameY -= 40; + ++style; + } + if (frameY == 18) + --j1; + int num1 = (int) Main.tile[x, j1].frameX / 18; + if (Main.tile[x, j1].frameX == (short) -1) + num1 = (int) Main.tile[x, j1 + 1].frameX / 18; + if (Main.tile[x, j1] == null) + Main.tile[x, j1] = new Tile(); + if ((int) Main.tile[x, j1].frameY == 40 * style && (int) Main.tile[x, j1 + 1].frameY == 40 * style + 18 && (int) Main.tile[x, j1].type == (int) type && (int) Main.tile[x, j1 + 1].type == (int) type) + flag = false; + if (Main.tile[x, j1 + 2] == null) + Main.tile[x, j1 + 2] = new Tile(); + if (!WorldGen.SolidTileAllowBottomSlope(x, j1 + 2) && !TileID.Sets.Platforms[(int) Main.tile[x, j1 + 2].type]) + flag = true; + if (Main.tile[x, j1].type == (ushort) 20) + { + int num2 = (int) Main.tile[x, j1].frameX / 54; + int type1 = (int) Main.tile[x, j1 + 2].type; + int num3 = -1; + switch (type1) + { + case 2: + case 477: + num3 = 0; + break; + case 23: + num3 = 3; + break; + case 53: + num3 = 6; + break; + case 60: + num3 = 2; + break; + case 109: + case 492: + num3 = 5; + break; + case 112: + num3 = 9; + break; + case 116: + num3 = 7; + break; + case 147: + num3 = 1; + break; + case 199: + num3 = 4; + break; + case 234: + num3 = 8; + break; + default: + flag = true; + break; + } + if (!flag && num2 != num3) + { + int num4 = 54 * num3 + WorldGen.genRand.Next(3) * 18; + Main.tile[x, j1].frameX = (short) num4; + Main.tile[x, j1 + 1].frameX = (short) num4; + } + } + if (!flag) + return; + WorldGen.destroyObject = true; + if ((int) Main.tile[x, j1].type == (int) type) + WorldGen.KillTile(x, j1); + if ((int) Main.tile[x, j1 + 1].type == (int) type) + WorldGen.KillTile(x, j1 + 1); + if (type == (ushort) 216) + Item.NewItem(x * 16, j1 * 16, 32, 32, 970 + style); + if (type == (ushort) 338) + Item.NewItem(x * 16, j1 * 16, 32, 32, 2738); + if (type == (ushort) 390) + Item.NewItem(x * 16, j1 * 16, 16, 32, 3253); + if (type == (ushort) 493) + { + int Type = 0; + switch (num1) + { + case 0: + Type = 4083; + break; + case 1: + Type = 4084; + break; + case 2: + Type = 4085; + break; + case 3: + Type = 4086; + break; + case 4: + Type = 4087; + break; + case 5: + Type = 4088; + break; + } + if (Type > 0) + Item.NewItem(x * 16, j1 * 16, 32, 32, Type); + } + if (type == (ushort) 15) + { + int itemDropChair = WorldGen.GetItemDrop_Chair(style); + Item.NewItem(x * 16, j1 * 16, 32, 32, itemDropChair); + } + if (type == (ushort) 497) + { + int itemDropToilet = WorldGen.GetItemDrop_Toilet(style); + Item.NewItem(x * 16, j1 * 16, 32, 32, itemDropToilet); + } + else if (type == (ushort) 134) + { + if (style == 1) + Item.NewItem(x * 16, j1 * 16, 32, 32, 1220); + else + Item.NewItem(x * 16, j1 * 16, 32, 32, 525); + } + WorldGen.destroyObject = false; + } + + public static void CheckOnTable1x1(int x, int y, int type) + { + if (Main.tile[x, y + 1] == null) + return; + if (Main.tile[x, y + 1].topSlope()) + { + if (TileID.Sets.Platforms[(int) Main.tile[x, y + 1].type]) + { + if (Main.tile[x, y + 1].blockType() == 3 && Main.tile[x - 1, y + 1].active() && Main.tile[x - 1, y + 1].blockType() == 0 && TileID.Sets.Platforms[(int) Main.tile[x - 1, y + 1].type] || Main.tile[x, y + 1].blockType() == 2 && Main.tile[x + 1, y + 1].active() && Main.tile[x + 1, y + 1].blockType() == 0 && TileID.Sets.Platforms[(int) Main.tile[x + 1, y + 1].type]) + return; + WorldGen.KillTile(x, y); + } + else + WorldGen.KillTile(x, y); + } + else + { + if (Main.tile[x, y + 1].active() && Main.tileTable[(int) Main.tile[x, y + 1].type] && !Main.tile[x, y + 1].halfBrick()) + return; + if (type == 78) + { + if (WorldGen.SolidTileAllowBottomSlope(x, y + 1)) + return; + WorldGen.KillTile(x, y); + } + else + WorldGen.KillTile(x, y); + } + } + + public static void CheckSign(int x, int y, ushort type) + { + if (WorldGen.destroyObject) + return; + int num1 = x - 2; + int num2 = x + 3; + int num3 = y - 2; + int num4 = y + 3; + if (num1 < 0 || num2 > Main.maxTilesX || num3 < 0 || num4 > Main.maxTilesY) + return; + bool flag = false; + for (int index1 = num1; index1 < num2; ++index1) + { + for (int index2 = num3; index2 < num4; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + } + } + int num5 = (int) Main.tile[x, y].frameX / 18; + int num6 = (int) Main.tile[x, y].frameY / 18; + int num7 = num5 % 2; + int num8 = num6 % 2; + int index3 = x - num7; + int index4 = y - num8; + int num9 = (int) Main.tile[index3, index4].frameX / 18 / 2; + int num10 = (int) Main.tile[index3, index4].frameY / 18 / 2; + int num11 = (int) Main.tile[x, y].frameX / 18; + int num12 = 0; + while (num11 > 1) + { + num11 -= 2; + ++num12; + } + int num13 = index3; + int num14 = index3 + 2; + int num15 = index4; + int num16 = index4 + 2; + int num17 = 0; + for (int index5 = num13; index5 < num14; ++index5) + { + int num18 = 0; + for (int index6 = num15; index6 < num16; ++index6) + { + if (!Main.tile[index5, index6].active() || (int) Main.tile[index5, index6].type != (int) type) + { + flag = true; + break; + } + if ((int) Main.tile[index5, index6].frameX / 18 != num17 + num9 * 2 || (int) Main.tile[index5, index6].frameY / 18 != num18 + num10 * 2) + { + flag = true; + break; + } + ++num18; + } + ++num17; + } + if (!flag) + { + if (type == (ushort) 85) + { + if (WorldGen.SolidTileAllowBottomSlope(index3, index4 + 2) && WorldGen.SolidTileAllowBottomSlope(index3 + 1, index4 + 2)) + num9 = num12; + else + flag = true; + } + else if (WorldGen.TopEdgeCanBeAttachedTo(index3, index4 + 2) && WorldGen.TopEdgeCanBeAttachedTo(index3 + 1, index4 + 2)) + num9 = 0; + else if (WorldGen.BottomEdgeCanBeAttachedTo(index3, index4 - 1) && WorldGen.BottomEdgeCanBeAttachedTo(index3 + 1, index4 - 1)) + num9 = 1; + else if (WorldGen.RightEdgeCanBeAttachedTo(index3 - 1, index4) && WorldGen.RightEdgeCanBeAttachedTo(index3 - 1, index4 + 1)) + num9 = 2; + else if (WorldGen.LeftEdgeCanBeAttachedTo(index3 + 2, index4) && WorldGen.LeftEdgeCanBeAttachedTo(index3 + 2, index4 + 1)) + num9 = 3; + else if (Main.tile[index3, index4].wall > (ushort) 0 && Main.tile[index3 + 1, index4].wall > (ushort) 0 && Main.tile[index3, index4 + 1].wall > (ushort) 0 && Main.tile[index3 + 1, index4 + 1].wall > (ushort) 0) + num9 = 4; + else + flag = true; + } + if (flag) + { + if (type == (ushort) 395) + { + int key = TEItemFrame.Find(index3, index4); + if (key != -1 && ((TEItemFrame) TileEntity.ByID[key]).item.stack > 0) + { + ((TEItemFrame) TileEntity.ByID[key]).DropItem(); + if (Main.netMode != 2) + Main.LocalPlayer.InterruptItemUsageIfOverTile(395); + } + } + WorldGen.destroyObject = true; + for (int i = num13; i < num14; ++i) + { + for (int j = num15; j < num16; ++j) + { + if ((int) Main.tile[i, j].type == (int) type) + WorldGen.KillTile(i, j); + } + } + if (type != (ushort) 395) + Sign.KillSign(index3, index4); + if (type == (ushort) 85) + { + int Type = 321; + if (num12 >= 6 && num12 <= 10) + Type = 3229 + num12 - 6; + else if (num12 >= 1 && num12 <= 5) + Type = 1173 + num12 - 1; + Item.NewItem(x * 16, y * 16, 32, 32, Type); + if (Main.netMode != 1 && WorldGen.genRand.Next(2) == 0 && NPC.CountNPCS(316) < 2) + { + int closest = (int) Player.FindClosest(new Vector2((float) (x * 16), (float) (y * 16)), 16, 16); + if (Main.player[closest].ZoneGraveyard || !Main.dayTime || (double) y > Main.worldSurface) + NPC.SpawnOnPlayer(closest, 316); + } + } + else if (type == (ushort) 395) + { + Item.NewItem(index3 * 16, index4 * 16, 32, 32, 3270); + TEItemFrame.Kill(index3, index4); + } + else if (type == (ushort) 425) + Item.NewItem(index3 * 16, index4 * 16, 32, 32, 3617); + else if (type == (ushort) 573) + Item.NewItem(index3 * 16, index4 * 16, 32, 32, 4710); + else if (type == (ushort) 511) + Item.NewItem(index3 * 16, index4 * 16, 32, 32, 4320); + else if (type == (ushort) 510) + Item.NewItem(index3 * 16, index4 * 16, 32, 32, 4319); + else + Item.NewItem(x * 16, y * 16, 32, 32, 171); + WorldGen.destroyObject = false; + } + else + { + int num19 = 36 * num9; + for (int index7 = 0; index7 < 2; ++index7) + { + for (int index8 = 0; index8 < 2; ++index8) + { + Main.tile[index3 + index7, index4 + index8].active(true); + Main.tile[index3 + index7, index4 + index8].type = type; + Main.tile[index3 + index7, index4 + index8].frameX = (short) (num19 + 18 * index7); + Main.tile[index3 + index7, index4 + index8].frameY = (short) (18 * index8 + num10 * 36); + } + } + } + } + + public static bool PlaceSign(int x, int y, ushort type, int Style = 0) + { + int num1 = x - 2; + int num2 = x + 3; + int num3 = y - 2; + int num4 = y + 3; + if (num1 < 0 || num2 > Main.maxTilesX || num3 < 0 || num4 > Main.maxTilesY) + return false; + for (int index1 = num1; index1 < num2; ++index1) + { + for (int index2 = num3; index2 < num4; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + } + } + int index3 = x; + int index4 = y; + int num5 = 0; + if (type == (ushort) 55 || type == (ushort) 425 || type == (ushort) 510 || type == (ushort) 511) + { + if (WorldGen.SolidTile2(x, y + 1) && WorldGen.SolidTile2(x + 1, y + 1)) + { + --index4; + num5 = 0; + } + else if (Main.tile[x, y - 1].nactive() && Main.tileSolid[(int) Main.tile[x, y - 1].type] && !Main.tileSolidTop[(int) Main.tile[x, y - 1].type] && Main.tile[x + 1, y - 1].nactive() && Main.tileSolid[(int) Main.tile[x + 1, y - 1].type] && !Main.tileSolidTop[(int) Main.tile[x + 1, y - 1].type]) + num5 = 1; + else if (Main.tile[x - 1, y].nactive() && Main.tileSolid[(int) Main.tile[x - 1, y].type] && !Main.tileSolidTop[(int) Main.tile[x - 1, y].type] && !Main.tileNoAttach[(int) Main.tile[x - 1, y].type] && Main.tile[x - 1, y + 1].nactive() && Main.tileSolid[(int) Main.tile[x - 1, y + 1].type] && !Main.tileSolidTop[(int) Main.tile[x - 1, y + 1].type] && !Main.tileNoAttach[(int) Main.tile[x - 1, y + 1].type]) + num5 = 2; + else if (Main.tile[x + 1, y].nactive() && Main.tileSolid[(int) Main.tile[x + 1, y].type] && !Main.tileSolidTop[(int) Main.tile[x + 1, y].type] && !Main.tileNoAttach[(int) Main.tile[x + 1, y].type] && Main.tile[x + 1, y + 1].nactive() && Main.tileSolid[(int) Main.tile[x + 1, y + 1].type] && !Main.tileSolidTop[(int) Main.tile[x + 1, y + 1].type] && !Main.tileNoAttach[(int) Main.tile[x + 1, y + 1].type]) + { + --index3; + num5 = 3; + } + else + { + if (Main.tile[index3, index4].wall <= (ushort) 0 || Main.tile[index3 + 1, index4].wall <= (ushort) 0 || Main.tile[index3, index4 + 1].wall <= (ushort) 0 || Main.tile[index3 + 1, index4 + 1].wall <= (ushort) 0) + return false; + num5 = 4; + } + } + if (Main.tile[index3, index4].active() || Main.tile[index3 + 1, index4].active() || Main.tile[index3, index4 + 1].active() || Main.tile[index3 + 1, index4 + 1].active()) + return false; + int num6 = 36 * num5; + for (int index5 = 0; index5 < 2; ++index5) + { + for (int index6 = 0; index6 < 2; ++index6) + { + Main.tile[index3 + index5, index4 + index6].active(true); + Main.tile[index3 + index5, index4 + index6].type = type; + Main.tile[index3 + index5, index4 + index6].frameX = (short) (num6 + 18 * index5); + Main.tile[index3 + index5, index4 + index6].frameY = (short) (18 * index6); + } + } + return true; + } + + public static bool Place2x2Horizontal(int x, int y, ushort type, int Style = 0) + { + int num1 = x - 2; + int num2 = x + 3; + int num3 = y - 2; + int num4 = y + 3; + if (num1 < 0 || num2 > Main.maxTilesX || num3 < 0 || num4 > Main.maxTilesY) + return false; + for (int index1 = num1; index1 < num2; ++index1) + { + for (int index2 = num3; index2 < num4; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + } + } + int index3 = x; + int num5 = y; + if (!WorldGen.SolidTile2(x, y + 1) || !WorldGen.SolidTile2(x + 1, y + 1)) + return false; + int index4 = num5 - 1; + int num6 = Style; + if (Main.tile[index3, index4].active() || Main.tile[index3 + 1, index4].active() || Main.tile[index3, index4 + 1].active() || Main.tile[index3 + 1, index4 + 1].active()) + return false; + int num7 = 36 * num6; + for (int index5 = 0; index5 < 2; ++index5) + { + for (int index6 = 0; index6 < 2; ++index6) + { + Main.tile[index3 + index5, index4 + index6].active(true); + Main.tile[index3 + index5, index4 + index6].type = type; + Main.tile[index3 + index5, index4 + index6].frameX = (short) (num7 + 18 * index5); + Main.tile[index3 + index5, index4 + index6].frameY = (short) (18 * index6); + } + } + return true; + } + + public static Color paintColor(int color) + { + Color white = Color.White; + int num = color; + if (num == 1 || num == 13) + { + white.R = byte.MaxValue; + white.G = (byte) 0; + white.B = (byte) 0; + } + if (num == 2 || num == 14) + { + white.R = byte.MaxValue; + white.G = (byte) 127; + white.B = (byte) 0; + } + if (num == 3 || num == 15) + { + white.R = byte.MaxValue; + white.G = byte.MaxValue; + white.B = (byte) 0; + } + if (num == 4 || num == 16) + { + white.R = (byte) 127; + white.G = byte.MaxValue; + white.B = (byte) 0; + } + if (num == 5 || num == 17) + { + white.R = (byte) 0; + white.G = byte.MaxValue; + white.B = (byte) 0; + } + if (num == 6 || num == 18) + { + white.R = (byte) 0; + white.G = byte.MaxValue; + white.B = (byte) 127; + } + if (num == 7 || num == 19) + { + white.R = (byte) 0; + white.G = byte.MaxValue; + white.B = byte.MaxValue; + } + if (num == 8 || num == 20) + { + white.R = (byte) 0; + white.G = (byte) 127; + white.B = byte.MaxValue; + } + if (num == 9 || num == 21) + { + white.R = (byte) 0; + white.G = (byte) 0; + white.B = byte.MaxValue; + } + if (num == 10 || num == 22) + { + white.R = (byte) 127; + white.G = (byte) 0; + white.B = byte.MaxValue; + } + if (num == 11 || num == 23) + { + white.R = byte.MaxValue; + white.G = (byte) 0; + white.B = byte.MaxValue; + } + if (num == 12 || num == 24) + { + white.R = byte.MaxValue; + white.G = (byte) 0; + white.B = (byte) 127; + } + if (num == 25) + { + white.R = (byte) 75; + white.G = (byte) 75; + white.B = (byte) 75; + } + if (num == 26) + { + white.R = byte.MaxValue; + white.G = byte.MaxValue; + white.B = byte.MaxValue; + } + if (num == 27) + { + white.R = (byte) 175; + white.G = (byte) 175; + white.B = (byte) 175; + } + if (num == 28) + { + white.R = byte.MaxValue; + white.G = (byte) 178; + white.B = (byte) 125; + } + if (num == 29) + { + white.R = (byte) 25; + white.G = (byte) 25; + white.B = (byte) 25; + } + if (num == 30) + { + white.R = (byte) 200; + white.G = (byte) 200; + white.B = (byte) 200; + white.A = (byte) 150; + } + return white; + } + + public static void paintEffect(int x, int y, byte color, byte oldColor) + { + int color1 = (int) color; + if (color == (byte) 0) + color1 = (int) oldColor; + Color newColor = WorldGen.paintColor(color1); + for (int index1 = 0; index1 < 10; ++index1) + { + int index2 = Dust.NewDust(new Vector2((float) (x * 16), (float) (y * 16)), 16, 16, 143, Alpha: 50, newColor: newColor); + if (WorldGen.genRand.Next(2) == 0) + { + Main.dust[index2].noGravity = true; + Main.dust[index2].scale *= 1.2f; + } + else + Main.dust[index2].scale *= 0.5f; + } + } + + public static bool paintTile(int x, int y, byte color, bool broadCast = false) + { + if (Main.tile[x, y] == null || !Main.tile[x, y].active()) + return false; + byte oldColor = Main.tile[x, y].color(); + Main.tile[x, y].color(color); + if (broadCast) + NetMessage.SendData(63, number: x, number2: ((float) y), number3: ((float) color)); + WorldGen.paintEffect(x, y, color, oldColor); + return true; + } + + public static bool paintWall(int x, int y, byte color, bool broadCast = false) + { + if (Main.tile[x, y] == null || Main.tile[x, y].wall == (ushort) 0) + return false; + byte oldColor = Main.tile[x, y].wallColor(); + Main.tile[x, y].wallColor(color); + if (broadCast) + NetMessage.SendData(64, number: x, number2: ((float) y), number3: ((float) color)); + WorldGen.paintEffect(x, y, color, oldColor); + return true; + } + + public static void Place3x3Wall(int x, int y, ushort type, int style) + { + int num1 = x - 1; + int num2 = y - 1; + bool flag = true; + for (int index1 = num1; index1 < num1 + 3; ++index1) + { + for (int index2 = num2; index2 < num2 + 3; ++index2) + { + if (Main.tile[index1, index2].active() || Main.tile[index1, index2].wall == (ushort) 0) + { + flag = false; + break; + } + } + } + if (!flag) + return; + int num3 = 0; + for (; style > 35; style -= 36) + ++num3; + int num4 = style * 54; + int num5 = num3 * 54; + for (int index3 = num1; index3 < num1 + 3; ++index3) + { + for (int index4 = num2; index4 < num2 + 3; ++index4) + { + Main.tile[index3, index4].active(true); + Main.tile[index3, index4].type = type; + Main.tile[index3, index4].frameX = (short) (num4 + 18 * (index3 - num1)); + Main.tile[index3, index4].frameY = (short) (num5 + 18 * (index4 - num2)); + } + } + } + + public static void Check3x3Wall(int x, int y) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int type = (int) Main.tile[x, y].type; + int num1 = 0; + int num2 = 0; + int num3 = (int) Main.tile[x, y].frameX / 18; + while (num3 >= 3) + { + num3 -= 3; + ++num1; + } + int num4 = x - num3; + int num5 = (int) Main.tile[x, y].frameY / 18; + while (num5 >= 3) + { + num5 -= 3; + ++num2; + } + int num6 = y - num5; + int num7 = num2 * 54; + int num8 = num1 * 54; + for (int index1 = num4; index1 < num4 + 3; ++index1) + { + for (int index2 = num6; index2 < num6 + 3; ++index2) + { + if ((int) Main.tile[index1, index2].type != type || !Main.tile[index1, index2].active() || Main.tile[index1, index2].wall <= (ushort) 0 || (int) Main.tile[index1, index2].frameX != num8 + (index1 - num4) * 18 || (int) Main.tile[index1, index2].frameY != num7 + (index2 - num6) * 18) + { + flag = true; + break; + } + } + } + if (!flag) + return; + WorldGen.destroyObject = true; + for (int i = num4; i < num4 + 3; ++i) + { + for (int j = num6; j < num6 + 3; ++j) + { + if ((int) Main.tile[i, j].type == type && Main.tile[i, j].active()) + WorldGen.KillTile(i, j); + } + } + switch (type) + { + case 240: + int num9 = num1 + num2 * 36; + switch (num9) + { + case 18: + Item.NewItem(x * 16, y * 16, 32, 32, 1419); + break; + case 19: + Item.NewItem(x * 16, y * 16, 32, 32, 1420); + break; + case 20: + Item.NewItem(x * 16, y * 16, 32, 32, 1427); + break; + case 21: + Item.NewItem(x * 16, y * 16, 32, 32, 1428); + break; + case 33: + Item.NewItem(x * 16, y * 16, 32, 32, 1574); + break; + case 34: + Item.NewItem(x * 16, y * 16, 32, 32, 1575); + break; + case 35: + Item.NewItem(x * 16, y * 16, 32, 32, 1576); + break; + case 36: + Item.NewItem(x * 16, y * 16, 32, 32, 1855); + break; + case 37: + Item.NewItem(x * 16, y * 16, 32, 32, 1856); + break; + case 38: + Item.NewItem(x * 16, y * 16, 32, 32, 1960); + break; + case 39: + Item.NewItem(x * 16, y * 16, 32, 32, 1961); + break; + case 40: + Item.NewItem(x * 16, y * 16, 32, 32, 1962); + break; + case 54: + Item.NewItem(x * 16, y * 16, 32, 32, 2489); + break; + case 55: + Item.NewItem(x * 16, y * 16, 32, 32, 2589); + break; + case 56: + Item.NewItem(x * 16, y * 16, 32, 32, 3357); + break; + case 57: + Item.NewItem(x * 16, y * 16, 32, 32, 3358); + break; + case 58: + Item.NewItem(x * 16, y * 16, 32, 32, 3359); + break; + case 59: + Item.NewItem(x * 16, y * 16, 32, 32, 3595); + break; + case 60: + Item.NewItem(x * 16, y * 16, 32, 32, 3867); + break; + case 61: + Item.NewItem(x * 16, y * 16, 32, 32, 3866); + break; + case 62: + Item.NewItem(x * 16, y * 16, 32, 32, 3868); + break; + case 69: + Item.NewItem(x * 16, y * 16, 32, 32, 4660); + break; + case 70: + Item.NewItem(x * 16, y * 16, 32, 32, 4723); + break; + case 71: + Item.NewItem(x * 16, y * 16, 32, 32, 4724); + break; + case 72: + Item.NewItem(x * 16, y * 16, 32, 32, 4783); + break; + case 73: + Item.NewItem(x * 16, y * 16, 32, 32, 4958); + break; + default: + if (num9 >= 63 && num9 <= 68) + { + Item.NewItem(x * 16, y * 16, 32, 32, 4626 + num9 - 63); + break; + } + if (num9 >= 41 && num9 <= 45) + { + Item.NewItem(x * 16, y * 16, 32, 32, 2114 + num9 - 41); + break; + } + if (num9 >= 46 && num9 <= 53) + { + Item.NewItem(x * 16, y * 16, 32, 32, 2442 + num9 - 46); + break; + } + if (num9 >= 22 && num9 <= 25) + { + Item.NewItem(x * 16, y * 16, 32, 32, 1440 + num9 - 22); + break; + } + if (num9 >= 26 && num9 <= 29) + { + Item.NewItem(x * 16, y * 16, 32, 32, 1496 + num9 - 26); + break; + } + if (num9 >= 30 && num9 <= 32) + { + Item.NewItem(x * 16, y * 16, 32, 32, 1538 + num9 - 30); + break; + } + Item.NewItem(x * 16, y * 16, 32, 32, 1360 + num9); + break; + } + break; + case 440: + int Type1 = -1; + int Type2 = -1; + switch (num1) + { + case 0: + Type1 = 3644; + Type2 = 1526; + break; + case 1: + Type1 = 3645; + Type2 = 1524; + break; + case 2: + Type1 = 3646; + Type2 = 1525; + break; + case 3: + Type1 = 3647; + Type2 = 1523; + break; + case 4: + Type1 = 3648; + Type2 = 1522; + break; + case 5: + Type1 = 3649; + Type2 = 1527; + break; + case 6: + Type1 = 3650; + Type2 = 3643; + break; + } + if (Type1 != -1) + Item.NewItem(x * 16, y * 16, 32, 32, Type1); + if (Type2 != -1 && num2 == 1) + { + Item.NewItem(x * 16, y * 16, 32, 32, Type2); + break; + } + break; + } + WorldGen.destroyObject = false; + } + + public static void Place2x3Wall(int x, int y, ushort type, int style) + { + int num1 = x; + int num2 = y - 1; + bool flag = true; + for (int index1 = num1; index1 < num1 + 2; ++index1) + { + for (int index2 = num2; index2 < num2 + 3; ++index2) + { + if (Main.tile[index1, index2].active() || Main.tile[index1, index2].wall == (ushort) 0) + { + flag = false; + break; + } + } + } + if (!flag) + return; + int num3 = style * 36; + int num4 = 0; + for (int index3 = num1; index3 < num1 + 2; ++index3) + { + for (int index4 = num2; index4 < num2 + 3; ++index4) + { + Main.tile[index3, index4].active(true); + Main.tile[index3, index4].type = type; + Main.tile[index3, index4].frameX = (short) (num3 + 18 * (index3 - num1)); + Main.tile[index3, index4].frameY = (short) (num4 + 18 * (index4 - num2)); + } + } + } + + public static void Check2x3Wall(int x, int y) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int type = (int) Main.tile[x, y].type; + int num1 = 0; + int num2 = (int) Main.tile[x, y].frameX / 18; + while (num2 >= 2) + { + num2 -= 2; + ++num1; + } + int num3 = x - num2; + int num4 = y - (int) Main.tile[x, y].frameY / 18; + int num5 = num1 * 36; + for (int index1 = num3; index1 < num3 + 2; ++index1) + { + for (int index2 = num4; index2 < num4 + 3; ++index2) + { + if ((int) Main.tile[index1, index2].type != type || !Main.tile[index1, index2].active() || Main.tile[index1, index2].wall <= (ushort) 0 || (int) Main.tile[index1, index2].frameX != num5 + (index1 - num3) * 18 || (int) Main.tile[index1, index2].frameY != (index2 - num4) * 18) + { + flag = true; + break; + } + } + } + if (!flag) + return; + WorldGen.destroyObject = true; + for (int i = num3; i < num3 + 2; ++i) + { + for (int j = num4; j < num4 + 3; ++j) + { + if ((int) Main.tile[i, j].type == type && Main.tile[i, j].active()) + WorldGen.KillTile(i, j); + } + } + if (type == 245) + { + switch (num1) + { + case 5: + Item.NewItem(x * 16, y * 16, 32, 32, 1495); + break; + case 6: + Item.NewItem(x * 16, y * 16, 32, 32, 1577); + break; + case 7: + Item.NewItem(x * 16, y * 16, 32, 32, 4638); + break; + case 8: + Item.NewItem(x * 16, y * 16, 32, 32, 4639); + break; + case 9: + Item.NewItem(x * 16, y * 16, 32, 32, 4659); + break; + case 10: + Item.NewItem(x * 16, y * 16, 32, 32, 4726); + break; + case 11: + Item.NewItem(x * 16, y * 16, 32, 32, 4727); + break; + case 12: + Item.NewItem(x * 16, y * 16, 32, 32, 4728); + break; + default: + Item.NewItem(x * 16, y * 16, 32, 32, 1474 + num1); + break; + } + } + WorldGen.destroyObject = false; + } + + public static void Place3x2Wall(int x, int y, ushort type, int style) + { + int num1 = x - 1; + int num2 = y; + bool flag = true; + for (int index1 = num1; index1 < num1 + 3; ++index1) + { + for (int index2 = num2; index2 < num2 + 2; ++index2) + { + if (Main.tile[index1, index2].active() || Main.tile[index1, index2].wall == (ushort) 0) + { + flag = false; + break; + } + } + } + if (!flag) + return; + int num3 = 0; + int num4 = style * 36; + for (int index3 = num1; index3 < num1 + 3; ++index3) + { + for (int index4 = num2; index4 < num2 + 2; ++index4) + { + Main.tile[index3, index4].active(true); + Main.tile[index3, index4].type = type; + Main.tile[index3, index4].frameX = (short) (num3 + 18 * (index3 - num1)); + Main.tile[index3, index4].frameY = (short) (num4 + 18 * (index4 - num2)); + } + } + } + + public static void Check3x2Wall(int x, int y) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int type = (int) Main.tile[x, y].type; + int num1 = 0; + int num2 = (int) Main.tile[x, y].frameY / 18; + while (num2 >= 2) + { + num2 -= 2; + ++num1; + } + int num3 = y - num2; + int num4 = x - (int) Main.tile[x, y].frameX / 18; + int num5 = num1 * 36; + for (int index1 = num4; index1 < num4 + 3; ++index1) + { + for (int index2 = num3; index2 < num3 + 2; ++index2) + { + if ((int) Main.tile[index1, index2].type != type || !Main.tile[index1, index2].active() || Main.tile[index1, index2].wall <= (ushort) 0 || (int) Main.tile[index1, index2].frameY != num5 + (index2 - num3) * 18 || (int) Main.tile[index1, index2].frameX != (index1 - num4) * 18) + { + flag = true; + break; + } + } + } + if (!flag) + return; + WorldGen.destroyObject = true; + for (int i = num4; i < num4 + 3; ++i) + { + for (int j = num3; j < num3 + 2; ++j) + { + if ((int) Main.tile[i, j].type == type && Main.tile[i, j].active()) + WorldGen.KillTile(i, j); + } + } + if (type == 246) + { + switch (num1) + { + case 16: + Item.NewItem(x * 16, y * 16, 32, 32, 1541); + break; + case 17: + Item.NewItem(x * 16, y * 16, 32, 32, 1542); + break; + case 18: + Item.NewItem(x * 16, y * 16, 32, 32, 1908); + break; + case 19: + Item.NewItem(x * 16, y * 16, 32, 32, 4661); + break; + case 20: + Item.NewItem(x * 16, y * 16, 32, 32, 4729); + break; + default: + Item.NewItem(x * 16, y * 16, 32, 32, 1479 + num1); + break; + } + } + WorldGen.destroyObject = false; + } + + public static void Place4x3Wall(int x, int y, ushort type, int style) + { + int num1 = x - 1; + int num2 = y - 1; + bool flag = true; + for (int index1 = num1; index1 < num1 + 4; ++index1) + { + for (int index2 = num2; index2 < num2 + 3; ++index2) + { + if (Main.tile[index1, index2].active() || Main.tile[index1, index2].wall == (ushort) 0) + { + flag = false; + break; + } + } + } + if (!flag) + return; + int num3 = 0; + int num4 = style * 54; + for (int index3 = num1; index3 < num1 + 4; ++index3) + { + for (int index4 = num2; index4 < num2 + 3; ++index4) + { + Main.tile[index3, index4].active(true); + Main.tile[index3, index4].type = type; + Main.tile[index3, index4].frameX = (short) (num3 + 18 * (index3 - num1)); + Main.tile[index3, index4].frameY = (short) (num4 + 18 * (index4 - num2)); + } + } + } + + public static void Check4x3Wall(int x, int y) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int type = (int) Main.tile[x, y].type; + int num1 = 0; + int num2 = (int) Main.tile[x, y].frameY / 18; + while (num2 >= 3) + { + num2 -= 3; + ++num1; + } + int num3 = y - num2; + int num4 = x - (int) Main.tile[x, y].frameX / 18; + int num5 = num1 * 54; + for (int index1 = num4; index1 < num4 + 4; ++index1) + { + for (int index2 = num3; index2 < num3 + 3; ++index2) + { + if ((int) Main.tile[index1, index2].type != type || !Main.tile[index1, index2].active() || Main.tile[index1, index2].wall <= (ushort) 0 || (int) Main.tile[index1, index2].frameY != num5 + (index2 - num3) * 18 || (int) Main.tile[index1, index2].frameX != (index1 - num4) * 18) + { + flag = true; + break; + } + } + } + if (!flag) + return; + WorldGen.destroyObject = true; + for (int i = num4; i < num4 + 4; ++i) + { + for (int j = num3; j < num3 + 3; ++j) + { + if ((int) Main.tile[i, j].type == type && Main.tile[i, j].active()) + WorldGen.KillTile(i, j); + } + } + if (type == 241) + Item.NewItem(x * 16, y * 16, 32, 32, 1417); + WorldGen.destroyObject = false; + } + + public static void Place6x4Wall(int x, int y, ushort type, int style) + { + int num1 = x - 2; + int num2 = y - 2; + bool flag = true; + for (int index1 = num1; index1 < num1 + 6; ++index1) + { + for (int index2 = num2; index2 < num2 + 4; ++index2) + { + if (Main.tile[index1, index2].active() || Main.tile[index1, index2].wall == (ushort) 0) + { + flag = false; + break; + } + } + } + if (!flag) + return; + int num3 = 27; + int num4 = style / num3 * 108; + int num5 = style % num3 * 72; + for (int index3 = num1; index3 < num1 + 6; ++index3) + { + for (int index4 = num2; index4 < num2 + 4; ++index4) + { + Main.tile[index3, index4].active(true); + Main.tile[index3, index4].type = type; + Main.tile[index3, index4].frameX = (short) (num4 + 18 * (index3 - num1)); + Main.tile[index3, index4].frameY = (short) (num5 + 18 * (index4 - num2)); + } + } + } + + public static void Check6x4Wall(int x, int y) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int type = (int) Main.tile[x, y].type; + int num1 = (int) Main.tile[x, y].frameY / 18; + int num2 = (int) Main.tile[x, y].frameX / 18; + int num3 = 27 * (num2 / 6) + (num1 >> 2); + int num4 = num1 % 4; + int num5 = num2 % 6; + int num6 = y - num4; + int num7 = x - (int) Main.tile[x, y].frameX / 18 % 6; + int num8 = num3 % 27 * 72; + int num9 = num3 / 27 * 108; + for (int index1 = num7; index1 < num7 + 6; ++index1) + { + for (int index2 = num6; index2 < num6 + 4; ++index2) + { + if ((int) Main.tile[index1, index2].type != type || !Main.tile[index1, index2].active() || Main.tile[index1, index2].wall <= (ushort) 0 || (int) Main.tile[index1, index2].frameY != num8 + (index2 - num6) * 18 || (int) Main.tile[index1, index2].frameX != num9 + (index1 - num7) * 18) + { + flag = true; + break; + } + } + } + if (!flag) + return; + WorldGen.destroyObject = true; + for (int i = num7; i < num7 + 6; ++i) + { + for (int j = num6; j < num6 + 4; ++j) + { + if ((int) Main.tile[i, j].type == type && Main.tile[i, j].active()) + WorldGen.KillTile(i, j); + } + } + if (type == 242) + { + switch (num3) + { + case 30: + Item.NewItem(x * 16, y * 16, 32, 32, 2995); + break; + case 43: + Item.NewItem(x * 16, y * 16, 32, 32, 4658); + break; + case 44: + Item.NewItem(x * 16, y * 16, 32, 32, 4725); + break; + default: + if (num3 >= 37 && num3 <= 42) + { + Item.NewItem(x * 16, y * 16, 32, 32, 4632 + num3 - 37); + break; + } + if (num3 >= 31 && num3 <= 35) + { + Item.NewItem(x * 16, y * 16, 32, 32, 3055 + num3 - 31); + break; + } + if (num3 >= 27 && num3 <= 29) + { + Item.NewItem(x * 16, y * 16, 32, 32, 2865 + num3 - 27); + break; + } + if (num3 == 36) + { + Item.NewItem(x * 16, y * 16, 32, 32, 3596); + break; + } + if (num3 == 26) + { + Item.NewItem(x * 16, y * 16, 32, 32, 2497); + break; + } + if (num3 == 25) + { + Item.NewItem(x * 16, y * 16, 32, 32, 2495); + break; + } + if (num3 >= 22) + { + Item.NewItem(x * 16, y * 16, 32, 32, 2281 + num3 - 22); + break; + } + if (num3 >= 17) + { + Item.NewItem(x * 16, y * 16, 32, 32, 1846 + num3 - 17); + break; + } + if (num3 == 16) + { + Item.NewItem(x * 16, y * 16, 32, 32, 1573); + break; + } + if (num3 >= 13) + { + Item.NewItem(x * 16, y * 16, 32, 32, 1500 + num3 - 13); + break; + } + if (num3 >= 6) + { + Item.NewItem(x * 16, y * 16, 32, 32, 1433 + num3 - 6); + break; + } + Item.NewItem(x * 16, y * 16, 32, 32, 1421 + num3); + break; + } + } + WorldGen.destroyObject = false; + } + + private static int RollRandomSeaShellStyle() + { + int num = WorldGen.genRand.Next(2); + if (WorldGen.genRand.Next(10) == 0) + num = 2; + if (WorldGen.genRand.Next(10) == 0) + num = 3; + if (WorldGen.genRand.Next(50) == 0) + num = 4; + return num; + } + + public static void Place1x1(int x, int y, int type, int style = 0) + { + Tile tile = Main.tile[x, y]; + if (Main.tile[x, y] == null) + { + tile = new Tile(); + Main.tile[x, y] = tile; + } + if (Main.tile[x, y + 1] == null) + Main.tile[x, y + 1] = new Tile(); + if (type == 324) + { + if (!WorldGen.SolidTile2(x, y + 1) && (!Main.tile[x, y + 1].nactive() || !Main.tileTable[(int) Main.tile[x, y + 1].type])) + return; + tile.active(true); + tile.type = (ushort) type; + tile.frameX = (short) (22 * WorldGen.genRand.Next(3)); + tile.frameY = (short) (22 * style); + } + else + { + if (!WorldGen.SolidTile2(x, y + 1) || tile.active()) + return; + tile.active(true); + tile.type = (ushort) type; + switch (type) + { + case 36: + case 144: + case 239: + tile.frameX = (short) (style * 18); + tile.frameY = (short) 0; + break; + case 324: + tile.frameX = (short) (22 * WorldGen.RollRandomSeaShellStyle()); + tile.frameY = (short) (22 * style); + break; + default: + tile.frameY = (short) (style * 18); + break; + } + } + } + + public static void Check1x1(int x, int y, int type) + { + if (Main.tile[x, y + 1] == null || WorldGen.SolidTileAllowBottomSlope(x, y + 1)) + return; + WorldGen.KillTile(x, y); + } + + public static void CheckGolf1x1(int x, int y, int type) + { + Tile tile = Main.tile[x, y]; + bool flag = false; + if ((int) tile.frameX % 18 != 0) + flag = true; + if ((int) tile.frameY % 18 != 0) + flag = true; + if (!WorldGen.SolidTileAllowBottomSlope(x, y + 1)) + flag = true; + if (!flag) + return; + WorldGen.KillTile(x, y); + } + + public static void CheckLogicTiles(int x, int y, int type) + { + if (type == 419) + { + Tile tile = Main.tile[x, y + 1]; + if (tile != null && (!tile.active() || tile.type != (ushort) 420 && tile.type != (ushort) 419)) + { + WorldGen.KillTile(x, y); + return; + } + } + Tile tile1 = Main.tile[x, y]; + bool flag = false; + if ((int) tile1.frameX % 18 != 0) + flag = true; + if ((int) tile1.frameY % 18 != 0) + flag = true; + if (!flag) + return; + WorldGen.KillTile(x, y); + } + + public static void PlaceLogicTiles(int x, int y, int type, int style = 0) + { + Tile tile = Main.tile[x, y]; + if (Main.tile[x, y] == null) + { + tile = new Tile(); + Main.tile[x, y] = tile; + } + if (Main.tile[x, y + 1] == null) + Main.tile[x, y + 1] = new Tile(); + if (type == 419) + { + if (!Main.tile[x, y + 1].active() || Main.tile[x, y + 1].type != (ushort) 419 && Main.tile[x, y + 1].type != (ushort) 420) + return; + tile.active(true); + tile.type = (ushort) type; + tile.frameX = (short) (style * 18); + tile.frameY = (short) 0; + } + else + { + if (tile.active()) + return; + tile.active(true); + tile.type = (ushort) type; + tile.frameX = (short) 0; + tile.frameY = (short) (18 * style); + } + } + + public static void PlaceOnTable1x1(int x, int y, int type, int style = 0) + { + bool flag = false; + if (Main.tile[x, y] == null) + Main.tile[x, y] = new Tile(); + if (Main.tile[x, y + 1] == null) + Main.tile[x, y + 1] = new Tile(); + if (!Main.tile[x, y].active() && Main.tile[x, y + 1].nactive() && Main.tileTable[(int) Main.tile[x, y + 1].type]) + flag = true; + if (type == 78 && !Main.tile[x, y].active() && Main.tile[x, y + 1].nactive() && Main.tileSolid[(int) Main.tile[x, y + 1].type] && !Main.tile[x, y + 1].halfBrick() && Main.tile[x, y + 1].slope() == (byte) 0) + flag = true; + if (!flag) + return; + Main.tile[x, y].active(true); + Main.tile[x, y].type = (ushort) type; + if (type == 33) + { + Main.tile[x, y].frameX = (short) 0; + Main.tile[x, y].frameY = (short) (style * 22); + } + else + { + Main.tile[x, y].frameX = (short) (style * 18); + Main.tile[x, y].frameY = (short) 0; + } + if (type != 50) + return; + Main.tile[x, y].frameX = (short) (18 * WorldGen.genRand.Next(5)); + } + + public static bool PlaceAlch(int x, int y, int style) + { + if (Main.tile[x, y] == null) + Main.tile[x, y] = new Tile(); + if (Main.tile[x, y + 1] == null) + Main.tile[x, y + 1] = new Tile(); + if (!Main.tile[x, y].active() && Main.tile[x, y + 1].nactive() && !Main.tile[x, y + 1].halfBrick() && Main.tile[x, y + 1].slope() == (byte) 0) + { + bool flag = false; + switch (style) + { + case 0: + if (Main.tile[x, y + 1].type != (ushort) 2 && Main.tile[x, y + 1].type != (ushort) 477 && Main.tile[x, y + 1].type != (ushort) 492 && Main.tile[x, y + 1].type != (ushort) 78 && Main.tile[x, y + 1].type != (ushort) 380 && Main.tile[x, y + 1].type != (ushort) 109) + flag = true; + if (Main.tile[x, y].liquid > (byte) 0) + { + flag = true; + break; + } + break; + case 1: + if (Main.tile[x, y + 1].type != (ushort) 60 && Main.tile[x, y + 1].type != (ushort) 78 && Main.tile[x, y + 1].type != (ushort) 380) + flag = true; + if (Main.tile[x, y].liquid > (byte) 0) + { + flag = true; + break; + } + break; + case 2: + if (Main.tile[x, y + 1].type != (ushort) 0 && Main.tile[x, y + 1].type != (ushort) 59 && Main.tile[x, y + 1].type != (ushort) 78 && Main.tile[x, y + 1].type != (ushort) 380) + flag = true; + if (Main.tile[x, y].liquid > (byte) 0) + { + flag = true; + break; + } + break; + case 3: + if (Main.tile[x, y + 1].type != (ushort) 203 && Main.tile[x, y + 1].type != (ushort) 199 && Main.tile[x, y + 1].type != (ushort) 23 && Main.tile[x, y + 1].type != (ushort) 25 && Main.tile[x, y + 1].type != (ushort) 78 && Main.tile[x, y + 1].type != (ushort) 380) + flag = true; + if (Main.tile[x, y].liquid > (byte) 0) + { + flag = true; + break; + } + break; + case 4: + if (Main.tile[x, y + 1].type != (ushort) 53 && Main.tile[x, y + 1].type != (ushort) 78 && Main.tile[x, y + 1].type != (ushort) 380 && Main.tile[x, y + 1].type != (ushort) 116) + flag = true; + if (Main.tile[x, y].liquid > (byte) 0 && Main.tile[x, y].lava()) + { + flag = true; + break; + } + break; + case 5: + if (Main.tile[x, y + 1].type != (ushort) 57 && Main.tile[x, y + 1].type != (ushort) 78 && Main.tile[x, y + 1].type != (ushort) 380) + flag = true; + if (Main.tile[x, y].liquid > (byte) 0 && !Main.tile[x, y].lava()) + { + flag = true; + break; + } + break; + case 6: + if (Main.tile[x, y + 1].type != (ushort) 78 && Main.tile[x, y + 1].type != (ushort) 380 && Main.tile[x, y + 1].type != (ushort) 147 && Main.tile[x, y + 1].type != (ushort) 161 && Main.tile[x, y + 1].type != (ushort) 163 && Main.tile[x, y + 1].type != (ushort) 164 && Main.tile[x, y + 1].type != (ushort) 200) + flag = true; + if (Main.tile[x, y].liquid > (byte) 0 && Main.tile[x, y].lava()) + { + flag = true; + break; + } + break; + } + if (!flag) + { + Main.tile[x, y].active(true); + Main.tile[x, y].type = (ushort) 82; + Main.tile[x, y].frameX = (short) (18 * style); + Main.tile[x, y].frameY = (short) 0; + return true; + } + } + return false; + } + + public static void GrowSpike(int i, int j, ushort spikeType, ushort landType) + { + int index1 = i; + int index2 = j; + int num1 = 0; + if (Main.tile[index1 + 1, index2].active() && (int) Main.tile[index1 + 1, index2].type == (int) spikeType) + ++num1; + if (Main.tile[index1 - 1, index2].active() && (int) Main.tile[index1 - 1, index2].type == (int) spikeType) + ++num1; + if (Main.tile[index1, index2 + 1].active() && (int) Main.tile[index1, index2 + 1].type == (int) spikeType) + ++num1; + if (Main.tile[index1, index2 - 1].active() && (int) Main.tile[index1, index2 - 1].type == (int) spikeType) + ++num1; + if (num1 >= 3 && (int) Main.tile[i, j].type != (int) landType) + return; + switch (WorldGen.genRand.Next(4)) + { + case 0: + --index2; + break; + case 1: + ++index2; + break; + case 2: + --index1; + break; + case 3: + ++index1; + break; + } + if (Main.tile[index1, index2].active()) + return; + int num2 = 0; + if (Main.tile[index1 + 1, index2].active() && (int) Main.tile[index1 + 1, index2].type == (int) spikeType) + ++num2; + if (Main.tile[index1 - 1, index2].active() && (int) Main.tile[index1 - 1, index2].type == (int) spikeType) + ++num2; + if (Main.tile[index1, index2 + 1].active() && (int) Main.tile[index1, index2 + 1].type == (int) spikeType) + ++num2; + if (Main.tile[index1, index2 - 1].active() && (int) Main.tile[index1, index2 - 1].type == (int) spikeType) + ++num2; + if (num2 >= 2) + return; + int num3 = 7; + int num4 = index1 - num3; + int num5 = index1 + num3; + int num6 = index2 - num3; + int num7 = index2 + num3; + bool flag = false; + for (int index3 = num4; index3 < num5; ++index3) + { + for (int index4 = num6; index4 < num7; ++index4) + { + if (Math.Abs(index3 - index1) * 2 + Math.Abs(index4 - index2) < 9 && Main.tile[index3, index4].active() && (int) Main.tile[index3, index4].type == (int) landType && Main.tile[index3, index4 - 1].active() && (int) Main.tile[index3, index4 - 1].type == (int) spikeType && Main.tile[index3, index4 - 1].liquid == (byte) 0) + { + flag = true; + break; + } + } + } + if (!flag) + return; + Main.tile[index1, index2].type = spikeType; + Main.tile[index1, index2].active(true); + WorldGen.SquareTileFrame(index1, index2); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, index1, index2, 3); + } + + private static bool GrowMoreVines(int x, int y) + { + if (!WorldGen.InWorld(x, y, 30)) + return false; + int num1 = 4; + int num2 = 6; + int num3 = 10; + int num4 = 60; + int num5 = 0; + int num6 = y; + if (Main.tile[x, y].type == (ushort) 528) + num4 /= 5; + for (int index1 = x - num1; index1 <= x + num1; ++index1) + { + for (int index2 = num6 - num2; index2 <= num6 + num3; ++index2) + { + if (TileID.Sets.IsVine[(int) Main.tile[index1, index2].type]) + { + ++num5; + if (index2 > y && Collision.CanHitLine(new Vector2((float) (x * 16), (float) (y * 16)), 1, 1, new Vector2((float) (index1 * 16), (float) (index2 * 16)), 1, 1)) + { + if (Main.tile[index1, index2].type == (ushort) 528) + num5 += (index2 - y) * 20; + else + num5 += (index2 - y) * 2; + } + if (num5 > num4) + return false; + } + } + } + return true; + } + + private static void MatureTheHerbPlants() + { + for (int i = 10; i < Main.maxTilesX - 10; ++i) + { + for (int index = 10; index < Main.maxTilesY - 10; ++index) + { + if ((double) index > Main.rockLayer && (Main.tile[i, index + 1].type == (ushort) 59 || Main.tile[i, index + 1].type == (ushort) 0) && WorldGen.SolidTile(i, index + 1) && !Main.tile[i, index].active() && Main.tile[i, index].liquid == (byte) 0 && WorldGen.genRand.Next(25) == 0) + { + Main.tile[i, index].active(true); + Main.tile[i, index].type = (ushort) 82; + Main.tile[i, index].frameX = (short) 36; + Main.tile[i, index].frameY = (short) 0; + } + if (Main.tile[i, index].type == (ushort) 82 && WorldGen.genRand.Next(3) == 0) + { + Main.tile[i, index].type = (ushort) 83; + if (Main.tile[i, index].frameX == (short) 36 && WorldGen.genRand.Next(2) == 0) + Main.tile[i, index].type = (ushort) 84; + if (Main.tile[i, index].frameX == (short) 108 && WorldGen.genRand.Next(3) == 0) + Main.tile[i, index].type = (ushort) 84; + } + } + } + } + + public static void GrowAlch(int x, int y) + { + if (!Main.tile[x, y].active()) + return; + if (Main.tile[x, y].liquid > (byte) 0) + { + int num = (int) Main.tile[x, y].frameX / 18; + if ((!Main.tile[x, y].lava() || num != 5) && (Main.tile[x, y].liquidType() != (byte) 0 || num != 1 && num != 4)) + { + WorldGen.KillTile(x, y); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, x, y, 1); + WorldGen.SquareTileFrame(x, y); + } + } + if (Main.tile[x, y].type == (ushort) 82) + { + if (WorldGen.genRand.Next(50) == 0) + { + bool flag = false; + if (Main.tile[x, y].frameX == (short) 108) + { + if (WorldGen.genRand.Next(2) == 0) + flag = true; + } + else + flag = true; + if (!flag) + return; + Main.tile[x, y].type = (ushort) 83; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, x, y, 1); + WorldGen.SquareTileFrame(x, y); + } + else if (Main.dayTime && Main.tile[x, y].type == (ushort) 82 && Main.tile[x, y].frameX == (short) 0 && WorldGen.genRand.Next(50) == 0) + { + Main.tile[x, y].type = (ushort) 83; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, x, y, 1); + WorldGen.SquareTileFrame(x, y); + } + else if (!Main.dayTime && Main.tile[x, y].type == (ushort) 82 && Main.tile[x, y].frameX == (short) 18 && WorldGen.genRand.Next(50) == 0) + { + Main.tile[x, y].type = (ushort) 83; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, x, y, 1); + WorldGen.SquareTileFrame(x, y); + } + else if (Main.raining && Main.tile[x, y].type == (ushort) 82 && Main.tile[x, y].frameX == (short) 72 && WorldGen.genRand.Next(50) == 0) + { + Main.tile[x, y].type = (ushort) 83; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, x, y, 1); + WorldGen.SquareTileFrame(x, y); + } + else if ((double) y > Main.worldSurface && Main.tile[x, y].type == (ushort) 82 && Main.tile[x, y].frameX == (short) 36 && WorldGen.genRand.Next(50) == 0) + { + Main.tile[x, y].type = (ushort) 83; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, x, y, 1); + WorldGen.SquareTileFrame(x, y); + } + else + { + if (y <= Main.maxTilesY - 200 || Main.tile[x, y].type != (ushort) 82 || Main.tile[x, y].frameX != (short) 90 || WorldGen.genRand.Next(50) != 0) + return; + Main.tile[x, y].type = (ushort) 83; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, x, y, 1); + WorldGen.SquareTileFrame(x, y); + } + } + else if (Main.tile[x, y].frameX == (short) 36 && WorldGen.genRand.Next(3) != 0) + { + if (Main.tile[x, y].type == (ushort) 83) + { + if (WorldGen.genRand.Next(2) != 0) + return; + Main.tile[x, y].type = (ushort) 84; + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, x, y, 1); + } + else + { + if (Main.tile[x, y].type != (ushort) 84 || WorldGen.genRand.Next(5) != 0) + return; + Main.tile[x, y].type = (ushort) 83; + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, x, y, 1); + } + } + else + { + if (Main.tile[x, y].frameX != (short) 108 || Main.tile[x, y].type != (ushort) 83 || WorldGen.genRand.Next(30) != 0) + return; + Main.tile[x, y].type = (ushort) 84; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, x, y, 1); + WorldGen.SquareTileFrame(x, y); + } + } + + public static void PlantAlch() + { + int index1 = WorldGen.genRand.Next(20, Main.maxTilesX - 20); + int index2 = WorldGen.genRand.Next(40) != 0 ? (WorldGen.genRand.Next(10) != 0 ? WorldGen.genRand.Next((int) Main.worldSurface, Main.maxTilesY - 20) : WorldGen.genRand.Next(20, Main.maxTilesY - 20)) : WorldGen.genRand.Next((int) (Main.rockLayer + (double) Main.maxTilesY) / 2, Main.maxTilesY - 20); + while (index2 < Main.maxTilesY - 20 && !Main.tile[index1, index2].active()) + ++index2; + if (!Main.tile[index1, index2].nactive() || Main.tile[index1, index2 - 1].active() || Main.tile[index1, index2 - 1].liquid != (byte) 0) + return; + int num1 = 15; + int num2 = 5; + int num3 = 0; + int num4 = (int) ((double) num1 * ((double) Main.maxTilesX / 4200.0)); + int num5 = Utils.Clamp(index1 - num4, 4, Main.maxTilesX - 4); + int num6 = Utils.Clamp(index1 + num4, 4, Main.maxTilesX - 4); + int num7 = Utils.Clamp(index2 - num4, 4, Main.maxTilesY - 4); + int num8 = Utils.Clamp(index2 + num4, 4, Main.maxTilesY - 4); + for (int index3 = num5; index3 <= num6; ++index3) + { + for (int index4 = num7; index4 <= num8; ++index4) + { + if (Main.tileAlch[(int) Main.tile[index3, index4].type]) + ++num3; + } + } + if (num3 >= num2) + return; + if (Main.tile[index1, index2].type == (ushort) 2 || Main.tile[index1, index2].type == (ushort) 109) + WorldGen.PlaceAlch(index1, index2 - 1, 0); + if (Main.tile[index1, index2].type == (ushort) 60) + WorldGen.PlaceAlch(index1, index2 - 1, 1); + if (Main.tile[index1, index2].type == (ushort) 0 || Main.tile[index1, index2].type == (ushort) 59) + WorldGen.PlaceAlch(index1, index2 - 1, 2); + if (Main.tile[index1, index2].type == (ushort) 23 || Main.tile[index1, index2].type == (ushort) 25 || Main.tile[index1, index2].type == (ushort) 203 || Main.tile[index1, index2].type == (ushort) 199) + WorldGen.PlaceAlch(index1, index2 - 1, 3); + if ((Main.tile[index1, index2].type == (ushort) 53 || Main.tile[index1, index2].type == (ushort) 116) && index1 >= WorldGen.beachDistance && index1 <= Main.maxTilesX - WorldGen.beachDistance) + WorldGen.PlaceAlch(index1, index2 - 1, 4); + if (Main.tile[index1, index2].type == (ushort) 57) + WorldGen.PlaceAlch(index1, index2 - 1, 5); + if (Main.tile[index1, index2].type == (ushort) 147 || Main.tile[index1, index2].type == (ushort) 163 || Main.tile[index1, index2].type == (ushort) 164 || Main.tile[index1, index2].type == (ushort) 161 || Main.tile[index1, index2].type == (ushort) 200) + WorldGen.PlaceAlch(index1, index2 - 1, 6); + if (!Main.tile[index1, index2 - 1].active() || Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, index1, index2 - 1, 1); + } + + public static void CheckAlch(int x, int y) + { + if (Main.tile[x, y] == null) + Main.tile[x, y] = new Tile(); + if (Main.tile[x, y + 1] == null) + Main.tile[x, y + 1] = new Tile(); + bool flag = false; + if (!Main.tile[x, y + 1].nactive()) + flag = true; + if (Main.tile[x, y + 1].halfBrick()) + flag = true; + int num = (int) Main.tile[x, y].frameX / 18; + Main.tile[x, y].frameY = (short) 0; + if (!flag) + { + switch (num) + { + case 0: + if (Main.tile[x, y + 1].type != (ushort) 109 && Main.tile[x, y + 1].type != (ushort) 2 && Main.tile[x, y + 1].type != (ushort) 477 && Main.tile[x, y + 1].type != (ushort) 492 && Main.tile[x, y + 1].type != (ushort) 78 && Main.tile[x, y + 1].type != (ushort) 380) + flag = true; + if (Main.tile[x, y].liquid > (byte) 0 && Main.tile[x, y].lava()) + { + flag = true; + break; + } + break; + case 1: + if (Main.tile[x, y + 1].type != (ushort) 60 && Main.tile[x, y + 1].type != (ushort) 78 && Main.tile[x, y + 1].type != (ushort) 380) + flag = true; + if (Main.tile[x, y].liquid > (byte) 0 && Main.tile[x, y].lava()) + { + flag = true; + break; + } + break; + case 2: + if (Main.tile[x, y + 1].type != (ushort) 0 && Main.tile[x, y + 1].type != (ushort) 59 && Main.tile[x, y + 1].type != (ushort) 78 && Main.tile[x, y + 1].type != (ushort) 380) + flag = true; + if (Main.tile[x, y].liquid > (byte) 0 && Main.tile[x, y].lava()) + { + flag = true; + break; + } + break; + case 3: + if (Main.tile[x, y + 1].type != (ushort) 199 && Main.tile[x, y + 1].type != (ushort) 203 && Main.tile[x, y + 1].type != (ushort) 23 && Main.tile[x, y + 1].type != (ushort) 25 && Main.tile[x, y + 1].type != (ushort) 78 && Main.tile[x, y + 1].type != (ushort) 380) + flag = true; + if (Main.tile[x, y].liquid > (byte) 0 && Main.tile[x, y].lava()) + { + flag = true; + break; + } + break; + case 4: + if (Main.tile[x, y + 1].type != (ushort) 53 && Main.tile[x, y + 1].type != (ushort) 78 && Main.tile[x, y + 1].type != (ushort) 380 && Main.tile[x, y + 1].type != (ushort) 116) + flag = true; + if (Main.tile[x, y].liquid > (byte) 0 && Main.tile[x, y].lava()) + { + flag = true; + break; + } + break; + case 5: + if (Main.tile[x, y + 1].type != (ushort) 57 && Main.tile[x, y + 1].type != (ushort) 78 && Main.tile[x, y + 1].type != (ushort) 380) + flag = true; + if (Main.tile[x, y].type != (ushort) 82 && Main.tile[x, y].lava() && Main.netMode != 1) + { + if (Main.tile[x, y].liquid > (byte) 16) + { + if (Main.tile[x, y].type == (ushort) 83) + { + Main.tile[x, y].type = (ushort) 84; + if (Main.netMode == 2) + { + NetMessage.SendTileSquare(-1, x, y, 1); + break; + } + break; + } + break; + } + if (Main.tile[x, y].type == (ushort) 84) + { + Main.tile[x, y].type = (ushort) 83; + if (Main.netMode == 2) + { + NetMessage.SendTileSquare(-1, x, y, 1); + break; + } + break; + } + break; + } + break; + case 6: + if (Main.tile[x, y + 1].type != (ushort) 78 && Main.tile[x, y + 1].type != (ushort) 380 && Main.tile[x, y + 1].type != (ushort) 147 && Main.tile[x, y + 1].type != (ushort) 161 && Main.tile[x, y + 1].type != (ushort) 163 && Main.tile[x, y + 1].type != (ushort) 164 && Main.tile[x, y + 1].type != (ushort) 200) + flag = true; + if (Main.tile[x, y].liquid > (byte) 0 && Main.tile[x, y].lava()) + { + flag = true; + break; + } + break; + } + } + if (!flag) + return; + WorldGen.KillTile(x, y); + } + + public static void CheckBanner(int x, int j, byte type) + { + if (WorldGen.destroyObject) + return; + int num1 = (int) Main.tile[x, j].frameY / 18; + int num2 = 0; + while (num1 >= 3) + { + num1 -= 3; + ++num2; + } + int num3 = j - num1; + int frameX = (int) Main.tile[x, j].frameX; + bool flag = false; + for (int index = 0; index < 3; ++index) + { + if (Main.tile[x, num3 + index] == null) + Main.tile[x, num3 + index] = new Tile(); + if (!Main.tile[x, num3 + index].active()) + flag = true; + else if ((int) Main.tile[x, num3 + index].type != (int) type) + flag = true; + else if ((int) Main.tile[x, num3 + index].frameY != index * 18 + num2 * 18 * 3) + flag = true; + else if ((int) Main.tile[x, num3 + index].frameX != frameX) + flag = true; + } + if (Main.tile[x, num3 - 1] == null) + Main.tile[x, num3 - 1] = new Tile(); + if (!Main.tile[x, num3 - 1].nactive()) + flag = true; + if (!Main.tile[x, num3 - 1].topSlope() && !Main.tile[x, num3 - 1].halfBrick() && !Main.tileSolid[(int) Main.tile[x, num3 - 1].type] || Main.tileSolidTop[(int) Main.tile[x, num3 - 1].type] && (!TileID.Sets.Platforms[(int) Main.tile[x, num3 - 1].type] || !Main.tile[x, num3 - 1].halfBrick() && !Main.tile[x, num3 - 1].topSlope()) || TileID.Sets.NotReallySolid[(int) Main.tile[x, num3 - 1].type] || Main.tile[x, num3 - 1].bottomSlope()) + flag = true; + if (!flag) + return; + WorldGen.destroyObject = true; + for (int index = 0; index < 3; ++index) + { + if ((int) Main.tile[x, num3 + index].type == (int) type) + WorldGen.KillTile(x, num3 + index); + } + if (type == (byte) 91) + { + int num4 = frameX / 18 + num2 * 111; + if (num4 >= 297) + Item.NewItem(x * 16, (num3 + 1) * 16, 32, 32, 4668 + num4); + else if (num4 >= 295) + Item.NewItem(x * 16, (num3 + 1) * 16, 32, 32, 4392 + num4); + else if (num4 >= 294) + Item.NewItem(x * 16, (num3 + 1) * 16, 32, 32, 4602); + else if (num4 >= 288) + Item.NewItem(x * 16, (num3 + 1) * 16, 32, 32, 4253 + num4); + else if (num4 >= 278) + Item.NewItem(x * 16, (num3 + 1) * 16, 32, 32, 3559 + num4); + else if (num4 >= 273) + Item.NewItem(x * 16, (num3 + 1) * 16, 32, 32, 3516 + num4); + else if (num4 >= 272) + Item.NewItem(x * 16, (num3 + 1) * 16, 32, 32, 3780); + else if (num4 >= 270) + Item.NewItem(x * 16, (num3 + 1) * 16, 32, 32, 3323 + num4); + else if (num4 >= 207) + Item.NewItem(x * 16, (num3 + 1) * 16, 32, 32, 3183 + num4); + else if (num4 >= 109) + Item.NewItem(x * 16, (num3 + 1) * 16, 32, 32, 2788 + num4); + else if (num4 >= 22) + Item.NewItem(x * 16, (num3 + 1) * 16, 32, 32, 1593 + num4); + else if (num4 >= 10 && num4 <= 15) + Item.NewItem(x * 16, (num3 + 1) * 16, 32, 32, 1441 + num4); + else if (num4 >= 16 && num4 <= 21) + Item.NewItem(x * 16, (num3 + 1) * 16, 32, 32, 1448 + num4); + else if (num4 >= 7 && num4 <= 9) + Item.NewItem(x * 16, (num3 + 1) * 16, 32, 32, 838 + num4); + else if (num4 >= 4 && num4 <= 6) + Item.NewItem(x * 16, (num3 + 1) * 16, 32, 32, 785 + num4); + else + Item.NewItem(x * 16, (num3 + 1) * 16, 32, 32, 337 + num4); + } + WorldGen.destroyObject = false; + } + + public static void PlaceBanner(int x, int y, ushort type, int style = 0) + { + int num1 = style * 18; + int num2 = 0; + if (style >= 90) + { + num1 -= 1620; + num2 += 54; + } + if (Main.tile[x, y - 1] == null) + Main.tile[x, y - 1] = new Tile(); + if (Main.tile[x, y] == null) + Main.tile[x, y] = new Tile(); + if (Main.tile[x, y + 1] == null) + Main.tile[x, y + 1] = new Tile(); + if (Main.tile[x, y + 2] == null) + Main.tile[x, y + 2] = new Tile(); + if (!Main.tile[x, y - 1].nactive() || !Main.tileSolid[(int) Main.tile[x, y - 1].type] || Main.tileSolidTop[(int) Main.tile[x, y - 1].type] || Main.tile[x, y].active() || Main.tile[x, y + 1].active() || Main.tile[x, y + 2].active()) + return; + Main.tile[x, y].active(true); + Main.tile[x, y].frameY = (short) num2; + Main.tile[x, y].frameX = (short) num1; + Main.tile[x, y].type = type; + Main.tile[x, y + 1].active(true); + Main.tile[x, y + 1].frameY = (short) (num2 + 18); + Main.tile[x, y + 1].frameX = (short) num1; + Main.tile[x, y + 1].type = type; + Main.tile[x, y + 2].active(true); + Main.tile[x, y + 2].frameY = (short) (num2 + 36); + Main.tile[x, y + 2].frameX = (short) num1; + Main.tile[x, y + 2].type = type; + } + + public static void PlaceMan(int i, int j, int dir) + { + for (int index1 = i; index1 <= i + 1; ++index1) + { + for (int index2 = j - 2; index2 <= j; ++index2) + { + if (Main.tile[index1, index2].active()) + return; + } + } + if (!WorldGen.SolidTile2(i, j + 1) || !WorldGen.SolidTile2(i + 1, j + 1)) + return; + byte num = 0; + if (dir == 1) + num = (byte) 36; + Main.tile[i, j - 2].active(true); + Main.tile[i, j - 2].frameY = (short) 0; + Main.tile[i, j - 2].frameX = (short) num; + Main.tile[i, j - 2].type = (ushort) 128; + Main.tile[i, j - 1].active(true); + Main.tile[i, j - 1].frameY = (short) 18; + Main.tile[i, j - 1].frameX = (short) num; + Main.tile[i, j - 1].type = (ushort) 128; + Main.tile[i, j].active(true); + Main.tile[i, j].frameY = (short) 36; + Main.tile[i, j].frameX = (short) num; + Main.tile[i, j].type = (ushort) 128; + Main.tile[i + 1, j - 2].active(true); + Main.tile[i + 1, j - 2].frameY = (short) 0; + Main.tile[i + 1, j - 2].frameX = (short) (byte) (18U + (uint) num); + Main.tile[i + 1, j - 2].type = (ushort) 128; + Main.tile[i + 1, j - 1].active(true); + Main.tile[i + 1, j - 1].frameY = (short) 18; + Main.tile[i + 1, j - 1].frameX = (short) (byte) (18U + (uint) num); + Main.tile[i + 1, j - 1].type = (ushort) 128; + Main.tile[i + 1, j].active(true); + Main.tile[i + 1, j].frameY = (short) 36; + Main.tile[i + 1, j].frameX = (short) (byte) (18U + (uint) num); + Main.tile[i + 1, j].type = (ushort) 128; + } + + public static void PlaceWoman(int i, int j, int dir) + { + for (int index1 = i; index1 <= i + 1; ++index1) + { + for (int index2 = j - 2; index2 <= j; ++index2) + { + if (Main.tile[index1, index2].active()) + return; + } + } + if (!WorldGen.SolidTile2(i, j + 1) || !WorldGen.SolidTile2(i + 1, j + 1)) + return; + byte num = 0; + if (dir == 1) + num = (byte) 36; + Main.tile[i, j - 2].active(true); + Main.tile[i, j - 2].frameY = (short) 0; + Main.tile[i, j - 2].frameX = (short) num; + Main.tile[i, j - 2].type = (ushort) 269; + Main.tile[i, j - 1].active(true); + Main.tile[i, j - 1].frameY = (short) 18; + Main.tile[i, j - 1].frameX = (short) num; + Main.tile[i, j - 1].type = (ushort) 269; + Main.tile[i, j].active(true); + Main.tile[i, j].frameY = (short) 36; + Main.tile[i, j].frameX = (short) num; + Main.tile[i, j].type = (ushort) 269; + Main.tile[i + 1, j - 2].active(true); + Main.tile[i + 1, j - 2].frameY = (short) 0; + Main.tile[i + 1, j - 2].frameX = (short) (byte) (18U + (uint) num); + Main.tile[i + 1, j - 2].type = (ushort) 269; + Main.tile[i + 1, j - 1].active(true); + Main.tile[i + 1, j - 1].frameY = (short) 18; + Main.tile[i + 1, j - 1].frameX = (short) (byte) (18U + (uint) num); + Main.tile[i + 1, j - 1].type = (ushort) 269; + Main.tile[i + 1, j].active(true); + Main.tile[i + 1, j].frameY = (short) 36; + Main.tile[i + 1, j].frameX = (short) (byte) (18U + (uint) num); + Main.tile[i + 1, j].type = (ushort) 269; + } + + public static void CheckWeaponsRack(int i, int j) + { + if (WorldGen.destroyObject) + return; + int num1 = i; + int num2 = j - (int) Main.tile[i, j].frameY / 18; + int num3 = (int) Main.tile[i, j].frameX; + int num4 = 0; + while (num3 >= 5000) + { + num3 -= 5000; + ++num4; + } + if (num4 != 0) + num3 = (num4 - 1) * 18; + int num5 = num3 % 54; + int num6 = num1 - num5 / 18; + bool flag = false; + for (int index1 = 0; index1 < 3; ++index1) + { + for (int index2 = 0; index2 < 3; ++index2) + { + int index3 = num6 + index1; + int index4 = num2 + index2; + int num7 = (int) Main.tile[index3, index4].frameX; + int num8 = 0; + while (num7 >= 5000) + { + num7 -= 5000; + ++num8; + } + if (num8 != 0) + num7 = (num8 - 1) * 18; + int num9 = num7 % 54; + if (!Main.tile[index3, index4].active() || Main.tile[index3, index4].type != (ushort) 334 || Main.tile[index3, index4].wall <= (ushort) 0 || (int) Main.tile[index3, index4].frameY != index2 * 18 || num9 != index1 * 18) + flag = true; + } + } + if (!flag) + return; + WorldGen.destroyObject = true; + Item.NewItem(i * 16, j * 16, 48, 48, 2699); + for (int index5 = 0; index5 < 3; ++index5) + { + for (int index6 = 0; index6 < 3; ++index6) + { + int i1 = num6 + index5; + int j1 = num2 + index6; + if (Main.tile[i1, j1].active() && Main.tile[i1, j1].type == (ushort) 334) + WorldGen.KillTile(i1, j1); + } + } + WorldGen.destroyObject = false; + } + + public static void ToggleGemLock(int i, int j, bool on) + { + Tile tileSafely = Framing.GetTileSafely(i, j); + if (!tileSafely.active() || tileSafely.type != (ushort) 440 || tileSafely.frameY < (short) 54 && !on) + return; + bool flag = false; + int Type = -1; + if (tileSafely.frameY >= (short) 54) + flag = true; + int num1 = (int) Main.tile[i, j].frameX / 54; + int num2 = (int) Main.tile[i, j].frameX % 54 / 18; + int num3 = (int) Main.tile[i, j].frameY % 54 / 18; + switch (num1) + { + case 0: + Type = 1526; + break; + case 1: + Type = 1524; + break; + case 2: + Type = 1525; + break; + case 3: + Type = 1523; + break; + case 4: + Type = 1522; + break; + case 5: + Type = 1527; + break; + case 6: + Type = 3643; + break; + } + for (int index1 = i - num2; index1 < i - num2 + 3; ++index1) + { + for (int index2 = j - num3; index2 < j - num3 + 3; ++index2) + Main.tile[index1, index2].frameY = (short) ((on ? 54 : 0) + (index2 - j + num3) * 18); + } + if (Type != -1 & flag) + Item.NewItem(i * 16, j * 16, 32, 32, Type); + WorldGen.SquareTileFrame(i, j); + NetMessage.SendTileSquare(-1, i - num2 + 1, j - num3 + 1, 3); + Wiring.HitSwitch(i - num2, j - num3); + NetMessage.SendData(59, number: (i - num2), number2: ((float) (j - num3))); + } + + public static void CheckMan(int i, int j) + { + if (WorldGen.destroyObject) + return; + int num1 = i; + int num2 = j - (int) Main.tile[i, j].frameY / 18; + int frameX1 = (int) Main.tile[i, j].frameX; + while (frameX1 >= 100) + frameX1 -= 100; + while (frameX1 >= 36) + frameX1 -= 36; + int i1 = num1 - frameX1 / 18; + bool flag = false; + for (int index1 = 0; index1 <= 1; ++index1) + { + for (int index2 = 0; index2 <= 2; ++index2) + { + int index3 = i1 + index1; + int index4 = num2 + index2; + int frameX2 = (int) Main.tile[index3, index4].frameX; + while (frameX2 >= 100) + frameX2 -= 100; + if (frameX2 >= 36) + frameX2 -= 36; + if (!Main.tile[index3, index4].active() || Main.tile[index3, index4].type != (ushort) 128 || (int) Main.tile[index3, index4].frameY != index2 * 18 || frameX2 != index1 * 18) + flag = true; + } + } + if (!WorldGen.SolidTileAllowBottomSlope(i1, num2 + 3) || !WorldGen.SolidTileAllowBottomSlope(i1 + 1, num2 + 3)) + flag = true; + if (!flag) + return; + WorldGen.destroyObject = true; + Item.NewItem(i * 16, j * 16, 32, 32, 498); + for (int index5 = 0; index5 <= 1; ++index5) + { + for (int index6 = 0; index6 <= 2; ++index6) + { + int i2 = i1 + index5; + int j1 = num2 + index6; + if (Main.tile[i2, j1].active() && Main.tile[i2, j1].type == (ushort) 128) + WorldGen.KillTile(i2, j1); + } + } + WorldGen.destroyObject = false; + } + + public static void CheckWoman(int i, int j) + { + if (WorldGen.destroyObject) + return; + int num1 = i; + int num2 = j - (int) Main.tile[i, j].frameY / 18; + int frameX1 = (int) Main.tile[i, j].frameX; + while (frameX1 >= 100) + frameX1 -= 100; + while (frameX1 >= 36) + frameX1 -= 36; + int i1 = num1 - frameX1 / 18; + bool flag = false; + for (int index1 = 0; index1 <= 1; ++index1) + { + for (int index2 = 0; index2 <= 2; ++index2) + { + int index3 = i1 + index1; + int index4 = num2 + index2; + int frameX2 = (int) Main.tile[index3, index4].frameX; + while (frameX2 >= 100) + frameX2 -= 100; + if (frameX2 >= 36) + frameX2 -= 36; + if (!Main.tile[index3, index4].active() || Main.tile[index3, index4].type != (ushort) 269 || (int) Main.tile[index3, index4].frameY != index2 * 18 || frameX2 != index1 * 18) + flag = true; + } + } + if (!WorldGen.SolidTileAllowBottomSlope(i1, num2 + 3) || !WorldGen.SolidTileAllowBottomSlope(i1 + 1, num2 + 3)) + flag = true; + if (!flag) + return; + WorldGen.destroyObject = true; + Item.NewItem(i * 16, j * 16, 32, 32, 1989); + for (int index5 = 0; index5 <= 1; ++index5) + { + for (int index6 = 0; index6 <= 2; ++index6) + { + int i2 = i1 + index5; + int j1 = num2 + index6; + if (Main.tile[i2, j1].active() && Main.tile[i2, j1].type == (ushort) 269) + WorldGen.KillTile(i2, j1); + } + } + WorldGen.destroyObject = false; + } + + public static void Place1x2(int x, int y, ushort type, int style) + { + short num1 = 0; + if (type == (ushort) 20) + num1 = (short) (WorldGen.genRand.Next(3) * 18); + if (Main.tile[x, y - 1] == null) + Main.tile[x, y - 1] = new Tile(); + if (Main.tile[x, y + 1] == null) + Main.tile[x, y + 1] = new Tile(); + if (!(WorldGen.SolidTile2(x, y + 1) & !Main.tile[x, y - 1].active())) + return; + short num2 = (short) (style * 40); + Main.tile[x, y - 1].active(true); + Main.tile[x, y - 1].frameY = num2; + Main.tile[x, y - 1].frameX = num1; + Main.tile[x, y - 1].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameY = (short) ((int) num2 + 18); + Main.tile[x, y].frameX = num1; + Main.tile[x, y].type = type; + } + + public static void Place1x2Top(int x, int y, ushort type, int style) + { + short num1 = 0; + if (Main.tile[x, y - 1] == null) + Main.tile[x, y - 1] = new Tile(); + if (Main.tile[x, y + 1] == null) + Main.tile[x, y + 1] = new Tile(); + if (!Main.tile[x, y - 1].nactive() || !Main.tileSolid[(int) Main.tile[x, y - 1].type] || Main.tileSolidTop[(int) Main.tile[x, y - 1].type] || Main.tile[x, y + 1].active()) + return; + short num2 = (short) (style * 36); + Main.tile[x, y].active(true); + Main.tile[x, y].frameY = num2; + Main.tile[x, y].frameX = num1; + Main.tile[x, y].type = type; + Main.tile[x, y + 1].active(true); + Main.tile[x, y + 1].frameY = (short) ((int) num2 + 18); + Main.tile[x, y + 1].frameX = num1; + Main.tile[x, y + 1].type = type; + } + + public static void Check1x2Top(int x, int j, ushort type) + { + if (WorldGen.destroyObject) + return; + int index = j; + bool flag = true; + int num1 = (int) Main.tile[x, index].frameY / 18; + int num2 = 0; + while (num1 >= 2) + { + num1 -= 2; + ++num2; + } + int j1 = index - num1; + int num3 = num2 * 36; + if (Main.tile[x, j1] == null) + Main.tile[x, j1] = new Tile(); + if (Main.tile[x, j1 + 1] == null) + Main.tile[x, j1 + 1] = new Tile(); + if (Main.tile[x, j1] == null) + Main.tile[x, j1] = new Tile(); + if ((int) Main.tile[x, j1].frameY == num3 && (int) Main.tile[x, j1 + 1].frameY == num3 + 18 && (int) Main.tile[x, j1].type == (int) type && (int) Main.tile[x, j1 + 1].type == (int) type) + flag = false; + if (Main.tile[x, j1 - 1] == null) + Main.tile[x, j1 - 1] = new Tile(); + if (!Main.tile[x, j1 - 1].nactive() || !Main.tileSolid[(int) Main.tile[x, j1 - 1].type] || Main.tileSolidTop[(int) Main.tile[x, j1 - 1].type]) + flag = true; + if (!flag) + return; + WorldGen.destroyObject = true; + if ((int) Main.tile[x, j1].type == (int) type) + WorldGen.KillTile(x, j1); + if ((int) Main.tile[x, j1 + 1].type == (int) type) + WorldGen.KillTile(x, j1 + 1); + switch (type) + { + case 42: + int Type = 0; + switch (num2) + { + case 0: + Type = 136; + break; + case 7: + Type = 1431; + break; + case 8: + Type = 1808; + break; + case 9: + Type = 1859; + break; + default: + if (num2 < 10) + { + Type = 1389 + num2; + break; + } + switch (num2) + { + case 10: + Type = 2032; + break; + case 11: + Type = 2033; + break; + case 12: + Type = 2034; + break; + case 13: + Type = 2035; + break; + case 14: + Type = 2036; + break; + case 15: + Type = 2037; + break; + case 16: + Type = 2038; + break; + case 17: + Type = 2039; + break; + case 18: + Type = 2040; + break; + case 19: + Type = 2041; + break; + case 20: + Type = 2042; + break; + case 21: + Type = 2043; + break; + default: + if (num2 >= 22 && num2 <= 25) + { + Type = 2145 + num2 - 22; + break; + } + switch (num2) + { + case 26: + Type = 2226; + break; + case 27: + Type = 2530; + break; + case 28: + Type = 2546; + break; + case 29: + Type = 2564; + break; + case 30: + Type = 2579; + break; + case 31: + Type = 2641; + break; + case 32: + Type = 2642; + break; + case 33: + Type = 2820; + break; + case 34: + Type = 3138; + break; + case 35: + Type = 3140; + break; + case 36: + Type = 3139; + break; + case 37: + Type = 3891; + break; + case 38: + Type = 3943; + break; + case 39: + Type = 3970; + break; + case 40: + Type = 4157; + break; + case 41: + Type = 4178; + break; + case 42: + Type = 4199; + break; + case 43: + Type = 4220; + break; + case 44: + Type = 4309; + break; + case 45: + Type = 4578; + break; + } + break; + } + break; + } + Item.NewItem(x * 16, j1 * 16, 32, 32, Type); + break; + case 270: + Item.NewItem(x * 16, j1 * 16, 32, 32, 1993); + break; + case 271: + Item.NewItem(x * 16, j1 * 16, 32, 32, 2005); + break; + case 572: + Item.NewItem(x * 16, j1 * 16, 32, 32, 4695 + num2); + break; + case 581: + Item.NewItem(x * 16, j1 * 16, 32, 32, 4848); + break; + } + WorldGen.destroyObject = false; + } + + public static bool PlaceSmallPile(int i, int j, int X, int Y, ushort type = 185) + { + int i1 = i; + int index = j; + short num1 = (short) (Y * 18); + short num2 = (short) (X * 18); + if (Main.tile[i1, index] == null) + Main.tile[i1, index] = new Tile(); + if (Main.tile[i1 + 1, index] == null) + Main.tile[i1 + 1, index] = new Tile(); + if (Main.tile[i1, index + 1] == null) + Main.tile[i1, index + 1] = new Tile(); + if (Main.tile[i1 + 1, index + 1] == null) + Main.tile[i1 + 1, index + 1] = new Tile(); + if (Main.tile[i1, index].lava()) + return false; + if (Y == 1) + { + short num3 = (short) (X * 36); + bool flag = false; + if (WorldGen.SolidTile2(i1, index + 1) && WorldGen.SolidTile2(i1 + 1, index + 1) && !Main.tile[i1, index].active() && !Main.tile[i1 + 1, index].active()) + flag = true; + if (flag) + { + Main.tile[i1, index].active(true); + Main.tile[i1, index].frameY = num1; + Main.tile[i1, index].frameX = num3; + Main.tile[i1, index].type = type; + Main.tile[i1 + 1, index].active(true); + Main.tile[i1 + 1, index].frameY = num1; + Main.tile[i1 + 1, index].frameX = (short) ((int) num3 + 18); + Main.tile[i1 + 1, index].type = type; + return true; + } + } + else if (WorldGen.SolidTile2(i1, index + 1) && !Main.tile[i1, index].active()) + { + Main.tile[i1, index].active(true); + Main.tile[i1, index].frameY = num1; + Main.tile[i1, index].frameX = num2; + Main.tile[i1, index].type = type; + return true; + } + return false; + } + + public static void CheckPile(int i, int y) + { + int i1 = i; + if (Main.tile[i1, y] == null) + Main.tile[i1, y] = new Tile(); + if (Main.tile[i1 + 1, y] == null) + Main.tile[i1 + 1, y] = new Tile(); + if (Main.tile[i1, y + 1] == null) + Main.tile[i1, y + 1] = new Tile(); + if (Main.tile[i1 + 1, y + 1] == null) + Main.tile[i1 + 1, y + 1] = new Tile(); + if (Main.tile[i1, y].frameY == (short) 18) + { + WorldGen.Check2x1(i1, y, Main.tile[i1, y].type); + } + else + { + if (WorldGen.SolidTile(i1, y + 1)) + return; + WorldGen.KillTile(i1, y); + } + } + + public static void Check2x1(int i, int y, ushort type) + { + if (WorldGen.destroyObject) + return; + int index = i; + bool flag = true; + if (Main.tile[index, y] == null) + Main.tile[index, y] = new Tile(); + int num1 = (int) Main.tile[index, y].frameX / 18; + int num2 = num1 >> 1; + int num3 = num1 % 2; + int i1 = index - num3; + if (Main.tile[i1, y] == null) + Main.tile[i1, y] = new Tile(); + if (Main.tile[i1 + 1, y] == null) + Main.tile[i1 + 1, y] = new Tile(); + if (Main.tile[i1, y + 1] == null) + Main.tile[i1, y + 1] = new Tile(); + if (Main.tile[i1 + 1, y + 1] == null) + Main.tile[i1 + 1, y + 1] = new Tile(); + if ((int) Main.tile[i1 + 1, y].frameX == (int) Main.tile[i1, y].frameX + 18 && (int) Main.tile[i1, y].type == (int) type && (int) Main.tile[i1 + 1, y].type == (int) type) + flag = false; + if (type == (ushort) 29 || type == (ushort) 103 || type == (ushort) 462) + { + if (!Main.tile[i1, y + 1].active() || !Main.tileTable[(int) Main.tile[i1, y + 1].type] || Main.tile[i1, y + 1].halfBrick() || Main.tile[i1, y + 1].topSlope()) + flag = true; + if (!Main.tile[i1 + 1, y + 1].active() || !Main.tileTable[(int) Main.tile[i1 + 1, y + 1].type] || Main.tile[i1 + 1, y + 1].halfBrick() || Main.tile[i1 + 1, y + 1].topSlope()) + flag = true; + } + else + { + if (!WorldGen.SolidTileAllowBottomSlope(i1, y + 1)) + flag = true; + if (!WorldGen.SolidTileAllowBottomSlope(i1 + 1, y + 1)) + flag = true; + } + if (type == (ushort) 185 && Main.tile[i1, y].frameX >= (short) 1368 && Main.tile[i1, y].frameX <= (short) 1458 && Main.tile[i1, y + 1].type != (ushort) 2 && Main.tile[i1 + 1, y + 1].type != (ushort) 2 && Main.tile[i1, y + 1].type != (ushort) 477 && Main.tile[i1 + 1, y + 1].type != (ushort) 477 && Main.tile[i1, y + 1].type != (ushort) 492 && Main.tile[i1 + 1, y + 1].type != (ushort) 492) + { + Main.tile[i1, y].frameX -= (short) 1368; + Main.tile[i1 + 1, y].frameX -= (short) 1368; + } + if (!flag) + return; + int frameX = (int) Main.tile[i1, y].frameX; + if (!Main.tile[i1, y].active()) + frameX = (int) Main.tile[i1 + 1, y].frameX; + WorldGen.destroyObject = true; + if ((int) Main.tile[i1, y].type == (int) type) + WorldGen.KillTile(i1, y); + if ((int) Main.tile[i1 + 1, y].type == (int) type) + WorldGen.KillTile(i1 + 1, y); + if (type == (ushort) 16) + { + if (num2 == 1) + Item.NewItem(i1 * 16, y * 16, 32, 32, 716); + else + Item.NewItem(i1 * 16, y * 16, 32, 32, 35); + } + if (type == (ushort) 18) + { + int Type = 36; + if (num2 >= 1 && num2 <= 3) + Type = 634 + num2; + else if (num2 >= 4 && num2 <= 8) + { + Type = 807 + num2; + } + else + { + switch (num2) + { + case 9: + Type = 916; + break; + case 10: + Type = 1145; + break; + case 11: + Type = 1398; + break; + case 12: + Type = 1401; + break; + case 13: + Type = 1404; + break; + case 14: + Type = 1461; + break; + case 15: + Type = 1511; + break; + case 16: + Type = 1795; + break; + case 17: + Type = 1817; + break; + case 18: + Type = 2229; + break; + case 19: + Type = 2251; + break; + case 20: + Type = 2252; + break; + case 21: + Type = 2253; + break; + case 22: + Type = 2534; + break; + case 23: + Type = 673; + break; + case 24: + Type = 2631; + break; + case 25: + Type = 2632; + break; + case 26: + Type = 2633; + break; + case 27: + Type = 2826; + break; + case 28: + Type = 3156; + break; + case 29: + Type = 3158; + break; + case 30: + Type = 3157; + break; + case 31: + Type = 3909; + break; + case 32: + Type = 3910; + break; + case 33: + Type = 3949; + break; + case 34: + Type = 3975; + break; + case 35: + Type = 4163; + break; + case 36: + Type = 4184; + break; + case 37: + Type = 4205; + break; + case 38: + Type = 4226; + break; + case 39: + Type = 4315; + break; + case 40: + Type = 4584; + break; + } + } + Item.NewItem(i1 * 16, y * 16, 32, 32, Type); + } + if (type == (ushort) 185) + { + if (frameX >= 576 && frameX <= 610) + { + Item.NewItem(i1 * 16, y * 16, 32, 32, 71, WorldGen.genRand.Next(10, 100)); + Item.NewItem(i1 * 16, y * 16, 32, 32, 71, WorldGen.genRand.Next(20, 100)); + if (WorldGen.genRand.Next(3) != 0) + Item.NewItem(i1 * 16, y * 16, 32, 32, 71, WorldGen.genRand.Next(10, 100)); + if (WorldGen.genRand.Next(3) != 0) + Item.NewItem(i1 * 16, y * 16, 32, 32, 71, WorldGen.genRand.Next(20, 100)); + if (WorldGen.genRand.Next(2) == 0) + Item.NewItem(i1 * 16, y * 16, 32, 32, 71, WorldGen.genRand.Next(10, 100)); + if (WorldGen.genRand.Next(2) == 0) + Item.NewItem(i1 * 16, y * 16, 32, 32, 71, WorldGen.genRand.Next(20, 100)); + if (WorldGen.genRand.Next(3) == 0) + Item.NewItem(i1 * 16, y * 16, 32, 32, 71, WorldGen.genRand.Next(10, 100)); + if (WorldGen.genRand.Next(3) == 0) + Item.NewItem(i1 * 16, y * 16, 32, 32, 71, WorldGen.genRand.Next(20, 100)); + if (WorldGen.genRand.Next(4) == 0) + Item.NewItem(i1 * 16, y * 16, 32, 32, 71, WorldGen.genRand.Next(10, 100)); + if (WorldGen.genRand.Next(4) == 0) + Item.NewItem(i1 * 16, y * 16, 32, 32, 71, WorldGen.genRand.Next(20, 100)); + if (WorldGen.genRand.Next(5) == 0) + Item.NewItem(i1 * 16, y * 16, 32, 32, 71, WorldGen.genRand.Next(10, 100)); + if (WorldGen.genRand.Next(5) == 0) + Item.NewItem(i1 * 16, y * 16, 32, 32, 71, WorldGen.genRand.Next(20, 100)); + } + if (frameX >= 612 && frameX <= 646) + { + Item.NewItem(i1 * 16, y * 16, 32, 32, 72, WorldGen.genRand.Next(10, 100)); + if (WorldGen.genRand.Next(2) == 0) + Item.NewItem(i1 * 16, y * 16, 32, 32, 72, WorldGen.genRand.Next(20, 100)); + if (WorldGen.genRand.Next(3) == 0) + Item.NewItem(i1 * 16, y * 16, 32, 32, 72, WorldGen.genRand.Next(30, 100)); + } + if (frameX >= 648 && frameX <= 682) + { + Item.NewItem(i1 * 16, y * 16, 32, 32, 73, WorldGen.genRand.Next(1, 6)); + if (WorldGen.genRand.Next(2) == 0) + Item.NewItem(i1 * 16, y * 16, 32, 32, 73, WorldGen.genRand.Next(2, 6)); + if (WorldGen.genRand.Next(3) == 0) + Item.NewItem(i1 * 16, y * 16, 32, 32, 73, WorldGen.genRand.Next(3, 6)); + } + if (frameX >= 684 && frameX <= 718) + Item.NewItem(i1 * 16, y * 16, 32, 32, 181, WorldGen.genRand.Next(1, 4)); + if (frameX >= 720 && frameX <= 754) + Item.NewItem(i1 * 16, y * 16, 32, 32, 180, WorldGen.genRand.Next(1, 4)); + if (frameX >= 756 && frameX <= 790) + Item.NewItem(i1 * 16, y * 16, 32, 32, 177, WorldGen.genRand.Next(1, 4)); + if (frameX >= 792 && frameX <= 826) + Item.NewItem(i1 * 16, y * 16, 32, 32, 179, WorldGen.genRand.Next(1, 4)); + if (frameX >= 828 && frameX <= 862) + Item.NewItem(i1 * 16, y * 16, 32, 32, 178, WorldGen.genRand.Next(1, 4)); + if (frameX >= 864 && frameX <= 898) + Item.NewItem(i1 * 16, y * 16, 32, 32, 182, WorldGen.genRand.Next(1, 4)); + } + if (type == (ushort) 462) + Item.NewItem(i1 * 16, y * 16, 32, 32, 3795); + if (type == (ushort) 29) + { + Item.NewItem(i1 * 16, y * 16, 32, 32, 87); + SoundEngine.PlaySound(13, i * 16, y * 16); + } + if (type == (ushort) 103) + { + int Type = 356; + if (num2 == 1) + Type = 2235; + if (num2 == 2) + Type = 2242; + if (num2 == 3) + Type = 2243; + Item.NewItem(i1 * 16, y * 16, 32, 32, Type); + SoundEngine.PlaySound(13, i * 16, y * 16); + } + else if (type == (ushort) 134) + { + if (num2 == 1) + Item.NewItem(i1 * 16, y * 16, 32, 32, 1220); + else + Item.NewItem(i1 * 16, y * 16, 32, 32, 525); + } + WorldGen.destroyObject = false; + WorldGen.SquareTileFrame(i1, y); + WorldGen.SquareTileFrame(i1 + 1, y); + } + + public static void Place2x1(int x, int y, ushort type, int style = 0) + { + if (Main.tile[x, y] == null) + Main.tile[x, y] = new Tile(); + if (Main.tile[x + 1, y] == null) + Main.tile[x + 1, y] = new Tile(); + if (Main.tile[x, y + 1] == null) + Main.tile[x, y + 1] = new Tile(); + if (Main.tile[x + 1, y + 1] == null) + Main.tile[x + 1, y + 1] = new Tile(); + bool flag = false; + if (type != (ushort) 29 && type != (ushort) 103 && WorldGen.SolidTile2(x, y + 1) && WorldGen.SolidTile2(x + 1, y + 1) && !Main.tile[x, y].active() && !Main.tile[x + 1, y].active()) + flag = true; + else if ((type == (ushort) 29 || type == (ushort) 103) && Main.tile[x, y + 1].active() && Main.tile[x + 1, y + 1].active() && Main.tileTable[(int) Main.tile[x, y + 1].type] && Main.tileTable[(int) Main.tile[x + 1, y + 1].type] && !Main.tile[x, y].active() && !Main.tile[x + 1, y].active()) + flag = true; + if (!flag) + return; + Main.tile[x, y].active(true); + Main.tile[x, y].frameY = (short) 0; + Main.tile[x, y].frameX = (short) (36 * style); + Main.tile[x, y].type = type; + Main.tile[x + 1, y].active(true); + Main.tile[x + 1, y].frameY = (short) 0; + Main.tile[x + 1, y].frameX = (short) (36 * style + 18); + Main.tile[x + 1, y].type = type; + } + + public static void Check4x2(int i, int j, int type) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int num1 = i; + int num2 = type != 487 ? num1 + (int) Main.tile[i, j].frameX / 18 * -1 : num1 + (int) Main.tile[i, j].frameX / 18 % 4 * -1; + if ((type == 79 || type == 90) && Main.tile[i, j].frameX >= (short) 72) + num2 += 4; + int num3 = (int) Main.tile[i, j].frameY / 18; + int style = 0; + while (num3 > 1) + { + num3 -= 2; + ++style; + } + int num4 = j - num3; + if (type == 487) + style = (int) Main.tile[i, j].frameX / 72; + for (int i1 = num2; i1 < num2 + 4; ++i1) + { + for (int index = num4; index < num4 + 2; ++index) + { + int num5 = (i1 - num2) * 18; + int num6 = (index - num4) * 18; + if ((type == 79 || type == 90) && Main.tile[i, j].frameX >= (short) 72) + num5 = (i1 - num2 + 4) * 18; + if (type == 487) + num5 += style * 72; + else + num6 += style * 36; + if (Main.tile[i1, index] == null) + Main.tile[i1, index] = new Tile(); + if (!Main.tile[i1, index].active() || (int) Main.tile[i1, index].type != type || (int) Main.tile[i1, index].frameX != num5 || (int) Main.tile[i1, index].frameY != num6) + flag = true; + } + if (Main.tile[i1, num4 + 2] == null) + Main.tile[i1, num4 + 2] = new Tile(); + if (!WorldGen.SolidTileAllowBottomSlope(i1, num4 + 2) && (!Main.tile[i1, num4 + 2].active() || !TileID.Sets.Platforms[(int) Main.tile[i1, num4 + 2].type])) + flag = true; + } + if (!flag) + return; + WorldGen.destroyObject = true; + for (int i2 = num2; i2 < num2 + 4; ++i2) + { + for (int j1 = num4; j1 < num4 + 3; ++j1) + { + if ((int) Main.tile[i2, j1].type == type && Main.tile[i2, j1].active()) + WorldGen.KillTile(i2, j1); + } + } + if (type == 79) + { + int Type = style != 0 ? (style != 4 ? (style < 9 || style > 12 ? (style < 5 || style > 8 ? (style < 13 || style > 18 ? (style != 19 ? (style != 20 ? (style != 21 ? (style != 22 ? (style != 23 ? (style != 24 ? (style != 25 ? (style != 26 ? (style != 27 ? (style != 28 ? (style != 29 ? (style != 30 ? (style != 31 ? (style != 32 ? (style != 33 ? (style != 34 ? (style != 35 ? (style != 36 ? (style != 37 ? (style != 38 ? (style != 39 ? style + 643 : 4567) : 4299) : 4209) : 4188) : 4167) : 4146) : 3959) : 3932) : 3897) : 3163) : 3164) : 3162) : 2811) : 2669) : 2568) : 2553) : 2538) : 2520) : 2231) : 2140) : 2139) : 2066 + style - 13) : 1465 + style) : 1710 + style) : 920) : 224; + Item.NewItem(i * 16, j * 16, 32, 32, Type); + } + if (type == 487) + Item.NewItem(i * 16, j * 16, 32, 32, WorldGen.GetItemDrop_PicnicTables(style)); + if (type == 90) + { + int Type = 0; + if (style == 0) + Type = 336; + else if (style >= 1 && style <= 10) + Type = 2072 + style - 1; + else if (style >= 11 && style <= 15) + { + Type = 2124 + style - 11; + } + else + { + switch (style) + { + case 16: + Type = 2232; + break; + case 17: + Type = 2519; + break; + case 18: + Type = 2537; + break; + case 19: + Type = 2552; + break; + case 20: + Type = 2567; + break; + case 21: + Type = 2658; + break; + case 22: + Type = 2659; + break; + case 23: + Type = 2660; + break; + case 24: + Type = 2661; + break; + case 25: + Type = 2662; + break; + case 26: + Type = 2663; + break; + case 27: + Type = 2810; + break; + case 28: + Type = 3159; + break; + case 29: + Type = 3161; + break; + case 30: + Type = 3160; + break; + case 31: + Type = 3895; + break; + case 32: + Type = 3931; + break; + case 33: + Type = 3958; + break; + case 34: + Type = 4145; + break; + case 35: + Type = 4166; + break; + case 36: + Type = 4187; + break; + case 37: + Type = 4208; + break; + case 38: + Type = 4298; + break; + case 39: + Type = 4566; + break; + } + } + Item.NewItem(i * 16, j * 16, 32, 32, Type); + } + WorldGen.destroyObject = false; + for (int i3 = num2 - 1; i3 < num2 + 4; ++i3) + { + for (int j2 = num4 - 1; j2 < num4 + 4; ++j2) + WorldGen.TileFrame(i3, j2); + } + } + + private static bool OasisPlantWaterCheck(int x, int y, bool boost = false) + { + int num1 = 45; + int num2 = 20; + if (boost) + { + num1 += 4; + num2 += 3; + } + int num3 = 20; + int num4 = 0; + for (int index1 = x - num1; index1 <= x + num1; ++index1) + { + if (x > WorldGen.beachDistance && x < Main.maxTilesX - WorldGen.beachDistance) + { + for (int index2 = y - num2; index2 <= y + num2; ++index2) + { + if (WorldGen.InWorld(index1, index2) && !WorldGen.SolidTile(index1, index2)) + num4 += (int) Main.tile[index1, index2].liquid; + } + } + } + return num4 / (int) byte.MaxValue >= num3; + } + + public static void PlaceOasisPlant(int X, int Y, ushort type = 530) + { + int num1 = WorldGen.genRand.Next(9); + int num2 = 0; + int x = X; + int y = Y; + if (x < WorldGen.beachDistance || x > Main.maxTilesX - WorldGen.beachDistance || y < 5 || y > Main.maxTilesY - 5) + return; + bool flag = true; + for (int i = x - 1; i < x + 2; ++i) + { + for (int index = y - 1; index < y + 1; ++index) + { + if (Main.tile[i, index] == null) + Main.tile[i, index] = new Tile(); + if (Main.tile[i, index].active() && Main.tile[i, index].type != (ushort) 529) + flag = false; + if (Main.tile[i, index].liquid > (byte) 0) + flag = false; + } + if (Main.tile[i, y + 1] == null) + Main.tile[i, y + 1] = new Tile(); + if (!WorldGen.SolidTile(i, y + 1) || !TileID.Sets.Conversion.Sand[(int) Main.tile[i, y + 1].type]) + flag = false; + } + if (!flag || !WorldGen.OasisPlantWaterCheck(x, y)) + return; + short num3 = (short) (54 * num1); + short num4 = (short) (36 * num2); + Main.tile[x - 1, y - 1].active(true); + Main.tile[x - 1, y - 1].frameY = num4; + Main.tile[x - 1, y - 1].frameX = num3; + Main.tile[x - 1, y - 1].type = type; + Main.tile[x, y - 1].active(true); + Main.tile[x, y - 1].frameY = num4; + Main.tile[x, y - 1].frameX = (short) ((int) num3 + 18); + Main.tile[x, y - 1].type = type; + Main.tile[x + 1, y - 1].active(true); + Main.tile[x + 1, y - 1].frameY = num4; + Main.tile[x + 1, y - 1].frameX = (short) ((int) num3 + 36); + Main.tile[x + 1, y - 1].type = type; + Main.tile[x - 1, y].active(true); + Main.tile[x - 1, y].frameY = (short) ((int) num4 + 18); + Main.tile[x - 1, y].frameX = num3; + Main.tile[x - 1, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameY = (short) ((int) num4 + 18); + Main.tile[x, y].frameX = (short) ((int) num3 + 18); + Main.tile[x, y].type = type; + Main.tile[x + 1, y].active(true); + Main.tile[x + 1, y].frameY = (short) ((int) num4 + 18); + Main.tile[x + 1, y].frameX = (short) ((int) num3 + 36); + Main.tile[x + 1, y].type = type; + } + + public static void CheckOasisPlant(int i, int j, int type = 530) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int num1 = j; + Tile tileSafely = Framing.GetTileSafely(i, j); + int num2 = (int) tileSafely.frameY % 36; + int j1 = num1 + num2 / 18 * -1; + int i1 = (int) tileSafely.frameX / 18; + int num3 = 0; + int num4 = (int) Framing.GetTileSafely(i1, j1).frameY / 36; + while (i1 > 2) + { + i1 -= 3; + ++num3; + } + int num5 = i - i1; + int num6 = num3 * 54; + for (int i2 = num5; i2 < num5 + 3; ++i2) + { + for (int index = j1; index < j1 + 2; ++index) + { + if (Main.tile[i2, index] == null) + Main.tile[i2, index] = new Tile(); + if (!Main.tile[i2, index].active() || (int) Main.tile[i2, index].type != type || (int) Main.tile[i2, index].frameX != (i2 - num5) * 18 + num6 || (int) Main.tile[i2, index].frameY != (index - j1) * 18) + flag = true; + } + if (Main.tile[i2, j1 + 2] == null) + Main.tile[i2, j1 + 2] = new Tile(); + if (!WorldGen.SolidTile(i2, j1 + 2) || !TileID.Sets.Conversion.Sand[(int) Main.tile[i2, j1 + 2].type]) + flag = true; + } + if (!flag) + return; + int frameX = (int) Main.tile[i, j].frameX; + WorldGen.destroyObject = true; + for (int i3 = num5; i3 < num5 + 3; ++i3) + { + for (int j2 = j1; j2 < j1 + 2; ++j2) + { + if (Main.tile[i3, j2] == null) + Main.tile[i3, j2] = new Tile(); + if ((int) Main.tile[i3, j2].type == type && Main.tile[i3, j2].active()) + WorldGen.KillTile(i3, j2); + } + } + WorldGen.destroyObject = false; + for (int i4 = num5 - 1; i4 < num5 + 4; ++i4) + { + for (int j3 = j1 - 1; j3 < j1 + 3; ++j3) + WorldGen.TileFrame(i4, j3); + } + } + + public static void GetBiomeInfluence( + int startX, + int endX, + int startY, + int endY, + out int corruptCount, + out int crimsonCount, + out int hallowedCount) + { + corruptCount = 0; + crimsonCount = 0; + hallowedCount = 0; + for (int index1 = startX; index1 <= endX; ++index1) + { + for (int index2 = startY; index2 <= endY; ++index2) + { + Tile tile = Main.tile[index1, index2]; + if (tile != null) + { + if (TileID.Sets.Corrupt[(int) tile.type]) + ++corruptCount; + if (TileID.Sets.Crimson[(int) tile.type]) + ++crimsonCount; + if (TileID.Sets.Hallow[(int) tile.type]) + ++hallowedCount; + } + } + } + } + + public static void PlaceJunglePlant(int X2, int Y2, ushort type, int styleX, int styleY) + { + if (styleY > 0 || type == (ushort) 236 || type == (ushort) 238) + { + int index1 = Y2; + int index2 = X2; + if (type == (ushort) 95 || type == (ushort) 126) + ++index1; + if (X2 < 5 || X2 > Main.maxTilesX - 5 || index1 < 5 || index1 > Main.maxTilesY - 5) + return; + bool flag = true; + for (int i = index2 - 1; i < index2 + 1; ++i) + { + for (int index3 = index1 - 1; index3 < index1 + 1; ++index3) + { + if (Main.tile[i, index3] == null) + Main.tile[i, index3] = new Tile(); + if (Main.tile[i, index3].active() && Main.tile[i, index3].type != (ushort) 61 && Main.tile[i, index3].type != (ushort) 62 && Main.tile[i, index3].type != (ushort) 69 && Main.tile[i, index3].type != (ushort) 74 && (type != (ushort) 236 || Main.tile[i, index3].type != (ushort) 233) && (type != (ushort) 238 || Main.tile[i, index3].type != (ushort) 233) && (Main.tile[i, index3].type != (ushort) 185 || Main.tile[i, index3].frameY != (short) 0)) + flag = false; + if (type == (ushort) 98 && Main.tile[i, index3].liquid > (byte) 0) + flag = false; + } + if (Main.tile[i, index1 + 1] == null) + Main.tile[i, index1 + 1] = new Tile(); + if (!WorldGen.SolidTile(i, index1 + 1) || Main.tile[i, index1 + 1].type != (ushort) 60) + flag = false; + } + if (!flag) + return; + short num1 = 36; + if (type == (ushort) 236 || type == (ushort) 238) + num1 = (short) 0; + short num2 = (short) (36 * styleX); + Main.tile[index2 - 1, index1 - 1].active(true); + Main.tile[index2 - 1, index1 - 1].frameY = num1; + Main.tile[index2 - 1, index1 - 1].frameX = num2; + Main.tile[index2 - 1, index1 - 1].type = type; + Main.tile[index2, index1 - 1].active(true); + Main.tile[index2, index1 - 1].frameY = num1; + Main.tile[index2, index1 - 1].frameX = (short) (18 + (int) num2); + Main.tile[index2, index1 - 1].type = type; + Main.tile[index2 - 1, index1].active(true); + Main.tile[index2 - 1, index1].frameY = (short) ((int) num1 + 18); + Main.tile[index2 - 1, index1].frameX = num2; + Main.tile[index2 - 1, index1].type = type; + Main.tile[index2, index1].active(true); + Main.tile[index2, index1].frameY = (short) ((int) num1 + 18); + Main.tile[index2, index1].frameX = (short) (18 + (int) num2); + Main.tile[index2, index1].type = type; + } + else + { + int num3 = styleX; + int index4 = X2; + int index5 = Y2; + if (index4 < 5 || index4 > Main.maxTilesX - 5 || index5 < 5 || index5 > Main.maxTilesY - 5) + return; + bool flag = true; + for (int i = index4 - 1; i < index4 + 2; ++i) + { + for (int index6 = index5 - 1; index6 < index5 + 1; ++index6) + { + if (Main.tile[i, index6] == null) + Main.tile[i, index6] = new Tile(); + if (Main.tile[i, index6].active() && Main.tile[i, index6].type != (ushort) 61 && Main.tile[i, index6].type != (ushort) 62 && Main.tile[i, index6].type != (ushort) 69 && Main.tile[i, index6].type != (ushort) 74 && (Main.tile[i, index6].type != (ushort) 185 || Main.tile[i, index6].frameY != (short) 0)) + flag = false; + } + if (Main.tile[i, index5 + 1] == null) + Main.tile[i, index5 + 1] = new Tile(); + if (!WorldGen.SolidTile(i, index5 + 1) || Main.tile[i, index5 + 1].type != (ushort) 60) + flag = false; + } + if (!flag) + return; + short num4 = (short) (54 * num3); + Main.tile[index4 - 1, index5 - 1].active(true); + Main.tile[index4 - 1, index5 - 1].frameY = (short) 0; + Main.tile[index4 - 1, index5 - 1].frameX = num4; + Main.tile[index4 - 1, index5 - 1].type = type; + Main.tile[index4, index5 - 1].active(true); + Main.tile[index4, index5 - 1].frameY = (short) 0; + Main.tile[index4, index5 - 1].frameX = (short) ((int) num4 + 18); + Main.tile[index4, index5 - 1].type = type; + Main.tile[index4 + 1, index5 - 1].active(true); + Main.tile[index4 + 1, index5 - 1].frameY = (short) 0; + Main.tile[index4 + 1, index5 - 1].frameX = (short) ((int) num4 + 36); + Main.tile[index4 + 1, index5 - 1].type = type; + Main.tile[index4 - 1, index5].active(true); + Main.tile[index4 - 1, index5].frameY = (short) 18; + Main.tile[index4 - 1, index5].frameX = num4; + Main.tile[index4 - 1, index5].type = type; + Main.tile[index4, index5].active(true); + Main.tile[index4, index5].frameY = (short) 18; + Main.tile[index4, index5].frameX = (short) ((int) num4 + 18); + Main.tile[index4, index5].type = type; + Main.tile[index4 + 1, index5].active(true); + Main.tile[index4 + 1, index5].frameY = (short) 18; + Main.tile[index4 + 1, index5].frameX = (short) ((int) num4 + 36); + Main.tile[index4 + 1, index5].type = type; + } + } + + public static void CheckJunglePlant(int i, int j, int type) + { + if (WorldGen.destroyObject) + return; + if (Main.tile[i, j].frameY >= (short) 36 || Main.tile[i, j].type == (ushort) 236 || Main.tile[i, j].type == (ushort) 238) + { + bool flag = false; + int num1 = (int) Main.tile[i, j].frameX / 18; + int num2 = 0; + while (num1 > 1) + { + num1 -= 2; + ++num2; + } + int num3 = i - num1; + int num4 = 36; + if (type == 236 || type == 238) + num4 = 0; + int num5 = (int) Main.tile[i, j].frameY / 18; + while (num5 > 1) + num5 -= 2; + int num6 = j - num5; + int num7 = num2 * 36; + for (int i1 = num3; i1 < num3 + 2; ++i1) + { + for (int index = num6; index < num6 + 2; ++index) + { + if (Main.tile[i1, index] == null) + Main.tile[i1, index] = new Tile(); + if (!Main.tile[i1, index].active() || (int) Main.tile[i1, index].type != type || (int) Main.tile[i1, index].frameX != (i1 - num3) * 18 + num7 || (int) Main.tile[i1, index].frameY != (index - num6) * 18 + num4) + flag = true; + } + if (Main.tile[i1, num6 + 2] == null) + Main.tile[i1, num6 + 2] = new Tile(); + if (!WorldGen.SolidTile(i1, num6 + 2) || Main.tile[i1, num6 + 2].type != (ushort) 60) + flag = true; + } + if (!flag) + return; + if (type == 238) + { + float num8 = (float) (i * 16); + float num9 = (float) (j * 16); + float num10 = -1f; + int plr = 0; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + float num11 = Math.Abs(Main.player[index].position.X - num8) + Math.Abs(Main.player[index].position.Y - num9); + if ((double) num11 < (double) num10 || (double) num10 == -1.0) + { + plr = index; + num10 = num11; + } + } + if ((double) num10 / 16.0 < 50.0) + NPC.SpawnOnPlayer(plr, 262); + } + if (type == 236) + Item.NewItem(i * 16, j * 16, 32, 32, 1291); + int frameX = (int) Main.tile[i, j].frameX; + WorldGen.destroyObject = true; + for (int i2 = num3; i2 < num3 + 2; ++i2) + { + for (int j1 = num6; j1 < num6 + 2; ++j1) + { + if (Main.tile[i2, j1] == null) + Main.tile[i2, j1] = new Tile(); + if ((int) Main.tile[i2, j1].type == type && Main.tile[i2, j1].active()) + WorldGen.KillTile(i2, j1); + } + } + WorldGen.destroyObject = false; + } + else + { + bool flag = false; + int num12 = j + (int) Main.tile[i, j].frameY / 18 * -1; + int num13 = (int) Main.tile[i, j].frameX / 18; + int num14 = 0; + while (num13 > 2) + { + num13 -= 3; + ++num14; + } + int num15 = i - num13; + int num16 = num14 * 54; + for (int i3 = num15; i3 < num15 + 3; ++i3) + { + for (int index = num12; index < num12 + 2; ++index) + { + if (Main.tile[i3, index] == null) + Main.tile[i3, index] = new Tile(); + if (!Main.tile[i3, index].active() || (int) Main.tile[i3, index].type != type || (int) Main.tile[i3, index].frameX != (i3 - num15) * 18 + num16 || (int) Main.tile[i3, index].frameY != (index - num12) * 18) + flag = true; + } + if (Main.tile[i3, num12 + 2] == null) + Main.tile[i3, num12 + 2] = new Tile(); + if (!WorldGen.SolidTile(i3, num12 + 2) || Main.tile[i3, num12 + 2].type != (ushort) 60) + flag = true; + } + if (!flag) + return; + int frameX = (int) Main.tile[i, j].frameX; + WorldGen.destroyObject = true; + for (int i4 = num15; i4 < num15 + 3; ++i4) + { + for (int j2 = num12; j2 < num12 + 3; ++j2) + { + if (Main.tile[i4, j2] == null) + Main.tile[i4, j2] = new Tile(); + if ((int) Main.tile[i4, j2].type == type && Main.tile[i4, j2].active()) + WorldGen.KillTile(i4, j2); + } + } + WorldGen.destroyObject = false; + } + } + + public static void CheckSuper(int x, int y, int type) + { + if (WorldGen.destroyObject) + return; + Tile tile = Main.tile[x, y]; + int style = 0; + if (type == 376) + style = (int) tile.frameX / 36; + if (type == 443) + style = (int) tile.frameX / 36; + if (type == 485) + style = (int) tile.frameX / 36; + bool flag1 = type == 376; + bool flag2 = type == 443; + bool flag3 = type == 444; + bool flag4 = type == 485; + TileObjectData tileData = TileObjectData.GetTileData(type, style); + int num1 = tileData.StyleHorizontal ? 1 : 0; + int width = tileData.Width; + int height = tileData.Height; + int num2 = x; + int num3 = y; + int num4 = num2 - (int) tile.frameX / 18 % width; + int j = num3 - (int) tile.frameY / 18 % height; + int num5 = 0; + int num6 = 0; + if (num1 != 0) + num5 = (int) tile.frameX / tileData.CoordinateFullWidth; + else + num6 = (int) tile.frameY / tileData.CoordinateFullHeight; + bool flag5 = false; + bool flag6 = false; + for (int index1 = 0; index1 < width; ++index1) + { + for (int index2 = 0; index2 < height; ++index2) + { + Tile tileSafely = Framing.GetTileSafely(num4 + index1, j + index2); + if (!tileSafely.active() || (int) tileSafely.type != type || (int) tileSafely.frameX != num5 * tileData.CoordinateFullWidth + index1 * (tileData.CoordinateWidth + 2) || (int) tileSafely.frameY != num6 * tileData.CoordinateFullHeight + index2 * (tileData.CoordinateHeights[0] + 2)) + flag5 = true; + } + } + if (flag1) + { + for (int index = 0; index < width; ++index) + { + Tile tileSafely = Framing.GetTileSafely(num4 + index, j + height); + if (!tileSafely.active() || !Main.tileSolid[(int) tileSafely.type] && !Main.tileTable[(int) tileSafely.type]) + flag5 = true; + if (tileSafely.halfBrick()) + flag5 = true; + } + } + if (flag2) + { + bool flag7 = true; + bool flag8 = true; + for (int index = 0; index < width; ++index) + { + if (!WorldGen.AnchorValid(Framing.GetTileSafely(num4 + index, j + height), AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide)) + flag8 = false; + if (!WorldGen.AnchorValid(Framing.GetTileSafely(num4 + index, j - 1), AnchorType.SolidBottom)) + flag7 = false; + } + if (!flag7 && !flag8) + flag5 = true; + if (!flag5) + { + int num7 = 0; + if (flag8) + { + for (int index = 0; index < width; ++index) + Framing.GetTileSafely(num4 + index, j).frameX = (short) (index * 18 + style / 2 * 36 + num7 * 36); + } + else + { + for (int index = 0; index < width; ++index) + Framing.GetTileSafely(num4 + index, j).frameX = (short) (index * 18 + (style - 2) / 2 * 36 + 72 + num7 * 36); + } + } + } + if (flag3) + { + bool flag9 = true; + for (int index = 0; index < width; ++index) + { + if (!WorldGen.AnchorValid(Framing.GetTileSafely(num4 + index, j - 1), AnchorType.SolidTile)) + flag9 = false; + } + if (!flag9) + flag5 = true; + for (int index3 = 0; index3 < width; ++index3) + { + for (int index4 = 0; index4 < height; ++index4) + { + if (Framing.GetTileSafely(num4 + index3, j + index4).liquid > (byte) 0) + { + flag5 = true; + flag6 = true; + } + } + } + } + if (flag4) + { + bool flag10 = true; + for (int index = 0; index < width; ++index) + { + if (!WorldGen.AnchorValid(Framing.GetTileSafely(num4 + index, j + height), AnchorType.SolidTile)) + flag10 = false; + } + if (!flag10) + flag5 = true; + } + if (!flag5) + return; + WorldGen.destroyObject = true; + for (int index5 = 0; index5 < width; ++index5) + { + for (int index6 = 0; index6 < height; ++index6) + { + if ((int) Main.tile[num4 + index5, j + index6].type == type && Main.tile[num4 + index5, j + index6].active()) + WorldGen.KillTile(num4 + index5, j + index6); + } + } + int Type = 0; + if (type == 376) + { + switch (style) + { + case 0: + Type = 2334; + break; + case 1: + Type = 2335; + break; + case 2: + Type = 2336; + break; + case 3: + Type = 3203; + break; + case 4: + Type = 3204; + break; + case 5: + Type = 3205; + break; + case 6: + Type = 3206; + break; + case 7: + Type = 3207; + break; + case 8: + Type = 3208; + break; + case 9: + Type = 3979; + break; + case 10: + Type = 3980; + break; + case 11: + Type = 3981; + break; + case 12: + Type = 3982; + break; + case 13: + Type = 3983; + break; + case 14: + Type = 3984; + break; + case 15: + Type = 3985; + break; + case 16: + Type = 3986; + break; + case 17: + Type = 3987; + break; + case 18: + Type = 4405; + break; + case 19: + Type = 4406; + break; + case 20: + Type = 4407; + break; + case 21: + Type = 4408; + break; + case 22: + Type = 4877; + break; + case 23: + Type = 4878; + break; + case 24: + Type = 5002; + break; + case 25: + Type = 5003; + break; + } + } + if (type == 443) + Type = 3722; + if (type == 485 && !WorldGen.gen && Main.netMode != 1) + { + int num8 = 1; + for (int index = 0; index < num8; ++index) + { + int number = NPC.NewNPC(num4 * 16, j * 16 + 32, 582); + Main.npc[number].TargetClosest(); + Main.npc[number].velocity = new Vector2((float) Main.npc[number].direction * 1.5f, -5f); + NetMessage.SendData(23, number: number); + int time = 20; + int fromWho = -1; + Main.npc[number].GetImmuneTime(fromWho, time); + NetMessage.SendData(131, number: number, number2: 1f, number3: ((float) fromWho), number4: ((float) time)); + } + } + if (type == 444 && Main.netMode != 1 && !flag6) + Projectile.NewProjectile((float) (num4 * 16 + 16), (float) (j * 16 + 16), 0.0f, 0.0f, 655, 0, 0.0f, Main.myPlayer); + if (Type != 0) + Item.NewItem(num4 * 16, j * 16, tileData.CoordinateFullWidth, tileData.CoordinateFullHeight, Type); + WorldGen.destroyObject = false; + for (int index7 = -1; index7 < width + 1; ++index7) + { + for (int index8 = -1; index8 < height + 1; ++index8) + WorldGen.TileFrame(num4 + index7, j + index8); + } + } + + public static void Check2x2(int i, int j, int type) + { + if (WorldGen.destroyObject) + return; + bool flag1 = false; + int num1 = 0; + int num2 = (int) Main.tile[i, j].frameX / 18 * -1; + if (num2 < -1) + { + num2 += 2; + num1 = 36; + } + int i1 = num2 + i; + int num3 = type == 172 ? 38 : 36; + int frameY = (int) Main.tile[i, j].frameY; + int num4 = 0; + while (frameY >= num3) + { + frameY -= num3; + ++num4; + } + int index1 = j - frameY / 18; + for (int i2 = i1; i2 < i1 + 2; ++i2) + { + for (int j1 = index1; j1 < index1 + 2; ++j1) + { + Tile tileSafely = Framing.GetTileSafely(i2, j1); + if (!tileSafely.active() || (int) tileSafely.type != type || (int) tileSafely.frameX != (i2 - i1) * 18 + num1 || (int) tileSafely.frameY != (j1 - index1) * 18 + num4 * num3) + flag1 = true; + } + switch (type) + { + case 95: + case 126: + Framing.GetTileSafely(i2, index1 - 1); + if (!Main.tile[i2, index1 - 1].active() || !Main.tileSolid[(int) Main.tile[i2, index1 - 1].type] || Main.tileSolidTop[(int) Main.tile[i2, index1 - 1].type]) + { + flag1 = true; + continue; + } + continue; + case 132: + case 138: + case 484: + continue; + default: + Tile tileSafely1 = Framing.GetTileSafely(i2, index1 + 2); + if (!tileSafely1.active() || !Main.tileSolid[(int) tileSafely1.type] && !Main.tileTable[(int) tileSafely1.type]) + flag1 = true; + if (tileSafely1.halfBrick()) + { + flag1 = true; + continue; + } + continue; + } + } + switch (type) + { + case 132: + flag1 = false; + index1 = (int) Main.tile[i, j].frameY / 18 * -1 + j; + int num5 = 0; + int num6 = (int) Main.tile[i, j].frameX / 18 * -1; + while (num6 < -1) + { + num6 += 2; + num5 += 36; + } + i1 = num6 + i; + for (int index2 = i1; index2 < i1 + 2; ++index2) + { + for (int index3 = index1; index3 < index1 + 2; ++index3) + { + if (Main.tile[index2, index3] == null) + Main.tile[index2, index3] = new Tile(); + if (!Main.tile[index2, index3].active() || (int) Main.tile[index2, index3].type != type || (int) Main.tile[index2, index3].frameX != (index2 - i1) * 18 + num5 || (int) Main.tile[index2, index3].frameY != (index3 - index1) * 18) + flag1 = true; + } + } + if (Main.tile[i1, index1 + 2] == null) + Main.tile[i1, index1 + 2] = new Tile(); + if (Main.tile[i1 + 1, index1 + 2] == null) + Main.tile[i1 + 1, index1 + 2] = new Tile(); + bool flag2 = false; + ushort type1 = Main.tile[i1, index1 + 2].type; + ushort type2 = Main.tile[i1 + 1, index1 + 2].type; + if (!Main.tile[i1, index1 + 2].active() || !Main.tileSolid[(int) type1] && !Main.tileSolidTop[(int) type1] || Main.tile[i1, index1 + 2].halfBrick() || Main.tile[i1, index1 + 2].slope() != (byte) 0 && !Main.tile[i1, index1 + 2].bottomSlope()) + flag2 = true; + if (!Main.tile[i1 + 1, index1 + 2].active() || !Main.tileSolid[(int) type2] && !Main.tileSolidTop[(int) type2] || Main.tile[i1 + 1, index1 + 2].halfBrick() || Main.tile[i1 + 1, index1 + 2].slope() != (byte) 0 && !Main.tile[i1 + 1, index1 + 2].bottomSlope()) + flag2 = true; + if (flag2) + { + if (Main.tile[i1, index1].wall < (ushort) 1 || Main.tile[i1 + 1, index1].wall < (ushort) 1 || Main.tile[i1, index1 + 1].wall < (ushort) 1 || Main.tile[i1 + 1, index1 + 1].wall < (ushort) 1) + { + flag1 = true; + break; + } + if (num5 < 72) + { + for (int index4 = i1; index4 < i1 + 2; ++index4) + { + for (int index5 = index1; index5 < index1 + 2; ++index5) + Main.tile[index4, index5].frameX += (short) 72; + } + break; + } + break; + } + if (num5 >= 72) + { + for (int index6 = i1; index6 < i1 + 2; ++index6) + { + for (int index7 = index1; index7 < index1 + 2; ++index7) + Main.tile[index6, index7].frameX -= (short) 72; + } + break; + } + break; + case 138: + case 484: + ushort type3 = Main.tile[i1, index1 - 1].type; + ushort type4 = Main.tile[i1 + 1, index1 - 1].type; + if ((TileID.Sets.BasicChest[(int) type3] || TileID.Sets.BasicChest[(int) type4] || type3 == (ushort) 88 || type4 == (ushort) 88 || TileID.Sets.BasicChestFake[(int) type3] || TileID.Sets.BasicChestFake[(int) type4] || type3 == (ushort) 470 || type4 == (ushort) 470 || type3 == (ushort) 475 ? 1 : (type4 == (ushort) 475 ? 1 : 0)) == 0 && !WorldGen.SolidTileAllowBottomSlope(i1, index1 + 2) && !WorldGen.SolidTileAllowBottomSlope(i1 + 1, index1 + 2)) + { + flag1 = true; + break; + } + break; + } + if (!flag1) + return; + WorldGen.destroyObject = true; + for (int i3 = i1; i3 < i1 + 2; ++i3) + { + for (int j2 = index1; j2 < index1 + 2; ++j2) + { + if ((int) Main.tile[i3, j2].type == type && Main.tile[i3, j2].active()) + WorldGen.KillTile(i3, j2); + } + } + int Type = 0; + if (type <= 565) + { + switch (type - 521) + { + case 0: + Type = 4327; + break; + case 1: + Type = 4328; + break; + case 2: + Type = 4329; + break; + case 3: + Type = 4330; + break; + case 4: + Type = 4331; + break; + case 5: + Type = 4332; + break; + case 6: + Type = 4333; + break; + default: + if (type != 564) + { + if (type == 565) + { + Type = 4552; + break; + } + break; + } + Type = 4553; + break; + } + } + else if (type != 594) + { + if (type != 621) + { + if (type == 622) + Type = 5008; + } + else + Type = 3750; + } + else + Type = 4869; + if (type == 598) + Type = 4880; + if (type == 360) + Type = 3072; + if (type == 580) + Type = 4846; + if (type == 620) + Type = 4964; + if (type == 505) + Type = 4275; + if (type == 543) + Type = 4398; + if (type == 568) + Type = 4655; + if (type == 569) + Type = 4656; + if (type == 570) + Type = 4657; + if (type >= 288 && type <= 295) + Type = 2178 + type - 288; + if (type >= 316 && type <= 318) + Type = 2439 + type - 316; + if (type == 85) + Type = 321; + if (type == 94) + Type = 352; + if (type == 95) + Type = 344; + if (type == 96) + Type = 345; + if (type == 97) + Type = 346; + if (type == 98) + Type = 347; + if (type == 99) + Type = 348; + if (type == 335) + Type = 2700; + if (type == 411) + Type = 3545; + if (type == 100) + { + if (num4 == 0) + Type = 349; + else if (num4 >= 1 && num4 <= 12) + Type = 2092 + num4 - 1; + else if (num4 >= 13 && num4 <= 16) + { + Type = 2149 + num4 - 13; + } + else + { + switch (num4) + { + case 17: + Type = 2227; + break; + case 18: + Type = 2522; + break; + case 19: + Type = 2541; + break; + case 20: + Type = 2555; + break; + case 21: + Type = 2570; + break; + case 22: + Type = 2664; + break; + case 23: + Type = 2665; + break; + case 24: + Type = 2666; + break; + case 25: + Type = 2667; + break; + case 26: + Type = 2668; + break; + case 27: + Type = 2825; + break; + case 28: + Type = 3168; + break; + case 29: + Type = 3170; + break; + case 30: + Type = 3169; + break; + case 31: + Type = 3893; + break; + case 32: + Type = 3935; + break; + case 33: + Type = 3961; + break; + case 34: + Type = 4149; + break; + case 35: + Type = 4170; + break; + case 36: + Type = 4191; + break; + case 37: + Type = 4212; + break; + case 38: + Type = 4302; + break; + case 39: + Type = 4570; + break; + } + } + } + if (type == 173) + Type = 714; + if (type == 125) + Type = 487; + if (type == 287) + Type = 2177; + if (type == 126) + Type = 488; + if (type == 132) + Type = 513; + if (type == 142) + Type = 581; + if (type == 143) + Type = 582; + if (type == 282) + Type = 250; + if (type == 319) + Type = 2490; + if (type == 490) + Type = 4075; + if (type == 172) + { + Type = 2827 + num4; + switch (num4) + { + case 29: + Type = 3147; + break; + case 30: + Type = 3149; + break; + case 31: + Type = 3148; + break; + case 32: + Type = 3896; + break; + case 33: + Type = 3946; + break; + case 34: + Type = 3972; + break; + case 35: + Type = 4160; + break; + case 36: + Type = 4181; + break; + case 37: + Type = 4202; + break; + case 38: + Type = 4223; + break; + case 39: + Type = 4312; + break; + case 40: + Type = 4581; + break; + } + } + if (Type != 0) + Item.NewItem(i * 16, j * 16, 32, 32, Type); + if (type == 138 && !WorldGen.gen && Main.netMode != 1) + Projectile.NewProjectile((float) (i1 * 16) + 15.5f, (float) (index1 * 16 + 16), 0.0f, 0.0f, 99, 70, 10f, Main.myPlayer); + if (type == 484 && !WorldGen.gen && Main.netMode != 1) + Projectile.NewProjectile((float) (i1 * 16) + 15.5f, (float) (index1 * 16 + 16), 0.0f, 0.0f, 727, 70, 10f, Main.myPlayer); + WorldGen.destroyObject = false; + for (int i4 = i1 - 1; i4 < i1 + 3; ++i4) + { + for (int j3 = index1 - 1; j3 < index1 + 3; ++j3) + WorldGen.TileFrame(i4, j3); + } + } + + public static bool CheckBoulderChest(int i, int j) + { + int num1 = (int) Main.tile[i, j].frameX / 18 * -1; + if (num1 < -1) + num1 += 2; + int index = num1 + i; + int frameY = (int) Main.tile[i, j].frameY; + while (frameY >= 36) + frameY -= 36; + int num2 = j - frameY / 18; + return WorldGen.IsAContainer(Main.tile[index, num2 - 1]) || WorldGen.IsAContainer(Main.tile[index + 1, num2 - 1]); + } + + public static bool IsAContainer(Tile t) => t.type == (ushort) 88 || t.type == (ushort) 470 || t.type == (ushort) 475 || TileID.Sets.BasicChest[(int) t.type] || TileID.Sets.BasicChestFake[(int) t.type]; + + public static void OreRunner(int i, int j, double strength, int steps, ushort type) + { + double num1 = strength; + float num2 = (float) steps; + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j; + Vector2 vector2_2; + vector2_2.X = (float) WorldGen.genRand.Next(-10, 11) * 0.1f; + vector2_2.Y = (float) WorldGen.genRand.Next(-10, 11) * 0.1f; + while (num1 > 0.0 && (double) num2 > 0.0) + { + if ((double) vector2_1.Y < 0.0 && (double) num2 > 0.0 && type == (ushort) 59) + num2 = 0.0f; + num1 = strength * ((double) num2 / (double) steps); + --num2; + int num3 = (int) ((double) vector2_1.X - num1 * 0.5); + int num4 = (int) ((double) vector2_1.X + num1 * 0.5); + int num5 = (int) ((double) vector2_1.Y - num1 * 0.5); + int num6 = (int) ((double) vector2_1.Y + num1 * 0.5); + if (num3 < 0) + num3 = 0; + if (num4 > Main.maxTilesX) + num4 = Main.maxTilesX; + if (num5 < 0) + num5 = 0; + if (num6 > Main.maxTilesY) + num6 = Main.maxTilesY; + for (int index1 = num3; index1 < num4; ++index1) + { + for (int index2 = num5; index2 < num6; ++index2) + { + if ((double) Math.Abs((float) index1 - vector2_1.X) + (double) Math.Abs((float) index2 - vector2_1.Y) < strength * 0.5 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.015) && Main.tile[index1, index2].active() && (Main.tile[index1, index2].type == (ushort) 0 || Main.tile[index1, index2].type == (ushort) 1 || Main.tile[index1, index2].type == (ushort) 23 || Main.tile[index1, index2].type == (ushort) 25 || Main.tile[index1, index2].type == (ushort) 40 || Main.tile[index1, index2].type == (ushort) 53 || Main.tile[index1, index2].type == (ushort) 57 || Main.tile[index1, index2].type == (ushort) 59 || Main.tile[index1, index2].type == (ushort) 60 || Main.tile[index1, index2].type == (ushort) 70 || Main.tile[index1, index2].type == (ushort) 109 || Main.tile[index1, index2].type == (ushort) 112 || Main.tile[index1, index2].type == (ushort) 116 || Main.tile[index1, index2].type == (ushort) 117 || Main.tile[index1, index2].type == (ushort) 147 || Main.tile[index1, index2].type == (ushort) 161 || Main.tile[index1, index2].type == (ushort) 163 || Main.tile[index1, index2].type == (ushort) 164 || Main.tileMoss[(int) Main.tile[index1, index2].type] || Main.tile[index1, index2].type == (ushort) 199 || Main.tile[index1, index2].type == (ushort) 200 || Main.tile[index1, index2].type == (ushort) 203 || Main.tile[index1, index2].type == (ushort) 234 || Main.tile[index1, index2].type == (ushort) 225 && Main.tile[index1, index2].wall != (ushort) 108)) + { + Main.tile[index1, index2].type = type; + WorldGen.SquareTileFrame(index1, index2); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if ((double) vector2_2.X > 1.0) + vector2_2.X = 1f; + if ((double) vector2_2.X < -1.0) + vector2_2.X = -1f; + } + } + + public static void SmashAltar(int i, int j) + { + if (Main.netMode == 1 || !Main.hardMode || WorldGen.noTileActions || WorldGen.gen) + return; + int num1 = WorldGen.altarCount % 3; + int num2 = WorldGen.altarCount / 3 + 1; + float num3 = (float) (Main.maxTilesX / 4200); + int num4 = 1 - num1; + float num5 = (num3 * 310f - (float) (85 * num1)) * 0.85f / (float) num2; + bool flag = false; + if (Main.drunkWorld) + { + switch (WorldGen.SavedOreTiers.Adamantite) + { + case 111: + WorldGen.SavedOreTiers.Adamantite = 223; + break; + case 223: + WorldGen.SavedOreTiers.Adamantite = 111; + break; + } + } + int num6; + switch (num1) + { + case 0: + if (WorldGen.SavedOreTiers.Cobalt == -1) + { + flag = true; + WorldGen.SavedOreTiers.Cobalt = 107; + if (WorldGen.genRand.Next(2) == 0) + WorldGen.SavedOreTiers.Cobalt = 221; + } + int index1 = 12; + if (WorldGen.SavedOreTiers.Cobalt == 221) + { + index1 += 9; + num5 *= 0.9f; + } + switch (Main.netMode) + { + case 0: + Main.NewText(Lang.misc[index1].Value, (byte) 50, B: (byte) 130); + break; + case 2: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[index1].Key), new Color(50, (int) byte.MaxValue, 130)); + break; + } + num6 = WorldGen.SavedOreTiers.Cobalt; + num5 *= 1.05f; + break; + case 1: + if (Main.drunkWorld) + { + if (WorldGen.SavedOreTiers.Mythril == 108) + WorldGen.SavedOreTiers.Mythril = 222; + else if (WorldGen.SavedOreTiers.Mythril == 222) + WorldGen.SavedOreTiers.Mythril = 108; + } + if (WorldGen.SavedOreTiers.Mythril == -1) + { + flag = true; + WorldGen.SavedOreTiers.Mythril = 108; + if (WorldGen.genRand.Next(2) == 0) + WorldGen.SavedOreTiers.Mythril = 222; + } + int index2 = 13; + if (WorldGen.SavedOreTiers.Mythril == 222) + { + index2 += 9; + num5 *= 0.9f; + } + switch (Main.netMode) + { + case 0: + Main.NewText(Lang.misc[index2].Value, (byte) 50, B: (byte) 130); + break; + case 2: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[index2].Key), new Color(50, (int) byte.MaxValue, 130)); + break; + } + num6 = WorldGen.SavedOreTiers.Mythril; + break; + default: + if (Main.drunkWorld) + { + switch (WorldGen.SavedOreTiers.Cobalt) + { + case 107: + WorldGen.SavedOreTiers.Cobalt = 221; + break; + case 221: + WorldGen.SavedOreTiers.Cobalt = 107; + break; + } + } + if (WorldGen.SavedOreTiers.Adamantite == -1) + { + flag = true; + WorldGen.SavedOreTiers.Adamantite = 111; + if (WorldGen.genRand.Next(2) == 0) + WorldGen.SavedOreTiers.Adamantite = 223; + } + int index3 = 14; + if (WorldGen.SavedOreTiers.Adamantite == 223) + { + index3 += 9; + num5 *= 0.9f; + } + switch (Main.netMode) + { + case 0: + Main.NewText(Lang.misc[index3].Value, (byte) 50, B: (byte) 130); + break; + case 2: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(Lang.misc[index3].Key), new Color(50, (int) byte.MaxValue, 130)); + break; + } + num6 = WorldGen.SavedOreTiers.Adamantite; + break; + } + if (flag) + NetMessage.SendData(7); + for (int index4 = 0; (double) index4 < (double) num5; ++index4) + { + int i1 = WorldGen.genRand.Next(100, Main.maxTilesX - 100); + double num7 = Main.worldSurface; + if (num6 == 108 || num6 == 222) + num7 = Main.rockLayer; + if (num6 == 111 || num6 == 223) + num7 = (Main.rockLayer + Main.rockLayer + (double) Main.maxTilesY) / 3.0; + int j1 = WorldGen.genRand.Next((int) num7, Main.maxTilesY - 150); + double strength = (double) WorldGen.genRand.Next(5, 9 + num4); + int steps = WorldGen.genRand.Next(5, 9 + num4); + int num8 = (int) (ushort) num6; + WorldGen.OreRunner(i1, j1, strength, steps, (ushort) num8); + } + int num9 = WorldGen.genRand.Next(3); + int num10 = 0; + while (num9 != 2 && num10++ < 1000) + { + int tileX = WorldGen.genRand.Next(100, Main.maxTilesX - 100); + int tileY = WorldGen.genRand.Next((int) Main.rockLayer + 50, Main.maxTilesY - 300); + if (Main.tile[tileX, tileY].active() && Main.tile[tileX, tileY].type == (ushort) 1) + { + Main.tile[tileX, tileY].type = num9 != 0 ? (ushort) 117 : (!WorldGen.crimson ? (ushort) 25 : (ushort) 203); + if (Main.netMode == 2) + { + NetMessage.SendTileSquare(-1, tileX, tileY, 1); + break; + } + break; + } + } + if (Main.netMode != 1) + { + int num11 = Main.rand.Next(2) + 1; + for (int index5 = 0; index5 < num11; ++index5) + NPC.SpawnOnPlayer((int) Player.FindClosest(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16), 82); + } + ++WorldGen.altarCount; + AchievementsHelper.NotifyProgressionEvent(6); + } + + public static void Check3x1(int i, int j, int type) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int num1 = (int) Main.tile[i, j].frameX / 18; + int num2 = 0; + while (num1 > 2) + { + num1 -= 3; + ++num2; + } + int num3 = i - num1; + int num4 = num2 * 54; + for (int i1 = num3; i1 < num3 + 3; ++i1) + { + int index = j; + if (Main.tile[i1, index] == null) + Main.tile[i1, index] = new Tile(); + if (!Main.tile[i1, index].active() || (int) Main.tile[i1, index].type != type || (int) Main.tile[i1, index].frameX != (i1 - num3) * 18 + num4 || Main.tile[i1, index].frameY != (short) 0) + flag = true; + if (Main.tile[i1, index - 1].active() && (TileID.Sets.BasicChest[(int) Main.tile[i1, index - 1].type] || TileID.Sets.BasicChestFake[(int) Main.tile[i1, index - 1].type] || Main.tile[i1, index - 1].type == (ushort) 88 || Main.tile[i1, index - 1].type == (ushort) 470 || Main.tile[i1, index - 1].type == (ushort) 475 || Main.tile[i1, index - 1].type == (ushort) 597)) + return; + if (!WorldGen.SolidTileAllowBottomSlope(i1, index + 1)) + flag = true; + } + if (!flag) + return; + int frameX = (int) Main.tile[i, j].frameX; + WorldGen.destroyObject = true; + if (type == 235) + Item.NewItem(i * 16, j * 16, 32, 32, 1263); + for (int i2 = num3; i2 < num3 + 3; ++i2) + { + int j1 = j; + if (Main.tile[i2, j1] == null) + Main.tile[i2, j1] = new Tile(); + if ((int) Main.tile[i2, j1].type == type && Main.tile[i2, j1].active()) + WorldGen.KillTile(i2, j1); + } + WorldGen.destroyObject = false; + for (int i3 = num3 - 1; i3 < num3 + 4; ++i3) + { + int j2 = j; + WorldGen.TileFrame(i3, j2); + } + } + + public static void Check3x2(int i, int j, int type) + { + if (WorldGen.destroyObject) + return; + bool flag1 = false; + bool flag2 = false; + int num1 = j; + if (Main.tile[i, j] == null) + Main.tile[i, j] = new Tile(); + int num2 = 36; + int num3 = (int) Main.tile[i, j].frameY / num2; + int num4 = (int) Main.tile[i, j].frameY % num2; + int index1 = num1 - num4 / 18; + int num5 = (int) Main.tile[i, j].frameX / 18; + int style = 0; + while (num5 > 2) + { + num5 -= 3; + ++style; + } + int index2 = i - num5; + int num6 = style * 54; + if (type == 14 && style == 25) + flag2 = true; + int j1 = index1 + 2; + if (flag2) + --j1; + for (int i1 = index2; i1 < index2 + 3; ++i1) + { + for (int index3 = index1; index3 < j1; ++index3) + { + if (Main.tile[i1, index3] == null) + Main.tile[i1, index3] = new Tile(); + if (!Main.tile[i1, index3].active() || (int) Main.tile[i1, index3].type != type || (int) Main.tile[i1, index3].frameX != (i1 - index2) * 18 + num6 || (int) Main.tile[i1, index3].frameY != (index3 - index1) * 18 + num3 * 36) + flag1 = true; + } + if (type == 285 || type == 286 || type == 298 || type == 299 || type == 310 || type == 339 || type == 538 || type >= 361 && type <= 364 || type == 532 || type == 544 || type == 533 || type == 555 || type == 556 || type == 582 || type == 619) + { + if (!WorldGen.SolidTileAllowBottomSlope(i1, j1) && (Main.tile[i1, j1] == null || !Main.tile[i1, j1].nactive() || !Main.tileSolidTop[(int) Main.tile[i1, j1].type] || Main.tile[i1, j1].frameY != (short) 0) && (Main.tile[i1, j1] == null || !Main.tile[i1, j1].active() || !TileID.Sets.Platforms[(int) Main.tile[i1, j1].type])) + flag1 = true; + } + else if (type == 488) + { + int num7 = 0; + if (Main.tile[i1, j1] != null && Main.tile[i1, j1].active()) + num7 = (int) Main.tile[i1, j1].type; + if ((num7 == 2 || num7 == 477 || num7 == 109 ? 1 : (num7 == 492 ? 1 : 0)) == 0) + flag1 = true; + } + else if (!WorldGen.SolidTileAllowBottomSlope(i1, j1)) + flag1 = true; + } + if (type == 187 && Main.tile[index2, index1] != null && Main.tile[index2, index1].frameX >= (short) 756 && Main.tile[index2, index1].frameX <= (short) 900 && Main.tile[index2, index1 + 2].type != (ushort) 2 && Main.tile[index2 + 1, index1 + 2].type != (ushort) 2 && Main.tile[index2 + 2, index1 + 2].type != (ushort) 2 && Main.tile[index2, index1 + 2].type != (ushort) 477 && Main.tile[index2 + 1, index1 + 2].type != (ushort) 477 && Main.tile[index2 + 2, index1 + 2].type != (ushort) 477 && Main.tile[index2, index1 + 2].type != (ushort) 492 && Main.tile[index2 + 1, index1 + 2].type != (ushort) 492 && Main.tile[index2 + 2, index1 + 2].type != (ushort) 492) + { + Main.tile[index2, index1].frameX -= (short) 378; + Main.tile[index2 + 1, index1].frameX -= (short) 378; + Main.tile[index2 + 2, index1].frameX -= (short) 378; + Main.tile[index2, index1 + 1].frameX -= (short) 378; + Main.tile[index2 + 1, index1 + 1].frameX -= (short) 378; + Main.tile[index2 + 2, index1 + 1].frameX -= (short) 378; + Main.tile[index2, index1].type = (ushort) 186; + Main.tile[index2 + 1, index1].type = (ushort) 186; + Main.tile[index2 + 2, index1].type = (ushort) 186; + Main.tile[index2, index1 + 1].type = (ushort) 186; + Main.tile[index2 + 1, index1 + 1].type = (ushort) 186; + Main.tile[index2 + 2, index1 + 1].type = (ushort) 186; + } + if (flag1 && type == 488 && WorldGen.gen) + { + for (int index4 = index2; index4 < index2 + 3; ++index4) + { + for (int index5 = index1; index5 < index1 + 2; ++index5) + { + Main.tile[index4, index5].active(true); + Main.tile[index4, index5].type = (ushort) 488; + Main.tile[index4, index5].frameX = (short) ((index4 - index2) * 18); + Main.tile[index4, index5].frameY = (short) ((index5 - index1) * 18); + } + Main.tile[index4, index1 + 2].active(true); + Main.tile[index4, index1 + 2].type = (ushort) 2; + Main.tile[index4, index1 + 2].slope((byte) 0); + Main.tile[index4, index1 + 2].halfBrick(false); + } + flag1 = false; + } + if (!flag1) + return; + int frameX = (int) Main.tile[i, j].frameX; + WorldGen.destroyObject = true; + int num8 = index1 + 3; + if (flag2) + { + int num9 = num8 - 1; + } + for (int i2 = index2; i2 < index2 + 3; ++i2) + { + for (int j2 = index1; j2 < index1 + 3; ++j2) + { + if (Main.tile[i2, j2] == null) + Main.tile[i2, j2] = new Tile(); + if ((int) Main.tile[i2, j2].type == type && Main.tile[i2, j2].active()) + WorldGen.KillTile(i2, j2); + } + } + if (type == 14) + { + int Type = style < 1 || style > 3 ? (style < 15 || style > 20 ? (style < 4 || style > 7 ? (style != 8 ? (style != 9 ? (style != 10 ? (style != 11 ? (style != 12 ? (style != 13 ? (style != 14 ? (style != 23 ? (style != 21 ? (style != 22 ? (style != 24 ? (style != 25 ? (style != 26 ? (style != 27 ? (style != 28 ? (style != 29 ? (style != 30 ? (style != 31 ? (style != 32 ? (style != 33 ? (style != 34 ? 32 : 3154) : 3155) : 3153) : 2824) : 2743) : 2583) : 677) : 2550) : 2532) : 2259) : 2248) : 1816) : 1794) : 1926) : 1510) : 1460) : 1403) : 1400) : 1397) : 1144) : 917) : 823 + style) : 1698 + style) : 637 + style; + Item.NewItem(i * 16, j * 16, 32, 32, Type); + } + if (type == 469) + { + int Type = 3920; + if (style == 1) + Type = 3948; + if (style == 2) + Type = 3974; + if (style == 3) + Type = 4162; + if (style == 4) + Type = 4183; + if (style == 5) + Type = 4204; + if (style == 6) + Type = 4225; + if (style == 7) + Type = 4314; + if (style == 8) + Type = 4583; + Item.NewItem(i * 16, j * 16, 32, 32, Type); + } + else if (type == 114) + Item.NewItem(i * 16, j * 16, 32, 32, 398); + else if (type == 26) + { + if (!WorldGen.noTileActions && !WorldGen.IsGeneratingHardMode) + WorldGen.SmashAltar(i, j); + } + else if (type == 298) + Item.NewItem(i * 16, j * 16, 32, 32, 2190); + else if (type == 299) + Item.NewItem(i * 16, j * 16, 32, 32, 2191); + else if (type >= 361 && type <= 364) + Item.NewItem(i * 16, j * 16, 32, 32, 3073 + type - 361); + else if (type >= 391 && type <= 394) + { + Item.NewItem(i * 16, j * 16, 48, 32, 3254 + type - 391); + } + else + { + switch (type) + { + case 17: + Item.NewItem(i * 16, j * 16, 32, 32, 33); + break; + case 77: + Item.NewItem(i * 16, j * 16, 32, 32, 221); + break; + case 86: + Item.NewItem(i * 16, j * 16, 32, 32, 332); + break; + case 87: + int Type1 = style < 1 || style > 3 ? (style != 4 ? (style < 5 || style > 7 ? (style < 8 || style > 10 ? (style < 11 || style > 20 ? (style != 21 ? (style != 22 ? (style != 23 ? (style != 24 ? (style != 25 ? (style != 26 ? (style != 27 ? (style != 28 ? (style != 29 ? (style != 30 ? (style != 31 ? (style != 32 ? (style != 33 ? (style != 34 ? (style != 35 ? (style != 36 ? (style != 37 ? (style != 38 ? (style != 39 ? 333 : 4579) : 4310) : 4221) : 4200) : 4179) : 4158) : 3971) : 3944) : 3916) : 3915) : 3142) : 3143) : 3141) : 2821) : 2671) : 2580) : 2565) : 2548) : 2531) : 2376 + style - 11) : 2254 + style - 8) : 2245 + style - 5) : 919) : 640 + style; + Item.NewItem(i * 16, j * 16, 32, 32, Type1); + break; + case 88: + int dresserItemDrop = WorldGen.GetDresserItemDrop(style); + Item.NewItem(i * 16, j * 16, 32, 32, dresserItemDrop); + break; + case 89: + Item.NewItem(i * 16, j * 16, 32, 32, WorldGen.GetItemDrop_Benches(style)); + break; + case 133: + if (frameX >= 54) + { + Item.NewItem(i * 16, j * 16, 32, 32, 1221); + break; + } + Item.NewItem(i * 16, j * 16, 32, 32, 524); + break; + case 186: + if (frameX >= 864) + { + if (frameX <= 954) + { + Item.NewItem(i * 16, j * 16, 32, 32, 71, WorldGen.genRand.Next(20, 100)); + Item.NewItem(i * 16, j * 16, 32, 32, 71, WorldGen.genRand.Next(30, 100)); + Item.NewItem(i * 16, j * 16, 32, 32, 71, WorldGen.genRand.Next(40, 100)); + if (WorldGen.genRand.Next(3) != 0) + Item.NewItem(i * 16, j * 16, 32, 32, 71, WorldGen.genRand.Next(20, 100)); + if (WorldGen.genRand.Next(3) != 0) + Item.NewItem(i * 16, j * 16, 32, 32, 71, WorldGen.genRand.Next(30, 100)); + if (WorldGen.genRand.Next(3) != 0) + Item.NewItem(i * 16, j * 16, 32, 32, 71, WorldGen.genRand.Next(40, 100)); + if (WorldGen.genRand.Next(2) == 0) + Item.NewItem(i * 16, j * 16, 32, 32, 71, WorldGen.genRand.Next(20, 100)); + if (WorldGen.genRand.Next(2) == 0) + Item.NewItem(i * 16, j * 16, 32, 32, 71, WorldGen.genRand.Next(30, 100)); + if (WorldGen.genRand.Next(2) == 0) + Item.NewItem(i * 16, j * 16, 32, 32, 71, WorldGen.genRand.Next(40, 100)); + if (WorldGen.genRand.Next(3) == 0) + Item.NewItem(i * 16, j * 16, 32, 32, 71, WorldGen.genRand.Next(20, 100)); + if (WorldGen.genRand.Next(3) == 0) + Item.NewItem(i * 16, j * 16, 32, 32, 71, WorldGen.genRand.Next(30, 100)); + if (WorldGen.genRand.Next(3) == 0) + Item.NewItem(i * 16, j * 16, 32, 32, 71, WorldGen.genRand.Next(40, 100)); + if (WorldGen.genRand.Next(4) == 0) + Item.NewItem(i * 16, j * 16, 32, 32, 71, WorldGen.genRand.Next(20, 100)); + if (WorldGen.genRand.Next(4) == 0) + Item.NewItem(i * 16, j * 16, 32, 32, 71, WorldGen.genRand.Next(30, 100)); + if (WorldGen.genRand.Next(4) == 0) + Item.NewItem(i * 16, j * 16, 32, 32, 71, WorldGen.genRand.Next(40, 100)); + if (WorldGen.genRand.Next(5) == 0) + Item.NewItem(i * 16, j * 16, 32, 32, 71, WorldGen.genRand.Next(20, 100)); + if (WorldGen.genRand.Next(5) == 0) + Item.NewItem(i * 16, j * 16, 32, 32, 71, WorldGen.genRand.Next(30, 100)); + if (WorldGen.genRand.Next(5) == 0) + { + Item.NewItem(i * 16, j * 16, 32, 32, 71, WorldGen.genRand.Next(40, 100)); + break; + } + break; + } + if (frameX <= 1062) + { + Item.NewItem(i * 16, j * 16, 32, 32, 72, WorldGen.genRand.Next(10, 100)); + if (WorldGen.genRand.Next(2) == 0) + Item.NewItem(i * 16, j * 16, 32, 32, 72, WorldGen.genRand.Next(20, 100)); + if (WorldGen.genRand.Next(3) == 0) + Item.NewItem(i * 16, j * 16, 32, 32, 72, WorldGen.genRand.Next(30, 100)); + if (WorldGen.genRand.Next(4) == 0) + Item.NewItem(i * 16, j * 16, 32, 32, 72, WorldGen.genRand.Next(40, 100)); + if (WorldGen.genRand.Next(5) == 0) + { + Item.NewItem(i * 16, j * 16, 32, 32, 72, WorldGen.genRand.Next(50, 100)); + break; + } + break; + } + if (frameX <= 1170) + { + Item.NewItem(i * 16, j * 16, 32, 32, 73, WorldGen.genRand.Next(1, 7)); + if (WorldGen.genRand.Next(2) == 0) + Item.NewItem(i * 16, j * 16, 32, 32, 73, WorldGen.genRand.Next(2, 7)); + if (WorldGen.genRand.Next(3) == 0) + Item.NewItem(i * 16, j * 16, 32, 32, 73, WorldGen.genRand.Next(3, 7)); + if (WorldGen.genRand.Next(4) == 0) + Item.NewItem(i * 16, j * 16, 32, 32, 73, WorldGen.genRand.Next(4, 7)); + if (WorldGen.genRand.Next(5) == 0) + { + Item.NewItem(i * 16, j * 16, 32, 32, 73, WorldGen.genRand.Next(5, 7)); + break; + } + break; + } + break; + } + break; + case 215: + switch (style) + { + case 0: + Item.NewItem(i * 16, j * 16, 32, 32, 966); + break; + case 6: + Item.NewItem(i * 16, j * 16, 32, 32, 3723); + break; + case 7: + Item.NewItem(i * 16, j * 16, 32, 32, 3724); + break; + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + Item.NewItem(i * 16, j * 16, 32, 32, 4689 + style - 8); + break; + default: + Item.NewItem(i * 16, j * 16, 32, 32, 3046 + style - 1); + break; + } + break; + case 217: + Item.NewItem(i * 16, j * 16, 32, 32, 995); + break; + case 218: + Item.NewItem(i * 16, j * 16, 32, 32, 996); + break; + case 219: + Item.NewItem(i * 16, j * 16, 32, 32, 997); + break; + case 220: + Item.NewItem(i * 16, j * 16, 32, 32, 998); + break; + case 228: + Item.NewItem(i * 16, j * 16, 32, 32, 1120); + break; + case 237: + Item.NewItem(i * 16, j * 16, 32, 32, 1292); + break; + case 244: + Item.NewItem(i * 16, j * 16, 32, 32, 1449); + break; + case 285: + Item.NewItem(i * 16, j * 16, 32, 32, 2174); + break; + case 286: + Item.NewItem(i * 16, j * 16, 32, 32, 2175); + break; + case 310: + Item.NewItem(i * 16, j * 16, 32, 32, 2207); + break; + case 339: + Item.NewItem(i * 16, j * 16, 32, 32, 2741); + break; + case 377: + Item.NewItem(i * 16, j * 16, 32, 32, 3198); + break; + case 405: + Item.NewItem(i * 16, j * 16, 32, 32, 3364); + break; + case 486: + Item.NewItem(i * 16, j * 16, 32, 32, 4063); + break; + case 488: + Item.NewItem(i * 16, j * 16, 32, 32, 9, WorldGen.genRand.Next(10, 21)); + break; + case 532: + Item.NewItem(i * 16, j * 16, 32, 32, 4364); + break; + case 533: + Item.NewItem(i * 16, j * 16, 32, 32, 4376); + break; + case 538: + Item.NewItem(i * 16, j * 16, 32, 32, 4380); + break; + case 544: + Item.NewItem(i * 16, j * 16, 32, 32, 4399); + break; + case 555: + Item.NewItem(i * 16, j * 16, 32, 32, 4475); + break; + case 556: + Item.NewItem(i * 16, j * 16, 32, 32, 4476); + break; + case 582: + Item.NewItem(i * 16, j * 16, 32, 32, 4850); + break; + case 619: + Item.NewItem(i * 16, j * 16, 32, 32, 4963); + break; + default: + if (type == 187 && frameX >= 918 && frameX <= 970) + { + if (Main.rand.Next(50) == 0) + { + Item.NewItem(i * 16, j * 16, 32, 32, 4144); + break; + } + Item.NewItem(i * 16, j * 16, 32, 32, 989); + break; + } + break; + } + } + WorldGen.destroyObject = false; + for (int i3 = index2 - 1; i3 < index2 + 4; ++i3) + { + for (int j3 = index1 - 1; j3 < index1 + 4; ++j3) + WorldGen.TileFrame(i3, j3); + } + if (type != 488) + return; + WorldGen.mysticLogsEvent.FallenLogDestroyed(); + } + + private static int GetDresserItemDrop(int style) => style < 1 || style > 3 ? (style != 4 ? (style < 5 || style > 15 ? (style != 16 ? (style != 17 ? (style != 18 ? (style != 19 ? (style != 20 ? (style != 21 ? (style != 22 ? (style != 23 ? (style != 24 ? (style != 25 ? (style != 26 ? (style != 27 ? (style != 28 ? (style != 29 ? (style != 30 ? (style != 31 ? (style != 32 ? (style != 33 ? (style != 34 ? (style != 35 ? (style != 36 ? (style != 37 ? (style != 38 ? (style != 39 ? 334 : 4569) : 4301) : 4211) : 4190) : 4169) : 4148) : 3968) : 3934) : 3914) : 3913) : 3912) : 3911) : 3133) : 3134) : 3132) : 2816) : 2640) : 2639) : 2638) : 2637) : 2577) : 2562) : 2545) : 2529) : 2386 + style - 5) : 918) : 646 + style; + + public static void Check3x4(int i, int j, int type) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int num1 = i; + int num2 = j; + int num3 = 0; + int num4 = 0; + int num5 = (int) Main.tile[i, j].frameX / 18; + int num6 = (int) Main.tile[i, j].frameY / 18; + for (; num5 >= 3; num5 -= 3) + ++num3; + for (; num6 >= 4; num6 -= 4) + ++num4; + int num7 = num1 - num5; + int num8 = num2 - num6; + for (int i1 = num7; i1 < num7 + 3; ++i1) + { + for (int index = num8; index < num8 + 4; ++index) + { + if (Main.tile[i1, index] == null) + Main.tile[i1, index] = new Tile(); + if (!Main.tile[i1, index].active() || (int) Main.tile[i1, index].type != type || (int) Main.tile[i1, index].frameX != num3 * 54 + (i1 - num7) * 18 || (int) Main.tile[i1, index].frameY != num4 * 72 + (index - num8) * 18) + flag = true; + } + if (Main.tile[i1, num8 + 4] == null) + Main.tile[i1, num8 + 4] = new Tile(); + if (!WorldGen.SolidTileAllowBottomSlope(i1, num8 + 4)) + flag = true; + } + if (!flag) + return; + WorldGen.destroyObject = true; + for (int i2 = num7; i2 < num7 + 3; ++i2) + { + for (int j1 = num8; j1 < num8 + 4; ++j1) + { + if ((int) Main.tile[i2, j1].type == type && Main.tile[i2, j1].active()) + WorldGen.KillTile(i2, j1); + } + } + switch (type) + { + case 101: + int Type1 = num3 != 1 ? (num3 != 2 ? (num3 != 3 ? (num3 != 4 ? (num3 != 5 ? (num3 != 6 ? (num3 != 7 ? (num3 != 8 ? (num3 != 9 ? (num3 != 10 ? (num3 != 11 ? (num3 != 12 ? (num3 != 13 ? (num3 != 14 ? (num3 != 15 ? (num3 != 16 ? (num3 != 17 ? (num3 < 18 || num3 > 21 ? (num3 != 22 ? (num3 != 23 ? (num3 != 24 ? (num3 != 25 ? (num3 != 26 ? (num3 != 27 ? (num3 != 28 ? (num3 != 29 ? (num3 != 30 ? (num3 != 31 ? (num3 != 32 ? (num3 != 33 ? (num3 != 34 ? (num3 != 35 ? (num3 != 36 ? (num3 != 37 ? (num3 != 38 ? (num3 != 39 ? (num3 != 40 ? 354 : 4568) : 4300) : 4210) : 4189) : 4168) : 4147) : 3960) : 3933) : 3917) : 3166) : 3167) : 3165) : 2817) : 2670) : 2569) : 2554) : 2540) : 2536) : 2233) : 2135 + num3 - 18) : 2031) : 2030) : 2029) : 2028) : 2027) : 2026) : 2025) : 2024) : 2023) : 2022) : 2021) : 2020) : 1512) : 1463) : 1416) : 1415) : 1414; + Item.NewItem(i * 16, j * 16, 32, 32, Type1); + break; + case 102: + Item.NewItem(i * 16, j * 16, 32, 32, 355); + break; + case 463: + Item.NewItem(i * 16, j * 16, 32, 32, 3813); + break; + case 617: + int Type2 = 4924 + num3; + Item.NewItem(i * 16, j * 16, 32, 32, Type2); + break; + } + WorldGen.destroyObject = false; + for (int i3 = num7 - 1; i3 < num7 + 4; ++i3) + { + for (int j2 = num8 - 1; j2 < num8 + 4; ++j2) + WorldGen.TileFrame(i3, j2); + } + } + + public static void Check5x4(int i, int j, int type) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int num1 = i; + int num2 = j; + int num3 = 0; + int num4; + for (num4 = (int) Main.tile[i, j].frameX / 18; num4 >= 5; num4 -= 5) + ++num3; + int num5 = num1 - num4; + int num6 = num2 + (int) Main.tile[i, j].frameY / 18 * -1; + for (int i1 = num5; i1 < num5 + 5; ++i1) + { + for (int index = num6; index < num6 + 4; ++index) + { + if (Main.tile[i1, index] == null) + Main.tile[i1, index] = new Tile(); + if (!Main.tile[i1, index].active() || (int) Main.tile[i1, index].type != type || (int) Main.tile[i1, index].frameX != num3 * 90 + (i1 - num5) * 18 || (int) Main.tile[i1, index].frameY != (index - num6) * 18) + flag = true; + } + if (Main.tile[i1, num6 + 4] == null) + Main.tile[i1, num6 + 4] = new Tile(); + if (!WorldGen.SolidTileAllowBottomSlope(i1, num6 + 4)) + flag = true; + } + if (!flag) + return; + WorldGen.destroyObject = true; + for (int i2 = num5; i2 < num5 + 5; ++i2) + { + for (int j1 = num6; j1 < num6 + 4; ++j1) + { + if ((int) Main.tile[i2, j1].type == type && Main.tile[i2, j1].active()) + WorldGen.KillTile(i2, j1); + } + } + if (type == 464) + Item.NewItem(i * 16, j * 16, 32, 32, 3814); + if (type == 466) + Item.NewItem(i * 16, j * 16, 32, 32, 3816); + WorldGen.destroyObject = false; + for (int i3 = num5 - 1; i3 < num5 + 6; ++i3) + { + for (int j2 = num6 - 1; j2 < num6 + 5; ++j2) + WorldGen.TileFrame(i3, j2); + } + } + + public static void Check6x3(int i, int j, int type) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int num1 = i; + int num2 = j; + int num3 = num1 + (int) Main.tile[i, j].frameX / 18 * -1; + int num4 = num2 + (int) Main.tile[i, j].frameY / 18 * -1; + for (int i1 = num3; i1 < num3 + 6; ++i1) + { + for (int index = num4; index < num4 + 3; ++index) + { + int num5 = (i1 - num3) * 18; + if (Main.tile[i1, index] == null) + Main.tile[i1, index] = new Tile(); + if (!Main.tile[i1, index].active() || (int) Main.tile[i1, index].type != type || (int) Main.tile[i1, index].frameX != num5 || (int) Main.tile[i1, index].frameY != (index - num4) * 18) + flag = true; + } + if (Main.tile[i1, num4 + 3] == null) + Main.tile[i1, num4 + 3] = new Tile(); + if (!WorldGen.SolidTileAllowBottomSlope(i1, num4 + 3) && (!Main.tile[i1, num4 + 3].nactive() || !Main.tileSolidTop[(int) Main.tile[i1, num4 + 3].type] || Main.tile[i1, num4 + 3].frameY != (short) 0)) + flag = true; + } + if (!flag) + return; + WorldGen.destroyObject = true; + for (int i2 = num3; i2 < num3 + 6; ++i2) + { + for (int j1 = num4; j1 < num4 + 3; ++j1) + { + if ((int) Main.tile[i2, j1].type == type && Main.tile[i2, j1].active()) + WorldGen.KillTile(i2, j1); + } + } + if (type == 275) + Item.NewItem(i * 16, j * 16, 32, 32, 2162); + if (type == 413) + Item.NewItem(i * 16, j * 16, 32, 32, 3565); + if (type == 414) + Item.NewItem(i * 16, j * 16, 32, 32, 3566); + if (type == 276) + Item.NewItem(i * 16, j * 16, 32, 32, 2163); + if (type == 277) + Item.NewItem(i * 16, j * 16, 32, 32, 2164); + if (type == 278) + Item.NewItem(i * 16, j * 16, 32, 32, 2165); + if (type == 279) + Item.NewItem(i * 16, j * 16, 32, 32, 2166); + if (type == 280) + Item.NewItem(i * 16, j * 16, 32, 32, 2167); + if (type == 281) + Item.NewItem(i * 16, j * 16, 32, 32, 2168); + if (type == 296) + Item.NewItem(i * 16, j * 16, 32, 32, 2186); + if (type == 297) + Item.NewItem(i * 16, j * 16, 32, 32, 2187); + if (type == 309) + Item.NewItem(i * 16, j * 16, 32, 32, 2206); + if (type == 358) + Item.NewItem(i * 16, j * 16, 32, 32, 3070); + if (type == 359) + Item.NewItem(i * 16, j * 16, 32, 32, 3071); + if (type == 542) + Item.NewItem(i * 16, j * 16, 32, 32, 4396); + if (type == 550) + Item.NewItem(i * 16, j * 16, 32, 32, 4461); + if (type == 551) + Item.NewItem(i * 16, j * 16, 32, 32, 4462); + if (type == 553) + Item.NewItem(i * 16, j * 16, 32, 32, 4473); + if (type == 554) + Item.NewItem(i * 16, j * 16, 32, 32, 4474); + if (type == 558) + Item.NewItem(i * 16, j * 16, 32, 32, 4481); + if (type == 559) + Item.NewItem(i * 16, j * 16, 32, 32, 4483); + if (type == 599) + Item.NewItem(i * 16, j * 16, 32, 32, 4882); + if (type == 600) + Item.NewItem(i * 16, j * 16, 32, 32, 4883); + if (type == 601) + Item.NewItem(i * 16, j * 16, 32, 32, 4884); + if (type == 602) + Item.NewItem(i * 16, j * 16, 32, 32, 4885); + if (type == 603) + Item.NewItem(i * 16, j * 16, 32, 32, 4886); + if (type == 604) + Item.NewItem(i * 16, j * 16, 32, 32, 4887); + if (type == 605) + Item.NewItem(i * 16, j * 16, 32, 32, 4888); + if (type == 606) + Item.NewItem(i * 16, j * 16, 32, 32, 4889); + if (type == 607) + Item.NewItem(i * 16, j * 16, 32, 32, 4890); + if (type == 608) + Item.NewItem(i * 16, j * 16, 32, 32, 4891); + if (type == 609) + Item.NewItem(i * 16, j * 16, 32, 32, 4892); + if (type == 610) + Item.NewItem(i * 16, j * 16, 32, 32, 4893); + if (type == 611) + Item.NewItem(i * 16, j * 16, 32, 32, 4894); + if (type == 612) + Item.NewItem(i * 16, j * 16, 32, 32, 4895); + WorldGen.destroyObject = false; + for (int i3 = num3 - 1; i3 < num3 + 7; ++i3) + { + for (int j2 = num4 - 1; j2 < num4 + 4; ++j2) + WorldGen.TileFrame(i3, j2); + } + } + + public static void Place6x3(int x, int y, ushort type, int direction = -1, int style = 0) + { + if (x < 5 || x > Main.maxTilesX - 5 || y < 5 || y > Main.maxTilesY - 5) + return; + bool flag = true; + for (int i = x - 3; i < x + 3; ++i) + { + for (int index = y - 2; index <= y; ++index) + { + if (Main.tile[i, index] == null) + Main.tile[i, index] = new Tile(); + if (Main.tile[i, index].active()) + flag = false; + } + if (Main.tile[i, y + 1] == null) + Main.tile[i, y + 1] = new Tile(); + if (!WorldGen.SolidTile2(i, y + 1) && (!Main.tile[i, y + 1].nactive() || !Main.tileSolidTop[(int) Main.tile[i, y + 1].type] || Main.tile[i, y + 1].frameY != (short) 0)) + flag = false; + } + if (!flag) + return; + int num1 = 0; + for (int index1 = x - 3; index1 < x + 3; ++index1) + { + int num2 = 0; + for (int index2 = y - 2; index2 <= y; ++index2) + { + Main.tile[index1, index2].active(true); + Main.tile[index1, index2].frameY = (short) num2; + Main.tile[index1, index2].frameX = (short) num1; + Main.tile[index1, index2].type = type; + num2 += 18; + } + num1 += 18; + } + } + + public static void Place4x2(int x, int y, ushort type, int direction = -1, int style = 0) + { + if (x < 5 || x > Main.maxTilesX - 5 || y < 5 || y > Main.maxTilesY - 5) + return; + bool flag = true; + for (int i = x - 1; i < x + 3; ++i) + { + for (int index = y - 1; index < y + 1; ++index) + { + if (Main.tile[i, index] == null) + Main.tile[i, index] = new Tile(); + if (Main.tile[i, index].active()) + flag = false; + } + if (Main.tile[i, y + 1] == null) + Main.tile[i, y + 1] = new Tile(); + if (!WorldGen.SolidTile2(i, y + 1)) + flag = false; + } + short num1 = 0; + if (direction == 1) + num1 = (short) 72; + int num2 = 36 * style; + if (!flag) + return; + Main.tile[x - 1, y - 1].active(true); + Main.tile[x - 1, y - 1].frameY = (short) num2; + Main.tile[x - 1, y - 1].frameX = num1; + Main.tile[x - 1, y - 1].type = type; + Main.tile[x, y - 1].active(true); + Main.tile[x, y - 1].frameY = (short) num2; + Main.tile[x, y - 1].frameX = (short) (18 + (int) num1); + Main.tile[x, y - 1].type = type; + Main.tile[x + 1, y - 1].active(true); + Main.tile[x + 1, y - 1].frameY = (short) num2; + Main.tile[x + 1, y - 1].frameX = (short) (36 + (int) num1); + Main.tile[x + 1, y - 1].type = type; + Main.tile[x + 2, y - 1].active(true); + Main.tile[x + 2, y - 1].frameY = (short) num2; + Main.tile[x + 2, y - 1].frameX = (short) (54 + (int) num1); + Main.tile[x + 2, y - 1].type = type; + Main.tile[x - 1, y].active(true); + Main.tile[x - 1, y].frameY = (short) (num2 + 18); + Main.tile[x - 1, y].frameX = num1; + Main.tile[x - 1, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameY = (short) (num2 + 18); + Main.tile[x, y].frameX = (short) (18 + (int) num1); + Main.tile[x, y].type = type; + Main.tile[x + 1, y].active(true); + Main.tile[x + 1, y].frameY = (short) (num2 + 18); + Main.tile[x + 1, y].frameX = (short) (36 + (int) num1); + Main.tile[x + 1, y].type = type; + Main.tile[x + 2, y].active(true); + Main.tile[x + 2, y].frameY = (short) (num2 + 18); + Main.tile[x + 2, y].frameX = (short) (54 + (int) num1); + Main.tile[x + 2, y].type = type; + } + + public static void ShootFromCannon( + int x, + int y, + int angle, + int ammo, + int Damage, + float KnockBack, + int owner) + { + float num1 = 14f; + float num2 = 0.0f; + float num3 = 0.0f; + int Type = 162; + if (ammo == 2) + Type = 281; + if (ammo == 3) + Type = 178; + if (ammo == 4) + { + Type = 601; + num1 = 3f; + } + if (ammo == 5) + { + Type = 601; + num1 = 3f; + } + int num4 = 0; + int num5 = 0; + if (ammo == 5) + num4 = 1; + if (ammo == 2) + num5 = owner + 1; + if (angle == 0) + { + num2 = 10f; + num3 = 0.0f; + } + if (angle == 1) + { + num2 = 7.5f; + num3 = -2.5f; + } + if (angle == 2) + { + num2 = 5f; + num3 = -5f; + } + if (angle == 3) + { + num2 = 2.75f; + num3 = -6f; + } + if (angle == 4) + { + num2 = 0.0f; + num3 = -10f; + } + if (angle == 5) + { + num2 = -2.75f; + num3 = -6f; + } + if (angle == 6) + { + num2 = -5f; + num3 = -5f; + } + if (angle == 7) + { + num2 = -7.5f; + num3 = -2.5f; + } + if (angle == 8) + { + num2 = -10f; + num3 = 0.0f; + } + Vector2 vector2 = new Vector2((float) ((x + 2) * 16), (float) ((y + 2) * 16)); + float num6 = num2; + float num7 = num3; + float num8 = (float) Math.Sqrt((double) num6 * (double) num6 + (double) num7 * (double) num7); + if (ammo == 4 || ammo == 5) + { + if (angle == 4) + vector2.X += 5f; + vector2.Y += 5f; + } + float num9 = num1 / num8; + float SpeedX = num6 * num9; + float SpeedY = num7 * num9; + if (Main.myPlayer != owner && Main.netMode == 2 && (ammo == 4 || ammo == 5)) + { + NetMessage.SendData(108, owner, number: Damage, number2: KnockBack, number3: ((float) x), number4: ((float) y), number5: angle, number6: ammo, number7: owner); + } + else + { + if (Main.netMode == 2) + owner = Main.myPlayer; + int index = Projectile.NewProjectile(vector2.X, vector2.Y, SpeedX, SpeedY, Type, Damage, KnockBack, owner, (float) num4, (float) num5); + Main.projectile[index].originatedFromActivableTile = true; + } + } + + public static void SwitchCannon(int i, int j) + { + int num1 = (int) Main.tile[i, j].frameX / 18; + while (num1 >= 4) + num1 -= 4; + int num2 = (int) Main.tile[i, j].frameY / 18; + while (num2 >= 3) + num2 -= 3; + int num3 = 1; + if (num1 < 2) + num3 = -1; + int index1 = i - num1; + int index2 = j - num2; + if (num3 == 1 && Main.tile[index1, index2].frameY <= (short) 52 || num3 == -1 && Main.tile[index1, index2].frameY >= (short) 432) + return; + int num4 = num3 * -54; + for (int index3 = index1; index3 < index1 + 4; ++index3) + { + for (int index4 = index2; index4 < index2 + 3; ++index4) + { + if (Main.tile[index3, index4] == null) + Main.tile[index3, index4] = new Tile(); + if (Main.tile[index3, index4].active() && Main.tile[index3, index4].type == (ushort) 209) + Main.tile[index3, index4].frameY += (short) num4; + } + } + NetMessage.SendTileSquare(-1, index1 + 1, index2 + 1, 4); + } + + public static void CheckCannon(int i, int j, int type) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int num1 = (int) Main.tile[i, j].frameX / 18; + int num2 = 0; + for (; num1 >= 4; num1 -= 4) + ++num2; + int num3 = i - num1; + int num4 = (int) Main.tile[i, j].frameY / 18; + int num5 = 0; + for (; num4 >= 3; num4 -= 3) + num5 += 54; + int num6 = j - num4; + int num7 = 72 * num2; + for (int i1 = num3; i1 < num3 + 4; ++i1) + { + int num8 = num5; + for (int index = num6; index < num6 + 3; ++index) + { + if (Main.tile[i1, index] == null) + Main.tile[i1, index] = new Tile(); + if (!Main.tile[i1, index].active() || (int) Main.tile[i1, index].type != type || (int) Main.tile[i1, index].frameX != num7 || (int) Main.tile[i1, index].frameY != num8) + flag = true; + num8 += 18; + } + if (Main.tile[i1, num6 + 3] == null) + Main.tile[i1, num6 + 3] = new Tile(); + if (!WorldGen.SolidTileAllowBottomSlope(i1, num6 + 3) && i1 != num3 && i1 != num3 + 3) + flag = true; + num7 += 18; + } + if (!flag) + return; + WorldGen.destroyObject = true; + for (int i2 = num3; i2 < num3 + 4; ++i2) + { + for (int j1 = num6; j1 < num6 + 3; ++j1) + { + if ((int) Main.tile[i2, j1].type == type && Main.tile[i2, j1].active()) + WorldGen.KillTile(i2, j1); + } + } + int Type = 928; + switch (num2) + { + case 1: + Type = 1337; + break; + case 2: + Type = 3369; + break; + case 3: + case 4: + Type = 3664; + break; + } + Item.NewItem(i * 16, j * 16, 32, 32, Type); + WorldGen.destroyObject = false; + for (int i3 = num3; i3 < num3 + 4; ++i3) + { + for (int j2 = num6; j2 < num6 + 3; ++j2) + WorldGen.TileFrame(i3, j2); + } + } + + public static void PlaceCannon(int x, int y, ushort type, int style = 0) + { + if (x < 5 || x > Main.maxTilesX - 5 || y < 5 || y > Main.maxTilesY - 5) + return; + bool flag = true; + for (int i = x - 1; i < x + 3; ++i) + { + for (int index = y - 2; index < y + 1; ++index) + { + if (Main.tile[i, index] == null) + Main.tile[i, index] = new Tile(); + if (Main.tile[i, index].active()) + flag = false; + } + if (Main.tile[i, y + 1] == null) + Main.tile[i, y + 1] = new Tile(); + if (!WorldGen.SolidTile2(i, y + 1) && i != x - 1 && i != x + 2) + flag = false; + } + int num1 = 72 * style; + int num2 = 0; + if (!flag) + return; + Main.tile[x - 1, y - 2].active(true); + Main.tile[x - 1, y - 2].frameY = (short) num2; + Main.tile[x - 1, y - 2].frameX = (short) num1; + Main.tile[x - 1, y - 2].type = type; + Main.tile[x, y - 2].active(true); + Main.tile[x, y - 2].frameY = (short) num2; + Main.tile[x, y - 2].frameX = (short) (18 + num1); + Main.tile[x, y - 2].type = type; + Main.tile[x + 1, y - 2].active(true); + Main.tile[x + 1, y - 2].frameY = (short) num2; + Main.tile[x + 1, y - 2].frameX = (short) (36 + num1); + Main.tile[x + 1, y - 2].type = type; + Main.tile[x + 2, y - 2].active(true); + Main.tile[x + 2, y - 2].frameY = (short) num2; + Main.tile[x + 2, y - 2].frameX = (short) (54 + num1); + Main.tile[x + 2, y - 2].type = type; + Main.tile[x - 1, y - 1].active(true); + Main.tile[x - 1, y - 1].frameY = (short) (num2 + 18); + Main.tile[x - 1, y - 1].frameX = (short) num1; + Main.tile[x - 1, y - 1].type = type; + Main.tile[x, y - 1].active(true); + Main.tile[x, y - 1].frameY = (short) (num2 + 18); + Main.tile[x, y - 1].frameX = (short) (18 + num1); + Main.tile[x, y - 1].type = type; + Main.tile[x + 1, y - 1].active(true); + Main.tile[x + 1, y - 1].frameY = (short) (num2 + 18); + Main.tile[x + 1, y - 1].frameX = (short) (36 + num1); + Main.tile[x + 1, y - 1].type = type; + Main.tile[x + 2, y - 1].active(true); + Main.tile[x + 2, y - 1].frameY = (short) (num2 + 18); + Main.tile[x + 2, y - 1].frameX = (short) (54 + num1); + Main.tile[x + 2, y - 1].type = type; + Main.tile[x - 1, y].active(true); + Main.tile[x - 1, y].frameY = (short) (num2 + 36); + Main.tile[x - 1, y].frameX = (short) num1; + Main.tile[x - 1, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameY = (short) (num2 + 36); + Main.tile[x, y].frameX = (short) (18 + num1); + Main.tile[x, y].type = type; + Main.tile[x + 1, y].active(true); + Main.tile[x + 1, y].frameY = (short) (num2 + 36); + Main.tile[x + 1, y].frameX = (short) (36 + num1); + Main.tile[x + 1, y].type = type; + Main.tile[x + 2, y].active(true); + Main.tile[x + 2, y].frameY = (short) (num2 + 36); + Main.tile[x + 2, y].frameX = (short) (54 + num1); + Main.tile[x + 2, y].type = type; + } + + public static void SwitchMB(int i, int j) + { + int num1 = (int) Main.tile[i, j].frameY / 18; + while (num1 >= 2) + num1 -= 2; + int num2 = (int) Main.tile[i, j].frameX / 18; + if (num2 >= 2) + num2 -= 2; + int num3 = i - num2; + int num4 = j - num1; + for (int index1 = num3; index1 < num3 + 2; ++index1) + { + for (int index2 = num4; index2 < num4 + 2; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (Main.tile[index1, index2].active() && (Main.tile[index1, index2].type == (ushort) 139 || Main.tile[index1, index2].type == (ushort) 35)) + { + if (Main.tile[index1, index2].frameX < (short) 36) + Main.tile[index1, index2].frameX += (short) 36; + else + Main.tile[index1, index2].frameX -= (short) 36; + } + } + } + if (Wiring.running) + { + Wiring.SkipWire(num3, num4); + Wiring.SkipWire(num3 + 1, num4); + Wiring.SkipWire(num3, num4 + 1); + Wiring.SkipWire(num3 + 1, num4 + 1); + } + NetMessage.SendTileSquare(-1, num3, num4, 3); + } + + public static void SwitchMonolith(int i, int j) + { + int num1 = (int) Main.tile[i, j].frameX / 18; + while (num1 >= 2) + num1 -= 2; + int num2 = (int) Main.tile[i, j].frameY / 18; + if (num2 >= 3) + num2 -= 3; + int num3 = i - num1; + int y = j - num2; + for (int index1 = num3; index1 < num3 + 2; ++index1) + { + for (int index2 = y; index2 < y + 3; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (Main.tile[index1, index2].active()) + { + if (Main.tile[index1, index2].type == (ushort) 410) + { + if (Main.tile[index1, index2].frameY < (short) 56) + Main.tile[index1, index2].frameY += (short) 56; + else + Main.tile[index1, index2].frameY -= (short) 56; + } + else if (Main.tile[index1, index2].type == (ushort) 480) + { + if (Main.tile[index1, index2].frameY < (short) 54) + Main.tile[index1, index2].frameY += (short) 54; + else + Main.tile[index1, index2].frameY -= (short) 54; + } + else if (Main.tile[index1, index2].type == (ushort) 509) + { + if (Main.tile[index1, index2].frameY < (short) 54) + Main.tile[index1, index2].frameY += (short) 54; + else + Main.tile[index1, index2].frameY -= (short) 54; + } + } + } + } + if (Wiring.running) + { + Wiring.SkipWire(num3, y); + Wiring.SkipWire(num3, y + 1); + Wiring.SkipWire(num3, y + 2); + Wiring.SkipWire(num3 + 1, y); + Wiring.SkipWire(num3 + 1, y + 1); + Wiring.SkipWire(num3 + 1, y + 2); + } + NetMessage.SendTileSquare(-1, num3, y + 1, 3); + } + + public static void SwitchFountain(int i, int j) + { + int num1 = (int) Main.tile[i, j].frameX / 18; + while (num1 >= 2) + num1 -= 2; + int num2 = (int) Main.tile[i, j].frameY / 18; + if (num2 >= 4) + num2 -= 4; + int num3 = i - num1; + int y = j - num2; + for (int index1 = num3; index1 < num3 + 2; ++index1) + { + for (int index2 = y; index2 < y + 4; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 207) + { + if (Main.tile[index1, index2].frameY < (short) 72) + Main.tile[index1, index2].frameY += (short) 72; + else + Main.tile[index1, index2].frameY -= (short) 72; + } + } + } + if (Wiring.running) + { + Wiring.SkipWire(num3, y); + Wiring.SkipWire(num3, y + 1); + Wiring.SkipWire(num3, y + 2); + Wiring.SkipWire(num3, y + 3); + Wiring.SkipWire(num3 + 1, y); + Wiring.SkipWire(num3 + 1, y + 1); + Wiring.SkipWire(num3 + 1, y + 2); + Wiring.SkipWire(num3 + 1, y + 3); + } + NetMessage.SendTileSquare(-1, num3, y + 1, 4); + } + + public static void CheckMB(int i, int j, int type) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int num1 = 0; + int num2; + for (num2 = (int) Main.tile[i, j].frameY / 18; num2 >= 2; num2 -= 2) + ++num1; + int num3 = (int) Main.tile[i, j].frameX / 18; + int num4 = 0; + if (num3 >= 2) + { + num3 -= 2; + ++num4; + } + int num5 = i - num3; + int num6 = j - num2; + for (int index1 = num5; index1 < num5 + 2; ++index1) + { + for (int index2 = num6; index2 < num6 + 2; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (!Main.tile[index1, index2].active() || (int) Main.tile[index1, index2].type != type || (int) Main.tile[index1, index2].frameX != (index1 - num5) * 18 + num4 * 36 || (int) Main.tile[index1, index2].frameY != (index2 - num6) * 18 + num1 * 36) + flag = true; + } + if (!Main.tile[index1, num6 + 2].nactive()) + flag = true; + else if (!Main.tileSolid[(int) Main.tile[index1, num6 + 2].type] && !Main.tileTable[(int) Main.tile[index1, num6 + 2].type]) + flag = true; + } + if (!flag) + return; + WorldGen.destroyObject = true; + for (int i1 = num5; i1 < num5 + 2; ++i1) + { + for (int j1 = num6; j1 < num6 + 3; ++j1) + { + if ((int) Main.tile[i1, j1].type == type && Main.tile[i1, j1].active()) + WorldGen.KillTile(i1, j1); + } + } + if (type == 35) + Item.NewItem(i * 16, j * 16, 32, 32, 1813); + else if (num1 == 28) + Item.NewItem(i * 16, j * 16, 32, 32, 1963); + else if (num1 == 29) + Item.NewItem(i * 16, j * 16, 32, 32, 1964); + else if (num1 == 30) + Item.NewItem(i * 16, j * 16, 32, 32, 1965); + else if (num1 == 31) + Item.NewItem(i * 16, j * 16, 32, 32, 2742); + else if (num1 == 32) + Item.NewItem(i * 16, j * 16, 32, 32, 3044); + else if (num1 == 33) + Item.NewItem(i * 16, j * 16, 32, 32, 3235); + else if (num1 == 34) + Item.NewItem(i * 16, j * 16, 32, 32, 3236); + else if (num1 == 35) + Item.NewItem(i * 16, j * 16, 32, 32, 3237); + else if (num1 == 36) + Item.NewItem(i * 16, j * 16, 32, 32, 3370); + else if (num1 == 37) + Item.NewItem(i * 16, j * 16, 32, 32, 3371); + else if (num1 == 38) + Item.NewItem(i * 16, j * 16, 32, 32, 3796); + else if (num1 == 39) + Item.NewItem(i * 16, j * 16, 32, 32, 3869); + else if (num1 == 43) + Item.NewItem(i * 16, j * 16, 32, 32, 4077); + else if (num1 == 41) + Item.NewItem(i * 16, j * 16, 32, 32, 4078); + else if (num1 == 42) + Item.NewItem(i * 16, j * 16, 32, 32, 4079); + else if (num1 == 44) + Item.NewItem(i * 16, j * 16, 32, 32, 4080); + else if (num1 == 45) + Item.NewItem(i * 16, j * 16, 32, 32, 4081); + else if (num1 == 40) + Item.NewItem(i * 16, j * 16, 32, 32, 4082); + else if (num1 == 46) + Item.NewItem(i * 16, j * 16, 32, 32, 4237); + else if (num1 == 47) + Item.NewItem(i * 16, j * 16, 32, 32, 4356); + else if (num1 == 48) + Item.NewItem(i * 16, j * 16, 32, 32, 4357); + else if (num1 == 49) + Item.NewItem(i * 16, j * 16, 32, 32, 4358); + else if (num1 == 50) + Item.NewItem(i * 16, j * 16, 32, 32, 4421); + else if (num1 == 51) + Item.NewItem(i * 16, j * 16, 32, 32, 4606); + else if (num1 == 52) + Item.NewItem(i * 16, j * 16, 32, 32, 4979); + else if (num1 == 53) + Item.NewItem(i * 16, j * 16, 32, 32, 4985); + else if (num1 == 54) + Item.NewItem(i * 16, j * 16, 32, 32, 4990); + else if (num1 == 55) + Item.NewItem(i * 16, j * 16, 32, 32, 4991); + else if (num1 == 56) + Item.NewItem(i * 16, j * 16, 32, 32, 4992); + else if (num1 == 57) + Item.NewItem(i * 16, j * 16, 32, 32, 5006); + else if (num1 == 58) + Item.NewItem(i * 16, j * 16, 32, 32, 5014); + else if (num1 == 59) + Item.NewItem(i * 16, j * 16, 32, 32, 5015); + else if (num1 == 60) + Item.NewItem(i * 16, j * 16, 32, 32, 5016); + else if (num1 == 61) + Item.NewItem(i * 16, j * 16, 32, 32, 5017); + else if (num1 == 62) + Item.NewItem(i * 16, j * 16, 32, 32, 5018); + else if (num1 == 63) + Item.NewItem(i * 16, j * 16, 32, 32, 5019); + else if (num1 == 64) + Item.NewItem(i * 16, j * 16, 32, 32, 5020); + else if (num1 == 65) + Item.NewItem(i * 16, j * 16, 32, 32, 5021); + else if (num1 == 66) + Item.NewItem(i * 16, j * 16, 32, 32, 5022); + else if (num1 == 67) + Item.NewItem(i * 16, j * 16, 32, 32, 5023); + else if (num1 == 68) + Item.NewItem(i * 16, j * 16, 32, 32, 5024); + else if (num1 == 69) + Item.NewItem(i * 16, j * 16, 32, 32, 5025); + else if (num1 == 70) + Item.NewItem(i * 16, j * 16, 32, 32, 5026); + else if (num1 == 71) + Item.NewItem(i * 16, j * 16, 32, 32, 5027); + else if (num1 == 72) + Item.NewItem(i * 16, j * 16, 32, 32, 5028); + else if (num1 == 73) + Item.NewItem(i * 16, j * 16, 32, 32, 5029); + else if (num1 == 74) + Item.NewItem(i * 16, j * 16, 32, 32, 5030); + else if (num1 == 75) + Item.NewItem(i * 16, j * 16, 32, 32, 5031); + else if (num1 == 76) + Item.NewItem(i * 16, j * 16, 32, 32, 5032); + else if (num1 == 77) + Item.NewItem(i * 16, j * 16, 32, 32, 5033); + else if (num1 == 78) + Item.NewItem(i * 16, j * 16, 32, 32, 5034); + else if (num1 == 79) + Item.NewItem(i * 16, j * 16, 32, 32, 5035); + else if (num1 == 80) + Item.NewItem(i * 16, j * 16, 32, 32, 5036); + else if (num1 == 81) + Item.NewItem(i * 16, j * 16, 32, 32, 5037); + else if (num1 == 82) + Item.NewItem(i * 16, j * 16, 32, 32, 5038); + else if (num1 == 83) + Item.NewItem(i * 16, j * 16, 32, 32, 5039); + else if (num1 == 84) + Item.NewItem(i * 16, j * 16, 32, 32, 5040); + else if (num1 == 85) + Item.NewItem(i * 16, j * 16, 32, 32, 5044); + else if (num1 >= 13) + Item.NewItem(i * 16, j * 16, 32, 32, 1596 + num1 - 13); + else + Item.NewItem(i * 16, j * 16, 32, 32, 562 + num1); + for (int i2 = num5 - 1; i2 < num5 + 3; ++i2) + { + for (int j2 = num6 - 1; j2 < num6 + 3; ++j2) + WorldGen.TileFrame(i2, j2); + } + WorldGen.destroyObject = false; + } + + public static void PlaceMB(int X, int y, ushort type, int style) + { + int index1 = X + 1; + if (index1 < 5 || index1 > Main.maxTilesX - 5 || y < 5 || y > Main.maxTilesY - 5) + return; + bool flag = true; + for (int index2 = index1 - 1; index2 < index1 + 1; ++index2) + { + for (int index3 = y - 1; index3 < y + 1; ++index3) + { + if (Main.tile[index2, index3] == null) + Main.tile[index2, index3] = new Tile(); + if (Main.tile[index2, index3].active()) + flag = false; + } + if (Main.tile[index2, y + 1] == null) + Main.tile[index2, y + 1] = new Tile(); + if (!Main.tile[index2, y + 1].active() || Main.tile[index2, y + 1].halfBrick() || !Main.tileSolid[(int) Main.tile[index2, y + 1].type] && !Main.tileTable[(int) Main.tile[index2, y + 1].type]) + flag = false; + } + if (!flag) + return; + Main.tile[index1 - 1, y - 1].active(true); + Main.tile[index1 - 1, y - 1].frameY = (short) (style * 36); + Main.tile[index1 - 1, y - 1].frameX = (short) 0; + Main.tile[index1 - 1, y - 1].type = type; + Main.tile[index1, y - 1].active(true); + Main.tile[index1, y - 1].frameY = (short) (style * 36); + Main.tile[index1, y - 1].frameX = (short) 18; + Main.tile[index1, y - 1].type = type; + Main.tile[index1 - 1, y].active(true); + Main.tile[index1 - 1, y].frameY = (short) (style * 36 + 18); + Main.tile[index1 - 1, y].frameX = (short) 0; + Main.tile[index1 - 1, y].type = type; + Main.tile[index1, y].active(true); + Main.tile[index1, y].frameY = (short) (style * 36 + 18); + Main.tile[index1, y].frameX = (short) 18; + Main.tile[index1, y].type = type; + } + + public static void Place2x2(int x, int y, ushort type, int style) + { + if (type == (ushort) 95 || type == (ushort) 126) + ++y; + if (x < 5 || x > Main.maxTilesX - 5 || y < 5 || y > Main.maxTilesY - 5) + return; + if (type == (ushort) 172) + { + if (!WorldGen.CanPlaceSink(x, y, type, style)) + return; + } + else + { + for (int i = x - 1; i < x + 1; ++i) + { + for (int j = y - 1; j < y + 1; ++j) + { + Tile tileSafely = Framing.GetTileSafely(i, j); + if (tileSafely.active() || type == (ushort) 98 && tileSafely.liquid > (byte) 0) + return; + } + switch (type) + { + case 95: + case 126: + Tile tileSafely1 = Framing.GetTileSafely(i, y - 2); + if (!tileSafely1.nactive() || !Main.tileSolid[(int) tileSafely1.type] || Main.tileSolidTop[(int) tileSafely1.type]) + return; + continue; + case 132: + continue; + default: + Tile tileSafely2 = Framing.GetTileSafely(i, y + 1); + if (!tileSafely2.nactive() || !WorldGen.SolidTile2(tileSafely2) && !Main.tileTable[(int) tileSafely2.type]) + return; + continue; + } + } + } + if (type == (ushort) 132) + { + bool flag = true; + if (Main.tile[x - 1, y + 1] == null) + Main.tile[x - 1, y + 1] = new Tile(); + if (Main.tile[x, y + 1] == null) + Main.tile[x, y + 1] = new Tile(); + if (!Main.tile[x - 1, y + 1].nactive() || !WorldGen.SolidTile2(x - 1, y + 1) && !Main.tileTable[(int) Main.tile[x - 1, y + 1].type]) + flag = false; + if (!Main.tile[x, y + 1].nactive() || !WorldGen.SolidTile2(x, y + 1) && !Main.tileTable[(int) Main.tile[x, y + 1].type]) + flag = false; + if (!flag && (Main.tile[x - 1, y - 1].wall < (ushort) 1 || Main.tile[x, y - 1].wall < (ushort) 1 || Main.tile[x - 1, y].wall < (ushort) 1 || Main.tile[x - 1, y].wall < (ushort) 1)) + return; + } + --x; + --y; + int num = type == (ushort) 172 ? 38 : 36; + for (int index1 = 0; index1 < 2; ++index1) + { + for (int index2 = 0; index2 < 2; ++index2) + { + Tile tile = Main.tile[x + index1, y + index2]; + tile.active(true); + tile.frameX = (short) (index1 * 18); + tile.frameY = (short) (style * num + index2 * 18); + tile.type = type; + } + } + } + + public static bool PlaceObject( + int x, + int y, + int type, + bool mute = false, + int style = 0, + int alternate = 0, + int random = -1, + int direction = -1) + { + TileObject objectData; + if (type >= 623 || !TileObject.CanPlace(x, y, type, style, direction, out objectData)) + return false; + objectData.random = random; + if (TileObject.Place(objectData) && !mute) + { + WorldGen.SquareTileFrame(x, y); + SoundEngine.PlaySound(0, x * 16, y * 16); + } + return true; + } + + public static bool ShiftTrapdoor(int x, int y, bool playerAbove, int onlyCloseOrOpen = -1) + { + Tile tileSafely1 = Framing.GetTileSafely(x, y); + if (tileSafely1.type == (ushort) 386 && onlyCloseOrOpen != 1) + { + Point topLeftAndStyles = WorldGen.GetTopLeftAndStyles(ref x, ref y, 2, 2, 18, 18); + if (topLeftAndStyles.X == 0) + { + if (Main.netMode != 1 && Wiring.running) + { + Wiring.SkipWire(x, y); + Wiring.SkipWire(x, y + 1); + Wiring.SkipWire(x + 1, y); + Wiring.SkipWire(x + 1, y + 1); + } + if (!Collision.EmptyTile(x, y + 1, true) || !Collision.EmptyTile(x + 1, y + 1, true)) + return false; + SoundEngine.PlaySound(8, x * 16 + 16, y * 16 + 16); + for (int index = 0; index < 2; ++index) + Framing.GetTileSafely(x + index, y).ClearTile(); + for (int index = 0; index < 2; ++index) + { + Tile tileSafely2 = Framing.GetTileSafely(x + index, y + 1); + tileSafely2.type = (ushort) 387; + tileSafely2.frameX = (short) (index * 18); + tileSafely2.frameY = (short) (topLeftAndStyles.Y * 18); + } + for (int index1 = -1; index1 < 3; ++index1) + { + for (int index2 = 0; index2 < 3; ++index2) + WorldGen.TileFrame(x + index1, y + index2); + } + return true; + } + if (topLeftAndStyles.X == 1) + { + if (Main.netMode != 1 && Wiring.running) + { + Wiring.SkipWire(x, y - 1); + Wiring.SkipWire(x, y); + Wiring.SkipWire(x + 1, y - 1); + Wiring.SkipWire(x + 1, y); + } + if (!Collision.EmptyTile(x, y, true) || !Collision.EmptyTile(x + 1, y, true)) + return false; + SoundEngine.PlaySound(8, x * 16 + 16, y * 16); + for (int index = 0; index < 2; ++index) + Framing.GetTileSafely(x + index, y + 1).ClearTile(); + for (int index = 0; index < 2; ++index) + { + Tile tileSafely3 = Framing.GetTileSafely(x + index, y); + tileSafely3.type = (ushort) 387; + tileSafely3.frameX = (short) (index * 18); + tileSafely3.frameY = (short) (topLeftAndStyles.Y * 18); + } + for (int index3 = -1; index3 < 3; ++index3) + { + for (int index4 = -1; index4 < 2; ++index4) + WorldGen.TileFrame(x + index3, y + index4); + } + return true; + } + } + if (tileSafely1.type == (ushort) 387 && onlyCloseOrOpen != 0) + { + WorldGen.GetTopLeftAndStyles(ref x, ref y, 2, 1, 18, 18); + int directionInt = playerAbove.ToDirectionInt(); + for (int index = 0; index < 2; ++index) + { + Tile tileSafely4 = Framing.GetTileSafely(x + index, y + directionInt); + if (tileSafely4.active() && !Main.tileCut[(int) tileSafely4.type]) + return false; + } + if (Main.netMode != 1 && Wiring.running) + { + Wiring.SkipWire(x, y); + Wiring.SkipWire(x, y + directionInt); + Wiring.SkipWire(x + 1, y); + Wiring.SkipWire(x + 1, y + directionInt); + } + SoundEngine.PlaySound(8, x * 16 + 16, y * 16); + for (int index = 0; index < 2; ++index) + { + Tile tileSafely5 = Framing.GetTileSafely(x + index, y + directionInt); + if (tileSafely5.active() && Main.tileCut[(int) tileSafely5.type]) + WorldGen.KillTile(x + index, y + directionInt); + } + for (int index5 = 0; index5 < 2; ++index5) + { + byte color = Framing.GetTileSafely(x + index5, y).color(); + for (int index6 = 0; index6 < 2; ++index6) + { + Tile tileSafely6 = Framing.GetTileSafely(x + index5, y + index6 - (!playerAbove).ToInt()); + tileSafely6.type = (ushort) 386; + tileSafely6.frameX = (short) (index5 * 18 + playerAbove.ToInt() * 36); + tileSafely6.frameY = (short) (index6 * 18); + tileSafely6.color(color); + tileSafely6.active(true); + } + } + for (int index7 = -1; index7 < 3; ++index7) + { + for (int index8 = -1; index8 < 3; ++index8) + WorldGen.TileFrame(x + index7, y + index8 - (!playerAbove).ToInt() * 2); + } + return true; + } + SoundEngine.PlaySound(9, x * 16, y * 16); + return false; + } + + public static void CheckTrapDoor(int x, int y, int type) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int w = 0; + int h = 0; + Point point = new Point(); + if (type == 387) + { + w = 2; + h = 1; + point = WorldGen.GetTopLeftAndStyles(ref x, ref y, w, h, 18, 18); + flag = flag || !WorldGen.CheckTileFrames(type, x, y, w, h, point.X, 18, point.Y, 18) || !WorldGen.CheckTileAnchors(x, y, w, h, 1, AnchorType.SolidTile); + } + if (type == 386) + { + w = 2; + h = 2; + point = WorldGen.GetTopLeftAndStyles(ref x, ref y, w, h, 18, 18); + flag = flag || !WorldGen.CheckTileFrames(type, x, y, w, h, point.X, 18, point.Y, 18); + if (point.X == 0) + flag = flag || !WorldGen.CheckTileAnchors(x, y + 1, w, 1, 1, AnchorType.SolidTile); + else if (point.X == 1) + flag = flag || !WorldGen.CheckTileAnchors(x, y, w, 1, 1, AnchorType.SolidTile); + } + if (!flag) + return; + WorldGen.destroyObject = true; + for (int i = x; i < x + w; ++i) + { + for (int j = y; j < y + h; ++j) + WorldGen.KillTile(i, j); + } + int Type = 3239; + if (point.Y == 0) + Type = 3239; + Item.NewItem(x * 16, y * 16, w * 16, h * 16, Type); + for (int i = x - 1; i < x + w + 1; ++i) + { + for (int j = y - 1; j < y + h + 1; ++j) + WorldGen.TileFrame(i, j); + } + WorldGen.destroyObject = false; + } + + public static void CheckTallGate(int x, int y, int type) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + Tile tileSafely1 = Framing.GetTileSafely(x, y); + Point point = new Point((int) tileSafely1.frameX / 18, 0); + TileObjectData tileData = TileObjectData.GetTileData(type, point.X); + point.Y = (int) tileSafely1.frameY / tileData.CoordinateFullHeight; + int width = tileData.Width; + int height = tileData.Height; + int index1 = 0; + for (int index2 = (int) tileSafely1.frameY % tileData.CoordinateFullHeight; index1 < height && index2 - tileData.CoordinateHeights[index1] >= 0; ++index1) + index2 -= tileData.CoordinateHeights[index1]; + int coordinateFullHeight = tileData.CoordinateFullHeight; + y -= index1; + int num = point.Y * tileData.CoordinateFullHeight; + for (int index3 = 0; index3 < height; ++index3) + { + Tile tileSafely2 = Framing.GetTileSafely(x, y + index3); + if ((int) tileSafely2.frameX != point.X * tileData.CoordinateFullWidth || (int) tileSafely2.frameY != num) + { + flag = true; + break; + } + num += tileData.CoordinateHeights[index3] + tileData.CoordinatePadding; + } + if (!flag && WorldGen.CheckTileAnchors(x, y, width, height, 2, AnchorType.SolidTile)) + return; + WorldGen.destroyObject = true; + for (int i = x; i < x + width; ++i) + { + for (int j = y; j < y + height; ++j) + WorldGen.KillTile(i, j); + } + int Type = 3240; + if (point.Y == 0) + Type = 3240; + Item.NewItem(x * 16, y * 16, width * 16, height * 16, Type); + for (int i = x - 1; i < x + width + 1; ++i) + { + for (int j = y - 1; j < y + height + 1; ++j) + WorldGen.TileFrame(i, j); + } + WorldGen.destroyObject = false; + } + + public static bool ShiftTallGate(int x, int y, bool closing, bool forced = false) + { + ushort num1 = closing ? (ushort) 388 : (ushort) 389; + ushort num2 = closing ? (ushort) 389 : (ushort) 388; + Tile tileSafely = Framing.GetTileSafely(x, y); + if ((int) tileSafely.type != (int) num2) + return false; + Point point = new Point((int) tileSafely.frameX / 18, 0); + TileObjectData tileData = TileObjectData.GetTileData(388, point.X); + point.Y = (int) tileSafely.frameY / tileData.CoordinateFullHeight; + int width = tileData.Width; + int height = tileData.Height; + int index1 = 0; + for (int index2 = (int) tileSafely.frameY % tileData.CoordinateFullHeight; index1 < height && index2 - tileData.CoordinateHeights[index1] >= 0; ++index1) + index2 -= tileData.CoordinateHeights[index1]; + int coordinateFullHeight = tileData.CoordinateFullHeight; + y -= index1; + if (Main.netMode != 1 && Wiring.running) + { + for (int index3 = 0; index3 < height; ++index3) + Wiring.SkipWire(x, y + index3); + } + for (int index4 = 0; index4 < height; ++index4) + { + if (!forced && !Collision.EmptyTile(x, y + index4, true)) + return false; + } + SoundEngine.PlaySound(8, x * 16 + 16, y * 16 + 16); + for (int index5 = 0; index5 < height; ++index5) + Framing.GetTileSafely(x, y + index5).type = num1; + for (int index6 = -1; index6 < 2; ++index6) + { + for (int index7 = -1; index7 < height + 1; ++index7) + WorldGen.TileFrame(x + index6, y + index7); + } + return true; + } + + public static Point GetTopLeftAndStyles( + ref int x, + ref int y, + int w, + int h, + int frameXinc, + int frameYinc) + { + Tile tileSafely = Framing.GetTileSafely(x, y); + Point point = new Point((int) tileSafely.frameX / (w * frameXinc), (int) tileSafely.frameY / (h * frameYinc)); + if (frameXinc != 0) + x -= (int) tileSafely.frameX / frameXinc % w; + if (frameYinc == 0) + return point; + y -= (int) tileSafely.frameY / frameYinc % h; + return point; + } + + public static bool CheckTileFrames( + int type, + int sx, + int sy, + int w, + int h, + int styleX, + int frameXinc, + int styleY, + int frameYinc) + { + for (int index1 = 0; index1 < w; ++index1) + { + for (int index2 = 0; index2 < h; ++index2) + { + Tile tileSafely = Framing.GetTileSafely(sx + index1, sy + index2); + if (!tileSafely.active() || (int) tileSafely.type != type || (int) tileSafely.frameX != styleX * w * frameXinc + index1 * frameXinc || (int) tileSafely.frameY != styleY * h * frameYinc + index2 * frameYinc) + return false; + } + } + return true; + } + + public static bool CheckTileAnchors( + int sx, + int sy, + int w, + int h, + int mode, + AnchorType anchor) + { + if ((mode & 1) == 1) + { + for (int j = sy; j < sy + h; ++j) + { + if (!WorldGen.AnchorValid(Framing.GetTileSafely(sx - 1, j), anchor) || !WorldGen.AnchorValid(Framing.GetTileSafely(sx + w, j), anchor)) + return false; + } + } + if ((mode & 2) == 2) + { + for (int i = sx; i < sx + w; ++i) + { + if (!WorldGen.AnchorValid(Framing.GetTileSafely(i, sy - 1), anchor) || !WorldGen.AnchorValid(Framing.GetTileSafely(i, sy + h), anchor)) + return false; + } + } + return true; + } + + public static bool AnchorValid(Tile tileCache, AnchorType anchor) + { + bool flag = false; + if (tileCache.nactive()) + { + if ((anchor & AnchorType.SolidTile) == AnchorType.SolidTile && Main.tileSolid[(int) tileCache.type] && !Main.tileSolidTop[(int) tileCache.type] && !Main.tileNoAttach[(int) tileCache.type] && tileCache.blockType() == 0) + flag = true; + if ((anchor & AnchorType.SolidBottom) == AnchorType.SolidBottom && (Main.tileSolid[(int) tileCache.type] && (!Main.tileSolidTop[(int) tileCache.type] || TileID.Sets.Platforms[(int) tileCache.type] && (tileCache.halfBrick() || tileCache.topSlope())) || tileCache.topSlope() || tileCache.halfBrick()) && !TileID.Sets.NotReallySolid[(int) tileCache.type] && !tileCache.bottomSlope()) + flag = true; + if (!flag && ((anchor & AnchorType.SolidWithTop) == AnchorType.SolidWithTop || (anchor & AnchorType.Table) == AnchorType.Table)) + { + if (TileID.Sets.Platforms[(int) tileCache.type]) + { + int num = (int) tileCache.frameX / TileObjectData.PlatformFrameWidth(); + if (!tileCache.halfBrick() && num >= 0 && num <= 7 || num >= 12 && num <= 16 || num >= 25 && num <= 26) + flag = true; + } + else if (Main.tileSolid[(int) tileCache.type] && Main.tileSolidTop[(int) tileCache.type]) + flag = true; + } + if (!flag && (anchor & AnchorType.Table) == AnchorType.Table && !TileID.Sets.Platforms[(int) tileCache.type] && Main.tileTable[(int) tileCache.type] && tileCache.blockType() == 0) + flag = true; + if (!flag && (anchor & AnchorType.SolidSide) == AnchorType.SolidSide && Main.tileSolid[(int) tileCache.type] && !Main.tileSolidTop[(int) tileCache.type]) + { + switch (tileCache.blockType()) + { + case 4: + case 5: + flag = true; + break; + } + } + } + else if (!flag && (anchor & AnchorType.EmptyTile) == AnchorType.EmptyTile) + flag = true; + return flag; + } + + public static bool CanPlaceSink(int x, int y, ushort type, int style) + { + if (x < 5 || x > Main.maxTilesX - 5 || y < 5 || y > Main.maxTilesY - 5) + return false; + bool flag = true; + --x; + --y; + for (int index1 = 0; index1 < 2; ++index1) + { + for (int index2 = 0; index2 < 2; ++index2) + { + if (Framing.GetTileSafely(x + index1, y + index2).active()) + flag = false; + } + Tile tileSafely = Framing.GetTileSafely(x + index1, y + 2); + if (!tileSafely.nactive() || !WorldGen.SolidTile(tileSafely)) + flag = false; + } + return flag; + } + + public static void Place3x4(int x, int y, ushort type, int style) + { + if (x < 5 || x > Main.maxTilesX - 5 || y < 5 || y > Main.maxTilesY - 5) + return; + bool flag = true; + for (int i = x - 1; i < x + 2; ++i) + { + for (int index = y - 3; index < y + 1; ++index) + { + if (Main.tile[i, index] == null) + Main.tile[i, index] = new Tile(); + if (Main.tile[i, index].active()) + flag = false; + } + if (Main.tile[i, y + 1] == null) + Main.tile[i, y + 1] = new Tile(); + if (!WorldGen.SolidTile2(i, y + 1)) + flag = false; + } + if (!flag) + return; + int num1 = style * 54; + for (int index = -3; index <= 0; ++index) + { + short num2 = (short) ((3 + index) * 18); + Main.tile[x - 1, y + index].active(true); + Main.tile[x - 1, y + index].frameY = num2; + Main.tile[x - 1, y + index].frameX = (short) num1; + Main.tile[x - 1, y + index].type = type; + Main.tile[x, y + index].active(true); + Main.tile[x, y + index].frameY = num2; + Main.tile[x, y + index].frameX = (short) (num1 + 18); + Main.tile[x, y + index].type = type; + Main.tile[x + 1, y + index].active(true); + Main.tile[x + 1, y + index].frameY = num2; + Main.tile[x + 1, y + index].frameX = (short) (num1 + 36); + Main.tile[x + 1, y + index].type = type; + } + } + + public static void Place5x4(int x, int y, ushort type, int style) + { + if (x < 5 || x > Main.maxTilesX - 5 || y < 5 || y > Main.maxTilesY - 5) + return; + bool flag = true; + for (int i = x - 2; i < x + 3; ++i) + { + for (int index = y - 3; index < y + 1; ++index) + { + if (Main.tile[i, index] == null) + Main.tile[i, index] = new Tile(); + if (Main.tile[i, index].active()) + flag = false; + } + if (Main.tile[i, y + 1] == null) + Main.tile[i, y + 1] = new Tile(); + if (!WorldGen.SolidTile2(i, y + 1)) + flag = false; + } + if (!flag) + return; + int num1 = style * 54; + for (int index = -3; index <= 0; ++index) + { + short num2 = (short) ((3 + index) * 18); + Main.tile[x - 2, y + index].active(true); + Main.tile[x - 2, y + index].frameY = num2; + Main.tile[x - 2, y + index].frameX = (short) (num1 - 36); + Main.tile[x - 2, y + index].type = type; + Main.tile[x - 1, y + index].active(true); + Main.tile[x - 1, y + index].frameY = num2; + Main.tile[x - 1, y + index].frameX = (short) (num1 - 18); + Main.tile[x - 1, y + index].type = type; + Main.tile[x, y + index].active(true); + Main.tile[x, y + index].frameY = num2; + Main.tile[x, y + index].frameX = (short) num1; + Main.tile[x, y + index].type = type; + Main.tile[x + 1, y + index].active(true); + Main.tile[x + 1, y + index].frameY = num2; + Main.tile[x + 1, y + index].frameX = (short) (num1 + 18); + Main.tile[x + 1, y + index].type = type; + Main.tile[x + 1, y + index].active(true); + Main.tile[x + 1, y + index].frameY = num2; + Main.tile[x + 1, y + index].frameX = (short) (num1 + 36); + Main.tile[x + 1, y + index].type = type; + } + } + + public static void Place3x1(int x, int y, ushort type, int style = 0) + { + if (x < 5 || x > Main.maxTilesX - 5 || y < 5 || y > Main.maxTilesY - 5) + return; + bool flag = true; + for (int i = x - 1; i < x + 2; ++i) + { + int index = y; + if (Main.tile[i, index] == null) + Main.tile[i, index] = new Tile(); + if (Main.tile[i, index].active()) + flag = false; + if (Main.tile[i, y + 1] == null) + Main.tile[i, y + 1] = new Tile(); + if (!WorldGen.SolidTile2(i, y + 1)) + flag = false; + } + if (!flag) + return; + short num = (short) (54 * style); + Main.tile[x - 1, y].active(true); + Main.tile[x - 1, y].frameY = (short) 0; + Main.tile[x - 1, y].frameX = num; + Main.tile[x - 1, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameY = (short) 0; + Main.tile[x, y].frameX = (short) ((int) num + 18); + Main.tile[x, y].type = type; + Main.tile[x + 1, y].active(true); + Main.tile[x + 1, y].frameY = (short) 0; + Main.tile[x + 1, y].frameX = (short) ((int) num + 36); + Main.tile[x + 1, y].type = type; + } + + public static void Place3x2(int x, int y, ushort type, int style = 0) + { + if (x < 5 || x > Main.maxTilesX - 5 || y < 5 || y > Main.maxTilesY - 5) + return; + bool flag1 = false; + bool flag2 = true; + if (type == (ushort) 14 && style == 25) + flag1 = true; + int num1 = y - 1; + if (flag1) + num1 = y; + for (int i = x - 1; i < x + 2; ++i) + { + for (int index = num1; index < y + 1; ++index) + { + if (Main.tile[i, index] == null) + Main.tile[i, index] = new Tile(); + if (Main.tile[i, index].active()) + flag2 = false; + if (type == (ushort) 215 && Main.tile[i, index].liquid > (byte) 0) + flag2 = false; + } + if (Main.tile[i, y + 1] == null) + Main.tile[i, y + 1] = new Tile(); + if (type == (ushort) 285 || type == (ushort) 286 || type == (ushort) 298 || type == (ushort) 299 || type == (ushort) 310 || type >= (ushort) 361 && type <= (ushort) 364 || type == (ushort) 582 || type == (ushort) 619) + { + if (!WorldGen.SolidTile2(i, y + 1) && (!Main.tile[i, y + 1].nactive() || !Main.tileSolidTop[(int) Main.tile[i, y + 1].type] || Main.tile[i, y + 1].frameY != (short) 0)) + flag2 = false; + } + else + { + if (type == (ushort) 26 && Main.tile[i, y + 1].type == (ushort) 484) + flag2 = false; + if (!WorldGen.SolidTile2(i, y + 1)) + flag2 = false; + } + } + if (type == (ushort) 88) + { + if (Chest.CreateChest(x - 1, y - 1) == -1) + flag2 = false; + else if (Main.netMode == 1) + NetMessage.SendData(34, number: 2, number2: ((float) x), number3: ((float) y), number4: ((float) style)); + } + if (!flag2) + return; + short num2 = (short) (54 * style); + if (flag1) + { + Main.tile[x - 1, y].active(true); + Main.tile[x - 1, y].frameY = (short) 0; + Main.tile[x - 1, y].frameX = num2; + Main.tile[x - 1, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameY = (short) 0; + Main.tile[x, y].frameX = (short) ((int) num2 + 18); + Main.tile[x, y].type = type; + Main.tile[x + 1, y].active(true); + Main.tile[x + 1, y].frameY = (short) 0; + Main.tile[x + 1, y].frameX = (short) ((int) num2 + 36); + Main.tile[x + 1, y].type = type; + } + else + { + Main.tile[x - 1, y - 1].active(true); + Main.tile[x - 1, y - 1].frameY = (short) 0; + Main.tile[x - 1, y - 1].frameX = num2; + Main.tile[x - 1, y - 1].type = type; + Main.tile[x, y - 1].active(true); + Main.tile[x, y - 1].frameY = (short) 0; + Main.tile[x, y - 1].frameX = (short) ((int) num2 + 18); + Main.tile[x, y - 1].type = type; + Main.tile[x + 1, y - 1].active(true); + Main.tile[x + 1, y - 1].frameY = (short) 0; + Main.tile[x + 1, y - 1].frameX = (short) ((int) num2 + 36); + Main.tile[x + 1, y - 1].type = type; + Main.tile[x - 1, y].active(true); + Main.tile[x - 1, y].frameY = (short) 18; + Main.tile[x - 1, y].frameX = num2; + Main.tile[x - 1, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameY = (short) 18; + Main.tile[x, y].frameX = (short) ((int) num2 + 18); + Main.tile[x, y].type = type; + Main.tile[x + 1, y].active(true); + Main.tile[x + 1, y].frameY = (short) 18; + Main.tile[x + 1, y].frameX = (short) ((int) num2 + 36); + Main.tile[x + 1, y].type = type; + } + } + + public static void Place2x2Style(int x, int y, ushort type, int style = 0) + { + if (x < 5 || x > Main.maxTilesX - 5 || y < 5 || y > Main.maxTilesY - 5) + return; + short num1 = 0; + if (type == (ushort) 254) + num1 = (short) ((int) (short) (x % 12 / 2) * 36); + bool flag = true; + for (int i = x - 1; i < x + 1; ++i) + { + for (int index = y - 1; index < y + 1; ++index) + { + if (Main.tile[i, index] == null) + Main.tile[i, index] = new Tile(); + if (Main.tile[i, index].active()) + flag = false; + } + if (Main.tile[i, y + 1] == null) + Main.tile[i, y + 1] = new Tile(); + if (!WorldGen.SolidTile(i, y + 1)) + flag = false; + if (type == (ushort) 254 && Main.tile[i, y + 1].type != (ushort) 2 && Main.tile[i, y + 1].type != (ushort) 477 && Main.tile[i, y + 1].type != (ushort) 492 && Main.tile[i, y + 1].type != (ushort) 109) + flag = false; + } + if (!flag) + return; + short num2 = (short) (36 * style); + Main.tile[x - 1, y - 1].active(true); + Main.tile[x - 1, y - 1].frameY = num1; + Main.tile[x - 1, y - 1].frameX = num2; + Main.tile[x - 1, y - 1].type = type; + Main.tile[x, y - 1].active(true); + Main.tile[x, y - 1].frameY = num1; + Main.tile[x, y - 1].frameX = (short) ((int) num2 + 18); + Main.tile[x, y - 1].type = type; + Main.tile[x - 1, y].active(true); + Main.tile[x - 1, y].frameY = (short) ((int) num1 + 18); + Main.tile[x - 1, y].frameX = num2; + Main.tile[x - 1, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameY = (short) ((int) num1 + 18); + Main.tile[x, y].frameX = (short) ((int) num2 + 18); + Main.tile[x, y].type = type; + } + + public static bool NearFriendlyWall(int x, int y) + { + try + { + if (x < 2 || x >= Main.maxTilesX - 2 || y < 2 || y >= Main.maxTilesY - 2 || Main.tile[x, y].wall == (ushort) 0 || Main.wallHouse[(int) Main.tile[x, y].wall] || Main.tile[x - 1, y].wall == (ushort) 0 || Main.wallHouse[(int) Main.tile[x - 1, y].wall] || Main.tile[x + 1, y].wall == (ushort) 0 || Main.wallHouse[(int) Main.tile[x + 1, y].wall] || Main.tile[x, y - 1].wall == (ushort) 0 || Main.wallHouse[(int) Main.tile[x, y - 1].wall] || Main.tile[x, y + 1].wall == (ushort) 0) + return true; + if (Main.wallHouse[(int) Main.tile[x, y + 1].wall]) + return true; + } + catch + { + } + return false; + } + + public static void Check2x2Style(int i, int j, int type) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int num1 = j; + int num2 = (int) Main.tile[i, j].frameY / 18; + while (num2 > 1) + num2 -= 2; + int num3 = num1 - num2; + int num4 = (int) Main.tile[i, j].frameX / 18; + int num5 = 0; + while (num4 > 1) + { + num4 -= 2; + ++num5; + } + int num6 = i - num4; + int num7 = num5 * 36; + for (int i1 = num6; i1 < num6 + 2; ++i1) + { + for (int index = num3; index < num3 + 2; ++index) + { + if (Main.tile[i1, index] == null) + Main.tile[i1, index] = new Tile(); + if (!Main.tile[i1, index].active() || (int) Main.tile[i1, index].type != type || (int) Main.tile[i1, index].frameX != (i1 - num6) * 18 + num7) + flag = true; + } + if (!WorldGen.SolidTileAllowBottomSlope(i1, num3 + 2)) + flag = true; + } + if (!flag) + return; + int frameX = (int) Main.tile[i, j].frameX; + WorldGen.destroyObject = true; + for (int i2 = num6; i2 < num6 + 2; ++i2) + { + for (int j1 = num3; j1 < num3 + 2; ++j1) + { + if (Main.tile[i2, j1] == null) + Main.tile[i2, j1] = new Tile(); + if ((int) Main.tile[i2, j1].type == type && Main.tile[i2, j1].active()) + WorldGen.KillTile(i2, j1); + } + } + switch (type) + { + case 96: + if (num5 == 0) + Item.NewItem(i * 16, j * 16, 32, 32, 345); + if (num5 == 1) + { + Item.NewItem(i * 16, j * 16, 32, 32, 1791); + break; + } + break; + case 254: + if (frameX >= 72) + { + if (frameX < 108) + { + if (WorldGen.genRand.Next(2) == 0) + { + Item.NewItem(i * 16, j * 16, 32, 32, 1725, WorldGen.genRand.Next(1, 3)); + break; + } + break; + } + if (frameX < 144) + { + Item.NewItem(i * 16, j * 16, 32, 32, 1725, WorldGen.genRand.Next(2, 6)); + break; + } + Item.NewItem(i * 16, j * 16, 32, 32, 1725, WorldGen.genRand.Next(5, 11)); + if (Main.halloween && WorldGen.genRand.Next(200) == 0) + { + Item.NewItem(i * 16, j * 16, 32, 32, 1799); + break; + } + break; + } + break; + case 441: + int Type1 = -1; + switch (num5) + { + case 0: + Type1 = 3665; + break; + case 1: + Type1 = 3666; + break; + case 3: + Type1 = 3667; + break; + case 7: + Type1 = 3668; + break; + case 8: + Type1 = 3669; + break; + case 9: + Type1 = 3670; + break; + case 10: + Type1 = 3671; + break; + case 11: + Type1 = 3672; + break; + case 12: + Type1 = 3673; + break; + case 13: + Type1 = 3674; + break; + case 14: + Type1 = 3675; + break; + case 15: + Type1 = 3676; + break; + case 16: + Type1 = 3677; + break; + case 17: + Type1 = 3678; + break; + case 18: + Type1 = 3679; + break; + case 19: + Type1 = 3680; + break; + case 20: + Type1 = 3681; + break; + case 21: + Type1 = 3682; + break; + case 22: + Type1 = 3683; + break; + case 28: + Type1 = 3684; + break; + case 29: + Type1 = 3685; + break; + case 30: + Type1 = 3686; + break; + case 31: + Type1 = 3687; + break; + case 32: + Type1 = 3688; + break; + case 33: + Type1 = 3689; + break; + case 34: + Type1 = 3690; + break; + case 35: + Type1 = 3691; + break; + case 37: + Type1 = 3692; + break; + case 39: + Type1 = 3693; + break; + case 41: + Type1 = 3694; + break; + case 42: + Type1 = 3695; + break; + case 43: + Type1 = 3696; + break; + case 44: + Type1 = 3697; + break; + case 45: + Type1 = 3698; + break; + case 46: + Type1 = 3699; + break; + case 47: + Type1 = 3700; + break; + case 48: + Type1 = 3701; + break; + case 49: + Type1 = 3702; + break; + case 50: + Type1 = 3703; + break; + case 51: + Type1 = 3704; + break; + } + if (Type1 != -1) + { + Item.NewItem(i * 16, j * 16, 32, 32, Type1); + break; + } + break; + case 457: + Item.NewItem(i * 16, j * 16, 32, 32, 3749); + break; + case 468: + int Type2 = -1; + switch (num5) + { + case 0: + Type2 = 3886; + break; + case 1: + Type2 = 3887; + break; + case 2: + Type2 = 3950; + break; + case 3: + Type2 = 3976; + break; + case 4: + Type2 = -1; + break; + case 5: + Type2 = 4164; + break; + case 6: + Type2 = 4185; + break; + case 7: + Type2 = 4206; + break; + case 8: + Type2 = 4227; + break; + case 9: + Type2 = 4266; + break; + case 10: + Type2 = 4268; + break; + case 11: + Type2 = 4585; + break; + case 12: + Type2 = 4713; + break; + } + if (Type2 != -1) + { + Item.NewItem(i * 16, j * 16, 32, 32, Type2); + break; + } + break; + } + WorldGen.destroyObject = false; + for (int i3 = num6 - 1; i3 < num6 + 3; ++i3) + { + for (int j2 = num3 - 1; j2 < num3 + 3; ++j2) + WorldGen.TileFrame(i3, j2); + } + } + + public static void PlacePumpkin(int x, int superY) + { + ushort num1 = 254; + int index1 = superY; + int num2 = WorldGen.genRand.Next(6) * 36; + if (x < 5 || x > Main.maxTilesX - 5 || index1 < 5 || index1 > Main.maxTilesY - 5) + return; + bool flag = true; + for (int i = x - 1; i < x + 1; ++i) + { + for (int index2 = index1 - 1; index2 < index1 + 1; ++index2) + { + if (Main.tile[i, index2] == null) + Main.tile[i, index2] = new Tile(); + if (Main.tile[i, index2].active() && Main.tile[i, index2].type != (ushort) 3 && Main.tile[i, index2].type != (ushort) 73 && Main.tile[i, index2].type != (ushort) 113 && Main.tile[i, index2].type != (ushort) 110 && (Main.tile[i, index2].type != (ushort) 185 || Main.tile[i, index2].frameY != (short) 0)) + flag = false; + if (Main.tile[i, index2].liquid > (byte) 0) + flag = false; + } + if (!WorldGen.SolidTile(i, index1 + 1) || Main.tile[i, index1 + 1].type != (ushort) 2 && Main.tile[i, index1 + 1].type != (ushort) 109) + flag = false; + } + if (!flag) + return; + Main.tile[x - 1, index1 - 1].active(true); + Main.tile[x - 1, index1 - 1].frameY = (short) num2; + Main.tile[x - 1, index1 - 1].frameX = (short) 0; + Main.tile[x - 1, index1 - 1].type = num1; + Main.tile[x, index1 - 1].active(true); + Main.tile[x, index1 - 1].frameY = (short) num2; + Main.tile[x, index1 - 1].frameX = (short) 18; + Main.tile[x, index1 - 1].type = num1; + Main.tile[x - 1, index1].active(true); + Main.tile[x - 1, index1].frameY = (short) (num2 + 18); + Main.tile[x - 1, index1].frameX = (short) 0; + Main.tile[x - 1, index1].type = num1; + Main.tile[x, index1].active(true); + Main.tile[x, index1].frameY = (short) (num2 + 18); + Main.tile[x, index1].frameX = (short) 18; + Main.tile[x, index1].type = num1; + } + + public static void GrowPumpkin(int i, int j, int type) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int num1 = j; + int num2 = (int) Main.tile[i, j].frameY / 18; + while (num2 > 1) + num2 -= 2; + int tileY = num1 - num2; + int num3 = (int) Main.tile[i, j].frameX / 18; + int num4 = 0; + while (num3 > 1) + { + num3 -= 2; + ++num4; + } + int tileX = i - num3; + int num5 = num4 * 36; + if (num4 >= 4) + return; + for (int i1 = tileX; i1 < tileX + 2; ++i1) + { + for (int index = tileY; index < tileY + 2; ++index) + { + if (Main.tile[i1, index] == null) + Main.tile[i1, index] = new Tile(); + if (!Main.tile[i1, index].active() || (int) Main.tile[i1, index].type != type || (int) Main.tile[i1, index].frameX != (i1 - tileX) * 18 + num5) + flag = true; + } + if (!WorldGen.SolidTile(i1, tileY + 2) || Main.tile[i1, tileY + 2].type != (ushort) 2 && Main.tile[i1, tileY + 2].type != (ushort) 477 && Main.tile[i1, tileY + 2].type != (ushort) 492 && Main.tile[i1, tileY + 2].type != (ushort) 109) + flag = true; + } + if (!flag) + { + for (int index1 = tileX; index1 < tileX + 2; ++index1) + { + for (int index2 = tileY; index2 < tileY + 2; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if ((int) Main.tile[index1, index2].type == type && Main.tile[index1, index2].active()) + Main.tile[index1, index2].frameX += (short) 36; + } + } + } + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, tileX, tileY, 4); + } + + public static void FixHearts() + { + for (int i = 0; i < Main.maxTilesX; ++i) + { + for (int j = 0; j < Main.maxTilesY; ++j) + { + Tile tile = Main.tile[i, j]; + if (tile.active() && tile.type == (ushort) 12 && tile.frameX == (short) 0 && tile.frameY == (short) 0) + WorldGen.FixHeart(i, j); + } + } + } + + public static void DestroyHeart(int i, int j) + { + WorldGen.destroyObject = true; + for (int i1 = i; i1 < i + 2; ++i1) + { + for (int j1 = j; j1 < j + 2; ++j1) + { + if (i1 < Main.maxTilesX && j1 < Main.maxTilesY) + { + Tile tile = Main.tile[i1, j1]; + if (tile.active() && tile.type == (ushort) 12) + WorldGen.KillTile(i1, j1); + } + } + } + WorldGen.destroyObject = false; + } + + public static void FixHeart(int i, int j) + { + if (i < 40 || i >= Main.maxTilesX - 40 || j < 40 || j >= Main.maxTilesY - 40) + { + WorldGen.DestroyHeart(i, j); + } + else + { + Tile tile1 = Main.tile[i, j + 2]; + Tile tile2 = Main.tile[i + 1, j + 2]; + if (tile1.active() && !Main.tileSolid[(int) tile1.type] && Main.tileCut[(int) tile1.type]) + WorldGen.KillTile(i, j + 2); + if (tile2.active() && !Main.tileSolid[(int) tile2.type] && Main.tileCut[(int) tile2.type]) + WorldGen.KillTile(i + 1, j + 2); + if (!tile1.active()) + { + if (!tile2.active()) + { + WorldGen.DestroyHeart(i, j); + return; + } + if (Main.tileSolid[(int) tile2.type]) + { + tile1.type = tile2.type; + tile1.active(true); + } + } + if (!tile2.active() && Main.tileSolid[(int) tile1.type]) + { + tile2.type = tile1.type; + tile2.active(true); + } + if (!tile1.nactive() || !Main.tileSolid[(int) tile1.type] || !tile2.nactive() || !Main.tileSolid[(int) tile2.type]) + { + WorldGen.DestroyHeart(i, j); + } + else + { + if (tile1.blockType() != 0) + { + tile1.slope((byte) 0); + tile1.halfBrick(false); + } + if (tile2.blockType() == 0) + return; + tile2.slope((byte) 0); + tile2.halfBrick(false); + } + } + } + + public static void FixChands() + { + for (int i = 5; i < Main.maxTilesX - 5; ++i) + { + for (int j = 5; j < Main.maxTilesY - 5; ++j) + { + if (Main.tile[i, j].active()) + { + int type = (int) Main.tile[i, j].type; + if (Main.tile[i, j].active() && (type == 35 || type == 36 || type == 170 || type == 171 || type == 172)) + WorldGen.FixChand(i, j); + } + } + } + } + + public static void FixChand(int i, int j) + { + int num1 = 0; + int type = (int) Main.tile[i, j].type; + if (Main.tile[i, j].active()) + { + if (type == 35) + num1 = 1; + if (type == 36) + num1 = 2; + if (type == 170) + num1 = 3; + if (type == 171) + num1 = 4; + if (type == 172) + num1 = 5; + } + if (num1 <= 0) + return; + int num2 = j; + int num3 = (int) Main.tile[i, j].frameX / 18; + while (num3 >= 3) + num3 -= 3; + if (num3 >= 3) + num3 -= 3; + int num4 = i - num3; + int num5 = num2 + (int) Main.tile[i, j].frameY / 18 * -1; + for (int index1 = num4; index1 < num4 + 3; ++index1) + { + for (int index2 = num5; index2 < num5 + 3; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (Main.tile[index1, index2].active() && (int) Main.tile[index1, index2].type == type) + { + Main.tile[index1, index2].type = (ushort) 34; + Main.tile[index1, index2].frameY += (short) (num1 * 54); + } + } + } + } + + public static void PlaceChand(int x, int y, ushort type, int style = 0) + { + bool flag = true; + int num1 = 0; + for (int index1 = x - 1; index1 < x + 2; ++index1) + { + for (int index2 = y; index2 < y + 3; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (Main.tile[index1, index2].active()) + flag = false; + } + } + if (Main.tile[x, y - 1] == null) + Main.tile[x, y - 1] = new Tile(); + if (!Main.tile[x, y - 1].nactive() || !Main.tileSolid[(int) Main.tile[x, y - 1].type] || Main.tileSolidTop[(int) Main.tile[x, y - 1].type]) + flag = false; + if (!flag) + return; + int num2 = style / 36 * 18 * 6; + int num3 = style * 18 * 3; + Main.tile[x - 1, y + num1].active(true); + Main.tile[x - 1, y + num1].frameY = (short) num3; + Main.tile[x - 1, y + num1].frameX = (short) num2; + Main.tile[x - 1, y + num1].type = type; + Main.tile[x, y + num1].active(true); + Main.tile[x, y + num1].frameY = (short) num3; + Main.tile[x, y + num1].frameX = (short) (num2 + 18); + Main.tile[x, y + num1].type = type; + Main.tile[x + 1, y + num1].active(true); + Main.tile[x + 1, y + num1].frameY = (short) num3; + Main.tile[x + 1, y + num1].frameX = (short) (num2 + 36); + Main.tile[x + 1, y + num1].type = type; + Main.tile[x - 1, y + 1 + num1].active(true); + Main.tile[x - 1, y + 1 + num1].frameY = (short) (num3 + 18); + Main.tile[x - 1, y + 1 + num1].frameX = (short) num2; + Main.tile[x - 1, y + 1 + num1].type = type; + Main.tile[x, y + 1 + num1].active(true); + Main.tile[x, y + 1 + num1].frameY = (short) (num3 + 18); + Main.tile[x, y + 1 + num1].frameX = (short) (num2 + 18); + Main.tile[x, y + 1 + num1].type = type; + Main.tile[x + 1, y + 1 + num1].active(true); + Main.tile[x + 1, y + 1 + num1].frameY = (short) (num3 + 18); + Main.tile[x + 1, y + 1 + num1].frameX = (short) (num2 + 36); + Main.tile[x + 1, y + 1 + num1].type = type; + Main.tile[x - 1, y + 2 + num1].active(true); + Main.tile[x - 1, y + 2 + num1].frameY = (short) (num3 + 36); + Main.tile[x - 1, y + 2 + num1].frameX = (short) num2; + Main.tile[x - 1, y + 2 + num1].type = type; + Main.tile[x, y + 2 + num1].active(true); + Main.tile[x, y + 2 + num1].frameY = (short) (num3 + 36); + Main.tile[x, y + 2 + num1].frameX = (short) (num2 + 18); + Main.tile[x, y + 2 + num1].type = type; + Main.tile[x + 1, y + 2 + num1].active(true); + Main.tile[x + 1, y + 2 + num1].frameY = (short) (num3 + 36); + Main.tile[x + 1, y + 2 + num1].frameX = (short) (num2 + 36); + Main.tile[x + 1, y + 2 + num1].type = type; + } + + public static void CheckChand(int i, int j, int type) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int num1 = 3; + if (type == 454) + num1 = 4; + int num2 = (int) Main.tile[i, j].frameX / 18; + int num3 = 0; + for (; num2 >= num1; num2 -= num1) + ++num3; + int num4 = i - num2; + int num5 = 18 * num1 * num3; + if (num2 >= num1) + num2 -= num1; + int num6 = i - num2; + int num7 = (int) Main.tile[i, j].frameY / 18; + int num8 = 0; + for (; num7 >= 3; num7 -= 3) + ++num8; + if (num5 >= 108) + num8 += 37 * (num5 / 108); + int num9 = 54 * num8; + if (num5 >= 108) + num9 -= 54 * (num5 / 108) * 37; + if (num7 >= 3) + num7 -= 3; + int num10 = j - num7; + for (int index1 = num6; index1 < num6 + num1; ++index1) + { + for (int index2 = num10; index2 < num10 + 3; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (!Main.tile[index1, index2].active() || (int) Main.tile[index1, index2].type != type || (int) Main.tile[index1, index2].frameX != (index1 - num4) * 18 + num5 || (int) Main.tile[index1, index2].frameY != (index2 - num10) * 18 + num9) + flag = true; + } + } + if (Main.tile[num6 + 1, num10 - 1] == null) + Main.tile[num6 + 1, num10 - 1] = new Tile(); + if (!Main.tile[num6 + 1, num10 - 1].nactive() || !Main.tileSolid[(int) Main.tile[num6 + 1, num10 - 1].type] || Main.tileSolidTop[(int) Main.tile[num6 + 1, num10 - 1].type]) + flag = true; + if (!flag) + return; + WorldGen.destroyObject = true; + for (int i1 = num6; i1 < num6 + num1; ++i1) + { + for (int j1 = num10; j1 < num10 + 3; ++j1) + { + if ((int) Main.tile[i1, j1].type == type && Main.tile[i1, j1].active()) + WorldGen.KillTile(i1, j1); + } + } + if (type == 454) + { + switch (Main.rand.Next(9)) + { + case 2: + case 3: + case 4: + int num11 = Main.rand.Next(10, 31); + while (num11 > 0) + { + int Stack = Main.rand.Next(2, 11); + if (Stack > num11) + Stack = num11; + num11 -= Stack; + Item.NewItem(i * 16, j * 16, 32, 32, 72, Stack); + } + break; + case 5: + case 6: + int num12 = Main.rand.Next(60, 80); + while (num12 > 0) + { + int Stack = Main.rand.Next(3, 16); + if (Stack > num12) + Stack = num12; + num12 -= Stack; + Item.NewItem(i * 16 - 10, j * 16 - 10, 52, 52, 72, Stack); + } + Item.NewItem(i * 16, j * 16, 32, 32, 1358); + break; + case 7: + int num13 = Main.rand.Next(10, 31); + while (num13 > 0) + { + int Stack = Main.rand.Next(2, 9); + if (Stack > num13) + Stack = num13; + num13 -= Stack; + Item.NewItem(i * 16 - 10, j * 16 - 10, 52, 52, 72, Stack); + } + if (Main.rand.Next(8) == 0) + Item.NewItem(i * 16, j * 16, 32, 32, 3532); + if (Main.rand.Next(8) == 0) + Item.NewItem(i * 16, j * 16, 32, 32, 3532); + Item.NewItem(i * 16, j * 16, 32, 32, 73); + break; + case 8: + int num14 = 100; + while (num14 > 0) + { + int Stack = Main.rand.Next(3, 16); + if (Stack > num14) + Stack = num14; + num14 -= Stack; + Item.NewItem(i * 16 - 10, j * 16 - 10, 52, 52, 72, Stack); + } + int num15 = Main.rand.Next(30, 91); + while (num15 > 0) + { + int Stack = Main.rand.Next(7, 14); + if (Stack > num15) + Stack = num15; + num15 -= Stack; + Item.NewItem(i * 16 - 10, j * 16 - 10, 52, 52, 1349, Stack); + } + Item.NewItem(i * 16, j * 16, 32, 32, 1358); + Item.NewItem(i * 16, j * 16, 32, 32, 73); + break; + } + } + if (type == 34) + { + int Type = num8 != 1 ? (num8 != 2 ? (num8 != 3 ? (num8 != 4 ? (num8 != 5 ? (num8 != 6 ? (num8 < 7 || num8 > 17 ? (num8 < 18 || num8 > 21 ? (num8 != 22 ? (num8 != 23 ? (num8 != 24 ? (num8 != 25 ? (num8 != 26 ? (num8 != 27 ? (num8 != 28 ? (num8 != 29 ? (num8 != 30 ? (num8 != 31 ? (num8 != 32 ? (num8 != 33 ? (num8 != 34 ? (num8 != 35 ? (num8 != 36 ? (num8 != 37 ? (num8 != 38 ? (num8 != 39 ? (num8 != 40 ? (num8 != 41 ? (num8 != 42 ? (num8 != 43 ? (num8 != 44 ? (num8 != 45 ? 106 : 4573) : 4305) : 4215) : 4194) : 4173) : 4152) : 3964) : 3938) : 3894) : 3178) : 3179) : 3177) : 2813) : 2657) : 2656) : 2655) : 2654) : 2653) : 2652) : 2573) : 2558) : 2543) : 2525) : 2224) : 2141 + num8 - 18) : 2055 + num8 - 7) : 1812) : 712) : 711) : 710) : 108) : 107; + Item.NewItem(i * 16, j * 16, 32, 32, Type); + } + WorldGen.destroyObject = false; + for (int i2 = num6 - 1; i2 < num6 + num1 + 1; ++i2) + { + for (int j2 = num10 - 1; j2 < num10 + 4; ++j2) + WorldGen.TileFrame(i2, j2); + } + } + + public static void Check3x3(int i, int j, int type) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int num1 = j; + int num2 = (int) Main.tile[i, j].frameX / 18; + int num3 = 0; + for (; num2 >= 3; num2 -= 3) + ++num3; + int num4 = i - num2; + int num5 = 54 * num3; + int num6 = (int) Main.tile[i, j].frameY / 54; + int num7 = (int) Main.tile[i, j].frameY % 54 / 18; + if (num2 >= 3) + num2 -= 3; + int num8 = i - num2; + int num9 = num1 - num7; + for (int index1 = num8; index1 < num8 + 3; ++index1) + { + for (int index2 = num9; index2 < num9 + 3; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (!Main.tile[index1, index2].active() || (int) Main.tile[index1, index2].type != type || (int) Main.tile[index1, index2].frameX != (index1 - num4) * 18 + num5 || (int) Main.tile[index1, index2].frameY != (index2 - num9) * 18 + num6 * 54) + flag = true; + } + } + if (type == 106 || type == 212 || type == 219 || type == 220 || type == 228 || type == 231 || type == 243 || type == 247 || type == 283 || type >= 300 && type <= 308 || type == 354 || type == 355 || type == 499 || type == 406 || type == 412 || type == 452 || type == 455 || type == 491) + { + for (int i1 = num8; i1 < num8 + 3; ++i1) + { + if (Main.tile[i1, num9 + 3] == null) + Main.tile[i1, num9 + 3] = new Tile(); + if (!WorldGen.SolidTileAllowBottomSlope(i1, num9 + 3)) + { + flag = true; + break; + } + } + } + else + { + if (Main.tile[num8 + 1, num9 - 1] == null) + Main.tile[num8 + 1, num9 - 1] = new Tile(); + if (!Main.tile[num8 + 1, num9 - 1].nactive() || !Main.tileSolid[(int) Main.tile[num8 + 1, num9 - 1].type] || Main.tileSolidTop[(int) Main.tile[num8 + 1, num9 - 1].type]) + flag = true; + } + if (!flag) + return; + WorldGen.destroyObject = true; + for (int i2 = num8; i2 < num8 + 3; ++i2) + { + for (int j1 = num9; j1 < num9 + 3; ++j1) + { + if ((int) Main.tile[i2, j1].type == type && Main.tile[i2, j1].active()) + WorldGen.KillTile(i2, j1); + } + } + switch (type) + { + case 106: + Item.NewItem(i * 16, j * 16, 32, 32, 363); + break; + case 212: + Item.NewItem(i * 16, j * 16, 32, 32, 951); + break; + case 219: + Item.NewItem(i * 16, j * 16, 32, 32, 997); + break; + case 220: + Item.NewItem(i * 16, j * 16, 32, 32, 998); + break; + case 228: + Item.NewItem(i * 16, j * 16, 32, 32, 1120); + break; + case 243: + Item.NewItem(i * 16, j * 16, 32, 32, 1430); + break; + case 247: + Item.NewItem(i * 16, j * 16, 32, 32, 1551); + break; + case 283: + Item.NewItem(i * 16, j * 16, 32, 32, 2172); + break; + default: + if (type >= 300 && type <= 306) + { + Item.NewItem(i * 16, j * 16, 32, 32, 2192 + type - 300); + break; + } + switch (type) + { + case 231: + int num10 = (i + 1) * 16 + 8; + int num11 = j * 16; + Gore.NewGore(new Vector2((float) num10, (float) num11), new Vector2(), 300); + Gore.NewGore(new Vector2((float) num10, (float) (num11 + 8)), new Vector2(), 301); + Gore.NewGore(new Vector2((float) num10, (float) (num11 + 16)), new Vector2(), 302); + float num12 = (float) (i * 16); + float num13 = (float) (j * 16); + float num14 = -1f; + int plr = 0; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && !Main.player[index].dead) + { + float num15 = Math.Abs(Main.player[index].position.X - num12) + Math.Abs(Main.player[index].position.Y - num13); + if ((double) num15 < (double) num14 || (double) num14 == -1.0) + { + plr = index; + num14 = num15; + } + } + } + if ((double) num14 < 4800.0) + { + NPC.SpawnOnPlayer(plr, 222); + break; + } + break; + case 307: + Item.NewItem(i * 16, j * 16, 32, 32, 2203); + break; + case 308: + Item.NewItem(i * 16, j * 16, 32, 32, 2204); + break; + case 354: + Item.NewItem(i * 16, j * 16, 32, 32, 2999); + break; + case 355: + Item.NewItem(i * 16, j * 16, 32, 32, 3000); + break; + case 406: + Item.NewItem(i * 16, j * 16, 32, 32, 3365); + break; + case 412: + Item.NewItem(i * 16, j * 16, 32, 32, 3549); + break; + case 452: + Item.NewItem(i * 16, j * 16, 32, 32, 3742); + break; + case 455: + Item.NewItem(i * 16, j * 16, 32, 32, 3747); + break; + case 491: + Item.NewItem(i * 16, j * 16, 32, 32, 4076); + break; + case 499: + Item.NewItem(i * 16, j * 16, 32, 32, 4142); + break; + } + break; + } + WorldGen.destroyObject = false; + for (int i3 = num8 - 1; i3 < num8 + 4; ++i3) + { + for (int j2 = num9 - 1; j2 < num9 + 4; ++j2) + WorldGen.TileFrame(i3, j2); + } + } + + public static void Check2x5(int i, int j, int type) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int num1 = j; + int num2 = (int) Main.tile[i, j].frameX / 18; + int num3 = 0; + for (; num2 >= 2; num2 -= 2) + ++num3; + int num4 = i - num2; + int num5 = 36 * num3; + int num6 = (int) Main.tile[i, j].frameY % 80 / 18; + if (num2 >= 3) + num2 -= 2; + int num7 = i - num2; + int num8 = num1 - num6; + for (int index1 = num7; index1 < num7 + 2; ++index1) + { + for (int index2 = num8; index2 < num8 + 5; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (!Main.tile[index1, index2].active() || (int) Main.tile[index1, index2].type != type || (int) Main.tile[index1, index2].frameX != (index1 - num4) * 18 + num5 || (int) Main.tile[index1, index2].frameY != (index2 - num8) * 18) + flag = true; + } + } + for (int i1 = num7; i1 < num7 + 2; ++i1) + { + if (Main.tile[i1, num8 + 5] == null) + Main.tile[i1, num8 + 5] = new Tile(); + if (!WorldGen.SolidTileAllowBottomSlope(i1, num8 + 5)) + { + flag = true; + break; + } + } + if (!flag) + return; + WorldGen.destroyObject = true; + for (int i2 = num7; i2 < num7 + 2; ++i2) + { + for (int j1 = num8; j1 < num8 + 5; ++j1) + { + if ((int) Main.tile[i2, j1].type == type && Main.tile[i2, j1].active()) + WorldGen.KillTile(i2, j1); + } + } + if (type == 547) + Item.NewItem(i * 16, j * 16, 32, 32, 4430 + num3); + WorldGen.destroyObject = false; + for (int i3 = num7 - 1; i3 < num7 + 3; ++i3) + { + for (int j2 = num8 - 1; j2 < num8 + 6; ++j2) + WorldGen.TileFrame(i3, j2); + } + } + + public static void Check3x5(int i, int j, int type) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int num1 = j; + int num2 = (int) Main.tile[i, j].frameX / 18; + int num3 = 0; + for (; num2 >= 3; num2 -= 3) + ++num3; + int num4 = i - num2; + int num5 = 54 * num3; + int num6 = (int) Main.tile[i, j].frameY % 90 / 18; + if (num2 >= 4) + num2 -= 3; + int num7 = i - num2; + int num8 = num1 - num6; + for (int index1 = num7; index1 < num7 + 3; ++index1) + { + for (int index2 = num8; index2 < num8 + 5; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (!Main.tile[index1, index2].active() || (int) Main.tile[index1, index2].type != type || (int) Main.tile[index1, index2].frameX != (index1 - num4) * 18 + num5 || (int) Main.tile[index1, index2].frameY != (index2 - num8) * 18) + flag = true; + } + } + for (int i1 = num7; i1 < num7 + 3; ++i1) + { + if (Main.tile[i1, num8 + 5] == null) + Main.tile[i1, num8 + 5] = new Tile(); + if (!WorldGen.SolidTileAllowBottomSlope(i1, num8 + 5)) + { + flag = true; + break; + } + } + if (!flag) + return; + WorldGen.destroyObject = true; + for (int i2 = num7; i2 < num7 + 3; ++i2) + { + for (int j1 = num8; j1 < num8 + 5; ++j1) + { + if ((int) Main.tile[i2, j1].type == type && Main.tile[i2, j1].active()) + WorldGen.KillTile(i2, j1); + } + } + if (type == 613) + Item.NewItem(i * 16, j * 16, 32, 32, 4904 + num3); + WorldGen.destroyObject = false; + for (int i3 = num7 - 1; i3 < num7 + 4; ++i3) + { + for (int j2 = num8 - 1; j2 < num8 + 6; ++j2) + WorldGen.TileFrame(i3, j2); + } + } + + public static void Check3x6(int i, int j, int type) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int num1 = j; + int num2 = (int) Main.tile[i, j].frameX / 18; + int num3 = 0; + for (; num2 >= 3; num2 -= 3) + ++num3; + int num4 = i - num2; + int num5 = 54 * num3; + int num6 = (int) Main.tile[i, j].frameY % 96 / 18; + if (num2 >= 4) + num2 -= 3; + int num7 = i - num2; + int num8 = num1 - num6; + for (int index1 = num7; index1 < num7 + 3; ++index1) + { + for (int index2 = num8; index2 < num8 + 6; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (!Main.tile[index1, index2].active() || (int) Main.tile[index1, index2].type != type || (int) Main.tile[index1, index2].frameX != (index1 - num4) * 18 + num5 || (int) Main.tile[index1, index2].frameY != (index2 - num8) * 18) + flag = true; + } + } + for (int i1 = num7; i1 < num7 + 3; ++i1) + { + if (Main.tile[i1, num8 + 6] == null) + Main.tile[i1, num8 + 6] = new Tile(); + if (!WorldGen.SolidTileAllowBottomSlope(i1, num8 + 6)) + { + flag = true; + break; + } + } + if (!flag) + return; + WorldGen.destroyObject = true; + for (int i2 = num7; i2 < num7 + 3; ++i2) + { + for (int j1 = num8; j1 < num8 + 6; ++j1) + { + if ((int) Main.tile[i2, j1].type == type && Main.tile[i2, j1].active()) + WorldGen.KillTile(i2, j1); + } + } + if (type == 548) + { + if (num3 >= 7) + Item.NewItem(i * 16, j * 16, 32, 32, 4902 + num3 - 7); + else + Item.NewItem(i * 16, j * 16, 32, 32, 4435 + num3); + } + if (type == 614) + Item.NewItem(i * 16, j * 16, 32, 32, 4906); + WorldGen.destroyObject = false; + for (int i3 = num7 - 1; i3 < num7 + 4; ++i3) + { + for (int j2 = num8 - 1; j2 < num8 + 7; ++j2) + WorldGen.TileFrame(i3, j2); + } + } + + public static void Place3x3(int x, int y, ushort type, int style = 0) + { + bool flag = true; + int num1 = 0; + if (type == (ushort) 106 || type == (ushort) 212 || type == (ushort) 219 || type == (ushort) 220 || type == (ushort) 228 || type == (ushort) 231 || type == (ushort) 243 || type == (ushort) 247 || type == (ushort) 283 || type >= (ushort) 300 && type <= (ushort) 308 || type == (ushort) 354 || type == (ushort) 355) + { + num1 = -2; + for (int index1 = x - 1; index1 < x + 2; ++index1) + { + for (int index2 = y - 2; index2 < y + 1; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (Main.tile[index1, index2].active()) + flag = false; + } + } + for (int i = x - 1; i < x + 2; ++i) + { + if (Main.tile[i, y + 1] == null) + Main.tile[i, y + 1] = new Tile(); + if (!WorldGen.SolidTile2(i, y + 1)) + { + flag = false; + break; + } + } + } + else + { + for (int index3 = x - 1; index3 < x + 2; ++index3) + { + for (int index4 = y; index4 < y + 3; ++index4) + { + if (Main.tile[index3, index4] == null) + Main.tile[index3, index4] = new Tile(); + if (Main.tile[index3, index4].active()) + flag = false; + } + } + if (Main.tile[x, y - 1] == null) + Main.tile[x, y - 1] = new Tile(); + if (!Main.tile[x, y - 1].nactive() || !Main.tileSolid[(int) Main.tile[x, y - 1].type] || Main.tileSolidTop[(int) Main.tile[x, y - 1].type]) + flag = false; + } + if (!flag) + return; + int num2 = style * 18 * 3; + Main.tile[x - 1, y + num1].active(true); + Main.tile[x - 1, y + num1].frameY = (short) 0; + Main.tile[x - 1, y + num1].frameX = (short) num2; + Main.tile[x - 1, y + num1].type = type; + Main.tile[x, y + num1].active(true); + Main.tile[x, y + num1].frameY = (short) 0; + Main.tile[x, y + num1].frameX = (short) (num2 + 18); + Main.tile[x, y + num1].type = type; + Main.tile[x + 1, y + num1].active(true); + Main.tile[x + 1, y + num1].frameY = (short) 0; + Main.tile[x + 1, y + num1].frameX = (short) (num2 + 36); + Main.tile[x + 1, y + num1].type = type; + Main.tile[x - 1, y + 1 + num1].active(true); + Main.tile[x - 1, y + 1 + num1].frameY = (short) 18; + Main.tile[x - 1, y + 1 + num1].frameX = (short) num2; + Main.tile[x - 1, y + 1 + num1].type = type; + Main.tile[x, y + 1 + num1].active(true); + Main.tile[x, y + 1 + num1].frameY = (short) 18; + Main.tile[x, y + 1 + num1].frameX = (short) (num2 + 18); + Main.tile[x, y + 1 + num1].type = type; + Main.tile[x + 1, y + 1 + num1].active(true); + Main.tile[x + 1, y + 1 + num1].frameY = (short) 18; + Main.tile[x + 1, y + 1 + num1].frameX = (short) (num2 + 36); + Main.tile[x + 1, y + 1 + num1].type = type; + Main.tile[x - 1, y + 2 + num1].active(true); + Main.tile[x - 1, y + 2 + num1].frameY = (short) 36; + Main.tile[x - 1, y + 2 + num1].frameX = (short) num2; + Main.tile[x - 1, y + 2 + num1].type = type; + Main.tile[x, y + 2 + num1].active(true); + Main.tile[x, y + 2 + num1].frameY = (short) 36; + Main.tile[x, y + 2 + num1].frameX = (short) (num2 + 18); + Main.tile[x, y + 2 + num1].type = type; + Main.tile[x + 1, y + 2 + num1].active(true); + Main.tile[x + 1, y + 2 + num1].frameY = (short) 36; + Main.tile[x + 1, y + 2 + num1].frameX = (short) (num2 + 36); + Main.tile[x + 1, y + 2 + num1].type = type; + } + + public static void PlaceSunflower(int x, int y, ushort type = 27) + { + if ((double) y > Main.worldSurface - 1.0) + return; + bool flag = true; + for (int index1 = x; index1 < x + 2; ++index1) + { + for (int index2 = y - 3; index2 < y + 1; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (Main.tile[index1, index2].active() || Main.tile[index1, index2].wall > (ushort) 0) + flag = false; + } + if (Main.tile[index1, y + 1] == null) + Main.tile[index1, y + 1] = new Tile(); + if (!Main.tile[index1, y + 1].nactive() || Main.tile[index1, y + 1].halfBrick() || Main.tile[index1, y + 1].slope() != (byte) 0 || Main.tile[index1, y + 1].type != (ushort) 2 && Main.tile[index1, y + 1].type != (ushort) 109) + flag = false; + } + if (!flag) + return; + int num1 = WorldGen.genRand.Next(3); + for (int index3 = 0; index3 < 2; ++index3) + { + for (int index4 = -3; index4 < 1; ++index4) + { + int num2 = index3 * 18 + WorldGen.genRand.Next(3) * 36; + if (index4 <= -2) + num2 = index3 * 18 + num1 * 36; + int num3 = (index4 + 3) * 18; + Main.tile[x + index3, y + index4].active(true); + Main.tile[x + index3, y + index4].frameX = (short) num2; + Main.tile[x + index3, y + index4].frameY = (short) num3; + Main.tile[x + index3, y + index4].type = type; + } + } + } + + public static void FixSunflowers() + { + for (int i = 5; i < Main.maxTilesX - 5; ++i) + { + for (int j = 5; (double) j < Main.worldSurface; ++j) + { + if (Main.tile[i, j].active() && Main.tile[i, j].type == (ushort) 27) + WorldGen.FixSunflower(i, j); + } + } + } + + public static void FixSunflower(int i, int j) + { + if (Main.tile[i, j].type != (ushort) 27) + return; + int num1 = 0; + int num2 = j; + int num3 = num1 + (int) Main.tile[i, j].frameX / 18; + int num4 = num2 + (int) Main.tile[i, j].frameY / 18 * -1; + while (num3 > 1) + num3 -= 2; + int num5 = num3 * -1 + i; + int num6 = WorldGen.genRand.Next(3) * 36; + int num7 = 0; + for (int index1 = num5; index1 < num5 + 2; ++index1) + { + for (int index2 = num4; index2 < num4 + 4; ++index2) + Main.tile[index1, index2].frameX = (short) (num7 + num6); + num7 += 18; + } + } + + public static void CheckSunflower(int i, int j, int type = 27) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int num1 = 0; + int num2 = j; + int num3 = num1 + (int) Main.tile[i, j].frameX / 18; + int num4 = num2 + (int) Main.tile[i, j].frameY / 18 * -1; + while (num3 > 1) + num3 -= 2; + int num5 = num3 * -1 + i; + for (int i1 = num5; i1 < num5 + 2; ++i1) + { + for (int index = num4; index < num4 + 4; ++index) + { + if (Main.tile[i1, index] == null) + Main.tile[i1, index] = new Tile(); + int num6 = (int) Main.tile[i1, index].frameX / 18; + while (num6 > 1) + num6 -= 2; + if (!Main.tile[i1, index].nactive() || (int) Main.tile[i1, index].type != type || num6 != i1 - num5 || (int) Main.tile[i1, index].frameY != (index - num4) * 18) + flag = true; + } + if (Main.tile[i1, num4 + 4] == null) + Main.tile[i1, num4 + 4] = new Tile(); + if (!Main.tile[i1, num4 + 4].nactive() || Main.tile[i1, num4 + 4].type != (ushort) 2 && Main.tile[i1, num4 + 4].type != (ushort) 477 && Main.tile[i1, num4 + 4].type != (ushort) 492 && Main.tile[i1, num4 + 4].type != (ushort) 109 && Main.tile[i1, num4 + 4].type != (ushort) 60) + flag = true; + if (!WorldGen.SolidTile(i1, num4 + 4)) + flag = true; + } + if (!flag) + return; + WorldGen.destroyObject = true; + for (int i2 = num5; i2 < num5 + 2; ++i2) + { + for (int j1 = num4; j1 < num4 + 4; ++j1) + { + if ((int) Main.tile[i2, j1].type == type && Main.tile[i2, j1].active()) + WorldGen.KillTile(i2, j1); + } + } + Item.NewItem(i * 16, j * 16, 32, 32, 63); + WorldGen.destroyObject = false; + } + + public static void CheckDye(int x, int y) + { + switch ((int) Main.tile[x, y].frameX / 34) + { + case 6: + if (Main.tile[x, y + 1].nactive() && Main.tile[x, y + 1].type == (ushort) 80) + break; + WorldGen.KillTile(x, y); + break; + case 7: + if (WorldGen.SolidTile(x, y - 1)) + break; + WorldGen.KillTile(x, y); + break; + default: + if (WorldGen.SolidTile(x, y + 1)) + break; + WorldGen.KillTile(x, y); + break; + } + } + + public static void CheckRockGolemHead(int x, int y) + { + if (WorldGen.SolidTileAllowBottomSlope(x, y + 1)) + return; + WorldGen.KillTile(x, y); + } + + public static void CheckGnome(int x, int j) + { + if (WorldGen.destroyObject) + return; + int num1 = 567; + int j1 = j; + bool flag = true; + Tile tileSafely1 = Framing.GetTileSafely(x, j1); + Tile tileSafely2 = Framing.GetTileSafely(x, j1 + 1); + if (tileSafely1.frameY > (short) 0) + { + --j1; + tileSafely1 = Framing.GetTileSafely(x, j1); + tileSafely2 = Framing.GetTileSafely(x, j1 + 1); + } + int num2 = (int) tileSafely1.frameX / 28; + if (tileSafely1.frameY == (short) 0 && tileSafely2.frameY == (short) 20 && (int) tileSafely1.type == num1 && (int) tileSafely2.type == num1) + flag = false; + if (Main.tile[x, j1 + 2] == null) + Main.tile[x, j1 + 2] = new Tile(); + if (!WorldGen.SolidTileAllowBottomSlope(x, j1 + 2) && !TileID.Sets.Platforms[(int) Main.tile[x, j1 + 2].type]) + flag = true; + if (!flag) + return; + WorldGen.destroyObject = true; + if ((int) tileSafely1.type == num1) + WorldGen.KillTile(x, j1); + if ((int) tileSafely2.type == num1) + WorldGen.KillTile(x, j1 + 1); + Item.NewItem(x * 16, j1 * 16, 16, 32, 4609); + WorldGen.destroyObject = false; + } + + public static void PlaceGnome(int x, int y, int style) => WorldGen.PlaceObject(x, y, 567, style: style); + + public static void PlaceDye(int x, int y, int style) + { + bool flag = false; + if (Main.tile[x, y + 1] == null || Main.tile[x, y - 1] == null) + return; + if (style == 7) + { + if (Main.tile[x, y + 1].active() && Main.tile[x, y + 1].type != (ushort) 3 && Main.tile[x, y + 1].type != (ushort) 51 && Main.tile[x, y + 1].type != (ushort) 61 && Main.tile[x, y + 1].type != (ushort) 73 && Main.tile[x, y + 1].type != (ushort) 74 && Main.tile[x, y + 1].type != (ushort) 184) + return; + if (WorldGen.SolidTile(x, y - 1) && !Main.tile[x, y + 1].active()) + flag = true; + } + else + { + if (Main.tile[x, y - 1].active() && Main.tile[x, y - 1].type != (ushort) 3 && Main.tile[x, y - 1].type != (ushort) 51 && Main.tile[x, y - 1].type != (ushort) 61 && Main.tile[x, y - 1].type != (ushort) 73 && Main.tile[x, y - 1].type != (ushort) 74 && Main.tile[x, y - 1].type != (ushort) 184) + return; + if (style == 6) + { + if (Main.tile[x, y + 1].nactive() && Main.tile[x, y + 1].type == (ushort) 80 && !Main.tile[x - 1, y + 1].active() && !Main.tile[x + 1, y + 1].active()) + flag = true; + } + else if (WorldGen.SolidTile(x, y + 1) && !Main.tile[x, y - 1].active()) + { + switch (style) + { + case 5: + if (Main.tile[x, y].liquid == byte.MaxValue) + { + flag = true; + break; + } + break; + case 8: + case 9: + case 10: + case 11: + flag = true; + break; + default: + if (Main.tile[x, y].liquid == (byte) 0) + { + if (style == 3 || style == 4) + { + if (Main.tile[x, y].wall == (ushort) 0) + { + flag = true; + break; + } + break; + } + flag = true; + break; + } + break; + } + } + } + if (!flag) + return; + Main.tile[x, y].type = (ushort) 227; + Main.tile[x, y].active(true); + Main.tile[x, y].halfBrick(false); + Main.tile[x, y].slope((byte) 0); + Main.tile[x, y].frameY = (short) 0; + Main.tile[x, y].frameX = (short) (34 * style); + } + + public static bool PlacePot(int x, int y, ushort type = 28, int style = 0) + { + bool flag = true; + for (int index1 = x; index1 < x + 2; ++index1) + { + for (int index2 = y - 1; index2 < y + 1; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + if (Main.tile[index1, index2].active()) + flag = false; + } + if (Main.tile[index1, y + 1] == null) + Main.tile[index1, y + 1] = new Tile(); + if (!Main.tile[index1, y + 1].nactive() || Main.tile[index1, y + 1].halfBrick() || Main.tile[index1, y + 1].slope() != (byte) 0 || !Main.tileSolid[(int) Main.tile[index1, y + 1].type]) + flag = false; + } + if (!flag) + return false; + int num1 = WorldGen.genRand.Next(3) * 36; + for (int index3 = 0; index3 < 2; ++index3) + { + for (int index4 = -1; index4 < 1; ++index4) + { + int num2 = index3 * 18 + num1; + int num3 = (index4 + 1) * 18; + Main.tile[x + index3, y + index4].active(true); + Main.tile[x + index3, y + index4].frameX = (short) num2; + Main.tile[x + index3, y + index4].frameY = (short) (num3 + style * 36); + Main.tile[x + index3, y + index4].type = type; + Main.tile[x + index3, y + index4].halfBrick(false); + } + } + return true; + } + + public static bool CheckCactus(int i, int j) + { + int index1 = j; + int index2 = i; + while (Main.tile[index2, index1] != null && Main.tile[index2, index1].active() && Main.tile[index2, index1].type == (ushort) 80) + { + ++index1; + if (Main.tile[index2, index1] == null) + return false; + if (!Main.tile[index2, index1].active() || Main.tile[index2, index1].type != (ushort) 80) + { + if (Main.tile[index2 - 1, index1] != null && Main.tile[index2 - 1, index1].active() && Main.tile[index2 - 1, index1].type == (ushort) 80 && Main.tile[index2 - 1, index1 - 1] != null && Main.tile[index2 - 1, index1 - 1].active() && Main.tile[index2 - 1, index1 - 1].type == (ushort) 80 && index2 >= i) + --index2; + if (Main.tile[index2 + 1, index1] != null && Main.tile[index2 + 1, index1].active() && Main.tile[index2 + 1, index1].type == (ushort) 80 && Main.tile[index2 + 1, index1 - 1] != null && Main.tile[index2 + 1, index1 - 1].active() && Main.tile[index2 + 1, index1 - 1].type == (ushort) 80 && index2 <= i) + ++index2; + } + } + if (!Main.tile[index2, index1].nactive() || Main.tile[index2, index1].halfBrick() || Main.tile[index2, index1].slope() != (byte) 0 || Main.tile[index2, index1].type != (ushort) 53 && Main.tile[index2, index1].type != (ushort) 112 && Main.tile[index2, index1].type != (ushort) 116 && Main.tile[index2, index1].type != (ushort) 234) + { + WorldGen.KillTile(i, j); + return true; + } + if (i != index2) + { + if ((!Main.tile[i, j + 1].active() || Main.tile[i, j + 1].type != (ushort) 80) && (!Main.tile[i - 1, j].active() || Main.tile[i - 1, j].type != (ushort) 80) && (!Main.tile[i + 1, j].active() || Main.tile[i + 1, j].type != (ushort) 80)) + { + WorldGen.KillTile(i, j); + return true; + } + } + else if (i == index2 && (!Main.tile[i, j + 1].active() || Main.tile[i, j + 1].type != (ushort) 80 && Main.tile[i, j + 1].type != (ushort) 53 && Main.tile[i, j + 1].type != (ushort) 112 && Main.tile[i, j + 1].type != (ushort) 116 && Main.tile[i, j + 1].type != (ushort) 234)) + { + WorldGen.KillTile(i, j); + return true; + } + return false; + } + + public static void PlantCactus(int i, int j) + { + WorldGen.GrowCactus(i, j); + for (int index = 0; index < 150; ++index) + WorldGen.GrowCactus(WorldGen.genRand.Next(i - 1, i + 2), WorldGen.genRand.Next(j - 10, j + 2)); + } + + public static void CheckOrb(int i, int j, int type) + { + int frameX = (int) Main.tile[i, j].frameX; + bool flag = false; + if (frameX >= 36) + flag = true; + if (WorldGen.destroyObject) + return; + int num1 = Main.tile[i, j].frameX == (short) 0 || Main.tile[i, j].frameX == (short) 36 ? i : i - 1; + int num2 = Main.tile[i, j].frameY != (short) 0 ? j - 1 : j; + for (int index1 = 0; index1 < 2; ++index1) + { + for (int index2 = 0; index2 < 2; ++index2) + { + Tile tile = Main.tile[num1 + index1, num2 + index2]; + if (tile != null && (!tile.nactive() || (int) tile.type != type)) + { + WorldGen.destroyObject = true; + break; + } + } + if (!WorldGen.destroyObject) + { + if (type == 12) + { + Tile tile = Main.tile[num1 + index1, num2 + 2]; + if (tile != null && (!tile.nactive() || !Main.tileSolid[(int) tile.type] || tile.blockType() != 0)) + { + WorldGen.destroyObject = true; + break; + } + } + } + else + break; + } + if (!WorldGen.destroyObject) + return; + for (int i1 = num1; i1 < num1 + 2; ++i1) + { + for (int j1 = num2; j1 < num2 + 2; ++j1) + { + if ((int) Main.tile[i1, j1].type == type) + WorldGen.KillTile(i1, j1); + } + } + if (Main.netMode != 1 && !WorldGen.noTileActions) + { + switch (type) + { + case 12: + Item.NewItem(num1 * 16, num2 * 16, 32, 32, 29); + break; + case 31: + if (flag) + { + int num3 = Main.rand.Next(5); + if (!WorldGen.shadowOrbSmashed) + num3 = 0; + switch (num3) + { + case 0: + Item.NewItem(num1 * 16, num2 * 16, 32, 32, 800, pfix: -1); + int Stack = WorldGen.genRand.Next(100, 101); + Item.NewItem(num1 * 16, num2 * 16, 32, 32, 97, Stack); + break; + case 1: + Item.NewItem(num1 * 16, num2 * 16, 32, 32, 1256, pfix: -1); + break; + case 2: + Item.NewItem(num1 * 16, num2 * 16, 32, 32, 802, pfix: -1); + break; + case 3: + Item.NewItem(num1 * 16, num2 * 16, 32, 32, 3062, pfix: -1); + break; + case 4: + Item.NewItem(num1 * 16, num2 * 16, 32, 32, 1290, pfix: -1); + break; + } + } + else + { + int num4 = Main.rand.Next(5); + if (!WorldGen.shadowOrbSmashed) + num4 = 0; + switch (num4) + { + case 0: + Item.NewItem(num1 * 16, num2 * 16, 32, 32, 96, pfix: -1); + int Stack = WorldGen.genRand.Next(100, 101); + Item.NewItem(num1 * 16, num2 * 16, 32, 32, 97, Stack); + break; + case 1: + Item.NewItem(num1 * 16, num2 * 16, 32, 32, 64, pfix: -1); + break; + case 2: + Item.NewItem(num1 * 16, num2 * 16, 32, 32, 162, pfix: -1); + break; + case 3: + Item.NewItem(num1 * 16, num2 * 16, 32, 32, 115, pfix: -1); + break; + case 4: + Item.NewItem(num1 * 16, num2 * 16, 32, 32, 111, pfix: -1); + break; + } + } + WorldGen.shadowOrbSmashed = true; + ++WorldGen.shadowOrbCount; + if (WorldGen.shadowOrbCount >= 3) + { + if (!(NPC.AnyNPCs(266) & flag) && (!NPC.AnyNPCs(13) || flag)) + { + WorldGen.shadowOrbCount = 0; + float num5 = (float) (num1 * 16); + float num6 = (float) (num2 * 16); + float num7 = -1f; + int plr = 0; + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + float num8 = Math.Abs(Main.player[index].position.X - num5) + Math.Abs(Main.player[index].position.Y - num6); + if ((double) num8 < (double) num7 || (double) num7 == -1.0) + { + plr = index; + num7 = num8; + } + } + if (flag) + NPC.SpawnOnPlayer(plr, 266); + else + NPC.SpawnOnPlayer(plr, 13); + } + } + else + { + LocalizedText localizedText = Lang.misc[10]; + if (WorldGen.shadowOrbCount == 2) + localizedText = Lang.misc[11]; + switch (Main.netMode) + { + case 0: + Main.NewText(localizedText.ToString(), (byte) 50, B: (byte) 130); + break; + case 2: + ChatHelper.BroadcastChatMessage(NetworkText.FromKey(localizedText.Key), new Color(50, (int) byte.MaxValue, 130)); + break; + } + } + AchievementsHelper.NotifyProgressionEvent(7); + break; + } + } + if (flag) + SoundEngine.PlaySound(4, i * 16, j * 16); + else + SoundEngine.PlaySound(13, i * 16, j * 16); + WorldGen.destroyObject = false; + } + + public static void CheckPalmTree(int i, int j) + { + int num1 = -1; + int num2 = -1; + int type = (int) Main.tile[i, j].type; + int frameX = (int) Main.tile[i, j].frameX; + int frameY = (int) Main.tile[i, j].frameY; + if (Main.tile[i, j - 1] != null && Main.tile[i, j - 1].active()) + num1 = (int) Main.tile[i, j - 1].type; + if (Main.tile[i, j + 1] != null && Main.tile[i, j + 1].active()) + num2 = (int) Main.tile[i, j + 1].type; + if (num2 == 53) + num2 = 53; + if (num2 == 234) + num2 = 53; + if (num2 == 116) + num2 = 53; + if (num2 == 112) + num2 = 53; + if (num2 != 53 && num2 != type) + WorldGen.KillTile(i, j); + if ((Main.tile[i, j].frameX == (short) 66 || Main.tile[i, j].frameX == (short) 220) && num2 != 53) + WorldGen.KillTile(i, j); + if (num1 != type && Main.tile[i, j].frameX <= (short) 44) + Main.tile[i, j].frameX = (short) (WorldGen.genRand.Next(7, 10) * 22); + else if (num1 != type && Main.tile[i, j].frameX == (short) 66) + Main.tile[i, j].frameX = (short) 220; + if ((int) Main.tile[i, j].frameX == frameX || (int) Main.tile[i, j].frameY == frameY || frameX < 0 || frameY < 0) + return; + WorldGen.TileFrame(i - 1, j); + WorldGen.TileFrame(i + 1, j); + WorldGen.TileFrame(i, j - 1); + WorldGen.TileFrame(i, j + 1); + } + + public static void CheckTreeWithSettings(int x, int y, WorldGen.CheckTreeSettings settings) + { + int num1 = -1; + int num2 = -1; + int num3 = -1; + int groundTileType = -1; + Tile tile = Main.tile[x, y]; + int type = (int) tile.type; + int frameX = (int) tile.frameX; + int frameY = (int) tile.frameY; + if (Main.tile[x - 1, y] != null && Main.tile[x - 1, y].active()) + num2 = (int) Main.tile[x - 1, y].type; + if (Main.tile[x + 1, y] != null && Main.tile[x + 1, y].active()) + num3 = (int) Main.tile[x + 1, y].type; + if (Main.tile[x, y - 1] != null && Main.tile[x, y - 1].active()) + num1 = (int) Main.tile[x, y - 1].type; + if (Main.tile[x, y + 1] != null && Main.tile[x, y + 1].active()) + groundTileType = (int) Main.tile[x, y + 1].type; + bool flag1 = settings.IsGroundValid(groundTileType); + bool flag2 = num3 == type; + bool flag3 = num2 == type; + if (!flag1 && groundTileType != type && (tile.frameX == (short) 0 && tile.frameY <= (short) 130 || tile.frameX == (short) 22 && tile.frameY <= (short) 130 || tile.frameX == (short) 44 && tile.frameY <= (short) 130)) + WorldGen.KillTile(x, y); + if (tile.frameX >= (short) 22 && tile.frameX <= (short) 44 && tile.frameY >= (short) 132 && tile.frameY <= (short) 176) + { + if (!flag1) + WorldGen.KillTile(x, y); + else if (!(tile.frameX == (short) 22 & flag3) && !(tile.frameX == (short) 44 & flag2)) + WorldGen.KillTile(x, y); + } + else if (tile.frameX == (short) 88 && tile.frameY >= (short) 0 && tile.frameY <= (short) 44 || tile.frameX == (short) 66 && tile.frameY >= (short) 66 && tile.frameY <= (short) 130 || tile.frameX == (short) 110 && tile.frameY >= (short) 66 && tile.frameY <= (short) 110 || tile.frameX == (short) 132 && tile.frameY >= (short) 0 && tile.frameY <= (short) 176) + { + if (flag3 & flag2) + { + if (tile.frameNumber() == (byte) 0) + { + tile.frameX = (short) 110; + tile.frameY = (short) 66; + } + if (tile.frameNumber() == (byte) 1) + { + tile.frameX = (short) 110; + tile.frameY = (short) 88; + } + if (tile.frameNumber() == (byte) 2) + { + tile.frameX = (short) 110; + tile.frameY = (short) 110; + } + } + else if (flag3) + { + if (tile.frameNumber() == (byte) 0) + { + tile.frameX = (short) 88; + tile.frameY = (short) 0; + } + if (tile.frameNumber() == (byte) 1) + { + tile.frameX = (short) 88; + tile.frameY = (short) 22; + } + if (tile.frameNumber() == (byte) 2) + { + tile.frameX = (short) 88; + tile.frameY = (short) 44; + } + } + else if (flag2) + { + if (tile.frameNumber() == (byte) 0) + { + tile.frameX = (short) 66; + tile.frameY = (short) 66; + } + if (tile.frameNumber() == (byte) 1) + { + tile.frameX = (short) 66; + tile.frameY = (short) 88; + } + if (tile.frameNumber() == (byte) 2) + { + tile.frameX = (short) 66; + tile.frameY = (short) 110; + } + } + else + { + if (tile.frameNumber() == (byte) 0) + { + tile.frameX = (short) 0; + tile.frameY = (short) 0; + } + if (tile.frameNumber() == (byte) 1) + { + tile.frameX = (short) 0; + tile.frameY = (short) 22; + } + if (tile.frameNumber() == (byte) 2) + { + tile.frameX = (short) 0; + tile.frameY = (short) 44; + } + } + } + if (tile.frameY >= (short) 132 && tile.frameY <= (short) 176 && (tile.frameX == (short) 0 || tile.frameX == (short) 66 || tile.frameX == (short) 88)) + { + if (!flag1) + WorldGen.KillTile(x, y); + if (!flag3 && !flag2) + { + if (tile.frameNumber() == (byte) 0) + { + tile.frameX = (short) 0; + tile.frameY = (short) 0; + } + if (tile.frameNumber() == (byte) 1) + { + tile.frameX = (short) 0; + tile.frameY = (short) 22; + } + if (tile.frameNumber() == (byte) 2) + { + tile.frameX = (short) 0; + tile.frameY = (short) 44; + } + } + else if (!flag3) + { + if (tile.frameNumber() == (byte) 0) + { + tile.frameX = (short) 0; + tile.frameY = (short) 132; + } + if (tile.frameNumber() == (byte) 1) + { + tile.frameX = (short) 0; + tile.frameY = (short) 154; + } + if (tile.frameNumber() == (byte) 2) + { + tile.frameX = (short) 0; + tile.frameY = (short) 176; + } + } + else if (!flag2) + { + if (tile.frameNumber() == (byte) 0) + { + tile.frameX = (short) 66; + tile.frameY = (short) 132; + } + if (tile.frameNumber() == (byte) 1) + { + tile.frameX = (short) 66; + tile.frameY = (short) 154; + } + if (tile.frameNumber() == (byte) 2) + { + tile.frameX = (short) 66; + tile.frameY = (short) 176; + } + } + else + { + if (tile.frameNumber() == (byte) 0) + { + tile.frameX = (short) 88; + tile.frameY = (short) 132; + } + if (tile.frameNumber() == (byte) 1) + { + tile.frameX = (short) 88; + tile.frameY = (short) 154; + } + if (tile.frameNumber() == (byte) 2) + { + tile.frameX = (short) 88; + tile.frameY = (short) 176; + } + } + } + if (tile.frameX == (short) 66 && (tile.frameY == (short) 0 || tile.frameY == (short) 22 || tile.frameY == (short) 44) || tile.frameX == (short) 44 && (tile.frameY == (short) 198 || tile.frameY == (short) 220 || tile.frameY == (short) 242)) + { + if (!flag2) + WorldGen.KillTile(x, y); + } + else if (tile.frameX == (short) 88 && (tile.frameY == (short) 66 || tile.frameY == (short) 88 || tile.frameY == (short) 110) || tile.frameX == (short) 66 && (tile.frameY == (short) 198 || tile.frameY == (short) 220 || tile.frameY == (short) 242)) + { + if (!flag3) + WorldGen.KillTile(x, y); + } + else if (groundTileType == -1) + WorldGen.KillTile(x, y); + else if (num1 != type && tile.frameY < (short) 198 && (tile.frameX != (short) 22 && tile.frameX != (short) 44 || tile.frameY < (short) 132)) + { + if (flag3 | flag2) + { + if (groundTileType == type) + { + if (flag3 & flag2) + { + if (tile.frameNumber() == (byte) 0) + { + tile.frameX = (short) 132; + tile.frameY = (short) 132; + } + if (tile.frameNumber() == (byte) 1) + { + tile.frameX = (short) 132; + tile.frameY = (short) 154; + } + if (tile.frameNumber() == (byte) 2) + { + tile.frameX = (short) 132; + tile.frameY = (short) 176; + } + } + else if (flag3) + { + if (tile.frameNumber() == (byte) 0) + { + tile.frameX = (short) 132; + tile.frameY = (short) 0; + } + if (tile.frameNumber() == (byte) 1) + { + tile.frameX = (short) 132; + tile.frameY = (short) 22; + } + if (tile.frameNumber() == (byte) 2) + { + tile.frameX = (short) 132; + tile.frameY = (short) 44; + } + } + else if (flag2) + { + if (tile.frameNumber() == (byte) 0) + { + tile.frameX = (short) 132; + tile.frameY = (short) 66; + } + if (tile.frameNumber() == (byte) 1) + { + tile.frameX = (short) 132; + tile.frameY = (short) 88; + } + if (tile.frameNumber() == (byte) 2) + { + tile.frameX = (short) 132; + tile.frameY = (short) 110; + } + } + } + else if (flag3 & flag2) + { + if (tile.frameNumber() == (byte) 0) + { + tile.frameX = (short) 154; + tile.frameY = (short) 132; + } + if (tile.frameNumber() == (byte) 1) + { + tile.frameX = (short) 154; + tile.frameY = (short) 154; + } + if (tile.frameNumber() == (byte) 2) + { + tile.frameX = (short) 154; + tile.frameY = (short) 176; + } + } + else if (flag3) + { + if (tile.frameNumber() == (byte) 0) + { + tile.frameX = (short) 154; + tile.frameY = (short) 0; + } + if (tile.frameNumber() == (byte) 1) + { + tile.frameX = (short) 154; + tile.frameY = (short) 22; + } + if (tile.frameNumber() == (byte) 2) + { + tile.frameX = (short) 154; + tile.frameY = (short) 44; + } + } + else if (flag2) + { + if (tile.frameNumber() == (byte) 0) + { + tile.frameX = (short) 154; + tile.frameY = (short) 66; + } + if (tile.frameNumber() == (byte) 1) + { + tile.frameX = (short) 154; + tile.frameY = (short) 88; + } + if (tile.frameNumber() == (byte) 2) + { + tile.frameX = (short) 154; + tile.frameY = (short) 110; + } + } + } + else + { + if (tile.frameNumber() == (byte) 0) + { + tile.frameX = (short) 110; + tile.frameY = (short) 0; + } + if (tile.frameNumber() == (byte) 1) + { + tile.frameX = (short) 110; + tile.frameY = (short) 22; + } + if (tile.frameNumber() == (byte) 2) + { + tile.frameX = (short) 110; + tile.frameY = (short) 44; + } + } + } + if ((int) tile.frameX == frameX || (int) tile.frameY == frameY || frameX < 0 || frameY < 0) + return; + WorldGen.TileFrame(x - 1, y); + WorldGen.TileFrame(x + 1, y); + WorldGen.TileFrame(x, y - 1); + WorldGen.TileFrame(x, y + 1); + } + + public static void CheckTree(int i, int j) + { + int num1 = -1; + int num2 = -1; + int num3 = -1; + int num4 = -1; + int type1 = (int) Main.tile[i, j].type; + int frameX = (int) Main.tile[i, j].frameX; + int frameY = (int) Main.tile[i, j].frameY; + if (Main.tile[i - 1, j] != null && Main.tile[i - 1, j].active()) + num2 = (int) Main.tile[i - 1, j].type; + if (Main.tile[i + 1, j] != null && Main.tile[i + 1, j].active()) + num3 = (int) Main.tile[i + 1, j].type; + if (Main.tile[i, j - 1] != null && Main.tile[i, j - 1].active()) + num1 = (int) Main.tile[i, j - 1].type; + if (Main.tile[i, j + 1] != null && Main.tile[i, j + 1].active()) + num4 = (int) Main.tile[i, j + 1].type; + if (Main.tile[i - 1, j - 1] != null && Main.tile[i - 1, j - 1].active()) + { + int type2 = (int) Main.tile[i - 1, j - 1].type; + } + if (Main.tile[i + 1, j - 1] != null && Main.tile[i + 1, j - 1].active()) + { + int type3 = (int) Main.tile[i + 1, j - 1].type; + } + if (Main.tile[i - 1, j + 1] != null && Main.tile[i - 1, j + 1].active()) + { + int type4 = (int) Main.tile[i - 1, j + 1].type; + } + if (Main.tile[i + 1, j + 1] != null && Main.tile[i + 1, j + 1].active()) + { + int type5 = (int) Main.tile[i + 1, j + 1].type; + } + if (num4 == 23) + num4 = 2; + if (num4 == 477) + num4 = 2; + if (num4 == 60) + num4 = 2; + if (num4 == 70) + num4 = 2; + if (num4 == 109) + num4 = 2; + if (num4 == 147) + num4 = 2; + if (num4 == 199) + num4 = 2; + if (num4 == 492) + num4 = 2; + if (num4 != 2 && num4 != type1 && (Main.tile[i, j].frameX == (short) 0 && Main.tile[i, j].frameY <= (short) 130 || Main.tile[i, j].frameX == (short) 22 && Main.tile[i, j].frameY <= (short) 130 || Main.tile[i, j].frameX == (short) 44 && Main.tile[i, j].frameY <= (short) 130)) + WorldGen.KillTile(i, j); + if (Main.tile[i, j].frameX >= (short) 22 && Main.tile[i, j].frameX <= (short) 44 && Main.tile[i, j].frameY >= (short) 132 && Main.tile[i, j].frameY <= (short) 176) + { + if (num4 != 2) + WorldGen.KillTile(i, j); + else if ((Main.tile[i, j].frameX != (short) 22 || num2 != type1) && (Main.tile[i, j].frameX != (short) 44 || num3 != type1)) + WorldGen.KillTile(i, j); + } + else if (Main.tile[i, j].frameX == (short) 88 && Main.tile[i, j].frameY >= (short) 0 && Main.tile[i, j].frameY <= (short) 44 || Main.tile[i, j].frameX == (short) 66 && Main.tile[i, j].frameY >= (short) 66 && Main.tile[i, j].frameY <= (short) 130 || Main.tile[i, j].frameX == (short) 110 && Main.tile[i, j].frameY >= (short) 66 && Main.tile[i, j].frameY <= (short) 110 || Main.tile[i, j].frameX == (short) 132 && Main.tile[i, j].frameY >= (short) 0 && Main.tile[i, j].frameY <= (short) 176) + { + if (num2 == type1 && num3 == type1) + { + if (Main.tile[i, j].frameNumber() == (byte) 0) + { + Main.tile[i, j].frameX = (short) 110; + Main.tile[i, j].frameY = (short) 66; + } + if (Main.tile[i, j].frameNumber() == (byte) 1) + { + Main.tile[i, j].frameX = (short) 110; + Main.tile[i, j].frameY = (short) 88; + } + if (Main.tile[i, j].frameNumber() == (byte) 2) + { + Main.tile[i, j].frameX = (short) 110; + Main.tile[i, j].frameY = (short) 110; + } + } + else if (num2 == type1) + { + if (Main.tile[i, j].frameNumber() == (byte) 0) + { + Main.tile[i, j].frameX = (short) 88; + Main.tile[i, j].frameY = (short) 0; + } + if (Main.tile[i, j].frameNumber() == (byte) 1) + { + Main.tile[i, j].frameX = (short) 88; + Main.tile[i, j].frameY = (short) 22; + } + if (Main.tile[i, j].frameNumber() == (byte) 2) + { + Main.tile[i, j].frameX = (short) 88; + Main.tile[i, j].frameY = (short) 44; + } + } + else if (num3 == type1) + { + if (Main.tile[i, j].frameNumber() == (byte) 0) + { + Main.tile[i, j].frameX = (short) 66; + Main.tile[i, j].frameY = (short) 66; + } + if (Main.tile[i, j].frameNumber() == (byte) 1) + { + Main.tile[i, j].frameX = (short) 66; + Main.tile[i, j].frameY = (short) 88; + } + if (Main.tile[i, j].frameNumber() == (byte) 2) + { + Main.tile[i, j].frameX = (short) 66; + Main.tile[i, j].frameY = (short) 110; + } + } + else + { + if (Main.tile[i, j].frameNumber() == (byte) 0) + { + Main.tile[i, j].frameX = (short) 0; + Main.tile[i, j].frameY = (short) 0; + } + if (Main.tile[i, j].frameNumber() == (byte) 1) + { + Main.tile[i, j].frameX = (short) 0; + Main.tile[i, j].frameY = (short) 22; + } + if (Main.tile[i, j].frameNumber() == (byte) 2) + { + Main.tile[i, j].frameX = (short) 0; + Main.tile[i, j].frameY = (short) 44; + } + } + } + if (Main.tile[i, j].frameY >= (short) 132 && Main.tile[i, j].frameY <= (short) 176 && (Main.tile[i, j].frameX == (short) 0 || Main.tile[i, j].frameX == (short) 66 || Main.tile[i, j].frameX == (short) 88)) + { + if (num4 != 2) + WorldGen.KillTile(i, j); + if (num2 != type1 && num3 != type1) + { + if (Main.tile[i, j].frameNumber() == (byte) 0) + { + Main.tile[i, j].frameX = (short) 0; + Main.tile[i, j].frameY = (short) 0; + } + if (Main.tile[i, j].frameNumber() == (byte) 1) + { + Main.tile[i, j].frameX = (short) 0; + Main.tile[i, j].frameY = (short) 22; + } + if (Main.tile[i, j].frameNumber() == (byte) 2) + { + Main.tile[i, j].frameX = (short) 0; + Main.tile[i, j].frameY = (short) 44; + } + } + else if (num2 != type1) + { + if (Main.tile[i, j].frameNumber() == (byte) 0) + { + Main.tile[i, j].frameX = (short) 0; + Main.tile[i, j].frameY = (short) 132; + } + if (Main.tile[i, j].frameNumber() == (byte) 1) + { + Main.tile[i, j].frameX = (short) 0; + Main.tile[i, j].frameY = (short) 154; + } + if (Main.tile[i, j].frameNumber() == (byte) 2) + { + Main.tile[i, j].frameX = (short) 0; + Main.tile[i, j].frameY = (short) 176; + } + } + else if (num3 != type1) + { + if (Main.tile[i, j].frameNumber() == (byte) 0) + { + Main.tile[i, j].frameX = (short) 66; + Main.tile[i, j].frameY = (short) 132; + } + if (Main.tile[i, j].frameNumber() == (byte) 1) + { + Main.tile[i, j].frameX = (short) 66; + Main.tile[i, j].frameY = (short) 154; + } + if (Main.tile[i, j].frameNumber() == (byte) 2) + { + Main.tile[i, j].frameX = (short) 66; + Main.tile[i, j].frameY = (short) 176; + } + } + else + { + if (Main.tile[i, j].frameNumber() == (byte) 0) + { + Main.tile[i, j].frameX = (short) 88; + Main.tile[i, j].frameY = (short) 132; + } + if (Main.tile[i, j].frameNumber() == (byte) 1) + { + Main.tile[i, j].frameX = (short) 88; + Main.tile[i, j].frameY = (short) 154; + } + if (Main.tile[i, j].frameNumber() == (byte) 2) + { + Main.tile[i, j].frameX = (short) 88; + Main.tile[i, j].frameY = (short) 176; + } + } + } + if (Main.tile[i, j].frameX == (short) 66 && (Main.tile[i, j].frameY == (short) 0 || Main.tile[i, j].frameY == (short) 22 || Main.tile[i, j].frameY == (short) 44) || Main.tile[i, j].frameX == (short) 44 && (Main.tile[i, j].frameY == (short) 198 || Main.tile[i, j].frameY == (short) 220 || Main.tile[i, j].frameY == (short) 242)) + { + if (num3 != type1) + WorldGen.KillTile(i, j); + } + else if (Main.tile[i, j].frameX == (short) 88 && (Main.tile[i, j].frameY == (short) 66 || Main.tile[i, j].frameY == (short) 88 || Main.tile[i, j].frameY == (short) 110) || Main.tile[i, j].frameX == (short) 66 && (Main.tile[i, j].frameY == (short) 198 || Main.tile[i, j].frameY == (short) 220 || Main.tile[i, j].frameY == (short) 242)) + { + if (num2 != type1) + WorldGen.KillTile(i, j); + } + else if (num4 == -1 || num4 == 23) + WorldGen.KillTile(i, j); + else if (num1 != type1 && Main.tile[i, j].frameY < (short) 198 && (Main.tile[i, j].frameX != (short) 22 && Main.tile[i, j].frameX != (short) 44 || Main.tile[i, j].frameY < (short) 132)) + { + if (num2 == type1 || num3 == type1) + { + if (num4 == type1) + { + if (num2 == type1 && num3 == type1) + { + if (Main.tile[i, j].frameNumber() == (byte) 0) + { + Main.tile[i, j].frameX = (short) 132; + Main.tile[i, j].frameY = (short) 132; + } + if (Main.tile[i, j].frameNumber() == (byte) 1) + { + Main.tile[i, j].frameX = (short) 132; + Main.tile[i, j].frameY = (short) 154; + } + if (Main.tile[i, j].frameNumber() == (byte) 2) + { + Main.tile[i, j].frameX = (short) 132; + Main.tile[i, j].frameY = (short) 176; + } + } + else if (num2 == type1) + { + if (Main.tile[i, j].frameNumber() == (byte) 0) + { + Main.tile[i, j].frameX = (short) 132; + Main.tile[i, j].frameY = (short) 0; + } + if (Main.tile[i, j].frameNumber() == (byte) 1) + { + Main.tile[i, j].frameX = (short) 132; + Main.tile[i, j].frameY = (short) 22; + } + if (Main.tile[i, j].frameNumber() == (byte) 2) + { + Main.tile[i, j].frameX = (short) 132; + Main.tile[i, j].frameY = (short) 44; + } + } + else if (num3 == type1) + { + if (Main.tile[i, j].frameNumber() == (byte) 0) + { + Main.tile[i, j].frameX = (short) 132; + Main.tile[i, j].frameY = (short) 66; + } + if (Main.tile[i, j].frameNumber() == (byte) 1) + { + Main.tile[i, j].frameX = (short) 132; + Main.tile[i, j].frameY = (short) 88; + } + if (Main.tile[i, j].frameNumber() == (byte) 2) + { + Main.tile[i, j].frameX = (short) 132; + Main.tile[i, j].frameY = (short) 110; + } + } + } + else if (num2 == type1 && num3 == type1) + { + if (Main.tile[i, j].frameNumber() == (byte) 0) + { + Main.tile[i, j].frameX = (short) 154; + Main.tile[i, j].frameY = (short) 132; + } + if (Main.tile[i, j].frameNumber() == (byte) 1) + { + Main.tile[i, j].frameX = (short) 154; + Main.tile[i, j].frameY = (short) 154; + } + if (Main.tile[i, j].frameNumber() == (byte) 2) + { + Main.tile[i, j].frameX = (short) 154; + Main.tile[i, j].frameY = (short) 176; + } + } + else if (num2 == type1) + { + if (Main.tile[i, j].frameNumber() == (byte) 0) + { + Main.tile[i, j].frameX = (short) 154; + Main.tile[i, j].frameY = (short) 0; + } + if (Main.tile[i, j].frameNumber() == (byte) 1) + { + Main.tile[i, j].frameX = (short) 154; + Main.tile[i, j].frameY = (short) 22; + } + if (Main.tile[i, j].frameNumber() == (byte) 2) + { + Main.tile[i, j].frameX = (short) 154; + Main.tile[i, j].frameY = (short) 44; + } + } + else if (num3 == type1) + { + if (Main.tile[i, j].frameNumber() == (byte) 0) + { + Main.tile[i, j].frameX = (short) 154; + Main.tile[i, j].frameY = (short) 66; + } + if (Main.tile[i, j].frameNumber() == (byte) 1) + { + Main.tile[i, j].frameX = (short) 154; + Main.tile[i, j].frameY = (short) 88; + } + if (Main.tile[i, j].frameNumber() == (byte) 2) + { + Main.tile[i, j].frameX = (short) 154; + Main.tile[i, j].frameY = (short) 110; + } + } + } + else + { + if (Main.tile[i, j].frameNumber() == (byte) 0) + { + Main.tile[i, j].frameX = (short) 110; + Main.tile[i, j].frameY = (short) 0; + } + if (Main.tile[i, j].frameNumber() == (byte) 1) + { + Main.tile[i, j].frameX = (short) 110; + Main.tile[i, j].frameY = (short) 22; + } + if (Main.tile[i, j].frameNumber() == (byte) 2) + { + Main.tile[i, j].frameX = (short) 110; + Main.tile[i, j].frameY = (short) 44; + } + } + } + if ((int) Main.tile[i, j].frameX == frameX || (int) Main.tile[i, j].frameY == frameY || frameX < 0 || frameY < 0) + return; + WorldGen.TileFrame(i - 1, j); + WorldGen.TileFrame(i + 1, j); + WorldGen.TileFrame(i, j - 1); + WorldGen.TileFrame(i, j + 1); + } + + public static void Convert(int i, int j, int conversionType, int size = 4) + { + for (int index1 = i - size; index1 <= i + size; ++index1) + { + for (int index2 = j - size; index2 <= j + size; ++index2) + { + if (WorldGen.InWorld(index1, index2, 1) && Math.Abs(index1 - i) + Math.Abs(index2 - j) < 6) + { + int type = (int) Main.tile[index1, index2].type; + int wall = (int) Main.tile[index1, index2].wall; + switch (conversionType) + { + case 1: + if (type <= 623 && wall <= 316) + { + if (WallID.Sets.Conversion.Grass[wall] && wall != 69) + { + Main.tile[index1, index2].wall = (ushort) 69; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.Stone[wall] && wall != 3) + { + Main.tile[index1, index2].wall = (ushort) 3; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.HardenedSand[wall] && wall != 217) + { + Main.tile[index1, index2].wall = (ushort) 217; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.Sandstone[wall] && wall != 220) + { + Main.tile[index1, index2].wall = (ushort) 220; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.NewWall1[wall] && wall != 188) + { + Main.tile[index1, index2].wall = (ushort) 188; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.NewWall2[wall] && wall != 189) + { + Main.tile[index1, index2].wall = (ushort) 189; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.NewWall3[wall] && wall != 190) + { + Main.tile[index1, index2].wall = (ushort) 190; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.NewWall4[wall] && wall != 191) + { + Main.tile[index1, index2].wall = (ushort) 191; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + if ((Main.tileMoss[type] || TileID.Sets.Conversion.Stone[type]) && type != 25) + { + Main.tile[index1, index2].type = (ushort) 25; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (TileID.Sets.Conversion.Grass[type] && type != 23) + { + Main.tile[index1, index2].type = (ushort) 23; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (TileID.Sets.Conversion.Ice[type] && type != 163) + { + Main.tile[index1, index2].type = (ushort) 163; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (TileID.Sets.Conversion.Sand[type] && type != 112) + { + Main.tile[index1, index2].type = (ushort) 112; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (TileID.Sets.Conversion.HardenedSand[type] && type != 398) + { + Main.tile[index1, index2].type = (ushort) 398; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (TileID.Sets.Conversion.Sandstone[type] && type != 400) + { + Main.tile[index1, index2].type = (ushort) 400; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (TileID.Sets.Conversion.Thorn[type] && type != 32) + { + Main.tile[index1, index2].type = (ushort) 32; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + if (type == 59 && (Main.tile[index1 - 1, index2].type == (ushort) 23 || Main.tile[index1 + 1, index2].type == (ushort) 23 || Main.tile[index1, index2 - 1].type == (ushort) 23 || Main.tile[index1, index2 + 1].type == (ushort) 23)) + { + Main.tile[index1, index2].type = (ushort) 0; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + continue; + } + continue; + } + continue; + case 2: + if (type <= 623 && wall <= 316) + { + if (WallID.Sets.Conversion.Grass[wall] && wall != 70) + { + Main.tile[index1, index2].wall = (ushort) 70; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.Stone[wall] && wall != 28) + { + Main.tile[index1, index2].wall = (ushort) 28; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.HardenedSand[wall] && wall != 219) + { + Main.tile[index1, index2].wall = (ushort) 219; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.Sandstone[wall] && wall != 222) + { + Main.tile[index1, index2].wall = (ushort) 222; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.NewWall1[wall] && wall != 200) + { + Main.tile[index1, index2].wall = (ushort) 200; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.NewWall2[wall] && wall != 201) + { + Main.tile[index1, index2].wall = (ushort) 201; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.NewWall3[wall] && wall != 202) + { + Main.tile[index1, index2].wall = (ushort) 202; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.NewWall4[wall] && wall != 203) + { + Main.tile[index1, index2].wall = (ushort) 203; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + if ((Main.tileMoss[type] || TileID.Sets.Conversion.Stone[type]) && type != 117) + { + Main.tile[index1, index2].type = (ushort) 117; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (TileID.Sets.Conversion.GolfGrass[type] && type != 492) + { + Main.tile[index1, index2].type = (ushort) 492; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (TileID.Sets.Conversion.Grass[type] && type != 109 && type != 492) + { + Main.tile[index1, index2].type = (ushort) 109; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (TileID.Sets.Conversion.Ice[type] && type != 164) + { + Main.tile[index1, index2].type = (ushort) 164; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (TileID.Sets.Conversion.Sand[type] && type != 116) + { + Main.tile[index1, index2].type = (ushort) 116; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (TileID.Sets.Conversion.HardenedSand[type] && type != 402) + { + Main.tile[index1, index2].type = (ushort) 402; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (TileID.Sets.Conversion.Sandstone[type] && type != 403) + { + Main.tile[index1, index2].type = (ushort) 403; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (TileID.Sets.Conversion.Thorn[type]) + { + WorldGen.KillTile(index1, index2); + if (Main.netMode == 1) + NetMessage.SendData(17, number2: ((float) index1), number3: ((float) index2)); + } + if (type == 59 && (Main.tile[index1 - 1, index2].type == (ushort) 109 || Main.tile[index1 + 1, index2].type == (ushort) 109 || Main.tile[index1, index2 - 1].type == (ushort) 109 || Main.tile[index1, index2 + 1].type == (ushort) 109)) + { + Main.tile[index1, index2].type = (ushort) 0; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + continue; + } + continue; + } + continue; + case 3: + if (WallID.Sets.CanBeConvertedToGlowingMushroom[wall]) + { + Main.tile[index1, index2].wall = (ushort) 80; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 3); + } + if (Main.tile[index1, index2].type == (ushort) 60) + { + Main.tile[index1, index2].type = (ushort) 70; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 3); + continue; + } + if (TileID.Sets.Conversion.Thorn[type]) + { + WorldGen.KillTile(index1, index2); + if (Main.netMode == 1) + { + NetMessage.SendData(17, number2: ((float) index1), number3: ((float) index2)); + continue; + } + continue; + } + continue; + case 4: + if (type <= 623 && wall <= 316) + { + if (WallID.Sets.Conversion.Grass[wall] && wall != 81) + { + Main.tile[index1, index2].wall = (ushort) 81; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.Stone[wall] && wall != 83) + { + Main.tile[index1, index2].wall = (ushort) 83; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.HardenedSand[wall] && wall != 218) + { + Main.tile[index1, index2].wall = (ushort) 218; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.Sandstone[wall] && wall != 221) + { + Main.tile[index1, index2].wall = (ushort) 221; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.NewWall1[wall] && wall != 192) + { + Main.tile[index1, index2].wall = (ushort) 192; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.NewWall2[wall] && wall != 193) + { + Main.tile[index1, index2].wall = (ushort) 193; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.NewWall3[wall] && wall != 194) + { + Main.tile[index1, index2].wall = (ushort) 194; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.NewWall4[wall] && wall != 195) + { + Main.tile[index1, index2].wall = (ushort) 195; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + if ((Main.tileMoss[type] || TileID.Sets.Conversion.Stone[type]) && type != 203) + { + Main.tile[index1, index2].type = (ushort) 203; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (TileID.Sets.Conversion.Grass[type] && type != 199) + { + Main.tile[index1, index2].type = (ushort) 199; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (TileID.Sets.Conversion.Ice[type] && type != 200) + { + Main.tile[index1, index2].type = (ushort) 200; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (TileID.Sets.Conversion.Sand[type] && type != 234) + { + Main.tile[index1, index2].type = (ushort) 234; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (TileID.Sets.Conversion.HardenedSand[type] && type != 399) + { + Main.tile[index1, index2].type = (ushort) 399; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (TileID.Sets.Conversion.Sandstone[type] && type != 401) + { + Main.tile[index1, index2].type = (ushort) 401; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (TileID.Sets.Conversion.Thorn[type] && type != 352) + { + Main.tile[index1, index2].type = (ushort) 352; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + if (type == 59 && (Main.tile[index1 - 1, index2].type == (ushort) 199 || Main.tile[index1 + 1, index2].type == (ushort) 199 || Main.tile[index1, index2 - 1].type == (ushort) 199 || Main.tile[index1, index2 + 1].type == (ushort) 199)) + { + Main.tile[index1, index2].type = (ushort) 0; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + continue; + } + continue; + } + continue; + default: + if (Main.tile[index1, index2].wall == (ushort) 69 || Main.tile[index1, index2].wall == (ushort) 70 || Main.tile[index1, index2].wall == (ushort) 81) + { + Main.tile[index1, index2].wall = (double) index2 >= Main.worldSurface ? (ushort) 64 : (WorldGen.genRand.Next(10) != 0 ? (ushort) 63 : (ushort) 65); + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.Stone[wall] && wall != 1 && wall != 262 && wall != 274 && wall != 61 && wall != 185) + { + Main.tile[index1, index2].wall = (ushort) 1; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.Stone[wall] && wall == 262) + { + Main.tile[index1, index2].wall = (ushort) 61; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.Stone[wall] && wall == 274) + { + Main.tile[index1, index2].wall = (ushort) 185; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + if (WallID.Sets.Conversion.NewWall1[wall] && wall != 212) + { + Main.tile[index1, index2].wall = (ushort) 212; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.NewWall2[wall] && wall != 213) + { + Main.tile[index1, index2].wall = (ushort) 213; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.NewWall3[wall] && wall != 214) + { + Main.tile[index1, index2].wall = (ushort) 214; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.NewWall4[wall] && wall != 215) + { + Main.tile[index1, index2].wall = (ushort) 215; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (Main.tile[index1, index2].wall == (ushort) 80) + { + if ((double) index2 < Main.worldSurface + 4.0 + (double) WorldGen.genRand.Next(3) || (double) index2 > ((double) Main.maxTilesY + Main.rockLayer) / 2.0 - 3.0 + (double) WorldGen.genRand.Next(3)) + { + Main.tile[index1, index2].wall = (ushort) 15; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 3); + } + else + { + Main.tile[index1, index2].wall = (ushort) 64; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 3); + } + } + else if (WallID.Sets.Conversion.HardenedSand[wall] && wall != 216) + { + Main.tile[index1, index2].wall = (ushort) 216; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + else if (WallID.Sets.Conversion.Sandstone[wall] && wall != 187) + { + Main.tile[index1, index2].wall = (ushort) 187; + WorldGen.SquareWallFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + } + if (Main.tile[index1, index2].type == (ushort) 492) + { + Main.tile[index1, index2].type = (ushort) 477; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + continue; + } + if (type != 60 && TileID.Sets.Conversion.Grass[type] && type != 2 && type != 477) + { + Main.tile[index1, index2].type = (ushort) 2; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + continue; + } + if (TileID.Sets.Conversion.Stone[type] && type != 1) + { + Main.tile[index1, index2].type = (ushort) 1; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + continue; + } + if (TileID.Sets.Conversion.Sand[type] && type != 53) + { + Main.tile[index1, index2].type = (ushort) 53; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + continue; + } + if (TileID.Sets.Conversion.HardenedSand[type] && type != 397) + { + Main.tile[index1, index2].type = (ushort) 397; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + continue; + } + if (TileID.Sets.Conversion.Sandstone[type] && type != 396) + { + Main.tile[index1, index2].type = (ushort) 396; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + continue; + } + if (TileID.Sets.Conversion.Ice[type] && type != 161) + { + Main.tile[index1, index2].type = (ushort) 161; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + continue; + } + if (Main.tile[index1, index2].type == (ushort) 70) + { + Main.tile[index1, index2].type = (ushort) 60; + WorldGen.SquareTileFrame(index1, index2); + NetMessage.SendTileSquare(-1, index1, index2, 1); + continue; + } + if (Main.tile[index1, index2].type == (ushort) 32 || Main.tile[index1, index2].type == (ushort) 352) + { + WorldGen.KillTile(index1, index2); + if (Main.netMode == 1) + { + NetMessage.SendData(17, number2: ((float) index1), number3: ((float) index2)); + continue; + } + continue; + } + continue; + } + } + } + } + } + + public static void CactusFrame(int i, int j) + { + try + { + int index1 = j; + int index2 = i; + if (WorldGen.CheckCactus(i, j)) + return; + while (Main.tile[index2, index1].active() && Main.tile[index2, index1].type == (ushort) 80) + { + ++index1; + if (Main.tile[index2, index1] == null) + return; + if (!Main.tile[index2, index1].active() || Main.tile[index2, index1].type != (ushort) 80) + { + if (Main.tile[index2 - 1, index1] != null && Main.tile[index2 - 1, index1].active() && Main.tile[index2 - 1, index1].type == (ushort) 80 && Main.tile[index2 - 1, index1 - 1].active() && Main.tile[index2 - 1, index1 - 1].type == (ushort) 80 && index2 >= i) + --index2; + if (Main.tile[index2 + 1, index1] != null && Main.tile[index2 + 1, index1].active() && Main.tile[index2 + 1, index1].type == (ushort) 80 && Main.tile[index2 + 1, index1 - 1].active() && Main.tile[index2 + 1, index1 - 1].type == (ushort) 80 && index2 <= i) + ++index2; + } + } + int num1 = index1 - 1; + int num2 = i - index2; + num1 = j; + if (Main.tile[i - 2, j] == null) + return; + int type = (int) Main.tile[i - 2, j].type; + if (Main.tile[i - 1, j] == null) + return; + int num3 = (int) Main.tile[i - 1, j].type; + if (Main.tile[i + 1, j] == null) + return; + int num4 = (int) Main.tile[i + 1, j].type; + if (Main.tile[i, j - 1] == null) + return; + int num5 = (int) Main.tile[i, j - 1].type; + if (num5 == 227) + num5 = 80; + int index3 = (int) Main.tile[i, j + 1].type; + int num6 = (int) Main.tile[i - 1, j + 1].type; + int num7 = (int) Main.tile[i + 1, j + 1].type; + if (!Main.tile[i - 1, j].active()) + num3 = -1; + if (!Main.tile[i + 1, j].active()) + num4 = -1; + if (!Main.tile[i, j - 1].active()) + num5 = -1; + if (!Main.tile[i, j + 1].active()) + index3 = -1; + if (!Main.tile[i - 1, j + 1].active()) + num6 = -1; + if (!Main.tile[i + 1, j + 1].active()) + num7 = -1; + short num8 = Main.tile[i, j].frameX; + short num9 = Main.tile[i, j].frameY; + switch (num2) + { + case -1: + if (num4 == 80) + { + if (num5 != 80 && index3 != 80) + { + num8 = (short) 108; + num9 = (short) 36; + break; + } + if (index3 != 80) + { + num8 = (short) 54; + num9 = (short) 36; + break; + } + if (num5 != 80) + { + num8 = (short) 54; + num9 = (short) 0; + break; + } + num8 = (short) 54; + num9 = (short) 18; + break; + } + if (num5 != 80) + { + num8 = (short) 54; + num9 = (short) 0; + break; + } + num8 = (short) 54; + num9 = (short) 18; + break; + case 0: + if (num5 != 80) + { + if (num3 == 80 && num4 == 80 && num6 != 80 && num7 != 80 && type != 80) + { + num8 = (short) 90; + num9 = (short) 0; + break; + } + if (num3 == 80 && num6 != 80 && type != 80) + { + num8 = (short) 72; + num9 = (short) 0; + break; + } + if (num4 == 80 && num7 != 80) + { + num8 = (short) 18; + num9 = (short) 0; + break; + } + num8 = (short) 0; + num9 = (short) 0; + break; + } + if (num3 == 80 && num4 == 80 && num6 != 80 && num7 != 80 && type != 80) + { + num8 = (short) 90; + num9 = (short) 36; + break; + } + if (num3 == 80 && num6 != 80 && type != 80) + { + num8 = (short) 72; + num9 = (short) 36; + break; + } + if (num4 == 80 && num7 != 80) + { + num8 = (short) 18; + num9 = (short) 36; + break; + } + if (index3 >= 0 && Main.tileSolid[index3]) + { + num8 = (short) 0; + num9 = (short) 36; + break; + } + num8 = (short) 0; + num9 = (short) 18; + break; + case 1: + if (num3 == 80) + { + if (num5 != 80 && index3 != 80) + { + num8 = (short) 108; + num9 = (short) 18; + break; + } + if (index3 != 80) + { + num8 = (short) 36; + num9 = (short) 36; + break; + } + if (num5 != 80) + { + num8 = (short) 36; + num9 = (short) 0; + break; + } + num8 = (short) 36; + num9 = (short) 18; + break; + } + if (num5 != 80) + { + num8 = (short) 36; + num9 = (short) 0; + break; + } + num8 = (short) 36; + num9 = (short) 18; + break; + } + if ((int) num8 == (int) Main.tile[i, j].frameX && (int) num9 == (int) Main.tile[i, j].frameY) + return; + Main.tile[i, j].frameX = num8; + Main.tile[i, j].frameY = num9; + WorldGen.DiamondTileFrame(i, j); + } + catch + { + Main.tile[i, j].frameX = (short) 0; + Main.tile[i, j].frameY = (short) 0; + } + } + + public static void GrowCactus(int i, int j) + { + int index1 = j; + int i1 = i; + if (!Main.tile[i, j].nactive() || Main.tile[i, j].halfBrick() || !WorldGen.gen && Main.tile[i, j].slope() != (byte) 0 || Main.tile[i, j - 1].liquid > (byte) 0 || Main.tile[i, j].type != (ushort) 53 && Main.tile[i, j].type != (ushort) 80 && Main.tile[i, j].type != (ushort) 234 && Main.tile[i, j].type != (ushort) 112 && Main.tile[i, j].type != (ushort) 116) + return; + int num1 = 0; + for (int index2 = i - WorldGen.cactusWaterWidth; index2 < i + WorldGen.cactusWaterWidth; ++index2) + { + for (int index3 = j - WorldGen.cactusWaterHeight; index3 < j + WorldGen.cactusWaterHeight; ++index3) + num1 += (int) Main.tile[index2, index3].liquid; + } + if (num1 / (int) byte.MaxValue > WorldGen.cactusWaterLimit) + return; + if (Main.tile[i, j].type == (ushort) 53 || Main.tile[i, j].type == (ushort) 112 || Main.tile[i, j].type == (ushort) 116 || Main.tile[i, j].type == (ushort) 234) + { + if (Main.tile[i, j - 1].active() || Main.tile[i - 1, j - 1].active() || Main.tile[i + 1, j - 1].active()) + return; + int num2 = 0; + int num3 = 0; + for (int index4 = i - 6; index4 <= i + 6; ++index4) + { + for (int index5 = j - 3; index5 <= j + 1; ++index5) + { + try + { + if (Main.tile[index4, index5].active()) + { + if (Main.tile[index4, index5].type == (ushort) 80) + { + ++num2; + if (num2 >= 4) + return; + } + if (Main.tile[index4, index5].type != (ushort) 53 && Main.tile[index4, index5].type != (ushort) 112 && Main.tile[index4, index5].type != (ushort) 116) + { + if (Main.tile[index4, index5].type != (ushort) 234) + continue; + } + ++num3; + } + } + catch + { + } + } + } + if (num3 <= 10) + return; + if (WorldGen.gen && WorldGen.genRand.Next(2) == 0) + Main.tile[i, j].slope((byte) 0); + Main.tile[i, j - 1].active(true); + Main.tile[i, j - 1].type = (ushort) 80; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, i, j - 1, 1); + WorldGen.SquareTileFrame(i1, index1 - 1); + } + else + { + if (Main.tile[i, j].type != (ushort) 80) + return; + while (Main.tile[i1, index1].active() && Main.tile[i1, index1].type == (ushort) 80) + { + ++index1; + if (!Main.tile[i1, index1].active() || Main.tile[i1, index1].type != (ushort) 80) + { + if (Main.tile[i1 - 1, index1].active() && Main.tile[i1 - 1, index1].type == (ushort) 80 && Main.tile[i1 - 1, index1 - 1].active() && Main.tile[i1 - 1, index1 - 1].type == (ushort) 80 && i1 >= i) + --i1; + if (Main.tile[i1 + 1, index1].active() && Main.tile[i1 + 1, index1].type == (ushort) 80 && Main.tile[i1 + 1, index1 - 1].active() && Main.tile[i1 + 1, index1 - 1].type == (ushort) 80 && i1 <= i) + ++i1; + } + } + int num4 = index1 - 1 - j; + int num5 = i - i1; + int num6 = i - num5; + int num7 = j; + int num8 = 11 - num4; + int num9 = 0; + for (int index6 = num6 - 2; index6 <= num6 + 2; ++index6) + { + for (int index7 = num7 - num8; index7 <= num7 + num4; ++index7) + { + if (Main.tile[index6, index7].active() && Main.tile[index6, index7].type == (ushort) 80) + ++num9; + } + } + if (Main.drunkWorld) + { + if (num9 >= WorldGen.genRand.Next(11, 20)) + return; + } + else if (num9 >= WorldGen.genRand.Next(11, 13)) + return; + int index8 = i; + int index9 = j; + if (num5 == 0) + { + if (num4 == 0) + { + if (Main.tile[index8, index9 - 1].active()) + return; + Main.tile[index8, index9 - 1].active(true); + Main.tile[index8, index9 - 1].type = (ushort) 80; + WorldGen.SquareTileFrame(index8, index9 - 1); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, index8, index9 - 1, 1); + } + else + { + bool flag1 = false; + bool flag2 = false; + if (Main.tile[index8, index9 - 1].active() && Main.tile[index8, index9 - 1].type == (ushort) 80) + { + if (!Main.tile[index8 - 1, index9].active() && !Main.tile[index8 - 2, index9 + 1].active() && !Main.tile[index8 - 1, index9 - 1].active() && !Main.tile[index8 - 1, index9 + 1].active() && !Main.tile[index8 - 2, index9].active()) + flag1 = true; + if (!Main.tile[index8 + 1, index9].active() && !Main.tile[index8 + 2, index9 + 1].active() && !Main.tile[index8 + 1, index9 - 1].active() && !Main.tile[index8 + 1, index9 + 1].active() && !Main.tile[index8 + 2, index9].active()) + flag2 = true; + } + int num10 = WorldGen.genRand.Next(3); + if (num10 == 0 & flag1) + { + Main.tile[index8 - 1, index9].active(true); + Main.tile[index8 - 1, index9].type = (ushort) 80; + WorldGen.SquareTileFrame(index8 - 1, index9); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, index8 - 1, index9, 1); + } + else if (num10 == 1 & flag2) + { + Main.tile[index8 + 1, index9].active(true); + Main.tile[index8 + 1, index9].type = (ushort) 80; + WorldGen.SquareTileFrame(index8 + 1, index9); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, index8 + 1, index9, 1); + } + else + { + if (num4 >= WorldGen.genRand.Next(2, 8)) + return; + if (Main.tile[index8 - 1, index9 - 1].active()) + { + int type = (int) Main.tile[index8 - 1, index9 - 1].type; + } + if (Main.tile[index8 + 1, index9 - 1].active() && Main.tile[index8 + 1, index9 - 1].type == (ushort) 80 || Main.tile[index8, index9 - 1].active()) + return; + Main.tile[index8, index9 - 1].active(true); + Main.tile[index8, index9 - 1].type = (ushort) 80; + WorldGen.SquareTileFrame(index8, index9 - 1); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, index8, index9 - 1, 1); + } + } + } + else + { + if (Main.tile[index8, index9 - 1].active() || Main.tile[index8, index9 - 2].active() || Main.tile[index8 + num5, index9 - 1].active() || !Main.tile[index8 - num5, index9 - 1].active() || Main.tile[index8 - num5, index9 - 1].type != (ushort) 80) + return; + Main.tile[index8, index9 - 1].active(true); + Main.tile[index8, index9 - 1].type = (ushort) 80; + WorldGen.SquareTileFrame(index8, index9 - 1); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, index8, index9 - 1, 1); + } + } + } + + public static void CheckPot(int i, int j, int type = 28) + { + if (WorldGen.destroyObject) + return; + bool flag1 = false; + int num1 = 0; + int num2 = j; + int num3 = num1 + (int) Main.tile[i, j].frameX / 18; + while (num3 > 1) + num3 -= 2; + int num4 = num3 * -1 + i; + int num5 = (int) Main.tile[i, j].frameY / 18; + int num6 = 0; + while (num5 > 1) + { + num5 -= 2; + ++num6; + } + int num7 = num2 - num5; + for (int i1 = num4; i1 < num4 + 2; ++i1) + { + for (int index = num7; index < num7 + 2; ++index) + { + if (Main.tile[i1, index] == null) + Main.tile[i1, index] = new Tile(); + int num8 = (int) Main.tile[i1, index].frameX / 18; + while (num8 > 1) + num8 -= 2; + if (!Main.tile[i1, index].active() || (int) Main.tile[i1, index].type != type || num8 != i1 - num4 || (int) Main.tile[i1, index].frameY != (index - num7) * 18 + num6 * 36) + flag1 = true; + } + if (Main.tile[i1, num7 + 2] == null) + Main.tile[i1, num7 + 2] = new Tile(); + if (!WorldGen.SolidTile2(i1, num7 + 2)) + flag1 = true; + } + if (!flag1) + return; + WorldGen.destroyObject = true; + if (num6 >= 7 && num6 <= 9) + SoundEngine.PlaySound(6, i * 16, j * 16); + else if (num6 >= 16 && num6 <= 24) + SoundEngine.PlaySound(4, i * 16, j * 16); + else + SoundEngine.PlaySound(13, i * 16, j * 16); + for (int i2 = num4; i2 < num4 + 2; ++i2) + { + for (int j1 = num7; j1 < num7 + 2; ++j1) + { + if ((int) Main.tile[i2, j1].type == type && Main.tile[i2, j1].active()) + WorldGen.KillTile(i2, j1); + } + } + float num9 = 1f; + bool flag2 = false; + switch (num6) + { + case 0: + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 51); + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 52); + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 53); + break; + case 1: + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 166); + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 167); + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 168); + break; + case 2: + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 169); + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 170); + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 171); + break; + case 3: + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 172); + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 173); + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 174); + break; + default: + if (num6 >= 4 && num6 <= 6) + { + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 197); + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 198); + num9 = 1.25f; + break; + } + if (num6 >= 7 && num6 <= 9) + { + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 199); + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 200); + num9 = 1.75f; + break; + } + if (num6 >= 10 && num6 <= 12) + { + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 201); + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 202); + num9 = 1.9f; + break; + } + if (num6 >= 13 && num6 <= 15) + { + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 203); + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 204); + num9 = 2.1f; + break; + } + if (num6 >= 16 && num6 <= 18) + { + num9 = 1.6f; + break; + } + if (num6 >= 19 && num6 <= 21) + { + num9 = 3.5f; + break; + } + if (num6 >= 22 && num6 <= 24) + { + num9 = 1.6f; + break; + } + if (num6 >= 25 && num6 <= 27) + { + num9 = 10f; + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), WorldGen.genRand.Next(217, 220)); + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), WorldGen.genRand.Next(217, 220)); + break; + } + if (num6 >= 28 && num6 <= 30) + { + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), WorldGen.genRand.Next(315, 317)); + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), WorldGen.genRand.Next(315, 317)); + if (Main.hardMode) + { + num9 = 4f; + break; + } + break; + } + if (num6 >= 31 && num6 <= 33) + { + int num10 = WorldGen.genRand.Next(2, 5); + for (int index = 0; index < num10; ++index) + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 698 + WorldGen.genRand.Next(6)); + num9 = 2f; + break; + } + if (num6 >= 34 && num6 <= 36) + { + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 1122); + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 1123); + Gore.NewGore(new Vector2((float) (i * 16), (float) (j * 16)), new Vector2(), 1124); + num9 = 1.25f; + flag2 = true; + break; + } + break; + } + float num11 = (float) (((double) num9 * 2.0 + 1.0) / 3.0); + int range = (int) (500.0 / (((double) num11 + 1.0) / 2.0)); + if (!WorldGen.gen) + { + if ((double) Player.GetClosestRollLuck(i, j, range) == 0.0) + { + if (Main.netMode != 1) + Projectile.NewProjectile((float) (i * 16 + 16), (float) (j * 16 + 16), 0.0f, -12f, 518, 0, 0.0f, Main.myPlayer); + } + else if (WorldGen.genRand.Next(35) == 0 && Main.wallDungeon[(int) Main.tile[i, j].wall] && (double) j > Main.worldSurface) + Item.NewItem(i * 16, j * 16, 16, 16, 327); + else if (Main.getGoodWorld && WorldGen.genRand.Next(4) == 0) + Projectile.NewProjectile((float) (i * 16 + 16), (float) (j * 16 + 8), (float) Main.rand.Next(-100, 101) * (1f / 500f), 0.0f, 28, 0, 0.0f, (int) Player.FindClosest(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16)); + else if (WorldGen.genRand.Next(45) == 0 || Main.rand.Next(45) == 0 && Main.expertMode) + { + if ((double) j < Main.worldSurface) + { + int num12 = WorldGen.genRand.Next(10); + if (num12 == 0) + Item.NewItem(i * 16, j * 16, 16, 16, 292); + if (num12 == 1) + Item.NewItem(i * 16, j * 16, 16, 16, 298); + if (num12 == 2) + Item.NewItem(i * 16, j * 16, 16, 16, 299); + if (num12 == 3) + Item.NewItem(i * 16, j * 16, 16, 16, 290); + if (num12 == 4) + Item.NewItem(i * 16, j * 16, 16, 16, 2322); + if (num12 == 5) + Item.NewItem(i * 16, j * 16, 16, 16, 2324); + if (num12 == 6) + Item.NewItem(i * 16, j * 16, 16, 16, 2325); + if (num12 >= 7) + Item.NewItem(i * 16, j * 16, 16, 16, 2350, WorldGen.genRand.Next(1, 3)); + } + else if ((double) j < Main.rockLayer) + { + int num13 = WorldGen.genRand.Next(11); + if (num13 == 0) + Item.NewItem(i * 16, j * 16, 16, 16, 289); + if (num13 == 1) + Item.NewItem(i * 16, j * 16, 16, 16, 298); + if (num13 == 2) + Item.NewItem(i * 16, j * 16, 16, 16, 299); + if (num13 == 3) + Item.NewItem(i * 16, j * 16, 16, 16, 290); + if (num13 == 4) + Item.NewItem(i * 16, j * 16, 16, 16, 303); + if (num13 == 5) + Item.NewItem(i * 16, j * 16, 16, 16, 291); + if (num13 == 6) + Item.NewItem(i * 16, j * 16, 16, 16, 304); + if (num13 == 7) + Item.NewItem(i * 16, j * 16, 16, 16, 2322); + if (num13 == 8) + Item.NewItem(i * 16, j * 16, 16, 16, 2329); + if (num13 >= 7) + Item.NewItem(i * 16, j * 16, 16, 16, 2350, WorldGen.genRand.Next(1, 3)); + } + else if (j < Main.UnderworldLayer) + { + int num14 = WorldGen.genRand.Next(15); + if (num14 == 0) + Item.NewItem(i * 16, j * 16, 16, 16, 296); + if (num14 == 1) + Item.NewItem(i * 16, j * 16, 16, 16, 295); + if (num14 == 2) + Item.NewItem(i * 16, j * 16, 16, 16, 299); + if (num14 == 3) + Item.NewItem(i * 16, j * 16, 16, 16, 302); + if (num14 == 4) + Item.NewItem(i * 16, j * 16, 16, 16, 303); + if (num14 == 5) + Item.NewItem(i * 16, j * 16, 16, 16, 305); + if (num14 == 6) + Item.NewItem(i * 16, j * 16, 16, 16, 301); + if (num14 == 7) + Item.NewItem(i * 16, j * 16, 16, 16, 302); + if (num14 == 8) + Item.NewItem(i * 16, j * 16, 16, 16, 297); + if (num14 == 9) + Item.NewItem(i * 16, j * 16, 16, 16, 304); + if (num14 == 10) + Item.NewItem(i * 16, j * 16, 16, 16, 2322); + if (num14 == 11) + Item.NewItem(i * 16, j * 16, 16, 16, 2323); + if (num14 == 12) + Item.NewItem(i * 16, j * 16, 16, 16, 2327); + if (num14 == 13) + Item.NewItem(i * 16, j * 16, 16, 16, 2329); + if (num14 >= 7) + Item.NewItem(i * 16, j * 16, 16, 16, 2350, WorldGen.genRand.Next(1, 3)); + } + else + { + int num15 = WorldGen.genRand.Next(14); + if (num15 == 0) + Item.NewItem(i * 16, j * 16, 16, 16, 296); + if (num15 == 1) + Item.NewItem(i * 16, j * 16, 16, 16, 295); + if (num15 == 2) + Item.NewItem(i * 16, j * 16, 16, 16, 293); + if (num15 == 3) + Item.NewItem(i * 16, j * 16, 16, 16, 288); + if (num15 == 4) + Item.NewItem(i * 16, j * 16, 16, 16, 294); + if (num15 == 5) + Item.NewItem(i * 16, j * 16, 16, 16, 297); + if (num15 == 6) + Item.NewItem(i * 16, j * 16, 16, 16, 304); + if (num15 == 7) + Item.NewItem(i * 16, j * 16, 16, 16, 305); + if (num15 == 8) + Item.NewItem(i * 16, j * 16, 16, 16, 301); + if (num15 == 9) + Item.NewItem(i * 16, j * 16, 16, 16, 302); + if (num15 == 10) + Item.NewItem(i * 16, j * 16, 16, 16, 288); + if (num15 == 11) + Item.NewItem(i * 16, j * 16, 16, 16, 300); + if (num15 == 12) + Item.NewItem(i * 16, j * 16, 16, 16, 2323); + if (num15 == 13) + Item.NewItem(i * 16, j * 16, 16, 16, 2326); + if (WorldGen.genRand.Next(5) == 0) + Item.NewItem(i * 16, j * 16, 16, 16, 4870); + } + } + else if (Main.netMode == 2 && Main.rand.Next(30) == 0) + { + Item.NewItem(i * 16, j * 16, 16, 16, 2997); + } + else + { + int num16 = Main.rand.Next(7); + if (Main.expertMode) + --num16; + Player player = Main.player[(int) Player.FindClosest(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16)]; + if (num16 == 0 && player.statLife < player.statLifeMax2) + { + Item.NewItem(i * 16, j * 16, 16, 16, 58); + if (Main.rand.Next(2) == 0) + Item.NewItem(i * 16, j * 16, 16, 16, 58); + if (Main.expertMode) + { + if (Main.rand.Next(2) == 0) + Item.NewItem(i * 16, j * 16, 16, 16, 58); + if (Main.rand.Next(2) == 0) + Item.NewItem(i * 16, j * 16, 16, 16, 58); + } + } + else + { + switch (num16) + { + case 1: + int Stack1 = Main.rand.Next(2, 7); + if (Main.expertMode) + Stack1 += Main.rand.Next(1, 7); + int Type1 = 8; + int Type2 = 282; + if (player.ZoneHallow) + { + Stack1 += Main.rand.Next(2, 7); + Type1 = 4387; + } + else if (num6 >= 22 && num6 <= 24 || player.ZoneCrimson) + { + Stack1 += Main.rand.Next(2, 7); + Type1 = 4386; + } + else if (num6 >= 16 && num6 <= 18 || player.ZoneCorrupt) + { + Stack1 += Main.rand.Next(2, 7); + Type1 = 4385; + } + else if (num6 >= 7 && num6 <= 9) + { + Stack1 += Main.rand.Next(2, 7); + Type1 = 4388; + } + else if (num6 >= 4 && num6 <= 6) + { + Type1 = 974; + Type2 = 286; + } + else if (num6 >= 34 && num6 <= 36) + { + Stack1 += Main.rand.Next(2, 7); + Type1 = 4383; + } + if (Main.tile[i, j].liquid > (byte) 0) + { + Item.NewItem(i * 16, j * 16, 16, 16, Type2, Stack1); + break; + } + Item.NewItem(i * 16, j * 16, 16, 16, Type1, Stack1); + break; + case 2: + int Stack2 = Main.rand.Next(10, 21); + int Type3 = 40; + if ((double) j < Main.rockLayer && WorldGen.genRand.Next(2) == 0) + Type3 = !Main.hardMode ? 42 : 168; + if (j > Main.UnderworldLayer) + Type3 = 265; + else if (Main.hardMode) + Type3 = Main.rand.Next(2) != 0 ? 47 : (WorldGen.SavedOreTiers.Silver != 168 ? 278 : 4915); + Item.NewItem(i * 16, j * 16, 16, 16, Type3, Stack2); + break; + case 3: + int Type4 = 28; + if (j > Main.UnderworldLayer || Main.hardMode) + Type4 = 188; + int Stack3 = 1; + if (Main.expertMode && Main.rand.Next(3) != 0) + ++Stack3; + Item.NewItem(i * 16, j * 16, 16, 16, Type4, Stack3); + break; + default: + if (num16 == 4 && (flag2 || (double) j > Main.rockLayer)) + { + int Type5 = 166; + if (flag2) + Type5 = 4423; + int Stack4 = Main.rand.Next(4) + 1; + if (Main.expertMode) + Stack4 += Main.rand.Next(4); + Item.NewItem(i * 16, j * 16, 16, 16, Type5, Stack4); + break; + } + if ((num16 == 4 || num16 == 5) && j < Main.UnderworldLayer && !Main.hardMode) + { + int Stack5 = Main.rand.Next(20, 41); + Item.NewItem(i * 16, j * 16, 16, 16, 965, Stack5); + break; + } + float num17 = (float) (200 + WorldGen.genRand.Next(-100, 101)); + if ((double) j < Main.worldSurface) + num17 *= 0.5f; + else if ((double) j < Main.rockLayer) + num17 *= 0.75f; + else if (j > Main.maxTilesY - 250) + num17 *= 1.25f; + float num18 = num17 * (float) (1.0 + (double) Main.rand.Next(-20, 21) * 0.00999999977648258); + if (Main.rand.Next(4) == 0) + num18 *= (float) (1.0 + (double) Main.rand.Next(5, 11) * 0.00999999977648258); + if (Main.rand.Next(8) == 0) + num18 *= (float) (1.0 + (double) Main.rand.Next(10, 21) * 0.00999999977648258); + if (Main.rand.Next(12) == 0) + num18 *= (float) (1.0 + (double) Main.rand.Next(20, 41) * 0.00999999977648258); + if (Main.rand.Next(16) == 0) + num18 *= (float) (1.0 + (double) Main.rand.Next(40, 81) * 0.00999999977648258); + if (Main.rand.Next(20) == 0) + num18 *= (float) (1.0 + (double) Main.rand.Next(50, 101) * 0.00999999977648258); + if (Main.expertMode) + num18 *= 2.5f; + if (Main.expertMode && Main.rand.Next(2) == 0) + num18 *= 1.25f; + if (Main.expertMode && Main.rand.Next(3) == 0) + num18 *= 1.5f; + if (Main.expertMode && Main.rand.Next(4) == 0) + num18 *= 1.75f; + float num19 = num18 * num11; + if (NPC.downedBoss1) + num19 *= 1.1f; + if (NPC.downedBoss2) + num19 *= 1.1f; + if (NPC.downedBoss3) + num19 *= 1.1f; + if (NPC.downedMechBoss1) + num19 *= 1.1f; + if (NPC.downedMechBoss2) + num19 *= 1.1f; + if (NPC.downedMechBoss3) + num19 *= 1.1f; + if (NPC.downedPlantBoss) + num19 *= 1.1f; + if (NPC.downedQueenBee) + num19 *= 1.1f; + if (NPC.downedGolemBoss) + num19 *= 1.1f; + if (NPC.downedPirates) + num19 *= 1.1f; + if (NPC.downedGoblins) + num19 *= 1.1f; + if (NPC.downedFrost) + num19 *= 1.1f; + while ((int) num19 > 0) + { + if ((double) num19 > 1000000.0) + { + int Stack6 = (int) ((double) num19 / 1000000.0); + if (Stack6 > 50 && Main.rand.Next(2) == 0) + Stack6 /= Main.rand.Next(3) + 1; + if (Main.rand.Next(2) == 0) + Stack6 /= Main.rand.Next(3) + 1; + num19 -= (float) (1000000 * Stack6); + Item.NewItem(i * 16, j * 16, 16, 16, 74, Stack6); + } + else if ((double) num19 > 10000.0) + { + int Stack7 = (int) ((double) num19 / 10000.0); + if (Stack7 > 50 && Main.rand.Next(2) == 0) + Stack7 /= Main.rand.Next(3) + 1; + if (Main.rand.Next(2) == 0) + Stack7 /= Main.rand.Next(3) + 1; + num19 -= (float) (10000 * Stack7); + Item.NewItem(i * 16, j * 16, 16, 16, 73, Stack7); + } + else if ((double) num19 > 100.0) + { + int Stack8 = (int) ((double) num19 / 100.0); + if (Stack8 > 50 && Main.rand.Next(2) == 0) + Stack8 /= Main.rand.Next(3) + 1; + if (Main.rand.Next(2) == 0) + Stack8 /= Main.rand.Next(3) + 1; + num19 -= (float) (100 * Stack8); + Item.NewItem(i * 16, j * 16, 16, 16, 72, Stack8); + } + else + { + int Stack9 = (int) num19; + if (Stack9 > 50 && Main.rand.Next(2) == 0) + Stack9 /= Main.rand.Next(3) + 1; + if (Main.rand.Next(2) == 0) + Stack9 /= Main.rand.Next(4) + 1; + if (Stack9 < 1) + Stack9 = 1; + num19 -= (float) Stack9; + Item.NewItem(i * 16, j * 16, 16, 16, 71, Stack9); + } + } + break; + } + } + } + } + WorldGen.destroyObject = false; + } + + public static int PlaceChest(int x, int y, ushort type = 21, bool notNearOtherChests = false, int style = 0) + { + int num = -1; + if (TileID.Sets.Boulders[(int) Main.tile[x, y + 1].type] || TileID.Sets.Boulders[(int) Main.tile[x + 1, y + 1].type]) + return -1; + TileObject objectData; + if (TileObject.CanPlace(x, y, (int) type, style, 1, out objectData)) + { + bool flag = true; + if (notNearOtherChests && Chest.NearOtherChests(x - 1, y - 1)) + flag = false; + if (flag) + { + TileObject.Place(objectData); + num = Chest.CreateChest(objectData.xCoord, objectData.yCoord); + } + } + else + num = -1; + if (num != -1 && Main.netMode == 1 && type == (ushort) 21) + NetMessage.SendData(34, number2: ((float) x), number3: ((float) y), number4: ((float) style)); + if (num != -1 && Main.netMode == 1 && type == (ushort) 467) + NetMessage.SendData(34, number: 4, number2: ((float) x), number3: ((float) y), number4: ((float) style)); + return num; + } + + public static void PlaceChestDirect(int x, int y, ushort type, int style, int id) + { + Chest.CreateChest(x, y - 1, id); + for (int index1 = 0; index1 <= 1; ++index1) + { + for (int index2 = -1; index2 <= 0; ++index2) + { + if (Main.tile[x + index1, y + index2] == null) + Main.tile[x + index1, y + index2] = new Tile(); + } + } + Main.tile[x, y - 1].active(true); + Main.tile[x, y - 1].frameY = (short) 0; + Main.tile[x, y - 1].frameX = (short) (36 * style); + Main.tile[x, y - 1].type = type; + Main.tile[x, y - 1].halfBrick(false); + Main.tile[x + 1, y - 1].active(true); + Main.tile[x + 1, y - 1].frameY = (short) 0; + Main.tile[x + 1, y - 1].frameX = (short) (18 + 36 * style); + Main.tile[x + 1, y - 1].type = type; + Main.tile[x + 1, y - 1].halfBrick(false); + Main.tile[x, y].active(true); + Main.tile[x, y].frameY = (short) 18; + Main.tile[x, y].frameX = (short) (36 * style); + Main.tile[x, y].type = type; + Main.tile[x, y].halfBrick(false); + Main.tile[x + 1, y].active(true); + Main.tile[x + 1, y].frameY = (short) 18; + Main.tile[x + 1, y].frameX = (short) (18 + 36 * style); + Main.tile[x + 1, y].type = type; + Main.tile[x + 1, y].halfBrick(false); + } + + public static void PlaceDresserDirect(int x, int y, ushort type, int style, int id) + { + Chest.CreateChest(x - 1, y - 1, id); + for (int index1 = -1; index1 <= 1; ++index1) + { + for (int index2 = -1; index2 <= 0; ++index2) + { + if (Main.tile[x + index1, y + index2] == null) + Main.tile[x + index1, y + index2] = new Tile(); + } + } + short num = (short) (style * 54); + Main.tile[x - 1, y - 1].active(true); + Main.tile[x - 1, y - 1].frameY = (short) 0; + Main.tile[x - 1, y - 1].frameX = num; + Main.tile[x - 1, y - 1].type = type; + Main.tile[x, y - 1].active(true); + Main.tile[x, y - 1].frameY = (short) 0; + Main.tile[x, y - 1].frameX = (short) ((int) num + 18); + Main.tile[x, y - 1].type = type; + Main.tile[x + 1, y - 1].active(true); + Main.tile[x + 1, y - 1].frameY = (short) 0; + Main.tile[x + 1, y - 1].frameX = (short) ((int) num + 36); + Main.tile[x + 1, y - 1].type = type; + Main.tile[x - 1, y].active(true); + Main.tile[x - 1, y].frameY = (short) 18; + Main.tile[x - 1, y].frameX = num; + Main.tile[x - 1, y].type = type; + Main.tile[x, y].active(true); + Main.tile[x, y].frameY = (short) 18; + Main.tile[x, y].frameX = (short) ((int) num + 18); + Main.tile[x, y].type = type; + Main.tile[x + 1, y].active(true); + Main.tile[x + 1, y].frameY = (short) 18; + Main.tile[x + 1, y].frameX = (short) ((int) num + 36); + Main.tile[x + 1, y].type = type; + } + + public static void CheckChest(int i, int j, int type) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int num1 = 0; + int num2 = j; + int num3 = num1 + (int) Main.tile[i, j].frameX / 18; + int Y = num2 + (int) Main.tile[i, j].frameY / 18 * -1; + while (num3 > 1) + num3 -= 2; + int X = num3 * -1 + i; + for (int index1 = X; index1 < X + 2; ++index1) + { + for (int index2 = Y; index2 < Y + 2; ++index2) + { + if (Main.tile[index1, index2] == null) + Main.tile[index1, index2] = new Tile(); + int num4 = (int) Main.tile[index1, index2].frameX / 18; + while (num4 > 1) + num4 -= 2; + if (!Main.tile[index1, index2].active() || (int) Main.tile[index1, index2].type != type || num4 != index1 - X || (int) Main.tile[index1, index2].frameY != (index2 - Y) * 18) + flag = true; + } + if (Main.tile[index1, Y + 2] == null) + Main.tile[index1, Y + 2] = new Tile(); + if ((!Main.tile[index1, Y + 2].active() || !Main.tileSolid[(int) Main.tile[index1, Y + 2].type]) && Chest.CanDestroyChest(X, Y)) + flag = true; + } + if (!flag) + return; + int chestItemDrop = WorldGen.GetChestItemDrop(i, j, type); + WorldGen.destroyObject = true; + for (int index3 = X; index3 < X + 2; ++index3) + { + for (int index4 = Y; index4 < Y + 3; ++index4) + { + if ((int) Main.tile[index3, index4].type == type && Main.tile[index3, index4].active()) + { + Chest.DestroyChest(index3, index4); + WorldGen.KillTile(index3, index4); + } + } + } + Item.NewItem(i * 16, j * 16, 32, 32, chestItemDrop); + WorldGen.destroyObject = false; + } + + private static int GetChestItemDrop(int x, int y, int type) + { + int index = (int) Main.tile[x, y].frameX / 36; + return type != 467 ? Chest.chestItemSpawn[index] : Chest.chestItemSpawn2[index]; + } + + public static bool PlaceActuator(int i, int j) + { + if (Main.tile[i, j].actuator()) + return false; + SoundEngine.PlaySound(0, i * 16, j * 16); + Main.tile[i, j].actuator(true); + return true; + } + + public static bool KillActuator(int i, int j) + { + if (!Main.tile[i, j].actuator()) + return false; + SoundEngine.PlaySound(0, i * 16, j * 16); + Main.tile[i, j].actuator(false); + if (Main.netMode != 1) + Item.NewItem(i * 16, j * 16, 16, 16, 849); + for (int index = 0; index < 5; ++index) + Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 50); + return true; + } + + public static bool PlaceWire(int i, int j) + { + if (Main.tile[i, j].wire()) + return false; + SoundEngine.PlaySound(0, i * 16, j * 16); + Main.tile[i, j].wire(true); + return true; + } + + public static bool KillWire(int i, int j) + { + if (!Main.tile[i, j].wire()) + return false; + SoundEngine.PlaySound(0, i * 16, j * 16); + Main.tile[i, j].wire(false); + if (Main.netMode != 1) + Item.NewItem(i * 16, j * 16, 16, 16, 530); + for (int index = 0; index < 5; ++index) + Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 50); + return true; + } + + public static bool PlaceWire2(int i, int j) + { + if (Main.tile[i, j].wire2()) + return false; + SoundEngine.PlaySound(0, i * 16, j * 16); + Main.tile[i, j].wire2(true); + return true; + } + + public static bool KillWire2(int i, int j) + { + if (!Main.tile[i, j].wire2()) + return false; + SoundEngine.PlaySound(0, i * 16, j * 16); + Main.tile[i, j].wire2(false); + if (Main.netMode != 1) + Item.NewItem(i * 16, j * 16, 16, 16, 530); + for (int index = 0; index < 5; ++index) + Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 50); + return true; + } + + public static bool PlaceWire3(int i, int j) + { + if (Main.tile[i, j].wire3()) + return false; + SoundEngine.PlaySound(0, i * 16, j * 16); + Main.tile[i, j].wire3(true); + return true; + } + + public static bool KillWire3(int i, int j) + { + if (!Main.tile[i, j].wire3()) + return false; + SoundEngine.PlaySound(0, i * 16, j * 16); + Main.tile[i, j].wire3(false); + if (Main.netMode != 1) + Item.NewItem(i * 16, j * 16, 16, 16, 530); + for (int index = 0; index < 5; ++index) + Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 50); + return true; + } + + public static bool PlaceWire4(int i, int j) + { + if (Main.tile[i, j].wire4()) + return false; + SoundEngine.PlaySound(0, i * 16, j * 16); + Main.tile[i, j].wire4(true); + return true; + } + + public static bool KillWire4(int i, int j) + { + if (!Main.tile[i, j].wire4()) + return false; + SoundEngine.PlaySound(0, i * 16, j * 16); + Main.tile[i, j].wire4(false); + if (Main.netMode != 1) + Item.NewItem(i * 16, j * 16, 16, 16, 530); + for (int index = 0; index < 5; ++index) + Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 50); + return true; + } + + public static bool IsFitToPlaceFlowerIn(int x, int y, int typeAttemptedToPlace) + { + if (y < 1 || y > Main.maxTilesY - 1) + return false; + Tile tile = Main.tile[x, y + 1]; + if (!tile.active() || tile.slope() != (byte) 0 || tile.halfBrick()) + return false; + if ((tile.type == (ushort) 2 || tile.type == (ushort) 78 || tile.type == (ushort) 380 || tile.type == (ushort) 477 || tile.type == (ushort) 579) && typeAttemptedToPlace == 3 || tile.type == (ushort) 23 && typeAttemptedToPlace == 24 || (tile.type == (ushort) 109 || tile.type == (ushort) 492) && typeAttemptedToPlace == 110) + return true; + return tile.type == (ushort) 199 && typeAttemptedToPlace == 201; + } + + private static bool SeaOatWaterCheck(int x, int y) + { + int num1 = 45; + int num2 = 20; + int num3 = 20; + int num4 = -1; + int num5 = num1 + 1; + int num6 = 0; + bool flag = false; + if (x <= WorldGen.beachDistance || x >= Main.maxTilesX - WorldGen.beachDistance) + { + flag = true; + num4 = 40; + num1 = 65; + num2 += 5; + } + for (int index1 = x - num1; index1 <= x + num1; ++index1) + { + for (int index2 = y - num2; index2 <= y + num2; ++index2) + { + if (WorldGen.InWorld(index1, index2) && !WorldGen.SolidTile(index1, index2) && Main.tile[index1, index2].liquid > (byte) 0) + { + num6 += (int) Main.tile[index1, index2].liquid; + int num7 = Math.Abs(index1 - x); + if (num7 < num5) + num5 = num7; + } + } + } + if (num6 / (int) byte.MaxValue >= num3) + { + if (!flag) + return true; + return false; + } + return flag; + } + + private static bool PlantSeaOat(int x, int y) + { + if (Main.tile[x, y].wall > (ushort) 0 || Main.tile[x, y].active() || Main.tile[x, y].liquid > (byte) 0 || !WorldGen.SolidTileAllowBottomSlope(x, y + 1) || !TileID.Sets.Conversion.Sand[(int) Main.tile[x, y + 1].type] || !WorldGen.SeaOatWaterCheck(x, y)) + return false; + Main.tile[x, y].active(true); + Main.tile[x, y].slope((byte) 0); + Main.tile[x, y].halfBrick(false); + Main.tile[x, y].type = (ushort) 529; + Main.tile[x, y].frameX = (short) (WorldGen.genRand.Next(5) * 18); + int num = 0; + Main.tile[x, y].frameY = (short) (num * 34); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, x, y, 1); + return true; + } + + private static bool CheckSeaOat(int x, int y) + { + if (WorldGen.SeaOatWaterCheck(x, y)) + return true; + WorldGen.KillTile(x, y); + if (Main.netMode == 2) + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y)); + return false; + } + + private static bool GrowSeaOat(int x, int y) + { + if (Main.tile[x, y].frameX < (short) 180) + Main.tile[x, y].frameX += (short) 90; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, x, y, 1); + return false; + } + + private static int GetWaterDepth(int x, int y) + { + int j1 = y; + while (!WorldGen.SolidTile(x, j1)) + { + ++j1; + if (j1 > Main.maxTilesY - 1) + return 0; + } + int num = j1 - 1; + int j2 = num; + while (Main.tile[x, j2].liquid > (byte) 0 && !WorldGen.SolidTile(x, j2)) + --j2; + return num - j2; + } + + private static int CountGrowingPlantTiles(int x, int y, int range, int type) + { + int num = 0; + for (int index1 = x - range; index1 <= x + range; ++index1) + { + for (int index2 = y - range * 3; index2 <= y + range * 3; ++index2) + { + if (Main.tile[index1, index2].active() && (int) Main.tile[index1, index2].type == type) + ++num; + } + } + return num; + } + + private static bool PlaceBamboo(int x, int y) + { + int num1 = 2; + int num2 = 5; + int num3 = WorldGen.genRand.Next(1, 21); + if (Main.tile[x, y].wall > (ushort) 0) + return false; + Tile tile1 = Main.tile[x, y + 1]; + if (tile1.type != (ushort) 571 && tile1.type != (ushort) 60) + return false; + int waterDepth = WorldGen.GetWaterDepth(x, y); + if (waterDepth < num1 || waterDepth > num2) + return false; + int num4 = WorldGen.CountGrowingPlantTiles(x, y, 5, 571); + int num5 = 1; + if (tile1.type == (ushort) 571) + { + while (!WorldGen.SolidTile(x, y + num5)) + ++num5; + if (num5 + num4 / WorldGen.genRand.Next(1, 21) > num3) + return false; + } + else + num4 += 25; + if (num4 + num5 * 2 > WorldGen.genRand.Next(40, 61)) + return false; + Tile tile2 = Main.tile[x, y]; + tile2.active(true); + tile2.type = (ushort) 571; + tile2.frameX = (short) 0; + tile2.frameY = (short) 0; + tile2.slope((byte) 0); + tile2.halfBrick(false); + WorldGen.SquareTileFrame(x, y); + return true; + } + + public static void CheckBamboo(int x, int y) + { + Tile tile1 = Main.tile[x, y + 1]; + if (tile1 == null) + return; + if (!tile1.active() || tile1.type != (ushort) 60 && tile1.type != (ushort) 571) + { + WorldGen.KillTile(x, y); + if (Main.netMode == 2) + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y)); + WorldGen.SquareTileFrame(x, y); + } + else + { + Tile tile2 = Main.tile[x, y - 1]; + if (tile2 == null) + return; + Tile tile3 = Main.tile[x, y]; + if (tile3 == null) + return; + int num1 = !tile2.active() ? 0 : (tile2.type == (ushort) 571 ? 1 : 0); + bool flag = tile1.active() && tile1.type == (ushort) 571; + int num2 = (int) tile3.frameX / 18; + tile3.frameY = (short) 0; + if (num1 != 0) + { + if (flag) + { + if ((num2 < 5 ? 0 : (num2 <= 14 ? 1 : 0)) != 0) + return; + tile3.frameX = (short) (WorldGen.genRand.Next(5, 15) * 18); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, x, y, 1); + } + else + { + if ((num2 < 1 ? 0 : (num2 <= 4 ? 1 : 0)) != 0) + return; + tile3.frameX = (short) (WorldGen.genRand.Next(1, 5) * 18); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, x, y, 1); + } + } + else if (flag) + { + if ((num2 < 15 ? 0 : (num2 <= 19 ? 1 : 0)) != 0) + return; + tile3.frameX = (short) (WorldGen.genRand.Next(15, 20) * 18); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, x, y, 1); + } + else + { + if ((uint) num2 <= 0U) + return; + tile3.frameX = (short) 0; + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, x, y, 1); + } + } + } + + public static void PlaceUnderwaterPlant(ushort type, int x, int y) + { + if (!WorldGen.CanUnderwaterPlantGrowHere(type, x, y, false)) + return; + Tile tileSafely1 = Framing.GetTileSafely(x, y + 1); + tileSafely1.slope((byte) 0); + tileSafely1.halfBrick(false); + Tile tileSafely2 = Framing.GetTileSafely(x, y); + tileSafely2.active(true); + tileSafely2.type = type; + tileSafely2.frameX = (short) 0; + tileSafely2.frameY = (short) 0; + tileSafely2.slope((byte) 0); + tileSafely2.halfBrick(false); + WorldGen.SquareTileFrame(x, y); + } + + public static bool CanUnderwaterPlantGrowHere(ushort type, int x, int y, bool ignoreSelf) + { + if (!WorldGen.InWorld(x, y, 50)) + return false; + Tile tileSafely1 = Framing.GetTileSafely(x, y); + if (!ignoreSelf && tileSafely1.active()) + return false; + for (int index = 0; index < 3; ++index) + { + Tile tileSafely2 = Framing.GetTileSafely(x, y - index); + if (tileSafely2.liquid == (byte) 0 || tileSafely2.liquidType() != (byte) 0) + return false; + } + Tile tileSafely3 = Framing.GetTileSafely(x, y + 1); + if (!tileSafely3.nactive() || (TileID.Sets.Conversion.Sand[(int) tileSafely3.type] ? 1 : ((int) type == (int) tileSafely3.type ? 1 : 0)) == 0) + return false; + switch (Framing.GetTileSafely(x, y).wall) + { + case 0: + case 63: + case 64: + case 65: + case 66: + case 67: + case 68: + case 69: + case 80: + case 81: + return true; + default: + return false; + } + } + + public static void CheckUnderwaterPlant(ushort type, int x, int y) + { + if (!WorldGen.CanUnderwaterPlantGrowHere(type, x, y, true)) + { + WorldGen.KillTile(x, y); + if (Main.netMode == 2) + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y)); + WorldGen.SquareTileFrame(x, y); + } + else + { + Tile tileSafely1 = Framing.GetTileSafely(x, y - 1); + Tile tileSafely2 = Framing.GetTileSafely(x, y); + Tile tileSafely3 = Framing.GetTileSafely(x, y + 1); + int num1 = !tileSafely1.active() ? 0 : ((int) tileSafely1.type == (int) type ? 1 : 0); + bool flag = tileSafely3.active() && (int) tileSafely3.type == (int) type; + int num2 = (int) tileSafely2.frameX / 18; + tileSafely2.frameY = (short) 0; + if (num1 != 0) + { + if ((1 > num2 ? 0 : (num2 <= 7 ? 1 : 0)) != 0) + return; + tileSafely2.frameX = (short) (WorldGen.genRand.Next(1, 8) * 18); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, x, y, 1); + } + else if (flag) + { + if ((7 > num2 ? 0 : (num2 <= 12 ? 1 : 0)) != 0) + return; + tileSafely2.frameX = (short) (WorldGen.genRand.Next(7, 13) * 18); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, x, y, 1); + } + else + { + if ((uint) num2 <= 0U) + return; + tileSafely2.frameX = (short) 0; + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, x, y, 1); + } + } + } + + public static Point PlaceCatTail(int x, int j) + { + int index1 = j; + Point point = new Point(-1, -1); + if (x < 50 || x > Main.maxTilesX - 50 || index1 < 50 || index1 > Main.maxTilesY - 50 || Main.tile[x, index1].active() && Main.tile[x, index1].type != (ushort) 71 || Main.tile[x, index1].liquid == (byte) 0 || Main.tile[x, index1].liquidType() != (byte) 0) + return point; + while (Main.tile[x, index1].liquid > (byte) 0 && index1 > 50) + --index1; + int index2 = index1 + 1; + if (Main.tile[x, index2].active() || Main.tile[x, index2 - 1].active() || Main.tile[x, index2].liquid == (byte) 0 || Main.tile[x, index2].liquidType() != (byte) 0 || Main.tile[x, index2].wall != (ushort) 0 && Main.tile[x, index2].wall != (ushort) 80 && Main.tile[x, index2].wall != (ushort) 81 && Main.tile[x, index2].wall != (ushort) 69 && (Main.tile[x, index2].wall < (ushort) 63 || Main.tile[x, index2].wall > (ushort) 68)) + return point; + int num1 = 7; + int num2 = 0; + for (int index3 = x - num1; index3 <= x + num1; ++index3) + { + for (int index4 = index2 - num1; index4 <= index2 + num1; ++index4) + { + if (Main.tile[index3, index4].active() && Main.tile[index3, index4].type == (ushort) 519) + { + ++num2; + break; + } + } + } + if (num2 > 3) + return point; + int index5; + for (index5 = index2; (!Main.tile[x, index5].active() || !Main.tileSolid[(int) Main.tile[x, index5].type] || Main.tileSolidTop[(int) Main.tile[x, index5].type]) && index5 < Main.maxTilesY - 50; ++index5) + { + if (Main.tile[x, index5].active() && Main.tile[x, index5].type != (ushort) 71) + return point; + } + int num3 = WorldGen.catTailDistance - 1; + if (index5 - index2 > num3 || index5 - index2 < 2) + return point; + int type = (int) Main.tile[x, index5].type; + if (!Main.tile[x, index5].nactive()) + return point; + int num4 = -1; + switch (type) + { + case 2: + case 477: + num4 = 0; + break; + case 23: + case 112: + num4 = 72; + break; + case 53: + if (x < WorldGen.beachDistance || x > Main.maxTilesX - WorldGen.beachDistance) + return point; + num4 = 18; + break; + case 70: + num4 = 90; + break; + case 199: + case 234: + num4 = 54; + break; + } + if (num4 < 0) + return point; + if (Main.tile[x, index5].topSlope() && WorldGen.gen && WorldGen.genRand.Next(3) != 0) + Main.tile[x, index5].slope((byte) 0); + else if (Main.tile[x, index5].topSlope() || Main.tile[x, index5].halfBrick()) + return point; + int index6 = index5 - 1; + Main.tile[x, index6].active(true); + Main.tile[x, index6].type = (ushort) 519; + Main.tile[x, index6].frameX = (short) 0; + Main.tile[x, index6].frameY = (short) num4; + Main.tile[x, index6].halfBrick(false); + Main.tile[x, index6].slope((byte) 0); + WorldGen.SquareTileFrame(x, index6); + point = new Point(x, index6); + return point; + } + + public static void CheckCatTail(int x, int j) + { + if (Main.tile[x, j] == null) + return; + int num1 = j; + bool flag = false; + int index1 = num1; + while ((!Main.tile[x, index1].active() || !Main.tileSolid[(int) Main.tile[x, index1].type] || Main.tileSolidTop[(int) Main.tile[x, index1].type]) && index1 < Main.maxTilesY - 50) + { + if (Main.tile[x, index1].active() && Main.tile[x, index1].type != (ushort) 519) + flag = true; + if (Main.tile[x, index1].active()) + { + ++index1; + if (Main.tile[x, index1] == null) + return; + } + else + break; + } + int index2 = index1 - 1; + if (Main.tile[x, index2] == null) + return; + while (Main.tile[x, index2] != null && Main.tile[x, index2].liquid > (byte) 0 && index2 > 50) + { + if (Main.tile[x, index2].active() && Main.tile[x, index2].type != (ushort) 519 || Main.tile[x, index2].liquidType() != (byte) 0) + flag = true; + --index2; + if (Main.tile[x, index2] == null) + return; + } + int index3 = index2 + 1; + if (Main.tile[x, index3] == null) + return; + int num2 = index3; + int catTailDistance = WorldGen.catTailDistance; + if (index1 - num2 > catTailDistance) + flag = true; + int type = (int) Main.tile[x, index1].type; + int num3 = -1; + switch (type) + { + case 2: + case 477: + num3 = 0; + break; + case 23: + case 112: + num3 = 72; + break; + case 53: + num3 = 18; + break; + case 70: + num3 = 90; + break; + case 199: + case 234: + num3 = 54; + break; + } + if (!Main.tile[x, index1].nactive()) + flag = true; + if (num3 < 0) + flag = true; + int index4 = index1 - 1; + if (Main.tile[x, index4] != null && !Main.tile[x, index4].active()) + { + for (int index5 = index4; index5 >= num2; --index5) + { + if (Main.tile[x, index5] == null) + return; + if (Main.tile[x, index5].active() && Main.tile[x, index5].type == (ushort) 519) + { + index4 = index5; + break; + } + } + } + while (Main.tile[x, index4] != null && Main.tile[x, index4].active() && Main.tile[x, index4].type == (ushort) 519) + --index4; + int tileY = index4 + 1; + if (Main.tile[x, index1 - 1] != null && Main.tile[x, index1 - 1].liquid < (byte) 127 && WorldGen.genRand.Next(4) == 0) + flag = true; + if (Main.tile[x, tileY] != null && Main.tile[x, tileY].frameX >= (short) 180 && Main.tile[x, tileY].liquid > (byte) 127 && WorldGen.genRand.Next(4) == 0) + flag = true; + if (Main.tile[x, tileY] != null && Main.tile[x, index1 - 1] != null && Main.tile[x, tileY].frameX > (short) 18) + { + if (Main.tile[x, index1 - 1].frameX < (short) 36 || Main.tile[x, index1 - 1].frameX > (short) 72) + flag = true; + else if (Main.tile[x, tileY].frameX < (short) 90) + flag = true; + else if (Main.tile[x, tileY].frameX >= (short) 108 && Main.tile[x, tileY].frameX <= (short) 162) + Main.tile[x, tileY].frameX = (short) 90; + } + if (index1 > tileY + 4 && Main.tile[x, tileY + 4] != null && Main.tile[x, tileY + 3] != null && Main.tile[x, tileY + 4].liquid == (byte) 0 && Main.tile[x, tileY + 3].type == (ushort) 519) + flag = true; + if (flag) + { + int num4 = num2; + if (tileY < num2) + num4 = tileY; + for (int j1 = num4 - 4; j1 <= index1; ++j1) + { + if (Main.tile[x, j1] != null && Main.tile[x, j1].active() && Main.tile[x, j1].type == (ushort) 519) + { + WorldGen.KillTile(x, j1); + if (Main.netMode == 2) + NetMessage.SendData(17, number2: ((float) x), number3: ((float) j1)); + WorldGen.SquareTileFrame(x, j1); + } + } + } + else + { + if (num3 == (int) Main.tile[x, tileY].frameY) + return; + for (int index6 = tileY; index6 < index1; ++index6) + { + if (Main.tile[x, index6] != null && Main.tile[x, index6].active() && Main.tile[x, index6].type == (ushort) 519) + { + Main.tile[x, index6].frameY = (short) num3; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, x, tileY, 2); + } + } + } + } + + public static void GrowCheckSeaweed(int x, int y) + { + int maxValue = 1; + if (Main.netMode == 1) + return; + if (Main.tile[x, y].type == (ushort) 549 && Main.tile[x, y].liquid < (byte) 200 || Main.tile[x, y - 1].liquid < (byte) 200) + { + if (!Main.tile[x, y].active() || Main.tile[x, y].type != (ushort) 549 || WorldGen.genRand.Next(2) != 0) + return; + WorldGen.KillTile(x, y); + if (Main.netMode != 2) + return; + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y)); + } + else + { + if (Main.tile[x, y - 1].active() || Main.tile[x, y - 2].active() || WorldGen.genRand.Next(maxValue) != 0 || Main.tile[x, y - 2].liquid != byte.MaxValue || Main.tile[x, y - 3].liquid != byte.MaxValue) + return; + int num1 = 17; + int num2 = 4; + int num3 = 30; + int num4 = 0; + for (int index1 = x - num2; index1 <= x + num2; ++index1) + { + for (int index2 = y; index2 <= y + num2 * 3; ++index2) + { + if (Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 549) + { + ++num4; + if (num4 > num3) + return; + } + } + } + int j = y; + while (!WorldGen.SolidTile(x, j) && j < Main.maxTilesY - 50) + ++j; + if (j - y >= num1 - WorldGen.genRand.Next(20)) + return; + WorldGen.PlaceTile(x, y - 1, 549, true); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, x, y - 1, 2); + } + } + + public static void GrowCatTail(int x, int j) + { + if (Main.netMode == 1) + return; + int index1 = j; + while (Main.tile[x, index1].liquid > (byte) 0 && index1 > 50) + --index1; + int index2 = index1 + 1; + while ((!Main.tile[x, index2].active() || !Main.tileSolid[(int) Main.tile[x, index2].type] || Main.tileSolidTop[(int) Main.tile[x, index2].type]) && index2 < Main.maxTilesY - 50) + ++index2; + int index3 = index2 - 1; + while (Main.tile[x, index3].active() && Main.tile[x, index3].type == (ushort) 519) + --index3; + int index4 = index3 + 1; + if (Main.tile[x, index4].frameX == (short) 90 && Main.tile[x, index4 - 1].active() && Main.tileCut[(int) Main.tile[x, index4 - 1].type]) + { + WorldGen.KillTile(x, index4 - 1); + if (Main.netMode == 2) + NetMessage.SendData(17, number2: ((float) x), number3: ((float) (index4 - 1))); + } + if (Main.tile[x, index4 - 1].active()) + return; + if (Main.tile[x, index4].frameX == (short) 0) + { + Main.tile[x, index4].frameX = (short) 18; + WorldGen.SquareTileFrame(x, index4); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, x, index4, 2); + } + else if (Main.tile[x, index4].frameX == (short) 18) + { + Main.tile[x, index4].frameX = (short) (18 * WorldGen.genRand.Next(2, 5)); + Main.tile[x, index4 - 1].active(true); + Main.tile[x, index4 - 1].type = (ushort) 519; + Main.tile[x, index4 - 1].frameX = (short) 90; + Main.tile[x, index4 - 1].frameY = Main.tile[x, index4].frameY; + Main.tile[x, index4 - 1].halfBrick(false); + Main.tile[x, index4 - 1].slope((byte) 0); + WorldGen.SquareTileFrame(x, index4); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, x, index4, 2); + } + else if (Main.tile[x, index4].frameX == (short) 90) + { + if (Main.tile[x, index4 - 1].liquid == (byte) 0) + { + if (!Main.tile[x, index4 - 2].active() && (Main.tile[x, index4].liquid > (byte) 0 || Main.tile[x, index4 + 1].liquid > (byte) 0 || Main.tile[x, index4 + 2].liquid > (byte) 0) && WorldGen.genRand.Next(3) == 0) + { + Main.tile[x, index4].frameX = (short) 108; + Main.tile[x, index4 - 1].active(true); + Main.tile[x, index4 - 1].type = (ushort) 519; + Main.tile[x, index4 - 1].frameX = (short) 90; + Main.tile[x, index4 - 1].frameY = Main.tile[x, index4].frameY; + Main.tile[x, index4 - 1].halfBrick(false); + Main.tile[x, index4 - 1].slope((byte) 0); + WorldGen.SquareTileFrame(x, index4); + } + else + { + int num = WorldGen.genRand.Next(3); + Main.tile[x, index4].frameX = (short) (126 + num * 18); + Main.tile[x, index4 - 1].active(true); + Main.tile[x, index4 - 1].type = (ushort) 519; + Main.tile[x, index4 - 1].frameX = (short) (180 + num * 18); + Main.tile[x, index4 - 1].frameY = Main.tile[x, index4].frameY; + Main.tile[x, index4 - 1].halfBrick(false); + Main.tile[x, index4 - 1].slope((byte) 0); + WorldGen.SquareTileFrame(x, index4); + } + } + else + { + Main.tile[x, index4].frameX = (short) 108; + Main.tile[x, index4 - 1].active(true); + Main.tile[x, index4 - 1].type = (ushort) 519; + Main.tile[x, index4 - 1].frameX = (short) 90; + Main.tile[x, index4 - 1].frameY = Main.tile[x, index4].frameY; + Main.tile[x, index4 - 1].halfBrick(false); + Main.tile[x, index4 - 1].slope((byte) 0); + WorldGen.SquareTileFrame(x, index4); + } + } + WorldGen.SquareTileFrame(x, index4 - 1, false); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, x, index4, 2); + } + + public static bool PlaceLilyPad(int x, int j) + { + int index1 = j; + if (x < 50 || x > Main.maxTilesX - 50 || index1 < 50 || index1 > Main.maxTilesY - 50 || Main.tile[x, index1].active() || Main.tile[x, index1].liquid == (byte) 0 || Main.tile[x, index1].liquidType() != (byte) 0) + return false; + while (Main.tile[x, index1].liquid > (byte) 0 && index1 > 50) + --index1; + int j1 = index1 + 1; + if (Main.tile[x, j1].active() || Main.tile[x, j1 - 1].active() || Main.tile[x, j1].liquid == (byte) 0 || Main.tile[x, j1].liquidType() != (byte) 0 || Main.tile[x, j1].wall != (ushort) 0 && Main.tile[x, j1].wall != (ushort) 15 && Main.tile[x, j1].wall != (ushort) 70 && (Main.tile[x, j1].wall < (ushort) 63 || Main.tile[x, j1].wall > (ushort) 68)) + return false; + int num1 = 5; + int num2 = 0; + for (int index2 = x - num1; index2 <= x + num1; ++index2) + { + for (int index3 = j1 - num1; index3 <= j1 + num1; ++index3) + { + if (Main.tile[index2, index3].active() && Main.tile[index2, index3].type == (ushort) 518) + ++num2; + } + } + if (num2 > 3) + return false; + int index4; + for (index4 = j1; (!Main.tile[x, index4].active() || !Main.tileSolid[(int) Main.tile[x, index4].type] || Main.tileSolidTop[(int) Main.tile[x, index4].type]) && index4 < Main.maxTilesY - 50; ++index4) + { + if (Main.tile[x, index4].active() && Main.tile[x, index4].type == (ushort) 519) + return false; + } + int num3 = 12; + if (index4 - j1 > num3 || index4 - j1 < 3) + return false; + int type = (int) Main.tile[x, index4].type; + int num4 = -1; + if (type == 2 || type == 477) + num4 = 0; + if (type == 109 || type == 109 || type == 116) + num4 = 18; + if (type == 60) + num4 = 36; + if (num4 < 0) + return false; + Main.tile[x, j1].active(true); + Main.tile[x, j1].type = (ushort) 518; + if (WorldGen.genRand.Next(2) == 0) + Main.tile[x, j1].frameX = (short) (18 * WorldGen.genRand.Next(3)); + else if (WorldGen.genRand.Next(15) == 0) + { + Main.tile[x, j1].frameX = (short) (18 * WorldGen.genRand.Next(18)); + } + else + { + int num5 = Main.maxTilesX / 5; + Main.tile[x, j1].frameX = x >= num5 ? (x >= num5 * 2 ? (x >= num5 * 3 ? (x >= num5 * 4 ? (short) (18 * WorldGen.genRand.Next(12, 15)) : (short) (18 * WorldGen.genRand.Next(15, 18))) : (short) (18 * WorldGen.genRand.Next(3, 6))) : (short) (18 * WorldGen.genRand.Next(9, 12))) : (short) (18 * WorldGen.genRand.Next(6, 9)); + } + Main.tile[x, j1].frameY = (short) num4; + Main.tile[x, j1].halfBrick(false); + Main.tile[x, j1].slope((byte) 0); + WorldGen.SquareTileFrame(x, j1); + return true; + } + + public static void CheckLilyPad(int x, int y) + { + if (Main.netMode == 1) + return; + if (Main.tile[x, y].liquidType() != (byte) 0) + { + WorldGen.KillTile(x, y); + if (Main.netMode != 2) + return; + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y)); + } + else + { + int index = y; + while ((!Main.tile[x, index].active() || !Main.tileSolid[(int) Main.tile[x, index].type] || Main.tileSolidTop[(int) Main.tile[x, index].type]) && index < Main.maxTilesY - 50) + { + ++index; + if (Main.tile[x, index] == null) + return; + } + int type = (int) Main.tile[x, index].type; + int num = -1; + if (type == 2 || type == 477) + num = 0; + if (type == 109 || type == 109 || type == 116) + num = 18; + if (type == 60) + num = 36; + if (num >= 0) + { + if (num != (int) Main.tile[x, y].frameY) + { + Main.tile[x, y].frameY = (short) num; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, x, y, 2); + } + if (Main.tile[x, y - 1].liquid > (byte) 0 && !Main.tile[x, y - 1].active()) + { + Main.tile[x, y - 1].active(true); + Main.tile[x, y - 1].type = (ushort) 518; + Main.tile[x, y - 1].frameX = Main.tile[x, y].frameX; + Main.tile[x, y - 1].frameY = Main.tile[x, y].frameY; + Main.tile[x, y - 1].halfBrick(false); + Main.tile[x, y - 1].slope((byte) 0); + Main.tile[x, y].active(false); + Main.tile[x, y].type = (ushort) 0; + WorldGen.SquareTileFrame(x, y - 1, false); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, x, y - 1, 3); + } + else + { + if (Main.tile[x, y].liquid != (byte) 0) + return; + Tile tileSafely = Framing.GetTileSafely(x, y + 1); + if (!tileSafely.active()) + { + Main.tile[x, y + 1].active(true); + Main.tile[x, y + 1].type = (ushort) 518; + Main.tile[x, y + 1].frameX = Main.tile[x, y].frameX; + Main.tile[x, y + 1].frameY = Main.tile[x, y].frameY; + Main.tile[x, y + 1].halfBrick(false); + Main.tile[x, y + 1].slope((byte) 0); + Main.tile[x, y].active(false); + Main.tile[x, y].type = (ushort) 0; + WorldGen.SquareTileFrame(x, y + 1, false); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, x, y, 3); + } + else + { + if (!tileSafely.active() || TileID.Sets.Platforms[(int) tileSafely.type] || Main.tileSolid[(int) tileSafely.type] && !Main.tileSolidTop[(int) tileSafely.type]) + return; + WorldGen.KillTile(x, y); + if (Main.netMode != 2) + return; + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y)); + } + } + } + else + { + WorldGen.KillTile(x, y); + if (Main.netMode != 2) + return; + NetMessage.SendData(17, number2: ((float) x), number3: ((float) y)); + } + } + } + + public static bool PlaceTile( + int i, + int j, + int Type, + bool mute = false, + bool forced = false, + int plr = -1, + int style = 0) + { + int index1 = Type; + if (WorldGen.gen && Main.tile[i, j].active() && Main.tile[i, j].type == (ushort) 488 || index1 >= 623) + return false; + bool flag = false; + if (i >= 0 && j >= 0 && i < Main.maxTilesX && j < Main.maxTilesY) + { + Tile trackCache = Main.tile[i, j]; + if (trackCache == null) + { + trackCache = new Tile(); + Main.tile[i, j] = trackCache; + } + if (forced || Collision.EmptyTile(i, j) || !Main.tileSolid[index1] || index1 == 23 && trackCache.type == (ushort) 0 && trackCache.active() || index1 == 199 && trackCache.type == (ushort) 0 && trackCache.active() || index1 == 2 && trackCache.type == (ushort) 0 && trackCache.active() || index1 == 109 && trackCache.type == (ushort) 0 && trackCache.active() || index1 == 60 && trackCache.type == (ushort) 59 && trackCache.active() || index1 == 70 && trackCache.type == (ushort) 59 && trackCache.active() || Main.tileMoss[index1] && (trackCache.type == (ushort) 1 || trackCache.type == (ushort) 38) && trackCache.active()) + { + if (index1 == 23 && (trackCache.type != (ushort) 0 || !trackCache.active()) || index1 == 199 && (trackCache.type != (ushort) 0 || !trackCache.active()) || index1 == 2 && (trackCache.type != (ushort) 0 || !trackCache.active()) || index1 == 109 && (trackCache.type != (ushort) 0 || !trackCache.active()) || index1 == 60 && (trackCache.type != (ushort) 59 || !trackCache.active()) || index1 == 70 && (trackCache.type != (ushort) 59 || !trackCache.active())) + return false; + if (Main.tileMoss[index1]) + { + if (trackCache.type != (ushort) 1 && trackCache.type != (ushort) 38 || !trackCache.active()) + return false; + if (trackCache.type == (ushort) 38) + { + switch (index1) + { + case 381: + index1 = 517; + break; + case 534: + index1 = 535; + break; + case 536: + index1 = 537; + break; + case 539: + index1 = 540; + break; + default: + index1 = 512 + index1 - 179; + break; + } + } + } + if (index1 == 81) + { + if (Main.tile[i, j - 1] == null) + Main.tile[i, j - 1] = new Tile(); + if (Main.tile[i, j + 1] == null) + Main.tile[i, j + 1] = new Tile(); + if (Main.tile[i, j - 1].active() || !Main.tile[i, j + 1].active() || !Main.tileSolid[(int) Main.tile[i, j + 1].type] || Main.tile[i, j + 1].halfBrick() || Main.tile[i, j + 1].slope() != (byte) 0) + return false; + } + if ((index1 == 373 || index1 == 375 || index1 == 374 || index1 == 461) && (Main.tile[i, j - 1] == null || Main.tile[i, j - 1].bottomSlope())) + return false; + if (trackCache.liquid > (byte) 0 || trackCache.checkingLiquid()) + { + switch (index1) + { + case 3: + case 20: + case 24: + case 27: + case 32: + case 51: + case 69: + case 72: + case 201: + case 352: + case 529: + return false; + case 4: + if (style != 8 && style != 11 && style != 17) + return false; + break; + } + } + if (TileID.Sets.ResetsHalfBrickPlacementAttempt[index1] && (!trackCache.active() || !Main.tileFrameImportant[(int) trackCache.type])) + { + trackCache.halfBrick(false); + trackCache.frameY = (short) 0; + trackCache.frameX = (short) 0; + } + if (index1 == 3 || index1 == 24 || index1 == 110 || index1 == 201) + { + if (WorldGen.IsFitToPlaceFlowerIn(i, j, index1)) + { + if (index1 == 24 && WorldGen.genRand.Next(13) == 0) + { + trackCache.active(true); + trackCache.type = (ushort) 32; + WorldGen.SquareTileFrame(i, j); + } + else if (index1 == 201 && WorldGen.genRand.Next(13) == 0) + { + trackCache.active(true); + trackCache.type = (ushort) 352; + WorldGen.SquareTileFrame(i, j); + } + else if (Main.tile[i, j + 1].type == (ushort) 78 || Main.tile[i, j + 1].type == (ushort) 380 || Main.tile[i, j + 1].type == (ushort) 579) + { + trackCache.active(true); + trackCache.type = (ushort) index1; + int num = WorldGen.genRand.NextFromList(6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 27, 30, 33, 36, 39, 42); + switch (num) + { + case 21: + case 24: + case 27: + case 30: + case 33: + case 36: + case 39: + case 42: + num += WorldGen.genRand.Next(3); + break; + } + trackCache.frameX = (short) (num * 18); + } + else if ((trackCache.wall == (ushort) 0 || trackCache.wall == (ushort) 106 || trackCache.wall == (ushort) 107 || trackCache.wall >= (ushort) 63 && trackCache.wall <= (ushort) 70) && (Main.tile[i, j + 1].wall == (ushort) 0 || Main.tile[i, j + 1].wall == (ushort) 106 || Main.tile[i, j + 1].wall == (ushort) 107 || Main.tile[i, j + 1].wall >= (ushort) 63 && Main.tile[i, j + 1].wall <= (ushort) 70)) + { + if (WorldGen.genRand.Next(50) == 0 || (index1 == 24 || index1 == 201) && WorldGen.genRand.Next(40) == 0) + { + trackCache.active(true); + trackCache.type = (ushort) index1; + trackCache.frameX = index1 != 201 ? (short) 144 : (short) 270; + } + else if (WorldGen.genRand.Next(35) == 0 || Main.tile[i, j].wall >= (ushort) 63 && Main.tile[i, j].wall <= (ushort) 70) + { + trackCache.active(true); + trackCache.type = (ushort) index1; + int num = WorldGen.genRand.NextFromList(6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20); + if (index1 == 201) + num = WorldGen.genRand.NextFromList(6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22); + trackCache.frameX = (short) (num * 18); + } + else + { + trackCache.active(true); + trackCache.type = (ushort) index1; + trackCache.frameX = (short) (WorldGen.genRand.Next(6) * 18); + } + } + } + } + else + { + switch (index1) + { + case 61: + if (j + 1 < Main.maxTilesY && Main.tile[i, j + 1].active() && Main.tile[i, j + 1].slope() == (byte) 0 && !Main.tile[i, j + 1].halfBrick() && Main.tile[i, j + 1].type == (ushort) 60) + { + if (WorldGen.genRand.Next(16) == 0 && (double) j > Main.worldSurface) + { + trackCache.active(true); + trackCache.type = (ushort) 69; + WorldGen.SquareTileFrame(i, j); + break; + } + if (WorldGen.genRand.Next(60) == 0 && (double) j > Main.rockLayer) + { + trackCache.active(true); + trackCache.type = (ushort) index1; + trackCache.frameX = (short) 144; + break; + } + if (WorldGen.genRand.Next(230) == 0 && (double) j > Main.rockLayer) + { + trackCache.active(true); + trackCache.type = (ushort) index1; + trackCache.frameX = (short) 162; + break; + } + if (WorldGen.genRand.Next(15) == 0) + { + trackCache.active(true); + trackCache.type = (ushort) index1; + trackCache.frameX = WorldGen.genRand.Next(3) == 0 ? (short) (WorldGen.genRand.Next(13) * 18 + 180) : (short) (WorldGen.genRand.Next(2) * 18 + 108); + break; + } + trackCache.active(true); + trackCache.type = (ushort) index1; + trackCache.frameX = (short) (WorldGen.genRand.Next(6) * 18); + break; + } + break; + case 71: + if (j + 1 < Main.maxTilesY && Main.tile[i, j + 1].active() && Main.tile[i, j + 1].slope() == (byte) 0 && !Main.tile[i, j + 1].halfBrick() && Main.tile[i, j + 1].type == (ushort) 70) + { + Point point = new Point(-1, -1); + if ((double) j > Main.worldSurface) + point = WorldGen.PlaceCatTail(i, j); + if (WorldGen.InWorld(point.X, point.Y)) + { + if (WorldGen.gen) + { + int num = WorldGen.genRand.Next(14); + for (int index2 = 0; index2 < num; ++index2) + WorldGen.GrowCatTail(point.X, point.Y); + WorldGen.SquareTileFrame(point.X, point.Y); + break; + } + break; + } + trackCache.active(true); + trackCache.type = (ushort) index1; + trackCache.frameX = (short) (WorldGen.genRand.Next(5) * 18); + break; + } + break; + case 129: + if (WorldGen.SolidTile(i - 1, j) || WorldGen.SolidTile(i + 1, j) || WorldGen.SolidTile(i, j - 1) || WorldGen.SolidTile(i, j + 1)) + { + trackCache.active(true); + trackCache.type = (ushort) index1; + trackCache.frameX = (short) (WorldGen.genRand.Next(18) * 18); + if (plr <= -1 && WorldGen.genRand.Next(50) == 0) + trackCache.frameX = (short) ((18 + WorldGen.genRand.Next(6)) * 18); + WorldGen.SquareTileFrame(i, j); + break; + } + break; + case 171: + WorldGen.PlaceXmasTree(i, j); + break; + case 178: + if (WorldGen.SolidTile(i - 1, j, true) || WorldGen.SolidTile(i + 1, j, true) || WorldGen.SolidTile(i, j - 1) || WorldGen.SolidTile(i, j + 1)) + { + trackCache.active(true); + trackCache.type = (ushort) index1; + trackCache.frameX = (short) (style * 18); + trackCache.frameY = (short) (WorldGen.genRand.Next(3) * 18); + WorldGen.SquareTileFrame(i, j); + break; + } + break; + case 184: + if (Main.tileMoss[(int) Main.tile[i - 1, j].type] && WorldGen.SolidTile(i - 1, j) || Main.tileMoss[(int) Main.tile[i + 1, j].type] && WorldGen.SolidTile(i + 1, j) || Main.tileMoss[(int) Main.tile[i, j - 1].type] && WorldGen.SolidTile(i, j - 1) || Main.tileMoss[(int) Main.tile[i, j + 1].type] && WorldGen.SolidTile(i, j + 1)) + { + trackCache.active(true); + trackCache.type = (ushort) index1; + trackCache.frameX = (short) (style * 18); + trackCache.frameY = (short) (WorldGen.genRand.Next(3) * 18); + WorldGen.SquareTileFrame(i, j); + } + if (TileID.Sets.tileMossBrick[(int) Main.tile[i - 1, j].type] && WorldGen.SolidTile(i - 1, j) || TileID.Sets.tileMossBrick[(int) Main.tile[i + 1, j].type] && WorldGen.SolidTile(i + 1, j) || TileID.Sets.tileMossBrick[(int) Main.tile[i, j - 1].type] && WorldGen.SolidTile(i, j - 1) || TileID.Sets.tileMossBrick[(int) Main.tile[i, j + 1].type] && WorldGen.SolidTile(i, j + 1)) + { + trackCache.active(true); + trackCache.type = (ushort) index1; + trackCache.frameX = (short) (style * 18); + trackCache.frameY = (short) (WorldGen.genRand.Next(3) * 18); + WorldGen.SquareTileFrame(i, j); + break; + } + break; + case 254: + WorldGen.Place2x2Style(i, j, (ushort) index1, style); + break; + case 485: + WorldGen.PlaceObject(i, j, index1, style: style); + break; + case 518: + WorldGen.PlaceLilyPad(i, j); + break; + case 519: + WorldGen.PlaceCatTail(i, j); + break; + case 529: + WorldGen.PlantSeaOat(i, j); + break; + case 549: + WorldGen.PlaceUnderwaterPlant((ushort) 549, i, j); + break; + case 571: + WorldGen.PlaceBamboo(i, j); + break; + default: + if (index1 == 335 || index1 == 564 || index1 == 594) + { + WorldGen.Place2x2(i, j, (ushort) index1, 0); + break; + } + if (index1 == 319 || index1 == 132 || index1 == 484 || index1 == 138 || index1 == 142 || index1 == 143 || index1 == 282 || index1 >= 288 && index1 <= 295 || index1 >= 316 && index1 <= 318) + { + WorldGen.Place2x2(i, j, (ushort) index1, 0); + break; + } + switch (index1) + { + case 4: + if (Main.tile[i - 1, j] == null) + Main.tile[i - 1, j] = new Tile(); + if (Main.tile[i + 1, j] == null) + Main.tile[i + 1, j] = new Tile(); + if (Main.tile[i, j + 1] == null) + Main.tile[i, j + 1] = new Tile(); + Tile tile1 = Main.tile[i - 1, j]; + Tile tile2 = Main.tile[i + 1, j]; + Tile tile3 = Main.tile[i, j + 1]; + if (trackCache.wall > (ushort) 0 || tile1.active() && (tile1.slope() == (byte) 0 || (int) tile1.slope() % 2 != 1) && (Main.tileSolid[(int) tile1.type] && !Main.tileSolidTop[(int) tile1.type] && !TileID.Sets.NotReallySolid[(int) tile1.type] || TileID.Sets.IsBeam[(int) tile1.type] || WorldGen.IsTreeType((int) tile1.type) && WorldGen.IsTreeType((int) Main.tile[i - 1, j - 1].type) && WorldGen.IsTreeType((int) Main.tile[i - 1, j + 1].type)) || tile2.active() && (tile2.slope() == (byte) 0 || (int) tile2.slope() % 2 != 0) && (Main.tileSolid[(int) tile2.type] && !Main.tileSolidTop[(int) tile2.type] && !TileID.Sets.NotReallySolid[(int) tile2.type] || TileID.Sets.IsBeam[(int) tile2.type] || WorldGen.IsTreeType((int) tile2.type) && WorldGen.IsTreeType((int) Main.tile[i + 1, j - 1].type) && WorldGen.IsTreeType((int) Main.tile[i + 1, j + 1].type)) || tile3.active() && Main.tileSolid[(int) tile3.type] && (TileID.Sets.Platforms[(int) tile3.type] && WorldGen.TopEdgeCanBeAttachedTo(i, j + 1) || (!Main.tileSolidTop[(int) tile3.type] || tile3.type == (ushort) 380 && tile3.slope() == (byte) 0) && !TileID.Sets.NotReallySolid[(int) tile3.type] && !tile3.halfBrick() && tile3.slope() == (byte) 0)) + { + trackCache.active(true); + trackCache.type = (ushort) index1; + trackCache.frameY = (short) (22 * style); + WorldGen.SquareTileFrame(i, j); + break; + } + break; + case 10: + if (Main.tile[i, j - 1] == null) + Main.tile[i, j - 1] = new Tile(); + if (Main.tile[i, j - 2] == null) + Main.tile[i, j - 2] = new Tile(); + if (Main.tile[i, j - 3] == null) + Main.tile[i, j - 3] = new Tile(); + if (Main.tile[i, j + 1] == null) + Main.tile[i, j + 1] = new Tile(); + if (Main.tile[i, j + 2] == null) + Main.tile[i, j + 2] = new Tile(); + if (Main.tile[i, j + 3] == null) + Main.tile[i, j + 3] = new Tile(); + if (!Main.tile[i, j - 1].active() && !Main.tile[i, j - 2].active() && Main.tile[i, j - 3].active() && Main.tileSolid[(int) Main.tile[i, j - 3].type]) + { + WorldGen.PlaceDoor(i, j - 1, index1, style); + WorldGen.SquareTileFrame(i, j); + break; + } + if (Main.tile[i, j + 1].active() || Main.tile[i, j + 2].active() || !Main.tile[i, j + 3].active() || !Main.tileSolid[(int) Main.tile[i, j + 3].type]) + return false; + WorldGen.PlaceDoor(i, j + 1, index1, style); + WorldGen.SquareTileFrame(i, j); + break; + case 136: + if (Main.tile[i - 1, j] == null) + Main.tile[i - 1, j] = new Tile(); + if (Main.tile[i + 1, j] == null) + Main.tile[i + 1, j] = new Tile(); + if (Main.tile[i, j + 1] == null) + Main.tile[i, j + 1] = new Tile(); + if (Main.tile[i - 1, j].nactive() && !Main.tile[i - 1, j].halfBrick() && !TileID.Sets.NotReallySolid[(int) Main.tile[i - 1, j].type] && Main.tile[i - 1, j].slope() == (byte) 0 && (WorldGen.SolidTile(i - 1, j) || TileID.Sets.IsBeam[(int) Main.tile[i - 1, j].type] || Main.tile[i - 1, j].type == (ushort) 5 && Main.tile[i - 1, j - 1].type == (ushort) 5 && Main.tile[i - 1, j + 1].type == (ushort) 5) || Main.tile[i + 1, j].nactive() && !Main.tile[i + 1, j].halfBrick() && !TileID.Sets.NotReallySolid[(int) Main.tile[i + 1, j].type] && Main.tile[i + 1, j].slope() == (byte) 0 && (WorldGen.SolidTile(i + 1, j) || TileID.Sets.IsBeam[(int) Main.tile[i + 1, j].type] || Main.tile[i + 1, j].type == (ushort) 5 && Main.tile[i + 1, j - 1].type == (ushort) 5 && Main.tile[i + 1, j + 1].type == (ushort) 5) || Main.tile[i, j + 1].nactive() && !Main.tile[i, j + 1].halfBrick() && WorldGen.SolidTile(i, j + 1) && Main.tile[i, j + 1].slope() == (byte) 0 || trackCache.wall > (ushort) 0) + { + trackCache.active(true); + trackCache.type = (ushort) index1; + WorldGen.SquareTileFrame(i, j); + break; + } + break; + case 137: + trackCache.active(true); + trackCache.type = (ushort) index1; + trackCache.frameY = (short) (18 * style); + break; + case 411: + WorldGen.Place2x2(i, j, (ushort) index1, 0); + break; + case 442: + if (Main.tile[i - 1, j] == null) + Main.tile[i - 1, j] = new Tile(); + if (Main.tile[i + 1, j] == null) + Main.tile[i + 1, j] = new Tile(); + if (Main.tile[i, j + 1] == null) + Main.tile[i, j + 1] = new Tile(); + if (Main.tile[i - 1, j].nactive() && !Main.tile[i - 1, j].halfBrick() && !TileID.Sets.NotReallySolid[(int) Main.tile[i - 1, j].type] && Main.tile[i - 1, j].slope() == (byte) 0 && (WorldGen.SolidTile(i - 1, j) || TileID.Sets.IsBeam[(int) Main.tile[i - 1, j].type] || Main.tile[i - 1, j].type == (ushort) 5 && Main.tile[i - 1, j - 1].type == (ushort) 5 && Main.tile[i - 1, j + 1].type == (ushort) 5) || Main.tile[i + 1, j].nactive() && !Main.tile[i + 1, j].halfBrick() && !TileID.Sets.NotReallySolid[(int) Main.tile[i + 1, j].type] && Main.tile[i + 1, j].slope() == (byte) 0 && (WorldGen.SolidTile(i + 1, j) || TileID.Sets.IsBeam[(int) Main.tile[i + 1, j].type] || Main.tile[i + 1, j].type == (ushort) 5 && Main.tile[i + 1, j - 1].type == (ushort) 5 && Main.tile[i + 1, j + 1].type == (ushort) 5) || Main.tile[i, j + 1].nactive() && !Main.tile[i, j + 1].halfBrick() && WorldGen.SolidTile(i, j + 1) && Main.tile[i, j + 1].slope() == (byte) 0) + { + trackCache.active(true); + trackCache.type = (ushort) index1; + WorldGen.SquareTileFrame(i, j); + break; + } + break; + case 457: + WorldGen.Place2x2Horizontal(i, j, (ushort) 457, style); + break; + default: + if (index1 >= 275 && index1 <= 281 || index1 == 296 || index1 == 297 || index1 == 309 || index1 == 358 || index1 == 359 || index1 == 413 || index1 == 414 || index1 == 542) + { + WorldGen.Place6x3(i, j, (ushort) index1); + break; + } + if (index1 == 237 || index1 == 244 || index1 == 285 || index1 == 286 || index1 == 298 || index1 == 299 || index1 == 310 || index1 == 339 || index1 == 538 || index1 >= 361 && index1 <= 364 || index1 == 532 || index1 == 533 || index1 == 486 || index1 == 488 || index1 == 544 || index1 == 582 || index1 == 619) + { + WorldGen.Place3x2(i, j, (ushort) index1); + break; + } + switch (index1) + { + case 128: + WorldGen.PlaceMan(i, j, style); + WorldGen.SquareTileFrame(i, j); + break; + case 149: + if (WorldGen.SolidTile(i - 1, j) || WorldGen.SolidTile(i + 1, j) || WorldGen.SolidTile(i, j - 1) || WorldGen.SolidTile(i, j + 1)) + { + trackCache.frameX = (short) (18 * style); + trackCache.active(true); + trackCache.type = (ushort) index1; + WorldGen.SquareTileFrame(i, j); + break; + } + break; + case 269: + WorldGen.PlaceWoman(i, j, style); + WorldGen.SquareTileFrame(i, j); + break; + case 334: + int style1 = 0; + if (style == -1) + style1 = 1; + WorldGen.Place3x3Wall(i, j, (ushort) 334, style1); + WorldGen.SquareTileFrame(i, j); + break; + default: + if (index1 == 139 || index1 == 35) + { + WorldGen.PlaceMB(i, j, (ushort) index1, style); + WorldGen.SquareTileFrame(i, j); + break; + } + switch (index1) + { + case 34: + WorldGen.PlaceChand(i, j, (ushort) index1, style); + WorldGen.SquareTileFrame(i, j); + break; + case 165: + WorldGen.PlaceTight(i, j); + WorldGen.SquareTileFrame(i, j); + break; + case 235: + WorldGen.Place3x1(i, j, (ushort) index1); + WorldGen.SquareTileFrame(i, j); + break; + case 240: + WorldGen.Place3x3Wall(i, j, (ushort) index1, style); + break; + case 241: + WorldGen.Place4x3Wall(i, j, (ushort) index1, style); + break; + case 242: + WorldGen.Place6x4Wall(i, j, (ushort) index1, style); + break; + case 245: + WorldGen.Place2x3Wall(i, j, (ushort) index1, style); + break; + case 246: + WorldGen.Place3x2Wall(i, j, (ushort) index1, style); + break; + case 440: + WorldGen.Place3x3Wall(i, j, (ushort) index1, style); + break; + default: + if (index1 == 106 || index1 == 212 || index1 == 219 || index1 == 220 || index1 == 228 || index1 == 231 || index1 == 243 || index1 == 247 || index1 == 283 || index1 >= 300 && index1 <= 308 || index1 == 354 || index1 == 355 || index1 == 491) + { + WorldGen.Place3x3(i, j, (ushort) index1, style); + WorldGen.SquareTileFrame(i, j); + break; + } + if (index1 == 13 || index1 == 33 || index1 == 49 || index1 == 50 || index1 == 78 || index1 == 174 || index1 == 372) + { + WorldGen.PlaceOnTable1x1(i, j, index1, style); + WorldGen.SquareTileFrame(i, j); + break; + } + if (index1 == 14 || index1 == 469 || index1 == 26 || index1 == 86 || index1 == 87 || index1 == 88 || index1 == 89 || index1 == 114 || index1 == 186 || index1 == 187 || index1 == 215 || index1 == 217 || index1 == 218 || index1 == 377) + { + WorldGen.Place3x2(i, j, (ushort) index1, style); + WorldGen.SquareTileFrame(i, j); + break; + } + switch (index1) + { + case 20: + if (Main.tile[i, j + 1] == null) + Main.tile[i, j + 1] = new Tile(); + int type = (int) Main.tile[i, j + 1].type; + if (Main.tile[i, j + 1].active() && (type == 2 || type == 109 || type == 147 || type == 60 || type == 23 || type == 199 || type == 53 || type == 234 || type == 116 || type == 112)) + { + WorldGen.Place1x2(i, j, (ushort) index1, style); + WorldGen.SquareTileFrame(i, j); + break; + } + break; + case 236: + WorldGen.PlaceJunglePlant(i, j, (ushort) index1, WorldGen.genRand.Next(3), 0); + WorldGen.SquareTileFrame(i, j); + break; + case 238: + WorldGen.PlaceJunglePlant(i, j, (ushort) index1, 0, 0); + WorldGen.SquareTileFrame(i, j); + break; + default: + if (index1 == 15 || index1 == 216 || index1 == 338 || index1 == 390) + { + if (Main.tile[i, j - 1] == null) + Main.tile[i, j - 1] = new Tile(); + if (Main.tile[i, j] == null) + Main.tile[i, j] = new Tile(); + WorldGen.Place1x2(i, j, (ushort) index1, style); + WorldGen.SquareTileFrame(i, j); + break; + } + switch (index1) + { + case 227: + WorldGen.PlaceDye(i, j, style); + WorldGen.SquareTileFrame(i, j); + break; + case 567: + WorldGen.PlaceGnome(i, j, style); + WorldGen.SquareTileFrame(i, j); + break; + default: + if (index1 == 16 || index1 == 18 || index1 == 29 || index1 == 103 || index1 == 134 || index1 == 462) + { + WorldGen.Place2x1(i, j, (ushort) index1, style); + WorldGen.SquareTileFrame(i, j); + break; + } + if (index1 == 92 || index1 == 93 || index1 == 453) + { + WorldGen.Place1xX(i, j, (ushort) index1, style); + WorldGen.SquareTileFrame(i, j); + break; + } + if (index1 == 104 || index1 == 105 || index1 == 320 || index1 == 337 || index1 == 349 || index1 == 356 || index1 == 378 || index1 == 456 || index1 == 506 || index1 == 545) + { + WorldGen.Place2xX(i, j, (ushort) index1, style); + WorldGen.SquareTileFrame(i, j); + break; + } + if (index1 == 17 || index1 == 77 || index1 == 133) + { + WorldGen.Place3x2(i, j, (ushort) index1, style); + WorldGen.SquareTileFrame(i, j); + break; + } + if (index1 == 207) + { + WorldGen.Place2xX(i, j, (ushort) index1, style); + WorldGen.SquareTileFrame(i, j); + break; + } + if (index1 == 410 || index1 == 480 || index1 == 509) + { + WorldGen.Place2xX(i, j, (ushort) index1, style); + WorldGen.SquareTileFrame(i, j); + break; + } + if (index1 == 465 || index1 == 531 || index1 == 591 || index1 == 592) + { + WorldGen.Place2xX(i, j, (ushort) index1, style); + WorldGen.SquareTileFrame(i, j); + break; + } + if (TileID.Sets.BasicChest[index1]) + { + WorldGen.PlaceChest(i, j, (ushort) index1, style: style); + WorldGen.SquareTileFrame(i, j); + break; + } + switch (index1) + { + case 27: + WorldGen.PlaceSunflower(i, j); + WorldGen.SquareTileFrame(i, j); + break; + case 28: + WorldGen.PlacePot(i, j, style: WorldGen.genRand.Next(4)); + WorldGen.SquareTileFrame(i, j); + break; + case 36: + case 135: + case 141: + case 144: + case 210: + case 239: + case 324: + case 476: + case 494: + WorldGen.Place1x1(i, j, index1, style); + WorldGen.SquareTileFrame(i, j); + break; + case 42: + case 270: + case 271: + WorldGen.Place1x2Top(i, j, (ushort) index1, style); + WorldGen.SquareTileFrame(i, j); + break; + case 55: + case 425: + case 510: + case 511: + WorldGen.PlaceSign(i, j, (ushort) index1, style); + break; + case 85: + case 376: + WorldGen.Place2x2Horizontal(i, j, (ushort) index1, style); + break; + case 91: + WorldGen.PlaceBanner(i, j, (ushort) index1, style); + WorldGen.SquareTileFrame(i, j); + break; + case 101: + case 102: + case 463: + WorldGen.Place3x4(i, j, (ushort) index1, style); + WorldGen.SquareTileFrame(i, j); + break; + case 419: + case 420: + case 423: + case 424: + case 429: + case 445: + WorldGen.PlaceLogicTiles(i, j, index1, style); + WorldGen.SquareTileFrame(i, j); + break; + case 464: + case 466: + WorldGen.Place5x4(i, j, (ushort) index1, style); + WorldGen.SquareTileFrame(i, j); + break; + default: + if (Main.tileAlch[index1]) + { + WorldGen.PlaceAlch(i, j, style); + break; + } + switch (index1) + { + case 19: + trackCache.frameY = (short) (18 * style); + trackCache.active(true); + trackCache.type = (ushort) index1; + break; + case 79: + case 90: + int direction = 1; + if (plr > -1) + direction = Main.player[plr].direction; + WorldGen.Place4x2(i, j, (ushort) index1, direction, style); + break; + case 81: + trackCache.frameX = (short) (26 * WorldGen.genRand.Next(6)); + trackCache.active(true); + trackCache.type = (ushort) index1; + break; + case 94: + case 95: + case 97: + case 98: + case 99: + case 100: + case 125: + case 126: + case 172: + case 173: + case 287: + WorldGen.Place2x2(i, j, (ushort) index1, style); + break; + case 96: + WorldGen.Place2x2Style(i, j, (ushort) index1, style); + break; + case 209: + WorldGen.PlaceCannon(i, j, (ushort) index1, style); + break; + case 314: + Minecart.PlaceTrack(trackCache, style); + break; + case 380: + trackCache.frameY = (short) (18 * style); + trackCache.active(true); + trackCache.type = (ushort) index1; + break; + default: + trackCache.active(true); + trackCache.type = (ushort) index1; + break; + } + break; + } + break; + } + break; + } + break; + } + break; + } + break; + } + break; + } + } + if (trackCache.active()) + { + if (TileID.Sets.BlocksWaterDrawingBehindSelf[(int) trackCache.type]) + WorldGen.SquareWallFrame(i, j); + WorldGen.SquareTileFrame(i, j); + flag = true; + if (!mute) + { + switch (index1) + { + case (int) sbyte.MaxValue: + SoundEngine.PlaySound(SoundID.Item30, i * 16, j * 16); + break; + case 314: + SoundEngine.PlaySound(SoundID.Item52, i * 16, j * 16); + break; + case 330: + case 331: + case 332: + case 333: + SoundEngine.PlaySound(18, i * 16, j * 16); + break; + default: + SoundEngine.PlaySound(0, i * 16, j * 16); + break; + } + if (index1 == 22 || index1 == 140) + { + for (int index3 = 0; index3 < 3; ++index3) + Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 14); + } + } + } + } + } + return flag; + } + + public static void KillWall(int i, int j, bool fail = false) + { + if (i < 0 || j < 0 || i >= Main.maxTilesX || j >= Main.maxTilesY) + return; + Tile tileCache = Main.tile[i, j]; + if (tileCache == null) + { + tileCache = new Tile(); + Main.tile[i, j] = tileCache; + } + if (tileCache.wall <= (ushort) 0) + return; + fail = WorldGen.KillWall_CheckFailure(fail, tileCache); + WorldGen.KillWall_PlaySounds(i, j, tileCache); + int num = 10; + if (fail) + num = 3; + for (int index = 0; index < num; ++index) + WorldGen.KillWall_MakeWallDust(i, j, tileCache); + if (fail) + { + WorldGen.SquareWallFrame(i, j); + } + else + { + WorldGen.KillWall_DropItems(i, j, tileCache); + tileCache.wall = (ushort) 0; + tileCache.wallColor((byte) 0); + WorldGen.SquareWallFrame(i, j); + if (tileCache.type < (ushort) 0 || tileCache.type >= (ushort) 623 || !TileID.Sets.FramesOnKillWall[(int) tileCache.type]) + return; + WorldGen.TileFrame(i, j); + } + } + + private static bool KillWall_CheckFailure(bool fail, Tile tileCache) + { + if (Main.wallDungeon[(int) tileCache.wall] && !NPC.downedBoss3) + fail = true; + if (tileCache.wall == (ushort) 87 && !NPC.downedGolemBoss) + fail = true; + return fail; + } + + private static void KillWall_PlaySounds(int i, int j, Tile tileCache) + { + if (tileCache.wall == (ushort) 241 || tileCache.wall >= (ushort) 88 && tileCache.wall <= (ushort) 93 || tileCache.wall == (ushort) 21 || tileCache.wall == (ushort) 186 || tileCache.wall == (ushort) 136 || tileCache.wall == (ushort) 137 || tileCache.wall == (ushort) 168 || tileCache.wall == (ushort) 169 || tileCache.wall == (ushort) 172 || tileCache.wall == (ushort) 226 || tileCache.wall == (ushort) 227 || tileCache.wall == (ushort) 242 || tileCache.wall == (ushort) 243) + SoundEngine.PlaySound(13, i * 16, j * 16); + else if (tileCache.wall >= (ushort) 63 && tileCache.wall <= (ushort) 70 || tileCache.wall == (ushort) 264 || tileCache.wall == (ushort) 268 || tileCache.wall == (ushort) 265) + SoundEngine.PlaySound(6, i * 16, j * 16); + else + SoundEngine.PlaySound(0, i * 16, j * 16); + } + + private static void KillWall_DropItems(int i, int j, Tile tileCache) + { + int itemDrops = WorldGen.KillWall_GetItemDrops(tileCache); + if (itemDrops <= 0) + return; + Item.NewItem(i * 16, j * 16, 16, 16, itemDrops); + } + + private static int KillWall_GetItemDrops(Tile tileCache) + { + switch (tileCache.wall) + { + case 237: + return 4233; + case 238: + return 4234; + case 239: + return 4235; + case 240: + return 4236; + case 246: + return 4486; + case 247: + return 4487; + case 248: + return 4488; + case 249: + return 4489; + case 250: + return 4490; + case 251: + return 4491; + case 252: + return 4492; + case 253: + return 4493; + case 254: + return 4494; + case (ushort) byte.MaxValue: + return 4495; + case 256: + return 4496; + case 257: + return 4497; + case 258: + return 4498; + case 259: + return 4499; + case 260: + return 4500; + case 261: + return 4501; + case 262: + return 4502; + case 263: + return 4503; + case 264: + return 4504; + case 265: + return 4505; + case 266: + return 4506; + case 267: + return 4507; + case 268: + return 4508; + case 269: + return 4509; + case 270: + return 4510; + case 271: + return 4511; + case 274: + return 4512; + case 275: + return 3273; + case 276: + return 4513; + case 277: + return 4514; + case 278: + return 4515; + case 279: + return 4516; + case 280: + return 4517; + case 281: + return 4518; + case 282: + return 4519; + case 283: + return 4520; + case 284: + return 4521; + case 285: + return 4522; + case 286: + return 4523; + case 287: + return 4524; + case 288: + return 4525; + case 289: + return 4526; + case 290: + return 4527; + case 291: + return 4528; + case 292: + return 4529; + case 293: + return 4530; + case 294: + return 4531; + case 295: + return 4532; + case 296: + return 4533; + case 297: + return 4534; + case 298: + return 4535; + case 299: + return 4536; + case 300: + return 4537; + case 301: + return 4538; + case 302: + return 4539; + case 303: + return 4540; + case 304: + return 3340; + case 305: + return 3341; + case 306: + return 3342; + case 307: + return 3343; + case 308: + return 3344; + case 309: + return 3345; + case 310: + return 3346; + case 311: + return 3348; + case 314: + return 4647; + default: + int num = 0; + if (tileCache.wall == (ushort) 168) + num = 2696; + if (tileCache.wall == (ushort) 169) + num = 2698; + if (tileCache.wall == (ushort) 226) + num = 3752; + if (tileCache.wall == (ushort) 227) + num = 3753; + if (tileCache.wall == (ushort) 228) + num = 3760; + if (tileCache.wall == (ushort) 229) + num = 3761; + if (tileCache.wall == (ushort) 230) + num = 3762; + if (tileCache.wall == (ushort) 142) + num = 2263; + if (tileCache.wall == (ushort) 143) + num = 2264; + if (tileCache.wall == (ushort) 144) + num = 2271; + if (tileCache.wall == (ushort) 149) + num = 2505; + if (tileCache.wall == (ushort) 150) + num = 2507; + if (tileCache.wall == (ushort) 151) + num = 2506; + if (tileCache.wall == (ushort) 152) + num = 2508; + if (tileCache.wall == (ushort) 245) + num = 4424; + if (tileCache.wall == (ushort) 315) + num = 4667; + if (tileCache.wall == (ushort) 1) + num = 26; + if (tileCache.wall == (ushort) 4) + num = 93; + if (tileCache.wall == (ushort) 5) + num = 130; + if (tileCache.wall == (ushort) 6) + num = 132; + if (tileCache.wall == (ushort) 7) + num = 135; + if (tileCache.wall == (ushort) 8) + num = 138; + if (tileCache.wall == (ushort) 9) + num = 140; + if (tileCache.wall == (ushort) 10) + num = 142; + if (tileCache.wall == (ushort) 11) + num = 144; + if (tileCache.wall == (ushort) 12) + num = 146; + if (tileCache.wall == (ushort) 14) + num = 330; + if (tileCache.wall == (ushort) 224) + num = 3472; + if (tileCache.wall == (ushort) 177) + num = 3067; + if (tileCache.wall == (ushort) 167) + num = 2691; + if (tileCache.wall == (ushort) 60) + num = 3584; + if (tileCache.wall == (ushort) 231) + num = 3952; + if (tileCache.wall == (ushort) 232) + num = 3954; + if (tileCache.wall == (ushort) 225) + num = 3751; + if (tileCache.wall == (ushort) 233) + num = 3956; + if (tileCache.wall == (ushort) 234) + num = 4052; + if (tileCache.wall == (ushort) 235) + num = 4053; + if (tileCache.wall == (ushort) 236) + num = 4140; + if (tileCache.wall == (ushort) 312) + num = 4565; + if (tileCache.wall == (ushort) 313) + num = 4548; + if (tileCache.wall == (ushort) 179) + num = 3083; + if (tileCache.wall == (ushort) 183) + num = 3082; + if (tileCache.wall == (ushort) 181) + num = 3089; + if (tileCache.wall == (ushort) 184) + num = 3088; + if (tileCache.wall == (ushort) 186) + num = 3238; + if (tileCache.wall >= (ushort) 153 && tileCache.wall <= (ushort) 166) + { + switch (tileCache.wall) + { + case 153: + num = 2677; + break; + case 154: + num = 2679; + break; + case 155: + num = 2681; + break; + case 156: + num = 2683; + break; + case 157: + num = 2678; + break; + case 158: + num = 2680; + break; + case 159: + num = 2682; + break; + case 160: + num = 2684; + break; + case 161: + num = 2686; + break; + case 162: + num = 2688; + break; + case 163: + num = 2690; + break; + case 164: + num = 2685; + break; + case 165: + num = 2687; + break; + case 166: + num = 2689; + break; + } + } + if (tileCache.wall == (ushort) 136) + num = 2169; + if (tileCache.wall == (ushort) 137) + num = 2170; + if (tileCache.wall == (ushort) 172) + num = 2788; + if (tileCache.wall == (ushort) 242) + num = 4279; + if (tileCache.wall == (ushort) 243) + num = 4280; + if (tileCache.wall == (ushort) 145) + num = 2333; + if (tileCache.wall == (ushort) 16) + num = 30; + if (tileCache.wall == (ushort) 17) + num = 135; + if (tileCache.wall == (ushort) 18) + num = 138; + if (tileCache.wall == (ushort) 19) + num = 140; + if (tileCache.wall == (ushort) 20) + num = 330; + if (tileCache.wall == (ushort) 21) + num = 392; + if (tileCache.wall == (ushort) 86 || tileCache.wall == (ushort) 108) + num = 1126; + if (tileCache.wall == (ushort) 173) + num = 2789; + if (tileCache.wall == (ushort) 174) + num = 2790; + if (tileCache.wall == (ushort) 175) + num = 2791; + if (tileCache.wall == (ushort) 176) + num = 2861; + if (tileCache.wall == (ushort) 182) + num = 3101; + if (tileCache.wall == (ushort) 133) + num = 2158; + if (tileCache.wall == (ushort) 134) + num = 2159; + if (tileCache.wall == (ushort) 135) + num = 2160; + else if (tileCache.wall == (ushort) 113) + num = 1726; + else if (tileCache.wall == (ushort) 114) + num = 1728; + else if (tileCache.wall == (ushort) 115) + num = 1730; + else if (tileCache.wall == (ushort) 146) + num = 2432; + else if (tileCache.wall == (ushort) 147) + num = 2433; + else if (tileCache.wall == (ushort) 148) + num = 2434; + if (tileCache.wall >= (ushort) 116 && tileCache.wall <= (ushort) 125) + num = 1948 + (int) tileCache.wall - 116; + if (tileCache.wall >= (ushort) 126 && tileCache.wall <= (ushort) 132) + num = 2008 + (int) tileCache.wall - 126; + if (tileCache.wall == (ushort) 22) + num = 417; + if (tileCache.wall == (ushort) 23) + num = 418; + if (tileCache.wall == (ushort) 24) + num = 419; + if (tileCache.wall == (ushort) 25) + num = 420; + if (tileCache.wall == (ushort) 26) + num = 421; + if (tileCache.wall == (ushort) 29) + num = 587; + if (tileCache.wall == (ushort) 30) + num = 592; + if (tileCache.wall == (ushort) 31) + num = 595; + if (tileCache.wall == (ushort) 32) + num = 605; + if (tileCache.wall == (ushort) 33) + num = 606; + if (tileCache.wall == (ushort) 34) + num = 608; + if (tileCache.wall == (ushort) 35) + num = 610; + if (tileCache.wall == (ushort) 36) + num = 615; + if (tileCache.wall == (ushort) 37) + num = 616; + if (tileCache.wall == (ushort) 38) + num = 617; + if (tileCache.wall == (ushort) 39) + num = 618; + if (tileCache.wall == (ushort) 41) + num = 622; + if (tileCache.wall == (ushort) 42) + num = 623; + if (tileCache.wall == (ushort) 43) + num = 624; + if (tileCache.wall == (ushort) 44) + num = 663; + if (tileCache.wall == (ushort) 45) + num = 720; + if (tileCache.wall == (ushort) 46) + num = 721; + if (tileCache.wall == (ushort) 47) + num = 722; + if (tileCache.wall == (ushort) 66) + num = 745; + if (tileCache.wall == (ushort) 67) + num = 746; + if (tileCache.wall == (ushort) 68) + num = 747; + if (tileCache.wall == (ushort) 84) + num = 884; + if (tileCache.wall == (ushort) 72) + num = 750; + if (tileCache.wall == (ushort) 73) + num = 752; + if (tileCache.wall == (ushort) 74) + num = 764; + if (tileCache.wall == (ushort) 85) + num = 927; + if (tileCache.wall == (ushort) 75) + num = 768; + if (tileCache.wall == (ushort) 76) + num = 769; + if (tileCache.wall == (ushort) 77) + num = 770; + if (tileCache.wall == (ushort) 82) + num = 825; + if (tileCache.wall == (ushort) 27) + num = 479; + if (tileCache.wall == (ushort) 106) + num = 1447; + if (tileCache.wall == (ushort) 107) + num = 1448; + if (tileCache.wall == (ushort) 109) + num = 1590; + if (tileCache.wall == (ushort) 110) + num = 1592; + if (tileCache.wall == (ushort) 111) + num = 1594; + if (tileCache.wall == (ushort) 78) + num = 1723; + if (tileCache.wall == (ushort) 87 || tileCache.wall == (ushort) 112) + num = 1102; + if (tileCache.wall == (ushort) 94 || tileCache.wall == (ushort) 100) + num = 1378; + if (tileCache.wall == (ushort) 95 || tileCache.wall == (ushort) 101) + num = 1379; + if (tileCache.wall == (ushort) 96 || tileCache.wall == (ushort) 102) + num = 1380; + if (tileCache.wall == (ushort) 97 || tileCache.wall == (ushort) 103) + num = 1381; + if (tileCache.wall == (ushort) 98 || tileCache.wall == (ushort) 104) + num = 1382; + if (tileCache.wall == (ushort) 99 || tileCache.wall == (ushort) 105) + num = 1383; + if (tileCache.wall == (ushort) 241) + num = 4260; + if (tileCache.wall >= (ushort) 88 && tileCache.wall <= (ushort) 93) + num = 1267 + (int) tileCache.wall - 88; + if (tileCache.wall >= (ushort) 138 && tileCache.wall <= (ushort) 141) + num = 2210 + (int) tileCache.wall - 138; + return num; + } + } + + private static void KillWall_MakeWallDust(int i, int j, Tile tileCache) + { + int Type = 0; + switch (tileCache.wall) + { + case 3: + case 246: + Type = WorldGen.genRand.Next(2) != 0 ? 1 : 14; + break; + case 7: + case 17: + case 94: + case 95: + case 100: + case 101: + Type = 275; + break; + case 8: + case 18: + case 98: + case 99: + case 104: + case 105: + Type = 276; + break; + case 9: + case 19: + case 96: + case 97: + case 102: + case 103: + Type = 277; + break; + case 15: + case 247: + Type = 38; + break; + case 22: + case 28: + case 248: + Type = 51; + break; + case 40: + case 249: + Type = 51; + break; + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 185: + case 250: + case 251: + case 252: + case 253: + case 254: + case (ushort) byte.MaxValue: + case 256: + case 257: + case 258: + case 259: + case 260: + case 274: + case 314: + Type = 1; + break; + case 59: + case 61: + case 261: + case 262: + Type = 0; + break; + case 62: + case 263: + Type = 0; + break; + case 69: + case 264: + Type = WorldGen.genRand.Next(2) != 0 ? 17 : 14; + break; + case 70: + case 265: + Type = 47; + break; + case 71: + case 266: + Type = 80; + break; + case 79: + case 267: + Type = 37; + break; + case 81: + case 268: + Type = 123; + break; + case 83: + case 234: + case 269: + Type = WorldGen.genRand.Next(2) != 0 ? 117 : 1; + break; + case 170: + case 171: + case 270: + case 271: + Type = 0; + break; + case 187: + case 275: + Type = 0; + break; + case 188: + case 189: + case 190: + case 191: + case 276: + case 277: + case 278: + case 279: + Type = 37; + break; + case 192: + case 193: + case 194: + case 195: + case 280: + case 281: + case 282: + case 283: + Type = 117; + break; + case 196: + case 197: + case 198: + case 199: + case 284: + case 285: + case 286: + case 287: + Type = 0; + break; + case 200: + case 202: + case 288: + case 290: + Type = WorldGen.genRand.Next(2) != 0 ? 70 : 69; + break; + case 201: + case 289: + Type = 17; + break; + case 203: + case 291: + Type = WorldGen.genRand.Next(2) != 0 ? 68 : 69; + break; + case 204: + case 205: + case 207: + case 292: + case 293: + case 295: + Type = 0; + break; + case 206: + case 294: + Type = 1; + break; + case 208: + case 209: + case 210: + case 211: + case 296: + case 297: + case 298: + case 299: + Type = WorldGen.genRand.Next(2) != 0 ? 125 : 155; + break; + case 212: + case 213: + case 214: + case 215: + case 300: + case 301: + case 302: + case 303: + Type = 1; + break; + case 216: + case 304: + Type = 0; + break; + case 217: + case 305: + Type = 37; + break; + case 218: + case 306: + Type = 155; + break; + case 219: + case 307: + Type = 17; + break; + case 220: + case 308: + Type = 37; + break; + case 221: + case 309: + Type = 155; + break; + case 222: + case 310: + Type = 37; + break; + case 223: + case 311: + Type = 0; + break; + case 231: + Type = 8; + break; + case 232: + Type = 82; + break; + case 233: + Type = 18; + break; + case 237: + Type = 6; + break; + case 238: + Type = 61; + break; + case 239: + Type = 242; + break; + case 240: + Type = 135; + break; + case 312: + case 313: + case 315: + Type = -1; + break; + } + if (tileCache.wall == (ushort) 148) + Type = -1; + if (tileCache.wall == (ushort) 1 || tileCache.wall == (ushort) 5 || tileCache.wall == (ushort) 6 || tileCache.wall == (ushort) 107) + Type = 1; + if (tileCache.wall == (ushort) 35) + Type = 37; + if (tileCache.wall == (ushort) 4 || tileCache.wall == (ushort) 106) + Type = 7; + if (tileCache.wall == (ushort) 12) + Type = 9; + if (tileCache.wall == (ushort) 10) + Type = 10; + if (tileCache.wall == (ushort) 11) + Type = 11; + if (tileCache.wall == (ushort) 21) + Type = 13; + if (tileCache.wall == (ushort) 34) + Type = 32; + if (tileCache.wall == (ushort) 225) + Type = 1; + if (tileCache.wall == (ushort) 145) + Type = 8; + if (tileCache.wall == (ushort) 23) + Type = 38; + if (tileCache.wall == (ushort) 24) + Type = 36; + if (tileCache.wall == (ushort) 25) + Type = 48; + if (tileCache.wall == (ushort) 179 || tileCache.wall == (ushort) 178 || tileCache.wall == (ushort) 183) + Type = 236; + if (tileCache.wall == (ushort) 181 || tileCache.wall == (ushort) 180 || tileCache.wall == (ushort) 184) + Type = 240; + if (tileCache.wall == (ushort) 113) + Type = 189; + if (tileCache.wall == (ushort) 114) + Type = 190; + if (tileCache.wall == (ushort) 115) + Type = 191; + if (tileCache.wall == (ushort) 177 || tileCache.wall == (ushort) 13) + Type = 25; + if (tileCache.wall == (ushort) 186) + Type = WorldGen.genRand.Next(68, 71); + if (tileCache.wall == (ushort) 142) + Type = 210; + if (tileCache.wall == (ushort) 143) + Type = 210; + if (tileCache.wall == (ushort) 224) + Type = 265; + if (tileCache.wall == (ushort) 173) + Type = 128; + if (tileCache.wall == (ushort) 174) + Type = 117; + if (tileCache.wall == (ushort) 175) + Type = 42; + if (tileCache.wall == (ushort) 176) + Type = 226; + if (tileCache.wall == (ushort) 182) + Type = WorldGen.genRand.Next(2) != 0 ? 23 : 6; + if (tileCache.wall >= (ushort) 153 && tileCache.wall <= (ushort) 166) + { + switch (tileCache.wall) + { + case 153: + case 157: + Type = 138; + break; + case 154: + case 158: + Type = 86; + break; + case 155: + case 159: + Type = 91; + break; + case 156: + case 160: + Type = 89; + break; + case 161: + case 164: + Type = 90; + break; + case 162: + case 165: + Type = 88; + break; + case 163: + case 166: + Type = 87; + break; + } + } + if (tileCache.wall == (ushort) 26 || tileCache.wall == (ushort) 30) + Type = 49; + if (tileCache.wall == (ushort) 29 || tileCache.wall == (ushort) 32) + Type = 50; + if (tileCache.wall == (ushort) 31) + Type = 51; + if (tileCache.wall == (ushort) 14 || tileCache.wall == (ushort) 20) + Type = 109; + if (tileCache.wall == (ushort) 241) + Type = 286; + if (tileCache.wall >= (ushort) 88 && tileCache.wall <= (ushort) 93) + { + Type = 86 + (int) tileCache.wall - 88; + if (tileCache.wall == (ushort) 93) + Type = WorldGen.genRand.Next(88, 94); + } + if (tileCache.wall == (ushort) 33) + Type = 14; + if (tileCache.wall == (ushort) 41) + Type = 77; + if (tileCache.wall == (ushort) 42) + Type = 78; + if (tileCache.wall == (ushort) 43) + Type = 78; + if (tileCache.wall == (ushort) 36) + Type = 26; + if (tileCache.wall == (ushort) 37) + Type = 32; + if (tileCache.wall == (ushort) 38) + Type = 2; + if (tileCache.wall == (ushort) 39) + Type = 1; + if (tileCache.wall == (ushort) 45) + Type = 81; + if (tileCache.wall == (ushort) 46) + Type = 83; + if (tileCache.wall == (ushort) 47) + Type = 84; + if (tileCache.wall == (ushort) 85) + Type = 126; + if (tileCache.wall == (ushort) 63) + Type = 3; + if (tileCache.wall == (ushort) 65) + Type = 3; + if (tileCache.wall == (ushort) 66) + Type = 3; + if (tileCache.wall == (ushort) 68) + Type = 3; + if (tileCache.wall == (ushort) 64) + Type = 40; + if (tileCache.wall == (ushort) 67) + Type = 40; + if (tileCache.wall == (ushort) 84) + Type = 80; + if (tileCache.wall == (ushort) 60) + Type = 3; + if (tileCache.wall == (ushort) 167) + Type = 81; + if (tileCache.wall == (ushort) 147) + Type = 51; + if (tileCache.wall == (ushort) 146) + Type = 9; + if (tileCache.wall == (ushort) 109) + Type = 144; + if (tileCache.wall == (ushort) 110) + Type = 145; + if (tileCache.wall == (ushort) 111) + Type = 146; + if (tileCache.wall == (ushort) 86 || tileCache.wall == (ushort) 108) + Type = 147; + if (tileCache.wall == (ushort) 87) + Type = 148; + if (tileCache.wall == (ushort) 136) + Type = 13; + if (tileCache.wall == (ushort) 137) + Type = 13; + if (tileCache.wall == (ushort) 168) + Type = 13; + if (tileCache.wall == (ushort) 169) + Type = 13; + if (tileCache.wall == (ushort) 172) + Type = 13; + if (tileCache.wall == (ushort) 226) + Type = 13; + if (tileCache.wall == (ushort) 227) + Type = 13; + if (tileCache.wall == (ushort) 242) + Type = 13; + if (tileCache.wall == (ushort) 243) + Type = 13; + if (tileCache.wall == (ushort) 72) + Type = 40; + if (tileCache.wall == (ushort) 73) + Type = 16; + if (tileCache.wall == (ushort) 74 || tileCache.wall == (ushort) 80) + Type = 26; + if (tileCache.wall == (ushort) 144) + Type = WorldGen.genRand.Next(2) != 0 ? 118 : 10; + if (tileCache.wall == (ushort) 75) + Type = 26; + if (tileCache.wall == (ushort) 76) + Type = 4; + if (tileCache.wall == (ushort) 77 || tileCache.wall == (ushort) 81) + Type = 5; + if (tileCache.wall == (ushort) 78 || tileCache.wall == (ushort) 244) + Type = 7; + if (tileCache.wall == (ushort) 82) + Type = 36; + if (tileCache.wall == (ushort) 27) + Type = WorldGen.genRand.Next(2) != 0 ? 1 : 7; + if (tileCache.wall == (ushort) 138) + Type = 77; + if (tileCache.wall == (ushort) 139) + Type = 78; + if (tileCache.wall == (ushort) 140) + Type = 79; + if (tileCache.wall == (ushort) 141) + Type = 126; + if (tileCache.wall == (ushort) 149 || tileCache.wall == (ushort) 150) + Type = 214; + if (tileCache.wall == (ushort) 151 || tileCache.wall == (ushort) 152) + Type = 215; + if (tileCache.wall == (ushort) 245) + Type = 195; + if (tileCache.wall == (ushort) 44) + { + int index = Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 66, Alpha: 100, newColor: new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), Scale: 0.75f); + Main.dust[index].noGravity = true; + } + else + { + if (tileCache.wall >= (ushort) 133 && tileCache.wall <= (ushort) 135 || tileCache.wall >= (ushort) 116 && tileCache.wall <= (ushort) 125 || tileCache.wall >= (ushort) 126 && tileCache.wall <= (ushort) 132) + return; + if (tileCache.wall == (ushort) 76) + { + Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, Type, Alpha: 75, newColor: new Color(0, 80, (int) byte.MaxValue, 100), Scale: 0.75f); + } + else + { + if (Type < 0) + return; + Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, Type); + } + } + } + + public static void LaunchRocket(int x, int y) + { + int frameY = (int) Main.tile[x, y].frameY; + int num1 = 0; + while (frameY >= 40) + { + frameY -= 40; + ++num1; + } + if (frameY == 18) + --y; + Vector2 vector2 = new Vector2((float) (x * 16 + 8), (float) (y * 16 + 4)); + int Type = 167 + num1; + int Damage = 150; + int num2 = 7; + int index = Projectile.NewProjectile(vector2.X, vector2.Y + 2f, 0.0f, -8f, Type, Damage, (float) num2, Main.myPlayer); + Main.projectile[index].originatedFromActivableTile = true; + Main.tile[x, y].active(false); + Main.tile[x, y + 1].active(false); + NetMessage.SendTileSquare(-1, x - 1, y, 3); + } + + public static void LaunchRocketSmall(int x, int y) + { + if (Main.tile[x, y].frameX == (short) 18) + --x; + if (Main.tile[x, y].frameY == (short) 18) + --y; + Vector2 vector2 = new Vector2((float) (x * 16 + 16), (float) (y * 16)); + int Type = 415 + Main.rand.Next(4); + int Damage = 0; + int num = 0; + int index = Projectile.NewProjectile(vector2.X, vector2.Y + 2f, 0.0f, -8f, Type, Damage, (float) num, Main.myPlayer); + Main.projectile[index].originatedFromActivableTile = true; + } + + public static bool CanKillTile(int i, int j, WorldGen.SpecialKillTileContext context) + { + if (context == WorldGen.SpecialKillTileContext.MowingTheGrass) + { + Tile tile = Main.tile[i, j]; + if (tile == null) + return false; + if (tile.type == (ushort) 2 || tile.type == (ushort) 109) + return true; + } + return WorldGen.CanKillTile(i, j); + } + + public static bool CanKillTile(int i, int j) => WorldGen.CanKillTile(i, j, out bool _); + + public static bool CanKillTile(int i, int j, out bool blockDamaged) + { + blockDamaged = false; + if (i < 0 || j < 0 || i >= Main.maxTilesX || j >= Main.maxTilesY) + return false; + Tile t1 = Main.tile[i, j]; + Tile tile = (Tile) null; + if (t1 == null || !t1.active()) + return false; + if (j >= 1) + tile = Main.tile[i, j - 1]; + if (tile != null && tile.active()) + { + int type = (int) tile.type; + if (TileID.Sets.IsATreeTrunk[type] && (int) t1.type != type && (tile.frameX != (short) 66 || tile.frameY < (short) 0 || tile.frameY > (short) 44) && (tile.frameX != (short) 88 || tile.frameY < (short) 66 || tile.frameY > (short) 110) && tile.frameY < (short) 198) + return false; + switch (type) + { + case 21: + case 26: + case 72: + case 77: + case 88: + case 467: + case 488: + if ((int) t1.type != type) + return false; + break; + case 80: + if ((int) t1.type != type) + { + switch ((int) tile.frameX / 18) + { + case 0: + case 1: + case 4: + case 5: + return false; + } + } + else + break; + break; + case 323: + if ((int) t1.type != type && (tile.frameX == (short) 66 || tile.frameX == (short) 220)) + return false; + break; + } + } + switch (t1.type) + { + case 10: + if (WorldGen.IsLockedDoor(t1)) + { + blockDamaged = true; + return false; + } + break; + case 21: + case 467: + if (!Chest.CanDestroyChest(i - (int) t1.frameX / 18 % 2, j - (int) t1.frameY / 18)) + return false; + break; + case 88: + if (!Chest.CanDestroyChest(i - (int) t1.frameX / 18 % 3, j - (int) t1.frameY / 18)) + return false; + break; + case 138: + if (WorldGen.CheckBoulderChest(i, j)) + { + blockDamaged = true; + return false; + } + break; + case 235: + int num = i - (int) t1.frameX % 54 / 18; + for (int index = 0; index < 3; ++index) + { + Tile t2 = Main.tile[num + index, j - 1]; + if (t2.active() && WorldGen.IsAContainer(t2)) + { + blockDamaged = true; + return false; + } + } + break; + } + return true; + } + + public static bool IsTileReplacable(int x, int y) + { + Tile tile1 = Main.tile[x, y]; + if (y >= 1) + { + Tile tile2 = Main.tile[x, y - 1]; + if (tile1 == null || tile2 == null) + return false; + if (tile2.active()) + { + if (tile2.type == (ushort) 80 || tile2.type == (ushort) 488) + return false; + if (TileID.Sets.PreventsTileReplaceIfOnTopOfIt[(int) tile2.type] && (int) tile1.type != (int) tile2.type) + return TileID.Sets.IsATreeTrunk[(int) tile2.type] ? tile2.frameX == (short) 66 && tile2.frameY >= (short) 0 && tile2.frameY <= (short) 44 || tile2.frameX == (short) 88 && tile2.frameY >= (short) 66 && tile2.frameY <= (short) 110 || tile2.frameY >= (short) 198 : tile2.type == (ushort) 323 && tile2.frameX != (short) 66 && tile2.frameX != (short) 220; + } + } + return true; + } + + public static int CheckTileBreakability(int x, int y) + { + Tile t1 = Main.tile[x, y]; + if (y >= 1 && y <= Main.maxTilesY - 1) + { + Tile t2 = Main.tile[x, y - 1]; + Tile tile = Main.tile[x, y + 1]; + if (tile != null && tile.active() && WorldGen.IsLockedDoor(x, y + 1)) + return 2; + if (!Main.tileSolid[(int) t1.type] && !Main.tileSolidTop[(int) t1.type]) + return 0; + if (t2.active()) + { + if (((!TileID.Sets.PreventsTileRemovalIfOnTopOfIt[(int) t2.type] ? 0 : ((int) t1.type != (int) t2.type ? 1 : 0)) | (WorldGen.IsLockedDoor(x, y - 1) ? 1 : 0) | (t2.type != (ushort) 77 || t1.type == (ushort) 77 ? 0 : (!Main.hardMode ? 1 : 0)) | (!WorldGen.IsAContainer(t2) ? 0 : (!WorldGen.IsAContainer(t1) ? 1 : 0))) != 0) + return TileID.Sets.IsATreeTrunk[(int) t2.type] ? (t2.frameX == (short) 66 && t2.frameY >= (short) 0 && t2.frameY <= (short) 44 || t2.frameX == (short) 88 && t2.frameY >= (short) 66 && t2.frameY <= (short) 110 || t2.frameY >= (short) 198 ? 0 : 2) : (t2.type == (ushort) 323 && t2.frameX != (short) 66 && t2.frameX != (short) 220 ? 0 : 2); + if (t2.type == (ushort) 80 && (int) t2.type != (int) t1.type) + { + switch ((int) t2.frameX / 18) + { + case 0: + case 1: + case 4: + case 5: + return 2; + } + } + if (t1.type == (ushort) 10 && t1.frameY >= (short) 594 && t1.frameY <= (short) 646) + return 1; + if (t1.type == (ushort) 138 || t1.type == (ushort) 484) + return WorldGen.CheckBoulderChest(x, y) ? 1 : 0; + } + if (t1.type == (ushort) 235) + { + int frameX = (int) t1.frameX; + int num = x - frameX % 54 / 18; + for (int index = 0; index < 3; ++index) + { + if (Main.tile[num + index, y - 1].active() && WorldGen.IsAContainer(Main.tile[num + index, y - 1])) + return 2; + } + } + } + return 0; + } + + public static bool CheckTileBreakability2_ShouldTileSurvive(int x, int y) + { + if (Main.netMode == 1) + return false; + Tile tile = Main.tile[x, y]; + if (TileID.Sets.BasicChest[(int) tile.type]) + { + int num = (int) tile.frameX / 18; + int Y = y - (int) tile.frameY / 18; + while (num > 1) + num -= 2; + if (!Chest.DestroyChest(x - num, Y)) + return true; + } + if (tile.type == (ushort) 88) + { + int num1 = (int) tile.frameX / 18; + int Y = y - (int) tile.frameY / 18; + int num2 = num1 % 3; + if (!Chest.DestroyChest(x - num2, Y)) + return true; + } + if (tile.type == (ushort) 470) + return !TEDisplayDoll.IsBreakable(x, y); + return tile.type == (ushort) 475 && !TEHatRack.IsBreakable(x, y); + } + + public static bool ReplaceWall(int x, int y, ushort targetWall) + { + if (targetWall >= (ushort) 316) + return false; + Tile tileCache = Main.tile[x, y]; + if (tileCache.wall == (ushort) 0 || targetWall == (ushort) 0 || WorldGen.KillWall_CheckFailure(false, tileCache)) + return false; + int num = 10; + for (int index = 0; index < num; ++index) + WorldGen.KillWall_MakeWallDust(x, y, tileCache); + WorldGen.KillWall_PlaySounds(x, y, tileCache); + WorldGen.KillWall_DropItems(x, y, tileCache); + tileCache.wall = targetWall; + tileCache.wallColor((byte) 0); + WorldGen.SquareWallFrame(x, y); + return true; + } + + public static bool ReplaceTile(int x, int y, ushort targetType, int targetStyle) + { + Tile tileSafely = Framing.GetTileSafely(x, y); + if (!WorldGen.WouldTileReplacementWork(targetType, x, y) || !WorldGen.IsTileReplacable(x, y)) + return false; + WorldGen.MoveReplaceTileAnchor(ref x, ref y, targetType, tileSafely); + int tileDustAmount = WorldGen.KillTile_GetTileDustAmount(false, tileSafely); + for (int index = 0; index < tileDustAmount; ++index) + WorldGen.KillTile_MakeTileDust(x, y, tileSafely); + WorldGen.KillTile_PlaySounds(x, y, false, tileSafely); + WorldGen.KillTile_DropItems(x, y, tileSafely, true); + WorldGen.AttemptFossilShattering(x, y, tileSafely, false); + WorldGen.ReplaceTIle_DoActualReplacement(targetType, targetStyle, x, y, tileSafely); + return true; + } + + private static void ReplaceTIle_DoActualReplacement( + ushort targetType, + int targetStyle, + int topLeftX, + int topLeftY, + Tile t) + { + if (TileID.Sets.BasicChest[(int) targetType]) + { + if (WorldGen.IsChestRigged(topLeftX, topLeftY) && Main.netMode != 1) + { + Wiring.HitSwitch(topLeftX, topLeftY); + NetMessage.SendData(59, number: topLeftX, number2: ((float) topLeftY)); + } + WorldGen.ReplaceTile_DoActualReplacement_Area(targetType, targetStyle, topLeftX, topLeftY, 2, 2); + } + else if (TileID.Sets.BasicDresser[(int) targetType]) + WorldGen.ReplaceTile_DoActualReplacement_Area(targetType, targetStyle, topLeftX, topLeftY, 3, 2); + else + WorldGen.ReplaceTile_DoActualReplacement_Single(targetType, targetStyle, topLeftX, topLeftY, t); + } + + private static void ReplaceTile_DoActualReplacement_Single( + ushort targetType, + int targetStyle, + int topLeftX, + int topLeftY, + Tile t) + { + WorldGen.ReplaceTile_EliminateNaturalExtras(topLeftX, topLeftY); + int type = (int) t.type; + t.type = targetType; + if (TileID.Sets.Platforms[(int) t.type]) + t.frameY = (short) (targetStyle * 18); + t.color((byte) 0); + bool flag = !WorldGen.CanPoundTile(topLeftX, topLeftY); + if (TileID.Sets.Platforms[type] && TileID.Sets.Platforms[(int) t.type]) + flag = false; + if (flag) + { + t.slope((byte) 0); + t.halfBrick(false); + } + WorldGen.SquareTileFrame(topLeftX, topLeftY); + } + + private static void ReplaceTile_EliminateNaturalExtras(int x, int y) + { + if (!WorldGen.InWorld(x, y, 2)) + return; + if (Main.tile[x, y - 1] != null && Main.tile[x, y - 1].active() && (TileID.Sets.ReplaceTileBreakUp[(int) Main.tile[x, y - 1].type] || Main.tile[x, y - 1].type == (ushort) 165 && (Main.tile[x, y - 1].frameY == (short) 36 || Main.tile[x, y - 1].frameY == (short) 54 || Main.tile[x, y - 1].frameY == (short) 90))) + WorldGen.KillTile(x, y - 1); + if (Main.tile[x, y + 1] == null || !Main.tile[x, y + 1].active() || !TileID.Sets.ReplaceTileBreakDown[(int) Main.tile[x, y + 1].type] && (Main.tile[x, y + 1].type != (ushort) 165 || Main.tile[x, y + 1].frameY != (short) 0 && Main.tile[x, y + 1].frameY != (short) 18 && Main.tile[x, y + 1].frameY != (short) 72)) + return; + WorldGen.KillTile(x, y + 1); + } + + private static void ReplaceTile_DoActualReplacement_Area( + ushort targetType, + int targetStyle, + int topLeftX, + int topLeftY, + int areaSizeX, + int areaSizeY) + { + for (int index1 = 0; index1 < areaSizeX; ++index1) + { + for (int index2 = 0; index2 < areaSizeY; ++index2) + { + Tile tile = Main.tile[topLeftX + index1, topLeftY + index2]; + tile.type = targetType; + tile.frameX = (short) (targetStyle * (areaSizeX * 18) + index1 * 18); + tile.frameY = (short) (index2 * 18); + tile.color((byte) 0); + } + } + for (int index3 = 0; index3 < areaSizeX; ++index3) + { + for (int index4 = 0; index4 < areaSizeY; ++index4) + WorldGen.SquareTileFrame(topLeftX + index3, topLeftY + index4); + } + } + + private static void MoveReplaceTileAnchor(ref int x, ref int y, ushort targetType, Tile t) + { + if (TileID.Sets.BasicChest[(int) t.type]) + { + x -= (int) t.frameX % 36 / 18; + y -= (int) t.frameY % 36 / 18; + } + if (!TileID.Sets.BasicDresser[(int) t.type]) + return; + x -= (int) t.frameX % 54 / 18; + y -= (int) t.frameY % 36 / 18; + } + + public static bool WouldTileReplacementBeBlockedByLiquid(int x, int y, int liquidType) + { + if (Main.tile[x - 1, y].liquid > (byte) 0 && (int) Main.tile[x - 1, y].liquidType() == liquidType || Main.tile[x + 1, y].liquid > (byte) 0 && (int) Main.tile[x + 1, y].liquidType() == liquidType) + return true; + return Main.tile[x, y - 1].liquid > (byte) 0 && (int) Main.tile[x, y - 1].liquidType() == liquidType; + } + + public static bool WouldTileReplacementWork(ushort attemptingToReplaceWith, int x, int y) + { + Tile t = Main.tile[x, y]; + if (attemptingToReplaceWith >= (ushort) 623 || TileID.Sets.Conversion.Grass[(int) attemptingToReplaceWith]) + return false; + bool flag1 = !WorldGen.ReplaceTile_IsValidSolid((int) attemptingToReplaceWith) || !WorldGen.ReplaceTile_IsValidSolid((int) t.type); + int num1 = !WorldGen.ReplaceTile_IsValidPlatform((int) attemptingToReplaceWith) ? 1 : (!WorldGen.ReplaceTile_IsValidPlatform((int) t.type) ? 1 : 0); + bool flag2 = !WorldGen.ReplaceTile_IsValidSolid((int) attemptingToReplaceWith) && !WorldGen.ReplaceTile_IsValidPlatform((int) attemptingToReplaceWith) || !WorldGen.ReplaceTile_IsValidSolid((int) t.type) && !WorldGen.ReplaceTile_IsValidPlatform((int) t.type); + bool flag3 = !WorldGen.ReplaceTile_IsValidChest((int) attemptingToReplaceWith) || !WorldGen.ReplaceTile_IsValidChest((int) t.type) || Chest.IsLocked(t); + bool flag4 = !WorldGen.ReplaceTile_IsValidDresser((int) attemptingToReplaceWith) || !WorldGen.ReplaceTile_IsValidDresser((int) t.type); + int num2 = flag1 ? 1 : 0; + return (num1 & num2 & (flag2 ? 1 : 0) & (flag3 ? 1 : 0) & (flag4 ? 1 : 0)) == 0; + } + + private static bool ReplaceTile_IsValidSolid(int type) => Main.tileSolid[type] && !Main.tileSolidTop[type] && !Main.tileFrameImportant[type]; + + private static bool ReplaceTile_IsValidChest(int type) => TileID.Sets.BasicChest[type]; + + private static bool ReplaceTile_IsValidDresser(int type) => TileID.Sets.BasicDresser[type]; + + private static bool ReplaceTile_IsValidPlatform(int type) => TileID.Sets.Platforms[type]; + + public static bool GetVanityTreeFoliageData( + int i, + int j, + int xoffset, + ref int treeFrame, + ref int treeStyle, + out int floorY, + out int topTextureFrameWidth, + out int topTextureFrameHeight) + { + Tile tile1 = Main.tile[i, j]; + int index1 = i + xoffset; + topTextureFrameWidth = 114; + topTextureFrameHeight = 96; + floorY = j; + for (int index2 = 0; index2 < 100; ++index2) + { + floorY = j + index2; + Tile tile2 = Main.tile[index1, floorY]; + if (tile2 == null) + return false; + if (TileID.Sets.Conversion.Grass[(int) tile2.type]) + { + switch (tile1.type) + { + case 596: + treeStyle = 29; + return true; + case 616: + treeStyle = 30; + return true; + default: + continue; + } + } + } + return false; + } + + public static bool GetGemTreeFoliageData( + int i, + int j, + int xoffset, + ref int treeFrame, + ref int treeStyle, + out int floorY, + out int topTextureFrameWidth, + out int topTextureFrameHeight) + { + Tile tile1 = Main.tile[i, j]; + int index1 = i + xoffset; + topTextureFrameWidth = 114; + topTextureFrameHeight = 96; + floorY = j; + for (int index2 = 0; index2 < 100; ++index2) + { + floorY = j + index2; + Tile tile2 = Main.tile[index1, floorY]; + if (tile2 == null) + return false; + if (TileID.Sets.Conversion.Stone[(int) tile2.type]) + { + switch (tile1.type) + { + case 583: + treeStyle = 22; + return true; + case 584: + treeStyle = 23; + return true; + case 585: + treeStyle = 24; + return true; + case 586: + treeStyle = 25; + return true; + case 587: + treeStyle = 26; + return true; + case 588: + treeStyle = 27; + return true; + case 589: + treeStyle = 28; + return true; + default: + continue; + } + } + } + return false; + } + + public static bool GetCommonTreeFoliageData( + int i, + int j, + int xoffset, + ref int treeFrame, + ref int treeStyle, + out int floorY, + out int topTextureFrameWidth, + out int topTextureFrameHeight) + { + Tile tile1 = Main.tile[i, j]; + int index1 = i + xoffset; + topTextureFrameWidth = 80; + topTextureFrameHeight = 80; + floorY = j; + for (int index2 = 0; index2 < 100; ++index2) + { + floorY = j + index2; + Tile tile2 = Main.tile[index1, floorY]; + if (tile2 == null) + return false; + switch (tile2.type) + { + case 2: + case 477: + int num = index1 > Main.treeX[0] ? (index1 > Main.treeX[1] ? (index1 > Main.treeX[2] ? WorldGen.TreeTops.GetTreeStyle(3) : WorldGen.TreeTops.GetTreeStyle(2)) : WorldGen.TreeTops.GetTreeStyle(1)) : WorldGen.TreeTops.GetTreeStyle(0); + switch (num) + { + case 0: + treeStyle = 0; + break; + case 5: + treeStyle = 10; + break; + default: + treeStyle = 5 + num; + break; + } + return true; + case 23: + treeStyle = 1; + return true; + case 60: + topTextureFrameHeight = 96; + topTextureFrameWidth = 114; + treeStyle = 2; + if (WorldGen.TreeTops.GetTreeStyle(5) == 1) + treeStyle = 11; + if ((double) floorY > Main.worldSurface) + treeStyle = 13; + return true; + case 70: + treeStyle = 14; + return true; + case 109: + case 492: + topTextureFrameHeight = 140; + int treeFoliageStyle = WorldGen.GetHollowTreeFoliageStyle(); + treeStyle = treeFoliageStyle; + if (treeFoliageStyle == 19) + topTextureFrameWidth = 114; + if (treeFoliageStyle == 20) + { + treeStyle = 20; + if (i % 6 == 1) + treeFrame += 3; + else if (i % 6 == 2) + treeFrame += 6; + else if (i % 6 == 3) + treeFrame += 9; + else if (i % 6 == 4) + treeFrame += 12; + else if (i % 6 == 5) + treeFrame += 15; + } + else if (i % 3 == 1) + treeFrame += 3; + else if (i % 3 == 2) + treeFrame += 6; + return true; + case 147: + treeStyle = 4; + int treeStyle1 = WorldGen.TreeTops.GetTreeStyle(6); + if (treeStyle1 == 0) + { + treeStyle = 12; + if (i % 10 == 0) + treeStyle = 18; + } + if (treeStyle1 == 2 || treeStyle1 == 3 || treeStyle1 == 32 || treeStyle1 == 4 || treeStyle1 == 42 || treeStyle1 == 5 || treeStyle1 == 7) + treeStyle = treeStyle1 % 2 != 0 ? (i <= Main.maxTilesX / 2 ? 17 : 16) : (i >= Main.maxTilesX / 2 ? 17 : 16); + return true; + case 199: + treeStyle = 5; + return true; + default: + continue; + } + } + return false; + } + + public static int GetHollowTreeFoliageStyle() + { + WorldGen.TreeTops.GetTreeStyle(7); + switch (WorldGen.hallowBG) + { + case 2: + case 3: + return 20; + case 4: + return 19; + default: + return 3; + } + } + + public static int GetTreeFrame(Tile t) + { + if (t.frameY == (short) 220) + return 1; + return t.frameY == (short) 242 ? 2 : 0; + } + + public static TreeTypes GetTreeType(int tileType) + { + switch (tileType) + { + case 2: + case 477: + return TreeTypes.Forest; + case 23: + return TreeTypes.Corrupt; + case 53: + return TreeTypes.Palm; + case 60: + return TreeTypes.Jungle; + case 70: + return TreeTypes.Mushroom; + case 109: + case 492: + return TreeTypes.Hallowed; + case 112: + return TreeTypes.PalmCorrupt; + case 116: + return TreeTypes.PalmHallowed; + case 147: + return TreeTypes.Snow; + case 199: + return TreeTypes.Crimson; + case 234: + return TreeTypes.PalmCrimson; + default: + return TreeTypes.None; + } + } + + public static bool IsThisAMushroomTree(int i, int j) + { + int x; + int y; + WorldGen.GetTreeBottom(i, j, out x, out y); + return WorldGen.GetTreeType((int) Main.tile[x, y].type) == TreeTypes.Mushroom; + } + + private static void ShakeTree(int i, int j) + { + if (WorldGen.numTreeShakes == WorldGen.maxTreeShakes) + return; + int x; + int y; + WorldGen.GetTreeBottom(i, j, out x, out y); + int index1 = y; + TreeTypes treeType = WorldGen.GetTreeType((int) Main.tile[x, y].type); + if (treeType == TreeTypes.None) + return; + for (int index2 = 0; index2 < WorldGen.numTreeShakes; ++index2) + { + if (WorldGen.treeShakeX[index2] == x && WorldGen.treeShakeY[index2] == y) + return; + } + WorldGen.treeShakeX[WorldGen.numTreeShakes] = x; + WorldGen.treeShakeY[WorldGen.numTreeShakes] = y; + ++WorldGen.numTreeShakes; + --y; + while (y > 10 && Main.tile[x, y].active() && TileID.Sets.IsShakeable[(int) Main.tile[x, y].type]) + --y; + ++y; + if (!WorldGen.IsTileALeafyTreeTop(x, y) || Collision.SolidTiles(x - 2, x + 2, y - 2, y + 2)) + return; + bool flag = false; + if (Main.getGoodWorld && WorldGen.genRand.Next(15) == 0) + Projectile.NewProjectile((float) (x * 16), (float) (y * 16), (float) Main.rand.Next(-100, 101) * (1f / 500f), 0.0f, 28, 0, 0.0f, (int) Player.FindClosest(new Vector2((float) (x * 16), (float) (y * 16)), 16, 16)); + else if (WorldGen.genRand.Next(1000) == 0 && treeType == TreeTypes.Forest) + { + flag = true; + Item.NewItem(x * 16, y * 16, 16, 16, 4366); + } + else if (WorldGen.genRand.Next(7) == 0 && (treeType == TreeTypes.Forest || treeType == TreeTypes.Snow || treeType == TreeTypes.Hallowed)) + { + flag = true; + Item.NewItem(x * 16, y * 16, 16, 16, 27, WorldGen.genRand.Next(1, 3)); + } + else if (WorldGen.genRand.Next(8) == 0 && treeType == TreeTypes.Mushroom) + { + flag = true; + Item.NewItem(x * 16, y * 16, 16, 16, 194, WorldGen.genRand.Next(1, 2)); + } + else if (WorldGen.genRand.Next(35) == 0 && Main.halloween) + { + flag = true; + Item.NewItem(x * 16, y * 16, 16, 16, 1809, WorldGen.genRand.Next(1, 3)); + } + else if (WorldGen.genRand.Next(12) == 0) + { + flag = true; + int dropItem = 0; + WorldGen.KillTile_GetItemDrops(i, j, Main.tile[i, j], out dropItem, out int _, out int _, out int _); + Item.NewItem(x * 16, y * 16, 16, 16, dropItem, WorldGen.genRand.Next(1, 4)); + } + else if (WorldGen.genRand.Next(20) == 0) + { + flag = true; + int Type = 71; + int Stack = WorldGen.genRand.Next(50, 100); + if (WorldGen.genRand.Next(30) == 0) + { + Type = 73; + Stack = 1; + if (WorldGen.genRand.Next(5) == 0) + ++Stack; + if (WorldGen.genRand.Next(10) == 0) + ++Stack; + } + else if (WorldGen.genRand.Next(10) == 0) + { + Type = 72; + Stack = WorldGen.genRand.Next(1, 21); + if (WorldGen.genRand.Next(3) == 0) + Stack += WorldGen.genRand.Next(1, 21); + if (WorldGen.genRand.Next(4) == 0) + Stack += WorldGen.genRand.Next(1, 21); + } + Item.NewItem(x * 16, y * 16, 16, 16, Type, Stack); + } + else if (WorldGen.genRand.Next(15) == 0 && (treeType == TreeTypes.Forest || treeType == TreeTypes.Hallowed)) + { + flag = true; + int Type; + switch (WorldGen.genRand.Next(5)) + { + case 0: + Type = 74; + break; + case 1: + Type = 297; + break; + case 2: + Type = 298; + break; + case 3: + Type = 299; + break; + default: + Type = 538; + break; + } + if ((double) Player.GetClosestRollLuck(x, y, NPC.goldCritterChance) == 0.0) + Type = WorldGen.genRand.Next(2) != 0 ? 539 : 442; + NPC.NewNPC(x * 16, y * 16, Type); + } + else if (WorldGen.genRand.Next(50) == 0 && treeType == TreeTypes.Hallowed && !Main.dayTime) + { + flag = true; + NPC.NewNPC(x * 16, y * 16, (int) Main.rand.NextFromList((short) 583, (short) 584, (short) 585)); + } + else if (WorldGen.genRand.Next(50) == 0 && treeType == TreeTypes.Forest && !Main.dayTime) + { + flag = true; + NPC npc = Main.npc[NPC.NewNPC(x * 16, y * 16, 611)]; + npc.velocity.Y = 1f; + npc.netUpdate = true; + } + else if (WorldGen.genRand.Next(40) == 0 && treeType == TreeTypes.Forest && !Main.dayTime && Main.halloween) + { + flag = true; + NPC.NewNPC(x * 16, y * 16, 301); + } + else if (WorldGen.genRand.Next(50) == 0 && (treeType == TreeTypes.Forest || treeType == TreeTypes.Hallowed)) + { + flag = true; + for (int index3 = 0; index3 < 5; ++index3) + { + Point point = new Point(x + Main.rand.Next(-2, 2), y - 1 + Main.rand.Next(-2, 2)); + int Type; + if ((double) Player.GetClosestRollLuck(x, y, NPC.goldCritterChance) == 0.0) + Type = 442; + else + Type = (int) Main.rand.NextFromList((short) 74, (short) 297, (short) 298); + NPC npc = Main.npc[NPC.NewNPC(point.X * 16, point.Y * 16, Type)]; + npc.velocity = Main.rand.NextVector2CircularEdge(3f, 3f); + npc.netUpdate = true; + } + } + else if (WorldGen.genRand.Next(40) == 0 && treeType == TreeTypes.Jungle) + { + flag = true; + for (int index4 = 0; index4 < 5; ++index4) + { + Point point = new Point(x + Main.rand.Next(-2, 2), y - 1 + Main.rand.Next(-2, 2)); + NPC npc = Main.npc[NPC.NewNPC(point.X * 16, point.Y * 16, (int) Main.rand.NextFromList((short) 210, (short) 211))]; + npc.ai[1] = 65f; + npc.netUpdate = true; + } + } + else if (WorldGen.genRand.Next(20) == 0 && (treeType == TreeTypes.Palm || treeType == TreeTypes.PalmCorrupt || treeType == TreeTypes.PalmCrimson || treeType == TreeTypes.PalmHallowed) && !WorldGen.IsPalmOasisTree(x)) + { + flag = true; + NPC.NewNPC(x * 16, y * 16, 603); + } + else if (WorldGen.genRand.Next(30) == 0 && (treeType == TreeTypes.Crimson || treeType == TreeTypes.PalmCrimson)) + { + flag = true; + NPC.NewNPC(x * 16 + 8, (y - 1) * 16, -22); + } + else if (WorldGen.genRand.Next(30) == 0 && (treeType == TreeTypes.Corrupt || treeType == TreeTypes.PalmCorrupt)) + { + flag = true; + NPC.NewNPC(x * 16 + 8, (y - 1) * 16, -11); + } + else if (WorldGen.genRand.Next(30) == 0 && treeType == TreeTypes.Jungle && !Main.dayTime) + { + flag = true; + NPC.NewNPC(x * 16, y * 16, 51); + } + else if (WorldGen.genRand.Next(40) == 0 && treeType == TreeTypes.Jungle) + { + flag = true; + Projectile.NewProjectile((float) (x * 16 + 8), (float) ((y - 1) * 16), 0.0f, 0.0f, 655, 0, 0.0f, Main.myPlayer); + } + else if (WorldGen.genRand.Next(20) == 0 && (treeType == TreeTypes.Forest || treeType == TreeTypes.Hallowed) && !Main.raining && !NPC.TooWindyForButterflies && Main.dayTime) + { + flag = true; + int Type = 356; + if ((double) Player.GetClosestRollLuck(x, y, NPC.goldCritterChance) == 0.0) + Type = 444; + NPC.NewNPC(x * 16, y * 16, Type); + } + else if (WorldGen.genRand.Next(15) == 0 && treeType == TreeTypes.Forest) + { + flag = true; + int Type; + switch (WorldGen.genRand.Next(5)) + { + case 0: + Type = 4009; + break; + case 1: + Type = 4293; + break; + case 2: + Type = 4282; + break; + case 3: + Type = 4290; + break; + default: + Type = 4291; + break; + } + Item.NewItem(x * 16, y * 16, 16, 16, Type); + } + else if (WorldGen.genRand.Next(15) == 0 && treeType == TreeTypes.Snow) + { + flag = true; + int Type = WorldGen.genRand.Next(2) != 0 ? 4295 : 4286; + Item.NewItem(x * 16, y * 16, 16, 16, Type); + } + else if (WorldGen.genRand.Next(15) == 0 && treeType == TreeTypes.Jungle) + { + flag = true; + int Type = WorldGen.genRand.Next(2) != 0 ? 4292 : 4294; + Item.NewItem(x * 16, y * 16, 16, 16, Type); + } + else if (WorldGen.genRand.Next(15) == 0 && (treeType == TreeTypes.Palm || treeType == TreeTypes.PalmCorrupt || treeType == TreeTypes.PalmCrimson || treeType == TreeTypes.PalmHallowed) && !WorldGen.IsPalmOasisTree(x)) + { + flag = true; + int Type = WorldGen.genRand.Next(2) != 0 ? 4287 : 4283; + Item.NewItem(x * 16, y * 16, 16, 16, Type); + } + else if (WorldGen.genRand.Next(15) == 0 && (treeType == TreeTypes.Corrupt || treeType == TreeTypes.PalmCorrupt)) + { + flag = true; + int Type = WorldGen.genRand.Next(2) != 0 ? 4289 : 4284; + Item.NewItem(x * 16, y * 16, 16, 16, Type); + } + else if (WorldGen.genRand.Next(15) == 0 && (treeType == TreeTypes.Hallowed || treeType == TreeTypes.PalmHallowed)) + { + flag = true; + int Type = WorldGen.genRand.Next(2) != 0 ? 4288 : 4297; + Item.NewItem(x * 16, y * 16, 16, 16, Type); + } + else if (WorldGen.genRand.Next(15) == 0 && (treeType == TreeTypes.Crimson || treeType == TreeTypes.PalmCrimson)) + { + flag = true; + int Type = WorldGen.genRand.Next(2) != 0 ? 4285 : 4296; + Item.NewItem(x * 16, y * 16, 16, 16, Type); + } + if (!flag) + return; + int treeHeight = 0; + int treeFrame = 0; + int passStyle = 0; + WorldGen.GetTreeLeaf(x, Main.tile[x, y], Main.tile[x, index1], ref treeHeight, out treeFrame, out passStyle); + if (Main.netMode == 2) + NetMessage.SendData(112, number: 1, number2: ((float) x), number3: ((float) y), number4: 1f, number5: passStyle); + if (Main.netMode != 0) + return; + WorldGen.TreeGrowFX(x, y, 1, passStyle, true); + } + + private static void GetTreeBottom(int i, int j, out int x, out int y) + { + x = i; + y = j; + Tile tileSafely1 = Framing.GetTileSafely(x, y); + if (tileSafely1.type == (ushort) 323) + { + for (; y < Main.maxTilesY - 50 && (!tileSafely1.active() || tileSafely1.type == (ushort) 323); tileSafely1 = Framing.GetTileSafely(x, y)) + ++y; + } + else + { + int num1 = (int) tileSafely1.frameX / 22; + int num2 = (int) tileSafely1.frameY / 22; + if (num1 == 3 && num2 <= 2) + ++x; + else if (num1 == 4 && num2 >= 3 && num2 <= 5) + --x; + else if (num1 == 1 && num2 >= 6 && num2 <= 8) + --x; + else if (num1 == 2 && num2 >= 6 && num2 <= 8) + ++x; + else if (num1 == 2 && num2 >= 9) + ++x; + else if (num1 == 3 && num2 >= 9) + --x; + for (Tile tileSafely2 = Framing.GetTileSafely(x, y); y < Main.maxTilesY - 50 && (!tileSafely2.active() || TileID.Sets.IsATreeTrunk[(int) tileSafely2.type] || tileSafely2.type == (ushort) 72); tileSafely2 = Framing.GetTileSafely(x, y)) + ++y; + } + } + + private static void AttemptFossilShattering(int i, int j, Tile tileCache, bool fail) + { + if (tileCache.type != (ushort) 404 || Main.netMode == 1 || WorldGen.fossilBreak) + return; + WorldGen.fossilBreak = true; + for (int i1 = i - 1; i1 <= i + 1; ++i1) + { + for (int j1 = j - 1; j1 <= j + 1; ++j1) + { + int maxValue = 15; + if (!WorldGen.SolidTile(i1, j1 + 1)) + maxValue = 4; + else if (i1 == i && j1 == j - 1 && !fail) + maxValue = 4; + if ((i1 != i || j1 != j) && Main.tile[i1, j1].active() && Main.tile[i1, j1].type == (ushort) 404 && WorldGen.genRand.Next(maxValue) == 0) + { + WorldGen.KillTile(i1, j1, noItem: true); + if (Main.netMode == 2) + NetMessage.SendData(17, number2: ((float) i1), number3: ((float) j1)); + } + } + } + WorldGen.fossilBreak = false; + } + + public static void KillTile(int i, int j, bool fail = false, bool effectOnly = false, bool noItem = false) + { + if (i < 0 || j < 0 || i >= Main.maxTilesX || j >= Main.maxTilesY) + return; + Tile tileCache = Main.tile[i, j]; + if (tileCache == null) + { + tileCache = new Tile(); + Main.tile[i, j] = tileCache; + } + if (!tileCache.active()) + return; + if (j >= 1 && Main.tile[i, j - 1] == null) + Main.tile[i, j - 1] = new Tile(); + int num1 = WorldGen.CheckTileBreakability(i, j); + if (num1 == 1) + fail = true; + if (num1 == 2) + return; + if (WorldGen.gen) + noItem = true; + if (!effectOnly && !WorldGen.stopDrops) + { + if (!noItem && FixExploitManEaters.SpotProtected(i, j)) + return; + if (!WorldGen.gen && !Main.gameMenu) + WorldGen.KillTile_PlaySounds(i, j, fail, tileCache); + } + if (tileCache.type == (ushort) 128 || tileCache.type == (ushort) 269) + { + int index1 = i; + int frameX1 = (int) tileCache.frameX; + int frameX2 = (int) tileCache.frameX; + while (frameX2 >= 100) + frameX2 -= 100; + while (frameX2 >= 36) + frameX2 -= 36; + if (frameX2 == 18) + { + frameX1 = (int) Main.tile[i - 1, j].frameX; + --index1; + } + if (frameX1 >= 100) + { + int index2 = 0; + while (frameX1 >= 100) + { + frameX1 -= 100; + ++index2; + } + int num2 = (int) Main.tile[index1, j].frameY / 18; + if (num2 == 0) + Item.NewItem(i * 16, j * 16, 16, 16, Item.headType[index2]); + if (num2 == 1) + Item.NewItem(i * 16, j * 16, 16, 16, Item.bodyType[index2]); + if (num2 == 2) + Item.NewItem(i * 16, j * 16, 16, 16, Item.legType[index2]); + int frameX3 = (int) Main.tile[index1, j].frameX; + while (frameX3 >= 100) + frameX3 -= 100; + Main.tile[index1, j].frameX = (short) frameX3; + } + } + if (tileCache.type == (ushort) 334) + { + int index = i; + int frameX4 = (int) tileCache.frameX; + int num3 = (int) tileCache.frameX; + int num4 = 0; + while (num3 >= 5000) + { + num3 -= 5000; + ++num4; + } + if (num4 != 0) + num3 = (num4 - 1) * 18; + int num5 = num3 % 54; + if (num5 == 18) + { + frameX4 = (int) Main.tile[i - 1, j].frameX; + --index; + } + if (num5 == 36) + { + frameX4 = (int) Main.tile[i - 2, j].frameX; + index -= 2; + } + if (frameX4 >= 5000) + { + int num6 = frameX4 % 5000 - 100; + int frameX5 = (int) Main.tile[index + 1, j].frameX; + int pre = frameX5 < 25000 ? frameX5 - 10000 : frameX5 - 25000; + if (Main.netMode != 1) + { + Item obj = new Item(); + obj.netDefaults(num6); + obj.Prefix(pre); + int number = Item.NewItem(i * 16, j * 16, 16, 16, num6, noBroadcast: true); + obj.position = Main.item[number].position; + Main.item[number] = obj; + NetMessage.SendData(21, number: number); + } + int num7 = (int) Main.tile[index, j].frameX; + int num8 = 0; + while (num7 >= 5000) + { + num7 -= 5000; + ++num8; + } + if (num8 != 0) + num7 = (num8 - 1) * 18; + Main.tile[index, j].frameX = (short) num7; + Main.tile[index + 1, j].frameX = (short) (num7 + 18); + } + } + if (tileCache.type == (ushort) 395) + { + int key = TEItemFrame.Find(i - (int) tileCache.frameX % 36 / 18, j - (int) tileCache.frameY % 36 / 18); + if (key != -1 && ((TEItemFrame) TileEntity.ByID[key]).item.stack > 0) + { + ((TEItemFrame) TileEntity.ByID[key]).DropItem(); + if (Main.netMode == 2) + return; + Main.LocalPlayer.InterruptItemUsageIfOverTile(395); + return; + } + } + if (tileCache.type == (ushort) 520) + { + int key = TEFoodPlatter.Find(i, j); + if (key != -1 && ((TEFoodPlatter) TileEntity.ByID[key]).item.stack > 0) + { + ((TEFoodPlatter) TileEntity.ByID[key]).DropItem(); + if (Main.netMode == 2) + return; + Main.LocalPlayer.InterruptItemUsageIfOverTile(520); + return; + } + } + if (tileCache.type == (ushort) 471 && TEWeaponsRack.KillTileDropItem(tileCache, i, j) || tileCache.type == (ushort) 470 && WorldGen.CheckTileBreakability2_ShouldTileSurvive(i, j) | fail || tileCache.type == (ushort) 475 && WorldGen.CheckTileBreakability2_ShouldTileSurvive(i, j) | fail) + return; + int tileDustAmount = WorldGen.KillTile_GetTileDustAmount(fail, tileCache); + for (int index = 0; index < tileDustAmount; ++index) + WorldGen.KillTile_MakeTileDust(i, j, tileCache); + if (effectOnly) + return; + WorldGen.AttemptFossilShattering(i, j, tileCache, fail); + if (fail) + { + if (Main.netMode != 1 && TileID.Sets.IsShakeable[(int) tileCache.type]) + WorldGen.ShakeTree(i, j); + if (tileCache.type == (ushort) 2 || tileCache.type == (ushort) 23 || tileCache.type == (ushort) 109 || tileCache.type == (ushort) 199 || tileCache.type == (ushort) 477 || tileCache.type == (ushort) 492) + tileCache.type = (ushort) 0; + if (tileCache.type == (ushort) 60 || tileCache.type == (ushort) 70) + tileCache.type = (ushort) 59; + if (Main.tileMoss[(int) tileCache.type]) + tileCache.type = (ushort) 1; + if (TileID.Sets.tileMossBrick[(int) tileCache.type]) + tileCache.type = (ushort) 38; + WorldGen.SquareTileFrame(i, j); + } + else + { + if (Main.getGoodWorld && Main.netMode != 1 && tileCache.type == (ushort) 57) + { + for (int index3 = 0; index3 < 8; ++index3) + { + int maxValue = 2; + int i1 = i; + int j1 = j; + if (index3 == 0) + --i1; + else if (index3 == 1) + ++i1; + else if (index3 == 2) + --j1; + else if (index3 == 3) + ++j1; + else if (index3 == 4) + { + --i1; + --j1; + } + else if (index3 == 5) + { + ++i1; + --j1; + } + else if (index3 == 6) + { + --i1; + ++j1; + } + else if (index3 == 7) + { + ++i1; + ++j1; + } + Tile tile = Main.tile[i1, j1]; + if (tile.active() && WorldGen.genRand.Next(maxValue) == 0 && tile.type == (ushort) 57 && !WorldGen.SolidTile(i1, j1 + 1)) + { + WorldGen.KillTile(i1, j1, noItem: true); + int index4 = Projectile.NewProjectile((float) (i1 * 16 + 8), (float) (j1 * 16 + 8), 0.0f, 0.41f, 40, 15, 0.0f, Main.myPlayer); + Main.projectile[index4].netUpdate = true; + } + } + } + if (Main.netMode != 1 && tileCache.type >= (ushort) 481 && tileCache.type <= (ushort) 483) + { + for (int index = 0; index < 8; ++index) + { + int maxValue = 6; + int i2 = i; + int j2 = j; + if (index == 0) + --i2; + else if (index == 1) + ++i2; + else if (index == 2) + { + --j2; + maxValue /= 2; + } + else if (index == 3) + ++j2; + else if (index == 4) + { + --i2; + --j2; + } + else if (index == 5) + { + ++i2; + --j2; + } + else if (index == 6) + { + --i2; + ++j2; + } + else if (index == 7) + { + ++i2; + ++j2; + } + Tile tile = Main.tile[i2, j2]; + if (tile.active() && WorldGen.genRand.Next(maxValue) == 0 && tile.type >= (ushort) 481 && tile.type <= (ushort) 483) + { + tileCache.active(false); + WorldGen.KillTile(i2, j2, noItem: true); + } + } + int Type = (int) tileCache.type - 481 + 736; + int Damage = 20; + switch (Main.netMode) + { + case 0: + Projectile.NewProjectile((float) (i * 16 + 8), (float) (j * 16 + 8), 0.0f, 0.41f, Type, Damage, 0.0f, Main.myPlayer); + break; + case 2: + int index5 = Projectile.NewProjectile((float) (i * 16 + 8), (float) (j * 16 + 8), 0.0f, 0.41f, Type, Damage, 0.0f, Main.myPlayer); + Main.projectile[index5].netUpdate = true; + break; + } + } + if (WorldGen.CheckTileBreakability2_ShouldTileSurvive(i, j)) + return; + if (tileCache.type == (ushort) 51 && tileCache.wall == (ushort) 62 && WorldGen.genRand.Next(4) != 0) + noItem = true; + if (!noItem && !WorldGen.stopDrops && Main.netMode != 1) + { + WorldGen.KillTile_DropBait(i, j, tileCache); + WorldGen.KillTile_DropItems(i, j, tileCache); + } + if (Main.netMode != 2) + AchievementsHelper.NotifyTileDestroyed(Main.player[Main.myPlayer], tileCache.type); + tileCache.active(false); + tileCache.halfBrick(false); + tileCache.frameX = (short) -1; + tileCache.frameY = (short) -1; + tileCache.color((byte) 0); + tileCache.frameNumber((byte) 0); + if (tileCache.type == (ushort) 58 && j > Main.UnderworldLayer) + { + tileCache.lava(true); + tileCache.liquid = (byte) 128; + } + else if (tileCache.type == (ushort) 419) + Wiring.PokeLogicGate(i, j + 1); + else if (TileID.Sets.BlocksWaterDrawingBehindSelf[(int) tileCache.type]) + WorldGen.SquareWallFrame(i, j); + tileCache.type = (ushort) 0; + tileCache.inActive(false); + WorldGen.SquareTileFrame(i, j); + } + } + + private static Player GetPlayerForTile(int x, int y) => Main.player[(int) Player.FindClosest(new Vector2((float) x, (float) y) * 16f, 16, 16)]; + + private static void KillTile_DropItems( + int x, + int y, + Tile tileCache, + bool includeLargeObjectDrops = false) + { + int dropItem; + int dropItemStack; + int secondaryItem; + int secondaryItemStack; + WorldGen.KillTile_GetItemDrops(x, y, tileCache, out dropItem, out dropItemStack, out secondaryItem, out secondaryItemStack, includeLargeObjectDrops); + if (Main.getGoodWorld && !tileCache.active()) + return; + if (dropItem > 0) + { + int i = Item.NewItem(x * 16, y * 16, 16, 16, dropItem, dropItemStack, pfix: -1); + Main.item[i].TryCombiningIntoNearbyItems(i); + } + if (secondaryItem <= 0) + return; + int i1 = Item.NewItem(x * 16, y * 16, 16, 16, secondaryItem, secondaryItemStack, pfix: -1); + Main.item[i1].TryCombiningIntoNearbyItems(i1); + } + + public static void KillTile_GetItemDrops( + int x, + int y, + Tile tileCache, + out int dropItem, + out int dropItemStack, + out int secondaryItem, + out int secondaryItemStack, + bool includeLargeObjectDrops = false) + { + dropItem = 0; + dropItemStack = 1; + secondaryItem = 0; + secondaryItemStack = 1; + if (includeLargeObjectDrops) + { + switch (tileCache.type) + { + case 21: + case 467: + dropItem = WorldGen.GetChestItemDrop(x, y, (int) tileCache.type); + break; + case 88: + int style1 = (int) tileCache.frameX / 54; + dropItem = WorldGen.GetDresserItemDrop(style1); + break; + } + } + switch (tileCache.type) + { + case 0: + case 2: + case 109: + case 199: + case 477: + case 492: + dropItem = 2; + break; + case 1: + dropItem = 3; + break; + case 3: + if (tileCache.frameX == (short) 144) + { + dropItem = 5; + break; + } + if (!WorldGen.KillTile_ShouldDropSeeds(x, y)) + break; + dropItem = 283; + break; + case 4: + int num1 = (int) tileCache.frameY / 22; + switch (num1) + { + case 0: + dropItem = 8; + return; + case 8: + dropItem = 523; + return; + case 9: + dropItem = 974; + return; + case 10: + dropItem = 1245; + return; + case 11: + dropItem = 1333; + return; + case 12: + dropItem = 2274; + return; + case 13: + dropItem = 3004; + return; + case 14: + dropItem = 3045; + return; + case 15: + dropItem = 3114; + return; + case 16: + dropItem = 4383; + return; + case 17: + dropItem = 4384; + return; + case 18: + dropItem = 4385; + return; + case 19: + dropItem = 4386; + return; + case 20: + dropItem = 4387; + return; + case 21: + dropItem = 4388; + return; + default: + dropItem = 426 + num1; + return; + } + case 5: + case 596: + case 616: + bool bonusWood = false; + WorldGen.KillTile_GetTreeDrops(x, y, tileCache, ref bonusWood, ref dropItem, ref secondaryItem); + if (!bonusWood) + break; + ++dropItemStack; + break; + case 6: + dropItem = 11; + break; + case 7: + dropItem = 12; + break; + case 8: + dropItem = 13; + break; + case 9: + dropItem = 14; + break; + case 13: + switch ((int) tileCache.frameX / 18) + { + case 1: + dropItem = 28; + return; + case 2: + dropItem = 110; + return; + case 3: + dropItem = 350; + return; + case 4: + dropItem = 351; + return; + case 5: + dropItem = 2234; + return; + case 6: + dropItem = 2244; + return; + case 7: + dropItem = 2257; + return; + case 8: + dropItem = 2258; + return; + default: + dropItem = 31; + return; + } + case 19: + int num2 = (int) tileCache.frameY / 18; + switch (num2) + { + case 0: + dropItem = 94; + return; + case 1: + dropItem = 631; + return; + case 2: + dropItem = 632; + return; + case 3: + dropItem = 633; + return; + case 4: + dropItem = 634; + return; + case 5: + dropItem = 913; + return; + case 6: + dropItem = 1384; + return; + case 7: + dropItem = 1385; + return; + case 8: + dropItem = 1386; + return; + case 9: + dropItem = 1387; + return; + case 10: + dropItem = 1388; + return; + case 11: + dropItem = 1389; + return; + case 12: + dropItem = 1418; + return; + case 13: + dropItem = 1457; + return; + case 14: + dropItem = 1702; + return; + case 15: + dropItem = 1796; + return; + case 16: + dropItem = 1818; + return; + case 17: + dropItem = 2518; + return; + case 18: + dropItem = 2549; + return; + case 19: + dropItem = 2566; + return; + case 20: + dropItem = 2581; + return; + case 21: + dropItem = 2627; + return; + case 22: + dropItem = 2628; + return; + case 23: + dropItem = 2629; + return; + case 24: + dropItem = 2630; + return; + case 25: + dropItem = 2744; + return; + case 26: + dropItem = 2822; + return; + case 27: + dropItem = 3144; + return; + case 28: + dropItem = 3146; + return; + case 29: + dropItem = 3145; + return; + default: + if (num2 >= 30 && num2 <= 35) + { + dropItem = 3903 + num2 - 30; + return; + } + switch (num2) + { + case 36: + dropItem = 3945; + return; + case 37: + dropItem = 3957; + return; + case 38: + dropItem = 4159; + return; + case 39: + dropItem = 4180; + return; + case 40: + dropItem = 4201; + return; + case 41: + dropItem = 4222; + return; + case 42: + dropItem = 4311; + return; + case 43: + dropItem = 4416; + return; + case 44: + dropItem = 4580; + return; + default: + return; + } + } + case 22: + dropItem = 56; + break; + case 23: + dropItem = 2; + break; + case 24: + if (tileCache.frameX != (short) 144) + break; + dropItem = 60; + break; + case 25: + dropItem = 61; + break; + case 30: + dropItem = 9; + break; + case 33: + int num3 = (int) tileCache.frameY / 22; + dropItem = 105; + switch (num3) + { + case 1: + dropItem = 1405; + return; + case 2: + dropItem = 1406; + return; + case 3: + dropItem = 1407; + return; + default: + if (num3 >= 4 && num3 <= 13) + { + dropItem = 2045 + num3 - 4; + return; + } + if (num3 >= 14 && num3 <= 16) + { + dropItem = 2153 + num3 - 14; + return; + } + switch (num3) + { + case 17: + dropItem = 2236; + return; + case 18: + dropItem = 2523; + return; + case 19: + dropItem = 2542; + return; + case 20: + dropItem = 2556; + return; + case 21: + dropItem = 2571; + return; + case 22: + dropItem = 2648; + return; + case 23: + dropItem = 2649; + return; + case 24: + dropItem = 2650; + return; + case 25: + dropItem = 2651; + return; + case 26: + dropItem = 2818; + return; + case 27: + dropItem = 3171; + return; + case 28: + dropItem = 3173; + return; + case 29: + dropItem = 3172; + return; + case 30: + dropItem = 3890; + return; + case 31: + dropItem = 3936; + return; + case 32: + dropItem = 3962; + return; + case 33: + dropItem = 4150; + return; + case 34: + dropItem = 4171; + return; + case 35: + dropItem = 4192; + return; + case 36: + dropItem = 4213; + return; + case 37: + dropItem = 4303; + return; + case 38: + dropItem = 4571; + return; + default: + return; + } + } + case 36: + dropItem = 1869; + break; + case 37: + dropItem = 116; + break; + case 38: + dropItem = 129; + break; + case 39: + dropItem = 131; + break; + case 40: + dropItem = 133; + break; + case 41: + dropItem = 134; + break; + case 43: + dropItem = 137; + break; + case 44: + dropItem = 139; + break; + case 45: + dropItem = 141; + break; + case 46: + dropItem = 143; + break; + case 47: + dropItem = 145; + break; + case 48: + dropItem = 147; + break; + case 49: + dropItem = 148; + break; + case 50: + if (tileCache.frameX == (short) 90) + { + dropItem = 165; + break; + } + dropItem = 149; + break; + case 51: + dropItem = 150; + break; + case 52: + case 62: + case 382: + if (Main.rand.Next(2) != 0 || !WorldGen.GetPlayerForTile(x, y).cordage) + break; + dropItem = 2996; + break; + case 53: + dropItem = 169; + break; + case 54: + dropItem = 170; + break; + case 56: + dropItem = 173; + break; + case 57: + dropItem = 172; + break; + case 58: + dropItem = 174; + break; + case 59: + case 60: + dropItem = 176; + break; + case 61: + case 74: + if (tileCache.frameX == (short) 144 && tileCache.type == (ushort) 61) + { + dropItem = 331; + dropItemStack = Main.rand.Next(2, 4); + break; + } + if (tileCache.frameX == (short) 162 && tileCache.type == (ushort) 61) + { + dropItem = 223; + break; + } + if (tileCache.frameX >= (short) 108 && tileCache.frameX <= (short) 126 && tileCache.type == (ushort) 61 && Main.rand.Next(20) == 0) + { + dropItem = 208; + break; + } + if (Main.rand.Next(100) != 0) + break; + dropItem = 195; + break; + case 63: + case 64: + case 65: + case 66: + case 67: + case 68: + dropItem = (int) tileCache.type - 63 + 177; + break; + case 70: + dropItem = 176; + break; + case 71: + case 72: + if (Main.rand.Next(40) == 0) + { + dropItem = 194; + break; + } + if (Main.rand.Next(2) != 0) + break; + dropItem = 183; + break; + case 73: + if (!WorldGen.KillTile_ShouldDropSeeds(x, y)) + break; + dropItem = 283; + break; + case 75: + dropItem = 192; + break; + case 76: + dropItem = 214; + break; + case 78: + dropItem = 222; + break; + case 80: + dropItem = 276; + break; + case 81: + dropItem = 275; + break; + case 83: + case 84: + int style2 = (int) tileCache.frameX / 18; + dropItem = 313 + style2; + int num4 = 307 + style2; + if (style2 == 6) + { + dropItem = 2358; + num4 = 2357; + } + bool flag = WorldGen.IsHarvestableHerbWithSeed((int) tileCache.type, style2); + if (WorldGen.GetPlayerForTile(x, y).HeldItem.type == 213) + { + dropItemStack = Main.rand.Next(1, 3); + secondaryItem = num4; + secondaryItemStack = Main.rand.Next(1, 6); + break; + } + if (!flag) + break; + secondaryItem = num4; + secondaryItemStack = Main.rand.Next(1, 4); + break; + case 107: + dropItem = 364; + break; + case 108: + dropItem = 365; + break; + case 110: + if (tileCache.frameX != (short) 144) + break; + dropItem = 5; + break; + case 111: + dropItem = 366; + break; + case 112: + dropItem = 370; + break; + case 116: + dropItem = 408; + break; + case 117: + dropItem = 409; + break; + case 118: + dropItem = 412; + break; + case 119: + dropItem = 413; + break; + case 120: + dropItem = 414; + break; + case 121: + dropItem = 415; + break; + case 122: + dropItem = 416; + break; + case 123: + dropItem = 424; + break; + case 124: + dropItem = 480; + break; + case 129: + if (tileCache.frameX >= (short) 324) + { + dropItem = 4988; + break; + } + dropItem = 502; + break; + case 130: + dropItem = 511; + break; + case 131: + dropItem = 512; + break; + case 135: + int num5 = (int) tileCache.frameY / 18; + if (num5 == 0) + dropItem = 529; + if (num5 == 1) + dropItem = 541; + if (num5 == 2) + dropItem = 542; + if (num5 == 3) + dropItem = 543; + if (num5 == 4) + dropItem = 852; + if (num5 == 5) + dropItem = 853; + if (num5 != 6) + break; + dropItem = 1151; + break; + case 136: + dropItem = 538; + break; + case 137: + int num6 = (int) tileCache.frameY / 18; + if (num6 == 0) + dropItem = 539; + if (num6 == 1) + dropItem = 1146; + if (num6 == 2) + dropItem = 1147; + if (num6 == 3) + dropItem = 1148; + if (num6 != 4) + break; + dropItem = 1149; + break; + case 140: + dropItem = 577; + break; + case 141: + dropItem = 580; + break; + case 144: + if (tileCache.frameX == (short) 0) + dropItem = 583; + if (tileCache.frameX == (short) 18) + dropItem = 584; + if (tileCache.frameX == (short) 36) + dropItem = 585; + if (tileCache.frameX == (short) 54) + dropItem = 4484; + if (tileCache.frameX != (short) 72) + break; + dropItem = 4485; + break; + case 145: + dropItem = 586; + break; + case 146: + dropItem = 591; + break; + case 147: + dropItem = 593; + break; + case 148: + dropItem = 594; + break; + case 149: + if (tileCache.frameX == (short) 0 || tileCache.frameX == (short) 54) + { + dropItem = 596; + break; + } + if (tileCache.frameX == (short) 18 || tileCache.frameX == (short) 72) + { + dropItem = 597; + break; + } + if (tileCache.frameX != (short) 36 && tileCache.frameX != (short) 90) + break; + dropItem = 598; + break; + case 150: + dropItem = 604; + break; + case 151: + dropItem = 607; + break; + case 152: + dropItem = 609; + break; + case 153: + dropItem = 611; + break; + case 154: + dropItem = 612; + break; + case 155: + dropItem = 613; + break; + case 156: + dropItem = 614; + break; + case 157: + dropItem = 619; + break; + case 158: + dropItem = 620; + break; + case 159: + dropItem = 621; + break; + case 160: + dropItem = 662; + break; + case 161: + dropItem = 664; + break; + case 163: + dropItem = 833; + break; + case 164: + dropItem = 834; + break; + case 166: + dropItem = 699; + break; + case 167: + dropItem = 700; + break; + case 168: + dropItem = 701; + break; + case 169: + dropItem = 702; + break; + case 170: + dropItem = 1872; + break; + case 171: + if (tileCache.frameX < (short) 10) + break; + WorldGen.dropXmasTree(x, y, 0); + WorldGen.dropXmasTree(x, y, 1); + WorldGen.dropXmasTree(x, y, 2); + WorldGen.dropXmasTree(x, y, 3); + break; + case 174: + dropItem = 713; + break; + case 175: + dropItem = 717; + break; + case 176: + dropItem = 718; + break; + case 177: + dropItem = 719; + break; + case 178: + switch ((int) tileCache.frameX / 18) + { + case 0: + dropItem = 181; + return; + case 1: + dropItem = 180; + return; + case 2: + dropItem = 177; + return; + case 3: + dropItem = 179; + return; + case 4: + dropItem = 178; + return; + case 5: + dropItem = 182; + return; + case 6: + dropItem = 999; + return; + default: + return; + } + case 179: + case 180: + case 181: + case 182: + case 183: + case 381: + case 534: + case 536: + case 539: + dropItem = 3; + break; + case 188: + dropItem = 276; + break; + case 189: + dropItem = 751; + break; + case 190: + dropItem = 183; + break; + case 191: + dropItem = 9; + break; + case 193: + dropItem = 762; + break; + case 194: + dropItem = 154; + break; + case 195: + dropItem = 763; + break; + case 196: + dropItem = 765; + break; + case 197: + dropItem = 767; + break; + case 198: + dropItem = 775; + break; + case 200: + dropItem = 835; + break; + case 201: + if (tileCache.frameX != (short) 270) + break; + dropItem = 2887; + break; + case 202: + dropItem = 824; + break; + case 203: + dropItem = 836; + break; + case 204: + dropItem = 880; + break; + case 206: + dropItem = 883; + break; + case 208: + dropItem = 911; + break; + case 210: + dropItem = 937; + break; + case 211: + dropItem = 947; + break; + case 213: + dropItem = 965; + break; + case 214: + dropItem = 85; + break; + case 221: + dropItem = 1104; + break; + case 222: + dropItem = 1105; + break; + case 223: + dropItem = 1106; + break; + case 224: + dropItem = 1103; + break; + case 225: + if (Main.rand.Next(3) == 0) + { + tileCache.honey(true); + tileCache.liquid = byte.MaxValue; + break; + } + dropItem = 1124; + if (Main.netMode == 1 || Main.rand.Next(2) != 0) + break; + int num7 = 1; + if (Main.rand.Next(3) == 0) + num7 = 2; + for (int index1 = 0; index1 < num7; ++index1) + { + int Type = Main.rand.Next(210, 212); + int index2 = NPC.NewNPC(x * 16 + 8, y * 16 + 15, Type, 1); + Main.npc[index2].velocity.X = (float) Main.rand.Next(-200, 201) * (1f / 500f); + Main.npc[index2].velocity.Y = (float) Main.rand.Next(-200, 201) * (1f / 500f); + Main.npc[index2].netUpdate = true; + } + break; + case 226: + dropItem = 1101; + break; + case 227: + int num8 = (int) tileCache.frameX / 34; + dropItem = 1107 + num8; + if (num8 < 8 || num8 > 11) + break; + dropItem = 3385 + num8 - 8; + break; + case 229: + dropItem = 1125; + break; + case 230: + dropItem = 1127; + break; + case 232: + dropItem = 1150; + break; + case 234: + dropItem = 1246; + break; + case 239: + int num9 = (int) tileCache.frameX / 18; + if (num9 == 0) + dropItem = 20; + if (num9 == 1) + dropItem = 703; + if (num9 == 2) + dropItem = 22; + if (num9 == 3) + dropItem = 704; + if (num9 == 4) + dropItem = 21; + if (num9 == 5) + dropItem = 705; + if (num9 == 6) + dropItem = 19; + if (num9 == 7) + dropItem = 706; + if (num9 == 8) + dropItem = 57; + if (num9 == 9) + dropItem = 117; + if (num9 == 10) + dropItem = 175; + if (num9 == 11) + dropItem = 381; + if (num9 == 12) + dropItem = 1184; + if (num9 == 13) + dropItem = 382; + if (num9 == 14) + dropItem = 1191; + if (num9 == 15) + dropItem = 391; + if (num9 == 16) + dropItem = 1198; + if (num9 == 17) + dropItem = 1006; + if (num9 == 18) + dropItem = 1225; + if (num9 == 19) + dropItem = 1257; + if (num9 == 20) + dropItem = 1552; + if (num9 == 21) + dropItem = 3261; + if (num9 != 22) + break; + dropItem = 3467; + break; + case 248: + dropItem = 1589; + break; + case 249: + dropItem = 1591; + break; + case 250: + dropItem = 1593; + break; + case 251: + dropItem = 1725; + break; + case 252: + dropItem = 1727; + break; + case 253: + dropItem = 1729; + break; + case (ushort) byte.MaxValue: + case 256: + case 257: + case 258: + case 259: + case 260: + case 261: + dropItem = 1970 + (int) tileCache.type - (int) byte.MaxValue; + break; + case 262: + case 263: + case 264: + case 265: + case 266: + case 267: + case 268: + dropItem = 1970 + (int) tileCache.type - 262; + break; + case 272: + dropItem = 1344; + break; + case 273: + dropItem = 2119; + break; + case 274: + dropItem = 2120; + break; + case 284: + dropItem = 2173; + break; + case 311: + dropItem = 2260; + break; + case 312: + dropItem = 2261; + break; + case 313: + dropItem = 2262; + break; + case 314: + dropItem = Minecart.GetTrackItem(tileCache); + break; + case 315: + dropItem = 2435; + break; + case 321: + dropItem = 2503; + break; + case 322: + dropItem = 2504; + break; + case 323: + dropItem = 2504; + if (tileCache.frameX <= (short) 132 && tileCache.frameX >= (short) 88) + secondaryItem = 27; + int index3 = x; + int index4 = y; + while (!Main.tile[index3, index4].active() || !Main.tileSolid[(int) Main.tile[index3, index4].type]) + ++index4; + if (!Main.tile[index3, index4].active()) + break; + switch (Main.tile[index3, index4].type) + { + case 112: + dropItem = 619; + return; + case 116: + dropItem = 621; + return; + case 234: + dropItem = 911; + return; + default: + return; + } + case 324: + switch ((int) tileCache.frameY / 22) + { + case 0: + dropItem = 2625; + return; + case 1: + dropItem = 2626; + return; + case 2: + dropItem = 4072; + return; + case 3: + dropItem = 4073; + return; + case 4: + dropItem = 4071; + return; + default: + return; + } + case 325: + dropItem = 2692; + break; + case 326: + dropItem = 2693; + break; + case 327: + dropItem = 2694; + break; + case 328: + dropItem = 2695; + break; + case 329: + dropItem = 2697; + break; + case 330: + dropItem = 71; + break; + case 331: + dropItem = 72; + break; + case 332: + dropItem = 73; + break; + case 333: + dropItem = 74; + break; + case 336: + dropItem = 2701; + break; + case 340: + dropItem = 2751; + break; + case 341: + dropItem = 2752; + break; + case 342: + dropItem = 2753; + break; + case 343: + dropItem = 2754; + break; + case 344: + dropItem = 2755; + break; + case 345: + dropItem = 2787; + break; + case 346: + dropItem = 2792; + break; + case 347: + dropItem = 2793; + break; + case 348: + dropItem = 2794; + break; + case 350: + dropItem = 2860; + break; + case 351: + dropItem = 2868; + break; + case 353: + dropItem = 2996; + break; + case 357: + dropItem = 3066; + break; + case 365: + dropItem = 3077; + break; + case 366: + dropItem = 3078; + break; + case 367: + dropItem = 3081; + break; + case 368: + dropItem = 3086; + break; + case 369: + dropItem = 3087; + break; + case 370: + dropItem = 3100; + break; + case 371: + dropItem = 3113; + break; + case 372: + dropItem = 3117; + break; + case 379: + dropItem = 3214; + break; + case 380: + int num10 = (int) tileCache.frameY / 18; + dropItem = 3215 + num10; + break; + case 383: + dropItem = 620; + break; + case 385: + dropItem = 3234; + break; + case 396: + dropItem = 3271; + break; + case 397: + dropItem = 3272; + break; + case 398: + dropItem = 3274; + break; + case 399: + dropItem = 3275; + break; + case 400: + dropItem = 3276; + break; + case 401: + dropItem = 3277; + break; + case 402: + dropItem = 3338; + break; + case 403: + dropItem = 3339; + break; + case 404: + dropItem = 3347; + break; + case 407: + dropItem = 3380; + break; + case 408: + dropItem = 3460; + break; + case 409: + dropItem = 3461; + break; + case 415: + dropItem = 3573; + break; + case 416: + dropItem = 3574; + break; + case 417: + dropItem = 3575; + break; + case 418: + dropItem = 3576; + break; + case 419: + switch ((int) tileCache.frameX / 18) + { + case 0: + dropItem = 3602; + return; + case 1: + dropItem = 3618; + return; + case 2: + dropItem = 3663; + return; + default: + return; + } + case 420: + switch ((int) tileCache.frameY / 18) + { + case 0: + dropItem = 3603; + return; + case 1: + dropItem = 3604; + return; + case 2: + dropItem = 3605; + return; + case 3: + dropItem = 3606; + return; + case 4: + dropItem = 3607; + return; + case 5: + dropItem = 3608; + return; + default: + return; + } + case 421: + dropItem = 3609; + break; + case 422: + dropItem = 3610; + break; + case 423: + TELogicSensor.Kill(x, y); + switch ((int) tileCache.frameY / 18) + { + case 0: + dropItem = 3613; + return; + case 1: + dropItem = 3614; + return; + case 2: + dropItem = 3615; + return; + case 3: + dropItem = 3726; + return; + case 4: + dropItem = 3727; + return; + case 5: + dropItem = 3728; + return; + case 6: + dropItem = 3729; + return; + default: + return; + } + case 424: + dropItem = 3616; + break; + case 426: + dropItem = 3621; + break; + case 427: + dropItem = 3622; + break; + case 428: + switch ((int) tileCache.frameY / 18) + { + case 0: + dropItem = 3630; + break; + case 1: + dropItem = 3632; + break; + case 2: + dropItem = 3631; + break; + case 3: + dropItem = 3626; + break; + } + PressurePlateHelper.DestroyPlate(new Point(x, y)); + break; + case 429: + dropItem = 3629; + break; + case 430: + dropItem = 3633; + break; + case 431: + dropItem = 3634; + break; + case 432: + dropItem = 3635; + break; + case 433: + dropItem = 3636; + break; + case 434: + dropItem = 3637; + break; + case 435: + dropItem = 3638; + break; + case 436: + dropItem = 3639; + break; + case 437: + dropItem = 3640; + break; + case 438: + dropItem = 3641; + break; + case 439: + dropItem = 3642; + break; + case 442: + dropItem = 3707; + break; + case 445: + dropItem = 3725; + break; + case 446: + dropItem = 3736; + break; + case 447: + dropItem = 3737; + break; + case 448: + dropItem = 3738; + break; + case 449: + dropItem = 3739; + break; + case 450: + dropItem = 3740; + break; + case 451: + dropItem = 3741; + break; + case 458: + dropItem = 3754; + break; + case 459: + dropItem = 3755; + break; + case 460: + dropItem = 3756; + break; + case 472: + dropItem = 3951; + break; + case 473: + dropItem = 3953; + break; + case 474: + dropItem = 3955; + break; + case 476: + dropItem = 4040; + break; + case 478: + dropItem = 4050; + break; + case 479: + dropItem = 4051; + break; + case 494: + dropItem = 4089; + break; + case 495: + dropItem = 4090; + break; + case 496: + dropItem = 4091; + break; + case 498: + dropItem = 4139; + break; + case 500: + dropItem = 4229; + break; + case 501: + dropItem = 4230; + break; + case 502: + dropItem = 4231; + break; + case 503: + dropItem = 4232; + break; + case 507: + dropItem = 4277; + break; + case 508: + dropItem = 4278; + break; + case 512: + case 513: + case 514: + case 515: + case 516: + case 517: + case 535: + case 537: + case 540: + dropItem = 129; + break; + case 519: + if (tileCache.frameY != (short) 90 || WorldGen.genRand.Next(2) != 0) + break; + dropItem = 183; + break; + case 520: + dropItem = 4326; + break; + case 528: + if (WorldGen.genRand.Next(2) != 0) + break; + dropItem = 183; + break; + case 541: + dropItem = 4392; + break; + case 546: + case 557: + dropItem = 4422; + break; + case 561: + dropItem = 4554; + break; + case 562: + dropItem = 4564; + break; + case 563: + dropItem = 4547; + break; + case 566: + dropItem = 999; + break; + case 571: + dropItem = 4564; + dropItemStack = WorldGen.genRand.Next(1, 3); + break; + case 574: + dropItem = 4717; + break; + case 575: + dropItem = 4718; + break; + case 576: + dropItem = 4719; + break; + case 577: + dropItem = 4720; + break; + case 578: + dropItem = 4721; + break; + case 579: + dropItem = 4761; + break; + case 583: + WorldGen.SetGemTreeDrops(180, 4851, tileCache, ref dropItem, ref secondaryItem); + if (dropItem != 3) + break; + dropItemStack = Main.rand.Next(1, 3); + break; + case 584: + WorldGen.SetGemTreeDrops(181, 4852, tileCache, ref dropItem, ref secondaryItem); + if (dropItem != 3) + break; + dropItemStack = Main.rand.Next(1, 3); + break; + case 585: + WorldGen.SetGemTreeDrops(177, 4853, tileCache, ref dropItem, ref secondaryItem); + if (dropItem != 3) + break; + dropItemStack = Main.rand.Next(1, 3); + break; + case 586: + WorldGen.SetGemTreeDrops(179, 4854, tileCache, ref dropItem, ref secondaryItem); + if (dropItem != 3) + break; + dropItemStack = Main.rand.Next(1, 3); + break; + case 587: + WorldGen.SetGemTreeDrops(178, 4855, tileCache, ref dropItem, ref secondaryItem); + if (dropItem != 3) + break; + dropItemStack = Main.rand.Next(1, 3); + break; + case 588: + WorldGen.SetGemTreeDrops(182, 4856, tileCache, ref dropItem, ref secondaryItem); + if (dropItem != 3) + break; + dropItemStack = Main.rand.Next(1, 3); + break; + case 589: + WorldGen.SetGemTreeDrops(999, 4857, tileCache, ref dropItem, ref secondaryItem); + if (dropItem != 3) + break; + dropItemStack = Main.rand.Next(1, 3); + break; + case 593: + dropItem = 4868; + break; + case 618: + dropItem = 4962; + break; + } + } + + private static void SetGemTreeDrops( + int gemType, + int seedType, + Tile tileCache, + ref int dropItem, + ref int secondaryItem) + { + dropItem = Main.rand.Next(10) != 0 ? 3 : gemType; + if (tileCache.frameX < (short) 22 || tileCache.frameY < (short) 198 || Main.rand.Next(2) != 0) + return; + secondaryItem = seedType; + } + + private static void SetVanityTreeDrops(int dropType, Tile tileCache, ref int dropItem) + { + if (Main.rand.Next(2) != 0) + return; + dropItem = dropType; + } + + public static bool IsHarvestableHerbWithSeed(int type, int style) + { + bool flag = false; + if (type == 84) + flag = true; + if (style == 0 && Main.dayTime) + flag = true; + if (style == 1 && !Main.dayTime) + flag = true; + if (style == 3 && !Main.dayTime && (Main.bloodMoon || Main.moonPhase == 0)) + flag = true; + if (style == 4 && (Main.raining || (double) Main.cloudAlpha > 0.0)) + flag = true; + if (style == 5 && !Main.raining && Main.dayTime && Main.time > 40500.0) + flag = true; + return flag; + } + + private static bool KillTile_ShouldDropSeeds(int x, int y) + { + if (Main.rand.Next(2) != 0) + return false; + return WorldGen.GetPlayerForTile(x, y).HasItem(281) || WorldGen.GetPlayerForTile(x, y).HasItem(986); + } + + private static void KillTile_GetTreeDrops( + int i, + int j, + Tile tileCache, + ref bool bonusWood, + ref int dropItem, + ref int secondaryItem) + { + if (tileCache.frameX >= (short) 22 && tileCache.frameY >= (short) 198) + { + if (Main.netMode != 1) + { + if (WorldGen.genRand.Next(2) == 0) + { + int index = j; + while (Main.tile[i, index] != null && (!Main.tile[i, index].active() || !Main.tileSolid[(int) Main.tile[i, index].type] || Main.tileSolidTop[(int) Main.tile[i, index].type])) + ++index; + if (Main.tile[i, index] != null) + { + Tile tile = Main.tile[i, index]; + if (tile.type == (ushort) 2 || tile.type == (ushort) 109 || tile.type == (ushort) 477 || tile.type == (ushort) 492 || tile.type == (ushort) 147 || tile.type == (ushort) 199 || tile.type == (ushort) 23) + { + dropItem = 9; + secondaryItem = 27; + } + else + dropItem = 9; + } + } + else + dropItem = 9; + } + } + else + dropItem = 9; + if (dropItem != 9) + return; + int x; + int y; + WorldGen.GetTreeBottom(i, j, out x, out y); + if (Main.tile[x, y].active()) + { + switch (Main.tile[x, y].type) + { + case 23: + dropItem = 619; + break; + case 60: + dropItem = 620; + break; + case 70: + dropItem = WorldGen.genRand.Next(2) != 0 ? 0 : 183; + break; + case 109: + case 492: + dropItem = 621; + break; + case 147: + dropItem = 2503; + break; + case 199: + dropItem = 911; + break; + } + } + int closest = (int) Player.FindClosest(new Vector2((float) (x * 16), (float) (y * 16)), 16, 16); + int axe = Main.player[closest].inventory[Main.player[closest].selectedItem].axe; + if (WorldGen.genRand.Next(100) >= axe && Main.rand.Next(3) != 0) + return; + bonusWood = true; + } + + private static void KillTile_DropBait(int i, int j, Tile tileCache) + { + int maxValue1 = -1; + int maxValue2 = -1; + int maxValue3 = -1; + int closest = (int) Player.FindClosest(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16); + if (tileCache.type == (ushort) 3) + { + maxValue1 = 400; + maxValue2 = 100; + if (Main.player[closest].flowerBoots && tileCache.frameX >= (short) 108) + { + maxValue1 *= 10000; + maxValue2 *= 10000; + } + } + if (tileCache.type == (ushort) 73) + { + maxValue1 = 200; + maxValue2 = 50; + if (Main.player[closest].flowerBoots && tileCache.frameX >= (short) 108) + { + maxValue1 *= 10000; + maxValue2 *= 10000; + } + } + if (tileCache.type == (ushort) 61) + { + maxValue3 = 80; + if (Main.player[closest].flowerBoots && tileCache.frameX >= (short) 108) + maxValue3 *= 10000; + } + if (tileCache.type == (ushort) 74) + { + maxValue3 = 40; + if (Main.player[closest].flowerBoots && tileCache.frameX >= (short) 108) + maxValue3 *= 10000; + } + if (tileCache.type == (ushort) 62) + maxValue3 = 250; + if (tileCache.type == (ushort) 185) + { + if (tileCache.frameY == (short) 0 && tileCache.frameX < (short) 214) + maxValue1 = 6; + if (tileCache.frameY == (short) 18 && (tileCache.frameX < (short) 214 || tileCache.frameX >= (short) 1368)) + maxValue1 = 6; + } + else if (tileCache.type == (ushort) 186) + { + if (tileCache.frameX >= (short) 378 && tileCache.frameX <= (short) 700) + maxValue1 = 6; + } + else if (tileCache.type == (ushort) 187) + { + if (tileCache.frameX >= (short) 756 && tileCache.frameX <= (short) 916) + maxValue1 = 6; + if (tileCache.frameX <= (short) 322) + maxValue1 = 6; + } + else if (tileCache.type == (ushort) 233) + maxValue3 = 10; + int Type1 = 357; + if (Main.player[closest].ZoneGraveyard) + Type1 = 606; + if (maxValue1 > 0 && NPC.CountNPCS(Type1) < 5 && WorldGen.genRand.Next(maxValue1) == 0) + { + int Type2 = Type1; + if (Type1 == 357 && (double) Player.GetClosestRollLuck(i, j, NPC.goldCritterChance) == 0.0) + Type2 = 448; + int index = NPC.NewNPC(i * 16 + 10, j * 16, Type2); + Main.npc[index].TargetClosest(); + Main.npc[index].velocity.Y = (float) WorldGen.genRand.Next(-50, -21) * 0.1f; + Main.npc[index].velocity.X = (float) WorldGen.genRand.Next(0, 26) * 0.1f * (float) -Main.npc[index].direction; + Main.npc[index].direction *= -1; + Main.npc[index].netUpdate = true; + } + if (maxValue2 > 0 && NPC.CountNPCS(377) < 5 && WorldGen.genRand.Next(maxValue2) == 0) + { + int Type3 = 377; + if ((double) Player.GetClosestRollLuck(i, j, NPC.goldCritterChance) == 0.0) + Type3 = 446; + int index = NPC.NewNPC(i * 16 + 10, j * 16, Type3); + Main.npc[index].TargetClosest(); + Main.npc[index].velocity.Y = (float) WorldGen.genRand.Next(-50, -21) * 0.1f; + Main.npc[index].velocity.X = (float) WorldGen.genRand.Next(0, 26) * 0.1f * (float) -Main.npc[index].direction; + Main.npc[index].direction *= -1; + Main.npc[index].netUpdate = true; + } + if (maxValue3 <= 0 || NPC.CountNPCS(485) + NPC.CountNPCS(486) + NPC.CountNPCS(487) >= 8 || WorldGen.genRand.Next(maxValue3) != 0) + return; + int Type4 = 485; + if (WorldGen.genRand.Next(4) == 0) + Type4 = 486; + if (WorldGen.genRand.Next(12) == 0) + Type4 = 487; + int index1 = NPC.NewNPC(i * 16 + 10, j * 16, Type4); + Main.npc[index1].TargetClosest(); + Main.npc[index1].velocity.Y = (float) WorldGen.genRand.Next(-50, -21) * 0.1f; + Main.npc[index1].velocity.X = (float) WorldGen.genRand.Next(0, 26) * 0.1f * (float) -Main.npc[index1].direction; + Main.npc[index1].direction *= -1; + Main.npc[index1].netUpdate = true; + } + + public static void KillTile_PlaySounds(int i, int j, bool fail, Tile tileCache) + { + if (WorldGen.gen) + return; + int type = (int) tileCache.type; + if (type == (int) sbyte.MaxValue) + SoundEngine.PlaySound(SoundID.Item27, i * 16, j * 16); + else if (type == 147 || type == 224) + { + if (WorldGen.genRand.Next(2) == 0) + SoundEngine.PlaySound(SoundID.Item48, i * 16, j * 16); + else + SoundEngine.PlaySound(SoundID.Item49, i * 16, j * 16); + } + else if (type == 161 || type == 163 || type == 164 || type == 200 || type == 541) + SoundEngine.PlaySound(SoundID.Item50, i * 16, j * 16); + else if (type == 518 || type == 519 || type == 528 || type == 529 || type == 549) + SoundEngine.PlaySound(6, i * 16, j * 16); + else if (type == 530 && tileCache.frameX < (short) 270) + SoundEngine.PlaySound(6, i * 16, j * 16); + else if (type == 3 || type == 110) + { + SoundEngine.PlaySound(6, i * 16, j * 16); + } + else + { + switch (type) + { + case 24: + SoundEngine.PlaySound(6, i * 16, j * 16); + break; + case 254: + SoundEngine.PlaySound(6, i * 16, j * 16); + break; + default: + if (Main.tileAlch[type] || type == 384 || type == 227 || type == 32 || type == 51 || type == 52 || type == 61 || type == 62 || type == 69 || type == 71 || type == 73 || type == 74 || type == 113 || type == 115 || type == 184 || type == 192 || type == 205 || type == 233 || type == 352 || type == 382) + { + SoundEngine.PlaySound(6, i * 16, j * 16); + break; + } + switch (type) + { + case 201: + SoundEngine.PlaySound(6, i * 16, j * 16); + break; + case 485: + SoundEngine.PlaySound(4, i * 16, j * 16, 11); + break; + default: + if (type == 481 || type == 482 || type == 483) + { + SoundEngine.PlaySound(SoundID.Item127, i * 16, j * 16); + break; + } + if (type == 1 || type == 6 || type == 7 || type == 8 || type == 9 || type == 22 || type == 140 || type == 25 || type == 37 || type == 38 || type == 39 || type == 41 || type == 43 || type == 44 || type == 45 || type == 46 || type == 47 || type == 48 || type == 56 || type == 58 || type == 63 || type == 64 || type == 65 || type == 66 || type == 67 || type == 68 || type == 75 || type == 76 || type == 107 || type == 108 || type == 111 || type == 117 || type == 118 || type == 119 || type == 120 || type == 121 || type == 122 || type == 150 || type == 151 || type == 152 || type == 153 || type == 154 || type == 155 || type == 156 || type == 160 || type == 161 || type == 166 || type == 167 || type == 168 || type == 169 || type == 175 || type == 176 || type == 177 || type == 203 || type == 202 || type == 204 || type == 206 || type == 211 || type == 221 || type == 222 || type == 223 || type == 226 || type == 248 || type == 249 || type == 250 || type == 272 || type == 273 || type == 274 || type == 478 || type == 284 || type == 325 || type == 346 || type == 347 || type == 348 || type == 350 || type == 367 || type == 357 || type == 368 || type == 369 || type == 370 || type == 407 || type == 472 || type == 473 || type == 500 || type == 501 || type == 502 || type == 503 || type == 546 || type == 557 || type == 566 || type == 618) + { + SoundEngine.PlaySound(21, i * 16, j * 16); + break; + } + if (type == 231 || type == 195 || type == 474) + { + SoundEngine.PlaySound(4, i * 16, j * 16); + break; + } + if (type == 26 && tileCache.frameX >= (short) 54) + { + SoundEngine.PlaySound(4, i * 16, j * 16); + break; + } + if (type == 314) + { + SoundEngine.PlaySound(SoundID.Item52, i * 16, j * 16); + break; + } + if (type >= 330 && type <= 333) + { + SoundEngine.PlaySound(18, i * 16, j * 16); + break; + } + if ((type == 162 || type == 385 || type == 129 || type == 165 && tileCache.frameX < (short) 54) && !fail) + { + SoundEngine.PlaySound(SoundID.Item27, i * 16, j * 16); + break; + } + if (type != 138) + { + SoundEngine.PlaySound(0, i * 16, j * 16); + break; + } + break; + } + break; + } + } + if (fail) + return; + if (tileCache.type == (ushort) 13) + SoundEngine.PlaySound(13, i * 16, j * 16); + else if (tileCache.type == (ushort) 54) + SoundEngine.PlaySound(13, i * 16, j * 16); + else if (tileCache.type == (ushort) 326) + SoundEngine.PlaySound(13, i * 16, j * 16); + else if (tileCache.type == (ushort) 327) + SoundEngine.PlaySound(13, i * 16, j * 16); + else if (tileCache.type == (ushort) 458) + SoundEngine.PlaySound(13, i * 16, j * 16); + else if (tileCache.type == (ushort) 459) + SoundEngine.PlaySound(13, i * 16, j * 16); + else if (tileCache.type == (ushort) 345) + SoundEngine.PlaySound(13, i * 16, j * 16); + else if (tileCache.type == (ushort) 328) + SoundEngine.PlaySound(13, i * 16, j * 16); + else if (tileCache.type == (ushort) 329) + SoundEngine.PlaySound(13, i * 16, j * 16); + else if (tileCache.type == (ushort) 507) + { + SoundEngine.PlaySound(13, i * 16, j * 16); + } + else + { + if (tileCache.type != (ushort) 508) + return; + SoundEngine.PlaySound(13, i * 16, j * 16); + } + } + + public static Microsoft.Xna.Framework.Rectangle? GetTileVisualHitbox(int x, int y) + { + Tile tile = Main.tile[x, y]; + if (tile == null || !tile.nactive()) + return new Microsoft.Xna.Framework.Rectangle?(); + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(x * 16, y * 16, 16, 16); + if (tile.type == (ushort) 323) + rectangle.X += (int) tile.frameY; + if (tile.halfBrick()) + { + rectangle.Y += 8; + rectangle.Height = 8; + } + return new Microsoft.Xna.Framework.Rectangle?(rectangle); + } + + public static int KillTile_GetTileDustAmount(bool fail, Tile tileCache) + { + switch (tileCache.type) + { + case 125: + case 138: + case 172: + case 287: + case 300: + case 301: + case 302: + case 303: + case 304: + case 305: + case 306: + case 307: + case 308: + case 354: + case 355: + case 373: + case 374: + case 375: + case 376: + case 461: + case 484: + case 499: + case 564: + case 565: + case 593: + case 594: + case 617: + return 0; + case 184: + if ((int) tileCache.frameX / 22 >= 5) + return 5; + return !fail ? 10 : 3; + case 231: + return !fail ? 6 : 3; + case 481: + case 482: + case 483: + return 3; + case 534: + case 536: + case 539: + return !fail ? 5 : 3; + case 541: + return 1; + case 549: + return 2; + default: + return !fail ? 10 : 3; + } + } + + public static int KillTile_MakeTileDust(int i, int j, Tile tileCache) + { + int Type1 = 0; + if (tileCache.type == (ushort) 216) + Type1 = -1; + if (tileCache.type == (ushort) 324) + Type1 = tileCache.frameY != (short) 0 ? 281 + (int) tileCache.frameX / 18 : 280; + if (tileCache.type == (ushort) 216) + Type1 = -1; + if (tileCache.type == (ushort) 335) + Type1 = -1; + if (tileCache.type == (ushort) 338) + Type1 = -1; + if (tileCache.type == (ushort) 0) + Type1 = 0; + if (tileCache.type == (ushort) 192) + Type1 = 3; + if (tileCache.type == (ushort) 208) + Type1 = 126; + else if (tileCache.type == (ushort) 408 || tileCache.type == (ushort) 409) + Type1 = 265; + if (tileCache.type == (ushort) 16) + { + Type1 = 1; + if (tileCache.frameX >= (short) 36) + Type1 = 82; + } + else if (tileCache.type == (ushort) 415 || tileCache.type == (ushort) 500) + Type1 = 6; + else if (tileCache.type == (ushort) 416 || tileCache.type == (ushort) 501) + Type1 = 61; + else if (tileCache.type == (ushort) 417 || tileCache.type == (ushort) 502) + Type1 = 242; + else if (tileCache.type == (ushort) 418 || tileCache.type == (ushort) 503) + Type1 = 135; + else if (tileCache.type == (ushort) 474) + Type1 = 18; + if (tileCache.type == (ushort) 1 || tileCache.type == (ushort) 17 || tileCache.type == (ushort) 38 || tileCache.type == (ushort) 39 || tileCache.type == (ushort) 41 || tileCache.type == (ushort) 43 || tileCache.type == (ushort) 44 || tileCache.type == (ushort) 481 || tileCache.type == (ushort) 482 || tileCache.type == (ushort) 483 || tileCache.type == (ushort) 48 || Main.tileStone[(int) tileCache.type] || tileCache.type == (ushort) 85 || tileCache.type == (ushort) 90 || tileCache.type == (ushort) 92 || tileCache.type == (ushort) 96 || tileCache.type == (ushort) 97 || tileCache.type == (ushort) 99 || tileCache.type == (ushort) 117 || tileCache.type == (ushort) 130 || tileCache.type == (ushort) 131 || tileCache.type == (ushort) 132 || tileCache.type == (ushort) 135 || tileCache.type == (ushort) 135 || tileCache.type == (ushort) 142 || tileCache.type == (ushort) 143 || tileCache.type == (ushort) 144 || tileCache.type == (ushort) 210 || tileCache.type == (ushort) 207 || tileCache.type == (ushort) 235 || tileCache.type == (ushort) 247 || tileCache.type == (ushort) 272 || tileCache.type == (ushort) 273 || tileCache.type == (ushort) 283 || tileCache.type == (ushort) 410 || tileCache.type == (ushort) 480 || tileCache.type == (ushort) 509 || tileCache.type == (ushort) 618) + Type1 = 1; + if (tileCache.type == (ushort) 379) + Type1 = 257; + if (tileCache.type == (ushort) 311) + Type1 = 207; + if (tileCache.type == (ushort) 312) + Type1 = 208; + if (tileCache.type == (ushort) 313) + Type1 = 209; + if (tileCache.type == (ushort) 104) + Type1 = -1; + if (tileCache.type == (ushort) 95 || tileCache.type == (ushort) 98 || tileCache.type == (ushort) 100 || tileCache.type == (ushort) 174 || tileCache.type == (ushort) 173) + Type1 = 6; + if (tileCache.type == (ushort) 30 || tileCache.type == (ushort) 86 || tileCache.type == (ushort) 94 || tileCache.type == (ushort) 106 || tileCache.type == (ushort) 114 || tileCache.type == (ushort) 124 || tileCache.type == (ushort) 128 || tileCache.type == (ushort) 269) + Type1 = 7; + if (tileCache.type == (ushort) 372) + Type1 = 242; + if (tileCache.type == (ushort) 371) + Type1 = 243; + if (tileCache.type == (ushort) 334) + Type1 = 7; + switch (tileCache.type) + { + case 10: + case 11: + case 87: + case 89: + case 93: + case 139: + case 209: + case 319: + case 320: + case 386: + case 387: + case 390: + case 405: + case 406: + case 411: + case 412: + case 419: + case 420: + case 421: + case 422: + case 423: + case 424: + case 425: + case 428: + case 429: + case 441: + case 442: + case 445: + case 446: + case 447: + case 448: + case 449: + case 450: + case 451: + case 452: + case 453: + case 455: + case 456: + case 457: + case 462: + case 463: + case 464: + case 465: + case 466: + case 468: + case 476: + case 486: + case 487: + case 489: + case 490: + case 491: + case 493: + case 494: + case 497: + case 510: + case 511: + case 520: + case 521: + case 522: + case 523: + case 524: + case 525: + case 526: + case 527: + case 531: + case 545: + case 547: + case 548: + case 560: + case 564: + case 565: + case 567: + case 572: + case 579: + case 591: + case 592: + case 593: + case 594: + case 613: + case 614: + case 621: + case 622: + Type1 = -1; + break; + case 41: + case 481: + Type1 = 275; + break; + case 43: + case 482: + Type1 = 276; + break; + case 44: + case 483: + Type1 = 277; + break; + case 184: + int num1 = (int) tileCache.frameX / 22; + switch (num1) + { + case 5: + Type1 = 258; + break; + case 6: + Type1 = 299; + break; + case 7: + Type1 = 300; + break; + case 8: + Type1 = 301; + break; + default: + Type1 = 93 + num1; + break; + } + break; + case 407: + Type1 = 10; + break; + case 454: + Type1 = 139; + break; + case 472: + case 546: + case 557: + Type1 = 8; + break; + case 473: + Type1 = 82; + break; + case 498: + Type1 = 30; + break; + case 512: + Type1 = 93; + break; + case 513: + Type1 = 94; + break; + case 514: + Type1 = 95; + break; + case 515: + Type1 = 96; + break; + case 516: + Type1 = 97; + break; + case 517: + Type1 = 258; + break; + case 535: + Type1 = 299; + break; + case 537: + Type1 = 300; + break; + case 540: + Type1 = 301; + break; + case 541: + Type1 = 226; + break; + case 583: + Type1 = WorldGen.genRand.Next(10) == 0 ? 87 : 1; + break; + case 584: + Type1 = WorldGen.genRand.Next(10) == 0 ? 86 : 1; + break; + case 585: + Type1 = WorldGen.genRand.Next(10) == 0 ? 88 : 1; + break; + case 586: + Type1 = WorldGen.genRand.Next(10) == 0 ? 89 : 1; + break; + case 587: + Type1 = WorldGen.genRand.Next(10) == 0 ? 90 : 1; + break; + case 588: + Type1 = WorldGen.genRand.Next(10) == 0 ? 91 : 1; + break; + case 589: + Type1 = WorldGen.genRand.Next(10) == 0 ? 138 : 1; + break; + case 590: + Type1 = 1; + break; + case 595: + Type1 = 78; + break; + case 596: + Type1 = 78; + break; + case 615: + Type1 = 78; + break; + case 616: + Type1 = 78; + break; + } + if (Main.tileMoss[(int) tileCache.type]) + Type1 = tileCache.type != (ushort) 381 ? (tileCache.type != (ushort) 534 ? (tileCache.type != (ushort) 536 ? (tileCache.type != (ushort) 539 ? (int) tileCache.type - 179 + 93 : 301) : 300) : 299) : 258; + if (tileCache.type == (ushort) 240) + { + int num2 = (int) tileCache.frameX / 54; + if (tileCache.frameY >= (short) 54) + num2 += 36; + Type1 = 7; + if (num2 == 16 || num2 == 17) + Type1 = 26; + if (num2 >= 46 && num2 <= 49) + Type1 = -1; + } + if (tileCache.type == (ushort) 241) + Type1 = 1; + if (tileCache.type == (ushort) 242) + Type1 = -1; + int num3; + if (tileCache.type == (ushort) 529) + { + switch (Main.tile[i, j + 1].type) + { + case 112: + Type1 = num3 = 17; + break; + case 116: + Type1 = num3 = 47; + break; + case 234: + Type1 = num3 = 125; + break; + default: + Type1 = i < WorldGen.beachDistance || i > Main.maxTilesX - WorldGen.beachDistance ? 290 : 289; + break; + } + } + if (tileCache.type == (ushort) 356) + Type1 = -1; + if (tileCache.type == (ushort) 351) + Type1 = -1; + if (tileCache.type == (ushort) 246) + Type1 = -1; + if (tileCache.type == (ushort) 36) + Type1 = -1; + if (tileCache.type == (ushort) 365) + Type1 = 239; + if (tileCache.type == (ushort) 366) + Type1 = 30; + if (tileCache.type == (ushort) 504) + Type1 = -1; + if (tileCache.type == (ushort) 357 || tileCache.type == (ushort) 367 || tileCache.type == (ushort) 561) + Type1 = 236; + if (tileCache.type == (ushort) 368 || tileCache.type == (ushort) 369 || tileCache.type == (ushort) 576) + Type1 = 240; + if (tileCache.type == (ushort) 170) + Type1 = 196; + if (tileCache.type == (ushort) 315) + Type1 = 225; + if (tileCache.type == (ushort) 346) + Type1 = 128; + if (tileCache.type == (ushort) 347) + Type1 = 117; + if (tileCache.type == (ushort) 348) + Type1 = 42; + if (tileCache.type == (ushort) 350) + Type1 = 226; + if (tileCache.type == (ushort) 370) + Type1 = WorldGen.genRand.Next(2) != 0 ? 23 : 6; + if (tileCache.type == (ushort) 171) + Type1 = WorldGen.genRand.Next(2) != 0 ? -1 : 196; + if (tileCache.type == (ushort) 326) + Type1 = 13; + if (tileCache.type == (ushort) 327) + Type1 = 13; + if (tileCache.type == (ushort) 345) + Type1 = 13; + if (tileCache.type == (ushort) 458) + Type1 = 13; + if (tileCache.type == (ushort) 459) + Type1 = 13; + if (tileCache.type == (ushort) 336) + Type1 = 6; + if (tileCache.type == (ushort) 340) + Type1 = 75; + if (tileCache.type == (ushort) 341) + Type1 = 65; + if (tileCache.type == (ushort) 342) + Type1 = 135; + if (tileCache.type == (ushort) 343) + Type1 = 169; + if (tileCache.type == (ushort) 344) + Type1 = 156; + if (tileCache.type == (ushort) 328) + Type1 = 13; + if (tileCache.type == (ushort) 329) + Type1 = 13; + if (tileCache.type == (ushort) 507) + Type1 = 13; + if (tileCache.type == (ushort) 508) + Type1 = 13; + if (tileCache.type == (ushort) 562) + Type1 = -1; + if (tileCache.type == (ushort) 571) + Type1 = 40; + if (tileCache.type == (ushort) 563) + Type1 = -1; + if (tileCache.type == (ushort) 330) + Type1 = 9; + if (tileCache.type == (ushort) 331) + Type1 = 11; + if (tileCache.type == (ushort) 332) + Type1 = 19; + if (tileCache.type == (ushort) 333) + Type1 = 11; + if (tileCache.type == (ushort) 101) + Type1 = -1; + if (tileCache.type == (ushort) 19) + { + switch ((int) tileCache.frameY / 18) + { + case 0: + Type1 = 7; + break; + case 1: + Type1 = 77; + break; + case 2: + Type1 = 78; + break; + case 3: + Type1 = 79; + break; + case 4: + Type1 = 26; + break; + case 5: + Type1 = 126; + break; + case 6: + Type1 = 275; + break; + case 7: + Type1 = 277; + break; + case 8: + Type1 = 276; + break; + case 9: + Type1 = 1; + break; + case 10: + Type1 = 214; + break; + case 11: + Type1 = 214; + break; + case 12: + Type1 = 214; + break; + case 13: + Type1 = 109; + break; + case 14: + Type1 = 13; + break; + case 15: + Type1 = 189; + break; + case 16: + Type1 = 191; + break; + case 17: + Type1 = 215; + break; + case 18: + Type1 = 26; + break; + case 19: + Type1 = 214; + break; + case 20: + Type1 = 4; + break; + case 21: + Type1 = 10; + break; + case 22: + Type1 = 32; + break; + case 23: + Type1 = 78; + break; + case 24: + Type1 = 147; + break; + case 25: + Type1 = 40; + break; + case 26: + Type1 = 226; + break; + case 27: + Type1 = 23; + break; + case 28: + Type1 = 240; + break; + case 29: + Type1 = 236; + break; + case 30: + Type1 = 68 + Main.rand.Next(3); + break; + case 31: + Type1 = 10; + break; + case 32: + Type1 = 78; + break; + case 33: + Type1 = 148; + break; + case 34: + Type1 = 5; + break; + case 35: + Type1 = 80; + break; + case 37: + Type1 = 18; + break; + case 38: + Type1 = 6; + break; + case 39: + Type1 = 61; + break; + case 40: + Type1 = 242; + break; + case 41: + Type1 = 135; + break; + case 42: + Type1 = 287; + break; + case 44: + Type1 = -1; + break; + default: + Type1 = 1; + break; + } + } + if (tileCache.type == (ushort) 79) + { + int num4 = (int) tileCache.frameY / 36; + Type1 = num4 != 0 ? (num4 != 1 ? (num4 != 2 ? (num4 != 3 ? (num4 != 4 ? (num4 != 8 ? (num4 < 9 ? 1 : -1) : 109) : 126) : 79) : 78) : 77) : 7; + } + if (tileCache.type == (ushort) 18) + { + switch ((int) tileCache.frameX / 36) + { + case 0: + Type1 = 7; + break; + case 1: + Type1 = 77; + break; + case 2: + Type1 = 78; + break; + case 3: + Type1 = 79; + break; + case 4: + Type1 = 26; + break; + case 5: + Type1 = 40; + break; + case 6: + Type1 = 5; + break; + case 7: + Type1 = 26; + break; + case 8: + Type1 = 4; + break; + case 9: + Type1 = 126; + break; + case 10: + Type1 = 148; + break; + case 11: + case 12: + case 13: + Type1 = 1; + break; + case 14: + Type1 = 109; + break; + case 15: + Type1 = 126; + break; + default: + Type1 = -1; + break; + } + } + if (tileCache.type == (ushort) 14 || tileCache.type == (ushort) 87 || tileCache.type == (ushort) 88 || tileCache.type == (ushort) 469) + Type1 = -1; + if (tileCache.type >= (ushort) byte.MaxValue && tileCache.type <= (ushort) 261) + { + int num5 = (int) tileCache.type - (int) byte.MaxValue; + Type1 = 86 + num5; + if (num5 == 6) + Type1 = 138; + } + if (tileCache.type >= (ushort) 262 && tileCache.type <= (ushort) 268) + { + int num6 = (int) tileCache.type - 262; + Type1 = 86 + num6; + if (num6 == 6) + Type1 = 138; + } + if (tileCache.type == (ushort) 178) + { + int num7 = (int) tileCache.frameX / 18; + Type1 = 86 + num7; + if (num7 == 6) + Type1 = 138; + } + if (tileCache.type == (ushort) 440) + { + switch ((int) tileCache.frameX / 54) + { + case 0: + Type1 = 90; + break; + case 1: + Type1 = 88; + break; + case 2: + Type1 = 89; + break; + case 3: + Type1 = 87; + break; + case 4: + Type1 = 86; + break; + case 5: + Type1 = 91; + break; + case 6: + Type1 = 138; + break; + default: + Type1 = -1; + break; + } + if (tileCache.frameY < (short) 54) + Type1 = -1; + } + switch (tileCache.type) + { + case 426: + case 427: + Type1 = 90; + break; + case 430: + case 435: + Type1 = 89; + break; + case 431: + case 436: + Type1 = 88; + break; + case 432: + case 437: + Type1 = 87; + break; + case 433: + case 438: + Type1 = 86; + break; + case 434: + case 439: + Type1 = 91; + break; + case 496: + Type1 = 109; + break; + case 549: + Type1 = 3; + break; + case 552: + Type1 = 32; + break; + } + if (tileCache.type == (ushort) 186) + Type1 = tileCache.frameX > (short) 360 ? (tileCache.frameX > (short) 846 ? (tileCache.frameX > (short) 954 ? (tileCache.frameX > (short) 1062 ? (tileCache.frameX > (short) 1170 ? (tileCache.frameX > (short) 1332 ? (tileCache.frameX > (short) 1386 ? 80 : 10) : 0) : 10) : 11) : 9) : 1) : 26; + if (tileCache.type == (ushort) 187) + { + if (tileCache.frameX <= (short) 144) + Type1 = 1; + else if (tileCache.frameX <= (short) 306) + Type1 = 38; + else if (tileCache.frameX <= (short) 468) + Type1 = 36; + else if (tileCache.frameX <= (short) 738) + Type1 = 30; + else if (tileCache.frameX <= (short) 970) + Type1 = 1; + else if (tileCache.frameX <= (short) 1132) + Type1 = 148; + else if (tileCache.frameX <= (short) 1132) + Type1 = 155; + else if (tileCache.frameX <= (short) 1348) + Type1 = 1; + else if (tileCache.frameX <= (short) 1564) + Type1 = 0; + else if (tileCache.frameX <= (short) 1890) + Type1 = 250; + else if (tileCache.frameX <= (short) 2196) + Type1 = 240; + else if (tileCache.frameX <= (short) 2520) + Type1 = 236; + } + if (tileCache.type == (ushort) 105) + { + Type1 = 1; + if (tileCache.frameX >= (short) 1548 && tileCache.frameX <= (short) 1654 && tileCache.frameY < (short) 54) + Type1 = 148; + } + if (tileCache.type == (ushort) 349) + Type1 = 1; + if (tileCache.type == (ushort) 337 || tileCache.type == (ushort) 506) + Type1 = 1; + if (tileCache.type == (ushort) 239) + { + int num8 = (int) tileCache.frameX / 18; + if (num8 == 0) + Type1 = 9; + if (num8 == 1) + Type1 = 81; + if (num8 == 2) + Type1 = 8; + if (num8 == 3) + Type1 = 82; + if (num8 == 4) + Type1 = 11; + if (num8 == 5) + Type1 = 83; + if (num8 == 6) + Type1 = 10; + if (num8 == 7) + Type1 = 84; + if (num8 == 8) + Type1 = 14; + if (num8 == 9) + Type1 = 23; + if (num8 == 10) + Type1 = 25; + if (num8 == 11) + Type1 = 48; + if (num8 == 12) + Type1 = 144; + if (num8 == 13) + Type1 = 49; + if (num8 == 14) + Type1 = 145; + if (num8 == 15) + Type1 = 50; + if (num8 == 16) + Type1 = 146; + if (num8 == 17) + Type1 = 128; + if (num8 == 18) + Type1 = 84; + if (num8 == 19) + Type1 = 117; + if (num8 == 20) + Type1 = 42; + if (num8 == 21) + Type1 = -1; + if (num8 == 22) + Type1 = 265; + } + if (tileCache.type == (ushort) 185) + { + if (tileCache.frameY == (short) 18) + { + int num9 = (int) tileCache.frameX / 36; + if (num9 < 6) + Type1 = 1; + else if (num9 < 16) + { + Type1 = 26; + } + else + { + switch (num9) + { + case 16: + Type1 = 9; + break; + case 17: + Type1 = 11; + break; + case 18: + Type1 = 10; + break; + case 19: + Type1 = 86; + break; + case 20: + Type1 = 87; + break; + case 21: + Type1 = 88; + break; + case 22: + Type1 = 89; + break; + case 23: + Type1 = 90; + break; + case 24: + Type1 = 91; + break; + default: + if (num9 < 31) + { + Type1 = 80; + break; + } + if (num9 < 33) + { + Type1 = 7; + break; + } + if (num9 < 34) + { + Type1 = 8; + break; + } + if (num9 < 39) + { + Type1 = 30; + break; + } + if (num9 < 42) + { + Type1 = 1; + break; + } + if (num9 < 48) + { + Type1 = 32; + break; + } + if (num9 < 54) + { + Type1 = 240; + break; + } + if (num9 < 60) + { + Type1 = 236; + break; + } + break; + } + } + } + else + { + int num10 = (int) tileCache.frameX / 18; + if (num10 < 6) + Type1 = 1; + else if (num10 < 12) + Type1 = 0; + else if (num10 < 27) + Type1 = 26; + else if (num10 < 32) + Type1 = 1; + else if (num10 < 35) + Type1 = 0; + else if (num10 < 46) + Type1 = 80; + else if (num10 < 52) + Type1 = 30; + else if (num10 < 58) + Type1 = 32; + else if (num10 < 64) + Type1 = 240; + else if (num10 < 70) + Type1 = 236; + } + } + if (tileCache.type == (ushort) 237) + Type1 = 148; + if (tileCache.type == (ushort) 157) + Type1 = 77; + if (tileCache.type == (ushort) 158 || tileCache.type == (ushort) 232 || tileCache.type == (ushort) 383 || tileCache.type == (ushort) 575) + Type1 = 78; + if (tileCache.type == (ushort) 159) + Type1 = 78; + if (tileCache.type == (ushort) 15) + Type1 = -1; + if (tileCache.type == (ushort) 191) + Type1 = 7; + if (tileCache.type == (ushort) 5) + { + Type1 = 7; + if (i > 5 && i < Main.maxTilesX - 5) + { + int index1 = i; + int index2 = j; + if (tileCache.frameX == (short) 66 && tileCache.frameY <= (short) 45) + ++index1; + if (tileCache.frameX == (short) 88 && tileCache.frameY >= (short) 66 && tileCache.frameY <= (short) 110) + --index1; + if (tileCache.frameX == (short) 22 && tileCache.frameY >= (short) 132 && tileCache.frameY <= (short) 176) + --index1; + if (tileCache.frameX == (short) 44 && tileCache.frameY >= (short) 132 && tileCache.frameY <= (short) 176) + ++index1; + if (tileCache.frameX == (short) 44 && tileCache.frameY >= (short) 132 && tileCache.frameY <= (short) 176) + ++index1; + if (tileCache.frameX == (short) 44 && tileCache.frameY >= (short) 198) + ++index1; + if (tileCache.frameX == (short) 66 && tileCache.frameY >= (short) 198) + --index1; + while (Main.tile[index1, index2] != null && (!Main.tile[index1, index2].active() || !Main.tileSolid[(int) Main.tile[index1, index2].type])) + ++index2; + if (Main.tile[index1, index2] != null) + { + if (Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 23) + Type1 = 77; + if (Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 60) + Type1 = 78; + if (Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 70) + Type1 = 26; + if (Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 109) + Type1 = 79; + if (Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 199) + Type1 = 121; + if (Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 147) + Type1 = 122; + } + } + } + if (tileCache.type == (ushort) 323) + { + Type1 = 215; + if (i > 5 && i < Main.maxTilesX - 5) + { + int index3 = i; + int index4 = j; + while (Main.tile[index3, index4] != null && (!Main.tile[index3, index4].active() || !Main.tileSolid[(int) Main.tile[index3, index4].type])) + ++index4; + if (Main.tile[index3, index4] != null) + { + if (Main.tile[index3, index4].active() && Main.tile[index3, index4].type == (ushort) 234) + Type1 = 121; + if (Main.tile[index3, index4].active() && Main.tile[index3, index4].type == (ushort) 116) + Type1 = 79; + if (Main.tile[index3, index4].active() && Main.tile[index3, index4].type == (ushort) 112) + Type1 = 77; + } + } + } + if (tileCache.type == (ushort) 137) + { + Type1 = 1; + if ((int) tileCache.frameY / 18 > 0) + Type1 = 148; + } + if (tileCache.type == (ushort) 443) + Type1 = 1; + if (tileCache.type == (ushort) 444) + Type1 = -1; + if (tileCache.type == (ushort) 212) + Type1 = -1; + if (tileCache.type == (ushort) 213) + Type1 = 129; + if (tileCache.type == (ushort) 214) + Type1 = 1; + if (tileCache.type == (ushort) 215) + Type1 = -6; + if (tileCache.type == (ushort) 325) + Type1 = 81; + if (tileCache.type == (ushort) 251) + Type1 = 189; + if (tileCache.type == (ushort) 252) + Type1 = 190; + if (tileCache.type == (ushort) 253) + Type1 = 191; + if (tileCache.type == (ushort) 254) + { + if (tileCache.frameX < (short) 72) + Type1 = 3; + else if (tileCache.frameX < (short) 108) + { + Type1 = 3; + if (WorldGen.genRand.Next(3) == 0) + Type1 = 189; + } + else if (tileCache.frameX < (short) 144) + { + Type1 = 3; + if (WorldGen.genRand.Next(2) == 0) + Type1 = 189; + } + else + { + Type1 = 3; + if (WorldGen.genRand.Next(4) != 0) + Type1 = 189; + } + } + if (tileCache.type == (ushort) 467) + Type1 = -1; + if (tileCache.type == (ushort) 21) + Type1 = tileCache.frameX < (short) 1008 ? (tileCache.frameX < (short) 612 ? (tileCache.frameX < (short) 576 ? (tileCache.frameX < (short) 540 ? (tileCache.frameX < (short) 504 ? (tileCache.frameX < (short) 468 ? (tileCache.frameX < (short) 432 ? (tileCache.frameX < (short) 396 ? (tileCache.frameX < (short) 360 ? (tileCache.frameX < (short) 324 ? (tileCache.frameX < (short) 288 ? (tileCache.frameX < (short) 252 ? (tileCache.frameX < (short) 216 ? (tileCache.frameX < (short) 180 ? (tileCache.frameX < (short) 108 ? (tileCache.frameX < (short) 36 ? 7 : 10) : 37) : 7) : 1) : 77) : 78) : 79) : 10) : 11) : 7) : 116) : 126) : 26) : 148) : 11) : -1; + if (tileCache.type == (ushort) 382) + Type1 = 3; + if (tileCache.type == (ushort) 2 || tileCache.type == (ushort) 477) + Type1 = WorldGen.genRand.Next(2) != 0 ? 2 : 0; + if (tileCache.type == (ushort) sbyte.MaxValue) + Type1 = 67; + if (tileCache.type == (ushort) 91) + Type1 = -1; + if (tileCache.type == (ushort) 198) + Type1 = 109; + if (tileCache.type == (ushort) 26) + Type1 = tileCache.frameX < (short) 54 ? 8 : 5; + if (tileCache.type == (ushort) 34) + Type1 = -1; + if (tileCache.type == (ushort) 6) + Type1 = 8; + if (tileCache.type == (ushort) 7 || tileCache.type == (ushort) 47 || tileCache.type == (ushort) 284) + Type1 = 9; + if (tileCache.type == (ushort) 8 || tileCache.type == (ushort) 45 || tileCache.type == (ushort) 102) + Type1 = 10; + if (tileCache.type == (ushort) 9 || tileCache.type == (ushort) 42 || tileCache.type == (ushort) 46 || tileCache.type == (ushort) 126 || tileCache.type == (ushort) 136) + Type1 = 11; + if (tileCache.type == (ushort) 166 || tileCache.type == (ushort) 175) + Type1 = 81; + if (tileCache.type == (ushort) 167) + Type1 = 82; + if (tileCache.type == (ushort) 168 || tileCache.type == (ushort) 176) + Type1 = 83; + if (tileCache.type == (ushort) 169 || tileCache.type == (ushort) 177) + Type1 = 84; + if (tileCache.type == (ushort) 199) + Type1 = 117; + if (tileCache.type == (ushort) 205) + Type1 = 125; + if (tileCache.type == (ushort) 201) + Type1 = 125; + if (tileCache.type == (ushort) 211) + Type1 = 128; + if (tileCache.type == (ushort) 227) + { + switch ((int) tileCache.frameX / 34) + { + case 0: + case 1: + Type1 = 26; + break; + case 2: + case 4: + case 5: + case 6: + Type1 = 40; + break; + case 3: + Type1 = 3; + break; + case 7: + Type1 = 117; + break; + case 8: + Type1 = 17; + break; + case 9: + Type1 = 6; + break; + case 10: + Type1 = 3; + break; + case 11: + Type1 = 26; + break; + } + } + if (tileCache.type == (ushort) 204 || tileCache.type == (ushort) 478) + { + Type1 = 117; + if (WorldGen.genRand.Next(2) == 0) + Type1 = 1; + } + if (tileCache.type == (ushort) 203) + Type1 = 117; + if (tileCache.type == (ushort) 243) + Type1 = WorldGen.genRand.Next(2) != 0 ? 13 : 7; + if (tileCache.type == (ushort) 244) + Type1 = WorldGen.genRand.Next(2) != 0 ? 13 : 1; + if (tileCache.type == (ushort) 597) + Type1 = -1; + else if (tileCache.type >= (ushort) 358 && tileCache.type <= (ushort) 364 || tileCache.type >= (ushort) 275 && tileCache.type <= (ushort) 282 || tileCache.type == (ushort) 285 || tileCache.type == (ushort) 286 || tileCache.type >= (ushort) 288 && tileCache.type <= (ushort) 297 || tileCache.type >= (ushort) 316 && tileCache.type <= (ushort) 318 || tileCache.type == (ushort) 298 || tileCache.type == (ushort) 299 || tileCache.type == (ushort) 309 || tileCache.type == (ushort) 310 || tileCache.type == (ushort) 339 || tileCache.type == (ushort) 538 || tileCache.type == (ushort) 413 || tileCache.type == (ushort) 414 || tileCache.type == (ushort) 505 || tileCache.type == (ushort) 521 || tileCache.type == (ushort) 522 || tileCache.type == (ushort) 523 || tileCache.type == (ushort) 524 || tileCache.type == (ushort) 525 || tileCache.type == (ushort) 526 || tileCache.type == (ushort) 527 || tileCache.type == (ushort) 532 || tileCache.type == (ushort) 543 || tileCache.type == (ushort) 544 || tileCache.type == (ushort) 550 || tileCache.type == (ushort) 551 || tileCache.type == (ushort) 533 || tileCache.type == (ushort) 553 || tileCache.type == (ushort) 554 || tileCache.type == (ushort) 555 || tileCache.type == (ushort) 556 || tileCache.type == (ushort) 558 || tileCache.type == (ushort) 559 || tileCache.type == (ushort) 542 || tileCache.type == (ushort) 391 || tileCache.type == (ushort) 394 || tileCache.type == (ushort) 392 || tileCache.type == (ushort) 393 || tileCache.type == (ushort) 568 || tileCache.type == (ushort) 569 || tileCache.type == (ushort) 570 || tileCache.type == (ushort) 582 || tileCache.type == (ushort) 580 || tileCache.type == (ushort) 598 || tileCache.type == (ushort) 599 || tileCache.type == (ushort) 600 || tileCache.type == (ushort) 601 || tileCache.type == (ushort) 602 || tileCache.type == (ushort) 603 || tileCache.type == (ushort) 604 || tileCache.type == (ushort) 605 || tileCache.type == (ushort) 606 || tileCache.type == (ushort) 607 || tileCache.type == (ushort) 608 || tileCache.type == (ushort) 609 || tileCache.type == (ushort) 610 || tileCache.type == (ushort) 611 || tileCache.type == (ushort) 612 || tileCache.type == (ushort) 619 || tileCache.type == (ushort) 620) + { + Type1 = 13; + if (WorldGen.genRand.Next(3) != 0) + Type1 = -1; + } + if (tileCache.type == (ushort) 13) + Type1 = tileCache.frameX < (short) 90 ? 13 : -1; + if (tileCache.type == (ushort) 189) + Type1 = 16; + if (tileCache.type == (ushort) 460) + Type1 = 16; + if (tileCache.type == (ushort) 530) + { + switch (Main.tile[i, j + 2 - (int) tileCache.frameY / 18].type) + { + case 112: + Type1 = 17; + break; + case 116: + Type1 = 47; + break; + case 234: + Type1 = 125; + break; + default: + Type1 = tileCache.frameX >= (short) 270 ? 291 : 40; + break; + } + } + if (tileCache.type == (ushort) 518) + { + if (tileCache.frameY == (short) 0) + Type1 = 3; + else if (tileCache.frameY == (short) 18) + Type1 = 47; + else if (tileCache.frameY == (short) 36) + Type1 = 40; + } + else if (tileCache.type == (ushort) 519) + { + if (tileCache.frameY == (short) 0) + Type1 = 3; + else if (tileCache.frameY == (short) 18) + Type1 = 40; + else if (tileCache.frameY == (short) 36) + Type1 = 47; + else if (tileCache.frameY == (short) 54) + Type1 = 125; + else if (tileCache.frameY == (short) 72) + Type1 = 17; + else if (tileCache.frameY == (short) 90) + Type1 = 26; + } + else if (tileCache.type == (ushort) 528) + Type1 = 26; + if (tileCache.type == (ushort) 12) + Type1 = 12; + if (tileCache.type == (ushort) 3 || tileCache.type == (ushort) 73) + Type1 = 3; + if (tileCache.type == (ushort) 54) + Type1 = 13; + if (tileCache.type == (ushort) 22 || tileCache.type == (ushort) 140) + Type1 = 14; + if (tileCache.type == (ushort) 78) + Type1 = 22; + if (tileCache.type == (ushort) 28) + { + Type1 = 22; + if (tileCache.frameY >= (short) 72 && tileCache.frameY <= (short) 90) + Type1 = 1; + if (tileCache.frameY >= (short) 144 && tileCache.frameY <= (short) 234) + Type1 = 48; + if (tileCache.frameY >= (short) 252 && tileCache.frameY <= (short) 358) + Type1 = 85; + if (tileCache.frameY >= (short) 360 && tileCache.frameY <= (short) 466) + Type1 = 26; + if (tileCache.frameY >= (short) 468 && tileCache.frameY <= (short) 574) + Type1 = 36; + if (tileCache.frameY >= (short) 576 && tileCache.frameY <= (short) 790) + Type1 = 18; + if (tileCache.frameY >= (short) 792 && tileCache.frameY <= (short) 898) + Type1 = 5; + if (tileCache.frameY >= (short) 900 && tileCache.frameY <= (short) 1006) + Type1 = 0; + if (tileCache.frameY >= (short) 1008 && tileCache.frameY <= (short) 1114) + Type1 = 148; + if (tileCache.frameY >= (short) 1116 && tileCache.frameY <= (short) 1222) + Type1 = 241; + if (tileCache.frameY >= (short) 1224 && tileCache.frameY <= (short) 1330) + Type1 = 287; + } + if (tileCache.type == (ushort) 163) + Type1 = 118; + if (tileCache.type == (ushort) 164) + Type1 = 119; + if (tileCache.type == (ushort) 200) + Type1 = 120; + if (tileCache.type == (ushort) 221 || tileCache.type == (ushort) 248) + Type1 = 144; + if (tileCache.type == (ushort) 222 || tileCache.type == (ushort) 249) + Type1 = 145; + if (tileCache.type == (ushort) 223 || tileCache.type == (ushort) 250) + Type1 = 146; + if (tileCache.type == (ushort) 224) + Type1 = 149; + if (tileCache.type == (ushort) 225) + Type1 = 147; + if (tileCache.type == (ushort) 229) + Type1 = 153; + if (tileCache.type == (ushort) 231) + { + Type1 = 153; + if (WorldGen.genRand.Next(3) == 0) + Type1 = 26; + } + if (tileCache.type == (ushort) 226) + Type1 = 148; + if (tileCache.type == (ushort) 103) + Type1 = -1; + if (tileCache.type == (ushort) 29) + Type1 = 23; + if (tileCache.type == (ushort) 40) + Type1 = 28; + if (tileCache.type == (ushort) 49) + Type1 = 29; + if (tileCache.type == (ushort) 50) + Type1 = 22; + if (tileCache.type == (ushort) 51) + Type1 = 30; + if (tileCache.type == (ushort) 52 || tileCache.type == (ushort) 353) + Type1 = 3; + if (tileCache.type == (ushort) 53 || tileCache.type == (ushort) 81 || tileCache.type == (ushort) 151 || tileCache.type == (ushort) 202 || tileCache.type == (ushort) 274 || tileCache.type == (ushort) 495) + Type1 = 32; + if (tileCache.type == (ushort) 56 || tileCache.type == (ushort) 152) + Type1 = 37; + if (tileCache.type == (ushort) 75) + Type1 = 109; + if (tileCache.type == (ushort) 57 || tileCache.type == (ushort) 119 || tileCache.type == (ushort) 141 || tileCache.type == (ushort) 234) + Type1 = 36; + if (tileCache.type == (ushort) 59 || tileCache.type == (ushort) 120) + Type1 = 38; + if (tileCache.type == (ushort) 61 || tileCache.type == (ushort) 62 || tileCache.type == (ushort) 74 || tileCache.type == (ushort) 80 || tileCache.type == (ushort) 188 || tileCache.type == (ushort) 233 || tileCache.type == (ushort) 236 || tileCache.type == (ushort) 384) + Type1 = 40; + if (tileCache.type == (ushort) 485) + Type1 = 32; + if (tileCache.type == (ushort) 238) + Type1 = WorldGen.genRand.Next(3) != 0 ? 166 : 167; + if (tileCache.type == (ushort) 69) + Type1 = 7; + if (tileCache.type == (ushort) 71 || tileCache.type == (ushort) 72 || tileCache.type == (ushort) 190 || tileCache.type == (ushort) 578) + Type1 = 26; + if (tileCache.type == (ushort) 70) + Type1 = 17; + if (tileCache.type == (ushort) 112) + Type1 = 14; + if (tileCache.type == (ushort) 123) + Type1 = 53; + if (tileCache.type == (ushort) 161) + Type1 = 80; + if (tileCache.type == (ushort) 206) + Type1 = 80; + if (tileCache.type == (ushort) 162) + Type1 = 80; + if (tileCache.type == (ushort) 165) + { + switch ((int) tileCache.frameX / 54) + { + case 0: + Type1 = 80; + break; + case 1: + Type1 = 1; + break; + case 2: + Type1 = 30; + break; + case 3: + Type1 = 147; + break; + case 4: + Type1 = 1; + break; + case 5: + Type1 = 14; + break; + case 6: + Type1 = 117; + break; + case 7: + Type1 = 250; + break; + case 8: + Type1 = 240; + break; + case 9: + Type1 = 236; + break; + default: + Type1 = 1; + break; + } + } + if (tileCache.type == (ushort) 193) + Type1 = 4; + if (tileCache.type == (ushort) 194) + Type1 = 26; + if (tileCache.type == (ushort) 195) + Type1 = 5; + if (tileCache.type == (ushort) 196) + Type1 = 108; + if (tileCache.type == (ushort) 460) + Type1 = 108; + if (tileCache.type == (ushort) 197) + Type1 = 4; + if (tileCache.type == (ushort) 153) + Type1 = 26; + if (tileCache.type == (ushort) 154) + Type1 = 32; + if (tileCache.type == (ushort) 155) + Type1 = 2; + if (tileCache.type == (ushort) 156) + Type1 = 1; + if (tileCache.type == (ushort) 116 || tileCache.type == (ushort) 118 || tileCache.type == (ushort) 147 || tileCache.type == (ushort) 148) + Type1 = 51; + if (tileCache.type == (ushort) 109 || tileCache.type == (ushort) 492) + Type1 = WorldGen.genRand.Next(2) != 0 ? 47 : 0; + if (tileCache.type == (ushort) 110 || tileCache.type == (ushort) 113 || tileCache.type == (ushort) 115) + Type1 = 47; + if (tileCache.type == (ushort) 107 || tileCache.type == (ushort) 121) + Type1 = 48; + if (tileCache.type == (ushort) 108 || tileCache.type == (ushort) 122 || tileCache.type == (ushort) 146) + Type1 = 49; + if (tileCache.type == (ushort) 111 || tileCache.type == (ushort) 145 || tileCache.type == (ushort) 150) + Type1 = 50; + if (tileCache.type == (ushort) 133) + { + Type1 = 50; + if (tileCache.frameX >= (short) 54) + Type1 = 146; + } + if (tileCache.type == (ushort) 134) + { + Type1 = 49; + if (tileCache.frameX >= (short) 36) + Type1 = 145; + } + if (tileCache.type == (ushort) 149) + Type1 = 49; + if (Main.tileAlch[(int) tileCache.type]) + { + int num11 = (int) tileCache.frameX / 18; + if (num11 == 0) + Type1 = 3; + if (num11 == 1) + Type1 = 3; + if (num11 == 2) + Type1 = 7; + if (num11 == 3) + Type1 = 17; + if (num11 == 4) + Type1 = 289; + if (num11 == 5) + Type1 = 6; + if (num11 == 6) + Type1 = 224; + } + if (tileCache.type == (ushort) 58 || tileCache.type == (ushort) 76 || tileCache.type == (ushort) 77) + Type1 = WorldGen.genRand.Next(2) != 0 ? 25 : 6; + if (tileCache.type == (ushort) 37) + Type1 = WorldGen.genRand.Next(2) != 0 ? 23 : 6; + if (tileCache.type == (ushort) 32) + Type1 = WorldGen.genRand.Next(2) != 0 ? 24 : 14; + if (tileCache.type == (ushort) 352) + Type1 = WorldGen.genRand.Next(3) != 0 ? 125 : 5; + if (tileCache.type == (ushort) 23 || tileCache.type == (ushort) 24) + Type1 = WorldGen.genRand.Next(2) != 0 ? 17 : 14; + if (tileCache.type == (ushort) 25 || tileCache.type == (ushort) 31) + Type1 = tileCache.type != (ushort) 31 || tileCache.frameX < (short) 36 ? (WorldGen.genRand.Next(2) != 0 ? 1 : 14) : 5; + if (tileCache.type == (ushort) 20) + { + switch ((int) tileCache.frameX / 54) + { + case 1: + Type1 = 122; + break; + case 2: + Type1 = 78; + break; + case 3: + Type1 = 77; + break; + case 4: + Type1 = 121; + break; + case 5: + Type1 = 79; + break; + default: + Type1 = 7; + break; + } + } + if (tileCache.type == (ushort) 27) + Type1 = WorldGen.genRand.Next(2) != 0 ? 19 : 3; + if (tileCache.type == (ushort) 129) + { + if (tileCache.frameX >= (short) 324) + num3 = 69; + Type1 = tileCache.frameX == (short) 0 || tileCache.frameX == (short) 54 || tileCache.frameX == (short) 108 ? 68 : (tileCache.frameX == (short) 18 || tileCache.frameX == (short) 72 || tileCache.frameX == (short) 126 ? 69 : 70); + } + if (tileCache.type == (ushort) 385) + Type1 = WorldGen.genRand.Next(68, 71); + if (tileCache.type == (ushort) 4) + { + int index = (int) tileCache.frameY / 22; + Type1 = TorchID.Dust[index]; + } + if (tileCache.type == (ushort) 35) + { + Type1 = 189; + if (tileCache.frameX < (short) 36 && WorldGen.genRand.Next(2) == 0) + Type1 = 6; + } + if ((tileCache.type == (ushort) 34 || tileCache.type == (ushort) 42) && WorldGen.genRand.Next(2) == 0) + Type1 = 6; + if (tileCache.type == (ushort) 270) + Type1 = -1; + if (tileCache.type == (ushort) 271) + Type1 = -1; + if (tileCache.type == (ushort) 581) + Type1 = -1; + if (tileCache.type == (ushort) 79 || tileCache.type == (ushort) 90 || tileCache.type == (ushort) 101) + Type1 = -1; + if (tileCache.type == (ushort) 33 || tileCache.type == (ushort) 34 || tileCache.type == (ushort) 42 || tileCache.type == (ushort) 93 || tileCache.type == (ushort) 100) + Type1 = -1; + if (tileCache.type == (ushort) 321 || tileCache.type == (ushort) 574) + Type1 = 214; + if (tileCache.type == (ushort) 322) + Type1 = 215; + bool flag = tileCache.type == (ushort) 178 || tileCache.type == (ushort) 440; + switch (tileCache.type) + { + case 178: + case 426: + case 427: + case 430: + case 431: + case 432: + case 433: + case 434: + case 435: + case 436: + case 437: + case 438: + case 439: + case 440: + flag = true; + break; + } + if (Type1 < 0) + return 6000; + if (tileCache.type == (ushort) 518) + { + int num12 = (int) tileCache.liquid / 16 - 3; + if (WorldGen.SolidTile(i, j - 1) && num12 > 8) + num12 = 8; + return Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16 - num12)), 16, 16, Type1); + } + if (tileCache.type == (ushort) 352 && Type1 == 5) + { + int index = Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 5, Alpha: 100); + Main.dust[index].scale = 1.5f; + Main.dust[index].noGravity = true; + Main.dust[index].velocity *= 1.65f; + Main.dust[index].fadeIn = 1.6f; + return index; + } + if (tileCache.type == (ushort) 160) + { + int index = Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 66, Alpha: 100, newColor: new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), Scale: 0.75f); + Main.dust[index].noGravity = true; + return index; + } + if (tileCache.type == (ushort) 323) + { + int frameY = (int) tileCache.frameY; + return Dust.NewDust(new Vector2((float) (i * 16 + frameY), (float) (j * 16)), 16, 16, Type1); + } + if (tileCache.type == (ushort) 314) + { + int index = Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, 213, (float) WorldGen.genRand.Next(-2, 3), (float) WorldGen.genRand.Next(-2, 3)); + Main.dust[index].noGravity = true; + Main.dust[index].fadeIn = (float) ((double) Main.dust[index].scale + 1.0 + 0.00999999977648258 * (double) WorldGen.genRand.Next(0, 51)); + Main.dust[index].noGravity = true; + return index; + } + if (flag) + { + int index = Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, Type1, Alpha: 75, Scale: 0.75f); + Main.dust[index].noLight = true; + return index; + } + if (tileCache.type == (ushort) 193 || tileCache.type == (ushort) 18 && Type1 == 4 || tileCache.type == (ushort) 19 && Type1 == 4) + return Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, Type1, Alpha: 75, newColor: new Color(0, 80, (int) byte.MaxValue, 100), Scale: 0.75f); + if (tileCache.type == (ushort) 197) + return Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, Type1, Alpha: 75, newColor: new Color(97, 200, (int) byte.MaxValue, 100), Scale: 0.75f); + if (tileCache.type == (ushort) 185 && Type1 >= 86 && Type1 <= 91) + { + int index = Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, Type1, Alpha: 75, Scale: 0.75f); + Main.dust[index].noLight = true; + return index; + } + if (tileCache.type == (ushort) 4 && Type1 == 66) + { + int index = Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, Type1, newColor: new Color((float) Main.DiscoR / (float) byte.MaxValue, (float) Main.DiscoG / (float) byte.MaxValue, (float) Main.DiscoB / (float) byte.MaxValue)); + Main.dust[index].noGravity = true; + return index; + } + if (Type1 != 139) + return Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, Type1); + int Type2 = Type1 + Main.rand.Next(4); + return Dust.NewDust(new Vector2((float) (i * 16), (float) (j * 16)), 16, 16, Type2); + } + + public static bool IsOpenDoorAnchorFrame(int x, int y) + { + Tile tile = Main.tile[x, y]; + if (!tile.active() || tile.type != (ushort) 11) + return false; + int num = (int) tile.frameX % 72; + return num < 18 || num >= 54; + } + + public static bool IsLockedDoor(int x, int y) => WorldGen.IsLockedDoor(Main.tile[x, y]); + + public static bool IsLockedDoor(Tile t) => t.type == (ushort) 10 && t.frameY >= (short) 594 && t.frameY <= (short) 646 && t.frameX < (short) 54; + + public static void DropDoorItem(int x, int y, int doorStyle) + { + int Type = 0; + switch (doorStyle) + { + case 0: + Type = 25; + break; + case 9: + Type = 837; + break; + case 10: + Type = 912; + break; + case 12: + Type = 1137; + break; + case 13: + Type = 1138; + break; + case 14: + Type = 1139; + break; + case 15: + Type = 1140; + break; + case 16: + Type = 1411; + break; + case 17: + Type = 1412; + break; + case 18: + Type = 1413; + break; + case 19: + Type = 1458; + break; + default: + if (doorStyle >= 20 && doorStyle <= 23) + { + Type = 1709 + doorStyle - 20; + break; + } + switch (doorStyle) + { + case 24: + Type = 1793; + break; + case 25: + Type = 1815; + break; + case 26: + Type = 1924; + break; + case 27: + Type = 2044; + break; + case 28: + Type = 2265; + break; + case 29: + Type = 2528; + break; + case 30: + Type = 2561; + break; + case 31: + Type = 2576; + break; + case 32: + Type = 2815; + break; + case 33: + Type = 3129; + break; + case 34: + Type = 3131; + break; + case 35: + Type = 3130; + break; + case 36: + Type = 3888; + break; + case 37: + Type = 3941; + break; + case 38: + Type = 3967; + break; + case 39: + Type = 4155; + break; + case 40: + Type = 4176; + break; + case 41: + Type = 4197; + break; + case 42: + Type = 4218; + break; + case 43: + Type = 4307; + break; + case 44: + Type = 4415; + break; + case 45: + Type = 4576; + break; + default: + if (doorStyle >= 4 && doorStyle <= 8) + { + Type = 812 + doorStyle; + break; + } + if (doorStyle != 11) + { + Type = 649 + doorStyle; + break; + } + break; + } + break; + } + if (Type == 0) + return; + Item.NewItem(x * 16, y * 16, 16, 16, Type); + } + + public static bool PlayerLOS(int x, int y) + { + Microsoft.Xna.Framework.Rectangle rectangle1 = new Microsoft.Xna.Framework.Rectangle(x * 16, y * 16, 16, 16); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active) + { + Microsoft.Xna.Framework.Rectangle rectangle2 = new Microsoft.Xna.Framework.Rectangle((int) ((double) Main.player[index].position.X + (double) Main.player[index].width * 0.5 - (double) NPC.sWidth * 0.6), (int) ((double) Main.player[index].position.Y + (double) Main.player[index].height * 0.5 - (double) NPC.sHeight * 0.6), (int) ((double) NPC.sWidth * 1.2), (int) ((double) NPC.sHeight * 1.2)); + if (rectangle1.Intersects(rectangle2)) + return true; + } + } + return false; + } + + public static bool Chlorophyte(int i, int j) + { + int num1 = 40; + int num2 = 130; + int num3 = 35; + int num4 = 85; + if ((double) j < Main.rockLayer) + { + num1 /= 2; + num2 /= 2; + num3 = (int) ((double) num3 * 1.5); + num4 = (int) ((double) num4 * 1.5); + } + int num5 = 0; + for (int x = i - num3; x < i + num3; ++x) + { + for (int y = j - num3; y < j + num3; ++y) + { + if (WorldGen.InWorld(x, y) && Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 211) + ++num5; + } + } + if (num5 > num1) + return false; + int num6 = 0; + for (int x = i - num4; x < i + num4; ++x) + { + for (int y = j - num4; y < j + num4; ++y) + { + if (WorldGen.InWorld(x, y) && Main.tile[x, y].active() && Main.tile[x, y].type == (ushort) 211) + ++num6; + } + } + return num6 <= num2; + } + + private static bool nearbyChlorophyte(int i, int j) + { + float num1 = 0.0f; + int num2 = 5; + if (i <= num2 + 5 || i >= Main.maxTilesX - num2 - 5 || j <= num2 + 5 || j >= Main.maxTilesY - num2 - 5) + return false; + for (int index1 = i - num2; index1 <= i + num2; ++index1) + { + for (int index2 = j - num2; index2 <= j + num2; ++index2) + { + if (Main.tile[index1, index2].active() && (Main.tile[index1, index2].type == (ushort) 211 || Main.tile[index1, index2].type == (ushort) 346)) + { + ++num1; + if ((double) num1 >= 4.0) + return true; + } + } + } + return (double) num1 > 0.0 && (double) WorldGen.genRand.Next(5) < (double) num1; + } + + private static int CountNearBlocksTypes( + int i, + int j, + int radius, + int cap = 0, + params int[] tiletypes) + { + if (tiletypes.Length == 0) + return 0; + int num1 = i - radius; + int num2 = i + radius; + int num3 = j - radius; + int num4 = j + radius; + int max = Main.maxTilesX - 1; + int num5 = Utils.Clamp(num1, 0, max); + int num6 = Utils.Clamp(num2, 0, Main.maxTilesX - 1); + int num7 = Utils.Clamp(num3, 0, Main.maxTilesY - 1); + int num8 = Utils.Clamp(num4, 0, Main.maxTilesY - 1); + int num9 = 0; + for (int index1 = num5; index1 <= num6; ++index1) + { + for (int index2 = num7; index2 <= num8; ++index2) + { + if (Main.tile[index1, index2].active()) + { + foreach (int tiletype in tiletypes) + { + if (tiletype == (int) Main.tile[index1, index2].type) + { + ++num9; + if (cap > 0 && num9 >= cap) + return num9; + break; + } + } + } + } + } + return num9; + } + + public static void hardUpdateWorld(int i, int j) + { + if (!Main.hardMode || Main.tile[i, j].inActive()) + return; + int type = (int) Main.tile[i, j].type; + switch (type) + { + case 117: + case 164: + if ((double) j > Main.rockLayer && WorldGen.genRand.Next(110) == 0) + { + int num1 = WorldGen.genRand.Next(4); + int num2 = 0; + int num3 = 0; + switch (num1) + { + case 0: + num2 = -1; + break; + case 1: + num2 = 1; + break; + default: + num3 = num1 != 0 ? 1 : -1; + break; + } + if (!Main.tile[i + num2, j + num3].active()) + { + int num4 = 0; + int num5 = 6; + for (int index1 = i - num5; index1 <= i + num5; ++index1) + { + for (int index2 = j - num5; index2 <= j + num5; ++index2) + { + if (Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 129) + ++num4; + } + } + if (num4 < 2) + { + WorldGen.PlaceTile(i + num2, j + num3, 129, true); + NetMessage.SendTileSquare(-1, i + num2, j + num3, 1); + break; + } + break; + } + break; + } + break; + } + if ((double) j > (Main.worldSurface + Main.rockLayer) / 2.0) + { + if (type == 60 && WorldGen.genRand.Next(300) == 0) + { + int index3 = i + WorldGen.genRand.Next(-10, 11); + int index4 = j + WorldGen.genRand.Next(-10, 11); + if (WorldGen.InWorld(index3, index4, 2) && Main.tile[index3, index4].active() && Main.tile[index3, index4].type == (ushort) 59 && (!Main.tile[index3, index4 - 1].active() || Main.tile[index3, index4 - 1].type != (ushort) 5 && Main.tile[index3, index4 - 1].type != (ushort) 236 && Main.tile[index3, index4 - 1].type != (ushort) 238) && WorldGen.Chlorophyte(index3, index4)) + { + Main.tile[index3, index4].type = (ushort) 211; + WorldGen.SquareTileFrame(index3, index4); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index3, index4, 1); + } + } + if (type == 211 && WorldGen.genRand.Next(3) != 0) + { + int index5 = i; + int index6 = j; + int num = WorldGen.genRand.Next(4); + if (num == 0) + ++index5; + if (num == 1) + --index5; + if (num == 2) + ++index6; + if (num == 3) + --index6; + if (WorldGen.InWorld(index5, index6, 2) && Main.tile[index5, index6].active() && (Main.tile[index5, index6].type == (ushort) 59 || Main.tile[index5, index6].type == (ushort) 60) && WorldGen.Chlorophyte(index5, index6)) + { + Main.tile[index5, index6].type = (ushort) 211; + WorldGen.SquareTileFrame(index5, index6); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index5, index6, 1); + } + bool flag = true; + while (flag) + { + flag = false; + int index7 = i + Main.rand.Next(-6, 7); + int index8 = j + Main.rand.Next(-6, 7); + if (WorldGen.InWorld(index7, index8, 2) && Main.tile[index7, index8].active()) + { + if (Main.tile[index7, index8].type == (ushort) 23 || Main.tile[index7, index8].type == (ushort) 199 || Main.tile[index7, index8].type == (ushort) 2 || Main.tile[index7, index8].type == (ushort) 477 || Main.tile[index7, index8].type == (ushort) 492 || Main.tile[index7, index8].type == (ushort) 109) + { + Main.tile[index7, index8].type = (ushort) 60; + WorldGen.SquareTileFrame(index7, index8); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index7, index8, 1); + flag = true; + } + else if (Main.tile[index7, index8].type == (ushort) 0) + { + Main.tile[index7, index8].type = (ushort) 59; + WorldGen.SquareTileFrame(index7, index8); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index7, index8, 1); + flag = true; + } + } + } + } + } + if (NPC.downedPlantBoss && WorldGen.genRand.Next(2) != 0 || !WorldGen.AllowedToSpreadInfections) + return; + if (type == 23 || type == 25 || type == 32 || type == 112 || type == 163 || type == 400 || type == 398) + { + bool flag = true; + while (flag) + { + flag = false; + int index9 = i + WorldGen.genRand.Next(-3, 4); + int index10 = j + WorldGen.genRand.Next(-3, 4); + if (!WorldGen.nearbyChlorophyte(index9, index10)) + { + if (WorldGen.CountNearBlocksTypes(index9, index10, 2, 1, 27) <= 0) + { + if (Main.tile[index9, index10].type == (ushort) 2) + { + if (WorldGen.genRand.Next(2) == 0) + flag = true; + Main.tile[index9, index10].type = (ushort) 23; + WorldGen.SquareTileFrame(index9, index10); + NetMessage.SendTileSquare(-1, index9, index10, 1); + } + else if (Main.tile[index9, index10].type == (ushort) 1 || Main.tileMoss[(int) Main.tile[index9, index10].type]) + { + if (WorldGen.genRand.Next(2) == 0) + flag = true; + Main.tile[index9, index10].type = (ushort) 25; + WorldGen.SquareTileFrame(index9, index10); + NetMessage.SendTileSquare(-1, index9, index10, 1); + } + else if (Main.tile[index9, index10].type == (ushort) 53) + { + if (WorldGen.genRand.Next(2) == 0) + flag = true; + Main.tile[index9, index10].type = (ushort) 112; + WorldGen.SquareTileFrame(index9, index10); + NetMessage.SendTileSquare(-1, index9, index10, 1); + } + else if (Main.tile[index9, index10].type == (ushort) 396) + { + if (WorldGen.genRand.Next(2) == 0) + flag = true; + Main.tile[index9, index10].type = (ushort) 400; + WorldGen.SquareTileFrame(index9, index10); + NetMessage.SendTileSquare(-1, index9, index10, 1); + } + else if (Main.tile[index9, index10].type == (ushort) 397) + { + if (WorldGen.genRand.Next(2) == 0) + flag = true; + Main.tile[index9, index10].type = (ushort) 398; + WorldGen.SquareTileFrame(index9, index10); + NetMessage.SendTileSquare(-1, index9, index10, 1); + } + else if (Main.tile[index9, index10].type == (ushort) 59) + { + if (WorldGen.genRand.Next(2) == 0) + flag = true; + Main.tile[index9, index10].type = (ushort) 0; + WorldGen.SquareTileFrame(index9, index10); + NetMessage.SendTileSquare(-1, index9, index10, 1); + } + else if (Main.tile[index9, index10].type == (ushort) 60) + { + if (WorldGen.genRand.Next(2) == 0) + flag = true; + Main.tile[index9, index10].type = (ushort) 23; + WorldGen.SquareTileFrame(index9, index10); + NetMessage.SendTileSquare(-1, index9, index10, 1); + } + else if (Main.tile[index9, index10].type == (ushort) 69) + { + if (WorldGen.genRand.Next(2) == 0) + flag = true; + Main.tile[index9, index10].type = (ushort) 32; + WorldGen.SquareTileFrame(index9, index10); + NetMessage.SendTileSquare(-1, index9, index10, 1); + } + else if (Main.tile[index9, index10].type == (ushort) 161) + { + if (WorldGen.genRand.Next(2) == 0) + flag = true; + Main.tile[index9, index10].type = (ushort) 163; + WorldGen.SquareTileFrame(index9, index10); + NetMessage.SendTileSquare(-1, index9, index10, 1); + } + } + } + } + } + if (type == 199 || type == 200 || type == 201 || type == 203 || type == 205 || type == 234 || type == 352 || type == 401 || type == 399) + { + bool flag = true; + while (flag) + { + flag = false; + int index11 = i + WorldGen.genRand.Next(-3, 4); + int index12 = j + WorldGen.genRand.Next(-3, 4); + if (!WorldGen.nearbyChlorophyte(index11, index12)) + { + if (WorldGen.CountNearBlocksTypes(index11, index12, 2, 1, 27) <= 0) + { + if (Main.tile[index11, index12].type == (ushort) 2) + { + if (WorldGen.genRand.Next(2) == 0) + flag = true; + Main.tile[index11, index12].type = (ushort) 199; + WorldGen.SquareTileFrame(index11, index12); + NetMessage.SendTileSquare(-1, index11, index12, 1); + } + else if (Main.tile[index11, index12].type == (ushort) 1 || Main.tileMoss[(int) Main.tile[index11, index12].type]) + { + if (WorldGen.genRand.Next(2) == 0) + flag = true; + Main.tile[index11, index12].type = (ushort) 203; + WorldGen.SquareTileFrame(index11, index12); + NetMessage.SendTileSquare(-1, index11, index12, 1); + } + else if (Main.tile[index11, index12].type == (ushort) 53) + { + if (WorldGen.genRand.Next(2) == 0) + flag = true; + Main.tile[index11, index12].type = (ushort) 234; + WorldGen.SquareTileFrame(index11, index12); + NetMessage.SendTileSquare(-1, index11, index12, 1); + } + else if (Main.tile[index11, index12].type == (ushort) 396) + { + if (WorldGen.genRand.Next(2) == 0) + flag = true; + Main.tile[index11, index12].type = (ushort) 401; + WorldGen.SquareTileFrame(index11, index12); + NetMessage.SendTileSquare(-1, index11, index12, 1); + } + else if (Main.tile[index11, index12].type == (ushort) 397) + { + if (WorldGen.genRand.Next(2) == 0) + flag = true; + Main.tile[index11, index12].type = (ushort) 399; + WorldGen.SquareTileFrame(index11, index12); + NetMessage.SendTileSquare(-1, index11, index12, 1); + } + else if (Main.tile[index11, index12].type == (ushort) 59) + { + if (WorldGen.genRand.Next(2) == 0) + flag = true; + Main.tile[index11, index12].type = (ushort) 0; + WorldGen.SquareTileFrame(index11, index12); + NetMessage.SendTileSquare(-1, index11, index12, 1); + } + else if (Main.tile[index11, index12].type == (ushort) 60) + { + if (WorldGen.genRand.Next(2) == 0) + flag = true; + Main.tile[index11, index12].type = (ushort) 199; + WorldGen.SquareTileFrame(index11, index12); + NetMessage.SendTileSquare(-1, index11, index12, 1); + } + else if (Main.tile[index11, index12].type == (ushort) 69) + { + if (WorldGen.genRand.Next(2) == 0) + flag = true; + Main.tile[index11, index12].type = (ushort) 352; + WorldGen.SquareTileFrame(index11, index12); + NetMessage.SendTileSquare(-1, index11, index12, 1); + } + else if (Main.tile[index11, index12].type == (ushort) 161) + { + if (WorldGen.genRand.Next(2) == 0) + flag = true; + Main.tile[index11, index12].type = (ushort) 200; + WorldGen.SquareTileFrame(index11, index12); + NetMessage.SendTileSquare(-1, index11, index12, 1); + } + } + } + } + } + if (type != 109 && type != 110 && type != 113 && type != 115 && type != 116 && type != 117 && type != 164 && type != 402 && type != 403 && type != 492) + return; + bool flag1 = true; + while (flag1) + { + flag1 = false; + int index13 = i + WorldGen.genRand.Next(-3, 4); + int index14 = j + WorldGen.genRand.Next(-3, 4); + if (WorldGen.CountNearBlocksTypes(index13, index14, 2, 1, 27) <= 0) + { + if (Main.tile[index13, index14].type == (ushort) 2) + { + if (WorldGen.genRand.Next(2) == 0) + flag1 = true; + Main.tile[index13, index14].type = (ushort) 109; + WorldGen.SquareTileFrame(index13, index14); + NetMessage.SendTileSquare(-1, index13, index14, 1); + } + else if (Main.tile[index13, index14].type == (ushort) 477) + { + if (WorldGen.genRand.Next(2) == 0) + flag1 = true; + Main.tile[index13, index14].type = (ushort) 492; + WorldGen.SquareTileFrame(index13, index14); + NetMessage.SendTileSquare(-1, index13, index14, 1); + } + else if (Main.tile[index13, index14].type == (ushort) 1 || Main.tileMoss[(int) Main.tile[index13, index14].type]) + { + if (WorldGen.genRand.Next(2) == 0) + flag1 = true; + Main.tile[index13, index14].type = (ushort) 117; + WorldGen.SquareTileFrame(index13, index14); + NetMessage.SendTileSquare(-1, index13, index14, 1); + } + else if (Main.tile[index13, index14].type == (ushort) 53) + { + if (WorldGen.genRand.Next(2) == 0) + flag1 = true; + Main.tile[index13, index14].type = (ushort) 116; + WorldGen.SquareTileFrame(index13, index14); + NetMessage.SendTileSquare(-1, index13, index14, 1); + } + else if (Main.tile[index13, index14].type == (ushort) 396) + { + if (WorldGen.genRand.Next(2) == 0) + flag1 = true; + Main.tile[index13, index14].type = (ushort) 403; + WorldGen.SquareTileFrame(index13, index14); + NetMessage.SendTileSquare(-1, index13, index14, 1); + } + else if (Main.tile[index13, index14].type == (ushort) 397) + { + if (WorldGen.genRand.Next(2) == 0) + flag1 = true; + Main.tile[index13, index14].type = (ushort) 402; + WorldGen.SquareTileFrame(index13, index14); + NetMessage.SendTileSquare(-1, index13, index14, 1); + } + else if (Main.tile[index13, index14].type == (ushort) 161) + { + if (WorldGen.genRand.Next(2) == 0) + flag1 = true; + Main.tile[index13, index14].type = (ushort) 164; + WorldGen.SquareTileFrame(index13, index14); + NetMessage.SendTileSquare(-1, index13, index14, 1); + } + } + } + } + + public static bool SolidTile(Tile testTile) + { + try + { + if (testTile == null) + return true; + if (testTile.active()) + { + if (Main.tileSolid[(int) testTile.type]) + { + if (!Main.tileSolidTop[(int) testTile.type]) + { + if (!testTile.halfBrick()) + { + if (testTile.slope() == (byte) 0) + { + if (!testTile.inActive()) + return true; + } + } + } + } + } + } + catch + { + } + return false; + } + + public static bool TileEmpty(int i, int j) => Main.tile[i, j] == null || !Main.tile[i, j].active() || Main.tile[i, j].inActive(); + + public static bool SolidOrSlopedTile(Tile tile) => tile != null && tile.active() && Main.tileSolid[(int) tile.type] && !Main.tileSolidTop[(int) tile.type] && !tile.inActive(); + + public static int TileType(int x, int y) => !Main.tile[x, y].active() ? -1 : (int) Main.tile[x, y].type; + + public static bool SolidOrSlopedTile(int x, int y) => WorldGen.SolidOrSlopedTile(Main.tile[x, y]); + + public static bool SolidTile(Point p) => WorldGen.SolidTile(p.X, p.Y); + + public static bool SolidTile(int i, int j, bool noDoors = false) + { + try + { + if (Main.tile[i, j] == null) + return true; + if (Main.tile[i, j].active()) + { + if (Main.tileSolid[(int) Main.tile[i, j].type]) + { + if (!Main.tileSolidTop[(int) Main.tile[i, j].type]) + { + if (!Main.tile[i, j].halfBrick()) + { + if (Main.tile[i, j].slope() == (byte) 0) + { + if (!Main.tile[i, j].inActive()) + return !noDoors || Main.tile[i, j].type != (ushort) 10; + } + } + } + } + } + } + catch + { + } + return false; + } + + public static bool SolidTile2(Tile testTile) + { + try + { + if (testTile == null) + return true; + if (testTile.active()) + { + if (Main.tileSolid[(int) testTile.type]) + { + if (testTile.slope() == (byte) 0) + { + if (!testTile.halfBrick()) + { + if (!testTile.inActive()) + return true; + } + } + } + } + } + catch + { + } + return false; + } + + public static bool PlatformProperTopFrame(short frameX) + { + int num = (int) frameX / TileObjectData.PlatformFrameWidth(); + if (num >= 0 && num <= 7 || num >= 12 && num <= 16) + return true; + return num >= 25 && num <= 26; + } + + public static bool SolidTileAllowBottomSlope(int i, int j) + { + try + { + Tile tile = Main.tile[i, j]; + if (tile == null) + return true; + if (tile.active()) + { + if (!Main.tileSolid[(int) tile.type]) + { + if (!Main.tileSolidTop[(int) tile.type]) + goto label_12; + } + if (tile.topSlope()) + { + if (TileID.Sets.Platforms[(int) tile.type]) + { + if (!WorldGen.PlatformProperTopFrame(tile.frameX)) + goto label_12; + } + else + goto label_12; + } + if (!tile.halfBrick()) + { + if (!tile.inActive()) + return true; + } + } + } + catch + { + } +label_12: + return false; + } + + public static bool SolidTileAllowTopSlope(int i, int j) + { + try + { + Tile tile = Main.tile[i, j]; + if (tile == null) + return true; + if (tile.active()) + { + if (Main.tileSolid[(int) tile.type]) + { + if (tile.bottomSlope()) + { + if (TileID.Sets.Platforms[(int) tile.type]) + { + if (!tile.halfBrick()) + goto label_10; + } + else + goto label_10; + } + if (!tile.inActive()) + return true; + } + } + } + catch + { + } +label_10: + return false; + } + + public static bool TopEdgeCanBeAttachedTo(int i, int j) + { + try + { + Tile tile = Main.tile[i, j]; + if (tile == null) + return true; + if (tile.active()) + { + if (!Main.tileSolid[(int) tile.type]) + { + if (!Main.tileSolidTop[(int) tile.type]) + goto label_12; + } + if (tile.topSlope()) + { + if (TileID.Sets.Platforms[(int) tile.type]) + { + if (!WorldGen.PlatformProperTopFrame(tile.frameX)) + goto label_12; + } + else + goto label_12; + } + if (!tile.halfBrick()) + { + if (!tile.inActive()) + return true; + } + } + } + catch + { + } +label_12: + return false; + } + + public static bool RightEdgeCanBeAttachedTo(int i, int j) + { + try + { + Tile tile = Main.tile[i, j]; + if (tile == null) + return true; + if (tile.active()) + { + if (Main.tileSolid[(int) tile.type]) + { + if (!Main.tileSolidTop[(int) tile.type]) + { + if (!tile.rightSlope()) + { + if (!tile.halfBrick()) + { + if (!tile.inActive()) + { + if (!Main.tileNoAttach[(int) tile.type]) + return true; + } + } + } + } + } + } + } + catch + { + } + return false; + } + + public static bool LeftEdgeCanBeAttachedTo(int i, int j) + { + try + { + Tile tile = Main.tile[i, j]; + if (tile == null) + return true; + if (tile.active()) + { + if (Main.tileSolid[(int) tile.type]) + { + if (!Main.tileSolidTop[(int) tile.type]) + { + if (!tile.leftSlope()) + { + if (!tile.halfBrick()) + { + if (!tile.inActive()) + { + if (!Main.tileNoAttach[(int) tile.type]) + return true; + } + } + } + } + } + } + } + catch + { + } + return false; + } + + public static bool BottomEdgeCanBeAttachedTo(int i, int j) + { + try + { + Tile tile = Main.tile[i, j]; + if (tile == null) + return true; + if (tile.active()) + { + if (Main.tileSolid[(int) tile.type]) + { + if (!Main.tileSolidTop[(int) tile.type]) + { + if (!tile.bottomSlope()) + { + if (!tile.inActive()) + { + if (!Main.tileNoAttach[(int) tile.type]) + return true; + } + } + } + } + } + } + catch + { + } + return false; + } + + public static bool SolidTile3(int i, int j) => WorldGen.InWorld(i, j, 1) && WorldGen.SolidTile3(Main.tile[i, j]); + + public static bool SolidTile3(Tile t) => t != null && t.active() && !t.inActive() && Main.tileSolid[(int) t.type] && !Main.tileSolidTop[(int) t.type]; + + public static bool SolidTile2(int i, int j) + { + try + { + if (Main.tile[i, j] == null) + return true; + if (Main.tile[i, j].active()) + { + if (Main.tileSolid[(int) Main.tile[i, j].type]) + { + if (!TileID.Sets.Platforms[(int) Main.tile[i, j].type] || !Main.tile[i, j].halfBrick() && !Main.tile[i, j].topSlope()) + { + if (Main.tile[i, j].slope() != (byte) 0) + goto label_10; + } + if (!Main.tile[i, j].halfBrick()) + { + if (!Main.tile[i, j].inActive()) + return true; + } + } + } + } + catch + { + } +label_10: + return false; + } + + public static bool SolidTileNoAttach(int i, int j) + { + try + { + if (Main.tile[i, j] == null) + return true; + if (Main.tile[i, j].active()) + { + if (Main.tileSolid[(int) Main.tile[i, j].type]) + { + if (!Main.tileNoAttach[(int) Main.tile[i, j].type]) + { + if (Main.tile[i, j].slope() == (byte) 0) + { + if (!Main.tile[i, j].halfBrick()) + { + if (!Main.tile[i, j].inActive()) + return true; + } + } + } + } + } + } + catch + { + } + return false; + } + + public static void MineHouse(int i, int j) + { + if (i < 50 || i > Main.maxTilesX - 50 || j < 50 || j > Main.maxTilesY - 50) + return; + int num1 = WorldGen.genRand.Next(6, 12); + int num2 = WorldGen.genRand.Next(3, 6); + int num3 = WorldGen.genRand.Next(15, 30); + int num4 = WorldGen.genRand.Next(15, 30); + if (WorldGen.SolidTile(i, j) || Main.tile[i, j].wall > (ushort) 0) + return; + int num5 = j - num1; + int num6 = j + num2; + for (int index1 = 0; index1 < 2; ++index1) + { + bool flag1 = true; + int i1 = i; + int j1 = j; + int num7 = -1; + int num8 = num3; + if (index1 == 1) + { + num7 = 1; + num8 = num4; + ++i1; + } + while (flag1) + { + if (j1 - num1 < num5) + num5 = j1 - num1; + if (j1 + num2 > num6) + num6 = j1 + num2; + for (int index2 = 0; index2 < 2; ++index2) + { + int j2 = j1; + bool flag2 = true; + int num9 = num1; + int num10 = -1; + if (index2 == 1) + { + ++j2; + num9 = num2; + num10 = 1; + } + while (flag2) + { + if (i1 != i && Main.tile[i1 - num7, j2].wall != (ushort) 27 && (WorldGen.SolidTile(i1 - num7, j2) || !Main.tile[i1 - num7, j2].active() || Main.tile[i1 - num7, j2].halfBrick() || Main.tile[i1 - num7, j2].slope() != (byte) 0)) + { + Main.tile[i1 - num7, j2].active(true); + Main.tile[i1 - num7, j2].type = (ushort) 30; + } + if (WorldGen.SolidTile(i1 - 1, j2) || Main.tile[i1 - 1, j2].halfBrick() || Main.tile[i1 - 1, j2].slope() != (byte) 0) + Main.tile[i1 - 1, j2].type = (ushort) 30; + if (WorldGen.SolidTile(i1 + 1, j2) || Main.tile[i1 + 1, j2].halfBrick() || Main.tile[i1 + 1, j2].slope() != (byte) 0) + Main.tile[i1 + 1, j2].type = (ushort) 30; + if (WorldGen.SolidTile(i1, j2) || Main.tile[i1, j2].halfBrick() || Main.tile[i1, j2].slope() != (byte) 0) + { + int num11 = 0; + if (WorldGen.SolidTile(i1 - 1, j2)) + ++num11; + if (WorldGen.SolidTile(i1 + 1, j2)) + ++num11; + if (WorldGen.SolidTile(i1, j2 - 1)) + ++num11; + if (WorldGen.SolidTile(i1, j2 + 1)) + ++num11; + if (num11 < 2) + { + Main.tile[i1, j2].active(false); + } + else + { + flag2 = false; + Main.tile[i1, j2].type = (ushort) 30; + } + } + else + { + Main.tile[i1, j2].wall = (ushort) 27; + Main.tile[i1, j2].liquid = (byte) 0; + Main.tile[i1, j2].lava(false); + } + j2 += num10; + --num9; + if (num9 <= 0) + { + if (!Main.tile[i1, j2].active()) + { + Main.tile[i1, j2].active(true); + Main.tile[i1, j2].type = (ushort) 30; + } + flag2 = false; + } + } + } + --num8; + i1 += num7; + if (WorldGen.SolidTile(i1, j1)) + { + int num12 = 0; + int num13 = 0; + int j3 = j1; + bool flag3 = true; + while (flag3) + { + --j3; + ++num12; + if (WorldGen.SolidTile(i1 - num7, j3)) + { + num12 = 999; + flag3 = false; + } + else if (!WorldGen.SolidTile(i1, j3)) + flag3 = false; + } + int j4 = j1; + bool flag4 = true; + while (flag4) + { + ++j4; + ++num13; + if (WorldGen.SolidTile(i1 - num7, j4)) + { + num13 = 999; + flag4 = false; + } + else if (!WorldGen.SolidTile(i1, j4)) + flag4 = false; + } + if (num13 <= num12) + { + if (num13 > num2) + num8 = 0; + else + j1 += num13 + 1; + } + else if (num12 > num1) + num8 = 0; + else + j1 -= num12 + 1; + } + if (num8 <= 0) + flag1 = false; + } + } + int minValue1 = i - num3 - 1; + int maxValue1 = i + num4 + 2; + int minValue2 = num5 - 1; + int maxValue2 = num6 + 2; + for (int i2 = minValue1; i2 < maxValue1; ++i2) + { + for (int j5 = minValue2; j5 < maxValue2; ++j5) + { + if (Main.tile[i2, j5].wall == (ushort) 27 && !Main.tile[i2, j5].active()) + { + if (Main.tile[i2 - 1, j5].wall != (ushort) 27 && i2 < i && !WorldGen.SolidTile(i2 - 1, j5)) + { + WorldGen.PlaceTile(i2, j5, 30, true); + Main.tile[i2, j5].wall = (ushort) 0; + } + if (Main.tile[i2 + 1, j5].wall != (ushort) 27 && i2 > i && !WorldGen.SolidTile(i2 + 1, j5)) + { + WorldGen.PlaceTile(i2, j5, 30, true); + Main.tile[i2, j5].wall = (ushort) 0; + } + for (int i3 = i2 - 1; i3 <= i2 + 1; ++i3) + { + for (int j6 = j5 - 1; j6 <= j5 + 1; ++j6) + { + if (WorldGen.SolidTile(i3, j6)) + Main.tile[i3, j6].type = (ushort) 30; + } + } + } + if (Main.tile[i2, j5].type == (ushort) 30 && Main.tile[i2 - 1, j5].wall == (ushort) 27 && Main.tile[i2 + 1, j5].wall == (ushort) 27 && (Main.tile[i2, j5 - 1].wall == (ushort) 27 || Main.tile[i2, j5 - 1].active()) && (Main.tile[i2, j5 + 1].wall == (ushort) 27 || Main.tile[i2, j5 + 1].active())) + { + Main.tile[i2, j5].active(false); + Main.tile[i2, j5].wall = (ushort) 27; + } + } + } + for (int index3 = minValue1; index3 < maxValue1; ++index3) + { + for (int index4 = minValue2; index4 < maxValue2; ++index4) + { + if (Main.tile[index3, index4].type == (ushort) 30) + { + if (Main.tile[index3 - 1, index4].wall == (ushort) 27 && Main.tile[index3 + 1, index4].wall == (ushort) 27 && !Main.tile[index3 - 1, index4].active() && !Main.tile[index3 + 1, index4].active()) + { + Main.tile[index3, index4].active(false); + Main.tile[index3, index4].wall = (ushort) 27; + } + if (!TileID.Sets.BasicChest[(int) Main.tile[index3, index4 - 1].type] && Main.tile[index3 - 1, index4].wall == (ushort) 27 && Main.tile[index3 + 1, index4].type == (ushort) 30 && Main.tile[index3 + 2, index4].wall == (ushort) 27 && !Main.tile[index3 - 1, index4].active() && !Main.tile[index3 + 2, index4].active()) + { + Main.tile[index3, index4].active(false); + Main.tile[index3, index4].wall = (ushort) 27; + Main.tile[index3 + 1, index4].active(false); + Main.tile[index3 + 1, index4].wall = (ushort) 27; + } + if (Main.tile[index3, index4 - 1].wall == (ushort) 27 && Main.tile[index3, index4 + 1].wall == (ushort) 27 && !Main.tile[index3, index4 - 1].active() && !Main.tile[index3, index4 + 1].active()) + { + Main.tile[index3, index4].active(false); + Main.tile[index3, index4].wall = (ushort) 27; + } + } + } + } + for (int i4 = minValue1; i4 < maxValue1; ++i4) + { + for (int j7 = maxValue2; j7 > minValue2; --j7) + { + bool flag5 = false; + if (Main.tile[i4, j7].active() && Main.tile[i4, j7].type == (ushort) 30) + { + int num14 = -1; + for (int index5 = 0; index5 < 2; ++index5) + { + if (!WorldGen.SolidTile(i4 + num14, j7) && Main.tile[i4 + num14, j7].wall == (ushort) 0) + { + int num15 = 0; + int j8 = j7; + int num16 = j7; + while (Main.tile[i4, j8].active() && Main.tile[i4, j8].type == (ushort) 30 && !WorldGen.SolidTile(i4 + num14, j8) && Main.tile[i4 + num14, j8].wall == (ushort) 0) + { + --j8; + ++num15; + } + int num17 = j8 + 1 + 1; + if (num15 > 4) + { + if (WorldGen.genRand.Next(2) == 0) + { + int j9 = num16 - 1; + bool flag6 = true; + for (int index6 = i4 - 2; index6 <= i4 + 2; ++index6) + { + for (int index7 = j9 - 2; index7 <= j9; ++index7) + { + if (index6 != i4 && Main.tile[index6, index7].active()) + flag6 = false; + } + } + if (flag6) + { + Main.tile[i4, j9].active(false); + Main.tile[i4, j9 - 1].active(false); + Main.tile[i4, j9 - 2].active(false); + WorldGen.PlaceTile(i4, j9, 10, true); + flag5 = true; + } + } + if (!flag5) + { + for (int index8 = num17; index8 < num16; ++index8) + Main.tile[i4, index8].type = (ushort) 124; + } + } + } + num14 = 1; + } + } + if (flag5) + break; + } + } + int num18 = WorldGen.genRand.Next(1, 2); + if (WorldGen.genRand.Next(4) == 0) + num18 = 0; + if (WorldGen.genRand.Next(6) == 0) + ++num18; + if (WorldGen.genRand.Next(10) == 0) + ++num18; + for (int index9 = 0; index9 < num18; ++index9) + { + int num19 = 0; + int index10 = WorldGen.genRand.Next(minValue1, maxValue1); + int index11; + for (index11 = WorldGen.genRand.Next(minValue2, maxValue2); !Main.wallHouse[(int) Main.tile[index10, index11].wall] || Main.tile[index10, index11].active(); index11 = WorldGen.genRand.Next(minValue2, maxValue2)) + { + ++num19; + if (num19 <= 1000) + index10 = WorldGen.genRand.Next(minValue1, maxValue1); + else + break; + } + if (num19 <= 1000) + { + for (int index12 = 0; index12 < 2; ++index12) + { + int index13 = index10; + int index14 = index10; + while (!Main.tile[index13, index11].active() && Main.wallHouse[(int) Main.tile[index13, index11].wall]) + --index13; + int num20 = index13 + 1; + while (!Main.tile[index14, index11].active() && Main.wallHouse[(int) Main.tile[index14, index11].wall]) + ++index14; + int num21 = index14 - 1; + i = (num20 + num21) / 2; + int index15 = index11; + int index16 = index11; + while (!Main.tile[index10, index15].active() && Main.wallHouse[(int) Main.tile[index10, index15].wall]) + --index15; + int num22 = index15 + 1; + while (!Main.tile[index10, index16].active() && Main.wallHouse[(int) Main.tile[index10, index16].wall]) + ++index16; + int num23 = index16 - 1; + index11 = (num22 + num23) / 2; + } + int index17 = index10; + int index18 = index10; + while (!Main.tile[index17, index11].active() && !Main.tile[index17, index11 - 1].active() && !Main.tile[index17, index11 + 1].active()) + --index17; + int num24 = index17 + 1; + while (!Main.tile[index18, index11].active() && !Main.tile[index18, index11 - 1].active() && !Main.tile[index18, index11 + 1].active()) + ++index18; + int num25 = index18 - 1; + int index19 = index11; + int index20 = index11; + while (!Main.tile[index10, index19].active() && !Main.tile[index10 - 1, index19].active() && !Main.tile[index10 + 1, index19].active()) + --index19; + int num26 = index19 + 1; + while (!Main.tile[index10, index20].active() && !Main.tile[index10 - 1, index20].active() && !Main.tile[index10 + 1, index20].active()) + ++index20; + int num27 = index20 - 1; + int num28 = (num24 + num25) / 2; + int num29 = (num26 + num27) / 2; + int num30 = num25 - num24; + int num31 = num27 - num26; + if (num30 > 7 && num31 > 5) + { + int num32 = 0; + if (WorldGen.nearPicture2(i, num29)) + num32 = -1; + if (num32 == 0) + { + Vector2 vector2 = WorldGen.randHousePicture(); + int x = (int) vector2.X; + int y = (int) vector2.Y; + if (!WorldGen.nearPicture(num28, num29)) + WorldGen.PlaceTile(num28, num29, x, true, style: y); + } + } + } + else + break; + } + for (int i5 = minValue1; i5 < maxValue1; i5 = i5 + WorldGen.genRand.Next(4) + 1) + { + bool flag = true; + for (int j10 = minValue2; j10 < maxValue2; ++j10) + { + for (int i6 = i5 - 3; i6 <= i5 + 3; ++i6) + { + if (Main.tile[i6, j10].active() && (!WorldGen.SolidTile(i6, j10) || Main.tile[i6, j10].type == (ushort) 10)) + flag = false; + } + } + if (flag) + { + for (int j11 = minValue2; j11 < maxValue2; ++j11) + { + if (Main.tile[i5, j11].wall == (ushort) 27 && !Main.tile[i5, j11].active()) + WorldGen.PlaceTile(i5, j11, 124, true); + } + } + } + for (int index21 = 0; index21 < 4; ++index21) + { + int i7 = WorldGen.genRand.Next(minValue1 + 2, maxValue1 - 1); + int index22; + for (index22 = WorldGen.genRand.Next(minValue2 + 2, maxValue2 - 1); Main.tile[i7, index22].wall != (ushort) 27; index22 = WorldGen.genRand.Next(minValue2 + 2, maxValue2 - 1)) + i7 = WorldGen.genRand.Next(minValue1 + 2, maxValue1 - 1); + while (Main.tile[i7, index22].active()) + --index22; + while (!Main.tile[i7, index22].active()) + ++index22; + int j12 = index22 - 1; + if (Main.tile[i7, j12].wall == (ushort) 27) + { + if (WorldGen.genRand.Next(3) == 0) + { + int Type = WorldGen.genRand.Next(9); + if (Type == 0) + Type = 14; + if (Type == 1) + Type = 16; + if (Type == 2) + Type = 18; + if (Type == 3) + Type = 86; + if (Type == 4) + Type = 87; + if (Type == 5) + Type = 94; + if (Type == 6) + Type = 101; + if (Type == 7) + Type = 104; + if (Type == 8) + Type = 106; + WorldGen.PlaceTile(i7, j12, Type, true); + } + else if (WorldGen.statueList != null) + { + int index23 = WorldGen.genRand.Next(2, WorldGen.statueList.Length); + WorldGen.PlaceTile(i7, j12, (int) WorldGen.statueList[index23].X, true, true, style: ((int) WorldGen.statueList[index23].Y)); + } + } + } + for (int index24 = 0; index24 < 40; ++index24) + { + int i8 = WorldGen.genRand.Next(minValue1 + 2, maxValue1 - 1); + int index25; + for (index25 = WorldGen.genRand.Next(minValue2 + 2, maxValue2 - 1); Main.tile[i8, index25].wall != (ushort) 27; index25 = WorldGen.genRand.Next(minValue2 + 2, maxValue2 - 1)) + i8 = WorldGen.genRand.Next(minValue1 + 2, maxValue1 - 1); + while (Main.tile[i8, index25].active()) + --index25; + while (!Main.tile[i8, index25].active()) + ++index25; + int j13 = index25 - 1; + if (Main.tile[i8, j13].wall == (ushort) 27 && WorldGen.genRand.Next(2) == 0) + { + int style = WorldGen.genRand.Next(22, 26); + WorldGen.PlaceTile(i8, j13, 186, true, style: style); + } + } + for (int index26 = 0; index26 < 20; ++index26) + { + int i9 = WorldGen.genRand.Next(minValue1 + 2, maxValue1 - 1); + int index27; + for (index27 = WorldGen.genRand.Next(minValue2 + 2, maxValue2 - 1); Main.tile[i9, index27].wall != (ushort) 27; index27 = WorldGen.genRand.Next(minValue2 + 2, maxValue2 - 1)) + i9 = WorldGen.genRand.Next(minValue1 + 2, maxValue1 - 1); + while (Main.tile[i9, index27].active()) + --index27; + while (!Main.tile[i9, index27].active()) + ++index27; + int j14 = index27 - 1; + if (Main.tile[i9, j14].wall == (ushort) 27 && WorldGen.genRand.Next(2) == 0) + { + int X = WorldGen.genRand.Next(31, 34); + WorldGen.PlaceSmallPile(i9, j14, X, 1); + } + } + for (int index28 = 0; index28 < 15; ++index28) + { + int i10 = WorldGen.genRand.Next(minValue1 + 2, maxValue1 - 1); + int j15; + for (j15 = WorldGen.genRand.Next(minValue2 + 2, maxValue2 - 1); Main.tile[i10, j15].wall != (ushort) 27; j15 = WorldGen.genRand.Next(minValue2 + 2, maxValue2 - 1)) + i10 = WorldGen.genRand.Next(minValue1 + 2, maxValue1 - 1); + while (Main.tile[i10, j15].active()) + --j15; + while (j15 > 0 && !Main.tile[i10, j15 - 1].active()) + --j15; + if (Main.tile[i10, j15].wall == (ushort) 27) + { + int style = 0; + int Type; + if (WorldGen.genRand.Next(10) < 9) + { + Type = -1; + } + else + { + Type = 34; + style = WorldGen.genRand.Next(6); + } + if (Type > 0) + { + WorldGen.PlaceTile(i10, j15, Type, true, style: style); + if ((int) Main.tile[i10, j15].type == Type) + { + if (Type == 4) + { + Main.tile[i10, j15].frameX += (short) 54; + } + else + { + int index29 = i10; + int index30 = j15; + int index31 = index30 - (int) Main.tile[index29, index30].frameY % 54 / 18; + int num33 = (int) Main.tile[index29, index30].frameX / 18; + if (num33 > 2) + num33 -= 3; + int index32 = index29 - num33; + short num34 = 54; + if (Main.tile[index32, index31].frameX > (short) 0) + num34 = (short) -54; + for (int index33 = index32; index33 < index32 + 3; ++index33) + { + for (int index34 = index31; index34 < index31 + 3; ++index34) + Main.tile[index33, index34].frameX += num34; + } + } + } + } + } + } + } + + public static void CountTiles(int X) + { + if (X == 0) + { + WorldGen.totalEvil = WorldGen.totalEvil2; + WorldGen.totalBlood = WorldGen.totalBlood2; + WorldGen.totalSolid = WorldGen.totalSolid2; + WorldGen.totalGood = WorldGen.totalGood2; + WorldGen.tGood = (byte) Math.Round((double) WorldGen.totalGood / (double) WorldGen.totalSolid * 100.0); + WorldGen.tEvil = (byte) Math.Round((double) WorldGen.totalEvil / (double) WorldGen.totalSolid * 100.0); + WorldGen.tBlood = (byte) Math.Round((double) WorldGen.totalBlood / (double) WorldGen.totalSolid * 100.0); + if (WorldGen.tGood == (byte) 0 && WorldGen.totalGood > 0) + WorldGen.tGood = (byte) 1; + if (WorldGen.tEvil == (byte) 0 && WorldGen.totalEvil > 0) + WorldGen.tEvil = (byte) 1; + if (WorldGen.tBlood == (byte) 0 && WorldGen.totalBlood > 0) + WorldGen.tBlood = (byte) 1; + if (Main.netMode == 2) + NetMessage.SendData(57); + WorldGen.totalEvil2 = 0; + WorldGen.totalSolid2 = 0; + WorldGen.totalGood2 = 0; + WorldGen.totalBlood2 = 0; + } + ushort num1 = 0; + int num2 = 0; + int num3 = 0; + int num4 = 0; + do + { + int num5; + int num6; + if (num3 == 0) + { + num5 = 0; + num4 = (int) (Main.worldSurface + 1.0); + num6 = 5; + } + else + { + num5 = num4; + num4 = Main.maxTilesY; + num6 = 1; + } + for (int index = num5; index < num4; ++index) + { + Tile tile = Main.tile[X, index] ?? (Main.tile[X, index] = new Tile()); + ushort type = tile.type; + if (type != (ushort) 0 || tile.active()) + { + if ((int) type == (int) num1) + { + num2 += num6; + } + else + { + WorldGen.tileCounts[(int) num1] += num2; + num1 = type; + num2 = num6; + } + } + } + WorldGen.tileCounts[(int) num1] += num2; + num2 = 0; + ++num3; + } + while (num3 < 2); + WorldGen.AddUpAlignmentCounts(); + } + + public static void AddUpAlignmentCounts(bool clearCounts = false) + { + if (clearCounts) + { + WorldGen.totalEvil2 = 0; + WorldGen.totalSolid2 = 0; + WorldGen.totalGood2 = 0; + WorldGen.totalBlood2 = 0; + } + WorldGen.totalGood2 += WorldGen.tileCounts[164] + WorldGen.tileCounts[109] + WorldGen.tileCounts[117] + WorldGen.tileCounts[116]; + WorldGen.totalEvil2 += WorldGen.tileCounts[23] + WorldGen.tileCounts[163] + WorldGen.tileCounts[112] + WorldGen.tileCounts[25]; + WorldGen.totalBlood2 += WorldGen.tileCounts[199] + WorldGen.tileCounts[234] + WorldGen.tileCounts[203] + WorldGen.tileCounts[200]; + WorldGen.totalSolid2 += WorldGen.tileCounts[2] + WorldGen.tileCounts[477] + WorldGen.tileCounts[1] + WorldGen.tileCounts[60] + WorldGen.tileCounts[53] + WorldGen.tileCounts[161]; + WorldGen.totalSolid2 += WorldGen.tileCounts[164] + WorldGen.tileCounts[109] + WorldGen.tileCounts[492] + WorldGen.tileCounts[117] + WorldGen.tileCounts[116]; + WorldGen.totalSolid2 += WorldGen.tileCounts[23] + WorldGen.tileCounts[163] + WorldGen.tileCounts[112] + WorldGen.tileCounts[25]; + WorldGen.totalSolid2 += WorldGen.tileCounts[199] + WorldGen.tileCounts[234] + WorldGen.tileCounts[203] + WorldGen.tileCounts[200]; + Array.Clear((Array) WorldGen.tileCounts, 0, WorldGen.tileCounts.Length); + } + + public static void plantDye(int i, int j, bool exoticPlant = false) + { + UnifiedRandom unifiedRandom = WorldGen.gen ? WorldGen.genRand : Main.rand; + if (!Main.tile[i, j].active() || i < 95 || i > Main.maxTilesX - 95 || j < 95 || j > Main.maxTilesY - 95) + return; + int num1 = 90; + if (exoticPlant) + num1 = 240; + if ((double) j < Main.worldSurface) + { + if (Main.tile[i, j - 1].active() && Main.tile[i, j - 1].type != (ushort) 3 && Main.tile[i, j - 1].type != (ushort) 51 && Main.tile[i, j - 1].type != (ushort) 61 && Main.tile[i, j - 1].type != (ushort) 73 && Main.tile[i, j - 1].type != (ushort) 74 && Main.tile[i, j - 1].type != (ushort) 184) + return; + int num2 = Utils.Clamp(i - num1, 1, Main.maxTilesX - 1 - 1); + int num3 = Utils.Clamp(i + num1, 1, Main.maxTilesX - 1 - 1); + int num4 = Utils.Clamp(j - num1, 1, Main.maxTilesY - 1 - 1); + int num5 = Utils.Clamp(j + num1, 1, Main.maxTilesY - 1 - 1); + for (int index1 = num2; index1 < num3; ++index1) + { + for (int index2 = num4; index2 < num5; ++index2) + { + if (Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 227 && (!exoticPlant || Main.tile[index1, index2].frameX >= (short) 272) && (exoticPlant || Main.tile[index1, index2].frameX < (short) 272)) + return; + } + } + if (exoticPlant) + { + int type = (int) Main.tile[i, j].type; + bool flag = TileID.Sets.Conversion.Grass[type] || TileID.Sets.Conversion.Moss[type] || type == 0; + if (Main.tile[i, j - 1].liquid > (byte) 0 && Main.tile[i, j - 1].lava()) + flag = false; + if (!flag) + return; + WorldGen.PlaceTile(i, j - 1, 227, true, style: WorldGen.genRand.Next(8, 12)); + } + else if (Main.tile[i, j].type == (ushort) 2 || Main.tile[i, j].type == (ushort) 109) + { + if (unifiedRandom.Next(4) == 0) + WorldGen.PlaceTile(i, j - 1, 227, true, style: 4); + else + WorldGen.PlaceTile(i, j - 1, 227, true, style: 3); + } + else if (Main.tile[i, j].type == (ushort) 60) + { + if (unifiedRandom.Next(2) == 0) + WorldGen.PlaceTile(i, j - 1, 227, true, style: 2); + else + WorldGen.PlaceTile(i, j - 1, 227, true, style: 4); + } + else if (Main.tile[i, j].type == (ushort) 53 && Main.tile[i, j - 1].liquid == byte.MaxValue && Main.tile[i, j - 2].liquid == byte.MaxValue) + { + WorldGen.PlaceTile(i, j - 1, 227, true, style: 2); + } + else + { + if (Main.tile[i, j].type != (ushort) 80 || Main.tile[i - 1, j - 1].active()) + return; + if (Main.tile[i + 1, j - 1].active()) + return; + try + { + bool flag = true; + for (int index3 = i - 5; index3 <= i + 5; ++index3) + { + for (int index4 = j - 5; index4 <= j + 15; ++index4) + { + if (Main.tile[index3, index4].active() && (Main.tile[index3, index4].type == (ushort) 112 || Main.tile[index3, index4].type == (ushort) 234)) + flag = false; + } + } + if (!flag) + return; + WorldGen.PlaceTile(i, j - 1, 227, true, style: 6); + } + catch + { + } + } + } + else + { + if (j >= Main.UnderworldLayer) + return; + if (!Main.tile[i, j - 1].active() || Main.tile[i, j - 1].type == (ushort) 3 || Main.tile[i, j - 1].type == (ushort) 51 || Main.tile[i, j - 1].type == (ushort) 61 || Main.tile[i, j - 1].type == (ushort) 73 || Main.tile[i, j - 1].type == (ushort) 74 || Main.tile[i, j - 1].type == (ushort) 184) + { + int num6 = Utils.Clamp(i - num1, 1, Main.maxTilesX - 1 - 1); + int num7 = Utils.Clamp(i + num1, 1, Main.maxTilesX - 1 - 1); + int num8 = Utils.Clamp(j - num1, 1, Main.maxTilesY - 1 - 1); + int num9 = Utils.Clamp(j + num1, 1, Main.maxTilesY - 1 - 1); + for (int index5 = num6; index5 < num7; ++index5) + { + for (int index6 = num8; index6 < num9; ++index6) + { + if (Main.tile[index5, index6].active() && Main.tile[index5, index6].type == (ushort) 227 && (!exoticPlant || Main.tile[index5, index6].frameX >= (short) 272) && (exoticPlant || Main.tile[index5, index6].frameX < (short) 272)) + return; + } + } + if (exoticPlant) + { + int type = (int) Main.tile[i, j].type; + if ((TileID.Sets.Conversion.Grass[type] || TileID.Sets.Conversion.Moss[type] ? 1 : (type == 0 ? 1 : 0)) != 0) + WorldGen.PlaceTile(i, j - 1, 227, true, style: WorldGen.genRand.Next(8, 12)); + } + else if (Main.tile[i, j].type == (ushort) 60) + { + if (unifiedRandom.Next(2) == 0) + WorldGen.PlaceTile(i, j - 1, 227, true, style: 2); + else if (unifiedRandom.Next(2) == 0) + WorldGen.PlaceTile(i, j - 1, 227, true); + else + WorldGen.PlaceTile(i, j - 1, 227, true, style: 1); + } + else if (Main.tile[i, j].type == (ushort) 0 || Main.tile[i, j].type == (ushort) 1 || Main.tile[i, j].type == (ushort) 59) + { + if (unifiedRandom.Next(2) == 0) + WorldGen.PlaceTile(i, j - 1, 227, true); + else + WorldGen.PlaceTile(i, j - 1, 227, true, style: 1); + } + else if (Main.tile[i, j - 1].liquid == byte.MaxValue && Main.tile[i, j - 2].liquid == byte.MaxValue) + WorldGen.PlaceTile(i, j - 1, 227, true, style: 5); + } + if (Main.tile[i, j + 1].active() || exoticPlant) + return; + for (int index7 = i - num1; index7 < i + num1; ++index7) + { + for (int index8 = j - num1; index8 < j + num1; ++index8) + { + if (Main.tile[index7, index8].active() && Main.tile[index7, index8].type == (ushort) 227) + return; + } + } + if (Main.tile[i, j].type != (ushort) 0) + return; + WorldGen.PlaceTile(i, j + 1, 227, true, style: 7); + } + } + + private static int MossConversion(int thisType, int otherType) + { + if (TileID.Sets.tileMossBrick[thisType] && otherType == 38 || Main.tileMoss[thisType] && otherType == 1) + return thisType; + switch (thisType) + { + case 179: + return 512; + case 180: + return 513; + case 181: + return 514; + case 182: + return 515; + case 183: + return 516; + case 381: + return 517; + case 512: + return 179; + case 513: + return 180; + case 514: + return 181; + case 515: + return 182; + case 516: + return 183; + case 517: + return 381; + case 534: + return 535; + case 535: + return 534; + case 536: + return 537; + case 537: + return 536; + case 539: + return 540; + case 540: + return 539; + default: + return 0; + } + } + + public static void UpdateWorld() + { + if (WorldGen.gen) + return; + WorldGen.AllowedToSpreadInfections = true; + CreativePowers.StopBiomeSpreadPower power = CreativePowerManager.Instance.GetPower(); + if (power != null && power.GetIsUnlocked()) + WorldGen.AllowedToSpreadInfections = !power.Enabled; + int wallDist = 3; + Wiring.UpdateMech(); + TileEntity.UpdateStart(); + foreach (TileEntity tileEntity in TileEntity.ByID.Values) + tileEntity.Update(); + TileEntity.UpdateEnd(); + WorldGen.UpdateLunarApocalypse(); + if (Main.netMode != 1) + { + ++WorldGen.totalD; + if (WorldGen.totalD >= 30) + { + WorldGen.totalD = 0; + WorldGen.CountTiles(WorldGen.totalX); + ++WorldGen.totalX; + if (WorldGen.totalX >= Main.maxTilesX) + WorldGen.totalX = 0; + } + } + ++Liquid.skipCount; + if (Liquid.skipCount > 1) + { + Liquid.UpdateLiquid(); + Liquid.skipCount = 0; + } + int worldUpdateRate = WorldGen.GetWorldUpdateRate(); + if (worldUpdateRate == 0) + return; + float num1 = 3E-05f * (float) worldUpdateRate; + float num2 = 1.5E-05f * (float) worldUpdateRate; + bool checkNPCSpawns = false; + ++WorldGen.spawnDelay; + if (Main.invasionType > 0 || Main.eclipse) + WorldGen.spawnDelay = 0; + if (WorldGen.spawnDelay >= 20) + { + checkNPCSpawns = true; + WorldGen.spawnDelay = 0; + if (WorldGen.prioritizedTownNPCType != 37) + { + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active && Main.npc[index].homeless && Main.npc[index].townNPC && Main.npc[index].type != 368) + { + WorldGen.prioritizedTownNPCType = Main.npc[index].type; + break; + } + } + } + } + float num3 = (float) (Main.maxTilesX * Main.maxTilesY) * num1; + int num4 = 151; + int num5 = (int) MathHelper.Lerp((float) num4, (float) num4 * 2.8f, MathHelper.Clamp((float) ((double) Main.maxTilesX / 4200.0 - 1.0), 0.0f, 1f)); + for (int index = 0; (double) index < (double) num3; ++index) + { + if (Main.rand.Next(num5 * 100) == 0) + WorldGen.PlantAlch(); + WorldGen.UpdateWorld_OvergroundTile(WorldGen.genRand.Next(10, Main.maxTilesX - 10), WorldGen.genRand.Next(10, (int) Main.worldSurface - 1), checkNPCSpawns, wallDist); + } + for (int index = 0; (double) index < (double) (Main.maxTilesX * Main.maxTilesY) * (double) num2; ++index) + WorldGen.UpdateWorld_UndergroundTile(WorldGen.genRand.Next(10, Main.maxTilesX - 10), WorldGen.genRand.Next((int) Main.worldSurface - 1, Main.maxTilesY - 20), checkNPCSpawns, wallDist); + if (Main.dayTime) + return; + for (int index = 0; index < Main.dayRate; ++index) + { + float num6 = (float) (Main.maxTilesX / 4200) * Star.starfallBoost; + if ((double) Main.rand.Next(8000) < 10.0 * (double) num6) + { + int num7 = 12; + Vector2 Position = new Vector2((float) ((Main.rand.Next(Main.maxTilesX - 50) + 100) * 16), (float) (Main.rand.Next((int) ((double) Main.maxTilesY * 0.05)) * 16)); + int num8 = -1; + if (Main.expertMode && Main.rand.Next(15) == 0) + { + int closest = (int) Player.FindClosest(Position, 1, 1); + if ((double) Main.player[closest].position.Y < Main.worldSurface * 16.0 && Main.player[closest].afkCounter < 3600) + { + int num9 = Main.rand.Next(1, 640); + Position.X = Main.player[closest].position.X + (float) Main.rand.Next(-num9, num9 + 1); + num8 = closest; + } + } + if (!Collision.SolidCollision(Position, 16, 16)) + { + float num10 = (float) Main.rand.Next(-100, 101); + float num11 = (float) (Main.rand.Next(200) + 100); + float num12 = (float) Math.Sqrt((double) num10 * (double) num10 + (double) num11 * (double) num11); + float num13 = (float) num7 / num12; + float SpeedX = num10 * num13; + float SpeedY = num11 * num13; + Projectile.NewProjectile(Position.X, Position.Y, SpeedX, SpeedY, 720, 0, 0.0f, Main.myPlayer, ai1: ((float) num8)); + } + } + } + } + + public static int GetWorldUpdateRate() + { + int num = Math.Min(Main.desiredWorldTilesUpdateRate, 24); + if (CreativePowerManager.Instance.GetPower().Enabled) + num = 0; + return num; + } + + private static void UpdateWorld_OvergroundTile( + int i, + int j, + bool checkNPCSpawns, + int wallDist) + { + int minI = i - 1; + int maxI = i + 2; + int index1 = j - 1; + int maxJ = j + 2; + if (minI < 10) + minI = 10; + if (maxI > Main.maxTilesX - 10) + maxI = Main.maxTilesX - 10; + if (index1 < 10) + index1 = 10; + if (maxJ > Main.maxTilesY - 10) + maxJ = Main.maxTilesY - 10; + if (Main.tile[i, j] == null) + return; + if (Main.tileAlch[(int) Main.tile[i, j].type]) + WorldGen.GrowAlch(i, j); + else if ((double) j < Main.worldSurface + 10.0 && (i < WorldGen.beachDistance || i > Main.maxTilesX - WorldGen.beachDistance) && !Main.tile[i, j].nactive()) + { + int maxValue = 3000 - (int) ((double) Math.Abs(Main.windSpeedCurrent) * 1250.0); + if (Main.raining) + maxValue -= (int) (1250.0 * (double) Main.maxRaining); + if (maxValue < 300) + maxValue = 300; + if (WorldGen.genRand.Next(maxValue) == 0) + { + int j1 = j; + while ((double) j1 < Main.worldSurface + 10.0 && !Main.tile[i, j1].nactive() && j1 - j < 15) + ++j1; + if (Main.tile[i, j1].nactive() && Main.tile[i, j1].type == (ushort) 53 && WorldGen.SolidTileAllowBottomSlope(i, j1)) + { + int index2 = j1 - 1; + int num1 = WorldGen.genRand.Next(2, 5); + int num2 = WorldGen.genRand.Next(8, 11); + int num3 = 0; + for (int index3 = i - num2; index3 <= i + num2; ++index3) + { + for (int index4 = index2 - num2; index4 <= index2 + num2; ++index4) + { + if (Main.tile[index3, index4].active() && (Main.tile[index3, index4].type == (ushort) 324 || Main.tile[index3, index4].type == (ushort) 81)) + ++num3; + } + } + if (num3 < num1) + { + if (WorldGen.genRand.Next(2) == 0 && Main.tile[i, index2].liquid >= (byte) 230) + { + WorldGen.PlaceTile(i, index2, 81); + if (Main.netMode == 2 && Main.tile[i, index2].active()) + NetMessage.SendTileSquare(-1, i, index2, 3); + } + else + { + WorldGen.PlaceTile(i, index2, 324, style: WorldGen.RollRandomSeaShellStyle()); + if (Main.netMode == 2 && Main.tile[i, index2].active()) + NetMessage.SendTileSquare(-1, i, index2, 3); + } + } + } + } + } + if ((Main.tile[i, j].type == (ushort) 596 || Main.tile[i, j].type == (ushort) 616 || Main.tile[i, j].type == (ushort) 595 || Main.tile[i, j].type == (ushort) 615) && (Main.tile[i, j + 1].type == (ushort) 199 || Main.tile[i, j + 1].type == (ushort) 23)) + { + WorldGen.KillTile(i, j); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, i, j, 4); + } + if ((Main.tile[i, j].type == (ushort) 571 || Main.tile[i, j].type == (ushort) 60 && Main.tile[i, j - 1].liquid > (byte) 0) && WorldGen.genRand.Next(5) == 0 && (!Main.tile[i, j - 1].active() || Main.tile[i, j - 1].type == (ushort) 61 || Main.tile[i, j - 1].type == (ushort) 74 || Main.tile[i, j - 1].type == (ushort) 518) && (Main.tile[i, j].type != (ushort) 60 || WorldGen.genRand.Next(30) == 0) && WorldGen.PlaceBamboo(i, j - 1)) + NetMessage.SendTileSquare(-1, i, j, 3); + if (Main.tile[i, j].type == (ushort) 518) + { + if (Main.tile[i, j].liquid == (byte) 0 || (int) Main.tile[i, j].liquid / 16 >= 9 && WorldGen.SolidTile(i, j - 1) || Main.tile[i, j - 1].liquid > (byte) 0 && Main.tile[i, j - 1].active()) + { + WorldGen.KillTile(i, j); + if (Main.netMode == 2) + NetMessage.SendData(17, number2: ((float) i), number3: ((float) j)); + } + else + WorldGen.CheckLilyPad(i, j); + } + else if (Main.tile[i, j].type == (ushort) 519) + { + WorldGen.CheckCatTail(i, j); + if (Main.tile[i, j].active() && WorldGen.genRand.Next(8) == 0) + { + WorldGen.GrowCatTail(i, j); + WorldGen.CheckCatTail(i, j); + } + } + else if (Main.tile[i, j].liquid > (byte) 32) + { + if (Main.tile[i, j].active()) + { + if (TileID.Sets.SlowlyDiesInWater[(int) Main.tile[i, j].type]) + { + WorldGen.KillTile(i, j); + if (Main.netMode == 2) + NetMessage.SendData(17, number2: ((float) i), number3: ((float) j)); + } + else if (Main.tile[i, j].type == (ushort) 60) + WorldGen.UpdateWorld_GrassGrowth(i, j, minI, maxI, index1, maxJ, false); + } + else if (WorldGen.genRand.Next(600) == 0) + { + WorldGen.PlaceTile(i, j, 518, true); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, i, j, 3); + } + else if (WorldGen.genRand.Next(600) == 0) + { + WorldGen.PlaceTile(i, j, 519, true); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, i, j, 3); + } + } + else if (Main.tile[i, j].nactive()) + { + WorldGen.hardUpdateWorld(i, j); + if (Main.rand.Next(3000) == 0) + WorldGen.plantDye(i, j); + else if (Main.hardMode && ((double) i < (double) Main.maxTilesX * 0.4 || (double) i > (double) Main.maxTilesX * 0.6) && Main.rand.Next(15000) == 0) + WorldGen.plantDye(i, j, true); + if (Main.tile[i, j].type == (ushort) 80) + { + if (WorldGen.genRand.Next(15) == 0) + WorldGen.GrowCactus(i, j); + } + else if (Main.tile[i, j].type == (ushort) 529) + { + if (WorldGen.CheckSeaOat(i, j) && WorldGen.genRand.Next(20) == 0) + WorldGen.GrowSeaOat(i, j); + } + else if (TileID.Sets.Conversion.Sand[(int) Main.tile[i, j].type]) + { + if (!Main.tile[i, index1].active()) + { + if (WorldGen.genRand.Next(25) == 0) + { + WorldGen.PlaceOasisPlant(i, index1); + if (Main.tile[i, index1].type == (ushort) 530 && Main.netMode == 2) + NetMessage.SendTileSquare(-1, i, index1, 4); + } + if (WorldGen.genRand.Next(20) != 0 || !WorldGen.PlantSeaOat(i, index1)) + { + if (i < WorldGen.oceanDistance || i > Main.maxTilesX - WorldGen.oceanDistance) + { + if (WorldGen.genRand.Next(500) == 0) + { + int num4 = 7; + int num5 = 6; + int num6 = 0; + for (int index5 = i - num4; index5 <= i + num4; ++index5) + { + for (int index6 = index1 - num4; index6 <= index1 + num4; ++index6) + { + if (Main.tile[index5, index6].active() && Main.tile[index5, index6].type == (ushort) 81) + ++num6; + } + } + if (num6 < num5 && Main.tile[i, index1].liquid == byte.MaxValue && Main.tile[i, index1 - 1].liquid == byte.MaxValue && Main.tile[i, index1 - 2].liquid == byte.MaxValue && Main.tile[i, index1 - 3].liquid == byte.MaxValue && Main.tile[i, index1 - 4].liquid == byte.MaxValue) + { + WorldGen.PlaceTile(i, index1, 81, true); + if (Main.netMode == 2 && Main.tile[i, index1].active()) + NetMessage.SendTileSquare(-1, i, index1, 1); + } + } + } + else if (i > WorldGen.beachDistance + 20 && i < Main.maxTilesX - WorldGen.beachDistance - 20 && WorldGen.genRand.Next(300) == 0) + WorldGen.GrowCactus(i, j); + } + } + } + else if (Main.tile[i, j].type == (ushort) 530) + { + if (!WorldGen.OasisPlantWaterCheck(i, j, true)) + { + WorldGen.KillTile(i, j); + if (Main.netMode == 2) + NetMessage.SendData(17, number2: ((float) i), number3: ((float) j)); + } + } + else if (Main.tile[i, j].type == (ushort) 147 || Main.tile[i, j].type == (ushort) 161 || Main.tile[i, j].type == (ushort) 163 || Main.tile[i, j].type == (ushort) 164 || Main.tile[i, j].type == (ushort) 200) + { + if (Main.rand.Next(10) == 0 && !Main.tile[i, j + 1].active() && !Main.tile[i, j + 2].active()) + { + int num7 = i - 3; + int num8 = i + 4; + int num9 = 0; + for (int index7 = num7; index7 < num8; ++index7) + { + if (Main.tile[index7, j].type == (ushort) 165 && Main.tile[index7, j].active()) + ++num9; + if (Main.tile[index7, j + 1].type == (ushort) 165 && Main.tile[index7, j + 1].active()) + ++num9; + if (Main.tile[index7, j + 2].type == (ushort) 165 && Main.tile[index7, j + 2].active()) + ++num9; + if (Main.tile[index7, j + 3].type == (ushort) 165 && Main.tile[index7, j + 3].active()) + ++num9; + } + if (num9 < 2) + { + WorldGen.PlaceTight(i, j + 1); + WorldGen.SquareTileFrame(i, j + 1); + if (Main.netMode == 2 && Main.tile[i, j + 1].active()) + NetMessage.SendTileSquare(-1, i, j + 1, 3); + } + } + } + else if (Main.tile[i, j].type == (ushort) 254) + { + if (Main.rand.Next(((int) Main.tile[i, j].frameX + 10) / 10) == 0) + WorldGen.GrowPumpkin(i, j, 254); + } + else if (Main.tile[i, j].type == (ushort) 78 || Main.tile[i, j].type == (ushort) 380 || Main.tile[i, j].type == (ushort) 579) + { + if (!Main.tile[i, index1].active() && WorldGen.genRand.Next(2) == 0) + { + WorldGen.PlaceTile(i, index1, 3, true); + if (Main.netMode == 2 && Main.tile[i, index1].active()) + NetMessage.SendTileSquare(-1, i, index1, 1); + } + } + else if (TileID.Sets.SpreadOverground[(int) Main.tile[i, j].type]) + WorldGen.UpdateWorld_GrassGrowth(i, j, minI, maxI, index1, maxJ, false); + else if (Main.tileMoss[(int) Main.tile[i, j].type] || TileID.Sets.tileMossBrick[(int) Main.tile[i, j].type]) + { + if ((double) WorldGen.genRand.NextFloat() < 0.5) + { + int type1 = (int) Main.tile[i, j].type; + bool flag = false; + for (int i1 = minI; i1 < maxI; ++i1) + { + for (int j2 = index1; j2 < maxJ; ++j2) + { + if ((i != i1 || j != j2) && Main.tile[i1, j2].active() && (Main.tile[i1, j2].type == (ushort) 1 || Main.tile[i1, j2].type == (ushort) 38)) + { + int type2 = (int) Main.tile[i1, j2].type; + WorldGen.SpreadGrass(i1, j2, (int) Main.tile[i1, j2].type, WorldGen.MossConversion(type1, type2), false, Main.tile[i, j].color()); + if ((int) Main.tile[i1, j2].type == type1) + { + WorldGen.SquareTileFrame(i1, j2); + flag = true; + } + } + } + } + if (Main.netMode == 2 & flag) + NetMessage.SendTileSquare(-1, i, j, 3); + if (WorldGen.genRand.Next(6) == 0) + { + int index8 = i; + int index9 = j; + switch (WorldGen.genRand.Next(4)) + { + case 0: + --index8; + break; + case 1: + ++index8; + break; + case 2: + --index9; + break; + default: + ++index9; + break; + } + if (!Main.tile[index8, index9].active()) + { + if (WorldGen.PlaceTile(index8, index9, 184, true)) + Main.tile[index8, index9].color(Main.tile[i, j].color()); + if (Main.netMode == 2 && Main.tile[index8, index9].active()) + NetMessage.SendTileSquare(-1, index8, index9, 1); + } + } + } + } + else if (Main.tile[i, j].type == (ushort) 20) + { + if (WorldGen.genRand.Next(20) == 0) + { + bool flag = WorldGen.PlayerLOS(i, j); + if ((Main.tile[i, j].frameX < (short) 324 || Main.tile[i, j].frameX >= (short) 540 ? WorldGen.GrowTree(i, j) : WorldGen.GrowPalmTree(i, j)) & flag) + WorldGen.TreeGrowFXCheck(i, j); + } + } + else if (Main.tile[i, j].type == (ushort) 595) + { + if (WorldGen.genRand.Next(5) == 0) + { + int num = (int) Main.tile[i, j].frameX / 54; + int treeTileType = 596; + if (num == 0) + treeTileType = 596; + if (WorldGen.TryGrowingTreeByType(treeTileType, i, j) && WorldGen.PlayerLOS(i, j)) + WorldGen.TreeGrowFXCheck(i, j); + } + } + else if (Main.tile[i, j].type == (ushort) 615) + { + if (WorldGen.genRand.Next(5) == 0) + { + int num = (int) Main.tile[i, j].frameX / 54; + int treeTileType = 616; + if (num == 0) + treeTileType = 616; + if (WorldGen.TryGrowingTreeByType(treeTileType, i, j) && WorldGen.PlayerLOS(i, j)) + WorldGen.TreeGrowFXCheck(i, j); + } + } + else if (Main.tile[i, j].type == (ushort) 3 && WorldGen.genRand.Next(20) == 0) + { + if (Main.tile[i, j].frameX != (short) 144) + { + Main.tile[i, j].type = (ushort) 73; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, i, j, 3); + } + } + else if (Main.tile[i, j].type == (ushort) 110 && WorldGen.genRand.Next(20) == 0) + { + if (Main.tile[i, j].frameX < (short) 144) + { + Main.tile[i, j].type = (ushort) 113; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, i, j, 3); + } + } + else if (Main.tile[i, j].type == (ushort) 32 && WorldGen.genRand.Next(3) == 0) + WorldGen.GrowSpike(i, j, (ushort) 32, (ushort) 23); + else if (Main.tile[i, j].type == (ushort) 352 && WorldGen.genRand.Next(3) == 0) + WorldGen.GrowSpike(i, j, (ushort) 352, (ushort) 199); + } + else if (checkNPCSpawns) + WorldGen.TrySpawningTownNPC(i, j); + if (WorldGen.AllowedToSpreadInfections) + { + if (Main.tile[i, j].wall == (ushort) 81 || Main.tile[i, j].wall == (ushort) 83 || Main.tile[i, j].type == (ushort) 199 && Main.tile[i, j].active()) + { + int tileX = i + WorldGen.genRand.Next(-2, 3); + int tileY = j + WorldGen.genRand.Next(-2, 3); + if (Main.tile[tileX, tileY].wall >= (ushort) 63 && Main.tile[tileX, tileY].wall <= (ushort) 68) + { + bool flag = false; +label_187: + for (int index10 = i - wallDist; index10 < i + wallDist; ++index10) + { + for (int index11 = j - wallDist; index11 < j + wallDist; ++index11) + { + if (Main.tile[i, j].active()) + { + switch (Main.tile[i, j].type) + { + case 199: + case 200: + case 201: + case 203: + case 205: + case 234: + case 352: + flag = true; + goto label_187; + default: + continue; + } + } + } + } + if (flag) + { + Main.tile[tileX, tileY].wall = (ushort) 81; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, tileX, tileY, 3); + } + } + } + else if (Main.tile[i, j].wall == (ushort) 69 || Main.tile[i, j].wall == (ushort) 3 || Main.tile[i, j].type == (ushort) 23 && Main.tile[i, j].active()) + { + int tileX = i + WorldGen.genRand.Next(-2, 3); + int tileY = j + WorldGen.genRand.Next(-2, 3); + if (Main.tile[tileX, tileY].wall >= (ushort) 63 && Main.tile[tileX, tileY].wall <= (ushort) 68) + { + bool flag = false; +label_201: + for (int index12 = i - wallDist; index12 < i + wallDist; ++index12) + { + for (int index13 = j - wallDist; index13 < j + wallDist; ++index13) + { + if (Main.tile[index12, index13].active()) + { + switch (Main.tile[index12, index13].type) + { + case 22: + case 23: + case 24: + case 25: + case 32: + case 112: + case 163: + flag = true; + goto label_201; + default: + continue; + } + } + } + } + if (flag) + { + Main.tile[tileX, tileY].wall = (ushort) 69; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, tileX, tileY, 3); + } + } + } + else if (Main.tile[i, j].wall == (ushort) 70 || Main.tile[i, j].type == (ushort) 109 && Main.tile[i, j].active()) + { + int tileX = i + WorldGen.genRand.Next(-2, 3); + int tileY = j + WorldGen.genRand.Next(-2, 3); + if (Main.tile[tileX, tileY].wall == (ushort) 63 || Main.tile[tileX, tileY].wall == (ushort) 65 || Main.tile[tileX, tileY].wall == (ushort) 66 || Main.tile[tileX, tileY].wall == (ushort) 68) + { + bool flag = false; +label_215: + for (int index14 = i - wallDist; index14 < i + wallDist; ++index14) + { + for (int index15 = j - wallDist; index15 < j + wallDist; ++index15) + { + if (Main.tile[index14, index15].active()) + { + switch (Main.tile[index14, index15].type) + { + case 109: + case 110: + case 113: + case 115: + case 116: + case 117: + case 164: + flag = true; + goto label_215; + default: + continue; + } + } + } + } + if (flag) + { + Main.tile[tileX, tileY].wall = (ushort) 70; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, tileX, tileY, 3); + } + } + } + WorldGen.SpreadDesertWalls(wallDist, i, j); + } + if (!Main.tile[i, j].nactive()) + return; + if ((Main.tile[i, j].type == (ushort) 2 || Main.tile[i, j].type == (ushort) 52 || Main.tile[i, j].type == (ushort) 382 || Main.tile[i, j].type == (ushort) 192 && WorldGen.genRand.Next(10) == 0) && WorldGen.GrowMoreVines(i, j)) + { + int maxValue = 60; + if (Main.tile[i, j].type == (ushort) 52 || Main.tile[i, j].type == (ushort) 382) + maxValue = 20; + if (WorldGen.genRand.Next(maxValue) == 0 && !Main.tile[i, j + 1].active() && !Main.tile[i, j + 1].lava()) + { + bool flag = false; + ushort num = 52; + if (Main.tile[i, j].type == (ushort) 382) + num = (ushort) 382; + else if (Main.tile[i, j].type != (ushort) 52) + { + if (Main.tile[i, j].wall == (ushort) 68 || Main.tile[i, j].wall == (ushort) 65 || Main.tile[i, j].wall == (ushort) 66 || Main.tile[i, j].wall == (ushort) 63) + num = (ushort) 382; + else if (Main.tile[i, j + 1].wall == (ushort) 68 || Main.tile[i, j + 1].wall == (ushort) 65 || Main.tile[i, j + 1].wall == (ushort) 66 || Main.tile[i, j + 1].wall == (ushort) 63) + num = (ushort) 382; + } + for (int index16 = j; index16 > j - 10; --index16) + { + if (Main.tile[i, index16].bottomSlope()) + { + flag = false; + break; + } + if (Main.tile[i, index16].active() && Main.tile[i, index16].type == (ushort) 2 && !Main.tile[i, index16].bottomSlope()) + { + flag = true; + break; + } + } + if (flag) + { + int index17 = i; + int index18 = j + 1; + Main.tile[index17, index18].type = num; + Main.tile[index17, index18].active(true); + Main.tile[index17, index18].color(Main.tile[i, j].color()); + WorldGen.SquareTileFrame(index17, index18); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index17, index18, 3); + } + } + } + else if (Main.tile[i, j].type == (ushort) 61 && WorldGen.genRand.Next(3) == 0 && Main.tile[i, j].frameX < (short) 144) + { + if (Main.rand.Next(4) == 0) + Main.tile[i, j].frameX = (short) (162 + WorldGen.genRand.Next(8) * 18); + Main.tile[i, j].type = (ushort) 74; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, i, j, 3); + } + if ((Main.tile[i, j].type == (ushort) 60 || Main.tile[i, j].type == (ushort) 62) && WorldGen.GrowMoreVines(i, j)) + { + int maxValue = 30; + if (Main.tile[i, j].type == (ushort) 62) + maxValue = 10; + if (WorldGen.genRand.Next(maxValue) != 0 || Main.tile[i, j + 1].active() || Main.tile[i, j + 1].lava()) + return; + bool flag = false; + for (int index19 = j; index19 > j - 10; --index19) + { + if (Main.tile[i, index19].bottomSlope()) + { + flag = false; + break; + } + if (Main.tile[i, index19].active() && Main.tile[i, index19].type == (ushort) 60 && !Main.tile[i, index19].bottomSlope()) + { + flag = true; + break; + } + } + if (!flag) + return; + int index20 = i; + int index21 = j + 1; + Main.tile[index20, index21].type = (ushort) 62; + Main.tile[index20, index21].active(true); + WorldGen.SquareTileFrame(index20, index21); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, index20, index21, 3); + } + else if ((Main.tile[i, j].type == (ushort) 70 || Main.tile[i, j].type == (ushort) 528) && WorldGen.GrowMoreVines(i, j)) + { + int maxValue = 70; + if (Main.tile[i, j].type == (ushort) 528) + maxValue = 7; + if (WorldGen.genRand.Next(maxValue) != 0 || Main.tile[i, j + 1].active() || Main.tile[i, j + 1].lava()) + return; + bool flag = false; + for (int index22 = j; index22 > j - 10; --index22) + { + if (Main.tile[i, index22].bottomSlope()) + { + flag = false; + break; + } + if (Main.tile[i, index22].active() && Main.tile[i, index22].type == (ushort) 70 && !Main.tile[i, index22].bottomSlope()) + { + flag = true; + break; + } + } + if (!flag) + return; + int index23 = i; + int index24 = j + 1; + Main.tile[index23, index24].type = (ushort) 528; + Main.tile[index23, index24].active(true); + WorldGen.SquareTileFrame(index23, index24); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, index23, index24, 3); + } + else if ((Main.tile[i, j].type == (ushort) 109 || Main.tile[i, j].type == (ushort) 115) && WorldGen.GrowMoreVines(i, j)) + { + int maxValue = 60; + if (Main.tile[i, j].type == (ushort) 115) + maxValue = 20; + if (WorldGen.genRand.Next(maxValue) != 0 || Main.tile[i, j + 1].active() || Main.tile[i, j + 1].lava()) + return; + bool flag = false; + for (int index25 = j; index25 > j - 10; --index25) + { + if (Main.tile[i, index25].bottomSlope()) + { + flag = false; + break; + } + if (Main.tile[i, index25].active() && Main.tile[i, index25].type == (ushort) 109 && !Main.tile[i, index25].bottomSlope()) + { + flag = true; + break; + } + } + if (!flag) + return; + int index26 = i; + int index27 = j + 1; + Main.tile[index26, index27].type = (ushort) 115; + Main.tile[index26, index27].active(true); + WorldGen.SquareTileFrame(index26, index27); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, index26, index27, 3); + } + else + { + if (Main.tile[i, j].type != (ushort) 199 && Main.tile[i, j].type != (ushort) 205 || !WorldGen.GrowMoreVines(i, j)) + return; + int maxValue = 60; + if (Main.tile[i, j].type == (ushort) 205) + maxValue = 20; + if (WorldGen.genRand.Next(maxValue) != 0 || Main.tile[i, j + 1].active() || Main.tile[i, j + 1].lava()) + return; + bool flag = false; + for (int index28 = j; index28 > j - 10; --index28) + { + if (Main.tile[i, index28].bottomSlope()) + { + flag = false; + break; + } + if (Main.tile[i, index28].active() && Main.tile[i, index28].type == (ushort) 199 && !Main.tile[i, index28].bottomSlope()) + { + flag = true; + break; + } + } + if (!flag) + return; + int index29 = i; + int index30 = j + 1; + Main.tile[index29, index30].type = (ushort) 205; + Main.tile[index29, index30].active(true); + WorldGen.SquareTileFrame(index29, index30); + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, index29, index30, 3); + } + } + + private static void UpdateWorld_UndergroundTile( + int i, + int j, + bool checkNPCSpawns, + int wallDist) + { + int minI = i - 1; + int maxI = i + 2; + int minJ = j - 1; + int maxJ = j + 2; + if (minI < 10) + minI = 10; + if (maxI > Main.maxTilesX - 10) + maxI = Main.maxTilesX - 10; + if (minJ < 10) + minJ = 10; + if (maxJ > Main.maxTilesY - 10) + maxJ = Main.maxTilesY - 10; + if (Main.tile[i, j] == null) + return; + if (Main.tileAlch[(int) Main.tile[i, j].type]) + WorldGen.GrowAlch(i, j); + else if (Main.tile[i, j].nactive()) + { + WorldGen.hardUpdateWorld(i, j); + if (Main.rand.Next(2500) == 0) + WorldGen.plantDye(i, j); + else if (Main.hardMode && Main.rand.Next(10000) == 0) + WorldGen.plantDye(i, j, true); + if (Main.tile[i, j].type == (ushort) 519) + { + WorldGen.CheckCatTail(i, j); + if (Main.tile[i, j].active() && WorldGen.genRand.Next(2) == 0) + { + WorldGen.GrowCatTail(i, j); + WorldGen.CheckCatTail(i, j); + } + } + if (Main.tile[i, j].type == (ushort) 549) + WorldGen.GrowCheckSeaweed(i, j); + else if (Main.tile[i, j].type == (ushort) 53 && !Main.tile[i, j].topSlope() && !Main.tile[i, j].halfBrick() && !Main.tile[i, j - 1].active() && WorldGen.genRand.Next(20) == 0) + WorldGen.GrowCheckSeaweed(i, j); + else if (TileID.Sets.SpreadUnderground[(int) Main.tile[i, j].type]) + WorldGen.UpdateWorld_GrassGrowth(i, j, minI, maxI, minJ, maxJ, true); + else if (Main.tile[i, j].type == (ushort) 32) + WorldGen.GrowSpike(i, j, (ushort) 32, (ushort) 23); + else if (Main.tile[i, j].type == (ushort) 352 && WorldGen.genRand.Next(3) == 0) + WorldGen.GrowSpike(i, j, (ushort) 352, (ushort) 199); + else if (Main.tile[i, j].type == (ushort) 61 && WorldGen.genRand.Next(3) == 0) + { + if (Main.tile[i, j].frameX < (short) 144) + { + if (Main.rand.Next(4) == 0) + Main.tile[i, j].frameX = (short) (162 + WorldGen.genRand.Next(8) * 18); + Main.tile[i, j].type = (ushort) 74; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, i, j, 3); + } + } + else if ((Main.tile[i, j].type == (ushort) 60 || Main.tile[i, j].type == (ushort) 62) && WorldGen.genRand.Next(5) == 0 && WorldGen.GrowMoreVines(i, j)) + { + if (!Main.tile[i, j + 1].active() && !Main.tile[i, j + 1].lava()) + { + bool flag = false; + for (int index = j; index > j - 10; --index) + { + if (Main.tile[i, index].bottomSlope()) + { + flag = false; + break; + } + if (Main.tile[i, index].active() && Main.tile[i, index].type == (ushort) 60 && !Main.tile[i, index].bottomSlope()) + { + flag = true; + break; + } + } + if (flag) + { + int index1 = i; + int index2 = j + 1; + Main.tile[index1, index2].type = (ushort) 62; + Main.tile[index1, index2].active(true); + WorldGen.SquareTileFrame(index1, index2); + Main.tile[index1, index2].color(Main.tile[index1, index2 - 1].color()); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index1, index2, 3); + } + } + } + else if ((Main.tile[i, j].type == (ushort) 70 || Main.tile[i, j].type == (ushort) 528) && WorldGen.GrowMoreVines(i, j)) + { + if (!Main.tile[i, j + 1].active() && !Main.tile[i, j + 1].lava()) + { + int maxValue = 70; + if (Main.tile[i, j].type == (ushort) 528) + maxValue = 7; + if (WorldGen.genRand.Next(maxValue) == 0) + { + bool flag = false; + for (int index = j; index > j - 10; --index) + { + if (Main.tile[i, index].bottomSlope()) + { + flag = false; + break; + } + if (Main.tile[i, index].active() && Main.tile[i, index].type == (ushort) 70 && !Main.tile[i, index].bottomSlope()) + { + flag = true; + break; + } + } + if (flag) + { + int index3 = i; + int index4 = j + 1; + Main.tile[index3, index4].type = (ushort) 528; + Main.tile[index3, index4].active(true); + Main.tile[index3, index4].color(Main.tile[index3, index4 - 1].color()); + WorldGen.SquareTileFrame(index3, index4); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, index3, index4, 3); + } + } + } + } + else if ((Main.tile[i, j].type == (ushort) 60 || Main.tile[i, j].type == (ushort) 62) && WorldGen.genRand.Next(80) == 0 && !WorldGen.PlayerLOS(i, j)) + { + bool flag = true; + int tileY = j; + if (Main.tile[i, j].type == (ushort) 60) + ++tileY; + for (int i1 = i; i1 < i + 2; ++i1) + { + int j1 = tileY - 1; + if (!WorldGen.AnchorValid(Framing.GetTileSafely(i1, j1), AnchorType.SolidTile) || Main.tile[i1, j1].bottomSlope()) + flag = false; + if (Main.tile[i1, j1].liquid > (byte) 0 || Main.wallHouse[(int) Main.tile[i1, j1].wall]) + flag = false; + if (flag) + { + for (int index = tileY; index < tileY + 2; ++index) + { + if ((!Main.tile[i1, index].active() || Main.tileCut[(int) Main.tile[i1, index].type] && Main.tile[i1, index].type != (ushort) 444 ? (!Main.tile[i1, index].lava() ? 1 : 0) : 0) == 0) + flag = false; + if (!flag) + break; + } + if (!flag) + break; + } + else + break; + } + if (flag) + { + if (WorldGen.CountNearBlocksTypes(i, j, 20, 1, 444) > 0) + flag = false; + } + if (flag) + { + for (int i2 = i; i2 < i + 2; ++i2) + { + Main.tile[i2, tileY - 1].slope((byte) 0); + Main.tile[i2, tileY - 1].halfBrick(false); + for (int j2 = tileY; j2 < tileY + 2; ++j2) + { + if (Main.tile[i2, j2].active()) + WorldGen.KillTile(i2, j2); + } + } + for (int index5 = i; index5 < i + 2; ++index5) + { + for (int index6 = tileY; index6 < tileY + 2; ++index6) + { + Main.tile[index5, index6].active(true); + Main.tile[index5, index6].type = (ushort) 444; + Main.tile[index5, index6].frameX = (short) ((index5 - i) * 18); + Main.tile[index5, index6].frameY = (short) ((index6 - tileY) * 18); + } + } + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, i, tileY, 3); + } + } + else if (Main.tile[i, j].type == (ushort) 69) + WorldGen.GrowSpike(i, j, (ushort) 69, (ushort) 60); + else if (Main.tile[i, j].type == (ushort) 147 || Main.tile[i, j].type == (ushort) 161 || Main.tile[i, j].type == (ushort) 163 || Main.tile[i, j].type == (ushort) 164 || Main.tile[i, j].type == (ushort) 200) + { + if (Main.rand.Next(10) == 0 && !Main.tile[i, j + 1].active() && !Main.tile[i, j + 2].active()) + { + int num1 = i - 3; + int num2 = i + 4; + int num3 = 0; + for (int index = num1; index < num2; ++index) + { + if (Main.tile[index, j].type == (ushort) 165 && Main.tile[index, j].active()) + ++num3; + if (Main.tile[index, j + 1].type == (ushort) 165 && Main.tile[index, j + 1].active()) + ++num3; + if (Main.tile[index, j + 2].type == (ushort) 165 && Main.tile[index, j + 2].active()) + ++num3; + if (Main.tile[index, j + 3].type == (ushort) 165 && Main.tile[index, j + 3].active()) + ++num3; + } + if (num3 < 2) + { + WorldGen.PlaceTight(i, j + 1); + WorldGen.SquareTileFrame(i, j + 1); + if (Main.netMode == 2 && Main.tile[i, j + 1].active()) + NetMessage.SendTileSquare(-1, i, j + 1, 3); + } + } + } + else if (Main.tileMoss[(int) Main.tile[i, j].type] || TileID.Sets.tileMossBrick[(int) Main.tile[i, j].type]) + { + int type1 = (int) Main.tile[i, j].type; + bool flag = false; + for (int i3 = minI; i3 < maxI; ++i3) + { + for (int j3 = minJ; j3 < maxJ; ++j3) + { + if ((i != i3 || j != j3) && Main.tile[i3, j3].active() && (Main.tile[i3, j3].type == (ushort) 1 || Main.tile[i3, j3].type == (ushort) 38)) + { + int type2 = (int) Main.tile[i3, j3].type; + WorldGen.SpreadGrass(i3, j3, (int) Main.tile[i3, j3].type, WorldGen.MossConversion(type1, type2), false, Main.tile[i, j].color()); + if ((int) Main.tile[i3, j3].type == type1) + { + WorldGen.SquareTileFrame(i3, j3); + flag = true; + } + } + } + } + if (Main.netMode == 2 & flag) + NetMessage.SendTileSquare(-1, i, j, 3); + if (WorldGen.genRand.Next(6) == 0) + { + int index7 = i; + int index8 = j; + switch (WorldGen.genRand.Next(4)) + { + case 0: + --index7; + break; + case 1: + ++index7; + break; + case 2: + --index8; + break; + default: + ++index8; + break; + } + if (!Main.tile[index7, index8].active()) + { + if (WorldGen.PlaceTile(index7, index8, 184, true)) + Main.tile[index7, index8].color(Main.tile[i, j].color()); + if (Main.netMode == 2 && Main.tile[index7, index8].active()) + NetMessage.SendTileSquare(-1, index7, index8, 1); + } + } + } + else if (Main.tile[i, j].type == (ushort) 590) + { + if (WorldGen.genRand.Next(5) == 0) + { + int num = (int) Main.tile[i, j].frameX / 54; + int treeTileType = 587; + switch (num) + { + case 0: + treeTileType = 583; + break; + case 1: + treeTileType = 584; + break; + case 2: + treeTileType = 585; + break; + case 3: + treeTileType = 586; + break; + case 4: + treeTileType = 587; + break; + case 5: + treeTileType = 588; + break; + case 6: + treeTileType = 589; + break; + } + if (WorldGen.TryGrowingTreeByType(treeTileType, i, j) && WorldGen.PlayerLOS(i, j)) + WorldGen.TreeGrowFXCheck(i, j); + } + } + else if (Main.tile[i, j].type == (ushort) 595) + { + if (WorldGen.genRand.Next(5) == 0) + { + int num = (int) Main.tile[i, j].frameX / 54; + int treeTileType = 596; + if (num == 0) + treeTileType = 596; + if (WorldGen.TryGrowingTreeByType(treeTileType, i, j) && WorldGen.PlayerLOS(i, j)) + WorldGen.TreeGrowFXCheck(i, j); + } + } + else if (Main.tile[i, j].type == (ushort) 615 && WorldGen.genRand.Next(5) == 0) + { + int num = (int) Main.tile[i, j].frameX / 54; + int treeTileType = 616; + if (num == 0) + treeTileType = 616; + if (WorldGen.TryGrowingTreeByType(treeTileType, i, j) && WorldGen.PlayerLOS(i, j)) + WorldGen.TreeGrowFXCheck(i, j); + } + } + else + { + if (Main.tile[i, j].wall == (ushort) 62 && Main.tile[i, j].liquid == (byte) 0 && WorldGen.genRand.Next(10) == 0) + { + int num4 = WorldGen.genRand.Next(2, 4); + int num5 = i - num4; + int num6 = i + num4; + int num7 = j - num4; + int num8 = j + num4; + bool flag = false; + for (int i4 = num5; i4 <= num6; ++i4) + { + for (int j4 = num7; j4 <= num8; ++j4) + { + if (WorldGen.SolidTile(i4, j4)) + { + flag = true; + break; + } + } + } + if (flag && !Main.tile[i, j].active()) + { + WorldGen.PlaceTile(i, j, 51, true); + WorldGen.TileFrame(i, j, true); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, i, j, 3); + } + } + if (checkNPCSpawns) + WorldGen.TrySpawningTownNPC(i, j); + } + if (!WorldGen.AllowedToSpreadInfections) + return; + if (Main.tile[i, j].wall == (ushort) 81 || Main.tile[i, j].wall == (ushort) 83 || Main.tile[i, j].type == (ushort) 199 && Main.tile[i, j].active()) + { + int tileX = i + WorldGen.genRand.Next(-2, 3); + int tileY = j + WorldGen.genRand.Next(-2, 3); + if (Main.tile[tileX, tileY].wall >= (ushort) 63 && Main.tile[tileX, tileY].wall <= (ushort) 68) + { + bool flag = false; +label_190: + for (int index9 = i - wallDist; index9 < i + wallDist; ++index9) + { + for (int index10 = j - wallDist; index10 < j + wallDist; ++index10) + { + if (Main.tile[index9, index10].active()) + { + switch (Main.tile[index9, index10].type) + { + case 199: + case 200: + case 201: + case 203: + case 205: + case 234: + case 352: + flag = true; + goto label_190; + default: + continue; + } + } + } + } + if (flag) + { + Main.tile[tileX, tileY].wall = (ushort) 81; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, tileX, tileY, 3); + } + } + } + else if (Main.tile[i, j].wall == (ushort) 69 || Main.tile[i, j].wall == (ushort) 3 || Main.tile[i, j].type == (ushort) 23 && Main.tile[i, j].active()) + { + int tileX = i + WorldGen.genRand.Next(-2, 3); + int tileY = j + WorldGen.genRand.Next(-2, 3); + if (Main.tile[tileX, tileY].wall >= (ushort) 63 && Main.tile[tileX, tileY].wall <= (ushort) 68) + { + bool flag = false; +label_204: + for (int index11 = i - wallDist; index11 < i + wallDist; ++index11) + { + for (int index12 = j - wallDist; index12 < j + wallDist; ++index12) + { + if (Main.tile[index11, index12].active()) + { + switch (Main.tile[index11, index12].type) + { + case 22: + case 23: + case 24: + case 25: + case 32: + case 112: + case 163: + flag = true; + goto label_204; + default: + continue; + } + } + } + } + if (flag) + { + Main.tile[tileX, tileY].wall = (ushort) 69; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, tileX, tileY, 3); + } + } + } + else if (Main.tile[i, j].wall == (ushort) 70 || Main.tile[i, j].type == (ushort) 109 && Main.tile[i, j].active()) + { + int tileX = i + WorldGen.genRand.Next(-2, 3); + int tileY = j + WorldGen.genRand.Next(-2, 3); + if (Main.tile[tileX, tileY].wall == (ushort) 63 || Main.tile[tileX, tileY].wall == (ushort) 65 || Main.tile[tileX, tileY].wall == (ushort) 66 || Main.tile[tileX, tileY].wall == (ushort) 68) + { + bool flag = false; +label_218: + for (int index13 = i - wallDist; index13 < i + wallDist; ++index13) + { + for (int index14 = j - wallDist; index14 < j + wallDist; ++index14) + { + if (Main.tile[index13, index14].active()) + { + switch (Main.tile[index13, index14].type) + { + case 109: + case 110: + case 113: + case 115: + case 116: + case 117: + case 164: + flag = true; + goto label_218; + default: + continue; + } + } + } + } + if (flag) + { + Main.tile[tileX, tileY].wall = (ushort) 70; + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, tileX, tileY, 3); + } + } + } + WorldGen.SpreadDesertWalls(wallDist, i, j); + } + + private static void UpdateWorld_GrassGrowth( + int i, + int j, + int minI, + int maxI, + int minJ, + int maxJ, + bool underground) + { + if (underground) + { + int type = (int) Main.tile[i, j].type; + int dirt = -1; + int Type = -1; + int maxValue1 = 1; + switch (type) + { + case 23: + dirt = 0; + Type = 24; + maxValue1 = 2; + if (!WorldGen.AllowedToSpreadInfections) + return; + break; + case 60: + dirt = 59; + Type = 61; + maxValue1 = 10; + break; + case 70: + dirt = 59; + Type = 71; + maxValue1 = 10; + break; + case 199: + dirt = 0; + Type = 201; + maxValue1 = 2; + if (!WorldGen.AllowedToSpreadInfections) + return; + break; + } + bool flag1 = false; + if (Type != -1 && !Main.tile[i, minJ].active() && WorldGen.genRand.Next(maxValue1) == 0) + { + flag1 = true; + if (WorldGen.PlaceTile(i, minJ, Type, true)) + Main.tile[i, minJ].color(Main.tile[i, j].color()); + if (Main.netMode == 2 && Main.tile[i, minJ].active()) + NetMessage.SendTileSquare(-1, i, minJ, 1); + } + if (dirt != -1) + { + bool flag2 = false; + for (int i1 = minI; i1 < maxI; ++i1) + { + for (int j1 = minJ; j1 < maxJ; ++j1) + { + if ((i != i1 || j != j1) && Main.tile[i1, j1].active() && (int) Main.tile[i1, j1].type == dirt) + { + WorldGen.SpreadGrass(i1, j1, dirt, type, false, Main.tile[i, j].color()); + if ((int) Main.tile[i1, j1].type == type) + { + WorldGen.SquareTileFrame(i1, j1); + flag2 = true; + } + } + } + } + if (Main.netMode == 2 & flag2) + NetMessage.SendTileSquare(-1, i, j, 3); + } + switch (type) + { + case 60: + if (flag1 || WorldGen.genRand.Next(25) != 0 || Main.tile[i, minJ].liquid != (byte) 0) + break; + if (Main.hardMode && NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3 && WorldGen.genRand.Next(60) == 0) + { + bool flag3 = true; + int num = 150; + for (int index1 = i - num; index1 < i + num; index1 += 2) + { + for (int index2 = j - num; index2 < j + num; index2 += 2) + { + if (index1 > 1 && index1 < Main.maxTilesX - 2 && index2 > 1 && index2 < Main.maxTilesY - 2 && Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 238) + { + flag3 = false; + break; + } + } + } + if (flag3) + { + WorldGen.PlaceJunglePlant(i, minJ, (ushort) 238, 0, 0); + WorldGen.SquareTileFrame(i, minJ); + WorldGen.SquareTileFrame(i + 2, minJ); + WorldGen.SquareTileFrame(i - 1, minJ); + if (Main.tile[i, minJ].type == (ushort) 238 && Main.netMode == 2) + NetMessage.SendTileSquare(-1, i, minJ, 5); + } + } + int maxValue2 = Main.expertMode ? 30 : 40; + if (Main.hardMode && NPC.downedMechBossAny && WorldGen.genRand.Next(maxValue2) == 0) + { + bool flag4 = true; + int num = 60; + if (Main.expertMode) + num -= 10; + for (int index3 = i - num; index3 < i + num; index3 += 2) + { + for (int index4 = j - num; index4 < j + num; index4 += 2) + { + if (index3 > 1 && index3 < Main.maxTilesX - 2 && index4 > 1 && index4 < Main.maxTilesY - 2 && Main.tile[index3, index4].active() && Main.tile[index3, index4].type == (ushort) 236) + { + flag4 = false; + break; + } + } + } + if (!flag4) + break; + WorldGen.PlaceJunglePlant(i, minJ, (ushort) 236, WorldGen.genRand.Next(3), 0); + WorldGen.SquareTileFrame(i, minJ); + WorldGen.SquareTileFrame(i + 1, minJ + 1); + if (Main.tile[i, minJ].type != (ushort) 236 || Main.netMode != 2) + break; + NetMessage.SendTileSquare(-1, i, minJ, 4); + break; + } + WorldGen.PlaceJunglePlant(i, minJ, (ushort) 233, WorldGen.genRand.Next(8), 0); + if (Main.tile[i, minJ].type != (ushort) 233) + break; + if (Main.netMode == 2) + { + NetMessage.SendTileSquare(-1, i, minJ, 4); + break; + } + WorldGen.PlaceJunglePlant(i, minJ, (ushort) 233, WorldGen.genRand.Next(12), 1); + if (Main.tile[i, minJ].type != (ushort) 233 || Main.netMode != 2) + break; + NetMessage.SendTileSquare(-1, i, minJ, 3); + break; + case 70: + if (Main.tile[i, j - 1].liquid > (byte) 0) + WorldGen.PlaceCatTail(i, j - 1); + if (WorldGen.genRand.Next(300) != 0 || !WorldGen.GrowShroom(i, j) || !WorldGen.PlayerLOS(i, j)) + break; + WorldGen.TreeGrowFXCheck(i, j - 1); + break; + } + } + else + { + int grass = (int) Main.tile[i, j].type; + switch (grass) + { + case 2: + case 23: + case 32: + case 109: + case 199: + case 352: + case 477: + case 492: + if (Main.halloween && WorldGen.genRand.Next(75) == 0 && (grass == 2 || grass == 109)) + { + int num1 = 100; + int num2 = 0; + for (int index5 = i - num1; index5 < i + num1; index5 += 2) + { + for (int index6 = j - num1; index6 < j + num1; index6 += 2) + { + if (index5 > 1 && index5 < Main.maxTilesX - 2 && index6 > 1 && index6 < Main.maxTilesY - 2 && Main.tile[index5, index6].active() && Main.tile[index5, index6].type == (ushort) 254) + ++num2; + } + } + if (num2 < 6) + { + WorldGen.PlacePumpkin(i, minJ); + if (Main.netMode == 2 && Main.tile[i, minJ].type == (ushort) 254) + NetMessage.SendTileSquare(-1, i, minJ, 4); + } + } + if (!Main.tile[i, minJ].active() && Main.tile[i, minJ].liquid == (byte) 0) + { + int Type = -1; + if (grass == 2 && WorldGen.genRand.Next(12) == 0) + Type = 3; + else if (grass == 23 && WorldGen.genRand.Next(10) == 0) + Type = 24; + else if (grass == 109 && WorldGen.genRand.Next(10) == 0) + Type = 110; + else if (grass == 199 && WorldGen.genRand.Next(10) == 0) + Type = 201; + if (Type != -1 && WorldGen.PlaceTile(i, minJ, Type, true)) + { + Main.tile[i, minJ].color(Main.tile[i, j].color()); + if (Main.netMode == 2) + NetMessage.SendTileSquare(-1, i, minJ, 1); + } + } + bool flag5 = false; + switch (grass) + { + case 32: + grass = 23; + if (!WorldGen.AllowedToSpreadInfections) + return; + break; + case 352: + grass = 199; + if (!WorldGen.AllowedToSpreadInfections) + return; + break; + case 477: + grass = 2; + break; + case 492: + grass = 109; + break; + } + bool flag6 = WorldGen.AllowedToSpreadInfections && (grass == 23 || grass == 199 || grass == 109 || grass == 492); + for (int i2 = minI; i2 < maxI; ++i2) + { + for (int j2 = minJ; j2 < maxJ; ++j2) + { + if ((i != i2 || j != j2) && Main.tile[i2, j2].active()) + { + int type = (int) Main.tile[i2, j2].type; + if (flag6 || type == 0) + { + if (type == 0 || (grass == 23 || grass == 199) && (type == 2 || type == 109 || type == 477 || type == 492)) + { + WorldGen.SpreadGrass(i2, j2, grass: grass, repeat: false, color: Main.tile[i, j].color()); + if (grass == 23 || grass == 199) + { + if (WorldGen.AllowedToSpreadInfections) + { + WorldGen.SpreadGrass(i2, j2, 2, grass, false, Main.tile[i, j].color()); + WorldGen.SpreadGrass(i2, j2, 109, grass, false, Main.tile[i, j].color()); + WorldGen.SpreadGrass(i2, j2, 477, grass, false, Main.tile[i, j].color()); + WorldGen.SpreadGrass(i2, j2, 492, grass, false, Main.tile[i, j].color()); + } + else + continue; + } + if ((int) Main.tile[i2, j2].type == grass) + { + WorldGen.SquareTileFrame(i2, j2); + flag5 = true; + } + } + if (type == 0 || (grass == 109 || grass == 492) && (type == 2 || type == 477 || type == 23 || type == 199)) + { + WorldGen.SpreadGrass(i2, j2, grass: grass, repeat: false, color: Main.tile[i, j].color()); + if (grass == 109) + WorldGen.SpreadGrass(i2, j2, 2, grass, false, Main.tile[i, j].color()); + if (grass == 492) + WorldGen.SpreadGrass(i2, j2, 477, grass, false, Main.tile[i, j].color()); + else if (grass == 109) + WorldGen.SpreadGrass(i2, j2, 477, 492, false, Main.tile[i, j].color()); + if ((grass == 492 || grass == 109) && WorldGen.AllowedToSpreadInfections) + WorldGen.SpreadGrass(i2, j2, 23, 109, false, Main.tile[i, j].color()); + if ((grass == 492 || grass == 109) && WorldGen.AllowedToSpreadInfections) + WorldGen.SpreadGrass(i2, j2, 199, 109, false, Main.tile[i, j].color()); + if ((int) Main.tile[i2, j2].type == grass) + { + WorldGen.SquareTileFrame(i2, j2); + flag5 = true; + } + } + } + } + } + } + if (!(Main.netMode == 2 & flag5)) + break; + NetMessage.SendTileSquare(-1, i, j, 3); + break; + case 60: + if (!Main.tile[i, minJ].active() && WorldGen.genRand.Next(7) == 0) + { + WorldGen.PlaceTile(i, minJ, 61, true); + if (Main.tile[i, minJ].active()) + Main.tile[i, minJ].color(Main.tile[i, j].color()); + if (Main.netMode == 2 && Main.tile[i, minJ].active()) + NetMessage.SendTileSquare(-1, i, minJ, 1); + } + else if (WorldGen.genRand.Next(500) == 0 && (!Main.tile[i, minJ].active() || Main.tile[i, minJ].type == (ushort) 61 || Main.tile[i, minJ].type == (ushort) 74 || Main.tile[i, minJ].type == (ushort) 69)) + { + if (WorldGen.GrowTree(i, j) && WorldGen.PlayerLOS(i, j)) + WorldGen.TreeGrowFXCheck(i, j - 1); + } + else if (WorldGen.genRand.Next(25) == 0 && Main.tile[i, minJ].liquid == (byte) 0) + { + WorldGen.PlaceJunglePlant(i, minJ, (ushort) 233, WorldGen.genRand.Next(8), 0); + if (Main.tile[i, minJ].type == (ushort) 233) + { + if (Main.netMode == 2) + { + NetMessage.SendTileSquare(-1, i, minJ, 4); + } + else + { + WorldGen.PlaceJunglePlant(i, minJ, (ushort) 233, WorldGen.genRand.Next(12), 1); + if (Main.tile[i, minJ].type == (ushort) 233 && Main.netMode == 2) + NetMessage.SendTileSquare(-1, i, minJ, 3); + } + } + } + bool flag7 = false; + for (int i3 = minI; i3 < maxI; ++i3) + { + for (int j3 = minJ; j3 < maxJ; ++j3) + { + if ((i != i3 || j != j3) && Main.tile[i3, j3].active() && Main.tile[i3, j3].type == (ushort) 59) + { + WorldGen.SpreadGrass(i3, j3, 59, grass, false, Main.tile[i, j].color()); + if ((int) Main.tile[i3, j3].type == grass) + { + WorldGen.SquareTileFrame(i3, j3); + flag7 = true; + } + } + } + } + if (!(Main.netMode == 2 & flag7)) + break; + NetMessage.SendTileSquare(-1, i, j, 3); + break; + case 70: + if (!Main.tile[i, j].inActive()) + { + if (!Main.tile[i, minJ].active() && WorldGen.genRand.Next(10) == 0) + { + WorldGen.PlaceTile(i, minJ, 71, true); + if (Main.tile[i, minJ].active()) + Main.tile[i, minJ].color(Main.tile[i, j].color()); + if (Main.netMode == 2 && Main.tile[i, minJ].active()) + NetMessage.SendTileSquare(-1, i, minJ, 1); + } + if (WorldGen.genRand.Next(300) == 0) + { + bool flag8 = WorldGen.PlayerLOS(i, j); + if (WorldGen.GrowTree(i, j) & flag8) + WorldGen.TreeGrowFXCheck(i, j - 1); + } + } + bool flag9 = false; + for (int i4 = minI; i4 < maxI; ++i4) + { + for (int j4 = minJ; j4 < maxJ; ++j4) + { + if ((i != i4 || j != j4) && Main.tile[i4, j4].active() && Main.tile[i4, j4].type == (ushort) 59) + { + WorldGen.SpreadGrass(i4, j4, 59, grass, false, Main.tile[i, j].color()); + if ((int) Main.tile[i4, j4].type == grass) + { + WorldGen.SquareTileFrame(i4, j4); + flag9 = true; + } + } + } + } + if (!(Main.netMode == 2 & flag9)) + break; + NetMessage.SendTileSquare(-1, i, j, 3); + break; + } + } + } + + private static void TrySpawningTownNPC(int x, int y) + { + bool flag = Main.tileSolid[379]; + Main.tileSolid[379] = true; + if (WorldGen.prioritizedTownNPCType > 0) + { + if (Main.tile[x, y].wall == (ushort) 34) + { + if (Main.rand.Next(4) == 0) + { + int num1 = (int) WorldGen.SpawnTownNPC(x, y); + } + } + else + { + int num2 = (int) WorldGen.SpawnTownNPC(x, y); + } + } + Main.tileSolid[379] = flag; + } + + public static void SpreadDesertWalls(int wallDist, int i, int j) + { + if (!WallID.Sets.Conversion.Sandstone[(int) Main.tile[i, j].wall] && (!Main.tile[i, j].active() || !TileID.Sets.Conversion.Sandstone[(int) Main.tile[i, j].type]) && !WallID.Sets.Conversion.HardenedSand[(int) Main.tile[i, j].wall]) + return; + int num = 0; + int wall = (int) Main.tile[i, j].wall; + int type = (int) Main.tile[i, j].type; + if (WallID.Sets.Corrupt[wall] || TileID.Sets.Corrupt[type]) + num = 1; + if (WallID.Sets.Hallow[wall] || TileID.Sets.Hallow[type]) + num = 2; + if (WallID.Sets.Crimson[wall] || TileID.Sets.Crimson[type]) + num = 3; + if (num == 0) + return; + int tileX = i + WorldGen.genRand.Next(-2, 3); + int tileY = j + WorldGen.genRand.Next(-2, 3); + bool flag = false; + if (WallID.Sets.Conversion.PureSand[(int) Main.tile[tileX, tileY].wall]) + { + switch (num) + { + case 1: + for (int index1 = i - wallDist; index1 < i + wallDist; ++index1) + { + for (int index2 = j - wallDist; index2 < j + wallDist; ++index2) + { + if (Main.tile[index1, index2].active() && TileID.Sets.Corrupt[(int) Main.tile[index1, index2].type]) + { + flag = true; + break; + } + } + if (flag) + break; + } + break; + case 2: + for (int index3 = i - wallDist; index3 < i + wallDist; ++index3) + { + for (int index4 = j - wallDist; index4 < j + wallDist; ++index4) + { + if (Main.tile[index3, index4].active() && TileID.Sets.Hallow[(int) Main.tile[index3, index4].type]) + { + flag = true; + break; + } + } + if (flag) + break; + } + break; + case 3: + for (int index5 = i - wallDist; index5 < i + wallDist; ++index5) + { + for (int index6 = j - wallDist; index6 < j + wallDist; ++index6) + { + if (Main.tile[index5, index6].active() && TileID.Sets.Crimson[(int) Main.tile[index5, index6].type]) + { + flag = true; + break; + } + } + if (flag) + break; + } + break; + } + } + if (!flag) + return; + ushort? nullable = new ushort?(); + if (WallID.Sets.Conversion.Sandstone[(int) Main.tile[tileX, tileY].wall]) + { + switch (num) + { + case 1: + nullable = new ushort?((ushort) 220); + break; + case 2: + nullable = new ushort?((ushort) 222); + break; + case 3: + nullable = new ushort?((ushort) 221); + break; + } + } + if (WallID.Sets.Conversion.HardenedSand[(int) Main.tile[tileX, tileY].wall]) + { + switch (num) + { + case 1: + nullable = new ushort?((ushort) 217); + break; + case 2: + nullable = new ushort?((ushort) 219); + break; + case 3: + nullable = new ushort?((ushort) 218); + break; + } + } + if (!nullable.HasValue || (int) Main.tile[tileX, tileY].wall == (int) nullable.Value) + return; + Main.tile[tileX, tileY].wall = nullable.Value; + if (Main.netMode != 2) + return; + NetMessage.SendTileSquare(-1, tileX, tileY, 3); + } + + public static void PlaceWall(int i, int j, int type, bool mute = false) + { + if (i <= 1 || j <= 1 || i >= Main.maxTilesX - 2 || j >= Main.maxTilesY - 2) + return; + if (Main.tile[i, j] == null) + Main.tile[i, j] = new Tile(); + if (Main.tile[i, j].wall != (ushort) 0) + return; + Main.tile[i, j].wall = (ushort) type; + WorldGen.SquareWallFrame(i, j); + if (mute) + return; + SoundEngine.PlaySound(0, i * 16, j * 16); + } + + public static void SpreadGrass(int i, int j, int dirt = 0, int grass = 2, bool repeat = true, byte color = 0) + { + try + { + if (!WorldGen.InWorld(i, j, 1)) + return; + if (WorldGen.gen && (grass == 199 || grass == 23)) + { + int beachDistance = WorldGen.beachDistance; + if ((double) i > (double) Main.maxTilesX * 0.45 && (double) i <= (double) Main.maxTilesX * 0.55 || i < beachDistance || i >= Main.maxTilesX - beachDistance) + return; + } + else if ((WorldGen.gen || grass != 199 && grass != 23) && ((int) Main.tile[i, j].type != dirt || !Main.tile[i, j].active() || (double) j >= Main.worldSurface && dirt == 0)) + return; + int num1 = i - 1; + int num2 = i + 2; + int num3 = j - 1; + int num4 = j + 2; + if (num1 < 0) + num1 = 0; + if (num2 > Main.maxTilesX) + num2 = Main.maxTilesX; + if (num3 < 0) + num3 = 0; + if (num4 > Main.maxTilesY) + num4 = Main.maxTilesY; + bool flag = true; + for (int index1 = num1; index1 < num2; ++index1) + { + for (int index2 = num3; index2 < num4; ++index2) + { + if (!Main.tile[index1, index2].active() || !Main.tileSolid[(int) Main.tile[index1, index2].type]) + flag = false; + if (Main.tile[index1, index2].lava() && Main.tile[index1, index2].liquid > (byte) 0) + { + flag = true; + break; + } + } + } + if (flag || !TileID.Sets.CanBeClearedDuringGeneration[(int) Main.tile[i, j].type] || grass == 23 && Main.tile[i, j - 1].type == (ushort) 27 || grass == 199 && Main.tile[i, j - 1].type == (ushort) 27 || grass == 109 && Main.tile[i, j - 1].type == (ushort) 27) + return; + Main.tile[i, j].type = (ushort) grass; + Main.tile[i, j].color(color); + for (int i1 = num1; i1 < num2; ++i1) + { + for (int j1 = num3; j1 < num4; ++j1) + { + if (Main.tile[i1, j1].active()) + { + if ((int) Main.tile[i1, j1].type == dirt) + { + try + { + if (repeat) + { + if (WorldGen.grassSpread < 1000) + { + ++WorldGen.grassSpread; + WorldGen.SpreadGrass(i1, j1, dirt, grass); + --WorldGen.grassSpread; + } + } + } + catch + { + } + } + } + } + } + } + catch + { + } + } + + public static void ChasmRunnerSideways(int i, int j, int direction, int steps) + { + float num1 = (float) steps; + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j; + Vector2 vector2_2; + vector2_2.X = (float) WorldGen.genRand.Next(10, 21) * 0.1f * (float) direction; + vector2_2.Y = (float) WorldGen.genRand.Next(-10, 10) * 0.01f; + double num2 = (double) (WorldGen.genRand.Next(5) + 7); + while (num2 > 0.0) + { + if ((double) num1 > 0.0) + { + num2 = num2 + (double) WorldGen.genRand.Next(3) - (double) WorldGen.genRand.Next(3); + if (num2 < 7.0) + num2 = 7.0; + if (num2 > 20.0) + num2 = 20.0; + if ((double) num1 == 1.0 && num2 < 10.0) + num2 = 10.0; + } + else + num2 -= (double) WorldGen.genRand.Next(4); + if ((double) vector2_1.Y > Main.rockLayer && (double) num1 > 0.0) + num1 = 0.0f; + --num1; + int num3 = (int) ((double) vector2_1.X - num2 * 0.5); + int num4 = (int) ((double) vector2_1.X + num2 * 0.5); + int num5 = (int) ((double) vector2_1.Y - num2 * 0.5); + int num6 = (int) ((double) vector2_1.Y + num2 * 0.5); + if (num3 < 0) + num3 = 0; + if (num4 > Main.maxTilesX - 1) + num4 = Main.maxTilesX - 1; + if (num5 < 0) + num5 = 0; + if (num6 > Main.maxTilesY) + num6 = Main.maxTilesY; + for (int index1 = num3; index1 < num4; ++index1) + { + for (int index2 = num5; index2 < num6; ++index2) + { + if ((double) Math.Abs((float) index1 - vector2_1.X) + (double) Math.Abs((float) index2 - vector2_1.Y) < num2 * 0.5 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.015) && Main.tile[index1, index2].type != (ushort) 31 && Main.tile[index1, index2].type != (ushort) 22) + Main.tile[index1, index2].active(false); + } + } + vector2_1 += vector2_2; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 10) * 0.1f; + if ((double) vector2_1.Y < (double) (j - 20)) + vector2_2.Y += (float) WorldGen.genRand.Next(20) * 0.01f; + if ((double) vector2_1.Y > (double) (j + 20)) + vector2_2.Y -= (float) WorldGen.genRand.Next(20) * 0.01f; + if ((double) vector2_2.Y < -0.5) + vector2_2.Y = -0.5f; + if ((double) vector2_2.Y > 0.5) + vector2_2.Y = 0.5f; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.01f; + switch (direction) + { + case -1: + if ((double) vector2_2.X > -0.5) + vector2_2.X = -0.5f; + if ((double) vector2_2.X < -2.0) + { + vector2_2.X = -2f; + break; + } + break; + case 1: + if ((double) vector2_2.X < 0.5) + vector2_2.X = 0.5f; + if ((double) vector2_2.X > 2.0) + { + vector2_2.X = 2f; + break; + } + break; + } + int num7 = (int) ((double) vector2_1.X - num2 * 1.1); + int num8 = (int) ((double) vector2_1.X + num2 * 1.1); + int num9 = (int) ((double) vector2_1.Y - num2 * 1.1); + int num10 = (int) ((double) vector2_1.Y + num2 * 1.1); + if (num7 < 1) + num7 = 1; + if (num8 > Main.maxTilesX - 1) + num8 = Main.maxTilesX - 1; + if (num9 < 0) + num9 = 0; + if (num10 > Main.maxTilesY) + num10 = Main.maxTilesY; + for (int index3 = num7; index3 < num8; ++index3) + { + for (int index4 = num9; index4 < num10; ++index4) + { + if ((double) Math.Abs((float) index3 - vector2_1.X) + (double) Math.Abs((float) index4 - vector2_1.Y) < num2 * 1.1 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.015) && Main.tile[index3, index4].wall != (ushort) 3) + { + if (Main.tile[index3, index4].type != (ushort) 25 && index4 > j + WorldGen.genRand.Next(3, 20)) + Main.tile[index3, index4].active(true); + Main.tile[index3, index4].active(true); + if (Main.tile[index3, index4].type != (ushort) 31 && Main.tile[index3, index4].type != (ushort) 22) + Main.tile[index3, index4].type = (ushort) 25; + if (Main.tile[index3, index4].wall == (ushort) 2) + Main.tile[index3, index4].wall = (ushort) 0; + } + } + } + for (int i1 = num7; i1 < num8; ++i1) + { + for (int j1 = num9; j1 < num10; ++j1) + { + if ((double) Math.Abs((float) i1 - vector2_1.X) + (double) Math.Abs((float) j1 - vector2_1.Y) < num2 * 1.1 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.015) && Main.tile[i1, j1].wall != (ushort) 3) + { + if (Main.tile[i1, j1].type != (ushort) 31 && Main.tile[i1, j1].type != (ushort) 22) + Main.tile[i1, j1].type = (ushort) 25; + Main.tile[i1, j1].active(true); + WorldGen.PlaceWall(i1, j1, 3, true); + } + } + } + } + if (WorldGen.genRand.Next(3) != 0) + return; + int x = (int) vector2_1.X; + int y = (int) vector2_1.Y; + while (!Main.tile[x, y].active()) + ++y; + WorldGen.TileRunner(x, y, (double) WorldGen.genRand.Next(2, 6), WorldGen.genRand.Next(3, 7), 22); + } + + public static void CrimStart(int i, int j) + { + int crimDir = 1; + int i1 = i; + int j1 = j; + if ((double) j1 > Main.worldSurface) + j1 = (int) Main.worldSurface; + while (!WorldGen.SolidTile(i1, j1)) + ++j1; + int num1 = i1; + int num2 = j1; + Vector2 position = new Vector2((float) i1, (float) j1); + Vector2 vector2 = new Vector2((float) WorldGen.genRand.Next(-20, 21) * 0.1f, (float) WorldGen.genRand.Next(20, 201) * 0.01f); + if ((double) vector2.X < 0.0) + crimDir = -1; + float num3 = (float) WorldGen.genRand.Next(15, 26); + bool flag1 = true; + int num4 = 0; + while (flag1) + { + num3 += (float) WorldGen.genRand.Next(-50, 51) * 0.01f; + if ((double) num3 < 15.0) + num3 = 15f; + if ((double) num3 > 25.0) + num3 = 25f; + for (int index1 = (int) ((double) position.X - (double) num3 / 2.0); (double) index1 < (double) position.X + (double) num3 / 2.0; ++index1) + { + for (int index2 = (int) ((double) position.Y - (double) num3 / 2.0); (double) index2 < (double) position.Y + (double) num3 / 2.0; ++index2) + { + if (index2 > num2) + { + if ((double) Math.Abs((float) index1 - position.X) + (double) Math.Abs((float) index2 - position.Y) < (double) num3 * 0.3) + { + Main.tile[index1, index2].active(false); + Main.tile[index1, index2].wall = (ushort) 83; + } + else if ((double) Math.Abs((float) index1 - position.X) + (double) Math.Abs((float) index2 - position.Y) < (double) num3 * 0.8 && Main.tile[index1, index2].wall != (ushort) 83) + { + Main.tile[index1, index2].active(true); + Main.tile[index1, index2].type = (ushort) 203; + if ((double) Math.Abs((float) index1 - position.X) + (double) Math.Abs((float) index2 - position.Y) < (double) num3 * 0.6) + Main.tile[index1, index2].wall = (ushort) 83; + } + } + else if ((double) Math.Abs((float) index1 - position.X) + (double) Math.Abs((float) index2 - position.Y) < (double) num3 * 0.3 && Main.tile[index1, index2].active()) + { + Main.tile[index1, index2].active(false); + Main.tile[index1, index2].wall = (ushort) 83; + } + } + } + if ((double) position.X > (double) (num1 + 50)) + num4 = -100; + if ((double) position.X < (double) (num1 - 50)) + num4 = 100; + if (num4 < 0) + vector2.X -= (float) WorldGen.genRand.Next(20, 51) * 0.01f; + else if (num4 > 0) + vector2.X += (float) WorldGen.genRand.Next(20, 51) * 0.01f; + else + vector2.X += (float) WorldGen.genRand.Next(-50, 51) * 0.01f; + vector2.Y += (float) WorldGen.genRand.Next(-50, 51) * 0.01f; + if ((double) vector2.Y < 0.25) + vector2.Y = 0.25f; + if ((double) vector2.Y > 2.0) + vector2.Y = 2f; + if ((double) vector2.X < -2.0) + vector2.X = -2f; + if ((double) vector2.X > 2.0) + vector2.X = 2f; + position += vector2; + if ((double) position.Y > Main.worldSurface + 100.0) + flag1 = false; + } + float num5 = (float) WorldGen.genRand.Next(40, 55); + for (int index3 = 0; index3 < 50; ++index3) + { + int num6 = (int) position.X + WorldGen.genRand.Next(-20, 21); + int num7 = (int) position.Y + WorldGen.genRand.Next(-20, 21); + for (int index4 = (int) ((double) num6 - (double) num5 / 2.0); (double) index4 < (double) num6 + (double) num5 / 2.0; ++index4) + { + for (int index5 = (int) ((double) num7 - (double) num5 / 2.0); (double) index5 < (double) num7 + (double) num5 / 2.0; ++index5) + { + double num8 = (double) Math.Abs(index4 - num6); + float num9 = (float) Math.Abs(index5 - num7); + float num10 = (float) (1.0 + (double) WorldGen.genRand.Next(-20, 21) * 0.00999999977648258); + float num11 = (float) (1.0 + (double) WorldGen.genRand.Next(-20, 21) * 0.00999999977648258); + double num12 = (double) num10; + double num13 = num8 * num12; + float num14 = num9 * num11; + double num15 = Math.Sqrt(num13 * num13 + (double) num14 * (double) num14); + if (num15 < (double) num5 * 0.25) + { + Main.tile[index4, index5].active(false); + Main.tile[index4, index5].wall = (ushort) 83; + } + else if (num15 < (double) num5 * 0.4 && Main.tile[index4, index5].wall != (ushort) 83) + { + Main.tile[index4, index5].active(true); + Main.tile[index4, index5].type = (ushort) 203; + if (num15 < (double) num5 * 0.35) + Main.tile[index4, index5].wall = (ushort) 83; + } + } + } + } + int length = WorldGen.genRand.Next(5, 9); + Vector2[] vector2Array = new Vector2[length]; + for (int index6 = 0; index6 < length; ++index6) + { + int x = (int) position.X; + int y = (int) position.Y; + int num16 = 0; + bool flag2 = true; + Vector2 velocity = new Vector2((float) WorldGen.genRand.Next(-20, 21) * 0.15f, (float) WorldGen.genRand.Next(0, 21) * 0.15f); + while (flag2) + { + velocity = new Vector2((float) WorldGen.genRand.Next(-20, 21) * 0.15f, (float) WorldGen.genRand.Next(0, 21) * 0.15f); + while ((double) Math.Abs(velocity.X) + (double) Math.Abs(velocity.Y) < 1.5) + velocity = new Vector2((float) WorldGen.genRand.Next(-20, 21) * 0.15f, (float) WorldGen.genRand.Next(0, 21) * 0.15f); + flag2 = false; + for (int index7 = 0; index7 < index6; ++index7) + { + if ((double) vector2.X > (double) vector2Array[index7].X - 0.75 && (double) vector2.X < (double) vector2Array[index7].X + 0.75 && (double) vector2.Y > (double) vector2Array[index7].Y - 0.75 && (double) vector2.Y < (double) vector2Array[index7].Y + 0.75) + { + flag2 = true; + ++num16; + break; + } + } + if (num16 > 10000) + break; + } + vector2Array[index6] = velocity; + WorldGen.CrimVein(new Vector2((float) x, (float) y), velocity); + } + int num17 = Main.maxTilesX; + int num18 = 0; + position.X = (float) num1; + position.Y = (float) num2; + float num19 = (float) WorldGen.genRand.Next(25, 35); + float num20 = (float) WorldGen.genRand.Next(0, 6); + for (int index8 = 0; index8 < 50; ++index8) + { + if ((double) num20 > 0.0) + { + float num21 = (float) WorldGen.genRand.Next(10, 30) * 0.01f; + num20 -= num21; + position.Y -= num21; + } + int num22 = (int) position.X + WorldGen.genRand.Next(-2, 3); + int num23 = (int) position.Y + WorldGen.genRand.Next(-2, 3); + for (int index9 = (int) ((double) num22 - (double) num19 / 2.0); (double) index9 < (double) num22 + (double) num19 / 2.0; ++index9) + { + for (int index10 = (int) ((double) num23 - (double) num19 / 2.0); (double) index10 < (double) num23 + (double) num19 / 2.0; ++index10) + { + double num24 = (double) Math.Abs(index9 - num22); + float num25 = (float) Math.Abs(index10 - num23); + float num26 = (float) (1.0 + (double) WorldGen.genRand.Next(-20, 21) * 0.00499999988824129); + float num27 = (float) (1.0 + (double) WorldGen.genRand.Next(-20, 21) * 0.00499999988824129); + double num28 = (double) num26; + double num29 = num24 * num28; + float num30 = num25 * num27; + double num31 = Math.Sqrt(num29 * num29 + (double) num30 * (double) num30); + if (num31 < (double) num19 * 0.2 * ((double) WorldGen.genRand.Next(90, 111) * 0.01)) + { + Main.tile[index9, index10].active(false); + Main.tile[index9, index10].wall = (ushort) 83; + } + else if (num31 < (double) num19 * 0.45) + { + if (index9 < num17) + num17 = index9; + if (index9 > num18) + num18 = index9; + if (Main.tile[index9, index10].wall != (ushort) 83) + { + Main.tile[index9, index10].active(true); + Main.tile[index9, index10].type = (ushort) 203; + if (num31 < (double) num19 * 0.35) + Main.tile[index9, index10].wall = (ushort) 83; + } + } + } + } + } + for (int index11 = num17; index11 <= num18; ++index11) + { + int index12 = num2; + while (Main.tile[index11, index12].type == (ushort) 203 && Main.tile[index11, index12].active() || Main.tile[index11, index12].wall == (ushort) 83) + ++index12; + for (int index13 = WorldGen.genRand.Next(15, 20); !Main.tile[index11, index12].active() && index13 > 0 && Main.tile[index11, index12].wall != (ushort) 83; ++index12) + { + --index13; + Main.tile[index11, index12].type = (ushort) 203; + Main.tile[index11, index12].active(true); + } + } + WorldGen.CrimEnt(position, crimDir); + } + + public static void CrimPlaceHearts() + { + for (int index1 = 0; index1 < WorldGen.heartCount; ++index1) + { + int num1 = WorldGen.genRand.Next(16, 21); + int x = (int) WorldGen.heartPos[index1].X; + int y = (int) WorldGen.heartPos[index1].Y; + for (int index2 = x - num1 / 2; index2 < x + num1 / 2; ++index2) + { + for (int index3 = y - num1 / 2; index3 < y + num1 / 2; ++index3) + { + double num2 = (double) Math.Abs(index2 - x); + float num3 = (float) Math.Abs(index3 - y); + if (Math.Sqrt(num2 * num2 + (double) num3 * (double) num3) < (double) num1 * 0.4) + { + Main.tile[index2, index3].active(true); + Main.tile[index2, index3].type = (ushort) 203; + Main.tile[index2, index3].wall = (ushort) 83; + } + } + } + } + for (int index4 = 0; index4 < WorldGen.heartCount; ++index4) + { + int num4 = WorldGen.genRand.Next(10, 14); + int x = (int) WorldGen.heartPos[index4].X; + int y = (int) WorldGen.heartPos[index4].Y; + for (int index5 = x - num4 / 2; index5 < x + num4 / 2; ++index5) + { + for (int index6 = y - num4 / 2; index6 < y + num4 / 2; ++index6) + { + double num5 = (double) Math.Abs(index5 - x); + float num6 = (float) Math.Abs(index6 - y); + if (Math.Sqrt(num5 * num5 + (double) num6 * (double) num6) < (double) num4 * 0.3) + { + Main.tile[index5, index6].active(false); + Main.tile[index5, index6].wall = (ushort) 83; + } + } + } + } + for (int index = 0; index < WorldGen.heartCount; ++index) + WorldGen.AddShadowOrb((int) WorldGen.heartPos[index].X, (int) WorldGen.heartPos[index].Y); + } + + public static void CrimEnt(Vector2 position, int crimDir) + { + float num1 = 0.0f; + float num2 = (float) WorldGen.genRand.Next(6, 11); + bool flag = true; + Vector2 vector2 = new Vector2(2f, (float) WorldGen.genRand.Next(-20, 0) * 0.01f); + vector2.X *= (float) -crimDir; + while (flag) + { + ++num1; + if ((double) num1 >= 20.0) + flag = false; + num2 += (float) WorldGen.genRand.Next(-10, 11) * 0.02f; + if ((double) num2 < 6.0) + num2 = 6f; + if ((double) num2 > 10.0) + num2 = 10f; + for (int index1 = (int) ((double) position.X - (double) num2 / 2.0); (double) index1 < (double) position.X + (double) num2 / 2.0; ++index1) + { + for (int index2 = (int) ((double) position.Y - (double) num2 / 2.0); (double) index2 < (double) position.Y + (double) num2 / 2.0; ++index2) + { + double num3 = (double) Math.Abs((float) index1 - position.X); + float num4 = Math.Abs((float) index2 - position.Y); + if (Math.Sqrt(num3 * num3 + (double) num4 * (double) num4) < (double) num2 * 0.5 && Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 203) + { + Main.tile[index1, index2].active(false); + flag = true; + num1 = 0.0f; + } + } + } + position += vector2; + } + } + + public static void CrimVein(Vector2 position, Vector2 velocity) + { + float num1 = (float) WorldGen.genRand.Next(15, 26); + bool flag = true; + Vector2 vector2_1 = velocity; + Vector2 vector2_2 = position; + int num2 = WorldGen.genRand.Next(100, 150); + if ((double) velocity.Y < 0.0) + num2 -= 25; + while (flag) + { + num1 += (float) WorldGen.genRand.Next(-50, 51) * 0.02f; + if ((double) num1 < 15.0) + num1 = 15f; + if ((double) num1 > 25.0) + num1 = 25f; + for (int index1 = (int) ((double) position.X - (double) num1 / 2.0); (double) index1 < (double) position.X + (double) num1 / 2.0; ++index1) + { + for (int index2 = (int) ((double) position.Y - (double) num1 / 2.0); (double) index2 < (double) position.Y + (double) num1 / 2.0; ++index2) + { + double num3 = (double) Math.Abs((float) index1 - position.X); + float num4 = Math.Abs((float) index2 - position.Y); + double num5 = Math.Sqrt(num3 * num3 + (double) num4 * (double) num4); + if (num5 < (double) num1 * 0.2) + { + Main.tile[index1, index2].active(false); + Main.tile[index1, index2].wall = (ushort) 83; + } + else if (num5 < (double) num1 * 0.5 && Main.tile[index1, index2].wall != (ushort) 83) + { + Main.tile[index1, index2].active(true); + Main.tile[index1, index2].type = (ushort) 203; + if (num5 < (double) num1 * 0.4) + Main.tile[index1, index2].wall = (ushort) 83; + } + } + } + velocity.X += (float) WorldGen.genRand.Next(-50, 51) * 0.05f; + velocity.Y += (float) WorldGen.genRand.Next(-50, 51) * 0.05f; + if ((double) velocity.Y < (double) vector2_1.Y - 0.75) + velocity.Y = vector2_1.Y - 0.75f; + if ((double) velocity.Y > (double) vector2_1.Y + 0.75) + velocity.Y = vector2_1.Y + 0.75f; + if ((double) velocity.X < (double) vector2_1.X - 0.75) + velocity.X = vector2_1.X - 0.75f; + if ((double) velocity.X > (double) vector2_1.X + 0.75) + velocity.X = vector2_1.X + 0.75f; + position += velocity; + if ((double) Math.Abs(position.X - vector2_2.X) + (double) Math.Abs(position.Y - vector2_2.Y) > (double) num2) + flag = false; + } + WorldGen.heartPos[WorldGen.heartCount] = position; + ++WorldGen.heartCount; + } + + public static void ChasmRunner(int i, int j, int steps, bool makeOrb = false) + { + bool flag1 = false; + bool flag2 = false; + bool flag3 = false; + if (!makeOrb) + flag2 = true; + float num1 = (float) steps; + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j; + Vector2 vector2_2; + vector2_2.X = (float) WorldGen.genRand.Next(-10, 11) * 0.1f; + vector2_2.Y = (float) ((double) WorldGen.genRand.Next(11) * 0.200000002980232 + 0.5); + int num2 = 5; + double num3 = (double) (WorldGen.genRand.Next(5) + 7); + while (num3 > 0.0) + { + if ((double) num1 > 0.0) + { + num3 = num3 + (double) WorldGen.genRand.Next(3) - (double) WorldGen.genRand.Next(3); + if (num3 < 7.0) + num3 = 7.0; + if (num3 > 20.0) + num3 = 20.0; + if ((double) num1 == 1.0 && num3 < 10.0) + num3 = 10.0; + } + else if ((double) vector2_1.Y > Main.worldSurface + 45.0) + num3 -= (double) WorldGen.genRand.Next(4); + if ((double) vector2_1.Y > Main.rockLayer && (double) num1 > 0.0) + num1 = 0.0f; + --num1; + if (!flag1 && (double) vector2_1.Y > Main.worldSurface + 20.0) + { + flag1 = true; + WorldGen.ChasmRunnerSideways((int) vector2_1.X, (int) vector2_1.Y, -1, WorldGen.genRand.Next(20, 40)); + WorldGen.ChasmRunnerSideways((int) vector2_1.X, (int) vector2_1.Y, 1, WorldGen.genRand.Next(20, 40)); + } + if ((double) num1 > (double) num2) + { + int num4 = (int) ((double) vector2_1.X - num3 * 0.5); + int num5 = (int) ((double) vector2_1.X + num3 * 0.5); + int num6 = (int) ((double) vector2_1.Y - num3 * 0.5); + int num7 = (int) ((double) vector2_1.Y + num3 * 0.5); + if (num4 < 0) + num4 = 0; + if (num5 > Main.maxTilesX - 1) + num5 = Main.maxTilesX - 1; + if (num6 < 0) + num6 = 0; + if (num7 > Main.maxTilesY) + num7 = Main.maxTilesY; + for (int index1 = num4; index1 < num5; ++index1) + { + for (int index2 = num6; index2 < num7; ++index2) + { + if ((double) Math.Abs((float) index1 - vector2_1.X) + (double) Math.Abs((float) index2 - vector2_1.Y) < num3 * 0.5 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.015) && Main.tile[index1, index2].type != (ushort) 31 && Main.tile[index1, index2].type != (ushort) 22) + Main.tile[index1, index2].active(false); + } + } + } + if ((double) num1 <= 2.0 && (double) vector2_1.Y < Main.worldSurface + 45.0) + num1 = 2f; + if ((double) num1 <= 0.0) + { + if (!flag2) + { + flag2 = true; + WorldGen.AddShadowOrb((int) vector2_1.X, (int) vector2_1.Y); + } + else if (!flag3) + { + flag3 = false; + bool flag4 = false; + int num8 = 0; + while (!flag4) + { + int x = WorldGen.genRand.Next((int) vector2_1.X - 25, (int) vector2_1.X + 25); + int y = WorldGen.genRand.Next((int) vector2_1.Y - 50, (int) vector2_1.Y); + if (x < 5) + x = 5; + if (x > Main.maxTilesX - 5) + x = Main.maxTilesX - 5; + if (y < 5) + y = 5; + if (y > Main.maxTilesY - 5) + y = Main.maxTilesY - 5; + if ((double) y > Main.worldSurface) + { + if (!WorldGen.IsTileNearby(x, y, 26, 3)) + WorldGen.Place3x2(x, y, (ushort) 26); + if (Main.tile[x, y].type == (ushort) 26) + { + flag4 = true; + } + else + { + ++num8; + if (num8 >= 10000) + flag4 = true; + } + } + else + flag4 = true; + } + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.01f; + if ((double) vector2_2.X > 0.3) + vector2_2.X = 0.3f; + if ((double) vector2_2.X < -0.3) + vector2_2.X = -0.3f; + int num9 = (int) ((double) vector2_1.X - num3 * 1.1); + int num10 = (int) ((double) vector2_1.X + num3 * 1.1); + int num11 = (int) ((double) vector2_1.Y - num3 * 1.1); + int num12 = (int) ((double) vector2_1.Y + num3 * 1.1); + if (num9 < 1) + num9 = 1; + if (num10 > Main.maxTilesX - 1) + num10 = Main.maxTilesX - 1; + if (num11 < 0) + num11 = 0; + if (num12 > Main.maxTilesY) + num12 = Main.maxTilesY; + for (int index3 = num9; index3 < num10; ++index3) + { + for (int index4 = num11; index4 < num12; ++index4) + { + if ((double) Math.Abs((float) index3 - vector2_1.X) + (double) Math.Abs((float) index4 - vector2_1.Y) < num3 * 1.1 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.015)) + { + if (Main.tile[index3, index4].type != (ushort) 25 && index4 > j + WorldGen.genRand.Next(3, 20)) + Main.tile[index3, index4].active(true); + if (steps <= num2) + Main.tile[index3, index4].active(true); + if (Main.tile[index3, index4].type != (ushort) 31) + Main.tile[index3, index4].type = (ushort) 25; + } + } + } + for (int index5 = num9; index5 < num10; ++index5) + { + for (int index6 = num11; index6 < num12; ++index6) + { + if ((double) Math.Abs((float) index5 - vector2_1.X) + (double) Math.Abs((float) index6 - vector2_1.Y) < num3 * 1.1 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.015)) + { + if (Main.tile[index5, index6].type != (ushort) 31) + Main.tile[index5, index6].type = (ushort) 25; + if (steps <= num2) + Main.tile[index5, index6].active(true); + if (index6 > j + WorldGen.genRand.Next(3, 20)) + Main.tile[index5, index6].wall = (ushort) 3; + } + } + } + } + } + + public static void GERunner(int i, int j, float speedX = 0.0f, float speedY = 0.0f, bool good = true) + { + int num1 = 0; + for (int index1 = 20; index1 < Main.maxTilesX - 20; ++index1) + { + for (int index2 = 20; index2 < Main.maxTilesY - 20; ++index2) + { + if (Main.tile[index1, index2].active() && Main.tile[index1, index2].type == (ushort) 225) + ++num1; + } + } + bool flag1 = false; + if (num1 > 200000) + flag1 = true; + int num2 = (int) ((double) WorldGen.genRand.Next(200, 250) * (double) (Main.maxTilesX / 4200)); + double num3 = (double) num2; + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j; + Vector2 vector2_2; + vector2_2.X = (float) WorldGen.genRand.Next(-10, 11) * 0.1f; + vector2_2.Y = (float) WorldGen.genRand.Next(-10, 11) * 0.1f; + if ((double) speedX != 0.0 || (double) speedY != 0.0) + { + vector2_2.X = speedX; + vector2_2.Y = speedY; + } + bool flag2 = true; + while (flag2) + { + int num4 = (int) ((double) vector2_1.X - num3 * 0.5); + int num5 = (int) ((double) vector2_1.X + num3 * 0.5); + int num6 = (int) ((double) vector2_1.Y - num3 * 0.5); + int num7 = (int) ((double) vector2_1.Y + num3 * 0.5); + if (num4 < 0) + num4 = 0; + if (num5 > Main.maxTilesX) + num5 = Main.maxTilesX; + if (num6 < 0) + num6 = 0; + if (num7 > Main.maxTilesY - 5) + num7 = Main.maxTilesY - 5; + for (int i1 = num4; i1 < num5; ++i1) + { + for (int j1 = num6; j1 < num7; ++j1) + { + if ((double) Math.Abs((float) i1 - vector2_1.X) + (double) Math.Abs((float) j1 - vector2_1.Y) < (double) num2 * 0.5 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.015)) + { + if (good) + { + if (Main.tile[i1, j1].wall == (ushort) 63 || Main.tile[i1, j1].wall == (ushort) 65 || Main.tile[i1, j1].wall == (ushort) 66 || Main.tile[i1, j1].wall == (ushort) 68 || Main.tile[i1, j1].wall == (ushort) 69 || Main.tile[i1, j1].wall == (ushort) 81) + Main.tile[i1, j1].wall = (ushort) 70; + else if (Main.tile[i1, j1].wall == (ushort) 216) + Main.tile[i1, j1].wall = (ushort) 219; + else if (Main.tile[i1, j1].wall == (ushort) 187) + Main.tile[i1, j1].wall = (ushort) 222; + if (Main.tile[i1, j1].wall == (ushort) 3 || Main.tile[i1, j1].wall == (ushort) 83) + Main.tile[i1, j1].wall = (ushort) 28; + if (flag1 && Main.tile[i1, j1].type == (ushort) 225) + { + Main.tile[i1, j1].type = (ushort) 117; + WorldGen.SquareTileFrame(i1, j1); + } + else if (flag1 && Main.tile[i1, j1].type == (ushort) 230) + { + Main.tile[i1, j1].type = (ushort) 402; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 2) + { + Main.tile[i1, j1].type = (ushort) 109; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 1) + { + Main.tile[i1, j1].type = (ushort) 117; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 53 || Main.tile[i1, j1].type == (ushort) 123) + { + Main.tile[i1, j1].type = (ushort) 116; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 23 || Main.tile[i1, j1].type == (ushort) 199) + { + Main.tile[i1, j1].type = (ushort) 109; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 25 || Main.tile[i1, j1].type == (ushort) 203) + { + Main.tile[i1, j1].type = (ushort) 117; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 112 || Main.tile[i1, j1].type == (ushort) 234) + { + Main.tile[i1, j1].type = (ushort) 116; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 161 || Main.tile[i1, j1].type == (ushort) 163 || Main.tile[i1, j1].type == (ushort) 200) + { + Main.tile[i1, j1].type = (ushort) 164; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 396) + { + Main.tile[i1, j1].type = (ushort) 403; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 397) + { + Main.tile[i1, j1].type = (ushort) 402; + WorldGen.SquareTileFrame(i1, j1); + } + } + else if (WorldGen.crimson) + { + if (Main.tile[i1, j1].wall == (ushort) 63 || Main.tile[i1, j1].wall == (ushort) 65 || Main.tile[i1, j1].wall == (ushort) 66 || Main.tile[i1, j1].wall == (ushort) 68) + Main.tile[i1, j1].wall = (ushort) 81; + else if (Main.tile[i1, j1].wall == (ushort) 216) + Main.tile[i1, j1].wall = (ushort) 218; + else if (Main.tile[i1, j1].wall == (ushort) 187) + Main.tile[i1, j1].wall = (ushort) 221; + if (flag1 && Main.tile[i1, j1].type == (ushort) 225) + { + Main.tile[i1, j1].type = (ushort) 203; + WorldGen.SquareTileFrame(i1, j1); + } + else if (flag1 && Main.tile[i1, j1].type == (ushort) 230) + { + Main.tile[i1, j1].type = (ushort) 399; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 2) + { + Main.tile[i1, j1].type = (ushort) 199; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 1) + { + Main.tile[i1, j1].type = (ushort) 203; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 53 || Main.tile[i1, j1].type == (ushort) 123) + { + Main.tile[i1, j1].type = (ushort) 234; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 109) + { + Main.tile[i1, j1].type = (ushort) 199; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 117) + { + Main.tile[i1, j1].type = (ushort) 203; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 116) + { + Main.tile[i1, j1].type = (ushort) 234; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 161 || Main.tile[i1, j1].type == (ushort) 164) + { + Main.tile[i1, j1].type = (ushort) 200; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 396) + { + Main.tile[i1, j1].type = (ushort) 401; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 397) + { + Main.tile[i1, j1].type = (ushort) 399; + WorldGen.SquareTileFrame(i1, j1); + } + } + else + { + if (Main.tile[i1, j1].wall == (ushort) 63 || Main.tile[i1, j1].wall == (ushort) 65 || Main.tile[i1, j1].wall == (ushort) 66 || Main.tile[i1, j1].wall == (ushort) 68) + Main.tile[i1, j1].wall = (ushort) 69; + else if (Main.tile[i1, j1].wall == (ushort) 216) + Main.tile[i1, j1].wall = (ushort) 217; + else if (Main.tile[i1, j1].wall == (ushort) 187) + Main.tile[i1, j1].wall = (ushort) 220; + if (flag1 && Main.tile[i1, j1].type == (ushort) 225) + { + Main.tile[i1, j1].type = (ushort) 25; + WorldGen.SquareTileFrame(i1, j1); + } + else if (flag1 && Main.tile[i1, j1].type == (ushort) 230) + { + Main.tile[i1, j1].type = (ushort) 398; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 2) + { + Main.tile[i1, j1].type = (ushort) 23; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 1) + { + Main.tile[i1, j1].type = (ushort) 25; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 53 || Main.tile[i1, j1].type == (ushort) 123) + { + Main.tile[i1, j1].type = (ushort) 112; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 109) + { + Main.tile[i1, j1].type = (ushort) 23; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 117) + { + Main.tile[i1, j1].type = (ushort) 25; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 116) + { + Main.tile[i1, j1].type = (ushort) 112; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 161 || Main.tile[i1, j1].type == (ushort) 164) + { + Main.tile[i1, j1].type = (ushort) 163; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 396) + { + Main.tile[i1, j1].type = (ushort) 400; + WorldGen.SquareTileFrame(i1, j1); + } + else if (Main.tile[i1, j1].type == (ushort) 397) + { + Main.tile[i1, j1].type = (ushort) 398; + WorldGen.SquareTileFrame(i1, j1); + } + } + } + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if ((double) vector2_2.X > (double) speedX + 1.0) + vector2_2.X = speedX + 1f; + if ((double) vector2_2.X < (double) speedX - 1.0) + vector2_2.X = speedX - 1f; + if ((double) vector2_1.X < (double) -num2 || (double) vector2_1.Y < (double) -num2 || (double) vector2_1.X > (double) (Main.maxTilesX + num2) || (double) vector2_1.Y > (double) (Main.maxTilesY + num2)) + flag2 = false; + } + } + + private static bool badOceanCaveTiles(int x, int y) => Main.tile[x, y].wall == (ushort) 83 || Main.tile[x, y].wall == (ushort) 3 || Main.wallDungeon[(int) Main.tile[x, y].wall] || Main.tile[x, y].type == (ushort) 203 || Main.tile[x, y].type == (ushort) 25 || Main.tileDungeon[(int) Main.tile[x, y].type] || Main.tile[x, y].type == (ushort) 26 || Main.tile[x, y].type == (ushort) 31; + + public static void oceanCave(int i, int j) + { + if (WorldGen.numOceanCaveTreasure >= WorldGen.maxOceanCaveTreasure) + WorldGen.numOceanCaveTreasure = 0; + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j; + Vector2 vector2_2; + vector2_2.X = i >= Main.maxTilesX / 2 ? (float) (-0.349999994039536 - (double) WorldGen.genRand.NextFloat() * 0.5) : (float) (0.25 + (double) WorldGen.genRand.NextFloat() * 0.25); + vector2_2.Y = (float) (0.400000005960464 + (double) WorldGen.genRand.NextFloat() * 0.25); + ushort num1 = 264; + ushort num2 = 53; + ushort num3 = 397; + double num4 = (double) WorldGen.genRand.Next(17, 25); + double num5 = (double) WorldGen.genRand.Next(600, 800); + double num6 = 4.0; + bool flag1 = true; + while (num4 > num6 && num5 > 0.0) + { + bool flag2 = true; + bool flag3 = true; + bool flag4 = true; + if ((double) vector2_1.X > (double) (WorldGen.beachDistance - 50) && (double) vector2_1.X < (double) (Main.maxTilesX - WorldGen.beachDistance + 50)) + { + num4 *= 0.959999978542328; + num5 *= 0.959999978542328; + } + if (num4 < num6 + 2.0 || num5 < 20.0) + flag4 = false; + if (flag1) + { + num4 -= 0.01 + (double) WorldGen.genRand.NextFloat() * 0.01; + num5 -= 0.5; + } + else + { + num4 -= 0.02 + (double) WorldGen.genRand.NextFloat() * 0.02; + --num5; + } + if (flag4) + { + WorldGen.oceanCaveTreasure[WorldGen.numOceanCaveTreasure].X = (int) vector2_1.X; + WorldGen.oceanCaveTreasure[WorldGen.numOceanCaveTreasure].Y = (int) vector2_1.Y; + } + int num7 = (int) ((double) vector2_1.X - num4 * 3.0); + int num8 = (int) ((double) vector2_1.X + num4 * 3.0); + int num9 = (int) ((double) vector2_1.Y - num4 * 3.0); + int num10 = (int) ((double) vector2_1.Y + num4 * 3.0); + if (num7 < 1) + num7 = 1; + if (num8 > Main.maxTilesX - 1) + num8 = Main.maxTilesX - 1; + if (num9 < 1) + num9 = 1; + if (num10 > Main.maxTilesY - 1) + num10 = Main.maxTilesY - 1; + for (int x1 = num7; x1 < num8; ++x1) + { + for (int y1 = num9; y1 < num10; ++y1) + { + if (!WorldGen.badOceanCaveTiles(x1, y1)) + { + float num11 = new Vector2(Math.Abs((float) x1 - vector2_1.X), Math.Abs((float) y1 - vector2_1.Y)).Length(); + if (flag4 && (double) num11 < num4 * 0.5 + 1.0) + { + Main.tile[x1, y1].type = num1; + Main.tile[x1, y1].active(false); + } + else if ((double) num11 < num4 * 1.5 + 1.0 && (int) Main.tile[x1, y1].type != (int) num1) + { + if ((double) y1 < (double) vector2_1.Y) + { + if ((double) vector2_2.X < 0.0 && (double) x1 < (double) vector2_1.X || (double) vector2_2.X > 0.0 && (double) x1 > (double) vector2_1.X) + { + if ((double) num11 < num4 * 1.1 + 1.0) + { + Main.tile[x1, y1].type = num3; + if (Main.tile[x1, y1].liquid == byte.MaxValue) + Main.tile[x1, y1].wall = (ushort) 0; + } + else if ((int) Main.tile[x1, y1].type != (int) num3) + Main.tile[x1, y1].type = num2; + } + } + else if ((double) vector2_2.X < 0.0 && x1 < i || (double) vector2_2.X > 0.0 && x1 > i) + { + if (Main.tile[x1, y1].liquid == byte.MaxValue) + Main.tile[x1, y1].wall = (ushort) 0; + Main.tile[x1, y1].type = num2; + Main.tile[x1, y1].active(true); + if (x1 == (int) vector2_1.X & flag2) + { + flag2 = false; + int num12 = 50 + WorldGen.genRand.Next(3); + int num13 = 43 + WorldGen.genRand.Next(3); + int num14 = 20 + WorldGen.genRand.Next(3); + int num15 = x1; + int num16 = x1 + num14; + if ((double) vector2_2.X < 0.0) + { + num15 = x1 - num14; + num16 = x1; + } + if (num5 < 100.0) + { + num12 = (int) ((double) num12 * (num5 / 100.0)); + num13 = (int) ((double) num13 * (num5 / 100.0)); + num14 = (int) ((double) num14 * (num5 / 100.0)); + } + if (num4 < num6 + 5.0) + { + double num17 = (num4 - num6) / 5.0; + num12 = (int) ((double) num12 * num17); + num13 = (int) ((double) num13 * num17); + int num18 = (int) ((double) num14 * num17); + } + for (int index1 = num15; index1 <= num16; ++index1) + { + for (int index2 = y1; index2 < y1 + num12 && !WorldGen.badOceanCaveTiles(index1, index2); ++index2) + { + if (index2 > y1 + num13) + { + if (!WorldGen.SolidTile(index1, index2) || (int) Main.tile[index1, index2].type == (int) num2) + Main.tile[index1, index2].type = num3; + else + break; + } + else + Main.tile[index1, index2].type = num2; + Main.tile[index1, index2].active(true); + if (WorldGen.genRand.Next(3) == 0) + { + Main.tile[index1 - 1, index2].type = num2; + Main.tile[index1 - 1, index2].active(true); + } + if (WorldGen.genRand.Next(3) == 0) + { + Main.tile[index1 + 1, index2].type = num2; + Main.tile[index1 + 1, index2].active(true); + } + } + } + } + } + } + if ((double) num11 < num4 * 1.3 + 1.0 && y1 > j - 10) + Main.tile[x1, y1].liquid = byte.MaxValue; + if (flag3 && x1 == (int) vector2_1.X && (double) y1 > (double) vector2_1.Y) + { + flag3 = false; + int num19 = 100; + int num20 = 2; + for (int x2 = x1 - num20; x2 <= x1 + num20; ++x2) + { + for (int y2 = y1; y2 < y1 + num19; ++y2) + { + if (!WorldGen.badOceanCaveTiles(x2, y2)) + Main.tile[x2, y2].liquid = byte.MaxValue; + } + } + } + } + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) ((double) WorldGen.genRand.NextFloat() * 0.100000001490116 - 0.0500000007450581); + vector2_2.Y += (float) ((double) WorldGen.genRand.NextFloat() * 0.100000001490116 - 0.0500000007450581); + if (flag1) + { + if ((double) vector2_1.Y > (Main.worldSurface * 2.0 + Main.rockLayer) / 3.0 && (double) vector2_1.Y > (double) (j + 30)) + flag1 = false; + vector2_2.Y = MathHelper.Clamp(vector2_2.Y, 0.35f, 1f); + } + else + { + if ((double) vector2_1.X < (double) (Main.maxTilesX / 2)) + { + if ((double) vector2_2.X < 0.5) + vector2_2.X += 0.02f; + } + else if ((double) vector2_2.X > -0.5) + vector2_2.X -= 0.02f; + if (!flag4) + { + if ((double) vector2_2.Y < 0.0) + vector2_2.Y *= 0.95f; + vector2_2.Y += 0.04f; + } + else if ((double) vector2_1.Y < (Main.worldSurface * 4.0 + Main.rockLayer) / 5.0) + { + if ((double) vector2_2.Y < 0.0) + vector2_2.Y *= 0.97f; + vector2_2.Y += 0.02f; + } + else if ((double) vector2_2.Y > -0.100000001490116) + { + vector2_2.Y *= 0.99f; + vector2_2.Y -= 0.01f; + } + vector2_2.Y = MathHelper.Clamp(vector2_2.Y, -1f, 1f); + } + vector2_2.X = (double) vector2_1.X >= (double) (Main.maxTilesX / 2) ? MathHelper.Clamp(vector2_2.X, -1f, -0.1f) : MathHelper.Clamp(vector2_2.X, 0.1f, 1f); + } + ++WorldGen.numOceanCaveTreasure; + } + + public static void TileRunner( + int i, + int j, + double strength, + int steps, + int type, + bool addTile = false, + float speedX = 0.0f, + float speedY = 0.0f, + bool noYChange = false, + bool overRide = true, + int ignoreTileType = -1) + { + if (WorldGen.drunkWorldGen) + { + strength *= 1.0 + (double) WorldGen.genRand.Next(-80, 81) * 0.00999999977648258; + steps = (int) ((double) steps * (1.0 + (double) WorldGen.genRand.Next(-80, 81) * 0.00999999977648258)); + } + if (WorldGen.getGoodWorldGen && type != 57) + { + strength *= 1.0 + (double) WorldGen.genRand.Next(-80, 81) * 0.0149999996647239; + steps += WorldGen.genRand.Next(3); + } + double num1 = strength; + float num2 = (float) steps; + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j; + Vector2 vector2_2; + vector2_2.X = (float) WorldGen.genRand.Next(-10, 11) * 0.1f; + vector2_2.Y = (float) WorldGen.genRand.Next(-10, 11) * 0.1f; + if ((double) speedX != 0.0 || (double) speedY != 0.0) + { + vector2_2.X = speedX; + vector2_2.Y = speedY; + } + bool flag1 = type == 368; + bool flag2 = type == 367; + bool lava = false; + if (WorldGen.getGoodWorldGen && WorldGen.genRand.Next(4) == 0) + lava = true; + while (num1 > 0.0 && (double) num2 > 0.0) + { + if (WorldGen.drunkWorldGen && WorldGen.genRand.Next(30) == 0) + { + vector2_1.X += (float) WorldGen.genRand.Next(-100, 101) * 0.05f; + vector2_1.Y += (float) WorldGen.genRand.Next(-100, 101) * 0.05f; + } + if ((double) vector2_1.Y < 0.0 && (double) num2 > 0.0 && type == 59) + num2 = 0.0f; + num1 = strength * ((double) num2 / (double) steps); + --num2; + int num3 = (int) ((double) vector2_1.X - num1 * 0.5); + int num4 = (int) ((double) vector2_1.X + num1 * 0.5); + int num5 = (int) ((double) vector2_1.Y - num1 * 0.5); + int num6 = (int) ((double) vector2_1.Y + num1 * 0.5); + if (num3 < 1) + num3 = 1; + if (num4 > Main.maxTilesX - 1) + num4 = Main.maxTilesX - 1; + if (num5 < 1) + num5 = 1; + if (num6 > Main.maxTilesY - 1) + num6 = Main.maxTilesY - 1; + for (int index1 = num3; index1 < num4; ++index1) + { + if (index1 < WorldGen.beachDistance + 50 || index1 >= Main.maxTilesX - WorldGen.beachDistance - 50) + lava = false; + for (int index2 = num5; index2 < num6; ++index2) + { + if ((!WorldGen.drunkWorldGen || index2 >= Main.maxTilesY - 300 || type != 57) && (ignoreTileType < 0 || !Main.tile[index1, index2].active() || (int) Main.tile[index1, index2].type != ignoreTileType) && (double) Math.Abs((float) index1 - vector2_1.X) + (double) Math.Abs((float) index2 - vector2_1.Y) < strength * 0.5 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.015)) + { + if (WorldGen.mudWall && (double) index2 > Main.worldSurface && Main.tile[index1, index2 - 1].wall != (ushort) 2 && index2 < Main.maxTilesY - 210 - WorldGen.genRand.Next(3) && (double) Math.Abs((float) index1 - vector2_1.X) + (double) Math.Abs((float) index2 - vector2_1.Y) < strength * 0.45 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.01)) + { + if (index2 > WorldGen.lavaLine - WorldGen.genRand.Next(0, 4) - 50) + { + if (Main.tile[index1, index2 - 1].wall != (ushort) 64 && Main.tile[index1, index2 + 1].wall != (ushort) 64 && Main.tile[index1 - 1, index2].wall != (ushort) 64 && Main.tile[index1, index2 + 1].wall != (ushort) 64) + WorldGen.PlaceWall(index1, index2, 15, true); + } + else if (Main.tile[index1, index2 - 1].wall != (ushort) 15 && Main.tile[index1, index2 + 1].wall != (ushort) 15 && Main.tile[index1 - 1, index2].wall != (ushort) 15 && Main.tile[index1, index2 + 1].wall != (ushort) 15) + WorldGen.PlaceWall(index1, index2, 64, true); + } + if (type < 0) + { + if (Main.tile[index1, index2].type != (ushort) 53) + { + if (type == -2 && Main.tile[index1, index2].active() && (index2 < WorldGen.waterLine || index2 > WorldGen.lavaLine)) + { + Main.tile[index1, index2].liquid = byte.MaxValue; + Main.tile[index1, index2].lava(lava); + if (index2 > WorldGen.lavaLine) + Main.tile[index1, index2].lava(true); + } + Main.tile[index1, index2].active(false); + } + } + else + { + if (flag1 && (double) Math.Abs((float) index1 - vector2_1.X) + (double) Math.Abs((float) index2 - vector2_1.Y) < strength * 0.3 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.01)) + WorldGen.PlaceWall(index1, index2, 180, true); + if (flag2 && (double) Math.Abs((float) index1 - vector2_1.X) + (double) Math.Abs((float) index2 - vector2_1.Y) < strength * 0.3 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.01)) + WorldGen.PlaceWall(index1, index2, 178, true); + if (overRide || !Main.tile[index1, index2].active()) + { + Tile tile = Main.tile[index1, index2]; + bool flag3 = Main.tileStone[type] && tile.type != (ushort) 1; + if (!TileID.Sets.CanBeClearedDuringGeneration[(int) tile.type]) + flag3 = true; + switch (tile.type) + { + case 1: + if (type == 59 && (double) index2 < Main.worldSurface + (double) WorldGen.genRand.Next(-50, 50)) + { + flag3 = true; + break; + } + break; + case 45: + case 147: + case 189: + case 190: + case 196: + case 460: + flag3 = true; + break; + case 53: + if (type == 59 && WorldGen.UndergroundDesertLocation.Contains(index1, index2)) + flag3 = true; + if (type == 40) + flag3 = true; + if ((double) index2 < Main.worldSurface && type != 59) + { + flag3 = true; + break; + } + break; + case 367: + case 368: + if (type == 59) + { + flag3 = true; + break; + } + break; + case 396: + case 397: + flag3 = !TileID.Sets.Ore[type]; + break; + } + if (!flag3) + tile.type = (ushort) type; + } + if (addTile) + { + Main.tile[index1, index2].active(true); + Main.tile[index1, index2].liquid = (byte) 0; + Main.tile[index1, index2].lava(false); + } + if (noYChange && (double) index2 < Main.worldSurface && type != 59) + Main.tile[index1, index2].wall = (ushort) 2; + if (type == 59 && index2 > WorldGen.waterLine && Main.tile[index1, index2].liquid > (byte) 0) + { + Main.tile[index1, index2].lava(false); + Main.tile[index1, index2].liquid = (byte) 0; + } + } + } + } + } + vector2_1 += vector2_2; + if ((!WorldGen.drunkWorldGen || WorldGen.genRand.Next(3) != 0) && num1 > 50.0) + { + vector2_1 += vector2_2; + --num2; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if (num1 > 100.0) + { + vector2_1 += vector2_2; + --num2; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if (num1 > 150.0) + { + vector2_1 += vector2_2; + --num2; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if (num1 > 200.0) + { + vector2_1 += vector2_2; + --num2; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if (num1 > 250.0) + { + vector2_1 += vector2_2; + --num2; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if (num1 > 300.0) + { + vector2_1 += vector2_2; + --num2; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if (num1 > 400.0) + { + vector2_1 += vector2_2; + --num2; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if (num1 > 500.0) + { + vector2_1 += vector2_2; + --num2; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if (num1 > 600.0) + { + vector2_1 += vector2_2; + --num2; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if (num1 > 700.0) + { + vector2_1 += vector2_2; + --num2; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if (num1 > 800.0) + { + vector2_1 += vector2_2; + --num2; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if (num1 > 900.0) + { + vector2_1 += vector2_2; + --num2; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + } + } + } + } + } + } + } + } + } + } + } + } + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if (WorldGen.drunkWorldGen) + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.25f; + if ((double) vector2_2.X > 1.0) + vector2_2.X = 1f; + if ((double) vector2_2.X < -1.0) + vector2_2.X = -1f; + if (!noYChange) + { + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if ((double) vector2_2.Y > 1.0) + vector2_2.Y = 1f; + if ((double) vector2_2.Y < -1.0) + vector2_2.Y = -1f; + } + else if (type != 59 && num1 < 3.0) + { + if ((double) vector2_2.Y > 1.0) + vector2_2.Y = 1f; + if ((double) vector2_2.Y < -1.0) + vector2_2.Y = -1f; + } + if (type == 59 && !noYChange) + { + if ((double) vector2_2.Y > 0.5) + vector2_2.Y = 0.5f; + if ((double) vector2_2.Y < -0.5) + vector2_2.Y = -0.5f; + if ((double) vector2_1.Y < Main.rockLayer + 100.0) + vector2_2.Y = 1f; + if ((double) vector2_1.Y > (double) (Main.maxTilesY - 300)) + vector2_2.Y = -1f; + } + } + } + + public static void DirtyRockRunner(int i, int j) + { + double num1 = (double) WorldGen.genRand.Next(2, 6); + float num2 = (float) WorldGen.genRand.Next(5, 50); + float num3 = num2; + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j; + Vector2 vector2_2; + vector2_2.X = (float) WorldGen.genRand.Next(-10, 11) * 0.1f; + vector2_2.Y = (float) WorldGen.genRand.Next(-10, 11) * 0.1f; + while (num1 > 0.0 && (double) num3 > 0.0) + { + double num4 = num1 * ((double) num3 / (double) num2); + --num3; + int num5 = (int) ((double) vector2_1.X - num4 * 0.5); + int num6 = (int) ((double) vector2_1.X + num4 * 0.5); + int num7 = (int) ((double) vector2_1.Y - num4 * 0.5); + int num8 = (int) ((double) vector2_1.Y + num4 * 0.5); + if (num5 < 0) + num5 = 0; + if (num6 > Main.maxTilesX) + num6 = Main.maxTilesX; + if (num7 < 0) + num7 = 0; + if (num8 > Main.maxTilesY) + num8 = Main.maxTilesY; + for (int index1 = num5; index1 < num6; ++index1) + { + for (int index2 = num7; index2 < num8; ++index2) + { + if ((double) Math.Abs((float) index1 - vector2_1.X) + (double) Math.Abs((float) index2 - vector2_1.Y) < num1 * 0.5 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.015) && Main.tile[index1, index2].wall == (ushort) 2) + Main.tile[index1, index2].wall = (ushort) 59; + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if ((double) vector2_2.X > 1.0) + vector2_2.X = 1f; + if ((double) vector2_2.X < -1.0) + vector2_2.X = -1f; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if ((double) vector2_2.Y > 1.0) + vector2_2.Y = 1f; + if ((double) vector2_2.Y < -1.0) + vector2_2.Y = -1f; + } + } + + public static void MudWallRunner(int i, int j) + { + double num1 = (double) WorldGen.genRand.Next(8, 21); + float num2 = (float) WorldGen.genRand.Next(8, 33); + float num3 = num2; + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j; + Vector2 vector2_2; + vector2_2.X = (float) WorldGen.genRand.Next(-10, 11) * 0.1f; + vector2_2.Y = (float) WorldGen.genRand.Next(-10, 11) * 0.1f; + while (num1 > 0.0 && (double) num3 > 0.0) + { + double num4 = num1 * ((double) num3 / (double) num2); + --num3; + int num5 = (int) ((double) vector2_1.X - num4 * 0.5); + int num6 = (int) ((double) vector2_1.X + num4 * 0.5); + int num7 = (int) ((double) vector2_1.Y - num4 * 0.5); + int num8 = (int) ((double) vector2_1.Y + num4 * 0.5); + if (num5 < 0) + num5 = 0; + if (num6 > Main.maxTilesX) + num6 = Main.maxTilesX; + if (num7 < 0) + num7 = 0; + if (num8 > Main.maxTilesY) + num8 = Main.maxTilesY; + for (int index1 = num5; index1 < num6; ++index1) + { + for (int index2 = num7; index2 < num8; ++index2) + { + if ((double) Math.Abs((float) index1 - vector2_1.X) + (double) Math.Abs((float) index2 - vector2_1.Y) < num1 * 0.5 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.015) && (double) index2 > Main.worldSurface) + Main.tile[index1, index2].wall = (ushort) 0; + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if ((double) vector2_2.X > 1.0) + vector2_2.X = 1f; + if ((double) vector2_2.X < -1.0) + vector2_2.X = -1f; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if ((double) vector2_2.Y > 1.0) + vector2_2.Y = 1f; + if ((double) vector2_2.Y < -1.0) + vector2_2.Y = -1f; + } + } + + public static void SnowCloudIsland(int i, int j) + { + double num1 = (double) WorldGen.genRand.Next(100, 150); + double num2 = num1; + float num3 = (float) WorldGen.genRand.Next(20, 30); + int num4 = i; + int num5 = i; + int num6 = i; + int num7 = j; + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j; + Vector2 vector2_2; + vector2_2.X = (float) WorldGen.genRand.Next(-20, 21) * 0.2f; + while ((double) vector2_2.X > -2.0 && (double) vector2_2.X < 2.0) + vector2_2.X = (float) WorldGen.genRand.Next(-20, 21) * 0.2f; + vector2_2.Y = (float) WorldGen.genRand.Next(-20, -10) * 0.02f; + while (num1 > 0.0 && (double) num3 > 0.0) + { + num1 -= (double) WorldGen.genRand.Next(4); + --num3; + int num8 = (int) ((double) vector2_1.X - num1 * 0.5); + int num9 = (int) ((double) vector2_1.X + num1 * 0.5); + int num10 = (int) ((double) vector2_1.Y - num1 * 0.5); + int num11 = (int) ((double) vector2_1.Y + num1 * 0.5); + if (num8 < 0) + num8 = 0; + if (num9 > Main.maxTilesX) + num9 = Main.maxTilesX; + if (num10 < 0) + num10 = 0; + if (num11 > Main.maxTilesY) + num11 = Main.maxTilesY; + double num12 = num1 * (double) WorldGen.genRand.Next(80, 120) * 0.01; + float num13 = vector2_1.Y + 1f; + for (int i1 = num8; i1 < num9; ++i1) + { + if (WorldGen.genRand.Next(2) == 0) + num13 += (float) WorldGen.genRand.Next(-1, 2); + if ((double) num13 < (double) vector2_1.Y) + num13 = vector2_1.Y; + if ((double) num13 > (double) vector2_1.Y + 2.0) + num13 = vector2_1.Y + 2f; + for (int j1 = num10; j1 < num11; ++j1) + { + if ((double) j1 > (double) num13) + { + double num14 = (double) Math.Abs((float) i1 - vector2_1.X); + float num15 = Math.Abs((float) j1 - vector2_1.Y) * 3f; + if (Math.Sqrt(num14 * num14 + (double) num15 * (double) num15) < num12 * 0.4) + { + if (i1 < num4) + num4 = i1; + if (i1 > num5) + num5 = i1; + if (j1 < num6) + num6 = j1; + if (j1 > num7) + num7 = j1; + Main.tile[i1, j1].active(true); + Main.tile[i1, j1].type = (ushort) 189; + WorldGen.SquareTileFrame(i1, j1); + } + } + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) WorldGen.genRand.Next(-20, 21) * 0.05f; + if ((double) vector2_2.X > 1.0) + vector2_2.X = 1f; + if ((double) vector2_2.X < -1.0) + vector2_2.X = -1f; + if ((double) vector2_2.Y > 0.2) + vector2_2.Y = -0.2f; + if ((double) vector2_2.Y < -0.2) + vector2_2.Y = -0.2f; + } + int minValue1; + for (int index1 = num4 + WorldGen.genRand.Next(5); index1 < num5; index1 += WorldGen.genRand.Next(minValue1, (int) ((double) minValue1 * 1.5))) + { + int index2 = num7; + while (!Main.tile[index1, index2].active()) + --index2; + int num16 = index2 + WorldGen.genRand.Next(-3, 4); + minValue1 = WorldGen.genRand.Next(4, 8); + int num17 = 189; + if (WorldGen.genRand.Next(4) == 0) + num17 = 460; + for (int i2 = index1 - minValue1; i2 <= index1 + minValue1; ++i2) + { + for (int j2 = num16 - minValue1; j2 <= num16 + minValue1; ++j2) + { + if (j2 > num6) + { + double num18 = (double) Math.Abs(i2 - index1); + float num19 = (float) (Math.Abs(j2 - num16) * 2); + if (Math.Sqrt(num18 * num18 + (double) num19 * (double) num19) < (double) (minValue1 + WorldGen.genRand.Next(2))) + { + Main.tile[i2, j2].active(true); + Main.tile[i2, j2].type = (ushort) num17; + WorldGen.SquareTileFrame(i2, j2); + } + } + } + } + } + double num20 = (double) WorldGen.genRand.Next(80, 95); + num2 = num20; + float num21 = (float) WorldGen.genRand.Next(10, 15); + vector2_1.X = (float) i; + vector2_1.Y = (float) num6; + vector2_2.X = (float) WorldGen.genRand.Next(-20, 21) * 0.2f; + while ((double) vector2_2.X > -2.0 && (double) vector2_2.X < 2.0) + vector2_2.X = (float) WorldGen.genRand.Next(-20, 21) * 0.2f; + vector2_2.Y = (float) WorldGen.genRand.Next(-20, -10) * 0.02f; + while (num20 > 0.0 && (double) num21 > 0.0) + { + num20 -= (double) WorldGen.genRand.Next(4); + --num21; + int num22 = (int) ((double) vector2_1.X - num20 * 0.5); + int num23 = (int) ((double) vector2_1.X + num20 * 0.5); + int num24 = num6 - 1; + int num25 = (int) ((double) vector2_1.Y + num20 * 0.5); + if (num22 < 0) + num22 = 0; + if (num23 > Main.maxTilesX) + num23 = Main.maxTilesX; + if (num24 < 0) + num24 = 0; + if (num25 > Main.maxTilesY) + num25 = Main.maxTilesY; + double num26 = num20 * (double) WorldGen.genRand.Next(80, 120) * 0.01; + float num27 = vector2_1.Y + 1f; + for (int i3 = num22; i3 < num23; ++i3) + { + if (WorldGen.genRand.Next(2) == 0) + num27 += (float) WorldGen.genRand.Next(-1, 2); + if ((double) num27 < (double) vector2_1.Y) + num27 = vector2_1.Y; + if ((double) num27 > (double) vector2_1.Y + 2.0) + num27 = vector2_1.Y + 2f; + for (int j3 = num24; j3 < num25; ++j3) + { + if ((double) j3 > (double) num27) + { + double num28 = (double) Math.Abs((float) i3 - vector2_1.X); + float num29 = Math.Abs((float) j3 - vector2_1.Y) * 3f; + if (Math.Sqrt(num28 * num28 + (double) num29 * (double) num29) < num26 * 0.4 && Main.tile[i3, j3].type == (ushort) 189) + { + Main.tile[i3, j3].type = (ushort) 147; + WorldGen.SquareTileFrame(i3, j3); + } + } + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) WorldGen.genRand.Next(-20, 21) * 0.05f; + if ((double) vector2_2.X > 1.0) + vector2_2.X = 1f; + if ((double) vector2_2.X < -1.0) + vector2_2.X = -1f; + if ((double) vector2_2.Y > 0.2) + vector2_2.Y = -0.2f; + if ((double) vector2_2.Y < -0.2) + vector2_2.Y = -0.2f; + } + int index3 = num4 + WorldGen.genRand.Next(5); + while (index3 < num5) + { + int index4 = num7; + while ((!Main.tile[index3, index4].active() || Main.tile[index3, index4].type != (ushort) 0) && index3 < num5) + { + --index4; + if (index4 < num6) + { + index4 = num7; + index3 += WorldGen.genRand.Next(1, 4); + } + } + if (index3 < num5) + { + int num30 = index4 + WorldGen.genRand.Next(0, 4); + int minValue2 = WorldGen.genRand.Next(2, 5); + int num31 = 189; + for (int i4 = index3 - minValue2; i4 <= index3 + minValue2; ++i4) + { + for (int j4 = num30 - minValue2; j4 <= num30 + minValue2; ++j4) + { + if (j4 > num6) + { + double num32 = (double) Math.Abs(i4 - index3); + float num33 = (float) (Math.Abs(j4 - num30) * 2); + if (Math.Sqrt(num32 * num32 + (double) num33 * (double) num33) < (double) minValue2) + { + Main.tile[i4, j4].type = (ushort) num31; + WorldGen.SquareTileFrame(i4, j4); + } + } + } + } + index3 += WorldGen.genRand.Next(minValue2, (int) ((double) minValue2 * 1.5)); + } + } + for (int i5 = num4 - 20; i5 <= num5 + 20; ++i5) + { + for (int j5 = num6 - 20; j5 <= num7 + 20; ++j5) + { + bool flag = true; + for (int index5 = i5 - 1; index5 <= i5 + 1; ++index5) + { + for (int index6 = j5 - 1; index6 <= j5 + 1; ++index6) + { + if (!Main.tile[index5, index6].active()) + flag = false; + } + } + if (flag) + { + Main.tile[i5, j5].wall = (ushort) 73; + WorldGen.SquareWallFrame(i5, j5); + } + } + } + for (int index7 = num4; index7 <= num5; ++index7) + { + int index8 = num6 - 10; + while (!Main.tile[index7, index8 + 1].active()) + ++index8; + if (index8 < num7 && Main.tile[index7, index8 + 1].type == (ushort) 189) + { + if (WorldGen.genRand.Next(10) == 0) + { + int num34 = WorldGen.genRand.Next(1, 3); + for (int x = index7 - num34; x <= index7 + num34; ++x) + { + if (Main.tile[x, index8].type == (ushort) 189 && WorldGen.WillWaterPlacedHereStayPut(x, index8)) + { + Main.tile[x, index8].active(false); + Main.tile[x, index8].liquid = byte.MaxValue; + Main.tile[x, index8].lava(false); + WorldGen.SquareTileFrame(index7, index8); + } + if (Main.tile[x, index8 + 1].type == (ushort) 189 && WorldGen.WillWaterPlacedHereStayPut(x, index8 + 1)) + { + Main.tile[x, index8 + 1].active(false); + Main.tile[x, index8 + 1].liquid = byte.MaxValue; + Main.tile[x, index8 + 1].lava(false); + WorldGen.SquareTileFrame(index7, index8 + 1); + } + if (x > index7 - num34 && x < index7 + 2 && Main.tile[x, index8 + 2].type == (ushort) 189 && WorldGen.WillWaterPlacedHereStayPut(x, index8 + 2)) + { + Main.tile[x, index8 + 2].active(false); + Main.tile[x, index8 + 2].liquid = byte.MaxValue; + Main.tile[x, index8 + 2].lava(false); + WorldGen.SquareTileFrame(index7, index8 + 2); + } + } + } + if (WorldGen.genRand.Next(5) == 0 && WorldGen.WillWaterPlacedHereStayPut(index7, index8)) + Main.tile[index7, index8].liquid = byte.MaxValue; + Main.tile[index7, index8].lava(false); + WorldGen.SquareTileFrame(index7, index8); + } + } + int num35 = WorldGen.genRand.Next(4); + for (int index9 = 0; index9 <= num35; ++index9) + { + int num36 = WorldGen.genRand.Next(num4 - 5, num5 + 5); + int num37 = num6 - WorldGen.genRand.Next(20, 40); + int num38 = WorldGen.genRand.Next(4, 8); + int num39 = 189; + if (WorldGen.genRand.Next(2) == 0) + num39 = 460; + for (int i6 = num36 - num38; i6 <= num36 + num38; ++i6) + { + for (int j6 = num37 - num38; j6 <= num37 + num38; ++j6) + { + double num40 = (double) Math.Abs(i6 - num36); + float num41 = (float) (Math.Abs(j6 - num37) * 2); + if (Math.Sqrt(num40 * num40 + (double) num41 * (double) num41) < (double) (num38 + WorldGen.genRand.Next(-1, 2))) + { + Main.tile[i6, j6].active(true); + Main.tile[i6, j6].type = (ushort) num39; + WorldGen.SquareTileFrame(i6, j6); + } + } + } + for (int index10 = num36 - num38 + 2; index10 <= num36 + num38 - 2; ++index10) + { + int index11 = num37 - num38; + while (!Main.tile[index10, index11].active()) + ++index11; + if (WorldGen.WillWaterPlacedHereStayPut(index10, index11)) + { + Main.tile[index10, index11].active(false); + Main.tile[index10, index11].liquid = byte.MaxValue; + WorldGen.SquareTileFrame(index10, index11); + } + } + } + } + + public static void DesertCloudIsland(int i, int j) + { + double num1 = (double) WorldGen.genRand.Next(100, 150); + double num2 = num1; + float num3 = (float) WorldGen.genRand.Next(20, 30); + int num4 = i; + int num5 = i; + int num6 = i; + int num7 = j; + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j; + Vector2 vector2_2; + vector2_2.X = (float) WorldGen.genRand.Next(-20, 21) * 0.2f; + while ((double) vector2_2.X > -2.0 && (double) vector2_2.X < 2.0) + vector2_2.X = (float) WorldGen.genRand.Next(-20, 21) * 0.2f; + vector2_2.Y = (float) WorldGen.genRand.Next(-20, -10) * 0.02f; + while (num1 > 0.0 && (double) num3 > 0.0) + { + num1 -= (double) WorldGen.genRand.Next(4); + --num3; + int num8 = (int) ((double) vector2_1.X - num1 * 0.5); + int num9 = (int) ((double) vector2_1.X + num1 * 0.5); + int num10 = (int) ((double) vector2_1.Y - num1 * 0.5); + int num11 = (int) ((double) vector2_1.Y + num1 * 0.5); + if (num8 < 0) + num8 = 0; + if (num9 > Main.maxTilesX) + num9 = Main.maxTilesX; + if (num10 < 0) + num10 = 0; + if (num11 > Main.maxTilesY) + num11 = Main.maxTilesY; + double num12 = num1 * (double) WorldGen.genRand.Next(80, 120) * 0.01; + float num13 = vector2_1.Y + 1f; + for (int i1 = num8; i1 < num9; ++i1) + { + if (WorldGen.genRand.Next(2) == 0) + num13 += (float) WorldGen.genRand.Next(-1, 2); + if ((double) num13 < (double) vector2_1.Y) + num13 = vector2_1.Y; + if ((double) num13 > (double) vector2_1.Y + 2.0) + num13 = vector2_1.Y + 2f; + for (int j1 = num10; j1 < num11; ++j1) + { + if ((double) j1 > (double) num13) + { + double num14 = (double) Math.Abs((float) i1 - vector2_1.X); + float num15 = Math.Abs((float) j1 - vector2_1.Y) * 3f; + if (Math.Sqrt(num14 * num14 + (double) num15 * (double) num15) < num12 * 0.4) + { + if (i1 < num4) + num4 = i1; + if (i1 > num5) + num5 = i1; + if (j1 < num6) + num6 = j1; + if (j1 > num7) + num7 = j1; + Main.tile[i1, j1].active(true); + Main.tile[i1, j1].type = (ushort) 189; + WorldGen.SquareTileFrame(i1, j1); + } + } + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) WorldGen.genRand.Next(-20, 21) * 0.05f; + if ((double) vector2_2.X > 1.0) + vector2_2.X = 1f; + if ((double) vector2_2.X < -1.0) + vector2_2.X = -1f; + if ((double) vector2_2.Y > 0.2) + vector2_2.Y = -0.2f; + if ((double) vector2_2.Y < -0.2) + vector2_2.Y = -0.2f; + } + int minValue1; + for (int index1 = num4 + WorldGen.genRand.Next(5); index1 < num5; index1 += WorldGen.genRand.Next(minValue1, (int) ((double) minValue1 * 1.5))) + { + int index2 = num7; + while (!Main.tile[index1, index2].active()) + --index2; + int num16 = index2 + WorldGen.genRand.Next(-3, 4); + minValue1 = WorldGen.genRand.Next(4, 8); + int num17 = 189; + if (WorldGen.genRand.Next(4) == 0) + num17 = 196; + for (int i2 = index1 - minValue1; i2 <= index1 + minValue1; ++i2) + { + for (int j2 = num16 - minValue1; j2 <= num16 + minValue1; ++j2) + { + if (j2 > num6) + { + double num18 = (double) Math.Abs(i2 - index1); + float num19 = (float) (Math.Abs(j2 - num16) * 2); + if (Math.Sqrt(num18 * num18 + (double) num19 * (double) num19) < (double) (minValue1 + WorldGen.genRand.Next(2))) + { + Main.tile[i2, j2].active(true); + Main.tile[i2, j2].type = (ushort) num17; + WorldGen.SquareTileFrame(i2, j2); + } + } + } + } + } + double num20 = (double) WorldGen.genRand.Next(80, 95); + num2 = num20; + float num21 = (float) WorldGen.genRand.Next(10, 15); + vector2_1.X = (float) i; + vector2_1.Y = (float) num6; + vector2_2.X = (float) WorldGen.genRand.Next(-20, 21) * 0.2f; + while ((double) vector2_2.X > -2.0 && (double) vector2_2.X < 2.0) + vector2_2.X = (float) WorldGen.genRand.Next(-20, 21) * 0.2f; + vector2_2.Y = (float) WorldGen.genRand.Next(-20, -10) * 0.02f; + while (num20 > 0.0 && (double) num21 > 0.0) + { + num20 -= (double) WorldGen.genRand.Next(4); + --num21; + int num22 = (int) ((double) vector2_1.X - num20 * 0.5); + int num23 = (int) ((double) vector2_1.X + num20 * 0.5); + int num24 = num6 - 1; + int num25 = (int) ((double) vector2_1.Y + num20 * 0.5); + if (num22 < 0) + num22 = 0; + if (num23 > Main.maxTilesX) + num23 = Main.maxTilesX; + if (num24 < 0) + num24 = 0; + if (num25 > Main.maxTilesY) + num25 = Main.maxTilesY; + double num26 = num20 * (double) WorldGen.genRand.Next(80, 120) * 0.01; + float num27 = vector2_1.Y + 1f; + for (int i3 = num22; i3 < num23; ++i3) + { + if (WorldGen.genRand.Next(2) == 0) + num27 += (float) WorldGen.genRand.Next(-1, 2); + if ((double) num27 < (double) vector2_1.Y) + num27 = vector2_1.Y; + if ((double) num27 > (double) vector2_1.Y + 2.0) + num27 = vector2_1.Y + 2f; + for (int j3 = num24; j3 < num25; ++j3) + { + if ((double) j3 > (double) num27) + { + double num28 = (double) Math.Abs((float) i3 - vector2_1.X); + float num29 = Math.Abs((float) j3 - vector2_1.Y) * 3f; + if (Math.Sqrt(num28 * num28 + (double) num29 * (double) num29) < num26 * 0.4 && Main.tile[i3, j3].type == (ushort) 189) + { + Main.tile[i3, j3].type = (ushort) 53; + WorldGen.SquareTileFrame(i3, j3); + } + } + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) WorldGen.genRand.Next(-20, 21) * 0.05f; + if ((double) vector2_2.X > 1.0) + vector2_2.X = 1f; + if ((double) vector2_2.X < -1.0) + vector2_2.X = -1f; + if ((double) vector2_2.Y > 0.2) + vector2_2.Y = -0.2f; + if ((double) vector2_2.Y < -0.2) + vector2_2.Y = -0.2f; + } + int index3 = num4 + WorldGen.genRand.Next(5); + while (index3 < num5) + { + int index4 = num7; + while ((!Main.tile[index3, index4].active() || Main.tile[index3, index4].type != (ushort) 0) && index3 < num5) + { + --index4; + if (index4 < num6) + { + index4 = num7; + index3 += WorldGen.genRand.Next(1, 4); + } + } + if (index3 < num5) + { + int num30 = index4 + WorldGen.genRand.Next(0, 4); + int minValue2 = WorldGen.genRand.Next(2, 5); + int num31 = 189; + for (int i4 = index3 - minValue2; i4 <= index3 + minValue2; ++i4) + { + for (int j4 = num30 - minValue2; j4 <= num30 + minValue2; ++j4) + { + if (j4 > num6) + { + double num32 = (double) Math.Abs(i4 - index3); + float num33 = (float) (Math.Abs(j4 - num30) * 2); + if (Math.Sqrt(num32 * num32 + (double) num33 * (double) num33) < (double) minValue2) + { + Main.tile[i4, j4].type = (ushort) num31; + WorldGen.SquareTileFrame(i4, j4); + } + } + } + } + index3 += WorldGen.genRand.Next(minValue2, (int) ((double) minValue2 * 1.5)); + } + } + for (int i5 = num4 - 20; i5 <= num5 + 20; ++i5) + { + for (int j5 = num6 - 20; j5 <= num7 + 20; ++j5) + { + bool flag = true; + for (int index5 = i5 - 1; index5 <= i5 + 1; ++index5) + { + for (int index6 = j5 - 1; index6 <= j5 + 1; ++index6) + { + if (!Main.tile[index5, index6].active()) + flag = false; + } + } + if (flag) + { + Main.tile[i5, j5].wall = (ushort) 73; + WorldGen.SquareWallFrame(i5, j5); + } + } + } + for (int index7 = num4; index7 <= num5; ++index7) + { + int index8 = num6 - 10; + while (!Main.tile[index7, index8 + 1].active()) + ++index8; + if (index8 < num7 && Main.tile[index7, index8 + 1].type == (ushort) 189) + { + if (WorldGen.genRand.Next(10) == 0) + { + int num34 = WorldGen.genRand.Next(1, 3); + for (int x = index7 - num34; x <= index7 + num34; ++x) + { + if (Main.tile[x, index8].type == (ushort) 189 && WorldGen.WillWaterPlacedHereStayPut(x, index8)) + { + Main.tile[x, index8].active(false); + Main.tile[x, index8].liquid = byte.MaxValue; + Main.tile[x, index8].lava(false); + WorldGen.SquareTileFrame(index7, index8); + } + if (Main.tile[x, index8 + 1].type == (ushort) 189 && WorldGen.WillWaterPlacedHereStayPut(x, index8 + 1)) + { + Main.tile[x, index8 + 1].active(false); + Main.tile[x, index8 + 1].liquid = byte.MaxValue; + Main.tile[x, index8 + 1].lava(false); + WorldGen.SquareTileFrame(index7, index8 + 1); + } + if (x > index7 - num34 && x < index7 + 2 && Main.tile[x, index8 + 2].type == (ushort) 189 && WorldGen.WillWaterPlacedHereStayPut(x, index8 + 2)) + { + Main.tile[x, index8 + 2].active(false); + Main.tile[x, index8 + 2].liquid = byte.MaxValue; + Main.tile[x, index8 + 2].lava(false); + WorldGen.SquareTileFrame(index7, index8 + 2); + } + } + } + if (WorldGen.genRand.Next(5) == 0 && WorldGen.WillWaterPlacedHereStayPut(index7, index8)) + Main.tile[index7, index8].liquid = byte.MaxValue; + Main.tile[index7, index8].lava(false); + WorldGen.SquareTileFrame(index7, index8); + } + } + int num35 = WorldGen.genRand.Next(4); + for (int index9 = 0; index9 <= num35; ++index9) + { + int num36 = WorldGen.genRand.Next(num4 - 5, num5 + 5); + int num37 = num6 - WorldGen.genRand.Next(20, 40); + int num38 = WorldGen.genRand.Next(4, 8); + int num39 = 189; + if (WorldGen.genRand.Next(2) == 0) + num39 = 196; + for (int i6 = num36 - num38; i6 <= num36 + num38; ++i6) + { + for (int j6 = num37 - num38; j6 <= num37 + num38; ++j6) + { + double num40 = (double) Math.Abs(i6 - num36); + float num41 = (float) (Math.Abs(j6 - num37) * 2); + if (Math.Sqrt(num40 * num40 + (double) num41 * (double) num41) < (double) (num38 + WorldGen.genRand.Next(-1, 2))) + { + Main.tile[i6, j6].active(true); + Main.tile[i6, j6].type = (ushort) num39; + WorldGen.SquareTileFrame(i6, j6); + } + } + } + for (int index10 = num36 - num38 + 2; index10 <= num36 + num38 - 2; ++index10) + { + int index11 = num37 - num38; + while (!Main.tile[index10, index11].active()) + ++index11; + if (WorldGen.WillWaterPlacedHereStayPut(index10, index11)) + { + Main.tile[index10, index11].active(false); + Main.tile[index10, index11].liquid = byte.MaxValue; + WorldGen.SquareTileFrame(index10, index11); + } + } + } + } + + public static void CloudIsland(int i, int j) + { + double num1 = (double) WorldGen.genRand.Next(100, 150); + double num2 = num1; + float num3 = (float) WorldGen.genRand.Next(20, 30); + int num4 = i; + int num5 = i; + int num6 = i; + int num7 = j; + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j; + Vector2 vector2_2; + vector2_2.X = (float) WorldGen.genRand.Next(-20, 21) * 0.2f; + while ((double) vector2_2.X > -2.0 && (double) vector2_2.X < 2.0) + vector2_2.X = (float) WorldGen.genRand.Next(-20, 21) * 0.2f; + vector2_2.Y = (float) WorldGen.genRand.Next(-20, -10) * 0.02f; + while (num1 > 0.0 && (double) num3 > 0.0) + { + num1 -= (double) WorldGen.genRand.Next(4); + --num3; + int num8 = (int) ((double) vector2_1.X - num1 * 0.5); + int num9 = (int) ((double) vector2_1.X + num1 * 0.5); + int num10 = (int) ((double) vector2_1.Y - num1 * 0.5); + int num11 = (int) ((double) vector2_1.Y + num1 * 0.5); + if (num8 < 0) + num8 = 0; + if (num9 > Main.maxTilesX) + num9 = Main.maxTilesX; + if (num10 < 0) + num10 = 0; + if (num11 > Main.maxTilesY) + num11 = Main.maxTilesY; + double num12 = num1 * (double) WorldGen.genRand.Next(80, 120) * 0.01; + float num13 = vector2_1.Y + 1f; + for (int i1 = num8; i1 < num9; ++i1) + { + if (WorldGen.genRand.Next(2) == 0) + num13 += (float) WorldGen.genRand.Next(-1, 2); + if ((double) num13 < (double) vector2_1.Y) + num13 = vector2_1.Y; + if ((double) num13 > (double) vector2_1.Y + 2.0) + num13 = vector2_1.Y + 2f; + for (int j1 = num10; j1 < num11; ++j1) + { + if ((double) j1 > (double) num13) + { + double num14 = (double) Math.Abs((float) i1 - vector2_1.X); + float num15 = Math.Abs((float) j1 - vector2_1.Y) * 3f; + if (Math.Sqrt(num14 * num14 + (double) num15 * (double) num15) < num12 * 0.4) + { + if (i1 < num4) + num4 = i1; + if (i1 > num5) + num5 = i1; + if (j1 < num6) + num6 = j1; + if (j1 > num7) + num7 = j1; + Main.tile[i1, j1].active(true); + Main.tile[i1, j1].type = (ushort) 189; + WorldGen.SquareTileFrame(i1, j1); + } + } + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) WorldGen.genRand.Next(-20, 21) * 0.05f; + if ((double) vector2_2.X > 1.0) + vector2_2.X = 1f; + if ((double) vector2_2.X < -1.0) + vector2_2.X = -1f; + if ((double) vector2_2.Y > 0.2) + vector2_2.Y = -0.2f; + if ((double) vector2_2.Y < -0.2) + vector2_2.Y = -0.2f; + } + int minValue1; + for (int index1 = num4 + WorldGen.genRand.Next(5); index1 < num5; index1 += WorldGen.genRand.Next(minValue1, (int) ((double) minValue1 * 1.5))) + { + int index2 = num7; + while (!Main.tile[index1, index2].active()) + --index2; + int num16 = index2 + WorldGen.genRand.Next(-3, 4); + minValue1 = WorldGen.genRand.Next(4, 8); + int num17 = 189; + if (WorldGen.genRand.Next(4) == 0) + num17 = 196; + for (int i2 = index1 - minValue1; i2 <= index1 + minValue1; ++i2) + { + for (int j2 = num16 - minValue1; j2 <= num16 + minValue1; ++j2) + { + if (j2 > num6) + { + double num18 = (double) Math.Abs(i2 - index1); + float num19 = (float) (Math.Abs(j2 - num16) * 2); + if (Math.Sqrt(num18 * num18 + (double) num19 * (double) num19) < (double) (minValue1 + WorldGen.genRand.Next(2))) + { + Main.tile[i2, j2].active(true); + Main.tile[i2, j2].type = (ushort) num17; + WorldGen.SquareTileFrame(i2, j2); + } + } + } + } + } + double num20 = (double) WorldGen.genRand.Next(80, 95); + num2 = num20; + float num21 = (float) WorldGen.genRand.Next(10, 15); + vector2_1.X = (float) i; + vector2_1.Y = (float) num6; + vector2_2.X = (float) WorldGen.genRand.Next(-20, 21) * 0.2f; + while ((double) vector2_2.X > -2.0 && (double) vector2_2.X < 2.0) + vector2_2.X = (float) WorldGen.genRand.Next(-20, 21) * 0.2f; + vector2_2.Y = (float) WorldGen.genRand.Next(-20, -10) * 0.02f; + while (num20 > 0.0 && (double) num21 > 0.0) + { + num20 -= (double) WorldGen.genRand.Next(4); + --num21; + int num22 = (int) ((double) vector2_1.X - num20 * 0.5); + int num23 = (int) ((double) vector2_1.X + num20 * 0.5); + int num24 = num6 - 1; + int num25 = (int) ((double) vector2_1.Y + num20 * 0.5); + if (num22 < 0) + num22 = 0; + if (num23 > Main.maxTilesX) + num23 = Main.maxTilesX; + if (num24 < 0) + num24 = 0; + if (num25 > Main.maxTilesY) + num25 = Main.maxTilesY; + double num26 = num20 * (double) WorldGen.genRand.Next(80, 120) * 0.01; + float num27 = vector2_1.Y + 1f; + for (int i3 = num22; i3 < num23; ++i3) + { + if (WorldGen.genRand.Next(2) == 0) + num27 += (float) WorldGen.genRand.Next(-1, 2); + if ((double) num27 < (double) vector2_1.Y) + num27 = vector2_1.Y; + if ((double) num27 > (double) vector2_1.Y + 2.0) + num27 = vector2_1.Y + 2f; + for (int j3 = num24; j3 < num25; ++j3) + { + if ((double) j3 > (double) num27) + { + double num28 = (double) Math.Abs((float) i3 - vector2_1.X); + float num29 = Math.Abs((float) j3 - vector2_1.Y) * 3f; + if (Math.Sqrt(num28 * num28 + (double) num29 * (double) num29) < num26 * 0.4 && Main.tile[i3, j3].type == (ushort) 189) + { + Main.tile[i3, j3].type = (ushort) 0; + WorldGen.SquareTileFrame(i3, j3); + } + } + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) WorldGen.genRand.Next(-20, 21) * 0.05f; + if ((double) vector2_2.X > 1.0) + vector2_2.X = 1f; + if ((double) vector2_2.X < -1.0) + vector2_2.X = -1f; + if ((double) vector2_2.Y > 0.2) + vector2_2.Y = -0.2f; + if ((double) vector2_2.Y < -0.2) + vector2_2.Y = -0.2f; + } + int index3 = num4 + WorldGen.genRand.Next(5); + while (index3 < num5) + { + int index4 = num7; + while ((!Main.tile[index3, index4].active() || Main.tile[index3, index4].type != (ushort) 0) && index3 < num5) + { + --index4; + if (index4 < num6) + { + index4 = num7; + index3 += WorldGen.genRand.Next(1, 4); + } + } + if (index3 < num5) + { + int num30 = index4 + WorldGen.genRand.Next(0, 4); + int minValue2 = WorldGen.genRand.Next(2, 5); + int num31 = 189; + for (int i4 = index3 - minValue2; i4 <= index3 + minValue2; ++i4) + { + for (int j4 = num30 - minValue2; j4 <= num30 + minValue2; ++j4) + { + if (j4 > num6) + { + double num32 = (double) Math.Abs(i4 - index3); + float num33 = (float) (Math.Abs(j4 - num30) * 2); + if (Math.Sqrt(num32 * num32 + (double) num33 * (double) num33) < (double) minValue2) + { + Main.tile[i4, j4].type = (ushort) num31; + WorldGen.SquareTileFrame(i4, j4); + } + } + } + } + index3 += WorldGen.genRand.Next(minValue2, (int) ((double) minValue2 * 1.5)); + } + } + for (int i5 = num4 - 20; i5 <= num5 + 20; ++i5) + { + for (int j5 = num6 - 20; j5 <= num7 + 20; ++j5) + { + bool flag = true; + for (int index5 = i5 - 1; index5 <= i5 + 1; ++index5) + { + for (int index6 = j5 - 1; index6 <= j5 + 1; ++index6) + { + if (!Main.tile[index5, index6].active()) + flag = false; + } + } + if (flag) + { + Main.tile[i5, j5].wall = (ushort) 73; + WorldGen.SquareWallFrame(i5, j5); + } + } + } + for (int index7 = num4; index7 <= num5; ++index7) + { + int index8 = num6 - 10; + while (!Main.tile[index7, index8 + 1].active()) + ++index8; + if (index8 < num7 && Main.tile[index7, index8 + 1].type == (ushort) 189) + { + if (WorldGen.genRand.Next(10) == 0) + { + int num34 = WorldGen.genRand.Next(1, 3); + for (int x = index7 - num34; x <= index7 + num34; ++x) + { + if (Main.tile[x, index8].type == (ushort) 189 && WorldGen.WillWaterPlacedHereStayPut(x, index8)) + { + Main.tile[x, index8].active(false); + Main.tile[x, index8].liquid = byte.MaxValue; + Main.tile[x, index8].lava(false); + WorldGen.SquareTileFrame(index7, index8); + } + if (Main.tile[x, index8 + 1].type == (ushort) 189 && WorldGen.WillWaterPlacedHereStayPut(x, index8 + 1)) + { + Main.tile[x, index8 + 1].active(false); + Main.tile[x, index8 + 1].liquid = byte.MaxValue; + Main.tile[x, index8 + 1].lava(false); + WorldGen.SquareTileFrame(index7, index8 + 1); + } + if (x > index7 - num34 && x < index7 + 2 && Main.tile[x, index8 + 2].type == (ushort) 189 && WorldGen.WillWaterPlacedHereStayPut(x, index8 + 2)) + { + Main.tile[x, index8 + 2].active(false); + Main.tile[x, index8 + 2].liquid = byte.MaxValue; + Main.tile[x, index8 + 2].lava(false); + WorldGen.SquareTileFrame(index7, index8 + 2); + } + } + } + if (WorldGen.genRand.Next(5) == 0 && WorldGen.WillWaterPlacedHereStayPut(index7, index8)) + Main.tile[index7, index8].liquid = byte.MaxValue; + Main.tile[index7, index8].lava(false); + WorldGen.SquareTileFrame(index7, index8); + } + } + int num35 = WorldGen.genRand.Next(4); + for (int index9 = 0; index9 <= num35; ++index9) + { + int num36 = WorldGen.genRand.Next(num4 - 5, num5 + 5); + int num37 = num6 - WorldGen.genRand.Next(20, 40); + int num38 = WorldGen.genRand.Next(4, 8); + int num39 = 189; + if (WorldGen.genRand.Next(2) == 0) + num39 = 196; + for (int i6 = num36 - num38; i6 <= num36 + num38; ++i6) + { + for (int j6 = num37 - num38; j6 <= num37 + num38; ++j6) + { + double num40 = (double) Math.Abs(i6 - num36); + float num41 = (float) (Math.Abs(j6 - num37) * 2); + if (Math.Sqrt(num40 * num40 + (double) num41 * (double) num41) < (double) (num38 + WorldGen.genRand.Next(-1, 2))) + { + Main.tile[i6, j6].active(true); + Main.tile[i6, j6].type = (ushort) num39; + WorldGen.SquareTileFrame(i6, j6); + } + } + } + for (int index10 = num36 - num38 + 2; index10 <= num36 + num38 - 2; ++index10) + { + int index11 = num37 - num38; + while (!Main.tile[index10, index11].active()) + ++index11; + if (WorldGen.WillWaterPlacedHereStayPut(index10, index11)) + { + Main.tile[index10, index11].active(false); + Main.tile[index10, index11].liquid = byte.MaxValue; + WorldGen.SquareTileFrame(index10, index11); + } + } + } + } + + public static bool WillWaterPlacedHereStayPut(int x, int y) => (Main.tile[x, y + 1].active() && Main.tileSolid[(int) Main.tile[x, y + 1].type] && !Main.tileSolidTop[(int) Main.tile[x, y + 1].type] || Main.tile[x, y + 1].liquid == byte.MaxValue) && (Main.tile[x - 1, y].active() && Main.tileSolid[(int) Main.tile[x - 1, y].type] && !Main.tileSolidTop[(int) Main.tile[x - 1, y].type] || Main.tile[x - 1, y].liquid == byte.MaxValue) && (Main.tile[x + 1, y].active() && Main.tileSolid[(int) Main.tile[x + 1, y].type] && !Main.tileSolidTop[(int) Main.tile[x + 1, y].type] || Main.tile[x + 1, y].liquid == byte.MaxValue); + + public static void CloudLake(int i, int j) + { + double num1 = (double) WorldGen.genRand.Next(100, 150); + double num2 = num1; + float num3 = (float) WorldGen.genRand.Next(20, 30); + int num4 = i; + int num5 = i; + int num6 = i; + int num7 = j; + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j; + Vector2 vector2_2; + vector2_2.X = (float) WorldGen.genRand.Next(-20, 21) * 0.2f; + while ((double) vector2_2.X > -2.0 && (double) vector2_2.X < 2.0) + vector2_2.X = (float) WorldGen.genRand.Next(-20, 21) * 0.2f; + vector2_2.Y = (float) WorldGen.genRand.Next(-20, -10) * 0.02f; + while (num1 > 0.0 && (double) num3 > 0.0) + { + num1 -= (double) WorldGen.genRand.Next(4); + --num3; + int num8 = (int) ((double) vector2_1.X - num1 * 0.5); + int num9 = (int) ((double) vector2_1.X + num1 * 0.5); + int num10 = (int) ((double) vector2_1.Y - num1 * 0.5); + int num11 = (int) ((double) vector2_1.Y + num1 * 0.5); + if (num8 < 0) + num8 = 0; + if (num9 > Main.maxTilesX) + num9 = Main.maxTilesX; + if (num10 < 0) + num10 = 0; + if (num11 > Main.maxTilesY) + num11 = Main.maxTilesY; + double num12 = num1 * (double) WorldGen.genRand.Next(80, 120) * 0.01; + float num13 = vector2_1.Y + 1f; + for (int i1 = num8; i1 < num9; ++i1) + { + if (WorldGen.genRand.Next(2) == 0) + num13 += (float) WorldGen.genRand.Next(-1, 2); + if ((double) num13 < (double) vector2_1.Y) + num13 = vector2_1.Y; + if ((double) num13 > (double) vector2_1.Y + 2.0) + num13 = vector2_1.Y + 2f; + for (int j1 = num10; j1 < num11; ++j1) + { + if ((double) j1 > (double) num13) + { + double num14 = (double) Math.Abs((float) i1 - vector2_1.X); + float num15 = Math.Abs((float) j1 - vector2_1.Y) * 3f; + if (Math.Sqrt(num14 * num14 + (double) num15 * (double) num15) < num12 * 0.4) + { + if (i1 < num4) + num4 = i1; + if (i1 > num5) + num5 = i1; + if (j1 < num6) + num6 = j1; + if (j1 > num7) + num7 = j1; + Main.tile[i1, j1].active(true); + Main.tile[i1, j1].type = (ushort) 189; + WorldGen.SquareTileFrame(i1, j1); + } + } + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) WorldGen.genRand.Next(-20, 21) * 0.05f; + if ((double) vector2_2.X > 1.0) + vector2_2.X = 1f; + if ((double) vector2_2.X < -1.0) + vector2_2.X = -1f; + if ((double) vector2_2.Y > 0.2) + vector2_2.Y = -0.2f; + if ((double) vector2_2.Y < -0.2) + vector2_2.Y = -0.2f; + } + int minValue; + for (int index1 = num4 + WorldGen.genRand.Next(5); index1 < num5; index1 += WorldGen.genRand.Next(minValue, (int) ((double) minValue * 1.5))) + { + int index2 = num7; + while (!Main.tile[index1, index2].active()) + --index2; + int num16 = index2 + WorldGen.genRand.Next(-3, 4); + minValue = WorldGen.genRand.Next(4, 8); + int num17 = 189; + if (WorldGen.genRand.Next(4) == 0) + num17 = 196; + for (int i2 = index1 - minValue; i2 <= index1 + minValue; ++i2) + { + for (int j2 = num16 - minValue; j2 <= num16 + minValue; ++j2) + { + if (j2 > num6) + { + double num18 = (double) Math.Abs(i2 - index1); + float num19 = (float) (Math.Abs(j2 - num16) * 2); + if (Math.Sqrt(num18 * num18 + (double) num19 * (double) num19) < (double) (minValue + WorldGen.genRand.Next(2))) + { + Main.tile[i2, j2].active(true); + Main.tile[i2, j2].type = (ushort) num17; + WorldGen.SquareTileFrame(i2, j2); + } + } + } + } + } + double num20 = (double) WorldGen.genRand.Next(80, 95); + num2 = num20; + float num21 = (float) WorldGen.genRand.Next(10, 15); + vector2_1.X = (float) i; + vector2_1.Y = (float) num6; + vector2_2.X = (float) WorldGen.genRand.Next(-20, 21) * 0.2f; + while ((double) vector2_2.X > -2.0 && (double) vector2_2.X < 2.0) + vector2_2.X = (float) WorldGen.genRand.Next(-20, 21) * 0.2f; + vector2_2.Y = (float) WorldGen.genRand.Next(-20, -10) * 0.02f; + while (num20 > 0.0 && (double) num21 > 0.0) + { + num20 -= (double) WorldGen.genRand.Next(4); + --num21; + int num22 = (int) ((double) vector2_1.X - num20 * 0.5); + int num23 = (int) ((double) vector2_1.X + num20 * 0.5); + int num24 = num6 - 1; + int num25 = (int) ((double) vector2_1.Y + num20 * 0.5); + if (num22 < 0) + num22 = 0; + if (num23 > Main.maxTilesX) + num23 = Main.maxTilesX; + if (num24 < 0) + num24 = 0; + if (num25 > Main.maxTilesY) + num25 = Main.maxTilesY; + double num26 = num20 * (double) WorldGen.genRand.Next(80, 120) * 0.01; + float num27 = vector2_1.Y + 1f; + for (int x = num22; x < num23; ++x) + { + if (WorldGen.genRand.Next(2) == 0) + num27 += (float) WorldGen.genRand.Next(-1, 2); + if ((double) num27 < (double) vector2_1.Y) + num27 = vector2_1.Y; + if ((double) num27 > (double) vector2_1.Y + 2.0) + num27 = vector2_1.Y + 2f; + for (int y = num24; y < num25; ++y) + { + if ((double) y > (double) num27 - 2.0) + { + double num28 = (double) Math.Abs((float) x - vector2_1.X); + float num29 = Math.Abs((float) y - vector2_1.Y) * 3f; + if (Math.Sqrt(num28 * num28 + (double) num29 * (double) num29) < num26 * 0.4 && Main.tile[x, y].type == (ushort) 189) + { + Main.tile[x, y].active(false); + if ((double) y > (double) num27 + 1.0) + { + if (WorldGen.WillWaterPlacedHereStayPut(x, y)) + Main.tile[x, y].liquid = byte.MaxValue; + Main.tile[x, y].honey(false); + Main.tile[x, y].lava(false); + } + } + } + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) WorldGen.genRand.Next(-20, 21) * 0.05f; + if ((double) vector2_2.X > 1.0) + vector2_2.X = 1f; + if ((double) vector2_2.X < -1.0) + vector2_2.X = -1f; + if ((double) vector2_2.Y > 0.2) + vector2_2.Y = -0.2f; + if ((double) vector2_2.Y < 0.0) + vector2_2.Y = 0.0f; + } + for (int index3 = num4 - 20; index3 <= num5 + 20; ++index3) + { + for (int index4 = num6 - 20; index4 <= num7 + 20; ++index4) + { + bool flag = true; + for (int index5 = index3 - 1; index5 <= index3 + 1; ++index5) + { + for (int index6 = index4 - 1; index6 <= index4 + 1; ++index6) + { + if (!Main.tile[index5, index6].active()) + flag = false; + } + } + if (flag) + Main.tile[index3, index4].wall = (ushort) 73; + } + } + for (int index7 = num4; index7 <= num5; ++index7) + { + int index8 = num6 - 10; + while (!Main.tile[index7, index8 + 1].active()) + ++index8; + if (index8 < num7 && Main.tile[index7, index8 + 1].type == (ushort) 189) + { + if (WorldGen.genRand.Next(10) == 0) + { + int num30 = WorldGen.genRand.Next(1, 3); + for (int x = index7 - num30; x <= index7 + num30; ++x) + { + if (Main.tile[x, index8].type == (ushort) 189 && WorldGen.WillWaterPlacedHereStayPut(x, index8)) + { + Main.tile[x, index8].active(false); + Main.tile[x, index8].liquid = byte.MaxValue; + Main.tile[x, index8].lava(false); + WorldGen.SquareTileFrame(index7, index8); + } + if (Main.tile[x, index8 + 1].type == (ushort) 189 && WorldGen.WillWaterPlacedHereStayPut(x, index8 + 1)) + { + Main.tile[x, index8 + 1].active(false); + Main.tile[x, index8 + 1].liquid = byte.MaxValue; + Main.tile[x, index8 + 1].lava(false); + WorldGen.SquareTileFrame(index7, index8 + 1); + } + if (x > index7 - num30 && x < index7 + 2 && Main.tile[x, index8 + 2].type == (ushort) 189 && WorldGen.WillWaterPlacedHereStayPut(x, index8 + 2)) + { + Main.tile[x, index8 + 2].active(false); + Main.tile[x, index8 + 2].liquid = byte.MaxValue; + Main.tile[x, index8 + 2].lava(false); + WorldGen.SquareTileFrame(index7, index8 + 2); + } + } + } + if (WorldGen.genRand.Next(5) == 0 && WorldGen.WillWaterPlacedHereStayPut(index7, index8)) + Main.tile[index7, index8].liquid = byte.MaxValue; + Main.tile[index7, index8].lava(false); + WorldGen.SquareTileFrame(index7, index8); + } + } + int num31 = WorldGen.genRand.Next(1, 4); + for (int index9 = 0; index9 <= num31; ++index9) + { + int num32 = WorldGen.genRand.Next(num4 - 5, num5 + 5); + int num33 = num6 - WorldGen.genRand.Next(20, 40); + int num34 = WorldGen.genRand.Next(4, 8); + int num35 = 189; + if (WorldGen.genRand.Next(4) != 0) + num35 = 196; + for (int i3 = num32 - num34; i3 <= num32 + num34; ++i3) + { + for (int j3 = num33 - num34; j3 <= num33 + num34; ++j3) + { + double num36 = (double) Math.Abs(i3 - num32); + float num37 = (float) (Math.Abs(j3 - num33) * 2); + if (Math.Sqrt(num36 * num36 + (double) num37 * (double) num37) < (double) (num34 + WorldGen.genRand.Next(-1, 2))) + { + Main.tile[i3, j3].active(true); + Main.tile[i3, j3].type = (ushort) num35; + WorldGen.SquareTileFrame(i3, j3); + } + } + } + for (int index10 = num32 - num34 + 2; index10 <= num32 + num34 - 2; ++index10) + { + int index11 = num33 - num34; + while (!Main.tile[index10, index11].active()) + ++index11; + if (WorldGen.WillWaterPlacedHereStayPut(index10, index11)) + { + Main.tile[index10, index11].active(false); + Main.tile[index10, index11].liquid = byte.MaxValue; + WorldGen.SquareTileFrame(index10, index11); + } + } + } + } + + public static void FloatingIsland(int i, int j) + { + double num1 = (double) WorldGen.genRand.Next(80, 120); + float num2 = (float) WorldGen.genRand.Next(20, 25); + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j; + Vector2 vector2_2; + vector2_2.X = (float) WorldGen.genRand.Next(-20, 21) * 0.2f; + while ((double) vector2_2.X > -2.0 && (double) vector2_2.X < 2.0) + vector2_2.X = (float) WorldGen.genRand.Next(-20, 21) * 0.2f; + vector2_2.Y = (float) WorldGen.genRand.Next(-20, -10) * 0.02f; + while (num1 > 0.0 && (double) num2 > 0.0) + { + num1 -= (double) WorldGen.genRand.Next(4); + --num2; + int num3 = (int) ((double) vector2_1.X - num1 * 0.5); + int num4 = (int) ((double) vector2_1.X + num1 * 0.5); + int num5 = (int) ((double) vector2_1.Y - num1 * 0.5); + int num6 = (int) ((double) vector2_1.Y + num1 * 0.5); + if (num3 < 0) + num3 = 0; + if (num4 > Main.maxTilesX) + num4 = Main.maxTilesX; + if (num5 < 0) + num5 = 0; + if (num6 > Main.maxTilesY) + num6 = Main.maxTilesY; + double num7 = num1 * (double) WorldGen.genRand.Next(80, 120) * 0.01; + float num8 = vector2_1.Y + 1f; + for (int index1 = num3; index1 < num4; ++index1) + { + if (WorldGen.genRand.Next(2) == 0) + num8 += (float) WorldGen.genRand.Next(-1, 2); + if ((double) num8 < (double) vector2_1.Y) + num8 = vector2_1.Y; + if ((double) num8 > (double) vector2_1.Y + 2.0) + num8 = vector2_1.Y + 2f; + for (int index2 = num5; index2 < num6; ++index2) + { + if ((double) index2 > (double) num8) + { + double num9 = (double) Math.Abs((float) index1 - vector2_1.X); + float num10 = Math.Abs((float) index2 - vector2_1.Y) * 2f; + if (Math.Sqrt(num9 * num9 + (double) num10 * (double) num10) < num7 * 0.4) + { + Main.tile[index1, index2].active(true); + if (Main.tile[index1, index2].type == (ushort) 59) + Main.tile[index1, index2].type = (ushort) 0; + } + } + } + } + int num11 = (int) ((double) vector2_1.X - num1 * 0.4); + int num12 = (int) ((double) vector2_1.X + num1 * 0.4); + int num13 = (int) ((double) vector2_1.Y - num1 * 0.4); + int num14 = (int) ((double) vector2_1.Y + num1 * 0.4); + if (num11 < 0) + num11 = 0; + if (num12 > Main.maxTilesX) + num12 = Main.maxTilesX; + if (num13 < 0) + num13 = 0; + if (num14 > Main.maxTilesY) + num14 = Main.maxTilesY; + double num15 = num1 * (double) WorldGen.genRand.Next(80, 120) * 0.01; + for (int index3 = num11; index3 < num12; ++index3) + { + for (int index4 = num13; index4 < num14; ++index4) + { + if ((double) index4 > (double) vector2_1.Y + 2.0) + { + double num16 = (double) Math.Abs((float) index3 - vector2_1.X); + float num17 = Math.Abs((float) index4 - vector2_1.Y) * 2f; + if (Math.Sqrt(num16 * num16 + (double) num17 * (double) num17) < num15 * 0.4) + Main.tile[index3, index4].wall = (ushort) 2; + } + } + } + vector2_1 += vector2_2; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if ((double) vector2_2.X > 1.0) + vector2_2.X = 1f; + if ((double) vector2_2.X < -1.0) + vector2_2.X = -1f; + if ((double) vector2_2.Y > 0.2) + vector2_2.Y = -0.2f; + if ((double) vector2_2.Y < -0.2) + vector2_2.Y = -0.2f; + } + } + + public static void Caverer(int X, int Y) + { + switch (WorldGen.genRand.Next(2)) + { + case 0: + int num1 = WorldGen.genRand.Next(7, 9); + float xDir1 = (float) WorldGen.genRand.Next(100) * 0.01f; + float yDir1 = 1f - xDir1; + if (WorldGen.genRand.Next(2) == 0) + xDir1 = -xDir1; + if (WorldGen.genRand.Next(2) == 0) + yDir1 = -yDir1; + Vector2 vector2_1 = new Vector2((float) X, (float) Y); + for (int index = 0; index < num1; ++index) + { + vector2_1 = WorldGen.digTunnel(vector2_1.X, vector2_1.Y, xDir1, yDir1, WorldGen.genRand.Next(6, 20), WorldGen.genRand.Next(4, 9)); + xDir1 += (float) WorldGen.genRand.Next(-20, 21) * 0.1f; + yDir1 += (float) WorldGen.genRand.Next(-20, 21) * 0.1f; + if ((double) xDir1 < -1.5) + xDir1 = -1.5f; + if ((double) xDir1 > 1.5) + xDir1 = 1.5f; + if ((double) yDir1 < -1.5) + yDir1 = -1.5f; + if ((double) yDir1 > 1.5) + yDir1 = 1.5f; + float xDir2 = (float) WorldGen.genRand.Next(100) * 0.01f; + float yDir2 = 1f - xDir2; + if (WorldGen.genRand.Next(2) == 0) + xDir2 = -xDir2; + if (WorldGen.genRand.Next(2) == 0) + yDir2 = -yDir2; + Vector2 vector2_2 = WorldGen.digTunnel(vector2_1.X, vector2_1.Y, xDir2, yDir2, WorldGen.genRand.Next(30, 50), WorldGen.genRand.Next(3, 6)); + WorldGen.TileRunner((int) vector2_2.X, (int) vector2_2.Y, (double) WorldGen.genRand.Next(10, 20), WorldGen.genRand.Next(5, 10), -1); + } + break; + case 1: + int num2 = WorldGen.genRand.Next(15, 30); + float xDir3 = (float) WorldGen.genRand.Next(100) * 0.01f; + float yDir3 = 1f - xDir3; + if (WorldGen.genRand.Next(2) == 0) + xDir3 = -xDir3; + if (WorldGen.genRand.Next(2) == 0) + yDir3 = -yDir3; + Vector2 vector2_3 = new Vector2((float) X, (float) Y); + for (int index = 0; index < num2; ++index) + { + vector2_3 = WorldGen.digTunnel(vector2_3.X, vector2_3.Y, xDir3, yDir3, WorldGen.genRand.Next(5, 15), WorldGen.genRand.Next(2, 6), true); + xDir3 += (float) WorldGen.genRand.Next(-20, 21) * 0.1f; + yDir3 += (float) WorldGen.genRand.Next(-20, 21) * 0.1f; + if ((double) xDir3 < -1.5) + xDir3 = -1.5f; + if ((double) xDir3 > 1.5) + xDir3 = 1.5f; + if ((double) yDir3 < -1.5) + yDir3 = -1.5f; + if ((double) yDir3 > 1.5) + yDir3 = 1.5f; + } + break; + } + } + + public static Vector2 digTunnel( + float X, + float Y, + float xDir, + float yDir, + int Steps, + int Size, + bool Wet = false) + { + float x = X; + float y = Y; + try + { + float num1 = 0.0f; + float num2 = 0.0f; + int num3 = Steps; + float num4 = (float) Size; + x = MathHelper.Clamp(x, num4 + 1f, (float) ((double) Main.maxTilesX - (double) num4 - 1.0)); + y = MathHelper.Clamp(y, num4 + 1f, (float) ((double) Main.maxTilesY - (double) num4 - 1.0)); + for (int index1 = 0; index1 < num3; ++index1) + { + for (int index2 = (int) ((double) x - (double) num4); (double) index2 <= (double) x + (double) num4; ++index2) + { + for (int index3 = (int) ((double) y - (double) num4); (double) index3 <= (double) y + (double) num4; ++index3) + { + if ((double) Math.Abs((float) index2 - x) + (double) Math.Abs((float) index3 - y) < (double) num4 * (1.0 + (double) WorldGen.genRand.Next(-10, 11) * 0.005) && index2 >= 0 && index2 < Main.maxTilesX && index3 >= 0 && index3 < Main.maxTilesY) + { + Main.tile[index2, index3].active(false); + if (Wet) + Main.tile[index2, index3].liquid = byte.MaxValue; + } + } + } + num4 += (float) WorldGen.genRand.Next(-50, 51) * 0.03f; + if ((double) num4 < (double) Size * 0.6) + num4 = (float) Size * 0.6f; + if ((double) num4 > (double) (Size * 2)) + num4 = (float) Size * 2f; + num1 += (float) WorldGen.genRand.Next(-20, 21) * 0.01f; + num2 += (float) WorldGen.genRand.Next(-20, 21) * 0.01f; + if ((double) num1 < -1.0) + num1 = -1f; + if ((double) num1 > 1.0) + num1 = 1f; + if ((double) num2 < -1.0) + num2 = -1f; + if ((double) num2 > 1.0) + num2 = 1f; + x += (float) (((double) xDir + (double) num1) * 0.600000023841858); + y += (float) (((double) yDir + (double) num2) * 0.600000023841858); + } + } + catch + { + } + return new Vector2(x, y); + } + + public static void IslandHouse(int i, int j, int islandStyle) + { + byte num1 = 202; + byte num2 = 82; + Vector2 vector2 = new Vector2((float) i, (float) j); + int num3 = 1; + if (WorldGen.genRand.Next(2) == 0) + num3 = -1; + int num4 = WorldGen.genRand.Next(7, 12); + int num5 = WorldGen.genRand.Next(5, 7); + vector2.X = (float) (i + (num4 + 2) * num3); + for (int index = j - 15; index < j + 30; ++index) + { + if (Main.tile[(int) vector2.X, index].active()) + { + vector2.Y = (float) (index - 1); + break; + } + } + vector2.X = (float) i; + int num6 = (int) ((double) vector2.X - (double) num4 - 1.0); + int num7 = (int) ((double) vector2.X + (double) num4 + 1.0); + int num8 = (int) ((double) vector2.Y - (double) num5 - 1.0); + int num9 = (int) ((double) vector2.Y + 2.0); + if (num6 < 0) + num6 = 0; + if (num7 > Main.maxTilesX) + num7 = Main.maxTilesX; + if (num8 < 0) + num8 = 0; + if (num9 > Main.maxTilesY) + num9 = Main.maxTilesY; + for (int index1 = num6; index1 <= num7; ++index1) + { + for (int index2 = num8 - 1; index2 < num9 + 1; ++index2) + { + if (index2 != num8 - 1 || index1 != num6 && index1 != num7) + { + Main.tile[index1, index2].active(true); + Main.tile[index1, index2].liquid = (byte) 0; + Main.tile[index1, index2].type = (ushort) num1; + Main.tile[index1, index2].wall = (ushort) 0; + Main.tile[index1, index2].halfBrick(false); + Main.tile[index1, index2].slope((byte) 0); + } + } + } + int num10 = (int) ((double) vector2.X - (double) num4); + int num11 = (int) ((double) vector2.X + (double) num4); + int j1 = (int) ((double) vector2.Y - (double) num5); + int num12 = (int) ((double) vector2.Y + 1.0); + if (num10 < 0) + num10 = 0; + if (num11 > Main.maxTilesX) + num11 = Main.maxTilesX; + if (j1 < 0) + j1 = 0; + if (num12 > Main.maxTilesY) + num12 = Main.maxTilesY; + for (int index3 = num10; index3 <= num11; ++index3) + { + for (int index4 = j1; index4 < num12; ++index4) + { + if ((index4 != j1 || index3 != num10 && index3 != num11) && Main.tile[index3, index4].wall == (ushort) 0) + { + Main.tile[index3, index4].active(false); + Main.tile[index3, index4].wall = (ushort) num2; + } + } + } + int i1 = i + (num4 + 1) * num3; + int y = (int) vector2.Y; + for (int index = i1 - 2; index <= i1 + 2; ++index) + { + Main.tile[index, y].active(false); + Main.tile[index, y - 1].active(false); + Main.tile[index, y - 2].active(false); + } + WorldGen.PlaceTile(i1, y, 10, true, style: 9); + int index5 = i + (num4 + 1) * -num3 - num3; + for (int index6 = j1; index6 <= num12 + 1; ++index6) + { + Main.tile[index5, index6].active(true); + Main.tile[index5, index6].liquid = (byte) 0; + Main.tile[index5, index6].type = (ushort) num1; + Main.tile[index5, index6].wall = (ushort) 0; + Main.tile[index5, index6].halfBrick(false); + Main.tile[index5, index6].slope((byte) 0); + } + int contain = 0; + int num13 = WorldGen.houseCount; + if (num13 > 2) + num13 = WorldGen.genRand.Next(3); + switch (num13) + { + case 0: + contain = 159; + break; + case 1: + contain = 65; + break; + case 2: + contain = 158; + break; + } + if (WorldGen.getGoodWorldGen) + WorldGen.AddBuriedChest(i, y - 3, contain, Style: 2); + else + WorldGen.AddBuriedChest(i, y - 3, contain, Style: 13); + if (islandStyle > 0) + { + for (int index7 = 0; index7 < 100000; ++index7) + { + int index8 = i + WorldGen.genRand.Next(-50, 51); + int index9 = y + WorldGen.genRand.Next(21); + if ((index7 >= 50000 || Main.tile[index8, index9].type != (ushort) 202) && !Main.tile[index8, index9].active()) + { + WorldGen.Place2xX(index8, index9, (ushort) 207, islandStyle); + if (Main.tile[index8, index9].active()) + { + WorldGen.SwitchFountain(index8, index9); + break; + } + } + } + } + ++WorldGen.houseCount; + int num14 = i - num4 / 2 + 1; + int num15 = i + num4 / 2 - 1; + int num16 = 1; + if (num4 > 10) + num16 = 2; + int num17 = (j1 + num12) / 2 - 1; + for (int index10 = num14 - num16; index10 <= num14 + num16; ++index10) + { + for (int index11 = num17 - 1; index11 <= num17 + 1; ++index11) + Main.tile[index10, index11].wall = (ushort) 21; + } + for (int index12 = num15 - num16; index12 <= num15 + num16; ++index12) + { + for (int index13 = num17 - 1; index13 <= num17 + 1; ++index13) + Main.tile[index12, index13].wall = (ushort) 21; + } + int i2 = i + (num4 / 2 + 1) * -num3; + WorldGen.PlaceTile(i2, num12 - 1, 14, true, style: 7); + WorldGen.PlaceTile(i2 - 2, num12 - 1, 15, true, plr: 0, style: 10); + Main.tile[i2 - 2, num12 - 1].frameX += (short) 18; + Main.tile[i2 - 2, num12 - 2].frameX += (short) 18; + WorldGen.PlaceTile(i2 + 2, num12 - 1, 15, true, plr: 0, style: 10); + WorldGen.PlaceTile(num10 + 1, j1, 91, true, style: WorldGen.genRand.Next(7, 10)); + WorldGen.PlaceTile(num11 - 1, j1, 91, true, style: WorldGen.genRand.Next(7, 10)); + int i3; + int j2; + if (num3 > 0) + { + i3 = num10; + j2 = j1 + 1; + } + else + { + i3 = num11; + j2 = j1 + 1; + } + WorldGen.PlaceTile(i3, j2, 91, true, style: WorldGen.genRand.Next(7, 10)); + if (islandStyle != 1) + return; + int num18 = WorldGen.genRand.Next(3, 6); + for (int index14 = 0; index14 < 100000; ++index14) + { + int i4 = i + WorldGen.genRand.Next(-50, 51); + int index15 = y + WorldGen.genRand.Next(-10, 21); + if (!Main.tile[i4, index15].active()) + { + WorldGen.GrowPalmTree(i4, index15 + 1); + if (Main.tile[i4, index15].active()) + --num18; + } + if (num18 <= 0) + break; + } + } + + public static void Mountinater(int i, int j) + { + double num1 = (double) WorldGen.genRand.Next(80, 120); + float num2 = (float) WorldGen.genRand.Next(40, 55); + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j + num2 / 2f; + Vector2 vector2_2; + vector2_2.X = (float) WorldGen.genRand.Next(-10, 11) * 0.1f; + vector2_2.Y = (float) WorldGen.genRand.Next(-20, -10) * 0.1f; + while (num1 > 0.0 && (double) num2 > 0.0) + { + num1 -= (double) WorldGen.genRand.Next(4); + --num2; + int num3 = (int) ((double) vector2_1.X - num1 * 0.5); + int num4 = (int) ((double) vector2_1.X + num1 * 0.5); + int num5 = (int) ((double) vector2_1.Y - num1 * 0.5); + int num6 = (int) ((double) vector2_1.Y + num1 * 0.5); + if (num3 < 0) + num3 = 0; + if (num4 > Main.maxTilesX) + num4 = Main.maxTilesX; + if (num5 < 0) + num5 = 0; + if (num6 > Main.maxTilesY) + num6 = Main.maxTilesY; + double num7 = num1 * (double) WorldGen.genRand.Next(80, 120) * 0.01; + for (int index1 = num3; index1 < num4; ++index1) + { + for (int index2 = num5; index2 < num6; ++index2) + { + double num8 = (double) Math.Abs((float) index1 - vector2_1.X); + float num9 = Math.Abs((float) index2 - vector2_1.Y); + if (Math.Sqrt(num8 * num8 + (double) num9 * (double) num9) < num7 * 0.4 && !Main.tile[index1, index2].active()) + { + Main.tile[index1, index2].active(true); + Main.tile[index1, index2].type = (ushort) 0; + } + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if ((double) vector2_2.X > 0.5) + vector2_2.X = 0.5f; + if ((double) vector2_2.X < -0.5) + vector2_2.X = -0.5f; + if ((double) vector2_2.Y > -0.5) + vector2_2.Y = -0.5f; + if ((double) vector2_2.Y < -1.5) + vector2_2.Y = -1.5f; + } + } + + public static void MakeWateryIceThing(int i, int j) + { + if (Main.tile[i, j].liquid <= (byte) 0 || Main.tile[i, j].active() || Main.tile[i, j].lava()) + return; + int index1 = j; + while (!Main.tile[i, index1].active() && Main.tile[i, index1].liquid > (byte) 0) + { + ++index1; + if (index1 > Main.maxTilesY - 50) + return; + } + if (Main.tile[i, index1].type != (ushort) 147 && Main.tile[i, index1].type != (ushort) 161) + return; + int index2 = index1 - 1; + while (Main.tile[i, index2].liquid > (byte) 0) + { + --index2; + if (index2 < 10) + return; + } + if (Main.tile[i, index2].active()) + return; + int j1 = index2 + 1; + if (Main.tile[i, j1].active()) + return; + for (int i1 = i; !Main.tile[i1, j1].active() && Main.tile[i1, j1].liquid > (byte) 0 && Main.tile[i1, j1 - 1].liquid == (byte) 0 && !Main.tile[i1, j1 - 1].active() && !Main.tile[i1 - 1, j1].halfBrick(); --i1) + WorldGen.PlaceTile(i1, j1, 162, true); + for (int i2 = i + 1; !Main.tile[i2, j1].active() && Main.tile[i2, j1].liquid > (byte) 0 && Main.tile[i2, j1 - 1].liquid == (byte) 0 && !Main.tile[i2, j1 - 1].active() && !Main.tile[i2 + 1, j1].halfBrick(); ++i2) + WorldGen.PlaceTile(i2, j1, 162, true); + } + + public static void Lakinater(int i, int j, float strengthMultiplier = 1f) + { + double num1 = (double) WorldGen.genRand.Next(25, 50) * (double) strengthMultiplier; + double num2 = num1; + float num3 = (float) WorldGen.genRand.Next(30, 80); + if (WorldGen.genRand.Next(5) == 0) + { + num1 *= 1.5; + num2 *= 1.5; + num3 *= 1.2f; + } + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j - num3 * 0.3f; + Vector2 vector2_2; + vector2_2.X = (float) WorldGen.genRand.Next(-10, 11) * 0.1f; + vector2_2.Y = (float) WorldGen.genRand.Next(-20, -10) * 0.1f; + while (num1 > 0.0 && (double) num3 > 0.0) + { + if ((double) vector2_1.Y + num2 * 0.5 > Main.worldSurface) + num3 = 0.0f; + num1 -= (double) WorldGen.genRand.Next(3); + --num3; + int num4 = (int) ((double) vector2_1.X - num1 * 0.5); + int num5 = (int) ((double) vector2_1.X + num1 * 0.5); + int num6 = (int) ((double) vector2_1.Y - num1 * 0.5); + int num7 = (int) ((double) vector2_1.Y + num1 * 0.5); + if (num4 < 0) + num4 = 0; + if (num5 > Main.maxTilesX) + num5 = Main.maxTilesX; + if (num6 < 0) + num6 = 0; + if (num7 > Main.maxTilesY) + num7 = Main.maxTilesY; + num2 = num1 * (double) WorldGen.genRand.Next(80, 120) * 0.01; + for (int index1 = num4; index1 < num5; ++index1) + { + for (int index2 = num6; index2 < num7; ++index2) + { + double num8 = (double) Math.Abs((float) index1 - vector2_1.X); + float num9 = Math.Abs((float) index2 - vector2_1.Y); + if (Math.Sqrt(num8 * num8 + (double) num9 * (double) num9) < num2 * 0.4) + { + if (Main.tile[index1, index2].active()) + Main.tile[index1, index2].liquid = byte.MaxValue; + Main.tile[index1, index2].active(false); + } + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if ((double) vector2_2.X > 0.5) + vector2_2.X = 0.5f; + if ((double) vector2_2.X < -0.5) + vector2_2.X = -0.5f; + if ((double) vector2_2.Y > 1.5) + vector2_2.Y = 1.5f; + if ((double) vector2_2.Y < 0.5) + vector2_2.Y = 0.5f; + } + } + + public static void SonOfLakinater(int i, int j, float strengthMultiplier = 1f) + { + bool lava = false; + if (WorldGen.getGoodWorldGen && WorldGen.genRand.Next(3) == 0) + lava = true; + double num1 = (double) WorldGen.genRand.Next(15, 31) * (double) strengthMultiplier; + float num2 = (float) WorldGen.genRand.Next(30, 61); + if (WorldGen.genRand.Next(5) == 0) + { + num1 *= 1.29999995231628; + num2 *= 1.3f; + } + if (WorldGen.drunkWorldGen) + { + num1 *= 1.29999995231628; + num2 *= 1.3f; + } + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j; + float num3 = WorldGen.genRand.NextFloat() * (1f / 500f); + Vector2 vector2_2; + if (WorldGen.genRand.Next(4) != 0) + { + vector2_2.X = (float) WorldGen.genRand.Next(-15, 16) * 0.01f; + } + else + { + vector2_2.X = (float) WorldGen.genRand.Next(-50, 51) * 0.01f; + num3 = (float) ((double) WorldGen.genRand.NextFloat() * 0.00400000018998981 + 1.0 / 1000.0); + } + vector2_2.Y = (float) WorldGen.genRand.Next(101) * 0.01f; + float num4 = num2; + while (num1 > 3.0 && (double) num2 > 0.0) + { + num1 -= (double) WorldGen.genRand.Next(11) * 0.100000001490116; + --num2; + int num5 = (int) ((double) vector2_1.X - num1 * 4.0); + int num6 = (int) ((double) vector2_1.X + num1 * 4.0); + int num7 = (int) ((double) vector2_1.Y - num1 * 3.0); + int num8 = (int) ((double) vector2_1.Y + num1 * 2.0); + if (num5 < 0) + num5 = 0; + if (num6 > Main.maxTilesX) + num6 = Main.maxTilesX; + if (num7 < 0) + num7 = 0; + if (num8 > Main.maxTilesY) + num8 = Main.maxTilesY; + double num9 = num1; + for (int index1 = num5; index1 < num6; ++index1) + { + for (int index2 = num7; index2 < num8; ++index2) + { + float num10 = Math.Abs((float) index1 - vector2_1.X) * 0.6f; + float num11 = Math.Abs((float) index2 - vector2_1.Y) * 1.4f; + float num12 = Math.Abs((float) index1 - vector2_1.X) * 0.3f; + float num13 = Math.Abs((float) index2 - vector2_1.Y) * 5f; + float num14 = MathHelper.Lerp(num10, num12, num2 / num4); + float num15 = MathHelper.Lerp(num11, num13, num2 / num4); + double num16 = Math.Sqrt((double) num14 * (double) num14 + (double) num15 * (double) num15); + int num17 = j + 5; + if (num16 < num9 * 0.4) + { + if (index2 >= j) + { + if (index2 <= j + 1) + { + if (WorldGen.WillWaterPlacedHereStayPut(index1, index2)) + { + Main.tile[index1, index2].liquid = byte.MaxValue; + Main.tile[index1, index2].lava(lava); + } + } + else + { + Main.tile[index1, index2].liquid = byte.MaxValue; + Main.tile[index1, index2].lava(lava); + } + } + Main.tile[index1, index2].active(false); + if (!WorldGen.gen) + WorldGen.SquareTileFrame(index1, index2); + if (Main.tile[index1, index2].type == (ushort) 59 || Main.tile[index1, index2].type == (ushort) 60) + { + WorldGen.SpreadGrass(index1 - 1, index2, 59, 60); + WorldGen.SpreadGrass(index1 + 1, index2, 59, 60); + WorldGen.SpreadGrass(index1, index2 + 1, 59, 60); + } + } + else if (index2 > j + 1 && num16 < num9 && Main.tile[index1, index2].liquid == (byte) 0) + { + if ((double) Math.Abs((float) index1 - vector2_1.X) * 0.8 < num9 && Main.tile[index1, index2].wall > (ushort) 0 && Main.tile[index1 - 1, index2].wall > (ushort) 0 && Main.tile[index1 + 1, index2].wall > (ushort) 0 && Main.tile[index1, index2 + 1].wall > (ushort) 0) + Main.tile[index1, index2].active(true); + } + else if (index2 < j && (double) num2 == (double) num4 - 1.0 && (double) index2 > WorldGen.worldSurfaceLow - 20.0 && !TileID.Sets.Clouds[(int) Main.tile[index1, index2].type]) + { + float num18 = (float) Math.Abs(index1 - i) * 0.7f; + float num19 = (float) Math.Abs(index2 - num17) * 1.35f; + Math.Sqrt((double) num18 * (double) num18 + (double) num19 * (double) num19); + float num20 = (float) num9 * 0.4f; + float num21 = (1f - (float) Math.Abs(index1 - i) / (float) (num6 - i)) * 2.3f; + float num22 = num21 * num21; + float num23 = num22 * num22; + if (index2 < num17 && (double) num18 < (double) num20 + (double) Math.Abs(index2 - num17) * 0.5 * (double) num23) + { + Main.tile[index1, index2].active(false); + if (Main.tile[index1, index2].type == (ushort) 59 || Main.tile[index1, index2].type == (ushort) 60) + { + WorldGen.SpreadGrass(index1 - 1, index2, 59, 60); + WorldGen.SpreadGrass(index1 + 1, index2, 59, 60); + WorldGen.SpreadGrass(index1, index2 + 1, 59, 60); + } + } + } + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) WorldGen.genRand.Next(-100, 101) * num3; + vector2_2.Y += (float) WorldGen.genRand.Next(-100, 101) * 0.01f; + if ((double) vector2_2.X > 1.0) + vector2_2.X = 1f; + if ((double) vector2_2.X < -1.0) + vector2_2.X = -1f; + if ((double) vector2_2.Y > 1.0) + vector2_2.Y = 1f; + float num24 = (float) (0.5 * (1.0 - (double) num2 / (double) num4)); + if ((double) vector2_2.Y < (double) num24) + vector2_2.Y = num24; + } + } + + public static void ShroomPatch(int i, int j) + { + double num1 = (double) WorldGen.genRand.Next(80, 100); + float num2 = (float) WorldGen.genRand.Next(20, 26); + float num3 = (float) (Main.maxTilesX / 4200); + if (WorldGen.getGoodWorldGen) + num3 *= 2f; + double num4 = num1 * (double) num3; + float num5 = num2 * num3; + float num6 = num5 - 1f; + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j - num5 * 0.3f; + Vector2 vector2_2; + vector2_2.X = (float) WorldGen.genRand.Next(-100, 101) * 0.005f; + vector2_2.Y = (float) WorldGen.genRand.Next(-200, -100) * 0.005f; + while (num4 > 0.0 && (double) num5 > 0.0) + { + num4 -= (double) WorldGen.genRand.Next(3); + --num5; + int num7 = (int) ((double) vector2_1.X - num4 * 0.5); + int num8 = (int) ((double) vector2_1.X + num4 * 0.5); + int num9 = (int) ((double) vector2_1.Y - num4 * 0.5); + int num10 = (int) ((double) vector2_1.Y + num4 * 0.5); + if (num7 < 0) + num7 = 0; + if (num8 > Main.maxTilesX) + num8 = Main.maxTilesX; + if (num9 < 0) + num9 = 0; + if (num10 > Main.maxTilesY) + num10 = Main.maxTilesY; + double num11 = num4 * (double) WorldGen.genRand.Next(80, 120) * 0.01; + for (int index1 = num7; index1 < num8; ++index1) + { + for (int index2 = num9; index2 < num10; ++index2) + { + double num12 = (double) Math.Abs((float) index1 - vector2_1.X); + float num13 = Math.Abs((float) (((double) index2 - (double) vector2_1.Y) * 2.29999995231628)); + double num14 = Math.Sqrt(num12 * num12 + (double) num13 * (double) num13); + if (num14 < num11 * 0.8 && Main.tile[index1, index2].lava()) + Main.tile[index1, index2].liquid = (byte) 0; + if (num14 < num11 * 0.2 && (double) index2 < (double) vector2_1.Y) + { + Main.tile[index1, index2].active(false); + if (Main.tile[index1, index2].wall > (ushort) 0) + Main.tile[index1, index2].wall = (ushort) 80; + } + else if (num14 < num11 * 0.4 * (0.95 + (double) WorldGen.genRand.NextFloat() * 0.1)) + { + Main.tile[index1, index2].type = (ushort) 59; + if ((double) num5 == (double) num6 && (double) index2 > (double) vector2_1.Y) + Main.tile[index1, index2].active(true); + if (Main.tile[index1, index2].wall > (ushort) 0) + Main.tile[index1, index2].wall = (ushort) 80; + } + } + } + vector2_1 += vector2_2; + vector2_1.X += vector2_2.X; + vector2_2.X += (float) WorldGen.genRand.Next(-100, 110) * 0.005f; + vector2_2.Y -= (float) WorldGen.genRand.Next(110) * 0.005f; + if ((double) vector2_2.X > -0.5 && (double) vector2_2.X < 0.5) + vector2_2.X = (double) vector2_2.X >= 0.0 ? 0.5f : -0.5f; + if ((double) vector2_2.X > 0.5) + vector2_2.X = 0.5f; + if ((double) vector2_2.X < -0.5) + vector2_2.X = -0.5f; + if ((double) vector2_2.Y > 0.5) + vector2_2.Y = 0.5f; + if ((double) vector2_2.Y < -0.5) + vector2_2.Y = -0.5f; + for (int index = 0; index < 2; ++index) + { + int i1 = (int) vector2_1.X + WorldGen.genRand.Next(-20, 20); + int j1; + for (j1 = (int) vector2_1.Y + WorldGen.genRand.Next(0, 20); !Main.tile[i1, j1].active() && Main.tile[i1, j1].type != (ushort) 59; j1 = (int) vector2_1.Y + WorldGen.genRand.Next(0, 20)) + i1 = (int) vector2_1.X + WorldGen.genRand.Next(-20, 20); + int num15 = WorldGen.genRand.Next(10, 20); + int steps = WorldGen.genRand.Next(10, 20); + WorldGen.TileRunner(i1, j1, (double) num15, steps, 59, speedY: 2f, noYChange: true); + } + } + } + + public static void Cavinator(int i, int j, int steps) + { + double num1 = (double) WorldGen.genRand.Next(7, 15); + int num2 = 1; + if (WorldGen.genRand.Next(2) == 0) + num2 = -1; + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j; + int num3 = WorldGen.genRand.Next(20, 40); + Vector2 vector2_2; + vector2_2.Y = (float) WorldGen.genRand.Next(10, 20) * 0.01f; + vector2_2.X = (float) num2; + while (num3 > 0) + { + --num3; + int num4 = (int) ((double) vector2_1.X - num1 * 0.5); + int num5 = (int) ((double) vector2_1.X + num1 * 0.5); + int num6 = (int) ((double) vector2_1.Y - num1 * 0.5); + int num7 = (int) ((double) vector2_1.Y + num1 * 0.5); + if (num4 < 0) + num4 = 0; + if (num5 > Main.maxTilesX) + num5 = Main.maxTilesX; + if (num6 < 0) + num6 = 0; + if (num7 > Main.maxTilesY) + num7 = Main.maxTilesY; + double num8 = num1 * (double) WorldGen.genRand.Next(80, 120) * 0.01; + for (int index1 = num4; index1 < num5; ++index1) + { + for (int index2 = num6; index2 < num7; ++index2) + { + double num9 = (double) Math.Abs((float) index1 - vector2_1.X); + float num10 = Math.Abs((float) index2 - vector2_1.Y); + if (Math.Sqrt(num9 * num9 + (double) num10 * (double) num10) < num8 * 0.4 && TileID.Sets.CanBeClearedDuringGeneration[(int) Main.tile[index1, index2].type] && Main.tile[index1, index2].type != (ushort) 53) + Main.tile[index1, index2].active(false); + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if ((double) vector2_2.X > (double) num2 + 0.5) + vector2_2.X = (float) num2 + 0.5f; + if ((double) vector2_2.X < (double) num2 - 0.5) + vector2_2.X = (float) num2 - 0.5f; + if ((double) vector2_2.Y > 2.0) + vector2_2.Y = 2f; + if ((double) vector2_2.Y < 0.0) + vector2_2.Y = 0.0f; + } + if (steps <= 0 || (double) (int) vector2_1.Y >= Main.rockLayer + 50.0) + return; + WorldGen.Cavinator((int) vector2_1.X, (int) vector2_1.Y, steps - 1); + } + + public static void CaveOpenater(int i, int j) + { + double num1 = (double) WorldGen.genRand.Next(7, 12); + int num2 = 1; + if (WorldGen.genRand.Next(2) == 0) + num2 = -1; + if (WorldGen.genRand.Next(10) != 0) + num2 = i >= Main.maxTilesX / 2 ? -1 : 1; + Vector2 vector2_1; + vector2_1.X = (float) i; + vector2_1.Y = (float) j; + int num3 = 100; + Vector2 vector2_2; + vector2_2.Y = 0.0f; + vector2_2.X = (float) num2; + while (num3 > 0) + { + Tile tile = Main.tile[(int) vector2_1.X, (int) vector2_1.Y]; + if (tile.wall == (ushort) 0 || tile.active() && !TileID.Sets.CanBeClearedDuringGeneration[(int) tile.type]) + num3 = 0; + --num3; + int num4 = (int) ((double) vector2_1.X - num1 * 0.5); + int num5 = (int) ((double) vector2_1.X + num1 * 0.5); + int num6 = (int) ((double) vector2_1.Y - num1 * 0.5); + int num7 = (int) ((double) vector2_1.Y + num1 * 0.5); + if (num4 < 0) + num4 = 0; + if (num5 > Main.maxTilesX) + num5 = Main.maxTilesX; + if (num6 < 0) + num6 = 0; + if (num7 > Main.maxTilesY) + num7 = Main.maxTilesY; + double num8 = num1 * (double) WorldGen.genRand.Next(80, 120) * 0.01; + for (int index1 = num4; index1 < num5; ++index1) + { + for (int index2 = num6; index2 < num7; ++index2) + { + double num9 = (double) Math.Abs((float) index1 - vector2_1.X); + float num10 = Math.Abs((float) index2 - vector2_1.Y); + if (Math.Sqrt(num9 * num9 + (double) num10 * (double) num10) < num8 * 0.4 && TileID.Sets.CanBeClearedDuringGeneration[(int) Main.tile[index1, index2].type]) + Main.tile[index1, index2].active(false); + } + } + vector2_1 += vector2_2; + vector2_2.X += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + vector2_2.Y += (float) WorldGen.genRand.Next(-10, 11) * 0.05f; + if ((double) vector2_2.X > (double) num2 + 0.5) + vector2_2.X = (float) num2 + 0.5f; + if ((double) vector2_2.X < (double) num2 - 0.5) + vector2_2.X = (float) num2 - 0.5f; + if ((double) vector2_2.Y > 0.0) + vector2_2.Y = 0.0f; + if ((double) vector2_2.Y < -0.5) + vector2_2.Y = -0.5f; + } + } + + public static void DiamondTileFrame(int i, int j) + { + WorldGen.TileFrame(i - 1, j); + WorldGen.TileFrame(i, j - 1); + WorldGen.TileFrame(i, j + 1); + WorldGen.TileFrame(i + 1, j); + } + + public static void SquareTileFrame(int i, int j, bool resetFrame = true) + { + WorldGen.TileFrame(i - 1, j - 1); + WorldGen.TileFrame(i - 1, j); + WorldGen.TileFrame(i - 1, j + 1); + WorldGen.TileFrame(i, j - 1); + WorldGen.TileFrame(i, j, resetFrame); + WorldGen.TileFrame(i, j + 1); + WorldGen.TileFrame(i + 1, j - 1); + WorldGen.TileFrame(i + 1, j); + WorldGen.TileFrame(i + 1, j + 1); + } + + public static void SquareWallFrame(int i, int j, bool resetFrame = true) + { + Framing.WallFrame(i - 1, j - 1); + Framing.WallFrame(i - 1, j); + Framing.WallFrame(i - 1, j + 1); + Framing.WallFrame(i, j - 1); + Framing.WallFrame(i, j, resetFrame); + Framing.WallFrame(i, j + 1); + Framing.WallFrame(i + 1, j - 1); + Framing.WallFrame(i + 1, j); + Framing.WallFrame(i + 1, j + 1); + } + + public static void SectionTileFrameWithCheck(int startX, int startY, int endX, int endY) + { + int sectionX1 = Netplay.GetSectionX(startX); + int sectionY1 = Netplay.GetSectionY(startY); + int sectionX2 = Netplay.GetSectionX(endX); + int sectionY2 = Netplay.GetSectionY(endY); + for (int index1 = sectionX1; index1 <= sectionX2; ++index1) + { + for (int index2 = sectionY1; index2 <= sectionY2; ++index2) + { + if (Main.sectionManager.SectionLoaded(index1, index2) && !Main.sectionManager.SectionFramed(index1, index2)) + { + WorldGen.SectionTileFrame(index1, index2, index1, index2); + if (Main.sectionManager.FrameSectionsLeft == 0) + return; + } + } + } + } + + public static void SectionTileFrame(int startX, int startY, int endX, int endY) + { + Main.mapTime = Main.mapTimeMax + 10; + WorldGen.noMapUpdate = true; + int num1 = startX * 200; + int num2 = (endX + 1) * 200; + int num3 = startY * 150; + int num4 = (endY + 1) * 150; + if (num1 < 1) + num1 = 1; + if (num3 < 1) + num3 = 1; + if (num1 > Main.maxTilesX - 2) + num1 = Main.maxTilesX - 2; + if (num3 > Main.maxTilesY - 2) + num3 = Main.maxTilesY - 2; + if (num2 > Main.maxTilesX - 2) + num2 = Main.maxTilesX - 2; + if (num4 > Main.maxTilesY - 2) + num4 = Main.maxTilesY - 2; + for (int i = num1 - 1; i < num2 + 1; ++i) + { + for (int j = num3 - 1; j < num4 + 1; ++j) + { + if (Main.tile[i, j] == null) + Main.tile[i, j] = new Tile(); + WorldGen.TileFrame(i, j, true, true); + Framing.WallFrame(i, j, true); + } + } + for (int x = startX; x <= endX; ++x) + { + for (int y = startY; y <= endY; ++y) + Main.sectionManager.SetSectionFramed(x, y); + } + WorldGen.noMapUpdate = false; + } + + public static void RangeFrame(int startX, int startY, int endX, int endY) + { + int num1 = startX; + int num2 = endX + 1; + int num3 = startY; + int num4 = endY + 1; + for (int i = num1 - 1; i < num2 + 1; ++i) + { + for (int j = num3 - 1; j < num4 + 1; ++j) + { + WorldGen.TileFrame(i, j); + Framing.WallFrame(i, j); + } + } + } + + public static void WaterCheck() + { + Liquid.tilesIgnoreWater(true); + Liquid.numLiquid = 0; + LiquidBuffer.numLiquidBuffer = 0; + for (int index1 = 1; index1 < Main.maxTilesX - 1; ++index1) + { + for (int index2 = Main.maxTilesY - 2; index2 > 0; --index2) + { + Tile checkTile = Main.tile[index1, index2]; + checkTile.checkingLiquid(false); + if (checkTile.liquid > (byte) 0 && checkTile.nactive() && Main.tileSolid[(int) checkTile.type] && !Main.tileSolidTop[(int) checkTile.type]) + checkTile.liquid = (byte) 0; + else if (checkTile.liquid > (byte) 0) + { + if (checkTile.active()) + { + if (checkTile.lava()) + { + if (TileObjectData.CheckLavaDeath(checkTile)) + WorldGen.KillTile(index1, index2); + } + else if (TileObjectData.CheckWaterDeath(checkTile)) + WorldGen.KillTile(index1, index2); + } + Tile tile1 = Main.tile[index1, index2 + 1]; + if ((!tile1.nactive() || !Main.tileSolid[(int) tile1.type] || Main.tileSolidTop[(int) tile1.type]) && tile1.liquid < byte.MaxValue) + { + if (tile1.liquid > (byte) 250) + tile1.liquid = byte.MaxValue; + else + Liquid.AddWater(index1, index2); + } + Tile tile2 = Main.tile[index1 - 1, index2]; + Tile tile3 = Main.tile[index1 + 1, index2]; + if ((!tile2.nactive() || !Main.tileSolid[(int) tile2.type] || Main.tileSolidTop[(int) tile2.type]) && (int) tile2.liquid != (int) checkTile.liquid) + Liquid.AddWater(index1, index2); + else if ((!tile3.nactive() || !Main.tileSolid[(int) tile3.type] || Main.tileSolidTop[(int) tile3.type]) && (int) tile3.liquid != (int) checkTile.liquid) + Liquid.AddWater(index1, index2); + if (checkTile.lava()) + { + if (tile2.liquid > (byte) 0 && !tile2.lava()) + Liquid.AddWater(index1, index2); + else if (tile3.liquid > (byte) 0 && !tile3.lava()) + Liquid.AddWater(index1, index2); + else if (Main.tile[index1, index2 - 1].liquid > (byte) 0 && !Main.tile[index1, index2 - 1].lava()) + Liquid.AddWater(index1, index2); + else if (tile1.liquid > (byte) 0 && !tile1.lava()) + Liquid.AddWater(index1, index2); + } + } + } + } + Liquid.tilesIgnoreWater(false); + } + + public static void EveryTileFrame() + { + Stopwatch stopwatch = new Stopwatch(); + stopwatch.Start(); + WorldGen.noLiquidCheck = true; + WorldGen.noTileActions = true; + for (int i = 0; i < Main.maxTilesX; ++i) + { + float num = (float) i / (float) Main.maxTilesX; + Main.statusText = Lang.gen[55].Value + " " + (object) (int) ((double) num * 100.0 + 1.0) + "%"; + for (int j = 0; j < Main.maxTilesY; ++j) + { + if (Main.tile[i, j].active()) + WorldGen.TileFrame(i, j, true); + if (Main.tile[i, j].wall > (ushort) 0) + Framing.WallFrame(i, j, true); + } + } + WorldGen.noLiquidCheck = false; + WorldGen.noTileActions = false; + long elapsedMilliseconds = stopwatch.ElapsedMilliseconds; + } + + public static void PlantCheck(int x, int y) + { + x = Utils.Clamp(x, 1, Main.maxTilesX - 2); + y = Utils.Clamp(y, 1, Main.maxTilesY - 2); + for (int index1 = x - 1; index1 <= x + 1; ++index1) + { + for (int index2 = y - 1; index2 <= y + 1; ++index2) + { + if (Main.tile[index1, index2] == null) + return; + } + } + int num1 = -1; + int num2 = (int) Main.tile[x, y].type; + int num3 = x - 1; + int num4 = x + 1; + int maxTilesX = Main.maxTilesX; + int num5 = y - 1; + if (y + 1 >= Main.maxTilesY) + num1 = num2; + if (x - 1 >= 0 && Main.tile[x - 1, y] != null && Main.tile[x - 1, y].nactive()) + { + int type1 = (int) Main.tile[x - 1, y].type; + } + if (x + 1 < Main.maxTilesX && Main.tile[x + 1, y] != null && Main.tile[x + 1, y].nactive()) + { + int type2 = (int) Main.tile[x + 1, y].type; + } + if (y - 1 >= 0 && Main.tile[x, y - 1] != null && Main.tile[x, y - 1].nactive()) + { + int type3 = (int) Main.tile[x, y - 1].type; + } + if (y + 1 < Main.maxTilesY && Main.tile[x, y + 1] != null && Main.tile[x, y + 1].nactive() && !Main.tile[x, y + 1].halfBrick() && Main.tile[x, y + 1].slope() == (byte) 0) + num1 = (int) Main.tile[x, y + 1].type; + if (x - 1 >= 0 && y - 1 >= 0 && Main.tile[x - 1, y - 1] != null && Main.tile[x - 1, y - 1].nactive()) + { + int type4 = (int) Main.tile[x - 1, y - 1].type; + } + if (x + 1 < Main.maxTilesX && y - 1 >= 0 && Main.tile[x + 1, y - 1] != null && Main.tile[x + 1, y - 1].nactive()) + { + int type5 = (int) Main.tile[x + 1, y - 1].type; + } + if (x - 1 >= 0 && y + 1 < Main.maxTilesY && Main.tile[x - 1, y + 1] != null && Main.tile[x - 1, y + 1].nactive()) + { + int type6 = (int) Main.tile[x - 1, y + 1].type; + } + if (x + 1 < Main.maxTilesX && y + 1 < Main.maxTilesY && Main.tile[x + 1, y + 1] != null && Main.tile[x + 1, y + 1].nactive()) + { + int type7 = (int) Main.tile[x + 1, y + 1].type; + } + if ((num2 != 3 || num1 == 2 || num1 == 477 || num1 == 78 || num1 == 380 || num1 == 579) && (num2 != 73 || num1 == 2 || num1 == 477 || num1 == 78 || num1 == 380 || num1 == 579) && (num2 != 24 || num1 == 23) && (num2 != 61 || num1 == 60) && (num2 != 74 || num1 == 60) && (num2 != 71 || num1 == 70) && (num2 != 110 || num1 == 109 || num1 == 492) && (num2 != 113 || num1 == 109 || num1 == 492) && (num2 != 201 || num1 == 199)) + return; + if ((num2 == 3 || num2 == 73) && num1 != 2 && num1 != 477 && Main.tile[x, y].frameX >= (short) 162) + Main.tile[x, y].frameX = (short) 126; + if (num2 == 74 && num1 != 60 && Main.tile[x, y].frameX >= (short) 162) + Main.tile[x, y].frameX = (short) 126; + if (num1 == 23) + { + num2 = 24; + if (Main.tile[x, y].frameX >= (short) 162) + Main.tile[x, y].frameX = (short) 126; + } + else if (num1 == 2 || num1 == 477) + num2 = num2 != 113 ? 3 : 73; + else if (num1 == 109 || num1 == 492) + { + num2 = num2 != 73 ? 110 : 113; + } + else + { + switch (num1) + { + case 70: + num2 = 71; + while (Main.tile[x, y].frameX > (short) 72) + Main.tile[x, y].frameX -= (short) 72; + break; + case 199: + num2 = 201; + break; + } + } + if (num2 != (int) Main.tile[x, y].type) + Main.tile[x, y].type = (ushort) num2; + else + WorldGen.KillTile(x, y); + } + + public static bool CanPoundTile(int x, int y) + { + if (Main.tile[x, y] == null) + Main.tile[x, y] = new Tile(); + if (Main.tile[x, y - 1] == null) + Main.tile[x, y - 1] = new Tile(); + if (Main.tile[x, y + 1] == null) + Main.tile[x, y + 1] = new Tile(); + switch (Main.tile[x, y].type) + { + case 10: + case 48: + case 137: + case 138: + case 232: + case 380: + case 387: + case 388: + case 476: + case 484: + return false; + default: + if (WorldGen.gen && (Main.tile[x, y].type == (ushort) 190 || Main.tile[x, y].type == (ushort) 30)) + return false; + if (Main.tile[x, y - 1].active()) + { + switch (Main.tile[x, y - 1].type) + { + case 21: + case 26: + case 77: + case 88: + case 235: + case 237: + case 441: + case 467: + case 468: + case 470: + case 475: + case 488: + case 597: + return false; + } + } + return WorldGen.CanKillTile(x, y); + } + } + + public static bool SlopeTile(int i, int j, int slope = 0, bool noEffects = false) + { + if (!WorldGen.CanPoundTile(i, j)) + return false; + Main.tile[i, j].halfBrick(false); + Main.tile[i, j].slope((byte) slope); + if (!WorldGen.gen) + { + if (!noEffects) + WorldGen.KillTile(i, j, true, true); + SoundEngine.PlaySound(0, i * 16, j * 16); + WorldGen.SquareTileFrame(i, j); + if (Main.tile[i, j].slope() == (byte) 0) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(i * 16, j * 16, 16, 16); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && !Main.player[index].dead && rectangle.Intersects(new Microsoft.Xna.Framework.Rectangle((int) Main.player[index].position.X, (int) Main.player[index].position.Y, Main.player[index].width, Main.player[index].height))) + { + Main.player[index].gfxOffY += Main.player[index].position.Y + (float) Main.player[index].height - (float) rectangle.Y; + Main.player[index].position.Y = (float) (rectangle.Y - Main.player[index].height); + } + } + } + } + return true; + } + + public static bool PoundTile(int i, int j) + { + if (!WorldGen.CanPoundTile(i, j)) + return false; + if (!Main.tile[i, j].halfBrick()) + Main.tile[i, j].halfBrick(true); + else + Main.tile[i, j].halfBrick(false); + if (!WorldGen.gen) + { + WorldGen.KillTile(i, j, true, true); + SoundEngine.PlaySound(0, i * 16, j * 16); + WorldGen.SquareTileFrame(i, j); + if (!Main.tile[i, j].halfBrick()) + { + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(i * 16, j * 16, 16, 16); + for (int index = 0; index < (int) byte.MaxValue; ++index) + { + if (Main.player[index].active && !Main.player[index].dead && rectangle.Intersects(new Microsoft.Xna.Framework.Rectangle((int) Main.player[index].position.X, (int) Main.player[index].position.Y, Main.player[index].width, Main.player[index].height))) + { + Main.player[index].gfxOffY += Main.player[index].position.Y + (float) Main.player[index].height - (float) rectangle.Y; + Main.player[index].position.Y = (float) (rectangle.Y - Main.player[index].height); + } + } + } + } + return true; + } + + public static void PoundPlatform(int x, int y) + { + if (Main.tile[x, y].halfBrick()) + { + WorldGen.PoundTile(x, y); + if (Main.netMode != 1) + return; + NetMessage.SendData(17, number: 7, number2: ((float) x), number3: ((float) y), number4: 1f); + } + else + { + int slope1 = 1; + int slope2 = 2; + if (TileID.Sets.Platforms[(int) Main.tile[x + 1, y - 1].type] || TileID.Sets.Platforms[(int) Main.tile[x - 1, y + 1].type] || WorldGen.SolidTile(x + 1, y) && !WorldGen.SolidTile(x - 1, y)) + { + slope1 = 2; + slope2 = 1; + } + if (Main.tile[x, y].slope() == (byte) 0) + { + WorldGen.SlopeTile(x, y, slope1); + int num = (int) Main.tile[x, y].slope(); + if (Main.netMode != 1) + return; + NetMessage.SendData(17, number: 14, number2: ((float) x), number3: ((float) y), number4: ((float) num)); + } + else if ((int) Main.tile[x, y].slope() == slope1) + { + WorldGen.SlopeTile(x, y, slope2); + int num = (int) Main.tile[x, y].slope(); + if (Main.netMode != 1) + return; + NetMessage.SendData(17, number: 14, number2: ((float) x), number3: ((float) y), number4: ((float) num)); + } + else + { + WorldGen.SlopeTile(x, y); + int num = (int) Main.tile[x, y].slope(); + if (Main.netMode == 1) + NetMessage.SendData(17, number: 14, number2: ((float) x), number3: ((float) y), number4: ((float) num)); + WorldGen.PoundTile(x, y); + if (Main.netMode != 1) + return; + NetMessage.SendData(17, number: 7, number2: ((float) x), number3: ((float) y), number4: 1f); + } + } + } + + public static int PlatformProperSides(int x, int y, bool acceptNonOpposing = false) + { + Tile tile = Main.tile[x, y]; + if (!tile.active() || !TileID.Sets.Platforms[(int) tile.type]) + return 0; + int num1 = (int) tile.slope(); + int num2 = -1; + if (num1 == 1) + num2 = 2; + if (num1 == 2) + num2 = 1; + int num3 = 0; + int num4 = 1; + int num5 = 0; + if (num1 == 1) + num5 = 1; + if (num1 == 2) + num5 = -1; + if (acceptNonOpposing) + { + if (Main.tile[x + num4, y + num5].active() && TileID.Sets.Platforms[(int) Main.tile[x + num4, y + num5].type] && (int) Main.tile[x + num4, y + num5].slope() != num2) + ++num3; + } + else if (Main.tile[x + num4, y + num5].active() && TileID.Sets.Platforms[(int) Main.tile[x + num4, y + num5].type] && (int) Main.tile[x + num4, y + num5].slope() == num1) + ++num3; + int num6 = num4 * -1; + int num7 = num5 * -1; + if (acceptNonOpposing) + { + if (Main.tile[x + num6, y + num7].active() && TileID.Sets.Platforms[(int) Main.tile[x + num6, y + num7].type] && (int) Main.tile[x + num6, y + num7].slope() != num2) + ++num3; + } + else if (Main.tile[x + num6, y + num7].active() && TileID.Sets.Platforms[(int) Main.tile[x + num6, y + num7].type] && (int) Main.tile[x + num6, y + num7].slope() == num1) + ++num3; + return num3; + } + + public static bool UpdateMapTile(int i, int j, bool addToList = true) + { + bool flag = false; + if (Main.mapEnabled && !WorldGen.noMapUpdate && !WorldGen.gen && ((Main.Map[i, j].Light <= (byte) 0 ? 0 : (Main.Map.UpdateType(i, j) ? 1 : 0)) & (addToList ? 1 : 0)) != 0) + { + flag = true; + if (MapHelper.numUpdateTile < MapHelper.maxUpdateTile - 1) + { + MapHelper.updateTileX[MapHelper.numUpdateTile] = (short) i; + MapHelper.updateTileY[MapHelper.numUpdateTile] = (short) j; + ++MapHelper.numUpdateTile; + } + else + Main.refreshMap = true; + } + return flag; + } + + public static void TileMergeAttemptFrametest( + int i, + int j, + int myType, + int lookfor, + ref int up, + ref int down, + ref int left, + ref int right, + ref int upLeft, + ref int upRight, + ref int downLeft, + ref int downRight) + { + if (up == lookfor) + { + WorldGen.TileFrame(i, j - 1); + if (WorldGen.mergeDown) + up = myType; + } + if (down == lookfor) + { + WorldGen.TileFrame(i, j + 1); + if (WorldGen.mergeUp) + down = myType; + } + if (left == lookfor) + { + WorldGen.TileFrame(i - 1, j); + if (WorldGen.mergeRight) + left = myType; + } + if (right == lookfor) + { + WorldGen.TileFrame(i + 1, j); + if (WorldGen.mergeLeft) + right = myType; + } + if (upLeft == lookfor) + upLeft = myType; + if (upRight == lookfor) + upRight = myType; + if (downLeft == lookfor) + downLeft = myType; + if (downRight != lookfor) + return; + downRight = myType; + } + + public static void TileMergeAttemptFrametest( + int i, + int j, + int myType, + bool[] lookfor, + ref int up, + ref int down, + ref int left, + ref int right, + ref int upLeft, + ref int upRight, + ref int downLeft, + ref int downRight) + { + if (up > -1 && lookfor[up]) + { + WorldGen.TileFrame(i, j - 1); + if (WorldGen.mergeDown) + up = myType; + } + if (down > -1 && lookfor[down]) + { + WorldGen.TileFrame(i, j + 1); + if (WorldGen.mergeUp) + down = myType; + } + if (left > -1 && lookfor[left]) + { + WorldGen.TileFrame(i - 1, j); + if (WorldGen.mergeRight) + left = myType; + } + if (right > -1 && lookfor[right]) + { + WorldGen.TileFrame(i + 1, j); + if (WorldGen.mergeLeft) + right = myType; + } + if (upLeft > -1 && lookfor[upLeft]) + upLeft = myType; + if (upRight > -1 && lookfor[upRight]) + upRight = myType; + if (downLeft > -1 && lookfor[downLeft]) + downLeft = myType; + if (downRight <= -1 || !lookfor[downRight]) + return; + downRight = myType; + } + + public static void TileMergeAttempt( + int myType, + int lookfor, + ref int up, + ref int down, + ref int left, + ref int right) + { + if (lookfor == up) + up = myType; + if (lookfor == down) + down = myType; + if (lookfor == left) + left = myType; + if (lookfor != right) + return; + right = myType; + } + + public static void TileMergeAttempt( + int myType, + int lookfor, + ref int up, + ref int down, + ref int left, + ref int right, + ref int upLeft, + ref int upRight, + ref int downLeft, + ref int downRight) + { + if (lookfor == up) + up = myType; + if (lookfor == down) + down = myType; + if (lookfor == left) + left = myType; + if (lookfor == right) + right = myType; + if (lookfor == upLeft) + upLeft = myType; + if (lookfor == upRight) + upRight = myType; + if (lookfor == downLeft) + downLeft = myType; + if (lookfor != downRight) + return; + downRight = myType; + } + + public static void TileMergeAttempt( + int myType, + bool[] lookfor, + ref int up, + ref int down, + ref int left, + ref int right, + ref int upLeft, + ref int upRight, + ref int downLeft, + ref int downRight) + { + if (up > -1 && lookfor[up]) + up = myType; + if (down > -1 && lookfor[down]) + down = myType; + if (left > -1 && lookfor[left]) + left = myType; + if (right > -1 && lookfor[right]) + right = myType; + if (upLeft > -1 && lookfor[upLeft]) + upLeft = myType; + if (upRight > -1 && lookfor[upRight]) + upRight = myType; + if (downLeft > -1 && lookfor[downLeft]) + downLeft = myType; + if (downRight <= -1 || !lookfor[downRight]) + return; + downRight = myType; + } + + public static void TileMergeAttempt( + int myType, + bool[] lookfor, + bool[] exclude, + ref int up, + ref int down, + ref int left, + ref int right, + ref int upLeft, + ref int upRight, + ref int downLeft, + ref int downRight) + { + if (up > -1 && !exclude[up] && lookfor[up]) + up = myType; + if (down > -1 && !exclude[down] && lookfor[down]) + down = myType; + if (left > -1 && !exclude[left] && lookfor[left]) + left = myType; + if (right > -1 && !exclude[right] && lookfor[right]) + right = myType; + if (upLeft > -1 && !exclude[upLeft] && lookfor[upLeft]) + upLeft = myType; + if (upRight > -1 && !exclude[upRight] && lookfor[upRight]) + upRight = myType; + if (downLeft > -1 && !exclude[downLeft] && lookfor[downLeft]) + downLeft = myType; + if (downRight <= -1 || exclude[downRight] || !lookfor[downRight]) + return; + downRight = myType; + } + + public static void TileMergeAttemptWeird( + int myType, + int changeTo, + bool[] exclude, + ref int up, + ref int down, + ref int left, + ref int right, + ref int upLeft, + ref int upRight, + ref int downLeft, + ref int downRight) + { + if (up > -1 && !exclude[up] && up != myType) + up = changeTo; + if (down > -1 && !exclude[down] && down != myType) + down = changeTo; + if (left > -1 && !exclude[left] && left != myType) + left = changeTo; + if (right > -1 && !exclude[right] && right != myType) + right = changeTo; + if (upLeft > -1 && !exclude[upLeft] && upLeft != myType) + upLeft = changeTo; + if (upRight > -1 && !exclude[upRight] && upRight != myType) + upRight = changeTo; + if (downLeft > -1 && !exclude[downLeft] && downLeft != myType) + downLeft = changeTo; + if (downRight <= -1 || exclude[downRight] || downRight == myType) + return; + downRight = changeTo; + } + + public static int GetTileMossColor(int tileType) + { + switch (tileType) + { + case 179: + case 512: + return 0; + case 180: + case 513: + return 1; + case 181: + case 514: + return 2; + case 182: + case 515: + return 3; + case 183: + case 516: + return 4; + case 381: + case 517: + return 5; + case 534: + case 535: + return 6; + case 536: + case 537: + return 7; + case 539: + case 540: + return 8; + default: + return -1; + } + } + + public static void CheckFoodPlatter(int x, int y, int type) + { + if (Main.tile[x, y] == null || WorldGen.destroyObject || WorldGen.SolidTileAllowBottomSlope(x, y + 1)) + return; + if (type == 520) + { + int key = TEFoodPlatter.Find(x, y); + if (key != -1 && ((TEFoodPlatter) TileEntity.ByID[key]).item.stack > 0) + { + ((TEFoodPlatter) TileEntity.ByID[key]).DropItem(); + if (Main.netMode != 2) + Main.LocalPlayer.InterruptItemUsageIfOverTile(520); + } + } + WorldGen.destroyObject = true; + if ((int) Main.tile[x, y].type == type) + WorldGen.KillTile(x, y); + if (type == 520) + TEFoodPlatter.Kill(x, y); + WorldGen.destroyObject = false; + } + + public static bool SkipFramingBecauseOfGen => WorldGen.generatingWorld && WorldGen.skipFramingDuringGen; + + public static void TileFrame(int i, int j, bool resetFrame = false, bool noBreak = false) + { + bool addToList = false; + try + { + if (i > 5) + { + if (j > 5) + { + if (i < Main.maxTilesX - 5) + { + if (j < Main.maxTilesY - 5) + { + if (Main.tile[i, j] != null) + { + if (WorldGen.SkipFramingBecauseOfGen && !Main.tileFrameImportant[(int) Main.tile[i, j].type]) + return; + addToList = WorldGen.UpdateMapTile(i, j); + Tile tile1 = Main.tile[i, j]; + if (!tile1.active()) + { + tile1.halfBrick(false); + tile1.color((byte) 0); + tile1.slope((byte) 0); + } + if (tile1.liquid > (byte) 0 && Main.netMode != 1 && !WorldGen.noLiquidCheck) + Liquid.AddWater(i, j); + if (tile1.active()) + { + if (noBreak && Main.tileFrameImportant[(int) tile1.type] && tile1.type != (ushort) 4) + return; + int index1 = (int) tile1.type; + if (Main.tileStone[index1]) + index1 = 1; + int frameX = (int) tile1.frameX; + int frameY = (int) tile1.frameY; + Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(-1, -1, 0, 0); + if (Main.tileFrameImportant[(int) tile1.type]) + { + switch (index1) + { + case 4: + WorldGen.CheckTorch(i, j); + return; + case 136: + Tile tile2 = Main.tile[i, j - 1]; + Tile tile3 = Main.tile[i, j + 1]; + Tile tile4 = Main.tile[i - 1, j]; + Tile tile5 = Main.tile[i + 1, j]; + Tile tile6 = Main.tile[i - 1, j + 1]; + Tile tile7 = Main.tile[i + 1, j + 1]; + Tile tile8 = Main.tile[i - 1, j - 1]; + Tile tile9 = Main.tile[i + 1, j - 1]; + int index2 = -1; + int tree1 = -1; + int tree2 = -1; + int tree3 = -1; + int tree4 = -1; + int tree5 = -1; + int tree6 = -1; + if (tile2 != null && tile2.nactive()) + { + int type = (int) tile2.type; + } + if (tile3 != null && tile3.nactive() && !tile3.halfBrick() && !tile3.topSlope()) + index2 = (int) tile3.type; + if (tile4 != null && tile4.nactive()) + tree1 = (int) tile4.type; + if (tile5 != null && tile5.nactive()) + tree2 = (int) tile5.type; + if (tile6 != null && tile6.nactive()) + tree3 = (int) tile6.type; + if (tile7 != null && tile7.nactive()) + tree4 = (int) tile7.type; + if (tile8 != null && tile8.nactive()) + tree5 = (int) tile8.type; + if (tile9 != null && tile9.nactive()) + tree6 = (int) tile9.type; + if (index2 >= 0 && Main.tileSolid[index2] && !Main.tileNoAttach[index2] && !tile3.halfBrick() && (tile3.slope() == (byte) 0 || tile3.bottomSlope())) + { + tile1.frameX = (short) 0; + return; + } + if (tree1 >= 0 && Main.tileSolid[tree1] && !Main.tileNoAttach[tree1] && (tile4.leftSlope() || tile4.slope() == (byte) 0) && !tile4.halfBrick() || tree1 >= 0 && TileID.Sets.IsBeam[tree1] || WorldGen.IsTreeType(tree1) && WorldGen.IsTreeType(tree5) && WorldGen.IsTreeType(tree3)) + { + tile1.frameX = (short) 18; + return; + } + if (tree2 >= 0 && Main.tileSolid[tree2] && !Main.tileNoAttach[tree2] && (tile5.rightSlope() || tile5.slope() == (byte) 0) && !tile5.halfBrick() || tree2 >= 0 && TileID.Sets.IsBeam[tree2] || WorldGen.IsTreeType(tree2) && WorldGen.IsTreeType(tree6) && WorldGen.IsTreeType(tree4)) + { + tile1.frameX = (short) 36; + return; + } + if (tile1.wall > (ushort) 0) + { + tile1.frameX = (short) 54; + return; + } + WorldGen.KillTile(i, j); + return; + case 442: + WorldGen.CheckProjectilePressurePad(i, j); + return; + case 518: + WorldGen.CheckLilyPad(i, j); + return; + case 519: + WorldGen.CheckCatTail(i, j); + return; + case 549: + WorldGen.CheckUnderwaterPlant((ushort) 549, i, j); + return; + case 571: + WorldGen.CheckBamboo(i, j); + return; + default: + if (index1 == 129 || index1 == 149) + { + Tile tile10 = Main.tile[i, j - 1]; + Tile tile11 = Main.tile[i, j + 1]; + Tile tile12 = Main.tile[i - 1, j]; + Tile tile13 = Main.tile[i + 1, j]; + int index3 = -1; + int index4 = -1; + int index5 = -1; + int index6 = -1; + if (tile10 != null && tile10.nactive() && !tile10.bottomSlope()) + index4 = (int) tile10.type; + if (tile11 != null && tile11.nactive() && !tile11.halfBrick() && !tile11.topSlope()) + index3 = (int) tile11.type; + if (tile12 != null && tile12.nactive()) + index5 = (int) tile12.type; + if (tile13 != null && tile13.nactive()) + index6 = (int) tile13.type; + if (index3 >= 0 && Main.tileSolid[index3] && !Main.tileSolidTop[index3]) + { + tile1.frameY = (short) 0; + return; + } + if (index5 >= 0 && Main.tileSolid[index5] && !Main.tileSolidTop[index5]) + { + tile1.frameY = (short) 54; + return; + } + if (index6 >= 0 && Main.tileSolid[index6] && !Main.tileSolidTop[index6]) + { + tile1.frameY = (short) 36; + return; + } + if (index4 >= 0 && Main.tileSolid[index4] && !Main.tileSolidTop[index4]) + { + tile1.frameY = (short) 18; + return; + } + WorldGen.KillTile(i, j); + return; + } + if (index1 >= 373 && index1 <= 375 || index1 == 461) + { + Tile tile14 = Main.tile[i, j - 1]; + if (tile14 != null && tile14.active() && !tile14.bottomSlope() && Main.tileSolid[(int) tile14.type] && !Main.tileSolidTop[(int) tile14.type]) + return; + WorldGen.KillTile(i, j); + return; + } + switch (index1) + { + case 178: + Tile tile15 = Main.tile[i, j - 1]; + Tile tile16 = Main.tile[i, j + 1]; + Tile tile17 = Main.tile[i - 1, j]; + Tile tile18 = Main.tile[i + 1, j]; + int index7 = -1; + int index8 = -1; + int index9 = -1; + int index10 = -1; + if (tile15 != null && tile15.nactive() && !tile15.bottomSlope()) + index8 = (int) tile15.type; + if (tile16 != null && tile16.nactive() && !tile16.halfBrick() && !tile16.topSlope()) + index7 = (int) tile16.type; + if (tile17 != null && tile17.nactive() && !tile17.halfBrick() && !tile17.rightSlope()) + index9 = (int) tile17.type; + if (tile18 != null && tile18.nactive() && !tile18.halfBrick() && !tile18.leftSlope()) + index10 = (int) tile18.type; + if (index9 == 10) + index9 = -1; + if (index10 == 10) + index10 = -1; + short num1 = (short) (WorldGen.genRand.Next(3) * 18); + if (index7 >= 0 && Main.tileSolid[index7] && !Main.tileSolidTop[index7]) + { + if (tile1.frameY >= (short) 0 && tile1.frameY <= (short) 36) + return; + tile1.frameY = num1; + return; + } + if (index9 >= 0 && Main.tileSolid[index9] && !Main.tileSolidTop[index9]) + { + if (tile1.frameY >= (short) 108 && tile1.frameY <= (short) 54) + return; + tile1.frameY = (short) (108 + (int) num1); + return; + } + if (index10 >= 0 && Main.tileSolid[index10] && !Main.tileSolidTop[index10]) + { + if (tile1.frameY >= (short) 162 && tile1.frameY <= (short) 198) + return; + tile1.frameY = (short) (162 + (int) num1); + return; + } + if (index8 >= 0 && Main.tileSolid[index8] && !Main.tileSolidTop[index8]) + { + if (tile1.frameY >= (short) 54 && tile1.frameY <= (short) 90) + return; + tile1.frameY = (short) (54 + (int) num1); + return; + } + WorldGen.KillTile(i, j); + return; + case 184: + Tile tile19 = Main.tile[i, j - 1]; + Tile tile20 = Main.tile[i, j + 1]; + Tile tile21 = Main.tile[i - 1, j]; + Tile tile22 = Main.tile[i + 1, j]; + int tileType1 = -1; + int tileType2 = -1; + int tileType3 = -1; + int tileType4 = -1; + if (tile19 != null && tile19.active() && !tile19.bottomSlope()) + tileType2 = (int) tile19.type; + if (tile20 != null && tile20.active() && !tile20.halfBrick() && !tile20.topSlope()) + tileType1 = (int) tile20.type; + if (tile21 != null && tile21.active()) + tileType3 = (int) tile21.type; + if (tile22 != null && tile22.active()) + tileType4 = (int) tile22.type; + short num2 = (short) (WorldGen.genRand.Next(3) * 18); + if (tileType1 >= 0 && WorldGen.GetTileMossColor(tileType1) != -1) + { + tile1.frameX = (short) (22 * WorldGen.GetTileMossColor(tileType1)); + if (tile1.frameY >= (short) 0 && tile1.frameY <= (short) 36) + return; + tile1.frameY = num2; + return; + } + if (tileType2 >= 0 && WorldGen.GetTileMossColor(tileType2) != -1) + { + tile1.frameX = (short) (22 * WorldGen.GetTileMossColor(tileType2)); + if (tile1.frameY >= (short) 54 && tile1.frameY <= (short) 90) + return; + tile1.frameY = (short) (54 + (int) num2); + return; + } + if (tileType3 >= 0 && WorldGen.GetTileMossColor(tileType3) != -1) + { + tile1.frameX = (short) (22 * WorldGen.GetTileMossColor(tileType3)); + if (tile1.frameY >= (short) 108 && tile1.frameY <= (short) 54) + return; + tile1.frameY = (short) (108 + (int) num2); + return; + } + if (tileType4 >= 0 && WorldGen.GetTileMossColor(tileType4) != -1) + { + tile1.frameX = (short) (22 * WorldGen.GetTileMossColor(tileType4)); + if (tile1.frameY >= (short) 162 && tile1.frameY <= (short) 198) + return; + tile1.frameY = (short) (162 + (int) num2); + return; + } + WorldGen.KillTile(i, j); + return; + case 529: + if (!WorldGen.SolidTileAllowBottomSlope(i, j + 1)) + { + WorldGen.KillTile(i, j); + return; + } + int num3 = (int) Main.tile[i, j].frameY / 34; + if (TileID.Sets.Conversion.Sand[(int) Main.tile[i, j + 1].type]) + return; + WorldGen.KillTile(i, j); + return; + default: + if (index1 == 3 || index1 == 24 || index1 == 61 || index1 == 71 || index1 == 73 || index1 == 74 || index1 == 110 || index1 == 113 || index1 == 201) + { + WorldGen.PlantCheck(i, j); + return; + } + if (index1 == 227) + { + WorldGen.CheckDye(i, j); + return; + } + if (index1 == 579) + { + WorldGen.CheckRockGolemHead(i, j); + return; + } + if (index1 == 12 || index1 == 31) + { + WorldGen.CheckOrb(i, j, index1); + return; + } + switch (index1) + { + case 165: + WorldGen.CheckTight(i, j); + return; + case 185: + WorldGen.CheckPile(i, j); + return; + case 235: + WorldGen.Check3x1(i, j, index1); + return; + case 324: + if (WorldGen.SolidTileAllowBottomSlope(i, j + 1)) + return; + WorldGen.KillTile(i, j); + return; + default: + if (index1 >= 275 && index1 <= 281 || index1 == 296 || index1 == 297 || index1 == 309 || index1 == 358 || index1 == 359 || index1 == 413 || index1 == 414 || index1 == 542 || index1 == 550 || index1 == 551 || index1 == 553 || index1 == 554 || index1 == 558 || index1 == 559 || index1 == 599 || index1 == 600 || index1 == 601 || index1 == 602 || index1 == 603 || index1 == 604 || index1 == 605 || index1 == 606 || index1 == 607 || index1 == 608 || index1 == 609 || index1 == 610 || index1 == 611 || index1 == 612) + { + WorldGen.Check6x3(i, j, index1); + return; + } + switch (index1) + { + case 10: + WorldGen.CheckDoorClosed(i, j, tile1, index1); + return; + case 11: + WorldGen.CheckDoorOpen(i, j, tile1); + return; + case 314: + Minecart.FrameTrack(i, j, false); + return; + case 380: + Tile tile23 = Main.tile[i - 1, j]; + if (tile23 == null) + return; + Tile tile24 = Main.tile[i + 1, j]; + if (tile24 == null || Main.tile[i - 1, j + 1] == null || Main.tile[i + 1, j + 1] == null || Main.tile[i - 1, j - 1] == null || Main.tile[i + 1, j - 1] == null) + return; + int index11 = -1; + int index12 = -1; + if (tile23 != null && tile23.active()) + index12 = !Main.tileStone[(int) tile23.type] ? (int) tile23.type : 1; + if (tile24 != null && tile24.active()) + index11 = !Main.tileStone[(int) tile24.type] ? (int) tile24.type : 1; + if (index11 >= 0 && !Main.tileSolid[index11]) + index11 = -1; + if (index12 >= 0 && !Main.tileSolid[index12]) + index12 = -1; + rectangle.X = index12 != index1 || index11 != index1 ? (index12 != index1 || index11 == index1 ? (index12 == index1 || index11 != index1 ? 54 : 0) : 36) : 18; + tile1.frameX = (short) rectangle.X; + return; + default: + if (index1 >= 0 && TileID.Sets.Platforms[index1]) + { + Tile tile25 = Main.tile[i - 1, j]; + if (tile25 == null) + return; + Tile tile26 = Main.tile[i + 1, j]; + if (tile26 == null) + return; + Tile tile27 = Main.tile[i - 1, j + 1]; + if (tile27 == null) + return; + Tile tile28 = Main.tile[i + 1, j + 1]; + if (tile28 == null) + return; + Tile tile29 = Main.tile[i - 1, j - 1]; + if (tile29 == null) + return; + Tile tile30 = Main.tile[i + 1, j - 1]; + if (tile30 == null) + return; + int index13 = -1; + int index14 = -1; + if (tile25 != null && tile25.active()) + index14 = !Main.tileStone[(int) tile25.type] ? (!TileID.Sets.Platforms[(int) tile25.type] ? (int) tile25.type : index1) : 1; + if (tile26 != null && tile26.active()) + index13 = !Main.tileStone[(int) tile26.type] ? (!TileID.Sets.Platforms[(int) tile26.type] ? (int) tile26.type : index1) : 1; + if (index13 >= 0 && !Main.tileSolid[index13]) + index13 = -1; + if (index14 >= 0 && !Main.tileSolid[index14]) + index14 = -1; + if (index14 == index1 && tile25.halfBrick() != tile1.halfBrick()) + index14 = -1; + if (index13 == index1 && tile26.halfBrick() != tile1.halfBrick()) + index13 = -1; + if (index14 != -1 && index14 != index1 && tile1.halfBrick()) + index14 = -1; + if (index13 != -1 && index13 != index1 && tile1.halfBrick()) + index13 = -1; + if (index14 == -1 && tile29.active() && (int) tile29.type == index1 && tile29.slope() == (byte) 1) + index14 = index1; + if (index13 == -1 && tile30.active() && (int) tile30.type == index1 && tile30.slope() == (byte) 2) + index13 = index1; + if (index14 == index1 && tile25.slope() == (byte) 2 && index13 != index1) + index13 = -1; + if (index13 == index1 && tile26.slope() == (byte) 1 && index14 != index1) + index14 = -1; + rectangle.X = tile1.slope() != (byte) 1 ? (tile1.slope() != (byte) 2 ? (index14 != index1 || index13 != index1 ? (index14 != index1 || index13 != -1 ? (index14 != -1 || index13 != index1 ? (index14 == index1 || index13 != index1 ? (index14 != index1 || index13 == index1 ? (index14 == index1 || index14 == -1 || index13 != -1 ? (index14 != -1 || index13 == index1 || index13 == -1 ? 90 : 126) : 108) : 72) : 54) : (tile26.slope() != (byte) 1 ? 36 : 288)) : (tile25.slope() != (byte) 2 ? 18 : 270)) : (tile25.slope() != (byte) 2 || tile26.slope() != (byte) 1 ? (tile25.slope() != (byte) 2 ? (tile26.slope() != (byte) 1 ? 0 : 234) : 216) : 252)) : (!TileID.Sets.Platforms[(int) tile25.type] || tile25.slope() != (byte) 0 || tile25.halfBrick() ? (tile27.active() || TileID.Sets.Platforms[(int) tile27.type] && tile27.slope() != (byte) 1 ? (tile26.active() || TileID.Sets.Platforms[(int) tile30.type] && tile30.slope() == (byte) 2 ? 144 : 378) : (tile26.active() || TileID.Sets.Platforms[(int) tile30.type] && tile30.slope() == (byte) 2 ? 342 : 414)) : 450)) : (!TileID.Sets.Platforms[(int) tile26.type] || tile26.slope() != (byte) 0 || tile26.halfBrick() ? (tile28.active() || TileID.Sets.Platforms[(int) tile28.type] && tile28.slope() != (byte) 2 ? (tile25.active() || TileID.Sets.Platforms[(int) tile29.type] && tile29.slope() == (byte) 1 ? 180 : 396) : (tile25.active() || TileID.Sets.Platforms[(int) tile29.type] && tile29.slope() == (byte) 1 ? 360 : 432)) : 468); + tile1.frameX = (short) rectangle.X; + return; + } + if (index1 == 233 || index1 == 236 || index1 == 238) + { + WorldGen.CheckJunglePlant(i, j, index1); + return; + } + if (index1 == 530) + { + WorldGen.CheckOasisPlant(i, j); + return; + } + if (index1 == 240 || index1 == 440) + { + WorldGen.Check3x3Wall(i, j); + return; + } + switch (index1) + { + case 241: + WorldGen.Check4x3Wall(i, j); + return; + case 242: + WorldGen.Check6x4Wall(i, j); + return; + case 245: + WorldGen.Check2x3Wall(i, j); + return; + case 246: + WorldGen.Check3x2Wall(i, j); + return; + default: + if (index1 == 464 || index1 == 466) + { + WorldGen.Check5x4(i, j, index1); + return; + } + if (index1 == 334) + { + WorldGen.CheckWeaponsRack(i, j); + return; + } + if (index1 == 471) + { + TEWeaponsRack.Framing_CheckTile(i, j); + return; + } + if (index1 == 34 || index1 == 454) + { + WorldGen.CheckChand(i, j, index1); + return; + } + if (index1 == 547) + { + WorldGen.Check2x5(i, j, index1); + return; + } + if (index1 == 548 || index1 == 614) + { + WorldGen.Check3x6(i, j, index1); + return; + } + if (index1 == 613) + { + WorldGen.Check3x5(i, j, index1); + return; + } + if (index1 == 106 || index1 == 212 || index1 == 219 || index1 == 220 || index1 == 228 || index1 == 231 || index1 == 243 || index1 == 247 || index1 == 283 || index1 >= 300 && index1 <= 308 || index1 == 354 || index1 == 406 || index1 == 412 || index1 == 355 || index1 == 452 || index1 == 455 || index1 == 491 || index1 == 499) + { + WorldGen.Check3x3(i, j, (int) (ushort) index1); + return; + } + if (index1 == 15 || index1 == 497 || index1 == 20 || index1 == 590 || index1 == 216 || index1 == 338 || index1 == 390 || index1 == 493 || index1 == 595 || index1 == 615) + { + WorldGen.Check1x2(i, j, (ushort) index1); + return; + } + if (index1 == 14 || index1 == 469 || index1 == 17 || index1 == 26 || index1 == 77 || index1 == 86 || index1 == 87 || index1 == 377 || index1 == 88 || index1 == 89 || index1 == 114 || index1 == 133 || index1 == 186 || index1 == 187 || index1 == 215 || index1 == 217 || index1 == 218 || index1 == 237 || index1 == 244 || index1 == 285 || index1 == 286 || index1 == 298 || index1 == 299 || index1 == 310 || index1 == 339 || index1 == 538 || index1 >= 361 && index1 <= 364 || index1 >= 391 && index1 <= 394 || index1 == 405 || index1 == 486 || index1 == 488 || index1 == 532 || index1 == 544 || index1 == 533 || index1 == 552 || index1 == 555 || index1 == 556 || index1 == 582 || index1 == 619) + { + WorldGen.Check3x2(i, j, (int) (ushort) index1); + return; + } + if (index1 == 135 || index1 == 144 || index1 == 141 || index1 == 210 || index1 == 239 || index1 == 36 || index1 == 428 || index1 == 593) + { + WorldGen.Check1x1(i, j, index1); + return; + } + if (index1 == 476) + { + WorldGen.CheckGolf1x1(i, j, index1); + return; + } + if (index1 == 494) + { + WorldGen.CheckGolf1x1(i, j, index1); + return; + } + if (index1 == 419 || index1 == 420 || index1 == 423 || index1 == 424 || index1 == 429 || index1 == 445) + { + WorldGen.CheckLogicTiles(i, j, index1); + return; + } + if (index1 == 16 || index1 == 18 || index1 == 29 || index1 == 103 || index1 == 134 || index1 == 462) + { + WorldGen.Check2x1(i, j, (ushort) index1); + return; + } + if (index1 == 13 || index1 == 33 || index1 == 50 || index1 == 78 || index1 == 174 || index1 == 372 || index1 == 49) + { + WorldGen.CheckOnTable1x1(i, j, index1); + return; + } + if (TileID.Sets.BasicChest[index1]) + { + WorldGen.CheckChest(i, j, index1); + return; + } + switch (index1) + { + case 27: + WorldGen.CheckSunflower(i, j); + return; + case 28: + WorldGen.CheckPot(i, j); + return; + case 128: + WorldGen.CheckMan(i, j); + return; + case 171: + WorldGen.CheckXmasTree(i, j); + return; + case 254: + WorldGen.Check2x2Style(i, j, index1); + return; + case 269: + WorldGen.CheckWoman(i, j); + return; + case 470: + TEDisplayDoll.Framing_CheckTile(i, j); + return; + case 475: + TEHatRack.Framing_CheckTile(i, j); + return; + case 597: + TETeleportationPylon.Framing_CheckTile(i, j); + return; + default: + if (!TileID.Sets.BasicChestFake[index1] && index1 != 457) + { + if (index1 == 335 || index1 == 411 || index1 == 490 || index1 == 564 || index1 == 565 || index1 == 594) + { + WorldGen.Check2x2(i, j, index1); + return; + } + if (index1 == 132 || index1 == 138 || index1 == 484 || index1 == 142 || index1 == 143 || index1 >= 288 && index1 <= 295 || index1 >= 316 && index1 <= 318 || index1 == 172 || index1 == 360 || index1 == 505 || index1 == 521 || index1 == 522 || index1 == 523 || index1 == 524 || index1 == 525 || index1 == 526 || index1 == 527 || index1 == 543 || index1 == 568 || index1 == 569 || index1 == 570 || index1 == 580 || index1 == 598 || index1 == 620) + { + WorldGen.Check2x2(i, j, index1); + return; + } + if (index1 == 376 || index1 == 443 || index1 == 444 || index1 == 485) + { + WorldGen.CheckSuper(i, j, index1); + return; + } + if (index1 == 91) + { + WorldGen.CheckBanner(i, j, (byte) index1); + return; + } + if (index1 == 139 || index1 == 35) + { + WorldGen.CheckMB(i, j, (int) (byte) index1); + return; + } + if (index1 == 386 || index1 == 387) + { + WorldGen.CheckTrapDoor(i, j, index1); + return; + } + if (index1 == 389 || index1 == 388) + { + WorldGen.CheckTallGate(i, j, index1); + return; + } + if (index1 == 92 || index1 == 93 || index1 == 453) + { + WorldGen.Check1xX(i, j, (short) index1); + return; + } + if (index1 == 104 || index1 == 105 || index1 == 207 || index1 == 320 || index1 == 337 || index1 == 349 || index1 == 356 || index1 == 378 || index1 == 410 || index1 == 456 || index1 == 465 || index1 == 480 || index1 == 489 || index1 == 506 || index1 == 509 || index1 == 531 || index1 == 545 || index1 == 560 || index1 == 591 || index1 == 592) + { + WorldGen.Check2xX(i, j, (ushort) index1); + return; + } + if (index1 == 101 || index1 == 102 || index1 == 463 || index1 == 617) + { + WorldGen.Check3x4(i, j, index1); + return; + } + if (index1 == 42 || index1 == 270 || index1 == 271 || index1 == 572 || index1 == 581) + { + WorldGen.Check1x2Top(i, j, (ushort) index1); + return; + } + if (index1 == 55 || index1 == 85 || index1 == 395 || index1 == 425 || index1 == 510 || index1 == 511 || index1 == 573) + { + WorldGen.CheckSign(i, j, (ushort) index1); + return; + } + if (index1 == 520) + { + WorldGen.CheckFoodPlatter(i, j, (int) (ushort) index1); + return; + } + if (index1 == 209) + { + WorldGen.CheckCannon(i, j, index1); + return; + } + if (index1 == 79 || index1 == 90 || index1 == 487) + { + WorldGen.Check4x2(i, j, index1); + return; + } + if (index1 == 94 || index1 == 95 || index1 == 97 || index1 == 319 || index1 == 98 || index1 == 99 || index1 == 100 || index1 == 125 || index1 == 126 || index1 == 173 || index1 == 282 || index1 == 287 || index1 == 621 || index1 == 622) + { + WorldGen.Check2x2(i, j, index1); + return; + } + switch (index1) + { + case 81: + Tile tile31 = Main.tile[i, j - 1]; + Tile tile32 = Main.tile[i, j + 1]; + Tile tile33 = Main.tile[i - 1, j]; + Tile tile34 = Main.tile[i + 1, j]; + int index15 = -1; + int num4 = -1; + if (tile31 != null && tile31.active()) + num4 = (int) tile31.type; + if (tile32 != null && tile32.active()) + index15 = (int) tile32.type; + if (num4 != -1) + { + WorldGen.KillTile(i, j); + return; + } + if (index15 >= 0 && Main.tileSolid[index15] && !tile32.halfBrick() && !tile32.topSlope()) + return; + WorldGen.KillTile(i, j); + return; + case 96: + WorldGen.Check2x2Style(i, j, index1); + return; + default: + if (Main.tileAlch[index1]) + { + WorldGen.CheckAlch(i, j); + return; + } + switch (index1) + { + case 5: + WorldGen.CheckTree(i, j); + return; + case 72: + Tile tile35 = Main.tile[i, j - 1]; + Tile tile36 = Main.tile[i, j + 1]; + int num5 = -1; + int num6 = -1; + if (tile35 != null && tile35.active()) + num6 = (int) tile35.type; + if (tile36 != null && tile36.active()) + num5 = (int) tile36.type; + if (num5 != index1 && num5 != 70) + { + WorldGen.KillTile(i, j); + return; + } + if (num6 == index1 || tile1.frameX != (short) 0) + return; + tile1.frameNumber((byte) WorldGen.genRand.Next(3)); + if (tile1.frameNumber() == (byte) 0) + { + tile1.frameX = (short) 18; + tile1.frameY = (short) 0; + } + if (tile1.frameNumber() == (byte) 1) + { + tile1.frameX = (short) 18; + tile1.frameY = (short) 18; + } + if (tile1.frameNumber() != (byte) 2) + return; + tile1.frameX = (short) 18; + tile1.frameY = (short) 36; + return; + case 323: + WorldGen.CheckPalmTree(i, j); + return; + case 567: + WorldGen.CheckGnome(i, j); + return; + case 583: + case 584: + case 585: + case 586: + case 587: + case 588: + case 589: + WorldGen.CheckTreeWithSettings(i, j, new WorldGen.CheckTreeSettings() + { + IsGroundValid = new WorldGen.CheckTreeSettings.GroundValidTest(WorldGen.GemTreeGroundTest) + }); + return; + case 596: + WorldGen.CheckTreeWithSettings(i, j, new WorldGen.CheckTreeSettings() + { + IsGroundValid = new WorldGen.CheckTreeSettings.GroundValidTest(WorldGen.VanityTreeGroundTest) + }); + return; + case 616: + WorldGen.CheckTreeWithSettings(i, j, new WorldGen.CheckTreeSettings() + { + IsGroundValid = new WorldGen.CheckTreeSettings.GroundValidTest(WorldGen.VanityTreeGroundTest) + }); + return; + default: + return; + } + } + } + else + goto case 254; + } + } + } + } + } + } + } + else + { + if (index1 >= (int) byte.MaxValue && index1 <= 268 || index1 == 385 || index1 >= 446 && index1 <= 448) + { + Framing.SelfFrame8Way(i, j, tile1, resetFrame); + return; + } + Tile tileTopCache = Main.tile[i, j - 1]; + Tile tile37 = Main.tile[i, j + 1]; + Tile tile38 = Main.tile[i - 1, j]; + Tile tile39 = Main.tile[i + 1, j]; + Tile tile40 = Main.tile[i - 1, j + 1]; + Tile tile41 = Main.tile[i + 1, j + 1]; + Tile tile42 = Main.tile[i - 1, j - 1]; + Tile tile43 = Main.tile[i + 1, j - 1]; + int upLeft = -1; + int up = -1; + int upRight = -1; + int left = -1; + int right = -1; + int downLeft = -1; + int down = -1; + int downRight = -1; + if (tile38 != null && tile38.active()) + { + left = !Main.tileStone[(int) tile38.type] ? (int) tile38.type : 1; + if (tile38.slope() == (byte) 1 || tile38.slope() == (byte) 3) + left = -1; + } + if (tile39 != null && tile39.active()) + { + right = !Main.tileStone[(int) tile39.type] ? (int) tile39.type : 1; + if (tile39.slope() == (byte) 2 || tile39.slope() == (byte) 4) + right = -1; + } + if (tileTopCache != null && tileTopCache.active()) + { + up = !Main.tileStone[(int) tileTopCache.type] ? (int) tileTopCache.type : 1; + if (tileTopCache.slope() == (byte) 3 || tileTopCache.slope() == (byte) 4) + up = -1; + } + if (tile37 != null && tile37.active()) + { + down = !Main.tileStone[(int) tile37.type] ? (int) tile37.type : 1; + if (tile37.slope() == (byte) 1 || tile37.slope() == (byte) 2) + down = -1; + } + if (tile42 != null && tile42.active()) + upLeft = !Main.tileStone[(int) tile42.type] ? (int) tile42.type : 1; + if (tile43 != null && tile43.active()) + upRight = !Main.tileStone[(int) tile43.type] ? (int) tile43.type : 1; + if (tile40 != null && tile40.active()) + downLeft = !Main.tileStone[(int) tile40.type] ? (int) tile40.type : 1; + if (tile41 != null && tile41.active()) + downRight = !Main.tileStone[(int) tile41.type] ? (int) tile41.type : 1; + if (tile1.slope() == (byte) 2) + { + up = -1; + left = -1; + } + if (tile1.slope() == (byte) 1) + { + up = -1; + right = -1; + } + if (tile1.slope() == (byte) 4) + { + down = -1; + left = -1; + } + if (tile1.slope() == (byte) 3) + { + down = -1; + right = -1; + } + switch (index1) + { + case 147: + WorldGen.TileMergeAttempt(index1, Main.tileBrick, TileID.Sets.Ices, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + case 161: + case 163: + case 164: + case 200: + WorldGen.TileMergeAttempt(index1, Main.tileBrick, TileID.Sets.Snow, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + case 162: + WorldGen.TileMergeAttempt(index1, Main.tileBrick, TileID.Sets.IcesSnow, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + default: + if (Main.tileBrick[index1]) + { + if (index1 == 60 || index1 == 70) + { + WorldGen.TileMergeAttempt(index1, Main.tileBrick, TileID.Sets.Mud, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + WorldGen.TileMergeAttempt(index1, Main.tileBrick, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + if (Main.tilePile[index1]) + { + WorldGen.TileMergeAttempt(index1, Main.tilePile, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + break; + } + if ((index1 == 1 || Main.tileMoss[index1] || index1 == 117 || index1 == 25 || index1 == 203) && down == 165) + { + if (tile37.frameY == (short) 72) + down = index1; + else if (tile37.frameY == (short) 0) + down = index1; + } + if ((index1 == 1 || Main.tileMoss[index1] || index1 == 117 || index1 == 25 || index1 == 203) && up == 165) + { + if (tileTopCache.frameY == (short) 90) + up = index1; + else if (tileTopCache.frameY == (short) 54) + up = index1; + } + if (index1 == 225) + { + if (down == 165) + down = index1; + if (up == 165) + up = index1; + } + if ((index1 == 200 || index1 == 161 || index1 == 147 || index1 == 163 || index1 == 164) && down == 165) + down = index1; + if ((tile1.slope() == (byte) 1 || tile1.slope() == (byte) 2) && down > -1 && !TileID.Sets.Platforms[down]) + down = index1; + if (up > -1 && (tileTopCache.slope() == (byte) 1 || tileTopCache.slope() == (byte) 2) && !TileID.Sets.Platforms[up]) + up = index1; + if ((tile1.slope() == (byte) 3 || tile1.slope() == (byte) 4) && up > -1 && !TileID.Sets.Platforms[up]) + up = index1; + if (down > -1 && (tile37.slope() == (byte) 3 || tile37.slope() == (byte) 4) && !TileID.Sets.Platforms[down]) + down = index1; + if (index1 == 124) + { + if (up > -1 && Main.tileSolid[up] && !TileID.Sets.Platforms[up]) + up = index1; + if (down > -1 && Main.tileSolid[down] && !TileID.Sets.Platforms[down]) + down = index1; + } + if (up > -1 && tileTopCache.halfBrick() && !TileID.Sets.Platforms[up]) + up = index1; + if (left > -1 && tile38.halfBrick()) + { + if (tile1.halfBrick()) + left = index1; + else if ((int) tile38.type != index1) + left = -1; + } + if (right > -1 && tile39.halfBrick()) + { + if (tile1.halfBrick()) + right = index1; + else if ((int) tile39.type != index1) + right = -1; + } + if (tile1.halfBrick()) + { + if (left != index1) + left = -1; + if (right != index1) + right = -1; + up = -1; + } + if (tile37 != null && tile37.halfBrick()) + down = -1; + if (!Main.tileSolid[index1]) + { + if (index1 == 49) + { + WorldGen.CheckOnTable1x1(i, j, (int) (byte) index1); + return; + } + if (index1 == 80) + { + WorldGen.CactusFrame(i, j); + return; + } + } + WorldGen.mergeUp = false; + WorldGen.mergeDown = false; + WorldGen.mergeLeft = false; + WorldGen.mergeRight = false; + int num7; + if (resetFrame) + { + num7 = WorldGen.genRand.Next(0, 3); + tile1.frameNumber((byte) num7); + } + else + num7 = (int) tile1.frameNumber(); + if (Main.tileLargeFrames[index1] == (byte) 1) + num7 = new int[4, 3] + { + { + 2, + 4, + 2 + }, + { + 1, + 3, + 1 + }, + { + 2, + 2, + 4 + }, + { + 1, + 1, + 3 + } + }[j % 4, i % 3] - 1; + if (Main.tileLargeFrames[index1] == (byte) 2) + num7 = i % 2 + j % 2 * 2; + WorldGen.TileMergeAttempt(index1, Main.tileBlendAll, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + if (Main.tileBlendAll[index1]) + { + Main.tileSolid[10] = false; + Main.tileSolid[387] = false; + WorldGen.TileMergeAttempt(index1, Main.tileSolid, Main.tileSolidTop, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + Main.tileSolid[10] = true; + Main.tileSolid[387] = true; + } + if (TileID.Sets.ForcedDirtMerging[index1]) + { + if (up == 0) + up = index1; + if (down == 0) + down = index1; + if (left == 0) + left = index1; + if (right == 0) + right = index1; + if (upLeft == 0) + upLeft = index1; + if (upRight == 0) + upRight = index1; + if (downLeft == 0) + downLeft = index1; + if (downRight == 0) + downRight = index1; + } + switch (index1) + { + case 0: + if (up > -1 && Main.tileMergeDirt[up]) + { + WorldGen.TileFrame(i, j - 1); + if (WorldGen.mergeDown) + up = index1; + } + else if (up == 147) + { + WorldGen.TileFrame(i, j - 1); + if (WorldGen.mergeDown) + up = index1; + } + if (down > -1 && Main.tileMergeDirt[down]) + { + WorldGen.TileFrame(i, j + 1); + if (WorldGen.mergeUp) + down = index1; + } + else if (down == 147) + { + WorldGen.TileFrame(i, j + 1); + if (WorldGen.mergeUp) + down = index1; + } + if (left > -1 && Main.tileMergeDirt[left]) + { + WorldGen.TileFrame(i - 1, j); + if (WorldGen.mergeRight) + left = index1; + } + else if (left == 147) + { + WorldGen.TileFrame(i - 1, j); + if (WorldGen.mergeRight) + left = index1; + } + if (right > -1 && Main.tileMergeDirt[right]) + { + WorldGen.TileFrame(i + 1, j); + if (WorldGen.mergeLeft) + right = index1; + } + else if (right == 147) + { + WorldGen.TileFrame(i + 1, j); + if (WorldGen.mergeLeft) + right = index1; + } + bool[] dirtInAspecialWay = TileID.Sets.Conversion.MergesWithDirtInASpecialWay; + if (up > -1 && dirtInAspecialWay[up]) + up = index1; + if (down > -1 && dirtInAspecialWay[down]) + down = index1; + if (left > -1 && dirtInAspecialWay[left]) + left = index1; + if (right > -1 && dirtInAspecialWay[right]) + right = index1; + if (upLeft > -1 && Main.tileMergeDirt[upLeft]) + upLeft = index1; + else if (upLeft > -1 && dirtInAspecialWay[upLeft]) + upLeft = index1; + if (upRight > -1 && Main.tileMergeDirt[upRight]) + upRight = index1; + else if (upRight > -1 && dirtInAspecialWay[upRight]) + upRight = index1; + if (downLeft > -1 && Main.tileMergeDirt[downLeft]) + downLeft = index1; + else if (downLeft > -1 && dirtInAspecialWay[downLeft]) + downLeft = index1; + if (downRight > -1 && Main.tileMergeDirt[downRight]) + downRight = index1; + else if (downRight > -1 && dirtInAspecialWay[downRight]) + downRight = index1; + WorldGen.TileMergeAttempt(-2, 59, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttempt(index1, 191, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + if (up > -1 && TileID.Sets.ForcedDirtMerging[up]) + up = index1; + if (down > -1 && TileID.Sets.ForcedDirtMerging[down]) + down = index1; + if (left > -1 && TileID.Sets.ForcedDirtMerging[left]) + left = index1; + if (right > -1 && TileID.Sets.ForcedDirtMerging[right]) + right = index1; + if (upLeft > -1 && TileID.Sets.ForcedDirtMerging[upLeft]) + upLeft = index1; + if (upRight > -1 && TileID.Sets.ForcedDirtMerging[upRight]) + upRight = index1; + if (downLeft > -1 && TileID.Sets.ForcedDirtMerging[downLeft]) + downLeft = index1; + if (downRight > -1 && TileID.Sets.ForcedDirtMerging[downRight]) + { + downRight = index1; + break; + } + break; + case 53: + WorldGen.TileMergeAttemptFrametest(i, j, index1, 397, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttemptFrametest(i, j, index1, 396, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + case 112: + WorldGen.TileMergeAttemptFrametest(i, j, index1, 398, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttemptFrametest(i, j, index1, 400, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + case 116: + WorldGen.TileMergeAttemptFrametest(i, j, index1, 402, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttemptFrametest(i, j, index1, 403, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + case 213: + if (up > -1 && Main.tileSolid[up] && !Main.tileSolidTop[up]) + up = index1; + if (down > -1 && Main.tileSolid[down]) + down = index1; + if (up != index1) + { + if (left > -1 && Main.tileSolid[left]) + left = index1; + if (right > -1 && Main.tileSolid[right]) + { + right = index1; + break; + } + break; + } + break; + case 234: + WorldGen.TileMergeAttemptFrametest(i, j, index1, 399, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttemptFrametest(i, j, index1, 401, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + if (Main.tileMergeDirt[index1]) + { + WorldGen.TileMergeAttempt(-2, 0, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + if (index1 == 1) + { + if ((double) j > Main.rockLayer) + WorldGen.TileMergeAttemptFrametest(i, j, index1, 59, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttemptFrametest(i, j, index1, 57, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + } + } + else if (index1 == 58 || index1 == 76 || index1 == 75) + { + WorldGen.TileMergeAttempt(-2, 57, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + } + else + { + switch (index1) + { + case 57: + WorldGen.TileMergeAttempt(-2, 1, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttemptFrametest(i, j, index1, TileID.Sets.HellSpecial, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + case 59: + if ((double) j > Main.rockLayer) + WorldGen.TileMergeAttempt(-2, 1, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttempt(index1, TileID.Sets.GrassSpecial, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttemptFrametest(i, j, index1, TileID.Sets.JungleSpecial, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + if ((double) j < Main.rockLayer) + { + WorldGen.TileMergeAttemptFrametest(i, j, index1, 0, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + WorldGen.TileMergeAttempt(index1, 0, ref up, ref down, ref left, ref right); + break; + case 211: + WorldGen.TileMergeAttempt(59, 60, ref up, ref down, ref left, ref right); + WorldGen.TileMergeAttempt(-2, 59, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + default: + if (index1 == 225 || index1 == 226) + { + WorldGen.TileMergeAttempt(-2, 59, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + switch (index1) + { + case 60: + WorldGen.TileMergeAttempt(59, 211, ref up, ref down, ref left, ref right); + break; + case 147: + WorldGen.TileMergeAttemptFrametest(i, j, index1, TileID.Sets.IcesSlush, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + case 189: + WorldGen.TileMergeAttemptFrametest(i, j, index1, TileID.Sets.MergesWithClouds, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + case 196: + WorldGen.TileMergeAttempt(-2, 189, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttempt(index1, 460, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + case 460: + WorldGen.TileMergeAttempt(-2, 189, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttempt(index1, 196, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + default: + if (index1 == 161 || index1 == 163 || index1 == 164 || index1 == 200 || index1 == 224) + { + WorldGen.TileMergeAttempt(-2, 147, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + if (index1 == 162) + { + WorldGen.TileMergeAttempt(-2, TileID.Sets.IcesSnow, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + if (index1 == 32) + { + if (down == 23) + { + down = index1; + break; + } + break; + } + if (index1 == 352) + { + if (down == 199) + { + down = index1; + break; + } + break; + } + if (index1 == 69) + { + if (down == 60) + { + down = index1; + break; + } + break; + } + if (index1 == 51) + { + WorldGen.TileMergeAttempt(index1, TileID.Sets.AllTiles, Main.tileNoAttach, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + if (index1 == 192) + { + WorldGen.TileMergeAttemptFrametest(i, j, index1, 191, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + if (index1 == 191) + { + WorldGen.TileMergeAttempt(-2, 192, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttempt(index1, 0, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + if (index1 == 384) + { + WorldGen.TileMergeAttemptFrametest(i, j, index1, 383, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + if (index1 == 383) + { + WorldGen.TileMergeAttempt(-2, 384, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttempt(index1, 59, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + if (index1 == 407) + { + WorldGen.TileMergeAttempt(-2, 404, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + if (index1 == 404) + { + WorldGen.TileMergeAttempt(-2, 396, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttemptFrametest(i, j, index1, 407, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + if (index1 == 397) + { + WorldGen.TileMergeAttempt(-2, 53, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttemptFrametest(i, j, index1, 396, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + if (index1 == 396) + { + WorldGen.TileMergeAttempt(-2, 397, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttempt(-2, 53, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttemptFrametest(i, j, index1, 404, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + if (index1 == 398) + { + WorldGen.TileMergeAttempt(-2, 112, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttemptFrametest(i, j, index1, 400, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + if (index1 == 400) + { + WorldGen.TileMergeAttempt(-2, 398, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttempt(-2, 112, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + if (index1 == 399) + { + WorldGen.TileMergeAttempt(-2, 234, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttemptFrametest(i, j, index1, 401, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + if (index1 == 401) + { + WorldGen.TileMergeAttempt(-2, 399, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttempt(-2, 234, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + if (index1 == 402) + { + WorldGen.TileMergeAttempt(-2, 116, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttemptFrametest(i, j, index1, 403, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + if (index1 == 403) + { + WorldGen.TileMergeAttempt(-2, 402, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttempt(-2, 116, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + break; + } + break; + } + } + if (index1 == 0) + { + WorldGen.TileMergeAttempt(index1, Main.tileMoss, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + WorldGen.TileMergeAttempt(index1, TileID.Sets.tileMossBrick, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + } + else if (Main.tileMoss[index1] || TileID.Sets.tileMossBrick[index1]) + { + WorldGen.TileMergeAttempt(index1, 0, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + } + else + { + if (!Main.tileStone[index1]) + { + switch (index1) + { + case 1: + break; + case 38: + WorldGen.TileMergeAttempt(index1, TileID.Sets.tileMossBrick, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + goto label_576; + default: + goto label_576; + } + } + WorldGen.TileMergeAttempt(index1, Main.tileMoss, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + } +label_576: + if (TileID.Sets.Conversion.Grass[index1]) + WorldGen.TileMergeAttempt(index1, TileID.Sets.Ore, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + else if (TileID.Sets.Ore[index1]) + WorldGen.TileMergeAttempt(index1, TileID.Sets.Conversion.Grass, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + if (index1 == 59) + WorldGen.TileMergeAttempt(index1, TileID.Sets.OreMergesWithMud, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + else if (TileID.Sets.OreMergesWithMud[index1]) + WorldGen.TileMergeAttempt(index1, 59, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + bool flag1 = false; + if (index1 == 2 || index1 == 23 || index1 == 60 || index1 == 477 || index1 == 492 || index1 == 70 || index1 == 109 || index1 == 199 || Main.tileMoss[index1] || TileID.Sets.NeedsGrassFraming[index1] || TileID.Sets.tileMossBrick[index1]) + { + flag1 = true; + WorldGen.TileMergeAttemptWeird(index1, -1, Main.tileSolid, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + int num8 = TileID.Sets.NeedsGrassFramingDirt[index1]; + if (index1 == 60 || index1 == 70) + num8 = 59; + else if (Main.tileMoss[index1]) + num8 = 1; + else if (TileID.Sets.tileMossBrick[index1]) + { + num8 = 38; + } + else + { + switch (index1) + { + case 2: + case 477: + WorldGen.TileMergeAttempt(num8, 23, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + case 23: + WorldGen.TileMergeAttempt(num8, 2, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + break; + } + } + if (up != index1 && up != num8 && (down == index1 || down == num8)) + { + if (left == num8 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 0; + rectangle.Y = 198; + break; + case 1: + rectangle.X = 18; + rectangle.Y = 198; + break; + default: + rectangle.X = 36; + rectangle.Y = 198; + break; + } + } + else if (left == index1 && right == num8) + { + switch (num7) + { + case 0: + rectangle.X = 54; + rectangle.Y = 198; + break; + case 1: + rectangle.X = 72; + rectangle.Y = 198; + break; + default: + rectangle.X = 90; + rectangle.Y = 198; + break; + } + } + } + else if (down != index1 && down != num8 && (up == index1 || up == num8)) + { + if (left == num8 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 0; + rectangle.Y = 216; + break; + case 1: + rectangle.X = 18; + rectangle.Y = 216; + break; + default: + rectangle.X = 36; + rectangle.Y = 216; + break; + } + } + else if (left == index1 && right == num8) + { + switch (num7) + { + case 0: + rectangle.X = 54; + rectangle.Y = 216; + break; + case 1: + rectangle.X = 72; + rectangle.Y = 216; + break; + default: + rectangle.X = 90; + rectangle.Y = 216; + break; + } + } + } + else if (left != index1 && left != num8 && (right == index1 || right == num8)) + { + if (up == num8 && down == index1) + { + switch (num7) + { + case 0: + rectangle.X = 72; + rectangle.Y = 144; + break; + case 1: + rectangle.X = 72; + rectangle.Y = 162; + break; + default: + rectangle.X = 72; + rectangle.Y = 180; + break; + } + } + else if (down == index1 && up == num8) + { + switch (num7) + { + case 0: + rectangle.X = 72; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 72; + rectangle.Y = 108; + break; + default: + rectangle.X = 72; + rectangle.Y = 126; + break; + } + } + } + else if (right != index1 && right != num8 && (left == index1 || left == num8)) + { + if (up == num8 && down == index1) + { + switch (num7) + { + case 0: + rectangle.X = 90; + rectangle.Y = 144; + break; + case 1: + rectangle.X = 90; + rectangle.Y = 162; + break; + default: + rectangle.X = 90; + rectangle.Y = 180; + break; + } + } + else if (down == index1 && right == up) + { + switch (num7) + { + case 0: + rectangle.X = 90; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 90; + rectangle.Y = 108; + break; + default: + rectangle.X = 90; + rectangle.Y = 126; + break; + } + } + } + else if (up == index1 && down == index1 && left == index1 && right == index1) + { + if (upLeft != index1 && upRight != index1 && downLeft != index1 && downRight != index1) + { + if (downRight == num8) + { + switch (num7) + { + case 0: + rectangle.X = 108; + rectangle.Y = 324; + break; + case 1: + rectangle.X = 126; + rectangle.Y = 324; + break; + default: + rectangle.X = 144; + rectangle.Y = 324; + break; + } + } + else if (upRight == num8) + { + switch (num7) + { + case 0: + rectangle.X = 108; + rectangle.Y = 342; + break; + case 1: + rectangle.X = 126; + rectangle.Y = 342; + break; + default: + rectangle.X = 144; + rectangle.Y = 342; + break; + } + } + else if (downLeft == num8) + { + switch (num7) + { + case 0: + rectangle.X = 108; + rectangle.Y = 360; + break; + case 1: + rectangle.X = 126; + rectangle.Y = 360; + break; + default: + rectangle.X = 144; + rectangle.Y = 360; + break; + } + } + else if (upLeft == num8) + { + switch (num7) + { + case 0: + rectangle.X = 108; + rectangle.Y = 378; + break; + case 1: + rectangle.X = 126; + rectangle.Y = 378; + break; + default: + rectangle.X = 144; + rectangle.Y = 378; + break; + } + } + else + { + switch (num7) + { + case 0: + rectangle.X = 144; + rectangle.Y = 234; + break; + case 1: + rectangle.X = 198; + rectangle.Y = 234; + break; + default: + rectangle.X = 252; + rectangle.Y = 234; + break; + } + } + } + else if (upLeft != index1 && downRight != index1) + { + switch (num7) + { + case 0: + rectangle.X = 36; + rectangle.Y = 306; + break; + case 1: + rectangle.X = 54; + rectangle.Y = 306; + break; + default: + rectangle.X = 72; + rectangle.Y = 306; + break; + } + } + else if (upRight != index1 && downLeft != index1) + { + switch (num7) + { + case 0: + rectangle.X = 90; + rectangle.Y = 306; + break; + case 1: + rectangle.X = 108; + rectangle.Y = 306; + break; + default: + rectangle.X = 126; + rectangle.Y = 306; + break; + } + } + else if (upLeft != index1 && upRight == index1 && downLeft == index1 && downRight == index1) + { + switch (num7) + { + case 0: + rectangle.X = 54; + rectangle.Y = 108; + break; + case 1: + rectangle.X = 54; + rectangle.Y = 144; + break; + default: + rectangle.X = 54; + rectangle.Y = 180; + break; + } + } + else if (upLeft == index1 && upRight != index1 && downLeft == index1 && downRight == index1) + { + switch (num7) + { + case 0: + rectangle.X = 36; + rectangle.Y = 108; + break; + case 1: + rectangle.X = 36; + rectangle.Y = 144; + break; + default: + rectangle.X = 36; + rectangle.Y = 180; + break; + } + } + else if (upLeft == index1 && upRight == index1 && downLeft != index1 && downRight == index1) + { + switch (num7) + { + case 0: + rectangle.X = 54; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 54; + rectangle.Y = 126; + break; + default: + rectangle.X = 54; + rectangle.Y = 162; + break; + } + } + else if (upLeft == index1 && upRight == index1 && downLeft == index1 && downRight != index1) + { + switch (num7) + { + case 0: + rectangle.X = 36; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 36; + rectangle.Y = 126; + break; + default: + rectangle.X = 36; + rectangle.Y = 162; + break; + } + } + } + else if (up == index1 && down == num8 && left == index1 && right == index1 && upLeft == -1 && upRight == -1) + { + switch (num7) + { + case 0: + rectangle.X = 108; + rectangle.Y = 18; + break; + case 1: + rectangle.X = 126; + rectangle.Y = 18; + break; + default: + rectangle.X = 144; + rectangle.Y = 18; + break; + } + } + else if (up == num8 && down == index1 && left == index1 && right == index1 && downLeft == -1 && downRight == -1) + { + switch (num7) + { + case 0: + rectangle.X = 108; + rectangle.Y = 36; + break; + case 1: + rectangle.X = 126; + rectangle.Y = 36; + break; + default: + rectangle.X = 144; + rectangle.Y = 36; + break; + } + } + else if (up == index1 && down == index1 && left == num8 && right == index1 && upRight == -1 && downRight == -1) + { + switch (num7) + { + case 0: + rectangle.X = 198; + rectangle.Y = 0; + break; + case 1: + rectangle.X = 198; + rectangle.Y = 18; + break; + default: + rectangle.X = 198; + rectangle.Y = 36; + break; + } + } + else if (up == index1 && down == index1 && left == index1 && right == num8 && upLeft == -1 && downLeft == -1) + { + switch (num7) + { + case 0: + rectangle.X = 180; + rectangle.Y = 0; + break; + case 1: + rectangle.X = 180; + rectangle.Y = 18; + break; + default: + rectangle.X = 180; + rectangle.Y = 36; + break; + } + } + else if (up == index1 && down == num8 && left == index1 && right == index1) + { + if (upRight != -1) + { + switch (num7) + { + case 0: + rectangle.X = 54; + rectangle.Y = 108; + break; + case 1: + rectangle.X = 54; + rectangle.Y = 144; + break; + default: + rectangle.X = 54; + rectangle.Y = 180; + break; + } + } + else if (upLeft != -1) + { + switch (num7) + { + case 0: + rectangle.X = 36; + rectangle.Y = 108; + break; + case 1: + rectangle.X = 36; + rectangle.Y = 144; + break; + default: + rectangle.X = 36; + rectangle.Y = 180; + break; + } + } + } + else if (up == num8 && down == index1 && left == index1 && right == index1) + { + if (downRight != -1) + { + switch (num7) + { + case 0: + rectangle.X = 54; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 54; + rectangle.Y = 126; + break; + default: + rectangle.X = 54; + rectangle.Y = 162; + break; + } + } + else if (downLeft != -1) + { + switch (num7) + { + case 0: + rectangle.X = 36; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 36; + rectangle.Y = 126; + break; + default: + rectangle.X = 36; + rectangle.Y = 162; + break; + } + } + } + else if (up == index1 && down == index1 && left == index1 && right == num8) + { + if (upLeft != -1) + { + switch (num7) + { + case 0: + rectangle.X = 54; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 54; + rectangle.Y = 126; + break; + default: + rectangle.X = 54; + rectangle.Y = 162; + break; + } + } + else if (downLeft != -1) + { + switch (num7) + { + case 0: + rectangle.X = 54; + rectangle.Y = 108; + break; + case 1: + rectangle.X = 54; + rectangle.Y = 144; + break; + default: + rectangle.X = 54; + rectangle.Y = 180; + break; + } + } + } + else if (up == index1 && down == index1 && left == num8 && right == index1) + { + if (upRight != -1) + { + switch (num7) + { + case 0: + rectangle.X = 36; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 36; + rectangle.Y = 126; + break; + default: + rectangle.X = 36; + rectangle.Y = 162; + break; + } + } + else if (downRight != -1) + { + switch (num7) + { + case 0: + rectangle.X = 36; + rectangle.Y = 108; + break; + case 1: + rectangle.X = 36; + rectangle.Y = 144; + break; + default: + rectangle.X = 36; + rectangle.Y = 180; + break; + } + } + } + else if (up == num8 && down == index1 && left == index1 && right == index1 || up == index1 && down == num8 && left == index1 && right == index1 || up == index1 && down == index1 && left == num8 && right == index1 || up == index1 && down == index1 && left == index1 && right == num8) + { + switch (num7) + { + case 0: + rectangle.X = 18; + rectangle.Y = 18; + break; + case 1: + rectangle.X = 36; + rectangle.Y = 18; + break; + default: + rectangle.X = 54; + rectangle.Y = 18; + break; + } + } + if ((up == index1 || up == num8) && (down == index1 || down == num8) && (left == index1 || left == num8) && (right == index1 || right == num8)) + { + if (upLeft != index1 && upLeft != num8 && (upRight == index1 || upRight == num8) && (downLeft == index1 || downLeft == num8) && (downRight == index1 || downRight == num8)) + { + switch (num7) + { + case 0: + rectangle.X = 54; + rectangle.Y = 108; + break; + case 1: + rectangle.X = 54; + rectangle.Y = 144; + break; + default: + rectangle.X = 54; + rectangle.Y = 180; + break; + } + } + else if (upRight != index1 && upRight != num8 && (upLeft == index1 || upLeft == num8) && (downLeft == index1 || downLeft == num8) && (downRight == index1 || downRight == num8)) + { + switch (num7) + { + case 0: + rectangle.X = 36; + rectangle.Y = 108; + break; + case 1: + rectangle.X = 36; + rectangle.Y = 144; + break; + default: + rectangle.X = 36; + rectangle.Y = 180; + break; + } + } + else if (downLeft != index1 && downLeft != num8 && (upLeft == index1 || upLeft == num8) && (upRight == index1 || upRight == num8) && (downRight == index1 || downRight == num8)) + { + switch (num7) + { + case 0: + rectangle.X = 54; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 54; + rectangle.Y = 126; + break; + default: + rectangle.X = 54; + rectangle.Y = 162; + break; + } + } + else if (downRight != index1 && downRight != num8 && (upLeft == index1 || upLeft == num8) && (downLeft == index1 || downLeft == num8) && (upRight == index1 || upRight == num8)) + { + switch (num7) + { + case 0: + rectangle.X = 36; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 36; + rectangle.Y = 126; + break; + default: + rectangle.X = 36; + rectangle.Y = 162; + break; + } + } + } + if (up != num8 && up != index1 && down == index1 && left != num8 && left != index1 && right == index1 && downRight != num8 && downRight != index1) + { + switch (num7) + { + case 0: + rectangle.X = 90; + rectangle.Y = 270; + break; + case 1: + rectangle.X = 108; + rectangle.Y = 270; + break; + default: + rectangle.X = 126; + rectangle.Y = 270; + break; + } + } + else if (up != num8 && up != index1 && down == index1 && left == index1 && right != num8 && right != index1 && downLeft != num8 && downLeft != index1) + { + switch (num7) + { + case 0: + rectangle.X = 144; + rectangle.Y = 270; + break; + case 1: + rectangle.X = 162; + rectangle.Y = 270; + break; + default: + rectangle.X = 180; + rectangle.Y = 270; + break; + } + } + else if (down != num8 && down != index1 && up == index1 && left != num8 && left != index1 && right == index1 && upRight != num8 && upRight != index1) + { + switch (num7) + { + case 0: + rectangle.X = 90; + rectangle.Y = 288; + break; + case 1: + rectangle.X = 108; + rectangle.Y = 288; + break; + default: + rectangle.X = 126; + rectangle.Y = 288; + break; + } + } + else if (down != num8 && down != index1 && up == index1 && left == index1 && right != num8 && right != index1 && upLeft != num8 && upLeft != index1) + { + switch (num7) + { + case 0: + rectangle.X = 144; + rectangle.Y = 288; + break; + case 1: + rectangle.X = 162; + rectangle.Y = 288; + break; + default: + rectangle.X = 180; + rectangle.Y = 288; + break; + } + } + else if (up != index1 && up != num8 && down == index1 && left == index1 && right == index1 && downLeft != index1 && downLeft != num8 && downRight != index1 && downRight != num8) + { + switch (num7) + { + case 0: + rectangle.X = 144; + rectangle.Y = 216; + break; + case 1: + rectangle.X = 198; + rectangle.Y = 216; + break; + default: + rectangle.X = 252; + rectangle.Y = 216; + break; + } + } + else if (down != index1 && down != num8 && up == index1 && left == index1 && right == index1 && upLeft != index1 && upLeft != num8 && upRight != index1 && upRight != num8) + { + switch (num7) + { + case 0: + rectangle.X = 144; + rectangle.Y = 252; + break; + case 1: + rectangle.X = 198; + rectangle.Y = 252; + break; + default: + rectangle.X = 252; + rectangle.Y = 252; + break; + } + } + else if (left != index1 && left != num8 && down == index1 && up == index1 && right == index1 && upRight != index1 && upRight != num8 && downRight != index1 && downRight != num8) + { + switch (num7) + { + case 0: + rectangle.X = 126; + rectangle.Y = 234; + break; + case 1: + rectangle.X = 180; + rectangle.Y = 234; + break; + default: + rectangle.X = 234; + rectangle.Y = 234; + break; + } + } + else if (right != index1 && right != num8 && down == index1 && up == index1 && left == index1 && upLeft != index1 && upLeft != num8 && downLeft != index1 && downLeft != num8) + { + switch (num7) + { + case 0: + rectangle.X = 162; + rectangle.Y = 234; + break; + case 1: + rectangle.X = 216; + rectangle.Y = 234; + break; + default: + rectangle.X = 270; + rectangle.Y = 234; + break; + } + } + else if (up != num8 && up != index1 && (down == num8 || down == index1) && left == num8 && right == num8) + { + switch (num7) + { + case 0: + rectangle.X = 36; + rectangle.Y = 270; + break; + case 1: + rectangle.X = 54; + rectangle.Y = 270; + break; + default: + rectangle.X = 72; + rectangle.Y = 270; + break; + } + } + else if (down != num8 && down != index1 && (up == num8 || up == index1) && left == num8 && right == num8) + { + switch (num7) + { + case 0: + rectangle.X = 36; + rectangle.Y = 288; + break; + case 1: + rectangle.X = 54; + rectangle.Y = 288; + break; + default: + rectangle.X = 72; + rectangle.Y = 288; + break; + } + } + else if (left != num8 && left != index1 && (right == num8 || right == index1) && up == num8 && down == num8) + { + switch (num7) + { + case 0: + rectangle.X = 0; + rectangle.Y = 270; + break; + case 1: + rectangle.X = 0; + rectangle.Y = 288; + break; + default: + rectangle.X = 0; + rectangle.Y = 306; + break; + } + } + else if (right != num8 && right != index1 && (left == num8 || left == index1) && up == num8 && down == num8) + { + switch (num7) + { + case 0: + rectangle.X = 18; + rectangle.Y = 270; + break; + case 1: + rectangle.X = 18; + rectangle.Y = 288; + break; + default: + rectangle.X = 18; + rectangle.Y = 306; + break; + } + } + else if (up == index1 && down == num8 && left == num8 && right == num8) + { + switch (num7) + { + case 0: + rectangle.X = 198; + rectangle.Y = 288; + break; + case 1: + rectangle.X = 216; + rectangle.Y = 288; + break; + default: + rectangle.X = 234; + rectangle.Y = 288; + break; + } + } + else if (up == num8 && down == index1 && left == num8 && right == num8) + { + switch (num7) + { + case 0: + rectangle.X = 198; + rectangle.Y = 270; + break; + case 1: + rectangle.X = 216; + rectangle.Y = 270; + break; + default: + rectangle.X = 234; + rectangle.Y = 270; + break; + } + } + else if (up == num8 && down == num8 && left == index1 && right == num8) + { + switch (num7) + { + case 0: + rectangle.X = 198; + rectangle.Y = 306; + break; + case 1: + rectangle.X = 216; + rectangle.Y = 306; + break; + default: + rectangle.X = 234; + rectangle.Y = 306; + break; + } + } + else if (up == num8 && down == num8 && left == num8 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 144; + rectangle.Y = 306; + break; + case 1: + rectangle.X = 162; + rectangle.Y = 306; + break; + default: + rectangle.X = 180; + rectangle.Y = 306; + break; + } + } + if (up != index1 && up != num8 && down == index1 && left == index1 && right == index1) + { + if ((downLeft == num8 || downLeft == index1) && downRight != num8 && downRight != index1) + { + switch (num7) + { + case 0: + rectangle.X = 0; + rectangle.Y = 324; + break; + case 1: + rectangle.X = 18; + rectangle.Y = 324; + break; + default: + rectangle.X = 36; + rectangle.Y = 324; + break; + } + } + else if ((downRight == num8 || downRight == index1) && downLeft != num8 && downLeft != index1) + { + switch (num7) + { + case 0: + rectangle.X = 54; + rectangle.Y = 324; + break; + case 1: + rectangle.X = 72; + rectangle.Y = 324; + break; + default: + rectangle.X = 90; + rectangle.Y = 324; + break; + } + } + } + else if (down != index1 && down != num8 && up == index1 && left == index1 && right == index1) + { + if ((upLeft == num8 || upLeft == index1) && upRight != num8 && upRight != index1) + { + switch (num7) + { + case 0: + rectangle.X = 0; + rectangle.Y = 342; + break; + case 1: + rectangle.X = 18; + rectangle.Y = 342; + break; + default: + rectangle.X = 36; + rectangle.Y = 342; + break; + } + } + else if ((upRight == num8 || upRight == index1) && upLeft != num8 && upLeft != index1) + { + switch (num7) + { + case 0: + rectangle.X = 54; + rectangle.Y = 342; + break; + case 1: + rectangle.X = 72; + rectangle.Y = 342; + break; + default: + rectangle.X = 90; + rectangle.Y = 342; + break; + } + } + } + else if (left != index1 && left != num8 && up == index1 && down == index1 && right == index1) + { + if ((upRight == num8 || upRight == index1) && downRight != num8 && downRight != index1) + { + switch (num7) + { + case 0: + rectangle.X = 54; + rectangle.Y = 360; + break; + case 1: + rectangle.X = 72; + rectangle.Y = 360; + break; + default: + rectangle.X = 90; + rectangle.Y = 360; + break; + } + } + else if ((downRight == num8 || downRight == index1) && upRight != num8 && upRight != index1) + { + switch (num7) + { + case 0: + rectangle.X = 0; + rectangle.Y = 360; + break; + case 1: + rectangle.X = 18; + rectangle.Y = 360; + break; + default: + rectangle.X = 36; + rectangle.Y = 360; + break; + } + } + } + else if (right != index1 && right != num8 && up == index1 && down == index1 && left == index1) + { + if ((upLeft == num8 || upLeft == index1) && downLeft != num8 && downLeft != index1) + { + switch (num7) + { + case 0: + rectangle.X = 0; + rectangle.Y = 378; + break; + case 1: + rectangle.X = 18; + rectangle.Y = 378; + break; + default: + rectangle.X = 36; + rectangle.Y = 378; + break; + } + } + else if ((downLeft == num8 || downLeft == index1) && upLeft != num8 && upLeft != index1) + { + switch (num7) + { + case 0: + rectangle.X = 54; + rectangle.Y = 378; + break; + case 1: + rectangle.X = 72; + rectangle.Y = 378; + break; + default: + rectangle.X = 90; + rectangle.Y = 378; + break; + } + } + } + if ((up == index1 || up == num8) && (down == index1 || down == num8) && (left == index1 || left == num8) && (right == index1 || right == num8) && upLeft != -1 && upRight != -1 && downLeft != -1 && downRight != -1) + { + if ((i + j) % 2 == 1) + { + switch (num7) + { + case 0: + rectangle.X = 108; + rectangle.Y = 198; + break; + case 1: + rectangle.X = 126; + rectangle.Y = 198; + break; + default: + rectangle.X = 144; + rectangle.Y = 198; + break; + } + } + else + { + switch (num7) + { + case 0: + rectangle.X = 18; + rectangle.Y = 18; + break; + case 1: + rectangle.X = 36; + rectangle.Y = 18; + break; + default: + rectangle.X = 54; + rectangle.Y = 18; + break; + } + } + } + WorldGen.TileMergeAttempt(-2, num8, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + } + WorldGen.TileMergeAttempt(index1, Main.tileMerge[index1], ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + if (rectangle.X == -1 && rectangle.Y == -1 && (Main.tileMergeDirt[index1] || index1 > -1 && TileID.Sets.ChecksForMerge[index1])) + { + if (!flag1) + { + flag1 = true; + WorldGen.TileMergeAttemptWeird(index1, -1, Main.tileSolid, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + } + if (up > -1 && up != index1) + up = -1; + if (down > -1 && down != index1) + down = -1; + if (left > -1 && left != index1) + left = -1; + if (right > -1 && right != index1) + right = -1; + if (up != -1 && down != -1 && left != -1 && right != -1) + { + if (up == -2 && down == index1 && left == index1 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 144; + rectangle.Y = 108; + break; + case 1: + rectangle.X = 162; + rectangle.Y = 108; + break; + default: + rectangle.X = 180; + rectangle.Y = 108; + break; + } + WorldGen.mergeUp = true; + } + else if (up == index1 && down == -2 && left == index1 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 144; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 162; + rectangle.Y = 90; + break; + default: + rectangle.X = 180; + rectangle.Y = 90; + break; + } + WorldGen.mergeDown = true; + } + else if (up == index1 && down == index1 && left == -2 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 162; + rectangle.Y = 126; + break; + case 1: + rectangle.X = 162; + rectangle.Y = 144; + break; + default: + rectangle.X = 162; + rectangle.Y = 162; + break; + } + WorldGen.mergeLeft = true; + } + else if (up == index1 && down == index1 && left == index1 && right == -2) + { + switch (num7) + { + case 0: + rectangle.X = 144; + rectangle.Y = 126; + break; + case 1: + rectangle.X = 144; + rectangle.Y = 144; + break; + default: + rectangle.X = 144; + rectangle.Y = 162; + break; + } + WorldGen.mergeRight = true; + } + else if (up == -2 && down == index1 && left == -2 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 36; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 36; + rectangle.Y = 126; + break; + default: + rectangle.X = 36; + rectangle.Y = 162; + break; + } + WorldGen.mergeUp = true; + WorldGen.mergeLeft = true; + } + else if (up == -2 && down == index1 && left == index1 && right == -2) + { + switch (num7) + { + case 0: + rectangle.X = 54; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 54; + rectangle.Y = 126; + break; + default: + rectangle.X = 54; + rectangle.Y = 162; + break; + } + WorldGen.mergeUp = true; + WorldGen.mergeRight = true; + } + else if (up == index1 && down == -2 && left == -2 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 36; + rectangle.Y = 108; + break; + case 1: + rectangle.X = 36; + rectangle.Y = 144; + break; + default: + rectangle.X = 36; + rectangle.Y = 180; + break; + } + WorldGen.mergeDown = true; + WorldGen.mergeLeft = true; + } + else if (up == index1 && down == -2 && left == index1 && right == -2) + { + switch (num7) + { + case 0: + rectangle.X = 54; + rectangle.Y = 108; + break; + case 1: + rectangle.X = 54; + rectangle.Y = 144; + break; + default: + rectangle.X = 54; + rectangle.Y = 180; + break; + } + WorldGen.mergeDown = true; + WorldGen.mergeRight = true; + } + else if (up == index1 && down == index1 && left == -2 && right == -2) + { + switch (num7) + { + case 0: + rectangle.X = 180; + rectangle.Y = 126; + break; + case 1: + rectangle.X = 180; + rectangle.Y = 144; + break; + default: + rectangle.X = 180; + rectangle.Y = 162; + break; + } + WorldGen.mergeLeft = true; + WorldGen.mergeRight = true; + } + else if (up == -2 && down == -2 && left == index1 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 144; + rectangle.Y = 180; + break; + case 1: + rectangle.X = 162; + rectangle.Y = 180; + break; + default: + rectangle.X = 180; + rectangle.Y = 180; + break; + } + WorldGen.mergeUp = true; + WorldGen.mergeDown = true; + } + else if (up == -2 && down == index1 && left == -2 && right == -2) + { + switch (num7) + { + case 0: + rectangle.X = 198; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 198; + rectangle.Y = 108; + break; + default: + rectangle.X = 198; + rectangle.Y = 126; + break; + } + WorldGen.mergeUp = true; + WorldGen.mergeLeft = true; + WorldGen.mergeRight = true; + } + else if (up == index1 && down == -2 && left == -2 && right == -2) + { + switch (num7) + { + case 0: + rectangle.X = 198; + rectangle.Y = 144; + break; + case 1: + rectangle.X = 198; + rectangle.Y = 162; + break; + default: + rectangle.X = 198; + rectangle.Y = 180; + break; + } + WorldGen.mergeDown = true; + WorldGen.mergeLeft = true; + WorldGen.mergeRight = true; + } + else if (up == -2 && down == -2 && left == index1 && right == -2) + { + switch (num7) + { + case 0: + rectangle.X = 216; + rectangle.Y = 144; + break; + case 1: + rectangle.X = 216; + rectangle.Y = 162; + break; + default: + rectangle.X = 216; + rectangle.Y = 180; + break; + } + WorldGen.mergeUp = true; + WorldGen.mergeDown = true; + WorldGen.mergeRight = true; + } + else if (up == -2 && down == -2 && left == -2 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 216; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 216; + rectangle.Y = 108; + break; + default: + rectangle.X = 216; + rectangle.Y = 126; + break; + } + WorldGen.mergeUp = true; + WorldGen.mergeDown = true; + WorldGen.mergeLeft = true; + } + else if (up == -2 && down == -2 && left == -2 && right == -2) + { + switch (num7) + { + case 0: + rectangle.X = 108; + rectangle.Y = 198; + break; + case 1: + rectangle.X = 126; + rectangle.Y = 198; + break; + default: + rectangle.X = 144; + rectangle.Y = 198; + break; + } + WorldGen.mergeUp = true; + WorldGen.mergeDown = true; + WorldGen.mergeLeft = true; + WorldGen.mergeRight = true; + } + else if (up == index1 && down == index1 && left == index1 && right == index1) + { + if (upLeft == -2) + { + switch (num7) + { + case 0: + rectangle.X = 18; + rectangle.Y = 108; + break; + case 1: + rectangle.X = 18; + rectangle.Y = 144; + break; + default: + rectangle.X = 18; + rectangle.Y = 180; + break; + } + } + if (upRight == -2) + { + switch (num7) + { + case 0: + rectangle.X = 0; + rectangle.Y = 108; + break; + case 1: + rectangle.X = 0; + rectangle.Y = 144; + break; + default: + rectangle.X = 0; + rectangle.Y = 180; + break; + } + } + if (downLeft == -2) + { + switch (num7) + { + case 0: + rectangle.X = 18; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 18; + rectangle.Y = 126; + break; + default: + rectangle.X = 18; + rectangle.Y = 162; + break; + } + } + if (downRight == -2) + { + switch (num7) + { + case 0: + rectangle.X = 0; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 0; + rectangle.Y = 126; + break; + default: + rectangle.X = 0; + rectangle.Y = 162; + break; + } + } + } + } + else + { + if (index1 != 2 && index1 != 23 && index1 != 60 && index1 != 70 && index1 != 109 && index1 != 199 && index1 != 477 && index1 != 492) + { + if (up == -1 && down == -2 && left == index1 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 234; + rectangle.Y = 0; + break; + case 1: + rectangle.X = 252; + rectangle.Y = 0; + break; + default: + rectangle.X = 270; + rectangle.Y = 0; + break; + } + WorldGen.mergeDown = true; + } + else if (up == -2 && down == -1 && left == index1 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 234; + rectangle.Y = 18; + break; + case 1: + rectangle.X = 252; + rectangle.Y = 18; + break; + default: + rectangle.X = 270; + rectangle.Y = 18; + break; + } + WorldGen.mergeUp = true; + } + else if (up == index1 && down == index1 && left == -1 && right == -2) + { + switch (num7) + { + case 0: + rectangle.X = 234; + rectangle.Y = 36; + break; + case 1: + rectangle.X = 252; + rectangle.Y = 36; + break; + default: + rectangle.X = 270; + rectangle.Y = 36; + break; + } + WorldGen.mergeRight = true; + } + else if (up == index1 && down == index1 && left == -2 && right == -1) + { + switch (num7) + { + case 0: + rectangle.X = 234; + rectangle.Y = 54; + break; + case 1: + rectangle.X = 252; + rectangle.Y = 54; + break; + default: + rectangle.X = 270; + rectangle.Y = 54; + break; + } + WorldGen.mergeLeft = true; + } + } + if (up != -1 && down != -1 && left == -1 && right == index1) + { + if (up == -2 && down == index1) + { + switch (num7) + { + case 0: + rectangle.X = 72; + rectangle.Y = 144; + break; + case 1: + rectangle.X = 72; + rectangle.Y = 162; + break; + default: + rectangle.X = 72; + rectangle.Y = 180; + break; + } + WorldGen.mergeUp = true; + } + else if (down == -2 && up == index1) + { + switch (num7) + { + case 0: + rectangle.X = 72; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 72; + rectangle.Y = 108; + break; + default: + rectangle.X = 72; + rectangle.Y = 126; + break; + } + WorldGen.mergeDown = true; + } + } + else if (up != -1 && down != -1 && left == index1 && right == -1) + { + if (up == -2 && down == index1) + { + switch (num7) + { + case 0: + rectangle.X = 90; + rectangle.Y = 144; + break; + case 1: + rectangle.X = 90; + rectangle.Y = 162; + break; + default: + rectangle.X = 90; + rectangle.Y = 180; + break; + } + WorldGen.mergeUp = true; + } + else if (down == -2 && up == index1) + { + switch (num7) + { + case 0: + rectangle.X = 90; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 90; + rectangle.Y = 108; + break; + default: + rectangle.X = 90; + rectangle.Y = 126; + break; + } + WorldGen.mergeDown = true; + } + } + else if (up == -1 && down == index1 && left != -1 && right != -1) + { + if (left == -2 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 0; + rectangle.Y = 198; + break; + case 1: + rectangle.X = 18; + rectangle.Y = 198; + break; + default: + rectangle.X = 36; + rectangle.Y = 198; + break; + } + WorldGen.mergeLeft = true; + } + else if (right == -2 && left == index1) + { + switch (num7) + { + case 0: + rectangle.X = 54; + rectangle.Y = 198; + break; + case 1: + rectangle.X = 72; + rectangle.Y = 198; + break; + default: + rectangle.X = 90; + rectangle.Y = 198; + break; + } + WorldGen.mergeRight = true; + } + } + else if (up == index1 && down == -1 && left != -1 && right != -1) + { + if (left == -2 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 0; + rectangle.Y = 216; + break; + case 1: + rectangle.X = 18; + rectangle.Y = 216; + break; + default: + rectangle.X = 36; + rectangle.Y = 216; + break; + } + WorldGen.mergeLeft = true; + } + else if (right == -2 && left == index1) + { + switch (num7) + { + case 0: + rectangle.X = 54; + rectangle.Y = 216; + break; + case 1: + rectangle.X = 72; + rectangle.Y = 216; + break; + default: + rectangle.X = 90; + rectangle.Y = 216; + break; + } + WorldGen.mergeRight = true; + } + } + else if (up != -1 && down != -1 && left == -1 && right == -1) + { + if (up == -2 && down == -2) + { + switch (num7) + { + case 0: + rectangle.X = 108; + rectangle.Y = 216; + break; + case 1: + rectangle.X = 108; + rectangle.Y = 234; + break; + default: + rectangle.X = 108; + rectangle.Y = 252; + break; + } + WorldGen.mergeUp = true; + WorldGen.mergeDown = true; + } + else if (up == -2) + { + switch (num7) + { + case 0: + rectangle.X = 126; + rectangle.Y = 144; + break; + case 1: + rectangle.X = 126; + rectangle.Y = 162; + break; + default: + rectangle.X = 126; + rectangle.Y = 180; + break; + } + WorldGen.mergeUp = true; + } + else if (down == -2) + { + switch (num7) + { + case 0: + rectangle.X = 126; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 126; + rectangle.Y = 108; + break; + default: + rectangle.X = 126; + rectangle.Y = 126; + break; + } + WorldGen.mergeDown = true; + } + } + else if (up == -1 && down == -1 && left != -1 && right != -1) + { + if (left == -2 && right == -2) + { + switch (num7) + { + case 0: + rectangle.X = 162; + rectangle.Y = 198; + break; + case 1: + rectangle.X = 180; + rectangle.Y = 198; + break; + default: + rectangle.X = 198; + rectangle.Y = 198; + break; + } + WorldGen.mergeLeft = true; + WorldGen.mergeRight = true; + } + else if (left == -2) + { + switch (num7) + { + case 0: + rectangle.X = 0; + rectangle.Y = 252; + break; + case 1: + rectangle.X = 18; + rectangle.Y = 252; + break; + default: + rectangle.X = 36; + rectangle.Y = 252; + break; + } + WorldGen.mergeLeft = true; + } + else if (right == -2) + { + switch (num7) + { + case 0: + rectangle.X = 54; + rectangle.Y = 252; + break; + case 1: + rectangle.X = 72; + rectangle.Y = 252; + break; + default: + rectangle.X = 90; + rectangle.Y = 252; + break; + } + WorldGen.mergeRight = true; + } + } + else if (up == -2 && down == -1 && left == -1 && right == -1) + { + switch (num7) + { + case 0: + rectangle.X = 108; + rectangle.Y = 144; + break; + case 1: + rectangle.X = 108; + rectangle.Y = 162; + break; + default: + rectangle.X = 108; + rectangle.Y = 180; + break; + } + WorldGen.mergeUp = true; + } + else if (up == -1 && down == -2 && left == -1 && right == -1) + { + switch (num7) + { + case 0: + rectangle.X = 108; + rectangle.Y = 90; + break; + case 1: + rectangle.X = 108; + rectangle.Y = 108; + break; + default: + rectangle.X = 108; + rectangle.Y = 126; + break; + } + WorldGen.mergeDown = true; + } + else if (up == -1 && down == -1 && left == -2 && right == -1) + { + switch (num7) + { + case 0: + rectangle.X = 0; + rectangle.Y = 234; + break; + case 1: + rectangle.X = 18; + rectangle.Y = 234; + break; + default: + rectangle.X = 36; + rectangle.Y = 234; + break; + } + WorldGen.mergeLeft = true; + } + else if (up == -1 && down == -1 && left == -1 && right == -2) + { + switch (num7) + { + case 0: + rectangle.X = 54; + rectangle.Y = 234; + break; + case 1: + rectangle.X = 72; + rectangle.Y = 234; + break; + default: + rectangle.X = 90; + rectangle.Y = 234; + break; + } + WorldGen.mergeRight = true; + } + } + } + int num9 = tile1.blockType(); + if (TileID.Sets.HasSlopeFrames[index1]) + { + if (num9 == 0) + { + bool flag2 = index1 == up && tileTopCache.topSlope(); + bool flag3 = index1 == left && tile38.leftSlope(); + bool flag4 = index1 == right && tile39.rightSlope(); + bool flag5 = index1 == down && tile37.bottomSlope(); + int num10 = 0; + int num11 = 0; + if (flag2.ToInt() + flag3.ToInt() + flag4.ToInt() + flag5.ToInt() > 2) + { + int num12 = (tileTopCache.slope() == (byte) 1).ToInt() + (tile39.slope() == (byte) 1).ToInt() + (tile37.slope() == (byte) 4).ToInt() + (tile38.slope() == (byte) 4).ToInt(); + int num13 = (tileTopCache.slope() == (byte) 2).ToInt() + (tile39.slope() == (byte) 3).ToInt() + (tile37.slope() == (byte) 3).ToInt() + (tile38.slope() == (byte) 2).ToInt(); + if (num12 == num13) + { + num10 = 2; + num11 = 4; + } + else if (num12 > num13) + { + int num14 = index1 != upLeft ? 0 : (tile42.slope() == (byte) 0 ? 1 : 0); + bool flag6 = index1 == downRight && tile41.slope() == (byte) 0; + int num15 = flag6 ? 1 : 0; + if ((num14 & num15) != 0) + num11 = 4; + else if (flag6) + { + num10 = 6; + } + else + { + num10 = 7; + num11 = 1; + } + } + else + { + int num16 = index1 != upRight ? 0 : (tile43.slope() == (byte) 0 ? 1 : 0); + bool flag7 = index1 == downLeft && tile40.slope() == (byte) 0; + int num17 = flag7 ? 1 : 0; + if ((num16 & num17) != 0) + { + num11 = 4; + num10 = 1; + } + else if (flag7) + { + num10 = 7; + } + else + { + num10 = 6; + num11 = 1; + } + } + rectangle.X = (18 + num10) * 18; + rectangle.Y = num11 * 18; + } + else + { + if (flag2 & flag3 && index1 == down && index1 == right) + num11 = 2; + else if (flag2 & flag4 && index1 == down && index1 == left) + { + num10 = 1; + num11 = 2; + } + else if (flag4 & flag5 && index1 == up && index1 == left) + { + num10 = 1; + num11 = 3; + } + else if (flag5 & flag3 && index1 == up && index1 == right) + num11 = 3; + if (num10 != 0 || num11 != 0) + { + rectangle.X = (18 + num10) * 18; + rectangle.Y = num11 * 18; + } + } + } + if (num9 >= 2 && (rectangle.X < 0 || rectangle.Y < 0)) + { + int num18 = -1; + int num19 = -1; + int num20 = -1; + int num21 = 0; + int num22 = 0; + switch (num9) + { + case 2: + num18 = left; + num19 = down; + num20 = downLeft; + ++num21; + break; + case 3: + num18 = right; + num19 = down; + num20 = downRight; + break; + case 4: + num18 = left; + num19 = up; + num20 = upLeft; + ++num21; + ++num22; + break; + case 5: + num18 = right; + num19 = up; + num20 = upRight; + ++num22; + break; + } + if (index1 != num18 || index1 != num19 || index1 != num20) + { + if (index1 == num18 && index1 == num19) + num21 += 2; + else if (index1 == num18) + num21 += 4; + else if (index1 == num19) + { + num21 += 4; + num22 += 2; + } + else + { + num21 += 2; + num22 += 2; + } + } + rectangle.X = (18 + num21) * 18; + rectangle.Y = num22 * 18; + } + } + if (rectangle.X < 0 || rectangle.Y < 0) + { + if (!flag1) + WorldGen.TileMergeAttemptWeird(index1, -1, Main.tileSolid, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + if (index1 == 2 || index1 == 23 || index1 == 60 || index1 == 70 || index1 == 109 || index1 == 199 || index1 == 477 || index1 == 492 || Main.tileMoss[index1] || TileID.Sets.tileMossBrick[index1]) + WorldGen.TileMergeAttempt(index1, -2, ref up, ref down, ref left, ref right, ref upLeft, ref upRight, ref downLeft, ref downRight); + if (up == index1 && down == index1 && left == index1 && right == index1) + { + if (upLeft != index1 && upRight != index1) + { + switch (num7) + { + case 0: + rectangle.X = 108; + rectangle.Y = 18; + break; + case 1: + rectangle.X = 126; + rectangle.Y = 18; + break; + default: + rectangle.X = 144; + rectangle.Y = 18; + break; + } + } + else if (downLeft != index1 && downRight != index1) + { + switch (num7) + { + case 0: + rectangle.X = 108; + rectangle.Y = 36; + break; + case 1: + rectangle.X = 126; + rectangle.Y = 36; + break; + default: + rectangle.X = 144; + rectangle.Y = 36; + break; + } + } + else if (upLeft != index1 && downLeft != index1) + { + switch (num7) + { + case 0: + rectangle.X = 180; + rectangle.Y = 0; + break; + case 1: + rectangle.X = 180; + rectangle.Y = 18; + break; + default: + rectangle.X = 180; + rectangle.Y = 36; + break; + } + } + else if (upRight != index1 && downRight != index1) + { + switch (num7) + { + case 0: + rectangle.X = 198; + rectangle.Y = 0; + break; + case 1: + rectangle.X = 198; + rectangle.Y = 18; + break; + default: + rectangle.X = 198; + rectangle.Y = 36; + break; + } + } + else + { + switch (num7) + { + case 0: + rectangle.X = 18; + rectangle.Y = 18; + break; + case 1: + rectangle.X = 36; + rectangle.Y = 18; + break; + default: + rectangle.X = 54; + rectangle.Y = 18; + break; + } + } + } + else if (up != index1 && down == index1 && left == index1 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 18; + rectangle.Y = 0; + break; + case 1: + rectangle.X = 36; + rectangle.Y = 0; + break; + default: + rectangle.X = 54; + rectangle.Y = 0; + break; + } + } + else if (up == index1 && down != index1 && left == index1 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 18; + rectangle.Y = 36; + break; + case 1: + rectangle.X = 36; + rectangle.Y = 36; + break; + default: + rectangle.X = 54; + rectangle.Y = 36; + break; + } + } + else if (up == index1 && down == index1 && left != index1 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 0; + rectangle.Y = 0; + break; + case 1: + rectangle.X = 0; + rectangle.Y = 18; + break; + default: + rectangle.X = 0; + rectangle.Y = 36; + break; + } + } + else if (up == index1 && down == index1 && left == index1 && right != index1) + { + switch (num7) + { + case 0: + rectangle.X = 72; + rectangle.Y = 0; + break; + case 1: + rectangle.X = 72; + rectangle.Y = 18; + break; + default: + rectangle.X = 72; + rectangle.Y = 36; + break; + } + } + else if (up != index1 && down == index1 && left != index1 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 0; + rectangle.Y = 54; + break; + case 1: + rectangle.X = 36; + rectangle.Y = 54; + break; + default: + rectangle.X = 72; + rectangle.Y = 54; + break; + } + } + else if (up != index1 && down == index1 && left == index1 && right != index1) + { + switch (num7) + { + case 0: + rectangle.X = 18; + rectangle.Y = 54; + break; + case 1: + rectangle.X = 54; + rectangle.Y = 54; + break; + default: + rectangle.X = 90; + rectangle.Y = 54; + break; + } + } + else if (up == index1 && down != index1 && left != index1 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 0; + rectangle.Y = 72; + break; + case 1: + rectangle.X = 36; + rectangle.Y = 72; + break; + default: + rectangle.X = 72; + rectangle.Y = 72; + break; + } + } + else if (up == index1 && down != index1 && left == index1 && right != index1) + { + switch (num7) + { + case 0: + rectangle.X = 18; + rectangle.Y = 72; + break; + case 1: + rectangle.X = 54; + rectangle.Y = 72; + break; + default: + rectangle.X = 90; + rectangle.Y = 72; + break; + } + } + else if (up == index1 && down == index1 && left != index1 && right != index1) + { + switch (num7) + { + case 0: + rectangle.X = 90; + rectangle.Y = 0; + break; + case 1: + rectangle.X = 90; + rectangle.Y = 18; + break; + default: + rectangle.X = 90; + rectangle.Y = 36; + break; + } + } + else if (up != index1 && down != index1 && left == index1 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 108; + rectangle.Y = 72; + break; + case 1: + rectangle.X = 126; + rectangle.Y = 72; + break; + default: + rectangle.X = 144; + rectangle.Y = 72; + break; + } + } + else if (up != index1 && down == index1 && left != index1 && right != index1) + { + switch (num7) + { + case 0: + rectangle.X = 108; + rectangle.Y = 0; + break; + case 1: + rectangle.X = 126; + rectangle.Y = 0; + break; + default: + rectangle.X = 144; + rectangle.Y = 0; + break; + } + } + else if (up == index1 && down != index1 && left != index1 && right != index1) + { + switch (num7) + { + case 0: + rectangle.X = 108; + rectangle.Y = 54; + break; + case 1: + rectangle.X = 126; + rectangle.Y = 54; + break; + default: + rectangle.X = 144; + rectangle.Y = 54; + break; + } + } + else if (up != index1 && down != index1 && left != index1 && right == index1) + { + switch (num7) + { + case 0: + rectangle.X = 162; + rectangle.Y = 0; + break; + case 1: + rectangle.X = 162; + rectangle.Y = 18; + break; + default: + rectangle.X = 162; + rectangle.Y = 36; + break; + } + } + else if (up != index1 && down != index1 && left == index1 && right != index1) + { + switch (num7) + { + case 0: + rectangle.X = 216; + rectangle.Y = 0; + break; + case 1: + rectangle.X = 216; + rectangle.Y = 18; + break; + default: + rectangle.X = 216; + rectangle.Y = 36; + break; + } + } + else if (up != index1 && down != index1 && left != index1 && right != index1) + { + switch (num7) + { + case 0: + rectangle.X = 162; + rectangle.Y = 54; + break; + case 1: + rectangle.X = 180; + rectangle.Y = 54; + break; + default: + rectangle.X = 198; + rectangle.Y = 54; + break; + } + } + } + if (rectangle.X <= -1 || rectangle.Y <= -1) + { + if (num7 <= 0) + { + rectangle.X = 18; + rectangle.Y = 18; + } + else if (num7 == 1) + { + rectangle.X = 36; + rectangle.Y = 18; + } + if (num7 >= 2) + { + rectangle.X = 54; + rectangle.Y = 18; + } + } + if (Main.tileLargeFrames[index1] == (byte) 1 && num7 == 3) + rectangle.Y += 90; + if (Main.tileLargeFrames[index1] == (byte) 2 && num7 == 3) + rectangle.Y += 90; + tile1.frameX = (short) rectangle.X; + tile1.frameY = (short) rectangle.Y; + if (TileID.Sets.IsVine[index1]) + { + up = tileTopCache == null ? index1 : (tileTopCache.nactive() ? (!tileTopCache.bottomSlope() ? (int) tileTopCache.type : -1) : -1); + if (index1 != up) + { + int num23 = up == 109 ? 1 : (up == 115 ? 1 : 0); + bool flag8 = up == 199 || up == 205; + bool flag9 = up == 2 || up == 52; + bool flag10 = up == 382; + int num24 = up == 70 ? 1 : (up == 528 ? 1 : 0); + ushort num25 = 0; + if (num24 != 0) + num25 = (ushort) 528; + if (num23 != 0) + num25 = (ushort) 115; + if (flag8) + num25 = (ushort) 205; + if (flag9 && index1 != 382) + num25 = (ushort) 52; + if (flag10) + num25 = (ushort) 382; + if (num25 != (ushort) 0 && (int) num25 != index1) + { + tile1.type = num25; + WorldGen.SquareTileFrame(i, j); + return; + } + } + if (up != index1) + { + bool flag11 = false; + if (up == -1) + flag11 = true; + if (index1 == 52 && up != 2 && up != 192) + flag11 = true; + if (index1 == 382 && up != 2 && up != 192) + flag11 = true; + if (index1 == 62 && up != 60) + flag11 = true; + if (index1 == 115 && up != 109) + flag11 = true; + if (index1 == 528 && up != 70) + flag11 = true; + if (index1 == 205 && up != 199) + flag11 = true; + if (flag11) + WorldGen.KillTile(i, j); + } + } + if (!WorldGen.noTileActions && tile1.active() && (index1 == 53 || index1 == 112 || index1 == 116 || index1 == 123 || index1 == 234 || index1 == 224 || index1 == 495 || index1 == 330 || index1 == 331 || index1 == 332 || index1 == 333)) + { + switch (Main.netMode) + { + case 0: + if (tile37 != null) + { + bool flag12 = false; + if (!Main.tile[i, j + 1].nactive()) + flag12 = true; + else if (!Main.tile[i, j + 2].nactive() && (!Main.tile[i, j + 1].active() || !Main.tileSolid[(int) Main.tile[i, j + 1].type])) + flag12 = true; + if (flag12 && WorldGen.AllowsSandfall(tileTopCache)) + { + int projType; + int dmg; + WorldGen.GetSandfallProjData(index1, out projType, out dmg); + tile1.ClearTile(); + int index16 = Projectile.NewProjectile((float) (i * 16 + 8), (float) (j * 16 + 8), 0.0f, 0.41f, projType, dmg, 0.0f, Main.myPlayer); + Main.projectile[index16].ai[0] = 1f; + WorldGen.SquareTileFrame(i, j); + break; + } + break; + } + break; + case 2: + if (tile37 != null && !tile37.nactive() && WorldGen.AllowsSandfall(tileTopCache)) + { + int projType; + int dmg; + WorldGen.GetSandfallProjData(index1, out projType, out dmg); + tile1.ClearTile(); + bool flag13 = false; + for (int index17 = 0; index17 < 1000; ++index17) + { + if (Main.projectile[index17].active && Main.projectile[index17].owner == Main.myPlayer && Main.projectile[index17].type == projType && Math.Abs(Main.projectile[index17].timeLeft - 3600) < 60 && (double) Main.projectile[index17].Distance(new Vector2((float) (i * 16 + 8), (float) (j * 16 + 10))) < 4.0) + { + flag13 = true; + break; + } + } + if (!flag13) + { + int index18 = Projectile.NewProjectile((float) (i * 16 + 8), (float) (j * 16 + 8), 0.0f, 2.5f, projType, dmg, 0.0f, Main.myPlayer); + Main.projectile[index18].velocity.Y = 0.5f; + Main.projectile[index18].position.Y += 2f; + Main.projectile[index18].netUpdate = true; + } + NetMessage.SendTileSquare(-1, i, j, 1); + WorldGen.SquareTileFrame(i, j); + break; + } + break; + } + } + if (rectangle.X != frameX) + { + if (rectangle.Y != frameY) + { + if (frameX >= 0) + { + if (frameY >= 0) + { + ++WorldGen.tileReframeCount; + if (WorldGen.tileReframeCount < 25) + { + int num26 = WorldGen.mergeUp ? 1 : 0; + bool mergeDown = WorldGen.mergeDown; + bool mergeLeft = WorldGen.mergeLeft; + bool mergeRight = WorldGen.mergeRight; + WorldGen.TileFrame(i - 1, j); + WorldGen.TileFrame(i + 1, j); + WorldGen.TileFrame(i, j - 1); + WorldGen.TileFrame(i, j + 1); + WorldGen.mergeUp = num26 != 0; + WorldGen.mergeDown = mergeDown; + WorldGen.mergeLeft = mergeLeft; + WorldGen.mergeRight = mergeRight; + } + --WorldGen.tileReframeCount; + } + } + } + } + } + } + } + } + } + } + } + } + catch + { + } + if (i <= 0 || j <= 0) + return; + WorldGen.UpdateMapTile(i, j, addToList); + } + + public static void CheckTorch(int x, int y) + { + for (int index1 = x - 1; index1 <= x + 1; ++index1) + { + for (int index2 = y - 1; index2 <= y + 1; ++index2) + { + if (Main.tile[index1, index2] == null) + return; + } + } + Tile tile1 = Main.tile[x, y]; + Tile tile2 = Main.tile[x, y - 1]; + Tile tile3 = Main.tile[x, y + 1]; + Tile tile4 = Main.tile[x - 1, y]; + Tile tile5 = Main.tile[x + 1, y]; + Tile tile6 = Main.tile[x - 1, y + 1]; + Tile tile7 = Main.tile[x + 1, y + 1]; + Tile tile8 = Main.tile[x - 1, y - 1]; + Tile tile9 = Main.tile[x + 1, y - 1]; + short num = 0; + if (tile1.frameX >= (short) 66) + num = (short) 66; + int index = -1; + int tree1 = -1; + int tree2 = -1; + int tree3 = -1; + int tree4 = -1; + int tree5 = -1; + int tree6 = -1; + if (tile2 != null && tile2.active() && !tile2.bottomSlope()) + { + int type = (int) tile2.type; + } + if (tile3 != null && tile3.active() && (TileID.Sets.Platforms[(int) tile3.type] && WorldGen.TopEdgeCanBeAttachedTo(x, y + 1) || !tile3.halfBrick() && !tile3.topSlope())) + index = (int) tile3.type; + if (tile4 != null && tile4.active() && (tile4.slope() == (byte) 0 || (int) tile4.slope() % 2 != 1)) + tree1 = (int) tile4.type; + if (tile5 != null && tile5.active() && (tile5.slope() == (byte) 0 || (int) tile5.slope() % 2 != 0)) + tree2 = (int) tile5.type; + if (tile6 != null && tile6.active()) + tree3 = (int) tile6.type; + if (tile7 != null && tile7.active()) + tree4 = (int) tile7.type; + if (tile8 != null && tile8.active()) + tree5 = (int) tile8.type; + if (tile9 != null && tile9.active()) + tree6 = (int) tile9.type; + if (index >= 0 && Main.tileSolid[index] && (!Main.tileNoAttach[index] || TileID.Sets.Platforms[index])) + tile1.frameX = num; + else if (tree1 >= 0 && Main.tileSolid[tree1] && !Main.tileNoAttach[tree1] || tree1 >= 0 && TileID.Sets.IsBeam[tree1] || WorldGen.IsTreeType(tree1) && WorldGen.IsTreeType(tree5) && WorldGen.IsTreeType(tree3)) + tile1.frameX = (short) (22 + (int) num); + else if (tree2 >= 0 && Main.tileSolid[tree2] && !Main.tileNoAttach[tree2] || tree2 >= 0 && TileID.Sets.IsBeam[tree2] || WorldGen.IsTreeType(tree2) && WorldGen.IsTreeType(tree6) && WorldGen.IsTreeType(tree4)) + tile1.frameX = (short) (44 + (int) num); + else if (tile1.wall > (ushort) 0) + tile1.frameX = num; + else + WorldGen.KillTile(x, y); + } + + public static void CheckProjectilePressurePad(int i, int j) + { + bool canUp; + bool canLeft; + bool canRight; + bool canDown; + WorldGen.CheckProjectilePressurePad_GetPossiblePlacementDirections(i, j, out canUp, out canLeft, out canRight, out canDown); + Tile tile = Main.tile[i, j]; + bool flag; + switch ((int) tile.frameX / 22) + { + case 0: + flag = !canDown; + break; + case 1: + flag = !canUp; + break; + case 2: + flag = !canLeft; + break; + case 3: + flag = !canRight; + break; + default: + flag = true; + break; + } + if (!flag) + return; + if (canDown) + tile.frameX = (short) 0; + else if (canUp) + tile.frameX = (short) 22; + else if (canLeft) + tile.frameX = (short) 44; + else if (canRight) + tile.frameX = (short) 66; + else + WorldGen.KillTile(i, j); + } + + private static void CheckProjectilePressurePad_GetPossiblePlacementDirections( + int i, + int j, + out bool canUp, + out bool canLeft, + out bool canRight, + out bool canDown) + { + canUp = false; + canLeft = false; + canRight = false; + canDown = false; + Tile tile1 = Main.tile[i, j]; + Tile tile2 = Main.tile[i, j - 1]; + Tile tile3 = Main.tile[i, j + 1]; + Tile tile4 = Main.tile[i - 1, j]; + Tile tile5 = Main.tile[i + 1, j]; + Tile tile6 = Main.tile[i - 1, j + 1]; + Tile tile7 = Main.tile[i + 1, j + 1]; + Tile tile8 = Main.tile[i - 1, j - 1]; + Tile tile9 = Main.tile[i + 1, j - 1]; + int index1 = -1; + int index2 = -1; + int tree1 = -1; + int tree2 = -1; + int tree3 = -1; + int tree4 = -1; + int tree5 = -1; + int tree6 = -1; + if (tile2 != null && tile2.nactive() && !tile2.bottomSlope()) + index2 = (int) tile2.type; + if (tile3 != null && tile3.nactive() && !tile3.halfBrick() && !tile3.topSlope()) + index1 = (int) tile3.type; + if (tile4 != null && tile4.nactive() && (tile4.slope() == (byte) 0 || (int) tile4.slope() % 2 != 1)) + tree1 = (int) tile4.type; + if (tile5 != null && tile5.nactive() && (tile5.slope() == (byte) 0 || (int) tile5.slope() % 2 != 0)) + tree2 = (int) tile5.type; + if (tile6 != null && tile6.nactive()) + tree3 = (int) tile6.type; + if (tile7 != null && tile7.nactive()) + tree4 = (int) tile7.type; + if (tile8 != null && tile8.nactive()) + tree5 = (int) tile8.type; + if (tile9 != null && tile9.nactive()) + tree6 = (int) tile9.type; + if (index1 >= 0 && Main.tileSolid[index1] && (!Main.tileNoAttach[index1] || TileID.Sets.Platforms[index1]) && (tile3.bottomSlope() || tile3.slope() == (byte) 0) && !tile3.halfBrick()) + canDown = true; + if (index2 >= 0 && Main.tileSolid[index2] && (!Main.tileNoAttach[index2] || TileID.Sets.Platforms[index2] && tile2.halfBrick()) && (tile2.topSlope() || tile2.slope() == (byte) 0 || tile2.halfBrick())) + canUp = true; + if (tree1 >= 0 && Main.tileSolid[tree1] && !Main.tileNoAttach[tree1] && (tile4.leftSlope() || tile4.slope() == (byte) 0) && !tile4.halfBrick() || tree1 >= 0 && TileID.Sets.IsBeam[tree1] || WorldGen.IsTreeType(tree1) && WorldGen.IsTreeType(tree5) && WorldGen.IsTreeType(tree3)) + canLeft = true; + if ((tree2 < 0 || !Main.tileSolid[tree2] || Main.tileNoAttach[tree2] || !tile5.rightSlope() && tile5.slope() != (byte) 0 || tile5.halfBrick()) && (tree2 < 0 || !TileID.Sets.IsBeam[tree2]) && (!WorldGen.IsTreeType(tree2) || !WorldGen.IsTreeType(tree6) || !WorldGen.IsTreeType(tree4))) + return; + canRight = true; + } + + public static bool IsTreeType(int tree) => tree >= 0 && TileID.Sets.IsATreeTrunk[tree]; + + public static int CanPlaceProjectilePressurePad( + int x, + int y, + int type = 442, + int style = 0, + int direction = 0, + int alternate = 0) + { + bool canUp; + bool canLeft; + bool canRight; + bool canDown; + WorldGen.CheckProjectilePressurePad_GetPossiblePlacementDirections(x, y, out canUp, out canLeft, out canRight, out canDown); + if (!canUp && !canDown && !canLeft && !canRight) + return -1; + switch (alternate) + { + case 0: + if (!canDown) + return -1; + break; + case 1: + if (!canUp) + return -1; + break; + case 2: + if (!canLeft) + return -1; + break; + case 3: + if (!canRight) + return -1; + break; + } + return style; + } + + private static void CheckDoorOpen(int i, int j, Tile tileCache) + { + if (WorldGen.destroyObject) + return; + int num1 = 0; + int index = i; + int frameX = (int) tileCache.frameX; + int frameY = (int) tileCache.frameY; + int doorStyle = frameY / 54 + (int) tileCache.frameX / 72 * 36; + int num2 = j - frameY % 54 / 18; + bool flag = false; + switch (frameX % 72) + { + case 0: + index = i; + num1 = 1; + break; + case 18: + index = i - 1; + num1 = 1; + break; + case 36: + index = i + 1; + num1 = -1; + break; + case 54: + index = i; + num1 = -1; + break; + } + Tile testTile1 = Main.tile[index, num2 - 1]; + Tile testTile2 = Main.tile[index, num2 + 3]; + if (testTile1 == null) + { + testTile1 = new Tile(); + Main.tile[index, num2 - 1] = testTile1; + } + if (testTile2 == null) + { + testTile2 = new Tile(); + Main.tile[index, num2 + 3] = testTile2; + } + if (!WorldGen.SolidTile(testTile1) || !WorldGen.SolidTile(testTile2)) + { + flag = true; + WorldGen.destroyObject = true; + WorldGen.DropDoorItem(i, j, doorStyle); + } + int num3 = index; + if (num1 == -1) + num3 = index - 1; + for (int i1 = num3; i1 < num3 + 2; ++i1) + { + for (int j1 = num2; j1 < num2 + 3; ++j1) + { + if (!flag) + { + Tile tile = Main.tile[i1, j1]; + if (!tile.active() || tile.type != (ushort) 11) + { + WorldGen.destroyObject = true; + WorldGen.DropDoorItem(i, j, doorStyle); + flag = true; + i1 = num3; + j1 = num2; + } + } + if (flag) + WorldGen.KillTile(i1, j1); + } + } + WorldGen.destroyObject = false; + } + + private static void CheckDoorClosed(int i, int j, Tile tileCache, int type) + { + if (WorldGen.destroyObject) + return; + bool flag = false; + int frameY = (int) tileCache.frameY; + int doorStyle = frameY / 54 + (int) tileCache.frameX / 54 * 36; + int j1 = j - frameY % 54 / 18; + Tile testTile1 = Main.tile[i, j1 - 1]; + Tile tile1 = Main.tile[i, j1]; + Tile tile2 = Main.tile[i, j1 + 1]; + Tile tile3 = Main.tile[i, j1 + 2]; + Tile testTile2 = Main.tile[i, j1 + 3]; + if (testTile1 == null) + { + testTile1 = new Tile(); + Main.tile[i, j1 - 1] = testTile1; + } + if (tile1 == null) + { + tile1 = new Tile(); + Main.tile[i, j1] = tile1; + } + if (tile2 == null) + { + tile2 = new Tile(); + Main.tile[i, j1 + 1] = tile2; + } + if (tile3 == null) + { + tile3 = new Tile(); + Main.tile[i, j1 + 2] = tile3; + } + if (testTile2 == null) + { + testTile2 = new Tile(); + Main.tile[i, j1 + 3] = testTile2; + } + if (!WorldGen.SolidTile(testTile1)) + flag = true; + if (!WorldGen.SolidTile(testTile2)) + flag = true; + if (!tile1.active() || (int) tile1.type != type) + flag = true; + if (!tile2.active() || (int) tile2.type != type) + flag = true; + if (!tile3.active() || (int) tile3.type != type) + flag = true; + if (flag) + { + WorldGen.destroyObject = true; + WorldGen.KillTile(i, j1); + WorldGen.KillTile(i, j1 + 1); + WorldGen.KillTile(i, j1 + 2); + WorldGen.DropDoorItem(i, j, doorStyle); + } + WorldGen.destroyObject = false; + } + + private static void GetSandfallProjData(int type, out int projType, out int dmg) + { + dmg = 10; + switch (type) + { + case 59: + projType = 39; + break; + case 112: + projType = 56; + break; + case 116: + projType = 67; + break; + case 123: + projType = 71; + break; + case 224: + projType = 179; + break; + case 234: + projType = 241; + break; + case 330: + projType = 411; + dmg = 0; + break; + case 331: + projType = 412; + dmg = 0; + break; + case 332: + projType = 413; + dmg = 0; + break; + case 333: + projType = 414; + dmg = 0; + break; + case 495: + projType = 812; + break; + default: + projType = 31; + break; + } + } + + public static bool AllowsSandfall(Tile tileTopCache) + { + bool flag = true; + if (tileTopCache.active() && (TileID.Sets.BasicChest[(int) tileTopCache.type] || TileID.Sets.BasicChestFake[(int) tileTopCache.type] || tileTopCache.type == (ushort) 323 || tileTopCache.type == (ushort) 88 || tileTopCache.type == (ushort) 80 || tileTopCache.type == (ushort) 77 || tileTopCache.type == (ushort) 26 || tileTopCache.type == (ushort) 475 || tileTopCache.type == (ushort) 470 || tileTopCache.type == (ushort) 597)) + flag = false; + return flag; + } + + public static void TriggerLunarApocalypse() + { + List intList = new List() + { + 517, + 422, + 507, + 493 + }; + int[] numArray = new int[4]; + for (int index = 0; index < 4; ++index) + { + numArray[index] = intList[Main.rand.Next(intList.Count)]; + intList.Remove(numArray[index]); + } + int num1 = Main.maxTilesX / 5; + int worldSurface = (int) Main.worldSurface; + for (int index1 = 0; index1 < 4; ++index1) + { + int num2 = num1 * (1 + index1); + bool flag = false; + for (int index2 = 0; index2 < 30; ++index2) + { + int num3 = Main.rand.Next(-100, 101); + for (int y = worldSurface; y > 100; --y) + { + if (!Collision.SolidTiles(num2 + num3 - 10, num2 + num3 + 10, y - 20, y + 15) && !WorldGen.PlayerLOS(num2 + num3 - 10, y) && !WorldGen.PlayerLOS(num2 + num3 + 10, y) && !WorldGen.PlayerLOS(num2 + num3 - 10, y - 20) && !WorldGen.PlayerLOS(num2 + num3 + 10, y - 20)) + { + int number = NPC.NewNPC((num2 + num3) * 16, y * 16, numArray[index1]); + if (Main.netMode == 2 && number < 200) + NetMessage.SendData(23, number: number); + flag = true; + break; + } + } + if (flag) + break; + } + if (!flag) + NPC.NewNPC(num2 * 16, (worldSurface - 40) * 16, numArray[index1]); + } + int num4; + NPC.TowerActiveStardust = (num4 = 1) != 0; + NPC.TowerActiveSolar = num4 != 0; + NPC.TowerActiveNebula = num4 != 0; + NPC.TowerActiveVortex = num4 != 0; + NPC.LunarApocalypseIsUp = true; + int strengthTowerMax; + NPC.ShieldStrengthTowerStardust = strengthTowerMax = NPC.ShieldStrengthTowerMax; + NPC.ShieldStrengthTowerNebula = strengthTowerMax; + NPC.ShieldStrengthTowerVortex = strengthTowerMax; + NPC.ShieldStrengthTowerSolar = strengthTowerMax; + NetMessage.SendData(101); + WorldGen.MessageLunarApocalypse(); + } + + public static void UpdateLunarApocalypse() + { + if (!NPC.LunarApocalypseIsUp) + return; + bool flag1 = false; + bool flag2 = false; + bool flag3 = false; + bool flag4 = false; + bool flag5 = false; + for (int index = 0; index < 200; ++index) + { + if (Main.npc[index].active) + { + switch (Main.npc[index].type) + { + case 398: + flag1 = true; + continue; + case 422: + flag3 = true; + continue; + case 493: + flag5 = true; + continue; + case 507: + flag4 = true; + continue; + case 517: + flag2 = true; + continue; + default: + continue; + } + } + } + if (!flag2) + NPC.TowerActiveSolar = false; + if (!flag3) + NPC.TowerActiveVortex = false; + if (!flag4) + NPC.TowerActiveNebula = false; + if (!flag5) + NPC.TowerActiveStardust = false; + if (NPC.TowerActiveSolar || NPC.TowerActiveVortex || NPC.TowerActiveNebula || NPC.TowerActiveStardust || flag1) + return; + WorldGen.StartImpendingDoom(); + } + + public static void StartImpendingDoom() + { + NPC.LunarApocalypseIsUp = false; + NPC.MoonLordCountdown = 3600; + NetMessage.SendData(103, number: NPC.MoonLordCountdown); + WorldGen.BroadcastText(NetworkText.FromKey(Lang.misc[52].Key), 50, (int) byte.MaxValue, 130); + if (Main.netMode == 1) + return; + WorldGen.GetRidOfCultists(); + } + + public static void GetRidOfCultists() + { + for (int number = 0; number < 200; ++number) + { + if (Main.npc[number].active && (Main.npc[number].type == 437 || Main.npc[number].type == 438 || Main.npc[number].type == 379)) + { + Main.npc[number].active = false; + if (Main.netMode != 1) + NetMessage.SendData(23, number: number); + } + } + } + + public static void MessageLunarApocalypse() + { + if (!NPC.LunarApocalypseIsUp) + return; + int num = 0; + if (!NPC.TowerActiveSolar) + ++num; + if (!NPC.TowerActiveVortex) + ++num; + if (!NPC.TowerActiveNebula) + ++num; + if (!NPC.TowerActiveStardust) + ++num; + WorldGen.BroadcastText(NetworkText.FromKey(Lang.misc[43 + num].Key), 175, 75, (int) byte.MaxValue); + } + + public static void BroadcastText(NetworkText text, Vector4 color) => WorldGen.BroadcastText(text, new Color(color)); + + public static void BroadcastText(NetworkText text, Vector3 color) => WorldGen.BroadcastText(text, new Color(color)); + + public static void BroadcastText(NetworkText text, int r, int g, int b) => WorldGen.BroadcastText(text, new Color(r, g, b)); + + public static void BroadcastText(NetworkText text, byte r, byte g, byte b) => WorldGen.BroadcastText(text, new Color((int) r, (int) g, (int) b)); + + public static void BroadcastText(NetworkText text, Color color) + { + if (Main.netMode == 0) + { + Main.NewText(text.ToString(), color.R, color.G, color.B); + } + else + { + if (Main.netMode != 2) + return; + ChatHelper.BroadcastChatMessage(text, color); + } + } + + public static bool CanCutTile(int x, int y, TileCuttingContext context) + { + if (Main.tile[x, y + 1] == null || Main.tile[x, y + 1].type == (ushort) 78 || Main.tile[x, y + 1].type == (ushort) 380 || Main.tile[x, y + 1].type == (ushort) 579) + return false; + return Main.tile[x, y].type != (ushort) 254 || Main.tile[x, y].frameX >= (short) 144; + } + + public static bool InAPlaceWithWind(Vector2 position, int width, int height) + { + Point tileCoordinates1 = position.ToTileCoordinates(); + Point tileCoordinates2 = (position + new Vector2((float) width, (float) height)).ToTileCoordinates(); + return WorldGen.InAPlaceWithWind(tileCoordinates1.X, tileCoordinates1.Y, 1 + tileCoordinates2.X - tileCoordinates1.X, 1 + tileCoordinates2.Y - tileCoordinates1.Y); + } + + public static bool InAPlaceWithWind(int x, int y, int width, int height) + { + if ((double) y >= Main.worldSurface) + return false; + for (int index1 = 0; index1 < width; ++index1) + { + for (int index2 = 0; index2 < height; ++index2) + { + Tile tile = Main.tile[x + index1, y + index2]; + if (tile == null || tile.liquid > (byte) 0 || tile.wall > (ushort) 0 && !WallID.Sets.AllowsWind[(int) tile.wall]) + return false; + } + } + return true; + } + + public static int[] CountTileTypesInWorld(params int[] oreTypes) + { + int[] numArray = new int[oreTypes.Length]; + for (int index1 = 0; index1 < Main.maxTilesX; ++index1) + { + for (int index2 = 0; index2 < Main.maxTilesY; ++index2) + { + Tile tile = Main.tile[index1, index2]; + if (tile.active()) + { + for (int index3 = 0; index3 < oreTypes.Length; ++index3) + { + if (oreTypes[index3] == (int) tile.type) + { + ++numArray[index3]; + break; + } + } + } + } + } + return numArray; + } + + public static class SavedOreTiers + { + public static int Copper = 7; + public static int Iron = 6; + public static int Silver = 9; + public static int Gold = 8; + public static int Cobalt = 107; + public static int Mythril = 108; + public static int Adamantite = 111; + } + + public static class Hooks + { + public static event WorldGen.Hooks.WorldGenConfigProcessEvent OnWorldGenConfigProcess; + + public static event Action OnWorldLoad; + + public static void Initialize() + { + Player.Hooks.OnEnterWorld += (Action) (player => + { + if (player.whoAmI != Main.myPlayer) + return; + WorldGen.Hooks.WorldLoaded(); + if (Main.netMode == 1) + return; + Main.FixUIScale(); + }); + WorldGen.Hooks.OnWorldLoad += new Action(WorldGen.mysticLogsEvent.StartWorld); + WorldGen.Hooks.OnWorldLoad += new Action(Main.checkHalloween); + WorldGen.Hooks.OnWorldLoad += new Action(Main.checkXMas); + } + + public static void WorldLoaded() + { + if (WorldGen.Hooks.OnWorldLoad == null) + return; + WorldGen.Hooks.OnWorldLoad(); + } + + public static void ClearWorld() + { + PressurePlateHelper.Reset(); + WorldGen.TownManager.Clear(); + NPC.ResetKillCount(); + Main.instance.ClearCachedTileDraws(); + MapHelper.ResetMapData(); + } + + public static void ProcessWorldGenConfig(ref WorldGenConfiguration config) + { + if (WorldGen.Hooks.OnWorldGenConfigProcess == null) + return; + WorldGen.Hooks.OnWorldGenConfigProcess(ref config); + } + + public delegate void WorldGenConfigProcessEvent(ref WorldGenConfiguration config); + } + + public static class Spread + { + public static void Wall(int x, int y, int wallType) + { + if (!WorldGen.InWorld(x, y)) + return; + ushort num = (ushort) wallType; + List pointList1 = new List(); + List pointList2 = new List(); + HashSet pointSet = new HashSet(); + pointList2.Add(new Point(x, y)); + while (pointList2.Count > 0) + { + pointList1.Clear(); + pointList1.AddRange((IEnumerable) pointList2); + pointList2.Clear(); + while (pointList1.Count > 0) + { + Point point1 = pointList1[0]; + if (!WorldGen.InWorld(point1.X, point1.Y, 1)) + { + pointList1.Remove(point1); + } + else + { + pointSet.Add(point1); + pointList1.Remove(point1); + Tile tile = Main.tile[point1.X, point1.Y]; + if (WorldGen.SolidTile(point1.X, point1.Y) || tile.wall != (ushort) 0) + { + if (tile.active() && tile.wall == (ushort) 0) + tile.wall = num; + } + else + { + tile.wall = num; + Point point2 = new Point(point1.X - 1, point1.Y); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X + 1, point1.Y); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X, point1.Y - 1); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X, point1.Y + 1); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + } + } + } + } + } + + public static void Wall2(int x, int y, int wallType) + { + if (!WorldGen.InWorld(x, y)) + return; + ushort num1 = (ushort) wallType; + int num2 = 0; + int maxWallOut2 = WorldGen.maxWallOut2; + List pointList1 = new List(); + List pointList2 = new List(); + HashSet pointSet = new HashSet(); + pointList2.Add(new Point(x, y)); + while (pointList2.Count > 0) + { + pointList1.Clear(); + pointList1.AddRange((IEnumerable) pointList2); + pointList2.Clear(); + while (pointList1.Count > 0) + { + Point point1 = pointList1[0]; + if (!WorldGen.InWorld(point1.X, point1.Y, 1)) + { + pointList1.Remove(point1); + } + else + { + pointSet.Add(point1); + pointList1.Remove(point1); + Tile tile = Main.tile[point1.X, point1.Y]; + if (!WorldGen.SolidTile(point1.X, point1.Y) && (int) tile.wall != (int) num1 && tile.wall != (ushort) 4 && tile.wall != (ushort) 40 && tile.wall != (ushort) 3 && tile.wall != (ushort) 87 && tile.wall != (ushort) 34) + { + if (num1 == (ushort) 63 && tile.wall == (ushort) 0) + { + pointList1.Remove(point1); + } + else + { + ++num2; + if (num2 >= maxWallOut2) + { + pointList1.Remove(point1); + } + else + { + tile.wall = num1; + Point point2 = new Point(point1.X - 1, point1.Y); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X + 1, point1.Y); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X, point1.Y - 1); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X, point1.Y + 1); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + if (num1 == (ushort) 63) + { + point2 = new Point(point1.X - 1, point1.Y - 1); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X + 1, point1.Y - 1); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X - 1, point1.Y + 1); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X + 1, point1.Y + 1); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X - 2, point1.Y); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X + 2, point1.Y); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + } + } + } + } + else if (tile.active() && (int) tile.wall != (int) num1 && tile.wall != (ushort) 4 && tile.wall != (ushort) 40 && tile.wall != (ushort) 3 && tile.wall != (ushort) 87 && tile.wall != (ushort) 34) + tile.wall = num1; + } + } + } + } + + public static void Moss(int x, int y) + { + if (!WorldGen.InWorld(x, y)) + return; + ushort mossWall = WorldGen.mossWall; + ushort mossTile = WorldGen.mossTile; + List pointList1 = new List(); + List pointList2 = new List(); + HashSet pointSet = new HashSet(); + pointList2.Add(new Point(x, y)); + while (pointList2.Count > 0) + { + pointList1.Clear(); + pointList1.AddRange((IEnumerable) pointList2); + pointList2.Clear(); + while (pointList1.Count > 0) + { + Point point1 = pointList1[0]; + if (!WorldGen.InWorld(point1.X, point1.Y, 1)) + { + pointList1.Remove(point1); + } + else + { + pointSet.Add(point1); + pointList1.Remove(point1); + Tile tile = Main.tile[point1.X, point1.Y]; + if (WorldGen.SolidTile(point1.X, point1.Y) || tile.wall != (ushort) 0) + { + if (tile.active()) + { + if (tile.wall == (ushort) 0) + tile.wall = mossWall; + if (tile.type == (ushort) 1) + tile.type = mossTile; + } + } + else + { + tile.wall = mossWall; + Point point2 = new Point(point1.X - 1, point1.Y); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X + 1, point1.Y); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X, point1.Y - 1); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X, point1.Y + 1); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + } + } + } + } + } + + public static void Gem(int x, int y) + { + if (!WorldGen.InWorld(x, y)) + return; + List pointList1 = new List(); + List pointList2 = new List(); + HashSet pointSet = new HashSet(); + pointList2.Add(new Point(x, y)); + while (pointList2.Count > 0) + { + pointList1.Clear(); + pointList1.AddRange((IEnumerable) pointList2); + pointList2.Clear(); + while (pointList1.Count > 0) + { + Point point1 = pointList1[0]; + if (!WorldGen.InWorld(point1.X, point1.Y, 1)) + { + pointList1.Remove(point1); + } + else + { + pointSet.Add(point1); + pointList1.Remove(point1); + Tile tile1 = Main.tile[point1.X, point1.Y]; + if (WorldGen.SolidTile(point1.X, point1.Y) || tile1.wall != (ushort) 0) + { + if (tile1.active()) + { + if (WorldGen.Spread.Gemmable((int) tile1.type)) + tile1.type = WorldGen.randGemTile(); + Tile tile2 = Main.tile[point1.X - 1, point1.Y]; + if (WorldGen.Spread.Gemmable((int) tile2.type)) + tile2.type = WorldGen.randGemTile(); + Tile tile3 = Main.tile[point1.X + 1, point1.Y]; + if (WorldGen.Spread.Gemmable((int) tile3.type)) + tile3.type = WorldGen.randGemTile(); + Tile tile4 = Main.tile[point1.X, point1.Y - 1]; + if (WorldGen.Spread.Gemmable((int) tile4.type)) + tile4.type = WorldGen.randGemTile(); + Tile tile5 = Main.tile[point1.X, point1.Y + 1]; + if (WorldGen.Spread.Gemmable((int) tile5.type)) + tile5.type = WorldGen.randGemTile(); + } + } + else + { + tile1.wall = (ushort) (48 + WorldGen.randGem()); + if (!tile1.active() && WorldGen.genRand.Next(2) == 0) + WorldGen.PlaceTile(point1.X, point1.Y, 178, true, style: WorldGen.randGem()); + Point point2 = new Point(point1.X - 1, point1.Y); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X + 1, point1.Y); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X, point1.Y - 1); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X, point1.Y + 1); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + } + } + } + } + } + + public static void Spider(int x, int y) + { + if (!WorldGen.InWorld(x, y)) + return; + byte num = 62; + List pointList1 = new List(); + List pointList2 = new List(); + HashSet pointSet = new HashSet(); + pointList2.Add(new Point(x, y)); + while (pointList2.Count > 0) + { + pointList1.Clear(); + pointList1.AddRange((IEnumerable) pointList2); + pointList2.Clear(); + while (pointList1.Count > 0) + { + Point point1 = pointList1[0]; + if (!WorldGen.InWorld(point1.X, point1.Y, 1)) + { + pointList1.Remove(point1); + } + else + { + pointSet.Add(point1); + pointList1.Remove(point1); + Tile tile = Main.tile[point1.X, point1.Y]; + if (WorldGen.SolidTile(point1.X, point1.Y) || tile.wall != (ushort) 0) + { + if (tile.active() && tile.wall == (ushort) 0) + tile.wall = (ushort) num; + } + else + { + tile.wall = (ushort) num; + WorldGen.SquareWallFrame(point1.X, point1.Y); + if (!tile.active()) + { + tile.liquid = (byte) 0; + tile.lava(false); + if (WorldGen.SolidTile(point1.X, point1.Y + 1) && WorldGen.genRand.Next(3) == 0) + { + if (WorldGen.genRand.Next(15) == 0) + WorldGen.AddBuriedChest(point1.X, point1.Y, 939, true, 15); + else + WorldGen.PlacePot(point1.X, point1.Y, style: WorldGen.genRand.Next(19, 21)); + } + if (!tile.active()) + { + if (WorldGen.SolidTile(point1.X, point1.Y - 1) && WorldGen.genRand.Next(3) == 0) + WorldGen.PlaceTight(point1.X, point1.Y, true); + else if (WorldGen.SolidTile(point1.X, point1.Y + 1)) + { + WorldGen.PlaceTile(point1.X, point1.Y, 187, true, style: (9 + WorldGen.genRand.Next(5))); + if (WorldGen.genRand.Next(3) == 0) + { + if (!tile.active()) + WorldGen.PlaceSmallPile(point1.X, point1.Y, 34 + WorldGen.genRand.Next(4), 1); + if (!tile.active()) + WorldGen.PlaceSmallPile(point1.X, point1.Y, 48 + WorldGen.genRand.Next(6), 0); + } + } + } + } + Point point2 = new Point(point1.X - 1, point1.Y); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X + 1, point1.Y); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X, point1.Y - 1); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X, point1.Y + 1); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + } + } + } + } + } + + public static void WallDungeon(int x, int y, int wallType) + { + if (!WorldGen.InWorld(x, y)) + return; + ushort num = (ushort) wallType; + List pointList1 = new List(); + List pointList2 = new List(); + HashSet pointSet = new HashSet(); + pointList2.Add(new Point(x, y)); + while (pointList2.Count > 0) + { + pointList1.Clear(); + pointList1.AddRange((IEnumerable) pointList2); + pointList2.Clear(); + while (pointList1.Count > 0) + { + Point point1 = pointList1[0]; + if (!WorldGen.InWorld(point1.X, point1.Y, 1)) + { + pointList1.Remove(point1); + } + else + { + pointSet.Add(point1); + pointList1.Remove(point1); + Tile tile = Main.tile[point1.X, point1.Y]; + if (!WorldGen.SolidTile(point1.X, point1.Y) && (int) tile.wall != (int) num && tile.wall > (ushort) 0 && tile.wall != (ushort) 244) + { + tile.wall = num; + Point point2 = new Point(point1.X - 1, point1.Y); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X + 1, point1.Y); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X, point1.Y - 1); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + point2 = new Point(point1.X, point1.Y + 1); + if (!pointSet.Contains(point2)) + pointList2.Add(point2); + } + else if (tile.active()) + tile.wall = num; + } + } + } + } + + private static bool Gemmable(int type) => type == 0 || type == 1 || type == 40 || type == 59 || type == 60 || type == 70 || type == 147 || type == 161; + } + + public struct GrowTreeSettings + { + public ushort TreeTileType; + public int TreeHeightMin; + public int TreeHeightMax; + public int TreeTopPaddingNeeded; + public WorldGen.GrowTreeSettings.IsTileFitForTreeGroundTest GroundTest; + public WorldGen.GrowTreeSettings.IsWallTypeFitForTreeBack WallTest; + public ushort SaplingTileType; + + public delegate bool IsTileFitForTreeGroundTest(int tileType); + + public delegate bool IsWallTypeFitForTreeBack(int wallType); + + public static class Profiles + { + public static WorldGen.GrowTreeSettings GemTree_Ruby = new WorldGen.GrowTreeSettings() + { + GroundTest = new WorldGen.GrowTreeSettings.IsTileFitForTreeGroundTest(WorldGen.GemTreeGroundTest), + WallTest = new WorldGen.GrowTreeSettings.IsWallTypeFitForTreeBack(WorldGen.GemTreeWallTest), + TreeHeightMax = 12, + TreeHeightMin = 7, + TreeTileType = 587, + TreeTopPaddingNeeded = 4, + SaplingTileType = 590 + }; + public static WorldGen.GrowTreeSettings GemTree_Diamond = new WorldGen.GrowTreeSettings() + { + GroundTest = new WorldGen.GrowTreeSettings.IsTileFitForTreeGroundTest(WorldGen.GemTreeGroundTest), + WallTest = new WorldGen.GrowTreeSettings.IsWallTypeFitForTreeBack(WorldGen.GemTreeWallTest), + TreeHeightMax = 12, + TreeHeightMin = 7, + TreeTileType = 588, + TreeTopPaddingNeeded = 4, + SaplingTileType = 590 + }; + public static WorldGen.GrowTreeSettings GemTree_Topaz = new WorldGen.GrowTreeSettings() + { + GroundTest = new WorldGen.GrowTreeSettings.IsTileFitForTreeGroundTest(WorldGen.GemTreeGroundTest), + WallTest = new WorldGen.GrowTreeSettings.IsWallTypeFitForTreeBack(WorldGen.GemTreeWallTest), + TreeHeightMax = 12, + TreeHeightMin = 7, + TreeTileType = 583, + TreeTopPaddingNeeded = 4, + SaplingTileType = 590 + }; + public static WorldGen.GrowTreeSettings GemTree_Amethyst = new WorldGen.GrowTreeSettings() + { + GroundTest = new WorldGen.GrowTreeSettings.IsTileFitForTreeGroundTest(WorldGen.GemTreeGroundTest), + WallTest = new WorldGen.GrowTreeSettings.IsWallTypeFitForTreeBack(WorldGen.GemTreeWallTest), + TreeHeightMax = 12, + TreeHeightMin = 7, + TreeTileType = 584, + TreeTopPaddingNeeded = 4, + SaplingTileType = 590 + }; + public static WorldGen.GrowTreeSettings GemTree_Sappphire = new WorldGen.GrowTreeSettings() + { + GroundTest = new WorldGen.GrowTreeSettings.IsTileFitForTreeGroundTest(WorldGen.GemTreeGroundTest), + WallTest = new WorldGen.GrowTreeSettings.IsWallTypeFitForTreeBack(WorldGen.GemTreeWallTest), + TreeHeightMax = 12, + TreeHeightMin = 7, + TreeTileType = 585, + TreeTopPaddingNeeded = 4, + SaplingTileType = 590 + }; + public static WorldGen.GrowTreeSettings GemTree_Emerald = new WorldGen.GrowTreeSettings() + { + GroundTest = new WorldGen.GrowTreeSettings.IsTileFitForTreeGroundTest(WorldGen.GemTreeGroundTest), + WallTest = new WorldGen.GrowTreeSettings.IsWallTypeFitForTreeBack(WorldGen.GemTreeWallTest), + TreeHeightMax = 12, + TreeHeightMin = 7, + TreeTileType = 586, + TreeTopPaddingNeeded = 4, + SaplingTileType = 590 + }; + public static WorldGen.GrowTreeSettings GemTree_Amber = new WorldGen.GrowTreeSettings() + { + GroundTest = new WorldGen.GrowTreeSettings.IsTileFitForTreeGroundTest(WorldGen.GemTreeGroundTest), + WallTest = new WorldGen.GrowTreeSettings.IsWallTypeFitForTreeBack(WorldGen.GemTreeWallTest), + TreeHeightMax = 12, + TreeHeightMin = 7, + TreeTileType = 589, + TreeTopPaddingNeeded = 4, + SaplingTileType = 590 + }; + public static WorldGen.GrowTreeSettings VanityTree_Sakura = new WorldGen.GrowTreeSettings() + { + GroundTest = new WorldGen.GrowTreeSettings.IsTileFitForTreeGroundTest(WorldGen.VanityTreeGroundTest), + WallTest = new WorldGen.GrowTreeSettings.IsWallTypeFitForTreeBack(WorldGen.DefaultTreeWallTest), + TreeHeightMax = 12, + TreeHeightMin = 7, + TreeTileType = 596, + TreeTopPaddingNeeded = 4, + SaplingTileType = 595 + }; + public static WorldGen.GrowTreeSettings VanityTree_Willow = new WorldGen.GrowTreeSettings() + { + GroundTest = new WorldGen.GrowTreeSettings.IsTileFitForTreeGroundTest(WorldGen.VanityTreeGroundTest), + WallTest = new WorldGen.GrowTreeSettings.IsWallTypeFitForTreeBack(WorldGen.DefaultTreeWallTest), + TreeHeightMax = 12, + TreeHeightMin = 7, + TreeTileType = 616, + TreeTopPaddingNeeded = 4, + SaplingTileType = 615 + }; + + public static bool TryGetFromItemId(int itemType, out WorldGen.GrowTreeSettings profile) + { + switch (itemType) + { + case 4851: + profile = WorldGen.GrowTreeSettings.Profiles.GemTree_Topaz; + return true; + case 4852: + profile = WorldGen.GrowTreeSettings.Profiles.GemTree_Amethyst; + return true; + case 4853: + profile = WorldGen.GrowTreeSettings.Profiles.GemTree_Sappphire; + return true; + case 4854: + profile = WorldGen.GrowTreeSettings.Profiles.GemTree_Emerald; + return true; + case 4855: + profile = WorldGen.GrowTreeSettings.Profiles.GemTree_Ruby; + return true; + case 4856: + profile = WorldGen.GrowTreeSettings.Profiles.GemTree_Diamond; + return true; + case 4857: + profile = WorldGen.GrowTreeSettings.Profiles.GemTree_Amber; + return true; + case 4871: + profile = WorldGen.GrowTreeSettings.Profiles.VanityTree_Sakura; + return true; + case 4907: + profile = WorldGen.GrowTreeSettings.Profiles.VanityTree_Willow; + return true; + default: + profile = new WorldGen.GrowTreeSettings(); + return false; + } + } + } + } + + public struct CheckTreeSettings + { + public WorldGen.CheckTreeSettings.GroundValidTest IsGroundValid; + + public delegate bool GroundValidTest(int groundTileType); + } + + public enum SpecialKillTileContext + { + None, + MowingTheGrass, + } + + public delegate bool GetTreeFoliageDataMethod( + int i, + int j, + int xoffset, + ref int treeFrame, + ref int treeStyle, + out int floorY, + out int topTextureFrameWidth, + out int topTextureFrameHeight); + } +} diff --git a/WorldSections.cs b/WorldSections.cs new file mode 100644 index 0000000..f48e310 --- /dev/null +++ b/WorldSections.cs @@ -0,0 +1,394 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.WorldSections +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +using Microsoft.Xna.Framework; +using System; +using System.Diagnostics; + +namespace Terraria +{ + public class WorldSections + { + private int width; + private int height; + private BitsByte[] data; + private int mapSectionsLeft; + private int frameSectionsLeft; + private WorldSections.IterationState prevFrame; + private WorldSections.IterationState prevMap; + + public WorldSections(int numSectionsX, int numSectionsY) + { + this.width = numSectionsX; + this.height = numSectionsY; + this.data = new BitsByte[this.width * this.height]; + this.mapSectionsLeft = this.width * this.height; + this.prevFrame.Reset(); + this.prevMap.Reset(); + } + + public int FrameSectionsLeft => this.frameSectionsLeft; + + public int MapSectionsLeft => this.mapSectionsLeft; + + public bool SectionLoaded(int x, int y) => x >= 0 && x < this.width && y >= 0 && y < this.height && this.data[y * this.width + x][0]; + + public void SectionLoaded(int x, int y, bool value) + { + if (x < 0 || x >= this.width || y < 0 || y >= this.height) + return; + this.data[y * this.width + x][0] = value; + } + + public bool SectionFramed(int x, int y) => x >= 0 && x < this.width && y >= 0 && y < this.height && this.data[y * this.width + x][1]; + + public void SectionFramed(int x, int y, bool value) + { + if (x < 0 || x >= this.width || y < 0 || y >= this.height) + return; + if (this.data[y * this.width + x][1] != value) + { + if (value) + ++this.frameSectionsLeft; + else + --this.frameSectionsLeft; + } + this.data[y * this.width + x][1] = value; + } + + public bool MapSectionDrawn(int x, int y) => x >= 0 && x < this.width && y >= 0 && y < this.height && this.data[y * this.width + x][2]; + + public void MapSectionDrawn(int x, int y, bool value) + { + if (x < 0 || x >= this.width || y < 0 || y >= this.height) + return; + if (this.data[y * this.width + x][1] != value) + { + if (value) + ++this.mapSectionsLeft; + else + --this.mapSectionsLeft; + } + this.data[y * this.width + x][2] = value; + } + + public void ClearMapDraw() + { + for (int index = 0; index < this.data.Length; ++index) + this.data[index][2] = false; + this.prevMap.Reset(); + this.mapSectionsLeft = this.data.Length; + } + + public void SetSectionLoaded(int x, int y) + { + if (x < 0 || x >= this.width || y < 0 || y >= this.height || this.data[y * this.width + x][0]) + return; + this.data[y * this.width + x][0] = true; + ++this.frameSectionsLeft; + } + + public void SetSectionFramed(int x, int y) + { + if (x < 0 || x >= this.width || y < 0 || y >= this.height || this.data[y * this.width + x][1]) + return; + this.data[y * this.width + x][1] = true; + --this.frameSectionsLeft; + } + + public void SetAllFramesLoaded() + { + for (int index = 0; index < this.data.Length; ++index) + { + if (!this.data[index][0]) + { + this.data[index][0] = true; + ++this.frameSectionsLeft; + } + } + } + + public bool GetNextMapDraw(Vector2 playerPos, out int x, out int y) + { + if (this.mapSectionsLeft <= 0) + { + x = -1; + y = -1; + return false; + } + Stopwatch stopwatch = new Stopwatch(); + stopwatch.Start(); + int num1 = 0; + int num2 = 0; + Vector2 vector2 = this.prevMap.centerPos; + playerPos *= 1f / 16f; + int sectionX = Netplay.GetSectionX((int) playerPos.X); + int sectionY = Netplay.GetSectionY((int) playerPos.Y); + int num3 = Netplay.GetSectionX((int) vector2.X); + int num4 = Netplay.GetSectionY((int) vector2.Y); + int num5; + if (num3 != sectionX || num4 != sectionY) + { + vector2 = playerPos; + num3 = sectionX; + num4 = sectionY; + num5 = 4; + x = sectionX; + y = sectionY; + } + else + { + num5 = this.prevMap.leg; + x = this.prevMap.X; + y = this.prevMap.Y; + num1 = this.prevMap.xDir; + num2 = this.prevMap.yDir; + } + int num6 = (int) ((double) playerPos.X - ((double) num3 + 0.5) * 200.0); + int num7 = (int) ((double) playerPos.Y - ((double) num4 + 0.5) * 150.0); + if (num1 == 0) + { + num1 = num6 <= 0 ? 1 : -1; + num2 = num7 <= 0 ? 1 : -1; + } + int num8 = 0; + bool flag1 = false; + bool flag2 = false; + while (true) + { + if (num8 == 4) + { + if (!flag2) + { + flag2 = true; + x = num3; + y = num4; + num6 = (int) ((double) vector2.X - ((double) num3 + 0.5) * 200.0); + num7 = (int) ((double) vector2.Y - ((double) num4 + 0.5) * 150.0); + num1 = num6 <= 0 ? 1 : -1; + num2 = num7 <= 0 ? 1 : -1; + num5 = 4; + num8 = 0; + } + else + break; + } + if (y >= 0 && y < this.height && x >= 0 && x < this.width) + { + flag1 = false; + if (!this.data[y * this.width + x][2]) + goto label_14; + } + int num9 = x - num3; + int num10 = y - num4; + if (num9 == 0 || num10 == 0) + { + if (num5 == 4) + { + if (num9 == 0 && num10 == 0) + { + if (Math.Abs(num6) > Math.Abs(num7)) + y -= num2; + else + x -= num1; + } + else + { + if (num9 != 0) + x += num9 / Math.Abs(num9); + if (num10 != 0) + y += num10 / Math.Abs(num10); + } + num5 = 0; + num8 = -2; + flag1 = true; + } + else + { + if (num9 == 0) + num2 = num10 <= 0 ? 1 : -1; + else + num1 = num9 <= 0 ? 1 : -1; + x += num1; + y += num2; + ++num5; + } + if (flag1) + ++num8; + else + flag1 = true; + } + else + { + x += num1; + y += num2; + } + } + throw new Exception("Infinite loop in WorldSections.GetNextMapDraw"); +label_14: + this.data[y * this.width + x][2] = true; + --this.mapSectionsLeft; + this.prevMap.centerPos = playerPos; + this.prevMap.X = x; + this.prevMap.Y = y; + this.prevMap.leg = num5; + this.prevMap.xDir = num1; + this.prevMap.yDir = num2; + stopwatch.Stop(); + return true; + } + + public bool GetNextTileFrame(Vector2 playerPos, out int x, out int y) + { + if (this.frameSectionsLeft <= 0) + { + x = -1; + y = -1; + return false; + } + Stopwatch stopwatch = new Stopwatch(); + stopwatch.Start(); + int num1 = 0; + int num2 = 0; + Vector2 vector2 = this.prevFrame.centerPos; + playerPos *= 1f / 16f; + int sectionX = Netplay.GetSectionX((int) playerPos.X); + int sectionY = Netplay.GetSectionY((int) playerPos.Y); + int num3 = Netplay.GetSectionX((int) vector2.X); + int num4 = Netplay.GetSectionY((int) vector2.Y); + int num5; + if (num3 != sectionX || num4 != sectionY) + { + vector2 = playerPos; + num3 = sectionX; + num4 = sectionY; + num5 = 4; + x = sectionX; + y = sectionY; + } + else + { + num5 = this.prevFrame.leg; + x = this.prevFrame.X; + y = this.prevFrame.Y; + num1 = this.prevFrame.xDir; + num2 = this.prevFrame.yDir; + } + int num6 = (int) ((double) playerPos.X - ((double) num3 + 0.5) * 200.0); + int num7 = (int) ((double) playerPos.Y - ((double) num4 + 0.5) * 150.0); + if (num1 == 0) + { + num1 = num6 <= 0 ? 1 : -1; + num2 = num7 <= 0 ? 1 : -1; + } + int num8 = 0; + bool flag1 = false; + bool flag2 = false; + while (true) + { + if (num8 == 4) + { + if (!flag2) + { + flag2 = true; + x = num3; + y = num4; + num6 = (int) ((double) vector2.X - ((double) num3 + 0.5) * 200.0); + num7 = (int) ((double) vector2.Y - ((double) num4 + 0.5) * 150.0); + num1 = num6 <= 0 ? 1 : -1; + num2 = num7 <= 0 ? 1 : -1; + num5 = 4; + num8 = 0; + } + else + break; + } + if (y >= 0 && y < this.height && x >= 0 && x < this.width) + { + flag1 = false; + if (this.data[y * this.width + x][0] && !this.data[y * this.width + x][1]) + goto label_14; + } + int num9 = x - num3; + int num10 = y - num4; + if (num9 == 0 || num10 == 0) + { + if (num5 == 4) + { + if (num9 == 0 && num10 == 0) + { + if (Math.Abs(num6) > Math.Abs(num7)) + y -= num2; + else + x -= num1; + } + else + { + if (num9 != 0) + x += num9 / Math.Abs(num9); + if (num10 != 0) + y += num10 / Math.Abs(num10); + } + num5 = 0; + num8 = 0; + flag1 = true; + } + else + { + if (num9 == 0) + num2 = num10 <= 0 ? 1 : -1; + else + num1 = num9 <= 0 ? 1 : -1; + x += num1; + y += num2; + ++num5; + } + if (flag1) + ++num8; + else + flag1 = true; + } + else + { + x += num1; + y += num2; + } + } + throw new Exception("Infinite loop in WorldSections.GetNextTileFrame"); +label_14: + this.data[y * this.width + x][1] = true; + --this.frameSectionsLeft; + this.prevFrame.centerPos = playerPos; + this.prevFrame.X = x; + this.prevFrame.Y = y; + this.prevFrame.leg = num5; + this.prevFrame.xDir = num1; + this.prevFrame.yDir = num2; + stopwatch.Stop(); + return true; + } + + private struct IterationState + { + public Vector2 centerPos; + public int X; + public int Y; + public int leg; + public int xDir; + public int yDir; + + public void Reset() + { + this.centerPos = new Vector2(-3200f, -2400f); + this.X = 0; + this.Y = 0; + this.leg = 0; + this.xDir = 0; + this.yDir = 0; + } + } + } +} diff --git a/ZoomContext.cs b/ZoomContext.cs new file mode 100644 index 0000000..b16afee --- /dev/null +++ b/ZoomContext.cs @@ -0,0 +1,16 @@ +// Decompiled with JetBrains decompiler +// Type: Terraria.ZoomContext +// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null +// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83 +// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe + +namespace Terraria +{ + public enum ZoomContext + { + Unscaled, + World, + Unscaled_MouseInWorld, + UI, + } +}